[cut: only the first 33554432 bytes of this file were read]
/* This file has been generated by the Hex-Rays decompiler.
   Copyright (c) 2007-2015 Hex-Rays <info@hex-rays.com>

   Detected compiler: Visual C++
*/

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

#include <stdarg.h>


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

#define __thiscall __cdecl // Test compile in C mode

void AnimationMD5Checksum::AnimationMD5Checksum();
void __cdecl AnimationMD5Checksum::CheckAniFileMD5(Name8 MD5Hash, Name8 Subdir, Name60Byte FileName); // idb
std::bad_alloc *__thiscall std::bad_alloc::`vector deleting destructor'(std::bad_alloc *this, unsigned int a2);
char *__cdecl Folder::Character(); // idb
char *__cdecl Folder::Merge(char *pcPath, char *pcFile); // idb
void __thiscall std::bad_alloc::bad_alloc(std::bad_alloc *this, std::bad_alloc *__that); // idb
const char *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::c_str(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this); // idb
void __thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Tidy(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, bool _Built, unsigned int _Newsize); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::erase(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int _Off, unsigned int _Count); // idb
char *__stdcall std::allocator<char>::allocate(unsigned int _Count);
void __thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Copy(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int _Newsize, unsigned int _Oldlen); // idb
int __thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Grow(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int _Newsize, bool _Trim);
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Right, unsigned int _Roff, unsigned int _Count); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, const char *_Ptr, unsigned int _Count); // idb
void __thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, const char *_Ptr); // idb
void __thiscall Argv::~Argv(Argv *this); // idb
char *__thiscall Argv::GetMerge(Argv *this, char *filename); // idb
void __thiscall Argv::Init(Argv *this); // idb
// void __thiscall Argv::Argv(Argv *this); idb
Argv *__thiscall Argv::`vector deleting destructor'(Argv *this, unsigned int a2);
void __thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Right, unsigned int _Roff, unsigned int _Count); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, const char *_Ptr, unsigned int _Count); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, const char *_Ptr); // idb
void __thiscall BoxAnnounceWin::BoxAnnounceWin(BoxAnnounceWin *this); // idb
void __thiscall BoxAnnounceWin::~BoxAnnounceWin(BoxAnnounceWin *this); // idb
void __thiscall BoxAnnounceWin::SetMsg(BoxAnnounceWin *this, const char *pcMsg); // idb
char __thiscall BoxAnnounceWin::Create(BoxAnnounceWin *this, PgFrameWork *pkFrameWork);
void __thiscall BoxAnnounceWin::UpdateMeWin(BoxAnnounceWin *this, float fCurTime); // idb
void __thiscall BoxAnnounceWin::SetLifeTime(BoxAnnounceWin *this, float fLifeTime); // idb
BoxAnnounceWin *__cdecl BoxAnnounceWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall NiRefObject::DecRefCount(NiRefObject *this); // idb
char __thiscall NiObject::IsKindOf(NiObject *this, NiRTTI *pkRTTI);
void __thiscall NiAVObject::SetAppCulled(NiAVObject *this, bool bAppCulled); // idb
void __cdecl PgScreenXY::GetBoxClipLeftTop(unsigned int uiScreenCx, unsigned int uiScreenCy, unsigned int uiBoxCx, unsigned int uiBoxCy, float fCenterXRate, float fCenterYRate, int *iBoxLeft, int *iBoxTop); // idb
void __thiscall NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags(NiD3DShaderProgramCreatorAsm *this, unsigned int uiFlags); // idb
NiRTTI *PgWin::GetRTTI();
void __thiscall PgWin::SetWinName(PgWin *this, const char *pcWinText); // idb
// unsigned int __usercall PgWin::GetWidth@<eax>(PgWin *this@<ecx>, double a2@<st0>);
// unsigned int __usercall PgWin::GetHeight@<eax>(PgWin *this@<ecx>, double a2@<st0>);
void __thiscall PgWin::SetHeight(PgWinSpr *this, unsigned int uiHeight); // idb
void __thiscall PgWin::GetWinSize(PgWin *this, unsigned int *uiWidth, unsigned int *uiHeight); // idb
void __thiscall PgWin::GetWinRect(PgWin *this, tagRECT *kRect); // idb
void __thiscall PgWin::GetWinRect(PgWin *this, NiRect<int> *kRect); // idb
int __thiscall PgWin::GetLeftPos(PgWin *this); // idb
int __thiscall PgWin::GetRightPos(PgWin *this); // idb
int __thiscall PgWin::GetTopPos(PgWin *this); // idb
int __thiscall PgWin::GetBottomPos(PgWin *this); // idb
int __thiscall PgWin::GetXPos(PgWin *this); // idb
int __thiscall PgWin::GetYPos(PgWin *this); // idb
void __thiscall PgWin::SetXPos(PgWin *this, int iXPos); // idb
void __thiscall PgWin::SetYPos(PgWin *this, int iYPos); // idb
void __thiscall PgWin::GetWinPos(PgWin *this, int *iXPos, int *iYPos); // idb
void __thiscall PgWin::GetWinScreenRect(PgWin *this, tagRECT *kRect); // idb
void __thiscall PgWin::ClientToScreen(PgWin *this, int *iClientX, int *iClientY); // idb
void __thiscall PgWin::ScreenToClient(PgWin *this, int *iScreenX, int *iScreenY); // idb
void __thiscall PgWin::Enable(PgWin *this, bool b); // idb
bool __thiscall PgWin::GetEnable(PgWin *this); // idb
void __thiscall PgWin::Show(PgWin *this, bool b); // idb
int __thiscall PgWin::GetShow(PgWin *this);
void __thiscall PgWin::SetScale(PgWin *this, float fScale); // idb
double __thiscall PgWin::GetScale(PgWin *this);
void __thiscall PgWin::SetZRotate(PgWin *this, float fangle); // idb
void __thiscall PgWin::SetRotate(PgWin *this, NiMatrix3 *kMat); // idb
void __thiscall PgWin::SetExtStyle(PgWin *this, unsigned int uiExtstyle); // idb
unsigned int __thiscall PgWin::GetExtStyle(PgWin *this); // idb
void __thiscall PgWin::MoveWin(PgWin *this, int iXPos, int iYPos); // idb
int __thiscall PgWin::HitTestEx(PgWin *this, int iSx, int iSy);
bool __thiscall PgWin::HitTest(PgWin *this, int iSx, int iSy); // idb
char __thiscall PgWin::HitTest(PgWin *this, int iSx, int iSy, int *iClientAreaX, int *iClientAreaY);
char __thiscall PgWin::ProcessMeDrop(PgWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
bool __thiscall PgWin::GetRegisterFirstHit(PgWin *this); // idb
void __thiscall PgWin::SetRegisterFirstHit(PgWin *this, bool b); // idb
bool __thiscall PgSprData::PgHitTester::HitTest(PgSprData::PgHitTester *this, int iXPos, int iYPos); // idb
unsigned int __thiscall PgWinSpr::GetSelectSprIndex(PgWinSpr *this); // idb
void __thiscall PgWinFrame::SetMovable(PgWinFrame *this, bool b); // idb
bool __thiscall PgWinFrame::GetMovable(PgWinFrame *this); // idb
BoxAnnounceWin *__thiscall BoxAnnounceWin::`scalar deleting destructor'(BoxAnnounceWin *this, unsigned int a2);
char __cdecl NiObject::IsKindOf(NiRTTI *pkRTTI, NiObject *pkObject);
PgWin *__thiscall PgWin::GetParentWin(PgWin *this); // idb
PgWin *__thiscall PgWin::GetNextChildWin(PgWin *this, unsigned int *uiPos); // idb
void __thiscall PgWin::GetWinRectWithChild(PgWin *this, NiRect<int> *kRect); // idb
void __thiscall PgWin::GetWinScreenPos(PgWin *this, int *iSx, int *iSy); // idb
void __thiscall PgWin::InitPos(PgWin *this, unsigned int uiScreenWidth, unsigned int uiScreenHeight, float fXPosRate, float fYPosRate); // idb
void __thiscall PgWin::InitPos(PgWin *this, unsigned int uiScreenWidth, unsigned int uiScreenHeight, int iXPos, float fYPosRate); // idb
void __thiscall PgWin::InitPos(PgWin *this, unsigned int uiScreenWidth, unsigned int uiScreenHeight, float fXPosRate, int iYPos); // idb
void __thiscall PgWin::EnableChildWin(PgWin *this, int b);
bool __thiscall PgWin::IsInputPossible(PgWin *this); // idb
// bool __userpurge PgWinSpr::HitTest@<al>(PgWinSpr *this@<ecx>, int a2@<ebx>, int a3@<edi>, double a4@<st0>, int iSx, int iSy);
// char __userpurge PgWinSpr::HitTest@<al>(PgWinSpr *this@<ecx>, int a2@<ebx>, int a3@<edi>, double a4@<st0>, int iSx, int iSy, int *iClientAreaX, int *iClientAreaY);
// unsigned int __usercall PgWinSpr::GetWidth@<eax>(PgWinSpr *this@<ecx>, double a2@<st0>);
// unsigned int __usercall PgWinSpr::GetHeight@<eax>(PgWinSpr *this@<ecx>, double a2@<st0>);
void __thiscall PgWinSpr::SetWidth(PgWinSpr *this, unsigned int uiWidth); // idb
int __thiscall PgWinSpr::GetChangedWidth(PgWinSpr *this);
int __thiscall PgWinSpr::GetChangedHeight(PgWinSpr *this);
void __thiscall PgWinSpr::ChangeWidth(PgWinSpr *this, unsigned int uiWidth); // idb
void __thiscall PgWinSpr::ChangeHeight(PgWinSpr *this, unsigned int uiHeight); // idb
void __thiscall PgWinSpr::ResetChangedWidth(PgWinSpr *this); // idb
void __thiscall PgWinSpr::ResetChangedHeight(PgWinSpr *this); // idb
void __thiscall PgWinSpr::ChangeWidthWithUV(PgWinSpr *this, unsigned int uiWidth, bool bReverse); // idb
void __thiscall PgWinSpr::ChangeHeightWithUV(PgWinSpr *this, unsigned int uiHeight, bool bReverse); // idb
void __thiscall PgWinSpr::SetTexture(PgWinSpr *this, NiTexture *pkTexture); // idb
NiSourceTexture *__thiscall PgWinSpr::GetTexture(PgWinSpr *this);
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *this, NiPointer<NiRoom> *element); // idb
NiTListItem<PgWin *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWin *>::FindPos(NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWin *> *this, PgWin *const *element, void *kStart);
void __thiscall NiAVObject::AttachProperty(NiAVObject *this, NiProperty *pkProperty); // idb
char __thiscall PgWinMgr::Add(PgWinMgr *this, PgWin *pkWin);
void __thiscall PgWin::SetAlpha(PgWin *this, float fAlpha); // idb
double __thiscall PgWin::GetAlpha(PgWin *this);
NiPointer<PgWin> *__thiscall PgWinMgr::Remove(PgWinMgr *this, NiPointer<PgWin> *result, PgWin *pkWin); // idb
void __thiscall CameraCtrl::InitDirection(CameraCtrl *this, NiPoint3 kUpDir, NiPoint3 kRightDir, NiPoint3 kFrontDir); // idb
void __thiscall CameraCtrl::InitZoomMinMax(CameraCtrl *this, const float fZoomMin, const float fZoomMax); // idb
double __thiscall CameraCtrl::GetZoom(CameraCtrl *this);
void __thiscall CameraCtrl::SetLookAtPos(CameraCtrl *this, NiPoint3 *kPos); // idb
void __thiscall CameraCtrl::GetLookAtPos(CameraCtrl *this, NiPoint3 *kPos); // idb
void __thiscall CameraCtrl::SetZoomRatePerTick(CameraCtrl *this, float fRate); // idb
void __thiscall CameraCtrl::SetZoomMin(CameraCtrl *this, float fMin); // idb
void __thiscall CameraCtrl::SetZoomMax(CameraCtrl *this, float fMax); // idb
void __thiscall CameraCtrl::SetZoomDef(CameraCtrl *this, float fDef); // idb
void __thiscall CameraCtrl::Update(CameraCtrl *this, float fTime); // idb
void __thiscall CameraCtrl::AutoRotate(CameraCtrl *this, float fAngle, float fMsDeltaX); // idb
void __thiscall CameraCtrl::ChangeCheckRayTile(CameraCtrl *this); // idb
void __thiscall CameraCtrl::SetZoom(CameraCtrl *this, float fZoom); // idb
void __thiscall CameraCtrl::AddZoom(CameraCtrl *this, int iMsDeltaZ); // idb
void __thiscall CameraCtrl::AddRotate(CameraCtrl *this, int iMsDeltaX, int iMsDeltaY); // idb
void __thiscall CameraCtrl::AddRotate(CameraCtrl *this, float fDeltaX, float fDeltaY); // idb
void __thiscall CameraCtrl::CameraCtrl(CameraCtrl *this); // idb
void __thiscall CameraCtrl::~CameraCtrl(CameraCtrl *this); // idb
void __thiscall CameraCtrl::CalCulateCamera(CameraCtrl *this, NiPoint3 *kCameraPos); // idb
void __thiscall CameraCtrl::AddTraceRotate(CameraCtrl *this, int iMsDeltaX); // idb
NiPoint3 *__thiscall NiPoint3::operator+(NiPoint3 *this, NiPoint3 *result, NiPoint3 *pt); // idb
void __thiscall NiMatrix3::MakeRotation(NiMatrix3 *this, float fAngle, NiPoint3 *axis); // idb
void __thiscall std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::clear(std::list<float,std::allocator<float> > *this); // idb
std::_List_nod<float,std::allocator<float> >::_Node *__stdcall std::_List_val<float,std::allocator<float>>::_Buynode(std::_List_nod<float,std::allocator<float> >::_Node *_Next, std::_List_nod<float,std::allocator<float> >::_Node *_Prev, const float *_Val);
CameraCtrl *__thiscall CameraCtrl::`scalar deleting destructor'(CameraCtrl *this, unsigned int a2);
int __cdecl cAntiCheat::CRC32(const char *data, unsigned int size);
void __cdecl __noreturn cAntiCheat::KillFO();
int __cdecl cAntiCheat::ComputeCRC(); // idb
void __cdecl __noreturn cAntiCheat::CRCCheck();
int __cdecl cAntiCheat::CompareAgainstHashes(std::basic_string<char,std::char_traits<char>,std::allocator<char> > toCompare); // idb
int __stdcall cAntiCheat::EnumChildProc(HWND__ *hwnd, int lParam); // idb
int __stdcall cAntiCheat::EnumWindowsProc(HWND__ *hWnd, int lParam); // idb
void __cdecl __noreturn cAntiCheat::EnumCheck();
char *__cdecl Folder::Menu(); // idb
char *__thiscall CharCreateClassWin::GetAvatarCreateName(CharCreateClassWin *this); // idb
void __thiscall CharCreateClassWin::KillFocus(CharCreateClassWin *this); // idb
void __thiscall CharCreateClassWin::SetFocus(CharCreateClassWin *this); // idb
void __thiscall CharCreateClassWin::ClearNameEditBox(CharCreateClassWin *this); // idb
void __thiscall CharCreateClassWin::Show(CharCreateClassWin *this, bool b); // idb
void __thiscall CharCreateClassWin::SetSentinelButEnable(CharCreateClassWin *this, int bEnable);
void __thiscall CharCreateClassWin::~CharCreateClassWin(CharCreateClassWin *this); // idb
void __thiscall CharCreateClassWin::OnSetClass(CharCreateClassWin *this, unsigned int uiClass); // idb
void __thiscall CharCreateClassWin::CharCreateClassWin(CharCreateClassWin *this); // idb
char __thiscall CharCreateClassWin::Create(CharCreateClassWin *this, PgFrameWork *pkFrameWork);
void __thiscall CharCreateClassWin::OnCommand(CharCreateClassWin *this, unsigned int wParam, int lParam); // idb
CharCreateClassWin *__cdecl CharCreateClassWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::~NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>(NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *this); // idb
void __thiscall NiTMap<unsigned long,NiPointer<PgWinBut>>::~NiTMap<unsigned long,NiPointer<PgWinBut>>(NiTMap<unsigned long,NiPointer<PgWinBut> > *this); // idb
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::`vector deleting destructor'(NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *this, unsigned int a2);
NiUnsharedGeometryGroup *__cdecl TextData3::Get(unsigned int eTextID);
NiTMap<unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<unsigned long,NiPointer<PgWinBut>>::`vector deleting destructor'(NiTMap<unsigned long,NiPointer<PgWinBut> > *this, unsigned int a2);
CharCreateClassWin *__thiscall CharCreateClassWin::`scalar deleting destructor'(CharCreateClassWin *this, unsigned int a2);
void __thiscall CharCreateDescritWin::SetClass(CharCreateDescritWin *this, char kClass); // idb
void __thiscall CharCreateDescritWin::OnCommand(CharCreateDescritWin *this, unsigned int wParam, int lParam); // idb
void __thiscall CharCreateDescritWin::UpdateMeWin(CharCreateDescritWin *this, float fCurTime); // idb
void __thiscall CharCreateDescritWin::UpdateSlideBar(CharCreateDescritWin *this); // idb
void __thiscall CharCreateDescritWin::SetTree(CharCreateDescritWin *this, char kClass); // idb
void __thiscall CharCreateDescritWin::~CharCreateDescritWin(CharCreateDescritWin *this); // idb
void __thiscall CharCreateDescritWin::CharCreateDescritWin(CharCreateDescritWin *this); // idb
void __thiscall CharCreateDescritWin::SetMark(CharCreateDescritWin *this, char kClass); // idb
void __thiscall CharCreateDescritWin::SetTreeText(CharCreateDescritWin *this, char kClass); // idb
CharCreateDescritWin *__cdecl CharCreateDescritWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall CharCreateDescritWin::AddTextWithSplit(CharCreateDescritWin *this, char *pcText); // idb
void __thiscall CharCreateDescritWin::SetDescription(CharCreateDescritWin *this, char kClass); // idb
void __thiscall CharCreateDescritWin::UpdateView(CharCreateDescritWin *this); // idb
char __thiscall CharCreateDescritWin::Create(CharCreateDescritWin *this, PgFrameWork *pkFrameWork);
void __thiscall boost::detail::sp_counted_base::weak_release(boost::detail::sp_counted_base *this); // idb
char __cdecl CharClass::GetBaseClassID(char kClassID); // idb
void __thiscall NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned long,NiPointer<PgWinSpr>>::~NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned long,NiPointer<PgWinSpr>>(NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned long,NiPointer<PgWinSpr> > *this); // idb
NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned long,NiPointer<PgWinSpr> > *__thiscall NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned long,NiPointer<PgWinSpr>>::`vector deleting destructor'(NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned long,NiPointer<PgWinSpr> > *this, unsigned int a2);
void __thiscall boost::detail::sp_counted_base::release(boost::detail::sp_counted_base *this); // idb
boost::detail::shared_count *__thiscall boost::detail::shared_count::operator=(boost::detail::shared_count *this, boost::detail::shared_count *r); // idb
PgWinText *__thiscall SlideListWin::GetTextWin(SlideListWin *this, unsigned int uiIndex, unsigned int uiColumn); // idb
NiUnsharedGeometryGroup *__cdecl TextData2::Get(unsigned int eTextID);
void __thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Chassign(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int _Off, unsigned int _Count, char _Ch); // idb
void __thiscall boost::shared_ptr<SLWCreateInfo::Item>::~shared_ptr<SLWCreateInfo::Item>(boost::shared_ptr<PgNsTerrain::CPgBlockObject> *this); // idb
void __thiscall NiPointer<PgWinLRBut>::`default constructor closure'(NiPointer<NiD3DTextureStage> *this); // idb
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<unsigned long,NiPointer<PgWinSpr>>::`scalar deleting destructor'(NiTMap<unsigned long,NiPointer<PgWinSpr> > *this, unsigned int a2);
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__stdcall std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::allocate(unsigned int _Count);
NiUnsharedGeometryGroup *__cdecl CharClass::GetLocalName(char kClassID);
CharCreateDescritWin *__thiscall CharCreateDescritWin::`scalar deleting destructor'(CharCreateDescritWin *this, unsigned int a2);
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int _Count, char _Ch); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator=(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, const char *_Ptr); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Right); // idb
void __cdecl std::_Destroy_range<std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_First, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Last);
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__cdecl std::_Uninit_move<std::basic_string<char,std::char_traits<char>,std::allocator<char>> *,std::basic_string<char,std::char_traits<char>,std::allocator<char>> *,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_First, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Last, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Dest);
void __thiscall SLWCreateInfo::~SLWCreateInfo(SLWCreateInfo *this); // idb
void __thiscall SLWCreateInfo::Clear(SLWCreateInfo *this); // idb
void __thiscall std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::reserve(std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *this, unsigned int _Count); // idb
void __thiscall std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::_Reserve(std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *this, unsigned int _Count); // idb
void __thiscall std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Val); // idb
// bool __usercall IsSpecialChar@<al>(char c1@<bl>, char c2); idb
// char __usercall IsSpecialCharInStr@<al>(char *pstr@<eax>);
char __thiscall IsSpecialCharInStr2(char *pstr);
// char __usercall IsPeculiarStr@<al>(char *pcName@<esi>);
void __thiscall CharCreateFrameWork::CreateCancel(CharCreateFrameWork *this); // idb
void __thiscall CharCreateFrameWork::ChangeAvatarFace(CharCreateFrameWork *this); // idb
void __thiscall CharCreateFrameWork::ChangeAvatarHair(CharCreateFrameWork *this); // idb
void __thiscall CharCreateFrameWork::ChangeAvatarHairColor(CharCreateFrameWork *this); // idb
void __thiscall CharCreateFrameWork::OnInitializeStatus(CharCreateFrameWork *this); // idb
void __thiscall CharCreateFrameWork::OnErrorGotoAccount(CharCreateFrameWork *this); // idb
void __thiscall CharCreateFrameWork::SetClass(CharCreateFrameWork *this, char kClass); // idb
void __thiscall CharCreateFrameWork::ActPos(CharCreateFrameWork *this); // idb
void __thiscall CharCreateFrameWork::ActStand(CharCreateFrameWork *this); // idb
void __thiscall CharCreateFrameWork::ActNormalStand(CharCreateFrameWork *this); // idb
void CharCreateFrameWork::OnErrorGotoExit();
void __thiscall CharCreateFrameWork::Draw(CharCreateFrameWork *this); // idb
void __thiscall CharCreateFrameWork::ProcessMsg(CharCreateFrameWork *this, unsigned int uiMsg, unsigned int uiwParam, unsigned int uilParam); // idb
void __thiscall CharCreateFrameWork::Reset(CharCreateFrameWork *this); // idb
void __thiscall CharCreateFrameWork::TurnRight(CharCreateFrameWork *this); // idb
void __thiscall CharCreateFrameWork::TurnLeft(CharCreateFrameWork *this); // idb
void __thiscall CharCreateFrameWork::ApplyTerrain(CharCreateFrameWork *this, NiNode *pkGroundNode); // idb
void __thiscall CharCreateFrameWork::RenderShadow(CharCreateFrameWork *this); // idb
void __thiscall CharCreateFrameWork::Update(CharCreateFrameWork *this, float fCurTime); // idb
// void __userpurge CharCreateFrameWork::SetAvatarEquiq(CharCreateFrameWork *this@<ecx>, int a2@<ebx>, ChrClassType eClassType, int iMale);
// void __usercall CharCreateFrameWork::Refresh(CharCreateFrameWork *this@<ecx>, int a2@<ebx>);
// void __usercall CharCreateFrameWork::ChangeAvatarClass(CharCreateFrameWork *this@<ecx>, int a2@<ebx>);
void __thiscall CharCreateFrameWork::ChangeAvatarGender(CharCreateFrameWork *this); // idb
// void __usercall CharCreateFrameWork::CreateOk(CharCreateFrameWork *this@<ecx>, int a2@<ebx>);
int __cdecl std::char_traits<char>::compare(const char *_First1, const char *_First2, unsigned int _Count); // idb
void __thiscall Name5::operator=(Name5 *this, const char *nm); // idb
unsigned int __cdecl ITableBase<ChrCreateEquip,ChrCreateEquipTab>::GetTotal(); // idb
NiUnsharedGeometryGroup *__cdecl TextData::Get(unsigned int eTextID);
void __thiscall NsDecal::SetObjectTerrain(NsDecal *this, NiNode *_spTerrain); // idb
int __thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int _Off, unsigned int _N0, const char *_Ptr, unsigned int _Count); // idb
ChrCreateEquip *__cdecl ChrCreateEquipTab::GetByIndex(ChrClassType eClassType, int iMale); // idb
int __thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Right); // idb
int __stdcall stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::operator()(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Keyval);
bool __stdcall std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::operator()(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Left, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Right);
void __cdecl FaceInfoTab::GetEquipableFace(char ucGrade, void *padwResult); // idb
void __cdecl HairInfoTab::GetEquipableHairType(char kClassID, char ucGender, char ucUsableGrade, void *padwResult); // idb
ItemInfo *__cdecl ItemInfoTab::GetByInxName(char *pcInxName); // idb
void __thiscall CharCreateInfoWin::OnCmdSexL(CharCreateInfoWin *this); // idb
void __thiscall CharCreateInfoWin::OnCmdSexR(CharCreateInfoWin *this); // idb
void __thiscall CharCreateInfoWin::~CharCreateInfoWin(CharCreateInfoWin *this); // idb
char __thiscall CharCreateInfoWin::Create(CharCreateInfoWin *this, PROTO_AVATAR_SHAPE_INFO *pkShapeInfo, PgFrameWork *pkFrameWork);
void __thiscall CharCreateInfoWin::CharCreateInfoWin(CharCreateInfoWin *this); // idb
void __thiscall CharCreateInfoWin::UpdateMeWin(CharCreateInfoWin *this, float fCurTime); // idb
CharCreateInfoWin *__cdecl CharCreateInfoWin::CreateWin(PROTO_AVATAR_SHAPE_INFO *pkShapeInfo, PgFrameWork *pkFrameWork); // idb
void __thiscall CharCreateInfoWin::OnCmdFaceL(CharCreateInfoWin *this); // idb
void __thiscall CharCreateInfoWin::OnCmdFaceR(CharCreateInfoWin *this); // idb
void __thiscall CharCreateInfoWin::OnCmdHairL(CharCreateInfoWin *this); // idb
void __thiscall CharCreateInfoWin::OnCmdHairR(CharCreateInfoWin *this); // idb
void __thiscall CharCreateInfoWin::OnCmdColorL(CharCreateInfoWin *this); // idb
void __thiscall CharCreateInfoWin::OnCmdColorR(CharCreateInfoWin *this); // idb
void __thiscall CharCreateInfoWin::OnCommand(CharCreateInfoWin *this, unsigned int wParam, int lParam); // idb
HairInfo *__cdecl HairInfoTab::GetHairInfo(char byHairID); // idb
CharCreateInfoWin *__thiscall CharCreateInfoWin::`vector deleting destructor'(CharCreateInfoWin *this, unsigned int a2);
void __cdecl HairColorInfoTab::GetEquipableHairColor(char ucGrade, void *padwResult); // idb
NiRTTI *NiProperty::GetRTTI();
void __thiscall NiLight::SetAmbientColor(NiLight *this, NiColor *color); // idb
void __thiscall NiLight::SetDiffuseColor(NiLight *this, NiColor *color); // idb
void __thiscall NiLight::SetSpecularColor(NiLight *this, NiColor *color); // idb
void __thiscall NiVertexColorProperty::NiVertexColorProperty(NiVertexColorProperty *this); // idb
NiRTTI *NiVertexColorProperty::GetRTTI();
int NiVertexColorProperty::Type();
void __thiscall Name5::Name5(PROTO_CHAT_RESTRICT_INFO *this); // idb
void __thiscall IDirectMessenger::SendDirectMessage(IDirectMessenger *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
char __thiscall PgFrameWork::Init(PgFrameWork *this, PgMsg::Frame *pkFrameMsg);
void __thiscall PgFrameWork::Terminate(PgFrameWork *this); // idb
PgWinMgr::PgWinMsg *__thiscall PgTQueue<PgWinMgr::PgWinMsg>::Remove(PgTQueue<PgWinMgr::PgWinMsg> *this, PgWinMgr::PgWinMsg *result); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::~NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> > *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> > *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> > *this, unsigned int a2);
void __thiscall Studio::SetSubject(Ni2DBuffer *this, Ni2DBuffer::RendererData *pkRendererData); // idb
void __thiscall NiCriticalSection::Unlock(NiCriticalSection *this); // idb
void __stdcall NiTPointerAllocator<unsigned int>::Deallocate(void *pkDel);
int NiTAbstractPoolAllocator<unsigned int>::CreateFreeMem();
void __thiscall NiAlphaProperty::NiAlphaProperty(NiAlphaProperty *this); // idb
NiRTTI *NiAlphaProperty::GetRTTI();
NiRTTI *NiFogProperty::GetRTTI();
NiWireframeProperty *__thiscall NiFogProperty::`scalar deleting destructor'(NiWireframeProperty *this, unsigned int a2);
NiRTTI *PgFrameWork::GetRTTI();
void __thiscall PgFrameWork::Update(PgFrameWork *this, float fCurTime); // idb
const char *PgFrameWork::GetFrameWorkName();
void __thiscall PgFrameWork::~PgFrameWork(PgFrameWork *this); // idb
PgFrameWork *__thiscall PgFrameWork::`scalar deleting destructor'(PgFrameWork *this, unsigned int a2);
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> > *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> > *this, unsigned int a2);
void __thiscall NiTPointerList<NiPointer<Shadow>>::~NiTPointerList<NiPointer<Shadow>>(NiTPointerList<NiPointer<Shadow> > *this); // idb
int NiTPointerAllocator<unsigned int>::Allocate();
void __thiscall CharCreateFrameWork::TerminateWindow(CharCreateFrameWork *this); // idb
void __thiscall CharCreateFrameWork::TerminateBackgroundScene(CharCreateFrameWork *this); // idb
void __thiscall CharCreateFrameWork::TerminateAvatar(CharCreateFrameWork *this); // idb
bool __thiscall CharCreateFrameWork::InitNet(CharCreateFrameWork *this); // idb
void __thiscall CharCreateFrameWork::TerminateNet(CharCreateFrameWork *this); // idb
char __thiscall CharCreateFrameWork::InitShadow(CharCreateFrameWork *this);
void __thiscall CharCreateFrameWork::CharCreateFrameWork(CharCreateFrameWork *this); // idb
void __thiscall CharCreateFrameWork::~CharCreateFrameWork(CharCreateFrameWork *this); // idb
char __thiscall CharCreateFrameWork::InitBackgroundScene(CharCreateFrameWork *this);
void __thiscall CharCreateFrameWork::ReleaseShadow(CharCreateFrameWork *this); // idb
void __thiscall CharCreateFrameWork::Terminate(CharCreateFrameWork *this); // idb
bool __thiscall CharCreateFrameWork::InitWindow(CharCreateFrameWork *this); // idb
char __thiscall CharCreateFrameWork::InitAvatar(CharCreateFrameWork *this);
char __thiscall CharCreateFrameWork::Init(CharCreateFrameWork *this, PgMsg::Frame *ptFrameMsg);
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *this, NiPointer<NiDX92DBufferData> *element); // idb
void __thiscall PgTList<NiPointer<Shadow>>::~PgTList<NiPointer<Shadow>>(PgTList<NiPointer<Shadow> > *this); // idb
PgTList<NiPointer<Shadow> > *__thiscall PgTList<NiPointer<Shadow>>::`vector deleting destructor'(PgTList<NiPointer<Shadow> > *this, unsigned int a2);
NiRTTI *CharCreateFrameWork::GetRTTI();
const char *CharCreateFrameWork::GetFrameWorkName();
CharCreateFrameWork *__thiscall CharCreateFrameWork::`vector deleting destructor'(CharCreateFrameWork *this, unsigned int a2);
int __thiscall CharCreateFrameWork::On_NC_AVATAR_CREATESUCC_ACK(CharCreateFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall CharCreateFrameWork::On_NC_USER_CONNECTCUT_CMD(int iRevBytes, void *pvData);
void __thiscall CharCreateFrameWork::NcAvatarCreateReq(CharCreateFrameWork *this); // idb
int __thiscall CharCreateFrameWork::On_NC_AVATAR_CREATEFAIL_ACK(CharCreateFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall CharCreateFrameWork::ProcessNetMsg(CharCreateFrameWork *this, int iDepart, int iCommand, int iRevBytes, void *pvData); // idb
void __thiscall Name5::operator=(Name5 *this, Name5 *nm); // idb
void __thiscall CharCreateOkCancelWin::CharCreateOkCancelWin(CharCreateOkCancelWin *this); // idb
void __thiscall CharCreateOkCancelWin::~CharCreateOkCancelWin(CharCreateOkCancelWin *this); // idb
// void __usercall CharCreateOkCancelWin::OnCmdOK(CharCreateOkCancelWin *this@<ecx>, int a2@<ebx>);
void __thiscall CharCreateOkCancelWin::OnCmdCancel(CharCreateOkCancelWin *this); // idb
char __thiscall CharCreateOkCancelWin::Create(CharCreateOkCancelWin *this, PgFrameWork *pkFrameWork);
// void __userpurge CharCreateOkCancelWin::OnCommand(CharCreateOkCancelWin *this@<ecx>, int a2@<ebx>, unsigned int wParam, int lParam);
CharCreateOkCancelWin *__cdecl CharCreateOkCancelWin::CreateWin(PgFrameWork *pkFrameWork); // idb
CharCreateOkCancelWin *__thiscall CharCreateOkCancelWin::`vector deleting destructor'(CharCreateOkCancelWin *this, unsigned int a2);
void __thiscall CharCreateStatWin::CharCreateStatWin(CharCreateStatWin *this); // idb
void __thiscall CharCreateStatWin::~CharCreateStatWin(CharCreateStatWin *this); // idb
void __thiscall CharCreateStatWin::UpdateMeWin(CharCreateStatWin *this, float fCurTime); // idb
void __thiscall CharCreateStatWin::SetClass(CharCreateStatWin *this, char kClass); // idb
char __thiscall CharCreateStatWin::Create(CharCreateStatWin *this, PgFrameWork *pkFrameWork);
void __thiscall CharCreateStatWin::SetAniCode(CharCreateStatWin *this); // idb
CharCreateStatWin *__cdecl CharCreateStatWin::CreateWin(PgFrameWork *pkFrameWork); // idb
CharCreateStatWin *__thiscall CharCreateStatWin::`scalar deleting destructor'(CharCreateStatWin *this, unsigned int a2);
char __thiscall NiActorManager::SetTargetAnimation(NiActorManager *this, unsigned int eSequenceID);
void __thiscall CharCreateViewCtrlWin::CharCreateViewCtrlWin(CharCreateViewCtrlWin *this); // idb
void __thiscall CharCreateViewCtrlWin::~CharCreateViewCtrlWin(CharCreateViewCtrlWin *this); // idb
void __thiscall CharCreateViewCtrlWin::OnMouseEvent(CharCreateViewCtrlWin *this, PgWin::PG_MOUSE_EVENT eMouseEvent, PgWin *pkWin); // idb
char __thiscall CharCreateViewCtrlWin::Create(CharCreateViewCtrlWin *this, PgFrameWork *pkFrameWork);
CharCreateViewCtrlWin *__cdecl CharCreateViewCtrlWin::CreateWin(PgFrameWork *pkFrameWork); // idb
CharCreateViewCtrlWin *__thiscall CharCreateViewCtrlWin::`vector deleting destructor'(CharCreateViewCtrlWin *this, unsigned int a2);
void __thiscall Name3::operator=(Name3 *this, const char *nm); // idb
void __thiscall World::SetMapName(World *this, char *pcMapName); // idb
char __thiscall CharSelectFrameWork::InitWindow(CharSelectFrameWork *this);
void __thiscall CharSelectFrameWork::TerminateWindow(CharSelectFrameWork *this); // idb
void __thiscall CharSelectFrameWork::TerminateBackgroundScene(CharSelectFrameWork *this); // idb
char __thiscall CharSelectFrameWork::InitAvatar(CharSelectFrameWork *this);
void __thiscall CharSelectFrameWork::TerminateAvatar(CharSelectFrameWork *this); // idb
char __thiscall CharSelectFrameWork::InitNet(CharSelectFrameWork *this);
void __thiscall CharSelectFrameWork::TerminateNet(CharSelectFrameWork *this); // idb
char __thiscall CharSelectFrameWork::InitShadow(CharSelectFrameWork *this);
void __thiscall CharSelectFrameWork::CharSelectFrameWork(CharSelectFrameWork *this); // idb
void __thiscall CharSelectFrameWork::~CharSelectFrameWork(CharSelectFrameWork *this); // idb
char __thiscall CharSelectFrameWork::InitBackgroundScene(CharSelectFrameWork *this);
void __thiscall CharSelectFrameWork::ReleaseShadow(CharSelectFrameWork *this); // idb
char __thiscall CharSelectFrameWork::Init(CharSelectFrameWork *this, PgMsg::Frame *ptFrameMsg);
void __thiscall CharSelectFrameWork::Terminate(CharSelectFrameWork *this); // idb
NiRTTI *CharSelectFrameWork::GetRTTI();
const char *CharSelectFrameWork::GetFrameWorkName();
CharSelectFrameWork *__thiscall CharSelectFrameWork::`scalar deleting destructor'(CharSelectFrameWork *this, unsigned int a2);
void __thiscall CharSelectMenuWin::EnableOKBut(CharSelectMenuWin *this, int b);
// bool __usercall IsSpecialChar_0@<al>(char c1@<bl>, char c2); idb
// char __usercall IsSpecialCharInStr_0@<al>(char *pstr@<eax>);
char __thiscall IsSpecialCharInStr2_0(char *pstr);
// char __usercall IsPeculiarStr_0@<al>(char *pcName@<esi>);
void __thiscall ChangeNameWin::OnClose(ChangeNameWin *this); // idb
void __thiscall ChangeNameWin::SetNameEdit(ChangeNameWin *this, const char *name); // idb
void __thiscall CharSelectFrameWork::OnCharEraseFailMsgClose(CharSelectFrameWork *this); // idb
void __thiscall CharSelectFrameWork::OnCharLoginFailMsgClose(CharSelectFrameWork *this); // idb
void __thiscall CharSelectFrameWork::OnZoneConnectFailMsgClose(CharSelectFrameWork *this); // idb
void __thiscall CharSelectFrameWork::OnZoneLoginFailMsgClose(CharSelectFrameWork *this); // idb
void __thiscall CharSelectFrameWork::OnZoneLoginComplete(CharSelectFrameWork *this); // idb
void __thiscall CharSelectFrameWork::OnEraseMsgOk(CharSelectFrameWork *this); // idb
void __thiscall CharSelectFrameWork::OnEraseMsgCancel(CharSelectFrameWork *this); // idb
void __thiscall CharSelectFrameWork::OnErrorGotoAccount(CharSelectFrameWork *this); // idb
void CharSelectFrameWork::OnErrorGotoExit();
void __thiscall CharSelectFrameWork::OnTutorialPopupMsg(CharSelectFrameWork *this, bool bIsSkip); // idb
void __thiscall ChangeNameWin::~ChangeNameWin(ChangeNameWin *this); // idb
void __thiscall ChangeNameWin::OnShowWin(ChangeNameWin *this); // idb
char __stdcall ChangeNameWin::FindCharSlot(char *pcName);
void __thiscall ChangeNameWin::Open(ChangeNameWin *this, PgWin *pkRevWin, unsigned int uiOkMsg, unsigned int uiMax, char *pcText); // idb
// char __usercall SearchSlot@<al>(NiAVObject *pkAVObject@<eax>); idb
void __stdcall CharSelectFrameWork::ActPos(Avatar *m_pActor, unsigned int ui_pos);
void __stdcall CharSelectFrameWork::ActActivePos(Avatar *m_pActor, unsigned int ui_pos);
void __stdcall CharSelectFrameWork::ActActiveEndPos(Avatar *m_pActor, unsigned int ui_pos);
void __thiscall ChangeNameWin::ChangeNameWin(ChangeNameWin *this); // idb
char __thiscall ChangeNameWin::Create(ChangeNameWin *this, PgFrameWork *pkFrameWork);
void __thiscall ChangeNameWin::OnDelCharOk(ChangeNameWin *this); // idb
void __thiscall ChangeNameWin::BtnState(ChangeNameWin *this, ChangeNameWin::BtnFunction e, int b);
void __thiscall ChangeNameWin::OnCmdOk(ChangeNameWin *this); // idb
void __thiscall ChangeNameWin::OnCmdCancel(ChangeNameWin *this); // idb
void __thiscall CharSelectFrameWork::Draw(CharSelectFrameWork *this); // idb
void __thiscall CharSelectFrameWork::SelectOk(CharSelectFrameWork *this); // idb
void __thiscall CharSelectFrameWork::SelectCancel(CharSelectFrameWork *this); // idb
void __thiscall CharSelectFrameWork::CreateAvatar(CharSelectFrameWork *this); // idb
void __thiscall CharSelectFrameWork::DeleteAvatar(CharSelectFrameWork *this); // idb
void __thiscall CharSelectFrameWork::OnZoneLoginFail(CharSelectFrameWork *this); // idb
void __thiscall CharSelectFrameWork::ApplyTerrain(CharSelectFrameWork *this, NiNode *pkGroundNode); // idb
void __thiscall CharSelectFrameWork::RenderShadow(CharSelectFrameWork *this); // idb
void __thiscall ChangeNameWin::OnCommand(ChangeNameWin *this, unsigned int wParam, int lParam); // idb
void __thiscall CharSelectFrameWork::SelectAvatar(CharSelectFrameWork *this, unsigned int uiSlot); // idb
void __thiscall CharSelectFrameWork::OnZoneConnectFail(CharSelectFrameWork *this); // idb
void __thiscall CharSelectFrameWork::ProcessInput(CharSelectFrameWork *this); // idb
// void __userpurge CharSelectFrameWork::Update(CharSelectFrameWork *this@<ecx>, int a2@<ebx>, float fCurTime);
void __thiscall CharSelectFrameWork::ProcessMsg(CharSelectFrameWork *this, unsigned int uiMsg, unsigned int uiwParam, unsigned int uilParam); // idb
ChangeNameWin *__cdecl ChangeNameWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall Name5::Name5(Name5 *this, const char *str); // idb
int __thiscall Name5::operator==(Name5 *this, Name5 *nm); // idb
char *__thiscall Name5::n_string(Name5 *this, char *buf); // idb
void __thiscall NsABVPicking::SetTarget(NsABVPicking *this, NiAVObject *pObject); // idb
ChangeNameWin *__thiscall ChangeNameWin::`scalar deleting destructor'(ChangeNameWin *this, unsigned int a2);
void __thiscall ChatColorSpinWin::SetChatColorID(ChatColorSpinWin *this, char kColorID); // idb
void __thiscall ChatColorSpinWin::SetTimer(ChatColorSpinWin *this, bool bTimer); // idb
void __thiscall ChatColorSpinWin::OnShowWin(ChatColorSpinWin *this); // idb
void __thiscall ChatColorSpinWin::OnOK(ChatColorSpinWin *this); // idb
void __thiscall ChatColorSpinWin::Roll(ChatColorSpinWin *this); // idb
void __thiscall ChatColorSpinWin::Decrease(ChatColorSpinWin *this, float fTime); // idb
void __thiscall ChatColorSpinWin::Reset(ChatColorSpinWin *this); // idb
void __thiscall ChatColorSpinWin::ChatColorSpinWin(ChatColorSpinWin *this); // idb
void __thiscall ChatColorSpinWin::~ChatColorSpinWin(ChatColorSpinWin *this); // idb
void __thiscall ChatColorSpinWin::OnCommand(ChatColorSpinWin *this, unsigned int wParam, int lParam); // idb
void __thiscall ChatColorSpinWin::DirectMessage(ChatColorSpinWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall ChatColorSpinWin::OnClose(ChatColorSpinWin *this); // idb
void __thiscall ChatColorSpinWin::UpdateTimer(ChatColorSpinWin *this, float fTime); // idb
void __thiscall ChatColorSpinWin::UpdateMeWin(ChatColorSpinWin *this, float fCurTime); // idb
ChatColorSpinWin *__cdecl ChatColorSpinWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall ChatColorSpinWin::Create(ChatColorSpinWin *this, PgFrameWork *pkFrameWork);
void __thiscall NiAVObject::SetTranslate(NiAVObject *this, float x, float y, float z); // idb
unsigned int __thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::find(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, const char *_Ptr, unsigned int _Off, unsigned int _Count); // idb
unsigned int __cdecl ITableBase<ChatColor,ChatColorTab>::GetTotal(); // idb
ChatColor *__cdecl ChatColorTab::GetByID(char kColorID); // idb
ChatColorSpinWin *__thiscall ChatColorSpinWin::`scalar deleting destructor'(ChatColorSpinWin *this, unsigned int a2);
void __thiscall ClassChangeWin::OnClose(ClassChangeWin *this); // idb
void ClassChangeWin::OnHelpLink();
void __thiscall ClassChangeWin::SetMoney(ClassChangeWin *this, unsigned __int64 kTotalPrice); // idb
void ClassChangeWin::GoCharSelectFrameWork();
void __thiscall ClassChangeWin::~ClassChangeWin(ClassChangeWin *this); // idb
void __thiscall ClassChangeWin::OnOK(ClassChangeWin *this); // idb
void __thiscall ClassChangeWin::ClassChangeWin(ClassChangeWin *this); // idb
char __thiscall ClassChangeWin::Create(ClassChangeWin *this, PgFrameWork *pkFrameWokr);
void __thiscall ClassChangeWin::OnCommand(ClassChangeWin *this, unsigned int wParam, int lParam); // idb
void __thiscall ClassChangeWin::SetChangeClassID(ClassChangeWin *this, int kNewClass);
ClassChangeWin *__cdecl ClassChangeWin::CreateWin(PgFrameWork *pkFrameWork); // idb
signed int __stdcall ClassChangeWin::CheckChageState(int *iInvPos);
void __stdcall ClassChangeWin::DirectMessage(int iMsgTag, void *pvBody, IDirectMessenger *pkFrom);
unsigned int __thiscall NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::KeyToHashIndex(NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *this, char key); // idb
BOOL __stdcall NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned char,NiPointer<NiNode>>::IsKeysEqual(char key1, char key2);
char *__cdecl Folder::Effect(); // idb
bool __cdecl CharClass::TestChrClassMask(__int64 kClassMask, unsigned int dwClass); // idb
unsigned int __cdecl ITableBase<ChargedItemEffect,ChargedEffectTable>::GetTotal(); // idb
void __thiscall NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::~NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>(NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *this); // idb
void __thiscall NiTMap<unsigned char,NiPointer<PgWinSpr>>::~NiTMap<unsigned char,NiPointer<PgWinSpr>>(NiTMap<unsigned char,NiPointer<PgWinSpr> > *this); // idb
NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *__thiscall NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::`vector deleting destructor'(NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *this, unsigned int a2);
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<unsigned char,NiPointer<PgWinSpr>>::`vector deleting destructor'(NiTMap<unsigned char,NiPointer<PgWinSpr> > *this, unsigned int a2);
void __thiscall NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::SetAt(NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *this, int key, NiPointer<PgWinSpr> val);
char __thiscall NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::GetAt(NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *this, int key, NiPointer<PgWinSpr> *val);
void __thiscall NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::GetNext(NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *this, void **pos, char *key, NiPointer<PgWinSpr> *val); // idb
void __stdcall NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::SetValue(NiTMapItem<unsigned char,NiPointer<PgWinSpr> > *pkItem, char key, NiPointer<PgWinSpr> val);
ChargedItemEffect *__cdecl ChargedEffectTable::GetByEffectEnum(EffectEnumerate eEffect); // idb
ClassChangeWin *__thiscall ClassChangeWin::`vector deleting destructor'(ClassChangeWin *this, unsigned int a2);
NiColor *__cdecl Color::GetNiColor(NiColor *result, char ucR, char ucG, char ucB); // idb
D3DXCOLOR *__cdecl Color::GetDxColor(D3DXCOLOR *result, char ucR, char ucG, char ucB, char ucA); // idb
NiColor *__cdecl Color::Dx2NiColor(NiColor *result, D3DXCOLOR *kDxColor); // idb
D3DXCOLOR *__cdecl Color::Ni2DxColor(D3DXCOLOR *result, NiColor *kNiColor); // idb
void __thiscall DShowMovie::DShowMovie(DShowMovie *this); // idb
char __thiscall DShowMovie::Load(DShowMovie *this, char *pcFilename, HWND__ *hShowWnd);
void __thiscall DShowMovie::CleanUp(DShowMovie *this); // idb
void __thiscall DShowMovie::Play(DShowMovie *this); // idb
void __thiscall DShowMovie::Stop(DShowMovie *this); // idb
char __thiscall DShowMovie::MsgProc(DShowMovie *this, HWND__ *hWnd, unsigned int uiMsg, unsigned int wParam, int lParam);
bool DShowMovie::IsPlaying();
void __thiscall DShowMovie::~DShowMovie(DShowMovie *this); // idb
DShowMovie *__thiscall DShowMovie::`vector deleting destructor'(DShowMovie *this, unsigned int a2);
void __cdecl Engine3D::ShaderRunParserCallback(const char *pcLibFile, NiRenderer *pkRenderer, const char *pcDirectory, bool bRecurseSubFolders);
BOOL __cdecl Engine3D::ShaderClassCreateCallback(const char *pcLibFile, NiRenderer *pkRenderer, int iDirectoryCount, char **apcDirectories, bool bRecurseSubFolders, NiShaderLibrary **ppkLibrary);
bool __cdecl Engine3D::FXLibraryClassCreate(const char *pcLibFile, NiRenderer *pkRenderer, int iDirectoryCount, char **apcDirectories, bool bRecurseSubFolders, NiShaderLibrary **ppkLibrary); // idb
bool __cdecl Engine3D::GetEnableCarToon(); // idb
void __cdecl Engine3D::EnableCarToon(bool bEnable); // idb
void __cdecl Engine3D::Terminate(); // idb
char __cdecl Engine3D::Init(NiCamera *pkCamera);
char *__cdecl Folder::Main(); // idb
char *__cdecl AbsMsgTable::GetAbstateSysMsg(); // idb
char *__cdecl ErrMsgTable::GetErrMsg(int iErrCode); // idb
void __thiscall EventRankWin::AddRank(EventRankWin *this, unsigned int uiRank, const char *pcName, unsigned int uiScore); // idb
void __thiscall EventRankWin::OnShowWin(EventRankWin *this); // idb
void EventRankWin::OnHelpLink();
void __thiscall EventRankWin::OnRankCur(EventRankWin *this); // idb
void __thiscall EventRankWin::OnRankPrev(EventRankWin *this); // idb
void __thiscall EventRankWin::OnCommand(EventRankWin *this, unsigned int wParam, int lParam); // idb
void __thiscall EventRankWin::AddPrevRank(EventRankWin *this, SCENARIO_RANKING_INFO kRank); // idb
void __thiscall EventRankWin::AddCurRank(EventRankWin *this, SCENARIO_RANKING_INFO kRank); // idb
void __thiscall EventRankWin::OnClose(EventRankWin *this); // idb
void __thiscall EventRankWin::EventRankWin(EventRankWin *this); // idb
void __thiscall EventRankWin::~EventRankWin(EventRankWin *this); // idb
EventRankWin *__cdecl EventRankWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall EventRankWin::Create(EventRankWin *this, PgFrameWork *pkFrameWork);
std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *__stdcall std::_List_val<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO>>::_Buynode(std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *_Next, std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *_Prev, SCENARIO_RANKING_INFO *_Val);
EventRankWin *__thiscall EventRankWin::`scalar deleting destructor'(EventRankWin *this, unsigned int a2);
void __thiscall EventTimeWin::EventTimeWin(EventTimeWin *this); // idb
void __thiscall EventTimeWin::~EventTimeWin(EventTimeWin *this); // idb
void __thiscall EventTimeWin::UpdateTimer(EventTimeWin *this, float fCurTime); // idb
void __thiscall EventTimeWin::UpdateCloser(EventTimeWin *this, float fCurTime); // idb
void __thiscall EventTimeWin::UpdateMeWin(EventTimeWin *this, float fCurTime); // idb
void __thiscall EventTimeWin::Start(EventTimeWin *this, float fCurTime); // idb
void __thiscall EventTimeWin::Stop(EventTimeWin *this, float fDeleteTime); // idb
char __thiscall EventTimeWin::Create(EventTimeWin *this, PgFrameWork *pkFrameWork);
EventTimeWin *__cdecl EventTimeWin::CreateWin(PgFrameWork *pkFrameWork); // idb
EventTimeWin *__thiscall EventTimeWin::`scalar deleting destructor'(EventTimeWin *this, unsigned int a2);
void __cdecl Folder::Init(); // idb
bool __cdecl Font::IsInit(); // idb
struct Font::FontDefine **__cdecl Font::GetFontDefine(Font::Type eType);
int __stdcall Font::EnumFontsProc(tagLOGFONTA *lplf, tagTEXTMETRICA *lptm, unsigned int dwType, int lpData); // idb
void __thiscall Font::FontDefine::FontDefine(Font::FontDefine *this); // idb
void __thiscall Font::FontDefine::FontDefine(Font::FontDefine *this, const char *pName, unsigned int height, unsigned int weight); // idb
void __thiscall Font::FontDefine::FontDefine(Font::FontDefine *this, FontSet *pkFontSet); // idb
void __cdecl Font::Termiante(); // idb
void __cdecl Font::EncryptFontFile(); // idb
PgFont *__cdecl Font::Create(Font::Type eType); // idb
char __cdecl Font::ParseIniFile();
bool __cdecl Font::IsUserFont(); // idb
PgFont *__cdecl Font::Get(Font::Type eType); // idb
void __cdecl Font::FontInit(); // idb
char __cdecl Font::Init();
Encrypt::FileStream *__thiscall Encrypt::FileStream::`vector deleting destructor'(Encrypt::FileStream *this, unsigned int a2);
void __stdcall `vector constructor iterator'(void *__t, unsigned int __s, int __n, void *(__thiscall *__f)(void *)); // idb
void __cdecl PgUtil::ChangeCharInText(char *pcText, char cOld, char cNew, unsigned int uiLen); // idb
char *__cdecl Folder::System(); // idb
FontSet *__cdecl FontSetTab::GetByFSIndex(const char *pcIndex); // idb
void __thiscall FontSetTab::FontSetTab(FontSetTab *this); // idb
FontSetTab *__thiscall FontSetTab::`vector deleting destructor'(FontSetTab *this, unsigned int a2);
bool __cdecl ITableBase<FontSet,FontSetTab>::Load(char *acFn);
void __thiscall ForumWin::ReGenPos(ForumWin *this); // idb
void __thiscall ForumWin::UpdateWebPos(ForumWin *this); // idb
void __thiscall ForumWin::OnWinClose(ForumWin *this); // idb
void __thiscall ForumWin::UpdateMeWin(ForumWin *this, float fCurTime); // idb
char __thiscall ForumWin::Create(ForumWin *this, PgFrameWork *pkFrameWork);
void __thiscall ForumWin::ForumWin(ForumWin *this); // idb
void __thiscall ForumWin::~ForumWin(ForumWin *this); // idb
ForumWin *__cdecl ForumWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall ForumWin::OnShowWin(ForumWin *this); // idb
HWND__ *__cdecl CreateWebWindow(HWND__ *hParent, HINSTANCE__ *hInstance, const char *acWebAddr, tagRECT *rkRect, PgWin *pkWin); // idb
ForumWin *__thiscall ForumWin::`scalar deleting destructor'(ForumWin *this, unsigned int a2);
void __thiscall GuildEmblemIcon::GuildEmblemIcon(GuildEmblemIcon *this); // idb
void __thiscall GuildEmblemIcon::~GuildEmblemIcon(GuildEmblemIcon *this); // idb
unsigned int __thiscall GuildEmblemIcon::GetEmblemIconIndex(GuildEmblemIcon *this); // idb
void __thiscall GuildEmblemIcon::SetSelectEmblem(GuildEmblemIcon *this, bool bInput); // idb
bool __stdcall GuildEmblemIcon::IsSelectEmblemIcon(const char *nFileNo, const char *nIconNo);
char __thiscall GuildEmblemIcon::SetEmblemIcon(GuildEmblemIcon *this, const char *nFileNo, const char *nIconNo, int bShow);
void __thiscall GuildEmblemIcon::UpdateMeWin(GuildEmblemIcon *this, float fCurTime); // idb
void __thiscall GuildEmblemIcon::DoAction(GuildEmblemIcon *this); // idb
char __thiscall GuildEmblemIcon::Create(GuildEmblemIcon *this, int iXPos, int iYPos, unsigned int nIconIndex, PgWin *pkParent, PgFrameWork *pkFrameWork, unsigned int uiWidth, unsigned int uiHeight);
void __thiscall GuildEmblemIcon::SetAlpha(GuildEmblemIcon *this, const float *fAlpha); // idb
GuildEmblemIcon *__cdecl GuildEmblemIcon::CreateWin(int iXPos, int iYPos, unsigned int nIconIndex, PgWin *pkParent, PgFrameWork *pkFrameWork, unsigned int uiWidth, unsigned int uiHeight); // idb
NiRTTI *PgWinBut::GetRTTI();
void __thiscall PgWinBut::SetCommandMsg(PgWinBut *this, unsigned int uiCmdMsg); // idb
void __thiscall PgWinBut::SetCommandMsgParam(PgWinBut *this, unsigned int uiCmdMsgParam); // idb
void __thiscall PgWinBut::Enable(PgWinBut *this, bool b); // idb
void __thiscall PgWinBut::DisableAlwaysButShow(PgWinBut *this, bool b); // idb
unsigned int __thiscall PgWinBut::GetCommandMsg(PgWinBut *this); // idb
void __thiscall PgWinLRBut::SetRCommandMsg(PgWinLRBut *this, unsigned int uiCmdMsg); // idb
void __thiscall PgWinLRBut::SetRCommandMsgParam(PgWinLRBut *this, unsigned int uiCmdMsgParam); // idb
GuildEmblemIcon *__thiscall GuildEmblemIcon::`scalar deleting destructor'(GuildEmblemIcon *this, unsigned int a2);
void __thiscall NiTexturingProperty::SetBaseTexture(NiTexturingProperty *this, NiTexture *pkTexture); // idb
void __thiscall PgWinBut::SetButShow(PgWinBut *this, PgWinBut::ButShow eShow); // idb
void __thiscall PgWinLRBut::DoRAction(PgWinLRBut *this); // idb
void __thiscall IconWin::SetTexture(IconWin *this, NiSourceTexture *pkTexture); // idb
void __thiscall GuildEmblemWin::GuildEmblemWin(GuildEmblemWin *this); // idb
void __thiscall GuildEmblemWin::~GuildEmblemWin(GuildEmblemWin *this); // idb
void __thiscall GuildEmblemWin::OnClose(GuildEmblemWin *this); // idb
void GuildEmblemWin::OnCancelWin();
void GuildEmblemWin::OnHelp();
void __thiscall GuildEmblemWin::ShowSlot(GuildEmblemWin *this, const unsigned int *nColor, const int *nSlotPage); // idb
char __thiscall GuildEmblemWin::ShowEmblemSlot(GuildEmblemWin *this, const unsigned int *nSelect, const unsigned int *nColor);
void __thiscall GuildEmblemWin::OnShowWin(GuildEmblemWin *this); // idb
void __thiscall GuildEmblemWin::ChangeSlot(GuildEmblemWin *this, bool bNextPage); // idb
void __thiscall GuildEmblemWin::SelectEmblem(GuildEmblemWin *this, const unsigned int *nSelect); // idb
void __thiscall GuildEmblemWin::SelectColor(GuildEmblemWin *this, const unsigned int *nChangeColorSlot); // idb
char __thiscall GuildEmblemWin::Create(GuildEmblemWin *this, PgFrameWork *pkFrameWork);
void __thiscall GuildEmblemWin::OnApplyEmblem(GuildEmblemWin *this); // idb
void __thiscall GuildEmblemWin::OnCommand(GuildEmblemWin *this, unsigned int wParam, int lParam); // idb
GuildEmblemWin *__cdecl GuildEmblemWin::CreateWin(PgFrameWork *pkFrameWork); // idb
GuildEmblemWin *__thiscall GuildEmblemWin::`vector deleting destructor'(GuildEmblemWin *this, unsigned int a2);
char __cdecl IconMgr::Init();
void __cdecl IconMgr::Terminate(); // idb
NiSourceTexture *__cdecl IconMgr::LoadIconImage(char *pcFileName); // idb
NiSourceTexture *__cdecl IconMgr::GetTexture(char *pcFileName); // idb
NiSourceTexture *__cdecl IconMgr::GetTexturePng(char *pcFileName); // idb
NiPointer<NiTexturingProperty> *__cdecl IconMgr::GetAniTextureProperty(NiPointer<NiTexturingProperty> *result, const char *pkFileName); // idb
NiPointer<NiD3DDefaultShader> *__thiscall NiPointer<PopupMenuWin>::operator=(NiPointer<NiD3DDefaultShader> *this, NiD3DDefaultShader *pObject); // idb
void __thiscall NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,char const *,NiPointer<NiSourceTexture>>::~NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,char const *,NiPointer<NiSourceTexture>>(NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,char const *,NiPointer<NiSourceTexture> > *this); // idb
void __thiscall NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiSourceTexture>>,NiPointer<NiSourceTexture>>::~NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiSourceTexture>>,NiPointer<NiSourceTexture>>(NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiSourceTexture> >,NiPointer<NiSourceTexture> > *this); // idb
void __thiscall NiTMapBase<DFALL<NiPointer<NiTexturingProperty>>,char const *,NiPointer<NiTexturingProperty>>::~NiTMapBase<DFALL<NiPointer<NiTexturingProperty>>,char const *,NiPointer<NiTexturingProperty>>(NiTMapBase<DFALL<NiPointer<NiTexturingProperty> >,char const *,NiPointer<NiTexturingProperty> > *this); // idb
void __thiscall NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiTexturingProperty>>,NiPointer<NiTexturingProperty>>::~NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiTexturingProperty>>,NiPointer<NiTexturingProperty>>(NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiTexturingProperty> >,NiPointer<NiTexturingProperty> > *this); // idb
NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,char const *,NiPointer<NiSourceTexture> > *__thiscall NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,char const *,NiPointer<NiSourceTexture>>::`scalar deleting destructor'(NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,char const *,NiPointer<NiSourceTexture> > *this, unsigned int a2);
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<char const *,NiPointer<NiSourceTexture>>::`scalar deleting destructor'(NiTMap<char const *,NiPointer<NiSourceTexture> > *this, unsigned int a2);
NiTMapBase<DFALL<NiPointer<NiTexturingProperty> >,char const *,NiPointer<NiTexturingProperty> > *__thiscall NiTMapBase<DFALL<NiPointer<NiTexturingProperty>>,char const *,NiPointer<NiTexturingProperty>>::`scalar deleting destructor'(NiTMapBase<DFALL<NiPointer<NiTexturingProperty> >,char const *,NiPointer<NiTexturingProperty> > *this, unsigned int a2);
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<char const *,NiPointer<NiTexturingProperty>>::`scalar deleting destructor'(NiTMap<char const *,NiPointer<NiTexturingProperty> > *this, unsigned int a2);
NiTStringMap<NiPointer<NiTexturingProperty> > *__thiscall NiTStringMap<NiPointer<NiTexturingProperty>>::`vector deleting destructor'(NiTStringMap<NiPointer<NiTexturingProperty> > *this, unsigned int a2);
NiTStringMap<NiPointer<NiSourceTexture> > *__thiscall NiTStringMap<NiPointer<NiSourceTexture>>::`scalar deleting destructor'(NiTStringMap<NiPointer<NiSourceTexture> > *this, unsigned int a2);
ItemMixDataTab *__thiscall ItemMixDataTab::`scalar deleting destructor'(ItemMixDataTab *this, unsigned int a2);
void __thiscall MixItemIcon::MixItemIcon(MixItemIcon *this); // idb
void __thiscall MixItemIcon::~MixItemIcon(MixItemIcon *this); // idb
void __thiscall MixItemIcon::SetTranslucence(MixItemIcon *this); // idb
void __thiscall MixItemIcon::SetTransparency(MixItemIcon *this); // idb
MixItemIcon *__thiscall ItemMixWin::GetInsertedSlot(ItemMixWin *this, unsigned int _uiSlotNum); // idb
char __thiscall MixItemIcon::Create(MixItemIcon *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork);
char __thiscall MixItemIcon::SetSenderInvSlotLock(MixItemIcon *this, bool _bLock);
void __thiscall MixItemIcon::ReSetSlot(MixItemIcon *this); // idb
void __thiscall MixItemIcon::SetTemporaryIcon(MixItemIcon *this, unsigned __int16 _pItemId); // idb
void __thiscall MixItemIcon::OnFirstHitWin(MixItemIcon *this); // idb
void __thiscall ItemMixWin::UpdateMeWin(ItemMixWin *this, float fCurTime); // idb
void __thiscall ItemMixWin::ResetAddItemIcon(ItemMixWin *this); // idb
void __thiscall ItemMixWin::SetDisableMixButton(ItemMixWin *this, bool bDisable); // idb
void __thiscall ItemMixWin::OnCancel(ItemMixWin *this); // idb
void __thiscall ItemMixWin::DirectMessage(ItemMixWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall MixItemIcon::DoAction(MixItemIcon *this); // idb
void __thiscall MixItemIcon::DoRAction(MixItemIcon *this); // idb
void __thiscall ItemMixWin::OnApply(ItemMixWin *this); // idb
void __thiscall ItemMixWin::~ItemMixWin(ItemMixWin *this); // idb
MixItemIcon *__cdecl MixItemIcon::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork); // idb
void __thiscall ItemMixWin::ItemMixWin(ItemMixWin *this); // idb
ItemMixWin *__cdecl ItemMixWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall ItemMixWin::SetResultItemSlot(ItemMixWin *this, Item *pMaterialItem); // idb
// char __userpurge ItemMixWin::DropItemSlot@<al>(ItemMixWin *this@<ecx>, unsigned int a2@<esi>, unsigned int _uiReceiverInvIndex, PgWinDrop *_pkDrop);
void __thiscall ItemMixWin::ResetAllData(ItemMixWin *this); // idb
void __thiscall ItemMixWin::ShowMixResult(ItemMixWin *this, bool bSuccess); // idb
void __thiscall ItemMixWin::OnSlotLClick(ItemMixWin *this, unsigned int _uiSlotIndex); // idb
void __thiscall ItemMixWin::OnClose(ItemMixWin *this); // idb
char __thiscall MixItemIcon::EatDropInstance(MixItemIcon *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
char __thiscall ItemMixWin::Create(ItemMixWin *this, PgFrameWork *pkFrameWork);
void __thiscall ItemMixWin::OnCommand(ItemMixWin *this, unsigned int wParam, int lParam); // idb
void __thiscall PgWinDrop::~PgWinDrop(PgWinDrop *this); // idb
PgWinDrop *__thiscall PgWinDrop::`scalar deleting destructor'(PgWinDrop *this, unsigned int a2);
void __thiscall DropContents::~DropContents(DropContents *this); // idb
DropContents *__thiscall DropContents::`scalar deleting destructor'(DropContents *this, unsigned int a2);
InvWin *__thiscall InventoryWin::GetInvWin(InventoryWin *this, unsigned int uiIndex); // idb
MixItemIcon *__thiscall MixItemIcon::`scalar deleting destructor'(MixItemIcon *this, unsigned int a2);
ItemMixWin *__thiscall ItemMixWin::`vector deleting destructor'(ItemMixWin *this, unsigned int a2);
bool __thiscall ItemMixDataTab::IsMixItem(ItemMixDataTab *this, char *pcInxName); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall ItemMixDataTab::GetResultItem(ItemMixDataTab *this, char *pcInxName);
void __thiscall std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>::clear(std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > *this); // idb
void __thiscall std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>::~list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>(std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > *this); // idb
void __thiscall std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>,0>>::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>,0>>(std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> >,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > >,0> > *this, stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *_Parg, std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > *_Al); // idb
void __thiscall KDTeamScoreWin::ResetScore(KDTeamScoreWin *this); // idb
void __thiscall KDTeamScoreWin::ResetWinFlag(KDTeamScoreWin *this); // idb
void __thiscall KDTeamScoreWin::SetScore(KDTeamScoreWin *this, KQ_TEAM_TYPE uiTeam, unsigned int uiScore); // idb
void __thiscall KDTeamScoreWin::SetWinFlag(KDTeamScoreWin *this, unsigned int uiTeam, unsigned int nWin); // idb
void __thiscall KDTeamScoreWin::SetUseRound(KDTeamScoreWin *this, bool bUse); // idb
void __thiscall KDTeamScoreWin::SetTitleText(KDTeamScoreWin *this, char *acString); // idb
void __thiscall KDTeamScoreWin::~KDTeamScoreWin(KDTeamScoreWin *this); // idb
void __thiscall KDTeamScoreWin::ResetRound(KDTeamScoreWin *this); // idb
void __thiscall KDTeamScoreWin::SetRound(KDTeamScoreWin *this, unsigned int nRound); // idb
void __thiscall KDTeamScoreWin::KDTeamScoreWin(KDTeamScoreWin *this); // idb
void __thiscall KDTeamScoreWin::Reset(KDTeamScoreWin *this); // idb
char __thiscall KDTeamScoreWin::Create(KDTeamScoreWin *this, PgFrameWork *pkFrameWork);
KDTeamScoreWin *__cdecl KDTeamScoreWin::CreateWin(PgFrameWork *pkFrameWork); // idb
KDTeamScoreWin *__thiscall KDTeamScoreWin::`scalar deleting destructor'(KDTeamScoreWin *this, unsigned int a2);
void __thiscall KeyMap::KeyNode::Set(KeyMap::KeyNode *this, unsigned int uiMsg, NiInputKeyboard::KeyCode eC, KeyMap::PressType ePress, unsigned int uiModif, KeyMap::ModifType eModifType); // idb
void __thiscall KeyMap::KeyNode::SetMouse(KeyMap::KeyNode *this, unsigned int uiMsg, NiInputMouse::Button eC, KeyMap::PressType ePress, unsigned int uiModif, KeyMap::ModifType eModifType); // idb
BOOL __thiscall KeyMap::KeyNode::IsSame(KeyMap::KeyNode *this, NiInputKeyboard::KeyCode eC, unsigned int uiModif);
BOOL __thiscall KeyMap::KeyNode::IsSame(KeyMap::KeyNode *this, NiInputMouse::Button eC, unsigned int uiModif);
void __thiscall KeyMap::Process(KeyMap *this); // idb
bool __stdcall KeyMap::KeyIsDown(NiInputKeyboard::KeyCode eKey);
void __thiscall KeyMap::~KeyMap(KeyMap *this); // idb
void __thiscall KeyMap::Add(KeyMap *this, unsigned int uiMsg, NiInputKeyboard::KeyCode eC, KeyMap::PressType ePress, unsigned int uiModif, KeyMap::ModifType eModifType); // idb
void __thiscall KeyMap::AddMouse(KeyMap *this, unsigned int uiMsg, NiInputMouse::Button eC, KeyMap::PressType ePress, unsigned int uiModif, KeyMap::ModifType eModifType); // idb
void __thiscall KeyMap::Remove(KeyMap *this, NiInputKeyboard::KeyCode eC, unsigned int uiModif); // idb
void __thiscall KeyMap::Remove(KeyMap *this, NiInputMouse::Button eC, unsigned int uiModif); // idb
void __thiscall KeyMap::KeyMap(KeyMap *this); // idb
bool __thiscall NiInputDevice::Button::WasPressed(NiInputDevice::Button *this, unsigned int *uiModifiers); // idb
bool __thiscall NiInputDevice::Button::WasReleased(NiInputDevice::Button *this, unsigned int *uiModifiers); // idb
char __thiscall NiInputMouse::ButtonIsDown(NiInputMouse *this, NiInputMouse::Button eButton, unsigned int *uiModifiers);
bool __thiscall NiInputMouse::ButtonWasPressed(NiInputMouse *this, NiInputMouse::Button eButton, unsigned int *uiModifiers); // idb
bool __thiscall NiInputMouse::ButtonWasReleased(NiInputMouse *this, NiInputMouse::Button eButton, unsigned int *uiModifiers); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::~NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>(NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *> *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *> *this, unsigned int a2);
NiTPointerListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *> *this, unsigned int a2);
void __thiscall NiTPointerList<KeyMap::KeyNode *>::~NiTPointerList<KeyMap::KeyNode *>(NiTPointerList<KeyMap::KeyNode *> *this); // idb
void __thiscall KeyMap::RemoveAll(KeyMap *this); // idb
void __thiscall PgTList<KeyMap::KeyNode *>::~PgTList<KeyMap::KeyNode *>(PgTList<KeyMap::KeyNode *> *this); // idb
PgTList<KeyMap::KeyNode *> *__thiscall PgTList<KeyMap::KeyNode *>::`scalar deleting destructor'(PgTList<KeyMap::KeyNode *> *this, unsigned int a2);
KeyMap *__thiscall KeyMap::`vector deleting destructor'(KeyMap *this, unsigned int a2);
void *__cdecl CreateMyProcessSubfunc(const char *szExeFullPath, char *szCmdLine, _PROCESS_INFORMATION *pi); // idb
void *__stdcall CreateMyProcess(const char *szExeFullPath, char *szCmdLine); // idb
void *__stdcall CreateMyProcess2(const char *szExeFullPath, char *szCmdLine, _PROCESS_INFORMATION *pi); // idb
void *__stdcall MyShellExecute(const char *szFilename); // idb
void __thiscall LuaArgument::LuaArgument(LuaArgument *this); // idb
void __thiscall LuaArgument::~LuaArgument(LuaArgument *this); // idb
int __stdcall LuaArgument::setArgument(lua_State *L);
void __thiscall LuaArgument::setReturn(LuaArgument *this, lua_State *L); // idb
int __thiscall LuaArgument::getReturnNumber(LuaArgument *this); // idb
int __thiscall LuaArgument::getReturnValue(LuaArgument *this); // idb
bool __thiscall LuaScript::loadFile(LuaScript *this, char *filename); // idb
bool __thiscall LuaScript::callFunc(LuaScript *this, const char *funcname, LuaArgument *lua_arg); // idb
void __thiscall LuaScript::clear(LuaScript *this); // idb
void __thiscall LuaScript::pushFunc(LuaScript *this, const char *luafunc, int (__cdecl *func)(lua_State *)); // idb
int __cdecl LuaScript::cSetEnableInput(lua_State *L); // idb
int __cdecl LuaScript::cGetHP(lua_State *L); // idb
int __cdecl LuaScript::cGetMaxHP(lua_State *L); // idb
int __cdecl LuaScript::cDeleteChar(lua_State *L); // idb
int __cdecl LuaScript::cActChar(lua_State *L); // idb
int __cdecl LuaScript::cIsDuringMove(lua_State *L); // idb
int __cdecl LuaScript::cIsAttack(lua_State *L); // idb
int __cdecl LuaScript::cGetQuestStatus(lua_State *L); // idb
int __cdecl LuaScript::cShowHelpWin(lua_State *L); // idb
int __cdecl LuaScript::cShowCharWin(lua_State *L); // idb
int __cdecl LuaScript::cShowInvenWin(lua_State *L); // idb
int __cdecl LuaScript::cShowQuestNewsWin(lua_State *L); // idb
int __cdecl LuaScript::cShowQuestWin(lua_State *L); // idb
int __cdecl LuaScript::cCloseShopWin();
int __cdecl LuaScript::cGetShowWin(lua_State *L); // idb
int __cdecl LuaScript::cCreateSprite(lua_State *L); // idb
void __thiscall LuaScript::LuaScript(LuaScript *this); // idb
void __thiscall LuaScript::~LuaScript(LuaScript *this); // idb
int __cdecl LuaScript::cGetCurTime(lua_State *L); // idb
int __cdecl LuaScript::cGetUser(lua_State *L); // idb
int __cdecl LuaScript::cGetRemainStatPoint(lua_State *L); // idb
int __cdecl LuaScript::cLoadChar(lua_State *L); // idb
int __cdecl LuaScript::cMoveChar(lua_State *L); // idb
int __cdecl LuaScript::cGetCharPos(lua_State *L); // idb
int __cdecl LuaScript::cGetClass(lua_State *L); // idb
int __cdecl LuaScript::cGetCharMode(lua_State *L); // idb
int __cdecl LuaScript::cGetMainCharHandle(lua_State *L); // idb
int __cdecl LuaScript::cMoveMainChar(lua_State *L); // idb
int __cdecl LuaScript::cShowInterface(lua_State *L); // idb
int __cdecl LuaScript::cShowBasicInfo(lua_State *L); // idb
int __cdecl LuaScript::cShowSkillWin(lua_State *L); // idb
int __cdecl LuaScript::cShowAnnounceWin(lua_State *L); // idb
int __cdecl LuaScript::cShowMiniMapSideWin(lua_State *L); // idb
int __cdecl LuaScript::cShowHPBar(lua_State *L); // idb
int __cdecl LuaScript::cShowSPBar(lua_State *L); // idb
int __cdecl LuaScript::cShowNPCName(lua_State *L); // idb
int __cdecl LuaScript::cCloseNPCDialog();
int __cdecl LuaScript::cOpenFreeStat();
int __cdecl LuaScript::cEnablePlayGuide(lua_State *L); // idb
int __cdecl LuaScript::cResetCamera();
int __cdecl LuaScript::cMoveCamera(lua_State *L); // idb
int __cdecl LuaScript::cCameraEffect(lua_State *L); // idb
int __cdecl LuaScript::cSetCameraCtrl(lua_State *L); // idb
int __cdecl LuaScript::cAddSysMsg(lua_State *L); // idb
int __cdecl LuaScript::cScriptMsg(lua_State *L); // idb
int __cdecl LuaScript::cLoadEffect(lua_State *L); // idb
int __cdecl LuaScript::cLoadKFM(lua_State *L); // idb
int __cdecl LuaScript::cShowGroundObject(lua_State *L); // idb
int __cdecl LuaScript::cPersonalScriptMsg(lua_State *L); // idb
int __cdecl LuaScript::cOpenNPCDialog(lua_State *L); // idb
int __cdecl LuaScript::cGetWin(lua_State *L); // idb
int __cdecl LuaScript::cCreateText(lua_State *L); // idb
int __cdecl LuaScript::cCreateButton(lua_State *L); // idb
int __cdecl LuaScript::cActSkill(lua_State *L); // idb
int __cdecl LuaScript::cGetCameraCtrl(lua_State *L); // idb
void __thiscall LuaScript::initFunc(LuaScript *this); // idb
void __cdecl Singleton<Tutorial>::getInstance();
NiPoint3 *__thiscall NiPoint3::operator-(NiPoint3 *this, NiPoint3 *result, NiPoint3 *pt); // idb
void __thiscall NiTListBase<DFALL<DamageInfo *>,DamageInfo *>::~NiTListBase<DFALL<DamageInfo *>,DamageInfo *>(NiTListBase<DFALL<DamageInfo *>,DamageInfo *> *this); // idb
unsigned int __cdecl ITableBase<ScriptMsg,ScriptMsgTab>::GetTotal(); // idb
NiTListBase<DFALL<DamageInfo *>,DamageInfo *> *__thiscall NiTListBase<DFALL<DamageInfo *>,DamageInfo *>::`scalar deleting destructor'(NiTListBase<DFALL<DamageInfo *>,DamageInfo *> *this, unsigned int a2);
NiPoint3 *__cdecl NetUtil::NetDir2Point3Dir(NiPoint3 *result, char byNetDir); // idb
LuaArgument *__thiscall LuaArgument::`scalar deleting destructor'(LuaArgument *this, unsigned int a2);
void __thiscall Effect::SetScale(Effect *this, float fScale); // idb
void __thiscall DamageInfoSet::Clear(DamageInfoSet *this); // idb
void __thiscall NiTList<DamageInfo *>::~NiTList<DamageInfo *>(NiTList<DamageInfo *> *this); // idb
NiTPointerListBase<DFALL<DamageInfo *>,DamageInfo *> *__thiscall NiTList<DamageInfo *>::`scalar deleting destructor'(NiTPointerListBase<DFALL<DamageInfo *>,DamageInfo *> *this, unsigned int a2);
ScriptMsg *__cdecl ScriptMsgTab::GetScriptMsgInfo(const char *kIndex); // idb
int __thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, const char *_Ptr); // idb
void __thiscall DamageInfoSet::~DamageInfoSet(DamageInfoSet *this); // idb
void __thiscall std::list<float,std::allocator<float>>::_Insert<std::_List_const_iterator<std::_List_val<float,std::allocator<float>>>>(std::list<float,std::allocator<float> > *this, std::_List_const_iterator<std::_List_val<float,std::allocator<float> > > _Where, std::_List_const_iterator<std::_List_val<float,std::allocator<float> > > _First, std::_List_const_iterator<std::_List_val<float,std::allocator<float> > > _Last, std::forward_iterator_tag __formal); // idb
ActiveSkillInfo *__cdecl ActSkillInfoTab::GetByInxName(char *pcInxName); // idb
void __thiscall std::list<float,std::allocator<float>>::list<float,std::allocator<float>>(std::list<float,std::allocator<float> > *this, std::list<float,std::allocator<float> > *_Right); // idb
void __thiscall CameraCtrl::CameraCtrl(CameraCtrl *this, CameraCtrl *__that); // idb
void __thiscall Singleton<LuaScriptMgr>::~Singleton<LuaScriptMgr>(Singleton<LuaScriptMgr> *this); // idb
Singleton<LuaScriptMgr> *__thiscall Singleton<LuaScriptMgr>::`vector deleting destructor'(Singleton<LuaScriptMgr> *this, unsigned int a2);
char LuaScriptMgr::Init();
char __thiscall LuaScriptMgr::Terminate(LuaScriptMgr *this);
bool __thiscall LuaScriptMgr::DeleteLuaScript(LuaScriptMgr *this, LuaScriptMgr::eLuaScriptType eType); // idb
void __thiscall LuaScriptMgr::~LuaScriptMgr(LuaScriptMgr *this); // idb
void __thiscall LuaScriptMgr::LuaScriptMgr(LuaScriptMgr *this); // idb
LuaScript *__thiscall LuaScriptMgr::GetLuaScript(LuaScriptMgr *this, LuaScriptMgr::eLuaScriptType eType); // idb
void __thiscall LuaScriptMgr::Update(LuaScriptMgr *this, float fCurTime); // idb
char __thiscall LuaScriptMgr::CreateLuaScript(LuaScriptMgr *this, LuaScriptMgr::eLuaScriptType eType);
void __thiscall NiTMapBase<DFALL<NiPointer<LuaScript>>,enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>::~NiTMapBase<DFALL<NiPointer<LuaScript>>,enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>(NiTMapBase<DFALL<NiPointer<LuaScript> >,enum LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript> > *this); // idb
NiTMapBase<DFALL<NiPointer<LuaScript> >,enum LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript> > *__thiscall NiTMapBase<DFALL<NiPointer<LuaScript>>,enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>::`vector deleting destructor'(NiTMapBase<DFALL<NiPointer<LuaScript> >,enum LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript> > *this, unsigned int a2);
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>::`scalar deleting destructor'(NiTMap<enum LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript> > *this, unsigned int a2);
char __thiscall NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *this, const char *key, NiPointer<NiShaderLibrary> *val);
LuaScriptMgr *__thiscall LuaScriptMgr::`scalar deleting destructor'(LuaScriptMgr *this, unsigned int a2);
NiTMapItem<char const *,NiPointer<NiD3DXEffectTechniqueSet> > *NiTPointerListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::NewItem();
void __thiscall LuaScriptNewBie::LuaScriptNewBie(LuaScriptNewBie *this); // idb
void __thiscall LuaScriptNewBie::~LuaScriptNewBie(LuaScriptNewBie *this); // idb
int __cdecl LuaScriptNewBie::cOpenPlayGuide();
int __cdecl LuaScriptNewBie::cOpenPlayGuide_BIL_QUEST_1();
void __thiscall LuaScriptNewBie::initFunc(LuaScriptNewBie *this); // idb
int __thiscall LuaArgumentNewBie::setArgument(LuaArgumentNewBie *this, lua_State *L); // idb
int __thiscall LuaArgumentBIL_QUEST_1::setArgument(LuaArgumentBIL_QUEST_1 *this, lua_State *L); // idb
void __thiscall LuaArgumentNewBie::~LuaArgumentNewBie(LuaArgumentNewBie *this); // idb
void __thiscall LuaArgumentBIL_QUEST_1::~LuaArgumentBIL_QUEST_1(LuaArgumentBIL_QUEST_1 *this); // idb
void __thiscall LuaArgumentNewBie::LuaArgumentNewBie(LuaArgumentNewBie *this); // idb
void __thiscall LuaArgumentBIL_QUEST_1::LuaArgumentBIL_QUEST_1(LuaArgumentBIL_QUEST_1 *this, char *pkName); // idb
void __thiscall LuaScriptNewBie::update(LuaScriptNewBie *this, float time); // idb
Name3 *__thiscall World::GetMapName(World *this, Name3 *result); // idb
LuaScriptNewBie *__thiscall LuaScriptNewBie::`scalar deleting destructor'(LuaScriptNewBie *this, unsigned int a2);
LuaArgumentNewBie *__thiscall LuaArgumentNewBie::`scalar deleting destructor'(LuaArgumentNewBie *this, unsigned int a2);
LuaArgumentBIL_QUEST_1 *__thiscall LuaArgumentBIL_QUEST_1::`vector deleting destructor'(LuaArgumentBIL_QUEST_1 *this, unsigned int a2);
void __thiscall LuaScriptTutorial::LuaScriptTutorial(LuaScriptTutorial *this); // idb
void __thiscall LuaScriptTutorial::~LuaScriptTutorial(LuaScriptTutorial *this); // idb
int __cdecl LuaScriptTutorial::cAckMainStep(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cCloseTextBoxMsgWin(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cHideNewbieToolTip();
int __cdecl LuaScriptTutorial::cTutorialEnable(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cBlinkMainMenu(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cBlinkFreeStat(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cBlinkStoneShop(lua_State *L); // idb
// int __cdecl LuaScriptTutorial::cBlinkShortCut(lua_State *L); idb
// int __cdecl LuaScriptTutorial::cRemoveBlinkEffect(lua_State *L); idb
int __cdecl LuaScriptTutorial::cRemoveBlinkMainMenu(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cStopTextScreenEffect();
int __cdecl LuaScriptTutorial::cShowTutorialMark(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cOpenQuestConditionWin(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cCloseQuestConditionWin(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cCloseBoxAnnounceWin();
int __cdecl LuaScriptTutorial::cSetItemShopTab(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cIsOpenCharWin(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cIsOpenItemShop(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cIsOpenInvenWin(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cIsBuyStone(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cIsUseStone(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cIsEndWar(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cIsOpenSkillShop(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cIsOpenSkillWin(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cIsRegistSkill(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cIsEndTextScreenEffect(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cIsOpenNPCDialog(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cLockStoneShopInv(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cSetLockItemSell(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cSetLockItemShop(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cSetLockStoneShop(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cSetLockSkillShop(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cSetLockItemShopTab(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cSetLockSkillShopTab(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cSetHideQuestGiveUp(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cSetOpenCharWin(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cSetOpenInvenWin(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cSetOpenSkillWin(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cSetBuyStone(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cSetUseStone(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cSetRegistSkill(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cIsOpenQuestWin(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cSetOpenQuestWin(lua_State *L); // idb
// int __cdecl LuaScriptTutorial::cBlinkQuestAccept(lua_State *L); idb
// int __cdecl LuaScriptTutorial::cRemoveQuestBlinkEffect(lua_State *L); idb
int __thiscall LuaArgumentTutorial::setArgument(LuaArgumentTutorial *this, lua_State *L); // idb
int __thiscall LuaArgumentTutorialStep::setArgument(LuaArgumentTutorialStep *this, lua_State *L); // idb
void __thiscall LuaArgumentTutorial::~LuaArgumentTutorial(LuaArgumentTutorial *this); // idb
void __thiscall LuaArgumentTutorialStep::~LuaArgumentTutorialStep(LuaArgumentTutorialStep *this); // idb
int __cdecl LuaScriptTutorial::cBlinkEffect(lua_State *L); // idb
void __thiscall LuaArgumentTutorial::LuaArgumentTutorial(LuaArgumentTutorial *this); // idb
void __thiscall LuaArgumentTutorialStep::LuaArgumentTutorialStep(LuaArgumentTutorialStep *this, int step); // idb
void __thiscall LuaScriptTutorial::update(LuaScriptTutorial *this, float time); // idb
void __thiscall LuaScriptTutorial::UpdateStep(LuaScriptTutorial *this, int Step); // idb
int __cdecl LuaScriptTutorial::cBlinkItemShop(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cBlinkInven(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cBlinkSkillShop(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cBlinkSkill(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cStartTextScreenEffect(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cOpenBoxAnnounceWin(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cOpenTextBoxMsgWin(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cIsHaveItem(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cIsEquipItem(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cIsLearnSkill(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cIsSelectSkill(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cLockItemShopInv(lua_State *L); // idb
int __cdecl LuaScriptTutorial::cLockSkillShopInv(lua_State *L); // idb
void __thiscall LuaScriptTutorial::initFunc(LuaScriptTutorial *this); // idb
LuaScriptTutorial *__thiscall LuaScriptTutorial::`scalar deleting destructor'(LuaScriptTutorial *this, unsigned int a2);
LuaArgumentTutorial *__thiscall LuaArgumentTutorial::`vector deleting destructor'(LuaArgumentTutorial *this, unsigned int a2);
LuaArgumentTutorialStep *__thiscall LuaArgumentTutorialStep::`vector deleting destructor'(LuaArgumentTutorialStep *this, unsigned int a2);
void __thiscall std::vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>::~vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>(std::vector<HeightMapMaker::TriangleIndex *,std::allocator<HeightMapMaker::TriangleIndex *> > *this); // idb
char __cdecl MenuTexMgr::Init();
void __cdecl MenuTexMgr::Terminate(); // idb
void __cdecl MenuTexMgr::Remove(unsigned int uiEnum); // idb
NiSourceTexture *__cdecl MenuTexMgr::Create(unsigned int uiEnum); // idb
NiSourceTexture *__cdecl MenuTexMgr::GetTexture(unsigned int uiEnum); // idb
void __thiscall ItemSlot::ItemSlot(ItemSlot *this); // idb
void __thiscall ItemSlot::~ItemSlot(ItemSlot *this); // idb
char __thiscall ItemSlot::Create(ItemSlot *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork);
void __thiscall ItemSlot::OnFirstHitWin(ItemSlot *this); // idb
void __thiscall ItemSlot::ReSetSlot(ItemSlot *this); // idb
void __thiscall ItemSlot::SetItemByID(ItemSlot *this, unsigned __int16 ItemID); // idb
void __thiscall MinimonAutoItemUseWin::ShowAutoUseItemInfo(MinimonAutoItemUseWin *this); // idb
void MinimonAutoItemUseWin::OnHelpLink();
void __thiscall MinimonAutoItemUseWin::OnCancel(MinimonAutoItemUseWin *this); // idb
void __thiscall MinimonAutoItemUseWin::MinimonAutoItemUseWin(MinimonAutoItemUseWin *this); // idb
void __thiscall MinimonAutoItemUseWin::~MinimonAutoItemUseWin(MinimonAutoItemUseWin *this); // idb
void __thiscall MinimonAutoItemUseWin::OnSlotLClick(MinimonAutoItemUseWin *this, unsigned int uiSlotIndex); // idb
void __thiscall MinimonAutoItemUseWin::OnBuffItemUse(MinimonAutoItemUseWin *this); // idb
void __thiscall MinimonAutoItemUseWin::OnChargedItemUse(MinimonAutoItemUseWin *this); // idb
void __thiscall ItemSlot::DoAction(ItemSlot *this); // idb
void __thiscall ItemSlot::DoRAction(ItemSlot *this); // idb
void __thiscall MinimonAutoItemUseWin::OnCommand(MinimonAutoItemUseWin *this, unsigned int wParam, int lParam); // idb
void __thiscall MinimonAutoItemUseWin::SetAutoUseBuffItem(MinimonAutoItemUseWin *this, int bUse);
void __thiscall MinimonAutoItemUseWin::SetAutoUseChargedItem(MinimonAutoItemUseWin *this, int bUse);
char __thiscall MinimonAutoItemUseWin::DropItemSlot(MinimonAutoItemUseWin *this, unsigned int uiReceiverInvIndex, PgWinDrop *pkDrop);
void __thiscall MinimonAutoItemUseWin::AutoUseItemExhausted(MinimonAutoItemUseWin *this, unsigned __int16 ItemID); // idb
void __thiscall ItemSlot::UpdateMeWin(ItemSlot *this, float fCurTime); // idb
char __thiscall ItemSlot::EatDropInstance(ItemSlot *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
void __thiscall MinimonAutoItemUseWin::SetAutoUseItemInfo(MinimonAutoItemUseWin *this, USEITEM_MINIMON_INFO *pInfo); // idb
ItemSlot *__cdecl ItemSlot::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork); // idb
MinimonAutoItemUseWin *__cdecl MinimonAutoItemUseWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall MinimonAutoItemUseWin::Create(MinimonAutoItemUseWin *this, PgFrameWork *pkFrameWork);
void __thiscall ItemIcon::SetLotText(ItemIcon *this, char *pcText); // idb
ItemSlot *__thiscall ItemSlot::`scalar deleting destructor'(ItemSlot *this, unsigned int a2);
MinimonAutoUseItem *__cdecl MinimonAutoUseItemTable::GetMiniMonDataByIDX(char *pcItemIDX); // idb
MinimonAutoItemUseWin *__thiscall MinimonAutoItemUseWin::`scalar deleting destructor'(MinimonAutoItemUseWin *this, unsigned int a2);
void __thiscall MobKillCountWin::MobKillCountWin(MobKillCountWin *this); // idb
void __thiscall MobKillCountWin::~MobKillCountWin(MobKillCountWin *this); // idb
char __thiscall MobKillCountWin::Create(MobKillCountWin *this, PgFrameWork *pkFrameWork);
void __thiscall MobKillCountWin::AddCount(MobKillCountWin *this); // idb
bool __thiscall MobKillCountWin::IsEnd(MobKillCountWin *this); // idb
void __thiscall MobKillCountWin::Init(MobKillCountWin *this, unsigned __int16 kMobID, unsigned int uiMobCount); // idb
MobKillCountWin *__cdecl MobKillCountWin::CreateWin(PgFrameWork *pkFrameWork); // idb
MobKillCountWin *__thiscall MobKillCountWin::`vector deleting destructor'(MobKillCountWin *this, unsigned int a2);
void __thiscall SlotWin::SlotWin(SlotWin *this); // idb
void __thiscall SlotWin::~SlotWin(SlotWin *this); // idb
char __thiscall SlotWin::Create(SlotWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork);
void MoverUpgradeWin::OnHelpLink();
void MoverUpgradeWin::OnShowWin();
SlotWin *__thiscall MoverUpgradeWin::GetInsertedOldSlot(MoverUpgradeWin *this, unsigned int _uiSlotNum); // idb
void __thiscall SlotWin::OnFirstHitWin(SlotWin *this); // idb
char __thiscall SlotWin::SetSenderInvSlotLock(SlotWin *this, bool _bLock);
void __thiscall MoverUpgradeWin::UpdateMeWin(MoverUpgradeWin *this, float fCurTime); // idb
void __thiscall MoverUpgradeWin::OnCancel(MoverUpgradeWin *this); // idb
void __thiscall MoverUpgradeWin::DirectMessage(MoverUpgradeWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
bool __thiscall MoverUpgradeWin::IsUpgrading(MoverUpgradeWin *this); // idb
void __thiscall SlotWin::DoAction(SlotWin *this); // idb
void __thiscall SlotWin::DoRAction(SlotWin *this); // idb
void __thiscall SlotWin::ReSetSlot(SlotWin *this); // idb
// void __userpurge MoverUpgradeWin::ShowUpgradeResult(MoverUpgradeWin *this@<ecx>, unsigned int a2@<edi>, unsigned int uiSlotIndex, bool bRare, bool bUpgrade);
void __thiscall MoverUpgradeWin::OnSlotLClick(MoverUpgradeWin *this, unsigned int uiSlotIndex); // idb
// char __userpurge MoverUpgradeWin::DropItemSlot@<al>(MoverUpgradeWin *this@<ecx>, int a2@<ebx>, int a3@<edi>, unsigned int uiReceiverInvIndex, PgWinDrop *pkDrop);
void __thiscall MoverUpgradeWin::ResetAllData(MoverUpgradeWin *this); // idb
void __thiscall MoverUpgradeWin::ResetSubSlot(MoverUpgradeWin *this); // idb
// char __userpurge SlotWin::EatDropInstance@<al>(SlotWin *this@<ecx>, int a2@<ebx>, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
void __thiscall MoverUpgradeWin::MoverUpgradeWin(MoverUpgradeWin *this); // idb
void __thiscall MoverUpgradeWin::~MoverUpgradeWin(MoverUpgradeWin *this); // idb
void __thiscall MoverUpgradeWin::OnClose(MoverUpgradeWin *this); // idb
SlotWin *__cdecl SlotWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork); // idb
MoverUpgradeWin *__cdecl MoverUpgradeWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall MoverUpgradeWin::Create(MoverUpgradeWin *this, PgFrameWork *pkFrameWork);
void __thiscall MoverUpgradeWin::OnApply(MoverUpgradeWin *this); // idb
void __thiscall MoverUpgradeWin::OnCommand(MoverUpgradeWin *this, unsigned int wParam, int lParam); // idb
Item *__thiscall InventoryWin::GetItemInInv(InventoryWin *this, unsigned int uiIndex); // idb
SlotWin *__thiscall SlotWin::`scalar deleting destructor'(SlotWin *this, unsigned int a2);
MoverUpgradeWin *__thiscall MoverUpgradeWin::`scalar deleting destructor'(MoverUpgradeWin *this, unsigned int a2);
MoverMain *__cdecl MoverMainTab::GetByMoverIdx(const char *pcMoverIdx); // idb
MoverHG *__cdecl MoverHGTab::GetByMoverIdx(const char *pcMoverIdx); // idb
void __thiscall NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *this); // idb
void __thiscall PgTQueue<CMsg *>::Realloc(PgTQueue<CMsg *> *this, unsigned int uiNewSize); // idb
char __thiscall CMsgMgr::RegisterMsgEater(CMsgMgr *this, void *kMsgID, CMsgEater *pkMsgEater);
void __thiscall CMsgMgr::~CMsgMgr(CMsgMgr *this); // idb
void __thiscall CMsgMgr::PostMsg(CMsgMgr *this, CMsg *pkMsg); // idb
bool __thiscall CMsgMgr::ProcessMsg(CMsgMgr *this); // idb
void __thiscall CMsgMgr::Terminate(CMsgMgr *this); // idb
void __thiscall CMsgMgr::CMsgMgr(CMsgMgr *this); // idb
void __thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>::~NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>(NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *> *this); // idb
void __thiscall NiTPointerMap<void *,CMsgEater *>::~NiTPointerMap<void *,CMsgEater *>(NiTPointerMap<void *,CMsgEater *> *this); // idb
void __thiscall PgTQueue<CMsg *>::Add(PgTQueue<CMsg *> *this, CMsg *element); // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>::`vector deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *> *this, unsigned int a2);
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTPointerMap<void *,CMsgEater *>::`scalar deleting destructor'(NiTPointerMap<void *,CMsgEater *> *this, unsigned int a2);
CMsgMgr *__thiscall CMsgMgr::`scalar deleting destructor'(CMsgMgr *this, unsigned int a2);
void __thiscall NifVideo::NifVideo(NifVideo *this); // idb
void __thiscall NifVideo::LoadNifVideoSequence(NifVideo *this); // idb
void __thiscall Oscillation::Oscillation(Oscillation *this); // idb
void __thiscall Oscillation::~Oscillation(Oscillation *this); // idb
bool __thiscall Oscillation::IsImpacting(Oscillation *this); // idb
void __thiscall Oscillation::Impact(Oscillation *this, float fAmplitude, float fStartTime); // idb
void __thiscall Oscillation::Clear(Oscillation *this); // idb
void __thiscall OscillationEx::OscillationEx(OscillationEx *this); // idb
void __thiscall OscillationEx::~OscillationEx(OscillationEx *this); // idb
void __thiscall OscillationEx::Clear(OscillationEx *this); // idb
void __thiscall Oscillation::Update(Oscillation *this, float fTime); // idb
void __thiscall OscillationEx::ImPact(OscillationEx *this, float fAmplitude, float fPeriod, float fDamp, EffectAxisEnum eValue, float fStartTime); // idb
void __thiscall OscillationEx::Impact(OscillationEx *this, EffectViewInfo *ImpactInfo, float fStartTime); // idb
void __thiscall OscillationEx::Impact(OscillationEx *this, unsigned __int16 EffectViewInfoID, float fStartTime); // idb
void __cdecl OscillationEx::GetOscillationStr(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *TargetStr, OscTarget e); // idb
unsigned int __cdecl ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::GetTotal(); // idb
OscillationEx *__thiscall OscillationEx::`scalar deleting destructor'(OscillationEx *this, unsigned int a2);
EffectViewInfo *__cdecl ShakeEffectViewInfoTab::GetByID(unsigned __int16 ID); // idb
void PartyScoreWin::OnHelpLink();
void PartyScoreWin::OnCancelWin();
void __thiscall PartyScoreWin::OnSortByTitle01(PartyScoreWin *this); // idb
void __thiscall PartyScoreWin::OnSortByTitle02(PartyScoreWin *this); // idb
void __thiscall PartyScoreWin::OnSortByTitle03(PartyScoreWin *this); // idb
void __thiscall PartyScoreWin::OnSortByTitle04(PartyScoreWin *this); // idb
void __thiscall PartyScoreWin::OnSortByTitle05(PartyScoreWin *this); // idb
void __thiscall PartyScoreWin::OnCommand(PartyScoreWin *this, unsigned int wParam, int lParam); // idb
// void __userpurge PartyScoreWin::ShowRaidPartyInfo(PartyScoreWin *this@<ecx>, int a2@<ebx>, const char *byStatus, const int *iLev, const int *nIndex, Name5 *Charid, const char *CharClass);
void __thiscall PartyScoreWin::InitRaidInfo(PartyScoreWin *this); // idb
void __thiscall PartyScoreWin::~PartyScoreWin(PartyScoreWin *this); // idb
void __thiscall PartyScoreWin::OnClose(PartyScoreWin *this); // idb
void __thiscall PartyScoreWin::ShowPartyInfo(PartyScoreWin *this); // idb
void __thiscall PartyScoreWin::PartyScoreWin(PartyScoreWin *this); // idb
void __thiscall PartyScoreWin::SetPartyScore(PartyScoreWin *this, SHINE_INDUN_RANK_CLIENT *pData, const unsigned __int16 *nRankCount, const char *nPlayTimeHour, const char *nPlayTimeMinute, const char *nPlayTimeSecond); // idb
PartyScoreWin *__cdecl PartyScoreWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall PartyScoreWin::ShowRaidInfo(PartyScoreWin *this); // idb
void __thiscall PartyScoreWin::OnShowWin(PartyScoreWin *this); // idb
char __thiscall PartyScoreWin::Create(PartyScoreWin *this, PgFrameWork *pkFrameWork);
void __thiscall PgWin::AttachChildWin(PgWin *this, PgWin *pkChild); // idb
PartyScoreWin *__thiscall PartyScoreWin::`scalar deleting destructor'(PartyScoreWin *this, unsigned int a2);
RaidMemberInfo *__cdecl std::_Uninit_copy<std::_Vector_const_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo>>>,RaidMemberInfo *,std::allocator<RaidMemberInfo>>(std::_Vector_const_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo> > > _First, std::_Vector_const_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo> > > _Last, RaidMemberInfo *_Dest);
void __thiscall std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>(std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *this, std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *_Right); // idb
void __thiscall std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Val); // idb
void __thiscall Pet::Pet(Pet *this); // idb
void __thiscall Pet::~Pet(Pet *this); // idb
bool __thiscall Pet::InitView(Pet *this, int bEquip, unsigned int uiFrame);
char __thiscall Pet::Init(Pet *this, unsigned int kPetID, unsigned __int16 kPetHandle, const char *pcName);
Pet *__thiscall Pet::`vector deleting destructor'(char *this, unsigned int a2);
Pet *__thiscall Pet::`vector deleting destructor'(char *this, unsigned int a2);
NiPoint3 *__thiscall NiPoint3::operator/(NiPoint3 *this, NiPoint3 *result, float fScalar); // idb
double __thiscall NiPoint3::Length(NiPoint3 *this);
double __thiscall NiPoint3::Unitize(NiPoint3 *this);
NiPoint3 *__thiscall NiPoint3::UnitCross(NiPoint3 *this, NiPoint3 *result, NiPoint3 *pt); // idb
int __thiscall Name3::operator==(Name3 *this, Name3 *nm); // idb
char __cdecl Math3D::VectToZRot(NiPoint3 *kTargetVect, NiMatrix3 *kRot);
void __thiscall ActionMgr::SetCurPlayActInfo(ActionMgr *this, ActionInfo *pkActionInfo); // idb
char __thiscall ActionMgr::GetEventCode(ActionMgr *this, const char *_szActionName, unsigned int *OUT_uiEventCode);
int __thiscall Char::GetPrevHP(Char *this); // idb
void __thiscall Char::SetPrevHP(Char *this, int iHP); // idb
void __thiscall Char::SetMode(Char *this, char byMode); // idb
bool __thiscall Char::IsAlive(Char *this); // idb
char *__thiscall Char::GetName(Char *this); // idb
void __thiscall Char::SetName(Char *this, char *pcName); // idb
int __thiscall Char::GetHP(Char *this); // idb
int __thiscall Char::GetMaxHP(Char *this); // idb
int __thiscall Char::GetSP(Char *this); // idb
int __thiscall Char::GetMaxSP(Char *this); // idb
int __thiscall Char::GetAP(Char *this); // idb
int __thiscall Char::GetMaxAP(Char *this); // idb
int __thiscall Char::GetMaxLP(Char *this); // idb
void __thiscall Char::SetMaxHP(Char *this, int iHP); // idb
void __thiscall Char::SetSP(Char *this, int iSP); // idb
void __thiscall Char::SetMaxSP(Char *this, int iSP); // idb
void __thiscall Char::SetAP(Char *this, int iAP); // idb
void __thiscall Char::SetMaxAP(Char *this, int iAP); // idb
void __thiscall ArrowEff::SetHitDamage(Char *this, int iLP); // idb
void __thiscall Char::SetMaxLP(Char *this, int iLP); // idb
int __thiscall Char::GetTOTHP(Char *this); // idb
int __thiscall Char::GetMaxTOTHP(Char *this); // idb
void __thiscall Char::SetTOTHP(Char *this, int iHP); // idb
void __thiscall Char::SetMaxTOTHP(Char *this, int iHP); // idb
void __thiscall Char::SetPos(Char *this, NiPoint3 *kPos); // idb
NiPoint3 *__thiscall Char::GetCameraPos(Char *this); // idb
void __thiscall Char::GetDir(Char *this, NiPoint3 *kDir); // idb
Wml::Vector3<double> *__thiscall Char::GetDir(Char *this);
Char::MoveMode __thiscall Char::GetMoveMode(Char *this); // idb
void __thiscall Char::SetMoveMode(Char *this, Char::MoveMode eMoveMode); // idb
int __thiscall Char::IsDuringMove(Char *this);
bool __thiscall Char::IsDuringRotate(Char *this); // idb
void __thiscall Char::SetWalkSpeed(Char *this, float fSpeed); // idb
void __thiscall Char::SetRunSpeed(Char *this, float fSpeed); // idb
double __thiscall Char::GetWalkSpeed(Char *this);
double __thiscall Char::GetRunSpeed(Char *this);
// void __userpurge Char::SetMoveSpeedRate(Char *this@<ecx>, double a2@<st0>, float fMoveSpeedRate);
double __thiscall Char::GetMoveSpeedRate(Char *this);
void __thiscall Char::ActRideMove(Char *this); // idb
void __thiscall Char::ActRideStand(Char *this); // idb
void __thiscall Char::SetReservedHitDamage(Char *this, unsigned int uiDamage); // idb
unsigned int __thiscall Char::GetReservedHitDamage(Char *this); // idb
bool __thiscall Char::IsChangeCampMode(Char *this); // idb
bool __thiscall Char::IsCampMode(Char *this); // idb
bool __thiscall Char::IsIndividualStorageMode(Char *this); // idb
void __thiscall Char::ChangeCampMode(Char *this, bool bCampMode, char byMode); // idb
int __thiscall Char::GetCharLevel(Char *this); // idb
Pet *__thiscall Pet::`vector deleting destructor'(Pet *this, unsigned int a2);
unsigned int __cdecl ITableBase<MapInfo,MapInfoTab>::GetTotal(); // idb
void __thiscall Char::InitPos(Char *this, NiPoint3 *kPos, NiPoint3 *kDir); // idb
void __thiscall Char::GetPos(Char *this, NiPoint3 *kPos); // idb
void __thiscall Char::GetDir(Char *this, NiMatrix3 *kMat); // idb
BOOL __thiscall Char::IsRiding(Char *this);
void __thiscall Char::SetScale(Char *this, float fScale); // idb
PupMain *__cdecl PetMainTab::GetByPetID(unsigned int kPetID); // idb
MapInfo *__cdecl MapInfoTab::GetByMapName(Name3 *kMapName); // idb
PupView *__cdecl PetViewTab::GetByPetIdx(const char *pcPetIdx); // idb
void __thiscall PetNameEditWin::PetNameEditWin(PetNameEditWin *this); // idb
void __thiscall PetNameEditWin::~PetNameEditWin(PetNameEditWin *this); // idb
void __thiscall PetNameEditWin::UpdateMeWin(PetNameEditWin *this, float fCurTime); // idb
void __thiscall PetNameEditWin::OnShowWin(PetNameEditWin *this); // idb
void __thiscall PetNameEditWin::OnClose(PetNameEditWin *this); // idb
void __thiscall PetNameEditWin::SetName(PetNameEditWin *this, const char *pcName); // idb
const char *__thiscall PetNameEditWin::GetName(PetNameEditWin *this); // idb
void __thiscall PetNameEditWin::SetPetHandle(PetNameEditWin *this, unsigned __int16 kPetHandle); // idb
unsigned __int16 __thiscall PetNameEditWin::GetPetHandle(PetNameEditWin *this); // idb
void __thiscall PetNameEditWin::OnOk(PetNameEditWin *this); // idb
void __thiscall PetNameEditWin::OnCancel(PetNameEditWin *this); // idb
char __thiscall PetNameEditWin::Create(PetNameEditWin *this, PgFrameWork *pkFrameWork);
void __thiscall PetNameEditWin::OnCommand(PetNameEditWin *this, unsigned int wParam, int lParam); // idb
PetNameEditWin *__cdecl PetNameEditWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall IDirectMessenger::DirectDispatch(IDirectMessenger *this, int iMsgTag, void *pvBody, IDirectMessenger::DispatchTo eDispatch); // idb
PetNameEditWin *__thiscall PetNameEditWin::`vector deleting destructor'(PetNameEditWin *this, unsigned int a2);
void __cdecl PgExternalLib::SetDefaultCursor(); // idb
void __cdecl PgExternalLib::SetMovingUpCursor(); // idb
void __cdecl PgExternalLib::SetDragingCursor(); // idb
void __cdecl PgExternalLib::ClickSound(); // idb
void __cdecl PgExternalLib::WindowOpenSound(); // idb
void __cdecl PgExternalLib::WindowCloseSound(); // idb
void __cdecl PgExternalLib::ConsonantSound(); // idb
void __cdecl PgExternalLib::VowelSound(); // idb
void __thiscall Picking::~Picking(Picking *this); // idb
void __thiscall Picking::Picking(Picking *this); // idb
char __thiscall Picking::FirstPick(Picking *this, NiPoint3 *kOrigin, NiPoint3 *kDir);
char __thiscall Picking::BestPick(Picking *this, NiPoint3 *kOrigin, NiPoint3 *kDir);
char __thiscall Picking::GetNormal(Picking *this, NiPoint3 *kNormal, unsigned int uiIndex);
double __thiscall Picking::GetDistance(Picking *this, unsigned int uiIndex);
char __thiscall Picking::GetIntersection(Picking *this, NiPoint3 *kPos, unsigned int uiIndex);
char __thiscall Picking::PickGround(Picking *this, NiPoint3 *kOrigin, NiPoint3 *kDir);
char __thiscall Picking::PickCharacter(Picking *this, NiPoint3 *kOrigin, NiPoint3 *kDir);
NiAVObject *__thiscall Picking::GetAVObject(Picking *this, unsigned int uiIndex); // idb
void __cdecl PgProfile::Report(); // idb
void __thiscall PuzzleTimeWin::ResetTime(PuzzleTimeWin *this, unsigned int second); // idb
// void __userpurge PuzzleTimeWin::UpdateMeWin(PuzzleTimeWin *this@<ecx>, int a2@<ebx>, int a3@<edi>, float fCurTime);
void __thiscall PuzzleTimeWin::PuzzleTimeWin(PuzzleTimeWin *this); // idb
void __thiscall PuzzleTimeWin::~PuzzleTimeWin(PuzzleTimeWin *this); // idb
PuzzleTimeWin *__cdecl PuzzleTimeWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall PuzzleTimeWin::Create(PuzzleTimeWin *this, PgFrameWork *pkFrameWork);
PuzzleTimeWin *__thiscall PuzzleTimeWin::`scalar deleting destructor'(PuzzleTimeWin *this, unsigned int a2);
void __thiscall RandomOptCountRecoverWin::~RandomOptCountRecoverWin(RandomOptCountRecoverWin *this); // idb
RandomOptCountRecoverWin *__cdecl RandomOptCountRecoverWin::Modal(RandomOptCountRecoverWin *pkWin); // idb
void __thiscall RandomOptCountRecoverWin::OnAddtionCount(RandomOptCountRecoverWin *this); // idb
void __thiscall RandomOptCountRecoverWin::OnSubtractionCount(RandomOptCountRecoverWin *this); // idb
void __thiscall RandomOptCountRecoverWin::SetInvenSlotLock(RandomOptCountRecoverWin *this, bool _bLock); // idb
void __thiscall RandomOptCountRecoverWin::OnApply(RandomOptCountRecoverWin *this); // idb
void __thiscall RandomOptCountRecoverWin::UpdateMeWin(RandomOptCountRecoverWin *this, float fCurTime); // idb
char __thiscall RandomOptCountRecoverWin::SetRecoverCountItemSlot(RandomOptCountRecoverWin *this, unsigned int _uiReceiverInvIndex, Item *_pkRecoverCountItem);
void __thiscall RandomOptCountRecoverWin::ResetAllData(RandomOptCountRecoverWin *this); // idb
void __thiscall RandomOptCountRecoverWin::ShowRecoverCountResult(RandomOptCountRecoverWin *this, bool _bSuccess); // idb
char __thiscall RandomOptCountRecoverWin::Create(RandomOptCountRecoverWin *this, PgFrameWork *pkFrameWork);
void __thiscall RandomOptCountRecoverWin::OnCancel(RandomOptCountRecoverWin *this); // idb
void __thiscall RandomOptCountRecoverWin::OnCommand(RandomOptCountRecoverWin *this, unsigned int wParam, int lParam); // idb
void __thiscall RandomOptCountRecoverWin::RandomOptCountRecoverWin(RandomOptCountRecoverWin *this); // idb
RandomOptCountRecoverWin *__cdecl RandomOptCountRecoverWin::CreateWin(PgFrameWork *pkFrameWork); // idb
RandomOptCountRecoverWin *__thiscall RandomOptCountRecoverWin::`scalar deleting destructor'(RandomOptCountRecoverWin *this, unsigned int a2);
void __thiscall ChangeSlotWin::ChangeSlotWin(ChangeSlotWin *this); // idb
void __thiscall ChangeSlotWin::~ChangeSlotWin(ChangeSlotWin *this); // idb
bool __thiscall ChangeSlotWin::Create(ChangeSlotWin *this, int iXPos, int iYPos, PgWin *pkParent); // idb
void __thiscall ChangeSlotWin::SetLock(ChangeSlotWin *this, bool bLock); // idb
void RandomOptionWin::OnHelpLink();
void __thiscall RandomOptionWin::OnShowWin(RandomOptionWin *this); // idb
bool __thiscall RandomOptionWin::IsChangingOption(RandomOptionWin *this); // idb
void __thiscall ChangeSlotWin::OnFirstHitWin(ChangeSlotWin *this); // idb
char __thiscall ChangeSlotWin::SetSenderInvSlotLock(ChangeSlotWin *this, bool _bLock);
void __thiscall RandomOptionWin::SetItemOptionTextDetail(RandomOptionWin *this, unsigned int uiItemPos, unsigned int uiOPTNum, unsigned int uiRotNum); // idb
void __thiscall RandomOptionWin::ItemOptionCompare(RandomOptionWin *this, unsigned int uiItemPos); // idb
void __thiscall RandomOptionWin::ResetItemOption(RandomOptionWin *this); // idb
void __thiscall RandomOptionWin::SetChangeAbleOption(RandomOptionWin *this, ItemOptionStorage *pChangeAbleOption); // idb
void __thiscall ChangeSlotWin::DoAction(ChangeSlotWin *this); // idb
void __thiscall ChangeSlotWin::DoRAction(ChangeSlotWin *this); // idb
void __thiscall ChangeSlotWin::ReSetSlot(ChangeSlotWin *this); // idb
void __thiscall RandomOptionWin::OnClose(RandomOptionWin *this); // idb
void __thiscall RandomOptionWin::OnSlotLClick(RandomOptionWin *this); // idb
void __thiscall RandomOptionWin::SetRandomCntTextDetail(RandomOptionWin *this, unsigned int uiItemPos); // idb
void __thiscall RandomOptionWin::SetChangeOption(RandomOptionWin *this); // idb
void __thiscall RandomOptionWin::OnCancel(RandomOptionWin *this); // idb
void __thiscall RandomOptionWin::~RandomOptionWin(RandomOptionWin *this); // idb
void __thiscall RandomOptionWin::SetItemOptionText(RandomOptionWin *this, unsigned int uiItemPos); // idb
void __thiscall RandomOptionWin::RefreshItemSlot(RandomOptionWin *this); // idb
void __thiscall RandomOptionWin::SetItemOption(RandomOptionWin *this, unsigned int uiItemPos, ItemOptionStorage *kOptionStorage); // idb
ChangeSlotWin *__cdecl ChangeSlotWin::CreateWin(int iXPos, int iYPos, PgWin *pkParent); // idb
char __thiscall RandomOptionWin::Create(RandomOptionWin *this, PgFrameWork *pkFrameWork);
void __thiscall RandomOptionWin::UpdateMeWin(RandomOptionWin *this, float fCurTime); // idb
void __thiscall RandomOptionWin::SetItem(RandomOptionWin *this, unsigned int uiItemPos, Item *pkItem); // idb
char __thiscall RandomOptionWin::DropItemSlot(RandomOptionWin *this, PgWinDrop *pkDrop);
char __thiscall ChangeSlotWin::EatDropInstance(ChangeSlotWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
void __thiscall RandomOptionWin::RandomOptionWin(RandomOptionWin *this); // idb
RandomOptionWin *__cdecl RandomOptionWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall RandomOptionWin::DirectMessage(RandomOptionWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall RandomOptionWin::OnApply(RandomOptionWin *this); // idb
void __thiscall RandomOptionWin::OnCommand(RandomOptionWin *this, unsigned int wParam, int lParam); // idb
ChangeSlotWin *__thiscall ChangeSlotWin::`vector deleting destructor'(ChangeSlotWin *this, unsigned int a2);
RandomOptionWin *__thiscall RandomOptionWin::`vector deleting destructor'(RandomOptionWin *this, unsigned int a2);
void __thiscall IDRankingWin::UpdateMeWin(IDRankingWin *this, float fCurTime); // idb
void __thiscall IDRankingWin::OnMouseEvent(IDRankingWin *this, PgWin::PG_MOUSE_EVENT eMouseEvent, PgWin *pkWin); // idb
void __thiscall IDRankingWin::DirectMessage(IDRankingWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void IDRankingWin::OnHelpLink();
void IDRankingWin::OnCancelWin();
void __thiscall IDRankingWin::ShowTopPortrait(IDRankingWin *this); // idb
void __thiscall IDRankingWin::ClearMyRecordInfo(IDRankingWin *this); // idb
void __thiscall FaceCutMaskWin::FaceCutMaskWin(FaceCutMaskWin *this); // idb
void __thiscall FaceCutMaskWin::~FaceCutMaskWin(FaceCutMaskWin *this); // idb
void __thiscall FaceCutMaskWin::SetPortraitTexture(FaceCutMaskWin *this, NiTexture *pTexture); // idb
void __thiscall IDRankingWin::OnShowWin(IDRankingWin *this); // idb
void __thiscall IDRankingWin::ClearRankInfo(IDRankingWin *this); // idb
void __thiscall IDRankingWin::OnSlideIDList(IDRankingWin *this); // idb
void __thiscall IDRankingWin::RecordInfoReq(IDRankingWin *this, unsigned int nTitle, unsigned int nSelectID); // idb
void __thiscall IDRankingWin::SetIDSelectBtn(IDRankingWin *this, unsigned int nSelectIDIdx); // idb
char __thiscall FaceCutMaskWin::Create(FaceCutMaskWin *this, int nIndex);
void __thiscall IDRankingWin::ShowRankNode(IDRankingWin *this, int bIsRankNode);
void __thiscall IDRankingWin::SetTitleBtn(IDRankingWin *this, unsigned int nTitleIdx); // idb
void __thiscall IDRankingWin::ShowIDList(IDRankingWin *this, int bShow);
// void __userpurge IDRankingWin::SetRankInfo(IDRankingWin *this@<ecx>, float a2@<esi>, const unsigned int *dwMyRank, const int *nRankCnt, SHINE_INDUN_RANK_CLIENT_VALUE *pValue, PROTO_AVATAR_SHAPE_INFO *pShapeInfo1st, PROTO_AVATAR_SHAPE_INFO *pShapeInfo2nd, PROTO_AVATAR_SHAPE_INFO *pShapeInfo3th);
void __thiscall IDRankingWin::SetMyRecord(IDRankingWin *this, PROTO_NC_INSTANCE_DUNGEON_RANK_TAB_MYRANK_ACK *pValue); // idb
void __thiscall IDRankingWin::InitRankInfo(IDRankingWin *this); // idb
void __thiscall IDRankingWin::OnSelectTitle(IDRankingWin *this, int uiMsg); // idb
void __thiscall IDRankingWin::OnSelectID(IDRankingWin *this, int nIndex); // idb
void __thiscall IDRankingWin::OnIDSelectList(IDRankingWin *this); // idb
FaceCutMaskWin *__cdecl FaceCutMaskWin::CreateWin(int nIndex); // idb
void __thiscall IDRankingWin::OnClose(IDRankingWin *this); // idb
void __thiscall IDRankingWin::OnCommand(IDRankingWin *this, unsigned int wParam, int lParam); // idb
void __thiscall IDRankingWin::IDRankingWin(IDRankingWin *this); // idb
void __thiscall IDRankingWin::~IDRankingWin(IDRankingWin *this); // idb
IDRankingWin *__cdecl IDRankingWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall IDRankingWin::SetIDList(IDRankingWin *this, const unsigned __int16 *nIDListCnt, SHINE_INDUN_INFO *pIndunInfo); // idb
char __thiscall IDRankingWin::Create(IDRankingWin *this, PgFrameWork *pkFrameWork);
void __thiscall Name3::Name3(Name3 *this); // idb
FaceCutMaskWin *__thiscall FaceCutMaskWin::`scalar deleting destructor'(FaceCutMaskWin *this, unsigned int a2);
MapInfo *__cdecl MapInfoTab::GetByMapName(const unsigned __int16 id); // idb
SHINE_INDUN_INFO *__stdcall std::allocator<SHINE_INDUN_INFO>::allocate(unsigned int _Count);
void __thiscall std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(std::vector<unsigned long,std::allocator<unsigned long> > *this, const unsigned int *_Val); // idb
SHINE_INDUN_INFO *__cdecl std::_Uninit_move<SHINE_INDUN_INFO *,SHINE_INDUN_INFO *,std::allocator<SHINE_INDUN_INFO>,SHINE_INDUN_INFO>(SHINE_INDUN_INFO *_First, SHINE_INDUN_INFO *_Last, SHINE_INDUN_INFO *_Dest);
void __thiscall std::vector<SHINE_INDUN_INFO,std::allocator<SHINE_INDUN_INFO>>::reserve(std::vector<SHINE_INDUN_INFO,std::allocator<SHINE_INDUN_INFO> > *this, unsigned int _Count); // idb
void __thiscall std::vector<SHINE_INDUN_INFO,std::allocator<SHINE_INDUN_INFO>>::_Reserve(std::vector<SHINE_INDUN_INFO,std::allocator<SHINE_INDUN_INFO> > *this, unsigned int _Count); // idb
IDRankingWin *__thiscall IDRankingWin::`vector deleting destructor'(IDRankingWin *this, unsigned int a2);
void __cdecl ScriptMsgCtrl::OnChat(const char *pcStr, unsigned __int16 kHandle, float fLifeTime); // idb
// void __usercall ScriptMsgCtrl::OnAnnounce(int a1@<edi>, int a2@<esi>, const char *pcStr, D3DXCOLOR kColor, float fLifeTime);
// void __usercall ScriptMsgCtrl::OnRemain(int a1@<edi>, int a2@<esi>, const char *pcStr, D3DXCOLOR kColor, float fLifeTime);
void __cdecl ScriptMsgCtrl::OnAutorun(const char *pcStr, D3DXCOLOR kColor, float fLifeTime); // idb
void __cdecl ScriptMsgCtrl::OnNPCDlg(const char *pcStr, const char *pcFaceCutIndex, bool bCloseBtn, float fLifeTime); // idb
void __cdecl ScriptMsgCtrl::OnBoxAnnounce(const char *pcStr, float fLifeTime); // idb
void __cdecl ScriptMsgCtrl::AddMsg(ScriptMsg *pkScriptMsg, const char *pcStr, unsigned __int16 kHandle); // idb
FaceCutMsg *__cdecl FaceCutMsgTab::GetByScripMsgInx(const char *pcScriptMsgInx); // idb
// void __thiscall SteamCallback::Update(SteamCallback *this); idb
void __thiscall SteamCallback::OnGetAuthSessionTicketResponse(SteamCallback *this, GetAuthSessionTicketResponse_t *pCallback); // idb
void __thiscall SteamCallback::OnGameOverlayActivated(SteamCallback *this, GameOverlayActivated_t *callback); // idb
void __thiscall SteamCallback::~SteamCallback(SteamCallback *this); // idb
void __thiscall SteamCallback::SteamCallback(SteamCallback *this); // idb
void __thiscall CCallback<SteamCallback,GameOverlayActivated_t,0>::Run(CCallback<SteamCallback,GameOverlayActivated_t,0> *this, void *pvParam, bool __formal, unsigned __int64 __formal); // idb
int CCallback<SteamCallback,GetAuthSessionTicketResponse_t,0>::GetCallbackSizeBytes();
void __thiscall CCallback<SteamCallback,GetAuthSessionTicketResponse_t,0>::Run(CCallback<SteamCallback,GameOverlayActivated_t,0> *this, void *pvParam); // idb
void __cdecl SteamConfig::Running(); // idb
bool __cdecl SteamConfig::IsRunning(); // idb
const char *__cdecl SteamConfig::GetURL(unsigned __int64 uiSteamAccountID); // idb
bool __thiscall NiRenderer::Check_RenderTargetGroupActive(NiRenderer *this, const char *pcCallingFunction, bool bExpectedValue); // idb
void __thiscall Studio::Studio(Studio *this); // idb
void __thiscall Studio::~Studio(Studio *this); // idb
void __thiscall Studio::ClickAndStuff(Studio *this, float fTime); // idb
void __thiscall Studio::SetCamera(Studio *this, NiCamera *pkCamera); // idb
Studio *__cdecl Studio::Create(NiRenderer *pRenderer, unsigned int uiDetail); // idb
void __thiscall NiPointer<NiProperty>::NiPointer<NiProperty>(NiPointer<NiProperty> *this, NiProperty *pObject); // idb
char __thiscall NiRenderer::BeginFrame(NiRenderer *this);
char __thiscall NiRenderer::EndFrame(NiRenderer *this);
char __thiscall NiRenderer::DisplayFrame(NiRenderer *this);
bool __thiscall NiRenderer::BeginUsingRenderTargetGroup(NiRenderer *this, NiRenderTargetGroup *pkTarget, unsigned int uiClearMode); // idb
char __thiscall NiRenderer::EndUsingRenderTargetGroup(NiRenderer *this);
void __thiscall NiRenderer::SetSorter(NiRenderer *this, NiAccumulator *pkAccum); // idb
void __thiscall ItemSlotWin::ItemSlotWin(ItemSlotWin *this); // idb
void __thiscall ItemSlotWin::~ItemSlotWin(ItemSlotWin *this); // idb
char __thiscall ItemSlotWin::Create(ItemSlotWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork);
void TermExtendWin::OnHelpLink();
ItemSlotWin *__thiscall TermExtendWin::GetInsertedOldSlot(TermExtendWin *this); // idb
// long double __usercall difftime@<edx:eax>(int _Time1@<ecx>, int _Time2@<eax>); idb
// int __usercall mktime@<eax>(tm *_Tm@<eax>); idb
void __thiscall ItemSlotWin::OnFirstHitWin(ItemSlotWin *this); // idb
char __thiscall ItemSlotWin::SetSenderInvSlotLock(ItemSlotWin *this, bool _bLock);
void __thiscall TermExtendWin::UpdateMeWin(TermExtendWin *this, float fCurTime); // idb
void __thiscall TermExtendWin::ExtendItemInvenLock(TermExtendWin *this, bool bLock); // idb
void __thiscall TermExtendWin::DirectMessage(TermExtendWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall ItemSlotWin::DoAction(ItemSlotWin *this); // idb
void __thiscall ItemSlotWin::DoRAction(ItemSlotWin *this); // idb
void __thiscall ItemSlotWin::ReSetSlot(ItemSlotWin *this); // idb
void __thiscall TermExtendWin::SetExtendInfo(TermExtendWin *this, ExtendItemInfo pExtendInfo); // idb
void __thiscall TermExtendWin::OnApply(TermExtendWin *this); // idb
void __thiscall TermExtendWin::TermExtendWin(TermExtendWin *this); // idb
void __thiscall TermExtendWin::~TermExtendWin(TermExtendWin *this); // idb
// void __userpurge TermExtendWin::SetTermItemInfo(TermExtendWin *this@<ecx>, unsigned int a2@<ebx>, Item *pItem);
char __thiscall TermExtendWin::DropItemSlot(TermExtendWin *this, PgWinDrop *pkDrop);
// void __usercall TermExtendWin::ResetAllData(TermExtendWin *this@<ecx>, unsigned int a2@<ebx>);
char __thiscall ItemSlotWin::EatDropInstance(ItemSlotWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
void __thiscall TermExtendWin::ShowUpgradeResult(TermExtendWin *this); // idb
// void __usercall TermExtendWin::OnSlotLClick(TermExtendWin *this@<ecx>, unsigned int a2@<ebx>);
// void __usercall TermExtendWin::OnCancel(TermExtendWin *this@<ecx>, unsigned int a2@<ebx>);
// void __usercall TermExtendWin::OnClose(TermExtendWin *this@<ecx>, unsigned int a2@<ebx>);
ItemSlotWin *__cdecl ItemSlotWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork); // idb
TermExtendWin *__cdecl TermExtendWin::CreateWin(PgFrameWork *pkFrameWork); // idb
// void __userpurge TermExtendWin::OnCommand(TermExtendWin *this@<ecx>, unsigned int a2@<ebx>, unsigned int wParam, int lParam);
char __thiscall TermExtendWin::Create(TermExtendWin *this, PgFrameWork *pkFrameWork);
ItemSlotWin *__thiscall ItemSlotWin::`scalar deleting destructor'(ItemSlotWin *this, unsigned int a2);
TermExtendMatch *__cdecl TermExtendMatchTable::GetTermExtendMatchByItemIDX(char *pcItemIDX); // idb
char *__cdecl TermExtendMatchGroupDescTable::GetGroupNameByExtendItemIDX(char *pcItemIDX); // idb
ChargedItemEffect *__cdecl ChargedEffectTable::GetByInxName(char *pcInxName);
TermExtendWin *__thiscall TermExtendWin::`vector deleting destructor'(TermExtendWin *this, unsigned int a2);
int __cdecl TextDataNodeComp(const void *p1, const void *p2); // idb
void TextData::BeforeTerminate();
char TextData::DataProcess();
int __cdecl TextData2NodeComp(const void *p1, const void *p2); // idb
void TextData2::BeforeTerminate();
char TextData2::DataProcess();
int __cdecl TextData3NodeComp(const void *p1, const void *p2); // idb
void TextData3::BeforeTerminate();
char TextData3::DataProcess();
bool __stdcall ProcessingString::IsRemovableCharacter(char ch);
void __thiscall ProcessingString::ProcessingString(ProcessingString *this); // idb
void __thiscall TextFilter::~TextFilter(TextFilter *this); // idb
void __thiscall TextFilterReplace::~TextFilterReplace(TextFilterReplace *this); // idb
void __thiscall ProcessingString::Replace(ProcessingString *this, char *pcBasePos, char *pcKey, char *pcAlternate); // idb
void __stdcall ProcessingString::ClearOddStuff(char *string);
void __thiscall ProcessingString::Preprocess(ProcessingString *this, char *pcSource, bool bPreprecess); // idb
void __thiscall TextFilter::TextFilter(TextFilter *this, char *pcKey); // idb
void __thiscall TextFilter::Filter(TextFilter *this, ProcessingString *pkStr); // idb
void __thiscall TextFilterReplace::TextFilterReplace(TextFilterReplace *this, char *pcKey, char *pcAlternate); // idb
void __thiscall TextFilterReplace::DoJob(TextFilterReplace *this, ProcessingString *pkStr, char *pcFindPos, char *pcKey); // idb
void __thiscall TextFilterSet::Terminate(TextFilterSet *this); // idb
ProcessingString *__thiscall TextFilterSet::Filter(TextFilterSet *this, char *pcSourceStr, bool bPreprecess);
void __thiscall TextFilterSet::AddFilter(TextFilterSet *this, TextFilter *pkFilter); // idb
void __thiscall TextFilterSet::~TextFilterSet(TextFilterSet *this); // idb
void __thiscall NiTListBase<DFALL<TextFilter *>,TextFilter *>::~NiTListBase<DFALL<TextFilter *>,TextFilter *>(NiTListBase<DFALL<TextFilter *>,TextFilter *> *this); // idb
NiTListBase<DFALL<TextFilter *>,TextFilter *> *__thiscall NiTListBase<DFALL<TextFilter *>,TextFilter *>::`scalar deleting destructor'(NiTListBase<DFALL<TextFilter *>,TextFilter *> *this, unsigned int a2);
TextFilter *__thiscall TextFilter::`scalar deleting destructor'(TextFilter *this, unsigned int a2);
TextFilterReplace *__thiscall TextFilterReplace::`scalar deleting destructor'(TextFilterReplace *this, unsigned int a2);
void __thiscall NiTList<TextFilter *>::~NiTList<TextFilter *>(NiTList<TextFilter *> *this); // idb
// void __userpurge TextFilterTable::FilterEmotion_::_2_::TextFilterEmotion::TextFilterEmotion(char *pcEmotionCmd@<esi>, char *pcKey, char *pcKeya);
// void __usercall TextFilterTable::FilterEmotion_::_2_::TextFilterEmotion::_TextFilterEmotion(TextFilter *a1@<esi>);
int __cdecl TextFilterTable::IsForbiddenGuildName(char *pcName); // idb
void __thiscall TextFilterTable::FilterEmotion_::_2_::TextFilterEmotion::DoJob(ProcessingString *pkStr, char *pcFindPos, char *pcKey, char *pcKeya);
bool __cdecl TextFilterTable::LoadSlanderFilter(); // idb
ProcessingString *__cdecl TextFilterTable::FilterSlander(char *pcSlander);
void __cdecl TextFilterTable::FilterEmotion(char *pcEmotion); // idb
char __cdecl TextFilterTable::IsBadName(char *pcName);
char __cdecl TextFilterTable::IsBlockedID(char *pcID);
void __cdecl TextFilterTable::DelFromBlockedID(char *pcTargetID); // idb
void __cdecl TextFilterTable::SaveBlockedID(); // idb
void __cdecl TextFilterTable::AddToBlockedID(char *pcTargetID); // idb
void __cdecl TextFilterTable::LoadBlockedID(); // idb
TextFilterTable::FilterEmotion::__l2::TextFilterEmotion *__thiscall `TextFilterTable::FilterEmotion'::`2'::TextFilterEmotion::`scalar deleting destructor'(TextFilterTable::FilterEmotion::__l2::TextFilterEmotion *this, unsigned int a2);
unsigned int __cdecl ITableBase<ActionViewInfo,ActionViewTable>::GetTotal(); // idb
unsigned int __cdecl ITableBase<SlanderFilter,SlanderFilterTable>::GetTotal(); // idb
unsigned int __cdecl ITableBase<BadNameFilter,BadNameFilterTable>::GetTotal(); // idb
unsigned int __cdecl ITableBase<EmotionFilter,EmotionFilterTable>::GetTotal(); // idb
ActionViewInfo *__cdecl ActionViewTable::GetByInxName(char *pcInxName); // idb
NiTPointerListBase<DFALL<TextFilter *>,TextFilter *> *__thiscall NiTList<TextFilter *>::`scalar deleting destructor'(NiTPointerListBase<DFALL<TextFilter *>,TextFilter *> *this, unsigned int a2);
BOOL __cdecl std::operator==<char,std::char_traits<char>,std::allocator<char>>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Left, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Right);
void __thiscall SlanderFilterTable::SlanderFilterTable(SlanderFilterTable *this); // idb
SlanderFilterTable *__thiscall SlanderFilterTable::`vector deleting destructor'(SlanderFilterTable *this, unsigned int a2);
void __thiscall EmotionFilterTable::EmotionFilterTable(EmotionFilterTable *this); // idb
EmotionFilterTable *__thiscall EmotionFilterTable::`scalar deleting destructor'(EmotionFilterTable *this, unsigned int a2);
bool __cdecl ITableBase<SlanderFilter,SlanderFilterTable>::Load(char *acFn);
bool __cdecl ITableBase<EmotionFilter,EmotionFilterTable>::Load(char *acFn);
void __thiscall BadNameFilterTable::BadNameFilterTable(BadNameFilterTable *this); // idb
BadNameFilterTable *__thiscall BadNameFilterTable::`scalar deleting destructor'(BadNameFilterTable *this, unsigned int a2);
bool __cdecl ITableBase<BadNameFilter,BadNameFilterTable>::Load(char *acFn);
void __thiscall std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::remove(std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Val_arg); // idb
std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *__stdcall std::_List_val<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::_Buynode(std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *_Next, std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *_Prev, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Val);
void __thiscall TextScreenWin::Start(TextScreenWin *this, const char *pcText); // idb
void __thiscall TextScreenWin::UpdateMeWin(TextScreenWin *this, float fTime); // idb
bool __thiscall TextScreenEffect::IsEnd(TextScreenEffect *this); // idb
void __thiscall TextScreenEffect::UpdateTextScreen(TextScreenEffect *this, float fCurTime); // idb
void __thiscall TextScreenWin::TextScreenWin(TextScreenWin *this); // idb
void __thiscall TextScreenWin::~TextScreenWin(TextScreenWin *this); // idb
// char __usercall TextScreenWin::Create@<al>(TextScreenWin *this@<ecx>, int a2@<ebx>);
void __thiscall TextScreenEffect::~TextScreenEffect(TextScreenEffect *this); // idb
void __thiscall TextScreenEffect::Stop(TextScreenEffect *this); // idb
void __thiscall TextScreenEffect::Draw(TextScreenEffect *this, NiRenderer *pkRenderer); // idb
void __thiscall TextScreenEffect::UpdateFade(TextScreenEffect *this, float fCurTime); // idb
void __thiscall TextScreenEffect::AddSchedule(TextScreenEffect *this, int eSchedule); // idb
void __thiscall TextScreenEffect::Terminate(TextScreenEffect *this); // idb
char __thiscall TextScreenEffect::InitFadeScreen(TextScreenEffect *this);
void __thiscall TextScreenEffect::Update(TextScreenEffect *this, float fCurTime); // idb
void __thiscall TextScreenEffect::TextScreenEffect(TextScreenEffect *this); // idb
TextScreenWin *__cdecl TextScreenWin::CreateWin(); // idb
bool __thiscall TextScreenEffect::InitWin(TextScreenEffect *this); // idb
void __thiscall TextScreenEffect::Start(TextScreenEffect *this, const char *pcText, float fCurTime, float fFadeTime, bool isCinematic); // idb
void __thiscall Singleton<TextScreenEffect>::~Singleton<TextScreenEffect>(Singleton<TextScreenEffect> *this); // idb
Singleton<TextScreenEffect> *__thiscall Singleton<TextScreenEffect>::`vector deleting destructor'(Singleton<TextScreenEffect> *this, unsigned int a2);
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,int>::~NiTListBase<NiTPointerAllocator<unsigned int>,int>(NiTListBase<NiTPointerAllocator<unsigned int>,int> *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,int> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,int>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,int> *this, unsigned int a2);
void __thiscall NiTPointerList<int>::~NiTPointerList<int>(NiTPointerList<int> *this); // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,int> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,int>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,int> *this, unsigned int a2);
void __thiscall PgTList<int>::~PgTList<int>(PgTList<int> *this); // idb
PgTList<int> *__thiscall PgTList<int>::`vector deleting destructor'(PgTList<int> *this, unsigned int a2);
TextScreenWin *__thiscall TextScreenWin::`vector deleting destructor'(TextScreenWin *this, unsigned int a2);
TextScreenEffect *__thiscall TextScreenEffect::`scalar deleting destructor'(TextScreenEffect *this, unsigned int a2);
int __cdecl Timer::GetHour(long double Sec); // idb
int __cdecl Timer::GetDay(long double Sec); // idb
int __cdecl Timer::GetMin(long double Sec); // idb
bool __cdecl Timer::TimeCheck(tm *kTime); // idb
char __thiscall Tutorial::SetLockItemSell(Tutorial *this, bool b);
char __thiscall Tutorial::SetLockItemShop(Tutorial *this, bool b);
char __thiscall Tutorial::SetLockSkillShop(Tutorial *this, bool b);
char __thiscall Tutorial::SetLockItemShopTab(Tutorial *this, bool b);
char __thiscall Tutorial::SetLockSkillShopTab(Tutorial *this, bool b);
char __thiscall Tutorial::SetHideQuestGiveUp(Tutorial *this, bool b);
void __thiscall Tutorial::SetBoxAnnounceMsg(Tutorial *this, const char *pcMsg); // idb
void __thiscall Tutorial::InitMobKillCount(Tutorial *this, unsigned __int16 kMobID, unsigned int uiMobCount); // idb
void __thiscall Tutorial::AddMobKillCount(Tutorial *this); // idb
bool __thiscall Tutorial::IsEndMobKillCount(Tutorial *this); // idb
void __thiscall Tutorial::Terminate(Tutorial *this); // idb
void __thiscall Tutorial::Update(Tutorial *this, float fTime); // idb
char __stdcall Tutorial::BlinkMainMenu(bool bActive, int iSlotType);
void __stdcall Tutorial::SetItemMoveEffectKey(int iEffectKey);
bool __stdcall Tutorial::IsHaveItem(const char *pcItemIdx);
bool __stdcall Tutorial::IsEquipItem(const char *pcItemIdx);
bool Tutorial::IsOpenItemShop();
bool Tutorial::IsOpenSkillShop();
bool Tutorial::IsOpenNPCDialog();
char __stdcall Tutorial::LockStoneShopInv(unsigned int uiIgnoreSlot);
bool __stdcall Tutorial::SetLockStoneShop(bool b);
bool __stdcall Tutorial::SetItemShopTab(unsigned int uiTab);
void __thiscall Tutorial::~Tutorial(Tutorial *this); // idb
char __thiscall Tutorial::BlinkStoneShop(Tutorial *this, unsigned int uiSlot, int *iEffectKey);
char __thiscall Tutorial::BlinkInven(Tutorial *this, const char *pcItemIdx, int *iEffectKey);
char __thiscall Tutorial::BlinkShortCut(Tutorial *this, int *iEffectKey);
char __thiscall Tutorial::BlinkEffect(Tutorial *this, std::vector<enum Tutorial::eBlinkEffectType,std::allocator<enum Tutorial::eBlinkEffectType> > *kBlinkEffectTypeList, int *riEffectKey, int *riEffectCount);
char __thiscall Tutorial::BlinkQuestAccept(Tutorial *this, int *iEffectKey);
void __thiscall Tutorial::RemoveBlinkQuestAccept(Tutorial *this, int *iEffectKey); // idb
void __thiscall Tutorial::Tutorial(Tutorial *this); // idb
void __thiscall Tutorial::Init(Tutorial *this, PgFrameWork *pkFrameWork); // idb
void __thiscall Tutorial::SetTutorialMark(Tutorial *this, bool bShow, NiPoint3 kPos, float fSize); // idb
void __thiscall Tutorial::RemoveBlinkEffect(Tutorial *this, int iEffectKey); // idb
char __thiscall Tutorial::BlinkFreeStat(Tutorial *this, int *iEffectKey, int *iEffectCount);
char __thiscall Tutorial::BlinkItemShop(Tutorial *this, const char *pcItemIdx, unsigned int uiTab, unsigned int uiPage, int *iEffectKey);
char __thiscall Tutorial::BlinkSkillShop(Tutorial *this, const char *pcItemIdx, unsigned int uiTab, unsigned int uiPage, int *iEffectKey);
char __thiscall Tutorial::BlinkSkill(Tutorial *this, const char *pcSkillIdx, int *iEffectKey);
char __stdcall Tutorial::IsLearnSkill(const char *pcSkillIdx);
bool __stdcall Tutorial::IsSelectSkill(const char *pcSkillIdx);
char __stdcall Tutorial::LockItemShopInv(const char *pcIgnoreItemIdx, unsigned int uiTab, unsigned int uiPage);
char __stdcall Tutorial::LockSkillShopInv(const char *pcIgnoreItemIdx, unsigned int uiTab, unsigned int uiPage);
void __thiscall Singleton<Tutorial>::~Singleton<Tutorial>(Singleton<Tutorial> *this); // idb
Singleton<Tutorial> *__thiscall Singleton<Tutorial>::`vector deleting destructor'(Singleton<Tutorial> *this, unsigned int a2);
void __thiscall NiTMapBase<DFALL<NiPointer<PgWin>>,int,NiPointer<PgWin>>::~NiTMapBase<DFALL<NiPointer<PgWin>>,int,NiPointer<PgWin>>(NiTMapBase<DFALL<NiPointer<PgWin> >,int,NiPointer<PgWin> > *this); // idb
void __thiscall NiTMap<int,NiPointer<PgWin>>::~NiTMap<int,NiPointer<PgWin>>(NiTMap<int,NiPointer<PgWin> > *this); // idb
void __thiscall NiTMapBase<DFALL<PgWin *>,enum  Tutorial::eBlinkEffectType,PgWin *>::~NiTMapBase<DFALL<PgWin *>,enum  Tutorial::eBlinkEffectType,PgWin *>(NiTMapBase<DFALL<PgWin *>,enum Tutorial::eBlinkEffectType,PgWin *> *this); // idb
NiTMapBase<DFALL<NiPointer<PgWin> >,int,NiPointer<PgWin> > *__thiscall NiTMapBase<DFALL<NiPointer<PgWin>>,int,NiPointer<PgWin>>::`vector deleting destructor'(NiTMapBase<DFALL<NiPointer<PgWin> >,int,NiPointer<PgWin> > *this, unsigned int a2);
NiTMapBase<DFALL<PgWin *>,enum Tutorial::eBlinkEffectType,PgWin *> *__thiscall NiTMapBase<DFALL<PgWin *>,enum  Tutorial::eBlinkEffectType,PgWin *>::`vector deleting destructor'(NiTMapBase<DFALL<PgWin *>,enum Tutorial::eBlinkEffectType,PgWin *> *this, unsigned int a2);
NiPointer<PgWin> *__thiscall PgWin::DetachChildWin(PgWin *this, NiPointer<PgWin> *result, PgWin *pkChild); // idb
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<int,NiPointer<PgWin>>::`vector deleting destructor'(NiTMap<int,NiPointer<PgWin> > *this, unsigned int a2);
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<enum  Tutorial::eBlinkEffectType,PgWin *>::`scalar deleting destructor'(NiTMap<enum Tutorial::eBlinkEffectType,PgWin *> *this, unsigned int a2);
void __thiscall NsDecal::SetDecalSize(NsDecal *this, float fHeight_, float fWidth_); // idb
Tutorial *__thiscall Tutorial::`vector deleting destructor'(Tutorial *this, unsigned int a2);
void __thiscall UIBlinkEffect::UIBlinkEffect(UIBlinkEffect *this); // idb
void __thiscall UIBlinkEffect::~UIBlinkEffect(UIBlinkEffect *this); // idb
char __thiscall UIBlinkEffect::Create(UIBlinkEffect *this, PgWin *pkParent, NiColorA *kColor);
char __thiscall UIBlinkEffect::Create(UIBlinkEffect *this, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, NiColorA *kColor);
// void __userpurge UIBlinkEffect::UpdateMeWin(UIBlinkEffect *this@<ecx>, double a2@<st0>, float fTime);
UIBlinkEffect *__cdecl UIBlinkEffect::CreateWin(PgWin *pkParent, NiColorA *kColor); // idb
UIBlinkEffect *__cdecl UIBlinkEffect::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, NiColorA *kColor); // idb
UIBlinkEffect *__thiscall UIBlinkEffect::`vector deleting destructor'(UIBlinkEffect *this, unsigned int a2);
void __thiscall UIUtil::SetParent(UIUtil *this, PgWin *pkParent); // idb
void __thiscall UIUtil::SetOffset(UIUtil *this, int iXOff, int iYOff); // idb
void __thiscall UIUtil::GetOffset(UIUtil *this, int *iXOff, int *iYOff); // idb
PgWinText *__stdcall UIUtil::CreateAttachedText(PgWin *pkParent, char *pcText, D3DXCOLOR kColor, unsigned int uiAlign);
char __stdcall UIUtil::CreateFrame(const char *pkFileName, const char *pkSprName, PgWinFrame *pkWinFrame, PgFrameWork *pkFrameWork, const char *pkFrameName);
PgFont *__stdcall UIUtil::AddOutLineFromFontType(Font::Type pkType, unsigned int dwOutline);
PgWinAbbreviateText *__thiscall UIUtil::CreateTextNoTag(UIUtil *this, int uiLeft, int uiTop, int uiWidth, int uiHeight, char *pcText, PgWin *pkParent, unsigned int uiMargin, D3DXCOLOR kColor, unsigned int uiAlign, NiSourceTexture *pkTexture, bool bAutoAbberitate);
void __thiscall UIUtil::UIUtil(UIUtil *this); // idb
void __thiscall UIUtil::~UIUtil(UIUtil *this); // idb
void __thiscall UIUtil::SetUIGeom(UIUtil *this, NiAVObject *pkNode); // idb
PgWinBut *__thiscall UIUtil::CreateBtn(UIUtil *this, unsigned int uiCmdMsg, char *pcNormal, char *pcFocus, char *pcPushed, char *pcDisable, NiSourceTexture *pkTexture); // idb
PgWinBut *__thiscall UIUtil::CreateBtnNoSpr(UIUtil *this, unsigned int uiCmdMsg, char *pcTag); // idb
PgWinCloseBut *__thiscall UIUtil::CreateCloseBtn(UIUtil *this, char *pcNormal, char *pcFocus, char *pcClick); // idb
ImeEditWinEx *__thiscall UIUtil::CreateEditEx(UIUtil *this, char *pcTag, int iLimit, EditWin::Type eType, NiSourceTexture *pkTexture, bool bClearTextOnEnd);
EditWin *__thiscall UIUtil::CreateEdit(UIUtil *this, char *pcTag, int iLimit, EditWin::Type eType, NiSourceTexture *pkTexture, bool bClearTextOnEnd); // idb
PgWinText *__thiscall UIUtil::CreateTextNoSprEx(UIUtil *this, char *pcTag, char *pcText, D3DXCOLOR kColor, unsigned int uiAlign, unsigned int uiMinusLeft, unsigned int uiMinusTop); // idb
PgWinText *__thiscall UIUtil::CreateTextNoSpr(UIUtil *this, char *pcTag, char *pcText, D3DXCOLOR kColor, unsigned int uiAlign); // idb
PgWinSpr *__thiscall UIUtil::CreateSpr(UIUtil *this, char *pcTag, NiSourceTexture *pkTexture); // idb
IconWin *__thiscall UIUtil::CreateIcon(UIUtil *this, const char *pkIconName, int Index, int LbuttonMsg, int RbuttonMgg, UIUtil::IconCreateFunc *rFunction); // idb
PgWinBar *__thiscall UIUtil::CreateBar(UIUtil *this, char *pkTag, NiSourceTexture *pkTexture); // idb
PgWinAbbreviateText *__thiscall UIUtil::CreateText(UIUtil *this, char *pcTag, char *pcText, unsigned int uiMargin, D3DXCOLOR kColor, unsigned int uiAlign, NiSourceTexture *pkTexture, bool bAutoAbberitate);
PgWinText *__thiscall UIUtil::CreateTextEx(UIUtil *this, char *pcTag, char *pcText, unsigned int uiMargin, D3DXCOLOR kColor, unsigned int uiAlign, NiSourceTexture *pkTexture, int uiMinusTop, int uiMinusLeft); // idb
PgWinBut *__thiscall UIUtil::CreateButton(UIUtil *this, unsigned int uiCmdMsg, const char *pkButtonName, NiSourceTexture *pkTexture, int nCheckButtonCount); // idb
ColumnBut *__thiscall UIUtil::CreateCheckButton(UIUtil *this, unsigned int uiCmdMsg, const char *pkButtonTagName, NiSourceTexture *pkTexture, int nCheckButtonCount); // idb
UIUtil *__thiscall UIUtil::`vector deleting destructor'(UIUtil *this, unsigned int a2);
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__cdecl std::operator+<char,std::char_traits<char>,std::allocator<char>>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Left, const char *_Right); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__cdecl std::operator+<char,std::char_traits<char>,std::allocator<char>>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Left, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Right); // idb
void __thiscall ZlibUtil::ZlibUtil(ZlibUtil *this); // idb
unsigned int __thiscall ZlibUtil::load_input(ZlibUtil *this);
unsigned int __thiscall ZlibUtil::flush_output(ZlibUtil *this);
unsigned int __thiscall ZlibUtil::flush_outputToBuffer(ZlibUtil *this);
void __thiscall zlibUtil2::zlibUtil2(zlibUtil2 *this); // idb
void __thiscall zlibUtil2::~zlibUtil2(zlibUtil2 *this); // idb
char *__thiscall zlibUtil2::flush_output(zlibUtil2 *this);
int __thiscall ZlibUtil::compress(ZlibUtil *this, const char *input, const char *output, int level); // idb
int __thiscall ZlibUtil::compressToMemory(ZlibUtil *this, const char *input, int level); // idb
int __thiscall ZlibUtil::decompress(ZlibUtil *this, const char *input, const char *output); // idb
int __thiscall ZlibUtil::decompressToBuffer(ZlibUtil *this, const char *input); // idb
int __thiscall zlibUtil2::compress(zlibUtil2 *this, char *input, unsigned int input_size, char **output, unsigned int *output_size, int level); // idb
int __thiscall zlibUtil2::decompress(zlibUtil2 *this, char *input, unsigned int input_size, char **output, unsigned int *output_size); // idb
zlibUtil2 *__thiscall zlibUtil2::`vector deleting destructor'(zlibUtil2 *this, unsigned int a2);
void __thiscall AutoSizingTextWin::AutoSizingTextWin(AutoSizingTextWin *this); // idb
void __thiscall AutoSizingTextWin::~AutoSizingTextWin(AutoSizingTextWin *this); // idb
bool __thiscall AutoSizingTextWin::Create(AutoSizingTextWin *this, int iXPos, int iYPos, PgFont *pkFont, PgWin *pkParent); // idb
void __thiscall AutoSizingTextWin::SetText(AutoSizingTextWin *this, char *pcText); // idb
AutoSizingTextWin *__cdecl AutoSizingTextWin::CreateWin(int iXPos, int iYPos, PgFont *pkFont, PgWin *pkParent); // idb
void __thiscall PgFont::GetTextSize(PgFont *this, char *pcText, int iTextSize, tagSIZE *kSize); // idb
void __thiscall PgTextGeometry::SetDrawFormat(PgTextGeometry *this, unsigned int uiDrawFormat); // idb
NiRTTI *PgWinText::GetRTTI();
void PgWinText::VsSetText(PgWinText *this, char *pcFormat, ...); // idb
void __thiscall PgWinText::SetTextColor(PgWinText *this, char ucR, char ucG, char ucB, char ucA); // idb
AutoSizingTextWin *__thiscall AutoSizingTextWin::`scalar deleting destructor'(AutoSizingTextWin *this, unsigned int a2);
void __thiscall PgWinText::SetFont(PgWinText *this, PgFont *pkFont); // idb
PgFont *__thiscall PgWinText::GetFont(PgWinText *this); // idb
void __thiscall PgWinText::SetTextRect(PgWinText *this, tagRECT *kRect); // idb
void __thiscall PgWinText::SetTextColor(PgWinText *this, D3DXCOLOR *kColor); // idb
void __thiscall PgWinText::SetText(PgWinText *this, const char *pcText); // idb
char *__thiscall PgWinText::GetText(PgWinText *this); // idb
void __thiscall PgWinText::SetDrawFormat(PgWinText *this, unsigned int uiDrawFormat); // idb
void __thiscall ClientWin::ClientWin(ClientWin *this); // idb
void __thiscall ClientWin::~ClientWin(ClientWin *this); // idb
bool __thiscall ClientWin::Create(ClientWin *this, int iXPos, int iYPos, PgWin *pkParent); // idb
void __thiscall ClientWin::OnCommand(ClientWin *this, unsigned int wParam, int lParam); // idb
ClientWin *__cdecl ClientWin::CreateWin(int iXPos, int iYPos, PgWin *pkParent); // idb
ClientWin *__thiscall ClientWin::`vector deleting destructor'(ClientWin *this, unsigned int a2);
void __thiscall EditWin::OnCommand(EditWin *this, unsigned int wParam, int lParam); // idb
void __thiscall EditWin::OnClose(EditWin *this); // idb
void __thiscall EditWin::SetEnable(EditWin *this, bool bRes); // idb
void __thiscall EditWinEx::SetFocusClear(EditWinEx *this, bool b); // idb
char *__thiscall EditWin::GetText(EditWin *this); // idb
char *__thiscall EditWin::GetLastText(EditWin *this); // idb
void __thiscall EditWin::SetText(EditWin *this, const char *pcText); // idb
void __thiscall EditWin::ChangeText(EditWin *this, const char *pcText); // idb
void __thiscall EditWin::ClearAllText(EditWin *this); // idb
void __thiscall EditWin::SetTextColor(EditWin *this, D3DXCOLOR *kDxColor); // idb
void __thiscall EditWin::SetFocus(EditWin *this); // idb
void __thiscall EditWin::KillFocus(EditWin *this, int bShowText);
void __thiscall EditWin::Recover_focus(EditWin *this); // idb
HIMC __thiscall EditWin::GetImeStatus(EditWin *this);
void __thiscall EditWin::SetImeStatus(EditWin *this, EditWin::ImeStatus eStatus); // idb
void __thiscall EditWin::SetWidth(EditWin *this, unsigned int uiWidth); // idb
void __thiscall EditWin::SetHeight(EditWin *this, unsigned int uiHeight); // idb
void __thiscall EditWin::SetAutoAlign(EditWin *this, bool bAutoAlign); // idb
bool __thiscall EditWin::GetAutoAlign(EditWin *this); // idb
void __thiscall EditWin::SelectAll(EditWin *this); // idb
void __thiscall EditWin::StrAlign(EditWin *this); // idb
void __thiscall EditWin::EditWin(EditWin *this); // idb
void __thiscall EditWin::~EditWin(EditWin *this); // idb
void __thiscall EditWin::SetCaretColor(EditWin *this, D3DXCOLOR *kDxColor); // idb
void __thiscall EditWin::OnEditEnd(EditWin *this, unsigned int wParam, int lParam); // idb
void __thiscall EditWin::UpdateMeWin(EditWin *this, float fCurTime); // idb
void __thiscall EditWinEx::SetDrawFormat(EditWinEx *this, unsigned int uiAlign); // idb
unsigned int __thiscall EditWinEx::GetDrawFormat(EditWinEx *this); // idb
void __thiscall EditWinEx::OnEditEnd(EditWinEx *this, unsigned int wParam, int lParam); // idb
void __thiscall EditWinEx::KillFocus(EditWinEx *this, int bShowText);
void __thiscall EditWinEx::SetFocus(EditWinEx *this); // idb
char __thiscall EditWin::Create(EditWin *this, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, EditWin::Type eType, unsigned int uiLimitTextLen, unsigned int uiStopFlag, bool bClearTextOnEnd, Font::Type eFontType, bool bForceFocusWhenClick);
void __thiscall EditWinEx::EditWinEx(EditWinEx *this); // idb
void __thiscall EditWinEx::~EditWinEx(EditWinEx *this); // idb
char __thiscall EditWinEx::Create(EditWinEx *this, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, EditWin::Type eType, unsigned int uiLimitTextLen, unsigned int uiStopFlag, bool bClearTextOnEnd, Font::Type eFontType, bool bForceFocusWhenClick);
EditWin *__cdecl EditWin::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, EditWin::Type eType, unsigned int uiLimitTextLen, unsigned int uiStopFlag, int bClearTextOnEnd, Font::Type eFontType, int bForceFocusWhenClick);
EditWinEx *__cdecl EditWinEx::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, EditWin::Type eType, unsigned int uiLimitTextLen, unsigned int uiStopFlag, int bClearTextOnEnd, Font::Type eFontType, int bForceFocusWhenClick);
void __thiscall EditWinEx::SetDefaultStr(EditWinEx *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *DefaultStr); // idb
void __cdecl PgUtil::SetXYTranslate(NiAVObject *pkAVObj, float fX, float fY); // idb
void __thiscall EditWin::SetFont(EditWin *this); // idb
bool __thiscall EditWin::IsDuringEdit(EditWin *this); // idb
EditWin *__thiscall EditWin::`scalar deleting destructor'(EditWin *this, unsigned int a2);
EditWinEx *__thiscall EditWinEx::`scalar deleting destructor'(EditWinEx *this, unsigned int a2);
void __thiscall FlexMsgBox::FlexMsgBox(FlexMsgBox *this); // idb
void __thiscall FlexMsgBox::~FlexMsgBox(FlexMsgBox *this); // idb
void __thiscall FlexMsgBox::SetText(FlexMsgBox *this, char *pcText); // idb
void __thiscall FlexMsgBox::SetVerticalGap(FlexMsgBox *this, int iGap); // idb
void __thiscall FlexMsgBox::OnCommand(FlexMsgBox *this, unsigned int wParam, int lParam); // idb
char __thiscall FlexMsgBox::Create(FlexMsgBox *this, NiSourceTexture *pkTexture, unsigned int uiEdgeWidth, unsigned int uiEdgeHeight, PgFrameWork *pkFrameWork);
FlexMsgBox *__cdecl FlexMsgBox::CreateWin(NiSourceTexture *pkTexture, unsigned int uiEdgeHeight, unsigned int uiEdgeWidth, PgFrameWork *pkFrameWork); // idb
void __cdecl FlexMsgBox::Open(char *pcText); // idb
FlexMsgBox *__thiscall FlexMsgBox::`scalar deleting destructor'(FlexMsgBox *this, unsigned int a2);
void __thiscall FrameBoxWin::FrameBoxWin(FrameBoxWin *this); // idb
void __thiscall FrameBoxWin::~FrameBoxWin(FrameBoxWin *this); // idb
BOOL __thiscall FrameBoxWin::SizeDragHitTest(FrameBoxWin *this);
void __thiscall FrameBoxWin::ResizeLimited(FrameBoxWin *this, int iWidth, int iHeight); // idb
bool __thiscall FrameBoxWin::HitTestEx(FrameBoxWin *this, int iSx, int iSy); // idb
// void __userpurge FrameBoxWin::ProcessMeInput(FrameBoxWin *this@<ecx>, int a2@<ebx>, int a3@<edi>, bool *bHit);
void __stdcall FrameBoxWin::AddScreenElement(NiScreenElements *pkGeom, unsigned int uiTextureWidth, unsigned int uiTextureHeight, unsigned int uiXPos, unsigned int uiYPos, unsigned int uiWidth, unsigned int uiHeight);
void __stdcall FrameBoxWin::ResizeScreenElement(NiScreenElements *pkGeom, unsigned int uiIndex, unsigned int uiXPos, unsigned int uiYPos, unsigned int uiWidth, unsigned int uiHeight);
void __thiscall FrameBoxWin::Resize(FrameBoxWin *this, unsigned int uiWidth, unsigned int uiHeight); // idb
char __thiscall FrameBoxWin::CreateGeometry(FrameBoxWin *this, NiSourceTexture *pkTexture, unsigned int uiEdgeWidth, unsigned int uiEdgeHeight);
char __thiscall FrameBoxWin::Create(FrameBoxWin *this, NiSourceTexture *pkTexture, unsigned int uiEdgeWidth, unsigned int uiEdgeHeight, int iXPos, int iYPos, PgWin *pkParent, PgFrameWork *pkFrameWork);
FrameBoxWin *__cdecl FrameBoxWin::CreateWin(NiSourceTexture *pkTexture, unsigned int uiEdgeHeight, unsigned int uiEdgeWidth, int iXPos, int iYPos, PgWin *pkParent, PgFrameWork *pkFrameWork); // idb
void __thiscall PgWin::Bool::RealizeFalse(PgWin::Bool *this); // idb
FrameBoxWin *__thiscall FrameBoxWin::`scalar deleting destructor'(FrameBoxWin *this, unsigned int a2);
void __thiscall NiTexturingProperty::SetBaseFilterMode(NiTexturingProperty *this, NiTexturingProperty::FilterMode eMode); // idb
void __thiscall ImeCandListWin::ImeCandListWin(ImeCandListWin *this); // idb
void __thiscall ImeCandListWin::~ImeCandListWin(ImeCandListWin *this); // idb
void __thiscall ImeCandListWin::ClearText(ImeCandListWin *this); // idb
char __thiscall ImeCandListWin::SetText(ImeCandListWin *this, int nLine, char *pcText, int r, int g, int b);
void __thiscall ImeCandListWin::EnableAttachBottom(ImeCandListWin *this, bool b); // idb
char __thiscall ImeCandListWin::Create(ImeCandListWin *this, NiSourceTexture *pkTexture, unsigned int uiEdgeWidth, unsigned int uiEdgeHeight, PgWin *pkParent);
void __thiscall ImeCandListWin::SetCandList(ImeCandListWin *this, PgImeCtrl::CandList *kCandList); // idb
void __thiscall ImeCandListWin::AdjustSizeWin(ImeCandListWin *this, int iXPos, int iYPos, int iBottomYPos); // idb
ImeCandListWin *__cdecl ImeCandListWin::CreateWin(PgWin *pkParent); // idb
ImeCandListWin *__thiscall ImeCandListWin::`scalar deleting destructor'(ImeCandListWin *this, unsigned int a2);
void __thiscall ImeEditWin::EnalbeCompStrAttachBottom(ImeEditWin *this, bool b); // idb
void __thiscall ImeEditWin::EnablePaste(ImeEditWin *this, bool bEnable); // idb
bool __thiscall ImeEditWin::IsCompStrExist(ImeEditWin *this); // idb
char __thiscall ImeEditWin::IsOnCandList(ImeEditWin *this);
void __thiscall ImeEditWinEx::EnalbeCompStrAttachBottom(ImeEditWinEx *this, bool b); // idb
void __thiscall ImeEditWinEx::EnablePaste(ImeEditWinEx *this, bool bEnable); // idb
bool __thiscall ImeEditWinEx::IsCompStrExist(ImeEditWinEx *this); // idb
char __thiscall ImeEditWinEx::IsOnCandList(ImeEditWinEx *this);
void __thiscall ImeEditWin::ImeEditWin(ImeEditWin *this); // idb
void __thiscall ImeEditWin::~ImeEditWin(ImeEditWin *this); // idb
void __thiscall ImeEditWin::UpdateMeWin(ImeEditWin *this, float fCurTime); // idb
void __thiscall ImeEditWinEx::ImeEditWinEx(ImeEditWinEx *this); // idb
void __thiscall ImeEditWinEx::~ImeEditWinEx(ImeEditWinEx *this); // idb
void __thiscall ImeEditWinEx::UpdateMeWin(ImeEditWinEx *this, float fCurTime); // idb
char __thiscall ImeEditWin::Create(ImeEditWin *this, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, EditWin::Type eType, unsigned int uiLimitTextLen, unsigned int uiStopFlag, bool bClearTextOnEnd, Font::Type eFontType, bool bForceFocusWhenClick, bool bNoAlt);
char __thiscall ImeEditWinEx::Create(ImeEditWinEx *this, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, EditWin::Type eType, unsigned int uiLimitTextLen, unsigned int uiStopFlag, bool bClearTextOnEnd, Font::Type eFontType, bool bForceFocusWhenClick, bool bNoAlt);
ImeEditWin *__cdecl ImeEditWin::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, EditWin::Type eType, unsigned int uiLimitTextLen, unsigned int uiStopFlag, int bClearTextOnEnd, Font::Type eFontType, int bForceFocusWhenClick, int bNoAlt);
ImeEditWinEx *__cdecl ImeEditWinEx::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, EditWin::Type eType, unsigned int uiLimitTextLen, unsigned int uiStopFlag, int bClearTextOnEnd, Font::Type eFontType, int bForceFocusWhenClick, int bNoAlt);
ImeEditWin *__thiscall ImeEditWin::`vector deleting destructor'(ImeEditWin *this, unsigned int a2);
ImeEditWinEx *__thiscall ImeEditWinEx::`vector deleting destructor'(ImeEditWinEx *this, unsigned int a2);
void __thiscall InputBox::InputBox(InputBox *this); // idb
void __thiscall InputBox::~InputBox(InputBox *this); // idb
void __thiscall InputBox::SetText(InputBox *this, char *pcText); // idb
void __thiscall InputBox::SetActionAfterInputEnd(InputBox *this, InputBox::ActionAfterInputEnd eInputEnd); // idb
void __thiscall InputBox::OnClose(InputBox *this); // idb
void __thiscall InputBox::OnShowWin(InputBox *this); // idb
void __thiscall InputBox::SetFocus(InputBox *this); // idb
void __thiscall InputBox::OnCmdOk(InputBox *this); // idb
void __thiscall InputBox::OnCmdCancel(InputBox *this); // idb
void __thiscall InputBox::OnEditEnd(InputBox *this, unsigned int wParam, int lParam); // idb
char __thiscall InputBox::Create(InputBox *this);
void __thiscall InputBox::OnCommand(InputBox *this, unsigned int wParam, int lParam); // idb
InputBox *__cdecl InputBox::CreateWin(); // idb
InputBox *__thiscall InputBox::`vector deleting destructor'(InputBox *this, unsigned int a2);
void __thiscall ListItem::SetText(ListItem *this, char *pcText); // idb
char __thiscall ListWin::SetItem(ListWin *this, int iIndex, void *pvItem);
_DWORD *__thiscall ListWin::GetItem(ListWin *this, int iIndex);
int __thiscall ListWin::GetCurSel(ListWin *this); // idb
void __thiscall ListWin::SetTextColor(ListWin *this, char ucR, char ucG, char ucB, char ucA); // idb
void __thiscall ListWin::SetSelectedTextColor(ListWin *this, char ucR, char ucG, char ucB, char ucA); // idb
void __thiscall ListWin::SetSelectedTextColor(ListWin *this, D3DXCOLOR *kColor); // idb
void __thiscall ListWin::OnCommand(ListWin *this, unsigned int wParam, int lParam); // idb
void __thiscall ListWin::OnSelected(ListWin *this, int lParam); // idb
unsigned int __thiscall ListWin::GetCount(ListWin *this);
ListItem *__thiscall ListWin::GetListItem(ListWin *this, int iIndex); // idb
PgWinText *__thiscall ListWin::GetTextWin(ListWin *this, int iIndex); // idb
void __thiscall ListWin::~ListWin(ListWin *this); // idb
char __thiscall ListWin::Create(ListWin *this, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgFont *pkFont, PgWin *pkParent, unsigned int uiLineSpace);
int __thiscall ListWin::AddString(ListWin *this, char *pcText); // idb
char __thiscall ListWin::SetCurSel(ListWin *this, int iIndex);
void __thiscall ListWin::ResetContent(ListWin *this); // idb
void __thiscall ListWin::UpdateMeWin(ListWin *this, float fCurTime); // idb
void __thiscall ListWin::ListWin(ListWin *this); // idb
char __thiscall ListWin::DeleteString(ListWin *this, int iIndex);
ListWin *__cdecl ListWin::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgFont *pkFont, PgWin *pkParent, unsigned int uiLineSpace); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::~NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> > *this); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::~NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> > *this); // idb
void __thiscall NiTListBase<DFALL<PgWinBut *>,PgWinBut *>::~NiTListBase<DFALL<PgWinBut *>,PgWinBut *>(NiTListBase<DFALL<PgWinBut *>,PgWinBut *> *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> > *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> > *this, unsigned int a2);
NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> > *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> > *this, unsigned int a2);
NiTListBase<DFALL<PgWinBut *>,PgWinBut *> *__thiscall NiTListBase<DFALL<PgWinBut *>,PgWinBut *>::`scalar deleting destructor'(NiTListBase<DFALL<PgWinBut *>,PgWinBut *> *this, unsigned int a2);
void __thiscall NiTPointerList<NiPointer<ListItem>>::~NiTPointerList<NiPointer<ListItem>>(NiTPointerList<NiPointer<ListItem> > *this); // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> > *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> > *this, unsigned int a2);
void __thiscall PgTList<NiPointer<ListItem>>::~PgTList<NiPointer<ListItem>>(PgTList<NiPointer<ListItem> > *this); // idb
ListItem *__thiscall ListItem::`scalar deleting destructor'(ListItem *this, unsigned int a2);
void __thiscall NiTList<PgWinBut *>::~NiTList<PgWinBut *>(NiTList<PgWinBut *> *this); // idb
PgTList<NiPointer<ListItem> > *__thiscall PgTList<NiPointer<ListItem>>::`scalar deleting destructor'(PgTList<NiPointer<ListItem> > *this, unsigned int a2);
void __thiscall NiTPointerList<NiPointer<PgWinText>>::~NiTPointerList<NiPointer<PgWinText>>(NiTPointerList<NiPointer<PgWinText> > *this); // idb
NiTPointerListBase<DFALL<PgWinBut *>,PgWinBut *> *__thiscall NiTPointerListBase<DFALL<PgWinBut *>,PgWinBut *>::`scalar deleting destructor'(NiTPointerListBase<DFALL<PgWinBut *>,PgWinBut *> *this, unsigned int a2);
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> > *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> > *this, unsigned int a2);
void __thiscall PgTList<NiPointer<PgWinText>>::~PgTList<NiPointer<PgWinText>>(PgTList<NiPointer<PgWinText> > *this); // idb
PgTList<NiPointer<PgWinText> > *__thiscall PgTList<NiPointer<PgWinText>>::`scalar deleting destructor'(PgTList<NiPointer<PgWinText> > *this, unsigned int a2);
NiPointer<PgWin> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::RemovePos(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *this, NiPointer<PgWin> *result, void **kPos); // idb
ListWin *__thiscall ListWin::`vector deleting destructor'(ListWin *this, unsigned int a2);
NiTexture *__thiscall MaskedWin::GetBaseTexture(MaskedWin *this); // idb
NiTriShape *__thiscall MaskedWin::GetTriShape(MaskedWin *this); // idb
void __thiscall MaskedWin::MaskedWin(MaskedWin *this); // idb
void __thiscall MaskedWin::~MaskedWin(MaskedWin *this); // idb
char __thiscall MaskedWin::Create(MaskedWin *this, int iXPos, int iYPos, NiTriShape *pkTriShape, bool bAlphaBlend, PgWin *pkParent);
void __thiscall MaskedWin::SetBaseTextureMatrix(MaskedWin *this, float fOffX, float fOffY, float fScaleX, float fScaleY); // idb
void __thiscall MaskedWin::SetDarkMap(MaskedWin *this, NiTexture *pkTexture); // idb
void __thiscall MaskedWin::SetBaseTexture(MaskedWin *this, NiTexture *pkTexture); // idb
MaskedWin *__cdecl MaskedWin::CreateWin(int iXPos, int iYPos, NiTriShape *pkTriShape, PgWin *pkParent); // idb
MaskedWin *__cdecl MaskedWin::CreateWin_MaskShaderNoAlphaBlend(int iXPos, int iYPos, NiTriShape *pkTriShape, PgWin *pkParent); // idb
void __thiscall NiBinaryExtraData::NiBinaryExtraData(NiBinaryExtraData *this, const unsigned int uiSize, char *pcBinaryData); // idb
NiRTTI *NiBinaryExtraData::GetRTTI();
NiBinaryExtraData *__thiscall NiBinaryExtraData::`vector deleting destructor'(NiBinaryExtraData *this, unsigned int a2);
MaskedWin *__thiscall MaskedWin::`vector deleting destructor'(MaskedWin *this, unsigned int a2);
bool __thiscall MaskShader::Initialize(MaskShader *this, NiDX9Renderer *pkRenderer); // idb
void __thiscall MaskShader::~MaskShader(MaskShader *this); // idb
char __thiscall MaskShader::CreateStagesAndPasses(MaskShader *this);
void __cdecl MaskShader::Terminate(); // idb
void __thiscall MaskShader::MaskShader(MaskShader *this, bool bEnableAlphaBlend); // idb
signed int __thiscall MaskShader::UpdatePipeline(MaskShader *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound);
MaskShader *__cdecl MaskShader::GetShader(); // idb
MaskShader *__cdecl MaskShader::GetShader_NoAlphaBlend(); // idb
void __thiscall NiPointer<NiD3DTextureStage>::~NiPointer<NiD3DTextureStage>(NiPointer<NiD3DTextureStage> *this); // idb
void __thiscall NiPointer<NiD3DPass>::~NiPointer<NiD3DPass>(NiPointer<NiD3DPass> *this); // idb
void __thiscall NiTArray<NiPointer<NiD3DPass>>::SetSize(NiTArray<NiPointer<NiD3DPass> > *this, unsigned int uiMaxSize); // idb
void __thiscall NiTArray<NiPointer<NiD3DPass>>::SetAt(NiTArray<NiPointer<NiD3DPass> > *this, unsigned int uiIndex, NiPointer<NiD3DPass> *element); // idb
void __thiscall NiD3DTextureStage::SetTexture(NiTexturingProperty::Map *this, NiTexture *pkTexture); // idb
NiD3DTextureStage *__thiscall NiD3DPass::GetStage(NiD3DPass *this, unsigned int uiStageNum); // idb
NiRTTI *MaskShader::GetRTTI();
bool __thiscall NiD3DShader::GetIsBestImplementation(NiD3DShaderInterface *this); // idb
MaskShader_NoAlphaBlend *__thiscall MaskShader_NoAlphaBlend::`scalar deleting destructor'(MaskShader_NoAlphaBlend *this, unsigned int a2);
NiRTTI *MaskShader_NoAlphaBlend::GetRTTI();
void __thiscall MsgBox::SetFrameWorkMsgOnClose(MsgBox *this, PgFrameWork *pkFrameWork, PgMsg::Frame *pkFrameMsg, PgMsg::Frame *pkFrameCancelMsg); // idb
void __thiscall MsgBox::SetFrameWorkMsgOnPrivateStore(MsgBox *this, PgFrameWork *pkFrameWork, PgMsg::Frame *pkFrameMsg, PgMsg::Frame *pkFrameCancelMsg, PgMsg::Frame *pkFrameSearchMsg, PgMsg::Frame *pkFrameCloseMsg); // idb
void __thiscall MsgBox::SetWindowMsgOnClose(MsgBox *this, PgWin *pkRevMsgWin, unsigned int uiOkMsg, unsigned int wOkParam, int lOkParam, unsigned int uiCancelMsg, unsigned int wCancelParam, int lCancelParam); // idb
// void __userpurge MsgBox::SetItemIconByID(MsgBox *this@<ecx>, int a2@<edi>, int nID);
void __thiscall MsgBox::SetUnderSlotText(MsgBox *this, char *pkText); // idb
void __thiscall MsgBox::OnCmdBut1(MsgBox *this); // idb
void __thiscall MsgBox::OnCmdBut2(MsgBox *this); // idb
void __thiscall MsgBox::OnCmdBut4(MsgBox *this); // idb
void __thiscall MsgBox::ProcessMeInput(MsgBox *this, bool *bHit); // idb
void __thiscall MsgBox::SetMsg(MsgBox *this, char *pcText); // idb
void __thiscall MsgBox::~MsgBox(MsgBox *this); // idb
char __thiscall MsgBox::CreateOkBut(MsgBox *this, NiNode *spNode, NiSourceTexture *pkTexture);
char __thiscall MsgBox::CreateOkCancelBut(MsgBox *this, NiNode *spNode, NiSourceTexture *pkTexture);
char __thiscall MsgBox::CreateCancelBut(MsgBox *this, NiNode *pkNode, NiSourceTexture *pkTexture);
char __thiscall MsgBox::CreateDenialCloseBut(MsgBox *this, NiNode *spNode, NiSourceTexture *pkTexture);
char __thiscall MsgBox::CreatePrivateStoreBut(MsgBox *this, NiNode *spNode, NiSourceTexture *pkTexture);
char __thiscall MsgBox::CreateAgreeRefusal(MsgBox *this, NiNode *spNode, NiSourceTexture *pkTexture);
char __thiscall MsgBox::CreateSearching(MsgBox *this, NiNode *spNode, NiSourceTexture *pkTexture);
void __thiscall MsgBox::CloseWithOK(MsgBox *this); // idb
void __thiscall MsgBox::CloseWithCancel(MsgBox *this); // idb
void __thiscall MsgBox::Close(MsgBox *this); // idb
void __thiscall MsgBox::OnCmdBut3(MsgBox *this); // idb
void __thiscall MsgBox::MsgBox(MsgBox *this); // idb
void __thiscall MsgBox::OnCommand(MsgBox *this, unsigned int wParam, int lParam); // idb
MsgBox *__cdecl MsgBox::CreateWin(MsgBox::ButType eBut); // idb
MsgBox *MsgBox::Modal(MsgBox::ButType eBut, char *pcFormat, ...); // idb
MsgBox *MsgBox::Modeless(MsgBox::ButType eBut, char *pcFormat, ...); // idb
char __thiscall MsgBox::CreateRandomOption(MsgBox *this, NiNode *spNode, NiSourceTexture *pkTexture);
char __thiscall MsgBox::Create(MsgBox *this, MsgBox::ButType eBut);
MsgBox *__thiscall MsgBox::`scalar deleting destructor'(MsgBox *this, unsigned int a2);
PgWinProxy *__thiscall PgWinProxy::`scalar deleting destructor'(PgWinProxy *this, unsigned int a2);
void __thiscall PgWinProxy::OnCommand(PgWinProxy *this, unsigned int wParam, int lParam); // idb
void __thiscall PgWinProxy::OnEditEnd(PgWinProxy *this, unsigned int wParam, int lParam); // idb
PgWinProxy *__cdecl PgWinProxy::CreateWin(PgWin *pkParent); // idb
PgWinProxy *__cdecl PgWinProxy::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent); // idb
void __thiscall SlideBar::SlideBar(SlideBar *this); // idb
void __thiscall SlideBar::~SlideBar(SlideBar *this); // idb
void __thiscall SlideBar::SetCurPos(SlideBar *this, int nPos); // idb
void __thiscall SlideBar::SetSplitCnt(SlideBar *this, int nSplitCnt); // idb
void __thiscall SlideBar::SendMessageToParent(SlideBar *this); // idb
void __thiscall SlideBar::OnSlideBar(SlideBar *this); // idb
void __thiscall SlideBar::OnClick1(SlideBar *this); // idb
void __thiscall SlideBar::OnClick2(SlideBar *this); // idb
void __thiscall SlideBar::OnMouseEvent(SlideBar *this, PgWin::PG_MOUSE_EVENT eMouseEvent, PgWin *pkWin); // idb
void __thiscall SlideBar::OnCommand(SlideBar *this, unsigned int wParam, int lParam); // idb
char __thiscall SlideBar::Create(SlideBar *this, NiNode *pNode, char *pName, char *pName1, char *pName2, PgSprData *pkMovePoint, unsigned int uiID, PgWin *pkParent);
SlideBar *__cdecl SlideBar::CreateWin(NiNode *pNode, char *pName, char *pName1, char *pName2, PgSprData *pkMovePoint, unsigned int uiID, PgWin *pkParent); // idb
SlideBar *__thiscall SlideBar::`scalar deleting destructor'(SlideBar *this, unsigned int a2);
int __stdcall SlideListWin::GetFontSize(unsigned int uiIndex, int nSize);
char __thiscall SlideListWin::ListItem::SetData(SlideListWin::ListItem *this, unsigned int dwData);
char __thiscall SlideListWin::ListItem::GetData(SlideListWin::ListItem *this, unsigned int *dwData);
signed int __thiscall ColumnBut::GetTextWinSize(ColumnBut *this);
char __thiscall ColumnBut::SetFontSize(ColumnBut *this, unsigned int uiIndex, int nSize);
char __thiscall ColumnBut::SetFontColor(ColumnBut *this, unsigned int uiIndex, int r, int g, int b);
char __thiscall ColumnBut::AlignText(ColumnBut *this, unsigned int uiIndex, unsigned int uiDrawFormat);
void __thiscall ColumnBut::SetText(ColumnBut *this, unsigned int uiIndex, const char *szString); // idb
void __thiscall ColumnBut::SetButShow(ColumnBut *this, PgWinBut::ButShow eShow); // idb
void __thiscall ColumnBut::ProcessMeInput(ColumnBut *this, bool *bHit); // idb
signed int __thiscall SlideListWin::GetItemSize(SlideListWin *this);
char __thiscall SlideListWin::SetData(SlideListWin *this, unsigned int uiIndex, unsigned int dwData);
char __thiscall SlideListWin::GetData(SlideListWin *this, unsigned int uiColumn, unsigned int *dwData);
void __thiscall SlideListWin::SetToolTipWin(SlideListWin *this, PgWin *pkToolTipWin); // idb
void __thiscall SlideListWin::SetToolTipWinText(SlideListWin *this, int nItemIndex, char *pcText); // idb
ColumnBut *__thiscall SlideListWin::GetColumn(SlideListWin *this, unsigned int iItemIndex, unsigned int uiColumn); // idb
unsigned int __thiscall SlideListWin::GetCurSelIndex(SlideListWin *this);
char __thiscall SlideListWin::SetCurSelIndex(SlideListWin *this, int nSelIndex);
signed int __thiscall SLWCreateInfo::GetItemCnt(SLWCreateInfo *this);
SLWCreateInfo::Item *__thiscall SLWCreateInfo::GetItemInfo(SLWCreateInfo *this, int nIndex); // idb
signed int __thiscall SlideListWin::ListItem::GetColumnSize(SlideListWin::ListItem *this);
char __thiscall SlideListWin::ListItem::SetFontSize(SlideListWin::ListItem *this, unsigned int uiColumn, int nSize);
char __thiscall SlideListWin::ListItem::SetFontColor(SlideListWin::ListItem *this, unsigned int uiColumn, int r, int g, int b);
char __thiscall SlideListWin::ListItem::AlignText(SlideListWin::ListItem *this, unsigned int uiColumn, unsigned int uiDrawFormat);
char __thiscall SlideListWin::ListItem::GetAlignText(SlideListWin::ListItem *this, unsigned int uiColumn, unsigned int *uiDrawFormat);
char __thiscall SlideListWin::ListItem::GetFontSize(SlideListWin::ListItem *this, unsigned int uiColumn, int *nSize);
char __thiscall SlideListWin::ListItem::GetFontColor(SlideListWin::ListItem *this, unsigned int uiColumn, int *r, int *g, int *b);
void __thiscall SlideListWin::ListItem::SetFontSize(SlideListWin::ListItem *this, int nSize); // idb
void __thiscall SlideListWin::ListItem::SetFontColor(SlideListWin::ListItem *this, int r, int g, int b); // idb
void __thiscall SlideListWin::ListItem::AlignText(SlideListWin::ListItem *this, unsigned int uiDrawFormat); // idb
void __thiscall ColumnBut::DoAction(ColumnBut *this); // idb
void __thiscall ColumnBut::DoRAction(ColumnBut *this); // idb
char __thiscall SlideListWin::SetFontSize(SlideListWin *this, unsigned int uiIndex, int nSize);
char __thiscall SlideListWin::SetFontColor(SlideListWin *this, unsigned int uiIndex, int r, int g, int b);
char __thiscall SlideListWin::SetFontSize(SlideListWin *this, unsigned int uiIndex, unsigned int uiColumn, int nSize);
char __thiscall SlideListWin::SetFontColor(SlideListWin *this, unsigned int uiIndex, unsigned int uiColumn, int r, int g, int b);
char __thiscall SlideListWin::AlignText(SlideListWin *this, unsigned int uiDrawFormat);
char __thiscall SlideListWin::AlignText(SlideListWin *this, unsigned int uiColumn, unsigned int uiDrawFormat);
void __thiscall SlideListWin::SetToolTipWinTextInColumn(SlideListWin *this, unsigned int TextWinIndex, char *pcText); // idb
void __thiscall SlideListWin::SetToolTipWin(SlideListWin *this, unsigned int TextWinIndex, PgWin *pkToolTipWin); // idb
double __thiscall SLWCreateInfo::GetHeight(SLWCreateInfo *this);
char *__thiscall SlideListWin::ListItem::GetText(SlideListWin::ListItem *this, unsigned int nIndex);
char *__thiscall SlideListWin::GetText(SlideListWin *this, unsigned int uiIndex, unsigned int uiColumn);
void __thiscall SlideListWin::UpdateViewList(SlideListWin *this); // idb
void __thiscall SlideListWin::OnClickItem(SlideListWin *this, int nItemIndex); // idb
void __thiscall SlideListWin::OnRClickItem(SlideListWin *this, int nItemIndex); // idb
void __thiscall SlideListWin::KillSelIndex(SlideListWin *this); // idb
void __thiscall SlideListWin::OnCommand(SlideListWin *this, unsigned int wParam, int lParam); // idb
void __thiscall ColumnBut::ColumnBut(ColumnBut *this); // idb
void __thiscall ColumnBut::~ColumnBut(ColumnBut *this); // idb
ColumnBut *__cdecl ColumnBut::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, unsigned int uiRCmdMsg); // idb
void __thiscall ColumnBut::AddTextWin(ColumnBut *this, PgWinText *pkTextWin); // idb
char __thiscall SlideListWin::Create(SlideListWin *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, SLWCreateInfo *kCreateInfo, unsigned int uiLineSpace, bool bTextCmd);
char __thiscall SlideListWin::Create(SlideListWin *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, PgFont *pkFont, SLWCreateInfo *kCreateInfo, unsigned int uiLineSpace, bool bTextCmd);
char __thiscall SlideListWin::ListItem::SetText(SlideListWin::ListItem *this, unsigned int uiColumn, const char *szText);
char __thiscall SlideListWin::SetText(SlideListWin *this, unsigned int uiIndex, unsigned int uiColumn, const char *szText);
void __thiscall SlideListWin::SlideListWin(SlideListWin *this); // idb
void __thiscall SlideListWin::~SlideListWin(SlideListWin *this); // idb
SlideListWin *__cdecl SlideListWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, SLWCreateInfo *kCreateInfo, unsigned int uiLineSpace, bool bTextCmd); // idb
SlideListWin *__cdecl SlideListWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, PgFont *pkFont, SLWCreateInfo *kCreateInfo, unsigned int uiLineSpace, bool bTextCmd); // idb
char __thiscall SlideListWin::RemoveItem(SlideListWin *this, unsigned int uiIndex);
char __thiscall SLWCreateInfo::MakeTempData(SLWCreateInfo *this, NiSourceTexture *pkTexture);
void __thiscall SlideListWin::RemoveAllList(SlideListWin *this); // idb
void __thiscall SlideListWin::Sort(SlideListWin *this, int nColumnNum, bool bReverse, bool bSortByNUm); // idb
char __thiscall SlideListWin::ListItem::SetColumnCnt(SlideListWin::ListItem *this, unsigned int uiColumnCnt);
void __thiscall SlideListWin::ListItem::ListItem(SlideListWin::ListItem *this, const char *szText, int ncolumnCnt); // idb
void __thiscall SlideListWin::ListItem::AddText(SlideListWin::ListItem *this, const char *szText); // idb
int __thiscall SlideListWin::AddText(SlideListWin *this, const char *szText); // idb
int __thiscall SlideListWin::AddHeadText(SlideListWin *this, const char *szText); // idb
SLWCreateInfo::Item *__thiscall SLWCreateInfo::AddItemInfo(SLWCreateInfo *this, int nItemType); // idb
void __thiscall boost::detail::sp_counted_base::destruct(boost::detail::sp_counted_base *this); // idb
boost::detail::sp_counted_base_impl<PgNsTerrain::CPgBlockObject *,boost::checked_deleter<PgNsTerrain::CPgBlockObject> > *__thiscall boost::detail::sp_counted_base_impl<SlideListWin::ListItem *,boost::checked_deleter<SlideListWin::ListItem>>::`vector deleting destructor'(boost::detail::sp_counted_base_impl<PgNsTerrain::CPgBlockObject *,boost::checked_deleter<PgNsTerrain::CPgBlockObject> > *this, unsigned int a2);
boost::checked_deleter<SlideListWin::ListItem> *__thiscall boost::detail::sp_counted_base_impl<SlideListWin::ListItem *,boost::checked_deleter<SlideListWin::ListItem>>::get_deleter(boost::detail::sp_counted_base_impl<SlideListWin::ListItem *,boost::checked_deleter<SlideListWin::ListItem> > *this, type_info *ti);
boost::checked_deleter<SLWCreateInfo::Item> *__thiscall boost::detail::sp_counted_base_impl<SLWCreateInfo::Item *,boost::checked_deleter<SLWCreateInfo::Item>>::get_deleter(boost::detail::sp_counted_base_impl<SLWCreateInfo::Item *,boost::checked_deleter<SLWCreateInfo::Item> > *this, type_info *ti);
SlideListWin::ListItem::ColumnData *__stdcall std::allocator<SlideListWin::ListItem::ColumnData>::allocate(unsigned int _Count);
boost::shared_ptr<SlideListWin::ListItem> *__cdecl std::_Move_backward<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem> *>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last, boost::shared_ptr<SlideListWin::ListItem> *_Dest);
bool __thiscall SlideListWin::ListNumSorter::operator()(SlideListWin::ListNumSorter *this, boost::shared_ptr<SlideListWin::ListItem> *spItem1, boost::shared_ptr<SlideListWin::ListItem> *spItem2); // idb
bool __thiscall SlideListWin::ListSorter::operator()(SlideListWin::ListSorter *this, boost::shared_ptr<SlideListWin::ListItem> *spItem1, boost::shared_ptr<SlideListWin::ListItem> *spItem2); // idb
void __stdcall std::allocator<boost::shared_ptr<SlideListWin::ListItem>>::construct(boost::shared_ptr<SLWCreateInfo::Item> *_Ptr, boost::shared_ptr<SLWCreateInfo::Item> *_Val);
boost::shared_ptr<SLWCreateInfo::Item> *__cdecl std::_Move<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem> *>(boost::shared_ptr<SLWCreateInfo::Item> *_First, boost::shared_ptr<SLWCreateInfo::Item> *_Last, boost::shared_ptr<SLWCreateInfo::Item> *_Dest);
void __cdecl std::_Construct<boost::shared_ptr<SLWCreateInfo::Item>,boost::shared_ptr<SLWCreateInfo::Item> const &>(boost::shared_ptr<SLWCreateInfo::Item> *_Ptr, boost::shared_ptr<SLWCreateInfo::Item> *_Val); // idb
void __cdecl std::_Push_heap<boost::shared_ptr<SlideListWin::ListItem> *,int,boost::shared_ptr<SlideListWin::ListItem>,SlideListWin::ListNumSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, int _Hole, int _Top, boost::shared_ptr<SlideListWin::ListItem> *_Val, SlideListWin::ListNumSorter _Pred); // idb
void __cdecl std::_Push_heap<boost::shared_ptr<SlideListWin::ListItem> *,int,boost::shared_ptr<SlideListWin::ListItem>,SlideListWin::ListSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, int _Hole, int _Top, boost::shared_ptr<SlideListWin::ListItem> *_Val, SlideListWin::ListSorter _Pred); // idb
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::_Lbound(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Keyval); // idb
void __cdecl std::_Insertion_sort1<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListNumSorter,boost::shared_ptr<SlideListWin::ListItem>>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListNumSorter _Pred);
void __cdecl std::_Insertion_sort1<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListSorter,boost::shared_ptr<SlideListWin::ListItem>>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListSorter _Pred);
void __cdecl std::_Med3<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListNumSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Mid, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListNumSorter _Pred); // idb
void __cdecl std::_Adjust_heap<boost::shared_ptr<SlideListWin::ListItem> *,int,boost::shared_ptr<SlideListWin::ListItem>,SlideListWin::ListNumSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, int _Hole, int _Bottom, boost::shared_ptr<SlideListWin::ListItem> *_Val, SlideListWin::ListNumSorter _Pred); // idb
void __cdecl std::_Med3<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Mid, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListSorter _Pred); // idb
void __cdecl std::_Adjust_heap<boost::shared_ptr<SlideListWin::ListItem> *,int,boost::shared_ptr<SlideListWin::ListItem>,SlideListWin::ListSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, int _Hole, int _Bottom, boost::shared_ptr<SlideListWin::ListItem> *_Val, SlideListWin::ListSorter _Pred); // idb
void __cdecl std::_Rotate<boost::shared_ptr<SlideListWin::ListItem> *,int,boost::shared_ptr<SlideListWin::ListItem>>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Mid, boost::shared_ptr<SlideListWin::ListItem> *_Last);
void __cdecl std::_Reverse<boost::shared_ptr<SlideListWin::ListItem> *>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last);
boost::shared_ptr<SLWCreateInfo::Item> *__cdecl std::_Uninit_move<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem> *,std::allocator<boost::shared_ptr<SlideListWin::ListItem>>,boost::shared_ptr<SlideListWin::ListItem>>(boost::shared_ptr<SLWCreateInfo::Item> *_First, boost::shared_ptr<SLWCreateInfo::Item> *_Last, boost::shared_ptr<SLWCreateInfo::Item> *_Dest);
void __cdecl std::_Median<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListNumSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Mid, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListNumSorter _Pred); // idb
void __cdecl std::_Make_heap<boost::shared_ptr<SlideListWin::ListItem> *,int,boost::shared_ptr<SlideListWin::ListItem>,SlideListWin::ListNumSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListNumSorter _Pred);
void __cdecl std::_Median<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Mid, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListSorter _Pred); // idb
void __cdecl std::_Make_heap<boost::shared_ptr<SlideListWin::ListItem> *,int,boost::shared_ptr<SlideListWin::ListItem>,SlideListWin::ListSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListSorter _Pred);
void __cdecl std::_Pop_heap_0<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem>,SlideListWin::ListNumSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListNumSorter _Pred);
void __cdecl std::_Pop_heap_0<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem>,SlideListWin::ListSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListSorter _Pred);
ColumnBut *__thiscall ColumnBut::`scalar deleting destructor'(ColumnBut *this, unsigned int a2);
void __cdecl std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(boost::shared_ptr<SLWCreateInfo::Item> *_First, boost::shared_ptr<SLWCreateInfo::Item> *_Last);
std::pair<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem> *> *__cdecl std::_Unguarded_partition<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListNumSorter>(std::pair<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem> *> *result, boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListNumSorter _Pred); // idb
std::pair<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem> *> *__cdecl std::_Unguarded_partition<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListSorter>(std::pair<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem> *> *result, boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListSorter _Pred); // idb
void __thiscall std::vector<NiPointer<NiAVObject>,std::allocator<NiPointer<NiAVObject>>>::reserve(std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData> > > *this, unsigned int _Count); // idb
void __cdecl std::_Destroy_range<std::allocator<SlideListWin::ListItem::ColumnData>>(SlideListWin::ListItem::ColumnData *_First, SlideListWin::ListItem::ColumnData *_Last);
void __cdecl std::_Sort_heap<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListNumSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListNumSorter _Pred); // idb
void __cdecl std::_Sort_heap<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListSorter _Pred); // idb
void __thiscall std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData>>>::_Reserve(std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData> > > *this, unsigned int _Count); // idb
void __cdecl std::_Uninit_def_fill_n<SlideListWin::ListItem::ColumnData *,unsigned int,SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData>,SlideListWin::ListItem::ColumnData>(SlideListWin::ListItem::ColumnData *_First, unsigned int _Count);
SlideListWin::ListItem::ColumnData *__cdecl std::_Move<SlideListWin::ListItem::ColumnData *,SlideListWin::ListItem::ColumnData *>(SlideListWin::ListItem::ColumnData *_First, SlideListWin::ListItem::ColumnData *_Last, SlideListWin::ListItem::ColumnData *_Dest);
SlideListWin::ListItem::ColumnData *__cdecl std::_Uninit_move<SlideListWin::ListItem::ColumnData *,SlideListWin::ListItem::ColumnData *,std::allocator<SlideListWin::ListItem::ColumnData>,SlideListWin::ListItem::ColumnData>(SlideListWin::ListItem::ColumnData *_First, SlideListWin::ListItem::ColumnData *_Last, SlideListWin::ListItem::ColumnData *_Dest);
void __thiscall std::vector<NiPointer<NiAVObject>,std::allocator<NiPointer<NiAVObject>>>::~vector<NiPointer<NiAVObject>,std::allocator<NiPointer<NiAVObject>>>(std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData> > > *this); // idb
void __thiscall std::vector<boost::shared_ptr<SLWCreateInfo::Item>,std::allocator<boost::shared_ptr<SLWCreateInfo::Item>>>::reserve(std::vector<boost::shared_ptr<SLWCreateInfo::Item>,std::allocator<boost::shared_ptr<SLWCreateInfo::Item> > > *this, unsigned int _Count); // idb
void __cdecl std::_Sort<boost::shared_ptr<SlideListWin::ListItem> *,int,SlideListWin::ListNumSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last, int _Ideal, SlideListWin::ListNumSorter _Pred); // idb
void __cdecl std::_Sort<boost::shared_ptr<SlideListWin::ListItem> *,int,SlideListWin::ListSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last, int _Ideal, SlideListWin::ListSorter _Pred); // idb
void __thiscall std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData>>::~vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData>>(std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData> > *this); // idb
void __thiscall std::vector<boost::shared_ptr<SlideListWin::ListItem>,std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>::push_back(std::vector<boost::shared_ptr<SlideListWin::ListItem>,std::allocator<boost::shared_ptr<SlideListWin::ListItem> > > *this, boost::shared_ptr<SlideListWin::ListItem> *_Val); // idb
void __thiscall std::vector<boost::shared_ptr<SLWCreateInfo::Item>,std::allocator<boost::shared_ptr<SLWCreateInfo::Item>>>::_Reserve(std::vector<boost::shared_ptr<SLWCreateInfo::Item>,std::allocator<boost::shared_ptr<SLWCreateInfo::Item> > > *this, unsigned int _Count); // idb
SlideListWin *__thiscall SlideListWin::`vector deleting destructor'(SlideListWin *this, unsigned int a2);
void __thiscall std::vector<boost::shared_ptr<SLWCreateInfo::Item>,std::allocator<boost::shared_ptr<SLWCreateInfo::Item>>>::push_back(std::vector<boost::shared_ptr<SLWCreateInfo::Item>,std::allocator<boost::shared_ptr<SLWCreateInfo::Item> > > *this, boost::shared_ptr<SLWCreateInfo::Item> *_Val); // idb
void __thiscall std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData>>::reserve(std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData> > *this, unsigned int _Count); // idb
void __thiscall std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData>>::_Reserve(std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData> > *this, unsigned int _Count); // idb
void __thiscall std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData>>::push_back(std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData> > *this, SlideListWin::ListItem::ColumnData *_Val); // idb
void __thiscall std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData>>::resize(std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData> > *this, unsigned int _Newsize); // idb
void __stdcall boost::checked_deleter<SlideListWin::ListItem>::operator()(SlideListWin::ListItem *x);
void __thiscall boost::detail::sp_counted_base_impl<SlideListWin::ListItem *,boost::checked_deleter<SlideListWin::ListItem>>::dispose(boost::detail::sp_counted_base_impl<SlideListWin::ListItem *,boost::checked_deleter<SlideListWin::ListItem> > *this); // idb
void __thiscall boost::detail::shared_count::shared_count(boost::detail::shared_count *this, SlideListWin::ListItem *p, boost::checked_deleter<SlideListWin::ListItem> d); // idb
void __thiscall SLWCreateInfo::Item::~Item(SLWCreateInfo::Item *this); // idb
void __thiscall SLWCreateInfo::Item::Item(SLWCreateInfo::Item *this); // idb
void __stdcall boost::checked_deleter<SLWCreateInfo::Item>::operator()(SLWCreateInfo::Item *x);
void __thiscall boost::detail::sp_counted_base_impl<SLWCreateInfo::Item *,boost::checked_deleter<SLWCreateInfo::Item>>::dispose(boost::detail::sp_counted_base_impl<SLWCreateInfo::Item *,boost::checked_deleter<SLWCreateInfo::Item> > *this); // idb
void __thiscall boost::detail::shared_count::shared_count(boost::detail::shared_count *this, SLWCreateInfo::Item *p, boost::checked_deleter<SLWCreateInfo::Item> d); // idb
void __thiscall SpeechBubbleWin::SpeechBubbleWin(SpeechBubbleWin *this); // idb
void __thiscall SpeechBubbleWin::~SpeechBubbleWin(SpeechBubbleWin *this); // idb
void __thiscall SpeechBubbleWin::SetBubbleWidth(SpeechBubbleWin *this, unsigned int uiWidth); // idb
void __thiscall SpeechBubbleWin::SetBubbleHeight(SpeechBubbleWin *this, unsigned int uiHeight); // idb
void __thiscall SpeechBubbleWin::HideArrowWin(SpeechBubbleWin *this); // idb
void __thiscall SpeechBubbleWin::SetNpcPos(SpeechBubbleWin *this, float x, float y); // idb
// void __userpurge SpeechBubbleWin::SetTargetXY(SpeechBubbleWin *this@<ecx>, unsigned int a2@<edi>, int a3@<esi>, float fTargetX, float fTargetY);
int __thiscall SpeechBubbleWin::GetBubbleHeight(SpeechBubbleWin *this);
// void __userpurge SpeechBubbleWin::UpdateMainCharMode(SpeechBubbleWin *this@<ecx>, int a2@<ebx>, unsigned int a3@<edi>, NiCamera *pkWorldCamera);
char __thiscall SpeechBubbleWin::Create(SpeechBubbleWin *this, PgFrameWork *pkFrameWork);
// void __userpurge SpeechBubbleWin::Update(SpeechBubbleWin *this@<ecx>, int a2@<ebx>, unsigned int a3@<edi>, int a4@<esi>, float fTime, NiCamera *pkWorldCamera, PgWinCamera *pkScreenCamera);
void __thiscall SpeechBubbleWin::SetText(SpeechBubbleWin *this, const char *text); // idb
SpeechBubbleWin *__cdecl SpeechBubbleWin::CreateWin(PgFrameWork *pkFrameWork); // idb
SpeechBubbleWin *__thiscall SpeechBubbleWin::`vector deleting destructor'(SpeechBubbleWin *this, unsigned int a2);
int __thiscall CWebHttpConnect::SetPortA(CWebHttpConnect *this, unsigned __int16 nPort); // idb
int __thiscall CWebHttpConnect::SetServer(CWebHttpConnect *this, char *sServer); // idb
int __thiscall CWebHttpConnect::SetPath(CWebHttpConnect *this, char *sPath); // idb
int __thiscall CWebHttpConnect::SetVersion(CWebHttpConnect *this, char *sVersion); // idb
int __thiscall CWebHttpConnect::SetFuntion(CWebHttpConnect *this, char *sFuntion); // idb
int __thiscall CWebHttpConnect::SetParameter(CWebHttpConnect *this, char *sParameter, char *sParameterData); // idb
int __thiscall CWebHttpConnect::SetParameter(CWebHttpConnect *this, char *sParameter); // idb
int __thiscall CWebHttpConnect::SetSharedSecret(CWebHttpConnect *this, char *sSharedSecret); // idb
int __thiscall CWebHttpConnect::SetTokenSecret(CWebHttpConnect *this, char *sTokenSecret); // idb
char *__thiscall CWebHttpConnect::MakeAddress(CWebHttpConnect *this); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall CWebHttpConnect::GetHTMLDocument(CWebHttpConnect *this); // idb
char *__thiscall CWebHttpConnect::GetString(CWebHttpConnect *this, char *sItem); // idb
void __thiscall CWebHttpConnect::CWebHttpConnect(CWebHttpConnect *this); // idb
void __thiscall CWebHttpConnect::~CWebHttpConnect(CWebHttpConnect *this); // idb
int __thiscall CWebHttpConnect::InitConnection(CWebHttpConnect *this, unsigned int nTimeOut); // idb
int __thiscall CWebHttpConnect::QueryToServer(CWebHttpConnect *this); // idb
void __thiscall CWebContainer::~CWebContainer(CWebContainer *this); // idb
void __thiscall CWebContainer::setLocation(CWebContainer *this, int x, int y, int cx, int cy); // idb
// void __userpurge CWebContainer::setVisible(CWebContainer *this@<ecx>, int a2@<edi>, bool bVisible);
void __thiscall CWebContainer::setFocus(CWebContainer *this, bool bFocus); // idb
HRESULT __stdcall CWebEventSink::Invoke(CWebEventSink *this, int dispidMember, _GUID *riid, unsigned int lcid, unsigned __int16 wFlags, tagDISPPARAMS *pDispParams, tagVARIANT *pvarResult, tagEXCEPINFO *pExcepInfo, unsigned int *puArgErr); // idb
IConnectionPoint *__thiscall CWebContainer::GetConnectionPoint(CWebContainer *this, _GUID *riid); // idb
HRESULT __thiscall CWebContainer::getWeb(CWebContainer *this, IWebBrowser2 **ppweb); // idb
void __thiscall CWebCtrl::CWebCtrl(CWebCtrl *this, HWND__ *hwnd); // idb
void __thiscall CWebCtrl::Navigate(CWebCtrl *this, char *psz); // idb
void __thiscall CWebCtrl::Navigate(CWebCtrl *this, char *szURL, char *szPostData, char *szHeaders); // idb
bool __stdcall UninitWebCtrl(); // idb
void __thiscall CWebContainer::ConnectEvents(CWebContainer *this); // idb
void __thiscall CWebContainer::DisconnectEvents(CWebContainer *this); // idb
void __thiscall CWebCtrl::Navigate_EX(CWebCtrl *this, char *URL); // idb
void __thiscall CWebContainer::CWebContainer(CWebContainer *this, HWND__ *hwnd); // idb
void __thiscall CWebContainer::add(CWebContainer *this); // idb
void __thiscall CWebContainer::remove(CWebContainer *this); // idb
int __thiscall CWebCtrl::WebCtrlProc(CWebCtrl *this, unsigned int uMsg, unsigned int wParam, int lParam); // idb
int __stdcall WebCtrlProc(HWND__ *hwnd, unsigned int uMsg, unsigned int wParam, int lParam); // idb
bool __stdcall InitWebCtrl(); // idb
int __cdecl IsEqualGUID(_GUID *rguid1, _GUID *rguid2); // idb
HRESULT __stdcall CWebContainer::QueryInterface(CWebContainer *this, _GUID *riid, void **ppv); // idb
LONG __stdcall CWebContainer::AddRef(CWebContainer *this);
HRESULT __stdcall CWebContainer::GetContainer(CWebContainer *this, IOleContainer **__formal); // idb
HRESULT __stdcall CWebContainer::GetWindow(CWebContainer *this, HWND__ **phwnd); // idb
HRESULT __stdcall CWebContainer::GetWindowContext(CWebContainer *this, IOleInPlaceFrame **ppFrame, IOleInPlaceUIWindow **ppIIPUIWin, tagRECT *prcPosRect, tagRECT *prcClipRect, tagOIFI *pFrameInfo); // idb
HRESULT __stdcall CWebContainer::Scroll(CWebContainer *this, tagMSG *__formal, unsigned int __formal); // idb
HRESULT __stdcall CWebContainer::SetBorderSpace(CWebEventSink *this, unsigned int *__formal); // idb
NiShader *__stdcall NiShaderFactory::RetrieveShader(NiRenderer *pkRenderer, char *pcName, unsigned int uiImplementation);
HRESULT __stdcall CWebContainer::SaveObject(CWebContainer *this); // idb
HRESULT __stdcall CWebEventSink::GetIDsOfNames(CWebEventSink *this, _GUID *__formal, wchar_t **__formal, unsigned int __formal, unsigned int __formal, int *pdispid); // idb
HRESULT __stdcall CWebEventSink::GetTypeInfo(CWebEventSink *this, unsigned int __formal, unsigned int __formal, ITypeInfo **__formal); // idb
HRESULT __stdcall CWebContainer::Invoke(CWebContainer *this, int __formal, _GUID *__formal, unsigned int __formal, unsigned __int16 __formal, tagDISPPARAMS *__formal, tagVARIANT *__formal, tagEXCEPINFO *__formal, unsigned int *__formal); // idb
LONG __stdcall CWebContainer::AddRef(int a1);
LONG __stdcall CWebContainer::AddRef(int a1);
LONG __stdcall CWebContainer::AddRef(int a1);
HRESULT __stdcall CWebContainer::QueryInterface(int a1, _GUID *a2, void **a3);
LONG __stdcall CWebContainer::AddRef(int a1);
HRESULT __stdcall CWebContainer::ContextSensitiveHelp(int a1, unsigned int *a2);
HRESULT __stdcall CWebContainer::QueryInterface(int a1, _GUID *a2, void **a3);
HRESULT __stdcall CWebContainer::QueryInterface(int a1, _GUID *a2, void **a3);
HRESULT __stdcall CWebContainer::QueryInterface(int a1, _GUID *a2, void **a3);
HRESULT __stdcall CWebContainer::GetWindow(int a1, HWND__ **a2);
HRESULT __stdcall CWebEventSink::QueryInterface(CWebEventSink *this, _GUID *riid, void **ppv); // idb
LONG __stdcall CWebEventSink::Release(CWebEventSink *this);
LONG __stdcall CWebContainer::Release(CWebContainer *this);
LONG __stdcall CWebContainer::Release(int a1);
LONG __stdcall CWebContainer::Release(int a1);
LONG __stdcall CWebContainer::Release(int a1);
LONG __stdcall CWebContainer::Release(int a1);
// HRESULT __usercall D3DUtil_LoadDeviceCursor@<eax>(HICON__ *hCursor@<ecx>, IDirect3DSurface9 **rpkSurf@<edx>, IDirect3DDevice9 *pd3dDevice, bool bAddWatermark);
Cursor::Type __cdecl Cursor::GetCursor(); // idb
bool __cdecl Cursor::GetEnableHardware(); // idb
void __cdecl Cursor::ReleaseSystemCursor(); // idb
void __cdecl Cursor::ReleaseHWCurRes(); // idb
PgCursor *__cdecl Cursor::GetPgCursor(); // idb
void __cdecl Cursor::UpdateGraphicCursorPos(int iXPos, int iYPos); // idb
void __cdecl Cursor::SetGraphicCursorInfo(Cursor::Type eType, int iTexOffLeft, int iTexOffTop); // idb
void __cdecl Cursor::TerminateGraphicCursor(); // idb
char __cdecl Cursor::SetGraphicCursor(Cursor::Type eType);
void __cdecl Cursor::ShowGraphicCursor(int bShow);
void __cdecl Cursor::DrawGraphicCursor(); // idb
void __cdecl Cursor::InvalidateDropIcon(); // idb
void __cdecl Cursor::SetCursorPos(int iXPos, int iYPos); // idb
void __cdecl Cursor::Draw(); // idb
char __cdecl Cursor::CreateSystemCursor();
char __cdecl Cursor::CreateHWCurRes();
bool __cdecl Cursor::ResetHardwareCursor(Cursor::Type eType); // idb
void __cdecl Cursor::ShowHardwareCursor(bool bShow); // idb
void __cdecl Cursor::SetHardwareCursorPos(int iXPos, int iYPos); // idb
// void __usercall PutCursorOnTexture(int a1@<ebx>, int a2@<esi>, IDirect3DSurface9 *pkSurf, int iXOff, int iYOff, NiSourceTexture *pkTex);
bool __cdecl Cursor::InitGraphicCursor(); // idb
char __cdecl Cursor::IsHWCursorSupport();
void __cdecl Cursor::ShowCursor(int bShow);
void __cdecl Cursor::OnResetDevice(); // idb
bool __cdecl Cursor::InitHardwareCursor(); // idb
void __cdecl Cursor::TerminateHardwareCursor(); // idb
bool __cdecl Cursor::SetHardwareCursor(Cursor::Type eType); // idb
void __cdecl Cursor::Show(int bShow);
void __cdecl Cursor::Terminate(); // idb
bool __cdecl Cursor::SetCursor(Cursor::Type eType); // idb
void __cdecl Cursor::EnableHardware(bool bEnable); // idb
void __cdecl Cursor::SwitchCursor(); // idb
void __cdecl Cursor::Update();
char __cdecl Cursor::Init();
void __thiscall NiAlphaProperty::SetBit(NiAlphaProperty *this, bool bVal, unsigned __int16 uMask); // idb
void __thiscall NiZBufferProperty::NiZBufferProperty(NiZBufferProperty *this); // idb
NiRTTI *NiZBufferProperty::GetRTTI();
void __thiscall CursorState::SetState(CursorState *this, CursorState::CURSORSTATE eState); // idb
void CursorState::CancelPutOnBelongClear();
// void __thiscall CursorState::CursorState(CursorState *this); idb
void __thiscall CursorState::~CursorState(CursorState *this); // idb
void __thiscall CursorState::CancelState(CursorState *this, CursorState::CURSORSTATE e); // idb
CursorState *__thiscall Singleton<CursorState>::`scalar deleting destructor'(CursorState *this, unsigned int a2);
void GlobalTokens::GlobalTokens();
void _loclog(char *acMsg, ...); // idb
char __cdecl _loclog_init(char *acDirName, char *acLogFileName, char *acDescriptor);
int __cdecl _purecall(); // idb
MainApp *__cdecl MainApp::GetMainAppInstance(); // idb
int __stdcall EnumMyWndProc(HWND__ *hWnd, int lParam); // idb
int __cdecl MinimizeProcess();
void __thiscall MainApp::Terminate(MainApp *this); // idb
bool __thiscall MainApp::MeasureTime(MainApp *this); // idb
void __thiscall MainApp::EnableInput(MainApp *this, bool bEnable); // idb
void __thiscall MainApp::ProcessInput(MainApp *this); // idb
void __cdecl LoadSoundOption(); // idb
void __cdecl LogZBufferState(PgWin *pkWin); // idb
void __thiscall MainApp::DisplaySplash(MainApp *this, const char *pcName, const char *pcProgressBarName, int LoadingRate); // idb
void __thiscall MainApp::ChangeDisplayMode(MainApp *this); // idb
// void __usercall MainApp::OnIdle(MainApp *this@<ecx>, int a2@<ebx>);
bool MainApp::CheckSpawnApps();
void SetupExceptionHandler();
void __thiscall MainApp::MainApp(MainApp *this); // idb
char __thiscall MainApp::Initialize(MainApp *this);
void __cdecl NiApplication::Create();
void __cdecl Singleton<LuaScriptMgr>::getInstance();
void __thiscall NiTexturingProperty::SetBaseClampMode(NiTexturingProperty *this, NiTexturingProperty::ClampMode eMode); // idb
void __thiscall Server::SetLoginAddr(Server *this, char *pcAddr); // idb
bool __thiscall NiRenderer::BeginUsingDefaultRenderTargetGroup(NiRenderer *this, unsigned int uiClearMode); // idb
TextData *__thiscall TextData::`vector deleting destructor'(TextData *this, unsigned int a2);
void __thiscall TextData::TextData(TextData *this); // idb
void __thiscall TextData2::TextData2(TextData2 *this); // idb
TextData2 *__thiscall TextData2::`scalar deleting destructor'(TextData2 *this, unsigned int a2);
void __thiscall TextData3::TextData3(TextData3 *this); // idb
TextData3 *__thiscall TextData3::`scalar deleting destructor'(TextData3 *this, unsigned int a2);
bool __cdecl ITableBase<TextDataType,TextData>::Load(char *acFn);
bool __cdecl ITableBase<TextDataType2,TextData2>::Load(char *acFn);
bool __cdecl ITableBase<TextDataType3,TextData3>::Load(char *acFn);
MainApp *__thiscall MainApp::`scalar deleting destructor'(MainApp *this, unsigned int a2);
char __cdecl MainApp::CheckWindowLocale();
// void __usercall SetImeNativeModeFalse(HWND__ *hWnd@<edi>);
char __stdcall MainApp::OnIme(NiEventRecord *pEventRecord);
bool __cdecl WeaponTitleTab::Load(char *pcFn); // idb
bool __stdcall MainApp::OnWindowDestroy(HWND__ *pWnd, bool bOption);
void __cdecl MainApp::InitError(char *pcErrMsg); // idb
void __thiscall MainApp::TerminateInput(MainApp *this); // idb
bool __stdcall MainApp::IsSkipDraw(float fCurTime);
void MainApp::TerminateGameData();
void __stdcall MainApp::OnWindowActivate(HDC__ *pDrawContext, bool bActivate);
char __thiscall MainApp::InitAppHandle(MainApp *this);
void __thiscall MainApp::ProcessCommandLineBeforInit(MainApp *this); // idb
bool __stdcall MainApp::CheckDisplayCard(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiMultisample, int bFullScreen);
void __thiscall MainApp::SetWinMinimized(MainApp *this); // idb
char __thiscall MainApp::InitInput(MainApp *this);
void __thiscall MainApp::SetupWindow(MainApp *this); // idb
void __thiscall MainApp::SetWinMaxmized(MainApp *this); // idb
void __thiscall MainApp::SetWinNormal(MainApp *this); // idb
void __thiscall MainApp::ReCreateRenderer(MainApp *this); // idb
bool __thiscall MainApp::OnDefault(MainApp *this, NiEventRecord *pEventRecord); // idb
void __thiscall MainApp::ProcessCommandLine(MainApp *this); // idb
void __thiscall MainApp::~MainApp(MainApp *this); // idb
char __thiscall MainApp::InitGameData(MainApp *this);
void __thiscall Name3::Name3(Name3 *this, const char *str); // idb
char __thiscall IIDTableBase<PassiveSkillInfo,PasSkillInfoTab,unsigned short>::DataProcess(IIDTableBase<SubAbStateInfo,SubAbStateInfoTab,unsigned short> *this);
void __thiscall ITableBase<TextDataType3,TextData3>::BeforeTerminate(NiUnsharedGeometryGroup *this); // idb
CharRace *__thiscall ITableBase<RaceName,CharRace>::`scalar deleting destructor'(CharRace *this, unsigned int a2);
ITableBase<MapInfo,MapInfoTab> *__thiscall ITableBase<MapInfo,MapInfoTab>::`scalar deleting destructor'(ITableBase<MapInfo,MapInfoTab> *this, unsigned int a2);
MapInfoTab *__thiscall MapInfoTab::`vector deleting destructor'(MapInfoTab *this, unsigned int a2);
ITableBase<MapViewInfo,MapViewInfoTab> *__thiscall ITableBase<MapViewInfo,MapViewInfoTab>::`vector deleting destructor'(ITableBase<MapViewInfo,MapViewInfoTab> *this, unsigned int a2);
ITableBase<UpGradeInfo,UpGradeInfoTab> *__thiscall ITableBase<UpGradeInfo,UpGradeInfoTab>::`scalar deleting destructor'(ITableBase<UpGradeInfo,UpGradeInfoTab> *this, unsigned int a2);
UpGradeInfoTab *__thiscall IIDTableBase<UpGradeInfo,UpGradeInfoTab,unsigned short>::`scalar deleting destructor'(UpGradeInfoTab *this, unsigned int a2);
ITableBase<ActionViewInfo,ActionViewTable> *__thiscall ITableBase<ActionViewInfo,ActionViewTable>::`scalar deleting destructor'(ITableBase<ActionViewInfo,ActionViewTable> *this, unsigned int a2);
ActionViewTable *__thiscall ActionViewTable::`scalar deleting destructor'(ActionViewTable *this, unsigned int a2);
ProduceInfoTable *__thiscall ITableBase<ProduceInfo,ProduceInfoTable>::`scalar deleting destructor'(ProduceInfoTable *this, unsigned int a2);
ProduceViewInfoTable *__thiscall ProduceViewInfoTable::`vector deleting destructor'(ProduceViewInfoTable *this, unsigned int a2);
NpcDialogDataTable *__thiscall NpcDialogDataTable::`scalar deleting destructor'(NpcDialogDataTable *this, unsigned int a2);
GradeItemOptionTab *__thiscall GradeItemOptionTab::`scalar deleting destructor'(GradeItemOptionTab *this, unsigned int a2);
MiniHouseTable *__thiscall ITableBase<MiniHouse,MiniHouseTable>::`scalar deleting destructor'(MiniHouseTable *this, unsigned int a2);
ItemShopViewTable *__thiscall ItemShopViewTable::`vector deleting destructor'(ItemShopViewTable *this, unsigned int a2);
ITableBase<RIDING,RidePetTable> *__thiscall ITableBase<RIDING,RidePetTable>::`vector deleting destructor'(ITableBase<RIDING,RidePetTable> *this, unsigned int a2);
WorldMapAvatarInfoTab *__thiscall WorldMapAvatarInfoTab::`vector deleting destructor'(WorldMapAvatarInfoTab *this, unsigned int a2);
ActionEffectItemTab *__thiscall ActionEffectItemTab::`scalar deleting destructor'(ActionEffectItemTab *this, unsigned int a2);
ItemActionTab *__thiscall ITableBase<ItemAction,ItemActionTab>::`vector deleting destructor'(ItemActionTab *this, unsigned int a2);
ItemActionEffectTab *__thiscall ItemActionEffectTab::`scalar deleting destructor'(ItemActionEffectTab *this, unsigned int a2);
ItemActionConditionTab *__thiscall ItemActionConditionTab::`scalar deleting destructor'(ItemActionConditionTab *this, unsigned int a2);
GBHouseTab *__thiscall GBHouseTab::`scalar deleting destructor'(GBHouseTab *this, unsigned int a2);
CharacterTitleStateViewTab *__thiscall CharacterTitleStateViewTab::`vector deleting destructor'(CharacterTitleStateViewTab *this, unsigned int a2);
ITableBase<MobCoordinate,MobCoordinateTab> *__thiscall ITableBase<MobCoordinate,MobCoordinateTab>::`vector deleting destructor'(ITableBase<MobCoordinate,MobCoordinateTab> *this, unsigned int a2);
ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab> *__thiscall ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::`scalar deleting destructor'(ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab> *this, unsigned int a2);
GTIViewInfoTab *__thiscall ITableBase<GTIView,GTIViewInfoTab>::`vector deleting destructor'(GTIViewInfoTab *this, unsigned int a2);
MapWayPointTab *__thiscall MapWayPointTab::`vector deleting destructor'(MapWayPointTab *this, unsigned int a2);
MapLinkPointTab *__thiscall ITableBase<MapLinkPoint,MapLinkPointTab>::`vector deleting destructor'(MapLinkPointTab *this, unsigned int a2);
BelongTypeInfoTab *__thiscall ITableBase<BelongTypeInfo,BelongTypeInfoTab>::`vector deleting destructor'(BelongTypeInfoTab *this, unsigned int a2);
ITableBase<ChargedIconItem,ChargedIconItemTab> *__thiscall ITableBase<ChargedIconItem,ChargedIconItemTab>::`scalar deleting destructor'(ITableBase<ChargedIconItem,ChargedIconItemTab> *this, unsigned int a2);
ITableBase<ChargedMessageItem,ChargedMsgItemTab> *__thiscall ITableBase<ChargedMessageItem,ChargedMsgItemTab>::`vector deleting destructor'(ITableBase<ChargedMessageItem,ChargedMsgItemTab> *this, unsigned int a2);
ChargedMsgItemTab *__thiscall IIDTableBase<ChargedMessageItem,ChargedMsgItemTab,unsigned short>::`scalar deleting destructor'(ChargedMsgItemTab *this, unsigned int a2);
BasicInfoTipTab *__thiscall ITableBase<BasicInfoTip,BasicInfoTipTab>::`scalar deleting destructor'(BasicInfoTipTab *this, unsigned int a2);
BasicInfoTipCycleTab *__thiscall ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>::`vector deleting destructor'(BasicInfoTipCycleTab *this, unsigned int a2);
BasicInfoFindUITab *__thiscall BasicInfoFindUITab::`vector deleting destructor'(BasicInfoFindUITab *this, unsigned int a2);
CollectCardRewardTab *__thiscall ITableBase<CollectCardReward,CollectCardRewardTab>::`vector deleting destructor'(CollectCardRewardTab *this, unsigned int a2);
ITableBase<AttendReward,AttendRewardTab> *__thiscall ITableBase<AttendReward,AttendRewardTab>::`vector deleting destructor'(ITableBase<AttendReward,AttendRewardTab> *this, unsigned int a2);
AttendRewardTab *__thiscall IIDTableBase<AttendReward,AttendRewardTab,unsigned short>::`scalar deleting destructor'(AttendRewardTab *this, unsigned int a2);
MoverMainTab *__thiscall MoverMainTab::`scalar deleting destructor'(MoverMainTab *this, unsigned int a2);
MoverHGTab *__thiscall ITableBase<MoverHG,MoverHGTab>::`vector deleting destructor'(MoverHGTab *this, unsigned int a2);
MoverViewTab *__thiscall MoverViewTab::`vector deleting destructor'(MoverViewTab *this, unsigned int a2);
MoverAbilityTab *__thiscall ITableBase<MoverAbility,MoverAbilityTab>::`scalar deleting destructor'(MoverAbilityTab *this, unsigned int a2);
PetViewTab *__thiscall PetViewTab::`scalar deleting destructor'(PetViewTab *this, unsigned int a2);
KQVoteMajorityRateTable *__thiscall ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::`vector deleting destructor'(KQVoteMajorityRateTable *this, unsigned int a2);
MobConditionViewTab *__thiscall MobConditionViewTab::`vector deleting destructor'(MobConditionViewTab *this, unsigned int a2);
MarketSearchInfoTab *__thiscall MarketSearchInfoTab::`scalar deleting destructor'(MarketSearchInfoTab *this, unsigned int a2);
TermExtendMatchGroupDescTable *__thiscall ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>::`scalar deleting destructor'(TermExtendMatchGroupDescTable *this, unsigned int a2);
MinimonInfoTable *__thiscall MinimonInfoTable::`scalar deleting destructor'(MinimonInfoTable *this, unsigned int a2);
MinimonAutoUseItemTable *__thiscall MinimonAutoUseItemTable::`scalar deleting destructor'(MinimonAutoUseItemTable *this, unsigned int a2);
ChrBasicEquipTab *__thiscall ChrBasicEquipTab::`vector deleting destructor'(ChrBasicEquipTab *this, unsigned int a2);
ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab> *__thiscall ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::`vector deleting destructor'(ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab> *this, unsigned int a2);
bool __stdcall IIDTableBase<ActiveSkillViewInfo,ActSkillViewInfoTab,unsigned short>::IsValidID(unsigned __int16 ID);
ColorInfoTable *__thiscall ITableBase<ColorInfoType,ColorInfoTable>::`scalar deleting destructor'(ColorInfoTable *this, unsigned int a2);
ITableBase<ItemInfo,ItemInfoTab> *__thiscall ITableBase<ItemInfo,ItemInfoTab>::`vector deleting destructor'(ITableBase<ItemInfo,ItemInfoTab> *this, unsigned int a2);
ItemInfoTab *__thiscall IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::`scalar deleting destructor'(ItemInfoTab *this, unsigned int a2);
ITableBase<ItemViewInfo,ItemViewInfoTab> *__thiscall ITableBase<ItemViewInfo,ItemViewInfoTab>::`scalar deleting destructor'(ITableBase<ItemViewInfo,ItemViewInfoTab> *this, unsigned int a2);
ItemViewInfoTab *__thiscall ItemViewInfoTab::`vector deleting destructor'(ItemViewInfoTab *this, unsigned int a2);
ItemViewEquipTypeInfoTab *__thiscall ItemViewEquipTypeInfoTab::`scalar deleting destructor'(ItemViewEquipTypeInfoTab *this, unsigned int a2);
ItemMoneyTab *__thiscall ITableBase<ItemMoney,ItemMoneyTab>::`vector deleting destructor'(ItemMoneyTab *this, unsigned int a2);
CharClass *__thiscall ITableBase<ClassName,CharClass>::`vector deleting destructor'(CharClass *this, unsigned int a2);
ActionEffectInfoTab *__thiscall ActionEffectInfoTab::`scalar deleting destructor'(ActionEffectInfoTab *this, unsigned int a2);
HairInfoTab *__thiscall HairInfoTab::`vector deleting destructor'(HairInfoTab *this, unsigned int a2);
HairColorInfoTab *__thiscall ITableBase<HairColorInfo,HairColorInfoTab>::`vector deleting destructor'(HairColorInfoTab *this, unsigned int a2);
ITableBase<MobInfo,MobInfoTab> *__thiscall ITableBase<MobInfo,MobInfoTab>::`vector deleting destructor'(ITableBase<MobInfo,MobInfoTab> *this, unsigned int a2);
ITableBase<MobViewInfo,MobViewInfoTab> *__thiscall ITableBase<MobViewInfo,MobViewInfoTab>::`scalar deleting destructor'(ITableBase<MobViewInfo,MobViewInfoTab> *this, unsigned int a2);
MobViewInfoTab *__thiscall MobViewInfoTab::`vector deleting destructor'(MobViewInfoTab *this, unsigned int a2);
NPCViewInfoTab *__thiscall NPCViewInfoTab::`scalar deleting destructor'(NPCViewInfoTab *this, unsigned int a2);
ShakeEffectViewInfoTab *__thiscall ShakeEffectViewInfoTab::`scalar deleting destructor'(ShakeEffectViewInfoTab *this, unsigned int a2);
MiniHouseFuritureInfoTab *__thiscall MiniHouseFuritureInfoTab::`vector deleting destructor'(MiniHouseFuritureInfoTab *this, unsigned int a2);
MiniHouseEmotionTab *__thiscall MiniHouseEmotionTab::`vector deleting destructor'(MiniHouseEmotionTab *this, unsigned int a2);
ITableBase<AbnormalStateInfo,AbnormalStateInfoTab> *__thiscall ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::`vector deleting destructor'(ITableBase<AbnormalStateInfo,AbnormalStateInfoTab> *this, unsigned int a2);
ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab> *__thiscall ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::`vector deleting destructor'(ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab> *this, unsigned int a2);
AbnormalStateViewInfoTab *__thiscall AbnormalStateViewInfoTab::`scalar deleting destructor'(AbnormalStateViewInfoTab *this, unsigned int a2);
ITableBase<SubAbStateInfo,SubAbStateInfoTab> *__thiscall ITableBase<SubAbStateInfo,SubAbStateInfoTab>::`vector deleting destructor'(ITableBase<SubAbStateInfo,SubAbStateInfoTab> *this, unsigned int a2);
FaceCutMsgTab *__thiscall FaceCutMsgTab::`vector deleting destructor'(FaceCutMsgTab *this, unsigned int a2);
void __thiscall std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::_Splice_same(std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > *this, std::_List_const_iterator<std::_List_val<ItemViewDummy *,std::allocator<ItemViewDummy *> > > _Where, std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > *_Right, std::_List_const_iterator<std::_List_val<ItemViewDummy *,std::allocator<ItemViewDummy *> > > _First, std::_List_const_iterator<std::_List_val<ItemViewDummy *,std::allocator<ItemViewDummy *> > > _Last, unsigned int _Count); // idb
char __cdecl CharClass::GetClassIDByEngName(char *pcEngName); // idb
void __thiscall std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>::_Splice_same(std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > *this, std::_List_const_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > > _Where, std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > *_Right, std::_List_const_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > > _First, std::_List_const_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > > _Last, unsigned int _Count); // idb
std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *__stdcall std::_List_val<char *,std::allocator<char *>>::_Buynode(std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *_Next, std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *_Prev, ItemViewDummy *const *_Val);
void __thiscall ColorInfoTable::ColorInfoTable(ColorInfoTable *this); // idb
bool ColorInfoTable::DataProcess();
void __thiscall ItemViewEquipTypeInfoTab::ItemViewEquipTypeInfoTab(ItemViewEquipTypeInfoTab *this); // idb
void __thiscall ItemMoneyTab::ItemMoneyTab(ItemMoneyTab *this); // idb
void __thiscall CharClass::CharClass(CharClass *this); // idb
void __thiscall ActionEffectInfoTab::ActionEffectInfoTab(ActionEffectInfoTab *this); // idb
void __thiscall HairInfoTab::HairInfoTab(HairInfoTab *this); // idb
void __thiscall HairColorInfoTab::HairColorInfoTab(HairColorInfoTab *this); // idb
void __thiscall NPCViewInfoTab::NPCViewInfoTab(NPCViewInfoTab *this); // idb
void __thiscall ShakeEffectViewInfoTab::ShakeEffectViewInfoTab(ShakeEffectViewInfoTab *this); // idb
void __thiscall MHFurnitureObjEffectTab::MHFurnitureObjEffectTab(MHFurnitureObjEffectTab *this); // idb
MHFurnitureObjEffectTab *__thiscall ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::`scalar deleting destructor'(MHFurnitureObjEffectTab *this, unsigned int a2);
void __thiscall MiniHouseObjAniInfoTab::MiniHouseObjAniInfoTab(MiniHouseObjAniInfoTab *this); // idb
MiniHouseObjAniInfoTab *__thiscall ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::`vector deleting destructor'(MiniHouseObjAniInfoTab *this, unsigned int a2);
void __thiscall MiniHouseEndureInfoTable::MiniHouseEndureInfoTable(MiniHouseEndureInfoTable *this); // idb
MiniHouseEndureInfoTable *__thiscall MiniHouseEndureInfoTable::`vector deleting destructor'(MiniHouseEndureInfoTable *this, unsigned int a2);
void __thiscall MiniHouseFuritureInfoTab::MiniHouseFuritureInfoTab(MiniHouseFuritureInfoTab *this); // idb
void __thiscall MiniHouseEmotionTab::MiniHouseEmotionTab(MiniHouseEmotionTab *this); // idb
void __thiscall UpEffectTab::UpEffectTab(UpEffectTab *this); // idb
UpEffectTab *__thiscall UpEffectTab::`vector deleting destructor'(UpEffectTab *this, unsigned int a2);
void __thiscall ScriptMsgTab::ScriptMsgTab(ScriptMsgTab *this); // idb
ScriptMsgTab *__thiscall ScriptMsgTab::`vector deleting destructor'(ScriptMsgTab *this, unsigned int a2);
void __thiscall ChargedEffectTable::ChargedEffectTable(ChargedEffectTable *this); // idb
ChargedEffectTable *__thiscall ChargedEffectTable::`scalar deleting destructor'(ChargedEffectTable *this, unsigned int a2);
void __thiscall CharRace::CharRace(CharRace *this); // idb
void __thiscall FaceInfoTab::FaceInfoTab(FaceInfoTab *this); // idb
FaceInfoTab *__thiscall FaceInfoTab::`scalar deleting destructor'(FaceInfoTab *this, unsigned int a2);
void __thiscall DmgSndTab::DmgSndTab(DmgSndTab *this); // idb
DmgSndTab *__thiscall ITableBase<DmgSndMapByArmorType,DmgSndTab>::`scalar deleting destructor'(DmgSndTab *this, unsigned int a2);
void __thiscall ProduceInfoTable::ProduceInfoTable(ProduceInfoTable *this); // idb
void __thiscall GatherInfoTable::GatherInfoTable(GatherInfoTable *this); // idb
GatherInfoTable *__thiscall GatherInfoTable::`vector deleting destructor'(GatherInfoTable *this, unsigned int a2);
void __thiscall KQDescTable::KQDescTable(KQDescTable *this); // idb
KQDescTable *__thiscall ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::`scalar deleting destructor'(KQDescTable *this, unsigned int a2);
void __thiscall ProduceViewInfoTable::ProduceViewInfoTable(ProduceViewInfoTable *this); // idb
void __thiscall NpcDialogDataTable::NpcDialogDataTable(NpcDialogDataTable *this); // idb
void __thiscall GradeItemOptionTab::GradeItemOptionTab(GradeItemOptionTab *this); // idb
void __thiscall MiniHouseTable::MiniHouseTable(MiniHouseTable *this); // idb
void __thiscall ItemShopViewTable::ItemShopViewTable(ItemShopViewTable *this); // idb
void __thiscall WeaponAttribTab::WeaponAttribTab(WeaponAttribTab *this); // idb
WeaponAttribTab *__thiscall WeaponAttribTab::`vector deleting destructor'(WeaponAttribTab *this, unsigned int a2);
void __thiscall WorldMapAvatarInfoTab::WorldMapAvatarInfoTab(WorldMapAvatarInfoTab *this); // idb
void __thiscall ItemDismantleTab::ItemDismantleTab(ItemDismantleTab *this); // idb
ItemDismantleTab *__thiscall ITableBase<ItemDismantle,ItemDismantleTab>::`vector deleting destructor'(ItemDismantleTab *this, unsigned int a2);
void __thiscall TownPortalInfoTable::TownPortalInfoTable(TownPortalInfoTable *this); // idb
TownPortalInfoTable *__thiscall TownPortalInfoTable::`scalar deleting destructor'(TownPortalInfoTable *this, unsigned int a2);
void __thiscall SetItemNameTab::SetItemNameTab(SetItemNameTab *this); // idb
SetItemNameTab *__thiscall ITableBase<SetItemName,SetItemNameTab>::`scalar deleting destructor'(SetItemNameTab *this, unsigned int a2);
void __thiscall ItemActionEffectDescTab::ItemActionEffectDescTab(ItemActionEffectDescTab *this); // idb
ItemActionEffectDescTab *__thiscall ItemActionEffectDescTab::`scalar deleting destructor'(ItemActionEffectDescTab *this, unsigned int a2);
void __thiscall SetEffectTab::SetEffectTab(SetEffectTab *this); // idb
SetEffectTab *__thiscall ITableBase<SetEffect,SetEffectTab>::`vector deleting destructor'(SetEffectTab *this, unsigned int a2);
void __thiscall ActionEffectItemTab::ActionEffectItemTab(ActionEffectItemTab *this); // idb
void __thiscall ItemActionTab::ItemActionTab(ItemActionTab *this); // idb
void __thiscall ItemActionEffectTab::ItemActionEffectTab(ItemActionEffectTab *this); // idb
void __thiscall ItemActionConditionTab::ItemActionConditionTab(ItemActionConditionTab *this); // idb
void __thiscall GuildTournamentStateDescTab::GuildTournamentStateDescTab(GuildTournamentStateDescTab *this); // idb
GuildTournamentStateDescTab *__thiscall GuildTournamentStateDescTab::`vector deleting destructor'(GuildTournamentStateDescTab *this, unsigned int a2);
void __thiscall GuildTournamentStateTab::GuildTournamentStateTab(GuildTournamentStateTab *this); // idb
GuildTournamentStateTab *__thiscall GuildTournamentStateTab::`vector deleting destructor'(GuildTournamentStateTab *this, unsigned int a2);
void __thiscall GTRequireTab::GTRequireTab(GTRequireTab *this); // idb
GTRequireTab *__thiscall ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::`scalar deleting destructor'(GTRequireTab *this, unsigned int a2);
void __thiscall DiceDividIndTab::DiceDividIndTab(DiceDividIndTab *this); // idb
DiceDividIndTab *__thiscall DiceDividIndTab::`vector deleting destructor'(DiceDividIndTab *this, unsigned int a2);
void __thiscall GBDiceDividIndTab::GBDiceDividIndTab(GBDiceDividIndTab *this); // idb
GBDiceDividIndTab *__thiscall GBDiceDividIndTab::`scalar deleting destructor'(GBDiceDividIndTab *this, unsigned int a2);
void __thiscall GBHouseTab::GBHouseTab(GBHouseTab *this); // idb
void __thiscall MobRandomIdleAniTab::MobRandomIdleAniTab(MobRandomIdleAniTab *this); // idb
MobRandomIdleAniTab *__thiscall MobRandomIdleAniTab::`scalar deleting destructor'(MobRandomIdleAniTab *this, unsigned int a2);
void __thiscall CharacterTitleStateViewTab::CharacterTitleStateViewTab(CharacterTitleStateViewTab *this); // idb
void __thiscall GTIViewInfoTab::GTIViewInfoTab(GTIViewInfoTab *this); // idb
void __thiscall DamageEffectTab::DamageEffectTab(DamageEffectTab *this); // idb
DamageEffectTab *__thiscall DamageEffectTab::`vector deleting destructor'(DamageEffectTab *this, unsigned int a2);
void __thiscall ActiveSkillGroupTab::ActiveSkillGroupTab(ActiveSkillGroupTab *this); // idb
ActiveSkillGroupTab *__thiscall ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::`scalar deleting destructor'(ActiveSkillGroupTab *this, unsigned int a2);
void __thiscall MapWayPointTab::MapWayPointTab(MapWayPointTab *this); // idb
void __thiscall MapLinkPointTab::MapLinkPointTab(MapLinkPointTab *this); // idb
void __thiscall BelongTypeInfoTab::BelongTypeInfoTab(BelongTypeInfoTab *this); // idb
void __thiscall ChargedDeletableBuffTab::ChargedDeletableBuffTab(ChargedDeletableBuffTab *this); // idb
ChargedDeletableBuffTab *__thiscall ChargedDeletableBuffTab::`vector deleting destructor'(ChargedDeletableBuffTab *this, unsigned int a2);
void __thiscall BasicInfoTitleTab::BasicInfoTitleTab(BasicInfoTitleTab *this); // idb
BasicInfoTitleTab *__thiscall BasicInfoTitleTab::`vector deleting destructor'(BasicInfoTitleTab *this, unsigned int a2);
void __thiscall BasicInfoLinkTab::BasicInfoLinkTab(BasicInfoLinkTab *this); // idb
BasicInfoLinkTab *__thiscall BasicInfoLinkTab::`vector deleting destructor'(BasicInfoLinkTab *this, unsigned int a2);
void __thiscall BasicInfoTipTab::BasicInfoTipTab(BasicInfoTipTab *this); // idb
void __thiscall BasicInfoTipCycleTab::BasicInfoTipCycleTab(BasicInfoTipCycleTab *this); // idb
void __thiscall BasicInfoFindTab::BasicInfoFindTab(BasicInfoFindTab *this); // idb
BasicInfoFindTab *__thiscall ITableBase<BasicInfoFind,BasicInfoFindTab>::`vector deleting destructor'(BasicInfoFindTab *this, unsigned int a2);
void __thiscall BasicInfoFindUITab::BasicInfoFindUITab(BasicInfoFindUITab *this); // idb
void __thiscall BasicInfoFindWordTab::BasicInfoFindWordTab(BasicInfoFindWordTab *this); // idb
BasicInfoFindWordTab *__thiscall BasicInfoFindWordTab::`scalar deleting destructor'(BasicInfoFindWordTab *this, unsigned int a2);
void __thiscall CollectCardTab::CollectCardTab(CollectCardTab *this); // idb
CollectCardTab *__thiscall CollectCardTab::`scalar deleting destructor'(CollectCardTab *this, unsigned int a2);
void __thiscall CollectCardViewTab::CollectCardViewTab(CollectCardViewTab *this); // idb
CollectCardViewTab *__thiscall CollectCardViewTab::`scalar deleting destructor'(CollectCardViewTab *this, unsigned int a2);
void __thiscall CollectCardGroupDescTab::CollectCardGroupDescTab(CollectCardGroupDescTab *this); // idb
CollectCardGroupDescTab *__thiscall CollectCardGroupDescTab::`scalar deleting destructor'(CollectCardGroupDescTab *this, unsigned int a2);
void __thiscall CollectCardRewardTab::CollectCardRewardTab(CollectCardRewardTab *this); // idb
void __thiscall CollectCardTitleTab::CollectCardTitleTab(CollectCardTitleTab *this); // idb
CollectCardTitleTab *__thiscall CollectCardTitleTab::`vector deleting destructor'(CollectCardTitleTab *this, unsigned int a2);
void __thiscall MoverMainTab::MoverMainTab(MoverMainTab *this); // idb
void __thiscall MoverUseSkillTab::MoverUseSkillTab(MoverUseSkillTab *this); // idb
MoverUseSkillTab *__thiscall ITableBase<MoverUseSkill,MoverUseSkillTab>::`vector deleting destructor'(MoverUseSkillTab *this, unsigned int a2);
void __thiscall MoverHGTab::MoverHGTab(MoverHGTab *this); // idb
void __thiscall MoverViewTab::MoverViewTab(MoverViewTab *this); // idb
void __thiscall MoverSlotViewTab::MoverSlotViewTab(MoverSlotViewTab *this); // idb
MoverSlotViewTab *__thiscall MoverSlotViewTab::`vector deleting destructor'(MoverSlotViewTab *this, unsigned int a2);
void __thiscall MoverSlotCharAniTab::MoverSlotCharAniTab(MoverSlotCharAniTab *this); // idb
MoverSlotCharAniTab *__thiscall ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::`vector deleting destructor'(MoverSlotCharAniTab *this, unsigned int a2);
void __thiscall MoverAbilityTab::MoverAbilityTab(MoverAbilityTab *this); // idb
void __thiscall MoverItemTab::MoverItemTab(MoverItemTab *this); // idb
MoverItemTab *__thiscall ITableBase<MoverItem,MoverItemTab>::`vector deleting destructor'(MoverItemTab *this, unsigned int a2);
void __thiscall PetMainTab::PetMainTab(PetMainTab *this); // idb
PetMainTab *__thiscall ITableBase<PupMain,PetMainTab>::`vector deleting destructor'(PetMainTab *this, unsigned int a2);
void __thiscall PetViewTab::PetViewTab(PetViewTab *this); // idb
void __thiscall KQVoteDescTable::KQVoteDescTable(KQVoteDescTable *this); // idb
KQVoteDescTable *__thiscall KQVoteDescTable::`scalar deleting destructor'(KQVoteDescTable *this, unsigned int a2);
void __thiscall KQVoteMajorityRateTable::KQVoteMajorityRateTable(KQVoteMajorityRateTable *this); // idb
void __thiscall KQIsVoteTable::KQIsVoteTable(KQIsVoteTable *this); // idb
KQIsVoteTable *__thiscall ITableBase<KQIsVote,KQIsVoteTable>::`scalar deleting destructor'(KQIsVoteTable *this, unsigned int a2);
void __thiscall KQTeamTable::KQTeamTable(KQTeamTable *this); // idb
KQTeamTable *__thiscall KQTeamTable::`scalar deleting destructor'(KQTeamTable *this, unsigned int a2);
void __thiscall MobConditionViewTab::MobConditionViewTab(MobConditionViewTab *this); // idb
void __thiscall MobNoFadeInTab::MobNoFadeInTab(MobNoFadeInTab *this); // idb
MobNoFadeInTab *__thiscall ITableBase<MobNoFadeIn,MobNoFadeInTab>::`vector deleting destructor'(MobNoFadeInTab *this, unsigned int a2);
void __thiscall MarketSearchInfoTab::MarketSearchInfoTab(MarketSearchInfoTab *this); // idb
void __thiscall ChrCreateEquipTab::ChrCreateEquipTab(ChrCreateEquipTab *this); // idb
ChrCreateEquipTab *__thiscall ChrCreateEquipTab::`scalar deleting destructor'(ChrCreateEquipTab *this, unsigned int a2);
void __thiscall MoverUpgradeEffectTab::MoverUpgradeEffectTab(MoverUpgradeEffectTab *this); // idb
MoverUpgradeEffectTab *__thiscall MoverUpgradeEffectTab::`scalar deleting destructor'(MoverUpgradeEffectTab *this, unsigned int a2);
void __thiscall ChatColorTab::ChatColorTab(ChatColorTab *this); // idb
ChatColorTab *__thiscall ChatColorTab::`scalar deleting destructor'(ChatColorTab *this, unsigned int a2);
void __thiscall TermExtendMatchTable::TermExtendMatchTable(TermExtendMatchTable *this); // idb
TermExtendMatchTable *__thiscall ITableBase<TermExtendMatch,TermExtendMatchTable>::`scalar deleting destructor'(TermExtendMatchTable *this, unsigned int a2);
void __thiscall TermExtendMatchGroupDescTable::TermExtendMatchGroupDescTable(TermExtendMatchGroupDescTable *this); // idb
void __thiscall MinimonInfoTable::MinimonInfoTable(MinimonInfoTable *this); // idb
void __thiscall MinimonAutoUseItemTable::MinimonAutoUseItemTable(MinimonAutoUseItemTable *this); // idb
void __thiscall ItemViewDummyTab::ItemViewDummyTab(ItemViewDummyTab *this); // idb
ItemViewDummyTab *__thiscall ITableBase<ItemViewDummy,ItemViewDummyTab>::`vector deleting destructor'(ItemViewDummyTab *this, unsigned int a2);
void __thiscall UseCalssTypeTable::UseCalssTypeTable(UseCalssTypeTable *this); // idb
UseCalssTypeTable *__thiscall ITableBase<UseClassTypeInfo,UseCalssTypeTable>::`scalar deleting destructor'(UseCalssTypeTable *this, unsigned int a2);
void __thiscall ChrBasicEquipTab::ChrBasicEquipTab(ChrBasicEquipTab *this); // idb
std::_List_iterator<std::_List_val<float,std::allocator<float> > > *__thiscall std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::erase(std::list<float,std::allocator<float> > *this, std::_List_iterator<std::_List_val<float,std::allocator<float> > > *result, std::_List_const_iterator<std::_List_val<float,std::allocator<float> > > _Where); // idb
void __thiscall FaceCutMsgTab::FaceCutMsgTab(FaceCutMsgTab *this); // idb
bool __cdecl ITableBase<ColorInfoType,ColorInfoTable>::Load(char *acFn);
bool __cdecl ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::Load(char *acFn);
bool __cdecl ITableBase<ItemMoney,ItemMoneyTab>::Load(char *acFn);
bool __cdecl ITableBase<ClassName,CharClass>::Load(char *acFn);
bool __cdecl ITableBase<ActionEffectInfo,ActionEffectInfoTab>::Load(char *acFn);
bool __cdecl ITableBase<HairInfo,HairInfoTab>::Load(char *acFn);
bool __cdecl ITableBase<HairColorInfo,HairColorInfoTab>::Load(char *acFn);
bool __cdecl ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::Load(char *acFn);
bool __cdecl ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::Load(char *acFn);
bool __cdecl ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::Load(char *acFn);
bool __cdecl ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::Load(char *acFn);
bool __cdecl ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::Load(char *acFn);
bool __cdecl ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::Load(char *acFn);
bool __cdecl ITableBase<MHEmotion,MiniHouseEmotionTab>::Load(char *acFn);
bool __cdecl ITableBase<UpEffectData,UpEffectTab>::Load(char *acFn);
bool __cdecl ITableBase<ScriptMsg,ScriptMsgTab>::Load(char *acFn);
bool __cdecl ITableBase<ChargedItemEffect,ChargedEffectTable>::Load(char *acFn);
bool __cdecl ITableBase<RaceName,CharRace>::Load(char *acFn);
bool __cdecl ITableBase<FaceInfo,FaceInfoTab>::Load(char *acFn);
bool __cdecl ITableBase<DmgSndMapByArmorType,DmgSndTab>::Load(char *acFn);
bool __cdecl ITableBase<ProduceInfo,ProduceInfoTable>::Load(char *acFn);
bool __cdecl ITableBase<GatherInfo,GatherInfoTable>::Load(char *acFn);
bool __cdecl ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::Load(char *acFn);
bool __cdecl ITableBase<ProduceViewInfo,ProduceViewInfoTable>::Load(char *acFn);
bool __cdecl ITableBase<NpcDialogData,NpcDialogDataTable>::Load(char *acFn);
bool __cdecl ITableBase<GradeItemOption,GradeItemOptionTab>::Load(char *acFn);
bool __cdecl ITableBase<MiniHouse,MiniHouseTable>::Load(char *acFn);
bool __cdecl ITableBase<ItemShopView,ItemShopViewTable>::Load(char *acFn);
bool __cdecl ITableBase<WeaponAttrib,WeaponAttribTab>::Load(char *acFn);
bool __cdecl ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::Load(char *acFn);
bool __cdecl ITableBase<ItemDismantle,ItemDismantleTab>::Load(char *acFn);
bool __cdecl ITableBase<TownPortal,TownPortalInfoTable>::Load(char *acFn);
bool __cdecl ITableBase<SetItemName,SetItemNameTab>::Load(char *acFn);
bool __cdecl ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::Load(char *acFn);
bool __cdecl ITableBase<SetEffect,SetEffectTab>::Load(char *acFn);
bool __cdecl ITableBase<ActionEffectItem,ActionEffectItemTab>::Load(char *acFn);
bool __cdecl ITableBase<ItemAction,ItemActionTab>::Load(char *acFn);
bool __cdecl ITableBase<ItemActionEffect,ItemActionEffectTab>::Load(char *acFn);
bool __cdecl ITableBase<ItemActionCondition,ItemActionConditionTab>::Load(char *acFn);
bool __cdecl ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::Load(char *acFn);
bool __cdecl ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::Load(char *acFn);
bool __cdecl ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::Load(char *acFn);
bool __cdecl ITableBase<DICE_Dividind,DiceDividIndTab>::Load(char *acFn);
bool __cdecl ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::Load(char *acFn);
bool __cdecl ITableBase<GBHouse,GBHouseTab>::Load(char *acFn);
bool __cdecl ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::Load(char *acFn);
bool __cdecl ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::Load(char *acFn);
bool __cdecl ITableBase<GTIView,GTIViewInfoTab>::Load(char *acFn);
bool __cdecl ITableBase<DamageEffect,DamageEffectTab>::Load(char *acFn);
bool __cdecl ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::Load(char *acFn);
bool __cdecl ITableBase<MapWayPoint,MapWayPointTab>::Load(char *acFn);
bool __cdecl ITableBase<MapLinkPoint,MapLinkPointTab>::Load(char *acFn);
bool __cdecl ITableBase<BelongTypeInfo,BelongTypeInfoTab>::Load(char *acFn);
bool __cdecl ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>::Load(char *acFn);
bool __cdecl ITableBase<BasicInfoTitle,BasicInfoTitleTab>::Load(char *acFn);
bool __cdecl ITableBase<BasicInfoLink,BasicInfoLinkTab>::Load(char *acFn);
bool __cdecl ITableBase<BasicInfoTip,BasicInfoTipTab>::Load(char *acFn);
bool __cdecl ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>::Load(char *acFn);
bool __cdecl ITableBase<BasicInfoFind,BasicInfoFindTab>::Load(char *acFn);
bool __cdecl ITableBase<BasicInfoFindUI,BasicInfoFindUITab>::Load(char *acFn);
bool __cdecl ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::Load(char *acFn);
bool __cdecl ITableBase<CollectCard,CollectCardTab>::Load(char *acFn);
bool __cdecl ITableBase<CollectCardView,CollectCardViewTab>::Load(char *acFn);
bool __cdecl ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::Load(char *acFn);
bool __cdecl ITableBase<CollectCardReward,CollectCardRewardTab>::Load(char *acFn);
bool __cdecl ITableBase<CollectCardTitle,CollectCardTitleTab>::Load(char *acFn);
bool __cdecl ITableBase<MoverMain,MoverMainTab>::Load(char *acFn);
bool __cdecl ITableBase<MoverUseSkill,MoverUseSkillTab>::Load(char *acFn);
bool __cdecl ITableBase<MoverHG,MoverHGTab>::Load(char *acFn);
bool __cdecl ITableBase<MoverView,MoverViewTab>::Load(char *acFn);
bool __cdecl ITableBase<MoverSlotView,MoverSlotViewTab>::Load(char *acFn);
bool __cdecl ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::Load(char *acFn);
bool __cdecl ITableBase<MoverAbility,MoverAbilityTab>::Load(char *acFn);
bool __cdecl ITableBase<MoverItem,MoverItemTab>::Load(char *acFn);
bool __cdecl ITableBase<PupMain,PetMainTab>::Load(char *acFn);
bool __cdecl ITableBase<PupView,PetViewTab>::Load(char *acFn);
bool __cdecl ITableBase<KQVoteDesc,KQVoteDescTable>::Load(char *acFn);
bool __cdecl ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::Load(char *acFn);
bool __cdecl ITableBase<KQIsVote,KQIsVoteTable>::Load(char *acFn);
bool __cdecl ITableBase<KQTeam,KQTeamTable>::Load(char *acFn);
bool __cdecl ITableBase<MobConditionView,MobConditionViewTab>::Load(char *acFn);
bool __cdecl ITableBase<MobNoFadeIn,MobNoFadeInTab>::Load(char *acFn);
bool __cdecl ITableBase<MarketSearchInfo,MarketSearchInfoTab>::Load(char *acFn);
bool __cdecl ITableBase<ChrCreateEquip,ChrCreateEquipTab>::Load(char *acFn);
bool __cdecl ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::Load(char *acFn);
bool __cdecl ITableBase<ChatColor,ChatColorTab>::Load(char *acFn);
bool __cdecl ITableBase<TermExtendMatch,TermExtendMatchTable>::Load(char *acFn);
bool __cdecl ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>::Load(char *acFn);
bool __cdecl ITableBase<MinimonInfo,MinimonInfoTable>::Load(char *acFn);
bool __cdecl ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>::Load(char *acFn);
bool __cdecl ITableBase<ItemViewDummy,ItemViewDummyTab>::Load(char *acFn);
bool __cdecl ITableBase<UseClassTypeInfo,UseCalssTypeTable>::Load(char *acFn);
bool __cdecl ITableBase<ChrBasicEquip,ChrBasicEquipTab>::Load(char *acFn);
void __thiscall ItemInfoTab::ItemInfoTab(ItemInfoTab *this); // idb
void __thiscall ItemViewInfoTab::ItemViewInfoTab(ItemViewInfoTab *this); // idb
void __thiscall MobInfoTab::MobInfoTab(MobInfoTab *this); // idb
MobInfoTab *__thiscall IIDTableBase<MobInfo,MobInfoTab,unsigned short>::`vector deleting destructor'(MobInfoTab *this, unsigned int a2);
void __thiscall MobViewInfoTab::MobViewInfoTab(MobViewInfoTab *this); // idb
void __thiscall AbnormalStateInfoTab::AbnormalStateInfoTab(AbnormalStateInfoTab *this); // idb
AbnormalStateInfoTab *__thiscall AbnormalStateInfoTab::`vector deleting destructor'(AbnormalStateInfoTab *this, unsigned int a2);
void __thiscall AbnormalStateViewInfoTab::AbnormalStateViewInfoTab(AbnormalStateViewInfoTab *this); // idb
unsigned __int16 __stdcall PasSkillViewInfoTab::GetID(BRAccUpgradeInfo *pkRecord);
void __thiscall SubAbStateInfoTab::SubAbStateInfoTab(SubAbStateInfoTab *this); // idb
SubAbStateInfoTab *__thiscall SubAbStateInfoTab::`vector deleting destructor'(SubAbStateInfoTab *this, unsigned int a2);
void __thiscall MapInfoTab::MapInfoTab(MapInfoTab *this); // idb
void __thiscall MapViewInfoTab::MapViewInfoTab(MapViewInfoTab *this); // idb
MapViewInfoTab *__thiscall IIDTableBase<MapViewInfo,MapViewInfoTab,unsigned short>::`vector deleting destructor'(MapViewInfoTab *this, unsigned int a2);
void __thiscall UpGradeInfoTab::UpGradeInfoTab(UpGradeInfoTab *this); // idb
void __thiscall ActionViewTable::ActionViewTable(ActionViewTable *this); // idb
void __thiscall RidePetTable::RidePetTable(RidePetTable *this); // idb
RidePetTable *__thiscall RidePetTable::`vector deleting destructor'(RidePetTable *this, unsigned int a2);
void __thiscall MobCoordinateTab::MobCoordinateTab(MobCoordinateTab *this); // idb
MobCoordinateTab *__thiscall MobCoordinateTab::`vector deleting destructor'(MobCoordinateTab *this, unsigned int a2);
void __thiscall MobKillAnnounceTextTab::MobKillAnnounceTextTab(MobKillAnnounceTextTab *this); // idb
MobKillAnnounceTextTab *__thiscall IIDTableBase<MobKillAnnounceText,MobKillAnnounceTextTab,unsigned short>::`scalar deleting destructor'(MobKillAnnounceTextTab *this, unsigned int a2);
void __thiscall ChargedIconItemTab::ChargedIconItemTab(ChargedIconItemTab *this); // idb
ChargedIconItemTab *__thiscall IIDTableBase<ChargedIconItem,ChargedIconItemTab,unsigned short>::`scalar deleting destructor'(ChargedIconItemTab *this, unsigned int a2);
void __thiscall ChargedMsgItemTab::ChargedMsgItemTab(ChargedMsgItemTab *this); // idb
void __thiscall AttendRewardTab::AttendRewardTab(AttendRewardTab *this); // idb
int __stdcall ActionViewTable::GetID(AttendReward *pkRecord);
void __thiscall BRAccUpgradeInfoTab::BRAccUpgradeInfoTab(BRAccUpgradeInfoTab *this); // idb
BRAccUpgradeInfoTab *__thiscall BRAccUpgradeInfoTab::`scalar deleting destructor'(BRAccUpgradeInfoTab *this, unsigned int a2);
void __thiscall std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::_Insert<std::_List_const_iterator<std::_List_val<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>(std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > *this, std::_List_const_iterator<std::_List_val<ItemViewDummy *,std::allocator<ItemViewDummy *> > > _Where, std::_List_const_iterator<std::_List_val<ItemViewDummy *,std::allocator<ItemViewDummy *> > > _First, std::_List_const_iterator<std::_List_val<ItemViewDummy *,std::allocator<ItemViewDummy *> > > _Last, std::forward_iterator_tag __formal); // idb
bool __cdecl ITableBase<FaceCutMsg,FaceCutMsgTab>::Load(char *acFn);
void __thiscall std::_Pair_base<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>::~_Pair_base<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>(std::_Pair_base<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > *this); // idb
bool __cdecl ITableBase<ItemInfo,ItemInfoTab>::Load(char *acFn);
bool __cdecl ITableBase<ItemViewInfo,ItemViewInfoTab>::Load(char *acFn);
bool __cdecl ITableBase<MobInfo,MobInfoTab>::Load(char *acFn);
bool __cdecl ITableBase<MobViewInfo,MobViewInfoTab>::Load(char *acFn);
bool __cdecl ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::Load(char *acFn);
bool __cdecl ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::Load(char *acFn);
bool __cdecl ITableBase<SubAbStateInfo,SubAbStateInfoTab>::Load(char *acFn);
bool __cdecl ITableBase<MapInfo,MapInfoTab>::Load(char *acFn);
bool __cdecl ITableBase<MapViewInfo,MapViewInfoTab>::Load(char *acFn);
bool __cdecl ITableBase<UpGradeInfo,UpGradeInfoTab>::Load(char *acFn);
bool __cdecl ITableBase<ActionViewInfo,ActionViewTable>::Load(char *acFn);
bool __cdecl ITableBase<RIDING,RidePetTable>::Load(char *acFn);
bool __cdecl ITableBase<MobCoordinate,MobCoordinateTab>::Load(char *acFn);
bool __cdecl ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::Load(char *acFn);
bool __cdecl ITableBase<ChargedIconItem,ChargedIconItemTab>::Load(char *acFn);
bool __cdecl ITableBase<ChargedMessageItem,ChargedMsgItemTab>::Load(char *acFn);
bool __cdecl ITableBase<AttendReward,AttendRewardTab>::Load(char *acFn);
bool __cdecl ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::Load(char *acFn);
void __thiscall std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>(std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > *this, std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > *_Right); // idb
void __thiscall std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::_Assign_rv(std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > *this, std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > *_Right); // idb
char __cdecl FaceCutMsgTab::Load(char *pcFn);
std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > *__cdecl std::make_pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>> &>(std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > *result, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Val1, std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > *_Val2); // idb
void __thiscall std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>(std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > *this, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > *_Right); // idb
void __thiscall std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>,0>>::_Check_size(std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> >,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > >,0> > *this); // idb
std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > > *__thiscall std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>::erase(std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > *this, std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > > *result, std::_List_const_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > > _Where); // idb
std::pair<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > >,bool> *__thiscall std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>,0>>::_Insert(std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> >,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > >,0> > *this, std::pair<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > >,bool> *result, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > *_Val, std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > > _Plist); // idb
void __thiscall std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>,0>>::_Reinsert(std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> >,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > >,0> > *this, std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > > _Last); // idb
std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *__stdcall std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>(std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *_Next, std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *_Prev, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > *_Val);
std::pair<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > >,bool> *__thiscall std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>,0>>::insert<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>(std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> >,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > >,0> > *this, std::pair<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > >,bool> *result, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > *_Val); // idb
char __cdecl ItemViewDummyTab::Load(char *pcFn);
void __thiscall PgFrameMgr::RegisterAllFrameWork(PgFrameMgr *this); // idb
void __thiscall NiActionData::~NiActionData(NiActionData *this); // idb
NiPointer<NiAlphaProperty> *__thiscall NiPointer<NiAVObject>::`vector deleting destructor'(NiPointer<NiAlphaProperty> *this, unsigned int a2);
void *__thiscall NiActionData::`vector deleting destructor'(NiActionData *this, unsigned int); // idb
boost::singleton_pool<boost::fast_pool_allocator_tag,28,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>::pool_type *__cdecl boost::details::pool::singleton_default<boost::singleton_pool<boost::fast_pool_allocator_tag,28,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>::pool_type>::instance(); // idb
void __thiscall AccountFrameWork::TerminateWindow(AccountFrameWork *this); // idb
char __thiscall AccountFrameWork::ReceiveWinProc(AccountFrameWork *this);
void __thiscall AccountFrameWork::TerminateNet(AccountFrameWork *this); // idb
char __thiscall AccountFrameWork::InitKeyMap(AccountFrameWork *this);
void __thiscall AccountFrameWork::TerminateKeyMap(AccountFrameWork *this); // idb
void __thiscall AccountFrameWork::TerminateBackgroundScene(AccountFrameWork *this); // idb
char __thiscall AccountFrameWork::InitWindow(AccountFrameWork *this);
char __thiscall AccountFrameWork::ReceiveWinCheck(AccountFrameWork *this);
char __thiscall AccountFrameWork::InitNet(AccountFrameWork *this);
char __thiscall AccountFrameWork::InitShadow(AccountFrameWork *this);
char __thiscall AccountFrameWork::InitBackgroundScene(AccountFrameWork *this);
void __thiscall AccountFrameWork::ReleaseShadow(AccountFrameWork *this); // idb
char __thiscall AccountFrameWork::Init(AccountFrameWork *this, PgMsg::Frame *ptFrameMsg);
void __thiscall AccountFrameWork::Terminate(AccountFrameWork *this); // idb
NiSourceTexture *__cdecl PgUtil::LoadSourceTexture(const char *pcFileName); // idb
char *__cdecl Folder::Sound(); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *>::RemoveAll(NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *> *this); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>::AddNodeTail(NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *> *this, NiTListItem<PgWin *> *pkNode); // idb
int __stdcall AccountFrameWork::On_NC_USER_CONNECTCUT_CMD(int iRevBytes, void *pvData);
int __thiscall AccountFrameWork::On_NC_USER_WORLD_STATUS_ACK(AccountFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall AccountFrameWork::On_NC_USER_XTRAP_ACK(int iRevBytes, void *pvData);
void __thiscall AccountFrameWork::NcUserLoginCpReq(AccountFrameWork *this, char *acCpKey); // idb
void __thiscall AccountFrameWork::NcUserXtrapReq(AccountFrameWork *this, char *acXTrapKey); // idb
void __thiscall AccountFrameWork::NcUserWorldSelectReq(AccountFrameWork *this, unsigned int uiIndex); // idb
void __thiscall AccountFrameWork::NcUserWorldStatusReq(AccountFrameWork *this); // idb
int __thiscall AccountFrameWork::On_NC_USER_LOGIN_ACK(AccountFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall AccountFrameWork::On_NC_USER_LOGINFAIL_ACK(AccountFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall AccountFrameWork::On_NC_USER_CLIENT_WRONGVERSION_CHECK_ACK(AccountFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall AccountFrameWork::On_NC_USER_WORLDSELECT_ACK(AccountFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall AccountFrameWork::NcUserLoginReq(AccountFrameWork *this, char byLoginType); // idb
int __thiscall AccountFrameWork::On_NC_USER_CLIENT_RIGHTVERSION_CHECK_ACK(AccountFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall AccountFrameWork::NcUserVersionReq(AccountFrameWork *this); // idb
int __thiscall AccountFrameWork::On_NC_MISC_SEED_ACK(AccountFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall AccountFrameWork::ProcessNetMsg(AccountFrameWork *this, int iDepart, int iCommand, int iRevBytes, void *pvData); // idb
std::locale::facet *__thiscall std::locale::facet::_Decref(std::locale::facet *this); // idb
void __thiscall std::locale::facet::~facet(std::locale::facet *this); // idb
void __thiscall std::locale::~locale(std::locale *this); // idb
std::locale *__thiscall std::ios_base::getloc(std::ios_base *this, std::locale *result); // idb
std::basic_ios<char,std::char_traits<char> > *__thiscall std::basic_ios<char,std::char_traits<char>>::`scalar deleting destructor'(std::basic_ios<char,std::char_traits<char> > *this, unsigned int a2);
void __thiscall Name8::Name8(Name8 *this); // idb
void __thiscall std::basic_ios<char,std::char_traits<char>>::~basic_ios<char,std::char_traits<char>>(std::basic_ios<char,std::char_traits<char> > *this); // idb
void __thiscall std::basic_istream<char,std::char_traits<char>>::~basic_istream<char,std::char_traits<char>>(std::basic_istream<char,std::char_traits<char> > *this); // idb
void __thiscall std::basic_ostream<char,std::char_traits<char>>::_Sentry_base::~_Sentry_base(std::basic_istream<char,std::char_traits<char> >::sentry *this); // idb
__int64 __thiscall std::basic_streambuf<char,std::char_traits<char>>::_Gnavail(std::basic_streambuf<char,std::char_traits<char> > *this); // idb
char __thiscall Server::GetWorldName(Server *this, char ucIndex, char *pcWorldName);
// void __thiscall std::basic_filebuf<char,std::char_traits<char>>::_Reset_back(std::basic_filebuf<char,std::char_traits<char> > *this); idb
std::locale *__thiscall std::basic_streambuf<char,std::char_traits<char>>::getloc(std::basic_streambuf<char,std::char_traits<char> > *this, std::locale *result); // idb
void __thiscall std::basic_streambuf<char,std::char_traits<char>>::_Init(std::basic_streambuf<char,std::char_traits<char> > *this); // idb
int __stdcall std::codecvt<char,char,int>::do_out(int *__formal, const char *_First1, const char *a4, const char **_Mid1, char *_First2, char *a7, char **_Mid2);
int __stdcall std::codecvt<char,char,int>::do_unshift(int *__formal, char *_First2, char *a4, char **_Mid2);
unsigned int __stdcall std::codecvt<char,char,int>::do_length(const int *__formal, const char *_First1, const char *_Last1, unsigned int _Count);
std::codecvt<char,char,int> *__thiscall std::codecvt<char,char,int>::`vector deleting destructor'(std::codecvt<char,char,int> *this, unsigned int a2);
int __thiscall std::ctype<char>::do_tolower(std::ctype<char> *this, char _Ch);
char *__thiscall std::ctype<char>::do_tolower(std::ctype<char> *this, char *_First, const char *_Last);
int __thiscall std::ctype<char>::do_toupper(std::ctype<char> *this, char _Ch);
char *__thiscall std::ctype<char>::do_toupper(std::ctype<char> *this, char *_First, const char *_Last);
const char *__stdcall std::ctype<char>::do_widen(const char *_First, const char *_Last, char *_Dest);
const char *__stdcall std::ctype<char>::do_narrow(const char *_First, const char *_Last, char __formal, char *_Dest);
std::ctype<char> *__thiscall std::ctype<char>::`vector deleting destructor'(std::ctype<char> *this, unsigned int a2);
void __thiscall std::ios_base::clear(std::ios_base *this, int _State, bool _Reraise); // idb
void __thiscall std::runtime_error::runtime_error(std::runtime_error *this, std::runtime_error *__that); // idb
void __thiscall std::system_error::system_error(std::system_error *this, std::system_error *__that); // idb
void __thiscall std::ios_base::_Init(std::ios_base *this); // idb
std::ios_base::failure *__thiscall std::system_error::`vector deleting destructor'(std::ios_base::failure *this, unsigned int a2);
void __thiscall std::ios_base::failure::failure(std::ios_base::failure *this, std::ios_base::failure *__that); // idb
void __thiscall std::_Yarn<char>::~_Yarn<char>(std::_Yarn<char> *this); // idb
void __thiscall std::basic_streambuf<char,std::char_traits<char>>::~basic_streambuf<char,std::char_traits<char>>(std::basic_streambuf<char,std::char_traits<char> > *this); // idb
void __thiscall std::basic_streambuf<char,std::char_traits<char>>::_Lock(std::basic_streambuf<char,std::char_traits<char> > *this); // idb
void __thiscall std::basic_streambuf<char,std::char_traits<char>>::_Unlock(std::basic_streambuf<char,std::char_traits<char> > *this); // idb
int __stdcall std::basic_streambuf<char,std::char_traits<char>>::overflow(int __formal);
__int64 std::basic_streambuf<char,std::char_traits<char>>::showmanyc();
std::basic_streambuf<char,std::char_traits<char> > *__thiscall std::basic_streambuf<char,std::char_traits<char>>::setbuf(std::basic_streambuf<char,std::char_traits<char> > *this, char *__formal, __int64 __formal); // idb
__int64 __thiscall std::basic_streambuf<char,std::char_traits<char>>::_Pnavail(std::basic_streambuf<char,std::char_traits<char> > *this); // idb
int __thiscall std::basic_streambuf<char,std::char_traits<char>>::uflow(std::basic_streambuf<char,std::char_traits<char> > *this); // idb
__int64 __thiscall std::basic_streambuf<char,std::char_traits<char>>::xsgetn(std::basic_streambuf<char,std::char_traits<char> > *this, char *_Ptr, __int64 _Count); // idb
__int64 __thiscall std::basic_streambuf<char,std::char_traits<char>>::xsputn(std::basic_streambuf<char,std::char_traits<char> > *this, const char *_Ptr, __int64 _Count); // idb
std::fpos<int> *__stdcall std::basic_streambuf<char,std::char_traits<char>>::seekoff(std::fpos<int> *result, __int64 __formal, int a4, int a5);
std::fpos<int> *__stdcall std::basic_streambuf<char,std::char_traits<char>>::seekpos(std::fpos<int> *result, std::fpos<int> __formal, int a4);
char *__thiscall std::basic_istream<char,std::char_traits<char>>::`vector deleting destructor'(std::basic_istream<char,std::char_traits<char> > *this, unsigned int a2);
std::basic_streambuf<char,std::char_traits<char> > *__thiscall std::basic_streambuf<char,std::char_traits<char>>::`vector deleting destructor'(std::basic_streambuf<char,std::char_traits<char> > *this, unsigned int a2);
void __thiscall std::basic_filebuf<char,std::char_traits<char>>::_Init(std::basic_filebuf<char,std::char_traits<char> > *this, _iobuf *_File, std::basic_filebuf<char,std::char_traits<char> >::_Initfl _Which); // idb
void __thiscall std::basic_streambuf<char,std::char_traits<char>>::basic_streambuf<char,std::char_traits<char>>(std::basic_streambuf<char,std::char_traits<char> > *this); // idb
void __thiscall std::_Locinfo::_Locinfo(std::_Locinfo *this, const char *_Pch); // idb
void __thiscall std::_Locinfo::~_Locinfo(std::_Locinfo *this); // idb
signed int __cdecl std::ctype<char>::_Getcat(std::locale::facet **_Ppf, std::locale *_Ploc);
int __thiscall std::basic_streambuf<char,std::char_traits<char>>::snextc(std::basic_streambuf<char,std::char_traits<char> > *this); // idb
std::locale::facet *__cdecl std::use_facet<std::ctype<char>>(std::locale *_Loc);
std::basic_istream<char,std::char_traits<char> > *__thiscall std::basic_istream<char,std::char_traits<char>>::seekg(std::basic_istream<char,std::char_traits<char> > *this, __int64 _Off, int _Way); // idb
void __thiscall std::basic_filebuf<char,std::char_traits<char>>::_Lock(std::basic_filebuf<char,std::char_traits<char> > *this); // idb
void __thiscall std::basic_filebuf<char,std::char_traits<char>>::_Unlock(std::basic_filebuf<char,std::char_traits<char> > *this); // idb
bool __cdecl std::_Fputc<char>(char _Byte, _iobuf *_File); // idb
int __thiscall std::basic_filebuf<char,std::char_traits<char>>::underflow(std::basic_filebuf<char,std::char_traits<char> > *this); // idb
int __thiscall std::basic_filebuf<char,std::char_traits<char>>::sync(std::basic_filebuf<char,std::char_traits<char> > *this); // idb
// void __thiscall std::basic_filebuf<char,std::char_traits<char>>::_Set_back(std::basic_filebuf<char,std::char_traits<char> > *this); idb
int __thiscall std::basic_filebuf<char,std::char_traits<char>>::pbackfail(std::basic_filebuf<char,std::char_traits<char> > *this, int _Meta); // idb
std::basic_filebuf<char,std::char_traits<char> > *__thiscall std::basic_filebuf<char,std::char_traits<char>>::setbuf(std::basic_filebuf<char,std::char_traits<char> > *this, char *_Buffer, __int64 _Count);
int __thiscall std::basic_ios<char,std::char_traits<char>>::widen(std::basic_ios<char,std::char_traits<char> > *this, int _Byte);
signed int __cdecl std::codecvt<char,char,int>::_Getcat(std::locale::facet **_Ppf, std::locale *_Ploc);
std::basic_ostream<char,std::char_traits<char> > *__thiscall std::basic_ostream<char,std::char_traits<char>>::flush(std::basic_ostream<char,std::char_traits<char> > *this); // idb
char __thiscall std::basic_istream<char,std::char_traits<char>>::_Ipfx(std::basic_istream<char,std::char_traits<char> > *this, bool _Noskip);
std::locale::facet *__cdecl std::use_facet<std::codecvt<char,char,int>>(std::locale *_Loc);
std::basic_istream<char,std::char_traits<char> > *__thiscall std::basic_istream<char,std::char_traits<char>>::read(std::basic_istream<char,std::char_traits<char> > *this, char *_Str, __int64 _Count); // idb
int __thiscall std::basic_filebuf<char,std::char_traits<char>>::uflow(std::basic_filebuf<char,std::char_traits<char> > *this); // idb
void __thiscall std::basic_filebuf<char,std::char_traits<char>>::imbue(std::basic_filebuf<char,std::char_traits<char> > *this, std::locale *_Loc); // idb
std::basic_filebuf<char,std::char_traits<char> > *__thiscall std::basic_filebuf<char,std::char_traits<char>>::open(std::basic_filebuf<char,std::char_traits<char> > *this, const wchar_t *_Filename, int _Mode, int _Prot); // idb
char __thiscall std::basic_filebuf<char,std::char_traits<char>>::_Endwrite(std::basic_filebuf<char,std::char_traits<char> > *this);
int __thiscall std::basic_filebuf<char,std::char_traits<char>>::overflow(std::basic_filebuf<char,std::char_traits<char> > *this, int _Meta); // idb
std::fpos<int> *__thiscall std::basic_filebuf<char,std::char_traits<char>>::seekoff(std::basic_filebuf<char,std::char_traits<char> > *this, std::fpos<int> *result, __int64 _Off, int _Way, int __formal); // idb
std::fpos<int> *__thiscall std::basic_filebuf<char,std::char_traits<char>>::seekpos(std::basic_filebuf<char,std::char_traits<char> > *this, std::fpos<int> *result, std::fpos<int> _Pos, int __formal); // idb
std::basic_filebuf<char,std::char_traits<char> > *__thiscall std::basic_filebuf<char,std::char_traits<char>>::close(std::basic_filebuf<char,std::char_traits<char> > *this); // idb
std::basic_filebuf<char,std::char_traits<char> > *__thiscall std::basic_filebuf<char,std::char_traits<char>>::`scalar deleting destructor'(std::basic_filebuf<char,std::char_traits<char> > *this, unsigned int a2);
void __thiscall std::basic_ifstream<char,std::char_traits<char>>::basic_ifstream<char,std::char_traits<char>>(std::basic_ifstream<char,std::char_traits<char> > *this, int a2);
void __thiscall std::basic_ifstream<char,std::char_traits<char>>::~basic_ifstream<char,std::char_traits<char>>(std::basic_ifstream<char,std::char_traits<char> > *this); // idb
void __thiscall std::basic_ifstream<char,std::char_traits<char>>::`vbase destructor(std::basic_ifstream<char,std::char_traits<char> > *this); // idb
char *__thiscall std::basic_ifstream<char,std::char_traits<char>>::`vector deleting destructor'(std::basic_ifstream<char,std::char_traits<char> > *this, unsigned int a2);
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__cdecl ClientVersionKeyInfo::getVersionKey(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result); // idb
void __thiscall AccountFrameWork::OnLoginWorldComplete(AccountFrameWork *this); // idb
void AccountFrameWork::OnCharLoginComplete();
void __thiscall AccountFrameWork::OnZoneLoginComplete(AccountFrameWork *this); // idb
void AccountFrameWork::OnWrongVersionMsgClose();
void AccountFrameWork::Exit();
void __thiscall AccountFrameWork::WorldSelectOk(AccountFrameWork *this); // idb
void __thiscall AccountFrameWork::SetResList(AccountFrameWork *this); // idb
void __thiscall AccountFrameWork::SetResListDefault(AccountFrameWork *this); // idb
void __thiscall AccountFrameWork::Draw(AccountFrameWork *this); // idb
void __thiscall AccountFrameWork::ProcessInput(AccountFrameWork *this); // idb
// void __usercall AccountFrameWork::OpenResolutionPopup(AccountFrameWork *this@<ecx>, unsigned int a2@<edi>);
void __thiscall AccountFrameWork::SetOptionResolution(AccountFrameWork *this, unsigned int uiWidth, unsigned int uiHeight); // idb
void __thiscall AccountFrameWork::ChangeResolution(AccountFrameWork *this); // idb
void __thiscall AccountFrameWork::OnWorldMgrConnectFail(AccountFrameWork *this); // idb
void __thiscall AccountFrameWork::OnLoginWorldFail(AccountFrameWork *this, unsigned int uiwParam); // idb
void __thiscall AccountFrameWork::OnCharLoginFail(AccountFrameWork *this, unsigned int uiwParam); // idb
void __thiscall AccountFrameWork::OnZoneServerConnectFail(AccountFrameWork *this); // idb
void __thiscall AccountFrameWork::OnZoneLoginFail(AccountFrameWork *this, unsigned int uiwParam); // idb
void __thiscall AccountFrameWork::OnInitializeState(AccountFrameWork *this); // idb
void __thiscall AccountFrameWork::TryUserLogin(AccountFrameWork *this, char *pcID, char *pcPasswd); // idb
void __thiscall AccountFrameWork::WorldSelectCancel(AccountFrameWork *this); // idb
void __thiscall AccountFrameWork::RenderShadow(AccountFrameWork *this); // idb
void __thiscall AccountFrameWork::SetOptionResolution(AccountFrameWork *this, unsigned int uiParam); // idb
void __thiscall AccountFrameWork::Update(AccountFrameWork *this, float fCurTime); // idb
// void __userpurge AccountFrameWork::ProcessMsg(AccountFrameWork *this@<ecx>, unsigned int a2@<edi>, unsigned int uiMsg, unsigned int uiwParam, unsigned int uilParam);
void __thiscall AccountFrameWork::ApplyTerrain(AccountFrameWork *this, NiNode *pkGroundNode); // idb
void __thiscall AccountFrameWork::AccountFrameWork(AccountFrameWork *this); // idb
void __thiscall AccountFrameWork::~AccountFrameWork(AccountFrameWork *this); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>::~NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>(NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *> *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *> *this, unsigned int a2);
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWin *>::NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWin *>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWin *> *this); // idb
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWin *>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWin *>(NiTPointerList<PgWin *> *this); // idb
void __thiscall NiTPointerList<PgWin *>::NiTPointerList<PgWin *>(NiTPointerList<PgWin *> *this); // idb
NiTPointerList<PgWin *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`vector deleting destructor'(NiTPointerList<PgWin *> *this, unsigned int a2);
void __thiscall PgTList<PgWin *>::~PgTList<PgWin *>(PgTList<PgWin *> *this); // idb
PgTList<PgWin *> *__thiscall PgTList<PgWin *>::`vector deleting destructor'(PgTList<PgWin *> *this, unsigned int a2);
NiRTTI *AccountFrameWork::GetRTTI();
const char *AccountFrameWork::GetFrameWorkName();
AccountFrameWork *__thiscall AccountFrameWork::`scalar deleting destructor'(AccountFrameWork *this, unsigned int a2);
int __thiscall LoginWorldNetFrameWork::On_NC_USER_LOGINWORLDFAIL_ACK(LoginWorldNetFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall LoginWorldNetFrameWork::Terminate(LoginWorldNetFrameWork *this); // idb
void __thiscall LoginWorldNetFrameWork::Update(LoginWorldNetFrameWork *this, float fCurTime); // idb
void __thiscall LoginWorldNetFrameWork::OnConnectWorldMgr(LoginWorldNetFrameWork *this); // idb
int __thiscall LoginWorldNetFrameWork::On_NC_USER_LOGINWORLD_ACK(LoginWorldNetFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall LoginWorldNetFrameWork::LoginWorldNetFrameWork(LoginWorldNetFrameWork *this); // idb
void __thiscall LoginWorldNetFrameWork::~LoginWorldNetFrameWork(LoginWorldNetFrameWork *this); // idb
char __thiscall LoginWorldNetFrameWork::Init(LoginWorldNetFrameWork *this, PgMsg::Frame *ptFrameMsg);
void __thiscall LoginWorldNetFrameWork::ProcessMsg(LoginWorldNetFrameWork *this, unsigned int uiMsg, unsigned int uiwParam, unsigned int uilParam); // idb
void __thiscall LoginWorldNetFrameWork::NcUserLoginWorldReq(LoginWorldNetFrameWork *this); // idb
int __thiscall LoginWorldNetFrameWork::On_NC_MISC_SEED_ACK(LoginWorldNetFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall LoginWorldNetFrameWork::ProcessNetMsg(LoginWorldNetFrameWork *this, int iDepart, int iCommand, int iRevBytes, void *pvData); // idb
void __thiscall Name256Byte::operator=(Name256Byte *this, const char *nm); // idb
NiRTTI *LoginWorldNetFrameWork::GetRTTI();
int __thiscall CharCreateFrameWork::GetID(CharCreateFrameWork *this);
const char *LoginWorldNetFrameWork::GetFrameWorkName();
LoginWorldNetFrameWork *__thiscall LoginWorldNetFrameWork::`scalar deleting destructor'(LoginWorldNetFrameWork *this, unsigned int a2);
void __thiscall SignUpWin::SignUpWin(SignUpWin *this); // idb
void __thiscall SignUpWin::~SignUpWin(SignUpWin *this); // idb
void __thiscall SignUpWin::GotoSignUpPage(SignUpWin *this); // idb
void __thiscall SpawnAppsWin::SpawnAppsWin(SpawnAppsWin *this); // idb
void __thiscall SpawnAppsWin::~SpawnAppsWin(SpawnAppsWin *this); // idb
void __thiscall SpawnAppsWin::OnClose(SpawnAppsWin *this); // idb
void __thiscall SpawnAppsWin::CloseWin(SpawnAppsWin *this); // idb
void __thiscall SpawnAppsWin::ReGenPos(SpawnAppsWin *this); // idb
void __thiscall SpawnAppsWin::UpdateWebPos(SpawnAppsWin *this); // idb
void __thiscall SignUpWin::OnCommand(SignUpWin *this, unsigned int wParam, int lParam); // idb
void __thiscall SignUpWin::LoadUrl(SignUpWin *this); // idb
void __thiscall SpawnAppsWin::OnCommand(SpawnAppsWin *this, unsigned int wParam, int lParam); // idb
char __thiscall SpawnAppsWin::LoadURL(SpawnAppsWin *this);
void __thiscall SpawnAppsWin::UpdateMeWin(SpawnAppsWin *this, float fCurTime); // idb
char __thiscall SignUpWin::Create(SignUpWin *this, PgFrameWork *pkFrameWork);
char __thiscall SpawnAppsWin::Create(SpawnAppsWin *this, PgFrameWork *pkFrameWork);
void __thiscall SpawnAppsWin::OnShowWin(SpawnAppsWin *this); // idb
SignUpWin *__cdecl SignUpWin::CreateWin(PgFrameWork *pkFrameWork); // idb
SpawnAppsWin *__cdecl SpawnAppsWin::CreateWin(PgFrameWork *pkFrameWork); // idb
SignUpWin *__thiscall SignUpWin::`scalar deleting destructor'(SignUpWin *this, unsigned int a2);
SpawnAppsWin *__thiscall SpawnAppsWin::`scalar deleting destructor'(SpawnAppsWin *this, unsigned int a2);
char __thiscall AccountWin::CheckID(AccountWin *this, char *pcID);
char __thiscall AccountWin::CheckPasswd(AccountWin *this, char *pcPasswd);
void __thiscall AccountWin::OnRegister(AccountWin *this); // idb
void __thiscall AccountWin::OnForgotPassword(AccountWin *this); // idb
void __thiscall AccountWin::SetRegisterURL(AccountWin *this, const char *pcURL); // idb
void __thiscall AccountWin::SetForgotPassword(AccountWin *this, const char *pcURL); // idb
void __thiscall AccountWin::SetEditFocus(AccountWin *this, unsigned int uiFocus); // idb
void __thiscall AccountWin::OnCmdExit(AccountWin *this); // idb
char __thiscall AccountWin::ChekcIDPasswd(AccountWin *this);
void __thiscall AccountWin::ActiveInput(AccountWin *this); // idb
void __thiscall AccountWin::DeactiveInput(AccountWin *this); // idb
char __thiscall AccountWin::OnModalWinClose(AccountWin *this, PgWin *pkModalWin);
void __thiscall AccountWin::AccountWin(AccountWin *this); // idb
void __thiscall AccountWin::~AccountWin(AccountWin *this); // idb
void __thiscall AccountWin::OnShowWin(AccountWin *this); // idb
void __thiscall AccountWin::OnClose(AccountWin *this); // idb
char __thiscall AccountWin::CreateKoreaAccountWin(AccountWin *this, PgFrameWork *pkFrameWork);
void __thiscall AccountWin::DisplayCheckMsg(AccountWin *this); // idb
char __thiscall AccountWin::Create(AccountWin *this, PgFrameWork *pkFrameWork);
void __thiscall AccountWin::OnCmdOk(AccountWin *this, bool bCheck); // idb
void __thiscall AccountWin::OnEditEnd(AccountWin *this, unsigned int wParam, int lParam); // idb
void __thiscall AccountWin::UpdateMeWin(AccountWin *this, float fCurTime); // idb
void __thiscall AccountWin::OnCommand(AccountWin *this, unsigned int wParam, int lParam); // idb
AccountWin *__cdecl AccountWin::CreateWin(PgFrameWork *pkFrameWork); // idb
AccountWin *__thiscall AccountWin::`scalar deleting destructor'(AccountWin *this, unsigned int a2);
int __thiscall WorldSelectWin::GetSelectedWorldNum(WorldSelectWin *this); // idb
void __thiscall WorldSelectWin::InitServerListCtrlData(WorldSelectWin *this); // idb
int __stdcall WorldSelectWin::FindIndex(int WorldNo);
void __thiscall WorldSelectWin::OnClose(WorldSelectWin *this); // idb
void __thiscall WorldSelectExitWin::WorldSelectExitWin(WorldSelectExitWin *this); // idb
void __thiscall WorldSelectExitWin::~WorldSelectExitWin(WorldSelectExitWin *this); // idb
void __thiscall WorldSelectOptionWin::WorldSelectOptionWin(WorldSelectOptionWin *this); // idb
void __thiscall WorldSelectOptionWin::~WorldSelectOptionWin(WorldSelectOptionWin *this); // idb
void __thiscall WorldSelectOptionWin::OnCommand(WorldSelectOptionWin *this, unsigned int wParam, int lParam); // idb
void __thiscall WorldSelectOptionSetWin::WorldSelectOptionSetWin(WorldSelectOptionSetWin *this); // idb
void __thiscall WorldSelectOptionSetWin::~WorldSelectOptionSetWin(WorldSelectOptionSetWin *this); // idb
void __thiscall WorldSelectOptionSetWin::SetResolutionText(WorldSelectOptionSetWin *this, char *pcResolutionText); // idb
void __thiscall WorldSelectWin::UpdateServerList(WorldSelectWin *this); // idb
void __thiscall WorldSelectWin::OnCmdExit(WorldSelectWin *this); // idb
void __thiscall WorldSelectWin::SaveLastConnectWorldInfo(WorldSelectWin *this); // idb
char __thiscall WorldSelectWin::LoadLastConnectWorldInfo(WorldSelectWin *this);
void __thiscall WorldSelectWin::UpdateWinPos(WorldSelectWin *this); // idb
void __thiscall WorldSelectExitWin::OnExit(WorldSelectExitWin *this); // idb
char __thiscall WorldSelectOptionWin::Create(WorldSelectOptionWin *this, PgFrameWork *pkFrameWork);
void __thiscall WorldSelectOptionSetWin::OnClose(WorldSelectOptionSetWin *this); // idb
void __thiscall WorldSelectOptionSetWin::ProcessMeInput(WorldSelectOptionSetWin *this, bool *bHit); // idb
void __thiscall WorldSelectOptionSetWin::ReadOption(WorldSelectOptionSetWin *this); // idb
void __thiscall WorldSelectOptionSetWin::OpenResolutionPopup(WorldSelectOptionSetWin *this); // idb
char __thiscall WorldSelectWin::Create(WorldSelectWin *this, PgFrameWork *pkFrameWork);
void __thiscall WorldSelectWin::OnCmdOk(WorldSelectWin *this, bool bCheck); // idb
void __thiscall WorldSelectWin::UpdateServerBtnState(WorldSelectWin *this, unsigned int nSelectedSlot); // idb
void __stdcall WorldSelectWin::MakeEmptyServerName(PgWinBut *pkBtn);
char __thiscall WorldSelectExitWin::Create(WorldSelectExitWin *this, PgFrameWork *pkFrameWork);
void __thiscall WorldSelectExitWin::OnCommand(WorldSelectExitWin *this, unsigned int wParam, int lParam); // idb
char __thiscall WorldSelectOptionSetWin::Create(WorldSelectOptionSetWin *this, PgFrameWork *pkFrameWork);
void __thiscall WorldSelectOptionSetWin::OnCommand(WorldSelectOptionSetWin *this, unsigned int wParam, int lParam); // idb
void __thiscall WorldSelectOptionSetWin::OnShowWin(WorldSelectOptionSetWin *this); // idb
void __thiscall WorldSelectWin::OnCommand(WorldSelectWin *this, unsigned int wParam, int lParam); // idb
void __thiscall WorldSelectWin::UpdateMeWin(WorldSelectWin *this, float fCurTime); // idb
void __thiscall WorldSelectWin::~WorldSelectWin(WorldSelectWin *this); // idb
void __thiscall WorldSelectWin::LoadServerListOrder(WorldSelectWin *this); // idb
void __thiscall WorldSelectWin::MakeServerListOrder(WorldSelectWin *this); // idb
WorldSelectExitWin *__cdecl WorldSelectExitWin::CreateWin(PgFrameWork *pkFrameWork); // idb
WorldSelectOptionWin *__cdecl WorldSelectOptionWin::CreateWin(PgFrameWork *pkFrameWork); // idb
WorldSelectOptionSetWin *__cdecl WorldSelectOptionSetWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall WorldSelectWin::WorldSelectWin(WorldSelectWin *this); // idb
WorldSelectWin *__cdecl WorldSelectWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall WorldSelectWin::UpdatePageState(WorldSelectWin *this); // idb
void __thiscall WorldSelectWin::InitWorldSelectExitWin(WorldSelectWin *this, PgFrameWork *pkFrameWork); // idb
void __thiscall WorldSelectWin::OnShowWin(WorldSelectWin *this); // idb
bool __thiscall NiInputKeyboard::KeyWasReleased(NiInputKeyboard *this, NiInputKeyboard::KeyCode eKey); // idb
WorldSelectExitWin *__thiscall WorldSelectExitWin::`scalar deleting destructor'(WorldSelectExitWin *this, unsigned int a2);
WorldSelectOptionWin *__thiscall WorldSelectOptionWin::`vector deleting destructor'(WorldSelectOptionWin *this, unsigned int a2);
WorldSelectOptionSetWin *__thiscall WorldSelectOptionSetWin::`scalar deleting destructor'(WorldSelectOptionSetWin *this, unsigned int a2);
WorldSelectWin *__thiscall WorldSelectWin::`vector deleting destructor'(WorldSelectWin *this, unsigned int a2);
int __stdcall CharSelectFrameWork::On_NC_USER_CONNECTCUT_CMD(int iRevBytes, void *pvData);
int __stdcall CharSelectFrameWork::On_NC_PRISON_GET_ACK(int iRevBytes, void *pvData);
int __stdcall CharSelectFrameWork::On_NC_EVENT_FRIEND_GETCOUNT_ACK(int iRevBytes, void *pvData);
int __stdcall CharSelectFrameWork::On_NC_CHARGED_BOOTHSLOTSIZE_CMD(int iRevBytes, void *pvData);
int __stdcall CharSelectFrameWork::On_NC_CHAR_OPTION_IMPROVE_GET_GAMEOPTION_CMD(int iRevBytes, void *pvData);
int __stdcall CharSelectFrameWork::On_NC_CHAR_OPTION_IMPROVE_GET_KEYMAP_CMD(int iRevBytes, void *pvData);
int __stdcall CharSelectFrameWork::On_NC_CHAR_OPTION_IMPROVE_GET_SHORTCUTDATA_CMD(int iRevBytes, void *pvData);
void __thiscall CharSelectFrameWork::NcAvatarEraseReq(CharSelectFrameWork *this); // idb
void __thiscall CharSelectFrameWork::NcCharLoginReq(CharSelectFrameWork *this); // idb
int __thiscall CharSelectFrameWork::On_NC_CHAR_LOGIN_ACK(CharSelectFrameWork *this, int iRevBytes, void *pvData); // idb
char __stdcall CharSelectFrameWork::OnLoadShortCutDataOption(PROTO_NC_CHAR_OPTION_GET_SHORTCUTDATA_ACK *pkAck);
char __stdcall CharSelectFrameWork::OnLoadShortCutSizeOption(PROTO_NC_CHAR_OPTION_GET_SHORTCUTSIZE_ACK *pkAck);
char __stdcall CharSelectFrameWork::OnLoadWindowPosOption(PROTO_NC_CHAR_OPTION_GET_WINDOWPOS_ACK *pkAck);
char __stdcall CharSelectFrameWork::OnLoadKeyMappingOption(PROTO_NC_CHAR_OPTION_GET_KEYMAPPING_ACK *pkAck);
char __stdcall CharSelectFrameWork::OnLoadGameOption(PROTO_NC_CHAR_OPTION_GET_GAME_ACK *pkAck);
int __stdcall CharSelectFrameWork::On_NC_CHAR_OPTION_GET_SHORTCUTDATA_ACK(int iRevBytes, void *pvData);
int __stdcall CharSelectFrameWork::On_NC_CHAR_OPTION_GET_SHORTCUTSIZE_ACK(int iRevBytes, void *pvData);
int __stdcall CharSelectFrameWork::On_NC_CHAR_OPTION_GET_WINDOWPOS_ACK(int iRevBytes, void *pvData);
int __stdcall CharSelectFrameWork::On_NC_CHAR_OPTION_GET_KEYMAPPING_ACK(int iRevBytes, void *pvData);
int __stdcall CharSelectFrameWork::On_NC_CHAR_OPTION_GET_GAME_ACK(int iRevBytes, void *pvData);
int __thiscall CharSelectFrameWork::On_NC_USER_WILL_WORLD_SELECT_ACK(CharSelectFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall CharSelectFrameWork::On_NC_CHAR_TUTORIAL_DOING_CMD(int iRevBytes, void *pvData);
void __thiscall CharSelectFrameWork::NcCharTutorialPopupAck(CharSelectFrameWork *this, bool bIsSkip); // idb
int __thiscall CharSelectFrameWork::On_NC_AVATAR_ERASEFAIL_ACK(CharSelectFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall CharSelectFrameWork::On_NC_AVATAR_ERASESUCC_ACK(CharSelectFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall CharSelectFrameWork::On_NC_CHAR_LOGINFAIL_ACK(CharSelectFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall CharSelectFrameWork::On_NC_AVATAR_RENAME_REQ(CharSelectFrameWork *this, Name5 newName); // idb
int __thiscall CharSelectFrameWork::On_NC_AVATAR_RENAME_ACK(CharSelectFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall CharSelectFrameWork::NcUserConnectChangeCharIDReq(CharSelectFrameWork *this, Name5 CharName); // idb
int __thiscall CharSelectFrameWork::On_NC_USER_CONNECTION_CHANGE_CHAR_ID_ACK(CharSelectFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall CharSelectFrameWork::On_NC_CHAR_TUTORIAL_POPUP_REQ(CharSelectFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall CharSelectFrameWork::ProcessNetMsg(CharSelectFrameWork *this, int iDepart, int iCommand, int iRevBytes, void *pvData); // idb
void __thiscall SpStream::~SpStream(NiTSet<CPostProcessEffect *> *this); // idb
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_QUEST_DOING_CMD(int iRevBytes, void *pvData);
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_QUEST_DONE_CMD(int iRevBytes, void *pvData);
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_QUEST_READ_CMD(int iRevBytes, void *pvData);
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_QUEST_REPEAT_CMD(int iRevBytes, void *pvData);
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_ABSTATE_CMD(int iRevBytes, void *pvData);
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_SKILL_CMD(int iRevBytes, void *pvData);
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_PASSIVE_CMD(int iRevBytes, void *pvData);
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_CHARTITLE_CMD(int iRevBytes, void *pvData);
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_ITEM_CMD(int iRevBytes, void *pvData);
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_GAME_CMD(int iRevBytes, void *pvData);
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_CHARGEDBUFF_CMD(int iRevBytes, void *pvData);
int __stdcall ZoneLoginNetFrameWork::On_NC_CHARGED_BOOTHSLOTSIZE_CMD(int iRevBytes, void *pvData);
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_COININFO_CMD(int iRevBytes, void *pvData);
int __stdcall ZoneLoginNetFrameWork::On_NC_QUEST_RESET_TIME_CLIENT_CMD(int iRevBytes, void *pvData);
void __thiscall ZoneLoginNetFrameWork::Terminate(ZoneLoginNetFrameWork *this); // idb
void __thiscall ZoneLoginNetFrameWork::Update(ZoneLoginNetFrameWork *this, float fCurTime); // idb
void __thiscall ZoneLoginNetFrameWork::OnTryConnectToZone(ZoneLoginNetFrameWork *this); // idb
void __thiscall ZoneLoginNetFrameWork::NcMapLoginCompleteCmd(ZoneLoginNetFrameWork *this); // idb
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_BASE_CMD(int iRevBytes, void *pvData);
void __thiscall ZoneLoginNetFrameWork::ZoneLoginNetFrameWork(ZoneLoginNetFrameWork *this); // idb
void __thiscall ZoneLoginNetFrameWork::~ZoneLoginNetFrameWork(ZoneLoginNetFrameWork *this); // idb
char __thiscall ZoneLoginNetFrameWork::Init(ZoneLoginNetFrameWork *this, PgMsg::Frame *ptFrameMsg);
void __thiscall ZoneLoginNetFrameWork::ProcessMsg(ZoneLoginNetFrameWork *this, unsigned int uiMsg, unsigned int uiwParam, unsigned int uilParam); // idb
int __thiscall ZoneLoginNetFrameWork::On_NC_MAP_LOGINFAIL_ACK(ZoneLoginNetFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall ZoneLoginNetFrameWork::On_NC_MAP_LOGIN_ACK(ZoneLoginNetFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall ZoneLoginNetFrameWork::NcMapLoginReq(ZoneLoginNetFrameWork *this); // idb
int __thiscall ZoneLoginNetFrameWork::On_NC_MISC_SEED_ACK(ZoneLoginNetFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_SHAPE_CMD(int iRevBytes, void *pvData);
int __thiscall ZoneLoginNetFrameWork::ProcessNetMsg(ZoneLoginNetFrameWork *this, int iDepart, int iCommand, int iRevBytes, void *pvData); // idb
NiRTTI *ZoneLoginNetFrameWork::GetRTTI();
const char *ZoneLoginNetFrameWork::GetFrameWorkName();
void __thiscall PROTO_NC_MAP_LOGIN_REQ::~PROTO_NC_MAP_LOGIN_REQ(PROTO_NC_MAP_LOGIN_REQ *this); // idb
ZoneLoginNetFrameWork *__thiscall ZoneLoginNetFrameWork::`scalar deleting destructor'(ZoneLoginNetFrameWork *this, unsigned int a2);
void __thiscall CharSelectInfoWin::CharSelectInfoWin(CharSelectInfoWin *this); // idb
void __thiscall CharSelectInfoWin::~CharSelectInfoWin(CharSelectInfoWin *this); // idb
char __thiscall CharSelectInfoWin::Create(CharSelectInfoWin *this, PgFrameWork *pkFrameWork);
void __thiscall CharSelectInfoWin::SetAvatarInfo(CharSelectInfoWin *this, PROTO_AVATARINFORMATION *pkInfo); // idb
CharSelectInfoWin *__cdecl CharSelectInfoWin::CreateWin(PgFrameWork *pkFrameWork); // idb
CharSelectInfoWin *__thiscall CharSelectInfoWin::`scalar deleting destructor'(CharSelectInfoWin *this, unsigned int a2);
void __thiscall CharSelectMenuWin::CharSelectMenuWin(CharSelectMenuWin *this); // idb
void __thiscall CharSelectMenuWin::~CharSelectMenuWin(CharSelectMenuWin *this); // idb
void CharSelectMenuWin::OnCmdCancel();
void __thiscall CharSelectMenuWin::OnCmdCreateChar(CharSelectMenuWin *this); // idb
void __thiscall CharSelectMenuWin::OnCmdDeleteChar(CharSelectMenuWin *this); // idb
void __thiscall CharSelectMenuWin::OnCmdOk(CharSelectMenuWin *this); // idb
void __stdcall CharSelectMenuWin::UpdateMeWin(float fCurTime);
void __thiscall CharSelectMenuWin::ChangeTextColor(CharSelectMenuWin *this, bool bChange); // idb
char __thiscall CharSelectMenuWin::Create(CharSelectMenuWin *this, PgFrameWork *pkFrameWork);
void __thiscall CharSelectMenuWin::EnableChildWinLogin(CharSelectMenuWin *this, int b);
void __thiscall CharSelectMenuWin::OnCommand(CharSelectMenuWin *this, unsigned int wParam, int lParam); // idb
void __thiscall CharSelectMenuWin::DisplayNoCharMsg(CharSelectMenuWin *this); // idb
void __thiscall CharSelectMenuWin::SetMenuTextInfo(CharSelectMenuWin *this, PROTO_AVATARINFORMATION *pkInfo); // idb
CharSelectMenuWin *__cdecl CharSelectMenuWin::CreateWin(PgFrameWork *pkFrameWork); // idb
bool __thiscall NiInputKeyboard::KeyWasPressed(NiInputKeyboard *this, NiInputKeyboard::KeyCode eKey); // idb
CharSelectMenuWin *__thiscall CharSelectMenuWin::`scalar deleting destructor'(CharSelectMenuWin *this, unsigned int a2);
void __thiscall EventFriendCountWin::EventFriendCountWin(EventFriendCountWin *this); // idb
void __thiscall EventFriendCountWin::~EventFriendCountWin(EventFriendCountWin *this); // idb
void __thiscall EventFriendCountWin::SetCountText(EventFriendCountWin *this, unsigned __int16 dNum); // idb
char __thiscall EventFriendCountWin::Create(EventFriendCountWin *this, PgFrameWork *pkFrameWork);
EventFriendCountWin *__cdecl EventFriendCountWin::CreateWin(PgFrameWork *pkFrameWork); // idb
EventFriendCountWin *__thiscall EventFriendCountWin::`scalar deleting destructor'(EventFriendCountWin *this, unsigned int a2);
// bool __usercall IsSpecialChar_1@<al>(char c1@<bl>, char c2); idb
// char __usercall IsSpecialCharInStr_1@<al>(char *pstr@<eax>);
char __thiscall IsSpecialCharInStr2_1(char *pstr);
// char __usercall IsPeculiarStr_1@<al>(char *pcName@<esi>);
void __thiscall GameFrameWork::AddGMUserChat(GameFrameWork *this, char *pcText); // idb
void __thiscall GameFrameWork::AddGMOtherUserChat(GameFrameWork *this, char *pcText); // idb
// void __userpurge GameFrameWork::AddAnnounceMsg(GameFrameWork *this@<ecx>, int a2@<edi>, int a3@<esi>, char *pxText, D3DXCOLOR TextColor);
void __thiscall GameFrameWork::AddSysMsg(GameFrameWork *this, const char *pcText); // idb
void __thiscall GameFrameWork::AddBattleMsg(GameFrameWork *this, char *pcText); // idb
void GameFrameWork::VaAddSysMsg(GameFrameWork *this, char *pcFormat, ...); // idb
void __thiscall GameFrameWork::AddAuthorMsg(GameFrameWork *this, char *pcText); // idb
// char __usercall IsChatCommandPrefix@<al>(char *pcText@<esi>, int *iPrefixLen);
// void __usercall StrCopyToSpace(char *pcDest@<ecx>, char *pcSrc@<eax>, int *iCount@<ebx>);
char __fastcall IsAllSpace(char *pcSrc);
char __cdecl GetShisperNameStrLen(char *pcText);
char __thiscall IsValidShisperChat(char *pcText);
// char __usercall IsShisperChat@<al>(char *pcText@<esi>, int *iTextLen);
// char __usercall IsVote@<al>(char *pcText@<esi>, int *iTextLen);
void __stdcall GameFrameWork::GetNameInStr(char *pcReturnID, char *pcInputStr);
void __stdcall GameFrameWork::FilteringWithoutID(char *pcText, char *pcCharID);
// char __usercall IsPartyChat@<al>(char *pcText@<esi>, int *iTextLen);
// char __usercall IsGuildChat@<al>(char *pcText@<esi>, int *iTextLen);
// char __usercall IsGuildAcademyChat@<al>(char *pcText@<esi>, int *iTextLen);
// char __usercall IsRaidChat@<al>(char *pcText@<esi>, int *iTextLen);
// char __usercall isreplyWhisperChat@<al>(char *pcText@<esi>, int *iTextLen@<edi>);
// char __usercall IsShoutChat@<al>(char *pcText@<esi>, int *iTextLen);
// char __usercall IsNormalChat@<al>(char *pcText@<esi>, int *iTextLen);
bool __stdcall GameFrameWork::DecodingClientOnlyChat(char *pcText);
bool __stdcall GameFrameWork::DecodingDebugChat(char *pcText);
void __thiscall GameFrameWork::AddSChatItemLink(GameFrameWork *this, int eType, SHINE_ITEM_STRUCT *pItem); // idb
void __thiscall ChatCommandList::InitPos(ChatCommandList *this); // idb
void __thiscall GameFrameWork::AddUserChat(GameFrameWork *this, char *pcText, char kChatID); // idb
void __thiscall GameFrameWork::AddOtherUserChat(GameFrameWork *this, char *pcText, char kChatID); // idb
void __thiscall GameFrameWork::AddUserChat(GameFrameWork *this, char *pcText); // idb
void __thiscall GameFrameWork::AddOtherUserChat(GameFrameWork *this, char *pcText); // idb
void __thiscall GameFrameWork::AddPartyChat(GameFrameWork *this, Name5 kCharID, char *pcText); // idb
void __thiscall GameFrameWork::AddRaidChat(GameFrameWork *this, Name5 kCharID, char *pcText); // idb
void __thiscall GameFrameWork::AddOtherRaidChat(GameFrameWork *this, Name5 kCharID, char *pcText); // idb
void __thiscall GameFrameWork::AddGuildChat(GameFrameWork *this, Name5 kCharID, char *pcText); // idb
void __thiscall GameFrameWork::AddOtherPartyChat(GameFrameWork *this, Name5 kCharID, char *pcText); // idb
void __thiscall GameFrameWork::AddOtherGuildChat(GameFrameWork *this, Name5 kCharID, char *pcText); // idb
void __thiscall GameFrameWork::AddGuildAcademyChat(GameFrameWork *this, Name5 kCharID, char *pcText); // idb
void __thiscall GameFrameWork::AddOtherGuildAcademyChat(GameFrameWork *this, Name5 kCharID, char *pcText); // idb
void __thiscall GameFrameWork::AddWhisperChat(GameFrameWork *this, Name5 kCharID, char *pcText); // idb
void __thiscall GameFrameWork::AddWhisperChat_To(GameFrameWork *this, Name5 kCharID, char *pcText); // idb
void __thiscall GameFrameWork::AddShoutChat(GameFrameWork *this, Name5 kCharID, char *pcText); // idb
void __thiscall GameFrameWork::AddGMWhisperChat(GameFrameWork *this, Name5 kCharID, char *pcText); // idb
void __thiscall GameFrameWork::AddGMWhisperChat_To(GameFrameWork *this, Name5 kCharID, char *pcText); // idb
void __thiscall GameFrameWork::AddGMShoutChat(GameFrameWork *this, Name5 kCharID, char *pcText); // idb
void __thiscall GameFrameWork::SetSaveChatComList(GameFrameWork *this, bool bSave); // idb
char *__thiscall ChatCommandList::GetUpCommand(ChatCommandList *this);
char *__thiscall ChatCommandList::GetDownCommand(ChatCommandList *this);
void __thiscall GameFrameWork::UpdateCheckTab(GameFrameWork *this); // idb
// bool __usercall IsChatCommand@<al>(unsigned int eTextID@<eax>, char *pcChatText, int *iTextLen);
char __thiscall GameFrameWork::SetPrisonInfo(GameFrameWork *this, char *pcText, bool bAdd);
char *__thiscall GameFrameWork::SmartWhisper::GetLast(GameFrameWork::SmartWhisper *this); // idb
char *__thiscall GameFrameWork::SmartWhisper::GetPrev(GameFrameWork::SmartWhisper *this); // idb
char *__thiscall GameFrameWork::SmartWhisper::GetNext(GameFrameWork::SmartWhisper *this); // idb
void __thiscall GameFrameWork::UpdateSmartReply(GameFrameWork *this); // idb
void __thiscall GameFrameWork::UpdateSmartWhisper(GameFrameWork *this); // idb
char __thiscall GameFrameWork::DecodingAuthorChat(GameFrameWork *this, char *pcText);
void __thiscall ChatCommandList::ChatCommandList(ChatCommandList *this); // idb
void __thiscall ChatCommandList::~ChatCommandList(ChatCommandList *this); // idb
void __thiscall ChatCommandList::Clear(ChatCommandList *this); // idb
void __thiscall ChatCommandList::AddText(ChatCommandList *this, const char *pText); // idb
void __thiscall GameFrameWork::SmartWhisper::MarkAsRecentlyUsed(GameFrameWork::SmartWhisper *this, char *pcWhisperID); // idb
bool __thiscall GameFrameWork::DecodingCmdChat(GameFrameWork *this, char *pcText); // idb
void __thiscall GameFrameWork::DecodingChat(GameFrameWork *this, char *pcText, char *pcDefaultCmd, char *pcCharID); // idb
void __cdecl WhileSpace(char **pcText); // idb
void __thiscall Server::SetOneDayTime(Server *this, float fOneDayTime); // idb
void __thiscall Server::SetTimeTest(Server *this, bool bTest); // idb
void __thiscall Server::SetCurrentTime(Server *this, int nHour, int nMinute); // idb
void __thiscall TutorialMgr::TutorialMgr(TutorialMgr *this); // idb
TutorialMgr *__cdecl TutorialMgr::GetTutorialMgr(); // idb
bool __thiscall ChatBlockListWin::IsRestrictID(ChatBlockListWin *this, Name5 kCharID); // idb
void __thiscall std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::_Splice_same(std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *this, std::_List_const_iterator<std::_List_val<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > > _Where, std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *_Right, std::_List_const_iterator<std::_List_val<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > > _First, std::_List_const_iterator<std::_List_val<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > > _Last, unsigned int _Count); // idb
ScenarioMgr *__cdecl ScenarioMgr::GetScenarioMgr(); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__cdecl std::_Move<std::basic_string<char,std::char_traits<char>,std::allocator<char>> *,std::basic_string<char,std::char_traits<char>,std::allocator<char>> *>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_First, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Last, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Dest);
std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *__stdcall std::_List_val<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::_Buynode<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>(std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *_Next, std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *_Prev, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Val);
void GameFrameWork::OnF7();
void GameFrameWork::OnF8();
void GameFrameWork::OnF9();
void __thiscall GameFrameWork::OnF10(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnF11(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnF12(GameFrameWork *this); // idb
signed int __cdecl GatherInfoTable::MapMobTypeToGatherType(MobType eType);
void __thiscall GatheringTask::OnStart(GatheringTask *this); // idb
void __cdecl HSDebug_Log(char *pPath);
void __thiscall GameFrameWork::ApplyShortCutSizeData(GameFrameWork *this); // idb
void __thiscall GameFrameWork::ApplyKeyMappingData(GameFrameWork *this); // idb
void __thiscall GameFrameWork::RegistereWinPostion(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnSaveServerShortCutDataOption(GameFrameWork *this); // idb
PgWin *__thiscall GameFrameWork::GetWinPosByOption(GameFrameWork *this, unsigned int index); // idb
void __thiscall GameFrameWork::SetRewardWinQuestID(GameFrameWork *this, unsigned __int16 hQuestID); // idb
void __thiscall GameFrameWork::ApplyWindowPosData(GameFrameWork *this); // idb
void __thiscall GameFrameWork::TerminateNet(GameFrameWork *this); // idb
char __thiscall GameFrameWork::InitInput(GameFrameWork *this);
void __thiscall GameFrameWork::TerminateInput(GameFrameWork *this); // idb
void GameFrameWork::TerminateWorld();
// void __usercall GameFrameWork::TerminateCharacter(GameFrameWork *this@<ecx>, int a2@<edi>);
void __thiscall GameFrameWork::InitNewCharCreate(GameFrameWork *this); // idb
void __thiscall GameFrameWork::TerminateSystem(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnSaveServerShortCutSizeOption(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnSaveServerWindowPosOption(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnSaveServerKeyRemappingOption(GameFrameWork *this); // idb
void GameFrameWork::OnSaveServerGameOption();
GatherInfo *__stdcall GatheringTask::FindGatherInfo(GatherType eType, int nItemID);
char __thiscall GameFrameWork::InitNet(GameFrameWork *this);
// void __usercall GameFrameWork::ChangeWinDefaultPos(GameFrameWork *this@<ecx>, signed int a2@<esi>);
void __thiscall GameFrameWork::SetWindowsPosOption(GameFrameWork *this); // idb
char GameFrameWork::InitWorld();
char __thiscall GameFrameWork::InitCharacter(GameFrameWork *this);
char __thiscall GameFrameWork::InitSystem(GameFrameWork *this);
void __thiscall GameFrameWork::TerminateWindow(GameFrameWork *this); // idb
void __thiscall GameFrameWork::Terminate(GameFrameWork *this); // idb
// char __usercall GameFrameWork::InitWindow@<al>(GameFrameWork *this@<ecx>, int a2@<ebx>);
// char __userpurge GameFrameWork::Init@<al>(GameFrameWork *this@<ecx>, int a2@<ebx>, signed int a3@<esi>, PgMsg::Frame *ptFrameMsg);
bool __thiscall GatheringTask::OnProcessNetMsg(GatheringTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData); // idb
GatherInfo *__stdcall GatheringTask::FindGatherInfo(GatherType eType, int *bIsItemUsable);
void __thiscall GatheringTask::DirectMessage(GatheringTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
MobInfo *__cdecl IIDTableBase<MobInfo,MobInfoTab,unsigned short>::GetByID(int uiId);
void __cdecl MachineOpt::SetViewTerrainLength(float fLength); // idb
void __thiscall NiTListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::~NiTListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>(NiTListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> > *this); // idb
NiTListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> > *__thiscall NiTListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::`scalar deleting destructor'(NiTListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> > *this, unsigned int a2);
NiPointer<MapNavigator> *__cdecl MapNavigator::GetMapNavigator(NiPointer<MapNavigator> *result); // idb
NiAVObject *__thiscall NiNode::GetAt(NiNode *this, unsigned int i); // idb
void ShineLogDisplay::Log(ShineLogDisplay *this, char *pcStr, ...); // idb
unsigned int __cdecl ITableBase<MapViewInfo,MapViewInfoTab>::GetTotal(); // idb
unsigned int __cdecl ITableBase<GatherInfo,GatherInfoTable>::GetTotal(); // idb
void __thiscall PgWin::InitPosLeftTop(PgWin *this, unsigned int uiScreenWidth, unsigned int uiScreenHeight, float fXPosRate, float fYPosRate); // idb
void __thiscall PgWin::InitPosRightTop(PgWin *this, unsigned int uiScreenWidth, unsigned int uiScreenHeight, float fXPosRate, float fYPosRate); // idb
void __thiscall PgWinBar::OnChangeValue(PgWinBar *this); // idb
ItemInfo *__cdecl IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(int kItemID);
void __cdecl MachineOpt::SetGraphicOption(MachineOpt::GraphicOption *kGraphicOption); // idb
NiTPointerListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> > *__thiscall NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::`scalar deleting destructor'(NiTPointerListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> > *this, unsigned int a2);
MapViewInfo *__cdecl MapViewInfoTab::GetByMapName(Name3 *kMapName); // idb
signed __int16 __cdecl GatherInfoTable::GetSkillIDByType(GatherType eType);
void __thiscall NiTList<NiPointer<ITask>>::~NiTList<NiPointer<ITask>>(NiTList<NiPointer<ITask> > *this); // idb
void __thiscall ITask::~ITask(ITask *this); // idb
void __thiscall ProductTask::OnStart(ProductTask *this); // idb
ActiveSkillInfo *__cdecl IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::GetByID(int uiId);
void __thiscall ProductTask::DirectMessage(ProductTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
bool __thiscall ProductTask::OnProcessNetMsg(ProductTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData); // idb
std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >,bool> *__thiscall std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *this, std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >,bool> *result, std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *_Node, bool _Leftish); // idb
std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *__thiscall std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *this, unsigned int *_Val); // idb
void __thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::_Erase(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > *this, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *_Rootnode); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,CAbstractProperty *>>,0>>::erase(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > _Where); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::erase(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > _Last); // idb
void __thiscall std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>>::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>>(CSingleDataMap *this); // idb
BOOL __thiscall NiPoint3::operator==(NiPoint3 *this, NiPoint3 *pt);
// void __usercall GameFrameWork::AddPopupMenu_Metamorphosis(GameFrameWork *this@<ecx>, int a2@<edi>);
// void __usercall GameFrameWork::AddPopupMenu_CharName(GameFrameWork *this@<ecx>, int a2@<edi>);
// void __usercall GameFrameWork::AddPopupMenu_Whisper(GameFrameWork *this@<ecx>, int a2@<edi>);
// void __usercall GameFrameWork::AddPopupMenu_PartyBuff(GameFrameWork *this@<ecx>, int a2@<edi>);
void __thiscall GameFrameWork::AddPopupMenu_Follow(GameFrameWork *this); // idb
// void __usercall GameFrameWork::AddPopupMenu_Vote(GameFrameWork *this@<ecx>, int a2@<edi>);
// void __usercall GameFrameWork::AddPopupMenu_Cancel(GameFrameWork *this@<ecx>, int a2@<edi>);
void __thiscall GameFrameWork::SetResListDefault(GameFrameWork *this); // idb
KeyMap *__thiscall GameFrameWork::GetKeyMap(GameFrameWork *this); // idb
void __thiscall GameFrameWork::SetPopupInfo(GameFrameWork *this, char *pcName); // idb
// void __usercall GameFrameWork::AddPopupMenu_Collection(GameFrameWork *this@<ecx>, MHDiceGameTask *a2@<edi>);
// void __usercall GameFrameWork::AddPopupMenu_Trade(GameFrameWork *this@<ecx>, MHDiceGameTask *a2@<edi>);
// void __usercall GameFrameWork::AddPopupMenu_InviteGuild(GameFrameWork *this@<ecx>, MHDiceGameTask *a2@<edi>);
// void __usercall GameFrameWork::AddPopupMenu_InviteParty(GameFrameWork *this@<ecx>, MHDiceGameTask *a2@<edi>);
// void __usercall GameFrameWork::AddPopupMenu_InviteFriend(GameFrameWork *this@<ecx>, MHDiceGameTask *a2@<edi>);
// void __usercall GameFrameWork::AddPopupMenu_Party(GameFrameWork *this@<ecx>, MHDiceGameTask *a2@<edi>);
// void __usercall GameFrameWork::AddPopupMenu_Raid(GameFrameWork *this@<ecx>, MHDiceGameTask *a2@<edi>);
void __thiscall GameFrameWork::AddPopupMenu_InviteHolyPromise(GameFrameWork *this); // idb
void __thiscall GameFrameWork::AddPopupMenu_RideOn(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenResolutionPopup(GameFrameWork *this); // idb
bool GameFrameWork::IsCapableKeyControl();
char GameFrameWork::UpdateCursorState();
int __cdecl GameFrameWork::CollisionCallback(NiCollisionGroup::Intersect *kIntersect); // idb
void __thiscall GameFrameWork::OnPickGround(GameFrameWork *this, NiPoint3 *kGroundPos, bool bViewPoint); // idb
char __thiscall GameFrameWork::OnOnePickChar(GameFrameWork *this, Char *pkChar);
void __thiscall GameFrameWork::OnDoublePickChar(GameFrameWork *this, Char *pkChar); // idb
void __thiscall GameFrameWork::OnPickDropItem(GameFrameWork *this, DropItem *pkDropItem); // idb
// void __userpurge GameFrameWork::OpenCharPopupMenu(GameFrameWork *this@<ecx>, MHDiceGameTask *a2@<edi>, char *pcName);
// void __userpurge GameFrameWork::OpenRaidMemberPopupMenu(GameFrameWork *this@<ecx>, MHDiceGameTask *a2@<edi>, char *pcName);
// void __userpurge GameFrameWork::OpenKQTeamPopupMenu(GameFrameWork *this@<ecx>, MHDiceGameTask *a2@<edi>, char *pcName);
char __stdcall GameFrameWork::TranslatePickedMHObj(NiPoint3 *kGroundPos);
void __thiscall GameFrameWork::OnPickChar(GameFrameWork *this, Char *pkChar); // idb
void __thiscall GameFrameWork::OnPickCharWithRBut(GameFrameWork *this, Char *pkChar); // idb
char __thiscall GameFrameWork::ProcessMHInput(GameFrameWork *this, World::PickEnum ePick, NiPoint3 *kOrigin, NiPoint3 *kDir, Char **pkChar, NiPoint3 *kGroundPos, DropItem **pkDropItem);
void __thiscall GameFrameWork::SetMHRClickMenu(GameFrameWork *this, mhObject *pPickedObj); // idb
void __thiscall GameFrameWork::OnPickMiniHouse(GameFrameWork *this, unsigned __int16 hMinihouse); // idb
void __thiscall GameFrameWork::ProcessInput(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenMHPopupMenuWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenWingStonePlacePopup(GameFrameWork *this); // idb
void __cdecl Singleton<CursorState>::getInstance();
MapInfo *__cdecl IIDTableBase<MapInfo,MapInfoTab,unsigned short>::GetByID(int uiId);
NiPoint3 *__thiscall NiCamera::GetWorldDirection(NiCamera *this, NiPoint3 *result); // idb
NiPoint3 *__thiscall Char::GetDirToChar(Char *this, NiPoint3 *result, Char *pkChar); // idb
void __thiscall GameFrameWork::sRideOffValue::SetMove(GameFrameWork::sRideOffValue *this, NiPoint3 *kGroundPos, bool bViewPoint); // idb
void __thiscall mhMouseControlWin::SetCtrlDown(mhMouseControlWin *this, int b);
void __thiscall GTRequestListWin::EditKillForus(GTRequestListWin *this); // idb
void __thiscall ChatDisplayWin2::ShowChatEditBox(ChatDisplayWin2 *this, bool b); // idb
void __thiscall GuildListWin::EditKillForus(GuildListWin *this); // idb
char __thiscall StatusBuffWin::GetCursorStateOnPanel(StatusBuffWin *this); // idb
NiPointer<MHDiceGameTask> *__cdecl MHDiceGameTask::GetDiceGameTask(NiPointer<MHDiceGameTask> *result); // idb
void __thiscall World::SetMoveTargetPointPos(World *this, NiPoint3 kPos); // idb
void __thiscall World::ShowMoveTargetPoint(World *this, NiPoint3 kPos); // idb
MiniHouseObjAni *__cdecl ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::GetByIndex(unsigned int uiIndex); // idb
BasicInfoLinkType __cdecl BasicInfoLinkTab::GetbyCType(BIL_C_Type eType, char *pkCValue); // idb
MiniHouseObjAni *__cdecl MiniHouseObjAniInfoTab::GetObjInfobyAniGroup(unsigned __int16 ItemID, unsigned int uiAniGroupID, unsigned int uiGroupIndex); // idb
MiniHouseFurniture *__cdecl MiniHouseFuritureInfoTab::GetObjByName(char *acName); // idb
BOOL __cdecl std::operator!=<char,std::char_traits<char>,std::allocator<char>>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Left, const char *_Right);
stMINIHOUSEINFO *__thiscall CGuildMonster::GetGuildEumFromMob(CMiniHouseMgr *this, unsigned __int16 kHandle); // idb
void __thiscall PartyWinInterface::OpenPopMenuParty(PartyWinInterface *this, char *pcName); // idb
void __thiscall GuildJoinReqTask::SetTargetID(GuildJoinReqTask *this, char *pcName); // idb
void __thiscall ServerMenuWin::CancelServerMenuWin(ServerMenuWin *this); // idb
void GameFrameWork::ClientSecurity();
void __thiscall GameFrameWork::KarisDivide_OK(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenChargedItemListWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenChatEditWin(GameFrameWork *this, const char *szText); // idb
void __thiscall GameFrameWork::OnOpenSlashStartChat(GameFrameWork *this, const char *szText); // idb
void __thiscall GameFrameWork::OnOpenAutoWhisperChat(GameFrameWork *this, const char *szText); // idb
void __thiscall GameFrameWork::CloseCharInfoWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenKQuestTimeWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenShortCutSubWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenShortCutPanelTurn(GameFrameWork *this, ShortCutWin *targetWin, ShortCutWin *hideWin); // idb
void __thiscall GameFrameWork::OnOpenShortCutSubPanelTurn(GameFrameWork *this, ShortCutWin *targetWin, ShortCutWin *hideWin); // idb
void __thiscall GameFrameWork::OnReflashShortCutWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnCloseMHInputPassWordWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::CloseNpcDlgWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::CloseMHInfoWin(GameFrameWork *this, bool bNoDefault); // idb
void __thiscall GameFrameWork::OpenReportWin(GameFrameWork *this); // idb
bool __thiscall GameFrameWork::OpenWingStoneMapWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::CloseWingStoneMapWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenMiniPartyWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenItemMallWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenSystemWin(GameFrameWork *this); // idb
// void __usercall GameFrameWork::OnCharSelect(GameFrameWork *this@<ecx>, int a2@<ebx>, int a3@<edi>);
void __thiscall GameFrameWork::OnErrorGotoAccount(GameFrameWork *this); // idb
void GameFrameWork::OnErrorGotoExit();
void __thiscall GameFrameWork::OnOpenDivideWin(GameFrameWork *this, PgWin *pkCallerWin, unsigned int uiMsg, unsigned int uiMax, char *pcText, unsigned int uiMode); // idb
void __thiscall GameFrameWork::OnOpenInputTextWin(GameFrameWork *this, PgWin *pkCallerWin, unsigned int uiMsg, char *pcText); // idb
void __thiscall GameFrameWork::OnOpenMoneyWin(GameFrameWork *this, PgWin *pkCallerWin, unsigned int uiOKMsg, unsigned int uiCancelMsg, char *pcText, char *pcText2); // idb
void __thiscall GameFrameWork::OnOpenHolyRewardMoneyWin(GameFrameWork *this, unsigned int uiOKMsg, unsigned int uiCancelMsg, char *pcText1, char *pcText2); // idb
void __thiscall GameFrameWork::CloseEnchantGemWin(GameFrameWork *this, bool bEnchantWin, bool bDelteteWin); // idb
void __thiscall GameFrameWork::CloseWeapontitleWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenMiniHouseInventoryWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::CloseInventoryWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenCalculatorWin(GameFrameWork *this, PgWin *pkCallerWin, unsigned int uiMsg, unsigned int uiMax, char *pcText); // idb
void __thiscall GameFrameWork::UnEquip(GameFrameWork *this, unsigned int uiEquipPos); // idb
void __thiscall GameFrameWork::OpenKDQuestWin(GameFrameWork *this, bool bJoin); // idb
void __thiscall GameFrameWork::OpenQuestWin(GameFrameWork *this, bool bSelectTab, int SelectIdx); // idb
void __thiscall GameFrameWork::CloseQuestWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenHelpWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::CloseHelpWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenHelpWin(GameFrameWork *this, BasicInfoLinkType Type); // idb
void __thiscall GameFrameWork::OpenPlayGuideSearchList(GameFrameWork *this, char *acUIFile); // idb
void __thiscall GameFrameWork::CloseWingStoneWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenForumWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::CloseForumWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenShopWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::CloseShopWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::CloseKDQuestWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenActionWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::CloseActionWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::SetTopFriendAddWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::CloseFriendAddWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::CloseChatBlockListWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::UpdateChatBlockListWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenRaidMemberAddWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::CloseRaidMemberAddWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::CloseMysteryVaultWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenMapLinkGateWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::CloseMapLinkGateWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::CloseHolyPromiseAddWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::SetTopHolyPromiseAddWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::ActivateRaidWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::CloseCommunityWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOptionWinApply(GameFrameWork *this, int nType); // idb
void __thiscall GameFrameWork::OnOptionWinDefaultSetting(GameFrameWork *this, int nType); // idb
void __thiscall GameFrameWork::OpenGameOptionWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenGraphicOptionWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenSoundOptionWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenKeyRemappingOptionWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::CloseOptionWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcQuestGiveUpReq(GameFrameWork *this, unsigned __int16 nQuestID); // idb
void __thiscall GameFrameWork::NcQuestClientScenarioDoneReq(GameFrameWork *this, unsigned __int16 kID); // idb
void __thiscall GameFrameWork::NcMiscHideExceptMeCmd(GameFrameWork *this, bool bOn); // idb
void __thiscall GameFrameWork::NcQuestScriptCmdAck(GameFrameWork *this, unsigned __int16 kID, char byScriptCmd, unsigned int dwResult); // idb
void __thiscall GameFrameWork::SetWingStonePlaceList(GameFrameWork *this, unsigned int uiParam); // idb
void __thiscall GameFrameWork::SendOwnerBlogAddrReq(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnCloseJoinWin(GameFrameWork *this); // idb
void GameFrameWork::MHObjFocusCancel();
void GameFrameWork::MHObjUsePortal();
void __thiscall GameFrameWork::OnShowMakeKarisWin(GameFrameWork *this, bool bShow); // idb
void __thiscall GameFrameWork::SetInvLockAllItems(GameFrameWork *this, bool b); // idb
void __thiscall GameFrameWork::OnOpenEnchantGemWin(GameFrameWork *this, SHINE_ITEM_STRUCT kStruct, void *pvBody, unsigned int UI_TYPE); // idb
void __thiscall GameFrameWork::OnCloseEnchantGemToolTip(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenQuestNewsWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::CloseQuestNewsWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenPlayGuideMinWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::ClosePlayGuideMinWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenPlayGuideWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::ClosePlayGuideWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::RefreshHotKey(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenCollectWin(GameFrameWork *this, bool bOpen); // idb
void __thiscall GameFrameWork::OpenCollectPeepingWin(GameFrameWork *this, bool bOpen); // idb
void __thiscall GameFrameWork::OnOpenAttendIconWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenAttendRewardWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenAttendCheckWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenReviveMenuWin(GameFrameWork *this, bool bShow); // idb
void __thiscall GameFrameWork::OnOpenRebirthMenuWin(GameFrameWork *this, bool bShow); // idb
void __thiscall GameFrameWork::OpenKQScoreWin(GameFrameWork *this, bool b); // idb
void __thiscall GameFrameWork::SetInventoryNewMark(GameFrameWork *this); // idb
void __thiscall GameFrameWork::CloseClassChangeWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenKDTeamScoreWin(GameFrameWork *this, bool bOpen); // idb
void __thiscall GameFrameWork::GuildEmblemShowWin(GameFrameWork *this, bool bShow); // idb
void __thiscall GameFrameWork::PartyScoreShowWin(GameFrameWork *this, bool bShow); // idb
void __thiscall GameFrameWork::IDRankingShowWin(GameFrameWork *this, bool bShow); // idb
void __thiscall GameFrameWork::ChatItemLink(GameFrameWork *this, char *pText, SHINE_ITEM_STRUCT *rItemStruct); // idb
void __thiscall GameFrameWork::LinkItemShowWin(GameFrameWork *this, bool bShow); // idb
bool __thiscall GameFrameWork::IsItemInfoWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::ClickLinkItemInfo(GameFrameWork *this, Item *pItem, int iX, int iY); // idb
bool __thiscall GameFrameWork::IsRoarShowWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenPrivateStoreWinKey(GameFrameWork *this); // idb
void __thiscall GameFrameWork::SetOptionResolution(GameFrameWork *this, unsigned int uiWidth, unsigned int uiHeight); // idb
void __thiscall GameFrameWork::OpenCharInfoWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenCharInfoWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenMiniHouseInventoryWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenSkillWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenQuestWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenHelpWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnDeleteMHItem(GameFrameWork *this); // idb
void GameFrameWork::JoinDiceGameReq();
void __thiscall GameFrameWork::OnOpenDiceRewardWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenDiceExpectWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenMiniPartyWinKey(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenForumWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenItemShopWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnTab_Key(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnKeyDownMoveFront(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnKeyDownMoveBack(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnKeyDownMoveRight(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnKeyDownMoveLeft(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnKeyDownJump(GameFrameWork *this); // idb
void GameFrameWork::ChangeRun();
void GameFrameWork::ChangeWalk();
void __thiscall GameFrameWork::OnHPSoulStoneUse_Key(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnSPSoulStoneUse_Key(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenEnchantGemWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenWeapontitleWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenInventoryWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::CloseShopMenu(GameFrameWork *this, bool bSendEndOfTrade); // idb
void __thiscall GameFrameWork::OpenSkillShopMenu(GameFrameWork *this); // idb
void __thiscall GameFrameWork::CloseSkillShopMenu(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenSoulStoneShopMenu(GameFrameWork *this); // idb
void __thiscall GameFrameWork::CloseSoulStoneShopMenu(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenStorageMenu(GameFrameWork *this, char byTargetPage); // idb
void __thiscall GameFrameWork::CloseStorageMenu(GameFrameWork *this); // idb
void __thiscall GameFrameWork::CloseItemShopWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenCharInfoWinKey(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenSkillWinKey(GameFrameWork *this); // idb
// void __userpurge GameFrameWork::OpenQuestWin(GameFrameWork *this@<ecx>, int a2@<ebx>, int a3@<edi>, int iSelectID, int iSelectTab);
void __thiscall GameFrameWork::OpenFriendAddWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenChatBlockListWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenMysteryVaultWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenHolyPromiseAddWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenItemUpgradeWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenMoverUpgradeWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnPartyJoinProposeAccept(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnPartyJoinProposeReject(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnTradeProposeAskAccept(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnTradeProposeAskReject(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnFriendConfirmReqYes(GameFrameWork *this, unsigned int lParam); // idb
void __thiscall GameFrameWork::OnFriendConfirmReqNo(GameFrameWork *this, unsigned int lParam); // idb
void __thiscall GameFrameWork::OnFriendDeleteYse(GameFrameWork *this, unsigned int lParam); // idb
void __thiscall GameFrameWork::OnOpenItemMixWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnCloseItemMixWin(GameFrameWork *this, bool bSendEndofTrade); // idb
void __thiscall GameFrameWork::OnPopupProposeTrade(GameFrameWork *this, Char *pkTarget); // idb
void __thiscall GameFrameWork::OnTimerTradeReject(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnSpace(GameFrameWork *this); // idb
char GameFrameWork::CancelCharSelect();
void __thiscall GameFrameWork::OnWhisperChatStart(GameFrameWork *this, const char *charName); // idb
// void __usercall GameFrameWork::MiniHouseIndoorModeOut(GameFrameWork *this@<ecx>, MHDiceGameTask *a2@<edi>);
void __thiscall GameFrameWork::SendKickReq(GameFrameWork *this, unsigned __int16 KickedChar); // idb
// void __userpurge GameFrameWork::OnOpenMHPopUpMenuObjAction(GameFrameWork *this@<ecx>, int a2@<ebx>, int a3@<edi>, char *pObjName, mhObject *pkObj, bool bCanHold, bool bCanAni);
void __thiscall GameFrameWork::MinimizeMHWins(GameFrameWork *this, unsigned int uiwParam); // idb
void __thiscall GameFrameWork::NormalizeMHWins(GameFrameWork *this, unsigned int uiwParam); // idb
void __thiscall GameFrameWork::OnOpenGuildTournamentStorage(GameFrameWork *this); // idb
void GameFrameWork::OnCloseGTStorageWin();
void __thiscall GameFrameWork::OnOpenGuildAcademyStorage(GameFrameWork *this); // idb
void GameFrameWork::OnCloseGuildAcademyStorage();
void __thiscall GameFrameWork::OpenMHRepairWin(GameFrameWork *this, bool b, bool bRepairing); // idb
void __thiscall GameFrameWork::SendMHRepairReq(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnMapLogInError(GameFrameWork *this); // idb
void __thiscall GameFrameWork::SendAutoPickItemReq(GameFrameWork *this, bool bAutoPickItem); // idb
void __thiscall GameFrameWork::CloseMinimonAutoUseWin(GameFrameWork *this); // idb
int __thiscall GameFrameWork::GetSoulCount(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenEnchantGemToolTip(GameFrameWork *this, Item *pkItem); // idb
void __thiscall GameFrameWork::OpenPlayGuideWin(GameFrameWork *this, BasicInfoLinkType eType); // idb
void __thiscall GameFrameWork::OnOpenCollectWin(GameFrameWork *this); // idb
bool __thiscall GameFrameWork::GetOpenPlayGuideCheck(GameFrameWork *this, BasicInfoLinkType eType); // idb
void __thiscall GameFrameWork::OnSoloModeKey(GameFrameWork *this); // idb
// void __usercall GameFrameWork::OnOpenRestHouseKey(GameFrameWork *this@<ecx>, double a2@<st0>);
void __thiscall GameFrameWork::SetOptionResolution(GameFrameWork *this, unsigned int uiParam); // idb
void __thiscall GameFrameWork::OnOpenInventoryWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenActionWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenMHConfigRoomInfoWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenMHInputPassWordWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnArrToInvMHItem(GameFrameWork *this); // idb
// void __userpurge GameFrameWork::ReArrangeMHObj(GameFrameWork *this@<ecx>, int a2@<ebx>, mhObject *pkObj);
void __thiscall GameFrameWork::SendDelMHObjReq(GameFrameWork *this, bool ClickInv); // idb
void __thiscall GameFrameWork::OnOpenMiniHouseMenuWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnGoBeautyShop(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnGoCharSelect(GameFrameWork *this); // idb
// void __usercall GameFrameWork::OnLogout(GameFrameWork *this@<ecx>, MHDiceGameTask *a2@<edi>);
// void __usercall GameFrameWork::OnExit(GameFrameWork *this@<ecx>, MHDiceGameTask *a2@<edi>);
char __thiscall GameFrameWork::OnShortCutRClickItemUseMode(GameFrameWork *this, Item *pkItem, ShortCutItem *pkSenderShortCut, unsigned int uiUser);
void __thiscall GameFrameWork::OnShortCutRClickItemNormalMode(GameFrameWork *this, Item *pkItem, ShortCutItem *pkSenderShortCut, unsigned int uiUser); // idb
void __thiscall GameFrameWork::OnShortCutRClickItemNormalMode(GameFrameWork *this, Item *pkItem, ShortCutInvPosItem *pkSenderShortCut, unsigned int uiUser); // idb
void __stdcall GameFrameWork::ChangeMoveMode(int nMode);
void __thiscall GameFrameWork::OnWalkOrRun_Key(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnNearMobSelect(GameFrameWork *this); // idb
// void __usercall GameFrameWork::OnOpenPrivateStoreWinBuy(GameFrameWork *this@<ecx>, int a2@<edi>);
// void __usercall GameFrameWork::OnOpenPrivateStoreWinSell(GameFrameWork *this@<ecx>, int a2@<edi>);
void __thiscall GameFrameWork::OnOpenPrivateStoreWinSearch(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenInventoryWinKey(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnPauseEmotion(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenActionWinKey(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenCommunityWin(GameFrameWork *this, DirectUserMsgBody_CommunityTabChanged::TabEnum eTab); // idb
void __thiscall GameFrameWork::OpenRidePetWin(GameFrameWork *this, unsigned int uiPetID); // idb
void __thiscall GameFrameWork::CloseItemUpgradeWin(GameFrameWork *this, bool bSendEndofTrade); // idb
void __thiscall GameFrameWork::CloseMoverUpgradeWin(GameFrameWork *this, bool bSendEndofTrade); // idb
void __thiscall GameFrameWork::OnFriendDelete(GameFrameWork *this, Name5 kCharID); // idb
void __thiscall GameFrameWork::NcScenarioAreaEntryAck(GameFrameWork *this, const char *szAreaName); // idb
void __thiscall GameFrameWork::NcScenarioAreaLeaveAck(GameFrameWork *this, const char *szAreaName); // idb
char __thiscall GameFrameWork::TargetCharReq(GameFrameWork *this, Char *pkChar);
void __thiscall GameFrameWork::OnEquipChangeMiniMon(GameFrameWork *this, Item *pkItem); // idb
// void __userpurge GameFrameWork::OpenCollectCardWin(GameFrameWork *this@<ecx>, double a2@<st0>, bool bOpen, unsigned int uiCardID, unsigned int uiStar, unsigned int uiSerial, int bBlind);
void __thiscall GameFrameWork::OpenFeedMoverWin(GameFrameWork *this, unsigned __int16 kMoverHandle, unsigned int uiLevel); // idb
void __thiscall GameFrameWork::OnOpenMiniHouseWinKey(GameFrameWork *this); // idb
void GameFrameWork::SendmhObjActReq();
// void __userpurge GameFrameWork::OnOpenMHPopUpMenuInvObjWin(GameFrameWork *this@<ecx>, int a2@<ebx>, int a3@<edi>, bool bArranged, int SelItemID);
void __thiscall GameFrameWork::OpenMHInfoWin(GameFrameWork *this, DirectUserMsgBody_MHInfoTabChanged::TabEnum eTab); // idb
void __thiscall GameFrameWork::OnOpenFriendWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenGuildWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenHolyPromise(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenGuildAcademy(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenPartyMatching(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenWedding(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnShortCutSkillUse(GameFrameWork *this, unsigned int iIndex, unsigned int uiUser); // idb
void __thiscall GameFrameWork::OnOpenPrivateStoreWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenShopMenu(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenItemShopWin(GameFrameWork *this, unsigned __int16 handle); // idb
void __thiscall GameFrameWork::OnOpenFriendWinKey(GameFrameWork *this); // idb
void __thiscall GameFrameWork::ActivateCommunityWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::CloseRidePetWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnF1(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnF2(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnF3(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnF4(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnF5(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnF6(GameFrameWork *this); // idb
void __thiscall GameFrameWork::MHWinInfoToSettingSync(GameFrameWork *this); // idb
void __thiscall GameFrameWork::CloseFeedMoverWin(GameFrameWork *this); // idb
// void __usercall GameFrameWork::OnGameStart(GameFrameWork *this@<ecx>, int a2@<edi>);
void __thiscall GameFrameWork::OnCloseMHConfigRoomInfoWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenMHItemInvenWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnCloseMHItemInvenWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::SetPlayGuideSkipList(GameFrameWork *this); // idb
// void __usercall GameFrameWork::OnEscape(GameFrameWork *this@<ecx>, double a2@<st0>);
char __thiscall GameFrameWork::OpenPetDialog(GameFrameWork *this, unsigned __int16 kPetHandle, Name4 kPetName);
void __thiscall GameFrameWork::SendMHBuildingOrFixReq(GameFrameWork *this, unsigned int uiwParam); // idb
void __thiscall GameFrameWork::OpenCollectPopupWin(GameFrameWork *this, unsigned int uiCardID); // idb
// void __userpurge GameFrameWork::ProcessMsg(GameFrameWork *this@<ecx>, double a2@<st0>, unsigned int uiMsg, unsigned int uiwParam, unsigned int uilParam);
void __thiscall GameFrameWork::OnNpcDialogCommand(GameFrameWork *this, DirectUserMsgBody_NpcDialogResponse *pkBody); // idb
void __thiscall GameFrameWork::DirectMessage(GameFrameWork *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
NiRTTI *NiIntegerExtraData::GetRTTI();
ActionViewInfo *__cdecl IIDTableBase<ActionViewInfo,ActionViewTable,unsigned short>::GetByID(int uiId);
void __thiscall NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *>::~NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *>(NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *> *this); // idb
NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *> *__thiscall NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *>::`vector deleting destructor'(NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *> *this, unsigned int a2);
void __thiscall Name4::Name4(Name4 *this, const char *str); // idb
void __thiscall MiniHouseIndoor::SetBuildingRoomInfo(MiniHouseIndoor *this, PROTO_NC_MINIHOUSE_BUILDING_REQ k); // idb
void __thiscall KeyboardMoveProcess::Clear(KeyboardMoveProcess *this); // idb
Name5 *__thiscall Party::GetJoinProposeCharID(Party *this, Name5 *result); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>::~NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>(NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int> *this); // idb
void __thiscall NiTListBase<DFALL<PgWin *>,PgWin *>::~NiTListBase<DFALL<PgWin *>,PgWin *>(NiTListBase<DFALL<PgWin *>,PgWin *> *this); // idb
unsigned int __cdecl ITableBase<MobViewInfo,MobViewInfoTab>::GetTotal(); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int> *this, unsigned int a2);
NiTListBase<DFALL<PgWin *>,PgWin *> *__thiscall NiTListBase<DFALL<PgWin *>,PgWin *>::`vector deleting destructor'(NiTListBase<DFALL<PgWin *>,PgWin *> *this, unsigned int a2);
void __thiscall NiTPointerList<unsigned int>::~NiTPointerList<unsigned int>(NiTPointerList<unsigned int> *this); // idb
void __thiscall MHDiceRewardMoneyWin::SetAmout(MHDiceRewardMoneyWin *this, unsigned __int64 money); // idb
void __thiscall AnnounceWin::KillNoticing(AnnounceWin *this); // idb
void __thiscall NiTPointerListBase<DFALL<PgWin *>,PgWin *>::NiTPointerListBase<DFALL<PgWin *>,PgWin *>(NiTPointerListBase<DFALL<PgWin *>,PgWin *> *this); // idb
NiIntegerExtraData *__thiscall NiIntegerExtraData::`scalar deleting destructor'(NiIntegerExtraData *this, unsigned int a2);
unsigned int __cdecl ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::GetTotal(); // idb
unsigned int __cdecl ITableBase<ActionEffectItem,ActionEffectItemTab>::GetTotal(); // idb
NiNode *__thiscall ResElement::GetNiNode(ResElement *this); // idb
void __thiscall mhSettingWin::SetPassWord(mhSettingWin *this, char *pcPassWord); // idb
int __thiscall mhJoinWin::GetMaxPerson(mhJoinWin *this); // idb
void __thiscall mhJoinWin::SetMaxPerson(mhJoinWin *this, int PersonCount); // idb
void __thiscall mhJoinWin::CheckEnable(mhJoinWin *this, mhJoinWin::CheckBoxIndex eIndex, int b);
void __thiscall PgTList<unsigned int>::~PgTList<unsigned int>(PgTList<unsigned int> *this); // idb
PgTList<unsigned int> *__thiscall PgTList<unsigned int>::`vector deleting destructor'(PgTList<unsigned int> *this, unsigned int a2);
ActionViewInfo *__cdecl ActionViewTable::GetByEventCode(unsigned int nEventCode); // idb
ItemActionEffectDesc *__cdecl ItemActionEffectDescTab::GetByItemActionID(unsigned int uiIndex); // idb
ActionEffectItem *__cdecl ActionEffectItemTab::GetByItemID(unsigned int uiIndex); // idb
void __cdecl BasicInfoLinkTab::GetSkipList(PgTList<unsigned int> *pkSkipList); // idb
CollectCard *__cdecl CollectCardTab::GetByCardID(unsigned int uiCardID); // idb
CollectCardTitle *__cdecl CollectCardTitleTab::GetByItemInx(const char *pcItemInx); // idb
MinimonInfo *__cdecl MinimonInfoTable::GetMinimonInfoByIDX(char *pcItemIDX); // idb
void __thiscall NiTList<PgWin *>::~NiTList<PgWin *>(NiTList<PgWin *> *this); // idb
NiTList<PgWin *> *__thiscall NiTPointerListBase<DFALL<PgWin *>,PgWin *>::`vector deleting destructor'(NiTList<PgWin *> *this, unsigned int a2);
void __thiscall NiTList<ScriptBtn *>::~NiTList<ScriptBtn *>(NiTList<ScriptBtn *> *this); // idb
NiTPointerListBase<DFALL<ScriptBtn *>,ScriptBtn *> *__thiscall NiTPointerListBase<DFALL<ScriptBtn *>,ScriptBtn *>::`vector deleting destructor'(NiTPointerListBase<DFALL<ScriptBtn *>,ScriptBtn *> *this, unsigned int a2);
NiTPointerList<unsigned int> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,unsigned int>::`vector deleting destructor'(NiTPointerList<unsigned int> *this, unsigned int a2);
D3DXCOLOR *__cdecl ColorInfoTable::GetDxColor(D3DXCOLOR *result, ColorID eColorID); // idb
MobViewInfo *__cdecl MobViewInfoTab::GetByID(unsigned __int16 byID); // idb
MiniHouseObjAni *__cdecl MiniHouseObjAniInfoTab::GetObjInfobyhnd(unsigned __int16 handle); // idb
char *__thiscall mhInfoWin::GetTitle(mhInfoWin *this); // idb
void __thiscall mhSettingWin::Refresh(mhSettingWin *this, char *pcTitle, char *pcPassWord, int PersonCount, bool bItemView, char *pcNotice); // idb
void __thiscall mhJoinWin::SetPassWord(mhJoinWin *this, char *pcPassWord); // idb
ChargedItemEffect *__cdecl ChargedEffectTable::GetByHandle(unsigned __int16 wHandle); // idb
void __thiscall std::_Tree<std::_Tmap_traits<enum  OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const,EffectViewInfo *>>> *,std::less<enum  OscTarget>,std::allocator<std::pair<enum  OscTarget const,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const,EffectViewInfo *>>> *>>,0>>::_Lrotate(std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *_Wherenode); // idb
void __thiscall mhInfoWin::ClearInfo(mhInfoWin *this); // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0> > > *__thiscall std::_Tree<std::_Tset_traits<Effect *,std::less<Effect *>,std::allocator<Effect *>,0>>::find(std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0> > *this, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0> > > *result, PgWin *const *_Keyval); // idb
bool __stdcall ITask::OnProcessNetMsg(int iDepart, int iCommand, int iRevBytes, void *pvData);
BOOL __cdecl std::operator!=<char,std::char_traits<char>,std::allocator<char>>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Left, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Right);
CollectWin::sRewardInfo *__cdecl std::_Uninit_copy<std::_Vector_const_iterator<std::_Vector_val<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo>>>,CollectWin::sRewardInfo *,std::allocator<CollectWin::sRewardInfo>>(std::_Vector_const_iterator<std::_Vector_val<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo> > > _First, std::_Vector_const_iterator<std::_Vector_val<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo> > > _Last, CollectWin::sRewardInfo *_Dest);
void __thiscall mhPortalListWin::Clear(mhPortalListWin *this); // idb
void __thiscall GuildJoinReqTask::DirectMessage(GuildJoinReqTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall GuildJoinReqTask::OnStart(GuildJoinReqTask *this); // idb
bool __thiscall GuildJoinReqTask::OnProcessNetMsg(GuildJoinReqTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData); // idb
GuildJoinReqTask *__cdecl ISingletonTask<GuildJoinReqTask>::Run(); // idb
void __thiscall ScriptBtn::ScriptBtn(ScriptBtn *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > kText, bool bAutoScale, NiExtraData *pkType, NiExtraData *pkAction, NiExtraData *pkNextAction); // idb
GuildJoinReqTask *__thiscall GuildJoinReqTask::`vector deleting destructor'(GuildJoinReqTask *this, unsigned int a2);
void __thiscall std::vector<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo>>::vector<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo>>(std::vector<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo> > *this, std::vector<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo> > *_Right); // idb
void __thiscall mhInfoWin::SetTitle(mhInfoWin *this, char *pcStr, bool bPageUpdate); // idb
// int __usercall mktime_0@<eax>(tm *_Tm@<eax>); idb
void __stdcall GameFrameWork::RemoveItemFromString(char *s, const char *toRemove);
int __thiscall GameFrameWork::On_NC_BOOTH_BUYREFRESH_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BOOTH_INTERIORSTART_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BOOTH_CLOSE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_CT_SET_SOMEONECHANGE_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_MISC_PINGTEST_CLIENT_ZONE_DB(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_MISC_RESTMINUTE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_CHAR_CENCHANGE_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_CHAR_BASEPARAMCHANGE_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_CHAR_CHANGEPARAMCHANGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_CHAR_CLIENT_CHARGEDBUFF_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_CHAR_FAMECHANGE_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_BRIEFINFO_ITEMONFIELD_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_BRIEFINFO_DROPEDITEM_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_MINIHOUSE_BUILDING_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_BRIEFINFO_MINIHOUSE_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_BRIEFINFO_MINIHOUSEBUILD_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_MINIHOUSE_FURNITURE_EFFECT_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_BRIEFINFO_MAGICFIELDINFO_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_ACT_SOMEONEWALK_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_ACT_SOMEONERUN_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_ACT_MOVEFAIL_ACK(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_ACT_SOMEONESTOP_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ACT_CREATECASTBAR(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ACT_CANCELCASTBAR(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ACT_WHISPERSUCCESS_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_ACT_SOMEEONEJUMP_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_ACT_SOMEONESPEEDCHANGE_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_ACT_SOMEONEFOLDTENT_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_ACT_SOMEONEPITCHTENT_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_ACT_FOLDTENT_ACK(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_ACT_REINFORCE_FOLDTENT_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_ACT_MOVESPEED_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_ACT_RIDE_FAIL_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_ACT_REINFORCE_STOP_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_BAT_TARGETINFO_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_EXPGAIN_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_HPCHANGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_SPCHANGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_BAT_APCHANGE_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_BAT_ASSIST_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_TARGETCHANGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_SKILLBASH_CAST_SUC_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_SOMEONESKILLBASH_CAST_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_SOMEONESKILLBASH_CASTCUT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_SOMEONESKILLBASH_OBJ_CAST_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_SOMEONESKILLBASH_FLD_CAST_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_SKILLBASH_CASTABORT_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_BAT_FAMEGAIN_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_ITEM_PICKOTHER_ACK(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_ITEM_UPGRADE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_PARTY_LOGININFO_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_PARTY_LOGOUTINFO_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_PARTY_MEMBERCLASS_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_PARTY_MEMBERLOCATION_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_PARTY_MEMBERMAPOUT(int iRevBytes, void *pvData);
// int __userpurge GameFrameWork::On_NC_PARTY_FINDER_LIST_ACK@<eax>(GameFrameWork *this@<ecx>, int a2@<edi>, int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_PARTY_FINDER_DELETE_YOUR_MSG_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_MENU_SHOPOPENWEAPON_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MENU_SHOPOPENSKILL_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MENU_SHOPOPENTABLE_WEAPON_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MENU_SHOPOPENTABLE_SKILL_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MENU_SHOPOPENSOULSTONE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_MENU_SHOPOPENITEM_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_MENU_SERVERMENU_REQ(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MENU_OPENSTORAGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_SKILL_COOLTIME_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_TRADE_OPPOSITUPBOARD_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_TRADE_OPPOSITDOWNBOARD_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_TRADE_CENBOARDING_ACK(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_TRADE_OPPOSITCENBOARDING_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_TRADE_BOARDLOCK_ACK(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_TRADE_OPPOSITBOARDLOCK_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_TRADE_DECIDE_ACK(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_TRADE_OPPOSITDECIDE_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_TRADE_BOARDUNLOCK_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_TRADE_OPPOSITBOARDUNLOCK_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_FRIEND_LIST_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_FRIEND_ADD_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_FRIEND_MAP_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_FRIEND_PARTY_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_FRIEND_LEVEL_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_FRIEND_POINT_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_KQ_STATUS_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_KQ_LIST_TIME_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_KQ_LIST_ADD_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_KQ_LIST_DELETE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_KQ_LIST_UPDATE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_KQ_SCHEDULE_ACK(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_KQ_NOTIFY_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_KQ_START_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_KQ_RESTDEADNUM_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_KQ_ENTRYRESPONCE_REQ(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_WT_MOBINC_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_SCENARIO_ANIMATION_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_SCENARIO_MESSAGENPC_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_SCENARIO_LIGHT_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_SCENARIO_PLAYERLIKEMOB_ANIMATE_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_SCENARIO_CHATWIN_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_QUEST_CLIENT_SCENARIO_DONE_ACK(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_QUEST_NOTIFY_MOB_KILL_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_QUEST_SELECT_START_ACK(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_PRISON_END_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_EVENT_FRIEND_INITMSG_ACK(int iRevBytes, void *pvData);
void __thiscall GameFrameWork::NcEventFriendHideMsgCmd(GameFrameWork *this, bool bHide); // idb
void __thiscall GameFrameWork::NcEventFriendRequestReq(GameFrameWork *this, const char *charID); // idb
int __stdcall GameFrameWork::On_NC_EVENT_FRIEND_REQUEST_ACK(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_EVENT_FRIEND_REQUESTED_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_EVENT_FRIEND_NPCVIEW_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_EVENT_FRIEND_REWARD_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_EVENT_WORLDCUP_ENTER_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_MINIHOUSE_ACTIV_ACK(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_CHARGED_BUFFTERMINATE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_CHARGED_DELETEWEAPONTITLE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_CHARGED_SKILLEMPOW_INITIALIZE_SUC_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_CHARGED_STAT_INITIALIZE_FAIL_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_CHARGED_SKILLEMPOW_INITIALIZE_FAIL_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_CHARGED_BOOTHSLOTSIZE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ACT_ROAR_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MINIHOUSE_REARRANGE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_MINIHOUSE_REARRANGE_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_MINIHOUSE_CREATE_FURNITURE_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_MINIHOUSE_DELETE_FURNITURE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MINIHOUSE_FUNITUREINFOCOMPLETE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_MINIHOUSE_FUNICHERINVEN_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_MINIHOUSE_VISIT_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MINIHOUSE_COMPULSIONMOVETO_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MINIHOUSE_MODIFY_PASSWORD_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MINIHOUSE_MODIFY_TITLE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MINIHOUSE_MODIFY_MAXENTERNUM_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MINIHOUSE_MODIFY_OWNERBLOG_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MINIHOUSE_OWNERBLOG_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MINIHOUSE_CHAR_ACTION_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_MINIHOUSE_CHAR_ACTION_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_MINIHOUSE_MODIFY_NOTIFY_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MINIHOUSE_PORTAL_LIST_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MINIHOUSE_PORTAL_ADD_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_MINIHOUSE_PORTAL_DEL_ACK(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_MINIHOUSE_PORTAL_DEL_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_MINIHOUSE_PORTAL_OPEN_ACK(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_MINIHOUSE_PORTAL_OPEN_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_MINIHOUSE_PORTAL_CLOSE_ACK(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_MINIHOUSE_PORTAL_CLOSE_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_MINIHOUSE_PORTAL_EFFECT_ACK(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_MINIHOUSE_PORTAL_EFFECT_CMD(int iRevBytes, void *pvData);
void __stdcall GameFrameWork::SendMHPortalDelReq(unsigned __int16 ID);
void GameFrameWork::SendMHPortalCloseReq();
void GameFrameWork::SendMHPortalUseReq();
int __stdcall GameFrameWork::On_NC_MINIHOUSE_FURNITURE_ENDURE_CMD(int iRevBytes, void *pvData);
void __stdcall GameFrameWork::OnSendNCItemDisMantleReq(int byItemPos);
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_LEVEL_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_LIST_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_REWARDINVENOPENFAIL_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MAP_TOWNPORTAL_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __stdcall GameFrameWork::NcGuildRetypeReq(int nType, int nCharInvenItem);
int __thiscall GameFrameWork::On_NC_CHAT_RESTRICT_DEL_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ACT_ACTIONBYITEM_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::ON_NC_KQ_MOBKILLNUMBER_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::ON_NC_KQ_JOINING_ALARM_END_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::ON_NC_KQ_JOINING_ALARM_LIST(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_BAT_SUMEONESKILLCUT_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_ACT_SETITEMHEALEFFECT(int iRevBytes, void *pvData);
// int __userpurge GameFrameWork::On_NC_CHAR_CLIENT_AUTO_PICK_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<edi>, int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_QUEST_ERR(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_LOGININFO_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_LOGOUTINFO_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_LOOTING_TYPE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_INVITATION_ANSWER_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_MAPOUT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_LEAVE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_VANISH_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_MEMBERINFORM_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_LOCATION_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_SLOT_MOVE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_SET_LEADER_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_SET_LEADER_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_SET_SUB_LEADER_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_SET_SUB_LEADER_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_DEL_SUB_LEADER_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_SET_LOOTER_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::On_NC_MINIHOUSE_FURNITURE_EMOTION_REQ(GameFrameWork *this, int FurnitureID, char ActPos, char ActNum);
int __thiscall GameFrameWork::On_NC_MINIHOUSE_FURNITURE_EMOTION_CANCEL_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_ITEM_REVIVEITEMUSEFAIL_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_SKILL_SOMEONEREVAVALTOME_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_SKILL_REPLYREVIVEFAIL_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_ITEM_DICE_GAME_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_DICE_GAME_START_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MAP_MULTY_LINK_SELECT_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __stdcall GameFrameWork::NcMistSetChatBlockSpamFilterCmd(int bySpamMsgShow, char bySpamBlockOn, unsigned __int16 wSpamFilterRate);
int __stdcall GameFrameWork::On_NC_SKILL_ITEMACTIONCOOLTIME_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_USER_CONNECTION_CHANGE_CHAR_ID_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_QUEST_START_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_QUEST_READ_ACK(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_CHAR_CLIENT_QUEST_READ_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_CHAR_CLIENT_QUEST_REPEAT_CMD(int iRevBytes, void *pvData);
void GameFrameWork::SaveAllKeyOpt();
int __stdcall GameFrameWork::On_NC_CHAR_OPTION_IMPROVE_SET_GAMEOPTION_ACK(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_CHAR_OPTION_IMPROVE_INIT_KEYMAP_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_CHAR_OPTION_IMPROVE_SET_KEYMAP_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_CHAR_OPTION_IMPROVE_SET_SHORTCUTDATA_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_CHARSAVE_UI_STATE_SAVE_ACK(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_CHAR_ADMIN_LEVEL_INFORM_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MISC_SPAMMER_REPORT_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcActAutoWayFindingUseGateReq(GameFrameWork *this); // idb
void __stdcall GameFrameWork::NcCharNewbieGuideViewSetCmd(int nGuideView);
int __thiscall GameFrameWork::On_NC_CHAR_CLIENT_CARDCOLLECT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_CHAR_CLIENT_CARDCOLLECT_BOOKMARK_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_CHAR_CLIENT_CARDCOLLECT_REWARD_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_COLLECT_PEEPING_COLLECT_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_COLLECT_PEEPING_COLLECT_BOOKMARK_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_TOGGLESKILL_ON_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_CHAR_CHANGEBYCONDITION_PARAM_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_SKILL_JUMP_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_CHAR_EVENT_ATTENDANCE_LIST_CLIENT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_CHAR_EVENT_ATTENDANCE_CHANGE_DAY_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_CHER_EVENT_ATTENDANCE_CHANGE_START_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_SCENARIO_TIMER_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_ACT_ANIMATION_START_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_ACT_ANIMATION_STOP_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_SCENARIO_MAPMARK_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_BRIEFINFO_REGENMOVER_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_BRIEFINFO_MOVER_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_MOVER_RIDE_ON_FAIL_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MOVER_RIDE_OFF_FAIL_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MOVER_FEEDING_ERROR_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_MOVER_MOVESPEED_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_BRIEFINFO_REGENPET_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_BRIEFINFO_PET_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_PET_USE_ITEM_FAIL_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __stdcall GameFrameWork::NcPetAskNewNameAck(int kError, unsigned __int16 kPetHandle);
void __stdcall GameFrameWork::NcPetSetNameCancelReq(unsigned __int16 kPetHandle);
int __thiscall GameFrameWork::On_NC_SCENARIO_RANKING_LIST_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_SCENARIO_TIMER_END_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_ACT_OBJECT_SOUND_CMD(int iRevBytes, void *pvData);
void GameFrameWork::NcMiscItemShopUrlReq();
int __thiscall GameFrameWork::On_NC_KQ_JOIN_LIST_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::SetJoinHandle(GameFrameWork *this, unsigned int kHandle); // idb
int __thiscall GameFrameWork::On_NC_MAP_FIELD_ATTRIBUTE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_SCENARIO_DIALOG_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_MOVER_UPGRADE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_INSTANCE_DUNGEON_LEVEL_SELECT_MENU_REQ(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_LPCHANGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ACT_EFFECT_MESSAGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_KQ_SCORE_INFO_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_SCENARIO_EFFECT_TIMER_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_KQ_TEAM_SELECT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_SCENARIO_DEL_DIRECTIONAL_ARROW_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_MAP_CAN_USE_REVIVEITEM_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MAP_INDUN_LEVEL_VIEW_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MENU_RANDOMOPTION_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_RANDOMOPTION_CHANGE_ACCEPT_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_CHAT_COLOR_CHANGE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_TERMEXTEND_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_CHAR_USEITEM_MINIMON_INFO_CLIENT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_CHAR_USEITEM_MINIMON_NORMAL_ITEM_OFF_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_CHAR_USEITEM_MINIMON_CHARGED_ITEM_OFF_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_CHAR_USEITEM_MINIMON_USE_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_CHAR_USEITEM_MINIMON_NOTICE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_SELL_ITEM_INSERT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_SELL_ITEM_DELETE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_OPENCLASSCHANGEMENU_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MENU_SERVERMENU_CLOSE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_MAPLINK_SCROLL_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_MIX_ITEM_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_NEW_UPGRADE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_BRACELET_UPGRADE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MENU_INDUNRANK_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_INSTANCE_DUNGEON_RANK_RESULT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_INSTANCE_DUNGEON_RANK_LIST_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_CHAR_ANI_FILE_CHECK_CMD(int iRevBytes, void *pvData);
void __thiscall GameFrameWork::AddNetMsgToWorldMgr(GameFrameWork *this, unsigned __int16 department, unsigned __int16 command); // idb
void __thiscall GameFrameWork::SendNetMsgWorldMgr(GameFrameWork *this, void *pProto, int nDataLength); // idb
void __thiscall GameFrameWork::SendNetMsgWorldMgr(GameFrameWork *this, unsigned __int16 department, unsigned __int16 command, void *pProto, int nDataLength); // idb
void __thiscall GameFrameWork::AddNetMsgToZoneMgr(GameFrameWork *this, unsigned __int16 department, unsigned __int16 command); // idb
void __thiscall GameFrameWork::SendNetMsgZoneMgr(GameFrameWork *this, void *pProto, int nDataLength); // idb
void __thiscall GameFrameWork::SendNetMsgZoneMgr(GameFrameWork *this, unsigned __int16 department, unsigned __int16 command, void *pProto, int nDataLength); // idb
void __thiscall GameFrameWork::Send_NC_MISC_PINGTEST_CLIENT_ZONE_DB(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcCharReviveCmd(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcActWalkReq(GameFrameWork *this, NiPoint3 *kFrom, NiPoint3 *kTo); // idb
void __thiscall GameFrameWork::NcActRunReq(GameFrameWork *this, NiPoint3 *kFrom, NiPoint3 *kTo); // idb
void __thiscall GameFrameWork::NcActChangeModeReq(GameFrameWork *this, char byMode); // idb
void __thiscall GameFrameWork::NcActNPCClickCmd(GameFrameWork *this, unsigned __int16 kHandle); // idb
void __thiscall GameFrameWork::NcActEndOfTrade(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcActStopReq(GameFrameWork *this, NiPoint3 *kPos); // idb
void __thiscall GameFrameWork::NcActNoticeCmd(GameFrameWork *this, char *pcText); // idb
void __thiscall GameFrameWork::NcActJumpCmd(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcActNpcmenuopenAck(GameFrameWork *this, char bySelect); // idb
void __thiscall GameFrameWork::NcActFoldTentCmd(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcActPitchtentCmd(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcActEmoticon_Cmd(GameFrameWork *this, char kID); // idb
void __thiscall GameFrameWork::NcActEmoticonStopCmd(GameFrameWork *this, char kID, unsigned int uiFrame); // idb
void __thiscall GameFrameWork::NcCharPromoteReq(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcBatTargettingReq(GameFrameWork *this, unsigned __int16 kHandle); // idb
void __thiscall GameFrameWork::NcBatBashstartCmd(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcBatBashstopCmd(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcBatSkillbashCastabortReq(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcBriefInfoCmd(GameFrameWork *this, unsigned __int16 kHandle, int iDepart, int iCommand); // idb
void __thiscall GameFrameWork::NcBatAssistReq(GameFrameWork *this, Char *pChar); // idb
void __thiscall GameFrameWork::NcItemBuyReq(GameFrameWork *this, unsigned __int16 kItemID, unsigned int dwLot); // idb
void __thiscall GameFrameWork::NcItemSellReq(GameFrameWork *this, char bySlot, unsigned int dwLot); // idb
void __thiscall GameFrameWork::NcItemRelocReq(GameFrameWork *this, ITEM_INVEN *kFrom, ITEM_INVEN *kTo); // idb
void __thiscall GameFrameWork::NcItemDropReq(GameFrameWork *this, ITEM_INVEN *kFrom, unsigned int dwLot, float fXPos, float fYPos); // idb
void __thiscall GameFrameWork::NcItemPickReq(GameFrameWork *this, unsigned __int16 kItemHandle); // idb
void __thiscall GameFrameWork::NcItemRingEquipReq(GameFrameWork *this, const char bySlot, const char byEquipSlot); // idb
void __thiscall GameFrameWork::NcItemMiniMonEquipReq(GameFrameWork *this, const char bySlot, const char byEquipSlot); // idb
void __thiscall GameFrameWork::NcItemUseReq(GameFrameWork *this, const char bySlot); // idb
void __thiscall GameFrameWork::NcItemUpgradeReq(GameFrameWork *this, char equipSlot, char rawSlot, char raw_left, char raw_right, char raw_middle, unsigned int gift_money); // idb
void __thiscall GameFrameWork::NcItemOpenStoragePageReq(GameFrameWork *this, char byTargePage); // idb
void __thiscall GameFrameWork::NcPartyJoinProposeRejectAck(GameFrameWork *this, Name5 kCharID); // idb
void __thiscall GameFrameWork::NcPartyJoinProposeTimeOutAck(GameFrameWork *this, Name5 kCharID); // idb
void __thiscall GameFrameWork::NcPartyMemberinforeqCmd(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcPartyItemLootingSet(GameFrameWork *this, LOOTING_TYPE eType, char eLootType); // idb
void __thiscall GameFrameWork::NcPartyFinderListReq(GameFrameWork *this, unsigned __int16 wPageNum, unsigned __int16 wMaxItemPerPage); // idb
void __thiscall GameFrameWork::NcPartyFinderAddCommentReq(GameFrameWork *this, char *pchText); // idb
void __thiscall GameFrameWork::NcPartyFinderDelCommentReq(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcMenuServerMenuAck(GameFrameWork *this, const char ucReply); // idb
void __thiscall GameFrameWork::NcTradeProposeAskNoAck(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcTradeProposeyesAck(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcTradeProposeCancelCmd(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcTradeUpboardReq(GameFrameWork *this, const char bySlot); // idb
void __thiscall GameFrameWork::NcTradeDownboardReq(GameFrameWork *this, const char bySlot); // idb
void __thiscall GameFrameWork::NcTradeCenboardingReq(GameFrameWork *this, const unsigned __int64 qwCen); // idb
void __thiscall GameFrameWork::NcTradeBoardlockReq(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcTradeDecideReq(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcTradeCancelReq(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcSoulStoneHPBuyReq(GameFrameWork *this, unsigned __int16 wNumber); // idb
void __thiscall GameFrameWork::NcSoulStoneSPBuyReq(GameFrameWork *this, unsigned __int16 wNumber); // idb
void __thiscall GameFrameWork::NcSoulStoneHPUseReq(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcSoulStoneSPUseReq(GameFrameWork *this); // idb
void __cdecl EmpowerAlloc(unsigned __int16 kID, Skill::EmpowerInfo kEmpowerInfo); // idb
void __stdcall GameFrameWork::NcSkillEmpowallocReq(PROTO_NC_SKILL_EMPOWALLOC_REQ *rkReq);
void __thiscall GameFrameWork::NcSkillEmpowResetReq(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcFriendFindReq(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcFriendPointReq(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcItemSplitReq(GameFrameWork *this, ITEM_INVEN *kFrom, ITEM_INVEN *kTo, unsigned int uiVal); // idb
void __thiscall GameFrameWork::NcBoothCloseReq(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcBoothInterioStartReq(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcBoothEntryReq(GameFrameWork *this, unsigned __int16 sHandle); // idb
void __thiscall GameFrameWork::NcBoothItemTradeReq(GameFrameWork *this, unsigned __int16 booth, char boothslot, unsigned __int16 itemnum); // idb
// int __userpurge GameFrameWork::On_NC_BOOTH_SOMEONEOPEN_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<edi>, int iRevBytes, void *pvData);
// int __userpurge GameFrameWork::On_NC_BOOTH_SOMEONECLOSE_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<esi>, int iRevBytes, void *pvData);
void __thiscall GameFrameWork::NcBoothReflashReq(GameFrameWork *this, unsigned __int16 booth); // idb
void __thiscall GameFrameWork::NcBoothSearchItemListCategorized(GameFrameWork *this, unsigned int kCategoryType, bool bOnlyMyClass, bool bFirst); // idb
void __thiscall GameFrameWork::NcBoothSearchBoothPosition(GameFrameWork *this, unsigned int BoothItemHandle, unsigned __int16 TargetCharHandle); // idb
void __thiscall GameFrameWork::NcCharTitleSetReq(GameFrameWork *this, unsigned int dwData); // idb
void __thiscall GameFrameWork::NcKqStatusReq(GameFrameWork *this, unsigned int Handle); // idb
void __thiscall GameFrameWork::NcKqListRefreshReq(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcKqJoinReq(GameFrameWork *this, unsigned int Handle); // idb
void __thiscall GameFrameWork::NcKqJoinCancelReq(GameFrameWork *this, unsigned int Handle); // idb
void __thiscall GameFrameWork::NcUserPacketToWorld(GameFrameWork *this, DirectUserMsgBody_SendPacket *pkPacketBody); // idb
int __thiscall GameFrameWork::On_NC_MISC_PINGTEST_TOOL_WM_CLIENT_ZONE_DB(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcMiscWebKeyReq(GameFrameWork *this); // idb
int __thiscall GameFrameWork::On_NC_MISC_WEB_KEY_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_USER_CONNECTCUT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
// int __userpurge GameFrameWork::On_NC_USER_LOGINWORLD_ACK@<eax>(GameFrameWork *this@<ecx>, int a2@<ebx>, int a3@<edi>, int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_CHAR_STAT_REMAINPOINT_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_CHAR_SOMEONEGUILDCHANGE_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_CHAR_SOMEONEGUILDACADEMYCHANGE_CMD(int iRevBytes, void *pvData);
// int __userpurge GameFrameWork::On_NC_MAP_LINKSAME_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<ebx>, int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_MAP_FREEPKZONE_OFF_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_MAP_PARTYBATTLEZONE_OFF_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_MAP_KQTEAMBATTLEZONE_ON_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_MAP_KQTEAMBATTLEZONE_OFF_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_BRIEFINFO_LOGINCHARACTER_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BRIEFINFO_CHARACTER_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BRIEFINFO_CHANGEDECORATE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BRIEFINFO_CHANGEUPGRADE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BRIEFINFO_CHANGEWEAPON_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BRIEFINFO_UNEQUIP_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_BRIEFINFO_MAGICFIELDSPREAD_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_BRIEFINFO_BUILDDOOR_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_BRIEFINFO_DOOR_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_ACT_SOMEONECHAT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ACT_SOMEONESHOUT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
// int __userpurge GameFrameWork::On_NC_ACT_SOMEONEMOVEWALK_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<ebx>, int a3@<esi>, int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_ACT_SOMEONECHANGEMODE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::AddWhisperList(GameFrameWork *this, Name5 shinCharID); // idb
int __thiscall GameFrameWork::On_NC_ACT_PARTYCHAT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_GUILD_CHAT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_GUILD_ACADEMY_CHAT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_ACT_SOMEONEEMOTICON_CMD(int iRevBytes, void *pvData);
// int __userpurge GameFrameWork::On_NC_ACT_SOMEONEEMOTICONSTOP_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<edi>, int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_ACT_SOMEONERIDE_ON_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ACT_RIDE_OFF_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ACT_SOMEONERIDE_OFF_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_SOMEONELEVELUP_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_SKILLBASH_HIT_BLAST_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
// int __userpurge GameFrameWork::On_NC_BAT_CEASE_FIRE_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<ebx>, int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_BAT_SWING_DAMAGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_BAT_SOMEONESWING_DAMAGE_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::ON_NC_BAT_REALLYKILL_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_BAT_PKINPKFIELD_CLIENT_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_PARTY_JOINPROPOSE_REQ(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_PARTY_MEMBER_LIST_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_PARTY_MEMBERINFORM_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_PARTY_FINDER_ADD_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_PARTY_FINDER_DELETE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MENU_SHOPOPENTABLE_ITEM_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_SKILL_REVIVE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_SKILL_SOMEONEREVIVE_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_TRADE_DOWNBOARD_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::CleanUpTrade(GameFrameWork *this); // idb
int __stdcall GameFrameWork::On_NC_SOULSTONE_HP_BUY_ACK(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_SOULSTONE_SP_BUY_ACK(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_FRIEND_LOGOUT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_Nc_Kq_Complete_Cmd(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_Nc_Kq_Fail_Cmd(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_KQ_SCORE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_KQ_SCORE_SIMPLE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_SCENARIO_RUNEFFECT_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_SCENARIO_DOORSTATE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_SCENARIO_OBJTYPECHANGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_SCENARIO_FOG_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_SCENARIO_ANIMATE_CMD(int iRevBytes, void *pvData);
void __thiscall GameFrameWork::NcReportGetReq(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcReportCancelReq(GameFrameWork *this, int iRegNum); // idb
void __thiscall GameFrameWork::NcPrisonEndReq(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcMiniHouseActivReq(GameFrameWork *this, const char bySlot); // idb
int __stdcall GameFrameWork::On_NC_CHARGED_STAT_INITIALIZE_SUC_CMD(int iRevBytes, void *pvData);
void __thiscall GameFrameWork::On_NC_ACT_ROAR_REQ(GameFrameWork *this); // idb
void __thiscall GameFrameWork::On_NC_MAP_WING_SAVE_REQ(GameFrameWork *this); // idb
void __thiscall GameFrameWork::On_NC_MAP_WING_FLY_REQ(GameFrameWork *this); // idb
int __thiscall GameFrameWork::On_NC_MINIHOUSE_EXIT_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MINIHOUSE_CREATE_FURNITURE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MINIHOUSE_DELETE_FURNITURE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MINIHOUSE_LOGOUTCOMPLETE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MINIHOUSE_LOGINCOMPLETE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MINIHOUSE_VISITREADY_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MINIHOUSE_COMPULSIONMOVETO_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MINIHOUSE_MODIFY_ITEM_INFO_OPEN_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __stdcall GameFrameWork::SendMHPortalOpenReq(unsigned __int16 ID);
int __thiscall GameFrameWork::On_NC_ONGAMENET_OX_EVENT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_LOGIN_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_LOGOUT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_SKILL_WARP_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_CHAT_RESTRICT_LIST_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcChatRestrictDelAll(GameFrameWork *this); // idb
int __thiscall GameFrameWork::On_NC_CHAT_RESTRICT_DEL_ALL_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcHolyPromiseWithDrawCenRewardReq(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcBatAbastateEraseReq(GameFrameWork *this, unsigned __int16 id); // idb
int __thiscall GameFrameWork::On_NC_BAT_SOULCOLLECT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_ACT_REINFORCERELOC_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_ACT_REINFORCEMOVEBYPATH_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_MISC_SERVER_TIME_NOTIFY_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_USER_WILL_WORLD_SELECT_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcRaidMakeReq(GameFrameWork *this); // idb
int __thiscall GameFrameWork::On_NC_RAID_MEMBER_LIST_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcRaidLootingTypeReq(GameFrameWork *this, __int16 nItemGrade, char nLootingType);
void __thiscall GameFrameWork::NcRaidLeaveReq(GameFrameWork *this); // idb
int __thiscall GameFrameWork::On_NC_RAID_MEMBERCLASS_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_SLOT_MOVE_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_RAID_DEL_SUB_LEADER_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_RAID_SET_LOOTER_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_RAID_CHAT_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MINIHOUSE_FURNITURE_EMOTION_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_MINIHOUSE_FURNITURE_EMOTION_CMD(int iRevBytes, void *pvData);
void __thiscall GameFrameWork::On_NC_MINIHOUSE_FURNITURE_EMOTION_CANCEL_REQ(GameFrameWork *this); // idb
// int __userpurge GameFrameWork::On_NC_MINIHOUSE_FURNITURE_EMOTION_CANCEL_CMD@<eax>(GameFrameWork *this@<ecx>, NiPoint3 *a2@<ebx>, float a3@<edi>, int a4@<esi>, int iRevBytes, void *pvData);
void __thiscall GameFrameWork::On_NC_ITEM_REVIVEITEMUSE_CMD(GameFrameWork *this); // idb
void __thiscall GameFrameWork::On_NC_SKILL_REPLYREVIVE_CMD(GameFrameWork *this); // idb
int __stdcall GameFrameWork::On_NC_BRIEFINFO_ABSTATE_CHANGE_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_BRIEFINFO_ABSTATE_CHANGE_LIST_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_PARTY_SET_LOOTER_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_PARTY_ITEM_JOIN_LOOTING_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MAP_MULTY_LINK_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MISC_GET_CHAT_BLOCK_SPAM_FILTER_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcItemEnchantAddNewSocketReq(GameFrameWork *this, ITEM_INVEN kDrill, ITEM_INVEN kWeapon); // idb
void __thiscall GameFrameWork::NcQuestStartReq(GameFrameWork *this, unsigned __int16 nQuestID); // idb
void __thiscall GameFrameWork::NcQuestReadReq(GameFrameWork *this, unsigned __int16 nQuestID); // idb
int __thiscall GameFrameWork::On_NC_CHAR_OPTION_IMPROVE_INIT_GAMEOPTION_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcCharSaveUIStateSaveReq(GameFrameWork *this, int bOn);
// int __userpurge GameFrameWork::On_NC_ACT_NPC_ACTION_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<ebx>, int iRevBytes, void *pvData);
// void __userpurge GameFrameWork::NcCollectCardregistReq(GameFrameWork *this@<ecx>, double a2@<st0>, unsigned int uiSlot);
void __thiscall GameFrameWork::NcCollectBookmarkRegistReq(GameFrameWork *this, unsigned int uiSlot, unsigned int uiCardID); // idb
void __thiscall GameFrameWork::NcCollectRewardReq(GameFrameWork *this, unsigned int uiRewardID, unsigned __int16 kItemID); // idb
int __thiscall GameFrameWork::On_NC_BAT_TOGGLESKILL_OFF_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_SKILLBLAST_LIGHTNINGWAVE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcCharEventAttendRewardReq(GameFrameWork *this, int iWeekIndex, int iIndex); // idb
void __thiscall GameFrameWork::NcCharRebirthCmd(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcCharRebirthRejectCmd(GameFrameWork *this); // idb
int __thiscall GameFrameWork::On_NC_SCENARIO_CAMERA_MOVE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcActNpcMenuCmd(GameFrameWork *this, int iIndex); // idb
int __thiscall GameFrameWork::On_NC_MOVER_SOMEONE_RIDE_ON_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MOVER_SOMEONE_RIDE_OFF_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcMoverRideOnReq(GameFrameWork *this, unsigned __int16 kHandle, unsigned int uiSlot); // idb
void __thiscall GameFrameWork::NcMoverRideOffReq(GameFrameWork *this); // idb
int __stdcall GameFrameWork::On_NC_PET_SET_NAME_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_SCENARIO_TIMER_START_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
// int __userpurge GameFrameWork::On_NC_ACT_EVENT_CODE_ACTION_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<ebx>, int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_QUEST_RESET_TIME_CLIENT_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_KQ_VOTE_VOTING_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcKqVoteVotingReq(GameFrameWork *this, KQ_VOTING_TYPE eVoteType); // idb
void __thiscall GameFrameWork::NcKqJoinListReq(GameFrameWork *this, unsigned int kHandle); // idb
void __thiscall GameFrameWork::NcKqVoteStartCheckReq(GameFrameWork *this); // idb
int __stdcall GameFrameWork::On_NC_SCENARIO_MAP_OBJECT_CONTROL_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_ACT_ANIMATION_LEVEL_CHANGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_USE_ACTIVESKILL_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcItemUseActiveskillReq(GameFrameWork *this, unsigned int uiInvenSlot, unsigned __int16 kTargetHandle); // idb
void __thiscall GameFrameWork::NcItemUseActiveskillReq(GameFrameWork *this, unsigned int uiInvenSlot, unsigned int x, unsigned int y); // idb
void __thiscall GameFrameWork::NcMoverUpgradeReq(GameFrameWork *this, unsigned int uiMainInvenSlot, unsigned int uiSubInvenSlot); // idb
void __thiscall GameFrameWork::NcInstanceDungeonLevelSelectMenuAck(GameFrameWork *this, unsigned __int16 kNPCHandle, ID_LEVEL_TYPE eLevelType); // idb
int __stdcall GameFrameWork::On_NC_ACT_END_CINEMATIC(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_CHAR_TUTORIAL_STEP_REQ(int iRevBytes, void *pvData);
void __thiscall GameFrameWork::NcCharTutorialStepAck(GameFrameWork *this, unsigned int uiTutorialStep); // idb
int __thiscall GameFrameWork::On_NC_SCENARIO_TOPVIEW_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_SCENARIO_HIDE_OTHER_PLAYER_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcKqTeamSelectReq(GameFrameWork *this, char nTeamType); // idb
int __stdcall GameFrameWork::On_NC_KQ_TEAM_TYPE_CMD(int iRevBytes, void *pvData);
void __thiscall GameFrameWork::NcItemRandomOptionChangeReq(GameFrameWork *this, int kItemSlotNo, int kStuffSlotNo); // idb
void __thiscall GameFrameWork::NcItemChatColorChangeReq(GameFrameWork *this, int iColorSlot); // idb
void __thiscall GameFrameWork::NcTermExtendReq(GameFrameWork *this, unsigned int uiExtebdItemSlot, unsigned int uiTermItemSlot); // idb
void __thiscall GameFrameWork::NcCharBuffItemAutoUseOnReq(GameFrameWork *this, unsigned __int16 *pkItemID); // idb
void __thiscall GameFrameWork::NcCharBuffItemAutoUseOffReq(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcCharChargedItemAutoUseOnReq(GameFrameWork *this, unsigned __int16 *pkItemID); // idb
void __thiscall GameFrameWork::NcCharChargedItemAutoUseOffReq(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcCharChargedbuffEraseReq(GameFrameWork *this, unsigned int nChargedBuffKey); // idb
int __thiscall GameFrameWork::On_NC_CHAR_CHARGEDBUFF_ERASE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcItemRepurchaseReq(GameFrameWork *this, unsigned __int16 nHaldle); // idb
int __stdcall GameFrameWork::On_NC_ITEM_SELL_ITEM_LIST_CMD(int iRevBytes, void *pvData);
void __thiscall GameFrameWork::NcGuildEmblemSaveReq(GameFrameWork *this, GUILD_EMBLEM_INFO pEmblemInfo); // idb
void __thiscall GameFrameWork::NcGuildEmblemCheckAvailabilityReq(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcItemMaplinkScrollReq(GameFrameWork *this, WM_Link targetMap); // idb
void __thiscall GameFrameWork::NcItemMixItemReq(GameFrameWork *this, unsigned int uiLefeItemInvSlot, unsigned int uiRightItemInvSlot, unsigned int uiAddItemInvSlot); // idb
void __thiscall GameFrameWork::NcItemRandomOptRecoverCountLimitReq(GameFrameWork *this, int _kItemSlotIdx, unsigned int _uiRecoverCnt); // idb
int __thiscall GameFrameWork::On_NC_ITEM_RANDOMOPTION_RECOVER_COUNT_LIMIT_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcItemNewUpGradeReq(GameFrameWork *this, char equipSlot, char rawSlot); // idb
void __thiscall GameFrameWork::NcItemBraceletUpgradeReq(GameFrameWork *this, char equipSlot, char rawSlot); // idb
void __thiscall GameFrameWork::NcInstanceDungeonRankListReq(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcMapLoginCompleteCmd(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcBatSkillbashObjCastReq(GameFrameWork *this, int kSkillID, unsigned __int16 kHandle);
void __thiscall GameFrameWork::NcBatSkillbashFldCastReq(GameFrameWork *this, unsigned __int16 kSkillID, unsigned int x, unsigned int y); // idb
void __thiscall GameFrameWork::NcItemEquipReq(GameFrameWork *this, const char bySlot); // idb
void __thiscall GameFrameWork::NcItemUnequipReq(GameFrameWork *this, const char bySlotequip, const char bySlotinven); // idb
void __thiscall GameFrameWork::NcPartyJoinReq(GameFrameWork *this, char *pcCharName); // idb
void __thiscall GameFrameWork::NcPartyJoinProposeAllowAck(GameFrameWork *this, Name5 kCharID); // idb
void __thiscall GameFrameWork::NcPartyLeaveReq(GameFrameWork *this); // idb
void __thiscall GameFrameWork::NcPartyKickOffReq(GameFrameWork *this, char *pcCharName); // idb
void __thiscall GameFrameWork::NcPartyChangeMasterReq(GameFrameWork *this, char *pcCharName); // idb
void __thiscall GameFrameWork::NcTradeProposeReq(GameFrameWork *this, unsigned __int16 kHandle); // idb
void __thiscall GameFrameWork::NcFriendSetReq(GameFrameWork *this, Name5 kCharID); // idb
void __thiscall GameFrameWork::NcFriendSetConfirmAck(GameFrameWork *this, Name5 charid, bool bAccept_Friend); // idb
void __thiscall GameFrameWork::NcFriendDelReq(GameFrameWork *this, Name5 kCharID); // idb
int __thiscall GameFrameWork::On_NC_ITEM_SPLIT_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcBoothOpenReq(GameFrameWork *this, bool bIsSell); // idb
int __thiscall GameFrameWork::On_NC_BOOTH_ITEMTRADE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
// int __userpurge GameFrameWork::On_NC_BOOTH_OPEN_ACK@<eax>(GameFrameWork *this@<ecx>, int a2@<edi>, int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_BOOTH_SOMEONEINTERIORSTART_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BOOTH_ENTRY_SELL_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BOOTH_ENTRY_BUY_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BOOTH_REFRESH_SELL_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BOOTH_REFRESH_BUY_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BOOTH_SEARCH_ITEM_LIST_CATEGORIZED_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BOOTH_SEARCH_BOOTH_CLOSED_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_CT_SET_CURRENT_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_CT_SET_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcUserPacketToZone(GameFrameWork *this, DirectUserMsgBody_SendPacket *pkPacketBody); // idb
int __thiscall GameFrameWork::On_NC_CHAR_DEADMENU_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
// int __userpurge GameFrameWork::On_NC_CHAR_REVIVESAME_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<ebx>, int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_BRIEFINFO_REGENMOB_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BRIEFINFO_MOB_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ACT_SOMEONEWHISPER_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ACT_WHISPERFAIL_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ACT_PARTYCHAT_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_GUILD_CHAT_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_GUILD_ACADEMY_CHAT_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ACT_PITCHTENT_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ACT_RIDE_ON_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ACT_RIDE_HUNGRY_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
// int __userpurge GameFrameWork::On_NC_ACT_REINFORCE_RUN_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<esi>, int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_ACT_REINFORCE_WALK_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_BAT_LEVELUP_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_EXPLOST_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_SKILLBASH_CAST_FAIL_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_CELLCHANGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_EQUIPCHANGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_ITEMBREAK_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_BUY_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_SELL_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_RELOC_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_DROP_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_PICK_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_SOMEONEPICK_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_EQUIP_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_UNEQUIP_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_USE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_DEPOSIT_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_WITHDRAW_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_CHARGEDINVENOPEN_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_PARTY_JOIN_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_PARTY_LEAVE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_PARTY_KICKOFF_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_PARTY_DISMISS_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_PARTY_CHANGEMASTER_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_PARTY_ITEM_LOOTING_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MENU_OPENSTORAGE_FAIL_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_SKILL_SKILL_LEARNSUC_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_SKILL_SKILL_LEARNFAIL_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_SKILL_UNLEARN_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_SKILL_EMPOW_RESET_SUC_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_SKILL_EMPOWALLOC_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_SKILL_EMPOW_RESET_FAIL_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_SKILL_EMPOWPOINT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_SKILL_PRODUCTFIELD_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_TRADE_PROPOSE_ASK_REQ(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_TRADE_PROPOSENO_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_TRADE_PROPOSE_CANCELED_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_TRADE_START_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_TRADE_CANCEL_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_TRADE_CANCEL_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_TRADE_UPBOARDFAIL_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_TRADE_UPBOARD_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_TRADE_DOWNBOARDFAIL_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_TRADE_CENBOARDINGFAIL_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_TRADE_BOARDLOCKFAIL_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_TRADE_DECIDEFAIL_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_TRADE_TRADECOMPLETE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_TRADE_TRADEFAIL_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_SOULSTONE_BUYFAIL_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_SOULSTONE_HP_USESUC_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_SOULSTONE_SP_USESUC_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_SOULSTONE_USEFAIL_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_SOULSTONE_HP_SOMEONEUSE_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_SOULSTONE_SP_SOMEONEUSE_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_FRIEND_SET_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_FRIEND_SET_CONFIRM_REQ(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_FRIEND_DEL_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_FRIEND_LOGIN_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_FRIEND_REFUSE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_FRIEND_DEL_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_FRIEND_FIND_FRIENDS_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_FRIEND_UES_FRIEND_POINT_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_FRIEND_GET_DIFF_FRIEND_POINT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_KQ_JOIN_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_KQ_JOIN_CANCEL_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_KQ_SCORE_BOARD_INFO_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_KQ_WINTER_EVENT_2014_SCORE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_WT_LICENSE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_WT_GRADE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_SCENARIO_MESSAGENOTICE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_QUEST_REWARD_NEED_SELECT_ITEM_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcReportAddReq(GameFrameWork *this, Name5 sHarmer, char *cReportType, char *cReason); // idb
int __thiscall GameFrameWork::On_NC_REPORT_ADD_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_REPORT_GET_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_REPORT_CANCEL_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcPrisonAddGMReq(GameFrameWork *this, Name5 sImprison, unsigned __int16 nMinute, char *sReason, char *sRemark); // idb
int __stdcall GameFrameWork::On_NC_PRISON_ADD_GM_ACK(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_PRISON_OK_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_PRISON_UNDOING_CMD(int iRevBytes, void *pvData);
void __thiscall GameFrameWork::NcPrisonAlterGMReq(GameFrameWork *this, Name5 sImprison, unsigned __int16 nMinute, char *sReason, char *sRemark); // idb
int __stdcall GameFrameWork::On_NC_PRISON_ALTER_GM_ACK(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_MAP_WING_SAVE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MAP_WING_FLY_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MINIHOUSE_FUNICHER_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_MINIHOUSE_ARRANGEMODE_CMD(int iRevBytes, void *pvData);
void __thiscall GameFrameWork::SendMHVisitReq(GameFrameWork *this, unsigned __int16 mh_hnd, char *PassWord); // idb
int __thiscall GameFrameWork::On_NC_MINIHOUSE_MODIFY_MAXENTERNUM_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MINIHOUSE_MODIFY_NOTIFY_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MINIHOUSE_MODIFY_ITEM_INFO_OPEN_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_MH_FURNITURE_ENDURE_KIT_USE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_GUILD_STORAGEOPEN_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MISC_EVENT_L20_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_ITEM_SOMEONEUSE_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_ITEM_DISMANTLE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_SET_UP_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_DEL_DOWN_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_DEL_UP_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_SET_UP_CONFIRM_REQ(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_DEL_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_ADD_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_REWARD_ITEM_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_REWARD_MONEY_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_SET_UP_CONFIRM_ING(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_REWARDINVENOPEN_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_GUILD_ACADEMY_REWARD_STORAGE_OPEN_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcChatRestrictAddReq(GameFrameWork *this, Name5 kCharID); // idb
int __thiscall GameFrameWork::On_NC_CHAT_RESTRICT_ADD_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcChatRestrictBlockDelReq(GameFrameWork *this, Name5 kCharID); // idb
int __thiscall GameFrameWork::ON_NC_KQ_NOREWARD_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_GET_CEN_REWARD_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_WITHDRAW_CEN_REWARD_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_CLIENT_GET_REMAIN_MONEY_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_ABSTATE_ERASE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_CHAR_CLIENT_AUTO_PICK_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MISC_MISCERROR_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MAP_LINK_FAIL_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_MAKE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_MAKE_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_DISMISS_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_LOOTING_TYPE_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcRaidInvitationReq(GameFrameWork *this, Name5 kCharID); // idb
int __thiscall GameFrameWork::On_NC_RAID_INVITATION_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcRaidInvitationAnswerReq(GameFrameWork *this, char bIsAllow); // idb
int __thiscall GameFrameWork::On_NC_RAID_INVITATION_ANSWER_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_MEMBER_JOIN_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_LEAVE_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcRaidVanishReq(GameFrameWork *this, Name5 kCharID); // idb
int __thiscall GameFrameWork::On_NC_RAID_VANISH_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_VANISH_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcRaidSlotMoveReq(GameFrameWork *this, int PreIndex, int PostIndex); // idb
void __thiscall GameFrameWork::NcRaidSetLeaderReq(GameFrameWork *this, Name5 kCharID); // idb
int __thiscall GameFrameWork::On_NC_RAID_SET_LEADER_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcRaidSetSubLeaderReq(GameFrameWork *this, Name5 kCharID); // idb
int __thiscall GameFrameWork::On_NC_RAID_SET_SUB_LEADER_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcRaidDelSubLeaderReq(GameFrameWork *this, Name5 kCharID); // idb
int __thiscall GameFrameWork::On_NC_RAID_DEL_SUB_LEADER_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcRaidSetLooterReq(GameFrameWork *this, Name5 kCharID); // idb
int __thiscall GameFrameWork::On_NC_RAID_SET_LOOTER_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_CHAT_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_WARNING_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_WARNING_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_DICE_GAME_START_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_DICE_GAME_RESULT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcPartySetLooterReq(GameFrameWork *this, Name5 kCharID); // idb
int __thiscall GameFrameWork::On_NC_PARTY_SET_LOOTER_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_PARTY_SET_LOOTER_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __stdcall GameFrameWork::SendMapMultyLink(Name3 mapName);
int __thiscall GameFrameWork::On_NC_MISC_CHAT_BLOCK_SPAMER_BLOCKTIME_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_USER_CONNECTION_CHANGE_CHAR_ID_ITEM_USE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_ENCHANT_ADD_GEM_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_ENCHANT_REMOVE_GEM_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_ENCHANT_ADD_NEW_SOCKET_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_ENCHANT_SET_GEM_LOT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::SendDefaultGameOpt(GameFrameWork *this); // idb
void __thiscall GameFrameWork::SendDefaultKeyRemappingReq(GameFrameWork *this); // idb
int __thiscall GameFrameWork::On_NC_CHAR_MYSTERYVAULT_UI_STATE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcMiscSpammerReportReq(GameFrameWork *this, Name5 kID); // idb
void __thiscall GameFrameWork::NcMiscSpammerChatBanReq(GameFrameWork *this, Name5 kID); // idb
int __thiscall GameFrameWork::On_NC_MISC_SPAMMER_CHAT_BAN_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MISC_SPAMMER_RELEASE_CHAT_BAN_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ACT_AUTO_WAY_FINDING_USE_GATE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
// int __userpurge GameFrameWork::On_NC_COLLECT_CARDOPEN_CMD@<eax>(GameFrameWork *this@<ecx>, double a2@<st0>, int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_COLLECT_BOOKMARK_REGIST_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_COLLECT_REWARD_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcCollectPeepingReq(GameFrameWork *this, Name5 *kCharID); // idb
int __thiscall GameFrameWork::On_NC_ITEM_EQUIP_BELONGED_CANCEL_USE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
// int __userpurge GameFrameWork::On_NC_CHAR_EVENT_ATTENDANCE_CHECK_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<edi>, int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_MOVER_RIDE_ON_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MOVER_RIDE_OFF_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MOVER_HUNGRY_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_PET_SET_NAME_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_PET_SET_NAME_CANCEL_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __stdcall GameFrameWork::NcPetSetNameReq(unsigned __int16 kPetHandle, Name4 kPetName);
int __thiscall GameFrameWork::On_NC_ITEM_AUTO_ARRANGE_INVEN_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MISC_ITEMSHOP_URL_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_KQ_VOTE_START_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_KQ_VOTE_VOTING_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_KQ_VOTE_CANCEL_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_KQ_VOTE_BAN_MSG_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_KQ_VOTE_BAN_MSG_LOGOFF_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_KQ_VOTE_START_CHECK_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_QUEST_JOBDUNGEON_LINK_FAIL_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_KQ_TEAM_SELECT_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_RANDOMOPTION_CHANGE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_CHAR_USEITEM_MINIMON_NORMAL_ITEM_ON_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_CHAR_USEITEM_MINIMON_CHARGED_ITEM_ON_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_REPURCHASE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ITEM_CLASS_CHANGE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_INSTANCE_DUNGEON_RANK_TAB_DAMAGEDEALT_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_INSTANCE_DUNGEON_RANK_TAB_DAMAGETAKEN_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_INSTANCE_DUNGEON_RANK_TAB_HEALINGDONE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_INSTANCE_DUNGEON_RANK_TAB_MYRANK_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_INSTANCE_DUNGEON_RANK_NEW_RANK_MSG(int iRevBytes, void *pvData);
void __thiscall GameFrameWork::NcInstanceDungeonRankTabDamagetakenReq(GameFrameWork *this, SHINE_INDUN_INFO *rInfo); // idb
void __thiscall GameFrameWork::NcInstanceDungeonRankTabHealingdoneReq(GameFrameWork *this, SHINE_INDUN_INFO *rInfo); // idb
void __thiscall GameFrameWork::NcInstanceDungeonRankTabMyRankReq(GameFrameWork *this, SHINE_INDUN_INFO *rInfo); // idb
int __thiscall GameFrameWork::On_NC_MAP_LINKOTHER_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
// int __userpurge GameFrameWork::On_NC_MAP_FREEPKZONE_ON_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<edi>, int iRevBytes, void *pvData);
// int __userpurge GameFrameWork::On_NC_MAP_PARTYBATTLEZONE_ON_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<edi>, int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_MINIHOUSE_FURNITURE_EFFECT_CMD(int iRevBytes, void *pvData);
// int __userpurge GameFrameWork::On_NC_ACT_SOMEONEMOVERUN_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<ebx>, int a3@<esi>, int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_ACT_NOTICE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ACT_NPCMENUOPEN_REQ(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_ABSTATEINFORM_NOEFFECT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_DOTDAMAGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_CLIENT_MOB_KILL_ANNOUNCE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
// int __userpurge GameFrameWork::On_NC_FRIEND_SOMEONE_GET_SPECIALITEM_WORLD_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<edi>, int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_CHAR_PROMOTE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_CHAR_SOMEONEPROMOTE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_CHARGED_BUFFSTART_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
// int __userpurge GameFrameWork::On_NC_MINIHOUSE_ARRANGEMODE_ACK@<eax>(GameFrameWork *this@<ecx>, int a2@<edi>, int iRevBytes, void *pvData);
int __thiscall GameFrameWork::ON_NC_KQ_JOINING_ALARM_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_RAID_INVITATION_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_AREADOTDAMAGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_REFLECTIONDAMAGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MISC_EVENTNPC_STANDSTART_CLIENT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MISC_EVENTNPC_STANDEND_CLIENT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_SCENARIO_MESSAGE_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_ACT_OBJECT_EFFECT_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_KQ_VOTE_RESULT_SUC_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_KQ_VOTE_RESULT_FAIL_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcKqVoteStartReq(GameFrameWork *this, Name5 kTargetID, unsigned int uiVoteType, std::basic_string<char,std::char_traits<char>,std::allocator<char> > kContents); // idb
void __thiscall GameFrameWork::NcInstanceDungeonRankTabDamagedealtReq(GameFrameWork *this, SHINE_INDUN_INFO *rInfo); // idb
int __thiscall GameFrameWork::On_NC_CHAR_REVIVEOTHER_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_SOMEONESKILLBASH_HIT_OBJ_START_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_SKILLBASH_HIT_FLD_START_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_SOMEONESKILLBASH_HIT_FLD_START_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_SKILLBASH_HIT_DAMAGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_ABSTATESET_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_ABSTATEINFORM_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_ABSTATERESET_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_SKILLBASH_HIT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::SendKeyRemappingReq(GameFrameWork *this, std::list<int,std::allocator<int> > *lstChanged); // idb
void __thiscall GameFrameWork::AttackedMsg::UpdateAttackedMsg(GameFrameWork::AttackedMsg *this); // idb
int __stdcall GameFrameWork::On_NC_CHAR_POLYMORPH_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_BAT_SKILLBASH_HIT_OBJ_START_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_BAT_BASH_HIT_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_BAT_BASH_MISS_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_BAT_SOMEONEBASH_HIT_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_BAT_BASH_MISSED_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_BAT_SOMEONEBASH_MISS_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_BAT_SWING_START_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_MINIHOUSE_MODIFY_OUTSIDE_TITLE_CMD(int iRevBytes, void *pvData);
void __thiscall GameFrameWork::AddAttacked(GameFrameWork *this, unsigned __int16 kHandle); // idb
char __stdcall GameFrameWork::ItemNameIsCorrect(std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > listLinkItem, char *pcChatMsg);
int __thiscall GameFrameWork::On_NC_BRIEFINFO_BRIEFINFODELETE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_BASH_HITTED_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BAT_SKILLBASH_HITTED_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
// int __userpurge GameFrameWork::On_NC_BAT_SOMEONESKILLBASH_HIT_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<esi>, int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_CHAR_CLIENT_NEWBIE_GUIDE_VIEW_LIST_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_ACT_SHOW_CINEMATIC(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_ACT_PLAY_SOUND_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_SCENARIO_SYSTEM_MESSAGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::ON_NC_GUILD_MOBGUILD_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_QUEST_GIVE_UP_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_QUEST_SCRIPT_CMD_REQ(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcGuildRenameReq(GameFrameWork *this, const char *pkName, int nCharInvenItem); // idb
void __thiscall GameFrameWork::NcItemEquipBelongedCancelUseReq(GameFrameWork *this, unsigned int TargetItemInvPos); // idb
int __thiscall GameFrameWork::On_NC_SCENARIO_NPCCHAT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_PET_ASK_NEW_NAME_REQ(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MAP_LINKEND_CLIENT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_BOOTH_SEARCH_BOOTH_POSITION_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_ANNOUNCE_W2C_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MINIHOUSE_MODIFY_PASSWORD_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_COLLECT_CARDREGIST_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_CHAR_EVENT_ATTENDANCE_REWARD_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_SCENARIO_SCRIPTMESSAGE_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_ACT_SCRIPT_MSG_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_SCENARIO_DIRECTIONAL_ARROW_CMD(int iRevBytes, void *pvData);
void __thiscall GameFrameWork::NcActChatReq(GameFrameWork *this, char *pcText); // idb
void __thiscall GameFrameWork::NcActShoutCmd(GameFrameWork *this, char *pcText); // idb
void __thiscall GameFrameWork::NcActWhisperReq(GameFrameWork *this, Name5 kToChar, char *pcChat); // idb
void __thiscall GameFrameWork::NcActPartyChatReq(GameFrameWork *this, char *pcChat); // idb
void __thiscall GameFrameWork::NcGuildChatReq(GameFrameWork *this, char *pcChat); // idb
void __thiscall GameFrameWork::NcGuildAcademyChatReq(GameFrameWork *this, char *pcChat); // idb
int __thiscall GameFrameWork::On_NC_MAP_LOGOUT_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __stdcall GameFrameWork::On_NC_BRIEFINFO_EFFECTBLAST_CMD(int iRevBytes, void *pvData);
int __stdcall GameFrameWork::On_NC_BRIEFINFO_EFFECT_CMD(int iRevBytes, void *pvData);
int __thiscall GameFrameWork::On_NC_MINIHOUSE_BUILDING_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MINIHOUSE_LOGINCOMPLETE_ACK(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_MINIHOUSE_MODIFY_TITLE_CMD(GameFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall GameFrameWork::NcRaidChatReq(GameFrameWork *this, char *pcChat); // idb
void __thiscall GameFrameWork::NcRaidWarningReq(GameFrameWork *this, char *pcChat); // idb
int __thiscall GameFrameWork::On_NC_SCENARIO_AREAENTRY_REQ(GameFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall GameFrameWork::On_NC_SCENARIO_AREALEAVE_REQ(GameFrameWork *this, int iRevBytes, void *pvData); // idb
// int __userpurge GameFrameWork::ProcessNetMsg@<eax>(GameFrameWork *this@<ecx>, double a2@<st0>, int iDepart, int iCommand, int iRevBytes, void *pvData);
void __cdecl Singleton<FadeObjectMgr>::getInstance();
AbnormalStateInfo *__cdecl IIDTableBase<AbnormalStateInfo,AbnormalStateInfoTab,unsigned short>::GetByID(int uiId);
AbnormalStateViewInfo *__cdecl IIDTableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab,unsigned short>::GetByID(int uiId);
ActiveSkillViewInfo *__cdecl IIDTableBase<ActiveSkillViewInfo,ActSkillViewInfoTab,unsigned short>::GetByID(int uiId);
int __thiscall Name5::operator!=(Name5 *this, Name5 *nm); // idb
void __cdecl STRING_TO_NAME(char *pcString, Name5 *kName5); // idb
bool __cdecl CharClass::IsKindOf(char kClassID, char kBaseClassID); // idb
NiPoint3 *__thiscall Char::GetDirToPosition(Char *this, NiPoint3 *result, NiPoint3 *rkPos); // idb
ExpeditionPartyWin *__thiscall GameFrameWork::GetRaidPartyWin(GameFrameWork *this, unsigned int index); // idb
void __thiscall NiPointer<NiNode>::NiPointer<NiNode>(NiPointer<NiNode> *this, NiPointer<NiNode> *ptr); // idb
unsigned int __cdecl ITableBase<ActionEffectInfo,ActionEffectInfoTab>::GetTotal(); // idb
unsigned int __cdecl ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::GetTotal(); // idb
unsigned int __cdecl ITableBase<SubAbStateInfo,SubAbStateInfoTab>::GetTotal(); // idb
std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *__cdecl std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Max(std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *_Pnode); // idb
char *__cdecl WeaponTitleTab::GetWeaponTitleStringByLevel(int MobID, unsigned int level);
void __thiscall HolyRewardMoneyWin::SetAmout(HolyRewardMoneyWin *this, unsigned __int64 money); // idb
bool __thiscall ChatBlockListWin::IsGM(ChatBlockListWin *this, Name5 kCharID); // idb
void __thiscall NiActorManager::Reset(NiActorManager *this); // idb
CollectWin::sCardInfo *__stdcall std::allocator<CollectWin::sCardInfo>::allocate(unsigned int _Count);
unsigned int __cdecl ITableBase<MobInfo,MobInfoTab>::GetTotal(); // idb
unsigned int __cdecl ITableBase<PassiveSkillInfo,PasSkillInfoTab>::GetTotal(); // idb
unsigned int __cdecl ITableBase<RIDING,RidePetTable>::GetTotal(); // idb
unsigned int __cdecl ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::GetTotal(); // idb
unsigned int __cdecl ITableBase<DamageEffect,DamageEffectTab>::GetTotal(); // idb
NiPoint3 *__thiscall mhObject::GetPos(mhObject *this, NiPoint3 *result); // idb
void __thiscall MiniHouseIndoor::SetMsgBox(MiniHouseIndoor *this, char *msg); // idb
BOOL __thiscall GameFrameWork::sRideOffValue::IsMove(GameFrameWork::sRideOffValue *this);
Item *__thiscall Inventory::GetMHItemInv(Inventory *this, unsigned int uiInvType, unsigned int uiIndex); // idb
void __thiscall Inventory::AddEquip(Inventory *this, Item *pkItem, unsigned int uiIndex); // idb
void __thiscall Inventory::AddRewardInv(Inventory *this, Item *pkItem, unsigned int uiIndex); // idb
Item *__thiscall Inventory::GetRewardInv(Inventory *this, unsigned int uiIndex); // idb
NiPointer<NiNode> *__thiscall InventoryWin::GetRunArrangeButEff(InventoryWin *this, NiPointer<NiNode> *result); // idb
NiPointer<NiNode> *__thiscall InventoryWin::GetRunArrangeInvenEff(InventoryWin *this, NiPointer<NiNode> *result); // idb
void __thiscall std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Lrotate(std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *this, std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *_Wherenode); // idb
void __thiscall std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Rrotate(std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *this, std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *_Wherenode); // idb
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>,std::_Iterator_base0>::operator--(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >,std::_Iterator_base0> *this); // idb
PassiveSkillInfo *__cdecl PasSkillInfoTab::GetByID(unsigned __int16 kID); // idb
void __thiscall RidePetWin::SetMoverSpeed(RidePetWin *this, int nSpeed); // idb
RIDING *__cdecl RidePetTable::GetByInxName(char *pcInxName); // idb
MobKillAnnounceText *__cdecl MobKillAnnounceTextTab::GetByType(MobKillAnnounceType eType); // idb
DamageEffect *__cdecl DamageEffectTab::GetByIndexName(char *pkInxName, unsigned int uiTarget); // idb
CollectCard *__cdecl CollectCardTab::GetByItemInx(const char *pcItemInx); // idb
CollectCardView *__cdecl CollectCardViewTab::GetByCardID(unsigned int uiCardID); // idb
ActionEffectInfo *__cdecl ActionEffectInfoTab::GetByID(unsigned __int16 ID); // idb
AbnormalStateInfo *__cdecl AbnormalStateInfoTab::GetByAbstateIndex(unsigned __int16 dwAbstateIndex); // idb
SubAbStateInfo *__cdecl SubAbStateInfoTab::GetByInxName(char *pcInxName); // idb
NiUnsharedGeometryGroup *__cdecl ScriptMsgTab::GetScriptMsg(const char *kIndex);
std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *__thiscall std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Insert(std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *this, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *_Newnode); // idb
std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *__thiscall std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::begin(std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *this, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *result); // idb
std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *__thiscall std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::end(std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *this, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *result); // idb
void __thiscall std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::_Splice_same(std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *this, std::_List_const_iterator<std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > _Where, std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *_Right, std::_List_const_iterator<std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > _First, std::_List_const_iterator<std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > _Last, unsigned int _Count); // idb
std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *__stdcall std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::_Buynode<SHINE_ITEM_STRUCT &>(std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *_Next, std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *_Prev, SHINE_ITEM_STRUCT *_Val);
CollectWin::sCardInfo *__cdecl std::_Uninit_copy<std::_Vector_const_iterator<std::_Vector_val<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo>>>,CollectWin::sCardInfo *,std::allocator<CollectWin::sCardInfo>>(std::_Vector_const_iterator<std::_Vector_val<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo> > > _First, std::_Vector_const_iterator<std::_Vector_val<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo> > > _Last, CollectWin::sCardInfo *_Dest);
std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > >,bool> *__thiscall std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Linsert(std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *this, std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > >,bool> *result, std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *_Node, bool _Leftish); // idb
std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *__thiscall std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Buynode<unsigned short>(std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *this, unsigned __int16 *_Val); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::replace(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int _Off, unsigned int _N0, unsigned int _Count, char _Ch); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::find(std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *result, const unsigned int *_Keyval); // idb
std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *__thiscall std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::operator++(std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *this, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *result, int __formal); // idb
ItemUseTask *__thiscall ISingletonTask<ItemUseTask>::`vector deleting destructor'(ItemUseTask *this, unsigned int a2);
void __thiscall AttackSequence::AttackSequence(AttackSequence *this); // idb
char __thiscall EffectObjectMgr::RemoveAllEffectObject(EffectObjectMgr *this);
void __thiscall std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::_Insert<std::_List_const_iterator<std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>(std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *this, std::_List_const_iterator<std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > _Where, std::_List_const_iterator<std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > _First, std::_List_const_iterator<std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > _Last, std::forward_iterator_tag __formal); // idb
void __thiscall CharMgr::AddFadeOutDeleteChar(CharMgr *this, Char *pkChar); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result, unsigned int _Off, unsigned int _Count); // idb
ItemUseTask *__cdecl ISingletonTask<ItemUseTask>::Run(); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<unsigned long,ProduceInfo *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,ProduceInfo *>>,1>>::insert<std::pair<unsigned long const,ProduceInfo *>>(std::_Tree<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > >,bool> *result, std::pair<unsigned int,Effect *> *_Val); // idb
char __cdecl MobNoFadeInTab::IsNoFadeIn(const char *pcMobInx);
void __thiscall std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>(std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *this, std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *_Right); // idb
void __thiscall std::vector<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo>>::vector<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo>>(std::vector<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo> > *this, std::vector<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo> > *_Right); // idb
void __thiscall std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::_Assign_rv(std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *this, std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *_Right); // idb
char __thiscall EffectObjectMgr::AddEffectObject(EffectObjectMgr *this, PROTO_NC_BRIEFINFO_EFFECTBLAST_CMD *kProto);
EffectObjectMgr *__thiscall EffectObjectMgr::`scalar deleting destructor'(EffectObjectMgr *this, unsigned int a2);
void __thiscall mhInfoWin::SetRoomMakerName(mhInfoWin *this, char *pcStr); // idb
EffectObjectMgr *__cdecl EffectObjectMgr::GetMgr(); // idb
void __thiscall AreaInfoMgr::~AreaInfoMgr(AreaInfoMgr *this); // idb
AreaInfoMgr *__thiscall AreaInfoMgr::`vector deleting destructor'(AreaInfoMgr *this, unsigned int a2);
AreaInfoMgr *__cdecl AreaInfoMgr::GetInstance(); // idb
double __thiscall NiPoint3::SqrLength(NiPoint3 *this);
void __stdcall GameFrameWork::ChangeCampMode(int bCamp, int byMode);
void __thiscall GameFrameWork::UpdateMainCharOnRevActNone(GameFrameWork *this, float fCurTime); // idb
void __thiscall GameFrameWork::ActJump(GameFrameWork *this); // idb
void __stdcall GameFrameWork::UpdateMainCharOnRevActPickItem(float fCurTime);
char __thiscall GameFrameWork::UpdateMainCharMove(GameFrameWork *this, float fCurTime);
void __thiscall GameFrameWork::StopMove(GameFrameWork *this); // idb
void __thiscall GameFrameWork::Assist(GameFrameWork *this, Char *pkChar); // idb
void __thiscall GameFrameWork::Stick(GameFrameWork *this, Char *pkChar, bool bStart); // idb
bool __thiscall GameFrameWork::CheckCancelingMoveUpdate(GameFrameWork *this); // idb
void __thiscall GameFrameWork::UpdateMainCharOnRevActPickGround(GameFrameWork *this, float fCurTime, int bMoveModeChange);
// void __userpurge GameFrameWork::MainCharMoveToChar(GameFrameWork *this@<ecx>, int a2@<edi>, Char *pkTargetChar, float fDistance, int eNextAct);
void __thiscall GameFrameWork::MainCharMoveToChar(GameFrameWork *this, NiPoint3 *rkPos, float fDistance, int eNextAct); // idb
void __thiscall GameFrameWork::CurTargetAssist(GameFrameWork *this); // idb
void __thiscall GameFrameWork::AutoRun(GameFrameWork *this); // idb
char __stdcall GameFrameWork::CheckUsableDirection(unsigned __int16 kSkillID, NiPoint3 TargetPos);
char __thiscall GameFrameWork::CheckWeaponCostumeWhenAttackTry(GameFrameWork *this);
void __thiscall GameFrameWork::MainCharTryUseSkill(GameFrameWork *this, int kSkillID, float fCurTime, Char *pkTarget);
char __thiscall GameFrameWork::MainCharTryUseSkill(GameFrameWork *this, int kSkillID, float fTime, unsigned int x, unsigned int y);
bool __thiscall GameFrameWork::CheckGroundSkillEnabled(GameFrameWork *this, bool bForcetoMove); // idb
void __thiscall GameFrameWork::UpdateKeyboardMove(GameFrameWork *this); // idb
void __thiscall GameFrameWork::UpdateMainCharOnRevActSkill(GameFrameWork *this, float fCurTime); // idb
void __thiscall GameFrameWork::MainCharTryToAttack(GameFrameWork *this, Char *pkTargetChar); // idb
void __thiscall GameFrameWork::UpdateMainCharOnRevActPickChar(GameFrameWork *this, float fCurTime); // idb
// void __userpurge GameFrameWork::UpdateMainCharOnRevActAttack(GameFrameWork *this@<ecx>, void (__thiscall ***a2)(_DWORD, _DWORD)@<edi>, float fCurTime);
void __thiscall GameFrameWork::UpdateMainCharOnRevActMHCharEmotion(GameFrameWork *this, float fCurTime); // idb
// void __userpurge GameFrameWork::UpdateMainChar(GameFrameWork *this@<ecx>, void (__thiscall ***a2)(_DWORD, _DWORD)@<edi>, float fCurTime);
double __thiscall NiPoint2::Length(NiPoint2 *this);
double __thiscall Char::GetDistanceToChar(Char *this, Char *pkChar);
void __thiscall MainChar::ResetReserveSkill(MainChar *this); // idb
WeaponAttrib *__cdecl WeaponAttribTab::GetWeaponAttrib(WeaponTypeEnum eWeaponEnum); // idb
void __thiscall GameFrameWork::SetResList(GameFrameWork *this); // idb
DropItem *__thiscall GameFrameWork::GetDropItemByHandle(GameFrameWork *this, unsigned __int16 kHandle, int iDepart, int iCommand); // idb
void __thiscall GameFrameWork::CloseAutoCloseWin(GameFrameWork *this, PgWin *pkWin); // idb
void __thiscall GameFrameWork::LockShortCutWinInvPosItem(GameFrameWork *this, unsigned __int16 invPos); // idb
void __thiscall GameFrameWork::UnLockShortCutWinInvPosItem(GameFrameWork *this); // idb
void __thiscall GameFrameWork::AddRoarChat(GameFrameWork *this, char *CharName, char *pcText); // idb
void __thiscall GameFrameWork::CancelSkillCasting(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenGambleHouseWin(GameFrameWork *this, bool bAllClosed); // idb
void __thiscall GameFrameWork::OnOpenExchangeCoinWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OnOpenVipCardWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::SetEnchantGemWinPos(GameFrameWork *this, int XPos, int YPos, unsigned int UI_Type); // idb
void __thiscall GameFrameWork::SearchQuestStartItem(GameFrameWork *this, unsigned __int16 qID, bool bGiveup); // idb
void __thiscall GameFrameWork::AdjustFocus(GameFrameWork *this); // idb
bool __thiscall GameFrameWork::IsDuringEdit(GameFrameWork *this); // idb
bool __thiscall GameFrameWork::IsFriend(GameFrameWork *this, Name5 *CharID); // idb
GameFrameWork::DisplayAspect __thiscall GameFrameWork::GetDisplyAspect(GameFrameWork *this, unsigned int uiWidht, unsigned int uiHeight);
void __stdcall GameFrameWork::ConvertCommaNumberWork(__int64 i64Val, char *pNumberString);
void __stdcall GameFrameWork::RemoveColorText(char *pText, char *pRemoveColorText, int nLimitTextCnt);
void __thiscall KeyboardMoveProcess::KeyboardMoveProcess(KeyboardMoveProcess *this); // idb
KeyboardMoveProcess::Result __thiscall KeyboardMoveProcess::Update(KeyboardMoveProcess *this);
Char *__thiscall GameFrameWork::GetCharByHandle(GameFrameWork *this, unsigned __int16 kHandle, int iDepart, int iCommand); // idb
void __thiscall GameFrameWork::UpdateAutoCloseWin(GameFrameWork *this); // idb
char __stdcall GameFrameWork::AdjustRestHP(unsigned __int16 CharHandle, unsigned int *restHP);
void __thiscall GameFrameWork::OpenDiceGameWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::OpenSlotMachineWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::SetCharEmotionUIState(GameFrameWork *this, bool bMHEmotionStart); // idb
void __stdcall GameFrameWork::UpdateUIScroll(SlideListWin *pkList, CClientGuild *pkGuild);
void __thiscall GameFrameWork::UpdateUIScroll(GameFrameWork *this, FrameBoxWin *pkBox, ChatBoardFlex *pkBoard); // idb
void __thiscall GameFrameWork::OnShowWinInterfaceList(GameFrameWork *this, bool bShow); // idb
// void __userpurge GameFrameWork::AddScenarioMsg(GameFrameWork *this@<ecx>, int a2@<edi>, ScriptMsg *pkMsgInfo, char *pkStr);
char __thiscall GameFrameWork::UseActiveSkillItem(GameFrameWork *this, unsigned int uiInvenSlot, unsigned __int16 kSkillID);
void __thiscall KeyboardMoveProcess::SetAutoRun(KeyboardMoveProcess *this, bool bAutoRun); // idb
void __thiscall GameFrameWork::Draw(GameFrameWork *this); // idb
void __thiscall GameFrameWork::GetDropItemByPicking(GameFrameWork *this, DropItem *pkDropItem); // idb
void __thiscall GameFrameWork::SetAutoCloseWin(GameFrameWork *this, PgWin *pkWin); // idb
void __stdcall GameFrameWork::UpdateUIScroll(SlideListWin *pkList, SlideBar *pkBar);
// char __usercall GameFrameWork::IsPlayCardOpen@<al>(GameFrameWork *this@<ecx>, double a2@<st0>);
bool __thiscall GameFrameWork::IsVotePossible(GameFrameWork *this, unsigned int kHandle); // idb
// char __usercall GameFrameWork::IsAvailableArrange@<al>(GameFrameWork *this@<ecx>, double a2@<st0>);
void __thiscall GameFrameWork::OnAutoPickByMiniMon(GameFrameWork *this, std::_Vector_iterator<std::_Vector_val<DropItem *,std::allocator<DropItem *> > > iterBegin, std::_Vector_iterator<std::_Vector_val<DropItem *,std::allocator<DropItem *> > > iterEnd); // idb
// char __usercall GameFrameWork::PlayCardEffect@<al>(GameFrameWork *this@<ecx>, double a2@<st0>);
void __thiscall GameFrameWork::HideEscapeWin(GameFrameWork *this); // idb
void __thiscall GameFrameWork::CheckWebFocus(GameFrameWork *this); // idb
void __thiscall GameFrameWork::DelWebList(GameFrameWork *this, HWND__ *hHandle); // idb
void __stdcall GameFrameWork::NowLoadingText(int LoadingRate);
void __thiscall GameFrameWork::UpdateAskServerInform(GameFrameWork *this, float fTime); // idb
void __thiscall GameFrameWork::ResetAskServerInform(GameFrameWork *this); // idb
// void __usercall GameFrameWork::OpenCard(GameFrameWork *this@<ecx>, double a2@<st0>);
void __thiscall GameFrameWork::AddWebList(GameFrameWork *this, std::pair<HWND__ *,PgWin *> kElement); // idb
bool __thiscall GameFrameWork::AddAskServerInform(GameFrameWork *this, float fTime, unsigned __int16 hnd, NETCOMMAND *netCmd); // idb
// void __userpurge GameFrameWork::RegisterCard(GameFrameWork *this@<ecx>, double a2@<st0>, unsigned int uiSlot, unsigned int uiCardID, unsigned int uiStar, unsigned int uiSerial);
void __thiscall GameFrameWork::~GameFrameWork(GameFrameWork *this); // idb
void __thiscall GameFrameWork::GetDropItemByArea(GameFrameWork *this, GameFrameWork::AutoPickType eType); // idb
void __thiscall GameFrameWork::AutoPickDropItem(GameFrameWork *this); // idb
void __thiscall GameFrameWork::GameFrameWork(GameFrameWork *this); // idb
// void __userpurge GameFrameWork::Update(GameFrameWork *this@<ecx>, MapNavigator *a2@<edi>, float fCurTime);
MapViewInfo *__cdecl IIDTableBase<MapViewInfo,MapViewInfoTab,unsigned short>::GetByID(int uiId);
void __cdecl std::_Push_heap<DropItem * *,int,DropItem *,DropItemSorter>(DropItem **_First, int _Hole, int _Top, DropItem **_Val, DropItemSorter _Pred); // idb
void __thiscall NiTListBase<DFALL<IOptionBase *>,IOptionBase *>::~NiTListBase<DFALL<IOptionBase *>,IOptionBase *>(NiTListBase<DFALL<IOptionBase *>,IOptionBase *> *this); // idb
NiTListBase<DFALL<IOptionBase *>,IOptionBase *> *__thiscall NiTListBase<DFALL<IOptionBase *>,IOptionBase *>::`scalar deleting destructor'(NiTListBase<DFALL<IOptionBase *>,IOptionBase *> *this, unsigned int a2);
void __cdecl std::_Adjust_heap<DropItem * *,int,DropItem *,DropItemSorter>(DropItem **_First, int _Hole, int _Bottom, DropItem **_Val, DropItemSorter _Pred); // idb
NiPointer<NiRenderer> *__thiscall MainApp::GetRender(MainApp *this, NiPointer<NiRenderer> *result); // idb
KQIsVote *__cdecl KQIsVoteTable::GetByID(const int iID); // idb
BasicInfoFindUI *__cdecl BasicInfoFindUITab::GetByUIFile(char *FileName); // idb
NiTList<IOptionBase *> *__thiscall NiTList<IOptionBase *>::`scalar deleting destructor'(NiTList<IOptionBase *> *this, unsigned int a2);
void __cdecl std::_Make_heap<DropItem * *,int,DropItem *,DropItemSorter>(DropItem **_First, DropItem **_Last, DropItemSorter _Pred);
void __thiscall std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(std::vector<NiTimeController *,std::allocator<NiTimeController *> > *this, unsigned int _Count); // idb
void __cdecl std::_Sort_heap<DropItem * *,DropItemSorter>(DropItem **_First, DropItem **_Last, DropItemSorter _Pred); // idb
void __thiscall std::vector<PgWinText *,std::allocator<PgWinText *>>::resize(std::vector<NiTimeController *,std::allocator<NiTimeController *> > *this, unsigned int _Newsize); // idb
NiPointer<PgSprData> *__cdecl std::_Uninit_move<NiPointer<ScreenBoardTexture::DescInfo> *,NiPointer<ScreenBoardTexture::DescInfo> *,std::allocator<NiPointer<ScreenBoardTexture::DescInfo>>,NiPointer<ScreenBoardTexture::DescInfo>>(NiPointer<PgSprData> *_First, NiPointer<PgSprData> *_Last, NiPointer<PgSprData> *_Dest);
void __thiscall std::vector<NiPoint2,std::allocator<NiPoint2>>::reserve(std::vector<NiPoint2,std::allocator<NiPoint2> > *this, unsigned int _Count); // idb
void __cdecl std::_Partial_sort<DropItem * *,DropItem *,DropItemSorter>(DropItem **_First, DropItem **_Mid, DropItem **_Last, DropItemSorter _Pred);
void __thiscall std::set<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>>::~set<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>>(std::set<unsigned int,std::less<unsigned int>,std::allocator<unsigned int> > *this); // idb
void __thiscall std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData>>>::push_back(std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData> > > *this, NiPointer<PgSprData> *_Val); // idb
void __thiscall GameFrameWork::SmartWhisper::~SmartWhisper(GameFrameWork::SmartWhisper *this); // idb
NiRTTI *GameFrameWork::GetRTTI();
const char *GameFrameWork::GetFrameWorkName();
GameFrameWork *__thiscall GameFrameWork::`vector deleting destructor'(GameFrameWork *this, unsigned int a2);
int __thiscall ActionIconWin::GetActionViewInfoID(ActionIconWin *this); // idb
char __thiscall ActionIconWin::Create(ActionIconWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork);
bool __stdcall ActionIconWin::EatDropInstance(PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
void __thiscall ActionIconWin::OnFirstHitWin(ActionIconWin *this); // idb
void __thiscall PremiumActionIcon::PremiumActionIcon(PremiumActionIcon *this); // idb
void __thiscall PremiumActionIcon::~PremiumActionIcon(PremiumActionIcon *this); // idb
bool __thiscall PremiumActionIcon::Create(PremiumActionIcon *this, int iXPos, int iYPos, PgWin *pkParent); // idb
void PremiumActionWin::OnHelpLink();
void __thiscall ActionInvTabButWin::ActionInvTabButWin(ActionInvTabButWin *this); // idb
void __thiscall ActionInvTabButWin::~ActionInvTabButWin(ActionInvTabButWin *this); // idb
bool __thiscall ActionInvTabButWin::Create(ActionInvTabButWin *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg); // idb
void ActionWin::OnHelpLink();
void __thiscall ActionIconWin::~ActionIconWin(ActionIconWin *this); // idb
void __thiscall ActionWin::ActionWin(ActionWin *this); // idb
void __thiscall ActionWin::~ActionWin(ActionWin *this); // idb
void __thiscall ActionWin::OnWinClose(ActionWin *this); // idb
void __thiscall ActionWin::OnDefaultSlot_LClick(ActionWin *this, unsigned int lParam); // idb
void __thiscall ActionWin::OnEmotionSlot_LClick(ActionWin *this, unsigned int lParam); // idb
void __thiscall ActionWin::StartHpStonCoolTime(ActionWin *this); // idb
void __thiscall ActionWin::StartSpStonCoolTime(ActionWin *this); // idb
void __thiscall PremiumActionWin::PremiumActionWin(PremiumActionWin *this); // idb
void __thiscall PremiumActionWin::~PremiumActionWin(PremiumActionWin *this); // idb
void __thiscall PremiumActionWin::OnShowActionWin(PremiumActionWin *this); // idb
void __thiscall PremiumActionWin::OnEmotionAction(PremiumActionWin *this, unsigned int lParam); // idb
char __thiscall ActionInvTabButWin::EatDropInstance(ActionInvTabButWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
void __thiscall ActionIconWin::DoAction(ActionIconWin *this); // idb
void __thiscall ActionIconWin::DoRAction(ActionIconWin *this); // idb
void __thiscall ActionIconWin::SetTopPlaneColor(ActionIconWin *this, float rad, float green, float blue, float alpha); // idb
void __thiscall ActionWin::UpdateMeWin(ActionWin *this, float fCurTime); // idb
void __thiscall PremiumActionIcon::OnFirstHitWin(PremiumActionIcon *this); // idb
void __thiscall PremiumActionIcon::DoAction(PremiumActionIcon *this); // idb
void __thiscall PremiumActionIcon::DoRAction(PremiumActionIcon *this); // idb
void __thiscall PremiumActionWin::Refresh(PremiumActionWin *this); // idb
void __thiscall PremiumActionWin::OnInvLClick(PremiumActionWin *this, unsigned int uiInvIndex); // idb
void __thiscall PremiumActionWin::OnInvRClick(PremiumActionWin *this, unsigned int uiInvIndex); // idb
char __thiscall PremiumActionWin::Change(PremiumActionWin *this, unsigned int uiInvType, Item *pkItem, unsigned int uiInvIndex);
int __thiscall PremiumActionWin::GetIconPosIndex(PremiumActionWin *this, int ActionViewInfoID); // idb
int __thiscall ActionWin::GetIconPosIndex(ActionWin *this, int ActionViewInfoID); // idb
void __thiscall ActionWin::OnEmotionAction(ActionWin *this, unsigned int lParam); // idb
void __thiscall ActionWin::OnPremiumAction(ActionWin *this); // idb
char __thiscall ActionWin::Change(ActionWin *this, unsigned int uiInvType, Item *pkItem, unsigned int uiInvIndex);
void __thiscall PremiumActionWin::OnCommand(PremiumActionWin *this, unsigned int wParam, int lParam); // idb
void __thiscall PremiumActionWin::SetMHActionState(PremiumActionWin *this, bool bMHEmotionStart); // idb
void __thiscall ActionIconWin::ActionIconWin(ActionIconWin *this); // idb
void __thiscall ActionWin::OnEmotionSlot_RClick(ActionWin *this, unsigned int lParam); // idb
void __thiscall ActionWin::SetMHActionState(ActionWin *this, bool bMHEmotionStart); // idb
ActionIconWin *__cdecl ActionIconWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork); // idb
ActionWin *__cdecl ActionWin::CreateWin(PgFrameWork *pkFrameWork); // idb
PremiumActionIcon *__cdecl PremiumActionIcon::CreateWin(int iXPos, int iYPos, PgWin *pkParent); // idb
PremiumActionWin *__cdecl PremiumActionWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall PremiumActionWin::Create(PremiumActionWin *this, PgFrameWork *pkFrameWork);
ActionInvTabButWin *__cdecl ActionInvTabButWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg); // idb
char __thiscall ActionWin::Create(ActionWin *this, PgFrameWork *pkFrameWork);
void __thiscall ActionWin::OnDefaultAction(ActionWin *this, unsigned int lParam); // idb
void __thiscall PremiumActionWin::DropOnLClickInv(PremiumActionWin *this, unsigned int uiInvIndex); // idb
void __thiscall ActionWin::OnDefaultSlot_RClick(ActionWin *this, unsigned int lParam); // idb
bool __thiscall PremiumActionWin::DropOnInv(PremiumActionWin *this, DropContents *pkContents, unsigned int uiReceiverInvIndex); // idb
void __thiscall ActionWin::OnCommand(ActionWin *this, unsigned int wParam, int lParam); // idb
bool __thiscall PremiumActionIcon::EatDropInstance(PremiumActionIcon *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos); // idb
void __thiscall GameFrameWork::GetGroundPosCam(GameFrameWork *this, NiPoint3 *kGroundPos); // idb
unsigned int __cdecl ITableBase<MHEmotion,MiniHouseEmotionTab>::GetTotal(); // idb
PremiumActionIcon *__thiscall PremiumActionIcon::`vector deleting destructor'(PremiumActionIcon *this, unsigned int a2);
ActionInvTabButWin *__thiscall ActionInvTabButWin::`scalar deleting destructor'(ActionInvTabButWin *this, unsigned int a2);
void __thiscall PgWinBut::DoAction(PgWinBut *this); // idb
ActionIconWin *__thiscall ActionIconWin::`scalar deleting destructor'(ActionIconWin *this, unsigned int a2);
ActionWin *__thiscall ActionWin::`scalar deleting destructor'(ActionWin *this, unsigned int a2);
PremiumActionWin *__thiscall PremiumActionWin::`scalar deleting destructor'(PremiumActionWin *this, unsigned int a2);
MHEmotion *__cdecl MiniHouseEmotionTab::GetNonMenuEmotion(unsigned __int16 MHEmotionID, char byActionViewID); // idb
void __thiscall NiAVObject::DetachProperty(NiAVObject *this, NiProperty *pkProperty); // idb
void __thiscall PgFadeTextGeometry::SetLifeTime(PgFadeTextGeometry *this, float fLifeTime); // idb
void __thiscall PgFadeTextGeometry::UpdateDownwardPass(PgFadeTextGeometry *this, float fTime, bool bUpdateControllers); // idb
void __thiscall PgFadeTextGeometry::CopyFrom(PgFadeTextGeometry *this, PgFadeTextGeometry *pkSrc); // idb
void __thiscall AnnounceWin::UpdateMeWin(AnnounceWin *this, float fCurTime); // idb
void __thiscall AnnounceWin::SetFont(AnnounceWin *this, PgFont *pkFont); // idb
void __thiscall PgFadeTextGeometry::PgFadeTextGeometry(PgFadeTextGeometry *this, PgFont *pkFont); // idb
void __thiscall AnnounceWin::~AnnounceWin(AnnounceWin *this); // idb
void __thiscall AnnounceWin::AnnounceWin(AnnounceWin *this); // idb
char __thiscall AnnounceWin::Create(AnnounceWin *this, PgFrameWork *pkFrameWork);
// void __userpurge AnnounceWin::AddText(AnnounceWin *this@<ecx>, int a2@<edi>, int a3@<esi>, char *pcText, D3DXCOLOR *TextColor, bool bSingleLine, float fLifeTime);
AnnounceWin *__cdecl AnnounceWin::CreateWin(PgFrameWork *pkFrameWork); // idb
NiRTTI *NiNode::GetRTTI();
char *__thiscall PgTextGeometry::GetText(PgTextGeometry *this); // idb
unsigned int __thiscall PgTextGeometry::GetTextWidth(PgTextGeometry *this); // idb
unsigned int __thiscall PgTextGeometry::GetTextHeight(PgTextGeometry *this); // idb
void __thiscall PgTextGeometry::SetTextRect(PgTextGeometry *this, tagRECT *kRect); // idb
void __thiscall PgTextGeometry::SetColor(PgTextGeometry *this, D3DXCOLOR *kColor); // idb
void __thiscall PgTextGeometry::SetResetTextAfterDraw(PgTextGeometry *this, bool b); // idb
bool __thiscall PgTextGeometry::GetResetTextAfterDraw(PgTextGeometry *this); // idb
void __thiscall PgTextGeometry::SetFont(PgTextGeometry *this, PgFont *pkFont); // idb
PgFadeTextGeometry *__thiscall PgFadeTextGeometry::`scalar deleting destructor'(PgFadeTextGeometry *this, unsigned int a2);
AnnounceWin *__thiscall AnnounceWin::`vector deleting destructor'(AnnounceWin *this, unsigned int a2);
void __stdcall __noreturn ATL::AtlThrowImpl(HRESULT hr);
void __thiscall ATL::CTime::CTime(ATL::CTime *this, int nYear, int nMonth, int nDay, int nHour, int nMin, int nSec, int nDST); // idb
void __thiscall AttendCheckBut::AttendCheckBut(AttendCheckBut *this); // idb
void __thiscall AttendCheckBut::SetTextColor(AttendCheckBut *this, D3DXCOLOR *kColor); // idb
CSpFont *__stdcall AttendCheckWin::CreateFontA(Font::FontDefine *kFontDefine);
void __thiscall AttendCheckWin::OnCloseWin(AttendCheckWin *this); // idb
void __thiscall AttendCheckWin::SetDate(AttendCheckWin *this, tm *T, const int Cnt); // idb
void __stdcall AttendCheckWin::OnClick(const unsigned int uiBtnIndex);
void __thiscall AttendCheckWin::OnRewardEffect(AttendCheckWin *this); // idb
void __thiscall AttendCheckBut::Create(AttendCheckBut *this, int iOffX, int iOffY, PgWin *pkParent, NiSourceTexture *pkTexture); // idb
void __thiscall AttendCheckBut::Create(AttendCheckBut *this, int iOffX, int iOffY, const unsigned int eButMessage, const unsigned int uiIndex, PgWin *pkParent, NiSourceTexture *pkTexture); // idb
void __thiscall AttendCheckBut::SetType(AttendCheckBut *this, unsigned int eType); // idb
char __thiscall AttendCheckWin::Create(AttendCheckWin *this, PgFrameWork *pkFrameWork);
void __thiscall AttendCheckWin::OnCommand(AttendCheckWin *this, unsigned int wParam, int lParam); // idb
void __thiscall AttendCheckWin::UpdateMeWin(AttendCheckWin *this, float fCurTime); // idb
void __thiscall AttendCheckWin::InitEvtState(AttendCheckWin *this); // idb
void __thiscall AttendCheckWin::SetCheckState(AttendCheckWin *this, const char *uiCheckState); // idb
void __thiscall AttendCheckWin::SetButState(AttendCheckWin *this, const char *uiRewardState, const int iRewardCnt); // idb
void __thiscall AttendCheckWin::CheckIt(AttendCheckWin *this); // idb
void __thiscall AttendCheckWin::SetReward(AttendCheckWin *this, const unsigned int uiRewardID); // idb
void __thiscall AttendCheckWin::ChangeDay(AttendCheckWin *this, const int EvtIndex); // idb
int __thiscall AttendCheckWin::GetMonthRewardIndex(AttendCheckWin *this); // idb
char __thiscall AttendCheckWin::IsRewardOn(AttendCheckWin *this);
char __thiscall AttendCheckWin::IsRewardAll(AttendCheckWin *this);
void __thiscall AttendCheckBut::~AttendCheckBut(AttendCheckBut *this); // idb
void __thiscall AttendCheckWin::AttendCheckWin(AttendCheckWin *this); // idb
void __thiscall AttendCheckWin::~AttendCheckWin(AttendCheckWin *this); // idb
void __thiscall AttendCheckWin::SetEvtState(AttendCheckWin *this, tm *T, const int Cnt, const char *iCheckState, const char *iRewardState, const int iRewardCnt); // idb
AttendCheckWin *__cdecl AttendCheckWin::CreateWin(PgFrameWork *pkFrameWork); // idb
unsigned int __cdecl ITableBase<AttendReward,AttendRewardTab>::GetTotal(); // idb
AttendReward *__cdecl AttendRewardTab::GetByType(const unsigned int uiType); // idb
AttendReward *__cdecl AttendRewardTab::GetByType(const unsigned int uiType, unsigned int *uiIndex); // idb
int __cdecl AttendRewardTab::GetNumOfType(unsigned int uiType);
AttendCheckBut *__thiscall AttendCheckBut::`vector deleting destructor'(AttendCheckBut *this, unsigned int a2);
AttendCheckWin *__thiscall AttendCheckWin::`scalar deleting destructor'(AttendCheckWin *this, unsigned int a2);
void __thiscall AttendIconWin::AttendIconWin(AttendIconWin *this); // idb
void __thiscall AttendIconWin::SetActive(AttendIconWin *this, bool bActive); // idb
void __thiscall AttendIconWin::OnLClick(AttendIconWin *this); // idb
char __thiscall AttendIconWin::Create(AttendIconWin *this, PgFrameWork *pkFrameWork);
void __thiscall AttendIconWin::OnCommand(AttendIconWin *this, unsigned int wParam, int lParam); // idb
void __thiscall AttendIconWin::~AttendIconWin(AttendIconWin *this); // idb
AttendIconWin *__cdecl AttendIconWin::CreateWin(PgFrameWork *pkFrameWork); // idb
AttendIconWin *__thiscall AttendIconWin::`scalar deleting destructor'(AttendIconWin *this, unsigned int a2);
void __thiscall AttendRewardWin::AttendRewardWin(AttendRewardWin *this); // idb
void __thiscall AttendRewardWin::~AttendRewardWin(AttendRewardWin *this); // idb
void __thiscall AttendRewardWin::OnCloseWin(AttendRewardWin *this); // idb
void __thiscall AttendRewardWin::OnCommand(AttendRewardWin *this, unsigned int wParam, int lParam); // idb
char __thiscall AttendRewardWin::Create(AttendRewardWin *this, PgFrameWork *pkFrameWork);
// void __userpurge AttendRewardWin::SetItemInfo(AttendRewardWin *this@<ecx>, int a2@<ebx>, int a3@<edi>, const unsigned int uiRewardID, Item *const pkItem);
AttendRewardWin *__cdecl AttendRewardWin::CreateWin(PgFrameWork *pkFrameWork); // idb
AttendRewardWin *__thiscall AttendRewardWin::`vector deleting destructor'(AttendRewardWin *this, unsigned int a2);
void __thiscall BasicInfoTipWin::~BasicInfoTipWin(BasicInfoTipWin *this); // idb
void __thiscall BasicInfoTipWin::AddText(BasicInfoTipWin *this, const char *pcText); // idb
void __thiscall BasicInfoTipWin::AddText(BasicInfoTipWin *this, const char *pcText, D3DXCOLOR sTextColor); // idb
void __thiscall BasicInfoTipWin::AddText(BasicInfoTipWin *this, const char *pcText, D3DXCOLOR sTextColor, const float fLifeTime); // idb
void __thiscall BasicInfoTipWin::Clear(BasicInfoTipWin *this); // idb
BOOL __stdcall BasicInfoTipWin::ConfirmLevel(const unsigned int uiMinLevel, const unsigned int uiMaxLevel);
char __thiscall BasicInfoTipWin::Create(BasicInfoTipWin *this, PgFrameWork *pkFrameWork);
void __thiscall BasicInfoTipWin::SetResoulution(BasicInfoTipWin *this, unsigned int uiWidth, unsigned int uiHeight); // idb
void __thiscall BasicInfoTipWin::Update(BasicInfoTipWin *this, float fCurTime); // idb
void __thiscall BasicInfoTipWin::BasicInfoTipWin(BasicInfoTipWin *this, const float fCycle); // idb
BasicInfoTipWin *__cdecl BasicInfoTipWin::CreateWin(PgFrameWork *pkFrameWork, const float fCycle); // idb
BasicInfoTipWin *__thiscall BasicInfoTipWin::`scalar deleting destructor'(BasicInfoTipWin *this, unsigned int a2);
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::_Max(std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *_Pnode); // idb
__int64 __thiscall ShineDateTime::toTime_t(ShineDateTime *this); // idb
void __thiscall StatusBuffWin::ResetIcons(StatusBuffWin *this); // idb
void __thiscall StatusBuffWin::SetFrameBoxSize(StatusBuffWin *this, unsigned int uiWidth, unsigned int uiHeight); // idb
void __thiscall StatusBuffWin::AlignBuf(StatusBuffWin *this, int row, int column); // idb
void __thiscall StatusBuffWin::SetBuffUI(StatusBuffWin *this, Char *pkMember, StateType type, int *AbstateNums); // idb
void __thiscall StatusBuffWin::ProcessMeInput(StatusBuffWin *this, bool *bHit); // idb
void __stdcall StatusBuffWin::GetDayStr(char *MsgBuffer, int MsgBufSize, int Day);
void __stdcall StatusBuffWin::GetHourStr(char *MsgBuffer, int MsgBufSize, int Hour);
void __stdcall StatusBuffWin::GetMinStr(char *MsgBuffer, int MsgBufSize, int Min);
char *__stdcall StatusBuffWin::GetRemainTime(char *MsgBuffer, PROTO_CHARGEDBUFF_INFO *pkInfo);
char __thiscall StatusBuffWin::Create(StatusBuffWin *this, PgFrameWork *pkFrameWork, StatusBuffWin::EBUFF_TYPE type);
char __thiscall StatusBuffWin::RefreshChargedBuffIcon(StatusBuffWin *this, ChargedIconItem *pkInfo, PROTO_CHARGEDBUFF_INFO *pkBuffInfo, int BufNum);
void __thiscall StatusBuffWin::RemoveMsgItemToMap(StatusBuffWin *this, char *pcKeyName); // idb
void __thiscall StatusBuffWin::RemoveAllMsgItemFromMap(StatusBuffWin *this); // idb
void __thiscall StatusBuffWin::AddMsgItemToMap(StatusBuffWin *this, char *pcKeyName); // idb
void __thiscall StatusBuffWin::RefreshChargedBuffMsg(StatusBuffWin *this, ChargedMessageItem *pkInfo, PROTO_CHARGEDBUFF_INFO *pkBuffInfo); // idb
void __thiscall StatusBuffWin::RefreshChargedItems(StatusBuffWin *this, int *BufNum); // idb
void __thiscall StatusBuffWin::~StatusBuffWin(StatusBuffWin *this); // idb
void __thiscall StatusBuffWin::UpdateMeWin(StatusBuffWin *this, float fCurTime); // idb
// void __userpurge StatusBuffWin::DirectMessage(StatusBuffWin *this@<ecx>, int a2@<ebx>, double a3@<st0>, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom);
void __thiscall StatusBuffWin::StatusBuffWin(StatusBuffWin *this); // idb
StatusBuffWin *__cdecl StatusBuffWin::CreateWin(PgFrameWork *pkFrameWork, StatusBuffWin::EBUFF_TYPE type); // idb
unsigned int __cdecl ITableBase<ChargedMessageItem,ChargedMsgItemTab>::GetTotal(); // idb
unsigned int __cdecl ITableBase<ChargedIconItem,ChargedIconItemTab>::GetTotal(); // idb
ChargedMessageItem *__cdecl ChargedMsgItemTab::GetByItemName(const char *ItemName); // idb
ChargedIconItem *__cdecl ChargedIconItemTab::GetByItemName(const char *ItemName); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::find(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > *result, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Keyval); // idb
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,bool,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,bool> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,bool,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,bool>>,0>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,bool> &>(std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,bool,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,bool> >,0> > *this, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,bool> *_Val); // idb
void __thiscall std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>>::~map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>>(CSingleDataMap *this); // idb
StatusBuffWin *__thiscall StatusBuffWin::`vector deleting destructor'(StatusBuffWin *this, unsigned int a2);
void __thiscall CalculatorWin::OnCmdOk(CalculatorWin *this); // idb
void __thiscall CalculatorWin::OnCmdCancel(CalculatorWin *this); // idb
void __thiscall CalculatorWin::GetValueFromEdit(CalculatorWin *this); // idb
void __thiscall CalculatorWin::SetValueToEdit(CalculatorWin *this); // idb
void __thiscall CalculatorWin::OnCmdNum(CalculatorWin *this, unsigned int uiVal); // idb
void __thiscall CalculatorWin::OnCmdNum00(CalculatorWin *this); // idb
void __thiscall CalculatorWin::OnCmdMax(CalculatorWin *this); // idb
void __thiscall CalculatorWin::OnCmdClear(CalculatorWin *this); // idb
void __thiscall CalculatorWin::OnCmdPlus(CalculatorWin *this); // idb
void __thiscall CalculatorWin::OnCmdMinus(CalculatorWin *this); // idb
void __thiscall CalculatorWin::Open(CalculatorWin *this, PgWin *pkRevWin, unsigned int uiOkMsg, unsigned int uiMax, char *pcText); // idb
void __thiscall CalculatorWin::CalculatorWin(CalculatorWin *this); // idb
void __thiscall CalculatorWin::~CalculatorWin(CalculatorWin *this); // idb
char __thiscall CalculatorWin::Create(CalculatorWin *this, PgFrameWork *pkFrameWork);
void __thiscall CalculatorWin::OnCommand(CalculatorWin *this, unsigned int wParam, int lParam); // idb
CalculatorWin *__cdecl CalculatorWin::CreateWin(PgFrameWork *pkFrameWork); // idb
CalculatorWin *__thiscall CalculatorWin::`vector deleting destructor'(CalculatorWin *this, unsigned int a2);
void __thiscall CastingProgressWin::CastingProgressWin(CastingProgressWin *this); // idb
void __thiscall CastingProgressWin::~CastingProgressWin(CastingProgressWin *this); // idb
void __thiscall CastingProgressWin::Stop(CastingProgressWin *this); // idb
void __thiscall CastingProgressWin::CastingFail(CastingProgressWin *this); // idb
bool __thiscall CastingProgressWin::IsDoingCast(CastingProgressWin *this); // idb
char __thiscall CastingProgressWin::Create(CastingProgressWin *this, PgFrameWork *pkFrameWork, bool bProductCasting);
void __thiscall CastingProgressWin::StartCasting(CastingProgressWin *this, unsigned int uiCastingTime, bool bCloseWhenFinished); // idb
void __thiscall CastingProgressWin::CastingSuccess(CastingProgressWin *this); // idb
void __thiscall CastingProgressWin::UpdateMeWin(CastingProgressWin *this, float fCurTime); // idb
CastingProgressWin *__cdecl CastingProgressWin::CreateWin(PgFrameWork *pkFrameWork, int bProductCasting);
CastingProgressWin *__thiscall CastingProgressWin::`scalar deleting destructor'(CastingProgressWin *this, unsigned int a2);
void __thiscall PgWinBar::SetValue(PgWinBar *this, float fMaxVal, float fCurVal); // idb
void __cdecl GetShineDateStr(ShineDateTime kDate, char *pcStr, int iMaxStr);
void __thiscall ChargedItemListWin::ChargedItemInfo::ChargedItemInfo(ChargedItemListWin::ChargedItemInfo *this); // idb
// void __usercall ChargedItemListWin::ChargedItemInfo::Reset(ChargedItemListWin::ChargedItemInfo *this@<ecx>, int a2@<edi>);
void __thiscall ChargedItemListWin::~ChargedItemListWin(ChargedItemListWin *this); // idb
Item *__stdcall ChargedItemListWin::GetTimeLimitItem(unsigned int uiIndex);
void ChargedItemListWin::OnHelpLink();
// void __userpurge ChargedItemListWin::ChargedItemInfo::SetItem(ChargedItemListWin::ChargedItemInfo *this@<ecx>, int a2@<ebx>, Item *pkItem);
void __thiscall ChargedItemListWin::ChargedItemListWin(ChargedItemListWin *this); // idb
bool __cdecl IsActiveChargedTimeLimitItem(Item *pkItem); // idb
unsigned int ChargedItemListWin::GetMaxPageNum();
char __thiscall ChargedItemListWin::Create(ChargedItemListWin *this, PgFrameWork *pkFrameWork);
void __thiscall ChargedItemListWin::UpdatePageInfo(ChargedItemListWin *this); // idb
// void __userpurge ChargedItemListWin::ChargedItemInfo::SetItem(ChargedItemListWin::ChargedItemInfo *this@<ecx>, int a2@<ebx>, PROTO_CHARGEDBUFF_INFO *pkChargedBuffInfo);
void __thiscall ChargedItemListWin::Refresh(ChargedItemListWin *this); // idb
void __thiscall ChargedItemListWin::OnShowWin(ChargedItemListWin *this); // idb
void __thiscall ChargedItemListWin::OnNext(ChargedItemListWin *this); // idb
void __thiscall ChargedItemListWin::OnPrev(ChargedItemListWin *this); // idb
ChargedItemListWin *__cdecl ChargedItemListWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall ChargedItemListWin::OnCommand(ChargedItemListWin *this, unsigned int wParam, int lParam); // idb
unsigned int __cdecl ITableBase<ItemViewInfo,ItemViewInfoTab>::GetTotal(); // idb
ChargedItemListWin *__thiscall ChargedItemListWin::`vector deleting destructor'(ChargedItemListWin *this, unsigned int a2);
ItemViewInfo *__cdecl ItemViewInfoTab::GetByInxName(char *pcInxName); // idb
void __stdcall CharInfoWin::ConvertCommaNumber(__int64 i64Val, char *pNumberString);
void __thiscall CharInfoWin::OpenStatTitleWin(CharInfoWin *this); // idb
void __thiscall CharInfoWin::OpenCharacterTitleWin(CharInfoWin *this); // idb
void __thiscall CharInfoWin::OnClose(CharInfoWin *this); // idb
FreeStatView *__thiscall CharInfoWin::GetFreeStatView(CharInfoWin *this); // idb
void __thiscall CharInfoWin::SetCharTitleCurrentInfo(CharInfoWin *this, CHARTITLE_BRIEFINFO *pTitleInfo); // idb
void CharInfoWin::OnHelpLink();
void CharInfoWin::OnOpenCollection();
void __thiscall CharInfoWin::EnableChangeCondition(CharInfoWin *this, bool bEnable); // idb
void __thiscall CharInfoWin::SetChangeCondition(CharInfoWin *this, CHAR_CHANGEBYCONDITION_PARAM kCondition, char bFlag, char bIndex); // idb
void __thiscall CharInfoWin::SetConditionDataNum(CharInfoWin *this, unsigned int uiNum); // idb
void __thiscall CharInfoWin::SetSectionRate(CharInfoWin *this, unsigned int uiRate); // idb
void __stdcall CharInfoWin::SetMinMaxParamTextWin(PgWinText *pkWin, int iMinBaseVal, int iMinChangeVal, int iMaxBaseVal, int iMaxChangeVal, float fDisplayAlpha);
void __stdcall CharInfoWin::SetParamTextWin(PgWinText *pkWin, int BaseVal, int ChangeVal, int iBonusVal, float fDisplayAlpha);
void __stdcall CharInfoWin::SetParamTextWin(PgWinText *pkWin, float BaseVal, float ChangeVal, float fBonusVal);
// void __userpurge CharInfoWin::OnCommand(CharInfoWin *this@<ecx>, int a2@<ebx>, unsigned int wParam, int lParam);
void __thiscall CharInfoWin::RefreshStatTitle(CharInfoWin *this); // idb
char __thiscall CharInfoWin::Create(CharInfoWin *this, PgFrameWork *pkFrameWork);
CharInfoWin *__thiscall CharInfoWin::FindConditionParam(CHAR_CHANGEBYCONDITION_PARAM *retstr, CharInfoWin *this, int index, char nFlag);
void __thiscall CharInfoWin::SetClass(CharInfoWin *this, char kClassID); // idb
void __thiscall CharInfoWin::SetChangeConParamInfo(CharInfoWin *this, PassiveSkillInfo *pkInfo); // idb
void __thiscall CharInfoWin::EnablePassiveSkillID(CharInfoWin *this, unsigned __int16 kID); // idb
void __thiscall CharInfoWin::CharInfoWin(CharInfoWin *this); // idb
void __thiscall CharInfoWin::~CharInfoWin(CharInfoWin *this); // idb
CharInfoWin *__cdecl CharInfoWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __cdecl ConvertCommaNums(int x, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *strNums); // idb
void __thiscall CharInfoWin::UpdateMeWin(CharInfoWin *this, float fCurTime); // idb
void __thiscall CharInfoWin::SetConditionInfo(CharInfoWin *this, CHAR_CHANGEBYCONDITION_PARAM kConditionParam); // idb
unsigned __int16 *__stdcall std::allocator<unsigned short>::allocate(unsigned int _Count);
CHAR_CHANGEBYCONDITION_PARAM *__stdcall std::allocator<CHAR_CHANGEBYCONDITION_PARAM>::allocate(unsigned int _Count);
std::_String_iterator<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::end(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, std::_String_iterator<char,std::char_traits<char>,std::allocator<char> > *result); // idb
void __thiscall std::vector<unsigned short,std::allocator<unsigned short>>::reserve(std::vector<unsigned short,std::allocator<unsigned short> > *this, unsigned int _Count); // idb
CHAR_CHANGEBYCONDITION_PARAM *__cdecl std::_Uninit_move<CHAR_CHANGEBYCONDITION_PARAM *,CHAR_CHANGEBYCONDITION_PARAM *,std::allocator<CHAR_CHANGEBYCONDITION_PARAM>,CHAR_CHANGEBYCONDITION_PARAM>(CHAR_CHANGEBYCONDITION_PARAM *_First, CHAR_CHANGEBYCONDITION_PARAM *_Last, CHAR_CHANGEBYCONDITION_PARAM *_Dest);
void __thiscall std::vector<unsigned short,std::allocator<unsigned short>>::_Reserve(std::vector<unsigned short,std::allocator<unsigned short> > *this, unsigned int _Count); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::insert(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int _Off, unsigned int _Count, char _Ch); // idb
void __thiscall Char_ChangeCondition::~Char_ChangeCondition(Char_ChangeCondition *this); // idb
void __thiscall std::vector<unsigned short,std::allocator<unsigned short>>::push_back(std::vector<unsigned short,std::allocator<unsigned short> > *this, const unsigned __int16 *_Val); // idb
void __thiscall std::vector<CHAR_CHANGEBYCONDITION_PARAM,std::allocator<CHAR_CHANGEBYCONDITION_PARAM>>::reserve(std::vector<CHAR_CHANGEBYCONDITION_PARAM,std::allocator<CHAR_CHANGEBYCONDITION_PARAM> > *this, unsigned int _Count); // idb
void __thiscall std::vector<CHAR_CHANGEBYCONDITION_PARAM,std::allocator<CHAR_CHANGEBYCONDITION_PARAM>>::_Reserve(std::vector<CHAR_CHANGEBYCONDITION_PARAM,std::allocator<CHAR_CHANGEBYCONDITION_PARAM> > *this, unsigned int _Count); // idb
void __thiscall std::vector<CHAR_CHANGEBYCONDITION_PARAM,std::allocator<CHAR_CHANGEBYCONDITION_PARAM>>::push_back(std::vector<CHAR_CHANGEBYCONDITION_PARAM,std::allocator<CHAR_CHANGEBYCONDITION_PARAM> > *this, CHAR_CHANGEBYCONDITION_PARAM *_Val); // idb
CharInfoWin *__thiscall CharInfoWin::`vector deleting destructor'(CharInfoWin *this, unsigned int a2);
void __thiscall CharTitleWin::~CharTitleWin(CharTitleWin *this); // idb
void __thiscall CharTitleWin::OnPrevPage(CharTitleWin *this); // idb
void __thiscall CharTitleWin::OnNextPage(CharTitleWin *this); // idb
void __thiscall CharTitleWin::OnClose(CharTitleWin *this); // idb
void __thiscall CharTitleWin::AddListItem(CharTitleWin *this, unsigned int uiIndex, unsigned int uiType, unsigned int uiElementNum, unsigned int uiElementValue, unsigned int uiMobID); // idb
void CharTitleWin::OnHelpLink();
void CharTitleWin::CharTitleSort();
void __thiscall CharTitleWin::CharTitleWin(CharTitleWin *this); // idb
void __thiscall CharTitleWin::UpdateMeWin(CharTitleWin *this, float fCurTime); // idb
void __thiscall CharTitleWin::OnOK(CharTitleWin *this); // idb
void __thiscall CharTitleWin::OnSlideBarContent(CharTitleWin *this); // idb
void __thiscall CharTitleWin::ProcessMeInput(CharTitleWin *this, bool *bHit); // idb
void __thiscall CharTitleWin::UpdateViewList(CharTitleWin *this); // idb
CharTitleWin *__cdecl CharTitleWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall CharTitleWin::OnListClick(CharTitleWin *this, int nIndex); // idb
void __thiscall CharTitleWin::SetCurTitleInfo(CharTitleWin *this, CharTitleWin::CTWIN_LIST_INFO *pInfo); // idb
void __thiscall CharTitleWin::OnCommand(CharTitleWin *this, unsigned int wParam, int lParam); // idb
char __thiscall CharTitleWin::Create(CharTitleWin *this, PgFrameWork *pkFrameWork);
CharTitleWin *__thiscall CharTitleWin::`scalar deleting destructor'(CharTitleWin *this, unsigned int a2);
unsigned int __cdecl ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::GetTotal(); // idb
std::vector<CharacterTitleStateView *,std::allocator<CharacterTitleStateView *> > *__cdecl CharacterTitleStateViewTab::GetByTypeAndLevel(std::vector<CharacterTitleStateView *,std::allocator<CharacterTitleStateView *> > *result, unsigned int uiType, char Level); // idb
void __thiscall ChatBlockListWin::ChatBlockListWin(ChatBlockListWin *this); // idb
void __thiscall ChatBlockListWin::~ChatBlockListWin(ChatBlockListWin *this); // idb
void __thiscall ChatBlockListWin::CloseWin(ChatBlockListWin *this); // idb
void __thiscall ChatBlockListWin::OpenWin(ChatBlockListWin *this); // idb
void __thiscall ChatBlockListWin::UpdateMeWin(ChatBlockListWin *this, float fCurTime); // idb
void __thiscall ChatBlockListWin::ChangeUserName(ChatBlockListWin *this, Name5 *OldName, Name5 *NewName); // idb
void __thiscall ChatBlockListWin::OnAllDeleteBtn(ChatBlockListWin *this); // idb
ChatBlockListWin *__cdecl ChatBlockListWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall ChatBlockListWin::UpdateList(ChatBlockListWin *this); // idb
void __thiscall ChatBlockListWin::OnSelectDeleteBtn(ChatBlockListWin *this); // idb
void __thiscall ChatBlockListWin::UpdateViewList(ChatBlockListWin *this); // idb
void __thiscall ChatBlockListWin::DirectMessage(ChatBlockListWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
char __thiscall ChatBlockListWin::Create(ChatBlockListWin *this, PgFrameWork *pkFrameWork);
void __thiscall ChatBlockListWin::OnSlideBar(ChatBlockListWin *this); // idb
ChatBlockListWin *__thiscall ChatBlockListWin::`scalar deleting destructor'(ChatBlockListWin *this, unsigned int a2);
void __thiscall ChatBlockListWin::OnCommand(ChatBlockListWin *this, unsigned int wParam, int lParam); // idb
void __thiscall ChatEditWin::ChatStart(ChatEditWin *this); // idb
void __thiscall ChatEditWin::OnEditEnd(ChatEditWin *this, unsigned int wParam, int lParam); // idb
void __thiscall ChatEditWin::ChatEditWin(ChatEditWin *this); // idb
void __thiscall ChatEditWin::~ChatEditWin(ChatEditWin *this); // idb
char __thiscall ChatEditWin::Create(ChatEditWin *this, NiSourceTexture *pkTexture, PgFrameWork *pkFrameWork);
ChatEditWin *__cdecl ChatEditWin::CreateWin(NiSourceTexture *pkTexture, PgFrameWork *pkFrameWork); // idb
ChatEditWin *__thiscall ChatEditWin::`scalar deleting destructor'(ChatEditWin *this, unsigned int a2);
void __thiscall ClockShadowWin::CoolTimeDecrease(ClockShadowWin *this, unsigned __int16 kID); // idb
void __thiscall ClockShadowWin::StopClockShadow(ClockShadowWin *this); // idb
void __thiscall ClockShadowWin::ClockShadowWin(ClockShadowWin *this); // idb
void __thiscall ClockShadowWin::~ClockShadowWin(ClockShadowWin *this); // idb
void __thiscall ClockShadowWin::ResetVertex(ClockShadowWin *this); // idb
void __thiscall ClockShadowWin::Start(ClockShadowWin *this, float fCurTime, float fRoateTime, float fStartTime); // idb
void __thiscall ClockShadowWin::HideTri(ClockShadowWin *this, unsigned int uiTriPart); // idb
void __thiscall ClockShadowWin::ChangeTriVertex(ClockShadowWin *this, unsigned int uiTriPart, float fX, float fY); // idb
void __thiscall ClockShadowWin::UpdateMeWin(ClockShadowWin *this, float fCurTime); // idb
void __thiscall ClockShadowWin::CreateGeometry(ClockShadowWin *this); // idb
char __thiscall ClockShadowWin::Create(ClockShadowWin *this, int iXPos, int iYPos, PgWin *pkParent);
ClockShadowWin *__cdecl ClockShadowWin::CreateWin(int iXPos, int iYPos, PgWin *pkParent); // idb
void __thiscall NiGeometry::SetModelBound(NiGeometry *this, NiBound *kBound); // idb
ClockShadowWin *__thiscall ClockShadowWin::`scalar deleting destructor'(ClockShadowWin *this, unsigned int a2);
// void __usercall CollectCardWin::OnShowWin(CollectCardWin *this@<ecx>, double a2@<st0>);
void __thiscall CollectCardWin::SetUnidentified(CollectCardWin *this, int bUnidentified);
void __thiscall CollectCardWin::SetName(CollectCardWin *this, const char *pcName); // idb
int __thiscall CollectCardWin::IsSameCard(CollectCardWin *this, unsigned int uiCardID, unsigned int uiSerial);
bool __thiscall CollectCardWin::IsPlay(CollectCardWin *this); // idb
// BOOL __usercall CollectCardWin::IsOpen@<eax>(CollectCardWin *this@<ecx>, double a2@<st0>);
void __thiscall CollectCardWin::OpenCard(CollectCardWin *this); // idb
void __thiscall CollectCardWin::ProcessMeInput(CollectCardWin *this, bool *bHit); // idb
void __thiscall CollectCardWin::UpdateOpen(CollectCardWin *this, float fCurTime); // idb
NiSourceTexture *__stdcall CollectCardWin::LoadImageFile(const char *pcFileName);
void __thiscall CollectCardWin::SetBoard(CollectCardWin *this, unsigned int uiGrade); // idb
void __thiscall CollectCardWin::SetStar(CollectCardWin *this, unsigned int uiStar); // idb
void __thiscall CollectCardWin::Reset(CollectCardWin *this); // idb
void __thiscall CollectCardWin::ResetEffect(CollectCardWin *this); // idb
void __thiscall CollectCardWin::SetType(CollectCardWin *this, const char *pcMobInx); // idb
void __thiscall CollectCardWin::PlayCardEffect(CollectCardWin *this); // idb
void __thiscall CollectCardWin::~CollectCardWin(CollectCardWin *this); // idb
void __thiscall CollectCardWin::CollectCardWin(CollectCardWin *this); // idb
CollectCardWin *__cdecl CollectCardWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall CollectCardWin::Create(CollectCardWin *this, PgFrameWork *pkFrameWork);
void __thiscall CollectCardWin::SetSerial(CollectCardWin *this, unsigned int uiSerial, unsigned int uiSeason, unsigned int uiGrade); // idb
void __thiscall CollectCardWin::SetDesc(CollectCardWin *this, char *pcDesc); // idb
void __thiscall CollectCardWin::SetInfo(CollectCardWin *this, unsigned int uiCardID, unsigned int uiStar, unsigned int uiSerial, int bUnidentified);
void __thiscall CollectCardWin::UpdatePlay(CollectCardWin *this, float fCurTime); // idb
void __thiscall CollectCardWin::UpdateMeWin(CollectCardWin *this, float fCurTime); // idb
CollectCardGroupDesc *__cdecl CollectCardGroupDescTab::GetByCardMobGroup(CardMobGroupIndex Type); // idb
CollectCardWin *__thiscall CollectCardWin::`vector deleting destructor'(CollectCardWin *this, unsigned int a2);
void __thiscall CardSlotWin::Select(CardSlotWin *this, bool bSelect); // idb
void __thiscall CollectRwItemWin::CollectRwItemWin(CollectRwItemWin *this); // idb
void __thiscall CollectRwItemWin::~CollectRwItemWin(CollectRwItemWin *this); // idb
CollectRwItemWin::eRewardStateType __thiscall CollectRwItemWin::GetState(CollectRwItemWin *this); // idb
void __thiscall CollectRwItemWin::Reset(CollectRwItemWin *this); // idb
void __thiscall CollectRwChoiceInv::CollectRwChoiceInv(CollectRwChoiceInv *this); // idb
void __thiscall CollectRwChoiceInv::~CollectRwChoiceInv(CollectRwChoiceInv *this); // idb
void __thiscall CollectRwChoiceInv::Select(CollectRwChoiceInv *this, bool bSelect); // idb
void __thiscall CollectRwChoiceWin::OnCancel(CollectRwChoiceWin *this); // idb
void __thiscall CollectCardChoiceWin::OnCancel(CollectCardChoiceWin *this); // idb
void __thiscall CollectPopupWin::CollectPopupWin(CollectPopupWin *this); // idb
void __thiscall CollectPopupWin::~CollectPopupWin(CollectPopupWin *this); // idb
void __thiscall CollectPopupWin::OnCommand(CollectPopupWin *this, unsigned int wParam, int lParam); // idb
void __thiscall CollectPopupWin::UpdateMeWin(CollectPopupWin *this, float fCurTime); // idb
// void __userpurge CollectPopupWin::SetText(CollectPopupWin *this@<ecx>, int a2@<ebx>, int a3@<edi>, const char *pcText);
NiSourceTexture *__stdcall CardSlotWin::LoadImageFile(const char *pcFileName);
void __thiscall CardSlotWin::Reset(CardSlotWin *this); // idb
char __thiscall CollectRwItemWin::Create(CollectRwItemWin *this, NiNode *pkNode, const char *pcAbleName, const char *pcDisableName, const char *pcEffectName, PgWin *pkParent, int iCommandMsg);
void __thiscall CollectRwItemWin::SetState(CollectRwItemWin *this, CollectRwItemWin::eRewardStateType eType); // idb
void __thiscall CollectPageWin::ResetPageNum(CollectPageWin *this); // idb
void __thiscall CollectPageWin::Update(CollectPageWin *this); // idb
char __thiscall CollectRwChoiceInv::Create(CollectRwChoiceInv *this, int iXPos, int iYPos, PgWin *pkParent);
void __thiscall CollectRwChoiceInv::UpdateMeWin(CollectRwChoiceInv *this, float fCurTime); // idb
void __thiscall CollectRwChoiceWin::OnOK(CollectRwChoiceWin *this); // idb
void __thiscall CollectRwChoiceWin::OnSelectItem(CollectRwChoiceWin *this, unsigned int uiIndex); // idb
void __thiscall CollectRwChoiceWin::ResetItem(CollectRwChoiceWin *this); // idb
void __thiscall CollectCardChoiceWin::Reset(CollectCardChoiceWin *this); // idb
CollectCardChoiceWin::sRegistCardInfo *__thiscall CollectCardChoiceWin::GetRegistCardInfoByGrade(CollectCardChoiceWin *this, unsigned int uiGrade, unsigned int uiIndex); // idb
int __thiscall CollectCardChoiceWin::GetRegistCardInfoCountByGrade(CollectCardChoiceWin *this, unsigned int uiGrade);
void __thiscall CollectPopupWin::OnShowWin(CollectPopupWin *this); // idb
void __thiscall CollectPageWin::OnPageNum(CollectPageWin *this, unsigned int uiPage); // idb
void __thiscall CollectPageWin::OnPageArrow(CollectPageWin *this, CollectPageWin::ePageArrowType eType); // idb
void __thiscall CollectRwChoiceWin::OnCommand(CollectRwChoiceWin *this, unsigned int wParam, int lParam); // idb
void __thiscall CollectCardChoiceWin::OnOK(CollectCardChoiceWin *this); // idb
void __thiscall CollectCardChoiceWin::OnSelectSlot(CollectCardChoiceWin *this, unsigned int uiSlot); // idb
char __thiscall CollectPopupWin::Create(CollectPopupWin *this, PgFrameWork *pkFrameWork);
void __thiscall CollectPageWin::OnCommand(CollectPageWin *this, unsigned int wParam, int lParam); // idb
void __thiscall CardSlotWin::~CardSlotWin(CardSlotWin *this); // idb
CollectRwItemWin *__cdecl CollectRwItemWin::CreateWin(NiNode *pkNode, const char *pcAbleName, const char *pcDisableName, const char *pcEffectName, PgWin *pkParent, int iCommandMsg); // idb
void __thiscall CollectPageWin::~CollectPageWin(CollectPageWin *this); // idb
CollectRwChoiceInv *__cdecl CollectRwChoiceInv::CreateWin(int iXPos, int iYPos, PgWin *pkParent); // idb
void __thiscall CollectRwChoiceWin::~CollectRwChoiceWin(CollectRwChoiceWin *this); // idb
char __thiscall CollectRwChoiceWin::Create(CollectRwChoiceWin *this, PgFrameWork *pkFrameWork);
CollectPopupWin *__cdecl CollectPopupWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall CardSlotWin::CardSlotWin(CardSlotWin *this); // idb
CardSlotWin *__cdecl CardSlotWin::CreateWin(int iXPos, int iYPos, PgWin *pkParent, unsigned int uiIndex, unsigned int uiCommandMsg, unsigned int uiRCommandMsg); // idb
void __thiscall CollectPageWin::CollectPageWin(CollectPageWin *this); // idb
CollectPageWin *__cdecl CollectPageWin::CreateWin(NiNode *pkNode, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent); // idb
void __thiscall CollectRwChoiceWin::CollectRwChoiceWin(CollectRwChoiceWin *this); // idb
CollectRwChoiceWin *__cdecl CollectRwChoiceWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall CardSlotWin::Create(CardSlotWin *this, int iXPos, int iYPos, PgWin *pkParent, unsigned int uiIndex, unsigned int uiCommandMsg, unsigned int uiRCommandMsg);
void __thiscall CardSlotWin::SetInfo(CardSlotWin *this, unsigned int uiCardID, unsigned int uiStar, unsigned int uiSerial, int tRegistTime); // idb
char __thiscall CollectPageWin::Create(CollectPageWin *this, NiNode *pkNode, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent);
char __thiscall CollectCardChoiceWin::Create(CollectCardChoiceWin *this, PgFrameWork *pkFrameWork);
void __thiscall CollectCardChoiceWin::UpdateGrade(CollectCardChoiceWin *this, unsigned int uiGrade); // idb
void __thiscall CollectRwChoiceWin::Update(CollectRwChoiceWin *this); // idb
void __thiscall CollectCardChoiceWin::CollectCardChoiceWin(CollectCardChoiceWin *this); // idb
void __thiscall CollectCardChoiceWin::~CollectCardChoiceWin(CollectCardChoiceWin *this); // idb
CollectCardChoiceWin *__cdecl CollectCardChoiceWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall CollectCardChoiceWin::OnSelectGrade(CollectCardChoiceWin *this, unsigned int uiGrade); // idb
void __thiscall CollectCardChoiceWin::ClearInfo(CollectCardChoiceWin *this); // idb
void __thiscall CollectRwChoiceWin::SetReward(CollectRwChoiceWin *this, unsigned int uiRewardID, int bEnable);
void __thiscall CollectCardChoiceWin::OnShowWin(CollectCardChoiceWin *this); // idb
void __thiscall CollectCardChoiceWin::OnCommand(CollectCardChoiceWin *this, unsigned int wParam, int lParam); // idb
void __thiscall CollectCardChoiceWin::InsertInfo(CollectCardChoiceWin *this, unsigned int uiGrade, unsigned int uiCardID, unsigned int uiStar, unsigned int uiSerial, int tRegistTime); // idb
CollectRwItemWin *__thiscall CollectRwItemWin::`vector deleting destructor'(CollectRwItemWin *this, unsigned int a2);
CollectRwChoiceInv *__thiscall CollectRwChoiceInv::`scalar deleting destructor'(CollectRwChoiceInv *this, unsigned int a2);
CollectPopupWin *__thiscall CollectPopupWin::`scalar deleting destructor'(CollectPopupWin *this, unsigned int a2);
int __cdecl CollectCardRewardTab::GetCountByRewardID(unsigned int uiRewardID);
CollectCardChoiceWin::sRegistCardInfo *__cdecl std::_Move<CollectWin::sCardInfo *,CollectWin::sCardInfo *>(CollectCardChoiceWin::sRegistCardInfo *_First, CollectCardChoiceWin::sRegistCardInfo *_Last, CollectCardChoiceWin::sRegistCardInfo *_Dest); // idb
CardSlotWin *__thiscall CardSlotWin::`vector deleting destructor'(CardSlotWin *this, unsigned int a2);
CollectPageWin *__thiscall CollectPageWin::`scalar deleting destructor'(CollectPageWin *this, unsigned int a2);
CollectRwChoiceWin *__thiscall CollectRwChoiceWin::`vector deleting destructor'(CollectRwChoiceWin *this, unsigned int a2);
CollectCardChoiceWin *__thiscall CollectCardChoiceWin::`scalar deleting destructor'(CollectCardChoiceWin *this, unsigned int a2);
bool __cdecl CollectWin::sNewestInfo::SortRegistTime(CollectWin::sNewestInfo *lhw, CollectWin::sNewestInfo *rhw); // idb
void __thiscall CollectCardListWin::OnPopupCardMenu(CollectCardListWin *this, unsigned int uiSlot); // idb
void __thiscall CollectCardListWin::OnRemoveBookmark(CollectCardListWin *this); // idb
void __thiscall CollectCardListWin::SetPage(CollectCardListWin *this, unsigned int uiPage, unsigned int uiLastPage, unsigned int uiUpdateMsg, unsigned int uiUpdateMsgParam); // idb
void __thiscall CollectCardListWin::SetPage(CollectCardListWin *this, unsigned int uiPage); // idb
unsigned int __thiscall CollectCardListWin::GetPage(CollectCardListWin *this); // idb
void CollectWin::OnHelpLink();
signed int __stdcall CollectWin::ConvertRewardGrade(unsigned int uiGrade);
// void __userpurge CollectMainWin::OnSelectCard(CollectMainWin *this@<ecx>, double a2@<st0>, unsigned int uiSlot);
void __thiscall CollectMainWin::ResetCard(CollectMainWin *this); // idb
void __thiscall CollectMainWin::SetNewest(CollectMainWin *this, unsigned int uiSlot, unsigned int uiCardID, unsigned int uiStar, unsigned int uiSerial, int tRegistTime); // idb
void __thiscall CollectCardListWin::SetCard(CollectCardListWin *this, unsigned int uiSlot, unsigned int uiCardID, unsigned int uiStar, unsigned int uiSerial, int tRegistTime); // idb
void __thiscall CollectCardListWin::ResetReward(CollectCardListWin *this); // idb
void __thiscall CollectCardListWin::ResetCard(CollectCardListWin *this); // idb
void __thiscall CollectWin::SetBookmark(CollectWin *this, unsigned int uiSlot, unsigned int uiCardID); // idb
void __thiscall CollectWin::SetReward(CollectWin *this, unsigned int uiRewardID, bool bCompleted); // idb
void __thiscall CollectWin::SetCard(CollectWin *this, unsigned int uiCardID, unsigned int uiStar, unsigned int uiSerial, int tRegistTime); // idb
CollectWin::sRewardInfo *__thiscall CollectWin::GetRewardInfoByGrade(CollectWin *this, unsigned int uiRewardGrade); // idb
CollectWin::sCardInfo *__thiscall CollectWin::GetCardInfoByCardID(CollectWin *this, unsigned int uiCardID); // idb
int __thiscall CollectWin::GetRegistCountByGrade(CollectWin *this, unsigned int uiGrade);
void __thiscall CollectMainWin::OnCheckRewardGrade(CollectMainWin *this, unsigned int uiRewardGrade); // idb
void __thiscall CollectMainWin::OnSelectRewardItem(CollectMainWin *this); // idb
void __thiscall CollectMainWin::OnSelectRewardArrow(CollectMainWin *this, CollectMainWin::eRewardArrowType eType); // idb
void __thiscall CollectMainWin::Reset(CollectMainWin *this); // idb
void __thiscall CollectMainWin::SetReward(CollectMainWin *this, unsigned int uiRewardID, unsigned int uiCount, unsigned int uiPrevCount, unsigned int uiRegistCount, bool bCompleted); // idb
void __thiscall CollectMainWin::SetRewardGrade(CollectMainWin *this, unsigned int uiRewardGrade); // idb
char __thiscall CollectCardListWin::Create(CollectCardListWin *this, NiNode *pkNode, PgWin *pkParent, bool bPeeping);
void __thiscall CollectCardListWin::OnSelectRewardItem(CollectCardListWin *this); // idb
void __thiscall CollectCardListWin::SetType(CollectCardListWin *this, CollectCardListWin::eCardListType eType, unsigned int uiGrade); // idb
void __thiscall CollectWin::UpdateBookmark(CollectWin *this); // idb
// void __userpurge CollectMainWin::OnCommand(CollectMainWin *this@<ecx>, double a2@<st0>, unsigned int wParam, int lParam);
void __thiscall CollectMainWin::InitBar(CollectMainWin *this); // idb
void __thiscall CollectMainWin::SetBar(CollectMainWin *this, unsigned int uiGrade, float fValue); // idb
void __thiscall CollectMainWin::UpdateBar(CollectMainWin *this); // idb
void __thiscall CollectMainWin::~CollectMainWin(CollectMainWin *this); // idb
void __thiscall CollectCardListWin::~CollectCardListWin(CollectCardListWin *this); // idb
void __thiscall CollectMainWin::CollectMainWin(CollectMainWin *this); // idb
CollectMainWin *__cdecl CollectMainWin::CreateWin(NiNode *pkNode, PgWin *pkParent, int bPeeping);
void __thiscall CollectCardListWin::CollectCardListWin(CollectCardListWin *this); // idb
CollectCardListWin *__cdecl CollectCardListWin::CreateWin(NiNode *pkNode, PgWin *pkParent, int bPeeping);
void __thiscall CollectWin::InitBookmarkInfo(CollectWin *this); // idb
char __thiscall CollectMainWin::Create(CollectMainWin *this, NiNode *pkNode, PgWin *pkParent, bool bPeeping);
void __thiscall CollectMainWin::UpdateCheckBox(CollectMainWin *this); // idb
void __thiscall CollectWin::SetNewest(CollectWin *this, int tRegistTime, unsigned int uiCardID); // idb
// void __userpurge CollectCardListWin::OnSelectCard(CollectCardListWin *this@<ecx>, double a2@<st0>, unsigned int uiSlotIndex);
void __thiscall CollectCardListWin::OnRegistBookmark(CollectCardListWin *this, unsigned int uiSlotIndex); // idb
void __thiscall CollectCardListWin::OnChangeBookmark(CollectCardListWin *this); // idb
void __thiscall CollectCardListWin::SetReward(CollectCardListWin *this, unsigned int uiRewardID, unsigned int uiCount, unsigned int uiRegistCount); // idb
void __thiscall CollectWin::CollectWin(CollectWin *this); // idb
void __thiscall CollectWin::~CollectWin(CollectWin *this); // idb
CollectWin *__cdecl CollectWin::CreateWin(PgFrameWork *pkFrameWork, int bPeeping);
void __thiscall CollectWin::InitNewestInfo(CollectWin *this); // idb
// void __userpurge CollectCardListWin::OnCommand(CollectCardListWin *this@<ecx>, double a2@<st0>, unsigned int wParam, int lParam);
void __thiscall CollectCardListWin::DirectMessage(CollectCardListWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall CollectWin::InitRewardInfo(CollectWin *this); // idb
void __thiscall CollectWin::InitCardInfo(CollectWin *this); // idb
void __thiscall CollectWin::UpdateGrade(CollectWin *this, unsigned int uiGrade); // idb
void __thiscall CollectWin::InitInfo(CollectWin *this); // idb
void __thiscall CollectWin::UpdateMain(CollectWin *this, unsigned int uiRewardGrade); // idb
void __thiscall CollectWin::OnSelectMenu(CollectWin *this, CollectWin::eMenuType eType); // idb
void __thiscall CollectWin::SetRegistPage(CollectWin *this, unsigned int uiCardID); // idb
void __thiscall CollectWin::Update(CollectWin *this, unsigned int uiGrade); // idb
char __thiscall CollectWin::Create(CollectWin *this, PgFrameWork *pkFrameWork, int bPeeping);
void __thiscall CollectWin::OnCommand(CollectWin *this, unsigned int wParam, int lParam); // idb
void __thiscall CollectWin::OnShowWin(CollectWin *this); // idb
int __cdecl CollectCardTab::GetCountByGrade(unsigned int uiGrade);
unsigned int __cdecl CollectCardRewardTab::GetCountByRewardGrade(unsigned int uiRewardGrade); // idb
void __thiscall std::list<std::pair<unsigned short const,QUEST_DATA *>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>>::_Splice_same(std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *this, std::_List_const_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > _Where, std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *_Right, std::_List_const_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > _First, std::_List_const_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > _Last, unsigned int _Count); // idb
CollectCardChoiceWin::sRegistCardInfo *__cdecl std::_Uninit_move<CollectCardChoiceWin::sRegistCardInfo *,CollectCardChoiceWin::sRegistCardInfo *,std::allocator<CollectCardChoiceWin::sRegistCardInfo>,CollectCardChoiceWin::sRegistCardInfo>(CollectCardChoiceWin::sRegistCardInfo *_First, CollectCardChoiceWin::sRegistCardInfo *_Last, CollectCardChoiceWin::sRegistCardInfo *_Dest);
void __cdecl std::_Uninit_def_fill_n<CollectWin::sCardInfo *,unsigned int,CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo>,CollectWin::sCardInfo>(CollectWin::sCardInfo *_First, unsigned int _Count);
void __cdecl std::_Uninit_def_fill_n<CollectWin::sNewestInfo *,int,CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>,CollectWin::sNewestInfo>(CollectWin::sNewestInfo *_First, int _Count);
NiColorA *__cdecl std::_Uninit_move<GUILD_ACADEMY_REWARD_ITEM *,GUILD_ACADEMY_REWARD_ITEM *,std::allocator<GUILD_ACADEMY_REWARD_ITEM>,GUILD_ACADEMY_REWARD_ITEM>(NiColorA *_First, NiColorA *_Last, NiColorA *_Dest);
void __thiscall std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>(std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > *this); // idb
std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *__stdcall std::_List_val<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>::_Buynode(std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *_Next, std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *_Prev);
CollectMainWin *__thiscall CollectMainWin::`vector deleting destructor'(CollectMainWin *this, unsigned int a2);
CollectCardListWin *__thiscall CollectCardListWin::`vector deleting destructor'(CollectCardListWin *this, unsigned int a2);
void __thiscall std::vector<CollectCardChoiceWin::sRegistCardInfo,std::allocator<CollectCardChoiceWin::sRegistCardInfo>>::reserve(std::vector<CollectCardChoiceWin::sRegistCardInfo,std::allocator<CollectCardChoiceWin::sRegistCardInfo> > *this, unsigned int _Count); // idb
void __thiscall std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>::merge<bool (__cdecl *)(CollectWin::sNewestInfo const &,CollectWin::sNewestInfo const &)>(std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > *this, std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > *_Right, bool (__cdecl *_Pred)(CollectWin::sNewestInfo *, CollectWin::sNewestInfo *)); // idb
void __thiscall std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>::resize(std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > *this, unsigned int _Newsize); // idb
void __thiscall std::vector<CollectCardChoiceWin::sRegistCardInfo,std::allocator<CollectCardChoiceWin::sRegistCardInfo>>::_Reserve(std::vector<CollectCardChoiceWin::sRegistCardInfo,std::allocator<CollectCardChoiceWin::sRegistCardInfo> > *this, unsigned int _Count); // idb
void __thiscall std::vector<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo>>::resize(std::vector<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo> > *this, unsigned int _Newsize); // idb
void __thiscall std::vector<CollectCardChoiceWin::sRegistCardInfo,std::allocator<CollectCardChoiceWin::sRegistCardInfo>>::push_back(std::vector<CollectCardChoiceWin::sRegistCardInfo,std::allocator<CollectCardChoiceWin::sRegistCardInfo> > *this, CollectCardChoiceWin::sRegistCardInfo *_Val); // idb
CollectWin *__thiscall CollectWin::`vector deleting destructor'(CollectWin *this, unsigned int a2);
void __thiscall std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>::sort<bool (__cdecl *)(CollectWin::sNewestInfo const &,CollectWin::sNewestInfo const &)>(std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > *this, bool (__cdecl *_Pred)(CollectWin::sNewestInfo *, CollectWin::sNewestInfo *)); // idb
char __thiscall DesktopWin::Create(DesktopWin *this, unsigned int dwScrWidth, unsigned int dwScrHeight, PgFrameWork *pkFrameWork);
void __thiscall DesktopWin::DesktopWin(DesktopWin *this); // idb
void __thiscall DesktopWin::~DesktopWin(DesktopWin *this); // idb
void __thiscall ItemDropTask::DirectMessage(ItemDropTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall DesktopWin::ProcessMeInput(DesktopWin *this, bool *bHit); // idb
void __thiscall ItemDropTask::OnStart(ItemDropTask *this); // idb
char __thiscall ItemDropTask::OnProcessNetMsg(ItemDropTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData);
void __thiscall ItemDropTask::ItemDropTask(ItemDropTask *this, ITEM_INVEN *rkInven, unsigned int dwLot, unsigned int dwDropPosX, unsigned int dwDropPosY); // idb
char __thiscall DesktopWin::EatDropInstance(DesktopWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
DesktopWin *__cdecl DesktopWin::CreateWin(unsigned int dwScrWidth, unsigned int dwScrHeight, PgFrameWork *pkFrameWork); // idb
DesktopWin *__thiscall DesktopWin::`scalar deleting destructor'(DesktopWin *this, unsigned int a2);
ProductTask *__thiscall ProductTask::`scalar deleting destructor'(ProductTask *this, unsigned int a2);
void __thiscall DivideWin::OnCmdCancel(DivideWin *this); // idb
void __thiscall DivideWin::GetValueFromEdit(DivideWin *this); // idb
void __thiscall DivideWin::SetValueToEdit(DivideWin *this); // idb
void __thiscall DivideWin::SetValueToEdit(DivideWin *this, unsigned int num); // idb
void __thiscall DivideWin::OnClose(DivideWin *this); // idb
void __thiscall DivideWin::Open(DivideWin *this, PgWin *pkRevWin, unsigned int uiOkMsg, unsigned int uiMax, char *pcText); // idb
void __thiscall DivideWin::~DivideWin(DivideWin *this); // idb
char __thiscall DivideWin::Create(DivideWin *this, PgFrameWork *pkFrameWork);
void __thiscall DivideWin::OnCmdOk(DivideWin *this); // idb
void __thiscall DivideWin::OnEditEnd(DivideWin *this, unsigned int wParam, int lParam); // idb
void __thiscall DivideWin::DivideWin(DivideWin *this); // idb
void __thiscall DivideWin::OnCommand(DivideWin *this, unsigned int wParam, int lParam); // idb
DivideWin *__cdecl DivideWin::CreateWin(PgFrameWork *pkFrameWork); // idb
DivideWin *__thiscall DivideWin::`scalar deleting destructor'(DivideWin *this, unsigned int a2);
void __thiscall EnchantGemToolTipWin::EnchantGemToolTipWin(EnchantGemToolTipWin *this); // idb
void __thiscall EnchantGemToolTipWin::~EnchantGemToolTipWin(EnchantGemToolTipWin *this); // idb
void __thiscall EnchantGemToolTipWin::Clear(EnchantGemToolTipWin *this); // idb
void __thiscall EnchantGemWin::EnchantGemWin(EnchantGemWin *this); // idb
void __thiscall EnchantGemWin::~EnchantGemWin(EnchantGemWin *this); // idb
void __thiscall EnchantGemWin::OnQuit(EnchantGemWin *this); // idb
void __thiscall EnchantGemWin::SignGemFailed(EnchantGemWin *this, ITEM_INVEN *rkLicenseInven); // idb
void __thiscall EnchantGemDeleteWin::SetClearItemInven(EnchantGemDeleteWin *this, ITEM_INVEN *rkInven); // idb
// void __userpurge EnchantGemWin::OnSetEnchantGem(EnchantGemWin *this@<ecx>, int a2@<ebx>, SHINE_ITEM_STRUCT *kStruct, void *pvBody);
void __thiscall EnchantGemWin::OnSend2EndOfTrade(EnchantGemWin *this); // idb
void __thiscall EnchantGemWin::OnCommand(EnchantGemWin *this, unsigned int wParam, int lParam); // idb
void __thiscall EnchantGemWin::ResetContents(EnchantGemWin *this); // idb
void __thiscall EnchantGemWin::SignGemSuccess(EnchantGemWin *this, ITEM_INVEN *rkLicenseInven, Item *pkWeapon); // idb
char __thiscall EnchantGemToolTipWin::Create(EnchantGemToolTipWin *this, PgFrameWork *pkFrameWork);
char __thiscall EnchantGemToolTipWin::SetEnchantGemDesc(EnchantGemToolTipWin *this, Item *pkWeaponItem);
char __thiscall EnchantGemWin::Create(EnchantGemWin *this, PgFrameWork *pkFrameWork, unsigned int uiSlotNum);
void __thiscall EnchantGemWin::DirectMessage(EnchantGemWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
// void __userpurge EnchantGemWin::SetEnchantGem(EnchantGemWin *this@<ecx>, signed int a2@<ebx>, int a3@<esi>, ShineItemAttr_Weapon *pkWeapon, unsigned __int16 wepID);
void __thiscall EnchantGemWin::OnRegBtn(EnchantGemWin *this, int iIndex); // idb
void __thiscall EnchantGemWin::OnClose(EnchantGemWin *this); // idb
char __thiscall EnchantGemDeleteWin::Create(EnchantGemDeleteWin *this, PgFrameWork *pkFrameWork, unsigned int uiSlotNum);
void __thiscall EnchantGemDeleteWin::OnRegBtn(EnchantGemDeleteWin *this, int iIndex); // idb
// void __userpurge EnchantGemDeleteWin::SetEnchantGem(EnchantGemDeleteWin *this@<ecx>, int a2@<esi>, ShineItemAttr_Weapon *pkWeapon, unsigned __int16 wepID);
void __thiscall EnchantGemWin::OnShowWin(EnchantGemWin *this); // idb
EnchantGemToolTipWin *__cdecl EnchantGemToolTipWin::CreateWin(PgFrameWork *pkFrameWork); // idb
EnchantGemWin *__cdecl EnchantGemWin::CreateWin(PgFrameWork *pkFrameWork, unsigned int uiSlotNum); // idb
EnchantGemDeleteWin *__cdecl EnchantGemDeleteWin::CreateWin(PgFrameWork *pkFrameWork, unsigned int uiSlotNum); // idb
EnchantGemToolTipWin *__thiscall EnchantGemToolTipWin::`vector deleting destructor'(EnchantGemToolTipWin *this, unsigned int a2);
EnchantGemDeleteWin *__thiscall EnchantGemWin::`vector deleting destructor'(EnchantGemDeleteWin *this, unsigned int a2);
void __thiscall EventFriendWin::EventFriendWin(EventFriendWin *this); // idb
void __thiscall EventFriendWin::~EventFriendWin(EventFriendWin *this); // idb
void __thiscall EventFriendWin::OnCmdCancel(EventFriendWin *this); // idb
void __thiscall EventFriendWin::SetEnableRequestButton(EventFriendWin *this, int b);
void __thiscall EventFriendWin::ShowCheck(EventFriendWin *this, int b);
void __thiscall EventFriendWin::OnClose(EventFriendWin *this); // idb
char __thiscall EventFriendWin::Create(EventFriendWin *this, PgFrameWork *pkFrameWork);
void __thiscall EventFriendWin::OnCmdOk(EventFriendWin *this); // idb
void __thiscall EventFriendWin::OnCommand(EventFriendWin *this, unsigned int wParam, int lParam); // idb
EventFriendWin *__cdecl EventFriendWin::CreateWin(PgFrameWork *pkFrameWork); // idb
EventFriendWin *__thiscall EventFriendWin::`vector deleting destructor'(EventFriendWin *this, unsigned int a2);
void __thiscall FeedMoverWin::DirectMessage(FeedMoverWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall FeedMoverWin::Normalize(FeedMoverWin *this, int b);
void __thiscall FeedMoverWin::~FeedMoverWin(FeedMoverWin *this); // idb
void __thiscall FeedMoverWin::EnableMoverFaceAni(FeedMoverWin *this); // idb
void __thiscall FeedMoverWin::ProcessMeInput(FeedMoverWin *this, bool *bHit); // idb
void __thiscall FeedMoverWin::UpdateFaceCut(FeedMoverWin *this); // idb
void __thiscall FeedMoverWin::FeedMoverWin(FeedMoverWin *this); // idb
char __thiscall FeedMoverWin::Create(FeedMoverWin *this, PgFrameWork *pkFrameWork);
void __thiscall FeedMoverWin::UpdateMeWin(FeedMoverWin *this, float fCurTime); // idb
void __thiscall FeedMoverWin::UpdateMoverSpeed(FeedMoverWin *this); // idb
void __thiscall FeedMoverWin::UpdateHungryPoint(FeedMoverWin *this); // idb
FeedMoverWin *__cdecl FeedMoverWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall FeedMoverWin::EatDropInstance(FeedMoverWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
void __thiscall FeedMoverWin::UpdateMover(FeedMoverWin *this); // idb
MoverMain *__cdecl MoverMainTab::GetByMoverID(unsigned int kMoverID); // idb
MoverUpgradeEffect *__cdecl MoverUpgradeEffectTab::GetByGrade(char nGrade); // idb
FeedMoverWin *__thiscall FeedMoverWin::`scalar deleting destructor'(FeedMoverWin *this, unsigned int a2);
MoverView *__cdecl MoverViewTab::GetByMoverIdx(const char *pcMoverIdx); // idb
void __thiscall FreeStatView::FreeStatView(FreeStatView *this); // idb
void __thiscall FreeStatView::~FreeStatView(FreeStatView *this); // idb
void __thiscall FreeStatView::ClearText(FreeStatView *this); // idb
char __thiscall FreeStatView::SetTipText(FreeStatView *this, int nLine, char *pcText, int r, int g, int b, Font::Type font);
void __thiscall FreeStatView::OnCommand(FreeStatView *this, unsigned int wParam, int lParam); // idb
char *__cdecl GetIntSignedStr(int iValue); // idb
char *__cdecl GetFloatSignedStr(float fValue); // idb
char __thiscall FreeStatView::SetText(FreeStatView *this, int nLine, char *pcText);
void __thiscall FreeStatView::AdjustSize(FreeStatView *this); // idb
char __thiscall FreeStatView::Create(FreeStatView *this, NiSourceTexture *pkTexture, unsigned int uiEdgeWidth, unsigned int uiEdgeHeight);
// void __userpurge FreeStatView::SetFreeStatPoint(FreeStatView *this@<ecx>, int a2@<ebx>, User::FreeStatPoint *rkPoint);
// void __userpurge FreeStatView::UpdateMeWin(FreeStatView *this@<ecx>, int a2@<ebx>, float fCurTime);
void __thiscall FreeStatView::InitAllTextWin(FreeStatView *this); // idb
FreeStatView *__cdecl FreeStatView::CreateWin(NiSourceTexture *pkTexture, unsigned int uiEdgeHeight, unsigned int uiEdgeWidth); // idb
FreeStatView *__thiscall FreeStatView::`scalar deleting destructor'(FreeStatView *this, unsigned int a2);
void __thiscall FriendCallWin::FriendCallWin(FriendCallWin *this); // idb
void __thiscall FriendCallWin::~FriendCallWin(FriendCallWin *this); // idb
void __thiscall FriendCallWin::ClearFriendList(FriendCallWin *this); // idb
void FriendCallWin::OnHelpLink();
void __thiscall FriendCallWin::OnSlideBar(FriendCallWin *this); // idb
void __thiscall FriendCallWin::OnCommand(FriendCallWin *this, unsigned int wParam, int lParam); // idb
void __thiscall FriendCallWin::AddListItem_DefInfo(FriendCallWin *this, PROTO_FRIEND_INFO *pdata); // idb
void __thiscall FriendCallWin::UpdateViewList(FriendCallWin *this); // idb
void __thiscall FriendCallWin::ChangeUserName(FriendCallWin *this, Name5 *OldName, Name5 *NewName); // idb
FriendCallWin *__cdecl FriendCallWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall FriendCallWin::AddFriend(FriendCallWin *this, PROTO_FRIEND_INFO *pInfo, bool bListElem); // idb
char __thiscall FriendCallWin::DelFriend(FriendCallWin *this, Name5 charid);
char __thiscall FriendCallWin::LoginFriend(FriendCallWin *this, Name5 charid);
char __thiscall FriendCallWin::LogoutFriend(FriendCallWin *this, Name5 charid);
char __thiscall FriendCallWin::ChangeMapFriend(FriendCallWin *this, Name5 charid, Name3 mapName);
char __thiscall FriendCallWin::PartyFriend(FriendCallWin *this, Name5 charid, bool bParty);
char __thiscall FriendCallWin::LevelChange(FriendCallWin *this, Name5 charid, char Level);
char __thiscall FriendCallWin::Create(FriendCallWin *this, PgFrameWork *pkFrameWork);
FriendCallWin *__thiscall FriendCallWin::`scalar deleting destructor'(FriendCallWin *this, unsigned int a2);
void __thiscall FriendAddWin::FriendAddWin(FriendAddWin *this); // idb
void __thiscall FriendAddWin::~FriendAddWin(FriendAddWin *this); // idb
void __thiscall FriendAddWin::SetTargetName(FriendAddWin *this, const char *szName); // idb
void __thiscall FriendAddWin::OnClose(FriendAddWin *this); // idb
void __thiscall FriendAddWin::OnShowWin(FriendAddWin *this); // idb
void __thiscall FriendWin::OnSortByTitle01(FriendWin *this); // idb
void __thiscall FriendWin::OnSortByTitle02(FriendWin *this); // idb
void __thiscall FriendWin::OnSortByTitle03(FriendWin *this); // idb
void __thiscall FriendWin::OnSortByTitle04(FriendWin *this); // idb
void __thiscall FriendWin::ClearFriendList(FriendWin *this); // idb
int __stdcall FriendWin::GetReadNum(_iobuf *fp, int size);
char __stdcall FriendWin::WriteOptFile(_iobuf *fp, void *pData, unsigned int size);
bool __stdcall FriendWin::IsValidateFile(_iobuf *fp, int dataSize);
void FriendWin::OnHelpLink();
PROTO_FRIEND_INFO *__thiscall FriendWin::GetFriendInfo(FriendWin *this, Name5 *CharID); // idb
void __thiscall FriendWin::FriendFindClear(FriendWin *this); // idb
void __thiscall FriendWin::OnSortByTitle05(FriendWin *this); // idb
void __thiscall FriendWin::OnSortByTitle06(FriendWin *this); // idb
void __thiscall FriendWin::OnFriendPointUse(FriendWin *this); // idb
void __thiscall FriendWin::OnFriendPointHelp(FriendWin *this); // idb
void __thiscall FriendWin::ResetAddBtn(FriendWin *this); // idb
void __thiscall FriendPointTipMsg::FriendPointTipMsg(FriendPointTipMsg *this); // idb
void __thiscall FriendPointTipMsg::~FriendPointTipMsg(FriendPointTipMsg *this); // idb
void __thiscall FriendPointTipMsg::OnCmdOK(FriendPointTipMsg *this); // idb
void __thiscall FriendAddWin::OnFriendAddOk(FriendAddWin *this); // idb
void __thiscall FriendAddWin::OnFriendAddCancel(FriendAddWin *this); // idb
void __thiscall FriendAddWin::OnCommand(FriendAddWin *this, unsigned int wParam, int lParam); // idb
void __thiscall FriendAddWin::OnEditEnd(FriendAddWin *this, unsigned int wParam, int lParam); // idb
void __thiscall FriendWin::ProcessMeInput(FriendWin *this, bool *bHit); // idb
void __thiscall FriendWin::UpdateMeWin(FriendWin *this, float fCurTime); // idb
void __thiscall FriendWin::OnLClick(FriendWin *this, int nItemIndex); // idb
void __thiscall FriendWin::OnRClick(FriendWin *this, int nItemIndex); // idb
void __thiscall FriendWin::OnAddFrnd(FriendWin *this); // idb
void __thiscall FriendWin::OnWinClose(FriendWin *this); // idb
void __thiscall FriendWin::OnSlideBar(FriendWin *this); // idb
void __thiscall FriendWin::OnChangeTab(FriendWin *this, DirectUserMsgBody_CommunityTabChanged::TabEnum eTab); // idb
void __thiscall FriendWin::OnTopWin(FriendWin *this); // idb
void __thiscall FriendWin::MakeDefaultOptFile(FriendWin *this); // idb
char __thiscall FriendWin::SaveOptFile(FriendWin *this);
void __thiscall FriendWin::OnInviterLClick(FriendWin *this, int nItemIndex); // idb
void __thiscall FriendWin::OnInviterRClick(FriendWin *this, int nItemIndex); // idb
void __thiscall FriendWin::OnFindTab(FriendWin *this); // idb
void __thiscall FriendPointTipMsg::OnCommand(FriendPointTipMsg *this, unsigned int wParam, int lParam); // idb
char __thiscall FriendAddWin::Create(FriendAddWin *this, PgFrameWork *pkFrameWork);
void __thiscall FriendWin::AddListItem_ExtInfo(FriendWin *this, PROTO_FRIEND_INFO *pdata); // idb
void __thiscall FriendWin::OnClickRejectBtn(FriendWin *this); // idb
bool __thiscall FriendWin::LoadOptFile(FriendWin *this); // idb
void __thiscall FriendWin::SetFriendPoint(FriendWin *this, int iFriendPoint); // idb
void __thiscall FriendWin::OnFriendFindAdd(FriendWin *this, int CheckIndex); // idb
void __thiscall FriendWin::OnFriendInviterAdd(FriendWin *this); // idb
char __thiscall FriendPointTipMsg::Create(FriendPointTipMsg *this);
void __thiscall FriendAddWin::UpdateMeWin(FriendAddWin *this, float fCurTime); // idb
void __thiscall FriendWin::AddListItem_DefInfo(FriendWin *this, PROTO_FRIEND_INFO *pdata); // idb
void __thiscall FriendWin::ViewAllInfo(FriendWin *this, PROTO_FRIEND_INFO *pdata); // idb
void __thiscall FriendWin::AddFindListItem(FriendWin *this, PROTO_FRIEND_INFO *pdata); // idb
// void __userpurge FriendWin::SetInviterInfo(FriendWin *this@<ecx>, int a2@<ebx>, PROTO_FRIEND_INFO *pdata);
void __thiscall FriendWin::DirectMessage(FriendWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall FriendWin::UpdateViewList(FriendWin *this); // idb
void __thiscall FriendWin::ChangeUserName(FriendWin *this, Name5 *OldName, Name5 *NewName); // idb
void __thiscall FriendWin::UpdateFindList(FriendWin *this, int nIndex); // idb
void __thiscall FriendWin::ResetTitleType(FriendWin *this, int iCnt, int iCondition); // idb
void __thiscall FriendWin::ResetTabType(FriendWin *this, int iCnt, int iCondition); // idb
void __thiscall FriendWin::ShowFindList(FriendWin *this); // idb
FriendAddWin *__cdecl FriendAddWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall FriendWin::~FriendWin(FriendWin *this); // idb
void __thiscall FriendWin::OnAddInfoBtn(FriendWin *this); // idb
void __thiscall FriendWin::OnShowAllFriend(FriendWin *this); // idb
void __thiscall FriendWin::AddFriend(FriendWin *this, PROTO_FRIEND_INFO *pInfo, bool bListElem); // idb
char __thiscall FriendWin::DelFriend(FriendWin *this, Name5 charid);
char __thiscall FriendWin::LoginFriend(FriendWin *this, Name5 charid);
char __thiscall FriendWin::LogoutFriend(FriendWin *this, Name5 charid);
char __thiscall FriendWin::ChangeMapFriend(FriendWin *this, Name5 charid, Name3 mapName);
char __thiscall FriendWin::PartyFriend(FriendWin *this, Name5 charid, bool bParty);
char __thiscall FriendWin::LevelChange(FriendWin *this, Name5 charid, char Level);
void __thiscall FriendWin::AddFindFriend(FriendWin *this, PROTO_FRIEND_INFO *pInfo, int nIndex); // idb
void __thiscall FriendWin::OnListTab(FriendWin *this); // idb
FriendPointTipMsg *__cdecl FriendPointTipMsg::CreateWin(); // idb
void __thiscall FriendWin::OnCommand(FriendWin *this, unsigned int wParam, int lParam); // idb
void __thiscall FriendWin::FriendWin(FriendWin *this); // idb
FriendWin *__cdecl FriendWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall FriendWin::Create(FriendWin *this, PgFrameWork *pkFrameWork);
void __thiscall PgTQueue<PgWinMgr::PgWinMsg>::Realloc(PgTQueue<PgWinMgr::PgWinMsg> *this, unsigned int uiNewSize); // idb
FriendAddWin *__thiscall FriendAddWin::`vector deleting destructor'(FriendAddWin *this, unsigned int a2);
FriendPointTipMsg *__thiscall FriendPointTipMsg::`scalar deleting destructor'(FriendPointTipMsg *this, unsigned int a2);
int __thiscall SlideListWin::GetColumPosX(SlideListWin *this, unsigned int uiIndex, unsigned int uiColumn); // idb
int __thiscall SlideListWin::GetColumPosY(SlideListWin *this, unsigned int uiIndex, unsigned int uiColumn); // idb
void __thiscall PgTQueue<PgWinMgr::PgWinMsg>::Add(PgTQueue<PgWinMgr::PgWinMsg> *this, PgWinMgr::PgWinMsg element); // idb
FriendWin *__thiscall FriendWin::`scalar deleting destructor'(FriendWin *this, unsigned int a2);
void __thiscall FullMapWin::OnShowGrid(FullMapWin *this); // idb
char __thiscall FullMapWin::GetWinPos(FullMapWin *this, float fCharWorldX, float fCharWorldY, float *rfXPos, float *rfYPos);
void __thiscall FullMapWin::OnDestroy(FullMapWin *this); // idb
WorldMapWin *__thiscall FullMapWin::GetWorldMap(FullMapWin *this); // idb
void __thiscall FullMapWin::CloseWorldMap(FullMapWin *this); // idb
void __thiscall FullMapWin::OnShowIndexList(FullMapWin *this); // idb
void __thiscall FullMapWin::ResetQuestNum(FullMapWin *this); // idb
void __thiscall FullMapWin::SetMapScale(FullMapWin *this, float fScale); // idb
void __thiscall FullMapWin::SetMapViewRect(FullMapWin *this, unsigned int dwLeft, unsigned int dwTop, unsigned int dwRight, unsigned int dwBottom); // idb
char __stdcall FullMapWin::AbbreviateText(char *pResult, const char *pTarget, int nAbbreviationSize);
void FullMapWin::OnHelpLink();
char __thiscall FullMapWin::SearchKQ_MOB(FullMapWin *this, PROTO_NC_BRIEFINFO_REGENMOB_CMD *pkProto);
void __thiscall FullMapWin::UpdateMainCharPos(FullMapWin *this); // idb
void __thiscall FullMapWin::UpdateMainCharDir(FullMapWin *this); // idb
char __thiscall FullMapWin::IsInNPC(FullMapWin *this, unsigned __int16 kCharHandle);
char __thiscall FullMapWin::IsInParty(FullMapWin *this, PartyMemberInfo *pkInfo);
PgSprData *__thiscall FullMapWin::GetMapIconSprData(FullMapWin *this, unsigned int kIndex); // idb
void __thiscall FullMapWin::UpdateArea(FullMapWin *this, unsigned int uiIndex); // idb
void __thiscall FullMapWin::UpdateArea(FullMapWin *this, unsigned __int16 Quest_ID, unsigned __int16 Mob_ID); // idb
void __thiscall FullMapWin::UpdateSlideBarMapList(FullMapWin *this); // idb
BOOL __thiscall FullMapWin::IsSameMapName(FullMapWin *this);
void __thiscall FullMapWin::UpdateRaidPos(FullMapWin *this); // idb
char __thiscall FullMapWin::IsInRaid(FullMapWin *this, RaidMemberInfo *pkInfo);
void __thiscall FullMapWin::UpdateGTEnemyPos(FullMapWin *this); // idb
// void __usercall FullMapWin::OnMapTransparency(FullMapWin *this@<ecx>, int a2@<edi>);
// void __userpurge FullMapWin::SetInvisibleWinAlpha(FullMapWin *this@<ecx>, int a2@<edi>, const float fAlpha);
bool __thiscall InvisibleWin::HitTest(InvisibleWin *this, int iSx, int iSy); // idb
void __thiscall FullMapWin::InitPos(FullMapWin *this, unsigned int uiScreenWidth, unsigned int uiScreenHeight, float fXPosRate, float fYPosRate); // idb
void __thiscall FullMapWin::RemoveNPC(FullMapWin *this, unsigned __int16 handle); // idb
void __thiscall FullMapWin::AddParty(FullMapWin *this, PartyMemberInfo *pkParty); // idb
void __thiscall FullMapWin::RemoveParty(FullMapWin *this, PartyMemberInfo *pkParty); // idb
void __thiscall FullMapWin::ClearParty(FullMapWin *this); // idb
void __thiscall FullMapWin::ClearWithOutMainChar(FullMapWin *this); // idb
void __thiscall FullMapWin::UpdatePartyPos(FullMapWin *this); // idb
void __thiscall FullMapWin::RemoveMapMark(FullMapWin *this, unsigned int nGroup); // idb
void __thiscall FullMapWin::RemoveAllMapMark(FullMapWin *this); // idb
void __thiscall FullMapWin::UpdateMapMark(FullMapWin *this); // idb
// void __usercall FullMapWin::UpdateKQTeamMark(FullMapWin *this@<ecx>, signed int a2@<edi>);
void __thiscall FullMapWin::RemoveKQTeamMark(FullMapWin *this, int kCharHandle);
void __thiscall FullMapWin::RemoveAllKQTeamMark(FullMapWin *this); // idb
void __thiscall FullMapWin::OpenWorldMap(FullMapWin *this); // idb
void __thiscall FullMapWin::ResetQuestHelper(FullMapWin *this); // idb
void __thiscall FullMapWin::AddMapList(FullMapWin *this); // idb
void __thiscall FullMapWin::OnSlideBarMapList(FullMapWin *this); // idb
void __thiscall FullMapWin::UpdateQuestNum(FullMapWin *this); // idb
void __thiscall FullMapWin::CenterPlaceSelectedMap(FullMapWin *this); // idb
void __thiscall FullMapWin::AddRaidMember(FullMapWin *this, RaidMemberInfo *pkRaid); // idb
void __thiscall FullMapWin::RemoveRaidMember(FullMapWin *this, RaidMemberInfo *pkRaid); // idb
void __thiscall FullMapWin::ClearRaidMember(FullMapWin *this); // idb
void __thiscall FullMapWin::ClearGTEnemyPos(FullMapWin *this); // idb
void __thiscall FullMapWin::AddGTEnemyPos(FullMapWin *this, ScanMemberInfo *pkMemberInfo); // idb
void __thiscall InvisibleWin::SetAlpha(InvisibleWin *this, float fAlpha); // idb
void __thiscall InvisibleWin::Init(InvisibleWin *this); // idb
void __thiscall FullMapWin::AddNPC(FullMapWin *this, PROTO_NC_BRIEFINFO_REGENMOB_CMD *pkProto); // idb
void __thiscall FullMapWin::Add_KQ_MOB(FullMapWin *this, PROTO_NC_BRIEFINFO_REGENMOB_CMD *pkProto); // idb
void __thiscall FullMapWin::UpdateNPCPos(FullMapWin *this); // idb
void __thiscall FullMapWin::AddMapMark(FullMapWin *this, PROTO_NC_SCENARIO_MAPMARK_CMD *pkProto); // idb
void __thiscall FullMapWin::AddKQTeamMark(FullMapWin *this, int kCharHandle);
void __thiscall FullMapWin::Remove_KQ_MOB(FullMapWin *this, bool b); // idb
void __thiscall FullMapWin::OnShowMapList(FullMapWin *this); // idb
void __thiscall FullMapWin::OnShowQuestList(FullMapWin *this, bool b); // idb
void __thiscall FullMapWin::UpdateSlideBarQuestList(FullMapWin *this); // idb
void __thiscall FullMapWin::OnShowWin(FullMapWin *this); // idb
// void __userpurge FullMapWin::UpdateMeWin(FullMapWin *this@<ecx>, signed int a2@<edi>, float fCurTime);
void __thiscall FullMapWin::AddNPC(FullMapWin *this, PROTO_NC_BRIEFINFO_MOB_CMD *pkProto); // idb
void __thiscall FullMapWin::UpdateQuestHelper(FullMapWin *this); // idb
void __thiscall FullMapWin::OnQuestListLClick(FullMapWin *this, unsigned int nIndex); // idb
void __thiscall FullMapWin::OnSlideBarQuestList(FullMapWin *this); // idb
void __thiscall FullMapWin::FullMapWin(FullMapWin *this); // idb
void __thiscall FullMapWin::~FullMapWin(FullMapWin *this); // idb
FullMapWin *__cdecl FullMapWin::CreateWin(MiniMapWin *pkMiniMap, PgFrameWork *pkFrameWork); // idb
InvisibleWin *__cdecl InvisibleWin::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, char *pcName, unsigned int uiExtStyle); // idb
void __thiscall FullMapWin::InitVisibleControls(FullMapWin *this); // idb
void __thiscall FullMapWin::ResetView(FullMapWin *this, bool bTextureChange); // idb
void __thiscall FullMapWin::AddQuestList(FullMapWin *this); // idb
void __thiscall FullMapWin::AddQuestHelper(FullMapWin *this); // idb
void __thiscall FullMapWin::RemoveQuestHelperMark(FullMapWin *this, QuestHelperMarkWin *pkWin, PgWinSpr *pkNumWin); // idb
void __thiscall FullMapWin::OnMapListLClick(FullMapWin *this, unsigned int nIndex); // idb
void __thiscall FullMapWin::LocationInfo(FullMapWin *this, unsigned __int16 Quest_ID); // idb
// void __userpurge FullMapWin::OnCommand(FullMapWin *this@<ecx>, int a2@<edi>, unsigned int wParam, int lParam);
char __thiscall FullMapWin::Create(FullMapWin *this, MiniMapWin *pkMiniMap, PgFrameWork *pkFrameWork);
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::~NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>(NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *> *this); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::~NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>(NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *> *this); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::~NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>(NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *> *this); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::~NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>(NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *> *this); // idb
void __thiscall NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::SetAt(NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *this, int key, KQTeamMarkWin *val);
bool __thiscall NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::RemoveAt(NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *this, int key);
char __thiscall NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::GetAt(NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *this, int key, KQTeamMarkWin **val);
unsigned int __thiscall NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::KeyToHashIndex(NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *this, unsigned __int16 key); // idb
BOOL __stdcall NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::IsKeysEqual(unsigned __int16 key1, unsigned __int16 key2);
void __stdcall NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::SetValue(NiTMapItem<unsigned short,KQTeamMarkWin *> *pkItem, unsigned __int16 key, KQTeamMarkWin *val);
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::~NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>(NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *> *this); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::~NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>(NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *> *this); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::~NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>(NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *> *this); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>::~NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>(NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *> *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *> *this, unsigned int a2);
NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *> *this, unsigned int a2);
NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *> *this, unsigned int a2);
NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *> *this, unsigned int a2);
NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *> *this, unsigned int a2);
NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *> *this, unsigned int a2);
NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *> *this, unsigned int a2);
NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *> *this, unsigned int a2);
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,float>::~NiTListBase<NiTPointerAllocator<unsigned int>,float>(NiTListBase<NiTPointerAllocator<unsigned int>,float> *this); // idb
void __thiscall NiTPointerList<float>::~NiTPointerList<float>(NiTPointerList<float> *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,float> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,float>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,float> *this, unsigned int a2);
void __thiscall QuestStateImage::~QuestStateImage(QuestStateImage *this); // idb
void __thiscall NiTPointerList<NpcMarkWin *>::~NiTPointerList<NpcMarkWin *>(NiTPointerList<NpcMarkWin *> *this); // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *> *this, unsigned int a2);
void __thiscall NiTPointerList<MobCoordinate *>::~NiTPointerList<MobCoordinate *>(NiTPointerList<MobCoordinate *> *this); // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *> *this, unsigned int a2);
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,float>::AddTail(NiTPointerListBase<NiTPointerAllocator<unsigned int>,float> *this, const float *element); // idb
void __thiscall PgTList<NpcMarkWin *>::~PgTList<NpcMarkWin *>(PgTList<NpcMarkWin *> *this); // idb
void __thiscall NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>::~NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>(NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *> *this); // idb
void __thiscall NiTMap<unsigned int,MapMarkWin *>::~NiTMap<unsigned int,MapMarkWin *>(NiTMap<unsigned int,MapMarkWin *> *this); // idb
void __thiscall NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::~NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>(NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *this); // idb
void __thiscall NiTMap<unsigned short,KQTeamMarkWin *>::~NiTMap<unsigned short,KQTeamMarkWin *>(NiTMap<unsigned short,KQTeamMarkWin *> *this); // idb
void __thiscall PgTList<MobCoordinate *>::~PgTList<MobCoordinate *>(PgTList<MobCoordinate *> *this); // idb
void __thiscall PgTList<float>::~PgTList<float>(PgTList<float> *this); // idb
NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *> *__thiscall NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>::`scalar deleting destructor'(NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *> *this, unsigned int a2);
NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *__thiscall NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::`vector deleting destructor'(NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *this, unsigned int a2);
void __stdcall NiTPointerMap<unsigned int,float>::DeleteItem(NiTMapItem<unsigned int,float> *pkItem);
void __thiscall NiTPointerList<RaidMarkWin *>::~NiTPointerList<RaidMarkWin *>(NiTPointerList<RaidMarkWin *> *this); // idb
PgTList<NpcMarkWin *> *__thiscall PgTList<NpcMarkWin *>::`vector deleting destructor'(PgTList<NpcMarkWin *> *this, unsigned int a2);
void __thiscall NiTPointerList<PartyMarkWin *>::~NiTPointerList<PartyMarkWin *>(NiTPointerList<PartyMarkWin *> *this); // idb
void __thiscall NiTPointerList<QuestHelperMarkWin *>::~NiTPointerList<QuestHelperMarkWin *>(NiTPointerList<QuestHelperMarkWin *> *this); // idb
void __thiscall NiTPointerList<PgWinSpr *>::~NiTPointerList<PgWinSpr *>(NiTPointerList<PgWinSpr *> *this); // idb
void __thiscall NiTPointerList<MobAreaMarkWin *>::~NiTPointerList<MobAreaMarkWin *>(NiTPointerList<MobAreaMarkWin *> *this); // idb
void __thiscall NiTPointerList<GTIScanMarkWin *>::~NiTPointerList<GTIScanMarkWin *>(NiTPointerList<GTIScanMarkWin *> *this); // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *> *this, unsigned int a2);
NiTPointerListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *> *this, unsigned int a2);
NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *> *this, unsigned int a2);
NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *> *this, unsigned int a2);
NiTPointerListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *> *this, unsigned int a2);
NiTPointerListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *> *this, unsigned int a2);
PgTList<MobCoordinate *> *__thiscall PgTList<MobCoordinate *>::`scalar deleting destructor'(PgTList<MobCoordinate *> *this, unsigned int a2);
PgTList<float> *__thiscall PgTList<float>::`vector deleting destructor'(PgTList<float> *this, unsigned int a2);
NiTPointerList<float> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,float>::`vector deleting destructor'(NiTPointerList<float> *this, unsigned int a2);
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<unsigned int,MapMarkWin *>::`vector deleting destructor'(NiTMap<unsigned int,MapMarkWin *> *this, unsigned int a2);
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<unsigned short,KQTeamMarkWin *>::`scalar deleting destructor'(NiTMap<unsigned short,KQTeamMarkWin *> *this, unsigned int a2);
void __thiscall PgTList<RaidMarkWin *>::~PgTList<RaidMarkWin *>(PgTList<RaidMarkWin *> *this); // idb
void __thiscall PgTList<PartyMarkWin *>::~PgTList<PartyMarkWin *>(PgTList<PartyMarkWin *> *this); // idb
void __thiscall PgTList<GTIScanMarkWin *>::~PgTList<GTIScanMarkWin *>(PgTList<GTIScanMarkWin *> *this); // idb
void __thiscall PgTList<QuestHelperMarkWin *>::~PgTList<QuestHelperMarkWin *>(PgTList<QuestHelperMarkWin *> *this); // idb
void __thiscall PgTList<PgWinSpr *>::~PgTList<PgWinSpr *>(PgTList<PgWinSpr *> *this); // idb
void __thiscall PgTList<MobAreaMarkWin *>::~PgTList<MobAreaMarkWin *>(PgTList<MobAreaMarkWin *> *this); // idb
PgTList<RaidMarkWin *> *__thiscall PgTList<RaidMarkWin *>::`scalar deleting destructor'(PgTList<RaidMarkWin *> *this, unsigned int a2);
PgTList<PartyMarkWin *> *__thiscall PgTList<PartyMarkWin *>::`vector deleting destructor'(PgTList<PartyMarkWin *> *this, unsigned int a2);
PgTList<QuestHelperMarkWin *> *__thiscall PgTList<QuestHelperMarkWin *>::`scalar deleting destructor'(PgTList<QuestHelperMarkWin *> *this, unsigned int a2);
PgTList<PgWinSpr *> *__thiscall PgTList<PgWinSpr *>::`vector deleting destructor'(PgTList<PgWinSpr *> *this, unsigned int a2);
PgTList<MobAreaMarkWin *> *__thiscall PgTList<MobAreaMarkWin *>::`scalar deleting destructor'(PgTList<MobAreaMarkWin *> *this, unsigned int a2);
PgTList<GTIScanMarkWin *> *__thiscall PgTList<GTIScanMarkWin *>::`scalar deleting destructor'(PgTList<GTIScanMarkWin *> *this, unsigned int a2);
FullMapWin *__thiscall FullMapWin::`vector deleting destructor'(FullMapWin *this, unsigned int a2);
void __thiscall GateChannelWin::Link(GateChannelWin *this, GateChannelWin::BtnMsg BtnIndex); // idb
void __thiscall GateChannelWin::~GateChannelWin(GateChannelWin *this); // idb
void __thiscall GateChannelWin::OnCommand(GateChannelWin *this, unsigned int wParam, int lParam); // idb
void __thiscall GateChannelWin::GateChannelWin(GateChannelWin *this); // idb
char __thiscall GateChannelWin::Create(GateChannelWin *this, PgFrameWork *pkFrameWork);
void __thiscall GateChannelWin::UpdateMeWin(GateChannelWin *this, float fCurTime); // idb
void __thiscall GateChannelWin::OpenWindow(GateChannelWin *this, PROTO_NC_MAP_MULTY_LINK_CMD *pkProto); // idb
GateChannelWin *__cdecl GateChannelWin::CreateWin(PgFrameWork *pkFrameWork); // idb
PROTO_NC_MAP_MULTY_LINK_CMD *__thiscall PROTO_NC_MAP_MULTY_LINK_CMD::operator=(PROTO_NC_MAP_MULTY_LINK_CMD *this, PROTO_NC_MAP_MULTY_LINK_CMD *__that); // idb
GateChannelWin *__thiscall GateChannelWin::`scalar deleting destructor'(GateChannelWin *this, unsigned int a2);
void __thiscall GatheringWin::GatheringWin(GatheringWin *this); // idb
void __thiscall GatheringWin::Stop(GatheringWin *this); // idb
void __thiscall GatheringWin::GatheringFail(GatheringWin *this); // idb
void __thiscall GatheringWin::GatheringSuccess(GatheringWin *this); // idb
BOOL __thiscall GatheringWin::IsFinished(GatheringWin *this);
void __thiscall GatheringWin::DirectMessage(GatheringWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
char __thiscall GatheringWin::Create(GatheringWin *this, PgFrameWork *pkFrameWork);
void __thiscall GatheringWin::~GatheringWin(GatheringWin *this); // idb
void __thiscall GatheringWin::StartGathering(GatheringWin *this, unsigned int uiGatheringCycle, unsigned int uiGatheringCount, int iThickness); // idb
void __thiscall GatheringWin::UpdateMeWin(GatheringWin *this, float fCurTime); // idb
GatheringWin *__cdecl GatheringWin::CreateWin(PgFrameWork *pkFrameWork); // idb
GatheringWin *__thiscall GatheringWin::`vector deleting destructor'(GatheringWin *this, unsigned int a2);
BOOL __cdecl GuildListWin::GuildInfo::Low_GuildType(GuildListWin::GuildInfo *lhw, GuildListWin::GuildInfo *rhw);
BOOL __cdecl GuildListWin::GuildInfo::Low_GuildGrade(GuildListWin::GuildInfo *lhw, GuildListWin::GuildInfo *rhw);
BOOL __cdecl GTRequestListWin::GuildInfo::Low_GuildTotalMember(GuildListWin::GuildInfo *lhw, GuildListWin::GuildInfo *rhw);
void __thiscall GuildListWin::OnPrevPage(GuildListWin *this); // idb
void __thiscall GuildListWin::OnNextPage(GuildListWin *this); // idb
void GuildListWin::OnHelpLink();
void __thiscall GuildListWin::UpdateMeWin(GuildListWin *this, float fCurTime); // idb
void __thiscall GuildListWin::OnSlideBar(GuildListWin *this); // idb
void __thiscall GuildListWin::OnSearchChoice(GuildListWin *this); // idb
void __thiscall GuildListWin::OnClose(GuildListWin *this); // idb
void __thiscall GuildListWin::DirectMessage(GuildListWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall GuildListWin::AddGuildInfo(GuildListWin *this, GuildListWin::GuildInfo *kGuildInfo); // idb
void __thiscall GuildListWin::DisplayInfoSetting(GuildListWin *this, bool bSearch); // idb
void __thiscall GuildListWin::GuildListWin(GuildListWin *this); // idb
void __thiscall GuildListWin::~GuildListWin(GuildListWin *this); // idb
GuildListWin *__cdecl GuildListWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall GuildListWin::Clear(GuildListWin *this); // idb
void __thiscall GuildListWin::SetGuildList(GuildListWin *this, SHINE_GUILD_LIST_NEW *pkList, unsigned int uiTotalGuild); // idb
void __thiscall GuildListWin::OnSearch(GuildListWin *this); // idb
void __thiscall GuildListWin::ShowFormerList(GuildListWin *this); // idb
char __thiscall GuildListWin::Create(GuildListWin *this, PgFrameWork *pkFrameWork);
void __thiscall GuildListWin::OnCommand(GuildListWin *this, unsigned int wParam, int lParam); // idb
void __thiscall GuildListWin::OnEditEnd(GuildListWin *this, unsigned int wParam, int lParam); // idb
void __thiscall boost::bad_function_call::bad_function_call(boost::bad_function_call *this, boost::bad_function_call *__that); // idb
RaidMemberInfo *__stdcall std::allocator<GuildAcademySelectWin::GuildInfo>::allocate(unsigned int _Count);
void __cdecl __noreturn boost::throw_exception<boost::bad_function_call>(boost::bad_function_call *e);
void __cdecl std::_Push_heap<GTRequestListWin::GuildInfo *,int,GTRequestListWin::GuildInfo,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(GuildListWin::GuildInfo *_First, int _Hole, int _Top, GuildListWin::GuildInfo *_Val, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > _Pred); // idb
GuildListWin::GuildInfo *__cdecl std::_Uninit_move<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::GuildInfo *,std::allocator<GuildAcademySelectWin::GuildInfo>,GuildAcademySelectWin::GuildInfo>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, GuildListWin::GuildInfo *_Dest);
void __cdecl std::_Med3<GTRequestListWin::GuildInfo *,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Mid, GuildListWin::GuildInfo *_Last, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > _Pred); // idb
void __cdecl std::_Adjust_heap<GTRequestListWin::GuildInfo *,int,GTRequestListWin::GuildInfo,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(GuildListWin::GuildInfo *_First, int _Hole, int _Bottom, GuildListWin::GuildInfo *_Val, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > _Pred); // idb
void __cdecl std::_Pop_heap<GTRequestListWin::GuildInfo *,int,GTRequestListWin::GuildInfo,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, GuildListWin::GuildInfo *_Dest, GuildListWin::GuildInfo *_Val, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > _Pred);
void __cdecl std::_Median<GTRequestListWin::GuildInfo *,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Mid, GuildListWin::GuildInfo *_Last, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > _Pred); // idb
void __cdecl std::_Pop_heap_0<GuildListWin::GuildInfo *,GuildListWin::GuildInfo,boost::function<bool __cdecl (GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void>>>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > _Pred);
std::pair<GuildListWin::GuildInfo *,GuildListWin::GuildInfo *> *__cdecl std::_Unguarded_partition<GuildListWin::GuildInfo *,boost::function<bool __cdecl (GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void>>>(std::pair<GuildListWin::GuildInfo *,GuildListWin::GuildInfo *> *result, GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > _Pred); // idb
void __thiscall std::vector<GTRequestListWin::GuildInfo,std::allocator<GTRequestListWin::GuildInfo>>::reserve(std::vector<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > *this, unsigned int _Count); // idb
void __cdecl std::_Sort_heap<GTRequestListWin::GuildInfo *,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > _Pred); // idb
void __thiscall std::vector<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo>>::_Reserve(std::vector<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > *this, unsigned int _Count); // idb
void __cdecl std::sort_heap<GTRequestListWin::GuildInfo *,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > _Pred); // idb
GuildListWin *__thiscall GuildListWin::`vector deleting destructor'(GuildListWin *this, unsigned int a2);
void __thiscall std::vector<GuildAcademySelectWin::GuildInfo,std::allocator<GuildAcademySelectWin::GuildInfo>>::push_back(std::vector<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > *this, GuildListWin::GuildInfo *_Val); // idb
void __cdecl std::_Sort<GTRequestListWin::GuildInfo *,int,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, int _Ideal, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > _Pred); // idb
void __cdecl std::sort<std::_Vector_iterator<std::_Vector_val<GTRequestListWin::GuildInfo,std::allocator<GTRequestListWin::GuildInfo>>>,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(std::_Vector_iterator<std::_Vector_val<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > > _First, std::_Vector_iterator<std::_Vector_val<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > > _Last, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > _Pred); // idb
void __thiscall GuildSelectWin::GuildSelectWin(GuildSelectWin *this); // idb
void __thiscall GuildSelectWin::~GuildSelectWin(GuildSelectWin *this); // idb
void __thiscall GuildSelectWin::OnGuildBtn(GuildSelectWin *this); // idb
void __thiscall GuildSelectWin::OnAcademyBtn(GuildSelectWin *this); // idb
void GuildSelectWin::OnHelpLink();
void __thiscall GuildSelectWin::OnCommand(GuildSelectWin *this, unsigned int wParam, int lParam); // idb
char __thiscall GuildSelectWin::Create(GuildSelectWin *this, PgFrameWork *pkFrameWork);
GuildSelectWin *__cdecl GuildSelectWin::CreateWin(PgFrameWork *pkFrameWork); // idb
GuildSelectWin *__thiscall GuildSelectWin::`vector deleting destructor'(GuildSelectWin *this, unsigned int a2);
void __thiscall HelpWin::OnClose(HelpWin *this); // idb
void __thiscall HelpWin::ReGenPos(HelpWin *this); // idb
void __thiscall HelpWin::UpdateWebPos(HelpWin *this); // idb
void __thiscall HelpWin::OnWinClose(HelpWin *this); // idb
void __thiscall HelpWin::UpdateMeWin(HelpWin *this, float fCurTime); // idb
char __thiscall HelpWin::Create(HelpWin *this, PgFrameWork *pkFrameWork);
void __thiscall HelpWin::OnCommand(HelpWin *this, unsigned int wParam, int lParam); // idb
void __thiscall HelpWin::HelpWin(HelpWin *this); // idb
void __thiscall HelpWin::~HelpWin(HelpWin *this); // idb
HelpWin *__cdecl HelpWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall HelpWin::OnShowWin(HelpWin *this); // idb
void __thiscall HelpWin::SetWebAddress(HelpWin *this, const char *pcAddress); // idb
HelpWin *__thiscall HelpWin::`scalar deleting destructor'(HelpWin *this, unsigned int a2);
void __thiscall HolyPromiseAddWin::HolyPromiseAddWin(HolyPromiseAddWin *this); // idb
void __thiscall HolyPromiseAddWin::~HolyPromiseAddWin(HolyPromiseAddWin *this); // idb
void __thiscall HolyPromiseAddWin::SetTargetName(HolyPromiseAddWin *this, const char *szName); // idb
void __thiscall HolyPromiseAddWin::OnClose(HolyPromiseAddWin *this); // idb
void __thiscall HolyPromiseAddWin::OnShowWin(HolyPromiseAddWin *this); // idb
void __thiscall HolyPromiseWin::OnSortByTitle01(HolyPromiseWin *this); // idb
void __thiscall HolyPromiseWin::OnSortByTitle02(HolyPromiseWin *this); // idb
void __thiscall HolyPromiseWin::OnSortByTitle03(HolyPromiseWin *this); // idb
void __thiscall HolyPromiseWin::OnSortByTitle04(HolyPromiseWin *this); // idb
void __thiscall HolyPromiseWin::ClearHolyPromise(HolyPromiseWin *this); // idb
void __thiscall HolyPromiseWin::UpdateMeWin(HolyPromiseWin *this, float fCurTime); // idb
void HolyPromiseWin::OnHelpLink();
void __thiscall HolyPromiseAddWin::OnFriendAddCancel(HolyPromiseAddWin *this); // idb
void __thiscall HolyPromiseWin::OnChangeTab(HolyPromiseWin *this, DirectUserMsgBody_CommunityTabChanged::TabEnum eTab); // idb
void __thiscall HolyPromiseWin::OnLClick(HolyPromiseWin *this, int nItemIndex); // idb
void __thiscall HolyPromiseWin::OnRClick(HolyPromiseWin *this, int nItemIndex); // idb
void __thiscall HolyPromiseWin::OnHighRankLClick(HolyPromiseWin *this, int nItemIndex); // idb
void __thiscall HolyPromiseWin::OnHighRankRClick(HolyPromiseWin *this, int nItemIndex); // idb
void __thiscall HolyPromiseWin::OnInviteHighPromise(HolyPromiseWin *this); // idb
void __thiscall HolyPromiseWin::OnSendWhisper(HolyPromiseWin *this); // idb
void __thiscall HolyPromiseWin::OnSlideBar(HolyPromiseWin *this); // idb
void __thiscall HolyPromiseWin::OnTopWin(HolyPromiseWin *this); // idb
char __thiscall HolyPromiseAddWin::Create(HolyPromiseAddWin *this, PgFrameWork *pkFrameWork);
void __thiscall HolyPromiseAddWin::OnFriendAddOk(HolyPromiseAddWin *this); // idb
void __thiscall HolyPromiseAddWin::OnCommand(HolyPromiseAddWin *this, unsigned int wParam, int lParam); // idb
void __thiscall HolyPromiseAddWin::OnEditEnd(HolyPromiseAddWin *this, unsigned int wParam, int lParam); // idb
void __thiscall HolyPromiseWin::SetHolyPromiseList(HolyPromiseWin *this, PROTO_HOLY_PROMISE_INFO *pkData, bool bHighList); // idb
void __thiscall HolyPromiseWin::CheckDay(HolyPromiseWin *this, PROTO_HOLY_PROMISE_INFO *pdata, bool bHigh); // idb
void __thiscall HolyPromiseAddWin::UpdateMeWin(HolyPromiseAddWin *this, float fCurTime); // idb
void __thiscall HolyPromiseWin::OnRemovalPromise(HolyPromiseWin *this); // idb
void __thiscall HolyPromiseWin::UpdateViewList(HolyPromiseWin *this); // idb
void __thiscall HolyPromiseWin::ChangeUserName(HolyPromiseWin *this, Name5 *OldName, Name5 *NewName); // idb
void __thiscall HolyPromiseWin::OnCommand(HolyPromiseWin *this, unsigned int wParam, int lParam); // idb
void __thiscall HolyPromiseWin::SetHignHolyPromise(HolyPromiseWin *this, PROTO_HOLY_PROMISE_INFO *pkInfo); // idb
void __thiscall HolyPromiseWin::DelHolyPromise(HolyPromiseWin *this, Name5 CharID); // idb
void __thiscall HolyPromiseWin::DelUpHolyPromise(HolyPromiseWin *this); // idb
void __thiscall HolyPromiseWin::AddHolyPromiseList(HolyPromiseWin *this, PROTO_NC_HOLY_PROMISE_LIST_CMD *pInfo); // idb
void __thiscall HolyPromiseWin::AddPromise(HolyPromiseWin *this, PROTO_HOLY_PROMISE_INFO *pkInfo); // idb
void __thiscall HolyPromiseWin::SetLogin(HolyPromiseWin *this, Name5 *pCharID); // idb
void __thiscall HolyPromiseWin::SetLogOut(HolyPromiseWin *this, Name5 *pCharID); // idb
void __thiscall HolyPromiseWin::SetLevelChange(HolyPromiseWin *this, Name5 *pCharID, char Level); // idb
HolyPromiseAddWin *__cdecl HolyPromiseAddWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall HolyPromiseWin::DirectMessage(HolyPromiseWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall HolyPromiseWin::SetID(HolyPromiseWin *this, Name5 RequestID, Name5 HighID); // idb
void __thiscall HolyPromiseWin::Terminate(HolyPromiseWin *this); // idb
void __thiscall HolyPromiseWin::~HolyPromiseWin(HolyPromiseWin *this); // idb
void __thiscall HolyPromiseWin::HolyPromiseWin(HolyPromiseWin *this); // idb
HolyPromiseWin *__cdecl HolyPromiseWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall HolyPromiseWin::Create(HolyPromiseWin *this, PgFrameWork *pkFrameWork);
std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Max(std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *_Pnode); // idb
std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Min(std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *_Pnode); // idb
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>,std::_Iterator_base0>::operator++(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >,std::_Iterator_base0> *this); // idb
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>,std::_Iterator_base0>::operator--(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >,std::_Iterator_base0> *this); // idb
HolyPromiseAddWin *__thiscall HolyPromiseAddWin::`scalar deleting destructor'(HolyPromiseAddWin *this, unsigned int a2);
void __thiscall PROTO_NC_HOLY_PROMISE_SET_UP_CONFIRM_ACK::PROTO_NC_HOLY_PROMISE_SET_UP_CONFIRM_ACK(PROTO_NC_HOLY_PROMISE_SET_UP_CONFIRM_ACK *this); // idb
void __thiscall std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Rrotate(std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *_Wherenode); // idb
void __thiscall std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Lrotate(std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *_Wherenode); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::find(std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > *result, const unsigned int *_Keyval); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *_Newnode); // idb
std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Buynode<std::pair<unsigned int const,Name5>>(std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *this, std::pair<unsigned int const ,Name5> *_Val); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::erase(std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > _Where); // idb
void __thiscall std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Erase(std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *_Rootnode); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *_Node, bool _Leftish); // idb
void __thiscall std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::clear(std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *this); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::erase(std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > _Last); // idb
HolyPromiseWin *__thiscall HolyPromiseWin::`vector deleting destructor'(HolyPromiseWin *this, unsigned int a2);
void __thiscall IDTimeWin::IDTimeWin(IDTimeWin *this); // idb
void __thiscall IDTimeWin::~IDTimeWin(IDTimeWin *this); // idb
void __thiscall IDTimeWin::UpdateMeWin(IDTimeWin *this, float fCurTime); // idb
void __thiscall IDTimeWin::ResetTime(IDTimeWin *this, unsigned int second); // idb
char __thiscall IDTimeWin::Create(IDTimeWin *this, PgFrameWork *pkFrameWork);
IDTimeWin *__cdecl IDTimeWin::CreateWin(PgFrameWork *pkFrameWork); // idb
IDTimeWin *__thiscall IDTimeWin::`scalar deleting destructor'(IDTimeWin *this, unsigned int a2);
void __thiscall IndunLevelSelectWin::sIndunLevelButton::sIndunLevelButton(IndunLevelSelectWin::sIndunLevelButton *this); // idb
void __thiscall IndunLevelSelectWin::sIndunLevelButton::sIndunLevelButton(IndunLevelSelectWin::sIndunLevelButton *this, PgWinBut *pkBtn, PgWinText *pkText, unsigned int uiPos); // idb
void __thiscall IndunLevelSelectWin::sIndunLevelButton::Reset(IndunLevelSelectWin::sIndunLevelButton *this); // idb
void __thiscall IndunLevelSelectWin::sIndunLevelButton::ChangePos(IndunLevelSelectWin::sIndunLevelButton *this, bool bChange); // idb
void __thiscall IndunLevelSelectWin::sIndunLevelButton::SetText(IndunLevelSelectWin::sIndunLevelButton *this, const char *pcText); // idb
void __thiscall IndunLevelSelectWin::sIndunLevelButton::SetParam(IndunLevelSelectWin::sIndunLevelButton *this, unsigned int uiParam); // idb
void __thiscall IndunLevelSelectWin::~IndunLevelSelectWin(IndunLevelSelectWin *this); // idb
void __thiscall IndunLevelSelectWin::OnSelect(IndunLevelSelectWin *this, ID_LEVEL_TYPE eLevelType); // idb
void __thiscall IndunLevelSelectWin::OnCancel(IndunLevelSelectWin *this); // idb
void __thiscall IndunLevelSelectWin::ResetInfo(IndunLevelSelectWin *this); // idb
void __thiscall IndunLevelMsgWin::IndunLevelMsgWin(IndunLevelMsgWin *this); // idb
void __thiscall IndunLevelMsgWin::~IndunLevelMsgWin(IndunLevelMsgWin *this); // idb
void __thiscall IndunLevelMsgWin::ResetInfo(IndunLevelMsgWin *this); // idb
void __thiscall IndunLevelSelectWin::IndunLevelSelectWin(IndunLevelSelectWin *this); // idb
void __thiscall IndunLevelSelectWin::OnCommand(IndunLevelSelectWin *this, unsigned int wParam, int lParam); // idb
void __thiscall IndunLevelMsgWin::OnOk(IndunLevelMsgWin *this); // idb
void __thiscall IndunLevelMsgWin::OnCancel(IndunLevelMsgWin *this); // idb
char __thiscall IndunLevelSelectWin::Create(IndunLevelSelectWin *this, PgFrameWork *pkFrameWork);
char __thiscall IndunLevelMsgWin::Create(IndunLevelMsgWin *this, PgFrameWork *pkFrameWork);
void __thiscall IndunLevelMsgWin::OnCommand(IndunLevelMsgWin *this, unsigned int wParam, int lParam); // idb
IndunLevelSelectWin *__cdecl IndunLevelSelectWin::CreateWin(PgFrameWork *pkFrameWork); // idb
IndunLevelMsgWin *__cdecl IndunLevelMsgWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall IndunLevelSelectWin::SetInfo(IndunLevelSelectWin *this, unsigned __int16 kNPCHandle, Name3 kMapIndex, unsigned int uiMenuCount, ID_LEVEL_TYPE *eLevelType); // idb
void __thiscall IndunLevelMsgWin::SetInfo(IndunLevelMsgWin *this, unsigned __int16 kNPCHandle, Name3 kMapIndex, ID_LEVEL_TYPE eLevelType); // idb
IndunLevelSelectWin *__thiscall IndunLevelSelectWin::`vector deleting destructor'(IndunLevelSelectWin *this, unsigned int a2);
IndunLevelMsgWin *__thiscall IndunLevelMsgWin::`vector deleting destructor'(IndunLevelMsgWin *this, unsigned int a2);
void __thiscall InputTextWin::OnCmdOk(InputTextWin *this); // idb
void __thiscall InputTextWin::OnCmdCancel(InputTextWin *this); // idb
void __thiscall InputTextWin::OnClose(InputTextWin *this); // idb
void __thiscall InputTextWin::OnEditEnd(InputTextWin *this, unsigned int wParam, int lParam); // idb
void __thiscall InputTextWin::OnCommand(InputTextWin *this, unsigned int wParam, int lParam); // idb
void __thiscall InputTextWin::Open(InputTextWin *this, PgWin *pkRevWin, unsigned int uiOkMsg, char *pcText); // idb
void __thiscall InputTextWin::~InputTextWin(InputTextWin *this); // idb
char __thiscall InputTextWin::Create(InputTextWin *this, PgFrameWork *pkFrameWork);
void __thiscall InputTextWin::InputTextWin(InputTextWin *this); // idb
InputTextWin *__cdecl InputTextWin::CreateWin(PgFrameWork *pkFrameWork); // idb
InputTextWin *__thiscall InputTextWin::`scalar deleting destructor'(InputTextWin *this, unsigned int a2);
void __thiscall ChargedItemUseTask::OnStart(ChargedItemUseTask *this); // idb
void __thiscall InvWin::SetInvType(InvWin *this, unsigned int uiInvType); // idb
void __thiscall InvWin::SetActive(InvWin *this, bool bActive); // idb
bool __thiscall InvWin::GetActive(InvWin *this); // idb
bool __thiscall InvWin::IsLock(InvWin *this); // idb
void __thiscall InvTabButWin::InvTabButWin(InvTabButWin *this); // idb
void __thiscall InvTabButWin::~InvTabButWin(InvTabButWin *this); // idb
bool __thiscall InvTabButWin::Create(InvTabButWin *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg); // idb
void __thiscall ChargedItemIcon::ChargedItemIcon(ChargedItemIcon *this); // idb
void __thiscall ChargedItemIcon::~ChargedItemIcon(ChargedItemIcon *this); // idb
bool __thiscall ChargedItemIcon::Create(ChargedItemIcon *this, int iXPos, int iYPos, PgWin *pkParent); // idb
void __thiscall ChargedItemIcon::SetChargedItem(ChargedItemIcon *this, unsigned int dwShopItemID); // idb
void __thiscall ChargedItemInvenWin::ChargedItemInvenWin(ChargedItemInvenWin *this); // idb
void __thiscall ChargedItemInvenWin::~ChargedItemInvenWin(ChargedItemInvenWin *this); // idb
void __thiscall ChargedItemInvenWin::SendPageInfoReq(ChargedItemInvenWin *this); // idb
void __thiscall ChargedItemInvenWin::Refresh(ChargedItemInvenWin *this); // idb
void __thiscall ChargedItemInvenWin::DirectMessage(ChargedItemInvenWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void ChargedItemInvenWin::OnHelpLink();
bool __thiscall CompensationItemIcon::Create(CompensationItemIcon *this, int iXPos, int iYPos, PgWin *pkParent); // idb
void __thiscall CompensationItemIcon::SetChargedItem(CompensationItemIcon *this, unsigned int dwShopItemID); // idb
void __thiscall CompensationInvWin::CompensationInvWin(CompensationInvWin *this); // idb
void __thiscall CompensationInvWin::~CompensationInvWin(CompensationInvWin *this); // idb
bool __stdcall CompensationInvWin::EatDropInstance(PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
void __thiscall CompensationInvWin::OnOpenPage(CompensationInvWin *this); // idb
void __thiscall CompensationInvWin::Change(CompensationInvWin *this, Item *pkItem, unsigned int uiInvIndex); // idb
void CompensationInvWin::OnHelpLink();
char __thiscall InventoryWin::Change(InventoryWin *this, unsigned int uiInvType, Item *pkItem, unsigned int uiInvIndex);
void __thiscall InventoryWin::OnInputPrivateStoreBuyClientItemCount(InventoryWin *this, unsigned int uiBuyLot); // idb
void __thiscall InventoryWin::RefreshChargedItemInven(InventoryWin *this); // idb
void InventoryWin::OnHelpLink();
void __thiscall InventoryWin::SetAutoPickMinimon(InventoryWin *this, const bool bAutoPickMinimon); // idb
char __thiscall InventoryWin::SetSenderInvPos(InventoryWin *this, unsigned int uiPos);
char __thiscall InventoryWin::SetReceiverInvPos(InventoryWin *this, unsigned int uiPos);
// void __usercall InventoryWin::OnArrange(InventoryWin *this@<ecx>, double a2@<st0>);
void __thiscall InventoryWin::SetEnableAutoArrange(InventoryWin *this, int bEnable);
void __thiscall InventoryWin::OnOpenMagicBox(InventoryWin *this); // idb
void __thiscall InventoryWin::ShowRewardNewMark(InventoryWin *this, bool bShow); // idb
void __thiscall InventoryWin::ShowChargedNewMark(InventoryWin *this, bool bShow); // idb
void __thiscall InventoryWin::SetStartNewMark(InventoryWin *this); // idb
BOOL __thiscall InventoryWin::GetIsViewNewMark(InventoryWin *this);
void __thiscall ChargedItemUseTask::SetChargedInvenIndex(ChargedItemUseTask *this, unsigned int uiIndex); // idb
void __thiscall ChargedItemUseTask::DirectMessage(ChargedItemUseTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall InvWin::InvWin(InvWin *this); // idb
void __thiscall InvWin::~InvWin(InvWin *this); // idb
char __thiscall InvTabButWin::EatDropInstance(InvTabButWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
void __thiscall CompensationItemIcon::CompensationItemIcon(CompensationItemIcon *this); // idb
void __thiscall CompensationItemIcon::~CompensationItemIcon(CompensationItemIcon *this); // idb
void __thiscall CompensationItemIcon::SetDropContents(CompensationItemIcon *this, Item *pkItem, unsigned int uiInvIndex, bool b); // idb
void __thiscall CompensationInvWin::OnInvLClick(CompensationInvWin *this, unsigned int uiInvIndex); // idb
void __thiscall InventoryWin::InventoryWin(InventoryWin *this); // idb
void __thiscall InventoryWin::~InventoryWin(InventoryWin *this); // idb
void __thiscall InventoryWin::OnInvLClickPrivateStoreMode(InventoryWin *this, unsigned int uiInvIndex); // idb
void __thiscall InventoryWin::OnInvRClickShopMode(InventoryWin *this, unsigned int uiInvIndex); // idb
void __thiscall InventoryWin::OnInvLClickBankMode(InventoryWin *this, unsigned int uiInvIndex); // idb
void __thiscall InventoryWin::OnInvLClickGuildAcademyStorageMode(InventoryWin *this, unsigned int uiInvIndex); // idb
void __thiscall InventoryWin::OnInvLClickGttStoreMode(InventoryWin *this, unsigned int uiInvIndex); // idb
void __thiscall InventoryWin::OnClickRepairItem(InventoryWin *this, ITEM_INVEN kFrom); // idb
void __thiscall InventoryWin::OnResetRecoverCountState(InventoryWin *this); // idb
signed int __thiscall InventoryWin::FindItem(InventoryWin *this, unsigned __int16 ItemID);
int __thiscall InventoryWin::GetFuncItemCount(InventoryWin *this, ItemFuncEnum e);
void __thiscall InventoryWin::SearchQuestStartItem(InventoryWin *this, unsigned __int16 qID, bool bGiveup); // idb
void __thiscall InventoryWin::StartSuccessEffect(InventoryWin *this); // idb
void __thiscall InventoryWin::OnCloseMagicBox(InventoryWin *this); // idb
signed int __thiscall InventoryWin::FindEquipItem(InventoryWin *this, unsigned __int16 kItemID);
void __thiscall InventoryWin::NcNewRewardAndChargedItem(InventoryWin *this); // idb
char __thiscall ChargedItemUseTask::OnProcessNetMsg(ChargedItemUseTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData);
void __thiscall InvWin::UpdateMeWin(InvWin *this, float fCurTime); // idb
void __thiscall InvWin::DoAction(InvWin *this); // idb
void __thiscall InvWin::DoRAction(InvWin *this); // idb
void __thiscall InvWin::OnFirstHitWin(InvWin *this); // idb
void __thiscall InvWin::OnFirstHitWinEx(InvWin *this); // idb
void __thiscall ChargedItemIcon::OnFirstHitWin(ChargedItemIcon *this); // idb
void __thiscall CompensationItemIcon::OnFirstHitWin(CompensationItemIcon *this); // idb
void __thiscall CompensationItemIcon::DoAction(CompensationItemIcon *this); // idb
void __thiscall CompensationItemIcon::DoRAction(CompensationItemIcon *this); // idb
void __thiscall CompensationInvWin::Refresh(CompensationInvWin *this); // idb
void __thiscall CompensationInvWin::OnInvRClick(CompensationInvWin *this, unsigned int uiInvIndex); // idb
void __thiscall CompensationInvWin::DirectMessage(CompensationInvWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall InventoryWin::OnInvShiftLClickPrivateStoreMode(InventoryWin *this, unsigned int uiInvIndex); // idb
void __thiscall InventoryWin::OnInvShiftRClickPrivateStoreMode(InventoryWin *this, unsigned int uiInvIndex); // idb
void __thiscall InventoryWin::OnInvLClickNormalMode(InventoryWin *this, unsigned int uiInvIndex); // idb
void __thiscall InventoryWin::OnInvShiftLClickNormalMode(InventoryWin *this, unsigned int uiInvIndex); // idb
void __thiscall InventoryWin::OnInvLClickShopMode(InventoryWin *this, unsigned int uiInvIndex); // idb
void __thiscall InventoryWin::OnInvShiftLClickShopMode(InventoryWin *this, unsigned int uiInvIndex); // idb
void __thiscall InventoryWin::OnInvShiftRClickShopMode(InventoryWin *this, unsigned int uiInvIndex); // idb
void __thiscall InventoryWin::OnInvRClickBankMode(InventoryWin *this, unsigned int uiInvIndex); // idb
void __thiscall InventoryWin::OnInvShiftLClickBankMode(InventoryWin *this, unsigned int uiInvIndex); // idb
void __thiscall InventoryWin::OnInvShiftRClickBankMode(InventoryWin *this, unsigned int uiInvIndex); // idb
void __thiscall InventoryWin::OnInvRClickGuildAcademyStorageMode(InventoryWin *this, unsigned int uiInvIndex); // idb
void __thiscall InventoryWin::OnInvShiftLClickGuildAcademyStorageMode(InventoryWin *this, unsigned int uiInvIndex); // idb
void __thiscall InventoryWin::OnInvShiftRClickGuildAcademyStorageMode(InventoryWin *this, unsigned int uiInvIndex); // idb
void __thiscall InventoryWin::UnEquip(InventoryWin *this, unsigned int uiInvIndex); // idb
void __thiscall InventoryWin::UseEquipedItem(InventoryWin *this, unsigned int uiInvIndex); // idb
void __thiscall InventoryWin::OnEquipRClick(InventoryWin *this, unsigned int uiInvIndex); // idb
bool __thiscall InventoryWin::DropOnInv(InventoryWin *this, DropContents *pkContents, unsigned int uiReceiverInvIndex); // idb
// void __userpurge InventoryWin::OnActivePage(InventoryWin *this@<ecx>, int a2@<edi>, unsigned int uiIndex);
void __thiscall InventoryWin::OnChargedItemPage(InventoryWin *this); // idb
void __thiscall InventoryWin::OnCompensationPage(InventoryWin *this); // idb
void __thiscall InventoryWin::RefreshCompensationInv(InventoryWin *this); // idb
void __thiscall InventoryWin::UpdateInventory(InventoryWin *this); // idb
void __thiscall InventoryWin::OnInvRClickGttStoreMode(InventoryWin *this, unsigned int uiInvIndex); // idb
void __thiscall InventoryWin::OnInvShiftLClickGttStoreMode(InventoryWin *this, unsigned int uiInvIndex); // idb
void __thiscall InventoryWin::SetAutoPickCheck(InventoryWin *this, const bool bCheck, const bool bSysMsg); // idb
void __thiscall InventoryWin::OnAutoPickShow(InventoryWin *this); // idb
void __thiscall InventoryWin::OnAutoPickCheck(InventoryWin *this); // idb
void __thiscall InventoryWin::OnAutoUseShow(InventoryWin *this); // idb
void __thiscall InventoryWin::OnOffEquipWin(InventoryWin *this); // idb
void __thiscall InventoryWin::ItemChatLink(InventoryWin *this, unsigned int uiLClickType, unsigned int uiInvIndex); // idb
void __thiscall InvWin::SetLock(InvWin *this, bool bLock); // idb
void __thiscall CompensationInvWin::OnCommand(CompensationInvWin *this, unsigned int wParam, int lParam); // idb
void __thiscall InventoryWin::OnEquipLClick(InventoryWin *this, unsigned int uiInvIndex); // idb
void __thiscall InventoryWin::LockAllItem(InventoryWin *this); // idb
void __thiscall InventoryWin::UnLockAllItem(InventoryWin *this); // idb
void __thiscall InventoryWin::LockAllEquipItem(InventoryWin *this); // idb
void __thiscall InventoryWin::UnLockAllEquipItem(InventoryWin *this); // idb
void __thiscall InventoryWin::OnCreateNewSocket(InventoryWin *this, bool bSucss); // idb
InvWin *__cdecl InvWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent); // idb
InvTabButWin *__cdecl InvTabButWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg); // idb
ChargedItemIcon *__cdecl ChargedItemIcon::CreateWin(int iXPos, int iYPos, PgWin *pkParent); // idb
ChargedItemInvenWin *__cdecl ChargedItemInvenWin::CreateWin(); // idb
char __thiscall ChargedItemInvenWin::Create(ChargedItemInvenWin *this);
CompensationItemIcon *__cdecl CompensationItemIcon::CreateWin(int iXPos, int iYPos, PgWin *pkParent); // idb
CompensationInvWin *__cdecl CompensationInvWin::CreateWin(); // idb
char __thiscall CompensationInvWin::Create(CompensationInvWin *this);
InventoryWin *__cdecl InventoryWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall InventoryWin::Create(InventoryWin *this, PgFrameWork *pkFrameWork);
void __thiscall InventoryWin::DirectMessage(InventoryWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
// void __usercall InventoryWin::OnClose(InventoryWin *this@<ecx>, int a2@<edi>);
void __thiscall InventoryWin::UpdateBlinkEffect(InventoryWin *this); // idb
void __thiscall InventoryWin::UpdateMeWin(InventoryWin *this, float fCurTime); // idb
void __thiscall InventoryWin::GetItem(InventoryWin *this, std::vector<unsigned int,std::allocator<unsigned int> > *lstItem, unsigned __int16 ItemID); // idb
unsigned int __thiscall InventoryWin::GetTotalItemCount(InventoryWin *this, unsigned __int16 ItemID); // idb
char __thiscall InvWin::Create(InvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent);
void __thiscall ChargedItemInvenWin::OnInvRClick(ChargedItemInvenWin *this, unsigned int uiInvIndex); // idb
void __thiscall InventoryWin::OnInvLClick(InventoryWin *this, unsigned int uiInvIndex); // idb
// void __userpurge InventoryWin::OnInvRClickNormalMode(InventoryWin *this@<ecx>, double a2@<st0>, unsigned int uiInvIndex);
void __thiscall InventoryWin::OnInvShiftRClickNormalMode(InventoryWin *this, unsigned int uiInvIndex); // idb
bool __thiscall InventoryWin::DropOnEquip(InventoryWin *this, DropContents *pkContents, unsigned int uiReceiverInvIndex); // idb
bool __thiscall InvWin::EatDropInstance(InvWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos); // idb
void __thiscall ChargedItemInvenWin::OnCommand(ChargedItemInvenWin *this, unsigned int wParam, int lParam); // idb
void __thiscall InventoryWin::OnInvRClick(InventoryWin *this, unsigned int uiInvIndex, unsigned int uiUser); // idb
signed int __thiscall InventoryWin::FindItem(InventoryWin *this, char *ItemName);
signed int __thiscall InventoryWin::FindEquipItem(InventoryWin *this, const char *pcItemIdx);
signed int __stdcall InventoryWin::FindItemID(char *ItemName);
// void __userpurge InventoryWin::OnCommand(InventoryWin *this@<ecx>, int a2@<edi>, double a3@<st0>, unsigned int wParam, int lParam);
void __thiscall ChatColorSpinWin::SetChatColorInfo(ChatColorSpinWin *this, ChatColorInfo kChatColorInfo); // idb
ItemViewInfo *__cdecl IIDTableBase<ItemViewInfo,ItemViewInfoTab,unsigned short>::GetByID(int uiId);
unsigned __int16 __thiscall CQuestData::GetNumOfQuestData(CQuestData *this); // idb
NiRTTI *InvWin::GetRTTI();
InvTabButWin *__thiscall InvTabButWin::`vector deleting destructor'(InvTabButWin *this, unsigned int a2);
ChargedItemIcon *__thiscall ChargedItemIcon::`scalar deleting destructor'(ChargedItemIcon *this, unsigned int a2);
ChargedItemInvenWin *__thiscall ChargedItemInvenWin::`vector deleting destructor'(ChargedItemInvenWin *this, unsigned int a2);
CompensationInvWin *__thiscall CompensationInvWin::`scalar deleting destructor'(CompensationInvWin *this, unsigned int a2);
unsigned int __cdecl ITableBase<ItemShopView,ItemShopViewTable>::GetTotal(); // idb
ItemShopView *__cdecl ItemShopViewTable::GetByShopID(unsigned int dwShopID); // idb
InvWin *__thiscall InvWin::`scalar deleting destructor'(InvWin *this, unsigned int a2);
CompensationItemIcon *__thiscall CompensationItemIcon::`scalar deleting destructor'(CompensationItemIcon *this, unsigned int a2);
InventoryWin *__thiscall InventoryWin::`vector deleting destructor'(InventoryWin *this, unsigned int a2);
ChargedItemUseTask *__thiscall ChargedItemUseTask::`vector deleting destructor'(ChargedItemUseTask *this, unsigned int a2);
void __thiscall ItemInfoWin::~ItemInfoWin(ItemInfoWin *this); // idb
// long double __usercall difftime_0@<edx:eax>(int _Time1@<ecx>, int _Time2@<eax>); idb
// int __usercall mktime_1@<eax>(tm *_Tm@<eax>); idb
void __thiscall ItemInfoWin::HideAllMoneyWin(ItemInfoWin *this); // idb
BOOL __thiscall ItemInfoWin::IsMoneyShow(ItemInfoWin *this);
BOOL __thiscall ItemInfoWin::IsTotalMoneyShow(ItemInfoWin *this);
int __thiscall ItemInfoWin::GetMoneyWinWidth(ItemInfoWin *this);
int __thiscall ItemInfoWin::GetTotalMoneyWinWidth(ItemInfoWin *this);
void __thiscall ItemInfoWin::InitTimeLimitUpdateTime(ItemInfoWin *this); // idb
void __thiscall ItemInfoWin::ReduceTimeLimitUpdateTime(ItemInfoWin *this); // idb
void __stdcall ItemInfoWin::OnCommand(unsigned int wParam, int lParam);
void __thiscall ItemInfoWin::SetCloseButtonPos(ItemInfoWin *this); // idb
void __thiscall ItemInfoWin::ShowMoneyWin(ItemInfoWin *this, int iXPos, int iYPos, __int64 i64Money); // idb
void __thiscall ItemInfoWin::ShowPrivateStoreMoneyWin(ItemInfoWin *this, int iXPos, int iYPos, __int64 i64Money, bool bBuyItem); // idb
void __thiscall ItemInfoWin::ShowTotalMoneyWin(ItemInfoWin *this, int iXPos, int iYPos, __int64 i64Money, bool bBuyItem); // idb
void __thiscall ItemInfoWin::AdjustSizeIfIamToolTipWin(ItemInfoWin *this); // idb
void __thiscall ItemInfoWin::SetTextBeginNewLine(ItemInfoWin *this, const char *pkTextData, int *nIndex, D3DXCOLOR *kColor); // idb
void __thiscall ItemInfoWin::SetItemToolTip(ItemInfoWin *this, char *pText); // idb
char __thiscall ItemInfoWin::Create(ItemInfoWin *this, NiSourceTexture *pkTexture, unsigned int uiEdgeWidth, unsigned int uiEdgeHeight);
char __thiscall ItemInfoWin::CreateCloseButton(ItemInfoWin *this);
void __thiscall ItemInfoWin::SetItemExpInfo(ItemInfoWin *this, __int64 i64Exp); // idb
void __thiscall ItemInfoWin::SetItemMoneyInfo(ItemInfoWin *this, __int64 i64Money); // idb
void __thiscall ItemInfoWin::SetItemFameInfo(ItemInfoWin *this, unsigned int iFameVal); // idb
// void __userpurge ItemInfoWin::InsertWeaponTitleContents(ItemInfoWin *this@<ecx>, int a2@<edi>, Item *pkItem, int *iIndex);
char *__cdecl GetLastCoolTimeStr(int iTime); // idb
int __thiscall ItemInfoWin::DisplayItemDurationBackupTime(ItemInfoWin *this, int iIndex); // idb
int __thiscall ItemInfoWin::DisplayItemDurationDirectTime(ItemInfoWin *this, int iIndex, ShineDateTime kDelTime); // idb
void __thiscall ItemInfoWin::InsertItemEffectContents(ItemInfoWin *this, ItemInfo *pkInfo, int *iIndex); // idb
void __thiscall ItemInfoWin::InsertRequireWeponContents(ItemInfoWin *this, ItemInfo *pkItemInfo, int *iIndex); // idb
void __thiscall ItemInfoWin::InsertSocketInfoContents(ItemInfoWin *this, Item *pkItem, int *iIndex); // idb
// void __userpurge ItemInfoWin::ShowItemMoneyWin(ItemInfoWin *this@<ecx>, int a2@<ebx>, int a3@<edi>, int iXPos, int iYPos, int iLot, ItemViewInfo *pkViewInfo, ItemMoney *pkItemMoney, bool bBuyPossible);
void __thiscall ItemInfoWin::ShowTotalItemMoneyWin(ItemInfoWin *this, int iXPos, int iYPos, int iLot, ItemViewInfo *pkViewInfo, ItemMoney *pkItemMoney, bool bBuyPossible); // idb
void __thiscall ItemInfoWin::InsertRandomOptCntContents(ItemInfoWin *this, Item *pkItem, int *iIndex); // idb
void __thiscall ItemInfoWin::InsertRequireShieldContents(ItemInfoWin *this, ItemInfo *pkItemInfo, int *iIndex); // idb
void __thiscall ItemInfoWin::InsertMoverUpgradeContents(ItemInfoWin *this, ItemInfo *pkItemInfo, char nGrade, int *iIndex); // idb
void __thiscall ItemInfoWin::ItemInfoWin(ItemInfoWin *this); // idb
ItemInfoWin *__cdecl ItemInfoWin::CreateWin(NiSourceTexture *pkTexture, unsigned int uiEdgeHeight, unsigned int uiEdgeWidth); // idb
void __thiscall ItemInfoWin::InsertSetItemContents(ItemInfoWin *this, ItemInfo *pkInfo, int *iIndex); // idb
void __thiscall ItemInfoWin::InsertItemMixContents(ItemInfoWin *this, Item *pkItem, int *iIndex); // idb
void __thiscall ItemInfoWin::InsertNameContents(ItemInfoWin *this, ItemInfoWin::sNameContentsParameter *Parameter, int *iIndex); // idb
void __thiscall ItemInfoWin::InsertMoneyContents(ItemInfoWin *this, ItemInfo *pkInfo, int iLot, __int64 i64Money, int *iIndex, ItemInfoWin::eSellState eState); // idb
void __thiscall ItemInfoWin::InsertProductContents(ItemInfoWin *this, Item *pkItem, int *iIndex); // idb
void __thiscall ItemInfoWin::InsertMaterialContents(ItemInfoWin *this, Item *pkItem, int *iIndex); // idb
// void __userpurge ItemInfoWin::InsertDescriptContents(ItemInfoWin *this@<ecx>, int a2@<edi>, ItemViewInfo *pkViewInfo, char nGrade, Item *pkItem, int *iIndex, int iLot);
// void __userpurge ItemInfoWin::SetBasicItemInfo(ItemInfoWin *this@<ecx>, int a2@<edi>, int iItemID, int iItemUpgrade, int iLot, int *rkIndex, Item *pkItem);
void __thiscall ItemInfoWin::SetItemInfo(ItemInfoWin *this, Item *pkItem); // idb
void __thiscall ItemInfoWin::SetRepurchaseInfo(ItemInfoWin *this, Item *pkItem); // idb
// void __userpurge ItemInfoWin::SetNPCItemSellInfo(ItemInfoWin *this@<ecx>, int a2@<ebx>, int a3@<esi>, int iItemID, int iItemUpgrade, int iLot, int *rkIndex, __int64 i64Money);
// void __userpurge ItemInfoWin::SetPrivateStoreItemInfo(ItemInfoWin *this@<ecx>, int a2@<edi>, int iItemID, int iItemUpgrade, int iLot, int *rkIndex, __int64 i64Money, Item *pkItem, bool bSellMode);
void __thiscall ItemInfoWin::SetBuyInfo(ItemInfoWin *this, PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *pkSellInfo); // idb
void __thiscall ItemInfoWin::SetPrivateStoreSellInfo(ItemInfoWin *this, Item *pkItem, __int64 i64SellMoney, bool bMyInven); // idb
void __thiscall ItemInfoWin::SetPrivateStoreBuyInfo(ItemInfoWin *this, Item *pkItem, __int64 i64SellMoney, unsigned int uiLot, bool bMyInven); // idb
void __thiscall ItemInfoWin::SetSellInfo(ItemInfoWin *this, Item *pkItem, bool bMyInven); // idb
UpGradeInfo *__cdecl IIDTableBase<UpGradeInfo,UpGradeInfoTab,unsigned short>::GetByID(int uiId);
BRAccUpgradeInfo *__cdecl IIDTableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab,unsigned short>::GetByID(int uiId);
unsigned int __cdecl ITableBase<ItemMoney,ItemMoneyTab>::GetTotal(); // idb
unsigned int __cdecl ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::GetTotal(); // idb
unsigned int __cdecl ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::GetTotal(); // idb
ItemInfoWin *__thiscall ItemInfoWin::`scalar deleting destructor'(ItemInfoWin *this, unsigned int a2);
unsigned int __cdecl ITableBase<ItemInfo,ItemInfoTab>::GetTotal(); // idb
unsigned int __cdecl ITableBase<GradeItemOption,GradeItemOptionTab>::GetTotal(); // idb
unsigned int __cdecl ITableBase<MiniHouse,MiniHouseTable>::GetTotal(); // idb
unsigned int __cdecl ITableBase<ProduceInfo,ProduceInfoTable>::GetTotal(); // idb
unsigned int __cdecl ITableBase<ProduceViewInfo,ProduceViewInfoTable>::GetTotal(); // idb
unsigned int __cdecl ITableBase<SetItemName,SetItemNameTab>::GetTotal(); // idb
char *__cdecl WeaponTitleTab::GetWeaponTitleString(unsigned __int16 MobID, unsigned int MobKillCount, unsigned __int16 wepID); // idb
GradeItemOption *__cdecl GradeItemOptionTab::GetByInxName(char *pcInxName); // idb
MiniHouse *__cdecl MiniHouseTable::GetByInxName(char *pcInxName); // idb
ProduceInfo *__cdecl ProduceInfoTable::GetByID(unsigned __int16 kSkillID); // idb
ProduceInfo *__cdecl ProduceInfoTable::GetByNeedMasteryGain(char *pcName); // idb
ProduceViewInfo *__cdecl ProduceViewInfoTable::GetByMasteryType(TotalMasteryType eType); // idb
SetItemName *__cdecl SetItemNameTab::GetByInxName(char *pcInxName); // idb
unsigned int __cdecl SetEffectTab::GetTotal(); // idb
ItemMoney *__cdecl ItemMoneyTab::GetByInxName(char *pcInxName); // idb
AbnormalStateViewInfo *__cdecl AbnormalStateViewInfoTab::GetByInxName(char *pcInxName); // idb
ActiveSkillViewInfo *__cdecl ActSkillViewInfoTab::GetByInxName(char *pcInxName); // idb
ProduceInfo *__cdecl ProduceInfoTable::GetByProduct(std::basic_string<char,std::char_traits<char>,std::allocator<char> > Product); // idb
MoverItem *__cdecl MoverItemTab::GetByItemIdx(const char *pcItemIdx); // idb
PupMain *__cdecl PetMainTab::GetByItemIdx(const char *pcItemIdx); // idb
void __thiscall ItemMallMenuWin::ItemMallMenuWin(ItemMallMenuWin *this); // idb
void __thiscall ItemMallMenuWin::~ItemMallMenuWin(ItemMallMenuWin *this); // idb
void __thiscall ItemMallMenuWin::OnCmdOpenItemMall(ItemMallMenuWin *this); // idb
void __thiscall ItemMallMenuWin::OnCmdOpenUsingChargedItemList(ItemMallMenuWin *this); // idb
void ItemMallMenuWin::OnHelpLink();
void __thiscall ItemMallMenuWin::OnCommand(ItemMallMenuWin *this, unsigned int wParam, int lParam); // idb
char __thiscall ItemMallMenuWin::Create(ItemMallMenuWin *this, PgFrameWork *pkFrameWork);
ItemMallMenuWin *__cdecl ItemMallMenuWin::CreateWin(PgFrameWork *pkFrameWork); // idb
ItemMallMenuWin *__thiscall ItemMallMenuWin::`scalar deleting destructor'(ItemMallMenuWin *this, unsigned int a2);
// void __usercall ShopInvWin::ShopInvWin(ShopInvWin *this@<ecx>, int a2@<ebx>, int a3@<edi>);
void __thiscall ShopInvWin::~ShopInvWin(ShopInvWin *this); // idb
void ItemShopWin::OnHelpLink();
unsigned int __thiscall ItemShopWin::GetSellItemNum(ItemShopWin *this); // idb
unsigned int __thiscall ItemShopWin::GetMaxPageNum(ItemShopWin *this); // idb
ShopInvWin *__thiscall ItemShopWin::GetInvWin(ItemShopWin *this, unsigned int uiIndex); // idb
void __thiscall ItemShopWin::DeleteRepurchaseInv(ItemShopWin *this, unsigned __int16 nHandle); // idb
void __thiscall ItemShopWin::AddRepurchaseInv(ItemShopWin *this, PROTO_NC_ITEM_SELL_ITEM_INSERT_CMD *pkRepurItem); // idb
// void __userpurge ShopInvWin::SetItem(ShopInvWin *this@<ecx>, int a2@<ebx>, PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *pkInfo);
void __thiscall ItemShopWin::ItemShopWin(ItemShopWin *this); // idb
void __thiscall ItemShopWin::~ItemShopWin(ItemShopWin *this); // idb
void __thiscall ItemShopWin::OnCancel(ItemShopWin *this); // idb
void __thiscall ItemShopWin::UpdatePageInfo(ItemShopWin *this); // idb
void __thiscall ItemShopWin::OnInvRClick(ItemShopWin *this, unsigned int uiInvIndex); // idb
void __thiscall ItemShopWin::ResetContents(ItemShopWin *this); // idb
void __thiscall ItemShopWin::OnShowWin(ItemShopWin *this); // idb
void __thiscall ItemShopWin::OnSetPage(ItemShopWin *this, unsigned int uiPage); // idb
void __thiscall ItemShopWin::ResetPage(ItemShopWin *this); // idb
void __thiscall ItemShopWin::OnWeapon(ItemShopWin *this); // idb
void __thiscall ItemShopWin::OnArmor(ItemShopWin *this); // idb
void __thiscall ItemShopWin::OnAcc(ItemShopWin *this); // idb
void __thiscall ItemShopWin::OnRepurchase(ItemShopWin *this); // idb
void __thiscall ItemShopWin::OnPrevPage(ItemShopWin *this); // idb
void __thiscall ItemShopWin::OnNextPage(ItemShopWin *this); // idb
void __thiscall ItemShopWin::OnCommand(ItemShopWin *this, unsigned int wParam, int lParam); // idb
// ShopInvWin *__usercall ShopInvWin::CreateWin@<eax>(int a1@<ebx>, int a2@<edi>, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent);
ItemShopWin *__cdecl ItemShopWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall ItemShopWin::Create(ItemShopWin *this, PgFrameWork *pkFrameWork);
ShopInvWin *__thiscall ShopInvWin::`scalar deleting destructor'(ShopInvWin *this, unsigned int a2);
ItemShopWin *__thiscall ItemShopWin::`scalar deleting destructor'(ItemShopWin *this, unsigned int a2);
void __thiscall ItemTradeWin::ItemTradeWin(ItemTradeWin *this); // idb
void __thiscall ItemTradeWin::~ItemTradeWin(ItemTradeWin *this); // idb
void __thiscall ItemTradeWin::OnCmdCancel(ItemTradeWin *this); // idb
void __thiscall ItemTradeWin::GetValueFromEdit(ItemTradeWin *this); // idb
void __thiscall ItemTradeWin::SetValueToEdit(ItemTradeWin *this); // idb
void __thiscall ItemTradeWin::SetValueToEdit(ItemTradeWin *this, unsigned int num); // idb
// void __userpurge ItemTradeWin::UpdateMeWin(ItemTradeWin *this@<ecx>, int a2@<ebx>, int a3@<edi>, float fCurTime);
void __thiscall ItemTradeWin::Open(ItemTradeWin *this, PgWin *pkRevWin, unsigned int uiOkMsg, ItemInfo *pkItemInfo, char *pcText); // idb
void __thiscall ItemTradeWin::OnClose(ItemTradeWin *this); // idb
void __thiscall ItemTradeWin::Open(ItemTradeWin *this, PgWin *pkRevWin, unsigned int uiOkMsg, Item *pkItem, char *pcText); // idb
char __thiscall ItemTradeWin::Create(ItemTradeWin *this, PgFrameWork *pkFrameWork);
void __thiscall ItemTradeWin::OnCmdOk(ItemTradeWin *this); // idb
void __thiscall ItemTradeWin::OnEditEnd(ItemTradeWin *this, unsigned int wParam, int lParam); // idb
void __thiscall ItemTradeWin::OnCommand(ItemTradeWin *this, unsigned int wParam, int lParam); // idb
ItemTradeWin *__cdecl ItemTradeWin::CreateWin(PgFrameWork *pkFrameWork); // idb
ItemTradeWin *__thiscall ItemTradeWin::`vector deleting destructor'(ItemTradeWin *this, unsigned int a2);
BOOL __thiscall ItemUpgradeWin::IsUpgradeSlotItem(ItemUpgradeWin *this);
void __thiscall ForgeSlotInvWin::ForgeSlotInvWin(ForgeSlotInvWin *this); // idb
void __thiscall ForgeSlotInvWin::~ForgeSlotInvWin(ForgeSlotInvWin *this); // idb
char __thiscall ForgeSlotInvWin::Create(ForgeSlotInvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork);
void __thiscall ForgeSlotInvWin::SetSlotType(ForgeSlotInvWin *this, unsigned int uiInvType); // idb
unsigned int __thiscall ForgeSlotInvWin::GetSlotType(ForgeSlotInvWin *this); // idb
ForgeSlotInvWin *__thiscall ItemUpgradeWin::GetInsertedOldSlot(ItemUpgradeWin *this, unsigned int _uiSlotNum); // idb
void __thiscall ItemUpgradeWin::StopSlotRotate(ItemUpgradeWin *this); // idb
bool __thiscall ItemUpgradeWin::IsUpgradingitem(ItemUpgradeWin *this); // idb
int __thiscall ItemUpgradeWin::GetUpgradeSlotItemClass(ItemUpgradeWin *this); // idb
void ItemUpgradeWin::OnHelpLink();
void __thiscall ItemUpgradeWin::EnableSprSlot(ItemUpgradeWin *this, unsigned int uiSlotNum); // idb
void __thiscall ItemUpgradeMsgWin::ItemUpgradeMsgWin(ItemUpgradeMsgWin *this); // idb
void __thiscall ItemUpgradeMsgWin::~ItemUpgradeMsgWin(ItemUpgradeMsgWin *this); // idb
void __thiscall ItemUpgradeMsgWin::OnClose(ItemUpgradeMsgWin *this); // idb
void __thiscall ForgeSlotInvWin::OnFirstHitWin(ForgeSlotInvWin *this); // idb
char __thiscall ForgeSlotInvWin::SetSenderInvSlotLock(ForgeSlotInvWin *this, bool _bLock);
void __thiscall ItemUpgradeWin::~ItemUpgradeWin(ItemUpgradeWin *this); // idb
void __thiscall ItemUpgradeWin::ProcessMeInput(ItemUpgradeWin *this, bool *bHit); // idb
void __thiscall ItemUpgradeWin::OnCancel(ItemUpgradeWin *this); // idb
void __thiscall ItemUpgradeWin::UpGradeResult(ItemUpgradeWin *this, unsigned int dwUpgradeResult); // idb
void __thiscall ItemUpgradeWin::StartResultEffect(ItemUpgradeWin *this, NiAVObject *_pEffect); // idb
bool __thiscall ItemUpgradeWin::IsSameGrade(ItemUpgradeWin *this, Item *pkUpSource); // idb
char __thiscall ItemUpgradeWin::IsBraceletUpsourceItem(ItemUpgradeWin *this, Item *pkUpSource);
char *__thiscall ItemUpgradeWin::GetBraceletUpsourceName(ItemUpgradeWin *this); // idb
char *__thiscall ItemUpgradeWin::GetUpgradeSlotItemName(ItemUpgradeWin *this); // idb
void __thiscall ForgeSlotInvWin::DoAction(ForgeSlotInvWin *this); // idb
void __thiscall ForgeSlotInvWin::DoRAction(ForgeSlotInvWin *this); // idb
void __thiscall ForgeSlotInvWin::ReSetSlot(ForgeSlotInvWin *this); // idb
char __thiscall ItemUpgradeWin::DropForgeSlot(ItemUpgradeWin *this, unsigned int uiReceiverInvIndex, PgWinDrop *pkDrop);
void __thiscall ItemUpgradeWin::ResetAllData(ItemUpgradeWin *this); // idb
void __thiscall ItemUpgradeWin::StartSlotRotate(ItemUpgradeWin *this); // idb
void __thiscall ItemUpgradeWin::AssistItemShow(ItemUpgradeWin *this); // idb
char __thiscall ItemUpgradeMsgWin::Create(ItemUpgradeMsgWin *this, PgFrameWork *pkFrameWork);
void __thiscall ItemUpgradeMsgWin::OnShowWin(ItemUpgradeMsgWin *this); // idb
void __thiscall ForgeSlotInvWin::ReSetInitSlot(ForgeSlotInvWin *this); // idb
void __thiscall ItemUpgradeWin::DirectMessage(ItemUpgradeWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall ItemUpgradeWin::StartUpgrade(ItemUpgradeWin *this); // idb
void __thiscall ItemUpgradeWin::ResetAllDataWithoutItem(ItemUpgradeWin *this); // idb
void __thiscall ItemUpgradeWin::EndSlotRotate(ItemUpgradeWin *this); // idb
void __thiscall ItemUpgradeWin::UpdateSlotRotate(ItemUpgradeWin *this, float fCurTime); // idb
void __thiscall ItemUpgradeWin::ChangeUpgradeWin(ItemUpgradeWin *this, bool bNormalWin, int iUpgradeType); // idb
void __thiscall ItemUpgradeMsgWin::OnApply(ItemUpgradeMsgWin *this); // idb
char __thiscall ForgeSlotInvWin::EatDropInstance(ForgeSlotInvWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
void __thiscall ItemUpgradeWin::UpdateMeWin(ItemUpgradeWin *this, float fCurTime); // idb
void __thiscall ItemUpgradeWin::OnApply(ItemUpgradeWin *this); // idb
void __thiscall ItemUpgradeWin::OnSlotLClick(ItemUpgradeWin *this, unsigned int _uiSlotIndex); // idb
void __thiscall ItemUpgradeWin::OnCommand(ItemUpgradeWin *this, unsigned int wParam, int lParam); // idb
void __thiscall ItemUpgradeWin::OnClose(ItemUpgradeWin *this); // idb
void __thiscall ItemUpgradeMsgWin::OnCommand(ItemUpgradeMsgWin *this, unsigned int wParam, int lParam); // idb
ForgeSlotInvWin *__cdecl ForgeSlotInvWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork); // idb
ItemUpgradeMsgWin *__cdecl ItemUpgradeMsgWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall ItemUpgradeWin::Create(ItemUpgradeWin *this, PgFrameWork *pkFrameWork);
void __thiscall ItemUpgradeWin::ItemUpgradeWin(ItemUpgradeWin *this); // idb
ItemUpgradeWin *__cdecl ItemUpgradeWin::CreateWin(PgFrameWork *pkFrameWork); // idb
ForgeSlotInvWin *__thiscall ForgeSlotInvWin::`scalar deleting destructor'(ForgeSlotInvWin *this, unsigned int a2);
ItemUpgradeMsgWin *__thiscall ItemUpgradeMsgWin::`vector deleting destructor'(ItemUpgradeMsgWin *this, unsigned int a2);
ItemUpgradeWin *__thiscall ItemUpgradeWin::`vector deleting destructor'(ItemUpgradeWin *this, unsigned int a2);
void __thiscall KeyRemappingBut::KeyRemappingBut(KeyRemappingBut *this); // idb
void __thiscall KeyRemappingBut::~KeyRemappingBut(KeyRemappingBut *this); // idb
void __thiscall KeyRemappingWin::OnReset(KeyRemappingWin *this); // idb
signed int __stdcall KeyRemappingWin::ConvertKeyCode(char keyValue);
signed int __stdcall KeyRemappingWin::ConvertKeyCodeModifier(char keyModifier);
int __thiscall KeyRemappingWin::GetKeyIndexByName(KeyRemappingWin *this, char *pcBtnName); // idb
void KeyRemappingWin::OnHelpLink();
char __stdcall KeyRemappingWin::SaveDefalultKeyRemapping(bool bDefault);
char __thiscall KeyRemappingWin::UpdateDynamicStrings(KeyRemappingWin *this, float fTime);
char __thiscall KeyRemappingBut::Create(KeyRemappingBut *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, char *pcName, unsigned int uiExtStyle, unsigned int uiInvIndex);
void __thiscall KeyRemappingBut::DoAction(KeyRemappingBut *this); // idb
bool __thiscall KeyRemappingWin::KeyMappingInfo(KeyRemappingWin *this, unsigned int uiKeyMappingIndex, unsigned int *uiMsg, char *keyName); // idb
char *__stdcall KeyRemappingWin::GetKeyString(char uiKeyValue, char uiModifier);
void __thiscall KeyRemappingWin::SetUIPageInfo(KeyRemappingWin *this); // idb
void __thiscall KeyRemappingWin::SetKeyName(KeyRemappingWin *this); // idb
void __thiscall KeyRemappingWin::ReflashContents(KeyRemappingWin *this); // idb
void __thiscall KeyRemappingWin::UpdateMeWin(KeyRemappingWin *this, float fCurTime); // idb
void __thiscall KeyRemappingWin::AddInfo(KeyRemappingWin *this, unsigned int uiTotalNum, unsigned int uiOffset); // idb
void __thiscall KeyRemappingWin::OnKeyRemapping(KeyRemappingWin *this, unsigned int uiNum); // idb
void __thiscall KeyRemappingWin::OnMainMenu(KeyRemappingWin *this); // idb
void __thiscall KeyRemappingWin::OnGame(KeyRemappingWin *this); // idb
void __thiscall KeyRemappingWin::OnShortCut(KeyRemappingWin *this); // idb
void __thiscall KeyRemappingWin::OnPrevPage(KeyRemappingWin *this); // idb
void __thiscall KeyRemappingWin::OnNextPage(KeyRemappingWin *this); // idb
void __thiscall KeyRemappingWin::SetKeyRemapping(KeyRemappingWin *this, bool bKeyboard, NiInputMouse::Button mouseKeyCode, NiInputKeyboard::KeyCode keyCode, unsigned int msg, unsigned int modifier); // idb
void __thiscall KeyRemappingWin::SetFromKeyMsgToGameMsg(KeyRemappingWin *this); // idb
void __thiscall KeyRemappingWin::SetSyncFromOpt(KeyRemappingWin *this, bool bOverWrite); // idb
void __thiscall KeyRemappingWin::SetSyncToOpt(KeyRemappingWin *this); // idb
KeyRemappingBut *__cdecl KeyRemappingBut::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, char *pcName, unsigned int uiExtStyle, unsigned int uiInvIndex); // idb
void __thiscall KeyRemappingWin::KeyRemappingWin(KeyRemappingWin *this); // idb
void __thiscall KeyRemappingWin::~KeyRemappingWin(KeyRemappingWin *this); // idb
KeyRemappingWin *__cdecl KeyRemappingWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall KeyRemappingWin::OnCancel(KeyRemappingWin *this); // idb
char __thiscall KeyRemappingWin::LoadDefalultKeyRemapping(KeyRemappingWin *this, bool bDefault);
char __thiscall KeyRemappingWin::Create(KeyRemappingWin *this, PgFrameWork *pkFrameWork);
void __thiscall KeyRemappingWin::OnClose(KeyRemappingWin *this); // idb
void __thiscall KeyRemappingWin::SaveKeyMapping(KeyRemappingWin *this); // idb
void __thiscall KeyRemappingWin::OnCommand(KeyRemappingWin *this, unsigned int wParam, int lParam); // idb
KeyRemappingBut *__thiscall KeyRemappingBut::`scalar deleting destructor'(KeyRemappingBut *this, unsigned int a2);
void __thiscall KeyMap::Remove(KeyMap *this, unsigned int uiMsg); // idb
void __thiscall std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~list<ItemViewDummy *,std::allocator<ItemViewDummy *>>(std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *this); // idb
KeyRemappingWin *__thiscall KeyRemappingWin::`vector deleting destructor'(KeyRemappingWin *this, unsigned int a2);
void __thiscall KQScoreWin::~KQScoreWin(KQScoreWin *this); // idb
char __thiscall KQScoreWin::Create(KQScoreWin *this, PgFrameWork *pkFrameWork);
void __thiscall KQScoreWin::SetScore(KQScoreWin *this, unsigned int uiTeam, unsigned int uiScore); // idb
void __thiscall KQScoreWin::ResetScore(KQScoreWin *this); // idb
void __thiscall KQScoreWin::KQScoreWin(KQScoreWin *this); // idb
KQScoreWin *__cdecl KQScoreWin::CreateWin(PgFrameWork *pkFrameWork); // idb
KQScoreWin *__thiscall KQScoreWin::`vector deleting destructor'(KQScoreWin *this, unsigned int a2);
void __thiscall MainCharHPBarWin::MainCharHPBarWin(MainCharHPBarWin *this); // idb
void __thiscall MainCharHPBarWin::~MainCharHPBarWin(MainCharHPBarWin *this); // idb
void __thiscall MainCharHPBarWin::SetMoveStop(MainCharHPBarWin *this, bool b); // idb
char __thiscall MainCharHPBarWin::Create(MainCharHPBarWin *this);
// void __usercall MainCharHPBarWin::UpdatePosition(MainCharHPBarWin *this@<ecx>, int a2@<ebx>);
void __thiscall MainCharHPBarWin::UpdateMeWin(MainCharHPBarWin *this, float fCurTime); // idb
MainCharHPBarWin *__cdecl MainCharHPBarWin::CreateWin(); // idb
MainCharHPBarWin *__thiscall MainCharHPBarWin::`scalar deleting destructor'(MainCharHPBarWin *this, unsigned int a2);
void __thiscall MainMenuWin::OnCmdChar(MainMenuWin *this); // idb
void __thiscall MainMenuWin::OnCmdInven(MainMenuWin *this); // idb
void __thiscall MainMenuWin::OnCmdSkill(MainMenuWin *this); // idb
void __thiscall MainMenuWin::OnCmdAction(MainMenuWin *this); // idb
void __thiscall MainMenuWin::OnCmdQuest(MainMenuWin *this); // idb
void __thiscall MainMenuWin::OnCmdFriend(MainMenuWin *this); // idb
void __thiscall MainMenuWin::OnCmdMiniHouse(MainMenuWin *this); // idb
void __thiscall MainMenuWin::OnCmdForum(MainMenuWin *this); // idb
void __thiscall MainMenuWin::OnCmdItemMall(MainMenuWin *this); // idb
void __thiscall MainMenuWin::OnCmdSystem(MainMenuWin *this); // idb
void __thiscall MainMenuWin::OnCmdHelp(MainMenuWin *this); // idb
void __thiscall MainMenuWin::SetMainButToolTip(MainMenuWin *this, unsigned int uiMenu, char *pkStr); // idb
void __thiscall MainMenuWin::SetBlinkEffect(MainMenuWin *this, bool bActive, int iBlinkSlotType); // idb
void __thiscall MainMenuWin::ShowNewMark(MainMenuWin *this, int bShow);
void __thiscall MainMenuWin::~MainMenuWin(MainMenuWin *this); // idb
NiProperty *__cdecl GetMaterialProp(NiNode *pkMtrlNode, char *pcName);
void __thiscall MainMenuWin::ChangeMenuTab(MainMenuWin *this); // idb
void __thiscall MainMenuWin::ProcessMeInput(MainMenuWin *this, bool *bHit); // idb
void __thiscall MainMenuWin::StartParticle(MainMenuWin *this, int iIndex); // idb
// void __usercall MainMenuWin::UpdateBlinkEffect(MainMenuWin *this@<ecx>, double a2@<st0>);
char __thiscall MainMenuWin::Create(MainMenuWin *this, PgFrameWork *pkFrameWork);
void __thiscall MainMenuWin::OnCommand(MainMenuWin *this, unsigned int wParam, int lParam); // idb
// void __userpurge MainMenuWin::UpdateMeWin(MainMenuWin *this@<ecx>, double a2@<st0>, float fCurTime);
void __thiscall MainMenuWin::MainMenuWin(MainMenuWin *this); // idb
NiNode *__cdecl CloneWithSpecifiedMaterial(NiNode *pkSrc, NiNode *pkMtrlNode, char *pcMtrlNodeName); // idb
MainMenuWin *__cdecl MainMenuWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall MainMenuWin::_unnamed_type_m_kEffectManager_::~_unnamed_type_m_kEffectManager_($F4A442FC7A9F530D11367FFDD3A3808C *this); // idb
void __thiscall NiTimeController::SetAnimType(NiTimeController *this, NiTimeController::AnimType eType); // idb
MainMenuWin *__thiscall MainMenuWin::`vector deleting destructor'(MainMenuWin *this, unsigned int a2);
void __thiscall MainMenuWin::_unnamed_type_m_kEffectManager_::_unnamed_type_m_kEffectManager_($F4A442FC7A9F530D11367FFDD3A3808C *this); // idb
void __thiscall KarisForgeSlotInvWin::KarisForgeSlotInvWin(KarisForgeSlotInvWin *this); // idb
void __thiscall KarisForgeSlotInvWin::~KarisForgeSlotInvWin(KarisForgeSlotInvWin *this); // idb
char __thiscall KarisForgeSlotInvWin::Create(KarisForgeSlotInvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork);
void __thiscall MakeKarisWin::OnShowWin(MakeKarisWin *this); // idb
KarisForgeSlotInvWin *__thiscall MakeKarisWin::GetInsertedOldSlot(MakeKarisWin *this, unsigned int _uiSlotNum); // idb
void MakeKarisWin::OnHelpLink();
void __thiscall MakeKarisWin::EnableSprSlot(MakeKarisWin *this, unsigned int uiSlotNum); // idb
void __thiscall KarisForgeSlotInvWin::OnFirstHitWin(KarisForgeSlotInvWin *this); // idb
void __thiscall MakeKarisWin::MakeKarisWin(MakeKarisWin *this); // idb
void __thiscall MakeKarisWin::~MakeKarisWin(MakeKarisWin *this); // idb
void __thiscall MakeKarisWin::OnSlotLClick(MakeKarisWin *this, unsigned int _uiSlotIndex); // idb
void __thiscall MakeKarisWin::OnCancel(MakeKarisWin *this); // idb
void __thiscall MakeKarisWin::ClearSlot(MakeKarisWin *this); // idb
void __thiscall MakeKarisWin::StartEffect(MakeKarisWin *this, NiAVObject *_pEffect); // idb
void __thiscall MakeKarisWin::UpdateEffect(MakeKarisWin *this, float fTime); // idb
void __thiscall MakeKarisWin::ClearAll(MakeKarisWin *this); // idb
void __thiscall MakeKarisWin::SendPacket(MakeKarisWin *this); // idb
void __thiscall MakeKarisWin::OnClose(MakeKarisWin *this); // idb
void __thiscall MakeKarisWin::_ProcessMsg(MakeKarisWin *this, unsigned int Msg, unsigned int wParam, int lParam); // idb
void __thiscall KarisForgeSlotInvWin::DoAction(KarisForgeSlotInvWin *this); // idb
void __thiscall KarisForgeSlotInvWin::DoRAction(KarisForgeSlotInvWin *this); // idb
void __thiscall MakeKarisWin::UpdateMeWin(MakeKarisWin *this, float fCurTime); // idb
char __stdcall MakeKarisWin::CheckCanEnableUpgrade(KarisForgeSlotInvWin *pSlot);
char __thiscall MakeKarisWin::DropForgeSlot(MakeKarisWin *this, unsigned int uiReceiverInvIndex, PgWinDrop *pkDrop);
void __thiscall MakeKarisWin::StartEffectt(MakeKarisWin *this); // idb
void __thiscall MakeKarisWin::OnStart(MakeKarisWin *this); // idb
char __thiscall KarisForgeSlotInvWin::EatDropInstance(KarisForgeSlotInvWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
void __thiscall MakeKarisWin::OnCommand(MakeKarisWin *this, unsigned int wParam, int lParam); // idb
KarisForgeSlotInvWin *__cdecl KarisForgeSlotInvWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork); // idb
MakeKarisWin *__cdecl MakeKarisWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall MakeKarisWin::Create(MakeKarisWin *this, PgFrameWork *pkFrameWork);
KarisForgeSlotInvWin *__thiscall KarisForgeSlotInvWin::`vector deleting destructor'(KarisForgeSlotInvWin *this, unsigned int a2);
ItemDismantle *__cdecl ItemDismantleTab::GetObjByGrade(char byGrade); // idb
MakeKarisWin *__thiscall MakeKarisWin::`vector deleting destructor'(MakeKarisWin *this, unsigned int a2);
void __thiscall MapLinkGateWin::OnWinClose(MapLinkGateWin *this); // idb
void __thiscall MapLinkGateWin::OnClose(MapLinkGateWin *this); // idb
void __thiscall MapLinkGateWin::NoLinkMapData(MapLinkGateWin *this, int nCurrentDataCnt); // idb
void __thiscall MapLinkGateWin::MapLinkGateWin(MapLinkGateWin *this); // idb
void __thiscall MapLinkGateWin::~MapLinkGateWin(MapLinkGateWin *this); // idb
void __thiscall MapLinkGateWin::UpdateMeWin(MapLinkGateWin *this, float fCurTime); // idb
void __thiscall MapLinkGateWin::ShowLinkGate(MapLinkGateWin *this); // idb
char __thiscall MapLinkGateWin::Create(MapLinkGateWin *this, PgFrameWork *pkFrameWork);
void __thiscall MapLinkGateWin::OnShowWin(MapLinkGateWin *this); // idb
bool __thiscall MapLinkGateWin::ChangePage(MapLinkGateWin *this, int nChangePage); // idb
void __thiscall MapLinkGateWin::OnCommand(MapLinkGateWin *this, unsigned int wParam, int lParam); // idb
MapLinkGateWin *__cdecl MapLinkGateWin::CreateWin(PgFrameWork *pkFrameWork); // idb
TownPortal *__cdecl ITableBase<TownPortal,TownPortalInfoTable>::GetByIndex(unsigned int uiIndex); // idb
unsigned int __cdecl ITableBase<TownPortal,TownPortalInfoTable>::GetTotal(); // idb
MapLinkGateWin *__thiscall MapLinkGateWin::`vector deleting destructor'(MapLinkGateWin *this, unsigned int a2);
BOOL __thiscall MarketSearchItem::IsAvailable(MarketSearchItem *this);
unsigned __int64 __thiscall MarketSearchItem::GetPrice(MarketSearchItem *this); // idb
unsigned int __thiscall MarketSearchItem::GetItemHandle(MarketSearchItem *this); // idb
unsigned __int16 __thiscall MarketSearchItem::GetOwnerHandle(MarketSearchItem *this); // idb
int __stdcall MarketSearchWin::MarketSort::CompName(char *Name1, char *Name2, bool desc);
void __thiscall MarketSearchWin::SetSearchBooth(MarketSearchWin *this, unsigned __int16 hHandle); // idb
bool __thiscall MarketSearchWin::IsFindBooth(MarketSearchWin *this, unsigned __int16 hHandle); // idb
void __thiscall MarketSearchWin::SetCategoryFromBtn(MarketSearchWin *this, unsigned int PgBtnMsg); // idb
void __thiscall MarketSearchWin::ShowWTCombo(MarketSearchWin *this, bool b); // idb
void __thiscall MarketSearchWin::SetSearchingMsgBox(MarketSearchWin *this, MsgBox *pkMsgBox); // idb
void __thiscall MarketSearchWin::DirectMessage(MarketSearchWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall MarketSearchWin::CloseSearchingMsgBox(MarketSearchWin *this); // idb
void __thiscall MarketSearchWin::OnSomeoneBoothOpen(MarketSearchWin *this, unsigned __int16 hBoothHandle); // idb
void __thiscall MarketSearchItem::MarketSearchItem(MarketSearchItem *this); // idb
void __thiscall MarketSearchItem::~MarketSearchItem(MarketSearchItem *this); // idb
void __thiscall MarketSearchItem::Clear(MarketSearchItem *this); // idb
void __thiscall MarketSearchItem::Set(MarketSearchItem *this, BoothItemInfo *pkBoothItemInfo); // idb
Item *__thiscall MarketSearchItem::GetItem(MarketSearchItem *this); // idb
int __stdcall MarketSearchWin::MarketSort::CompLevel(int Level1, int Level2, bool desc);
int __stdcall MarketSearchWin::MarketSort::CompMoney(unsigned __int64 Money1, unsigned __int64 Money2, bool desc);
int __stdcall MarketSearchWin::MarketSort::CompSubGroup(Item *Item1, Item *Item2, bool desc);
int __stdcall MarketSearchWin::MarketSort::CompItemHandle(unsigned int Handle1, unsigned int Handle2, bool desc);
void __thiscall MarketSearchWin::MakeDefaultAll(MarketSearchWin *this); // idb
BOOL __thiscall MarketSearchWin::DelayTimeCheck(MarketSearchWin *this);
void __stdcall MarketSearchWin::GetItemFontTable(D3DXCOLOR *RetColor, GradeType eType);
int __stdcall MarketSearchWin::MarketSort::CompMainGroup(Item *Item1, Item *Item2, bool desc);
bool __stdcall MarketSearchWin::SortByDefault::operator()(MarketSearchItem *pkMSItem1, MarketSearchItem *pkMSItem2);
char __stdcall MarketSearchWin::SortByName::operator()(MarketSearchItem *pkMSItem1, MarketSearchItem *pkMSItem2);
char __stdcall MarketSearchWin::SortByNameDesc::operator()(MarketSearchItem *pkMSItem1, MarketSearchItem *pkMSItem2);
char __stdcall MarketSearchWin::SortByLevel::operator()(MarketSearchItem *pkMSItem1, MarketSearchItem *pkMSItem2);
char __stdcall MarketSearchWin::SortByLevelDesc::operator()(MarketSearchItem *pkMSItem1, MarketSearchItem *pkMSItem2);
bool __stdcall MarketSearchWin::SortByMoney::operator()(MarketSearchItem *pkMSItem1, MarketSearchItem *pkMSItem2);
bool __stdcall MarketSearchWin::SortByMoneyDesc::operator()(MarketSearchItem *pkMSItem1, MarketSearchItem *pkMSItem2);
void __thiscall MarketSearchWin::InitItemSearchUI(MarketSearchWin *this, UIUtil *ui); // idb
void __thiscall MarketSearchWin::InitCategoryComboBoxUI(MarketSearchWin *this, UIUtil *ui); // idb
void __thiscall MarketSearchWin::OnSearch(MarketSearchWin *this); // idb
void __thiscall MarketSearchWin::OnSearchBooth(MarketSearchWin *this); // idb
void __thiscall MarketSearchWin::OnShowWin(MarketSearchWin *this); // idb
char __thiscall MarketSearchWin::SetListItem(MarketSearchWin *this, MarketSearchItem *pkMarketSearchItem);
char __thiscall MarketSearchWin::SetListIcon(MarketSearchWin *this, unsigned int uiIndex, Item *pkItem);
void __thiscall MarketSearchWin::UpdateMeWin(MarketSearchWin *this, float fCutTime); // idb
void __thiscall MarketSearchWin::RefreshItemViewList(MarketSearchWin *this); // idb
void __thiscall MarketSearchWin::RefreshItemViewSlide(MarketSearchWin *this); // idb
void __thiscall MarketSearchWin::MarketSearchWin(MarketSearchWin *this); // idb
void __thiscall MarketSearchWin::~MarketSearchWin(MarketSearchWin *this); // idb
char __thiscall MarketSearchWin::UpdateViewList(MarketSearchWin *this);
void __thiscall MarketSearchWin::RemoveAllList(MarketSearchWin *this); // idb
MarketSearchWin *__cdecl MarketSearchWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall MarketSearchWin::OnClose(MarketSearchWin *this); // idb
char __thiscall MarketSearchWin::SetListItems(MarketSearchWin *this, PROTO_NC_BOOTH_SEARCH_ITEM_LIST_CATEGORIZED_ACK *pkProto);
bool __thiscall MarketSearchWin::Sort(MarketSearchWin *this, unsigned int uiMsg); // idb
void __thiscall MarketSearchWin::OnCommand(MarketSearchWin *this, unsigned int wParam, int lParam); // idb
char __thiscall MarketSearchWin::Create(MarketSearchWin *this, PgFrameWork *pkFrameWork);
unsigned int __cdecl ITableBase<MarketSearchInfo,MarketSearchInfoTab>::GetTotal(); // idb
MarketSearchItem *__thiscall MarketSearchItem::`vector deleting destructor'(MarketSearchItem *this, unsigned int a2);
void __cdecl std::_Insertion_sort1<MarketSearchItem * *,MarketSearchWin::SortByDefault,MarketSearchItem *>(MarketSearchItem **_First, MarketSearchItem **_Last);
void __cdecl std::_Insertion_sort1<MarketSearchItem * *,MarketSearchWin::SortByName,MarketSearchItem *>(MarketSearchItem **_First, MarketSearchItem **_Last);
void __cdecl std::_Insertion_sort1<MarketSearchItem * *,MarketSearchWin::SortByNameDesc,MarketSearchItem *>(MarketSearchItem **_First, MarketSearchItem **_Last);
void __cdecl std::_Insertion_sort1<MarketSearchItem * *,MarketSearchWin::SortByLevel,MarketSearchItem *>(MarketSearchItem **_First, MarketSearchItem **_Last);
void __cdecl std::_Insertion_sort1<MarketSearchItem * *,MarketSearchWin::SortByLevelDesc,MarketSearchItem *>(MarketSearchItem **_First, MarketSearchItem **_Last);
void __cdecl std::_Insertion_sort1<MarketSearchItem * *,MarketSearchWin::SortByMoney,MarketSearchItem *>(MarketSearchItem **_First, MarketSearchItem **_Last);
void __cdecl std::_Insertion_sort1<MarketSearchItem * *,MarketSearchWin::SortByMoneyDesc,MarketSearchItem *>(MarketSearchItem **_First, MarketSearchItem **_Last);
void __cdecl std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByDefault>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last);
void __cdecl std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByName>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last);
void __cdecl std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByNameDesc>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last);
void __cdecl std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByLevel>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last);
void __cdecl std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByLevelDesc>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last);
void __cdecl std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByMoney>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last);
void __cdecl std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByMoneyDesc>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last);
void __cdecl std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByDefault>(MarketSearchItem **_First, int _Hole, int _Top, MarketSearchItem **_Val);
void __cdecl std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByName>(MarketSearchItem **_First, int _Hole, int _Top, MarketSearchItem **_Val);
void __cdecl std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByNameDesc>(MarketSearchItem **_First, int _Hole, int _Top, MarketSearchItem **_Val);
void __cdecl std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByLevel>(MarketSearchItem **_First, int _Hole, int _Top, MarketSearchItem **_Val);
void __cdecl std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByLevelDesc>(MarketSearchItem **_First, int _Hole, int _Top, MarketSearchItem **_Val);
void __cdecl std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByMoney>(MarketSearchItem **_First, int _Hole, int _Top, MarketSearchItem **_Val);
void __cdecl std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByMoneyDesc>(MarketSearchItem **_First, int _Hole, int _Top, MarketSearchItem **_Val);
void __cdecl std::_Median<MarketSearchItem * *,MarketSearchWin::SortByDefault>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last);
void __cdecl std::_Median<MarketSearchItem * *,MarketSearchWin::SortByName>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last);
void __cdecl std::_Median<MarketSearchItem * *,MarketSearchWin::SortByNameDesc>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last);
void __cdecl std::_Median<MarketSearchItem * *,MarketSearchWin::SortByLevel>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last);
void __cdecl std::_Median<MarketSearchItem * *,MarketSearchWin::SortByLevelDesc>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last);
void __cdecl std::_Median<MarketSearchItem * *,MarketSearchWin::SortByMoney>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last);
void __cdecl std::_Median<MarketSearchItem * *,MarketSearchWin::SortByMoneyDesc>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last);
void __cdecl std::_Adjust_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByDefault>(MarketSearchItem **_First, int _Hole, int _Bottom, MarketSearchItem **_Val);
void __cdecl std::_Adjust_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByName>(MarketSearchItem **_First, int _Hole, int _Bottom, MarketSearchItem **_Val);
void __cdecl std::_Adjust_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByNameDesc>(MarketSearchItem **_First, int _Hole, int _Bottom, MarketSearchItem **_Val);
void __cdecl std::_Adjust_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByLevel>(MarketSearchItem **_First, int _Hole, int _Bottom, MarketSearchItem **_Val);
void __cdecl std::_Adjust_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByLevelDesc>(MarketSearchItem **_First, int _Hole, int _Bottom, MarketSearchItem **_Val);
void __cdecl std::_Adjust_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByMoney>(MarketSearchItem **_First, int _Hole, int _Bottom, MarketSearchItem **_Val);
void __cdecl std::_Adjust_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByMoneyDesc>(MarketSearchItem **_First, int _Hole, int _Bottom, MarketSearchItem **_Val);
std::pair<MarketSearchItem * *,MarketSearchItem * *> *__cdecl std::_Unguarded_partition<MarketSearchItem * *,MarketSearchWin::SortByDefault>(std::pair<MarketSearchItem * *,MarketSearchItem * *> *result, MarketSearchItem **_First, MarketSearchItem **_Last);
std::pair<MarketSearchItem * *,MarketSearchItem * *> *__cdecl std::_Unguarded_partition<MarketSearchItem * *,MarketSearchWin::SortByName>(std::pair<MarketSearchItem * *,MarketSearchItem * *> *result, MarketSearchItem **_First, MarketSearchItem **_Last);
std::pair<MarketSearchItem * *,MarketSearchItem * *> *__cdecl std::_Unguarded_partition<MarketSearchItem * *,MarketSearchWin::SortByNameDesc>(std::pair<MarketSearchItem * *,MarketSearchItem * *> *result, MarketSearchItem **_First, MarketSearchItem **_Last);
std::pair<MarketSearchItem * *,MarketSearchItem * *> *__cdecl std::_Unguarded_partition<MarketSearchItem * *,MarketSearchWin::SortByLevel>(std::pair<MarketSearchItem * *,MarketSearchItem * *> *result, MarketSearchItem **_First, MarketSearchItem **_Last);
std::pair<MarketSearchItem * *,MarketSearchItem * *> *__cdecl std::_Unguarded_partition<MarketSearchItem * *,MarketSearchWin::SortByLevelDesc>(std::pair<MarketSearchItem * *,MarketSearchItem * *> *result, MarketSearchItem **_First, MarketSearchItem **_Last);
std::pair<MarketSearchItem * *,MarketSearchItem * *> *__cdecl std::_Unguarded_partition<MarketSearchItem * *,MarketSearchWin::SortByMoney>(std::pair<MarketSearchItem * *,MarketSearchItem * *> *result, MarketSearchItem **_First, MarketSearchItem **_Last);
std::pair<MarketSearchItem * *,MarketSearchItem * *> *__cdecl std::_Unguarded_partition<MarketSearchItem * *,MarketSearchWin::SortByMoneyDesc>(std::pair<MarketSearchItem * *,MarketSearchItem * *> *result, MarketSearchItem **_First, MarketSearchItem **_Last);
void __cdecl std::_Make_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByDefault>(MarketSearchItem **_First, MarketSearchItem **_Last, MarketSearchWin::SortByDefault _Pred);
void __cdecl std::_Make_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByName>(MarketSearchItem **_First, MarketSearchItem **_Last, MarketSearchWin::SortByName _Pred);
void __cdecl std::_Make_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByNameDesc>(MarketSearchItem **_First, MarketSearchItem **_Last, MarketSearchWin::SortByNameDesc _Pred);
void __cdecl std::_Make_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByLevel>(MarketSearchItem **_First, MarketSearchItem **_Last, MarketSearchWin::SortByLevel _Pred);
void __cdecl std::_Make_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByLevelDesc>(MarketSearchItem **_First, MarketSearchItem **_Last, MarketSearchWin::SortByLevelDesc _Pred);
void __cdecl std::_Make_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByMoney>(MarketSearchItem **_First, MarketSearchItem **_Last, MarketSearchWin::SortByMoney _Pred);
void __cdecl std::_Make_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByMoneyDesc>(MarketSearchItem **_First, MarketSearchItem **_Last, MarketSearchWin::SortByMoneyDesc _Pred);
void __thiscall std::pair<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::~pair<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>(std::pair<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > *this); // idb
MarketSearchWin *__thiscall MarketSearchWin::`scalar deleting destructor'(MarketSearchWin *this, unsigned int a2);
void __cdecl std::_Sort_heap<MarketSearchItem * *,MarketSearchWin::SortByDefault>(MarketSearchItem **_First, MarketSearchItem **_Last);
void __cdecl std::_Sort_heap<MarketSearchItem * *,MarketSearchWin::SortByName>(MarketSearchItem **_First, MarketSearchItem **_Last);
void __cdecl std::_Sort_heap<MarketSearchItem * *,MarketSearchWin::SortByNameDesc>(MarketSearchItem **_First, MarketSearchItem **_Last);
void __cdecl std::_Sort_heap<MarketSearchItem * *,MarketSearchWin::SortByLevel>(MarketSearchItem **_First, MarketSearchItem **_Last);
void __cdecl std::_Sort_heap<MarketSearchItem * *,MarketSearchWin::SortByLevelDesc>(MarketSearchItem **_First, MarketSearchItem **_Last);
void __cdecl std::_Sort_heap<MarketSearchItem * *,MarketSearchWin::SortByMoney>(MarketSearchItem **_First, MarketSearchItem **_Last);
void __cdecl std::_Sort_heap<MarketSearchItem * *,MarketSearchWin::SortByMoneyDesc>(MarketSearchItem **_First, MarketSearchItem **_Last);
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned short>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *_Newnode); // idb
void __cdecl std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByDefault>(MarketSearchItem **_First, MarketSearchItem **_Last, int _Ideal, MarketSearchWin::SortByDefault _Pred); // idb
void __cdecl std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByName>(MarketSearchItem **_First, MarketSearchItem **_Last, int _Ideal, MarketSearchWin::SortByName _Pred); // idb
void __cdecl std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByNameDesc>(MarketSearchItem **_First, MarketSearchItem **_Last, int _Ideal, MarketSearchWin::SortByNameDesc _Pred); // idb
void __cdecl std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByLevel>(MarketSearchItem **_First, MarketSearchItem **_Last, int _Ideal, MarketSearchWin::SortByLevel _Pred); // idb
void __cdecl std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByLevelDesc>(MarketSearchItem **_First, MarketSearchItem **_Last, int _Ideal, MarketSearchWin::SortByLevelDesc _Pred); // idb
void __cdecl std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByMoney>(MarketSearchItem **_First, MarketSearchItem **_Last, int _Ideal, MarketSearchWin::SortByMoney _Pred); // idb
void __cdecl std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByMoneyDesc>(MarketSearchItem **_First, MarketSearchItem **_Last, int _Ideal, MarketSearchWin::SortByMoneyDesc _Pred); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Node, bool _Leftish); // idb
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned int> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>(std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned int> >,0> > *this, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned int> *_Val); // idb
std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Buynode<std::pair<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char>>> &>(std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::pair<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > *_Val); // idb
char __thiscall SLWCreateInfo::Item::AddWin(SLWCreateInfo::Item *this, char *pcNodeName, SLWCreateInfo::SprDataType eType);
void __thiscall MiniHouseInvWin::SetInvType(MiniHouseInvWin *this, unsigned int uiInvType); // idb
void __thiscall MiniHouseInvWin::SetActive(MiniHouseInvWin *this, bool bActive); // idb
bool __thiscall MiniHouseInvWin::GetActive(MiniHouseInvWin *this); // idb
bool __thiscall MiniHouseInvWin::IsLock(MiniHouseInvWin *this); // idb
void __thiscall MiniHouseInvTabButWin::MiniHouseInvTabButWin(MiniHouseInvTabButWin *this); // idb
void __thiscall MiniHouseInvTabButWin::~MiniHouseInvTabButWin(MiniHouseInvTabButWin *this); // idb
bool __thiscall MiniHouseInvTabButWin::Create(MiniHouseInvTabButWin *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg); // idb
void __thiscall MiniHouseInventoryWin::OnActivePage(MiniHouseInventoryWin *this, unsigned int uiIndex); // idb
void MiniHouseInventoryWin::OnHelpLink();
void __thiscall MiniHouseInvWin::~MiniHouseInvWin(MiniHouseInvWin *this); // idb
char __thiscall MiniHouseInvTabButWin::EatDropInstance(MiniHouseInvTabButWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
void __thiscall MiniHouseInventoryWin::MiniHouseInventoryWin(MiniHouseInventoryWin *this); // idb
void __thiscall MiniHouseInventoryWin::~MiniHouseInventoryWin(MiniHouseInventoryWin *this); // idb
void __thiscall MiniHouseInventoryWin::OnInvLClickNormalMode(MiniHouseInventoryWin *this, unsigned int uiInvIndex); // idb
void __thiscall MiniHouseInventoryWin::OnInvLClickShopMode(MiniHouseInventoryWin *this, unsigned int uiInvIndex); // idb
char __thiscall MiniHouseInventoryWin::DropOnInv(MiniHouseInventoryWin *this, DropContents *pkContents, unsigned int uiReceiverInvIndex);
void __thiscall MiniHouseInventoryWin::SetDefaultHouse(MiniHouseInventoryWin *this); // idb
void __thiscall MiniHouseInvWin::MiniHouseInvWin(MiniHouseInvWin *this); // idb
void __thiscall MiniHouseInvWin::UpdateMeWin(MiniHouseInvWin *this, float fCurTime); // idb
void __thiscall MiniHouseInvWin::DoAction(MiniHouseInvWin *this); // idb
void __thiscall MiniHouseInvWin::DoRAction(MiniHouseInvWin *this); // idb
void __thiscall MiniHouseInvWin::OnFirstHitWin(MiniHouseInvWin *this); // idb
void __thiscall MiniHouseInventoryWin::UpdateMeWin(MiniHouseInventoryWin *this, float fCurTime); // idb
bool __thiscall MiniHouseInventoryWin::Change(MiniHouseInventoryWin *this, unsigned int uiInvType, Item *pkItem, unsigned int uiInvIndex); // idb
void __thiscall MiniHouseInventoryWin::OnInvLClick(MiniHouseInventoryWin *this, unsigned int uiInvIndex); // idb
void __thiscall MiniHouseInventoryWin::OnInvShiftRClickNormalMode(MiniHouseInventoryWin *this, unsigned int uiInvIndex); // idb
char __thiscall MiniHouseInventoryWin::GetSkin(MiniHouseInventoryWin *this); // idb
void __thiscall MiniHouseInvWin::SetLock(MiniHouseInvWin *this, bool bLock); // idb
void __thiscall MiniHouseInventoryWin::OnInvRClick(MiniHouseInventoryWin *this, unsigned int uiInvIndex); // idb
char __thiscall MiniHouseInventoryWin::DropOnEquip(MiniHouseInventoryWin *this, DropContents *pkContents, unsigned int uiReceiverInvIndex);
void __thiscall MiniHouseInventoryWin::LockAllItem(MiniHouseInventoryWin *this); // idb
void __thiscall MiniHouseInventoryWin::UnLockAllItem(MiniHouseInventoryWin *this); // idb
char __thiscall MiniHouseInvWin::EatDropInstance(MiniHouseInvWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
void __thiscall MiniHouseInventoryWin::OnCommand(MiniHouseInventoryWin *this, unsigned int wParam, int lParam); // idb
MiniHouseInvWin *__cdecl MiniHouseInvWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent); // idb
MiniHouseInvTabButWin *__cdecl MiniHouseInvTabButWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg); // idb
MiniHouseInventoryWin *__cdecl MiniHouseInventoryWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall MiniHouseInventoryWin::Create(MiniHouseInventoryWin *this, PgFrameWork *pkFrameWork);
char __thiscall MiniHouseInvWin::Create(MiniHouseInvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent);
MiniHouseInvTabButWin *__thiscall MiniHouseInvTabButWin::`scalar deleting destructor'(MiniHouseInvTabButWin *this, unsigned int a2);
MiniHouse *__cdecl MiniHouseTable::GetByHandle(unsigned __int16 wHandle); // idb
MiniHouseInvWin *__thiscall MiniHouseInvWin::`scalar deleting destructor'(MiniHouseInvWin *this, unsigned int a2);
MiniHouseInventoryWin *__thiscall MiniHouseInventoryWin::`scalar deleting destructor'(MiniHouseInventoryWin *this, unsigned int a2);
void __thiscall MiniHouseMenuWin::MiniHouseMenuWin(MiniHouseMenuWin *this); // idb
void __thiscall MiniHouseMenuWin::~MiniHouseMenuWin(MiniHouseMenuWin *this); // idb
void __thiscall MiniHouseMenuWin::OnCancel(MiniHouseMenuWin *this); // idb
void __thiscall MiniHouseMenuWin::SetMHJoinText(MiniHouseMenuWin *this, char *pStr); // idb
void MiniHouseMenuWin::OnHelpLink();
void __thiscall MiniHouseMenuWin::Show(MiniHouseMenuWin *this, bool b); // idb
char __thiscall MiniHouseMenuWin::Create(MiniHouseMenuWin *this, PgFrameWork *pkFrameWork);
void __thiscall MiniHouseMenuWin::OnCommand(MiniHouseMenuWin *this, unsigned int wParam, int lParam); // idb
// void __userpurge MiniHouseMenuWin::EnablePrivateStoreBut(MiniHouseMenuWin *this@<ecx>, int a2@<edi>, int bEnable);
// void __userpurge MiniHouseMenuWin::EnableRestBut(MiniHouseMenuWin *this@<ecx>, int a2@<edi>, int bEnable);
// void __userpurge MiniHouseMenuWin::UpdateMeWin(MiniHouseMenuWin *this@<ecx>, int a2@<edi>, float fCurTime);
MiniHouseMenuWin *__cdecl MiniHouseMenuWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::SetAt(NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *this, unsigned int key, NiVBSet *val); // idb
MiniHouseMenuWin *__thiscall MiniHouseMenuWin::`scalar deleting destructor'(MiniHouseMenuWin *this, unsigned int a2);
void __thiscall NpcMarkWin::SetIconDrawRect(NpcMarkWin *this, tagRECT kRect); // idb
void __thiscall MiniMapMarkWin::MiniMapMarkWin(MiniMapMarkWin *this); // idb
void __thiscall MiniMapMarkWin::~MiniMapMarkWin(MiniMapMarkWin *this); // idb
PgWinSpr *__thiscall MiniMapMarkWin::GetMarkWin(MiniMapMarkWin *this); // idb
void __thiscall MainCharMarkWin::MainCharMarkWin(MainCharMarkWin *this); // idb
void __thiscall MainCharMarkWin::~MainCharMarkWin(MainCharMarkWin *this); // idb
void __thiscall NpcMarkWin::NpcMarkWin(NpcMarkWin *this); // idb
void __thiscall NpcMarkWin::~NpcMarkWin(NpcMarkWin *this); // idb
// void __userpurge NpcMarkWin::ProcessMeInput(NpcMarkWin *this@<ecx>, unsigned int a2@<edi>, bool *bHit);
// void __userpurge NpcMarkWin::DrawIcon(NpcMarkWin *this@<ecx>, unsigned int a2@<ebx>, PgWinSpr *pkSprWin);
void __thiscall PartyMarkWin::PartyMarkWin(PartyMarkWin *this); // idb
void __thiscall PartyMarkWin::~PartyMarkWin(PartyMarkWin *this); // idb
void __thiscall PartyMarkWin::SetParty(PartyMarkWin *this, PartyMemberInfo *pkInfo); // idb
PartyMemberInfo *__thiscall PartyMarkWin::GetParty(PartyMarkWin *this); // idb
void __thiscall RaidMarkWin::RaidMarkWin(RaidMarkWin *this); // idb
void __thiscall RaidMarkWin::~RaidMarkWin(RaidMarkWin *this); // idb
void __thiscall RaidMarkWin::SetRaidMember(RaidMarkWin *this, RaidMemberInfo *pkInfo); // idb
RaidMemberInfo *__thiscall RaidMarkWin::GetRaidMember(RaidMarkWin *this); // idb
void __thiscall QuestHelperMarkWin::ProcessMeInput(QuestHelperMarkWin *this, bool *bHit); // idb
void __thiscall QuestHelperMarkWin::SetQuestID(QuestHelperMarkWin *this, unsigned __int16 kQuestID); // idb
void __thiscall QuestHelperMarkWin::SetMobID(QuestHelperMarkWin *this, unsigned __int16 Mob_ID); // idb
void __thiscall QuestHelperMarkWin::SetPos(QuestHelperMarkWin *this, NiPoint2 kPos); // idb
void __thiscall QuestHelperMarkWin::SetQCID(QuestHelperMarkWin *this, unsigned __int16 QC_ID); // idb
unsigned __int16 __thiscall QuestHelperMarkWin::GetQuestID(QuestHelperMarkWin *this); // idb
unsigned __int16 __thiscall QuestHelperMarkWin::GetMobID(QuestHelperMarkWin *this); // idb
unsigned __int16 __thiscall QuestHelperMarkWin::GetQCID(QuestHelperMarkWin *this); // idb
void __thiscall QuestHelperMarkWin::GetPos(QuestHelperMarkWin *this, NiPoint2 *kPos); // idb
void __thiscall MobAreaMarkWin::~MobAreaMarkWin(MobAreaMarkWin *this); // idb
void __thiscall MobAreaMarkWin::SetQuestID(MobAreaMarkWin *this, unsigned __int16 QuestID); // idb
void __thiscall MobAreaMarkWin::SetMobID(MobAreaMarkWin *this, unsigned __int16 MobID); // idb
void __thiscall MobAreaMarkWin::SetPos(MobAreaMarkWin *this, NiPoint2 kPos); // idb
unsigned __int16 __thiscall MobAreaMarkWin::GetQuestID(MobAreaMarkWin *this); // idb
unsigned __int16 __thiscall MobAreaMarkWin::GetMobID(MobAreaMarkWin *this); // idb
void __thiscall MobAreaMarkWin::GetPos(MobAreaMarkWin *this, NiPoint2 *kPos); // idb
void __thiscall GTIScanMarkWin::GTIScanMarkWin(GTIScanMarkWin *this); // idb
void __thiscall GTIScanMarkWin::~GTIScanMarkWin(GTIScanMarkWin *this); // idb
void __thiscall GTIScanMarkWin::SetEnemyPos(GTIScanMarkWin *this, ScanMemberInfo pkMemberInfo); // idb
ScanMemberInfo *__thiscall GTIScanMarkWin::GetEnemyPos(GTIScanMarkWin *this); // idb
void __thiscall MapMarkWin::~MapMarkWin(MapMarkWin *this); // idb
void __thiscall MapMarkWin::SetLifeTime(MapMarkWin *this, float fTime); // idb
BOOL __thiscall MapMarkWin::IsPassLifeTime(MapMarkWin *this, float fTime);
void __thiscall MapMarkWin::SetPos(MapMarkWin *this, NiPoint2 *kPos); // idb
NiPoint2 *__thiscall MapMarkWin::GetPos(MapMarkWin *this); // idb
void __thiscall KQTeamMarkWin::KQTeamMarkWin(KQTeamMarkWin *this); // idb
void __thiscall KQTeamMarkWin::~KQTeamMarkWin(KQTeamMarkWin *this); // idb
void __thiscall KQTeamMarkWin::SetCharHandle(KQTeamMarkWin *this, unsigned __int16 kCharHandle); // idb
unsigned __int16 __thiscall KQTeamMarkWin::GetCharHandle(KQTeamMarkWin *this); // idb
void __thiscall MiniMapWin::SetMapTexture(MiniMapWin *this, NiSourceTexture *pkTexture); // idb
void __thiscall MiniMapWin::SetMapShift(MiniMapWin *this, float fX, float fY); // idb
void __thiscall MiniMapWin::SetMapScale(MiniMapWin *this, float fScale); // idb
void __thiscall MiniMapWin::SetFullModeTextureUVs(MiniMapWin *this); // idb
void __thiscall MiniMapWin::SetZoomModeTextureUVs(MiniMapWin *this); // idb
void __thiscall MiniMapWin::Add_KQ_MOB(MiniMapWin *this, PROTO_NC_BRIEFINFO_REGENMOB_CMD *pkProto); // idb
void __thiscall MiniMapWin::Remove_KQ_MOB(MiniMapWin *this, bool b); // idb
bool __thiscall MiniMapWin::GetWinPos(MiniMapWin *this, float fCharWorldX, float fCharWorldY, float *rfXPos, float *rfYPos); // idb
void __thiscall MiniMapWin::SetMapViewRect(MiniMapWin *this, unsigned int dwLeft, unsigned int dwTop, unsigned int dwRight, unsigned int dwBottom); // idb
void __thiscall MiniMapWin::OnDestroy(MiniMapWin *this); // idb
WorldMapWin *__thiscall MiniMapWin::GetWorldMap(MiniMapWin *this); // idb
void __thiscall MiniMapWin::OpenFullWorldMap(MiniMapWin *this); // idb
void __thiscall MiniMapWin::ShowGTQuit(MiniMapWin *this, bool b); // idb
void __stdcall MiniMapWin::DirectMessage(int iMsgTag, void *pvBody, IDirectMessenger *pkFrom);
void __thiscall MiniMapWin::AddQuestHelper(MiniMapWin *this); // idb
bool __thiscall MiniMapMarkWin::HitTest(MiniMapMarkWin *this, int iSx, int iSy); // idb
// void __userpurge NpcMarkWin::UpdateMeWin(NpcMarkWin *this@<ecx>, unsigned int a2@<ebx>, int a3@<edi>, float fCurTime);
bool __thiscall NpcMarkWin::HitTest(NpcMarkWin *this, int iSx, int iSy); // idb
void __thiscall QuestHelperMarkWin::QuestHelperMarkWin(QuestHelperMarkWin *this); // idb
void __thiscall MobAreaMarkWin::MobAreaMarkWin(MobAreaMarkWin *this); // idb
void __thiscall MapMarkWin::MapMarkWin(MapMarkWin *this); // idb
void __thiscall MiniMapWin::SetZoomButStateByMode(MiniMapWin *this); // idb
void __thiscall MiniMapWin::OnSchedule(MiniMapWin *this); // idb
void __thiscall MiniMapWin::UpdateMainCharPos(MiniMapWin *this); // idb
void __thiscall MiniMapWin::UpdateMainCharDir(MiniMapWin *this); // idb
void __thiscall MiniMapWin::UpdatePartyPos(MiniMapWin *this); // idb
char __thiscall MiniMapWin::IsInNPC(MiniMapWin *this, unsigned __int16 kCharHandle);
char __thiscall MiniMapWin::IsInParty(MiniMapWin *this, PartyMemberInfo *pkInfo);
PartyMarkWin *__thiscall MiniMapWin::FindPartyWin(MiniMapWin *this, PartyMemberInfo *pkInfo); // idb
void __thiscall MiniMapWin::UpdateNPCPos(MiniMapWin *this); // idb
char __thiscall MiniMapWin::IsInRaid(MiniMapWin *this, RaidMemberInfo *pkInfo);
RaidMarkWin *__thiscall MiniMapWin::FindRaidWin(MiniMapWin *this, RaidMemberInfo *pkInfo); // idb
void __thiscall MiniMapWin::UpdateRaidPos(MiniMapWin *this); // idb
// void __usercall MiniMapWin::UpdateGTEnemyPos(MiniMapWin *this@<ecx>, signed int a2@<ebx>);
void __thiscall MiniMapWin::StopScanEffect(MiniMapWin *this); // idb
void __thiscall MiniMapWin::ResetKQAlarm(MiniMapWin *this); // idb
void __thiscall MiniMapWin::UpdateKQAlarm(MiniMapWin *this); // idb
char __thiscall MiniMapWin::ConfirmKQAlarmInfo(MiniMapWin *this, unsigned int kHandle);
PgSprData *__thiscall MiniMapWin::GetMapIconSprData(MiniMapWin *this, unsigned int kIndex); // idb
// void __usercall MiniMapWin::UpdateKQTeamMark(MiniMapWin *this@<ecx>, signed int a2@<edi>);
void __thiscall MiniMapWin::ShowSideWin(MiniMapWin *this, int b);
char __thiscall MiniMapMarkWin::Create(MiniMapMarkWin *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent);
PgWinSpr *__cdecl CreateSprCenteredWin(PgSprData *pkSprData, int iXOff, int iYOff, PgWin *pkParent); // idb
char __thiscall NpcMarkWin::Create(NpcMarkWin *this, int iXPos, int iYPos, PgSprData *pkSprData, QuestStateImage *pkImage, PgWin *pkParent, PgSprData *pkAutoSprData);
void __thiscall QuestHelperMarkWin::OnClose(QuestHelperMarkWin *this); // idb
char __thiscall QuestHelperMarkWin::Create(QuestHelperMarkWin *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, PgSprData *pkAutoSprData);
void __thiscall QuestHelperMarkWin::DirectMessage(QuestHelperMarkWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall MiniMapWin::OnZoomIn(MiniMapWin *this); // idb
void __thiscall MiniMapWin::OnZoomOut(MiniMapWin *this); // idb
void __thiscall MiniMapWin::OnAllMap(MiniMapWin *this); // idb
void __thiscall MiniMapWin::ClearWithOutMainChar(MiniMapWin *this); // idb
void __thiscall MiniMapWin::RemoveNPC(MiniMapWin *this, unsigned __int16 handle); // idb
void __thiscall MiniMapWin::RemoveParty(MiniMapWin *this, PartyMemberInfo *pkParty); // idb
void __thiscall MiniMapWin::ClearParty(MiniMapWin *this); // idb
void __thiscall MiniMapWin::OpenAllMap(MiniMapWin *this); // idb
void __thiscall MiniMapWin::RemoveRaidMember(MiniMapWin *this, RaidMemberInfo *pkRaid); // idb
void __thiscall MiniMapWin::ClearRaidMember(MiniMapWin *this); // idb
void __thiscall MiniMapWin::ClearGTEnemyPos(MiniMapWin *this); // idb
void __thiscall MiniMapWin::StartScanEffect(MiniMapWin *this); // idb
void __thiscall MiniMapWin::AddKQAlarmInfo(MiniMapWin *this, MiniMapWin::sKQAlarmInfo *pkInfo); // idb
void __thiscall MiniMapWin::RemoveKQAlarmInfo(MiniMapWin *this, unsigned int kHandle); // idb
void __thiscall MiniMapWin::RemoveMapMark(MiniMapWin *this, unsigned int nGroup); // idb
void __thiscall MiniMapWin::RemoveAllMapMark(MiniMapWin *this); // idb
void __thiscall MiniMapWin::UpdateMapMark(MiniMapWin *this); // idb
void __thiscall MiniMapWin::RemoveKQTeamMark(MiniMapWin *this, int kCharHandle);
void __thiscall MiniMapWin::RemoveAllKQTeamMark(MiniMapWin *this); // idb
void __thiscall MiniMapWin::RemoveInDunEffect(MiniMapWin *this); // idb
void __thiscall MiniMapWin::ViewInDunLevelFlag(MiniMapWin *this, ID_LEVEL_TYPE eLevelType); // idb
void __thiscall MiniMapWin::NotViewInDunLevelFlag(MiniMapWin *this); // idb
void __thiscall QuestHelperMarkWin::~QuestHelperMarkWin(QuestHelperMarkWin *this); // idb
void __thiscall MiniMapWin::~MiniMapWin(MiniMapWin *this); // idb
void __thiscall MiniMapWin::SetMapZoomFlag(MiniMapWin *this, bool bZoomEnable); // idb
void __thiscall MiniMapWin::OnCommand(MiniMapWin *this, unsigned int wParam, int lParam); // idb
// void __userpurge MiniMapWin::UpdateMeWin(MiniMapWin *this@<ecx>, signed int a2@<ebx>, signed int a3@<edi>, float fCurTime);
void __thiscall MiniMapWin::MiniMapWin(MiniMapWin *this); // idb
MainCharMarkWin *__cdecl MainCharMarkWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent); // idb
NpcMarkWin *__cdecl NpcMarkWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, QuestStateImage *pkImage, PgWin *pkParent, PgSprData *pkAutoSprData); // idb
PartyMarkWin *__cdecl PartyMarkWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent); // idb
RaidMarkWin *__cdecl RaidMarkWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent); // idb
QuestHelperMarkWin *__cdecl QuestHelperMarkWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, PgSprData *pkAutoSprData); // idb
MobAreaMarkWin *__cdecl MobAreaMarkWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent); // idb
GTIScanMarkWin *__cdecl GTIScanMarkWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent); // idb
MapMarkWin *__cdecl MapMarkWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent); // idb
KQTeamMarkWin *__cdecl KQTeamMarkWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent); // idb
MiniMapWin *__cdecl MiniMapWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall MiniMapWin::CreateKoreaUI(MiniMapWin *this, PgFrameWork *pkFrameWork);
void __thiscall MiniMapWin::AddNPC(MiniMapWin *this, PROTO_NC_BRIEFINFO_REGENMOB_CMD *pkProto); // idb
void __thiscall MiniMapWin::AddParty(MiniMapWin *this, PartyMemberInfo *pkParty); // idb
void __thiscall MiniMapWin::AddRaidMember(MiniMapWin *this, RaidMemberInfo *pkRaid); // idb
void __thiscall MiniMapWin::AddGTEnemyPos(MiniMapWin *this, SHINE_XY_TYPE pkMemberInfo); // idb
void __thiscall MiniMapWin::AddMapMark(MiniMapWin *this, PROTO_NC_SCENARIO_MAPMARK_CMD *kProto); // idb
void __thiscall MiniMapWin::AddKQTeamMark(MiniMapWin *this, int kCharHandle);
char __thiscall MiniMapWin::Create(MiniMapWin *this, PgFrameWork *pkFrameWork);
void __thiscall MiniMapWin::AddNPC(MiniMapWin *this, PROTO_NC_BRIEFINFO_MOB_CMD *pkProto); // idb
void __thiscall NpcMarkWin::DirectMessage(NpcMarkWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::~NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>(NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *> *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *> *this, unsigned int a2);
KQTeamMarkWin *__thiscall GTIScanMarkWin::`scalar deleting destructor'(KQTeamMarkWin *this, unsigned int a2);
void __thiscall NiTPointerList<MiniMapWin::sKQAlarmInfo *>::~NiTPointerList<MiniMapWin::sKQAlarmInfo *>(NiTPointerList<MiniMapWin::sKQAlarmInfo *> *this); // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *> *this, unsigned int a2);
void __thiscall PgTList<MiniMapWin::sKQAlarmInfo *>::~PgTList<MiniMapWin::sKQAlarmInfo *>(PgTList<MiniMapWin::sKQAlarmInfo *> *this); // idb
MobCoordinate *__cdecl ITableBase<MobCoordinate,MobCoordinateTab>::GetByIndex(unsigned int uiIndex); // idb
unsigned int __cdecl ITableBase<MobCoordinate,MobCoordinateTab>::GetTotal(); // idb
unsigned int __cdecl MobCoordinateTab::GetRecordNum(unsigned __int16 Mob_ID); // idb
PgTList<MiniMapWin::sKQAlarmInfo *> *__thiscall PgTList<MiniMapWin::sKQAlarmInfo *>::`vector deleting destructor'(PgTList<MiniMapWin::sKQAlarmInfo *> *this, unsigned int a2);
QuestHelperMarkWin *__thiscall QuestHelperMarkWin::`vector deleting destructor'(QuestHelperMarkWin *this, unsigned int a2);
MiniMapWin *__thiscall MiniMapWin::`vector deleting destructor'(MiniMapWin *this, unsigned int a2);
void __thiscall MiniPartyWin::ProcessMeInput(MiniPartyWin *this, bool *bHit); // idb
void __thiscall MiniPartyWin::ClearInfo(MiniPartyWin *this); // idb
const char *__thiscall MiniPartyWin::GetMemberName(MiniPartyWin *this); // idb
void __thiscall MiniPartyWin::DirectMessage(MiniPartyWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall MiniPartyWin::SetBuffUI(MiniPartyWin *this, Char *pkMember, StateType type, int *AbstateNums); // idb
void __thiscall MiniPartyWin::SetOption(MiniPartyWin *this, unsigned int uiOpt); // idb
void __thiscall MiniPartyWin::OnCommand(MiniPartyWin *this, unsigned int wParam, int lParam); // idb
void __thiscall MiniPartyWin::~MiniPartyWin(MiniPartyWin *this); // idb
char __thiscall MiniPartyWin::Create(MiniPartyWin *this, int iXPos, int iYPos, PgWin *pkParent, NiNode *pkNode, PgFrameWork *pkFrameWork);
void __thiscall MiniPartyWin::UpdateMeWin(MiniPartyWin *this, float fCurTime); // idb
void __thiscall MiniPartyWin::MiniPartyWin(MiniPartyWin *this); // idb
void __thiscall MiniPartyWin::SetInfo(MiniPartyWin *this, PartyMemberInfo *pkInfo); // idb
MiniPartyWin *__cdecl MiniPartyWin::CreateWin(int iXPos, int iYPos, PgWin *pkParent, NiNode *pkNode, PgFrameWork *pkFrameWork); // idb
MiniPartyWin *__thiscall MiniPartyWin::`vector deleting destructor'(MiniPartyWin *this, unsigned int a2);
void __thiscall MoneyWin::MoneyWin(MoneyWin *this); // idb
void __thiscall MoneyWin::~MoneyWin(MoneyWin *this); // idb
void __thiscall MoneyWin::OnCmdCancel(MoneyWin *this); // idb
void __thiscall MoneyWin::Open(MoneyWin *this, PgWin *pkRevWin, unsigned int uiOkMsg, unsigned int uiCancelMsg, char *pcText); // idb
void __thiscall MoneyWin::SetEditFocus(MoneyWin *this, unsigned int uiFocus); // idb
void __thiscall MoneyWin::OnEditEnd(MoneyWin *this, unsigned int wParam, int lParam); // idb
void __thiscall MoneyWin::SetTitle1(MoneyWin *this, char *pcTitle); // idb
void __thiscall MoneyWin::SetTitle2(MoneyWin *this, char *pcTitle); // idb
void __thiscall HolyRewardMoneyWin::SetTitle1(HolyRewardMoneyWin *this, char *pcTitle); // idb
void __thiscall HolyRewardMoneyWin::SetTitle2(HolyRewardMoneyWin *this, char *pcTitle); // idb
void __thiscall MoneyWin::OnShowWin(MoneyWin *this); // idb
void __thiscall MoneyWin::OnClose(MoneyWin *this); // idb
void __thiscall HolyRewardMoneyWin::OnCmdOk(HolyRewardMoneyWin *this); // idb
void __thiscall HolyRewardMoneyWin::Open(HolyRewardMoneyWin *this, unsigned int uiOkMsg, unsigned int uiCancelMsg, char *pcText1, char *pcText2); // idb
char __thiscall MoneyWin::Create(MoneyWin *this, PgFrameWork *pkFrameWork);
void __thiscall MoneyWin::OnCmdOk(MoneyWin *this); // idb
void __thiscall HolyRewardMoneyWin::HolyRewardMoneyWin(HolyRewardMoneyWin *this); // idb
void __thiscall HolyRewardMoneyWin::~HolyRewardMoneyWin(HolyRewardMoneyWin *this); // idb
char __thiscall HolyRewardMoneyWin::Create(HolyRewardMoneyWin *this, PgFrameWork *pkFrameWork);
void __thiscall HolyRewardMoneyWin::OnCmdCancel(HolyRewardMoneyWin *this); // idb
void __thiscall MoneyWin::OnCommand(MoneyWin *this, unsigned int wParam, int lParam); // idb
void __thiscall MoneyWin::UpdateMeWin(MoneyWin *this, float fCurTime); // idb
void __thiscall HolyRewardMoneyWin::OnCommand(HolyRewardMoneyWin *this, unsigned int wParam, int lParam); // idb
void __thiscall HolyRewardMoneyWin::UpdateMeWin(HolyRewardMoneyWin *this, float fCurTime); // idb
MoneyWin *__cdecl MoneyWin::CreateWin(PgFrameWork *pkFrameWork); // idb
HolyRewardMoneyWin *__cdecl HolyRewardMoneyWin::CreateWin(PgFrameWork *pkFrameWork); // idb
MoneyWin *__thiscall MoneyWin::`vector deleting destructor'(MoneyWin *this, unsigned int a2);
HolyRewardMoneyWin *__thiscall HolyRewardMoneyWin::`scalar deleting destructor'(HolyRewardMoneyWin *this, unsigned int a2);
void __thiscall MoveModeWin::MoveModeWin(MoveModeWin *this); // idb
void __thiscall MoveModeWin::~MoveModeWin(MoveModeWin *this); // idb
void __stdcall MoveModeWin::OnCommand(unsigned int wParam, int lParam);
char __thiscall MoveModeWin::Create(MoveModeWin *this, PgFrameWork *pkFrameWork);
MoveModeWin *__cdecl MoveModeWin::CreateWin(PgFrameWork *pkFrameWork); // idb
MoveModeWin *__thiscall MoveModeWin::`vector deleting destructor'(MoveModeWin *this, unsigned int a2);
void __thiscall MysteryVaultWin::MysteryVaultWin(MysteryVaultWin *this); // idb
void __thiscall MysteryVaultWin::OnMysteryVaultBtnClick(MysteryVaultWin *this); // idb
void __thiscall MysteryVaultWin::OnCommand(MysteryVaultWin *this, unsigned int wParam, int lParam); // idb
void __thiscall MysteryVaultWin::UpdateMeWin(MysteryVaultWin *this, float fCurTime); // idb
char __thiscall MysteryVaultWin::Create(MysteryVaultWin *this, PgFrameWork *pkFrameWork);
void __thiscall MysteryVaultWin::~MysteryVaultWin(MysteryVaultWin *this); // idb
void __thiscall MysteryVaultWin::OnReachTheLevel(MysteryVaultWin *this, unsigned int curUserLV, unsigned int itemLV); // idb
MysteryVaultWin *__cdecl MysteryVaultWin::CreateWin(PgFrameWork *pkFrameWork); // idb
MysteryVaultWin *__thiscall MysteryVaultWin::`scalar deleting destructor'(MysteryVaultWin *this, unsigned int a2);
void __thiscall ItemShopInvWin::~ItemShopInvWin(ItemShopInvWin *this); // idb
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__thiscall ItemShopInvWin::GetItem(ItemShopInvWin *this); // idb
// void __userpurge ItemShopInvWin::SetItem(ItemShopInvWin *this@<ecx>, int a2@<ebx>, PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *pkInfo);
ItemRepurchase *__thiscall ItemShopInvWin::GetRepurchaseItem(ItemShopInvWin *this); // idb
char __thiscall ItemShopInvWin::Create(ItemShopInvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent);
void __thiscall ItemShopInvWin::OnFirstHitWin(ItemShopInvWin *this); // idb
void NPCItemWin::OnHelpLink();
// void __usercall ItemShopInvWin::ItemShopInvWin(ItemShopInvWin *this@<ecx>, int a2@<ebx>, int a3@<edi>);
void __thiscall ItemShopInvWin::SetItemIcon(ItemShopInvWin *this, ItemRepurchase *pkItem); // idb
void __thiscall ItemShopInvWin::SetRepurchaseItem(ItemShopInvWin *this, ItemRepurchase *pkItem); // idb
void __thiscall NPCItemWin::OnInvLClick(NPCItemWin *this, unsigned int uiInvIndex); // idb
void __thiscall NPCItemWin::TabShow(NPCItemWin *this, NPCItemWin::TAPTYPE type, int _bTab);
void __thiscall NPCItemWin::DeleteAllContents(NPCItemWin *this); // idb
int (__thiscall **__thiscall NPCItemWin::GetSellItemNum(NPCItemWin *this))(void *p, char);
unsigned int __thiscall NPCItemWin::GetMaxPageNum(NPCItemWin *this); // idb
void __thiscall NPCItemWin::DeleteRepurchaseInv(NPCItemWin *this, unsigned __int16 nHandle); // idb
void __thiscall NPCItemWin::AddRepurchaseInv(NPCItemWin *this, PROTO_NC_ITEM_SELL_ITEM_INSERT_CMD *pkRepurItem); // idb
void __thiscall ItemShopInvWin::DoAction(ItemShopInvWin *this); // idb
void __thiscall ItemShopInvWin::DoRAction(ItemShopInvWin *this); // idb
void __thiscall NPCItemWin::OnCancel(NPCItemWin *this); // idb
void __thiscall NPCItemWin::UpdatePageInfo(NPCItemWin *this); // idb
void __thiscall NPCItemWin::ReSetItemMarket(NPCItemWin *this); // idb
void __thiscall NPCItemWin::OnShowWin(NPCItemWin *this); // idb
void __thiscall NPCItemWin::ResetContents(NPCItemWin *this); // idb
void __thiscall NPCItemWin::OnTab(NPCItemWin *this, NPCItemWin::PAGETYPE index); // idb
void __thiscall NPCItemWin::ResetPage(NPCItemWin *this, int NPCType); // idb
// ItemShopInvWin *__usercall ItemShopInvWin::CreateWin@<eax>(int a1@<ebx>, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent);
void __thiscall NPCItemWin::NPCItemWin(NPCItemWin *this); // idb
void __thiscall NPCItemWin::~NPCItemWin(NPCItemWin *this); // idb
NPCItemWin *__cdecl NPCItemWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall NPCItemWin::ResetPage(NPCItemWin *this); // idb
void __thiscall NPCItemWin::OnPrevPage(NPCItemWin *this); // idb
void __thiscall NPCItemWin::OnNextPage(NPCItemWin *this); // idb
char __thiscall NPCItemWin::Create(NPCItemWin *this, PgFrameWork *pkFrameWork);
void __thiscall NPCItemWin::OnInvRClick(NPCItemWin *this, unsigned int uiInvIndex); // idb
void __thiscall NPCItemWin::OnCommand(NPCItemWin *this, unsigned int wParam, int lParam); // idb
ItemShopInvWin *__thiscall ItemShopInvWin::`scalar deleting destructor'(ItemShopInvWin *this, unsigned int a2);
NPCItemWin *__thiscall NPCItemWin::`scalar deleting destructor'(NPCItemWin *this, unsigned int a2);
ItemInfo *__cdecl ItemMoneyTab::GetItemMoneyInfoByItemInx(char *pcInxName); // idb
void __thiscall NPCSkillInvWin::~NPCSkillInvWin(NPCSkillInvWin *this); // idb
unsigned __int16 __thiscall NPCSkillInvWin::GetSkill(NPCSkillInvWin *this); // idb
char __thiscall NPCSkillInvWin::Create(NPCSkillInvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent);
void __thiscall NPCSkillInvWin::OnFirstHitWin(NPCSkillInvWin *this); // idb
void NPCSkillWin::OnHelpLink();
unsigned int __thiscall NPCSkillWin::GetSellItemNum(NPCSkillWin *this); // idb
unsigned int __thiscall NPCSkillWin::GetMaxPageNum(NPCSkillWin *this); // idb
NPCSkillInvWin *__thiscall NPCSkillWin::GetInvWin(NPCSkillWin *this, unsigned int uiIndex); // idb
void __thiscall NPCSkillWin::~NPCSkillWin(NPCSkillWin *this); // idb
void __thiscall NPCSkillWin::OnOk(NPCSkillWin *this); // idb
void __thiscall NPCSkillWin::OnCancel(NPCSkillWin *this); // idb
void __thiscall NPCSkillWin::UpdatePageInfo(NPCSkillWin *this); // idb
void __thiscall NPCSkillInvWin::DoAction(NPCSkillInvWin *this); // idb
void __thiscall NPCSkillInvWin::DoRAction(NPCSkillInvWin *this); // idb
void __thiscall NPCSkillWin::NPCSkillWin(NPCSkillWin *this); // idb
void __thiscall NPCSkillWin::OnInvRClick(NPCSkillWin *this, unsigned int uiInvIndex); // idb
void __thiscall NPCSkillInvWin::SetItem(NPCSkillInvWin *this, PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *pkInfo); // idb
void __thiscall NPCSkillInvWin::SetItem(NPCSkillInvWin *this, PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *pkInfo, unsigned int uiSkillType); // idb
void __thiscall NPCSkillInvWin::SetItem(NPCSkillInvWin *this, PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *pkInfo, unsigned int uiSkillType, NiTexture *pkTexture, NiD3DPass *pkD3DPass); // idb
void __thiscall NPCSkillWin::ResetContents(NPCSkillWin *this); // idb
void __thiscall NPCSkillWin::OnSetPage(NPCSkillWin *this, unsigned int uiPage); // idb
void __thiscall NPCSkillInvWin::NPCSkillInvWin(NPCSkillInvWin *this); // idb
void __thiscall NPCSkillWin::ResetPage(NPCSkillWin *this); // idb
void __thiscall NPCSkillWin::OnActiveSkill(NPCSkillWin *this); // idb
void __thiscall NPCSkillWin::OnPasssiveSkill(NPCSkillWin *this); // idb
void __thiscall NPCSkillWin::OnProductSkill(NPCSkillWin *this); // idb
void __thiscall NPCSkillWin::OnPrevPage(NPCSkillWin *this); // idb
void __thiscall NPCSkillWin::OnNextPage(NPCSkillWin *this); // idb
void __thiscall NPCSkillWin::OnSelectJob(NPCSkillWin *this, unsigned int uiIndex); // idb
void __thiscall NPCSkillWin::SelectClassPage(NPCSkillWin *this, char kClass); // idb
NPCSkillInvWin *__cdecl NPCSkillInvWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent); // idb
NPCSkillWin *__cdecl NPCSkillWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall NPCSkillWin::Create(NPCSkillWin *this, PgFrameWork *pkFrameWork);
void __thiscall NPCSkillWin::OnCommand(NPCSkillWin *this, unsigned int wParam, int lParam); // idb
NPCSkillInvWin *__thiscall NPCSkillInvWin::`vector deleting destructor'(NPCSkillInvWin *this, unsigned int a2);
unsigned int __cdecl ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::GetTotal(); // idb
PassiveSkillViewInfo *__cdecl PasSkillViewInfoTab::GetByInxName(char *pcInxName); // idb
NPCSkillWin *__thiscall NPCSkillWin::`vector deleting destructor'(NPCSkillWin *this, unsigned int a2);
void __thiscall NPCSoulInvWin::NPCSoulInvWin(NPCSoulInvWin *this); // idb
void __thiscall NPCSoulInvWin::~NPCSoulInvWin(NPCSoulInvWin *this); // idb
char __thiscall NPCSoulInvWin::Create(NPCSoulInvWin *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiInvIndex);
void __thiscall NPCSoulInvWin::OnFirstHitWin(NPCSoulInvWin *this); // idb
void __thiscall NPCSoulWin::NPCSoulWin(NPCSoulWin *this); // idb
void __thiscall NPCSoulWin::~NPCSoulWin(NPCSoulWin *this); // idb
void NPCSoulWin::OnHelpLink();
void __thiscall NPCSoulWin::ResetPage(NPCSoulWin *this); // idb
void __thiscall NPCSoulWin::OnCancel(NPCSoulWin *this); // idb
void __thiscall NPCSoulWin::OnBuyHPOk(NPCSoulWin *this, unsigned int uiLot); // idb
void __thiscall NPCSoulWin::OnBuySPOk(NPCSoulWin *this, unsigned int uiLot); // idb
void __thiscall NPCSoulInvWin::DoAction(NPCSoulInvWin *this); // idb
void __thiscall NPCSoulInvWin::DoRAction(NPCSoulInvWin *this); // idb
void __thiscall NPCSoulWin::OnInvLClick(NPCSoulWin *this, unsigned int uiInvIndex); // idb
void __thiscall NPCSoulWin::OnInvRClick(NPCSoulWin *this, unsigned int uiInvIndex); // idb
void __thiscall NPCSoulWin::OnCommand(NPCSoulWin *this, unsigned int wParam, int lParam); // idb
NPCSoulInvWin *__cdecl NPCSoulInvWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiInvIndex); // idb
NPCSoulWin *__cdecl NPCSoulWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall NPCSoulWin::Create(NPCSoulWin *this, PgFrameWork *pkFrameWork);
NPCSoulInvWin *__thiscall NPCSoulInvWin::`vector deleting destructor'(NPCSoulInvWin *this, unsigned int a2);
NPCSoulWin *__thiscall NPCSoulWin::`vector deleting destructor'(NPCSoulWin *this, unsigned int a2);
void __thiscall PartyJoinProposeWin::OnBut1(PartyJoinProposeWin *this); // idb
void __thiscall PartyJoinProposeWin::OnBut2(PartyJoinProposeWin *this); // idb
void __thiscall PartyJoinProposeWin::SetMsg(PartyJoinProposeWin *this, char *pcText); // idb
void __thiscall PartyJoinProposeWin::OnTimer(PartyJoinProposeWin *this); // idb
void __thiscall PartyJoinProposeWin::UpdateMeWin(PartyJoinProposeWin *this, float fCurTime); // idb
void __thiscall PartyJoinProposeWin::~PartyJoinProposeWin(PartyJoinProposeWin *this); // idb
char __thiscall PartyJoinProposeWin::Create(PartyJoinProposeWin *this, PgFrameWork *pkFrameWork);
void __thiscall PartyJoinProposeWin::OnCommand(PartyJoinProposeWin *this, unsigned int wParam, int lParam); // idb
void __thiscall PartyJoinProposeWin::PartyJoinProposeWin(PartyJoinProposeWin *this); // idb
PartyJoinProposeWin *__cdecl PartyJoinProposeWin::CreateWin(PgFrameWork *pkFrameWork); // idb
PartyJoinProposeWin *__thiscall PartyJoinProposeWin::`vector deleting destructor'(char *this, unsigned int a2);
PartyJoinProposeWin *__thiscall PartyJoinProposeWin::`scalar deleting destructor'(PartyJoinProposeWin *this, unsigned int a2);
void PartyLootSetupWin::OnHelpLink();
void __thiscall PartyLootSelectWin::PartyLootSelectWin(PartyLootSelectWin *this); // idb
void __thiscall PartyLootSelectWin::~PartyLootSelectWin(PartyLootSelectWin *this); // idb
void __thiscall PartyLootSelectWin::OnSlideBtnUp(PartyLootSelectWin *this); // idb
void PartyLootSelectWin::OnHelpLink();
void __thiscall PartyLootSetupWin::SetLooterName(PartyLootSetupWin *this, const char *name); // idb
void __thiscall PartyLootSelectWin::UpdateMeWin(PartyLootSelectWin *this, float fCurTime); // idb
void __thiscall PartyLootSelectWin::OnSlideBar(PartyLootSelectWin *this); // idb
void __thiscall PartyLootSetupWin::~PartyLootSetupWin(PartyLootSetupWin *this); // idb
char __thiscall PartyLootSetupWin::Create(PartyLootSetupWin *this, PgFrameWork *pkFrameWork);
void __thiscall PartyLootSetupWin::UpdateLooterList(PartyLootSetupWin *this); // idb
void __thiscall PartyLootSetupWin::ChangeLooter(PartyLootSetupWin *this, unsigned int index); // idb
// void __userpurge PartyLootSetupWin::OnCommand(PartyLootSetupWin *this@<ecx>, int a2@<edi>, unsigned int wParam, int lParam);
void __thiscall PartyLootSetupWin::DirectMessage(PartyLootSetupWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall PartyLootSetupWin::SetLootingType(PartyLootSetupWin *this, char nLootingType); // idb
void __thiscall PartyLootSetupWin::SetItemGrade(PartyLootSetupWin *this, char nItemGrade); // idb
void __thiscall PartyLootSetupWin::PartyLootSetupWin(PartyLootSetupWin *this); // idb
PartyLootSetupWin *__cdecl PartyLootSetupWin::CreateWin(PgFrameWork *pkFrameWork); // idb
PartyLootSelectWin *__cdecl PartyLootSelectWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall PartyLootSelectWin::OnCommand(PartyLootSelectWin *this, unsigned int wParam, int lParam); // idb
char __thiscall PartyLootSelectWin::Create(PartyLootSelectWin *this, PgFrameWork *pkFrameWork);
PartyLootSelectWin *__thiscall PartyLootSelectWin::`vector deleting destructor'(PartyLootSelectWin *this, unsigned int a2);
PartyLootSetupWin *__thiscall PartyLootSetupWin::`scalar deleting destructor'(PartyLootSetupWin *this, unsigned int a2);
void __thiscall CPartyMatchWin::AddPartyInfo(CPartyMatchWin *this, PROTO_NC_PARTY_FINDER_INFO *pkInfo); // idb
void __thiscall CPartyMatchWin::DelPartyInfo(CPartyMatchWin *this, Name5 *psCharID); // idb
void __stdcall CPartyMatchWin::AbbreviateText(char *pResult, char *pTarget, int nAbbreviationSize);
CPartyFinder::PARTY_FINDER_INFO_LIST *__thiscall CPartyMatchWin::FindList(CPartyMatchWin *this, int nIndexNum); // idb
void __thiscall CPartyMatchWin::ClearList(CPartyMatchWin *this); // idb
void CPartyMatchWin::OnHelpLink();
void __thiscall CPartyMatchWin::UpdateMeWin(CPartyMatchWin *this, float fCurTime); // idb
void __thiscall CPartyMatchWin::OnWinClose(CPartyMatchWin *this); // idb
void __thiscall CPartyMatchWin::OnChangeTab(CPartyMatchWin *this, DirectUserMsgBody_CommunityTabChanged::TabEnum eTab); // idb
void __thiscall CPartyMatchWin::UpdateList(CPartyMatchWin *this); // idb
void __thiscall CPartyMatchWin::ChangeUserName(CPartyMatchWin *this, Name5 *OldName, Name5 *NewName); // idb
void __thiscall CPartyMatchWin::CPartyMatchWin(CPartyMatchWin *this); // idb
void __thiscall CPartyMatchWin::~CPartyMatchWin(CPartyMatchWin *this); // idb
void __thiscall CPartyMatchWin::OnCommand(CPartyMatchWin *this, unsigned int wParam, int lParam); // idb
// bool __userpurge CPartyMatchWin::SetListBriefInfo@<al>(CPartyMatchWin *this@<ecx>, int a2@<edi>, unsigned __int16 wCurrPageNo, unsigned __int16 wMaxPages, bool bHaveOwnInfo);
void __thiscall CPartyMatchWin::OnShowWin(CPartyMatchWin *this); // idb
CPartyMatchWin *__cdecl CPartyMatchWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall CPartyMatchWin::Create(CPartyMatchWin *this, PgFrameWork *pkFrameWork);
CPartyMatchWin *__thiscall CPartyMatchWin::`scalar deleting destructor'(CPartyMatchWin *this, unsigned int a2);
void __thiscall PartyWin::ProcessMeInput(PartyWin *this, bool *bHit); // idb
void __thiscall PartyWin::ClearInfo(PartyWin *this); // idb
const char *__thiscall PartyWin::GetMemberName(PartyWin *this); // idb
void __thiscall PartyWin::~PartyWin(PartyWin *this); // idb
void __thiscall PartyWin::DirectMessage(PartyWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall PartyWin::SetBuffUI(PartyWin *this, Char *pkMember, StateType type, int *AbstateNums); // idb
void __thiscall PartyWin::SetOption(PartyWin *this, unsigned int uiOpt); // idb
void __thiscall PartyWin::OnCommand(PartyWin *this, unsigned int wParam, int lParam); // idb
void __thiscall PartyWin::PartyWin(PartyWin *this); // idb
char __thiscall PartyWin::Create(PartyWin *this, int iXPos, int iYPos, PgWin *pkParent, NiNode *pkNode, PgFrameWork *pkFrameWork);
void __thiscall PartyWin::UpdateMeWin(PartyWin *this, float fCurTime); // idb
void __thiscall PartyWin::SetInfo(PartyWin *this, PartyMemberInfo *pkInfo); // idb
PartyWin *__cdecl PartyWin::CreateWin(int iXPos, int iYPos, PgWin *pkParent, NiNode *pkNode, PgFrameWork *pkFrameWork); // idb
PartyWin *__thiscall PartyWin::`vector deleting destructor'(PartyWin *this, unsigned int a2);
void __thiscall PartyWinInterface::PartyWinInterface(PartyWinInterface *this); // idb
void __thiscall PartyWinInterface::~PartyWinInterface(PartyWinInterface *this); // idb
void __thiscall PartyWinInterface::CreatePartyWin(PartyWinInterface *this, PgFrameWork *pkFrameWork); // idb
void __thiscall PartyWinInterface::DestoryPartyWin(PartyWinInterface *this); // idb
void __thiscall PartyWinInterface::CreateMiniPartyWin(PartyWinInterface *this, PgFrameWork *pkFrameWork); // idb
void __thiscall PartyWinInterface::DestoryMiniPartyWin(PartyWinInterface *this); // idb
void __thiscall PartyWinInterface::SetPartyWinMachineOpt(PartyWinInterface *this); // idb
void __thiscall PartyWinInterface::SetMiniPartyWinMachineOpt(PartyWinInterface *this); // idb
void __thiscall PartyWinInterface::Create(PartyWinInterface *this, PgFrameWork *pkFrameWork); // idb
// void __thiscall PartyWinInterface::Destory(PartyWinInterface *this); idb
void __thiscall PartyWinInterface::UpdatePartyWin(PartyWinInterface *this); // idb
void __thiscall PartyWinInterface::UpdateMiniPartyWin(PartyWinInterface *this); // idb
void __thiscall PartyWinInterface::SetWindowCull(PartyWinInterface *this, bool bIsCull); // idb
// void __thiscall PartyWinInterface::Update(PartyWinInterface *this); idb
void __thiscall PartyWinInterface::TogglePartyWin(PartyWinInterface *this); // idb
void __thiscall PkKqRankingWin::PkKqRankingWin(PkKqRankingWin *this); // idb
void __thiscall PkKqRankingWin::~PkKqRankingWin(PkKqRankingWin *this); // idb
void __thiscall PkKqRankingWin::Clear(PkKqRankingWin *this); // idb
void __thiscall PkKqRankingWin::OnCmdClose(PkKqRankingWin *this); // idb
void __thiscall PkKqRankingWin::SetBaseScore(PkKqRankingWin *this, unsigned int dwBaseScore); // idb
void __thiscall PkKqRankingWin::SortListBy(PkKqRankingWin *this, int iIndex); // idb
void PkKqRankingWin::OnHelpLink();
void __thiscall PkKqRankingWin::AddRanking(PkKqRankingWin *this, char *pcName, unsigned int dwKillPoint, unsigned int dwDownPoint, unsigned int dwContribute, char byMedal, char byGender, char byChrCls, unsigned int dwScore); // idb
void __thiscall PkKqRankingWin::OnCmdSlide(PkKqRankingWin *this); // idb
void __thiscall PkKqRankingWin::OnCommand(PkKqRankingWin *this, unsigned int wParam, int lParam); // idb
char __thiscall PkKqRankingWin::Create(PkKqRankingWin *this, PgFrameWork *pkFrameWork);
PkKqRankingWin *__cdecl PkKqRankingWin::CreateWin(PgFrameWork *pkFrameWork); // idb
PkKqRankingWin *__thiscall PkKqRankingWin::`vector deleting destructor'(PkKqRankingWin *this, unsigned int a2);
BOOL __cdecl PkRealTiemRankWin::RankInfo::greater_Score(PkRealTiemRankWin::RankInfo *lhw, PkRealTiemRankWin::RankInfo *rhw);
BOOL __cdecl GTStatusWin::RankInfo::High_DieCount(PkRealTiemRankWin::RankInfo *lhw, PkRealTiemRankWin::RankInfo *rhw);
void PkRealTiemRankWin::OnHelpLink();
char __thiscall PkRealTiemRankWin::Open(PkRealTiemRankWin *this);
void __thiscall PkRealTiemRankWin::minimizeWindow(PkRealTiemRankWin *this, int btrue);
char __thiscall PkRealTiemRankWin::AddRankPlayerInfo(PkRealTiemRankWin *this, PkRealTiemRankWin::RankInfo *rInfo);
char __thiscall PkRealTiemRankWin::DisplayInfoSetting(PkRealTiemRankWin *this);
void __thiscall PkRealTiemRankWin::PkRealTiemRankWin(PkRealTiemRankWin *this); // idb
void __thiscall PkRealTiemRankWin::~PkRealTiemRankWin(PkRealTiemRankWin *this); // idb
PkRealTiemRankWin *__cdecl PkRealTiemRankWin::CreateWin(PgFrameWork *pFrameWork); // idb
char __thiscall PkRealTiemRankWin::Clear(PkRealTiemRankWin *this);
char __thiscall PkRealTiemRankWin::Close(PkRealTiemRankWin *this, bool bReset);
char __thiscall PkRealTiemRankWin::SetRankInfo(PkRealTiemRankWin *this, const char *pkName, unsigned int unScore, unsigned int Down, unsigned int Kill);
void __thiscall PkRealTiemRankWin::OnCommand(PkRealTiemRankWin *this, unsigned int wParam, int lParam); // idb
char __thiscall PkRealTiemRankWin::Create(PkRealTiemRankWin *this, PgFrameWork *pkFrameWork);
int __cdecl boost::detail::function::function_invoker2<bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),bool,GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &>::invoke(boost::detail::function::any_pointer function_ptr, GuildListWin::GuildInfo *a0, GuildListWin::GuildInfo *a1);
void __thiscall boost::function<void __cdecl (char const *),std::allocator<void>>::~function<void __cdecl (char const *),std::allocator<void>>(boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *this); // idb
PkRealTiemRankWin::RankInfo *__stdcall std::allocator<PkRealTiemRankWin::RankInfo>::allocate(unsigned int _Count);
void __thiscall boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>(boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *this, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *f); // idb
void __cdecl std::_Dest_val<std::allocator<SlideListWin::ListItem::ColumnData>,SlideListWin::ListItem::ColumnData>(std::allocator<SlideListWin::ListItem::ColumnData> *_Alval, SlideListWin::ListItem::ColumnData *_Pdest); // idb
PkRealTiemRankWin::RankInfo *__cdecl std::_Move<PkRealTiemRankWin::RankInfo *,PkRealTiemRankWin::RankInfo *>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, PkRealTiemRankWin::RankInfo *_Dest);
void __cdecl std::_Destroy_range<std::allocator<PkRealTiemRankWin::RankInfo>>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last);
void __cdecl std::swap<PkRealTiemRankWin::RankInfo>(PkRealTiemRankWin::RankInfo *_Left, PkRealTiemRankWin::RankInfo *_Right); // idb
void __cdecl std::_Push_heap<PkRealTiemRankWin::RankInfo *,int,PkRealTiemRankWin::RankInfo,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &)>(PkRealTiemRankWin::RankInfo *_First, int _Hole, int _Top, PkRealTiemRankWin::RankInfo *_Val, bool (__cdecl *_Pred)(PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *)); // idb
PkRealTiemRankWin::RankInfo *__cdecl std::_Move_backward<PkRealTiemRankWin::RankInfo *,PkRealTiemRankWin::RankInfo *>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, PkRealTiemRankWin::RankInfo *_Dest);
void __cdecl std::_Push_heap<PkRealTiemRankWin::RankInfo *,int,PkRealTiemRankWin::RankInfo,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(PkRealTiemRankWin::RankInfo *_First, int _Hole, int _Top, PkRealTiemRankWin::RankInfo *_Val, boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > _Pred); // idb
PkRealTiemRankWin::RankInfo *__cdecl std::_Uninit_move<PkRealTiemRankWin::RankInfo *,PkRealTiemRankWin::RankInfo *,std::allocator<PkRealTiemRankWin::RankInfo>,PkRealTiemRankWin::RankInfo>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, PkRealTiemRankWin::RankInfo *_Dest);
void __cdecl std::_Adjust_heap<PkRealTiemRankWin::RankInfo *,int,PkRealTiemRankWin::RankInfo,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &)>(PkRealTiemRankWin::RankInfo *_First, int _Hole, int _Bottom, PkRealTiemRankWin::RankInfo *_Val, bool (__cdecl *_Pred)(PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *)); // idb
void __cdecl std::_Med3<PkRealTiemRankWin::RankInfo *,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Mid, PkRealTiemRankWin::RankInfo *_Last, boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > _Pred); // idb
void __cdecl std::_Adjust_heap<PkRealTiemRankWin::RankInfo *,int,PkRealTiemRankWin::RankInfo,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(PkRealTiemRankWin::RankInfo *_First, int _Hole, int _Bottom, PkRealTiemRankWin::RankInfo *_Val, boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > _Pred); // idb
void __cdecl std::_Pop_heap<PkRealTiemRankWin::RankInfo *,int,PkRealTiemRankWin::RankInfo,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, PkRealTiemRankWin::RankInfo *_Dest, PkRealTiemRankWin::RankInfo *_Val, boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > _Pred);
void __cdecl std::_Median<PkRealTiemRankWin::RankInfo *,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &)>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Mid, PkRealTiemRankWin::RankInfo *_Last, bool (__cdecl *_Pred)(PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *)); // idb
void __cdecl std::_Make_heap<PkRealTiemRankWin::RankInfo *,int,PkRealTiemRankWin::RankInfo,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &)>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, bool (__cdecl *_Pred)(PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *));
void __cdecl std::_Insertion_sort1<PkRealTiemRankWin::RankInfo *,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),PkRealTiemRankWin::RankInfo>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, bool (__cdecl *_Pred)(PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *));
void __cdecl std::_Median<PkRealTiemRankWin::RankInfo *,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Mid, PkRealTiemRankWin::RankInfo *_Last, boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > _Pred); // idb
void __cdecl std::_Make_heap<PkRealTiemRankWin::RankInfo *,int,PkRealTiemRankWin::RankInfo,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > _Pred);
void __cdecl std::_Insertion_sort1<PkRealTiemRankWin::RankInfo *,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>,PkRealTiemRankWin::RankInfo>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > _Pred);
void __cdecl std::_Pop_heap_0<PkRealTiemRankWin::RankInfo *,PkRealTiemRankWin::RankInfo,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &)>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, bool (__cdecl *_Pred)(PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *));
void __cdecl std::_Pop_heap_0<PkRealTiemRankWin::RankInfo *,PkRealTiemRankWin::RankInfo,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > _Pred);
std::pair<PkRealTiemRankWin::RankInfo *,PkRealTiemRankWin::RankInfo *> *__cdecl std::_Unguarded_partition<PkRealTiemRankWin::RankInfo *,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &)>(std::pair<PkRealTiemRankWin::RankInfo *,PkRealTiemRankWin::RankInfo *> *result, PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, bool (__cdecl *_Pred)(PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *)); // idb
std::pair<PkRealTiemRankWin::RankInfo *,PkRealTiemRankWin::RankInfo *> *__cdecl std::_Unguarded_partition<PkRealTiemRankWin::RankInfo *,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(std::pair<PkRealTiemRankWin::RankInfo *,PkRealTiemRankWin::RankInfo *> *result, PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > _Pred); // idb
void __cdecl std::make_heap<PkRealTiemRankWin::RankInfo *,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > _Pred); // idb
void __cdecl std::_Insertion_sort<PkRealTiemRankWin::RankInfo *,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > _Pred); // idb
void __thiscall std::vector<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo>>::~vector<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo>>(std::vector<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo> > *this); // idb
void __thiscall std::vector<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo>>::reserve(std::vector<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo> > *this, unsigned int _Count); // idb
void __cdecl std::_Sort_heap<PkRealTiemRankWin::RankInfo *,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &)>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, bool (__cdecl *_Pred)(PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *)); // idb
void __cdecl std::_Sort_heap<PkRealTiemRankWin::RankInfo *,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > _Pred); // idb
void __thiscall std::vector<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo>>::_Reserve(std::vector<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo> > *this, unsigned int _Count); // idb
void __cdecl std::sort_heap<PkRealTiemRankWin::RankInfo *,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > _Pred); // idb
PkRealTiemRankWin *__thiscall PkRealTiemRankWin::`scalar deleting destructor'(PkRealTiemRankWin *this, unsigned int a2);
void __thiscall std::vector<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo>>::push_back(std::vector<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo> > *this, PkRealTiemRankWin::RankInfo *_Val); // idb
void __cdecl std::_Sort<PkRealTiemRankWin::RankInfo *,int,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &)>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, int _Ideal, bool (__cdecl *_Pred)(PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *)); // idb
void __cdecl std::_Sort<PkRealTiemRankWin::RankInfo *,int,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, int _Ideal, boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > _Pred); // idb
void __cdecl std::sort<std::_Vector_iterator<std::_Vector_val<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo>>>,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(std::_Vector_iterator<std::_Vector_val<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo> > > _First, std::_Vector_iterator<std::_Vector_val<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo> > > _Last, boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > _Pred); // idb
void __thiscall PlayGuideMinWin::PlayGuideMinWin(PlayGuideMinWin *this); // idb
void __thiscall PlayGuideMinWin::~PlayGuideMinWin(PlayGuideMinWin *this); // idb
void __thiscall PlayGuideMinWin::OnCommand(PlayGuideMinWin *this, unsigned int wParam, int lParam); // idb
bool __thiscall PlayGuideWin::sTextList::Close(PlayGuideWin::sTextList *this); // idb
bool __thiscall PlayGuideWin::sTextList::Up(PlayGuideWin::sTextList *this, const int iTopYPos); // idb
bool __thiscall PlayGuideWin::sTextList::Down(PlayGuideWin::sTextList *this, const int iBottomYPos); // idb
void __thiscall PlayGuideWin::sTextList::Reset(PlayGuideWin::sTextList *this); // idb
void __thiscall PlayGuideWin::OnClose(PlayGuideWin *this); // idb
void PlayGuideWin::AdjustFocus();
void __thiscall PlayGuideMinWin::OnClick(PlayGuideMinWin *this); // idb
void __thiscall PlayGuideWin::OnWinClose(PlayGuideWin *this); // idb
void __thiscall PlayGuideWin::UpdateScroll(PlayGuideWin *this); // idb
// char __userpurge PageWinSpr::HitTest@<al>(PageWinSpr *this@<ecx>, int a2@<ebx>, double a3@<st0>, int iSx, int iSy);
char __thiscall PlayGuideMinWin::Create(PlayGuideMinWin *this, PgFrameWork *pkFrameWork);
void __thiscall PlayGuideWin::InitPos(PlayGuideWin *this, unsigned int uiScreenWidth, unsigned int uiScreenHeight, float fXPosRate, float fYPosRate); // idb
void __thiscall PlayGuideWin::OnTextList(PlayGuideWin *this, const unsigned int uiIndex); // idb
void __thiscall PlayGuideWin::UpdateTextList(PlayGuideWin *this); // idb
void __thiscall PlayGuideWin::Reset(PlayGuideWin *this); // idb
char __thiscall PlayGuideWin::UpdatePageContents(PlayGuideWin *this, BasicInfoLink *pkBasicInfoLink);
void __thiscall PlayGuideWin::EraseAllSpace(PlayGuideWin *this, char *acString); // idb
void __thiscall PlayGuideWin::OnSlideBar(PlayGuideWin *this); // idb
void __thiscall PlayGuideWin::UpdateSelectedPage(PlayGuideWin *this); // idb
void __thiscall PlayGuideWin::OnPageBtn(PlayGuideWin *this, bool IsBtnLeft); // idb
void __thiscall PlayGuideWin::UpdateMeWin(PlayGuideWin *this, float fCurTime); // idb
PageWinSpr *__cdecl PageWinSpr::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, char *pcName, unsigned int uiExtStyle); // idb
PlayGuideMinWin *__cdecl PlayGuideMinWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall PlayGuideWin::PlayGuideWin(PlayGuideWin *this); // idb
void __thiscall PlayGuideWin::~PlayGuideWin(PlayGuideWin *this); // idb
PlayGuideWin *__cdecl PlayGuideWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall PlayGuideWin::SetInfo(PlayGuideWin *this, BasicInfoLinkType eType); // idb
void __thiscall PlayGuideWin::OnSearchBtn(PlayGuideWin *this); // idb
void __thiscall PlayGuideWin::OpenPlayGuideSearchList(PlayGuideWin *this, char *acUIFile); // idb
void __thiscall PlayGuideWin::OnEditEnd(PlayGuideWin *this, unsigned int wParam, int lParam); // idb
void __thiscall PageWinSpr::SetToolTip(PageWinSpr *this, const char *pcText); // idb
char __thiscall PlayGuideWin::Create(PlayGuideWin *this, PgFrameWork *pkFrameWork);
void __thiscall PlayGuideWin::OnCommand(PlayGuideWin *this, unsigned int wParam, int lParam); // idb
PlayGuideMinWin *__thiscall PlayGuideMinWin::`vector deleting destructor'(PlayGuideMinWin *this, unsigned int a2);
BasicInfoLink *__cdecl BasicInfoLinkTab::GetByType(BasicInfoLinkType eType); // idb
BasicInfoLink *__cdecl BasicInfoLinkTab::GetByCategory(BasicInfoCategory eCategory); // idb
BasicInfoFindWord *__cdecl BasicInfoFindWordTab::GetByFindType(BasicInfoFindType eType); // idb
PageWinSpr *__thiscall PageWinSpr::`scalar deleting destructor'(PageWinSpr *this, unsigned int a2);
void __cdecl BasicInfoFindTab::GetListByFindType(BasicInfoFindType eType, std::vector<BasicInfoFind *,std::allocator<BasicInfoFind *> > *pkBasicInfoFindVector, bool *pabTypeCheck); // idb
void __cdecl BasicInfoFindWordTab::GetListByWord(char *FindWord, std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *> > *BasicInfoFindWordVector); // idb
PlayGuideWin *__thiscall PlayGuideWin::`scalar deleting destructor'(PlayGuideWin *this, unsigned int a2);
void __cdecl PopupMenuTemplate::Terminate(); // idb
NiD3DDefaultShader *__cdecl PopupMenuTemplate::GetResolutionMenu(unsigned int uiParam);
NiD3DDefaultShader *__cdecl PopupMenuTemplate::AccountFrameGetResolutionMenu(unsigned int uiParam);
NiD3DDefaultShader *__cdecl PopupMenuTemplate::GetWingStonePositionList(unsigned int uiParam, char *pcText, unsigned __int16 id);
PopupMenuText *__cdecl PopupMenuTemplate::GetmhUI_FocusObjCancel();
PopupMenu *__cdecl PopupMenuTemplate::GetTargetCharName(unsigned int uiParam); // idb
PgWin *__cdecl PopupMenuTemplate::GetProposeTradeMenu(unsigned int uiParam);
PopupMenu *__cdecl PopupMenuTemplate::GetMainCharUnMetamorphosis(); // idb
PgWin *__cdecl PopupMenuTemplate::GetInvitePartyMenu(unsigned int uiParam);
PopupMenu *__cdecl PopupMenuTemplate::GetCancelMenu(); // idb
PgWin *__cdecl PopupMenuTemplate::GetFirePartyMemberMenu(unsigned int uiParam);
PopupMenu *__cdecl PopupMenuTemplate::GetInviteGuildMenu(unsigned int uiParam); // idb
PgWin *__cdecl PopupMenuTemplate::GetDelegatePartyChiefMenu(unsigned int uiParam);
PopupMenu *__cdecl PopupMenuTemplate::GetQuitPartyMenu(); // idb
// NiD3DDefaultShader *__usercall PopupMenuTemplate::GetPartyMasterLootSetupMenu@<eax>(int a1@<edi>, PARTY_ITEM_LOOTING_TYPE eDistType);
NiD3DDefaultShader *__cdecl PopupMenuTemplate::GetPartyMemberLootSetupMenu(PARTY_ITEM_LOOTING_TYPE eDistType);
PopupMenu *__cdecl PopupMenuTemplate::GetFollowCharMenu(unsigned int uiParam); // idb
PopupMenu *__cdecl PopupMenuTemplate::GetChatWhisperMenu(unsigned int uiParam); // idb
PopupMenuText *__cdecl PopupMenuTemplate::GetmhUI_Endure(int iEndure);
PopupMenuText *__cdecl PopupMenuTemplate::GetmhUI_EndurePercentage(int iEndurePer);
PopupMenuText *__cdecl PopupMenuTemplate::GetmhUI_GuestListConfigRoomMenu();
PopupMenuText *__cdecl PopupMenuTemplate::GetmhUI_GuestListShowBlogMenu();
PopupMenuText *__cdecl PopupMenuTemplate::GetmhUI_GuestListChangeBlogAddrMenu();
PopupMenuText *__cdecl PopupMenuTemplate::GetmhUI_GuestListKickGuestMenu();
PopupMenuText *__cdecl PopupMenuTemplate::GetmhUI_GuestListSetArrangeModeOnMenu();
PopupMenuText *__cdecl PopupMenuTemplate::GetmhUI_GuestListSetArrangeModeOffMenu();
PopupMenu *__cdecl PopupMenuTemplate::GetmhUI_ReturnToInvMHItem(bool ClickInv); // idb
PopupMenuText *__cdecl PopupMenuTemplate::GetmhUI_ArrToInvMHItem();
PopupMenuText *__cdecl PopupMenuTemplate::GetmhUI_DeleteMHItem();
PopupMenuText *__cdecl PopupMenuTemplate::GetmhUI_ObjAction();
PopupMenuText *__cdecl PopupMenuTemplate::GetmhUI_ReArrange();
PopupMenu *__cdecl PopupMenuTemplate::GetInviteHighHolyPromise(unsigned int uiParam); // idb
PopupMenu *__cdecl PopupMenuTemplate::GetPartyBuffMenu(unsigned int uiParam); // idb
PgWin *__cdecl PopupMenuTemplate::GetRaidMemberSelectMenu(unsigned int uiParam);
PgWin *__cdecl PopupMenuTemplate::GetRaidMemberInviteMenu(unsigned int uiParam);
PgWin *__cdecl PopupMenuTemplate::GetRaidMemberVanishMenu(unsigned int uiParam);
PgWin *__cdecl PopupMenuTemplate::GetRaidMemberLeaveMenu(unsigned int uiParam);
PgWin *__cdecl PopupMenuTemplate::GetChangeRaidLeaderMenu(unsigned int uiParam);
PgWin *__cdecl PopupMenuTemplate::GetChangeRaidLooterMenu(unsigned int uiParam);
PgWin *__cdecl PopupMenuTemplate::GetUpRaidSubLeaderMenu(unsigned int uiParam);
PgWin *__cdecl PopupMenuTemplate::GetDownRaidSubLeaderMenu(unsigned int uiParam);
PopupMenu *__cdecl PopupMenuTemplate::GetPartyLootSetupMenu(); // idb
PgWin *__cdecl PopupMenuTemplate::GetCollectOpenMenu(unsigned int uiParam);
PgWin *__cdecl PopupMenuTemplate::GetInviteFriendMenu(unsigned int uiParam);
PgWin *__cdecl PopupMenuTemplate::GetRideOnMenu(unsigned int uiParam);
PgWin *__cdecl PopupMenuTemplate::GetVoteMenu(unsigned int uiParam);
PopupMenu *__cdecl PopupMenuTemplate::GetmhUI_ObjName(char *pObjName); // idb
void __thiscall PopupMenuSubMenu::SetPopupMenu(PopupMenuSubMenu *this, PopupMenuWin *pkPopupMenuWin); // idb
void __thiscall PopupMenu::PopupMenu(PopupMenu *this); // idb
void __thiscall PopupMenu::~PopupMenu(PopupMenu *this); // idb
void __thiscall PopupMenu::SetClickEvent(PopupMenu *this, int iMsg, void *pvMsgBody); // idb
void __thiscall PopupMenuText::Resize(PopupMenuText *this, unsigned int dwWidth, unsigned int dwHeight); // idb
void __thiscall PopupMenuText::GetExtent(PopupMenuText *this, unsigned int *rdwWidth, unsigned int *rdwHeight); // idb
void __thiscall PopupMenuText::OnChangeButShow(PopupMenuText *this, PgWinBut::ButShow eShow); // idb
void __thiscall PopupMenuTextCheck::Resize(PopupMenuTextCheck *this, unsigned int dwWidth, unsigned int dwHeight); // idb
void __thiscall PopupMenuTextCheck::GetExtent(PopupMenuTextCheck *this, unsigned int *rdwWidth, unsigned int *rdwHeight); // idb
void __thiscall PopupMenuTextCheck::OnCommand(PopupMenuTextCheck *this, unsigned int wParam, int lParam); // idb
char __thiscall PopupMenuWin::Create(PopupMenuWin *this, NiSourceTexture *pkTexture, unsigned int uiEdgeWidth, unsigned int uiEdgeHeight, PgFrameWork *pkFrameWork);
void __thiscall PopupMenuWin::OnCommand(PopupMenuWin *this, unsigned int wParam, int lParam); // idb
void __thiscall PopupMenuWin::SetReceiver(PopupMenuWin *this, PgWin *pkReceiver); // idb
char __thiscall PopupMenuText::Create(PopupMenuText *this, unsigned int uiWidth, unsigned int uiHeight, char *pcText, PgWin *pkParent, unsigned int uiCmdMsg, char *pcName, unsigned int uiExtStyle, bool bBold);
void __thiscall PopupMenuTextCheck::DirectMessage(PopupMenuTextCheck *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
char __thiscall PopupMenuWin::IsMenuIDShow(PopupMenuWin *this, PopupMenuID eID);
void __thiscall PopupMenuWin::FinishMenu(PopupMenuWin *this, unsigned int uiMinimumWidth); // idb
void __thiscall PopupMenu::DoAction(PopupMenu *this); // idb
char __thiscall PopupMenuTextCheck::Create(PopupMenuTextCheck *this, unsigned int uiWidth, unsigned int uiHeight, char *pcText, PgWin *pkParent, unsigned int uiCmdMsg, char *pcName, unsigned int uiExtStyle);
void __thiscall PopupMenuTextCheck::DoAction(PopupMenuTextCheck *this); // idb
void __thiscall PopupMenuSubMenu::DoAction(PopupMenuSubMenu *this); // idb
void __thiscall PopupMenuWin::~PopupMenuWin(PopupMenuWin *this); // idb
void __thiscall PopupMenuWin::Clear(PopupMenuWin *this); // idb
// char __userpurge PopupMenuWin::AddMenu@<al>(PopupMenuWin *this@<ecx>, int a2@<edi>, PopupMenu *pkMenu);
void __thiscall PopupMenuWin::PopupMenuWin(PopupMenuWin *this); // idb
void __thiscall PopupMenuWin::UpdateMeWin(PopupMenuWin *this, float fCurTime); // idb
PopupMenuText *__cdecl PopupMenuText::CreateWin(char *pcText, unsigned int uiCmdMsg, unsigned int uiCmdParam, PgWin *pkParent, char *pcName, unsigned int uiExtStyle, bool bBold); // idb
PopupMenuTextCheck *__cdecl PopupMenuTextCheck::CreateWin(char *pcText, unsigned int uiCmdMsg, unsigned int uiCmdParam, PgWin *pkParent, char *pcName, unsigned int uiExtStyle); // idb
PopupMenuWin *__cdecl PopupMenuWin::CreateWin(NiSourceTexture *pkTexture, unsigned int uiEdgeHeight, unsigned int uiEdgeWidth, PgFrameWork *pkFrameWork); // idb
PgWin *__cdecl PopupMenuSubMenu::CreateWin(char *pcText, unsigned int uiCmdMsg, unsigned int uiCmdParam, PgWin *pkParent, char *pcName, unsigned int uiExtStyle);
void __thiscall PopupMenuText::~PopupMenuText(PopupMenuText *this); // idb
PopupMenuTextCheck *__thiscall PopupMenuTextCheck::`vector deleting destructor'(PopupMenuTextCheck *this, unsigned int a2);
void __thiscall PopupMenuSubMenu::~PopupMenuSubMenu(PopupMenuSubMenu *this); // idb
PopupMenuWin *__thiscall PopupMenuWin::`vector deleting destructor'(PopupMenuWin *this, unsigned int a2);
PopupMenuSubMenu *__thiscall PopupMenuSubMenu::`vector deleting destructor'(PopupMenuSubMenu *this, unsigned int a2);
void __thiscall PrisonTimeWin::PrisonTimeWin(PrisonTimeWin *this); // idb
void __thiscall PrisonTimeWin::~PrisonTimeWin(PrisonTimeWin *this); // idb
void __thiscall PrisonTimeWin::UpdateMeWin(PrisonTimeWin *this, float fCurTime); // idb
void __thiscall PrisonTimeWin::ResetTime(PrisonTimeWin *this, unsigned int second); // idb
char __thiscall PrisonTimeWin::Create(PrisonTimeWin *this, PgFrameWork *pkFrameWork);
PrisonTimeWin *__cdecl PrisonTimeWin::CreateWin(PgFrameWork *pkFrameWork); // idb
PrisonTimeWin *__thiscall PrisonTimeWin::`vector deleting destructor'(PrisonTimeWin *this, unsigned int a2);
void __thiscall PrivateStoreInvWin::PrivateStoreInvWin(PrivateStoreInvWin *this); // idb
char __thiscall PrivateStoreInvWin::Create(PrivateStoreInvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent);
void __thiscall PrivateStoreInvWin::SetInvType(PrivateStoreInvWin *this, unsigned int uiInvType); // idb
void __thiscall PrivateStoreInvWin::OnFirstHitWin(PrivateStoreInvWin *this); // idb
void __thiscall PrivateStoreInvWin::SetLotText(PrivateStoreInvWin *this, unsigned int uiLot); // idb
void __thiscall PrivateStoreWin::PrivateStoreWin(PrivateStoreWin *this); // idb
void __thiscall PrivateStoreWin::~PrivateStoreWin(PrivateStoreWin *this); // idb
void __thiscall PrivateStoreWin::OnBuyItem(PrivateStoreWin *this, unsigned int uiLot); // idb
void __thiscall PrivateStoreWin::OnCmdCancel(PrivateStoreWin *this); // idb
void __thiscall PrivateStoreWin::OnShowWin(PrivateStoreWin *this); // idb
void __thiscall PrivateStoreWin::OnSellMoneyOK(PrivateStoreWin *this); // idb
void __thiscall PrivateStoreWin::ClearItems(PrivateStoreWin *this); // idb
void __stdcall PrivateStoreWin::SetBoothSize(char bySize);
void PrivateStoreWin::OnHelpLink();
void __thiscall PrivateStoreInvWin::~PrivateStoreInvWin(PrivateStoreInvWin *this); // idb
void __thiscall PrivateStoreInvWin::UpdateMeWin(PrivateStoreInvWin *this, float fCurTime); // idb
void __thiscall PrivateStoreWin::OnClose(PrivateStoreWin *this); // idb
void __thiscall PrivateStoreWin::UpdateMeWin(PrivateStoreWin *this, float fCurTime); // idb
void __thiscall PrivateStoreWin::OnSellMoneyCancel(PrivateStoreWin *this); // idb
void __thiscall PrivateStoreWin::OnBuyMoneyCancel(PrivateStoreWin *this); // idb
void __thiscall PrivateStoreInvWin::DoAction(PrivateStoreInvWin *this); // idb
void __thiscall PrivateStoreInvWin::DoRAction(PrivateStoreInvWin *this); // idb
void __thiscall PrivateStoreWin::OnCmdInvRClick(PrivateStoreWin *this, unsigned int uiInvIndex); // idb
void __thiscall PrivateStoreWin::OnCmdInvLClick(PrivateStoreWin *this, unsigned int uiInvIndex); // idb
void __thiscall PrivateStoreWin::OnCmdOk(PrivateStoreWin *this); // idb
void __thiscall PrivateStoreWin::SetPrivateStoreOpen(PrivateStoreWin *this, bool bRes); // idb
char __thiscall PrivateStoreWin::DropOnMyInv(PrivateStoreWin *this, DropContents *pkContents, unsigned int uiReceiverInvIndex);
void __thiscall PrivateStoreWin::OnBuyMoneyOK(PrivateStoreWin *this); // idb
void __thiscall PrivateStoreWin::SetPrivateStoreMode(PrivateStoreWin *this, unsigned int uiMode); // idb
void __thiscall PrivateStoreWin::OnInputBuyItemCount(PrivateStoreWin *this, unsigned int uiBuyLot); // idb
char __thiscall PrivateStoreInvWin::EatDropInstance(PrivateStoreInvWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
void __thiscall PrivateStoreWin::OnCommand(PrivateStoreWin *this, unsigned int wParam, int lParam); // idb
PrivateStoreInvWin *__cdecl PrivateStoreInvWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent); // idb
PrivateStoreWin *__cdecl PrivateStoreWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall PrivateStoreWin::Create(PrivateStoreWin *this, PgFrameWork *pkFrameWork);
PrivateStoreWin *__thiscall PrivateStoreWin::`vector deleting destructor'(PrivateStoreWin *this, unsigned int a2);
PrivateStoreInvWin *__thiscall PrivateStoreInvWin::`vector deleting destructor'(PrivateStoreInvWin *this, unsigned int a2);
// void __userpurge MaterialItemIcon::SetItemAsMaterial(MaterialItemIcon *this@<ecx>, int a2@<edi>, unsigned int dwNeededMaterialLot, int itemid, unsigned int dwLot);
bool __thiscall MaterialItemIcon::Create(MaterialItemIcon *this, int iXPos, int iYPos, PgWin *pkParent); // idb
void __thiscall ProductionWin::ProductionWin(ProductionWin *this); // idb
void __thiscall ProductionWin::~ProductionWin(ProductionWin *this); // idb
int __cdecl GetNeedExpForProduceSkillGrade(int iLevel); // idb
int __cdecl GetProduceSkillGradeByExp(unsigned int dwExp); // idb
void __thiscall ProductionWin::OnQuit(ProductionWin *this); // idb
void ProductionWin::OnHelpLink();
void __thiscall ProductionWin::UpdateMeWin(ProductionWin *this, float fCurTime); // idb
void __thiscall ProductionWin::OnClose(ProductionWin *this); // idb
unsigned int __cdecl GetProduceSkillExp(TotalMasteryType eType); // idb
int __cdecl GetProduceSkillGrade(unsigned __int16 id); // idb
void __thiscall ProductionWin::ProduceStartCurrentSelected(ProductionWin *this); // idb
void __thiscall ProductionWin::ProduceStop(ProductionWin *this); // idb
char __thiscall ProductionWin::ProduceComplete(ProductionWin *this);
MaterialItemIcon *__cdecl MaterialItemIcon::CreateWin(int iXPos, int iYPos, PgWin *pkParent); // idb
ProductionWin *__cdecl ProductionWin::CreateWin(PgFrameWork *pkFrameWork); // idb
int __cdecl GetNeededMaterialInfo(ProduceInfo *pkProduceInfo, NeededMaterialInfo *pkMaterialInfo); // idb
ItemInfo *__cdecl GetItemNameByInxName(char *pcInxName);
char __cdecl AddProductSkillTextInList(ProduceInfo *pkProduce, SlideListWin *pkListWin, bool bMyGradeIsLow, TotalMasteryType eType);
unsigned int __cdecl AddProductSkillTextInListByType(TotalMasteryType eType, unsigned int iGrade, SlideListWin *pkListWin, bool bMyGradeIsLow);
// void __userpurge ProductionWin::SetCurrentProduction(ProductionWin *this@<ecx>, D3DXCOLOR *a2@<edi>, ProduceInfo *pkInfo, bool bFirstTime);
void __thiscall ProductionWin::RefreshProductSkillList(ProductionWin *this); // idb
void __thiscall ProductionWin::OnSelChange(ProductionWin *this); // idb
void __thiscall ProductionWin::OnCommand(ProductionWin *this, unsigned int wParam, int lParam); // idb
void __thiscall ProductionWin::RefreshProductItemState(ProductionWin *this); // idb
void __thiscall ProductionWin::OpenDialog(ProductionWin *this, unsigned __int16 kSkillID); // idb
void __thiscall ProductionWin::OnShowWin(ProductionWin *this); // idb
char __thiscall ProductionWin::Create(ProductionWin *this, PgFrameWork *pkFrameWork);
ProductionWin *__thiscall ProductionWin::`vector deleting destructor'(ProductionWin *this, unsigned int a2);
ProduceViewInfo *__cdecl ProduceViewInfoTable::GetByID(unsigned __int16 kSkillID); // idb
void ProductSkillSelectWin::OnHelpLink();
void __thiscall ProductSkillSelectWin::ProductSkillSelectWin(ProductSkillSelectWin *this); // idb
void __thiscall ProductSkillSelectWin::~ProductSkillSelectWin(ProductSkillSelectWin *this); // idb
char __thiscall ProductSkillSelectWin::Create(ProductSkillSelectWin *this, PgFrameWork *pkFrameWork);
void __thiscall ProductSkillSelectWin::DirectMessage(ProductSkillSelectWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall ProductSkillSelectWin::OnCommand(ProductSkillSelectWin *this, unsigned int wParam, int lParam); // idb
void __thiscall ProductSkillSelectWin::OnShowWin(ProductSkillSelectWin *this); // idb
ProductSkillSelectWin *__cdecl ProductSkillSelectWin::CreateWin(PgFrameWork *pkFrameWork); // idb
ProductSkillSelectWin *__thiscall ProductSkillSelectWin::`vector deleting destructor'(ProductSkillSelectWin *this, unsigned int a2);
void __thiscall RebirthMenuWin::SetAutoRevieTime(RebirthMenuWin *this, char auMin); // idb
void __thiscall RebirthMenuWin::SetDeadTime(RebirthMenuWin *this, float fTime); // idb
void __thiscall RebirthMenuWin::OnTimer(RebirthMenuWin *this); // idb
void __thiscall RebirthMenuWin::OnCancel(RebirthMenuWin *this); // idb
void RebirthMenuWin::OnOk();
void __thiscall RebirthMenuWin::~RebirthMenuWin(RebirthMenuWin *this); // idb
char __thiscall RebirthMenuWin::Create(RebirthMenuWin *this, PgFrameWork *pkFrameWork);
void __thiscall RebirthMenuWin::UpdateMeWin(RebirthMenuWin *this, float fCurTime); // idb
void __thiscall RebirthMenuWin::OnCommand(RebirthMenuWin *this, unsigned int wParam, int lParam); // idb
void __thiscall RebirthMenuWin::RebirthMenuWin(RebirthMenuWin *this); // idb
RebirthMenuWin *__cdecl RebirthMenuWin::CreateWin(PgFrameWork *pkFrameWork); // idb
RebirthMenuWin *__thiscall RebirthMenuWin::`vector deleting destructor'(char *this, unsigned int a2);
RebirthMenuWin *__thiscall RebirthMenuWin::`scalar deleting destructor'(RebirthMenuWin *this, unsigned int a2);
void __thiscall ReportWin::ReportWin(ReportWin *this); // idb
void __thiscall ReportWin::~ReportWin(ReportWin *this); // idb
void __thiscall ReportWin::OnCmdCancel(ReportWin *this); // idb
void __thiscall ReportWin::SetCharName(ReportWin *this, const char *name); // idb
void __thiscall ReportWin::SetProcessText(ReportWin *this, const char *text); // idb
void __thiscall ReportWin::SetRegID(ReportWin *this, int iRegID); // idb
void __thiscall ReportWin::SetReportInfoInput(ReportWin *this, const char *text); // idb
void __thiscall ReportWin::SetOKButText(ReportWin *this, const char *text); // idb
void __thiscall ReportWin::ShowOKButton(ReportWin *this, int bShow);
void ReportWin::OnHelpLink();
char __thiscall ReportWin::Create(ReportWin *this, PgFrameWork *pkFrameWork);
void __thiscall ReportWin::OnCmdOk(ReportWin *this); // idb
void __thiscall ReportWin::SetMode(ReportWin *this, ReportWin::REPORT_MODE eMode); // idb
void __thiscall ReportWin::SetReportAdd(ReportWin *this, int nRegNum); // idb
void __thiscall ReportWin::SetReportAddErr(ReportWin *this); // idb
void __thiscall ReportWin::OnCommand(ReportWin *this, unsigned int wParam, int lParam); // idb
ReportWin *__cdecl ReportWin::CreateWin(PgFrameWork *pkFrameWork); // idb
ReportWin *__thiscall ReportWin::`vector deleting destructor'(ReportWin *this, unsigned int a2);
void __thiscall ReviveMenuWin::SetDeadTime(ReviveMenuWin *this, float fTime); // idb
void __thiscall ReviveMenuWin::SetAutoRevieTime(ReviveMenuWin *this, char auMin); // idb
void __thiscall ReviveMenuWin::SetAutoRevieTimeSec(ReviveMenuWin *this, char auSec); // idb
void __thiscall ReviveMenuWin::SetCanReviveItem(ReviveMenuWin *this, char bCanReviveItem); // idb
void ReviveMenuWin::OnItemMall();
void __thiscall ReviveMenuWin::SetBtnText(ReviveMenuWin *this, ReviveMenuWin::BtnIndex e, const char *Text); // idb
void __thiscall ReviveMenuWin::SetPriority(ReviveMenuWin *this, char byPriority); // idb
char __thiscall ReviveMenuWin::GetPriority(ReviveMenuWin *this); // idb
void ReviveMenuWin::OnHelpLink();
void __thiscall ReviveMenuWin::OnRevive(ReviveMenuWin *this); // idb
void __thiscall ReviveMenuWin::EnableBtns(ReviveMenuWin *this, ReviveMenuWin::BtnIndex e, int state);
void __thiscall ReviveMenuWin::ReviveMenuWin(ReviveMenuWin *this); // idb
void __thiscall ReviveMenuWin::~ReviveMenuWin(ReviveMenuWin *this); // idb
char __thiscall ReviveMenuWin::Create(ReviveMenuWin *this, PgFrameWork *pkFrameWork);
// void __userpurge ReviveMenuWin::UpdateMeWin(ReviveMenuWin *this@<ecx>, int a2@<esi>, float fCurTime);
void __thiscall ReviveMenuWin::OnClose(ReviveMenuWin *this); // idb
void __thiscall ReviveMenuWin::OnReviveFromItem(ReviveMenuWin *this); // idb
void __thiscall ReviveMenuWin::OnReviveFromCleric(ReviveMenuWin *this); // idb
void __thiscall ReviveMenuWin::SetReviveBtn(ReviveMenuWin *this, unsigned int Count); // idb
void __thiscall ReviveMenuWin::OnCommand(ReviveMenuWin *this, unsigned int wParam, int lParam); // idb
ReviveMenuWin *__cdecl ReviveMenuWin::CreateWin(PgFrameWork *pkFrameWork); // idb
ReviveMenuWin *__thiscall ReviveMenuWin::`scalar deleting destructor'(ReviveMenuWin *this, unsigned int a2);
char __thiscall RewardInvWin::Create(RewardInvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent);
void __thiscall RewardWin::RewardWin(RewardWin *this); // idb
void __thiscall RewardWin::~RewardWin(RewardWin *this); // idb
void __thiscall RewardWin::OnInvLClick(RewardWin *this, unsigned int uiInvIndex); // idb
char __stdcall RewardWin::HasSelectableReward(unsigned __int16 qID);
int __thiscall RewardWin::GetRealSelectReword(RewardWin *this); // idb
void __thiscall RewardWin::SetNpcRewardMode(RewardWin *this, bool b); // idb
void __thiscall RewardWin::ShowSelectInvWin(RewardWin *this, int b);
int __stdcall RewardWin::GetRewardItemCount(unsigned __int16 qID);
void __thiscall RewardInvWin::OnFirstHitWin(RewardInvWin *this); // idb
void __thiscall RewardInvWin::ShowSelected(RewardInvWin *this, bool b); // idb
void __thiscall RewardWin::OnCommand(RewardWin *this, unsigned int wParam, int lParam); // idb
RewardInvWin *__thiscall RewardWin::GetFreeSlot(RewardWin *this); // idb
RewardInvWin *__thiscall RewardWin::GetFreeSelectSlot(RewardWin *this); // idb
void __thiscall RewardWin::UpdateMeWin(RewardWin *this, float fCurTime); // idb
void __thiscall RewardInvItem::RewardInvItem(RewardInvItem *this, QUEST_DATA::QUEST_REWARD_TYPE eType); // idb
void __thiscall RewardInvItem::~RewardInvItem(RewardInvItem *this); // idb
void __thiscall RewardInvWin::~RewardInvWin(RewardInvWin *this); // idb
void __thiscall RewardInvWin::DoAction(RewardInvWin *this); // idb
void __thiscall RewardInvWin::DoRAction(RewardInvWin *this); // idb
void __thiscall RewardInvWin::SetRewardInvItem(RewardInvWin *this, RewardInvItem *pkRewardItem); // idb
void __thiscall RewardWin::ResetContents(RewardWin *this); // idb
void __thiscall RewardWin::UpdateReward(RewardWin *this, unsigned __int16 qID); // idb
void __thiscall RewardInvWin::RewardInvWin(RewardInvWin *this); // idb
RewardInvWin *__cdecl RewardInvWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent); // idb
RewardWin *__cdecl RewardWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall RewardWin::Create(RewardWin *this, PgFrameWork *pkFrameWork);
RewardWin *__thiscall RewardWin::`scalar deleting destructor'(RewardWin *this, unsigned int a2);
RewardInvItem *__thiscall RewardInvItem::`vector deleting destructor'(RewardInvItem *this, unsigned int a2);
RewardInvWin *__thiscall RewardInvWin::`scalar deleting destructor'(RewardInvWin *this, unsigned int a2);
void __thiscall RidePetWin::DirectMessage(RidePetWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall RidePetWin::RidePetWin(RidePetWin *this); // idb
void __thiscall RidePetWin::~RidePetWin(RidePetWin *this); // idb
void __thiscall RidePetWin::EnablePetFaceAni(RidePetWin *this); // idb
void __thiscall RidePetWin::UpdateFaceCut(RidePetWin *this); // idb
void __thiscall RidePetWin::SetHungryPoint(RidePetWin *this, int nCur); // idb
void __thiscall RidePetWin::Normalize(RidePetWin *this, int b);
char __thiscall RidePetWin::Create(RidePetWin *this, PgFrameWork *pkFrameWork);
void __thiscall RidePetWin::ProcessMeInput(RidePetWin *this, bool *bHit); // idb
void __thiscall RidePetWin::SetPetID(RidePetWin *this, unsigned int uiPetID); // idb
RidePetWin *__cdecl RidePetWin::CreateWin(PgFrameWork *pkFrameWork); // idb
// char __userpurge RidePetWin::EatDropInstance@<al>(RidePetWin *this@<ecx>, int a2@<edi>, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
void __thiscall RidePetWin::UpdateMeWin(RidePetWin *this, float fCurTime); // idb
RIDING *__cdecl RidePetTable::GetByID(unsigned int nActionID); // idb
RidePetWin *__thiscall RidePetWin::`vector deleting destructor'(RidePetWin *this, unsigned int a2);
void RoarWin::OnHelpLink();
void __thiscall RoarWin::OnCmdCancel(RoarWin *this); // idb
void __thiscall RoarWin::SetLockInvPos(RoarWin *this, unsigned int uiInvPos); // idb
void __thiscall RoarWin::UpdateMeWin(RoarWin *this, float fCurTime); // idb
void __thiscall RoarWin::OnEditEnd(RoarWin *this, unsigned int wParam, int lParam); // idb
void __thiscall RoarWin::RoarWin(RoarWin *this); // idb
void __thiscall RoarWin::~RoarWin(RoarWin *this); // idb
char __thiscall RoarWin::Create(RoarWin *this, PgFrameWork *pkFrameWork);
ProcessingString *__stdcall RoarWin::FilterRemoveEnter(char *pcStr);
RoarWin *__cdecl RoarWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall RoarWin::OnCmdOk(RoarWin *this); // idb
void __thiscall RoarWin::OnCommand(RoarWin *this, unsigned int wParam, int lParam); // idb
RoarWin *__thiscall RoarWin::`scalar deleting destructor'(RoarWin *this, unsigned int a2);
void __thiscall RollingDiceWin::RollingDiceWin(RollingDiceWin *this); // idb
void __thiscall RollingDiceWin::~RollingDiceWin(RollingDiceWin *this); // idb
// void __userpurge RollingDiceWin::OnCommand(RollingDiceWin *this@<ecx>, int a2@<edi>, unsigned int wParam, int lParam);
void __thiscall RollingDiceWin::Stop(RollingDiceWin *this); // idb
void __thiscall RollingDiceMsgWin::RollingDiceMsgWin(RollingDiceMsgWin *this); // idb
void __thiscall RollingDiceMsgWin::~RollingDiceMsgWin(RollingDiceMsgWin *this); // idb
void __thiscall RollingDiceMsgWin::OnCommand(RollingDiceMsgWin *this, unsigned int wParam, int lParam); // idb
// void __userpurge RollingDiceMsgWin::SetItemInfo(RollingDiceMsgWin *this@<ecx>, int a2@<edi>, int kItemID, unsigned __int16 kItemHandle);
void __thiscall RollingDiceMsgWin::UpdateMeWin(RollingDiceMsgWin *this, float fCurTime); // idb
char __thiscall RollingDiceWin::Create(RollingDiceWin *this, PgFrameWork *pkFrameWork);
char __thiscall RollingDiceMsgWin::Create(RollingDiceMsgWin *this, PgFrameWork *pkFrameWork);
void __thiscall RollingDiceWin::SetDiceInfo(RollingDiceWin *this, unsigned __int16 kItemHandle, int iTimeSec); // idb
void __thiscall RollingDiceWin::UpdateMeWin(RollingDiceWin *this, float fCurTime); // idb
RollingDiceWin *__cdecl RollingDiceWin::CreateWin(PgFrameWork *pkFrameWork); // idb
RollingDiceMsgWin *__cdecl RollingDiceMsgWin::CreateWin(PgFrameWork *pkFrameWork); // idb
RollingDiceWin *__thiscall RollingDiceWin::`vector deleting destructor'(RollingDiceWin *this, unsigned int a2);
RollingDiceMsgWin *__thiscall RollingDiceMsgWin::`vector deleting destructor'(RollingDiceMsgWin *this, unsigned int a2);
void __thiscall ScreenWin::ScreenWin(ScreenWin *this); // idb
void __thiscall ScreenWin::~ScreenWin(ScreenWin *this); // idb
char __thiscall ScreenWin::Create(ScreenWin *this, PgFrameWork *pkFrameWork);
void __thiscall ScreenWin::UpdateMeWin(ScreenWin *this, float fCurTime); // idb
void __thiscall ScreenWin::ProcessMeInput(ScreenWin *this, bool *bHit); // idb
bool __stdcall ScreenWin::EatDropReference(PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
ScreenWin *__cdecl ScreenWin::CreateWin(PgFrameWork *pkFrameWork); // idb
ScreenWin *__thiscall ScreenWin::`scalar deleting destructor'(ScreenWin *this, unsigned int a2);
void __thiscall ServerMenuWin::SetPriority(ServerMenuWin *this, char byPriority); // idb
char __thiscall ServerMenuWin::GetPriority(ServerMenuWin *this); // idb
void __thiscall ServerMenuWin::OnBut0(ServerMenuWin *this); // idb
void __thiscall ServerMenuWin::OnBut1(ServerMenuWin *this); // idb
void __thiscall ServerMenuWin::OnBut2(ServerMenuWin *this); // idb
void __thiscall ServerMenuWin::OnBut3(ServerMenuWin *this); // idb
void __thiscall ServerMenuWin::OnBut4(ServerMenuWin *this); // idb
void __thiscall ServerMenuWin::SetMsg(ServerMenuWin *this, char *pcText); // idb
void __thiscall ServerMenuWin::~ServerMenuWin(ServerMenuWin *this); // idb
char __thiscall ServerMenuWin::Create(ServerMenuWin *this, PgFrameWork *pkFrameWork);
char __thiscall ServerMenuWin::SetServerMenu(ServerMenuWin *this, PROTO_NC_MENU_SERVERMENU_REQ *pkProto);
void __thiscall ServerMenuWin::OnCommand(ServerMenuWin *this, unsigned int wParam, int lParam); // idb
void __thiscall ServerMenuWin::UpdateMeWin(ServerMenuWin *this, float fCurTime); // idb
void __thiscall ServerMenuWin::ServerMenuWin(ServerMenuWin *this); // idb
ServerMenuWin *__cdecl ServerMenuWin::CreateWin(PgFrameWork *pkFrameWork); // idb
ServerMenuWin *__thiscall ServerMenuWin::`scalar deleting destructor'(ServerMenuWin *this, unsigned int a2);
void __thiscall ServerTimeWin::ServerTimeWin(ServerTimeWin *this); // idb
void __thiscall ServerTimeWin::~ServerTimeWin(ServerTimeWin *this); // idb
void __thiscall ServerTimeWin::EnableServerTime(ServerTimeWin *this, bool b); // idb
void __thiscall ServerTimeWin::UpdateMeWin(ServerTimeWin *this, float fCurTime); // idb
void __thiscall ServerTimeWin::OnCommand(ServerTimeWin *this, unsigned int wParam, int lParam); // idb
char __thiscall ServerTimeWin::Create(ServerTimeWin *this, PgFrameWork *pkFrameWork);
ServerTimeWin *__cdecl ServerTimeWin::CreateWin(PgFrameWork *pkFrameWork); // idb
ServerTimeWin *__thiscall ServerTimeWin::`vector deleting destructor'(ServerTimeWin *this, unsigned int a2);
void __thiscall ShopWin::ReGenPos(ShopWin *this); // idb
int __stdcall _std_view_proc(HWND__ *hDlg, unsigned int message, unsigned int wParam, int lParam); // idb
void __thiscall ShopWin::OnPopShopWin(ShopWin *this); // idb
void __thiscall ShopWin::UpdateWebPos(ShopWin *this); // idb
void __thiscall ShopWin::ClearWebKeyParameter(ShopWin *this); // idb
void __thiscall ShopWin::SetWebKeyParameter(ShopWin *this, char *pbParam, char byLoginType); // idb
void ShopWin::OnHelpLink();
void __thiscall ShopWin::OnWinClose(ShopWin *this); // idb
void __thiscall ShopWin::UpdateMeWin(ShopWin *this, float fCurTime); // idb
char ShopWin::LoadWebUrl();
char __thiscall ShopWin::Create(ShopWin *this, PgFrameWork *pkFrameWork);
void __thiscall ShopWin::OnCommand(ShopWin *this, unsigned int wParam, int lParam); // idb
void __thiscall ShopWin::ShopWin(ShopWin *this); // idb
void __thiscall ShopWin::~ShopWin(ShopWin *this); // idb
void __thiscall ShopWin::OnShowWin(ShopWin *this); // idb
ShopWin *__cdecl ShopWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall ShopWin::SetItemShopUrl(ShopWin *this, char *pkStr, unsigned __int16 nLen); // idb
ShopWin *__thiscall ShopWin::`scalar deleting destructor'(ShopWin *this, unsigned int a2);
void __thiscall ShortCutIconWin::Show(ShortCutIconWin *this, int b);
void __thiscall ShortCutIconWin::UpdateEffect(ShortCutIconWin *this, float ftime); // idb
bool __thiscall ShortCutIconWin::IsEnalbeToggleEffect(ShortCutIconWin *this); // idb
void __thiscall ShortCutWin::SetPageTextWin(ShortCutWin *this); // idb
void __thiscall ShortCutWin::OnCmdShortCutRClick(ShortCutWin *this, unsigned int uiIndex); // idb
void __thiscall ShortCutWin::ResetIconWin(ShortCutWin *this); // idb
void __thiscall ShortCutWin::OnCmdPanelTurn(ShortCutWin *this); // idb
void __thiscall ShortCutWin::OnCmdSubPanel(ShortCutWin *this); // idb
void __thiscall ShortCutWin::SizeBtnPosToStatus(ShortCutWin *this); // idb
void __thiscall ShortCutWin::DirectMessage(ShortCutWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall ShortCutWin::IsStartCollTime(ShortCutWin *this, unsigned __int16 kID); // idb
void __thiscall ShortCutIconWin::ShortCutIconWin(ShortCutIconWin *this); // idb
void __thiscall ShortCutIconWin::ProcessMeInput(ShortCutIconWin *this, bool *bHit); // idb
ShortCut *__thiscall ShortCutIconWin::GetShortCut(ShortCutIconWin *this); // idb
void __thiscall ShortCutIconWin::SetSkillIcon(ShortCutIconWin *this); // idb
void __thiscall ShortCutIconWin::SetActionIcon(ShortCutIconWin *this); // idb
void __thiscall ShortCutIconWin::SetSoulStoneIcon(ShortCutIconWin *this); // idb
void __thiscall ShortCutIconWin::StopToggleEffect(ShortCutIconWin *this); // idb
void __thiscall ShortCutWin::StartSkill(ShortCutWin *this, unsigned __int16 kSkillID, float fCurTime); // idb
void __thiscall ShortCutWin::UpdateMeWin(ShortCutWin *this, float fCurTime); // idb
void __thiscall ShortCutWin::Show(ShortCutWin *this, bool b); // idb
void __thiscall ShortCutWin::StartHpStonCoolTime(ShortCutWin *this); // idb
void __thiscall ShortCutWin::StartSpStonCoolTime(ShortCutWin *this); // idb
void __thiscall ShortCutWin::SetShortCutInvPosWinLock(ShortCutWin *this, unsigned __int16 invPos); // idb
void __thiscall ShortCutWin::SetShortCutInvPosWinUnLock(ShortCutWin *this); // idb
void __thiscall ShortCutWin::StopEffect(ShortCutWin *this); // idb
void __thiscall ShortCutIconWin::DoAction(ShortCutIconWin *this); // idb
void __thiscall ShortCutIconWin::DoRAction(ShortCutIconWin *this); // idb
void __thiscall ShortCutIconWin::OnFirstHitWin(ShortCutIconWin *this); // idb
void __thiscall ShortCutIconWin::RefreshEffect(ShortCutIconWin *this); // idb
void __thiscall ShortCutIconWin::StartToggleEffect(ShortCutIconWin *this); // idb
void __thiscall ShortCutWin::OnCmdPrev(ShortCutWin *this); // idb
void __thiscall ShortCutWin::OnCmdNext(ShortCutWin *this); // idb
char __thiscall ShortCutWin::SetDropContents(ShortCutWin *this, ShortCut *pkShortCut, unsigned int uiSenderIndex);
void __thiscall ShortCutWin::SetHotKeyWin(ShortCutWin *this, unsigned int index, const char *meshName); // idb
void __thiscall ShortCutWin::SetHotKeyPlusWin(ShortCutWin *this, unsigned int index, const char *meshName); // idb
void __thiscall ShortCutWin::SetPremiumItemInfo(ShortCutWin *this, unsigned int uiInvPos, Item *pkItem); // idb
char __thiscall ShortCutWin::IsToggleOn(ShortCutWin *this, unsigned __int16 kCastingID);
void __thiscall ShortCutWin::ReFreshToggleEffect(ShortCutWin *this); // idb
void __thiscall ShortCutIconWin::~ShortCutIconWin(ShortCutIconWin *this); // idb
void __thiscall ShortCutIconWin::CreateToggleEffect(ShortCutIconWin *this); // idb
void __thiscall ShortCutWin::ReflashHotKey(ShortCutWin *this); // idb
void __thiscall ShortCutWin::SetMHActionState(ShortCutWin *this, bool bMHEmotionStart); // idb
ShortCutIconWin *__cdecl ShortCutIconWin::CreateWin(int iXPos, int iYPos, unsigned int uiIndex, PgWin *pkParent); // idb
void __thiscall ShortCutWin::ShortCutWin(ShortCutWin *this); // idb
void __thiscall ShortCutWin::~ShortCutWin(ShortCutWin *this); // idb
ShortCutWin *__cdecl ShortCutWin::CreateWin(PgFrameWork *pkFrameWork, int bVertical);
ShortCutWin *__cdecl ShortCutWin::CreateSubWin(PgFrameWork *pkFrameWork, int bVertical, int tabLevel);
void __thiscall ShortCutWin::OffToggleKey(ShortCutWin *this, unsigned __int16 kOffID); // idb
void __thiscall ShortCutIconWin::UpdateMeWin(ShortCutIconWin *this, float fCurTime); // idb
void __thiscall ShortCutWin::OnToggleKey(ShortCutWin *this, unsigned __int16 kOnID); // idb
char __thiscall ShortCutIconWin::Create(ShortCutIconWin *this, int iXPos, int iYPos, unsigned int uiIndex, PgWin *pkParent);
char __thiscall ShortCutWin::OnDrop(ShortCutWin *this, DropContents *pkContents, unsigned int uiRevIndex);
void __thiscall ShortCutIconWin::SetItemIcon(ShortCutIconWin *this); // idb
char __thiscall ShortCutIconWin::EatDropReference(ShortCutIconWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
void __thiscall ShortCutIconWin::SetIcon(ShortCutIconWin *this); // idb
void __thiscall ShortCutIconWin::SetShortCut(ShortCutIconWin *this, ShortCut *pkShortCut); // idb
void __thiscall ShortCutWin::ReflashShortCutWin(ShortCutWin *this); // idb
void __thiscall ShortCutWin::OnCmdShortCutLClick(ShortCutWin *this, unsigned int uiIndex); // idb
char __thiscall ShortCutWin::CreatHorizontalWin(ShortCutWin *this, PgFrameWork *pkFrameWork, NiPointer<NiNode> *spNode, NiSourceTexture *pkTexture, bool pkMainWin);
char __thiscall ShortCutWin::CreatVerticalWin(ShortCutWin *this, PgFrameWork *pkFrameWork, NiPointer<NiNode> *spNode, NiSourceTexture *pkTexture, bool pkMainWinMode);
// void __userpurge ShortCutWin::ProcessMeInput(ShortCutWin *this@<ecx>, int a2@<ebx>, bool *bHit);
void __thiscall ShortCutWin::OnCommand(ShortCutWin *this, unsigned int wParam, int lParam); // idb
char __thiscall ShortCutWin::Create(ShortCutWin *this, PgFrameWork *pkFrameWork, bool bVertical, bool bMainWin, int tabLevel);
char __thiscall ShortCutMgr::SetShortCut(ShortCutMgr *this, ShortCut *pkShortCut, unsigned int uiIndex, bool bSave);
void __thiscall PgWin::UpdateChildWin(PgWin *this, float fCurTime); // idb
ItemAction *__cdecl ItemActionTab::GetByItemActionID(unsigned int uiIndex); // idb
ShortCutIconWin *__thiscall ShortCutIconWin::`vector deleting destructor'(ShortCutIconWin *this, unsigned int a2);
ShortCutWin *__thiscall ShortCutWin::`vector deleting destructor'(ShortCutWin *this, unsigned int a2);
void __thiscall SkillInfoWin::HideAllMoneyWin(SkillInfoWin *this); // idb
BOOL __thiscall SkillInfoWin::IsMoneyShow(SkillInfoWin *this);
int __thiscall SkillInfoWin::GetMoneyWinWidth(SkillInfoWin *this);
void __thiscall SkillInfoWin::ShowMoneyWin(SkillInfoWin *this, int iXPos, int iYPos, __int64 i64Money); // idb
void __thiscall SkillInfoWin::AdjustSizeIfIamToolTipWin(SkillInfoWin *this); // idb
char __thiscall SkillInfoWin::Create(SkillInfoWin *this, NiSourceTexture *pkTexture, unsigned int uiEdgeWidth, unsigned int uiEdgeHeight);
char *__cdecl GetTimeStr(int iTime); // idb
bool __stdcall SkillInfoWin::IsPassiveEffect(unsigned __int16 kActiveID, char *pEffectRate);
int __stdcall SkillInfoWin::FindPassiveEffect(unsigned __int16 kActiveID, char *pEffectRate);
int __thiscall SkillInfoWin::SetPassiveEffect(SkillInfoWin *this, unsigned __int16 kActiveID, int index); // idb
int __thiscall SkillInfoWin::SetMinMaxWCRate(SkillInfoWin *this, ActiveSkillInfo *pkInfo, int iIndex); // idb
int __thiscall SkillInfoWin::SetMinMaxMARate(SkillInfoWin *this, ActiveSkillInfo *pkInfo, int iIndex); // idb
void __thiscall SkillInfoWin::WordrapSetText(SkillInfoWin *this, const char *pkTextData, int *nIndex, int nMaxPixcel); // idb
void __thiscall SkillInfoWin::SetTextBeginNewLine(SkillInfoWin *this, const char *pkTextData, int *nIndex, D3DXCOLOR *kColor); // idb
int __thiscall SkillInfoWin::SetPassiveSkillInfo(SkillInfoWin *this, unsigned __int16 kSkillID, bool bBuy); // idb
void __thiscall SkillInfoWin::SetPassiveSkillBuyInfo(SkillInfoWin *this, unsigned __int16 kSkillID, unsigned int uiPrice); // idb
void __thiscall SkillInfoWin::SetSetItemDesc(SkillInfoWin *this, int *iIndex); // idb
void __thiscall SkillInfoWin::SetGTSkillInfo(SkillInfoWin *this, unsigned int uiIndex); // idb
int __thiscall SkillInfoWin::SetNeedFame(SkillInfoWin *this, int kSkillID, int index);
void __thiscall SkillInfoWin::~SkillInfoWin(SkillInfoWin *this); // idb
void __thiscall SkillInfoWin::SkillInfoWin(SkillInfoWin *this); // idb
SkillInfoWin *__cdecl SkillInfoWin::CreateWin(NiSourceTexture *pkTexture, unsigned int uiEdgeHeight, unsigned int uiEdgeWidth); // idb
void __thiscall SkillInfoWin::SetSetItem(SkillInfoWin *this, unsigned __int16 kSkillID); // idb
int __thiscall SkillInfoWin::SetSkillInfo(SkillInfoWin *this, unsigned __int16 kSkillID, bool bViewEmpowerPointApplied, Skill::EmpowerInfo *pkVirtualValue, bool bBuy); // idb
void __thiscall SkillInfoWin::SetSkillBuyInfo(SkillInfoWin *this, int kSkillID, unsigned int uiPrice);
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiAmbientLight>>>,0>>::_Min(std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *_Pnode); // idb
std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Max(std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *_Pnode); // idb
std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Min(std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *_Pnode); // idb
void __thiscall NiTListBase<DFALL<ItemAction *>,ItemAction *>::~NiTListBase<DFALL<ItemAction *>,ItemAction *>(NiTListBase<DFALL<ItemAction *>,ItemAction *> *this); // idb
NiTListBase<DFALL<ItemAction *>,ItemAction *> *__thiscall NiTListBase<DFALL<ItemAction *>,ItemAction *>::`vector deleting destructor'(NiTListBase<DFALL<ItemAction *>,ItemAction *> *this, unsigned int a2);
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,bool,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,bool>>,0>>,std::_Iterator_base0>::operator--(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >,std::_Iterator_base0> *this); // idb
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiAmbientLight>>>,0>>,std::_Iterator_base0>::operator++(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >,std::_Iterator_base0> *this); // idb
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>,std::_Iterator_base0>::operator++(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >,std::_Iterator_base0> *this); // idb
void __thiscall std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Lrotate(std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *_Wherenode); // idb
void __thiscall std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Rrotate(std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *_Wherenode); // idb
unsigned int __cdecl ITableBase<ItemActionEffect,ItemActionEffectTab>::GetTotal(); // idb
unsigned int __cdecl ITableBase<ItemActionCondition,ItemActionConditionTab>::GetTotal(); // idb
unsigned int __cdecl ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::GetTotal(); // idb
void __cdecl ItemActionTab::GetListByItemActionID(NiTList<ItemAction *> *kItemActionList, unsigned int uiIndex); // idb
ItemActionEffect *__cdecl ItemActionEffectTab::GetByEffectID(unsigned int uiIndex); // idb
PassiveSkillInfo *__cdecl PasSkillInfoTab::GetByActiveSkillGroupIndex(ActiveSkillGroupIndex kIndex); // idb
PassiveSkillInfo *__cdecl PasSkillInfoTab::GetByInxName(char *pcInxName); // idb
GUILD_TOURNAMENT_SKILLDESC *__cdecl GuildTournamentStateDescTab::GetIndex(const unsigned int uiIndex); // idb
unsigned int __cdecl ActiveSkillGroupTab::GetTotal(); // idb
void __thiscall NiTList<ItemAction *>::~NiTList<ItemAction *>(NiTList<ItemAction *> *this); // idb
NiTPointerListBase<DFALL<ItemAction *>,ItemAction *> *__thiscall NiTPointerListBase<DFALL<ItemAction *>,ItemAction *>::`vector deleting destructor'(NiTPointerListBase<DFALL<ItemAction *>,ItemAction *> *this, unsigned int a2);
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::erase(std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > _Where); // idb
void __thiscall std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Erase(std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *_Rootnode); // idb
void __cdecl std::_Uninit_def_fill_n<ItemAction *,unsigned int,ItemAction,std::allocator<ItemAction>,ItemAction>(ItemAction *_First, unsigned int _Count);
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Insert(std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *_Newnode); // idb
void __thiscall std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::clear(std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *this); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::find(std::_Tree<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *result, const unsigned __int16 *_Keyval); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::find(std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *result, const unsigned __int16 *_Keyval); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::erase(std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > _Last); // idb
std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Buynode<std::pair<unsigned short,ItemAction>>(std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *this, std::pair<unsigned short,ItemAction> *_Val); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *__thiscall std::multimap<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>>::insert<std::pair<unsigned short,ItemAction>>(std::multimap<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> > > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *result, std::pair<unsigned short,ItemAction> *_Val); // idb
void __thiscall std::multimap<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>>::~multimap<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>>(std::multimap<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> > > *this); // idb
void __thiscall std::vector<ItemAction,std::allocator<ItemAction>>::resize(std::vector<ItemAction,std::allocator<ItemAction> > *this, unsigned int _Newsize); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Newnode); // idb
void __thiscall std::_Tree<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Erase(std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Rootnode); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::erase(std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > _Where); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Node, bool _Leftish); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::_Linsert(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> >::_Node *_Node, bool _Leftish); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::erase(std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > _Last); // idb
std::_Tree_nod<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Buynode<std::pair<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>(std::_Tree_val<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::pair<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > *_Val); // idb
SkillInfoWin *__thiscall SkillInfoWin::`scalar deleting destructor'(SkillInfoWin *this, unsigned int a2);
void CSkillInitWin::OnHelpLink();
void __thiscall CSkillInitWin::CSkillInitWin(CSkillInitWin *this); // idb
void __thiscall CSkillInitWin::~CSkillInitWin(CSkillInitWin *this); // idb
char __thiscall CSkillInitWin::Create(CSkillInitWin *this, PgFrameWork *pkFrameWork);
void __thiscall CSkillInitWin::DirectMessage(CSkillInitWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall CSkillInitWin::OnCommand(CSkillInitWin *this, unsigned int wParam, int lParam); // idb
void __thiscall CSkillInitWin::OnShowWin(CSkillInitWin *this); // idb
CSkillInitWin *__cdecl CSkillInitWin::CreateWin(PgFrameWork *pkFrameWork); // idb
CSkillInitWin *__thiscall CSkillInitWin::`vector deleting destructor'(CSkillInitWin *this, unsigned int a2);
void __thiscall PointPool::Init(PointPool *this, int iPoint, int iAntiPoint); // idb
int __thiscall PointPool::GetPoint(PointPool *this); // idb
int __thiscall PointPool::GetAntiPoint(PointPool *this); // idb
void __thiscall PointOccupier::PointOccupier(PointOccupier *this); // idb
void __thiscall PointOccupier::SetPool(PointOccupier *this, PointPool *pkPool); // idb
void __thiscall PointOccupier::Init(PointOccupier *this, int iLowerLimit, int iUpperLimit); // idb
void __thiscall PointOccupier::Inc(PointOccupier *this); // idb
void __thiscall PointOccupier::Dec(PointOccupier *this); // idb
int __thiscall PointOccupier::GetPoint(PointOccupier *this); // idb
int __thiscall PointOccupier::GetPointCount(PointOccupier *this); // idb
void __thiscall PointOccupier::ReSetPointCount(PointOccupier *this); // idb
int __thiscall PointOccupier::GetUpperLimit(PointOccupier *this); // idb
void __thiscall SkillPowerIconWin::SkillPowerIconWin(SkillPowerIconWin *this); // idb
void __thiscall SkillPowerIconWin::~SkillPowerIconWin(SkillPowerIconWin *this); // idb
void __thiscall SkillPowerIconWin::UpdateMeWin(SkillPowerIconWin *this, float fCurTime); // idb
bool __thiscall SkillPowerIconWin::Create(SkillPowerIconWin *this, int iXPos, int iYPos, PgWin *pkParent); // idb
unsigned __int16 __thiscall SkillPowerIconWin::GetSkillID(SkillPowerIconWin *this); // idb
void __thiscall SkillPowerIconWin::OnFirstHitWin(SkillPowerIconWin *this); // idb
void __thiscall SkillPowerListItemWin::SkillPowerListItemWin(SkillPowerListItemWin *this); // idb
void __thiscall SkillPowerListItemWin::~SkillPowerListItemWin(SkillPowerListItemWin *this); // idb
void __thiscall SkillPowerListItemWin::OnCommand(SkillPowerListItemWin *this, unsigned int wParam, int lParam); // idb
void __thiscall SkillPowerListItemWin::SetPoint(SkillPowerListItemWin *this, int iPoint, int iMaxPoint); // idb
PointOccupier *__thiscall SkillPowerListItemWin::GetPointOccupier(SkillPowerListItemWin *this); // idb
int __thiscall SkillPowerListItemWin::GetPoint(SkillPowerListItemWin *this); // idb
void __thiscall SkillPowerListItemWin::CheckPossibleEmpower(SkillPowerListItemWin *this, bool b); // idb
void __thiscall SkillPowerWin::SkillPowerWin(SkillPowerWin *this); // idb
void __thiscall SkillPowerWin::~SkillPowerWin(SkillPowerWin *this); // idb
void __thiscall SkillPowerWin::OnCancel(SkillPowerWin *this); // idb
void __thiscall SkillPowerWin::OnClose(SkillPowerWin *this); // idb
void __thiscall SkillPowerWin::OnShowWin(SkillPowerWin *this); // idb
void __thiscall SkillPowerWin::SetSkillPowerSuccess(SkillPowerWin *this, bool b); // idb
void SkillPowerWin::OnHelpLink();
void __thiscall SkillPowerWin::OnReset(SkillPowerWin *this); // idb
void __thiscall SkillPowerWin::UpdateMeWin(SkillPowerWin *this, float fCurTime); // idb
void __thiscall SkillPowerWin::OnSlideBarContent(SkillPowerWin *this); // idb
char __thiscall SkillPowerIconWin::SetSkill(SkillPowerIconWin *this, int SkillID);
char __thiscall SkillPowerIconWin::EatDropReference(SkillPowerIconWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
char __thiscall SkillPowerListItemWin::Create(SkillPowerListItemWin *this, NiAVObject *pkGeom, int iXPos, int iYPos, unsigned int uiListIndex, SkillPowerListItemWin::CreateSpec *rkSpec, PgWin *pkParent);
void __thiscall SkillPowerWin::OnSkillDroped(SkillPowerWin *this); // idb
void __thiscall SkillPowerWin::OnOk(SkillPowerWin *this); // idb
void __thiscall SkillPowerWin::SetEmpowerSkill(SkillPowerWin *this, int SkillID);
void __thiscall SkillPowerWin::OnCommand(SkillPowerWin *this, unsigned int wParam, int lParam); // idb
SkillPowerIconWin *__cdecl SkillPowerIconWin::CreateWin(int iXPos, int iYPos, PgWin *pkParent); // idb
SkillPowerListItemWin *__cdecl SkillPowerListItemWin::CreateWin(NiAVObject *pkGeom, int iXPos, int iYPos, unsigned int uiListIndex, SkillPowerListItemWin::CreateSpec *rkSpec, PgWin *pkParent); // idb
SkillPowerWin *__cdecl SkillPowerWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall SkillPowerWin::Create(SkillPowerWin *this, PgFrameWork *pkFrameWork);
SkillPowerIconWin *__thiscall SkillPowerIconWin::`scalar deleting destructor'(SkillPowerIconWin *this, unsigned int a2);
SkillPowerListItemWin *__thiscall SkillPowerListItemWin::`scalar deleting destructor'(SkillPowerListItemWin *this, unsigned int a2);
SkillPowerWin *__thiscall SkillPowerWin::`scalar deleting destructor'(SkillPowerWin *this, unsigned int a2);
void __thiscall SkillPowerListItemWin::CreateSpec::~CreateSpec(SkillPowerListItemWin::CreateSpec *this); // idb
void __thiscall PosInfoWinBut::PosInfoWinBut(PosInfoWinBut *this); // idb
void __thiscall PosInfoWinBut::~PosInfoWinBut(PosInfoWinBut *this); // idb
void __thiscall LevelSelectWinBut::LevelSelectWinBut(LevelSelectWinBut *this); // idb
void __thiscall LevelSelectWinBut::~LevelSelectWinBut(LevelSelectWinBut *this); // idb
void __thiscall SkillInvWin::~SkillInvWin(SkillInvWin *this); // idb
char __thiscall SkillInvWin::Create(SkillInvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent);
void __thiscall SkillInvWin::OnFirstHitWin(SkillInvWin *this); // idb
void __thiscall SkillWin::OnEmpowerWinShow(SkillWin *this, int b);
void __thiscall SkillWin::OnCommboSkill(SkillWin *this); // idb
void __thiscall SkillWin::OnSkillPowerReset(SkillWin *this); // idb
void __thiscall SkillWin::OnInvRClick(SkillWin *this, unsigned int uiInvIndex); // idb
void __thiscall SkillWin::OnClose(SkillWin *this); // idb
void __thiscall SkillWin::OpenProduceSkillSelectWin(SkillWin *this); // idb
void __thiscall SkillWin::SetSkillPowerSuccess(SkillWin *this, bool b); // idb
void __thiscall SkillWin::CloseProduceSkillSelectWin(SkillWin *this); // idb
void __thiscall SkillWin::OpenProduceSkillInitWin(SkillWin *this, char bySlotIndex); // idb
ProductSkillSelectWin *__thiscall SkillWin::GetProductSkillSelectWin(SkillWin *this); // idb
void SkillWin::OnHelpLink();
void __thiscall SkillInvWin::SetSkill(SkillInvWin *this, unsigned __int16 kSkillID, unsigned int uiSkillType); // idb
void __thiscall SkillWin::OnOpenPowerWindow(SkillWin *this); // idb
void __thiscall SkillWin::OnInvLClick(SkillWin *this, unsigned int uiInvIndex); // idb
void __thiscall SkillWin::UpdateMeWin(SkillWin *this, float fCurTime); // idb
char __thiscall PosInfoWinBut::Create(PosInfoWinBut *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, int Pos, char *pcName, unsigned int uiExtStyle);
void __thiscall PosInfoWinBut::DoAction(PosInfoWinBut *this); // idb
char __thiscall LevelSelectWinBut::Create(LevelSelectWinBut *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, char *pcName, unsigned int uiExtStyle, unsigned int uiInvIndex);
void __thiscall LevelSelectWinBut::DoAction(LevelSelectWinBut *this); // idb
void __thiscall SkillInvWin::SkillInvWin(SkillInvWin *this); // idb
void __thiscall SkillInvWin::DoAction(SkillInvWin *this); // idb
void __thiscall SkillInvWin::DoRAction(SkillInvWin *this); // idb
int __thiscall SkillInvWin::SetSkill(SkillInvWin *this, int uiRecordIndex, unsigned int uiBuffType); // idb
void __thiscall SkillWin::OnEmpowerClick(SkillWin *this, unsigned int uiIndex); // idb
void __thiscall SkillWin::~SkillWin(SkillWin *this); // idb
void __thiscall SkillWin::SkillWin(SkillWin *this); // idb
PosInfoWinBut *__cdecl PosInfoWinBut::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, int Pos, char *pcName, unsigned int uiExtStyle); // idb
LevelSelectWinBut *__cdecl LevelSelectWinBut::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, char *pcName, unsigned int uiExtStyle, unsigned int uiInvIndex); // idb
SkillInvWin *__cdecl SkillInvWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent); // idb
SkillWin *__cdecl SkillWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall SkillWin::Create(SkillWin *this, PgFrameWork *pkFrameWork);
void __thiscall SkillWin::SetLevel(SkillWin *this, unsigned int InvIndex, char curLevel); // idb
unsigned int __thiscall SkillWin::GetLearnSkillNum(SkillWin *this); // idb
unsigned int __thiscall SkillWin::GetMaxPageNum(SkillWin *this); // idb
void __thiscall SkillWin::OnLevelNext(SkillWin *this, unsigned int InvIndex); // idb
void __thiscall SkillWin::OnLevelPre(SkillWin *this, unsigned int InvIndex); // idb
void __thiscall SkillWin::UpdatePageInfo(SkillWin *this); // idb
void __thiscall SkillWin::ResetContents(SkillWin *this); // idb
void __thiscall SkillWin::ResetPage(SkillWin *this); // idb
void __thiscall SkillWin::OnActiveSkill(SkillWin *this); // idb
void __thiscall SkillWin::OnPasssiveSkill(SkillWin *this); // idb
void __thiscall SkillWin::OnProductSkill(SkillWin *this); // idb
void __thiscall SkillWin::OnPrevPage(SkillWin *this); // idb
void __thiscall SkillWin::OnNextPage(SkillWin *this); // idb
void __thiscall SkillWin::SelectByPageType(SkillWin *this, unsigned int Type); // idb
void __thiscall SkillWin::OnCommand(SkillWin *this, unsigned int wParam, int lParam); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::~NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> > *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> > *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> > *this, unsigned int a2);
PosInfoWinBut *__thiscall PosInfoWinBut::`vector deleting destructor'(PosInfoWinBut *this, unsigned int a2);
LevelSelectWinBut *__thiscall LevelSelectWinBut::`scalar deleting destructor'(LevelSelectWinBut *this, unsigned int a2);
SkillInvWin *__thiscall SkillInvWin::`scalar deleting destructor'(SkillInvWin *this, unsigned int a2);
NiPointer<PgWin> *__thiscall NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::RemoveHead(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *this, NiPointer<PgWin> *result); // idb
unsigned int __cdecl GuildTournamentStateTab::GetTotal(); // idb
void __thiscall NiTPointerList<NiPointer<PgFont>>::~NiTPointerList<NiPointer<PgFont>>(NiTPointerList<NiPointer<PgFont> > *this); // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> > *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> > *this, unsigned int a2);
void __thiscall PgTList<NiPointer<PgFont>>::~PgTList<NiPointer<PgFont>>(PgTList<NiPointer<PgFont> > *this); // idb
PgTList<NiPointer<PgFont> > *__thiscall PgTList<NiPointer<PgFont>>::`scalar deleting destructor'(PgTList<NiPointer<PgFont> > *this, unsigned int a2);
SkillWin *__thiscall SkillWin::`vector deleting destructor'(SkillWin *this, unsigned int a2);
void __thiscall SoulStoneInfoWin::SoulStoneInfoWin(SoulStoneInfoWin *this); // idb
void __thiscall SoulStoneInfoWin::~SoulStoneInfoWin(SoulStoneInfoWin *this); // idb
void __thiscall SoulStoneInfoWin::HideAllMoneyWin(SoulStoneInfoWin *this); // idb
BOOL __thiscall SoulStoneInfoWin::IsMoneyShow(SoulStoneInfoWin *this);
int __thiscall SoulStoneInfoWin::GetMoneyWinWidth(SoulStoneInfoWin *this);
void __thiscall SoulStoneInfoWin::ShowMoneyWin(SoulStoneInfoWin *this, int iXPos, int iYPos, __int64 i64Money); // idb
void __thiscall SoulStoneInfoWin::AdjustSizeIfIamToolTipWin(SoulStoneInfoWin *this); // idb
char __thiscall SoulStoneInfoWin::Create(SoulStoneInfoWin *this, NiSourceTexture *pkTexture, unsigned int uiEdgeWidth, unsigned int uiEdgeHeight);
int __thiscall SoulStoneInfoWin::SetHPInfo(SoulStoneInfoWin *this, unsigned int dwCur, unsigned int dwMax); // idb
int __thiscall SoulStoneInfoWin::SetSPInfo(SoulStoneInfoWin *this, unsigned int dwCur, unsigned int dwMax); // idb
void __thiscall SoulStoneInfoWin::SetHPBuyInfo(SoulStoneInfoWin *this, unsigned int dwCur, unsigned int dwMax, unsigned int dwPrice); // idb
void __thiscall SoulStoneInfoWin::SetSPBuyInfo(SoulStoneInfoWin *this, unsigned int dwCur, unsigned int dwMax, unsigned int dwPrice); // idb
SoulStoneInfoWin *__cdecl SoulStoneInfoWin::CreateWin(NiSourceTexture *pkTexture, unsigned int uiEdgeHeight, unsigned int uiEdgeWidth); // idb
SoulStoneInfoWin *__thiscall SoulStoneInfoWin::`scalar deleting destructor'(SoulStoneInfoWin *this, unsigned int a2);
void __thiscall SoulStoneWin::SoulStoneWin(SoulStoneWin *this); // idb
void __thiscall SoulStoneWin::~SoulStoneWin(SoulStoneWin *this); // idb
void __thiscall SoulStoneWin::UpdateMeWin(SoulStoneWin *this, float fCurTime); // idb
void __thiscall SoulStoneWin::UseHPSoulStone(SoulStoneWin *this); // idb
void __thiscall SoulStoneWin::UseSPSoulStone(SoulStoneWin *this); // idb
char __thiscall SoulStoneWin::Create(SoulStoneWin *this, PgFrameWork *pkFrameWork);
char __thiscall SoulStoneWin::TryHPSoulStoneUse(SoulStoneWin *this);
char __thiscall SoulStoneWin::TrySPSoulStoneUse(SoulStoneWin *this);
void __thiscall SoulStoneWin::OnCmdHPSoul(SoulStoneWin *this); // idb
void __thiscall SoulStoneWin::OnCmdSPSoul(SoulStoneWin *this); // idb
void __thiscall SoulStoneWin::OnCommand(SoulStoneWin *this, unsigned int wParam, int lParam); // idb
SoulStoneWin *__cdecl SoulStoneWin::CreateWin(PgFrameWork *pkFrameWork); // idb
SoulStoneWin *__thiscall SoulStoneWin::`vector deleting destructor'(SoulStoneWin *this, unsigned int a2);
void __thiscall StatTitleListItemWin::StatTitleListItemWin(StatTitleListItemWin *this); // idb
void __thiscall StatTitleListItemWin::~StatTitleListItemWin(StatTitleListItemWin *this); // idb
void __thiscall StatTitleWin::StatTitleWin(StatTitleWin *this); // idb
void __thiscall StatTitleWin::~StatTitleWin(StatTitleWin *this); // idb
void __thiscall StatTitleWin::OnOk(StatTitleWin *this); // idb
void __thiscall StatTitleWin::OnCancel(StatTitleWin *this); // idb
void __thiscall StatTitleWin::AddStatTitle(StatTitleWin *this); // idb
void __thiscall StatTitleWin::ClearStatTitle(StatTitleWin *this); // idb
char __thiscall StatTitleListItemWin::Create(StatTitleListItemWin *this, NiAVObject *pkGeom, int iXPos, int iYPos, unsigned int uiListIndex, StatTitleListItemWin::CreateSpec *rkSpec, PgWin *pkParent);
void __thiscall StatTitleWin::OnCommand(StatTitleWin *this, unsigned int wParam, int lParam); // idb
StatTitleListItemWin *__cdecl StatTitleListItemWin::CreateWin(NiAVObject *pkGeom, int iXPos, int iYPos, unsigned int uiListIndex, StatTitleListItemWin::CreateSpec *rkSpec, PgWin *pkParent); // idb
StatTitleWin *__cdecl StatTitleWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall StatTitleWin::Create(StatTitleWin *this, PgFrameWork *pkFrameWork);
StatTitleListItemWin *__thiscall StatTitleListItemWin::`vector deleting destructor'(StatTitleListItemWin *this, unsigned int a2);
StatTitleWin *__thiscall StatTitleWin::`vector deleting destructor'(StatTitleWin *this, unsigned int a2);
void __thiscall StatusWin::StatusWin(StatusWin *this); // idb
void __thiscall StatusWin::~StatusWin(StatusWin *this); // idb
void __thiscall StatusWin::OnMouseEvent(StatusWin *this, PgWin::PG_MOUSE_EVENT eMouseEvent, PgWin *pkWin); // idb
void __thiscall StatusWin::UseHPSoulStone(StatusWin *this); // idb
void __thiscall StatusWin::UseSPSoulStone(StatusWin *this); // idb
void __thiscall StatusWin::SetStoneAlarmEnable(StatusWin *this, const bool bEnable); // idb
void __thiscall StatusWin::ApplyCharInfo(StatusWin *this); // idb
void __thiscall StatusWin::HPSoulStoneCoolTimeStart(StatusWin *this); // idb
void __thiscall StatusWin::SPSoulStoneCoolTimeStart(StatusWin *this); // idb
void __thiscall StatusWin::UpdateStoneAlarm(StatusWin *this, float fCurTime); // idb
char __thiscall StatusWin::CreateKoreaMainGauge(StatusWin *this, PgFrameWork *pkFrameWork);
void __thiscall StatusWin::ProcessMeInput(StatusWin *this, bool *bHit); // idb
void __thiscall StatusWin::UpdateMeWin_kr(StatusWin *this, float fCurTime); // idb
char __thiscall StatusWin::TryHPSoulStoneUse(StatusWin *this);
char __thiscall StatusWin::TrySPSoulStoneUse(StatusWin *this);
void __thiscall StatusWin::OnCmdHPSoul(StatusWin *this); // idb
void __thiscall StatusWin::OnCmdSPSoul(StatusWin *this); // idb
void __thiscall StatusWin::OnCommand(StatusWin *this, unsigned int wParam, int lParam); // idb
void __thiscall StatusWin::SetStoneAlarmShortcutText(StatusWin *this, const char *pcText); // idb
char __thiscall StatusWin::Create(StatusWin *this, PgFrameWork *pkFrameWork);
void __thiscall StatusWin::UpdateMeWin(StatusWin *this, float fCurTime); // idb
void __thiscall StatusWin::UpdateBars(StatusWin *this); // idb
StatusWin *__cdecl StatusWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall PgWinCircleGauge::SetValue(PgWinCircleGauge *this, float fMaxVal, float fCurVal); // idb
StatusWin *__thiscall StatusWin::`scalar deleting destructor'(StatusWin *this, unsigned int a2);
void __thiscall StatusWin::SetHP(StatusWin *this, unsigned int uiMax, unsigned int uiCur); // idb
void __thiscall StatusWin::SetSP(StatusWin *this, unsigned int uiMax, unsigned int uiCur); // idb
void __thiscall StatusWin::SetLP(StatusWin *this, unsigned int uiMax, unsigned int uiCur); // idb
void __thiscall StorageTabButWin::StorageTabButWin(StorageTabButWin *this); // idb
void __thiscall StorageTabButWin::~StorageTabButWin(StorageTabButWin *this); // idb
bool __thiscall StorageTabButWin::Create(StorageTabButWin *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg); // idb
void __thiscall StorageInvWin::StorageInvWin(StorageInvWin *this); // idb
void __thiscall StorageInvWin::~StorageInvWin(StorageInvWin *this); // idb
char __thiscall StorageInvWin::Create(StorageInvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent);
void __thiscall StorageInvWin::OnFirstHitWin(StorageInvWin *this); // idb
void __stdcall StorageWin::OnDrawingMoneyWinOk(__int64 i64Money);
void __stdcall StorageWin::OnDepositMoneyWinOk(__int64 i64Money);
void __thiscall StorageWin::ResetContents(StorageWin *this); // idb
void StorageWin::OnHelpLink();
char __thiscall StorageTabButWin::EatDropInstance(StorageTabButWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
void __thiscall StorageWin::StorageWin(StorageWin *this); // idb
void __thiscall StorageWin::~StorageWin(StorageWin *this); // idb
void __thiscall StorageWin::ResetPage(StorageWin *this); // idb
void __thiscall StorageWin::OnOk(StorageWin *this); // idb
void __thiscall StorageWin::OnCancel(StorageWin *this); // idb
void __thiscall StorageWin::OnTab1(StorageWin *this); // idb
void __thiscall StorageWin::OnTab2(StorageWin *this); // idb
void __thiscall StorageWin::OnTab3(StorageWin *this); // idb
void __thiscall StorageWin::OnTab4(StorageWin *this); // idb
void __thiscall StorageInvWin::DoAction(StorageInvWin *this); // idb
void __thiscall StorageInvWin::DoRAction(StorageInvWin *this); // idb
void __thiscall StorageWin::RefreshPage(StorageWin *this, char byTargetPage); // idb
void __thiscall StorageWin::OnInvShiftLClick(StorageWin *this, unsigned int uiInvIndex); // idb
void __thiscall StorageWin::OnInvRClick(StorageWin *this, unsigned int uiInvIndex); // idb
void __thiscall StorageWin::OnDeposit(StorageWin *this); // idb
void __thiscall StorageWin::OnDrawing(StorageWin *this); // idb
char __thiscall StorageWin::DropOnInv(StorageWin *this, DropContents *pkContents, unsigned int uiReceiverInvIndex);
void __thiscall StorageWin::UpdateMeWin(StorageWin *this, float fCurTime); // idb
char __thiscall StorageInvWin::EatDropInstance(StorageInvWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
void __thiscall StorageWin::OnInvLClick(StorageWin *this, unsigned int uiInvIndex); // idb
void __thiscall StorageWin::OnCommand(StorageWin *this, unsigned int wParam, int lParam); // idb
StorageTabButWin *__cdecl StorageTabButWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg); // idb
StorageInvWin *__cdecl StorageInvWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent); // idb
StorageWin *__cdecl StorageWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall StorageWin::Create(StorageWin *this, PgFrameWork *pkFrameWork);
StorageTabButWin *__thiscall StorageTabButWin::`vector deleting destructor'(StorageTabButWin *this, unsigned int a2);
StorageInvWin *__thiscall StorageInvWin::`scalar deleting destructor'(StorageInvWin *this, unsigned int a2);
StorageWin *__thiscall StorageWin::`scalar deleting destructor'(StorageWin *this, unsigned int a2);
bool SysMsgDisplayWin::IsAutoHideOptionSetted();
void __thiscall SysMsgDisplayWin::DirectMessage(SysMsgDisplayWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
char __thiscall SysMsgDisplayWin::Create(SysMsgDisplayWin *this, PgFrameWork *pkFrameWork);
SysMsgDisplayWin *__cdecl SysMsgDisplayWin::CreateWin(PgFrameWork *pkFrameWork); // idb
unsigned int __thiscall FrameBoxWin::GetClientWidth(FrameBoxWin *this); // idb
unsigned int __thiscall FrameBoxWin::GetClientHeight(FrameBoxWin *this); // idb
void __thiscall SystemWin::SystemWin(SystemWin *this); // idb
void __thiscall SystemWin::~SystemWin(SystemWin *this); // idb
void __thiscall SystemWin::OnCmdOption(SystemWin *this); // idb
void __thiscall SystemWin::OnCmdGoCharSelect(SystemWin *this); // idb
void __thiscall SystemWin::OnCmdLogout(SystemWin *this); // idb
void __thiscall SystemWin::OnCmdExit(SystemWin *this); // idb
void __thiscall SystemWin::OnCancel(SystemWin *this); // idb
void SystemWin::OnHelpLink();
void __thiscall SystemWin::OnCommand(SystemWin *this, unsigned int wParam, int lParam); // idb
char __thiscall SystemWin::Create(SystemWin *this, PgFrameWork *pkFrameWork);
SystemWin *__cdecl SystemWin::CreateWin(PgFrameWork *pkFrameWork); // idb
SystemWin *__thiscall SystemWin::`scalar deleting destructor'(SystemWin *this, unsigned int a2);
void __thiscall MobIconWin::MobIconWin(MobIconWin *this); // idb
void __thiscall MobIconWin::~MobIconWin(MobIconWin *this); // idb
bool __thiscall MobIconWin::Create(MobIconWin *this, int iXPos, int iYPos, PgWin *pkParent); // idb
void __thiscall AbStateIconWin::AbStateIconWin(AbStateIconWin *this); // idb
void __thiscall AbStateIconWin::~AbStateIconWin(AbStateIconWin *this); // idb
bool __thiscall AbStateIconWin::Create(AbStateIconWin *this, int iXPos, int iYPos, PgWin *pkParent); // idb
void __thiscall TargetWin::ShowTOT(TargetWin *this); // idb
void __thiscall TargetWin::SetSoulDefault(TargetWin *this, bool bShowCount); // idb
int __thiscall TargetWin::GetSouldCount(TargetWin *this); // idb
void __thiscall TargetOfTheTargetWin::TargetOfTheTargetWin(TargetOfTheTargetWin *this); // idb
void __thiscall TargetOfTheTargetWin::~TargetOfTheTargetWin(TargetOfTheTargetWin *this); // idb
void __thiscall TargetOfTheTargetWin::SetTargetLv(TargetOfTheTargetWin *this, int iLv); // idb
void __stdcall TargetOfTheTargetWin::AbbreviateText(char *pResult, char *pTarget, int nAbbreviationSize);
void __thiscall TargetOfTheTargetWin::SetEnable(TargetOfTheTargetWin *this, bool b); // idb
void __thiscall TargetWin::ShowBarWin(TargetWin *this, int b);
void __thiscall TargetWin::OnMouseEvent(TargetWin *this, PgWin::PG_MOUSE_EVENT eMouseEvent, PgWin *pkWin); // idb
void __thiscall TargetWin::Show(TargetWin *this, bool b); // idb
void __thiscall TargetWin::SetTOTLv(TargetWin *this, int iLv); // idb
void __thiscall TargetWin::SetSoulCount(TargetWin *this, int Count, int bShow, bool bShowEff);
void __thiscall TargetWin::OnMinButClick(TargetWin *this); // idb
void __thiscall TargetWin::OnMaxButClick(TargetWin *this); // idb
void __thiscall TargetWin::ReSetTOT(TargetWin *this, bool bTOT); // idb
void __thiscall TargetWin::PlayerTargetBaseTexture(TargetWin *this, Char *pkTargetChar); // idb
void __thiscall TargetWin::OnCommand(TargetWin *this, unsigned int wParam, int lParam); // idb
char __thiscall TargetOfTheTargetWin::Create(TargetOfTheTargetWin *this, PgFrameWork *pkFrameWork);
void __thiscall TargetOfTheTargetWin::PlayerTargetBaseTexture(TargetOfTheTargetWin *this, Char *pkTargetChar); // idb
// void __userpurge TargetWin::SetTargetClassInfo(TargetWin *this@<ecx>, int a2@<ebx>, Char *pkTargetChar);
void __thiscall TargetOfTheTargetWin::UpdateMeWin(TargetOfTheTargetWin *this, float fCurTime); // idb
MobIconWin *__cdecl MobIconWin::CreateWin(int iXPos, int iYPos, PgWin *pkParent); // idb
AbStateIconWin *__cdecl AbStateIconWin::CreateWin(int iXPos, int iYPos, PgWin *pkParent); // idb
void __thiscall TargetWin::TargetWin(TargetWin *this); // idb
void __thiscall TargetWin::~TargetWin(TargetWin *this); // idb
TargetWin *__cdecl TargetWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall TargetWin::CreateKoreaUI(TargetWin *this, PgFrameWork *pkFrameWork);
TargetOfTheTargetWin *__cdecl TargetOfTheTargetWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall TargetWin::Create(TargetWin *this, PgFrameWork *pkFrameWork);
void __thiscall TargetWin::SetBuffUI(TargetWin *this, Char *pkMember, StateType type, int *AbstateNums); // idb
void __thiscall TargetWin::UpdateKoreaUI(TargetWin *this, float fCurTime); // idb
void __thiscall TargetWin::UpdateMeWin(TargetWin *this, float fCurTime); // idb
unsigned int __cdecl ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::GetTotal(); // idb
MobIconWin *__thiscall MobIconWin::`scalar deleting destructor'(MobIconWin *this, unsigned int a2);
AbStateIconWin *__thiscall AbStateIconWin::`vector deleting destructor'(AbStateIconWin *this, unsigned int a2);
TargetOfTheTargetWin *__thiscall TargetOfTheTargetWin::`scalar deleting destructor'(TargetOfTheTargetWin *this, unsigned int a2);
CharNPC_ViewInfo *__cdecl NPCViewInfoTab::GetByID(unsigned int dwTypeIndex); // idb
std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *__stdcall std::_List_val<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>::_Buynode(std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *_Next, std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *_Prev, GameFrameWork::AttackedMsg::AttackedFrom *_Val);
TargetWin *__thiscall TargetWin::`vector deleting destructor'(TargetWin *this, unsigned int a2);
void __thiscall ToolTipWin::ToolTipWin(ToolTipWin *this); // idb
void __thiscall ToolTipWin::~ToolTipWin(ToolTipWin *this); // idb
void __thiscall ToolTipWin::ClearTipText(ToolTipWin *this); // idb
void __thiscall ToolTipWin::SetTipText(ToolTipWin *this, char *pcText); // idb
char __thiscall ToolTipWin::SetTipText(ToolTipWin *this, int nLine, char *pcText, int r, int g, int b, Font::Type font);
void __thiscall ToolTipWin::AdjustSizeIfIamToolTipWin(ToolTipWin *this); // idb
void __thiscall ToolTipWin::ShowToolTip(ToolTipWin *this, PgWin *pkParent); // idb
void __thiscall ToolTipWin::ShowToolTip(ToolTipWin *this); // idb
char __thiscall ToolTipWin::Create(ToolTipWin *this, NiSourceTexture *pkTexture, unsigned int uiEdgeWidth, unsigned int uiEdgeHeight);
ToolTipWin *__cdecl ToolTipWin::CreateWin(NiSourceTexture *pkTexture, unsigned int uiEdgeHeight, unsigned int uiEdgeWidth); // idb
ToolTipWin *__thiscall ToolTipWin::`scalar deleting destructor'(ToolTipWin *this, unsigned int a2);
void __thiscall UserTradeInvWin::UserTradeInvWin(UserTradeInvWin *this); // idb
void __thiscall UserTradeInvWin::~UserTradeInvWin(UserTradeInvWin *this); // idb
void __thiscall UserTradeInvWin::UpdateMeWin(UserTradeInvWin *this, float fCurTime); // idb
char __thiscall UserTradeInvWin::Create(UserTradeInvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent);
void __thiscall UserTradeInvWin::SetInvType(UserTradeInvWin *this, unsigned int uiInvType); // idb
void __thiscall UserTradeInvWin::OnFirstHitWin(UserTradeInvWin *this); // idb
void __thiscall UserTradeWin::SetOtherLock(UserTradeWin *this, int b);
void __thiscall UserTradeWin::SetOtherOk(UserTradeWin *this, int b);
void __thiscall UserTradeWin::SetOtherName(UserTradeWin *this, char *pkName); // idb
void __thiscall UserTradeWin::SetMyName(UserTradeWin *this, char *pkName); // idb
void __thiscall UserTradeWin::OnCmdOk(UserTradeWin *this); // idb
void __thiscall UserTradeWin::OnCmdCancel(UserTradeWin *this); // idb
void __thiscall UserTradeWin::OnClose(UserTradeWin *this); // idb
void __thiscall UserTradeWin::SetOtherMoney(UserTradeWin *this, __int64 i64Money); // idb
void __thiscall UserTradeWin::UnlockMyLock(UserTradeWin *this); // idb
void __thiscall UserTradeWin::OnShowWin(UserTradeWin *this); // idb
__int64 __thiscall UserTradeWin::GetInputMoney(UserTradeWin *this, bool *bBounded); // idb
void UserTradeWin::OnHelpLink();
void __thiscall UserTradeWin::UserTradeWin(UserTradeWin *this); // idb
void __thiscall UserTradeWin::~UserTradeWin(UserTradeWin *this); // idb
void __thiscall UserTradeWin::OnCmdMyInvLClick(UserTradeWin *this, unsigned int uiInvIndex); // idb
void __thiscall UserTradeInvWin::DoAction(UserTradeInvWin *this); // idb
void __thiscall UserTradeInvWin::DoRAction(UserTradeInvWin *this); // idb
void __thiscall UserTradeWin::OnCmdLock(UserTradeWin *this); // idb
char __thiscall UserTradeWin::DropOnMyInv(UserTradeWin *this, DropContents *pkContents, unsigned int uiReceiverInvIndex);
void __thiscall UserTradeWin::UpdateMeWin(UserTradeWin *this, float fCurTime); // idb
char __thiscall UserTradeInvWin::EatDropInstance(UserTradeInvWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
void __thiscall UserTradeWin::OnCommand(UserTradeWin *this, unsigned int wParam, int lParam); // idb
UserTradeInvWin *__cdecl UserTradeInvWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent); // idb
UserTradeWin *__cdecl UserTradeWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall UserTradeWin::Create(UserTradeWin *this, PgFrameWork *pkFrameWork);
UserTradeInvWin *__thiscall UserTradeInvWin::`scalar deleting destructor'(UserTradeInvWin *this, unsigned int a2);
UserTradeWin *__thiscall UserTradeWin::`vector deleting destructor'(UserTradeWin *this, unsigned int a2);
void __thiscall VoteWin::OnShowWin(VoteWin *this); // idb
void __thiscall VoteWin::OnReason(VoteWin *this); // idb
void VoteWin::OnHelpLink();
void __thiscall VoteWin::SetProposerText(VoteWin *this, const char *pcProposer); // idb
const char *__thiscall VoteWin::GetProposer(VoteWin *this); // idb
void __thiscall VoteWin::SetTargetText(VoteWin *this, const char *pcTarget); // idb
const char *__thiscall VoteWin::GetTarget(VoteWin *this); // idb
void __thiscall VoteWin::SetReasonText(VoteWin *this, const char *pcText); // idb
const char *__thiscall VoteWin::GetReasonText(VoteWin *this); // idb
// int __usercall mktime_2@<eax>(tm *_Tm@<eax>); idb
void __thiscall VoteWin::OnCloseWin(VoteWin *this); // idb
void __thiscall VoteWin::OnCancel(VoteWin *this); // idb
void __thiscall VoteWin::SetReasonEditText(VoteWin *this, const char *pcText); // idb
const char *__thiscall VoteWin::GetReasonEditText(VoteWin *this); // idb
void __thiscall VoteWin::OnSelected(VoteWin *this); // idb
void __thiscall VoteWin::SetReasonType(VoteWin *this, unsigned int uiType); // idb
void __thiscall VoteWin::VoteWin(VoteWin *this); // idb
void __thiscall VoteWin::~VoteWin(VoteWin *this); // idb
void __thiscall VoteWin::UpdateTimer(VoteWin *this, float fTime); // idb
void __thiscall VoteWin::SetVoteWinType(VoteWin *this, bool bSuggestion); // idb
void __thiscall VoteReasonWin::OnReasonSelect(VoteReasonWin *this, VoteReasonWin::eVoteReasonType eType); // idb
void __thiscall VoteWin::UpdateMeWin(VoteWin *this, float fTime); // idb
void __thiscall VoteReasonWin::VoteReasonWin(VoteReasonWin *this); // idb
void __thiscall VoteReasonWin::~VoteReasonWin(VoteReasonWin *this); // idb
void __thiscall VoteReasonWin::OnCommand(VoteReasonWin *this, unsigned int wParam, int lParam); // idb
VoteWin *__cdecl VoteWin::CreateWin(PgFrameWork *pkFrameWork); // idb
VoteReasonWin *__cdecl VoteReasonWin::CreateWin(NiPointer<NiNode> spNode, PgWin *pkParent); // idb
char __thiscall VoteWin::Create(VoteWin *this, PgFrameWork *pkFrameWork);
void __thiscall VoteWin::OnOK(VoteWin *this); // idb
char __thiscall VoteReasonWin::Create(VoteReasonWin *this, NiPointer<NiNode> spNode, PgWin *pkParent);
void __thiscall VoteWin::OnCommand(VoteWin *this, unsigned int wParam, int lParam); // idb
KQVoteDesc *__cdecl KQVoteDescTable::GetByID(const int iID); // idb
VoteWin *__thiscall VoteWin::`scalar deleting destructor'(VoteWin *this, unsigned int a2);
VoteReasonWin *__thiscall VoteReasonWin::`vector deleting destructor'(VoteReasonWin *this, unsigned int a2);
void __thiscall LogoutAfterMinutesWin::SetStartTime(LogoutAfterMinutesWin *this, float fStart); // idb
void __thiscall WaitingForLogoutWin::ProcessMeInput(WaitingForLogoutWin *this, bool *bHit); // idb
void __thiscall WaitingForLogoutWin::WaitingForLogoutWin(WaitingForLogoutWin *this); // idb
void __thiscall WaitingForLogoutWin::~WaitingForLogoutWin(WaitingForLogoutWin *this); // idb
void __thiscall WaitingForLogoutWin::OnClose(WaitingForLogoutWin *this); // idb
void __thiscall WaitingForLogoutWin::SetLogoutType(WaitingForLogoutWin *this, WaitingForLogoutWin::LogoutType eType); // idb
void __thiscall WaitingForLogoutWin::SetKeyMap(WaitingForLogoutWin *this, KeyMap *pkMap); // idb
void __thiscall WaitingForLogoutWin::OnShowWin(WaitingForLogoutWin *this); // idb
void __thiscall WaitingForLogoutWin::OnCloseBut(WaitingForLogoutWin *this); // idb
void __thiscall WaitingForLogoutWin::OnTimeOver(WaitingForLogoutWin *this); // idb
void __thiscall WaitingForLogoutWin::Cancel(WaitingForLogoutWin *this); // idb
void __thiscall LogoutAfterMinutesWin::LogoutAfterMinutesWin(LogoutAfterMinutesWin *this); // idb
void __thiscall LogoutAfterMinutesWin::~LogoutAfterMinutesWin(LogoutAfterMinutesWin *this); // idb
char __thiscall LogoutAfterMinutesWin::Create(LogoutAfterMinutesWin *this, PgFrameWork *pkFrameWork);
void __thiscall LogoutAfterMinutesWin::OnCancelBut(LogoutAfterMinutesWin *this); // idb
void __thiscall LogoutAfterMinutesWin::UpdateMeWin(LogoutAfterMinutesWin *this, float fCurTime); // idb
void __thiscall LogoutAfterMinutesWin::OnCommand(LogoutAfterMinutesWin *this, unsigned int wParam, int lParam); // idb
LogoutAfterMinutesWin *__cdecl LogoutAfterMinutesWin::CreateWin(PgFrameWork *pkFrameWork); // idb
WaitingForLogoutWin *__cdecl WaitingForLogoutWin::CreateWin(unsigned int dwScrWidth, unsigned int dwScrHeight, PgFrameWork *pkFrameWork); // idb
char __thiscall WaitingForLogoutWin::Create(WaitingForLogoutWin *this, unsigned int dwScrWidth, unsigned int dwScrHeight, PgFrameWork *pkFrameWork);
WaitingForLogoutWin *__thiscall WaitingForLogoutWin::`scalar deleting destructor'(WaitingForLogoutWin *this, unsigned int a2);
LogoutAfterMinutesWin *__thiscall LogoutAfterMinutesWin::`scalar deleting destructor'(LogoutAfterMinutesWin *this, unsigned int a2);
void __thiscall WeaponTitleWin::WeaponTitleWin(WeaponTitleWin *this); // idb
void __thiscall WeaponTitleWin::~WeaponTitleWin(WeaponTitleWin *this); // idb
void __thiscall WeaponTitleWin::OnQuit(WeaponTitleWin *this); // idb
void __thiscall WeaponTitleWin::ResetContents(WeaponTitleWin *this); // idb
void __thiscall WeaponTitleWin::SignTitleFailed(WeaponTitleWin *this, ITEM_INVEN *rkLicenseInven); // idb
void __thiscall WeaponTitleDeleteWin::SetClearItemInven(WeaponTitleDeleteWin *this, ITEM_INVEN *rkInven); // idb
void __thiscall WeaponTitleWin::OnCommand(WeaponTitleWin *this, unsigned int wParam, int lParam); // idb
void __thiscall WeaponTitleWin::OnClose(WeaponTitleWin *this); // idb
void __thiscall WeaponTitleWin::SignTitleSuccess(WeaponTitleWin *this, ITEM_INVEN *rkLicenseInven, Item *pkWeapon); // idb
char __thiscall WeaponTitleWin::Create(WeaponTitleWin *this, PgFrameWork *pkFrameWork);
void __thiscall WeaponTitleWin::DirectMessage(WeaponTitleWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall WeaponTitleWin::OnRegBtn(WeaponTitleWin *this, int iIndex); // idb
char __thiscall WeaponTitleDeleteWin::Create(WeaponTitleDeleteWin *this, PgFrameWork *pkFrameWork);
void __thiscall WeaponTitleDeleteWin::OnRegBtn(WeaponTitleDeleteWin *this, int iIndex); // idb
void __thiscall WeaponTitleWin::OnShowWin(WeaponTitleWin *this); // idb
WeaponTitleWin *__cdecl WeaponTitleWin::CreateWin(PgFrameWork *pkFrameWork); // idb
WeaponTitleDeleteWin *__cdecl WeaponTitleDeleteWin::CreateWin(PgFrameWork *pkFrameWork); // idb
// void __userpurge WeaponTitleWin::SetWeaponTitle(WeaponTitleWin *this@<ecx>, signed int a2@<esi>, ShineItemAttr_Weapon *pkWeapon, unsigned __int16 wepID);
// void __userpurge WeaponTitleDeleteWin::SetWeaponTitle(WeaponTitleDeleteWin *this@<ecx>, signed int a2@<ebx>, ShineItemAttr_Weapon *pkWeapon, unsigned __int16 wepID);
WeaponTitleDeleteWin *__thiscall WeaponTitleDeleteWin::`vector deleting destructor'(WeaponTitleDeleteWin *this, unsigned int a2);
void __thiscall WingStoneMapWin::SetMapViewRect(WingStoneMapWin *this, unsigned int dwLeft, unsigned int dwTop, unsigned int dwRight, unsigned int dwBottom); // idb
void __thiscall WingStoneMapWin::OnClose(WingStoneMapWin *this); // idb
void WingStoneMapWin::OnHelpLink();
void __thiscall WingStoneMapWin::OnFly(WingStoneMapWin *this); // idb
void __thiscall WingStoneMapWin::SetWinPos(WingStoneMapWin *this, float fCharWorldX, float fCharWorldY); // idb
void __thiscall WingStoneMapWin::WingStoneMapWin(WingStoneMapWin *this); // idb
void __thiscall WingStoneMapWin::~WingStoneMapWin(WingStoneMapWin *this); // idb
void __thiscall WingStoneMapWin::ReSetView(WingStoneMapWin *this); // idb
void __thiscall WingStoneMapWin::OnCommand(WingStoneMapWin *this, unsigned int wParam, int lParam); // idb
char __thiscall WingStoneMapWin::Create(WingStoneMapWin *this, PgFrameWork *pkFrameWork);
char __thiscall WingStoneMapWin::SetLoadMap(WingStoneMapWin *this, unsigned __int16 kMapID, float fX, float fY);
WingStoneMapWin *__cdecl WingStoneMapWin::CreateWin(PgFrameWork *pkFrameWork); // idb
WingStoneMapWin *__thiscall WingStoneMapWin::`scalar deleting destructor'(WingStoneMapWin *this, unsigned int a2);
void __thiscall WingStoneWin::OnCmdPlaceMemoryList(WingStoneWin *this); // idb
void __thiscall WingStoneWin::SetFirstGoddessWingUse(WingStoneWin *this, bool b); // idb
void __thiscall WingStoneWin::OnCmdClose(WingStoneWin *this); // idb
void __thiscall WingStoneWin::SetLockInvPos(WingStoneWin *this, unsigned int uiInvPos); // idb
void __thiscall WingStoneWin::CloseWingStoneWin(WingStoneWin *this); // idb
void __thiscall WingStoneWin::~WingStoneWin(WingStoneWin *this); // idb
void __thiscall WingStoneWin::OnCmdFlying(WingStoneWin *this); // idb
void __thiscall WingStoneWin::OnCmdPosiotionMemory(WingStoneWin *this); // idb
void __thiscall WingStoneWin::ChoiceList(WingStoneWin *this, unsigned int uiParam); // idb
void __thiscall WingStoneWin::WingStoneWin(WingStoneWin *this); // idb
WingStoneWin *__cdecl WingStoneWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall WingStoneWin::Create(WingStoneWin *this, PgFrameWork *pkFrameWork);
void __thiscall WingStoneWin::InitInformation(WingStoneWin *this); // idb
void __thiscall WingStoneWin::SetMapCoordinate(WingStoneWin *this, unsigned __int16 id); // idb
void __thiscall WingStoneWin::SearchMapID(WingStoneWin *this, unsigned int MemorySlot); // idb
void __thiscall WingStoneWin::OnCmdMapInfo(WingStoneWin *this); // idb
// void __userpurge WingStoneWin::UpdateMeWin(WingStoneWin *this@<ecx>, int a2@<edi>, float fCurTime);
void __thiscall WingStoneWin::OnCommand(WingStoneWin *this, unsigned int wParam, int lParam); // idb
WingStoneWin *__thiscall WingStoneWin::`scalar deleting destructor'(WingStoneWin *this, unsigned int a2);
void __thiscall WorldMapWin::DirectMessage(WorldMapWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
char __thiscall WorldMapWin::Create(WorldMapWin *this, PgFrameWork *pkFrameWork);
void __thiscall WorldMapWin::WorldMapLinkFail(WorldMapWin *this, unsigned __int16 nError, char nLevel); // idb
void __thiscall WorldMapWin::OnShowWin(WorldMapWin *this); // idb
void __thiscall WorldMapWin::~WorldMapWin(WorldMapWin *this); // idb
void __thiscall WorldMapWin::OnCommand(WorldMapWin *this, unsigned int wParam, int lParam); // idb
void __thiscall WorldMapWin::WorldMapWin(WorldMapWin *this); // idb
WorldMapWin *__cdecl WorldMapWin::CreateWin(PgFrameWork *pkFrameWork); // idb
unsigned int __cdecl ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::GetTotal(); // idb
MapInfo *__cdecl MapInfoTab::GetByLinkIndex(WM_Link LinkIndex); // idb
bool __cdecl WorldMapAvatarInfoTab::GetByNormalDungeon(Name3 *kMapName); // idb
NiPoint2 *__cdecl WorldMapAvatarInfoTab::GetByAvatarPosition(Name3 *kMapName); // idb
WorldMapWin *__thiscall WorldMapWin::`scalar deleting destructor'(WorldMapWin *this, unsigned int a2);
void __thiscall OptionBaseWin::OptionBaseWin(OptionBaseWin *this); // idb
void __thiscall OptionBaseWin::~OptionBaseWin(OptionBaseWin *this); // idb
void OptionBaseWin::OnHelpLink();
void __thiscall OptionBaseWin::ProcessMeInput(OptionBaseWin *this, bool *bHit); // idb
void __thiscall OptionBaseWin::UpdateMeWin(OptionBaseWin *this, float fCurTime); // idb
void __thiscall OptionBaseWin::OnWinClose(OptionBaseWin *this); // idb
void __thiscall OptionBaseWin::OnApply(OptionBaseWin *this); // idb
void __thiscall OptionBaseWin::OnDefaultSetting(OptionBaseWin *this); // idb
void __thiscall OptionBaseWin::OnGame(OptionBaseWin *this); // idb
void __thiscall OptionBaseWin::OnGraphic(OptionBaseWin *this); // idb
void __thiscall OptionBaseWin::OnSound(OptionBaseWin *this); // idb
char __thiscall OptionBaseWin::Create(OptionBaseWin *this, PgFrameWork *pkFrameWork);
void __thiscall OptionBaseWin::OnCommand(OptionBaseWin *this, unsigned int wParam, int lParam); // idb
void __thiscall OptionBaseWin::SetMode(OptionBaseWin *this, int nMode); // idb
OptionBaseWin *__cdecl OptionBaseWin::CreateWin(PgFrameWork *pkFrameWork); // idb
OptionBaseWin *__thiscall OptionBaseWin::`vector deleting destructor'(OptionBaseWin *this, unsigned int a2);
void __thiscall OptionGraphicWin::OptionGraphicWin(OptionGraphicWin *this); // idb
void __thiscall OptionGraphicWin::~OptionGraphicWin(OptionGraphicWin *this); // idb
void __stdcall OptionGraphicWin::OnGamma(int nPos);
void __thiscall OptionGraphicWin::OnApply(OptionGraphicWin *this); // idb
void __thiscall OptionGraphicWin::SetViewLength(OptionGraphicWin *this, float fRate); // idb
void __thiscall OptionGraphicWin::SetCharShadowCnt(OptionGraphicWin *this, int nCnt); // idb
void __thiscall OptionGraphicWin::SetLodAdjust(OptionGraphicWin *this, float fVal); // idb
void __thiscall OptionGraphicWin::OnResolutionClick(OptionGraphicWin *this); // idb
void __stdcall OptionGraphicWin::OnViewLength(int nPos);
void __stdcall OptionGraphicWin::OnCharShadowCnt(int nPos);
void __thiscall OptionGraphicWin::OnOutLineCheck(OptionGraphicWin *this); // idb
void __thiscall OptionGraphicWin::CloseWin(OptionGraphicWin *this); // idb
void __thiscall OptionGraphicWin::SetOutLineCheck(OptionGraphicWin *this, bool bLine); // idb
void __thiscall OptionGraphicWin::SetResoulution(OptionGraphicWin *this, unsigned int uiWidth, unsigned int uiHeight); // idb
void __thiscall OptionGraphicWin::SetWindowFullModeCheck(OptionGraphicWin *this, bool bCheck); // idb
void __thiscall OptionGraphicWin::OnGlowEffectToggle(OptionGraphicWin *this); // idb
void __thiscall OptionGraphicWin::SetGlowEffectEnable(OptionGraphicWin *this, int bEnable);
void __thiscall OptionGraphicWin::OnShakeEffectToggle(OptionGraphicWin *this); // idb
void __thiscall OptionGraphicWin::SetScreenShakeEffectEnable(OptionGraphicWin *this, bool bEnable); // idb
void __thiscall OptionGraphicWin::OnCharAuraEffectToggle(OptionGraphicWin *this); // idb
void __thiscall OptionGraphicWin::SetCharAuraEffectEnable(OptionGraphicWin *this, bool bEnable); // idb
void __thiscall OptionGraphicWin::OnScreenShotToggle(OptionGraphicWin *this); // idb
void __thiscall OptionGraphicWin::SetScreenShotEnable(OptionGraphicWin *this, bool bEnable); // idb
char __thiscall OptionGraphicWin::Create(OptionGraphicWin *this, PgFrameWork *pkFrameWork);
void __stdcall OptionGraphicWin::OnLodAdjust(int nPos);
void __thiscall OptionGraphicWin::OnWindowModCheck(OptionGraphicWin *this); // idb
void __thiscall OptionGraphicWin::SetWindowFullMode(OptionGraphicWin *this, bool bWinFullMode); // idb
void __thiscall OptionGraphicWin::SetMultiSampleCheck(OptionGraphicWin *this, bool bCheck); // idb
void __thiscall OptionGraphicWin::OnSlideClick(OptionGraphicWin *this, unsigned int uiID); // idb
void __thiscall OptionGraphicWin::SetInfo(OptionGraphicWin *this, MachineOpt::GraphicOption *kOption); // idb
void __thiscall OptionGraphicWin::OnMultiSampleCheck(OptionGraphicWin *this); // idb
void __thiscall OptionGraphicWin::ResetInfo(OptionGraphicWin *this); // idb
void __thiscall OptionGraphicWin::OnCommand(OptionGraphicWin *this, unsigned int wParam, int lParam); // idb
void __thiscall OptionGraphicWin::OnWinClose(OptionGraphicWin *this); // idb
void __thiscall OptionGraphicWin::OpenWin(OptionGraphicWin *this); // idb
void __thiscall OptionGraphicWin::OnDefaultSetting(OptionGraphicWin *this); // idb
OptionGraphicWin *__cdecl OptionGraphicWin::CreateWin(PgFrameWork *pkFrameWork); // idb
OptionGraphicWin *__thiscall OptionGraphicWin::`vector deleting destructor'(OptionGraphicWin *this, unsigned int a2);
void __thiscall OptionSoundWin::OptionSoundWin(OptionSoundWin *this); // idb
void __thiscall OptionSoundWin::~OptionSoundWin(OptionSoundWin *this); // idb
void __thiscall OptionSoundWin::OnClose(OptionSoundWin *this); // idb
void __thiscall OptionSoundWin::SetInfo(OptionSoundWin *this, MachineOpt::SoundOption *kOption); // idb
void __thiscall OptionSoundWin::OnMasterVolume(OptionSoundWin *this, unsigned int uiVol); // idb
void __thiscall OptionSoundWin::OnBgVolume(OptionSoundWin *this, unsigned int uiVol); // idb
void __thiscall OptionSoundWin::OnEffectVolume(OptionSoundWin *this, unsigned int uiVol); // idb
void __thiscall OptionSoundWin::OnEnvEffectVolume(OptionSoundWin *this, unsigned int uiVol); // idb
void __thiscall OptionSoundWin::OnApply(OptionSoundWin *this); // idb
void __thiscall OptionSoundWin::CloseWin(OptionSoundWin *this); // idb
void __thiscall OptionSoundWin::OpenWin(OptionSoundWin *this); // idb
void __thiscall OptionSoundWin::OnDefaultSetting(OptionSoundWin *this); // idb
char __thiscall OptionSoundWin::Create(OptionSoundWin *this, PgFrameWork *pkFrameWork);
void __thiscall OptionSoundWin::OnSlideClick(OptionSoundWin *this, unsigned int uiID); // idb
void __thiscall OptionSoundWin::OnCommand(OptionSoundWin *this, unsigned int wParam, int lParam); // idb
OptionSoundWin *__cdecl OptionSoundWin::CreateWin(PgFrameWork *pkFrameWork); // idb
OptionSoundWin *__thiscall OptionSoundWin::`vector deleting destructor'(OptionSoundWin *this, unsigned int a2);
void __thiscall OptionSystemWin::OptionSystemWin(OptionSystemWin *this); // idb
void __thiscall OptionSystemWin::~OptionSystemWin(OptionSystemWin *this); // idb
void __thiscall OptionSystemWin::OnApply(OptionSystemWin *this); // idb
void __thiscall OptionSystemWin::OnDefaultSetting(OptionSystemWin *this); // idb
void __thiscall OptionSystemWin::OnMyNameCheck(OptionSystemWin *this); // idb
void __thiscall OptionSystemWin::OnOtherCharNameCheck(OptionSystemWin *this); // idb
void __thiscall OptionSystemWin::OnNpcNameCheck(OptionSystemWin *this); // idb
void __thiscall OptionSystemWin::OnMonsterNameCheck(OptionSystemWin *this); // idb
void __thiscall OptionSystemWin::OnItemNameCheck(OptionSystemWin *this); // idb
void __thiscall OptionSystemWin::OnHPCheck(OptionSystemWin *this); // idb
void __thiscall OptionSystemWin::OnSPCheck(OptionSystemWin *this); // idb
void __thiscall OptionSystemWin::OnInterfaceCheck(OptionSystemWin *this); // idb
void __thiscall OptionSystemWin::OnSpeechCheck(OptionSystemWin *this); // idb
// void __usercall OptionSystemWin::OnInterfacePosCheck(OptionSystemWin *this@<ecx>, signed int a2@<esi>);
void __thiscall OptionSystemWin::OnChattingHideCheck(OptionSystemWin *this); // idb
void __thiscall OptionSystemWin::OnWisCheck(OptionSystemWin *this); // idb
void __thiscall OptionSystemWin::OnTrdCheck(OptionSystemWin *this); // idb
void __thiscall OptionSystemWin::OnParCheck(OptionSystemWin *this); // idb
void __thiscall OptionSystemWin::OnAgCheck(OptionSystemWin *this); // idb
void __thiscall OptionSystemWin::OnSystemMsgCheck(OptionSystemWin *this); // idb
void __thiscall OptionSystemWin::OnOKMsgBoxCheck(OptionSystemWin *this); // idb
void __thiscall OptionSystemWin::OnChatInputCheck(OptionSystemWin *this); // idb
void __thiscall OptionSystemWin::OnNamePanelCheck(OptionSystemWin *this); // idb
void __thiscall OptionSystemWin::OnBasicInfoTipCheck(OptionSystemWin *this); // idb
void __thiscall OptionSystemWin::OnPlayGuideCheck(OptionSystemWin *this); // idb
void __thiscall OptionSystemWin::OnAutoStack(OptionSystemWin *this); // idb
void __thiscall OptionSystemWin::CloseWin(OptionSystemWin *this); // idb
void __thiscall OptionSystemWin::SetMyNameCheck(OptionSystemWin *this, bool b); // idb
void __thiscall OptionSystemWin::SetOtherCharNameCheck(OptionSystemWin *this, bool b); // idb
void __thiscall OptionSystemWin::SetNpcNameCheck(OptionSystemWin *this, bool b); // idb
void __thiscall OptionSystemWin::SetMonsterNameCheck(OptionSystemWin *this, bool b); // idb
void __thiscall OptionSystemWin::SetItemNameCheck(OptionSystemWin *this, bool b); // idb
void __thiscall OptionSystemWin::SetHPCheck(OptionSystemWin *this, bool b); // idb
void __thiscall OptionSystemWin::SetSPCheck(OptionSystemWin *this, bool b); // idb
void __thiscall OptionSystemWin::SetInterfaceCheck(OptionSystemWin *this, bool b); // idb
void __thiscall OptionSystemWin::SetSpeechCheck(OptionSystemWin *this, bool b); // idb
void __thiscall OptionSystemWin::SetInterfacePosCheck(OptionSystemWin *this, bool b); // idb
void __thiscall OptionSystemWin::SetChattingHideCheck(OptionSystemWin *this, bool b); // idb
void __thiscall OptionSystemWin::SetWisCheck(OptionSystemWin *this, bool b); // idb
void __thiscall OptionSystemWin::SetTrdCheck(OptionSystemWin *this, bool b); // idb
void __thiscall OptionSystemWin::SetParCheck(OptionSystemWin *this, bool b); // idb
void __thiscall OptionSystemWin::SetAgCheck(OptionSystemWin *this, bool b); // idb
void __thiscall OptionSystemWin::SetSystemMsgCheck(OptionSystemWin *this, bool b); // idb
void __thiscall OptionSystemWin::SetOKMsgBoxCheck(OptionSystemWin *this, bool b); // idb
void __thiscall OptionSystemWin::SetChatInputCheck(OptionSystemWin *this, bool b); // idb
void __thiscall OptionSystemWin::SetNamePanelCheck(OptionSystemWin *this, bool b); // idb
void __thiscall OptionSystemWin::SetBasicInfoTipCheck(OptionSystemWin *this, bool b); // idb
void __thiscall OptionSystemWin::SetPlayGuideCheck(OptionSystemWin *this, bool b); // idb
void __thiscall OptionSystemWin::SetAutoStack(OptionSystemWin *this, bool b); // idb
void __thiscall OptionSystemWin::SetInfo(OptionSystemWin *this, MachineOpt::GameOption *kOption); // idb
char __thiscall OptionSystemWin::Create(OptionSystemWin *this, PgFrameWork *pkFrameWork);
// void __userpurge OptionSystemWin::OnCommand(OptionSystemWin *this@<ecx>, signed int a2@<esi>, unsigned int wParam, int lParam);
void __thiscall OptionSystemWin::OnWinClose(OptionSystemWin *this); // idb
void __thiscall OptionSystemWin::OpenWin(OptionSystemWin *this); // idb
OptionSystemWin *__cdecl OptionSystemWin::CreateWin(PgFrameWork *pkFrameWork); // idb
OptionSystemWin *__thiscall OptionSystemWin::`vector deleting destructor'(OptionSystemWin *this, unsigned int a2);
void __thiscall AbstateIcon::SetIconFile(AbstateIcon *this, char *FileName, int IconIndex); // idb
unsigned __int16 __thiscall AbstateIcon::GetAbstate(AbstateIcon *this); // idb
void __thiscall AbstateIcon::SetDuplicate(AbstateIcon *this, unsigned int uiDuplicate); // idb
void __thiscall AbstateIcon::ClearDuplicateText(AbstateIcon *this); // idb
void __thiscall AbstateIcon::SetAbstate(AbstateIcon *this, int kAbstateID);
void __thiscall AbstateIcon::Show(AbstateIcon *this, bool b); // idb
void __thiscall AbstateIcon::AbstateIcon(AbstateIcon *this); // idb
void __thiscall AbstateIcon::~AbstateIcon(AbstateIcon *this); // idb
// char __userpurge AbstateIcon::Create@<al>(AbstateIcon *this@<ecx>, int a2@<ebx>, int a3@<edi>, int iXPos, int iYPos, int iWidth, int iHeight, PgWin *pkParent, bool EraseEnable);
void __thiscall AbstateIcon::SetBackPlaneColor(AbstateIcon *this, float rad, float green, float blue, float alpha); // idb
void __thiscall AbstateIcon::CreateSubIconImg(AbstateIcon *this, char *pcFn, unsigned int uiIndex, unsigned int uiIconWidth, unsigned int uiIconHeight); // idb
void __thiscall AbstateIcon::OnHide(AbstateIcon *this); // idb
void __thiscall AbstateIcon::DirectMessage(AbstateIcon *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall AbstateIcon::CreateSubImagePlane(AbstateIcon *this, unsigned int uiWidth, unsigned int uiHeight); // idb
AbstateIcon *__cdecl AbstateIcon::CreateWin(int iXPos, int iYPos, int iWidth, int iHeight, PgWin *pkParent, int EraseEnable);
void __cdecl PgUtil::SetTextureCoord(NiScreenElements *pkScreenGeom, int nPoly, unsigned int uiTextureWidht, unsigned int uiTextureHeight, unsigned int uiXPos, unsigned int uiYPos, unsigned int uiWidth, unsigned int uiHeight); // idb
AbstateIcon *__thiscall AbstateIcon::`vector deleting destructor'(AbstateIcon *this, unsigned int a2);
void __thiscall ActionIcon::ActionIcon(ActionIcon *this); // idb
void __thiscall ActionIcon::~ActionIcon(ActionIcon *this); // idb
bool __thiscall ActionIcon::Create(ActionIcon *this, int iXPos, int iYPos, PgWin *pkParent); // idb
void __thiscall ActionIcon::SetAction(ActionIcon *this, unsigned int uiTableIndex); // idb
ActionIcon *__cdecl ActionIcon::CreateWin(int iXPos, int iYPos, PgWin *pkParent); // idb
ActionIcon *__thiscall ActionIcon::`vector deleting destructor'(ActionIcon *this, unsigned int a2);
void __thiscall AniIconWin::AniIconWin(AniIconWin *this); // idb
void __thiscall AniIconWin::~AniIconWin(AniIconWin *this); // idb
char __thiscall AniIconWin::Create(AniIconWin *this, int iXPos, int iYPos, int iWidth, int iHeight, PgWin *pkParent);
bool __stdcall AniIconWin::CreateItemIconTexture(unsigned __int16 itemID);
NiScreenElements *__thiscall AniIconWin::GetGeometry(AniIconWin *this); // idb
char __thiscall AniIconWin::CreateAniTexture(AniIconWin *this, const char *pkName);
AniIconWin *__cdecl AniIconWin::CreateWin(int iXPos, int iYPos, PgWin *pkParent); // idb
AniIconWin *__cdecl AniIconWin::CreateWin(int iXPos, int iYPos, int iWidth, int iHeight, PgWin *pkParent); // idb
NiPointer<AniIconWin> *__cdecl AniIconWin::CreateWin(NiPointer<AniIconWin> *result, const char *pkName, int iWidth, int iHeight); // idb
AniIconWin *__thiscall AniIconWin::`scalar deleting destructor'(AniIconWin *this, unsigned int a2);
Item *__thiscall IconSlotWin::GetItem(IconSlotWin *this); // idb
void __thiscall IconSlotWin::OnFirstHitWin(IconSlotWin *this); // idb
unsigned __int16 __thiscall IconSlotWin::GetSkill(IconSlotWin *this); // idb
void __thiscall IconSlotWin::IconSlotWin(IconSlotWin *this); // idb
void __thiscall IconSlotWin::~IconSlotWin(IconSlotWin *this); // idb
void __thiscall IconSlotWin::SetItem(IconSlotWin *this, Item *pkItem, bool bShowLotText, bool bEnable); // idb
void __thiscall IconSlotWin::Clear(IconSlotWin *this); // idb
void __thiscall IconSlotWin::SetSkill(IconSlotWin *this, unsigned __int16 kSkillID); // idb
void __thiscall IconSlotWin::SetAction(IconSlotWin *this, unsigned int uiTableIndex); // idb
// void __userpurge IconSlotWin::SetItemSell(IconSlotWin *this@<ecx>, int a2@<ebx>, PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *pkItemSellInfo);
void __thiscall IconSlotWin::SetItemByID(IconSlotWin *this, int kItemID);
// void __userpurge IconSlotWin::SetDropContents(IconSlotWin *this@<ecx>, int a2@<ebx>, DropContents *pkDropContents);
char __thiscall IconSlotWin::EatDropInstance(IconSlotWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
IconSlotWin *__cdecl IconSlotWin::CreateWin(int iXPos, int iYPos, PgWin *pkParent); // idb
IconSlotWin *__thiscall IconSlotWin::`scalar deleting destructor'(IconSlotWin *this, unsigned int a2);
void __thiscall IconWin::SetIconImg(IconWin *this, NiSourceTexture *pkTexture, unsigned int uiIndex, unsigned int uiIconWidth, unsigned int uiIconHeight); // idb
std::vector<unsigned long,std::allocator<unsigned long> > *__cdecl IconWin::GetCoolTimeIconList();
void __thiscall DecoPlaneTex::Show(DecoPlaneTex *this, bool bShow); // idb
void __thiscall DecoPlaneColor::Show(DecoPlaneColor *this, bool bShow); // idb
void __thiscall IconWin::ProcessMeInput(IconWin *this, bool *bHit); // idb
void __thiscall IconWin::ReleaseMeInput(IconWin *this); // idb
void __thiscall IconWin::Show(IconWin *this, bool b); // idb
bool __thiscall IconWin::GetShow(IconWin *this); // idb
void __thiscall IconWin::ShowFocus(IconWin *this, bool bFocus); // idb
void __thiscall IconWin::UpdateMeWin(IconWin *this, float fCurTime); // idb
void __thiscall IconWin::SetCoolTimeID(IconWin *this, unsigned __int16 id); // idb
void __thiscall IconWin::SetCoolTimeIDByItemAction(IconWin *this, unsigned __int16 id); // idb
bool __thiscall IconWin::IsStartCoolTime(IconWin *this); // idb
void __thiscall IconWin::CooltimeDecrease(IconWin *this, unsigned __int16 kID); // idb
void __thiscall IconWin::SelectIcon(IconWin *this); // idb
void __thiscall DecoPlaneTex::DecoPlaneTex(DecoPlaneTex *this); // idb
void __thiscall DecoPlaneTex::SetImage(DecoPlaneTex *this, char *pcFn, unsigned int uiIndex); // idb
// void __thiscall DecoPlaneColor::DecoPlaneColor(DecoPlaneColor *this); idb
void __thiscall DecoPlaneColor::SetColor(DecoPlaneColor *this, char byR, char byG, char byB, char bySubR, char bySubG, char bySubB); // idb
void __thiscall IconWin::IconWin(IconWin *this); // idb
void __thiscall IconWin::ResetUVs(IconWin *this, NiSourceTexture *pkTexture, unsigned int uiIndex, unsigned int uiIconWidth, unsigned int uiIconHeight); // idb
void __thiscall IconWin::StartCoolTime(IconWin *this, float fCurTime, float fDlyTime, float fStartTime); // idb
void __cdecl IconWin::StartCoolTimebyItemUse(unsigned __int16 id, float fCurTime, float fDlyTime, float fStartTime); // idb
void __cdecl IconWin::StartCoolTime(unsigned __int16 id, float fCurTime, float fDlyTime, float fStartTime); // idb
void __thiscall DecoPlaneTex::Create(DecoPlaneTex *this, PgWin *pkParent); // idb
void __thiscall DecoPlaneColor::Create(DecoPlaneColor *this, PgWin *pkParent); // idb
void __thiscall IconWin::~IconWin(IconWin *this); // idb
void __thiscall IconWin::CreateGeometry(IconWin *this, unsigned int uiWidth, unsigned int uiHeight); // idb
void __thiscall IconWin::CreateGeometry(IconWin *this, NiSourceTexture *pkTexture, unsigned int uiIndex, unsigned int uiIconWidth, unsigned int uiIconHeight); // idb
void __thiscall IconWin::IconDisable(IconWin *this, bool b); // idb
void __thiscall IconWin::IconDisable(IconWin *this, float fR, float fG, float fB); // idb
void __thiscall IconWin::CreateGeometry(IconWin *this, unsigned int uiWidth, unsigned int uiHeight, char *pPickFileName); // idb
IconWin *__cdecl IconWin::CreateWin(int iXPos, int iYPos, int iWidth, int iHeight, PgWin *pkParent); // idb
void __cdecl IconWin::ClearRegisteredCoolTime(); // idb
IconWin *__thiscall IconWin::`scalar deleting destructor'(IconWin *this, unsigned int a2);
void __thiscall ItemIcon::ShowLotText(ItemIcon *this, int b);
void __thiscall ItemIcon::ProcessMeInput(ItemIcon *this, bool *bHit); // idb
Item *__thiscall ItemIcon::GetItem(ItemIcon *this); // idb
char *__cdecl GetAmountString(Item *pkItem); // idb
void __thiscall ItemIcon::Show(ItemIcon *this, int b);
char __stdcall ItemIcon::CheckQuestDoing(unsigned __int16 kId);
signed __int16 __thiscall ItemIcon::GetItemID(ItemIcon *this);
void __thiscall ItemIcon::OnFirstHitWin(ItemIcon *this); // idb
void __thiscall ItemIcon::~ItemIcon(ItemIcon *this); // idb
char __thiscall ItemIcon::Create(ItemIcon *this, int iXPos, int iYPos, PgWin *pkParent);
void __thiscall ItemIcon::SetSubIconImage(ItemIcon *this, char *pcFn, unsigned int uiIndex, unsigned int uiIconWidth, unsigned int uiIconHeight); // idb
void __thiscall ItemIcon::SetBackPlaneColor(ItemIcon *this, float rad, float green, float blue, float alpha); // idb
void __thiscall ItemIcon::SetTopPlaneColor(ItemIcon *this, float rad, float green, float blue, float alpha); // idb
void __thiscall ItemIcon::DoingQuest(ItemIcon *this); // idb
void __thiscall ItemIcon::GiveUpQuest(ItemIcon *this); // idb
void __thiscall ItemIcon::SetItem(ItemIcon *this, Item *pkItem, bool bEnable); // idb
// void __userpurge ItemIcon::SetItemAsID(ItemIcon *this@<ecx>, int a2@<edi>, int itemID);
void __thiscall ItemIcon::SetChargedItem(ItemIcon *this, unsigned int dwShopItemID); // idb
// void __userpurge ItemIcon::SetItemSellInfo(ItemIcon *this@<ecx>, int a2@<ebx>, int a3@<edi>, PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *pkItemSellInfo);
void __thiscall ItemIcon::CreateSubImagePlane(ItemIcon *this, unsigned int uiWidth, unsigned int uiHeight); // idb
void __thiscall ItemIcon::PlaneInit(ItemIcon *this); // idb
void __thiscall ItemIcon::ItemIcon(ItemIcon *this); // idb
ItemIcon *__cdecl ItemIcon::CreateWin(int iXPos, int iYPos, PgWin *pkParent); // idb
void __thiscall DecoPlaneColor::~DecoPlaneColor(DecoPlaneTex *this); // idb
MaterialItemIcon *__thiscall MaterialItemIcon::`scalar deleting destructor'(MaterialItemIcon *this, unsigned int a2);
Skill::EmpowerInfo *__thiscall SkillIcon::GetEmpowerInfo(SkillIcon *this, Skill::EmpowerInfo *result); // idb
unsigned __int16 __thiscall SkillIcon::GetSkill(SkillIcon *this); // idb
Skill::EmpowerInfo *__thiscall SkillIcon::GetAccumulatedEmpowerInfo(SkillIcon *this, Skill::EmpowerInfo *result); // idb
Skill::EmpowerInfo *__thiscall SkillIcon::GetTotalAccumulatedEmpowerInfo(SkillIcon *this, Skill::EmpowerInfo *result); // idb
void __thiscall SkillIcon::ShowSkillPowerBar(SkillIcon *this, bool b); // idb
void __thiscall SkillIcon::SetBackPlaneColor(SkillIcon *this, float rad, float green, float blue, float alpha); // idb
void __thiscall SkillIcon::SetTopPlaneColor(SkillIcon *this, float rad, float green, float blue, float alpha); // idb
void __thiscall SkillIcon::Show(SkillIcon *this, bool b); // idb
bool __thiscall SkillIcon::GraySkillTexture(SkillIcon *this, NiTexture *pkGrayTexture, NiD3DPass *pkD3DPass); // idb
void __thiscall SkillIcon::~SkillIcon(SkillIcon *this); // idb
char __thiscall SkillIcon::Create(SkillIcon *this, int iXPos, int iYPos, PgWin *pkParent);
void __thiscall SkillIcon::SetEmpowerInfo(SkillIcon *this, Skill::EmpowerInfo kInfo); // idb
void __thiscall SkillIcon::RefreshSkillInfo(SkillIcon *this); // idb
void __cdecl SkillIcon::RefreshSkillInfoAll(); // idb
void __thiscall SkillIcon::SkillIcon(SkillIcon *this); // idb
void __thiscall SkillIcon::UsingSkillAlphaProperty(SkillIcon *this); // idb
void __thiscall SkillIcon::UsingItemAlphaProperty(SkillIcon *this); // idb
void __thiscall SkillIcon::SetSkill(SkillIcon *this, unsigned __int16 kSkillID); // idb
SkillIcon *__cdecl SkillIcon::CreateWin(int iXPos, int iYPos, PgWin *pkParent); // idb
void __thiscall NiTListBase<DFALL<SkillIcon *>,SkillIcon *>::~NiTListBase<DFALL<SkillIcon *>,SkillIcon *>(NiTListBase<DFALL<SkillIcon *>,SkillIcon *> *this); // idb
NiTListBase<DFALL<SkillIcon *>,SkillIcon *> *__thiscall NiTListBase<DFALL<SkillIcon *>,SkillIcon *>::`vector deleting destructor'(NiTListBase<DFALL<SkillIcon *>,SkillIcon *> *this, unsigned int a2);
NiTPointerListBase<DFALL<SkillIcon *>,SkillIcon *> *__thiscall NiTPointerListBase<DFALL<SkillIcon *>,SkillIcon *>::`vector deleting destructor'(NiTPointerListBase<DFALL<SkillIcon *>,SkillIcon *> *this, unsigned int a2);
SkillIcon *__thiscall SkillIcon::`scalar deleting destructor'(SkillIcon *this, unsigned int a2);
void __thiscall GuildCombatPropensityChangeWin::SetTitle(GuildCombatPropensityChangeWin *this, const char *pkTitle); // idb
void __thiscall GuildCombatPropensityChangeWin::OnCmdCancel(GuildCombatPropensityChangeWin *this); // idb
void __thiscall GuildCombatPropensityChangeWin::SetTextMsg(GuildCombatPropensityChangeWin *this, const char *pkMainMessage, const char *pkOkMessage, const char *pkCancelMessage); // idb
void GuildCombatPropensityChangeWin::OnHelpLink();
void __thiscall GuildCombatPropensityChangeWin::CheckButtonUpdate(GuildCombatPropensityChangeWin *this, int nIndex); // idb
void __thiscall GuildCombatPropensityChangeWin::~GuildCombatPropensityChangeWin(GuildCombatPropensityChangeWin *this); // idb
char __thiscall GuildCombatPropensityChangeWin::Create(GuildCombatPropensityChangeWin *this);
void __thiscall GuildCombatPropensityChangeWin::GuildCombatPropensityChangeWin(GuildCombatPropensityChangeWin *this); // idb
void __thiscall GuildCombatPropensityChangeWin::OnCmdOk(GuildCombatPropensityChangeWin *this); // idb
GuildCombatPropensityChangeWin *__cdecl GuildCombatPropensityChangeWin::CreateWin(); // idb
void __thiscall GuildCombatPropensityChangeWin::RegisterCallBack(GuildCombatPropensityChangeWin *this, boost::function<void __cdecl(int),std::allocator<void> > CallBackFunc); // idb
void __thiscall GuildCombatPropensityChangeWin::OnCommand(GuildCombatPropensityChangeWin *this, unsigned int wParam, int lParam); // idb
GuildCombatPropensityChangeWin *__cdecl GuildCombatPropensityChangeWin::Modal(const char *pkTitleName); // idb
GuildCombatPropensityChangeWin *__cdecl GuildCombatPropensityChangeWin::Modeless(const char *pkTitleName); // idb
GuildCombatPropensityChangeWin *__thiscall GuildCombatPropensityChangeWin::`vector deleting destructor'(GuildCombatPropensityChangeWin *this, unsigned int a2);
void __thiscall boost::function1<void,int,std::allocator<void>>::operator()(boost::function1<void,int,std::allocator<void> > *this, int a0); // idb
void __thiscall GuildFoundWin::OnCancel(GuildFoundWin *this); // idb
void GuildFoundWin::OnHelpLink();
void __thiscall GuildFoundWin::OnWarCheckBox(GuildFoundWin *this); // idb
void __thiscall GuildFoundWin::OnNoWarCheckBox(GuildFoundWin *this); // idb
void __thiscall GuildFoundWin::OnShowWin(GuildFoundWin *this); // idb
void __thiscall GuildFoundWin::GuildFoundWin(GuildFoundWin *this); // idb
void __thiscall GuildFoundWin::~GuildFoundWin(GuildFoundWin *this); // idb
char __thiscall GuildFoundWin::Create(GuildFoundWin *this, PgFrameWork *pkFrameWork);
void __thiscall GuildFoundWin::OnOk(GuildFoundWin *this); // idb
void __thiscall GuildFoundWin::OnEditEnd(GuildFoundWin *this, unsigned int wParam, int lParam); // idb
void __thiscall GuildFoundWin::OnCommand(GuildFoundWin *this, unsigned int wParam, int lParam); // idb
void __thiscall GuildFoundWin::UpdateMeWin(GuildFoundWin *this, float fCurTime); // idb
GuildFoundWin *__cdecl GuildFoundWin::CreateWin(PgFrameWork *pkFrameWork); // idb
GuildFoundWin *__thiscall GuildFoundWin::`scalar deleting destructor'(GuildFoundWin *this, unsigned int a2);
void __thiscall GuildMasterMenuWin::GuildMasterMenuWin(GuildMasterMenuWin *this); // idb
void __thiscall GuildMasterMenuWin::~GuildMasterMenuWin(GuildMasterMenuWin *this); // idb
void GuildMasterMenuWin::OnHelpLink();
void __thiscall GuildMasterMenuWin::OnCommand(GuildMasterMenuWin *this, unsigned int wParam, int lParam); // idb
char __thiscall GuildMasterMenuWin::Create(GuildMasterMenuWin *this, PgFrameWork *pkFrameWork);
GuildMasterMenuWin *__cdecl GuildMasterMenuWin::CreateWin(PgFrameWork *pkFrameWork); // idb
GuildMasterMenuWin *__thiscall GuildMasterMenuWin::`scalar deleting destructor'(GuildMasterMenuWin *this, unsigned int a2);
void GuildMenuWin::OnHelpLink();
void __thiscall GuildMenuWin::GuildMenuWin(GuildMenuWin *this); // idb
void __thiscall GuildMenuWin::~GuildMenuWin(GuildMenuWin *this); // idb
void __thiscall GuildMenuWin::CloseFoundWin(GuildMenuWin *this); // idb
GuildMasterMenuWin *__thiscall GuildMenuWin::GetMasterMenuWin(GuildMenuWin *this); // idb
void __thiscall GuildMenuWin::UpdateInformGuildMemberLoginText(GuildMenuWin *this); // idb
void __thiscall GuildMenuWin::OnCmdGuildMasterMenu(GuildMenuWin *this); // idb
void __thiscall GuildMenuWin::OpenMasterMenuWin(GuildMenuWin *this); // idb
void __thiscall GuildMenuWin::GuildStateBtnSetting(GuildMenuWin *this); // idb
char __thiscall GuildMenuWin::Create(GuildMenuWin *this, PgFrameWork *pkFrameWork);
GuildMenuWin *__cdecl GuildMenuWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void GuildMenuWin::OnCmdGuildAddMember();
void __thiscall GuildMenuWin::OnCmdGuildLeave(GuildMenuWin *this); // idb
void __thiscall GuildMenuWin::OnCommand(GuildMenuWin *this, unsigned int wParam, int lParam); // idb
GuildMenuWin *__thiscall GuildMenuWin::`vector deleting destructor'(GuildMenuWin *this, unsigned int a2);
GuildLeaveTask *__thiscall ISingletonTask<GuildLeaveTask>::`vector deleting destructor'(GuildLeaveTask *this, unsigned int a2);
void GuildLeaveTask::OnStart();
GuildLeaveTask *__cdecl ISingletonTask<GuildLeaveTask>::Run(); // idb
bool __thiscall GuildLeaveTask::OnProcessNetMsg(GuildLeaveTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData); // idb
void __thiscall GuildNameChangeWin::SetTitle(GuildNameChangeWin *this, const char *pkTitle); // idb
void __thiscall GuildNameChangeWin::SetCommentText(GuildNameChangeWin *this, const char *pkComment); // idb
void __thiscall GuildNameChangeWin::OnCmdCancel(GuildNameChangeWin *this); // idb
void GuildNameChangeWin::OnHelpLink();
void __thiscall GuildNameChangeWin::~GuildNameChangeWin(GuildNameChangeWin *this); // idb
char __thiscall GuildNameChangeWin::Create(GuildNameChangeWin *this);
void __thiscall GuildNameChangeWin::GuildNameChangeWin(GuildNameChangeWin *this); // idb
void __thiscall GuildNameChangeWin::OnCmdOk(GuildNameChangeWin *this); // idb
GuildNameChangeWin *__cdecl GuildNameChangeWin::CreateWin(); // idb
void __thiscall GuildNameChangeWin::RegisterCallBack(GuildNameChangeWin *this, boost::function<void __cdecl(char const *),std::allocator<void> > CallBackFunc); // idb
void __thiscall GuildNameChangeWin::OnCommand(GuildNameChangeWin *this, unsigned int wParam, int lParam); // idb
GuildNameChangeWin *__cdecl GuildNameChangeWin::Modal(const char *pkTitleName); // idb
GuildNameChangeWin *__cdecl GuildNameChangeWin::Modeless(const char *pkTitleName); // idb
GuildNameChangeWin *__thiscall GuildNameChangeWin::`vector deleting destructor'(GuildNameChangeWin *this, unsigned int a2);
void __thiscall GuildNoticeEditorWin::GuildNoticeEditorWin(GuildNoticeEditorWin *this); // idb
void __thiscall GuildNoticeEditorWin::~GuildNoticeEditorWin(GuildNoticeEditorWin *this); // idb
void __thiscall GuildNoticeEditorWin::OnClose(GuildNoticeEditorWin *this); // idb
void __thiscall GuildNoticeEditorWin::OnShowWin(GuildNoticeEditorWin *this); // idb
void GuildNoticeEditorWin::OnHelpLink();
void __thiscall GuildNotifyTask::OnStart(GuildNotifyTask *this); // idb
bool __thiscall GuildNotifyTask::OnProcessNetMsg(GuildNotifyTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData); // idb
char __thiscall GuildNoticeEditorWin::Create(GuildNoticeEditorWin *this, PgFrameWork *pkFrameWork);
GuildNoticeEditorWin *__cdecl GuildNoticeEditorWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall GuildNotifyTask::SetInfo(GuildNotifyTask *this, char *pcNotice); // idb
void __thiscall GuildNoticeEditorWin::OnCommand(GuildNoticeEditorWin *this, unsigned int wParam, int lParam); // idb
GuildNoticeEditorWin *__thiscall GuildNoticeEditorWin::`scalar deleting destructor'(GuildNoticeEditorWin *this, unsigned int a2);
ISingletonTask<GuildNotifyTask> *__thiscall ISingletonTask<GuildNotifyTask>::`vector deleting destructor'(ISingletonTask<GuildNotifyTask> *this, unsigned int a2);
GuildNotifyTask *__cdecl ISingletonTask<GuildNotifyTask>::Run(); // idb
GuildNotifyTask *__thiscall GuildNotifyTask::`scalar deleting destructor'(GuildNotifyTask *this, unsigned int a2);
void __thiscall GuildDismissTask::OnFinish(GuildDismissTask *this); // idb
void __thiscall GuildNpcMenuWin::Close(GuildNpcMenuWin *this); // idb
void __thiscall GuildNpcMenuWin::OnClose(GuildNpcMenuWin *this); // idb
void __thiscall GuildNpcMenuWin::OnShowWin(GuildNpcMenuWin *this); // idb
void __thiscall GuildNpcMenuWin::OnClickGuildAcademyMenuBtn(GuildNpcMenuWin *this); // idb
void GuildNpcMenuWin::OnHelpLink();
void __thiscall GuildNpcMenuWin::OnClickPrevMenuBtn(GuildNpcMenuWin *this); // idb
void __thiscall GuildNpcMenuWin::MenuBtnSetting(GuildNpcMenuWin *this, unsigned int BtnType, unsigned int PGWM_CMD_TYPE, char *pkText); // idb
void __thiscall GuildDismissTask::SetInfo(GuildDismissTask *this, Name4 *rkName); // idb
void __thiscall GuildNpcMenuWin::GuildNpcMenuWin(GuildNpcMenuWin *this); // idb
void __thiscall GuildNpcMenuWin::~GuildNpcMenuWin(GuildNpcMenuWin *this); // idb
void __thiscall GuildNpcMenuWin::CloseFoundWin(GuildNpcMenuWin *this); // idb
void __thiscall GuildDismissTask::OnStart(GuildDismissTask *this); // idb
void __thiscall GuildDismissTask::DirectMessage(GuildDismissTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
bool __thiscall GuildDismissTask::OnProcessNetMsg(GuildDismissTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData); // idb
char __thiscall GuildNpcMenuWin::Create(GuildNpcMenuWin *this, PgFrameWork *pkFrameWork);
void __thiscall GuildNpcMenuWin::OnCmdFoundGuild(GuildNpcMenuWin *this); // idb
void __thiscall GuildNpcMenuWin::OnClickGuildAcademyStorageBtn(GuildNpcMenuWin *this); // idb
void __thiscall GuildNpcMenuWin::OnClickGuildDissmissBtn(GuildNpcMenuWin *this); // idb
void __thiscall GuildNpcMenuWin::OnCommand(GuildNpcMenuWin *this, unsigned int wParam, int lParam); // idb
GuildNpcMenuWin *__cdecl GuildNpcMenuWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall GuildNpcMenuWin::DirectMessage(GuildNpcMenuWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __cdecl STRING_TO_NAME(char *pcString, Name3 *kName3); // idb
GuildNpcMenuWin *__thiscall GuildNpcMenuWin::`vector deleting destructor'(GuildNpcMenuWin *this, unsigned int a2);
GuildDismissTask *__thiscall ISingletonTask<GuildDismissTask>::`scalar deleting destructor'(GuildDismissTask *this, unsigned int a2);
GuildDismissTask *__cdecl ISingletonTask<GuildDismissTask>::Run(); // idb
void __thiscall GuildWarInformWin::SetText(GuildWarInformWin *this, char *pcText); // idb
void __thiscall GuildWarInformWin::SetColor(GuildWarInformWin *this, D3DXCOLOR *kColor); // idb
void __thiscall GuildWarInformWin::GuildWarInformWin(GuildWarInformWin *this); // idb
void __thiscall GuildWarInformWin::~GuildWarInformWin(GuildWarInformWin *this); // idb
char __thiscall GuildWarInformWin::Create(GuildWarInformWin *this, PgFrameWork *pkFrameWork);
GuildWarInformWin *__cdecl GuildWarInformWin::CreateWin(PgFrameWork *pkFrameWork); // idb
GuildWarInformWin *__thiscall GuildWarInformWin::`vector deleting destructor'(GuildWarInformWin *this, unsigned int a2);
void __thiscall GuildWarKillCountWin::SetText(GuildWarKillCountWin *this, float fLifeTime, char *pcText1, char *pcText2); // idb
void __thiscall GuildWarKillCountWin::~GuildWarKillCountWin(GuildWarKillCountWin *this); // idb
void __thiscall GuildWarKillCountWin::GuildWarKillCountWin(GuildWarKillCountWin *this); // idb
char __thiscall GuildWarKillCountWin::Create(GuildWarKillCountWin *this, PgFrameWork *pkFramework);
GuildWarKillCountWin *__cdecl GuildWarKillCountWin::CreateWin(PgFrameWork *pkFrameWork); // idb
GuildWarKillCountWin *__thiscall GuildWarKillCountWin::`vector deleting destructor'(GuildWarKillCountWin *this, unsigned int a2);
void __thiscall GuildWarStateWin::SortWarListBy(GuildWarStateWin *this, int iIndex); // idb
void __thiscall GuildWarStateWin::SortWarableListBy(GuildWarStateWin *this, int iIndex); // idb
unsigned int __cdecl SumKillScore(SHINE_GUILD_SCORE *rkGuildScore); // idb
void GuildWarStateWin::OnClose();
void GuildWarStateWin::OnHelpLink();
void __thiscall GuildWarStateWin::SortWarAbleListNum(GuildWarStateWin *this, int iIndex); // idb
void __thiscall GuildWarStateWin::UpdateTimer(GuildWarStateWin *this, float fTime); // idb
void __thiscall GuildWarStateWin::OnCmdWarSlideBar(GuildWarStateWin *this); // idb
void __thiscall GuildWarStateWin::OnClick2(GuildWarStateWin *this); // idb
void __thiscall GuildWarStateWin::OnClick1(GuildWarStateWin *this); // idb
void __thiscall GuildWarStateWin::ViewSeachList(GuildWarStateWin *this); // idb
void __thiscall GuildWarStateWin::OnCmdApplyGuildWar(GuildWarStateWin *this); // idb
void __thiscall GuildWarStateWin::OnCmdWarableSlideBar(GuildWarStateWin *this); // idb
char *__cdecl GetGuildWarTimeLeftStr(unsigned int dwLeftTime, unsigned int dwPassedTime); // idb
char *__cdecl GetGuildWarStatusStr(Name4 *rkName); // idb
char *__cdecl GetGuildWarStatusStr(char eStatus); // idb
char *__cdecl GetGuildTypeStr(char type); // idb
char *__cdecl GetGuildMemberCount(unsigned __int16 wCount); // idb
NiUnsharedGeometryGroup *__cdecl GetWarableStr(char byWarable);
void __thiscall GuildWarStateWin::AddGuildWarListItem(GuildWarStateWin *this, SHINE_GUILD_WAR_INFO *pkData); // idb
void __thiscall GuildWarStateWin::AddGuildWarableListItem(GuildWarStateWin *this, SHINE_GUILD_WAR_ABLE_INFO *pkData); // idb
void __thiscall GuildWarStateWin::UpdateMeWin(GuildWarStateWin *this, float fCurTime); // idb
char __stdcall GuildWarStateWin::IsSeachNameSize(char *pSearchName);
void __thiscall GuildWarStateWin::InvalidateGuildWarList(GuildWarStateWin *this); // idb
void __thiscall GuildWarStateWin::InvalidateGuildWarableList(GuildWarStateWin *this); // idb
void __thiscall GuildWarStateWin::OnShowWin(GuildWarStateWin *this); // idb
void __thiscall GuildWarStateWin::OnFirstPage(GuildWarStateWin *this); // idb
char __thiscall GuildWarStateWin::IsSeachHaveList(GuildWarStateWin *this);
void __thiscall GuildWarStateWin::GuildWarStateWin(GuildWarStateWin *this); // idb
void __thiscall GuildWarStateWin::~GuildWarStateWin(GuildWarStateWin *this); // idb
GuildWarStateWin *__cdecl GuildWarStateWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall GuildWarStateWin::OnSearch(GuildWarStateWin *this); // idb
void __thiscall GuildWarStateWin::OnCommand(GuildWarStateWin *this, unsigned int wParam, int lParam); // idb
void __thiscall GuildWarStateWin::OnEditEnd(GuildWarStateWin *this, unsigned int wParam, int lParam); // idb
char __thiscall GuildWarStateWin::Create(GuildWarStateWin *this, PgFrameWork *pkFrameWork);
GuildWarStateWin *__thiscall GuildWarStateWin::`scalar deleting destructor'(GuildWarStateWin *this, unsigned int a2);
// tm *__usercall localtime@<eax>(const int *_Time@<eax>); idb
void __thiscall GuildWin::OnSortByTitle01(GuildWin *this); // idb
void __thiscall GuildWin::OnSortByTitle02(GuildWin *this); // idb
void __thiscall GuildWin::OnSortByTitle03(GuildWin *this); // idb
void __thiscall GuildWin::OnSortByTitle04(GuildWin *this); // idb
void __thiscall GuildWin::OnSortByTitle05(GuildWin *this); // idb
void GuildWin::OnGuildMenu();
void __thiscall GuildWin::SetNextJoinTime(GuildWin *this, char *pkJoinTime); // idb
void __thiscall GuildWin::ClearGTInfo(GuildWin *this); // idb
void GuildWin::OnHelpLink();
void GuildWin::OnGuildTournamentMenu();
void __thiscall GuildWin::OnShowEmblemWin(GuildWin *this); // idb
char __thiscall GuildWin::SetEmblemIconInfo(GuildWin *this);
void __thiscall GuildWin::SetEmblemDisable(GuildWin *this, bool bDisable); // idb
void __thiscall GuildMemberVanishTask::SetInfo(GuildMemberVanishTask *this, Name5 *rkTargetName); // idb
void __thiscall GuildMemberGradeSetupTask::SetInfo(GuildMemberGradeSetupTask *this, Name5 *rkTargetName, char grade, char TargetLevel); // idb
void __thiscall GuildWin::ProcessMeInput(GuildWin *this, bool *bHit); // idb
void __thiscall GuildWin::UpdateMeWin(GuildWin *this, float fCurTime); // idb
void __thiscall GuildWin::OnLClick(GuildWin *this, int nItemIndex); // idb
void __thiscall GuildWin::OnRClick(GuildWin *this, int nItemIndex); // idb
void __thiscall GuildWin::OnDetailInfo(GuildWin *this); // idb
void __thiscall GuildWin::OnChangeTab(GuildWin *this, DirectUserMsgBody_CommunityTabChanged::TabEnum eTab); // idb
void __thiscall GuildWin::OnWinClose(GuildWin *this); // idb
void __stdcall GuildWin::OnSlideBar(SlideBar *pkSlideBar, SlideListWin *pkSlideListWin);
void __thiscall GuildWin::OnTopWin(GuildWin *this); // idb
void __thiscall GuildMemberVanishTask::OnStart(GuildMemberVanishTask *this); // idb
void __thiscall GuildMemberVanishTask::DirectMessage(GuildMemberVanishTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall GuildMemberGradeSetupTask::OnStart(GuildMemberGradeSetupTask *this); // idb
bool __thiscall GuildMemberGradeSetupTask::OnProcessNetMsg(GuildMemberGradeSetupTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData); // idb
char __thiscall GuildMemberGradeSetupTask::ConfirmMasterChange(GuildMemberGradeSetupTask *this);
void __thiscall GuildWin::OnEditNotice(GuildWin *this); // idb
void __thiscall GuildWin::OnSlideBar(GuildWin *this); // idb
void __thiscall GuildWin::OnSlideBarNotice(GuildWin *this); // idb
void __thiscall GuildWin::OnSlideBarHistory(GuildWin *this); // idb
NiUnsharedGeometryGroup *__stdcall GuildWin::GetHistoryText(GUILD_HISTORY_MSG_TYPE hisType);
void __thiscall GuildWin::SetEmblemState(GuildWin *this, const char *eEmblemState); // idb
void __thiscall GuildMemberGradeSetupTask::DirectMessage(GuildMemberGradeSetupTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall GuildWin::AddListItem_DefInfo(GuildWin *this, GUILD_MEMBER_CLIENT *pkData); // idb
void __thiscall GuildWin::ViewAllInfo(GuildWin *this, PROTO_FRIEND_INFO *pdata); // idb
void __thiscall GuildWin::InvalidateGuildHistoryList(GuildWin *this); // idb
void __thiscall GuildWin::ShowEmblem(GuildWin *this, bool bShow); // idb
void __thiscall GuildWin::SetEmblem(GuildWin *this, GUILD_EMBLEM_INFO *pEmblemInfo, char eEmblemState); // idb
void __thiscall GuildWin::ClearEmblem(GuildWin *this); // idb
void __thiscall GuildWin::UpdateViewList(GuildWin *this); // idb
void __thiscall GuildWin::ChangeUserName(GuildWin *this, Name5 *OldName, Name5 *NewName); // idb
void GuildWin::OnAddGuildMember();
bool __thiscall GuildMemberVanishTask::OnProcessNetMsg(GuildMemberVanishTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData); // idb
void __thiscall GuildWin::InvalidateGuildList(GuildWin *this); // idb
void __thiscall GuildWin::DeleteUser(GuildWin *this, Name5 *kName); // idb
void __thiscall GuildWin::~GuildWin(GuildWin *this); // idb
void __thiscall GuildWin::DirectMessage(GuildWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall GuildWin::OnTab01(GuildWin *this); // idb
void __thiscall GuildWin::OnTab02(GuildWin *this); // idb
void __thiscall GuildWin::OnTab03(GuildWin *this); // idb
void __thiscall GuildWin::GuildWin(GuildWin *this); // idb
GuildWin *__cdecl GuildWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall GuildWin::OnCommand(GuildWin *this, unsigned int wParam, int lParam); // idb
void __thiscall GuildWin::OnShowWin(GuildWin *this); // idb
char __thiscall GuildWin::Create(GuildWin *this, PgFrameWork *pkFrameWork);
ATL::ATLSTRINGRESOURCEIMAGE *__cdecl ATL::_AtlGetStringResourceImage(HINSTANCE__ *hInstance, HRSRC__ *hResource, unsigned int id); // idb
HINSTANCE__ *__cdecl ATL::AtlFindStringResourceInstance(unsigned int nID, unsigned __int16 wLanguage); // idb
void __noreturn ATL::CSimpleStringT<char,0>::ThrowMemoryException();
void __thiscall ATL::CSimpleStringT<char,0>::Fork(ATL::CSimpleStringT<char,0> *this, int nLength); // idb
void __thiscall ATL::CSimpleStringT<char,0>::Reallocate(ATL::CSimpleStringT<char,0> *this, int nLength); // idb
void __thiscall ATL::CSimpleStringT<char,0>::Empty(ATL::CSimpleStringT<char,0> *this); // idb
void __thiscall ATL::CSimpleStringT<char,0>::PrepareWrite2(ATL::CSimpleStringT<char,0> *this, int nLength); // idb
char *__cdecl Guild::GetMemberGradeString(char grade); // idb
void __thiscall ATL::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char>>>::~CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char>>>(ATL::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char> > > *this); // idb
void __thiscall ATL::CSimpleStringT<char,0>::SetString(ATL::CSimpleStringT<char,0> *this, const char *pszSrc, int nLength); // idb
int __thiscall ATL::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char>>>::LoadStringA(ATL::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char> > > *this, HINSTANCE__ *hInstance, unsigned int nID); // idb
GuildMemberVanishTask *__thiscall GuildMemberVanishTask::`vector deleting destructor'(GuildMemberVanishTask *this, unsigned int a2);
GuildAcademyMasterAppointTask *__thiscall ISingletonTask<GuildAcademyMasterAppointTask>::`scalar deleting destructor'(GuildAcademyMasterAppointTask *this, unsigned int a2);
GuildAcademyMasterInitializeTask *__thiscall ISingletonTask<GuildAcademyMasterInitializeTask>::`scalar deleting destructor'(GuildAcademyMasterInitializeTask *this, unsigned int a2);
GuildMemberVanishTask *__cdecl ISingletonTask<GuildMemberVanishTask>::Run(); // idb
GuildMemberGradeSetupTask *__cdecl ISingletonTask<GuildMemberGradeSetupTask>::Run(); // idb
GuildAcademyMasterAppointTask *__cdecl ISingletonTask<GuildAcademyMasterAppointTask>::Run(); // idb
GuildAcademyMasterInitializeTask *__cdecl ISingletonTask<GuildAcademyMasterInitializeTask>::Run(); // idb
void __thiscall ATL::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char>>>::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char>>>(ATL::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char> > > *this, const char *pszSrc); // idb
GuildMemberGradeSetupTask *__thiscall ISingletonTask<GuildMemberGradeSetupTask>::`vector deleting destructor'(GuildMemberGradeSetupTask *this, unsigned int a2);
ATL::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char> > > *__thiscall ATL::CTime::Format(ATL::CTime *this, ATL::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char> > > *result, const char *pFormat); // idb
GuildWin *__thiscall GuildWin::`scalar deleting destructor'(GuildWin *this, unsigned int a2);
void __thiscall GTIFlagWin::GTIFlagWin(GTIFlagWin *this); // idb
void __thiscall GTIFlagWin::~GTIFlagWin(GTIFlagWin *this); // idb
char __thiscall GTIFlagWin::Create(GTIFlagWin *this, PgFrameWork *pkFrameWork, unsigned int uiFlagType);
GTIFlagWin *__cdecl GTIFlagWin::CreateWin(PgFrameWork *pkFrameWork, unsigned int uiFlagType); // idb
GTIFlagWin *__thiscall GTIFlagWin::`vector deleting destructor'(GTIFlagWin *this, unsigned int a2);
void __thiscall GTInformWin::AddText(GTInformWin *this, char *pcText, D3DXCOLOR TextColor, bool bSingleLine, float fLifeTime); // idb
void __thiscall GTInformWin::AddText(GTInformWin *this, unsigned int uiMaxViewLine, char *pcText, D3DXCOLOR TextColor, float fLifeTime); // idb
void __thiscall GTInformWin::Clear(GTInformWin *this); // idb
void __thiscall GTInformWin::~GTInformWin(GTInformWin *this); // idb
void __thiscall GTInformWin::GTInformWin(GTInformWin *this); // idb
char __thiscall GTInformWin::Create(GTInformWin *this, PgFrameWork *pkFrameWork);
GTInformWin *__cdecl GTInformWin::CreateWin(PgFrameWork *pkFrameWork); // idb
GTInformWin *__thiscall GTInformWin::`vector deleting destructor'(GTInformWin *this, unsigned int a2);
BOOL __cdecl GTStatusWin::RankInfo::Low_IncreaseScore(GTStatusWin::RankInfo *lhw, GTStatusWin::RankInfo *rhw);
BOOL __cdecl GTStatusWin::RankInfo::High_DecreaseScore(PkRealTiemRankWin::RankInfo *lhw, PkRealTiemRankWin::RankInfo *rhw);
BOOL __cdecl GTStatusWin::RankInfo::Low_DecreaseScore(GTStatusWin::RankInfo *lhw, GTStatusWin::RankInfo *rhw);
BOOL __cdecl GTStatusWin::RankInfo::Low_DieCount(GTStatusWin::RankInfo *lhw, GTStatusWin::RankInfo *rhw);
BOOL __cdecl GTStatusWin::RankInfo::High_KillCount(GTStatusWin::RankInfo *lhw, GTStatusWin::RankInfo *rhw);
BOOL __cdecl PkRealTiemRankWin::RankInfo::Less_Rank(PkRealTiemRankWin::RankInfo *lhw, PkRealTiemRankWin::RankInfo *rhw);
BOOL __cdecl GTStatusWin::RankInfo::High_Grade(GTStatusWin::RankInfo *lhw, GTStatusWin::RankInfo *rhw);
BOOL __cdecl GTStatusWin::RankInfo::Low_Grade(GTStatusWin::RankInfo *lhw, GTStatusWin::RankInfo *rhw);
BOOL __cdecl GTStatusWin::RankInfo::High_CaptureFlag(GTStatusWin::RankInfo *lhw, GTStatusWin::RankInfo *rhw);
BOOL __cdecl GTStatusWin::RankInfo::Low_CaptureFlag(GTStatusWin::RankInfo *lhw, GTStatusWin::RankInfo *rhw);
void __thiscall GTStatusWin::UpdateMeWin(GTStatusWin *this, float fCurTime); // idb
void __thiscall GTStatusWin::EndGame(GTStatusWin *this, bool b); // idb
void GTStatusWin::OnHelpLink();
void __thiscall GTStatusMiniWin::GTStatusMiniWin(GTStatusMiniWin *this); // idb
void __thiscall GTStatusMiniWin::~GTStatusMiniWin(GTStatusMiniWin *this); // idb
void __thiscall GTStatusMiniWin::Clear(GTStatusMiniWin *this); // idb
void __thiscall GTStatusMiniWin::EndGame(GTStatusMiniWin *this, bool b); // idb
void GTStatusMiniWin::OnHelpLink();
// void __userpurge GTStatusWin::SetGuildInfo(GTStatusWin *this@<ecx>, int a2@<ebx>, unsigned int Reg, unsigned int TotalScore);
void __thiscall GTStatusWin::OnSlideBar(GTStatusWin *this); // idb
void __thiscall GTStatusMiniWin::OnCommand(GTStatusMiniWin *this, unsigned int wParam, int lParam); // idb
// void __userpurge GTStatusMiniWin::SetGTStatus(GTStatusMiniWin *this@<ecx>, int a2@<ebx>, PROTO_NC_GUILD_TOURNAMENT_SCORE_CMD *pkCmd);
char __thiscall GTStatusMiniWin::Create(GTStatusMiniWin *this, PgFrameWork *pkFrameWork);
GTStatusMiniWin *__cdecl GTStatusMiniWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall GTStatusWin::AddRankPlayerInfo(GTStatusWin *this, GTStatusWin::RankInfo *rInfo); // idb
void __thiscall GTStatusWin::DisplayInfoSetting(GTStatusWin *this); // idb
void __thiscall GTStatusWin::GTStatusWin(GTStatusWin *this); // idb
void __thiscall GTStatusWin::~GTStatusWin(GTStatusWin *this); // idb
GTStatusWin *__cdecl GTStatusWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall GTStatusWin::Clear(GTStatusWin *this); // idb
char __thiscall GTStatusWin::Create(GTStatusWin *this, PgFrameWork *pkFrameWork);
void __thiscall GTStatusWin::OnCommand(GTStatusWin *this, unsigned int wParam, int lParam); // idb
char __thiscall GTStatusWin::SetRankInfo(GTStatusWin *this, TOURNAMENT_PLAYER_SCORE *pkCmd, unsigned int Reg);
GTStatusMiniWin *__thiscall GTStatusMiniWin::`vector deleting destructor'(GTStatusMiniWin *this, unsigned int a2);
GTStatusWin::RankInfo *__stdcall std::allocator<GTStatusWin::RankInfo>::allocate(unsigned int _Count);
boost::detail::function::any_pointer __cdecl boost::detail::function::functor_manager<bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>::manage(boost::detail::function::any_pointer functor_ptr, boost::detail::function::functor_manager_operation_type op); // idb
bool __cdecl GuildListWin::GuildInfo::Low_GuildName(GuildListWin::GuildInfo *lhw, GuildListWin::GuildInfo *rhw); // idb
GTStatusWin::RankInfo *__cdecl std::_Move<GTStatusWin::RankInfo *,GTStatusWin::RankInfo *>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, GTStatusWin::RankInfo *_Dest);
void __cdecl std::_Destroy_range<std::allocator<GTStatusWin::RankInfo>>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last);
void __cdecl std::_Construct<GTStatusWin::RankInfo,GTStatusWin::RankInfo const &>(GTStatusWin::RankInfo *_Ptr, GTStatusWin::RankInfo *_Val); // idb
void __cdecl std::swap<GTStatusWin::RankInfo>(GTStatusWin::RankInfo *_Left, GTStatusWin::RankInfo *_Right); // idb
void __cdecl std::_Push_heap<GTStatusWin::RankInfo *,int,GTStatusWin::RankInfo,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(GTStatusWin::RankInfo *_First, int _Hole, int _Top, GTStatusWin::RankInfo *_Val, boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > _Pred); // idb
GTStatusWin::RankInfo *__cdecl std::_Move_backward<GTStatusWin::RankInfo *,GTStatusWin::RankInfo *>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, GTStatusWin::RankInfo *_Dest);
void __cdecl std::_Push_heap<GTStatusWin::RankInfo *,int,GTStatusWin::RankInfo,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(GTStatusWin::RankInfo *_First, int _Hole, int _Top, GTStatusWin::RankInfo *_Val, bool (__cdecl *_Pred)(GTStatusWin::RankInfo *, GTStatusWin::RankInfo *)); // idb
void __cdecl std::_Cons_val<std::allocator<GTStatusWin::RankInfo>,GTStatusWin::RankInfo,GTStatusWin::RankInfo &>(std::allocator<GTStatusWin::RankInfo> *_Alval, GTStatusWin::RankInfo *_Pdest, GTStatusWin::RankInfo *_Src); // idb
GTStatusWin::RankInfo *__cdecl std::_Uninit_move<GTStatusWin::RankInfo *,GTStatusWin::RankInfo *,std::allocator<GTStatusWin::RankInfo>,GTStatusWin::RankInfo>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, GTStatusWin::RankInfo *_Dest);
void __cdecl std::_Med3<GTStatusWin::RankInfo *,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Mid, GTStatusWin::RankInfo *_Last, boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > _Pred); // idb
void __cdecl std::_Adjust_heap<GTStatusWin::RankInfo *,int,GTStatusWin::RankInfo,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(GTStatusWin::RankInfo *_First, int _Hole, int _Bottom, GTStatusWin::RankInfo *_Val, boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > _Pred); // idb
void __cdecl std::_Adjust_heap<GTStatusWin::RankInfo *,int,GTStatusWin::RankInfo,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(GTStatusWin::RankInfo *_First, int _Hole, int _Bottom, GTStatusWin::RankInfo *_Val, bool (__cdecl *_Pred)(GTStatusWin::RankInfo *, GTStatusWin::RankInfo *)); // idb
void __cdecl std::_Pop_heap<GTStatusWin::RankInfo *,int,GTStatusWin::RankInfo,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, GTStatusWin::RankInfo *_Dest, GTStatusWin::RankInfo *_Val, boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > _Pred);
void __cdecl std::_Pop_heap<GTStatusWin::RankInfo *,int,GTStatusWin::RankInfo,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, GTStatusWin::RankInfo *_Dest, GTStatusWin::RankInfo *_Val, bool (__cdecl *_Pred)(GTStatusWin::RankInfo *, GTStatusWin::RankInfo *));
void __cdecl std::_Median<GTStatusWin::RankInfo *,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Mid, GTStatusWin::RankInfo *_Last, boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > _Pred); // idb
void __cdecl std::_Make_heap<GTStatusWin::RankInfo *,int,GTStatusWin::RankInfo,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > _Pred);
void __cdecl std::_Insertion_sort1<GTStatusWin::RankInfo *,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>,GTStatusWin::RankInfo>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > _Pred);
void __cdecl std::_Median<GTStatusWin::RankInfo *,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Mid, GTStatusWin::RankInfo *_Last, bool (__cdecl *_Pred)(GTStatusWin::RankInfo *, GTStatusWin::RankInfo *)); // idb
void __cdecl std::_Make_heap<GTStatusWin::RankInfo *,int,GTStatusWin::RankInfo,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, bool (__cdecl *_Pred)(GTStatusWin::RankInfo *, GTStatusWin::RankInfo *));
void __cdecl std::_Insertion_sort1<GTStatusWin::RankInfo *,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),GTStatusWin::RankInfo>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, bool (__cdecl *_Pred)(GTStatusWin::RankInfo *, GTStatusWin::RankInfo *));
void __cdecl std::_Pop_heap_0<GTStatusWin::RankInfo *,GTStatusWin::RankInfo,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > _Pred);
void __cdecl std::_Pop_heap_0<GTStatusWin::RankInfo *,GTStatusWin::RankInfo,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, bool (__cdecl *_Pred)(GTStatusWin::RankInfo *, GTStatusWin::RankInfo *));
std::pair<GTStatusWin::RankInfo *,GTStatusWin::RankInfo *> *__cdecl std::_Unguarded_partition<GTStatusWin::RankInfo *,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(std::pair<GTStatusWin::RankInfo *,GTStatusWin::RankInfo *> *result, GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > _Pred); // idb
void __cdecl std::make_heap<GTStatusWin::RankInfo *,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > _Pred); // idb
void __cdecl std::_Insertion_sort<GTStatusWin::RankInfo *,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > _Pred); // idb
std::pair<GTStatusWin::RankInfo *,GTStatusWin::RankInfo *> *__cdecl std::_Unguarded_partition<GTStatusWin::RankInfo *,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(std::pair<GTStatusWin::RankInfo *,GTStatusWin::RankInfo *> *result, GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, bool (__cdecl *_Pred)(GTStatusWin::RankInfo *, GTStatusWin::RankInfo *)); // idb
void __thiscall std::vector<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo>>::~vector<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo>>(std::vector<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo> > *this); // idb
void __thiscall std::vector<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo>>::reserve(std::vector<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo> > *this, unsigned int _Count); // idb
void __cdecl std::_Sort_heap<GTStatusWin::RankInfo *,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > _Pred); // idb
void __cdecl std::_Sort_heap<GTStatusWin::RankInfo *,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, bool (__cdecl *_Pred)(GTStatusWin::RankInfo *, GTStatusWin::RankInfo *)); // idb
void __thiscall std::vector<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo>>::_Reserve(std::vector<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo> > *this, unsigned int _Count); // idb
void __cdecl std::sort_heap<GTStatusWin::RankInfo *,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > _Pred); // idb
GTStatusWin *__thiscall GTStatusWin::`vector deleting destructor'(GTStatusWin *this, unsigned int a2);
void __thiscall std::vector<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo>>::push_back(std::vector<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo> > *this, GTStatusWin::RankInfo *_Val); // idb
void __cdecl std::_Sort<GTStatusWin::RankInfo *,int,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, int _Ideal, boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > _Pred); // idb
void __cdecl std::_Sort<GTStatusWin::RankInfo *,int,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, int _Ideal, bool (__cdecl *_Pred)(GTStatusWin::RankInfo *, GTStatusWin::RankInfo *)); // idb
void __cdecl std::sort<std::_Vector_iterator<std::_Vector_val<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo>>>,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(std::_Vector_iterator<std::_Vector_val<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo> > > _First, std::_Vector_iterator<std::_Vector_val<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo> > > _Last, boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > _Pred); // idb
void __thiscall GTTDiceWin::GTTDiceWin(GTTDiceWin *this); // idb
void __thiscall GTTDiceWin::~GTTDiceWin(GTTDiceWin *this); // idb
void __thiscall GTTDiceWin::RollingDice(GTTDiceWin *this, bool b); // idb
void __thiscall GTTDiceWin::InitDice(GTTDiceWin *this); // idb
void __thiscall GTTDiceWin::SetCount(GTTDiceWin *this, bool b); // idb
void __thiscall GTTDiceWin::UpdateMeWin(GTTDiceWin *this, float fCurTime); // idb
void __thiscall GTTDiceWin::OnClickDice(GTTDiceWin *this); // idb
void __thiscall GTTDiceWin::SetReseultDice(GTTDiceWin *this, unsigned int uiType, bool b); // idb
void __thiscall GTTDiceWin::OnShowWin(GTTDiceWin *this); // idb
char __thiscall GTTDiceWin::Create(GTTDiceWin *this, PgFrameWork *pkFrameWork);
GTTDiceWin *__cdecl GTTDiceWin::CreateWin(PgFrameWork *pkFrameWork); // idb
GTTDiceWin *__thiscall GTTDiceWin::`scalar deleting destructor'(GTTDiceWin *this, unsigned int a2);
void __thiscall GTTSkillWin::GTTSkillWin(GTTSkillWin *this); // idb
void __thiscall GTTSkillWin::~GTTSkillWin(GTTSkillWin *this); // idb
void __thiscall GTTSkillWin::SetSkillPoint(GTTSkillWin *this, unsigned int uiSkillPoint); // idb
void __thiscall GTTSkillWin::ReSetPage(GTTSkillWin *this); // idb
void GTTSkillWin::OnHelpLink();
void __thiscall GTTMiniSkillWin::GTTMiniSkillWin(GTTMiniSkillWin *this); // idb
void __thiscall GTTMiniSkillWin::~GTTMiniSkillWin(GTTMiniSkillWin *this); // idb
void __thiscall GTTMiniSkillWin::SetSkillPoint(GTTMiniSkillWin *this, unsigned int uiSkillPoint); // idb
void __thiscall GTTMiniSkillWin::UpdateMeWin(GTTMiniSkillWin *this, float fCurTime); // idb
void __thiscall GTTSkillWin::InitPage(GTTSkillWin *this); // idb
void __thiscall GTTSkillWin::OnInvLClick(GTTSkillWin *this, unsigned int uiIndex); // idb
void __thiscall GTTSkillWin::StartCoolTime(GTTSkillWin *this, unsigned int uiIndex); // idb
char __thiscall GTTMiniSkillWin::Create(GTTMiniSkillWin *this, PgFrameWork *pkFrameWork);
char __thiscall GTTSkillWin::Create(GTTSkillWin *this, PgFrameWork *pkFrameWork);
void __thiscall GTTSkillWin::OnCommand(GTTSkillWin *this, unsigned int wParam, int lParam); // idb
GTTSkillWin *__cdecl GTTSkillWin::CreateWin(PgFrameWork *pkFrameWork); // idb
GTTMiniSkillWin *__cdecl GTTMiniSkillWin::CreateWin(PgFrameWork *pkFrameWork); // idb
GTTSkillWin *__thiscall GTTSkillWin::`scalar deleting destructor'(GTTSkillWin *this, unsigned int a2);
GTTMiniSkillWin *__thiscall GTTMiniSkillWin::`vector deleting destructor'(GTTMiniSkillWin *this, unsigned int a2);
GUILD_TOURNAMENT_SKILL *__cdecl GuildTournamentStateTab::GetByMapIndex(unsigned int uiIndex, unsigned int uiMapType); // idb
BOOL __cdecl GuildListWin::GuildInfo::High_GuildType(GuildListWin::GuildInfo *lhw, GuildListWin::GuildInfo *rhw);
BOOL __cdecl GTRequestListWin::GuildInfo::High_GuildGrade(GuildListWin::GuildInfo *lhw, GuildListWin::GuildInfo *rhw);
BOOL __cdecl GTRequestListWin::GuildInfo::High_GuildTotalMember(GuildListWin::GuildInfo *lhw, GuildListWin::GuildInfo *rhw);
void __thiscall GuildTournamentBaseWin::GuildTournamentBaseWin(GuildTournamentBaseWin *this); // idb
void __thiscall GuildTournamentBaseWin::~GuildTournamentBaseWin(GuildTournamentBaseWin *this); // idb
void GuildTournamentBaseWin::OnShowWin();
void __stdcall GuildTournamentBaseWin::DirectMessage(int iMsgTag, void *pvBody, IDirectMessenger *pkFrom);
void GuildTournamentBaseWin::On_NC_GUILD_TOURNAMENT_LIST_REQ();
void GuildTournamentBaseWin::On_NC_GUILD_TOURNAMENT_STORAGEOPEN_REQ();
void GuildTournamentBaseWin::OnHelpLink();
void __thiscall GTRequestListWin::UpdateMeWin(GTRequestListWin *this, float fCurTime); // idb
void GTRequestListWin::OnHelpLink();
void __thiscall GTRequestListWin::OnSlideBar(GTRequestListWin *this); // idb
void __thiscall GTRequestListWin::OnSearchChoice(GTRequestListWin *this); // idb
void __thiscall GuildTournamentBaseWin::On_NC_GUILD_TOURNAMENT_JOIN_REQ(GuildTournamentBaseWin *this); // idb
void __thiscall GTRequestListWin::AddGuildInfo(GTRequestListWin *this, GTRequestListWin::GuildInfo *kGuildInfo); // idb
void __thiscall GTRequestListWin::DirectMessage(GTRequestListWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall GTRequestListWin::OnClose(GTRequestListWin *this); // idb
void __thiscall GuildTournamentBaseWin::OnCommand(GuildTournamentBaseWin *this, unsigned int wParam, int lParam); // idb
void __thiscall GTRequestListWin::DisplayInfoSetting(GTRequestListWin *this, bool bSearch); // idb
GuildTournamentBaseWin *__cdecl GuildTournamentBaseWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall GTRequestListWin::GTRequestListWin(GTRequestListWin *this); // idb
void __thiscall GTRequestListWin::~GTRequestListWin(GTRequestListWin *this); // idb
void __thiscall GTRequestListWin::Clear(GTRequestListWin *this); // idb
GTRequestListWin *__cdecl GTRequestListWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall GuildTournamentBaseWin::Create(GuildTournamentBaseWin *this, PgFrameWork *pkFrameWork);
void __thiscall GTRequestListWin::OnSearch(GTRequestListWin *this); // idb
void __thiscall GTRequestListWin::OnEditEnd(GTRequestListWin *this, unsigned int wParam, int lParam); // idb
void __thiscall GTRequestListWin::SetGuildList(GTRequestListWin *this, SHINE_GUILD_LIST_NEW *pkList, unsigned int uiTotalGuild); // idb
void __thiscall GTRequestListWin::ShowFormerList(GTRequestListWin *this); // idb
void __thiscall GTRequestListWin::OnCommand(GTRequestListWin *this, unsigned int wParam, int lParam); // idb
char __thiscall GTRequestListWin::Create(GTRequestListWin *this, PgFrameWork *pkFrameWork);
GuildTournamentBaseWin *__thiscall GuildTournamentBaseWin::`vector deleting destructor'(GuildTournamentBaseWin *this, unsigned int a2);
bool __cdecl GTRequestListWin::GuildInfo::Low_GuildMasterName(GuildListWin::GuildInfo *lhw, GuildListWin::GuildInfo *rhw); // idb
bool __cdecl GTRequestListWin::GuildInfo::High_GuildName(GuildListWin::GuildInfo *lhw, GuildListWin::GuildInfo *rhw); // idb
bool __cdecl GTRequestListWin::GuildInfo::High_GuildMasterName(GuildListWin::GuildInfo *lhw, GuildListWin::GuildInfo *rhw); // idb
boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *__thiscall boost::function<bool __cdecl (GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void>>::operator=<bool (__cdecl *)(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &)>(boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *this, bool (__cdecl *f)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *)); // idb
void __cdecl std::_Push_heap<GTRequestListWin::GuildInfo *,int,GTRequestListWin::GuildInfo,bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &)>(GuildListWin::GuildInfo *_First, int _Hole, int _Top, GuildListWin::GuildInfo *_Val, bool (__cdecl *_Pred)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *)); // idb
void __cdecl std::_Adjust_heap<GuildListWin::GuildInfo *,int,GuildListWin::GuildInfo,bool (__cdecl *)(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &)>(GuildListWin::GuildInfo *_First, int _Hole, int _Bottom, GuildListWin::GuildInfo *_Val, bool (__cdecl *_Pred)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *)); // idb
void __cdecl std::_Make_heap<GTRequestListWin::GuildInfo *,int,GTRequestListWin::GuildInfo,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > _Pred);
void __cdecl std::_Insertion_sort1<GTRequestListWin::GuildInfo *,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>,GTRequestListWin::GuildInfo>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > _Pred);
void __cdecl std::_Median<GTRequestListWin::GuildInfo *,bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &)>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Mid, GuildListWin::GuildInfo *_Last, bool (__cdecl *_Pred)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *)); // idb
void __cdecl std::_Make_heap<GTRequestListWin::GuildInfo *,int,GTRequestListWin::GuildInfo,bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &)>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, bool (__cdecl *_Pred)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *));
void __cdecl std::_Insertion_sort1<GTRequestListWin::GuildInfo *,bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),GTRequestListWin::GuildInfo>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, bool (__cdecl *_Pred)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *));
void __cdecl std::_Pop_heap_0<GTRequestListWin::GuildInfo *,GTRequestListWin::GuildInfo,bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &)>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, bool (__cdecl *_Pred)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *));
void __cdecl std::make_heap<GuildListWin::GuildInfo *,boost::function<bool __cdecl (GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void>>>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > _Pred); // idb
void __cdecl std::_Insertion_sort<GTRequestListWin::GuildInfo *,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > _Pred); // idb
std::pair<GuildListWin::GuildInfo *,GuildListWin::GuildInfo *> *__cdecl std::_Unguarded_partition<GuildListWin::GuildInfo *,bool (__cdecl *)(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &)>(std::pair<GuildListWin::GuildInfo *,GuildListWin::GuildInfo *> *result, GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, bool (__cdecl *_Pred)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *)); // idb
void __thiscall std::vector<GTRequestListWin::GuildInfo,std::allocator<GTRequestListWin::GuildInfo>>::~vector<GTRequestListWin::GuildInfo,std::allocator<GTRequestListWin::GuildInfo>>(std::vector<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > *this); // idb
void __cdecl std::_Sort_heap<GuildListWin::GuildInfo *,bool (__cdecl *)(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &)>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, bool (__cdecl *_Pred)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *)); // idb
GTRequestListWin *__thiscall GTRequestListWin::`vector deleting destructor'(GTRequestListWin *this, unsigned int a2);
void __cdecl std::_Sort<GTRequestListWin::GuildInfo *,int,bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &)>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, int _Ideal, bool (__cdecl *_Pred)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *)); // idb
void __thiscall GuildTournamentScheduleWin::GuildTournamentScheduleWin(GuildTournamentScheduleWin *this); // idb
void __thiscall GuildTournamentScheduleWin::~GuildTournamentScheduleWin(GuildTournamentScheduleWin *this); // idb
void __thiscall GuildTournamentScheduleWin::OnCommand(GuildTournamentScheduleWin *this, unsigned int wParam, int lParam); // idb
void __thiscall GuildTournamentScheduleWin::ClearList(GuildTournamentScheduleWin *this); // idb
char __thiscall GuildTournamentScheduleWin::Create(GuildTournamentScheduleWin *this, PgFrameWork *pkFrameWork);
void __thiscall GuildTournamentScheduleWin::CheckMatchType(GuildTournamentScheduleWin *this, PROTO_NC_GUILD_TOURNAMENT_LIST_ACK *pkProto); // idb
// char __userpurge GuildTournamentScheduleWin::SetGuildTournamentList@<al>(GuildTournamentScheduleWin *this@<ecx>, D3DXCOLOR *a2@<ebx>, PROTO_NC_GUILD_TOURNAMENT_LIST_ACK *pkProto);
void __thiscall GuildTournamentScheduleWin::SetGuildTournamentMatchType(GuildTournamentScheduleWin *this, PROTO_NC_GUILD_TOURNAMENT_LIST_ACK *pkProto); // idb
void __thiscall GuildTournamentScheduleWin::SetGuildTournamentMatchType(GuildTournamentScheduleWin *this, unsigned int uiMsg); // idb
GuildTournamentScheduleWin *__cdecl GuildTournamentScheduleWin::CreateWin(PgFrameWork *pkFrameWork); // idb
GuildTournamentScheduleWin *__thiscall GuildTournamentScheduleWin::`scalar deleting destructor'(GuildTournamentScheduleWin *this, unsigned int a2);
void __thiscall GTStorageInvWin::GTStorageInvWin(GTStorageInvWin *this); // idb
void __thiscall GTStorageInvWin::~GTStorageInvWin(GTStorageInvWin *this); // idb
char __thiscall GTStorageInvWin::Create(GTStorageInvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent);
void __thiscall GTStorageInvWin::OnFirstHitWin(GTStorageInvWin *this); // idb
void __thiscall GuildTournamentStorageWin::On_NC_ITEMDB_CLOSE_GUILD_STORAGE_CMD(GuildTournamentStorageWin *this); // idb
void __thiscall GuildTournamentStorageWin::ResetContents(GuildTournamentStorageWin *this); // idb
void __thiscall GuildTournamentStorageWin::GTTInvenItemRemoval(GuildTournamentStorageWin *this, unsigned int uiInvIndex); // idb
void __stdcall GuildTournamentStorageWin::OnDrawingMoneyWinOk(__int64 i64Money);
void __thiscall GuildTournamentStorageWin::UpdateMeWin(GuildTournamentStorageWin *this, float fCurTime); // idb
void GuildTournamentStorageWin::OnHelpLink();
void __thiscall GuildTournamentStorageWin::GuildTournamentStorageWin(GuildTournamentStorageWin *this); // idb
void __thiscall GuildTournamentStorageWin::~GuildTournamentStorageWin(GuildTournamentStorageWin *this); // idb
void GuildTournamentStorageWin::OnClose();
void __thiscall GTStorageInvWin::DoAction(GTStorageInvWin *this); // idb
void __thiscall GTStorageInvWin::DoRAction(GTStorageInvWin *this); // idb
void __thiscall GuildTournamentStorageWin::OnInvShiftLClick(GuildTournamentStorageWin *this, unsigned int uiInvIndex); // idb
void __thiscall GuildTournamentStorageWin::OnInvRClick(GuildTournamentStorageWin *this, unsigned int uiInvIndex); // idb
char __thiscall GuildTournamentStorageWin::DropOnInv(GuildTournamentStorageWin *this, DropContents *pkContents, unsigned int uiReceiverInvIndex);
void __thiscall GuildTournamentStorageWin::OnDrawing(GuildTournamentStorageWin *this); // idb
void __thiscall GuildTournamentStorageWin::SetToken(GuildTournamentStorageWin *this, unsigned __int64 uiToken); // idb
char __thiscall GTStorageInvWin::EatDropInstance(GTStorageInvWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
void __thiscall GuildTournamentStorageWin::OnInvLClick(GuildTournamentStorageWin *this, unsigned int uiInvIndex); // idb
void __thiscall GuildTournamentStorageWin::OnCommand(GuildTournamentStorageWin *this, unsigned int wParam, int lParam); // idb
GTStorageInvWin *__cdecl GTStorageInvWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent); // idb
GuildTournamentStorageWin *__cdecl GuildTournamentStorageWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall GuildTournamentStorageWin::Create(GuildTournamentStorageWin *this, PgFrameWork *pkFrameWork);
GTStorageInvWin *__thiscall GTStorageInvWin::`scalar deleting destructor'(GTStorageInvWin *this, unsigned int a2);
GuildTournamentStorageWin *__thiscall GuildTournamentStorageWin::`vector deleting destructor'(GuildTournamentStorageWin *this, unsigned int a2);
signed int __stdcall ChatBoard::ParseUserChat(char **pcText);
char __thiscall ChatBoard::ViewLineUp(ChatBoard *this);
char __thiscall ChatBoard::ViewLineDown(ChatBoard *this);
char __thiscall ChatBoard::ViewLineMostDown(ChatBoard *this);
void __thiscall ChatBoard::SetText(ChatBoard *this, ChatBoard::Type eType, char *pcText, unsigned int uiTextLen); // idb
void __thiscall ChatBoard::UpdateMeWin(ChatBoard *this, float fCurTime); // idb
void __thiscall ChatBoard::~ChatBoard(ChatBoard *this); // idb
void __thiscall ChatBoard::Add(ChatBoard *this, ChatBoard::Type eType, char *pcText); // idb
void __thiscall ChatBoard::CreateTextGeometry(ChatBoard *this); // idb
void __thiscall ChatBoard::ChatBoard(ChatBoard *this); // idb
void __thiscall ChatBoard::AddUserChat(ChatBoard *this, char *pcText); // idb
char __thiscall ChatBoard::Create(ChatBoard *this, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent);
ChatBoard *__cdecl ChatBoard::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent); // idb
unsigned int __thiscall PgFont::GetTextLenInWidth(PgFont *this, char *pcText, unsigned int uiWidth); // idb
ChatBoard *__thiscall ChatBoard::`scalar deleting destructor'(ChatBoard *this, unsigned int a2);
void __thiscall ChatBoardFlex::ClearViewedLineInfo(ChatBoardFlex *this); // idb
void __thiscall ChatBoardFlex::DecViewIndex(ChatBoardFlex *this); // idb
signed int __stdcall ChatBoardFlex::ParseUserChat(char **pcText);
char __thiscall ChatBoardFlex::ViewLineDown(ChatBoardFlex *this);
char __thiscall ChatBoardFlex::ViewLineMostDown(ChatBoardFlex *this);
void __thiscall ChatBoardFlex::SetGameFrameWork(ChatBoardFlex *this, PgFrameWork *pkFrameWork); // idb
void __thiscall ChatBoardFlex::SetSystemWindow(ChatBoardFlex *this, bool b); // idb
char __stdcall ChatBoardFlex::IsNewLineColoring(char *pcText, char *pcColorText, char *pMainText);
char *__thiscall ChatBoardFlex::GetChatText(ChatBoardFlex *this, int iIndex); // idb
void __thiscall ChatBoardFlex::SetMaxTextLine(ChatBoardFlex *this, int MaxLine); // idb
double __thiscall ChatBoardFlex::GetSetTextTime(ChatBoardFlex *this, int TextLineNum);
char __thiscall ChatBoardFlex::FindStrInBoard(ChatBoardFlex *this, int TextRowIndex);
signed int __thiscall ChatBoardFlex::GetWhisperTokenType(ChatBoardFlex *this, const char *pcStr);
int __stdcall ChatBoardFlex::ColorCommandCheck(int nTextLen, char *pText);
int __thiscall ChatBoardFlex::FindItemLinkToken(ChatBoardFlex *this, char *pLinkText, int nCliclkIndex); // idb
unsigned int __thiscall ChatBoardFlex::GetViewLineCount(ChatBoardFlex *this); // idb
void __thiscall ChatBoardFlex::SetText(ChatBoardFlex *this, ChatBoardFlex::Type eType, char *pcText, unsigned int uiTextLen); // idb
void __thiscall ChatBoardFlex::SetText(ChatBoardFlex *this, ChatBoardFlex::Type eType, char *pcText, unsigned int uiTextLen, char kChatID); // idb
void __thiscall ChatBoardFlex::CreateTextGeometry(ChatBoardFlex *this); // idb
void __thiscall ChatBoardFlex::SetDrawFormat(ChatBoardFlex *this, unsigned int uiDrawFormat); // idb
void __thiscall ChatBoardFlex::RoarAdd(ChatBoardFlex *this, ChatBoardFlex::Type eType, char *pcText); // idb
char __thiscall ChatBoardFlex::IsColorTextLine(ChatBoardFlex *this, char *pcText, tagSIZE *kSize);
char __thiscall ChatBoardFlex::IsMainTextColorText(ChatBoardFlex *this, char *pcText, tagSIZE *kSize);
int __thiscall ChatBoardFlex::FindClickTextIndex(ChatBoardFlex *this, char *pLinkText, int iX, int nLineCnt); // idb
void __thiscall ChatBoardFlex::Add(ChatBoardFlex *this, ChatBoardFlex::Type eType, char *pcText); // idb
void __thiscall ChatBoardFlex::Add(ChatBoardFlex *this, ChatBoardFlex::Type eType, char *pcText, char kChatID); // idb
char __thiscall ChatBoardFlex::ViewLineUp(ChatBoardFlex *this);
char __thiscall ChatBoardFlex::Create(ChatBoardFlex *this, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgFont *pkFont, bool bLButtonEnable, PgWin *pkParent);
bool __thiscall ChatBoardFlex::IsMouseOverNameText(ChatBoardFlex *this); // idb
void __thiscall ChatBoardFlex::AddUserChat(ChatBoardFlex *this, ChatBoardFlex::Type eType, char *pcText); // idb
void __thiscall ChatBoardFlex::AddUserChat(ChatBoardFlex *this, ChatBoardFlex::Type eType, char *pcText, char kChatID); // idb
void __thiscall ChatBoardFlex::AddUserChat(ChatBoardFlex *this, char *pcText); // idb
void __thiscall ChatBoardFlex::AddUserChat(ChatBoardFlex *this, char *pcText, char kChatID); // idb
void __thiscall ChatBoardFlex::AddGMUserChat(ChatBoardFlex *this, char *pcText); // idb
void __thiscall ChatBoardFlex::UpdateMeWin(ChatBoardFlex *this, float fCurTime); // idb
char __thiscall ChatBoardFlex::FindClickItemLink(ChatBoardFlex *this, char *pcharName, int iX, int nLineIndex);
void __thiscall ChatBoardFlex::EraseWhisperToken(ChatBoardFlex *this, char *pcStr); // idb
// void __userpurge ChatBoardFlex::DirectMessage(ChatBoardFlex *this@<ecx>, int a2@<edi>, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom);
char __thiscall ChatBoardFlex::DeleteItemLinkInfo(ChatBoardFlex *this);
void __thiscall ChatBoardFlex::AddItemLinkInfo(ChatBoardFlex *this, ChatBoardFlex::Type eType, SHINE_ITEM_STRUCT *pItem); // idb
void __thiscall ChatBoardFlex::~ChatBoardFlex(ChatBoardFlex *this); // idb
void __thiscall ChatBoardFlex::ChatBoardFlex(ChatBoardFlex *this); // idb
ChatBoardFlex *__cdecl ChatBoardFlex::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgFont *pkFont, int bLButtonEnable, PgWin *pkParent);
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>,std::_Iterator_base0>::operator--(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >,std::_Iterator_base0> *this); // idb
SHINE_ITEM_STRUCT *__stdcall std::allocator<SHINE_ITEM_STRUCT>::allocate(unsigned int _Count);
SHINE_ITEM_STRUCT *__cdecl std::_Uninit_move<SHINE_ITEM_STRUCT *,SHINE_ITEM_STRUCT *,std::allocator<SHINE_ITEM_STRUCT>,SHINE_ITEM_STRUCT>(SHINE_ITEM_STRUCT *_First, SHINE_ITEM_STRUCT *_Last, SHINE_ITEM_STRUCT *_Dest);
SHINE_ITEM_STRUCT *__cdecl std::_Uninit_copy<std::_Vector_const_iterator<std::_Vector_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>,SHINE_ITEM_STRUCT *,std::allocator<SHINE_ITEM_STRUCT>>(std::_Vector_const_iterator<std::_Vector_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > _First, std::_Vector_const_iterator<std::_Vector_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > _Last, SHINE_ITEM_STRUCT *_Dest);
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::find(std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > *result, const int *_Keyval); // idb
void __thiscall std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::reserve(std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *this, unsigned int _Count); // idb
void __thiscall std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>(std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *this, std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *_Right); // idb
void __thiscall std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::_Reserve(std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *this, unsigned int _Count); // idb
void __thiscall std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::push_back(std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *this, SHINE_ITEM_STRUCT *_Val); // idb
void __thiscall std::pair<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>::~pair<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>(std::pair<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > *this); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *_Newnode); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::erase(std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > _Where); // idb
void __thiscall std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::_Erase(std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *this, std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *_Rootnode); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *_Node, bool _Leftish); // idb
std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::_Buynode<std::pair<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>(std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *this, std::pair<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > *_Val); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::erase(std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > _Last); // idb
void __thiscall std::map<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>>::~map<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>>(std::map<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > > > *this); // idb
ChatBoardFlex *__thiscall ChatBoardFlex::`vector deleting destructor'(ChatBoardFlex *this, unsigned int a2);
void __thiscall ChatDisplayWin::OnUp(ChatDisplayWin *this); // idb
void __thiscall ChatDisplayWin::OnDown(ChatDisplayWin *this); // idb
void __thiscall ChatDisplayWin::OnMostDown(ChatDisplayWin *this); // idb
void __thiscall ChatDisplayWin::AddNormalChat(ChatDisplayWin *this, char *pcFormat, char kChatID); // idb
void __thiscall ChatDisplayWin::AddOtherNormalChat(ChatDisplayWin *this, char *pcFormat, char kChatID); // idb
void __thiscall ChatDisplayWin::AddNormalChat(ChatDisplayWin *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin::AddOtherNormalChat(ChatDisplayWin *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin::AddGMNormalChat(ChatDisplayWin *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin::AddGMOtherNormalChat(ChatDisplayWin *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin::AddGMShoutChat(ChatDisplayWin *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin::AddGMWhisperChat(ChatDisplayWin *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin::AddShoutChat(ChatDisplayWin *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin::AddWhisperChat(ChatDisplayWin *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin::AddPartyChat(ChatDisplayWin *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin::AddGuildChat(ChatDisplayWin *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin::AddOtherPartyChat(ChatDisplayWin *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin::AddOtherGuildChat(ChatDisplayWin *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin::AddGuildAcademyChat(ChatDisplayWin *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin::AddOtherGuildAcademyChat(ChatDisplayWin *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin::AddRaidChat(ChatDisplayWin *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin::AddOtherRaidChat(ChatDisplayWin *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin::AddSystemChat(ChatDisplayWin *this, const char *pcFormat); // idb
void __thiscall ChatDisplayWin::AddAuthorChat(ChatDisplayWin *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin::AddBattleChat(ChatDisplayWin *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin::GetSize(ChatDisplayWin *this, unsigned int *ruiWidth, unsigned int *ruiHeight); // idb
void __thiscall ChatDisplayWin::SetSize(ChatDisplayWin *this, unsigned int uiWidth, unsigned int uiHeight); // idb
void __thiscall ChatDisplayWin::SetDefaultSize(ChatDisplayWin *this); // idb
void __thiscall ChatDisplayWin::OnChatCommand(ChatDisplayWin *this); // idb
void __thiscall ChatDisplayWin::~ChatDisplayWin(ChatDisplayWin *this); // idb
void __thiscall ChatDisplayWin::OnReport(ChatDisplayWin *this); // idb
void __thiscall ChatDisplayWin::OnTab(ChatDisplayWin *this); // idb
void __thiscall ChatDisplayWin::ChatStart(ChatDisplayWin *this, const char *szText); // idb
int __thiscall ChatDisplayWin::IsDuringEdit(ChatDisplayWin *this);
void __thiscall ChatDisplayWin::OnEditEnd(ChatDisplayWin *this, unsigned int wParam, int lParam); // idb
unsigned int __thiscall ChatDisplayWin::GetOption(ChatDisplayWin *this); // idb
void __thiscall ChatDisplayWin::SetOption(ChatDisplayWin *this, unsigned int uiOpt); // idb
void __thiscall ChatDisplayWin::AddOption(ChatDisplayWin *this, unsigned int uiOpt); // idb
void __thiscall ChatDisplayWin::RemoveOption(ChatDisplayWin *this, unsigned int uiOpt); // idb
char *__thiscall ChatDisplayWin::GetCurrentChatText(ChatDisplayWin *this); // idb
BOOL ChatDisplayWin::IsAutoHideOptionSetted();
char __thiscall ChatDisplayWin::GetCursorStateOnPanel(ChatDisplayWin *this); // idb
void __thiscall ChatDisplayWin::ChatDisplayWin(ChatDisplayWin *this); // idb
void __thiscall ChatDisplayWin::OnActive(ChatDisplayWin *this, unsigned int uiIndex); // idb
// void __userpurge ChatDisplayWin::UpdateMeWin(ChatDisplayWin *this@<ecx>, signed int a2@<edi>, float fCurTime);
void __cdecl MoveChildrenWin(PgWin *pkWin, int x, int y); // idb
void __thiscall ChatDisplayWin::SetChatMode(ChatDisplayWin *this, unsigned int uiChatMode); // idb
char __thiscall ChatDisplayWin::Create(ChatDisplayWin *this, PgFrameWork *pkFrameWork);
void __thiscall ChatDisplayWin::OnCommand(ChatDisplayWin *this, unsigned int wParam, int lParam); // idb
void __thiscall ChatDisplayWin::DirectMessage(ChatDisplayWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
ChatDisplayWin *__cdecl ChatDisplayWin::CreateWin(PgFrameWork *pkFrameWork); // idb
SysMsgDisplayWin *__thiscall SysMsgDisplayWin::`vector deleting destructor'(SysMsgDisplayWin *this, unsigned int a2);
void __thiscall ChatDisplayWin2::OnUp(ChatDisplayWin2 *this); // idb
void __thiscall ChatDisplayWin2::OnDown(ChatDisplayWin2 *this); // idb
void __thiscall ChatDisplayWin2::OnMostDown(ChatDisplayWin2 *this); // idb
bool ChatDisplayWin2::IsOnCandList();
char __fastcall IsAllSpace_0(char *pcSrc);
void __stdcall ChatDisplayWin2::AddSystemChat(const char *pcFormat);
void __thiscall ChatDisplayWin2::AddAuthorChat(ChatDisplayWin2 *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin2::GetSize(ChatDisplayWin2 *this, unsigned int *ruiWidth, unsigned int *ruiHeight); // idb
void __thiscall ChatDisplayWin2::SetSize(ChatDisplayWin2 *this, unsigned int uiWidth, unsigned int uiHeight); // idb
void __thiscall ChatDisplayWin2::SetDefaultSize(ChatDisplayWin2 *this); // idb
void __thiscall ChatDisplayWin2::OnChatCommand(ChatDisplayWin2 *this); // idb
void __thiscall ChatDisplayWin2::OnWhisperHotKeyTab(ChatDisplayWin2 *this); // idb
void __thiscall ChatDisplayWin2::OnPartyHotKeyTab(ChatDisplayWin2 *this); // idb
void __thiscall ChatDisplayWin2::OnGuildHotKeyTab(ChatDisplayWin2 *this); // idb
void __thiscall ChatDisplayWin2::OnNormalHotKeyTab(ChatDisplayWin2 *this); // idb
bool __thiscall ChatDisplayWin2::IsChatStart(ChatDisplayWin2 *this); // idb
void __thiscall ChatDisplayWin2::SetChatNameEditText(ChatDisplayWin2 *this, const char *sName); // idb
void __thiscall ChatDisplayWin2::SetWhisperEditFocus(ChatDisplayWin2 *this); // idb
void __thiscall ChatDisplayWin2::OnGuildAcademyHotKeyTab(ChatDisplayWin2 *this); // idb
char *__stdcall ChatDisplayWin2::GetCharName(char *pcRetCharName, char *pcChatText);
bool __stdcall ChatDisplayWin2::IsSameCharName(char *pcCharName, char *pcStr2);
char __thiscall ChatDisplayWin2::DoesSpamFilterWinOpen(ChatDisplayWin2 *this);
void __thiscall ChatDisplayWin2::MoveSpamFilterWindow(ChatDisplayWin2 *this, int fX, int fY); // idb
bool __stdcall ChatDisplayWin2::ProcessDrop(PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
void __stdcall ChatDisplayWin2::InsertText(char *pResultText, char *pCurText, char *pInserText, int nInsertPos);
void __thiscall ChatDisplayWin2::OnChatBlockBtn(ChatDisplayWin2 *this); // idb
void __thiscall ChatDisplayWin2::OnReport(ChatDisplayWin2 *this); // idb
void __thiscall ChatDisplayWin2::OnTab(ChatDisplayWin2 *this); // idb
int __thiscall ChatDisplayWin2::IsDuringEdit(ChatDisplayWin2 *this);
void __thiscall ChatDisplayWin2::AddGMNormalChat(ChatDisplayWin2 *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin2::AddGMOtherNormalChat(ChatDisplayWin2 *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin2::AddGMShoutChat(ChatDisplayWin2 *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin2::AddGMWhisperChat(ChatDisplayWin2 *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin2::AddShoutChat(ChatDisplayWin2 *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin2::AddOtherShoutChat(ChatDisplayWin2 *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin2::AddWhisperChat(ChatDisplayWin2 *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin2::AddPartyChat(ChatDisplayWin2 *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin2::AddOtherPartyChat(ChatDisplayWin2 *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin2::AddRaidChat(ChatDisplayWin2 *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin2::AddOtherRaidChat(ChatDisplayWin2 *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin2::AddRaidNoticeChat(ChatDisplayWin2 *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin2::AddGuildChat(ChatDisplayWin2 *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin2::AddOtherGuildChat(ChatDisplayWin2 *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin2::AddGuildAcademyChat(ChatDisplayWin2 *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin2::AddOtherGuildAcademyChat(ChatDisplayWin2 *this, char *pcFormat); // idb
unsigned int __thiscall ChatDisplayWin2::GetOption(ChatDisplayWin2 *this, unsigned int uiChatMode); // idb
void __thiscall ChatDisplayWin2::SetOption(ChatDisplayWin2 *this, unsigned int uiOpt, unsigned int uiChatMode); // idb
void __thiscall ChatDisplayWin2::AddOption(ChatDisplayWin2 *this, unsigned int uiOpt); // idb
void __thiscall ChatDisplayWin2::RemoveOption(ChatDisplayWin2 *this, unsigned int uiOpt); // idb
char *__thiscall ChatDisplayWin2::GetCurrentChatText(ChatDisplayWin2 *this); // idb
BOOL ChatDisplayWin2::IsAutoHideOptionSetted();
char __thiscall ChatDisplayWin2::GetCursorStateOnPanel(ChatDisplayWin2 *this); // idb
void __thiscall ChatDisplayWin2::AddRoarChat(ChatDisplayWin2 *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin2::ProcessMeInput(ChatDisplayWin2 *this, bool *bHit); // idb
bool __thiscall ChatDisplayWin2::IsSpamFilterOnBoard(ChatDisplayWin2 *this, int iChatBDIndex); // idb
char __thiscall ChatDisplayWin2::SpamFilterPass(ChatDisplayWin2 *this, int iChatBDIndex, char *pcNewStr);
void __thiscall ChatDisplayWin2::OpenSpamFilterWin(ChatDisplayWin2 *this, int b);
void __thiscall ChatDisplayWin2::SetSpamFilteredTextShow(ChatDisplayWin2 *this, bool b); // idb
void __thiscall ChatDisplayWin2::SetSpamBlockRate(ChatDisplayWin2 *this, float fRate); // idb
void __thiscall ChatDisplayWin2::SetEditFocus(ChatDisplayWin2 *this, const bool b); // idb
bool __thiscall ChatDisplayWin2::IsItemLinkInfo(ChatDisplayWin2 *this); // idb
void __thiscall ChatDisplayWin2::AddChatBoardFlexIItemLink(ChatDisplayWin2 *this, ChatBoardFlex::Type eType, SHINE_ITEM_STRUCT *pItem); // idb
void __thiscall ChatDisplayWin2::ChatStart(ChatDisplayWin2 *this, const char *szText); // idb
void __thiscall ChatDisplayWin2::AddNormalChat(ChatDisplayWin2 *this, char *pcFormat); // idb
void __thiscall ChatDisplayWin2::AddNormalChat(ChatDisplayWin2 *this, char *pcFormat, char kChatID); // idb
void __thiscall ChatDisplayWin2::AddOtherNormalChat(ChatDisplayWin2 *this, char *pcFormat, char kChatID); // idb
void __thiscall ChatDisplayWin2::AddOtherNormalChat(ChatDisplayWin2 *this, char *pcFormat); // idb
void __cdecl MoveChildrenWin2(PgWin *pkWin, int x, int y); // idb
void __thiscall ChatDisplayWin2::SetChatMode(ChatDisplayWin2 *this, unsigned int uiChatMode); // idb
void __thiscall ChatDisplayWin2::OnWhisperTab(ChatDisplayWin2 *this, bool bChatStart); // idb
void __thiscall ChatDisplayWin2::OnWhisperTabToTarget(ChatDisplayWin2 *this); // idb
void __thiscall ChatDisplayWin2::OnWhisperTabToTarget(ChatDisplayWin2 *this, char *pcName); // idb
int __thiscall ChatDisplayWin2::PositionCarretItemLink(ChatDisplayWin2 *this); // idb
char __thiscall ChatDisplayWin2::Create(ChatDisplayWin2 *this, PgFrameWork *pkFrameWork);
// void __userpurge ChatDisplayWin2::OnCommand(ChatDisplayWin2 *this@<ecx>, int a2@<ebx>, int a3@<edi>, unsigned int wParam, int lParam);
void __thiscall ChatDisplayWin2::DirectMessage(ChatDisplayWin2 *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall ChatDisplayWin2::ChatDisplayWin2(ChatDisplayWin2 *this); // idb
void __thiscall ChatDisplayWin2::~ChatDisplayWin2(ChatDisplayWin2 *this); // idb
ChatDisplayWin2 *__cdecl ChatDisplayWin2::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall ChatDisplayWin2::AddChatLinkItemInfo(ChatDisplayWin2 *this, char *pcChatText); // idb
void __thiscall ChatDisplayWin2::ClearLinkItemList(ChatDisplayWin2 *this); // idb
void __thiscall ChatDisplayWin2::DeleteItemLink(ChatDisplayWin2 *this, bool bIsDeleteKey, bool bIsBackSpaceKey); // idb
void __thiscall ChatDisplayWin2::OnEditEnd(ChatDisplayWin2 *this, unsigned int wParam, int lParam); // idb
void __thiscall ChatDisplayWin2::SetItemChatLink(ChatDisplayWin2 *this, char *pLinkItemText, SHINE_ITEM_STRUCT *rItemStruct); // idb
void __thiscall ChatDisplayWin2::ItemLinkKeyDownCheck(ChatDisplayWin2 *this); // idb
// void __userpurge ChatDisplayWin2::UpdateMeWin(ChatDisplayWin2 *this@<ecx>, int a2@<ebx>, int a3@<edi>, int a4@<esi>, float fCurTime);
std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *__thiscall ChatDisplayWin2::GetLinkItemList(ChatDisplayWin2 *this, std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *result); // idb
double __thiscall ChatDisplayWin2::GetSpamBlockRate(ChatDisplayWin2 *this);
ChatDisplayWin2 *__thiscall ChatDisplayWin2::`vector deleting destructor'(ChatDisplayWin2 *this, unsigned int a2);
void __thiscall CLCS::CLCS(CLCS *this); // idb
void __thiscall CLCS::~CLCS(CLCS *this); // idb
char __thiscall CLCS::Init(CLCS *this, int nMaxStringLen);
double __thiscall CLCS::GetCompDoubtPercentA(CLCS *this);
double __thiscall CLCS::GetCompDoubtPercentB(CLCS *this);
void __thiscall CLCS::printLCS(CLCS *this, int i, int j, unsigned __int16 *pWordStr); // idb
char __thiscall CLCS::CharToMultyByte(CLCS *this, unsigned __int16 *pWordStr, int *pWordStrLen, char *pCharStr);
double __thiscall CLCS::GetCompDoubtPercentLower(CLCS *this);
char __thiscall CLCS::LCSExecute(CLCS *this, char *pCompStrA, char *pCompStrB);
void __thiscall CLCS::PrintSubString(CLCS *this); // idb
void __thiscall KingdomQuestWin::OnSortByTitle(KingdomQuestWin *this); // idb
void __thiscall KingdomQuestWin::OnSortByUsercnt(KingdomQuestWin *this); // idb
void __thiscall KingdomQuestWin::OnSortByStarttime(KingdomQuestWin *this); // idb
void __thiscall KingdomQuestWin::OnSortBYState(KingdomQuestWin *this); // idb
void __thiscall KingdomQuestWin::JoinResult(KingdomQuestWin *this, unsigned int Handle, bool bResult); // idb
void __thiscall KingdomQuestWin::RemoveAllKQuestInfo(KingdomQuestWin *this); // idb
void __thiscall KingdomQuestWin::DeleteKQuestInfo(KingdomQuestWin *this, unsigned int Handle); // idb
PROTO_KQ_INFO *__thiscall KingdomQuestWin::GetQuestInfo(KingdomQuestWin *this, unsigned int Handle);
// tm *__usercall localtime_0@<eax>(const int *_Time@<eax>); idb
// int __usercall time@<eax>(int *_Time@<eax>); idb
void __thiscall KingdomQuestWin::SetView(KingdomQuestWin *this, int bView);
void KingdomQuestWin::OnHelpLink();
char __thiscall KingdomQuestWin::IsStarted(KingdomQuestWin *this);
unsigned int __thiscall KingdomQuestWin::GetJoinQuestHandle(KingdomQuestWin *this); // idb
void __thiscall KingdomQuestPlayerList::KingdomQuestPlayerList(KingdomQuestPlayerList *this); // idb
void __thiscall KingdomQuestPlayerList::~KingdomQuestPlayerList(KingdomQuestPlayerList *this); // idb
void __thiscall KingdomQuestPlayerList::OnClose(KingdomQuestPlayerList *this); // idb
void __thiscall KingdomQuestPlayerList::OnSort(KingdomQuestPlayerList *this, KingdomQuestPlayerList::eSortType eType); // idb
void __thiscall KingdomQuestPlayerList::ReSetList(KingdomQuestPlayerList *this); // idb
void __thiscall KingdomQuestPlayerList::OnRClick(KingdomQuestPlayerList *this); // idb
char __thiscall KingdomQuestPlayerList::IsPlayerName(KingdomQuestPlayerList *this, const char *pcName);
void __thiscall KingdomQuestTeamList::KingdomQuestTeamList(KingdomQuestTeamList *this); // idb
void __thiscall KingdomQuestTeamList::~KingdomQuestTeamList(KingdomQuestTeamList *this); // idb
void __thiscall KingdomQuestTeamList::OnClose(KingdomQuestTeamList *this); // idb
void __thiscall KingdomQuestTeamList::OnSort(KingdomQuestTeamList *this, KingdomQuestTeamList::eSortType eType); // idb
void __stdcall KingdomQuestTeamList::OnSelect(unsigned int uiTeamType);
void __thiscall KingdomQuestTeamList::SetSelectedTeam(KingdomQuestTeamList *this, char kKQTeamInfo); // idb
void __thiscall KingdomQuestTeamList::ReSetList(KingdomQuestTeamList *this); // idb
void __thiscall KingdomQuestTeamList::OnRClick(KingdomQuestTeamList *this, SlideListWin *pkSlideListWin); // idb
void __thiscall KingdomQuestTeamList::OnRClickRed(KingdomQuestTeamList *this); // idb
void __thiscall KingdomQuestTeamList::OnRClickBlue(KingdomQuestTeamList *this); // idb
char __thiscall KingdomQuestTeamList::IsPlayerName(KingdomQuestTeamList *this, const char *pcName);
void __thiscall KingdomQuestWin::~KingdomQuestWin(KingdomQuestWin *this); // idb
void __thiscall KingdomQuestWin::OnSlideBarContent(KingdomQuestWin *this); // idb
void __thiscall KingdomQuestWin::OnSlideBarTime(KingdomQuestWin *this); // idb
void __thiscall KingdomQuestWin::OnWinClose(KingdomQuestWin *this); // idb
void __thiscall KingdomQuestWin::OnOK(KingdomQuestWin *this); // idb
void __thiscall KingdomQuestWin::OnCancel(KingdomQuestWin *this); // idb
void __thiscall KingdomQuestWin::SetServerTime(KingdomQuestWin *this, int *pkKQ_Time); // idb
void __thiscall KingdomQuestWin::CheckButtonEnableSetting(KingdomQuestWin *this); // idb
void __thiscall KingdomQuestWin::SetTimer(KingdomQuestWin *this, bool bTimer); // idb
void __thiscall KingdomQuestPlayerList::OnSlide(KingdomQuestPlayerList *this); // idb
void __thiscall KingdomQuestPlayerList::OnReflash(KingdomQuestPlayerList *this); // idb
void __thiscall KingdomQuestPlayerList::SetTimer(KingdomQuestPlayerList *this, bool bTimer); // idb
void __stdcall KingdomQuestTeamList::OnSlide(SlideBar *pkSlideBar, SlideListWin *pkSlideListWin);
void __thiscall KingdomQuestTeamList::OnSlideBlue(KingdomQuestTeamList *this); // idb
void __thiscall KingdomQuestTeamList::OnSlideRed(KingdomQuestTeamList *this); // idb
void __thiscall KingdomQuestTeamList::OnReflash(KingdomQuestTeamList *this); // idb
void __thiscall KingdomQuestTeamList::SetTimer(KingdomQuestTeamList *this, bool bTimer); // idb
void __thiscall KingdomQuestWin::KingdomQuestWin(KingdomQuestWin *this); // idb
void __thiscall KingdomQuestWin::UpdateKQTime(KingdomQuestWin *this); // idb
NiUnsharedGeometryGroup *__stdcall KingdomQuestWin::GetKQState(int nState);
void __thiscall KingdomQuestPlayerList::OnCommand(KingdomQuestPlayerList *this, unsigned int wParam, int lParam); // idb
void __thiscall KingdomQuestPlayerList::UpdateList(KingdomQuestPlayerList *this); // idb
void __thiscall KingdomQuestTeamList::OnCommand(KingdomQuestTeamList *this, unsigned int wParam, int lParam); // idb
void __thiscall KingdomQuestTeamList::UpdateList(KingdomQuestTeamList *this); // idb
void __thiscall KingdomQuestWin::UpdateMyList(KingdomQuestWin *this); // idb
void __thiscall KingdomQuestWin::UpdateAllList(KingdomQuestWin *this); // idb
void __thiscall KingdomQuestWin::OpenSideWin(KingdomQuestWin *this, unsigned int uiTeamType); // idb
void __thiscall KingdomQuestWin::OnPlayerList(KingdomQuestWin *this); // idb
void __thiscall KingdomQuestPlayerList::AddElement(KingdomQuestPlayerList *this, KQ_JOIN_CHAR_INFO *pkCharInfo); // idb
void __thiscall KingdomQuestTeamList::AddElement(KingdomQuestTeamList *this, KQ_JOIN_CHAR_INFO *pkCharInfo); // idb
void __thiscall KingdomQuestTeamList::SetElement(KingdomQuestTeamList *this, PROTO_NC_KQ_TEAM_SELECT_CMD *pkTeamSelectInfo); // idb
void __thiscall KingdomQuestWin::AddKQuest(KingdomQuestWin *this, PROTO_NC_KQ_LIST_ADD_ACK *pkAddAck); // idb
void __thiscall KingdomQuestWin::UpdateListState(KingdomQuestWin *this, PROTO_NC_KQ_LIST_UPDATE_ACK *pkUpdateAck); // idb
void __thiscall KingdomQuestWin::OnMyList(KingdomQuestWin *this); // idb
void __thiscall KingdomQuestWin::OnAllList(KingdomQuestWin *this); // idb
KingdomQuestWin *__cdecl KingdomQuestWin::CreateWin(PgFrameWork *pkFrameWork); // idb
KingdomQuestPlayerList *__cdecl KingdomQuestPlayerList::CreateWin(NiPointer<NiNode> spNode, PgWin *pkParent); // idb
KingdomQuestTeamList *__cdecl KingdomQuestTeamList::CreateWin(NiPointer<NiNode> spNode, PgWin *pkParent); // idb
void __thiscall KingdomQuestWin::UpdateTimer(KingdomQuestWin *this, float fTime); // idb
void __thiscall KingdomQuestPlayerList::UpdateTimer(KingdomQuestPlayerList *this, float fTime); // idb
void __thiscall KingdomQuestTeamList::UpdateTimer(KingdomQuestTeamList *this, float fTime); // idb
void __thiscall KingdomQuestWin::UpdateContentView(KingdomQuestWin *this, int nIndex); // idb
void __thiscall KingdomQuestWin::UpdateMeWin(KingdomQuestWin *this, float fCurTime); // idb
void __thiscall KingdomQuestWin::UpdateContentView(KingdomQuestWin *this, unsigned int kQuestHandle); // idb
void __thiscall KingdomQuestPlayerList::UpdateMeWin(KingdomQuestPlayerList *this, float fCurTime); // idb
void __thiscall KingdomQuestTeamList::UpdateMeWin(KingdomQuestTeamList *this, float fCurTime); // idb
void __thiscall KingdomQuestWin::OnListClick(KingdomQuestWin *this, int nIndex); // idb
void __thiscall KingdomQuestWin::SetKQuestStatus(KingdomQuestWin *this, PROTO_NC_KQ_STATUS_ACK *pkInfo); // idb
void __thiscall KingdomQuestWin::OnShowWin(KingdomQuestWin *this); // idb
void __thiscall KingdomQuestWin::OnCommand(KingdomQuestWin *this, unsigned int wParam, int lParam); // idb
char __thiscall KingdomQuestWin::Create(KingdomQuestWin *this, PgFrameWork *pkFrameWork);
char __thiscall KingdomQuestPlayerList::Create(KingdomQuestPlayerList *this, NiPointer<NiNode> spNode, PgWin *pkParent);
char __thiscall KingdomQuestTeamList::Create(KingdomQuestTeamList *this, NiPointer<NiNode> spNode, PgWin *pkParent);
void __thiscall KingdomQuestWin::KQ_Joiner::~KQ_Joiner(KingdomQuestWin::KQ_Joiner *this); // idb
KingdomQuestPlayerList *__thiscall KingdomQuestPlayerList::`scalar deleting destructor'(KingdomQuestPlayerList *this, unsigned int a2);
KingdomQuestTeamList *__thiscall KingdomQuestTeamList::`vector deleting destructor'(KingdomQuestTeamList *this, unsigned int a2);
KQTeam *__cdecl KQTeamTable::GetByID(const unsigned __int16 iID); // idb
KingdomQuestWin *__thiscall KingdomQuestWin::`vector deleting destructor'(KingdomQuestWin *this, unsigned int a2);
char __cdecl CharClass::GetClassIDByLocalName(char *pcLocalName); // idb
void __thiscall KQuestTimeWin::KQuestTimeWin(KQuestTimeWin *this); // idb
void __thiscall KQuestTimeWin::~KQuestTimeWin(KQuestTimeWin *this); // idb
void __thiscall KQuestTimeWin::SetRestLife(KQuestTimeWin *this, int iLife); // idb
void __thiscall KQuestTimeWin::ResetTime(KQuestTimeWin *this, unsigned int second); // idb
char __thiscall KQuestTimeWin::Create(KQuestTimeWin *this, PgFrameWork *pkFrameWork);
void __thiscall KQuestTimeWin::UpdateMeWin(KQuestTimeWin *this, float fCurTime); // idb
void __thiscall KQuestTimeWin::SetRequiredKillMobNums(KQuestTimeWin *this, int iNums); // idb
KQuestTimeWin *__cdecl KQuestTimeWin::CreateWin(PgFrameWork *pkFrameWork); // idb
KQuestTimeWin *__thiscall KQuestTimeWin::`vector deleting destructor'(KQuestTimeWin *this, unsigned int a2);
char *__cdecl NpcDlgScript::ActionToken(); // idb
char *__cdecl NpcDlgScript::TypeToken(); // idb
void **__cdecl NpcDlgScript::BtnToken();
char *__cdecl NpcDlgScript::ScriptToken(); // idb
char *__cdecl NpcDlgScript::TextToken(); // idb
char *__cdecl NpcDlgScript::GetText(CTextDataMem *rtd, INode *pkNode); // idb
char *__cdecl NpcDlgScript::GetAction(CTextDataMem *rtd, INode *pkNode); // idb
void __thiscall FlexDlgBtn::FlexDlgBtn(FlexDlgBtn *this); // idb
void __thiscall FlexDlgBtn::~FlexDlgBtn(FlexDlgBtn *this); // idb
void __thiscall FlexDlgBtn::SetBtnWidth(FlexDlgBtn *this, int iWidth); // idb
void __thiscall FlexDlgBtn::OnChangeButShow(FlexDlgBtn *this, PgWinBut::ButShow eShow); // idb
void __thiscall TextBtn::TextBtn(TextBtn *this); // idb
void __thiscall TextBtn::~TextBtn(TextBtn *this); // idb
void __thiscall TextBtn::OnChangeButShow(TextBtn *this, PgWinBut::ButShow eShow); // idb
void __thiscall AutoSizingDialogWin::AutoSizingDialogWin(AutoSizingDialogWin *this); // idb
void __thiscall AutoSizingDialogWin::~AutoSizingDialogWin(AutoSizingDialogWin *this); // idb
void __thiscall AutoSizingDialogWin::SetVerticalGap(AutoSizingDialogWin *this, int iGap); // idb
void __thiscall SpeechBubbleDlgWin::SpeechBubbleDlgWin(SpeechBubbleDlgWin *this); // idb
void __thiscall SpeechBubbleDlgWin::~SpeechBubbleDlgWin(SpeechBubbleDlgWin *this); // idb
void __thiscall SpeechBubbleDlgWin::ShowOutLineBtn(SpeechBubbleDlgWin *this, int b);
void __thiscall SpeechBubbleDlgWin::SetShowOutLineBtn(SpeechBubbleDlgWin *this, int b);
int __thiscall SpeechBubbleDlgWin::GetBtnCount(SpeechBubbleDlgWin *this); // idb
void __thiscall NpcDialogWin::ShowOutLineBtn(NpcDialogWin *this, float fCurTime); // idb
bool __cdecl DlgQuestListWin::QuestNameList::SortType(DlgQuestListWin::QuestNameList *lhw, DlgQuestListWin::QuestNameList *rhw); // idb
bool __cdecl DlgQuestListWin::QuestNameList::SortRepeatable(DlgQuestListWin::QuestNameList *lhw, DlgQuestListWin::QuestNameList *rhw); // idb
bool __cdecl DlgQuestListWin::QuestNameList::SortStartItem(DlgQuestListWin::QuestNameList *lhw, DlgQuestListWin::QuestNameList *rhw); // idb
bool __cdecl DlgQuestListWin::QuestNameList::SortStartQuest(DlgQuestListWin::QuestNameList *lhw, DlgQuestListWin::QuestNameList *rhw); // idb
bool __cdecl DlgQuestListWin::QuestNameList::SortEvent(DlgQuestListWin::QuestNameList *lhw, DlgQuestListWin::QuestNameList *rhw); // idb
BOOL __cdecl DlgQuestListWin::QuestNameList::SortLevel(DlgQuestListWin::QuestNameList *lhw, DlgQuestListWin::QuestNameList *rhw);
bool __cdecl DlgQuestListWin::QuestNameList::SortStatus(DlgQuestListWin::QuestNameList *lhw, DlgQuestListWin::QuestNameList *rhw); // idb
void __thiscall DlgQuestListWin::DlgQuestListWin(DlgQuestListWin *this); // idb
void __thiscall DlgQuestListWin::~DlgQuestListWin(DlgQuestListWin *this); // idb
void __thiscall DlgQuestListWin::OnQuestListLClick(DlgQuestListWin *this, int nIndex); // idb
void __thiscall DlgQuestListWin::UpdateMeWin(DlgQuestListWin *this, float fCurTime); // idb
void DlgQuestListWin::OnHelpLink();
void __cdecl NpcBaseTextParsing(char *pcText, char *acResult, int iMaxStrLen); // idb
char __thiscall TextBtn::Create(TextBtn *this, int iXPos, int iYPos, PgSprData *pkDeco, PgFont *pkFont, PgWin *pkParent, unsigned int uiCmdMsg);
unsigned int __thiscall AutoSizingDialogWin::CalculateApproximateHeight(AutoSizingDialogWin *this, NiTList<AutoSizingDialogWin::VirtualRect *> *rkVRList, unsigned int *ruiWidth); // idb
void __thiscall AutoSizingDialogWin::AddTextGeomtry(AutoSizingDialogWin *this, unsigned int uiWidth, unsigned int *ruiYPos, char *acText); // idb
void __thiscall AutoSizingDialogWin::Approximation(AutoSizingDialogWin *this, NiTList<AutoSizingDialogWin::VirtualRect *> *rkVRList, unsigned int *ruiWidth, unsigned int *ruiHeight); // idb
void __thiscall SpeechBubbleDlgWin::ProcessMeInput(SpeechBubbleDlgWin *this, bool *bHit); // idb
void __thiscall SpeechBubbleDlgWin::DirectMessage(SpeechBubbleDlgWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall NpcDialogWin::NpcDialogWin(NpcDialogWin *this); // idb
void __thiscall NpcDialogWin::~NpcDialogWin(NpcDialogWin *this); // idb
void __thiscall NpcDialogWin::SetCloseTime(NpcDialogWin *this, float fCloseTime); // idb
void __thiscall NpcDialogWin::CheckCloseTimer(NpcDialogWin *this, unsigned int wDlgID); // idb
void __thiscall NpcDialogWin::OnClose(NpcDialogWin *this); // idb
void __thiscall NpcDialogWin::CloseDialog(NpcDialogWin *this); // idb
void __thiscall DlgQuestListWin::UpDateListSideBar(DlgQuestListWin *this); // idb
char __thiscall FlexDlgBtn::Create(FlexDlgBtn *this, int iXPos, int iYPos, PgSprData *pkLeft, PgSprData *pkRight, PgSprData *pkMiddle, PgWin *pkParent, unsigned int uiCmdMsg);
int __thiscall FlexDlgBtn::EstimateBtnWidth(FlexDlgBtn *this, char *pcText);
void __thiscall FlexDlgBtn::SetBtnText(FlexDlgBtn *this, char *pcText, bool bAutoScale); // idb
void __thiscall TextBtn::SetBtnText(TextBtn *this, char *pcText); // idb
int __thiscall TextBtn::EstimateBtnWidth(TextBtn *this, char *pcText);
void __thiscall AutoSizingDialogWin::BuildVirtualRectOfNormalDlg(AutoSizingDialogWin *this, NiTList<AutoSizingDialogWin::VirtualRect *> *rkVRList, char *pcText, unsigned int *ruiMaxWidth, unsigned int *ruiMaxHeight); // idb
void __thiscall AutoSizingDialogWin::BuildVirtualRectOfQuestDlg(AutoSizingDialogWin *this, NiTList<AutoSizingDialogWin::VirtualRect *> *rkVRList, unsigned __int16 questID, unsigned int wQuestDlgID, unsigned int *ruiMaxWidth, unsigned int *ruiMaxHeight); // idb
char __thiscall SpeechBubbleDlgWin::AddBtn(SpeechBubbleDlgWin *this, const char *pcText, bool bAutoScale, NiExtraData *pkType, NiExtraData *pkAction);
void __thiscall SpeechBubbleDlgWin::ParseBaseDlgAndCreateBtn(SpeechBubbleDlgWin *this, unsigned __int16 mobid, char *acBaseScript, int iMaxLen, unsigned int uiSeqID); // idb
char *__cdecl GetQuestStateText(PLAYER_QUEST_STATUS eStatus); // idb
void __thiscall AutoSizingDialogWin::OnCommand(AutoSizingDialogWin *this, unsigned int wParam, int lParam); // idb
void __thiscall NpcDialogWin::SetNpcFaceCut(NpcDialogWin *this, char *pcFn); // idb
void __thiscall NpcDialogWin::DirectMessage(NpcDialogWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall NpcDialogWin::UpdateMeWin(NpcDialogWin *this, float fCurTime); // idb
void __thiscall DlgQuestListWin::OnSlideBarList(DlgQuestListWin *this); // idb
void __thiscall AutoSizingDialogWin::BuildNormalDialog(AutoSizingDialogWin *this, char *pcText, unsigned int uiMinWidth, AutoSizingDialogWin::VirtualRect *pkBaseRect); // idb
void __thiscall SpeechBubbleDlgWin::BuildDialog(SpeechBubbleDlgWin *this, unsigned __int16 mobid, unsigned int uiMinWidth, unsigned int uiSeqID); // idb
void __thiscall SpeechBubbleDlgWin::BuildScriptDialog(SpeechBubbleDlgWin *this, unsigned __int16 mobid, char *pcScript, unsigned int uiMinWidth, bool bCloseBtn); // idb
void __thiscall NpcDialogWin::OpenNpcNormalDialog(NpcDialogWin *this, int mobid, unsigned int uiSeqID);
void __thiscall NpcDialogWin::OpenNpcScriptDialog(NpcDialogWin *this, int mobid, char *pcScript, bool bCloseBtn);
void __thiscall NpcDialogWin::OpenNpcScriptDialog(NpcDialogWin *this, char *pcFn, char *pcScript, bool bCloseBtn); // idb
void __thiscall DlgQuestListWin::QuestNameList::QuestNameList(DlgQuestListWin::QuestNameList *this); // idb
void __thiscall DlgQuestListWin::OnCommand(DlgQuestListWin *this, unsigned int wParam, int lParam); // idb
FlexDlgBtn *__cdecl FlexDlgBtn::CreateWin(int iXPos, int iYPos, PgSprData *pkLeft, PgSprData *pkRight, PgSprData *pkMiddle, PgWin *pkParent, unsigned int uiCmdMsg); // idb
TextBtn *__cdecl TextBtn::CreateWin(int iXPos, int iYPos, PgSprData *pkDeco, PgFont *pkFont, PgWin *pkParent, unsigned int uiCmdMsg); // idb
AutoSizingDialogWin *__cdecl AutoSizingDialogWin::CreateWin(unsigned int uiLeft, unsigned int uiTop, unsigned int uiActionBtnTag, PgFont *pkFont, PgWin *pkParent); // idb
char __thiscall AutoSizingDialogWin::Create(AutoSizingDialogWin *this, unsigned int uiLeft, unsigned int uiTop, unsigned int uiActionBtnTag, PgFont *pkFont, PgWin *pkParent);
SpeechBubbleDlgWin *__cdecl SpeechBubbleDlgWin::CreateWin(PgFrameWork *pkFrameWork); // idb
NpcDialogWin *__cdecl NpcDialogWin::CreateWin(PgFrameWork *pkFrameWork, char *pcName, int ShowWinAtAbsoluteFar);
char __thiscall NpcDialogWin::Create(NpcDialogWin *this, PgFrameWork *pkFrameWork, char *pcName, bool ShowWinAtAbsoluteFar);
DlgQuestListWin *__cdecl DlgQuestListWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall SpeechBubbleDlgWin::Create(SpeechBubbleDlgWin *this, PgFrameWork *pkFrameWork);
void __thiscall SpeechBubbleDlgWin::BuildScriptDialog(SpeechBubbleDlgWin *this, char *pcScript, NiTList<ScriptBtn *> *pkScriptBtnList, unsigned int uiMinWidth); // idb
void __thiscall NpcDialogWin::OpenNpcScriptDialog(NpcDialogWin *this, char *pcFn, char *pcScript, NiTList<ScriptBtn *> *pkScriptBtnList); // idb
void __thiscall AutoSizingDialogWin::OnClose(AutoSizingDialogWin *this); // idb
void __thiscall AutoSizingDialogWin::ParseAndCreateQuestDlg(AutoSizingDialogWin *this, unsigned __int16 questID, unsigned int wQuestDlgID, unsigned int uiWidth); // idb
void __thiscall AutoSizingDialogWin::BuildQuestDialog(AutoSizingDialogWin *this, unsigned int wQuestDlgID, unsigned int uiMinWidth, unsigned int dwQuestID, char byScriptCmd, AutoSizingDialogWin::VirtualRect *pkBaseRect); // idb
void __thiscall SpeechBubbleDlgWin::BuildQuestDialog(SpeechBubbleDlgWin *this, unsigned __int16 mobid, unsigned int wID, unsigned int dwQuestID, char byScriptCmd, unsigned int uiMinWidth, bool bShowMenu); // idb
void __thiscall NpcDialogWin::OpenNpcQuestDialog(NpcDialogWin *this, int mobid, unsigned int wID, unsigned int dwQuestID, char byScriptCmd, bool bIsShowMenu);
void __thiscall NpcDialogWin::OpenUserQuestDialog(NpcDialogWin *this, unsigned int wID, unsigned int dwQuestID, char byScriptCmd); // idb
char __thiscall DlgQuestListWin::Create(DlgQuestListWin *this, PgFrameWork *pkFrameWork);
void __thiscall DlgQuestListWin::SetQuestList(DlgQuestListWin *this); // idb
// void __userpurge SpeechBubbleDlgWin::OnCommand(SpeechBubbleDlgWin *this@<ecx>, int a2@<edi>, int a3@<esi>, unsigned int wParam, int lParam);
void __thiscall NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::~NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>(NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *> *this); // idb
NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *> *__thiscall NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::`vector deleting destructor'(NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *> *this, unsigned int a2);
FlexDlgBtn *__thiscall FlexDlgBtn::`scalar deleting destructor'(FlexDlgBtn *this, unsigned int a2);
TextBtn *__thiscall TextBtn::`vector deleting destructor'(TextBtn *this, unsigned int a2);
AutoSizingDialogWin *__thiscall AutoSizingDialogWin::`vector deleting destructor'(AutoSizingDialogWin *this, unsigned int a2);
SpeechBubbleDlgWin *__thiscall SpeechBubbleDlgWin::`vector deleting destructor'(SpeechBubbleDlgWin *this, unsigned int a2);
DlgQuestListWin *__thiscall DlgQuestListWin::`scalar deleting destructor'(DlgQuestListWin *this, unsigned int a2);
NpcDialogData *__cdecl NpcDialogDataTable::GetNpcDialogDataByMobIDX(char *pcMobIDX); // idb
char *__cdecl NpcDialogDataTable::GetFaceCutFileNameByMobID(int MobID);
void __thiscall NiTList<AutoSizingDialogWin::VirtualRect *>::~NiTList<AutoSizingDialogWin::VirtualRect *>(NiTList<AutoSizingDialogWin::VirtualRect *> *this); // idb
NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *> *__thiscall NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::`scalar deleting destructor'(NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *> *this, unsigned int a2);
NpcDialogWin *__thiscall NpcDialogWin::`vector deleting destructor'(NpcDialogWin *this, unsigned int a2);
void __thiscall std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::_Splice_same(std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *this, std::_List_const_iterator<std::_List_val<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > > _Where, std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *_Right, std::_List_const_iterator<std::_List_val<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > > _First, std::_List_const_iterator<std::_List_val<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > > _Last, unsigned int _Count); // idb
void __thiscall std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>(std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *this); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall ScriptBtn::GetText(ScriptBtn *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result); // idb
void __thiscall DlgQuestListWin::QuestNameList::QuestNameList(DlgQuestListWin::QuestNameList *this, DlgQuestListWin::QuestNameList *__that); // idb
void __thiscall std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::clear(std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *this); // idb
std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *__stdcall std::_List_val<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::_Buynode(std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *_Next, std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *_Prev, DlgQuestListWin::QuestNameList *_Val);
void __thiscall std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::~list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>(std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *this); // idb
void __thiscall std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::merge<bool (__cdecl *)(DlgQuestListWin::QuestNameList const &,DlgQuestListWin::QuestNameList const &)>(std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *this, std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *_Right, bool (__cdecl *_Pred)(DlgQuestListWin::QuestNameList *, DlgQuestListWin::QuestNameList *)); // idb
void __thiscall std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::sort<bool (__cdecl *)(DlgQuestListWin::QuestNameList const &,DlgQuestListWin::QuestNameList const &)>(std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *this, bool (__cdecl *_Pred)(DlgQuestListWin::QuestNameList *, DlgQuestListWin::QuestNameList *)); // idb
void __thiscall NpcQuestWin::NpcQuestWin(NpcQuestWin *this); // idb
void __thiscall NpcQuestWin::~NpcQuestWin(NpcQuestWin *this); // idb
void __thiscall NpcQuestWin::OnCmdClose(NpcQuestWin *this); // idb
void NpcQuestWin::OnHelpLink();
void __thiscall NpcQuestWin::OnCommand(NpcQuestWin *this, unsigned int wParam, int lParam); // idb
char __thiscall NpcQuestWin::Create(NpcQuestWin *this, NiSourceTexture *pkTexture, PgFrameWork *pkFrameWork);
NpcQuestWin *__cdecl NpcQuestWin::CreateWin(NiSourceTexture *pkTexture, PgFrameWork *pkFrameWork); // idb
NpcQuestWin *__thiscall NpcQuestWin::`vector deleting destructor'(NpcQuestWin *this, unsigned int a2);
void __thiscall QuestFinishWin::UpdateMeWin(QuestFinishWin *this, float fCurTime); // idb
char __thiscall QuestFinishWin::Create(QuestFinishWin *this, PgFrameWork *pkFrameWork);
void __thiscall QuestFinishWin::ApplyTexture2Portrait(QuestFinishWin *this, NiTexture *pkTex, bool bUserCharFace); // idb
void __thiscall QuestFinishWin::ChangeFace(QuestFinishWin *this, unsigned __int16 iEndQuestNpcID); // idb
void __thiscall QuestFinishWin::QuestFinishWin(QuestFinishWin *this); // idb
void __thiscall QuestFinishWin::~QuestFinishWin(QuestFinishWin *this); // idb
QuestFinishWin *__cdecl QuestFinishWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall QuestFinishWin::OnQuestCheckClick(QuestFinishWin *this); // idb
void __thiscall QuestFinishWin::OnCommand(QuestFinishWin *this, unsigned int wParam, int lParam); // idb
void __thiscall QuestFinishWin::UpdateQuest(QuestFinishWin *this); // idb
void __thiscall NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>(NiPointer<HazeAccumulator> *this); // idb
QuestFinishWin *__thiscall QuestFinishWin::`scalar deleting destructor'(QuestFinishWin *this, unsigned int a2);
void __thiscall QuestNewsWin::OnInvLClick(QuestNewsWin *this, unsigned int uiInvIndex); // idb
void __thiscall QuestNewsWin::OnClose(QuestNewsWin *this); // idb
void __thiscall QuestNewsWin::OnCommand(QuestNewsWin *this, unsigned int wParam, int lParam); // idb
int __stdcall QuestNewsWin::CheckNewQuest(char nPlayerLevel);
void __thiscall QuestNewsWin::OnShowWin(QuestNewsWin *this); // idb
void __thiscall QuestNewsWin::CreateFlexMsgBox(QuestNewsWin *this); // idb
void __thiscall QuestNewsWin::DirectMessage(QuestNewsWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall QuestNewsWin::UpdateMeWin(QuestNewsWin *this, float fCurTime); // idb
int __thiscall QuestNewsWin::QuestPlayer_LevelChange(QuestNewsWin *this, char nPlayerLevel); // idb
void __thiscall QuestNewsWin::~QuestNewsWin(QuestNewsWin *this); // idb
void __thiscall QuestNewsWin::QuestNewsWin(QuestNewsWin *this); // idb
QuestNewsWin *__cdecl QuestNewsWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall QuestNewsWin::Create(QuestNewsWin *this, PgFrameWork *pkFrameWork);
std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *__cdecl std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Min(std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *_Pnode); // idb
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>,std::_Iterator_base0>::operator++(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >,std::_Iterator_base0> *this); // idb
void __thiscall std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Erase(std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *this, std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *_Rootnode); // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *__thiscall std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::erase(std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *this, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > _Where); // idb
void __thiscall std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::clear(std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *this); // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *__thiscall std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::erase(std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *this, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > _Last); // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *__thiscall std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::find(std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *this, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *result, const unsigned __int16 *_Keyval); // idb
void __thiscall std::set<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>>::~set<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>>(std::set<unsigned short,std::less<unsigned short>,std::allocator<unsigned short> > *this); // idb
QuestNewsWin *__thiscall QuestNewsWin::`vector deleting destructor'(QuestNewsWin *this, unsigned int a2);
double __cdecl NiACos(float fValue);
double __cdecl NiSymmetricRandom();
NiPoint3 *__thiscall NiPoint3::Cross(NiPoint3 *this, NiPoint3 *result, NiPoint3 *pt); // idb
NiControllerSequence *__thiscall NiActorManager::GetSequence(NiActorManager *this, unsigned int eSequenceID); // idb
// void __usercall QuestPigeonEffect::SetStartPos(QuestPigeonEffect *this@<ecx>, int a2@<ebx>);
void __thiscall QuestPigeonEffect::QuestPigeonEffect(QuestPigeonEffect *this, NiActorManager *pkActor, Char *pkTarget); // idb
void __thiscall QuestPigeonEffect::~QuestPigeonEffect(QuestPigeonEffect *this); // idb
void __thiscall QuestPigeonEffect::UpdateAEEff(QuestPigeonEffect *this, float fTime); // idb
void __thiscall QuestPigeonEffect::CatchAEEff(QuestPigeonEffect *this, bool bForceLoading); // idb
// void __userpurge QuestPigeonEffect::Update(QuestPigeonEffect *this@<ecx>, float a2@<edi>, float fTime);
// void __userpurge QuestPigeonEffect::Start(QuestPigeonEffect *this@<ecx>, int a2@<ebx>, float fTime);
void __thiscall Effect::SetDefaultEffect(Effect *this, NiNode *pkNode); // idb
std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *__stdcall std::_List_val<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo>>::_Buynode(std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *_Next, std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *_Prev, QuestPigeonEffect::EffectInfo *_Val);
NiRTTI *QuestPigeonEffect::GetRTTI();
bool __thiscall QuestPigeonEffect::IsEnd(QuestPigeonEffect *this, float fTime); // idb
QuestPigeonEffect *__thiscall QuestPigeonEffect::`vector deleting destructor'(char *this, unsigned int a2);
NiPoint3 *__thiscall Effect::GetDir(Effect *this); // idb
Effect *__thiscall Effect::Clone(Effect *this); // idb
double __thiscall Effect::GetLifeTime(Effect *this);
void __thiscall Effect::SetLifeTime(Effect *this, float fLifeTime); // idb
void __thiscall Effect::Stop(Effect *this); // idb
void __thiscall Effect::DeleteEffectDestoryMessengerList(Effect *this); // idb
void __thiscall Effect::SetShow(Effect *this, bool _bShow); // idb
void __thiscall Effect::SetRootNode(Effect *this, NiNode *pkNode); // idb
void __thiscall Effect::SetPos(Effect *this, NiPoint3 *kPos); // idb
NiPoint3 *__thiscall Effect::GetPos(Effect *this); // idb
NiPoint3 *__thiscall Effect::GetWorldPos(Effect *this); // idb
void __thiscall Effect::SetRealDir(Effect *this, NiPoint3 *kDir); // idb
void __thiscall Effect::SetDir(Effect *this, NiPoint3 *kDir); // idb
void __thiscall Effect::CopyMember(Effect *this, Effect *pkEffect); // idb
void __thiscall Effect::RegisterEffectMessenger(Effect *this, IEffectDestroyMessenger *pkMessenger); // idb
void __thiscall Effect::SetDecalEffect(Effect *this, NiNode *pkNode); // idb
QuestPigeonEffect *__thiscall QuestPigeonEffect::`vector deleting destructor'(QuestPigeonEffect *this, unsigned int a2);
void __thiscall std::list<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo>>::push_back(std::list<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> > *this, QuestPigeonEffect::EffectInfo *_Val); // idb
void __thiscall QuestStartItemWin::QuestStartItemWin(QuestStartItemWin *this); // idb
void __thiscall QuestStartItemWin::~QuestStartItemWin(QuestStartItemWin *this); // idb
void __thiscall QuestStartItemWin::UpdateMeWin(QuestStartItemWin *this, float fCurTime); // idb
void __thiscall QuestStartItemWin::SetRewardWin(QuestStartItemWin *this, RewardWin *pkWin); // idb
void __thiscall QuestStartItemWin::OnShowWin(QuestStartItemWin *this); // idb
void QuestStartItemWin::OnHelpLink();
void __thiscall QuestStartItemWin::UpDateContentSideBar(QuestStartItemWin *this); // idb
void __thiscall QuestStartItemWin::ResetViewPoint(QuestStartItemWin *this); // idb
void __thiscall QuestStartItemWin::OnCommand(QuestStartItemWin *this, unsigned int wParam, int lParam); // idb
void __thiscall QuestStartItemWin::SetQuestContentText(QuestStartItemWin *this, unsigned int hQuestID, const char *szText); // idb
QuestStartItemWin *__cdecl QuestStartItemWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall QuestStartItemWin::SetQuestInfo(QuestStartItemWin *this, unsigned __int16 qID); // idb
char __thiscall QuestStartItemWin::Create(QuestStartItemWin *this, PgFrameWork *pkFrameWork);
QuestStartItemWin *__thiscall QuestStartItemWin::`scalar deleting destructor'(QuestStartItemWin *this, unsigned int a2);
void __thiscall CQuestWin2::ResetQuestStateIcon(CQuestWin2 *this); // idb
void __thiscall CQuestWin2::SetRewardWin(CQuestWin2 *this, RewardWin *pkWin); // idb
void CQuestWin2::OnHelpLink();
void __thiscall CQuestWin2::OnEpicQuestCompleteList(CQuestWin2 *this); // idb
void __thiscall EpicQuestWin::UpdateMeWin(EpicQuestWin *this, float fCurTime); // idb
void __thiscall EpicQuestWin::OnQuestAccept(EpicQuestWin *this); // idb
void __thiscall EpicQuestWin::ResetQuestStateIcon(EpicQuestWin *this); // idb
void EpicQuestWin::OnHelpLink();
void __thiscall AutoRunBut::AutoRunBut(AutoRunBut *this); // idb
void __thiscall AutoRunBut::~AutoRunBut(AutoRunBut *this); // idb
bool __thiscall AutoRunBut::Create(AutoRunBut *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, char *pcName, unsigned int uiExtStyle); // idb
void __thiscall CQuestWin2::OnWinClose(CQuestWin2 *this); // idb
void __thiscall CQuestWin2::DirectMessage(CQuestWin2 *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall CQuestWin2::OnFullMapOpen(CQuestWin2 *this); // idb
void __thiscall CQuestWin2::UpdateLocationInfo(CQuestWin2 *this, unsigned __int16 Quest_ID); // idb
void __thiscall CQuestWin2::ResetContentSlideBar(CQuestWin2 *this); // idb
char __thiscall CQuestWin2::RemoveAutoBlinkBut(CQuestWin2 *this, PgWinBut *But);
char __thiscall CQuestWin2::UpdateBlinkButList(CQuestWin2 *this, float fCurTime);
void __thiscall EpicQuestWin::EpicQuestWin(EpicQuestWin *this); // idb
void __thiscall EpicQuestWin::~EpicQuestWin(EpicQuestWin *this); // idb
int EpicQuestWin::TotalMaxLowLevelQuest();
int __thiscall EpicQuestWin::TotalMaxEpicQuest(EpicQuestWin *this); // idb
void __thiscall EpicQuestWin::UpDateContentSideBar(EpicQuestWin *this); // idb
void __thiscall AutoRunBut::ProcessMeInput(AutoRunBut *this, bool *bHit); // idb
void __stdcall CQuestWin2::OnAutoRunBtnClick(unsigned __int16 *kID);
// void __userpurge CQuestWin2::OnQuestListLClick(CQuestWin2 *this@<ecx>, int a2@<ebx>, signed int a3@<edi>, int nIndex, bool bCheck);
bool __thiscall CQuestWin2::AddQuestListElement(CQuestWin2 *this, CQuestWin2::QData *rkQuest); // idb
void __thiscall CQuestWin2::UpdateQuestStateIcon(CQuestWin2 *this); // idb
void __thiscall CQuestWin2::SetQuestContentText(CQuestWin2 *this, unsigned int hQuestID, const char *szText); // idb
void __thiscall CQuestWin2::UpDateContentSideBar(CQuestWin2 *this); // idb
// void __userpurge CQuestWin2::SetSelectedID(CQuestWin2 *this@<ecx>, int a2@<ebx>, int a3@<edi>, int iSelectID);
void __thiscall EpicQuestWin::OnSlideBarContent(EpicQuestWin *this); // idb
bool __thiscall EpicQuestWin::AddQuestListElement(EpicQuestWin *this, EpicQuestWin::QData *rkQuest); // idb
void __thiscall EpicQuestWin::SetQuestContentText(EpicQuestWin *this, unsigned int hQuestID, const char *szText); // idb
void __thiscall EpicQuestWin::UpdateQuestStateIcon(EpicQuestWin *this); // idb
void __thiscall CQuestWin2::UpDateListSideBar(CQuestWin2 *this); // idb
char __thiscall CQuestWin2::AddAutoBlinkBut(CQuestWin2 *this, PgWinBut *But);
void __thiscall EpicQuestWin::UpDateListSideBar(EpicQuestWin *this); // idb
void __thiscall CQuestWin2::OnSlideBarList(CQuestWin2 *this); // idb
void __thiscall EpicQuestWin::OnSlideBarList(EpicQuestWin *this); // idb
void __thiscall CQuestWin2::OnGiveUp(CQuestWin2 *this); // idb
EpicQuestWin *__cdecl EpicQuestWin::CreateWin(PgFrameWork *pkFrameWork); // idb
AutoRunBut *__cdecl AutoRunBut::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, char *pcName, unsigned int uiExtStyle); // idb
void __thiscall CQuestWin2::~CQuestWin2(CQuestWin2 *this); // idb
void __thiscall CQuestWin2::CQuestWin2(CQuestWin2 *this); // idb
CQuestWin2 *__cdecl CQuestWin2::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall CQuestWin2::UpDateViewQuesContent(CQuestWin2 *this, unsigned __int16 qID); // idb
void __thiscall EpicQuestWin::UpDateViewQuesContent(EpicQuestWin *this, unsigned __int16 qID); // idb
void __thiscall CQuestWin2::UpDateViewQuestList(CQuestWin2 *this, bool bUseCurLevel, int iLevel); // idb
void __thiscall CQuestWin2::UpdateQuestData(CQuestWin2 *this); // idb
void __thiscall EpicQuestWin::UpDateViewQuestList(EpicQuestWin *this); // idb
void __thiscall CQuestWin2::UpdateMeWin(CQuestWin2 *this, float fCurTime); // idb
char __thiscall CQuestWin2::Create(CQuestWin2 *this, PgFrameWork *pkFrameWork);
void __thiscall CQuestWin2::OnTAB1(CQuestWin2 *this); // idb
void __thiscall CQuestWin2::OnSortByLevel(CQuestWin2 *this, bool bDown); // idb
void __thiscall CQuestWin2::OnSortByName(CQuestWin2 *this); // idb
void __thiscall CQuestWin2::OnSortByState(CQuestWin2 *this); // idb
void __thiscall CQuestWin2::OnShowWin(CQuestWin2 *this); // idb
void __thiscall CQuestWin2::LevelChange(CQuestWin2 *this, char nPlayerLevel); // idb
char __thiscall EpicQuestWin::Create(EpicQuestWin *this, PgFrameWork *pkFrameWork);
void __thiscall EpicQuestWin::UpdateQuestData(EpicQuestWin *this); // idb
void __thiscall EpicQuestWin::OnQuestListLClick(EpicQuestWin *this, int nIndex); // idb
void __thiscall CQuestWin2::OnTAB2(CQuestWin2 *this); // idb
void __thiscall CQuestWin2::SelectTab(CQuestWin2 *this, int TabNum); // idb
void __thiscall EpicQuestWin::OnShowWin(EpicQuestWin *this); // idb
void __thiscall EpicQuestWin::OnCommand(EpicQuestWin *this, unsigned int wParam, int lParam); // idb
// void __userpurge CQuestWin2::OnCommand(CQuestWin2 *this@<ecx>, int a2@<ebx>, signed int a3@<edi>, unsigned int wParam, int lParam);
std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Min(std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *_Pnode); // idb
std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Max(std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *_Pnode); // idb
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Max(std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Pnode); // idb
void __thiscall NiTArray<PgWinBut *>::~NiTArray<PgWinBut *>(NiTArray<PgWinBut *> *this); // idb
unsigned int __thiscall NiTArray<PgWinBut *>::Remove(NiTArray<PgWinBut *> *this, PgWinBut *const *element); // idb
NiTArray<PgWinBut *> *__thiscall NiTArray<PgWinBut *>::`vector deleting destructor'(NiTArray<PgWinBut *> *this, unsigned int a2);
void __thiscall NiTArray<NiGeometry *>::SetSize(NiTArray<NiTPointerList<NiPointer<NiProperty> > *> *this, unsigned int uiMaxSize); // idb
AutoRunBut *__thiscall AutoRunBut::`vector deleting destructor'(AutoRunBut *this, unsigned int a2);
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>,std::_Iterator_base0>::operator++(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >,std::_Iterator_base0> *this); // idb
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>,std::_Iterator_base0>::operator++(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >,std::_Iterator_base0> *this); // idb
void __thiscall std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Lrotate(std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *this, std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *_Wherenode); // idb
void __thiscall std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Rrotate(std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *this, std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *_Wherenode); // idb
void __thiscall std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::_Lrotate(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Wherenode); // idb
EpicQuestWin *__thiscall EpicQuestWin::`scalar deleting destructor'(EpicQuestWin *this, unsigned int a2);
void __thiscall CQuestWin2::QData::~QData(CQuestWin2::QData *this); // idb
void __thiscall EpicQuestWin::QData::~QData(EpicQuestWin::QData *this); // idb
void __thiscall std::pair<int,CQuestWin2::QData>::~pair<int,CQuestWin2::QData>(std::pair<int,CQuestWin2::QData> *this); // idb
void __thiscall std::pair<int,EpicQuestWin::QData>::~pair<int,EpicQuestWin::QData>(std::pair<int,EpicQuestWin::QData> *this); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > >,std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > > *__thiscall std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Eqrange(std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > >,std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > > *result, const int *_Keyval); // idb
void __thiscall CQuestWin2::QData::QData(CQuestWin2::QData *this, CQuestWin2::QData *__that); // idb
void __thiscall EpicQuestWin::QData::QData(EpicQuestWin::QData *this, unsigned int _dwQuestID, int _nType, const char *_szTitle, unsigned int _dwData, int _r, int _g, int _b); // idb
void __thiscall CQuestWin2::QData::QData(CQuestWin2::QData *this, unsigned int _dwQuestID, int _nType, const char *_szTitle, const char *_szState, unsigned int _dwData, int _r, int _g, int _b, PLAYER_QUEST_STATUS _Status, bool _bFilterType); // idb
CQuestWin2 *__thiscall CQuestWin2::`vector deleting destructor'(CQuestWin2 *this, unsigned int a2);
void __thiscall std::pair<int const,EpicQuestWin::QData>::pair<int const,EpicQuestWin::QData>(std::pair<int const ,EpicQuestWin::QData> *this, std::pair<int,EpicQuestWin::QData> *_Right); // idb
void __thiscall std::pair<int,EpicQuestWin::QData>::pair<int,EpicQuestWin::QData>(std::pair<int,EpicQuestWin::QData> *this, char *_Val1, EpicQuestWin::QData *_Val2); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > *__thiscall std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Insert(std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *_Newnode); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > > *__thiscall std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::_Insert(std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *_Newnode); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > *__thiscall std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::erase(std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > _Where); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > > *__thiscall std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::erase(std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > > _Where); // idb
void __thiscall std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Erase(std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *this, std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *_Rootnode); // idb
void __thiscall std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::_Erase(std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > *this, std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *_Rootnode); // idb
std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Buynode<std::pair<int,CQuestWin2::QData>>(std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *this, std::pair<int,CQuestWin2::QData> *_Val); // idb
std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::_Buynode<std::pair<int,EpicQuestWin::QData>>(std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > *this, std::pair<int,EpicQuestWin::QData> *_Val); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > *__thiscall std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::erase(std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > _Last); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > > *__thiscall std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::erase(std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > > _Last); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::insert<std::pair<int,CQuestWin2::QData>>(std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > >,bool> *result, std::pair<int,CQuestWin2::QData> *_Val); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::insert<std::pair<int,EpicQuestWin::QData>>(std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > >,bool> *result, std::pair<int,EpicQuestWin::QData> *_Val); // idb
void __thiscall std::multimap<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>>::~multimap<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>>(std::multimap<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> > > *this); // idb
void __thiscall std::multimap<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>>::~multimap<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>>(std::multimap<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> > > *this); // idb
void __thiscall MonsterCardInventoryWin::OnQuit(MonsterCardInventoryWin *this); // idb
void __thiscall MonsterCardInventoryWin::ResetPage(MonsterCardInventoryWin *this); // idb
int __thiscall MonsterCardInventoryWin::GetSelectPageFirstIndex(MonsterCardInventoryWin *this);
void __thiscall MonsterCardInventoryWin::UpdateMeWin(MonsterCardInventoryWin *this, float fCurTime); // idb
void __thiscall MonsterCardInventoryWin::SetCardInfo(MonsterCardInventoryWin *this, unsigned __int16 test); // idb
void __thiscall MonsterCardInventoryWin::ViewItemUpdate(MonsterCardInventoryWin *this, int nTab, int nAttributeTab); // idb
void __thiscall MonsterCardInventoryWin::SelectTab(MonsterCardInventoryWin *this, int nTab); // idb
void __thiscall MonsterCardInventoryWin::SelectAttributeTab(MonsterCardInventoryWin *this, int nAttributeTab); // idb
void __thiscall MonsterCardInventoryWin::AddItem(MonsterCardInventoryWin *this, unsigned __int16 nitemID); // idb
void __thiscall MonsterCardInventoryWin::~MonsterCardInventoryWin(MonsterCardInventoryWin *this); // idb
void __thiscall MonsterCardInventoryWin::OnShowWin(MonsterCardInventoryWin *this); // idb
void __thiscall MonsterCardInventoryWin::MonsterCardInventoryWin(MonsterCardInventoryWin *this); // idb
MonsterCardInventoryWin *__cdecl MonsterCardInventoryWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall MonsterCardInventoryWin::ActiveListViewEnable(MonsterCardInventoryWin *this, int bEnable);
void __thiscall MonsterCardInventoryWin::SelectIconItem(MonsterCardInventoryWin *this, int nIndex); // idb
void __thiscall MonsterCardInventoryWin::OnCommand(MonsterCardInventoryWin *this, unsigned int wParam, int lParam); // idb
char __thiscall MonsterCardInventoryWin::Create(MonsterCardInventoryWin *this, PgFrameWork *pkFrameWork);
void __thiscall std::basic_iostream<char,std::char_traits<char>>::~basic_iostream<char,std::char_traits<char>>(std::basic_iostream<char,std::char_traits<char> > *this); // idb
void __thiscall std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::_Tidy(std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char> > *this); // idb
char *__thiscall std::basic_ostream<char,std::char_traits<char>>::`vector deleting destructor'(std::basic_ostream<char,std::char_traits<char> > *this, unsigned int a2);
int __thiscall std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::underflow(std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char> > *this); // idb
std::fpos<int> *__thiscall std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::seekoff(std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char> > *this, std::fpos<int> *result, __int64 _Off, int _Way, int _Which); // idb
std::fpos<int> *__thiscall std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::seekpos(std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char> > *this, std::fpos<int> *result, std::fpos<int> _Ptr, int _Mode); // idb
int __thiscall std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::overflow(std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char> > *this, int _Meta); // idb
int __thiscall std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::pbackfail(std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char> > *this, int _Meta); // idb
char *__thiscall std::basic_iostream<char,std::char_traits<char>>::`vector deleting destructor'(std::basic_iostream<char,std::char_traits<char> > *this, unsigned int a2);
std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::`vector deleting destructor'(std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int a2);
char *__cdecl std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Ifmt(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, char *_Fmt, const char *_Spec, int _Flags); // idb
void __thiscall std::numpunct<char>::_Tidy(std::numpunct<char> *this); // idb
void __thiscall std::numpunct<char>::_Init(std::numpunct<char> *this, std::_Locinfo *_Lobj, bool _Isdef); // idb
char __thiscall std::numpunct<char>::do_decimal_point(std::numpunct<char> *this); // idb
char __thiscall std::numpunct<char>::do_thousands_sep(std::numpunct<char> *this); // idb
std::numpunct<char> *__thiscall std::numpunct<char>::`scalar deleting destructor'(std::numpunct<char> *this, unsigned int a2);
void __thiscall std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream<char,std::char_traits<char>,std::allocator<char>>(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char> > *this); // idb
std::ostreambuf_iterator<char,std::char_traits<char> > *__cdecl std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Rep(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, std::ostreambuf_iterator<char,std::char_traits<char> > *result, std::ostreambuf_iterator<char,std::char_traits<char> > _Dest, char _Ch, unsigned int _Count); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::numpunct<char>::falsename(std::numpunct<char> *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::numpunct<char>::truename(std::numpunct<char> *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result); // idb
std::ostreambuf_iterator<char,std::char_traits<char> > *__cdecl std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Put(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, std::ostreambuf_iterator<char,std::char_traits<char> > *result, std::ostreambuf_iterator<char,std::char_traits<char> > _Dest, const char *_Ptr, unsigned int _Count); // idb
std::ostreambuf_iterator<char,std::char_traits<char> > *__cdecl std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Putgrouped(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, std::ostreambuf_iterator<char,std::char_traits<char> > *result, std::ostreambuf_iterator<char,std::char_traits<char> > _Dest, const char *_Ptr, unsigned int _Count, char _Kseparator); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::numpunct<char>::grouping(std::numpunct<char> *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result); // idb
signed int __cdecl std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Getcat(std::locale::facet **_Ppf, std::locale *_Ploc);
signed int __cdecl std::numpunct<char>::_Getcat(std::locale::facet **_Ppf, std::locale *_Ploc);
void __thiscall std::basic_ostream<char,std::char_traits<char>>::_Osfx(std::basic_ostream<char,std::char_traits<char> > *this); // idb
void __thiscall std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::`vbase destructor(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char> > *this); // idb
char *__thiscall std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::`scalar deleting destructor'(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int a2);
std::locale::facet *__cdecl std::use_facet<std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>>(std::locale *_Loc);
std::locale::facet *__cdecl std::use_facet<std::numpunct<char>>(std::locale *_Loc);
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *_Node, bool _Leftish); // idb
void __thiscall std::basic_ostream<char,std::char_traits<char>>::sentry::~sentry(std::basic_ostream<char,std::char_traits<char> >::sentry *this); // idb
std::basic_ostream<char,std::char_traits<char> > *__thiscall std::basic_ostream<char,std::char_traits<char>>::operator<<(std::basic_ostream<char,std::char_traits<char> > *this, unsigned __int16 _Val); // idb
std::ostreambuf_iterator<char,std::char_traits<char> > *__cdecl std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Iput(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, std::ostreambuf_iterator<char,std::char_traits<char> > *result, std::ostreambuf_iterator<char,std::char_traits<char> > _Dest, std::ios_base *_Iosbase, char _Fill, char *_Buf, unsigned int _Count); // idb
std::basic_ostream<char,std::char_traits<char> > *__cdecl std::operator<<<std::char_traits<char>>(std::basic_ostream<char,std::char_traits<char> > *_Ostr, const char *_Val); // idb
std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned short,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,unsigned short> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned short,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,unsigned short>>,0>>::_Buynode<std::pair<unsigned int,unsigned short>>(std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned short,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,unsigned short> >,0> > *this, std::pair<unsigned int,unsigned short> *_Val); // idb
std::ostreambuf_iterator<char,std::char_traits<char> > *__thiscall std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::do_put(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, std::ostreambuf_iterator<char,std::char_traits<char> > *result, std::ostreambuf_iterator<char,std::char_traits<char> > _Dest, std::ios_base *_Iosbase, char _Fill, int _Val); // idb
std::ostreambuf_iterator<char,std::char_traits<char> > *__thiscall std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::do_put(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, std::ostreambuf_iterator<char,std::char_traits<char> > *result, std::ostreambuf_iterator<char,std::char_traits<char> > _Dest, std::ios_base *_Iosbase, char _Fill, unsigned int _Val); // idb
std::ostreambuf_iterator<char,std::char_traits<char> > *__thiscall std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::do_put(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, std::ostreambuf_iterator<char,std::char_traits<char> > *result, std::ostreambuf_iterator<char,std::char_traits<char> > _Dest, std::ios_base *_Iosbase, char _Fill, __int64 _Val); // idb
std::ostreambuf_iterator<char,std::char_traits<char> > *__thiscall std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::do_put(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, std::ostreambuf_iterator<char,std::char_traits<char> > *result, std::ostreambuf_iterator<char,std::char_traits<char> > _Dest, std::ios_base *_Iosbase, char _Fill, unsigned __int64 _Val); // idb
std::ostreambuf_iterator<char,std::char_traits<char> > *__thiscall std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::do_put(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, std::ostreambuf_iterator<char,std::char_traits<char> > *result, std::ostreambuf_iterator<char,std::char_traits<char> > _Dest, std::ios_base *_Iosbase, char _Fill, const void *_Val); // idb
std::ostreambuf_iterator<char,std::char_traits<char> > *__cdecl std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Fput(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, std::ostreambuf_iterator<char,std::char_traits<char> > *result, std::ostreambuf_iterator<char,std::char_traits<char> > _Dest, std::ios_base *_Iosbase, char _Fill, const char *_Buf, unsigned int _Beforepoint, unsigned int _Afterpoint, unsigned int _Trailing, unsigned int _Count); // idb
std::ostreambuf_iterator<char,std::char_traits<char> > *__thiscall std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::do_put(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, std::ostreambuf_iterator<char,std::char_traits<char> > *result, std::ostreambuf_iterator<char,std::char_traits<char> > _Dest, std::ios_base *_Iosbase, char _Fill, bool _Val); // idb
std::ostreambuf_iterator<char,std::char_traits<char> > *__thiscall std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::do_put(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, std::ostreambuf_iterator<char,std::char_traits<char> > *result, std::ostreambuf_iterator<char,std::char_traits<char> > _Dest, std::ios_base *_Iosbase, char _Fill, long double _Val); // idb
std::ostreambuf_iterator<char,std::char_traits<char> > *__thiscall std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::do_put(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, std::ostreambuf_iterator<char,std::char_traits<char> > *result, std::ostreambuf_iterator<char,std::char_traits<char> > _Dest, std::ios_base *_Iosbase, char _Fill, long double _Val); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::numpunct<char>::do_grouping(std::numpunct<char> *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::numpunct<char>::do_falsename(std::numpunct<char> *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::numpunct<char>::do_truename(std::numpunct<char> *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::str(std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char> > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result); // idb
MonsterCardInventoryWin *__thiscall MonsterCardInventoryWin::`vector deleting destructor'(MonsterCardInventoryWin *this, unsigned int a2);
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char> > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result); // idb
__int64 __cdecl Bank::GetMoney(); // idb
void __cdecl Bank::SetMoney(__int64 i64Money); // idb
unsigned __int8 __cdecl Bank::GetMaxPage();
unsigned int __cdecl Bank::GetInvIdxLotIsNotMax(Item *pkItem); // idb
void __cdecl Bank::RemoveExtraInv(); // idb
void __cdecl Bank::Clear(char byTargetPage); // idb
char __cdecl Bank::IsEmpty(unsigned int uiIndex);
Item *__cdecl Bank::Get(unsigned int uiIndex); // idb
void __cdecl Bank::Add(Item *pkItem, unsigned int uiIndex); // idb
bool __cdecl Bank::IsPageDataExist(char byTargetPage); // idb
char __cdecl Bank::SetContents(PROTO_NC_MENU_OPENSTORAGE_CMD *pkProto);
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > _Where); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > _Last); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,NiPointer<Item> *>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> >::_Node *_Node, bool _Leftish); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,NiPointer<Item> *>>,0>>::find(std::_Tree<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > > *result, const char *_Keyval); // idb
std::_Tree_nod<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,NiPointer<Item> *>>,0>>::_Buynode<std::pair<unsigned char const,NiPointer<Item> *>>(std::_Tree_val<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > *this, std::pair<unsigned char const ,NiPointer<Item> *> *_Val); // idb
bool __stdcall ICharDeadEvent::MatchProcessingHandle(unsigned __int16 hTarget);
void __thiscall CharDeadEvent_DropItem::OnDead(CharDeadEvent_DropItem *this); // idb
bool __thiscall CharDeadEvent_DropItem::MatchProcessingHandle(CharDeadEvent_DropItem *this, unsigned __int16 hTarget); // idb
char __thiscall ICharDeadEvent::Update(ICharDeadEvent *this);
void __cdecl ICharDeadEvent::TerminateAll(); // idb
void __thiscall ICharDeadEvent::ICharDeadEvent(ICharDeadEvent *this, PgFrameWork *pkFrameWork); // idb
void __cdecl ICharDeadEvent::UpdateAll(); // idb
void __thiscall CharDeadEvent_LevelUp::CharDeadEvent_LevelUp(CharDeadEvent_LevelUp *this, PgFrameWork *pkFrameWork, PROTO_NC_BAT_LEVELUP_CMD *rkProto); // idb
void __thiscall CharDeadEvent_LevelUp::OnDead(CharDeadEvent_LevelUp *this); // idb
void __thiscall CharDeadEvent_DropItem::CharDeadEvent_DropItem(CharDeadEvent_DropItem *this, PgFrameWork *pkFrameWork, PROTO_NC_BRIEFINFO_DROPEDITEM_CMD *rkProto); // idb
void __thiscall CharDeadEvent_ExpGain::CharDeadEvent_ExpGain(CharDeadEvent_ExpGain *this, PgFrameWork *pkFrameWork, PROTO_NC_BAT_EXPGAIN_CMD *rkProto); // idb
void __thiscall CharDeadEvent_ExpGain::OnDead(CharDeadEvent_ExpGain *this); // idb
void __thiscall CharDeadEvent_SomeoneLevelUp::CharDeadEvent_SomeoneLevelUp(CharDeadEvent_SomeoneLevelUp *this, PgFrameWork *pkFrameWork, PROTO_NC_BAT_SUMEONELEVELUP_CMD *rkProto); // idb
void __thiscall CharDeadEvent_SomeoneLevelUp::OnDead(CharDeadEvent_SomeoneLevelUp *this); // idb
void __thiscall CharDeadEvent_InformWhoKilledMe::OnDead(CharDeadEvent_InformWhoKilledMe *this); // idb
bool __cdecl ICharDeadEvent::CheckEventExistOnQueue(DeadEventType eEventType, int hTarget, bool bDelete);
void __thiscall CharDeadEvent_InformWhoKilledMe::CharDeadEvent_InformWhoKilledMe(CharDeadEvent_InformWhoKilledMe *this, PgFrameWork *pkFrameWork, unsigned __int16 myHandle, unsigned __int16 attacker); // idb
void __thiscall NiTListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *>::~NiTListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *>(NiTListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *> *this); // idb
NiTListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *> *__thiscall NiTListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *>::`scalar deleting destructor'(NiTListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *> *this, unsigned int a2);
NiTPointerListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *> *__thiscall NiTList<ICharDeadEvent *>::`scalar deleting destructor'(NiTPointerListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *> *this, unsigned int a2);
void GuildTournamentStorage::GuildTournamentStorage();
signed int __cdecl GuildTournamentStorage::GetInvIdxLotIsNotMax();
__int64 __cdecl GuildTournamentStorage::GetMoney(); // idb
void __cdecl GuildTournamentStorage::SetMoney(__int64 i64Money); // idb
unsigned __int64 __cdecl GuildTournamentStorage::GetToken(); // idb
void __cdecl GuildTournamentStorage::Clear(); // idb
bool __cdecl GuildTournamentStorage::IsEmpty(unsigned int uiIndex); // idb
Item *__cdecl GuildTournamentStorage::Get(unsigned int uiIndex); // idb
void __cdecl GuildTournamentStorage::Add(Item *pkItem, unsigned int uiIndex); // idb
void __cdecl GuildTournamentStorage::Remove(unsigned int uiIndex); // idb
signed int __cdecl GuildTournamentStorage::GetEmpty();
char __cdecl GuildTournamentStorage::SetContents(PROTO_NC_GUILD_STORAGEOPEN_ACK *pkProto);
void __thiscall MagicField::OnEffectDestory(MagicField *this, Effect *pkEffect); // idb
void __cdecl MagicField::DeleteMagicField(unsigned __int16 handle); // idb
void __thiscall MagicField::~MagicField(MagicField *this); // idb
void __thiscall MagicField::MagicField(MagicField *this, PROTO_NC_BRIEFINFO_MAGICFIELDSPREAD_CMD *rkProto); // idb
void __cdecl MagicField::AddMagicField(PROTO_NC_BRIEFINFO_MAGICFIELDSPREAD_CMD *rkProto, NiPoint3 *kDir, bool bSetDir); // idb
void __thiscall NiTListBase<DFALL<MagicField *>,MagicField *>::~NiTListBase<DFALL<MagicField *>,MagicField *>(NiTListBase<DFALL<MagicField *>,MagicField *> *this); // idb
NiTListBase<DFALL<MagicField *>,MagicField *> *__thiscall NiTListBase<DFALL<MagicField *>,MagicField *>::`scalar deleting destructor'(NiTListBase<DFALL<MagicField *>,MagicField *> *this, unsigned int a2);
void __thiscall NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>::~NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>(NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *> *this); // idb
NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *> *__thiscall NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>::`vector deleting destructor'(NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *> *this, unsigned int a2);
NiTMapItem<char const *,NiD3DGlobalConstantEntry *> *NiTPointerListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>::NewItem();
NiTPointerListBase<DFALL<MagicField *>,MagicField *> *__thiscall NiTPointerListBase<DFALL<MagicField *>,MagicField *>::`vector deleting destructor'(NiTPointerListBase<DFALL<MagicField *>,MagicField *> *this, unsigned int a2);
void __thiscall IEffectDestroyMessenger::~IEffectDestroyMessenger(IEffectDestroyMessenger *this); // idb
NiTList<IEffectDestroyMessenger *> *__thiscall NiTPointerListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>::`vector deleting destructor'(NiTList<IEffectDestroyMessenger *> *this, unsigned int a2);
MagicField *__thiscall MagicField::`vector deleting destructor'(MagicField *this, unsigned int a2);
void __thiscall MapNavigator::MapNavigator(MapNavigator *this); // idb
void __thiscall MapNavigator::~MapNavigator(MapNavigator *this); // idb
void __cdecl MapNavigator::Create(); // idb
void __cdecl MapNavigator::Terminate(); // idb
char __thiscall MapNavigator::Init(MapNavigator *this);
void __thiscall MapNavigator::Arrive(MapNavigator *this, NiPoint3 *kPos); // idb
bool __thiscall MapNavigator::FindPathAway(MapNavigator *this, NiPoint3 *kCurPos, NiPoint3 *kDest, char *pMapName, char *pDestMap, unsigned __int16 kMobID); // idb
void __thiscall MapNavigator::OnIdle(MapNavigator *this, float fTime); // idb
NiRTTI *NiObject::GetRTTI();
unsigned int __cdecl MapWayPointTab::GetTotal(); // idb
unsigned int __cdecl MapLinkPointTab::GetTotal(); // idb
MapNavigator *__thiscall MapNavigator::`scalar deleting destructor'(MapNavigator *this, unsigned int a2);
void __cdecl Market::Clear(); // idb
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetEnchantItem(unsigned int uiIndex); // idb
unsigned int __cdecl Market::GetTotalEnchantItem(); // idb
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetWeapontitleItem(unsigned int uiIndex); // idb
unsigned int __cdecl Market::GetTotalWeapontitleItem(); // idb
unsigned int __cdecl Market::GetTotalWeapon(); // idb
unsigned int __cdecl Market::GetTotalArmor(); // idb
unsigned int __cdecl Market::GetTotalAcc(); // idb
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetWeaopn(unsigned int uiIndex); // idb
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetArmor(unsigned int uiIndex); // idb
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetAcc(unsigned int uiIndex); // idb
unsigned int __cdecl Market::GetTotalRepurchase(); // idb
ItemRepurchase *__cdecl Market::GetRepurchase(unsigned int uiIndex); // idb
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetFigActSkill(unsigned int uiIndex); // idb
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetCleActSkill(unsigned int uiIndex); // idb
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetArcActSkill(unsigned int uiIndex); // idb
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetMagActSkill(unsigned int uiIndex); // idb
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetFigPasSkill(unsigned int uiIndex); // idb
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetClePasSkill(unsigned int uiIndex); // idb
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetArcPasSkill(unsigned int uiIndex); // idb
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetMagPasSkill(unsigned int uiIndex); // idb
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetJokActSkill(unsigned int uiIndex); // idb
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetJokPasSkill(unsigned int uiIndex); // idb
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetSenActSkill(unsigned int uiIndex); // idb
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetSenPasSkill(unsigned int uiIndex); // idb
void __cdecl Market::SetWeapon(PROTO_NC_MENU_SHOPOPEN_CMD *pkProto); // idb
void __cdecl Market::SetSkill(PROTO_NC_MENU_SHOPOPEN_CMD *pkProto); // idb
void __cdecl Market::SetRepurchaseItem(PROTO_NC_ITEM_SELL_ITEM_LIST_CMD *pkItemData);
void __cdecl Market::DeleteRepurchase(unsigned int uiIndex); // idb
ItemRepurchase *__cdecl Market::AddRepurchase(PROTO_NC_ITEM_SELL_ITEM_INSERT_CMD *pkRepurItem); // idb
unsigned int __cdecl Market::FindRepurchase(unsigned __int16 nHandle); // idb
void __cdecl Market::SetSoulStone(PROTO_NC_MENU_SHOPOPENSOULSTONE_CMD *pkProto); // idb
PROTO_NC_MENU_SHOPOPENSOULSTONE_CMD::SOULSTONEMENU *__cdecl Market::GetHPSoulStoneInfo(); // idb
PROTO_NC_MENU_SHOPOPENSOULSTONE_CMD::SOULSTONEMENU *__cdecl Market::GetSPSoulStoneInfo(); // idb
unsigned int __cdecl Market::GetTotalFigPassiveSkill(); // idb
unsigned int __cdecl Market::GetTotalClePassiveSkill(); // idb
unsigned int __cdecl Market::GetTotalArcPassiveSkill(); // idb
unsigned int __cdecl Market::GetTotalMagPassiveSkill(); // idb
unsigned int __cdecl Market::GetTotalFigActiveSkill(); // idb
unsigned int __cdecl Market::GetTotalCleActiveSkill(); // idb
unsigned int __cdecl Market::GetTotalArcActiveSkill(); // idb
unsigned int __cdecl Market::GetTotalMagActiveSkill(); // idb
unsigned int __cdecl Market::GetTotalJokPassiveSkill(); // idb
unsigned int __cdecl Market::GetTotalJokActiveSkill(); // idb
unsigned int __cdecl Market::GetTotalSenPassiveSkill(); // idb
unsigned int __cdecl Market::GetTotalSenActiveSkill(); // idb
unsigned int __cdecl Market::GetTotalProdSkill(); // idb
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetProdSkill(unsigned int uiIndex); // idb
int (__thiscall ***__cdecl ItemMarket::GetItemSellInfoList())(void *p, char);
void __cdecl Market::SetWeapon(PROTO_NC_MENU_SHOPOPENTABLE_CMD *pkProto); // idb
void __cdecl Market::SetItemEnchant(PROTO_NC_MENU_SHOPOPENTABLE_CMD *pkProto); // idb
char __cdecl Market::Add(int kItemID);
void __cdecl ItemMarket::Clear(); // idb
void __cdecl ItemMarket::SetItem(PROTO_NC_MENU_SHOPOPENTABLE_CMD *pkProto); // idb
void __cdecl Market::SetSkill(PROTO_NC_MENU_SHOPOPENTABLE_CMD *pkProto); // idb
void __thiscall NiTListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>::~NiTListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>(NiTListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *> *this); // idb
NiTListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *> *__thiscall NiTListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>::`scalar deleting destructor'(NiTListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *> *this, unsigned int a2);
NiTList<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *> *__thiscall NiTList<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>::`scalar deleting destructor'(NiTList<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *> *this, unsigned int a2);
char __thiscall SpStream::PushInt(SpStream *this, int iValue);
char __thiscall SpStream::PushShort(SpStream *this, __int16 sValue);
char __thiscall SpStream::PushByte(SpStream *this, char byValue);
int __thiscall SpStream::PopInt(SpStream *this); // idb
int __thiscall SpStream::PopShort(SpStream *this);
char __thiscall SpStream::PopByte(SpStream *this); // idb
char __thiscall SpStream::PushMem(SpStream *this, void *pbyMem, unsigned int uiSize);
char __thiscall SpStream::PopMem(SpStream *this, void *pbyMem, unsigned int uiSize);
void __thiscall OptionManager::Clear(OptionManager *this); // idb
char __thiscall OptionManager::LoadOption(OptionManager *this, SpStream *rkStream);
void __thiscall OptionManager::SaveOption(OptionManager *this, SpStream *rkStream); // idb
void __thiscall OptionManager::Register(OptionManager *this, IOptionBase *pkOptionBase); // idb
signed int __thiscall ShortCut::CopyTypeToMemory(ShortCut *this, char *pucBuff);
signed int __cdecl ShortCut::LoadTypeToMemory(char *pucBuff, unsigned int *uiType);
char __thiscall ShortCutInvPosItem::LoadFromPacket(ShortCutInvPosItem *this, SHORT_CUT_DATA *pkData);
signed int __thiscall ShortCutSkill::CopyToMemory(ShortCutSkill *this, char *pucBuff);
char __thiscall ShortCutSkill::LoadFromPacket(ShortCutSkill *this, SHORT_CUT_DATA *pkData);
signed int __thiscall ShortCutSkill::LoadFromMemory(ShortCutSkill *this, char *pucBuff);
char __thiscall ShortCutSkill::ConfirmInstance(ShortCutSkill *this);
signed int __thiscall ShortCutAction::CopyToMemory(ShortCutAction *this, char *pucBuff);
signed int __thiscall ShortCutAction::LoadFromMemory(ShortCutAction *this, char *pucBuff);
char __thiscall ShortCutItem::LoadFromPacket(ShortCutItem *this, SHORT_CUT_DATA *pkData);
Item *__thiscall ShortCutItem::CopyToMemory(ShortCutItem *this, char *pucBuff);
signed int __thiscall ShortCutItem::LoadFromMemory(ShortCutItem *this, char *pucBuff);
void __thiscall ShortCutItem::SetItem(ShortCutItem *this, Item *pkItem); // idb
void __thiscall ShortCutInvPosItem::ShortCutInvPosItem(ShortCutInvPosItem *this); // idb
void __thiscall ShortCutInvPosItem::~ShortCutInvPosItem(ShortCutInvPosItem *this); // idb
void __thiscall ShortCutSkill::ShortCutSkill(ShortCutSkill *this); // idb
void __thiscall ShortCutSkill::~ShortCutSkill(ShortCutSkill *this); // idb
void __thiscall ShortCutAction::ShortCutAction(ShortCutAction *this); // idb
void __thiscall ShortCutAction::~ShortCutAction(ShortCutAction *this); // idb
void __thiscall ShortCutSoulStone::ShortCutSoulStone(ShortCutSoulStone *this); // idb
void __thiscall ShortCutSoulStone::~ShortCutSoulStone(ShortCutSoulStone *this); // idb
signed int __thiscall ShortCutAction::GetActionType(ShortCutAction *this);
void __thiscall ShortCutItem::ShortCutItem(ShortCutItem *this); // idb
void __thiscall ShortCutItem::~ShortCutItem(ShortCutItem *this); // idb
signed int __thiscall ShortCutInvPosItem::CopyToMemory(ShortCutInvPosItem *this, char *pucBuff);
signed int __thiscall ShortCutInvPosItem::LoadFromMemory(ShortCutInvPosItem *this, char *pucBuff);
char __thiscall ShortCutAction::LoadFromPacket(ShortCutAction *this, SHORT_CUT_DATA *pkData);
void __thiscall NiRefObject::~NiRefObject(CPostProcessEffect *this); // idb
unsigned int __cdecl ActionViewTable::GetActionNum(ActionViewInfo *pkInfo); // idb
ShortCutInvPosItem *__thiscall ActorTextKeyMatch::`scalar deleting destructor'(ShortCutInvPosItem *this, unsigned int a2);
ShortCutItem *__thiscall ShortCutItem::`scalar deleting destructor'(ShortCutItem *this, unsigned int a2);
char ShortCutMgr::Init();
char ShortCutMgr::LoadFromNet();
char __stdcall ShortCutMgr::LoadOption(SpStream *rkStream);
void __stdcall ShortCutMgr::CreateShortCut(ShortCut::Type eType);
bool __thiscall ShortCutMgr::ShortCutChanged(ShortCutMgr *this); // idb
void __thiscall ShortCutMgr::SetShortCutChanged(ShortCutMgr *this, bool b); // idb
bool __thiscall ShortCutMgr::ShortCutSizeChanged(ShortCutMgr *this); // idb
void __thiscall ShortCutMgr::SetShortCutSizeChanged(ShortCutMgr *this, bool b); // idb
bool ShortCutMgr::SendOptToChange();
void __thiscall ShortCutMgr::SetInvPosItem(ShortCutMgr *this, unsigned __int16 uiExchangePos, unsigned __int16 uiLocationPos, bool bOnlyLocation); // idb
char __thiscall ShortCutMgr::SyncShortCutAndActionWinKey(ShortCutMgr *this, int nViewTableIndex, int nWinIndex);
void __thiscall ShortCutMgr::Clear(ShortCutMgr *this); // idb
void __thiscall ShortCutMgr::CheckContents(ShortCutMgr *this); // idb
void __thiscall ShortCutMgr::Terminate(ShortCutMgr *this); // idb
void __thiscall ShortCutMgr::~ShortCutMgr(ShortCutMgr *this); // idb
void __thiscall ShortCutMgr::ShortCutMgr(ShortCutMgr *this); // idb
void __thiscall ShortCutMgr::Update(ShortCutMgr *this, float fCurTime); // idb
void __thiscall ShortCutMgr::ChangeIndex(ShortCutMgr *this, int Index); // idb
bool __thiscall ShortCutMgr::InitShortCutFromInventory(ShortCutMgr *this); // idb
char __thiscall ShortCutMgr::LoadFromPacket(ShortCutMgr *this, SHORT_CUT_DATA *pkData);
unsigned int *__cdecl UserTrade::GetMyInvIndex(unsigned int uiIndex);
void __cdecl UserTrade::LockOpp(bool b); // idb
void __cdecl UserTrade::LockMy(bool b); // idb
bool __cdecl UserTrade::GetLockOpp(); // idb
bool __cdecl UserTrade::GetLockMy(); // idb
void __cdecl UserTrade::AgreeOpp(bool b); // idb
bool __cdecl UserTrade::GetAgreeOpp(); // idb
bool __cdecl UserTrade::IsProposing(); // idb
void __cdecl UserTrade::SetProposing(bool bPropose); // idb
bool __cdecl UserTrade::IsTrading(); // idb
void __cdecl UserTrade::SetTrading(bool bTrading); // idb
void __cdecl UserTrade::Clear(); // idb
Item *__cdecl UserTrade::GetOpp(unsigned int uiIndex); // idb
Item *__cdecl UserTrade::GetMy(unsigned int uiIndex); // idb
void __cdecl UserTrade::AddOpp(Item *pkItem, unsigned int uiIndex); // idb
void __cdecl UserTrade::AddMy(Item *pkItem, unsigned int uiIndex, unsigned int uiInventoryIndex); // idb
void __cdecl UserTrade::RemoveOpp(unsigned int uiIndex); // idb
unsigned int *__cdecl UserTrade::RemoveMy(unsigned int uiIndex);
signed int __cdecl UserTrade::GetEmptyMy();
int __thiscall CWayPoint::Init(CWayPoint *this, int nDotCnt, int nMapCnt, int nMaxCanUseGateCnt); // idb
int __thiscall CWayPoint::ErrorCheck(CWayPoint *this); // idb
int __thiscall CWayPoint::Get_LastError(CWayPoint *this); // idb
void __thiscall CMinWeightSort::CMinWeightSort(CMinWeightSort *this); // idb
void __thiscall CMinWeightSort::~CMinWeightSort(CMinWeightSort *this); // idb
int __thiscall CMinWeightSort::Del_SameWeightDot(CMinWeightSort *this, MAP_DOT *pDot); // idb
int __thiscall CMinWeightSort::Add_WeightDot(CMinWeightSort *this, MAP_DOT *pDot, int nFromDotNo, int nFromDotWeight, int nLinkWeight, int nSearchNo); // idb
int __thiscall CMinWeightSort::Get_MinWeightDot(CMinWeightSort *this, MAP_DOT **pDot); // idb
void __thiscall CMinWeightPath::CMinWeightPath(CMinWeightPath *this); // idb
void __thiscall CMinWeightPath::~CMinWeightPath(CMinWeightPath *this); // idb
int __thiscall CMinWeightPath::Init(CMinWeightPath *this); // idb
WeightPath *__thiscall CMinWeightPath::Add_PathDot(CMinWeightPath *this, MAP_DOT *pDot);
int __thiscall CMinWeightPath::Get_PathDot(CMinWeightPath *this, MAP_DOT **pDot); // idb
void __thiscall CWayPoint::CWayPoint(CWayPoint *this); // idb
void __thiscall CWayPoint::~CWayPoint(CWayPoint *this); // idb
int __thiscall CWayPoint::Add_Map(CWayPoint *this, char *pMapName, int nMapID, WPMType nWPMType); // idb
int __thiscall CWayPoint::Get_IsValid_Dot(CWayPoint *this, int nDotNo); // idb
int __thiscall CWayPoint::Get_IsValid_MapName(CWayPoint *this, char *pMapName); // idb
int __thiscall CWayPoint::Get_IsValid_MapID(CWayPoint *this, int nMapID); // idb
int __thiscall CWayPoint::Get_Dot(CWayPoint *this, int nDotNo, MAP_DOT **pDot); // idb
int __thiscall CWayPoint::Get_MapName(CWayPoint *this, int nMapID, char *pMapName); // idb
int __thiscall CWayPoint::Get_MapID(CWayPoint *this, char *pMapName, int *pMapID); // idb
int __thiscall CWayPoint::Get_MapType(CWayPoint *this, int nMapID, WPMType *pWPMType); // idb
int __thiscall CWayPoint::Get_MapType(CWayPoint *this, char *pMapName, WPMType *pWPMType); // idb
int __thiscall CWayPoint::Make_BFS_DotList(CWayPoint *this, int nStartDot, int nEndDot); // idb
int __thiscall CWayPoint::Add_Dot(CWayPoint *this, int nMapID, int X, int Y, DOT_TYPE DotType); // idb
int __thiscall CWayPoint::Add_Link(CWayPoint *this, int nLinkDot_1, int nLinkDot_2, LINK_TYPE LinkType, int nWeight); // idb
int __thiscall CWayPoint::Get_BFS_NextDot(CWayPoint *this, int nStartDot, int nEndDot, MAP_DOT **pNextDot); // idb
int __thiscall CWayPoint::Add_Dot(CWayPoint *this, char *pMapName, int X, int Y, DOT_TYPE DotType); // idb
int __thiscall CWayPoint::Get_NearDot(CWayPoint *this, int nMapID, int X, int Y, MAP_DOT **pNearDot); // idb
int __thiscall CWayPoint::Get_NearDot(CWayPoint *this, char *pMapName, int X, int Y, MAP_DOT **pNearDot); // idb
void __cdecl CharScreenBoardBase::SetMaxDistance(float fMaxDistance); // idb
void __cdecl CharScreenBoardBase::SetTransNear(float fNear); // idb
void __cdecl CharScreenBoardBase::SetTransFar(float fFar); // idb
void __thiscall CharScreenBoardBase::SetNameBDMove(CharScreenBoardBase *this, bool b); // idb
unsigned __int16 __thiscall CharScreenBoardBase::GetCharHandle(CharScreenBoardBase *this); // idb
NiScreenElements *__thiscall CharScreenBoardUserChar::GetIconGeometry(CharScreenBoardUserChar *this);
void __thiscall CharScreenBoardUserChar::CreateNameIcon(CharScreenBoardUserChar *this, const char *pkFileName); // idb
signed int CharScreenBoardUserChar::GetNickNameColor();
signed int CharScreenBoardMiniHouse::GetNameColor();
void __thiscall CharScreenBoardBase::CharScreenBoardBase(CharScreenBoardBase *this); // idb
NiNode *__thiscall CharScreenBoardBase::GetGeometry(CharScreenBoardBase *this);
char __thiscall CharScreenBoardBase::UpDatePostion(CharScreenBoardBase *this, NiPoint3 *rPos, NiCamera *pkWorldCamera);
GUILD_EMBLEM_INFO *__thiscall CharScreenBoardUserChar::MakeEmblemInfo(CharScreenBoardUserChar *this); // idb
void __thiscall CharScreenBoardUserChar::SetAlpha(CharScreenBoardUserChar *this, float fAlpha); // idb
signed int __thiscall CharScreenBoardUserChar::GetGuildColor(CharScreenBoardUserChar *this);
void __thiscall CharScreenBoardUserChar::CreateEmblemIcon(CharScreenBoardUserChar *this, tagSIZE BoardSize, GUILD_EMBLEM_INFO *pEmblemInfo); // idb
void __thiscall CharScreenBoardDropItem::SetAlpha(CharScreenBoardDropItem *this, float fAlpha); // idb
void __thiscall CharScreenBoardMiniHouse::SetAlpha(CharScreenBoardMiniHouse *this, float fAlpha); // idb
bool __cdecl CharScreenBoardBase::IsInShowRange(NiPoint3 *kPos); // idb
void __thiscall CharScreenBoardBase::SetAlphaByDistance(CharScreenBoardBase *this, NiPoint3 *rPos); // idb
// void __userpurge CharScreenBoardUserChar::Update(CharScreenBoardUserChar *this@<ecx>, int a2@<ebx>, float fTime, NiCamera *pkWorldCamera, PgWinCamera *pkScreenCamera);
// char __usercall CharScreenBoardUserChar::IsVisible@<al>(int a1@<ebx>, unsigned __int16 kHandle);
void __thiscall CharScreenBoardDropItem::Update(CharScreenBoardDropItem *this, float fTime, NiCamera *pkWorldCamera, PgWinCamera *pkScreenCamera); // idb
DropItem *__thiscall CharScreenBoardDropItem::GetNameColor(CharScreenBoardDropItem *this);
bool __cdecl CharScreenBoardDropItem::IsVisible(unsigned __int16 kHandle); // idb
void __thiscall CharScreenBoardBase::~CharScreenBoardBase(CharScreenBoardBase *this); // idb
void __thiscall CharScreenBoardUserChar::~CharScreenBoardUserChar(CharScreenBoardUserChar *this); // idb
// char __usercall CharScreenBoardUserChar::IsAlive@<al>(CharScreenBoardUserChar *this@<ecx>, int a2@<ebx>);
void __thiscall CharScreenBoardDropItem::~CharScreenBoardDropItem(CharScreenBoardDropItem *this); // idb
bool __thiscall CharScreenBoardDropItem::IsAlive(CharScreenBoardDropItem *this); // idb
void __thiscall CharScreenBoardMiniHouse::~CharScreenBoardMiniHouse(CharScreenBoardMiniHouse *this); // idb
signed int __thiscall CharScreenBoardUserChar::GetNameColor(CharScreenBoardUserChar *this);
bool __thiscall CharScreenBoardUserChar::ColorCheckChange(CharScreenBoardUserChar *this); // idb
void __thiscall CharScreenBoardMiniHouse::Update(CharScreenBoardMiniHouse *this, float fTime, NiCamera *pkWorldCamera, PgWinCamera *pkScreenCamera); // idb
bool __cdecl CharScreenBoardMiniHouse::IsVisible(unsigned __int16 kHandle); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall CharScreenBoardUserChar::MakeGuildName(CharScreenBoardUserChar *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result); // idb
// std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__userpurge CharScreenBoardUserChar::MakeCharName@<eax>(CharScreenBoardUserChar *this@<ecx>, int a2@<edi>, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result);
char __thiscall CharScreenBoardDropItem::Init(CharScreenBoardDropItem *this, unsigned __int16 kHandle, ScreenBoardTexture *pBoardData);
char __thiscall CharScreenBoardMiniHouse::Init(CharScreenBoardMiniHouse *this, unsigned __int16 kHandle, ScreenBoardTexture *pBoardData);
bool __thiscall CharScreenBoardMiniHouse::IsAlive(CharScreenBoardMiniHouse *this); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall CharScreenBoardUserChar::MakeCharTitle(CharScreenBoardUserChar *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result); // idb
char __thiscall CharScreenBoardUserChar::CheckNameChange(CharScreenBoardUserChar *this);
char __thiscall CharScreenBoardUserChar::Init(CharScreenBoardUserChar *this, unsigned __int16 kHandle, ScreenBoardTexture *pBoardTexture);
double __thiscall World::GetDistanceToCamera(World *this, NiPoint3 *kPos);
CharScreenBoardUserChar *__thiscall CharScreenBoardUserChar::`vector deleting destructor'(CharScreenBoardUserChar *this, unsigned int a2);
void __thiscall std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>(std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *this); // idb
CharScreenBoardDropItem *__thiscall CharScreenBoardDropItem::`scalar deleting destructor'(CharScreenBoardDropItem *this, unsigned int a2);
CharScreenBoardMiniHouse *__thiscall CharScreenBoardMiniHouse::`vector deleting destructor'(CharScreenBoardMiniHouse *this, unsigned int a2);
CharScreenBoardBase *__thiscall CharScreenBoardBase::`scalar deleting destructor'(CharScreenBoardBase *this, unsigned int a2);
void __thiscall GuildBD::ReAlloc(GuildBD *this, unsigned int uiSize); // idb
bool __thiscall GuildBD::IsAlive(GuildBD *this, float fTime); // idb
void __thiscall GuildBD::EndDraw(GuildBD *this); // idb
// void __usercall GuildBD::DrawTextA(GuildBD *this@<ecx>, void **a2@<edi>);
void __thiscall GuildBD::SetChar(GuildBD *this, unsigned __int16 kHandle); // idb
void __thiscall GuildBD::SetGuildBDMove(GuildBD *this, bool b); // idb
// void __usercall CalculateStrlenInWidth(char *pcText@<eax>, unsigned int *dwStrLen@<ebx>, unsigned int *dwWidth@<esi>, HDC__ *hDC, unsigned int dwMaxWidth);
bool __thiscall GuildBD::BeginDraw(GuildBD *this); // idb
void __thiscall GuildBD::CalculateLine(GuildBD *this); // idb
void __thiscall GuildBD::CopyTexture(GuildBD *this); // idb
bool __cdecl GuildBD::IsInShowRange(NiPoint3 *kPos); // idb
void __thiscall GuildBD::~GuildBD(GuildBD *this); // idb
void __thiscall GuildBD::SetSpeech(GuildBD *this, char *pcSpeech, GuildBD::EnemyStatus eEnemyStatus); // idb
void __thiscall GuildBD::Update(GuildBD *this, float fTime, NiCamera *pkWorldCamera, PgWinCamera *pkScreenCamera); // idb
void __thiscall GuildBD::CreateGeometry(GuildBD *this, NiTexture *pkTexture, int iTexturePosIndex); // idb
void __thiscall GuildBD::GuildBD(GuildBD *this, NiTexture *pkTexture, int iTexturePosIndex); // idb
void __thiscall GuildBD::SetAlpha(GuildBD *this, float fAlpha); // idb
GuildBD *__thiscall GuildBD::`vector deleting destructor'(GuildBD *this, unsigned int a2);
void __thiscall IConBD::Create(IConBD *this, const char *pkFileName); // idb
NiScreenElements *__thiscall IConBD::GetGeometry(IConBD *this); // idb
void __thiscall IConBD::IConBD(IConBD *this); // idb
void __thiscall IConBD::~IConBD(IConBD *this); // idb
void __thiscall IConBD::Update(IConBD *this, NiPoint3 WorldPos, float ftime); // idb
IConBD *__thiscall IConBD::`scalar deleting destructor'(IConBD *this, unsigned int a2);
bool __thiscall NameBD::IsAlive(NameBD *this, float fTime); // idb
void __thiscall NameBD::EndDraw(NameBD *this); // idb
void __thiscall NameBD::SetNameBDMove(NameBD *this, bool b); // idb
// void __usercall CalculateStrlenInWidth_0(char *pcText@<eax>, unsigned int *dwStrLen@<ebx>, unsigned int *dwWidth@<esi>, HDC__ *hDC, unsigned int dwMaxWidth);
void __thiscall NameBD::~NameBD(NameBD *this); // idb
bool __thiscall NameBD::BeginDraw(NameBD *this); // idb
void __thiscall NameBD::CalculateLine(NameBD *this); // idb
// void __usercall NameBD::DrawTextA(NameBD *this@<ecx>, void **a2@<esi>);
void __thiscall NameBD::CopyTexture(NameBD *this); // idb
bool __cdecl NameBD::IsInShowRange(NiPoint3 *kPos); // idb
void __thiscall NameBD::SetSpeech(NameBD *this, char *pcSpeech); // idb
void __thiscall NameBD::SetDropItem(NameBD *this, unsigned __int16 kHandle); // idb
void __thiscall NameBD::UpdateDropItem(NameBD *this, float fTime, NiCamera *pkWorldCamera, PgWinCamera *pkScreenCamera); // idb
void __thiscall NameBD::CreateGeometry(NameBD *this, NiTexture *pkTexture, int iTexturePosIndex); // idb
void __thiscall NameBD::NameBD(NameBD *this, NiTexture *pkTexture, int iTexturePosIndex); // idb
void __thiscall NameBD::Update(NameBD *this, float fTime, NiCamera *pkWorldCamera, PgWinCamera *pkScreenCamera); // idb
void __thiscall NameBD::SetChar(NameBD *this, unsigned __int16 kHandle); // idb
void __thiscall NameBD::UpdateMiniHause(NameBD *this, float fTime, NiCamera *pkWorldCamera, PgWinCamera *pkScreenCamera); // idb
NameBD *__thiscall NameBD::`scalar deleting destructor'(NameBD *this, unsigned int a2);
// void __usercall DrawVLine(unsigned int uiPitch@<esi>, unsigned int uiY1@<edx>, unsigned int uiY2@<eax>, unsigned int uiColor@<edi>, unsigned int *puiDest, unsigned int uiX);
// void __usercall FillSpr(unsigned int uiPitch@<eax>, unsigned int uiSrcWidth@<ebx>, unsigned int uiSrcHeight@<edx>, unsigned int *puiDest, unsigned int uiX, unsigned int uiY, char *pbySrc, unsigned int uiSolidColor, unsigned int uiTransColor);
bool __thiscall PrivateStoreBD::IsAlive(PrivateStoreBD *this, float fTime); // idb
void __thiscall PrivateStoreBD::EndDraw(PrivateStoreBD *this); // idb
// void __usercall DrawHLine(unsigned int uiPitch@<ecx>, unsigned int uiX1@<edx>, unsigned int uiX2@<eax>, unsigned int *puiDest, unsigned int uiY, unsigned int uiColor);
// void __usercall CalculateStrlenInWidth_1(char *pcText@<eax>, unsigned int *dwStrLen@<ebx>, unsigned int *dwWidth@<esi>, HDC__ *hDC, unsigned int dwMaxWidth);
bool __thiscall PrivateStoreBD::BeginDraw(PrivateStoreBD *this); // idb
// void __usercall PrivateStoreBD::CalculateLine(PrivateStoreBD *this@<ecx>, void **a2@<ebx>);
void __thiscall PrivateStoreBD::DrawFrame(PrivateStoreBD *this); // idb
// void __usercall PrivateStoreBD::DrawTextA(PrivateStoreBD *this@<ecx>, void **a2@<edi>);
void __thiscall PrivateStoreBD::CopyTexture(PrivateStoreBD *this); // idb
void __thiscall PrivateStoreBD::~PrivateStoreBD(PrivateStoreBD *this); // idb
// void __userpurge PrivateStoreBD::SetSpeech(PrivateStoreBD *this@<ecx>, void **a2@<edi>, char *pcSpeech);
void __thiscall PrivateStoreBD::Update(PrivateStoreBD *this, float fTime, NiCamera *pkWorldCamera, PgWinCamera *pkScreenCamera); // idb
void __thiscall PrivateStoreBD::CreateGeometry(PrivateStoreBD *this, NiTexture *pkTexture, int iTexturePosIndex); // idb
void __thiscall PrivateStoreBD::PrivateStoreBD(PrivateStoreBD *this, NiTexture *pkTexture, int iTexturePosIndex); // idb
PrivateStoreBD *__thiscall PrivateStoreBD::`vector deleting destructor'(PrivateStoreBD *this, unsigned int a2);
ScreenBoardTexture *__thiscall ScreenBDMgr::GetScreenNameData(ScreenBDMgr *this); // idb
void __thiscall ScreenBDMgr::Draw(ScreenBDMgr *this); // idb
CharScreenBoardBase *__thiscall ScreenBDMgr::GetCharBD(ScreenBDMgr *this, unsigned __int16 kHandle); // idb
CharScreenBoardBase *__thiscall ScreenBDMgr::GetMostFarCharBD(ScreenBDMgr *this, NiPoint3 *kPos); // idb
char __thiscall ScreenBDMgr::RemoveCharBD(ScreenBDMgr *this, CharScreenBoardBase *pkCharBD);
void __thiscall ScreenBDMgr::RemoveAllCharBD(ScreenBDMgr *this); // idb
void __thiscall ScreenBDMgr::TerminateCharBD(ScreenBDMgr *this); // idb
void __thiscall ScreenBDMgr::Terminate(ScreenBDMgr *this); // idb
void __thiscall ScreenBDMgr::Clear(ScreenBDMgr *this); // idb
char __thiscall ScreenBDMgr::InitCharBD(ScreenBDMgr *this, bool Is3DNamePanelEnable);
void __thiscall ScreenBDMgr::AddCharBD(ScreenBDMgr *this, int kHandle, NiPoint3 *rPos, ScreenBDMgr::NameBoardType nb_type);
bool __thiscall ScreenBDMgr::Init(ScreenBDMgr *this); // idb
void __thiscall ScreenBDMgr::UpdateCharBD(ScreenBDMgr *this, float fTime, NiCamera *pkWorldCamera); // idb
void __thiscall ScreenBDMgr::Update(ScreenBDMgr *this, float fTime, NiCamera *pkWorldCamera); // idb
void __thiscall ScreenBDMgr::~ScreenBDMgr(ScreenBDMgr *this); // idb
void __thiscall ScreenBDMgr::ScreenBDMgr(ScreenBDMgr *this); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::~NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>(NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *> *this); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>::~NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>(NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *> *this); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::~NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>(NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *> *this); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::~NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>(NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *> *this); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::~NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>(NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *> *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *> *this, unsigned int a2);
NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *> *this, unsigned int a2);
NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *> *this, unsigned int a2);
NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *> *this, unsigned int a2);
NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *> *this, unsigned int a2);
void __thiscall NiTPointerList<SpeechBD *>::~NiTPointerList<SpeechBD *>(NiTPointerList<SpeechBD *> *this); // idb
void __thiscall NiTPointerList<NameBD *>::~NiTPointerList<NameBD *>(NiTPointerList<NameBD *> *this); // idb
void __thiscall NiTPointerList<CharScreenBoardBase *>::~NiTPointerList<CharScreenBoardBase *>(NiTPointerList<CharScreenBoardBase *> *this); // idb
void __thiscall NiTPointerList<PrivateStoreBD *>::~NiTPointerList<PrivateStoreBD *>(NiTPointerList<PrivateStoreBD *> *this); // idb
void __thiscall NiTPointerList<GuildBD *>::~NiTPointerList<GuildBD *>(NiTPointerList<GuildBD *> *this); // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,SpeechBD *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,SpeechBD *> *this, unsigned int a2);
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NameBD *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NameBD *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NameBD *> *this, unsigned int a2);
NiTPointerListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *> *this, unsigned int a2);
NiTPointerListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *> *this, unsigned int a2);
NiTPointerListBase<NiTPointerAllocator<unsigned int>,GuildBD *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,GuildBD *> *this, unsigned int a2);
void __thiscall CharScreenBoardUserChar::CharScreenBoardUserChar(CharScreenBoardUserChar *this); // idb
void __thiscall CharScreenBoardDropItem::CharScreenBoardDropItem(CharScreenBoardDropItem *this); // idb
void __thiscall CharScreenBoardMiniHouse::CharScreenBoardMiniHouse(CharScreenBoardMiniHouse *this); // idb
void __thiscall PgTList<SpeechBD *>::~PgTList<SpeechBD *>(PgTList<SpeechBD *> *this); // idb
void __thiscall PgTList<NameBD *>::~PgTList<NameBD *>(PgTList<NameBD *> *this); // idb
void __thiscall PgTList<CharScreenBoardBase *>::~PgTList<CharScreenBoardBase *>(PgTList<CharScreenBoardBase *> *this); // idb
void __thiscall PgTList<PrivateStoreBD *>::~PgTList<PrivateStoreBD *>(PgTList<PrivateStoreBD *> *this); // idb
void __thiscall PgTList<GuildBD *>::~PgTList<GuildBD *>(PgTList<GuildBD *> *this); // idb
PgTList<SpeechBD *> *__thiscall PgTList<SpeechBD *>::`scalar deleting destructor'(PgTList<SpeechBD *> *this, unsigned int a2);
PgTList<NameBD *> *__thiscall PgTList<NameBD *>::`scalar deleting destructor'(PgTList<NameBD *> *this, unsigned int a2);
PgTList<CharScreenBoardBase *> *__thiscall PgTList<CharScreenBoardBase *>::`scalar deleting destructor'(PgTList<CharScreenBoardBase *> *this, unsigned int a2);
PgTList<PrivateStoreBD *> *__thiscall PgTList<PrivateStoreBD *>::`scalar deleting destructor'(PgTList<PrivateStoreBD *> *this, unsigned int a2);
PgTList<GuildBD *> *__thiscall PgTList<GuildBD *>::`scalar deleting destructor'(PgTList<GuildBD *> *this, unsigned int a2);
void __cdecl std::_Destroy_range<std::allocator<NiPointer<PgSprData>>>(NiPointer<PgSprData> *_First, NiPointer<PgSprData> *_Last);
void __thiscall ScreenBoardTexture::~ScreenBoardTexture(ScreenBoardTexture *this); // idb
ScreenBoardGeometry::BoardInfo *__thiscall ScreenBoardGeometry::GetInfo(ScreenBoardGeometry *this); // idb
void __thiscall ScreenBoardGeometry::Update(ScreenBoardGeometry *this, float fTime); // idb
NiScreenElementsData *__thiscall ScreenBoardGeometry::CreateScreenGeometryData(ScreenBoardGeometry *this, NiPoint2 RenderSize, NiPoint2 TextureStartPos); // idb
NiScreenElements *__thiscall ScreenBoardGeometry::GetGeometry(ScreenBoardGeometry *this); // idb
void __thiscall ScreenBoardGeometry::SetAlpha(ScreenBoardGeometry *this, float fAlpha); // idb
void __thiscall ScreenBoardGeometry::~ScreenBoardGeometry(ScreenBoardGeometry *this); // idb
void __thiscall ScreenBoardGeometry::ScreenBoardGeometry(ScreenBoardGeometry *this, ScreenBoardTexture *pBoardData); // idb
void __thiscall ScreenBoardGeometry::SetBoardInfo(ScreenBoardGeometry *this, ScreenBoardGeometry::BoardInfo *info); // idb
ScreenBoardGeometry *__thiscall ScreenBoardGeometry::`vector deleting destructor'(ScreenBoardGeometry *this, unsigned int a2);
int __thiscall ScreenBDMgr::GetNotUsedGuildBDTextureIndex(ScreenBDMgr *this); // idb
GuildBD *__thiscall ScreenBDMgr::GetGuildBD(ScreenBDMgr *this, unsigned __int16 kHandle); // idb
GuildBD *__thiscall ScreenBDMgr::GetMostFarGuildBD(ScreenBDMgr *this, NiPoint3 *kPos); // idb
bool __thiscall ScreenBDMgr::InitGuildBD(ScreenBDMgr *this); // idb
void __thiscall ScreenBDMgr::RemoveGuildBD(ScreenBDMgr *this, GuildBD *pkGuildBD); // idb
// void __usercall ScreenBDMgr::RemoveAllGuildBD(ScreenBDMgr *this@<ecx>, signed int a2@<esi>);
void __thiscall ScreenBDMgr::ClearGuildBD(ScreenBDMgr *this); // idb
void __thiscall ScreenBDMgr::AddGuildBD(ScreenBDMgr *this, unsigned __int16 kHandle); // idb
void __thiscall ScreenBDMgr::UpdateGuildBD(ScreenBDMgr *this, float fTime, NiCamera *pkWorldCamera); // idb
// void __usercall ScreenBDMgr::TerminateGuildBD(ScreenBDMgr *this@<ecx>, signed int a2@<esi>);
char ScreenBDMgr::InitMainCharHPBar();
void __thiscall ScreenBDMgr::TerminateMainCharHPBar(ScreenBDMgr *this); // idb
void __thiscall ScreenBDMgr::ClearMainCharHPBar(ScreenBDMgr *this); // idb
void __thiscall ScreenBDMgr::UpdateMainCharHPBar(ScreenBDMgr *this, float fTime, NiCamera *pkWorldCamera); // idb
int __thiscall ScreenBDMgr::GetNotUsedPrivateStoreBDTextureIndex(ScreenBDMgr *this); // idb
void __thiscall ScreenBDMgr::MarkAsUsePrivateStoreBD(ScreenBDMgr *this, int iTextureIndex); // idb
void __thiscall ScreenBDMgr::MarkAsUnusePrivateStoreBD(ScreenBDMgr *this, int iTextureIndex); // idb
PrivateStoreBD *__thiscall ScreenBDMgr::GetPrivateStoreBD(ScreenBDMgr *this, unsigned __int16 kHandle); // idb
NiTListItem<PrivateStoreBD *> *__thiscall ScreenBDMgr::GetMostOldPrivateStoreBD(ScreenBDMgr *this);
char __thiscall ScreenBDMgr::InitPrivateStoreBD(ScreenBDMgr *this);
void __thiscall ScreenBDMgr::AddPrivateStoreBD(ScreenBDMgr *this, unsigned __int16 kHandle); // idb
// void __userpurge ScreenBDMgr::RemovePrivateStoreBD(ScreenBDMgr *this@<ecx>, int a2@<edi>, PrivateStoreBD *pkPrivateStoreBD);
// void __usercall ScreenBDMgr::RemoveAllPrivateStoreBD(ScreenBDMgr *this@<ecx>, signed int a2@<edi>);
void __thiscall ScreenBDMgr::UpdatePrivateStoreBD(ScreenBDMgr *this, float fTime, NiCamera *pkWorldCamera); // idb
void __thiscall ScreenBDMgr::ClearPrivateStoreBD(ScreenBDMgr *this); // idb
void __thiscall ScreenBDMgr::TerminatePrivateStoreBD(ScreenBDMgr *this); // idb
char __thiscall ScreenBDMgr::InitSpeechBD(ScreenBDMgr *this);
void __thiscall ScreenBDMgr::EndSpeechBD(ScreenBDMgr *this, unsigned __int16 kHandle); // idb
void __thiscall ScreenBDMgr::AddSpeechBD(ScreenBDMgr *this, unsigned __int16 kHandle, char *pcSpeech); // idb
void __thiscall ScreenBDMgr::AddSpeechBD(ScreenBDMgr *this, unsigned __int16 kHandle, char *pcSpeech, float fLifeTime); // idb
void __thiscall ScreenBDMgr::AddSpeechBD(ScreenBDMgr *this, unsigned __int16 kHandle, char *pcSpeech, char kColorID, char kOutLineColorID); // idb
void __thiscall ScreenBDMgr::RemoveSpeechBD(ScreenBDMgr *this, SpeechBD *pkSpeechBD); // idb
// void __usercall ScreenBDMgr::RemoveAllSpeechBD(ScreenBDMgr *this@<ecx>, signed int a2@<esi>);
void __thiscall ScreenBDMgr::UpdateSpeechBD(ScreenBDMgr *this, float fTime, NiCamera *pkWorldCamera); // idb
void __thiscall ScreenBDMgr::ClearSpeechBD(ScreenBDMgr *this); // idb
// void __usercall ScreenBDMgr::TerminateSpeechBD(ScreenBDMgr *this@<ecx>, signed int a2@<esi>);
void __thiscall ScreenBoardTexture::EndDraw(ScreenBoardTexture *this); // idb
// void __usercall ScreenBoardTexture::DrawTextA(ScreenBoardTexture *this@<ecx>, int a2@<ebx>, const char *a3@<edi>);
int __thiscall ScreenBoardTexture::GetMaxSize(ScreenBoardTexture *this, int a2);
int __thiscall ScreenBoardTexture::GetSpaceSize(ScreenBoardTexture *this, int a2);
int __thiscall ScreenBoardTexture::GetDescSize(ScreenBoardTexture *this, int a2);
int __thiscall ScreenBoardTexture::DescInfo::GetIndex(ScreenBoardTexture::DescInfo *this); // idb
std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned long> *__thiscall ScreenBoardTexture::DescInfo::GetIndexKey(ScreenBoardTexture::DescInfo *this); // idb
int __thiscall FrameScreenBoardTexture::GetDescSize(FrameScreenBoardTexture *this, int a2);
// void __usercall FrameScreenBoardTexture::DrawTextA(FrameScreenBoardTexture *this@<ecx>, int a2@<ebx>);
char __thiscall ScreenBoardTexture::CalculateStrSize(ScreenBoardTexture *this, const char *pcText, unsigned int *dwStrLen, tagSIZE *tSize);
char __thiscall ScreenBoardTexture::BeginDraw(ScreenBoardTexture *this, NiTexture *pDescTexture);
NiSourceTexture *__thiscall ScreenBoardTexture::DescInfo::GetTexture(ScreenBoardTexture::DescInfo *this);
NiPoint2 *__thiscall ScreenBoardTexture::DescInfo::GetRenderStartPos(ScreenBoardTexture::DescInfo *this, NiPoint2 *result); // idb
const char *__thiscall ScreenBoardTexture::GetTextRenderSize(ScreenBoardTexture *this, const char *pkText, const char *pkTexta);
bool __thiscall ScreenBoardTexture::IsReleaseBuffer(ScreenBoardTexture *this); // idb
void __thiscall ScreenBoardTexture::DescInfo::~DescInfo(ScreenBoardTexture::DescInfo *this); // idb
void __thiscall ScreenBoardTexture::DescInfo::DescInfo(ScreenBoardTexture::DescInfo *this, ScreenBoardTexture *pScreenData, NiPointer<NiSourceTexture> spTexture, int nIndex); // idb
NiPointer<ScreenBoardTexture::DescInfo> *__thiscall ScreenBoardTexture::TextOutA(ScreenBoardTexture *this, NiPointer<ScreenBoardTexture::DescInfo> *result, const char *pkText, unsigned int kColorRef); // idb
void __thiscall ScreenBoardTexture::ScreenBoardTexture(ScreenBoardTexture *this); // idb
void __thiscall ScreenBoardTexture::Clear(ScreenBoardTexture *this); // idb
void __thiscall FrameScreenBoardTexture::~FrameScreenBoardTexture(FrameScreenBoardTexture *this); // idb
bool __thiscall ScreenBoardTexture::Init(ScreenBoardTexture *this, tagSIZE MaxSize, Font::Type fonttype, int nBufferCount); // idb
void __thiscall ScreenBoardTexture::Terminate(ScreenBoardTexture *this); // idb
void __thiscall FrameScreenBoardTexture::FrameScreenBoardTexture(FrameScreenBoardTexture *this); // idb
void __cdecl std::swap<NiPointer<ScreenBoardTexture::DescInfo>>(NiPointer<ScreenBoardTexture::DescInfo> *_Left, NiPointer<ScreenBoardTexture::DescInfo> *_Right); // idb
NiPointer<NiAVObject> *__cdecl std::_Move<NiPointer<NiAVObject> *,NiPointer<NiAVObject> *>(NiPointer<NiAVObject> *_First, NiPointer<NiAVObject> *_Last, NiPointer<NiAVObject> *_Dest);
ScreenBoardTexture::DescInfo *__thiscall ScreenBoardTexture::DescInfo::`scalar deleting destructor'(ScreenBoardTexture::DescInfo *this, unsigned int a2);
// void __usercall DrawVLine_0(unsigned int uiPitch@<esi>, unsigned int uiY1@<edx>, unsigned int uiY2@<eax>, unsigned int uiColor@<edi>, unsigned int *puiDest, unsigned int uiX);
// void __usercall FillSpr_0(unsigned int uiPitch@<eax>, unsigned int uiSrcWidth@<ebx>, unsigned int uiSrcHeight@<edx>, unsigned int *puiDest, unsigned int uiX, unsigned int uiY, char *pbySrc, unsigned int uiSolidColor, unsigned int uiTransColor);
bool __thiscall SpeechBD::IsAlive(SpeechBD *this, float fTime); // idb
void __thiscall SpeechBD::EndDraw(SpeechBD *this); // idb
// void __usercall SpeechBD::DrawTextA(SpeechBD *this@<ecx>, void **a2@<edi>);
// void __usercall DrawHLine_0(unsigned int uiPitch@<ecx>, unsigned int uiX1@<edx>, unsigned int uiX2@<eax>, unsigned int *puiDest, unsigned int uiY, unsigned int uiColor);
// void __usercall CalculateStrlenInWidth_2(char *pcText@<eax>, unsigned int *dwStrLen@<ebx>, unsigned int *dwWidth@<esi>, HDC__ *hDC, unsigned int dwMaxWidth);
bool __thiscall SpeechBD::BeginDraw(SpeechBD *this); // idb
void __thiscall SpeechBD::CalculateLine(SpeechBD *this); // idb
void __thiscall SpeechBD::DrawFrame(SpeechBD *this); // idb
void __thiscall SpeechBD::CopyTexture(SpeechBD *this); // idb
void __thiscall SpeechBD::~SpeechBD(SpeechBD *this); // idb
// void __userpurge SpeechBD::Update(SpeechBD *this@<ecx>, int a2@<ebx>, float fTime, NiCamera *pkWorldCamera, PgWinCamera *pkScreenCamera);
// void __userpurge SpeechBD::SetSpeech(SpeechBD *this@<ecx>, void **a2@<edi>, char *pcSpeech);
void __thiscall SpeechBD::SetOutLineColorID(SpeechBD *this, char kColorID); // idb
void __thiscall SpeechBD::SetTextColorID(SpeechBD *this, char kColorID); // idb
void __thiscall SpeechBD::CreateGeometry(SpeechBD *this, NiTexture *pkTexture, int iTexturePosIndex); // idb
void __thiscall SpeechBD::SpeechBD(SpeechBD *this, NiTexture *pkTexture, int iTexturePosIndex); // idb
SpeechBD *__thiscall SpeechBD::`vector deleting destructor'(SpeechBD *this, unsigned int a2);
void __thiscall GMCommandWin::GMCommandWin(GMCommandWin *this); // idb
void __thiscall GMCommandWin::~GMCommandWin(GMCommandWin *this); // idb
char __thiscall GMCommandWin::Create(GMCommandWin *this, PgFrameWork *pkFrameWork);
GMCommandWin *__cdecl GMCommandWin::CreateWin(PgFrameWork *pkFrameWork); // idb
GMCommandWin *__thiscall GMCommandWin::`scalar deleting destructor'(GMCommandWin *this, unsigned int a2);
void __thiscall GMPrisonWin::GMPrisonWin(GMPrisonWin *this); // idb
void __thiscall GMPrisonWin::~GMPrisonWin(GMPrisonWin *this); // idb
void __thiscall GMPrisonWin::OnCmdCancel(GMPrisonWin *this); // idb
void __thiscall GMPrisonWin::SetCharName(GMPrisonWin *this, const char *name); // idb
char __thiscall GMPrisonWin::Create(GMPrisonWin *this, PgFrameWork *pkFrameWork);
void __thiscall GMPrisonWin::SendGMReq(GMPrisonWin *this, bool bAdd); // idb
void __thiscall GMPrisonWin::OnModif(GMPrisonWin *this); // idb
void __thiscall GMPrisonWin::OnCmdOk(GMPrisonWin *this); // idb
void __thiscall GMPrisonWin::OnCommand(GMPrisonWin *this, unsigned int wParam, int lParam); // idb
GMPrisonWin *__cdecl GMPrisonWin::CreateWin(PgFrameWork *pkFrameWork); // idb
GMPrisonWin *__thiscall GMPrisonWin::`scalar deleting destructor'(GMPrisonWin *this, unsigned int a2);
char __thiscall LinkFrameWork::InitWindow(LinkFrameWork *this, unsigned __int16 mapid);
void __thiscall LinkFrameWork::TerminateWindow(LinkFrameWork *this); // idb
bool __thiscall LinkFrameWork::InitNet(LinkFrameWork *this); // idb
void __thiscall LinkFrameWork::TerminateNet(LinkFrameWork *this); // idb
char __thiscall LinkFrameWork::InitKeyMap(LinkFrameWork *this);
void __thiscall LinkFrameWork::TerminateKeyMap(LinkFrameWork *this); // idb
char __thiscall LinkFrameWork::Init(LinkFrameWork *this, PgMsg::Frame *ptFrameMsg);
void __thiscall LinkFrameWork::Terminate(LinkFrameWork *this); // idb
void __thiscall LinkFrameWork::OnErrorMsgClose(LinkFrameWork *this); // idb
void __thiscall LinkFrameWork::OnMapLoginFailMsgClose(LinkFrameWork *this); // idb
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_BASE_CMD(int iRevBytes, void *pvData);
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_SHAPE_CMD(int iRevBytes, void *pvData);
int __stdcall LinkFrameWork::On_NC_CHAR_OPTION_SET_SHORTCUTDATA_CMD(int iRevBytes, void *pvData);
int __stdcall LinkFrameWork::On_NC_CHAR_OPTION_SET_SHORTCUTSIZE_CMD(int iRevBytes, void *pvData);
int __stdcall LinkFrameWork::On_NC_CHAR_OPTION_DB_SET_WINDOWPOS_CMD(int iRevBytes, void *pvData);
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_QUEST_DOING_CMD(int iRevBytes, void *pvData);
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_QUEST_DONE_CMD(int iRevBytes, void *pvData);
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_QUEST_READ_CMD(int iRevBytes, void *pvData);
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_QUEST_REPEAT_CMD(int iRevBytes, void *pvData);
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_ABSTATE_CMD(int iRevBytes, void *pvData);
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_SKILL_CMD(int iRevBytes, void *pvData);
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_PASSIVE_CMD(int iRevBytes, void *pvData);
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_ITEM_CMD(int iRevBytes, void *pvData);
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_GAME_CMD(int iRevBytes, void *pvData);
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_CHARTITLE_CMD(int iRevBytes, void *pvData);
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_CHARGEDBUFF_CMD(int iRevBytes, void *pvData);
int __stdcall LinkFrameWork::On_MISC_RESTMINUTE_CMD(int iRevBytes, void *pvData);
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_COININFO_CMD(int iRevBytes, void *pvData);
void LinkFrameWork::Draw();
void __thiscall LinkFrameWork::ProcessInput(LinkFrameWork *this); // idb
void __thiscall LinkFrameWork::OnInitAtSameServer(LinkFrameWork *this); // idb
void __thiscall LinkFrameWork::NcMiscSeedReq(LinkFrameWork *this); // idb
void __thiscall LinkFrameWork::NcMapLoginCompleteCmd(LinkFrameWork *this); // idb
void __thiscall LinkFrameWork::~LinkFrameWork(LinkFrameWork *this); // idb
void __thiscall LinkFrameWork::Update(LinkFrameWork *this, float fCurTime); // idb
void __stdcall LinkFrameWork::SendConnectError(int nFailCount, int nType, Name4 *rLinkBeforeAddress);
void __thiscall LinkFrameWork::OnTryConnectToZone(LinkFrameWork *this); // idb
void __thiscall LinkFrameWork::OnInitAtOtherServer(LinkFrameWork *this); // idb
int __thiscall LinkFrameWork::On_NC_MAP_LOGINFAIL_ACK(LinkFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall LinkFrameWork::On_NC_MAP_LOGIN_ACK(LinkFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall LinkFrameWork::LinkFrameWork(LinkFrameWork *this); // idb
void __thiscall LinkFrameWork::ProcessMsg(LinkFrameWork *this, unsigned int uiMsg, unsigned int uiwParam, unsigned int uilParam); // idb
void __thiscall LinkFrameWork::NcMapLoginReq(LinkFrameWork *this); // idb
int __thiscall LinkFrameWork::On_NC_MISC_SEED_ACK(LinkFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall LinkFrameWork::ProcessNetMsg(LinkFrameWork *this, int iDepart, int iCommand, int iRevBytes, void *pvData); // idb
NiRTTI *LinkFrameWork::GetRTTI();
const char *LinkFrameWork::GetFrameWorkName();
LinkFrameWork *__thiscall LinkFrameWork::`scalar deleting destructor'(LinkFrameWork *this, unsigned int a2);
char __thiscall LoadingFrameWork::InitWindow(LoadingFrameWork *this);
void __thiscall LoadingFrameWork::TerminateWindow(LoadingFrameWork *this); // idb
char __thiscall LoadingFrameWork::InitKeyMap(LoadingFrameWork *this);
void __thiscall LoadingFrameWork::TerminateKeyMap(LoadingFrameWork *this); // idb
char __thiscall LoadingFrameWork::Init(LoadingFrameWork *this, PgMsg::Frame *ptFrameMsg);
void __thiscall LoadingFrameWork::Terminate(LoadingFrameWork *this); // idb
void LoadingFrameWork::OnStartLoad();
void LoadingFrameWork::Draw();
void __thiscall LoadingFrameWork::ProcessInput(LoadingFrameWork *this); // idb
void __stdcall LoadingFrameWork::ProcessMsg(unsigned int uiMsg, unsigned int uiwParam, unsigned int uilParam);
void __thiscall LoadingFrameWork::LoadingFrameWork(LoadingFrameWork *this); // idb
void __thiscall LoadingFrameWork::~LoadingFrameWork(LoadingFrameWork *this); // idb
void __thiscall LoadingFrameWork::Update(LoadingFrameWork *this, float fCurTime); // idb
NiRTTI *LoadingFrameWork::GetRTTI();
const char *LoadingFrameWork::GetFrameWorkName();
LoadingFrameWork *__thiscall LoadingFrameWork::`scalar deleting destructor'(LoadingFrameWork *this, unsigned int a2);
void __thiscall ITimer::ITimer(ITimer *this); // idb
void __thiscall FrameWorkTimer::OnTimer(FrameWorkTimer *this); // idb
void __cdecl ITimer::ClearTimer(); // idb
void __thiscall ITimer::~ITimer(ITimer *this); // idb
void __thiscall ITimer::SetTimer(ITimer *this, float fTime); // idb
void __cdecl ITimer::Update(float fTime); // idb
void __thiscall FrameWorkTimer::FrameWorkTimer(FrameWorkTimer *this, float fTime, unsigned int dwCommand, PgFrameWork *pkFrameWork); // idb
void __thiscall NiTListBase<DFALL<ITimer *>,ITimer *>::~NiTListBase<DFALL<ITimer *>,ITimer *>(NiTListBase<DFALL<ITimer *>,ITimer *> *this); // idb
NiTListBase<DFALL<ITimer *>,ITimer *> *__thiscall NiTListBase<DFALL<ITimer *>,ITimer *>::`scalar deleting destructor'(NiTListBase<DFALL<ITimer *>,ITimer *> *this, unsigned int a2);
NiTList<ITimer *> *__thiscall NiTPointerListBase<DFALL<ITimer *>,ITimer *>::`vector deleting destructor'(NiTList<ITimer *> *this, unsigned int a2);
FrameWorkTimer *__thiscall FrameWorkTimer::`scalar deleting destructor'(FrameWorkTimer *this, unsigned int a2);
void __thiscall CHairShopFrameWork::OnErrorGotoAccount(CHairShopFrameWork *this); // idb
void __thiscall CHairShopFrameWork::ChangeAvatarHair(CHairShopFrameWork *this, char byTargetHairType); // idb
void __thiscall CHairShopFrameWork::ChangeAvatarHairColor(CHairShopFrameWork *this, char byTargetColor); // idb
void CHairShopFrameWork::OnErrorGotoExit();
void __thiscall CHairShopFrameWork::Draw(CHairShopFrameWork *this); // idb
void __thiscall CHairShopFrameWork::SetDefaultLooks(CHairShopFrameWork *this); // idb
void __thiscall CHairShopFrameWork::Exit(CHairShopFrameWork *this); // idb
void __thiscall CHairShopFrameWork::ApplyTerrain(CHairShopFrameWork *this, NiNode *pkGroundNode); // idb
void __thiscall CHairShopFrameWork::RenderShadow(CHairShopFrameWork *this); // idb
void __thiscall CHairShopFrameWork::TurnRight(CHairShopFrameWork *this); // idb
void __thiscall CHairShopFrameWork::TurnLeft(CHairShopFrameWork *this); // idb
void __thiscall CHairShopFrameWork::ChangeAvatarFace(CHairShopFrameWork *this, char byTargetFaceType); // idb
void __thiscall CHairShopFrameWork::Update(CHairShopFrameWork *this, float fCurTime); // idb
char __thiscall CHairShopFrameWork::FindItemGrade(CHairShopFrameWork *this, bool *bChanged); // idb
void __thiscall CHairShopFrameWork::ChangeApply(CHairShopFrameWork *this); // idb
void __thiscall CHairShopFrameWork::ProcessMsg(CHairShopFrameWork *this, unsigned int uiMsg, unsigned int uiwParam, unsigned int uilParam); // idb
void __thiscall CHairShopFrameWork::ChangeAvatarGender(CHairShopFrameWork *this, bool bIsMale); // idb
void __thiscall std::vector<unsigned long,std::allocator<unsigned long>>::clear(std::vector<BasicInfoFind *,std::allocator<BasicInfoFind *> > *this); // idb
char __thiscall CHairShopFrameWork::InitWindow(CHairShopFrameWork *this);
void __thiscall CHairShopFrameWork::ClearItemInfo(CHairShopFrameWork *this); // idb
void __thiscall CHairShopFrameWork::TerminateWindow(CHairShopFrameWork *this); // idb
void __thiscall CHairShopFrameWork::TerminateBackgroundScene(CHairShopFrameWork *this); // idb
char __thiscall CHairShopFrameWork::InitAvatar(CHairShopFrameWork *this);
void __thiscall CHairShopFrameWork::TerminateAvatar(CHairShopFrameWork *this); // idb
char __thiscall CHairShopFrameWork::InitNet(CHairShopFrameWork *this);
void __thiscall CHairShopFrameWork::TerminateNet(CHairShopFrameWork *this); // idb
char __thiscall CHairShopFrameWork::InitShadow(CHairShopFrameWork *this);
void __thiscall CHairShopFrameWork::CHairShopFrameWork(CHairShopFrameWork *this); // idb
void __thiscall CHairShopFrameWork::~CHairShopFrameWork(CHairShopFrameWork *this); // idb
char __thiscall CHairShopFrameWork::InitBackgroundScene(CHairShopFrameWork *this);
void __thiscall CHairShopFrameWork::ReleaseShadow(CHairShopFrameWork *this); // idb
char __thiscall CHairShopFrameWork::Init(CHairShopFrameWork *this, PgMsg::Frame *ptFrameMsg);
void __thiscall CHairShopFrameWork::Terminate(CHairShopFrameWork *this); // idb
NiRTTI *CHairShopFrameWork::GetRTTI();
const char *CHairShopFrameWork::GetFrameWorkName();
CHairShopFrameWork *__thiscall CHairShopFrameWork::`vector deleting destructor'(CHairShopFrameWork *this, unsigned int a2);
int __stdcall CHairShopFrameWork::On_NC_USER_CONNECTCUT_CMD(int iRevBytes, void *pvData);
int __thiscall CHairShopFrameWork::On_NC_CHAR_SET_STYLE_GET_INFO_ACK(CHairShopFrameWork *this, int iRevBytes, void *pvData); // idb
void __thiscall CHairShopFrameWork::NcCharSetStyleReq(CHairShopFrameWork *this); // idb
void __thiscall CHairShopFrameWork::NcCharSetStyleItemInfoReq(CHairShopFrameWork *this); // idb
int __thiscall CHairShopFrameWork::On_NC_USER_LOGINWORLD_ACK(CHairShopFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall CHairShopFrameWork::On_NC_CHAR_SET_STYLE_ACK(CHairShopFrameWork *this, int iRevBytes, void *pvData); // idb
int __thiscall CHairShopFrameWork::ProcessNetMsg(CHairShopFrameWork *this, int iDepart, int iCommand, int iRevBytes, void *pvData); // idb
void __thiscall CHairShopOkCancelWin::CHairShopOkCancelWin(CHairShopOkCancelWin *this); // idb
void __thiscall CHairShopOkCancelWin::~CHairShopOkCancelWin(CHairShopOkCancelWin *this); // idb
void __thiscall CHairShopOkCancelWin::UpdateMeWin(CHairShopOkCancelWin *this, float fCurTime); // idb
void __thiscall CHairShopOkCancelWin::OnCmdApply(CHairShopOkCancelWin *this); // idb
void __thiscall CHairShopOkCancelWin::OnCmdCancel(CHairShopOkCancelWin *this); // idb
void __thiscall CHairShopOkCancelWin::OnCmdSetDefault(CHairShopOkCancelWin *this); // idb
char __thiscall CHairShopOkCancelWin::Create(CHairShopOkCancelWin *this, PgFrameWork *pkFrameWork);
void __thiscall CHairShopOkCancelWin::OnCommand(CHairShopOkCancelWin *this, unsigned int wParam, int lParam); // idb
CHairShopOkCancelWin *__cdecl CHairShopOkCancelWin::CreateWin(PgFrameWork *pkFrameWork); // idb
CHairShopOkCancelWin *__thiscall CHairShopOkCancelWin::`vector deleting destructor'(CHairShopOkCancelWin *this, unsigned int a2);
void __thiscall CHairShopViewCtrlWin::CHairShopViewCtrlWin(CHairShopViewCtrlWin *this); // idb
void __thiscall CHairShopViewCtrlWin::~CHairShopViewCtrlWin(CHairShopViewCtrlWin *this); // idb
void __thiscall CHairShopViewCtrlWin::OnCmdTurnLeft(CHairShopViewCtrlWin *this); // idb
void __thiscall CHairShopViewCtrlWin::OnCmdTurnRight(CHairShopViewCtrlWin *this); // idb
void __thiscall CHairShopViewCtrlWin::OnCommand(CHairShopViewCtrlWin *this, unsigned int wParam, int lParam); // idb
char __thiscall CHairShopViewCtrlWin::Create(CHairShopViewCtrlWin *this, PgFrameWork *pkFrameWork);
CHairShopViewCtrlWin *__cdecl CHairShopViewCtrlWin::CreateWin(PgFrameWork *pkFrameWork); // idb
CHairShopViewCtrlWin *__thiscall CHairShopViewCtrlWin::`scalar deleting destructor'(CHairShopViewCtrlWin *this, unsigned int a2);
void __thiscall CColorIcon::CColorIcon(CColorIcon *this); // idb
void __thiscall CColorIcon::~CColorIcon(CColorIcon *this); // idb
bool __thiscall CColorIcon::Create(CColorIcon *this, int iXPos, int iYPos, PgWin *pkParent); // idb
void __thiscall CHairShopwin::ChangeState(CHairShopwin *this, char byDestState); // idb
void __thiscall CHairShopwin::OnSlideBar(CHairShopwin *this); // idb
void __thiscall CColorIcon::DoAction(CColorIcon *this); // idb
void __thiscall CHairShopwin::CHairShopwin(CHairShopwin *this); // idb
void __thiscall CHairShopwin::~CHairShopwin(CHairShopwin *this); // idb
void __thiscall CHairShopwin::UpdateGenderList(CHairShopwin *this); // idb
void __thiscall CColorIcon::SetColorIndex(CColorIcon *this, char byTableIndex); // idb
void __thiscall CColorIcon::OnFirstHitWin(CColorIcon *this); // idb
CColorIcon *__cdecl CColorIcon::CreateWin(int iXPos, int iYPos, PgWin *pkParent); // idb
CHairShopwin *__cdecl CHairShopwin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall CHairShopwin::UpdateFaceList(CHairShopwin *this, char byEndGrade, char byStartGrade); // idb
void __thiscall CHairShopwin::UpdateHairList(CHairShopwin *this, char byEndGrade, char byStartGrade); // idb
void __thiscall CHairShopwin::RefreshColorIcon(CHairShopwin *this, char byEndGrade, char byStartGrade); // idb
void __thiscall CHairShopwin::ActivateCheckBtn(CHairShopwin *this, char byIndex); // idb
void __thiscall CHairShopwin::ActivateCheckAddBtn(CHairShopwin *this, char byIndex); // idb
void __thiscall CHairShopwin::UpdateMeWin(CHairShopwin *this, float fCurTime); // idb
void __thiscall CHairShopwin::OnCommand(CHairShopwin *this, unsigned int wParam, int lParam); // idb
char __thiscall CHairShopwin::Create(CHairShopwin *this, PgFrameWork *pkFrameWork);
CColorIcon *__thiscall CColorIcon::`scalar deleting destructor'(CColorIcon *this, unsigned int a2);
CHairShopwin *__thiscall CHairShopwin::`scalar deleting destructor'(CHairShopwin *this, unsigned int a2);
void __cdecl FaceInfoTab::GetExactEquipableFace(char ucStartGrade, char ucEndGrade, void *padwResult); // idb
void __cdecl HairInfoTab::GetExactEquipableHairType(char kClassID, char ucGender, char ucStartGrade, char ucEndGrade, void *padwResult); // idb
void __cdecl HairColorInfoTab::GetExactEquipableHairColor(char ucStartGrade, char ucEndGrade, void *padwResult); // idb
signed int __cdecl ParseWeaponDemandMask(char *pcStr);
signed int __cdecl MapEquipWeaponToActionWeaponDemandMask(ItemInfo *pkEquipItemInfo);
void __thiscall ActionInfoSet::ActionInfoSet(ActionInfoSet *this, unsigned int uiInfoNum); // idb
void __thiscall ActionInfoSet::~ActionInfoSet(ActionInfoSet *this); // idb
ActionInfo *__thiscall ActionInfoSet::GetByEventCode(ActionInfoSet *this, unsigned int dwEventCode); // idb
ActionInfo *__thiscall ActionInfoSet::GetByInxName(ActionInfoSet *this, const char *pkInxName); // idb
ActionInfo *__thiscall ActionInfoSet::GetProperActionInfo(ActionInfoSet *this, char *acActionName, ItemInfo *pkEquipItemInfo, bool bNoWeaponCheck); // idb
char __thiscall ActionInfoSet::IsActionExist(ActionInfoSet *this, char *acActionName);
ActionInfo *__thiscall ActionInfoSet::GetByID(ActionInfoSet *this, unsigned __int16 ID); // idb
int __cdecl ActionInfoTable::GetEffPos(char *pcStr);
void __cdecl ActionInfoTable::ClearMobActionInfo(); // idb
void __cdecl ActionInfoTable::ClearCharActionInfo(); // idb
void __cdecl ActionInfoTable::ClearRidePetActionInfo(); // idb
void __cdecl ActionInfoTable::ClearMoverActionInfo(); // idb
void __cdecl ActionInfoTable::ClearPetActionInfo(); // idb
ActionInfoSet *__cdecl ActionInfoTable::GetCharActionInfo(char kClass, char ucGender); // idb
_iobuf *__cdecl ActionInfoTable::LoadData(char *pcFileName);
void __cdecl ActionInfoTable::Terminate(); // idb
char __cdecl ActionInfoTable::LoadChar();
ActionInfoSet *__cdecl ActionInfoTable::LoadRidePet(unsigned int kID); // idb
bool __cdecl ActionInfoTable::Init(); // idb
ActionInfoSet *__cdecl ActionInfoTable::GetRidePetActionInfo(unsigned int kID); // idb
ActionInfoSet *__cdecl ActionInfoTable::LoadMob(int kID);
ActionInfoSet *__cdecl ActionInfoTable::GetMobActionInfo(int kID);
NiVBSet *__cdecl ActionInfoTable::LoadMover(unsigned int kID);
NiVBSet *__cdecl ActionInfoTable::LoadPet(unsigned int kID);
ActionInfoSet *__cdecl ActionInfoTable::GetMoverActionInfo(unsigned int kID); // idb
ActionInfoSet *__cdecl ActionInfoTable::GetPetActionInfo(unsigned int kID); // idb
ActionInfoSet *__thiscall ActionInfoSet::`scalar deleting destructor'(ActionInfoSet *this, unsigned int a2);
void __thiscall NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *>::~NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *>(NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *> *this); // idb
NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *> *__thiscall NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *>::`scalar deleting destructor'(NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *> *this, unsigned int a2);
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<unsigned long,ActionInfoSet *>::`scalar deleting destructor'(NiTMap<unsigned long,ActionInfoSet *> *this, unsigned int a2);
void __thiscall ActorCallBack::~ActorCallBack(ActorCallBack *this); // idb
int __cdecl GenIdUnique(unsigned __int16 ID);
void __thiscall ActorCallBack::TextKeyEvent(ActorCallBack *this, NiActorManager *pkManager, unsigned int eSequenceID, const char *pcTextKey, NiTextKeyMatch *pkMatchObject, float fCurrentTime, float fEventTime); // idb
void __thiscall ActorTextKeyMatch::ActorTextKeyMatch(ActorTextKeyMatch *this, const char *pcMatchKey); // idb
void __thiscall ActorTextKeyMatch::~ActorTextKeyMatch(ActorTextKeyMatch *this); // idb
char __thiscall ActorTextKeyMatch::IsKeyMatch(ActorTextKeyMatch *this, const char *pcTextKey);
void __thiscall ActorCallBack::ActorCallBack(ActorCallBack *this); // idb
void __cdecl CopyTextKey(NiTextKey *pkDest, NiTextKey *pkSrc); // idb
void __cdecl AddTextKeys(NiControllerSequence *pkSeq, AddingTextKeys *pkAdding); // idb
void __thiscall NiTextKey::NiTextKey(NiTextKey *this); // idb
ActorCallBack *__thiscall ActorCallBack::`scalar deleting destructor'(ActorCallBack *this, unsigned int a2);
char __thiscall NiTextKeyMatch::IsKeyMatch(NiTextKeyMatch *this, const char *pcTextKey);
NiPoint3 *__thiscall Char::GetChestPos(Char *this, NiPoint3 *result); // idb
NiPoint3 *__thiscall Char::GetRightHandPos(Char *this, NiPoint3 *result); // idb
void __thiscall NiTListBase<DFALL<AttackSequence *>,AttackSequence *>::~NiTListBase<DFALL<AttackSequence *>,AttackSequence *>(NiTListBase<DFALL<AttackSequence *>,AttackSequence *> *this); // idb
void __thiscall NiTListBase<DFALL<SkillSequence *>,SkillSequence *>::~NiTListBase<DFALL<SkillSequence *>,SkillSequence *>(NiTListBase<DFALL<SkillSequence *>,SkillSequence *> *this); // idb
NiTListBase<DFALL<AttackSequence *>,AttackSequence *> *__thiscall NiTListBase<DFALL<AttackSequence *>,AttackSequence *>::`scalar deleting destructor'(NiTListBase<DFALL<AttackSequence *>,AttackSequence *> *this, unsigned int a2);
NiTListBase<DFALL<SkillSequence *>,SkillSequence *> *__thiscall NiTListBase<DFALL<SkillSequence *>,SkillSequence *>::`vector deleting destructor'(NiTListBase<DFALL<SkillSequence *>,SkillSequence *> *this, unsigned int a2);
bool __stdcall AttackSequenceManager::IsSeqFinished(NiControllerSequence *pkSequence);
void __thiscall AttackSequenceManager::StopAttack(AttackSequenceManager *this); // idb
unsigned int __thiscall AttackSequenceManager::GetAttSeqCount(AttackSequenceManager *this);
bool __thiscall AttackSequenceManager::IsDuringAttackInServer(AttackSequenceManager *this); // idb
BOOL __thiscall AttackSequenceManager::IsSkillSequenceEmpty(AttackSequenceManager *this);
DamageInfoSet *__thiscall AttackSequenceManager::GetSkillDmgInfoSetbyIndex(AttackSequenceManager *this, unsigned __int16 Index); // idb
DamageInfo *__thiscall DamageInfoSet::GetLastInvalidDmgInfo(DamageInfoSet *this); // idb
DamageInfoSet *__thiscall AttackSequenceManager::GetAttDmgInfoSetbySeqNum(AttackSequenceManager *this, __int16 SeqNum); // idb
AttackSequence *__thiscall AttackSequenceManager::GetAttSeqbySeqNum(AttackSequenceManager *this, __int16 SeqNum); // idb
AttackSequence *__thiscall AttackSequenceManager::GetInvalidSeq(AttackSequenceManager *this); // idb
SkillSequence *__thiscall AttackSequenceManager::FindSkillSequence(AttackSequenceManager *this, unsigned __int16 Index, unsigned __int16 kID); // idb
void __thiscall DamageInfoSet::AddDamage(DamageInfoSet *this, unsigned int uiDamage, unsigned __int16 kTarget, unsigned int dwHpChangeSeqNo, unsigned int kTargetRestHP, bool bViewDamage, bool bRange, __int16 DmgSeqNum); // idb
void __thiscall AttackSequenceManager::AddSkillSeq(AttackSequenceManager *this, SkillSequence *pkSeq); // idb
void __thiscall DamageInfo::Applicate(DamageInfo *this, Char *pkAttacker); // idb
void __thiscall AttackSequenceManager::AttackSequenceManager(AttackSequenceManager *this); // idb
char __thiscall DamageInfoSet::Applicate(DamageInfoSet *this, Char *pkAttacker, bool bAllApplicate);
void __thiscall SkillSequence::ApplicateImmediatelyDamageOnly(SkillSequence *this, Char *pkCaster, bool bAllApplicate); // idb
// char __userpurge SkillSequence::ApplicateImmediately@<al>(SkillSequence *this@<ecx>, int a2@<edi>, int a3@<esi>, Char *pkCaster, bool bAllApplicate);
bool __thiscall AttackSequenceManager::AddAttMultiDmg(AttackSequenceManager *this, __int16 SeqNum, __int16 DmgNum, unsigned int uiDamage, unsigned __int16 kTarget, unsigned int dwHpChangeSeqNo, unsigned int kTargetRestHP, bool bViewDamage); // idb
void __thiscall AttackSequenceManager::StartHeadSeq(AttackSequenceManager *this); // idb
void __thiscall AttackSequenceManager::ClearAttSeq(AttackSequenceManager *this); // idb
void __thiscall AttackSequenceManager::ClearSkillSeq(AttackSequenceManager *this); // idb
char __thiscall AttackSequenceManager::ApplicateSkillSeqImmediately(AttackSequenceManager *this, Char *pkCaster, bool bAllApplicate, bool bLastHitTime);
void __thiscall AttackSequenceManager::ApplicateAttackSeqImmediately(AttackSequenceManager *this, int bAllApplicate);
char __thiscall AttackSequenceManager::ApplicateLastSkillSeqImmediately(AttackSequenceManager *this, Char *pkCaster, bool bAllApplicate);
char __thiscall AttackSequenceManager::DeleteMissAttSeq(AttackSequenceManager *this);
void __thiscall AttackSequenceManager::DeleteSkillSequence(AttackSequenceManager *this, unsigned __int16 Index, unsigned __int16 kID); // idb
void __thiscall AttackSequenceManager::Update(AttackSequenceManager *this, float fTime); // idb
void __thiscall AttackSequenceManager::AddAttSeq(AttackSequenceManager *this, AttackSequence *pkSeq); // idb
void __thiscall AttackSequenceManager::SetDamageToLastAttSeq(AttackSequenceManager *this, DamageInfoSet *rkSet); // idb
void __thiscall AttackSequenceManager::~AttackSequenceManager(AttackSequenceManager *this); // idb
void __thiscall AttackSequenceManager::HardStopAttack(AttackSequenceManager *this); // idb
NiTList<AttackSequence *> *__thiscall NiTList<AttackSequence *>::`vector deleting destructor'(NiTList<AttackSequence *> *this, unsigned int a2);
char *__cdecl DmgSndTab::Get(unsigned int uiWType, unsigned int uiAType); // idb
void __thiscall NiTList<AttackSequence *>::~NiTList<AttackSequence *>(NiTList<AttackSequence *> *this); // idb
void __thiscall NiTList<SkillSequence *>::~NiTList<SkillSequence *>(NiTList<SkillSequence *> *this); // idb
NiTList<SkillSequence *> *__thiscall NiTPointerListBase<DFALL<SkillSequence *>,SkillSequence *>::`vector deleting destructor'(NiTList<SkillSequence *> *this, unsigned int a2);
NiKFMTool::Transition *__thiscall NiKFMTool::GetTransition(NiKFMTool *this, unsigned int uiSrcID, unsigned int uiDesID); // idb
void __thiscall DamageInfoSet::CopyFrom(DamageInfoSet *this, DamageInfoSet *rkSet); // idb
AttackSequenceManager *__thiscall AttackSequenceManager::`scalar deleting destructor'(AttackSequenceManager *this, unsigned int a2);
void __thiscall Avatar::~Avatar(Avatar *this); // idb
void __thiscall Avatar::AddCartoonLine(Avatar *this, NiNode *pkNode); // idb
void __thiscall Avatar::Avatar(Avatar *this); // idb
void __thiscall Avatar::Update(Avatar *this, float fTime); // idb
void __thiscall Avatar::EquipAll(Avatar *this); // idb
void __thiscall Avatar::UpdateLod(Avatar *this, float fTime); // idb
char __thiscall Avatar::ResetView(Avatar *this, PROTO_AVATAR_SHAPE_INFO *p, unsigned int uiFrame);
char __thiscall Avatar::ChangeClassShape(Avatar *this, PROTO_AVATAR_SHAPE_INFO *pkInfo, unsigned int uiFrame);
char __thiscall Avatar::ChangeGenderShape(Avatar *this, PROTO_AVATAR_SHAPE_INFO *pkInfo, unsigned int uiFrame);
char __thiscall Avatar::ChangeFaceTextureShape(Avatar *this, PROTO_AVATAR_SHAPE_INFO *pkInfo);
char __thiscall Avatar::ChangeHairTypeShape(Avatar *this, PROTO_AVATAR_SHAPE_INFO *pkInfo);
char __thiscall Avatar::ChangeHairColorShape(Avatar *this, PROTO_AVATAR_SHAPE_INFO *pkInfo);
Avatar *__thiscall Avatar::`vector deleting destructor'(char *this, unsigned int a2);
Avatar *__thiscall Avatar::`vector deleting destructor'(char *this, unsigned int a2);
int __thiscall Ns_TourScene::ProcessData(Ns_TourScene *this, NiAVObject *_pkObject, void *_pData);
Avatar *__thiscall Avatar::`scalar deleting destructor'(Avatar *this, unsigned int a2);
void __cdecl FaceInfoTab::GetIndex(unsigned int uiIndex, char kBaseClassID, char ucGender, char *byResultFaceModelInx, char *byResultFaceTexInx); // idb
signed int __stdcall LODNodeInActivate::ProcessData(NiAVObject *_pkObject, void *_pData);
void __thiscall AbStateInst::OnEffectDestory(AbStateInst *this, Effect *pkEffect); // idb
AbStateInfectee::AbstateColor __thiscall AbStateInfectee::GetAbstateColor(AbStateInfectee *this, unsigned int *a2);
void __thiscall AbStateInfectee::SetAbStateProperty(AbStateInfectee *this, ABSTATEINDEX eAbstateIndex, bool bVisible, int iCount); // idb
NiTList<AbStateInst *> *__thiscall AbStateInfectee::GetAbStateList(AbStateInfectee *this); // idb
int __thiscall AbStateInfectee::IsVisible(AbStateInfectee *this); // idb
int __thiscall AbStateInfectee::GetAddCastingTime(AbStateInfectee *this); // idb
char __stdcall AbStateInfectee::IsHaveActionIndex(SubAbStateInfo *pkSubInfo, SubAbstateAction ActionIndex, int *pVaule);
void __thiscall AbStateInfectee::Update(AbStateInfectee *this, float fTime); // idb
char __thiscall AbStateInfectee::IsInList(AbStateInfectee *this, ABSTATEINDEX wIndex);
void __thiscall AbStateInfectee::ClearAbState(AbStateInfectee *this, int bSudden);
bool __thiscall AbStateInfectee::FindNomalAbstate(AbStateInfectee *this, ABSTATEINDEX wIndex); // idb
void __thiscall AbStateInfectee::~AbStateInfectee(AbStateInfectee *this); // idb
void __thiscall AbStateInfectee::DeleteAbState(AbStateInfectee *this, int kID, bool bSudden);
void __thiscall AbStateInfectee::AbStateInfectee(AbStateInfectee *this); // idb
char __thiscall AbStateInfectee::IsInList(AbStateInfectee *this, SubAbstateAction wSAA);
void __thiscall AbStateInfectee::Affect(AbStateInfectee *this, AbStateInst *pkAbState, bool bNoVisual); // idb
void __thiscall AbStateInfectee::Deaffect(AbStateInfectee *this, AbStateInst *pkAbState, bool bSudden); // idb
AbStateInst *__thiscall AbStateInfectee::FindAbstateInstBySubAbstateType(AbStateInfectee *this, SubState eType); // idb
char __thiscall AbStateInfectee::SubAbIsInList(AbStateInfectee *this, SubState subType);
char __thiscall AbStateInfectee::AddAbState(AbStateInfectee *this, int kID, float fLifeTime, int bNoVisual);
void __thiscall AbStateInfectee::HasAbStateAction(AbStateInfectee *this, std::list<AbnormalStateViewInfo *,std::allocator<AbnormalStateViewInfo *> > *lstAAction); // idb
void __thiscall NiTListBase<DFALL<AbStateInst *>,AbStateInst *>::~NiTListBase<DFALL<AbStateInst *>,AbStateInst *>(NiTListBase<DFALL<AbStateInst *>,AbStateInst *> *this); // idb
NiTListBase<DFALL<AbStateInst *>,AbStateInst *> *__thiscall NiTListBase<DFALL<AbStateInst *>,AbStateInst *>::`vector deleting destructor'(NiTListBase<DFALL<AbStateInst *>,AbStateInst *> *this, unsigned int a2);
void __thiscall NiTPointerListBase<DFALL<AbStateInst *>,AbStateInst *>::AddHead(NiTPointerListBase<DFALL<AbStateInst *>,AbStateInst *> *this, AbStateInst *const *element); // idb
NiD3DShaderInterface *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *this, void **kPos); // idb
NiTList<AbStateInst *> *__thiscall NiTList<AbStateInst *>::`scalar deleting destructor'(NiTList<AbStateInst *> *this, unsigned int a2);
void __thiscall NiTList<AbStateInst *>::~NiTList<AbStateInst *>(NiTList<AbStateInst *> *this); // idb
SubAbStateInfo *__cdecl SubAbStateInfoTab::GetByInxNameAndStrength(char *pcInxName, int nStr); // idb
AbStateInfectee *__thiscall AbStateInfectee::`scalar deleting destructor'(AbStateInfectee *this, unsigned int a2);
IEffectDestroyMessenger *__thiscall AbStateInst::`scalar deleting destructor'(IEffectDestroyMessenger *this, unsigned int a2);
void __cdecl Char::SetDefWalkSpeed(float fSpeed); // idb
void __cdecl Char::SetDefRunSpeed(float fSpeed); // idb
double __cdecl Char::GetDefWalkSpeed();
double __cdecl Char::GetDefRunSpeed();
void __thiscall Char::InitViewInfo(Char *this, PROTO_AVATAR_SHAPE_INFO *pkShape, PROTO_EQUIPMENT *pkEquip); // idb
int __stdcall Char::CheckOscillationTime(float fLastTime);
NiActorManager *__thiscall Char::GetNowSequence(Char *this);
double Char::GetHitTime();
void __thiscall Char::EquipAll(Char *this); // idb
void __thiscall Char::ResetEquip(Char *this); // idb
int __thiscall Char::ResetView(Char *this);
Char::EmotionState __thiscall Char::GetEmotionState(Char *this);
void __thiscall Char::SetEmotionState(Char *this, Char::EmotionState eState); // idb
// bool __userpurge Char::PauseEmotion@<al>(Char *this@<ecx>, double a2@<st0>, bool bSetTime, float fPauseTime);
Char *__thiscall Char::GetAttackTargetChar(Char *this); // idb
signed int __thiscall Char::GetEquipWeaponType(Char *this);
bool __thiscall Char::GetReserveSkillSmash(Char *this); // idb
Char *__thiscall Char::GetChar(Char *this); // idb
void __thiscall Char::SetAnimationSpeed(Char *this, float fSpeed); // idb
unsigned __int16 __thiscall AttackSequenceManager::GetLastTargetHandle(AttackSequenceManager *this); // idb
ItemInfo *__thiscall Char::GetEquippedWeaponItemInfo(Char *this); // idb
void __thiscall Char::SetCharTitleName(Char *this, const char *cName); // idb
bool __thiscall Char::GetSkillTargetGroundPoint(Char *this, unsigned int *x, unsigned int *y); // idb
void __thiscall Char::SetSkillTargetGroundPoint(Char *this, unsigned int x, unsigned int y, bool bPosSetting); // idb
void __thiscall Char::ResetSkillTargetGroundPoint(Char *this); // idb
void __thiscall Char::RestoreEquipState(Char *this); // idb
bool __thiscall Char::IsResource(Char *this); // idb
void __thiscall Char::SetCampSignBoard(Char *this, STREETBOOTH_SIGNBOARD stBoard, bool bIsSell); // idb
void __thiscall Char::SetCharTitleUse(Char *this, bool bUse); // idb
void __thiscall Char::HpUpdate(Char *this, unsigned __int16 wHpUpdateSeqNo, unsigned int dwHp); // idb
void __thiscall Char::InitHpUpdate(Char *this); // idb
char __thiscall Char::CheckEyelidByAction(Char *this);
bool __thiscall Char::IsEnableSpectral(Char *this); // idb
char __thiscall Char::SetEnanleSpectral(Char *this, bool bEnable);
MobInfo *__thiscall Char::GetMobInfo(Char *this); // idb
void __thiscall Char::TOTHpUpdate(Char *this, unsigned __int16 wHpUpdateSeqNo, unsigned int dwHp); // idb
void __thiscall Char::InitTOTHpUpdate(Char *this); // idb
void __thiscall Char::SetHP(Char *this, int iHP); // idb
bool __thiscall Char::IsDash(Char *this); // idb
void __thiscall Char::EnablePolymorph(Char *this, bool b); // idb
double __thiscall Char::GetCharZPos(Char *this, float fSec);
double __stdcall Char::GetJustSideDistance(Char *pkTargetChar);
double __stdcall Char::GetSkillableDistance(Char *pkTargetChar, int kSkillID);
char __thiscall Char::IsUpdate(Char *this);
void __thiscall Char::UpdateDirection(Char *this, float fTime); // idb
bool __thiscall Char::IsOscillationTime(Char *this); // idb
bool __thiscall Char::IsAniState(Char *this, NiControllerSequence::AnimState e); // idb
bool __thiscall Char::IsShakeCondition(Char *this, OscTarget eCondition); // idb
int __stdcall Char::FindShnIndex(NiTextKey *pkKey, unsigned int KeyNum, float fEffectTime);
void __thiscall Char::ResetView(Char *this, PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *p); // idb
void __thiscall Char::StartFadeIn(Char *this); // idb
void __thiscall Char::StartFadeOut(Char *this); // idb
bool __thiscall Char::IsFade(Char *this); // idb
bool __thiscall Char::IsFadeIn(Char *this); // idb
bool __thiscall Char::IsFadeOut(Char *this); // idb
void __thiscall Char::FadeInfoReset(Char *this); // idb
bool __thiscall Char::IsMob(Char *this); // idb
bool __thiscall Char::IsNPC(Char *this); // idb
bool __thiscall Char::IsLinkGate(Char *this); // idb
unsigned int __thiscall Char::GetLv(Char *this);
void __thiscall Char::ChangeWalkAnimationSpeed(Char *this, float fFreq); // idb
void __thiscall Char::ChangeRunAnimationSpeed(Char *this, float fFreq); // idb
unsigned int __thiscall Char::GetCurEmotionCode(Char *this);
double __thiscall Char::GetPausedEmotionFrame(Char *this);
signed int __thiscall Char::GetWeaponType(Char *this);
NiActorManager *__thiscall Char::GetActor(Char *this); // idb
void __thiscall Char::SetAnimationOffset(Char *this, float fOffset); // idb
void __thiscall Char::AddPrivateStoreBD(Char *this); // idb
// void __usercall Char::RemovePrivateStoreBD(Char *this@<ecx>, int a2@<edi>);
char *__thiscall Char::GetLinkGateName(Char *this); // idb
void __thiscall Char::SetLinkGateName(Char *this, char *pcLinkGateName); // idb
// void __usercall Char::UpdateWeaponEquipState(Char *this@<ecx>, int a2@<ebx>);
void __thiscall Char::UpdateActbyEquip(Char *this); // idb
void __thiscall Char::UpdateActionEventByNet(Char *this, unsigned int dwEventActionCode, char byFlag); // idb
char __thiscall Char::MakeCharNpcShape(Char *this, CharNPC_ViewInfo *pViewInfo); // idb
void __thiscall Char::ClearBlinkingInfo(Char *this); // idb
void __thiscall Char::UpdateEyeBlinking(Char *this); // idb
char __thiscall Char::ModifyExistDyingSeq(Char *this, unsigned __int16 hTargetHandle);
char __thiscall Char::GetClass(Char *this); // idb
BOOL __thiscall Char::IsMetamorphosis(Char *this);
NiPoint3 *__thiscall Char::GetPos(Char *this); // idb
NiPoint3 *__thiscall Char::GetMapHeigthPos(Char *this); // idb
void __thiscall Char::SaveSkillSwingStartCurTime(Char *this); // idb
char __thiscall Char::IsRunSkillSequence(Char *this);
bool __thiscall Char::IsRangeAttChar(Char *this); // idb
NiActorManager *__thiscall Char::GetHitTimeCount(Char *this, unsigned int uiEventCode);
int __thiscall Char::GetEventCodebyAttackNO(Char *this, char byActionCode);
// void __userpurge Char::SetItemAutoPickState(Char *this@<ecx>, int a2@<edi>, int bAutoPickItem);
// void __userpurge Char::SetItemAutoUseState(Char *this@<ecx>, int a2@<esi>, int bAutoUseItem);
void __thiscall Char::SetAniMationStop(Char *this, bool b); // idb
void __thiscall Char::SetAbstateDeaffect(Char *this, AbStateInst *pkAbState); // idb
void __thiscall Char::GaleOfRun(Char *this, float fTime); // idb
void __thiscall Char::RisingChar(Char *this, float fTime); // idb
signed int __thiscall Char::GetLvGapIndex(Char *this, int iLv);
void __thiscall Char::SetActionEffectStartTime(Char *this); // idb
char __thiscall Char::Init(Char *this, PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *p);
signed int __thiscall Char::Init(Char *this, PROTO_AVATARINFORMATION *p);
double __thiscall Char::GetAttackableDistance(Char *this, Char *pkTargetChar);
// void __userpurge Char::UpdatePosition(Char *this@<ecx>, int a2@<ebx>, int a3@<edi>, double a4@<st0>, float fTime);
void __thiscall Char::UpdateLod(Char *this, float fTime); // idb
void __thiscall Char::UpdateQuestMark(Char *this); // idb
bool __thiscall Char::IsNeverCarToon(Char *this); // idb
bool __thiscall Char::IsNeverShadow(Char *this); // idb
void __thiscall Char::AddIceEffect(Char *this); // idb
signed int __thiscall Char::GetEmotionIndex(Char *this, unsigned int uiEventCode);
signed int __thiscall Char::GetArmorType(Char *this);
void __thiscall Char::OnRangeHitTime(Char *this, char *pcEffName); // idb
void __thiscall Char::OnMeleeHitTime(Char *this); // idb
void __thiscall Char::Deaffect(Char *this, AbStateInst *pkAbState, bool bSudden); // idb
char __thiscall Char::GetAttackActionCode(Char *this, char byActionCode); // idb
// NiPoint3 *__userpurge Char::GetHeightPos@<eax>(Char *this@<ecx>, int a2@<ebx>, NiPoint3 *result);
bool __thiscall Char::Equip(Char *this, int kItemID);
bool __thiscall Char::Equip(Char *this, int kItemID, char byUpgrade);
char __thiscall Char::Equip(Char *this, Item *_pItem);
bool __thiscall Char::UnEquip(Char *this, unsigned int uiEquipPos); // idb
void __thiscall Char::ExecuteDyingProcess(Char *this); // idb
void __thiscall Char::CorrectAniSequence(Char *this); // idb
// void __usercall Char::ActNormalStand(Char *this@<ecx>, int a2@<ebx>, int a3@<edi>);
// void __userpurge Char::SetItemAutoUseBuff(Char *this@<ecx>, int a2@<esi>, int bUse);
// void __userpurge Char::SetItemAutoUseCharged(Char *this@<ecx>, int a2@<esi>, int bUse);
void __thiscall LinkedEffect::Show(LinkedEffect *this, int bShow);
void __thiscall Char::Update(Char *this, NiAVObject *pParent); // idb
char __thiscall Char::IsCharNPC(Char *this);
bool __thiscall Char::IsCharMob(Char *this); // idb
bool __thiscall Char::HaveEventNPCAction(Char *this); // idb
bool __thiscall Char::ApplyCharNpcBaseAction(Char *this, bool bFirstCall); // idb
void __thiscall Char::SetMobID(Char *this, int kMobID);
double __thiscall Char::GetAniSpeedFromAbstate(Char *this, AbnormalStateInfo *pkInfo, unsigned int uiActionEventCode);
char __thiscall Char::AddAbStateByAbstateIndex(Char *this, ABSTATEINDEX wIndex, float fLifeTime, bool bNoVisual);
void __thiscall Char::DeleteAbStateByAbstateIndex(Char *this, ABSTATEINDEX wIndex); // idb
ActionEffectInfo *__thiscall Char::GetSEFromLastAtk(Char *this, ActionInfo *LastAtkInfo); // idb
void __thiscall Char::SetAbstateAffect(Char *this, AbStateInst *pkAbState); // idb
char __thiscall Char::Init(Char *this, int kMobID, unsigned __int16 kHandle);
// char __userpurge Char::ApplicateAttackSeq@<al>(Char *this@<ecx>, int a2@<esi>, AttackSequence *pkAttSeq, bool bAllApplicate);
void __thiscall Char::Affect(Char *this, AbStateInst *pkAbState, bool bNoVisual); // idb
bool __thiscall Char::RefreshNPCAction(Char *this); // idb
char __thiscall Char::ImmediatelyMetamorphosis(Char *this, unsigned __int16 monsterid);
char __thiscall Char::Shape_UnMetamorphosis(Char *this, const char *ptemp);
char __thiscall Char::IsHitTime(Char *this, bool bdelHitTimeInfo);
void __thiscall Char::DoOscillation(Char *this, OscTarget e); // idb
void __thiscall Char::UpdateNPCAction(Char *this, float fTime); // idb
void __thiscall LinkedEffect::Clear(LinkedEffect *this); // idb
void __thiscall Char::ClearOscTimeMmap(Char *this); // idb
void __thiscall Char::CatchHitTime(Char *this); // idb
void __thiscall Char::ViewNotCampMode(Char *this, PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *p); // idb
void __thiscall Char::ClearHitTime(Char *this); // idb
void __thiscall Char::DelHitTime(Char *this, std::_List_iterator<std::_List_val<float,std::allocator<float> > > it); // idb
char __thiscall Char::IsAbStateAction(Char *this);
void __thiscall Char::ClearTraceMove(Char *this); // idb
unsigned int __thiscall Char::GetIdleCode(Char *this); // idb
void __thiscall Char::~Char(Char *this); // idb
char __thiscall Char::UpdateCulling(Char *this, float fTime);
void __thiscall Char::CatchOscillationTime(Char *this); // idb
bool __thiscall Char::Metamorphosis(Char *this, unsigned __int16 monsterid); // idb
bool __thiscall Char::UnMetamorphosis(Char *this); // idb
void __thiscall Char::AddTraceMove(Char *this, NiPoint3 *Move); // idb
void __thiscall Char::UpdateTrace(Char *this); // idb
bool __thiscall LinkedEffect::SetNode(LinkedEffect *this, NiNode *_pNode, unsigned __int16 kHandle); // idb
void __thiscall Char::Char(Char *this); // idb
void __thiscall Char::Update(Char *this, float fTime); // idb
void __thiscall Char::ViewCampMode(Char *this, PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *p); // idb
char __thiscall Char::InitViewApply(Char *this, bool bEquip);
void __thiscall Char::MakeCharNpcEquipment(Char *this, CharNPC_ViewInfo *pViewInfo); // idb
char __thiscall Char::InitView(Char *this, int bEquip, unsigned int uiFrame);
void __thiscall NiAVObject::SetRotate(NiAVObject *this, float fAngle, float x, float y, float z); // idb
char __thiscall CQuestInfoViewMgr::IsHaveQuestState(CQuestInfoViewMgr *this);
void __thiscall Char::SetShockWave(Char *this, bool bShockWave); // idb
NiPointer<NiPixelData> *__thiscall NiPointer<NiActorManager>::operator=(NiPointer<NiPixelData> *this, NiPointer<NiPixelData> *ptr); // idb
void __thiscall JumpProcessor::~JumpProcessor(JumpProcessor *this); // idb
void __thiscall CRidePetCtl::~CRidePetCtl(CRidePetCtl *this); // idb
unsigned int __cdecl ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::GetTotal(); // idb
NiAVObject *__thiscall NsFindObjectByName::GetAt(NsFindObjectByName *this, unsigned int uiIndex); // idb
void __thiscall CQuestInfoViewMgr::CQuestInfoViewMgr(CQuestInfoViewMgr *this); // idb
void __thiscall CQuestInfoViewMgr::~CQuestInfoViewMgr(CQuestInfoViewMgr *this); // idb
void __thiscall CRidePetCtl::StartAction(CRidePetCtl *this, unsigned int uiEventCode); // idb
void __thiscall CRidePetCtl::ActStand(CRidePetCtl *this); // idb
double __thiscall Char::GetMaxViewLength(Char *this);
void __thiscall Char::CulledTent(Char *this, bool bCullTent); // idb
void __thiscall CRidePetCtl::Update(CRidePetCtl *this, float ftime); // idb
void __thiscall Char::UpdateForceAni(Char *this); // idb
void __thiscall std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Erase(std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *_Rootnode); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<float,ActionEffectInfo *,std::less<float>,std::allocator<std::pair<float const,ActionEffectInfo *>>,1>>::_Linsert(std::_Tree<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *_Node, bool _Leftish); // idb
void __thiscall NsFindObjectByName::NsFindObjectByName(NsFindObjectByName *this); // idb
void __thiscall NsFindObjectByName::~NsFindObjectByName(NsFindObjectByName *this); // idb
void __thiscall std::list<float,std::allocator<float>>::push_back(std::list<float,std::allocator<float> > *this, float *_Val); // idb
signed int __stdcall NsFindObjectByName::ProcessData(NiAVObject *_pkObject, void *_pData);
Char *__thiscall Char::`vector deleting destructor'(char *this, unsigned int a2);
Char *__thiscall Char::`vector deleting destructor'(char *this, unsigned int a2);
bool __thiscall NsFindObjectByName::FindObject(NsFindObjectByName *this, NiNode *_pObject, const char *_szName); // idb
Char *__thiscall Char::`vector deleting destructor'(Char *this, unsigned int a2);
void __thiscall Char::StopMoveTarget(Char *this); // idb
bool __thiscall Char::IsDuringSkillCasting(Char *this); // idb
void __thiscall Char::SetCurPlaySkill(Char *this, Skill::Type eSkillType, unsigned __int16 kSkillID); // idb
Skill::Type __thiscall Char::GetCurPlaySkillType(Char *this); // idb
unsigned __int16 __thiscall Char::GetCurPlaySkillID(Char *this); // idb
void __thiscall Char::ActDamageShaking(Char *this, float fAmplitude, float fPeriod, float fDamp, EffectAxisEnum eValue, float fStartTime); // idb
void __thiscall Char::ActDamageShaking(Char *this, EffectViewInfo *pkShakeInfo, float fStartTime); // idb
void __thiscall Char::ActResourceAppearing(Char *this); // idb
void __thiscall Char::ActResourceDisappearing(Char *this); // idb
void __thiscall Char::SetReserveSkillSmash(Char *this, bool bSmash); // idb
void __thiscall Char::CancelEmotion(Char *this); // idb
void __thiscall Char::StartMHEmotion(Char *this); // idb
void __thiscall Char::StopGathering(Char *this); // idb
void __thiscall Char::StopItemCasting(Char *this); // idb
void __thiscall Char::StartEmotion(Char *this); // idb
unsigned int __thiscall Char::GetAniCode(Char *this, bool bFindingBaseAction, unsigned int *puiFirstCode, unsigned int *puiSecondCode); // idb
char __thiscall Char::CheckActState(Char *this, int nAniEventCode); // idb
void __thiscall Char::StopFlagCapture(Char *this); // idb
bool __thiscall Char::IsMoverMovable(Char *this); // idb
signed int __stdcall Char::GetMoveCharAniType(AniEventCode::Code2 eCode2);
signed int __stdcall Char::GetDamageCharAniType(AniEventCode::Code2 eCode2);
void __thiscall Char::StopMove(Char *this, bool bAbstateTest); // idb
void __thiscall Char::TestSetPos(Char *this, NiPoint3 *kPos); // idb
void __thiscall Char::StopMove(Char *this, float fXPos, float fYPos, bool bAbstateTest); // idb
void __thiscall Char::TurnToChar(Char *this, Char *pkChar); // idb
void __thiscall Char::TurnToPosition(Char *this, NiPoint3 *kPos); // idb
bool __thiscall Char::CheckExceptional3rdCode(Char *this, unsigned int eAniCode1, unsigned int eAniCode2, unsigned int *eResultAniCode3); // idb
bool __thiscall Char::IsDuringAction(Char *this); // idb
ActiveSkillViewInfo *__thiscall Char::GetCurPlayActiiveSkillViewInfo(Char *this); // idb
ActiveSkillInfo *__thiscall Char::GetCurPlayActiiveSkillInfo(Char *this); // idb
ActionInfo *__thiscall Char::GetCurPlayActInfo(Char *this); // idb
bool __thiscall Char::IsDuringSkillAction(Char *this); // idb
bool __thiscall Char::IsDuringSkillActionAndHitTimeNotPassed(Char *this); // idb
void __thiscall Char::ActStand(Char *this); // idb
void __thiscall Char::ActMove(Char *this); // idb
bool __thiscall Char::IsSkillCasRdyActExist(Char *this); // idb
bool __thiscall Char::IsSkillShootActExist(Char *this); // idb
bool __thiscall Char::IsActGathering(Char *this); // idb
bool __thiscall Char::IsBrokenResource(Char *this); // idb
ActionInfo *__thiscall Char::GetActionInfo(Char *this, AniEventCode::Code1 eCode1, AniEventCode::Code2 eCode2); // idb
bool __thiscall Char::IsActProducing(Char *this); // idb
bool __thiscall Char::IsActItemCasting(Char *this); // idb
void __thiscall Char::ActEmotionIndex(Char *this, unsigned int uiEmotionIndex); // idb
void __thiscall Char::ActEmotionEventCode(Char *this, unsigned int uiEventCode); // idb
bool __thiscall Char::HaveCurrentSkillMoveAttrib(Char *this); // idb
void __thiscall Char::AdjustHeadWeightsValue(Char *this); // idb
bool __thiscall Char::IsActFlagCapture(Char *this); // idb
bool __thiscall Char::IsActRunning(Char *this); // idb
unsigned int __thiscall Char::GetSpecialEventCode(Char *this); // idb
signed int __stdcall Char::GetCharAniType(AniEventCode::Code1 eCode1, AniEventCode::Code2 eCode2);
unsigned int __thiscall Char::Get3thAniEventCode(Char *this, unsigned int eAniCode1, unsigned int eAniCode2); // idb
char __thiscall Char::ActJump(Char *this);
void __thiscall Char::ResetAction(Char *this); // idb
void __thiscall Char::ResetSkillAction(Char *this); // idb
char __thiscall Char::ActAction(Char *this, char *pcActInxName, eActionWeight eActWeight);
char __thiscall Char::ActNonWeightAction(Char *this, unsigned int dwAniCode);
void __thiscall Char::UpdateAction(Char *this, float fTime); // idb
void __thiscall Char::ActGathering(Char *this, Char *pkTargetChar, int id);
void __thiscall Char::ActProducing(Char *this); // idb
void __thiscall Char::ActItemCasting(Char *this); // idb
NiActorManager *__thiscall Char::GetSequence(Char *this, unsigned int uiAniEventCode);
char __thiscall Char::ResetPosEmotion(Char *this, float fResetTime);
// void __usercall Char::CheckStateInNoMovement(Char *this@<ecx>, int a2@<ebx>);
void __thiscall Char::ActFlagCapture(Char *this); // idb
char __thiscall Char::ActBlendAction(Char *this, unsigned int uiBaseEventCode, unsigned int uiBlendEventCode);
void __thiscall Char::SetDoorAnimation(Char *this, float fTime, Char::DoorState eState); // idb
unsigned int __thiscall Char::GetConditionAni(Char *this, CharAniType eType); // idb
void __thiscall Char::GetoutOfPet(Char *this); // idb
void __thiscall Char::RidePet(Char *this, int _nID); // idb
void __thiscall Char::Move(Char *this, NiPoint3 *kTargetPos, bool bChangeMode, NiPoint3 *kForceDir, bool bSkillCancel); // idb
// char __userpurge Char::Move@<al>(Char *this@<ecx>, int a2@<ebx>, NiPoint3 *kTargetPos, float fCurTime, bool bChangeMode, NiPoint3 *kForceDir, bool bSkillCancel);
bool __thiscall Char::IsAnimationEnd(Char *this); // idb
char __thiscall Char::ResetSequence(Char *this, unsigned int dwAniEventCode);
void __thiscall Char::ActSkillStand(Char *this, float fModifiedStartTime); // idb
// void __userpurge Char::ActInitStand(Char *this@<ecx>, int a2@<edi>, bool bIsMob);
void __thiscall Char::UpdateAnimation(Char *this, float fTime); // idb
void __thiscall Char::TryActDamage(Char *this, unsigned int uiDamage, bool bDotDmg); // idb
void __thiscall Char::ActAction_BaseMode(Char *this, const char *pcActInxName); // idb
void __thiscall Char::UpdateEmotion(Char *this, float fTime); // idb
double __thiscall Char::StopEmotion(Char *this);
// char __userpurge Char::ActAction@<al>(Char *this@<ecx>, int a2@<ebx>, int a3@<edi>, AniEventCode::Code1 eCode1, AniEventCode::Code2 eCode2);
void __thiscall Char::CancelSkillAction(Char *this, bool bMoveStop); // idb
char __thiscall Char::SetTargetAnimation(Char *this, unsigned int uiAniEventCode, bool bForceToAnimate, bool bForceLoopAni);
char __thiscall Char::SetWeightedTargetAnimation(Char *this, unsigned int uiAniEventCode, eActionWeight eActWeight);
void __thiscall Char::OnDead(Char *this); // idb
// void __usercall Char::ActCombatStand(Char *this@<ecx>, int a2@<ebx>, unsigned int a3@<edi>);
// void __userpurge Char::OnWarpMove(Char *this@<ecx>, int a2@<esi>, SHINE_XY_TYPE targetpoint, int SkillID);
// void __userpurge Char::Attack(Char *this@<ecx>, int a2@<ebx>, Char *pkChar, char ucAttackNo);
char __thiscall Char::CancelSkillActionWhenHitTimePassed(Char *this);
// void __usercall Char::ActWalk(Char *this@<ecx>, int a2@<ebx>, int a3@<edi>, double a4@<st0>);
// void __usercall Char::ActRun(Char *this@<ecx>, int a2@<ebx>, int a3@<edi>, double a4@<st0>);
// void __usercall Char::ActCriticalStun(Char *this@<ecx>, int a2@<ebx>, int a3@<edi>);
// void __usercall Char::ActDamage1(Char *this@<ecx>, int a2@<ebx>, int a3@<edi>);
// void __usercall Char::ActDie1(Char *this@<ecx>, int a2@<ebx>, int a3@<edi>);
// void __usercall Char::ActAttack1_1(Char *this@<ecx>, int a2@<ebx>, int a3@<edi>);
// void __usercall Char::ActAttack1_2(Char *this@<ecx>, int a2@<ebx>, int a3@<edi>);
// void __usercall Char::ActAttack1_3(Char *this@<ecx>, int a2@<ebx>, int a3@<edi>);
void __thiscall Char::ActSkill(Char *this, Char *pkChar, Skill::Type eSkillType, int kSkillID);
void __thiscall Char::ActSkill(Char *this, unsigned int x, unsigned int y, Skill::Type eSkillType, int kSkillID);
char __thiscall Char::RideOn(Char *this, Char *pkMover, NiPointer<NiNode> spMoverCarrierNode, bool bViewChar, unsigned int uiSlot);
char __thiscall Char::RideOff(Char *this);
char __thiscall Char::AnimationStopWhenHitTime(Char *this);
char __thiscall Char::Shoot(Char *this);
void __thiscall Char::UpdateSkillAnimation(Char *this, float fTime); // idb
NiPoint3 *__cdecl operator*(NiPoint3 *result, float fScalar, NiPoint3 *pt); // idb
void __thiscall NiCollisionData::SetCollisionMode(NiCollisionData *this, NiCollisionData::CollisionMode eCollision); // idb
void __thiscall NiD3DShaderLibrary::SetShaderLibraryDesc(NiD3DShaderLibrary *this, NiShaderLibraryDesc *pkLibDesc); // idb
void __thiscall CRidePetCtl::ActRun(CRidePetCtl *this); // idb
void __thiscall CRidePetCtl::ActWalk(CRidePetCtl *this); // idb
void __thiscall CRidePetCtl::SpecialAction(CRidePetCtl *this); // idb
void __thiscall Char::OpenDoor(Char *this); // idb
void __thiscall Char::CloseDoor(Char *this); // idb
unsigned int __cdecl MobConditionViewTab::GetEventCode(const char *pcMobInx, CharAniType AniType, unsigned int AniLv); // idb
bool __thiscall CSpactralGlow_Shader_Controller::IsEnable(CSpactralGlow_Shader_Controller *this); // idb
bool __thiscall CarToonShader::ToonShader(CarToonShader *this, NiGeometry *pTargetGeo); // idb
bool __stdcall CarToonShader::EraseToonShader(NiGeometry *pTargetGeo);
void __thiscall CSpactralGlow_Shader_Controller::CSpactralGlow_Shader_Controller(CSpactralGlow_Shader_Controller *this); // idb
void __thiscall CSpactralGlow_Shader_Controller::~CSpactralGlow_Shader_Controller(CSpactralGlow_Shader_Controller *this); // idb
char __thiscall CSpactralGlow_Shader_Controller::SetTarget(CSpactralGlow_Shader_Controller *this, NiNode *pTargetObjNode);
signed int __thiscall FindChildGeometry::ProcessData(FindChildGeometry *this, NiAVObject *_pkObject, void *_pData);
void __thiscall CarToonShader::~CarToonShader(CarToonShader *this); // idb
char __thiscall CarToonShader::SetCartoonShader(CarToonShader *this, NiNode *pTargetObjNode);
char __thiscall CSpactralGlow_Shader_Controller::ShaderSetting_Geometry(CSpactralGlow_Shader_Controller *this, NiGeometry *pTargetGeo);
void __thiscall CSpactralGlow_Shader_Controller::SetUseShaderName(CSpactralGlow_Shader_Controller *this, char *pcShaderName1, char *pcShaderName2); // idb
char __thiscall CarToonShader::SetOutLine(CarToonShader *this, bool bOutLine);
char __thiscall CSpactralGlow_Shader_Controller::ShaderSetting(CSpactralGlow_Shader_Controller *this);
signed int __thiscall Find_EF_ExtraData::ProcessData(Find_EF_ExtraData *this, NiAVObject *_pkObject, void *_pData);
void __thiscall CarToonShader::CarToonShader(CarToonShader *this); // idb
CarToonShader *__cdecl CarToonShader::GetInstance(); // idb
char __thiscall CarToonShader::SetExceptOutLineCartoonShader(CarToonShader *this, NiNode *pTargetObjNode);
char __thiscall CSpactralGlow_Shader_Controller::NormalSetting(CSpactralGlow_Shader_Controller *this);
char __thiscall CSpactralGlow_Shader_Controller::SetEnable(CSpactralGlow_Shader_Controller *this, bool bEnalbe);
char __thiscall CSpactralGlow_Shader_Controller::SetupRecursive(CSpactralGlow_Shader_Controller *this, NiNode *pTarget);
NiTArray<NiNode *> *__thiscall NiTArray<NiNode *>::`scalar deleting destructor'(NiTArray<NiNode *> *this, unsigned int a2);
NiTArray<NiGeometry *> *__thiscall NiTArray<NiGeometry *>::`scalar deleting destructor'(NiTArray<NiGeometry *> *this, unsigned int a2);
void __thiscall FindChildGeometry::~FindChildGeometry(FindChildGeometry *this); // idb
void __thiscall Find_EF_ExtraData::~Find_EF_ExtraData(Find_EF_ExtraData *this); // idb
CSpactralGlow_Shader_Controller *__thiscall CSpactralGlow_Shader_Controller::`scalar deleting destructor'(CSpactralGlow_Shader_Controller *this, unsigned int a2);
CarToonShader *__thiscall CarToonShader::`vector deleting destructor'(CarToonShader *this, unsigned int a2);
char __cdecl CharClass::GetRace(char kClassID); // idb
char __cdecl CharClass::TestChrBaseClassMask(__int64 kClassMask, char kBaseClassID);
char __cdecl CharClass::GetMinimumChrClass(__int64 kClassMask, char kBaseClassID); // idb
__int64 __cdecl CharClass::GetBitbyClassType(UseClassType kClassType); // idb
void __cdecl CharClass::GetEquipableClassStr(__int64 kClassMask, char *pcStr, unsigned int uiStrLen); // idb
void __cdecl CharClass::GetEquipableClassSortStr(__int64 kClassMask, char *pcStr, unsigned int uiStrLen); // idb
UseClassTypeInfo *__cdecl UseCalssTypeTable::GetClassByClassType(UseClassType kClassType); // idb
void __thiscall JumpProcessor::ForceEnd(JumpProcessor *this, bool bStop); // idb
char __thiscall JumpProcessor::OnEnd(JumpProcessor *this);
void __thiscall JumpProcessor::SetCurPos(JumpProcessor *this, NiPoint3 *pos3StartPos); // idb
double __thiscall JumpProcessor::GetCameraPos(JumpProcessor *this);
bool __thiscall JumpProcessor::IsJump(JumpProcessor *this); // idb
char __thiscall JumpProcessor::Jump(JumpProcessor *this, float fTime, NiPoint3 pos3StartPos);
void __thiscall JumpProcessor::SetJumpAni(JumpProcessor *this, unsigned int uiJumpStart_Stand, unsigned int uiJumpStart_Run, unsigned int uiJumpFly, unsigned int uiJumpLandingStand, unsigned int uiJumpLandingMove); // idb
void __thiscall ActionMgr::PlaySoundA(ActionMgr *this, int iSndIndex, ActionInfo *pkActionInfo); // idb
int __stdcall ActionMgr::GetKeyStrToInt(char *KeywordStr);
void __thiscall JumpProcessor::clear(JumpProcessor *this); // idb
void __thiscall JumpProcessor::JumpProcessor(JumpProcessor *this); // idb
char __thiscall JumpProcessor::IsJumpEnd(JumpProcessor *this, float fHeight);
char __thiscall JumpProcessor::IsJumpAniState(JumpProcessor *this);
void __thiscall ActionMgr::PlayEffect(ActionMgr *this, int iEffIndex, ActionInfo *pkActionInfo); // idb
BOOL __thiscall ActionMgr::UseOldActionEffect(ActionMgr *this);
// double __userpurge JumpProcessor::Update@<st0>(JumpProcessor *this@<ecx>, int a2@<edi>, float fTime);
void __thiscall ActionMgr::UpdateActionTable(ActionMgr *this, Char *pkTargetChar); // idb
ActionEffectInfo *__stdcall ActionMgr::GetSE(NiControllerSequence *pkCatchedSeq);
void __thiscall ActionMgr::TextKeyEvent(ActionMgr *this, NiActorManager *pkManager, unsigned int eSequenceID, const char *pcTextKey, NiTextKeyMatch *pkMatchObject, float fCurrentTime, float fEventTime); // idb
void __thiscall ActionMgr::ClearAEEff(ActionMgr *this); // idb
void __thiscall ActionMgr::UpdateAE(ActionMgr *this, Char *pkTargetChar, NiControllerSequence *pkSeq); // idb
ActionEffectInfo *__thiscall ActionMgr::GetFirstAE(ActionMgr *this, ActionMgr::eACTIONEFF_TYPE eType, bool bDelInfo); // idb
void __thiscall ActionMgr::~ActionMgr(ActionMgr *this); // idb
char __thiscall ActionMgr::AddAEEff(ActionMgr *this, ActionMgr::eACTIONEFF_TYPE eType, NiTextKey *Value, ActionMgr::ActionEffectInfoEx *pkInfoEx);
void __thiscall ActionMgr::ActionMgr(ActionMgr *this); // idb
void __thiscall ActionMgr::CatchAEEff(ActionMgr *this, bool bForceLoading); // idb
void __thiscall ActionMgr::SetActionStartTime(ActionMgr *this, float fTime); // idb
ActionMgr *__thiscall ActionMgr::`scalar deleting destructor'(ActionMgr *this, unsigned int a2);
void __thiscall CharMgr::DeleteAvatar(CharMgr *this, Char *pkAvatar); // idb
// char __userpurge CharMgr::LoadChar@<al>(CharMgr *this@<ecx>, int a2@<edi>, CharMgr::LoadData *Chardata);
void __thiscall CharMgr::UpdateAvatar(CharMgr *this, float fCurTime); // idb
Char *__thiscall CharMgr::GetChar(CharMgr *this, char *pcName); // idb
Char *__thiscall CharMgr::GetChar(CharMgr *this, Name5 kID); // idb
Char *__thiscall CharMgr::GetChar(CharMgr *this, Char *_pkChar); // idb
signed __int16 __thiscall CharMgr::FindFirstCharHandleByMobID(CharMgr *this, unsigned __int16 MobID);
void __thiscall CharMgr::OutLineEnable(CharMgr *this, bool bEnable); // idb
Char *__thiscall CharMgr::GetUserChar(CharMgr *this, Name5 kID); // idb
Char *__thiscall CharMgr::GetUserChar(CharMgr *this, char *pcName); // idb
void __thiscall CharMgr::UpdateNpcActionEvent(CharMgr *this, PROTO_NC_SCENARIO_PLAYERLIKEMOB_ANIMATE_CMD *pkProto); // idb
Char *__thiscall CharMgr::GetCharByNodePtr(CharMgr *this, NiNode *pkNode); // idb
Char *__thiscall CharMgr::GetChar(CharMgr *this, unsigned __int16 kHandle); // idb
char __thiscall CharMgr::Init(CharMgr *this);
Char *__thiscall CharMgr::AddCharQue(CharMgr *this, char kClassID, char byGender, NiPoint3 *kPos, NiPoint3 *kDir, unsigned int uiEquipLevel); // idb
Mover *__thiscall CharMgr::AddMover(CharMgr *this, unsigned int kMoverID, unsigned __int16 kMoverHandle, int iHP, char nGrade, NiPoint3 *kPos, NiPoint3 *kDir); // idb
Mover *__thiscall CharMgr::AddMover(CharMgr *this, PROTO_NC_BRIEFINFO_REGENMOVER_CMD *p); // idb
char __thiscall CharMgr::AddMover(CharMgr *this, PROTO_NC_BRIEFINFO_MOVER_CMD *p);
Avatar *__thiscall CharMgr::AddAvatar(CharMgr *this, PROTO_AVATARINFORMATION *p, NiPoint3 *kPos, NiPoint3 *kDir, unsigned int uiFrame); // idb
Avatar *__thiscall CharMgr::AddAvatar(CharMgr *this, PROTO_AVATAR_SHAPE_INFO *pkInfo, NiPoint3 *kPos, NiPoint3 *kDir, unsigned int uiFrame); // idb
void __thiscall CharMgr::~CharMgr(CharMgr *this); // idb
Char *__thiscall CharMgr::AddChar(CharMgr *this, char kClassID, char byGender, NiPoint3 *kPos, NiPoint3 *kDir, unsigned int uiEquipLevel); // idb
void __thiscall CharMgr::DeleteChar(CharMgr *this, Char *pkChar); // idb
char __thiscall CharMgr::ImmediatelyLoadQueueingChar(CharMgr *this, Char *pkChar);
void __thiscall CharMgr::CharMgr(CharMgr *this); // idb
void __thiscall CharMgr::Remove(CharMgr *this, Char *pkChar); // idb
void __thiscall CharMgr::RemoveAll(CharMgr *this); // idb
void __thiscall CharMgr::RemoveAllWithoutMainChar(CharMgr *this); // idb
void __thiscall CharMgr::RemoveAllWithoutMainCharAndNPC(CharMgr *this); // idb
void __thiscall CharMgr::RemoveFarCharWithoutMainChar(CharMgr *this); // idb
void __thiscall CharMgr::Update(CharMgr *this, float fCurTime); // idb
Char *__thiscall CharMgr::AddMob(CharMgr *this, int kMobID, unsigned __int16 kHandle, NiPoint3 *kPos, NiPoint3 *kDir, bool bDoor, bool bDead);
Char *__thiscall CharMgr::AddMob(CharMgr *this, PROTO_NC_BRIEFINFO_BUILDDOOR_CMD *p); // idb
Char *__thiscall CharMgr::AddMob(CharMgr *this, PROTO_NC_BRIEFINFO_REGENMOB_CMD *p); // idb
char __thiscall CharMgr::AddMob(CharMgr *this, PROTO_NC_BRIEFINFO_MOB_CMD *p);
Char *__thiscall CharMgr::AddCharQue(CharMgr *this, PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *p); // idb
Char *__thiscall CharMgr::AddChar(CharMgr *this, PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *p, unsigned int uiFrameWork); // idb
char __thiscall CharMgr::AddChar(CharMgr *this, PROTO_NC_BRIEFINFO_CHARACTER_CMD *p);
Pet *__thiscall CharMgr::AddPet(CharMgr *this, unsigned int kPetID, int kPetHandle, NiPoint3 *kPos, NiPoint3 *kDir, const char *pcName);
Pet *__thiscall CharMgr::AddPet(CharMgr *this, PROTO_NC_BRIEFINFO_REGENPET_CMD *p); // idb
char __thiscall CharMgr::AddPet(CharMgr *this, PROTO_NC_BRIEFINFO_PET_CMD *p);
char __thiscall CharMgr::DeleteChar(CharMgr *this, PROTO_NC_MAP_LOGOUT_CMD *p);
void __thiscall CharMgr::Terminate(CharMgr *this); // idb
char __thiscall CharMgr::AddMob(CharMgr *this, PROTO_NC_BRIEFINFO_DOOR_CMD *p);
std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Min(std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *_Pnode); // idb
PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *__thiscall PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD::operator=(PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *this, PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *__that); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,Char *>::~NiTListBase<NiTPointerAllocator<unsigned int>,Char *>(NiTListBase<NiTPointerAllocator<unsigned int>,Char *> *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,Char *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,Char *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,Char *> *this, unsigned int a2);
CharMgr::LoadData *__thiscall CharMgr::LoadData::operator=(CharMgr::LoadData *this, CharMgr::LoadData *__that); // idb
void __thiscall CharMgr::LoadData::LoadData(CharMgr::LoadData *this, Char *_pkChar, char _kClassID, char _byGender, NiPoint3 _kPos, NiPoint3 _kDir, int _nEquipLevel); // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,Char *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,Char *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,Char *> *this, unsigned int a2);
void __thiscall NiTPointerList<Char *>::~NiTPointerList<Char *>(NiTPointerList<Char *> *this); // idb
void __thiscall PgTList<Char *>::~PgTList<Char *>(PgTList<Char *> *this); // idb
PgTList<Char *> *__thiscall PgTList<Char *>::`vector deleting destructor'(PgTList<Char *> *this, unsigned int a2);
void __thiscall std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::_Growmap(std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *this, unsigned int _Count); // idb
std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *__thiscall std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::_Make_iter(std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *this, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *result, std::_Deque_const_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _Where); // idb
std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *__thiscall std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::operator+(std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *this, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *result, int _Off); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *_Newnode); // idb
std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *__cdecl std::_Move_backward<std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>,std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>>(std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *result, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _First, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _Last, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _Dest);
std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *__cdecl std::_Move<std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>,std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>>(std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *result, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _First, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _Last, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _Dest);
void __thiscall std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::push_back(std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *this, CharMgr::LoadData *_Val); // idb
CharMgr::LoadData *__thiscall std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::front(std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *this); // idb
std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *__cdecl std::_Move_backward<std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>,std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>>(std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *result, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _First, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _Last, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _Dest); // idb
std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *__cdecl std::_Move<std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>,std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>>(std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *result, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _First, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _Last, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _Dest); // idb
std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *this, std::pair<int const ,int> *_Val); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,long>>,0>>::find(std::_Tree<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > > *result, const unsigned __int16 *_Keyval); // idb
std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned long>>,0>>::_Buynode<std::pair<unsigned short const,unsigned long>>(std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *this, std::pair<unsigned short const ,unsigned long> *_Val); // idb
void __thiscall std::list<enum  ABSTATEINDEX,std::allocator<enum  ABSTATEINDEX>>::push_back(std::list<enum ABSTATEINDEX,std::allocator<enum ABSTATEINDEX> > *this, ABSTATEINDEX *_Val); // idb
std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *__thiscall std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::erase(std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *this, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *result, std::_Deque_const_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _First_arg, std::_Deque_const_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _Last_arg); // idb
void __thiscall std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::_Tidy(std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *this); // idb
void __thiscall std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::~deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>(std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *this); // idb
std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *__thiscall std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::erase(std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *this, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *result, std::_Deque_const_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _Where); // idb
void __thiscall std::map<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int>>>::~map<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int>>>(std::map<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *> > > *this); // idb
std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::_Max(std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *_Pnode); // idb
std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Min(std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *_Pnode); // idb
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>,std::_Iterator_base0>::operator++(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >,std::_Iterator_base0> *this); // idb
char **__cdecl Folder::Item();
char *__cdecl Folder::Ctrl(); // idb
signed int __cdecl CharClass::GetChrClassType(char kClassID);
void __thiscall NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *this, unsigned int key, NiPointer<PgWinBut> val); // idb
void __thiscall FindCullUpdateNode::~FindCullUpdateNode(FindRoomNode *this); // idb
void __thiscall CharResMgr::RemoveAllMobActor(CharResMgr *this); // idb
void __thiscall CharResMgr::RemoveAllCharSet(CharResMgr *this); // idb
void __thiscall CharResMgr::RemoveAllHair(CharResMgr *this); // idb
void __thiscall CharResMgr::RemoveAllFace(CharResMgr *this); // idb
void __thiscall CharResMgr::RemoveAllDropItem(CharResMgr *this); // idb
void __thiscall CharResMgr::RemoveAllItemUpgradeTextureEffect(CharResMgr *this); // idb
void __thiscall CharResMgr::RemoveAllHairDetailTexture(CharResMgr *this); // idb
void __thiscall CharResMgr::RemoveAllFaceTexture(CharResMgr *this); // idb
void __thiscall CharResMgr::RemoveAllFaceTattoo(CharResMgr *this); // idb
void __thiscall CharResMgr::RemoveAllClosedEye(CharResMgr *this); // idb
void __thiscall CharResMgr::RemoveAllSetTexture(CharResMgr *this); // idb
void __thiscall CharResMgr::RemoveAllController(CharResMgr *this); // idb
void __thiscall CharResMgr::RemoveQuestInfo(CharResMgr *this); // idb
void __thiscall BonePartitionReCreate::BonePartitionReCreate(BonePartitionReCreate *this, int BoneNum); // idb
NiActorManager *__thiscall CharResMgr::GetPigeonActor(CharResMgr *this); // idb
char __thiscall CharResMgr::CreateAnimationController(CharResMgr *this);
char __thiscall CharResMgr::CreateCharShakeNode(CharResMgr *this);
NiShader *__thiscall CharResMgr::GetCharShakeNode(CharResMgr *this);
signed int __thiscall BonePartitionReCreate::ProcessData(BonePartitionReCreate *this, NiAVObject *_pkObject, void *_pData);
NiNode *__thiscall CharResMgr::GetQuestInfo(CharResMgr *this, unsigned int dwQuestInfo, bool bLowRepeat); // idb
NiActorManager *__thiscall CharResMgr::GetRidePetActor(CharResMgr *this, unsigned __int16 kPetID); // idb
NiActorManager *__thiscall CharResMgr::GetMobActor(CharResMgr *this, unsigned __int16 kMobID); // idb
CharSet *__thiscall CharResMgr::GetCharSet(CharResMgr *this, char kClassID, char byGender, unsigned __int16 wNo); // idb
NiShaderLibrary *__thiscall CharResMgr::GetHairDetailTexture(CharResMgr *this, unsigned int dwID, const char *pchFileName);
NiNode *__thiscall CharResMgr::GetFace(CharResMgr *this, char kClassID, char byGender, unsigned __int16 wFaceType); // idb
NiSourceTexture *__thiscall CharResMgr::GetFaceTexture(CharResMgr *this, char kClassID, char byGender, unsigned __int16 wNo); // idb
NiShaderLibrary *__thiscall CharResMgr::GetFaceTattoo(CharResMgr *this, unsigned __int16 wNo);
NiSourceTexture *__thiscall CharResMgr::GetClosedEyeTexture(CharResMgr *this, char kClassID, char byGender, unsigned __int16 wNo); // idb
NiNode *__thiscall CharResMgr::GetDropItem(CharResMgr *this, unsigned __int16 kItemID); // idb
NiNode *__thiscall CharResMgr::GetItemUpgradeTextureEffect(CharResMgr *this, char ucEffNo); // idb
void __thiscall CharResMgr::ResetProperty(CharResMgr *this, NiAVObject *pkObject); // idb
char __stdcall CharResMgr::GetResourcePath(char *pResultPath, bool bNIFFile, const char *pcResourceName, char byGender, char kClassID);
char __thiscall CharResMgr::LoadCharSetRes(CharResMgr *this, char kClassID);
char __thiscall CharResMgr::LoadFaceTexture(CharResMgr *this, char kClassID);
char __thiscall CharResMgr::PreLoadItemUgradeTextureEffects(CharResMgr *this);
NiSourceTexture *__thiscall CharResMgr::GetSetTexture(CharResMgr *this, char kClassID, char byGender, unsigned __int16 kItemID); // idb
bool __thiscall CharResMgr::LoadAllCharSetRes(CharResMgr *this); // idb
bool __thiscall CharResMgr::LoadAllFaceTexture(CharResMgr *this); // idb
NiControllerSequence *__thiscall CharResMgr::GetControllerSequence(CharResMgr *this, char kClassID, char byGender, unsigned int dwAniEventCode); // idb
NiActorManager *__thiscall CharResMgr::GetMoverActor(CharResMgr *this, unsigned int kMoverID); // idb
NiActorManager *__thiscall CharResMgr::GetPetActor(CharResMgr *this, unsigned int kPetID); // idb
NiTexture *__thiscall CharResMgr::GetHairBaseTexFromMap(CharResMgr *this, HairInfo *pkHairInfo, char kClassID, char byGender, unsigned int uiType); // idb
void __thiscall CharResMgr::RemoveAllItem(CharResMgr *this); // idb
void __thiscall CharResMgr::RemoveAllHairTexture(CharResMgr *this); // idb
void __thiscall CharResMgr::RemoveAllHouse(CharResMgr *this); // idb
NiNode *__thiscall CharResMgr::GetHouse(CharResMgr *this, unsigned int dwHouse); // idb
NiNode *__thiscall CharResMgr::GetHair(CharResMgr *this, char kClassID, char byGender, char byHairIndexID, char byPartsNum, const char *pchModelName, const char *pchTexName); // idb
void __stdcall CharResMgr::SetHairTexture2TargetNode(NiNode *pkTargetNode, char byGender, char kClassID, const char *pchTexName);
NiSourceTexture *__thiscall CharResMgr::GetItemTexture(CharResMgr *this, const char *szName, char byPathRuleType);
NiNode *__thiscall CharResMgr::GetSubItem(CharResMgr *this, const char *szName, char kClassID, char byGender, const char *szTexName); // idb
void __thiscall CharResMgr::LoadHairParts(CharResMgr *this, char kClassID, char byGender, char byIndexID, char byPartsIndex, bool bUseLink, const char *pchModelName, const char *pchTexName); // idb
char __thiscall CharResMgr::PreLoadMinihouseRes(CharResMgr *this);
NiNode *__thiscall CharResMgr::GetItem(CharResMgr *this, unsigned __int16 kItemID, char byPathRuleType); // idb
char __thiscall CharResMgr::LoadHairSet(CharResMgr *this, char kClassID, char byGender, HairInfo *pkHairInfo);
char __thiscall CharResMgr::PreLoadItemRes(CharResMgr *this);
char __thiscall CharResMgr::LoadAllHairSetRes(CharResMgr *this);
char __thiscall CharResMgr::PreLoadCharRes(CharResMgr *this);
void __thiscall CharResMgr::RemoveAllCharActor(CharResMgr *this); // idb
void __thiscall CharResMgr::Terminate(CharResMgr *this); // idb
void __thiscall CharResMgr::~CharResMgr(CharResMgr *this); // idb
NiActorManager *__thiscall CharResMgr::GetCharActor(CharResMgr *this, char kClassID, char byGender, unsigned int uiFrame); // idb
void __thiscall CharResMgr::CharResMgr(CharResMgr *this); // idb
char __thiscall CharResMgr::CreateCharActorAndBaseSet(CharResMgr *this, char kClassID, char byGender);
bool __thiscall CharResMgr::Init(CharResMgr *this); // idb
void __thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Lrotate(std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *this, std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *_Wherenode); // idb
unsigned int __cdecl ITableBase<ChrBasicEquip,ChrBasicEquipTab>::GetTotal(); // idb
signed int __stdcall ResetTexture::ProcessData(NiAVObject *_pkObject, void *_pData);
void __thiscall CharResMgr::AddHouseToMap(CharResMgr *this, NiNode *pkNode, unsigned int dwHouseID); // idb
void __thiscall NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>::~NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>(NiTMapBase<DFALL<NiPointer<NiActorManager> >,unsigned long,NiPointer<NiActorManager> > *this); // idb
void __thiscall NiTMap<unsigned long,NiPointer<NiActorManager>>::~NiTMap<unsigned long,NiPointer<NiActorManager>>(NiTMap<unsigned long,NiPointer<NiActorManager> > *this); // idb
void __thiscall NiTMapBase<DFALL<NiPointer<CharSet>>,unsigned long,NiPointer<CharSet>>::~NiTMapBase<DFALL<NiPointer<CharSet>>,unsigned long,NiPointer<CharSet>>(NiTMapBase<DFALL<NiPointer<CharSet> >,unsigned long,NiPointer<CharSet> > *this); // idb
void __thiscall NiTMap<unsigned long,NiPointer<CharSet>>::~NiTMap<unsigned long,NiPointer<CharSet>>(NiTMap<unsigned long,NiPointer<CharSet> > *this); // idb
void __thiscall NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::~NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>(NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned long,NiPointer<NiNode> > *this); // idb
void __thiscall NiTMap<unsigned long,NiPointer<NiNode>>::~NiTMap<unsigned long,NiPointer<NiNode>>(NiTMap<unsigned long,NiPointer<NiNode> > *this); // idb
void __thiscall NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned char,NiPointer<NiNode>>::~NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned char,NiPointer<NiNode>>(NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned char,NiPointer<NiNode> > *this); // idb
void __thiscall NiTMap<unsigned char,NiPointer<NiNode>>::~NiTMap<unsigned char,NiPointer<NiNode>>(NiTMap<unsigned char,NiPointer<NiNode> > *this); // idb
void __thiscall NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>::~NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>(NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,unsigned long,NiPointer<NiSourceTexture> > *this); // idb
void __thiscall NiTMap<unsigned long,NiPointer<NiSourceTexture>>::~NiTMap<unsigned long,NiPointer<NiSourceTexture>>(NiTMap<unsigned long,NiPointer<NiSourceTexture> > *this); // idb
NiTMapBase<DFALL<NiPointer<NiActorManager> >,unsigned long,NiPointer<NiActorManager> > *__thiscall NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>::`scalar deleting destructor'(NiTMapBase<DFALL<NiPointer<NiActorManager> >,unsigned long,NiPointer<NiActorManager> > *this, unsigned int a2);
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<unsigned long,NiPointer<NiActorManager>>::`scalar deleting destructor'(NiTMap<unsigned long,NiPointer<NiActorManager> > *this, unsigned int a2);
NiTMapBase<DFALL<NiPointer<CharSet> >,unsigned long,NiPointer<CharSet> > *__thiscall NiTMapBase<DFALL<NiPointer<CharSet>>,unsigned long,NiPointer<CharSet>>::`vector deleting destructor'(NiTMapBase<DFALL<NiPointer<CharSet> >,unsigned long,NiPointer<CharSet> > *this, unsigned int a2);
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<unsigned long,NiPointer<CharSet>>::`scalar deleting destructor'(NiTMap<unsigned long,NiPointer<CharSet> > *this, unsigned int a2);
NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned long,NiPointer<NiNode> > *__thiscall NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::`vector deleting destructor'(NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned long,NiPointer<NiNode> > *this, unsigned int a2);
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<unsigned long,NiPointer<NiNode>>::`vector deleting destructor'(NiTMap<unsigned long,NiPointer<NiNode> > *this, unsigned int a2);
NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned char,NiPointer<NiNode> > *__thiscall NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned char,NiPointer<NiNode>>::`vector deleting destructor'(NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned char,NiPointer<NiNode> > *this, unsigned int a2);
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<unsigned char,NiPointer<NiNode>>::`scalar deleting destructor'(NiTMap<unsigned char,NiPointer<NiNode> > *this, unsigned int a2);
NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,unsigned long,NiPointer<NiSourceTexture> > *__thiscall NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>::`vector deleting destructor'(NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,unsigned long,NiPointer<NiSourceTexture> > *this, unsigned int a2);
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<unsigned long,NiPointer<NiSourceTexture>>::`vector deleting destructor'(NiTMap<unsigned long,NiPointer<NiSourceTexture> > *this, unsigned int a2);
void __thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::_Lrotate(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *this, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *_Wherenode); // idb
char __cdecl ChrBasicEquipTab::GetByIndex(ChrClassType eChrClassType, char byGender); // idb
NiKFMTool::Sequence *__thiscall NiKFMTool::GetSequence(NiKFMTool *this, unsigned int uiSequenceID); // idb
NiUnsharedGeometryGroup *__cdecl CharClass::GetBaseEngName(char kClassID);
NiActorManager *__thiscall CharResMgr::GetCharActorFromMap(CharResMgr *this, char kClassID, char byGender); // idb
NiActorManager *__thiscall CharResMgr::GetCharActorFromMap_NoClone(CharResMgr *this, char kClassID, char byGender); // idb
NiActorManager *__thiscall CharResMgr::GetRidePetActorFromMap(CharResMgr *this, unsigned __int16 wPetID); // idb
NiActorManager *__thiscall CharResMgr::GetMoverActorFromMap(CharResMgr *this, unsigned int kMoverID); // idb
NiActorManager *__thiscall CharResMgr::GetPetActorFromMap(CharResMgr *this, unsigned int kPetID); // idb
NiActorManager *__thiscall CharResMgr::GetMobActorFromMap(CharResMgr *this, unsigned __int16 kMobID); // idb
CharSet *__thiscall CharResMgr::GetCharSetFromMap(CharResMgr *this, char kClassID, char byGender, unsigned __int16 wNo); // idb
NiNode *__thiscall CharResMgr::GetHouseFromMap(CharResMgr *this, unsigned int dwHouseID); // idb
NiNode *__thiscall CharResMgr::GetQuestInfoFromMap(CharResMgr *this, unsigned int dwQuestInfo); // idb
NiNode *__thiscall CharResMgr::GetHairFromMap(CharResMgr *this, char kClassID, char byGender, char byID, char byPartsNum); // idb
NiNode *__thiscall CharResMgr::GetFaceFromMap(CharResMgr *this, char kClassID, char byGender, unsigned __int16 wType); // idb
NiNode *__thiscall CharResMgr::GetItemFromMap(CharResMgr *this, unsigned __int16 kItemID, char byParsingType); // idb
NiNode *__thiscall CharResMgr::GetDropItemFromMap(CharResMgr *this, unsigned __int16 kItemID); // idb
NiSourceTexture *__thiscall CharResMgr::GetFaceTextureFromMap(CharResMgr *this, char kClassID, char byGender, unsigned __int16 wNo); // idb
NiSourceTexture *__thiscall CharResMgr::GetSetTextureFromMap(CharResMgr *this, char kClassID, char byGender, unsigned __int16 kItemID); // idb
void __thiscall CharResMgr::AddMoverActorToMap(CharResMgr *this, NiActorManager *pkActor, unsigned int kMoverID); // idb
void __thiscall CharResMgr::AddPetActorToMap(CharResMgr *this, NiActorManager *pkActor, unsigned int kPetID); // idb
NiSourceTexture *__thiscall CharResMgr::GetClosedEyeFromMap(CharResMgr *this, char kClassID, char byGender, unsigned __int16 wNo); // idb
void __thiscall CharResMgr::AddSetTextureToMap(CharResMgr *this, NiSourceTexture *pkTexture, char kClassID, char byGender, unsigned __int16 kItemID); // idb
void __stdcall NiTMap<unsigned long,NiPointer<NiActorManager>>::DeleteItem(NiTMapItem<char const *,NiPointer<NiD3DXEffectTechniqueSet> > *pkItem);
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::find(std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *result, NiActorManager *const *_Keyval); // idb
std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Buynode<std::pair<int,NiPointer<stGlobalLightInfo>> &>(std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *this, std::pair<unsigned long const ,NiPointer<NiControllerSequence> > *_Val); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,NiPointer<NiSourceTexture>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,NiPointer<NiSourceTexture>>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *_Node, bool _Leftish); // idb
void __thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::_Erase(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *this, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *_Rootnode); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::erase(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > _Where); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > _Where, std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *_Node); // idb
NiNode *__thiscall CharResMgr::GetSubItemFromMap(CharResMgr *this, const char *szName); // idb
NiTexture *__thiscall CharResMgr::GetSubItemTextureMap(CharResMgr *this, const char *szName); // idb
NiTexture *__thiscall CharResMgr::GetItemTextureMap(CharResMgr *this, const char *szName); // idb
NiTexture *__thiscall CharResMgr::GetMiniHouseTextureMap(CharResMgr *this, const char *szName); // idb
NiTexture *__thiscall CharResMgr::GetHairTextureFromMap(CharResMgr *this, const char *szName); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *_Newnode); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::erase(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > _Last); // idb
void __thiscall std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>(std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *this, std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *_Right); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *_Node, bool _Leftish); // idb
NiPointer<NiControllerSequence> *__thiscall std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>::operator[](std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *this, const unsigned int *_Keyval); // idb
std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *__thiscall std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>::operator=(std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *this, std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *_Right); // idb
void __thiscall std::map<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>>::~map<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>>(std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *this); // idb
void __thiscall mhGameMainConnectMgr::mhGameMainConnectMgr(std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *this); // idb
void __thiscall std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>::~pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>(std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > *this); // idb
void __thiscall CharResMgr::AddSubItemToMap(CharResMgr *this, NiNode *pkNode, const char *szName); // idb
void __thiscall CharResMgr::AddSubItemTextureToMap(CharResMgr *this, NiTexture *pkTexture, const char *szName); // idb
void __thiscall CharResMgr::AddItemTextureToMap(CharResMgr *this, NiTexture *pkTexture, const char *szName); // idb
void __thiscall CharResMgr::AddMiniHouseTextureToMap(CharResMgr *this, NiTexture *pkTexture, const char *szName); // idb
void __thiscall CharResMgr::AddHairTextureToMap(CharResMgr *this, NiTexture *pkTexture, const char *szName); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *_Newnode); // idb
std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Buynode<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>(std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *this, std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > *_Val); // idb
void __thiscall std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Erase(std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *this, std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *_Rootnode); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::erase(std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > _Where); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *_Node, bool _Leftish); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::erase(std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > _Last); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > _Where, std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *_Node); // idb
std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *__thiscall std::map<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>>::operator[](std::map<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > > > *this, NiActorManager *const *_Keyval); // idb
void __thiscall std::map<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>>::~map<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>>(std::map<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > > > *this); // idb
void __thiscall CharSet::CharSet(CharSet *this); // idb
void __thiscall CharSet::~CharSet(CharSet *this); // idb
char __thiscall CharSet::SetNormalGeometry(CharSet *this);
char __thiscall CharSet::SetLodGeometry(CharSet *this, int _nLodLevel, const char *_pLodNodeName);
bool __thiscall CharSet::Init(CharSet *this, NiNode *pkNode); // idb
CharSet *__thiscall CharSet::`scalar deleting destructor'(CharSet *this, unsigned int a2);
void __thiscall CharShape::SetRidePetID(CharShape *this, unsigned int uiID); // idb
unsigned int __thiscall CharShape::GetRidePetID(CharShape *this); // idb
void __thiscall CharShape::ClearEquipInfo(CharShape *this); // idb
unsigned __int16 __thiscall CharShape::GetRightHandEquipppedItemID(CharShape *this, char *rbyUpgrade); // idb
unsigned __int16 __thiscall CharShape::GetLeftHandEquippedItemID(CharShape *this, char *rbyUpgrade); // idb
unsigned __int16 __thiscall CharShape::GetRightHandAccItemID(CharShape *this); // idb
unsigned __int16 __thiscall CharShape::GetLeftHandAccItemID(CharShape *this); // idb
unsigned __int16 __thiscall CharShape::GetCosShieldItemID(CharShape *this); // idb
void __thiscall CharShape::ShowLinkNode(CharShape *this, CharShape::LinkIndex eLinkIndex, bool bShow); // idb
void __thiscall CharShape::ShowAllLinkNode(CharShape *this, bool bShow); // idb
void __thiscall CharShape::SetAnotherEyeShape(CharShape *this, NiNode *pkShapeNode); // idb
void __thiscall CharShape::ResetAnotherEyeShape(CharShape *this); // idb
bool __thiscall CharShape::IsSpactralGlowEnable(CharShape *this); // idb
char __thiscall CharShape::SetSPactralGlowEnable(CharShape *this, bool bEnable);
void __thiscall CharShape::SetShowMiniMonAutoPickEff(CharShape *this, int bShow);
void __thiscall CharShape::ShowMinimonAutoUseEff(CharShape *this, int bShow);
CSpactralGlow_Shader_Controller *__thiscall CharShape::GetShader_Ctrl(CharShape *this); // idb
void __thiscall CharShape::SetGTIBomb(CharShape *this, bool b); // idb
void __thiscall ItemUpGrade::GetEffectHandle(ItemUpGrade *this, unsigned int _uiEquipPos, unsigned int *_dwEffectIndex0, unsigned int *_dwEffectIndex1); // idb
void __thiscall ItemUpGrade::RemoveEffect(ItemUpGrade *this, unsigned int _uiEquipPos); // idb
void __thiscall ItemUpGrade::SetShow(ItemUpGrade *this, int _bShow);
void __thiscall ItemUpGrade::SetShow(ItemUpGrade *this, unsigned int _uiEquipPos, int _bShow);
void __thiscall CharShape::SetEquipInfo(CharShape *this, PROTO_EQUIPMENT *pkInfo); // idb
void __thiscall CharShape::CatchHeight(CharShape *this); // idb
char __thiscall CharShape::Equip(CharShape *this, unsigned __int16 kItemID, char byUpdrade);
char __thiscall CharShape::TextureFace(CharShape *this, NiTexture *pkTexture);
char __thiscall CharShape::SetLodGeometry(CharShape *this, int _nLodLevel, const char *_pLodNodeName);
char __thiscall CharShape::Link(CharShape *this, CharShape::LinkIndex eLinkIndex, NiNode *pkItemNode, unsigned int uiEquipPos);
char __thiscall CharShape::CatchFaceGeom(CharShape *this, NiAVObject *pkObject);
char __thiscall CharShape::LookAt(CharShape *this, NiPoint3 *kLookAt);
void __thiscall CharShape::SetHairPartsVisible(CharShape *this, char byVisibleMask); // idb
ItemInfo *__thiscall CharShape::GetEquippedWeaponItemInfo(CharShape *this); // idb
signed int __thiscall CharShape::Get3thAniEventCodeByWeapon(CharShape *this);
void __thiscall CharShape::StopWeaponAfterImgEff(CharShape *this); // idb
void __thiscall CharShape::EnableEyeShape(CharShape *this, char byEnableType); // idb
void __stdcall CharShape::DetachOtherSideNode(NiNode *pkNode, char *kNodeName);
ItemInfo *__thiscall CharShape::GetEquippedShiledItemInfo(CharShape *this); // idb
void __thiscall ItemUpGrade::SetEffectHandle(ItemUpGrade *this, unsigned int _uiEquipPos, unsigned int _dwEffectIndex0, unsigned int _dwEffectIndex1); // idb
void __thiscall CharShape::SetShapeInfo(CharShape *this, PROTO_AVATAR_SHAPE_INFO *pkInfo); // idb
void __thiscall CharShape::SetVisibleSubParts(CharShape *this, CharShape::LinkIndex enumIndex, bool bVisible); // idb
NiNode *__thiscall CharShape::SetSubItem(CharShape *this, CharShape::LinkIndex enumIndex, const char *szNifName, const char *szSubItemTextureName, const char *szSubItemNode, CharShape::AttachType eAttachType); // idb
char __thiscall CharShape::Equip(CharShape *this, unsigned int uiEquipPos, unsigned __int16 kItemID, char byUpdrade);
char __thiscall CharShape::Equip_LinkItem(CharShape *this, ItemInfo *pkItemInfo, unsigned int uiEquipPos, NiNode *pkNode, bool _bTwoHand);
char __stdcall CharShape::TextureFace(NiNode *pkTargetNode, NiTexture *pkTexture);
char __stdcall CharShape::TextureClosedEye(NiNode *pkTargetNode, NiTexture *pkTexture);
char __thiscall CharShape::TextureFaceTattoo(CharShape *this, NiTexture *pkTexture);
char __thiscall CharShape::TextureBody(CharShape *this, NiTexture *pkTexture);
char __thiscall CharShape::TextureLeg(CharShape *this, NiTexture *pkTexture);
char __thiscall CharShape::TextureShoes(CharShape *this, NiTexture *pkTexture);
NiNode *__cdecl FindBoneRootNodes(NiNode *pkNode); // idb
void __thiscall CharShape::SetHairParts(CharShape *this, char byPartsIndex, char byIndexID, bool bUseLink, const char *pchModelName, const char *pchTexName); // idb
void __thiscall CharShape::EquipAllAvatar(CharShape *this); // idb
void __thiscall CharShape::EquipAll(CharShape *this); // idb
void __thiscall CharShape::Update(CharShape *this, float fTime); // idb
void __thiscall CharShape::StartWeaponAfterImgEff(CharShape *this, float fCurTime, float fLifeTime); // idb
// void __userpurge CharShape::SetMiniMonEffect(CharShape *this@<ecx>, int a2@<edi>, int bIsAttach);
// void __userpurge CharShape::SetMinimonAutoUseEff(CharShape *this@<ecx>, int a2@<esi>, int bIsAttach);
void __thiscall CharShape::StartChestAfterImgEff(CharShape *this); // idb
void __cdecl CatchAllGeometry(NiAVObject *pkObject, PgTList<NiGeometry *> *kList); // idb
void __thiscall CharShape::UpdateFaceShape(CharShape *this); // idb
void __thiscall CharShape::RemoveMinimonEff(CharShape *this, unsigned int uiUnEquipPos, MinimonRoleType RoleType); // idb
void __thiscall CharShape::ClearModelPart(CharShape *this); // idb
char __thiscall CharShape::SetMobModelPart(CharShape *this, NiNode *pkNode);
char __stdcall ItemUpGrade::SetUpgradeTextureEff(NiNode *_pNode, char ucEffNo, std::list<char *,std::allocator<char *> > *AttachedNode);
void __thiscall CharShape::RemoveAllSubItem(CharShape *this, unsigned int uiEquipPos_Enum); // idb
char __thiscall CharShape::SetCharModelPart(CharShape *this, NiNode *pkNode);
void __thiscall CharShape::HideAllHair(CharShape *this); // idb
char __thiscall CharShape::SetHairDetailMap(CharShape *this, unsigned int uiHaircolorID);
void __thiscall CharShape::~CharShape(CharShape *this); // idb
char __thiscall CharShape::SetModelPart(CharShape *this, NiNode *pkNode);
void __thiscall CharShape::MakeHairSet(CharShape *this, char byID); // idb
void __thiscall CharShape::CharShape(CharShape *this); // idb
char __thiscall CharShape::SetSubItem(CharShape *this, ItemEquipEnum eEquipPos, DummyTypeEnum eInx, const char *szNifName, const char *szSubItemTextureName, const char *szSubItemNode);
char __thiscall ItemUpGrade::UpGradeItem(ItemUpGrade *this, Item *_pItem, NiNode *_pNode, ItemEquipEnum eEquipNum);
void __thiscall CharShape::CreateWeaponCostumeEffect(CharShape *this, ItemInfo *pkItemInfo, NiNode *pkNode); // idb
void __thiscall CharShape::CreateShieldCostumeEffect(CharShape *this, ItemInfo *pkItemInfo, NiNode *pkNode); // idb
void __thiscall CharShape::EquipSubItem(CharShape *this, ItemInfo *pkItemInfo, ItemViewInfo *pkViewInfo); // idb
char __thiscall CharShape::ChangeBoneLODController(CharShape *this, int _nLodLevel, NiGeometry *_pkDestGeom, NiGeometry *_pkSrcGeom, NiGeometry *_pkNewGeom);
char __thiscall CharShape::ChangeGeom(CharShape *this, NiGeometry **pkCurGeom, NiGeometry *pkChgGeom, int nLodLevel);
char __thiscall CharShape::SetBody(CharShape *this, CharSet *pkSet);
char __thiscall CharShape::SetLeg(CharShape *this, CharSet *pkSet);
char __thiscall CharShape::SetShoes(CharShape *this, CharSet *pkSet);
char __thiscall CharShape::Equip_SetItem(CharShape *this, unsigned int uiEquipPos, CharSet *pkSet, NiTexture *pkTexture);
char __thiscall CharShape::ResetBody(CharShape *this);
char __thiscall CharShape::ResetLeg(CharShape *this);
char __thiscall CharShape::ResetShoes(CharShape *this);
char __thiscall CharShape::EquipBody(CharShape *this);
char __thiscall CharShape::EquipLeg(CharShape *this);
char __thiscall CharShape::EquipShoes(CharShape *this);
char __thiscall CharShape::RemoveBody(CharShape *this);
char __thiscall CharShape::RemoveLeg(CharShape *this);
char __thiscall CharShape::RemoveShoes(CharShape *this);
void __thiscall CharShape::CheckOldCos(CharShape *this, ItemViewInfo *pkOldViewInfo, ItemEquipEnum eItemEquipType, bool *pbaRemovedStateFlag); // idb
void __thiscall CharShape::MultiSlotCosUnEquip(CharShape *this, ItemViewInfo *pkOldViewInfo); // idb
char __thiscall CharShape::MultiSlotCosProcess(CharShape *this, ItemInfo *pkItemInfo);
// char __userpurge CharShape::Equip@<al>(CharShape *this@<ecx>, int a2@<ebx>, Item *_pItem);
// char __userpurge CharShape::Equip@<al>(CharShape *this@<ecx>, int a2@<ebx>, ItemInfo *pkItemInfo);
// void __usercall CharShape::ReEquipWeaponCostume(CharShape *this@<ecx>, int a2@<ebx>);
char __thiscall CharShape::Equip(CharShape *this, int kItemID);
bool __thiscall CharShape::UnEquip(CharShape *this, unsigned int uiEquipPos); // idb
void __thiscall CharShape::ReEquipShieldCostume(CharShape *this); // idb
void __thiscall CharShape::RestoreHatAcc(CharShape *this); // idb
void __thiscall ItemUpGrade::RemoveAll(ItemUpGrade *this); // idb
char __cdecl Math3D::FrontVectToRot(NiPoint3 *kFrontVect, NiMatrix3 *kRot);
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::~NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>(NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *> *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *> *this, unsigned int a2);
void __thiscall NiSkinInstance::NiSkinInstance(NiSkinInstance *this, NiSkinData *pkSkinData, NiAVObject *pkRootParent, NiAVObject **ppkBones); // idb
NiRTTI *NiSkinInstance::GetRTTI();
NiSkinInstance *__thiscall NiSkinInstance::`vector deleting destructor'(NiSkinInstance *this, unsigned int a2);
void __thiscall RewardInvItem::SetItem(NiObjectNET *this, NiTimeController *pkControl); // idb
unsigned int __thiscall NiBoneLODController::GetSetAt(NiBoneLODController *this, int nInLodLevel, NiTriBasedGeom *pkInGeom, NiSkinInstance **pkOutSkinInst); // idb
char __thiscall NiBoneLODController::SetAt(NiBoneLODController *this, int nLodLevel, int nIndex, NiTriBasedGeom *pkGeom, NiSkinInstance *pkSkinInst);
void __thiscall NiBoneLODController::ReplaceSkinSet(NiBoneLODController *this, NiTriBasedGeom *pkOldSkin, NiTriBasedGeom *pkNewSkin); // idb
void __cdecl std::_Distance2<std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<enum  ItemEquipEnum,NiNode *,std::less<enum  ItemEquipEnum>,std::allocator<std::pair<enum  ItemEquipEnum const,NiNode *>>,1>>>,unsigned int>(std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > > _Last, unsigned int *_Off);
void __thiscall NiGeometry::SetSkinInstance(NiGeometry *this, NiSkinInstance *pSkinInstance); // idb
void __thiscall AfterImgEff::SetActor(AfterImgEff *this, NiActorManager *_pActor); // idb
ItemInfo *__thiscall CharShape::GetEquippedCosWeaponItemInfo(CharShape *this); // idb
char __thiscall CharShape::LinkFace(CharShape *this, NiNode *pkNode);
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>(NiTPointerList<NiGeometry *> *this); // idb
NiTPointerList<NiGeometry *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::`scalar deleting destructor'(NiTPointerList<NiGeometry *> *this, unsigned int a2);
void __thiscall PgTList<NiGeometry *>::~PgTList<NiGeometry *>(PgTList<NiGeometry *> *this); // idb
ItemViewEquipTypeInfo *__cdecl ItemViewEquipTypeInfoTab::GetByIVET(IVEType eType); // idb
UpEffectData *__cdecl UpEffectTab::GetObjByID(unsigned __int16 ID); // idb
PgTList<NiGeometry *> *__thiscall PgTList<NiGeometry *>::`vector deleting destructor'(PgTList<NiGeometry *> *this, unsigned int a2);
std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > >,std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > > > *__thiscall std::_Tree<std::_Tmap_traits<enum  ItemEquipEnum,NiNode *,std::less<enum  ItemEquipEnum>,std::allocator<std::pair<enum  ItemEquipEnum const,NiNode *>>,1>>::_Eqrange(std::_Tree<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > *this, std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > >,std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > > > *result, ItemEquipEnum *_Keyval); // idb
void __thiscall std::list<enum  ABSTATEINDEX,std::allocator<enum  ABSTATEINDEX>>::list<enum  ABSTATEINDEX,std::allocator<enum  ABSTATEINDEX>>(std::list<enum ABSTATEINDEX,std::allocator<enum ABSTATEINDEX> > *this); // idb
void __thiscall std::list<NiAVObject *,std::allocator<NiAVObject *>>::pop_front(std::list<NiAVObject *,std::allocator<NiAVObject *> > *this); // idb
signed int __stdcall FindHairNode::ProcessData(NiAVObject *_pkObject, void *_pData);
signed int __stdcall FindFaceNode::ProcessData(NiAVObject *_pkObject, void *_pData);
signed int __stdcall FindGeometry::ProcessData(NiAVObject *_pkObject, void *_pData);
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<enum  ItemEquipEnum,NiNode *,std::less<enum  ItemEquipEnum>,std::allocator<std::pair<enum  ItemEquipEnum const,NiNode *>>,1>>::insert<std::pair<enum  ItemEquipEnum const,NiNode *>>(std::_Tree<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > >,bool> *result, std::pair<enum ItemEquipEnum const ,NiNode *> *_Val); // idb
std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > *__cdecl ItemViewDummyTab::GetListByInxName(std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > *result, const char *InxName); // idb
CharShape *__thiscall CharShape::`vector deleting destructor'(CharShape *this, unsigned int a2);
void __thiscall FindBoneNode::~FindBoneNode(FindBoneNode *this); // idb
void __thiscall FindBoneNode::FindBoneNode(FindBoneNode *this, NiNode **ppNode, int nArry, const char *szName); // idb
int __thiscall FindBoneNode::ProcessData(FindBoneNode *this, NiAVObject *_pkObject, void *_pData);
signed int __thiscall MainChar::ChooseAttack(MainChar *this);
bool __thiscall MainChar::PositionSinkTest(MainChar *this, float fXPos, float fYPos); // idb
void __thiscall MainChar::SetRevserveMovePos(MainChar *this, NiPoint3 *kPos); // idb
NiPoint3 *__thiscall MainChar::GetRevserveMovePos(MainChar *this); // idb
BOOL __thiscall MainChar::IsEndPathFinding(MainChar *this);
bool __thiscall MainChar::IsDuringMove(MainChar *this); // idb
void __thiscall MainChar::AdjustHeadWeightsValue(MainChar *this); // idb
int __thiscall MainChar::IsVisible(MainChar *this); // idb
void __thiscall MainChar::SetReserveAct(MainChar *this, MainChar::ReserveAct eReserveAct); // idb
void __thiscall MainChar::SetStartReserveAct(MainChar *this, MainChar::ReserveAct _eReserveAct); // idb
void __thiscall MainChar::SetTOTChar(MainChar *this, unsigned __int16 pkChar); // idb
MobType __thiscall MainChar::GetMetamorphosisType(MainChar *this);
bool __thiscall MainChar::IsMetamorphosis(MainChar *this); // idb
void __thiscall MainChar::EndPathFind(MainChar *this, NiPoint3 *kEndPos); // idb
bool __thiscall MainChar::GetIsNotTargetChangeAndNotMoveMsg(MainChar *this); // idb
void __thiscall MainChar::SetIsNotTargetChangeAndNotMoveMsg(MainChar *this, bool val); // idb
void __thiscall MainChar::EnableAirBorne(MainChar *this, bool b, unsigned __int16 kID); // idb
bool __thiscall MainChar::IsAirBorneState(MainChar *this); // idb
unsigned __int16 __thiscall MainChar::GetAirBorneID(MainChar *this); // idb
unsigned int MainChar::GetCharLevel();
void __thiscall MainChar::MainChar(MainChar *this); // idb
void __thiscall MainChar::~MainChar(MainChar *this); // idb
char __thiscall MainChar::Init(MainChar *this, PROTO_NC_CHAR_MAPLOGIN_ACK *p);
char __thiscall MainChar::TryMove(MainChar *this, float fCurTime);
char __thiscall MainChar::TryMove8(MainChar *this, float fCurTime);
void __thiscall MainChar::StopMove(MainChar *this, int bAbstateTest);
void __thiscall MainChar::StopMove(MainChar *this, float fXPos, float fYPos, int bAbstateTest);
void __thiscall MainChar::StartPathFinding(MainChar *this); // idb
void __thiscall MainChar::UpdatePathFinding(MainChar *this); // idb
void __thiscall MainChar::CulNextMovePosition(MainChar *this); // idb
char __thiscall MainChar::IsPassTargetPosition(MainChar *this);
bool __thiscall MainChar::IsPassResTargetPosition(MainChar *this); // idb
bool __thiscall MainChar::IsView(MainChar *this, NiPoint3 *pos3Pos); // idb
char __thiscall MainChar::InitCharactorWeaponTitle(MainChar *this, char currentTitle, unsigned __int16 currentTitleMobID);
signed int __stdcall MainChar::GetObjType(Char *pkTargetObj);
// void __userpurge MainChar::GetCameraLookAt(MainChar *this@<ecx>, double a2@<st0>, NiPoint3 *kLookAt);
void __thiscall MainChar::OnWarpMove(MainChar *this, SHINE_XY_TYPE targetpoint, int SkillID);
bool __thiscall MainChar::IsAvailableStateReserveSkill(MainChar *this); // idb
void __thiscall MainChar::InitJump(MainChar *this); // idb
bool __thiscall MainChar::IsSkillUsableState(MainChar *this); // idb
bool __thiscall MainChar::IsCharTargetableState(MainChar *this, Char *pkChar); // idb
void __thiscall MainChar::CancelMHEmotion(MainChar *this); // idb
void __thiscall MainChar::CancelEmotion(MainChar *this); // idb
void __thiscall MainChar::Affect(MainChar *this, AbStateInst *pkAbState, bool bNoVisual); // idb
bool __thiscall MainChar::InitView(MainChar *this, unsigned int uiFrame); // idb
void __thiscall MainChar::UpdateMoveProgress(MainChar *this); // idb
char __thiscall MainChar::InitCharactorTitle(MainChar *this, PROTO_NC_CHAR_CLIENT_CHARTITLE_CMD *pkProto);
void __thiscall MainChar::SetTargetChar(MainChar *this, Char *pkChar); // idb
void __thiscall MainChar::MetamorphosisTargetClear(MainChar *this); // idb
void __thiscall MainChar::ExecuteDyingProcess(MainChar *this); // idb
void __thiscall MainChar::Update(MainChar *this, float fTime); // idb
void __thiscall MainChar::StartMoveTarget(MainChar *this); // idb
void __thiscall MainChar::ActEmotionIndex(MainChar *this, unsigned int uiEmotionIndex); // idb
int __thiscall MainChar::GetTargetType(MainChar *this, Char *pkTarget);
void __thiscall MainChar::ResetOnLink(MainChar *this); // idb
NiPoint3 *__thiscall NpNs_MoveToTarget::GetCurrentPos(NpNs_MoveToTarget *this); // idb
MainChar *__thiscall MainChar::`vector deleting destructor'(char *this, unsigned int a2);
MainChar *__thiscall MainChar::`vector deleting destructor'(char *this, unsigned int a2);
char __thiscall MainChar::SetTargetAnimation(MainChar *this, unsigned int uiAniEventCode);
double MainChar::GetCameraLookHeight();
void __thiscall MainChar::SetDir(Char *this, NiPoint3 *kDir); // idb
void __thiscall MainChar::StopMoveTarget(MainChar *this); // idb
NiNode *__thiscall MainChar::GetCollider(MainChar *this); // idb
void __thiscall MainChar::InitPos(MainChar *this, NiPoint3 *kPos, NiPoint3 *kDir); // idb
void __thiscall MainChar::SetPos(MainChar *this, NiPoint3 *kPos); // idb
MainChar *__thiscall MainChar::`scalar deleting destructor'(MainChar *this, unsigned int a2);
void __thiscall MoveToTarget::Copy(MoveToTarget *this, MoveToTarget *kMoveToTarget); // idb
void __thiscall MoveToTarget::MoveToTarget(MoveToTarget *this); // idb
void __thiscall MoveToTarget::~MoveToTarget(MoveToTarget *this); // idb
void __thiscall MoveToTarget::ChangeSpeed(MoveToTarget *this, float fSpeed); // idb
// void __userpurge MoveToTarget::SetEmotion(MoveToTarget *this@<ecx>, double a2@<st0>, bool bEmotion);
void __thiscall MoveToTarget::SetSpeed(MoveToTarget *this, float _fMovingSpeed); // idb
void __thiscall NpNs_MoveToTarget::SetSpeed(NpNs_MoveToTarget *this, float _fMovingSpeed); // idb
bool __thiscall NpNs_MoveToTarget::IsMove(NpNs_MoveToTarget *this); // idb
double __thiscall NpNs_MoveToTarget::GetSpeed(NpNs_MoveToTarget *this);
void __thiscall NpNs_MoveToTarget::SetCurrentPos(NpNs_MoveToTarget *this, NiPoint3 *_pos3); // idb
NiPoint3 *__thiscall NpNs_MoveToTarget::GetMoveDir(NpNs_MoveToTarget *this); // idb
NiPoint3 *__thiscall NpNs_MoveToTarget::GetOldPos(NpNs_MoveToTarget *this); // idb
void __thiscall NpNs_MoveToTarget::GetCurrentPos(NpNs_MoveToTarget *this, NiPoint3 *pos3_); // idb
void __thiscall NpNs_MoveToTarget::GetMoveDir(NpNs_MoveToTarget *this, NiPoint3 *pos3_); // idb
void __thiscall NpNs_MoveToTarget::GetOldPos(NpNs_MoveToTarget *this, NiPoint3 *pos3_); // idb
void __thiscall Ns_XYFlatMoveToTarget::StartMove(Ns_XYFlatMoveToTarget *this, float _fTime, NiPoint3 *_pos3Start, NiPoint3 *_pos3Target); // idb
void __thiscall Ns_XYFlatMoveToTarget::StartMove(Ns_XYFlatMoveToTarget *this, float _fTime, NiPoint3 *_pos3Target); // idb
void __thiscall Ns_XYFlatMoveToTarget::StartMove(Ns_XYFlatMoveToTarget *this, NiPoint3 *_pos3Start, NiPoint3 *_pos3Target); // idb
void __thiscall Ns_XYFlatMoveToTarget::StartMove(Ns_XYFlatMoveToTarget *this, NiPoint3 *_pos3Target); // idb
void __thiscall Ns_XYFlatMoveToTarget::SetCalcuCurrentPos(Ns_XYFlatMoveToTarget *this, NiPoint3 *_pos3); // idb
MoveToTarget *__thiscall Ns_XYFlatMoveToTarget::`vector deleting destructor'(MoveToTarget *this, unsigned int a2);
void __thiscall ObjectChar::ObjectChar(ObjectChar *this); // idb
void __thiscall ObjectChar::~ObjectChar(ObjectChar *this); // idb
// void __userpurge ObjectChar::ActInitStand(ObjectChar *this@<ecx>, int a2@<edi>, bool bIsMob);
// void __usercall ObjectChar::ActDie1(ObjectChar *this@<ecx>, int a2@<ebx>, int a3@<edi>);
ObjectChar *__thiscall ObjectChar::`vector deleting destructor'(char *this, unsigned int a2);
ObjectChar *__thiscall ObjectChar::`vector deleting destructor'(char *this, unsigned int a2);
ObjectChar *__thiscall ObjectChar::`scalar deleting destructor'(ObjectChar *this, unsigned int a2);
int __cdecl PortraitTextureBuffer::MatchCharacterPortraitFaceIDWithDatabase(char SHNID); // idb
NiSourceTexture *__cdecl PortraitTextureBuffer::GetBlackTexture();
NiSourceTexture *__cdecl PortraitTextureBuffer::GetDefaultTexture();
NiSourceTexture *__cdecl PortraitTextureBuffer::GetMetaMobPortrait(unsigned __int16 id);
NiSourceTexture *__cdecl PortraitTextureBuffer::GetMainCharPortrait(Char *pkChar);
void __cdecl PortraitTextureBuffer::Terminate(); // idb
// NiSourceTexture *__usercall PortraitTextureBuffer::GetOtherCharPortrait@<eax>(int a1@<ebx>, unsigned int uiClass, unsigned int uiGender, unsigned int uiFace, unsigned int uiHair, unsigned int uiColor, unsigned __int16 kMobID, unsigned int uiLvGapIndex, unsigned int uiCamPos);
NiSourceTexture *__cdecl PortraitTextureBuffer::GetMobPortrait(unsigned __int16 id);
NiSourceTexture *__cdecl PortraitTextureBuffer::GetMoverPortrait(unsigned int kMoverID);
NiSourceTexture *__cdecl PortraitTextureBuffer::GetPetPortrait(unsigned int kPetID);
NiSourceTexture *__cdecl PortraitTextureBuffer::GetOtherCharPortrait(Char *pkChar);
void __thiscall NiTListBase<DFALL<NiPointer<NiTexture>>,NiPointer<NiTexture>>::~NiTListBase<DFALL<NiPointer<NiTexture>>,NiPointer<NiTexture>>(NiTListBase<DFALL<NiPointer<NiTexture> >,NiPointer<NiTexture> > *this); // idb
NiTListBase<DFALL<NiPointer<NiTexture> >,NiPointer<NiTexture> > *__thiscall NiTListBase<DFALL<NiPointer<NiTexture>>,NiPointer<NiTexture>>::`vector deleting destructor'(NiTListBase<DFALL<NiPointer<NiTexture> >,NiPointer<NiTexture> > *this, unsigned int a2);
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,GuildNameCache::GuildNameStorage *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,GuildNameCache::GuildNameStorage *>>,0>>,std::_Iterator_base0>::operator--(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *this); // idb
NiTList<NiPointer<NiTexture> > *__thiscall NiTPointerListBase<DFALL<NiPointer<NiTexture>>,NiPointer<NiTexture>>::`scalar deleting destructor'(NiTList<NiPointer<NiTexture> > *this, unsigned int a2);
void __thiscall std::_Tree_val<std::_Tmap_traits<unsigned long,NiTexture *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiTexture *>>,0>>::~_Tree_val<std::_Tmap_traits<unsigned long,NiTexture *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiTexture *>>,0>>(std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *this); // idb
FaceInfo *__cdecl FaceInfoTab::GetFaceInfo(char kBaseClassID, char ucGender, char byFaceModelInx, char byFaceTexInx); // idb
Char *__cdecl PortraitStudio::CreateCharacter(unsigned int uiClass, unsigned int uiGender, unsigned int uiFace, unsigned int uiHair, unsigned int uiColor, unsigned __int16 kMobID); // idb
// Studio *__usercall PortraitStudio::CreateStudio@<eax>(int a1@<ebx>, float a2@<edi>, unsigned int uiClass, unsigned int uiGender, unsigned int uiFace, unsigned int uiHair, unsigned int uiColor, unsigned int uiDetail, int kMobID, unsigned int uiCamPos);
void __thiscall std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::clear(std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *this); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,NiTexture *> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,NiTexture *>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,NiTexture *> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,NiTexture *> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,NiTexture *> >,0> > > _Where, std::_Tree_nod<std::_Tmap_traits<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,NiTexture *> >,0> >::_Node *_Node); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned long,NiTexture *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiTexture *>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > _Where, std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *_Node); // idb
NiTexture **__thiscall std::map<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,NiTexture *>>>::operator[](std::map<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,NiTexture *> > > *this, const unsigned __int16 *_Keyval); // idb
unsigned int *__thiscall std::map<unsigned long,NiTexture *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiTexture *>>>::operator[](std::map<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> > > *this, const unsigned int *_Keyval); // idb
void __thiscall CQuestInfoViewMgr::MakeQuestView(CQuestInfoViewMgr *this, unsigned __int16 hID); // idb
void CDoorObject::CDoorObject();
void __thiscall AreaInfoMgr::AddRequestAreaTest(AreaInfoMgr *this, Name8 AreaID, int nTestType, int nID); // idb
void __thiscall AreaInfoMgr::RemoveAreaInfo(AreaInfoMgr *this, Name8 dwAreaID); // idb
void __thiscall AreaInfoMgr::Update(AreaInfoMgr *this); // idb
std::_List_nod<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData> >::_Node *__stdcall std::_List_val<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData>>::_Buynode<AreaInfoMgr::TestData>(std::_List_nod<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData> >::_Node *_Next, std::_List_nod<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData> >::_Node *_Prev, AreaInfoMgr::TestData *_Val);
int __thiscall User::GetTotalAvatarInfo(User *this); // idb
PROTO_AVATARINFORMATION *__thiscall User::GetAvatarInfo(User *this, int iIndex); // idb
PROTO_AVATARINFORMATION *__thiscall User::GetAvatarInfoBySlot(User *this, char bySlot); // idb
PROTO_AVATARINFORMATION *__thiscall User::GetSelectedAvatarInfo(User *this); // idb
void __thiscall User::SetAvatarInfo(User *this, PROTO_AVATARINFORMATION *p, int iAvatarNum); // idb
char __thiscall User::GetSelectedAvatarSlot(User *this); // idb
void __thiscall User::SetSelectedAvatarSlot(User *this, char bySlot); // idb
int __thiscall User::GetEmptyAvatarSlot(User *this); // idb
void __thiscall User::MarkAsErased(User *this, char bySlot); // idb
bool __stdcall User::IsAvatarErased(PROTO_AVATARINFORMATION *pkInfo);
PROTO_NC_CHAR_BASE_CMD *__thiscall User::GetMainCharBaseData(User *this); // idb
void __thiscall User::SetMainCharShapeData(User *this, PROTO_AVATAR_SHAPE_INFO *p); // idb
PROTO_AVATAR_SHAPE_INFO *__thiscall User::GetMainCharShapeData(User *this); // idb
void __thiscall User::SetMainCharMapLoginData(User *this, PROTO_NC_CHAR_MAPLOGIN_ACK *p); // idb
PROTO_NC_CHAR_MAPLOGIN_ACK *__thiscall User::GetMainCharMapLoginData(User *this); // idb
PROTO_NC_CHAR_BASE_CMD::LoginLocation *__thiscall User::GetMainCharLoginMapName(User *this);
void __thiscall User::SetPKCount(User *this, unsigned int *kVal); // idb
char __thiscall User::GetMainCharClass(User *this); // idb
void __thiscall User::SetMainCharClass(User *this, char kClass); // idb
Name5 *__thiscall User::GetMainCharID(User *this); // idb
void __thiscall User::SetMainCharGender(User *this, char byGender); // idb
char __thiscall User::GetMainCharGender(User *this); // idb
void __thiscall User::SetMainCharHairType(User *this, char byHair); // idb
void __thiscall User::SetMainCharFaceType(User *this, char byFace); // idb
void __thiscall User::SetMainCharLoginMapInitPos(User *this, int iX, int iY); // idb
unsigned int __thiscall User::Lv(User *this); // idb
void __thiscall User::SetLv(User *this, char ucLv); // idb
unsigned __int64 __thiscall User::PrevExp(User *this);
unsigned __int64 __thiscall User::CurExp(User *this);
unsigned __int64 __thiscall User::NextExp(User *this);
void __thiscall User::AddCurExp(User *this, unsigned int uiExp); // idb
void __thiscall User::SubCurExp(User *this, unsigned int uiExp); // idb
void __thiscall User::SetCurExp(User *this, __int64 i64Exp); // idb
void __thiscall User::SetParam(User *this, CHAR_PARAMETER_DATA *pkData); // idb
unsigned int __thiscall User::BaseStr(User *this);
unsigned int __thiscall User::BaseDex(User *this);
unsigned int __thiscall User::BaseCon(User *this);
unsigned int __thiscall User::BaseWiz(User *this);
unsigned int __thiscall User::BaseInt(User *this);
unsigned int __thiscall User::BaseMen(User *this);
unsigned int __thiscall User::BaseWClow(User *this);
unsigned int __thiscall User::BaseWChigh(User *this);
unsigned int __thiscall User::BaseAC(User *this);
unsigned int __thiscall User::BaseTH(User *this);
unsigned int __thiscall User::BaseTB(User *this);
unsigned int __thiscall User::BaseMAlow(User *this);
unsigned int __thiscall User::BaseMAhigh(User *this);
unsigned int __thiscall User::BaseMR(User *this);
unsigned int __thiscall User::BaseMH(User *this);
unsigned int __thiscall User::BaseMB(User *this);
unsigned int __thiscall User::BasePainR(User *this);
unsigned int __thiscall User::BaseRestraintR(User *this);
unsigned int __thiscall User::BaseShockR(User *this);
unsigned int __thiscall User::BaseCurseR(User *this);
unsigned int __thiscall User::ChangeStr(User *this);
unsigned int __thiscall User::ChangeDex(User *this);
unsigned int __thiscall User::ChangeCon(User *this);
unsigned int __thiscall User::ChangeWiz(User *this);
unsigned int __thiscall User::ChangeInt(User *this);
unsigned int __thiscall User::ChangeMen(User *this);
unsigned int __thiscall User::ChangeWClow(User *this);
unsigned int __thiscall User::ChangeWChigh(User *this);
unsigned int __thiscall User::ChangeAC(User *this);
unsigned int __thiscall User::ChangeTH(User *this);
unsigned int __thiscall User::ChangeTB(User *this);
unsigned int __thiscall User::ChangeMAlow(User *this);
unsigned int __thiscall User::ChangeMAhigh(User *this);
unsigned int __thiscall User::ChangeMR(User *this);
unsigned int __thiscall User::ChangeMH(User *this);
unsigned int __thiscall User::ChangeMB(User *this);
unsigned int __thiscall User::ChangePainR(User *this);
unsigned int __thiscall User::ChangeRestraintR(User *this);
unsigned int __thiscall User::ChangeShockR(User *this);
unsigned int __thiscall User::ChangeCurseR(User *this);
unsigned int __thiscall User::HP(User *this);
unsigned int __thiscall User::SP(User *this);
int User::AP();
unsigned int __thiscall User::LP(User *this);
void __thiscall User::SetHP(User *this, int iHP); // idb
void __thiscall User::SetSP(User *this, int iSP); // idb
void __thiscall User::SetLP(User *this, int iLP); // idb
void __thiscall User::SetAP(User *this, int iAP); // idb
unsigned int __thiscall User::MaxHP(User *this);
unsigned int __thiscall User::MaxSP(User *this);
unsigned int __thiscall User::MaxAP(User *this);
unsigned int __thiscall User::MaxLP(User *this);
int __thiscall User::PwrStone(User *this); // idb
int __thiscall User::GrdStone(User *this); // idb
int __thiscall User::HPStone(User *this); // idb
int __thiscall User::SPStone(User *this); // idb
unsigned int __thiscall User::MaxPwrStone(User *this);
unsigned int __thiscall User::MaxGrdStone(User *this);
unsigned int __thiscall User::MaxHPStone(User *this);
unsigned int __thiscall User::MaxSPStone(User *this);
void __thiscall User::SetPwrStone(User *this, int iVal); // idb
void __thiscall User::SetGrdStone(User *this, int iVal); // idb
void __thiscall User::SetHPStone(User *this, int iVal); // idb
void __thiscall User::SetSPStone(User *this, int iVal); // idb
void __thiscall User::SetMaxPwrStone(User *this, int iVal); // idb
void __thiscall User::SetMaxGrdStone(User *this, int iVal); // idb
void __thiscall User::SetMaxHPStone(User *this, int iVal); // idb
void __thiscall User::SetMaxSPStone(User *this, int iVal); // idb
bool __thiscall User::IsPwrStroneActive(User *this); // idb
bool __thiscall User::IsGrdStroneActive(User *this); // idb
unsigned __int64 __thiscall User::GetMoney(User *this);
void __thiscall User::SetMoney(User *this, __int64 i64Money); // idb
__int64 __cdecl User::GetGem(__int64 i64Money); // idb
__int64 __cdecl User::GetGold(__int64 i64Money); // idb
__int64 __cdecl User::GetSilver(__int64 i64Money); // idb
__int64 __cdecl User::GetCopper(__int64 i64Money); // idb
__int64 __cdecl User::ConvertMoney(__int64 i64Copper, __int64 i64Silver, __int64 i64Gold, __int64 i64Gem); // idb
void __thiscall User::InitABState(User *this, PROTO_NC_CHAR_ABSTATE_CMD *pkProto); // idb
void __thiscall User::SetStr(User *this, unsigned int *kVal); // idb
void __thiscall User::SetCon(User *this, unsigned int *kVal); // idb
void __thiscall User::SetDex(User *this, unsigned int *kVal); // idb
void __thiscall User::SetInt(User *this, unsigned int *kVal); // idb
void __thiscall User::SetWiz(User *this, unsigned int *kVal); // idb
void __thiscall User::SetMen(User *this, unsigned int *kVal); // idb
void __thiscall User::SetWCLow(User *this, unsigned int *kVal); // idb
void __thiscall User::SetWCHigh(User *this, unsigned int *kVal); // idb
void __thiscall User::SetAC(User *this, unsigned int *kVal); // idb
void __thiscall User::SetTH(User *this, unsigned int *kVal); // idb
void __thiscall User::SetTB(User *this, unsigned int *kVal); // idb
void __thiscall User::SetMALow(User *this, unsigned int *kVal); // idb
void __thiscall User::SetMAHigh(User *this, unsigned int *kVal); // idb
void __thiscall User::SetMR(User *this, unsigned int *kVal); // idb
void __thiscall User::SetMH(User *this, unsigned int *kVal); // idb
void __thiscall User::SetMB(User *this, unsigned int *kVal); // idb
void __thiscall User::SetChangeStr(User *this, unsigned int *kVal); // idb
void __thiscall User::SetChangeCon(User *this, unsigned int *kVal); // idb
void __thiscall User::SetChangeDex(User *this, unsigned int *kVal); // idb
void __thiscall User::SetChangeInt(User *this, unsigned int *kVal); // idb
void __thiscall User::SetChangeWiz(User *this, unsigned int *kVal); // idb
void __thiscall User::SetChangeMen(User *this, unsigned int *kVal); // idb
void __thiscall User::SetChangeWCLow(User *this, unsigned int *kVal); // idb
void __thiscall User::SetChangeWCHigh(User *this, unsigned int *kVal); // idb
void __thiscall User::SetChangeAC(User *this, unsigned int *kVal); // idb
void __thiscall User::SetChangeTH(User *this, unsigned int *kVal); // idb
void __thiscall User::SetChangeTB(User *this, unsigned int *kVal); // idb
void __thiscall User::SetChangeMALow(User *this, unsigned int *kVal); // idb
void __thiscall User::SetChangeMAHigh(User *this, unsigned int *kVal); // idb
void __thiscall User::SetChangeMR(User *this, unsigned int *kVal); // idb
void __thiscall User::SetChangeMH(User *this, unsigned int *kVal); // idb
void __thiscall User::SetChangeMB(User *this, unsigned int *kVal); // idb
void __thiscall User::SetMaxHP(User *this, unsigned int *kVal); // idb
void __thiscall User::SetMaxSP(User *this, unsigned int *kVal); // idb
void __thiscall User::SetMaxLP(User *this, unsigned int *kVal); // idb
NiTList<int> *__thiscall User::GetStatTitleList(User *this); // idb
int __thiscall User::GetStatDistribute(User *this, char byStatDistribute); // idb
void __thiscall User::ClearDistributeStatPoint(User *this); // idb
unsigned __int16 *__thiscall User::GetValidate_new(User *this); // idb
void __thiscall User::SetValidata_new(User *this, unsigned __int16 *pValidate); // idb
void __thiscall User::SetCoin(User *this, unsigned __int64 nCoin); // idb
void __thiscall User::SetExchangeableCoin(User *this, unsigned __int64 nCoin); // idb
unsigned __int64 __thiscall User::Coin(User *this); // idb
unsigned __int64 __thiscall User::ExchangeableCoin(User *this); // idb
void __thiscall User::DeleteAvatar(User *this, char bySlot); // idb
void __thiscall User::SetMainCharLoginMapName(User *this, Name3 *kMapName); // idb
void __thiscall User::SetMainCharID(User *this, Name5 *kCharID); // idb
void __thiscall User::ChangeParam(User *this, CHAR_PARAMCHANGE_CMD *pkParam); // idb
void __thiscall User::ChangeChangeParam(User *this, CHAR_PARAMCHANGE_CMD *pkParam); // idb
void __thiscall User::StatChangeByDistributePoint(User *this, char byStatDistribute, int iChange); // idb
PROTO_AVATARINFORMATION *__thiscall User::GetAvatarInfo(User *this, Name5 *CharName); // idb
void __thiscall User::~User(User *this); // idb
char __thiscall User::AddAvatarInfo(User *this, PROTO_AVATARINFORMATION *p);
void __thiscall User::ChangeParam(User *this, PROTO_NC_CHAR_BASEPARAMCHANGE_CMD *pkProto); // idb
void __thiscall User::ChangeChangeParam(User *this, PROTO_NC_CHAR_BASEPARAMCHANGE_CMD *pkProto); // idb
void __thiscall User::User(User *this); // idb
void __thiscall User::SetMainCharBaseData(User *this, PROTO_NC_CHAR_BASE_CMD *p); // idb
void __thiscall NiTListBase<DFALL<int>,int>::NiTListBase<DFALL<int>,int>(NiTListBase<DFALL<int>,int> *this); // idb
void __thiscall NiTListBase<DFALL<int>,int>::~NiTListBase<DFALL<int>,int>(NiTListBase<DFALL<int>,int> *this); // idb
NiTListBase<DFALL<int>,int> *__thiscall NiTListBase<DFALL<int>,int>::`vector deleting destructor'(NiTListBase<DFALL<int>,int> *this, unsigned int a2);
void __thiscall PROTO_AVATARINFORMATION::PROTO_AVATARINFORMATION(PROTO_AVATARINFORMATION *this); // idb
PROTO_AVATARINFORMATION *__thiscall PROTO_AVATARINFORMATION::operator=(PROTO_AVATARINFORMATION *this, PROTO_AVATARINFORMATION *__that); // idb
void __thiscall NiTList<int>::~NiTList<int>(NiTList<int> *this); // idb
NiTList<int> *__thiscall NiTList<int>::`vector deleting destructor'(NiTList<int> *this, unsigned int a2);
PROTO_NC_CHAR_BASE_CMD *__thiscall PROTO_NC_CHAR_BASE_CMD::operator=(PROTO_NC_CHAR_BASE_CMD *this, PROTO_NC_CHAR_BASE_CMD *__that); // idb
ItemAuthority *__thiscall ItemAuthority::`scalar deleting destructor'(ItemAuthority *this, unsigned int a2);
bool __thiscall ItemAuthority::IsAllFalse(ItemAuthority *this, E_BelongType eBelongType); // idb
BelongTypeInfo *__stdcall ItemAuthority::IA_GetBelongTypeInfo(E_BelongType idx);
unsigned int __cdecl ITableBase<BelongTypeInfo,BelongTypeInfoTab>::GetTotal(); // idb
BelongTypeInfo *__cdecl BelongTypeInfoTab::GetBTInfo(E_BelongType eType); // idb
void __thiscall DropItem::DropItem(DropItem *this); // idb
void __thiscall DropItem::~DropItem(DropItem *this); // idb
char *__thiscall DropItem::GetItemName(DropItem *this); // idb
bool __thiscall DropItemMgr::LoadEff(DropItemMgr *this); // idb
bool __thiscall DropItemMgr::Init(DropItemMgr *this); // idb
void __thiscall DropItemMgr::RemoveAll(DropItemMgr *this); // idb
DropItem *__thiscall DropItemMgr::GetByHandle(DropItemMgr *this, unsigned __int16 kHandle); // idb
DropItem *__thiscall DropItemMgr::GetByNode(DropItemMgr *this, NiNode *pkNode); // idb
DropItem *__thiscall DropItemMgr::GetDropItemByNodePtr(DropItemMgr *this, NiNode *pkNode); // idb
void __stdcall DropItemMgr::SetTexture(NiNode *pkNode, NiSourceTexture *pkTexture);
NiNode *__thiscall DropItemMgr::GetNodeFromMap(DropItemMgr *this, const char *pcNifName); // idb
NiSourceTexture *__thiscall DropItemMgr::GetTextureFromMap(DropItemMgr *this, const char *pcTexName); // idb
unsigned int __thiscall DropItemMgr::GetItemCountByItemID(DropItemMgr *this, unsigned __int16 kItemID); // idb
void __thiscall DropItemMgr::~DropItemMgr(DropItemMgr *this); // idb
void __thiscall DropItemMgr::Terminate(DropItemMgr *this); // idb
char __thiscall DropItemMgr::Remove(DropItemMgr *this, unsigned __int16 kHandle);
void __thiscall DropItemMgr::Update(DropItemMgr *this, float fCurTime); // idb
NiNode *__thiscall DropItemMgr::GetNode(DropItemMgr *this, const char *pcNifName); // idb
NiSourceTexture *__thiscall DropItemMgr::GetTexture(DropItemMgr *this, const char *pcTexName); // idb
NiNode *__thiscall DropItemMgr::Get(DropItemMgr *this, const char *pcNifName, const char *pcTexName, bool bStartEff, bool bEffOn); // idb
void __thiscall DropItemMgr::DropItemMgr(DropItemMgr *this); // idb
char __thiscall DropItemMgr::Add(DropItemMgr *this, int kItemID, unsigned __int16 kHandle, bool bPickable, NiPoint3 *kPos, bool bStartEff);
char __thiscall DropItemMgr::Add(DropItemMgr *this, PROTO_NC_BRIEFINFO_DROPEDITEM_CMD *p);
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>::~NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>(NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *> *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *> *this, unsigned int a2);
void __thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode>>::~NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode>>(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode> > *this); // idb
void __stdcall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NpSIF_Tool>>::SetValue(NiTMapItem<char const *,NiPointer<NiTexturingProperty> > *pkItem, const char *key, NiPointer<NiTexturingProperty> val);
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiNode>>,NiPointer<NiNode>>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiNode>>,NiPointer<NiNode>>(NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiNode> >,NiPointer<NiNode> > *this); // idb
void __thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture>>::~NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture>>(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture> > *this); // idb
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSourceTexture>>,NiPointer<NiSourceTexture>>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSourceTexture>>,NiPointer<NiSourceTexture>>(NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSourceTexture> >,NiPointer<NiSourceTexture> > *this); // idb
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NpSIF_Tool>>,NiPointer<NpSIF_Tool>>::SetValue(NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiActorManager> >,NiPointer<NiActorManager> > *this, NiTMapItem<char const *,NiPointer<NiActorManager> > *pkItem, const char *pcKey, NiPointer<NiActorManager> val); // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,DropItem *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,DropItem *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,DropItem *> *this, unsigned int a2);
void __thiscall NiTPointerList<DropItem *>::~NiTPointerList<DropItem *>(NiTPointerList<DropItem *> *this); // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode> > *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode>>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode> > *this, unsigned int a2);
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTPointerMap<char const *,NiPointer<NiNode>>::`vector deleting destructor'(NiTPointerMap<char const *,NiPointer<NiNode> > *this, unsigned int a2);
NiTStringPointerMap<NiPointer<NiNode> > *__thiscall NiTStringPointerMap<NiPointer<NiNode>>::`vector deleting destructor'(NiTStringPointerMap<NiPointer<NiNode> > *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture> > *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture>>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture> > *this, unsigned int a2);
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTPointerMap<char const *,NiPointer<NiSourceTexture>>::`vector deleting destructor'(NiTPointerMap<char const *,NiPointer<NiSourceTexture> > *this, unsigned int a2);
NiTStringPointerMap<NiPointer<NiSourceTexture> > *__thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSourceTexture>>,NiPointer<NiSourceTexture>>::`scalar deleting destructor'(NiTStringPointerMap<NiPointer<NiSourceTexture> > *this, unsigned int a2);
DropItem *__thiscall DropItem::`scalar deleting destructor'(DropItem *this, unsigned int a2);
void __thiscall PgTList<DropItem *>::~PgTList<DropItem *>(PgTList<DropItem *> *this); // idb
PgTList<DropItem *> *__thiscall PgTList<DropItem *>::`vector deleting destructor'(PgTList<DropItem *> *this, unsigned int a2);
void __thiscall NsFindGeometry::~NsFindGeometry(NsFindGeometry *this); // idb
bool __thiscall NsFindGeometry::FindObject(NsFindGeometry *this, NiNode *_pObject, NiRTTI *_pRtti); // idb
signed int __stdcall NsFindGeometry::ProcessData(NiAVObject *_pkObject, void *_pData);
void __thiscall DynaminUV::DynaminUV(DynaminUV *this); // idb
void __thiscall DynaminUV::~DynaminUV(DynaminUV *this); // idb
char __thiscall DynaminUV::CreateStagesAndPasses(DynaminUV *this);
char __thiscall DynaminUV::Initialize(DynaminUV *this, NiDX9Renderer *pkRenderer);
signed int __thiscall DynaminUV::UpdatePipeline(DynaminUV *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound);
NiRTTI *DynaminUV::GetRTTI();
DynaminUV *__thiscall DynaminUV::`scalar deleting destructor'(DynaminUV *this, unsigned int a2);
bool __stdcall Inventory::IsHandedItem(ItemInfo *pkInfo);
void __thiscall Inventory::ClearMiniHouseInv(Inventory *this); // idb
void __thiscall Inventory::ClearMiniHouseEquip(Inventory *this); // idb
void __thiscall Inventory::ClearInv(Inventory *this); // idb
void __thiscall Inventory::ClearEquip(Inventory *this); // idb
void __thiscall Inventory::ClearRewardInv(Inventory *this); // idb
void __thiscall Inventory::ClearPremiumActionInv(Inventory *this); // idb
void __thiscall Inventory::ClearMiniHouseTileAllItemInv(Inventory *this); // idb
void __thiscall Inventory::ClearMiniHouseFurnitureItemInv(Inventory *this); // idb
void __thiscall Inventory::ClearMiniHouseAccessoryItemInv(Inventory *this); // idb
void __thiscall Inventory::ClearMiniHouseMinigameItemInv(Inventory *this); // idb
bool __thiscall Inventory::AddMHItemInv(Inventory *this, unsigned int uiInvType, unsigned int uiIndex, Item *pkItem); // idb
void __thiscall Inventory::RemoveMHItemInv(Inventory *this, unsigned int uiInvType, unsigned int uiIndex); // idb
int __thiscall Inventory::GetTotalInv(Inventory *this); // idb
Item *__thiscall Inventory::GetRightHandEquip(Inventory *this); // idb
Item *__thiscall Inventory::GetLeftHandEquip(Inventory *this); // idb
Item *__thiscall Inventory::GetRightHandAccEquip(Inventory *this); // idb
Item *__thiscall Inventory::GetLeftHandAccEquip(Inventory *this); // idb
Item *__thiscall Inventory::GetShieldAccEquip(Inventory *this); // idb
Item *__thiscall Inventory::GetEquipedWeaponAcc(Inventory *this); // idb
Item *__thiscall Inventory::GetEquipedShieldAcc(Inventory *this); // idb
bool __stdcall Inventory::CanIEquipWeapon(ItemInfo *pkInfo);
bool __stdcall Inventory::CanIEquipWeaponCostume(ItemInfo *pkInfo);
bool __stdcall Inventory::CanIEquipShield(ItemInfo *pkInfo);
bool __stdcall Inventory::CanIEquipShieldCostume(ItemInfo *pkInfo);
void __thiscall Inventory::DecreaeWeaponAccCharged(Inventory *this); // idb
void __thiscall Inventory::DecreaeShieldAccCharged(Inventory *this); // idb
bool __thiscall Inventory::IsAttackAbleEquip(Inventory *this); // idb
char __thiscall Inventory::IsReaminSlot(Inventory *this, unsigned __int16 kID);
void __thiscall Inventory::UpdateWeaponTitleWhenMobDead(Inventory *this, unsigned __int16 kDeadMobID); // idb
Item *__thiscall Inventory::GetEquipedWeapon(Inventory *this); // idb
WeaponTypeEnum __thiscall Inventory::GetEquipWeponType(Inventory *this); // idb
bool __thiscall Inventory::IsDemandType(Inventory *this, WeaponDemandType eDemand); // idb
int __thiscall Inventory::GetItemCnt(Inventory *this, unsigned __int16 kID);
Item *__thiscall Inventory::GetItemByID(Inventory *this, unsigned __int16 kItemID); // idb
int __thiscall Inventory::GetItemLot(Inventory *this, unsigned __int16 kItemID); // idb
unsigned int __thiscall Inventory::GetStatInitialPoint(Inventory *this); // idb
unsigned int __thiscall Inventory::GetSkillEmpowerInitialPoint(Inventory *this); // idb
char __thiscall Inventory::FindEnchantSoketAdd(Inventory *this, ITEM_INVEN *rkInven);
char __thiscall Inventory::FindEnchantSoketReload(Inventory *this, ITEM_INVEN *rkInven);
char __thiscall Inventory::FindWeaponTitleRemoveInven(Inventory *this, ITEM_INVEN *rkInven);
unsigned int __thiscall Inventory::GetInvIdxLotIsNotMax(Inventory *this, Item *pkItem); // idb
Item *__thiscall Inventory::GetMHItemByObjID(Inventory *this, int iGUID); // idb
char __thiscall Inventory::FindItemByItemClass(Inventory *this, ItemClassEnum eItemClass);
int __thiscall Inventory::GetSlotByID(Inventory *this, unsigned __int16 kID); // idb
unsigned int __thiscall Inventory::GetRandomOptRecoverItemCount(Inventory *this, ITEM_INVEN *rkInven); // idb
void __thiscall Inventory::~Inventory(Inventory *this); // idb
// void __thiscall Inventory::ClearMiniHouse(Inventory *this); idb
bool __thiscall Inventory::EquipMiniHouse(Inventory *this, unsigned int uiIndex); // idb
bool __thiscall Inventory::UnEquipMiniHouse(Inventory *this, unsigned int uiIndex); // idb
void __thiscall Inventory::Add(Inventory *this, unsigned int uiInvenType, Item *pkItem, unsigned int uiIndex); // idb
char __thiscall Inventory::Equip(Inventory *this, unsigned int uiIndex);
char __thiscall Inventory::UnEquip(Inventory *this, unsigned int uiIndex);
void __thiscall Inventory::ClearMiniHouseAllItemInv(Inventory *this); // idb
signed int __thiscall Inventory::InitData(Inventory *this, PROTO_NC_CHAR_CLIENT_ITEM_CMD *pkItemData, char *pbyItemDataStartAddress);
bool __stdcall Inventory::CanIEquipHandedItem(ItemInfo *pkInfo);
unsigned __int16 __thiscall Inventory::GetMiniHouseSkin(Inventory *this); // idb
char *__thiscall Inventory::GetPlayMiniHouseSound(Inventory *this); // idb
char __thiscall Inventory::IsFull(Inventory *this);
unsigned int __thiscall Inventory::GetEmptySlotCount(Inventory *this); // idb
void __thiscall Inventory::Inventory(Inventory *this); // idb
void __thiscall Inventory::Clear(Inventory *this); // idb
char __thiscall Inventory::FindMysteryVault(Inventory *this, ITEM_INVEN *rkInven);
void __thiscall Inventory::AddInv(Inventory *this, Item *pkItem, unsigned int uiIndex); // idb
void __thiscall Inventory::AddMiniHouseInv(Inventory *this, Item *pkItem, unsigned int uiIndex); // idb
void __thiscall Inventory::AddMiniHouseEquip(Inventory *this, Item *pkItem, unsigned int uiIndex); // idb
void __thiscall Inventory::AddPremiumActionInv(Inventory *this, Item *pkItem, unsigned int uiIndex); // idb
SHINE_PUT_ON_BELONGED_ITEM __thiscall Item::GetPutOnBelongState(Item *this); // idb
char __thiscall ItemWeapon::GetGemResCount(ItemWeapon *this, char SoketIdx); // idb
void __thiscall ItemWeapon::SetGemResCount(ItemWeapon *this, char SoketIdx, char Amount); // idb
void __thiscall Item::Item(Item *this, SHINE_ITEM_STRUCT *kItemStruct); // idb
Item *__cdecl Item::Create(char *pbyBuff, unsigned int *puiBuffSize); // idb
Item *__cdecl Item::Create(SHINE_ITEM_STRUCT *kStruct); // idb
Item *__cdecl Item::Create(char *pbyBuff, ITEM_INVEN *kInven, unsigned int *puiBuffSize); // idb
Item *__cdecl Item::Create(PROTO_ITEMPACKET_INFORM *pkInfo, ITEM_INVEN *kInven, unsigned int *puiBuffSize); // idb
Item *__cdecl Item::Create(unsigned __int16 kID); // idb
void __thiscall ItemCostumeWeapon::SetMaxCharged(ItemCostumeWeapon *this); // idb
void __thiscall ItemCostumeShield::SetMaxCharged(ItemCostumeShield *this); // idb
int __cdecl ItemAmulet::SetStructAttr(SHINE_ITEM_STRUCT *kStruct, char *pbyBuff);
int __cdecl ItemWeapon::SetStructAttr(SHINE_ITEM_STRUCT *kStruct, char *pbyBuff);
int __cdecl ItemBracelet::SetStructAttr(SHINE_ITEM_STRUCT *kStruct, char *pbyBuff);
int __cdecl ItemChest::SetStructAttr(SHINE_ITEM_STRUCT *kStruct, char *pbyBuff);
signed int __cdecl ItemRiding::SetStructAttr(SHINE_ITEM_STRUCT *kStruct, char *pbyBuff);
void __thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue(NiVBDynamicSet *this, IDirect3DVertexBuffer9 *pkVB); // idb
unsigned int __thiscall Item::GetMaxLot(Item *this); // idb
bool __thiscall Item::IsAlike(Item *this, Item *pkItem); // idb
bool __thiscall Item::IsSplitable(ItemWordLot *this); // idb
char ItemDwrdLot::GetClass();
void __thiscall ItemDwrdLot::SetLot(ItemDwrdLot *this, char uiLot); // idb
int ItemDwrdLot::GetStructSize();
char ItemQuest::GetClass();
char ItemAmulet::GetClass();
signed int ItemAmulet::GetStructSize();
int __thiscall ItemBracelet::GetCurUpGradeLevel(ItemBracelet *this); // idb
ShineItemAttr_Decoration *__thiscall ItemAmulet::GetUpgradeOpt(ItemAmulet *this);
ShineItemAttr_Pet *__thiscall ItemAmulet::GetItemOption(ItemAmulet *this);
char __thiscall ItemAmulet::GetRandomOptChangedCnt(ItemAmulet *this); // idb
char ItemWeapon::GetClass();
signed int ItemWeapon::GetStructSize();
ShineItemAttr_Bracelet *__thiscall ItemWeapon::GetItemOption(ItemWeapon *this);
ShineItemAttr_Bracelet *__thiscall ItemWeapon::GetDeleteTime(ItemWeapon *this);
char __thiscall ItemWeapon::GetRandomOptChangedCnt(ItemWeapon *this); // idb
char ItemCostumeWeapon::GetClass();
unsigned int __thiscall ItemCollectCloseCard::GetSerialNumber(ItemCollectOpenCard *this); // idb
void __thiscall ItemCostumeShield::SetChargedAmount(ItemCostumeShield *this, unsigned int dwChargedAmount); // idb
unsigned int __thiscall ItemCostumeShield::GetMaxCharged(ItemCostumeShield *this); // idb
char ItemArmor::GetClass();
signed int ItemArmor::GetStructSize();
ShineDateTime *__thiscall ItemArmor::GetDeleteTime(ItemBoot *this); // idb
char ItemShield::GetClass();
char ItemCostumeShield::GetClass();
char ItemBoot::GetClass();
ShineItemAttr_SkillScroll *__thiscall ItemBracelet::GetItemOption(ItemBracelet *this);
char __thiscall ItemBoot::GetRandomOptChangedCnt(ItemBracelet *this); // idb
char ItemFurniture::GetClass();
signed int ItemFurniture::GetStructSize();
char ItemDecoration::GetClass();
char ItemSkillScroll::GetClass();
char ItemRecallScroll::GetClass();
unsigned int __thiscall ItemShield::GetCurUpGradeLevel(ItemNoEffect *this); // idb
char ItemUpgradeSource::GetClass();
char ItemBind::GetClass();
char ItemChest::GetClass();
char ItemGBCoin::GetClass();
char ItemCapsule::GetClass();
signed int ItemCapsule::GetStructSize();
CPostProcessEffect *__thiscall ShortCutSkill::`scalar deleting destructor'(CPostProcessEffect *this, unsigned int a2);
char ItemEnchant::GetClass();
void __thiscall ItemNoEffect::SetLot(ItemNoEffect *this, char uiLot); // idb
char ItemWeaponTitleLicense::GetClass();
char ItemKQ::GetClass();
char ItemHouseSkin::GetClass();
char ItemUpRed::GetClass();
char ItemUpBlue::GetClass();
char ItemKQStep::GetClass();
char ItemFeed::GetClass();
char ItemRiding::GetClass();
signed int ItemRiding::GetStructSize();
NiPixelFormat *__thiscall NpNs_SmoothRotateControler::GetTargetDirection(NiDX9TextureData *this); // idb
int __thiscall ItemRiding::GetCurMoverLevel(ItemRiding *this); // idb
char ItemAmount::GetClass();
char ItemUpGold::GetClass();
char ItemChargedAction::GetClass();
char ItemCollectCloseCard::GetClass();
int ItemCollectCloseCard::GetStructSize();
unsigned int __thiscall ItemCollectCloseCard::GetCardID(ItemCollectCloseCard *this); // idb
unsigned int __thiscall ItemCollectCloseCard::GetStar(ItemCollectCloseCard *this); // idb
unsigned int __thiscall ItemCollectCloseCard::GetGroup(ItemCollectCloseCard *this); // idb
char ItemCollectOpenCard::GetClass();
signed int NiStencilProperty::Type();
unsigned int __thiscall ItemCollectOpenCard::GetStar(ItemCollectOpenCard *this); // idb
char ItemNoEffect::GetClass();
signed int ItemByteLot::GetStructSize();
char ItemActiveskill::GetClass();
void __thiscall ItemQuest::SetLot(ItemActiveskill *this, char uiLot); // idb
unsigned int __thiscall ItemWordLot::GetLot(ItemActiveskill *this); // idb
char ItemPet::GetClass();
unsigned int __thiscall ItemPet::GetPetID(ItemPet *this); // idb
char *__thiscall ItemPet::GetName(ItemPet *this);
bool __thiscall ItemPet::GetSummoning(ItemPet *this); // idb
signed int ItemPet::GetStructSize();
char ItemBracelet::GetClass();
SHINE_ITEM_ATTRIBUTE *__thiscall ItemAmulet::GetDeleteTime(ItemBracelet *this);
bool __cdecl ItemInfoTab::IsOneHandSwordAniType(ItemInfo *pkInfo); // idb
bool __cdecl ItemInfoTab::IsDualWeaponAniType(ItemInfo *pkInfo); // idb
bool __cdecl ItemInfoTab::IsTwoHandSwordAniType(ItemInfo *pkInfo); // idb
bool __cdecl ItemInfoTab::IsBowAniType(ItemInfo *pkInfo); // idb
bool __cdecl ItemInfoTab::IsCrossBowAniType(ItemInfo *pkInfo); // idb
bool __cdecl ItemInfoTab::IsOneHandStaffAniType();
bool __cdecl ItemInfoTab::IsTwoHandStaffAniType(ItemInfo *pkInfo); // idb
bool __cdecl ItemInfoTab::IsTwoHandAxeAniType(ItemInfo *pkInfo); // idb
bool __cdecl ItemInfoTab::IsInvincibleHammerType(ItemInfo *pkInfo); // idb
const char *__cdecl ItemViewInfoTab::GetAniIconNameByID(int id);
void __cdecl ItemInfoTab::CheckCRC(); // idb
void __cdecl ItemInfoTab::GenerateCRCSum(); // idb
void __cdecl ItemInfoTab::BuildItemInfoMapByInxName(); // idb
void __thiscall std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ItemInfo *>>>::_Splice_same(std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > *this, std::_List_const_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > _Where, std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > *_Right, std::_List_const_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > _First, std::_List_const_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > _Last, unsigned int _Count); // idb
std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *> *__cdecl std::make_pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> &,ItemInfo *>(std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *> *result, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Val1, ItemInfo **_Val2); // idb
std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > *__thiscall std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ItemInfo *>>>::erase(std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > *this, std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > *result, std::_List_const_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > _Where); // idb
void __thiscall std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ItemInfo *>>,0>>::_Check_size(std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> >,0> > *this); // idb
std::pair<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > >,bool> *__thiscall std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ProduceInfoTable::MaterialInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>>,0>>::_Insert(std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> >,0> > *this, std::pair<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > >,bool> *result, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> *_Val, std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > _Plist); // idb
void __thiscall std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ItemInfo *>>,0>>::_Reinsert(std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> >,0> > *this, std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > _Last); // idb
void __thiscall std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ProduceInfoTable::MaterialInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>>,0>>::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ProduceInfoTable::MaterialInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>>,0>>(std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> >,0> > *this, stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *_Parg, std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > *_Al); // idb
void __thiscall ItemRepairWin::~ItemRepairWin(ItemRepairWin *this); // idb
void __thiscall ItemRepairWin::OnCommand(ItemRepairWin *this, unsigned int wParam, int lParam); // idb
void __thiscall ItemRepairWin::OnClickWinCloseBtn(ItemRepairWin *this); // idb
void __thiscall ItemRepairWin::Initialize(ItemRepairWin *this); // idb
void __thiscall ItemRepairWin::ItemRepairWin(ItemRepairWin *this); // idb
void __thiscall ItemRepairWin::UpdateMeWin(ItemRepairWin *this, float fCurTime); // idb
// void __usercall ItemRepairWin::OnShowWin(ItemRepairWin *this@<ecx>, int a2@<edi>);
void __thiscall ItemRepairWin::SetLockRepairItem(ItemRepairWin *this, ITEM_INVEN kFrom, bool bLock); // idb
char __thiscall ItemRepairWin::Create(ItemRepairWin *this, PgFrameWork *pkFrameWork);
void __thiscall ItemRepairWin::OnClickOKBtn(ItemRepairWin *this); // idb
void __thiscall ItemRepairWin::CancelItemRepair(ItemRepairWin *this); // idb
void __thiscall ItemRepairWin::CompleteItemRepair(ItemRepairWin *this); // idb
void __thiscall ItemRepairWin::SetRepairItemSlot(ItemRepairWin *this, ITEM_INVEN kFrom); // idb
void __thiscall ItemRepairWin::DirectMessage(ItemRepairWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall ItemRepairWin::OnClickCancelBtn(ItemRepairWin *this); // idb
void __thiscall ItemRepairWin::SetItemRepairKitSlot(ItemRepairWin *this, char byKitSlot); // idb
ItemRepairWin *__cdecl ItemRepairWin::CreateWin(PgFrameWork *pkFrameWork); // idb
ItemRepairWin *__thiscall ItemRepairWin::`vector deleting destructor'(ItemRepairWin *this, unsigned int a2);
void __stdcall ItemRepairTask::On_Recv_NC_ITEM_WEAPONENDURESET_CMD(PROTO_NC_ITEM_WEAPONENDURESET_CMD *pkCmd);
void __stdcall ItemRepairTask::On_Recv_NC_ITEM_SHIELDENDURESET_CMD(PROTO_NC_ITEM_SHIELDENDURESET_CMD *pkCmd);
void __cdecl ItemRepairTask::Terminate(); // idb
void __thiscall ItemRepairTask::OnIdle(ItemRepairTask *this, float fTime); // idb
void __stdcall ItemRepairTask::On_Recv_NC_ITEM_WEAPONENDURE_CHARGE_ACK(PROTO_NC_ITEM_WEAPONENDURE_CHARGE_ACK *pkAck);
void __stdcall ItemRepairTask::On_Recv_NC_ITEM_SHIELDENDURE_CHARGE_ACK(PROTO_NC_ITEM_SHIELDENDURE_CHARGE_ACK *pkAck);
void __thiscall ItemRepairTask::~ItemRepairTask(ItemRepairTask *this); // idb
char __stdcall ItemRepairTask::OnProcessNetMsg(int iDepart, int iCommand, int iRevBytes, void *pvData);
void __thiscall ItemRepairTask::ItemRepairTask(ItemRepairTask *this); // idb
void __cdecl ItemRepairTask::Create(IDirectMessenger *pkMsgHooker); // idb
ItemRepairTask *__thiscall ItemRepairTask::`scalar deleting destructor'(ItemRepairTask *this, unsigned int a2);
void __thiscall Singleton<FadeObjectMgr>::~Singleton<FadeObjectMgr>(Singleton<FadeObjectMgr> *this); // idb
Singleton<FadeObjectMgr> *__thiscall Singleton<FadeObjectMgr>::`scalar deleting destructor'(Singleton<FadeObjectMgr> *this, unsigned int a2);
NiTArray<FadeObject *> *__thiscall NiTArray<FadeObject *>::`scalar deleting destructor'(NiTArray<FadeObject *> *this, unsigned int a2);
NiPointer<NiAVObject> *__thiscall FadeObject::GetObj(FadeObject *this, NiPointer<NiAVObject> *result); // idb
void __thiscall FadeObjectMgr::FadeObjectMgr(FadeObjectMgr *this); // idb
void __thiscall FadeObjectMgr::~FadeObjectMgr(FadeObjectMgr *this); // idb
char __thiscall FadeObjectMgr::IsInArray(FadeObjectMgr *this, NiPointer<NiAVObject> spObj);
void __thiscall FadeObject::FadeObject(FadeObject *this); // idb
void __thiscall FadeObject::FadeObject(FadeObject *this, NiPointer<NiAVObject> spObj, bool bEnable); // idb
void __thiscall FadeObject::~FadeObject(FadeObject *this); // idb
char __thiscall FadeObject::Init(FadeObject *this);
void __thiscall FadeObjectMgr::AddObject(FadeObjectMgr *this, NiPointer<NiAVObject> spObj, bool bEnable); // idb
void __thiscall FadeObjectMgr::Update(FadeObjectMgr *this, float fTime); // idb
FadeObjectMgr *__thiscall FadeObjectMgr::`scalar deleting destructor'(FadeObjectMgr *this, unsigned int a2);
FadeObject *__thiscall FadeObject::`scalar deleting destructor'(FadeObject *this, unsigned int a2);
char LightFogCtrl::Init();
void __thiscall LightFogCtrl::Clear(LightFogCtrl *this); // idb
void __thiscall LightFogCtrl::Update(LightFogCtrl *this, float fTime); // idb
void __thiscall LightFogCtrl::Terminate(LightFogCtrl *this); // idb
void __thiscall LightFogCtrl::SetCtrl(LightFogCtrl *this, NiMaterialProperty *pkProp); // idb
char __thiscall LightFogCtrl::SetNode(LightFogCtrl *this, NiNode *pkNode);
void __thiscall LightFogCtrl::~LightFogCtrl(LightFogCtrl *this); // idb
void __thiscall LightFogCtrl::LightFogCtrl(LightFogCtrl *this); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::~NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>(NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *> *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *> *this, unsigned int a2);
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiTimeController *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiTimeController *> *this, unsigned int a2);
void __thiscall NiTPointerList<NiTimeController *>::~NiTPointerList<NiTimeController *>(NiTPointerList<NiTimeController *> *this); // idb
void __thiscall PgTList<NiTimeController *>::~PgTList<NiTimeController *>(PgTList<NiTimeController *> *this); // idb
PgTList<NiTimeController *> *__thiscall PgTList<NiTimeController *>::`vector deleting destructor'(PgTList<NiTimeController *> *this, unsigned int a2);
LightFogCtrl *__thiscall LightFogCtrl::`scalar deleting destructor'(LightFogCtrl *this, unsigned int a2);
void __thiscall CMagicCircleController::UpdatePosition(CMagicCircleController *this, NiPoint3 *rPos); // idb
void __thiscall CMagicCircleController::SetEnable(CMagicCircleController *this, bool bEnable); // idb
bool __thiscall CMagicCircleController::IsEnable(CMagicCircleController *this); // idb
NiPoint3 *__thiscall CMagicCircleController::GetPos(CMagicCircleController *this); // idb
void __thiscall CMagicCircleController::CMagicCircleController(CMagicCircleController *this); // idb
void __thiscall CMagicCircleController::~CMagicCircleController(CMagicCircleController *this); // idb
double __thiscall CMagicCircleController::GetCircleRadius(CMagicCircleController *this);
NiNode *__thiscall CMagicCircleController::GetNode(CMagicCircleController *this); // idb
void __thiscall CMagicCircleController::Update(CMagicCircleController *this, float fTime); // idb
char __thiscall CMagicCircleController::ResetInitTerrain(CMagicCircleController *this, PgNsTerrain *pNsTerrain);
char __thiscall CMagicCircleController::Init(CMagicCircleController *this, const char *pkFileName, PgNsTerrain *pNsTerrain, NiNode *pBuildGround);
void __thiscall CMagicCircleController::SetCircleRadius(CMagicCircleController *this, float fRadius); // idb
CMagicCircleController *__thiscall CMagicCircleController::`scalar deleting destructor'(CMagicCircleController *this, unsigned int a2);
char MapObjMgr::Init();
void __thiscall MapObjMgr::RemoveAll(MapObjMgr *this); // idb
void __thiscall MapObjMgr::Terminate(MapObjMgr *this); // idb
NiNode *__thiscall MapObjMgr::GetFromMap(MapObjMgr *this, char *pcName); // idb
NiNode *__thiscall MapObjMgr::Get(MapObjMgr *this, char *pcName); // idb
void __thiscall MapObjMgr::MapObjMgr(MapObjMgr *this); // idb
void __thiscall Shadow::~Shadow(Shadow *this); // idb
void __thiscall Shadow::Render(Shadow *this, NiNode *pkRenderTarget, NiPoint3 *kPos); // idb
void __thiscall Shadow::Shadow(Shadow *this, NiPoint3 *pkLightDir, PgNsTerrain *pkTerrain, NiNode *pkGroundNode, unsigned int uiDetail); // idb
// void __userpurge Shadow::SetShaderMode(Shadow *this@<ecx>, int a2@<ebx>, int a3@<esi>, Shadow::eShadowMode shadowmode);
void __thiscall NsShadowObject::SetCaster(NsShadowObject *this, NiNode *pCaster); // idb
Shadow *__thiscall Shadow::`vector deleting destructor'(Shadow *this, unsigned int a2);
char SkyCtrl::Init();
// void __thiscall SkyCtrl::SkyCtrl(SkyCtrl *this); idb
void __thiscall SkyCtrl::~SkyCtrl(SkyCtrl *this); // idb
void __thiscall SkyCtrl::Clear(SkyCtrl *this); // idb
char __thiscall SkyCtrl::SetNode(SkyCtrl *this, NiNode *pkNode);
void __thiscall SkyCtrl::Terminate(SkyCtrl *this); // idb
void __thiscall SkyCtrl::Update(SkyCtrl *this, float fTime); // idb
SkyCtrl *__thiscall SkyCtrl::`scalar deleting destructor'(SkyCtrl *this, unsigned int a2);
void __thiscall NiTextureAccumulator::CopyMembers(NiTextureAccumulator *this, NiTextureAccumulator *pkDest, NiCloningProcess *kCloning); // idb
void __thiscall NiTextureAccumulator::LoadBinary(NiTextureAccumulator *this, NiStream *kStream); // idb
void __thiscall NiTextureAccumulator::LinkObject(NiTextureAccumulator *this, NiStream *kStream); // idb
int __thiscall NiTextureAccumulator::RegisterStreamables(NiTextureAccumulator *this, NiStream *kStream);
void __thiscall NiTextureAccumulator::SaveBinary(NiTextureAccumulator *this, NiStream *kStream); // idb
bool __thiscall NiTextureAccumulator::IsEqual(NiTextureAccumulator *this, NiObject *pkObject); // idb
void __thiscall World::Terminate(World *this); // idb
void __thiscall World::Clear(World *this); // idb
stFogInfo *__stdcall World::GetFog(int ID);
char __thiscall World::Init(World *this, float fScreenWidth, float fScreenHeight);
// void __userpurge World::Update(World *this@<ecx>, int a2@<ebx>, int a3@<edi>, float fTime);
void __thiscall World::SetMapDirectionalLightAmbientColor(World *this, NiColor *kColor); // idb
void __thiscall World::SetMapDirectionalLightDiffuseColor(World *this, NiColor *kColor); // idb
// NiPointer<NiAVObject> *__userpurge World::GetGroundObject@<eax>(World *this@<ecx>, int a2@<esi>, NiPointer<NiAVObject> *result, const char *pcNodeName);
void __cdecl ShDrawVisibleArrayAppend(NiVisibleArray *kVisibleSet); // idb
void __thiscall World::GetLoadFolderName(World *this, char *pMapLoadFolderName, const char *pkExt); // idb
void __cdecl ShDrawVisibleArray(NiCamera *pkCamera, NiVisibleArray *kVisibleSet); // idb
void __cdecl ShDrawScene(NiCamera *pkCamera, NiAVObject *pkScene, NiCullingProcess *kCuller, NiVisibleArray *pkVisibleSet); // idb
void __thiscall World::Draw(World *this); // idb
void __thiscall NiTextureAccumulator::NiTextureAccumulator(NiTextureAccumulator *this); // idb
NiCollisionObject *__thiscall NiTextureAccumulator::CreateClone(NiTextureAccumulator *this, NiCloningProcess *kCloning);
NiObject *__cdecl NiTextureAccumulator::CreateObject(); // idb
void __thiscall World::PrintLights(World *this); // idb
void __thiscall NiTextureAccumulator::~NiTextureAccumulator(NiTextureAccumulator *this); // idb
void __thiscall NiTextureAccumulator::RegisterObjectArray(NiTextureAccumulator *this, NiVisibleArray *kArray); // idb
void __thiscall NiTextureAccumulator::FinishAccumulating(NiTextureAccumulator *this); // idb
NiPointer<stGlobalLightInfo> *__thiscall World::GetGlobalLight(World *this, NiPointer<stGlobalLightInfo> *result, int ID); // idb
void __thiscall World::ChangeGlobalAmbLight(World *this, int ToID); // idb
void __thiscall World::NowLoadingText(World *this, int LoadingRate); // idb
void __thiscall World::ClearGlobalLightMap(World *this); // idb
bool __thiscall World::AddGlobalLight(World *this, int ID, NiColor *kColor); // idb
char __thiscall World::LoadLightInfoNode(World *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *MapFolderName);
void __thiscall NiTextureAccumulator::Sort(NiTextureAccumulator *this); // idb
void __thiscall World::~World(World *this); // idb
void __thiscall World::World(World *this); // idb
void __thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Rrotate(std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *this, std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *_Wherenode); // idb
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const,int>>,0>>,std::_Iterator_base0>::operator++(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *this); // idb
void __thiscall NiAccumulator::~NiAccumulator(NiAccumulator *this); // idb
NiRTTI *NiAccumulator::GetRTTI();
NiAccumulator *__thiscall NiAccumulator::`vector deleting destructor'(NiAccumulator *this, unsigned int a2);
void __thiscall NsPathFinding::~NsPathFinding(NsPathFinding *this); // idb
NsPathFinding *__thiscall NsPathFinding::`vector deleting destructor'(NsPathFinding *this, unsigned int a2);
void __thiscall InstantBlock::RemoveAll(InstantBlock *this); // idb
void __thiscall InstantBlock::~InstantBlock(InstantBlock *this); // idb
InstantBlock *__thiscall InstantBlock::`scalar deleting destructor'(InstantBlock *this, unsigned int a2);
void __thiscall mhManagerMediator::~mhManagerMediator(mhManagerMediator *this); // idb
void __thiscall NsMakeQuadScene::~NsMakeQuadScene(NsMakeQuadScene *this); // idb
std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int>>,0>>::_Max(std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *_Pnode); // idb
void __thiscall World::_unnamed_type_m_kExtraLightScene_::_unnamed_type_m_kExtraLightScene_($2855438363EAC391235637C3A76E32E6 *this); // idb
void __thiscall World::_unnamed_type_m_kExtraLightScene_::~_unnamed_type_m_kExtraLightScene_($2855438363EAC391235637C3A76E32E6 *this); // idb
NiTArray<NiPointer<NiNode> > *__thiscall NiTArray<NiPointer<NiNode>>::`scalar deleting destructor'(NiTArray<NiPointer<NiNode> > *this, unsigned int a2);
void __thiscall FindCullUpdateNode::CullUpdateAreaInfo::~CullUpdateAreaInfo(FindCullUpdateNode::CullUpdateAreaInfo *this); // idb
void __cdecl std::_Insertion_sort1<NiGeometry * *,TextureSorter,NiGeometry *>(NiGeometry **_First, NiGeometry **_Last);
void __cdecl std::_Med3<NiGeometry * *,TextureSorter>(NiGeometry **_First, NiGeometry **_Mid, NiGeometry **_Last);
void __cdecl std::_Push_heap<NiGeometry * *,int,NiGeometry *,TextureSorter>(NiGeometry **_First, int _Hole, int _Top, NiGeometry **_Val);
void __thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Erase(std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *this, std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *_Rootnode); // idb
void __thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Erase(std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *this, std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *_Rootnode); // idb
void __cdecl std::_Median<NiGeometry * *,TextureSorter>(NiGeometry **_First, NiGeometry **_Mid, NiGeometry **_Last);
void __cdecl std::_Adjust_heap<NiGeometry * *,int,NiGeometry *,TextureSorter>(NiGeometry **_First, int _Hole, int _Bottom, NiGeometry **_Val);
std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *__thiscall std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0>>::erase(std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *this, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > _Where); // idb
void __thiscall std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,unsigned short>>,0>>::_Erase(std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *this, std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *_Rootnode); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::erase(std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > _Where); // idb
void __thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::clear(std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *this); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::erase(std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > _Where); // idb
std::pair<NiGeometry * *,NiGeometry * *> *__cdecl std::_Unguarded_partition<NiGeometry * *,TextureSorter>(std::pair<NiGeometry * *,NiGeometry * *> *result, NiGeometry **_First, NiGeometry **_Last);
void __cdecl std::_Make_heap<NiGeometry * *,int,NiGeometry *,TextureSorter>(NiGeometry **_First, NiGeometry **_Last, TextureSorter _Pred);
void __thiscall std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,unsigned short>>,0>>::clear(std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *this); // idb
NiRTTI *NiTextureAccumulator::GetRTTI();
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::erase(std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > _Last); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::erase(std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > _Last); // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > *__thiscall std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::erase(std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > *this, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > _Where); // idb
void __thiscall std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Erase(std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > *this, std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *_Rootnode); // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *__thiscall std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::erase(std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *this, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > _Last); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> >::_Node *_Node, bool _Leftish); // idb
void __cdecl std::_Sort_heap<NiGeometry * *,TextureSorter>(NiGeometry **_First, NiGeometry **_Last);
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::erase(std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > _Where); // idb
void __thiscall std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::_Erase(std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *_Rootnode); // idb
NiTextureAccumulator *__thiscall NiTextureAccumulator::`vector deleting destructor'(NiTextureAccumulator *this, unsigned int a2);
std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > *__thiscall std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::erase(std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > *this, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > _Last); // idb
void __cdecl std::_Dest_val<std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>(std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > > *_Alval, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > *_Pdest); // idb
void __thiscall std::map<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>>::~map<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>>(std::map<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> > > *this); // idb
void __thiscall std::map<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>>::~map<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>>(std::map<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> > > *this); // idb
void __cdecl std::_Sort<NiGeometry * *,int,TextureSorter>(NiGeometry **_First, NiGeometry **_Last, int _Ideal, TextureSorter _Pred); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,NiPointer<NiNode>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,NiPointer<NiNode>>>,0>>::erase(std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > _Last); // idb
void __thiscall std::set<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>>::~set<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>>(std::set<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> > > *this); // idb
void __thiscall mhResTableManager::mhResTableManager(mhResTableManager *this); // idb
void __thiscall MiniHouseIndoor::MiniHouseIndoor(MiniHouseIndoor *this); // idb
void __thiscall World::ClearCamera(World *this); // idb
void __thiscall World::SetCameraZoomRatePerTick(World *this, float fRate); // idb
void __thiscall World::SetCameraZoomMin(World *this, float fMin); // idb
void __thiscall World::SetCameraZoomMax(World *this, float fMax); // idb
void __thiscall World::SetCameraZoomDef(World *this, float fDef); // idb
void __thiscall World::SetControllerMode(World *this, bool bControllerMode); // idb
void __thiscall World::SetAutoCameraMode(World *this, bool bAutoCameraMode); // idb
void __thiscall World::SetCameraPosDelta(World *this, NiPoint3 kCameraPosDelta); // idb
void __stdcall World::SetCameraAngleDeltaBoundary(float fAngle, float *pkVar);
void __thiscall World::SetCameraPosDist(World *this, float Dist); // idb
NiPoint3 *__thiscall World::GetCameraLookAtPos(World *this); // idb
void __thiscall World::AddCameraRotate(World *this, int iX, int iY); // idb
void __thiscall World::AddCameraZoom(World *this, int iZoom); // idb
void __thiscall World::SetCameraMove(World *this, bool b); // idb
void __thiscall World::SetCameraAngleDeltaLR(World *this, float AngleLR); // idb
void __thiscall World::SetCameraAngleDeltaUD(World *this, float AngleUD); // idb
void __thiscall World::SetCameraJumpData(World *this, NiPoint3 kCameraPosDelta, float AngleLR, float AngleUD, float Dist); // idb
void __thiscall World::SetCameraFOV(World *this, float fFOV, float fScreenWidth, float fScreenHeight); // idb
void __thiscall World::ImpactCamera(World *this, EffectViewInfo *ImpactInfo); // idb
void __thiscall World::ImpactCamera(World *this, float fAmplitude, float fCurTime); // idb
void __thiscall World::AutoRotateCamera(World *this, float fMsDeltaX); // idb
char __thiscall World::InitCamera(World *this, float fScreenWidth, float fScreenHeight);
void __thiscall World::TerminateCamera(World *this); // idb
void __thiscall World::SetCameraFrustum(World *this, float fScreenWidth, float fScreenHeight); // idb
bool __thiscall World::GetObjectCameraIntersect(World *this, NiPoint3 kOrigin, NiPoint3 kDir); // idb
// void __userpurge World::UpdateCamera(World *this@<ecx>, float a2@<ebx>, int a3@<edi>, int a4@<esi>, float fTime);
NiPoint3 *__thiscall NiCamera::GetWorldUpVector(NiCamera *this, NiPoint3 *result); // idb
NiPoint3 *__thiscall NiCamera::GetWorldRightVector(NiCamera *this, NiPoint3 *result); // idb
std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > >,std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > > > *__thiscall std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Eqrange(std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > *this, std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > >,std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > > > *result, NiAVObject *const *_Keyval); // idb
std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *__thiscall std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0>>::_Copy(std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > *this, std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *_Rootnode, std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *_Wherenode); // idb
void __thiscall std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0>>::_Copy(std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > *this, std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > *_Right); // idb
void __thiscall World::ClearLightFog(World *this); // idb
// void __usercall RotateModelXToVector(NiPoint3 *vec@<eax>, NiMatrix3 *rot@<esi>);
void __thiscall World::SetFogColor(World *this, NiColor *kColor); // idb
void __thiscall World::SetFogDepth(World *this, float fDepth); // idb
void __thiscall World::EnableFog(World *this, bool b); // idb
void __thiscall World::SetAmbientLightAmbientColor(World *this, NiColor *kColor); // idb
void __thiscall World::SetAmbientLightDiffuseColor(World *this, NiColor *kColor); // idb
void __thiscall World::SetAmbientLightSpecularColor(World *this, NiColor *kColor); // idb
void __thiscall World::SetDirectionalLightAmbientColor(World *this, NiColor *kColor); // idb
void __thiscall World::SetDirectionalLightDiffuseColor(World *this, NiColor *kColor); // idb
void __thiscall World::SetDirectionalLightSpecularColor(World *this, NiColor *kColor); // idb
int __stdcall World::GetLightID(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *LightName);
void __thiscall World::TerminateLightFog(World *this); // idb
char __thiscall World::InitLightFog(World *this);
void __thiscall World::UpdateLightFog(World *this, float fTime); // idb
NiPoint3 *__thiscall NiPoint3::Perpendicular(NiPoint3 *this, NiPoint3 *result); // idb
void __thiscall NiQuaternion::ToRotation(NiQuaternion *this, NiMatrix3 *rot); // idb
char __thiscall InstantBlock::Load(InstantBlock *this, const char *szName);
std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *__cdecl std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::_Max(std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *_Pnode); // idb
bool __thiscall IsAniObject(NiAVObject *pkObject);
char __thiscall World::LoadMapLightCtrl(World *this, const char *acMapName);
void __cdecl ProcessMNode(NiNode *_pNode, NiNode *_pDestNode); // idb
void __cdecl ProcessCDNode(NiNode *_pNode, NiNode *_pDestNode); // idb
char __thiscall World::LoadMap(World *this, bool bSameMap);
void __thiscall NiAVObject::SetCollisionObject(NiAVObject *this, NiCollisionObject *pkCollisionObject); // idb
unsigned int __thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::rfind(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, const char *_Ptr, unsigned int _Off, unsigned int _Count); // idb
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>,std::_Iterator_base0>::operator--(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >,std::_Iterator_base0> *this); // idb
void __thiscall std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::_Lrotate(std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > *this, std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *_Wherenode); // idb
void __thiscall std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::_Rrotate(std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > *this, std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *_Wherenode); // idb
void __thiscall std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::_Erase(std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > *this, std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *_Rootnode); // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > > *__thiscall std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::_Insert(std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > *this, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *_Newnode); // idb
std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *__stdcall std::_List_val<NiAVObject *,std::allocator<NiAVObject *>>::_Buynode(std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *_Next, std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *_Prev);
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *_Newnode); // idb
void __thiscall std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::clear(std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > *this); // idb
std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *__thiscall std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::_Buynode(std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > *this, const char *_Val); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *_Node, bool _Leftish); // idb
void __thiscall std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>::pop_back(std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > *this); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > _Where, std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *_Node); // idb
std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Buynode<std::pair<NiAVObject * const,World::AniObjectType>>(std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *this, std::pair<NiAVObject * const,World::AniObjectType> *_Val); // idb
std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > >,bool> *__thiscall std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::insert(std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > *this, std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > >,bool> *result, const char *_Val, bool _Leftish); // idb
signed int __stdcall FindMultiCDNode::ProcessData(NiAVObject *_pkObject, void *_pData);
signed int __stdcall FindMultiMNode::ProcessData(NiAVObject *_pkObject, void *_pData);
void __thiscall std::list<NiAVObject *,std::allocator<NiAVObject *>>::resize(std::list<NiAVObject *,std::allocator<NiAVObject *> > *this, unsigned int _Newsize); // idb
World::AniObjectType *__thiscall std::map<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>>::operator[](std::map<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> > > *this, NiAVObject *const *_Keyval); // idb
char World::InitMiniMap();
void __thiscall World::TerminateMiniMap(World *this); // idb
void __thiscall World::ClearMiniMap(World *this); // idb
char __thiscall World::LoadEmptyMiniMap(World *this);
NiSourceTexture *__thiscall World::GetMiniMapTexture(World *this); // idb
char __thiscall World::LoadMiniMap(World *this);
// char __userpurge World::SelectMiniMap@<al>(World *this@<ecx>, int a2@<edi>, Name3 kMapName);
void __thiscall World::UpdateCharDecalMark(World *this, float fTime); // idb
void __thiscall World::Shake(World *this); // idb
void __thiscall World::SetMagicCirclePos(World *this, NiPoint3 *rkPos); // idb
void __thiscall World::SetMagicCircleEnable(World *this, bool bEnable); // idb
void __thiscall World::SetMagicCircleRadius(World *this, float fRadius); // idb
void __thiscall World::TerminateMisc(World *this); // idb
void __thiscall World::UpdateMainCharMoveTargetPoint(World *this, float fTime); // idb
void __thiscall World::PlayBGM(World *this); // idb
void __thiscall World::UpdateCharSelectMark(World *this, float fTime); // idb
char __thiscall World::InitMisc(World *this);
void __thiscall World::ClearMisc(World *this); // idb
void __thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture>>::~NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture>>(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture> > *this); // idb
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexture>>,NiPointer<NiTexture>>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexture>>,NiPointer<NiTexture>>(NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexture> >,NiPointer<NiTexture> > *this); // idb
bool __stdcall NiTStringTemplateMap<NiTPointerMap<char const *,NiD3DShaderProgramCreator *>,NiD3DShaderProgramCreator *>::IsKeysEqual(const char *pcKey1, const char *pcKey2);
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSourceTexture>>,NiPointer<NiSourceTexture>>::ClearValue(NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiActorManager> >,NiPointer<NiActorManager> > *this, NiTMapItem<char const *,NiPointer<NiActorManager> > *pkItem); // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture> > *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture>>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture> > *this, unsigned int a2);
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTPointerMap<char const *,NiPointer<NiTexture>>::`vector deleting destructor'(NiTPointerMap<char const *,NiPointer<NiTexture> > *this, unsigned int a2);
NiTStringPointerMap<NiPointer<NiTexture> > *__thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexture>>,NiPointer<NiTexture>>::`vector deleting destructor'(NiTStringPointerMap<NiPointer<NiTexture> > *this, unsigned int a2);
void __thiscall NiDefaultTexturePalette::NiDefaultTexturePalette(NiDefaultTexturePalette *this, bool bSearchGlobalTextureList); // idb
void __thiscall NiDefaultTexturePalette::SetSearchGlobalTextureList(NiDefaultTexturePalette *this, bool bSearch); // idb
bool __thiscall NiD3DShaderInterface::IsInitialized(NiD3DShaderInterface *this); // idb
void __thiscall NiDefaultTexturePalette::SetTexture(NiDefaultTexturePalette *this, const char *pcPath, NiTexture *pkTex); // idb
NiTexture *__thiscall NiDefaultTexturePalette::GetTexture(NiDefaultTexturePalette *this, const char *pcPath, NiTexture *pkSelf); // idb
NiDefaultTexturePalette *__thiscall NiDefaultTexturePalette::`scalar deleting destructor'(NiDefaultTexturePalette *this, unsigned int a2);
void __thiscall World::TerminatePathFinding(World *this); // idb
void __thiscall World::ClearPathFinding(World *this); // idb
bool __thiscall World::SearchWayPoints(World *this, NiPoint2 pos2Start, NiPoint2 pos2End, int nMaxArryCnt, NiPoint2 *pPos2Arr, int *nResultWayCnt); // idb
int __cdecl DivideFloat(float fOne, float fTwo); // idb
char __thiscall World::SearchWayPointsNew(World *this, NiPoint2 pos2Start, NiPoint2 pos2End, int nMaxArryCnt, NiPoint2 *pPos2Arr, int *nResultWayCnt, bool *bIsFindEndPoint);
bool __thiscall World::IsBlock8(World *this, float fX, float fY); // idb
bool __thiscall World::IsBlock(World *this, float fX, float fY); // idb
bool __thiscall World::LineIntersect(World *this, float _fStartX, float _fStartY, float *_fEndX, float *_fEndY); // idb
bool __thiscall World::TestArea(World *this, const char *szAreaName, float fX, float fY); // idb
bool __thiscall World::IsInArea(World *this, const char *szAreaName); // idb
char __thiscall World::InitPathFinding(World *this);
char __thiscall World::LoadPathFindingData(World *this);
void __thiscall World::SetSubBlockData(World *this, const char *szName, bool bClose); // idb
void __thiscall IMakeBlockInfo::SetBlockData(IMakeBlockInfo *this, unsigned int _uiMapSize, unsigned int _uiSplitCnt, float _fTileLength); // idb
void __thiscall IMakeBlockInfo::DeleteAllData(IMakeBlockInfo *this); // idb
void __thiscall NsMakeBlockInfo_Byte::DeleteAllData(NsMakeBlockInfo_Byte *this); // idb
void __thiscall NsMakeBlockInfo_Byte::SetBlockData(NsMakeBlockInfo_Byte *this, unsigned int _uiMapSize, unsigned int _uiSplitCnt, float _fTileLength); // idb
char __thiscall NsMakeBlockInfo_Byte::SetBlock(NsMakeBlockInfo_Byte *this, unsigned int _uiGridXIndex, unsigned int _uiGridYIndex, bool bOn);
char __thiscall NsMakeBlockInfo_Byte::SetBlock(NsMakeBlockInfo_Byte *this, unsigned int _uiTileIndexX, unsigned int _uiSubIndexX, unsigned int _uiTileIndexY, unsigned int _uiSubIndexY, bool bOn);
char __thiscall NsMakeBlockInfo_Byte::SetBlock(NsMakeBlockInfo_Byte *this, unsigned int _uiIndex, bool bOn);
bool __thiscall NsMakeBlockInfo_Byte::GetBlock(NsMakeBlockInfo_Byte *this, unsigned int _uiX, unsigned int _uiY); // idb
NsMakeBlockInfo_Byte *__thiscall NsMakeBlockInfo_Byte::`scalar deleting destructor'(NsMakeBlockInfo_Byte *this, unsigned int a2);
void __thiscall InstantBlock::SetData(InstantBlock *this, const char *szName, bool bClose); // idb
char __thiscall World::InitPick(World *this);
void __thiscall World::ClearPick(World *this); // idb
void __thiscall HeightmapRayIntersection::Clear(HeightmapRayIntersection *this); // idb
void __thiscall HeightmapRayIntersection::Init(HeightmapRayIntersection *this, float *pfHeight, float fTileWidth, float fTileHeight, int iTileXCount, int iTileYCount, float w1, float w2); // idb
// Char *__usercall SearchChar@<eax>(NiAVObject *pkAVObject@<eax>); idb
// DropItem *__usercall SearchDropItem@<eax>(NiAVObject *pkAVObject@<eax>); idb
// signed __int16 __usercall SearchMiniHouse@<ax>(NiAVObject *pkAVObject@<eax>);
void __thiscall World::TerminatePick(World *this); // idb
char __cdecl CulPlaneVsRay(float _fHeight, NiPoint3 _pos3Origin, NiPoint3 _pos3Dir, float *fT_);
void __thiscall HeightmapRayIntersection::~HeightmapRayIntersection(HeightmapRayIntersection *this); // idb
char __stdcall HeightmapRayIntersection::CheckRayIntersectTri(NiPoint3 *kOrg, NiPoint3 *kDir, NiPoint3 *kV0, NiPoint3 *kV1, NiPoint3 *kV2, float *ru, float *rv, float *rt);
char __thiscall HeightmapRayIntersection::CheckRayIntersectQuad(HeightmapRayIntersection *this, int u, int v);
bool __thiscall HeightmapRayIntersection::CheckRayIntersectAround(HeightmapRayIntersection *this, int u, int v); // idb
char __thiscall World::GetCameraPickPos(World *this, NiPoint3 kOrigin, NiPoint3 kDir, NiPoint3 *kPos, NiPoint3 *kNormal, float *pfDistance);
bool __thiscall World::GetGroundPos(World *this, NiPoint3 kOrigin, NiPoint3 kDir, NiPoint3 *kTargetPos, float *pfDistance); // idb
bool __thiscall World::GetGroundPos(World *this, float fXPos, float fYPos, NiPoint3 *kPos, float *pfDistance); // idb
char __thiscall World::GetAdvGroundPos(World *this, float fX, float fY, NiPoint3 *kTargetPos);
void __thiscall World::GetCharRegenPos(World *this, NiPoint3 *kRegenPos); // idb
char __thiscall World::PickChar(World *this, NiPoint3 *kOrigin, NiPoint3 *kDir, Char **pkChar, float *rfDistance);
unsigned int __thiscall World::PickedObjConditionCheck(World *this); // idb
NiAVObject *__thiscall World::GetCandidatePickObj(World *this, NiPoint3 *kOrigin, NiPoint3 *kDir, NiPoint3 *kGroundPos); // idb
signed int __thiscall World::PickWithoutGround(World *this, NiPoint3 *kOrigin, NiPoint3 *kDir, Char **pkChar, DropItem **pkDropItem, unsigned __int16 *hMiniHouse);
void __thiscall HeightmapRayIntersection::HeightmapRayIntersection(HeightmapRayIntersection *this); // idb
char __thiscall HeightmapRayIntersection::CheckRayIntersect(HeightmapRayIntersection *this, NiPoint3 *kStart, NiPoint3 *kEnd, NiPoint3 *kIntersect, NiPoint3 *kNormal, float *rfDist, int *nTileGap);
char __thiscall World::CheckRayIntersectGround(World *this, NiPoint3 *kStart, NiPoint3 *kEnd, NiPoint3 *kIntersect, NiPoint3 *kNormal, float *rfDist, int *nTileGap);
char __thiscall World::GetCameraPickPos2(World *this, NiPoint3 *kOrigin, NiPoint3 *kEnd, NiPoint3 *kPos, NiPoint3 *kNormal, float *pfDistance);
char __thiscall World::GetAdvGroundPos(World *this, NiPoint3 kOrigin, NiPoint3 kDir, NiPoint3 *kTargetPos, float *pfDistance);
signed int __thiscall World::PickMHObj(World *this, mhState nowState, NiPoint3 *kOrigin, NiPoint3 *kDir, NiPoint3 *kGroundPos, bool bOnlyTest);
signed int __thiscall World::PickInMHmode(World *this, NiPoint3 *kOrigin, NiPoint3 *kDir, Char **pkChar, NiPoint3 *kGroundPos, DropItem **pkDropItem, unsigned __int16 *hMiniHouse);
signed int __thiscall World::Pick(World *this, NiPoint3 *kOrigin, NiPoint3 *kDir, Char **pkChar, NiPoint3 *kGroundPos, DropItem **pkDropItem, unsigned __int16 *hMiniHouse);
signed int __thiscall World::PickSomethingProcess(World *this, NiPoint3 *kOrigin, NiPoint3 *kDir, Char **pkChar, NiPoint3 *kGroundPos);
double __thiscall NiPoint3::operator*(NiPoint3 *this, NiPoint3 *pt);
NiPointer<NiNode> *__thiscall MiniHouseIndoor::GetObjRootScene(MiniHouseIndoor *this, NiPointer<NiNode> *result); // idb
NiPoint3 *__thiscall Char::GetWorldPos(Char *this, NiPoint3 *result); // idb
double __cdecl GetAngle(NiPoint3 _pos3Dir, NiPoint3 _pos3Target);
void __thiscall CharSorter::CharSorter(CharSorter *this, NiPoint3 *pos3, NiPoint3 *kDir); // idb
bool __thiscall CharSorter::operator()(CharSorter *this, Char *pChar1, Char *pChar2); // idb
char __thiscall World::AttachDropItem(World *this, NiNode *pkNode);
char __thiscall World::DetachDropItem(World *this, NiNode *pkNode);
char __thiscall World::AttachMiniHouse(World *this, NiNode *pkNode);
char __thiscall World::DetachMiniHouse(World *this, NiNode *pkNode);
char __thiscall World::AttachEffect(World *this, NiNode *pkEffectNode);
char __thiscall World::DetachEffect(World *this, NiNode *pkEffectNode);
void __thiscall DropItemSorter::DropItemSorter(DropItemSorter *this, NiPoint3 *pos3, NiPoint3 *kDir); // idb
void __thiscall World::UpdateSkyScene(World *this, float fTime); // idb
bool __thiscall DropItemSorter::operator()(DropItemSorter *this, DropItem *pDropItem1, DropItem *pDropItem2); // idb
char __thiscall World::InitScene(World *this);
void __thiscall World::TerminateScene(World *this); // idb
char __thiscall World::AttachChar(World *this, Char *pkChar);
void __thiscall World::RemoveAllChar(World *this); // idb
void __thiscall World::ClearScene(World *this); // idb
void __thiscall World::UpdateBuildingScene(World *this, float fTime); // idb
char __thiscall World::DetachChar(World *this, Char *pkChar);
void __thiscall World::UpdateScene(World *this, float fTime); // idb
void __cdecl std::_Push_heap<Char * *,int,Char *,CharSorter>(Char **_First, int _Hole, int _Top, Char **_Val, CharSorter _Pred); // idb
void __cdecl std::_Adjust_heap<Char * *,int,Char *,CharSorter>(Char **_First, int _Hole, int _Bottom, Char **_Val, CharSorter _Pred); // idb
void __thiscall std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(std::vector<CBaseObject *,std::allocator<CBaseObject *> > *this, unsigned int _Count); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > >,std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > > *__thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Eqrange(std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > >,std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > > *result, NiAVObject *const *_Keyval); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *_Newnode); // idb
void __cdecl std::_Make_heap<Char * *,int,Char *,CharSorter>(Char **_First, Char **_Last, CharSorter _Pred);
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > >,std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > > *__thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Eqrange(std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > >,std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > > *result, NiAVObject *const *_Keyval); // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > *__thiscall std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Insert(std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > *this, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *_Newnode); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *_Node, bool _Leftish); // idb
std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Buynode<NiNode * &>(std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > *this, NiNode **_Val); // idb
std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > >,bool> *__thiscall std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Linsert(std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > *this, std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > >,bool> *result, std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *_Node, bool _Leftish); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > _Where, std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *_Node); // idb
std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Buynode<std::pair<NiAVObject * const,NiBound>>(std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *this, std::pair<NiAVObject * const,NiBound> *_Val); // idb
void __cdecl std::_Sort_heap<Char * *,CharSorter>(Char **_First, Char **_Last, CharSorter _Pred); // idb
NiBound *__thiscall std::map<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>>::operator[](std::map<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> > > *this, NiAVObject *const *_Keyval); // idb
void __cdecl std::_Partial_sort<Char * *,Char *,CharSorter>(Char **_First, Char **_Mid, Char **_Last, CharSorter _Pred);
char World::InitShadow();
void __thiscall World::ClearShadow(World *this); // idb
void __thiscall World::TerminateShadow(World *this); // idb
void __thiscall World::ResetShadowTerrian(World *this); // idb
void __thiscall World::PrepareShadow(World *this); // idb
void __thiscall World::DrawShadow(World *this); // idb
char World::InitSkyCtrl();
void __thiscall World::TerminateSkyCtrl(World *this); // idb
void __thiscall World::ClearSkyCtrl(World *this); // idb
void __thiscall World::UpdateSkyCtrl(World *this, float fTime); // idb
char *__cdecl _StrTok(const char *str, const char sep); // idb
char __cdecl InitAnalyzeArgument(char *key, CPData *kCpData);
char __cdecl GetAnalyzeArgument(CPData *kCpData);
char *__stdcall Server::GetWorldLoginErrText(unsigned int ucStatus);
int __cdecl StatusCmp(char byStatus1, char byStatus2); // idb
void __thiscall Server::SetGameTime(Server *this, PROTO_NC_MISC_GAMETIME_ACK *p, float fCurTime); // idb
double __thiscall Server::GetGameTime(Server *this, float fCurTime);
int __thiscall Server::GetSelectServerIndex(Server *this); // idb
void __thiscall Server::SetSelectServerIndex(Server *this, int val); // idb
void __thiscall Server::ParsingGameAngelKey(Server *this); // idb
char __cdecl InitAnalyzeArgument(CPData *kCpData);
void __thiscall Server::Server(Server *this); // idb
NiUnsharedGeometryGroup *__stdcall Server::GetWorldStatusText(unsigned int uiIndex);
void __thiscall Server::SetWorldMgrAddr(Server *this, PROTO_NC_USER_LOGIN_ACK *pkProto); // idb
void __thiscall Server::~Server(Server *this); // idb
void __thiscall FiestaServerList::ServerInfo::ServerInfo(FiestaServerList::ServerInfo *this); // idb
CVirtualServer::IProtoStruct *__thiscall CVirtualServer::IProtoStruct::`scalar deleting destructor'(CVirtualServer::IProtoStruct *this, unsigned int a2);
int __cdecl SRand(int iMax); // idb
void __cdecl Make_BriefInfo_LoginCharacter(PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *kProto_, char kClassID, char byGender, NiPoint3 *kPos, NiPoint3 *kDir, unsigned int uiEquipLevel); // idb
void __thiscall CVirtualServer::CVirtualServer(CVirtualServer *this); // idb
void __thiscall CVirtualServer::~CVirtualServer(CVirtualServer *this); // idb
void __thiscall CVirtualServer::Update(CVirtualServer *this); // idb
void __thiscall CVirtualServer::AddMessage(CVirtualServer *this, float fDelayTime, CVirtualServer::IProtoStruct *pkProto); // idb
void __thiscall CVirtualServer::RegenChars(CVirtualServer *this, char kClassID, char byGender, NiPoint3 *kPos, NiPoint3 *kDir, unsigned int uiEquipLevel); // idb
void __thiscall CVirtualServer::Attack(CVirtualServer *this, unsigned int dwAttacker, unsigned int dwTarget); // idb
void __thiscall CVirtualServer::StartAttack(CVirtualServer *this); // idb
void __thiscall CVirtualServer::Process(CVirtualServer *this); // idb
void __thiscall CVirtualServer::ProtoStruct<PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD>::SetRecordTime(CVirtualServer::ProtoStruct<PROTO_NC_BAT_SOMEONEBASH_HIT_CMD> *this, float _fRecordTime); // idb
void __thiscall CVirtualServer::ProtoStruct<PROTO_NC_BAT_SOMEONEBASH_HIT_CMD>::SetRunTime(NiMorphData::MorphTarget *this, float fWeight); // idb
void __thiscall CVirtualServer::ProtoStruct<PROTO_NC_BAT_SOMEONEBASH_HIT_CMD>::SetCommand(CVirtualServer::ProtoStruct<PROTO_NC_BAT_SOMEONEBASH_HIT_CMD> *this, int _nCommand); // idb
double __thiscall CVirtualServer::ProtoStruct<PROTO_NC_BAT_SOMEONEBASH_HIT_CMD>::GetRecordTime(CVirtualServer::ProtoStruct<PROTO_NC_BAT_SOMEONEBASH_HIT_CMD> *this);
CVirtualServer::ProtoStruct<PROTO_NC_BAT_SOMEONEBASH_HIT_CMD> *__thiscall CVirtualServer::ProtoStruct<PROTO_NC_BAT_SOMEONEBASH_HIT_CMD>::`scalar deleting destructor'(CVirtualServer::ProtoStruct<PROTO_NC_BAT_SOMEONEBASH_HIT_CMD> *this, unsigned int a2);
CVirtualServer::ProtoStruct<PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD> *__thiscall CVirtualServer::ProtoStruct<PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD>::`vector deleting destructor'(CVirtualServer::ProtoStruct<PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD> *this, unsigned int a2);
std::_List_nod<unsigned short,std::allocator<unsigned short> >::_Node *__stdcall std::_List_val<unsigned short,std::allocator<unsigned short>>::_Buynode(std::_List_nod<unsigned short,std::allocator<unsigned short> >::_Node *_Next, std::_List_nod<unsigned short,std::allocator<unsigned short> >::_Node *_Prev, const unsigned __int16 *_Val);
bool __thiscall AfterImgEff::IsEnd(AfterImgEff *this, float fTime); // idb
void __thiscall AfterImgEff::AfterImgEff(AfterImgEff *this, NiNode *pkNode, bool bCreateProgramEff); // idb
void __thiscall AfterImgEff::~AfterImgEff(AfterImgEff *this); // idb
void __thiscall AfterImgEff::UpdateTextKey(AfterImgEff *this, float fTime); // idb
void __thiscall AfterImgEff::Update(AfterImgEff *this, float fTime); // idb
void __thiscall AfterImgEff::Start(AfterImgEff *this, float fTime); // idb
void __cdecl AfterImgEff::ClearResourceMap(); // idb
NiPointer<NiNode> *__stdcall AfterImgEff::GetEffectNode(NiPointer<NiNode> *result, unsigned int uiIndex);
NiPointer<NiSourceTexture> *__stdcall AfterImgEff::GetEffTexture(NiPointer<NiSourceTexture> *result, unsigned int uiIndex);
char __thiscall AfterImgEff::CreateShape(AfterImgEff *this, NiNode *pkNode, int WeaponLevel, UpEffectData *pkUpEff);
AfterImgEff *__cdecl AfterImgEff::CreateBySourceNode(NiNode *pkNode); // idb
AfterImgEff *__cdecl AfterImgEff::CreateByWeaponNode(NiNode *pkNode, int WeaponLevel, UpEffectData *pkUpEff); // idb
AfterImgEff *__thiscall AfterImgEff::`vector deleting destructor'(char *this, unsigned int a2);
NiRTTI *AfterImgEff::GetRTTI();
void __thiscall Effect::Start(Effect *this, float fTime); // idb
void __thiscall std::pair<unsigned int,NiPointer<NiNode>>::~pair<unsigned int,NiPointer<NiNode>>(std::pair<unsigned long const ,NiPointer<NiControllerSequence> > *this); // idb
AfterImgEff *__thiscall AfterImgEff::`scalar deleting destructor'(AfterImgEff *this, unsigned int a2);
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *_Newnode); // idb
void __thiscall AfterImgShape::RemoveVertex(AfterImgShape *this, int _nNum); // idb
void __thiscall AfterImgShape0::SetVertex(AfterImgShape0 *this, NiPoint3 *_pos3Start, NiPoint3 *_pos3End); // idb
void __thiscall AfterImgShape1::SetVertex(AfterImgShape1 *this, NiPoint3 *_pos3Start, NiPoint3 *_pos3End); // idb
void __thiscall AfterImgShape::Start(AfterImgShape *this, float _fTime); // idb
void __thiscall AfterImgShape::Stop(AfterImgShape *this); // idb
void __thiscall AfterImgShape::AfterImgShape(AfterImgShape *this); // idb
void __thiscall AfterImgShape::~AfterImgShape(AfterImgShape *this); // idb
void __thiscall AfterImgShape::Terminate(AfterImgShape *this); // idb
void __thiscall AfterImgShape0::AfterImgShape0(AfterImgShape0 *this); // idb
void __thiscall AfterImgShape0::~AfterImgShape0(AfterImgShape0 *this); // idb
char __thiscall AfterImgShape0::Update(AfterImgShape0 *this, float _fTime);
void __thiscall AfterImgShape1::AfterImgShape1(AfterImgShape1 *this); // idb
void __thiscall AfterImgShape1::~AfterImgShape1(AfterImgShape1 *this); // idb
char __thiscall AfterImgShape1::Update(AfterImgShape1 *this, float _fTime);
void __thiscall AfterImgShape0::Init(AfterImgShape0 *this, int _nVertexCnt); // idb
void __thiscall AfterImgShape1::Init(AfterImgShape1 *this, int _nVertexCnt); // idb
NiColorA *__thiscall NiColorA::operator+(NiColorA *this, NiColorA *result, NiColorA *c); // idb
NiColorA *__thiscall NiColorA::operator-(NiColorA *this, NiColorA *result, NiColorA *c); // idb
NiColorA *__thiscall NiColorA::operator*(NiColorA *this, NiColorA *result, float fScalar); // idb
NiRTTI *NiStencilProperty::GetRTTI();
NiStencilProperty *__thiscall NiStencilProperty::`vector deleting destructor'(NiStencilProperty *this, unsigned int a2);
void __cdecl NetUtil::SendLog(char *_szLog); // idb
AfterImgShape *__thiscall AfterImgShape::`vector deleting destructor'(AfterImgShape *this, unsigned int a2);
AfterImgShape0 *__thiscall AfterImgShape0::`vector deleting destructor'(AfterImgShape0 *this, unsigned int a2);
AfterImgShape1 *__thiscall AfterImgShape1::`vector deleting destructor'(AfterImgShape1 *this, unsigned int a2);
double __thiscall ArrowEff::GetSpeed(ArrowEff *this);
void __thiscall ArrowEff::SetSpeed(ArrowEff *this, float fSpeed); // idb
unsigned __int16 __thiscall ArrowEff::GetTargetChar(ArrowEff *this); // idb
void __thiscall ArrowEff::SetTargetChar(ArrowEff *this, unsigned __int16 kHandle); // idb
unsigned __int16 __thiscall ArrowEff::GetCasterChar(ArrowEff *this); // idb
void __thiscall ArrowEff::SetCasterChar(ArrowEff *this, unsigned __int16 kHandle); // idb
bool __thiscall ArrowEff::IsEnd(ArrowEff *this, float fTime); // idb
bool __thiscall ArrowEff::IsHitTarget(ArrowEff *this); // idb
void __thiscall ArrowEff::AddHitDamage(ArrowEff *this, unsigned int uiDamage, unsigned __int16 kTarget, unsigned int dwHpChangeSeqNo, unsigned int kTargetRestHP, bool bViewDamage, bool bRange, __int16 AtkSeqnum, __int16 SeqDmgNum); // idb
DamageInfo *__thiscall ArrowEff::GetDummyDmgInfo(ArrowEff *this); // idb
void __thiscall ArrowEff::CopyMember(ArrowEff *this, Effect *pkEffect); // idb
void __thiscall ArrowEff::StopWeaponAfterImgEff(ArrowEff *this); // idb
// void __userpurge ArrowEff::Update(ArrowEff *this@<ecx>, float a2@<ebx>, int a3@<edi>, int a4@<esi>, float fTime);
void __thiscall ArrowEff::OnEnd(ArrowEff *this, float fTime); // idb
void __thiscall ArrowEff::StartWeaponAfterImgEff(ArrowEff *this, float fCurTime, float fLifeTime); // idb
void __thiscall ArrowEff::Start(ArrowEff *this, float fTime); // idb
void __thiscall ArrowEff::SetHitDamage(ArrowEff *this, __int16 AtkSeqNum, DamageInfoSet *pkDamInfoSet); // idb
void __thiscall ArrowEff::ArrowEff(ArrowEff *this, NiNode *pkNode, bool bCreateProgramEff, Char *pkCaster); // idb
void __thiscall ArrowEff::~ArrowEff(ArrowEff *this); // idb
Effect *__thiscall ArrowEff::Clone(ArrowEff *this); // idb
ArrowEff *__thiscall ArrowEff::`vector deleting destructor'(char *this, unsigned int a2);
NiRTTI *ArrowEff::GetRTTI();
void __thiscall ArrowEff::SetBombEffectName(ArrowEff *this, char *pcBombEffName); // idb
void __thiscall ArrowEff::SetBombSndName(ArrowEff *this, char *pcBombSndName); // idb
int __thiscall Char::GetLP(Char *this); // idb
bool __thiscall ArrowEff::IsHitDamageShow(ArrowEff *this); // idb
void __thiscall ArrowEff::SetHitDamageShow(ArrowEff *this, bool bShow); // idb
ArrowEff *__thiscall ArrowEff::`scalar deleting destructor'(ArrowEff *this, unsigned int a2);
unsigned __int16 __thiscall AttachEff::GetTargetChar(AttachEff *this); // idb
void __thiscall AttachEff::SetTargetChar(AttachEff *this, unsigned __int16 kHandle); // idb
void __thiscall AttachEff::AttachEff(AttachEff *this, NiNode *pkNode, bool bCreateProgramEff, Char *pkCaster); // idb
bool __thiscall AttachEff::LengthOfView(AttachEff *this); // idb
void __thiscall IEffectHolder::ClearAttachedEffect(IEffectHolder *this); // idb
void __thiscall IEffectHolder::AttachEffectShow(IEffectHolder *this, bool bShow); // idb
void __thiscall AttachEff::SetEffectHold(AttachEff *this, bool b); // idb
void __thiscall AttachEff::Update(AttachEff *this, float fTime); // idb
void __thiscall IEffectHolder::OnAttachEffectEnd(IEffectHolder *this, AttachEff *pkEffect); // idb
void __thiscall IEffectHolder::AddAttachEffect(IEffectHolder *this, AttachEff *pkEffect); // idb
void __thiscall AttachEff::~AttachEff(AttachEff *this); // idb
void __thiscall AttachEff::OnEnd(AttachEff *this, float fTime); // idb
void __thiscall IEffectHolder::~IEffectHolder(IEffectHolder *this); // idb
void __thiscall IEffectHolder::IEffectHolder(IEffectHolder *this); // idb
void __thiscall NiTListBase<DFALL<AttachEff *>,AttachEff *>::~NiTListBase<DFALL<AttachEff *>,AttachEff *>(NiTListBase<DFALL<AttachEff *>,AttachEff *> *this); // idb
NiTListBase<DFALL<AttachEff *>,AttachEff *> *__thiscall NiTListBase<DFALL<AttachEff *>,AttachEff *>::`vector deleting destructor'(NiTListBase<DFALL<AttachEff *>,AttachEff *> *this, unsigned int a2);
AttachEff *__thiscall AttachEff::`vector deleting destructor'(char *this, unsigned int a2);
NiRTTI *AttachEff::GetRTTI();
char __thiscall AttachEff::IsEnd(AttachEff *this, float fTime);
void __thiscall NiTList<AttachEff *>::~NiTList<AttachEff *>(NiTList<AttachEff *> *this); // idb
NiTList<AttachEff *> *__thiscall NiTPointerListBase<DFALL<AttachEff *>,AttachEff *>::`vector deleting destructor'(NiTList<AttachEff *> *this, unsigned int a2);
IEffectHolder *__thiscall IEffectHolder::`vector deleting destructor'(IEffectHolder *this, unsigned int a2);
AttachEff *__thiscall AttachEff::`scalar deleting destructor'(AttachEff *this, unsigned int a2);
int __stdcall Effect::GetKeyStrToInt(char *KeywordStr);
void __thiscall Effect::SetAniStart(Effect *this, bool b); // idb
bool __thiscall Effect::GetAniStart(Effect *this); // idb
void __thiscall Effect::SetActiveSkillID(Effect *this, unsigned __int16 kID); // idb
unsigned __int16 __thiscall Effect::GetActiveSkillID(Effect *this); // idb
int __thiscall Effect::GetShaderEffect(Effect *this); // idb
int __stdcall Effect::FindShnIndex(NiTextKey *pkKey, unsigned int KeyNum, float fEffectTime);
signed __int16 __thiscall Effect::GetCasterHandle(Effect *this);
NiAVObject *__thiscall Effect::GetNodeByName(Effect *this, char *nodeName); // idb
void __thiscall Effect::UpdateLoop(Effect *this, float fTime); // idb
void __thiscall Effect::SetShaderEffect(Effect *this, char *NodeName, int EffType); // idb
char __thiscall Effect::CreateProgramEff(Effect *this);
void __thiscall Effect::UpdateOsc(Effect *this, float fTime); // idb
void __thiscall Effect::UpdateAE(Effect *this, float fTime); // idb
void __thiscall Effect::ClearAE(Effect *this); // idb
void __thiscall Effect::Update(Effect *this, float fTime); // idb
void __thiscall Effect::ClearOscTimeMmap(Effect *this); // idb
void __thiscall Effect::CatchAE(Effect *this); // idb
void __thiscall Effect::SetLoopInfo(Effect *this, const char *pcLoopSoundFileName, float fLoopKeepTime, float fLoopWaitTime, float fTime); // idb
void __thiscall Effect::~Effect(Effect *this); // idb
void __thiscall Effect::Effect(Effect *this, NiNode *pkNode, bool bCreateProgramEff, Char *pkCaster); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::~NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect> > *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect> > *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect> > *this, unsigned int a2);
bool __cdecl NiObject::IsExactKindOf(NiRTTI *pkRTTI, NiObject *pkObject); // idb
void __thiscall CDecalEffect::Init(CDecalEffect *this, PgNsTerrain *pkTerrain, NiNode *pBuildingScene); // idb
void __thiscall CDecalEffect::CDecalEffect(CDecalEffect *this); // idb
void __thiscall CDecalEffect::~CDecalEffect(CDecalEffect *this); // idb
CDecalEffect *__thiscall CDecalEffect::`vector deleting destructor'(CDecalEffect *this, unsigned int a2);
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect> > *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect> > *this, unsigned int a2);
void __thiscall NiTPointerList<NiPointer<Effect>>::~NiTPointerList<NiPointer<Effect>>(NiTPointerList<NiPointer<Effect> > *this); // idb
NiShader *__cdecl CPostProcessEffect::DynamicCast(NiRTTI *pkRTTI, NiShader *pkObject); // idb
void __thiscall PgTList<NiPointer<Effect>>::~PgTList<NiPointer<Effect>>(PgTList<NiPointer<Effect> > *this); // idb
PgTList<NiPointer<Effect> > *__thiscall PgTList<NiPointer<Effect>>::`vector deleting destructor'(PgTList<NiPointer<Effect> > *this, unsigned int a2);
std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<float,ActionEffectInfo *,std::less<float>,std::allocator<std::pair<float const,ActionEffectInfo *>>,1>>::_Buynode<std::pair<float,ActionEffectInfo *>>(std::_Tree_val<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > *this, std::pair<float,EffectViewInfo *> *_Val); // idb
Effect *__thiscall Effect::`vector deleting destructor'(char *this, unsigned int a2);
NiRTTI *Effect::GetRTTI();
bool __thiscall Effect::IsEnd(Effect *this, float fTime); // idb
Effect *__thiscall Effect::`vector deleting destructor'(Effect *this, unsigned int a2);
void __thiscall EffectCtrl::SetFrequency(EffectCtrl *this, float fFrequency); // idb
void __thiscall EffectCtrl::SetPhase(EffectCtrl *this, float fPhase); // idb
void __thiscall CDecalEffect::Start(CDecalEffect *this, float fTime); // idb
void __thiscall DecalMgr::Init(DecalMgr *this, PgNsTerrain *kTerrain, NiNode *kBuildingScene); // idb
void __thiscall DecalMgr::SetHeightFieldTerrain(DecalMgr *this, PgNsTerrain *kTerrain); // idb
bool __thiscall CharDecal::IsEnd(CharDecal *this); // idb
bool __thiscall CharDecal::IsPassLifeTime(CharDecal *this, float fTime); // idb
void __thiscall CharDecal::SetCharHandle(CharDecal *this, unsigned __int16 kHandle); // idb
unsigned __int16 __thiscall CharDecal::GetCharHandle(CharDecal *this); // idb
void __thiscall EffectCtrl::EffectCtrl(EffectCtrl *this); // idb
void __thiscall EffectCtrl::~EffectCtrl(EffectCtrl *this); // idb
void __thiscall EffectCtrl::Start(EffectCtrl *this, float _fTime); // idb
void __thiscall EffectCtrl::Stop(EffectCtrl *this); // idb
// void __userpurge CharDecal::Update(CharDecal *this@<ecx>, int a2@<ebx>, float fTime);
void __thiscall CharDecal::SetCharHandle(CharDecal *this, Char *kChar); // idb
void __thiscall CharDecal::SetLifeTime(CharDecal *this, float fTime); // idb
void __thiscall EffectCtrl::StartEmitter(EffectCtrl *this, float _fTime); // idb
void __thiscall EffectCtrl::StopEmitter(EffectCtrl *this); // idb
void __thiscall DecalMgr::RemoveAllDecal(DecalMgr *this); // idb
void __thiscall DecalMgr::Terminate(DecalMgr *this); // idb
void __thiscall CharDecal::CharDecal(CharDecal *this); // idb
void __thiscall CharDecal::~CharDecal(CharDecal *this); // idb
void __thiscall EffectCtrl::Add(EffectCtrl *this, NiTimeController *pkController); // idb
void __thiscall EffectCtrl::FindAndAdd(EffectCtrl *this, NiObjectNET *pkRoot); // idb
void __thiscall EffectCtrl::SetEffectNode(EffectCtrl *this, NiAVObject *_pkEffectObject); // idb
void __thiscall DecalMgr::~DecalMgr(DecalMgr *this); // idb
void __thiscall DecalMgr::RemoveDecal(DecalMgr *this, CharDecal *pkDecal); // idb
void __thiscall DecalMgr::RemoveCharDecal(DecalMgr *this, unsigned __int16 hHandle); // idb
void __thiscall DecalMgr::Update(DecalMgr *this, float fTime); // idb
char __thiscall CDecalEffect::SetEffect(CDecalEffect *this, NiNode *pEffect);
void __thiscall DecalMgr::DecalMgr(DecalMgr *this); // idb
NiNode *__thiscall DecalMgr::AddDecal(DecalMgr *this, NiNode *pkNode);
void __thiscall DecalMgr::RemoveCharDecal(DecalMgr *this, Char *pkChar); // idb
void __thiscall CharDecal::SetRadius(CharDecal *this, float fRadius); // idb
NiNode *__thiscall DecalMgr::AddDecal(DecalMgr *this, NiNode *pkNode, float fRadius, Char *pkChar);
CharDecal *__thiscall DecalMgr::AddDecal(DecalMgr *this, char *FileDir, float fRadius, Char *pkChar); // idb
void __thiscall NiTListBase<DFALL<CharDecal *>,CharDecal *>::~NiTListBase<DFALL<CharDecal *>,CharDecal *>(NiTListBase<DFALL<CharDecal *>,CharDecal *> *this); // idb
NiTListBase<DFALL<CharDecal *>,CharDecal *> *__thiscall NiTListBase<DFALL<CharDecal *>,CharDecal *>::`vector deleting destructor'(NiTListBase<DFALL<CharDecal *>,CharDecal *> *this, unsigned int a2);
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::~NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>(NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *> *this); // idb
NiTArray<NiTimeController *> *__thiscall NiTArray<NiTimeController *>::`vector deleting destructor'(NiTArray<NiTimeController *> *this, unsigned int a2);
NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *> *this, unsigned int a2);
void __thiscall NiTList<CharDecal *>::~NiTList<CharDecal *>(NiTList<CharDecal *> *this); // idb
NiTList<CharDecal *> *__thiscall NiTPointerListBase<DFALL<CharDecal *>,CharDecal *>::`vector deleting destructor'(NiTList<CharDecal *> *this, unsigned int a2);
void __thiscall NiAVObject::DetachAllProperties(NiAVObject *this); // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,CharDecal *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,CharDecal *> *this, unsigned int a2);
void __thiscall NiTPointerList<CharDecal *>::~NiTPointerList<CharDecal *>(NiTPointerList<CharDecal *> *this); // idb
EffectCtrl *__thiscall EffectCtrl::`vector deleting destructor'(EffectCtrl *this, unsigned int a2);
Ns_TourScene::TS_RESULT __stdcall FindDecalGeometry::ProcessData(NiAVObject *_pkObject, void *_pData);
void __thiscall PgTList<CharDecal *>::~PgTList<CharDecal *>(PgTList<CharDecal *> *this); // idb
PgTList<CharDecal *> *__thiscall PgTList<CharDecal *>::`vector deleting destructor'(PgTList<CharDecal *> *this, unsigned int a2);
CharDecal *__thiscall CharDecal::`vector deleting destructor'(CharDecal *this, unsigned int a2);
DecalMgr *__thiscall DecalMgr::`scalar deleting destructor'(DecalMgr *this, unsigned int a2);
void __thiscall NiTListBase<DFALL<Effect *>,Effect *>::~NiTListBase<DFALL<Effect *>,Effect *>(NiTListBase<DFALL<Effect *>,Effect *> *this); // idb
NiTListBase<DFALL<Effect *>,Effect *> *__thiscall NiTListBase<DFALL<Effect *>,Effect *>::`scalar deleting destructor'(NiTListBase<DFALL<Effect *>,Effect *> *this, unsigned int a2);
NiPoint3 *__thiscall Char::GetHairPos(Char *this, NiPoint3 *result); // idb
NiPoint3 *__thiscall Char::GetLeftHandPos(Char *this, NiPoint3 *result); // idb
NiPoint3 *__thiscall Char::GetLeftShoesPos(Char *this, NiPoint3 *result); // idb
NiPoint3 *__thiscall Char::GetRightShoesPos(Char *this, NiPoint3 *result); // idb
NiPoint3 *__thiscall Char::GetTopLinkPos(Char *this, NiPoint3 *result); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>::~NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>(NiTListBase<NiTPointerAllocator<unsigned int>,Effect *> *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,Effect *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,Effect *> *this, unsigned int a2);
void __thiscall EffectMgr::AttachEffectToWorld(EffectMgr *this, Effect *pkEffect); // idb
void __thiscall EffectMgr::PlayEffect(EffectMgr *this, Effect *pkEffect); // idb
void __thiscall EffectMgr::SetGuildAcademyMasterEffect(EffectMgr *this, Effect *pkEffect); // idb
char __thiscall EffectMgr::IsExistEffect(EffectMgr *this, Effect *pkSrcEffect);
// double __userpurge EffectMgr::CalculateEffScaleRatio@<st0>(EffectMgr *this@<ecx>, int a2@<esi>, NiNode *pkEffect, NiNode *pkTarget);
void __thiscall EffectMgr::AuraEffectEnable(EffectMgr *this, bool b); // idb
Effect *__thiscall EffectMgr::FindLightningWaveEffect(EffectMgr *this, unsigned __int16 kID); // idb
ArrowEff *__thiscall EffectMgr::GetArrowEffectInList(EffectMgr *this, __int16 AtkSeqNum, unsigned __int16 kCaster); // idb
NiNode *__thiscall EffectMgr::GetEffectNode(EffectMgr *this, char *pcName); // idb
double __thiscall EffectMgr::CalculateEffScaleRatio(EffectMgr *this, char *pcEffectName, NiNode *pkTarget);
Effect *__thiscall EffectMgr::FindAuraEffect(EffectMgr *this, unsigned __int16 kCaster); // idb
void __thiscall EffectMgr::FindEffectAbstateCtrlAni(EffectMgr *this, unsigned __int16 kTargetHandle, unsigned int AbstateIndex); // idb
char __thiscall EffectMgr::Init(EffectMgr *this);
void __thiscall EffectMgr::DetachEffectFromWorld(EffectMgr *this, Effect *pkEffect); // idb
void __thiscall EffectMgr::Add(EffectMgr *this, Effect *pkEffect); // idb
void __thiscall EffectMgr::SetShow(EffectMgr *this, Effect *pkEffect, int _bShow, bool bWithWorld);
void __thiscall EffectMgr::CreateActionEffect(EffectMgr *this, ActionEffectInfo *pkInfo, unsigned int uiCasterEventCode, float fOffSet, Char *pkCaster, Char *pkTarget, bool bGroundPointEffect, int kCurSkillID, NiControllerSequence *pkSeq);
void __thiscall EffectMgr::CreateActionEffect(EffectMgr *this, ActionInfo *pkInfo, int iIndex, Char *pkCaster, Char *pkTarget, bool bGroundPointEffect); // idb
void __thiscall EffectMgr::CreateEffect(EffectMgr *this, ActionInfo *pkInfo, int iIndex, Char *pkCaster, Char *pkTarget); // idb
void __thiscall EffectMgr::RemoveClientEff(EffectMgr *this, Effect *eff); // idb
void __thiscall EffectMgr::RemoveAllClientEff(EffectMgr *this); // idb
void __thiscall EffectMgr::Remove(EffectMgr *this, Effect *pkEffect); // idb
void __thiscall EffectMgr::RemoveEffect(EffectMgr *this, Char *pkEffect); // idb
void __thiscall EffectMgr::RemoveClientEff(EffectMgr *this, unsigned int uiEffType); // idb
void __thiscall EffectMgr::Update(EffectMgr *this, float fTime); // idb
void __thiscall EffectMgr::RemoveEffect(EffectMgr *this, Effect *pkEffect); // idb
void __thiscall EffectMgr::EffectMgr(EffectMgr *this); // idb
void __thiscall EffectMgr::~EffectMgr(EffectMgr *this); // idb
void __thiscall EffectMgr::RemoveAll(EffectMgr *this); // idb
void __thiscall EffectMgr::Terminate(EffectMgr *this); // idb
void __thiscall EffectMgr::SetAbstateInform(EffectMgr *this, ABSTATE_INFORMATION *pkAbstateInform, unsigned __int16 TargetHandle); // idb
void __thiscall AttachEff::SetTargetNode(AttachEff *this, NiNode *_pNode, IEffectHolder *pkEffHolder); // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,Effect *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,Effect *>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,Effect *> *this, unsigned int a2);
void __thiscall NiTPointerList<Effect *>::~NiTPointerList<Effect *>(NiTPointerList<Effect *> *this); // idb
void __thiscall NiTList<Effect *>::~NiTList<Effect *>(NiTList<Effect *> *this); // idb
NiTPointerListBase<DFALL<Effect *>,Effect *> *__thiscall NiTPointerListBase<DFALL<Effect *>,Effect *>::`scalar deleting destructor'(NiTPointerListBase<DFALL<Effect *>,Effect *> *this, unsigned int a2);
EffectMgr::AbstateAni *__stdcall std::allocator<EffectMgr::AbstateAni>::allocate(unsigned int _Count);
SubAbStateInfo *__cdecl SubAbStateInfoTab::GetByStrInxName(char *pcInxName, unsigned int Str); // idb
void __thiscall PgTList<Effect *>::~PgTList<Effect *>(PgTList<Effect *> *this); // idb
PgTList<Effect *> *__thiscall PgTList<Effect *>::`vector deleting destructor'(PgTList<Effect *> *this, unsigned int a2);
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > >,std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Effect *>>,1>>::_Eqrange(std::_Tree<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > >,std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > > > *result, const unsigned int *_Keyval); // idb
EffectMgr::AbstateAni *__cdecl std::_Uninit_move<EffectMgr::AbstateAni *,EffectMgr::AbstateAni *,std::allocator<EffectMgr::AbstateAni>,EffectMgr::AbstateAni>(EffectMgr::AbstateAni *_First, EffectMgr::AbstateAni *_Last, EffectMgr::AbstateAni *_Dest);
void __thiscall std::vector<EffectMgr::AbstateAni,std::allocator<EffectMgr::AbstateAni>>::reserve(std::vector<EffectMgr::AbstateAni,std::allocator<EffectMgr::AbstateAni> > *this, unsigned int _Count); // idb
void __thiscall std::vector<EffectMgr::AbstateAni,std::allocator<EffectMgr::AbstateAni>>::_Reserve(std::vector<EffectMgr::AbstateAni,std::allocator<EffectMgr::AbstateAni> > *this, unsigned int _Count); // idb
void __thiscall std::vector<EffectMgr::AbstateAni,std::allocator<EffectMgr::AbstateAni>>::push_back(std::vector<EffectMgr::AbstateAni,std::allocator<EffectMgr::AbstateAni> > *this, EffectMgr::AbstateAni *_Val); // idb
char __thiscall EffectMgr::CreateAttachEffect(EffectMgr *this, char *pcEffectName, unsigned __int16 kTarget, NiPoint3 kDir, float fTime);
char __thiscall EffectMgr::CreatePigeonEffect(EffectMgr *this, Char *pkTarget, float fTime);
void __thiscall EffectMgr::JustCreateLookAtEffect(EffectMgr *this, char *pcEffectName);
void __thiscall EffectMgr::JustCreateClientEffect(EffectMgr *this, char *pcEffectName);
ClientEffect *__thiscall EffectMgr::JustCreateClientEffect(EffectMgr *this, char *pcEffectName, NiPoint3 kPos); // idb
Effect *__thiscall EffectMgr::JustCreateClientEffect(EffectMgr *this, char *pcEffectName, int hHandle);
Effect *__thiscall EffectMgr::JustCreateEffect(EffectMgr *this, char *pcEffectName, NiPoint3 kPos, NiPoint3 kDir, float fTime, bool bDir); // idb
Effect *__thiscall EffectMgr::JustCreateAttachEffect(EffectMgr *this, char *pcEffectName, int kTarget, NiPoint3 kDir, float fTime);
char __thiscall EffectMgr::CreateShootEff(EffectMgr *this, char *pcShootEffName, char *pcShootBombName, char *pcBombSndName, Char *pkAttack, Char *pkTarget, float fTime, float fSpeed, DamageInfoSet *pkDamInfoSet, LastEffPos ePos, bool bFireOnRight);
char __thiscall EffectMgr::CreateShootEff(EffectMgr *this, char *pcShootEffName, char *pcShootBombName, char *pcShootSndName, Char *pkAttack, Char *pkTarget, float fTime, float fSpeed, unsigned int uiHitDamage);
char __thiscall EffectMgr::CreateShootEff(EffectMgr *this, char *pcShootEffName, ActionEffectInfo *pkBombInfo, Char *pkAttack, Char *pkTarget, float fTime, float fSpeed, int AtkSeqNum, DamageInfoSet *pkDamInfoSet, LastEffPos ePos, bool bFireOnRight);
char __thiscall EffectMgr::CreateWeddingEffect(EffectMgr *this, char *pcEffectName, unsigned __int16 Newlywed, float fTime);
char __thiscall EffectMgr::CreateLightningShootEff(EffectMgr *this, char *pcShootEffName, char *pcShootBombName, Char *pkAttack, Char *pkTarget, float fTime, float fSpeed, DamageInfoSet *pkDamInfoSet, LastEffPos ePos, bool bFireOnRight, unsigned __int16 kID);
LookAtEffect *__thiscall EffectMgr::JustCreateLookAtEffect(EffectMgr *this, char *pcEffectName, NiPoint3 kLookAtPos, Char *pkCaster); // idb
LookAtEffect *__thiscall EffectMgr::JustCreateLookAtEffect(EffectMgr *this, char *pcEffectName, NiPoint3 kLookAtPos, NiPoint3 kPos); // idb
Effect *__thiscall EffectMgr::JustCreateAttachEffect(EffectMgr *this, char *pcEffectName, NiNode *pkTargetNode, IEffectHolder *pkHolder, float fTime); // idb
char __thiscall EffectMgr::CreateEffect(EffectMgr *this, char *pcEffectName, NiPoint3 kPos, NiPoint3 kDir, float fTime, float fScale);
char __thiscall EffectMgr::CreateAttachEffect(EffectMgr *this, unsigned int *dwEffHandle_, NiNode *_pEffect, NiNode *_pNode, float fTime, bool _bLoop, unsigned __int16 kHandle);
char __thiscall EffectMgr::CreateAttachScaleEffect(EffectMgr *this, unsigned int *dwEffHandle_, char *pcEffectName, NiNode *pkTargetNode, float fScale, float fTime);
NiNode *__stdcall EffectMgr::GetEffPos(AbnormalStateViewInfo::EffPosEnum eEffPos, Char *pkTarget);
AttachEff *__thiscall EffectMgr::JustCreateAttachEffect(EffectMgr *this, char *pcEffectName, Char *pkTarget, AbnormalStateViewInfo::EffPosEnum eEffPos, float fTime, bool bShow);
char __thiscall EffectMgr::CreateAttachEffect(EffectMgr *this, unsigned int *dwEffHandle_, char *pcEffectName, NiNode *_pNode, float fTime, bool _bLoop);
char __thiscall EffectMgr::CreateAttachEffect(EffectMgr *this, unsigned int *dwEffHandle_, char *pcEffectName, Char *pkTarget, AbnormalStateViewInfo::EffPosEnum eEffPos, float fTime, bool _bLoop, bool bAura, bool bHold, bool bShow);
char __thiscall EffectMgr::CreateAniCtrlEffect(EffectMgr *this, unsigned int *dwEffHandle_, char *pcEffectName, Char *pkTarget, AbnormalStateViewInfo::EffPosEnum eEffPos, float fTime, bool _bLoop, int kID);
bool __thiscall EffectMgr::CreateStretchEffect(EffectMgr *this, char *pcEffectName, NiPoint3 kPos, NiPoint3 kDir, Char *pkCaster, Char *pkTarget, float fTime); // idb
char __thiscall EffectMsg::Play(EffectMsg *this, EFFECT_MESSAGE_TYPE Type);
void __thiscall EffectMsg::EffectMsg(EffectMsg *this); // idb
void __thiscall EffectMsg::~EffectMsg(EffectMsg *this); // idb
char __thiscall EffectMsg::Load(EffectMsg *this);
void EffectObject::EffectObject();
void __thiscall ExpEffect::ExpEffect(ExpEffect *this, NiNode *pkNode, bool bCreateProgramEff); // idb
void __thiscall ExpEffect::~ExpEffect(ExpEffect *this); // idb
bool __thiscall ExpEffect::IsEnd(ExpEffect *this, float fTime); // idb
bool __thiscall ExpEffect::IsHitTarget(ExpEffect *this); // idb
// void __userpurge ExpEffect::Update(ExpEffect *this@<ecx>, int a2@<ebx>, int a3@<edi>, int a4@<esi>, float fTime);
void __thiscall ExpEffect::Start(ExpEffect *this, float fTime); // idb
NiRTTI *ExpEffect::GetRTTI();
ExpEffect *__thiscall ExpEffect::`vector deleting destructor'(char *this, unsigned int a2);
ExpEffect *__thiscall ExpEffect::`vector deleting destructor'(ExpEffect *this, unsigned int a2);
void __thiscall SpEffect::SpEffect(SpEffect *this, NiNode *pkEffect); // idb
void __thiscall SpEffect::Start(SpEffect *this, NiNode *pkParent); // idb
void __thiscall SpEffect::End(SpEffect *this, NiNode *pkParent); // idb
void __thiscall SpEffect::Update(SpEffect *this, float fTime); // idb
void __thiscall StretchEffect::SetAniSpeedCtrl(StretchEffect *this, float fRequency, float fPhase); // idb
char __stdcall StretchEffect::IsEnd(float fTime);
void __thiscall StretchEffect::OnEnd(StretchEffect *this, float fTime); // idb
void __thiscall StretchEffect::Update(StretchEffect *this, float fTime); // idb
void __thiscall StretchEffect::Start(StretchEffect *this, float fTime); // idb
void __thiscall StretchEffect::CopyMember(StretchEffect *this, Effect *pkEffect); // idb
void __thiscall StretchEffect::StretchEffect(StretchEffect *this, NiNode *pkNode, bool bCreateProgramEff, Char *pkCaster); // idb
void __thiscall StretchEffect::~StretchEffect(StretchEffect *this); // idb
Effect *__thiscall StretchEffect::Clone(StretchEffect *this); // idb
NiRTTI *StretchEffect::GetRTTI();
void __thiscall StretchEffect::SetBombEffectName(StretchEffect *this, char *pcBombEffName); // idb
void __thiscall StretchEffect::SetBombSndName(StretchEffect *this, char *pcBombSndName); // idb
unsigned __int16 __thiscall StretchEffect::GetStartChar(StretchEffect *this); // idb
unsigned __int16 __thiscall StretchEffect::GetEndChar(StretchEffect *this); // idb
StretchEffect *__thiscall StretchEffect::`vector deleting destructor'(char *this, unsigned int a2);
StretchEffect *__thiscall StretchEffect::`scalar deleting destructor'(StretchEffect *this, unsigned int a2);
void __thiscall WeddingEffect::WeddingEffect(WeddingEffect *this, NiNode *pkNode, bool bCreateProgramEff); // idb
void __thiscall WeddingEffect::~WeddingEffect(WeddingEffect *this); // idb
bool __thiscall WeddingEffect::IsEnd(WeddingEffect *this, float fTime); // idb
// void __userpurge WeddingEffect::Update(WeddingEffect *this@<ecx>, int a2@<ebx>, int a3@<edi>, int a4@<esi>, float fTime);
void __thiscall WeddingEffect::Start(WeddingEffect *this, float fTime); // idb
NiRTTI *WeddingEffect::GetRTTI();
WeddingEffect *__thiscall WeddingEffect::`vector deleting destructor'(char *this, unsigned int a2);
WeddingEffect *__thiscall WeddingEffect::`vector deleting destructor'(WeddingEffect *this, unsigned int a2);
bool __thiscall TextEff::IsAlive(TextEff *this, float fTime); // idb
void __thiscall TextEff::SetStartTime(TextEff *this, float fTime); // idb
void __thiscall TextEff::TextEff(TextEff *this); // idb
void __thiscall TextEff::~TextEff(TextEff *this); // idb
void __thiscall TextEff::AddGeometry(TextEff *this, NiScreenElements *pkGeom, unsigned int uiWidth, unsigned int uiHeight); // idb
void __thiscall TextEff::AddNode(TextEff *this, NiNode *pkNode, unsigned int uiWidth, unsigned int uiHeight); // idb
// void __userpurge TextEff::Update(TextEff *this@<ecx>, int a2@<ebx>, float fTime, NiCamera *pkWorldCamera, PgWinCamera *pkScreenCamera);
TextEff *__thiscall TextEff::`scalar deleting destructor'(TextEff *this, unsigned int a2);
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>::~NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>(NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *> *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *> *this, unsigned int a2);
void __thiscall TextEffMgr::GeomRes::~GeomRes(TextEffMgr::GeomRes *this); // idb
void __thiscall TextEffMgr::Draw(TextEffMgr *this); // idb
NiNode *__stdcall TextEffMgr::CreateControllNode(NiTransformController *pkMoveCtrl, NiTransformController *pkNoiseCtrl, NiTransformController *pkSizeCtrl, NiAlphaController *pkAlphaCtrl, NiScreenElements *pkGeom);
void __thiscall TextEffMgr::Add(TextEffMgr *this, TextEff *pkTextEff); // idb
void __thiscall TextEffMgr::ReleaseGeometry(TextEffMgr *this); // idb
char __thiscall TextEffMgr::LoadController(TextEffMgr *this);
void __thiscall TextEffMgr::ReleaseController(TextEffMgr *this); // idb
void __thiscall TextEffMgr::~TextEffMgr(TextEffMgr *this); // idb
void __thiscall TextEffMgr::AddNumTextEff(TextEffMgr *this, unsigned __int16 kHandle, int iNum, TextEffMgr::TextEffColor eColor, bool bCritical); // idb
void __thiscall TextEffMgr::AddMissTextEff(TextEffMgr *this, unsigned __int16 kHandle); // idb
void __thiscall TextEffMgr::AddResistTextEff(TextEffMgr *this, unsigned __int16 kHandle); // idb
void __thiscall TextEffMgr::AddBlockTextEff(TextEffMgr *this, unsigned __int16 kHandle); // idb
void __thiscall TextEffMgr::AddImmuneTextEff(TextEffMgr *this, unsigned __int16 kHandle); // idb
void __thiscall TextEffMgr::Remove(TextEffMgr *this, TextEff *pkTextEff); // idb
// void __usercall TextEffMgr::RemoveAll(TextEffMgr *this@<ecx>, signed int a2@<esi>);
// void __userpurge TextEffMgr::Update(TextEffMgr *this@<ecx>, NiCamera *a2@<ebx>, float fTime, NiCamera *pkWorldCamera);
void __stdcall TextEffMgr::CopyProperty(NiScreenElements *pkGeom, NiTriShape *pkTriShape);
char __thiscall TextEffMgr::CreateGeometry(TextEffMgr *this);
void __thiscall TextEffMgr::AddDamage(TextEffMgr *this, unsigned __int16 kHandle, int iNum); // idb
void __thiscall TextEffMgr::TextEffMgr(TextEffMgr *this); // idb
bool __thiscall TextEffMgr::Init(TextEffMgr *this); // idb
void __thiscall TextEffMgr::Terminate(TextEffMgr *this); // idb
void __thiscall TextEffMgr::GeomRes::GeomRes(TextEffMgr::GeomRes *this); // idb
void __thiscall NiTPointerList<TextEff *>::~NiTPointerList<TextEff *>(NiTPointerList<TextEff *> *this); // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,TextEff *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,TextEff *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,TextEff *> *this, unsigned int a2);
void __thiscall PgTList<TextEff *>::~PgTList<TextEff *>(PgTList<TextEff *> *this); // idb
PgTList<TextEff *> *__thiscall PgTList<TextEff *>::`vector deleting destructor'(PgTList<TextEff *> *this, unsigned int a2);
void __thiscall CBlindEffect::FastEnd(CBlindEffect *this); // idb
void __thiscall CBlindEffect::CBlindEffect(CBlindEffect *this); // idb
char __thiscall CBlindEffect::Stop(CBlindEffect *this);
void __thiscall CBlindEffect::Draw(CBlindEffect *this, NiRenderer *pRender); // idb
void __thiscall CBlindEffect::Update(CBlindEffect *this, float fAccolTime); // idb
void __thiscall CBlindEffect::~CBlindEffect(CBlindEffect *this); // idb
char __thiscall CBlindEffect::Start(CBlindEffect *this, float fFullTime, float fFadeTime);
CBlindEffect *__thiscall CBlindEffect::`vector deleting destructor'(CBlindEffect *this, unsigned int a2);
void __thiscall CameraEffect::SetColor(CameraEffect *this, char ucR, char ucG, char ucB); // idb
void __stdcall CameraEffect::SetAngleBoundary(float fAngle, float *pkVar, float fBoundary);
void __thiscall CameraEffect::SetColor(CameraEffect *this, float fR, float fG, float fB); // idb
void __thiscall CameraEffect::SetAngle(CameraEffect *this, float fAngleLR, float fAngleUD); // idb
void __thiscall CameraEffect::Stop(CameraEffect *this); // idb
void __thiscall CameraEffect::Draw(CameraEffect *this, NiRenderer *pRender); // idb
void __thiscall CameraEffect::UpdateSchedule(CameraEffect *this, float fCurTime, float fAlphaRatio, unsigned int uiSchedule); // idb
void __thiscall CameraEffect::SetSchedule(CameraEffect *this, unsigned int uiState, unsigned int uiCount); // idb
void __thiscall CameraEffect::~CameraEffect(CameraEffect *this); // idb
void __thiscall CameraEffect::ClearMove(CameraEffect *this); // idb
void __thiscall CameraEffect::Update(CameraEffect *this, float fCurTime); // idb
char __thiscall CameraEffect::Start(CameraEffect *this, float fStartTime, float fFadeTime, unsigned int uiState, unsigned int uiCount);
void __thiscall CameraEffect::CameraEffect(CameraEffect *this); // idb
AttackSequence *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,unsigned int>::RemoveHead(NiTPointerListBase<DFALL<AttackSequence *>,AttackSequence *> *this); // idb
CameraEffect *__thiscall CameraEffect::`scalar deleting destructor'(CameraEffect *this, unsigned int a2);
unsigned __int16 __thiscall ClientEffect::GetTargetChar(ClientEffect *this); // idb
void __thiscall ClientEffect::SetTargetChar(ClientEffect *this, unsigned __int16 kHandle); // idb
void __thiscall ClientEffect::SetTargetPos(ClientEffect *this, NiPoint3 kPos); // idb
void __thiscall ClientEffect::SetOffsetPos(ClientEffect *this, NiPoint3 kPos); // idb
void __thiscall ClientEffect::~ClientEffect(ClientEffect *this); // idb
void __thiscall ClientEffect::Stop(ClientEffect *this); // idb
bool __thiscall ClientEffect::LengthOfView(ClientEffect *this); // idb
void __thiscall ClientEffect::ClientEffect(ClientEffect *this, NiNode *pkNode, bool bCreateProgramEff, Char *pkCaster); // idb
// void __userpurge ClientEffect::Update(ClientEffect *this@<ecx>, int a2@<ebx>, int a3@<edi>, int a4@<esi>, float fTime);
ClientEffect *__thiscall ClientEffect::`vector deleting destructor'(char *this, unsigned int a2);
ClientEffect *__thiscall ClientEffect::`vector deleting destructor'(ClientEffect *this, unsigned int a2);
void __thiscall LookAtEffect::~LookAtEffect(LookAtEffect *this); // idb
void __thiscall LookAtEffect::LookAtEffect(LookAtEffect *this, NiNode *pkNode, bool bCreateProgramEff, Char *pkCaster); // idb
void __thiscall LookAtEffect::CalcDir(LookAtEffect *this); // idb
// void __userpurge LookAtEffect::Update(LookAtEffect *this@<ecx>, int a2@<ebx>, int a3@<edi>, float fTime);
void __thiscall LookAtEffect::Start(LookAtEffect *this, float fTime); // idb
LookAtEffect *__thiscall LookAtEffect::`vector deleting destructor'(char *this, unsigned int a2);
LookAtEffect *__thiscall LookAtEffect::`scalar deleting destructor'(LookAtEffect *this, unsigned int a2);
double __cdecl SoundGroup::GetMasterGain();
void __thiscall SoundGroup::SetMaxRange(SoundGroup *this, float fMax); // idb
void __thiscall SoundGroup::SetTableSize(SoundGroup *this, unsigned int dwTableSize); // idb
void __thiscall SoundGroup::SetTable(SoundGroup *this, unsigned int dwIndex, char *acFn); // idb
bool __thiscall SoundGroup::SetChannelCount(SoundGroup *this, SoundMgr *rkMgr, unsigned int dwChannelCount); // idb
bool __thiscall SoundGroup::Initialize(SoundGroup *this, SoundMgr *rkMgr, unsigned int dwChannelCount); // idb
char *__thiscall SoundGroup::GetFilenameFrom(SoundGroup *this, SoundIndex *rkIndex); // idb
void __thiscall SoundGroup::Terminate(SoundGroup *this); // idb
void __thiscall SoundGroup::SetEnable(SoundGroup *this, bool bEnable); // idb
void __thiscall SoundGroup::GetSoundMinMax(SoundGroup *this, float *fMin, float *fMax); // idb
NiTList<NiAudioSource *> *__thiscall SoundGroupDynamic::GetPlayingSourceList(SoundGroupDynamic *this); // idb
void __thiscall SoundGroupDynamic::Terminate(SoundGroupDynamic *this); // idb
void __cdecl SoundGroup::SetMasterGain(float fVolume); // idb
void __cdecl SoundGroup::StopAllSoundWholeGroup(); // idb
void __cdecl SoundGroup::UpdateWholeGroup(float fTime); // idb
void __cdecl SoundGroup::TerminateWholeGroup(); // idb
void __cdecl SoundGroup::SetEnableWholeGroup(int bEnable);
void __cdecl SoundGroup::UnloadAllSoundWholeGroup(); // idb
void __cdecl SoundGroup::DetachAllSoundWholeGroup(); // idb
BOOL __thiscall SoundGroup::IsChannelFull(SoundGroup *this);
bool __thiscall SoundGroup::IsOutofMaxRange(SoundGroup *this, NiPoint3 *rkPoint); // idb
bool __thiscall SoundGroup::IsOutofMaxRange(SoundGroup *this, NiAVObject *pkObj); // idb
char __thiscall SoundGroup::LoadSound(SoundGroup *this, NiAudioSource *pkSource, char *pcFilename, int bStreamed);
void __thiscall SoundGroup::SetGain(SoundGroup *this, float fVolume); // idb
NiPointer<NiAudioSource> *__thiscall SoundGroup::CreateSource(SoundGroup *this, NiPointer<NiAudioSource> *result, unsigned int uiType); // idb
void __stdcall SoundGroup::ClearSource(NiAudioSource *pkSource);
void __thiscall SoundGroup::StopAllSound(SoundGroup *this); // idb
bool __thiscall SoundGroup::Check3DSoundPlayable(SoundGroup *this, NiPoint3 *rkPoint); // idb
bool __thiscall SoundGroup::Check3DSoundPlayable(SoundGroup *this, NiAVObject *pkObj); // idb
void __thiscall SoundGroup::SetMinDistance(SoundGroup *this, float fMinDist); // idb
void __thiscall SoundGroup::SetMaxDistance(SoundGroup *this, float fMaxDist); // idb
char __thiscall SoundGroupStatic::IsUniqueSource(SoundGroupStatic *this, NiMilesSource *pkSource);
NiAudioSource *__thiscall SoundGroupStatic::GetSoundDirectly(SoundGroupStatic *this, unsigned int dwSoundIndex); // idb
void __thiscall SoundGroupStatic::StopSound(SoundGroupStatic *this, SoundIndex *rkIndex); // idb
void __thiscall SoundGroupStatic::Terminate(SoundGroupStatic *this); // idb
void __thiscall SoundGroupStatic::UnloadAllSound(SoundGroupStatic *this); // idb
void __thiscall SoundGroupStatic::DetachAllSound(SoundGroupStatic *this); // idb
void __thiscall SoundGroupStatic::DetachSound(SoundGroupStatic *this, SoundIndex *rkIndex); // idb
char __thiscall SoundGroupDynamic::IsUniqueSource(SoundGroupDynamic *this, NiMilesSource *pkSource);
void __thiscall SoundGroupDynamic::UnloadAllSound(SoundGroupDynamic *this); // idb
void __thiscall SoundGroupDynamic::DetachAllSound(SoundGroupDynamic *this); // idb
void __thiscall SoundGroup::Update(SoundGroup *this, float fTime); // idb
void __thiscall SoundGroup::UpdatePlayingSource(SoundGroup *this); // idb
NiPointer<NiAudioSource> *__thiscall SoundGroup::Create3DSource(SoundGroup *this, NiPointer<NiAudioSource> *result, char *pcFileName, int bStreamed);
NiPointer<NiAudioSource> *__thiscall SoundGroup::CreateAmbientSource(SoundGroup *this, NiPointer<NiAudioSource> *result, char *pcFileName, int bStreamed);
void __thiscall SoundGroupStatic::SetTableSize(SoundGroupStatic *this, unsigned int dwTableSize); // idb
NiAudioSource *__thiscall SoundGroupStatic::GetSound(SoundGroupStatic *this, SoundIndex *rkIndex, bool bStreamed); // idb
NiAudioSource *__thiscall SoundGroupStatic::Get3DSound(SoundGroupStatic *this, SoundIndex *rkIndex, bool bStreamed); // idb
NiAudioSource *__thiscall SoundGroupStatic::PlaySoundA(SoundGroupStatic *this, SoundIndex *rkIndex, bool bLoop, bool bStreamed); // idb
NiAudioSource *__thiscall SoundGroupStatic::Play3DSound(SoundGroupStatic *this, SoundIndex *rkIndex, NiPoint3 *rkPoint, bool bLoop); // idb
// NiAudioSource *__userpurge SoundGroupStatic::Play3DSound@<eax>(SoundGroupStatic *this@<ecx>, int a2@<esi>, SoundIndex *rkIndex, NiNode *pkNode, bool bLoop);
void __thiscall SoundGroupStatic::UnloadSound(SoundGroupStatic *this, SoundIndex *rkIndex); // idb
void __thiscall SoundGroupDynamic::MarkAsRecentlyUsed(SoundGroupDynamic *this, NiAudioSource *pkSource); // idb
void __thiscall SoundGroup::SoundGroup(SoundGroup *this); // idb
void __thiscall SoundGroup::~SoundGroup(SoundGroup *this); // idb
void __thiscall SoundGroupStatic::SoundGroupStatic(SoundGroupStatic *this); // idb
void __thiscall SoundGroupStatic::~SoundGroupStatic(SoundGroupStatic *this); // idb
SoundIndex *__thiscall SoundGroupDynamic::PlaySoundA(SoundGroupDynamic *this, SoundIndex *rkIndex, bool bLoop, bool bStreamed);
NiNode *__thiscall SoundGroupDynamic::Play3DSound(SoundGroupDynamic *this, SoundIndex *rkIndex, NiNode *pkNode, bool bLoop);
NiPoint3 *__thiscall SoundGroupDynamic::Play3DSound(SoundGroupDynamic *this, SoundIndex *rkIndex, NiPoint3 *rkPoint, bool bLoop);
NiPointer<NiAudioSource> *__thiscall SoundGroupDynamic::CreateSource(SoundGroupDynamic *this, NiPointer<NiAudioSource> *result, unsigned int uiType); // idb
void __thiscall SoundGroupDynamic::PushInRecycleList(SoundGroupDynamic *this, NiAudioSource *pkSource); // idb
void __thiscall SoundGroupDynamic::KeepUniqueSourceCountUnder(SoundGroupDynamic *this, unsigned int dwMaxSound); // idb
void __thiscall SoundGroupDynamic::UpdatePlayingSource(SoundGroupDynamic *this); // idb
void __thiscall SoundGroupDynamic::Update(SoundGroupDynamic *this, float fTime); // idb
void *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,void *>::RemoveTail(NiTPointerListBase<NiTPointerAllocator<unsigned int>,void *> *this); // idb
void __thiscall SpTList<void *>::MoveToHead(SpTList<void *> *this, void **iter); // idb
void __thiscall NiTListBase<DFALL<SoundGroup *>,SoundGroup *>::~NiTListBase<DFALL<SoundGroup *>,SoundGroup *>(NiTListBase<DFALL<SoundGroup *>,SoundGroup *> *this); // idb
void __thiscall NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *>::~NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *>(NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *> *this); // idb
NiTListBase<DFALL<SoundGroup *>,SoundGroup *> *__thiscall NiTListBase<DFALL<SoundGroup *>,SoundGroup *>::`vector deleting destructor'(NiTListBase<DFALL<SoundGroup *>,SoundGroup *> *this, unsigned int a2);
NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *> *__thiscall NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *>::`vector deleting destructor'(NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *> *this, unsigned int a2);
void __stdcall NiTPointerListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>::DeleteItem(NiTMapItem<char const *,NiD3DGlobalConstantEntry *> *pkItem);
NiTList<SoundGroup *> *__thiscall NiTPointerListBase<DFALL<SoundGroup *>,SoundGroup *>::`vector deleting destructor'(NiTList<SoundGroup *> *this, unsigned int a2);
void __thiscall NiTList<NiAudioSource *>::~NiTList<NiAudioSource *>(NiTList<NiAudioSource *> *this); // idb
NiTList<NiAudioSource *> *__thiscall NiTPointerListBase<DFALL<NiAudioSource *>,NiAudioSource *>::`vector deleting destructor'(NiTList<NiAudioSource *> *this, unsigned int a2);
SoundGroup *__thiscall SoundGroup::`scalar deleting destructor'(SoundGroup *this, unsigned int a2);
SoundGroupStatic *__thiscall SoundGroupMainChar::`scalar deleting destructor'(SoundGroupStatic *this, unsigned int a2);
void __thiscall SoundGroupBgm::SetFadeDurationTime(SoundGroupBgm *this, float fDuration); // idb
void __thiscall SoundGroupBgm::SetCrossFade(SoundGroupBgm *this, bool bCross); // idb
bool __thiscall SoundGroupBgm::Initialize(SoundGroupBgm *this, SoundMgr *rkMgr, unsigned int dwOccupyingChannelCount); // idb
bool __thiscall SoundGroupBgm::IsBGMPlaying(SoundGroupBgm *this); // idb
void __thiscall IAmbientArea::Update(IAmbientArea *this, float x, float y); // idb
void __thiscall IAmbientArea::SetVolume(IAmbientArea *this, int iVolume); // idb
void __thiscall CircleAmbientArea::Create(CircleAmbientArea *this, float fX, float fY, float fRadius); // idb
BOOL __thiscall CircleAmbientArea::IsInside(CircleAmbientArea *this, float x, float y);
double __thiscall CircleAmbientArea::GetRadius(CircleAmbientArea *this);
void __thiscall SoundGroupAmbient::SetGain(SoundGroupAmbient *this, float fVolume); // idb
void __thiscall SoundGroupInterface::SetGain(SoundGroupInterface *this, float fVolume); // idb
void __thiscall SoundGroupInterface::SetEnable(SoundGroupInterface *this, int bEnable);
bool __thiscall SoundGroupMainChar::Initialize(SoundGroupMainChar *this, SoundMgr *rkMgr, unsigned int dwOccupyingChannelCount); // idb
void __thiscall SoundGroupBgm::SetGain(SoundGroupBgm *this, float fVolume); // idb
NiPoint2 *__thiscall CircleAmbientArea::GetCenter(CircleAmbientArea *this, NiPoint2 *result); // idb
void __thiscall SoundGroupAmbient::Update(SoundGroupAmbient *this, float fTime); // idb
char __thiscall SoundGroupAmbient::Initialize(SoundGroupAmbient *this, SoundMgr *rkMgr, unsigned int dwOccupyingChannelCount);
void __thiscall SoundGroupAmbient::SetAmbientVolumeSync(SoundGroupAmbient *this); // idb
char __thiscall SoundGroupInterface::Initialize(SoundGroupInterface *this, SoundMgr *rkMgr, unsigned int dwOccupyingChannelCount);
void __thiscall SoundGroupInterface::PlaySoundDynamic(SoundGroupInterface *this, char *pcFilename); // idb
void __thiscall SoundGroupBgm::NextBgm(SoundGroupBgm *this, int bLoop);
void __thiscall SoundGroupAmbient::OnExitArea(SoundGroupAmbient *this, IAmbientArea *pkArea); // idb
void __thiscall SoundGroupBgm::SoundGroupBgm(SoundGroupBgm *this); // idb
void __thiscall SoundGroupBgm::StopBGM(SoundGroupBgm *this); // idb
unsigned int __thiscall SoundGroupAmbient::OnEnterArea(SoundGroupAmbient *this, IAmbientArea *pkArea);
bool __thiscall SoundGroupFieldEffect::Check3DSoundPlayable(SoundGroupFieldEffect *this, NiPoint3 *rkPoint); // idb
void __thiscall SoundGroupAmbient::ClearArea(SoundGroupAmbient *this); // idb
void __thiscall SoundGroupAmbient::~SoundGroupAmbient(SoundGroupAmbient *this); // idb
void __thiscall IAmbientArea::SetSndFilename(IAmbientArea *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *rkSndFn); // idb
void __thiscall SoundGroupAmbient::LoadAreaTable(SoundGroupAmbient *this, char *pcFn); // idb
void __thiscall SoundGroupBgm::PlayBGM(SoundGroupBgm *this, char *acFn, int bLoop, float fBgmVol);
// void __userpurge SoundGroupBgm::Update(SoundGroupBgm *this@<ecx>, double a2@<st0>, float fTime);
void __thiscall SoundGroupBgm::PlayBGM(SoundGroupBgm *this, int id, int bLoop);
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,void *>::~NiTListBase<NiTPointerAllocator<unsigned int>,void *>(NiTListBase<NiTPointerAllocator<unsigned int>,void *> *this); // idb
void __thiscall NiTListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::~NiTListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>(NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> > *this); // idb
void __thiscall NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *>::~NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *>(NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *> *this); // idb
void __thiscall NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>::~NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>(NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *> *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,void *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,void *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,void *> *this, unsigned int a2);
NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> > *__thiscall NiTListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`scalar deleting destructor'(NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> > *this, unsigned int a2);
NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *> *__thiscall NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *>::`vector deleting destructor'(NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *> *this, unsigned int a2);
NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *> *__thiscall NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>::`vector deleting destructor'(NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *> *this, unsigned int a2);
unsigned int __cdecl ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::GetTotal(); // idb
void __thiscall NiTPointerList<void *>::~NiTPointerList<void *>(SpTList<void *> *this); // idb
NiTPointerListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> > *__thiscall NiTPointerListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`vector deleting destructor'(NiTPointerListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> > *this, unsigned int a2);
MapAmbienceSoundInfoTab *__thiscall ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::`vector deleting destructor'(MapAmbienceSoundInfoTab *this, unsigned int a2);
NiTPointerListBase<DFALL<IAmbientArea *>,IAmbientArea *> *__thiscall NiTPointerListBase<DFALL<IAmbientArea *>,IAmbientArea *>::`scalar deleting destructor'(NiTPointerListBase<DFALL<IAmbientArea *>,IAmbientArea *> *this, unsigned int a2);
NiTPointerListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *> *__thiscall NiTPointerListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>::`vector deleting destructor'(NiTPointerListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *> *this, unsigned int a2);
void __thiscall NiTList<IAmbientArea *>::~NiTList<IAmbientArea *>(NiTList<IAmbientArea *> *this); // idb
void __thiscall NiTList<SoundGroupAmbient::PlayingAreaInfo *>::~NiTList<SoundGroupAmbient::PlayingAreaInfo *>(NiTList<SoundGroupAmbient::PlayingAreaInfo *> *this); // idb
void __thiscall NiTList<NiPointer<NiAudioSource>>::~NiTList<NiPointer<NiAudioSource>>(NiTList<NiPointer<NiAudioSource> > *this); // idb
char *__thiscall IAmbientArea::GetSndFilename(IAmbientArea *this); // idb
void __thiscall SoundGroupDynamic::~SoundGroupDynamic(SoundGroupDynamic *this); // idb
void __thiscall MapAmbienceSoundInfoTab::MapAmbienceSoundInfoTab(MapAmbienceSoundInfoTab *this); // idb
SoundGroupBgm *__thiscall SoundGroupBgm::`vector deleting destructor'(SoundGroupBgm *this, unsigned int a2);
bool __cdecl ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::Load(char *acFn);
SoundGroupAmbient *__thiscall SoundGroupAmbient::`vector deleting destructor'(SoundGroupAmbient *this, unsigned int a2);
void __thiscall SoundMgr::SetDistFactor(SoundMgr *this, float fVal); // idb
void __thiscall SoundMgr::TerminateSoundGroups(SoundMgr *this); // idb
void __thiscall SoundMgr::Enable(SoundMgr *this, int b);
bool __thiscall SoundMgr::GetEnable(SoundMgr *this); // idb
void __thiscall SoundMgr::PlayBGM(SoundMgr *this, int id);
char __thiscall SoundMgr::PlayBGM(SoundMgr *this, char *pcFileName);
char __thiscall SoundMgr::PlayBGM(SoundMgr *this, char *pcFileName, int bLoop);
void __thiscall SoundMgr::StopBGM(SoundMgr *this); // idb
void __thiscall SoundMgr::StopAllSound(SoundMgr *this); // idb
NiMilesListener *__thiscall SoundMgr::GetListener(SoundMgr *this); // idb
// NiAudioSource *__userpurge SoundMgr::Create3DSource@<eax>(SoundMgr *this@<ecx>, int a2@<esi>, char *pcFileName, bool bLoop, float fMin, float fMax);
unsigned int __thiscall SoundMgr::AllocateChannel(SoundMgr *this, unsigned int dwChannelCount); // idb
void __thiscall SoundMgr::ReleaseChannel(SoundMgr *this, unsigned int dwChannelCount); // idb
void __stdcall SoundMgr::SetMasterVolume(float fVol);
void __thiscall SoundMgr::MuteSound(SoundMgr *this, bool b); // idb
void __thiscall SoundMgr::SetAmbientVolumeSync(SoundMgr *this); // idb
void __thiscall SoundMgr::HoldSound(SoundMgr *this, bool b); // idb
void __thiscall SoundMgr::Terminate(SoundMgr *this); // idb
// NiAudioSource *__userpurge SoundMgr::CreateAmbientSource@<eax>(SoundMgr *this@<ecx>, int a2@<edi>, char *pcFileName, bool bLoop);
void __thiscall SoundMgr::PlayInterfaceSound(SoundMgr *this, SoundGroupInterface::SndIndex eSndIndex); // idb
void __thiscall SoundMgr::PlayInterfaceSound(SoundMgr *this, char *pcFileName); // idb
void __thiscall SoundMgr::SetBgVolume(SoundMgr *this, float fVol); // idb
void __thiscall SoundMgr::SetEffectVolume(SoundMgr *this, float fVol); // idb
void __thiscall SoundMgr::SetVoiceVolume(SoundMgr *this, float fVol); // idb
void __thiscall SoundMgr::SetEnvEffectVolume(SoundMgr *this, float fVol); // idb
int __cdecl GetNpcVoiceFileCount(char *pcFileName);
void __thiscall SoundMgr::PlayNPCVoice(SoundMgr *this, unsigned __int16 id); // idb
void __thiscall SoundMgr::PlayGenderVoice(SoundMgr *this, char *pcFileName); // idb
void __thiscall SoundMgr::PlayItemDropSound(SoundMgr *this, int id, NiPoint3 *rkPos);
void __stdcall SoundMgr::PlayItemPutSound(int id);
void __stdcall SoundMgr::PlayItemEquipSound(int id);
void __thiscall SoundMgr::~SoundMgr(SoundMgr *this); // idb
void __thiscall SoundMgr::CreateSound(SoundMgr *this, ActionEffectInfo *pkInfo, NiPoint3 *kPos); // idb
void __thiscall SoundMgr::CreateSound(SoundMgr *this, char *pcSndName, NiPoint3 *kPos); // idb
void __thiscall SoundMgr::SoundMgr(SoundMgr *this); // idb
void __thiscall SoundMgr::Update(SoundMgr *this, float fTime, NiCamera *pkCamera); // idb
void __thiscall SoundMgr::CreateSound(SoundMgr *this, ActionEffectInfo *pkInfo, Char *pkCaster, Char *pkTarget); // idb
void __thiscall SoundMgr::CreateSound(SoundMgr *this, ActionInfo *pkInfo, int iIndex, Char *pkCaster, Char *pkTarget); // idb
BOOL __thiscall SoundMgr::InitializeSoundGroups(SoundMgr *this);
char __thiscall SoundMgr::Init(SoundMgr *this);
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::~NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> > *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> > *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> > *this, unsigned int a2);
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> > *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> > *this, unsigned int a2);
void __thiscall NiTPointerList<NiPointer<NiAudioSource>>::~NiTPointerList<NiPointer<NiAudioSource>>(NiTPointerList<NiPointer<NiAudioSource> > *this); // idb
void __thiscall PgTList<NiPointer<NiAudioSource>>::~PgTList<NiPointer<NiAudioSource>>(PgTList<NiPointer<NiAudioSource> > *this); // idb
PgTList<NiPointer<NiAudioSource> > *__thiscall PgTList<NiPointer<NiAudioSource>>::`vector deleting destructor'(PgTList<NiPointer<NiAudioSource> > *this, unsigned int a2);
NiTPointerListBase<NiTPointerAllocator<unsigned int>,void *> *__thiscall SpTList<void *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,void *> *this, unsigned int a2);
NiPointer<PgWin> *__thiscall NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::Remove(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *this, NiPointer<PgWin> *result, NiPointer<PgWin> *element); // idb
SoundGroupNPCVoice *__thiscall SoundGroupFieldEffect::`scalar deleting destructor'(SoundGroupNPCVoice *this, unsigned int a2);
void __thiscall SoundGroupInterface::SoundGroupInterface(SoundGroupInterface *this); // idb
SoundGroupInterface *__thiscall SoundGroupInterface::`scalar deleting destructor'(SoundGroupInterface *this, unsigned int a2);
void __thiscall SoundGroupFieldEffect::SoundGroupFieldEffect(SoundGroupFieldEffect *this); // idb
void __thiscall SoundGroup3DAmbient::SoundGroup3DAmbient(SoundGroup3DAmbient *this); // idb
void __thiscall SoundGroupNPCVoice::SoundGroupNPCVoice(SoundGroupNPCVoice *this); // idb
void __thiscall SoundGroupAmbient::SoundGroupAmbient(SoundGroupAmbient *this); // idb
void __thiscall MachineOpt::WinPos::WinPos(MachineOpt::WinPos *this, char *pcWinName, float fX, float fY); // idb
void __thiscall MachineOpt::WinPos::WinPos(MachineOpt::WinPos *this); // idb
void __thiscall MachineOpt::WinPos::~WinPos(MachineOpt::WinPos *this); // idb
bool __thiscall MachineOpt::WinPos::Save(MachineOpt::WinPos *this, _iobuf *fp); // idb
bool __thiscall MachineOpt::WinPos::Load(MachineOpt::WinPos *this, _iobuf *fp); // idb
char __cdecl MachineOpt::Load();
char __cdecl MachineOpt::Save();
double __cdecl MachineOpt::GetCurGama();
void __thiscall MachineOpt::SoundOption::SetDefault(MachineOpt::SoundOption *this); // idb
void __cdecl MachineOpt::SetDefaultSoundOption(); // idb
MachineOpt::SoundOption *__cdecl MachineOpt::GetSoundOption(); // idb
void __cdecl MachineOpt::SetSoundOption(MachineOpt::SoundOption *rkOption); // idb
void __cdecl MachineOpt::SetChatWinFilter(unsigned int uiMode, unsigned int uiOption); // idb
void __cdecl MachineOpt::SetSysMsgWinFilter(unsigned int uiOption); // idb
bool __cdecl MachineOpt::GetGlowEffect(); // idb
bool __cdecl MachineOpt::GetLightEffect(); // idb
int __cdecl MachineOpt::GetReadNum(_iobuf *fp, int size); // idb
char __cdecl MachineOpt::WriteOptFile(_iobuf *fp, void *pData, unsigned int size);
bool __cdecl MachineOpt::IsValidateFile(_iobuf *fp, int dataSize); // idb
void __thiscall MachineOpt::UserLoginOption::SetDefault(MachineOpt::UserLoginOption *this); // idb
void __cdecl MachineOpt::SetGameOpt(PROTO_NC_CHAR_OPTION_IMPROVE_GET_GAMEOPTION_CMD *pkProto); // idb
void __cdecl MachineOpt::MakeDefaultKey(); // idb
void __cdecl MachineOpt::SetKeyMap(PROTO_NC_CHAR_OPTION_IMPROVE_GET_KEYMAP_CMD *pkProto); // idb
void __thiscall MachineOpt::StKeyMappingBuffer::StKeyMappingBuffer(MachineOpt::StKeyMappingBuffer *this); // idb
void __thiscall MachineOpt::StShortCutSizeOption::StShortCutSizeOption(MachineOpt::StShortCutSizeOption *this); // idb
void __thiscall MachineOpt::StSaveWinPosOption::StSaveWinPosOption(MachineOpt::StSaveWinPosOption *this); // idb
void __thiscall MachineOpt::GraphicOption::SetDefault(MachineOpt::GraphicOption *this); // idb
void __thiscall MachineOpt::GameOption::SetDefault(MachineOpt::GameOption *this); // idb
void __cdecl MachineOpt::SaveGraphicOption(); // idb
void __cdecl MachineOpt::LoadGraphicOption(); // idb
void __cdecl MachineOpt::SaveGameOption(); // idb
char __cdecl MachineOpt::LoadGameOption();
char __cdecl MachineOpt::SaveWinPos(_iobuf *fp);
void __cdecl MachineOpt::RemoveAllWinPos(); // idb
void __cdecl MachineOpt::CatchOrgGama(); // idb
void __cdecl MachineOpt::RestoreOrgGama(); // idb
void __cdecl BuildGammaRamp(_D3DGAMMARAMP *rkGammaRamp, float fGamma, float fContrast, float fBrightness); // idb
void __cdecl GammaControl(float fGamma, float fContrast, float fBrightness); // idb
void __cdecl MachineOpt::SaveSoundOption(); // idb
void __cdecl MachineOpt::LoadSoundOption(); // idb
void __thiscall MachineOpt::SoundOption::SoundOption(MachineOpt::SoundOption *this); // idb
void __cdecl MachineOpt::SetGlowEffect(int bEnable);
void __cdecl MachineOpt::SetLightEffect(int bEnable);
void __cdecl MachineOpt::MakeDefaultOptFile(); // idb
void __thiscall MachineOpt::GraphicOption::GraphicOption(MachineOpt::GraphicOption *this); // idb
void __thiscall MachineOpt::GameOption::GameOption(MachineOpt::GameOption *this); // idb
char __cdecl MachineOpt::Load();
char __cdecl MachineOpt::Save();
void __cdecl MachineOpt::RemoveAll(); // idb
char __cdecl MachineOpt::RegistereWinPostion(PgWin *pkWin);
char __cdecl MachineOpt::SetWinPostion(PgWin *pkWin);
char __cdecl MachineOpt::LoadWinPos(_iobuf *fp);
void __cdecl MachineOpt::SetCurGama(float fGama); // idb
void __cdecl MachineOpt::SetViewOutLine(bool bView); // idb
char __cdecl MachineOpt::LoadUserInfo();
// char __usercall MachineOpt::SaveUserInfo@<al>(int a1@<ebx>, int a2@<edi>);
void __cdecl MachineOpt::KeyMapConvertOldtoNew(); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>::~NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>(NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *> *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *> *this, unsigned int a2);
MachineOpt::UserLoginOption *__thiscall MachineOpt::UserLoginOption::operator=(MachineOpt::UserLoginOption *this, MachineOpt::UserLoginOption *__that); // idb
MachineOpt::WinPos *__cdecl MachineOpt::GetWinPosInList(PgWin *pkWin); // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *> *this, unsigned int a2);
void __thiscall NiTPointerList<MachineOpt::WinPos *>::~NiTPointerList<MachineOpt::WinPos *>(NiTPointerList<MachineOpt::WinPos *> *this); // idb
PgTList<MachineOpt::WinPos *> *__thiscall PgTList<MachineOpt::WinPos *>::`vector deleting destructor'(PgTList<MachineOpt::WinPos *> *this, unsigned int a2);
OptMgr *__thiscall Option::`scalar deleting destructor'(OptMgr *this, unsigned int a2);
void __thiscall OptMgr::~OptMgr(OptMgr *this); // idb
char OptMgr::SaveChar();
char OptMgr::LoadChar();
char OptMgr::SaveUser();
char OptMgr::LoadUser();
char OptMgr::SaveMachine();
char OptMgr::LoadMachine();
void __thiscall OptMgr::OptMgr(OptMgr *this); // idb
char __cdecl ActSkillViewInfoTab::CheckActionTable();
unsigned int __cdecl Skill::GetTotalLearnActSkill(); // idb
Skill::LearnSkillInfo *__cdecl Skill::GetLearnActSkillInfo(unsigned int uiIndex); // idb
char __cdecl Skill::IsLearnSkill(unsigned __int16 kSkillID);
char __cdecl Skill::IsLearnPassiveSkill(unsigned __int16 kSkillID);
char __cdecl Skill::UnLearnSkill(unsigned __int16 kSkillID);
char __cdecl Skill::UnLearnActiveSkill(unsigned __int16 kSkillID);
char __cdecl Skill::UnLearnPassiveSkill(unsigned __int16 kSkillID);
unsigned int __cdecl Skill::GetRestEmpowerPoint(); // idb
void __cdecl Skill::SetRestEmpowerPoint(unsigned int uiPoint); // idb
void __cdecl Skill::SetRestEmpowerPointInEdit(int iPoint); // idb
unsigned int __cdecl Skill::GetRestEmpowerPointInEdit();
unsigned int __cdecl Skill::GetAntiEmpowerPoint(); // idb
void __cdecl Skill::SetAntiEmpowerPoint(unsigned int uiPoint); // idb
void __cdecl Skill::SetAntiEmpowerPointInEdit(unsigned int uiPoint); // idb
unsigned int __cdecl Skill::GetAntiEmpowerPointInEdit(); // idb
bool __cdecl Skill::GetEmpowerResetable(); // idb
Skill::LearnSkillInfo *__cdecl Skill::GetLearnActSkillInfo(unsigned __int16 kSkillID); // idb
void __cdecl Skill::ClearLearnActSkillInfo(); // idb
void __cdecl Skill::SetEmpowerResetable(bool bResetable); // idb
void __cdecl Skill::ClearLearnPassiveSkill(); // idb
char __cdecl Skill::LearnPassiveSkill(unsigned __int16 kSkillID);
signed __int16 __cdecl Skill::GetLearnPassiveSkillInfo(unsigned int uiIndex);
unsigned int __cdecl Skill::GetTotalLearnPassiveSkill(); // idb
Skill::LearnProdSkillInfo *__cdecl Skill::GetLearnProductSkill(unsigned int uiIndex); // idb
Skill::LearnProdSkillInfo *__cdecl Skill::GetLearnProductSkill(unsigned __int16 kSkillID); // idb
unsigned int __cdecl Skill::GetTotalLearnProductSkill(); // idb
BOOL __cdecl Skill::IsProduceBaseSkill(unsigned __int16 kSkillID);
BOOL __cdecl Skill::IsProduceSkill(unsigned __int16 kSkillID);
BOOL __cdecl Skill::IsGatherSkill(unsigned __int16 kSkillID);
bool __cdecl Skill::IsRideSkill(unsigned __int16 kSkillID); // idb
Skill::EmpowerInfo *__cdecl Skill::GetEmpowerInfo(Skill::EmpowerInfo *result, unsigned __int16 kSkillID); // idb
void __cdecl Skill::Terminate(); // idb
char __cdecl Skill::IsLearnProdSkill(int kSkillID);
bool __cdecl Skill::LearnSkill(unsigned __int16 kSkillID, Skill::EmpowerInfo *pkInfo, unsigned int dwSkillExp); // idb
char __cdecl Skill::IsSkillUsePossible(int kSkillID);
void __cdecl Skill::AddSysMsg(const char *pcText); // idb
double __cdecl Skill::GetLastCoolTimeByItemActionID(unsigned __int16 kActionID);
double __cdecl Skill::GetLastCoolTime(unsigned __int16 kSkillID);
void __cdecl Skill::ApplyCoolTimeToInterface(); // idb
void __cdecl Skill::ClearLearnSkill(); // idb
void __cdecl Skill::InitPassiveSkill(PROTO_NC_CHAR_SKILL_PASSIVE_CMD *pkProto); // idb
char __cdecl Skill::AmILearnAnyProdBaseSkill();
int __cdecl Skill::GetCountOfILearnAnyProdBaseSkill(); // idb
bool __cdecl Skill::IsMovingSkill(int kSkillID);
char __cdecl Skill::IsSkillUsePossibleByItemActionID(unsigned __int16 ActionID);
void __cdecl Skill::RecordSkillUseByItemActionID(unsigned __int16 kActionID, float fCurTime, float fStartTime, float fMaxCoolTime); // idb
void __cdecl SkillEmpowerRequest::Register(unsigned __int16 kSkillID, Skill::EmpowerInfo kInfo); // idb
void __cdecl Skill::Update(float fTime); // idb
void __cdecl Skill::SetLastCoolTimeByItemActionID(unsigned __int16 kActionID, float fLastCoolTime); // idb
void __cdecl SkillEmpowerRequest::Applicate(unsigned __int16 kSkillID); // idb
void __cdecl SkillEmpowerRequest::Cancel(unsigned __int16 kSkillID); // idb
bool __cdecl Skill::IsBuildMiniRoomSkill(unsigned __int16 kSkillID); // idb
void __cdecl Skill::DecreaseRecordTime(unsigned __int16 kID); // idb
bool __cdecl Skill::Init(); // idb
unsigned __int16 __cdecl Skill::GetBaseSkillID(unsigned __int16 kSkillID, int *riMaxLevel); // idb
Skill::EmpowerInfo *__cdecl Skill::GetAccumulatedEmpowerInfo(Skill::EmpowerInfo *result, unsigned __int16 kSkillID); // idb
int __cdecl Skill::GetEmpowerAppliedCoolTime(int kSkillID);
int __cdecl Skill::GetEmpowerAppliedSP(int kSkillID);
void __cdecl Skill::RecordSkillUse(int kSkillID, float fCurTime, float fStartTime, float fMaxCoolTime);
void __cdecl Skill::InitSkill(PROTO_NC_CHAR_CLIENT_SKILL_CMD *pkProto); // idb
void __cdecl Skill::SetLastCoolTime(int kSkillID, float fLastCoolTime);
NiPointer<PgWin> *__thiscall NiTPointerListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::RemoveTail(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *this, NiPointer<PgWin> *result); // idb
void __thiscall SkillUseRecord::SkillUseRecord(SkillUseRecord *this); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord>>::~NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord>>(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord> > *this); // idb
void __thiscall NiTListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>::~NiTListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>(NiTListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *> *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord> > *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord>>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord> > *this, unsigned int a2);
NiTListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *> *__thiscall NiTListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>::`vector deleting destructor'(NiTListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *> *this, unsigned int a2);
unsigned int __cdecl ITableBase<ActiveSkillInfo,ActSkillInfoTab>::GetTotal(); // idb
ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab> *__thiscall ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::`vector deleting destructor'(ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab> *this, unsigned int a2);
PasSkillViewInfoTab *__thiscall IIDTableBase<PassiveSkillViewInfo,PasSkillViewInfoTab,unsigned short>::`scalar deleting destructor'(PasSkillViewInfoTab *this, unsigned int a2);
ITableBase<ActiveSkillInfo,ActSkillInfoTab> *__thiscall ITableBase<ActiveSkillInfo,ActSkillInfoTab>::`scalar deleting destructor'(ITableBase<ActiveSkillInfo,ActSkillInfoTab> *this, unsigned int a2);
ActSkillInfoTab *__thiscall IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::`scalar deleting destructor'(ActSkillInfoTab *this, unsigned int a2);
ITableBase<PassiveSkillInfo,PasSkillInfoTab> *__thiscall ITableBase<PassiveSkillInfo,PasSkillInfoTab>::`scalar deleting destructor'(ITableBase<PassiveSkillInfo,PasSkillInfoTab> *this, unsigned int a2);
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord> > *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord>>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord> > *this, unsigned int a2);
void __thiscall NiTPointerList<NiPointer<SkillUseRecord>>::~NiTPointerList<NiPointer<SkillUseRecord>>(NiTPointerList<NiPointer<SkillUseRecord> > *this); // idb
NiTList<SkillEmpowerRequest::EmpowerReq *> *__thiscall NiTPointerListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>::`scalar deleting destructor'(NiTList<SkillEmpowerRequest::EmpowerReq *> *this, unsigned int a2);
ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab> *__thiscall ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::`scalar deleting destructor'(ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab> *this, unsigned int a2);
unsigned int __cdecl ItemActionTab::GetTotal(); // idb
PgTList<NiPointer<SkillUseRecord> > *__thiscall PgTList<NiPointer<SkillUseRecord>>::`vector deleting destructor'(PgTList<NiPointer<SkillUseRecord> > *this, unsigned int a2);
void __thiscall ActSkillViewInfoTab::ActSkillViewInfoTab(ActSkillViewInfoTab *this); // idb
ActSkillViewInfoTab *__thiscall ActSkillViewInfoTab::`scalar deleting destructor'(ActSkillViewInfoTab *this, unsigned int a2);
void __thiscall PasSkillViewInfoTab::PasSkillViewInfoTab(PasSkillViewInfoTab *this); // idb
signed int PasSkillViewInfoTab::GetInvalidID();
void __thiscall ActSkillInfoTab::ActSkillInfoTab(ActSkillInfoTab *this); // idb
void __thiscall PasSkillInfoTab::PasSkillInfoTab(PasSkillInfoTab *this); // idb
PasSkillInfoTab *__thiscall IIDTableBase<PassiveSkillInfo,PasSkillInfoTab,unsigned short>::`vector deleting destructor'(PasSkillInfoTab *this, unsigned int a2);
bool __cdecl ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::Load(char *acFn);
bool __cdecl ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::Load(char *acFn);
bool __cdecl ITableBase<ActiveSkillInfo,ActSkillInfoTab>::Load(char *acFn);
bool __cdecl ITableBase<PassiveSkillInfo,PasSkillInfoTab>::Load(char *acFn);
PartyMemberInfo *__thiscall Party::GetMemberInfo(Party *this, unsigned int uiIndex); // idb
void __thiscall Party::ClearMemberInfo(Party *this); // idb
int __thiscall Party::GetBelongType(Party *this); // idb
void __thiscall Party::SetBelongType(Party *this, int iType); // idb
void __thiscall Party::SetLootType(Party *this, char nItemGrade, char nItemLooting); // idb
void __thiscall Party::~Party(Party *this); // idb
void __thiscall Party::SetJoinProposeData(Party *this, PROTO_NC_PARTY_JOINPROPOSE_REQ *p); // idb
void __thiscall Party::ClearJoinProposeData(Party *this); // idb
PartyMemberInfo *__thiscall Party::GetMemberInfo(Party *this, Name5 kCharID); // idb
void __thiscall Party::SetMemberList(Party *this, PROTO_NC_PARTY_MEMBER_LIST_CMD *p); // idb
PartyMemberInfo *__thiscall Party::AddMember(Party *this, PROTO_NC_PARTY_JOIN_ACK *p); // idb
void __thiscall Party::MemberLogout(Party *this, PROTO_NC_PARTY_LOGOUTINFO_CMD *p); // idb
void __thiscall Party::MemberLogin(Party *this, PROTO_NC_PARTY_LOGININFO_CMD *p); // idb
void __thiscall Party::ChangePartyMaster(Party *this, Name5 kCharID); // idb
Name5 *__thiscall Party::GetPartyMasterID(Party *this, Name5 *result); // idb
BOOL __thiscall Party::IsMePartyMaster(Party *this);
Name5 *__thiscall Party::GetLooterID(Party *this, Name5 *result); // idb
void __thiscall Party::SetLooterID(Party *this, Name5 kLooterID); // idb
void __thiscall Party::ChangeUserName(Party *this, Name5 *OldName, Name5 *NewName); // idb
void __thiscall Party::Party(Party *this); // idb
void __thiscall Party::Clear(Party *this); // idb
void __thiscall Party::DeleteMember(Party *this, Name5 kDelCharID); // idb
Party *__thiscall Party::`vector deleting destructor'(Party *this, unsigned int a2);
std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *__cdecl std::_Copy_backward<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>>>> *,std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>>>> *>(std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *_First, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *_Last, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *_Dest); // idb
void __cdecl ActSkillInfoTab::CheckCRC(); // idb
void __cdecl ActSkillInfoTab::GenerateCRCSum(); // idb
char __thiscall ActSkillInfoTab::DataProcess(ActSkillInfoTab *this);
void __thiscall std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>>>::clear(std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *this); // idb
void __thiscall std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>>>::~list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>>>(std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > *this); // idb
std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *__stdcall std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ActiveSkillInfo *>>(std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *_Next, std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *_Prev, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *> *_Val);
void __thiscall ITask::FinishThisDownward(ITask *this); // idb
char __thiscall ITask::ProcessNetMsg(ITask *this, int iDepart, int iCommand, int iRevBytes, void *pvData);
char __cdecl ITask::ProcessNetMsgAll(int iDepart, int iCommand, int iRevBytes, void *pvData);
BOOL __thiscall ITask::IsFinished(ITask *this);
void __thiscall ITask::DirectDispatchToChildren(ITask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall ITask::DirectDispatchToParent(ITask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __cdecl ITask::DirectDispatchAll(int iMsg, void *pvBody); // idb
void __thiscall ITask::UpdateChildTask(ITask *this, float fTime); // idb
void __thiscall ITask::UpdateSerialTask(ITask *this, float fTime); // idb
void __thiscall ITask::Update(ITask *this, float fTime); // idb
NiPointer<ITask> *__thiscall ITask::DetachChildTask(ITask *this, NiPointer<ITask> *result, ITask *pkTask); // idb
void __cdecl ITask::FinishTaskAll(); // idb
void __cdecl ITask::UpdateTaskAll(float fTime); // idb
void __thiscall ITask::AttachParentTask(ITask *this, ITask *pkParent); // idb
void __thiscall ITask::AttachChildTask(ITask *this, ITask *pkTask); // idb
void __thiscall ITask::ITask(ITask *this, ITask *pkParent); // idb
void __thiscall ItemUseTask::SetInventoryIndex(ItemUseTask *this, unsigned int uiInventoryIndex); // idb
void __thiscall ItemUseTask::SetGameFrameWork(ItemUseTask *this, GameFrameWork *pkGameFrameWork); // idb
void __cdecl ItemUseTask::InitCastingProgress(); // idb
void __stdcall ItemUseTask::NcUserConnectionChangeIDItemUseReq(int iSlotNum);
void __thiscall ItemUseTask::OnIdle(ItemUseTask *this, float fTime); // idb
char __thiscall ItemUseTask::OnProcessNetMsg(ItemUseTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData);
bool __stdcall ItemUseTask::ItemNameCheck(Item *pkItem, const char *pkName);
char __stdcall ItemUseTask::UsePutOnBelongClear(Item *pkItem, unsigned int uiInvenIdx);
void __stdcall ItemUseTask::OnUseItemRepairKit(Item *pkItem, unsigned int uiInvenInx);
void __stdcall ItemUseTask::OnUseItemAddSocket(Item *pkItem, unsigned int uiInvenIdx);
void __stdcall ItemUseTask::OnUseItemRandomOptRecoveryCount(Item *pkItem, unsigned int uiInvenIdx);
void __thiscall ItemUseTask::OnStart(ItemUseTask *this); // idb
void __thiscall ItemUseTask::DirectMessage(ItemUseTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
boost::detail::function::any_pointer __cdecl boost::detail::function::functor_manager<boost::_bi::bind_t<void,boost::_mfi::mf2<void,GameFrameWork,int,int>,boost::_bi::list3<boost::_bi::value<GameFrameWork *>,boost::arg<1>,boost::_bi::value<unsigned int>>>,std::allocator<void>>::manager(boost::detail::function::any_pointer function_obj_ptr, boost::detail::function::functor_manager_operation_type op);
boost::detail::function::any_pointer __cdecl boost::detail::function::functor_manager<boost::_bi::bind_t<void,boost::_mfi::mf1<void,Char,char const *>,boost::_bi::list2<boost::_bi::value<Char *>,boost::arg<1>>>,std::allocator<void>>::manage(boost::detail::function::any_pointer functor_ptr, boost::detail::function::functor_manager_operation_type op); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::replace(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int _Off, unsigned int _N0, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Right, unsigned int _Roff, unsigned int _Count); // idb
boost::detail::function::unusable *__cdecl boost::detail::function::void_function_obj_invoker1<boost::_bi::bind_t<void,boost::_mfi::mf2<void,GameFrameWork,char const *,int>,boost::_bi::list3<boost::_bi::value<GameFrameWork *>,boost::arg<1>,boost::_bi::value<unsigned int>>>,void,char const *>::invoke(boost::detail::function::unusable *result, boost::detail::function::any_pointer function_obj_ptr, int a0); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::replace(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int _Off, unsigned int _N0, const char *_Ptr, unsigned int _Count); // idb
void __thiscall boost::function1<void,char const *,std::allocator<void>>::assign_to<boost::_bi::bind_t<void,boost::_mfi::mf2<void,GameFrameWork,char const *,int>,boost::_bi::list3<boost::_bi::value<GameFrameWork *>,boost::arg<1>,boost::_bi::value<unsigned int>>>>(boost::function1<void,int,std::allocator<void> > *this, boost::_bi::bind_t<void,boost::_mfi::mf2<void,GameFrameWork,int,int>,boost::_bi::list3<boost::_bi::value<GameFrameWork *>,boost::arg<1>,boost::_bi::value<unsigned int> > > f); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::replace(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> > _First, std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> > _Last, const char *_Ptr); // idb
void __thiscall boost::function<void __cdecl (char const *),std::allocator<void>>::function<void __cdecl (char const *),std::allocator<void>>(boost::function<void __cdecl(int),std::allocator<void> > *this, boost::_bi::bind_t<void,boost::_mfi::mf2<void,GameFrameWork,int,int>,boost::_bi::list3<boost::_bi::value<GameFrameWork *>,boost::arg<1>,boost::_bi::value<unsigned int> > > f, int __formal); // idb
unsigned int __thiscall EntryInfo::GetTotalBettingMoney(EntryInfo *this); // idb
void __thiscall GambleWin::SetEnableLeaveBtn(GambleWin *this, int bEnable);
void MHDiceGameTask::OpenDiceWin();
void __thiscall MHDiceGameTask::OpenHelpWin(MHDiceGameTask *this); // idb
void __thiscall MHDiceGameTask::OpenDiceRateWin(MHDiceGameTask *this); // idb
void __stdcall MHDiceGameTask::OnCloseWin(PgWin *pkWin);
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_DICE_ROLL_RESULT_CMD(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_DICE_ROLL_RESULT_CMD *pkProto); // idb
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_DICE_ROLL_CMD(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_DICE_ROLL_CMD *pkProto); // idb
int __stdcall MHDiceGameTask::Recv_NC_DICE_TAISAI_RANK_REQ(PROTO_NC_DICE_TAISAI_RANK_REQ *pkProto);
int __stdcall MHDiceGameTask::Recv_NC_DICE_TAISAI_DICE_ROLL_REQ(PROTO_NC_DICE_TAISAI_DICE_ROLL_REQ *pkProto);
int __stdcall MHDiceGameTask::Recv_NC_DICE_TAISAI_EXPECT_INCOME_MONEY_REQ(PROTO_NC_DICE_TAISAI_EXPECT_INCOME_MONEY_REQ *pkProto);
int __stdcall MHDiceGameTask::Recv_NC_DICE_TAISAI_RECEIPT_INCOME_MONEY_REQ(PROTO_NC_DICE_TAISAI_RECEIPT_INCOME_MONEY_REQ *pkProto);
bool __thiscall MHDiceGameTask::IsDicegamePlaying(MHDiceGameTask *this); // idb
int __stdcall MHDiceGameTask::Recv_NC_DICE_TAISAI_LARGE_AMOUNT_REQ(PROTO_NC_DICE_TAISAI_LARGE_AMOUNT_REQ *pkProto);
int __stdcall MHDiceGameTask::Recv_NC_DICE_TAISAI_LARGE_AMOUNT_ACK(PROTO_NC_DICE_TAISAI_LARGE_AMOUNT_ACK *pkProto);
bool __thiscall MHDiceGameTask::IsGambleMode(MHDiceGameTask *this); // idb
void __cdecl MHDiceGameTask::Terminate(); // idb
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_JOIN_REQ(MHDiceGameTask *this); // idb
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_TIMER_CMD(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_TIMER_CMD *pkProto); // idb
void __thiscall MHDiceGameTask::DirectMessage(MHDiceGameTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_DICE_ROLL_ACK(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_DICE_ROLL_ACK *pkProto); // idb
int __stdcall MHDiceGameTask::Recv_NC_DICE_TAISAI_RECEIPT_INCOME_MONEY_ACK(PROTO_NC_DICE_TAISAI_RECEIPT_INCOME_MONEY_ACK *pkProto);
void __thiscall MHDiceGameTask::UpdateDiceTaisaiGame(MHDiceGameTask *this, float fTime); // idb
void __thiscall MHDiceGameTask::OnStart(MHDiceGameTask *this); // idb
int __stdcall MHDiceGameTask::Recv_NC_DICE_TAISAI_DICE_ROLL_RESULT_EMOTION_CMD(PROTO_NC_DICE_TAISAI_DICE_ROLL_RESULT_EMOTION_CMD *pkProto);
void __thiscall MHDiceGameTask::CheckBettingChip(MHDiceGameTask *this, DICE_TAISAI_BETTING idx, bool bUser); // idb
unsigned int __thiscall MHDiceGameTask::GetTotalBettingMoney(MHDiceGameTask *this, DICE_TAISAI_BETTING index); // idb
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_BETTING_ACK(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_BETTING_ACK *pkProto); // idb
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_BETTING_CMD(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_BETTING_CMD *pkProto); // idb
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_BETTING_CANCEL_ACK(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_BETTING_CANCEL_ACK *pkProto); // idb
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_BETTING_CANCEL_CMD(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_BETTING_CANCEL_CMD *pkProto); // idb
// int __usercall MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_LEAVE_REQ@<eax>(MHDiceGameTask *this@<ecx>, int a2@<edi>);
// void __userpurge MHDiceGameTask::OnIdle(MHDiceGameTask *this@<ecx>, int a2@<edi>, float fTime);
unsigned int __thiscall MHDiceGameTask::GetAbleMoney(MHDiceGameTask *this, DICE_TAISAI_BETTING index, unsigned int EnableMaximuMoney); // idb
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_BETTING_INFO_CMD(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_GAME_BETTING_INFO_CMD *pkProto); // idb
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_BETTING_REQ(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_BETTING_REQ *pkProto); // idb
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_BETTING_CANCEL_REQ(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_BETTING_CANCEL_REQ *pkProto); // idb
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_LEAVE_CMD(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_GAME_LEAVE_CMD *pkProto); // idb
// int __userpurge MHDiceGameTask::Recv_NC_DICE_TAISAI_BET_START_CMD@<eax>(MHDiceGameTask *this@<ecx>, int a2@<edi>, PROTO_NC_DICE_TAISAI_BET_START_CMD *pkProto);
void __thiscall MHDiceGameTask::OnBetting(MHDiceGameTask *this, DICE_TAISAI_BETTING index); // idb
void __thiscall MHDiceGameTask::OnBettingCancel(MHDiceGameTask *this, DICE_TAISAI_BETTING index); // idb
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_JOIN_CMD(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_GAME_JOIN_CMD *pkProto); // idb
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_LEAVE_ACK(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_GAME_LEAVE_ACK *pkProto); // idb
int __stdcall MHDiceGameTask::Recv_NC_DICE_TAISAI_EXPECT_INCOME_MONEY_ACK(PROTO_NC_DICE_TAISAI_EXPECT_INCOME_MONEY_ACK *pkProto);
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall MHDiceGameTask::GetMoneyToString(MHDiceGameTask *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result, unsigned int Money); // idb
char __thiscall MHDiceGameTask::ShutDownGambleHouse(MHDiceGameTask *this);
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_JOIN_ACK(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_GAME_JOIN_ACK *pkProto); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall MHDiceGameTask::GetBettingInfo(MHDiceGameTask *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result, DICE_TAISAI_BETTING index); // idb
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_LARGE_AMOUNT_CMD(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_LARGE_AMOUNT_CMD *pkProto); // idb
void __thiscall MHDiceGameTask::~MHDiceGameTask(MHDiceGameTask *this); // idb
void __thiscall MHDiceGameTask::MHDiceGameTask(MHDiceGameTask *this); // idb
void __cdecl MHDiceGameTask::Create(IDirectMessenger *pkMsgHooker); // idb
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_RANK_ACK(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_RANK_ACK *pkProto); // idb
// bool __userpurge MHDiceGameTask::OnProcessNetMsg@<al>(MHDiceGameTask *this@<ecx>, int a2@<edi>, int iDepart, int iCommand, int iRevBytes, void *pvData);
std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Max(std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *_Pnode); // idb
std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Min(std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *_Pnode); // idb
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>,std::_Iterator_base0>::operator++(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >,std::_Iterator_base0> *this); // idb
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>,std::_Iterator_base0>::operator--(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >,std::_Iterator_base0> *this); // idb
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>,std::_Iterator_base0>::operator--(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *this); // idb
void __thiscall std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Rrotate(std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *_Wherenode); // idb
void __thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Rrotate(std::_Tree<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this, std::_Tree_nod<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *_Wherenode); // idb
unsigned int __cdecl ITableBase<DICE_Dividind,DiceDividIndTab>::GetTotal(); // idb
unsigned int __cdecl ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::GetTotal(); // idb
DICE_Dividind *__cdecl DiceDividIndTab::GetByIndex(unsigned int uiIndex); // idb
void __thiscall std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Lrotate(std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *_Wherenode); // idb
DiceRankInfo *__stdcall std::allocator<DiceRankInfo>::allocate(unsigned int _Count);
DiceRankInfo *__cdecl std::_Move<DiceRankInfo *,DiceRankInfo *>(DiceRankInfo *_First, DiceRankInfo *_Last, DiceRankInfo *_Dest);
void __thiscall std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::clear(std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *this); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *_Node, bool _Leftish); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::find(std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *result, const unsigned __int16 *_Keyval); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::find(std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > > *result, const unsigned __int16 *_Keyval); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *_Newnode); // idb
std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Buynode<std::pair<unsigned short,EntryInfo>>(std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *this, std::pair<unsigned short,EntryInfo> *_Val); // idb
std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::_Buynode<std::pair<unsigned short,DiceTaiSaiBetting>>(std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > *this, std::pair<unsigned short,DiceTaiSaiBetting> *_Val); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::erase(std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > _Where); // idb
void __thiscall std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Erase(std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *_Rootnode); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *_Node, bool _Leftish); // idb
void __thiscall std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::clear(std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *this); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::erase(std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > _Last); // idb
void __thiscall std::vector<SlotJackpotRankInfo,std::allocator<SlotJackpotRankInfo>>::reserve(std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *this, unsigned int _Count); // idb
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_BOARD_FOLD_CMD(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_BOARD_FOLD_CMD *pkProto); // idb
void __thiscall std::vector<DiceRankInfo,std::allocator<DiceRankInfo>>::_Reserve(std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *this, unsigned int _Count); // idb
void __thiscall std::map<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>>::~map<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>>(std::map<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> > > *this); // idb
void __thiscall std::vector<SlotJackpotRankInfo,std::allocator<SlotJackpotRankInfo>>::push_back(std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *this, DiceRankInfo *_Val); // idb
void __thiscall mhDiceRankWin::UpdateRankList(mhDiceRankWin *this, PROTO_NC_DICE_TAISAI_RANK_ACK *pkProto); // idb
MHDiceGameTask *__thiscall MHDiceGameTask::`scalar deleting destructor'(MHDiceGameTask *this, unsigned int a2);
BOOL __thiscall StatPointReqTask::IsWaitingServerReply(StatPointReqTask *this);
void __thiscall StatPointReqTask::ReqDecPoint(StatPointReqTask *this, StatDistribute eSD); // idb
void __cdecl StatPointReqTask::ClearState(); // idb
void __thiscall StatPointReqTask::ReqIncPoint(StatPointReqTask *this, StatDistribute eSD); // idb
char __thiscall StatPointReqTask::OnProcessNetMsg(StatPointReqTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData);
void __thiscall StatPointReqTask::OnStart(StatPointReqTask *this); // idb
void __thiscall ItemMallInfo::Encoding(ItemMallInfo *this); // idb
char __thiscall ItemMallInfo::SaveToFile(ItemMallInfo *this, const char *FileName);
int __thiscall ItemMallInfo::GetEndIndex(ItemMallInfo *this, int LocaleNum); // idb
void __thiscall ItemMallInfo::SetData(ItemMallInfo *this, int Index, int LocaleNum, int URLNum, const char *Path); // idb
void __thiscall ItemMallInfo::AddData(ItemMallInfo *this, int LocaleNum, int URLNum, const char *Path); // idb
tagItemMallFileData *__thiscall ItemMallInfo::GetData(ItemMallInfo *this, int LocaleNum, int URLNum); // idb
int __thiscall ItemMallInfo::GetTotalLocaleNum(ItemMallInfo *this); // idb
int __thiscall ItemMallInfo::GetTotalURLNum(ItemMallInfo *this, int LocaleNum); // idb
int __thiscall ItemMallInfo::GetTotalChunkNum(ItemMallInfo *this); // idb
void __thiscall ItemMallInfo::Clear(ItemMallInfo *this); // idb
void __thiscall ItemMallInfo::ItemMallInfo(ItemMallInfo *this); // idb
void __thiscall ItemMallInfo::~ItemMallInfo(ItemMallInfo *this); // idb
char __thiscall ItemMallInfo::LoadFromFile(ItemMallInfo *this, const char *FileName);
bool __cdecl SaveSurfaceToJPG(char *acFn, IDirect3DSurface9 *pkSurf); // idb
IDirect3DSurface9 *__cdecl CloneSurfaceToR8G8B8(IDirect3DSurface9 *pkSrcSurf, tagRECT *pkRect, IDirect3DDevice9 *pkDevice); // idb
char __cdecl SaveSurfaceToFileInRect(char *acFn, IDirect3DSurface9 *pkSurf, tagRECT *pkRect, IDirect3DDevice9 *pkDevice);
// char __usercall ScreenShot_InFileName@<al>(int a1@<esi>, NiRenderer *pkRenderer, HWND__ *hWnd, char *pcFilename, int iFilenameLen, const char *pkCreateFileName);
char __cdecl ScreenShot(NiRenderer *pkRenderer, HWND__ *hWnd, char *pcFilename, int iFilenameLen);
char __cdecl ScreenShot_UserName(NiRenderer *pkRenderer, HWND__ *hWnd, char *pcFilename, int iFilenameLen);
void __thiscall JpgImage::JpgImage(JpgImage *this); // idb
BOOL __thiscall JpgImage::Save(JpgImage *this, char *acFn, JpgImage::ImageInfo *rkInfo);
void __cdecl std::fill<std::_List_iterator<std::_List_val<std::pair<unsigned short const,QUEST_DATA *>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>>> *,std::_List_iterator<std::_List_val<std::pair<unsigned short const,QUEST_DATA *>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>>>>(std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *_First, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *_Last, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *_Val); // idb
void __cdecl std::_Uninit_fill_n<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>> *,unsigned int,std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>,std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>(std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *_First, unsigned int _Count, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *_Pval);
void __thiscall ProduceInfoTable::MaterialInfo::MaterialInfo(ProduceInfoTable::MaterialInfo *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > InxName); // idb
std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > *__thiscall std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ActiveSkillInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>>,0>>::lower_bound(std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> >,0> > *this, std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > *result, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Keyval); // idb
ItemInfo *__cdecl ProduceInfoTable::GetMaterialInfo(std::basic_string<char,std::char_traits<char>,std::allocator<char> > Material);
void __cdecl ProduceInfoTable::SetMaterialInfo(std::basic_string<char,std::char_traits<char>,std::allocator<char> > Material, int iMasteryType); // idb
void __cdecl ProduceInfoTable::BuildMeterialMap(); // idb
std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ProduceInfoTable::MaterialInfo *> *__cdecl std::make_pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> &,ProduceInfoTable::MaterialInfo * &>(std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ProduceInfoTable::MaterialInfo *> *result, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Val1, ProduceInfoTable::MaterialInfo **_Val2); // idb
std::pair<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ProduceInfoTable::MaterialInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ProduceInfoTable::MaterialInfo *> > > >,bool> *__thiscall std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ProduceInfoTable::MaterialInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>>,0>>::insert<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ProduceInfoTable::MaterialInfo *>>(std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ProduceInfoTable::MaterialInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ProduceInfoTable::MaterialInfo *> >,0> > *this, std::pair<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ProduceInfoTable::MaterialInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ProduceInfoTable::MaterialInfo *> > > >,bool> *result, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ProduceInfoTable::MaterialInfo *> *_Val); // idb
unsigned int CClientQuest::GetQuestPlayerLevel();
int __stdcall CClientQuest::GetQuestPlayerItemLot(unsigned __int16 nItemID);
char CClientQuest::GetQuestPlayerRace();
char CClientQuest::GetQuestPlayerClass();
char CClientQuest::GetQuestPlayerGender();
void __thiscall CClientQuest::SetQuestResetTime(CClientQuest *this, PROTO_NC_QUEST_RESET_TIME_CMD *pkReSet_Time); // idb
void __stdcall CClientQuest::Occure_LevelChange(unsigned __int16 nQuestID, char nPlayerLevel, char nDoneLevel);
void __stdcall CClientQuest::Occure_DestroyItem(unsigned __int16 nQuestID, unsigned __int16 nItemID, unsigned __int16 nCurrentLot, unsigned __int16 nDoneCount);
void __stdcall CClientQuest::Occure_CheckLocation(unsigned __int16 nQuestID, unsigned __int16 nLocation);
void __stdcall CClientQuest::Occure_RaceChange(unsigned __int16 nQuestID, char nRace);
void __stdcall CClientQuest::Occure_ClassChange(unsigned __int16 nQuestID, char nClass);
void __stdcall CClientQuest::Occure_TimeProcess(unsigned __int16 nQuestID, unsigned __int16 RunningTimeSec, unsigned __int16 TimeLimitSec);
void __stdcall CClientQuest::Occure_NewStatusReward(PLAYER_QUEST_INFO *pQuestInfo, QUEST_DATA *pQuestData);
void __stdcall CClientQuest::Occure_NewStatusFailed(PLAYER_QUEST_INFO *pQuestInfo, QUEST_DATA *pQuestData);
void __stdcall CClientQuest::Occure_NewStatusIng(PLAYER_QUEST_INFO *pQuestInfo, QUEST_DATA *pQuestData);
void __thiscall CClientQuest::_Send_NC_QUEST_CLIENT_SCENARIO_DONE_REQ(CClientQuest *this, unsigned __int16 kID); // idb
void __thiscall CClientQuest::Occure_TakeItem(CClientQuest *this, unsigned __int16 nQuestID, unsigned __int16 nItemID, unsigned __int16 nCurrentLot, unsigned __int16 nDoneCount); // idb
void __stdcall CClientQuest::Occure_ScenarioDone(unsigned __int16 nQuestID, unsigned __int16 nScenarioID);
void __thiscall CClientQuest::QuestResultMessage(CClientQuest *this, QUEST_DATA::QUEST_REWARD *pReward); // idb
void __thiscall CClientQuest::Occure_Quest_Done(CClientQuest *this, PLAYER_QUEST_INFO *pQuestInfo, QUEST_DATA *pQuestData); // idb
CClientQuest *__cdecl QuestDataMgr::GetQuest();
void __thiscall CClientQuest::Occure_NPCMobKill(CClientQuest *this, unsigned __int16 nQuestID, unsigned __int16 nNPCMobID, int nCurrentCount, int nDoneCount); // idb
int __thiscall CClientQuest::GetRewardIndex(CClientQuest *this, int nQuestID); // idb
void __thiscall CClientQuest::CClientQuest(CClientQuest *this, CQuestData *pQuestData); // idb
void __thiscall DialogParser::DialogParser(DialogParser *this); // idb
void __thiscall QuestDialogParser::StartParsing(QuestDialogParser *this, CQuest *pkQuest, unsigned int wID); // idb
char *__stdcall DialogParser::ParseBracedToken(char **rpcStr);
signed int __thiscall DialogParser::Parse(DialogParser *this, DialogParser::TokenDetail *rkDetail);
void __thiscall DialogParser::StartParsing(DialogParser *this, char *pcText, unsigned int uiSeqID); // idb
int __stdcall QuestHelperMgr::GetConditionCnt(QUEST_DATA *lpQuest);
bool __stdcall QuestHelperMgr::IsQuestByMob(QUEST_DATA *lpQuest, unsigned __int16 Mob_ID);
BOOL __stdcall QuestHelperMgr::IsStartRewardQuest(QUEST_DATA *lpQuest);
QUEST_DATA *__thiscall QuestHelperMgr::GetPQData(QuestHelperMgr *this, unsigned __int16 Quest_ID); // idb
void __thiscall QuestHelperMgr::Terminate(QuestHelperMgr *this); // idb
char __thiscall QuestHelperMgr::IsQuestProgress(QuestHelperMgr *this, unsigned __int16 Quest_ID);
bool __stdcall QuestHelperMgr::IsConditionProgress(QUEST_DATA *lpQuest, unsigned __int16 Mob_ID);
void __stdcall QuestHelperMgr::AddMobCoordinate(QUEST_DATA *lpQuest, unsigned __int16 Mob_ID);
void __stdcall QuestHelperMgr::RemoveMobCoordinate(unsigned __int16 Quest_ID);
void __thiscall QuestHelperMgr::RemoveMobGroup(QuestHelperMgr *this, unsigned __int16 Quest_ID); // idb
char *__thiscall QuestHelperMgr::GetConditionText(QuestHelperMgr *this);
// void __userpurge QuestHelperMgr::MoveConditionToolTip(QuestHelperMgr *this@<ecx>, int a2@<edi>, int a3@<esi>, NiPoint3 kMobHeightPos);
void __thiscall QuestHelperMgr::~QuestHelperMgr(QuestHelperMgr *this); // idb
void __thiscall QuestHelperMgr::RemoveProgressQuest(QuestHelperMgr *this, unsigned __int16 Quest_ID); // idb
void __thiscall QuestHelperMgr::ClearConditionText(QuestHelperMgr *this); // idb
void __thiscall QuestHelperMgr::QuestHelperMgr(QuestHelperMgr *this); // idb
void __thiscall QuestHelperMgr::AddMobID(QuestHelperMgr *this, QUEST_DATA *lpQuest); // idb
QuestHelperMgr *__cdecl QuestHelperMgr::GetInstance(); // idb
void __cdecl QuestHelperMgr::ReleaseInstance(); // idb
void __thiscall QuestHelperMgr::AddMobGroup(QuestHelperMgr *this, QUEST_DATA *lpQuest); // idb
void __thiscall QuestHelperMgr::AddQuestNameText(QuestHelperMgr *this, QUEST_DATA *lpQuest, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *kText); // idb
char __thiscall QuestHelperMgr::IsMobGroup(QuestHelperMgr *this, QUEST_DATA *lpQuest, unsigned __int16 *Mob_ID);
void __thiscall QuestHelperMgr::Init(QuestHelperMgr *this); // idb
void __thiscall QuestHelperMgr::AddProgressQuest(QuestHelperMgr *this, unsigned __int16 Quest_ID); // idb
void __thiscall QuestHelperMgr::AddMobConditionText(QuestHelperMgr *this, QUEST_DATA *lpQuest, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *kText, unsigned __int16 Mob_ID, bool bCheckMob); // idb
void __thiscall QuestHelperMgr::AddItemConditionText(QuestHelperMgr *this, QUEST_DATA *lpQuest, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *kText, unsigned __int16 Item_ID, bool bCheckItem); // idb
void __thiscall QuestHelperMgr::AddLevelConditionText(QuestHelperMgr *this, QUEST_DATA *lpQuest, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *kText); // idb
void __thiscall QuestHelperMgr::AddLocationConditionText(QuestHelperMgr *this, QUEST_DATA *lpQuest, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *kText); // idb
char __thiscall QuestHelperMgr::CreateConditionToolTip(QuestHelperMgr *this, unsigned __int16 Mob_ID, QUEST_DATA *lpQuest, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *kText);
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall QuestHelperMgr::AddConditionText(QuestHelperMgr *this, QUEST_DATA *lpQuest, unsigned __int16 Mob_ID);
void __thiscall QuestHelperMgr::AddConditionToolTip(QuestHelperMgr *this, Char *pkChar); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *>::~NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *>(NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *> *this); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>::~NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>(NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *> *this); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>::~NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>(NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *> *this); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>::~NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>(NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short> *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *> *this, unsigned int a2);
NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *> *this, unsigned int a2);
NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *> *this, unsigned int a2);
NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short> *this, unsigned int a2);
void __thiscall NiTPointerList<QuestMC *>::~NiTPointerList<QuestMC *>(NiTPointerList<QuestMC *> *this); // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestMC *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestMC *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestMC *> *this, unsigned int a2);
void __thiscall NiTPointerList<QUEST_DATA *>::~NiTPointerList<QUEST_DATA *>(NiTPointerList<QUEST_DATA *> *this); // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *> *this, unsigned int a2);
void __thiscall NiTPointerList<unsigned short>::~NiTPointerList<unsigned short>(NiTPointerList<unsigned short> *this); // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,unsigned short> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,unsigned short>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,unsigned short> *this, unsigned int a2);
void __thiscall PgTList<QUEST_DATA *>::~PgTList<QUEST_DATA *>(PgTList<QUEST_DATA *> *this); // idb
void __stdcall NiTPointerMap<char const *,unsigned short>::DeleteItem(NiTMapItem<char const *,unsigned short> *pkItem);
void __thiscall PgTList<unsigned short>::~PgTList<unsigned short>(PgTList<unsigned short> *this); // idb
PgTList<QuestMC *> *__thiscall PgTList<QuestMC *>::`scalar deleting destructor'(PgTList<QuestMC *> *this, unsigned int a2);
PgTList<QUEST_DATA *> *__thiscall PgTList<QUEST_DATA *>::`scalar deleting destructor'(PgTList<QUEST_DATA *> *this, unsigned int a2);
void __thiscall NiTPointerList<QuestHelperMgr::ProgressQuestMobGroup *>::~NiTPointerList<QuestHelperMgr::ProgressQuestMobGroup *>(NiTPointerList<QuestHelperMgr::ProgressQuestMobGroup *> *this); // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *> *this, unsigned int a2);
PgTList<unsigned short> *__thiscall PgTList<unsigned short>::`vector deleting destructor'(PgTList<unsigned short> *this, unsigned int a2);
PgTList<QuestHelperMgr::ProgressQuestMobGroup *> *__thiscall PgTList<QuestHelperMgr::ProgressQuestMobGroup *>::`scalar deleting destructor'(PgTList<QuestHelperMgr::ProgressQuestMobGroup *> *this, unsigned int a2);
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__cdecl std::operator+<char,std::char_traits<char>,std::allocator<char>>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result, const char *_Left, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Right); // idb
void __thiscall Scenario::~Scenario(Scenario *this); // idb
void __thiscall TutorialMgr::On_NC_WT_LICENSE_ACK(TutorialMgr *this); // idb
void __thiscall TutorialMgr::On_NC_ITEM_UPGRADE_ACK(TutorialMgr *this); // idb
void __thiscall ScenarioMgr::StopScenario(ScenarioMgr *this, unsigned __int16 kID); // idb
void __thiscall TutorialMgr::SendResult(TutorialMgr *this, unsigned __int16 kID, char kCmd); // idb
void __thiscall TutorialMgr::On_NC_SKILL_SKILL_LEARNSUC_CMD(TutorialMgr *this); // idb
void __thiscall TutorialMgr::OnShortCutSkill(TutorialMgr *this); // idb
void __thiscall TutorialMgr::OpenItemUpgradeWin(TutorialMgr *this); // idb
void __thiscall TutorialMgr::OnSPSoulStoneUse_Key(TutorialMgr *this); // idb
void __thiscall TutorialMgr::OnHPSoulStoneUse_Key(TutorialMgr *this); // idb
void __thiscall TutorialMgr::On_NC_ITEM_EQUIP_ACK(TutorialMgr *this); // idb
void __thiscall TutorialMgr::OpenInventoryWin(TutorialMgr *this); // idb
void __thiscall TutorialMgr::OnOpenWeaponTitleWin(TutorialMgr *this); // idb
void __thiscall ScenarioMgr::RunScenario(ScenarioMgr *this, unsigned __int16 kID, unsigned __int16 nQuestID, char kCmd); // idb
void __thiscall ScenarioMgr::Update(ScenarioMgr *this, float fTime); // idb
char __thiscall Scenario::Stop(Scenario *this, float fTime);
void __thiscall Scenario_15::Scenario_15(Scenario_15 *this, PgFrameWork *pkFrameWork, unsigned __int16 kID, unsigned __int16 nQuestID, char kCmd); // idb
Scenario_15 *__thiscall Scenario_15::`vector deleting destructor'(Scenario_15 *this, unsigned int a2);
char __thiscall Scenario_15::Update(Scenario_15 *this, float fTime);
void __thiscall CGuildMonster::CGuildMonster(CGuildMonster *this); // idb
void __cdecl CGuildMonster::GetInstance();
void __cdecl CGuildMonster::ReleaseInstance(); // idb
void __thiscall GuildListTask::OnStart(GuildListTask *this); // idb
void __cdecl GuildListTask::OnNCGuildListReq();
char __thiscall GuildListTask::OnProcessNetMsg(GuildListTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData);
int __stdcall GuildListTask::Recv_NC_GUILD_LIST_ACK(PROTO_NC_GUILD_LIST_ACK *pkProto);
void __cdecl GuildListTask::ShowGuildListWin(); // idb
GuildListWin *__cdecl GuildListTask::GetGuildListWin(); // idb
void __cdecl GuildListTask::Terminate(); // idb
void __thiscall GuildListTask::~GuildListTask(GuildListTask *this); // idb
void __thiscall GuildListTask::GuildListTask(GuildListTask *this); // idb
void __cdecl GuildListTask::Create(IDirectMessenger *pkMsgHooker); // idb
GuildListTask *__thiscall GuildListTask::`scalar deleting destructor'(GuildListTask *this, unsigned int a2);
unsigned int __thiscall CClientGuildMember::GetNumOfOnlineMembers(CClientGuildMember *this); // idb
GUILD_MEMBER_CLIENT *__thiscall CClientGuildMember::GetGuildMaster(CClientGuildMember *this); // idb
void GuildMemberTask::OnFinish();
CClientGuildMember *__cdecl GuildMemberTask::GetGuildMember(); // idb
int __thiscall GuildMemberTask::Recv_NC_GUILD_MEMBER_LOGOFF_CMD(GuildMemberTask *this, PROTO_NC_GUILD_MEMBER_LOGOFF_CMD *pkProto); // idb
void __thiscall GuildMemberTask::On_Recv_NC_GUILD_MEMBER_LEAVE_CMD(GuildMemberTask *this, PROTO_NC_GUILD_MEMBER_LEAVE_CMD *pkProto); // idb
void __thiscall GuildMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_CMD(GuildMemberTask *this, PROTO_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_CMD *pkProto); // idb
void __thiscall GuildMemberTask::DirectMessage(GuildMemberTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall GuildMemberTask::Recv_NC_GUILD_MEMBER_JOIN_REQ(GuildMemberTask *this, PROTO_NC_GUILD_MEMBER_JOIN_REQ *pkProto); // idb
void __stdcall GuildMemberTask::Recv_NC_GUILD_MEMBER_JOIN_ERR(PROTO_NC_GUILD_MEMBER_JOIN_ERR *pkProto);
int __thiscall GuildMemberTask::Recv_NC_GUILD_MEMBER_VANISH_CMD(GuildMemberTask *this, PROTO_NC_GUILD_MEMBER_VANISH_CMD *pkProto); // idb
void __thiscall GuildMemberTask::Recv_NC_GUILD_MEMBER_INVITE_ACK(GuildMemberTask *this, PROTO_NC_GUILD_MEMBER_INVITE_ACK *pkProto); // idb
int __thiscall GuildMemberTask::Recv_NC_GUILD_MEMBER_LOGON_CMD(GuildMemberTask *this, PROTO_NC_GUILD_MEMBER_LOGON_CMD *pkProto); // idb
void __thiscall GuildMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_GUILD_INVITE_ACK(GuildMemberTask *this, PROTO_NC_GUILD_ACADEMY_MEMBER_GUILD_INVITE_ACK *pkProto); // idb
void __thiscall GuildMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_REQ(GuildMemberTask *this, PROTO_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_REQ *pkProto); // idb
void __thiscall GuildMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_ERR(GuildMemberTask *this, PROTO_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_ERR *pkProto); // idb
char __thiscall GuildMemberTask::OnProcessNetMsg(GuildMemberTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData);
void __thiscall GuildMemberTask::GuildMemberTask(GuildMemberTask *this); // idb
GuildMemberTask *__thiscall GuildMemberTask::`scalar deleting destructor'(GuildMemberTask *this, unsigned int a2);
void __thiscall GuildTournamentEnemyInfo::~GuildTournamentEnemyInfo(GuildTournamentEnemyInfo *this); // idb
BOOL __thiscall CClientGuild::AmIGuildMember(CClientGuild *this);
bool __thiscall CClientGuild::AmIGuildMaster(CClientGuild *this); // idb
bool __thiscall CClientGuild::CanIVanishMember(CClientGuild *this); // idb
bool __thiscall CClientGuild::CanIAppoint(CClientGuild *this); // idb
bool __thiscall CClientGuild::CanIInvite(CClientGuild *this); // idb
bool __thiscall CClientGuild::CanIWriteNotice(CClientGuild *this); // idb
bool __thiscall CClientGuild::CanIDismissGuild(CClientGuild *this); // idb
bool __thiscall CClientGuild::CanIApplyGuildWar(CClientGuild *this); // idb
bool __thiscall CClientGuild::CanIUseStorage(CClientGuild *this); // idb
bool __thiscall CClientGuild::CanIForbidChat(CClientGuild *this); // idb
char __thiscall CClientGuild::IsEnemyGuild(CClientGuild *this, unsigned int regnum);
char __thiscall CClientGuild::IsAttackableEnemyGuild(CClientGuild *this, unsigned int regnum);
void __thiscall CClientGuild::ReqNextPage(CClientGuild *this); // idb
void __thiscall CClientGuild::ReqPrevPage(CClientGuild *this); // idb
char __thiscall CClientGuild::IsWarEngaging(CClientGuild *this);
bool __thiscall CClientGuild::IsGttEnemyGuild(CClientGuild *this, unsigned int regnum); // idb
bool __thiscall CClientGuild::IsGttAttackableEnemyGuild(CClientGuild *this, unsigned int regnum); // idb
bool __thiscall CClientGuild::IsGttEngaging(CClientGuild *this); // idb
void __thiscall CClientGuild::ReqHistoryList(CClientGuild *this); // idb
int __thiscall GuildTask::Recv_NC_GUILD_WAR_START_CMD(GuildTask *this, PROTO_NC_GUILD_WAR_START_CMD *pCmd); // idb
int __thiscall GuildTask::Recv_NC_GUILD_WAR_END_CMD(GuildTask *this, PROTO_NC_GUILD_WAR_END_CMD *pCmd); // idb
int __thiscall GuildTask::Recv_NC_GUILD_WAR_COOLDOWN_DONE_CMD(GuildTask *this, PROTO_NC_GUILD_WAR_COOLDOWN_DONE_CMD *pCmd); // idb
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_TYPE_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_TYPE_CMD *pkCmd); // idb
int __thiscall GuildTask::Recv_NC_GUILD_GRADE_CMD(GuildTask *this, PROTO_NC_GUILD_GRADE_CMD *pCmd); // idb
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_SKILLPOINT_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_SKILLPOINT_CMD *pkCmd); // idb
// int __userpurge GuildTask::Recv_NC_GUILD_TOURNAMENT_SCORE_CMD@<eax>(GuildTask *this@<ecx>, int a2@<ebx>, PROTO_NC_GUILD_TOURNAMENT_SCORE_CMD *pkCmd);
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_DICEGAME_END_TIME(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_DICEGAME_BEFORE_END_TIME_MSG_CMD *pkTime); // idb
void __thiscall GuildTournamentImprove::Init(GuildTournamentImprove *this); // idb
char *__thiscall CClientGuild::FindGttEnemyInfo(CClientGuild *this, unsigned int RegNo); // idb
void __cdecl GuildTask::SetListRefreshEnable(bool bEnable); // idb
double __cdecl GuildTask::GetPassedTimeSinceRefresh();
void __cdecl GuildTask::Terminate(); // idb
CClientGuild *__cdecl GuildTask::GetGuild(); // idb
GuildNpcMenuWin *__cdecl GuildTask::GetGuildNpcMenuWin(); // idb
GuildMasterMenuWin *__cdecl GuildTask::GetGuildMasterMenuWin(); // idb
GuildTournamentBaseWin *__cdecl GuildTask::GetGuildTournamnetBaseWin(); // idb
GuildTournamentScheduleWin *__cdecl GuildTask::GetGuildTournamentScheduleWin(); // idb
GuildMenuWin *__cdecl GuildTask::GetGuildMenu(); // idb
GuildSelectWin *__cdecl GuildTask::GetGuildSelectWin(); // idb
GuildTournamentStorageWin *__cdecl GuildTask::GetGuildTournamentStorageWin(); // idb
void __cdecl GuildTask::SetListReq(bool b); // idb
GTTDiceWin *__cdecl GuildTask::GetGTTDiceWin(); // idb
GTTSkillWin *__cdecl GuildTask::GetGTTSkillWin(); // idb
GTTMiniSkillWin *__cdecl GuildTask::GetGTTMiniSkillWin(); // idb
GuildTournamentImprove *__cdecl GuildTask::GetGuildTournamentImprove(); // idb
GTIFlagWin *__cdecl GuildTask::GetGTIMyFlagWin(); // idb
GTIFlagWin *__cdecl GuildTask::GetGTIEnemyFlagWin(); // idb
void __thiscall GuildTask::OnStart(GuildTask *this); // idb
void __thiscall GuildTask::OnIdle(GuildTask *this, float fTime); // idb
void __thiscall GuildTask::DirectMessage(GuildTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __cdecl GuildTask::InvalidateGuildWindow(); // idb
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_LIST_ACK(GuildTask *this, int iRevBytes, void *pvData); // idb
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENTSTOP_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENTSTOP_CMD *pkCmd); // idb
int __thiscall GuildTask::Recv_NC_GUILD_RENAME_ACK(GuildTask *this, PROTO_NC_GUILD_RENAME_ACK *pkAck); // idb
int __thiscall GuildTask::Recv_NC_GUILD_RETYPE_CMD(GuildTask *this, PROTO_NC_GUILD_RETYPE_CMD *pkCmd); // idb
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_USESKILL_ACK(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_USESKILL_ACK *pkAck); // idb
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_DICEGAME_THROW_ACK(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_DICEGAME_THROW_ACK *pkAck); // idb
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_DICEGAME_THROW_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_DICEGAME_THROW_CMD *pkCmd); // idb
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_OBSERVER_ENTER_ACK(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_OBSERVER_ENTER_ACK *pkAck); // idb
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_FLAGCAPTURE_ACK(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_FLAGCAPTURE_ACK *pkAck); // idb
int __thiscall GuildTask::Recv_NC_GUILD_MY_GUILD_TOKEN_INFO_ACK(GuildTask *this, PROTO_NC_GUILD_MY_GUILD_TOKEN_INFO_ACK *pkAck); // idb
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_FLAGCAPTURE_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_FLAGCAPTURE_CMD *pkCmd); // idb
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_OBSERVER_OUT_ACK(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_OBSERVER_OUT_ACK *pkAck); // idb
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_STARTMSG_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_STARTMSG_CMD *pkCmd); // idb
int __thiscall GuildTask::Recv_NC_GUILD_WORLD_SET_GUILD_TOKEN_CMD(GuildTask *this, PROTO_NC_GUILD_WORLD_SET_GUILD_TOKEN_CMD *pkCmd); // idb
GTStatusWin *__cdecl GuildTask::GetGTStatusWin(); // idb
GTStatusMiniWin *__cdecl GuildTask::GetGTStatusMiniWin(); // idb
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_JOIN_LIST_ACK(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_JOIN_LIST_ACK *pkAck); // idb
int __stdcall GuildTask::Recv_NC_GUILD_TOURNAMENT_ITEM_SCAN_CMD(PROTO_NC_GUILD_TOURNAMENT_ITEM_SCAN_CMD *pkCmd);
int __stdcall GuildTask::Recv_NC_GUILD_EMBLEM_INFO_CMD(PROTO_NC_GUILD_EMBLEM_INFO_CMD *pkCmd);
int __thiscall GuildTask::Recv_NC_GUILD_DISMISS_CMD(GuildTask *this, PROTO_NC_GUILD_DISMISS_CMD *pkProto); // idb
int __thiscall GuildTask::Recv_NC_GUILD_WAR_ACK(GuildTask *this, PROTO_NC_GUILD_WAR_ACK *pkProto); // idb
int __thiscall GuildTask::Recv_NC_GUILD_WAR_ABLE_LIST_ACK(GuildTask *this, PROTO_NC_GUILD_WAR_ABLE_LIST_ACK *pAck); // idb
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_JOIN_ACK(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_JOIN_ACK *pkProto); // idb
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENTSTART_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENTSTART_CMD *pkCmd); // idb
int __thiscall GuildTask::Recv_NC_GUILD_STORAGEWITHDRAW_CMD(GuildTask *this, PROTO_NC_GUILD_STORAGEWITHDRAW_CMD *pkCmd); // idb
int __thiscall GuildTask::Recv_NC_ITEM_GUILD_STORAGE_WITHDRAW_ACK(GuildTask *this, PROTO_NC_ITEM_GUILD_STORAGE_WITHDRAW_ACK *pkProto); // idb
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_RECALL_ENTER_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_RECALL_ENTER_CMD *pkCmd); // idb
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_RECALL_ENTER_ACK(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_RECALL_ENTER_ACK *pkProto); // idb
int __thiscall GuildTask::Recv_NC_GUILD_RETYPE_ACK(GuildTask *this, PROTO_NC_GUILD_RETYPE_ACK *pkAck); // idb
int __thiscall GuildTask::Recv_NC_GUILD_MY_GUILD_TOURNAMENT_MATCH_TIME_ACK(GuildTask *this, PROTO_NC_GUILD_MY_GUILD_TOURNAMENT_MATCH_TIME_ACK *pkAck); // idb
// int __userpurge GuildTask::Recv_NC_GUILD_TOURNAMENT_PLAYERDIEMSG_CMD@<eax>(GuildTask *this@<ecx>, int a2@<edi>, PROTO_NC_GUILD_TOURNAMENT_PLAYERDIEMSG_CMD *pkCmd);
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_MANAGERUSERMSG_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_MANAGERUSERMSG_CMD *pkCmd); // idb
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_PLAYERKILLMSG_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_PLAYERKILLMSG_CMD *pkCmd); // idb
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_ITEM_PICK_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_ITEM_PICK_CMD *pkCmd); // idb
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_ITEM_EFFECT_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_ITEM_EFFECT_CMD *pkCmd); // idb
int __stdcall GuildTask::Recv_NC_GUILD_TOURNAMENT_REFUND_NOTICE_CMD(PROTO_NC_GUILD_TOURNAMENT_REFUND_NOTICE_CMD *pkCmd);
GameFrameWork *__thiscall GuildTask::Recv_NC_GUILD_EMBLEM_CHECK_AVAILABILITY_ACK(GuildTask *this, PROTO_NC_GUILD_EMBLEM_CHECK_AVAILABILITY_ACK *pkCmd);
PROTO_NC_GUILD_EMBLEM_SAVE_ACK *__thiscall GuildTask::Recv_NC_GUILD_EMBLEM_SAVE_ACK(GuildTask *this, PROTO_NC_GUILD_EMBLEM_SAVE_ACK *pkCmd);
void __thiscall CClientGuild::ClearHistoryList(CClientGuild *this); // idb
void __thiscall GuildTask::~GuildTask(GuildTask *this); // idb
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_RESULT_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_RESULT_CMD *pkCmd); // idb
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_DICEGAME_START_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_DICEGAME_START_CMD *pkCmd); // idb
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_FLAGCAPTURE_RESULT_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_FLAGCAPTURE_RESULT_CMD *pkCmd); // idb
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_USESKILL_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_USESKILL_CMD *pkCmd); // idb
// int __userpurge GuildTask::Recv_NC_GUILD_TOURNAMENTSTOPMSG_CMD@<eax>(GuildTask *this@<ecx>, int a2@<edi>, PROTO_NC_GUILD_TOURNAMENTSTOPMSG_CMD *pkCmd);
int __stdcall GuildTask::Recv_NC_GUILD_TOURNAMENT_NOTIFY_CMD(PROTO_NC_GUILD_TOURNAMENT_NOTIFY_CMD *pkCmd);
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_ITEM_FLAG_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_ITEM_FLAG_CMD *pkCmd); // idb
int __thiscall GuildTask::Recv_NC_GUILD_HISTORY_LIST_ACK(GuildTask *this, PROTO_NC_GUILD_HISTORY_LIST_ACK *pkCmd); // idb
int __stdcall GuildTask::Recv_NC_GUILD_EMBLEM_OFF_MSG_CMD(PROTO_NC_GUILD_EMBLEM_OFF_MSG_CMD *pkCmd);
char __thiscall GuildNameCache::OnProcessNetMsg(GuildNameCache *this, int iDepart, int iCommand, int iRevBytes, void *pvData);
void __thiscall GuildNameCache::~GuildNameCache(GuildNameCache *this); // idb
int __stdcall GuildTask::Recv_NC_GUILD_MOBGUILD_CMD(PROTO_NC_GUILD_MOBGUILD_CMD *pkCmd);
char *__thiscall GuildNameCache::GetGuildName(GuildNameCache *this, unsigned int dwRegNum); // idb
void __thiscall GuildNameCache::SetGuildName(GuildNameCache *this, unsigned int dwRegNum, Name4 *rkName); // idb
GUILD_EMBLEM_INFO *__thiscall GuildNameCache::GetGuildEmblem(GuildNameCache *this, unsigned int dwRegNum); // idb
void __thiscall GuildNameCache::SetGuildEmblem(GuildNameCache *this, unsigned int dwRegNum, GUILD_EMBLEM_INFO *EmblemInfo); // idb
int __thiscall GuildTask::Recv_NC_GUILD_RENAME_CMD(GuildTask *this, PROTO_NC_GUILD_RENAME_CMD *pkCmd); // idb
void __thiscall GuildTask::GuildTask(GuildTask *this); // idb
void __cdecl GuildTask::Create(IDirectMessenger *pkMsgHooker); // idb
int __thiscall GuildTask::Recv_NC_GUILD_MAKE_ACK(GuildTask *this, PROTO_NC_GUILD_MAKE_ACK *pkProto); // idb
int __thiscall GuildTask::Recv_NC_GUILD_MY_GUILD_INFO_ACK(GuildTask *this, PROTO_NC_GUILD_MY_GUILD_INFO_ACK *pkProto); // idb
char *__cdecl GuildTask::GetGuildName(unsigned int dwRegNum); // idb
GUILD_EMBLEM_INFO *__cdecl GuildTask::GetEmblemInfo(unsigned int dwRegNum); // idb
void __cdecl GuildTask::SetGuildEmblem(unsigned int dwRegNum, GUILD_EMBLEM_INFO *pEmblemInfo); // idb
PROTO_NC_GUILD_EMBLEM_INFO_NOTICE_CMD *__stdcall GuildTask::Recv_NC_GUILD_EMBLEM_INFO_NOTICE_CMD(PROTO_NC_GUILD_EMBLEM_INFO_NOTICE_CMD *pkCmd);
bool __thiscall GuildTask::OnProcessNetMsg(GuildTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::~NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>(NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *> *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *> *this, unsigned int a2);
void __thiscall NiTPointerList<GUILD_HISTORY *>::~NiTPointerList<GUILD_HISTORY *>(NiTPointerList<GUILD_HISTORY *> *this); // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *> *this, unsigned int a2);
GUILD_CLIENT *__thiscall GUILD_CLIENT::operator=(GUILD_CLIENT *this, GUILD_CLIENT *__that); // idb
unsigned int __cdecl ITableBase<GTIView,GTIViewInfoTab>::GetTotal(); // idb
PgTList<GUILD_HISTORY *> *__thiscall PgTList<GUILD_HISTORY *>::`vector deleting destructor'(PgTList<GUILD_HISTORY *> *this, unsigned int a2);
GTIView *__cdecl GTIViewInfoTab::GetByIndex(unsigned int uiIndex); // idb
void __thiscall CClientGuild::~CClientGuild(CClientGuild *this); // idb
GuildTask *__thiscall GuildTask::`vector deleting destructor'(GuildTask *this, unsigned int a2);
void __thiscall GuildNameCache::GuildNameCache(GuildNameCache *this); // idb
GuildNameCache *__thiscall GuildNameCache::`vector deleting destructor'(GuildNameCache *this, unsigned int a2);
unsigned int *__thiscall mhCollisionManager::DelColliData(mhCollisionManager *this, NiPointer<NiNode> DelNode, mhCollisionType ColliType);
signed int __thiscall mhCollisionManager::Create(mhCollisionManager *this, NiNode *RootCollider);
mhColliStyle __thiscall mhCollisionManager::Update(mhCollisionManager *this, float fTime, mhGameMainConnectMgr *GameMainConnectMgr); // idb
signed int __thiscall mhCollisionManager::DelObject(mhCollisionManager *this, mhObject *mhObj, mhCollisionType ColliType);
mhColliStyle __cdecl mhCollisionManager::SetCollisionStyleInCallBack(mhColliStyle NewStyle, NiCollisionGroup::Intersect *InterSectInfo, mhConditionBOOL Mainchar, mhConditionBOOL Otherchar); // idb
int __cdecl mhCollisionManager::Callback(NiCollisionGroup::Intersect *kIntersect); // idb
signed int __thiscall mhCollisionManager::AddObject(mhCollisionManager *this, mhObject *mhObj, mhCollisionType ColliType);
signed int __thiscall mhCollisionManager::AddColliData(mhCollisionManager *this, NiPointer<NiNode> AddNode, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *ColliNodeName, mhCollisionType ColliType);
signed int __thiscall mhCollisionManager::MoveColliGroup(mhCollisionManager *this, mhObject *mhObj, mhCollisionType Dest);
void __cdecl MiniHouseIndoor::SetZeroID(); // idb
void __thiscall MiniHouseIndoor::RevChangeEndure(MiniHouseIndoor *this, MHE_STEP e, int iGUID); // idb
signed int __stdcall MiniHouseIndoor::DelUI(mhUIID DelID);
bool __thiscall MiniHouseIndoor::IsNormalState(MiniHouseIndoor *this); // idb
NiAVObject *__stdcall MiniHouseIndoor::MoveSceneType(mhObject *Obj, mhObjSceneType To, mhObjSceneType From, bool bCallGameFrameNet);
// tm *__usercall localtime_1@<eax>(const int *_Time@<eax>); idb
// int __usercall mktime_3@<eax>(tm *_Tm@<eax>); idb
mhReturnType __stdcall MiniHouseIndoor::SetPickedObj(mhObject *Picked);
NiAVObject *MiniHouseIndoor::GetLightNode();
signed int MiniHouseIndoor::MakeDefault();
signed int __stdcall MiniHouseIndoor::DelObject(int iGUID, int iResGUID);
Item *__stdcall MiniHouseIndoor::GetEndureStep(Item *pItem, int Nowtime);
mhObject *__thiscall MiniHouseIndoor::ObjDoAction(MiniHouseIndoor *this, char action, unsigned __int16 Actor, unsigned __int16 ActObj);
mhObject *__thiscall MiniHouseIndoor::ObjDoAction(MiniHouseIndoor *this, unsigned __int16 nFurnitureHnd, unsigned __int16 ActorHnd, unsigned __int16 Anihandle, unsigned __int16 NextAnihandle, char ActorIdx, char ActeeIdx);
void __thiscall MiniHouseIndoor::ArrangeModeReq(MiniHouseIndoor *this); // idb
signed int __thiscall MiniHouseIndoor::Clear(MiniHouseIndoor *this);
int __thiscall MiniHouseIndoor::GetPickedObjID(MiniHouseIndoor *this); // idb
void __thiscall MiniHouseIndoor::DelScene(MiniHouseIndoor *this, NiAVObject *spNode, mhObjSceneType Dest); // idb
mhObject *__thiscall MiniHouseIndoor::GetObjectA(MiniHouseIndoor *this, NiAVObject *pkNode); // idb
void __thiscall MiniHouseIndoor::MainCharRunAwayFromObj(MiniHouseIndoor *this, NiPoint3 *CharPos, NiPoint3 *ColiPoint); // idb
mhObject *__thiscall MiniHouseIndoor::DelPickedObj(MiniHouseIndoor *this);
mhReturnType __thiscall MiniHouseIndoor::SetupRoom(MiniHouseIndoor *this, NiPointer<NiNode> spMapNode, NiPointer<NiNode> spAttachDest, MiniHouseRoomInfo::TexStyleGroup NewTexStyleGroup); // idb
bool __thiscall MiniHouseIndoor::IsPopUpMHItemInvState(MiniHouseIndoor *this); // idb
char __thiscall MiniHouseIndoor::SetCharEmotion(MiniHouseIndoor *this, unsigned __int16 TargetObjID, char ActPos, MHEmotion *pkEmotionInfo);
void __thiscall MiniHouseIndoor::AddObjSeatInfo(MiniHouseIndoor *this, int ActPos, unsigned __int16 CharhWnd, unsigned __int16 mhObj);
void __thiscall MiniHouseIndoor::DelObjSeatInfo(MiniHouseIndoor *this, unsigned __int16 CharhWnd); // idb
void __thiscall MiniHouseIndoor::CatchAllGeometry(MiniHouseIndoor *this, NiAVObject *pkObject, PgTList<NiGeometry *> *kList); // idb
// int *__userpurge MiniHouseIndoor::RemoveObjScene@<eax>(MiniHouseIndoor *this@<ecx>, int a2@<esi>, mhObject *RemoveObj);
signed int __thiscall MiniHouseIndoor::PickedObjMove(MiniHouseIndoor *this, tagPOINT MousePos, mhObjTranslate TranslateMode);
signed int __thiscall MiniHouseIndoor::PickedObjRotate(MiniHouseIndoor *this, tagPOINT MousePos, mhObjTranslate TranslateMode);
signed int __thiscall MiniHouseIndoor::AttachObjToScene(MiniHouseIndoor *this, int iObjGUID, bool bAddCollision);
void __thiscall MiniHouseIndoor::CloseAllUis(MiniHouseIndoor *this); // idb
signed int __thiscall MiniHouseIndoor::CloseUIwin(MiniHouseIndoor *this, mhUIID CloseUIID);
signed int __thiscall MiniHouseIndoor::DelCharColiNode(MiniHouseIndoor *this, NiNode *CharRootNode);
int __thiscall MiniHouseIndoor::CheckColiInfoWIthPickedObj(MiniHouseIndoor *this); // idb
int __stdcall MiniHouseIndoor::GetEndurePercentage(Item *pItem, int Nowtime);
void __thiscall MiniHouseIndoor::ForceChangeEndure(MiniHouseIndoor *this); // idb
void __thiscall MiniHouseIndoor::DetachFocusEff(MiniHouseIndoor *this, NiNode *pkTarget); // idb
void __thiscall MiniHouseIndoor::SendObjEffReq(MiniHouseIndoor *this); // idb
signed int __thiscall MiniHouseIndoor::SetMouseDownStartPos(MiniHouseIndoor *this, tagPOINT MousePos, NiPoint3 kGroundPos, mhObjTranslate TranslateMode);
void __thiscall MiniHouseIndoor::ClearScene(MiniHouseIndoor *this); // idb
void __thiscall MiniHouseIndoor::StartMHCharEmotion(MiniHouseIndoor *this, NiPoint3 *kGroundPos, unsigned int uiPos, int ActionIndex); // idb
char __thiscall MiniHouseIndoor::GetEmptyOfObjSeat(MiniHouseIndoor *this, unsigned __int16 mhObj, unsigned __int16 CharhWnd, char WantedActPos); // idb
void __thiscall MiniHouseIndoor::AttachFocusEff(MiniHouseIndoor *this, NiNode *pkTarget); // idb
signed int __thiscall MiniHouseIndoor::ClearUI(MiniHouseIndoor *this);
char __stdcall MiniHouseIndoor::DetachAlphaProp(NiNode *pDest);
NiAVObject *__thiscall MiniHouseIndoor::AddScene(MiniHouseIndoor *this, NiAVObject *spNode, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *ClonedRootName, mhObjSceneType Dest, bool bClone); // idb
signed int __thiscall MiniHouseIndoor::DelCharLev(MiniHouseIndoor *this, unsigned __int16 CharhWnd);
char __stdcall MiniHouseIndoor::AttachAlphaProp(NiNode *pDest);
void __thiscall MiniHouseIndoor::SetForceAlphaState(MiniHouseIndoor *this, mhObject *pObj, bool bAlphaMode); // idb
void __thiscall MiniHouseIndoor::SetPopUpMHItemInvState(MiniHouseIndoor *this, bool b); // idb
void __thiscall MiniHouseIndoor::SetRepairObjID(MiniHouseIndoor *this, unsigned __int16 ID); // idb
signed int __thiscall MiniHouseIndoor::MakeCharColiNode(MiniHouseIndoor *this, NiNode *CharRootNode, mhCollisionType ColiStyle, float Radius);
Char *__thiscall MiniHouseIndoor::DelJoinCharInfo(MiniHouseIndoor *this, unsigned __int16 CharhWnd);
signed int __thiscall MiniHouseIndoor::AddUI(MiniHouseIndoor *this, mhUIID AddID, PgWinFrame *AddWinFrame);
mhReturnType __thiscall MiniHouseIndoor::AddCharLev(MiniHouseIndoor *this, int CharhWnd, char Level);
void __thiscall MiniHouseIndoor::ActMHEmotion(MiniHouseIndoor *this, FURNITURE_EMOTION_INFO *ActionInfo); // idb
char __thiscall MiniHouseIndoor::ObjEffErrMsg(MiniHouseIndoor *this, unsigned __int16 nEffectHandle, unsigned __int16 err);
char __thiscall MiniHouseIndoor::GetCharLev(MiniHouseIndoor *this, unsigned __int16 CharhWnd); // idb
mhReturnType __thiscall MiniHouseIndoor::AddJoinCharInfo(MiniHouseIndoor *this, int CharhWnd, char Level);
char __stdcall MiniHouseIndoor::FindNearestActPos(mhObject *mhObj, NiPoint3 *kGroundPos);
char __thiscall MiniHouseIndoor::CheckObjEffItem(MiniHouseIndoor *this, MiniHouseFurnitureObjEffect *Obj);
char __thiscall MiniHouseIndoor::CheckObjEffMoney(MiniHouseIndoor *this, MiniHouseFurnitureObjEffect *Obj);
void __thiscall MiniHouseIndoor::SetObjEffMsg(MiniHouseIndoor *this, char *msg, int iResGUID, unsigned __int16 ObjID); // idb
void __thiscall MiniHouseIndoor::PickedCopyObjColiNode(MiniHouseIndoor *this); // idb
void __thiscall MiniHouseIndoor::DelCopyObjColiNode(MiniHouseIndoor *this, NiNode *DelRoot, mhCollisionType ColiStyle); // idb
void __thiscall MiniHouseIndoor::ObjColiAct(MiniHouseIndoor *this, mhObject *pkObj); // idb
mhReturnType __thiscall MiniHouseIndoor::ClearLight(MiniHouseIndoor *this); // idb
void __thiscall MiniHouseIndoor::SetFocusObj(MiniHouseIndoor *this, mhObject *pkObj, bool bObjAct); // idb
signed int __thiscall MiniHouseIndoor::CancelPickObj(MiniHouseIndoor *this);
void __thiscall MiniHouseIndoor::MakePickedObjColiNode(MiniHouseIndoor *this, mhState NewState); // idb
signed int __thiscall MiniHouseIndoor::Terminate(MiniHouseIndoor *this);
bool __thiscall MiniHouseIndoor::ChangeEndure(MiniHouseIndoor *this, MHE_STEP e, int iGUID); // idb
void __thiscall MiniHouseIndoor::SetNonePickedObj(MiniHouseIndoor *this); // idb
signed int __thiscall MiniHouseIndoor::ReleasePickObj(MiniHouseIndoor *this, bool bNoCollisionTest, bool bCallGameFrameNet);
signed int __thiscall MiniHouseIndoor::AddObject(MiniHouseIndoor *this, int iGUID, int iResGUID, NiPoint3 *Pos, float fAngle, char Endure, bool bAddCollision);
mhObject *__thiscall MiniHouseIndoor::SetObjPos(MiniHouseIndoor *this, int iGUID, NiPoint3 *Pos, float angle);
signed int __thiscall MiniHouseIndoor::DelObject(MiniHouseIndoor *this, int iObjGUID, bool bCallGameFrameNet);
signed int __thiscall MiniHouseIndoor::AddLight(MiniHouseIndoor *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > LightName);
NiPointer<NiAmbientLight> *__thiscall MiniHouseIndoor::GetLight(MiniHouseIndoor *this, NiPointer<NiAmbientLight> *result, std::basic_string<char,std::char_traits<char>,std::allocator<char> > LightName); // idb
mhReturnType __thiscall MiniHouseIndoor::ChangeLight(MiniHouseIndoor *this, NiPointer<NiNode> spScene, std::basic_string<char,std::char_traits<char>,std::allocator<char> > LightName); // idb
void __thiscall MiniHouseIndoor::~MiniHouseIndoor(MiniHouseIndoor *this); // idb
signed int __thiscall MiniHouseIndoor::SetForceArrStateHold(MiniHouseIndoor *this, bool b);
void __thiscall MiniHouseIndoor::SetupScene(MiniHouseIndoor *this, NiPointer<NiNode> spRoot); // idb
mhReturnType __thiscall MiniHouseIndoor::SetState(MiniHouseIndoor *this, mhState NewState); // idb
// signed int __userpurge MiniHouseIndoor::SetPickedObj@<eax>(MiniHouseIndoor *this@<ecx>, int a2@<ebx>, int a3@<edi>, NiAVObject *Picked, mhState NewState, bool bReadytoCreateObj);
// signed int __userpurge MiniHouseIndoor::Update@<eax>(MiniHouseIndoor *this@<ecx>, int a2@<ebx>, signed int a3@<edi>, int a4@<esi>, float fTime);
void __thiscall MiniHouseIndoor::UpdateObjCharColiProcess(MiniHouseIndoor *this, NiPoint3 *CharPos); // idb
signed int __thiscall MiniHouseIndoor::Create(MiniHouseIndoor *this, NiPointer<NiNode> spRootScene);
signed int __thiscall MiniHouseIndoor::Join(MiniHouseIndoor *this, bool bIsMaster);
signed int __thiscall MiniHouseIndoor::Out(MiniHouseIndoor *this);
char __thiscall mhFocusObj::SetObj(mhFocusObj *this, mhObject *pkObj);
void __thiscall Party::Party(Party *this, Party *__that); // idb
unsigned int __cdecl ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::GetTotal(); // idb
void __thiscall ResElement::ReleaseResElement(ResElement *this); // idb
void __thiscall MiniHouseIndoor::ClearObjEffMsg(MiniHouseIndoor *this); // idb
Party *__stdcall mhGameMainConnectMgr::GetMyParty(Party *result);
MiniHouseFurnitureObjEffect *__cdecl MHFurnitureObjEffectTab::GetbyHandle(unsigned __int16 wHandle); // idb
MiniHouseFurnitureObjEffect *__cdecl MHFurnitureObjEffectTab::GetInxName(char *acName); // idb
MiniHouseEndure *__cdecl MiniHouseEndureInfoTable::GetByHandle(unsigned __int16 wHandle); // idb
MHEmotion *__cdecl MiniHouseEmotionTab::GetEmotion(unsigned __int16 MHEmotionID, int ActionIndex); // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *__thiscall std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0>>::_Insert(std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *this, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *_Newnode); // idb
void __thiscall ResElement::ResElement(ResElement *this); // idb
void __thiscall ResElement::~ResElement(ResElement *this); // idb
ResElement *__thiscall ResElement::`vector deleting destructor'(ResElement *this, unsigned int a2);
void __thiscall mhResTableElement::mhResTableElement(mhResTableElement *this); // idb
mhResTableElement *__thiscall mhResTableElement::`vector deleting destructor'(mhResTableElement *this, unsigned int a2);
void __thiscall std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiNode>>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiNode>>(std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > *this); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<enum  MHE_STEP,ResElement *,std::less<enum  MHE_STEP>,std::allocator<std::pair<enum  MHE_STEP const,ResElement *>>,0>>::find(std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > *result, OscTarget *_Keyval); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned char>>,0>>::find(std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > > *result, const unsigned __int16 *_Keyval); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *_Node, bool _Leftish); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned char>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *_Node, bool _Leftish); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned char>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > > _Where, std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *_Node); // idb
std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned char>>,0>>::_Buynode<std::pair<unsigned short const,unsigned char>>(std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > *this, std::pair<unsigned short const ,unsigned char> *_Val); // idb
char *__thiscall std::map<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned char>>>::operator[](std::map<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> > > *this, const unsigned __int16 *_Keyval); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiAmbientLight>>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > _Where, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *_Node); // idb
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiAmbientLight>>>,0>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>> &>(std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *this, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > *_Val); // idb
NiPointer<NiTexture> *__thiscall std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiAmbientLight>>>>::operator[](std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > > > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Keyval); // idb
int __stdcall mhGameMainConnectMgr::GetMousePos(int a2);
void __stdcall mhGameMainConnectMgr::SendObjEffReq(unsigned __int16 nFurniturehWnd, int nEffHandle);
void __stdcall mhGameMainConnectMgr::SendCreateObjReq(int iGUID, float fAngle, NiPoint3 *TargetPos);
void __stdcall mhGameMainConnectMgr::SendDecorateModeReq(mhState NowState);
Char *mhGameMainConnectMgr::GetMainChar();
void __stdcall mhGameMainConnectMgr::SendRearRangeReq(int GUID, float fAngle, NiPoint3 *TargetPos);
void mhGameMainConnectMgr::SendMainCharPosReq();
void __stdcall mhGameMainConnectMgr::SendDelObjReq(int iGUID);
char __stdcall mhGameMainConnectMgr::SendCompulsionMovetoChar(unsigned __int16 CharhWnd, NiPoint3 *kMovePos);
void __thiscall mhGameMainConnectMgr::SendObjActReq(mhGameMainConnectMgr *this, unsigned __int16 handle, unsigned __int16 nFurniturehWnd); // idb
void __thiscall stMINIHOUSEINFO::Clear(stMINIHOUSEINFO *this); // idb
void __thiscall CMiniHouseMgr::Update(CMiniHouseMgr *this, float fCurTime); // idb
void __thiscall CMiniHouseMgr::RemoveAll(CMiniHouseMgr *this, bool detachScene); // idb
signed __int16 __thiscall CMiniHouseMgr::GetMiniHouseHandleByNodePtr(CMiniHouseMgr *this, NiNode *pkNode);
void __thiscall CMiniHouseMgr::Terminate(CMiniHouseMgr *this); // idb
char __thiscall CMiniHouseMgr::Remove(CMiniHouseMgr *this, unsigned __int16 kHandle);
void __thiscall CMiniHouseMgr::~CMiniHouseMgr(CMiniHouseMgr *this); // idb
char __thiscall CMiniHouseMgr::AddInfo(CMiniHouseMgr *this, PROTO_NC_BRIEFINFO_MINIHOUSEBUILD_CMD *p);
void __thiscall CMiniHouseMgr::CMiniHouseMgr(CMiniHouseMgr *this); // idb
void __thiscall std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::_Rrotate(std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *_Wherenode); // idb
signed int __thiscall mhManagerMediator::Create(mhManagerMediator *this, NiNode *RootCollider);
bool __stdcall mhObjectManager::IsRootNiNodeName(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *TestName);
signed int __stdcall mhObject::SetTexture(int iTexID);
int __thiscall mhObject::SetParentGUID(mhObject *this, int iNewParentGUID); // idb
mhReturnType __thiscall mhObject::SetAct(mhObject *this, unsigned __int16 handle, unsigned __int16 nexthandle); // idb
signed int __thiscall mhObject::SetPos(mhObject *this, NiPoint3 *NewPos);
int __thiscall mhObject::Update(mhObject *this, float ftime); // idb
signed int __thiscall mhObject::SetRotAngle(mhObject *this, float fAngle);
void __thiscall mhObject::ColiAct(mhObject *this); // idb
bool __thiscall mhObject::GetCloseAniState(mhObject *this); // idb
bool __stdcall mhObjectManager::AskDelayedDelObj(mhObject *pObj);
mhObject *__thiscall mhObjectManager::FindDelayedDelObj(mhObjectManager *this); // idb
int __thiscall mhObjectManager::Update(mhObjectManager *this, float ftime); // idb
int __thiscall mhObjectManager::FindObjectID(mhObjectManager *this, NiNode *pRootNiNode); // idb
signed int __thiscall mhObjectManager::Clear(mhObjectManager *this);
void __thiscall mhObject::DelObjSeatInfo(mhObject *this, unsigned __int16 CharhWnd); // idb
void __thiscall mhObject::AllClearObjSeatInfo(mhObject *this); // idb
char __thiscall mhObject::GetmhEmotionCharPos(mhObject *this, unsigned __int16 CharhWnd); // idb
ResElement *__thiscall mhObject::GetResElement(mhObject *this, MHE_STEP Endure); // idb
char __thiscall mhObject::SetEndureStep(mhObject *this, MHE_STEP e);
signed int __thiscall mhObjectManager::RemoveObject(mhObjectManager *this, int iObjGUID);
signed int __thiscall mhObjectManager::DelObject(mhObjectManager *this, int iObjGUID);
mhObject *__thiscall mhObjectManager::GetObjectA(mhObjectManager *this, int iObjGUID); // idb
signed int __thiscall mhObjectManager::SetRotate(mhObjectManager *this, int iObjGUID, float fAngle);
mhObject *__thiscall mhObjectManager::GetmhEmotionObj(mhObjectManager *this, unsigned __int16 CharhWnd); // idb
bool __thiscall mhObject::IsEmptyOfObjSeat(mhObject *this, char ActPos); // idb
unsigned __int16 __thiscall mhObject::WhoUseIt(mhObject *this, char ActPos); // idb
signed int __thiscall mhObjectManager::SetPosition(mhObjectManager *this, int iObjGUID, NiPoint3 *SetPos);
signed int __thiscall mhObjectManager::SetNodeCullMode(mhObjectManager *this, int iObjGUID, bool bCullMode);
signed int __thiscall mhObjectManager::AddPosition(mhObjectManager *this, int iObjGUID, NiPoint3 *AddPos);
signed int __thiscall mhObjectManager::AttachScene(mhObjectManager *this, const int iObjGUID, NiNode *pDestNiNode);
bool __thiscall mhObject::AddResElement(mhObject *this, MHE_STEP Endure, ResElement *pkResEle); // idb
NiNode *__stdcall mhObjectManager::FindRootNode(NiNode *pNiNode);
// signed int __userpurge mhObject::Create@<eax>(mhObject *this@<ecx>, int a2@<ebx>, int iGUID, mhResTableElement *pkResElement, int iTexID, mhObject::mhObjBindType btBindType, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *strRootName, int iParentGUID);
void __thiscall mhObject::AddObjSeatInfo(mhObject *this, int ActPos, unsigned __int16 CharhWnd);
NiNode *__thiscall mhObjectManager::GetObjectNiNode(mhObjectManager *this, int iObjGUID); // idb
mhObject *__thiscall mhObjectManager::GetObjectA(mhObjectManager *this, NiNode *pNiNode); // idb
void __thiscall mhObjectManager::~mhObjectManager(mhObjectManager *this); // idb
signed int __thiscall mhObjectManager::AddObject(mhObjectManager *this, int iObjGUID, mhResTableElement *pkResource, int iTexID, mhObject::mhObjBindType btBindType, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *strRootName);
void __thiscall mhObjAniActor::~mhObjAniActor(mhObjAniActor *this); // idb
mhObjAniActor *__thiscall mhObjActor::`scalar deleting destructor'(mhObjAniActor *this, unsigned int a2);
void __thiscall std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Rrotate(std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *this, std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *_Wherenode); // idb
std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *__cdecl std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Max(std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *_Pnode); // idb
std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *__cdecl std::_Tree_val<std::_Tset_traits<Effect *,std::less<Effect *>,std::allocator<Effect *>,0>>::_Min(std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *_Pnode); // idb
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<Effect *,std::less<Effect *>,std::allocator<Effect *>,0>>,std::_Iterator_base0>::operator--(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >,std::_Iterator_base0> *this); // idb
void __thiscall std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Lrotate(std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *this, std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *_Wherenode); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,unsigned short>>,0>>::find(std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > > *result, const char *_Keyval); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,unsigned short>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *_Node, bool _Leftish); // idb
std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,unsigned short>>,0>>::_Buynode<std::pair<unsigned char,unsigned short> &>(std::_Tree_val<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > *this, std::pair<unsigned char,unsigned short> *_Val); // idb
void __thiscall mhObject::mhObject(mhObject *this); // idb
void __thiscall mhObject::~mhObject(mhObject *this); // idb
mhObject *__thiscall mhObject::`scalar deleting destructor'(mhObject *this, unsigned int a2);
int __stdcall mhObjAniActor::PlayEffect(unsigned int Index);
int __stdcall mhObjAniActor::PlaySoundA(unsigned int Index);
int __stdcall mhObjAniActor::AskAniGroupState(int AniGroupID, NiActorManager *ActorMgr);
int __thiscall mhObjAniActor::SetAct(mhObjAniActor *this, unsigned __int16 handle, unsigned __int16 nexthandle, NiActorManager *ActorMgr); // idb
MiniHouseObjAni *__thiscall mhObjAniActor::update(mhObjAniActor *this, float fTime, NiActorManager *ActorMgr);
MiniHouseFurniture *__cdecl MiniHouseFuritureInfoTab::GetObjByFileName(char *acName); // idb
void __thiscall mhResTableElement::~mhResTableElement(mhResTableElement *this); // idb
signed int __thiscall mhResTableManager::Clear(mhResTableManager *this);
mhResTableElement *__thiscall mhResTableManager::GetModelElement(mhResTableManager *this, int ElementID); // idb
NiPointer<NiNode> *__thiscall mhResTableManager::AddModelElement(mhResTableManager *this, mhResTableElement *NewElement);
signed int __thiscall mhResTableManager::AddTexElement(mhResTableManager *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *TexFileName, int iTexID);
signed int __thiscall mhResTableElement::Create(mhResTableElement *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *Filename, unsigned __int16 ElementID, mhObjectBindStyle eBindtype, mhObjectAction eAction, int iWeight, int iLoadingWeight, int iTexID, std::basic_string<char,std::char_traits<char>,std::allocator<char> > RootName);
NiPointer<NiSourceTexture> *__thiscall mhResTableManager::GetTexElement(mhResTableManager *this, NiPointer<NiSourceTexture> *result, int TexID); // idb
void __thiscall mhResTableManager::~mhResTableManager(mhResTableManager *this); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::insert(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int _Off, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Right, unsigned int _Roff, unsigned int _Count); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > _Where, std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *_Node); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::insert(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int _Off, const char *_Ptr, unsigned int _Count); // idb
int *__thiscall std::map<int,mhObject *,std::less<int>,std::allocator<std::pair<int const,mhObject *>>>::operator[](std::map<int,int,std::less<int>,std::allocator<std::pair<int const ,int> > > *this, const int *_Keyval); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const,NiPointer<NiSourceTexture>>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> > > _Where, std::_Tree_nod<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> >::_Node *_Node); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__cdecl std::operator+<char,std::char_traits<char>,std::allocator<char>>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Left, const char *_Right); // idb
NiPointer<NiSourceTexture> *__thiscall std::map<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const,NiPointer<NiSourceTexture>>>>::operator[](std::map<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > > > *this, const int *_Keyval); // idb
signed int __stdcall MiniHouseRoomInfo::Update(float fTime);
signed int MiniHouseRoomInfo::Out();
void __thiscall MiniHouseRoomInfo::~MiniHouseRoomInfo(MiniHouseRoomInfo *this); // idb
void MiniHouseRoomInfo::SetRoofColiNodeName();
void __stdcall MiniHouseRoomInfo::CullNoneTexType(NiPointer<NiNode> CullNode, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *ComponentName, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *CullTexStyleName);
signed int __thiscall MiniHouseRoomInfo::Join(MiniHouseRoomInfo *this, NiPointer<NiNode> spMapNode, NiPointer<NiNode> spAttachDest, MiniHouseRoomInfo::TexStyleGroup NewTexStyleGroup);
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__cdecl std::operator+<char,std::char_traits<char>,std::allocator<char>>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Left, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Right); // idb
void __cdecl mhMiscUtil::MakeNumToStr(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *ResultStr, int Num);
void __cdecl mhMiscUtil::DelNodeNameNum(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *NodeName, int Cipher); // idb
int __cdecl mhMiscUtil::GetNumFromNodeName(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *SrcName, unsigned int uiStrSize);
void __cdecl mhMiscUtil::InputStrFileName(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *Org, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *Input); // idb
void __cdecl mhMiscUtil::MakeNodeNameNum(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *NodeName, int NodeNum, int Cipher); // idb
int __cdecl mhMiscUtil::GetNodeMaxNum(NiNode *FindDestNode, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *NodeName); // idb
void __cdecl mhMiscUtil::GetLoadModelFileName(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *IndexName, mhMiscUtil::ModelType type); // idb
char __thiscall ResElement::CloneResElement(ResElement *this, ResElement *pSrcResElement, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *strRootName);
char __thiscall ResElement::LoadNIF(ResElement *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *strFileName, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *strRootName);
char __thiscall ResElement::LoadKFM(ResElement *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *strFileName, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *strRootName);
char __thiscall ResElement::CreateResElement(ResElement *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *strFileName, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *strRootName);
void __thiscall mhEditRoomWin::ShowComponent(mhEditRoomWin *this, int b);
void __thiscall mhEditRoomWin::OnClose(mhEditRoomWin *this); // idb
void __thiscall mhEditRoomWin::ReGenPos(mhEditRoomWin *this); // idb
unsigned int __stdcall mhEditRoomWin::GetInvIndex(unsigned int uiInvType, unsigned int uiMHItemInvindex);
void __thiscall mhEditRoomWin::OnActivePage(mhEditRoomWin *this, unsigned int uiPage); // idb
unsigned int __stdcall mhEditRoomWin::GetMHItemInvIndex(unsigned int uiIndex, unsigned int uiInvtype);
mhItemInvIconWin *__thiscall mhEditRoomWin::GetInvIconWin(mhEditRoomWin *this, unsigned int uiType, unsigned int uiIndex); // idb
void __thiscall mhEditRoomWin::SetWorkTargetWin(mhEditRoomWin *this, mhItemInvIconWin *pIconWin, ITEM_INVEN kInven); // idb
void mhEditRoomWin::OnHelpLink();
void __thiscall mhItemInvIconWin::mhItemInvIconWin(mhItemInvIconWin *this); // idb
void __thiscall mhItemInvIconWin::~mhItemInvIconWin(mhItemInvIconWin *this); // idb
bool __thiscall mhItemInvIconWin::IsUse(mhItemInvIconWin *this); // idb
void __thiscall mhItemInvIconWin::SetActive(mhItemInvIconWin *this, bool bActive); // idb
bool __thiscall mhItemInvIconWin::GetActive(mhItemInvIconWin *this); // idb
bool __thiscall mhItemInvIconWin::IsLock(mhItemInvIconWin *this); // idb
Item *__stdcall mhEditRoomWin::GetItemByObjID(int iGUID);
void __thiscall mhEditRoomWin::OnShowWin(mhEditRoomWin *this); // idb
void __thiscall mhEditRoomWin::UpdateWebPos(mhEditRoomWin *this); // idb
char __thiscall mhEditRoomWin::ChangePos(mhEditRoomWin *this, DropContents *pkContents, unsigned int uiReceiverInvIndex);
bool __stdcall mhEditRoomWin::IsMHOtherTypeCheck(unsigned int uiSendInvType, unsigned int uiRcvInvType);
void __thiscall mhEditRoomWin::OnActiveProp(mhEditRoomWin *this, unsigned int uiInvProptype); // idb
void __thiscall mhEditRoomWin::OnActive(mhEditRoomWin *this, unsigned int uiInvType, unsigned int uiPage); // idb
void __thiscall mhEditRoomWin::UpdateMeWin(mhEditRoomWin *this, float fCurTime); // idb
void __thiscall mhEditRoomWin::OnChangeTab(mhEditRoomWin *this, DirectUserMsgBody_MHInfoTabChanged::TabEnum eTab); // idb
char __thiscall mhEditRoomWin::OpenMHRepairWin(mhEditRoomWin *this, bool b, unsigned __int16 FurID);
void __thiscall mhEditRoomWin::OnRClickEvent(mhEditRoomWin *this, unsigned int uiIndex); // idb
void __thiscall mhEditRoomWin::OnLClickEvent(mhEditRoomWin *this, unsigned int uiInvtype, unsigned int uiIndex); // idb
void __thiscall mhEditRoomWin::OnCommand(mhEditRoomWin *this, unsigned int wParam, int lParam); // idb
void __thiscall mhItemInvIconWin::DoRAction(mhItemInvIconWin *this); // idb
void __thiscall mhItemInvIconWin::OnFirstHitWin(mhItemInvIconWin *this); // idb
void __thiscall mhItemInvIconWin::DoAction(mhItemInvIconWin *this); // idb
char __thiscall mhItemInvIconWin::EatDropInstance(mhItemInvIconWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
void __thiscall mhItemInvIconWin::SetLock(mhItemInvIconWin *this, bool bLock); // idb
void __thiscall mhItemInvIconWin::UpdateMeWin(mhItemInvIconWin *this, float fCurTime); // idb
void __thiscall mhItemInvIconWin::SetUse(mhItemInvIconWin *this, bool b); // idb
void __thiscall mhEditRoomWin::~mhEditRoomWin(mhEditRoomWin *this); // idb
mhItemInvIconWin *__cdecl mhItemInvIconWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent); // idb
void __thiscall mhEditRoomWin::ShowWeb(mhEditRoomWin *this, char *eKey); // idb
void __thiscall mhEditRoomWin::mhEditRoomWin(mhEditRoomWin *this); // idb
mhEditRoomWin *__cdecl mhEditRoomWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall mhItemInvIconWin::Create(mhItemInvIconWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent);
char __thiscall mhEditRoomWin::Create(mhEditRoomWin *this, PgFrameWork *pkFrameWork);
mhItemInvIconWin *__thiscall mhItemInvIconWin::`scalar deleting destructor'(mhItemInvIconWin *this, unsigned int a2);
mhEditRoomWin *__thiscall mhEditRoomWin::`vector deleting destructor'(mhEditRoomWin *this, unsigned int a2);
void __thiscall mhEmotionWin::mhEmotionWin(mhEmotionWin *this); // idb
void __thiscall mhEmotionWin::~mhEmotionWin(mhEmotionWin *this); // idb
bool __stdcall mhEmotionWin::DoAction(char ActionIndex);
char __thiscall mhEmotionWin::Create(mhEmotionWin *this, PgFrameWork *pkFrameWork);
void __stdcall mhEmotionWin::SetIconTexture(PgWinBut *pkBtn, NiSourceTexture *pkTex, char Index);
void __thiscall mhEmotionWin::UpdateInfo(mhEmotionWin *this); // idb
void __thiscall mhEmotionWin::SendUIMsg(mhEmotionWin *this, unsigned int uiMsg, int lParam); // idb
void __thiscall mhEmotionWin::OnCommand(mhEmotionWin *this, unsigned int wParam, int lParam); // idb
void __thiscall mhEmotionWin::OnShowWin(mhEmotionWin *this); // idb
mhEmotionWin *__cdecl mhEmotionWin::CreateWin(PgFrameWork *pkFrameWork); // idb
mhEmotionWin *__thiscall mhEmotionWin::`vector deleting destructor'(mhEmotionWin *this, unsigned int a2);
NiScreenElements *__thiscall PgSpr::GetGeometry(PgSpr *this, unsigned int uiIndex); // idb
MHEmotion *__cdecl MiniHouseEmotionTab::GetMenuEmotion(unsigned __int16 MHEmotionID, int IndexCount); // idb
void __thiscall mhGuestBookWin::mhGuestBookWin(mhGuestBookWin *this); // idb
void __thiscall mhGuestBookWin::~mhGuestBookWin(mhGuestBookWin *this); // idb
void __thiscall mhGuestBookWin::OnClose(mhGuestBookWin *this); // idb
void __thiscall mhGuestBookWin::ReGenPos(mhGuestBookWin *this); // idb
void mhGuestBookWin::OnHelpLink();
void __thiscall mhGuestBookWin::UpdateWebPos(mhGuestBookWin *this); // idb
void __thiscall mhGuestBookWin::OnChangeTab(mhGuestBookWin *this, DirectUserMsgBody_MHInfoTabChanged::TabEnum eTab); // idb
void __thiscall mhGuestBookWin::OnCommand(mhGuestBookWin *this, unsigned int wParam, int lParam); // idb
void __thiscall mhGuestBookWin::UpdateMeWin(mhGuestBookWin *this, float fCurTime); // idb
mhGuestBookWin *__cdecl mhGuestBookWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall mhGuestBookWin::ShowWeb(mhGuestBookWin *this, char *eKey, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *tKey); // idb
char __thiscall mhGuestBookWin::Create(mhGuestBookWin *this, PgFrameWork *pkFrameWork);
mhGuestBookWin *__thiscall mhGuestBookWin::`scalar deleting destructor'(mhGuestBookWin *this, unsigned int a2);
void __thiscall mhGuestBookWin2::mhGuestBookWin2(mhGuestBookWin2 *this); // idb
void __thiscall mhGuestBookWin2::~mhGuestBookWin2(mhGuestBookWin2 *this); // idb
void __thiscall mhGuestBookWin2::OnWinClose(mhGuestBookWin2 *this); // idb
void __thiscall mhGuestBookWin2::ReGenPos(mhGuestBookWin2 *this); // idb
void __thiscall mhGuestBookWin2::UpdateWebPos(mhGuestBookWin2 *this); // idb
void mhGuestBookWin2::OnHelpLink();
void __thiscall mhGuestBookWin2::OnCommand(mhGuestBookWin2 *this, unsigned int wParam, int lParam); // idb
void __thiscall mhGuestBookWin2::UpdateMeWin(mhGuestBookWin2 *this, float fCurTime); // idb
char __thiscall mhGuestBookWin2::Create(mhGuestBookWin2 *this, PgFrameWork *pkFrameWork);
mhGuestBookWin2 *__cdecl mhGuestBookWin2::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall mhGuestBookWin2::ShowWeb(mhGuestBookWin2 *this, char *eKey, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *tKey); // idb
mhGuestBookWin2 *__thiscall mhGuestBookWin2::`vector deleting destructor'(mhGuestBookWin2 *this, unsigned int a2);
void __thiscall mhInfoWin::ClearGuestList(mhInfoWin *this); // idb
void mhInfoWin::OnHelpLink();
void __thiscall mhInfoWin::UpdateMeWin(mhInfoWin *this, float fCurTime); // idb
void __thiscall mhInfoWin::RefreshSlideBar(mhInfoWin *this); // idb
void __thiscall mhInfoWin::OnChangeTab(mhInfoWin *this, DirectUserMsgBody_MHInfoTabChanged::TabEnum eTab); // idb
void __thiscall mhInfoWin::OnCommand(mhInfoWin *this, unsigned int wParam, int lParam); // idb
char __thiscall mhInfoWin::SetData(mhInfoWin *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *Name, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *Lev, int Column);
void __thiscall mhInfoWin::mhInfoWin(mhInfoWin *this); // idb
void __thiscall mhInfoWin::~mhInfoWin(mhInfoWin *this); // idb
mhInfoWin *__cdecl mhInfoWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall mhInfoWin::RefreshInfoPage(mhInfoWin *this); // idb
void __thiscall mhInfoWin::RefreshGuestPage(mhInfoWin *this); // idb
char __thiscall mhInfoWin::Create(mhInfoWin *this, PgFrameWork *pkFrameWork);
void __thiscall mhInfoWin::OnClose(mhInfoWin *this); // idb
mhInfoWin *__thiscall mhInfoWin::`vector deleting destructor'(mhInfoWin *this, unsigned int a2);
void __thiscall mhInputPassWordWin::OnCommand(mhInputPassWordWin *this, unsigned int wParam, int lParam); // idb
void __thiscall mhInputPassWordWin::mhInputPassWordWin(mhInputPassWordWin *this); // idb
void __thiscall mhInputPassWordWin::~mhInputPassWordWin(mhInputPassWordWin *this); // idb
char __thiscall mhInputPassWordWin::Create(mhInputPassWordWin *this, PgFrameWork *pkFrameWork);
mhInputPassWordWin *__cdecl mhInputPassWordWin::CreateWin(PgFrameWork *pkFrameWork); // idb
mhInputPassWordWin *__thiscall mhInputPassWordWin::`scalar deleting destructor'(mhInputPassWordWin *this, unsigned int a2);
void mhJoinWin::OnHelpLink();
void __thiscall mhJoinWin::~mhJoinWin(mhJoinWin *this); // idb
char __thiscall mhJoinWin::Create(mhJoinWin *this, PgFrameWork *pkFrameWork);
void __thiscall mhJoinWin::OnCommand(mhJoinWin *this, unsigned int wParam, int lParam); // idb
void __thiscall mhJoinWin::OnShowWin(mhJoinWin *this); // idb
void __thiscall mhJoinWin::mhJoinWin(mhJoinWin *this); // idb
mhJoinWin *__cdecl mhJoinWin::CreateWin(PgFrameWork *pkFrameWork); // idb
mhJoinWin *__thiscall mhJoinWin::`vector deleting destructor'(mhJoinWin *this, unsigned int a2);
void __thiscall mhMinimizeWin::mhMinimizeWin(mhMinimizeWin *this); // idb
void __thiscall mhMinimizeWin::~mhMinimizeWin(mhMinimizeWin *this); // idb
void __thiscall mhMinimizeWin::OnCommand(mhMinimizeWin *this, unsigned int wParam, int lParam); // idb
char __thiscall mhMinimizeWin::Create(mhMinimizeWin *this, PgFrameWork *pkFrameWork);
mhMinimizeWin *__cdecl mhMinimizeWin::CreateWin(PgFrameWork *pkFrameWork); // idb
mhMinimizeWin *__thiscall mhMinimizeWin::`vector deleting destructor'(mhMinimizeWin *this, unsigned int a2);
void __thiscall mhMouseControlWin::mhMouseControlWin(mhMouseControlWin *this); // idb
void __thiscall mhMouseControlWin::~mhMouseControlWin(mhMouseControlWin *this); // idb
// void __userpurge mhMouseControlWin::ShowBtn(mhMouseControlWin *this@<ecx>, int a2@<ebx>, mhMouseControlWin::BtnIndex eBtn, int b);
unsigned int __thiscall mhMouseControlWin::GetCenterX(mhMouseControlWin *this); // idb
unsigned int __thiscall mhMouseControlWin::GetCenterY(mhMouseControlWin *this); // idb
// void __usercall mhMouseControlWin::OnShowWin(mhMouseControlWin *this@<ecx>, int a2@<ebx>);
// void __usercall mhMouseControlWin::OnClose(mhMouseControlWin *this@<ecx>, int a2@<ebx>);
// void __userpurge mhMouseControlWin::UpdateMeWin(mhMouseControlWin *this@<ecx>, int a2@<ebx>, float fCurTime);
char __thiscall mhMouseControlWin::Create(mhMouseControlWin *this, PgFrameWork *pkFrameWork);
mhMouseControlWin *__cdecl mhMouseControlWin::CreateWin(PgFrameWork *pkFrameWork); // idb
mhMouseControlWin *__thiscall mhMouseControlWin::`vector deleting destructor'(mhMouseControlWin *this, unsigned int a2);
void __thiscall mhPortalListWin::ShowComponent(mhPortalListWin *this, int b);
void mhPortalListWin::OnHelpLink();
// tm *__usercall localtime_2@<eax>(const int *_Time@<eax>); idb
void __thiscall mhPortalListWin::UpdateMeWin(mhPortalListWin *this, float fCurTime); // idb
void __thiscall mhPortalListWin::OnShowWin(mhPortalListWin *this); // idb
void __thiscall mhPortalListWin::OnChangeTab(mhPortalListWin *this, DirectUserMsgBody_MHInfoTabChanged::TabEnum eTab); // idb
char __thiscall mhPortalListWin::SetData(mhPortalListWin *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *Name, int Column);
signed __int16 __thiscall mhPortalListWin::GetID(mhPortalListWin *this, int iSlideListIndex);
void __thiscall mhPortalListWin::SetToolTipText(mhPortalListWin *this, int column, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *ItemName); // idb
void __thiscall mhPortalListWin::RefreshSlideBar(mhPortalListWin *this); // idb
void __thiscall mhPortalListWin::Refresh(mhPortalListWin *this); // idb
void __thiscall mhPortalListWin::~mhPortalListWin(mhPortalListWin *this); // idb
void __thiscall mhPortalListWin::OnCommand(mhPortalListWin *this, unsigned int wParam, int lParam); // idb
char __thiscall mhPortalListWin::Add(mhPortalListWin *this, PORTAL_INFO Info);
char __thiscall mhPortalListWin::Delete(mhPortalListWin *this, unsigned __int16 ID);
void __thiscall mhPortalListWin::mhPortalListWin(mhPortalListWin *this); // idb
mhPortalListWin *__cdecl mhPortalListWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall mhPortalListWin::Create(mhPortalListWin *this, PgFrameWork *pkFrameWork);
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *_Node, bool _Leftish); // idb
mhPortalListWin *__thiscall mhPortalListWin::`vector deleting destructor'(mhPortalListWin *this, unsigned int a2);
void __thiscall mhRepairObjWin::mhRepairObjWin(mhRepairObjWin *this); // idb
void __thiscall mhRepairObjWin::~mhRepairObjWin(mhRepairObjWin *this); // idb
void __thiscall mhRepairObjWin::UpdateTime(mhRepairObjWin *this, unsigned int tCount); // idb
void __thiscall mhRepairObjWin::SetRepairObjID(mhRepairObjWin *this, unsigned __int16 ID); // idb
void __thiscall mhRepairObjWin::SetRepairKitSlot(mhRepairObjWin *this, char bySlot); // idb
void __thiscall mhRepairObjWin::OnClose(mhRepairObjWin *this); // idb
void __thiscall mhRepairObjWin::RepairEnd(mhRepairObjWin *this); // idb
// tm *__usercall localtime_3@<eax>(const int *_Time@<eax>); idb
// int __usercall mktime_4@<eax>(tm *_Tm@<eax>); idb
void __thiscall mhRepairObjWin::UpdateMeWin(mhRepairObjWin *this, float fCurTime); // idb
void __thiscall mhRepairObjWin::SetServerTime(mhRepairObjWin *this, int *pkKQ_Time); // idb
char __thiscall mhRepairObjWin::Create(mhRepairObjWin *this, PgFrameWork *pkFrameWork);
void __thiscall mhRepairObjWin::DoRepair(mhRepairObjWin *this); // idb
void __thiscall mhRepairObjWin::OnShowWin(mhRepairObjWin *this); // idb
void __thiscall mhRepairObjWin::GetRepairInfos(mhRepairObjWin *this, Item *pkItem, Item *pkKit, ItemInfo *pkItemInfo, ItemInfo *pkItemKit, ChargedItemEffect *pkChargedKit, MiniHouseFurniture *pkItemFurInfo, MiniHouseEndure *pkItemEndure); // idb
void __thiscall mhRepairObjWin::OnCommand(mhRepairObjWin *this, unsigned int wParam, int lParam); // idb
mhRepairObjWin *__cdecl mhRepairObjWin::CreateWin(PgFrameWork *pkFrameWork); // idb
mhRepairObjWin *__thiscall mhRepairObjWin::`vector deleting destructor'(mhRepairObjWin *this, unsigned int a2);
void mhSettingWin::OnHelpLink();
void __thiscall mhSettingWin::UpdateMeWin(mhSettingWin *this, float fCurTime); // idb
void __thiscall mhSettingWin::OnChangeTab(mhSettingWin *this, DirectUserMsgBody_MHInfoTabChanged::TabEnum eTab); // idb
void __thiscall mhSettingWin::OnCommand(mhSettingWin *this, unsigned int wParam, int lParam); // idb
void __thiscall mhSettingWin::OnShowWin(mhSettingWin *this); // idb
void __thiscall mhSettingWin::OnClose(mhSettingWin *this); // idb
void __thiscall mhSettingWin::mhSettingWin(mhSettingWin *this); // idb
void __thiscall mhSettingWin::~mhSettingWin(mhSettingWin *this); // idb
mhSettingWin *__cdecl mhSettingWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall mhSettingWin::Create(mhSettingWin *this, PgFrameWork *pkFrameWork);
void __thiscall mhSettingWin::CheckEnable(mhSettingWin *this, mhSettingWin::CheckBoxIndex eIndex, int bEnable, int bShow);
mhSettingWin *__thiscall mhSettingWin::`scalar deleting destructor'(mhSettingWin *this, unsigned int a2);
int (__thiscall ***__cdecl ChargedItemList::GetList())(void *p, char);
void __cdecl ChargedItemList::Clear(); // idb
bool __cdecl ChargedItemList::IsActiveChargedTimeLimitItem(Item *pkItem); // idb
void __cdecl ChargedItemList::AddUsingItem(PROTO_CHARGEDBUFF_INFO *pkInfo); // idb
void __cdecl ChargedItemList::DelUsingItem(unsigned int ChargedBuffKey); // idb
int __cdecl ChargedItemList::GetTimeLimitMiniHouseInvenCount();
int __cdecl ChargedItemList::GetTimeLimitMiniHouseEquipCount();
Item *__cdecl ChargedItemList::GetTimeLimitMiniHouseInven(unsigned int uiIndex); // idb
Item *__cdecl ChargedItemList::GetTimeLimitMiniHouseEquip(unsigned int uiIndex); // idb
int __cdecl ChargedItemList::GetTimeLimitCharInvenCount();
int __cdecl ChargedItemList::GetTimeLimitCharEquipCount();
int __cdecl ChargedItemList::GetTimeLimitCharItemCount();
Item *__cdecl ChargedItemList::GetTimeLimitCharInven(unsigned int uiIndex); // idb
Item *__cdecl ChargedItemList::GetTimeLimitCharEquip(unsigned int uiIndex); // idb
Item *__cdecl ChargedItemList::GetTimeLimitCharItem(unsigned int uiIndex); // idb
char __cdecl ChargedItemList::IsEffecting(EffectEnumerate eEffect);
bool __cdecl ChargedItemList::GetTotalEffectingValue(EffectEnumerate eEffect, unsigned int *rdwTotalEffectValue); // idb
int __cdecl ChargedItemList::GetTimeLimitMiniHouseItemCount();
Item *__cdecl ChargedItemList::GetTimeLimitMiniHouseItem(unsigned int uiIndex); // idb
int __cdecl ChargedItemList::GetTimeLimitItemCount();
const char *__cdecl ChargedItemList::GetEffectID(EffectEnumerate eEffect); // idb
void __thiscall NiTListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *>::~NiTListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *>(NiTListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *> *this); // idb
NiTListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *> *__thiscall NiTListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *>::`scalar deleting destructor'(NiTListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *> *this, unsigned int a2);
NiTPointerListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *> *__thiscall NiTList<PROTO_CHARGEDBUFF_INFO *>::`scalar deleting destructor'(NiTPointerListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *> *this, unsigned int a2);
void __thiscall Net::Net(Net *this); // idb
void __thiscall Net::~Net(Net *this); // idb
char __thiscall Net::Connect(Net *this);
char __thiscall Net::Connect(Net *this, int a1, int a2, int a3, int a4, int port);
void __thiscall Net::Update(Net *this, float fTime); // idb
void __thiscall Net::EnableHeartBeat(Net *this, bool b); // idb
void __thiscall Net::NcMiscGameTimeReq(Net *this); // idb
void __thiscall Net::ChangeSeed(Net *this, unsigned __int16 wSeed); // idb
bool __thiscall Net::IsPingTimeOver(Net *this); // idb
void __thiscall Net::NcMiscHeartbeatAck(Net *this); // idb
char __stdcall Net::On_NC_MISC_GAMETIME_ACK(int iRevBytes, void *pvData);
char __thiscall Net::On_NC_MISC_HEARTBEAT_REQ(Net *this, int iRevBytes, void *pvData);
char __stdcall Net::On_NC_MISC_APEX_SERVER_DATA_CMD(int iRevBytes, void *pvData);
void __thiscall NetMgr::SendHeartBeat2WorldMgrServer(NetMgr *this); // idb
void __thiscall NetMgr::SendNetMsgWorldMgr(NetMgr *this, unsigned __int16 department, unsigned __int16 command, void *pProto, int nDataLength); // idb
char __thiscall Net::ProcessNetMsg(Net *this, int iDepart, int iCommand, int iRevBytes, void *pvData);
void __thiscall NetMgr::~NetMgr(NetMgr *this); // idb
char __thiscall NetMgr::Init(NetMgr *this);
void __thiscall NetMgr::Terminate(NetMgr *this); // idb
void __thiscall NetMgr::Update(NetMgr *this, float fCurTime); // idb
void __thiscall NetMgr::CloseAll(NetMgr *this); // idb
void __thiscall NetMgr::SendUserLogOutMsg2WorldMgrServerForCharSelect(NetMgr *this); // idb
void __thiscall NetMgr::SendUserLogOutMsg2AllServer(NetMgr *this); // idb
void __thiscall NetMgr::SendNetMsgZoneMgr(NetMgr *this, unsigned __int16 department, unsigned __int16 command, void *pProto, int nDataLength); // idb
Net *__thiscall NetMgr::TryAnotherZone(NetMgr *this, char *pcAddress, int iPort); // idb
void __thiscall NetMgr::NetMgr(NetMgr *this); // idb
void __thiscall PgNet::ChangeSeed(PgNet *this, unsigned __int16 wSeed); // idb
void __thiscall Net::SetName(Net *this, char *pcName); // idb
Net *__thiscall Net::`vector deleting destructor'(Net *this, unsigned int a2);
NetMgr *__thiscall NetMgr::`scalar deleting destructor'(NetMgr *this, unsigned int a2);
ORTable *__thiscall ORTable::ort_GetTableName(ORTable *this);
bool __thiscall OptionReader::or_ExecColumnName(OptionReader *this, ORTokenReader *token);
char __thiscall ORTable::ort_SetTableName(ORTable *this, ORTokenReader *token); // idb
char __thiscall ORTable::ort_ReadColumnHeader(ORTable *this, ORTokenReader *token, TokenArgument *targ); // idb
char __thiscall OptionReader::or_ExecColumnType(OptionReader *this, ORTokenReader *token); // idb
char __thiscall OptionReader::or_ExecTable(OptionReader *this, ORTokenReader *token); // idb
char __thiscall OptionReader::or_Read(OptionReader *this, char *filename); // idb
void __thiscall ORTable::~ORTable(ORTable *this); // idb
void __thiscall OptionReader::~OptionReader(OptionReader *this); // idb
void __thiscall ORTable::ORTable(ORTable *this); // idb
void __thiscall OptionReader::OptionReader(OptionReader *this); // idb
void __thiscall TokenArgument::~TokenArgument(TokenArgument *this); // idb
void __thiscall List<ORRecord>::~List<ORRecord>(List<ORRecord> *this); // idb
ORTable *__thiscall List<ORTable>::l_AllocA(List<ORTable> *this, unsigned __int16 hnd); // idb
ORTable *__thiscall List<ORTable>::l_AllocZ(List<ORTable> *this, unsigned __int16 hnd); // idb
void __thiscall List<ORTable>::~List<ORTable>(List<ORTable> *this); // idb
char __thiscall List<ORRecord>::l_Free(List<ORTable> *this, unsigned __int16 hnd); // idb
char __thiscall List<ORRecord>::l_4AllInList(List<ORTable> *this, ListIteratorDefault<ORTable> *arg); // idb
char __stdcall ListIteratorDefault<ORRecord>::lid_Call(NiGeometry *pkGeometry, NiShader *pkShader);
bool __thiscall ORToken::operator==(ORToken *this, ORToken *nm);
void __thiscall ListArray<ORRecord>::~ListArray<ORRecord>(ListArray<ORRecord> *this); // idb
char __thiscall ListEraser<ORRecord>::lid_Call(ListEraser<ORTable> *this, ORTable *ele, int handle);
void __thiscall ListEraser<ORRecord>::~ListEraser<ORRecord>(ListEraser<ORRecord> *this); // idb
void __thiscall ListEraser<ORTable>::~ListEraser<ORTable>(ListEraser<ORTable> *this); // idb
void __thiscall List<ORRecord>::l_makelist(List<ORRecord> *this, unsigned __int16 size); // idb
void __thiscall List<ORTable>::l_makelist(List<ORTable> *this, unsigned __int16 size); // idb
void __thiscall List<ORRecord>::List<ORRecord>(List<ORRecord> *this, ListArray<ORRecord> *array); // idb
ORRecord *__thiscall OrderArgument::oa_Getrecord(OrderArgument *this); // idb
char __thiscall OrderArgument::lid_Call(OrderArgument *this, ORRecord *ele, unsigned __int16 handle); // idb
char __thiscall ColumnCheckArgument::cca_isfound(ColumnCheckArgument *this); // idb
void *__thiscall TargetColumnFindArgument::rcfa_Getcontent(TargetColumnFindArgument *this); // idb
ORRecord *__thiscall RecordDataCompareArgument::rdca_Getrecord(RecordDataCompareArgument *this); // idb
ORTable *__thiscall TableNameCompareArgument::tnca_Gettable(TableNameCompareArgument *this); // idb
ORToken *__thiscall ORColumnHeader::orch_GetColumnName(ORColumnHeader *this); // idb
int __thiscall ORColumnHeader::orch_GetLength(ORColumnHeader *this); // idb
int __thiscall ORColumnHeader::ortr_SetLength(ORColumnHeader *this, ORTokenReader *token, TokenArgument *targ); // idb
char __thiscall ORColumnHeader::orch_FillCell(ORColumnHeader *this, ORTokenReader *token, ORRecord *datarecord); // idb
int ORColumnHeaderIndex::orch_FieldType();
int __thiscall ORColumnHeaderString::ortr_SetLength(ORColumnHeaderString *this, ORTokenReader *token, TokenArgument *targ); // idb
int ORColumnHeaderString::orch_FieldType();
int ORColumnHeaderByte::orch_FieldType();
int ORColumnHeaderWord::orch_FieldType();
int ORColumnHeaderDwrd::orch_FieldType();
void __thiscall ORColumnHeaderList::ORColumnHeaderList(ORColumnHeaderList *this); // idb
char __thiscall ORColumnHeaderList::orchl_4AllInList(ORColumnHeaderList *this, ListIteratorDefault<ORColumnHeader> *arg); // idb
char *__thiscall ORTable::ort_RecordBuffer(ORTable *this, char *key);
int __thiscall RecordNumber::rn_Getnum(RecordNumber *this); // idb
void __thiscall MakePrimaryKeyColumn::MakePrimaryKeyColumn(MakePrimaryKeyColumn *this, ORToken *column, ORRecord *rec, ORKeyList *keylist); // idb
void __thiscall MakePrimaryKeyColumn::~MakePrimaryKeyColumn(MakePrimaryKeyColumn *this); // idb
char __thiscall MakePrimaryKeyColumn::lid_Call(MakePrimaryKeyColumn *this, ORField *ele, unsigned __int16 handle); // idb
void __thiscall MakePrimaryKey::MakePrimaryKey(MakePrimaryKey *this, char *column, ORKeyList *keylist); // idb
void __thiscall MakePrimaryKey::~MakePrimaryKey(MakePrimaryKey *this); // idb
char __thiscall MakePrimaryKey::lid_Call(MakePrimaryKey *this, ORRecord *ele, unsigned __int16 handle); // idb
void __thiscall OrderArgument::OrderArgument(OrderArgument *this, int targ); // idb
void __thiscall OrderArgument::~OrderArgument(OrderArgument *this); // idb
void __thiscall ColumnNameArgument::ColumnNameArgument(ColumnNameArgument *this, ORTokenReader *token); // idb
void __thiscall ColumnNameArgument::~ColumnNameArgument(ColumnNameArgument *this); // idb
void __thiscall DataRecordArgument::DataRecordArgument(DataRecordArgument *this, ORTokenReader *token, ORRecord *record); // idb
void __thiscall DataRecordArgument::~DataRecordArgument(DataRecordArgument *this); // idb
char __thiscall DataRecordArgument::lid_Call(DataRecordArgument *this, ORColumnHeader *ele, unsigned __int16 handle); // idb
void __thiscall ColumnCheckArgument::ColumnCheckArgument(ColumnCheckArgument *this, ORToken *col, char *content); // idb
void __thiscall ColumnCheckArgument::~ColumnCheckArgument(ColumnCheckArgument *this); // idb
char __thiscall ColumnCheckArgument::lid_Call(ColumnCheckArgument *this, ORField *ele, unsigned __int16 handle); // idb
void __thiscall TargetColumnFindArgument::TargetColumnFindArgument(TargetColumnFindArgument *this, char *target, int *type); // idb
void __thiscall TargetColumnFindArgument::~TargetColumnFindArgument(TargetColumnFindArgument *this); // idb
char __thiscall TargetColumnFindArgument::lid_Call(TargetColumnFindArgument *this, ORField *ele, unsigned __int16 handle); // idb
void __thiscall RecordDataCompareArgument::RecordDataCompareArgument(RecordDataCompareArgument *this, char *col, char *content, int skip); // idb
void __thiscall RecordDataCompareArgument::~RecordDataCompareArgument(RecordDataCompareArgument *this); // idb
char __thiscall RecordDataCompareArgument::lid_Call(RecordDataCompareArgument *this, ORRecord *ele, unsigned __int16 handle); // idb
void __thiscall TableNameCompareArgument::TableNameCompareArgument(TableNameCompareArgument *this, ORToken *tname); // idb
void __thiscall TableNameCompareArgument::~TableNameCompareArgument(TableNameCompareArgument *this); // idb
char __thiscall TableNameCompareArgument::lid_Call(TableNameCompareArgument *this, ORTable *ele, unsigned __int16 handle); // idb
void __thiscall ORColumnHeader::ORColumnHeader(ORColumnHeader *this); // idb
void __thiscall ORColumnHeader::~ORColumnHeader(ORColumnHeader *this); // idb
void __thiscall ORColumnHeader::orch_SetColumnName(ORColumnHeader *this, char *name); // idb
void __thiscall ORColumnHeaderIndex::ORColumnHeaderIndex(ORColumnHeaderIndex *this); // idb
void __thiscall ORColumnHeaderIndex::~ORColumnHeaderIndex(ORColumnHeaderIndex *this); // idb
void __thiscall ORColumnHeaderString::ORColumnHeaderString(ORColumnHeaderString *this); // idb
void __thiscall ORColumnHeaderString::~ORColumnHeaderString(ORColumnHeaderString *this); // idb
void __thiscall ORColumnHeaderByte::ORColumnHeaderByte(ORColumnHeaderByte *this); // idb
void __thiscall ORColumnHeaderByte::~ORColumnHeaderByte(ORColumnHeaderByte *this); // idb
void __thiscall ORColumnHeaderWord::ORColumnHeaderWord(ORColumnHeaderWord *this); // idb
void __thiscall ORColumnHeaderWord::~ORColumnHeaderWord(ORColumnHeaderWord *this); // idb
void __thiscall ORColumnHeaderDwrd::ORColumnHeaderDwrd(ORColumnHeaderDwrd *this); // idb
void __thiscall ORColumnHeaderDwrd::~ORColumnHeaderDwrd(ORColumnHeaderDwrd *this); // idb
ORColumnHeader *__thiscall ORColumnHeaderList::orchl_AllocObject(ORColumnHeaderList *this, unsigned __int16 *hnd, unsigned __int16 type); // idb
char __thiscall ORColumnHeaderList::orchl_FreeObject(ORColumnHeaderList *this, unsigned __int16 hnd, unsigned __int16 type); // idb
bool __thiscall ORTable::ort_MakePrimaryKey(ORTable *this, char *column);
char __thiscall ORTable::ort_ReadColumnName(ORTable *this, ORTokenReader *token); // idb
void *__thiscall ORRecord::orr_GetFieldData(ORRecord *this, char *targetcolumn, int *type); // idb
ORRecord *__thiscall ORTable::ort_FindData(ORTable *this, char *column, char *key, int *type);
void *__thiscall ORTable::ort_FindData(ORTable *this, char *column, char *content, char *targetcolumn, int skip, int *type); // idb
char *__thiscall ORTable::ort_RecordBuffer(ORTable *this, int order);
char *__thiscall ORTable::ort_RecordBuffer(ORTable *this, char *column, char *content, int skip);
char *__thiscall OptionReader::or_SelectFrom(OptionReader *this, ORToken table, char *key);
char *__thiscall OptionReader::or_SelectFromOrder(OptionReader *this, ORToken table, int order);
void *__thiscall OptionReader::or_Select(OptionReader *this, char *targetcolumn, ORToken table, char *key, int *type); // idb
char *__thiscall OptionReader::or_SelectFrom(OptionReader *this, ORToken table, char *column, char *content, int skip);
void *__thiscall OptionReader::or_Select(OptionReader *this, char *targetcolumn, ORToken table, char *column, char *content, int skip, int *type); // idb
bool __thiscall OptionReader::or_MakePrimaryKey(OptionReader *this, ORToken table, char *column);
int __thiscall OptionReader::or_SelectCount(OptionReader *this); // idb
void __thiscall RecordNumber::RecordNumber(RecordNumber *this, char *col, char *cnt); // idb
void __thiscall RecordNumber::~RecordNumber(RecordNumber *this); // idb
char __thiscall RecordNumber::lid_Call(RecordNumber *this, ORRecord *ele, unsigned __int16 handle); // idb
int __thiscall ORTable::ort_RecordNum(ORTable *this, char *column, char *content); // idb
int __thiscall ORTable::ort_RecordNum(ORTable *this); // idb
char __thiscall ColumnNameArgument::lid_Call(ColumnNameArgument *this, ORColumnHeader *ele, unsigned __int16 handle); // idb
void __thiscall ORColumnHeaderList::~ORColumnHeaderList(ORColumnHeaderList *this); // idb
char __thiscall ORTable::ort_ReadData(ORTable *this, ORTokenReader *token); // idb
char __thiscall OptionReader::or_ExecRecordIn(OptionReader *this, ORTokenReader *token); // idb
bool __thiscall OptionReader::or_ExecRecord(OptionReader *this, ORTokenReader *token);
char *__thiscall OptionReader::or_SelectFrom(OptionReader *this, ORToken table, int key);
void *__thiscall OptionReader::or_Select(OptionReader *this, char *targetcolumn, ORToken table, int key, int *type); // idb
char *__thiscall OptionReader::or_SelectFrom(OptionReader *this, ORToken table, char *column, int content, int skip);
void *__thiscall OptionReader::or_Select(OptionReader *this, char *targetcolumn, ORToken table, char *column, int content, int skip, int *type); // idb
int __thiscall OptionReader::or_SelectCountFrom(OptionReader *this, ORToken table); // idb
int __thiscall OptionReader::or_SelectCountFrom(OptionReader *this, ORToken table, char *column, char *content); // idb
int __thiscall OptionReader::or_SelectCountFrom(OptionReader *this, ORToken table, char *column, int content); // idb
char __thiscall List<ORRecord>::l_Enlargement(List<ORRecord> *this, int extsize); // idb
void __thiscall ORKeyList::~ORKeyList(ORKeyList *this); // idb
void __thiscall ORKeyList::okl_AddKey(ORKeyList *this, ORToken *field, ORRecord *rec); // idb
int __cdecl ORKeyList::okl_KeyCompare(const void *a, const void *b); // idb
void __thiscall ORKeyList::ORKeyList(ORKeyList *this); // idb
char __thiscall ORKeyList::okl_Sorting(ORKeyList *this); // idb
ORRecord *__thiscall ORKeyList::okl_Searching(ORKeyList *this, char *index); // idb
void __thiscall ORField::ORField(ORField *this); // idb
void __thiscall ORField::~ORField(ORField *this); // idb
ORToken *__thiscall ORField::orf_ColumnName(ORField *this); // idb
void __thiscall ORField::orf_SetColumnHead(ORField *this, ORColumnHeader *hd); // idb
void __thiscall ORFieldIndex::ORFieldIndex(ORFieldIndex *this); // idb
void __thiscall ORFieldIndex::~ORFieldIndex(ORFieldIndex *this); // idb
int __thiscall ORFieldIndex::orf_Alloc(ORFieldIndex *this, char *pnt); // idb
ORToken *__thiscall ORFieldIndex::orf_GetBuffer(ORFieldIndex *this);
int ORFieldIndex::orf_GetType();
void __thiscall ORFieldString::ORFieldString(ORFieldString *this); // idb
void __thiscall ORFieldString::~ORFieldString(ORFieldString *this); // idb
int __thiscall ORFieldString::orf_Alloc(ORFieldString *this, char *pnt); // idb
bool __thiscall ORFieldString::orf_CompareContent(ORFieldString *this, char *contentstring, ORToken *contentindex);
char *__thiscall ORFieldString::orf_GetBuffer(ORFieldString *this);
int ORFieldString::orf_GetType();
void __thiscall ORFieldByte::ORFieldByte(ORFieldByte *this); // idb
void __thiscall ORFieldByte::~ORFieldByte(ORFieldByte *this); // idb
int __thiscall ORFieldByte::orf_Alloc(ORFieldByte *this, char *pnt); // idb
char __thiscall ORFieldByte::orf_Read(ORFieldByte *this, ORTokenReader *token); // idb
bool __thiscall ORFieldByte::orf_CompareContent(ORFieldByte *this, char *contentstring, ORToken *contentindex);
char *__thiscall ORFieldByte::orf_GetBuffer(ORFieldByte *this);
int ORFieldByte::orf_GetType();
void __thiscall ORFieldWord::ORFieldWord(ORFieldWord *this); // idb
void __thiscall ORFieldWord::~ORFieldWord(ORFieldWord *this); // idb
int __thiscall ORFieldWord::orf_Alloc(ORFieldWord *this, char *pnt); // idb
char __thiscall ORFieldWord::orf_Read(ORFieldWord *this, ORTokenReader *token); // idb
bool __thiscall ORFieldWord::orf_CompareContent(ORFieldWord *this, char *contentstring, ORToken *contentindex);
unsigned __int16 *__thiscall ORFieldWord::orf_GetBuffer(ORFieldWord *this);
int ORFieldWord::orf_GetType();
void __thiscall ORFieldDwrd::ORFieldDwrd(ORFieldDwrd *this); // idb
void __thiscall ORFieldDwrd::~ORFieldDwrd(ORFieldDwrd *this); // idb
int __thiscall ORFieldDwrd::orf_Alloc(ORFieldDwrd *this, char *pnt); // idb
char __thiscall ORFieldDwrd::orf_Read(ORFieldDwrd *this, ORTokenReader *token); // idb
bool __thiscall ORFieldDwrd::orf_CompareContent(ORFieldDwrd *this, char *contentstring, ORToken *contentindex);
unsigned int *__thiscall ORFieldDwrd::orf_GetBuffer(ORFieldDwrd *this);
int ORFieldDwrd::orf_GetType();
void __thiscall ORRecord::ORRecord(ORRecord *this); // idb
void __thiscall ORRecord::l_Clone(ORRecord *this, ORRecord *rec); // idb
char *__thiscall ORRecord::orr_GetBuffer(ORRecord *this);
void __thiscall ORRecord::orr_MakeBuffer(ORRecord *this, int recorelength); // idb
void __thiscall ORRecord::orr_AllocMemory(ORRecord *this, ORField *cell); // idb
ORField *__thiscall ORRecord::orr_AllocObject(ORRecord *this, unsigned __int16 *hnd, unsigned __int16 type); // idb
char __thiscall ORRecord::orr_FreeObject(ORRecord *this, unsigned __int16 hnd, unsigned __int16 type); // idb
char __thiscall ORRecord::orr_4AllInList(ORRecord *this, ListIteratorDefault<ORField> *arg); // idb
char __thiscall ORFieldIndex::orf_Read(ORFieldIndex *this, ORTokenReader *token); // idb
bool __thiscall ORFieldIndex::orf_CompareContent(ORFieldIndex *this, char *contentstring, ORToken *contentindex);
char __thiscall ORFieldString::orf_Read(ORFieldString *this, ORTokenReader *token); // idb
void __thiscall ORRecord::~ORRecord(ORRecord *this); // idb
ORToken *__thiscall ORToken::ort_ToLower(ORToken *this); // idb
void __thiscall ORLinebuffer::ORLinebuffer(ORLinebuffer *this, _iobuf *fp); // idb
char __thiscall ORLinebuffer::orlb_Lineread(ORLinebuffer *this); // idb
void __thiscall ORLinebuffer::orlb_Clear(ORLinebuffer *this); // idb
void __thiscall ORLinebuffer::orlb_FunGetc(ORLinebuffer *this); // idb
int __thiscall ORLinebuffer::orlb_FGetc(ORLinebuffer *this); // idb
void __thiscall ORDelimiter::ORDelimiter(ORDelimiter *this); // idb
void __thiscall ORDelimiter::~ORDelimiter(ORDelimiter *this); // idb
char __thiscall ORDelimiter::operator[](ORDelimiter *this, int chr); // idb
void __thiscall ORIgnore::ORIgnore(ORIgnore *this); // idb
void __thiscall ORIgnore::~ORIgnore(ORIgnore *this); // idb
char __thiscall ORIgnore::operator[](ORIgnore *this, int chr); // idb
void __thiscall ORExchange::ORExchange(ORExchange *this); // idb
void __thiscall ORExchange::~ORExchange(ORExchange *this); // idb
int __thiscall ORExchange::operator[](ORExchange *this, int chr); // idb
void __thiscall ORComment::ORComment(ORComment *this); // idb
void __thiscall ORComment::~ORComment(ORComment *this); // idb
bool __thiscall ORComment::operator[](ORComment *this, int chr);
void __thiscall ORBrace::ORBrace(ORBrace *this); // idb
void __thiscall ORBrace::~ORBrace(ORBrace *this); // idb
bool __thiscall ORBrace::orb_IsOpen(ORBrace *this, int chr);
bool __thiscall ORBrace::orb_IsClose(ORBrace *this, int chr);
void __thiscall ORErrorMessage::~ORErrorMessage(ORErrorMessage *this); // idb
void __thiscall ORErrorMessage::orem_Clear(ORErrorMessage *this); // idb
void __thiscall ORErrorMessage::operator=(ORErrorMessage *this, char *msg); // idb
void __thiscall ORErrorMessage::orem_NextLine(ORErrorMessage *this); // idb
int __thiscall ORErrorMessage::orem_GetLine(ORErrorMessage *this); // idb
char *__thiscall ORErrorMessage::orem_GetMessage(ORErrorMessage *this); // idb
void __thiscall ORTokenReader::ORTokenReader(ORTokenReader *this, _iobuf *fp, TokenArgument *argument); // idb
void __thiscall ORTokenReader::~ORTokenReader(ORTokenReader *this); // idb
int __thiscall ORTokenReader::ortr_SkipBlank(ORTokenReader *this); // idb
void __thiscall ORTokenReader::ortr_SetError(ORTokenReader *this, char *err); // idb
int __thiscall ORTokenReader::ortr_ReadNumber8(ORTokenReader *this, char *result); // idb
int __thiscall ORTokenReader::ortr_ReadNumber10(ORTokenReader *this, char *result); // idb
int __thiscall ORTokenReader::ortr_ReadNumber16(ORTokenReader *this, char *result); // idb
int __thiscall ORTokenReader::ortr_GetOctal(ORTokenReader *this); // idb
int __thiscall ORTokenReader::ortr_GetDigit(ORTokenReader *this); // idb
int __thiscall ORTokenReader::ortr_GetHexa(ORTokenReader *this); // idb
int __thiscall ORTokenReader::ortr_ReadNumber(ORTokenReader *this, char *result); // idb
char __thiscall ORTokenReader::ortr_isEOL(ORTokenReader *this); // idb
int __thiscall ORTokenReader::ortr_ReadChar(ORTokenReader *this); // idb
char *__thiscall ORTokenReader::ortr_ReadString(ORTokenReader *this); // idb
char *__thiscall ORToken::ort_GetString(ORToken *this, char *buf); // idb
char __thiscall ORDelimiter::ord_Exec(ORDelimiter *this, ORTokenReader *token); // idb
char __thiscall ORIgnore::ori_Exec(ORIgnore *this, ORTokenReader *token); // idb
char __thiscall ORExchange::ore_Exec(ORExchange *this, ORTokenReader *token); // idb
char __thiscall ORComment::orc_Exec(ORComment *this, ORTokenReader *token); // idb
char __thiscall ORBrace::orb_Exec(ORBrace *this, ORTokenReader *token); // idb
void __thiscall ORErrorMessage::ORErrorMessage(ORErrorMessage *this); // idb
ORToken *__thiscall ORTokenReader::ortr_ReadCommand(ORTokenReader *this, ORToken *com); // idb
void __thiscall WeddingEntryWin::WeddingEntryWin(WeddingEntryWin *this); // idb
void __thiscall WeddingEntryWin::~WeddingEntryWin(WeddingEntryWin *this); // idb
void __thiscall WeddingEntryWin::OnCmdGetIn(WeddingEntryWin *this); // idb
void __thiscall WeddingEntryWin::OnCommand(WeddingEntryWin *this, unsigned int wParam, int lParam); // idb
char __thiscall WeddingEntryWin::Create(WeddingEntryWin *this, PgFrameWork *pkFrameWork);
void __thiscall WeddingEntryWin::SetWeddingEntryData(WeddingEntryWin *this, PROTO_NC_ACT_WEDDING_HALL_GUEST_ENTER_READY_ACK *pkProto); // idb
WeddingEntryWin *__cdecl WeddingEntryWin::CreateWin(PgFrameWork *pkFrameWork); // idb
WeddingEntryWin *__thiscall WeddingEntryWin::`scalar deleting destructor'(WeddingEntryWin *this, unsigned int a2);
void __thiscall WeddingInfoWin::WeddingInfoWin(WeddingInfoWin *this); // idb
void __thiscall WeddingInfoWin::~WeddingInfoWin(WeddingInfoWin *this); // idb
void WeddingInfoWin::OnShowWin();
void WeddingInfoWin::OnHelpLink();
void __thiscall WeddingInfoWin::OnChangeTab(WeddingInfoWin *this, DirectUserMsgBody_CommunityTabChanged::TabEnum eTab); // idb
void __thiscall WeddingInfoWin::UpdateMeWin(WeddingInfoWin *this, float fCurTime); // idb
void __thiscall WeddingInfoWin::OnWinClose(WeddingInfoWin *this); // idb
void __thiscall WeddingInfoWin::DeleteWedInfo(WeddingInfoWin *this, Name5 *PartnerName); // idb
char __thiscall WeddingInfoWin::Create(WeddingInfoWin *this, PgFrameWork *pkFrameWork);
void __thiscall WeddingInfoWin::OnCommand(WeddingInfoWin *this, unsigned int wParam, int lParam); // idb
void __thiscall WeddingInfoWin::SetWeddingInfo(WeddingInfoWin *this, PROTO_NC_CHAR_WEDDING_PARTNER_INFO_ACK *pkProto); // idb
void __thiscall WeddingInfoWin::SetWeddingInfo(WeddingInfoWin *this); // idb
void __thiscall WeddingInfoWin::ChangeUserName(WeddingInfoWin *this, Name5 *OldName, Name5 *NewName); // idb
WeddingInfoWin *__cdecl WeddingInfoWin::CreateWin(PgFrameWork *pkFrameWork); // idb
WeddingInfoWin *__thiscall WeddingInfoWin::`scalar deleting destructor'(WeddingInfoWin *this, unsigned int a2);
void WeddingProposeInputWin::OnHelpLink();
void __thiscall WeddingProposeInputWin::OnShowWin(WeddingProposeInputWin *this); // idb
void __thiscall WeddingProposeInputWin::WeddingProposeInputWin(WeddingProposeInputWin *this); // idb
void __thiscall WeddingProposeInputWin::~WeddingProposeInputWin(WeddingProposeInputWin *this); // idb
char __thiscall WeddingProposeInputWin::Create(WeddingProposeInputWin *this, PgFrameWork *pkFrameWork);
void __thiscall WeddingProposeInputWin::OnCmdOk(WeddingProposeInputWin *this); // idb
void __thiscall WeddingProposeInputWin::OnCommand(WeddingProposeInputWin *this, unsigned int wParam, int lParam); // idb
WeddingProposeInputWin *__cdecl WeddingProposeInputWin::CreateWin(PgFrameWork *pkFrameWork); // idb
WeddingProposeInputWin *__thiscall WeddingProposeInputWin::`scalar deleting destructor'(WeddingProposeInputWin *this, unsigned int a2);
void WeddingProposeOutputWin::OnHelpLink();
void __thiscall WeddingProposeOutputWin::OnCmdAgree(WeddingProposeOutputWin *this); // idb
void __thiscall WeddingProposeOutputWin::OnCmdRefusal(WeddingProposeOutputWin *this); // idb
void __thiscall WeddingProposeOutputWin::WeddingProposeOutputWin(WeddingProposeOutputWin *this); // idb
void __thiscall WeddingProposeOutputWin::~WeddingProposeOutputWin(WeddingProposeOutputWin *this); // idb
char __thiscall WeddingProposeOutputWin::Create(WeddingProposeOutputWin *this, PgFrameWork *pkFrameWork);
void __thiscall WeddingProposeOutputWin::OnCommand(WeddingProposeOutputWin *this, unsigned int wParam, int lParam); // idb
void __thiscall WeddingProposeOutputWin::SetProposeData(WeddingProposeOutputWin *this, PROTO_NC_ACT_WEDDING_PROPOSEACK_REQ *pkProto); // idb
WeddingProposeOutputWin *__cdecl WeddingProposeOutputWin::CreateWin(PgFrameWork *pkFrameWork); // idb
WeddingProposeOutputWin *__thiscall WeddingProposeOutputWin::`vector deleting destructor'(WeddingProposeOutputWin *this, unsigned int a2);
void WeddingProposeResultWin::OnHelpLink();
void __thiscall WeddingProposeResultWin::OnCommand(WeddingProposeResultWin *this, unsigned int wParam, int lParam); // idb
void __thiscall WeddingProposeResultWin::WeddingProposeResultWin(WeddingProposeResultWin *this); // idb
void __thiscall WeddingProposeResultWin::~WeddingProposeResultWin(WeddingProposeResultWin *this); // idb
char __thiscall WeddingProposeResultWin::Create(WeddingProposeResultWin *this, PgFrameWork *pkFrameWork);
void __thiscall WeddingProposeResultWin::SetProposeResult(WeddingProposeResultWin *this, PROTO_NC_ACT_WEDDING_PROPOSEREQ_ACK *pkProto, bool bYes); // idb
WeddingProposeResultWin *__cdecl WeddingProposeResultWin::CreateWin(PgFrameWork *pkFrameWork); // idb
WeddingProposeResultWin *__thiscall WeddingProposeResultWin::`vector deleting destructor'(WeddingProposeResultWin *this, unsigned int a2);
void __thiscall WeddingTask::OnStart(WeddingTask *this); // idb
void __thiscall WeddingTask::DirectMessage(WeddingTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
int __thiscall WeddingTask::Recv_NC_ACT_WEDDING_PROPOSE_WORD_REQ(WeddingTask *this); // idb
int __thiscall WeddingTask::Recv_NC_ACT_WEDDING_PROPOSEACK_REQ(WeddingTask *this, PROTO_NC_ACT_WEDDING_PROPOSEACK_REQ *pkProto); // idb
int __stdcall WeddingTask::Recv_NC_ACT_WEDDING_SOMEONE(PROTO_NC_ACT_WEDDING_SOMEONE *pkProto);
WeddingProposeInputWin *__cdecl WeddingTask::GetWeddingProposeInputWin(); // idb
CLIENT_MARRYINFO *__cdecl WeddingTask::GetMarryInfo(); // idb
int __thiscall WeddingTask::Recv_NC_ACT_WEDDING_PROPOSEREQ_ACK(WeddingTask *this, PROTO_NC_ACT_WEDDING_PROPOSEREQ_ACK *pkProto); // idb
int __thiscall WeddingTask::Recv_NC_ACT_WEDDING_HALL_GUEST_ENTER_ACK(WeddingTask *this, PROTO_NC_ACT_WEDDING_HALL_GUEST_ENTER_ACK *pkProto); // idb
int __stdcall WeddingTask::Recv_NC_CHAR_WEDDING_PARTNER_INFO_ACK(PROTO_NC_CHAR_WEDDING_PARTNER_INFO_ACK *pkProto);
void __cdecl WeddingTask::Terminate(); // idb
int __thiscall WeddingTask::Recv_NC_ACT_WEDDING_HALL_RESERV_ACK(WeddingTask *this, PROTO_NC_ACT_WEDDING_HALL_RESERV_ACK *pkProto); // idb
int __thiscall WeddingTask::Recv_NC_ACT_WEDDING_HALL_GUEST_ENTER_READY_ACK(WeddingTask *this, PROTO_NC_ACT_WEDDING_HALL_GUEST_ENTER_READY_ACK *pkProto); // idb
int __thiscall WeddingTask::Recv_NC_ACT_WEDDING_DIVORCE_REQ_ACK(WeddingTask *this, PROTO_ERRORCODE *pkProto); // idb
void __thiscall WeddingTask::~WeddingTask(WeddingTask *this); // idb
char __thiscall WeddingTask::OnProcessNetMsg(WeddingTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData);
void __thiscall WeddingTask::WeddingTask(WeddingTask *this); // idb
void __cdecl WeddingTask::Create(IDirectMessenger *pkMsgHooker); // idb
WeddingTask *__thiscall WeddingTask::`scalar deleting destructor'(WeddingTask *this, unsigned int a2);
bool __thiscall DirectionControllers::IsRunDirection(DirectionControllers *this); // idb
void __thiscall DirectionController::Update(DirectionController *this, float fAccolTime); // idb
char __thiscall DirectionController::IsRuntimer(DirectionController *this);
char __thiscall DirectionController::RunTimer(DirectionController *this);
void __thiscall DirectionControllers::Update(DirectionControllers *this, float fAccolTime); // idb
char __thiscall DirectionControllers::DoRunDirection(DirectionControllers *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *rStrName);
char __thiscall DirectionController::AddTimer(DirectionController *this, NiPointer<TimerController> spTimer);
char __thiscall DirectionControllers::AddController(DirectionControllers *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *rStrName, NiPointer<DirectionController> spController);
NiPointer<DirectionControllers> *__cdecl CreateMetamorphosisDirection(NiPointer<DirectionControllers> *result, Char *pChar); // idb
boost::detail::function::unusable *__cdecl boost::detail::function::void_function_obj_invoker1<boost::_bi::bind_t<bool,boost::_mfi::mf1<bool,Char,char const *>,boost::_bi::list2<boost::_bi::value<Char *>,boost::arg<1>>>,void,char const *>::invoke(boost::detail::function::unusable *result, boost::detail::function::any_pointer function_obj_ptr, const char *a0); // idb
void __thiscall boost::function1<void,char const *,std::allocator<void>>::assign_to<boost::_bi::bind_t<bool,boost::_mfi::mf1<bool,Char,char const *>,boost::_bi::list2<boost::_bi::value<Char *>,boost::arg<1>>>>(boost::function1<void,char const *,std::allocator<void> > *this, boost::_bi::bind_t<bool,boost::_mfi::mf1<bool,Char,char const *>,boost::_bi::list2<boost::_bi::value<Char *>,boost::arg<1> > > f); // idb
std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<DirectionController> > *__cdecl std::make_pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController> &>(std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<DirectionController> > *result, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Val1, NiPointer<DirectionController> *_Val2); // idb
DirectionController *__thiscall DirectionController::`scalar deleting destructor'(DirectionController *this, unsigned int a2);
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<DirectionController> > >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>>>(std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<DirectionController> > >,0> > *this, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<DirectionController> > *_Val); // idb
void __thiscall std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>>::~map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>>(std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > > > *this); // idb
void __thiscall DirectionControllers::DirectionControllers(DirectionControllers *this); // idb
void __thiscall DirectionControllers::~DirectionControllers(DirectionControllers *this); // idb
DirectionControllers *__thiscall DirectionControllers::`scalar deleting destructor'(DirectionControllers *this, unsigned int a2);
int __thiscall TimerController::GetLoopMaxCount(TimerController *this); // idb
void __thiscall TimerController::SetLoopMaxCount(TimerController *this, int val); // idb
int __thiscall TimerController::GetCurRunCount(TimerController *this); // idb
void __thiscall TimerController::SetDelayTime(TimerController *this, float fDelayTime); // idb
double __thiscall TimerController::GetDelayTime(TimerController *this);
bool __thiscall TimerController::OnTimerEnable(TimerController *this, bool bEnable); // idb
bool __thiscall TimerController::IsEnable(TimerController *this); // idb
char __thiscall TimerController::UpdateCheckTime(TimerController *this, float DeltaTime);
void __thiscall TimerController::Update(TimerController *this, float fAccolTime); // idb
void __thiscall TimerController::TimerController(TimerController *this); // idb
void __thiscall TimerController::TimerController(TimerController *this, float fDelayTime); // idb
void __thiscall TimerController::OnTimerMessage(TimerController *this); // idb
void __thiscall TimerController::SetCallBackFunc(TimerController *this, boost::function<void __cdecl(char const *),std::allocator<void> > Func); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall TimerController::GetEventName(TimerController *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result); // idb
void __thiscall TimerController::SetEventName(TimerController *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > val); // idb
TimerController *__thiscall TimerController::`scalar deleting destructor'(TimerController *this, unsigned int a2);
void __thiscall GuildAcademyHallOfFameWin::GuildAcademyHallOfFameWin(GuildAcademyHallOfFameWin *this); // idb
void __thiscall GuildAcademyHallOfFameWin::~GuildAcademyHallOfFameWin(GuildAcademyHallOfFameWin *this); // idb
void __thiscall GuildAcademyHallOfFameWin::OnSortByTitle01(GuildAcademyHallOfFameWin *this); // idb
void __thiscall GuildAcademyHallOfFameWin::OnSortByTitle02(GuildAcademyHallOfFameWin *this); // idb
void __thiscall GuildAcademyHallOfFameWin::OnSortByTitle03(GuildAcademyHallOfFameWin *this); // idb
void __thiscall GuildAcademyHallOfFameWin::OnSortByTitle04(GuildAcademyHallOfFameWin *this); // idb
void __thiscall GuildAcademyHallOfFameWin::OnSortByTitle05(GuildAcademyHallOfFameWin *this); // idb
void GuildAcademyHallOfFameWin::OnHelpLink();
void __thiscall GuildAcademyHallOfFameWin::UpdateMeWin(GuildAcademyHallOfFameWin *this, float fCurTime); // idb
void __thiscall GuildAcademyHallOfFameWin::OnClickWinCloseBtn(GuildAcademyHallOfFameWin *this); // idb
void __thiscall GuildAcademyHallOfFameWin::OnClickOKBtn(GuildAcademyHallOfFameWin *this); // idb
void __thiscall GuildAcademyHallOfFameWin::OnSlideBar(GuildAcademyHallOfFameWin *this); // idb
void __thiscall GuildAcademyHallOfFameWin::OnCommand(GuildAcademyHallOfFameWin *this, unsigned int wParam, int lParam); // idb
void __thiscall GuildAcademyHallOfFameWin::AddListItem_DefInfo(GuildAcademyHallOfFameWin *this, EACH_GRADUATE_DATA *pkData); // idb
void __thiscall GuildAcademyHallOfFameWin::On_Recv_NC_GUILD_ACADEMY_GET_GRADUATE_ACK(GuildAcademyHallOfFameWin *this, PROTO_NC_GUILD_ACADEMY_GET_GRADUATE_ACK *pkProto); // idb
GuildAcademyHallOfFameWin *__cdecl GuildAcademyHallOfFameWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall GuildAcademyHallOfFameWin::Create(GuildAcademyHallOfFameWin *this, PgFrameWork *pkFrameWork);
GuildAcademyHallOfFameWin *__thiscall GuildAcademyHallOfFameWin::`scalar deleting destructor'(GuildAcademyHallOfFameWin *this, unsigned int a2);
void __thiscall GuildAcademyItemRewardInvWin::GuildAcademyItemRewardInvWin(GuildAcademyItemRewardInvWin *this); // idb
void __thiscall GuildAcademyItemRewardInvWin::~GuildAcademyItemRewardInvWin(GuildAcademyItemRewardInvWin *this); // idb
char __thiscall GuildAcademyItemRewardInvWin::Create(GuildAcademyItemRewardInvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent);
void __thiscall GuildAcademyItemRewardInvWin::OnFirstHitWin(GuildAcademyItemRewardInvWin *this); // idb
void __thiscall GuildAcademyItemRewardInvWin::Show(GuildAcademyItemRewardInvWin *this, int b);
bool __thiscall GuildAcademyItemRewardInvWin::IsDisable(GuildAcademyItemRewardInvWin *this); // idb
void __stdcall GuildAcademyItemRewardWin::DirectMessage(int iMsgTag, void *pvBody, IDirectMessenger *pkFrom);
void __thiscall GuildAcademyItemRewardWin::InitializeRewardItem(GuildAcademyItemRewardWin *this); // idb
void __thiscall GuildAcademyItemRewardWin::resetInven(GuildAcademyItemRewardWin *this, unsigned int uiIndex); // idb
void GuildAcademyItemRewardWin::OnClose();
void GuildAcademyItemRewardWin::OnHelpLink();
void __thiscall GuildAcademyItemRewardWin::GuildAcademyItemRewardWin(GuildAcademyItemRewardWin *this); // idb
void __thiscall GuildAcademyItemRewardWin::~GuildAcademyItemRewardWin(GuildAcademyItemRewardWin *this); // idb
void __thiscall GuildAcademyItemRewardWin::SetRewardItem(GuildAcademyItemRewardWin *this, PROTO_NC_GUILD_ACADEMY_GET_REWARD_ITEM_ACK *pAck); // idb
void __thiscall GuildAcademyItemRewardWin::OnClickWinCloseBtn(GuildAcademyItemRewardWin *this); // idb
void __thiscall GuildAcademyItemRewardWin::OnInvLClick(GuildAcademyItemRewardWin *this, unsigned int uiInvIndex); // idb
char __stdcall GuildAcademyItemRewardWin::IsExist(Item *item);
void __thiscall GuildAcademyItemRewardInvWin::DoAction(GuildAcademyItemRewardInvWin *this); // idb
void __thiscall GuildAcademyItemRewardInvWin::DoRAction(GuildAcademyItemRewardInvWin *this); // idb
void __thiscall GuildAcademyItemRewardWin::UpdateAcademyInfo(GuildAcademyItemRewardWin *this); // idb
void __thiscall GuildAcademyItemRewardWin::OnClickInitializeBtn(GuildAcademyItemRewardWin *this); // idb
void __thiscall GuildAcademyItemRewardWin::OnClickGuildAcademyStorageBtn(GuildAcademyItemRewardWin *this); // idb
void __thiscall GuildAcademyItemRewardInvWin::SetDisable(GuildAcademyItemRewardInvWin *this, bool bDisable); // idb
void __thiscall GuildAcademyItemRewardWin::UpdateMeWin(GuildAcademyItemRewardWin *this, float fCurTime); // idb
// char __userpurge GuildAcademyItemRewardWin::DropOnInv@<al>(GuildAcademyItemRewardWin *this@<ecx>, unsigned int a2@<ebx>, DropContents *pkContents, unsigned int uiReceiverInvIndex);
void __thiscall GuildAcademyItemRewardWin::On_GuildAcademyStorage_Cell_Changed(GuildAcademyItemRewardWin *this); // idb
// char __userpurge GuildAcademyItemRewardInvWin::EatDropInstance@<al>(GuildAcademyItemRewardInvWin *this@<ecx>, unsigned int a2@<ebx>, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
GuildAcademyItemRewardInvWin *__cdecl GuildAcademyItemRewardInvWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent); // idb
GuildAcademyItemRewardWin *__cdecl GuildAcademyItemRewardWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall GuildAcademyItemRewardWin::Create(GuildAcademyItemRewardWin *this, PgFrameWork *pkFrameWork);
void __thiscall GuildAcademyItemRewardWin::OnClickApplyBtn(GuildAcademyItemRewardWin *this); // idb
void __thiscall GuildAcademyItemRewardWin::OnCommand(GuildAcademyItemRewardWin *this, unsigned int wParam, int lParam); // idb
GuildAcademyItemRewardInvWin *__thiscall GuildAcademyItemRewardInvWin::`scalar deleting destructor'(GuildAcademyItemRewardInvWin *this, unsigned int a2);
GuildAcademyItemRewardWin *__thiscall GuildAcademyItemRewardWin::`scalar deleting destructor'(GuildAcademyItemRewardWin *this, unsigned int a2);
void __thiscall GuildAcademyMenuWin::GuildAcademyMenuWin(GuildAcademyMenuWin *this); // idb
void __thiscall GuildAcademyMenuWin::~GuildAcademyMenuWin(GuildAcademyMenuWin *this); // idb
void GuildAcademyMenuWin::OnClickJoinBtn();
void GuildAcademyMenuWin::OnClickCheckRankingBtn();
void GuildAcademyMenuWin::OnClickMoneyCompensationBtn();
void GuildAcademyMenuWin::OnClickItemCompensationBtn();
void __thiscall GuildAcademyMenuWin::OnClickPrevMenuBtn(GuildAcademyMenuWin *this); // idb
void GuildAcademyMenuWin::OnHelpLink();
char __thiscall GuildAcademyMenuWin::Create(GuildAcademyMenuWin *this, PgFrameWork *pkFrameWork);
void __thiscall GuildAcademyMenuWin::OnClickHallOfFameBtn(GuildAcademyMenuWin *this); // idb
GuildAcademyMenuWin *__cdecl GuildAcademyMenuWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall GuildAcademyMenuWin::OnClickLeaveBtn(GuildAcademyMenuWin *this); // idb
void __thiscall GuildAcademyMenuWin::OnCommand(GuildAcademyMenuWin *this, unsigned int wParam, int lParam); // idb
GuildAcademyMenuWin *__thiscall GuildAcademyMenuWin::`scalar deleting destructor'(GuildAcademyMenuWin *this, unsigned int a2);
GuildAcademyLeaveTask *__thiscall ISingletonTask<GuildAcademyLeaveTask>::`scalar deleting destructor'(GuildAcademyLeaveTask *this, unsigned int a2);
void __thiscall GuildAcademyMoneyRewardWin::GuildAcademyMoneyRewardWin(GuildAcademyMoneyRewardWin *this); // idb
void __thiscall GuildAcademyMoneyRewardWin::~GuildAcademyMoneyRewardWin(GuildAcademyMoneyRewardWin *this); // idb
void __stdcall GuildAcademyMoneyRewardWin::DirectMessage(int iMsgTag, void *pvBody, IDirectMessenger *pkFrom);
void __thiscall GuildAcademyMoneyRewardWin::InitializeRewardMoney(GuildAcademyMoneyRewardWin *this, PROTO_NC_GUILD_ACADEMY_CLEAR_REWARD_MONEY_ACK *pAck); // idb
void __thiscall GuildAcademyMoneyRewardWin::SetMoneyValue(GuildAcademyMoneyRewardWin *this, int index, __int64 money); // idb
void __thiscall GuildAcademyMoneyRewardWin::SetEnable(GuildAcademyMoneyRewardWin *this, bool b); // idb
void GuildAcademyMoneyRewardWin::OnClose();
void GuildAcademyMoneyRewardWin::OnHelpLink();
void __thiscall GuildAcademyMoneyRewardWin::OnClickWinCloseBtn(GuildAcademyMoneyRewardWin *this); // idb
void __thiscall GuildAcademyMoneyRewardWin::SetRewardMoney(GuildAcademyMoneyRewardWin *this, PROTO_NC_GUILD_ACADEMY_GET_REWARD_MONEY_ACK *pAck); // idb
char __thiscall GuildAcademyMoneyRewardWin::Create(GuildAcademyMoneyRewardWin *this, PgFrameWork *pkFrameWork);
void __thiscall GuildAcademyMoneyRewardWin::OnClickApplyBtn(GuildAcademyMoneyRewardWin *this); // idb
void __thiscall GuildAcademyMoneyRewardWin::OnClickInitializeBtn(GuildAcademyMoneyRewardWin *this); // idb
void __thiscall GuildAcademyMoneyRewardWin::OnClickGuildStorageBtn(GuildAcademyMoneyRewardWin *this); // idb
void __thiscall GuildAcademyMoneyRewardWin::UpdateAcademyInfo(GuildAcademyMoneyRewardWin *this); // idb
void __thiscall GuildAcademyMoneyRewardWin::OnCommand(GuildAcademyMoneyRewardWin *this, unsigned int wParam, int lParam); // idb
void __thiscall GuildAcademyMoneyRewardWin::UpdateMeWin(GuildAcademyMoneyRewardWin *this, float fCurTime); // idb
GuildAcademyMoneyRewardWin *__cdecl GuildAcademyMoneyRewardWin::CreateWin(PgFrameWork *pkFrameWork); // idb
GuildAcademyMoneyRewardWin *__thiscall GuildAcademyMoneyRewardWin::`scalar deleting destructor'(GuildAcademyMoneyRewardWin *this, unsigned int a2);
void __thiscall GuildAcademyNoticeEditorWin::GuildAcademyNoticeEditorWin(GuildAcademyNoticeEditorWin *this); // idb
void __thiscall GuildAcademyNoticeEditorWin::~GuildAcademyNoticeEditorWin(GuildAcademyNoticeEditorWin *this); // idb
void __thiscall GuildAcademyNoticeEditorWin::OnClose(GuildAcademyNoticeEditorWin *this); // idb
void __thiscall GuildAcademyNoticeEditorWin::OnShowWin(GuildAcademyNoticeEditorWin *this); // idb
char __thiscall GuildAcademyNoticeEditorWin::Create(GuildAcademyNoticeEditorWin *this, PgFrameWork *pkFrameWork);
GuildAcademyNoticeEditorWin *__cdecl GuildAcademyNoticeEditorWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall GuildAcademyNoticeEditorWin::OnCommand(GuildAcademyNoticeEditorWin *this, unsigned int wParam, int lParam); // idb
GuildAcademyNoticeEditorWin *__thiscall GuildAcademyNoticeEditorWin::`vector deleting destructor'(GuildAcademyNoticeEditorWin *this, unsigned int a2);
ISingletonTask<GuildAcademyNotifyTask> *__thiscall ISingletonTask<GuildAcademyNotifyTask>::`vector deleting destructor'(ISingletonTask<GuildAcademyNotifyTask> *this, unsigned int a2);
GuildAcademyNotifyTask *__cdecl ISingletonTask<GuildAcademyNotifyTask>::Run(); // idb
GuildAcademyNotifyTask *__thiscall GuildAcademyNotifyTask::`scalar deleting destructor'(GuildAcademyNotifyTask *this, unsigned int a2);
void __thiscall GuildAcademyRankingWin::GuildAcademyRankingWin(GuildAcademyRankingWin *this); // idb
void __thiscall GuildAcademyRankingWin::~GuildAcademyRankingWin(GuildAcademyRankingWin *this); // idb
void __thiscall GuildAcademyRankingWin::OnClickWinCloseBtn(GuildAcademyRankingWin *this); // idb
void __thiscall GuildAcademyRankingWin::OnSortByTitle01(GuildAcademyRankingWin *this); // idb
void __thiscall GuildAcademyRankingWin::OnSortByTitle02(GuildAcademyRankingWin *this); // idb
void __thiscall GuildAcademyRankingWin::OnSortByTitle03(GuildAcademyRankingWin *this); // idb
void __thiscall GuildAcademyRankingWin::OnSortByTitle04(GuildAcademyRankingWin *this); // idb
void GuildAcademyRankingWin::OnClickThisWeekRankingBtn();
void GuildAcademyRankingWin::OnClickLastWeekRankingBtn();
void __thiscall GuildAcademyRankingWin::OnClickOKBtn(GuildAcademyRankingWin *this); // idb
void GuildAcademyRankingWin::OnHelpLink();
// tm *__usercall localtime_4@<eax>(const int *_Time@<eax>); idb
void __thiscall GuildAcademyRankingWin::UpdateMeWin(GuildAcademyRankingWin *this, float fCurTime); // idb
void __thiscall GuildAcademyRankingWin::OnSlideBar(GuildAcademyRankingWin *this); // idb
void __thiscall GuildAcademyRankingWin::AddListItem_DefInfo(GuildAcademyRankingWin *this, GUILD_ACADEMY_EACH_RANKING_DATA *pkData); // idb
void __thiscall GuildAcademyRankingWin::ChangeUserName(GuildAcademyRankingWin *this, Name5 *OldName, Name5 *NewName); // idb
void __thiscall GuildAcademyRankingWin::OnCommand(GuildAcademyRankingWin *this, unsigned int wParam, int lParam); // idb
void __thiscall GuildAcademyRankingWin::On_Recv_NC_GUILD_ACADEMY_GET_RANKING_LIST_ACK(GuildAcademyRankingWin *this, PROTO_NC_GUILD_ACADEMY_GET_RANKING_LIST_ACK *pkProto); // idb
GuildAcademyRankingWin *__cdecl GuildAcademyRankingWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall GuildAcademyRankingWin::Create(GuildAcademyRankingWin *this, PgFrameWork *pkFrameWork);
GuildAcademyRankingWin *__thiscall GuildAcademyRankingWin::`scalar deleting destructor'(GuildAcademyRankingWin *this, unsigned int a2);
void __thiscall GuildAcademySelectWin::OnSortByTitle01(GuildAcademySelectWin *this); // idb
void __thiscall GuildAcademySelectWin::OnSortByTitle02(GuildAcademySelectWin *this); // idb
void __thiscall GuildAcademySelectWin::OnSortByTitle03(GuildAcademySelectWin *this); // idb
void __thiscall GuildAcademySelectWin::OnSortByTitle04(GuildAcademySelectWin *this); // idb
void __thiscall GuildAcademySelectWin::OnSortByTitle05(GuildAcademySelectWin *this); // idb
void GuildAcademySelectWin::OnClickRankingBtn();
void GuildAcademySelectWin::OnHelpLink();
void __thiscall GuildAcademySelectWin::ProcessMeInput(GuildAcademySelectWin *this, bool *bHit); // idb
void __thiscall GuildAcademySelectWin::OnSlideBar(GuildAcademySelectWin *this); // idb
void __thiscall GuildAcademySelectWin::AddListItem_DefInfo(GuildAcademySelectWin *this, SHINE_GUILD_ACADEMY_LIST *pkData); // idb
void __thiscall GuildAcademySelectWin::DirectMessage(GuildAcademySelectWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall GuildAcademySelectWin::OnClickJoinBtn(GuildAcademySelectWin *this); // idb
void __thiscall GuildAcademySelectWin::OnClickHallOfFameBtn(GuildAcademySelectWin *this); // idb
void __thiscall GuildAcademySelectWin::On_Recv_NC_GUILD_ACADEMY_LIST_ACK(GuildAcademySelectWin *this, PROTO_NC_GUILD_ACADEMY_LIST_ACK *pkProto); // idb
void __thiscall GuildAcademySelectWin::AddGuildInfo(GuildAcademySelectWin *this, GuildAcademySelectWin::GuildInfo *kGuildInfo); // idb
void __thiscall GuildAcademySelectWin::UpdateTimer(GuildAcademySelectWin *this, float fTime); // idb
void __thiscall GuildAcademySelectWin::UpdateMeWin(GuildAcademySelectWin *this, float fCurTime); // idb
void __thiscall GuildAcademySelectWin::GuildAcademySelectWin(GuildAcademySelectWin *this); // idb
void __thiscall GuildAcademySelectWin::~GuildAcademySelectWin(GuildAcademySelectWin *this); // idb
GuildAcademySelectWin *__cdecl GuildAcademySelectWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall GuildAcademySelectWin::ClearAcademyList(GuildAcademySelectWin *this); // idb
void __thiscall GuildAcademySelectWin::OnClickWinCloseBtn(GuildAcademySelectWin *this); // idb
void __thiscall GuildAcademySelectWin::ShowAll(GuildAcademySelectWin *this); // idb
void __thiscall GuildAcademySelectWin::SetGuildList(GuildAcademySelectWin *this, SHINE_GUILD_ACADEMY_LIST *pkList); // idb
void __thiscall GuildAcademySelectWin::Sort(GuildAcademySelectWin *this); // idb
char __thiscall GuildAcademySelectWin::Create(GuildAcademySelectWin *this, PgFrameWork *pkFrameWork);
void __thiscall GuildAcademySelectWin::DisplayInfoSetting(GuildAcademySelectWin *this); // idb
void __thiscall GuildAcademySelectWin::OnSearch(GuildAcademySelectWin *this); // idb
void __thiscall GuildAcademySelectWin::OnCommand(GuildAcademySelectWin *this, unsigned int wParam, int lParam); // idb
void __thiscall GuildAcademySelectWin::OnEditEnd(GuildAcademySelectWin *this, unsigned int wParam, int lParam); // idb
void __cdecl ISingletonTask<GuildAcademyJoinReqTask>::Run();
char __stdcall GuildAcademySelectWin::Order::operator()(GuildAcademySelectWin::GuildInfo *GuildInfo2, GuildAcademySelectWin::GuildInfo *GuildInfo);
void __thiscall GuildListWin::GuildInfo::GuildInfo(GuildListWin::GuildInfo *this, GuildListWin::GuildInfo *__that); // idb
void __cdecl std::_Destroy_range<std::allocator<GTRequestListWin::GuildInfo>>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last);
void __cdecl std::swap<GTRequestListWin::GuildInfo>(GuildListWin::GuildInfo *_Left, GuildListWin::GuildInfo *_Right); // idb
void __cdecl std::_Push_heap<GuildAcademySelectWin::GuildInfo *,int,GuildAcademySelectWin::GuildInfo,GuildAcademySelectWin::Order>(GuildAcademySelectWin::GuildInfo *_First, int _Hole, int _Top, GuildAcademySelectWin::GuildInfo *_Val);
GuildListWin::GuildInfo *__cdecl std::_Move_backward<GuildListWin::GuildInfo *,GuildListWin::GuildInfo *>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, GuildListWin::GuildInfo *_Dest);
GuildListWin::GuildInfo *__cdecl std::_Move<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::GuildInfo *>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, GuildListWin::GuildInfo *_Dest);
void __cdecl std::_Med3<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::Order>(GuildAcademySelectWin::GuildInfo *_First, GuildAcademySelectWin::GuildInfo *_Mid, GuildAcademySelectWin::GuildInfo *_Last);
void __cdecl std::_Adjust_heap<GuildAcademySelectWin::GuildInfo *,int,GuildAcademySelectWin::GuildInfo,GuildAcademySelectWin::Order>(GuildAcademySelectWin::GuildInfo *_First, int _Hole, int _Bottom, GuildAcademySelectWin::GuildInfo *_Val);
void __cdecl std::_Median<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::Order>(GuildAcademySelectWin::GuildInfo *_First, GuildAcademySelectWin::GuildInfo *_Mid, GuildAcademySelectWin::GuildInfo *_Last);
void __cdecl std::_Make_heap<GuildAcademySelectWin::GuildInfo *,int,GuildAcademySelectWin::GuildInfo,GuildAcademySelectWin::Order>(GuildAcademySelectWin::GuildInfo *_First, GuildAcademySelectWin::GuildInfo *_Last);
void __cdecl std::_Insertion_sort1<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::Order,GuildAcademySelectWin::GuildInfo>(GuildAcademySelectWin::GuildInfo *_First, GuildAcademySelectWin::GuildInfo *_Last);
void __cdecl std::_Pop_heap_0<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::GuildInfo,GuildAcademySelectWin::Order>(GuildAcademySelectWin::GuildInfo *_First, GuildAcademySelectWin::GuildInfo *_Last);
std::pair<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::GuildInfo *> *__cdecl std::_Unguarded_partition<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::Order>(std::pair<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::GuildInfo *> *result, GuildAcademySelectWin::GuildInfo *_First, GuildAcademySelectWin::GuildInfo *_Last);
void __cdecl std::_Sort_heap<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::Order>(GuildAcademySelectWin::GuildInfo *_First, GuildAcademySelectWin::GuildInfo *_Last);
GuildAcademySelectWin *__thiscall GuildAcademySelectWin::`vector deleting destructor'(GuildAcademySelectWin *this, unsigned int a2);
void __cdecl std::_Sort<GuildAcademySelectWin::GuildInfo *,int,GuildAcademySelectWin::Order>(GuildAcademySelectWin::GuildInfo *_First, GuildAcademySelectWin::GuildInfo *_Last, int _Ideal, GuildAcademySelectWin::Order _Pred); // idb
void __thiscall GuildAcademyStorageTabWin::GuildAcademyStorageTabWin(GuildAcademyStorageTabWin *this); // idb
void __thiscall GuildAcademyStorageTabWin::~GuildAcademyStorageTabWin(GuildAcademyStorageTabWin *this); // idb
bool __thiscall GuildAcademyStorageTabWin::Create(GuildAcademyStorageTabWin *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg); // idb
void __thiscall GuildAcademyStorageInvWin::GuildAcademyStorageInvWin(GuildAcademyStorageInvWin *this); // idb
void __thiscall GuildAcademyStorageInvWin::~GuildAcademyStorageInvWin(GuildAcademyStorageInvWin *this); // idb
char __thiscall GuildAcademyStorageInvWin::Create(GuildAcademyStorageInvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent);
void __thiscall GuildAcademyStorageInvWin::OnFirstHitWin(GuildAcademyStorageInvWin *this); // idb
void GuildAcademyStorageWin::OnOk();
void GuildAcademyStorageWin::OnCancel();
void __stdcall GuildAcademyStorageWin::OnDrawingMoneyWinOk(__int64 i64Money);
void __stdcall GuildAcademyStorageWin::OnDepositMoneyWinOk(__int64 i64Money);
void __thiscall GuildAcademyStorageWin::ResetContents(GuildAcademyStorageWin *this); // idb
GuildAcademyStorageInvWin *__thiscall GuildAcademyStorageWin::GetInvWin(GuildAcademyStorageWin *this, unsigned int uiIndex); // idb
void GuildAcademyStorageWin::OnHelpLink();
char __thiscall GuildAcademyStorageTabWin::EatDropInstance(GuildAcademyStorageTabWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
void __thiscall GuildAcademyStorageWin::GuildAcademyStorageWin(GuildAcademyStorageWin *this); // idb
void __thiscall GuildAcademyStorageWin::~GuildAcademyStorageWin(GuildAcademyStorageWin *this); // idb
void __thiscall GuildAcademyStorageWin::ResetPage(GuildAcademyStorageWin *this); // idb
void __thiscall GuildAcademyStorageWin::OnTab1(GuildAcademyStorageWin *this); // idb
void __thiscall GuildAcademyStorageWin::OnTab2(GuildAcademyStorageWin *this); // idb
void __thiscall GuildAcademyStorageWin::OnShowWin(GuildAcademyStorageWin *this); // idb
void GuildAcademyStorageWin::OnClose();
void __thiscall GuildAcademyStorageInvWin::DoAction(GuildAcademyStorageInvWin *this); // idb
void __thiscall GuildAcademyStorageInvWin::DoRAction(GuildAcademyStorageInvWin *this); // idb
void __thiscall GuildAcademyStorageWin::OnInvShiftLClick(GuildAcademyStorageWin *this, unsigned int uiInvIndex); // idb
void __thiscall GuildAcademyStorageWin::OnInvRClick(GuildAcademyStorageWin *this, unsigned int uiInvIndex); // idb
void __thiscall GuildAcademyStorageWin::OnDeposit(GuildAcademyStorageWin *this); // idb
void __thiscall GuildAcademyStorageWin::OnDrawing(GuildAcademyStorageWin *this); // idb
char __thiscall GuildAcademyStorageWin::DropOnInv(GuildAcademyStorageWin *this, DropContents *pkContents, unsigned int uiReceiverInvIndex);
void __thiscall GuildAcademyStorageWin::UpdateMeWin(GuildAcademyStorageWin *this, float fCurTime); // idb
char __thiscall GuildAcademyStorageInvWin::EatDropInstance(GuildAcademyStorageInvWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
void __thiscall GuildAcademyStorageWin::OnInvLClick(GuildAcademyStorageWin *this, unsigned int uiInvIndex); // idb
void __thiscall GuildAcademyStorageWin::OnCommand(GuildAcademyStorageWin *this, unsigned int wParam, int lParam); // idb
GuildAcademyStorageTabWin *__cdecl GuildAcademyStorageTabWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg); // idb
GuildAcademyStorageInvWin *__cdecl GuildAcademyStorageInvWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent); // idb
GuildAcademyStorageWin *__cdecl GuildAcademyStorageWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall GuildAcademyStorageWin::Create(GuildAcademyStorageWin *this, PgFrameWork *pkFrameWork);
GuildAcademyStorageTabWin *__thiscall GuildAcademyStorageTabWin::`scalar deleting destructor'(GuildAcademyStorageTabWin *this, unsigned int a2);
GuildAcademyStorageInvWin *__thiscall GuildAcademyStorageInvWin::`scalar deleting destructor'(GuildAcademyStorageInvWin *this, unsigned int a2);
GuildAcademyStorageWin *__thiscall GuildAcademyStorageWin::`scalar deleting destructor'(GuildAcademyStorageWin *this, unsigned int a2);
void __thiscall GuildAcademyWin::OnSortByTitle01(GuildAcademyWin *this); // idb
void __thiscall GuildAcademyWin::OnSortByTitle02(GuildAcademyWin *this); // idb
void __thiscall GuildAcademyWin::OnSortByTitle03(GuildAcademyWin *this); // idb
void __thiscall GuildAcademyWin::OnSortByTitle04(GuildAcademyWin *this); // idb
void __thiscall GuildAcademyWin::OnSortByTitle05(GuildAcademyWin *this); // idb
void GuildAcademyWin::OnClickJoinBtn();
void GuildAcademyWin::OnHelpLink();
void __thiscall GuildAcademyWin::OnWinClose(GuildAcademyWin *this); // idb
void __thiscall GuildAcademyWin::OnTopWin(GuildAcademyWin *this); // idb
void __thiscall GuildAcademyWin::ProcessMeInput(GuildAcademyWin *this, bool *bHit); // idb
void __thiscall GuildAcademyWin::UpdateMeWin(GuildAcademyWin *this, float fCurTime); // idb
void __thiscall GuildAcademyWin::OnLClick(GuildAcademyWin *this, int nItemIndex); // idb
void __thiscall GuildAcademyWin::OnRClick(GuildAcademyWin *this, int nItemIndex); // idb
void __thiscall GuildAcademyWin::OnChangeTab(GuildAcademyWin *this, DirectUserMsgBody_CommunityTabChanged::TabEnum eTab); // idb
void __stdcall GuildAcademyWin::OnSlideBar(SlideBar *pkSlideBar, SlideListWin *pkSlideListWin);
void __thiscall GuildAcademyWin::OnEditNotice(GuildAcademyWin *this); // idb
void __thiscall GuildAcademyWin::OnClickMasterTeleportBtn(GuildAcademyWin *this); // idb
void __thiscall GuildAcademyWin::OnClickInvitePartyBtn(GuildAcademyWin *this); // idb
void __thiscall GuildAcademyWin::OnSlideBarMemberList(GuildAcademyWin *this); // idb
void __thiscall GuildAcademyWin::OnSlideBarNotice(GuildAcademyWin *this); // idb
void __thiscall GuildAcademyWin::OnSlideBarHistory(GuildAcademyWin *this); // idb
NiUnsharedGeometryGroup *__stdcall GuildAcademyWin::GetHistoryText(GUILD_HISTORY_MSG_TYPE hisType);
void __thiscall GuildAcademyWin::AddListItem_DefInfo(GuildAcademyWin *this, GUILD_ACADEMY_MEMBER_CLIENT *pkData); // idb
void __thiscall GuildAcademyWin::ViewAllInfo(GuildAcademyWin *this, PROTO_FRIEND_INFO *pData); // idb
void __thiscall GuildAcademyWin::InvalidateGuildAcademyHistoryList(GuildAcademyWin *this); // idb
void __thiscall GuildAcademyWin::UpdateViewList(GuildAcademyWin *this); // idb
void __thiscall GuildAcademyWin::ChangeUserName(GuildAcademyWin *this, Name5 OldName, Name5 NewName); // idb
void __thiscall GuildAcademyWin::InvalidateAcademy(GuildAcademyWin *this); // idb
void __thiscall GuildAcademyWin::DeleteUser(GuildAcademyWin *this, Name5 kName); // idb
void __thiscall GuildAcademyWin::~GuildAcademyWin(GuildAcademyWin *this); // idb
void __thiscall GuildAcademyWin::DirectMessage(GuildAcademyWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall GuildAcademyWin::OnTab01(GuildAcademyWin *this); // idb
void __thiscall GuildAcademyWin::OnTab02(GuildAcademyWin *this); // idb
void __thiscall GuildAcademyWin::OnTab03(GuildAcademyWin *this); // idb
void __thiscall GuildAcademyWin::GuildAcademyWin(GuildAcademyWin *this); // idb
GuildAcademyWin *__cdecl GuildAcademyWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall GuildAcademyWin::OnCommand(GuildAcademyWin *this, unsigned int wParam, int lParam); // idb
void __thiscall GuildAcademyWin::OnShowWin(GuildAcademyWin *this); // idb
char __thiscall GuildAcademyWin::Create(GuildAcademyWin *this, PgFrameWork *pkFrameWork);
GuildAcademyMemberVanishTask *__cdecl ISingletonTask<GuildAcademyMemberVanishTask>::Run(); // idb
GuildAcademyMemberVanishTask *__thiscall GuildAcademyMemberVanishTask::`vector deleting destructor'(GuildAcademyMemberVanishTask *this, unsigned int a2);
GuildAcademyWin *__thiscall GuildAcademyWin::`scalar deleting destructor'(GuildAcademyWin *this, unsigned int a2);
void __thiscall GuildAcademyJoinReqTask::SetTargetID(GuildAcademyJoinReqTask *this, char *pcName); // idb
void __thiscall GuildAcademyJoinReqTask::OnStart(GuildAcademyJoinReqTask *this); // idb
void __thiscall GuildAcademyJoinReqTask::DirectMessage(GuildAcademyJoinReqTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall GuildAcademyJoinReqTask::GuildAcademyJoinReqTask(GuildAcademyJoinReqTask *this); // idb
void __stdcall GuildAcademyJoinReqTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_JOIN_ACK(PROTO_NC_GUILD_ACADEMY_MEMBER_JOIN_ACK *pkProto);
char __thiscall GuildAcademyJoinReqTask::OnProcessNetMsg(GuildAcademyJoinReqTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData);
GuildAcademyJoinReqTask *__thiscall GuildAcademyJoinReqTask::`scalar deleting destructor'(GuildAcademyJoinReqTask *this, unsigned int a2);
void __thiscall GuildAcademyLeaveTask::DirectMessage(GuildAcademyLeaveTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall GuildAcademyLeaveTask::OnStart(GuildAcademyLeaveTask *this); // idb
void __stdcall GuildAcademyLeaveTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_LEAVE_ACK(PROTO_NC_GUILD_ACADEMY_MEMBER_LEAVE_ACK *pkProto);
char __thiscall GuildAcademyLeaveTask::OnProcessNetMsg(GuildAcademyLeaveTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData);
void __thiscall GuildAcademyMasterAppointTask::SetInfo(GuildAcademyMasterAppointTask *this, Name5 *rkTargetName); // idb
void __thiscall GuildAcademyMasterInitializeTask::SetInfo(GuildAcademyMasterInitializeTask *this, Name5 *rkTargetName); // idb
void __thiscall GuildAcademyMasterInitializeTask::DirectMessage(GuildAcademyMasterInitializeTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall GuildAcademyMasterAppointTask::OnStart(GuildAcademyMasterAppointTask *this); // idb
void __thiscall GuildAcademyMasterAppointTask::DirectMessage(GuildAcademyMasterAppointTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
char __thiscall GuildAcademyMasterAppointTask::OnProcessNetMsg(GuildAcademyMasterAppointTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData);
void __thiscall GuildAcademyMasterInitializeTask::OnStart(GuildAcademyMasterInitializeTask *this); // idb
char __thiscall GuildAcademyMasterInitializeTask::OnProcessNetMsg(GuildAcademyMasterInitializeTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData);
unsigned int __thiscall CClientGuildAcademyMember::GetNumOfOnlineMembers(CClientGuildAcademyMember *this); // idb
int __thiscall GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_LIST_ACK(GuildAcademyMemberTask *this, PROTO_NC_GUILD_ACADEMY_MEMBER_LIST_ACK *pkProto); // idb
CClientGuildAcademyMember *__cdecl GuildAcademyMemberTask::GetGuildAcademyMember(); // idb
int __thiscall GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_LOGOFF_CMD(GuildAcademyMemberTask *this, PROTO_NC_GUILD_ACADEMY_MEMBER_LOGOFF_CMD *pkProto); // idb
void GuildAcademyMemberTask::OnFinish();
int __thiscall GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_JOIN_CMD(GuildAcademyMemberTask *this, PROTO_NC_GUILD_ACADEMY_MEMBER_JOIN_CMD *pkProto); // idb
int __thiscall GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_LEAVE_CMD(GuildAcademyMemberTask *this, PROTO_NC_GUILD_ACADEMY_MEMBER_LEAVE_CMD *pkProto); // idb
// int __userpurge GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_VANISH_CMD@<eax>(GuildAcademyMemberTask *this@<ecx>, int a2@<edi>, PROTO_NC_GUILD_ACADEMY_MEMBER_VANISH_CMD *pkProto);
int __thiscall GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_LOGON_CMD(GuildAcademyMemberTask *this, PROTO_NC_GUILD_ACADEMY_MEMBER_LOGON_CMD *pkProto); // idb
int __thiscall GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_CHAT_BAN_ACK(GuildAcademyMemberTask *this, int iRevBytes, PROTO_NC_GUILD_ACADEMY_MEMBER_CHAT_BAN_ACK *pkProto); // idb
int __thiscall GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_CHAT_BAN_CMD(GuildAcademyMemberTask *this, int iRevBytes, PROTO_NC_GUILD_ACADEMY_MEMBER_CHAT_BAN_CMD *pkProto); // idb
int __thiscall GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_CHAT_BAN_CANCEL_ACK(GuildAcademyMemberTask *this, int iRevBytes, PROTO_NC_GUILD_ACADEMY_MEMBER_CHAT_BAN_CANCEL_ACK *pkProto); // idb
int __thiscall GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_CHAT_BAN_CANCEL_CMD(GuildAcademyMemberTask *this, int iRevBytes, PROTO_NC_GUILD_ACADEMY_MEMBER_CHAT_BAN_CANCEL_CMD *pkProto); // idb
// char __userpurge GuildAcademyMemberTask::OnProcessNetMsg@<al>(GuildAcademyMemberTask *this@<ecx>, int a2@<edi>, int iDepart, int iCommand, int iRevBytes, void *pvData);
void __thiscall GuildAcademyMemberTask::GuildAcademyMemberTask(GuildAcademyMemberTask *this); // idb
GuildAcademyMemberTask *__thiscall GuildAcademyMemberTask::`scalar deleting destructor'(GuildAcademyMemberTask *this, unsigned int a2);
void __thiscall GuildAcademyNotifyTask::OnStart(GuildAcademyNotifyTask *this); // idb
char __thiscall GuildAcademyNotifyTask::OnProcessNetMsg(GuildAcademyNotifyTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData);
void __thiscall GuildAcademyNotifyTask::SetInfo(GuildAcademyNotifyTask *this, char *pcNotice); // idb
void __thiscall GuildAcademySelectTask::OnStart(GuildAcademySelectTask *this); // idb
void __cdecl GuildAcademySelectTask::OnNCGuildListReq();
void __cdecl GuildAcademySelectTask::ShowGuildAcademySelectWin(); // idb
PgWin *__cdecl GuildAcademySelectTask::GetGuildAcademySelectWin();
void __cdecl GuildAcademySelectTask::Terminate(); // idb
int __thiscall GuildAcademySelectTask::On_Recv_NC_GUILD_ACADEMY_LIST_ACK(GuildAcademySelectTask *this, PROTO_NC_GUILD_ACADEMY_LIST_ACK *pkProto); // idb
void __thiscall GuildAcademySelectTask::~GuildAcademySelectTask(GuildAcademySelectTask *this); // idb
char __thiscall GuildAcademySelectTask::OnProcessNetMsg(GuildAcademySelectTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData);
void __thiscall GuildAcademySelectTask::GuildAcademySelectTask(GuildAcademySelectTask *this); // idb
void __cdecl GuildAcademySelectTask::Create(IDirectMessenger *pkMsgHooker); // idb
GuildAcademySelectTask *__thiscall GuildAcademySelectTask::`scalar deleting destructor'(GuildAcademySelectTask *this, unsigned int a2);
bool __thiscall CClientGuildAcademy::AmIGuildAcademyMember(CClientGuildAcademy *this); // idb
bool __thiscall CClientGuildAcademy::IsGuildWar(CClientGuildAcademy *this); // idb
void __thiscall GuildAcademyTask::OnStart(GuildAcademyTask *this); // idb
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_DELETE_CMD(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_DELETE_CMD *pCmd); // idb
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_DISMISS_CMD(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_DISMISS_CMD *pCmd); // idb
void __cdecl GuildAcademyTask::CreateGuildacademyMasterEffect(Char *pkChar); // idb
BOOL __thiscall CClientGuildAcademy::AmIGuildAcademyMaster(CClientGuildAcademy *this);
BOOL __thiscall CClientGuildAcademy::IsGuildAcademyMaster(CClientGuildAcademy *this, Name5 charID);
void __thiscall CClientGuildAcademy::ReqHistoryList(CClientGuildAcademy *this); // idb
void __cdecl GuildAcademyTask::Terminate(); // idb
void __cdecl GuildAcademyTask::InvalidateGuildAcademyWin(); // idb
CClientGuildAcademy *__cdecl GuildAcademyTask::GetGuildAcademy(); // idb
GuildAcademyMenuWin *__cdecl GuildAcademyTask::GetGuildAcademyMenuWin(); // idb
GuildAcademyRankingWin *__cdecl GuildAcademyTask::GetGuildAcademyRankingWin(); // idb
GuildAcademyHallOfFameWin *__cdecl GuildAcademyTask::GetGuildAcademyHallOfFameWin(); // idb
GuildAcademyMoneyRewardWin *__cdecl GuildAcademyTask::GetGuildAcademyMoneyRewardWin(); // idb
GuildAcademyItemRewardWin *__cdecl GuildAcademyTask::GetGuildAcademyItemRewardWin(); // idb
GuildAcademyStorageWin *__cdecl GuildAcademyTask::GetGuildAcademyStorageWin(); // idb
GuildSelectWin *__cdecl GuildAcademyTask::GetGuildSelectWin(); // idb
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_NOTIFY_CMD(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_NOTIFY_CMD *pCmd); // idb
// int __userpurge GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_MY_GUILD_ACADEMY_INFO_ACK@<eax>(GuildAcademyTask *this@<ecx>, int a2@<esi>, PROTO_NC_GUILD_ACADEMY_MY_GUILD_ACADEMY_INFO_ACK *pAck);
int __thiscall GuildAcademyTask::On_Recv_NC_USER_CONNECTION_CHANGE_CHAR_ID_ACADEMY_MASTER_CMD(GuildAcademyTask *this, PROTO_NC_USER_CONNECTION_CHANGE_CHAR_ID_ACADEMY_MASTER_CMD *pkProto); // idb
int __thiscall GuildAcademyTask::On_Recv_NC_CHAR_GUILD_ACADEMY_CMD(GuildAcademyTask *this, PROTO_NC_CHAR_GUILD_ACADEMY_CMD *pkProto); // idb
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_REWARD_STORAGE_WITHDRAW_CMD(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_REWARD_STORAGE_WITHDRAW_CMD *pkCmd); // idb
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_REWARD_STORAGE_DEPOSIT_CMD(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_REWARD_STORAGE_DEPOSIT_CMD *pkCmd); // idb
int __thiscall GuildAcademyTask::On_Recv_NC_ITEM_GUILD_ACADEMY_REWARD_STORAGE_DEPOSIT_ACK(GuildAcademyTask *this, int iRevBytes, PROTO_NC_ITEM_GUILD_ACADEMY_REWARD_STORAGE_DEPOSIT_ACK *pAck); // idb
int __thiscall GuildAcademyTask::On_Recv_NC_ITEM_GUILD_ACADEMY_REWARD_STORAGE_WITHDRAW_ACK(GuildAcademyTask *this, int iRevBytes, PROTO_NC_ITEM_GUILD_ACADEMY_REWARD_STORAGE_WITHDRAW_ACK *pAck); // idb
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_GET_REWARD_MONEY_ACK(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_GET_REWARD_MONEY_ACK *pAck); // idb
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_SET_REWARD_MONEY_ACK(GuildAcademyTask *this, int iRevBytes, PROTO_NC_GUILD_ACADEMY_SET_REWARD_MONEY_ACK *pAck); // idb
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_CLEAR_REWARD_MONEY_ACK(GuildAcademyTask *this, int iRevBytes, PROTO_NC_GUILD_ACADEMY_CLEAR_REWARD_MONEY_ACK *pAck); // idb
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_GET_REWARD_ITEM_ACK(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_GET_REWARD_ITEM_ACK *pAck); // idb
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_SET_REWARD_ITEM_ACK(GuildAcademyTask *this, int iRevBytes, PROTO_NC_GUILD_ACADEMY_SET_REWARD_ITEM_ACK *pAck); // idb
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_CLEAR_REWARD_ITEM_ACK(GuildAcademyTask *this, int iRevBytes, PROTO_NC_GUILD_ACADEMY_CLEAR_REWARD_ITEM_ACK *pAck); // idb
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_GET_GRADUATE_ACK(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_GET_GRADUATE_ACK *pAck); // idb
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_GET_RANKING_LIST_ACK(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_GET_RANKING_LIST_ACK *pAck); // idb
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_MASTER_TELEPORT_ACK(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_MASTER_TELEPORT_ACK *pAck); // idb
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_SET_MASTER_CMD(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_SET_MASTER_CMD *pkCmd); // idb
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_SET_MASTER_BY_LEAVE_CMD(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_SET_MASTER_BY_LEAVE_CMD *pkCmd); // idb
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_REWARD_WANT_CMD(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_REWARD_WANT_CMD *pkCmd); // idb
void __thiscall CClientGuildAcademy::ClearHistoryList(CClientGuildAcademy *this); // idb
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_HISTORY_LIST_ACK(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_HISTORY_LIST_ACK *pkCmd); // idb
char __thiscall CClientGuildAcademy::FindEnemyGuildAcademyMember(CClientGuildAcademy *this, unsigned int GuildRegNum);
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_WAR_END_CMD(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_WAR_END_CMD *pkCmd); // idb
void __thiscall GuildAcademyTask::~GuildAcademyTask(GuildAcademyTask *this); // idb
void __thiscall GuildAcademyTask::GuildAcademyTask(GuildAcademyTask *this); // idb
void __cdecl GuildAcademyTask::Create(IDirectMessenger *pkMsgHooker); // idb
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_WAR_INFO_CMD(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_WAR_INFO_LIST_CMD *pkCmd); // idb
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_WAR_START_CMD(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_WAR_START_CMD *pkCmd); // idb
bool __thiscall GuildAcademyTask::OnProcessNetMsg(GuildAcademyTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData); // idb
GUILD_ACADEMY_CLIENT *__thiscall GUILD_ACADEMY_CLIENT::operator=(GUILD_ACADEMY_CLIENT *this, GUILD_ACADEMY_CLIENT *__that); // idb
std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,unsigned char>>,1>>::_Buynode<std::pair<unsigned long const,unsigned char>>(std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> > *this, std::pair<unsigned long const ,unsigned char> *_Val); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,unsigned char>>,1>>::insert<std::pair<unsigned long const,unsigned char>>(std::_Tree<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> > >,bool> *result, std::pair<unsigned long const ,unsigned char> *_Val); // idb
void __thiscall CClientGuildAcademy::~CClientGuildAcademy(CClientGuildAcademy *this); // idb
void __thiscall CClientGuildAcademy::CClientGuildAcademy(CClientGuildAcademy *this); // idb
GuildAcademyTask *__thiscall GuildAcademyTask::`scalar deleting destructor'(GuildAcademyTask *this, unsigned int a2);
void __thiscall GuildAcademyMemberVanishTask::SetInfo(GuildAcademyMemberVanishTask *this, Name5 *rkTargetName); // idb
void __thiscall GuildAcademyMemberVanishTask::OnStart(GuildAcademyMemberVanishTask *this); // idb
void __thiscall GuildAcademyMemberVanishTask::DirectMessage(GuildAcademyMemberVanishTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
char __thiscall GuildAcademyMemberVanishTask::OnProcessNetMsg(GuildAcademyMemberVanishTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData);
void GuildAcademyStorage::GuildAcademyStorage();
__int64 __cdecl GuildAcademyStorage::GetMoney(); // idb
void __cdecl GuildAcademyStorage::SetMoney(__int64 i64Money); // idb
void __cdecl GuildAcademyStorage::Clear(); // idb
bool __cdecl GuildAcademyStorage::IsEmpty(unsigned int uiIndex); // idb
Item *__cdecl GuildAcademyStorage::Get(unsigned int uiIndex); // idb
void __cdecl GuildAcademyStorage::Add(Item *pkItem, unsigned int uiIndex); // idb
void __cdecl GuildAcademyStorage::Remove(unsigned int uiIndex); // idb
signed int __cdecl GuildAcademyStorage::GetEmpty();
signed int __cdecl GuildAcademyStorage::GetInvIdxLotIsNotMax(Item *pkItem);
char __cdecl GuildAcademyStorage::SetContents(PROTO_NC_GUILD_ACADEMY_REWARD_STORAGE_OPEN_ACK *pkProto);
char __thiscall RaidInfo::SetItemLootingType(RaidInfo *this, char nItemGrade, char nItemLooting);
bool __thiscall RaidInfo::IsMeRaidMember(RaidInfo *this); // idb
void __thiscall RaidInfo::SetBelongType(RaidInfo *this, int iType); // idb
int __thiscall RaidInfo::GetBelongType(RaidInfo *this); // idb
Char *__thiscall RaidInfo::GetCharByIndex(RaidInfo *this, unsigned int uiIdx); // idb
char __thiscall RaidInfo::MemberInfomUpdate(RaidInfo *this, PROTO_NC_RAID_MEMBERINFORM_CMD *p);
void __thiscall RaidInfo::ChangeRaidLooter(RaidInfo *this, Name5 kCharID); // idb
void __thiscall RaidInfo::ChangeRaidLeader(RaidInfo *this, Name5 kCharID); // idb
void __stdcall RaidInfo::ResetMemberInfo(RaidMemberInfo *pkMember);
RaidMemberInfo *__thiscall RaidInfo::GetRaidMemberInfo(RaidInfo *this, Name5 kCharID); // idb
char __thiscall RaidInfo::MemberLoginInfo(RaidInfo *this, Name5 kCharID, unsigned int partyIdx, unsigned int slotIdx, bool IsLogin);
RaidMemberInfo *__thiscall RaidInfo::GetRaidMemberInfoByIndex(RaidInfo *this, unsigned int uiIdx); // idb
void __thiscall RaidInfo::FindIndexByName(RaidInfo *this, char *strName, unsigned int *PatryIdx, unsigned int *slotIndex); // idb
bool __thiscall RaidInfo::IsLeader(RaidInfo *this, Name5 kCharID); // idb
bool __thiscall RaidInfo::IsLooter(RaidInfo *this, Name5 kCharID); // idb
char __thiscall RaidInfo::IsSubLeader(RaidInfo *this, Name5 kCharID);
void __thiscall RaidInfo::ChangeUserName(RaidInfo *this, Name5 *OldName, Name5 *NewName); // idb
char __thiscall RaidInfo::AddMember(RaidInfo *this, PROTO_NC_RAID_MEMBER_JOIN_BROAD_CMD *p);
char __thiscall RaidInfo::Replace(RaidInfo *this, PROTO_NC_RAID_SLOT_MOVE_BROAD_CMD *p);
char __thiscall RaidInfo::ConvertPartyToRaid(RaidInfo *this, PROTO_NC_RAID_MAKE_BROAD_CMD *p);
char __thiscall RaidInfo::MemberInfoDetailInfo(RaidInfo *this, PROTO_NC_RAID_MEMBERCLASS_CMD *p);
void __thiscall RaidInfo::SetRaidSubLeader(RaidInfo *this, Name5 kCharID, bool bUp); // idb
void __thiscall RaidInfo::ClearRaidInfo(RaidInfo *this); // idb
void __thiscall RaidInfo::RaidInfo(RaidInfo *this); // idb
char __thiscall RaidInfo::SetMember(RaidInfo *this, PROTO_NC_RAID_MEMBER_LIST_CMD *p);
char __thiscall RaidInfo::DeleteMember(RaidInfo *this, Name5 kID, std::_Vector_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo> > > nPartyIdx, char nSlotIdx);
char __thiscall RaidInfo::DeleteMember(RaidInfo *this, Name5 kID);
RaidMemberInfo *__thiscall RaidMemberInfo::operator=(RaidMemberInfo *this, RaidMemberInfo *__that); // idb
Name5 *__cdecl std::_Move<Name5 *,Name5 *>(Name5 *_First, Name5 *_Last, Name5 *_Dest);
RaidMemberInfo *__cdecl std::_Move<RaidMemberInfo *,RaidMemberInfo *>(RaidMemberInfo *_First, RaidMemberInfo *_Last, RaidMemberInfo *_Dest);
RaidMemberInfo *__cdecl std::_Uninit_move<RaidMemberInfo *,RaidMemberInfo *,std::allocator<RaidMemberInfo>,RaidMemberInfo>(RaidMemberInfo *_First, RaidMemberInfo *_Last, RaidMemberInfo *_Dest);
void __thiscall std::vector<Name5,std::allocator<Name5>>::reserve(std::vector<Name5,std::allocator<Name5> > *this, unsigned int _Count); // idb
void __thiscall std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::reserve(std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *this, unsigned int _Count); // idb
std::_Vector_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo> > > *__thiscall std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::erase(std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *this, std::_Vector_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo> > > *result, std::_Vector_const_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo> > > _Where); // idb
void __thiscall std::vector<Name5,std::allocator<Name5>>::_Reserve(std::vector<Name5,std::allocator<Name5> > *this, unsigned int _Count); // idb
void __thiscall std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::_Reserve(std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *this, unsigned int _Count); // idb
RaidInfo *__thiscall RaidInfo::`vector deleting destructor'(RaidInfo *this, unsigned int a2);
void __thiscall std::vector<Name5,std::allocator<Name5>>::push_back(std::vector<Name5,std::allocator<Name5> > *this, Name5 *_Val); // idb
void __thiscall std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::push_back(std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *this, RaidMemberInfo *_Val); // idb
void __thiscall ExpeditionMemberAddWin::ExpeditionMemberAddWin(ExpeditionMemberAddWin *this); // idb
void __thiscall ExpeditionMemberAddWin::~ExpeditionMemberAddWin(ExpeditionMemberAddWin *this); // idb
void __thiscall ExpeditionMemberAddWin::SetTargetName(ExpeditionMemberAddWin *this, const char *szName); // idb
void __thiscall ExpeditionMemberAddWin::OnClose(ExpeditionMemberAddWin *this); // idb
void __thiscall ExpeditionMemberAddWin::OnShowWin(ExpeditionMemberAddWin *this); // idb
void ExpeditionWin::OnHelpLink();
void __thiscall ExpeditionPartyWin::OpenPopupWin(ExpeditionPartyWin *this, unsigned int focusSlot); // idb
void __thiscall ExpeditionLootSelectWin::ExpeditionLootSelectWin(ExpeditionLootSelectWin *this); // idb
void __thiscall ExpeditionLootSelectWin::~ExpeditionLootSelectWin(ExpeditionLootSelectWin *this); // idb
void __thiscall ExpeditionLootSelectWin::OnSlideBtnUp(ExpeditionLootSelectWin *this); // idb
void ExpeditionLootOptionWin::OnHelpLink();
void __thiscall EntryIconWin::~EntryIconWin(EntryIconWin *this); // idb
void __thiscall EntryIconWin::InitLeaderLooterMark(EntryIconWin *this); // idb
void __thiscall ExpeditionMemberAddWin::OnMemberAddOk(ExpeditionMemberAddWin *this); // idb
void __thiscall ExpeditionMemberAddWin::OnMemberAddCancel(ExpeditionMemberAddWin *this); // idb
void __thiscall ExpeditionMemberAddWin::OnCommand(ExpeditionMemberAddWin *this, unsigned int wParam, int lParam); // idb
void __thiscall ExpeditionMemberAddWin::OnEditEnd(ExpeditionMemberAddWin *this, unsigned int wParam, int lParam); // idb
void __thiscall ExpeditionWin::~ExpeditionWin(ExpeditionWin *this); // idb
void __thiscall ExpeditionWin::ClickReset(ExpeditionWin *this); // idb
void __thiscall ExpeditionWin::DirectMessage(ExpeditionWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall ExpeditionPartyWin::~ExpeditionPartyWin(ExpeditionPartyWin *this); // idb
void __thiscall ExpeditionPartyWin::DirectMessage(ExpeditionPartyWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall ExpeditionPartyWin::AlignBuf(ExpeditionPartyWin *this, int row, int column); // idb
void __thiscall ExpeditionPartyWin::SetOption(ExpeditionPartyWin *this, unsigned int uiIndex, unsigned int uiOpt); // idb
void __thiscall ExpeditionLootSelectWin::OnSlideBar(ExpeditionLootSelectWin *this); // idb
void __thiscall ExpeditionLootOptionWin::ExpeditionLootOptionWin(ExpeditionLootOptionWin *this); // idb
void __thiscall ExpeditionLootOptionWin::~ExpeditionLootOptionWin(ExpeditionLootOptionWin *this); // idb
void __thiscall ExpeditionLootOptionWin::DirectMessage(ExpeditionLootOptionWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall ExpeditionLootOptionWin::SetLooter(ExpeditionLootOptionWin *this, const char *name); // idb
void __thiscall EntryIconWin::EntryIconWin(EntryIconWin *this); // idb
void __thiscall EntryIconWin::OnCommand(EntryIconWin *this, unsigned int wParam, int lParam); // idb
void __thiscall EntryIconWin::ShowLeaderLooterMark(EntryIconWin *this); // idb
char __thiscall ExpeditionMemberAddWin::Create(ExpeditionMemberAddWin *this, PgFrameWork *pkFrameWork);
void __thiscall ExpeditionWin::ExpeditionWin(ExpeditionWin *this); // idb
void __thiscall ExpeditionWin::OnCommand(ExpeditionWin *this, unsigned int wParam, int lParam); // idb
void __thiscall ExpeditionWin::SetLootingType(ExpeditionWin *this, char nLootingType); // idb
void __thiscall ExpeditionWin::SetItemGrade(ExpeditionWin *this, char nItemGrade); // idb
void __thiscall ExpeditionPartyWin::ExpeditionPartyWin(ExpeditionPartyWin *this); // idb
char __thiscall ExpeditionPartyWin::Create(ExpeditionPartyWin *this, PgFrameWork *pkFrameWork, unsigned int index);
void __thiscall ExpeditionPartyWin::SetBuffUI(ExpeditionPartyWin *this, Char *pkMember, StateType type, int *AbstateNums, int index); // idb
void __thiscall ExpeditionPartyWin::OnCommand(ExpeditionPartyWin *this, unsigned int wParam, int lParam); // idb
char __thiscall ExpeditionLootOptionWin::Create(ExpeditionLootOptionWin *this, PgFrameWork *pkFrameWork);
void __thiscall ExpeditionLootOptionWin::OnCommand(ExpeditionLootOptionWin *this, unsigned int wParam, int lParam); // idb
void __thiscall ExpeditionLootOptionWin::SetLootingType(ExpeditionLootOptionWin *this, char nItemGrade, char nLootingType); // idb
char __thiscall EntryIconWin::Create(EntryIconWin *this, NiAVObject *pkObject, int group, int index, PgWin *pkParent, unsigned int uiCmdMsg, unsigned int uiRCmdMsg);
void __thiscall EntryIconWin::UpdateMeWin(EntryIconWin *this, float fCurTime); // idb
void __thiscall ExpeditionMemberAddWin::UpdateMeWin(ExpeditionMemberAddWin *this, float fCurTime); // idb
EntryIconWin *__cdecl EntryIconWin::CreateWin(NiAVObject *pkObject, int group, int index, PgWin *pkParent, unsigned int uiCmdMsg, unsigned int uiRCmdMsg); // idb
ExpeditionMemberAddWin *__cdecl ExpeditionMemberAddWin::CreateWin(PgFrameWork *pkFrameWork); // idb
ExpeditionWin *__cdecl ExpeditionWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall ExpeditionWin::Create(ExpeditionWin *this, PgFrameWork *pkFrameWork);
ExpeditionPartyWin *__cdecl ExpeditionPartyWin::CreateWin(PgFrameWork *pkFrameWork, unsigned int index); // idb
ExpeditionLootSelectWin *__cdecl ExpeditionLootSelectWin::CreateWin(PgFrameWork *pkFrameWork); // idb
ExpeditionLootOptionWin *__cdecl ExpeditionLootOptionWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall ExpeditionLootSelectWin::OnCommand(ExpeditionLootSelectWin *this, unsigned int wParam, int lParam); // idb
void __thiscall ExpeditionWin::UpdateMeWin(ExpeditionWin *this, float fCurTime); // idb
void __thiscall ExpeditionPartyWin::UpdateMeWin(ExpeditionPartyWin *this, float fCurTime); // idb
void __thiscall ExpeditionLootSelectWin::UpdateMeWin(ExpeditionLootSelectWin *this, float fCurTime); // idb
char __thiscall ExpeditionLootSelectWin::Create(ExpeditionLootSelectWin *this, PgFrameWork *pkFrameWork);
ExpeditionMemberAddWin *__thiscall ExpeditionMemberAddWin::`vector deleting destructor'(ExpeditionMemberAddWin *this, unsigned int a2);
ExpeditionLootSelectWin *__thiscall ExpeditionLootSelectWin::`vector deleting destructor'(ExpeditionLootSelectWin *this, unsigned int a2);
EntryIconWin *__thiscall EntryIconWin::`scalar deleting destructor'(EntryIconWin *this, unsigned int a2);
ExpeditionWin *__thiscall ExpeditionWin::`scalar deleting destructor'(ExpeditionWin *this, unsigned int a2);
ExpeditionPartyWin *__thiscall ExpeditionPartyWin::`vector deleting destructor'(ExpeditionPartyWin *this, unsigned int a2);
ExpeditionLootOptionWin *__thiscall ExpeditionLootOptionWin::`vector deleting destructor'(ExpeditionLootOptionWin *this, unsigned int a2);
void __cdecl ConvertCommaNumber(__int64 i64Val, char *pNumberString); // idb
void __thiscall CoinEditWin::CoinEditWin(CoinEditWin *this); // idb
void __thiscall CoinEditWin::~CoinEditWin(CoinEditWin *this); // idb
void __thiscall CoinEditWin::InputNumberDone(CoinEditWin *this); // idb
void __thiscall CoinExchangeWin::CoinExchangeWin(CoinExchangeWin *this); // idb
void __thiscall CoinExchangeWin::~CoinExchangeWin(CoinExchangeWin *this); // idb
void __thiscall CoinExchangeWin::SetEditFocus(CoinExchangeWin *this, unsigned int uiFocus); // idb
void __thiscall CoinExchangeWin::SetExchangeableCoin(CoinExchangeWin *this, __int64 coin); // idb
void __thiscall GambleWin::GambleWin(GambleWin *this); // idb
void __thiscall GambleWin::~GambleWin(GambleWin *this); // idb
void __thiscall GambleMiniWin::GambleMiniWin(GambleMiniWin *this); // idb
void __thiscall GambleMiniWin::~GambleMiniWin(GambleMiniWin *this); // idb
void __stdcall GambleMiniWin::OnCommand(unsigned int wParam, int lParam);
void __thiscall GambleHouseCardWin::GambleHouseCardWin(GambleHouseCardWin *this); // idb
void __thiscall GambleHouseCardWin::~GambleHouseCardWin(GambleHouseCardWin *this); // idb
void __thiscall GambleHouseCardWin::OnCommand(GambleHouseCardWin *this, unsigned int wParam, int lParam); // idb
// void __usercall CoinEditWin::SetFocus(CoinEditWin *this@<ecx>, int a2@<edi>);
void __thiscall CoinExchangeWin::OnShowWin(CoinExchangeWin *this); // idb
void __thiscall CoinExchangeWin::OnClose(CoinExchangeWin *this); // idb
void __stdcall GambleWin::OnCommand(unsigned int wParam, int lParam);
void __thiscall GambleWin::ChangeCoin(GambleWin *this); // idb
void __thiscall GambleHouseCardWin::ChangeCoin(GambleHouseCardWin *this); // idb
void __thiscall CoinExchangeWin::OnEditEnd(CoinExchangeWin *this, unsigned int wParam, int lParam); // idb
void __thiscall CoinExchangeWin::OnExchange(CoinExchangeWin *this); // idb
void __thiscall CoinExchangeWin::OnTAB1(CoinExchangeWin *this); // idb
void __thiscall CoinExchangeWin::OnTAB2(CoinExchangeWin *this); // idb
// void __userpurge CoinExchangeWin::UpdateMeWin(CoinExchangeWin *this@<ecx>, int a2@<ebx>, int a3@<edi>, float fCurTime);
char __thiscall GambleWin::Create(GambleWin *this, PgFrameWork *pkFrameWork);
void __thiscall GambleWin::OnShowWin(GambleWin *this); // idb
char __thiscall GambleMiniWin::Create(GambleMiniWin *this, PgFrameWork *pkFrameWork);
char __thiscall GambleHouseCardWin::Create(GambleHouseCardWin *this, PgFrameWork *pkFrameWork);
void __thiscall GambleHouseCardWin::OnShowWin(GambleHouseCardWin *this); // idb
char __thiscall CoinEditWin::Create(CoinEditWin *this, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, EditWin::Type eType, unsigned int uiLimitTextLen, unsigned int uiStopFlag, bool bClearTextOnEnd, Font::Type eFontType, bool bForceFocusWhenClick);
void __thiscall CoinExchangeWin::OnCommand(CoinExchangeWin *this, unsigned int wParam, int lParam); // idb
CoinEditWin *__cdecl CoinEditWin::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, EditWin::Type eType, unsigned int uiLimitTextLen, unsigned int uiStopFlag, int bClearTextOnEnd, Font::Type eFontType, int bForceFocusWhenClick);
CoinExchangeWin *__cdecl CoinExchangeWin::CreateWin(PgFrameWork *pkFrameWork); // idb
char __thiscall CoinExchangeWin::Create(CoinExchangeWin *this, PgFrameWork *pkFrameWork);
GambleWin *__cdecl GambleWin::CreateWin(PgFrameWork *pkFrameWork); // idb
GambleMiniWin *__cdecl GambleMiniWin::CreateWin(PgFrameWork *pkFrameWork); // idb
GambleHouseCardWin *__cdecl GambleHouseCardWin::CreateWin(PgFrameWork *pkFrameWork); // idb
CoinEditWin *__thiscall CoinEditWin::`scalar deleting destructor'(CoinEditWin *this, unsigned int a2);
CoinExchangeWin *__thiscall CoinExchangeWin::`vector deleting destructor'(CoinExchangeWin *this, unsigned int a2);
GambleWin *__thiscall GambleWin::`scalar deleting destructor'(GambleWin *this, unsigned int a2);
GambleMiniWin *__thiscall GambleMiniWin::`scalar deleting destructor'(GambleMiniWin *this, unsigned int a2);
GambleHouseCardWin *__thiscall GambleHouseCardWin::`vector deleting destructor'(GambleHouseCardWin *this, unsigned int a2);
unsigned int __cdecl ITableBase<GBHouse,GBHouseTab>::GetTotal(); // idb
GBHouse *__cdecl GBHouseTab::GetByIndex(unsigned int uiIndex); // idb
GameFrameWork *__stdcall MHDiceGameTask::Recv_NC_GAMBLE_COIN_EXCHANGEMACHINE_UI_OPEN_CMD(PROTO_NC_GAMBLE_COIN_EXCHANGEMACHINE_UI_OPEN_CMD *pkProto);
int __stdcall MHDiceGameTask::Recv_NC_GAMBLE_COIN_VIPCARD_UI_OPEN_ACK(PROTO_NC_GAMBLE_COIN_VIPCARD_UI_OPEN_ACK *pkProto);
void MHDiceGameTask::NcGambleGambleHouseExitReq();
void __stdcall MHDiceGameTask::NcGambleCoinVipcardUIopenReq(int uSlotNum);
void __stdcall MHDiceGameTask::NcGambleCoinBuyReq(unsigned __int64 Coin);
void __stdcall MHDiceGameTask::NcGambleCoinSellReq(unsigned __int64 Coin);
void __stdcall MHDiceGameTask::NcGambleTypeAndWhereStandReq(unsigned __int16 nNpcHandle);
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_GAME_LEAVE_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_GAME_LEAVE_ACK *pkProto); // idb
void MHDiceGameTask::NcGambleDiceTaisaiAllRankReq();
void MHDiceGameTask::NcGambleDiceTaisaiCurrRankReq();
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_DICE_ROLL_RESULT_CMD(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_DICE_ROLL_RESULT_CMD *pkProto); // idb
int __stdcall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_LARGE_AMOUNT_ACK(PROTO_NC_GAMBLE_DICE_TAISAI_LARGE_AMOUNT_ACK *pkProto);
void __stdcall MHDiceGameTask::NcGambleDiceTaisaiGameLargeAmountReq(unsigned int Money);
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_DICE_ROLL_CMD(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_DICE_ROLL_CMD *pkProto); // idb
GameFrameWork *__thiscall MHDiceGameTask::Recv_NC_GAMBLE_GAMBLEHOUSE_EXIT_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_GAMBLEHOUSE_EXIT_ACK *pkProto);
PgFrameWork *__stdcall MHDiceGameTask::Recv_NC_GAMBLE_COIN_CHANGE_CMD(PROTO_NC_GAMBLE_COIN_CHANGE_CMD *pkProto);
PgFrameWork *__stdcall MHDiceGameTask::Recv_NC_GAMBLE_EXCHANGECOIN_CHANGE_CMD(PROTO_NC_GAMBLE_EXCHANGECOIN_CHANGE_CMD *pkProto);
void __thiscall MHDiceGameTask::NcGambleDiceTaisaiGameJoinReq(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_GAME_JOIN_REQ *pkProto); // idb
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_TIMER_CMD(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_TIMER_CMD *pkProto); // idb
int __stdcall MHDiceGameTask::Recv_NC_CHAR_CLIENT_COININFO_CMD(PROTO_NC_CHAR_COININFO_CMD *pkProto);
int __stdcall MHDiceGameTask::Recv_NC_GAMBLE_ENTER_PLAYER_DIRECT_CMD(PROTO_NC_GAMBLE_ENTER_PLAYER_DIRECT_CMD *pkProto);
PgFrameWork *__stdcall MHDiceGameTask::Recv_NC_GAMBLE_COIN_BUY_ACK(PROTO_NC_GAMBLE_COIN_BUY_ACK *pkProto);
PgFrameWork *__stdcall MHDiceGameTask::Recv_NC_GAMBLE_COIN_SELL_ACK(PROTO_NC_GAMBLE_COIN_SELL_ACK *pkProto);
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_TYPE_AND_WHERE_STAND_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_TYPE_AND_WHERE_STAND_ACK *pkProto); // idb
int __stdcall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_DICE_ROLL_RESULT_EMOTION_CMD(PROTO_NC_GAMBLE_DICE_TAISAI_DICE_ROLL_RESULT_EMOTION_CMD *pkProto);
int __stdcall MHDiceGameTask::Recv_NC_GAMBLE_COIN_USE_COINITEM_MESSAGE_CMD(PROTO_NC_GAMBLE_COIN_USE_COINITEM_MESSAGE_CMD *pkProto);
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_LARGE_AMOUNT_CMD(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_LARGE_AMOUNT_CMD *pkProto); // idb
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_GAME_BETTING_INFO_CMD(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_GAME_BETTING_INFO_CMD *pkProto); // idb
// void __usercall MHDiceGameTask::NcGambleDiceTaisaiGameLeaveReq(MHDiceGameTask *this@<ecx>, int a2@<edi>);
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_BETTING_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_ACK *pkProto); // idb
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_BETTING_CMD(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CMD *pkProto); // idb
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_ACK *pkProto); // idb
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_CMD(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_CMD *pkProto); // idb
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_GAME_LEAVE_CMD(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_GAME_LEAVE_CMD *pkProto); // idb
void __thiscall MHDiceGameTask::NcGambleDiceTaisaiGameBettingReq(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_REQ *pkProto); // idb
void __thiscall MHDiceGameTask::NcGambleDiceTaisaiGameBettingCancelReq(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_REQ *pkProto); // idb
// int __userpurge MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_BET_START_CMD@<eax>(MHDiceGameTask *this@<ecx>, int a2@<edi>, PROTO_NC_GAMBLE_DICE_TAISAI_BET_START_CMD *pkProto);
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_GAME_JOIN_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_GAME_JOIN_ACK *pkProto); // idb
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_GAME_JOIN_CMD(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_GAME_JOIN_CMD *pkProto); // idb
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_ALL_RANK_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_ALL_RANK_ACK *pkProto); // idb
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_CURR_RANK_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_CURR_RANK_ACK *pkProto); // idb
void __thiscall mhDiceRankWin::OnTAB1(mhDiceRankWin *this); // idb
void __thiscall mhDiceRankWin::OnTAB2(mhDiceRankWin *this); // idb
void __thiscall mhDiceRankWin::UpdateAllRankList(mhDiceRankWin *this, PROTO_NC_GAMBLE_DICE_TAISAI_ALL_RANK_ACK *pkProto); // idb
void __thiscall mhDiceRankWin::UpdateCurRankList(mhDiceRankWin *this, PROTO_NC_GAMBLE_DICE_TAISAI_CURR_RANK_ACK *pkProto); // idb
void __thiscall BettingBut::~BettingBut(BettingBut *this); // idb
void __thiscall BettingBut::SwitchSpr(BettingBut *this, float fDelta); // idb
void __thiscall ToggleBut::ToggleBut(ToggleBut *this); // idb
void __thiscall ToggleBut::~ToggleBut(ToggleBut *this); // idb
void __thiscall ToggleBut::ReleaseMeInput(ToggleBut *this); // idb
void __thiscall ToggleBut::SetMark(ToggleBut *this, bool bMark); // idb
void __thiscall MiniHouseDiceGameWin::SetMoneyWin(MiniHouseDiceGameWin *this, unsigned int nPlayerMoney); // idb
void __thiscall mhMinimizeDiceGameWin::mhMinimizeDiceGameWin(mhMinimizeDiceGameWin *this); // idb
void __thiscall mhMinimizeDiceGameWin::~mhMinimizeDiceGameWin(mhMinimizeDiceGameWin *this); // idb
void __thiscall mhDiceHelpWin::mhDiceHelpWin(mhDiceHelpWin *this); // idb
void __thiscall mhDiceHelpWin::~mhDiceHelpWin(mhDiceHelpWin *this); // idb
void __thiscall mhDiceHelpWin::UpdateMeWin(mhDiceHelpWin *this, float fCurTime); // idb
void __thiscall mhDiceRankWin::DirectMessage(mhDiceRankWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall mhDiceRateSheetWin::mhDiceRateSheetWin(mhDiceRateSheetWin *this); // idb
void __thiscall mhDiceRateSheetWin::~mhDiceRateSheetWin(mhDiceRateSheetWin *this); // idb
void __thiscall GambleDiceGameWin::SetMoneyWin(GambleDiceGameWin *this, __int64 nPlayerMoney); // idb
void __thiscall BettingBut::BettingBut(BettingBut *this); // idb
void __thiscall ToggleBut::ProcessMeInput(ToggleBut *this, bool *bHit); // idb
void __thiscall ToggleBut::SetButShow(ToggleBut *this, PgWinBut::ButShow eShow); // idb
void __stdcall MiniHouseDiceGameWin::OnBettingButton(unsigned int uiMsgCmd, bool IsLeftBtn);
void __thiscall MiniHouseDiceGameWin::OnBettingAmout(MiniHouseDiceGameWin *this, unsigned int uiButton, BETTING_LEVEL_MONEY amount); // idb
void MiniHouseDiceGameWin::OnMinimalize();
void MiniHouseDiceGameWin::OnClickRanking();
void __thiscall MiniHouseDiceGameWin::OnVisibleChip(MiniHouseDiceGameWin *this, DICE_TAISAI_BETTING index, bool IsShow, int chipLevel, bool bPlaySound); // idb
void __thiscall MiniHouseDiceGameWin::TurnOnLight(MiniHouseDiceGameWin *this, int bIsAll, bool bOnlyNext, int bTwinkle);
void __thiscall MiniHouseDiceGameWin::GameStartEff(MiniHouseDiceGameWin *this); // idb
void __thiscall MiniHouseDiceGameWin::EnableBetLevelBtn(MiniHouseDiceGameWin *this, unsigned int money); // idb
void __stdcall mhMinimizeDiceGameWin::OnCommand(unsigned int wParam, int lParam);
void __stdcall mhMinimizeDiceGameWin::UpdateMeWin(float fCurTime);
void __thiscall mhDiceHelpWin::CloseWin(mhDiceHelpWin *this); // idb
void __thiscall mhDiceHelpWin::OnSlideBar(mhDiceHelpWin *this); // idb
void __thiscall MHDiceRewardMoneyWin::MHDiceRewardMoneyWin(MHDiceRewardMoneyWin *this); // idb
void __thiscall MHDiceRewardMoneyWin::~MHDiceRewardMoneyWin(MHDiceRewardMoneyWin *this); // idb
void __thiscall MHDiceRewardMoneyWin::OnCmdOk(MHDiceRewardMoneyWin *this); // idb
void __thiscall MHDiceRewardMoneyWin::SetTitle1(MHDiceRewardMoneyWin *this, char *pcTitle); // idb
void __thiscall MHDiceRewardMoneyWin::SetTitle2(MHDiceRewardMoneyWin *this, char *pcTitle); // idb
void __thiscall mhDiceRateSheetWin::OnCommand(mhDiceRateSheetWin *this, unsigned int wParam, int lParam); // idb
int __thiscall MHDiceAniActor::SetAct(MHDiceAniActor *this, MHDiceAniActor::DICE_ANIIDX AniIndex, NiActorManager *ActorMgr); // idb
int __thiscall MHDiceAniActor::SetAction(MHDiceAniActor *this, MHDiceAniActor::DICE_ANIIDX AniIndex, NiActorManager *ActorMgr, float fTime); // idb
int __thiscall MHDiceAniActor::update(MHDiceAniActor *this, float fTime, NiActorManager *ActorMgr); // idb
void __thiscall MHChipEffect::Start(MHChipEffect *this, NiNode *pkParent, NiQuaternion Qut, NiPoint3 pos); // idb
bool __thiscall MHChipEffect::Update(MHChipEffect *this, float fTime); // idb
void __stdcall GambleDiceGameWin::OnBettingButton(unsigned int uiMsgCmd, bool IsLeftBtn);
void __thiscall GambleDiceGameWin::OnBettingAmount(GambleDiceGameWin *this, unsigned int uiButton, BETTING_LEVEL_COIN amount); // idb
void GambleDiceGameWin::OnMinimalize();
void GambleDiceGameWin::OnClickRanking();
void __thiscall GambleDiceGameWin::ChipAnimation(GambleDiceGameWin *this, DICE_TAISAI_BETTING index, BETTING_LEVEL_MONEY nLevel, int nPos); // idb
void __thiscall GambleDiceGameWin::OnVisibleChip(GambleDiceGameWin *this, DICE_TAISAI_BETTING index, bool IsShow, int chipLevel, bool bPlaySound); // idb
void __thiscall GambleDiceGameWin::TurnOnLight(GambleDiceGameWin *this, int bIsAll, bool bOnlyNext, int bTwinkle);
void __thiscall GambleDiceGameWin::GameStartEff(GambleDiceGameWin *this); // idb
void __thiscall GambleDiceGameWin::EnableBetLevelBtn(GambleDiceGameWin *this, unsigned int money); // idb
char __thiscall BettingBut::Create(BettingBut *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, int Pos, char *pcName, unsigned int uiExtStyle);
void __thiscall BettingBut::DoAction(BettingBut *this); // idb
void __thiscall BettingBut::ProcessMeInput(BettingBut *this, bool *bHit); // idb
void __thiscall BettingBut::UpdateMeWin(BettingBut *this, float fCurTime); // idb
void __thiscall BettingBut::SetButtonSpr(BettingBut *this, unsigned int index); // idb
void __thiscall BettingBut::SetBettingState(BettingBut *this, BET_STATE state); // idb
char __thiscall ToggleBut::Create(ToggleBut *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, int Pos, char *pcName, unsigned int uiExtStyle);
// void __userpurge MiniHouseDiceGameWin::OnCommand(MiniHouseDiceGameWin *this@<ecx>, int a2@<edi>, unsigned int wParam, int lParam);
void __thiscall MiniHouseDiceGameWin::AllReset(MiniHouseDiceGameWin *this); // idb
void __thiscall MiniHouseDiceGameWin::ChipAnimation(MiniHouseDiceGameWin *this, DICE_TAISAI_BETTING index, BETTING_LEVEL_MONEY nLevel, int nPos); // idb
void __thiscall MiniHouseDiceGameWin::ShowResult(MiniHouseDiceGameWin *this, DICE_TAISAI_BETTING index, bool IsSuccess, bool IsNonBetting); // idb
// void __userpurge MiniHouseDiceGameWin::UpdateTimeText(MiniHouseDiceGameWin *this@<ecx>, int a2@<edi>, float fRemainTime, bool IsShow);
void __thiscall MiniHouseDiceGameWin::DiceAnimationStart(MiniHouseDiceGameWin *this, unsigned int *AniCode); // idb
void __thiscall MiniHouseDiceGameWin::SetMarkButton(MiniHouseDiceGameWin *this, DICE_TAISAI_BETTING nPos, BET_STATE bState, bool IsMark); // idb
char __thiscall mhMinimizeDiceGameWin::Create(mhMinimizeDiceGameWin *this, PgFrameWork *pkFrameWork);
void __thiscall mhDiceHelpWin::OnCommand(mhDiceHelpWin *this, unsigned int wParam, int lParam); // idb
void __thiscall mhDiceRankWin::UpdateMedal(mhDiceRankWin *this); // idb
void __thiscall MHDiceRewardMoneyWin::OnCommand(MHDiceRewardMoneyWin *this, unsigned int wParam, int lParam); // idb
void __thiscall MHDiceRewardMoneyWin::Open(MHDiceRewardMoneyWin *this, unsigned int uiOkMsg, unsigned int uiCancelMsg, char *pcText1, char *pcText2); // idb
char __thiscall mhDiceRateSheetWin::Create(mhDiceRateSheetWin *this, PgFrameWork *pkFrameWork);
// void __userpurge GambleDiceGameWin::OnCommand(GambleDiceGameWin *this@<ecx>, int a2@<edi>, unsigned int wParam, int lParam);
void __thiscall GambleDiceGameWin::AllReset(GambleDiceGameWin *this); // idb
void __thiscall GambleDiceGameWin::ShowResult(GambleDiceGameWin *this, DICE_TAISAI_BETTING index, bool IsSuccess, bool IsNonBetting); // idb
// void __userpurge GambleDiceGameWin::UpdateTimeText(GambleDiceGameWin *this@<ecx>, int a2@<edi>, float fRemainTime, bool IsShow);
void __thiscall GambleDiceGameWin::DiceAnimationStart(GambleDiceGameWin *this, unsigned int *AniCode); // idb
void __thiscall GambleDiceGameWin::SetMarkButton(GambleDiceGameWin *this, DICE_TAISAI_BETTING nPos, BET_STATE bState, bool IsMark); // idb
void __thiscall MiniHouseDiceGameWin::UpdateMeWin(MiniHouseDiceGameWin *this, float fCurTime); // idb
void __thiscall MiniHouseDiceGameWin::UpdateHistory(MiniHouseDiceGameWin *this, char *arrayNum, bool IsClear); // idb
void __thiscall mhDiceRankWin::UpdateMeWin(mhDiceRankWin *this, float fCurTime); // idb
void __thiscall MHDiceRewardMoneyWin::UpdateMeWin(MHDiceRewardMoneyWin *this, float fCurTime); // idb
void __thiscall GambleDiceGameWin::UpdateMeWin(GambleDiceGameWin *this, float fCurTime); // idb
void __thiscall GambleDiceGameWin::UpdateHistory(GambleDiceGameWin *this, char *arrayNum, bool IsClear); // idb
void __thiscall MiniHouseDiceGameWin::MiniHouseDiceGameWin(MiniHouseDiceGameWin *this); // idb
void __thiscall MiniHouseDiceGameWin::~MiniHouseDiceGameWin(MiniHouseDiceGameWin *this); // idb
void __thiscall GambleDiceGameWin::GambleDiceGameWin(GambleDiceGameWin *this); // idb
void __thiscall GambleDiceGameWin::~GambleDiceGameWin(GambleDiceGameWin *this); // idb
BettingBut *__cdecl BettingBut::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, int Pos, char *pcName, unsigned int uiExtStyle); // idb
ToggleBut *__cdecl ToggleBut::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, int Pos, char *pcName, unsigned int uiExtStyle); // idb
MiniHouseDiceGameWin *__cdecl MiniHouseDiceGameWin::CreateWin(PgFrameWork *pkFrameWork); // idb
NiDX92DBufferData *__thiscall MiniHouseDiceGameWin::MakeButton(MiniHouseDiceGameWin *this, NiAVObject *pkObject, const char *pcTriShapeName, int *iLeft, int *iTop, unsigned int uiCmdMsg, NiSourceTexture *pkTexture);
mhMinimizeDiceGameWin *__cdecl mhMinimizeDiceGameWin::CreateWin(PgFrameWork *pkFrameWork); // idb
mhDiceHelpWin *__cdecl mhDiceHelpWin::CreateWin(PgFrameWork *pkFrameWork); // idb
MHDiceRewardMoneyWin *__cdecl MHDiceRewardMoneyWin::CreateWin(PgFrameWork *pkFrameWork, int IsRewardWin); // idb
mhDiceRateSheetWin *__cdecl mhDiceRateSheetWin::CreateWin(PgFrameWork *pkFrameWork); // idb
GambleDiceGameWin *__cdecl GambleDiceGameWin::CreateWin(PgFrameWork *pkFrameWork); // idb
NiDX92DBufferData *__thiscall GambleDiceGameWin::MakeButton(GambleDiceGameWin *this, NiAVObject *pkObject, const char *pcTriShapeName, int *iLeft, int *iTop, unsigned int uiCmdMsg, NiSourceTexture *pkTexture);
char __thiscall MHDiceRewardMoneyWin::Create(MHDiceRewardMoneyWin *this, PgFrameWork *pkFrameWork, int IsRewardWin);
char __thiscall MiniHouseDiceGameWin::Create(MiniHouseDiceGameWin *this, PgFrameWork *pkFrameWork);
char __thiscall GambleDiceGameWin::Create(GambleDiceGameWin *this, PgFrameWork *pkFrameWork);
void __thiscall mhDiceRankWin::mhDiceRankWin(mhDiceRankWin *this); // idb
void __thiscall mhDiceRankWin::~mhDiceRankWin(mhDiceRankWin *this); // idb
mhDiceRankWin *__cdecl mhDiceRankWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall mhDiceRankWin::UpdateList(mhDiceRankWin *this, std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > RankList); // idb
void __thiscall mhDiceRankWin::UpdateViewList(mhDiceRankWin *this); // idb
void __thiscall mhDiceRankWin::OnCommand(mhDiceRankWin *this, unsigned int wParam, int lParam); // idb
char __thiscall mhDiceHelpWin::Create(mhDiceHelpWin *this, PgFrameWork *pkFrameWork);
char __thiscall mhDiceRankWin::Create(mhDiceRankWin *this, PgFrameWork *pkFrameWork);
void __thiscall MHDiceAniActor::MHDiceAniActor(MHDiceAniActor *this); // idb
void __thiscall MHChipEffect::~MHChipEffect(MHChipEffect *this); // idb
void __thiscall mhDiceRankWin::OnSlideBar(mhDiceRankWin *this); // idb
BettingBut *__thiscall BettingBut::`vector deleting destructor'(BettingBut *this, unsigned int a2);
ToggleBut *__thiscall ToggleBut::`scalar deleting destructor'(ToggleBut *this, unsigned int a2);
mhMinimizeDiceGameWin *__thiscall mhMinimizeDiceGameWin::`vector deleting destructor'(mhMinimizeDiceGameWin *this, unsigned int a2);
mhDiceHelpWin *__thiscall mhDiceHelpWin::`vector deleting destructor'(mhDiceHelpWin *this, unsigned int a2);
mhDiceRateSheetWin *__thiscall mhDiceRateSheetWin::`vector deleting destructor'(mhDiceRateSheetWin *this, unsigned int a2);
void __thiscall BettingBut::DoRAction(BettingBut *this); // idb
void __thiscall ToggleBut::DoAction(ToggleBut *this); // idb
void __thiscall BettingBut::SetButShow(BettingBut *this, PgWinBut::ButShow eShow); // idb
MHDiceRewardMoneyWin *__thiscall MHDiceRewardMoneyWin::`vector deleting destructor'(MHDiceRewardMoneyWin *this, unsigned int a2);
MiniHouseDiceGameWin *__thiscall MiniHouseDiceGameWin::`vector deleting destructor'(MiniHouseDiceGameWin *this, unsigned int a2);
GambleDiceGameWin *__thiscall GambleDiceGameWin::`scalar deleting destructor'(GambleDiceGameWin *this, unsigned int a2);
DiceRankInfo *__cdecl std::_Uninit_copy<std::_Vector_const_iterator<std::_Vector_val<DiceRankInfo,std::allocator<DiceRankInfo>>>,DiceRankInfo *,std::allocator<DiceRankInfo>>(std::_Vector_const_iterator<std::_Vector_val<DiceRankInfo,std::allocator<DiceRankInfo> > > _First, std::_Vector_const_iterator<std::_Vector_val<DiceRankInfo,std::allocator<DiceRankInfo> > > _Last, DiceRankInfo *_Dest);
void __thiscall std::vector<SlotJackpotRankInfo,std::allocator<SlotJackpotRankInfo>>::vector<SlotJackpotRankInfo,std::allocator<SlotJackpotRankInfo>>(std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *this, std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *_Right); // idb
mhDiceRankWin *__thiscall mhDiceRankWin::`vector deleting destructor'(mhDiceRankWin *this, unsigned int a2);
void __thiscall MHDiceGameTask::NcGambleSlotmachineGameLeaveReq(MHDiceGameTask *this); // idb
void __stdcall MHDiceGameTask::NcGambleSlotmachineStartReq(PROTO_NC_GAMBLE_SLOTMACHINE_START_REQ *pkProto);
void __thiscall MHDiceGameTask::NcGambleSlotmachineStopbuttonReq(MHDiceGameTask *this); // idb
void __thiscall MHDiceGameTask::NcGambleSlotmachineWheelstopReq(MHDiceGameTask *this); // idb
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_START_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_SLOTMACHINE_START_ACK *pkProto); // idb
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_STOPBUTTON_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_SLOTMACHINE_STOPBUTTON_ACK *pkProto); // idb
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_WHEELSTOP_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_SLOTMACHINE_WHEELSTOP_ACK *pkProto); // idb
int __stdcall MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_STAND_UP_CMD(PROTO_NC_GAMBLE_SLOTMACHINE_STAND_UP_CMD *pkProto);
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_JACKPOTINFO_CMD(MHDiceGameTask *this, PROTO_NC_GAMBLE_SLOTMACHINE_JACKPOTINFO_CMD *pkProto); // idb
void __thiscall MHDiceGameTask::NcGambleSlotmachineJackpotRankReq(MHDiceGameTask *this); // idb
void __thiscall MHDiceGameTask::NcGambleSlotmachineWinRankReq(MHDiceGameTask *this); // idb
void __thiscall MHDiceGameTask::UpdateSlotMachineGame(MHDiceGameTask *this, float fTime); // idb
void MHDiceGameTask::OpenSlotMachineWin();
void __thiscall MHDiceGameTask::OpenSlotHelpWin(MHDiceGameTask *this); // idb
void __stdcall MHDiceGameTask::NcGambleSlotmachineGameJoinReq(PROTO_NC_GAMBLE_SLOTMACHINE_GAME_JOIN_REQ *pkProto);
PgFrameWork *__thiscall MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_GAME_JOIN_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_SLOTMACHINE_GAME_JOIN_ACK *pkProto);
Char *__stdcall MHDiceGameTask::Recv_NC_GAMBLE_PLAYERACT_CMD(PROTO_NC_GAMBLE_PLAYERACT_CMD *pkProto);
void __stdcall MHDiceGameTask::AddMsg(char *pcText, bool Sysmsg, bool AnnounceMsg);
int __stdcall MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_SOMEONE_GET_JACKPOT_CMD(PROTO_NC_GAMBLE_SLOTMACHINE_SOMEONE_GET_JACKPOT_CMD *pkProto);
void __thiscall MHDiceGameTask::ShutDownSlotMachine(MHDiceGameTask *this); // idb
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_GAME_LEAVE_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_SLOTMACHINE_GAME_LEAVE_ACK *pkProto); // idb
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_WINRANKING_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_SLOTMACHINE_WINRANKING_ACK *pkProto); // idb
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_JACKPOTRANKING_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_SLOTMACHINE_JACKPOTRANKING_ACK *pkProto); // idb
void __thiscall GBSlotRankWin::OnTAB1(GBSlotRankWin *this); // idb
void __thiscall GBSlotRankWin::OnTAB2(GBSlotRankWin *this); // idb
SlotJackpotRankInfo *__cdecl std::_Move<SlotJackpotRankInfo *,SlotJackpotRankInfo *>(SlotJackpotRankInfo *_First, SlotJackpotRankInfo *_Last, SlotJackpotRankInfo *_Dest);
DiceRankInfo *__cdecl std::_Uninit_move<SlotJackpotRankInfo *,SlotJackpotRankInfo *,std::allocator<SlotJackpotRankInfo>,SlotJackpotRankInfo>(DiceRankInfo *_First, DiceRankInfo *_Last, DiceRankInfo *_Dest);
void __thiscall GBSlotRankWin::UpdateJackpotRankList(GBSlotRankWin *this, PROTO_NC_GAMBLE_SLOTMACHINE_JACKPOTRANKING_ACK *pkProto); // idb
void __thiscall GBSlotRankWin::UpdateWinRankList(GBSlotRankWin *this, PROTO_NC_GAMBLE_SLOTMACHINE_WINRANKING_ACK *pkProto); // idb
char __thiscall CEaseInOutInterpolation::Setup(CEaseInOutInterpolation *this, float from, float to, float time);
BOOL __thiscall CEaseInOutInterpolation::Interpolate(CEaseInOutInterpolation *this, float deltaTime);
char __thiscall CEaseInOutInterpolation::SetupWithDist(CEaseInOutInterpolation *this, float dist, float time, float speed);
bool __thiscall CEaseInOutInterpolation::InterpoateWithDist(CEaseInOutInterpolation *this, float deltaTime); // idb
void __thiscall SlotEntry::setMaxSpeed(SlotEntry *this, float speed); // idb
void __thiscall SlotEntry::roll(SlotEntry *this); // idb
void __thiscall SlotMachineWin::Spin(SlotMachineWin *this, bool bSucceed); // idb
void __thiscall SlotMachineWin::Stop(SlotMachineWin *this, int *result); // idb
void __thiscall SlotMachineWin::ResetCoin(SlotMachineWin *this); // idb
void __thiscall SlotMachineWin::UpdateCoin(SlotMachineWin *this, __int64 *from, __int64 *to, SlotMachineWin::COIN_TYPE type, bool immediately); // idb
bool __thiscall SlotMachineWin::canExit(SlotMachineWin *this); // idb
void __thiscall SlotMachineWin::SetCoin(SlotMachineWin *this, __int64 nCoin); // idb
void __thiscall SlotMachineWin::SetJackPotCoin(SlotMachineWin *this, PROTO_NC_GAMBLE_SLOTMACHINE_JACKPOTINFO_CMD *pkProto); // idb
void __thiscall SlotMachineWin::WheelStop(SlotMachineWin *this, PROTO_NC_GAMBLE_SLOTMACHINE_WHEELSTOP_ACK *pkProto); // idb
void __thiscall GBSlotRankWin::DirectMessage(GBSlotRankWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall MiniSlotMachineWin::MiniSlotMachineWin(MiniSlotMachineWin *this); // idb
void __thiscall MiniSlotMachineWin::~MiniSlotMachineWin(MiniSlotMachineWin *this); // idb
void __thiscall GBSlotHelpWin::GBSlotHelpWin(GBSlotHelpWin *this); // idb
void __thiscall GBSlotHelpWin::~GBSlotHelpWin(GBSlotHelpWin *this); // idb
void __thiscall GBSlotHelpWin::UpdateMeWin(GBSlotHelpWin *this, float fCurTime); // idb
void __thiscall SlotEntry::setAlpha(SlotEntry *this, float fAlpha); // idb
void __thiscall SlotMachineWin::SlotMachineWin(SlotMachineWin *this); // idb
char __thiscall SlotMachineWin::SendBettingInfo(SlotMachineWin *this);
void __thiscall GBSlotRankWin::UpdateMeWin(GBSlotRankWin *this, float fCurTime); // idb
void __stdcall MiniSlotMachineWin::OnCommand(unsigned int wParam, int lParam);
void __stdcall MiniSlotMachineWin::UpdateMeWin(float fCurTime);
void __thiscall GBSlotHelpWin::CloseWin(GBSlotHelpWin *this); // idb
void __thiscall GBSlotHelpWin::OnSlideBar(GBSlotHelpWin *this); // idb
void __thiscall SlotEntry::reset(SlotEntry *this); // idb
void __thiscall SlotEntry::setup(SlotEntry *this, NiAVObject *pkNode, char *pcTag, PgWin *pkParent, float speed, float time); // idb
void __thiscall SlotEntry::update(SlotEntry *this, float fTime); // idb
void __thiscall SlotEntry::stop(SlotEntry *this, int num); // idb
void __thiscall SlotMachineWin::~SlotMachineWin(SlotMachineWin *this); // idb
char __thiscall SlotMachineWin::Create(SlotMachineWin *this, PgFrameWork *pkFrameWork);
void __thiscall SlotMachineWin::Betting(SlotMachineWin *this, SlotMachineWin::BETTING_TYPE bet); // idb
void __thiscall SlotMachineWin::InitMachine(SlotMachineWin *this); // idb
void __thiscall SlotMachineWin::UpdateResult(SlotMachineWin *this, float fCurTime); // idb
void __thiscall SlotMachineWin::ProcessMeInput(SlotMachineWin *this, bool *bHit); // idb
char __thiscall MiniSlotMachineWin::Create(MiniSlotMachineWin *this, PgFrameWork *pkFrameWork);
void __thiscall GBSlotHelpWin::OnCommand(GBSlotHelpWin *this, unsigned int wParam, int lParam); // idb
void __thiscall SlotMachineWin::OnCommand(SlotMachineWin *this, unsigned int wParam, int lParam); // idb
void __thiscall SlotMachineWin::UpdateMeWin(SlotMachineWin *this, float fCurTime); // idb
SlotMachineWin *__cdecl SlotMachineWin::CreateWin(PgFrameWork *pkFrameWork); // idb
MiniSlotMachineWin *__cdecl MiniSlotMachineWin::CreateWin(PgFrameWork *pkFrameWork); // idb
GBSlotHelpWin *__cdecl GBSlotHelpWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall GBSlotRankWin::GBSlotRankWin(GBSlotRankWin *this); // idb
void __thiscall GBSlotRankWin::~GBSlotRankWin(GBSlotRankWin *this); // idb
GBSlotRankWin *__cdecl GBSlotRankWin::CreateWin(PgFrameWork *pkFrameWork); // idb
void __thiscall GBSlotRankWin::UpdateList(GBSlotRankWin *this, std::vector<SlotJackpotRankInfo,std::allocator<SlotJackpotRankInfo> > RankList); // idb
void __thiscall GBSlotRankWin::UpdateViewList(GBSlotRankWin *this); // idb
void __thiscall GBSlotRankWin::OnCommand(GBSlotRankWin *this, unsigned int wParam, int lParam); // idb
char __thiscall GBSlotRankWin::Create(GBSlotRankWin *this, PgFrameWork *pkFrameWork);
char __thiscall GBSlotHelpWin::Create(GBSlotHelpWin *this, PgFrameWork *pkFrameWork);
void __thiscall GBSlotRankWin::OnSlideBar(GBSlotRankWin *this); // idb
void __thiscall SlotEntry::SlotEntry(SlotEntry *this); // idb
void __thiscall SlotEntry::~SlotEntry(SlotEntry *this); // idb
MiniSlotMachineWin *__thiscall MiniSlotMachineWin::`vector deleting destructor'(MiniSlotMachineWin *this, unsigned int a2);
GBSlotHelpWin *__thiscall GBSlotHelpWin::`vector deleting destructor'(GBSlotHelpWin *this, unsigned int a2);
SlotMachineWin *__thiscall SlotMachineWin::`vector deleting destructor'(SlotMachineWin *this, unsigned int a2);
void __thiscall mhDiceRankWin::ProcessMeInput(ChatBlockListWin *this, bool *bHit); // idb
GBSlotRankWin *__thiscall GBSlotRankWin::`vector deleting destructor'(GBSlotRankWin *this, unsigned int a2);
bool __thiscall MoverSlot::IsView(MoverSlot *this); // idb
void __thiscall Mover::Affect(Mover *this, AbStateInst *pkAbState, bool bNoVisual); // idb
bool __thiscall Mover::IsMoverMovable(Mover *this); // idb
bool __thiscall Mover::IsFeed(Mover *this); // idb
bool __thiscall Mover::IsAbility(Mover *this); // idb
void __thiscall MoverSlot::Act(MoverSlot *this, CharAniType eType); // idb
void __thiscall MoverSlot::RideOff(MoverSlot *this); // idb
Char *__thiscall Mover::GetSlotChar(Mover *this, unsigned int uiSlot); // idb
NiPointer<NiNode> *__thiscall Mover::GetSlotNode(Mover *this, NiPointer<NiNode> *result, unsigned int uiSlot); // idb
void __thiscall Mover::ActSlot(Mover *this, CharAniType eType); // idb
void __thiscall Mover::RideOn(Mover *this, Char *pkChar, unsigned int uiSlot); // idb
void __thiscall Mover::RideOff(Mover *this, unsigned int uiSlot); // idb
void __thiscall Mover::RideAllOff(Mover *this); // idb
AbStateInfectee::AbstateColor __thiscall Mover::GetAbstateColor(Mover *this, unsigned int *a2);
char __thiscall Mover::IsEmptySlot(Mover *this);
bool __thiscall Mover::IsSlotView(Mover *this, unsigned int uiSlot, bool bEffect); // idb
char __thiscall Mover::GetNextSlot(Mover *this, unsigned int *uiSlot);
void __thiscall MoverSlot::~MoverSlot(MoverSlot *this); // idb
// void __userpurge Mover::Update(Mover *this@<ecx>, NiPoint3 *a2@<edi>, float fTime);
// void __usercall Mover::ActStand(Mover *this@<ecx>, int a2@<ebx>, int a3@<edi>);
// void __usercall Mover::ActWalk(Mover *this@<ecx>, int a2@<ebx>, int a3@<edi>, double a4@<st0>);
// void __usercall Mover::ActRun(Mover *this@<ecx>, int a2@<ebx>, int a3@<edi>, double a4@<st0>);
char __thiscall Mover::ActJump(Mover *this);
// void __usercall Mover::ActDamage1(Mover *this@<ecx>, int a2@<ebx>, int a3@<edi>);
// void __usercall Mover::ActCriticalStun(Mover *this@<ecx>, int a2@<ebx>, int a3@<edi>);
void __thiscall Mover::SetMoverEffect(Mover *this, bool bShow, Mover *pkMover, char nGrade); // idb
void __thiscall MoverSlot::MoverSlot(MoverSlot *this, const unsigned int uiSlot); // idb
void __thiscall Mover::Mover(Mover *this); // idb
void __thiscall Mover::~Mover(Mover *this); // idb
MoverSlot *__cdecl MoverSlot::Create(NiPointer<NiNode> spSlotNode, NiPointer<NiNode> spHideNode, const unsigned int uiSlot, const char *pcMoverIdx, const char *pcMoverTypeIdx); // idb
char __thiscall Mover::Init(Mover *this, unsigned int kMoverID, unsigned __int16 kMoverHandle, int iHP);
char __thiscall Mover::InitView(Mover *this, int bEquip, unsigned int uiFrame);
char __thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *this, unsigned int key, NiVBSet **val);
void __thiscall MoverSlot::SetSlotNode(MoverSlot *this, NiPointer<NiNode> spSlotNode); // idb
NiPointer<NiNode> *__thiscall MoverSlot::GetSlotNode(MoverSlot *this, NiPointer<NiNode> *result); // idb
void __thiscall MoverSlot::SetHideNode(MoverSlot *this, NiPointer<NiNode> spHideNode); // idb
NiPointer<NiNode> *__thiscall MoverSlot::GetHideNode(MoverSlot *this, NiPointer<NiNode> *result); // idb
void __thiscall NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::~NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>(NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum CharAniType,MoverSlot::sSlotAniCode *> *this); // idb
NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum CharAniType,MoverSlot::sSlotAniCode *> *__thiscall NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::`vector deleting destructor'(NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum CharAniType,MoverSlot::sSlotAniCode *> *this, unsigned int a2);
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<enum  CharAniType,MoverSlot::sSlotAniCode *>::`vector deleting destructor'(NiTMap<enum CharAniType,MoverSlot::sSlotAniCode *> *this, unsigned int a2);
BOOL __thiscall Mover::IsEndPathFinding(Mover *this);
Mover *__thiscall Mover::`vector deleting destructor'(char *this, unsigned int a2);
Mover *__thiscall Mover::`vector deleting destructor'(char *this, unsigned int a2);
Mover *__thiscall Mover::`scalar deleting destructor'(Mover *this, unsigned int a2);
MoverSlotView *__cdecl MoverSlotViewTab::GetByMoverIdx(const char *pcMoverIdx, unsigned int uiSlot); // idb
unsigned int __cdecl MoverSlotCharAniTab::GetCountByMoverTypeIdx(const char *pcMoverTypeIdx);
MoverAbility *__cdecl MoverAbilityTab::GetByMoverIdx(const char *pcMoverIdx); // idb
HRESULT __stdcall StringVPrintfWorkerW(wchar_t *pszDest, unsigned int cchDest, const wchar_t *pszFormat, char *argList); // idb
HRESULT StringCbPrintfW(wchar_t *pszDest, unsigned int cbDest, const wchar_t *pszFormat, ...); // idb
void __thiscall std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::_Chassign(std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *this, unsigned int _Off, unsigned int _Count, wchar_t _Ch); // idb
std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *__thiscall std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::erase(std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *this, unsigned int _Off, unsigned int _Count); // idb
void __thiscall std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::_Copy(std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *this, unsigned int _Newsize, unsigned int _Oldlen); // idb
void __thiscall std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::~basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>(std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *this); // idb
std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *__thiscall std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::append(std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *this, unsigned int _Count, wchar_t _Ch); // idb
std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *__thiscall std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::append(std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *this, std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *_Right, unsigned int _Roff, unsigned int _Count); // idb
std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *__thiscall std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::assign(std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *this, std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *_Right, unsigned int _Roff, unsigned int _Count); // idb
std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *__thiscall std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::assign(std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *this, const wchar_t *_Ptr, unsigned int _Count); // idb
std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *__thiscall std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::append(std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *this, const wchar_t *_Ptr, unsigned int _Count); // idb
void __cdecl CallSpawnerJS(std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *command); // idb
std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *__cdecl CallSpawnerJSAndReturnValue(std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *result, std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *command); // idb
void __thiscall CMD5Checksum::~CMD5Checksum(CMD5Checksum *this); // idb
CMD5Checksum *__thiscall CMD5Checksum::`vector deleting destructor'(CMD5Checksum *this, unsigned int a2);
void __thiscall CMD5Checksum::Transform(CMD5Checksum *this, char *Block); // idb
void __thiscall CMD5Checksum::Update(CMD5Checksum *this, char *Input, unsigned int nInputLen); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall CMD5Checksum::Final(CMD5Checksum *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__cdecl CMD5Checksum::GetMD5(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result, char *pBuf, unsigned int nLength); // idb
void __thiscall CDataReader::CDataReader(CDataReader *this); // idb
void __thiscall CDataReader::ClearBF(CDataReader *this); // idb
void __cdecl CDataReader::Encription(char *pBF, unsigned int nSize); // idb
char *__thiscall CDataReader::GetRecord(CDataReader *this, unsigned int RecordNo);
void __thiscall CDataReader::~CDataReader(CDataReader *this); // idb
CDataReader *__thiscall CDataReader::`scalar deleting destructor'(CDataReader *this, unsigned int a2);
int __thiscall CDataReader::Read(CDataReader *this, const char *pFN); // idb
int __thiscall CDataReader::Read(CDataReader *this, const char *pFN, unsigned int nVersionKey, unsigned int nStructSize); // idb
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned short>>,0>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned short>>(std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > *this, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> *_Val); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned short>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > _Where, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *_Node); // idb
unsigned __int16 *__thiscall std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned short>>>::operator[](std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> > > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Keyval); // idb
int __thiscall CSingleDataMap::InitSingleDataArray(CSingleDataMap *this, const char *pFN, unsigned int nVersionKey, unsigned int nStructSize); // idb
__int16 __thiscall CSingleDataMap::GetValue(CSingleDataMap *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > sIndex);
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Min(std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Pnode); // idb
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>,std::_Iterator_base0>::operator--(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >,std::_Iterator_base0> *this); // idb
void __thiscall std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::_Rrotate(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Wherenode); // idb
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Lbound(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Keyval); // idb
void __thiscall std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>(NsPathMaker *this); // idb
void __cdecl std::_Dest_val<std::allocator<GTRequestListWin::GuildInfo>,GTRequestListWin::GuildInfo>(std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *_Alval, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > *_Pdest); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Newnode); // idb
void __thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Erase(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Rootnode); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::erase(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > _Where); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Node, bool _Leftish); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > _Where, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Node); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::erase(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > _Last); // idb
void __thiscall std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>>::~map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>>(std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > > *this); // idb
void __thiscall ItemMixData::~ItemMixData(ItemMixData *this); // idb
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>(std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > *_Val); // idb
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>(std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > *_Val); // idb
void __thiscall ItemMixData::ItemMixData(ItemMixData *this); // idb
int __thiscall ItemMixData::Read(ItemMixData *this, const char *pFN, unsigned int nVersionKey, unsigned int nStructSize); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>>::operator[](std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Keyval); // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall ItemMixData::GetMixItemIndex(ItemMixData *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *sRawItemIndex);
void __thiscall CQuest::~CQuest(CQuest *this); // idb
char *__thiscall CQuest::InitQuestBF(CQuest *this, int NumOfQuest);
void __thiscall CQuest::ClearQuest(CQuest *this); // idb
PLAYER_QUEST_INFO *__thiscall CQuest::GetQuestInfo(CQuest *this, unsigned __int16 nID); // idb
int __thiscall CQuest::SetQuestInfo(CQuest *this, PLAYER_QUEST_INFO *pQuestInfo); // idb
int __thiscall CQuest::AddQuestInfo(CQuest *this, PLAYER_QUEST_INFO *pQuestInfo); // idb
void __thiscall CQuest::SetQuestClear(CQuest *this, unsigned __int16 nID); // idb
QUEST_DATA *__thiscall CQuest::SetQuestAccept(CQuest *this, unsigned __int16 nID);
int __thiscall CQuest::SetQuestCancel(CQuest *this, unsigned __int16 nID); // idb
int __thiscall CQuest::SetQuestProgress(CQuest *this, unsigned __int16 nID, char ProgressStep); // idb
int __thiscall CQuest::SetQuestFailed(CQuest *this, unsigned __int16 nID); // idb
QUEST_DATA *__thiscall CQuest::SetQuestDone(CQuest *this, PLAYER_QUEST_INFO *pQuestInfo);
int __thiscall CQuest::SetQuestAbort(CQuest *this, unsigned __int16 nID); // idb
int __thiscall CQuest::Recv_NC_CHAR_QUEST_DOING_CMD_ACK(CQuest *this, PROTO_NC_CHAR_QUEST_DOING_CMD *pQuestPlayerDoingData); // idb
int __thiscall CQuest::Recv_NC_CHAR_QUEST_DONE_CMD_ACK(CQuest *this, PROTO_NC_CHAR_QUEST_DONE_CMD *pQuestPlayerDoneData); // idb
int __thiscall CQuest::Recv_NC_QUEST_GIVE_UP_ACK(CQuest *this, PROTO_NC_QUEST_GIVE_UP_ACK *pAck); // idb
int __thiscall CQuest::Recv_NC_CHAR_QUEST_READ_CMD_ACK(CQuest *this, PROTO_NC_CHAR_QUEST_READ_CMD *pQuestPlayerReadData); // idb
int __thiscall CQuest::Recv_NC_CHAR_QUEST_REPEAT_CMD_ACK(CQuest *this, PROTO_NC_CHAR_QUEST_REPEAT_CMD *pQuestPlayerRepeatData); // idb
int __thiscall CQuest::Send_NC_QUEST_CLIENT_SCENARIO_DONE_REQ(CQuest *this, int nScenarioID);
int __thiscall CQuest::Recv_NC_QUEST_CLIENT_SCENARIO_DONE_ACK(CQuest *this, PROTO_NC_QUEST_CLIENT_SCENARIO_DONE_ACK *pAck); // idb
void __thiscall CQuest::Recv_NC_QUEST_NOTIFY_MOB_KILL_CMD(CQuest *this, PROTO_NC_QUEST_NOTIFY_MOB_KILL_CMD *pCmd); // idb
int __thiscall CQuest::QuestPlayer_LevelChange(CQuest *this, int nPlayerLevel);
BOOL __stdcall CQuest::IsQuestArea(unsigned int CurrentX, unsigned int CurrentY, unsigned int QuestX, unsigned int QuestY, unsigned int QuestRange);
QUEST_DATA *__stdcall CQuest::IsQuestNPCMob(QUEST_DATA *lpQuestData, unsigned __int16 nNPCID);
int __stdcall CQuest::IsConversationNPCMob(QUEST_DATA *lpQuestData, unsigned __int16 nNPCID);
unsigned __int16 __stdcall CQuest::GetRewardNPC(QUEST_DATA *lpQuestData);
int __thiscall CQuest::IsSoonableQuest(CQuest *this, QUEST_DATA *lpQuestData); // idb
int __thiscall CQuest::IsDoingableQuest(CQuest *this, QUEST_DATA *lpQuestData); // idb
int __thiscall CQuest::IsDoingableQuest(CQuest *this, unsigned __int16 hQuestID); // idb
int __thiscall CQuest::IsRewardAbleQuest(CQuest *this, PLAYER_QUEST_INFO *pQuestInfo); // idb
char __thiscall CQuest::IsSoonableDailyQuest(CQuest *this, PLAYER_QUEST_INFO *pQuestInfo); // idb
void __thiscall CQuest::CQuest(CQuest *this, CQuestData *pQuestData); // idb
QUEST_DATA *__thiscall CQuest::SetQuestDone(CQuest *this, unsigned __int16 nID);
int __thiscall CQuest::GetNewQuestStatus(CQuest *this, QUEST_DATA *lpQuestData);
QUEST_DATA *__thiscall CQuest::GetNewQuestStatus(CQuest *this, unsigned __int16 nID);
int __thiscall CQuest::IsDoingQuest(CQuest *this, unsigned __int16 hQuestID); // idb
PLAYER_QUEST_STATUS __thiscall CQuest::DoingQuestUpdateStatus(CQuest *this, int nIndex); // idb
int __thiscall CQuest::GetQuestStatusWithNPC(CQuest *this, CQuest::NPC_QUEST_STATUS *kQuestStatus, QUEST_DATA *lpQuestData, unsigned int uiMainCharLv, bool bQmark, bool bLowRepeat); // idb
int __thiscall CQuest::QuestPlayer_NPCMobKill(CQuest *this, int nMobID, const unsigned __int16 nQuestID);
int __thiscall CQuest::QuestPlayer_TakeItem(CQuest *this, int nItemID, int nCurrentLot);
int __thiscall CQuest::QuestPlayer_DestroyItem(CQuest *this, int nItemID, int nCurrentLot);
int __thiscall CQuest::QuestPlayer_CheckLocation(CQuest *this); // idb
int __thiscall CQuest::QuestPlayer_ScenarioDone(CQuest *this, int nScenarioID);
int __thiscall CQuest::QuestPlayer_RaceChange(CQuest *this, int nRace);
int __thiscall CQuest::QuestPlayer_ClassChange(CQuest *this, int nClass);
int __thiscall CQuest::QuestPlayer_TimeProcess(CQuest *this); // idb
void __thiscall CQuest::AllDoingQuestUpdateStatus(CQuest *this); // idb
int __thiscall CQuest::GetQuestListWithNPC(CQuest *this, unsigned __int16 hNCPID); // idb
void __thiscall CQuest::GetQuestStatusWithNPC(CQuest *this, CQuest::NPC_QUEST_STATUS *kQuestStatus, PLAYER_QUEST_STATUS eDontWantStatus, unsigned int uiMainCharLv, bool bLowRepeat); // idb
char __thiscall ShineObjectHandleUnion::sohu_HandleSplit(ShineObjectHandleUnion *this, unsigned __int16 *hnd); // idb
void __thiscall CWeaponTitle::CWeaponTitle(CWeaponTitle *this); // idb
int __thiscall CWeaponTitle::Read(CWeaponTitle *this, const char *pFN, unsigned int nVersionKey, unsigned int nStructSize); // idb
int __thiscall CWeaponTitle::GetMaxLevel(CWeaponTitle *this, unsigned __int16 MobID);
unsigned int __thiscall CWeaponTitle::GetLevel(CWeaponTitle *this, unsigned __int16 MobID, unsigned int MobKillCount); // idb
WEAPON_TITLE_DATA *__thiscall CWeaponTitle::GetLevelData(CWeaponTitle *this, unsigned __int16 MobID, unsigned int MobKillCount, unsigned int *pLevel); // idb
WEAPON_TITLE_DATA *__thiscall CWeaponTitle::GetPrevLevelData(CWeaponTitle *this, unsigned __int16 MobID, unsigned int dwLevel); // idb
WEAPON_TITLE_DATA *__thiscall CWeaponTitle::GetData(CWeaponTitle *this, unsigned __int16 MobID, unsigned int Level); // idb
void __thiscall CWeaponTitle::~CWeaponTitle(CWeaponTitle *this); // idb
int __thiscall CCharacterTitleData::Read(CCharacterTitleData *this, const char *pFN, unsigned int nVersionKey, unsigned int nStructSize); // idb
char *__thiscall CCharacterTitleData::GetTitleString(CCharacterTitleData *this, char Type, char ElementNo);
void __thiscall CShnDataFileCheckSum::_unnamed_type_CheckSumData_::_unnamed_type_CheckSumData_($1C13CF29CE6EB6434BA18BBEB785AFFD *this); // idb
char __thiscall CShnDataFileCheckSum::InitDataFileCheckSum(CShnDataFileCheckSum *this, const char *FileName, Name8 nCheckSum); // idb
Name8 *__thiscall CShnDataFileCheckSum::GetDataFileCheckSum(CShnDataFileCheckSum *this, SHN_DATA_FILE_INDEX Index); // idb
char *__thiscall CShnDataFileCheckSum::GetDataFileName(CShnDataFileCheckSum *this, SHN_DATA_FILE_INDEX Index); // idb
void __thiscall CShnDataFileCheckSum::CShnDataFileCheckSum(CShnDataFileCheckSum *this); // idb
int __thiscall CChatRestrict::Del(CChatRestrict *this, Name5 *pCharID); // idb
PROTO_CHAT_RESTRICT_INFO *__thiscall CChatRestrict::Get(CChatRestrict *this, Name5 *pCharID); // idb
void __thiscall CChatRestrict::CChatRestrict(CChatRestrict *this); // idb
void __thiscall CChatRestrict::~CChatRestrict(CChatRestrict *this); // idb
int __thiscall CChatRestrict::Add(CChatRestrict *this, PROTO_CHAT_RESTRICT_INFO *pInfo); // idb
void __thiscall CItemAuthorityBase::CItemAuthorityBase(CItemAuthorityBase *this); // idb
void __thiscall CItemAuthorityBase::~CItemAuthorityBase(CItemAuthorityBase *this); // idb
int __thiscall CItemAuthorityBase::IA_CanPlayerTrade(CItemAuthorityBase *this, E_BelongType eType, SHINE_PUT_ON_BELONGED_ITEM eBelongState); // idb
int __thiscall CItemAuthorityBase::IA_CanNpcSell(CItemAuthorityBase *this, E_BelongType eType); // idb
int __thiscall CItemAuthorityBase::IA_CanStorage(CItemAuthorityBase *this, E_BelongType eType, SHINE_PUT_ON_BELONGED_ITEM eBelongState, unsigned __int16 FromInven, unsigned __int16 ToInven); // idb
int __thiscall CItemAuthorityBase::IA_IsWorkChrBelonged(CItemAuthorityBase *this, E_BelongType eType, SHINE_PUT_ON_BELONGED_ITEM eBelongState); // idb
int __thiscall CItemAuthorityBase::IA_IsWorkAccBelonged(CItemAuthorityBase *this, E_BelongType eType, SHINE_PUT_ON_BELONGED_ITEM eBelongState); // idb
int __thiscall CItemAuthorityBase::IA_IsDataPutOnBelonged(CItemAuthorityBase *this, E_BelongType eType); // idb
int __thiscall CItemAuthorityBase::IA_IsDataChrBelonged(CItemAuthorityBase *this, E_BelongType eType); // idb
int __thiscall CItemAuthorityBase::IA_IsDataAccBelonged(CItemAuthorityBase *this, E_BelongType eType); // idb
CItemAuthorityBase *__thiscall CItemAuthorityBase::`scalar deleting destructor'(CItemAuthorityBase *this, unsigned int a2);
E_RELOC_ERR *__thiscall CItemAuthorityBase::IA_CanInvenReloc(CItemAuthorityBase *this, E_BelongType eType, SHINE_PUT_ON_BELONGED_ITEM eBelongState, unsigned __int16 FromInven, unsigned __int16 ToInven, E_RELOC_ERR *eRelocErr);
void __thiscall CChargedItem::CChargedItem(CChargedItem *this); // idb
void __thiscall CChargedItem::Clear(CChargedItem *this); // idb
int __thiscall CChargedItem::Add(CChargedItem *this, PROTO_CHARGED_ITEM_INFO *pInfo); // idb
int __thiscall CChargedItem::Del(CChargedItem *this, PROTO_CHARGED_ITEM_INFO *pInfo); // idb
PROTO_CHARGED_ITEM_INFO *__thiscall CChargedItem::Find(CChargedItem *this, unsigned int ItemOrderNo); // idb
PROTO_CHARGED_ITEM_INFO *__thiscall CChargedItem::Seek(CChargedItem *this, int Index); // idb
const char *__thiscall CQuestData::GetDialog(CQuestData *this, unsigned int nID); // idb
QUEST_DATA *__thiscall CQuestData::GetQuestDataByIndex(CQuestData *this, unsigned int Index); // idb
CBaseObject **__stdcall std::allocator<QUEST_DATA *>::allocate(unsigned int _Count);
std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *__cdecl std::_Uninit_move<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>> *,std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>> *,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>,std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>(std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *_First, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *_Last, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *_Dest);
std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *__thiscall std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::lower_bound(std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,0> > *this, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *result, const unsigned __int16 *_Keyval); // idb
std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *__thiscall std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::upper_bound(std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *this, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *result, const unsigned __int16 *_Keyval); // idb
std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *__stdcall std::_List_val<std::pair<unsigned short const,QUEST_DATA *>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>>::_Buynode<std::pair<unsigned short,QUEST_DATA *>>(std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *_Next, std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *_Prev, std::pair<unsigned short,QUEST_DATA *> *_Val);
char __thiscall CQuestData::GetMobIdAssociatedWithQuestData(CQuestData *this, unsigned __int16 MobId, std::vector<QUEST_DATA *,std::allocator<QUEST_DATA *> > *rQuestList);
void __thiscall std::vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>::_Insert_n(std::vector<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,std::allocator<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > > > *this, std::_Vector_const_iterator<std::_Vector_val<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,std::allocator<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > > > > _Where, unsigned int _Count, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *_Val); // idb
QUEST_DATA *__thiscall CQuestData::GetQuestData(CQuestData *this, unsigned __int16 QuestID); // idb
const char *__thiscall CQuestData::GetQuestName(CQuestData *this, unsigned __int16 QuestID); // idb
void __thiscall std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::~_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>(std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *this); // idb
void __thiscall std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,0>>::_Check_size(std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,0> > *this); // idb
void __thiscall std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::_Check_size(std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *this); // idb
void __thiscall std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::clear(std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *this); // idb
void __thiscall std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,0>>::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,0>>(std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *this, stdext::hash_compare<unsigned short,std::less<unsigned short> > *_Parg, std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > *_Al); // idb
std::pair<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,bool> *__thiscall std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,0>>::_Insert(std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,0> > *this, std::pair<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,bool> *result, std::pair<unsigned short const ,QUEST_DATA *> *_Val, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > _Plist); // idb
void __thiscall std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,0>>::_Reinsert(std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,0> > *this, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > _Last); // idb
std::pair<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,bool> *__thiscall std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::_Insert(std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *this, std::pair<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,bool> *result, std::pair<unsigned short const ,QUEST_DATA *> *_Val, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > _Plist); // idb
void __thiscall std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::_Reinsert(std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *this, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > _Last); // idb
void __thiscall CQuestData::ClearBF(CQuestData *this); // idb
void __thiscall CQuestData::CQuestData(CQuestData *this, CDataReader *pQuestDialog); // idb
void __thiscall CQuestData::~CQuestData(CQuestData *this); // idb
void __thiscall CQuestData::QuestData_HashDataIn(CQuestData *this); // idb
_iobuf *__thiscall CQuestData::ReadModeRead(CQuestData *this, const char *pFN);
_iobuf *__thiscall CQuestData::ReadModeEdit(CQuestData *this, const char *pFN);
_iobuf *__thiscall CQuestData::Read(CQuestData *this, const char *pFN, int bReadonly);
void __thiscall PROTO_FRIEND_INFO::PROTO_FRIEND_INFO(PROTO_FRIEND_INFO *this); // idb
PROTO_FRIEND_INFO *__thiscall PROTO_FRIEND_INFO::operator=(PROTO_FRIEND_INFO *this, PROTO_FRIEND_INFO *__that); // idb
int __thiscall CFriend::Del(CFriend *this, Name5 *pCharID); // idb
PROTO_FRIEND_INFO *__thiscall CFriend::Get(CFriend *this, Name5 *pCharID); // idb
int __thiscall CFriend::Login(CFriend *this, Name5 *pCharID); // idb
int __thiscall CFriend::MapChange(CFriend *this, Name5 charid, Name3 *pMapName); // idb
int __thiscall CFriend::PartyChange(CFriend *this, Name5 charid, char IsParty); // idb
int __thiscall CFriend::LevelChange(CFriend *this, Name5 charid, char Level); // idb
void __thiscall CFriend::CFriend(CFriend *this); // idb
void __thiscall CFriend::~CFriend(CFriend *this); // idb
int __thiscall CFriend::Add(CFriend *this, PROTO_FRIEND_INFO *pInfo); // idb
int __thiscall CFriend::Logout(CFriend *this, Name5 *pCharID); // idb
void __thiscall CHolyPromise::ClearUp(CHolyPromise *this); // idb
void __thiscall CHolyPromise::ClearMember(CHolyPromise *this); // idb
int __stdcall CHolyPromise::IsDelPenlety(PROTO_HOLY_PROMISE_DATE *pLoginInfo);
void __thiscall CHolyPromise::DelUp(CHolyPromise *this); // idb
int __thiscall CHolyPromise::SetMember(CHolyPromise *this, PROTO_HOLY_PROMISE_INFO *pInfo); // idb
int __thiscall CHolyPromise::DelMember(CHolyPromise *this, Name5 *pCharID); // idb
CHolyPromise *__thiscall CHolyPromise::Get(CHolyPromise *this, Name5 *pCharID, int *pBFIndex);
int __thiscall CHolyPromise::Del(CHolyPromise *this, Name5 *pCharID); // idb
int __stdcall CHolyPromise::Logout(PROTO_HOLY_PROMISE_INFO *pInfo);
void __thiscall CHolyPromise::SetUp(CHolyPromise *this, PROTO_HOLY_PROMISE_INFO *pInfo); // idb
int __thiscall CHolyPromise::Add(CHolyPromise *this, PROTO_HOLY_PROMISE_INFO *pInfo); // idb
int __thiscall CHolyPromise::Add(CHolyPromise *this, PROTO_NC_HOLY_PROMISE_LIST_CMD *pInfo); // idb
int __thiscall CHolyPromise::Login(CHolyPromise *this, Name5 *pCharID); // idb
int __thiscall CHolyPromise::Logout(CHolyPromise *this, Name5 *pCharID); // idb
int __thiscall CHolyPromise::LevelChange(CHolyPromise *this, Name5 *pCharID, char Level); // idb
void __thiscall CHolyPromise::CHolyPromise(CHolyPromise *this); // idb
void __thiscall CHolyPromise::~CHolyPromise(CHolyPromise *this); // idb
PROTO_NC_PARTY_FINDER_INFO *__thiscall PROTO_NC_PARTY_FINDER_INFO::operator=(PROTO_NC_PARTY_FINDER_INFO *this, PROTO_NC_PARTY_FINDER_INFO *__that); // idb
CPartyFinder::PARTY_FINDER_INFO_LIST *__thiscall CPartyFinder::Find(CPartyFinder *this, Name5 *psCharID); // idb
void __thiscall CPartyFinder::DelNode(CPartyFinder *this, CPartyFinder::PARTY_FINDER_INFO_LIST *pList); // idb
int __thiscall CPartyFinder::Add(CPartyFinder *this, PROTO_NC_PARTY_FINDER_INFO *pInfo); // idb
CPartyFinder::PARTY_FINDER_INFO_LIST *__thiscall CPartyFinder::Del(CPartyFinder *this, Name5 *psCharID);
void __thiscall CPartyFinder::Clear(CPartyFinder *this); // idb
void __thiscall CPartyFinder::~CPartyFinder(CPartyFinder *this); // idb
void __thiscall GUILD_MEMBER_CLIENT::GUILD_MEMBER_CLIENT(GUILD_MEMBER_CLIENT *this); // idb
void __thiscall CGuildMember::~CGuildMember(CGuildMember *this); // idb
int __thiscall CGuildMember::GetIndex(CGuildMember *this, Name5 *pMemberName); // idb
GUILD_MEMBER_CLIENT *__thiscall GUILD_MEMBER_CLIENT::operator=(GUILD_MEMBER_CLIENT *this, GUILD_MEMBER_CLIENT *__that); // idb
int __thiscall CGuildMember::Recv_NC_GUILD_MEMBER_JOIN_CMD(CGuildMember *this, PROTO_NC_GUILD_MEMBER_JOIN_CMD *pCmd); // idb
int __thiscall CGuildMember::Recv_NC_GUILD_MEMBER_LEAVE_CMD(CGuildMember *this, PROTO_NC_GUILD_MEMBER_LEAVE_CMD *pCmd); // idb
int __thiscall CGuildMember::Recv_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_CMD(CGuildMember *this, PROTO_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_CMD *pCmd); // idb
SHINE_GUILD_WAR_INFO *__thiscall SHINE_GUILD_WAR_INFO::operator=(SHINE_GUILD_WAR_INFO *this, SHINE_GUILD_WAR_INFO *__that); // idb
int __thiscall CGuildWar::Update(CGuildWar *this, unsigned int nRequestGuildNo, char nWarStatus, int *pWarEndDate, tm *pdEndDate); // idb
void __thiscall CPartyFinder::CPartyFinder(CPartyFinder *this); // idb
int __stdcall CGuild::IsSetDismiss(GUILD_MEMBER_CLIENT *pMember);
int __stdcall CGuild::IsSetNotify(GUILD_MEMBER_CLIENT *pMember);
int __stdcall CGuild::IsSetInvite(GUILD_MEMBER_CLIENT *pMember);
int __stdcall CGuild::IsSetVanish(GUILD_MEMBER_CLIENT *pMember);
int __stdcall CGuild::IsSetMemberGrade(GUILD_MEMBER_CLIENT *pMember);
int __stdcall CGuild::IsSetWar(GUILD_MEMBER_CLIENT *pMember);
bool __stdcall CGuild::IsUseStorage(GUILD_MEMBER_CLIENT *pMember);
void __thiscall CGuild::MakeAcademy(CGuild *this, Name5 *pAcademyMaster); // idb
signed int __stdcall NiPoint3Interpolator::GetKeyContent(unsigned __int16 usChannel);
BOOL __stdcall CGuild::Recv_NC_GUILD_MONEY_ADD_ACK(PROTO_NC_GUILD_MONEY_ADD_ACK *pAck);
BOOL __stdcall CGuild::Recv_NC_GUILD_WAR_ACK(PROTO_NC_GUILD_WAR_ACK *pAck);
int __thiscall CGuild::Recv_NC_GUILD_DISMISS_CMD(CGuild *this, PROTO_NC_GUILD_DISMISS_CMD *pCmd); // idb
int __thiscall CGuild::Recv_NC_GUILD_DELETE_CMD(CGuild *this, PROTO_NC_GUILD_DELETE_CMD *pCmd); // idb
int __thiscall CGuild::Recv_NC_GUILD_MONEY_SUB_CMD(CGuild *this, PROTO_NC_GUILD_MONEY_SUB_CMD *pCmd); // idb
int __thiscall CGuild::Recv_NC_GUILD_NOTIFY_CMD(CGuild *this, PROTO_NC_GUILD_NOTIFY_CMD *pCmd); // idb
int __thiscall CGuild::Recv_NC_GUILD_GRADE_CMD(CGuild *this, PROTO_NC_GUILD_GRADE_CMD *pCmd); // idb
int __thiscall CGuild::Recv_NC_GUILD_WAR_START_CMD(CGuild *this, PROTO_NC_GUILD_WAR_START_CMD *pCmd); // idb
int __thiscall CGuild::Recv_NC_GUILD_WAR_COOLDOWN_DONE_CMD(CGuild *this, PROTO_NC_GUILD_WAR_COOLDOWN_DONE_CMD *pCmd); // idb
int __thiscall CGuild::Recv_NC_GUILD_ACADEMY_NOTIFY_CMD(CGuild *this, PROTO_NC_GUILD_ACADEMY_NOTIFY_CMD *pCmd); // idb
void __thiscall GUILD_TOURNAMENT_LIST::GUILD_TOURNAMENT_LIST(GUILD_TOURNAMENT_LIST *this); // idb
void __thiscall CGuildTournament::~CGuildTournament(CGuildTournament *this); // idb
void __thiscall CGuildTournament::Clear(CGuildTournament *this); // idb
void __thiscall GUILD_ACADEMY_MEMBER_CLIENT::GUILD_ACADEMY_MEMBER_CLIENT(GUILD_ACADEMY_MEMBER_CLIENT *this); // idb
void __thiscall CGuildAcademyMember::~CGuildAcademyMember(CGuildAcademyMember *this); // idb
int __thiscall CGuildAcademyMember::GetIndex(CGuildAcademyMember *this, Name5 *pAcademyMemberName); // idb
GUILD_ACADEMY_MEMBER_CLIENT *__thiscall GUILD_ACADEMY_MEMBER_CLIENT::operator=(GUILD_ACADEMY_MEMBER_CLIENT *this, GUILD_ACADEMY_MEMBER_CLIENT *__that); // idb
int __thiscall CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_JOIN_CMD(CGuildAcademyMember *this, PROTO_NC_GUILD_ACADEMY_MEMBER_JOIN_CMD *pCmd); // idb
int __thiscall CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_LEAVE_CMD(CGuildAcademyMember *this, PROTO_NC_GUILD_ACADEMY_MEMBER_LEAVE_CMD *pCmd); // idb
int __thiscall CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_CMD(CGuildAcademyMember *this, PROTO_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_CMD *pCmd); // idb
void __thiscall CGuildMember::CGuildMember(CGuildMember *this); // idb
GUILD_MEMBER_CLIENT *__thiscall CGuildMember::Get(CGuildMember *this, Name5 *pMemberName); // idb
int __thiscall CGuildMember::Recv_NC_GUILD_MEMBER_LIST_ACK(CGuildMember *this, PROTO_NC_GUILD_MEMBER_LIST_ACK *pAck); // idb
int __thiscall CGuildMember::Recv_NC_GUILD_MEMBER_GRADE_CMD(CGuildMember *this, PROTO_NC_GUILD_MEMBER_GRADE_CMD *pCmd); // idb
int __thiscall CGuildMember::Recv_NC_GUILD_MEMBER_FLAGS_CMD(CGuildMember *this, PROTO_NC_GUILD_MEMBER_FLAGS_CMD *pCmd); // idb
int __thiscall CGuildMember::Recv_NC_GUILD_MEMBER_EXP_RATIO_CMD(CGuildMember *this, PROTO_NC_GUILD_MEMBER_EXP_RATIO_CMD *pCmd); // idb
int __thiscall CGuildMember::Recv_NC_GUILD_MEMBER_LOGON_CMD(CGuildMember *this, PROTO_NC_GUILD_MEMBER_LOGON_CMD *pCmd); // idb
int __thiscall CGuildMember::Recv_NC_GUILD_MEMBER_LOGOFF_CMD(CGuildMember *this, PROTO_NC_GUILD_MEMBER_LOGOFF_CMD *pCmd); // idb
int __thiscall CGuildMember::Recv_NC_GUILD_MEMBER_PARTY_CMD(CGuildMember *this, PROTO_NC_GUILD_MEMBER_PARTY_CMD *pCmd); // idb
int __thiscall CGuildMember::Recv_NC_GUILD_MEMBER_LEVEL_CMD(CGuildMember *this, PROTO_NC_GUILD_MEMBER_LEVEL_CMD *pCmd); // idb
int __thiscall CGuildMember::Recv_NC_GUILD_MEMBER_MAP_CMD(CGuildMember *this, PROTO_NC_GUILD_MEMBER_MAP_CMD *pCmd); // idb
int __thiscall CGuildMember::Recv_NC_GUILD_MEMBER_INTRO_CMD(CGuildMember *this, PROTO_NC_GUILD_MEMBER_INTRO_CMD *pCmd); // idb
int __thiscall CGuildMember::Recv_NC_GUILD_MEMBER_CLASS_CMD(CGuildMember *this, PROTO_NC_GUILD_MEMBER_CLASS_CMD *pCmd); // idb
int __thiscall CGuild::Recv_NC_GUILD_MY_GUILD_INFO_ACK(CGuild *this, PROTO_NC_GUILD_MY_GUILD_INFO_ACK *pAck); // idb
void __thiscall CGuildTournament::CGuildTournament(CGuildTournament *this); // idb
void __thiscall CGuildAcademyMember::CGuildAcademyMember(CGuildAcademyMember *this); // idb
int __thiscall CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_LIST_ACK(CGuildAcademyMember *this, PROTO_NC_GUILD_ACADEMY_MEMBER_LIST_ACK *pAck); // idb
int __thiscall CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_INTRO_CMD(CGuildAcademyMember *this, PROTO_NC_GUILD_ACADEMY_MEMBER_INTRO_CMD *pCmd); // idb
int __thiscall CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_LOGON_CMD(CGuildAcademyMember *this, PROTO_NC_GUILD_ACADEMY_MEMBER_LOGON_CMD *pCmd); // idb
int __thiscall CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_LOGOFF_CMD(CGuildAcademyMember *this, PROTO_NC_GUILD_ACADEMY_MEMBER_LOGOFF_CMD *pCmd); // idb
int __thiscall CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_PARTY_CMD(CGuildAcademyMember *this, PROTO_NC_GUILD_ACADEMY_MEMBER_PARTY_CMD *pCmd); // idb
int __thiscall CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_LEVEL_CMD(CGuildAcademyMember *this, PROTO_NC_GUILD_ACADEMY_MEMBER_LEVEL_CMD *pCmd); // idb
int __thiscall CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_MAP_CMD(CGuildAcademyMember *this, PROTO_NC_GUILD_ACADEMY_MEMBER_MAP_CMD *pCmd); // idb
int __thiscall CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_CLASS_CMD(CGuildAcademyMember *this, PROTO_NC_GUILD_ACADEMY_MEMBER_CLASS_CMD *pCmd); // idb
int __thiscall CGuildWar::Add(CGuildWar *this, SHINE_GUILD_WAR_INFO *pWarInfo); // idb
int __thiscall CGuildWar::Del(CGuildWar *this, unsigned int nRequestGuildNo); // idb
int __thiscall CGuildWarAble::Add(CGuildWarAble *this, SHINE_GUILD_WAR_ABLE_INFO *pWarInfo); // idb
int __thiscall CGuild::Recv_NC_GUILD_WAR_TARGET_CMD(CGuild *this, PROTO_NC_GUILD_WAR_TARGET_CMD *pCmd); // idb
int __thiscall CGuild::Recv_NC_GUILD_WAR_END_CMD(CGuild *this, PROTO_NC_GUILD_WAR_END_CMD *pCmd); // idb
void __thiscall CGuildWar::Clear(CGuildWar *this); // idb
void __thiscall CGuildWarAble::Clear(CGuildWarAble *this); // idb
void __thiscall CGuild::Make(CGuild *this, unsigned int nNo, Name4 *pName, char nType, int dCreateDate); // idb
int __thiscall CGuild::Recv_NC_GUILD_MAKE_ACK(CGuild *this, PROTO_NC_GUILD_MAKE_ACK *pAck); // idb
int __thiscall CGuild::Recv_NC_GUILD_WAR_LIST_ACK(CGuild *this, PROTO_NC_GUILD_WAR_LIST_ACK *pAck); // idb
void __thiscall CGuildWarAble::~CGuildWarAble(CGuildWarAble *this); // idb
void __thiscall CGuild::CGuild(CGuild *this); // idb
void __thiscall CGuild::~CGuild(CGuild *this); // idb
void __thiscall PROTO_KQ_MAP_INFO::PROTO_KQ_MAP_INFO(PROTO_KQ_MAP_INFO *this); // idb
void __thiscall CKQ::Clear(CKQ *this); // idb
int __thiscall CKQ::Del(CKQ *this, unsigned int Handle); // idb
PROTO_KQ_INFO *__thiscall CKQ::Get(CKQ *this, unsigned int Handle); // idb
void __thiscall CKQ::Add(CKQ *this, PROTO_NC_KQ_LIST_ADD_ACK *pAddInfo); // idb
int __thiscall CKQ::Update(CKQ *this, PROTO_NC_KQ_LIST_UPDATE_ACK *pUpdateInfo); // idb
void __thiscall PROTO_KQ_INFO::PROTO_KQ_INFO(PROTO_KQ_INFO *this); // idb
void __thiscall PROTO_KQ_INFO::~PROTO_KQ_INFO(PROTO_KQ_INFO *this); // idb
void __thiscall CKQ::~CKQ(CKQ *this); // idb
void __thiscall CKQ::CKQ(CKQ *this); // idb
char __thiscall CFindWay::Load(CFindWay *this, const char *_szFileName);
bool __thiscall CFindWay::GetBlock(CFindWay *this, unsigned int _uiX, unsigned int _uiY); // idb
bool __thiscall CFindWay::GetBlock(CFindWay *this, float _fX, float _fY); // idb
void __thiscall CFindWay::~CFindWay(CFindWay *this); // idb
int __thiscall CFindWay::LineIntersect(CFindWay *this); // idb
void __thiscall CFindWay::LenMapInit(CFindWay *this, int nSizeX, int nSizeY); // idb
void __thiscall CFindWay::LenMapClear(CFindWay *this); // idb
int __thiscall CFindWay::LenMapSet(CFindWay *this, int x, int y, unsigned __int16 value); // idb
int __thiscall CFindWay::SearchMoveable(CFindWay *this); // idb
void __thiscall CFindWay::FindWay(CFindWay *this); // idb
void __thiscall CFindWay::Init(CFindWay *this); // idb
void __thiscall CFindWay::CFindWay(CFindWay *this); // idb
bool __thiscall AreaInfoData::AE_Circle::IntersectTest(AreaInfoData::AE_Circle *this, float fX, float fY); // idb
bool __thiscall AreaInfoData::AE_Square::IntersectTest(AreaInfoData::AE_Square *this, float fX, float fY); // idb
void __thiscall AreaInfoData::AreaInfoData(AreaInfoData *this); // idb
AreaInfoData::IAreaData *__thiscall AreaInfoData::GetData(AreaInfoData *this, Name8 *Name); // idb
AreaInfoData::IAreaData *__thiscall AreaInfoData::GetData(AreaInfoData *this, const char *szName); // idb
void __thiscall AreaInfoData::RemoveAll(AreaInfoData *this); // idb
void __thiscall AreaInfoData::~AreaInfoData(AreaInfoData *this); // idb
char __thiscall AreaInfoData::Load(AreaInfoData *this, const char *szFileName);
AreaInfoData *__thiscall AreaInfoData::`vector deleting destructor'(AreaInfoData *this, unsigned int a2);
char __stdcall DiceTaiSai::ConvertDice(char *pSource, int *pTarget);
char __stdcall DiceTaiSai::ConvertDice(int nSource, char *pTarget);
char __thiscall DiceTaiSai::get_PrizeWinningBet(DiceTaiSai *this, int nDiceVariety, DiceTaiSaiPrizeWinning *pPrizeWinningBet);
void __thiscall DiceTaiSaiDividind::DiceTaiSaiDividind(DiceTaiSaiDividind *this); // idb
char __thiscall DiceTaiSaiDividind::isInitFinishe(DiceTaiSaiDividind *this);
char __thiscall DiceTaiSaiDividind::Init(DiceTaiSaiDividind *this, DividendRate nDividind, unsigned __int16 nDividindRate);
unsigned int __thiscall DiceTaiSaiDividind::get_MaxBettingMoney(DiceTaiSaiDividind *this, DICE_TAISAI_BETTING nBet, unsigned int nMaxBetMoney); // idb
unsigned int __thiscall DiceTaiSaiDividind::get_DividindMoney(DiceTaiSaiDividind *this, DICE_TAISAI_BETTING nBet, int nSingleNum, unsigned int nBetMoney); // idb
void __thiscall DiceTaiSai::Init(DiceTaiSai *this, int NoSumTriple); // idb
void __thiscall CGuildList::CGuildList(CGuildList *this); // idb
int __thiscall CGuildList::Recv_NC_GUILD_LIST_ACK(CGuildList *this, PROTO_NC_GUILD_LIST_ACK *pAck); // idb
void __thiscall CGuildList::~CGuildList(CGuildList *this); // idb
char *fs(char *format, ...); // idb
char __thiscall Encrypt::Stream::Allocate(Encrypt::Stream *this, unsigned int dwSize);
void __thiscall Encrypt::Stream::Stream(Encrypt::Stream *this); // idb
void __thiscall Encrypt::Stream::~Stream(Encrypt::Stream *this); // idb
bool __thiscall Encrypt::FileStream::Load(Encrypt::FileStream *this, char *acFn); // idb
bool __thiscall Encrypt::FileStream::Save(Encrypt::FileStream *this, char *acFn); // idb
void __cdecl Encrypt::EncryptXor(char *pcDest, unsigned int dwDestSize, char *pcSrc, unsigned int dwSrcSize, char *pcKey); // idb
char __thiscall Encrypt::EncryptMethodXor::Encrypt(Encrypt::EncryptMethodXor *this, Encrypt::Stream *rkEncStream, Encrypt::Stream *rkOrgStream);
char __thiscall Encrypt::EncryptMethodXor::Decrypt(Encrypt::EncryptMethodXor *this, Encrypt::Stream *rkOrgStream, Encrypt::Stream *rkEncStream);
char __thiscall Encrypt::EncryptStream::SaveEncrypted(Encrypt::EncryptStream *this, char *fn, Encrypt::IEncryptMethod *rkMethod);
bool __thiscall Encrypt::EncryptStream::LoadOriginal(Encrypt::EncryptStream *this, char *fn); // idb
bool __thiscall Encrypt::EncryptStream::SaveOriginal(Encrypt::EncryptStream *this, char *fn); // idb
Encrypt::Stream *__thiscall Encrypt::Stream::`vector deleting destructor'(Encrypt::Stream *this, unsigned int a2);
void __thiscall Encrypt::EncryptMethodXor::EncryptMethodXor(Encrypt::EncryptMethodXor *this, char *pcKey); // idb
char __thiscall Encrypt::EncryptStream::LoadEncrypted(Encrypt::EncryptStream *this, char *fn, Encrypt::IEncryptMethod *rkMethod);
void __cdecl enable_sperror(bool bEnable); // idb
void __cdecl enable_spcritical(bool bEnable); // idb
char __thiscall CTextDataMem::ReadFieldStr(CTextDataMem *this, CFieldNode *pFieldNode, char *pcStr, int iMaxStr);
CFieldNode *__thiscall INode::FindField(INode *this, char *token); // idb
// BOOL __stdcall ImmReleaseContext(HWND, HIMC);
// BOOL __stdcall ImmGetConversionStatus(HIMC, LPDWORD, LPDWORD);
// HIMC __stdcall ImmGetContext(HWND);
// BOOL __stdcall ImmSetConversionStatus(HIMC, DWORD, DWORD);
// BOOL __stdcall ImmNotifyIME(HIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue);
// void __usercall putShortMSB(internal_state *s@<eax>, unsigned int b@<ecx>);
// void __usercall flush_pending(z_stream_s *strm@<eax>);
int __cdecl deflate(z_stream_s *strm, int flush); // idb
int __cdecl deflateEnd(z_stream_s *strm); // idb
// void __usercall lm_init(internal_state *s@<esi>);
// unsigned int __usercall longest_match@<eax>(internal_state *s@<edi>, unsigned int cur_match); idb
// unsigned int __usercall longest_match_fast@<eax>(internal_state *s@<esi>, unsigned int cur_match@<edx>); idb
// void __usercall fill_window(internal_state *s@<esi>);
signed int __cdecl deflate_stored(internal_state *s, int flush);
signed int __cdecl deflate_fast(internal_state *s, int flush);
signed int __cdecl deflate_slow(internal_state *s, int flush);
int __cdecl deflateReset(z_stream_s *strm); // idb
int __cdecl deflateInit2_(z_stream_s *strm, int level, int method, int windowBits, int memLevel, int strategy, const char *version, int stream_size); // idb
int __cdecl deflateInit_(z_stream_s *strm, int level, const char *version, int stream_size); // idb
int __cdecl inflateReset(z_stream_s *strm); // idb
int __cdecl inflateInit2_(z_stream_s *strm, int windowBits, const char *version, int stream_size); // idb
int __cdecl inflateInit_(z_stream_s *strm, const char *version, int stream_size); // idb
// int __usercall updatewindow@<eax>(z_stream_s *strm@<ebx>, unsigned int out@<eax>); idb
int __cdecl inflate(z_stream_s *strm, int flush); // idb
int __cdecl inflateEnd(z_stream_s *strm); // idb
const char *__cdecl adler32(unsigned int adler, const char *buf, unsigned int len);
void __fastcall init_block(int a1, internal_state *s);
// void __usercall pqdownheap(internal_state *s@<eax>, ct_data_s *tree@<edi>, int k);
// void __usercall gen_bitlen(internal_state *s@<eax>, tree_desc_s *desc@<ecx>);
// void __usercall scan_tree(ct_data_s *tree@<ecx>, int max_code@<eax>, internal_state *s);
// void __usercall send_tree(internal_state *s@<eax>, ct_data_s *tree@<edx>, int max_code@<ecx>);
// void __usercall send_all_trees(internal_state *s@<esi>, int lcodes, int dcodes, int blcodes);
// void __usercall compress_block(internal_state *s@<eax>, ct_data_s *ltree, ct_data_s *dtree);
// void __usercall set_data_type(internal_state *s@<eax>);
// void __usercall bi_flush(internal_state *s@<eax>);
// void __usercall bi_windup(internal_state *s@<eax>);
// void __usercall copy_block(internal_state *s@<eax>, unsigned int len@<ecx>, char *buf, int header);
void __cdecl _tr_init(internal_state *s); // idb
// void __usercall gen_codes(ct_data_s *tree@<edi>, unsigned __int16 *bl_count@<edx>, int max_code);
// void __usercall build_tree(internal_state *s@<esi>, tree_desc_s *desc);
// int __usercall build_bl_tree@<eax>(internal_state *s@<eax>); idb
void __cdecl _tr_stored_block(internal_state *s, char *buf, unsigned int stored_len, int eof); // idb
void __cdecl _tr_align(internal_state *s); // idb
void __cdecl _tr_flush_block(internal_state *s, char *buf, unsigned int stored_len, int eof); // idb
// int __usercall crc32_little@<eax>(unsigned int crc@<eax>, const char *buf@<ecx>, unsigned int len@<edx>);
int __cdecl crc32(unsigned int crc, const char *buf, unsigned int len);
void *__cdecl zcalloc(void *opaque, unsigned int items, unsigned int size); // idb
void __cdecl zcfree(void *opaque, void *ptr); // idb
void __cdecl inflate_fast(z_stream_s *strm, unsigned int start); // idb
int __cdecl inflate_table(codetype type, unsigned __int16 *lens, unsigned int codes, code **table, unsigned int *bits, unsigned __int16 *work); // idb
NiSGIReader *__thiscall NiBMPReader::`scalar deleting destructor'(NiSGIReader *this, unsigned int a2);
char __thiscall NiPixelFormat::operator==(NiPixelFormat *this, NiPixelFormat *kOther);
void __thiscall NiPNGReader::Unpack4BitSourceRowPal(NiPNGReader *this, char *pucSrc, char *pucDest); // idb
void __thiscall NiPNGReader::Unpack8BitSourceRowPal(NiPNGReader *this, char *pucSrc, char *pucDest); // idb
void __thiscall NiPNGReader::Unpack32BitFrom24BitSourceRow(NiPNGReader *this, char *pucSrc, char *pucDest); // idb
void __thiscall NiPNGReader::Unpack32BitFrom32BitSourceRow(NiPNGReader *this, char *pucSrc, char *pucDest); // idb
bool __stdcall NiPNGReader::CanReadFile(const char *pcFileExtension);
int __thiscall NiBinaryStream::Read(NiBinaryStream *this, void *pvBuffer, unsigned int uiBytes);
void __thiscall NiPNGReader::NiPNGReader(NiPNGReader *this); // idb
NiPNGReader *__thiscall NiPNGReader::`scalar deleting destructor'(NiPNGReader *this, unsigned int a2);
void __cdecl NiPNGReaderReadCB(png_struct_def *png_ptr, char *data, unsigned int length); // idb
NiPixelData *__thiscall NiPNGReader::ReadBody(NiPNGReader *this, NiFile *kIst, NiPixelData *pkOptDest); // idb
void __cdecl NiStreamLoadBinary<unsigned int>(NiBinaryStream *binstream, unsigned int *value); // idb
char __thiscall NiPNGReader::ReadHeader(NiPNGReader *this, NiFile *kIst, unsigned int *uiWidth, unsigned int *uiHeight, NiPixelFormat *kFormat, bool *bMipmap, unsigned int *uiNumFaces);
NiPixelData *__thiscall NiPNGReader::ReadFile(NiPNGReader *this, NiFile *kIst, NiPixelData *pkOptDest); // idb
// lua_TValue *__usercall index2addr@<eax>(lua_State *L@<esi>, int idx@<ecx>); idb
void __cdecl growstack(lua_State *L, void *ud); // idb
int __cdecl lua_checkstack(lua_State *L, int size); // idb
void __cdecl lua_xmove(lua_State *from, lua_State *to, int n); // idb
int (__cdecl *__cdecl lua_atpanic(lua_State *L, int (__cdecl *panicf)(lua_State *)))(lua_State *); // idb
const long double *__cdecl lua_version(lua_State *L); // idb
int __cdecl lua_absindex(lua_State *L, int idx); // idb
int __cdecl lua_gettop(lua_State *L); // idb
void __cdecl lua_settop(lua_State *L, int idx); // idb
void __cdecl lua_remove(lua_State *L, int idx); // idb
void __cdecl lua_insert(lua_State *L, int idx); // idb
// void __usercall moveto(lua_State *L@<esi>, lua_TValue *fr@<edi>, int idx@<ecx>);
void __cdecl lua_replace(lua_State *L, int idx); // idb
void __cdecl lua_copy(lua_State *L, int fromidx, int toidx); // idb
void __cdecl lua_pushvalue(lua_State *L, int idx); // idb
int __cdecl lua_type(lua_State *L, int idx); // idb
char *__cdecl lua_typename(lua_State *L, int t);
int __cdecl lua_iscfunction(lua_State *L, int idx); // idb
lua_TValue *__cdecl lua_isnumber(lua_State *L, int idx);
int __cdecl lua_isstring(lua_State *L, int idx); // idb
int __cdecl lua_rawequal(lua_State *L, int index1, int index2); // idb
int __cdecl lua_compare(lua_State *L, int index1, int index2, int op); // idb
double __cdecl lua_tonumberx(lua_State *L, int idx, int *isnum);
int __cdecl lua_tointegerx(lua_State *L, int idx, int *isnum); // idb
unsigned int __cdecl lua_tounsignedx(lua_State *L, int idx, int *isnum); // idb
int __cdecl lua_toboolean(lua_State *L, int idx); // idb
const char *__cdecl lua_tolstring(lua_State *L, int idx, unsigned int *len); // idb
unsigned int __cdecl lua_rawlen(lua_State *L, int idx); // idb
void *__cdecl lua_touserdata(lua_State *L, int idx); // idb
lua_State *__cdecl lua_tothread(lua_State *L, int idx); // idb
void *__cdecl lua_topointer(lua_State *L, int idx);
void __cdecl lua_pushnil(lua_State *L); // idb
void __cdecl lua_pushnumber(lua_State *L, long double n); // idb
void __cdecl lua_pushinteger(lua_State *L, int n); // idb
void __cdecl lua_pushunsigned(lua_State *L, unsigned int u); // idb
const char *__cdecl lua_pushlstring(lua_State *L, const char *s, unsigned int len); // idb
const char *__cdecl lua_pushstring(lua_State *L, const char *s); // idb
const char *__cdecl lua_pushvfstring(lua_State *L, const char *fmt, char *argp); // idb
const char *lua_pushfstring(lua_State *L, const char *fmt, ...); // idb
void __cdecl lua_pushcclosure(lua_State *L, int (__cdecl *fn)(lua_State *), int n); // idb
void __cdecl lua_pushboolean(lua_State *L, int b); // idb
void __cdecl lua_pushlightuserdata(lua_State *L, void *p); // idb
int __cdecl lua_pushthread(lua_State *L); // idb
void __cdecl lua_getglobal(lua_State *L, const char *var); // idb
void __cdecl lua_gettable(lua_State *L, int idx); // idb
void __cdecl lua_getfield(lua_State *L, int idx, const char *k); // idb
void __cdecl lua_rawget(lua_State *L, int idx); // idb
void __cdecl lua_rawgeti(lua_State *L, int idx, int n); // idb
void __cdecl lua_createtable(lua_State *L, int narray, int nrec); // idb
int __cdecl lua_getmetatable(lua_State *L, int objindex); // idb
void __cdecl lua_getuservalue(lua_State *L, int idx); // idb
void __cdecl lua_setglobal(lua_State *L, const char *var); // idb
void __cdecl lua_setfield(lua_State *L, int idx, const char *k); // idb
void __cdecl lua_rawset(lua_State *L, int idx); // idb
void __cdecl lua_rawseti(lua_State *L, int idx, int n); // idb
int __cdecl lua_setmetatable(lua_State *L, int objindex); // idb
void __cdecl lua_setuservalue(lua_State *L, int idx); // idb
int __cdecl lua_getctx(lua_State *L, int *ctx); // idb
void __cdecl lua_callk(lua_State *L, int nargs, int nresults, int ctx, int (__cdecl *k)(lua_State *)); // idb
void __cdecl f_call(lua_State *L, void *ud); // idb
int __cdecl lua_pcallk(lua_State *L, int nargs, int nresults, int errfunc, int ctx, int (__cdecl *k)(lua_State *)); // idb
int __cdecl lua_load(lua_State *L, const char *(__cdecl *reader)(lua_State *, void *, unsigned int *), void *data, const char *chunkname, const char *mode); // idb
int __cdecl lua_dump(lua_State *L, int (__cdecl *writer)(lua_State *, const void *, unsigned int, void *), void *data); // idb
int __cdecl lua_status(lua_State *L); // idb
int __cdecl lua_gc(lua_State *L, int what, int data); // idb
void __cdecl __noreturn lua_error(lua_State *L);
int __cdecl lua_next(lua_State *L, int idx); // idb
void __cdecl lua_concat(lua_State *L, int n); // idb
void __cdecl lua_len(lua_State *L, int idx); // idb
int __cdecl lua_newuserdata(lua_State *L, unsigned int size);
// NiUnsharedGeometryGroup *__usercall aux_upvalue@<eax>(lua_TValue *fi@<edx>, int n@<eax>, lua_TValue **val@<edi>, GCObject **owner@<esi>);
NiUnsharedGeometryGroup *__cdecl lua_getupvalue(lua_State *L, int funcindex, int n);
NiUnsharedGeometryGroup *__cdecl lua_setupvalue(lua_State *L, int funcindex, int n);
// Proto **__usercall getupvalref@<eax>(lua_State *L@<ecx>, int fidx@<eax>, int n@<edi>, LClosure **pf@<esi>);
void *__cdecl lua_upvalueid(lua_State *L, int fidx, int n); // idb
void __cdecl lua_upvaluejoin(lua_State *L, int fidx1, int n1, int fidx2, int n2); // idb
int __cdecl findfield(lua_State *L, int objidx, int level); // idb
// int __usercall pushglobalfuncname@<eax>(lua_State *L@<esi>, lua_Debug *ar); idb
// void __usercall pushfuncname(lua_State *L@<ecx>, lua_Debug *ar@<eax>);
int __thiscall countlevels(lua_State *L);
void __cdecl luaL_traceback(lua_State *L, lua_State *L1, const char *msg, int level); // idb
void __cdecl luaL_where(lua_State *L, int level); // idb
void __noreturn luaL_error(lua_State *L, const char *fmt, ...);
int __cdecl luaL_fileresult(lua_State *L, int stat, const char *fname); // idb
int __cdecl luaL_execresult(lua_State *L, int stat); // idb
int __cdecl luaL_newmetatable(lua_State *L, const char *tname); // idb
void __cdecl luaL_setmetatable(lua_State *L, const char *tname); // idb
void *__cdecl luaL_testudata(lua_State *L, int ud, const char *tname); // idb
void __cdecl luaL_checkstack(lua_State *L, int space, const char *msg); // idb
char *__cdecl luaL_prepbuffsize(luaL_Buffer *B, unsigned int sz); // idb
void __cdecl luaL_addlstring(luaL_Buffer *B, const char *s, unsigned int l); // idb
void __cdecl luaL_addstring(luaL_Buffer *B, const char *s); // idb
void __cdecl luaL_pushresult(luaL_Buffer *B); // idb
void __cdecl luaL_pushresultsize(luaL_Buffer *B, unsigned int sz); // idb
void __cdecl luaL_addvalue(luaL_Buffer *B); // idb
void __cdecl luaL_buffinit(lua_State *L, luaL_Buffer *B); // idb
char *__cdecl luaL_buffinitsize(lua_State *L, luaL_Buffer *B, unsigned int sz); // idb
const char *__cdecl getF(lua_State *L, void *ud, unsigned int *size); // idb
// int __usercall errfile@<eax>(lua_State *L@<esi>, int fnameindex@<edi>, const char *what);
// int __usercall skipBOM@<eax>(LoadF *lf@<esi>); idb
// int __usercall skipcomment@<eax>(LoadF *lf@<eax>, int *cp@<edi>); idb
int __cdecl luaL_loadfilex(lua_State *L, const char *filename, const char *mode); // idb
const char *__cdecl getS(lua_State *L, void *ud, unsigned int *size); // idb
int __cdecl luaL_loadbufferx(lua_State *L, const char *buff, unsigned int size, const char *name, const char *mode); // idb
int __cdecl luaL_getmetafield(lua_State *L, int obj, const char *event); // idb
int __cdecl luaL_callmeta(lua_State *L, int obj, const char *event); // idb
int __cdecl luaL_len(lua_State *L, int idx); // idb
const char *__cdecl luaL_tolstring(lua_State *L, int idx, unsigned int *len); // idb
int __cdecl luaL_getsubtable(lua_State *L, int idx, const char *fname); // idb
void __cdecl luaL_requiref(lua_State *L, const char *modname, int (__cdecl *openf)(lua_State *), int glb); // idb
const char *__cdecl luaL_gsub(lua_State *L, const char *s, const char *p, const char *r); // idb
void *__cdecl l_alloc(void *ud, void *ptr, unsigned int osize, unsigned int nsize); // idb
int __cdecl panic(lua_State *L); // idb
lua_State *__cdecl luaL_newstate(); // idb
void __cdecl luaL_checkversion_(lua_State *L, long double ver); // idb
void __cdecl __noreturn luaL_argerror(lua_State *L, int narg, const char *extramsg);
void *__cdecl luaL_checkudata(lua_State *L, int ud, const char *tname); // idb
void __cdecl luaL_checktype(lua_State *L, int narg, int t); // idb
void __cdecl luaL_checkany(lua_State *L, int narg); // idb
const char *__cdecl luaL_checklstring(lua_State *L, int narg, unsigned int *len); // idb
const char *__cdecl luaL_optlstring(lua_State *L, int narg, const char *def, unsigned int *len); // idb
double __cdecl luaL_checknumber(lua_State *L, int narg);
long double __cdecl luaL_optnumber(lua_State *L, int narg, long double def); // idb
int __cdecl luaL_checkinteger(lua_State *L, int narg); // idb
unsigned int __cdecl luaL_checkunsigned(lua_State *L, int narg); // idb
int __cdecl luaL_optinteger(lua_State *L, int narg, int def); // idb
void __cdecl luaL_setfuncs(lua_State *L, luaL_Reg *l, int nup); // idb
int __cdecl luaL_checkoption(lua_State *L, int narg, const char *def, const char *const *lst); // idb
void __cdecl luaL_openlibs(lua_State *L); // idb
void __cdecl luaE_setdebt(global_State *g, int debt); // idb
CallInfo *__cdecl luaE_extendCI(lua_State *L); // idb
void __cdecl luaE_freeCI(lua_State *L); // idb
// void __usercall stack_init(lua_State *L1@<esi>, lua_State *L@<eax>);
// void __usercall init_registry(lua_State *L@<esi>, global_State *g@<ebx>);
void __cdecl f_luaopen(lua_State *L);
// void __usercall close_state(lua_State *L@<esi>);
GCObject *__cdecl lua_newthread(lua_State *L);
void __cdecl luaE_freethread(lua_State *L, lua_State *L1); // idb
lua_State *__cdecl lua_newstate(void *(__cdecl *f)(void *, void *, unsigned int, unsigned int), void *ud); // idb
void __cdecl lua_close(lua_State *L); // idb
unsigned int __cdecl luaO_int2fb(unsigned int x);
int __cdecl luaO_fb2int(int x); // idb
int __cdecl luaO_ceillog2(unsigned int x); // idb
long double __cdecl luaO_arith(int op, long double v1, long double v2); // idb
int __cdecl luaO_hexavalue(int c); // idb
// double __usercall readhexa@<st0>(const char **s@<ecx>, int *count@<edx>, long double r);
long double __cdecl lua_strx2number(const char *s, char **endptr); // idb
int __cdecl luaO_str2d(const char *s, unsigned int len, long double *result); // idb
const char *__cdecl luaO_pushvfstring(lua_State *L, const char *fmt, char *argp); // idb
const char *luaO_pushfstring(lua_State *L, const char *fmt, ...); // idb
void __cdecl luaO_chunkid(char *out, const char *source, unsigned int bufflen); // idb
// void __usercall seterrorobj(lua_State *L@<edi>, int errcode@<eax>, lua_TValue *oldtop@<ecx>);
void __cdecl __noreturn luaD_throw(lua_State *L, int errcode);
int __cdecl luaD_rawrunprotected(lua_State *L, void (__cdecl *f)(lua_State *, void *), void *ud); // idb
void __cdecl luaD_reallocstack(lua_State *L, int newsize); // idb
void __cdecl luaD_growstack(lua_State *L, int n); // idb
void __cdecl luaD_shrinkstack(lua_State *L); // idb
void __cdecl luaD_hook(lua_State *L, int event, int line); // idb
// lua_TValue *__usercall tryfuncTM@<eax>(lua_State *L@<esi>, lua_TValue *func@<edi>); idb
int __cdecl luaD_poscall(lua_State *L, lua_TValue *firstResult); // idb
void __cdecl unroll(lua_State *L);
// int __usercall recover@<eax>(lua_State *L@<eax>, int status); idb
// void __usercall __noreturn resume_error(lua_State *L@<esi>, const char *msg@<eax>, lua_TValue *firstArg@<edi>);
int __cdecl lua_yieldk(lua_State *L, int nresults, int ctx, int (__cdecl *k)(lua_State *)); // idb
int __cdecl luaD_pcall(lua_State *L, void (__cdecl *func)(lua_State *, void *), void *u, int old_top, int ef); // idb
void __cdecl f_parser(lua_State *L, void *ud); // idb
int __cdecl luaD_protectedparser(lua_State *L, Zio *z, const char *name, const char *mode); // idb
int __cdecl luaD_precall(lua_State *L, lua_TValue *func, int nresults); // idb
void __cdecl luaD_call(lua_State *L, lua_TValue *func, int nResults, int allowyield); // idb
void __cdecl resume(lua_State *L, void *ud); // idb
int __cdecl lua_resume(lua_State *L, lua_State *from, int nargs); // idb
void __cdecl luaC_barrierback_(lua_State *L, GCObject *o); // idb
GCObject *__cdecl luaC_newobj(lua_State *L, int tt, unsigned int sz, GCObject **list, int offset); // idb
void __cdecl reallymarkobject(global_State *g, GCObject *o); // idb
// void __usercall markmt(global_State *g@<edi>);
// void __usercall markbeingfnz(global_State *g@<edi>);
// void __usercall remarkupvals(global_State *g@<edi>);
// void __usercall restartcollection(global_State *g@<eax>);
// void __usercall traversestrongtable(Table *h@<eax>, global_State *g);
// int __usercall traverseproto@<eax>(Proto *f@<esi>, global_State *g);
// int __usercall traverseCclosure@<eax>(global_State *g@<edi>, CClosure *cl);
// int __usercall traverseLclosure@<eax>(global_State *g@<edi>, LClosure *cl);
// int __usercall traversestack@<eax>(lua_State *th@<edi>, global_State *g);
// void __usercall freeobj(lua_State *L@<ecx>, GCObject *o@<eax>);
GCObject **__cdecl sweeplist(lua_State *L, GCObject **p, unsigned int count); // idb
// GCObject **__usercall sweeptolive@<eax>(GCObject **result@<eax>, lua_State *L, int *n);
// void __usercall checkSizes(lua_State *L@<edi>);
void __cdecl dothecall(lua_State *L);
// void __usercall GCTM(lua_State *L@<esi>, int propagateerrors);
void __cdecl luaC_checkfinalizer(lua_State *L, GCObject *o, Table *mt); // idb
// int __usercall entersweep@<eax>(lua_State *L@<edi>); idb
// void __usercall callallpendingfinalizers(lua_State *L@<esi>, int propagateerrors);
void __cdecl luaC_freeallobjects(lua_State *L); // idb
void __cdecl luaC_barrier_(lua_State *L, GCObject *o, GCObject *v); // idb
void __cdecl luaC_barrierproto_(lua_State *L, Proto *p, Closure *c); // idb
void __cdecl luaC_checkupvalcolor(global_State *g, UpVal *uv); // idb
// void __usercall traverseweakvalue(Table *h@<edi>, global_State *g);
// int __usercall traverseephemeron@<eax>(Table *h@<edi>, global_State *g);
// int __usercall traversetable@<eax>(Table *h@<eax>, global_State *g);
// void __usercall propagatemark(global_State *g@<ebx>);
// void __usercall propagateall(global_State *g@<ebx>);
// void __usercall convergeephemerons(global_State *g@<eax>);
// void __usercall clearkeys(GCObject *l@<eax>, global_State *g, GCObject *f);
// void __usercall clearvalues(GCObject *l@<eax>, global_State *g, GCObject *f);
unsigned int __cdecl atomic(lua_State *L);
// int __usercall singlestep@<eax>(lua_State *L@<eax>);
void __cdecl luaC_runtilstate(lua_State *L, int statesmask); // idb
void __cdecl incstep(lua_State *L); // idb
void __cdecl luaC_fullgc(lua_State *L, int isemergency); // idb
void __cdecl luaC_changemode(lua_State *L, int mode); // idb
// void __usercall generationalcollection(lua_State *L@<eax>);
void __cdecl luaC_forcestep(lua_State *L); // idb
void __cdecl luaC_step(lua_State *L); // idb
void __cdecl luaT_init(lua_State *L); // idb
lua_TValue *__cdecl luaT_gettm(Table *events, TMS event, TString *ename); // idb
lua_TValue *__cdecl luaT_gettmbyobj(lua_State *L, lua_TValue *o, TMS event); // idb
lua_TValue *__cdecl luaV_tonumber(lua_TValue *obj, lua_TValue *n); // idb
int __cdecl luaV_tostring(lua_State *L, lua_TValue *obj); // idb
// void __usercall callTM(lua_State *L@<eax>, lua_TValue *p1@<edx>, lua_TValue *p2@<ecx>, lua_TValue *f, lua_TValue *p3, int hasres);
void __cdecl luaV_gettable(lua_State *L, lua_TValue *t, lua_TValue *key, lua_TValue *val); // idb
void __cdecl luaV_settable(lua_State *L, lua_TValue *t, lua_TValue *key, lua_TValue *val); // idb
// int __usercall call_binTM@<eax>(lua_State *L@<ecx>, lua_TValue *p1@<ebx>, lua_TValue *res@<eax>, lua_TValue *p2, TMS event);
// lua_TValue *__usercall get_equalTM@<eax>(Table *mt1@<edi>, TMS event@<esi>, lua_State *L, Table *mt2);
// int __usercall l_strcmp@<eax>(TString *ls@<ecx>, TString *rs@<eax>); idb
int __cdecl luaV_lessthan(lua_State *L, lua_TValue *l, lua_TValue *r); // idb
int __cdecl luaV_lessequal(lua_State *L, lua_TValue *l, lua_TValue *r); // idb
int __cdecl luaV_equalobj_(lua_State *L, lua_TValue *t1, lua_TValue *t2); // idb
void __cdecl luaV_concat(lua_State *L, int total); // idb
void __cdecl luaV_objlen(lua_State *L, lua_TValue *ra, lua_TValue *rb); // idb
void __cdecl luaV_arith(lua_State *L, lua_TValue *ra, lua_TValue *rb, lua_TValue *rc, TMS op); // idb
Closure *__cdecl getcached(UpVal **encup, lua_TValue *base);
// void __usercall pushclosure(lua_TValue *ra@<eax>, lua_State *L, Proto *p, UpVal **encup, lua_TValue *base);
void __cdecl luaV_finishOp(lua_State *L); // idb
void __cdecl luaV_execute(lua_State *L); // idb
// Node *__usercall hashnum@<eax>(Table *t@<esi>, long double n); idb
// Node *__usercall mainposition@<eax>(Table *t@<eax>, lua_TValue *key@<edi>); idb
// int __usercall findindex@<eax>(Table *t@<ebx>, lua_TValue *key@<eax>, lua_State *L);
int __cdecl luaH_next(lua_State *L, Table *t, lua_TValue *key); // idb
int __cdecl computesizes(int *nums, int *narray); // idb
int __cdecl numusearray(Table *t, int *nums); // idb
// int __usercall numusehash@<eax>(Table *t@<ebx>, int *nums, int *pnasize); idb
// void __usercall setarrayvector(lua_State *L@<eax>, Table *t@<esi>, int size@<edi>);
// void __usercall setnodevector(lua_State *L@<ecx>, Table *t@<edi>, int size@<eax>);
GCObject *__cdecl luaH_new(lua_State *L);
void __cdecl luaH_free(lua_State *L, Table *t); // idb
Node *__cdecl luaH_getint(Table *t, int key);
lua_TValue *__cdecl luaH_getstr(Table *t, TString *key); // idb
Node *__cdecl luaH_get(Table *t, lua_TValue *key);
Node *__cdecl luaH_set(lua_State *L, Table *t, lua_TValue *key);
// unsigned int __usercall unbound_search@<eax>(Table *t@<ebx>, unsigned int j);
unsigned int __cdecl luaH_getn(Table *t);
void __cdecl luaH_resize(lua_State *L, Table *t, int nasize, int nhsize); // idb
void __cdecl luaH_resizearray(lua_State *L, Table *t, int nasize); // idb
// void __usercall rehash(Table *t@<ecx>, lua_TValue *ek@<edi>, lua_State *L);
Node *__cdecl luaH_newkey(lua_State *L, Table *t, lua_TValue *key);
void __cdecl luaH_setint(lua_State *L, Table *t, int key, lua_TValue *value); // idb
int __thiscall currentline(CallInfo *ci);
int __cdecl lua_sethook(lua_State *L, void (__cdecl *func)(lua_State *, lua_Debug *), int mask, int count); // idb
void (__cdecl *__cdecl lua_gethook(lua_State *L))(lua_State *, lua_Debug *); // idb
int __cdecl lua_gethookmask(lua_State *L); // idb
int __cdecl lua_gethookcount(lua_State *L); // idb
int __cdecl lua_getstack(lua_State *L, int level, lua_Debug *ar); // idb
// const char *__usercall findlocal@<eax>(CallInfo *ci@<esi>, int n@<eax>, lua_State *L, lua_TValue **pos);
const char *__cdecl lua_getlocal(lua_State *L, lua_Debug *ar, int n); // idb
const char *__cdecl lua_setlocal(lua_State *L, lua_Debug *ar, int n); // idb
// void __usercall funcinfo(lua_Debug *ar@<eax>, Closure *cl@<ecx>);
// void __usercall collectvalidlines(lua_State *L@<esi>, Closure *f@<ebx>);
// void __usercall kname(Proto *p@<ecx>, int c@<eax>, const char **name@<esi>, int pc);
// int __usercall findsetreg@<eax>(int reg@<eax>, Proto *p, int lastpc);
const char *__cdecl getobjname(Proto *p, int lastpc, int reg, const char **name); // idb
// const char *__usercall getfuncname@<eax>(CallInfo *ci@<eax>, const char **name@<edi>, lua_State *L);
// const char *__usercall getupvalname@<eax>(CallInfo *ci@<eax>, lua_TValue *o@<edi>, const char **name); idb
// void __usercall addinfo(lua_State *L@<edi>, const char *msg@<ebx>);
void __cdecl __noreturn luaG_errormsg(lua_State *L);
void __noreturn luaG_runerror(lua_State *L, const char *fmt, ...);
// int __usercall auxgetinfo@<eax>(lua_Debug *ar@<esi>, CallInfo *ci@<ebx>, lua_State *L, const char *what, Closure *f);
int __cdecl lua_getinfo(lua_State *L, const char *what, lua_Debug *ar); // idb
void __cdecl __noreturn luaG_typeerror(lua_State *L, lua_TValue *o, const char *op);
void __cdecl __noreturn luaG_concaterror(lua_State *L, lua_TValue *p1, lua_TValue *p2);
void __cdecl __noreturn luaG_aritherror(lua_State *L, lua_TValue *p1, lua_TValue *p2);
void __cdecl __noreturn luaG_ordererror(lua_State *L, lua_TValue *p1, lua_TValue *p2);
int __cdecl luaS_eqlngstr(TString *a, TString *b); // idb
int __cdecl luaS_eqstr(TString *a, TString *b); // idb
unsigned int __cdecl luaS_hash(const char *str, unsigned int l, unsigned int seed); // idb
void __cdecl luaS_resize(lua_State *L, int newsize); // idb
// GCObject *__usercall internshrstr@<eax>(unsigned int l@<edi>, lua_State *L, const char *str);
GCObject *__cdecl luaS_newlstr(lua_State *L, const char *str, unsigned int l);
GCObject *__cdecl luaS_new(lua_State *L, const char *str);
GCObject *__cdecl luaS_newudata(lua_State *L, unsigned int s, Table *e);
GCObject *__cdecl luaF_newCclosure(lua_State *L, int n);
GCObject *__cdecl luaF_newLclosure(lua_State *L, int n);
GCObject *__cdecl luaF_newupval(lua_State *L);
GCObject *__cdecl luaF_findupval(lua_State *L, lua_TValue *level);
void __cdecl luaF_freeupval(lua_State *L, UpVal *uv); // idb
void __cdecl luaF_close(lua_State *L, lua_TValue *level); // idb
GCObject *__cdecl luaF_newproto(lua_State *L);
void __cdecl luaF_freeproto(lua_State *L, Proto *f); // idb
TString *__cdecl luaF_getlocalname(Proto *f, int local_number, int pc);
int __cdecl luaZ_fill(Zio *z); // idb
void __cdecl luaZ_init(lua_State *L, Zio *z, const char *(__cdecl *reader)(lua_State *, void *, unsigned int *), void *data); // idb
unsigned int __cdecl luaZ_read(Zio *z, void *b, unsigned int n); // idb
char *__cdecl luaZ_openspace(lua_State *L, Mbuffer *buff, unsigned int n); // idb
// void __usercall DumpString(TString *s@<eax>, DumpState *D@<esi>);
// void __usercall DumpConstants(DumpState *D@<eax>, Proto *f);
// void __usercall DumpUpvalues(Proto *f@<ebx>, DumpState *D@<esi>);
// void __usercall DumpDebug(DumpState *D@<eax>, Proto *f);
void __cdecl DumpFunction(Proto *f, DumpState *D); // idb
int __cdecl luaU_dump(lua_State *L, Proto *f, int (__cdecl *w)(lua_State *, const void *, unsigned int, void *), void *data, int strip); // idb
int __cdecl db_getregistry(lua_State *L); // idb
int __cdecl db_getmetatable(lua_State *L); // idb
int __cdecl db_setmetatable(lua_State *L); // idb
int __cdecl db_getuservalue(lua_State *L); // idb
int __cdecl db_setuservalue(lua_State *L); // idb
// void __usercall treatstackoption(lua_State *L@<esi>, lua_State *L1@<eax>, const char *fname);
int __cdecl db_getinfo(lua_State *L); // idb
int __cdecl db_getlocal(lua_State *L); // idb
int __cdecl db_setlocal(lua_State *L); // idb
NiUnsharedGeometryGroup *__cdecl db_getupvalue(lua_State *L);
NiUnsharedGeometryGroup *__cdecl db_setupvalue(lua_State *L);
int __cdecl db_upvalueid(lua_State *L); // idb
int __cdecl db_upvaluejoin(lua_State *L); // idb
void __cdecl hookf(lua_State *L, lua_Debug *ar); // idb
int __cdecl db_sethook(lua_State *L); // idb
int __cdecl db_gethook(lua_State *L); // idb
int __cdecl db_debug(lua_State *L); // idb
int __cdecl db_traceback(lua_State *L); // idb
int __cdecl luaopen_debug(lua_State *L); // idb
int __cdecl math_abs(lua_State *L); // idb
int __cdecl math_sin(lua_State *L); // idb
int __cdecl math_sinh(lua_State *L); // idb
int __cdecl math_cos(lua_State *L); // idb
int __cdecl math_cosh(lua_State *L); // idb
int __cdecl math_tan(lua_State *L); // idb
int __cdecl math_tanh(lua_State *L); // idb
int __cdecl math_asin(lua_State *L); // idb
int __cdecl math_acos(lua_State *L); // idb
int __cdecl math_atan(lua_State *L); // idb
int __cdecl math_atan2(lua_State *L); // idb
int __cdecl math_ceil(lua_State *L); // idb
int __cdecl math_floor(lua_State *L); // idb
int __cdecl math_fmod(lua_State *L); // idb
int __cdecl math_modf(lua_State *L); // idb
int __cdecl math_sqrt(lua_State *L); // idb
int __cdecl math_pow(lua_State *L); // idb
int __cdecl math_log(lua_State *L); // idb
int __cdecl math_exp(lua_State *L); // idb
int __cdecl math_deg(lua_State *L); // idb
int __cdecl math_rad(lua_State *L); // idb
int __cdecl math_frexp(lua_State *L); // idb
int __cdecl math_ldexp(lua_State *L); // idb
int __cdecl math_min(lua_State *L); // idb
int __cdecl math_max(lua_State *L); // idb
int __cdecl math_random(lua_State *L); // idb
int __cdecl math_randomseed(lua_State *L); // idb
int __cdecl luaopen_math(lua_State *L); // idb
int __cdecl b_and(lua_State *L); // idb
int __cdecl b_test(lua_State *L); // idb
int __cdecl b_or(lua_State *L); // idb
int __cdecl b_xor(lua_State *L); // idb
int __cdecl b_not(lua_State *L); // idb
int __cdecl b_lshift(lua_State *L); // idb
int __cdecl b_rshift(lua_State *L); // idb
int __cdecl b_arshift(lua_State *L); // idb
int __cdecl b_lrot(lua_State *L); // idb
int __cdecl b_rrot(lua_State *L); // idb
// int __usercall fieldargs@<eax>(lua_State *L@<esi>, int farg@<ebx>, int *width); idb
int __cdecl b_extract(lua_State *L); // idb
int __cdecl b_replace(lua_State *L); // idb
int __cdecl luaopen_bit32(lua_State *L); // idb
int __cdecl str_len(lua_State *L); // idb
int __cdecl str_sub(lua_State *L); // idb
int __cdecl str_reverse(lua_State *L); // idb
int __cdecl str_lower(lua_State *L); // idb
int __cdecl str_upper(lua_State *L); // idb
int __cdecl str_rep(lua_State *L); // idb
int __cdecl str_byte(lua_State *L); // idb
int __cdecl str_char(lua_State *L); // idb
int __cdecl writer(lua_State *L, const void *b, unsigned int size, void *B); // idb
int __cdecl str_dump(lua_State *L); // idb
// const char *__usercall classend@<eax>(MatchState *ms@<edi>, const char *p@<eax>); idb
// int __usercall match_class@<eax>(int c@<eax>, int cl@<edi>); idb
// int __usercall matchbracketclass@<eax>(int c@<ebx>, const char *p@<eax>, const char *ec); idb
// const char *__usercall matchbalance@<eax>(MatchState *ms@<ebx>, const char *s@<ecx>, const char *p@<eax>); idb
const char *__cdecl max_expand(MatchState *ms, const char *s, const char *p, const char *ep); // idb
// const char *__usercall min_expand@<eax>(const char *s@<eax>, MatchState *ms, const char *p, const char *ep);
// const char *__usercall start_capture@<eax>(MatchState *ms@<esi>, const char *s@<ebx>, const char *p, int what); idb
// const char *__usercall end_capture@<eax>(MatchState *ms@<esi>, const char *s@<ebx>, const char *p); idb
// const char *__usercall match_capture@<eax>(MatchState *ms@<ecx>, const char *s@<ebx>, int l@<eax>); idb
const char *__cdecl match(MatchState *ms, const char *s, const char *p); // idb
// const char *__usercall lmemfind@<eax>(unsigned int l2@<eax>, const char *s1, unsigned int l1, const char *s2);
// void __usercall push_onecapture(MatchState *ms@<esi>, int i@<edi>, const char *s@<ecx>, const char *e@<eax>);
// int __usercall push_captures@<eax>(MatchState *ms@<esi>, const char *s, const char *e); idb
// int __usercall nospecials@<eax>(unsigned int l@<ebx>, const char *p);
int __cdecl str_find_aux(int find);
int __cdecl str_find();
int __cdecl str_match();
int __cdecl gmatch_aux(lua_State *L); // idb
int __cdecl gmatch(lua_State *L); // idb
// void __usercall add_s(luaL_Buffer *b@<ebx>, MatchState *ms, const char *s, const char *e);
// void __usercall add_value(MatchState *ms@<edx>, const char *e@<ecx>, int tr@<eax>, luaL_Buffer *b, const char *s);
int __cdecl str_gsub(lua_State *L); // idb
// void __usercall addquoted(luaL_Buffer *b@<esi>, int arg@<ecx>, lua_State *L);
// char *__usercall scanformat@<eax>(lua_State *L@<eax>, const char *strfrmt@<ebx>, char *form);
void __cdecl addlenmod(char *form);
int __cdecl str_format(lua_State *L); // idb
int __cdecl luaopen_string(lua_State *L); // idb
int __cdecl os_execute(lua_State *L); // idb
int __cdecl os_remove(lua_State *L); // idb
int __cdecl os_rename(lua_State *L); // idb
int __cdecl os_tmpname(lua_State *L); // idb
int __cdecl os_getenv(lua_State *L); // idb
int __cdecl os_clock(lua_State *L); // idb
// const char *__usercall checkoption@<eax>(const char *conv@<esi>, char *buff@<ebx>, lua_State *L);
int __cdecl os_date(lua_State *L); // idb
int __cdecl os_time(lua_State *L); // idb
int __cdecl os_difftime(lua_State *L); // idb
int __cdecl os_setlocale(lua_State *L); // idb
int __cdecl os_exit(lua_State *L); // idb
int __cdecl luaopen_os(lua_State *L); // idb
int __cdecl io_type(lua_State *L); // idb
int __cdecl f_tostring(lua_State *L); // idb
int __cdecl io_close(lua_State *L); // idb
int __cdecl f_gc(lua_State *L); // idb
int __cdecl io_fclose(lua_State *L); // idb
// void __usercall opencheck(lua_State *L@<edi>, const char *fname@<ebx>, const char *mode);
int __cdecl io_open(lua_State *L); // idb
int __cdecl io_pclose(lua_State *L); // idb
int __cdecl io_popen(lua_State *L); // idb
int __cdecl io_tmpfile(lua_State *L); // idb
// int __usercall g_iofile@<eax>(lua_State *L@<eax>, const char *f@<esi>, const char *mode); idb
int __cdecl io_input(lua_State *L); // idb
int __cdecl io_output(lua_State *L); // idb
// int __usercall read_number@<eax>(lua_State *L@<esi>, _iobuf *f@<ecx>); idb
// int __usercall read_line@<eax>(lua_State *L@<ebx>, _iobuf *f@<edi>, int chop); idb
// void __usercall read_all(_iobuf *f@<edi>, lua_State *L);
// int __usercall g_read@<eax>(lua_State *L@<ecx>, _iobuf *f@<edx>, int first); idb
int __cdecl io_read(lua_State *L); // idb
int __cdecl f_read(lua_State *L); // idb
int __cdecl io_readline(lua_State *L); // idb
// int __usercall g_write@<eax>(lua_State *L@<ebx>, int arg@<eax>, _iobuf *f);
int __cdecl io_write(lua_State *L); // idb
int __cdecl f_write(lua_State *L); // idb
int __cdecl f_seek(lua_State *L); // idb
int __cdecl f_setvbuf(lua_State *L); // idb
int __cdecl io_flush(lua_State *L); // idb
int __cdecl f_flush(lua_State *L); // idb
int __cdecl io_noclose(lua_State *L); // idb
int __cdecl luaopen_io(lua_State *L); // idb
// void __usercall aux_lines(lua_State *L@<edi>, int toclose);
int __cdecl f_lines(lua_State *L); // idb
int __cdecl io_lines(lua_State *L); // idb
int __cdecl tinsert(lua_State *L); // idb
int __cdecl tremove(lua_State *L); // idb
int __cdecl tconcat(lua_State *L); // idb
int __cdecl pack(lua_State *L); // idb
int __cdecl unpack(lua_State *L); // idb
void __cdecl auxsort(lua_State *L, int l, int u); // idb
int __cdecl sort(lua_State *L); // idb
int __cdecl luaopen_table(lua_State *L); // idb
// int __usercall auxresume@<eax>(lua_State *L@<edi>, lua_State *co@<esi>, int narg@<eax>); idb
int __cdecl luaB_coresume(lua_State *L); // idb
int __cdecl luaB_auxwrap(lua_State *L); // idb
int __cdecl luaB_cocreate(lua_State *L); // idb
int __cdecl luaB_cowrap(lua_State *L); // idb
int __cdecl luaB_yield(lua_State *L); // idb
int __cdecl luaB_costatus(lua_State *L); // idb
int __cdecl luaB_corunning(lua_State *L); // idb
int __cdecl luaopen_coroutine(lua_State *L); // idb
// void __usercall setprogdir(lua_State *L@<esi>);
// void __usercall pusherror(lua_State *L@<edi>);
// void __usercall ll_addtoclib(lua_State *L@<esi>, const char *path, void *plib);
int __cdecl gctm(lua_State *L); // idb
// int __usercall ll_loadfunc@<eax>(lua_State *L@<eax>, const char *path, const char *sym); idb
int __cdecl ll_loadlib(lua_State *L); // idb
// const char *__usercall searchpath@<eax>(lua_State *L@<esi>, const char *path@<ecx>, const char *sep@<edx>, const char *name, const char *dirsep);
int __cdecl ll_searchpath(lua_State *L); // idb
int __cdecl searcher_Lua(lua_State *L); // idb
// int __usercall loadfunc@<eax>(lua_State *L@<esi>, const char *modname@<eax>, const char *filename);
int __cdecl searcher_C(lua_State *L); // idb
void __cdecl searcher_Croot(lua_State *L);
int __cdecl searcher_preload(lua_State *L); // idb
// void __usercall findloader(lua_State *L@<esi>, const char *name@<edi>);
int __cdecl ll_require(lua_State *L); // idb
// void __usercall setpath(lua_State *L@<ecx>, const char *envname1@<eax>, const char *fieldname, const char *envname2, const char *def);
// void __usercall createsearcherstable(lua_State *L@<edi>);
int __cdecl luaopen_package(lua_State *L); // idb
int __cdecl luaB_print(lua_State *L); // idb
int __cdecl luaB_tonumber(lua_State *L); // idb
void __cdecl __noreturn luaB_error(lua_State *L);
int __cdecl luaB_getmetatable(lua_State *L); // idb
int __cdecl luaB_setmetatable(lua_State *L); // idb
int __cdecl luaB_rawequal(lua_State *L); // idb
int __cdecl luaB_rawlen(lua_State *L); // idb
int __cdecl luaB_rawget(lua_State *L); // idb
int __cdecl luaB_rawset(lua_State *L); // idb
int __cdecl luaB_collectgarbage(lua_State *L); // idb
int __cdecl luaB_type(lua_State *L); // idb
int __cdecl luaB_next(lua_State *L); // idb
int __cdecl luaB_pairs(lua_State *L); // idb
int __cdecl ipairsaux(lua_State *L); // idb
int __cdecl luaB_ipairs(lua_State *L); // idb
int __cdecl luaB_loadfile(lua_State *L); // idb
const char *__cdecl generic_reader(lua_State *L, void *ud, unsigned int *size); // idb
int __cdecl luaB_load(lua_State *L); // idb
int __cdecl dofilecont(lua_State *L); // idb
int __cdecl luaB_dofile(lua_State *L); // idb
int __cdecl luaB_assert(lua_State *L); // idb
int __cdecl luaB_select(lua_State *L); // idb
int __cdecl pcallcont(lua_State *L); // idb
int __cdecl luaB_pcall(lua_State *L); // idb
int __cdecl luaB_xpcall(lua_State *L); // idb
int __cdecl luaB_tostring(lua_State *L); // idb
int __cdecl luaopen_base(lua_State *L); // idb
void __cdecl __noreturn luaM_toobig(lua_State *L);
void *__cdecl luaM_realloc_(lua_State *L, void *block, unsigned int osize, unsigned int nsize); // idb
void *__cdecl luaM_growaux_(lua_State *L, void *block, int *size, unsigned int size_elems, int limit, const char *what); // idb
void __cdecl sub_754660(int c);
void __cdecl luaX_init(lua_State *L); // idb
const char *__cdecl luaX_token2str(LexState *ls, int token); // idb
void __cdecl __noreturn lexerror(LexState *ls, const char *msg, int token);
void __cdecl __noreturn luaX_syntaxerror(LexState *ls, const char *msg);
GCObject *__cdecl luaX_newstring(LexState *ls, const char *str, unsigned int l);
// void __usercall inclinenumber(LexState *ls@<esi>);
void __cdecl luaX_setinput(lua_State *L, LexState *ls, Zio *z, TString *source, int firstchar); // idb
// int __usercall check_next@<eax>(LexState *ls@<esi>, const char *set); idb
// void __usercall trydecpoint(LexState *ls@<esi>, SemInfo *seminfo);
// void __usercall read_numeral(LexState *ls@<eax>, SemInfo *seminfo);
// int __usercall skip_sep@<eax>(LexState *ls@<edi>); idb
// void __usercall read_long_string(LexState *ls@<eax>, SemInfo *seminfo, int sep);
void __cdecl __noreturn escerror(LexState *ls, int *c, int n, const char *msg);
// int __usercall readhexaesc@<eax>(LexState *ls@<esi>); idb
// int __usercall readdecesc@<eax>(LexState *ls@<esi>); idb
// void __usercall read_string(LexState *ls@<eax>, int del, SemInfo *seminfo);
// int __usercall llex@<eax>(LexState *ls@<eax>, SemInfo *seminfo); idb
void __cdecl luaX_next(LexState *ls); // idb
int __cdecl luaX_lookahead(LexState *ls); // idb
// void __usercall __noreturn error_expected(LexState *ls@<esi>, int token@<eax>);
// void __usercall __noreturn errorlimit(FuncState *fs@<esi>, int limit, const char *what);
// int __usercall testnext@<eax>(LexState *ls@<eax>, int c); idb
// TString *__usercall str_checkname@<eax>(LexState *ls@<eax>); idb
// void __usercall codestring(LexState *ls@<ecx>, expdesc *e@<esi>, TString *s@<eax>);
int __cdecl registerlocalvar(LexState *ls, TString *varname); // idb
// void __usercall new_localvar(LexState *ls@<ebx>, TString *name@<eax>);
// void __usercall adjustlocalvars(LexState *ls@<eax>, int nvars@<edx>);
// void __usercall removevars(FuncState *fs@<eax>, int tolevel@<edx>);
// int __usercall searchupvalue@<eax>(FuncState *fs@<edi>, TString *name); idb
// int __usercall newupvalue@<eax>(FuncState *fs@<eax>, TString *name, expdesc *v); idb
// int __usercall searchvar@<eax>(FuncState *fs@<esi>, TString *n@<ebx>); idb
int __cdecl singlevaraux(FuncState *fs, TString *n, expdesc *var, int base); // idb
// void __usercall singlevar(LexState *ls@<ecx>, expdesc *var@<ebx>);
// void __usercall adjust_assign(LexState *ls@<eax>, int nvars@<edx>, expdesc *e@<ecx>, int nexps);
// void __usercall closegoto(LexState *ls@<eax>, Labeldesc *label@<ebx>, int g);
// int __usercall findlabel@<eax>(LexState *ls@<ebx>, int g); idb
// int __usercall newlabelentry@<eax>(LexState *ls@<ebx>, Labellist *l@<esi>, TString *name, int line, int pc); idb
void __cdecl findgotos(LexState *ls, Labeldesc *lb); // idb
void __cdecl movegotosout(FuncState *fs, BlockCnt *bl); // idb
// void __usercall breaklabel(LexState *ls@<edi>);
// void __usercall __noreturn undefgoto(LexState *ls@<esi>, Labeldesc *gt@<edx>);
// void __usercall leaveblock(FuncState *fs@<eax>);
// GCObject *__usercall addprototype@<eax>(LexState *ls@<eax>);
// void __usercall open_func(LexState *ls@<eax>, FuncState *fs@<esi>, BlockCnt *bl);
void __cdecl close_func(LexState *ls); // idb
// int __usercall block_follow@<eax>(LexState *ls@<eax>, int withuntil); idb
// void __usercall fieldsel(LexState *ls@<ecx>, expdesc *v@<edi>);
// void __usercall recfield(LexState *ls@<ecx>, ConsControl *cc@<ebx>);
// void __usercall lastlistfield(FuncState *fs@<edi>, ConsControl *cc@<esi>);
void __fastcall constructor(LexState *ls, expdesc *t);
// void __usercall parlist(LexState *ls@<eax>);
// void __usercall body(LexState *ls@<eax>, expdesc *e@<edi>, int ismethod, int line);
// int __usercall explist@<eax>(LexState *ls@<esi>, expdesc *v@<edi>); idb
void __cdecl funcargs(expdesc *f, int line);
// void __usercall primaryexp(LexState *ls@<ecx>, expdesc *v@<eax>);
// void __usercall suffixedexp(LexState *ls@<ecx>, expdesc *v@<edi>);
// void __usercall simpleexp(LexState *ls@<ebx>, expdesc *v@<eax>);
// signed int __usercall getbinopr@<eax>(int op@<eax>);
signed int __cdecl subexpr(LexState *ls, expdesc *v, int limit);
// void __usercall block(LexState *ls@<eax>);
// void __usercall check_conflict(LexState *ls@<ecx>, LHS_assign *lh@<eax>, expdesc *v@<esi>);
void __cdecl assignment(LexState *ls, LHS_assign *lh, int nvars); // idb
// void __usercall gotostat(LexState *ls@<eax>, int pc);
// void __usercall labelstat(LexState *ls@<eax>, TString *label, int line);
void __cdecl whilestat(int line);
void __cdecl repeatstat(int line);
// void __usercall forbody(LexState *ls@<eax>, int base, int line, int nvars, int isnum);
// void __usercall fornum(LexState *ls@<ecx>, TString *varname@<edx>, int line);
void __fastcall forlist(LexState *ls, TString *indexname);
// void __usercall forstat(LexState *ls@<eax>, int line);
void __cdecl test_then_block(int *escapelist);
// void __usercall ifstat(LexState *ls@<eax>, int line@<ebx>);
void __thiscall localfunc(LexState *ls);
void __thiscall localstat(LexState *ls);
int __fastcall funcname(LexState *ls, expdesc *v);
// void __usercall funcstat(LexState *ls@<esi>, int line@<ebx>);
// void __usercall exprstat(LexState *ls@<esi>);
void __thiscall retstat(LexState *ls);
void __cdecl statement(LexState *ls); // idb
void __cdecl statlist(LexState *ls); // idb
// void __usercall mainfunc(LexState *ls@<edi>, FuncState *fs@<eax>);
GCObject *__cdecl luaY_parser(lua_State *L, Zio *z, Mbuffer *buff, Dyndata *dyd, const char *name, int firstchar);
// void __usercall __noreturn error_0(LoadState *S@<esi>, const char *why@<eax>);
// TString *__usercall LoadString@<eax>(LoadState *S@<eax>); idb
// void __usercall LoadCode(LoadState *S@<eax>, Proto *f);
// void __usercall LoadConstants(LoadState *S@<eax>, Proto *f@<edi>);
// void __usercall LoadUpvalues(Proto *f@<eax>, LoadState *S);
// void __usercall LoadDebug(LoadState *S@<eax>, Proto *f@<edi>);
void __cdecl LoadFunction(LoadState *S, Proto *f); // idb
void __cdecl luaU_header(char *h); // idb
void __thiscall LoadHeader(LoadState *S);
GCObject *__cdecl luaU_undump(lua_State *L, Zio *Z, Mbuffer *buff, const char *name);
int __cdecl luaK_getlabel(FuncState *fs); // idb
// int __usercall need_value@<eax>(FuncState *fs@<eax>, int list@<edx>); idb
// void __usercall removevalues(FuncState *fs@<edx>, int list@<eax>);
// void __usercall patchlistaux(int list@<eax>, FuncState *fs, int vtarget, int reg, int dtarget);
void __cdecl luaK_patchclose(FuncState *fs, int list, int level); // idb
void __cdecl luaK_concat(FuncState *fs, int *l1, int l2); // idb
// int __usercall luaK_code@<eax>(FuncState *fs@<esi>, unsigned int i); idb
int __cdecl luaK_codeABC(FuncState *fs, OpCode o, int a, int b, int c); // idb
int __cdecl luaK_codeABx(FuncState *fs, OpCode o, int a, unsigned int bc); // idb
int __cdecl luaK_codek(FuncState *fs, int reg, int k); // idb
void __cdecl luaK_checkstack(FuncState *fs, int n); // idb
void __cdecl luaK_reserveregs(FuncState *fs, int n); // idb
// void __usercall freeexp(FuncState *fs@<ecx>, expdesc *e@<eax>);
int __cdecl addk(FuncState *fs, lua_TValue *v);
int __cdecl luaK_stringK(FuncState *fs, TString *s); // idb
int __cdecl luaK_numberK(FuncState *fs, long double r); // idb
void __cdecl luaK_setreturns(FuncState *fs, expdesc *e, int nresults); // idb
void __cdecl luaK_setoneret(FuncState *fs, expdesc *e); // idb
void __cdecl luaK_dischargevars(FuncState *fs, expdesc *e); // idb
// void __usercall invertjump(FuncState *fs@<ecx>, expdesc *e@<eax>);
// int __usercall constfolding@<eax>(OpCode op@<edx>, expdesc *e1@<esi>, expdesc *e2@<ecx>); idb
void __cdecl luaK_fixline(FuncState *fs, int line); // idb
void __cdecl luaK_setlist(FuncState *fs, int base, int nelems, int tostore); // idb
void __cdecl luaK_nil(FuncState *fs, int from, int n); // idb
FuncState *__cdecl luaK_jump(FuncState *fs);
void __cdecl luaK_ret(FuncState *fs, int first, int nret); // idb
void __cdecl luaK_patchtohere(FuncState *fs, int list); // idb
// void __usercall discharge2reg(FuncState *fs@<eax>, expdesc *e@<ebx>, int reg@<edi>);
// void __usercall discharge2anyreg(FuncState *fs@<eax>, expdesc *e@<ecx>);
// void __usercall exp2reg(FuncState *fs@<ecx>, expdesc *e@<eax>, int reg);
void __cdecl luaK_exp2nextreg(FuncState *fs, expdesc *e); // idb
int __cdecl luaK_exp2anyreg(FuncState *fs, expdesc *e); // idb
void __cdecl luaK_exp2anyregup(FuncState *fs, expdesc *e); // idb
void __cdecl luaK_exp2val(FuncState *fs, expdesc *e); // idb
int __cdecl luaK_exp2RK(FuncState *fs, expdesc *e); // idb
void __cdecl luaK_storevar(FuncState *fs, expdesc *var, expdesc *ex); // idb
void __cdecl luaK_self(FuncState *fs, expdesc *e, expdesc *key); // idb
// int __usercall jumponcond@<eax>(FuncState *fs@<ecx>, expdesc *e@<eax>, int cond); idb
void __cdecl luaK_goiftrue(FuncState *fs, expdesc *e); // idb
void __cdecl luaK_goiffalse(FuncState *fs, expdesc *e); // idb
// void __usercall codenot(FuncState *fs@<eax>, expdesc *e@<edi>);
void __cdecl luaK_indexed(FuncState *fs, expdesc *t, expdesc *k); // idb
// void __usercall codearith(FuncState *fs@<edi>, expdesc *e1@<ebx>, OpCode op, expdesc *e2, int line);
// void __usercall codecomp(FuncState *fs@<ecx>, expdesc *e2@<eax>, OpCode op, int cond, expdesc *e1);
void __cdecl luaK_prefix(FuncState *fs, UnOpr op, expdesc *e, int line); // idb
void __cdecl luaK_infix(FuncState *fs, BinOpr op, expdesc *v); // idb
void __cdecl luaK_posfix(FuncState *fs, BinOpr op, expdesc *e1, expdesc *e2, int line); // idb
void __cdecl luaK_patchlist(FuncState *fs, int list, int target); // idb
// BOOL __stdcall Thread32Next(HANDLE hSnapshot, LPTHREADENTRY32 lpte);
// BOOL __stdcall Thread32First(HANDLE hSnapshot, LPTHREADENTRY32 lpte);
// HANDLE __stdcall CreateToolhelp32Snapshot(DWORD dwFlags, DWORD th32ProcessID);
// BOOL __stdcall Process32Next(HANDLE hSnapshot, LPPROCESSENTRY32 lppe);
// BOOL __stdcall Process32First(HANDLE hSnapshot, LPPROCESSENTRY32 lppe);
int __stdcall ijlInit(int a1);
int __stdcall ijlFree(int a1);
signed int __cdecl CheckParameters(struct _JPEG_CORE_PROPERTIES *a1);
int __stdcall ijlRead(struct _JPEG_CORE_PROPERTIES *, int); // idb
int __stdcall ijlWrite(struct _JPEG_CORE_PROPERTIES *, int); // idb
char *__stdcall ijlErrorStr(int a1);
int sub_75E320(); // weak
int sub_75E340(); // weak
HMODULE __cdecl sub_75E350(int a1);
int __cdecl sub_75E3D0(int a1);
HMODULE __cdecl sub_75E410(int a1);
int __cdecl sub_75E470(int a1);
int (__cdecl *__cdecl sub_75E4A0(int a1))(int a1, int a2);
signed int (__cdecl *__cdecl sub_75E6D0(int a1))(int a1, int a2);
int (__cdecl *__cdecl sub_75E900(int a1))(int a1, int a2);
int (__cdecl *__cdecl sub_75EB30(int a1))(int a1, int a2);
int (__cdecl *__cdecl sub_75ED60(int a1))(int a1, int a2);
signed int __cdecl ownQueryProcessorType(int a1);
int __cdecl ownInitializeLibrary(struct _IJL_CONTEXT *); // idb
int __cdecl ownFreeLibrary(int a1);
__int64 ownRDTSCs();
int ownEMMSs(); // weak
int sub_75F140();
struct IJL_PROCESSOR_INFO *__cdecl ownGetProcessorInfo(); // idb
signed int __cdecl ownGetProcessorType(struct _IJL_CONTEXT *a1);
HANDLE __cdecl ownOpenFile(const char *lpFileName, DWORD dwDesiredAccess);
int __cdecl ownCloseFile(HANDLE hObject); // idb
int __cdecl ownReadFile(HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead, LPDWORD lpNumberOfBytesRead); // idb
int __cdecl ownWriteFile(HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite, LPDWORD lpNumberOfBytesWritten); // idb
int __cdecl ownSeekFile(HANDLE hFile, LONG lDistanceToMove, DWORD dwMoveMethod); // idb
int __cdecl Get_Scan(struct _STATE *a1, struct _SCAN *a2, struct _JPEG_PROPERTIES *a3);
signed int __cdecl IJL_Decode(struct _JPEG_PROPERTIES *a1);
int __cdecl SetDefaultTables(int a1);
int __cdecl Scale_Char_Matrix(signed int a1, int a2, int a3);
int __cdecl BuildEncoderHuffmanTable(int a1, int a2, int a3);
int __cdecl BuildDecoderHuffmanTable(int a1, int a2, int a3, int a4, int a5);
int __cdecl ownEncoderWriteJPEGTables(struct _JPEG_PROPERTIES *); // idb
int __cdecl Encode_Frame_Init(struct _JPEG_PROPERTIES *a1);
int __cdecl Encode_Frame(struct _JPEG_PROPERTIES *a1);
int __cdecl sub_7614E0(int a1, int a2, int a3, int a4, int a5, int a6, int a7);
void __cdecl sub_761540(int a1, int a2, signed int a3, int a4, int a5);
signed int __cdecl sub_7616B0(int a1, _DWORD *a2);
signed int __cdecl sub_7617A0(int a1, int a2);
signed int __cdecl sub_761840(int a1, int *a2);
signed int __cdecl Encode_Frame_P(struct _JPEG_PROPERTIES *a1);
void *ownGetLibVersion();
signed int __cdecl FillEncoderQuantTable_AAN(int a1);
signed int __cdecl fQnt8x8_AAN_PX(int a1, int a2);
int __cdecl fDCT8x8_AAN_PX(int a1);
int __cdecl fQnt8x8_AAN_M5(int a1, int a2);
int __cdecl fDCT8x8_AAN_M5(int a1);
int __cdecl FillDecoderQuantTable_AAN(int a1);
signed int __cdecl iQnt8x8_AAN_PX(int a1, int a2);
int __cdecl iDCT8x8_AAN_PX(int a1);
int __cdecl iDCT8x8_AAN_M5(int a1);
int __cdecl iDCT4x4_AAN_PX(int a1);
int __cdecl iDCT2x2_AAN_PX(int a1);
_WORD *__cdecl iDCT1x1_AAN_PX(_WORD *a1);
signed int __cdecl FillEncoderQuantTable_IPP(int a1);
signed int __cdecl fQnt8x8_IPP_PX(int a1, int a2);
// void __usercall fQnt8x8_IPP_M5(__m64 a1@<mm6>, int a2, int a3);
// void __usercall fQnt8x8_IPP_A6(__m64 a1@<mm6>, int a2, int a3);
// void __usercall fQnt8x8_IPP_W7(__m128i a1@<xmm6>, int a2, int a3);
int __cdecl fDCT8x8_IPP_PX(int a1);
void __cdecl fDCT8x8_IPP_M5(int a1);
void __cdecl fDCT8x8_IPP_A6(int a1);
void **__cdecl fDCT8x8_IPP_W7(int a1);
signed int __cdecl sub_764B60(int a1);
signed int __cdecl sub_764BC0(int a1, signed int a2, signed int a3);
signed int __cdecl sub_764CA0(int a1, signed int a2, signed int a3);
void __cdecl Make_optimal_huff_table(int *const , unsigned __int8 *, unsigned __int8 *); // idb
signed int __cdecl EncodeHuffman8x8_PX(int a1, int a2, int a3, _WORD *a4, _WORD *a5);
// int __usercall EncodeHuffman8x8_M5@<eax>(__m64 a1@<mm1>, struct _STATE *a2, int a3, int a4, int a5, int a6);
signed int __cdecl EncodeHuffman8x8_A6(__m64 *a1, int a2, unsigned int a3, _WORD *a4, _WORD *a5);
void __cdecl Gather_Prog_DC_SA(int *const , int *, __int16 *, int, int); // idb
void __cdecl Encode_Prog_DC_SA(struct _STATE *, struct _HUFFMAN_TABLE *, int *, __int16 *, int, int); // idb
void __cdecl Gather_EOBRUN(struct _STATE *, int *const ); // idb
void __cdecl Encode_EOBRUN(struct _STATE *, struct _HUFFMAN_TABLE *); // idb
void __cdecl Encode_ZRL(struct _STATE *, struct _HUFFMAN_TABLE *, int *); // idb
int __cdecl sub_765D30(__int16 a1);
int __cdecl sub_765D60(signed int a1);
void __cdecl Append_BE_bits(struct _STATE *, unsigned __int8 *, int *); // idb
void __cdecl Gather_Prog_AC_first(struct _STATE *, __int16 *, int, int, int, int *const ); // idb
void __cdecl Gather_Prog_AC_refine(struct _STATE *, __int16 *, int, int, int, unsigned __int8 *, int *, int *const ); // idb
void __cdecl Encode_Prog_AC_first(struct _STATE *, struct _HUFFMAN_TABLE *, __int16 *, int, int, int); // idb
void __cdecl Encode_Prog_AC_refine(struct _STATE *, struct _HUFFMAN_TABLE *, __int16 *, int, int, int, unsigned __int8 *, int *); // idb
int __cdecl GET_BITS(struct _STATE *, int); // idb
int __cdecl PEEK_BITS(struct _STATE *, int); // idb
signed int __cdecl Fill_Bit_Buffer(struct _STATE *a1, int a2);
int __cdecl sub_766930(struct _STATE *, int, int, int); // idb
int __cdecl sub_766A20(struct _STATE *, int, int); // idb
int __cdecl DecodeHuffman8x8_PX(struct _STATE *, int, int, int, int); // idb
int __cdecl DecodeHuffman8x8_M5(__m64 *a1, unsigned int a2, unsigned int a3, _WORD *a4, int a5);
int __cdecl DecodeHuffman8x8_M6(int a1, unsigned int a2, unsigned int a3, _WORD *a4, int a5);
int __cdecl Decode_Block_Skip_M5(struct _STATE *a1, struct _HUFFMAN_TABLE *a2, struct _HUFFMAN_TABLE *a3, __int16 *a4);
signed int __cdecl Decode_Block_Thumb_PX(struct _STATE *a1, struct _HUFFMAN_TABLE *a2, struct _HUFFMAN_TABLE *a3, __int16 *a4, __int16 *a5);
signed int __cdecl Decode_Block_Prog_DC(struct _STATE *a1, struct _HUFFMAN_TABLE *a2, __int16 *a3, __int16 *a4, int a5);
signed int __cdecl Decode_Block_Prog_DC_SA(struct _STATE *a1, __int16 *a2, int a3);
signed int __cdecl Decode_Block_Prog_AC(struct _STATE *a1, __int16 *a2, struct _HUFFMAN_TABLE *a3, int a4, int a5, int a6);
signed int __cdecl Decode_Block_Prog_AC_SA(struct _STATE *a1, __int16 *a2, struct _HUFFMAN_TABLE *a3, int a4, int a5, int a6);
int __cdecl FillDecoderQuantTable_IPP(int a1);
signed int __cdecl iQnt8x8_IPP_PX(int a1, int a2);
void __cdecl iQnt8x8_IPP_M5(int a1, int a2);
void __cdecl iQnt8x8_IPP_W7(int a1, int a2);
signed __int16 *__cdecl iDCT8x8_IPP_PX(signed __int16 *a1);
void __cdecl iDCT8x8_IPP_M5(int a1);
void __cdecl iDCT8x8_IPP_A6(int a1);
void **__cdecl iDCT8x8_IPP_W7(int a1);
char *__cdecl iDCT4x4_IPP_PX(int a1);
int __cdecl iDCT2x2_IPP_PX(int a1);
_WORD *__cdecl iDCT1x1_IPP_PX(_WORD *a1);
void __cdecl EB_Init_PX(struct _STATE *, unsigned __int8 *, unsigned __int32); // idb
void __cdecl EB_Init_M5(struct _STATE *, unsigned __int8 *, unsigned __int32); // idb
int __cdecl EB_Write_Bytes_PX(int a1, unsigned int a2, int a3);
int __cdecl EB_Write_Bytes_M5(int a1, int a2, int a3);
// signed int __usercall EB_Write_Bits_M5@<eax>(__m64 a1@<mm1>, unsigned __int32 a2, int a3, struct _STATE *a4);
// signed int __usercall EB_Write_Bits_File_M5@<eax>(__m64 a1@<mm1>, unsigned __int32 a2, int a3, struct _STATE *a4);
int __cdecl Flush_Buffer_To_File(int a1);
signed int __cdecl flush_mbuffer_to_file(int a1);
signed int __cdecl Set_Encode_Fast_Path(struct _JPEG_PROPERTIES *a1);
unsigned int __cdecl sub_768FF0(int a1, int a2, int a3, signed int a4, int a5);
signed int __cdecl RGB_to_YCbCr_111_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5);
int __cdecl RGB_to_YCbCr_111_Full_MCU_M5(int a1, int a2, int a3, int a4, int a5);
void __cdecl RGB_to_YCbCr_111_MCU(struct _JPEG_PROPERTIES *, int, int); // idb
unsigned int __cdecl sub_769980(int a1, int a2, int a3, signed int a4, int a5);
signed int __cdecl BGR_to_YCbCr_111_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5);
int __cdecl BGR_to_YCbCr_111_Full_MCU_M5(int a1, int a2, int a3, int a4, int a5);
void __cdecl BGR_to_YCbCr_111_MCU(struct _JPEG_PROPERTIES *, int, int); // idb
int __cdecl sub_76A320(int a1, int a2, int a3, signed int a4, int a5);
int __cdecl sub_76A870(int a1, int a2, int a3, int a4, int a5);
int __cdecl RGB_to_YCbCr_411_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5);
int __cdecl RGB_to_YCbCr_411_Full_MCU_M5(int a1, int a2, int a3, int a4);
void __cdecl RGB_to_YCbCr_411_MCU(struct _JPEG_PROPERTIES *, int, int); // idb
int __cdecl sub_76B4A0(int a1, int a2, int a3, signed int a4, int a5);
int __cdecl sub_76B9F0(int a1, int a2, int a3, int a4, int a5);
int __cdecl BGR_to_YCbCr_411_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5);
int __cdecl BGR_to_YCbCr_411_Full_MCU_M5(int a1, int a2, int a3, int a4);
void __cdecl BGR_to_YCbCr_411_MCU(struct _JPEG_PROPERTIES *, int, int); // idb
unsigned int __cdecl sub_76C620(int a1, int a2, int a3, signed int a4, int a5);
int __cdecl RGB_to_YCbCr_422_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5);
int __cdecl RGB_to_YCbCr_422_Full_MCU_M5(int a1, int a2, int a3, __m64 *a4, unsigned __int64 *a5);
void __cdecl RGB_to_YCbCr_422_MCU(struct _JPEG_PROPERTIES *, int, int); // idb
unsigned int __cdecl sub_76D220(int a1, int a2, int a3, signed int a4, int a5);
int __cdecl BGR_to_YCbCr_422_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5);
int __cdecl BGR_to_YCbCr_422_Full_MCU_M5(int a1, int a2, int a3, __m64 *a4, unsigned __int64 *a5);
void __cdecl BGR_to_YCbCr_422_MCU(struct _JPEG_PROPERTIES *, int, int); // idb
unsigned int __cdecl sub_76DE20(int a1, int a2, int a3, signed int a4, int a5);
int __cdecl RGBA_FPX_to_YCbCrA_FPX_1111_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5, int a6);
int __cdecl RGBA_FPX_to_YCbCrA_FPX_1111_Full_MCU_M5(int a1, int a2, int a3, int a4, int a5);
void __cdecl RGBA_FPX_to_YCbCrA_FPX_1111_MCU(struct _JPEG_PROPERTIES *, int, int); // idb
unsigned int __cdecl sub_76E7A0(int a1, int a2, int a3, signed int a4, int a5);
int __cdecl RGBA_FPX_to_YCbCrA_FPX_4224_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5, int a6);
int __cdecl RGBA_FPX_to_YCbCrA_FPX_4224_Full_MCU_M5(int a1, int a2, int a3, int a4, int a5, int a6);
void __cdecl RGBA_FPX_to_YCbCrA_FPX_4224_MCU(struct _JPEG_PROPERTIES *, int, int); // idb
int __cdecl sub_76F400(int a1, int a2, int a3, signed int a4, int a5);
int __cdecl sub_76F7E0(int a1, int a2, int a3, int a4, int a5, int a6);
int __cdecl RGBA_FPX_to_YCbCrA_FPX_4114_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5, int a6);
int __cdecl RGBA_FPX_to_YCbCrA_FPX_4114_Full_MCU_M5(int a1, int a2, int a3, int a4, int a5, int a6);
void __cdecl RGBA_FPX_to_YCbCrA_FPX_4114_MCU(struct _JPEG_PROPERTIES *, int, int); // idb
int __cdecl sub_770700(int a1, int a2, signed int a3, int a4, int a5);
int __cdecl OTHER_to_OTHER_1111_Full_MCU(int a1, int a2, int a3, int a4, int a5, int a6);
void __cdecl OTHER_to_OTHER_1111_MCU(struct _JPEG_PROPERTIES *, int, int); // idb
signed int __cdecl sub_770B70(int a1, int a2, signed int a3, signed int a4, int a5);
int __cdecl OTHER_to_OTHER_111_Full_MCU(int a1, int a2, int a3, int a4, int a5);
void __cdecl OTHER_to_OTHER_111_MCU(struct _JPEG_PROPERTIES *, int, int); // idb
int __cdecl sub_771160(int a1, int a2, signed int a3, signed int a4, int a5);
int __cdecl sub_771650(int a1, int a2, int a3, int a4, int a5);
int __cdecl OTHER_to_OTHER_411_Full_MCU(int a1, int a2, int a3, int a4, int a5);
void __cdecl OTHER_to_OTHER_411_MCU(struct _JPEG_PROPERTIES *, int, int); // idb
unsigned int __cdecl sub_771CE0(int a1, int a2, signed int a3, signed int a4, int a5);
signed int __cdecl OTHER_to_OTHER_422_Full_MCU(int a1, int a2, int a3, int a4, int a5);
void __cdecl OTHER_to_OTHER_422_MCU(struct _JPEG_PROPERTIES *, int, int); // idb
// int __usercall sub_7724E0@<eax>(int a1@<ebp>, int a2, int a3, signed int a4, int a5, int a6);
signed int __cdecl YCbYCr_to_YCbCr_422_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5);
int __cdecl YCbYCr_to_YCbCr_422_Full_MCU_M5(__m64 *a1, int a2, int a3, int a4, int a5);
int __cdecl YCbYCr_to_YCbCr_422_Full_MCU_A6(__m64 *a1, int a2, int a3, int a4, int a5);
void __cdecl YCbYCr_to_YCbCr_422_MCU(struct _JPEG_PROPERTIES *, int, int); // idb
unsigned int __cdecl sub_772DD0(int a1, int a2, int a3, int a4, int a5);
signed int __cdecl Y_to_Y_111_Full_MCU_PX(int a1, int a2, int a3);
void __cdecl Y_to_Y_111_Full_MCU_M5(__m64 *a1, int a2, int a3);
void __cdecl Y_to_Y_111_MCU(struct _JPEG_PROPERTIES *, int, int); // idb
void __cdecl CC_SS_RGB_to_YCbCr_General_MCU(struct _JPEG_PROPERTIES *, int, int); // idb
void __cdecl CC_RGB_to_YCbCr_General_MCU(struct _JPEG_PROPERTIES *, int, int); // idb
void __cdecl SS_General_MCU(struct _JPEG_PROPERTIES *, int, int); // idb
void __cdecl Input_Interleave_General_MCU(struct _JPEG_PROPERTIES *, int, int); // idb
signed int __cdecl sub_775560(int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9, int a10, _DWORD *a11, int a12);
int __cdecl operator&(int a1, int a2, int a3);
BOOL __cdecl operator==(int a1, int a2);
BOOL __cdecl operator!=(int a1, int a2);
int __cdecl operator-(int a1, int a2, int a3);
signed int __cdecl sub_775960(int a1, signed int a2, int a3, int a4, int a5, signed int a6, char a7);
signed int __cdecl sub_775A10(int a1, signed int a2, int a3, int a4, int a5, signed int a6, int a7, char a8);
signed int __cdecl sub_7774F0(int a1, signed int a2, int a3, int a4, int a5, signed int a6, char a7);
signed int __cdecl sub_778330(int a1, int a2, int a3, int a4, int a5);
signed int __cdecl sub_7786A0(int a1, int a2, int a3, int a4, signed int a5);
void __cdecl US_And_CC_MCU_Scaled(struct _JPEG_PROPERTIES *, struct _STATE *, struct _SCAN *, int, int, int, bool); // idb
void __cdecl CConvert_Image(struct _JPEG_PROPERTIES *); // idb
int __cdecl sub_779000(int a1, int a2, signed int a3, int a4, int a5);
signed int __cdecl US_General_P_MCU(int a1, int a2, int a3);
signed int __cdecl sub_77A5B0(int a1, int a2, int a3, int a4);
int __cdecl sub_77A970(int a1, int a2, int a3, int a4, int a5, int a6);
int __cdecl sub_77AC50(int a1, int a2, int a3, int a4, int a5);
int __cdecl YCbCr_411_to_RGB_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5);
int __cdecl YCbCr_411_to_RGB_Full_MCU_M5(int a1, int a2, int a3, int a4, int a5);
signed int __cdecl YCbCr_411_to_RGB_MCU(int a1, int a2, int a3);
int __cdecl sub_77BA10(int a1, int a2, int a3, int a4, int a5, int a6);
int __cdecl sub_77BCF0(int a1, int a2, int a3, int a4, int a5);
int __cdecl YCbCr_411_to_BGR_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5);
int __cdecl YCbCr_411_to_BGR_Full_MCU_M5(int a1, int a2, int a3, int a4, int a5);
signed int __cdecl YCbCr_411_to_BGR_MCU(int a1, int a2, int a3);
void __cdecl sub_77CAB0(int a1, int a2, int a3, int a4, int a5, int a6);
int __cdecl YCbCr_111_to_RGB_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5);
void __cdecl YCbCr_111_to_RGB_MCU(int a1, int a2, int a3);
void __cdecl sub_77CED0(int a1, int a2, int a3, int a4, int a5, int a6);
int __cdecl YCbCr_111_to_BGR_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5);
void __cdecl YCbCr_111_to_BGR_MCU(int a1, int a2, int a3);
int __cdecl sub_77D2F0(int a1, int a2, int a3, int a4, int a5, int a6);
int __cdecl sub_77D600(int a1, int a2, int a3, int a4, int a5);
int __cdecl YCbCr_422_to_RGB_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5);
signed int __cdecl YCbCr_422_to_RGB_MCU(int a1, int a2, int a3);
int __cdecl sub_77DE20(int a1, int a2, int a3, int a4, int a5, int a6);
int __cdecl sub_77E140(int a1, int a2, int a3, int a4, int a5);
int __cdecl YCbCr_422_to_BGR_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5);
signed int __cdecl YCbCr_422_to_BGR_MCU(int a1, int a2, int a3);
void __cdecl sub_77E960(int a1, int a2, int a3, int a4, int a5, int a6);
int __cdecl YCbCr_111_to_RGBA_FPX_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5);
void __cdecl YCbCr_111_to_RGBA_FPX_MCU(int a1, int a2, int a3);
int __cdecl sub_77F2F0(int a1, int a2, int a3, int a4, int a5, int a6);
int __cdecl sub_77F5D0(int a1, int a2, int a3, int a4, int a5);
int __cdecl YCbCr_422_to_RGBA_FPX_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5);
signed int __cdecl YCbCr_422_to_RGBA_FPX_MCU(int a1, int a2, int a3);
int __cdecl sub_77FDF0(int a1, int a2, int a3, int a4, int a5, int a6);
int __cdecl sub_7800B0(int a1, int a2, int a3, int a4, int a5);
int __cdecl YCbCr_411_to_RGBA_FPX_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5);
signed int __cdecl YCbCr_411_to_RGBA_FPX_MCU(int a1, int a2, int a3);
void __cdecl sub_780E00(int a1, int a2, int a3, int a4, int a5, int a6, int a7);
int __cdecl YCbCrA_FPX_1111_to_RGBA_FPX_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5, int a6);
void __cdecl YCbCrA_FPX_1111_to_RGBA_FPX_MCU(int a1, int a2, int a3);
int __cdecl sub_781980(int a1, int a2, int a3, int a4, int a5, int a6, int a7);
int __cdecl sub_781C90(int a1, int a2, int a3, int a4, int a5, int a6);
int __cdecl YCbCrA_FPX_4224_to_RGBA_FPX_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5, int a6);
signed int __cdecl YCbCrA_FPX_4224_to_RGBA_FPX_MCU(int a1, int a2, int a3);
int __cdecl sub_782640(int a1, int a2, int a3, int a4, int a5, int a6, int a7);
char __cdecl sub_782930(int a1, int a2, int a3, int a4, int a5, int a6);
char __cdecl YCbCrA_FPX_4114_to_RGBA_FPX_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5, int a6);
signed int __cdecl YCbCrA_FPX_4114_to_RGBA_FPX_MCU(int a1, int a2, int a3);
void __cdecl sub_783950(int a1, int a2, int a3, int a4, int a5, int a6);
signed int __cdecl OTHER_111_to_OTHER4_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5);
void __cdecl OTHER_111_to_OTHER4_MCU(int a1, int a2, int a3);
void __cdecl sub_783D00(int a1, int a2, int a3, int a4, int a5, int a6, int a7);
signed int __cdecl OTHER_1111_to_OTHER_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5, int a6);
void __cdecl OTHER_1111_to_OTHER_MCU(int a1, int a2, int a3);
int __cdecl sub_7840F0(int a1, int a2, int a3, int a4, int a5, int a6);
int __cdecl OTHER_111_to_OTHER_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5);
signed int __cdecl OTHER_111_to_OTHER_MCU(int a1, int a2, int a3);
int __cdecl sub_784430(int a1, int a2, int a3, int a4, int a5, int a6);
int __cdecl sub_784520(int a1, int a2, int a3, int a4, int a5);
int __cdecl OTHER_411_to_OTHER_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5);
signed int __cdecl OTHER_411_to_OTHER_MCU(int a1, int a2, int a3);
int __cdecl sub_784B50(int a1, int a2, int a3, int a4, int a5, int a6);
int __cdecl sub_784C20(int a1, int a2, int a3, int a4, int a5);
int __cdecl OTHER_422_to_OTHER_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5);
signed int __cdecl OTHER_422_to_OTHER_MCU(int a1, int a2, int a3);
int __cdecl sub_784FE0(int a1, int a2, int a3, int a4, int a5, int a6);
int __cdecl YCbCr_422_to_YCbYCr_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5);
signed int __cdecl YCbCr_422_to_YCbYCr_MCU(int a1, int a2, int a3);
void __cdecl sub_785460(int a1, int a2, int a3, int a4);
signed int __cdecl Y_111_to_Y_Full_MCU_PX(int a1, int a2, int a3);
void __cdecl Y_111_to_Y_MCU(int a1, int a2, int a3);
signed int __cdecl Output_Interleave_General_MCU(int a1, int a2, int a3);
signed int __cdecl US_General_MCU(int a1, int a2, int a3);
signed int __cdecl US_CC_General_YCbCr_MCU(int a1, int a2, int a3);
signed int __cdecl YCbCr_422_to_YCbYCr_NI_MCU(int a1, int a2, int a3);
void __cdecl Y_111_to_Y_Full_MCU_M5(int a1, __m64 *a2, int a3);
int __cdecl YCbCr_422_to_YCbYCr_Full_MCU_M5(int a1, __m64 *a2, __m64 *a3, int a4, int a5);
int __cdecl YCbCrA_FPX_4114_to_RGBA_FPX_Full_MCU_M5(int a1, int a2, int a3, int a4, int a5, int a6);
int __cdecl YCbCrA_FPX_4224_to_RGBA_FPX_Full_MCU_M5(int a1, int a2, int a3, int a4, int a5, int a6);
int __cdecl YCbCrA_FPX_1111_to_RGBA_FPX_Full_MCU_M5(__m64 *a1, int a2, int a3, int a4, int a5, int a6);
int __cdecl YCbCr_411_to_RGBA_FPX_Full_MCU_M5(int a1, int a2, int a3, int a4, int a5);
int __cdecl YCbCr_422_to_RGBA_FPX_Full_MCU_M5(int a1, int a2, int a3, int a4, int a5);
int __cdecl YCbCr_111_to_RGBA_FPX_Full_MCU_M5(__m64 *a1, int a2, int a3, int a4, int a5);
int __cdecl YCbCr_422_to_BGR_Full_MCU_A6(int a1, int a2, int a3, int a4, int a5);
int __cdecl YCbCr_422_to_BGR_Full_MCU_M5(int a1, int a2, int a3, int a4, int a5);
int __cdecl YCbCr_422_to_RGB_Full_MCU_A6(int a1, int a2, int a3, int a4, int a5);
int __cdecl YCbCr_422_to_RGB_Full_MCU_M5(int a1, int a2, int a3, int a4, int a5);
__m64 *__cdecl YCbCr_111_to_BGR_Full_MCU_M5(__m64 *a1, int a2, int a3, int a4, int a5);
__m64 *__cdecl YCbCr_111_to_RGB_Full_MCU_M5(__m64 *a1, int a2, int a3, int a4, int a5);
int __cdecl __spoils<ecx> own_detect_processor_ia32(int a1);
unsigned __int64 ownRDTSCh();
void ownEMMSh();
int __cdecl CONVERT_TO_MARKER(unsigned __int8 a1);
signed int __cdecl Get_Marker_Data_Into_Contiguous_Buffer(struct _STATE *a1, unsigned __int32 size, unsigned __int8 **a3, unsigned __int8 **a4, int *a5);
int __cdecl sub_787720(struct _STATE *, int); // idb
signed int __cdecl DP_Get_Next_Marker(struct _STATE *a1, enum IJL_MARKER *a2);
signed int __cdecl DP_Skip(struct _STATE *a1);
signed int __cdecl DP_Parse_DRI(struct _STATE *a1, int *a2);
signed int __cdecl DP_Parse_SOF(struct _STATE *a1, struct _JPEG_PROPERTIES *a2);
signed int __cdecl DP_Parse_APP14(struct _JPEG_PROPERTIES *a1);
signed int __cdecl DP_Parse_APP0(struct _JPEG_PROPERTIES *a1);
int __cdecl DP_Parse_COM(struct _JPEG_PROPERTIES *a1);
signed int __cdecl DP_Parse_DQT(struct _JPEG_PROPERTIES *a1, struct _STATE *a2, enum _DCTTYPE a3);
signed int __cdecl DP_Parse_DHT(struct _JPEG_PROPERTIES *a1, struct _STATE *a2);
int __cdecl DP_Parse_SOS(struct _JPEG_PROPERTIES *a1, struct _STATE *a2, struct _FRAME *a3, struct _SCAN *a4);
int __cdecl sub_789110(struct _JPEG_PROPERTIES *, struct _STATE *, struct _SCAN *, int, int, int, int, int, int, int, bool); // idb
int __cdecl sub_78A5A0(int, struct _STATE *, int, int); // idb
int __cdecl sub_78A6B0(int a1, int a2, int a3, int a4);
int __cdecl sub_78A770(struct _STATE *, int, int, int, int, int); // idb
int __cdecl sub_78A7F0(struct _STATE *, struct _SCAN *, struct _JPEG_PROPERTIES *, int); // idb
int __cdecl sub_78BBA0(struct _STATE *, struct _SCAN *, struct _JPEG_PROPERTIES *, int); // idb
int __cdecl sub_78CF00(struct _STATE *, struct _SCAN *, struct _JPEG_PROPERTIES *, int); // idb
int __cdecl sub_78DA00(struct _STATE *, struct _SCAN *, struct _JPEG_PROPERTIES *, int); // idb
signed int __cdecl Decode_Scan(enum IJL_MARKER *a1, struct _STATE *a2, struct _SCAN *a3, struct _JPEG_PROPERTIES *a4);
void __cdecl DB_Begin(struct _STATE *); // idb
signed int __cdecl Buffer_Read_Bytes(struct _STATE *a1);
signed int __cdecl DB_Get_Data(struct _STATE *a1, unsigned __int32 a2, unsigned __int8 **a3);
void __cdecl DB_Align_Byte(struct _STATE *); // idb
signed int __cdecl DB_Skip_To_Next_Marker(struct _STATE *a1);
signed int __cdecl Set_Decode_Fast_Path(struct _JPEG_PROPERTIES *a1);
_BYTE *__cdecl sub_790380(char a1, _DWORD *a2);
_DWORD *__cdecl sub_7903A0(__int16 a1, _DWORD *a2);
int __cdecl EP_Write_APP0(struct _JPEG_PROPERTIES *a1);
signed int __cdecl EP_Write_COM(struct _JPEG_PROPERTIES *a1);
int __cdecl EP_Write_SOI(struct _STATE *a1);
int __cdecl EP_Write_EOI(struct _STATE *a1);
int __cdecl EP_Write_SOF(struct _STATE *a1, struct _FRAME *a2);
int __cdecl EP_Write_SOF2(struct _STATE *a1, struct _FRAME *a2);
int __cdecl EP_Write_DQT(struct _STATE *a1, int a2, int a3, __int16 *const a4);
int __cdecl EP_Write_DHT_Ex(struct _STATE *a1, unsigned __int8 *a2, unsigned __int8 *a3, int a4, int a5);
int __cdecl EP_Write_DHTs(struct _STATE *a1, struct _JPEG_PROPERTIES *a2);
int __cdecl EP_Write_SOS(struct _STATE *a1, int a2, char *a3, char *a4);
int __cdecl EP_Write_SOS_Ex(struct _STATE *a1, struct _SCAN *a2, unsigned __int8 *a3, unsigned __int8 *a4);
int __cdecl EP_Write_DRI(int a1, struct _STATE *a2);
int __cdecl EP_Write_RST(int a1, struct _STATE *a2);
int __cdecl EP_Write_APP14(char a1, struct _JPEG_PROPERTIES *a2);
signed int __cdecl Encode_Scan(struct _JPEG_PROPERTIES *a1, struct _STATE *a2, struct _SCAN *a3);
enum _IJLERR __cdecl Fill_coeffs_buffer(struct _JPEG_PROPERTIES *); // idb
enum _IJLERR __cdecl Gather_statistics(struct _JPEG_PROPERTIES *, struct _STATE *, struct _SCAN *, int (*const )[257]); // idb
int __cdecl Encode_Scan_P(struct _JPEG_PROPERTIES *a1, struct _STATE *a2, struct _SCAN *a3);
signed int __cdecl Encode_Scan_WRst(struct _JPEG_PROPERTIES *a1, struct _STATE *a2, struct _SCAN *a3);
int __cdecl own_fqnt8x8_aan_m5(int a1, int a2);
int __cdecl own_fdct8x8_aan_m5(int a1);
int __cdecl own_idct8x8_aan_m5(int a1);
// void __usercall own_fqnt8x8_ipp_m5(__m64 a1@<mm6>, int a2, int a3);
// void __usercall own_fqnt8x8_ipp_a6(__m64 a1@<mm6>, int a2, int a3);
// void __usercall own_fqnt8x8_ipp_w7(__m128i a1@<xmm6>, int a2, int a3);
void __cdecl own_dct_2d_16s_8x8_frv_m5(int a1);
void __cdecl own_dct_2d_16s_8x8_frv_a6(int a1);
void **__cdecl own_dct_2d_16s_8x8_frv_w7(int a1);
signed int __cdecl own_buffer_to_file_p5(int a1);
// signed int __usercall __spoils<ecx> own_write_bits_a6@<eax>(int a1@<esi>, __m64 a2@<mm7>, int a3, int a4);
signed int __cdecl own_encode_block_a6(__m64 *a1, int a2, unsigned int a3, _WORD *a4, _WORD *a5);
void __cdecl own_count_zeros_m5(int a1, int a2, _DWORD *a3, unsigned int *a4);
signed int __cdecl load_from_file(int a1);
// int __usercall own_decode_block_skip_m5@<eax>(int a1@<edx>, int a2, unsigned int a3, unsigned int a4, signed int a5);
// signed int __usercall sub_797755@<eax>(unsigned int a1@<eax>, int a2@<edx>, int a3@<ebp>, signed int a4@<edi>, unsigned int *a5@<esi>, __m64 a6@<mm1>, __m64 a7@<mm4>);
// signed int __usercall sub_7978B3@<eax>(unsigned int a1@<eax>, int a2@<edx>, signed int a3@<ebx>, int a4@<ebp>, signed int a5@<edi>, unsigned int *a6@<esi>, __m64 a7@<mm1>, __m64 a8@<mm4>);
// int __usercall own_decodehuffman8x8_m6@<eax>(int a1@<edx>, int a2, unsigned int a3, unsigned int a4, _WORD *a5, int a6);
// signed int __usercall sub_797E48@<eax>(unsigned int a1@<eax>, int a2@<edx>, int a3@<ebp>, signed int a4@<edi>, _BYTE *a5@<esi>, __m64 a6@<mm1>);
// signed int __usercall sub_797F45@<eax>(unsigned int a1@<eax>, int a2@<edx>, signed int a3@<ebx>, int a4@<ebp>, signed int a5@<edi>, _BYTE *a6@<esi>, __m64 a7@<mm1>, __m64 a8@<mm4>);
// int __usercall own_decodehuffman8x8_m5@<eax>(int a1@<edx>, __m64 *a2, unsigned int a3, unsigned int a4, _WORD *a5, int a6);
// signed int __usercall sub_79840E@<eax>(unsigned int a1@<eax>, int a2@<edx>, int a3@<ebp>, signed int a4@<edi>, _BYTE *a5@<esi>, __m64 a6@<mm1>, __m64 a7@<mm4>);
// signed int __usercall sub_798516@<eax>(unsigned int a1@<eax>, int a2@<edx>, signed int a3@<ebx>, int a4@<ebp>, signed int a5@<edi>, _BYTE *a6@<esi>, __m64 a7@<mm1>, __m64 a8@<mm4>);
void __cdecl own_iqnt8x8_ipp_m5(int a1, int a2);
void __cdecl own_iqnt8x8_ipp_w7(int a1, int a2);
void __cdecl own_dct_2d_16s_8x8_inv_m5(int a1);
void __cdecl own_dct_2d_16s_8x8_inv_a6(int a1);
void **__cdecl own_dct_2d_16s_8x8_inv_w7(int a1);
int __cdecl own_eb_write_bytes_m5(__m64 *a1, int a2, int a3);
// signed int __usercall own_eb_write_bits_m5@<eax>(__m64 a1@<mm1>, unsigned int a2, int a3, __m64 *a4);
// signed int __usercall own_eb_write_bits_file_m5@<eax>(__m64 a1@<mm1>, unsigned int a2, int a3, int a4);
int __cdecl __spoils<ecx> own_rgb_to_ycbcr_111_full_mcu_m5(int a1, int a2, int a3, int a4, int a5);
int __cdecl __spoils<ecx> own_bgr_to_ycbcr_111_full_mcu_m5(int a1, int a2, int a3, int a4, int a5);
void __cdecl __spoils<ecx> own_rgba_fpx_to_ycbcra_fpx_1111_full_mcu_m5(int a1, int a2, int a3, int a4, int a5);
void __cdecl __spoils<ecx> own_rgb_to_ycbcr_422_full_mcu_m5(int a1, int a2, int a3, __m64 *a4, unsigned __int64 *a5);
void __cdecl __spoils<ecx> own_bgr_to_ycbcr_422_full_mcu_m5(int a1, int a2, int a3, __m64 *a4, unsigned __int64 *a5);
int __cdecl __spoils<ecx> own_rgba_fpx_to_ycbcra_fpx_4224_full_mcu_m5(int a1, int a2, int a3, int a4, int a5, int a6);
void __cdecl __spoils<ecx> own_rgb_to_ycbcr_411_one_quarter_mcu_m5(__m64 *a1, int a2, int a3, __m64 *a4);
void __cdecl __spoils<ecx> own_bgr_to_ycbcr_411_one_quarter_mcu_m5(__m64 *a1, int a2, int a3, __m64 *a4);
void __cdecl __spoils<ecx> own_rgba_fpx_to_ycbcra_fpx_4114_one_half_mcu_m5(int a1, int a2, int a3, int a4, int a5, int a6);
int __cdecl own_ycbycr_to_ycbcr_422_full_mcu_m5(__m64 *a1, int a2, int a3, int a4, int a5);
int __cdecl own_ycbycr_to_ycbcr_422_full_mcu_a6(__m64 *a1, int a2, int a3, int a4, int a5);
void __cdecl own_y_to_y_111_full_mcu_m5(__m64 *a1, int a2, int a3);
void __cdecl own_y_111_to_y_full_mcu_m5(int a1, __m64 *a2, int a3);
void __cdecl __spoils<ecx> own_ycbcr_111_to_rgb_full_mcu_m5(__m64 *a1, int a2, int a3, int a4, int a5);
void __cdecl __spoils<ecx> own_ycbcr_111_to_bgr_full_mcu_m5(__m64 *a1, int a2, int a3, int a4, int a5);
int __cdecl __spoils<ecx> own_ycbcr_111_to_rgba_fpx_full_mcu_m5(__m64 *a1, int a2, int a3, int a4, int a5);
int __cdecl __spoils<ecx> own_ycbcra_fpx_1111_to_rgba_fpx_full_mcu_m5(__m64 *a1, int a2, int a3, int a4, int a5, int a6);
void __cdecl __spoils<ecx> own_ycbcr_422_to_rgb_full_mcu_m5(int a1, int a2, int a3, int a4, int a5);
void __cdecl __spoils<ecx> own_ycbcr_422_to_bgr_full_mcu_m5(int a1, int a2, int a3, int a4, int a5);
void __cdecl __spoils<ecx> own_ycbcr_422_to_rgb_full_mcu_a6(int a1, int a2, int a3, int a4, int a5);
void __cdecl __spoils<ecx> own_ycbcr_422_to_bgr_full_mcu_a6(int a1, int a2, int a3, int a4, int a5);
void __cdecl __spoils<ecx> own_ycbcr_422_to_rgba_fpx_full_mcu_m5(int a1, int a2, int a3, int a4, int a5);
void __cdecl __spoils<ecx> own_ycbcra_fpx_4224_to_rgba_fpx_full_mcu_m5(int a1, int a2, int a3, int a4, int a5, int a6);
void __cdecl __spoils<ecx> own_ycbcr_411_to_rgb_one_half_mcu_m5(int a1, int a2, int a3, int a4, int a5);
void __cdecl __spoils<ecx> own_ycbcr_411_to_bgr_one_half_mcu_m5(int a1, int a2, int a3, int a4, int a5);
void __cdecl __spoils<ecx> own_ycbcr_411_to_rgba_fpx_full_mcu_m5(int a1, int a2, int a3, int a4, int a5);
void __cdecl __spoils<ecx> own_ycbcra_fpx_4114_to_rgba_fpx_full_mcu_m5(int a1, int a2, int a3, int a4, int a5, int a6);
int __cdecl __spoils<ecx> own_ycbcr_422_to_ycbycr_full_mcu_m5(int a1, __m64 *a2, __m64 *a3, int a4, int a5);
// void __cdecl std::_Xlength_error(const char *_Message); idb
// void __cdecl std::_Xout_of_range(const char *_Message); idb
void __thiscall std::out_of_range::out_of_range(std::out_of_range *this, std::out_of_range *__that); // idb
// void *__cdecl operator new[](unsigned int count); idb
// int __cdecl _Tolower(int c, _Ctypevec *ploc); idb
// _Ctypevec *_Getctype(_Ctypevec *result, ...); idb
// void __thiscall std::_Init_locks::_Init_locks(std::_Init_locks *this); idb
// void __thiscall std::_Init_locks::~_Init_locks(std::_Init_locks *this); idb
// void __thiscall std::_Lockit::_Lockit(std::_Lockit *this, int kind); idb
// void __thiscall std::_Lockit::~_Lockit(std::_Lockit *this); idb
// void __thiscall std::_Fac_node::~_Fac_node(std::_Fac_node *this); idb
// void __cdecl std::locale::facet::_Facet_Register(std::locale::facet *_This); idb
std::locale::_Locimp *__cdecl std::locale::_Getgloballocale(); // idb
void std::_Fac_tidy_reg_t::~_Fac_tidy_reg_t();
// void __cdecl std::_Locinfo::_Locinfo_dtor(std::_Locinfo *pLocinfo); idb
// void __cdecl std::_Locinfo::_Locinfo_ctor(std::_Locinfo *pLocinfo, const char *locname); idb
// std::locale::_Locimp *__cdecl std::locale::_Init(); idb
const char *__thiscall std::_Generic_error_category::name(std::_Iostream_error_category *this); // idb
std::_Iostream_error_category *__cdecl std::iostream_category();
std::_System_error_category *__thiscall std::_System_error_category::`scalar deleting destructor'(std::_System_error_category *this, unsigned int a2);
// void __cdecl std::ios_base::_Ios_base_dtor(std::ios_base *_This); idb
// int __cdecl _Toupper(int c, _Ctypevec *ploc); idb
// void __thiscall std::_Mutex::_Mutex(std::_Mutex *this); idb
// void __thiscall std::_Mutex::~_Mutex(std::_Mutex *this); idb
// void __thiscall std::_Mutex::_Lock(std::_Mutex *this); idb
// void __thiscall std::_Mutex::_Unlock(std::_Mutex *this); idb
_iobuf *__cdecl std::_Xfsopen(const wchar_t *filename, int mode, int prot); // idb
_iobuf *__cdecl std::_Xfiopen<wchar_t>(const wchar_t *filename, int mode, int prot); // idb
_iobuf *__cdecl std::_Fiopen(const wchar_t *filename, int mode, int prot); // idb
// int __thiscall _Getcvt(_DWORD); weak
bool __cdecl std::uncaught_exception(); // idb
void __cdecl _Mtxinit(_RTL_CRITICAL_SECTION *_Mtx); // idb
void __cdecl _Mtxdst(_RTL_CRITICAL_SECTION *_Mtx); // idb
void __cdecl _Mtxlock(_RTL_CRITICAL_SECTION *_Mtx); // idb
void __cdecl _Mtxunlock(_RTL_CRITICAL_SECTION *_Mtx); // idb
// void __thiscall _Init_atexit::~_Init_atexit(_Init_atexit *this); idb
// void __thiscall std::exception::exception(std::exception *this, const char *const *_What, int __formal); idb
const char *__thiscall std::exception::what(std::exception *this); // idb
// void __thiscall std::exception::_Tidy(std::exception *this); idb
// void __thiscall std::exception::exception(std::exception *this, const char *const *_What); idb
// void __thiscall std::bad_cast::bad_cast(std::bad_cast *this, const char *_Message); idb
void __thiscall std::exception::~exception(std::bad_cast *this); // idb
// void __thiscall std::exception::exception(std::exception *this, std::exception *_That); idb
// const char *__thiscall type_info::name(type_info *this, __type_info_node *__ptype_info_node); idb
// bool __thiscall type_info::operator==(type_info *this, type_info *rhs); idb
// void __cdecl operator delete(void *p); idb
// void __cdecl memcpy(char *dst, char *src, unsigned int count); idb
// void __cdecl memmove(char *dst, char *src, unsigned int count); idb
// void *__cdecl operator new(unsigned int size); idb
// void __stdcall _CxxThrowException(void *pExceptionObject, _s__ThrowInfo *pThrowInfo); idb
// void __cdecl free(void *pBlock); idb
// int __cdecl fclose(_iobuf *stream); idb
// unsigned int __cdecl fread(void *buffer, unsigned int elementSize, unsigned int count, _iobuf *stream); idb
// int __cdecl _filelength(int filedes); idb
// int __cdecl _fileno(_iobuf *stream); idb
// _iobuf *__cdecl fopen(const char *file, const char *mode); idb
// int __cdecl fopen_s(_iobuf **pfile, const char *file, const char *mode); idb
// void __cdecl strrchr(char *string, char chr); idb
// int __cdecl splitpath_helper(const char *_Path, char *_Drive, unsigned int _DriveSize, char *_Dir, unsigned int _DirSize, char *_Filename, unsigned int _FilenameSize, char *_Ext, unsigned int _ExtSize); idb
void __cdecl _splitpath(const char *path, char *drive, char *dir, char *fname, char *ext); // idb
// void __cdecl srand(unsigned int seed); idb
// int __cdecl rand(); idb
// int sprintf(char *string, const char *format, ...); idb
// int sprintf_s(char *string, unsigned int sizeInBytes, const char *format, ...); idb
void __cdecl operator delete[](void *p); // idb
// void __cdecl memset(char *dst, char value, unsigned int count); idb
// int __cdecl atexit(void (__cdecl *func)()); idb
// void __stdcall `eh vector destructor iterator'(void *ptr, unsigned int size, int count, void (__thiscall *pDtor)(void *)); idb
// void *__cdecl bsearch(const void *key, const void *base, unsigned int num, unsigned int width, int (__cdecl *compare)(const void *, const void *)); idb
// void __stdcall `eh vector constructor iterator'(void *ptr, unsigned int size, int count, void (__thiscall *pCtor)(void *), void (__thiscall *pDtor)(void *)); idb
// void __cdecl strncpy(char *dest, char *source, unsigned int count); idb
int __cdecl ldiv(int numer, int denom);
// const char *__cdecl _mbschr(const char *string, unsigned int c); idb
// void __cdecl memchr(char *buf, char chr, unsigned int cnt); idb
// int __cdecl strncmp(const char *first, const char *last, unsigned int count); idb
// int sscanf(const char *string, const char *format, ...); idb
// char *__cdecl fgets(char *string, int count, _iobuf *str); idb
// int __cdecl _strnicmp(const char *dst, const char *src, unsigned int count); idb
// int __cdecl strcpy_s(char *_Dst, unsigned int _SizeInBytes, const char *_Src); idb
// const char *__cdecl _mbsrchr(const char *str, unsigned int c); idb
// void __cdecl strchr(char *string, char chr); idb
// int __cdecl putenv_helper(const char *name, const char *value); idb
int __cdecl _putenv(const char *option); // idb
// char *__cdecl getenv(const char *option); idb
// int fprintf(_iobuf *str, const char *format, ...); idb
// char *__cdecl strncat(char *, const char *, size_t);
// long double __cdecl _difftime32(int b, int a); idb
// int __usercall make__time32_t@<eax>(tm *tb@<ecx>, int ultflag); idb
int __cdecl _mktime32(tm *tb); // idb
// void __cdecl qsort(void *base, unsigned int num, unsigned int width, int (__cdecl *comp)(const void *, const void *)); idb
// const char *__cdecl _mbsstr(const char *str1, const char *str2); idb
// int __cdecl _mbsncmp(const char *s1, const char *s2, unsigned int n); idb
// char *__cdecl _mbsupr(char *string); idb
// int __cdecl _mbsicmp(const char *s1, const char *s2); idb
// unsigned int __cdecl fwrite(const void *buffer, unsigned int size, unsigned int count, _iobuf *stream); idb
// int __cdecl ftell(_iobuf *stream); idb
// int __cdecl fseek(_iobuf *stream, int offset, int whence); idb
// void *__cdecl realloc(void *pBlock, unsigned int newsize); idb
// int __cdecl vsprintf(char *string, const char *format, char *ap); idb
// long double __cdecl atof(const char *nptr); idb
// int _snprintf(char *string, unsigned int count, const char *format, ...); idb
// void *__cdecl malloc(unsigned int size); idb
// unsigned int __cdecl strftime(char *string, unsigned int maxsize, const char *format, tm *timeptr); idb
// int __cdecl _localtime64_s(tm *ptm, const __int64 *ptime); idb
// tm *__cdecl _localtime64(const __int64 *ptime); idb
// __int64 __cdecl _time64(__int64 *timeptr); idb
int __cdecl _mkdir(const char *path); // idb
// char *__cdecl _strupr(char *string); idb
// int __cdecl atoi(const char *nptr); idb
// __int64 __cdecl _atoi64(const char *nptr); idb
// void __cdecl exit(int code); idb
_iobuf *__cdecl __iob_func(); // idb
// void __cdecl _lock_file(_iobuf *pf); idb
// void __cdecl _unlock_file(_iobuf *pf); idb
// int __cdecl getc(_iobuf *stream); idb
// int __cdecl fputc(int ch, _iobuf *str); idb
// int __cdecl ungetc(int ch, _iobuf *stream); idb
// int __cdecl flsall(int flushflag); idb
// int __cdecl fflush(_iobuf *stream); idb
int __cdecl _flushall(); // idb
// int __cdecl setvbuf(_iobuf *str, char *buffer, int type, unsigned int size); idb
// int __cdecl memcpy_s(void *dst, unsigned int sizeInBytes, const void *src, unsigned int count); idb
// int __cdecl fgetpos(_iobuf *stream, __int64 *pos); idb
// int __cdecl _fseeki64(_iobuf *stream, __int64 offset, int whence); idb
// int __cdecl fsetpos(_iobuf *stream, const __int64 *pos); idb
// char *__cdecl strtok(char *string, const char *control); idb
// int __cdecl feof(_iobuf *stream); idb
// int __cdecl ferror(_iobuf *stream); idb
// int __cdecl _strcmpi(const char *dst, const char *src); idb
// void __cdecl terminate(); idb
// int __cdecl _mbscmp(const char *s1, const char *s2); idb
// int __cdecl _mbsnbcmp(const char *s1, const char *s2, unsigned int n); idb
// void __userpurge xtoa(unsigned int val@<eax>, char *buf@<ecx>, unsigned int radix, int is_neg); idb
char *__cdecl _itoa(int val, char *buf, int radix); // idb
// void __cdecl strstr(char *str1, char *str2); idb
// __int64 __usercall make__time64_t@<edx:eax>(tm *tb@<ecx>, int ultflag); idb
__int64 __cdecl _mktime64(tm *tb); // idb
// long double __cdecl _difftime64(__int64 b, __int64 a); idb
// char *__cdecl _strlwr(char *string); idb
// tm *__cdecl _localtime32(const int *ptime); idb
// int __cdecl memmove_s(void *dst, unsigned int sizeInBytes, const void *src, unsigned int count); idb
// int printf(const char *format, ...); idb
// int __cdecl _time32(int *timeptr); idb
// lconv *__cdecl localeconv(); idb
// void __cdecl strcspn(char *string, char *control); idb
// int __cdecl _vsnwprintf(unsigned __int16 *string, unsigned int count, const wchar_t *format, char *ap); idb
// double __cdecl ceil(double);
// double __cdecl floor(double);
// long double __cdecl ldexp(long double x, int exp); idb
// int __cdecl tolower(int c); idb
// int fscanf(_iobuf *stream, const char *format, ...); idb
// int __cdecl isalpha(int c); idb
// int __cdecl isupper(int c); idb
// int __cdecl islower(int c); idb
// int __cdecl isdigit(int c); idb
// int __cdecl isxdigit(int c); idb
// int __cdecl isspace(int c); idb
// int __cdecl ispunct(int c); idb
// int __cdecl isalnum(int c); idb
// int __cdecl isgraph(int c); idb
// int __cdecl iscntrl(int c); idb
int __cdecl _access_s(const char *path, int amode); // idb
// int __cdecl _access(const char *path, int amode); idb
// _DWORD __cdecl _setjmp3(_DWORD, _DWORD);
// char *__cdecl strerror(int errnum); idb
// int *__cdecl _errno(); idb
// unsigned int *__cdecl __doserrno(); idb
// void __cdecl _dosmaperr(unsigned int oserrno); idb
// _iobuf *__cdecl freopen(const char *filename, const char *mode, _iobuf *str); idb
// long double __cdecl strtod(const char *nptr, char **endptr); idb
// void __cdecl strpbrk(char *string, char *control); idb
// void __cdecl __noreturn abort();
// void __cdecl __noreturn longjmp(jmp_buf, int);
// int __cdecl strcoll(const char *_string1, const char *_string2); idb
// long double __cdecl frexp(long double x, int *expptr); idb
// double __cdecl modf(double, double *);
// int __cdecl toupper(int c); idb
// tm *__cdecl _gmtime64(const __int64 *timp); idb
// int __cdecl system(const char *command); idb
int __cdecl remove(const char *path); // idb
int __cdecl rename(const char *oldname, const char *newname); // idb
// char *__cdecl tmpnam(char *s); idb
// _iobuf *__cdecl tmpfile(); idb
// int __cdecl clock(); idb
int __cdecl __init_collate();
// char *__cdecl setlocale(int _category, const char *_locale); idb
// _iobuf *__cdecl _popen(const char *cmdstring, const char *type); idb
// int __cdecl _pclose(_iobuf *pstream); idb
// void __cdecl clearerr(_iobuf *stream); idb
// __int64 __cdecl _ftelli64(_iobuf *stream); idb
// void __cdecl strspn(char *string, char *control); idb
// _iobuf *__cdecl _wfsopen(const wchar_t *file, const wchar_t *mode, int shflag); idb
// int __userpurge xtoa_s@<eax>(unsigned int val@<eax>, char *buf@<ecx>, unsigned int sizeInTChars, unsigned int radix, int is_neg); idb
int __cdecl _itoa_s(int val, char *buf, unsigned int sizeInTChars, int radix); // idb
int __cdecl _ultoa_s(unsigned int val, char *buf, unsigned int sizeInTChars, int radix); // idb
PVOID _encoded_null();
unsigned int __stdcall __crtTlsAlloc(void (__stdcall *lpCallBack)(void *)); // idb
// int _invalid_parameter_noinfo(void); weak
// int __cdecl vsprintf_s(char *string, unsigned int sizeInBytes, const char *format, char *ap); idb
// void __cdecl _unlock(int locknum); idb
// void __cdecl _lock(int locknum); idb
int *__cdecl __daylight(); // idb
__int32 *__cdecl __dstbias();
__int32 *__cdecl __timezone();
char **__cdecl __tzname(); // idb
// unsigned int __cdecl strtoxl(localeinfo_struct *plocinfo, const char *nptr, const char **endptr, int ibase, int flags); idb
unsigned int __cdecl strtol(const char *nptr, char **endptr, int ibase);
unsigned int __cdecl strtoul(const char *nptr, char **endptr, int ibase); // idb
// unsigned __int64 __cdecl strtoxq(localeinfo_struct *plocinfo, const char *nptr, const char **endptr, int ibase, int flags); idb
unsigned __int64 __cdecl _strtoi64(const char *nptr, char **endptr, int ibase);
void (__cdecl *__cdecl __get_sigabrt())(int); // idb
void __cdecl _initp_misc_rand_s(void *enull); // idb
int (*_RTC_Initialize())(void);
void __cdecl _RTC_Terminate(); // idb
int *__cdecl __sys_nerr(); // idb
char **__cdecl __sys_errlist(); // idb
// int __cdecl strncpy_s(char *_Dst, unsigned int _SizeInBytes, const char *_Src, unsigned int _Count); idb
// int __cdecl strcat_s(char *_Dst, unsigned int _SizeInBytes, const char *_Src); idb
int charNode::length();
char __thiscall charNode::getLastChar(charNode *this); // idb
int __thiscall DNameStatusNode::length(pcharNode *this); // idb
// DName *__thiscall DName::operator=(DName *this, char ch); idb
// DName *__thiscall DName::operator+(DName *this, DName *result, DName *rd); idb
DName *__cdecl operator+(DName *result, char c, DName *rd); // idb
signed int __cdecl _ld12tod(_LDBL12 *pld12, _CRT_DOUBLE *d);
signed int __cdecl _ld12tof(_LDBL12 *pld12, _CRT_FLOAT *f);
int __cdecl __crtMessageBoxW(const wchar_t *lpText, const wchar_t *lpCaption, unsigned int uType); // idb
double __cdecl ceilf(float _X);
int NiSprintf(char *pcDest, unsigned int uiDestSize, const char *pcFormat, ...); // idb
double __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,float>::RemoveHead(NiTPointerListBase<NiTPointerAllocator<unsigned int>,float> *this);
unsigned int __thiscall NiTSet<unsigned int>::Find(NiTSet<unsigned int> *this, const unsigned int *element);
void __thiscall NiSequence::SetName(NiSequence *this, const char *pcName); // idb
char __stdcall NiControllerManager::BlendFromSequence(NiControllerSequence *pkSourceSequence, NiControllerSequence *pkDestSequence, float fDuration, const char *pcDestTextKey, int iPriority, float fSourceWeight, float fDestWeight, NiControllerSequence *pkTimeSyncSeq);
void __stdcall NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,bool>::SetValue(NiTMapItem<NiObject *,bool> *pkItem, NiObject *key, bool val);
unsigned int __thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *>::KeyToHashIndex(NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *this, unsigned int key); // idb
void __thiscall NiTObjectList<NiActorManager::TimelineData>::~NiTObjectList<NiActorManager::TimelineData>(NiTObjectList<NiActorManager::TimelineData> *this); // idb
NiTListBase<NiTObjectAllocator<NiActorManager::TimelineData>,NiActorManager::TimelineData> *__thiscall NiTListBase<NiTObjectAllocator<NiActorManager::TimelineData>,NiActorManager::TimelineData>::`scalar deleting destructor'(NiTListBase<NiTObjectAllocator<NiActorManager::TimelineData>,NiActorManager::TimelineData> *this, unsigned int a2);
NiTObjectList<NiActorManager::TimelineData> *__thiscall NiTObjectList<NiActorManager::TimelineData>::`vector deleting destructor'(NiTObjectList<NiActorManager::TimelineData> *this, unsigned int a2);
signed int __thiscall NiActorManager::FindSequenceID(NiActorManager *this, const char *pcName);
void __thiscall NiActorManager::ProcessCallbacks(NiActorManager *this); // idb
void __thiscall NiActorManager::RaiseAnimActivatedEvents(NiActorManager *this); // idb
void __thiscall NiActorManager::RaiseAnimDeactivatedEvents(NiActorManager *this); // idb
void __thiscall NiActorManager::TimelineData::SetValues(NiActorManager::TimelineData *this, float fEventTime, NiActorManager::EventType eEventType, unsigned int eSequenceID, NiTextKeyMatch *pkMatchObject, const char *pcTextKeyMatched); // idb
NiActorManager::ChainCompletionInfo *__thiscall NiActorManager::ChainCompletionInfo::`vector deleting destructor'(NiActorManager::ChainCompletionInfo *this, unsigned int a2);
void __stdcall NiTObjectList<NiActorManager::TimelineData>::DeleteItem(NiTListItem<NiActorManager::TimelineData> *pkItem);
NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,bool> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,bool>::`vector deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,bool> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::SequenceGroup *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::SequenceGroup *>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::SequenceGroup *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *>::`vector deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<unsigned int,NiControllerSequence *>::`vector deleting destructor'(NiTPointerMap<unsigned int,NiControllerSequence *> *this, unsigned int a2);
NiControllerManager *__thiscall NiActorManager::FindControllerManager(NiActorManager *this, NiAVObject *pkObject); // idb
NiBoneLODController *__thiscall NiActorManager::FindBoneLODController(NiActorManager *this, NiAVObject *pkObject); // idb
void __thiscall NiActorManager::UnregisterCallback(NiActorManager *this, NiActorManager::EventType eEventType, unsigned int eSequenceID, NiTextKeyMatch *pkMatchObject); // idb
void __thiscall NiActorManager::AddTimelineDataObjectAtSameTime(NiActorManager *this, NiActorManager::EventType eEventType, unsigned int eSequenceID, NiTextKeyMatch *pkMatchObject, float fEventTime, const char *pcTextKeyMatched); // idb
char __thiscall NiActorManager::ActivateSequence(NiActorManager *this, unsigned int eSequenceID, int iPriority, bool bStartOver, float fWeight, float fEaseInTime, unsigned int eTimeSyncSeqID);
char __thiscall NiActorManager::DeactivateSequence(NiActorManager *this, unsigned int eSequenceID, float fEaseOutTime);
void __thiscall NiActorManager::UnloadSequence(NiActorManager *this, unsigned int eSequenceID); // idb
NiKFMTool::Transition::BlendPair *__thiscall NiActorManager::GetNextBlendPair(NiActorManager *this, unsigned int uiTransSrcID, unsigned int uiTransDesID, NiKFMTool::Transition *pkTransition, float fFrameTime, float *fActualUnboundedFrame); // idb
void __thiscall NiTArray<NiPointer<NiInterpController>>::NiTArray<NiPointer<NiInterpController>>(NiTArray<NiPointer<NiInterpController> > *this, unsigned int uiMaxSize, unsigned int uiGrowBy); // idb
void __thiscall NiTArray<NiPointer<NiInterpController>>::~NiTArray<NiPointer<NiInterpController>>(NiTArray<NiPointer<NiInterpController> > *this); // idb
void __thiscall NiTSet<NiPointer<NiActorManager::ChainCompletionInfo>>::~NiTSet<NiPointer<NiActorManager::ChainCompletionInfo>>(NiTSet<NiPointer<NiControllerSequence> > *this); // idb
void __thiscall NiTSet<NiPointer<NiActorManager::ChainCompletionInfo>>::Add(NiTSet<NiPointer<NiActorManager::ChainCompletionInfo> > *this, NiPointer<NiActorManager::ChainCompletionInfo> *element); // idb
NiTArray<NiPointer<NiInterpController> > *__thiscall NiTArray<NiPointer<NiInterpController>>::`scalar deleting destructor'(NiTArray<NiPointer<NiInterpController> > *this, unsigned int a2);
signed int __thiscall NiKFMTool::IsTransitionAllowed(NiKFMTool *this, unsigned int uiSrcID, unsigned int uiDesID, bool *bAllowed);
void __thiscall NiActorManager::CallbackData::CallbackData(NiActorManager::CallbackData *this, NiActorManager::EventType eEventType, unsigned int eSequenceID, NiTextKeyMatch *pkMatchObject); // idb
void __thiscall NiActorManager::CallbackData::~CallbackData(NiActorManager::CallbackData *this); // idb
NiActorManager::CallbackData *__thiscall NiActorManager::CallbackData::`vector deleting destructor'(NiActorManager::CallbackData *this, unsigned int a2);
void __stdcall NiTPointerMap<NiObject *,bool>::DeleteItem(NiTMapItem<NiObject *,bool> *pkItem);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<NiObject *,NiObject *>::`vector deleting destructor'(NiTPointerMap<NiObject *,NiObject *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<NiObject *,bool>::`vector deleting destructor'(NiTPointerMap<NiObject *,bool> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<unsigned int,NiKFMTool::Sequence *>::`scalar deleting destructor'(NiTPointerMap<unsigned int,NiKFMTool::Sequence *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<unsigned int,NiKFMTool::SequenceGroup *>::`scalar deleting destructor'(NiTPointerMap<unsigned int,NiKFMTool::SequenceGroup *> *this, unsigned int a2);
void __thiscall NiTArray<NiPointer<NiActorManager::CallbackData>>::~NiTArray<NiPointer<NiActorManager::CallbackData>>(NiTArray<NiPointer<NiActorManager::CallbackData> > *this); // idb
NiTArray<NiPointer<NiActorManager::CallbackData> > *__thiscall NiTArray<NiPointer<NiActorManager::CallbackData>>::`scalar deleting destructor'(NiTArray<NiPointer<NiActorManager::CallbackData> > *this, unsigned int a2);
int NiTAbstractPoolAllocator<NiActorManager::TimelineData>::CreateFreeMem();
void __thiscall NiActorManager::NiActorManager(NiActorManager *this, NiKFMTool *pkKFMTool, bool bCumulativeAnimations); // idb
void __thiscall NiActorManager::~NiActorManager(NiActorManager *this); // idb
char __thiscall NiActorManager::ChangeSequence(NiActorManager *this, unsigned int eSequenceID, NiControllerSequence *pkSequence);
NiActorManager::ChainCompletionInfo *__thiscall NiActorManager::FillChainComplete(NiActorManager *this, unsigned int uiSrcID, unsigned int uiDesID, float fFrameDuration, float *fSrcBeginFrame, float *fTotalTime); // idb
void __thiscall NiCloningProcess::NiCloningProcess(NiCloningProcess *this); // idb
void __thiscall NiKFMTool::NiKFMTool(NiKFMTool *this, const char *pcBaseKFMPath); // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Transition *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Transition *>::`vector deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Transition *> *this, unsigned int a2);
void __thiscall NiKFMTool::Transition::ClearBlendPairs(NiKFMTool::Transition *this); // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<unsigned int,NiKFMTool::Transition *>::`scalar deleting destructor'(NiTPointerMap<unsigned int,NiKFMTool::Transition *> *this, unsigned int a2);
NiActorManager *__thiscall NiActorManager::`scalar deleting destructor'(NiActorManager *this, unsigned int a2);
NiActorManager *__thiscall NiActorManager::Clone(NiActorManager *this); // idb
char __thiscall NiActorManager::RegisterCallback(NiActorManager *this, NiActorManager::EventType eEventType, unsigned int eSequenceID, NiTextKeyMatch *pkMatchObject);
// char __userpurge NiActorManager::ChangeNIFRoot@<al>(NiActorManager *this@<ecx>, int a2@<ebx>, NiAVObject *pkNIFRoot);
NiPointer<NiActorManager::CompletionInfo> *__thiscall NiActorManager::FindTimeForAnimationToCompleteTransition(NiActorManager *this, NiPointer<NiActorManager::CompletionInfo> *result, unsigned int uiTransSrcID, unsigned int uiTransDesID, NiKFMTool::Transition *pkTransition, float fBeginFrame, float fDesiredTransitionFrame); // idb
NiActorManager::CompletionInfo *__thiscall NiActorManager::CompletionInfo::`vector deleting destructor'(NiActorManager::CompletionInfo *this, unsigned int a2);
double __thiscall NiActorManager::GetNextAnimActivatedTime(NiActorManager *this, unsigned int eSequenceID);
double __thiscall NiActorManager::GetNextAnimDeactivatedTime(NiActorManager *this, unsigned int eSequenceID);
double __thiscall NiActorManager::GetNextTextKeyEventTime(NiActorManager *this, unsigned int eSequenceID, NiTextKeyMatch *pkMatchObject);
void __thiscall NiKFMTool::Sequence::~Sequence(NiKFMTool::Sequence *this); // idb
double __thiscall NiActorManager::GetNextEndOfSequenceTime(NiActorManager *this, unsigned int eSequenceID);
NiTListItem<NiActorManager::TimelineData> *NiTObjectList<NiActorManager::TimelineData>::NewItem();
void __thiscall NiActorManager::LoadSequences(NiActorManager *this, NiStream *kStream); // idb
// char __userpurge NiActorManager::Initialize@<al>(NiActorManager *this@<ecx>, int a2@<ebx>, NiStream *kStream);
void __thiscall NiActorManager::AddTimelineDataObject(NiActorManager *this, NiActorManager::EventType eEventType, unsigned int eSequenceID, NiTextKeyMatch *pkMatchObject); // idb
void __thiscall NiKFMTool::~NiKFMTool(NiKFMTool *this); // idb
NiActorManager *__cdecl NiActorManager::Create(NiKFMTool *pkKFMTool, const char *pcKFMFilePath, bool bCumulativeAnimations, bool bLoadFilesFromDisk, NiStream *pkStream); // idb
void __thiscall NiActorManager::BuildTimeline(NiActorManager *this); // idb
NiKFMTool *__thiscall NiKFMTool::`scalar deleting destructor'(NiKFMTool *this, unsigned int a2);
NiActorManager *__cdecl NiActorManager::Create(const char *pcKFMFilename, bool bCumulativeAnimations, bool bLoadFilesFromDisk, NiStream *pkStream); // idb
void __thiscall NiActorManager::Update(NiActorManager *this, float fTime); // idb
BOOL __cdecl NiFloatKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1);
double __cdecl NiFloatKey::GenInterp(float fTime, NiFloatKey *pkKeys, NiAnimationKey::KeyType eType, unsigned int uiNumKeys, unsigned int *uiLastIdx, char ucSize);
double __cdecl NiFloatKey::GenInterpDefault(float fTime, NiFloatKey *pkKeys, NiAnimationKey::KeyType eType, unsigned int uiNumKeys, char ucSize);
int __cdecl NiFloatKey::RegisterLoader(); // idb
void __thiscall NiFloatKey::LoadBinary(NiFloatKey *this, NiStream *stream); // idb
void __cdecl NiFloatKey::SaveBinary(NiStream *stream, NiAnimationKey *pkKey); // idb
BOOL __cdecl NiBezFloatKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1);
void __cdecl NiBezFloatKey::Copy(NiAnimationKey *pkNewKey, NiAnimationKey *pkOrigKey); // idb
int __cdecl NiMemcpy(void *pvDest, const void *pvSrc, unsigned int uiCount); // idb
void __cdecl NiBezFloatKey::Interpolate(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult); // idb
NiAnimationKey *__cdecl NiStepPosKey::CreateArray(unsigned int uiNumKeys); // idb
char __cdecl NiBezFloatKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys);
NiBezFloatKey *__cdecl NiBezFloatKey::CreateFromStream(NiStream *stream, unsigned int uiNumKeys);
void __cdecl NiBezFloatKey::SaveToStream(NiStream *stream, NiAnimationKey *pkKeys, unsigned int uiNumKeys); // idb
int __cdecl NiBezFloatKey::RegisterLoader(); // idb
void __thiscall NiPosKey::LoadBinary(NiPosKey *this, NiStream *stream); // idb
void __cdecl NiPosKey::SaveBinary(NiStream *stream, NiAnimationKey *pkKey); // idb
void __cdecl NiPosKey::Interpolate(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult); // idb
NiPoint3 *__cdecl NiPosKey::GenInterp(NiPoint3 *result, float fTime, NiPosKey *pkKeys, NiAnimationKey::KeyType eType, unsigned int uiNumKeys, unsigned int *uiLastIdx, char ucSize); // idb
NiPoint3 *__cdecl NiPosKey::GenInterpDefault(NiPoint3 *result, float fTime, NiPosKey *pkKeys, NiAnimationKey::KeyType eType, unsigned int uiNumKeys, char ucSize); // idb
BOOL __cdecl NiPosKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1);
void __cdecl NiPosKey::CoordinateFrame(float fTime, NiPosKey *pKey0, NiPosKey *pKey1, NiAnimationKey::KeyType eType, NiPoint3 *tangent, NiPoint3 *normal, NiPoint3 *binormal, float *curvature); // idb
int __cdecl NiPosKey::RegisterLoader(); // idb
void __cdecl NiBezPosKey::Copy(NiAnimationKey *pkNewKey, NiAnimationKey *pkOrigKey); // idb
BOOL __cdecl NiBezPosKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1);
NiAnimationKey *__cdecl NiBezPosKey::CreateArray(unsigned int uiNumKeys); // idb
void __cdecl NiBezPosKey::Interpolate(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult); // idb
void __cdecl NiBezPosKey::InterpolateD1(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult); // idb
void __cdecl NiBezPosKey::InterpolateD2(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult); // idb
void __cdecl NiBezPosKey::FillDerivedVals(NiAnimationKey *pkKeys, unsigned int uiNumKeys);
double __cdecl NiBezPosKey::ComputeMaxCurvature(NiAnimationKey *pkKeys, unsigned int uiNumKeys);
NiBezPosKey *__cdecl NiBezPosKey::CreateFromStream(NiStream *stream, unsigned int uiNumKeys);
void __cdecl NiBezPosKey::SaveToStream(NiStream *stream, NiAnimationKey *pkKeys, unsigned int uiNumKeys); // idb
void __cdecl NiLinRotKey::DeleteArray(NiAnimationKey *pkKeyArray); // idb
char __cdecl NiBezPosKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys);
int __cdecl NiBezPosKey::RegisterLoader(); // idb
void __cdecl NiRotKey::Interpolate(float __formal, NiAnimationKey *__formal, NiAnimationKey *__formal, void *pResult); // idb
void __cdecl NiRotKey::SaveBinary(NiStream *stream, NiAnimationKey *pkKey); // idb
NiQuaternion *__cdecl NiRotKey::GenInterp(NiQuaternion *result, float fTime, NiRotKey *pkKeys, NiAnimationKey::KeyType eType, unsigned int uiNumKeys, unsigned int *uiLastIdx, char ucSize); // idb
NiQuaternion *__cdecl NiRotKey::GenInterpDefault(NiQuaternion *result, float fTime, NiRotKey *pkKeys, NiAnimationKey::KeyType eType, unsigned int uiNumKeys, char ucSize); // idb
void __cdecl NiRotKey::FillDerivedVals(NiAnimationKey *pkKeys, unsigned int uiNumKeys, char ucSize); // idb
int __cdecl NiRotKey::RegisterLoader(); // idb
void __cdecl NiBezRotKey::Copy(NiAnimationKey *pkNewKey, NiAnimationKey *pkOrigKey); // idb
void __cdecl NiBezRotKey::Interpolate(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult); // idb
void __cdecl NiBezRotKey::FillDerivedVals(NiAnimationKey *pkKeys, unsigned int uiNumKeys, char ucSize); // idb
BOOL __cdecl NiBezRotKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1);
void __cdecl NiBezRotKey::SaveToStream(NiStream *stream, NiAnimationKey *pkKeys, unsigned int uiNumKeys); // idb
NiAnimationKey *__cdecl NiBezRotKey::CreateArray(unsigned int uiNumKeys); // idb
char __cdecl NiBezRotKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys);
NiBezRotKey *__cdecl NiBezRotKey::CreateFromStream(NiStream *stream, unsigned int uiNumKeys);
int __cdecl NiBezRotKey::RegisterLoader(); // idb
bool __cdecl NiBoolKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1); // idb
void __cdecl NiBoolKey::InterpolateD2(float __formal, NiAnimationKey *__formal, NiAnimationKey *__formal, void *pResult); // idb
bool __cdecl NiBoolKey::GenInterp(float fTime, NiBoolKey *pkKeys, NiAnimationKey::KeyType eType, unsigned int uiNumKeys, unsigned int *uiLastIdx, char ucSize); // idb
bool __cdecl NiBoolKey::GenInterpDefault(float fTime, NiBoolKey *pkKeys, NiAnimationKey::KeyType eType, unsigned int uiNumKeys, char ucSize); // idb
int __cdecl NiBoolKey::RegisterLoader(); // idb
void __cdecl NiStreamLoadBinary<bool>(NiStream *kStream, bool *value); // idb
void __cdecl NiStreamSaveBinary<bool>(NiStream *kStream, const bool *value); // idb
void __thiscall NiBoolKey::LoadBinary(NiBoolKey *this, NiStream *stream); // idb
void __cdecl NiBoolKey::SaveBinary(NiStream *stream, NiAnimationKey *pkKey); // idb
void __thiscall NiColorKey::LoadBinary(NiRotKey *this, NiStream *stream); // idb
void __cdecl NiColorKey::SaveBinary(NiStream *stream, NiAnimationKey *pkKey); // idb
void __cdecl NiColorKey::Interpolate(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult); // idb
NiColorA *__cdecl NiColorKey::GenInterp(NiColorA *result, float fTime, NiColorKey *pkKeys, NiAnimationKey::KeyType eType, unsigned int uiNumKeys, unsigned int *uiLastIdx, char ucSize); // idb
NiColorA *__cdecl NiColorKey::GenInterpDefault(NiColorA *result, float fTime, NiColorKey *pkKeys, NiAnimationKey::KeyType eType, unsigned int uiNumKeys, char ucSize); // idb
BOOL __cdecl NiColorKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1);
int __cdecl NiColorKey::RegisterLoader(); // idb
void __thiscall NiEulerRotKey::CleanUp(NiEulerRotKey *this); // idb
void __cdecl NiEulerRotKey::Interpolate(float fTime, NiAnimationKey *pkKey0, NiAnimationKey *pkKey1, void *pkResult); // idb
char __cdecl NiEulerRotKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1);
void __cdecl NiEulerRotKey::Copy(NiAnimationKey *pkNewKey, NiAnimationKey *pkOrigKey); // idb
NiAnimationKey *__cdecl NiEulerRotKey::CreateArray(unsigned int uiNumKeys); // idb
void __cdecl NiEulerRotKey::FillDerivedVals(NiAnimationKey *pkKeys);
bool __cdecl NiEulerRotKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys); // idb
void __thiscall NiEulerRotKey::LoadBinary(NiEulerRotKey *this, NiStream *stream); // idb
NiEulerRotKey *__cdecl NiEulerRotKey::CreateFromStream(NiStream *stream, unsigned int uiNumKeys);
void __cdecl NiEulerRotKey::SaveToStream(NiStream *stream, NiAnimationKey *pkKeys, unsigned int uiNumKeys); // idb
int __cdecl NiEulerRotKey::RegisterLoader(); // idb
NiColorA *__cdecl operator*(NiColorA *result, float fScalar, NiColorA *c); // idb
NiAnimationKey *__cdecl NiLinColorKey::CreateArray(unsigned int uiNumKeys); // idb
void __cdecl NiLinColorKey::Interpolate(float fTime, NiAnimationKey *pkKey0, NiAnimationKey *pkKey1, void *pvResult); // idb
NiRotKey *__cdecl NiStepColorKey::CreateFromStream(NiStream *kStream, unsigned int uiNumKeys);
void __cdecl NiLinColorKey::SaveToStream(NiStream *stream, NiAnimationKey *pkKeys, unsigned int uiNumKeys); // idb
char __cdecl NiLinColorKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys);
int __cdecl NiLinColorKey::RegisterLoader(); // idb
void __cdecl NiLinFloatKey::Interpolate(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult); // idb
NiStepFloatKey *__cdecl NiLinFloatKey::CreateFromStream(NiStream *stream, unsigned int uiNumKeys);
void __cdecl NiStepFloatKey::SaveToStream(NiStream *stream, NiAnimationKey *pkKeys, unsigned int uiNumKeys); // idb
char __cdecl NiLinFloatKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys);
int __cdecl NiLinFloatKey::RegisterLoader(); // idb
void __cdecl NiLinPosKey::Copy(NiAnimationKey *pkNewKey, NiAnimationKey *pkOrigKey); // idb
void __cdecl NiLinPosKey::Interpolate(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult); // idb
void __cdecl NiLinPosKey::InterpolateD1(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult); // idb
char __cdecl NiLinPosKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys);
int __cdecl NiLinPosKey::RegisterLoader(); // idb
void __cdecl NiLinRotKey::Interpolate(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult); // idb
char __cdecl NiLinRotKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys);
int __cdecl NiLinRotKey::RegisterLoader(); // idb
void __cdecl NiTCBPosKey::Copy(NiAnimationKey *pkNewKey, NiAnimationKey *pkOrigKey); // idb
BOOL __cdecl NiTCBPosKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1);
NiAnimationKey *__cdecl NiTCBPosKey::CreateArray(unsigned int uiNumKeys); // idb
void __cdecl NiTCBPosKey::Interpolate(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult); // idb
void __cdecl NiTCBPosKey::InterpolateD1(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult); // idb
void __cdecl NiTCBPosKey::InterpolateD2(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult); // idb
void __thiscall NiTCBPosKey::CalculateDVals(NiTCBPosKey *this, NiPoint3 *ptSub1, NiPoint3 *ptPlus1, float fPreLen, float fNextLen); // idb
void __cdecl NiTCBPosKey::FillDerivedVals(NiAnimationKey *pkKeys, unsigned int uiNumKeys);
double __cdecl NiTCBPosKey::ComputeMaxCurvature(NiAnimationKey *pkKeys, unsigned int uiNumKeys);
char __cdecl NiTCBPosKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys);
NiTCBPosKey *__cdecl NiTCBPosKey::CreateFromStream(NiStream *stream, unsigned int uiNumKeys);
void __cdecl NiTCBPosKey::SaveToStream(NiStream *stream, NiAnimationKey *pkKeys, unsigned int uiNumKeys); // idb
int __cdecl NiTCBPosKey::RegisterLoader(); // idb
void __cdecl NiTCBRotKey::Copy(NiAnimationKey *pkNewKey, NiAnimationKey *pkOrigKey); // idb
void __cdecl NiTCBRotKey::Interpolate(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult); // idb
void __thiscall NiTCBRotKey::CalculateDVals(NiTCBRotKey *this, NiTCBRotKey *pPrev, NiTCBRotKey *pNext); // idb
void __cdecl NiTCBRotKey::FillDerivedVals(NiAnimationKey *pkKeys, unsigned int uiNumKeys, char ucSize); // idb
BOOL __cdecl NiTCBRotKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1);
NiAnimationKey *__cdecl NiTCBRotKey::CreateArray(unsigned int uiNumKeys); // idb
char __cdecl NiTCBRotKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys);
NiTCBRotKey *__cdecl NiTCBRotKey::CreateFromStream(NiStream *stream, unsigned int uiNumKeys);
void __cdecl NiTCBRotKey::SaveToStream(NiStream *stream, NiAnimationKey *pkKeys, unsigned int uiNumKeys); // idb
int __cdecl NiTCBRotKey::RegisterLoader(); // idb
BOOL __cdecl NiTCBFloatKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1);
void __cdecl NiTCBFloatKey::Copy(NiAnimationKey *pkNewKey, NiAnimationKey *pkOrigKey); // idb
void __cdecl NiTCBFloatKey::Interpolate(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult); // idb
NiAnimationKey *__cdecl NiTCBFloatKey::CreateArray(unsigned int uiNumKeys); // idb
void __cdecl NiTCBFloatKey::CalculateDVals(NiTCBFloatKey *result, float fValSub1, float fValPlus1, float fPreLen, float fNextLen); // idb
void __cdecl NiTCBFloatKey::FillDerivedVals(NiAnimationKey *pkKeys, unsigned int uiNumKeys);
char __cdecl NiTCBFloatKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys);
NiTCBFloatKey *__cdecl NiTCBFloatKey::CreateFromStream(NiStream *stream, unsigned int uiNumKeys);
void __cdecl NiTCBFloatKey::SaveToStream(NiStream *stream, NiAnimationKey *pkKeys, unsigned int uiNumKeys); // idb
int __cdecl NiTCBFloatKey::RegisterLoader(); // idb
void __cdecl NiStepBoolKey::Copy(NiAnimationKey *pkNewKey, NiAnimationKey *pkOrigKey); // idb
bool __cdecl NiStepBoolKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1); // idb
void __cdecl NiStepBoolKey::Interpolate(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult); // idb
void __cdecl NiStepBoolKey::SaveToStream(NiStream *stream, NiAnimationKey *pkKeys, unsigned int uiNumKeys); // idb
char __cdecl NiStepBoolKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys);
NiStepBoolKey *__cdecl NiStepBoolKey::CreateFromStream(NiStream *stream, unsigned int uiNumKeys);
int __cdecl NiStepBoolKey::RegisterLoader(); // idb
void __cdecl NiStepColorKey::Copy(NiAnimationKey *pkNewKey, NiAnimationKey *pkOrigKey); // idb
BOOL __cdecl NiStepRotKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1);
void __cdecl NiStepRotKey::Interpolate(float fTime, NiAnimationKey *pkKey0, NiAnimationKey *pkKey1, void *pvResult); // idb
char __cdecl NiStepColorKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys);
int __cdecl NiStepColorKey::RegisterLoader(); // idb
BOOL __cdecl NiLinFloatKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1);
void __cdecl NiLinFloatKey::Copy(NiAnimationKey *pkNewKey, NiAnimationKey *pkOrigKey); // idb
void __cdecl NiStepFloatKey::Interpolate(float fTime, NiAnimationKey *pkKey0, NiAnimationKey *pkKey1, void *pvResult); // idb
NiAnimationKey *__cdecl NiStepFloatKey::CreateArray(unsigned int uiNumKeys); // idb
char __cdecl NiStepFloatKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys);
int __cdecl NiStepFloatKey::RegisterLoader(); // idb
double __cdecl NiBoolKey::ComputeMaxCurvature();
BOOL __cdecl NiStepPosKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1);
void __cdecl NiStepPosKey::Interpolate(float fTime, NiAnimationKey *pkKey0, NiAnimationKey *pkKey1, void *pvResult); // idb
void __cdecl NiStepPosKey::InterpolateD1(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult); // idb
NiStepPosKey *__cdecl NiStepPosKey::CreateFromStream(NiStream *stream, unsigned int uiNumKeys);
void __cdecl NiLinPosKey::SaveToStream(NiStream *stream, NiAnimationKey *pkKeys, unsigned int uiNumKeys); // idb
char __cdecl NiStepPosKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys);
int __cdecl NiStepPosKey::RegisterLoader(); // idb
void __cdecl NiStepRotKey::FillDerivedVals(NiAnimationKey *pkKeys, unsigned int uiNumKeys, char ucSize); // idb
NiAnimationKey *__cdecl NiLinRotKey::CreateArray(unsigned int uiNumKeys); // idb
NiStepRotKey *__cdecl NiLinRotKey::CreateFromStream(NiStream *stream, unsigned int uiNumKeys);
void __cdecl NiLinRotKey::SaveToStream(NiStream *stream, NiAnimationKey *pkKeys, unsigned int uiNumKeys); // idb
char __cdecl NiStepRotKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys);
int __cdecl NiStepRotKey::RegisterLoader(); // idb
void __cdecl NiAnimationSDM::Init(); // idb
NiTAbstractPoolAllocator<NiActorManager::TimelineData>::AllocNode **NiTAbstractPoolAllocator<NiActorManager::TimelineData>::_SDMShutdown();
void __cdecl NiAnimationSDM::Shutdown(); // idb
void NiAnimationSDM::NiAnimationSDM();
int __thiscall NiTextKey::operator!=(NiTextKey *this, NiTextKey *key);
NiRTTI *NiTextKeyExtraData::GetRTTI();
NiObject *__cdecl NiTextKeyExtraData::CreateObject(); // idb
char __thiscall NiTextKeyExtraData::IsEqual(NiTextKeyExtraData *this, NiObject *pObject);
void __thiscall NiTextKeyExtraData::CopyMembers(NiTextKeyExtraData *this, NiTextKeyExtraData *pDest, NiCloningProcess *kCloning); // idb
void __thiscall NiTextKeyExtraData::SaveBinary(NiTextKeyExtraData *this, NiStream *stream); // idb
NiTextKeyExtraData *__thiscall NiTextKeyExtraData::CreateClone(NiTextKeyExtraData *this, NiCloningProcess *kCloning);
void __thiscall NiTextKeyExtraData::LoadBinary(NiTextKeyExtraData *this, NiStream *stream); // idb
void __thiscall NiTextKeyExtraData::GetViewerStrings(NiTextKeyExtraData *this, NiTArray<char *> *pStrings); // idb
NiTextKeyExtraData *__thiscall NiTextKeyExtraData::`scalar deleting destructor'(NiTextKeyExtraData *this, unsigned int a2);
char __thiscall NiControllerSequence::VerifyDependencies(NiControllerSequence *this, NiControllerSequence *pkSequence);
void __thiscall NiStringPalette::NiStringPalette(NiStringPalette *this, unsigned int uiAllocatedSize); // idb
NiRTTI *NiStringPalette::GetRTTI();
char __thiscall NiStringPalette::FindString(NiStringPalette *this, const char *pcString, unsigned int *uiOffset);
void __thiscall NiControllerSequence::SetName(NiControllerSequence *this, const char *pcName); // idb
void __thiscall NiControllerSequence::SetAccumRootName(NiControllerSequence *this, const char *pcAccumRoot); // idb
NiRTTI *NiMultiTargetTransformController::GetRTTI();
NiMultiTargetTransformController *__thiscall NiMultiTargetTransformController::`vector deleting destructor'(NiMultiTargetTransformController *this, unsigned int a2);
NiTArray<char *> *__thiscall NiTArray<char *>::`scalar deleting destructor'(NiTArray<char *> *this, unsigned int a2);
void __thiscall NiControllerSequence::NiControllerSequence(NiControllerSequence *this); // idb
NiRTTI *NiControllerSequence::GetRTTI();
double __thiscall NiControllerSequence::GetKeyTimeAt(NiControllerSequence *this, NiTextKeyMatch *pkMatchObject);
NiControllerSequence::IDTag *__thiscall NiControllerSequence::IDTag::operator=(NiControllerSequence::IDTag *this, NiControllerSequence::IDTag *__that); // idb
NiControllerSequence::InterpArrayItem *__thiscall NiControllerSequence::InterpArrayItem::operator=(NiControllerSequence::InterpArrayItem *this, NiControllerSequence::InterpArrayItem *__that); // idb
void __thiscall NiControllerSequence::ClearTargets(NiControllerSequence *this); // idb
void __thiscall NiControllerSequence::AttachInterpolators(NiControllerSequence *this, int cPriority);
void __thiscall NiControllerSequence::DetachInterpolators(NiControllerSequence *this); // idb
double __thiscall NiControllerSequence::ComputeScaledTime(NiControllerSequence *this, float fTime, bool bStoreLastTime);
char __thiscall NiControllerSequence::VerifyMatchingMorphKeys(NiControllerSequence *this, NiControllerSequence *pkTimeSyncSeq);
void __thiscall NiControllerSequence::ProcessClone(NiControllerSequence *this, NiCloningProcess *kCloning); // idb
char __thiscall NiControllerSequence::InterpArrayItem::IsEqual(NiControllerSequence::InterpArrayItem *this, NiControllerSequence::InterpArrayItem *kDest);
bool __thiscall NiControllerSequence::IDTag::IsEqual(NiControllerSequence::IDTag *this, NiControllerSequence::IDTag *kDest); // idb
char __thiscall NiControllerSequence::RegisterStreamables(NiControllerSequence *this, NiStream *kStream);
void __cdecl NiControllerSequence::CreateObject();
void __thiscall NiControllerSequence::LinkObject(NiControllerSequence *this, NiStream *kStream); // idb
bool __thiscall NiControllerSequence::IsEqual(NiControllerSequence *this, NiObject *pkObject); // idb
void __cdecl NiStreamLoadBinary<unsigned short>(NiStream *kStream, unsigned __int16 *value); // idb
void __thiscall NiTimeController::SetNext(NiTimeController *this, NiTimeController *pkNext); // idb
NiStringPalette *__thiscall NiStringPalette::`scalar deleting destructor'(NiStringPalette *this, unsigned int a2);
unsigned int __thiscall NiStringPalette::AddString(NiStringPalette *this, const char *pcString); // idb
char *__thiscall NiControllerSequence::IDTag::GetPropertyType(NiControllerSequence::IDTag *this);
char *__thiscall NiControllerSequence::IDTag::GetCtlrType(NiControllerSequence::IDTag *this);
char *__thiscall NiControllerSequence::IDTag::GetCtlrID(NiControllerSequence::IDTag *this);
void __thiscall NiControllerSequence::NiControllerSequence(NiControllerSequence *this, const char *pcName, unsigned int uiArraySize, unsigned int uiArrayGrowBy, NiStringPalette *pkStringPalette); // idb
void *__thiscall NiControllerSequence::InterpArrayItem::`vector deleting destructor'(NiControllerSequence::InterpArrayItem *this, unsigned int); // idb
void __thiscall NiControllerSequence::~NiControllerSequence(NiControllerSequence *this); // idb
double __thiscall NiControllerSequence::GetTimeAt(NiControllerSequence *this, NiTextKeyMatch *pkMatchObject, float fCurrentTime);
double __thiscall NiControllerSequence::GetKeyTimeAt(NiControllerSequence *this, const char *pcTextKey);
void __thiscall NiControllerSequence::SortByBlendInterpolator(NiControllerSequence *this); // idb
bool __thiscall NiControllerSequence::ResolveTransformInterpolators(NiControllerSequence *this, NiAVObject *pkRoot, NiAVObjectPalette *pkObjectPalette); // idb
char __thiscall NiControllerSequence::Activate(NiControllerSequence *this, int cPriority, bool bStartOver, float fWeight, float fEaseInTime, NiControllerSequence *pkTimeSyncSeq, bool bTransition);
char __thiscall NiControllerSequence::Deactivate(NiControllerSequence *this, float fEaseOutTime, bool bTransition);
char __thiscall NiControllerSequence::StartBlend(NiControllerSequence *this, NiControllerSequence *pkDestSequence, float fDuration, float fDestFrame, int iPriority, float fSourceWeight, float fDestWeight, NiControllerSequence *pkTimeSyncSeq);
char __thiscall NiControllerSequence::StartMorph(NiControllerSequence *this, NiControllerSequence *pkDestSequence, float fDuration, int iPriority, float fSourceWeight, float fDestWeight);
double __thiscall NiControllerSequence::FindCorrespondingMorphFrame(NiControllerSequence *this, NiControllerSequence *pkSourceSequence, float fSourceSequenceTime);
void __thiscall NiControllerSequence::SetInterpsWeightAndTime(NiControllerSequence *this, float fWeight, float fEaseSpinner, float fTime); // idb
char __thiscall NiControllerSequence::ReallocateArrays(NiControllerSequence *this);
void __thiscall NiControllerSequence::CopyMembers(NiControllerSequence *this, NiControllerSequence *pkDest, NiCloningProcess *kCloning); // idb
void __thiscall NiControllerSequence::InterpArrayItem::LoadBinary(NiControllerSequence::InterpArrayItem *this, NiStream *kStream); // idb
void __thiscall NiControllerSequence::IDTag::SaveBinary(NiControllerSequence::IDTag *this, NiStream *kStream); // idb
void __thiscall NiControllerSequence::IDTag::LoadBinary(NiControllerSequence::IDTag *this, NiStream *kStream); // idb
void __thiscall NiControllerSequence::SaveBinary(NiControllerSequence *this, NiStream *kStream); // idb
void __thiscall NiControllerSequence::LoadBinary(NiControllerSequence *this, NiStream *kStream); // idb
NiControllerSequence *__thiscall NiControllerSequence::`vector deleting destructor'(NiControllerSequence *this, unsigned int a2);
double __thiscall NiControllerSequence::GetTimeAt(NiControllerSequence *this, const char *pcTextKey, float fCurrentTime);
signed int __thiscall NiControllerSequence::AddInterpolator(NiControllerSequence *this, NiInterpolator *pkInterpolator, NiControllerSequence::IDTag *kIDTag);
void __thiscall NiControllerSequence::Update(NiControllerSequence *this, float fTime, bool bUpdateInterpolators); // idb
char __thiscall NiControllerSequence::StoreTargets(NiControllerSequence *this, NiAVObject *pkRoot);
char __thiscall NiControllerSequence::StartBlend(NiControllerSequence *this, NiControllerSequence *pkDestSequence, float fDuration, const char *pcDestTextKey, int iPriority, float fSourceWeight, float fDestWeight, NiControllerSequence *pkTimeSyncSeq);
char __thiscall NiControllerSequence::ConvertOldNameControllerPair(NiControllerSequence *this, const char *pcObjectName, NiInterpController *pkController);
NiObject *__thiscall NiControllerSequence::CreateClone(NiControllerSequence *this, NiCloningProcess *kCloning); // idb
char __thiscall NiControllerSequence::AddNameControllerPair(NiControllerSequence *this, const char *pcObjectName, NiTimeController *pkController);
void __thiscall NiControllerSequence::PostLinkObject(NiControllerSequence *this, NiStream *kStream); // idb
NiPointer<NiControllerSequence> *__cdecl NiControllerSequence::ConvertOldSequence(NiPointer<NiControllerSequence> *result, NiSequence *pkOldSequence); // idb
NiPointer<NiControllerSequence> *__cdecl NiControllerSequence::CreateSequenceFromFile(NiPointer<NiControllerSequence> *result, NiStream *kStream, unsigned int uiIndex); // idb
NiPointer<NiControllerSequence> *__cdecl NiControllerSequence::CreateSequenceFromFile(NiPointer<NiControllerSequence> *result, const char *pcFilename, unsigned int uiIndex); // idb
void __thiscall NiFloatInterpController::SaveBinary(NiTransformController *this, NiStream *kStream); // idb
bool __thiscall NiTransformController::IsEqual(NiTransformController *this, NiObject *pkObject); // idb
void __thiscall NiQuatTransform::NiQuatTransform(NiQuatTransform *this); // idb
void __thiscall NiBlendAccumTransformInterpolator::AccumArrayItem::ClearValues(NiBlendAccumTransformInterpolator::AccumArrayItem *this); // idb
void __thiscall NiTransformController::CreatePoseInterpolator(NiTransformController *this, unsigned __int16 usIndex);
void __thiscall NiTransformController::LoadBinary(NiTransformController *this, NiStream *kStream); // idb
void __thiscall NiTransformController::LinkObject(NiTransformController *this, NiStream *kStream); // idb
char __thiscall NiTimeController::DontDoUpdate(NiTimeController *this, float fTime);
void __thiscall NiBlendAccumTransformInterpolator::AccumArrayItem::AccumArrayItem(NiBlendAccumTransformInterpolator::AccumArrayItem *this); // idb
void __thiscall NiBlendAccumTransformInterpolator::NiBlendAccumTransformInterpolator(NiBlendAccumTransformInterpolator *this, bool bManagerControlled, float fWeightThreshold, char ucArraySize); // idb
NiRTTI *NiBlendAccumTransformInterpolator::GetRTTI();
NiBlendAccumTransformInterpolator *__thiscall NiBlendAccumTransformInterpolator::`scalar deleting destructor'(NiBlendAccumTransformInterpolator *this, unsigned int a2);
void __thiscall NiTransformInterpolator::SetPoseValue(NiTransformInterpolator *this, NiQuatTransform kPoseValue); // idb
void __thiscall NiTransformController::NiTransformController(NiTransformController *this); // idb
NiRTTI *NiTransformController::GetRTTI();
void __thiscall NiTransformController::SynchronizePoseInterpolator(NiTransformController *this, NiInterpolator *pkInterp, unsigned __int16 usIndex); // idb
void __stdcall NiTransformController::CreateBlendInterpolator(unsigned __int16 usIndex, bool bManagerControlled, bool bAccumulateAnimations, float fWeightThreshold, char ucArraySize);
void __thiscall NiTransformController::Update(NiTransformController *this, float fTime); // idb
NiSingleInterpController *__thiscall NiTransformController::CreateClone(NiTransformController *this, NiCloningProcess *kCloning);
NiObject *__cdecl NiTransformController::CreateObject(); // idb
void __thiscall NiTransformController::GetViewerStrings(NiTransformController *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiTextKey::~NiTextKey(NiTextKey *this); // idb
void __thiscall NiTextKey::SetText(NiTextKey *this, char *pText); // idb
void __thiscall NiTextKey::LoadBinary(NiTextKey *this, NiStream *stream); // idb
void __thiscall NiTextKey::SaveBinary(NiTextKey *this, NiStream *stream); // idb
void __thiscall NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(NiTArray<NiVBBlock *> *this, unsigned int uiMaxSize); // idb
NiTArray<NiTSet<NiNode *> *> *__thiscall NiTArray<NiTSet<NiNode *> *>::`vector deleting destructor'(NiTArray<NiTSet<NiNode *> *> *this, unsigned int a2);
NiTArray<NiTSet<NiBoneLODController::SkinInfo *> *> *__thiscall NiTArray<NiTSet<NiBoneLODController::SkinInfo *> *>::`vector deleting destructor'(NiTArray<NiTSet<NiBoneLODController::SkinInfo *> *> *this, unsigned int a2);
char __thiscall NiBoneLODController::RegisterStreamables(NiBoneLODController *this, NiStream *kStream);
void __thiscall NiBoneLODController::LinkObject(NiBoneLODController *this, NiStream *kStream); // idb
char __thiscall NiBoneLODController::IsEqual(NiBoneLODController *this, NiObject *pkObject);
void __cdecl NiStreamLoadBinary<float>(NiStream *kStream, int *value); // idb
void __thiscall NiBoneLODController::NiBoneLODController(NiBoneLODController *this); // idb
NiRTTI *NiBoneLODController::GetRTTI();
char __thiscall NiBoneLODController::TargetIsRequiredType(NiBoneLODController *this);
char __thiscall NiBoneLODController::SetBoneLOD(NiBoneLODController *this, int iLOD);
NiTimeController *__thiscall NiBoneLODController::CreateClone(NiBoneLODController *this, NiCloningProcess *kCloning);
void __thiscall NiBoneLODController::ProcessClone(NiBoneLODController *this, NiCloningProcess *kCloning); // idb
void __thiscall NiBoneLODController::SaveBinary(NiBoneLODController *this, NiStream *kStream); // idb
void __cdecl NiBoneLODController::CreateObject();
void __thiscall NiBoneLODController::LoadBinary(NiBoneLODController *this, NiStream *kStream); // idb
void __thiscall NiBoneLODController::PostLinkObject(NiBoneLODController *this, NiStream *kStream); // idb
void __thiscall NiBoneLODController::Update(NiBoneLODController *this, float fTime); // idb
void __thiscall NiBoneLODController::GetViewerStrings(NiBoneLODController *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiBoneLODController::CleanUp(NiBoneLODController *this); // idb
NiBoneLODController *__thiscall NiBoneLODController::`scalar deleting destructor'(NiBoneLODController *this, unsigned int a2);
void __thiscall NiKFMTool::SetModelPath(NiKFMTool *this, const char *pcModelPath); // idb
void __thiscall NiKFMTool::GetSequenceIDs(NiKFMTool *this, unsigned int **puiSequenceIDs, unsigned int *uiNumIDs); // idb
char *__thiscall NiKFMTool::ConstructAbsolutePath(NiKFMTool *this, const char *pcRelativePath, const char *pcBasePath);
void __thiscall NiTSet<NiKFMTool::Transition::BlendPair *>::Add(NiTSet<NiKFMTool::Transition::BlendPair *> *this, NiKFMTool::Transition::BlendPair *const *element); // idb
void __cdecl NiStreamLoadBinary<bool>(NiBinaryStream *binstream, bool *value); // idb
void __cdecl NiStreamSaveBinary<unsigned int>(NiBinaryStream *binstream, unsigned int *value); // idb
void __thiscall NiTSet<NiKFMTool::Transition::ChainInfo>::Realloc(NiTSet<NiKFMTool::Transition::ChainInfo> *this, unsigned int uiNewSize); // idb
void __thiscall NiTSet<NiKFMTool::SequenceGroup::SequenceInfo>::Realloc(NiTSet<NiKFMTool::SequenceGroup::SequenceInfo> *this, unsigned int uiNewSize); // idb
void __thiscall NiKFMTool::Transition::BlendPair::BlendPair(NiKFMTool::Transition::BlendPair *this, const char *pcStartKey, const char *pcTargetKey); // idb
void __thiscall NiKFMTool::SequenceGroup::SequenceGroup(NiKFMTool::SequenceGroup *this, unsigned int uiGroupID, const char *pcName); // idb
signed int __thiscall NiKFMTool::AddBlendPair(NiKFMTool *this, unsigned int uiSrcID, unsigned int uiDesID, const char *pcStartKey, const char *pcTargetKey);
char *__thiscall NiKFMTool::GetFullModelPath(NiKFMTool *this);
char *__thiscall NiKFMTool::GetFullKFFilename(NiKFMTool *this, unsigned int uiSequenceID);
void __stdcall NiKFMTool::LoadCString(NiFile *kFile, char **pcString);
void __thiscall NiTSet<NiKFMTool::Transition::ChainInfo>::Add(NiTSet<NiKFMTool::Transition::ChainInfo> *this, NiKFMTool::Transition::ChainInfo *element); // idb
void __thiscall NiTSet<NiKFMTool::SequenceGroup::SequenceInfo>::Add(NiTSet<NiKFMTool::SequenceGroup::SequenceInfo> *this, NiKFMTool::SequenceGroup::SequenceInfo *element); // idb
NiKFMTool::KFM_RC __thiscall NiKFMTool::AddSequenceGroup(NiKFMTool *this, unsigned int uiGroupID, const char *pcName); // idb
signed int __thiscall NiKFMTool::AddSequenceToGroup(NiKFMTool *this, unsigned int uiGroupID, unsigned int uiSequenceID, int iPriority, float fWeight, float fEaseInTime, float fEaseOutTime, unsigned int uiSynchronizeToSequence);
void __thiscall NiKFMTool::GatherChainIDs(NiKFMTool *this, unsigned int uiSrcID, unsigned int uiDesID, NiKFMTool::Transition *pkTransition, NiTSet<unsigned int> *kChainIDs); // idb
void __thiscall NiKFMTool::HandleDelayedBlendsInChains(NiKFMTool *this); // idb
void __thiscall NiKFMTool::Sequence::Sequence(NiKFMTool::Sequence *this, unsigned int uiSequenceID, const char *pcFilename, int iAnimIndex); // idb
char __thiscall NiKFMTool::IsValidChainTransition(NiKFMTool *this, unsigned int uiSrcID, unsigned int uiDesID, NiKFMTool::Transition *pkTransition);
NiKFMTool::KFM_RC __thiscall NiKFMTool::ReadBinary(NiKFMTool *this, NiFile *kFile, unsigned int uiVersion); // idb
signed int __thiscall NiKFMTool::AddTransition(NiKFMTool *this, unsigned int uiSrcID, unsigned int uiDesID, NiKFMTool::TransitionType eType, float fDuration);
signed int __thiscall NiKFMTool::AddSequenceToChain(NiKFMTool *this, unsigned int uiSrcID, unsigned int uiDesID, unsigned int uiSequenceID, float fDuration);
NiKFMTool::KFM_RC __thiscall NiKFMTool::AddSequence(NiKFMTool *this, unsigned int uiSequenceID, const char *pcFilename, int iAnimIndex); // idb
signed int __thiscall NiKFMTool::ReadOldVersionAscii(NiKFMTool *this, NiFile *kFile, unsigned int uiVersion, bool bOldFile);
// signed int __userpurge NiKFMTool::LoadFile@<eax>(NiKFMTool *this@<ecx>, int a2@<edi>, const char *pcFilename);
void __thiscall NiTextureTransformController::SetTarget(NiTextureTransformController *this, NiObjectNET *pkTarget); // idb
bool __thiscall NiTextureTransformController::IsEqual(NiTextureTransformController *this, NiObject *pkObject); // idb
BOOL __thiscall NiPoint2::operator!=(NiPoint2 *this, NiPoint2 *pt);
void __thiscall NiTextureTransform::SetTranslate(NiTextureTransform *this, NiPoint2 *kTranslate); // idb
void __thiscall NiTextureTransform::SetRotate(NiTextureTransform *this, float fRotate); // idb
void __thiscall NiTextureTransform::SetScale(NiTextureTransform *this, NiPoint2 *kScale); // idb
char *__thiscall NiTextureTransformController::GetCtlrID(NiTextureTransformController *this);
NiTexturingProperty::ShaderMap *__thiscall NiTexturingProperty::GetShaderMap(NiTexturingProperty *this, unsigned int uiIndex); // idb
NiTArray<NiTexturingProperty::ShaderMap *> *__thiscall NiTexturingProperty::GetShaderArrayCount(NiTexturingProperty *this);
bool __thiscall NiTextureTransformController::SetInternalMap(NiTextureTransformController *this); // idb
NiRTTI *NiTextureTransformController::GetRTTI();
char __thiscall NiTextureTransformController::SetMap(NiTextureTransformController *this, NiTexturingProperty::Map *pkMap, NiTexturingProperty *pkTarget);
void __thiscall NiTextureTransformController::Update(NiTextureTransformController *this, float fTime); // idb
void __thiscall NiTextureTransformController::GetTargetFloatValue(NiTextureTransformController *this, float *fValue); // idb
NiTextureTransformController *__thiscall NiTextureTransformController::`vector deleting destructor'(NiTextureTransformController *this, unsigned int a2);
NiFloatInterpController *__thiscall NiTextureTransformController::CreateClone(NiTextureTransformController *this, NiCloningProcess *kCloning);
NiFloatInterpController *__cdecl NiTextureTransformController::CreateObject();
void __thiscall NiTextureTransformController::LoadBinary(NiTextureTransformController *this, NiStream *kStream); // idb
void __thiscall NiTextureTransformController::SaveBinary(NiTextureTransformController *this, NiStream *kStream); // idb
void __thiscall NiTextureTransformController::GetViewerStrings(NiTextureTransformController *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiMaterialColorController::GetTargetPoint3Value(NiMaterialColorController *this, NiPoint3 *kValue); // idb
const char *__thiscall NiMaterialColorController::GetCtlrID(NiMaterialColorController *this); // idb
void __thiscall NiMaterialColorController::LinkObject(NiMaterialColorController *this, NiStream *kStream); // idb
bool __thiscall NiMaterialColorController::IsEqual(NiMaterialColorController *this, NiObject *pkObject); // idb
NiRTTI *NiMaterialColorController::GetRTTI();
void __thiscall NiMaterialColorController::Update(NiMaterialColorController *this, float fTime); // idb
void __cdecl NiStreamSaveBinary<unsigned short>(NiStream *kStream, const unsigned __int16 *value); // idb
NiMaterialColorController *__thiscall NiMaterialColorController::`scalar deleting destructor'(NiMaterialColorController *this, unsigned int a2);
NiPoint3InterpController *__thiscall NiMaterialColorController::CreateClone(NiMaterialColorController *this, NiCloningProcess *kCloning);
NiPoint3InterpController *__cdecl NiMaterialColorController::CreateObject();
void __thiscall NiMaterialColorController::LoadBinary(NiMaterialColorController *this, NiStream *kStream); // idb
void __thiscall NiMaterialColorController::GetViewerStrings(NiMaterialColorController *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiAlphaController::GetTargetFloatValue(NiAlphaController *this, float *fValue); // idb
void __thiscall NiTextureTransformController::LinkObject(NiTextureTransformController *this, NiStream *kStream); // idb
char __stdcall NiAlphaController::InterpTargetIsCorrectType(NiObjectNET *pkTarget);
void __thiscall NiAlphaController::Update(NiAlphaController *this, float fTime); // idb
void __thiscall NiAlphaController::NiAlphaController(NiAlphaController *this); // idb
NiRTTI *NiAlphaController::GetRTTI();
NiPoint3InterpController *__thiscall NiAlphaController::CreateClone(NiAlphaController *this, NiCloningProcess *kCloning);
NiObject *__cdecl NiAlphaController::CreateObject(); // idb
void __thiscall NiAlphaController::GetViewerStrings(NiAlphaController *this, NiTArray<char *> *pkStrings); // idb
char __stdcall NiControllerManager::Morph(NiControllerSequence *pkSourceSequence, NiControllerSequence *pkDestSequence, float fDuration, int iPriority, float fSourceWeight, float fDestWeight);
NiRTTI *NiAVObjectPalette::GetRTTI();
NiAVObjectPalette *__thiscall NiAVObjectPalette::`scalar deleting destructor'(NiAVObjectPalette *this, unsigned int a2);
void __thiscall NiControllerManager::Update(NiControllerManager *this, float fTime); // idb
char __stdcall NiControllerManager::CrossFade(NiControllerSequence *pkSourceSequence, NiControllerSequence *pkDestSequence, float fDuration, int iPriority, bool bStartOver, float fWeight, NiControllerSequence *pkTimeSyncSeq);
char __thiscall NiControllerManager::RegisterStreamables(NiControllerManager *this, NiStream *kStream);
void __thiscall NiControllerManager::PostLinkObject(NiControllerManager *this, NiStream *kStream); // idb
char __thiscall NiControllerManager::IsEqual(NiControllerManager *this, NiObject *pkObject);
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiAVObject *>,NiAVObject *>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiAVObject *>,NiAVObject *>(NiTStringTemplateMap<NiTPointerMap<char const *,NiAVObject *>,NiAVObject *> *this); // idb
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,unsigned int>,unsigned int>::~NiTStringTemplateMap<NiTPointerMap<char const *,unsigned int>,unsigned int>(NiTStringTemplateMap<NiTPointerMap<char const *,unsigned int>,unsigned int> *this); // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiAVObject *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiAVObject *>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiAVObject *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<char const *,NiAVObject *>::`scalar deleting destructor'(NiTPointerMap<char const *,NiAVObject *> *this, unsigned int a2);
NiTStringPointerMap<NiAVObject *> *__thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiAVObject *>,NiAVObject *>::`scalar deleting destructor'(NiTStringPointerMap<NiAVObject *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<char const *,unsigned int>::`scalar deleting destructor'(NiTPointerMap<char const *,unsigned int> *this, unsigned int a2);
void __thiscall NiControllerManager::SaveBinary(NiControllerManager *this, NiStream *kStream); // idb
void __thiscall NiControllerManager::LoadBinary(NiControllerManager *this, NiStream *kStream); // idb
void __thiscall NiTSet<NiPointer<NiActorManager::ChainCompletionInfo>>::Realloc(NiTSet<NiPointer<NiControllerSequence> > *this, unsigned int uiNewSize); // idb
void __thiscall NiTArray<NiPointer<NiControllerSequence>>::~NiTArray<NiPointer<NiControllerSequence>>(NiTArray<NiPointer<NiControllerSequence> > *this); // idb
NiTArray<NiPointer<NiControllerSequence> > *__thiscall NiTArray<NiPointer<NiControllerSequence>>::`vector deleting destructor'(NiTArray<NiPointer<NiControllerSequence> > *this, unsigned int a2);
void __thiscall NiControllerManager::~NiControllerManager(NiControllerManager *this); // idb
NiRTTI *NiControllerManager::GetRTTI();
NiPointer<NiControllerSequence> *__thiscall NiControllerManager::RemoveSequence(NiControllerManager *this, NiPointer<NiControllerSequence> *result, NiControllerSequence *pkSequence); // idb
NiControllerManager *__thiscall NiControllerManager::`vector deleting destructor'(NiControllerManager *this, unsigned int a2);
char __thiscall NiControllerManager::AddSequence(NiControllerManager *this, NiControllerSequence *pkSequence, const char *pcName, bool bStoreTargets);
void __thiscall NiControllerManager::CopyMembers(NiControllerManager *this, NiControllerManager *pkDest, NiCloningProcess *kCloning); // idb
void __thiscall NiControllerManager::ProcessClone(NiControllerManager *this, NiCloningProcess *kCloning); // idb
void __thiscall NiControllerManager::LinkObject(NiControllerManager *this, NiStream *kStream); // idb
NiTStringPointerMap<unsigned int> *__thiscall NiTStringPointerMap<unsigned int>::`vector deleting destructor'(NiTStringPointerMap<unsigned int> *this, unsigned int a2);
void __thiscall NiDefaultAVObjectPalette::NiDefaultAVObjectPalette(NiDefaultAVObjectPalette *this, NiAVObject *pkScene); // idb
NiRTTI *NiDefaultAVObjectPalette::GetRTTI();
void __thiscall NSBRequirements::SetBoneCalcMethod(NSBRequirements *this, NiBinaryShader::BoneMatrixCalcMethod eMethod); // idb
// NiAVObject *__userpurge NiDefaultAVObjectPalette::GetAVObject@<eax>(NiDefaultAVObjectPalette *this@<ecx>, int a2@<edi>, const char *pcName);
void __thiscall NiDefaultAVObjectPalette::SetAVObject(NiDefaultAVObjectPalette *this, const char *pcName, NiAVObject *pkObj); // idb
CPostProcessEffect *__thiscall NiDefaultAVObjectPalette::`vector deleting destructor'(NiDefaultAVObjectPalette *this, unsigned int a2);
void __thiscall NiControllerManager::NiControllerManager(NiControllerManager *this); // idb
void __thiscall NiControllerManager::NiControllerManager(NiControllerManager *this, NiAVObject *pkTarget, bool bCumulativeAnimations); // idb
NiObject *__thiscall NiControllerManager::CreateClone(NiControllerManager *this, NiCloningProcess *kCloning); // idb
void __cdecl NiControllerManager::CreateObject();
BOOL __cdecl NiAnimationKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1);
void __thiscall NiEulerRotKey::Initialize(NiEulerRotKey *this, NiFloatKey *pkX, unsigned int uiNumX, NiAnimationKey::KeyType eTypeX, NiFloatKey *pkY, unsigned int uiNumY, NiAnimationKey::KeyType eTypeY, NiFloatKey *pkZ, unsigned int uiNumZ, NiAnimationKey::KeyType eTypeZ); // idb
bool __cdecl NiAnimationKey::OkayToInsert(float fTime, NiAnimationKey *pkKeys, unsigned int uiNumKeys, unsigned int *uiInsertAt, char ucSize); // idb
void __cdecl NiAnimationKey::CopySequence(NiAnimationKey::KeyContent eContent, NiAnimationKey::KeyType eType, NiAnimationKey *pkOrigKeys, unsigned int uiOrigNumKeys, float fStartTime, float fEndTime, NiAnimationKey **pkNewKeys, unsigned int *uiNewNumKeys); // idb
void __cdecl NiAnimationKey::GuaranteeKeyAtStartAndEnd(NiAnimationKey::KeyContent eContent, NiAnimationKey::KeyType eType, NiAnimationKey **pkKeys, unsigned int *uiNumKeys, float fStartTime, float fEndTime); // idb
void __thiscall NiAnimationKey::LoadBinary(NiAnimationKey *this, NiStream *stream); // idb
void __cdecl NiAnimationKey::SaveBinary(NiStream *kStream, const int *value); // idb
double __cdecl NiInterpScalar::Linear(float fTime, float fP, float fQ);
double __cdecl NiInterpScalar::TCB(float fTime, float fP, float fPDD, float fQ, float fQDS);
void __cdecl NiInterpScalar::AdjustBezier(float fLastValue, float fLastTime, float *fLastOut, float fNextValue, float fNextTime, float *fNextIn, float fNewTime, float fNewValue, float *fNewIn, float *fNewOut); // idb
NiRTTI *NiFloatData::GetRTTI();
NiFloatData *__thiscall NiFloatData::`vector deleting destructor'(NiFloatData *this, unsigned int a2);
NiRTTI *NiPosData::GetRTTI();
NiPosData *__thiscall NiPosData::`scalar deleting destructor'(NiPosData *this, unsigned int a2);
void __thiscall NiFloatInterpolator::SetKeys(NiFloatInterpolator *this, NiFloatKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType); // idb
void __thiscall NiLookAtInterpolator::SetTranslateInterpolator(NiLookAtInterpolator *this, NiInterpolator *pkInterp); // idb
void __thiscall NiLookAtInterpolator::SetRollInterpolator(NiLookAtInterpolator *this, NiInterpolator *pkInterp); // idb
void __thiscall NiLookAtInterpolator::SetScaleInterpolator(NiLookAtInterpolator *this, NiInterpolator *pkInterp); // idb
void __thiscall NiPoint3Interpolator::SetKeys(NiPoint3Interpolator *this, NiPosKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType); // idb
NiPosKey *__thiscall NiTransformInterpolator::GetPosData(NiTransformInterpolator *this, unsigned int *uiNumKeys, NiAnimationKey::KeyType *eType, char *ucSize); // idb
NiFloatKey *__thiscall NiTransformInterpolator::GetScaleData(NiTransformInterpolator *this, unsigned int *uiNumKeys, NiAnimationKey::KeyType *eType, char *ucSize); // idb
void __cdecl NiOldAnimationConverter::SynchronizeTimeControllers(NiTimeController *pkSrc, NiTimeController *pkDest); // idb
void __cdecl NiOldAnimationConverter::ConvertLookAtController(NiLookAtController *pkController); // idb
void __cdecl NiOldAnimationConverter::ConvertRollController(NiRollController *pkController); // idb
void __cdecl NiOldAnimationConverter::ConvertPathController(NiPathController *pkController); // idb
void __cdecl NiOldAnimationConverter::RecurseScene(NiStream *kStream, NiObjectNET *pkObject); // idb
void __cdecl NiOldAnimationConverter::Convert(NiStream *kStream, NiObject *pkObject); // idb
char __thiscall NiAlphaRefController::RegisterStreamables(NiAlphaRefController *this, NiStream *stream);
void __thiscall NiAlphaController::SaveBinary(NiAlphaRefController *this, NiStream *stream); // idb
char __thiscall NiAlphaController::IsEqual(NiAlphaRefController *this, NiObject *pObject);
void __thiscall NiVisController::GetTargetBoolValue(NiVisController *this, bool *bValue); // idb
void __thiscall NiVisController::LoadBinary(NiVisController *this, NiStream *kStream); // idb
void __thiscall NiVisController::LinkObject(NiVisController *this, NiStream *kStream); // idb
char __stdcall NiVisController::InterpTargetIsCorrectType(NiObjectNET *pkTarget);
void __thiscall NiVisController::Update(NiVisController *this, float fTime); // idb
void __thiscall NiVisController::NiVisController(NiVisController *this); // idb
NiRTTI *NiVisController::GetRTTI();
NiPoint3InterpController *__thiscall NiVisController::CreateClone(NiVisController *this, NiCloningProcess *kCloning);
NiObject *__cdecl NiVisController::CreateObject(); // idb
void __thiscall NiVisController::GetViewerStrings(NiVisController *this, NiTArray<char *> *pkStrings); // idb
NiObject *__cdecl NiUVData::CreateObject(); // idb
NiRTTI *NiUVData::GetRTTI();
void __thiscall NiUVData::~NiUVData(NiUVData *this); // idb
char __thiscall NiUVData::IsEqual(NiUVData *this, NiObject *pkObject);
NiUVData *__thiscall NiUVData::`scalar deleting destructor'(NiUVData *this, unsigned int a2);
void __thiscall NiUVData::ReplaceUOffsetAnim(NiUVData *this, NiFloatKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType); // idb
void __thiscall NiUVData::ReplaceVOffsetAnim(NiUVData *this, NiFloatKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType); // idb
void __thiscall NiUVData::ReplaceUTilingAnim(NiUVData *this, NiFloatKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType); // idb
void __thiscall NiUVData::ReplaceVTilingAnim(NiUVData *this, NiFloatKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType); // idb
void __thiscall NiUVData::LoadBinary(NiUVData *this, NiStream *kStream); // idb
void __thiscall NiUVData::SaveBinary(NiUVData *this, NiStream *kStream); // idb
void __thiscall NiUVData::GetViewerStrings(NiUVData *this, NiTArray<char *> *pStrings); // idb
void __thiscall NiUVController::LinkObject(NiUVController *this, NiStream *kStream); // idb
char __thiscall NiUVController::RegisterStreamables(NiUVController *this, NiStream *kStream);
bool __thiscall NiUVController::IsEqual(NiUVController *this, NiObject *pkObject); // idb
NiRTTI *NiUVController::GetRTTI();
void __thiscall NiUVController::SetTarget(NiUVController *this, NiObjectNET *pkTarget); // idb
char __thiscall NiGeomMorpherController::TargetIsRequiredType(NiD3DTimeSyncController *this);
void __thiscall NiUVController::~NiUVController(NiUVController *this); // idb
void __thiscall NiUVController::ResetKeyTimeExtrema(NiUVController *this); // idb
void __thiscall NiUVController::Update(NiUVController *this, float fTime); // idb
void __thiscall NiUVController::OnPreDisplay(NiUVController *this); // idb
NiTimeController *__cdecl NiUVController::CreateObject();
void __thiscall NiUVController::SetUVData(NiUVController *this, NiUVData *pData); // idb
NiUVController *__thiscall NiUVController::`vector deleting destructor'(NiUVController *this, unsigned int a2);
void __thiscall NiUVController::LoadBinary(NiUVController *this, NiStream *kStream); // idb
void __thiscall NiUVController::SaveBinary(NiUVController *this, NiStream *kStream); // idb
void __thiscall NiUVController::GetViewerStrings(NiUVController *this, NiTArray<char *> *pStrings); // idb
NiTimeController *__thiscall NiUVController::CreateClone(NiUVController *this, NiCloningProcess *kCloning);
signed int __stdcall NiTransformInterpolator::GetKeyContent(unsigned __int16 usChannel);
BOOL __thiscall NiQuaternion::operator!=(NiQuaternion *this, NiQuaternion *q);
BOOL __thiscall NiQuatTransform::IsTransformInvalid(NiQuatTransform *this);
BOOL __thiscall NiQuatTransform::operator==(NiQuatTransform *this, NiQuatTransform *kTransform);
unsigned int __thiscall NiTransformInterpolator::GetKeyCount(NiTransformInterpolator *this, unsigned __int16 usChannel); // idb
NiAnimationKey::KeyType __thiscall NiTransformInterpolator::GetKeyType(NiTransformInterpolator *this, unsigned __int16 usChannel); // idb
NiPosKey *__thiscall NiTransformInterpolator::GetKeyArray(NiTransformInterpolator *this, unsigned __int16 usChannel);
char __thiscall NiTransformInterpolator::GetKeyStride(NiTransformInterpolator *this, unsigned __int16 usChannel); // idb
void __thiscall NiTransformInterpolator::GuaranteeTimeRange(NiTransformInterpolator *this, float fStartTime, float fEndTime); // idb
bool __thiscall NiTransformInterpolator::GetChannelPosed(NiTransformInterpolator *this, int usChannel);
void __thiscall NiTransformInterpolator::LoadBinary(NiTransformInterpolator *this, NiStream *kStream); // idb
char __thiscall NiTransformInterpolator::RegisterStreamables(NiTransformInterpolator *this, NiStream *kStream);
void __thiscall NiTransformInterpolator::SaveBinary(NiTransformInterpolator *this, NiStream *kStream); // idb
char __thiscall NiTransformInterpolator::IsEqual(NiTransformInterpolator *this, NiObject *pkObject);
void __thiscall NiTransformInterpolator::NiTransformInterpolator(NiTransformInterpolator *this, NiTransformData *pkData); // idb
NiRTTI *NiTransformInterpolator::GetRTTI();
void __thiscall NiTransformInterpolator::NiTransformInterpolator(NiTransformInterpolator *this, NiQuatTransform kPoseValue); // idb
void __thiscall NiTransformInterpolator::GetActiveTimeRange(NiTransformInterpolator *this, float *fBeginKeyTime, float *fEndKeyTime); // idb
NiInterpolator *__thiscall NiTransformInterpolator::GetSequenceInterpolator(NiTransformInterpolator *this, float fStartTime, float fEndTime); // idb
char __thiscall NiTransformInterpolator::Update(NiTransformInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiQuatTransform *kValue);
void __thiscall NiTransformInterpolator::Collapse(NiTransformInterpolator *this); // idb
void __thiscall NiTransformInterpolator::CopyMembers(NiTransformInterpolator *this, NiTransformInterpolator *pkDest, NiCloningProcess *kCloning); // idb
NiKeyBasedInterpolator *__cdecl NiTransformInterpolator::CreateObject();
NiTransformInterpolator *__thiscall NiTransformInterpolator::`scalar deleting destructor'(NiTransformInterpolator *this, unsigned int a2);
NiTransformInterpolator *__thiscall NiTransformInterpolator::CreateClone(NiTransformInterpolator *this, NiCloningProcess *kCloning);
void __thiscall NiTransformInterpolator::GetViewerStrings(NiTransformInterpolator *this, NiTArray<char *> *pkStrings); // idb
char __thiscall NiStringPalette::IsEqual(NiStringPalette *this, NiObject *pkObject);
NiObject *__cdecl NiStringPalette::CreateObject(); // idb
void __thiscall NiStringPalette::SaveBinary(NiStringPalette *this, NiStream *kStream); // idb
void __thiscall NiStringPalette::LoadBinary(NiStringPalette *this, NiStream *kStream); // idb
NiRTTI *NiSequenceStreamHelper::GetRTTI();
NiObject *__cdecl NiSequenceStreamHelper::CreateObject(); // idb
bool __thiscall NiSequence::IsEqual(NiAccumulator *this, NiObject *pkObject); // idb
void __thiscall NiTArray<NiPointer<NiActorManager::CallbackData>>::SetAt(NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *this, unsigned int uiIndex, NiPointer<NiD3DShaderConstantMapEntry> *element); // idb
NiPointer<NiAVObject> *__thiscall NiTArray<NiPointer<NiControllerSequence>>::RemoveAt(NiTArray<NiPointer<NiAVObject> > *this, NiPointer<NiAVObject> *result, unsigned int uiIndex); // idb
void __thiscall NiTArray<NiPointer<NiTransformController>>::~NiTArray<NiPointer<NiTransformController>>(NiTArray<NiPointer<NiTransformController> > *this); // idb
NiTArray<NiPointer<NiTransformController> > *__thiscall NiTArray<NiPointer<NiTransformController>>::`vector deleting destructor'(NiTArray<NiPointer<NiTransformController> > *this, unsigned int a2);
void __thiscall NiSequence::NiSequence(NiSequence *this, const char *pcName, unsigned int uiInitSize, unsigned int uiGrowBy); // idb
NiRTTI *NiSequence::GetRTTI();
void __thiscall NiSequence::~NiSequence(NiSequence *this); // idb
unsigned int __thiscall NiSequence::AddNameControllerPair(NiSequence *this, const char *pcName, NiTransformController *pkController); // idb
void __cdecl NiSequence::CreateObject();
void __thiscall NiSequence::LoadBinary(NiSequence *this, NiStream *kStream); // idb
void __thiscall NiSequence::LinkObject(NiSequence *this, NiStream *kStream); // idb
NiSequence *__thiscall NiSequence::`scalar deleting destructor'(NiSequence *this, unsigned int a2);
NiSequence *__cdecl NiSequence::ConvertSequence(NiStream *kStream, unsigned int uiIndex, const char *pcSequenceName); // idb
NiPointer<NiSequence> *__cdecl NiSequence::CreateFromKFFile(NiPointer<NiSequence> *result, NiStream *kStream, unsigned int uiIndex, const char *pcSequenceName); // idb
NiPointer<NiSequence> *__cdecl NiSequence::CreateFromKFFile(NiPointer<NiSequence> *result, const char *pcSequenceFile, unsigned int uiIndex, const char *pcSequenceName); // idb
void __thiscall NiRotData::GuaranteeKeysAtStartAndEnd(NiRotData *this, float fStartTime, float fEndTime); // idb
NiObject *__cdecl NiRotData::CreateObject(); // idb
NiRTTI *NiRotData::GetRTTI();
char __thiscall NiRotData::IsEqual(NiRotData *this, NiObject *pkObject);
CPostProcessEffect *__thiscall NiRotData::`scalar deleting destructor'(NiRotData *this, unsigned int a2);
void __thiscall NiRotData::ReplaceAnim(NiRotData *this, NiRotKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType); // idb
NiPointer<NiRotData> *__thiscall NiRotData::GetSequenceData(NiRotData *this, NiPointer<NiRotData> *result, float fStartTime, float fEndTime); // idb
void __thiscall NiRotData::LoadBinary(NiRotData *this, NiStream *kStream); // idb
void __thiscall NiRotData::SaveBinary(NiRotData *this, NiStream *kStream); // idb
void __thiscall NiRotData::GetViewerStrings(NiRotData *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiRollController::LoadBinary(NiRollController *this, NiStream *stream); // idb
void __thiscall NiRollController::LinkObject(NiRollController *this, NiStream *stream); // idb
char __thiscall NiRollController::RegisterStreamables(NiRollController *this, NiStream *stream);
void __thiscall NiRollController::SaveBinary(NiRollController *this, NiStream *stream); // idb
bool __thiscall NiRollController::IsEqual(NiRollController *this, NiObject *pObject); // idb
NiRTTI *NiFloatController::GetRTTI();
NiRTTI *NiRollController::GetRTTI();
NiRollController *__thiscall NiFloatController::`vector deleting destructor'(NiRollController *this, unsigned int a2);
char __thiscall NiMultiTargetTransformController::TargetIsRequiredType(NiRollController *this);
void __thiscall NiRollController::Update(NiRollController *this, float fTime); // idb
NiFloatController *__thiscall NiRollController::CreateClone(NiRollController *this, NiCloningProcess *kCloning);
NiObject *__cdecl NiRollController::CreateObject(); // idb
void __thiscall NiRollController::GetViewerStrings(NiRollController *this, NiTArray<char *> *pStrings); // idb
signed int __stdcall NiQuaternionInterpolator::GetKeyContent(unsigned __int16 usChannel);
NiRotData *__thiscall NiColorInterpolator::GetKeyCount(NiQuaternionInterpolator *this, unsigned __int16 usChannel);
NiAnimationKey *__thiscall NiColorInterpolator::GetKeyArray(NiQuaternionInterpolator *this, unsigned __int16 usChannel); // idb
bool __thiscall NiQuaternionInterpolator::GetChannelPosed(NiQuaternionInterpolator *this, unsigned __int16 usChannel); // idb
void __thiscall NiQuaternionInterpolator::Collapse(NiQuaternionInterpolator *this); // idb
void __thiscall NiQuaternionInterpolator::GuaranteeTimeRange(NiQuaternionInterpolator *this, float fStartTime, float fEndTime); // idb
void __thiscall NiQuaternionInterpolator::LoadBinary(NiQuaternionInterpolator *this, NiStream *kStream); // idb
void __thiscall NiQuaternionInterpolator::SaveBinary(NiQuaternionInterpolator *this, NiStream *kStream); // idb
char __thiscall NiQuaternionInterpolator::IsEqual(NiQuaternionInterpolator *this, NiObject *pkObject);
NiRTTI *NiQuaternionInterpolator::GetRTTI();
void __thiscall NiQuaternionInterpolator::GetActiveTimeRange(NiQuaternionInterpolator *this, float *fBeginKeyTime, float *fEndKeyTime); // idb
NiInterpolator *__thiscall NiQuaternionInterpolator::GetSequenceInterpolator(NiQuaternionInterpolator *this, float fStartTime, float fEndTime); // idb
char __thiscall NiQuaternionInterpolator::Update(NiQuaternionInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiQuaternion *kValue);
NiKeyBasedInterpolator *__cdecl NiQuaternionInterpolator::CreateObject();
NiQuaternionInterpolator *__thiscall NiQuaternionInterpolator::CreateClone(NiQuaternionInterpolator *this, NiCloningProcess *kCloning);
void __thiscall NiQuaternionInterpolator::GetViewerStrings(NiQuaternionInterpolator *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiPosData::~NiPosData(NiPosData *this); // idb
void __thiscall NiPosData::SetAnim(NiPosData *this, NiPosKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType); // idb
NiObject *__cdecl NiPosData::CreateObject(); // idb
char __thiscall NiPosData::IsEqual(NiPosData *this, NiObject *pkObject);
void __thiscall NiPosData::ReplaceAnim(NiPosData *this, NiPosKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType); // idb
NiPointer<NiPosData> *__thiscall NiPosData::GetSequenceData(NiPosData *this, NiPointer<NiPosData> *result, float fStartTime, float fEndTime); // idb
void __thiscall NiPosData::LoadBinary(NiPosData *this, NiStream *stream); // idb
void __thiscall NiPosData::SaveBinary(NiPosData *this, NiStream *stream); // idb
void __thiscall NiPosData::GetViewerStrings(NiPosData *this, NiTArray<char *> *pStrings); // idb
NiPosData *__thiscall NiPoint3Interpolator::GetKeyCount(NiPoint3Interpolator *this, unsigned __int16 usChannel);
NiPosData *__thiscall NiPoint3Interpolator::GetKeyType(NiPoint3Interpolator *this, unsigned __int16 usChannel);
NiAnimationKey *__thiscall NiPoint3Interpolator::GetKeyArray(NiPoint3Interpolator *this, unsigned __int16 usChannel); // idb
char __thiscall NiPoint3Interpolator::GetKeyStride(NiPoint3Interpolator *this, unsigned __int16 usChannel); // idb
bool __thiscall NiPoint3Interpolator::GetChannelPosed(NiPoint3Interpolator *this, unsigned __int16 usChannel); // idb
void __thiscall NiPoint3Interpolator::SetPoseValue(NiPoint3Interpolator *this, NiPoint3 kPoseValue); // idb
void __thiscall NiPoint3Interpolator::GuaranteeTimeRange(NiPoint3Interpolator *this, float fStartTime, float fEndTime); // idb
void __thiscall NiPoint3Interpolator::LoadBinary(NiPoint3Interpolator *this, NiStream *kStream); // idb
char __thiscall NiPoint3Interpolator::RegisterStreamables(NiPoint3Interpolator *this, NiStream *kStream);
void __thiscall NiPoint3Interpolator::SaveBinary(NiPoint3Interpolator *this, NiStream *kStream); // idb
void __thiscall NiPoint3Interpolator::NiPoint3Interpolator(NiPoint3Interpolator *this, NiPosData *pkPoint3Data); // idb
NiRTTI *NiPoint3Interpolator::GetRTTI();
void __thiscall NiPoint3Interpolator::NiPoint3Interpolator(NiPoint3Interpolator *this, NiPoint3 kPoseValue); // idb
void __thiscall NiPoint3Interpolator::Collapse(NiPoint3Interpolator *this); // idb
NiInterpolator *__thiscall NiPoint3Interpolator::GetSequenceInterpolator(NiPoint3Interpolator *this, float fStartTime, float fEndTime); // idb
char __thiscall NiPoint3Interpolator::Update(NiPoint3Interpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiPoint3 *kValue);
void __thiscall NiPoint3Interpolator::CopyMembers(NiPoint3Interpolator *this, NiPoint3Interpolator *pkDest, NiCloningProcess *kCloning); // idb
NiKeyBasedInterpolator *__cdecl NiPoint3Interpolator::CreateObject();
char __thiscall NiPoint3Interpolator::IsEqual(NiPoint3Interpolator *this, NiObject *pkObject);
NiPoint3Interpolator *__thiscall NiPoint3Interpolator::`vector deleting destructor'(NiPoint3Interpolator *this, unsigned int a2);
NiPoint3Interpolator *__thiscall NiPoint3Interpolator::CreateClone(NiPoint3Interpolator *this, NiCloningProcess *kCloning);
void __thiscall NiPoint3Interpolator::GetViewerStrings(NiPoint3Interpolator *this, NiTArray<char *> *pkStrings); // idb
int __stdcall NiPathInterpolator::GetKeyContent(unsigned __int16 usChannel);
unsigned int __thiscall NiPathInterpolator::GetKeyCount(NiPathInterpolator *this, unsigned __int16 usChannel); // idb
NiAnimationKey::KeyType __thiscall NiPathInterpolator::GetKeyType(NiPathInterpolator *this, unsigned __int16 usChannel); // idb
NiPosKey *__thiscall NiPathInterpolator::GetKeyArray(NiPathInterpolator *this, unsigned __int16 usChannel);
char __thiscall NiPathInterpolator::GetKeyStride(NiPathInterpolator *this, unsigned __int16 usChannel); // idb
void __thiscall NiPathInterpolator::GetActiveTimeRange(NiPathInterpolator *this, float *fBeginKeyTime, float *fEndKeyTime); // idb
void __thiscall NiPathInterpolator::GuaranteeTimeRange(NiPathInterpolator *this, float fStartTime, float fEndTime); // idb
void __thiscall NiPathInterpolator::ProcessClone(NiPathInterpolator *this, NiCloningProcess *kCloning); // idb
char __thiscall NiPathInterpolator::RegisterStreamables(NiPathInterpolator *this, NiStream *kStream);
NiPosKey *__thiscall NiPathInterpolator::GetPathKeys(NiPathInterpolator *this, unsigned int *uiNumKeys, NiAnimationKey::KeyType *eType, char *ucSize); // idb
void __thiscall NiPathInterpolator::~NiPathInterpolator(NiPathInterpolator *this); // idb
NiRTTI *NiPathInterpolator::GetRTTI();
NiPoint3 *__thiscall NiPathInterpolator::GenPathInterp(NiPathInterpolator *this, NiPoint3 *result, int iI1, int iI2, float fNormTime); // idb
void __thiscall NiPathInterpolator::CalcRefFrame(NiPathInterpolator *this, unsigned int ui1, unsigned int ui2, float fNormTime, NiMatrix3 *kRefFrame); // idb
double __thiscall NiPathInterpolator::PathLength(NiPathInterpolator *this, int iI0, int iI1, float fTime);
NiInterpolator *__thiscall NiPathInterpolator::GetSequenceInterpolator(NiPathInterpolator *this, float fStartTime, float fEndTime); // idb
char __thiscall NiPathInterpolator::IsEqual(NiPathInterpolator *this, NiObject *pkObject);
NiPathInterpolator *__thiscall NiPathInterpolator::`scalar deleting destructor'(NiPathInterpolator *this, unsigned int a2);
double __thiscall NiPathInterpolator::GetTotalPathLength(NiPathInterpolator *this);
void __thiscall NiPathInterpolator::SetConstantVelocityData(NiPathInterpolator *this); // idb
void __thiscall NiPathInterpolator::GetPercentLoc(NiPathInterpolator *this, float fPercent, unsigned int *uiI1, unsigned int *uiI2, float *fNormTime); // idb
void __thiscall NiPathInterpolator::GetLoc(NiPathInterpolator *this, float fTime, unsigned int *uiI1, unsigned int *uiI2, float *fNormTime); // idb
void __thiscall NiPathInterpolator::LoadBinary(NiPathInterpolator *this, NiStream *kStream); // idb
// void __userpurge NiPathInterpolator::LinkObject(NiPathInterpolator *this@<ecx>, double a2@<st0>, NiStream *kStream);
void __thiscall NiPathInterpolator::SaveBinary(NiPathInterpolator *this, NiStream *kStream); // idb
void __thiscall NiPathInterpolator::GetViewerStrings(NiPathInterpolator *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiPathInterpolator::NiPathInterpolator(NiPathInterpolator *this, NiPosData *pkPathData, NiFloatData *pkPctData); // idb
char __thiscall NiPathInterpolator::Update(NiPathInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiQuatTransform *kValue);
void __thiscall NiPathInterpolator::CopyMembers(NiPathInterpolator *this, NiPathInterpolator *pkDest, NiCloningProcess *kCloning); // idb
NiKeyBasedInterpolator *__cdecl NiPathInterpolator::CreateObject();
NiKeyBasedInterpolator *__thiscall NiPathInterpolator::CreateClone(NiPathInterpolator *this, NiCloningProcess *kCloning);
void __thiscall NiPathController::ProcessClone(NiPathController *this, NiCloningProcess *kCloning); // idb
char __thiscall NiPathController::RegisterStreamables(NiPathController *this, NiStream *kStream);
void __thiscall NiPathController::GetPathData(NiPathController *this, NiPosKey **pkPathData, unsigned int *uiNumKeys, NiAnimationKey::KeyType *eType, char *ucSize); // idb
void __thiscall NiPathController::~NiPathController(NiPathController *this); // idb
NiRTTI *NiPathController::GetRTTI();
NiPoint3 *__thiscall NiPathController::GenPathInterp(NiPathController *this, NiPoint3 *result, int iI1, int iI2, float fNormTime); // idb
void __thiscall NiPathController::CalcRefFrame(NiPathController *this, unsigned int ui1, unsigned int ui2, float fNormTime, NiMatrix3 *kRefFrame); // idb
double __thiscall NiPathController::PathLength(NiPathController *this, int iI0, int iI1, float fTime);
char __thiscall NiPathController::IsEqual(NiPathController *this, NiObject *pkObject);
NiPathController *__thiscall NiPathController::`scalar deleting destructor'(NiPathController *this, unsigned int a2);
double __thiscall NiPathController::GetTotalPathLength(NiPathController *this);
void __thiscall NiPathController::GetPercentLoc(NiPathController *this, float fPercent, unsigned int *uiI1, unsigned int *uiI2, float *fNormTime); // idb
void __thiscall NiPathController::GetLoc(NiPathController *this, float fTime, unsigned int *uiI1, unsigned int *uiI2, float *fNormTime); // idb
void __thiscall NiPathController::LoadBinary(NiPathController *this, NiStream *kStream); // idb
// void __userpurge NiPathController::LinkObject(NiPathController *this@<ecx>, double a2@<st0>, NiStream *kStream);
void __thiscall NiPathController::SaveBinary(NiPathController *this, NiStream *kStream); // idb
void __thiscall NiPathController::GetViewerStrings(NiPathController *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiPathController::Update(NiPathController *this, float fTime); // idb
void __thiscall NiPathController::CopyMembers(NiPathController *this, NiPathController *pkDest, NiCloningProcess *kCloning); // idb
NiTimeController *__cdecl NiPathController::CreateObject();
NiTimeController *__thiscall NiPathController::CreateClone(NiPathController *this, NiCloningProcess *kCloning);
unsigned __int16 __thiscall NiMultiTargetTransformController::GetInterpolatorCount(NiMultiTargetTransformController *this); // idb
NiBlendTransformInterpolator *__thiscall NiMultiTargetTransformController::GetInterpolator(NiMultiTargetTransformController *this, unsigned __int16 usIndex);
NiBlendTransformInterpolator *__thiscall NiMultiTargetTransformController::CreateBlendInterpolator(NiMultiTargetTransformController *this, unsigned __int16 usIndex, bool bManagerControlled, bool bAccumulateAnimations, float fWeightThreshold, char ucArraySize);
void __thiscall NiMultiTargetTransformController::GuaranteeTimeRange(NiMultiTargetTransformController *this, float fStartTime, float fEndTime); // idb
int __stdcall NiMultiTargetTransformController::InterpolatorIsCorrectType(NiInterpolator *pkInterpolator, unsigned __int16 usIndex);
char __thiscall NiMultiTargetTransformController::RegisterStreamables(NiMultiTargetTransformController *this, NiStream *kStream);
char __thiscall NiMultiTargetTransformController::IsEqual(NiMultiTargetTransformController *this, NiObject *pkObject);
void __thiscall NiMultiTargetTransformController::~NiMultiTargetTransformController(NiMultiTargetTransformController *this); // idb
void __thiscall NiMultiTargetTransformController::Update(NiMultiTargetTransformController *this, float fTime); // idb
char *__thiscall NiMultiTargetTransformController::GetInterpolatorID(NiMultiTargetTransformController *this, unsigned __int16 usIndex);
unsigned __int16 __thiscall NiMultiTargetTransformController::GetInterpolatorIndex(NiMultiTargetTransformController *this, const char *pcID); // idb
void __thiscall NiMultiTargetTransformController::ResetTimeExtrema(NiMultiTargetTransformController *this); // idb
void __thiscall NiMultiTargetTransformController::AllocateStorage(NiMultiTargetTransformController *this, unsigned __int16 usCount); // idb
float *__thiscall NiBlendTransformInterpolator::`vector deleting destructor'(NiBlendTransformInterpolator *this, unsigned int a2);
void __thiscall NiMultiTargetTransformController::CreatePoseInterpolator(NiMultiTargetTransformController *this, unsigned __int16 usIndex);
void __thiscall NiMultiTargetTransformController::CopyMembers(NiMultiTargetTransformController *this, NiMultiTargetTransformController *pkDest, NiCloningProcess *kCloning); // idb
void __thiscall NiMultiTargetTransformController::ProcessClone(NiMultiTargetTransformController *this, NiCloningProcess *kCloning); // idb
NiMultiTargetTransformController *__thiscall NiMultiTargetTransformController::CreateClone(NiMultiTargetTransformController *this, NiCloningProcess *kCloning);
NiInterpController *__cdecl NiMultiTargetTransformController::CreateObject();
void __thiscall NiMultiTargetTransformController::LoadBinary(NiMultiTargetTransformController *this, NiStream *kStream); // idb
void __thiscall NiMultiTargetTransformController::SaveBinary(NiMultiTargetTransformController *this, NiStream *kStream); // idb
void __thiscall NiMultiTargetTransformController::GetViewerStrings(NiMultiTargetTransformController *this, NiTArray<char *> *pkStrings); // idb
unsigned int __thiscall NiD3DXEffectStateManager::GetLastTextureStage(NiD3DShaderProgramCreatorAsm *this); // idb
double __thiscall NiMorphData::MorphTarget::GetWeight(NiMorphData::MorphTarget *this);
NiObject *__cdecl NiMorphData::CreateObject(); // idb
int __thiscall NiMorphData::RegisterStreamables(NiPSysModifier *this, NiStream *kStream);
NiRTTI *NiMorphData::GetRTTI();
void *__thiscall NiMorphData::MorphTarget::`vector deleting destructor'(NiMorphData::MorphTarget *this, unsigned int); // idb
void __thiscall NiFloatInterpolator::ReplaceKeys(NiFloatInterpolator *this, NiFloatKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType); // idb
bool __thiscall NiMorphData::MorphTarget::IsEqual(NiMorphData::MorphTarget *this, NiMorphData::MorphTarget *pkOther, unsigned int uiNumVerts); // idb
char __thiscall NiMorphData::IsEqual(NiMorphData *this, NiObject *pObject);
void __thiscall NiMorphData::MorphTarget::LoadBinary(NiMorphData::MorphTarget *this, NiStream *kStream, unsigned int uiNumVerts); // idb
CPostProcessEffect *__thiscall NiMorphData::`vector deleting destructor'(NiMorphData *this, unsigned int a2);
void __thiscall NiMorphData::LoadBinary(NiMorphData *this, NiStream *stream); // idb
void __thiscall NiMorphData::SaveBinary(NiMorphData *this, NiStream *stream); // idb
void __thiscall NiMorphData::GetViewerStrings(NiMorphData *this, NiTArray<char *> *pStrings); // idb
char __thiscall NiLookAtInterpolator::ResolveDependencies(NiLookAtInterpolator *this, NiAVObjectPalette *pkPalette);
void __thiscall NiLookAtInterpolator::Collapse(NiLookAtInterpolator *this); // idb
void __thiscall NiLookAtInterpolator::GetActiveTimeRange(NiLookAtInterpolator *this, float *fBeginKeyTime, float *fEndKeyTime); // idb
void __thiscall NiLookAtInterpolator::GuaranteeTimeRange(NiLookAtInterpolator *this, float fStartTime, float fEndTime); // idb
NiLookAtInterpolator *__thiscall NiLookAtInterpolator::GetSequenceInterpolator(NiLookAtInterpolator *this, float fStartTime, float fEndTime);
void __thiscall NiLookAtInterpolator::SetLookAtName(NiLookAtInterpolator *this, const char *pcName); // idb
char __thiscall NiLookAtInterpolator::SetUpDependencies(NiLookAtInterpolator *this);
void __thiscall NiLookAtInterpolator::ProcessClone(NiLookAtInterpolator *this, NiCloningProcess *kCloning); // idb
char __thiscall NiLookAtInterpolator::RegisterStreamables(NiLookAtInterpolator *this, NiStream *kStream);
char __thiscall NiLookAtInterpolator::IsEqual(NiLookAtInterpolator *this, NiObject *pkObject);
void __thiscall NiLookAtInterpolator::NiLookAtInterpolator(NiLookAtInterpolator *this, NiAVObject *pkLookAt, NiLookAtInterpolator::Axis eAxis, bool bFlip); // idb
NiRTTI *NiLookAtInterpolator::GetRTTI();
void __thiscall NiLookAtInterpolator::~NiLookAtInterpolator(NiLookAtInterpolator *this); // idb
char __thiscall NiLookAtInterpolator::Update(NiLookAtInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiQuatTransform *kValue);
void __thiscall NiLookAtInterpolator::CopyMembers(NiLookAtInterpolator *this, NiLookAtInterpolator *pkDest, NiCloningProcess *kCloning); // idb
void __cdecl NiLookAtInterpolator::CreateObject();
NiLookAtInterpolator *__thiscall NiLookAtInterpolator::`scalar deleting destructor'(NiLookAtInterpolator *this, unsigned int a2);
NiObject *__thiscall NiLookAtInterpolator::CreateClone(NiLookAtInterpolator *this, NiCloningProcess *kCloning); // idb
void __thiscall NiLookAtInterpolator::LoadBinary(NiLookAtInterpolator *this, NiStream *kStream); // idb
void __thiscall NiLookAtInterpolator::SaveBinary(NiLookAtInterpolator *this, NiStream *kStream); // idb
void __thiscall NiLookAtInterpolator::GetViewerStrings(NiLookAtInterpolator *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiLookAtController::LinkObject(NiLookAtController *this, NiStream *kStream); // idb
char __thiscall NiLookAtController::RegisterStreamables(NiLookAtController *this, NiStream *kStream);
char __thiscall NiLookAtController::IsEqual(NiLookAtController *this, NiObject *pkObject);
void __thiscall NiLookAtController::Update(NiLookAtController *this, float fTime); // idb
void __thiscall NiLookAtController::ProcessClone(NiLookAtController *this, NiCloningProcess *kCloning); // idb
NiRTTI *NiLookAtController::GetRTTI();
NiTimeController *__thiscall NiLookAtController::CreateClone(NiLookAtController *this, NiCloningProcess *kCloning);
NiTimeController *__cdecl NiLookAtController::CreateObject();
void __thiscall NiLookAtController::LoadBinary(NiLookAtController *this, NiStream *kStream); // idb
void __thiscall NiLookAtController::SaveBinary(NiLookAtController *this, NiStream *kStream); // idb
void __thiscall NiLookAtController::GetViewerStrings(NiLookAtController *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiLightDimmerController::LoadBinary(NiAlphaRefController *this, NiStream *stream); // idb
bool __thiscall NiLightDimmerController::IsEqual(NiLightDimmerController *this, NiObject *pkObject); // idb
void __thiscall NiLightDimmerController::GetTargetFloatValue(NiLightDimmerController *this, float *fValue); // idb
NiRTTI *NiLightDimmerController::GetRTTI();
void __thiscall NiLightDimmerController::Update(NiLightDimmerController *this, float fTime); // idb
NiLightDimmerController *__thiscall NiLightDimmerController::`vector deleting destructor'(NiLightDimmerController *this, unsigned int a2);
NiPoint3InterpController *__thiscall NiLightDimmerController::CreateClone(NiLightDimmerController *this, NiCloningProcess *kCloning);
NiObject *__cdecl NiLightDimmerController::CreateObject(); // idb
void __thiscall NiLightDimmerController::GetViewerStrings(NiLightDimmerController *this, NiTArray<char *> *pkStrings); // idb
bool __thiscall NiTextureTransformController::RegisterStreamables(NiTextureTransformController *this, NiStream *kStream); // idb
void __thiscall NiLightColorController::GetTargetPoint3Value(NiLightColorController *this, NiPoint3 *kValue); // idb
const char *__thiscall NiLightColorController::GetCtlrID(NiLightColorController *this); // idb
bool __thiscall NiLightColorController::IsEqual(NiLightColorController *this, NiObject *pkObject); // idb
NiRTTI *NiLightColorController::GetRTTI();
char __stdcall NiLightColorController::InterpTargetIsCorrectType(NiObjectNET *pkTarget);
void __thiscall NiLightColorController::Update(NiLightColorController *this, float fTime); // idb
void __thiscall NiLightColorController::LinkObject(NiLightColorController *this, NiStream *kStream); // idb
NiLightColorController *__thiscall NiLightColorController::`scalar deleting destructor'(NiLightColorController *this, unsigned int a2);
NiPoint3InterpController *__thiscall NiLightColorController::CreateClone(NiLightColorController *this, NiCloningProcess *kCloning);
NiPoint3InterpController *__cdecl NiLightColorController::CreateObject();
void __thiscall NiLightColorController::LoadBinary(NiLightColorController *this, NiStream *kStream); // idb
void __thiscall NiLightColorController::SaveBinary(NiMaterialColorController *this, NiStream *kStream); // idb
void __thiscall NiLightColorController::GetViewerStrings(NiLightColorController *this, NiTArray<char *> *pkStrings); // idb
NiTArray<unsigned int> *__thiscall NiTArray<unsigned int>::`vector deleting destructor'(NiTArray<unsigned int> *this, unsigned int a2);
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSequence>>,NiPointer<NiSequence>>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSequence>>,NiPointer<NiSequence>>(NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSequence> >,NiPointer<NiSequence> > *this); // idb
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiShaderLibrary>>,NiPointer<NiShaderLibrary>>::SetValue(NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiShaderLibrary> >,NiPointer<NiShaderLibrary> > *this, NiTMapItem<char const *,NiPointer<NiShaderLibrary> > *pkItem, const char *pcKey, NiPointer<NiShaderLibrary> val); // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSequence> > *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSequence>>::`vector deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSequence> > *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<char const *,NiPointer<NiSequence>>::`vector deleting destructor'(NiTPointerMap<char const *,NiPointer<NiSequence> > *this, unsigned int a2);
NiTStringPointerMap<NiPointer<NiSequence> > *__thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSequence>>,NiPointer<NiSequence>>::`vector deleting destructor'(NiTStringPointerMap<NiPointer<NiSequence> > *this, unsigned int a2);
void __thiscall NiKeyframeManager::LinkObject(NiKeyframeManager *this, NiStream *kStream); // idb
char __thiscall NiKeyframeManager::Add(NiKeyframeManager *this, const char *pcSequenceFile, const char *pcSequenceName, unsigned int uiIndex);
void __thiscall NiKeyframeManager::LoadBinary(NiKeyframeManager *this, NiStream *kStream); // idb
void __thiscall NiKeyframeManager::NiKeyframeManager(NiKeyframeManager *this); // idb
NiRTTI *NiKeyframeManager::GetRTTI();
NiKeyframeManager *__thiscall NiKeyframeManager::`scalar deleting destructor'(NiKeyframeManager *this, unsigned int a2);
void __cdecl NiKeyframeManager::CreateObject();
void __thiscall NiTransformData::GuaranteeKeysAtStartAndEnd(NiTransformData *this, float fStartTime, float fEndTime); // idb
NiObject *__cdecl NiTransformData::CreateObject(); // idb
NiRTTI *NiTransformData::GetRTTI();
void __thiscall NiTransformData::SetPosAnim(NiTransformData *this, NiPosKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType); // idb
void __thiscall NiTransformData::SetScaleAnim(NiTransformData *this, NiFloatKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType); // idb
char __thiscall NiTransformData::IsEqual(NiTransformData *this, NiObject *pkObject);
void __thiscall NiTransformData::~NiTransformData(NiTransformData *this); // idb
void __thiscall NiTransformData::ReplaceRotAnim(NiTransformData *this, NiRotKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType); // idb
void __thiscall NiTransformData::ReplacePosAnim(NiTransformData *this, NiPosKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType); // idb
void __thiscall NiTransformData::ReplaceScaleAnim(NiTransformData *this, NiFloatKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType); // idb
NiPointer<NiTransformData> *__thiscall NiTransformData::GetSequenceData(NiTransformData *this, NiPointer<NiTransformData> *result, float fStartTime, float fEndTime); // idb
NiTransformData *__thiscall NiTransformData::`scalar deleting destructor'(NiTransformData *this, unsigned int a2);
void __thiscall NiTransformData::LoadBinary(NiTransformData *this, NiStream *stream); // idb
void __thiscall NiTransformData::SaveBinary(NiTransformData *this, NiStream *stream); // idb
void __thiscall NiTransformData::GetViewerStrings(NiTransformData *this, NiTArray<char *> *pStrings); // idb
int __stdcall NiGeomMorpherController::InterpolatorIsCorrectType(NiInterpolator *pkInterpolator, unsigned __int16 usIndex);
void __thiscall NiGeomMorpherController::GuaranteeTimeRange(NiGeomMorpherController *this, float fStartTime, float fEndTime); // idb
void __thiscall NiGeomMorpherController::ProcessClone(NiGeomMorpherController *this, NiCloningProcess *kCloning); // idb
char __thiscall NiGeomMorpherController::RegisterStreamables(NiGeomMorpherController *this, NiStream *kStream);
// bool __userpurge NiGeomMorpherController::IsEqual@<al>(NiGeomMorpherController *this@<ecx>, unsigned int a2@<ebx>, NiObject *pkObject);
const char *__thiscall NiGeomMorpherController::GetInterpolatorID(NiGeomMorpherController *this, unsigned __int16 usIndex); // idb
NiInterpolator *__thiscall NiGeomMorpherController::GetInterpolator(NiGeomMorpherController *this, unsigned __int16 usIndex); // idb
void __thiscall NiGeomMorpherController::SetInterpolator(NiGeomMorpherController *this, NiInterpolator *pkInterpolator, unsigned __int16 usIndex); // idb
unsigned int __thiscall NiGeomMorpherController::GetNumTargets(NiGeomMorpherController *this); // idb
void __thiscall NiGeomMorpherController::ResetTimeExtrema(NiGeomMorpherController *this); // idb
void __thiscall NiGeomMorpherController::Update(NiGeomMorpherController *this, float fTime); // idb
void __thiscall NiGeomMorpherController::GenMorphInterp(NiGeomMorpherController *this, float fTime); // idb
void __thiscall NiGeomMorpherController::SetTarget(NiGeomMorpherController *this, NiObjectNET *pkTarget); // idb
void __thiscall NiGeomMorpherController::OnPreDisplay(NiGeomMorpherController *this); // idb
void __thiscall NiGeomMorpherController::CalculateMorphBound(NiGeomMorpherController *this); // idb
unsigned __int16 __thiscall NiGeomMorpherController::GetInterpolatorCount(NiGeomMorpherController *this); // idb
unsigned __int16 __thiscall NiGeomMorpherController::GetInterpolatorIndex(NiGeomMorpherController *this, const char *pcID); // idb
void __thiscall NiGeomMorpherController::CreatePoseInterpolator(NiGeomMorpherController *this, unsigned __int16 usIndex);
void __thiscall NiGeomMorpherController::SynchronizePoseInterpolator(NiGeomMorpherController *this, NiInterpolator *pkInterp, unsigned __int16 usIndex); // idb
void __thiscall NiGeomMorpherController::AllocateInterpArray(NiGeomMorpherController *this, unsigned __int16 usCount); // idb
void __thiscall NiGeomMorpherController::SetMorphData(NiGeomMorpherController *this, NiMorphData *pkData, bool bCalculateMorphBound); // idb
NiRTTI *NiGeomMorpherController::GetRTTI();
NiPoint3 *__thiscall NiGeomMorpherController::GetVertexData(NiGeomMorpherController *this); // idb
void __thiscall NiGeomMorpherController::~NiGeomMorpherController(NiGeomMorpherController *this); // idb
void __thiscall NiGeomMorpherController::CopyMembers(NiGeomMorpherController *this, NiGeomMorpherController *pkDest, NiCloningProcess *kCloning); // idb
NiInterpController *__cdecl NiGeomMorpherController::CreateObject();
void __thiscall NiGeomMorpherController::LoadBinary(NiGeomMorpherController *this, NiStream *kStream); // idb
void __thiscall NiGeomMorpherController::LinkObject(NiGeomMorpherController *this, NiStream *kStream); // idb
void __thiscall NiGeomMorpherController::SaveBinary(NiGeomMorpherController *this, NiStream *kStream); // idb
NiGeomMorpherController *__thiscall NiGeomMorpherController::`vector deleting destructor'(NiGeomMorpherController *this, unsigned int a2);
NiInterpController *__thiscall NiGeomMorpherController::CreateClone(NiGeomMorpherController *this, NiCloningProcess *kCloning);
NiObject *__cdecl NiFloatsExtraDataPoint3Controller::CreateObject(); // idb
void __thiscall NiAlphaRefController::LinkObject(NiAlphaRefController *this, NiStream *stream); // idb
bool __thiscall NiFloatsExtraDataPoint3Controller::IsEqual(NiFloatsExtraDataPoint3Controller *this, NiObject *pkObject); // idb
NiRTTI *NiFloatsExtraDataPoint3Controller::GetRTTI();
NiFloatsExtraDataPoint3Controller *__thiscall NiFloatsExtraDataPoint3Controller::`vector deleting destructor'(NiFloatsExtraDataPoint3Controller *this, unsigned int a2);
void __thiscall NiFloatsExtraDataPoint3Controller::CreatePoseInterpolator(NiFloatsExtraDataPoint3Controller *this, unsigned __int16 usIndex);
NiPSysModifierCtlr *__thiscall NiFloatsExtraDataPoint3Controller::CreateClone(NiFloatsExtraDataPoint3Controller *this, NiCloningProcess *kCloning);
void __thiscall NiFloatsExtraDataPoint3Controller::SynchronizePoseInterpolator(NiFloatsExtraDataPoint3Controller *this, NiInterpolator *pkInterp, unsigned __int16 usIndex); // idb
void __thiscall NiFloatsExtraDataPoint3Controller::Update(NiFloatsExtraDataPoint3Controller *this, float fTime); // idb
void __thiscall NiFloatsExtraDataPoint3Controller::LoadBinary(NiFloatsExtraDataPoint3Controller *this, NiStream *kStream); // idb
void __thiscall NiFloatsExtraDataPoint3Controller::GetViewerStrings(NiFloatsExtraDataPoint3Controller *this, NiTArray<char *> *pkStrings); // idb
NiObject *__cdecl NiFloatsExtraDataController::CreateObject(); // idb
NiRTTI *NiFloatsExtraDataController::GetRTTI();
NiFloatsExtraDataController *__thiscall NiFloatsExtraDataController::`scalar deleting destructor'(NiFloatsExtraDataController *this, unsigned int a2);
void __thiscall NiFloatsExtraDataController::CreatePoseInterpolator(NiFloatsExtraDataController *this, unsigned __int16 usIndex);
char *__thiscall NiFloatsExtraDataPoint3Controller::GetCtlrID(NiFloatsExtraDataPoint3Controller *this);
NiPSysModifierCtlr *__thiscall NiFloatsExtraDataController::CreateClone(NiFloatsExtraDataController *this, NiCloningProcess *kCloning);
void __thiscall NiFloatsExtraDataController::SynchronizePoseInterpolator(NiFloatsExtraDataController *this, NiInterpolator *pkInterp, unsigned __int16 usIndex); // idb
void __thiscall NiFloatsExtraDataController::Update(NiFloatsExtraDataController *this, float fTime); // idb
void __thiscall NiFloatsExtraDataController::LoadBinary(NiFloatsExtraDataController *this, NiStream *kStream); // idb
void __thiscall NiFloatsExtraDataPoint3Controller::SaveBinary(NiFloatsExtraDataPoint3Controller *this, NiStream *kStream); // idb
void __thiscall NiFloatsExtraDataController::GetViewerStrings(NiFloatsExtraDataController *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiFloatInterpolator::NiFloatInterpolator(NiFloatInterpolator *this, NiFloatData *pkFloatData); // idb
NiRTTI *NiFloatInterpolator::GetRTTI();
void __thiscall NiFloatInterpolator::NiFloatInterpolator(NiFloatInterpolator *this, float fPoseValue); // idb
char __thiscall NiBoolInterpolator::GetKeyStride(NiFloatInterpolator *this, unsigned __int16 usChannel); // idb
bool __thiscall NiFloatInterpolator::GetChannelPosed(NiFloatInterpolator *this, unsigned __int16 usChannel); // idb
void __thiscall NiFloatInterpolator::Collapse(NiFloatInterpolator *this); // idb
void __thiscall NiFloatInterpolator::SetPoseValue(NiFloatInterpolator *this, float fPoseValue); // idb
void __thiscall NiFloatInterpolator::GuaranteeTimeRange(NiFloatInterpolator *this, float fStartTime, float fEndTime); // idb
NiKeyBasedInterpolator *__cdecl NiFloatInterpolator::CreateObject();
char __thiscall NiFloatInterpolator::IsEqual(NiFloatInterpolator *this, NiObject *pkObject);
NiFloatKey *__thiscall NiBoolInterpolator::GetKeys(NiFloatInterpolator *this, unsigned int *uiNumKeys, NiAnimationKey::KeyType *eType, char *ucSize); // idb
NiInterpolator *__thiscall NiFloatInterpolator::GetSequenceInterpolator(NiFloatInterpolator *this, float fStartTime, float fEndTime); // idb
char __thiscall NiFloatInterpolator::Update(NiFloatInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, float *fValue);
void __thiscall NiFloatInterpolator::CopyMembers(NiFloatInterpolator *this, NiFloatInterpolator *pkDest, NiCloningProcess *kCloning); // idb
void __thiscall NiFloatInterpolator::LoadBinary(NiFloatInterpolator *this, NiStream *kStream); // idb
void __thiscall NiFloatInterpolator::SaveBinary(NiFloatInterpolator *this, NiStream *kStream); // idb
NiFloatInterpolator *__thiscall NiFloatInterpolator::CreateClone(NiFloatInterpolator *this, NiCloningProcess *kCloning);
void __thiscall NiFloatInterpolator::GetViewerStrings(NiFloatInterpolator *this, NiTArray<char *> *pkStrings); // idb
NiObject *__cdecl NiFloatExtraDataController::CreateObject(); // idb
bool __thiscall NiFloatsExtraDataController::RegisterStreamables(NiFloatsExtraDataPoint3Controller *this, NiStream *kStream); // idb
NiRTTI *NiFloatExtraDataController::GetRTTI();
NiFloatExtraDataController *__thiscall NiFloatExtraDataController::`scalar deleting destructor'(NiFloatExtraDataController *this, unsigned int a2);
void __thiscall NiFloatExtraDataController::CreatePoseInterpolator(NiFloatExtraDataController *this, unsigned __int16 usIndex);
NiPSysModifierCtlr *__thiscall NiFloatExtraDataController::CreateClone(NiFloatExtraDataController *this, NiCloningProcess *kCloning);
void __thiscall NiFloatExtraDataController::SynchronizePoseInterpolator(NiFloatExtraDataController *this, NiInterpolator *pkInterp, unsigned __int16 usIndex); // idb
void __thiscall NiFloatExtraDataController::Update(NiFloatExtraDataController *this, float fTime); // idb
void __thiscall NiFloatExtraDataController::GetViewerStrings(NiFloatExtraDataController *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiFloatData::GuaranteeKeysAtStartAndEnd(NiFloatData *this, float fStartTime, float fEndTime); // idb
void __thiscall NiFloatData::~NiFloatData(NiFloatData *this); // idb
void __thiscall NiFloatData::SetAnim(NiFloatData *this, NiFloatKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType); // idb
NiObject *__cdecl NiFloatData::CreateObject(); // idb
char __thiscall NiFloatData::IsEqual(NiFloatData *this, NiObject *pkObject);
void __thiscall NiFloatData::ReplaceAnim(NiFloatData *this, NiFloatKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType); // idb
NiPointer<NiFloatData> *__thiscall NiFloatData::GetSequenceData(NiFloatData *this, NiPointer<NiFloatData> *result, float fStartTime, float fEndTime); // idb
void __thiscall NiFloatData::LoadBinary(NiFloatData *this, NiStream *stream); // idb
void __thiscall NiFloatData::SaveBinary(NiFloatData *this, NiStream *stream); // idb
void __thiscall NiFloatData::GetViewerStrings(NiFloatData *this, NiTArray<char *> *pStrings); // idb
void __thiscall NiFlipController::GetTargetFloatValue(NiFlipController *this, float *fValue); // idb
bool __thiscall NiFlipController::IsEqual(NiFlipController *this, NiObject *pkObject); // idb
void __stdcall NiFlipController::CreateBlendInterpolator(unsigned __int16 usIndex, bool bManagerControlled, bool bAccumulateAnimations, float fWeightThreshold, char ucArraySize);
char *__thiscall NiFlipController::GetCtlrID(NiFlipController *this);
char __thiscall NiFlipController::RegisterStreamables(NiFlipController *this, NiStream *kStream);
void __thiscall NiTArray<NiPointer<NiTexture>>::~NiTArray<NiPointer<NiTexture>>(NiTArray<NiPointer<NiTexture> > *this); // idb
NiTArray<NiPointer<NiTexture> > *__thiscall NiTArray<NiPointer<NiTexture>>::`scalar deleting destructor'(NiTArray<NiPointer<NiTexture> > *this, unsigned int a2);
NiRTTI *NiFlipController::GetRTTI();
char __stdcall NiTextureTransformController::InterpTargetIsCorrectType(NiObjectNET *pkTarget);
void __thiscall NiFlipController::Update(NiFlipController *this, float fTime); // idb
void __thiscall NiFlipController::SaveBinary(NiFlipController *this, NiStream *kStream); // idb
void __thiscall NiFlipController::NiFlipController(NiFlipController *this); // idb
NiFlipController *__thiscall NiFlipController::`vector deleting destructor'(NiFlipController *this, unsigned int a2);
void __thiscall NiFlipController::CopyMembers(NiFlipController *this, NiFlipController *pkDest, NiCloningProcess *kCloning); // idb
void __cdecl NiFlipController::CreateObject();
void __thiscall NiFlipController::LoadBinary(NiFlipController *this, NiStream *kStream); // idb
void __thiscall NiFlipController::LinkObject(NiFlipController *this, NiStream *kStream); // idb
NiObject *__thiscall NiFlipController::CreateClone(NiFlipController *this, NiCloningProcess *kCloning); // idb
signed int __stdcall NiColorInterpolator::GetKeyContent(unsigned __int16 usChannel);
NiRotData *__thiscall NiQuaternionInterpolator::GetKeyType(NiQuaternionInterpolator *this, unsigned __int16 usChannel);
char __thiscall NiColorInterpolator::GetKeyStride(NiQuaternionInterpolator *this, unsigned __int16 usChannel); // idb
bool __thiscall NiColorInterpolator::GetChannelPosed(NiColorInterpolator *this, unsigned __int16 usChannel); // idb
void __thiscall NiColorInterpolator::SetPoseValue(NiColorInterpolator *this, NiColorA kPoseValue); // idb
void __thiscall NiColorInterpolator::GuaranteeTimeRange(NiColorInterpolator *this, float fStartTime, float fEndTime); // idb
char __thiscall NiQuaternionInterpolator::RegisterStreamables(NiQuaternionInterpolator *this, NiStream *kStream);
void __thiscall NiColorInterpolator::SaveBinary(NiColorInterpolator *this, NiStream *kStream); // idb
BOOL __thiscall NiColorA::operator!=(NiPlane *this, NiPlane *kPlane);
void __thiscall NiColorInterpolator::NiColorInterpolator(NiColorInterpolator *this, NiColorData *pkColorData); // idb
NiRTTI *NiColorInterpolator::GetRTTI();
void __thiscall NiColorInterpolator::NiColorInterpolator(NiColorInterpolator *this, NiColorA kPoseValue); // idb
void __thiscall NiColorInterpolator::Collapse(NiColorInterpolator *this); // idb
NiInterpolator *__thiscall NiColorInterpolator::GetSequenceInterpolator(NiColorInterpolator *this, float fStartTime, float fEndTime); // idb
char __thiscall NiColorInterpolator::Update(NiColorInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiColorA *kValue);
void __thiscall NiColorInterpolator::CopyMembers(NiQuaternionInterpolator *this, NiQuaternionInterpolator *pkDest, NiCloningProcess *kCloning); // idb
NiKeyBasedInterpolator *__cdecl NiColorInterpolator::CreateObject();
char __thiscall NiColorInterpolator::IsEqual(NiColorInterpolator *this, NiObject *pkObject);
NiQuaternionInterpolator *__thiscall NiColorInterpolator::`vector deleting destructor'(NiQuaternionInterpolator *this, unsigned int a2);
NiKeyBasedInterpolator *__thiscall NiColorInterpolator::CreateClone(NiColorInterpolator *this, NiCloningProcess *kCloning);
void __thiscall NiColorInterpolator::GetViewerStrings(NiColorInterpolator *this, NiTArray<char *> *pkStrings); // idb
void __stdcall NiColorExtraDataController::CreateBlendInterpolator(unsigned __int16 usIndex, bool bManagerControlled, bool bAccumulateAnimations, float fWeightThreshold, char ucArraySize);
int __stdcall NiColorExtraDataController::InterpolatorIsCorrectType(NiInterpolator *pkInterpolator, unsigned __int16 usIndex);
NiObject *__cdecl NiColorExtraDataController::CreateObject(); // idb
void __thiscall NiColorExtraDataController::SaveBinary(NiPSysModifierFloatCtlr *this, NiStream *kStream); // idb
char __thiscall NiFloatExtraDataController::IsEqual(NiFloatExtraDataController *this, NiObject *pkObject);
NiRTTI *NiColorExtraDataController::GetRTTI();
void __thiscall NiColorExtraDataController::CreatePoseInterpolator(NiColorExtraDataController *this, unsigned __int16 usIndex);
NiPSysModifierCtlr *__thiscall NiColorExtraDataController::CreateClone(NiColorExtraDataController *this, NiCloningProcess *kCloning);
void __thiscall NiColorExtraDataController::LinkObject(NiColorExtraDataController *this, NiStream *kStream); // idb
void __thiscall NiColorExtraDataController::SynchronizePoseInterpolator(NiColorExtraDataController *this, NiInterpolator *pkInterp, unsigned __int16 usIndex); // idb
void __thiscall NiColorExtraDataController::Update(NiColorExtraDataController *this, float fTime); // idb
void __thiscall NiColorExtraDataController::GetViewerStrings(NiColorExtraDataController *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiColorData::GuaranteeKeysAtStartAndEnd(NiColorData *this, float fStartTime, float fEndTime); // idb
NiRTTI *NiColorData::GetRTTI();
NiObject *__cdecl NiColorData::CreateObject(); // idb
char __thiscall NiColorData::IsEqual(NiColorData *this, NiObject *pkObject);
CPostProcessEffect *__thiscall NiColorData::`vector deleting destructor'(NiColorData *this, unsigned int a2);
void __thiscall NiColorData::ReplaceAnim(NiColorData *this, NiColorKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType); // idb
NiPointer<NiColorData> *__thiscall NiColorData::GetSequenceData(NiColorData *this, NiPointer<NiColorData> *result, float fStartTime, float fEndTime); // idb
void __thiscall NiColorData::LoadBinary(NiColorData *this, NiStream *stream); // idb
void __thiscall NiColorData::SaveBinary(NiColorData *this, NiStream *stream); // idb
void __thiscall NiColorData::GetViewerStrings(NiColorData *this, NiTArray<char *> *pStrings); // idb
signed int __stdcall NiBSplineTransformInterpolator::GetDimension(unsigned __int16 usChannel);
signed int __stdcall NiBSplineTransformInterpolator::GetDegree(unsigned __int16 usChannel);
unsigned int __thiscall NiBSplineTransformInterpolator::GetControlHandle(NiBSplineTransformInterpolator *this, unsigned __int16 usChannel); // idb
void __thiscall NiBSplineTransformInterpolator::SetControlHandle(NiBSplineTransformInterpolator *this, unsigned int kControlHandle, unsigned __int16 usChannel); // idb
void __thiscall NiBSplineTransformInterpolator::CopyMembers(NiBSplineTransformInterpolator *this, NiBSplineTransformInterpolator *pkDest, NiCloningProcess *kCloning); // idb
NiRTTI *NiBSplineTransformInterpolator::GetRTTI();
void __thiscall NiBSplineTransformInterpolator::NiBSplineTransformInterpolator(NiBSplineTransformInterpolator *this, NiBSplineData *pkData, unsigned int kTransCPHandle, unsigned int kRotCPHandle, unsigned int kScaleCPHandle, NiBSplineBasisData *pkBasisData); // idb
bool __thiscall NiBSplineTransformInterpolator::GetChannelPosed(NiBSplineTransformInterpolator *this, int usChannel);
NiObject *__thiscall NiBSplineTransformInterpolator::CreateClone(NiBSplineTransformInterpolator *this, NiCloningProcess *kCloning); // idb
void __cdecl NiBSplineTransformInterpolator::CreateObject();
bool __thiscall NiBSplineTransformInterpolator::IsEqual(NiBSplineTransformInterpolator *this, NiObject *pkObject); // idb
char __thiscall NiBSplineTransformInterpolator::Update(NiBSplineTransformInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiQuatTransform *kValue);
void __thiscall NiBSplineTransformInterpolator::SaveBinary(NiBSplineTransformInterpolator *this, NiStream *kStream); // idb
void __thiscall NiBSplineTransformInterpolator::LoadBinary(NiBSplineTransformInterpolator *this, NiStream *kStream); // idb
void __thiscall NiBSplineTransformInterpolator::GetViewerStrings(NiBSplineTransformInterpolator *this, NiTArray<char *> *pkStrings); // idb
signed int __stdcall NiBSplineColorInterpolator::GetDegree(unsigned __int16 usChannel);
unsigned int __thiscall NiBSplinePoint3Interpolator::GetControlHandle(NiBSplinePoint3Interpolator *this, unsigned __int16 usChannel); // idb
void __thiscall NiBSplinePoint3Interpolator::SetControlHandle(NiBSplinePoint3Interpolator *this, unsigned int kControlHandle, unsigned __int16 usChannel); // idb
void __thiscall NiBSplinePoint3Interpolator::CopyMembers(NiBSplinePoint3Interpolator *this, NiBSplinePoint3Interpolator *pkDest, NiCloningProcess *kCloning); // idb
NiRTTI *NiBSplinePoint3Interpolator::GetRTTI();
void __thiscall NiBSplinePoint3Interpolator::NiBSplinePoint3Interpolator(NiBSplinePoint3Interpolator *this, NiBSplineData *pkData, unsigned int kPoint3CPHandle, NiBSplineBasisData *pkBasisData); // idb
char __thiscall NiBSplinePoint3Interpolator::Update(NiBSplinePoint3Interpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiPoint3 *kValue);
NiBSplineInterpolator *__thiscall NiBSplinePoint3Interpolator::CreateClone(NiBSplinePoint3Interpolator *this, NiCloningProcess *kCloning);
NiObject *__cdecl NiBSplinePoint3Interpolator::CreateObject(); // idb
void __thiscall NiBSplinePoint3Interpolator::SaveBinary(NiBSplinePoint3Interpolator *this, NiStream *kStream); // idb
bool __thiscall NiBSplinePoint3Interpolator::IsEqual(NiBSplinePoint3Interpolator *this, NiObject *pkObject); // idb
void __thiscall NiBSplinePoint3Interpolator::LoadBinary(NiBSplinePoint3Interpolator *this, NiStream *kStream); // idb
void __thiscall NiBSplinePoint3Interpolator::GetViewerStrings(NiBSplinePoint3Interpolator *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiBSplineFloatInterpolator::NiBSplineFloatInterpolator(NiBSplineFloatInterpolator *this, NiBSplineData *pkData, unsigned int kFloatCPHandle, NiBSplineBasisData *pkBasisData); // idb
int NiDirectionalLight::GetEffectType();
bool __thiscall NiBSplineColorInterpolator::GetChannelPosed(NiBSplinePoint3Interpolator *this, unsigned __int16 usChannel); // idb
BOOL __stdcall NiBSplineFloatInterpolator::GetDimension(unsigned __int16 usChannel);
unsigned int __thiscall NiBSplineFloatInterpolator::GetControlHandle(NiBSplineFloatInterpolator *this, unsigned __int16 usChannel); // idb
void __thiscall NiBSplineFloatInterpolator::SetControlHandle(NiBSplineFloatInterpolator *this, unsigned int kControlHandle, unsigned __int16 usChannel); // idb
void __thiscall NiBSplineFloatInterpolator::CopyMembers(NiBSplineFloatInterpolator *this, NiBSplineFloatInterpolator *pkDest, NiCloningProcess *kCloning); // idb
NiObject *__cdecl NiBSplineFloatInterpolator::CreateObject(); // idb
bool __thiscall NiBSplineFloatInterpolator::IsEqual(NiBSplineFloatInterpolator *this, NiObject *pkObject); // idb
NiRTTI *NiBSplineFloatInterpolator::GetRTTI();
char __thiscall NiBSplineFloatInterpolator::Update(NiBSplineFloatInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, float *fValue);
NiBSplineInterpolator *__thiscall NiBSplineFloatInterpolator::CreateClone(NiBSplineFloatInterpolator *this, NiCloningProcess *kCloning);
void __thiscall NiBSplineFloatInterpolator::SaveBinary(NiBSplineFloatInterpolator *this, NiStream *kStream); // idb
void __thiscall NiBSplineFloatInterpolator::LoadBinary(NiBSplineFloatInterpolator *this, NiStream *kStream); // idb
void __thiscall NiBSplineFloatInterpolator::GetViewerStrings(NiBSplineFloatInterpolator *this, NiTArray<char *> *pkStrings); // idb
char __thiscall NiBSplineCompTransformInterpolator::IsEqual(NiBSplineCompTransformInterpolator *this, NiObject *pkObject);
NiRTTI *NiBSplineCompTransformInterpolator::GetRTTI();
NiBSplineTransformInterpolator *__thiscall NiBSplineCompTransformInterpolator::CreateClone(NiBSplineCompTransformInterpolator *this, NiCloningProcess *kCloning);
NiBSplineTransformInterpolator *__cdecl NiBSplineCompTransformInterpolator::CreateObject();
char __thiscall NiBSplineCompTransformInterpolator::Update(NiBSplineCompTransformInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiQuatTransform *kValue);
void __thiscall NiBSplineCompTransformInterpolator::LoadBinary(NiBSplineCompTransformInterpolator *this, NiStream *kStream); // idb
void __thiscall NiBSplineCompTransformInterpolator::SaveBinary(NiBSplineCompTransformInterpolator *this, NiStream *kStream); // idb
void __thiscall NiBSplineCompTransformInterpolator::GetViewerStrings(NiBSplineCompTransformInterpolator *this, NiTArray<char *> *pkStrings); // idb
char ITableBase<UseClassTypeInfo,UseCalssTypeTable>::DataProcess();
char __thiscall NiBSplineCompPoint3Interpolator::IsEqual(NiBSplineCompPoint3Interpolator *this, NiObject *pkObject);
NiRTTI *NiBSplineCompPoint3Interpolator::GetRTTI();
char __thiscall NiBSplineCompPoint3Interpolator::Update(NiBSplineCompPoint3Interpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiPoint3 *kValue);
NiBSplinePoint3Interpolator *__thiscall NiBSplineCompPoint3Interpolator::CreateClone(NiBSplineCompPoint3Interpolator *this, NiCloningProcess *kCloning);
NiBSplinePoint3Interpolator *__cdecl NiBSplineCompPoint3Interpolator::CreateObject();
void __thiscall NiBSplineCompPoint3Interpolator::LoadBinary(NiBSplineCompPoint3Interpolator *this, NiStream *kStream); // idb
void __thiscall NiBSplineCompPoint3Interpolator::SaveBinary(NiBSplineCompPoint3Interpolator *this, NiStream *kStream); // idb
void __thiscall NiBSplineCompPoint3Interpolator::GetViewerStrings(NiBSplineCompPoint3Interpolator *this, NiTArray<char *> *pkStrings); // idb
bool __thiscall NiBSplineCompTransformInterpolator::RegisterStreamables(NiBSplineCompTransformInterpolator *this, NiStream *kStream); // idb
char __thiscall NiBSplineCompFloatInterpolator::IsEqual(NiBSplineCompFloatInterpolator *this, NiObject *pkObject);
NiRTTI *NiBSplineCompFloatInterpolator::GetRTTI();
char __thiscall NiBSplineCompFloatInterpolator::Update(NiBSplineCompFloatInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, float *fValue);
NiBSplineFloatInterpolator *__thiscall NiBSplineCompFloatInterpolator::CreateClone(NiBSplineCompFloatInterpolator *this, NiCloningProcess *kCloning);
NiBSplineFloatInterpolator *__cdecl NiBSplineCompFloatInterpolator::CreateObject();
void __thiscall NiBSplineCompFloatInterpolator::LoadBinary(NiBSplineCompFloatInterpolator *this, NiStream *kStream); // idb
void __thiscall NiBSplineCompFloatInterpolator::SaveBinary(NiBSplineCompFloatInterpolator *this, NiStream *kStream); // idb
void __thiscall NiBSplineCompFloatInterpolator::GetViewerStrings(NiBSplineCompFloatInterpolator *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiBoolTimelineInterpolator::LinkObject(NiBSplineCompTransformInterpolator *this, NiStream *kStream); // idb
char __thiscall NiBSplineCompColorInterpolator::IsEqual(NiBSplineCompColorInterpolator *this, NiObject *pkObject);
NiRTTI *NiBSplineCompColorInterpolator::GetRTTI();
NiBSplineTransformInterpolator *__thiscall NiBSplinePoint3Interpolator::`vector deleting destructor'(NiBSplineTransformInterpolator *this, unsigned int a2);
char __thiscall NiBSplineCompColorInterpolator::Update(NiBSplineCompColorInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiColorA *kValue);
NiBSplineColorInterpolator *__thiscall NiBSplineCompColorInterpolator::CreateClone(NiBSplineCompColorInterpolator *this, NiCloningProcess *kCloning);
NiBSplineColorInterpolator *__cdecl NiBSplineCompColorInterpolator::CreateObject();
void __thiscall NiBSplineCompColorInterpolator::LoadBinary(NiBSplineCompColorInterpolator *this, NiStream *kStream); // idb
void __thiscall NiBSplineCompColorInterpolator::SaveBinary(NiBSplineCompColorInterpolator *this, NiStream *kStream); // idb
void __thiscall NiBSplineCompColorInterpolator::GetViewerStrings(NiBSplineCompColorInterpolator *this, NiTArray<char *> *pkStrings); // idb
signed int __stdcall NiBSplineColorInterpolator::GetDimension(unsigned __int16 usChannel);
unsigned int __thiscall NiBSplineColorInterpolator::GetControlHandle(NiBSplineColorInterpolator *this, unsigned __int16 usChannel); // idb
void __thiscall NiBSplineColorInterpolator::SetControlHandle(NiBSplineColorInterpolator *this, unsigned int kControlHandle, unsigned __int16 usChannel); // idb
void __thiscall NiBSplineColorInterpolator::CopyMembers(NiBSplineColorInterpolator *this, NiBSplineColorInterpolator *pkDest, NiCloningProcess *kCloning); // idb
bool __thiscall NiBSplineColorInterpolator::RegisterStreamables(NiBSplineTransformInterpolator *this, NiStream *kStream); // idb
NiRTTI *NiBSplineColorInterpolator::GetRTTI();
void __thiscall NiBSplineColorInterpolator::NiBSplineColorInterpolator(NiBSplineColorInterpolator *this, NiBSplineData *pkData, unsigned int kColorACPHandle, NiBSplineBasisData *pkBasisData); // idb
char __thiscall NiBSplineColorInterpolator::Update(NiBSplineColorInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiColorA *kValue);
NiBSplineInterpolator *__thiscall NiBSplineColorInterpolator::CreateClone(NiBSplineColorInterpolator *this, NiCloningProcess *kCloning);
NiBSplineInterpolator *__cdecl NiBSplineColorInterpolator::CreateObject();
void __thiscall NiBSplineColorInterpolator::SaveBinary(NiBSplineColorInterpolator *this, NiStream *kStream); // idb
bool __thiscall NiBSplineColorInterpolator::IsEqual(NiBSplineColorInterpolator *this, NiObject *pkObject); // idb
void __thiscall NiBSplineColorInterpolator::LoadBinary(NiBSplineColorInterpolator *this, NiStream *kStream); // idb
void __thiscall NiBSplineColorInterpolator::GetViewerStrings(NiBSplineColorInterpolator *this, NiTArray<char *> *pkStrings); // idb
NiObject *__cdecl NiBSplineData::CreateObject(); // idb
bool __thiscall NiBSplineData::IsEqual(NiBSplineData *this, NiObject *pkObject); // idb
void __thiscall NiBSplineBasis<float,3>::Compute(NiBSplineBasis<float,3> *this, float fTime, int *iMin, int *iMax); // idb
NiRTTI *NiBSplineData::GetRTTI();
NiBSplineData *__thiscall NiBSplineData::`scalar deleting destructor'(NiBSplineData *this, unsigned int a2);
void __thiscall NiBSplineData::GetValueDegree3(NiBSplineData *this, float fTime, float *afPos, unsigned int uiDimension, NiBSplineBasisData *pkBasisData, unsigned int kControlPointHandle); // idb
void __thiscall NiBSplineData::GetCompactedValueDegree3(NiBSplineData *this, float fTime, float *afPos, unsigned int uiDimension, NiBSplineBasisData *pkBasisData, unsigned int kControlPointHandle, float fOffset, float fHalfRange); // idb
void __thiscall NiBSplineData::LoadBinary(NiBSplineData *this, NiStream *kStream); // idb
void __thiscall NiBSplineData::SaveBinary(NiBSplineData *this, NiStream *kStream); // idb
void __thiscall NiBSplineData::GetViewerStrings(NiBSplineData *this, NiTArray<char *> *pStrings); // idb
long double *__thiscall NiBSplineBasisData::GetDegree3Basis(Wml::Vector3<double> *this); // idb
NiRTTI *NiBSplineBasisData::GetRTTI();
NiObject *__thiscall NiBSplineBasisData::CreateClone(NiBSplineBasisData *this, NiCloningProcess *kCloning); // idb
NiObject *__cdecl NiBSplineBasisData::CreateObject(); // idb
bool __thiscall NiBSplineBasisData::IsEqual(NiBSplineBasisData *this, NiObject *pkObject); // idb
NiBSplineBasisData *__thiscall NiBSplineBasisData::`vector deleting destructor'(NiBSplineBasisData *this, unsigned int a2);
void __thiscall NiBSplineBasisData::GetViewerStrings(NiBSplineBasisData *this, NiTArray<char *> *pStrings); // idb
void __thiscall NiBSplineBasisData::LoadBinary(NiBSplineBasisData *this, NiStream *kStream); // idb
void __thiscall NiBSplineBasisData::SaveBinary(NiBSplineBasisData *this, NiStream *kStream); // idb
void __thiscall NiBoolTimelineInterpolator::LoadBinary(NiBoolTimelineInterpolator *this, NiStream *kStream); // idb
char __thiscall NiBoolTimelineInterpolator::RegisterStreamables(NiBoolTimelineInterpolator *this, NiStream *kStream);
void __thiscall NiBoolTimelineInterpolator::SaveBinary(NiBoolTimelineInterpolator *this, NiStream *kStream); // idb
char __thiscall NiBoolTimelineInterpolator::IsEqual(NiBoolTimelineInterpolator *this, NiObject *pkObject);
NiRTTI *NiBoolTimelineInterpolator::GetRTTI();
char __thiscall NiBoolTimelineInterpolator::Update(NiBoolTimelineInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, bool *bValue);
void __thiscall NiBoolTimelineInterpolator::NiBoolTimelineInterpolator(NiBoolTimelineInterpolator *this, NiBoolData *pkBoolData); // idb
NiBoolInterpolator *__thiscall NiBoolTimelineInterpolator::CreateClone(NiBoolTimelineInterpolator *this, NiCloningProcess *kCloning);
NiBoolInterpolator *__cdecl NiBoolTimelineInterpolator::CreateObject();
void __thiscall NiBoolTimelineInterpolator::GetViewerStrings(NiBoolTimelineInterpolator *this, NiTArray<char *> *pkStrings); // idb
signed int __stdcall NiBoolInterpolator::GetKeyContent(unsigned __int16 usChannel);
void __thiscall NiAlphaAccumulator::LinkObject(NiAlphaAccumulator *this, NiStream *kStream); // idb
NiFloatData *__thiscall NiFloatInterpolator::GetKeyCount(NiFloatInterpolator *this, unsigned __int16 usChannel);
NiFloatData *__thiscall NiBoolInterpolator::GetKeyType(NiFloatInterpolator *this, unsigned __int16 usChannel);
NiAnimationKey *__thiscall NiFloatInterpolator::GetKeyArray(NiFloatInterpolator *this, unsigned __int16 usChannel); // idb
bool __thiscall NiBoolInterpolator::GetChannelPosed(NiBoolInterpolator *this, unsigned __int16 usChannel); // idb
void __thiscall NiBoolInterpolator::Collapse(NiBoolInterpolator *this); // idb
void __thiscall NiBoolInterpolator::SetPoseValue(NiBoolInterpolator *this, bool bPoseValue); // idb
void __thiscall NiBoolInterpolator::GuaranteeTimeRange(NiBoolInterpolator *this, float fStartTime, float fEndTime); // idb
char __thiscall NiBoolInterpolator::RegisterStreamables(NiFloatInterpolator *this, NiStream *kStream);
char __thiscall NiBoolInterpolator::IsEqual(NiBoolInterpolator *this, NiObject *pkObject);
void __thiscall NiBoolInterpolator::NiBoolInterpolator(NiBoolInterpolator *this, NiBoolData *pkBoolData); // idb
NiRTTI *NiBoolInterpolator::GetRTTI();
void __thiscall NiBoolInterpolator::NiBoolInterpolator(NiBoolInterpolator *this, bool bPoseValue); // idb
NiInterpolator *__thiscall NiBoolInterpolator::GetSequenceInterpolator(NiBoolInterpolator *this, float fStartTime, float fEndTime); // idb
char __thiscall NiBoolInterpolator::Update(NiBoolInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, bool *bValue);
void __thiscall NiBoolInterpolator::CopyMembers(NiBoolInterpolator *this, NiBoolInterpolator *pkDest, NiCloningProcess *kCloning); // idb
NiKeyBasedInterpolator *__cdecl NiBoolInterpolator::CreateObject();
NiFloatInterpolator *__thiscall NiBoolInterpolator::`scalar deleting destructor'(NiFloatInterpolator *this, unsigned int a2);
NiBoolInterpolator *__thiscall NiBoolInterpolator::CreateClone(NiBoolInterpolator *this, NiCloningProcess *kCloning);
void __thiscall NiBoolInterpolator::LoadBinary(NiBoolInterpolator *this, NiStream *kStream); // idb
void __thiscall NiBoolInterpolator::SaveBinary(NiBoolInterpolator *this, NiStream *kStream); // idb
void __thiscall NiBoolInterpolator::GetViewerStrings(NiBoolInterpolator *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiBoolData::GuaranteeKeysAtStartAndEnd(NiBoolData *this, float fStartTime, float fEndTime); // idb
NiRTTI *NiBoolData::GetRTTI();
NiObject *__cdecl NiBoolData::CreateObject(); // idb
char __thiscall NiBoolData::IsEqual(NiBoolData *this, NiObject *pkObject);
void __thiscall NiBoolData::ReplaceAnim(NiBoolData *this, NiBoolKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType); // idb
NiPointer<NiBoolData> *__thiscall NiBoolData::GetSequenceData(NiBoolData *this, NiPointer<NiBoolData> *result, float fStartTime, float fEndTime); // idb
CPostProcessEffect *__thiscall NiBoolData::`vector deleting destructor'(NiBoolData *this, unsigned int a2);
void __thiscall NiBoolData::LoadBinary(NiBoolData *this, NiStream *kStream); // idb
void __thiscall NiBoolData::SaveBinary(NiBoolData *this, NiStream *kStream); // idb
void __thiscall NiBoolData::GetViewerStrings(NiBoolData *this, NiTArray<char *> *pStrings); // idb
void __thiscall NiBlendTransformInterpolator::NiBlendTransformInterpolator(NiBlendTransformInterpolator *this, bool bManagerControlled, float fWeightThreshold, char ucArraySize); // idb
void __thiscall NiBlendTransformInterpolator::NiBlendTransformInterpolator(NiBlendTransformInterpolator *this); // idb
NiObject *__cdecl NiBlendTransformInterpolator::CreateObject(); // idb
void __thiscall NiBlendTransformInterpolator::SaveBinary(NiBlendTransformInterpolator *this, NiStream *kStream); // idb
bool __thiscall NiBlendTransformInterpolator::IsEqual(NiBlendTransformInterpolator *this, NiObject *pkObject); // idb
NiRTTI *NiBlendTransformInterpolator::GetRTTI();
NiBlendInterpolator *__thiscall NiBlendTransformInterpolator::CreateClone(NiBlendTransformInterpolator *this, NiCloningProcess *kCloning);
void __thiscall NiBlendTransformInterpolator::CreateCloneInPlace(NiBlendTransformInterpolator *this, NiBlendTransformInterpolator *pkClone, NiCloningProcess *kCloning); // idb
void __thiscall NiBlendTransformInterpolator::LoadBinary(NiBlendTransformInterpolator *this, NiStream *kStream); // idb
char __thiscall NiBlendTransformInterpolator::StoreSingleValue(NiBlendTransformInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiQuatTransform *kValue);
bool __thiscall NiBlendTransformInterpolator::BlendValues(NiBlendTransformInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiQuatTransform *kValue); // idb
char __thiscall NiBlendTransformInterpolator::Update(NiBlendTransformInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiQuatTransform *kValue);
void __thiscall NiBlendTransformInterpolator::GetViewerStrings(NiBlendTransformInterpolator *this, NiTArray<char *> *pkStrings); // idb
int __stdcall NiBlendQuaternionInterpolator::InterpolatorIsCorrectType(NiInterpolator *pkInterpolator);
NiBlendInterpolator *__cdecl NiBlendQuaternionInterpolator::CreateObject();
void __thiscall NiBlendQuaternionInterpolator::LoadBinary(NiBlendQuaternionInterpolator *this, NiStream *kStream); // idb
void __thiscall NiBlendQuaternionInterpolator::SaveBinary(NiBlendQuaternionInterpolator *this, NiStream *kStream); // idb
NiRTTI *NiBlendQuaternionInterpolator::GetRTTI();
NiBlendInterpolator *__thiscall NiBlendQuaternionInterpolator::CreateClone(NiBlendQuaternionInterpolator *this, NiCloningProcess *kCloning);
bool __thiscall NiBlendQuaternionInterpolator::IsEqual(NiBlendQuaternionInterpolator *this, NiObject *pkObject); // idb
char __thiscall NiBlendQuaternionInterpolator::StoreSingleValue(NiBlendQuaternionInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiQuaternion *kValue);
char __thiscall NiBlendQuaternionInterpolator::BlendValues(NiBlendQuaternionInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiQuaternion *kValue);
char __thiscall NiBlendQuaternionInterpolator::Update(NiBlendQuaternionInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiQuaternion *kValue);
void __thiscall NiBlendQuaternionInterpolator::GetViewerStrings(NiBlendQuaternionInterpolator *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiBlendPoint3Interpolator::NiBlendPoint3Interpolator(NiBlendPoint3Interpolator *this, bool bManagerControlled, float fWeightThreshold, char ucArraySize); // idb
int __stdcall NiBlendPoint3Interpolator::InterpolatorIsCorrectType(NiInterpolator *pkInterpolator);
NiBlendInterpolator *__cdecl NiBlendPoint3Interpolator::CreateObject();
void __thiscall NiBlendPoint3Interpolator::SaveBinary(NiBlendPoint3Interpolator *this, NiStream *kStream); // idb
NiRTTI *NiBlendPoint3Interpolator::GetRTTI();
NiBlendInterpolator *__thiscall NiBlendPoint3Interpolator::CreateClone(NiBlendPoint3Interpolator *this, NiCloningProcess *kCloning);
char __thiscall NiBlendPoint3Interpolator::StoreSingleValue(NiBlendPoint3Interpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiPoint3 *kValue);
char __thiscall NiBlendPoint3Interpolator::BlendValues(NiBlendPoint3Interpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiPoint3 *kValue);
char __thiscall NiBlendPoint3Interpolator::Update(NiBlendPoint3Interpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiPoint3 *kValue);
void __thiscall NiBlendPoint3Interpolator::LoadBinary(NiBlendPoint3Interpolator *this, NiStream *kStream); // idb
bool __thiscall NiBlendPoint3Interpolator::IsEqual(NiBlendPoint3Interpolator *this, NiObject *pkObject); // idb
void __thiscall NiBlendPoint3Interpolator::GetViewerStrings(NiBlendPoint3Interpolator *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiBlendFloatInterpolator::NiBlendFloatInterpolator(NiBlendFloatInterpolator *this, bool bManagerControlled, float fWeightThreshold, char ucArraySize); // idb
int __stdcall NiBlendFloatInterpolator::InterpolatorIsCorrectType(NiInterpolator *pkInterpolator);
NiBlendInterpolator *__cdecl NiBlendFloatInterpolator::CreateObject();
bool __thiscall NiBlendFloatInterpolator::IsEqual(NiBlendFloatInterpolator *this, NiObject *pkObject); // idb
NiRTTI *NiBlendFloatInterpolator::GetRTTI();
NiBlendInterpolator *__thiscall NiBlendFloatInterpolator::CreateClone(NiBlendFloatInterpolator *this, NiCloningProcess *kCloning);
char __thiscall NiBlendFloatInterpolator::StoreSingleValue(NiBlendFloatInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, float *fValue);
char __thiscall NiBlendFloatInterpolator::BlendValues(NiBlendFloatInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, float *fValue);
char __thiscall NiBlendFloatInterpolator::Update(NiBlendFloatInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, float *fValue);
void __thiscall NiBlendFloatInterpolator::LoadBinary(NiBlendFloatInterpolator *this, NiStream *kStream); // idb
void __thiscall NiBlendFloatInterpolator::SaveBinary(NiBlendFloatInterpolator *this, NiStream *kStream); // idb
void __thiscall NiBlendFloatInterpolator::GetViewerStrings(NiBlendFloatInterpolator *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiBlendColorInterpolator::NiBlendColorInterpolator(NiBlendColorInterpolator *this, bool bManagerControlled, float fWeightThreshold, char ucArraySize); // idb
int __stdcall NiBlendColorInterpolator::InterpolatorIsCorrectType(NiInterpolator *pkInterpolator);
NiBlendInterpolator *__cdecl NiBlendColorInterpolator::CreateObject();
void __thiscall NiBlendColorInterpolator::SaveBinary(NiBlendColorInterpolator *this, NiStream *kStream); // idb
NiRTTI *NiBlendColorInterpolator::GetRTTI();
NiBlendInterpolator *__thiscall NiBlendColorInterpolator::CreateClone(NiBlendColorInterpolator *this, NiCloningProcess *kCloning);
char __thiscall NiBlendColorInterpolator::StoreSingleValue(NiBlendColorInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiColorA *kValue);
char __thiscall NiBlendColorInterpolator::BlendValues(NiBlendColorInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiColorA *kValue);
char __thiscall NiBlendColorInterpolator::Update(NiBlendColorInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiColorA *kValue);
void __thiscall NiBlendColorInterpolator::LoadBinary(NiBlendColorInterpolator *this, NiStream *kStream); // idb
bool __thiscall NiBlendColorInterpolator::IsEqual(NiBlendColorInterpolator *this, NiObject *pkObject); // idb
void __thiscall NiBlendColorInterpolator::GetViewerStrings(NiBlendColorInterpolator *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiBlendBoolInterpolator::NiBlendBoolInterpolator(NiBlendBoolInterpolator *this, bool bManagerControlled, float fWeightThreshold, char ucArraySize); // idb
int __stdcall NiBlendBoolInterpolator::InterpolatorIsCorrectType(NiInterpolator *pkInterpolator);
NiBlendInterpolator *__cdecl NiBlendBoolInterpolator::CreateObject();
bool __thiscall NiBlendBoolInterpolator::IsEqual(NiBlendBoolInterpolator *this, NiObject *pkObject); // idb
NiRTTI *NiBlendBoolInterpolator::GetRTTI();
NiBlendInterpolator *__thiscall NiBlendBoolInterpolator::CreateClone(NiBlendBoolInterpolator *this, NiCloningProcess *kCloning);
char __thiscall NiBlendBoolInterpolator::StoreSingleValue(NiBlendBoolInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, bool *bValue);
char __thiscall NiBlendBoolInterpolator::BlendValues(NiBlendBoolInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, bool *bValue);
char __thiscall NiBlendBoolInterpolator::Update(NiBlendBoolInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, bool *bValue);
void __thiscall NiBlendBoolInterpolator::LoadBinary(NiBlendBoolInterpolator *this, NiStream *kStream); // idb
void __thiscall NiBlendBoolInterpolator::SaveBinary(NiBlendBoolInterpolator *this, NiStream *kStream); // idb
void __thiscall NiBlendBoolInterpolator::GetViewerStrings(NiBlendBoolInterpolator *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiBlendAccumTransformInterpolator::~NiBlendAccumTransformInterpolator(NiBlendAccumTransformInterpolator *this); // idb
int __stdcall NiBlendAccumTransformInterpolator::InterpolatorIsCorrectType(NiInterpolator *pkInterpolator);
char __thiscall NiBlendAccumTransformInterpolator::RegisterStreamables(NiBlendTransformInterpolator *this, NiStream *kStream);
void __thiscall NiBlendAccumTransformInterpolator::NiBlendAccumTransformInterpolator(NiBlendAccumTransformInterpolator *this); // idb
unsigned __int8 __thiscall NiBlendAccumTransformInterpolator::AddInterpInfo(NiBlendAccumTransformInterpolator *this, NiInterpolator *pkInterpolator, float fWeight, char cPriority, float fEaseSpinner);
char __thiscall NiBlendAccumTransformInterpolator::GetValue(NiBlendAccumTransformInterpolator *this, NiQuatTransform *kValue);
void __thiscall NiBlendAccumTransformInterpolator::CalculateSingleValue(NiBlendAccumTransformInterpolator *this, float fTime, NiObjectNET *pkInterpTarget); // idb
void __cdecl NiBlendAccumTransformInterpolator::CreateObject();
void __thiscall NiBlendAccumTransformInterpolator::SaveBinary(NiBlendAccumTransformInterpolator *this, NiStream *kStream); // idb
bool __thiscall NiBlendAccumTransformInterpolator::IsEqual(NiBlendAccumTransformInterpolator *this, NiObject *pkObject); // idb
NiPointer<NiInterpolator> *__thiscall NiBlendAccumTransformInterpolator::RemoveInterpInfo(NiBlendAccumTransformInterpolator *this, NiPointer<NiInterpolator> *result, char ucIndex); // idb
char __thiscall NiBlendAccumTransformInterpolator::StoreSingleValue(NiBlendAccumTransformInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiQuatTransform *kValue);
char __thiscall NiBlendAccumTransformInterpolator::BlendValues(NiBlendAccumTransformInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiQuatTransform *kValue);
char __thiscall NiBlendAccumTransformInterpolator::ReallocateArrays(NiBlendAccumTransformInterpolator *this);
void __thiscall NiBlendAccumTransformInterpolator::CalculateValue(NiBlendAccumTransformInterpolator *this, char ucIndex, float fTime, NiObjectNET *pkInterpTarget); // idb
void __thiscall NiBlendAccumTransformInterpolator::CopyMembers(NiBlendAccumTransformInterpolator *this, NiBlendAccumTransformInterpolator *pkDest, NiCloningProcess *kCloning); // idb
void __thiscall NiBlendAccumTransformInterpolator::LoadBinary(NiBlendAccumTransformInterpolator *this, NiStream *kStream); // idb
char __thiscall NiBlendAccumTransformInterpolator::Update(NiBlendAccumTransformInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiQuatTransform *kValue);
NiObject *__thiscall NiBlendAccumTransformInterpolator::CreateClone(NiBlendAccumTransformInterpolator *this, NiCloningProcess *kCloning); // idb
void __thiscall NiBlendAccumTransformInterpolator::GetViewerStrings(NiBlendAccumTransformInterpolator *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiInterpController::CopyMembers(NiInterpController *this, NiInterpController *pkDest, NiCloningProcess *kCloning); // idb
char __thiscall NiPSysResetOnLoopCtlr::RegisterStreamables(NiPSysUpdateCtlr *this, NiStream *kStream);
void __thiscall NiInterpController::NiInterpController(NiInterpController *this); // idb
NiRTTI *NiInterpController::GetRTTI();
void __thiscall NiInterpController::ResetTimeExtrema(NiInterpController *this); // idb
void __thiscall NiInterpController::LoadBinary(NiInterpController *this, NiStream *kStream); // idb
void __thiscall NiInterpController::GetViewerStrings(NiInterpController *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiBlendInterpolator::NiBlendInterpolator(NiBlendInterpolator *this); // idb
char __thiscall NiBlendInterpolator::GetHighestWeightedIndex(NiBlendInterpolator *this); // idb
NiRTTI *NiBlendInterpolator::GetRTTI();
char __thiscall NiBlendInterpolator::AddInterpInfo(NiBlendInterpolator *this, NiInterpolator *pkInterpolator, float fWeight, char cPriority, float fEaseSpinner); // idb
void __thiscall NiBlendInterpolator::ComputeNormalizedWeightsFor2(NiBlendInterpolator *this); // idb
void __thiscall NiBlendInterpolator::Collapse(NiBlendInterpolator *this); // idb
void __thiscall NiBlendInterpolator::GuaranteeTimeRange(NiBlendInterpolator *this, float fStartTime, float fEndTime); // idb
void __thiscall NiBlendInterpolator::ProcessClone(NiBlendInterpolator *this, NiCloningProcess *kCloning); // idb
char __thiscall NiBlendInterpolator::InterpArrayItem::IsEqual(NiBlendInterpolator::InterpArrayItem *this, NiBlendInterpolator::InterpArrayItem *kDest);
char __thiscall NiBlendInterpolator::RegisterStreamables(NiBlendInterpolator *this, NiStream *kStream);
char __thiscall NiBlendInterpolator::IsEqual(NiBlendInterpolator *this, NiObject *pkObject);
void __thiscall NiBlendInterpolator::~NiBlendInterpolator(NiBlendInterpolator *this); // idb
NiPointer<NiInterpolator> *__thiscall NiBlendInterpolator::RemoveInterpInfo(NiBlendInterpolator *this, NiPointer<NiInterpolator> *result, char ucIndex); // idb
void __thiscall NiBlendInterpolator::ComputeNormalizedWeights(NiBlendInterpolator *this); // idb
void __thiscall NiBlendInterpolator::NiBlendInterpolator(NiBlendInterpolator *this, bool bManagerControlled, float fWeightThreshold, char ucArraySize); // idb
NiBlendQuaternionInterpolator *__thiscall NiBlendBoolInterpolator::`vector deleting destructor'(NiBlendQuaternionInterpolator *this, unsigned int a2);
char __thiscall NiBlendInterpolator::ReallocateArrays(NiBlendInterpolator *this);
void __thiscall NiBlendInterpolator::CopyMembers(NiBlendInterpolator *this, NiBlendInterpolator *pkDest, NiCloningProcess *kCloning); // idb
void __thiscall NiBlendInterpolator::InterpArrayItem::LoadBinary(NiBlendInterpolator::InterpArrayItem *this, NiStream *kStream); // idb
void __thiscall NiBlendInterpolator::InterpArrayItem::SaveBinary(NiBlendInterpolator::InterpArrayItem *this, NiStream *kStream); // idb
void __thiscall NiBlendInterpolator::LoadBinary(NiBlendInterpolator *this, NiStream *kStream); // idb
void __thiscall NiBlendInterpolator::SaveBinary(NiBlendInterpolator *this, NiStream *kStream); // idb
void __thiscall NiBlendInterpolator::GetViewerStrings(NiBlendInterpolator *this, NiTArray<char *> *pkStrings); // idb
unsigned int *__stdcall NiGeometryGroupManager::CreateGroup(CBaseObject *pObject);
int __thiscall NiSingleInterpController::TargetIsRequiredType(NiSingleInterpController *this);
void __thiscall NiSingleInterpController::NiSingleInterpController(NiSingleInterpController *this); // idb
NiRTTI *NiSingleInterpController::GetRTTI();
NiInterpolator *__thiscall NiSingleInterpController::GetInterpolator(NiSingleInterpController *this, unsigned __int16 usIndex); // idb
void __thiscall NiSingleInterpController::SetInterpolator(NiSingleInterpController *this, NiInterpolator *pkInterpolator, unsigned __int16 usIndex); // idb
void __thiscall NiSingleInterpController::GuaranteeTimeRange(NiSingleInterpController *this, float fStartTime, float fEndTime); // idb
void __thiscall NiSingleInterpController::ResetTimeExtrema(NiSingleInterpController *this); // idb
void __thiscall NiSingleInterpController::CopyMembers(NiSingleInterpController *this, NiSingleInterpController *pkDest, NiCloningProcess *kCloning); // idb
void __thiscall NiSingleInterpController::ProcessClone(NiSingleInterpController *this, NiCloningProcess *kCloning); // idb
void __thiscall NiSingleInterpController::LoadBinary(NiSingleInterpController *this, NiStream *kStream); // idb
void __thiscall NiSingleInterpController::LinkObject(NiSingleInterpController *this, NiStream *kStream); // idb
char __thiscall NiSingleInterpController::RegisterStreamables(NiSingleInterpController *this, NiStream *kStream);
void __thiscall NiSingleInterpController::SaveBinary(NiSingleInterpController *this, NiStream *kStream); // idb
char __thiscall NiSingleInterpController::IsEqual(NiSingleInterpController *this, NiObject *pkObject);
NiVisController *__thiscall NiSingleInterpController::`vector deleting destructor'(NiVisController *this, unsigned int a2);
void __thiscall NiSingleInterpController::GetViewerStrings(NiSingleInterpController *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiQuatTransform::Invert(NiQuatTransform *this, NiQuatTransform *kDest); // idb
void __thiscall NiQuatTransform::HierInvert(NiQuatTransform *this, NiQuatTransform *kDest); // idb
NiQuatTransform *__thiscall NiQuatTransform::HierApply(NiQuatTransform *this, NiQuatTransform *result, NiQuatTransform *kTransform); // idb
NiQuatTransform *__thiscall NiQuatTransform::operator*(NiQuatTransform *this, NiQuatTransform *result, NiQuatTransform *kTransform); // idb
void __thiscall NiQuatTransform::SaveBinary(NiQuatTransform *this, NiStream *kStream); // idb
void __thiscall NiQuatTransform::LoadBinary(NiQuatTransform *this, NiStream *kStream); // idb
void __thiscall NiQuatTransform::GetViewerStrings(NiQuatTransform *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiInterpolator::NiInterpolator(NiInterpolator *this); // idb
void __thiscall NiInterpolator::~NiInterpolator(NiInterpolator *this); // idb
bool __stdcall NsFNC_125::MakeNode(NiD3DShaderConstantMapEntry *__formal, const void *__formala, unsigned int _pNsTextCode_);
void __stdcall NiInterpolator::GetActiveTimeRange(float *fBeginKeyTime, float *fEndKeyTime);
NiObject *__thiscall NiInterpolator::GetSequenceInterpolator(NiInterpolator *this, float fStartTime, float fEndTime);
void __thiscall NiLODData::LoadBinary(NiRenderTargetGroup *this, NiStream *kStream); // idb
NiRTTI *NiInterpolator::GetRTTI();
NiInterpolator *__thiscall NiInterpolator::`vector deleting destructor'(NiInterpolator *this, unsigned int a2);
void __thiscall NiInterpolator::GetViewerStrings(NiInterpolator *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiFloatInterpController::CreatePoseInterpolator(NiFloatInterpController *this, unsigned __int16 usIndex);
void __stdcall NiPSysModifierFloatCtlr::CreateBlendInterpolator(unsigned __int16 usIndex, bool bManagerControlled, bool bAccumulateAnimations, float fWeightThreshold, char ucArraySize);
void __thiscall NiPoint3InterpController::LoadBinary(NiPoint3InterpController *this, NiStream *kStream); // idb
void __thiscall NiFloatInterpController::NiFloatInterpController(NiFloatInterpController *this); // idb
NiRTTI *NiFloatInterpController::GetRTTI();
void __thiscall NiFloatInterpController::SynchronizePoseInterpolator(NiFloatInterpController *this, NiInterpolator *pkInterp, unsigned __int16 usIndex); // idb
void __thiscall NiFloatInterpController::GetViewerStrings(NiFloatInterpController *this, NiTArray<char *> *pkStrings); // idb
void __stdcall NiPoint3InterpController::CreateBlendInterpolator(unsigned __int16 usIndex, bool bManagerControlled, bool bAccumulateAnimations, float fWeightThreshold, char ucArraySize);
int __stdcall NiFloatsExtraDataPoint3Controller::InterpolatorIsCorrectType(NiInterpolator *pkInterpolator, unsigned __int16 usIndex);
char __thiscall NiTransformController::RegisterStreamables(NiPSysModifierCtlr *this, NiStream *kStream);
char __thiscall NiBoolInterpController::IsEqual(NiPoint3InterpController *this, NiObject *pkObject);
void __thiscall NiPoint3InterpController::CreatePoseInterpolator(NiPoint3InterpController *this, unsigned __int16 usIndex);
void __thiscall NiPoint3InterpController::NiPoint3InterpController(NiPoint3InterpController *this); // idb
NiRTTI *NiPoint3InterpController::GetRTTI();
void __thiscall NiPoint3InterpController::SynchronizePoseInterpolator(NiPoint3InterpController *this, NiInterpolator *pkInterp, unsigned __int16 usIndex); // idb
void __thiscall NiPoint3InterpController::GetViewerStrings(NiPoint3InterpController *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiBoolInterpController::CreatePoseInterpolator(NiBoolInterpController *this, unsigned __int16 usIndex);
void __stdcall NiPSysModifierBoolCtlr::CreateBlendInterpolator(unsigned __int16 usIndex, bool bManagerControlled, bool bAccumulateAnimations, float fWeightThreshold, char ucArraySize);
int __stdcall NiBoolInterpController::InterpolatorIsCorrectType(NiInterpolator *pkInterpolator, unsigned __int16 usIndex);
void __thiscall NiPoint3InterpController::CopyMembers(NiPoint3InterpController *this, NiPoint3InterpController *pkDest, NiCloningProcess *kCloning); // idb
void __thiscall NiBoolInterpController::NiBoolInterpController(NiBoolInterpController *this); // idb
NiRTTI *NiBoolInterpController::GetRTTI();
void __thiscall NiBoolInterpController::SynchronizePoseInterpolator(NiBoolInterpController *this, NiInterpolator *pkInterp, unsigned __int16 usIndex); // idb
void __thiscall NiBoolInterpController::GetViewerStrings(NiBoolInterpController *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiKeyBasedInterpolator::NiKeyBasedInterpolator(NiKeyBasedInterpolator *this); // idb
void __thiscall NiKeyBasedInterpolator::~NiKeyBasedInterpolator(NiKeyBasedInterpolator *this); // idb
void __thiscall NiBackToFrontAccumulator::LoadBinary(NiBackToFrontAccumulator *this, NiStream *kStream); // idb
void __thiscall NiDefaultAVObjectPalette::LinkObject(NiScreenLODData *this, NiStream *kStream); // idb
bool __thiscall NiKeyBasedInterpolator::IsEqual(NiKeyBasedInterpolator *this, NiObject *pkOther); // idb
NiRTTI *NiKeyBasedInterpolator::GetRTTI();
NiKeyBasedInterpolator *__thiscall NiKeyBasedInterpolator::`vector deleting destructor'(NiKeyBasedInterpolator *this, unsigned int a2);
NiAnimationKey *__thiscall NiKeyBasedInterpolator::GetKeyAt(NiKeyBasedInterpolator *this, unsigned int uiWhichKey, int usChannel);
void __thiscall NiKeyBasedInterpolator::GetActiveTimeRange(NiKeyBasedInterpolator *this, float *fBeginKeyTime, float *fEndKeyTime); // idb
void __thiscall NiKeyBasedInterpolator::GetViewerStrings(NiKeyBasedInterpolator *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiFloatController::LoadBinary(NiFloatController *this, NiStream *stream); // idb
void __thiscall NiFloatController::~NiFloatController(NiFloatController *this); // idb
NiFloatKey *__thiscall NiFloatController::GetAnim(NiFloatController *this, unsigned int *uiNumKeys, NiAnimationKey::KeyType *eType, char *ucSize); // idb
void __thiscall NiFloatController::ProcessClone(NiFloatController *this, NiCloningProcess *kCloning); // idb
void __thiscall NiFloatController::LinkObject(NiFloatController *this, NiStream *stream); // idb
char __thiscall NiFloatController::RegisterStreamables(NiFloatController *this, NiStream *stream);
void __thiscall NiFloatController::SaveBinary(NiFloatController *this, NiStream *stream); // idb
bool __thiscall NiFloatController::IsEqual(NiFloatController *this, NiObject *pObject); // idb
void __thiscall NiFloatController::CopyMembers(NiFloatController *this, NiFloatController *pDest, NiCloningProcess *kCloning); // idb
void __thiscall NiFloatController::GetViewerStrings(NiFloatController *this, NiTArray<char *> *pStrings); // idb
ID3DXConstantTable *__thiscall NiExtraDataController::GetCtlrID(NiD3DHLSLVertexShader *this); // idb
void __thiscall NiPSysModifierCtlr::LoadBinary(NiPSysModifierCtlr *this, NiStream *kStream); // idb
void __thiscall NiPoint3InterpController::LinkObject(NiPSysModifierCtlr *this, NiStream *kStream); // idb
bool __thiscall NiExtraDataController::RegisterStreamables(NiExtraDataController *this, NiStream *kStream); // idb
void __thiscall NiPSysModifierCtlr::SaveBinary(NiPSysModifierCtlr *this, NiStream *kStream); // idb
void __thiscall NiPSysModifierCtlr::CopyMembers(NiPSysModifierCtlr *this, NiPSysModifierCtlr *pkDest, NiCloningProcess *kCloning); // idb
void __thiscall NiExtraDataController::ProcessClone(NiExtraDataController *this, NiCloningProcess *kCloning); // idb
char __thiscall NiExtraDataController::IsEqual(NiExtraDataController *this, NiObject *pkObject);
void __thiscall NiExtraDataController::GetExtraDataPointerFromName(NiExtraDataController *this); // idb
NiRTTI *NiExtraDataController::GetRTTI();
void __thiscall NiExtraDataController::NiExtraDataController(NiExtraDataController *this); // idb
void __thiscall NiExtraDataController::~NiExtraDataController(NiExtraDataController *this); // idb
void __thiscall NiExtraDataController::SetTarget(NiExtraDataController *this, NiObjectNET *pkTarget); // idb
char __thiscall NiExtraDataController::InterpTargetIsCorrectType(NiExtraDataController *this, NiObjectNET *pkTarget);
void __thiscall NiExtraDataController::PostLinkObject(NiExtraDataController *this, NiStream *kStream); // idb
void __thiscall NiExtraDataController::GetViewerStrings(NiExtraDataController *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiBSplineInterpolator::GetActiveTimeRange(NiBSplineInterpolator *this, float *fBeginTime, float *fEndTime); // idb
int __thiscall NiBSplineInterpolator::GetAllocatedSize(NiBSplineInterpolator *this, int usChannel);
unsigned int __thiscall NiBSplineInterpolator::GetControlPointCount(NiBSplineInterpolator *this, int usChannel);
char __thiscall NiBSplineInterpolator::RegisterStreamables(NiBSplineInterpolator *this, NiStream *kStream);
char __thiscall NiBSplineInterpolator::IsEqual(NiBSplineInterpolator *this, NiObject *pkOther);
void __thiscall NiBSplineInterpolator::NiBSplineInterpolator(NiBSplineInterpolator *this, NiBSplineData *pkData, NiBSplineBasisData *pkBasisData); // idb
NiRTTI *NiBSplineInterpolator::GetRTTI();
void __thiscall NiBSplineInterpolator::~NiBSplineInterpolator(NiBSplineInterpolator *this); // idb
void __thiscall NiBSplineInterpolator::CopyMembers(NiBSplineInterpolator *this, NiBSplineInterpolator *pkDest, NiCloningProcess *kCloning); // idb
void __thiscall NiBSplineInterpolator::LoadBinary(NiBSplineInterpolator *this, NiStream *kStream); // idb
void __thiscall NiBSplineInterpolator::SaveBinary(NiBSplineInterpolator *this, NiStream *kStream); // idb
NiBSplineInterpolator *__thiscall NiBSplineInterpolator::`vector deleting destructor'(NiBSplineInterpolator *this, unsigned int a2);
void __thiscall NiBSplineInterpolator::GetViewerStrings(NiBSplineInterpolator *this, NiTArray<char *> *pkStrings); // idb
NiTArray<NiCollisionGroup::Record *> *__thiscall NiTArray<NiCollisionGroup::Record *>::`scalar deleting destructor'(NiTArray<NiCollisionGroup::Record *> *this, unsigned int a2);
void __thiscall NiCollisionGroup::NiCollisionGroup(NiCollisionGroup *this); // idb
void __thiscall NiCollisionGroup::~NiCollisionGroup(NiCollisionGroup *this); // idb
void __thiscall NiCollisionGroup::Remove(NiCollisionGroup *this, NiAVObject *pkObject); // idb
void __thiscall NiCollisionGroup::RemoveCollider(NiCollisionGroup *this, NiAVObject *pkObject); // idb
void __thiscall NiCollisionGroup::RemoveCollidee(NiCollisionGroup *this, NiAVObject *pkObject); // idb
void __thiscall NiCollisionGroup::RemoveAll(NiCollisionGroup *this); // idb
void __thiscall NiCollisionGroup::FindCollisions(NiCollisionGroup *this, float fDeltaTime); // idb
void __stdcall NiCollisionGroup::Add(NiAVObject *pkObject, NiTArray<NiCollisionGroup::Record *> *kBin, bool bCreateCollisionData, int iMaxDepth, int iBinSize);
void __thiscall NiCollisionGroup::AddCollider(NiCollisionGroup *this, NiAVObject *pkObject, bool bCreateCollisionData, int iMaxDepth, int iBinSize); // idb
void __thiscall NiCollisionGroup::AddCollidee(NiCollisionGroup *this, NiAVObject *pkObject, bool bCreateCollisionData, int iMaxDepth, int iBinSize); // idb
void __cdecl NiCollisionSDM::Init(); // idb
void __cdecl NiCollisionSDM::Shutdown(); // idb
void NiCollisionSDM::NiCollisionSDM();
bool __thiscall NiCollisionData::RegisterStreamables(NiCollisionData *this, NiStream *kStream); // idb
void __thiscall NiCollisionData::NiCollisionData(NiCollisionData *this, NiAVObject *pkSceneObject); // idb
NiRTTI *NiCollisionData::GetRTTI();
void __thiscall NiCollisionData::NiCollisionData(NiCollisionData *this); // idb
void __thiscall NiCollisionData::~NiCollisionData(NiCollisionData *this); // idb
int __thiscall NiCollisionData::FindOBBCollisions(NiCollisionData *this, float fDeltaTime, NiCollisionData *pkTestData, NiAVObject *pThisRoot, NiAVObject *pOtherRoot, NiAVObject *pThisObj, NiAVObject *pOtherObj, int iMaxDepth, int iTestMaxDepth, bool *bCollision); // idb
void __thiscall NiCollisionData::SetModelSpaceABV(NiCollisionData *this, NiBoundingVolume *pkBV); // idb
void __thiscall NiCollisionData::Initialize(NiCollisionData *this, void *pkData); // idb
char *__stdcall NiCollisionData::GetViewerString(const char *pcPrefix, NiCollisionData::CollisionMode eMode);
char *__stdcall NiCollisionData::GetViewerString(const char *pcPrefix, NiCollisionData::PropagationMode eMode);
void __cdecl NiCollisionData::CreateObject();
NiCollisionData *__thiscall NiCollisionData::`vector deleting destructor'(NiCollisionData *this, unsigned int a2);
NiNode *__stdcall NiCollisionData::FindAncestorWithCollisionData(NiAVObject *pkObj);
void __thiscall NiCollisionData::UpdateWorldData(NiCollisionData *this); // idb
int __thiscall NiCollisionData::FindCollisionProcessing(NiCollisionData *this, NiCollisionGroup::Intersect *kIntr, NiCollisionData::PropagationMode ePropagationMode1, NiCollisionData::PropagationMode ePropagationMode2); // idb
void __thiscall NiCollisionData::CreateWorldVertices(NiCollisionData *this); // idb
void __thiscall NiCollisionData::UpdateWorldVertices(NiCollisionData *this); // idb
char __thiscall NiCollisionData::GetWorldTriangle(NiCollisionData *this, unsigned __int16 usTriangle, NiPoint3 **pkP0, NiPoint3 **pkP1, NiPoint3 **pkP2);
signed int __cdecl NiCollisionData::GetCollisionTestType(NiAVObject *pkObj1, NiAVObject *pkObj2);
char __thiscall NiCollisionData::IsEqual(NiCollisionData *this, NiObject *pkObject);
void __cdecl NiCollisionData::SetPrecacheAttributes(NiAVObject *pkObj, NiCollisionData::CollisionMode eMode); // idb
void __thiscall NiCollisionData::SetSceneGraphObject(NiCollisionData *this, NiAVObject *pkSceneObject); // idb
void __thiscall NiCollisionData::CreateOBB(NiCollisionData *this, int iBinSize); // idb
void __thiscall NiCollisionData::Convert(NiCollisionData *this, unsigned int uiVersion, void *pkData); // idb
void __thiscall NiCollisionData::GetViewerStrings(NiCollisionData *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiCollisionData::AddViewerStrings(NiCollisionData *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiCollisionData::LoadBinary(NiCollisionData *this, NiStream *kStream); // idb
void __thiscall NiCollisionData::LinkObject(NiCollisionData *this, NiStream *kStream); // idb
void __thiscall NiCollisionData::SaveBinary(NiCollisionData *this, NiStream *kStream); // idb
NiCollisionObject *__thiscall NiCollisionData::CreateClone(NiCollisionData *this, NiCloningProcess *kCloning);
BOOL __thiscall NiSphereBV::operator==(NiSphereBV *this, NiBoundingVolume *kABV);
void __thiscall NiSphereBV::LoadBinary(NiSphereBV *this, NiStream *kStream); // idb
void __thiscall NiSphereBV::SaveBinary(NiSphereBV *this, NiStream *kStream); // idb
int std::basic_streambuf<char,std::char_traits<char>>::underflow();
void __thiscall NiSphereBV::NiSphereBV(NiSphereBV *this, const float fRadius, NiPoint3 *kCenter); // idb
void __thiscall NiSphereBV::Copy(NiSphereBV *this, NiBoundingVolume *kABV); // idb
void __thiscall NiSphereBV::UpdateWorldData(NiSphereBV *this, NiBoundingVolume *kModelABV, NiTransform *kWorld); // idb
BOOL __cdecl NiSphereBV::SphereSphereTestIntersect(float fTime, NiBoundingVolume *kABV0, NiPoint3 *kV0, NiBoundingVolume *kABV1, NiPoint3 *kV1);
bool __cdecl NiSphereBV::SphereSphereFindIntersect(float fTime, NiBoundingVolume *kABV0, NiPoint3 *kV0, NiBoundingVolume *kABV1, NiPoint3 *kV1, float *fIntrTime, NiPoint3 *kIntrPt, bool bCalcNormals, NiPoint3 *kNormal0, NiPoint3 *kNormal1); // idb
NiBoundingVolume *__cdecl NiSphereBV::CreateFromStream(NiStream *kStream); // idb
NiBoundingVolume *NiSphereBV::Create();
BOOL __cdecl NiSphereBV::SphereTriTestIntersect(float fTime, NiBoundingVolume *kABV0, NiPoint3 *kV0, NiPoint3 *kVert0, NiPoint3 *kVert1, NiPoint3 *kVert2, NiPoint3 *kV1);
char __cdecl NiSphereBV::SphereTriFindIntersect(float fTime, NiBoundingVolume *kABV0, NiPoint3 *kV0, NiPoint3 *kVert0, NiPoint3 *kVert1, NiPoint3 *kVert2, NiPoint3 *kV1, float *fIntrTime, NiPoint3 *kIntrPt, bool bCalcNormals, NiPoint3 *kNormal0, NiPoint3 *kNormal1);
NiBoundingVolume *__thiscall NiSphereBV::Clone(NiSphereBV *this); // idb
NiBoundingVolume *__cdecl NiSphereBV::ConvertLozengeToSphereBoundingVolume(NiStream *kStream); // idb
void __thiscall NiSphereBV::AddViewerStrings(NiSphereBV *this, const char *pcPrefix, NiTArray<char *> *pkStrings); // idb
char __cdecl NiCollisionTraversals::ShouldPropagationOccur(NiCollisionData::PropagationMode ePropagation, bool bCollisionSuccess);
int __cdecl NiCollisionTraversals::Find_TRIvsABV(float fDeltaTime, NiAVObject *pkObj1, NiAVObject *pkObj2, bool bCalcNormals, NiCollisionGroup::Intersect *kIntr, bool *bCollision); // idb
void __thiscall NiPick::Record::Record(NiPick::Record *this, NiAVObject *pObject); // idb
void __cdecl NiCollisionTraversals::CreateCollisionData(NiAVObject *pkRoot, NiCollisionData::CollisionMode eCollision); // idb
int __cdecl NiCollisionTraversals::BoundsTestCheck(float fDeltaTime, NiAVObject *pkObj1, NiAVObject *pkObj2, NiCollisionData::CollisionTest eCollisionTest); // idb
int __cdecl NiCollisionTraversals::FindCollisionDataAndCollisions(float fDeltaTime, NiCollisionGroup::Record *kRecord0, NiCollisionGroup::Record *kRecord1); // idb
int __cdecl NiCollisionTraversals::FindCollisionsForRecord0(NiNode *pkNode, float fDeltaTime, NiCollisionGroup::Record *kRecord0, NiCollisionGroup::Record *kRecord1); // idb
int __cdecl NiCollisionTraversals::FindCollisionsForRecord1(NiNode *pkNode, float fDeltaTime, NiCollisionGroup::Record *kRecord0, NiCollisionGroup::Record *kRecord1); // idb
NiRTTI *__cdecl NiCollisionTraversals::PropagateCollisions(float fDeltaTime, NiCollisionGroup::Record *kRecord0, NiCollisionGroup::Record *kRecord1, bool bCollisionSuccess);
int __cdecl NiCollisionTraversals::Find_OBBvsOBB(float fDeltaTime, NiAVObject *pkObj1, NiAVObject *pkObj2, NiCollisionGroup::Record *kRecord0, NiCollisionGroup::Record *kRecord1, bool *bCollision); // idb
int __cdecl NiCollisionTraversals::Find_OBBvsABV(float fDeltaTime, NiAVObject *pkObj1, NiAVObject *pkObj2, NiCollisionGroup::Record *kRecord0, NiCollisionGroup::Record *kRecord1, bool bNormals, NiCollisionGroup::Intersect *kIntr, bool *bCollision); // idb
int __cdecl NiCollisionTraversals::Find_TRIvsTRI(float fDeltaTime, NiAVObject *pkObj1, NiAVObject *pkObj2, bool bNormals, NiCollisionGroup::Intersect *kIntr, bool *bCollision); // idb
int __cdecl NiCollisionTraversals::Find_NIBOUNDvsNIBOUND(float fDeltaTime, NiAVObject *pkObj1, NiAVObject *pkObj2, int bCalcNormals, NiCollisionGroup::Intersect *kIntr, bool *bCollision);
int __cdecl NiCollisionTraversals::HandleCollisions(float fDeltaTime, NiCollisionGroup::Record *kRecord0, NiCollisionGroup::Record *kRecord1, NiCollisionGroup::Intersect *kIntr, bool *bCollision); // idb
NiRTTI *__cdecl NiCollisionTraversals::FindCollisions(float fDeltaTime, NiCollisionGroup::Record *kRecord0, NiCollisionGroup::Record *kRecord1);
NiSphereBV *__cdecl NiCollisionConvert::ConvertToSphereBV_Fast(float fRadius, NiPoint3 *kCenter);
NiBoundingVolume *__cdecl NiCollisionConvert::ConvertToSphereBV_Safe(float fRadius, NiPoint3 *kCenter); // idb
void __cdecl NiCollisionConvert::ConvertToBoxBV(unsigned __int16 usQuantity, NiPoint3 *pkVertex);
int __cdecl NiBoundingVolume::TestIntersect(float fTime, NiBoundingVolume *kBV0, NiPoint3 *kVel0, NiBoundingVolume *kBV1, NiPoint3 *kVel1);
int __cdecl NiBoundingVolume::FindIntersect(float fTime, NiBoundingVolume *kBV0, NiPoint3 *kVel0, NiBoundingVolume *kBV1, NiPoint3 *kVel1, float *fIntrTime, NiPoint3 *kIntrPt, int bCalcNormals, NiPoint3 *kNormal0, NiPoint3 *kNormal1);
int __cdecl NiBoundingVolume::TestTriIntersect(float fTime, NiBoundingVolume *kBV0, NiPoint3 *kVel0, NiPoint3 *kVert0, NiPoint3 *kVert1, NiPoint3 *kVert2, NiPoint3 *kVel1);
int __cdecl NiBoundingVolume::FindTriIntersect(float fTime, NiBoundingVolume *kBV0, NiPoint3 *kVel0, NiPoint3 *kVert0, NiPoint3 *kVert1, NiPoint3 *kVert2, NiPoint3 *kVel1, float *fIntrTime, NiPoint3 *kIntrPt, int bCalcNormals, NiPoint3 *kNormal0, NiPoint3 *kNormal1);
NiBoundingVolume *__cdecl NiBoundingVolume::ConvertToBoxBV();
NiBoundingVolume *__cdecl NiBoundingVolume::ConvertToSphereBV_Fast(NiBound *kBound); // idb
NiBoundingVolume *__cdecl NiBoundingVolume::ConvertToSphereBV_Safe(NiBound *kBound); // idb
NiBoundingVolume *__cdecl NiBoundingVolume::CreateFromStream(NiStream *kStream); // idb
void __thiscall NiBoundingVolume::SaveBinary(NiBoundingVolume *this, NiStream *kStream); // idb
bool __thiscall NiSphereBV::operator!=(NiUnionBV *this, NiBoundingVolume *kABV); // idb
void __thiscall NiHalfSpaceBV::LoadBinary(NiHalfSpaceBV *this, NiStream *kStream); // idb
void __thiscall NiHalfSpaceBV::SaveBinary(NiHalfSpaceBV *this, NiStream *kStream); // idb
void __thiscall NiHalfSpaceBV::Copy(NiHalfSpaceBV *this, NiBoundingVolume *kABV); // idb
BOOL __thiscall NiHalfSpaceBV::operator==(NiHalfSpaceBV *this, NiBoundingVolume *kABV);
void __thiscall NiHalfSpaceBV::UpdateWorldData(NiHalfSpaceBV *this, NiBoundingVolume *kModelABV, NiTransform *kWorld); // idb
bool __cdecl NiHalfSpaceBV::HalfSpaceSphereTestIntersect(float fTime, NiBoundingVolume *kABV0, NiPoint3 *kV0, NiBoundingVolume *kABV1, NiPoint3 *kV1); // idb
bool __cdecl NiHalfSpaceBV::HalfSpaceBoxTestIntersect(float fTime, NiBoundingVolume *kABV0, NiPoint3 *kV0, NiBoundingVolume *kABV1, NiPoint3 *kV1); // idb
bool __cdecl NiHalfSpaceBV::HalfSpaceCapsuleTestIntersect(float fTime, NiBoundingVolume *kABV0, NiPoint3 *kV0, NiBoundingVolume *kABV1, NiPoint3 *kV1); // idb
bool __cdecl NiHalfSpaceBV::HalfSpaceHalfSpaceTestIntersect(float fTime, NiBoundingVolume *kABV0, NiPoint3 *kV0, NiBoundingVolume *kABV1, NiPoint3 *kV1); // idb
bool __cdecl NiHalfSpaceBV::HalfSpaceTriTestIntersect(float fTime, NiBoundingVolume *kABV0, NiPoint3 *kV0, NiPoint3 *kVert0, NiPoint3 *kVert1, NiPoint3 *kVert2, NiPoint3 *kV1); // idb
char __cdecl NiHalfSpaceBV::HalfSpaceSphereFindIntersect(float fTime, NiBoundingVolume *kABV0, NiPoint3 *kV0, NiBoundingVolume *kABV1, NiPoint3 *kV1, float *fIntrTime, NiPoint3 *kIntrPt, bool bCalcNormals, NiPoint3 *kNormal0, NiPoint3 *kNormal1);
char __cdecl NiHalfSpaceBV::HalfSpaceBoxFindIntersect(float fTime, NiBoundingVolume *kABV0, NiPoint3 *kV0, NiBoundingVolume *kABV1, NiPoint3 *kV1, float *fIntrTime, NiPoint3 *kIntrPt, bool bCalcNormals, NiPoint3 *kNormal0, NiPoint3 *kNormal1);
char __cdecl NiHalfSpaceBV::HalfSpaceCapsuleFindIntersect(float fTime, NiBoundingVolume *kABV0, NiPoint3 *kV0, NiBoundingVolume *kABV1, NiPoint3 *kV1, float *fIntrTime, NiPoint3 *kIntrPt, bool bCalcNormals, NiPoint3 *kNormal0, NiPoint3 *kNormal1);
char __cdecl NiHalfSpaceBV::HalfSpaceHalfSpaceFindIntersect(float fTime, NiBoundingVolume *kABV0, NiPoint3 *kV0, NiBoundingVolume *kABV1, NiPoint3 *kV1, float *fIntrTime, NiPoint3 *kIntrPt, bool bCalcNormals, NiPoint3 *kNormal0, NiPoint3 *kNormal1);
char __cdecl NiHalfSpaceBV::HalfSpaceTriFindIntersect(float fTime, NiBoundingVolume *kABV0, NiPoint3 *kV0, NiPoint3 *kVert0, NiPoint3 *kVert1, NiPoint3 *kVert2, NiPoint3 *kV1, float *fIntrTime, NiPoint3 *kIntrPt, bool bCalcNormals, NiPoint3 *kNormal0, NiPoint3 *kNormal1);
void __thiscall NiHalfSpaceBV::NiHalfSpaceBV(NiHalfSpaceBV *this, NiHalfSpaceBV *kABV); // idb
void __thiscall NiHalfSpaceBV::NiHalfSpaceBV(NiHalfSpaceBV *this, NiPoint3 *kPoint, NiPoint3 *kNormal); // idb
void NiHalfSpaceBV::Create();
void __thiscall NiHalfSpaceBV::Clone(NiHalfSpaceBV *this);
NiBoundingVolume *__cdecl NiHalfSpaceBV::CreateFromStream(NiStream *kStream); // idb
void __stdcall NiHalfSpaceBV::AddViewerStrings(const char *pcPrefix, NiTArray<char *> *pkStrings);
NiTArray<NiBoundingVolume *> *__thiscall NiTArray<NiBoundingVolume *>::`vector deleting destructor'(NiTArray<NiBoundingVolume *> *this, unsigned int a2);
void __thiscall NiUnionBV::NiUnionBV(NiUnionBV *this); // idb
void __thiscall NiUnionBV::NiUnionBV(NiUnionBV *this, NiUnionBV *kABV); // idb
void __thiscall NiUnionBV::RemoveAllBoundingVolumes(NiUnionBV *this); // idb
NiUnionBV *__thiscall NiUnionBV::Create(NiUnionBV *this);
void __thiscall NiUnionBV::Copy(NiUnionBV *this, NiBoundingVolume *kABV); // idb
char __thiscall NiUnionBV::operator==(NiUnionBV *this, NiBoundingVolume *kABV);
void __thiscall NiUnionBV::UpdateWorldData(NiUnionBV *this, NiBoundingVolume *kModelABV, NiTransform *kWorld); // idb
char __cdecl NiUnionBV::UnionOtherTestIntersect(float fTime, NiBoundingVolume *kABV0, NiPoint3 *kV0, NiBoundingVolume *kABV1, NiPoint3 *kV1);
char __cdecl NiUnionBV::UnionUnionTestIntersect(float fTime, NiBoundingVolume *kABV0, NiPoint3 *kV0, NiBoundingVolume *kABV1, NiPoint3 *kV1);
char __cdecl NiUnionBV::UnionTriTestIntersect(float fTime, NiBoundingVolume *kABV0, NiPoint3 *kV0, NiPoint3 *kVert0, NiPoint3 *kVert1, NiPoint3 *kVert2, NiPoint3 *kV1);
char __cdecl NiUnionBV::UnionOtherFindIntersect(float fTime, NiBoundingVolume *kABV0, NiPoint3 *kV0, NiBoundingVolume *kABV1, NiPoint3 *kV1, float *fIntrTime, NiPoint3 *kIntrPt, int bCalcNormals, NiPoint3 *kNormal0, NiPoint3 *kNormal1);
char __cdecl NiUnionBV::UnionUnionFindIntersect(float fTime, NiBoundingVolume *kABV0, NiPoint3 *kV0, NiBoundingVolume *kABV1, NiPoint3 *kV1, float *fIntrTime, NiPoint3 *kIntrPt, int bCalcNormals, NiPoint3 *kNormal0, NiPoint3 *kNormal1);
char __cdecl NiUnionBV::UnionTriFindIntersect(float fTime, NiBoundingVolume *kABV0, NiPoint3 *kV0, NiPoint3 *kVert0, NiPoint3 *kVert1, NiPoint3 *kVert2, NiPoint3 *kV1, float *fIntrTime, NiPoint3 *kIntrPt, int bCalcNormals, NiPoint3 *kNormal0, NiPoint3 *kNormal1);
void __thiscall NiUnionBV::Clone(NiUnionBV *this);
NiBoundingVolume *__cdecl NiUnionBV::CreateFromStream(NiStream *stream); // idb
void __thiscall NiUnionBV::AddBoundingVolume(NiUnionBV *this, NiBoundingVolume *pkABV); // idb
void __thiscall NiUnionBV::SaveBinary(NiUnionBV *this, NiStream *stream); // idb
NiUnionBV *__thiscall NiUnionBV::`scalar deleting destructor'(NiUnionBV *this, unsigned int a2);
void __thiscall NiUnionBV::LoadBinary(NiUnionBV *this, NiStream *stream); // idb
void __thiscall NiUnionBV::AddViewerStrings(NiUnionBV *this, const char *pcPrefix, NiTArray<char *> *pkStrings); // idb
BOOL __thiscall NiCapsuleBV::operator==(NiCapsuleBV *this, NiBoundingVolume *kABV);
void __thiscall NiCapsuleBV::CalculateCapsule(NiCapsuleBV *this); // idb
void __thiscall NiCapsuleBV::Copy(NiCapsuleBV *this, NiBoundingVolume *kABV); // idb
void __thiscall NiCapsuleBV::UpdateWorldData(NiCapsuleBV *this, NiBoundingVolume *kModelABV, NiTransform *kWorld); // idb
// char __usercall NiCapsuleBV::CapsuleSphereFindIntersect@<al>(int a1@<edi>, int a2@<esi>, float fTime, NiBoundingVolume *kABV0, NiPoint3 *kV0, NiBoundingVolume *kABV1, NiPoint3 *kV1, float *fIntrTime, NiPoint3 *kIntrPt, bool bCalcNormals, NiPoint3 *kNormal0, NiPoint3 *kNormal1);
// char __usercall NiCapsuleBV::CapsuleCapsuleFindIntersect@<al>(int a1@<edi>, int a2@<esi>, float fTime, NiBoundingVolume *kABV0, NiPoint3 *kV0, NiBoundingVolume *kABV1, NiPoint3 *kV1, float *fIntrTime, NiPoint3 *kIntrPt, bool bCalcNormals, NiPoint3 *kNormal0, NiPoint3 *kNormal1);
NiSphereBV *__thiscall NiCapsuleBV::`scalar deleting destructor'(NiSphereBV *this, unsigned int a2);
BOOL __cdecl NiCapsuleBV::CapsuleSphereTestIntersect(float fTime, NiBoundingVolume *kABV0, NiPoint3 *kV0, NiBoundingVolume *kABV1, NiPoint3 *kV1);
BOOL __cdecl NiCapsuleBV::CapsuleCapsuleTestIntersect(float fTime, NiBoundingVolume *kABV0, NiPoint3 *kV0, NiBoundingVolume *kABV1, NiPoint3 *kV1);
bool __cdecl NiCapsuleBV::CapsuleTriTestIntersect(float fTime, NiBoundingVolume *kABV0, NiPoint3 *kV0, NiPoint3 *kVert0, NiPoint3 *kVert1, NiPoint3 *kVert2, NiPoint3 *kV1); // idb
char __cdecl NiCapsuleBV::CapsuleTriFindIntersect(float fTime, NiBoundingVolume *kABV0, NiPoint3 *kV0, NiPoint3 *kVert0, NiPoint3 *kVert1, NiPoint3 *kVert2, NiPoint3 *kV1, float *fIntrTime, NiPoint3 *kIntrPt, bool bCalcNormals, NiPoint3 *kNormal0, NiPoint3 *kNormal1);
NiBoundingVolume *__cdecl NiCapsuleBV::CreateFromStream(NiStream *stream); // idb
void __thiscall NiCapsuleBV::LoadBinary(NiCapsuleBV *this, NiStream *stream); // idb
void __thiscall NiCapsuleBV::SaveBinary(NiCapsuleBV *this, NiStream *stream); // idb
NiBoundingVolume *NiCapsuleBV::Create();
NiBoundingVolume *__thiscall NiCapsuleBV::Clone(NiCapsuleBV *this); // idb
void __stdcall NiCapsuleBV::AddViewerStrings(const char *pcPrefix, NiTArray<char *> *pkStrings);
BOOL __thiscall NiBoxBV::operator==(NiBoxBV *this, NiBoundingVolume *kABV);
NiPoint3 *__thiscall NiBoxBV::GetNormal(NiBoxBV *this, NiPoint3 *result, int iSign0, int iSign1, int iSign2, NiPoint3 kVelocity); // idb
char __cdecl NiBoxBV::BoxCapsuleFindIntersect(float fTime, NiBoundingVolume *kBV0, NiPoint3 *kV0, NiBoundingVolume *kBV1, NiPoint3 *kV1, float *fIntrTime, NiPoint3 *kIntrPt, bool bCalcNormals, NiPoint3 *kNormal0, NiPoint3 *kNormal1);
void __thiscall NiBoxBV::LoadBinary(NiBoxBV *this, NiStream *kStream); // idb
void __thiscall NiBoxBV::SaveBinary(NiBoxBV *this, NiStream *kStream); // idb
void __thiscall NiBoxBV::NiBoxBV(NiBoxBV *this, NiPoint3 *kExtent, NiPoint3 *kCenter, NiPoint3 *kXAvis, NiPoint3 *kYAvis, NiPoint3 *kZAxis); // idb
void __thiscall NiBoxBV::~NiBoxBV(NiBoxBV *this); // idb
void __thiscall NiBoxBV::Copy(NiBoxBV *this, NiBoundingVolume *kABV); // idb
void __thiscall NiBoxBV::UpdateWorldData(NiBoxBV *this, NiBoundingVolume *kModelABV, NiTransform *kWorld); // idb
char __cdecl NiBoxBV::BoxBoxTestIntersect(float fTime, NiBoundingVolume *kBV0, NiPoint3 *kV0, NiBoundingVolume *kBV1, NiPoint3 *kV1);
bool __cdecl NiBoxBV::BoxCapsuleTestIntersect(float fTime, NiBoundingVolume *kBV0, NiPoint3 *kV0, NiBoundingVolume *kBV1, NiPoint3 *kV1); // idb
char __cdecl NiBoxBV::BoxTriTestIntersect(float fTime, NiBoundingVolume *kBV0, NiPoint3 *kV0, NiPoint3 *kVert0, NiPoint3 *kVert1, NiPoint3 *kVert2, NiPoint3 *kV1);
char __cdecl NiBoxBV::BoxSphereFindIntersect(float fTime, NiBoundingVolume *kBV0, NiPoint3 *kV0, NiBoundingVolume *kBV1, NiPoint3 *kV1, float *fIntrTime, NiPoint3 *kIntrPt, bool bCalcNormals, NiPoint3 *kNormal0, NiPoint3 *kNormal1);
char __cdecl NiBoxBV::BoxTriFindIntersect(float fTime, NiBoundingVolume *kBV0, NiPoint3 *kV0, NiPoint3 *kVert0, NiPoint3 *kVert1, NiPoint3 *kVert2, NiPoint3 *kV1, float *fIntrTime, NiPoint3 *kIntrPt, bool bCalcNormals, NiPoint3 *kNormal0, NiPoint3 *kNormal1);
NiBoundingVolume *__cdecl NiBoxBV::CreateFromStream(NiStream *kStream); // idb
NiBoundingVolume *NiBoxBV::Create();
bool __cdecl NiBoxBV::BoxSphereTestIntersect(float fTime, NiBoundingVolume *kBV0, NiPoint3 *kV0, NiBoundingVolume *kBV1, NiPoint3 *kV1); // idb
void __cdecl NiBoxBV::RefinePoint(float fTime, NiBoxBV *pkBBV0, NiPoint3 *pkV0, NiBoxBV *pkBBV1, NiPoint3 *pkV1, float *fIntrTime, NiPoint3 *kIntrPt0); // idb
NiBoundingVolume *__thiscall NiBoxBV::Clone(NiBoxBV *this); // idb
char __cdecl NiBoxBV::BoxBoxFindIntersect(float fTime, NiBoundingVolume *kBV0, NiPoint3 *kV0, NiBoundingVolume *kBV1, NiPoint3 *kV1, float *fIntrTime, NiPoint3 *kIntrPt, bool bCalcNormals, NiPoint3 *kNormal0, NiPoint3 *kNormal1);
void __stdcall NiBoxBV::AddViewerStrings(const char *pcPrefix, NiTArray<char *> *pkStrings);
void __thiscall NiOBBRoot::Transform(NiOBBRoot *this, NiTransform *xform); // idb
int __thiscall NiOBBRoot::FindIntersections(NiOBBRoot *this, NiPoint3 *origin, NiPoint3 *dir, NiPick *pick, bool *bIntersects, NiAVObject *pObj, unsigned int uiChangeStamp); // idb
void __thiscall NiOBBRoot::NiOBBRoot(NiOBBRoot *this, unsigned __int16 usTriangles, const unsigned __int16 *pTriList, NiPoint3 *pVertex, NiPoint3 *pWVertex, int iBinSize); // idb
NiOBBRoot *__thiscall NiOBBRoot::`vector deleting destructor'(NiOBBRoot *this, unsigned int a2);
bool __thiscall NiOBBRoot::TestCollision(NiOBBRoot *this, NiOBBRoot *pTestRoot, NiAVObject *pThisObj, NiAVObject *pOtherObj, int iMaxDepth, int iTestMaxDepth); // idb
int __thiscall NiOBBRoot::FindCollisions(NiOBBRoot *this, NiOBBRoot *pTestRoot, NiAVObject *pThisRoot, NiAVObject *pOtherRoot, NiAVObject *pThisObj, NiAVObject *pOtherObj, int iMaxDepth, int iTestMaxDepth, bool *bCollision); // idb
BOOL __thiscall NiSphere::operator==(NiSphere *this, NiSphere *kSphere);
double __cdecl NiSqrDistance::Compute(NiPoint3 *kPnt, NiTrigon *kTri, float *fTriParam0, float *fTriParam1);
double __cdecl NiSqrDistance::Compute(NiSegment *kSeg, NiTrigon *kTri, float *fSegParm, float *fTriParm0, float *fTriParm1);
void __thiscall NiIntersector::Test(NiIntersector *this, NiPoint3 *kV0, NiPoint3 *kV1); // idb
double __thiscall NiIntersector::GetContactTime(NiIntersector *this);
NiPoint3 *__thiscall Effect::GetCtrl(NiIntersector *this); // idb
NiPoint3 *__thiscall NiIntersector::GetContactNormal(NiIntersector *this); // idb
void __thiscall NiIntersector::NiIntersector(NiIntersector *this, float fMaxTime, float fDerivativeTimeStep, float fPseudodistanceThreshold, int iMaxIterations); // idb
// void __userpurge NiIntersector::Find(NiIntersector *this@<ecx>, int a2@<edi>, int a3@<esi>, NiPoint3 *kV0, NiPoint3 *kV1);
double __thiscall NiSphereTriIntersector::Pseudodistance(NiSphereTriIntersector *this, NiPoint3 *kV0, NiPoint3 *kV1, float fTime);
void __thiscall NiCapsuleTriIntersector::ComputeContactInformation(NiSphereTriIntersector *this, NiPoint3 *kV0, NiPoint3 *kV1); // idb
void __thiscall NiSphereTriIntersector::NiSphereTriIntersector(NiSphereTriIntersector *this, NiSphereBV *kSphere, NiPoint3 *kP0, NiPoint3 *kP1, NiPoint3 *kP2, float fMaxTime, float fDerivativeTimeStep, float fPseudodistanceThreshold, int iMaxIterations); // idb
NiPoint3 *__thiscall NiTrigon::GetNormal(NiTrigon *this, NiPoint3 *result); // idb
bool __cdecl NiCollisionUtils::FindBoundIntersect(NiAVObject *pkObj, NiPoint3 *kOrigin, NiPoint3 *kDir); // idb
char __cdecl NiCollisionUtils::IntersectTriangle(NiPoint3 *kOrigin, NiPoint3 *kDir, NiPoint3 *kV1, NiPoint3 *kV2, NiPoint3 *kV3, bool bCull, NiPoint3 *kIntersect, float *r, float *s, float *t);
bool __cdecl NiCollisionUtils::BoundingVolumeTestIntersect(float fTime, NiAVObject *pkObj1, NiAVObject *pkObj2); // idb
bool __cdecl NiCollisionUtils::BoundingVolumeFindIntersect(float fTime, NiAVObject *pkObj1, NiAVObject *pkObj2, float *fIntrTime, NiPoint3 *kIntrPoint, int bCalcNormals, NiPoint3 *kNormal0, NiPoint3 *kNormal1);
int __cdecl NiCollisionUtils::TriTriFindIntersect(float fTime, NiAVObject *pkGeom1, NiAVObject *pkGeom2, bool bCalcNormals, NiCollisionGroup::Intersect *kIntr, bool *bCollision); // idb
int __cdecl NiCollisionUtils::TriToBndVolFindIntersect(float fTime, NiAVObject *pkTBG, NiAVObject *pkOther, int bCalcNormals, NiCollisionGroup::Intersect *kIntr, bool *bCollision);
void __thiscall NiBox::CreateFromData(NiBox *this, unsigned __int16 usQuantity, NiPoint3 *pkVertex); // idb
char __thiscall NiBox::operator==(NiBox *this, NiBox *kBox);
void __thiscall NiBox::LoadBinary(NiBox *this, NiStream *stream); // idb
void __thiscall NiBox::SaveBinary(NiBox *this, NiStream *stream); // idb
BOOL __thiscall NiCapsule::operator==(NiCapsule *this, NiCapsule *kCapsule);
void __thiscall NiCapsuleSphereIntersector::NiCapsuleSphereIntersector(NiCapsuleSphereIntersector *this, NiCapsuleBV *kCapsule, NiSphereBV *kSphere, float fMaxTime, float fDerivativeTimeStep, float fPseudodistanceThreshold, int iMaxIterations); // idb
double __thiscall NiCapsuleSphereIntersector::Pseudodistance(NiCapsuleSphereIntersector *this, NiPoint3 *kV0, NiPoint3 *kV1, float fTime);
void __thiscall NiCapsuleSphereIntersector::ComputeContactInformation(NiCapsuleSphereIntersector *this, NiPoint3 *kV0, NiPoint3 *kV1); // idb
void __thiscall NiCapsuleCapsuleIntersector::NiCapsuleCapsuleIntersector(NiCapsuleCapsuleIntersector *this, NiCapsuleBV *kCapsule0, NiCapsuleBV *kCapsule1, float fMaxTime, float fDerivativeTimeStep, float fPseudodistanceThreshold, int iMaxIterations); // idb
double __thiscall NiCapsuleCapsuleIntersector::Pseudodistance(NiCapsuleCapsuleIntersector *this, NiPoint3 *kV0, NiPoint3 *kV1, float fTime);
void __thiscall NiCapsuleCapsuleIntersector::ComputeContactInformation(NiCapsuleCapsuleIntersector *this, NiPoint3 *kV0, NiPoint3 *kV1); // idb
double __cdecl NiSqrDistance::Compute(NiPoint3 *kPnt, NiSegment *kSeg, float *fSegParam);
double __cdecl NiSqrDistance::Compute(NiSegment *kSeg0, NiSegment *kSeg1, float *fSeg0Param, float *fSeg1Param);
double __cdecl NiSqrDistance::Compute(NiSegment *kSeg, NiParallelogram *kPgm, float *fSegParam, float *fPgmParam0, float *fPgmParam1);
double __cdecl NiSqrDistance::Compute(NiTrigon *kTri, NiParallelogram *kPgm, float *fTriParam0, float *fTriParam1, float *fPgmParam0, float *fPgmParam1);
double __thiscall NiCapsuleTriIntersector::Pseudodistance(NiCapsuleTriIntersector *this, NiPoint3 *kV0, NiPoint3 *kV1, float fTime);
void __thiscall NiCapsuleTriIntersector::NiCapsuleTriIntersector(NiCapsuleTriIntersector *this, NiCapsuleBV *kCapsule, NiPoint3 *kP0, NiPoint3 *kP1, NiPoint3 *kP2, float fMaxTime, float fDerivativeTimeStep, float fPseudodistanceThreshold, int iMaxIterations); // idb
void __thiscall NiBoxCapsuleIntersector::NiBoxCapsuleIntersector(NiBoxCapsuleIntersector *this, NiBoxBV *kBox, NiCapsuleBV *kCapsule, float fMaxTime, float fDerivativeTimeStep, float fPseudodistanceThreshold, int iMaxIterations); // idb
double __thiscall NiBoxCapsuleIntersector::Pseudodistance(NiBoxCapsuleIntersector *this, NiPoint3 *kV0, NiPoint3 *kV1, float fTime);
void __thiscall NiBoxCapsuleIntersector::ComputeContactInformation(NiBoxCapsuleIntersector *this, NiPoint3 *kV0, NiPoint3 *kV1); // idb
void __thiscall NiBoxSphereIntersector::NiBoxSphereIntersector(NiBoxSphereIntersector *this, NiBoxBV *kBox, NiSphereBV *kSphere, float fMaxTime, float fDerivativeTimeStep, float fPseudodistanceThreshold, int iMaxIterations); // idb
double __thiscall NiBoxSphereIntersector::Pseudodistance(NiBoxSphereIntersector *this, NiPoint3 *kV0, NiPoint3 *kV1, float fTime);
void __thiscall NiBoxSphereIntersector::ComputeContactInformation(NiBoxSphereIntersector *this, NiPoint3 *kV0, NiPoint3 *kV1); // idb
double __cdecl NiSqrDistance::Compute(NiPoint3 *kPoint, NiBox *kBox, float *fBoxParam0, float *fBoxParam1, float *fBoxParam2);
// void __usercall Case000(NiBox *kBox@<edx>, NiPoint3 *rkPnt@<ecx>, float *rfSqrDistance@<esi>);
// void __usercall Face(int i1@<edx>, int i2@<esi>, NiPoint3 *rkPnt@<ebx>, NiPoint3 *rkDir@<edi>, NiBox *kBox, int i0, NiPoint3 *rkPmE, float *fLParam, float *rfSqrDistance);
// void __usercall CaseNoZeros(NiBox *kBox@<ecx>, float *fLParam@<eax>, float *rfSqrDistance@<edx>, NiPoint3 *rkPnt, NiPoint3 *rkDir);
// void __usercall Case0(int i0@<edx>, int i1@<ecx>, NiPoint3 *rkPnt@<edi>, NiPoint3 *rkDir@<esi>, NiBox *kBox, int i2, float *fLParam, float *rfSqrDistance);
// void __usercall Case00(int i0@<eax>, int i1@<esi>, int i2@<edi>, NiPoint3 *rkPnt@<ecx>, NiBox *kBox, NiPoint3 *rkDir, float *fLParam, float *rfSqrDistance);
double __cdecl NiSqrDistance::Compute(NiSegment *kSeg, NiBox *kBox, float *fSegParam, float *fBoxParam0, float *fBoxParam1, float *fBoxParam2);
BOOL __thiscall NiOBBNode::HasChildren(NiOBBNode *this);
void __thiscall NiOBBLeaf::NiOBBLeaf(NiOBBLeaf *this, NiOBBRoot *pRoot, const unsigned __int16 *pTriList, NiPoint3 *pVertex, NiPoint3 *pWVertex, unsigned __int16 usTriangle); // idb
NiOBBLeaf *__thiscall NiOBBNode::`scalar deleting destructor'(NiOBBLeaf *this, unsigned int a2);
void __cdecl NiOBBLeaf::ComputeBarycenter(NiPoint3 *v0, NiPoint3 *v1, NiPoint3 *v2, NiPoint3 *p, float *pCenter); // idb
int __cdecl NiOBBLeaf::TentativeCollision(float fDT, NiPoint3 *N, float fC, NiPoint3 *V, NiPoint3 *q0, NiPoint3 *q1, float *fT0, NiPoint3 *p0, float *fT1, NiPoint3 *p1); // idb
int __cdecl NiOBBLeaf::TestEdgeTri(NiPoint3 *edge0, NiPoint3 *edge1, NiPoint3 **pVer, NiPoint3 *N, float fC, NiPoint3 *V, float fDT, float *fTMin, NiPoint3 *pmin); // idb
int __cdecl NiOBBLeaf::FindIntersection(NiPoint3 **pVer0, NiPoint3 **pVer1, NiPoint3 *V, float fDT, float *fTMin, NiPoint3 *pmin); // idb
int __cdecl NiOBBLeaf::FindIntersection(NiOBBLeaf *pLeaf0, NiOBBLeaf *pLeaf1, float *fT, NiPoint3 *p); // idb
int __thiscall NiOBBLeaf::FaceFaceCollision(NiOBBLeaf *this, NiOBBLeaf *pTestLeaf, NiAVObject *pkRoot0, NiAVObject *pkRoot1, NiAVObject *pkObj0, NiAVObject *pkObj1, bool *bCollision); // idb
bool __thiscall NiOBBLeaf::TestCollision(NiOBBLeaf *this, NiOBBNode *pTestNode, NiAVObject *pkObj0, NiAVObject *pkObj1, int iMaxDepth, int iTestMaxDepth, unsigned int uiChangeStamp0, unsigned int uiChangeStamp1); // idb
int __thiscall NiOBBLeaf::FindCollisions(NiOBBLeaf *this, NiOBBNode *pTestNode, NiAVObject *pkRoot0, NiAVObject *pkRoot1, NiAVObject *pkObj0, NiAVObject *pkObj1, int iMaxDepth, int iTestMaxDepth, unsigned int uiChangeStamp0, unsigned int uiChangeStamp1, bool *bCollision); // idb
int __thiscall NiOBBLeaf::FindIntersections(NiOBBLeaf *this, NiPoint3 *origin, NiPoint3 *dir, NiPick *pick, bool *bIntersects, NiAVObject *pObj, unsigned int uiChangeStamp); // idb
void __thiscall NiOBBNode::~NiOBBNode(NiOBBNode *this); // idb
NiMatrix3 *__thiscall NiOBBNode::ComputeCovarianceAndMean(NiOBBNode *this, NiMatrix3 *result, const unsigned __int16 *pTriList, NiPoint3 *pVertex, float *pArea, NiPoint3 *pCentroid, int i0, int i1, int *pISplit); // idb
void __thiscall NiOBBNode::DivideTriangles(NiOBBNode *this, NiPoint3 *pCentroid, int i0, int i1, int *pISplit, int *j0, int *j1, int *pOSplit); // idb
char __thiscall NiOBBNode::TestCollision(NiOBBNode *this, NiOBBNode *pTestNode, NiAVObject *pkObj0, NiAVObject *pkObj1, int iMaxDepth, int iTestMaxDepth, unsigned int uiChangeStamp0, unsigned int uiChangeStamp1);
int __thiscall NiOBBNode::FindIntersections(NiOBBNode *this, NiPoint3 *origin, NiPoint3 *dir, NiPick *pick, bool *bIntersects, NiAVObject *pObj, unsigned int uiChangeStamp); // idb
void __thiscall NiOBBNode::ComputeOBB(NiOBBNode *this, NiOBBRoot *pRoot, const unsigned __int16 *pTriList, NiPoint3 *pVertex, float *pArea, NiPoint3 *pCentroid, int i0, int i1, int *pISplit); // idb
int __stdcall NiOBBNode::CollisionCallback(NiCollisionGroup::Intersect *intr);
int __thiscall NiOBBNode::BoxBoxCollision(NiOBBNode *this, NiOBBNode *pTestNode, NiAVObject *pkRoot0, NiAVObject *pkRoot1, NiAVObject *pkObj0, NiAVObject *pkObj1, bool *bCollision); // idb
int __thiscall NiOBBNode::FindCollisions(NiOBBNode *this, NiOBBNode *pTestNode, NiAVObject *pkRoot0, NiAVObject *pkRoot1, NiAVObject *pkObj0, NiAVObject *pkObj1, int iMaxDepth, int iTestMaxDepth, unsigned int uiChangeStamp0, unsigned int uiChangeStamp1, bool *bCollision); // idb
void __thiscall NiOBBNode::CreateRecursive(NiOBBNode *this, NiOBBRoot *pRoot, const unsigned __int16 *pTriList, NiPoint3 *pVertex, NiPoint3 *pWVertex, float *pArea, NiPoint3 *pCentroid, int i0, int i1, int *pISplit, int *pOSplit, int iBinSize); // idb
void __thiscall NiOBBNode::NiOBBNode(NiOBBNode *this, NiOBBRoot *pRoot, unsigned __int16 usTriangles, const unsigned __int16 *pTriList, NiPoint3 *pVertex, NiPoint3 *pWVertex, int iBinSize); // idb
void __stdcall NiTriIntersect::Sort(float fR0, float fR1, float fR2, float *afSort, int *aiIndex);
void __thiscall NiTriIntersect::NiTriIntersect(NiTriIntersect *this, NiPoint3 **apkP, NiPoint3 *rkV0, NiPoint3 **apkQ, NiPoint3 *rkV1); // idb
char __thiscall NiTriIntersect::FindIntervals(NiTriIntersect *this, unsigned int uiAxis, float *afPSort, int *aiPIndex, float *afQSort, int *aiQIndex, float fW);
char __thiscall NiTriIntersect::FindN(NiTriIntersect *this);
char __thiscall NiTriIntersect::FindM(NiTriIntersect *this);
char __thiscall NiTriIntersect::FindE0xF0(NiTriIntersect *this);
char __thiscall NiTriIntersect::FindE0xF1(NiTriIntersect *this);
char __thiscall NiTriIntersect::FindE0xF2(NiTriIntersect *this);
char __thiscall NiTriIntersect::FindE1xF0(NiTriIntersect *this);
char __thiscall NiTriIntersect::FindE1xF1(NiTriIntersect *this);
char __thiscall NiTriIntersect::FindE1xF2(NiTriIntersect *this);
char __thiscall NiTriIntersect::FindE2xF0(NiTriIntersect *this);
char __thiscall NiTriIntersect::FindE2xF1(NiTriIntersect *this);
char __thiscall NiTriIntersect::FindE2xF2(NiTriIntersect *this);
char __thiscall NiTriIntersect::FindMxF0(NiTriIntersect *this);
char __thiscall NiTriIntersect::FindMxF1(NiTriIntersect *this);
char __thiscall NiTriIntersect::FindMxF2(NiTriIntersect *this);
char __thiscall NiTriIntersect::FindNxE0(NiTriIntersect *this);
char __thiscall NiTriIntersect::FindNxE1(NiTriIntersect *this);
char __thiscall NiTriIntersect::FindNxE2(NiTriIntersect *this);
void __thiscall NiTriIntersect::PEdgeQEdgeIntersect(NiTriIntersect *this, NiPoint3 *rkP0, NiPoint3 *rkP1, NiPoint3 *rkQ0, NiPoint3 *rkQ1); // idb
void __thiscall NiTriIntersect::PEdgeQFaceIntersect(NiTriIntersect *this, NiPoint3 *rkP0, NiPoint3 *rkP1); // idb
void __thiscall NiTriIntersect::PFaceQEdgeIntersect(NiTriIntersect *this, NiPoint3 *rkQ0, NiPoint3 *rkQ1); // idb
void __thiscall NiTriIntersect::PFaceQFaceIntersect(NiTriIntersect *this); // idb
void __thiscall NiTriIntersect::LocateIntersection(NiTriIntersect *this); // idb
char __thiscall NiTriIntersect::Find(NiTriIntersect *this, float fTime, float *fIntrTime, NiPoint3 *kIntrPt, bool bCalcNormals, NiPoint3 *pkNormal0, NiPoint3 *pkNormal1);
NiPoint3 *__thiscall NiSegment::GetPoint(NiSegment *this, NiPoint3 *result, float fS); // idb
BOOL __thiscall NiSegment::operator==(NiSegment *this, NiSegment *kSegment);
double __cdecl NiSqrDistance::Compute(NiPoint3 *kPnt, NiParallelogram *kPgm, float *fPgmParam0, float *fPgmParam1);
void __thiscall NiOBBox::Transform(NiOBBox *this, NiTransform *xform); // idb
int __thiscall NiOBBox::TestIntersection(NiOBBox *this, NiOBBox *box); // idb
int __thiscall NiOBBox::FindIntersection(NiOBBox *this, NiOBBox *box, float *t, NiPoint3 *p); // idb
void __thiscall NiOBBox::ComputeNormal(NiOBBox *this, NiPoint3 *p, NiPoint3 *normal); // idb
int __thiscall NiOBBox::TestIntersection(NiOBBox *this, NiPoint3 *origin, NiPoint3 *dir); // idb
void __thiscall NiNode::LoadBinary(NiNode *this, NiStream *kStream); // idb
void __thiscall NiDynamicEffectState::NiDynamicEffectState(NiDynamicEffectState *this); // idb
NiDynamicEffectState *__thiscall NiDynamicEffectState::`scalar deleting destructor'(NiDynamicEffectState *this, unsigned int a2);
NiTListBase<NiTPointerAllocator<unsigned int>,NiDynamicEffect *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiDynamicEffect *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiDynamicEffect *> *this, unsigned int a2);
void __thiscall NiNode::ApplyTransform(NiNode *this, NiMatrix3 *kMat, NiPoint3 *kTrn, bool bOnLeft); // idb
void __thiscall NiNode::UpdateUpwardPass(NiNode *this); // idb
void __thiscall NiNode::UpdateWorldBound(NiNode *this); // idb
void __thiscall NiNode::UpdatePropertiesDownward(NiNode *this, NiPropertyState *pkParentState); // idb
void __thiscall NiNode::UpdateNodeBound(NiNode *this); // idb
void __thiscall NiNode::OnVisible(NiNode *this, NiCullingProcess *kCuller); // idb
void __thiscall NiNode::PurgeRendererData(NiNode *this, NiRenderer *pkRenderer); // idb
void __thiscall NiNode::DetachAllEffects(NiNode *this); // idb
void __thiscall NiNode::CopyMembers(NiNode *this, NiNode *pkDest, NiCloningProcess *kCloning); // idb
void __thiscall NiAVObject::UpdateObjectControllers(NiAVObject *this, float fTime, bool bProperties); // idb
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiDynamicEffect *>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiDynamicEffect *>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiDynamicEffect *> *this); // idb
NiTPointerList<NiDynamicEffect *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiDynamicEffect *>::`vector deleting destructor'(NiTPointerList<NiDynamicEffect *> *this, unsigned int a2);
NiPointer<NiAVObject> *__thiscall NiNode::DetachChildAt(NiNode *this, NiPointer<NiAVObject> *result, unsigned int i); // idb
NiPointer<NiAVObject> *__thiscall NiNode::DetachChild(NiNode *this, NiPointer<NiAVObject> *result, NiAVObject *pkChild); // idb
void __thiscall NiNode::UpdateDownwardPass(NiNode *this, float fTime, int bUpdateControllers);
void __thiscall NiNode::UpdateSelectedDownwardPass(NiNode *this, float fTime); // idb
void __thiscall NiNode::UpdateRigidDownwardPass(NiNode *this, float fTime); // idb
void __thiscall NiNode::UpdateControllers(NiNode *this, float fTime); // idb
NiPointer<NiPropertyState> *__thiscall NiNode::UpdatePropertiesUpward(NiNode *this, NiPointer<NiPropertyState> *result); // idb
NiPointer<NiDynamicEffectState> *__thiscall NiNode::PushLocalEffects(NiNode *this, NiPointer<NiDynamicEffectState> *result, NiDynamicEffectState *pkParentState, bool bCopyOnChange); // idb
void __thiscall NiNode::UpdateEffectsDownward(NiNode *this, NiDynamicEffectState *pkParentState); // idb
void __thiscall NiNode::SetSelectiveUpdateFlags(NiNode *this, bool *bSelectiveUpdate, bool bSelectiveUpdateTransforms, bool *bRigid); // idb
void __thiscall NiNode::AttachEffect(NiNode *this, NiDynamicEffect *pkEffect); // idb
NiAVObject *__thiscall NiNode::GetObjectByName(NiNode *this, const char *pcName); // idb
void __thiscall NiNode::CopyEffectListClones(NiNode *this, NiTPointerList<NiDynamicEffect *> *pkList, NiCloningProcess *kCloning); // idb
char __thiscall NiNode::RegisterStreamables(NiNode *this, NiStream *kStream);
void __thiscall NiNode::SaveBinary(NiNode *this, NiStream *kStream); // idb
char __thiscall NiNode::IsEqual(NiNode *this, NiObject *pkObject);
void __thiscall NiTArray<NiPointer<NiAVObject>>::NiTArray<NiPointer<NiAVObject>>(NiTArray<NiPointer<NiAVObject> > *this, unsigned int uiMaxSize, unsigned int uiGrowBy); // idb
void __thiscall NiTArray<NiPointer<NiAVObject>>::~NiTArray<NiPointer<NiAVObject>>(NiTArray<NiPointer<NiAVObject> > *this); // idb
NiTArray<NiPointer<NiAVObject> > *__thiscall NiTArray<NiPointer<NiAVObject>>::`vector deleting destructor'(NiTArray<NiPointer<NiAVObject> > *this, unsigned int a2);
void __thiscall NiNode::NiNode(NiNode *this, unsigned int uiNumChildren); // idb
void __thiscall NiNode::~NiNode(NiNode *this); // idb
NiPointer<NiDynamicEffectState> *__thiscall NiNode::UpdateEffectsUpward(NiNode *this, NiPointer<NiDynamicEffectState> *result); // idb
void __thiscall NiNode::DetachEffect(NiNode *this, NiDynamicEffect *pkEffect); // idb
NiNode *__thiscall NiNode::CreateClone(NiNode *this, NiCloningProcess *kCloning);
void __thiscall NiNode::ProcessClone(NiNode *this, NiCloningProcess *kCloning); // idb
NiObject *__cdecl NiNode::CreateObject(); // idb
void __thiscall NiNode::LinkObject(NiNode *this, NiStream *kStream); // idb
void __thiscall NiNode::GetViewerStrings(NiNode *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiNode::AttachChild(NiNode *this, NiAVObject *pkChild, bool bFirstAvail); // idb
NiPointer<NiAVObject> *__thiscall NiNode::SetAt(NiNode *this, NiPointer<NiAVObject> *result, unsigned int i, NiAVObject *pkChild); // idb
NiExtraData *__thiscall NiObjectNET::GetExtraData(NiObjectNET *this, const char *pcKey); // idb
void __thiscall NiObjectNET::ProcessClone(NiObjectNET *this, NiCloningProcess *kCloning); // idb
void __thiscall NiObjectNET::SetName(NiObjectNET *this, const char *pcName); // idb
void __thiscall NiObjectNET::DeleteExtraData(NiObjectNET *this, unsigned int uiExtraDataIndex); // idb
char __thiscall NiObjectNET::InsertExtraData(NiObjectNET *this, NiExtraData *pkExtra);
char __thiscall NiObjectNET::SetExtraDataSize(NiObjectNET *this, unsigned int uiSize);
char __thiscall NiObjectNET::AddExtraData(NiObjectNET *this, const char *pcKey, NiExtraData *pkExtra);
char __thiscall NiObjectNET::AddExtraData(NiObjectNET *this, NiExtraData *pkExtra);
char __thiscall NiObjectNET::RemoveExtraData(NiObjectNET *this, const char *pcKey);
char __thiscall NiObjectNET::RemoveExtraDataAt(NiObjectNET *this, unsigned int uiExtraDataIndex);
void __thiscall NiObjectNET::RemoveAllExtraData(NiObjectNET *this); // idb
void __thiscall NiObjectNET::RemoveAllControllers(NiObjectNET *this); // idb
void __thiscall NiObjectNET::LoadBinary(NiObjectNET *this, NiStream *kStream); // idb
void __thiscall NiObjectNET::LinkObject(NiObjectNET *this, NiStream *kStream); // idb
char __thiscall NiObjectNET::RegisterStreamables(NiObjectNET *this, NiStream *kStream);
void __thiscall NiObjectNET::NiObjectNET(NiObjectNET *this); // idb
NiRTTI *NiObjectNET::GetRTTI();
void __thiscall NiObjectNET::~NiObjectNET(NiObjectNET *this); // idb
void __thiscall NiObjectNET::CopyMembers(NiObjectNET *this, NiObjectNET *pkDest, NiCloningProcess *kCloning); // idb
void __thiscall NiObjectNET::PrependController(NiObjectNET *this, NiTimeController *pkControl); // idb
void __thiscall NiObjectNET::RemoveController(NiObjectNET *this, NiTimeController *pkControl); // idb
NiTimeController *__thiscall NiObjectNET::GetController(NiObjectNET *this, NiRTTI *pkRTTI); // idb
void __thiscall NiObjectNET::SaveBinary(NiObjectNET *this, NiStream *kStream); // idb
void __thiscall NiObjectNET::PostLinkObject(NiObjectNET *this, NiStream *kStream); // idb
char __thiscall NiObjectNET::IsEqual(NiObjectNET *this, NiObject *pkObject);
NiObjectNET *__thiscall NiObjectNET::`scalar deleting destructor'(NiObjectNET *this, unsigned int a2);
void __thiscall NiObjectNET::GetViewerStrings(NiObjectNET *this, NiTArray<char *> *pkStrings); // idb
NiObject *__thiscall NiObject::Clone(NiObject *this, NiCloningProcess *kCloning); // idb
NiObject *__thiscall NiObject::CreateClone(NiObject *this, NiCloningProcess *kCloning); // idb
int __thiscall NiObject::RegisterStreamables(NiObject *this, NiStream *stream);
void __thiscall NiObject::NiObject(NiObject *this); // idb
NiCloningProcess *__thiscall NiObject::CreateSharedClone(NiObject *this, NiCloningProcess *kCloning);
void __thiscall NiObject::ProcessClone(NiObject *this, NiCloningProcess *kCloning); // idb
void __thiscall NiObject::CopyMembers(NiObject *this, NiObject *pDest, NiCloningProcess *kCloning); // idb
bool __thiscall NiObject::IsEqual(NiObject *this, NiObject *pObject); // idb
NiPointer<NiObject> *__thiscall NiObject::CreateDeepCopy(NiObject *this, NiPointer<NiObject> *result); // idb
void __thiscall NiObject::LoadBinary(NiObject *this, NiStream *stream); // idb
void __thiscall NiObject::GetViewerStrings(NiObject *this, NiTArray<char *> *pStrings); // idb
NiObject *__thiscall NiObject::Clone(NiObject *this); // idb
NiTransform *__thiscall NiTransform::operator*(NiTransform *this, NiTransform *result, NiTransform *xform); // idb
void __thiscall NiAVObject::UpdateWorldData(NiAVObject *this); // idb
void __thiscall NiAVObject::Update(NiAVObject *this, float fTime, int bUpdateControllers);
void __thiscall NiAVObject::UpdateSelected(NiAVObject *this, float fTime); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty>>::~NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty>>(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> > *this); // idb
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty>>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty>>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> > *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> > *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty>>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> > *this, unsigned int a2);
void __thiscall NiAVObject::AttachParent(NiAVObject *this, NiNode *pkParent); // idb
NiProperty *__thiscall NiAVObject::GetProperty(NiAVObject *this, int iType); // idb
void __thiscall NiAVObject::Cull(NiAVObject *this, NiCullingProcess *kCuller); // idb
NiAVObject *__thiscall NiAVObject::GetObjectByName(NiAVObject *this, const char *pcName); // idb
void __thiscall NiAVObject::PurgeRendererData(NiAVObject *this, NiRenderer *pkRenderer); // idb
void __stdcall NiAVObject::ProcessPropertyClones(NiTPointerList<NiPointer<NiProperty> > *pkList, NiCloningProcess *kCloning);
void __thiscall NiAVObject::ProcessClone(NiAVObject *this, NiCloningProcess *kCloning); // idb
char __thiscall NiAVObject::RegisterStreamables(NiAVObject *this, NiStream *kStream);
void __thiscall NiPropertyState::SetProperty(NiPropertyState *this, NiProperty *pkProp); // idb
NiTPointerList<NiPointer<NiProperty> > *__thiscall NiTPointerList<NiPointer<NiProperty>>::`vector deleting destructor'(NiTPointerList<NiPointer<NiProperty> > *this, unsigned int a2);
void __thiscall NiAVObject::~NiAVObject(NiAVObject *this); // idb
NiRTTI *NiAVObject::GetRTTI();
void __thiscall NiAVObject::UpdateDownwardPass(NiAVObject *this, float fTime, bool bUpdateControllers); // idb
void __thiscall NiAVObject::UpdateRigidDownwardPass(NiAVObject *this, float fTime); // idb
void __thiscall NiAVObject::UpdateControllers(NiAVObject *this, float fTime); // idb
void __thiscall NiAVObject::UpdateProperties(NiAVObject *this); // idb
char __thiscall NiAVObject::HasTransformController(NiAVObject *this);
char __thiscall NiAVObject::HasPropertyController(NiAVObject *this);
NiPointer<NiPropertyState> *__thiscall NiAVObject::PushLocalProperties(NiAVObject *this, NiPointer<NiPropertyState> *result, NiPropertyState *pkParentState, bool bCopyOnChange); // idb
void __thiscall NiAVObject::UpdateEffects(NiAVObject *this); // idb
void __thiscall NiAVObject::LinkObject(NiAVObject *this, NiStream *kStream); // idb
char __thiscall NiAVObject::IsEqual(NiAVObject *this, NiObject *pkObject);
void __thiscall NiAVObject::NiAVObject(NiAVObject *this); // idb
NiAVObject *__thiscall NiAVObject::`scalar deleting destructor'(NiAVObject *this, unsigned int a2);
NiPointer<NiProperty> *__thiscall NiAVObject::RemoveProperty(NiAVObject *this, NiPointer<NiProperty> *result, int iType); // idb
void __thiscall NiAVObject::SetSelectiveUpdateFlags(NiAVObject *this, bool *bSelectiveUpdate, bool bSelectiveUpdateTransforms, bool *bRigid); // idb
void __stdcall NiAVObject::CloneProperties(NiAVObject *pkDest, NiTPointerList<NiPointer<NiProperty> > *pkList, NiCloningProcess *kCloning);
void __thiscall NiAVObject::CopyMembers(NiAVObject *this, NiAVObject *pkDest, NiCloningProcess *kCloning); // idb
void __thiscall NiAVObject::LoadBinary(NiAVObject *this, NiStream *kStream); // idb
void __thiscall NiAVObject::SaveBinary(NiAVObject *this, NiStream *kStream); // idb
void __thiscall NiAVObject::GetViewerStrings(NiAVObject *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiMatrix3::MakeIdentity(NiMatrix3 *this); // idb
void __thiscall NiMatrix3::MakeDiagonal(NiMatrix3 *this, float fDiag0, float fDiag1, float fDiag2); // idb
BOOL __thiscall NiMatrix3::operator==(NiMatrix3 *this, NiMatrix3 *mat);
NiMatrix3 *__thiscall NiMatrix3::operator+(NiMatrix3 *this, NiMatrix3 *result, NiMatrix3 *mat); // idb
NiMatrix3 *__thiscall NiMatrix3::operator-(NiMatrix3 *this, NiMatrix3 *result, NiMatrix3 *mat); // idb
char *__thiscall NiMatrix3::GetViewerString(NiMatrix3 *this, const char *pPrefix); // idb
void __thiscall NiMatrix3::NiMatrix3(NiMatrix3 *this, NiPoint3 *col0, NiPoint3 *col1, NiPoint3 *col2); // idb
void __thiscall NiMatrix3::MakeYRotation(NiMatrix3 *this, float fAngle); // idb
void __thiscall NiMatrix3::MakeZRotation(NiMatrix3 *this, float fAngle); // idb
void __thiscall NiMatrix3::MakeRotation(NiMatrix3 *this, float fAngle, float x, float y, float z); // idb
NiMatrix3 *__thiscall NiMatrix3::operator*(NiMatrix3 *this, NiMatrix3 *result, NiMatrix3 *mat); // idb
NiMatrix3 *__thiscall NiMatrix3::operator*(NiMatrix3 *this, NiMatrix3 *result, float fScalar); // idb
NiPoint3 *__thiscall NiMatrix3::operator*(NiMatrix3 *this, NiPoint3 *result, NiPoint3 *pt); // idb
NiPoint3 *__cdecl operator*(NiPoint3 *result, NiPoint3 *pt, NiMatrix3 *mat); // idb
char __thiscall NiMatrix3::Inverse(NiMatrix3 *this, NiMatrix3 *inv);
NiMatrix3 *__thiscall NiMatrix3::Inverse(NiMatrix3 *this, NiMatrix3 *result); // idb
NiMatrix3 *__thiscall NiMatrix3::Transpose(NiMatrix3 *this, NiMatrix3 *result); // idb
void __thiscall NiMatrix3::ExtractAngleAndAxis(NiMatrix3 *this, float *fAngle, float *fX, float *fY, float *fZ); // idb
NiMatrix3 *__thiscall NiMatrix3::TransposeTimes(NiMatrix3 *this, NiMatrix3 *result, NiMatrix3 *mat); // idb
char __thiscall NiMatrix3::Tridiagonal(NiMatrix3 *this, float *afDiag, float *afSubd);
char __thiscall NiMatrix3::QLAlgorithm(NiMatrix3 *this, float *afDiag, float *afSubd);
void __thiscall NiMatrix3::Snap(NiMatrix3 *this); // idb
void __thiscall NiMatrix3::EigenSolveSymmetric(NiMatrix3 *this, float *afEigenvalue, NiPoint3 *akEigenvector); // idb
void __thiscall NiMatrix3::LoadBinary(NiMatrix3 *this, NiStream *stream); // idb
void __thiscall NiMatrix3::SaveBinary(NiMatrix3 *this, NiStream *stream); // idb
void __thiscall NiMaterialProperty::CopyMembers(NiMaterialProperty *this, NiMaterialProperty *pDest, NiCloningProcess *kCloning); // idb
void __thiscall NiMaterialProperty::NiMaterialProperty(NiMaterialProperty *this); // idb
NiRTTI *NiMaterialProperty::GetRTTI();
NiObject *__thiscall NiMaterialProperty::CreateClone(NiMaterialProperty *this, NiCloningProcess *kCloning); // idb
void __cdecl NiMaterialProperty::CreateObject();
BOOL __thiscall NiColor::operator!=(NiColor *this, NiColor *c);
NiMaterialProperty *__thiscall NiMaterialProperty::`scalar deleting destructor'(NiMaterialProperty *this, unsigned int a2);
void __thiscall NiMaterialProperty::LoadBinary(NiMaterialProperty *this, NiStream *stream); // idb
void __thiscall NiMaterialProperty::SaveBinary(NiMaterialProperty *this, NiStream *stream); // idb
bool __thiscall NiMaterialProperty::IsEqual(NiMaterialProperty *this, NiObject *pObject); // idb
void __cdecl NiMaterialProperty::_SDMInit(); // idb
void __cdecl NiMaterialProperty::_SDMShutdown(); // idb
void __thiscall NiMaterialProperty::GetViewerStrings(NiMaterialProperty *this, NiTArray<char *> *pStrings); // idb
char *__thiscall NiPoint3::GetViewerString(NiPoint3 *this, const char *pPrefix); // idb
unsigned int *__cdecl NiPoint3::InitSqrtTable(); // idb
void __thiscall NiColor::SaveBinary(NiPoint3 *this, NiStream *stream); // idb
void __thiscall NiVisibleArray::SetAllocatedSize(NiVisibleArray *this, unsigned int uiSize); // idb
void __cdecl NiRenderer::RemoveEffect(NiDynamicEffect *pkEffect); // idb
void __cdecl NiRenderer::RemoveGeometryData(NiGeometryData *pkData); // idb
void __cdecl NiRenderer::RemoveMaterial(NiMaterialProperty *pkMaterial); // idb
void __cdecl NiRenderer::RemoveScreenTextureRendererData(NiScreenTexture *pkScreenTexture); // idb
void __cdecl NiRenderer::RemoveSkinPartitionRendererData(NiSkinPartition *pkSkinPartition); // idb
void __cdecl NiRenderer::RemoveSkinInstance(NiSkinInstance *pkSkinInstance); // idb
char __thiscall NiRenderer::MapWindowPointToBufferPoint(NiRenderer *this, unsigned int uiX, unsigned int uiY, float *fX, float *fY);
NiPixelFormat *__thiscall NiRenderer::FindClosestDepthStencilFormat(NiRenderer *this, NiPixelFormat *pkFrontBufferFormat); // idb
void __cdecl NiRenderer::_SDMShutdown(); // idb
void __thiscall NiRenderer::Do_BeginBatch(NiRenderer *this, NiPropertyState *pkPropertyState, NiDynamicEffectState *pkEffectState); // idb
NiPointer<NiPropertyState> *__thiscall NiGeometry::GetPropertyState(NiGeometry *this, NiPointer<NiPropertyState> *result); // idb
NiPointer<NiDynamicEffectState> *__thiscall NiGeometry::GetEffectState(NiGeometry *this, NiPointer<NiDynamicEffectState> *result); // idb
void __thiscall NiRenderer::NiRenderer(NiRenderer *this); // idb
NiRTTI *NiRenderer::GetRTTI();
void __thiscall NiRenderer::~NiRenderer(NiRenderer *this); // idb
void __thiscall NiRenderer::Do_BatchRenderShape(NiRenderer *this, NiTriShape *pkTriShape); // idb
void __thiscall NiRenderer::Do_BatchRenderStrips(NiRenderer *this, NiTriStrips *pkTriStrips); // idb
void __thiscall NiRenderer::SetCameraData(NiRenderer *this, NiCamera *pkCamera); // idb
NiRenderer *__thiscall NiRenderer::`vector deleting destructor'(NiRenderer *this, unsigned int a2);
void __thiscall NiRenderer::GetViewerStrings(NiRenderer *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiCullingProcess::~NiCullingProcess(NiCullingProcess *this); // idb
NiCullingProcess *__thiscall NiCullingProcess::`scalar deleting destructor'(NiCullingProcess *this, unsigned int a2);
void __thiscall NiCullingProcess::Process(NiCullingProcess *this, NiAVObject *pkObject); // idb
void __thiscall NiCullingProcess::SetFrustum(NiCullingProcess *this, NiFrustum *kFrustum); // idb
void __thiscall NiCullingProcess::NiCullingProcess(NiCullingProcess *this, NiVisibleArray *pkVisibleSet); // idb
void __thiscall NiCullingProcess::NiCullingProcess(NiCullingProcess *this, NiVisibleArray *pkVisibleSet, bool bUseVirtualAppend); // idb
void __thiscall NiCullingProcess::Process(NiCullingProcess *this, NiCamera *pkCamera, NiAVObject *pkScene, NiVisibleArray *pkVisibleSet); // idb
void __cdecl NiDrawVisibleArrayAppend(NiVisibleArray *kVisibleSet); // idb
void __cdecl NiDrawVisibleArray(NiCamera *pkCamera, NiVisibleArray *kVisibleSet); // idb
void __cdecl NiDrawScene(NiCamera *pkCamera, NiAVObject *pkScene, NiCullingProcess *kCuller, NiVisibleArray *pkVisibleSet); // idb
void __thiscall NiProperty::CopyMembers(NiProperty *this, NiProperty *pkDest, NiCloningProcess *kCloning); // idb
char __thiscall NiTexture::IsEqual(NiTexture *this, NiObject *pkObject);
void __thiscall NiProperty::Update(NiProperty *this, float fTime); // idb
void __thiscall NiProperty::LoadBinary(NiProperty *this, NiStream *kStream); // idb
void __thiscall NiProperty::GetViewerStrings(NiProperty *this, NiTArray<char *> *pkStrings); // idb
NiObjectNET *__thiscall NiVertexColorProperty::CreateClone(NiVertexColorProperty *this, NiCloningProcess *kCloning);
NiObjectNET *__cdecl NiVertexColorProperty::CreateObject();
bool __thiscall NiVertexColorProperty::IsEqual(NiVertexColorProperty *this, NiObject *pkObject); // idb
char *__cdecl NiVertexColorProperty::GetViewerString(const char *pcPrefix, NiVertexColorProperty::SourceVertexMode eMode); // idb
void __cdecl NiVertexColorProperty::_SDMInit(); // idb
void __cdecl NiVertexColorProperty::_SDMShutdown(); // idb
void __thiscall NiVertexColorProperty::LoadBinary(NiVertexColorProperty *this, NiStream *kStream); // idb
void __thiscall NiVertexColorProperty::SaveBinary(NiVertexColorProperty *this, NiStream *kStream); // idb
void __thiscall NiVertexColorProperty::GetViewerStrings(NiVertexColorProperty *this, NiTArray<char *> *pkStrings); // idb
bool __thiscall NiAlphaProperty::IsEqual(NiAlphaProperty *this, NiObject *pkObject); // idb
char *__cdecl NiAlphaProperty::GetViewerString(const char *pcPrefix, NiAlphaProperty::AlphaFunction eFunc); // idb
char *__cdecl NiAlphaProperty::GetViewerString(const char *pcPrefix, NiAlphaProperty::TestFunction eFunc); // idb
NiObjectNET *__thiscall NiAlphaProperty::CreateClone(NiAlphaProperty *this, NiCloningProcess *kCloning);
NiObjectNET *__cdecl NiAlphaProperty::CreateObject();
void __cdecl NiAlphaProperty::_SDMInit(); // idb
void __cdecl NiAlphaProperty::_SDMShutdown(); // idb
void __thiscall NiAlphaProperty::LoadBinary(NiAlphaProperty *this, NiStream *kStream); // idb
void __thiscall NiAlphaProperty::SaveBinary(NiAlphaProperty *this, NiStream *kStream); // idb
void __thiscall NiAlphaProperty::GetViewerStrings(NiAlphaProperty *this, NiTArray<char *> *pkStrings); // idb
char *__thiscall NiColor::GetViewerString(NiColor *this, const char *pPrefix); // idb
char *__thiscall NiColorA::GetViewerString(NiColorA *this, const char *pPrefix); // idb
void __thiscall NiPoint3::LoadBinary(NiPoint3 *this, NiStream *stream); // idb
void __thiscall NiColorA::LoadBinary(NiQuaternion *this, NiStream *stream); // idb
void __thiscall NiColorA::SaveBinary(NiColorA *this, NiStream *stream); // idb
char *__cdecl NiFogProperty::GetViewerString(const char *pcPrefix, NiFogProperty::FogFunction eFunc); // idb
NiObjectNET *__thiscall NiFogProperty::CreateClone(NiFogProperty *this, NiCloningProcess *kCloning);
NiObjectNET *__cdecl NiFogProperty::CreateObject();
bool __thiscall NiFogProperty::IsEqual(NiFogProperty *this, NiObject *pkObject); // idb
void __cdecl NiFogProperty::_SDMInit(); // idb
void __cdecl NiFogProperty::_SDMShutdown(); // idb
void __thiscall NiFogProperty::LoadBinary(NiFogProperty *this, NiStream *kStream); // idb
void __thiscall NiFogProperty::SaveBinary(NiFogProperty *this, NiStream *kStream); // idb
void __thiscall NiFogProperty::GetViewerStrings(NiFogProperty *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiAmbientLight::SaveBinary(NiDirectionalLight *this, NiStream *stream); // idb
void __thiscall NiDirectionalLight::NiDirectionalLight(NiDirectionalLight *this); // idb
NiRTTI *NiDirectionalLight::GetRTTI();
void __thiscall NiDirectionalLight::UpdateWorldData(NiDirectionalLight *this); // idb
NiLight *__thiscall NiDirectionalLight::CreateClone(NiDirectionalLight *this, NiCloningProcess *kCloning);
NiLight *__cdecl NiDirectionalLight::CreateObject();
void __thiscall NiDirectionalLight::GetViewerStrings(NiDirectionalLight *this, NiTArray<char *> *pStrings); // idb
void __thiscall NiDynamicEffect::CopyMembers(NiDynamicEffect *this, NiDynamicEffect *pkDest, NiCloningProcess *kCloning); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,NiNode *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiNode *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiNode *> *this, unsigned int a2);
void __thiscall NiDynamicEffect::DetachAllAffectedNodes(NiDynamicEffect *this); // idb
void __thiscall NiDynamicEffect::DetachAllUnaffectedNodes(NiDynamicEffect *this); // idb
char __thiscall NiDynamicEffect::IsEqual(NiDynamicEffect *this, NiObject *pkObject);
char __thiscall NiDynamicEffect::IsUnaffectedNode(NiDynamicEffect *this, NiNode *pkPossibleNode);
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiNode *>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiNode *>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiNode *> *this); // idb
NiTPointerList<NiNode *> *__thiscall NiTPointerList<NiNode *>::`vector deleting destructor'(NiTPointerList<NiNode *> *this, unsigned int a2);
void __thiscall NiDynamicEffect::~NiDynamicEffect(NiDynamicEffect *this); // idb
NiRTTI *NiDynamicEffect::GetRTTI();
void __thiscall NiDynamicEffect::AttachAffectedNode(NiDynamicEffect *this, NiNode *pkAffectedNode); // idb
void __thiscall NiDynamicEffect::LinkObject(NiDynamicEffect *this, NiStream *kStream); // idb
void __thiscall NiDynamicEffect::NiDynamicEffect(NiDynamicEffect *this); // idb
NiDynamicEffect *__thiscall NiDynamicEffect::`vector deleting destructor'(NiDynamicEffect *this, unsigned int a2);
void __thiscall NiDynamicEffect::DetachAffectedNode(NiDynamicEffect *this, NiNode *pkAffectedNode); // idb
void __thiscall NiDynamicEffect::LoadBinary(NiDynamicEffect *this, NiStream *kStream); // idb
void __thiscall NiDynamicEffect::SaveBinary(NiDynamicEffect *this, NiStream *kStream); // idb
void __thiscall NiDynamicEffect::GetViewerStrings(NiDynamicEffect *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiAmbientLight::NiAmbientLight(NiAmbientLight *this); // idb
NiObject *__cdecl NiAmbientLight::CreateObject(); // idb
void __thiscall NiAmbientLight::LoadBinary(NiDirectionalLight *this, NiStream *stream); // idb
void __thiscall NiPointLight::LinkObject(NiPointLight *this, NiStream *stream); // idb
bool __thiscall NiDirectionalLight::IsEqual(NiDirectionalLight *this, NiObject *pObject); // idb
NiRTTI *NiAmbientLight::GetRTTI();
NiLight *__thiscall NiAmbientLight::CreateClone(NiAmbientLight *this, NiCloningProcess *kCloning);
void __thiscall NiAmbientLight::GetViewerStrings(NiAmbientLight *this, NiTArray<char *> *pStrings); // idb
void __thiscall NiRTTI::NiRTTI(NiRTTI *this, const char *pcName, NiRTTI *pkBaseRTTI); // idb
void __thiscall NiSortAdjustNode::NiSortAdjustNode(NiSortAdjustNode *this); // idb
void __thiscall NiSortAdjustNode::ProcessClone(NiSortAdjustNode *this, NiCloningProcess *kCloning); // idb
NiObject *__cdecl NiSortAdjustNode::CreateObject(); // idb
bool __thiscall NiSortAdjustNode::IsEqual(NiSortAdjustNode *this, NiObject *pObject); // idb
NiRTTI *NiSortAdjustNode::GetRTTI();
NiSortAdjustNode *__thiscall NiSortAdjustNode::`vector deleting destructor'(NiSortAdjustNode *this, unsigned int a2);
void __thiscall NiSortAdjustNode::OnVisible(NiSortAdjustNode *this, NiCullingProcess *kCuller); // idb
NiNode *__thiscall NiSortAdjustNode::CreateClone(NiSortAdjustNode *this, NiCloningProcess *kCloning);
void __thiscall NiSortAdjustNode::LinkObject(NiSortAdjustNode *this, NiStream *stream); // idb
void __thiscall NiSortAdjustNode::LoadBinary(NiSortAdjustNode *this, NiStream *stream); // idb
void __thiscall NiSortAdjustNode::SaveBinary(NiSortAdjustNode *this, NiStream *stream); // idb
void __thiscall NiCamera::~NiCamera(NiCamera *this); // idb
void __thiscall NiCamera::SetViewFrustum(NiCamera *this, NiFrustum *kFrustum); // idb
char __thiscall NiCamera::WorldPtToScreenPt(NiCamera *this, NiPoint3 *kPt, float *fBx, float *fBy, float fZeroTolerance);
bool __thiscall NiCamera::IsEqual(NiCamera *this, NiObject *pkObject); // idb
NiRTTI *NiCamera::GetRTTI();
NiCamera *__thiscall NiCamera::`scalar deleting destructor'(NiCamera *this, unsigned int a2);
char __thiscall NiCamera::LookAtWorldPoint(NiCamera *this, NiPoint3 *kWorldPt, NiPoint3 *kWorldUp);
void __thiscall NiCamera::ViewPointToRay(NiCamera *this, float fVx, float fVy, NiPoint3 *kOrigin, NiPoint3 *kDir); // idb
void __thiscall NiCamera::UpdateWorldBound(NiCamera *this); // idb
void __thiscall NiCamera::WorldToCameraMatrix(NiCamera *this); // idb
void __thiscall NiCamera::CopyMembers(NiCamera *this, NiCamera *pkDest, NiCloningProcess *kCloning); // idb
char __thiscall NiCamera::WindowPointToRay(NiCamera *this, int lWx, int lWy, NiPoint3 *kOrigin, NiPoint3 *kDir);
// void __thiscall NiCamera::UpdateWorldData(NiCamera *this); idb
void __thiscall NiCamera::LinkObject(NiCamera *this, NiStream *kStream); // idb
void __thiscall NiCamera::NiCamera(NiCamera *this); // idb
NiObject *__thiscall NiCamera::CreateClone(NiCamera *this, NiCloningProcess *kCloning); // idb
void __cdecl NiCamera::CreateObject();
void __thiscall NiCamera::LoadBinary(NiCamera *this, NiStream *kStream); // idb
void __thiscall NiCamera::SaveBinary(NiCamera *this, NiStream *kStream); // idb
void __thiscall NiCamera::GetViewerStrings(NiCamera *this, NiTArray<char *> *pkStrings); // idb
NiShaderFactory *__cdecl NiShaderFactory::GetInstance(); // idb
bool __cdecl NiShaderFactory::AttachShader(NiGeometry *pkGeometry, const char *pacName, unsigned int uiImplementation); // idb
bool __cdecl NiShaderFactory::AttachShader(NiGeometry *pkGeometry, NiShader *pkShader); // idb
bool __cdecl NiShaderFactory::DetachShader(NiGeometry *pkGeometry); // idb
void __cdecl NiShaderFactory::ReleaseAllShaders(); // idb
char __cdecl NiShaderFactory::RegisterClassCreationCallback(bool (__cdecl *pfnCallback)(const char *, NiRenderer *, int, char **, bool, NiShaderLibrary **));
char __cdecl NiShaderFactory::RegisterRunParserCallback(unsigned int (__cdecl *pfnCallback)(const char *, NiRenderer *, const char *, bool));
unsigned int NiShaderFactory::ReportError(unsigned int eError, int bRecoverable, const char *pacFmt, ...);
char __stdcall NiShaderFactory::Geometry_AttachShader(unsigned int __formal, unsigned int __formala, float *pacName);
void __thiscall NiShaderFactory::NiShaderFactory(NiShaderFactory *this); // idb
void __thiscall NiShaderFactory::~NiShaderFactory(NiShaderFactory *this); // idb
char __cdecl NiShaderFactory::LoadAndRegisterShaderLibrary(const char *pacLibName);
int __cdecl NiShaderFactory::LoadAndRunParserLibrary(const char *pacLibName, const char *pacDirectory, int bRecurseSubFolders);
NiShaderFactory *__thiscall NiShaderFactory::`scalar deleting destructor'(NiShaderFactory *this, unsigned int a2);
void __thiscall NiTArray<NiCollisionGroup::Record *>::SetAt(NiTArray<NiVBChip *> *this, unsigned int uiIndex, NiVBChip *const *element); // idb
NiTArray<NiTexturingProperty::Map *> *__thiscall NiTArray<NiTexturingProperty::Map *>::`vector deleting destructor'(NiTArray<NiTexturingProperty::Map *> *this, unsigned int a2);
NiTArray<NiTexturingProperty::ShaderMap *> *__thiscall NiTArray<NiTexturingProperty::ShaderMap *>::`vector deleting destructor'(NiTArray<NiTexturingProperty::ShaderMap *> *this, unsigned int a2);
void __thiscall NiTexturingProperty::~NiTexturingProperty(NiTexturingProperty *this); // idb
NiRTTI *NiTexturingProperty::GetRTTI();
void __thiscall NiTexturingProperty::SetMultiTexture(NiTexturingProperty *this, NiTexturingProperty::Map *pkMap); // idb
char *__cdecl NiTexturingProperty::GetViewerString(const char *pcPrefix, NiTexturingProperty::ClampMode eMode); // idb
char *__cdecl NiTexturingProperty::GetViewerString(const char *pcPrefix, NiTexturingProperty::FilterMode eMode); // idb
void __thiscall NiTexturingProperty::Map::Map(NiTexturingProperty::Map *this); // idb
void __thiscall NiTexturingProperty::Map::Map(NiTexturingProperty::Map *this, NiTexture *pkTexture, unsigned int uiIndex, NiTexturingProperty::ClampMode eClampMode, NiTexturingProperty::FilterMode eFilterMode, NiTextureTransform *pkTextureTransform); // idb
void __thiscall NiTexturingProperty::Map::Map(NiTexturingProperty::Map *this, NiTexturingProperty::Map *kObj); // idb
char __thiscall NiTexturingProperty::Map::operator==(NiTexturingProperty::Map *this, NiTexturingProperty::Map *kObj);
bool __thiscall NiTexturingProperty::BumpMap::operator==(NiTexturingProperty::BumpMap *this, NiTexturingProperty::BumpMap *kObj); // idb
void __thiscall NiTexturingProperty::NiTexturingProperty(NiTexturingProperty *this); // idb
NiTexturingProperty *__thiscall NiTexturingProperty::`vector deleting destructor'(NiTexturingProperty *this, unsigned int a2);
void __thiscall NiTexturingProperty::NiTexturingProperty(NiTexturingProperty *this, const char *pcTextureName); // idb
void __thiscall NiTexturingProperty::SetDecalMap(NiTexturingProperty *this, unsigned int uiIndex, NiTexturingProperty::Map *pkMap); // idb
void __thiscall NiTexturingProperty::SetShaderMap(NiTexturingProperty *this, unsigned int uiIndex, NiTexturingProperty::ShaderMap *pkMap); // idb
void __cdecl NiTexturingProperty::CreateObject();
void __thiscall NiTexturingProperty::LoadBinary(NiTexturingProperty *this, NiStream *kStream); // idb
void __thiscall NiTexturingProperty::LinkObject(NiTexturingProperty *this, NiStream *kStream); // idb
char __thiscall NiTexturingProperty::RegisterStreamables(NiTexturingProperty *this, NiStream *kStream);
void __thiscall NiTexturingProperty::SaveBinary(NiTexturingProperty *this, NiStream *kStream); // idb
char __thiscall NiTexturingProperty::IsEqual(NiTexturingProperty *this, NiObject *pkObject);
void __cdecl NiTexturingProperty::_SDMInit(); // idb
void __cdecl NiTexturingProperty::_SDMShutdown(); // idb
NiTexturingProperty::ShaderMap *__thiscall NiTexturingProperty::Map::`scalar deleting destructor'(NiTexturingProperty::ShaderMap *this, unsigned int a2);
void __thiscall NiTexturingProperty::Map::LoadBinary(NiTexturingProperty::Map *this, NiStream *kStream); // idb
void __thiscall NiTexturingProperty::Map::SaveBinary(NiTexturingProperty::Map *this, NiStream *kStream); // idb
void __thiscall NiTexturingProperty::BumpMap::LoadBinary(NiTexturingProperty::BumpMap *this, NiStream *kStream); // idb
void __thiscall NiTexturingProperty::BumpMap::SaveBinary(NiTexturingProperty::BumpMap *this, NiStream *kStream); // idb
void __thiscall NiTexturingProperty::ShaderMap::LoadBinary(NiTexturingProperty::ShaderMap *this, NiStream *kStream); // idb
void __thiscall NiTexturingProperty::ShaderMap::SaveBinary(NiTexturingProperty::ShaderMap *this, NiStream *kStream); // idb
void __thiscall NiTexturingProperty::CopyMembers(NiTexturingProperty *this, NiTexturingProperty *pkDest, NiCloningProcess *kCloning); // idb
void __thiscall NiTexturingProperty::GetViewerStrings(NiTexturingProperty *this, NiTArray<char *> *pkStrings); // idb
NiObject *__thiscall NiTexturingProperty::CreateClone(NiTexturingProperty *this, NiCloningProcess *kCloning); // idb
void __thiscall NiTexture::AddTextureToList(NiTexture *this); // idb
void __thiscall NiTexture::RemoveTextureFromList(NiTexture *this); // idb
char __thiscall NiSourceTexture::CreateRendererData(NiSourceTexture *this);
int __thiscall NiSourceTexture::GetWidth(NiSourceTexture *this);
int __thiscall NiSourceTexture::GetHeight(NiSourceTexture *this);
void __thiscall NiSourceTexture::LinkObject(NiSourceTexture *this, NiStream *kStream); // idb
void __thiscall NiSourceCubeMap::PostLinkObject(NiSourceTexture *this, NiStream *kStream); // idb
char __thiscall NiSourceTexture::RegisterStreamables(NiSourceTexture *this, NiStream *kStream);
char __thiscall NiSourceTexture::IsEqual(NiSourceTexture *this, NiObject *pkObject);
NiRTTI *NiTexture::GetRTTI();
NiRTTI *NiSourceTexture::GetRTTI();
void __thiscall NiSourceTexture::~NiSourceTexture(NiSourceTexture *this); // idb
NiSourceTexture *__cdecl NiSourceTexture::Create(const char *pcFilename, NiTexture::FormatPrefs *kPrefs, bool bLoadDirectToRendererHint); // idb
NiSourceTexture *__cdecl NiSourceTexture::Create(NiPixelData *pkPixelData, NiTexture::FormatPrefs *kPrefs); // idb
void __thiscall NiSourceTexture::LoadPixelDataFromFile(NiSourceTexture *this); // idb
NiObjectNET *__cdecl NiSourceTexture::CreateObject();
NiTexture *__thiscall NiTexture::`vector deleting destructor'(NiTexture *this, unsigned int a2);
NiSourceTexture *__thiscall NiSourceTexture::`vector deleting destructor'(NiSourceTexture *this, unsigned int a2);
void __thiscall NiSourceTexture::LoadBinary(NiSourceTexture *this, NiStream *kStream); // idb
void __thiscall NiSourceTexture::SaveBinary(NiSourceTexture *this, NiStream *kStream); // idb
void __thiscall NiSourceTexture::GetViewerStrings(NiSourceTexture *this, NiTArray<char *> *pkStrings); // idb
char __thiscall NiPixelFormat::operator!=(NiPixelFormat *this, NiPixelFormat *kOther);
NiImageConverter *__cdecl NiImageConverter::GetImageConverter(); // idb
void __thiscall NiImageConverter::NiImageConverter(NiImageConverter *this); // idb
void __thiscall NiImageConverter::~NiImageConverter(NiImageConverter *this); // idb
char __thiscall NiImageConverter::ReadImageFileInfo(NiImageConverter *this, const char *pcFilename, NiPixelFormat *kFmt, bool *bMipmap, unsigned int *uiWidth, unsigned int *uiHeight, unsigned int *uiNumFaces);
NiPixelData *__thiscall NiImageConverter::ReadImageFile(NiImageConverter *this, const char *pcFilename, NiPixelData *pkOptDest); // idb
char __stdcall NiImageConverter::CanConvertPixelData(NiPixelFormat *kSrcFmt, NiPixelFormat *kDestFmt);
char *__cdecl NiImageConverter::ConvertFilenameToPlatformSpecific(const char *pcPath); // idb
void __cdecl NiImageConverter::_SDMInit(); // idb
void __cdecl NiImageConverter::_SDMShutdown(); // idb
void __cdecl NiImageConverter::SetImageConverter(NiImageConverter *pkConverter); // idb
NiImageConverter *__thiscall NiImageConverter::`scalar deleting destructor'(NiImageConverter *this, unsigned int a2);
void __stdcall NiImageConverter::ConvertPixelData(NiPixelData *kSrc, NiPixelFormat *kDestFmt, NiPixelData *pkOptDest, bool bMipmap);
void __thiscall NiTriShape::NiTriShape(NiTriShape *this, unsigned __int16 usVertices, NiPoint3 *pkVertex, NiPoint3 *pkNormal, NiColorA *pkColor, NiPoint2 *pkTexture, unsigned __int16 usNumTextureSets, NiGeometryData::DataFlags eNBTMethod, unsigned __int16 usTriangles, unsigned __int16 *pusTriList); // idb
void __thiscall NiTriShape::NiTriShape(NiTriShape *this, NiTriShapeData *pkModelData); // idb
void __thiscall NiTriShape::NiTriShape(NiTriShape *this); // idb
void __thiscall NiTriShape::CopyMembers(NiTriShape *this, NiTriShape *pkDest, NiCloningProcess *kCloning); // idb
NiObject *__cdecl NiTriShape::CreateObject(); // idb
NiRTTI *NiTriShape::GetRTTI();
void __thiscall NiTriShape::GetModelTriangle(NiTriShape *this, unsigned __int16 usTriangle, NiPoint3 **pkP0, NiPoint3 **pkP1, NiPoint3 **pkP2); // idb
NiTriBasedGeom *__thiscall NiTriShape::CreateClone(NiTriShape *this, NiCloningProcess *kCloning);
void __thiscall NiTriShape::RenderImmediate(NiTriShape *this, NiRenderer *pkRenderer); // idb
void __thiscall NiTriShape::GetViewerStrings(NiTriShape *this, NiTArray<char *> *pkStrings); // idb
NiGeometryData::DataFlags __thiscall NSBRequirements::GetBinormalTangentMethod(NSBRequirements *this); // idb
void __thiscall NiRenderTargetGroup::SetRendererData(NiRenderTargetGroup *this, NiRenderTargetGroup::RendererData *pkRendererData); // idb
unsigned int __thiscall NiRenderTargetGroup::GetWidth(NiRenderTargetGroup *this, unsigned int uiIndex); // idb
unsigned int __thiscall NiRenderTargetGroup::GetHeight(NiRenderTargetGroup *this, unsigned int uiIndex); // idb
unsigned int __thiscall NiRenderTargetGroup::GetDepthStencilWidth(NiRenderTargetGroup *this); // idb
unsigned int __thiscall NiRenderTargetGroup::GetDepthStencilHeight(NiRenderTargetGroup *this); // idb
Ni2DBuffer *__thiscall NiRenderTargetGroup::GetBuffer(NiRenderTargetGroup *this, unsigned int uiIndex); // idb
NiBinaryShader::BoneMatrixCalcMethod __thiscall NiRenderTargetGroup::GetDepthStencilBuffer(NSBRequirements *this); // idb
void __thiscall NiRenderTargetGroup::NiRenderTargetGroup(NiRenderTargetGroup *this); // idb
NiRTTI *NiRenderTargetGroup::GetRTTI();
void __thiscall NiRenderTargetGroup::~NiRenderTargetGroup(NiRenderTargetGroup *this); // idb
NiPixelFormat *__thiscall NiRenderTargetGroup::GetPixelFormat(NiRenderTargetGroup *this, unsigned int uiIndex); // idb
NiPixelFormat *__thiscall NiRenderTargetGroup::GetDepthStencilPixelFormat(NiRenderTargetGroup *this); // idb
char __thiscall NiRenderTargetGroup::AttachBuffer(NiRenderTargetGroup *this, Ni2DBuffer *pkBuffer, unsigned int uiIndex);
char __thiscall NiRenderTargetGroup::AttachDepthStencilBuffer(NiRenderTargetGroup *this, NiDepthStencilBuffer *pkDepthBuffer);
Ni2DBuffer::RendererData *__thiscall NiRenderTargetGroup::GetBufferRendererData(NiRenderTargetGroup *this, unsigned int uiIndex); // idb
Ni2DBuffer::RendererData *__thiscall NiRenderTargetGroup::GetDepthStencilBufferRendererData(NiRenderTargetGroup *this); // idb
void __cdecl NiRenderTargetGroup::Create(unsigned int uiNumBuffers, NiRenderer *pkRenderer);
NiRenderTargetGroup *__cdecl NiRenderTargetGroup::Create(Ni2DBuffer *pkBuffer, NiRenderer *pkRenderer, NiDepthStencilBuffer *pkDSBuffer); // idb
NiRenderTargetGroup *__thiscall NiRenderTargetGroup::`scalar deleting destructor'(NiRenderTargetGroup *this, unsigned int a2);
void __thiscall NiRenderTargetGroup::GetViewerStrings(NiRenderTargetGroup *this, NiTArray<char *> *pkStrings); // idb
NiRenderTargetGroup *__cdecl NiRenderTargetGroup::Create(Ni2DBuffer *pkBuffer, NiRenderer *pkRenderer, bool bUseDefaultDepthStencil, bool bCreateCompatibleDepthStencil); // idb
bool __cdecl NiIsPowerOf2(unsigned int uiI); // idb
ID3DXConstantTable *__thiscall NiD3DVertexShader::GetVertexDeclaration(NiD3DHLSLPixelShader *this); // idb
void __thiscall NiRenderedTexture::NiRenderedTexture(NiRenderedTexture *this); // idb
NiRTTI *NiRenderedTexture::GetRTTI();
unsigned int __thiscall NiRenderedTexture::GetWidth(NiRenderedTexture *this); // idb
unsigned int __thiscall NiRenderedTexture::GetHeight(NiRenderedTexture *this); // idb
NiRenderedTexture *__cdecl NiRenderedTexture::Create(unsigned int uiWidth, unsigned int uiHeight, NiRenderer *pkRenderer, NiTexture::FormatPrefs *kPrefs); // idb
NiRenderedTexture *__thiscall NiRenderedTexture::`vector deleting destructor'(NiRenderedTexture *this, unsigned int a2);
void __thiscall NiScreenElementsData::UpdateBound(NiScreenElementsData *this); // idb
NiTriShapeData *__cdecl NiScreenElementsData::CreateObject();
void __thiscall NiTriShapeDynamicData::LinkObject(NiTriShapeDynamicData *this, NiStream *kStream); // idb
char __thiscall NiScreenElementsData::IsEqual(NiScreenElementsData *this, NiObject *pkObject);
unsigned __int16 __thiscall NiGeometryData::GetActiveVertexCount(NiGeometryData *this); // idb
unsigned __int16 __thiscall NiTriBasedGeomData::GetActiveTriangleCount(NiTriBasedGeomData *this); // idb
NiRTTI *NiScreenElementsData::GetRTTI();
NiScreenElementsData *__thiscall NiScreenElementsData::`scalar deleting destructor'(NiScreenElementsData *this, unsigned int a2);
int __thiscall NiScreenElementsData::Insert(NiScreenElementsData *this, unsigned __int16 usNumVertices, int usNumTriangles, const unsigned __int16 *ausTriList);
void __thiscall NiScreenElementsData::RemoveAll(NiScreenElementsData *this); // idb
char __thiscall NiScreenElementsData::SetVertex(NiScreenElementsData *this, int iPolygon, int iVertex, NiPoint2 *kValue);
char __thiscall NiScreenElementsData::SetRectangle(NiScreenElementsData *this, int iPolygon, float fLeft, float fTop, float fWidth, float fHeight);
char __thiscall NiScreenElementsData::GetRectangle(NiScreenElementsData *this, int iPolygon, float *fLeft, float *fTop, float *fWidth, float *fHeight);
char __thiscall NiScreenElementsData::SetColors(NiScreenElementsData *this, int iPolygon, NiColorA *kCommonValue);
char __thiscall NiScreenElementsData::SetTexture(NiScreenElementsData *this, int iPolygon, int iVertex, unsigned __int16 usSet, NiPoint2 *kValue);
char __thiscall NiScreenElementsData::GetTexture(NiScreenElementsData *this, int iPolygon, int iVertex, unsigned __int16 usSet, NiPoint2 *kValue);
char __thiscall NiScreenElementsData::SetTextures(NiScreenElementsData *this, int iPolygon, unsigned __int16 usSet, float fLeft, float fTop, float fRight, float fBottom);
char __thiscall NiScreenElementsData::SetTextures(NiScreenElementsData *this, int iPolygon, unsigned __int16 usSet, NiPoint2 *kUpperLeft, NiPoint2 *kLowerLeft, NiPoint2 *kLowerRight, NiPoint2 *kUpperRight);
char __thiscall NiScreenElementsData::GetTextures(NiScreenElementsData *this, int iPolygon, unsigned __int16 usSet, NiPoint2 *kUpperLeft, NiPoint2 *kLowerLeft, NiPoint2 *kLowerRight, NiPoint2 *kUpperRight);
NiPoint3 *__thiscall NiScreenElementsData::GetVertices(NiScreenElementsData *this, int iPolygon); // idb
NiPoint2 *__thiscall NiScreenElementsData::GetTextures(NiScreenElementsData *this, int iPolygon, unsigned __int16 usSet); // idb
void __thiscall NiScreenElementsData::NiScreenElementsData(NiScreenElementsData *this, bool bWantNormals, bool bWantColors, unsigned __int16 usNumTextureSets, int iMaxPQuantity, int iPGrowBy, int iMaxVQuantity, int iVGrowBy, int iMaxTQuantity, int iTGrowBy); // idb
void __thiscall NiScreenElementsData::LoadBinary(NiScreenElementsData *this, NiStream *kStream); // idb
void __thiscall NiScreenElementsData::SaveBinary(NiScreenElementsData *this, NiStream *kStream); // idb
void __thiscall NiScreenElementsData::GetViewerStrings(NiScreenElementsData *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiScreenElements::~NiScreenElements(NiScreenElements *this); // idb
void __thiscall NiScreenElements::Draw(NiScreenElements *this, NiRenderer *pkRenderer); // idb
NiObject *__cdecl NiScreenElements::CreateObject(); // idb
void __thiscall NiScreenElements::LoadBinary(NiScreenElements *this, NiStream *kStream); // idb
void __thiscall NiScreenGeometry::SaveBinary(NiScreenElements *this, NiStream *kStream); // idb
char __thiscall NiScreenGeometry::IsEqual(NiScreenElements *this, NiObject *pkObject);
NiRTTI *NiScreenElements::GetRTTI();
void __thiscall NiScreenElements::NiScreenElements(NiScreenElements *this, NiScreenElementsData *pkModelData); // idb
NiScreenElements *__thiscall NiScreenElements::`vector deleting destructor'(NiScreenElements *this, unsigned int a2);
NiTriShape *__thiscall NiScreenElements::CreateClone(NiScreenElements *this, NiCloningProcess *kCloning);
void __thiscall NiScreenElements::GetViewerStrings(NiScreenElements *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiExtraData::NiExtraData(NiExtraData *this); // idb
void __thiscall NiExtraData::~NiExtraData(NiExtraData *this); // idb
void __thiscall NiAccumulator::FinishAccumulating(NiExtraData *this); // idb
NiObject *__cdecl NiExtraData::CreateObject(); // idb
void __thiscall NiExtraData::SaveBinary(NiExtraData *this, NiStream *kStream); // idb
bool __thiscall NiExtraData::IsEqual(NiExtraData *this, NiObject *pObject); // idb
NiRTTI *NiExtraData::GetRTTI();
NiExtraData *__thiscall NiExtraData::`vector deleting destructor'(NiExtraData *this, unsigned int a2);
void __thiscall NiExtraData::SetName(NiExtraData *this, const char *pcName); // idb
void __thiscall NiExtraData::CopyMembers(NiExtraData *this, NiExtraData *pDest, NiCloningProcess *kCloning); // idb
void __thiscall NiExtraData::LinkObject(NiExtraData *this, NiStream *kStream); // idb
void __thiscall NiExtraData::LoadBinary(NiExtraData *this, NiStream *kStream); // idb
void __thiscall NiExtraData::GetViewerStrings(NiExtraData *this, NiTArray<char *> *pkStrings); // idb
char __thiscall NiBinaryExtraData::IsEqual(NiBinaryExtraData *this, NiObject *pObject);
NiObject *__cdecl NiBinaryExtraData::CreateObject(); // idb
NiExtraData *__thiscall NiBinaryExtraData::CreateClone(NiBinaryExtraData *this, NiCloningProcess *kCloning);
void __thiscall NiBinaryExtraData::LoadBinary(NiBinaryExtraData *this, NiStream *kStream); // idb
void __thiscall NiBinaryExtraData::SaveBinary(NiBinaryExtraData *this, NiStream *kStream); // idb
void __thiscall NiBinaryExtraData::GetViewerStrings(NiBinaryExtraData *this, NiTArray<char *> *pStrings); // idb
void __thiscall NiShader::NiShader(NiShader *this); // idb
NiRTTI *NiShader::GetRTTI();
void __thiscall NiShader::~NiShader(NiShader *this); // idb
NiShader *__thiscall NiShader::`vector deleting destructor'(NiShader *this, unsigned int a2);
void __thiscall NiShader::SaveBinary(NiShader *this, NiStream *kStream); // idb
void __thiscall NiShader::LoadBinary(NiShader *this, NiStream *kStream); // idb
BOOL __thiscall NiPixelFormat::GetCompressed(NiPixelFormat *this);
void __thiscall NiPixelData::LinkObject(NiPixelData *this, NiStream *kStream); // idb
char __thiscall NiPixelData::RegisterStreamables(NiPixelData *this, NiStream *kStream);
char __thiscall NiPixelData::IsEqual(NiPixelData *this, NiObject *pkObject);
NiRTTI *NiPixelData::GetRTTI();
void __thiscall NiPixelData::NiPixelData(NiPixelData *this, NiPixelData *kSrc); // idb
void __thiscall NiPixelData::NiPixelData(NiPixelData *this, unsigned int uiWidth, unsigned int uiHeight, NiPixelFormat *kFormat, unsigned int uiMipmapLevels, unsigned int uiFaces); // idb
void __thiscall NiPixelData::~NiPixelData(NiPixelData *this); // idb
NiObject *__cdecl NiPixelData::CreateObject(); // idb
NiPixelData *__thiscall NiPixelData::`vector deleting destructor'(NiPixelData *this, unsigned int a2);
void __thiscall NiPixelData::LoadBinary(NiPixelData *this, NiStream *kStream); // idb
void __thiscall NiPixelData::SaveBinary(NiPixelData *this, NiStream *kStream); // idb
void __thiscall NiPixelData::GetViewerStrings(NiPixelData *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiPixelFormat::NiPixelFormat(NiPixelFormat *this, NiPixelFormat *kFormat); // idb
void __thiscall NiPixelFormat::ConvertOldPixelFormat(NiPixelFormat *this, NiPixelFormat::Format eFormat, char ucBPP, unsigned int *auiColorMasks); // idb
void __thiscall NiPixelFormat::NiPixelFormat(NiPixelFormat *this); // idb
NiPixelFormat *__cdecl NiPixelFormat::CreateFromRGBAMasks(NiPixelFormat *result, char ucBitsPerPixel, unsigned int uiMaskRed, unsigned int uiMaskGreen, unsigned int uiMaskBlue, unsigned int uiMaskAlpha); // idb
void __thiscall NiPixelFormat::LoadBinary(NiPixelFormat *this, NiStream *kStream); // idb
void __thiscall NiPixelFormat::SaveBinary(NiPixelFormat *this, NiStream *kStream); // idb
void __thiscall NiZBufferProperty::LinkObject(NiZBufferProperty *this, NiStream *kStream); // idb
bool __thiscall NiZBufferProperty::IsEqual(NiZBufferProperty *this, NiObject *pkObject); // idb
NiObjectNET *__thiscall NiZBufferProperty::CreateClone(NiZBufferProperty *this, NiCloningProcess *kCloning);
NiObjectNET *__cdecl NiZBufferProperty::CreateObject();
void __cdecl NiZBufferProperty::_SDMInit(); // idb
void __cdecl NiZBufferProperty::_SDMShutdown(); // idb
void __thiscall NiZBufferProperty::LoadBinary(NiZBufferProperty *this, NiStream *kStream); // idb
void __thiscall NiZBufferProperty::SaveBinary(NiZBufferProperty *this, NiStream *kStream); // idb
void __thiscall NiZBufferProperty::GetViewerStrings(NiZBufferProperty *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiAlphaAccumulator::NiAlphaAccumulator(NiAlphaAccumulator *this); // idb
NiBackToFrontAccumulator *__cdecl NiAlphaAccumulator::CreateObject();
void __thiscall NiAlphaAccumulator::LoadBinary(NiAlphaAccumulator *this, NiStream *kStream); // idb
bool __thiscall NiAlphaAccumulator::IsEqual(NiAlphaAccumulator *this, NiObject *pkObject); // idb
NiRTTI *NiAlphaAccumulator::GetRTTI();
NiAlphaAccumulator *__thiscall NiAlphaAccumulator::`vector deleting destructor'(NiAlphaAccumulator *this, unsigned int a2);
void __thiscall NiAlphaAccumulator::Sort(NiAlphaAccumulator *this); // idb
NiBackToFrontAccumulator *__thiscall NiAlphaAccumulator::CreateClone(NiAlphaAccumulator *this, NiCloningProcess *kCloning);
void __thiscall NiAlphaAccumulator::RegisterObjectArray(NiAlphaAccumulator *this, NiVisibleArray *kArray); // idb
void __thiscall NiFrustum::NiFrustum(NiFrustum *this, bool bOrtho); // idb
void __thiscall NiFrustum::NiFrustum(NiFrustum *this, float fLeft, float fRight, float fTop, float fBottom, float fNear, float fFar, bool bOrtho); // idb
char *__thiscall NiFrustum::GetViewerString(NiFrustum *this, const char *pcPrefix); // idb
void __thiscall NiIntegersExtraData::LinkObject(NPTR_ISShader_v2 *this, NiStream *stream); // idb
bool __thiscall NiVertWeightsExtraData::RegisterStreamables(NPTR_ISShader_v2 *this, NiStream *stream); // idb
bool __thiscall NiIntegerExtraData::IsEqual(NiIntegerExtraData *this, NiObject *pObject); // idb
NiExtraData *__thiscall NiIntegerExtraData::CreateClone(NiIntegerExtraData *this, NiCloningProcess *kCloning);
NiObject *__cdecl NiIntegerExtraData::CreateObject(); // idb
void __thiscall NiIntegerExtraData::SaveBinary(NiIntegerExtraData *this, NiStream *kStream); // idb
void __thiscall NiIntegerExtraData::GetViewerStrings(NiIntegerExtraData *this, NiTArray<char *> *pStrings); // idb
void __thiscall NiStringExtraData::LoadBinary(NiStringExtraData *this, NiStream *stream); // idb
void __thiscall NiStringExtraData::SaveBinary(NiStringExtraData *this, NiStream *stream); // idb
char __thiscall NiStringExtraData::IsEqual(NiStringExtraData *this, NiObject *pObject);
NiRTTI *NiStringExtraData::GetRTTI();
NiObject *__cdecl NiStringExtraData::CreateObject(); // idb
NiStringExtraData *__thiscall NiStringExtraData::`scalar deleting destructor'(NiStringExtraData *this, unsigned int a2);
void __thiscall NiStringExtraData::NiStringExtraData(NiStringExtraData *this, const char *pString); // idb
NiExtraData *__thiscall NiStringExtraData::CreateClone(NiStringExtraData *this, NiCloningProcess *kCloning);
void __thiscall NiStringExtraData::GetViewerStrings(NiStringExtraData *this, NiTArray<char *> *pStrings); // idb
BOOL __thiscall NiBound::operator==(NiBound *this, NiBound *bound);
void __thiscall NiBound::ComputeFromData(NiBound *this, int iQuantity, NiPoint3 *pkData); // idb
void __thiscall NiBound::Merge(NiBound *this, NiBound *pBound); // idb
void __thiscall NiBound::Update(NiBound *this, NiBound *bound, NiTransform *xform); // idb
char __thiscall NiTimeController::IsEqual(NiTimeController *this, NiObject *pkObject);
unsigned int __thiscall NiTimeController::ItemsInList(NiTimeController *this); // idb
void __thiscall NiTimeController::Start(NiTimeController *this, float fTime); // idb
void __thiscall NiTimeController::Stop(NiTimeController *this); // idb
double __thiscall NiTimeController::ComputeScaledTime(NiTimeController *this, float fTime);
void __thiscall NiTimeController::CopyMembers(NiTimeController *this, NiTimeController *pkDest, NiCloningProcess *kCloning); // idb
void __thiscall NiTimeController::ProcessClone(NiTimeController *this, NiCloningProcess *kCloning); // idb
char __thiscall NiTimeController::RegisterStreamables(NiTimeController *this, NiStream *kStream);
char *__cdecl NiTimeController::GetViewerString(const char *pcPrefix, NiTimeController::CycleType eType); // idb
void __thiscall NiTimeController::NiTimeController(NiTimeController *this); // idb
NiRTTI *NiTimeController::GetRTTI();
void __thiscall NiTimeController::~NiTimeController(NiTimeController *this); // idb
void __cdecl NiTimeController::StartAnimations(NiObjectNET *pkObj, float fTime); // idb
void __thiscall NiTimeController::SetTarget(NiTimeController *this, NiObjectNET *pkTarget); // idb
void __thiscall NiTimeController::LinkObject(NiTimeController *this, NiStream *kStream); // idb
void __thiscall NiTimeController::LoadBinary(NiTimeController *this, NiStream *kStream); // idb
void __thiscall NiTimeController::SaveBinary(NiTimeController *this, NiStream *kStream); // idb
void __thiscall NiTimeController::GetViewerStrings(NiTimeController *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiPoint2::LoadBinary(NiPoint2 *this, NiStream *stream); // idb
void __thiscall NiPoint2::SaveBinary(NiPoint2 *this, NiStream *stream); // idb
char __thiscall NiRangeLODData::IsEqual(NiRangeLODData *this, NiObject *pkObject);
NiRTTI *NiRangeLODData::GetRTTI();
void __thiscall NiRangeLODData::NiRangeLODData(NiRangeLODData *this); // idb
NiRangeLODData *__thiscall NiRangeLODData::`scalar deleting destructor'(NiRangeLODData *this, unsigned int a2);
void __thiscall NiRangeLODData::UpdateWorldData(NiRangeLODData *this, NiLODNode *pkLOD); // idb
void __thiscall NiRangeLODData::SetNumRanges(NiRangeLODData *this, unsigned int uiNumRanges); // idb
unsigned int __thiscall NiRangeLODData::GetLODLevel(NiRangeLODData *this, NiCamera *pkCamera, NiLODNode *pkLOD);
int __thiscall NiRangeLODData::GetLODIndex(NiRangeLODData *this, int iLODLevel); // idb
NiLODData *__cdecl NiRangeLODData::CreateObject();
NiRangeLODData *__thiscall NiRangeLODData::Duplicate(NiRangeLODData *this);
NiRangeLODData *__thiscall NiRangeLODData::CreateClone(NiRangeLODData *this, NiCloningProcess *kCloning);
void __thiscall NiRangeLODData::SaveBinary(NiRangeLODData *this, NiStream *kStream); // idb
void __thiscall NiRangeLODData::LoadBinary(NiRangeLODData *this, NiStream *kStream); // idb
void __thiscall NiRangeLODData::GetViewerStrings(NiRangeLODData *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiLODNode::UpdateWorldData(NiLODNode *this); // idb
void __thiscall NiLODNode::OnVisible(NiLODNode *this, NiCullingProcess *kCuller); // idb
void __thiscall NiLODNode::UpdateAllChildren(NiLODNode *this); // idb
void __thiscall NiLODNode::LinkObject(NiLODNode *this, NiStream *kStream); // idb
char __thiscall NiLODNode::RegisterStreamables(NiLODNode *this, NiStream *kStream);
void __thiscall NiLODNode::SaveBinary(NiLODNode *this, NiStream *kStream); // idb
NiRTTI *NiLODNode::GetRTTI();
void __thiscall NiLODNode::CopyMembers(NiLODNode *this, NiLODNode *pkDest, NiCloningProcess *kCloning); // idb
NiSwitchNode *__cdecl NiLODNode::CreateObject();
char __thiscall NiLODNode::IsEqual(NiLODNode *this, NiObject *pkObject);
NiLODNode *__thiscall NiLODNode::`scalar deleting destructor'(NiLODNode *this, unsigned int a2);
NiLODNode *__thiscall NiLODNode::CreateClone(NiLODNode *this, NiCloningProcess *kCloning);
void __thiscall NiLODNode::LoadBinary(NiLODNode *this, NiStream *kStream); // idb
void __thiscall NiLODNode::GetViewerStrings(NiLODNode *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiGeometry::OnVisible(NiGeometry *this, NiCullingProcess *kCuller); // idb
void __thiscall NiGeometry::CalculateNormals(NiGeometry *this); // idb
void __thiscall NiGeometry::UpdateWorldBound(NiGeometry *this); // idb
void __thiscall NiGeometry::UpdateEffectsDownward(NiGeometry *this, NiDynamicEffectState *pkParentState); // idb
void __thiscall NiGeometry::ApplyTransform(NiGeometry *this, NiMatrix3 *kMat, NiPoint3 *kTrn, bool bOnLeft); // idb
void __thiscall NiGeometry::CopyMembers(NiGeometry *this, NiGeometry *pkDest, NiCloningProcess *kCloning); // idb
char __thiscall NiGeometry::RegisterStreamables(NiGeometry *this, NiStream *kStream);
char __thiscall NiGeometry::IsEqual(NiGeometry *this, NiObject *pkObject);
void __thiscall NiGeometry::NiGeometry(NiGeometry *this, NiGeometryData *pkModelData); // idb
NiRTTI *NiGeometry::GetRTTI();
void __thiscall NiGeometry::NiGeometry(NiGeometry *this); // idb
void __thiscall NiGeometry::~NiGeometry(NiGeometry *this); // idb
void __thiscall NiGeometry::RenderImmediate(NiGeometry *this, NiRenderer *pkRenderer); // idb
void __thiscall NiGeometry::SetModelData(NiGeometry *this, NiGeometryData *pkModelData); // idb
void __thiscall NiGeometry::UpdatePropertiesDownward(NiGeometry *this, NiPropertyState *pkParentState); // idb
void __thiscall NiGeometry::SetSelectiveUpdateFlags(NiGeometry *this, bool *bSelectiveUpdate, bool bSelectiveUpdateTransforms, bool *bRigid); // idb
void __thiscall NiGeometry::CalculateConsistency(NiGeometry *this, bool bTool); // idb
void __thiscall NiGeometry::PurgeRendererData(NiGeometry *this, NiRenderer *pkRenderer); // idb
void __thiscall NiGeometry::ProcessClone(NiGeometry *this, NiCloningProcess *kCloning); // idb
void __thiscall NiGeometry::PostLinkObject(NiGeometry *this, NiStream *kStream); // idb
void __thiscall NiGeometry::LinkObject(NiGeometry *this, NiStream *kStream); // idb
void __thiscall NiGeometry::LoadBinary(NiGeometry *this, NiStream *kStream); // idb
void __thiscall NiGeometry::SaveBinary(NiGeometry *this, NiStream *kStream); // idb
void __thiscall NiGeometry::GetViewerStrings(NiGeometry *this, NiTArray<char *> *pkStrings); // idb
int __cdecl NiSkinPartition::VertexInteractions::CompareWeights(const void *pv0, const void *pv1); // idb
int __cdecl NiSkinPartition::BoneSet::CompareBones(const void *pv0, const void *pv1); // idb
int __thiscall NiSkinPartition::Partition::GetStripLengthSum(NiSkinPartition::Partition *this);
void __thiscall NiSkinPartition::NiSkinPartition(NiSkinPartition *this); // idb
NiObject *__cdecl NiSkinPartition::CreateObject(); // idb
char __thiscall NiSkinPartition::IsEqual(NiSkinPartition *this, NiObject *pkObject);
void __thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,float>::SetAt(NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,float> *this, unsigned int key, float val); // idb
void __stdcall NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,float>::SetValue(NiTMapItem<unsigned int,float> *pkItem, unsigned int key, float val);
void __thiscall NiTSet<unsigned short>::Realloc(NiTSet<unsigned short> *this, unsigned int uiNewSize); // idb
NiRTTI *NiSkinPartition::GetRTTI();
void __thiscall NiSkinPartition::VertexInteractions::Unitize(NiSkinPartition::VertexInteractions *this); // idb
char __thiscall NiSkinPartition::BoneSet::Contains(NiSkinPartition::BoneSet *this, NiSkinPartition::BoneSet *kThat);
char __thiscall NiSkinPartition::BoneSet::ContainsVertex(NiSkinPartition::BoneSet *this, NiSkinPartition::VertexInteractions *kVertex);
int __thiscall NiSkinPartition::BoneSetMerger::GetNext(NiSkinPartition::BoneSetMerger *this);
unsigned __int16 *__thiscall NiSkinPartition::Partition::CreateVertexMap(NiSkinPartition::Partition *this, NiSkinPartition::TriangleSet *kTriangles, NiTriBasedGeomData *pkTriData); // idb
void __thiscall NiSkinPartition::Partition::CreateTriangleList(NiSkinPartition::Partition *this, NiSkinPartition::TriangleSet *kTriangles, NiTriBasedGeomData *pkTriData, const unsigned __int16 *pusVertexPartitionIndex); // idb
CPostProcessEffect *__thiscall NiSkinPartition::`vector deleting destructor'(NiSkinPartition *this, unsigned int a2);
void __stdcall NiSkinPartition::MakeBoneMap(NiTPointerMap<unsigned int,float> *kMap, const unsigned __int16 *pusTriangle, NiSkinPartition::VertexInteractions *pkVertexInteraction);
void *__thiscall NiSkinPartition::Partition::`vector deleting destructor'(NiSkinPartition::Partition *this, unsigned int); // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,float> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,float>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,float> *this, unsigned int a2);
void __thiscall NiSkinPartition::BoneSet::Merge(NiSkinPartition::BoneSet *this, NiSkinPartition::BoneSet *kThat); // idb
void __thiscall NiSkinPartition::TriangleSet::AddTriangles(NiSkinPartition::TriangleSet *this, unsigned int uiPartition, const unsigned int *puiTriangleToPartition, unsigned int uiTriangles); // idb
void __thiscall NiSkinPartition::Partition::Create(NiSkinPartition::Partition *this, NiSkinPartition::TriangleSet *kTriangles, NiSkinPartition::BoneSet *kBones, NiTriBasedGeomData *pkTriData, NiSkinPartition::VertexInteractions *pkVertexInteraction, bool bNeedPalette, bool bForcePalette, char ucBonesPerVertex, unsigned int uiMaxBones); // idb
void __thiscall NiSkinPartition::Partition::LoadBinary(NiSkinPartition::Partition *this, NiStream *kStream); // idb
void __thiscall NiSkinPartition::Partition::SaveBinary(NiSkinPartition::Partition *this, NiStream *kStream); // idb
NiSkinPartition::VertexInteractions *__stdcall NiSkinPartition::CreateVertexInteractions(unsigned int uiVertices, NiSkinData *pkSkinData);
void __stdcall NiSkinPartition::MergeBoneSets(char ucBonesPerPartition, NiTSet<NiSkinPartition::BoneSet *> *kBoneSets);
unsigned int __cdecl NiSkinPartition::AssignTriangle(NiTSet<NiSkinPartition::BoneSet *> *kBoneSets, const unsigned __int16 *pusTriangle, NiSkinPartition::VertexInteractions *pkVertexInteraction, bool *pbAssigned, bool bAssign);
void __thiscall NiSkinPartition::LoadBinary(NiSkinPartition *this, NiStream *kStream); // idb
void __thiscall NiSkinPartition::SaveBinary(NiSkinPartition *this, NiStream *kStream); // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<unsigned int,float>::`scalar deleting destructor'(NiTPointerMap<unsigned int,float> *this, unsigned int a2);
char __stdcall NiSkinPartition::RemoveExcessInteractions(NiTriBasedGeomData *pkTriData, char ucBonesPerPartition, char ucBonesPerVertex, NiSkinPartition::VertexInteractions *pkVertexInteraction);
void __stdcall NiSkinPartition::CreateInitialBoneSets(NiTriBasedGeomData *pkTriData, NiSkinPartition::VertexInteractions *pkVertexInteraction, NiTSet<NiSkinPartition::BoneSet *> *kBoneSets);
void __thiscall NiSkinPartition::MakeBoneSets(NiSkinPartition *this, NiTriBasedGeomData *pkTriData, NiSkinData *pkSkinData, char ucBonesPerPartition, NiSkinPartition::VertexInteractions *pkVertexInteraction, NiTSet<NiSkinPartition::BoneSet *> *kBoneSets, unsigned int **puiTriangleToPartition); // idb
bool __thiscall NiSkinPartition::MakePartitions(NiSkinPartition *this, NiTriBasedGeomData *pkTriData, NiSkinData *pkSkinData, char ucBonesPerPartition, char ucBonesPerVertex, bool bForcePalette); // idb
void __thiscall NiTriBasedGeomData::NiTriBasedGeomData(NiTriBasedGeomData *this, unsigned __int16 usVertices, NiPoint3 *pkVertex, NiPoint3 *pkNormal, NiColorA *pkColor, NiPoint2 *pkTexture, unsigned __int16 usNumTextureSets, NiGeometryData::DataFlags eNBTMethod, unsigned __int16 usTriangles); // idb
void __thiscall NiTriBasedGeomData::NiTriBasedGeomData(NiTriBasedGeomData *this); // idb
void __thiscall NiTriBasedGeomData::~NiTriBasedGeomData(NiTriBasedGeomData *this); // idb
void __thiscall NiScreenGeometryData::LinkObject(NiTriBasedGeomData *this, NiStream *kStream); // idb
bool __thiscall NiTriBasedGeomData::IsEqual(NiTriBasedGeomData *this, NiObject *pkObject); // idb
NiRTTI *NiTriBasedGeomData::GetRTTI();
NiTriBasedGeomData *__thiscall NiTriBasedGeomData::`scalar deleting destructor'(NiTriBasedGeomData *this, unsigned int a2);
void __thiscall NiTriBasedGeomData::LoadBinary(NiTriBasedGeomData *this, NiStream *kStream); // idb
void __thiscall NiTriBasedGeomData::SaveBinary(NiTriBasedGeomData *this, NiStream *kStream); // idb
void __thiscall NiTriBasedGeomData::GetViewerStrings(NiTriBasedGeomData *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiTriBasedGeom::NiTriBasedGeom(NiTriBasedGeom *this, NiTriBasedGeomData *pkModelData); // idb
void __thiscall NiTriBasedGeom::NiTriBasedGeom(NiTriBasedGeom *this); // idb
void __thiscall NiTriBasedGeom::~NiTriBasedGeom(NiTriBasedGeom *this); // idb
void __thiscall NiTriBasedGeom::LoadBinary(NiTriBasedGeom *this, NiStream *kStream); // idb
char __thiscall NiParticles::RegisterStreamables(NiTriBasedGeom *this, NiStream *kStream);
void __thiscall NiTriBasedGeom::SaveBinary(NiTriBasedGeom *this, NiStream *kStream); // idb
NiRTTI *NiTriBasedGeom::GetRTTI();
NiTriBasedGeom *__thiscall NiTriBasedGeom::`scalar deleting destructor'(NiTriBasedGeom *this, unsigned int a2);
void __thiscall NiTriBasedGeom::GetViewerStrings(NiTriBasedGeom *this, NiTArray<char *> *pkStrings); // idb
int __cdecl CompareBoneNames(const void *pvName0, const void *pvName1); // idb
char __thiscall NiSkinInstance::NeedClone(NiSkinInstance *this, NiCloningProcess *kCloning);
void __thiscall NiSkinInstance::LoadBinary(NiSkinInstance *this, NiStream *kStream); // idb
void __thiscall NiSkinInstance::LinkObject(NiSkinInstance *this, NiStream *kStream); // idb
char __thiscall NiSkinInstance::RegisterStreamables(NiSkinInstance *this, NiStream *kStream);
bool __thiscall NiSkinInstance::IsEqual(NiSkinInstance *this, NiObject *pkObject); // idb
void __thiscall NiSkinInstance::UpdateModelBound(NiSkinInstance *this, NiBound *kBound); // idb
void __thiscall NiSkinInstance::CopyMembers(NiSkinInstance *this, NiSkinInstance *pkDest, NiCloningProcess *kCloning); // idb
NiObject *__cdecl NiSkinInstance::CreateObject(); // idb
void __thiscall NiSkinInstance::PostLinkObject(NiSkinInstance *this, NiStream *kStream); // idb
void __thiscall NiSkinInstance::SaveBinary(NiSkinInstance *this, NiStream *kStream); // idb
NiSkinInstance *__thiscall NiSkinInstance::CreateClone(NiSkinInstance *this, NiCloningProcess *kCloning);
void __thiscall NiSkinInstance::GetViewerStrings(NiSkinInstance *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiSkinInstance::~NiSkinInstance(NiSkinInstance *this); // idb
void __thiscall NiSkinInstance::Deform(NiSkinInstance *this, NiPoint3 *pkSrcVertex, NiPoint3 *pkSrcNormal, unsigned int uiVertices, NiPoint3 *pkDstVertex, NiPoint3 *pkDstNormal, NiPoint3 *pkDstBinormal, NiPoint3 *pkDstTangent, unsigned int uiStride); // idb
void __thiscall NiAccumulator::NiAccumulator(NiAccumulator *this); // idb
void __thiscall IDirectMessenger::SetMessageNum(NSBRequirements *this, unsigned int uiVersion); // idb
void __thiscall NiCollisionObject::~NiCollisionObject(NiCollisionObject *this); // idb
void __thiscall NiInterpolator::CopyMembers(NiCollisionObject *this, NiCollisionObject *pDest, NiCloningProcess *kCloning); // idb
void __thiscall NiCollisionObject::LoadBinary(NiCollisionObject *this, NiStream *kStream); // idb
void __thiscall NiCollisionObject::LinkObject(NiCollisionObject *this, NiStream *kStream); // idb
char __thiscall NiCollisionObject::RegisterStreamables(NiCollisionObject *this, NiStream *kStream);
void __thiscall NiCollisionObject::SaveBinary(NiCollisionObject *this, NiStream *kStream); // idb
char __thiscall NiCollisionObject::IsEqual(NiCollisionObject *this, NiObject *pkObject);
NiRTTI *NiCollisionObject::GetRTTI();
void __thiscall NiCollisionObject::SetSceneGraphObject(NiCollisionObject *this, NiAVObject *pkSceneObject); // idb
void __thiscall NiCollisionObject::NiCollisionObject(NiCollisionObject *this, NiAVObject *pkSceneObject); // idb
void __thiscall NiCollisionObject::GetViewerStrings(NiCollisionObject *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiCollisionObject::AddViewerStrings(NiCollisionObject *this, NiTArray<char *> *pkStrings); // idb
void __cdecl NiTexture::RendererData::_SDMInit(); // idb
void __thiscall NiTexture::LoadBinary(NiTexture *this, NiStream *kStream); // idb
void __thiscall NiProperty::LinkObject(NiTexture *this, NiStream *kStream); // idb
char __thiscall NiTexture::RegisterStreamables(NiTexture *this, NiStream *kStream);
void __thiscall NiTexture::SaveBinary(NiTexture *this, NiStream *kStream); // idb
int __thiscall NiPixelFormat::GetMask(NiPixelFormat *this, NiPixelFormat::Component eComp);
void __cdecl NiTexture::RendererData::_SDMShutdown(); // idb
void __cdecl NiTexture::RendererData::SetTextureReplacementFormat(NiPixelFormat *kFormat); // idb
NiPixelData *__cdecl NiTexture::RendererData::MakeDataFromColors(NiColorA *kTopLeftColor, NiColorA *kBottomLeftColor, NiPixelFormat *kDesc, unsigned int uiNumFaces); // idb
NiPixelData *__cdecl NiTexture::RendererData::DefaultTextureFailureCallback(NiTexture *pkTexture, NiTexture::RendererData::CreationFailure eFailure); // idb
NiPixelData *__cdecl NiTexture::RendererData::GetReplacementData(NiTexture *pkTexture, NiTexture::RendererData::CreationFailure eFailure);
void __thiscall NiTexture::GetViewerStrings(NiTexture *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiPlane::NiPlane(NiPlane *this); // idb
void __thiscall NiPlane::NiPlane(NiPlane *this, NiPoint3 *kNormal, float fConstant); // idb
void __thiscall NiPlane::NiPlane(NiPlane *this, NiPoint3 *kNormal, NiPoint3 *kPoint); // idb
char *__thiscall NiPlane::GetViewerString(NiPlane *this, const char *pPrefix); // idb
void __thiscall NiBound::SaveBinary(NiPlane *this, NiStream *stream); // idb
void __thiscall NiFrustumPlanes::Set(NiFrustumPlanes *this, NiFrustum *kFrust, NiTransform *kXform); // idb
bool __thiscall NiStencilProperty::IsEqual(NiStencilProperty *this, NiObject *pObject); // idb
NiObjectNET *__thiscall NiStencilProperty::CreateClone(NiStencilProperty *this, NiCloningProcess *kCloning);
NiObjectNET *__cdecl NiStencilProperty::CreateObject();
char *__cdecl NiStencilProperty::GetViewerString(const char *pPrefix, NiStencilProperty::TestFunc eFunc); // idb
char *__cdecl NiStencilProperty::GetViewerString(const char *pPrefix, NiStencilProperty::Action eAct); // idb
char *__cdecl NiStencilProperty::GetViewerString(const char *pPrefix, NiStencilProperty::DrawMode eMode); // idb
void __cdecl NiStencilProperty::_SDMInit(); // idb
void __cdecl NiStencilProperty::_SDMShutdown(); // idb
void __thiscall NiStencilProperty::LoadBinary(NiStencilProperty *this, NiStream *stream); // idb
void __thiscall NiStencilProperty::SaveBinary(NiStencilProperty *this, NiStream *stream); // idb
void __thiscall NiStencilProperty::GetViewerStrings(NiStencilProperty *this, NiTArray<char *> *pStrings); // idb
void __thiscall NiGeometryGroupManager::NiGeometryGroupManager(NiGeometryGroupManager *this); // idb
// void __thiscall NiGeometryGroupManager::~NiGeometryGroupManager(NiGeometryGroupManager *this); idb
char __stdcall NiD3DShaderInterface::SetupGeometry(NiGeometry *pkGeometry);
bool __stdcall NiApplication::OnWindowDestroy(HWND__ *pWnd, bool bOption);
bool __stdcall NiDX92DBufferData::Recreate(IDirect3DDevice9 *pkD3DDevice9);
NiGeometryGroupManager *__thiscall NiGeometryGroupManager::`vector deleting destructor'(NiGeometryGroupManager *this, unsigned int a2);
void __thiscall NiTriShapeDynamicData::NiTriShapeDynamicData(NiTriShapeDynamicData *this, unsigned __int16 usVertices, NiPoint3 *pkVertex, NiPoint3 *pkNormal, NiColorA *pkColor, NiPoint2 *pkTexture, unsigned __int16 usNumTextureSets, NiGeometryData::DataFlags eNBTMethod, unsigned __int16 usTriangles, unsigned __int16 *pusTriList, unsigned __int16 usActiveVertices, unsigned __int16 usActiveTriangles); // idb
unsigned __int16 __thiscall NiTriShapeDynamicData::GetActiveVertexCount(NiTriShapeDynamicData *this); // idb
unsigned __int16 __thiscall NiTriShapeDynamicData::GetActiveTriangleCount(NiTriShapeDynamicData *this); // idb
void __thiscall NiTriShapeDynamicData::GetStripData(NiTriShapeDynamicData *this, unsigned __int16 *usStrips, const unsigned __int16 **pusStripLengths, const unsigned __int16 **pusTriList, unsigned int *uiStripLengthSum); // idb
NiObject *__cdecl NiTriShapeDynamicData::CreateObject(); // idb
bool __thiscall NiScreenElementsData::RegisterStreamables(NiTriShapeDynamicData *this, NiStream *kStream); // idb
bool __thiscall NiTriShapeDynamicData::IsEqual(NiTriShapeDynamicData *this, NiObject *pkObject); // idb
NiRTTI *NiTriShapeDynamicData::GetRTTI();
void __thiscall NiTriShapeDynamicData::SetActiveVertexCount(NiTriShapeDynamicData *this, unsigned __int16 usActiveVertices); // idb
void __thiscall NiTriShapeDynamicData::SetActiveTriangleCount(NiTriShapeDynamicData *this, unsigned __int16 usActiveTriangles); // idb
NiTriShapeDynamicData *__thiscall NiTriShapeDynamicData::`vector deleting destructor'(NiTriShapeDynamicData *this, unsigned int a2);
void __thiscall NiTriShapeDynamicData::LoadBinary(NiTriShapeDynamicData *this, NiStream *kStream); // idb
void __thiscall NiTriShapeDynamicData::SaveBinary(NiTriShapeDynamicData *this, NiStream *kStream); // idb
void __thiscall NiTriShapeDynamicData::GetViewerStrings(NiTriShapeDynamicData *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiQuaternion::NiQuaternion(NiQuaternion *this, float w, float x, float y, float z); // idb
NiQuaternion *__thiscall NiQuaternion::operator+(NiQuaternion *this, NiQuaternion *result, NiQuaternion *q); // idb
NiQuaternion *__thiscall NiQuaternion::operator-(NiQuaternion *this, NiQuaternion *result, NiQuaternion *q); // idb
NiQuaternion *__thiscall NiQuaternion::operator-(NiQuaternion *this, NiQuaternion *result); // idb
NiQuaternion *__thiscall NiQuaternion::operator*(NiQuaternion *this, NiQuaternion *result, NiQuaternion *q); // idb
NiQuaternion *__cdecl NiQuaternion::UnitInverse(NiQuaternion *result, NiQuaternion *p); // idb
NiQuaternion *__cdecl NiQuaternion::Squad(NiQuaternion *result, float t, NiQuaternion *p, NiQuaternion *a, NiQuaternion *b, NiQuaternion *q); // idb
NiQuaternion *__cdecl NiQuaternion::Log(NiQuaternion *result, NiQuaternion *q); // idb
NiQuaternion *__cdecl NiQuaternion::Intermediate(NiQuaternion *result, NiQuaternion *q0, NiQuaternion *q1, NiQuaternion *q2); // idb
void __thiscall NiQuaternion::ToAngleAxis(NiQuaternion *this, float *angle, NiPoint3 *axis); // idb
void __thiscall NiQuaternion::FromRotation(NiQuaternion *this, NiMatrix3 *rot); // idb
void __thiscall NiQuaternion::Snap(NiQuaternion *this); // idb
void __thiscall NiQuaternion::Normalize(NiQuaternion *this); // idb
char *__thiscall NiQuaternion::GetViewerString(NiQuaternion *this, const char *pcPrefix); // idb
void __thiscall NiQuaternion::NiQuaternion(NiQuaternion *this, float fAngle, NiPoint3 *axis); // idb
void __thiscall NiQuaternion::SaveBinary(NiQuaternion *this, NiStream *stream); // idb
char __thiscall NiPalette::IsEqual(NiPalette *this, NiObject *pkObject);
void __thiscall NiPalette::AddPaletteToList(NiPalette *this); // idb
void __thiscall NiPalette::RemovePaletteFromList(NiPalette *this); // idb
NiRTTI *NiPalette::GetRTTI();
NiPalette *__thiscall NiPalette::operator=(NiPalette *this, NiPalette *kPal); // idb
NiPalette *__cdecl NiPalette::CreateObject();
NiPalette *__thiscall NiPalette::`scalar deleting destructor'(NiPalette *this, unsigned int a2);
void __thiscall NiPalette::NiPalette(NiPalette *this, NiPalette *kPal); // idb
void __thiscall NiPalette::NiPalette(NiPalette *this, bool bHasAlpha, unsigned int uiEntries, NiPalette::PaletteEntry *pkEntries); // idb
void __thiscall NiPalette::LoadBinary(NiPalette *this, NiStream *kStream); // idb
void __thiscall NiPalette::SaveBinary(NiPalette *this, NiStream *kStream); // idb
void __thiscall NiPalette::GetViewerStrings(NiPalette *this, NiTArray<char *> *pkStrings); // idb
void __cdecl NiStream::_SDMShutdown(); // idb
char __thiscall NiStream::Load(NiStream *this, char *pcBuffer, int iBufferSize);
int __thiscall NiStream::Load(NiStream *this, NiBinaryStream *pkIstr);
int __thiscall NiStream::Save(NiStream *this, NiBinaryStream *pkOstr);
NiTArray<void (__cdecl*)(NiStream &,NiObject *)> *__thiscall NiTArray<void (__cdecl *)(NiStream &,NiObject *)>::`scalar deleting destructor'(NiTArray<void (__cdecl*)(NiStream &,NiObject *)> *this, unsigned int a2);
void __stdcall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned short>::SetValue(NiTMapItem<char const *,unsigned short> *pkItem, const char *key, unsigned __int16 val);
NiTArray<NiObjectGroup *> *__thiscall NiTArray<NiObjectGroup *>::`scalar deleting destructor'(NiTArray<NiObjectGroup *> *this, unsigned int a2);
NiObject *__thiscall NiStream::GetObjectFromLinkID(NiStream *this); // idb
unsigned int __thiscall NiStream::GetNumberOfLinkIDs(NiStream *this); // idb
NiObject *__thiscall NiStream::GetLinkIDFromObject(NiStream *this, NiObject *pkObject);
NiObject *__cdecl NiStream::CreateObjectByRTTI(const char *pcRTTI); // idb
NiObjectGroup *__thiscall NiStream::GetGroupFromID(NiStream *this, unsigned int uiID); // idb
unsigned int __thiscall NiStream::GetIDFromGroup(NiStream *this, NiObjectGroup *pkGroup); // idb
char __thiscall NiStream::Load(NiStream *this, const char *pcFileName);
int __cdecl NiStream::RegisterLoader(const char *pcName, NiObject *(__cdecl *pfnFunc)()); // idb
void __cdecl NiStream::UnregisterLoader(const char *pcClassName); // idb
void __cdecl NiStream::UnregisterPostProcessFunction(void (__cdecl *pfnFunc)(NiStream *, NiObject *)); // idb
void __thiscall NiStream::RegisterObjects(NiStream *this); // idb
bool __thiscall NiStream::Save(NiStream *this, const char *pcFileName); // idb
bool __thiscall NiStream::Save(NiStream *this, char **pcBuffer, int *iBufferSize); // idb
int __cdecl NiStream::GetVersionFromString(const char *pcVersionString);
void __thiscall NiStream::SetTexture(NiStream *this, char *pcURL, NiTexture *pkTexture); // idb
NiTexture *__thiscall NiStream::GetTexture(NiStream *this, char *pcURL, NiTexture *pkSelf); // idb
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiObject * (__cdecl *)(void)>,NiObject * (__cdecl *)(void)>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiObject * (__cdecl *)(void)>,NiObject * (__cdecl *)(void)>(NiTStringTemplateMap<NiTPointerMap<char const *,NiObject * (__cdecl*)(void)>,NiObject * (__cdecl*)(void)> *this); // idb
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,unsigned short>,unsigned short>::~NiTStringTemplateMap<NiTPointerMap<char const *,unsigned short>,unsigned short>(NiTStringTemplateMap<NiTPointerMap<char const *,unsigned short>,unsigned short> *this); // idb
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,unsigned short>,unsigned short>::SetValue(NiTStringTemplateMap<NiTPointerMap<char const *,unsigned short>,unsigned short> *this, NiTMapItem<char const *,unsigned short> *pkItem, const char *pcKey, unsigned __int16 val); // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiObject * (__cdecl*)(void)> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiObject * (__cdecl *)(void)>::`vector deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiObject * (__cdecl*)(void)> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<char const *,NiObject * (__cdecl *)(void)>::`scalar deleting destructor'(NiTPointerMap<char const *,NiObject * (__cdecl*)(void)> *this, unsigned int a2);
NiTStringPointerMap<NiObject * (__cdecl*)(void)> *__thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiObject * (__cdecl *)(void)>,NiObject * (__cdecl *)(void)>::`vector deleting destructor'(NiTStringPointerMap<NiObject * (__cdecl*)(void)> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned short> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned short>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned short> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<char const *,unsigned short>::`vector deleting destructor'(NiTPointerMap<char const *,unsigned short> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject const *,unsigned int> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject const *,unsigned int>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject const *,unsigned int> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<NiObject const *,unsigned int>::`vector deleting destructor'(NiTPointerMap<NiObject const *,unsigned int> *this, unsigned int a2);
void __thiscall NiStream::ReadLinkID(NiStream *this); // idb
NiObject *__thiscall NiStream::ResolveLinkID(NiStream *this); // idb
unsigned int __thiscall NiStream::ReadMultipleLinkIDs(NiStream *this); // idb
void __thiscall NiStream::SetNumberOfLinkIDs(NiStream *this, unsigned int uiLinks); // idb
void __thiscall NiStream::LoadObjectGroups(NiStream *this); // idb
void __thiscall NiStream::SetSelectiveUpdateFlagsTTTFRecursive(NiStream *this, NiAVObject *pkAVObject); // idb
void __thiscall NiStream::SetSelectiveUpdateFlagsForOldVersions(NiStream *this); // idb
void __thiscall NiStream::SaveHeader(NiStream *this); // idb
void __thiscall NiStream::SaveTopLevelObjects(NiStream *this); // idb
void __thiscall NiStream::UpdateObjectGroups(NiStream *this); // idb
void __thiscall NiStream::SaveObjectGroups(NiStream *this); // idb
void __thiscall NiStream::LoadCString(NiStream *this, char **pcString); // idb
void __thiscall NiStream::SaveCString(NiStream *this, const char *pcString); // idb
void __thiscall NiStream::SetTexturePalette(NiStream *this, NiTexturePalette *pkTexturePalette); // idb
void __thiscall NiTArray<NiPointer<NiScreenElements>>::SetSize(NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *this, unsigned int uiMaxSize); // idb
void __thiscall NiTArray<NiPointer<NiObject>>::~NiTArray<NiPointer<NiObject>>(NiTArray<NiPointer<NiObject> > *this); // idb
NiTArray<NiPointer<NiObject> > *__thiscall NiTArray<NiPointer<NiObject>>::`scalar deleting destructor'(NiTArray<NiPointer<NiObject> > *this, unsigned int a2);
void __thiscall NiStream::RemoveAllObjects(NiStream *this); // idb
void __thiscall NiStream::ChangeObject(NiStream *this, NiObject *pkNewObject); // idb
// char __usercall NiStream::LoadHeader@<al>(NiStream *this@<ecx>, int a2@<ebx>, int a3@<edi>);
void __thiscall NiStream::LoadTopLevelObjects(NiStream *this); // idb
void __cdecl NiStream::RegisterPostProcessFunction(void (__cdecl *pfnFunc)(NiStream *, NiObject *)); // idb
void __thiscall NiStream::FreeLoadData(NiStream *this); // idb
NiTStringPointerMap<unsigned short> *__thiscall NiTStringPointerMap<unsigned short>::`vector deleting destructor'(NiTStringPointerMap<unsigned short> *this, unsigned int a2);
void __cdecl NiStream::_SDMInit(); // idb
void __thiscall NiStream::~NiStream(NiStream *this); // idb
void __thiscall NiStream::SaveLinkID(NiStream *this, NiObject *pkObject); // idb
void __thiscall NiStream::InsertObject(NiStream *this, NiObject *pkObject); // idb
char __thiscall NiStream::RegisterSaveObject(NiStream *this, NiObject *pkObject);
char __thiscall NiStream::LoadRTTI(NiStream *this);
// char __usercall NiStream::LoadObject@<al>(NiStream *this@<ecx>, int a2@<edi>);
char __thiscall NiStream::LoadStream(NiStream *this);
void __thiscall NiStream::SaveRTTI(NiStream *this); // idb
char __thiscall NiStream::SaveStream(NiStream *this);
void __thiscall NiStream::NiStream(NiStream *this); // idb
NiStream *__thiscall NiStream::`scalar deleting destructor'(NiStream *this, unsigned int a2);
NiQuaternion *__thiscall NiQuaternion::operator*(NiQuaternion *this, NiQuaternion *result, float c); // idb
NiQuaternion *__cdecl operator*(NiQuaternion *result, float c, NiQuaternion *q); // idb
void __thiscall NiQuaternion::FastNormalize(NiQuaternion *this); // idb
NiQuaternion *__cdecl NiQuaternion::Exp(NiQuaternion *result, NiQuaternion *q); // idb
NiQuaternion *__cdecl NiQuaternion::Slerp(NiQuaternion *result, float t, NiQuaternion *p, NiQuaternion *q); // idb
char *__cdecl NiGetViewerString(const char *pcRttiName); // idb
char *__cdecl NiGetViewerString(const char *pcPrefix, bool bValue); // idb
char *__cdecl NiGetViewerString(const char *pcPrefix, char ucValue); // idb
char *__cdecl NiGetViewerString(const char *pcPrefix, __int16 sValue); // idb
char *__cdecl NiGetViewerString(const char *pcPrefix, unsigned __int16 usValue); // idb
char *__cdecl NiGetViewerString(const char *pcPrefix, int iValue); // idb
char *__cdecl NiGetViewerString(const char *pcPrefix, unsigned int uiValue); // idb
char *__cdecl NiGetViewerString(const char *pcPrefix, float fValue); // idb
char *__cdecl NiGetViewerString(const char *pcPrefix, void *pvValue); // idb
char *__cdecl NiGetViewerString(const char *pcPrefix, const char *pcValue); // idb
void __thiscall NiSkinData::FreeBoneVertData(NiSkinData *this); // idb
NiRTTI *NiSkinData::GetRTTI();
void __thiscall NiSkinData::LinkObject(NiSkinData *this, NiStream *kStream); // idb
char __thiscall NiSkinData::IsEqual(NiSkinData *this, NiObject *pkObject);
NiSkinData *__thiscall NiSkinData::`vector deleting destructor'(NiSkinData *this, unsigned int a2);
NiObject *__cdecl NiSkinData::CreateObject(); // idb
void __thiscall NiSkinData::LoadBinary(NiSkinData *this, NiStream *kStream); // idb
void __thiscall NiSkinData::SaveBinary(NiSkinData *this, NiStream *kStream); // idb
BOOL __thiscall NiTextureTransform::operator!=(NiTextureTransform *this, NiTextureTransform *kXform);
void __thiscall NiTextureTransform::UpdateMatrix(NiTextureTransform *this); // idb
void __thiscall NiTextureTransform::NiTextureTransform(NiTextureTransform *this, NiPoint2 *kTranslate, float fRotate, NiPoint2 *kScale, NiPoint2 *kCenter, NiTextureTransform::TransformMethod eMethod); // idb
void __thiscall NiTextureTransform::LoadBinary(NiTextureTransform *this, NiStream *kStream); // idb
void __thiscall NiTextureTransform::SaveBinary(NiTextureTransform *this, NiStream *kStream); // idb
void __thiscall NiAVObjectPalette::GetViewerStrings(NiAVObjectPalette *this, NiTArray<char *> *pkStrings); // idb
NiTMapItem<NiLight *,NiDX9LightManager::LightEntry *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetFirstPos(NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *> *this);
void __thiscall NiDefaultAVObjectPalette::ProcessClone(NiDefaultAVObjectPalette *this, NiCloningProcess *kCloning); // idb
char __thiscall NiDefaultAVObjectPalette::IsEqual(NiDefaultAVObjectPalette *this, NiObject *pObject);
void __thiscall NiDefaultAVObjectPalette::SaveBinary(NiDefaultAVObjectPalette *this, NiStream *stream); // idb
void __thiscall NiDefaultAVObjectPalette::LoadBinary(NiDefaultAVObjectPalette *this, NiStream *stream); // idb
void __thiscall NiDefaultAVObjectPalette::GetViewerStrings(NiDefaultAVObjectPalette *this, NiTArray<char *> *pStrings); // idb
NiObject *__thiscall NiDefaultAVObjectPalette::CreateClone(NiDefaultAVObjectPalette *this, NiCloningProcess *kCloning); // idb
void __cdecl NiDefaultAVObjectPalette::CreateObject();
// int __usercall FloatCompare@<eax>(const float *pf0@<eax>, const float *pf1@<ecx>, unsigned int uiNum@<edi>); idb
void __thiscall NiGeometryData::CreateNormals(NiGeometryData *this, bool bInitialize); // idb
NiPoint2 *__thiscall NiGeometryData::GetTextureSet(NiGeometryData *this, unsigned __int16 usSet); // idb
int __thiscall NiGeometryData::VertexCompare(NiGeometryData *this, unsigned __int16 v0, unsigned __int16 v1, __int16 mask);
bool __thiscall NiGeometryData::RegisterStreamables(NiGeometryData *this, NiStream *kStream); // idb
NiDX9DynamicTextureData *__thiscall NiGeometryData::GetBlockAllocationSize(NiGeometryData *this);
void __thiscall NiGeometryData::NiGeometryData(NiGeometryData *this, unsigned __int16 usVertices, NiPoint3 *pkVertex, NiPoint3 *pkNormal, NiColorA *pkColor, NiPoint2 *pkTexture, unsigned __int16 usNumTextureSets, NiGeometryData::DataFlags eNBTMethod); // idb
NiRTTI *NiGeometryData::GetRTTI();
void __thiscall NiGeometryData::NiGeometryData(NiGeometryData *this); // idb
void __thiscall NiGeometryData::Replace(NiGeometryData *this, unsigned __int16 usVertices, NiPoint3 *pkVertex, NiPoint3 *pkNormal, NiColorA *pkColor, NiPoint2 *pkTexture, unsigned __int16 usNumTextureSets, NiGeometryData::DataFlags eNBTMethod); // idb
int __thiscall NiGeometryData::ChoosePivot(NiGeometryData *this, unsigned __int16 *pusIndex, __int16 mask, int l, int r);
void __thiscall NiGeometryData::LinkObject(NiGeometryData *this, NiStream *kStream); // idb
char __thiscall NiGeometryData::IsEqual(NiGeometryData *this, NiObject *pkObject);
void __thiscall NiGeometryData::~NiGeometryData(NiGeometryData *this); // idb
void __thiscall NiGeometryData::IndexQSort(NiGeometryData *this, unsigned __int16 *pusIndex, __int16 mask, int l, int r);
void __thiscall NiGeometryData::LoadBinary(NiGeometryData *this, NiStream *kStream); // idb
void __thiscall NiGeometryData::SaveBinary(NiGeometryData *this, NiStream *kStream); // idb
void __thiscall NiGeometryData::GetViewerStrings(NiGeometryData *this, NiTArray<char *> *pkStrings); // idb
NiGeometryData *__thiscall NiGeometryData::`scalar deleting destructor'(NiGeometryData *this, unsigned int a2);
void __thiscall NiGeometryData::IndexSort(NiGeometryData *this, unsigned __int16 **pusIndex0, unsigned __int16 **pusIndex1, __int16 mask);
void __thiscall NiLight::~NiLight(NiLight *this); // idb
void __thiscall NiLight::CopyMembers(NiLight *this, NiLight *pDest, NiCloningProcess *kCloning); // idb
void __thiscall NiLight::LinkObject(NiLight *this, NiStream *stream); // idb
NiRTTI *NiLight::GetRTTI();
void __thiscall NiLight::NiLight(NiLight *this); // idb
NiLight *__thiscall NiLight::`vector deleting destructor'(NiLight *this, unsigned int a2);
void __thiscall NiLight::LoadBinary(NiLight *this, NiStream *stream); // idb
void __thiscall NiLight::SaveBinary(NiLight *this, NiStream *stream); // idb
bool __thiscall NiLight::IsEqual(NiLight *this, NiObject *pObject); // idb
void __thiscall NiLight::GetViewerStrings(NiLight *this, NiTArray<char *> *pStrings); // idb
void __cdecl NiPoint3::_SDMInit(); // idb
void __cdecl NiPoint3::_SDMShutdown(); // idb
void __cdecl NiPoint3::UnitizeVectors(NiPoint3 *pkV, unsigned int uiNum, unsigned int uiStride); // idb
void __cdecl NiPoint3::PointsPlusEqualFloatTimesPoints(NiPoint3 *pkDst, float f, NiPoint3 *pkSrc, unsigned int uiVerts); // idb
char __thiscall NiFloatsExtraData::SetValue(NiFloatsExtraData *this, const unsigned int uiIndex, float fValue);
double __thiscall NiFloatsExtraData::GetValue(NiFloatsExtraData *this, const unsigned int uiIndex);
void __thiscall NiFloatsExtraData::CopyMembers(NiFloatsExtraData *this, NiFloatsExtraData *pDest, NiCloningProcess *kCloning); // idb
char __thiscall NiFloatsExtraData::IsEqual(NiFloatsExtraData *this, NiObject *pObject);
NiRTTI *NiFloatsExtraData::GetRTTI();
NiFloatsExtraData *__thiscall NiFloatsExtraData::CreateClone(NiFloatsExtraData *this, NiCloningProcess *kCloning);
NiObject *__cdecl NiFloatsExtraData::CreateObject(); // idb
NiFloatsExtraData *__thiscall NiFloatsExtraData::`scalar deleting destructor'(NiFloatsExtraData *this, unsigned int a2);
void __thiscall NiIntegersExtraData::LoadBinary(NiIntegersExtraData *this, NiStream *kStream); // idb
void __thiscall NiFloatsExtraData::GetViewerStrings(NiFloatsExtraData *this, NiTArray<char *> *pStrings); // idb
void __thiscall NiColorExtraData::SetValue(NiColorExtraData *this, NiColorA kColorA); // idb
void __thiscall NiColorExtraData::SaveBinary(NiColorExtraData *this, NiStream *kStream); // idb
NiRTTI *NiColorExtraData::GetRTTI();
NiExtraData *__thiscall NiColorExtraData::CreateClone(NiColorExtraData *this, NiCloningProcess *kCloning);
NiExtraData *__cdecl NiColorExtraData::CreateObject();
void __thiscall NiColorExtraData::LoadBinary(NiColorExtraData *this, NiStream *kStream); // idb
NiColorExtraData *__thiscall NiColorExtraData::`scalar deleting destructor'(NiColorExtraData *this, unsigned int a2);
bool __thiscall NiColorExtraData::IsEqual(NiColorExtraData *this, NiObject *pObject); // idb
void __thiscall NiColorExtraData::GetViewerStrings(NiColorExtraData *this, NiTArray<char *> *pStrings); // idb
void __cdecl NiCompUtility::DecompressFloatArray(const __int16 *psSrcArray, unsigned int uiSrcCount, float fOffset, float fHalfRange, float *pfDestArray, unsigned int uiDestCount); // idb
void __cdecl NiTransformVectorsPentium(unsigned __int16 usVerts, const float *pModel, float *pWorld, NiMatrix3 *pMatrix); // idb
void __cdecl NiTransformPointsPentium(unsigned __int16 usVerts, const float *pModel, float *pWorld, NiTransform *pXform); // idb
void __cdecl NiProcessorSpecificCode::IdentifyProcessor(); // idb
void __cdecl NiProcessorSpecificCode::TransformPointsBasic(unsigned __int16 uiVerts, const float *pModel, float *pWorld, NiTransform *pXform); // idb
void __cdecl NiProcessorSpecificCode::TransformVectorsBasic(unsigned __int16 uiVerts, const float *pModel, float *pWorld, NiMatrix3 *pMatrix); // idb
void __cdecl NiProcessorSpecificCode::SetVectorTransformFunction(void (__cdecl *vtf)(unsigned __int16, const float *, float *, NiMatrix3 *)); // idb
void __cdecl NiProcessorSpecificCode::SetPointTransformFunction(void (__cdecl *ptf)(unsigned __int16, const float *, float *, NiTransform *)); // idb
void __cdecl NiProcessorSpecificCode::OptimizeMainEngineForProcessor(); // idb
NiObject *__cdecl NiTriStrips::CreateObject(); // idb
void __thiscall NiTriStrips::LoadBinary(NiTriStrips *this, NiStream *kStream); // idb
char __thiscall NiParticleMeshes::RegisterStreamables(NiTriStrips *this, NiStream *kStream);
void __thiscall NiParticleMeshes::SaveBinary(NiTriStrips *this, NiStream *kStream); // idb
char __thiscall NiParticleMeshes::IsEqual(NiTriStrips *this, NiObject *pObject);
NiRTTI *NiTriStrips::GetRTTI();
NiTriStrips *__thiscall NiTriShape::`vector deleting destructor'(NiTriStrips *this, unsigned int a2);
NiTriBasedGeom *__thiscall NiTriStrips::CreateClone(NiTriStrips *this, NiCloningProcess *kCloning);
void __thiscall NiTriStrips::GetModelTriangle(NiTriStrips *this, unsigned __int16 usTriangle, NiPoint3 **pkP0, NiPoint3 **pkP1, NiPoint3 **pkP2); // idb
void __thiscall NiTriStrips::RenderImmediate(NiTriStrips *this, NiRenderer *pkRenderer); // idb
void __thiscall NiTriStrips::GetViewerStrings(NiTriStrips *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiTransform::MakeIdentity(NiTransform *this); // idb
void __thiscall NiTransform::Invert(NiTransform *this, NiTransform *kDest); // idb
BOOL __thiscall NiTransform::operator!=(NiTransform *this, NiTransform *xform);
void __thiscall NiTransform::LoadBinary(NiTransform *this, NiStream *stream); // idb
void __thiscall NiTransform::SaveBinary(NiTransform *this, NiStream *stream); // idb
void __thiscall NiSwitchNode::CopyMembers(NiSwitchNode *this, NiSwitchNode *pkDest, NiCloningProcess *kCloning); // idb
void __thiscall NiSwitchNode::NiSwitchNode(NiSwitchNode *this); // idb
NiRTTI *NiSwitchNode::GetRTTI();
NiPointer<NiAVObject> *__thiscall NiSwitchNode::DetachChild(NiSwitchNode *this, NiPointer<NiAVObject> *result, NiAVObject *pkChild); // idb
NiPointer<NiAVObject> *__thiscall NiSwitchNode::DetachChildAt(NiSwitchNode *this, NiPointer<NiAVObject> *result, unsigned int i); // idb
void __thiscall NiSwitchNode::OnVisible(NiSwitchNode *this, NiCullingProcess *kCuller); // idb
void __thiscall NiSwitchNode::UpdateWorldBound(NiSwitchNode *this); // idb
void __thiscall NiSwitchNode::UpdateNodeBound(NiSwitchNode *this); // idb
NiObject *__thiscall NiSwitchNode::CreateClone(NiSwitchNode *this, NiCloningProcess *kCloning); // idb
void __cdecl NiSwitchNode::CreateObject();
bool __thiscall NiSwitchNode::IsEqual(NiSwitchNode *this, NiObject *pkObject); // idb
NiSwitchNode *__thiscall NiSwitchNode::`scalar deleting destructor'(NiSwitchNode *this, unsigned int a2);
void __thiscall NiSwitchNode::AttachChild(NiSwitchNode *this, NiAVObject *pkChild, bool bFirstAvail); // idb
NiPointer<NiAVObject> *__thiscall NiSwitchNode::SetAt(NiSwitchNode *this, NiPointer<NiAVObject> *result, unsigned int i, NiAVObject *pkChild); // idb
void __thiscall NiSwitchNode::UpdateDownwardPass(NiSwitchNode *this, float fTime, int bUpdateControllers);
void __thiscall NiSwitchNode::UpdateSelectedDownwardPass(NiSwitchNode *this, float fTime); // idb
void __thiscall NiSwitchNode::UpdateRigidDownwardPass(NiSwitchNode *this, float fTime); // idb
void __thiscall NiSwitchNode::UpdateControllers(NiSwitchNode *this, float fTime); // idb
void __thiscall NiSwitchNode::LoadBinary(NiSwitchNode *this, NiStream *kStream); // idb
void __thiscall NiSwitchNode::SaveBinary(NiSwitchNode *this, NiStream *kStream); // idb
void __thiscall NiSwitchNode::GetViewerStrings(NiSwitchNode *this, NiTArray<char *> *pkStrings); // idb
BOOL __cdecl NiBound::TestIntersect(float fTime, NiBound *kB0, NiPoint3 *kV0, NiBound *kB1, NiPoint3 *kV1);
char __cdecl NiBound::FindIntersect(float fTime, NiBound *kB0, NiPoint3 *kV0, NiBound *kB1, NiPoint3 *kV1, float *fIntrTime, NiPoint3 *kIntrPt, bool bCalcNormals, NiPoint3 *kNormal0, NiPoint3 *kNormal1);
char *__thiscall NiBound::GetViewerString(NiBound *this, const char *pPrefix); // idb
void __thiscall NiSphere::LoadBinary(NiPlane *this, NiStream *stream); // idb
void __cdecl NiDynamicEffectState::ListCopy(NiDynamicEffectState::ListItem *pSrc, NiDynamicEffectState::ListItem **pDest); // idb
void __thiscall NiDynamicEffectState::~NiDynamicEffectState(NiDynamicEffectState *this); // idb
NiDynamicEffectState *__thiscall NiDynamicEffectState::Copy(NiDynamicEffectState *this); // idb
void __cdecl NiDynamicEffectState::ListInsertSorted(NiDynamicEffectState::ListItem **pL, NiDynamicEffect *pItem); // idb
void __cdecl NiDynamicEffectState::ListRemove(NiDynamicEffectState::ListItem **pL, NiDynamicEffect *pItem); // idb
void __thiscall NiDynamicEffectState::AddEffect(NiDynamicEffectState *this, NiDynamicEffect *pEffect); // idb
void __thiscall NiDynamicEffectState::RemoveEffect(NiDynamicEffectState *this, NiDynamicEffect *pEffect); // idb
void __thiscall NiPropertyState::NiPropertyState(NiPropertyState *this, NiPropertyState *kState); // idb
void __thiscall NiPropertyState::~NiPropertyState(NiPropertyState *this); // idb
NiPropertyState *__thiscall NiPropertyState::`scalar deleting destructor'(NiPropertyState *this, unsigned int a2);
void __thiscall NiPropertyState::Reset(NiPropertyState *this); // idb
void __thiscall NiPropertyState::NiPropertyState(NiPropertyState *this); // idb
bool __thiscall NiVertWeightsExtraData::IsEqual(NiVertWeightsExtraData *this, NiObject *pObject); // idb
NiRTTI *NiVertWeightsExtraData::GetRTTI();
NiExtraData *__thiscall NiVertWeightsExtraData::CreateClone(NiVertWeightsExtraData *this, NiCloningProcess *kCloning);
NiObject *__cdecl NiVertWeightsExtraData::CreateObject(); // idb
NiVertWeightsExtraData *__thiscall NiVertWeightsExtraData::`scalar deleting destructor'(NiVertWeightsExtraData *this, unsigned int a2);
void __thiscall NiVertWeightsExtraData::LoadBinary(NiVertWeightsExtraData *this, NiStream *kStream); // idb
void __thiscall NiVertWeightsExtraData::GetViewerStrings(NiVertWeightsExtraData *this, NiTArray<char *> *pStrings); // idb
void __cdecl NiMainSDM::Init(); // idb
void __cdecl NiMainSDM::Shutdown(); // idb
void NiMainSDM::NiMainSDM();
void __thiscall NiShaderLibrary::~NiShaderLibrary(NiShaderLibrary *this); // idb
void __thiscall NiShader::SetName(NiShaderLibrary *this, char *pszName); // idb
void __thiscall NiShaderLibrary::NiShaderLibrary(NiShaderLibrary *this, char *pszName); // idb
NiShaderLibrary *__thiscall NiShaderLibrary::`vector deleting destructor'(NiShaderLibrary *this, unsigned int a2);
bool __stdcall NiNIFImageReader::CanReadFile(const char *pcFileExtension);
void __thiscall NiNIFImageReader::~NiNIFImageReader(NiNIFImageReader *this); // idb
char __thiscall NiNIFImageReader::ReadHeader(NiNIFImageReader *this, NiFile *kIst, unsigned int *uiWidth, unsigned int *uiHeight, NiPixelFormat *kFormat, bool *bMipmap, unsigned int *uiFaces);
void __thiscall NiNIFImageReader::NiNIFImageReader(NiNIFImageReader *this); // idb
NiNIFImageReader *__thiscall NiNIFImageReader::`vector deleting destructor'(NiNIFImageReader *this, unsigned int a2);
NiPixelData *__thiscall NiNIFImageReader::ReadFile(NiNIFImageReader *this, NiFile *kIst, NiPixelData *pkOptDest); // idb
void __thiscall NiTriShapeData::NiTriShapeData(NiTriShapeData *this, unsigned __int16 usVertices, NiPoint3 *pkVertex, NiPoint3 *pkNormal, NiColorA *pkColor, NiPoint2 *pkTexture, unsigned __int16 usNumTextureSets, NiGeometryData::DataFlags eNBTMethod, unsigned __int16 usTriangles, unsigned __int16 *pusTriList); // idb
void __thiscall NiTriShapeData::NiTriShapeData(NiTriShapeData *this); // idb
void __thiscall NiTriShapeData::Replace(NiTriShapeData *this, unsigned __int16 usTriangles, unsigned __int16 *pusTriList); // idb
void __thiscall NiTriShapeData::GetTriangleIndices(NiTriShapeData *this, unsigned __int16 i, unsigned __int16 *i0, unsigned __int16 *i1, unsigned __int16 *i2); // idb
void __thiscall NiTriShapeData::GetStripData(NiTriShapeData *this, unsigned __int16 *usStrips, const unsigned __int16 **pusStripLengths, const unsigned __int16 **pusTriList, unsigned int *uiStripLengthSum); // idb
NiTriBasedGeomData *__cdecl NiTriShapeData::CreateObject();
char __thiscall NiTriShapeData::IsEqual(NiTriShapeData *this, NiObject *pkObject);
NiRTTI *NiTriShapeData::GetRTTI();
NiTriShapeData::SNAMemBlock *__thiscall NiTriShapeData::SNAMemBlock::`scalar deleting destructor'(NiTriShapeData::SNAMemBlock *this, unsigned int a2);
void __thiscall NiTriShapeData::~NiTriShapeData(NiTriShapeData *this); // idb
NiTriShapeData *__thiscall NiTriShapeData::`vector deleting destructor'(NiTriShapeData *this, unsigned int a2);
void __thiscall NiTriShapeData::LoadBinary(NiTriShapeData *this, NiStream *kStream); // idb
void __thiscall NiTriShapeData::SaveBinary(NiTriShapeData *this, NiStream *kStream); // idb
void __thiscall NiTriShapeData::GetViewerStrings(NiTriShapeData *this, NiTArray<char *> *pkStrings); // idb
NiRTTI *NiDepthStencilBuffer::GetRTTI();
NiDepthStencilBuffer *__thiscall NiDepthStencilBuffer::`vector deleting destructor'(NiDepthStencilBuffer *this, unsigned int a2);
NiDepthStencilBuffer *__cdecl NiDepthStencilBuffer::Create(unsigned int uiWidth, unsigned int uiHeight, NiRenderer *pkRenderer, NiPixelFormat *kFormat); // idb
NiPixelFormat *__cdecl NiDepthStencilBuffer::CreateCompatible(Ni2DBuffer *pkBuffer, NiRenderer *pkRenderer);
Ni2DBuffer *__cdecl NiDepthStencilBuffer::Create(unsigned int uiWidth, unsigned int uiHeight, Ni2DBuffer::RendererData *pkData);
void __thiscall Ni2DBuffer::ResetDimensions(Ni2DBuffer *this, unsigned int uiWidth, unsigned int uiHeight); // idb
bool __thiscall Ni2DBuffer::RegisterStreamables(NiSkinData *this, NiStream *kStream); // idb
bool __thiscall NiAVObjectPalette::IsEqual(NiRenderTargetGroup *this, NiObject *pkObject); // idb
char __thiscall Ni2DBuffer::CreateRendererData(Ni2DBuffer *this, NiPixelFormat *kFormat);
bool __thiscall Ni2DBuffer::FastCopy(Ni2DBuffer *this, Ni2DBuffer *pkDest, NiRect<unsigned int> *pkSrcRect, unsigned int uiDestX, unsigned int uiDestY); // idb
bool __thiscall Ni2DBuffer::Copy(Ni2DBuffer *this, Ni2DBuffer *pkDest, NiRect<unsigned int> *pkSrcRect, NiRect<unsigned int> *pkDestRect, Ni2DBuffer::CopyFilterPreference ePref); // idb
void __thiscall Ni2DBuffer::Ni2DBuffer(Ni2DBuffer *this); // idb
NiRTTI *Ni2DBuffer::GetRTTI();
void __thiscall Ni2DBuffer::~Ni2DBuffer(Ni2DBuffer *this); // idb
Ni2DBuffer *__cdecl Ni2DBuffer::Create(unsigned int uiWidth, unsigned int uiHeight); // idb
Ni2DBuffer *__cdecl Ni2DBuffer::Create(unsigned int uiWidth, unsigned int uiHeight, Ni2DBuffer::RendererData *pkData); // idb
Ni2DBuffer *__thiscall Ni2DBuffer::`vector deleting destructor'(Ni2DBuffer *this, unsigned int a2);
void __thiscall Ni2DBuffer::GetViewerStrings(Ni2DBuffer *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiPixelData::AllocateData(NiPixelData *this, unsigned int uiLevels, unsigned int uiFaces, unsigned int uiBytes); // idb
void __thiscall NiPixelData::FreeData(NiPixelData *this); // idb
double __thiscall NiBackToFrontAccumulator::ChoosePivot(NiBackToFrontAccumulator *this, int l, int r);
void __thiscall NiBackToFrontAccumulator::CopyMembers(NiBackToFrontAccumulator *this, NiBackToFrontAccumulator *pkDest, NiCloningProcess *kCloning); // idb
bool __thiscall NiBackToFrontAccumulator::IsEqual(NiBackToFrontAccumulator *this, NiObject *pkObject); // idb
void __thiscall NiBackToFrontAccumulator::FinishAccumulating(NiBackToFrontAccumulator *this); // idb
void __thiscall NiBackToFrontAccumulator::SortObjectsByDepth(NiBackToFrontAccumulator *this, int l, int r); // idb
void __thiscall NiBackToFrontAccumulator::~NiBackToFrontAccumulator(NiBackToFrontAccumulator *this); // idb
NiRTTI *NiBackToFrontAccumulator::GetRTTI();
void __thiscall NiBackToFrontAccumulator::RegisterObjectArray(NiBackToFrontAccumulator *this, NiVisibleArray *kArray); // idb
void __thiscall NiBackToFrontAccumulator::Sort(NiBackToFrontAccumulator *this); // idb
void __thiscall NiBackToFrontAccumulator::NiBackToFrontAccumulator(NiBackToFrontAccumulator *this); // idb
NiBackToFrontAccumulator *__thiscall NiBackToFrontAccumulator::`vector deleting destructor'(NiBackToFrontAccumulator *this, unsigned int a2);
NiCollisionObject *__thiscall NiBackToFrontAccumulator::CreateClone(NiBackToFrontAccumulator *this, NiCloningProcess *kCloning);
void __thiscall NiLODData::NiLODData(NiLODData *this); // idb
void __thiscall NiLODData::~NiLODData(NiLODData *this); // idb
NiRTTI *NiLODData::GetRTTI();
NiLODData *__thiscall NiLODData::`vector deleting destructor'(NiLODData *this, unsigned int a2);
void __cdecl NiPoint3::UnitizeVector(NiPoint3 *v); // idb
void __thiscall NiTriShapeData::CalculateNormals(NiTriShapeData *this); // idb
void __thiscall NiObjectGroup::NiObjectGroup(NiObjectGroup *this, unsigned int uiBytes); // idb
void __thiscall NiTriStripsData::GetTriangleIndices(NiTriStripsData *this, unsigned __int16 i, unsigned __int16 *i0, unsigned __int16 *i1, unsigned __int16 *i2); // idb
NiTriBasedGeomData *__cdecl NiTriStripsData::CreateObject();
bool __thiscall NiPSysData::RegisterStreamables(NiPSysData *this, NiStream *kStream); // idb
NiRTTI *NiTriStripsData::GetRTTI();
void __thiscall NiTriStripsData::GetStripData(NiTriStripsData *this, unsigned __int16 *usStrips, const unsigned __int16 **pusStripLengths, const unsigned __int16 **pusTriList, unsigned int *uiStripLengthSum); // idb
char __thiscall NiTriStripsData::IsEqual(NiTriStripsData *this, NiObject *pkObject);
NiDX9DynamicTextureData *__thiscall NiTriStripsData::GetBlockAllocationSize(NiTriStripsData *this);
void __thiscall NiTriStripsData::~NiTriStripsData(NiTriStripsData *this); // idb
void __thiscall NiTriStripsData::Replace(NiTriStripsData *this, unsigned __int16 usStrips, unsigned __int16 *pusStripLengths, unsigned __int16 *pusStripLists); // idb
NiTriStripsData *__thiscall NiTriStripsData::`scalar deleting destructor'(NiTriStripsData *this, unsigned int a2);
void __thiscall NiTriStripsData::LoadBinary(NiTriStripsData *this, NiStream *kStream); // idb
void __thiscall NiTriStripsData::SaveBinary(NiTriStripsData *this, NiStream *kStream); // idb
void __thiscall NiTriStripsData::GetViewerStrings(NiTriStripsData *this, NiTArray<char *> *pkStrings); // idb
bool __thiscall NiWireframeProperty::IsEqual(NiWireframeProperty *this, NiObject *pkObject); // idb
NiRTTI *NiDitherProperty::GetRTTI();
NiObjectNET *__thiscall NiDitherProperty::CreateClone(NiDitherProperty *this, NiCloningProcess *kCloning);
NiObjectNET *__cdecl NiDitherProperty::CreateObject();
void __cdecl NiDitherProperty::_SDMInit(); // idb
void __cdecl NiDitherProperty::_SDMShutdown(); // idb
void __thiscall NiDitherProperty::GetViewerStrings(NiDitherProperty *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiRendererSpecificProperty::LoadBinary(NiRendererSpecificProperty *this, NiStream *kStream); // idb
bool __thiscall NiRendererSpecificProperty::RegisterStreamables(NiRendererSpecificProperty *this, NiStream *kStream); // idb
void __thiscall NiRendererSpecificProperty::SaveBinary(NiRendererSpecificProperty *this, NiStream *kStream); // idb
bool __thiscall NiRendererSpecificProperty::IsEqual(NiRendererSpecificProperty *this, NiObject *pkObject); // idb
void __thiscall NiRendererSpecificProperty::NiRendererSpecificProperty(NiRendererSpecificProperty *this); // idb
NiRTTI *NiRendererSpecificProperty::GetRTTI();
NiProperty *__thiscall NiRendererSpecificProperty::CreateClone(NiRendererSpecificProperty *this, NiCloningProcess *kCloning);
NiObject *__cdecl NiRendererSpecificProperty::CreateObject(); // idb
NiRendererSpecificProperty *__thiscall NiRendererSpecificProperty::`scalar deleting destructor'(NiRendererSpecificProperty *this, unsigned int a2);
void __cdecl NiRendererSpecificProperty::_SDMInit(); // idb
void __cdecl NiRendererSpecificProperty::_SDMShutdown(); // idb
void __thiscall NiRendererSpecificProperty::GetViewerStrings(NiRendererSpecificProperty *this, NiTArray<char *> *pkStrings); // idb
char __thiscall NiDitherProperty::RegisterStreamables(NiZBufferProperty *this, NiStream *kStream);
NiRTTI *NiShadeProperty::GetRTTI();
int ShortCutInvPosItem::GetType();
NiObjectNET *__thiscall NiShadeProperty::CreateClone(NiShadeProperty *this, NiCloningProcess *kCloning);
NiObjectNET *__cdecl NiShadeProperty::CreateObject();
void __cdecl NiShadeProperty::_SDMInit(); // idb
void __cdecl NiShadeProperty::_SDMShutdown(); // idb
void __thiscall NiShadeProperty::SaveBinary(NiWireframeProperty *this, NiStream *kStream); // idb
void __thiscall NiShadeProperty::GetViewerStrings(NiShadeProperty *this, NiTArray<char *> *pkStrings); // idb
NiRTTI *NiSpecularProperty::GetRTTI();
NiObjectNET *__thiscall NiSpecularProperty::CreateClone(NiSpecularProperty *this, NiCloningProcess *kCloning);
NiObjectNET *__cdecl NiSpecularProperty::CreateObject();
void __cdecl NiSpecularProperty::_SDMInit(); // idb
void __cdecl NiSpecularProperty::_SDMShutdown(); // idb
void __thiscall NiSpecularProperty::GetViewerStrings(NiSpecularProperty *this, NiTArray<char *> *pkStrings); // idb
NiRTTI *NiWireframeProperty::GetRTTI();
int NiWireframeProperty::Type();
NiObjectNET *__thiscall NiWireframeProperty::CreateClone(NiWireframeProperty *this, NiCloningProcess *kCloning);
NiObjectNET *__cdecl NiWireframeProperty::CreateObject();
void __cdecl NiWireframeProperty::_SDMInit(); // idb
void __cdecl NiWireframeProperty::_SDMShutdown(); // idb
void __thiscall NiSpecularProperty::LoadBinary(NiWireframeProperty *this, NiStream *kStream); // idb
void __thiscall NiWireframeProperty::GetViewerStrings(NiWireframeProperty *this, NiTArray<char *> *pkStrings); // idb
bool __thiscall NiTriBasedGeomData::RegisterStreamables(NiTriBasedGeomData *this, NiStream *kStream); // idb
NiRTTI *NiScreenGeometry::GetRTTI();
NiObject *__cdecl NiScreenGeometry::CreateObject(); // idb
void __thiscall NiScreenElements::LinkObject(NiScreenElements *this, NiStream *kStream); // idb
char __thiscall NiScreenGeometry::RegisterStreamables(NiScreenElements *this, NiStream *kStream);
void __thiscall NiScreenSpaceCamera::LoadBinary(NiScreenSpaceCamera *this, NiStream *kStream); // idb
char __thiscall NiScreenSpaceCamera::RegisterStreamables(NiScreenSpaceCamera *this, NiStream *kStream);
void __thiscall NiScreenSpaceCamera::SaveBinary(NiScreenSpaceCamera *this, NiStream *kStream); // idb
bool __thiscall NiScreenSpaceCamera::IsEqual(NiScreenSpaceCamera *this, NiObject *pkObject); // idb
NiTArray<NiScreenGeometryData::ScreenElement *> *__thiscall NiTArray<NiScreenGeometryData::ScreenElement *>::`vector deleting destructor'(NiTArray<NiScreenGeometryData::ScreenElement *> *this, unsigned int a2);
NiRTTI *NiScreenGeometryData::GetRTTI();
NiTriShapeData *__cdecl NiScreenGeometryData::CreateObject();
NiScreenGeometry *__thiscall NiScreenGeometry::`vector deleting destructor'(NiScreenGeometry *this, unsigned int a2);
NiTriShape *__thiscall NiScreenGeometry::CreateClone(NiScreenGeometry *this, NiCloningProcess *kCloning);
NiRTTI *NiScreenPolygon::GetRTTI();
void __thiscall NiScreenPolygon::CopyMembers(NiScreenPolygon *this, NiScreenPolygon *pDest, NiCloningProcess *kCloning); // idb
char __thiscall NiScreenPolygon::RegisterStreamables(NiScreenPolygon *this, NiStream *stream);
void __thiscall NiScreenSpaceCamera::ProcessClone(NiScreenSpaceCamera *this, NiCloningProcess *kCloning); // idb
void __thiscall NiTPoolContainer<NiScreenGeometryData::ScreenElement>::NiTPoolContainer<NiScreenGeometryData::ScreenElement>(NiTPoolContainer<NiScreenGeometryData::ScreenElement> *this, unsigned int uiSize); // idb
void *__thiscall NiScreenGeometryData::ScreenElement::`vector deleting destructor'(NiScreenGeometryData::ScreenElement *this, unsigned int); // idb
void __cdecl NiScreenGeometryData::_SDMInit(); // idb
void __thiscall NiScreenGeometryData::SaveBinary(NiScreenGeometryData *this, NiStream *kStream); // idb
char __thiscall NiScreenGeometryData::IsEqual(NiScreenGeometryData *this, NiObject *pkObject);
void __thiscall NiScreenPolygon::NiScreenPolygon(NiScreenPolygon *this, unsigned __int16 usVertices, NiPoint3 *pVertex, NiPoint2 *pTexture, NiColorA *pColor); // idb
NiScreenPolygon *__thiscall NiScreenPolygon::`vector deleting destructor'(NiScreenPolygon *this, unsigned int a2);
NiObject *__thiscall NiScreenPolygon::CreateClone(NiScreenPolygon *this, NiCloningProcess *kCloning); // idb
NiObject *__cdecl NiScreenPolygon::CreateObject(); // idb
void __thiscall NiScreenPolygon::LoadBinary(NiScreenPolygon *this, NiStream *stream); // idb
void __thiscall NiScreenPolygon::LinkObject(NiScreenPolygon *this, NiStream *stream); // idb
void __thiscall NiScreenPolygon::SaveBinary(NiScreenPolygon *this, NiStream *stream); // idb
char __thiscall NiScreenPolygon::IsEqual(NiScreenPolygon *this, NiObject *pkObject);
void __thiscall NiTArray<NiPointer<NiScreenPolygon>>::~NiTArray<NiPointer<NiScreenPolygon>>(NiTArray<NiPointer<NiScreenPolygon> > *this); // idb
void __thiscall NiTArray<NiPointer<NiD3DXEffectTechnique>>::RemoveAll(NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *this); // idb
void __thiscall NiTArray<NiPointer<NiScreenTexture>>::~NiTArray<NiPointer<NiScreenTexture>>(NiTArray<NiPointer<NiScreenTexture> > *this); // idb
NiTArray<NiPointer<NiScreenPolygon> > *__thiscall NiTArray<NiPointer<NiScreenPolygon>>::`scalar deleting destructor'(NiTArray<NiPointer<NiScreenPolygon> > *this, unsigned int a2);
NiTArray<NiPointer<NiScreenTexture> > *__thiscall NiTArray<NiPointer<NiScreenTexture>>::`vector deleting destructor'(NiTArray<NiPointer<NiScreenTexture> > *this, unsigned int a2);
void __thiscall NiTPool<NiScreenGeometryData::ScreenElement>::CreateNewObjects(NiTPool<NiScreenGeometryData::ScreenElement> *this, unsigned int uiSize); // idb
void __cdecl NiScreenGeometryData::_SDMShutdown(); // idb
void __thiscall NiScreenGeometryData::GetViewerStrings(NiScreenGeometryData *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiScreenGeometry::GetViewerStrings(NiScreenGeometry *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiScreenPolygon::GetViewerStrings(NiScreenPolygon *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiScreenSpaceCamera::NiScreenSpaceCamera(NiScreenSpaceCamera *this); // idb
NiRTTI *NiScreenSpaceCamera::GetRTTI();
void __thiscall NiScreenSpaceCamera::~NiScreenSpaceCamera(NiScreenSpaceCamera *this); // idb
void __thiscall NiScreenSpaceCamera::CopyMembers(NiScreenSpaceCamera *this, NiScreenSpaceCamera *pkDest, NiCloningProcess *kCloning); // idb
void __cdecl NiScreenSpaceCamera::CreateObject();
void __thiscall NiScreenSpaceCamera::GetViewerStrings(NiScreenSpaceCamera *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiScreenGeometryData::~NiScreenGeometryData(NiScreenGeometryData *this); // idb
void __thiscall NiScreenGeometryData::LoadBinary(NiScreenGeometryData *this, NiStream *kStream); // idb
NiScreenSpaceCamera *__thiscall NiScreenSpaceCamera::`scalar deleting destructor'(NiScreenSpaceCamera *this, unsigned int a2);
NiObject *__thiscall NiScreenSpaceCamera::CreateClone(NiScreenSpaceCamera *this, NiCloningProcess *kCloning); // idb
void __thiscall NiScreenSpaceCamera::LinkObject(NiScreenSpaceCamera *this, NiStream *kStream); // idb
NiScreenGeometryData *__thiscall NiScreenGeometryData::`scalar deleting destructor'(NiScreenGeometryData *this, unsigned int a2);
NiExtraData *__cdecl NiVectorExtraData::CreateObject();
bool __thiscall NiVectorExtraData::IsEqual(NiVectorExtraData *this, NiObject *pObject); // idb
NiRTTI *NiVectorExtraData::GetRTTI();
NiVectorExtraData *__thiscall NiVectorExtraData::`scalar deleting destructor'(NiVectorExtraData *this, unsigned int a2);
NiExtraData *__thiscall NiVectorExtraData::CreateClone(NiVectorExtraData *this, NiCloningProcess *kCloning);
void __thiscall NiVectorExtraData::LoadBinary(NiVectorExtraData *this, NiStream *kStream); // idb
void __thiscall NiVectorExtraData::SaveBinary(NiVectorExtraData *this, NiStream *kStream); // idb
void __thiscall NiVectorExtraData::GetViewerStrings(NiVectorExtraData *this, NiTArray<char *> *pStrings); // idb
void __thiscall NiTextureEffect::NiTextureEffect(NiTextureEffect *this); // idb
NiRTTI *NiTextureEffect::GetRTTI();
signed int ItemActiveskill::GetStructSize();
void __thiscall NiTextureEffect::UpdateProjection(NiTextureEffect *this); // idb
void __thiscall NiTextureEffect::CopyMembers(NiTextureEffect *this, NiTextureEffect *pDest, NiCloningProcess *kCloning); // idb
void __cdecl NiTextureEffect::CreateObject();
void __thiscall NiTextureEffect::LinkObject(NiTextureEffect *this, NiStream *kStream); // idb
char __thiscall NiTextureEffect::RegisterStreamables(NiTextureEffect *this, NiStream *kStream);
char *__cdecl NiTextureEffect::GetViewerString(const char *pPrefix, NiTextureEffect::TextureType eMode); // idb
char *__cdecl NiTextureEffect::GetViewerString(const char *pPrefix, NiTextureEffect::CoordGenType eMode); // idb
NiTextureEffect *__thiscall NiTextureEffect::`scalar deleting destructor'(NiTextureEffect *this, unsigned int a2);
NiObject *__thiscall NiTextureEffect::CreateClone(NiTextureEffect *this, NiCloningProcess *kCloning); // idb
bool __thiscall NiTextureEffect::IsEqual(NiTextureEffect *this, NiObject *pObject); // idb
void __thiscall NiTextureEffect::LoadBinary(NiTextureEffect *this, NiStream *kStream); // idb
void __thiscall NiTextureEffect::SaveBinary(NiTextureEffect *this, NiStream *kStream); // idb
void __thiscall NiTextureEffect::GetViewerStrings(NiTextureEffect *this, NiTArray<char *> *pStrings); // idb
char __thiscall NiSwitchStringExtraData::IsEqual(NiSwitchStringExtraData *this, NiObject *pObject);
NiRTTI *NiSwitchStringExtraData::GetRTTI();
void __thiscall NiSwitchStringExtraData::CopyMembers(NiSwitchStringExtraData *this, NiSwitchStringExtraData *pDest, NiCloningProcess *kCloning); // idb
NiObject *__cdecl NiSwitchStringExtraData::CreateObject(); // idb
NiSwitchStringExtraData *__thiscall NiSwitchStringExtraData::`vector deleting destructor'(NiSwitchStringExtraData *this, unsigned int a2);
NiSwitchStringExtraData *__thiscall NiSwitchStringExtraData::CreateClone(NiSwitchStringExtraData *this, NiCloningProcess *kCloning);
void __thiscall NiSwitchStringExtraData::LoadBinary(NiSwitchStringExtraData *this, NiStream *kStream); // idb
void __thiscall NiSwitchStringExtraData::SaveBinary(NiSwitchStringExtraData *this, NiStream *kStream); // idb
void __thiscall NiSwitchStringExtraData::GetViewerStrings(NiSwitchStringExtraData *this, NiTArray<char *> *pStrings); // idb
char __thiscall NiStringsExtraData::IsEqual(NiStringsExtraData *this, NiObject *pObject);
NiRTTI *NiStringsExtraData::GetRTTI();
void __thiscall NiStringsExtraData::CopyMembers(NiStringsExtraData *this, NiStringsExtraData *pDest, NiCloningProcess *kCloning); // idb
NiObject *__cdecl NiStringsExtraData::CreateObject(); // idb
NiStringsExtraData *__thiscall NiStringsExtraData::`vector deleting destructor'(NiStringsExtraData *this, unsigned int a2);
NiStringsExtraData *__thiscall NiStringsExtraData::CreateClone(NiStringsExtraData *this, NiCloningProcess *kCloning);
void __thiscall NiStringsExtraData::SaveBinary(NiStringsExtraData *this, NiStream *kStream); // idb
void __thiscall NiStringsExtraData::LoadBinary(NiStringsExtraData *this, NiStream *kStream); // idb
void __thiscall NiStringsExtraData::GetViewerStrings(NiStringsExtraData *this, NiTArray<char *> *pStrings); // idb
void __thiscall NiSpotLight::LinkObject(NiSpotLight *this, NiStream *stream); // idb
char __thiscall NiSpotLight::RegisterStreamables(NiSpotLight *this, NiStream *stream);
bool __thiscall NiSpotLight::IsEqual(NiSpotLight *this, NiObject *pObject); // idb
NiRTTI *NiPointLight::GetRTTI();
void __thiscall NiSpotLight::NiSpotLight(NiSpotLight *this); // idb
NiRTTI *NiSpotLight::GetRTTI();
void __thiscall NiSpotLight::UpdateWorldData(NiSpotLight *this); // idb
NiObject *__thiscall NiSpotLight::CreateClone(NiSpotLight *this, NiCloningProcess *kCloning); // idb
void __cdecl NiSpotLight::CreateObject();
NiSpotLight *__thiscall NiDirectionalLight::`scalar deleting destructor'(NiSpotLight *this, unsigned int a2);
void __thiscall NiSpotLight::LoadBinary(NiSpotLight *this, NiStream *stream); // idb
void __thiscall NiSpotLight::SaveBinary(NiSpotLight *this, NiStream *stream); // idb
void __thiscall NiSpotLight::GetViewerStrings(NiSpotLight *this, NiTArray<char *> *pStrings); // idb
bool __thiscall NiSourceCubeMap::RegisterStreamables(NiSourceCubeMap *this, NiStream *kStream); // idb
void __thiscall NiSourceCubeMap::SaveBinary(NiSourceCubeMap *this, NiStream *kStream); // idb
bool __thiscall NiSourceCubeMap::IsEqual(NiSourceCubeMap *this, NiObject *pkObject); // idb
void __thiscall NiSourceCubeMap::LoadPixelDataFromFile(NiSourceCubeMap *this); // idb
void __thiscall NiSourceCubeMap::DestroyAppPixelData(NiSourceTexture *this); // idb
char __thiscall NiSourceCubeMap::CreateRendererData(NiSourceCubeMap *this);
void __thiscall NiSourceCubeMap::LoadFromPixelData(NiSourceCubeMap *this, NiPixelData *pkPosXRaw, NiPixelData *pkNegXRaw, NiPixelData *pkPosYRaw, NiPixelData *pkNegYRaw, NiPixelData *pkPosZRaw, NiPixelData *pkNegZRaw); // idb
void __thiscall NiSourceCubeMap::LinkObject(NiSourceCubeMap *this, NiStream *kStream); // idb
NiRTTI *NiSourceCubeMap::GetRTTI();
void __thiscall NiSourceCubeMap::LoadFromFiles(NiSourceCubeMap *this, const char *pcPosXFilename, const char *pcNegXFilename, const char *pcPosYFilename, const char *pcNegYFilename, const char *pcPosZFilename, const char *pcNegZFilename, NiSearchPath *kPath); // idb
NiObjectNET *__cdecl NiSourceCubeMap::CreateObject();
NiSourceCubeMap *__thiscall NiSourceCubeMap::`scalar deleting destructor'(NiSourceCubeMap *this, unsigned int a2);
void __thiscall NiSourceCubeMap::LoadBinary(NiSourceCubeMap *this, NiStream *kStream); // idb
void __thiscall NiSourceCubeMap::GetViewerStrings(NiSourceCubeMap *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiScreenTexture::GetViewerStrings(NiScreenTexture *this, NiTArray<char *> *pStrings); // idb
char __thiscall NiScreenTexture::RegisterStreamables(NiScreenTexture *this, NiStream *kStream);
void __thiscall NiTSet<NiScreenTexture::ScreenRect>::Realloc(NiTSet<NiScreenTexture::ScreenRect> *this, unsigned int uiNewSize); // idb
NiRTTI *NiScreenTexture::GetRTTI();
void __thiscall NiScreenTexture::Draw(NiScreenTexture *this, NiRenderer *pkRenderer); // idb
NiObject *__cdecl NiScreenTexture::CreateObject(); // idb
void __thiscall NiScreenTexture::LinkObject(NiScreenTexture *this, NiStream *kStream); // idb
bool __thiscall NiScreenTexture::IsEqual(NiScreenTexture *this, NiObject *pkObject); // idb
NiScreenTexture *__thiscall NiScreenTexture::`vector deleting destructor'(NiScreenTexture *this, unsigned int a2);
void __thiscall NiScreenTexture::CopyMembers(NiScreenTexture *this, NiScreenTexture *pkDest, NiCloningProcess *kCloning); // idb
void __thiscall NiScreenTexture::LoadBinary(NiScreenTexture *this, NiStream *kStream); // idb
void __thiscall NiScreenTexture::SaveBinary(NiScreenTexture *this, NiStream *kStream); // idb
NiScreenTexture *__thiscall NiScreenTexture::CreateClone(NiScreenTexture *this, NiCloningProcess *kCloning);
int __thiscall NiScreenLODData::GetLODIndex(NiScreenLODData *this, int iLODLevel); // idb
double __cdecl NiMax(float fA, float fB);
NiRTTI *NiScreenLODData::GetRTTI();
void __thiscall NiScreenLODData::NiScreenLODData(NiScreenLODData *this); // idb
NiScreenLODData *__thiscall NiScreenLODData::`scalar deleting destructor'(NiScreenLODData *this, unsigned int a2);
void __thiscall NiScreenLODData::SetNumProportions(NiScreenLODData *this, unsigned int uiNumProportions); // idb
unsigned int __thiscall NiScreenLODData::GetLODLevel(NiScreenLODData *this, NiCamera *pkCamera, NiLODNode *pkLOD);
void __cdecl NiScreenLODData::CreateObject();
char __thiscall NiScreenLODData::IsEqual(NiScreenLODData *this, NiObject *pkObject);
NiScreenLODData *__thiscall NiScreenLODData::Duplicate(NiScreenLODData *this);
void __thiscall NiScreenLODData::AutoSetBound(NiScreenLODData *this, NiLODNode *pkLOD); // idb
NiScreenLODData *__thiscall NiScreenLODData::CreateClone(NiScreenLODData *this, NiCloningProcess *kCloning);
void __thiscall NiScreenLODData::SaveBinary(NiScreenLODData *this, NiStream *kStream); // idb
void __thiscall NiScreenLODData::UpdateWorldData(NiScreenLODData *this, NiLODNode *pkLOD); // idb
void __thiscall NiScreenLODData::LoadBinary(NiScreenLODData *this, NiStream *kStream); // idb
void __thiscall NiScreenLODData::GetViewerStrings(NiScreenLODData *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiParticlesData::~NiParticlesData(NiParticlesData *this); // idb
void __thiscall NiParticlesData::ReplaceRadii(NiParticlesData *this, float *pfRadii); // idb
void __thiscall NiParticlesData::ReplaceSizes(NiParticlesData *this, float *pfSizes); // idb
void __thiscall NiParticlesData::ReplaceRotations(NiParticlesData *this, NiQuaternion *pkRotations); // idb
void __thiscall NiParticlesData::ReplaceRotationAngles(NiParticlesData *this, float *pfRotationAngles); // idb
void __thiscall NiParticlesData::ReplaceRotationAxes(NiParticlesData *this, NiPoint3 *pkRotationAxes); // idb
void __thiscall NiParticlesData::RemoveParticle(NiParticlesData *this, unsigned __int16 usParticle); // idb
NiRTTI *NiParticlesData::GetRTTI();
void __thiscall NiParticlesData::SetActiveVertexCount(NiParticlesData *this, unsigned __int16 usActive); // idb
unsigned __int16 __thiscall NiParticlesData::GetActiveVertexCount(NiParticlesData *this); // idb
NiParticlesData *__thiscall NiParticlesData::`vector deleting destructor'(NiParticlesData *this, unsigned int a2);
void __thiscall NiParticlesData::NiParticlesData(NiParticlesData *this); // idb
NiGeometryData *__cdecl NiParticlesData::CreateObject();
NiGeometryData *__cdecl NiParticlesData::CreateOldRotatingParticlesObject();
char __thiscall NiParticlesData::IsEqual(NiParticlesData *this, NiObject *pkObject);
void __thiscall NiParticlesData::LoadBinary(NiParticlesData *this, NiStream *kStream); // idb
void __thiscall NiParticlesData::SaveBinary(NiParticlesData *this, NiStream *kStream); // idb
void __thiscall NiParticlesData::GetViewerStrings(NiParticlesData *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiPointLight::CopyMembers(NiPointLight *this, NiPointLight *pDest, NiCloningProcess *kCloning); // idb
char __thiscall NiAmbientLight::RegisterStreamables(NiPointLight *this, NiStream *stream);
bool __thiscall NiPointLight::IsEqual(NiPointLight *this, NiObject *pObject); // idb
void __thiscall NiPointLight::UpdateWorldData(NiPointLight *this); // idb
NiLight *__thiscall NiPointLight::CreateClone(NiPointLight *this, NiCloningProcess *kCloning);
NiLight *__cdecl NiPointLight::CreateObject();
void __thiscall NiPointLight::LoadBinary(NiPointLight *this, NiStream *stream); // idb
void __thiscall NiPointLight::SaveBinary(NiPointLight *this, NiStream *stream); // idb
void __thiscall NiPointLight::GetViewerStrings(NiPointLight *this, NiTArray<char *> *pStrings); // idb
void __thiscall NiParticleMeshesData::LoadBinary(NiParticleMeshesData *this, NiStream *kStream); // idb
void __thiscall NiParticleMeshesData::SetActiveVertexCount(NiParticleMeshesData *this, unsigned __int16 usActive); // idb
bool __thiscall NiParticleMeshesData::RegisterStreamables(NiParticleMeshesData *this, NiStream *kStream); // idb
void __thiscall NiParticleMeshesData::SaveBinary(NiParticleMeshesData *this, NiStream *kStream); // idb
bool __thiscall NiParticleMeshesData::IsEqual(NiParticleMeshesData *this, NiObject *pkObject); // idb
NiRTTI *NiParticleMeshesData::GetRTTI();
void __thiscall NiParticleMeshesData::NiParticleMeshesData(NiParticleMeshesData *this); // idb
void __thiscall NiParticleMeshesData::~NiParticleMeshesData(NiParticleMeshesData *this); // idb
void __thiscall NiParticleMeshesData::RemoveParticle(NiParticleMeshesData *this, unsigned __int16 usParticle); // idb
void __thiscall NiParticleMeshesData::UpdateParticles(NiParticleMeshesData *this); // idb
void __cdecl NiParticleMeshesData::CreateObject();
void __thiscall NiParticleMeshesData::LinkObject(NiParticleMeshesData *this, NiStream *kStream); // idb
NiParticleMeshesData *__thiscall NiParticleMeshesData::`vector deleting destructor'(NiParticleMeshesData *this, unsigned int a2);
void __thiscall NiParticleMeshesData::GetViewerStrings(NiParticleMeshesData *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiParticleMeshes::UpdateDownwardPass(NiParticleMeshes *this, float fTime, bool bUpdateControllers); // idb
void __thiscall NiParticleMeshes::UpdateSelectedDownwardPass(NiParticleMeshes *this, float fTime); // idb
NiParticles *__cdecl NiParticleMeshes::CreateObject();
void __thiscall NiTriShape::LinkObject(NiTriStrips *this, NiStream *kStream); // idb
NiRTTI *NiParticleMeshes::GetRTTI();
NiParticles *__thiscall NiGeometry::`scalar deleting destructor'(NiParticles *this, unsigned int a2);
NiParticles *__thiscall NiParticleMeshes::CreateClone(NiParticleMeshes *this, NiCloningProcess *kCloning);
void __thiscall NiParticleMeshes::UpdateWorldData(NiParticleMeshes *this); // idb
void __thiscall NiParticleMeshes::SetSelectiveUpdateFlags(NiParticleMeshes *this, bool *bSelectiveUpdate, bool bSelectiveUpdateTransforms, bool *bRigid); // idb
void __thiscall NiParticleMeshes::UpdatePropertiesDownward(NiParticleMeshes *this, NiPropertyState *pkParentState); // idb
void __thiscall NiParticleMeshes::UpdateEffectsDownward(NiParticleMeshes *this, NiDynamicEffectState *pkParentState); // idb
void __thiscall NiParticleMeshes::OnVisible(NiParticleMeshes *this, NiCullingProcess *kCuller); // idb
void __thiscall NiParticleMeshes::PurgeRendererData(NiParticleMeshes *this, NiRenderer *pkRenderer); // idb
void __thiscall NiParticleMeshes::GetViewerStrings(NiParticleMeshes *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiLinesData::NiLinesData(NiLinesData *this, unsigned __int16 usVertices, NiPoint3 *pkVertex, NiColorA *pkColor, NiPoint2 *pkTexture, unsigned __int16 usNumTextureSets, NiGeometryData::DataFlags eNBTMethod, char *pkFlags); // idb
NiObject *__cdecl NiLinesData::CreateObject(); // idb
char __thiscall NiLinesData::IsEqual(NiLinesData *this, NiObject *pkObject);
NiRTTI *NiLinesData::GetRTTI();
NiLinesData *__thiscall NiLinesData::`vector deleting destructor'(NiLinesData *this, unsigned int a2);
void __thiscall NiLinesData::LoadBinary(NiLinesData *this, NiStream *kStream); // idb
void __thiscall NiLinesData::SaveBinary(NiLinesData *this, NiStream *kStream); // idb
void __thiscall NiLinesData::GetViewerStrings(NiLinesData *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiLines::NiLines(NiLines *this, unsigned __int16 usVertices, NiPoint3 *pkVertex, NiColorA *pkColor, NiPoint2 *pkTexture, unsigned __int16 usNumTextureSets, NiGeometryData::DataFlags eNBTMethod, char *pkFlags); // idb
NiObject *__cdecl NiLines::CreateObject(); // idb
char __thiscall NiLines::IsEqual(NiTriBasedGeom *this, NiObject *pkObject);
NiRTTI *NiLines::GetRTTI();
NiGeometry *__thiscall NiLines::CreateClone(NiLines *this, NiCloningProcess *kCloning);
void __thiscall NiLines::RenderImmediate(NiLines *this, NiRenderer *pkRenderer); // idb
void __thiscall NiLines::GetViewerStrings(NiLines *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiIntegersExtraData::CopyMembers(NiIntegersExtraData *this, NiIntegersExtraData *pDest, NiCloningProcess *kCloning); // idb
char __thiscall NiIntegersExtraData::IsEqual(NiIntegersExtraData *this, NiObject *pObject);
NiRTTI *NiIntegersExtraData::GetRTTI();
NiIntegersExtraData *__thiscall NiIntegersExtraData::CreateClone(NiIntegersExtraData *this, NiCloningProcess *kCloning);
NiObject *__cdecl NiIntegersExtraData::CreateObject(); // idb
NiIntegersExtraData *__thiscall NiIntegersExtraData::`vector deleting destructor'(NiIntegersExtraData *this, unsigned int a2);
void __thiscall NiFloatsExtraData::SaveBinary(NiIntegersExtraData *this, NiStream *kStream); // idb
void __thiscall NiIntegersExtraData::GetViewerStrings(NiIntegersExtraData *this, NiTArray<char *> *pStrings); // idb
bool __thiscall NiFloatExtraData::IsEqual(NiFloatExtraData *this, NiObject *pObject); // idb
NiRTTI *NiFloatExtraData::GetRTTI();
NiExtraData *__thiscall NiFloatExtraData::CreateClone(NiFloatExtraData *this, NiCloningProcess *kCloning);
NiExtraData *__cdecl NiFloatExtraData::CreateObject();
NiFloatExtraData *__thiscall NiFloatExtraData::`scalar deleting destructor'(NiFloatExtraData *this, unsigned int a2);
void __thiscall NiFloatExtraData::LoadBinary(NiIntegerExtraData *this, NiStream *kStream); // idb
void __thiscall NiFloatExtraData::GetViewerStrings(NiFloatExtraData *this, NiTArray<char *> *pStrings); // idb
void __thiscall NiBSPNode::LoadBinary(NiOldWall *this, NiStream *kStream); // idb
void __thiscall NiBSPNode::SaveBinary(NiBSPNode *this, NiStream *stream); // idb
void __thiscall NiBSPNode::UpdateWorldPlane(NiBSPNode *this); // idb
void __thiscall NiBSPNode::ApplyTransform(NiBSPNode *this, NiMatrix3 *mat, NiPoint3 *trn, bool bOnLeft); // idb
void __thiscall NiBSPNode::OnVisible(NiBSPNode *this, NiCullingProcess *kCuller); // idb
bool __thiscall NiBSPNode::IsEqual(NiBSPNode *this, NiObject *pObject); // idb
void __thiscall NiBSPNode::GetViewerStrings(NiBSPNode *this, NiTArray<char *> *pStrings); // idb
NiRTTI *NiBSPNode::GetRTTI();
NiNode *__thiscall NiBillboardNode::`vector deleting destructor'(NiNode *this, unsigned int a2);
NiNode *__thiscall NiBSPNode::CreateClone(NiBSPNode *this, NiCloningProcess *kCloning);
NiNode *__cdecl NiBSPNode::CreateObject();
bool __thiscall NiBooleanExtraData::IsEqual(NiBooleanExtraData *this, NiObject *pObject); // idb
NiRTTI *NiBooleanExtraData::GetRTTI();
NiExtraData *__thiscall NiBooleanExtraData::CreateClone(NiBooleanExtraData *this, NiCloningProcess *kCloning);
NiExtraData *__cdecl NiBooleanExtraData::CreateObject();
NiBooleanExtraData *__thiscall NiBooleanExtraData::`scalar deleting destructor'(NiBooleanExtraData *this, unsigned int a2);
void __thiscall NiBooleanExtraData::LoadBinary(NiBooleanExtraData *this, NiStream *kStream); // idb
void __thiscall NiBooleanExtraData::SaveBinary(NiBooleanExtraData *this, NiStream *kStream); // idb
void __thiscall NiBooleanExtraData::GetViewerStrings(NiBooleanExtraData *this, NiTArray<char *> *pStrings); // idb
void __thiscall NiBillboardNode::UpdateDownwardPass(NiBillboardNode *this, float fTime, int bUpdateControllers);
void __thiscall NiBillboardNode::UpdateSelectedDownwardPass(NiBillboardNode *this, float fTime); // idb
void __thiscall NiBillboardNode::UpdateRigidDownwardPass(NiBillboardNode *this, float fTime); // idb
void __thiscall NiBSPNode::LinkObject(NsFadeNode *this, NiStream *stream); // idb
char __stdcall NiBillboardNode::RotateToCenter(NiCamera *pkCamera, NiPoint3 *kWorldTranslate, NiPoint3 *kCamD, NiPoint3 *kCamU, NiPoint3 *kCamR);
bool __thiscall NiBillboardNode::IsEqual(NiBillboardNode *this, NiObject *pkObject); // idb
char *__cdecl NiBillboardNode::GetViewerString(const char *pcPrefix, NiBillboardNode::FaceMode eMode); // idb
NiRTTI *NiBillboardNode::GetRTTI();
void __thiscall NiBillboardNode::RotateToCamera(NiBillboardNode *this, NiCamera *pkCamera); // idb
void __thiscall NiBillboardNode::OnVisible(NiBillboardNode *this, NiCullingProcess *kCuller); // idb
void __thiscall NiBillboardNode::UpdateWorldBound(NiBillboardNode *this); // idb
NiNode *__thiscall NiBillboardNode::CreateClone(NiBillboardNode *this, NiCloningProcess *kCloning);
NiNode *__cdecl NiBillboardNode::CreateObject();
void __thiscall NiBillboardNode::LoadBinary(NiBillboardNode *this, NiStream *kStream); // idb
void __thiscall NiBillboardNode::SaveBinary(NiBillboardNode *this, NiStream *kStream); // idb
void __thiscall NiBillboardNode::GetViewerStrings(NiBillboardNode *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiParticles::NiParticles(NiParticles *this); // idb
void __thiscall NiTriBasedGeom::CopyMembers(NiTriBasedGeom *this, NiTriBasedGeom *pkDest, NiCloningProcess *kCloning); // idb
NiObject *__cdecl NiParticles::CreateObject(); // idb
void __thiscall NiLines::LinkObject(NiTriBasedGeom *this, NiStream *kStream); // idb
NiRTTI *NiParticles::GetRTTI();
void __thiscall NiParticles::UpdateEffectsDownward(NiParticles *this, NiDynamicEffectState *pParentState); // idb
void __thiscall NiParticles::CalculateConsistency(NiParticles *this, bool bTool); // idb
NiGeometry *__thiscall NiParticles::CreateClone(NiParticles *this, NiCloningProcess *kCloning);
void __thiscall NiParticles::RenderImmediate(NiParticles *this, NiRenderer *pkRenderer); // idb
void __thiscall NiParticles::GetViewerStrings(NiParticles *this, NiTArray<char *> *pStrings); // idb
void __thiscall NiAdditionalGeometryData::NiAGDDataStream::FillInByteSizeArray(NiAdditionalGeometryData::NiAGDDataStream *this, unsigned int *pauiDataArray, unsigned int *uiIndex, unsigned int uiArraySize); // idb
char __thiscall NiAdditionalGeometryData::NiAGDDataBlock::IsEqual(NiAdditionalGeometryData::NiAGDDataBlock *this, NiAdditionalGeometryData::NiAGDDataBlock *pkOther);
NiTArray<NiAdditionalGeometryData::NiAGDDataBlock *> *__thiscall NiTArray<NiAdditionalGeometryData::NiAGDDataBlock *>::`vector deleting destructor'(NiTArray<NiAdditionalGeometryData::NiAGDDataBlock *> *this, unsigned int a2);
char __thiscall NiAdditionalGeometryData::GetDataStream(NiAdditionalGeometryData *this, unsigned int uiStreamIndex, char **pucData, unsigned int *uiType, unsigned __int16 *usCount, unsigned int *uiTotalSize, unsigned int *uiUnitSize, unsigned int *uiStride);
bool __thiscall NiAdditionalGeometryData::IsEqual(NiAdditionalGeometryData *this, NiObject *pkObject); // idb
void __thiscall NiAdditionalGeometryData::NiAdditionalGeometryData(NiAdditionalGeometryData *this); // idb
NiRTTI *NiAdditionalGeometryData::GetRTTI();
void __thiscall NiAdditionalGeometryData::NiAGDDataBlock::SaveBinary(NiAdditionalGeometryData::NiAGDDataBlock *this, NiStream *kStream, unsigned int uiBlockIdx, NiAdditionalGeometryData::NiAGDDataStream *pkDataStreams, unsigned int uiNumStreams, unsigned __int16 usVertexCount); // idb
void __thiscall NiAdditionalGeometryData::~NiAdditionalGeometryData(NiAdditionalGeometryData *this); // idb
void __cdecl NiAdditionalGeometryData::CreateObject();
NiAdditionalGeometryData *__thiscall NiAdditionalGeometryData::`vector deleting destructor'(NiAdditionalGeometryData *this, unsigned int a2);
void __thiscall NiAdditionalGeometryData::NiAGDDataStream::LoadBinary(NiAdditionalGeometryData::NiAGDDataStream *this, NiStream *kStream); // idb
void __thiscall NiAdditionalGeometryData::NiAGDDataStream::SaveBinary(NiAdditionalGeometryData::NiAGDDataStream *this, NiStream *kStream); // idb
void __thiscall NiAdditionalGeometryData::NiAGDDataStream::GetViewerStrings(NiAdditionalGeometryData::NiAGDDataStream *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiAdditionalGeometryData::NiAGDDataBlock::LoadBinary(NiAdditionalGeometryData::NiAGDDataBlock *this, NiStream *kStream, unsigned int uiBlockIdx, NiAdditionalGeometryData::NiAGDDataStream *pkDataStreams, unsigned int uiNumStreams, unsigned __int16 usVertexCount); // idb
void __thiscall NiAdditionalGeometryData::LoadBinary(NiAdditionalGeometryData *this, NiStream *kStream); // idb
void __thiscall NiAdditionalGeometryData::SaveBinary(NiAdditionalGeometryData *this, NiStream *kStream); // idb
void __thiscall NiAdditionalGeometryData::GetViewerStrings(NiAdditionalGeometryData *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiTriStripsData::CalculateNormals(NiTriStripsData *this); // idb
void NiMilesAudioSDM::NiMilesAudioSDM();
void __cdecl NiMilesAudioSDM::Init(); // idb
void __cdecl NiMilesAudioSDM::Shutdown(); // idb
void __thiscall NiAudioSystem::NiAudioSystem(NiAudioSystem *this); // idb
void __thiscall NiAudioSystem::~NiAudioSystem(NiAudioSystem *this); // idb
NiAudioListener *__thiscall NiAudioSystem::GetListener(NiAudioSystem *this); // idb
void __thiscall NiAudioSystem::Shutdown(NiAudioSystem *this); // idb
void __thiscall NiAudioSystem::AddSource(NiAudioSystem *this, NiAudioSource *pSource); // idb
void __thiscall NiAudioSystem::RemoveSource(NiAudioSystem *this, NiAudioSource *pSource); // idb
void __thiscall NiAudioSystem::Update(NiAudioSystem *this, float fTime, bool bUpdateAll); // idb
void __thiscall NiAudioSystem::PlayAllSources(NiAudioSystem *this); // idb
void __thiscall NiAudioSystem::StopAllSources(NiAudioSystem *this); // idb
void __thiscall NiAudioSystem::UpdateAllSources(NiAudioSystem *this, float fTime); // idb
NiAudioSource *__thiscall NiAudioSystem::GetFirstSource(NiAudioSystem *this, void **iter); // idb
NiAudioSource *__thiscall NiAudioSystem::GetNextSource(NiAudioSystem *this, void **iter); // idb
NiAudioSource *__thiscall NiAudioSystem::FindDuplicateSource(NiAudioSystem *this, NiAudioSource *pkOriginal); // idb
char __thiscall NiAudioSystem::SetUnitsPerMeter(NiAudioSystem *this, float fUnits);
NiAudioSystem *__cdecl NiAudioSystem::CreateObject();
void __thiscall NiAudioSystem::LoadBinary(NiAudioSystem *this, NiStream *stream); // idb
bool __thiscall NiAudioSystem::RegisterStreamables(NiAudioSystem *this, NiStream *stream); // idb
void __thiscall NiAudioSystem::SaveBinary(NiAudioSystem *this, NiStream *stream); // idb
// bool __userpurge NiAudioSystem::IsEqual@<al>(NiAudioSystem *this@<ecx>, double a2@<st0>, NiObject *pObject);
NiAudioSystem *__cdecl NiAudioSystem::GetAudioSystem(); // idb
double __thiscall NiAudioSystem::GetUnitsPerMeter(NiAudioSystem *this);
NiAudioSystem *__thiscall NiAudioSystem::`vector deleting destructor'(NiAudioSystem *this, unsigned int a2);
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiAudioSource *> *__thiscall NiTPointerList<NiAudioSource *>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiAudioSource *> *this, unsigned int a2);
SpScreenText *__thiscall NiTPointerListBase<DFALL<SpScreenText *>,SpScreenText *>::Remove(NiTPointerListBase<DFALL<SpScreenText *>,SpScreenText *> *this, SpScreenText *const *element); // idb
NiTMapItem<void *,PgFrameWork *> *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiProviderInfo *>::NewItem();
NiTListBase<NiTPointerAllocator<unsigned int>,NiAudioSource *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiAudioSource *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiAudioSource *> *this, unsigned int a2);
SpScreenText *__thiscall NiTPointerListBase<DFALL<SpScreenText *>,SpScreenText *>::RemovePos(NiTPointerListBase<DFALL<SpScreenText *>,SpScreenText *> *this, void **kPos); // idb
NiMilesAudioSystem *__cdecl NiMilesAudioSystem::GetAudioSystem(); // idb
void __thiscall NiMilesAudioSystem::NiMilesAudioSystem(NiMilesAudioSystem *this); // idb
void __thiscall NiMilesAudioSystem::~NiMilesAudioSystem(NiMilesAudioSystem *this); // idb
char __thiscall NiMilesAudioSystem::Startup(NiMilesAudioSystem *this, const char *pcDirectoryname);
void __thiscall NiMilesAudioSystem::Shutdown(NiMilesAudioSystem *this); // idb
// NiMilesListener *__thiscall NiMilesAudioSystem::GetListener(NiMilesAudioSystem *this); idb
NiAudioSource *__stdcall NiMilesAudioSystem::CreateSource(unsigned int uiType);
NiAudioSystem::SpeakerType __thiscall NiMilesAudioSystem::GetSpeakerType(NiMilesAudioSystem *this); // idb
NiAudioSystem::SpeakerType __stdcall NiMilesAudioSystem::GetSpeakerType(NiProviderInfo *pProvider);
bool __thiscall NiMilesAudioSystem::SetSpeakerType(NiMilesAudioSystem *this, unsigned int uiType); // idb
bool __stdcall NiMilesAudioSystem::SetSpeakerType(NiProviderInfo *pProvider, unsigned int uiType);
char __thiscall NiMilesAudioSystem::SetBestSpeakerTypeAvailable(NiMilesAudioSystem *this);
char __stdcall NiMilesAudioSystem::SetBestSpeakerTypeAvailable(NiProviderInfo *pProvider);
char *NiMilesAudioSystem::GetLastError();
// NiMilesSource *__thiscall NiMilesAudioSystem::GetFirstSource(NiMilesAudioSystem *this, void **iter); idb
// NiMilesSource *__thiscall NiMilesAudioSystem::GetNextSource(NiMilesAudioSystem *this, void **iter); idb
NiMilesSource *__thiscall NiMilesAudioSystem::FindDuplicateSource(NiMilesAudioSystem *this, NiAudioSource *pkOriginal); // idb
char __thiscall NiMilesAudioSystem::IsUniqueSource(NiMilesAudioSystem *this, NiMilesSource *pkOriginal);
char __thiscall NiMilesAudioSystem::SetUnitsPerMeter(NiMilesAudioSystem *this, float fUnits);
NiProviderInfo *__thiscall NiMilesAudioSystem::GetFirstProvider(NiMilesAudioSystem *this, void **iter); // idb
NiProviderInfo *__thiscall NiMilesAudioSystem::GetNextProvider(NiMilesAudioSystem *this, void **iter); // idb
// NiProviderInfo *__thiscall NiMilesAudioSystem::GetDefaultProvider(NiMilesAudioSystem *this); idb
void __thiscall NiMilesAudioSystem::SetDefaultProvider(NiMilesAudioSystem *this, NiProviderInfo *pkDefault); // idb
void __stdcall NiMilesAudioSystem::SetProviderPreference(NiProviderInfo *pProvider, char *cPreferenceName, void *PreferenceValue);
void __stdcall NiMilesAudioSystem::GetProviderPreference(NiProviderInfo *pProvider, char *cPreferenceName, void *PreferenceValue);
bool NiMilesAudioSystem::GetReverbAvailable();
bool __stdcall NiMilesAudioSystem::GetReverbAvailable(NiProviderInfo *pProvider);
bool __thiscall NiMilesAudioSystem::SetCurrentRoomReverb(NiMilesAudioSystem *this, unsigned int dwPreset); // idb
bool __stdcall NiMilesAudioSystem::SetCurrentRoomReverb(NiProviderInfo *pProvider, unsigned int dwPreset);
unsigned int __thiscall NiMilesAudioSystem::GetCurrentRoomReverb(NiMilesAudioSystem *this); // idb
unsigned int __stdcall NiMilesAudioSystem::GetCurrentRoomReverb(NiProviderInfo *pProvider);
// void *__thiscall NiMilesAudioSystem::GetDigitalDriver(NiMilesAudioSystem *this); idb
NiMilesAudioSystem *__cdecl NiMilesAudioSystem::CreateObject();
void __thiscall NiMilesAudioSystem::LoadBinary(NiMilesAudioSystem *this, NiStream *stream); // idb
bool __thiscall NiMilesAudioSystem::RegisterStreamables(NiMilesAudioSystem *this, NiStream *stream); // idb
void __thiscall NiMilesAudioSystem::SaveBinary(NiMilesAudioSystem *this, NiStream *stream); // idb
// bool __userpurge NiMilesAudioSystem::IsEqual@<al>(NiMilesAudioSystem *this@<ecx>, double a2@<st0>, NiObject *pObject);
NiMilesAudioSystem *__thiscall NiMilesAudioSystem::`vector deleting destructor'(NiMilesAudioSystem *this, unsigned int a2);
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiProviderInfo *> *__thiscall NiTPointerList<NiProviderInfo *>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiProviderInfo *> *this, unsigned int a2);
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiAudioSource *>::RemoveAll(NiTListBase<DFALL<SpScreenText *>,SpScreenText *> *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,NiProviderInfo *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiProviderInfo *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiProviderInfo *> *this, unsigned int a2);
void __thiscall NiMilesSource::NiMilesSource(NiMilesSource *this, unsigned int uiType); // idb
void __thiscall NiMilesSource::~NiMilesSource(NiMilesSource *this); // idb
void __thiscall NiMilesSource::Release(NiMilesSource *this); // idb
void __thiscall NiMilesSource::SetAllowSharing(NiMilesSource *this, bool bAllowSharing); // idb
void __thiscall NiMilesSource::SetStreamed(NiMilesSource *this, bool bStream); // idb
void __thiscall NiMilesSource::SetFilename(NiMilesSource *this, const char *pcFilename); // idb
void __thiscall NiMilesSource::SetFilename(NiMilesSource *this, const char *pFilename, NiProviderInfo *pProvider); // idb
char __thiscall NiMilesSource::Load(NiMilesSource *this);
char __thiscall NiMilesSource::Unload(NiMilesSource *this);
void *__thiscall NiMilesSource::GetFileImage(NiMilesSource *this); // idb
void __thiscall NiMilesSource::SetLoopCount(NiMilesSource *this, int iLoopCount); // idb
char __thiscall NiMilesSource::SetConeData(NiMilesSource *this, float fAngle1Deg, float fAngle2Deg, float fGain);
void __thiscall NiMilesSource::GetConeData(NiMilesSource *this, float *fAngle1Deg, float *fAngle2Deg, float *fGain); // idb
char __thiscall NiMilesSource::SetMinMaxDistance(NiMilesSource *this, float fMin, float fMax);
void __thiscall NiMilesSource::GetMinMaxDistance(NiMilesSource *this, float *fMin, float *fMax); // idb
char __thiscall NiMilesSource::SetGain(NiMilesSource *this, float fGain);
double __thiscall NiMilesSource::GetGain(NiMilesSource *this);
char __thiscall NiMilesSource::SetPlaybackRate(NiMilesSource *this, int lRate);
int __thiscall NiMilesSource::GetPlaybackRate(NiMilesSource *this); // idb
void __thiscall NiMilesSource::SetSamplePreference(NiMilesSource *this, char *cPreferenceName, void *PreferenceValue); // idb
void __thiscall NiMilesSource::GetSamplePreference(NiMilesSource *this, char *cPreferenceName, void *PreferenceValue); // idb
char __thiscall NiMilesSource::Play(NiMilesSource *this);
char __thiscall NiMilesSource::Stop(NiMilesSource *this);
void __thiscall NiMilesSource::Rewind(NiMilesSource *this); // idb
signed int __thiscall NiMilesSource::GetStatus(NiMilesSource *this);
char __thiscall NiMilesSource::SetPlayTime(NiMilesSource *this, float fTime);
double __thiscall NiMilesSource::GetPlayTime(NiMilesSource *this);
char __thiscall NiMilesSource::GetPlayLength(NiMilesSource *this, float *fTime);
char __thiscall NiMilesSource::SetPlayPosition(NiMilesSource *this, unsigned int dwPos);
unsigned int __thiscall NiMilesSource::GetPlayPosition(NiMilesSource *this); // idb
void __thiscall NiMilesSource::Update(NiMilesSource *this, float fTime); // idb
char __thiscall NiMilesSource::SetRoomEffectLevel(NiMilesSource *this, float fLevel);
// double __usercall NiMilesSource::GetRoomEffectLevel@<st0>(NiMilesSource *this@<ecx>, double a2@<st0>);
char __thiscall NiMilesSource::SetOcclusionFactor(NiMilesSource *this, float fLevel);
// double __usercall NiMilesSource::GetOcclusionFactor@<st0>(NiMilesSource *this@<ecx>, double a2@<st0>);
char __thiscall NiMilesSource::SetObstructionFactor(NiMilesSource *this, float fLevel);
// double __usercall NiMilesSource::GetObstructionFactor@<st0>(NiMilesSource *this@<ecx>, double a2@<st0>);
NiPoint3 *__thiscall NiMilesSource::GetPosition(NiMilesSource *this, NiPoint3 *result); // idb
void __thiscall NiMilesSource::GetOrientation(NiMilesSource *this, NiPoint3 *dir, NiPoint3 *up); // idb
// NiPoint3 *__userpurge NiMilesSource::GetVelocity@<eax>(NiMilesSource *this@<ecx>, double a2@<st0>, NiPoint3 *result);
void *__thiscall NiMilesSource::GetHandle(NiMilesSource *this); // idb
void __thiscall NiMilesSource::CreateHandle(NiMilesSource *this); // idb
NiMilesSource *__thiscall NiMilesSource::CreateClone(NiMilesSource *this, NiCloningProcess *kCloning);
void __thiscall NiMilesSource::CopyMembers(NiMilesSource *this, NiMilesSource *pDest, NiCloningProcess *kCloning); // idb
NiObject *__cdecl NiMilesSource::CreateObject(); // idb
void __thiscall NiMilesSource::LoadBinary(NiMilesSource *this, NiStream *stream); // idb
// void __userpurge NiMilesSource::SaveBinary(NiMilesSource *this@<ecx>, double a2@<st0>, NiStream *stream);
bool __thiscall NiMilesSource::IsEqual(NiMilesSource *this, NiObject *pObject); // idb
NiMilesSource *__thiscall NiMilesSource::`scalar deleting destructor'(NiMilesSource *this, unsigned int a2);
NiPoint3 *__thiscall NiMilesSource::GetWorldVelocity(NiMilesSource *this, NiPoint3 *result); // idb
void __thiscall NiMilesListener::NiMilesListener(NiMilesListener *this); // idb
void __thiscall NiMilesListener::~NiMilesListener(NiMilesListener *this); // idb
void __thiscall NiMilesListener::Release(NiMilesListener *this); // idb
void NiMilesListener::Startup();
void __thiscall NiMilesListener::Startup(NiMilesListener *this, NiProviderInfo *pProvider); // idb
// void __usercall NiMilesListener::Update(NiMilesListener *this@<ecx>, double a2@<st0>);
NiPoint3 *__thiscall NiMilesListener::GetPosition(NiMilesListener *this, NiPoint3 *result); // idb
// NiPoint3 *__userpurge NiMilesListener::GetVelocity@<eax>(NiMilesListener *this@<ecx>, double a2@<st0>, NiPoint3 *result);
void __thiscall NiMilesListener::GetOrientation(NiMilesListener *this, NiPoint3 *dir, NiPoint3 *up); // idb
// NiObject *__cdecl NiMilesListener::CreateObject(); idb
void __thiscall NiMilesListener::LoadBinary(NiMilesListener *this, NiStream *stream); // idb
bool __thiscall NiMilesListener::RegisterStreamables(NiMilesListener *this, NiStream *stream); // idb
void __thiscall NiMilesListener::SaveBinary(NiMilesListener *this, NiStream *stream); // idb
bool __thiscall NiMilesListener::IsEqual(NiMilesListener *this, NiObject *pObject); // idb
void __thiscall NiMilesListener::SetDirectionVector(NiMilesListener *this, NiPoint3 *kDir); // idb
NiPoint3 *__thiscall NiMilesListener::GetDirectionVector(NiMilesListener *this); // idb
void __thiscall NiMilesListener::SetUpVector(NiMilesListener *this, NiPoint3 *kUp); // idb
NiPoint3 *__thiscall NiMilesListener::GetUpVector(NiMilesListener *this); // idb
NiMilesListener *__thiscall NiMilesListener::`scalar deleting destructor'(NiMilesListener *this, unsigned int a2);
NiPoint3 *__thiscall NiMilesListener::GetWorldVelocity(NiMilesListener *this, NiPoint3 *result); // idb
void __thiscall NiAudioSource::NiAudioSource(NiAudioSource *this, unsigned int uiType); // idb
void __thiscall NiAudioSource::~NiAudioSource(NiAudioSource *this); // idb
void __thiscall NiAudioSource::Initialize(NiAudioSource *this); // idb
void __thiscall NiAudioSource::SetFilename(NiAudioSource *this, const char *pFilename); // idb
char __thiscall NiAudioSource::Load(NiAudioSource *this);
char __thiscall NiAudioSource::Unload(NiAudioSource *this);
void NiAudioSource::Release();
// char __userpurge NiAudioSource::FadeToGain@<al>(NiAudioSource *this@<ecx>, double a2@<st0>, float fGain, float fStartTime, float fDuration);
void __thiscall NiAudioSource::Update(NiAudioSource *this, float fTime); // idb
char __thiscall NiAudioSource::SetConeData(NiAudioSource *this, float fAngle1Deg, float fAngle2Deg, float fGain);
void __thiscall NiAudioSource::GetConeData(NiAudioSource *this, float *fAngle1Deg, float *fAngle2Deg, float *fGain); // idb
char __thiscall NiAudioSource::SetMinMaxDistance(NiAudioSource *this, float fMin, float fMax);
void __thiscall NiAudioSource::GetMinMaxDistance(NiAudioSource *this, float *fMin, float *fMax); // idb
char __thiscall NiAudioSource::SetGain(NiAudioSource *this, float fGain);
double __thiscall NiAudioSource::GetGain(NiAudioSource *this);
char __thiscall NiAudioSource::SetPlaybackRate(NiAudioSource *this, int lRate);
int __thiscall NiAudioSource::GetPlaybackRate(NiAudioSource *this); // idb
char __thiscall NiAudioSource::SetPlayTime(NiAudioSource *this, float fTime);
double __thiscall NiAudioSource::GetPlayTime(NiAudioSource *this);
char __thiscall NiAudioSource::SetPlayPosition(NiAudioSource *this, unsigned int Pos);
unsigned int __thiscall NiAudioSource::GetPlayPosition(NiAudioSource *this); // idb
char __thiscall NiAudioSource::SetRoomEffectLevel(NiAudioSource *this, float fLevel);
double __thiscall NiAudioSource::GetRoomEffectLevel(NiAudioSource *this);
char __thiscall NiAudioSource::SetOcclusionFactor(NiAudioSource *this, float fLevel);
double __thiscall NiAudioSource::GetOcclusionFactor(NiAudioSource *this);
char __thiscall NiAudioSource::SetObstructionFactor(NiAudioSource *this, float fLevel);
double __thiscall NiAudioSource::GetObstructionFactor(NiAudioSource *this);
void __thiscall NiAudioSource::SetVelocity(NiAudioSource *this, NiPoint3 *kVelocity); // idb
NiPoint3 *__thiscall NiAudioSource::GetVelocity(NiAudioSource *this, NiPoint3 *result); // idb
void __thiscall NiAudioSource::CopyMembers(NiAudioSource *this, NiAudioSource *pkDest, NiCloningProcess *kCloning); // idb
NiObject *__cdecl NiAudioSource::CreateObject(); // idb
void __thiscall NiAudioSource::LoadBinary(NiAudioSource *this, NiStream *kStream); // idb
// void __userpurge NiAudioSource::SaveBinary(NiAudioSource *this@<ecx>, double a2@<st0>, NiStream *kStream);
bool __thiscall NiAudioSource::IsEqual(NiAudioSource *this, NiObject *pkObject); // idb
void __thiscall NiAudioSource::SetDirectionVector(NiAudioSource *this, NiPoint3 *kDir); // idb
NiPoint3 *__thiscall NiAudioSource::GetDirectionVector(NiAudioSource *this); // idb
void __thiscall NiAudioSource::SetUpVector(NiAudioSource *this, NiPoint3 *kUp); // idb
NiPoint3 *__thiscall NiAudioSource::GetUpVector(NiAudioSource *this); // idb
void __thiscall NiAudioSource::SetLoopCount(NiAudioSource *this, int iLoopCount); // idb
int __thiscall NiAudioSource::GetLoopCount(NiAudioSource *this); // idb
void __thiscall NiAudioSource::SetLoaded(NiAudioSource *this, bool bLoaded); // idb
BOOL __thiscall NiAudioSource::GetLoaded(NiAudioSource *this);
void __thiscall NiAudioSource::SetCone(NiAudioSource *this, bool bCone); // idb
BOOL __thiscall NiAudioSource::GetCone(NiAudioSource *this);
void __thiscall NiAudioSource::SetStreamed(NiAudioSource *this, bool bStream); // idb
BOOL __thiscall NiAudioSource::GetStreamed(NiAudioSource *this);
void __thiscall NiAudioSource::SetAllowSharing(NiAudioSource *this, bool bAllowSharing); // idb
BOOL __thiscall NiAudioSource::GetAllowSharing(NiAudioSource *this);
unsigned int __thiscall NiAudioSource::GetType(NiAudioSource *this); // idb
bool __stdcall NiAudioSource::CloseTo(float fA, float fB, float fEpsilon);
NiAudioSource *__thiscall NiAudioSource::`vector deleting destructor'(NiAudioSource *this, unsigned int a2);
void __cdecl NiStreamLoadBinary<long>(NiStream *kStream, int *value); // idb
void __cdecl NiStreamLoadBinary<NiPoint3>(NiStream *kStream, NiPoint3 *value); // idb
void __cdecl NiStreamSaveBinary<long>(NiStream *kStream, const int *value); // idb
void __cdecl NiStreamSaveBinary<NiPoint3>(NiStream *kStream, NiPoint3 *value); // idb
void __cdecl NiBinaryStreamLoad<long>(NiBinaryStream *is, int *pValue, unsigned int uiNumEls); // idb
void __cdecl NiBinaryStreamLoad<NiPoint3>(NiBinaryStream *is, NiPoint3 *pValue, unsigned int uiNumEls); // idb
void __cdecl NiBinaryStreamSave<long>(NiBinaryStream *os, const int *pValue, unsigned int uiNumEls); // idb
void __cdecl NiBinaryStreamSave<NiPoint3>(NiBinaryStream *os, NiPoint3 *pValue, unsigned int uiNumEls); // idb
void __thiscall NiAudioListener::NiAudioListener(NiAudioListener *this); // idb
void __thiscall NiAudioListener::~NiAudioListener(NiAudioListener *this); // idb
void NiAudioListener::Release();
// NiObject *__cdecl NiAudioListener::CreateObject(); idb
void __thiscall NiAudioListener::LoadBinary(NiAudioListener *this, NiStream *stream); // idb
bool __thiscall NiAudioListener::RegisterStreamables(NiAudioListener *this, NiStream *stream); // idb
void __thiscall NiAudioListener::SaveBinary(NiAudioListener *this, NiStream *stream); // idb
bool __thiscall NiAudioListener::IsEqual(NiAudioListener *this, NiObject *pObject); // idb
NiPoint3 *__thiscall NiAudioListener::GetDirectionVector(NiAudioListener *this); // idb
NiPoint3 *__thiscall NiAudioListener::GetUpVector(NiAudioListener *this); // idb
NiAudioListener *__thiscall NiAudioListener::`vector deleting destructor'(NiAudioListener *this, unsigned int a2);
void __thiscall NiProviderInfo::NiProviderInfo(NiProviderInfo *this, const char *pcName, const unsigned int uiNumber); // idb
void __thiscall NiProviderInfo::~NiProviderInfo(NiProviderInfo *this); // idb
char __thiscall NiProviderInfo::OpenProvider(NiProviderInfo *this);
char __thiscall NiProviderInfo::CloseProvider(NiProviderInfo *this);
unsigned int __thiscall NiProviderInfo::GetNumberActiveSamples(NiProviderInfo *this); // idb
void __cdecl NiParticleSDM::Init(); // idb
void __cdecl NiParticleSDM::Shutdown(); // idb
void NiParticleSDM::NiParticleSDM();
void __thiscall NiPSysEmitterCtlr::Stop(NiPSysEmitterCtlr *this); // idb
signed int NiPSysEmitterCtlr::GetInterpolatorCount();
char *__stdcall NiPSysEmitterCtlr::GetInterpolatorID(unsigned __int16 usIndex);
unsigned __int16 __stdcall NiPSysEmitterCtlr::GetInterpolatorIndex(const char *pcID);
void __stdcall NiPSysEmitterCtlr::CreatePoseInterpolator(unsigned __int16 usIndex);
void __stdcall NiPSysEmitterCtlr::CreateBlendInterpolator(unsigned __int16 usIndex, bool bManagerControlled, bool bAccumulateAnimations, float fWeightThreshold, char ucArraySize);
void __thiscall NiTSet<float>::Realloc(NiTSet<float> *this, unsigned int uiNewSize); // idb
double __thiscall NiBlendInterpolator::GetTime(NiBlendInterpolator *this, char ucIndex);
NiRTTI *NiPSysEmitterCtlr::GetRTTI();
void __thiscall NiPSysEmitterCtlr::GuaranteeTimeRange(NiPSysEmitterCtlr *this, float fStartTime, float fEndTime); // idb
void __thiscall NiPSysEmitterCtlr::ResetTimeExtrema(NiPSysEmitterCtlr *this); // idb
NiInterpolator *__thiscall NiPSysEmitterCtlr::GetInterpolator(NiPSysEmitterCtlr *this, unsigned __int16 usIndex); // idb
void __thiscall NiPSysEmitterCtlr::SetInterpolator(NiPSysEmitterCtlr *this, NiInterpolator *pkInterpolator, unsigned __int16 usIndex); // idb
void __thiscall NiPSysEmitterCtlr::ProcessClone(NiPSysEmitterCtlr *this, NiCloningProcess *kCloning); // idb
NiPSysModifierCtlr *__cdecl NiPSysEmitterCtlr::CreateObject();
void __thiscall NiPSysEmitterCtlr::LoadBinary(NiPSysEmitterCtlr *this, NiStream *kStream); // idb
char __thiscall NiPSysEmitterCtlr::RegisterStreamables(NiPSysEmitterCtlr *this, NiStream *kStream);
void __thiscall NiPSysEmitterCtlr::SaveBinary(NiPSysEmitterCtlr *this, NiStream *kStream); // idb
bool __thiscall NiPSysEmitterCtlr::IsEqual(NiPSysEmitterCtlr *this, NiObject *pkObject); // idb
void __thiscall NiBoolInterpolator::ReplaceKeys(NiBoolInterpolator *this, NiBoolKey *pkKeys, NiAnimationKey::KeyType eType, unsigned int uiNumKeys); // idb
NiFloatInterpolator *__thiscall NiPSysEmitterCtlr::GetBirthRateInterpolator(NiPSysEmitterCtlr *this); // idb
NiBoolInterpolator *__thiscall NiPSysEmitterCtlr::GetEmitterActiveInterpolator(NiPSysEmitterCtlr *this); // idb
NiPSysEmitterCtlr *__thiscall NiPSysEmitterCtlr::`scalar deleting destructor'(NiPSysEmitterCtlr *this, unsigned int a2);
// void __userpurge NiPSysEmitterCtlr::EmitParticles(NiPSysEmitterCtlr *this@<ecx>, int a2@<edi>, float fTime, float fCurTime, float fLastTime, float fEmitStart, float fEmitStop, float fBirthRate);
char __thiscall NiPSysEmitterCtlr::TargetIsRequiredType(NiPSysEmitterCtlr *this);
char __stdcall NiPSysEmitterCtlr::InterpolatorIsCorrectType(NiInterpolator *pkInterp, unsigned __int16 usIndex);
char __thiscall NiPSysEmitterDeclinationCtlr::InterpTargetIsCorrectType(NiPSysEmitterSpeedCtlr *this, NiObjectNET *pkTarget);
NiPSysModifierCtlr *__thiscall NiPSysEmitterCtlr::CreateClone(NiPSysEmitterCtlr *this, NiCloningProcess *kCloning);
void __thiscall NiPSysEmitterCtlr::LinkObject(NiPSysEmitterCtlr *this, NiStream *kStream); // idb
// void __userpurge NiPSysEmitterCtlr::Update(NiPSysEmitterCtlr *this@<ecx>, float a2@<ebx>, float a3@<edi>, float fTime);
void __thiscall NiPSysEmitterCtlr::GetViewerStrings(NiPSysEmitterCtlr *this, NiTArray<char *> *pkStrings); // idb
NiPSysFieldModifier *__cdecl NiPSysVortexFieldModifier::CreateObject();
void __thiscall NiPSysVortexFieldModifier::LoadBinary(NiPSysVortexFieldModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysGravityFieldModifier::SaveBinary(NiPSysVortexFieldModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysModifier::SetActive(NiPSysModifier *this, bool bActive); // idb
NiRTTI *NiPSysVortexFieldModifier::GetRTTI();
NiPoint3 *__stdcall NiPSysVortexFieldModifier::VortexDirection(NiPoint3 *result, NiPoint3 *kVortexPos, NiPoint3 *kDirection, NiPoint3 *kParticle);
NiPSysFieldModifier *__thiscall NiPSysVortexFieldModifier::CreateClone(NiPSysVortexFieldModifier *this, NiCloningProcess *kCloning);
void __thiscall NiPSysVortexFieldModifier::UpdateNoAttenuation(NiPSysVortexFieldModifier *this, float fTime, NiPSysData *pkData); // idb
void __thiscall NiPSysVortexFieldModifier::UpdateNoAttenuationNoDist(NiPSysVortexFieldModifier *this, float fTime, NiPSysData *pkData); // idb
void __thiscall NiPSysVortexFieldModifier::Update(NiPSysVortexFieldModifier *this, float fTime, NiPSysData *pkData); // idb
void __thiscall NiPSysVortexFieldModifier::GetViewerStrings(NiPSysVortexFieldModifier *this, NiTArray<char *> *pkStrings); // idb
NiTimeController *__cdecl NiPSysUpdateCtlr::CreateObject();
char __thiscall NiKeyframeManager::IsEqual(NiPSysUpdateCtlr *this, NiObject *pkObject);
NiRTTI *NiPSysUpdateCtlr::GetRTTI();
NiPSysUpdateCtlr *__thiscall NiInterpController::`vector deleting destructor'(NiPSysUpdateCtlr *this, unsigned int a2);
NiTimeController *__thiscall NiPSysUpdateCtlr::CreateClone(NiPSysUpdateCtlr *this, NiCloningProcess *kCloning);
void __thiscall NiPSysUpdateCtlr::Update(NiPSysUpdateCtlr *this, float fTime); // idb
void __thiscall NiPSysUpdateCtlr::SetTarget(NiPSysUpdateCtlr *this, NiObjectNET *pkTarget); // idb
void __thiscall NiPSysUpdateCtlr::GetViewerStrings(NiPSysUpdateCtlr *this, NiTArray<char *> *pkStrings); // idb
NiPSysFieldModifier *__cdecl NiPSysTurbulenceFieldModifier::CreateObject();
bool __thiscall NiPSysTurbulenceFieldModifier::IsEqual(NiPSysTurbulenceFieldModifier *this, NiObject *pkObject); // idb
NiRTTI *NiPSysTurbulenceFieldModifier::GetRTTI();
void __thiscall NiPSysTurbulenceFieldModifier::UpateNoAttenuationNoDistance(NiPSysTurbulenceFieldModifier *this, float fTime, NiPSysData *pkData); // idb
void __thiscall NiPSysTurbulenceFieldModifier::UpateNoAttenuation(NiPSysTurbulenceFieldModifier *this, float fTime, NiPSysData *pkData); // idb
NiPSysFieldModifier *__thiscall NiPSysTurbulenceFieldModifier::CreateClone(NiPSysTurbulenceFieldModifier *this, NiCloningProcess *kCloning);
void __thiscall NiPSysTurbulenceFieldModifier::LoadBinary(NiPSysTurbulenceFieldModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysTurbulenceFieldModifier::Update(NiPSysTurbulenceFieldModifier *this, float fTime, NiPSysData *pkData); // idb
void __thiscall NiPSysTurbulenceFieldModifier::GetViewerStrings(NiPSysTurbulenceFieldModifier *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiPSysSphericalCollider::LinkObject(NiPSysSphericalCollider *this, NiStream *kStream); // idb
char __thiscall NiPSysSphericalCollider::IsEqual(NiPSysSphericalCollider *this, NiObject *pkObject);
NiPSysCollider *__thiscall NiPSysSphericalCollider::Resolve(NiPSysSphericalCollider *this, float fInitialTime, float *fCollisionTime, NiPSysData *pkData, int usCurParticle);
void __thiscall NiPSysSphericalCollider::Update(NiPSysSphericalCollider *this, float fTime, NiPSysData *pkData, int usCurParticle);
void __thiscall NiPSysPlanarCollider::ProcessClone(NiPSysSphericalCollider *this, NiCloningProcess *kCloning); // idb
void __thiscall NiPSysSphericalCollider::SetResolveConstants(NiPSysSphericalCollider *this); // idb
void __thiscall NiPSysSphericalCollider::LoadBinary(NiPSysSphericalCollider *this, NiStream *kStream); // idb
void __thiscall NiPSysSphericalCollider::SaveBinary(NiPSysSphericalCollider *this, NiStream *kStream); // idb
void __thiscall NiPSysSphericalCollider::NiPSysSphericalCollider(NiPSysSphericalCollider *this, float fBounce, bool bSpawnOnCollide, bool bDieOnCollide, NiPSysSpawnModifier *pkSpawnModifier, NiAVObject *pkColliderObj, float fRadius); // idb
NiRTTI *NiPSysSphericalCollider::GetRTTI();
NiObject *__thiscall NiPSysSphericalCollider::CreateClone(NiPSysSphericalCollider *this, NiCloningProcess *kCloning); // idb
void __cdecl NiPSysSphericalCollider::CreateObject();
void __thiscall NiPSysSphericalCollider::GetViewerStrings(NiPSysSphericalCollider *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiPSysCylinderEmitter::ProcessClone(NiPSysSphereEmitter *this, NiCloningProcess *kCloning); // idb
bool __thiscall NiPSysSphereEmitter::IsEqual(NiPSysSphereEmitter *this, NiObject *pkObject); // idb
double __cdecl NiUnitRandom();
NiPoint3 *__thiscall NiTransform::operator*(NiTransform *this, NiPoint3 *result, NiPoint3 *kPoint); // idb
NiRTTI *NiPSysSphereEmitter::GetRTTI();
void __thiscall NiPSysSphereEmitter::ComputeVolumeInitialPositionAndVelocity(NiPSysSphereEmitter *this, NiTransform *kEmitterToPSys, NiPoint3 *kPosition, NiPoint3 *kVelocity); // idb
NiPSysVolumeEmitter *__thiscall NiPSysSphereEmitter::CreateClone(NiPSysSphereEmitter *this, NiCloningProcess *kCloning);
NiPSysVolumeEmitter *__cdecl NiPSysSphereEmitter::CreateObject();
void __thiscall NiPSysSphereEmitter::LoadBinary(NiPSysSphereEmitter *this, NiStream *kStream); // idb
void __thiscall NiPSysSphereEmitter::SaveBinary(NiPSysSphereEmitter *this, NiStream *kStream); // idb
void __thiscall NiPSysSphereEmitter::GetViewerStrings(NiPSysSphereEmitter *this, NiTArray<char *> *pkStrings); // idb
NiPSysModifier *__cdecl NiPSysSpawnModifier::CreateObject();
bool __thiscall NiPSysSpawnModifier::IsEqual(NiPSysSpawnModifier *this, NiObject *pkObject); // idb
NiRTTI *NiPSysSpawnModifier::GetRTTI();
NiPSysModifier *__thiscall NiPSysSpawnModifier::CreateClone(NiPSysSpawnModifier *this, NiCloningProcess *kCloning);
void __thiscall NiPSysSpawnModifier::SpawnParticles(NiPSysSpawnModifier *this, float fCurrentTime, float fSpawnTime, int usOldIndex, NiParticleSystem *pkOldPSystem);
void __thiscall NiPSysSpawnModifier::SpawnParticle(NiPSysSpawnModifier *this, float fCurrentTime, float fSpawnTime, unsigned __int16 usOldIndex, NiParticleSystem *pkOldPSystem); // idb
void __thiscall NiPSysSpawnModifier::LoadBinary(NiPSysSpawnModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysSpawnModifier::SaveBinary(NiPSysSpawnModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysSpawnModifier::GetViewerStrings(NiPSysSpawnModifier *this, NiTArray<char *> *pkStrings); // idb
NiPSysModifier *__cdecl NiPSysRotationModifier::CreateObject();
NiRTTI *NiPSysRotationModifier::GetRTTI();
void __stdcall NiPSysRotationModifier::Update(float fTime, NiPSysData *pkData);
void __thiscall NiPSysRotationModifier::Initialize(NiPSysRotationModifier *this, NiPSysData *pkData, unsigned __int16 usNewParticle); // idb
NiPSysModifier *__thiscall NiPSysRotationModifier::CreateClone(NiPSysRotationModifier *this, NiCloningProcess *kCloning);
void __thiscall NiPSysRotationModifier::PostLinkObject(NiPSysRotationModifier *this, NiStream *kStream); // idb
bool __thiscall NiPSysRotationModifier::IsEqual(NiPSysRotationModifier *this, NiObject *pkObject); // idb
void __thiscall NiPSysRotationModifier::LoadBinary(NiPSysRotationModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysRotationModifier::SaveBinary(NiPSysRotationModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysRotationModifier::GetViewerStrings(NiPSysRotationModifier *this, NiTArray<char *> *pkStrings); // idb
NiTimeController *__cdecl NiPSysResetOnLoopCtlr::CreateObject();
void __thiscall NiPSysResetOnLoopCtlr::LoadBinary(NiPSysUpdateCtlr *this, NiStream *kStream); // idb
void __thiscall NiInterpController::LinkObject(NiPSysUpdateCtlr *this, NiStream *kStream); // idb
void __thiscall NiKeyframeManager::SaveBinary(NiPSysUpdateCtlr *this, NiStream *kStream); // idb
NiRTTI *NiPSysResetOnLoopCtlr::GetRTTI();
NiTimeController *__thiscall NiPSysResetOnLoopCtlr::CreateClone(NiPSysResetOnLoopCtlr *this, NiCloningProcess *kCloning);
void __thiscall NiPSysResetOnLoopCtlr::Update(NiPSysResetOnLoopCtlr *this, float fTime); // idb
char __thiscall NiPSysResetOnLoopCtlr::TargetIsRequiredType(NiPSysUpdateCtlr *this);
void __thiscall NiPSysResetOnLoopCtlr::GetViewerStrings(NiPSysResetOnLoopCtlr *this, NiTArray<char *> *pkStrings); // idb
NiPSysFieldModifier *__cdecl NiPSysRadialFieldModifier::CreateObject();
bool __thiscall NiPSysRadialFieldModifier::IsEqual(NiPSysRadialFieldModifier *this, NiObject *pkObject); // idb
NiRTTI *NiPSysRadialFieldModifier::GetRTTI();
NiPSysFieldModifier *__thiscall NiPSysRadialFieldModifier::CreateClone(NiPSysRadialFieldModifier *this, NiCloningProcess *kCloning);
void __thiscall NiPSysRadialFieldModifier::UpdateNoAttenuationNoDirNoDist(NiPSysRadialFieldModifier *this, float fTime, NiPSysData *pkData); // idb
void __thiscall NiPSysRadialFieldModifier::LoadBinary(NiPSysRadialFieldModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysTurbulenceFieldModifier::SaveBinary(NiPSysTurbulenceFieldModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysRadialFieldModifier::Update(NiPSysRadialFieldModifier *this, float fTime, NiPSysData *pkData); // idb
void __thiscall NiPSysRadialFieldModifier::GetViewerStrings(NiPSysRadialFieldModifier *this, NiTArray<char *> *pkStrings); // idb
NiObject *__cdecl NiPSysPositionModifier::CreateObject(); // idb
void __thiscall NiPSysPositionModifier::LoadBinary(NiPSysPositionModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysPositionModifier::SaveBinary(NiPSysPositionModifier *this, NiStream *kStream); // idb
bool __thiscall NiPSysPositionModifier::IsEqual(NiPSysPositionModifier *this, NiObject *pkObject); // idb
NiRTTI *NiPSysPositionModifier::GetRTTI();
void __stdcall NiPSysPositionModifier::Update(float fTime, NiPSysData *pkData);
NiPSysModifier *__thiscall NiPSysPositionModifier::CreateClone(NiPSysPositionModifier *this, NiCloningProcess *kCloning);
void __thiscall NiPSysPositionModifier::GetViewerStrings(NiPSysPositionModifier *this, NiTArray<char *> *pkStrings); // idb
char __thiscall NiPSysSphericalCollider::RegisterStreamables(NiPSysSphericalCollider *this, NiStream *kStream);
NiPSysPlanarCollider *__thiscall NiPSysPlanarCollider::Resolve(NiPSysPlanarCollider *this, float fInitialTime, float *fCollisionTime, NiPSysData *pkData, int usCurParticle);
void __thiscall NiPSysPlanarCollider::Update(NiPSysPlanarCollider *this, float fTime, NiPSysData *pkData, int usCurParticle);
void __thiscall NiPSysPlanarCollider::SetResolveConstants(NiPSysPlanarCollider *this); // idb
void __thiscall NiPSysPlanarCollider::LoadBinary(NiPSysPlanarCollider *this, NiStream *kStream); // idb
void __thiscall NiPSysPlanarCollider::SaveBinary(NiPSysPlanarCollider *this, NiStream *kStream); // idb
char __thiscall NiPSysPlanarCollider::IsEqual(NiPSysPlanarCollider *this, NiObject *pkObject);
void __thiscall NiPSysPlanarCollider::NiPSysPlanarCollider(NiPSysPlanarCollider *this, float fBounce, bool bSpawnOnCollide, bool bDieOnCollide, NiPSysSpawnModifier *pkSpawnModifier, NiAVObject *pkColliderObj, float fWidth, float fHeight, NiPoint3 kXAxis, NiPoint3 kYAxis); // idb
NiRTTI *NiPSysPlanarCollider::GetRTTI();
NiObject *__thiscall NiPSysPlanarCollider::CreateClone(NiPSysPlanarCollider *this, NiCloningProcess *kCloning); // idb
void __cdecl NiPSysPlanarCollider::CreateObject();
void __thiscall NiPSysPlanarCollider::GetViewerStrings(NiPSysPlanarCollider *this, NiTArray<char *> *pkStrings); // idb
NiObject *__cdecl NiPSysModifierActiveCtlr::CreateObject(); // idb
void __thiscall NiPSysModifierActiveCtlr::LinkObject(NiPSysModifierActiveCtlr *this, NiStream *kStream); // idb
NiRTTI *NiPSysModifierActiveCtlr::GetRTTI();
void __thiscall NiPSysModifierActiveCtlr::GetTargetBoolValue(NiPSysModifierActiveCtlr *this, bool *bValue); // idb
void __thiscall NiPSysModifierActiveCtlr::SetTargetBoolValue(NiPSysModifierActiveCtlr *this, int bValue);
NiPSysModifierFloatCtlr *__thiscall NiPSysModifierActiveCtlr::CreateClone(NiPSysModifierActiveCtlr *this, NiCloningProcess *kCloning);
bool __thiscall NiPSysModifierActiveCtlr::InterpTargetIsCorrectType(NiPSysModifierActiveCtlr *this, NiObjectNET *pkTarget); // idb
void __thiscall NiPSysModifierActiveCtlr::GetViewerStrings(NiPSysModifierActiveCtlr *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiPSysMeshUpdateModifier::LoadBinary(NiPSysMeshUpdateModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysMeshUpdateModifier::ProcessClone(NiPSysMeshUpdateModifier *this, NiCloningProcess *kCloning); // idb
char __thiscall NiPSysMeshUpdateModifier::RegisterStreamables(NiPSysMeshUpdateModifier *this, NiStream *kStream);
NiPointer<NiAVObject> *__thiscall NiTArray<NiPointer<NiAVObject>>::RemoveEnd(NiTArray<NiPointer<NiAVObject> > *this, NiPointer<NiAVObject> *result); // idb
NiRTTI *NiPSysMeshUpdateModifier::GetRTTI();
void __thiscall NiPSysMeshUpdateModifier::Update(NiPSysMeshUpdateModifier *this, float fTime, NiPSysData *pkData); // idb
NiObject *__cdecl NiPSysMeshUpdateModifier::CreateObject(); // idb
void __thiscall NiPSysMeshUpdateModifier::LinkObject(NiPSysMeshUpdateModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysMeshUpdateModifier::SaveBinary(NiPSysMeshUpdateModifier *this, NiStream *kStream); // idb
char __thiscall NiPSysMeshUpdateModifier::IsEqual(NiPSysMeshUpdateModifier *this, NiObject *pkObject);
void __thiscall NiMeshPSysData::FillPool(NiMeshPSysData *this, unsigned int uiGeneration, NiAVObject *pkOriginal); // idb
NiPointer<NiAVObject> *__thiscall NiPSysMeshUpdateModifier::SetMeshAt(NiPSysMeshUpdateModifier *this, NiPointer<NiAVObject> *result, unsigned int uiIndex, NiAVObject *pkMesh); // idb
NiPSysMeshUpdateModifier *__thiscall NiPSysMeshUpdateModifier::`scalar deleting destructor'(NiPSysMeshUpdateModifier *this, unsigned int a2);
void __thiscall NiPSysMeshUpdateModifier::Initialize(NiPSysMeshUpdateModifier *this, NiPSysData *pkData, unsigned __int16 usNewParticle); // idb
void __thiscall NiPSysMeshUpdateModifier::CopyMembers(NiPSysMeshUpdateModifier *this, NiPSysMeshUpdateModifier *pkDest, NiCloningProcess *kCloning); // idb
void __thiscall NiPSysMeshUpdateModifier::PostLinkObject(NiPSysMeshUpdateModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysMeshUpdateModifier::GetViewerStrings(NiPSysMeshUpdateModifier *this, NiTArray<char *> *pkStrings); // idb
NiPSysMeshUpdateModifier *__thiscall NiPSysMeshUpdateModifier::CreateClone(NiPSysMeshUpdateModifier *this, NiCloningProcess *kCloning);
void __thiscall NiPSysMeshEmitter::NiSkinnedEmitterData::NiSkinnedEmitterData(NiPSysMeshEmitter::NiSkinnedEmitterData *this); // idb
void __thiscall NiTArray<NiPointer<NiGeometry>>::~NiTArray<NiPointer<NiGeometry>>(NiTArray<NiPointer<NiGeometry> > *this); // idb
void __thiscall NiTArray<NiPointer<NiPSysMeshEmitter::NiSkinnedEmitterData>>::~NiTArray<NiPointer<NiPSysMeshEmitter::NiSkinnedEmitterData>>(NiTArray<NiPointer<NiPSysMeshEmitter::NiSkinnedEmitterData> > *this); // idb
NiTArray<NiPointer<NiGeometry> > *__thiscall NiTArray<NiPointer<NiGeometry>>::`vector deleting destructor'(NiTArray<NiPointer<NiGeometry> > *this, unsigned int a2);
NiTArray<NiPointer<NiPSysMeshEmitter::NiSkinnedEmitterData> > *__thiscall NiTArray<NiPointer<NiPSysMeshEmitter::NiSkinnedEmitterData>>::`vector deleting destructor'(NiTArray<NiPointer<NiPSysMeshEmitter::NiSkinnedEmitterData> > *this, unsigned int a2);
void __thiscall NiPSysMeshEmitter::TransformIntoCoordinateSpace(NiPSysMeshEmitter *this, NiAVObject *pkObj, NiPoint3 *kPosition, NiPoint3 *kVelocity); // idb
char __thiscall NiPSysMeshEmitter::NiSkinnedEmitterData::CreatePartition(NiPSysMeshEmitter::NiSkinnedEmitterData *this, NiGeometry *pkGeom);
void __stdcall NiPSysMeshEmitter::DeformBySkin(NiPoint3 *kVert, NiPoint3 *kNormal, NiTriBasedGeom *pkGeom, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPart, unsigned int uiWhichIndex);
NiPSysMeshEmitter::NiSkinnedEmitterData *__thiscall NiPSysMeshEmitter::NiSkinnedEmitterData::`scalar deleting destructor'(NiPSysMeshEmitter::NiSkinnedEmitterData *this, unsigned int a2);
void __thiscall NiPSysMeshEmitter::LoadBinary(NiPSysMeshEmitter *this, NiStream *kStream); // idb
void __thiscall NiPSysMeshEmitter::SaveBinary(NiPSysMeshEmitter *this, NiStream *kStream); // idb
bool __thiscall NiPSysMeshEmitter::IsEqual(NiPSysMeshEmitter *this, NiObject *pkObject); // idb
void __thiscall NiPSysMeshEmitter::NiPSysMeshEmitter(NiPSysMeshEmitter *this); // idb
NiRTTI *NiPSysMeshEmitter::GetRTTI();
NiPSysMeshEmitter *__thiscall NiPSysMeshEmitter::`scalar deleting destructor'(NiPSysMeshEmitter *this, unsigned int a2);
char __thiscall NiPSysMeshEmitter::EmitFromVertex(NiPSysMeshEmitter *this, NiGeometry *pkGeomEmitter, NiPoint3 *kPosition, NiPoint3 *kVelocity);
char __thiscall NiPSysMeshEmitter::EmitFromEdge(NiPSysMeshEmitter *this, NiGeometry *pkGeomEmitter, NiPoint3 *kPosition, NiPoint3 *kVelocity);
char __thiscall NiPSysMeshEmitter::EmitFromSkinnedVertex(NiPSysMeshEmitter *this, NiPSysMeshEmitter::NiSkinnedEmitterData *pkSkinEmitterData, NiGeometry *pkGeomEmitter, NiPoint3 *kPosition, NiPoint3 *kVelocity);
char __thiscall NiPSysMeshEmitter::EmitFromSkinnedFace(NiPSysMeshEmitter *this, NiPSysMeshEmitter::NiSkinnedEmitterData *pkSkinEmitterData, NiGeometry *pkGeomEmitter, NiPoint3 *kPosition, NiPoint3 *kVelocity);
char __thiscall NiPSysMeshEmitter::EmitFromSkinnedEdge(NiPSysMeshEmitter *this, NiPSysMeshEmitter::NiSkinnedEmitterData *pkSkinEmitterData, NiGeometry *pkGeomEmitter, NiPoint3 *kPosition, NiPoint3 *kVelocity);
void __cdecl NiPSysMeshEmitter::CreateObject();
void __thiscall NiPSysMeshEmitter::GetViewerStrings(NiPSysMeshEmitter *this, NiTArray<char *> *pkStrings); // idb
signed int __thiscall NiTArray<NiPointer<NiControllerSequence>>::AddFirstEmpty(NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *this, NiPointer<NiD3DShaderConstantMapEntry> *element);
// char __userpurge NiPSysMeshEmitter::EmitFromFace@<al>(NiPSysMeshEmitter *this@<ecx>, int a2@<edi>, NiGeometry *pkGeomEmitter, NiPoint3 *kPosition, NiPoint3 *kVelocity);
void __thiscall NiPSysMeshEmitter::AddGeometryEmitter(NiPSysMeshEmitter *this, NiGeometry *pkGeomEmitter); // idb
NiObject *__thiscall NiPSysMeshEmitter::CreateClone(NiPSysMeshEmitter *this, NiCloningProcess *kCloning); // idb
void __thiscall NiPSysMeshEmitter::ProcessClone(NiPSysMeshEmitter *this, NiCloningProcess *kCloning); // idb
void __thiscall NiPSysMeshEmitter::LinkObject(NiPSysMeshEmitter *this, NiStream *kStream); // idb
void __thiscall NiPSysMeshEmitter::ComputeInitialPositionAndVelocity(NiPSysMeshEmitter *this, NiPoint3 *kPosition, NiPoint3 *kVelocity); // idb
NiObject *__cdecl NiPSysInitialRotSpeedVarCtlr::CreateObject(); // idb
NiRTTI *NiPSysInitialRotSpeedVarCtlr::GetRTTI();
NiPSysModifierFloatCtlr *__thiscall NiPSysInitialRotSpeedVarCtlr::CreateClone(NiPSysInitialRotSpeedVarCtlr *this, NiCloningProcess *kCloning);
void __thiscall NiPSysInitialRotSpeedVarCtlr::GetViewerStrings(NiPSysInitialRotSpeedVarCtlr *this, NiTArray<char *> *pkStrings); // idb
NiObject *__cdecl NiPSysInitialRotSpeedCtlr::CreateObject(); // idb
NiRTTI *NiPSysInitialRotSpeedCtlr::GetRTTI();
void __thiscall NiPSysEmitterSpeedCtlr::GetTargetFloatValue(NiPSysInitialRotSpeedCtlr *this, float *fValue); // idb
void __thiscall NiPSysInitialRotSpeedCtlr::SetTargetFloatValue(NiPSysInitialRotSpeedCtlr *this, float fValue); // idb
NiPSysModifierFloatCtlr *__thiscall NiPSysInitialRotSpeedCtlr::CreateClone(NiPSysInitialRotSpeedCtlr *this, NiCloningProcess *kCloning);
char __thiscall NiPSysInitialRotAngleCtlr::InterpTargetIsCorrectType(NiPSysInitialRotSpeedVarCtlr *this, NiObjectNET *pkTarget);
void __thiscall NiPSysInitialRotSpeedCtlr::GetViewerStrings(NiPSysInitialRotSpeedCtlr *this, NiTArray<char *> *pkStrings); // idb
NiObject *__cdecl NiPSysInitialRotAngleVarCtlr::CreateObject(); // idb
NiRTTI *NiPSysInitialRotAngleVarCtlr::GetRTTI();
void __thiscall NiPSysEmitterDeclinationVarCtlr::GetTargetFloatValue(NiPSysInitialRotAngleVarCtlr *this, float *fValue); // idb
NiPSysModifierFloatCtlr *__thiscall NiPSysInitialRotAngleVarCtlr::CreateClone(NiPSysInitialRotAngleVarCtlr *this, NiCloningProcess *kCloning);
void __thiscall NiPSysInitialRotAngleVarCtlr::GetViewerStrings(NiPSysInitialRotAngleVarCtlr *this, NiTArray<char *> *pkStrings); // idb
NiObject *__cdecl NiPSysInitialRotAngleCtlr::CreateObject(); // idb
NiRTTI *NiPSysInitialRotAngleCtlr::GetRTTI();
NiPSysModifierFloatCtlr *__thiscall NiPSysInitialRotAngleCtlr::CreateClone(NiPSysInitialRotAngleCtlr *this, NiCloningProcess *kCloning);
void __thiscall NiPSysInitialRotAngleCtlr::GetViewerStrings(NiPSysInitialRotAngleCtlr *this, NiTArray<char *> *pkStrings); // idb
NiPSysModifier *__cdecl NiPSysGrowFadeModifier::CreateObject();
bool __thiscall NiPSysGrowFadeModifier::IsEqual(NiPSysGrowFadeModifier *this, NiObject *pkObject); // idb
NiRTTI *NiPSysGrowFadeModifier::GetRTTI();
void __thiscall NiPSysGrowFadeModifier::Update(NiPSysGrowFadeModifier *this, float fTime, NiPSysData *pkData); // idb
NiPSysModifier *__thiscall NiPSysGrowFadeModifier::CreateClone(NiPSysGrowFadeModifier *this, NiCloningProcess *kCloning);
void __thiscall NiPSysGrowFadeModifier::LoadBinary(NiPSysGrowFadeModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysGrowFadeModifier::SaveBinary(NiPSysGrowFadeModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysGrowFadeModifier::GetViewerStrings(NiPSysGrowFadeModifier *this, NiTArray<char *> *pkStrings); // idb
NiObject *__cdecl NiPSysGravityStrengthCtlr::CreateObject(); // idb
NiRTTI *NiPSysGravityStrengthCtlr::GetRTTI();
void __thiscall NiPSysEmitterPlanarAngleVarCtlr::GetTargetFloatValue(NiPSysGravityStrengthCtlr *this, float *fValue); // idb
NiPSysModifierFloatCtlr *__thiscall NiPSysGravityStrengthCtlr::CreateClone(NiPSysGravityStrengthCtlr *this, NiCloningProcess *kCloning);
char __thiscall NiPSysGravityStrengthCtlr::InterpTargetIsCorrectType(NiPSysGravityStrengthCtlr *this, NiObjectNET *pkTarget);
void __thiscall NiPSysGravityStrengthCtlr::GetViewerStrings(NiPSysGravityStrengthCtlr *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiPSysVortexFieldModifier::LinkObject(NiPSysVortexFieldModifier *this, NiStream *kStream); // idb
NiRTTI *NiPSysGravityFieldModifier::GetRTTI();
void __thiscall NiPSysGravityFieldModifier::NiPSysGravityFieldModifier(NiPSysGravityFieldModifier *this); // idb
void __cdecl NiPSysGravityFieldModifier::CreateObject();
void __thiscall NiPSysGravityFieldModifier::LoadBinary(NiPSysGravityFieldModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysGravityFieldModifier::UpdateNoAttenuationNoDist(NiPSysGravityFieldModifier *this, float fTime, NiPSysData *pkData); // idb
NiObject *__thiscall NiPSysGravityFieldModifier::CreateClone(NiPSysGravityFieldModifier *this, NiCloningProcess *kCloning); // idb
bool __thiscall NiPSysGravityFieldModifier::IsEqual(NiPSysVortexFieldModifier *this, NiObject *pkObject); // idb
void __thiscall NiPSysGravityFieldModifier::Update(NiPSysGravityFieldModifier *this, float fTime, NiPSysData *pkData); // idb
void __thiscall NiPSysGravityFieldModifier::GetViewerStrings(NiPSysGravityFieldModifier *this, NiTArray<char *> *pkStrings); // idb
NiPSysModifier *__cdecl NiPSysGravityModifier::CreateObject();
NiRTTI *NiPSysGravityModifier::GetRTTI();
NiPSysModifier *__thiscall NiPSysGravityModifier::CreateClone(NiPSysGravityModifier *this, NiCloningProcess *kCloning);
void __thiscall NiPSysGravityModifier::Update(NiPSysGravityModifier *this, float fTime, NiPSysData *pkData); // idb
char __thiscall NiPSysGravityModifier::IsEqual(NiPSysGravityModifier *this, NiObject *pkObject);
void __thiscall NiPSysGravityModifier::LoadBinary(NiPSysGravityModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysGravityModifier::SaveBinary(NiPSysGravityModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysGravityModifier::GetViewerStrings(NiPSysGravityModifier *this, NiTArray<char *> *pkStrings); // idb
NiObject *__cdecl NiPSysFieldMaxDistanceCtlr::CreateObject(); // idb
NiRTTI *NiPSysFieldMaxDistanceCtlr::GetRTTI();
void __thiscall NiPSysFieldMaxDistanceCtlr::SetTargetFloatValue(NiPSysFieldMaxDistanceCtlr *this, float fValue); // idb
NiPSysModifierFloatCtlr *__thiscall NiPSysFieldMaxDistanceCtlr::CreateClone(NiPSysFieldMaxDistanceCtlr *this, NiCloningProcess *kCloning);
void __thiscall NiPSysFieldMaxDistanceCtlr::GetViewerStrings(NiPSysFieldMaxDistanceCtlr *this, NiTArray<char *> *pkStrings); // idb
NiObject *__cdecl NiPSysFieldMagnitudeCtlr::CreateObject(); // idb
void __thiscall NiPSysEmitterSpeedCtlr::LinkObject(NiPSysInitialRotSpeedVarCtlr *this, NiStream *kStream); // idb
char __thiscall NiPSysEmitterLifeSpanCtlr::RegisterStreamables(NiPSysModifierActiveCtlr *this, NiStream *kStream);
NiRTTI *NiPSysFieldMagnitudeCtlr::GetRTTI();
void __thiscall NiPSysFieldMagnitudeCtlr::GetTargetFloatValue(NiPSysInitialRotSpeedVarCtlr *this, float *fValue); // idb
void __thiscall NiPSysInitialRotSpeedVarCtlr::SetTargetFloatValue(NiPSysInitialRotSpeedVarCtlr *this, float fValue); // idb
NiPSysModifierFloatCtlr *__thiscall NiPSysFieldMagnitudeCtlr::CreateClone(NiPSysFieldMagnitudeCtlr *this, NiCloningProcess *kCloning);
char __thiscall NiPSysFieldMagnitudeCtlr::InterpTargetIsCorrectType(NiPSysFieldMaxDistanceCtlr *this, NiObjectNET *pkTarget);
void __thiscall NiPSysFieldMagnitudeCtlr::GetViewerStrings(NiPSysFieldMagnitudeCtlr *this, NiTArray<char *> *pkStrings); // idb
NiObject *__cdecl NiPSysFieldAttenuationCtlr::CreateObject(); // idb
NiRTTI *NiPSysFieldAttenuationCtlr::GetRTTI();
void __thiscall NiPSysEmitterDeclinationCtlr::GetTargetFloatValue(NiPSysInitialRotAngleCtlr *this, float *fValue); // idb
void __thiscall NiPSysFieldAttenuationCtlr::SetTargetFloatValue(NiPSysInitialRotAngleCtlr *this, float fValue); // idb
NiPSysModifierFloatCtlr *__thiscall NiPSysFieldAttenuationCtlr::CreateClone(NiPSysFieldAttenuationCtlr *this, NiCloningProcess *kCloning);
void __thiscall NiPSysFieldAttenuationCtlr::GetViewerStrings(NiPSysFieldAttenuationCtlr *this, NiTArray<char *> *pkStrings); // idb
NiObject *__cdecl NiPSysEmitterSpeedCtlr::CreateObject(); // idb
NiRTTI *NiPSysEmitterSpeedCtlr::GetRTTI();
NiPSysModifierFloatCtlr *__thiscall NiPSysEmitterSpeedCtlr::CreateClone(NiPSysEmitterSpeedCtlr *this, NiCloningProcess *kCloning);
void __thiscall NiPSysEmitterSpeedCtlr::GetViewerStrings(NiPSysEmitterSpeedCtlr *this, NiTArray<char *> *pkStrings); // idb
NiObject *__cdecl NiPSysEmitterPlanarAngleVarCtlr::CreateObject(); // idb
void __thiscall NiPSysEmitterLifeSpanCtlr::LoadBinary(NiPSysModifierActiveCtlr *this, NiStream *kStream); // idb
void __thiscall NiPSysEmitterInitialRadiusCtlr::SaveBinary(NiPSysModifierActiveCtlr *this, NiStream *kStream); // idb
char __thiscall NiPSysEmitterPlanarAngleVarCtlr::IsEqual(NiPSysModifierActiveCtlr *this, NiObject *pkObject);
NiRTTI *NiPSysEmitterPlanarAngleVarCtlr::GetRTTI();
void __thiscall NiPSysEmitterPlanarAngleVarCtlr::SetTargetFloatValue(NiPSysGravityStrengthCtlr *this, float fValue); // idb
NiPSysModifierFloatCtlr *__thiscall NiPSysEmitterPlanarAngleVarCtlr::CreateClone(NiPSysEmitterPlanarAngleVarCtlr *this, NiCloningProcess *kCloning);
void __thiscall NiPSysEmitterPlanarAngleVarCtlr::GetViewerStrings(NiPSysEmitterPlanarAngleVarCtlr *this, NiTArray<char *> *pkStrings); // idb
NiObject *__cdecl NiPSysEmitterPlanarAngleCtlr::CreateObject(); // idb
NiRTTI *NiPSysEmitterPlanarAngleCtlr::GetRTTI();
void __thiscall NiPSysEmitterPlanarAngleCtlr::GetTargetFloatValue(NiPSysFieldMaxDistanceCtlr *this, float *fValue); // idb
void __thiscall NiPSysEmitterPlanarAngleCtlr::SetTargetFloatValue(NiPSysEmitterPlanarAngleCtlr *this, float fValue); // idb
NiPSysModifierFloatCtlr *__thiscall NiPSysEmitterPlanarAngleCtlr::CreateClone(NiPSysEmitterPlanarAngleCtlr *this, NiCloningProcess *kCloning);
void __thiscall NiPSysEmitterPlanarAngleCtlr::GetViewerStrings(NiPSysEmitterPlanarAngleCtlr *this, NiTArray<char *> *pkStrings); // idb
NiObject *__cdecl NiPSysEmitterLifeSpanCtlr::CreateObject(); // idb
NiRTTI *NiPSysEmitterLifeSpanCtlr::GetRTTI();
void __thiscall NiPSysEmitterLifeSpanCtlr::GetTargetFloatValue(NiPSysEmitterLifeSpanCtlr *this, float *fValue); // idb
void __thiscall NiPSysEmitterLifeSpanCtlr::SetTargetFloatValue(NiPSysEmitterLifeSpanCtlr *this, float fValue); // idb
NiPSysModifierFloatCtlr *__thiscall NiPSysEmitterLifeSpanCtlr::CreateClone(NiPSysEmitterLifeSpanCtlr *this, NiCloningProcess *kCloning);
void __thiscall NiPSysEmitterLifeSpanCtlr::GetViewerStrings(NiPSysEmitterLifeSpanCtlr *this, NiTArray<char *> *pkStrings); // idb
NiObject *__cdecl NiPSysEmitterInitialRadiusCtlr::CreateObject(); // idb
NiRTTI *NiPSysEmitterInitialRadiusCtlr::GetRTTI();
void __thiscall NiPSysEmitterInitialRadiusCtlr::GetTargetFloatValue(NiPSysEmitterInitialRadiusCtlr *this, float *fValue); // idb
void __thiscall NiPSysEmitterInitialRadiusCtlr::SetTargetFloatValue(NiPSysEmitterInitialRadiusCtlr *this, float fValue); // idb
NiPSysModifierFloatCtlr *__thiscall NiPSysEmitterInitialRadiusCtlr::CreateClone(NiPSysEmitterInitialRadiusCtlr *this, NiCloningProcess *kCloning);
void __thiscall NiPSysEmitterInitialRadiusCtlr::GetViewerStrings(NiPSysEmitterInitialRadiusCtlr *this, NiTArray<char *> *pkStrings); // idb
NiObject *__cdecl NiPSysEmitterDeclinationVarCtlr::CreateObject(); // idb
NiRTTI *NiPSysEmitterDeclinationVarCtlr::GetRTTI();
void __thiscall NiPSysInitialRotAngleVarCtlr::SetTargetFloatValue(NiPSysInitialRotAngleVarCtlr *this, float fValue); // idb
NiPSysModifierFloatCtlr *__thiscall NiPSysEmitterDeclinationVarCtlr::CreateClone(NiPSysEmitterDeclinationVarCtlr *this, NiCloningProcess *kCloning);
void __thiscall NiPSysEmitterDeclinationVarCtlr::GetViewerStrings(NiPSysEmitterDeclinationVarCtlr *this, NiTArray<char *> *pkStrings); // idb
NiObject *__cdecl NiPSysEmitterDeclinationCtlr::CreateObject(); // idb
NiRTTI *NiPSysEmitterDeclinationCtlr::GetRTTI();
NiPSysModifierFloatCtlr *__thiscall NiPSysEmitterDeclinationCtlr::CreateClone(NiPSysEmitterDeclinationCtlr *this, NiCloningProcess *kCloning);
void __thiscall NiPSysEmitterDeclinationCtlr::GetViewerStrings(NiPSysEmitterDeclinationCtlr *this, NiTArray<char *> *pkStrings); // idb
NiObject *__cdecl NiPSysEmitterCtlrData::CreateObject(); // idb
void __thiscall NiPosData::LinkObject(NiPSysEmitterCtlrData *this, NiStream *kStream); // idb
NiRTTI *NiPSysEmitterCtlrData::GetRTTI();
char __thiscall NiPSysEmitterCtlrData::IsEqual(NiPSysEmitterCtlrData *this, NiObject *pkObject);
void __thiscall NiPSysEmitterCtlrData::ReplaceBirthRateKeys(NiPSysEmitterCtlrData *this, NiFloatKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType); // idb
void __thiscall NiPSysEmitterCtlrData::ReplaceEmitterActiveKeys(NiPSysEmitterCtlrData *this, NiBoolKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType); // idb
CPostProcessEffect *__thiscall NiPSysEmitterCtlrData::`scalar deleting destructor'(NiPSysEmitterCtlrData *this, unsigned int a2);
void __thiscall NiPSysEmitterCtlrData::LoadBinary(NiPSysEmitterCtlrData *this, NiStream *kStream); // idb
void __thiscall NiPSysEmitterCtlrData::SaveBinary(NiPSysEmitterCtlrData *this, NiStream *kStream); // idb
void __thiscall NiPSysEmitterCtlrData::GetViewerStrings(NiPSysEmitterCtlrData *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiPSysDragModifier::NiPSysDragModifier(NiPSysDragModifier *this); // idb
void __cdecl NiPSysDragModifier::CreateObject();
NiRTTI *NiPSysDragModifier::GetRTTI();
NiObject *__thiscall NiPSysDragModifier::CreateClone(NiPSysDragModifier *this, NiCloningProcess *kCloning); // idb
void __thiscall NiPSysDragModifier::Update(NiPSysDragModifier *this, float fTime, NiPSysData *pkData); // idb
void __thiscall NiPSysDragModifier::LoadBinary(NiPSysDragModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysDragModifier::SaveBinary(NiPSysDragModifier *this, NiStream *kStream); // idb
char __thiscall NiPSysDragModifier::IsEqual(NiPSysDragModifier *this, NiObject *pkObject);
void __thiscall NiPSysDragModifier::GetViewerStrings(NiPSysDragModifier *this, NiTArray<char *> *pkStrings); // idb
NiPSysFieldModifier *__cdecl NiPSysDragFieldModifier::CreateObject();
int __thiscall NiPSysVolumeEmitter::RegisterStreamables(NiPSysVortexFieldModifier *this, NiStream *kStream);
NiRTTI *NiPSysDragFieldModifier::GetRTTI();
void __thiscall NiPSysDragFieldModifier::UpdateNoAttenuationNoDirNoDist(NiPSysDragFieldModifier *this, float fTime, NiPSysData *pkData); // idb
NiPSysFieldModifier *__thiscall NiPSysDragFieldModifier::CreateClone(NiPSysDragFieldModifier *this, NiCloningProcess *kCloning);
void __thiscall NiPSysDragFieldModifier::UpdateNoAttenuationNoDir(NiPSysDragFieldModifier *this, float fTime, NiPSysData *pkData); // idb
bool __thiscall NiPSysDragFieldModifier::IsEqual(NiPSysDragFieldModifier *this, NiObject *pkObject); // idb
void __thiscall NiPSysDragFieldModifier::Update(NiPSysDragFieldModifier *this, float fTime, NiPSysData *pkData); // idb
void __thiscall NiPSysDragFieldModifier::LoadBinary(NiPSysDragFieldModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysDragFieldModifier::SaveBinary(NiPSysDragFieldModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysDragFieldModifier::GetViewerStrings(NiPSysDragFieldModifier *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiPSysData::NiPSysData(NiPSysData *this); // idb
void __thiscall NiPSysData::~NiPSysData(NiPSysData *this); // idb
void __thiscall NiPSysData::RemoveParticle(NiPSysData *this, unsigned __int16 usParticle); // idb
void __thiscall NiPSysData::ResolveAddedParticles(NiPSysData *this); // idb
NiObject *__cdecl NiPSysData::CreateObject(); // idb
void __thiscall NiPSysData::LinkObject(NiPSysData *this, NiStream *kStream); // idb
char __thiscall NiPSysData::IsEqual(NiPSysData *this, NiObject *pkObject);
NiRTTI *NiPSysData::GetRTTI();
NiPSysData *__thiscall NiPSysData::`vector deleting destructor'(NiPSysData *this, unsigned int a2);
void __thiscall NiPSysData::CopyMembers(NiPSysData *this, NiPSysData *pkDest, NiCloningProcess *kCloning); // idb
NiParticlesData *__thiscall NiPSysData::CreateClone(NiPSysData *this, NiCloningProcess *kCloning);
void __thiscall NiPSysData::LoadBinary(NiPSysData *this, NiStream *kStream); // idb
void __thiscall NiPSysData::SaveBinary(NiPSysData *this, NiStream *kStream); // idb
void __thiscall NiPSysData::GetViewerStrings(NiPSysData *this, NiTArray<char *> *pkStrings); // idb
int __thiscall NiPSysBoxEmitter::RegisterStreamables(NiPSysSphereEmitter *this, NiStream *kStream);
bool __thiscall NiPSysCylinderEmitter::IsEqual(NiPSysCylinderEmitter *this, NiObject *pkObject); // idb
NiRTTI *NiPSysCylinderEmitter::GetRTTI();
void __thiscall NiPSysCylinderEmitter::ComputeVolumeInitialPositionAndVelocity(NiPSysCylinderEmitter *this, NiTransform *kEmitterToPSys, NiPoint3 *kPosition, NiPoint3 *kVelocity); // idb
NiPSysVolumeEmitter *__thiscall NiPSysCylinderEmitter::CreateClone(NiPSysCylinderEmitter *this, NiCloningProcess *kCloning);
NiPSysVolumeEmitter *__cdecl NiPSysCylinderEmitter::CreateObject();
void __thiscall NiPSysCylinderEmitter::LoadBinary(NiPSysCylinderEmitter *this, NiStream *kStream); // idb
void __thiscall NiPSysCylinderEmitter::SaveBinary(NiPSysCylinderEmitter *this, NiStream *kStream); // idb
void __thiscall NiPSysCylinderEmitter::GetViewerStrings(NiPSysCylinderEmitter *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiPSysColliderManager::LoadBinary(NiPSysColorModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysColorModifier::Update(NiPSysColorModifier *this, float fTime, NiPSysData *pkData); // idb
bool __thiscall NiPSysColorModifier::IsEqual(NiPSysColorModifier *this, NiObject *pkObject); // idb
void __thiscall NiPSysColorModifier::SetColorData(NiPSysColorModifier *this, NiColorData *pkColorData); // idb
NiRTTI *NiPSysColorModifier::GetRTTI();
NiPSysModifier *__cdecl NiPSysColorModifier::CreateObject();
void __thiscall NiPSysColorModifier::LinkObject(NiPSysColorModifier *this, NiStream *kStream); // idb
NiPSysColorModifier *__thiscall NiPSysColliderManager::`vector deleting destructor'(NiPSysColorModifier *this, unsigned int a2);
NiPSysModifier *__thiscall NiPSysColorModifier::CreateClone(NiPSysColorModifier *this, NiCloningProcess *kCloning);
void __thiscall NiPSysColorModifier::GetViewerStrings(NiPSysColorModifier *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiPSysColliderManager::Update(NiPSysColliderManager *this, float fTime, NiPSysData *pkData); // idb
void __thiscall NiPSysColliderManager::ProcessClone(NiPSysColliderManager *this, NiCloningProcess *kCloning); // idb
void __thiscall NiPSysColliderManager::LinkObject(NiPSysColliderManager *this, NiStream *kStream); // idb
char __thiscall NiPSysColliderManager::RegisterStreamables(NiPSysColorModifier *this, NiStream *kStream);
void __thiscall NiPSysColorModifier::SaveBinary(NiPSysColorModifier *this, NiStream *kStream); // idb
char __thiscall NiPSysColliderManager::IsEqual(NiPSysColliderManager *this, NiObject *pkObject);
NiRTTI *NiPSysColliderManager::GetRTTI();
NiPSysModifier *__thiscall NiPSysColliderManager::CreateClone(NiPSysColliderManager *this, NiCloningProcess *kCloning);
NiObject *__cdecl NiPSysColliderManager::CreateObject(); // idb
void __thiscall NiPSysColliderManager::GetViewerStrings(NiPSysColliderManager *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiPSysBoxEmitter::LinkObject(NiPSysSphereEmitter *this, NiStream *kStream); // idb
bool __thiscall NiPSysBoxEmitter::IsEqual(NiPSysBoxEmitter *this, NiObject *pkObject); // idb
NiRTTI *NiPSysBoxEmitter::GetRTTI();
void __thiscall NiPSysBoxEmitter::ComputeVolumeInitialPositionAndVelocity(NiPSysBoxEmitter *this, NiTransform *kEmitterToPSys, NiPoint3 *kPosition, NiPoint3 *kVelocity); // idb
NiPSysVolumeEmitter *__thiscall NiPSysBoxEmitter::CreateClone(NiPSysBoxEmitter *this, NiCloningProcess *kCloning);
NiPSysVolumeEmitter *__cdecl NiPSysBoxEmitter::CreateObject();
void __thiscall NiPSysBoxEmitter::LoadBinary(NiPSysBoxEmitter *this, NiStream *kStream); // idb
void __thiscall NiPSysBoxEmitter::SaveBinary(NiPSysBoxEmitter *this, NiStream *kStream); // idb
void __thiscall NiPSysBoxEmitter::GetViewerStrings(NiPSysBoxEmitter *this, NiTArray<char *> *pkStrings); // idb
NiObject *__cdecl NiPSysBoundUpdateModifier::CreateObject(); // idb
void __thiscall NiPSysBoundUpdateModifier::LinkObject(NiPSysSpawnModifier *this, NiStream *kStream); // idb
int __thiscall NiScreenLODData::RegisterStreamables(NiPSysSpawnModifier *this, NiStream *kStream);
bool __thiscall NiPSysBoundUpdateModifier::IsEqual(NiPSysBoundUpdateModifier *this, NiObject *pkObject); // idb
NiRTTI *NiPSysBoundUpdateModifier::GetRTTI();
void __thiscall NiPSysBoundUpdateModifier::SetUpdateSkip(NiPSysBoundUpdateModifier *this, __int16 sUpdateSkip); // idb
NiPSysBoundUpdateModifier *__thiscall NiPSysBoundUpdateModifier::`scalar deleting destructor'(NiPSysBoundUpdateModifier *this, unsigned int a2);
void __thiscall NiPSysBoundUpdateModifier::UpdateMeshBounds(NiPSysBoundUpdateModifier *this, float fTime, NiMeshPSysData *pkMeshData); // idb
NiPSysModifier *__thiscall NiPSysBoundUpdateModifier::CreateClone(NiPSysBoundUpdateModifier *this, NiCloningProcess *kCloning);
void __thiscall NiPSysBoundUpdateModifier::Update(NiPSysBoundUpdateModifier *this, float fTime, NiPSysData *pkData); // idb
void __thiscall NiPSysBoundUpdateModifier::LoadBinary(NiPSysBoundUpdateModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysBoundUpdateModifier::SaveBinary(NiPSysBoundUpdateModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysBoundUpdateModifier::GetViewerStrings(NiPSysBoundUpdateModifier *this, NiTArray<char *> *pkStrings); // idb
NiPSysModifier *__cdecl NiPSysBombModifier::CreateObject();
NiRTTI *NiPSysBombModifier::GetRTTI();
NiPSysVortexFieldModifier *__thiscall NiPSysRadialFieldModifier::`vector deleting destructor'(NiPSysVortexFieldModifier *this, unsigned int a2);
NiPSysModifier *__thiscall NiPSysBombModifier::CreateClone(NiPSysBombModifier *this, NiCloningProcess *kCloning);
void __thiscall NiPSysBombModifier::ProcessClone(NiPSysBombModifier *this, NiCloningProcess *kCloning); // idb
void __thiscall NiPSysBombModifier::Update(NiPSysBombModifier *this, float fTime, NiPSysData *pkData); // idb
char __thiscall NiPSysBombModifier::IsEqual(NiPSysBombModifier *this, NiObject *pkObject);
void __thiscall NiPSysBombModifier::LoadBinary(NiPSysBombModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysBombModifier::SaveBinary(NiPSysBombModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysBombModifier::GetViewerStrings(NiPSysBombModifier *this, NiTArray<char *> *pkStrings); // idb
NiPSysModifier *__cdecl NiPSysAgeDeathModifier::CreateObject();
void __thiscall NiPSysAgeDeathModifier::LinkObject(NiPSysAgeDeathModifier *this, NiStream *kStream); // idb
char __thiscall NiPSysAgeDeathModifier::IsEqual(NiPSysAgeDeathModifier *this, NiObject *pkObject);
NiRTTI *NiPSysAgeDeathModifier::GetRTTI();
void __thiscall NiPSysAgeDeathModifier::Update(NiPSysAgeDeathModifier *this, float fTime, NiPSysData *pkData); // idb
NiPSysModifier *__thiscall NiPSysAgeDeathModifier::CreateClone(NiPSysAgeDeathModifier *this, NiCloningProcess *kCloning);
void __thiscall NiPSysAgeDeathModifier::ProcessClone(NiPSysAgeDeathModifier *this, NiCloningProcess *kCloning); // idb
void __thiscall NiPSysAgeDeathModifier::LoadBinary(NiPSysAgeDeathModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysAgeDeathModifier::SaveBinary(NiPSysAgeDeathModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysAgeDeathModifier::GetViewerStrings(NiPSysAgeDeathModifier *this, NiTArray<char *> *pkStrings); // idb
NiObject *__cdecl NiPSysAirFieldSpreadCtlr::CreateObject(); // idb
NiRTTI *NiPSysAirFieldSpreadCtlr::GetRTTI();
void __thiscall NiPSysAirFieldSpreadCtlr::GetTargetFloatValue(NiPSysAirFieldSpreadCtlr *this, float *fValue); // idb
void __thiscall NiPSysAirFieldSpreadCtlr::SetTargetFloatValue(NiPSysAirFieldSpreadCtlr *this, float fValue); // idb
NiPSysModifierFloatCtlr *__thiscall NiPSysAirFieldSpreadCtlr::CreateClone(NiPSysAirFieldSpreadCtlr *this, NiCloningProcess *kCloning);
void __thiscall NiPSysAirFieldSpreadCtlr::GetViewerStrings(NiPSysAirFieldSpreadCtlr *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiPSysAirFieldModifier::SetDirection(NiPSysAirFieldModifier *this, NiPoint3 *kDirection); // idb
NiRTTI *NiPSysAirFieldModifier::GetRTTI();
void __thiscall NiPSysAirFieldModifier::NiPSysAirFieldModifier(NiPSysAirFieldModifier *this); // idb
void __cdecl NiPSysAirFieldModifier::CreateObject();
void __thiscall NiPSysAirFieldModifier::UpdateNoAttenuationNoInheritNoSpread(NiPSysAirFieldModifier *this, float fTime, NiPSysData *pkData); // idb
void __thiscall NiPSysAirFieldModifier::UpdateNoAttenuationNoInheritNoSpreadNoMaxDistance(NiPSysAirFieldModifier *this, float fTime, NiPSysData *pkData); // idb
NiPSysFieldModifier *__thiscall NiPSysAirFieldModifier::CreateClone(NiPSysAirFieldModifier *this, NiCloningProcess *kCloning);
bool __thiscall NiPSysAirFieldModifier::IsEqual(NiPSysAirFieldModifier *this, NiObject *pkObject); // idb
void __thiscall NiPSysAirFieldModifier::Update(NiPSysAirFieldModifier *this, float fTime, NiPSysData *pkData); // idb
void __thiscall NiPSysAirFieldModifier::LoadBinary(NiPSysAirFieldModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysAirFieldModifier::SaveBinary(NiPSysAirFieldModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysAirFieldModifier::GetViewerStrings(NiPSysAirFieldModifier *this, NiTArray<char *> *pkStrings); // idb
NiObject *__cdecl NiPSysAirFieldInheritVelocityCtlr::CreateObject(); // idb
NiRTTI *NiPSysAirFieldInheritVelocityCtlr::GetRTTI();
void __thiscall NiPSysAirFieldInheritVelocityCtlr::GetTargetFloatValue(NiPSysAirFieldInheritVelocityCtlr *this, float *fValue); // idb
void __thiscall NiPSysAirFieldInheritVelocityCtlr::SetTargetFloatValue(NiPSysAirFieldInheritVelocityCtlr *this, float fValue); // idb
NiPSysModifierFloatCtlr *__thiscall NiPSysAirFieldInheritVelocityCtlr::CreateClone(NiPSysAirFieldInheritVelocityCtlr *this, NiCloningProcess *kCloning);
void __thiscall NiPSysAirFieldInheritVelocityCtlr::GetViewerStrings(NiPSysAirFieldInheritVelocityCtlr *this, NiTArray<char *> *pkStrings); // idb
NiObject *__cdecl NiPSysAirFieldAirFrictionCtlr::CreateObject(); // idb
NiRTTI *NiPSysAirFieldAirFrictionCtlr::GetRTTI();
void __thiscall NiPSysAirFieldAirFrictionCtlr::GetTargetFloatValue(NiPSysAirFieldAirFrictionCtlr *this, float *fValue); // idb
void __thiscall NiPSysAirFieldAirFrictionCtlr::SetTargetFloatValue(NiPSysAirFieldAirFrictionCtlr *this, float fValue); // idb
NiPSysModifierFloatCtlr *__thiscall NiPSysAirFieldAirFrictionCtlr::CreateClone(NiPSysAirFieldAirFrictionCtlr *this, NiCloningProcess *kCloning);
char __thiscall NiPSysAirFieldInheritVelocityCtlr::InterpTargetIsCorrectType(NiPSysAirFieldSpreadCtlr *this, NiObjectNET *pkTarget);
void __thiscall NiPSysAirFieldAirFrictionCtlr::GetViewerStrings(NiPSysAirFieldAirFrictionCtlr *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiTriBasedGeom::SetModelData(NiParticleSystem *this, NiGeometryData *pkModelData); // idb
void __thiscall NiParticleSystem::UpdateDownwardPass(NiParticleSystem *this, float fTime, bool bUpdateControllers); // idb
void __thiscall NiParticleSystem::UpdateWorldData(NiParticleSystem *this); // idb
BOOL __stdcall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int>::IsKeysEqual(unsigned int key1, unsigned int key2);
NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier> > *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier> > *this, unsigned int a2);
void __thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll(NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *this); // idb
void __thiscall NiParticleSystem::InitializeNewParticle(NiParticleSystem *this, int usNewParticle);
void __thiscall NiParticleSystem::UpdateRigidDownwardPass(NiParticleSystem *this, float fTime); // idb
void __thiscall NiParticleSystem::UpdateWorldBound(NiParticleSystem *this); // idb
void __thiscall NiParticleSystem::SetSelectiveUpdateFlags(NiParticleSystem *this, bool *bSelectiveUpdate, bool bSelectiveUpdateTransforms, bool *bRigid); // idb
void __thiscall NiParticleSystem::ProcessClone(NiParticleSystem *this, NiCloningProcess *kCloning); // idb
char __thiscall NiParticleSystem::RegisterStreamables(NiParticleSystem *this, NiStream *kStream);
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier> > *this); // idb
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPSysModifier *>,NiPSysModifier *>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiPSysModifier *>,NiPSysModifier *>(NiTStringTemplateMap<NiTPointerMap<char const *,NiPSysModifier *>,NiPSysModifier *> *this); // idb
NiTPointerList<NiPointer<NiPSysModifier> > *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::`scalar deleting destructor'(NiTPointerList<NiPointer<NiPSysModifier> > *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPSysModifier *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPSysModifier *>::`vector deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPSysModifier *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<char const *,NiPSysModifier *>::`vector deleting destructor'(NiTPointerMap<char const *,NiPSysModifier *> *this, unsigned int a2);
NiTStringPointerMap<NiPSysModifier *> *__thiscall NiTStringPointerMap<NiPSysModifier *>::`scalar deleting destructor'(NiTStringPointerMap<NiPSysModifier *> *this, unsigned int a2);
void __thiscall NiParticleSystem::PerformSystemReset(NiParticleSystem *this); // idb
// char __userpurge NiParticleSystem::IsEqual@<al>(NiParticleSystem *this@<ecx>, int a2@<ebx>, NiObject *pkObject);
void *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::InsertBefore(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> > *this, void *kPos, NiPointer<NiProperty> *element); // idb
void __thiscall NiParticleSystem::UpdateSystem(NiParticleSystem *this, float fTime); // idb
void __thiscall NiParticleSystem::CopyMembers(NiParticleSystem *this, NiParticleSystem *pkDest, NiCloningProcess *kCloning); // idb
void __thiscall NiParticleSystem::LoadBinary(NiParticleSystem *this, NiStream *kStream); // idb
void __thiscall NiParticleSystem::LinkObject(NiParticleSystem *this, NiStream *kStream); // idb
void __thiscall NiParticleSystem::SaveBinary(NiParticleSystem *this, NiStream *kStream); // idb
void __thiscall NiParticleSystem::GetViewerStrings(NiParticleSystem *this, NiTArray<char *> *pkStrings); // idb
NiRTTI *NiParticleSystem::GetRTTI();
void __thiscall NiParticleSystem::NiParticleSystem(NiParticleSystem *this); // idb
NiObject *__thiscall NiParticleSystem::CreateClone(NiParticleSystem *this, NiCloningProcess *kCloning); // idb
void __cdecl NiParticleSystem::CreateObject();
NiTArray<NiTArray<NiPointer<NiAVObject> > *> *__thiscall NiTArray<NiTArray<NiPointer<NiAVObject>> *>::`scalar deleting destructor'(NiTArray<NiTArray<NiPointer<NiAVObject> > *> *this, unsigned int a2);
void __thiscall NiMeshPSysData::SetActiveVertexCount(NiMeshPSysData *this, unsigned __int16 usActive); // idb
void __thiscall NiMeshPSysData::ProcessClone(NiMeshPSysData *this, NiCloningProcess *kCloning); // idb
bool __thiscall NiMeshPSysData::RegisterStreamables(NiMeshPSysData *this, NiStream *kStream); // idb
bool __thiscall NiMeshPSysData::IsEqual(NiMeshPSysData *this, NiObject *pkObject); // idb
NiRTTI *NiMeshPSysData::GetRTTI();
void __thiscall NiMeshPSysData::~NiMeshPSysData(NiMeshPSysData *this); // idb
void __thiscall NiMeshPSysData::ResolveAddedParticles(NiMeshPSysData *this); // idb
void __thiscall NiMeshPSysData::SetNumGenerations(NiMeshPSysData *this, unsigned int uiNumGenerations); // idb
void __thiscall NiMeshPSysData::CopyMembers(NiMeshPSysData *this, NiMeshPSysData *pkDest, NiCloningProcess *kCloning); // idb
NiObject *__cdecl NiMeshPSysData::CreateObject(); // idb
void __thiscall NiMeshPSysData::LinkObject(NiMeshPSysData *this, NiStream *kStream); // idb
void __thiscall NiMeshPSysData::AddToPool(NiMeshPSysData *this, unsigned int uiGeneration, NiPointer<NiAVObject> spObject); // idb
NiMeshPSysData *__thiscall NiMeshPSysData::`vector deleting destructor'(NiMeshPSysData *this, unsigned int a2);
void __thiscall NiMeshPSysData::RemoveParticle(NiMeshPSysData *this, unsigned __int16 usParticle); // idb
NiMeshPSysData *__thiscall NiMeshPSysData::CreateClone(NiMeshPSysData *this, NiCloningProcess *kCloning);
// void __userpurge NiMeshPSysData::LoadBinary(NiMeshPSysData *this@<ecx>, int a2@<edi>, NiStream *kStream);
void __thiscall NiMeshPSysData::SaveBinary(NiMeshPSysData *this, NiStream *kStream); // idb
void __thiscall NiMeshPSysData::GetViewerStrings(NiMeshPSysData *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiMeshParticleSystem::SetModelData(NiMeshParticleSystem *this, NiGeometryData *pkModelData); // idb
void __thiscall NiMeshParticleSystem::UpdateRigidDownwardPass(NiMeshParticleSystem *this, float fTime); // idb
void __thiscall NiMeshParticleSystem::LoadBinary(NiMeshParticleSystem *this, NiStream *kStream); // idb
void __thiscall NiMeshParticleSystem::LinkObject(NiMeshParticleSystem *this, NiStream *kStream); // idb
char __thiscall NiMeshParticleSystem::RegisterStreamables(NiMeshParticleSystem *this, NiStream *kStream);
void __thiscall NiMeshParticleSystem::SaveBinary(NiMeshParticleSystem *this, NiStream *kStream); // idb
// char __userpurge NiMeshParticleSystem::IsEqual@<al>(NiMeshParticleSystem *this@<ecx>, int a2@<ebx>, NiObject *pkObject);
void __thiscall NiMeshParticleSystem::UpdateDownwardPass(NiMeshParticleSystem *this, float fTime, bool bUpdateControllers); // idb
void __thiscall NiMeshParticleSystem::UpdatePropertiesDownward(NiMeshParticleSystem *this, NiPropertyState *pkParentState); // idb
void __thiscall NiMeshParticleSystem::UpdateEffectsDownward(NiMeshParticleSystem *this, NiDynamicEffectState *pkParentState); // idb
void __thiscall NiMeshParticleSystem::OnVisible(NiMeshParticleSystem *this, NiCullingProcess *kCuller); // idb
void __thiscall NiMeshParticleSystem::SetSelectiveUpdateFlags(NiMeshParticleSystem *this, bool *bSelectiveUpdate, bool bSelectiveUpdateTransforms, bool *bRigid); // idb
void __thiscall NiMeshParticleSystem::UpdateWorldData(NiMeshParticleSystem *this); // idb
void __thiscall NiMeshParticleSystem::UpdateWorldBound(NiMeshParticleSystem *this); // idb
NiRTTI *NiMeshParticleSystem::GetRTTI();
void __thiscall NiMeshParticleSystem::PurgeRendererData(NiMeshParticleSystem *this, NiRenderer *pkRenderer); // idb
NiParticleSystem *__thiscall NiMeshParticleSystem::CreateClone(NiMeshParticleSystem *this, NiCloningProcess *kCloning);
NiParticleSystem *__cdecl NiMeshParticleSystem::CreateObject();
void __thiscall NiMeshParticleSystem::GetViewerStrings(NiMeshParticleSystem *this, NiTArray<char *> *pkStrings); // idb
NiParticleSystem *__thiscall NiParticleSystem::`scalar deleting destructor'(NiParticleSystem *this, unsigned int a2);
char __thiscall NiPSysModifierCtlr::IsEqual(NiPSysModifierCtlr *this, NiObject *pkObject);
void __thiscall NiPSysModifierCtlr::NiPSysModifierCtlr(NiPSysModifierCtlr *this); // idb
NiRTTI *NiPSysModifierCtlr::GetRTTI();
void __thiscall NiPSysModifierCtlr::~NiPSysModifierCtlr(NiPSysModifierCtlr *this); // idb
void __thiscall NiPSysModifierCtlr::ProcessClone(NiPSysModifierCtlr *this, NiCloningProcess *kCloning); // idb
NiPSysModifierCtlr *__thiscall NiPSysModifierCtlr::`scalar deleting destructor'(NiPSysModifierCtlr *this, unsigned int a2);
void __thiscall NiPSysModifierCtlr::SetTarget(NiPSysModifierCtlr *this, NiObjectNET *pkTarget); // idb
char __thiscall NiPSysModifierCtlr::InterpTargetIsCorrectType(NiPSysModifierCtlr *this, NiObjectNET *pkTarget);
void __thiscall NiPSysModifierCtlr::PostLinkObject(NiPSysModifierCtlr *this, NiStream *kStream); // idb
void __thiscall NiPSysModifierCtlr::GetViewerStrings(NiPSysModifierCtlr *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiPSysEmitter::NiPSysEmitter(NiPSysEmitter *this); // idb
void __thiscall NiPSysEmitter::CopyMembers(NiPSysEmitter *this, NiPSysEmitter *pkDest, NiCloningProcess *kCloning); // idb
NiRTTI *NiPSysEmitter::GetRTTI();
void __thiscall NiPSysEmitter::EmitParticles(NiPSysEmitter *this, float fTime, unsigned __int16 usNumParticles, const float *pfAges); // idb
void __thiscall NiPSysEmitter::LoadBinary(NiPSysEmitter *this, NiStream *kStream); // idb
void __thiscall NiPSysEmitter::SaveBinary(NiPSysEmitter *this, NiStream *kStream); // idb
bool __thiscall NiPSysEmitter::IsEqual(NiPSysEmitter *this, NiObject *pkObject); // idb
void __thiscall NiPSysEmitter::GetViewerStrings(NiPSysEmitter *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiPSysModifier::NiPSysModifier(NiPSysModifier *this); // idb
void __thiscall NiPSysModifier::~NiPSysModifier(NiPSysModifier *this); // idb
void __thiscall NiPSysModifier::LinkObject(NiPSysModifier *this, NiStream *kStream); // idb
bool __thiscall NiPSysModifier::IsEqual(NiPSysModifier *this, NiObject *pkObject); // idb
NiRTTI *NiPSysModifier::GetRTTI();
CPostProcessEffect *__thiscall NiPSysModifier::`vector deleting destructor'(NiPSysModifier *this, unsigned int a2);
void __thiscall NiPSysModifier::CopyMembers(NiPSysModifier *this, NiPSysModifier *pkDest, NiCloningProcess *kCloning); // idb
void __thiscall NiPSysModifier::ProcessClone(NiPSysModifier *this, NiCloningProcess *kCloning); // idb
void __thiscall NiPSysModifier::LoadBinary(NiPSysModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysModifier::SaveBinary(NiPSysModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysModifier::GetViewerStrings(NiPSysModifier *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiPSysFieldModifier::NiPSysFieldModifier(NiPSysFieldModifier *this); // idb
void __thiscall NiPSysFieldModifier::CopyMembers(NiPSysFieldModifier *this, NiPSysFieldModifier *pkDest, NiCloningProcess *kCloning); // idb
void __thiscall NiPSysBombModifier::LinkObject(NiPSysGravityModifier *this, NiStream *kStream); // idb
char __thiscall NiPSysFieldModifier::IsEqual(NiPSysFieldModifier *this, NiObject *pkObject);
NiRTTI *NiPSysFieldModifier::GetRTTI();
void __thiscall NiPSysGravityModifier::ProcessClone(NiPSysVortexFieldModifier *this, NiCloningProcess *kCloning); // idb
void __thiscall NiPSysFieldModifier::LoadBinary(NiPSysFieldModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysFieldModifier::SaveBinary(NiPSysFieldModifier *this, NiStream *kStream); // idb
void __thiscall NiPSysFieldModifier::GetViewerStrings(NiPSysFieldModifier *this, NiTArray<char *> *pkStrings); // idb
NiPSysCollider *__thiscall NiPSysCollider::Resolve(NiPSysCollider *this, float fInitialTime, float *fCollisionTime, NiPSysData *pkData, int usCurParticle);
void __thiscall NiPSysCollider::Update(NiPSysCollider *this, float fTime, NiPSysData *pkData, int usCurParticle);
void __thiscall NiPSysCollider::CopyMembers(NiPSysCollider *this, NiPSysCollider *pkDest, NiCloningProcess *kCloning); // idb
void __thiscall NiPSysCollider::ProcessClone(NiPSysCollider *this, NiCloningProcess *kCloning); // idb
void __thiscall NiPSysCollider::LinkObject(NiPSysCollider *this, NiStream *kStream); // idb
char __thiscall NiPSysCollider::RegisterStreamables(NiPSysCollider *this, NiStream *kStream);
char __thiscall NiPSysCollider::IsEqual(NiPSysCollider *this, NiObject *pkObject);
void __thiscall NiPSysCollider::NiPSysCollider(NiPSysCollider *this, float fBounce, bool bSpawnOnCollide, bool bDieOnCollide, NiPSysSpawnModifier *pkSpawnModifier); // idb
NiRTTI *NiPSysCollider::GetRTTI();
CPostProcessEffect *__thiscall NiPSysPlanarCollider::`vector deleting destructor'(NiPSysSphericalCollider *this, unsigned int a2);
void __thiscall NiPSysCollider::LoadBinary(NiPSysCollider *this, NiStream *kStream); // idb
void __thiscall NiPSysCollider::SaveBinary(NiPSysCollider *this, NiStream *kStream); // idb
void __thiscall NiPSysCollider::GetViewerStrings(NiPSysCollider *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiPSysVolumeEmitter::NiPSysVolumeEmitter(NiPSysVolumeEmitter *this); // idb
void __thiscall NiPSysVolumeEmitter::CopyMembers(NiPSysVolumeEmitter *this, NiPSysVolumeEmitter *pkDest, NiCloningProcess *kCloning); // idb
void __thiscall NiPSysVolumeEmitter::LoadBinary(NiPSysVolumeEmitter *this, NiStream *kStream); // idb
void __thiscall NiPSysVolumeEmitter::LinkObject(NiPSysVolumeEmitter *this, NiStream *kStream); // idb
void __thiscall NiPSysVolumeEmitter::SaveBinary(NiPSysVolumeEmitter *this, NiStream *kStream); // idb
char __thiscall NiPSysVolumeEmitter::IsEqual(NiPSysVolumeEmitter *this, NiObject *pkObject);
NiRTTI *NiPSysVolumeEmitter::GetRTTI();
void __thiscall NiPSysVolumeEmitter::ProcessClone(NiPSysVolumeEmitter *this, NiCloningProcess *kCloning); // idb
void __thiscall NiPSysVolumeEmitter::ComputeInitialPositionAndVelocity(NiPSysVolumeEmitter *this, NiPoint3 *kPosition, NiPoint3 *kVelocity); // idb
void __thiscall NiPSysVolumeEmitter::GetViewerStrings(NiPSysVolumeEmitter *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiPSysModifierBoolCtlr::NiPSysModifierBoolCtlr(NiPSysModifierBoolCtlr *this); // idb
void __thiscall NiPSysModifierBoolCtlr::CreatePoseInterpolator(NiPSysModifierBoolCtlr *this, unsigned __int16 usIndex);
void __thiscall NiPSysModifierFloatCtlr::CopyMembers(NiPSysModifierFloatCtlr *this, NiPSysModifierFloatCtlr *pkDest, NiCloningProcess *kCloning); // idb
NiRTTI *NiPSysModifierBoolCtlr::GetRTTI();
void __thiscall NiPSysModifierBoolCtlr::LinkObject(NiPSysModifierBoolCtlr *this, NiStream *kStream); // idb
void __thiscall NiPSysModifierBoolCtlr::SynchronizePoseInterpolator(NiPSysModifierBoolCtlr *this, NiInterpolator *pkInterp, unsigned __int16 usIndex); // idb
void __thiscall NiPSysModifierBoolCtlr::Update(NiPSysModifierBoolCtlr *this, float fTime); // idb
void __thiscall NiPSysModifierBoolCtlr::GetViewerStrings(NiPSysModifierBoolCtlr *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiPSysModifierFloatCtlr::NiPSysModifierFloatCtlr(NiPSysModifierFloatCtlr *this); // idb
void __thiscall NiPSysModifierFloatCtlr::CreatePoseInterpolator(NiPSysModifierFloatCtlr *this, unsigned __int16 usIndex);
char __thiscall NiPSysModifierFloatCtlr::IsEqual(NiPSysModifierFloatCtlr *this, NiObject *pkObject);
NiRTTI *NiPSysModifierFloatCtlr::GetRTTI();
NiPSysModifierFloatCtlr *__thiscall NiPSysModifierBoolCtlr::`vector deleting destructor'(NiPSysModifierFloatCtlr *this, unsigned int a2);
void __thiscall NiFloatExtraDataController::LoadBinary(NiPSysModifierFloatCtlr *this, NiStream *kStream); // idb
void __thiscall NiPSysModifierFloatCtlr::LinkObject(NiPSysModifierFloatCtlr *this, NiStream *kStream); // idb
void __thiscall NiPSysModifierFloatCtlr::SynchronizePoseInterpolator(NiPSysModifierFloatCtlr *this, NiInterpolator *pkInterp, unsigned __int16 usIndex); // idb
void __thiscall NiPSysModifierFloatCtlr::Update(NiPSysModifierFloatCtlr *this, float fTime); // idb
void __thiscall NiPSysModifierFloatCtlr::GetViewerStrings(NiPSysModifierFloatCtlr *this, NiTArray<char *> *pkStrings); // idb
void __thiscall NiParticleInfo::NiParticleInfo(NiParticleInfo *this); // idb
bool __thiscall NiParticleInfo::IsEqual(NiParticleInfo *this, NiParticleInfo *kData); // idb
void __thiscall NiParticleInfo::LoadBinary(NiParticleInfo *this, NiStream *kStream); // idb
void __thiscall NiParticleInfo::SaveBinary(NiParticleInfo *this, NiStream *kStream); // idb
unsigned int __cdecl NiMessageBox::DefaultMessageBox(const char *pcText, const char *pcCaption);
double __cdecl NiGetCurrentTimeInSec();
int __cdecl NiStricmp(const char *inOne, const char *inTwo); // idb
void __thiscall NiFilename::NiFilename(NiFilename *this, const char *pcFullPath); // idb
void __thiscall NiFilename::Makepath(NiFilename *this, char *pcStr, unsigned int uiStrLen); // idb
void __thiscall NiFilename::GetFullPath(NiFilename *this, char *pcFullPath, unsigned int uiStrLen); // idb
void __cdecl NiStaticDataManager::Init(); // idb
void __cdecl NiStaticDataManager::Shutdown(); // idb
void __cdecl NiStaticDataManager::SetRootLibrary(void (__cdecl *pfnInit)(), void (__cdecl *pfnShutdown)()); // idb
void __cdecl NiStaticDataManager::AddLibrary(void (__cdecl *pfnInit)(), void (__cdecl *pfnShutdown)()); // idb
void __cdecl NiSystemDesc::ShutdownSystemDesc(); // idb
void __cdecl NiSystemDesc::InitSystemDesc(); // idb
int __cdecl NiFile::ReadNoSwap(NiBinaryStream *pkThis, void *pvBuffer, unsigned int uiBytes);
int __cdecl NiFile::WriteNoSwap(NiBinaryStream *pkThis, const void *pvBuffer, unsigned int uiBytes);
int __cdecl NiFile::ReadAndSwap(NiBinaryStream *pkThis, void *pvBuffer, unsigned int uiBytes, unsigned int *puiComponentSizes, unsigned int uiNumComponents);
NiFile *__cdecl NiFile::GetFile();
void __cdecl NiFile::DefaultFileCreateFunc(const char *pcName, NiFile::OpenMode eMode, unsigned int uiSize);
int __cdecl NiFile::Access();
bool __cdecl NiFile::DefaultFileAccessFunc(const char *pcName, NiFile::OpenMode eMode); // idb
int __cdecl NiFile::WriteAndSwap(NiBinaryStream *pkThis, const void *pvBuffer, unsigned int uiBytes, unsigned int *puiComponentSizes, unsigned int uiNumComponents);
void __thiscall NiFile::SetEndianSwap(NiFile *this, bool bDoSwap); // idb
void __thiscall NiBinaryStream::NiBinaryStream(NiBinaryStream *this); // idb
void __thiscall NiBinaryStream::~NiBinaryStream(NiBinaryStream *this); // idb
bool __cdecl NiBinaryStream::GetEndianMatchHint(); // idb
NiBinaryStream *__thiscall NiBinaryStream::`scalar deleting destructor'(NiBinaryStream *this, unsigned int a2);
void __cdecl NiBinaryStream::DoByteSwap(void *pvData, unsigned int uiTotalBytes, unsigned int *puiComponentSizes, unsigned int uiNumComponents); // idb
unsigned int __thiscall NiBinaryStream::GetLine(NiBinaryStream *this, char *pBuffer, unsigned int uiMaxBytes); // idb
int __thiscall NiBinaryStream::PutS(NiBinaryStream *this, const char *pBuffer);
void __thiscall NiSearchPath::NiSearchPath(NiSearchPath *this); // idb
void __thiscall NiSearchPath::Reset(NiSearchPath *this); // idb
NiSearchPath *__thiscall NiSearchPath::`scalar deleting destructor'(NiSearchPath *this, unsigned int a2);
void __thiscall NiSearchPath::SetFilePath(NiSearchPath *this, const char *pcFilePath); // idb
void __thiscall NiSearchPath::SetReferencePath(NiSearchPath *this, const char *pcReferencePath); // idb
char __thiscall NiSearchPath::GetNextSearchPath(NiSearchPath *this, char *pcPath, unsigned int uiStringLen);
void __thiscall NiMemStream::NiMemStream(NiMemStream *this, const void *pBuffer, unsigned int uiSize); // idb
void __thiscall NiMemStream::NiMemStream(NiMemStream *this); // idb
void __thiscall NiMemStream::~NiMemStream(NiMemStream *this); // idb
char *__thiscall NiMemStream::Str(NiMemStream *this);
NiMemStream *__thiscall NiMemStream::`vector deleting destructor'(NiMemStream *this, unsigned int a2);
int __thiscall NiMemStream::MemRead(NiMemStream *this, void *pBuffer, unsigned int uiBytes);
unsigned int __thiscall NiMemStream::MemWrite(NiMemStream *this, const void *pBuffer, unsigned int uiBytes); // idb
int __thiscall NiThread::Suspend(NiThread *this); // idb
void __cdecl NiSystemSDM::Init(); // idb
void __cdecl NiSystemSDM::Shutdown(); // idb
void __thiscall NiFile::NiFile(NiFile *this, const char *pcName, NiFile::OpenMode eMode, unsigned int uiBufferSize); // idb
char __thiscall NiFile::Flush(NiFile *this);
signed int __thiscall NiFile::GetFileSize(NiFile *this);
void __thiscall NiFile::~NiFile(NiFile *this); // idb
void __thiscall NiFile::Seek(NiFile *this, int iOffset, int iWhence); // idb
int __thiscall NiFile::FileRead(NiFile *this, void *pBuffer, unsigned int uiBytes);
int __thiscall NiFile::FileWrite(NiFile *this, const void *pBuffer, unsigned int uiBytes);
NiFile *__thiscall NiFile::`scalar deleting destructor'(NiFile *this, unsigned int a2);
int __cdecl NiMemStream::ReadNoSwap(NiBinaryStream *pkThis, void *pvBuffer, unsigned int uiBytes);
unsigned int __cdecl NiMemStream::WriteNoSwap(NiBinaryStream *pkThis, const void *pvBuffer, unsigned int uiBytes);
int __cdecl NiMemStream::ReadAndSwap(NiBinaryStream *pkThis, void *pvBuffer, unsigned int uiBytes, unsigned int *puiComponentSizes, unsigned int uiNumComponents);
unsigned int __cdecl NiMemStream::WriteAndSwap(NiBinaryStream *pkThis, const void *pvBuffer, unsigned int uiBytes, unsigned int *puiComponentSizes, unsigned int uiNumComponents); // idb
void __thiscall NiMemStream::SetEndianSwap(NiMemStream *this, bool bDoSwap); // idb
DWORD __thiscall NiThread::SystemSuspend(NiThread *this);
void __cdecl NiLogger::_SDMInit(); // idb
int __cdecl NiLogger::OpenLog(const char *pcFilename, NiLogger::OpenMode eOpenMode, bool bFlushOnWrite, bool bCommitToDisk); // idb
void __cdecl NiLogger::CloseAllLogs(); // idb
void __cdecl NiLogger::_SDMShutdown(); // idb
void __thiscall NiLogger::NiLogFile::Log(NiLogger::NiLogFile *this, char *pcMessage); // idb
void __thiscall NiLogger::NiLogFile::CloseFile(NiLogger::NiLogFile *this); // idb
char __thiscall NiLogger::NiLogFile::OpenFile(NiLogger::NiLogFile *this, NiLogger::OpenMode eOpenMode, bool bCommitToDisk);
void __thiscall NiLogger::NiLogFile::NiLogFile(NiLogger::NiLogFile *this, const char *pcName, NiLogger::OpenMode eOpenMode, bool bFlushOnWrite, bool bCommitToDisk); // idb
void __thiscall NiLogger::NiLogFile::~NiLogFile(NiLogger::NiLogFile *this); // idb
NiLogBehavior *__cdecl NiLogBehavior::Get(); // idb
void NiMemoryLogBehavior::Initialize();
void NiProfileLogBehavior::Initialize();
void __cdecl NiPortalSDM::Init(); // idb
void __cdecl NiPortalSDM::Shutdown(); // idb
void NiPortalSDM::NiPortalSDM();
NiRTTI *NiOldWall::GetRTTI();
NiOldWall *__thiscall NiOldWall::`vector deleting destructor'(NiOldWall *this, unsigned int a2);
NiNode *__cdecl NiRoom::CreateOldWallObject();
NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAVObject> > *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAVObject>>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAVObject> > *this, unsigned int a2);
NiTArray<NiRoom::Wall *> *__thiscall NiTArray<NiRoom::Wall *>::`vector deleting destructor'(NiTArray<NiRoom::Wall *> *this, unsigned int a2);
NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPortal> > *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPortal>>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPortal> > *this, unsigned int a2);
NiTArray<bool> *__thiscall NiTArray<bool>::`vector deleting destructor'(NiTArray<bool> *this, unsigned int a2);
void __thiscall NiTArray<bool>::SetSize(NiTArray<bool> *this, unsigned int uiMaxSize); // idb
void __thiscall NiRoom::UpdateWorldData(NiRoom *this); // idb
void __thiscall NiRoom::ApplyTransform(NiRoom *this, NiMatrix3 *kMat, NiPoint3 *kTrn, bool bOnLeft); // idb
char __thiscall NiRoom::ContainsPoint(NiRoom *this, NiPoint3 *kPoint);
char __thiscall NiRoom::RegisterStreamables(NiRoom *this, NiStream *kStream);
char __thiscall NiRoom::IsEqual(NiRoom *this, NiObject *pkObject);
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAVObject>>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAVObject>>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAVObject> > *this); // idb
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPortal>>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPortal>>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPortal> > *this); // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAVObject> > *__thiscall NiTPointerList<NiPointer<NiAVObject>>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAVObject> > *this, unsigned int a2);
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPortal> > *__thiscall NiTPointerList<NiPointer<NiPortal>>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPortal> > *this, unsigned int a2);
void __thiscall NiRoom::~NiRoom(NiRoom *this); // idb
NiRTTI *NiRoom::GetRTTI();
void __thiscall NiRoom::OnVisible(NiRoom *this, NiCullingProcess *kCuller); // idb
void __thiscall NiRoom::UpdateChildArray(NiRoom *this); // idb
void __thiscall NiRoom::PostLinkObject(NiRoom *this, NiStream *kStream); // idb
void __thiscall NiRoom::LoadBinary(NiRoom *this, NiStream *kStream); // idb
void __thiscall NiRoom::SaveBinary(NiRoom *this, NiStream *kStream); // idb
void __stdcall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::DeleteItem(NiTListItem<NiPointer<NiDX92DBufferData> > *pkItem);
NiPointer<NiInputDevice::Description> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAVObject>>::RemovePos(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiInputDevice::Description> > *this, NiPointer<NiInputDevice::Description> *result, void **kPos); // idb
void __thiscall NiRoom::NiRoom(NiRoom *this); // idb
NiRoom *__thiscall NiRoom::`scalar deleting destructor'(NiRoom *this, unsigned int a2);
void __thiscall NiRoom::AttachOutgoingPortal(NiRoom *this, NiPortal *pkPortal); // idb
void __thiscall NiRoom::AttachIncomingPortal(NiRoom *this, NiPortal *pkPortal); // idb
void __cdecl NiRoom::CreateObject();
void __thiscall NiRoom::LinkObject(NiRoom *this, NiStream *kStream); // idb
NiPointer<NiInputDevice::Description> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAVObject>>::Remove(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiInputDevice::Description> > *this, NiPointer<NiInputDevice::Description> *result, NiPointer<NiInputDevice::Description> *element); // idb
NiPointer<NiAVObject> *__thiscall NiRoom::DetachFixture(NiRoom *this, NiPointer<NiAVObject> *result, NiAVObject *pkFixture); // idb
void __thiscall NiRoomGroup::LoadBinary(NiRoomGroup *this, NiStream *kStream); // idb
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom>>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom>>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom>>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *this, unsigned int a2);
char __thiscall NiRoomGroup::RegisterStreamables(NiRoomGroup *this, NiStream *kStream);
char __thiscall NiRoomGroup::IsEqual(NiRoomGroup *this, NiObject *pkObject);
NiTPointerList<NiPointer<NiRoom> > *__thiscall NiTPointerList<NiPointer<NiRoom>>::`scalar deleting destructor'(NiTPointerList<NiPointer<NiRoom> > *this, unsigned int a2);
void __thiscall NiRoomGroup::~NiRoomGroup(NiRoomGroup *this); // idb
NiRTTI *NiRoomGroup::GetRTTI();
void __thiscall NiRoomGroup::UpdateChildArray(NiRoomGroup *this); // idb
NiPointer<NiRoom> *__thiscall NiRoomGroup::WhichRoom(NiRoomGroup *this, NiPointer<NiRoom> *result, NiPoint3 *kPoint); // idb
void __thiscall NiRoomGroup::NiRoomGroup(NiRoomGroup *this); // idb
NiRoomGroup *__thiscall NiRoomGroup::`scalar deleting destructor'(NiRoomGroup *this, unsigned int a2);
void __thiscall NiRoomGroup::OnVisible(NiRoomGroup *this, NiCullingProcess *kCuller); // idb
void __thiscall NiRoomGroup::AttachRoom(NiRoomGroup *this, NiRoom *pkRoom); // idb
NiNode *__cdecl NiRoomGroup::CreateObject();
void __thiscall NiRoomGroup::LinkObject(NiRoomGroup *this, NiStream *kStream); // idb
void __thiscall NiRoomGroup::SaveBinary(NiRoomGroup *this, NiStream *kStream); // idb
NiPointer<NiRoom> *__thiscall NiRoomGroup::DetachRoom(NiRoomGroup *this, NiPointer<NiRoom> *result, NiRoom *pkRoom); // idb
void __thiscall NiPortal::UpdateWorldBound(NiPortal *this); // idb
void __thiscall NiPortal::LinkObject(NiPortal *this, NiStream *kStream); // idb
char __thiscall NiCamera::RegisterStreamables(NiPortal *this, NiStream *kStream);
NiRTTI *NiPortal::GetRTTI();
NiPortal *__thiscall NiPortal::`vector deleting destructor'(NiPortal *this, unsigned int a2);
char __thiscall NiPortal::UpdateFrustum(NiPortal *this, NiCullingProcess *kCuller);
void __thiscall NiPortal::OnVisible(NiPortal *this, NiCullingProcess *kCuller); // idb
void __thiscall NiPortal::UpdateWorldData(NiPortal *this); // idb
void __thiscall NiPortal::ApplyTransform(NiPortal *this, NiMatrix3 *kMat, NiPoint3 *kTrn, bool bOnLeft); // idb
NiObject *__cdecl NiPortal::CreateObject(); // idb
bool __thiscall NiPortal::IsEqual(NiPortal *this, NiObject *pkObject); // idb
void __thiscall NiPortal::LoadBinary(NiPortal *this, NiStream *kStream); // idb
void __thiscall NiPortal::SaveBinary(NiPortal *this, NiStream *kStream); // idb
void __thiscall NiFixtureCuller::Process(NiFixtureCuller *this, NiCamera *pkCamera, NiAVObject *pkScene, NiVisibleArray *pkVisibleSet); // idb
void __thiscall NiFixtureCuller::AppendVirtual(NiFixtureCuller *this, NiGeometry *kVisible); // idb
NiTMapBase<DFALL<int>,NiGeometry *,int> *__thiscall NiTMapBase<DFALL<int>,NiGeometry *,int>::`vector deleting destructor'(NiTMapBase<DFALL<int>,NiGeometry *,int> *this, unsigned int a2);
void __thiscall NiFixtureCuller::~NiFixtureCuller(NiFixtureCuller *this); // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTMap<NiGeometry *,int>::`vector deleting destructor'(NiTMap<NiGeometry *,int> *this, unsigned int a2);
void __thiscall NiFixtureCuller::NiFixtureCuller(NiFixtureCuller *this); // idb
NiFixtureCuller *__thiscall NiFixtureCuller::`vector deleting destructor'(NiFixtureCuller *this, unsigned int a2);
void __cdecl NiApplication::SetCommandLine(char *pcCommandLine); // idb
void __cdecl NiApplication::CommandSelectRenderer(); // idb
bool __thiscall NiApplication::MeasureTime(NiApplication *this); // idb
void __thiscall NiApplication::MainLoop(NiApplication *this); // idb
// int __userpurge NiApplication::WinProc@<eax>(int a1@<edi>, int a2@<esi>, HWND__ *hWnd, unsigned int uiMsg, unsigned int wParam, int lParam);
void __thiscall NiApplication::OnIdle(NiApplication *this); // idb
// void __usercall NiApplication::UpdateFrame(NiApplication *this@<ecx>, int a2@<ebx>);
void __thiscall NiApplication::ConfigureInputDevices(NiApplication *this); // idb
void __thiscall NiApplication::DrawFrameRate(NiApplication *this); // idb
char __thiscall NiApplication::Initialize(NiApplication *this);
void __thiscall NiApplication::UpdateInput(NiApplication *this); // idb
void __thiscall NiApplication::QuitApplication(NiApplication *this); // idb
char NiApplication::Process();
NiRTTI *NiInputSystem::CreateParams::GetRTTI();
void __thiscall NiDI8InputSystem::DI8CreateParams::DI8CreateParams(NiDI8InputSystem::DI8CreateParams *this); // idb
NiRTTI *NiDI8InputSystem::DI8CreateParams::GetRTTI();
NiPointer<NiScreenElements> *__thiscall NiPointer<NiScreenElements>::`vector deleting destructor'(NiPointer<NiScreenElements> *this, unsigned int a2);
char __thiscall NiApplication::CreateScene(NiApplication *this);
char __thiscall NiApplication::CreateCamera(NiApplication *this);
char __thiscall NiApplication::CreateRenderer(NiApplication *this);
char __thiscall NiApplication::CreateInputSystem(NiApplication *this);
NiInputSystem::CreateParams *__thiscall NiApplication::GetInputSystemCreateParams(NiApplication *this); // idb
void __thiscall NiApplication::ProcessInput(NiApplication *this); // idb
char __thiscall NiApplication::OnWindowResize(NiApplication *this, int iWidth, int iHeight, unsigned int uiSizeType, HWND__ *pWnd);
void __thiscall NiApplication::BeginFrame(NiApplication *this); // idb
void __thiscall NiApplication::RenderFrame(NiApplication *this); // idb
void __thiscall NiApplication::RenderScreenItems(NiApplication *this); // idb
void __thiscall NiApplication::EndFrame(NiApplication *this); // idb
void __thiscall NiApplication::DisplayFrame(NiApplication *this); // idb
signed int __thiscall NiTArray<NiPointer<NiScreenElements>>::Remove(NiTArray<NiPointer<NiScreenElements> > *this, NiPointer<NiScreenElements> *element);
NiDI8InputSystem::DI8CreateParams *__thiscall NiDI8InputSystem::DI8CreateParams::`scalar deleting destructor'(NiDI8InputSystem::DI8CreateParams *this, unsigned int a2);
void __thiscall NiTArray<NiPointer<NiScreenElements>>::~NiTArray<NiPointer<NiScreenElements>>(NiTArray<NiPointer<NiScreenElements> > *this); // idb
NiTArray<NiPointer<NiScreenElements> > *__thiscall NiTArray<NiPointer<NiScreenElements>>::`vector deleting destructor'(NiTArray<NiPointer<NiScreenElements> > *this, unsigned int a2);
void __thiscall NiApplication::~NiApplication(NiApplication *this); // idb
void __thiscall NiApplication::Terminate(NiApplication *this); // idb
void __thiscall NiTArray<NiPointer<NiScreenElements>>::NiTArray<NiPointer<NiScreenElements>>(NiTArray<NiPointer<NiScreenElements> > *this, unsigned int uiMaxSize, unsigned int uiGrowBy); // idb
unsigned int __thiscall NiTArray<NiPointer<NiScreenElements>>::SetAtGrow(NiTArray<NiPointer<NiScreenElements> > *this, unsigned int uiIndex, NiPointer<NiScreenElements> *element); // idb
void __thiscall NiApplication::NiApplication(NiApplication *this, const char *pcWindowCaption, unsigned int uiWidth, unsigned int uiHeight, unsigned int uiMenuID, unsigned int uiNumStatusPanes, unsigned int uiBitDepth); // idb
NiApplication *__thiscall NiApplication::`scalar deleting destructor'(NiApplication *this, unsigned int a2);
void __thiscall NiApplication::EnableFrameRate(NiApplication *this, bool bEnable); // idb
void __thiscall NiFrameRate::TakeSample(NiFrameRate *this); // idb
// void __usercall NiFrameRate::Update(NiFrameRate *this@<ecx>, int a2@<ebx>);
void __thiscall NiFrameRate::Shutdown(NiFrameRate *this); // idb
void __thiscall NiFrameRate::~NiFrameRate(NiFrameRate *this); // idb
bool __cdecl NiDX9Select::UpdateAdapter(NiDX9Select *this);
char __cdecl NiDX9Select::UpdateResolution(NiDX9Select *this);
char __cdecl NiDX9Select::UpdateMultisample(NiDX9Select *this);
DLGTEMPLATE *__cdecl NiDX9Select::BuildAdapterSelectTemplate();
signed int __cdecl NiDX9Renderer::GetD3DFormat(NiDX9Renderer::FrameBufferFormat eFBFormat);
signed int __cdecl NiDX9Renderer::GetNiFBFormat(_D3DFORMAT eFormat);
void __cdecl NiDX9Select::EnumerateAdapters(NiDX9Select *this);
void __cdecl NiDX9Select::EnumerateResolutions(NiDX9Select *this);
void __cdecl NiDX9Select::EnumerateMultisamples(NiDX9Select *this);
int __stdcall NiDX9Select::Callback(NiDX9Select *this, HWND__ *pDialog, unsigned int uiMsg, unsigned int wParam, int lParam); // idb
signed int __cdecl NiDX9Select::Select(NiDX9Select *this, HWND__ *pkWnd, bool *bFullscreen, bool *b32BitZBuffer, const void **pvAdapter, const void **pvDevice, const void **pkMode);
NiDX9Renderer *__cdecl NiDX9Select::DialogCreateRenderer(NiDX9Select *this, HWND__ *pkTopLevelWnd, HWND__ *pkRenderWnd, bool bStencil, bool bMultiThread, bool bRefRast, int bSWVertex, bool *bNVPerfHUD);
NiPointer<NiRenderer> *__cdecl NiDX9Select::CreateRenderer(NiDX9Select *this, NiPointer<NiRenderer> *result, HWND__ *pkTopLevelWnd, HWND__ *pkRenderWnd, int bDialog, unsigned int uiBitDepth, unsigned int uiWidth, unsigned int uiHeight, bool bStencil, bool bMultiThread, bool bRefRast, int bSWVertex, bool *bNVPerfHUD);
int __stdcall WinMain(HINSTANCE__ *hI, HINSTANCE__ *hPI, char *cmdline, int iWinMode); // idb
void __thiscall NiCommand::~NiCommand(NiCommand *this); // idb
int __thiscall NiCommand::Boolean(NiCommand *this, char *pcName, bool *bValue); // idb
void __thiscall NiCommand::NiCommand(NiCommand *this, char *pcCmdline); // idb
int __thiscall NiCommand::Boolean(NiCommand *this, char *pcName); // idb
void __thiscall NiAppWindow::NiAppWindow(NiAppWindow *this, const char *pcWindowCaption, unsigned int uiWidth, unsigned int uiHeight, unsigned int uiNumStatusPanes, unsigned int ulWindowStyle); // idb
void __thiscall NiAppWindow::StatusWindowCreate(NiAppWindow *this); // idb
void __thiscall NiAppWindow::WriteToStatusWindow(NiAppWindow *this, unsigned int uiPane, char *pcMsg); // idb
void __thiscall NiAppWindow::StatusWindowDestroy(NiAppWindow *this); // idb
HWND__ *__thiscall NiAppWindow::CreateMainWindow(NiAppWindow *this, int iWinMode, HWND__ *hWnd); // idb
void __thiscall NiAppWindow::~NiAppWindow(NiAppWindow *this); // idb
signed int __cdecl NiAction::SemanticToDeviceControl_GamePad(unsigned int uiSemantic);
signed int __cdecl NiAction::SemanticToDeviceControl_Mouse(unsigned int uiSemantic);
signed int __cdecl NiAction::SemanticToDeviceControl(unsigned int uiSemantic);
NiInputDevice *__thiscall NiInputSystem::OpenDevice(NiInputSystem *this, NiInputDevice::Type eType, unsigned int uiPort, unsigned int uiSlot); // idb
NiInputGamePad *__thiscall NiInputSystem::OpenGamePad(NiInputSystem *this, unsigned int uiPort, unsigned int uiSlot); // idb
NiInputKeyboard *__thiscall NiInputSystem::OpenKeyboard(NiInputSystem *this); // idb
void NiInputSystem::Log(char *pszFmt, ...); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiInputDevice::Description> > *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiInputDevice::Description>>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiInputDevice::Description> > *this, unsigned int a2);
NiTListBase<NiTPointerAllocator<unsigned int>,NiActionData *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiActionData *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiActionData *> *this, unsigned int a2);
void __thiscall NiTPoolContainer<NiActionData>::NiTPoolContainer<NiActionData>(NiTPoolContainer<NiActionData> *this, unsigned int uiSize); // idb
void __thiscall NiTSet<NiScreenGeometryData::ScreenElement *>::Realloc(NiTSet<NiD3DTextureStageGroup *> *this, unsigned int uiNewSize); // idb
NiInputDevice::Description *__thiscall NiInputSystem::OpenGamePad(NiInputSystem *this, NiInputDevice::Description *pkNiDesc);
NiInputDevice::Description *__thiscall NiInputSystem::GetDeviceDesc(NiInputSystem *this, unsigned int uiPort, unsigned int uiSlot); // idb
void __thiscall NiInputSystem::UpdateMouseModifiers(NiInputSystem *this); // idb
void __thiscall NiTPool<NiActionData>::~NiTPool<NiActionData>(NiTPool<NiD3DPass> *this); // idb
NiPointer<NiInputDevice::Description> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAVObject>>::RemoveTail(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiInputDevice::Description> > *this, NiPointer<NiInputDevice::Description> *result); // idb
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiInputDevice::Description>>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiInputDevice::Description>>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiInputDevice::Description> > *this); // idb
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiActionData *>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiActionData *>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiActionData *> *this); // idb
NiTPointerList<NiActionData *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiActionData *>::`vector deleting destructor'(NiTPointerList<NiActionData *> *this, unsigned int a2);
NiTPointerList<NiPointer<NiInputDevice::Description> > *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiInputDevice::Description>>::`scalar deleting destructor'(NiTPointerList<NiPointer<NiInputDevice::Description> > *this, unsigned int a2);
NiInputErr __thiscall NiInputSystem::CloseDevice(NiInputSystem *this, NiInputDevice *pkDevice); // idb
NiInputErr __thiscall NiInputSystem::UpdateAllDevices(NiInputSystem *this); // idb
NiInputErr __thiscall NiInputSystem::UpdateActionMap(NiInputSystem *this); // idb
NiInputErr __thiscall NiInputSystem::Initialize(NiInputSystem *this, NiInputSystem::CreateParams *pkParams); // idb
NiInputErr __thiscall NiInputSystem::Shutdown(NiInputSystem *this); // idb
unsigned int __thiscall NiInputSystem::MapNiActionsToKeyboard(NiInputSystem *this);
unsigned int __thiscall NiInputSystem::MapNiActionsToMouse(NiInputSystem *this);
signed int __thiscall NiInputSystem::MapNiActionsToGamePad(NiInputSystem *this, NiInputGamePad *pkGamePad);
void __thiscall NiTPool<NiActionData>::CreateNewObjects(NiTPool<NiActionData> *this, unsigned int uiSize); // idb
void __thiscall NiInputSystem::NiInputSystem(NiInputSystem *this); // idb
NiRTTI *NiInputSystem::GetRTTI();
NiInputDevice::Description *__thiscall NiInputSystem::GetFirstDeviceDesc(NiInputSystem *this); // idb
NiInputDevice::Description *__thiscall NiInputSystem::GetNextDeviceDesc(NiInputSystem *this); // idb
unsigned int __thiscall NiInputSystem::GetActionDataCount(NiInputSystem *this); // idb
NiActionData *__thiscall NiInputSystem::PopActionData(NiInputSystem *this); // idb
NiActionData *__thiscall NiInputSystem::GetFirstActionData(NiInputSystem *this); // idb
NiActionData *__thiscall NiInputSystem::GetNextActionData(NiInputSystem *this); // idb
unsigned int __thiscall NiInputSystem::AddAvailableDevice(NiInputSystem *this, NiInputDevice::Description *pkDescription); // idb
NiInputErr __thiscall NiInputSystem::MapNiActionsToGamePads(NiInputSystem *this); // idb
signed int __thiscall NiInputSystem::MapNiActionsToDevices(NiInputSystem *this);
void __thiscall NiInputSystem::RemoveDeviceDesc(NiInputSystem *this, unsigned int uiPort, unsigned int uiSlot); // idb
void __thiscall NiInputSystem::~NiInputSystem(NiInputSystem *this); // idb
signed int __thiscall NiInputSystem::SetActionMap(NiInputSystem *this, NiActionMap *pkActionMap);
NiInputErr __thiscall NiInputSystem::FlushActionData(NiInputSystem *this); // idb
NiInputErr __thiscall NiInputSystem::ReportAction(NiInputSystem *this, NiInputDevice *pkDevice, unsigned int uiAppData, unsigned int uiSequence, unsigned int uiDeviceData, void *pvContext); // idb
NiInputSystem *__thiscall NiInputSystem::`vector deleting destructor'(NiInputSystem *this, unsigned int a2);
void __thiscall NiDI8InputSystem::NiDI8InputSystem(NiDI8InputSystem *this); // idb
NiInputErr __thiscall NiDI8InputSystem::Initialize(NiDI8InputSystem *this, NiInputSystem::CreateParams *pkParams); // idb
NiInputErr __thiscall NiDI8InputSystem::Shutdown(NiDI8InputSystem *this); // idb
NiInputErr __thiscall NiDI8InputSystem::SetActionMapOnDIDevice(NiDI8InputSystem *this, IDirectInputDevice8A *pkDIDevice); // idb
signed int __thiscall NiDI8InputSystem::CheckEnumerationStatus(NiDI8InputSystem *this);
void __thiscall NiInputDevice::ControlDesc::SetName(NiInputDevice::ControlDesc *this, const char *pacName); // idb
void __thiscall NiInputDevice::Description::SetName(NiInputDevice::Description *this, const char *pacName); // idb
void __thiscall NiInputDevice::Description::SetDescriptionString(NiInputDevice::Description *this, const char *pacDesc); // idb
NiRTTI *NiDI8InputSystem::GetRTTI();
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiInputDevice::ControlDesc *>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiInputDevice::ControlDesc *>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiInputDevice::ControlDesc *> *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,NiInputDevice::ControlDesc *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiInputDevice::ControlDesc *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiInputDevice::ControlDesc *> *this, unsigned int a2);
void __thiscall NiDI8InputSystem::~NiDI8InputSystem(NiDI8InputSystem *this); // idb
NiInputErr __thiscall NiDI8InputSystem::HandleDeviceChanges(NiDI8InputSystem *this); // idb
char __thiscall NiDI8InputSystem::SetControlMapName(NiDI8InputSystem *this, NiDI8InputSystem::DefaultActions eAction, const char *pcName);
char __thiscall NiDI8InputSystem::DIDeviceInstanceToNiInputDescription(NiDI8InputSystem *this, DIDEVICEINSTANCEA *pkDDI, NiDI8InputSystem::DI8Description *pkNiDesc);
char __thiscall NiDI8InputSystem::SetupDefaultActionMap(NiDI8InputSystem *this);
NiDX92DBufferData *__cdecl NiDX92DBufferData::DynamicCast(NiRTTI *pkRTTI, NiDX92DBufferData *pkObject); // idb
_D3DPRESENT_PARAMETERS_ *__thiscall NiDX9Renderer::GetPresentParams(NiDX9Renderer *this); // idb
void __thiscall NiInputDevice::ControlDesc::ControlDesc(NiInputDevice::ControlDesc *this, unsigned int uiIndex, const char *pacName, NiInputDevice::ControlDesc::Type eType, unsigned int uiFlags); // idb
NiTPointerList<NiInputDevice::ControlDesc *> *__thiscall NiTPointerList<NiInputDevice::ControlDesc *>::`scalar deleting destructor'(NiTPointerList<NiInputDevice::ControlDesc *> *this, unsigned int a2);
NiDI8InputSystem *__thiscall NiDI8InputSystem::`scalar deleting destructor'(NiDI8InputSystem *this, unsigned int a2);
NiInputGamePad *__thiscall NiDI8InputSystem::OpenGamePad(NiDI8InputSystem *this, unsigned int uiPort, unsigned int uiSlot); // idb
// NiInputMouse *__usercall NiDI8InputSystem::OpenMouse@<eax>(NiDI8InputSystem *this@<ecx>, int a2@<edi>);
// NiInputKeyboard *__usercall NiDI8InputSystem::OpenKeyboard@<eax>(NiDI8InputSystem *this@<ecx>, int a2@<edi>);
int __stdcall NiDI8InputSystem::DIEnumDeviceObjectsCallback(DIDEVICEOBJECTINSTANCEA *pkDIDOI, void *pvRef); // idb
NiInputErr __thiscall NiDI8InputSystem::ConfigureDevices(NiDI8InputSystem *this); // idb
void __thiscall NiInputDevice::Description::~Description(NiInputDevice::Description *this); // idb
signed int __thiscall NiDI8InputSystem::EnumerateDeviceControls(NiDI8InputSystem *this, NiDI8InputSystem::DI8Description *pkNiDesc, IDirectInputDevice8A *pkDI8Device);
void __thiscall NiInputDevice::Description::Description(NiInputDevice::Description *this); // idb
NiInputDevice::Description *__thiscall NiInputDevice::Description::`scalar deleting destructor'(NiInputDevice::Description *this, unsigned int a2);
NiDI8InputSystem::DI8Description *__thiscall NiDI8InputSystem::DI8Description::`vector deleting destructor'(NiDI8InputSystem::DI8Description *this, unsigned int a2);
// int __userpurge NiDI8InputSystem::DIEnumDevicesCallback@<eax>(IDirectInputDevice8A *a1@<ecx>, int a2@<edi>, DIDEVICEINSTANCEA *pkDDI, void *pvRef);
bool __thiscall NiDI8InputSystem::AddDefaultActionMappedDevice(NiDI8InputSystem *this, DIDEVICEINSTANCEA *pkDDI, IDirectInputDevice8A *const pkDevice); // idb
int __stdcall NiDI8InputSystem::DIEnumDevicesBySemanticsDefaultCallback(DIDEVICEINSTANCEA *pkDDI, IDirectInputDevice8A *pkDID, unsigned int dwFlags, unsigned int dwRemaining, void *pvRef); // idb
signed int __thiscall NiDI8InputSystem::EnumerateDevices(NiDI8InputSystem *this);
NiDI8InputSystem *__cdecl NiInputSystem::Create(NiInputSystem::CreateParams *pkParams);
NiInputErr __thiscall NiInputGamePad::UpdateDevice(NiInputGamePad *this); // idb
NiDX9DynamicTextureData *Item::GetCurUpGradeLevel();
void __thiscall NiInputGamePad::SetRawAxisValue(NiInputGamePad *this, unsigned int uiAxis, int iValue); // idb
void __thiscall NiInputGamePad::NiInputGamePad(NiInputGamePad *this, NiInputDevice::Description *pkDescription, int iStickRangeLow, int iStickRangeHigh); // idb
NiRTTI *NiInputGamePad::GetRTTI();
void __thiscall NiInputGamePad::~NiInputGamePad(NiInputGamePad *this); // idb
// int __userpurge NiInputGamePad::UpdateActionMappedDevice@<eax>(NiInputGamePad *this@<ecx>, int a2@<ebx>, NiInputSystem *pkInputSystem);
bool __thiscall NiInputGamePad::ButtonIsDown(NiInputGamePad *this, NiInputGamePad::Button eButton); // idb
void __thiscall NiInputGamePad::TouchAllInputValues(NiInputGamePad *this); // idb
char __thiscall NiInputGamePad::IsControlMapped(NiInputGamePad *this, unsigned int uiControl, unsigned int uiSemantic, bool bUseModifiers, unsigned int uiModifiers, bool bUseRange, int iRangeLow, int iRangeHigh);
char __thiscall NiInputGamePad::UpdateMappedButtons(NiInputGamePad *this, NiInputSystem *pkInputSystem);
char __thiscall NiInputGamePad::UpdateMappedSticks(NiInputGamePad *this, NiInputSystem *pkInputSystem);
NiInputGamePad *__thiscall NiInputGamePad::`vector deleting destructor'(NiInputGamePad *this, unsigned int a2);
void __thiscall NiInputGamePad::RecordButtonPress(NiInputGamePad *this, NiInputGamePad::Button eButton, char ucValue); // idb
void __thiscall NiInputGamePad::RecordButtonRelease(NiInputGamePad *this, NiInputGamePad::Button eButton); // idb
NiAction *__thiscall NiActionMap::GetAction(NiActionMap *this, unsigned int uiIndex); // idb
void __cdecl NiActionMap::ReleaseActionPool(); // idb
bool __stdcall NiInputDevice::IsControlMapped(unsigned int uiControl, unsigned int uiSemantic, bool bUseModifiers, unsigned int uiModifiers, bool bUseRange, int iRangeLow, int iRangeHigh);
void __thiscall NiInputDevice::Axis::SetRawValue(NiInputDevice::Axis *this, int iValue, bool bInvert, float fDeadZone); // idb
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiAction *>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiAction *>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiAction *> *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,NiAction *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiAction *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiAction *> *this, unsigned int a2);
void __thiscall NiInputDevice::NiInputDevice(NiInputDevice *this, NiInputDevice::Description *pkDescription); // idb
NiRTTI *NiInputDevice::GetRTTI();
void __thiscall NiInputDevice::~NiInputDevice(NiInputDevice *this); // idb
NiTPointerList<NiAction *> *__thiscall NiTPointerList<NiAction *>::`vector deleting destructor'(NiTPointerList<NiAction *> *this, unsigned int a2);
signed int __thiscall NiInputDevice::ClearMappedActions(NiInputDevice *this);
signed int __thiscall NiInputDevice::Description::AddControlDesc(NiInputDevice::Description *this, NiInputDevice::ControlDesc *pkDesc);
NiInputDevice *__thiscall NiInputDevice::`scalar deleting destructor'(NiInputDevice *this, unsigned int a2);
bool __thiscall NiInputDevice::CheckActionDeviceIDAndModifiers(NiInputDevice *this, NiAction *pkAction, unsigned int uiModifiers); // idb
signed int __thiscall NiInputDevice::AddMappedAction(NiInputDevice *this, NiAction *pkAction);
NiInputErr __thiscall NiInputDI8Mouse::HandleRemoval(NiInputDI8Mouse *this); // idb
NiInputErr __thiscall NiInputDI8Mouse::HandleInsertion(NiInputDI8Mouse *this); // idb
NiRTTI *NiInputDI8Mouse::GetRTTI();
void __thiscall NiInputDI8Mouse::NiInputDI8Mouse(NiInputDI8Mouse *this, NiInputDevice::Description *pkDescription, IDirectInputDevice8A *pkDIDevice, unsigned int uiUsage); // idb
NiInputDI8Mouse *__thiscall NiInputDI8Mouse::`scalar deleting destructor'(NiInputDI8Mouse *this, unsigned int a2);
void __thiscall NiInputDI8Mouse::UpdateImmediateData(NiInputDI8Mouse *this, unsigned int dwData, unsigned int uiBtnOffset); // idb
signed int __thiscall NiInputDI8Mouse::UpdateDevice(NiInputDI8Mouse *this);
NiInputErr __thiscall NiInputDI8Keyboard::HandleRemoval(NiInputDI8Keyboard *this); // idb
NiInputErr __thiscall NiInputDI8Keyboard::HandleInsertion(NiInputDI8Keyboard *this); // idb
void __thiscall NiInputDI8Keyboard::FillMapping(NiInputDI8Keyboard *this); // idb
signed int __stdcall NiInputKeyboard::GetKeyModifierValue(NiInputKeyboard::KeyCode eKey);
NiRTTI *NiInputDI8Keyboard::GetRTTI();
void __thiscall NiInputDI8Keyboard::NiInputDI8Keyboard(NiInputDI8Keyboard *this, NiInputDevice::Description *pkDescription, IDirectInputDevice8A *pkDIDevice, unsigned int uiUsage); // idb
NiInputDI8Keyboard *__thiscall NiInputDI8Keyboard::`vector deleting destructor'(NiInputDI8Keyboard *this, unsigned int a2);
NiInputErr __thiscall NiInputDI8Keyboard::UpdateDevice(NiInputDI8Keyboard *this); // idb
NiInputErr __thiscall NiInputDI8GamePad::HandleRemoval(NiInputDI8GamePad *this); // idb
NiInputErr __thiscall NiInputDI8GamePad::HandleInsertion(NiInputDI8GamePad *this); // idb
void __thiscall NiInputDI8GamePad::UpdateImmediateData(NiInputDI8GamePad *this, unsigned int uiAppData, unsigned int dwData); // idb
NiRTTI *NiInputDI8GamePad::GetRTTI();
void __stdcall NiInputDI8GamePad::GetRumbleValue(unsigned int uiMotor, unsigned int *uiValue);
void __thiscall NiInputDI8GamePad::NiInputDI8GamePad(NiInputDI8GamePad *this, NiInputDevice::Description *pkDescription, IDirectInputDevice8A *pkDIDevice, int iStickRangeLow, int iStickRangeHigh); // idb
NiInputDI8GamePad *__thiscall NiInputDI8GamePad::`vector deleting destructor'(NiInputDI8GamePad *this, unsigned int a2);
signed int __thiscall NiInputDI8GamePad::UpdateDevice(NiInputDI8GamePad *this);
void __thiscall NiInputMouse::NiInputMouse(NiInputMouse *this, NiInputDevice::Description *pkDescription); // idb
NiRTTI *NiInputMouse::GetRTTI();
void __thiscall NiInputMouse::~NiInputMouse(NiInputMouse *this); // idb
// int __userpurge NiInputMouse::UpdateActionMappedDevice@<eax>(NiInputMouse *this@<ecx>, int a2@<ebx>, NiInputSystem *pkInputSystem);
void __thiscall NiInputMouse::TouchAllInputValues(NiInputMouse *this); // idb
char __thiscall NiInputMouse::IsControlMapped(NiInputMouse *this, unsigned int uiControl, unsigned int uiSemantic, bool bUseModifiers, unsigned int uiModifiers, bool bUseRange, int iRangeLow, int iRangeHigh);
char __thiscall NiInputMouse::UpdateMappedButtons(NiInputMouse *this, NiInputSystem *pkInputSystem);
char __thiscall NiInputMouse::UpdateMappedSticks(NiInputMouse *this, NiInputSystem *pkInputSystem);
NiInputMouse *__thiscall NiInputMouse::`scalar deleting destructor'(NiInputMouse *this, unsigned int a2);
void __thiscall NiInputKeyboard::NiInputKeyboard(NiInputKeyboard *this, NiInputDevice::Description *pkDescription); // idb
void __thiscall NiInputKeyboard::~NiInputKeyboard(NiInputKeyboard *this); // idb
NiInputErr __thiscall NiInputKeyboard::UpdateDevice(NiInputKeyboard *this); // idb
NiRTTI *NiInputKeyboard::GetRTTI();
NiInputKeyboard *__thiscall NiInputKeyboard::`vector deleting destructor'(NiInputKeyboard *this, unsigned int a2);
int __thiscall NiInputKeyboard::UpdateActionMappedDevice(NiInputKeyboard *this, NiInputSystem *pkInputSystem);
void __thiscall NiInputKeyboard::TouchAllInputValues(NiInputKeyboard *this); // idb
char __thiscall NiInputKeyboard::IsControlMapped(NiInputKeyboard *this, unsigned int uiControl, unsigned int uiSemantic, bool bUseModifiers, unsigned int uiModifiers, bool bUseRange, int iRangeLow, int iRangeHigh);
void __cdecl NiOptimizeABV::CreateWireABV(NiAVObject *pkObject, NiColor *kColor, float fMult, const char *pcName, bool bCreateOBB); // idb
void __thiscall NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *this, NiD3DXEffectParameter *const *element); // idb
BOOL __cdecl NSBShaderLib_LoadShaderLibrary(NiRenderer *pkRenderer, int iDirectoryCount, char **pszDirectories, bool bRecurseSubFolders, NiShaderLibrary **ppkLibrary);
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader> > *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader> > *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader> > *this, unsigned int a2);
void __thiscall NSBShaderLibrary::~NSBShaderLibrary(NSBShaderLibrary *this); // idb
NSBShader *__thiscall NSBShaderLibrary::GetNSBShader(NSBShaderLibrary *this, const char *pacName); // idb
NSBShaderLibrary *__thiscall NSBShaderLibrary::`vector deleting destructor'(NSBShaderLibrary *this, unsigned int a2);
NiTPointerList<NiPointer<NSBShader> > *__thiscall NiTPointerList<NiPointer<NSBShader>>::`scalar deleting destructor'(NiTPointerList<NiPointer<NSBShader> > *this, unsigned int a2);
NiBinaryShader *__thiscall NSBShaderLibrary::GetShader(NSBShaderLibrary *this, NiRenderer *pkRenderer, const char *pacName, unsigned int uiImplementation);
char __thiscall NSBShaderLibrary::InsertNSBShaderIntoList(NSBShaderLibrary *this, NSBShader *pkNSBShader);
NSBShaderLibrary *__cdecl NSBShaderLibrary::Create(int iDirectoryCount, char **pacDirectories, bool bRecurseSubFolders); // idb
void __cdecl NSBShaderLibSDM::Init(); // idb
void __cdecl NSBShaderLibSDM::Shutdown(); // idb
void NSBShaderLibSDM::NSBShaderLibSDM();
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,char *>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,char *>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,char *> *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,char *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,char *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,char *> *this, unsigned int a2);
NiTPointerList<char *> *__thiscall NiTPointerList<char *>::`vector deleting destructor'(NiTPointerList<char *> *this, unsigned int a2);
char __thiscall NSBLoader::LoadAllNSBFiles(NSBLoader *this, NSBShaderLibrary *pkLibrary);
void __stdcall NiTPointerMap<char const *,NiObject * (__cdecl *)(void)>::DeleteItem(NiTMapItem<unsigned int,NiVBSet *> *pkItem);
void __cdecl NSBLoader::Destroy(); // idb
void __thiscall NSBLoader::NSBLoader(NiD3DXEffectLoader *this); // idb
void __cdecl NSBLoader::Create();
unsigned int __thiscall NSFLoader::LoadAllNSFFilesInDirectory(NSFLoader *this, const char *pszDirectory, const char *pszExt, bool bRecurseDirectories, NiTPointerList<char *> *pkFileList); // idb
bool __thiscall NSBLoader::LoadAllNSBFiles(NSBLoader *this, NSBShaderLibrary *pkLibrary, const char *pszDirectory, bool bRecurseSubDirs); // idb
void __cdecl NSFParserLib_RunShaderParser(const char *pszDirectory, bool bRecurseSubFolders);
void __thiscall NSBLoader::~NSBLoader(NiD3DXEffectLoader *this); // idb
char __stdcall NSFLoader::ProcessNSFFile(const char *pcFilename, const char *pcExt, NiTPointerList<char *> *pkFileList);
unsigned int __thiscall NSFLoader::LoadAllNSFTextFiles(NSFLoader *this); // idb
void __cdecl NSFLoader::Create();
void __cdecl NSFLoader::Destroy(); // idb
unsigned int __thiscall NSFLoader::ParseAllNSFFiles(NSFLoader *this, const char *pszDirectory, bool bRecurseSubDirs); // idb
void __thiscall NSFParsedShader::NSFParsedShader(NSFParsedShader *this); // idb
void __thiscall NSFParsedShader::~NSFParsedShader(NSFParsedShader *this); // idb
NSBShader *__thiscall NSFParsedShader::GetShader(NSFParsedShader *this); // idb
NiShaderAttributeDesc::AttributeType __cdecl NiD3DShaderConstantMapEntry::GetAttributeType(unsigned int uiFlags); // idb
// void __usercall yy_stack_print(__int16 *bottom@<eax>, __int16 *top@<edi>);
// void __usercall yy_reduce_print(int yyrule@<edi>);
void __cdecl ResetParser(); // idb
void __cdecl CleanupParser(); // idb
char *__cdecl DecodeAttribTypeString(char *pszAttribType);
signed int __cdecl DecodePlatformString(char *pszPlatform);
signed int __cdecl DetermineResultMultiply(NiShaderAttributeDesc::AttributeType eType1, NiShaderAttributeDesc::AttributeType eType2);
signed int __cdecl DetermineResultDivide(NiShaderAttributeDesc::AttributeType eType1, NiShaderAttributeDesc::AttributeType eType2);
signed int __cdecl DetermineResultAdd(NiShaderAttributeDesc::AttributeType eType1, NiShaderAttributeDesc::AttributeType eType2);
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *> *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *> *this, unsigned int a2);
NiShaderAttributeDesc::AttributeType __thiscall NiD3DShaderConstantMapEntry::GetAttributeType(NiD3DShaderConstantMapEntry *this); // idb
bool __cdecl NiD3DShaderConstantMapEntry::IsBool(unsigned int uiFlags); // idb
bool __cdecl NiD3DShaderConstantMapEntry::IsString(unsigned int uiFlags); // idb
bool __cdecl NiD3DShaderConstantMapEntry::IsUnsignedInt(unsigned int uiFlags); // idb
bool __cdecl NiD3DShaderConstantMapEntry::IsFloat(unsigned int uiFlags); // idb
bool __cdecl NiD3DShaderConstantMapEntry::IsPoint2(unsigned int uiFlags); // idb
bool __cdecl NiD3DShaderConstantMapEntry::IsPoint3(unsigned int uiFlags); // idb
bool __cdecl NiD3DShaderConstantMapEntry::IsPoint4(unsigned int uiFlags); // idb
bool __cdecl NiD3DShaderConstantMapEntry::IsMatrix3(unsigned int uiFlags); // idb
bool __cdecl NiD3DShaderConstantMapEntry::IsMatrix4(unsigned int uiFlags); // idb
bool __cdecl NiD3DShaderConstantMapEntry::IsColor(unsigned int uiFlags); // idb
bool __cdecl NiD3DShaderConstantMapEntry::IsTexture(unsigned int uiFlags); // idb
char __cdecl AddGlobalAttributeToConstantMap(char *pszName, unsigned int uiRegisterStart, unsigned int uiRegisterCount);
signed int __cdecl DetermineOperatorResult(int iOperation, NiShaderAttributeDesc::AttributeType eType1, NiShaderAttributeDesc::AttributeType eType2);
NiTPointerList<NSFParsedShader *> *__thiscall NiTPointerList<NSFParsedShader *>::`scalar deleting destructor'(NiTPointerList<NSFParsedShader *> *this, unsigned int a2);
char __cdecl SetupOperatorEntry(char *pszName, int iRegStart, int iRegCount, char *pszEntry1, int iOperation, char *pszEntry2, bool bInverse, bool bTranspose);
int __cdecl NSFParserparse(); // idb
int __cdecl ParseShader(const char *pszFileName); // idb
// void __thiscall NSFTextFile::NSFTextFile(NSFTextFile *this); idb
void __thiscall NSFTextFile::~NSFTextFile(NSFTextFile *this); // idb
int __thiscall NSFTextFile::Load(NSFTextFile *this, const char *pszFilename); // idb
void __cdecl NSFParserResetLineNumber(); // idb
int __cdecl NSFParserGetLineNumber(); // idb
void __cdecl NSFParsererror(char *s); // idb
int __cdecl yy_get_previous_state(); // idb
// int __usercall yy_try_NUL_trans@<eax>(int yy_current_state@<eax>); idb
void __cdecl NSFParser_flush_buffer(yy_buffer_state *b); // idb
// void __usercall __noreturn yy_fatal_error(const char *msg@<eax>);
void __cdecl skip1(); // idb
unsigned int __cdecl HexConvert(char *buf); // idb
void __cdecl NSFParserReleaseBuffer(); // idb
yy_buffer_state *__cdecl NSFParser_create_buffer(_iobuf *file, int size); // idb
void __cdecl NSFParserrestart(_iobuf *input_file); // idb
void __cdecl NSFParserReset(); // idb
int __cdecl yy_get_next_buffer(); // idb
int __cdecl NSFParserlex(); // idb
bool __cdecl NiD3DXEffectShaderLib_LoadShaderLibrary(NiRenderer *pkRenderer, int iDirectoryCount, char **apcDirectories, bool bRecurseSubFolders, NiShaderLibrary **ppkLibrary); // idb
void __thiscall NiD3DXEffectShaderLibrary::SetShaderLibraryDesc(NiD3DXEffectShaderLibrary *this, NiShaderLibraryDesc *pkDesc); // idb
void __thiscall NiD3DXEffectShaderLibrary::SetRenderer(NiD3DXEffectShaderLibrary *this, NiDX9Renderer *pkRenderer); // idb
void __stdcall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiD3DPixelShader *>::SetValue(NiTMapItem<unsigned int,NiVBSet *> *pkItem, unsigned int key, NiVBSet *val);
NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectFile *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectFile *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectFile *> *this, unsigned int a2);
NiD3DDefaultShader *__thiscall NiD3DXEffectShaderLibrary::GetShader(NiD3DXEffectShaderLibrary *this, NiRenderer *pkRenderer, const char *pcName, unsigned int uiImplementation);
NiD3DXEffectFile *__thiscall NiD3DXEffectShaderLibrary::GetD3DXEffectFile(NiD3DXEffectShaderLibrary *this, const char *pcName); // idb
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectFile *>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectFile *>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectFile *> *this); // idb
void __thiscall NiTStringTemplateMap<NiTMap<char const *,NiD3DXEffectFile *>,NiD3DXEffectFile *>::~NiTStringTemplateMap<NiTMap<char const *,NiD3DXEffectFile *>,NiD3DXEffectFile *>(NiTStringTemplateMap<NiTMap<char const *,NiD3DXEffectFile *>,NiD3DXEffectFile *> *this); // idb
NiTPointerList<NiD3DXEffectFile *> *__thiscall NiTPointerList<NiD3DXEffectFile *>::`vector deleting destructor'(NiTPointerList<NiD3DXEffectFile *> *this, unsigned int a2);
NiTMapBase<DFALL<NiD3DXEffectFile *>,char const *,NiD3DXEffectFile *> *__thiscall NiTMapBase<DFALL<NiD3DXEffectFile *>,char const *,NiD3DXEffectFile *>::`vector deleting destructor'(NiTMapBase<DFALL<NiD3DXEffectFile *>,char const *,NiD3DXEffectFile *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTMap<char const *,NiD3DXEffectFile *>::`vector deleting destructor'(NiTMap<char const *,NiD3DXEffectFile *> *this, unsigned int a2);
void __thiscall NiD3DXEffectShaderLibrary::~NiD3DXEffectShaderLibrary(NiD3DXEffectShaderLibrary *this); // idb
// char __userpurge NiD3DXEffectShaderLibrary::InsertD3DXEffectFileIntoList@<al>(NiD3DXEffectShaderLibrary *this@<ecx>, int a2@<esi>, NiD3DXEffectFile *pkD3DXEffectFile);
NiD3DXEffectShaderLibrary *__thiscall NiD3DXEffectShaderLibrary::`vector deleting destructor'(NiD3DXEffectShaderLibrary *this, unsigned int a2);
NiTStringMap<NiD3DXEffectFile *> *__thiscall NiTStringMap<NiD3DXEffectFile *>::`scalar deleting destructor'(NiTStringMap<NiD3DXEffectFile *> *this, unsigned int a2);
void __thiscall NiD3DXEffectShaderLibrary::NiD3DXEffectShaderLibrary(NiD3DXEffectShaderLibrary *this); // idb
HINSTANCE__ *__cdecl NiD3DXEffectShaderLibrary::Create(NiDX9Renderer *pkD3DRenderer, int iDirectoryCount, char **apcDirectories, bool bRecurseSubFolders);
HINSTANCE__ *__cdecl NiD3DXEffectFactory::GetApplicationInstance(); // idb
NiD3DXEffectFile *__thiscall NiD3DXEffectFactory::GetD3DXEffectFile(NiD3DXEffectFactory *this, const char *pcShaderName); // idb
void __thiscall NiD3DXEffectFactory::InsertD3DXEffectFileIntoMap(NiD3DXEffectFactory *this, NiD3DXEffectFile *pkD3DXEffectFile); // idb
void __thiscall NiD3DXEffectFactory::RemoveD3DXEffectFileFromMap(NiD3DXEffectFactory *this, const char *pcName); // idb
char __cdecl NiD3DXEffectFactory::ResolveD3DXEffectFileName(const char *pcOriginalName, char *pcTrueName, unsigned int uiBufferSize);
void __thiscall NiD3DXEffectFactory::HandleLostDevice(NiD3DXEffectFactory *this, unsigned int uiCounter); // idb
void __thiscall NiD3DXEffectFactory::HandleResetDevice(NiD3DXEffectFactory *this, unsigned int uiCounter); // idb
void __thiscall NiD3DXEffectFactory::DestroyRendererData(NiD3DXEffectFactory *this); // idb
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiD3DXEffectFile *>,NiD3DXEffectFile *>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiD3DXEffectFile *>,NiD3DXEffectFile *>(NiTStringTemplateMap<NiTPointerMap<char const *,NiD3DXEffectFile *>,NiD3DXEffectFile *> *this); // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiD3DXEffectFile *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiD3DXEffectFile *>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiD3DXEffectFile *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<char const *,NiD3DXEffectFile *>::`vector deleting destructor'(NiTPointerMap<char const *,NiD3DXEffectFile *> *this, unsigned int a2);
char __stdcall NiD3DXEffectFactory::LoadD3DXEffectFromFile(const char *pcFileName, NiD3DXEffectFile **pkD3DXEffectFile);
NiTMapItem<unsigned int,NiVBSet *> *NiTPointerMap<enum  _D3DFORMAT,NiDX9DeviceDesc::DisplayFormatInfo::RenderTargetInfo *>::NewItem();
void __cdecl NiD3DXEffectFactory::SetD3DRenderer(NiDX9Renderer *pkD3DRenderer); // idb
NiD3DXEffectFactory *__thiscall NiD3DXEffectFactory::`scalar deleting destructor'(NiD3DXEffectFactory *this, unsigned int a2);
void __cdecl NiD3DXEffectFactory::_SDMShutdown(); // idb
NiTStringPointerMap<NiD3DXEffectFile *> *__thiscall NiTStringPointerMap<NiD3DXEffectFile *>::`vector deleting destructor'(NiTStringPointerMap<NiD3DXEffectFile *> *this, unsigned int a2);
void __thiscall NiD3DXEffectFactory::NiD3DXEffectFactory(NiD3DXEffectFactory *this); // idb
void __cdecl NiD3DXEffectFactory::GetInstance(bool bCreateNew);
NiD3DXEffectFile *__cdecl NiD3DXEffectFactory::CreateD3DXEffectFromFile(const char *pcFileName); // idb
void __thiscall NSBImplementation::SetName(NiD3DXEffectFile *this, const char *pcName); // idb
void __thiscall NiD3DXEffectFile::HandleLostDevice(NiD3DXEffectFile *this); // idb
void __thiscall NiD3DXEffectFile::HandleResetDevice(NiD3DXEffectFile *this); // idb
char *__thiscall NiD3DXEffectTechnique::GetTechniqueName(NiD3DXEffectTechnique *this);
NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *this, unsigned int a2);
void __thiscall NiTMapBase<DFALL<NiPointer<NiD3DXEffectTechniqueSet>>,char const *,NiPointer<NiD3DXEffectTechniqueSet>>::GetNext(NiTMapBase<NiTPointerAllocator<unsigned int>,HWND__ *,NiPointer<NiRenderTargetGroup> > *this, void **pos, HWND__ **key, NiPointer<NiRenderTargetGroup> *val); // idb
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *this); // idb
void __stdcall NiTMapBase<DFALL<NiPointer<NiD3DXEffectTechniqueSet>>,char const *,NiPointer<NiD3DXEffectTechniqueSet>>::SetValue(NiTMapItem<HWND__ *,NiPointer<NiRenderTargetGroup> > *pkItem, HWND__ *key, NiPointer<NiRenderTargetGroup> val);
void __thiscall NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiD3DXEffectTechniqueSet>>,NiPointer<NiD3DXEffectTechniqueSet>>::~NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiD3DXEffectTechniqueSet>>,NiPointer<NiD3DXEffectTechniqueSet>>(NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiD3DXEffectTechniqueSet> >,NiPointer<NiD3DXEffectTechniqueSet> > *this); // idb
NiTPointerList<NiD3DXEffectParameter *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *>::`vector deleting destructor'(NiTPointerList<NiD3DXEffectParameter *> *this, unsigned int a2);
NiTMapBase<DFALL<NiPointer<NiD3DXEffectTechniqueSet> >,char const *,NiPointer<NiD3DXEffectTechniqueSet> > *__thiscall NiTMapBase<DFALL<NiPointer<NiD3DXEffectTechniqueSet>>,char const *,NiPointer<NiD3DXEffectTechniqueSet>>::`vector deleting destructor'(NiTMapBase<DFALL<NiPointer<NiD3DXEffectTechniqueSet> >,char const *,NiPointer<NiD3DXEffectTechniqueSet> > *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTMap<char const *,NiPointer<NiD3DXEffectTechniqueSet>>::`scalar deleting destructor'(NiTMap<char const *,NiPointer<NiD3DXEffectTechniqueSet> > *this, unsigned int a2);
NiD3DXEffectTechnique *__thiscall NiD3DXEffectFile::GetNextTechnique(NiD3DXEffectFile *this); // idb
NiD3DXEffectTechnique *__thiscall NiD3DXEffectFile::GetTechnique(NiD3DXEffectFile *this, const char *pcName, unsigned int uiImplementation); // idb
NiShaderDesc *__thiscall NiD3DXEffectFile::GetNextShaderDesc(NiD3DXEffectFile *this); // idb
void __thiscall NiD3DXEffectFile::DestroyRendererData(NiD3DXEffectFile *this); // idb
// char __usercall NiD3DXEffectFile::LinkHandles@<al>(NiD3DXEffectFile *this@<ecx>, int a2@<edi>);
void __thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSequence>>::SetAt(NiTMapBase<NiTPointerAllocator<unsigned int>,HWND__ *,NiPointer<NiRenderTargetGroup> > *this, HWND__ *key, NiPointer<NiRenderTargetGroup> val); // idb
NiD3DXEffectTechnique *__thiscall NiD3DXEffectFile::GetFirstTechnique(NiD3DXEffectFile *this); // idb
NiShaderDesc *__thiscall NiD3DXEffectFile::GetFirstShaderDesc(NiD3DXEffectFile *this); // idb
// void __userpurge NiD3DXEffectFile::LoadEffect(NiD3DXEffectFile *this@<ecx>, int a2@<edi>, NiDX9Renderer *pkRenderer);
void __thiscall NiD3DXEffectFile::AddTechnique(NiD3DXEffectFile *this, NiD3DXEffectTechnique *pkTechnique, IDirect3DDevice9 *pkD3DDevice); // idb
NiD3DDefaultShader *__thiscall NiD3DXEffectFile::GetD3DShader(NiD3DXEffectFile *this, NiDX9Renderer *pkRenderer, const char *pcName, unsigned int uiImplementation);
char __thiscall NiD3DXEffectFile::ParseEffect(NiD3DXEffectFile *this, IDirect3DDevice9 *pkD3DDevice);
NiTStringMap<NiPointer<NiD3DXEffectTechniqueSet> > *__thiscall NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiD3DXEffectTechniqueSet>>,NiPointer<NiD3DXEffectTechniqueSet>>::`scalar deleting destructor'(NiTStringMap<NiPointer<NiD3DXEffectTechniqueSet> > *this, unsigned int a2);
void __thiscall NiD3DXEffectFile::NiD3DXEffectFile(NiD3DXEffectFile *this); // idb
void __thiscall NiD3DXEffectFile::~NiD3DXEffectFile(NiD3DXEffectFile *this); // idb
char __thiscall NiD3DXEffectFile::Initialize(NiD3DXEffectFile *this, ID3DXBaseEffect *pkD3DXEffect, IDirect3DDevice9 *pkD3DDevice);
// ID3DXEffectCompiler *__usercall NiD3DXEffectLoader::CreateEffectCompilerFromFile@<eax>(int a1@<edi>, const char *pcShaderPath, unsigned int uiCreationFlags, char **pcError);
char __thiscall NiD3DXEffectLoader::LoadAllD3DXEffectFiles(NiD3DXEffectLoader *this, NiD3DXEffectShaderLibrary *pkLibrary);
// void *__usercall NiD3DXEffectLoader::CreateEffectFromFile@<eax>(ID3DXEffect *a1@<ecx>, int a2@<edi>, void *pvD3DDevice, const char *pcShaderPath, unsigned int uiCreationFlags, char **pcError);
void __cdecl NiD3DXEffectLoader::Create();
void __cdecl NiD3DXEffectLoader::Destroy(); // idb
unsigned int __thiscall NiD3DXEffectLoader::FindAllD3DXEffectFilesInDirectory(NiD3DXEffectLoader *this, const char *pcDirectory, const char *pcExt, bool bRecurseDirectories, NiTPointerList<char *> *pkFileList); // idb
bool __thiscall NiD3DXEffectLoader::LoadAllD3DXEffectFiles(NiD3DXEffectLoader *this, NiD3DXEffectShaderLibrary *pkLibrary, const char *pcDirectory, bool bRecurseSubDirs); // idb
void __thiscall NiD3DXEffectParameter::NiD3DXEffectParameter(NiD3DXEffectParameter *this); // idb
bool __thiscall NiD3DXEffectParameter::Initialize(NiD3DXEffectParameter *this, NiD3DXEffectParameterDesc *pkParamDesc, NiD3DXEffectAttributeTable *pkAttribTable); // idb
void __thiscall NiD3DXEffectParameter::LinkHandle(NiD3DXEffectParameter *this, ID3DXEffect *pkEffect); // idb
void __thiscall NiD3DXEffectParameter::DestroyRendererData(NiD3DXEffectParameter *this); // idb
void __cdecl NiD3DXEffectParameter::ReleaseBoneArray(); // idb
NiColor *__thiscall NiColor::operator*(NiColor *this, NiColor *result, float fScalar); // idb
void __thiscall NiD3DXEffectParameter::~NiD3DXEffectParameter(NiD3DXEffectParameter *this); // idb
// signed int __userpurge NiD3DXEffectParameter::FillObjectConstantValue@<eax>(NiD3DXEffectParameter *this@<ecx>, int a2@<ebp>, ID3DXEffect *pkD3DXEffect, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound, unsigned int uiPass);
void __thiscall NiD3DXEffectParameter::Construct2DTexture(NiD3DXEffectParameter *this); // idb
void __thiscall NiD3DXEffectParameter::Construct3DTexture(NiD3DXEffectParameter *this); // idb
void __thiscall NiD3DXEffectParameter::ConstructCubeTexture(NiD3DXEffectParameter *this); // idb
// char __userpurge NiD3DXEffectParameter::FillPredefinedConstantValue@<al>(NiD3DXEffectParameter *this@<ecx>, int a2@<ebp>, ID3DXEffect *pkEffect, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound, unsigned int uiPass);
// IDirect3DBaseTexture9 *__userpurge NiD3DXEffectParameter::GetNiTexture@<eax>(NiD3DXEffectParameter *this@<ecx>, int a2@<esi>, NiTexturingProperty *pkTexProp, unsigned int uiTextureFlags);
signed int __thiscall NiD3DXEffectParameter::SetParameter(NiD3DXEffectParameter *this, ID3DXEffect *pkEffect, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound, unsigned int uiPass);
void __thiscall NSBShader::SetName(NiD3DXEffectTechniqueSet *this, const char *pcName); // idb
NiD3DDefaultShader *__thiscall NiD3DXEffectTechniqueSet::GetBestD3DShader(NiD3DXEffectTechniqueSet *this, NiDX9Renderer *pkRenderer);
void __thiscall NiD3DXEffectTechniqueSet::DestroyRendererData(NiD3DXEffectTechniqueSet *this); // idb
NiShaderDesc *__thiscall NiD3DXEffectTechniqueSet::GetShaderDesc(NiD3DXEffectTechniqueSet *this, NiD3DXEffectAttributeTable *pkAttribTable); // idb
NiD3DDefaultShader *__thiscall NiD3DXEffectTechniqueSet::GetD3DShader(NiD3DXEffectTechniqueSet *this, NiDX9Renderer *pkRenderer, unsigned int uiImplementation);
void __thiscall NiTArray<NiPointer<NiD3DXEffectTechnique>>::~NiTArray<NiPointer<NiD3DXEffectTechnique>>(NiTArray<NiPointer<NiD3DXEffectTechnique> > *this); // idb
NiTArray<NiPointer<NiD3DXEffectTechnique> > *__thiscall NiTArray<NiPointer<NiD3DXEffectTechnique>>::`scalar deleting destructor'(NiTArray<NiPointer<NiD3DXEffectTechnique> > *this, unsigned int a2);
void __thiscall NiD3DXEffectTechniqueSet::NiD3DXEffectTechniqueSet(NiD3DXEffectTechniqueSet *this); // idb
void __thiscall NiD3DXEffectTechniqueSet::~NiD3DXEffectTechniqueSet(NiD3DXEffectTechniqueSet *this); // idb
NiD3DXEffectTechniqueSet *__thiscall NiD3DXEffectTechniqueSet::`vector deleting destructor'(NiD3DXEffectTechniqueSet *this, unsigned int a2);
void __thiscall NiD3DXEffectTechniqueSet::AddImplementation(NiD3DXEffectTechniqueSet *this, NiD3DXEffectTechnique *pkTechnique); // idb
void __thiscall NiD3DXEffectTechnique::Initialize(NiD3DXEffectTechnique *this, NiD3DXEffectTechniqueDesc *pkTechDesc); // idb
char __thiscall NiD3DXEffectTechnique::GetVSPresentAllPasses(NiD3DXEffectTechnique *this);
char __thiscall NiD3DXEffectTechnique::GetVSPresentAnyPass(NiD3DXEffectTechnique *this);
char __thiscall NiD3DXEffectTechnique::GetPSPresentAllPasses(NiD3DXEffectTechnique *this);
char __thiscall NiD3DXEffectTechnique::GetPSPresentAnyPass(NiD3DXEffectTechnique *this);
bool __thiscall NiD3DXEffectTechnique::VertexShaderPresent(NiD3DXEffectTechnique *this, unsigned int uiPass); // idb
void __thiscall NiD3DXEffectTechnique::LinkHandle(NiD3DXEffectTechnique *this, ID3DXEffect *pkEffect); // idb
NiShaderRequirementDesc *__thiscall NiD3DXEffectTechnique::GetRequirements(NiD3DXEffectTechnique *this); // idb
void __thiscall NiD3DXEffectTechnique::DestroyRendererData(NiD3DXEffectTechnique *this); // idb
NiD3DXEffectParameter *__thiscall NiD3DXEffectTechnique::GetNextParameter(NiD3DXEffectTechnique *this); // idb
void __thiscall NiD3DXEffectTechnique::~NiD3DXEffectTechnique(NiD3DXEffectTechnique *this); // idb
NiD3DDefaultShader *__thiscall NiD3DXEffectTechnique::GetD3DShader(NiD3DXEffectTechnique *this, NiDX9Renderer *pkRenderer);
void __thiscall NiD3DXEffectTechnique::AddParameter(NiD3DXEffectTechnique *this, NiD3DXEffectParameter *pkParam); // idb
NiTListItem<NiD3DXEffectParameter *> *__thiscall NiD3DXEffectTechnique::GetFirstParameter(NiD3DXEffectTechnique *this);
void __thiscall NiD3DXEffectTechnique::NiD3DXEffectTechnique(NiD3DXEffectTechnique *this); // idb
NiD3DXEffectTechnique *__thiscall NiD3DXEffectTechnique::`vector deleting destructor'(NiD3DXEffectTechnique *this, unsigned int a2);
char __cdecl NiD3DXEffectParser::GetParametersAndTechniques(void *pkEffect, unsigned int *uiNumParameters, unsigned int *uiNumTechniques);
char __cdecl NiD3DXEffectParser::IsParameterUsed(void *pvD3DXEffect, const char *pcParamName, const char *pcTechName);
void __cdecl NiD3DXEffectParser::ResetIndices(); // idb
void __cdecl NiD3DXEffectParser::ParseMatrixAnnotations(void *pvD3DXEffect, void *pvParamDesc, void *pvParamHandle, NiD3DXEffectParameterMatrixDesc *pkDesc); // idb
void __cdecl NiD3DXEffectParser::ParseArrayAnnotations(void *pvD3DXEffect, void *pvParamDesc, void *pvParamHandle, NiD3DXEffectParameterArrayDesc *pkDesc); // idb
void __cdecl NiD3DXEffectParser::ParseFloatAnnotations(void *pvD3DXEffect, void *pvParamDesc, void *pvParamHandle, NiD3DXEffectParameterFloatDesc *pkDesc); // idb
void __cdecl NiD3DXEffectParser::ParseBooleanAnnotations(void *pvD3DXEffect, void *pvParamDesc, void *pvParamHandle, NiD3DXEffectParameterBooleanDesc *pkDesc); // idb
void __cdecl NiD3DXEffectParser::ParseIntegerAnnotations(void *pvD3DXEffect, void *pvParamDesc, void *pvParamHandle, NiD3DXEffectParameterIntegerDesc *pkDesc); // idb
void __cdecl NiD3DXEffectParser::ParsePredefinedAnnotations(void *pvD3DXEffect, void *pvParamDesc, void *pvParamHandle, NiD3DXEffectParameterPredefinedDesc *pkDesc); // idb
void __cdecl NiD3DXEffectParser::ParseTechniqueAnnotations(void *pvD3DXEffect, void *pvTechDesc, void *pvTechHandle, NiD3DXEffectTechniqueDesc *pkDesc); // idb
const char *__cdecl NiD3DXEffectParser::LookupObjectAnnotation(void *pvD3DXEffect, void *pvParamHandle, void *pvParamDesc, const char *pcAnnotation); // idb
signed int __cdecl NiD3DXEffectParser::DetermineObjectType(const char *pcObjectValue, unsigned int *uiObjectIndex, bool bFoundObjectIndex);
char __cdecl NiD3DXEffectParser::VerifyAndAdjustMapping(void *pvD3DXEffect, void *pvParamHandle, void *pvParamDesc, unsigned int uiObjectType, unsigned int *uiMapping);
NiD3DXEffectTechniqueDesc *__cdecl NiD3DXEffectParser::GetTechniqueDesc(void *pvD3DXEffect, void *pvTechHandle); // idb
void __cdecl NiD3DXEffectParser::ParseVectorAnnotations(void *pvD3DXEffect, void *pvParamDesc, void *pvParamHandle, NiD3DXEffectParameterVectorDesc *pkDesc); // idb
void __cdecl NiD3DXEffectParser::ParseTextureAnnotations(void *pvD3DXEffect, void *pvParamDesc, void *pvParamHandle, NiD3DXEffectParameterTextureDesc *pkDesc); // idb
NiD3DXEffectParameterPredefinedDesc *__cdecl NiD3DXEffectParser::QueryPredefined(const char *pcSemantic, bool bColumnMatrix, unsigned int uiArrayElements);
NiD3DXEffectParameterObjectDesc *__cdecl NiD3DXEffectParser::QueryObject(void *pvD3DXEffect, void *pvParamHandle, void *pvParamDesc, const char *pcSemantic);
NiD3DXEffectTechniqueDesc *__cdecl NiD3DXEffectParser::GetTechnique(void *pkEffect, unsigned int uiIndex); // idb
NiD3DXEffectParameterTextureDesc *__cdecl NiD3DXEffectParser::GetParameterDesc(void *pvD3DXEffect, void *pvParamHandle);
NiD3DXEffectParameterTextureDesc *__cdecl NiD3DXEffectParser::GetParameter(void *pkEffect, unsigned int uiIndex);
NiTListBase<NiTPointerAllocator<unsigned int>,NiShaderAttributeDesc *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiShaderAttributeDesc *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiShaderAttributeDesc *> *this, unsigned int a2);
NiShaderAttributeDesc *__thiscall NSBAttributeTable::GetFirstAttribute(NiD3DXEffectAttributeTable *this); // idb
NiShaderAttributeDesc *__thiscall NSBAttributeTable::GetNextAttribute(NiD3DXEffectAttributeTable *this); // idb
NiShaderAttributeDesc *__thiscall NiD3DXEffectAttributeTable::GetAttributeByName(NiD3DXEffectAttributeTable *this, const char *pcName); // idb
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiShaderAttributeDesc *>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiShaderAttributeDesc *>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiShaderAttributeDesc *> *this); // idb
NiTPointerList<NiShaderAttributeDesc *> *__thiscall NiTPointerList<NiShaderAttributeDesc *>::`scalar deleting destructor'(NiTPointerList<NiShaderAttributeDesc *> *this, unsigned int a2);
void __thiscall NiD3DXEffectAttributeTable::~NiD3DXEffectAttributeTable(NiD3DXEffectAttributeTable *this); // idb
char __thiscall NSBAttributeTable::AddAttribDesc(NiD3DXEffectAttributeTable *this, NiShaderAttributeDesc *pkDesc);
char __thiscall NiD3DXEffectAttributeTable::AddAttribDesc_Bool(NiD3DXEffectAttributeTable *this, const char *pcName, bool bHidden, bool bInitValue);
char __thiscall NiD3DXEffectAttributeTable::AddAttribDesc_UnsignedInt(NiD3DXEffectAttributeTable *this, const char *pcName, bool bHidden, unsigned int uiInitValue, unsigned int uiLow, unsigned int uiHigh);
char __thiscall NiD3DXEffectAttributeTable::AddAttribDesc_Float(NiD3DXEffectAttributeTable *this, const char *pcName, bool bHidden, float fInitValue, float fLow, float fHigh);
char __thiscall NiD3DXEffectAttributeTable::AddAttribDesc_Point2(NiD3DXEffectAttributeTable *this, const char *pcName, bool bHidden, float *pfInitValue, float *pfLow, float *pfHigh);
char __thiscall NiD3DXEffectAttributeTable::AddAttribDesc_Point3(NiD3DXEffectAttributeTable *this, const char *pcName, bool bHidden, float *pfInitValue, float *pfLow, float *pfHigh);
char __thiscall NiD3DXEffectAttributeTable::AddAttribDesc_Point4(NiD3DXEffectAttributeTable *this, const char *pcName, bool bHidden, float *pfInitValue, float *pfLow, float *pfHigh);
char __thiscall NiD3DXEffectAttributeTable::AddAttribDesc_Matrix3(NiD3DXEffectAttributeTable *this, const char *pcName, bool bHidden, float *pfInitValue);
char __thiscall NiD3DXEffectAttributeTable::AddAttribDesc_Matrix4(NiD3DXEffectAttributeTable *this, const char *pcName, bool bHidden, float *pfInitValue);
char __thiscall NiD3DXEffectAttributeTable::AddAttribDesc_Color(NiD3DXEffectAttributeTable *this, const char *pcName, bool bHidden, float *pfInitValue, float *pfLow, float *pfHigh);
char __thiscall NiD3DXEffectAttributeTable::AddAttribDesc_ColorA(NiD3DXEffectAttributeTable *this, const char *pcName, bool bHidden, float *pfInitValue, float *pfLow, float *pfHigh);
char __thiscall NiD3DXEffectAttributeTable::AddAttribDesc_Texture(NiD3DXEffectAttributeTable *this, const char *pcName, bool bHidden, unsigned int uiSlot, const char *pcDefault);
char __thiscall NiD3DXEffectAttributeTable::AddAttribDesc_Array(NiD3DXEffectAttributeTable *this, const char *pcName, bool bHidden, void *pInitValue, unsigned int uiNumElements, unsigned int uiElementSize, NiShaderAttributeDesc::AttributeType eSubType, void *pLow, void *pHigh);
void __thiscall NiD3DXEffectAttributeTable::NiD3DXEffectAttributeTable(NiD3DXEffectAttributeTable *this); // idb
NiD3DXEffectParameterMatrixDesc *__cdecl NiD3DXEffectParameterDesc::GetMatrixDesc(); // idb
NiD3DXEffectParameterVectorDesc *__cdecl NiD3DXEffectParameterDesc::GetVectorDesc(); // idb
NiD3DXEffectParameterFloatDesc *__cdecl NiD3DXEffectParameterDesc::GetFloatDesc(); // idb
NiD3DXEffectParameterBooleanDesc *__cdecl NiD3DXEffectParameterDesc::GetBooleanDesc(); // idb
NiD3DXEffectParameterIntegerDesc *__cdecl NiD3DXEffectParameterDesc::GetIntegerDesc(); // idb
NiD3DXEffectParameterTextureDesc *__cdecl NiD3DXEffectParameterDesc::GetTextureDesc(); // idb
NiD3DXEffectParameterPredefinedDesc *__cdecl NiD3DXEffectParameterDesc::GetPredefinedDesc(); // idb
NiD3DXEffectParameterObjectDesc *__cdecl NiD3DXEffectParameterDesc::GetObjectDesc(); // idb
NiD3DXEffectParameterArrayDesc *__cdecl NiD3DXEffectParameterDesc::GetArrayDesc(); // idb
signed int __thiscall NiD3DXEffectParameterVectorDesc::GetVectorType(NiD3DXEffectParameterVectorDesc *this);
unsigned int __thiscall NiD3DXEffectParameterArrayDesc::GetArrayType(NiD3DXEffectParameterArrayDesc *this);
signed int __thiscall NiD3DXEffectParameterArrayDesc::GetElementSize(NiD3DXEffectParameterArrayDesc *this);
char __cdecl NiD3DXEffectParameterArrayDesc::CompactFromVector4Array(D3DXVECTOR4 *pfSrcArray, float *pfDestArray, unsigned int uiRows, unsigned int uiColumns, unsigned int uiNumElements);
char __cdecl NiD3DXEffectParameterArrayDesc::ExpandToVector4Array(const float *pfSrcArray, D3DXVECTOR4 *pfDestArray, unsigned int uiRows, unsigned int uiColumns, unsigned int uiNumElements);
bool __thiscall NiD3DXEffectShader::Initialize(NiD3DXEffectShader *this, NiDX9Renderer *pkRenderer); // idb
signed int __thiscall NiD3DXEffectShader::PreProcessPipeline(NiD3DXEffectShader *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound);
unsigned int __thiscall NiD3DXEffectShader::PostRender(NiD3DXEffectShader *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound); // idb
unsigned int __thiscall NiBinaryShader::PostProcessPipeline(NiD3DXEffectShader *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound); // idb
unsigned int __thiscall NiD3DXEffectShader::FirstPass(NiD3DXEffectShader *this); // idb
unsigned int __thiscall NiD3DXEffectShader::NextPass(NiD3DXEffectShader *this); // idb
char __thiscall NiD3DXEffectShader::GetVSPresentAllPasses(NiD3DXEffectShader *this);
char __thiscall NiD3DXEffectShader::GetVSPresentAnyPass(NiD3DXEffectShader *this);
char __thiscall NiD3DXEffectShader::GetPSPresentAllPasses(NiD3DXEffectShader *this);
char __thiscall NiD3DXEffectShader::GetPSPresentAnyPass(NiD3DXEffectShader *this);
NiRTTI *NiD3DXEffectShader::GetRTTI();
NiD3DXEffectShader *__thiscall NiD3DXEffectShader::`vector deleting destructor'(NiD3DXEffectShader *this, unsigned int a2);
unsigned int __thiscall NiD3DXEffectShader::SetupTransformations(NiD3DXEffectShader *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound); // idb
void __thiscall NiD3DXEffectShader::HandleLostDevice(NiD3DXEffectShader *this); // idb
void __thiscall NiD3DXEffectShader::HandleResetDevice(NiD3DXEffectShader *this); // idb
void __thiscall NiD3DXEffectShader::DestroyRendererData(NiD3DXEffectShader *this); // idb
void __thiscall NiD3DXEffectShader::CreateShaderDeclaration(NiD3DXEffectShader *this); // idb
void __thiscall NiD3DTimeSyncController::NiD3DTimeSyncController(NiD3DTimeSyncController *this); // idb
NiRTTI *NiD3DTimeSyncController::GetRTTI();
NiD3DTimeSyncController *__thiscall NiD3DTimeSyncController::`scalar deleting destructor'(NiD3DTimeSyncController *this, unsigned int a2);
void __thiscall NiTArray<NiPointer<NiD3DPass>>::RemoveAll(NiTArray<NiPointer<NiD3DPass> > *this); // idb
unsigned int __thiscall NiD3DXEffectShader::SetupShaderPrograms(NiD3DXEffectShader *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound); // idb
char __thiscall NiD3DXEffectShader::SetupGeometry(NiD3DXEffectShader *this, NiGeometry *pkGeometry);
void __thiscall NiD3DXEffectShader::RecreateRendererData(NiD3DXEffectShader *this); // idb
void __thiscall NiTArray<NiPointer<NiD3DPass>>::~NiTArray<NiPointer<NiD3DPass>>(NiTArray<NiPointer<NiD3DPass> > *this); // idb
NiTArray<NiPointer<NiD3DPass> > *__thiscall NiTArray<NiPointer<NiD3DPass>>::`vector deleting destructor'(NiTArray<NiPointer<NiD3DPass> > *this, unsigned int a2);
void __thiscall NiD3DShader::NiD3DShader(NiD3DShader *this); // idb
NiRTTI *NiD3DShader::GetRTTI();
NiD3DShader *__thiscall NiD3DShader::`vector deleting destructor'(NiD3DShader *this, unsigned int a2);
void __thiscall NiD3DXEffectShader::NiD3DXEffectShader(NiD3DXEffectShader *this); // idb
LONG __stdcall NiD3DXEffectStateManager::AddRef(NiD3DXEffectStateManager *this);
int __stdcall NiD3DXEffectStateManager::Release(NiD3DXEffectStateManager *this);
HRESULT __stdcall NiD3DXEffectStateManager::SetTransform(NiD3DXEffectStateManager *this, _D3DTRANSFORMSTATETYPE eState, _D3DMATRIX *pkMatrix); // idb
HRESULT __stdcall NiD3DXEffectStateManager::SetMaterial(NiD3DXEffectStateManager *this, _D3DMATERIAL9 *pkMaterial); // idb
HRESULT __stdcall NiD3DXEffectStateManager::SetLight(NiD3DXEffectStateManager *this, unsigned int uiIndex, _D3DLIGHT9 *pkLight); // idb
HRESULT __stdcall NiD3DXEffectStateManager::LightEnable(NiD3DXEffectStateManager *this, unsigned int uiIndex, int bEnable); // idb
HRESULT __stdcall NiD3DXEffectStateManager::SetRenderState(NiD3DXEffectStateManager *this, _D3DRENDERSTATETYPE eState, unsigned int uiValue); // idb
HRESULT __stdcall NiD3DXEffectStateManager::SetTexture(NiD3DXEffectStateManager *this, unsigned int uiStage, IDirect3DBaseTexture9 *pkTexture); // idb
HRESULT __stdcall NiD3DXEffectStateManager::SetTextureStageState(NiD3DXEffectStateManager *this, unsigned int uiStage, _D3DTEXTURESTAGESTATETYPE eType, unsigned int uiValue); // idb
HRESULT __stdcall NiD3DXEffectStateManager::SetNPatchMode(NiD3DXEffectStateManager *this, float fNumSegments); // idb
HRESULT __stdcall NiD3DXEffectStateManager::SetFVF(NiD3DXEffectStateManager *this, unsigned int uiFVF); // idb
HRESULT __stdcall NiD3DXEffectStateManager::SetVertexShader(NiD3DXEffectStateManager *this, IDirect3DVertexShader9 *pkShader); // idb
HRESULT __stdcall NiD3DXEffectStateManager::SetPixelShader(NiD3DXEffectStateManager *this, IDirect3DPixelShader9 *pkShader); // idb
void __thiscall NiD3DXEffectStateManager::ResetLastTextureStage(NiD3DXEffectStateManager *this); // idb
NiD3DXEffectStateManager *__thiscall NiD3DXEffectStateManager::`vector deleting destructor'(NiD3DXEffectStateManager *this, unsigned int a2);
HRESULT __stdcall NiD3DXEffectStateManager::QueryInterface(NiD3DXEffectStateManager *this, _GUID *iid, void **ppv); // idb
HRESULT __stdcall NiD3DXEffectStateManager::SetSamplerState(NiD3DXEffectStateManager *this, unsigned int uiSampler, _D3DSAMPLERSTATETYPE eType, unsigned int uiValue); // idb
void __thiscall NiD3DXEffectStateManager::NiD3DXEffectStateManager(NiD3DXEffectStateManager *this, NiD3DRenderState *pkRenderStateManager, IDirect3DDevice9 *pkDevice); // idb
void __cdecl NiD3DXEffectStateManager::GetInstance(NiDX9Renderer *pkRenderer);
HRESULT __stdcall NiD3DXEffectStateManager::SetVertexShaderConstantF(NiD3DXEffectStateManager *this, unsigned int uiRegisterIndex, const float *pfConstantData, unsigned int uiRegisterCount); // idb
HRESULT __stdcall NiD3DXEffectStateManager::SetVertexShaderConstantI(NiD3DXEffectStateManager *this, unsigned int uiRegisterIndex, const int *piConstantData, unsigned int uiRegisterCount); // idb
HRESULT __stdcall NiD3DXEffectStateManager::SetVertexShaderConstantB(NiD3DXEffectStateManager *this, unsigned int uiRegisterIndex, const int *pbConstantData, unsigned int uiRegisterCount); // idb
HRESULT __stdcall NiD3DXEffectStateManager::SetPixelShaderConstantF(NiD3DXEffectStateManager *this, unsigned int uiRegisterIndex, const float *pfConstantData, unsigned int uiRegisterCount); // idb
HRESULT __stdcall NiD3DXEffectStateManager::SetPixelShaderConstantI(NiD3DXEffectStateManager *this, unsigned int uiRegisterIndex, const int *piConstantData, unsigned int uiRegisterCount); // idb
HRESULT __stdcall NiD3DXEffectStateManager::SetPixelShaderConstantB(NiD3DXEffectStateManager *this, unsigned int uiRegisterIndex, const int *pbConstantData, unsigned int uiRegisterCount); // idb
NiD3DXEffectTechniqueDesc *__cdecl NiD3DXEffectTechniqueDesc::GetDesc(); // idb
void __cdecl NiD3DXEffectShaderSDM::Init(); // idb
void __cdecl NiD3DXEffectShaderSDM::Shutdown(); // idb
void NiD3DXEffectShaderSDM::NiD3DXEffectShaderSDM();
void __thiscall NsTextCodeV0_3::Init(NsTextCodeV0_3 *this); // idb
std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *__cdecl std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::_Min(std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *_Pnode); // idb
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>,std::_Iterator_base0>::operator++(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >,std::_Iterator_base0> *this); // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > > *__thiscall std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::erase(std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > *this, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > > _Where); // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > > *__thiscall std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::find(std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > *this, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > > *result, const char *_Keyval); // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > > *__thiscall std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::erase(std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > *this, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > > _Last); // idb
int __thiscall NsTextCodeV0_3::OperaterTest(NsTextCodeV0_3 *this, int nInStart, int *pOutEnd, char *originstr, char *inChar); // idb
int __thiscall NsTextCodeV0_3::CharTest(NsTextCodeV0_3 *this, char *inChar); // idb
int __thiscall NsTextCodeV0_3::GetWord(NsTextCodeV0_3 *this, int nInStart, int *pOutEnd, char *originstr, char *outstr); // idb
bool __thiscall NsTextCodeV0_3::GetWord(NsTextCodeV0_3 *this, char *outstr_); // idb
void __thiscall std::set<char,std::less<char>,std::allocator<char>>::~set<char,std::less<char>,std::allocator<char>>(std::set<char,std::less<char>,std::allocator<char> > *this); // idb
void __thiscall NsTextCodeV0_3::~NsTextCodeV0_3(NsTextCodeV0_3 *this); // idb
void __thiscall NsTextCodeV0_3::NsTextCodeV0_3(NsTextCodeV0_3 *this); // idb
NsTextCodeV0_3 *__thiscall NsTextCodeV0_3::`vector deleting destructor'(NsTextCodeV0_3 *this, unsigned int a2);
const char *__cdecl NsUtil::FindSubString(const char *pcStr, const char *pcKey); // idb
const char *__cdecl NsUtil::MatchTag(NiObjectNET *pkObj, const char *pcStr); // idb
NiAVObject *__cdecl _NpNs_GetObjectNameRecUp(NiAVObject *pkObject, const char *striFilename, const char *szStopFlag); // idb
double __cdecl NpNs_GetAngle(NiPoint3 _pos3DirOne, NiPoint3 _pos3DirTwo, NiPoint3 _pos3UpDir, unsigned int _nOutType);
void __cdecl NpNs_RotateModelZToVector(NiPoint3 *vec, NiMatrix3 *rot); // idb
void __cdecl NpNs_RotateModelToDirVector(NiPoint3 *_vecDir, NiMatrix3 *rot); // idb
void __thiscall NpNs_SmoothRotateControler::NpNs_SmoothRotateControler(NpNs_SmoothRotateControler *this); // idb
void __thiscall NpNs_SmoothRotateControler::Init(NpNs_SmoothRotateControler *this, NiPoint3 *_pos3TargetDir, NiPoint3 *_pos3Up); // idb
void __thiscall NpNs_SmoothRotateControler::SetDirection(NpNs_SmoothRotateControler *this, NiPoint3 *_pos3TargetDir, NiPoint3 *_pos3Up); // idb
void __thiscall NpNs_SmoothRotateControler::SetTargetDirection(NpNs_SmoothRotateControler *this, const float _fTime, NiPoint3 *_pos3StartDir, NiPoint3 *_pos3TargetDir, NiPoint3 *_pos3Up); // idb
void __thiscall NpNs_SmoothRotateControler::GetDirection(NpNs_SmoothRotateControler *this, NiPoint3 *pos3Dir_); // idb
Wml::Vector3<double> *__thiscall Wml::Segment3<double>::Direction(Wml::Segment3<double> *this); // idb
void __thiscall NpNs_SmoothRotateControler::GetTargetDirection(NpNs_SmoothRotateControler *this, NiPoint3 *pos3Dir_); // idb
bool __thiscall NpNs_SmoothRotateControler::Update(NpNs_SmoothRotateControler *this, float _fTime); // idb
void __thiscall NpNs_MoveToTarget::NpNs_MoveToTarget(NpNs_MoveToTarget *this); // idb
void __thiscall NpNs_MoveToTarget::SetCalcuCurrentPos(NpNs_MoveToTarget *this, NiPoint3 *_pos3); // idb
void __thiscall NpNs_MoveToTarget::~NpNs_MoveToTarget(NpNs_MoveToTarget *this); // idb
void __thiscall NpNs_MoveToTarget::StartMove(NpNs_MoveToTarget *this, float _fTime, NiPoint3 *_pos3Target); // idb
void __thiscall NpNs_MoveToTarget::StartMove(NpNs_MoveToTarget *this, NiPoint3 *_pos3Target); // idb
void __thiscall NpNs_MoveToTarget::StartMove(NpNs_MoveToTarget *this, float _fTime, NiPoint3 *_pos3Start, NiPoint3 *_pos3Target); // idb
void __thiscall NpNs_MoveToTarget::StartMove(NpNs_MoveToTarget *this, NiPoint3 *_pos3Start, NiPoint3 *_pos3Target); // idb
void __thiscall NpNs_MoveToTarget::Stop(NpNs_MoveToTarget *this); // idb
bool __thiscall NpNs_MoveToTarget::Update(NpNs_MoveToTarget *this, float _fTime); // idb
NiAVObject *__cdecl NpNs_GetObjectNameRecUp(NiAVObject *pkObject, const char *striFilename, const char *szStopFlag); // idb
void __thiscall NpNs_SmoothRotateControler::SetTargetDirection(NpNs_SmoothRotateControler *this, NiPoint3 *_pos3TargetDir); // idb
void __thiscall NpNs_SmoothRotateControler::SetTargetDirection(NpNs_SmoothRotateControler *this, const float _fTime, NiPoint3 *_pos3TargetDir); // idb
NpNs_MoveToTarget *__thiscall NpNs_MoveToTarget::`vector deleting destructor'(NpNs_MoveToTarget *this, unsigned int a2);
char __thiscall Ns_TourScene::TourScene(Ns_TourScene *this, NiNode *pNiNode, NiRTTI *_pRtti, void *_data_);
void __thiscall NiTArray<NiPointer<NiNode>>::SetSize(NiTArray<NiPointer<NiNode> > *this, unsigned int uiMaxSize); // idb
void __thiscall FindCullUpdateNode::CullUpdateAreaInfo::AddCullNode(FindCullUpdateNode::CullUpdateAreaInfo *this, NiNode *_pCullNode); // idb
signed int __stdcall FindCullUpdateNode::ProcessData(NiAVObject *_pkObject, void *_pData);
const char *__thiscall NsPathMaker::MakeFullPath(NsPathMaker *this, const char *_szPath); // idb
NiObjectNET *__cdecl Ns_LoadNifFile(const char *pcInFileName, NiTexturePalette *pkTexPalatte);
void __thiscall CNSTimer_Interval::CNSTimer_Interval(CNSTimer_Interval *this); // idb
signed int __thiscall CNSTimer_Interval::IsRun_GetCount(CNSTimer_Interval *this, float _fAccumTime);
bool __thiscall CNSTimer_Interval::ReSet(CNSTimer_Interval *this, float _fTime); // idb
void __thiscall CNSTimer_MarkCheck::CNSTimer_MarkCheck(CNSTimer_MarkCheck *this); // idb
CNSTimer_MarkCheck::TIMERSTATE __thiscall CNSTimer_MarkCheck::ReSet(CNSTimer_MarkCheck *this, float _fCurrentTime, CNSTimer_MarkCheck::TIMERSTATE _TimeStaeKillCondition); // idb
void __thiscall CNSTimer_MarkCheck::KillTimer(CNSTimer_MarkCheck *this); // idb
void __thiscall CNSTimer_MarkCheck::Update(CNSTimer_MarkCheck *this, float _fCurrentTime);
void __thiscall NsMakeQuadScene::SetData(NsMakeQuadScene *this, int _nLevelCount, int _nBlockCount, float _fLength, NiNode *_pNode); // idb
int __thiscall NsMakeQuadScene::GetNodeLevel(NsMakeQuadScene *this, int _nLeft, int _nRight, int _nTop, int _nBottom, bool _bFilter); // idb
signed int __stdcall NsMakeQuadScene::Optimizer::ProcessData(NiAVObject *_pkObject, void *_pData);
NiNode *__thiscall NsMakeQuadScene::GetInsertNode(NsMakeQuadScene *this, int _nLevel, int _nPosX, int _nPosY); // idb
NiNode *__thiscall NsMakeQuadScene::AddObject(NsMakeQuadScene *this, NiAVObject *_pkObject);
void __thiscall NsMakeQuadScene::Optimize(NsMakeQuadScene *this); // idb
bool __cdecl NpModelData_NiTexturingProperty::Terminate(); // idb
void __thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexturingProperty>>::~NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexturingProperty>>(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexturingProperty> > *this); // idb
void __thiscall NiTPointerMap<char const *,NiPointer<NiTexturingProperty>>::~NiTPointerMap<char const *,NiPointer<NiTexturingProperty>>(NiTPointerMap<char const *,NiPointer<NiTexturingProperty> > *this); // idb
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexturingProperty>>,NiPointer<NiTexturingProperty>>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexturingProperty>>,NiPointer<NiTexturingProperty>>(NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexturingProperty> >,NiPointer<NiTexturingProperty> > *this); // idb
unsigned int __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiShader *>,NiShader *>::KeyToHashIndex(NiTStringTemplateMap<NiTPointerMap<char const *,NiD3DShaderProgramCreator *>,NiD3DShaderProgramCreator *> *this, const char *pKey); // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexturingProperty> > *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexturingProperty>>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexturingProperty> > *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<char const *,NiPointer<NiTexturingProperty>>::`scalar deleting destructor'(NiTPointerMap<char const *,NiPointer<NiTexturingProperty> > *this, unsigned int a2);
NiTStringPointerMap<NiPointer<NiTexturingProperty> > *__thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexturingProperty>>,NiPointer<NiTexturingProperty>>::`vector deleting destructor'(NiTStringPointerMap<NiPointer<NiTexturingProperty> > *this, unsigned int a2);
char __cdecl NpKMI_Tool::Terminate();
void __thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NpSIF_Tool>>::~NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NpSIF_Tool>>(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NpSIF_Tool> > *this); // idb
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NpSIF_Tool>>,NiPointer<NpSIF_Tool>>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NpSIF_Tool>>,NiPointer<NpSIF_Tool>>(NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NpSIF_Tool> >,NiPointer<NpSIF_Tool> > *this); // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NpSIF_Tool> > *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NpSIF_Tool>>::`vector deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NpSIF_Tool> > *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<char const *,NiPointer<NpSIF_Tool>>::`vector deleting destructor'(NiTPointerMap<char const *,NiPointer<NpSIF_Tool> > *this, unsigned int a2);
NiTStringPointerMap<NiPointer<NpSIF_Tool> > *__thiscall NiTStringPointerMap<NiPointer<NpSIF_Tool>>::`scalar deleting destructor'(NiTStringPointerMap<NiPointer<NpSIF_Tool> > *this, unsigned int a2);
char __cdecl NpModelData_KFM::Terminate();
void __thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiKFMTool>>::~NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiKFMTool>>(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiKFMTool> > *this); // idb
void __thiscall NiTPointerMap<char const *,NiPointer<NiKFMTool>>::~NiTPointerMap<char const *,NiPointer<NiKFMTool>>(NiTPointerMap<char const *,NiPointer<NiKFMTool> > *this); // idb
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiKFMTool>>,NiPointer<NiKFMTool>>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiKFMTool>>,NiPointer<NiKFMTool>>(NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiKFMTool> >,NiPointer<NiKFMTool> > *this); // idb
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexturingProperty>>,NiPointer<NiTexturingProperty>>::SetValue(NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexturingProperty> >,NiPointer<NiTexturingProperty> > *this, NiTMapItem<char const *,NiPointer<NiTexturingProperty> > *pkItem, const char *pcKey, NiPointer<NiTexturingProperty> val); // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiKFMTool> > *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiKFMTool>>::`vector deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiKFMTool> > *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<char const *,NiPointer<NiKFMTool>>::`vector deleting destructor'(NiTPointerMap<char const *,NiPointer<NiKFMTool> > *this, unsigned int a2);
NiTStringPointerMap<NiPointer<NiKFMTool> > *__thiscall NiTStringPointerMap<NiPointer<NiKFMTool>>::`scalar deleting destructor'(NiTStringPointerMap<NiPointer<NiKFMTool> > *this, unsigned int a2);
char __cdecl NpModelData_ActorM::Terminate();
void __thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiActorManager>>::~NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiActorManager>>(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiActorManager> > *this); // idb
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiActorManager>>,NiPointer<NiActorManager>>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiActorManager>>,NiPointer<NiActorManager>>(NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiActorManager> >,NiPointer<NiActorManager> > *this); // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiActorManager> > *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiActorManager>>::`vector deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiActorManager> > *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<char const *,NiPointer<NiActorManager>>::`scalar deleting destructor'(NiTPointerMap<char const *,NiPointer<NiActorManager> > *this, unsigned int a2);
NiTStringPointerMap<NiPointer<NiActorManager> > *__thiscall NiTStringPointerMap<NiPointer<NiActorManager>>::`scalar deleting destructor'(NiTStringPointerMap<NiPointer<NiActorManager> > *this, unsigned int a2);
bool __cdecl INp_File::SearchNode(INsFile *_pkNsFile, bool (__cdecl *CallFunc)(INsFile *, void *, int), void *pData); // idb
NiRTTI *NPTR_ISShader_v2::GetRTTI();
NPTR_ISShader_v2 *__thiscall NPTR_ISShader_v2::`scalar deleting destructor'(NPTR_ISShader_v2 *this, unsigned int a2);
void __thiscall NPTR_ISShader_v2::CopyMembers(NPTR_ISShader_v2 *this, NPTR_ISShader_v2 *pDest, NiCloningProcess *kCloning); // idb
NiExtraData *__cdecl NPTR_ISShader_v2::CreateObject();
void __thiscall NPTR_ISShader_v2::LoadBinary(NPTR_ISShader_v2 *this, NiStream *stream); // idb
void __thiscall NPTR_ISShader_v2::SaveBinary(NPTR_ISShader_v2 *this, NiStream *stream); // idb
char __thiscall NsPgToonRegister_v2::IsOK(NsPgToonRegister_v2 *this, NiGeometry *_pInNode);
void __thiscall NsPgToonRegister_v2::SetExtraData(NsPgToonRegister_v2 *this, NsPgToonExtraData *kiExtraData); // idb
NPTR_ISShader_v2 *__thiscall NPTR_ISShader_v2::CreateClone(NPTR_ISShader_v2 *this, NiCloningProcess *kCloning);
void __thiscall NsPgToonRegister_v2::SetEntry(NsPgToonRegister_v2 *this, NiRenderer *pInRenderer); // idb
void __thiscall NPTR_ISShader_v2::GetViewerStrings(NPTR_ISShader_v2 *this, NiTArray<char *> *pStrings); // idb
void __thiscall NsPgToonRegister_v2::NsPgToonRegister_v2(NsPgToonRegister_v2 *this); // idb
NiRTTI *NsPgToonRegister_v2::GetRTTI();
void __thiscall NsPgToonRegister_v2::~NsPgToonRegister_v2(NsPgToonRegister_v2 *this); // idb
NsPgToonRegister_v2 *__thiscall NsPgToonRegister_v2::`scalar deleting destructor'(NsPgToonRegister_v2 *this, unsigned int a2);
void __thiscall INpShader::INpShader(INpShader *this); // idb
NiRTTI *INpShader::GetRTTI();
void __thiscall INpShader::~INpShader(INpShader *this); // idb
char __thiscall INpShader::Init(INpShader *this, NiRenderer *pInRenderer, unsigned __int16 usBoneCount);
char __thiscall INpShader::Setup(INpShader *this, NiGeometry *pInNode, NiRenderer *pInRenderer, unsigned int uiFlags, unsigned int uiBonesPerPartition, unsigned int uiBonesPerVertex);
void __thiscall INpShader::TourScene(INpShader *this, NiNode *pNiNode, NiRenderer *pkRenderer, unsigned int uiFlags, unsigned int uiBonesPerPartition, unsigned int uiBonesPerVertex); // idb
INpShader *__thiscall INpShader::`vector deleting destructor'(INpShader *this, unsigned int a2);
char __thiscall INpShader::Setuprecursive(INpShader *this, NiNode *pInNode, NiRenderer *pInRenderer, unsigned int uiBonesPerPartition, unsigned int uiBonesPerVertex);
void __thiscall NsPgToonExtraData::NsPgToonExtraData(NsPgToonExtraData *this); // idb
NiRTTI *NsPgToonExtraData::GetRTTI();
void __thiscall NsPgToonExtraData::~NsPgToonExtraData(NsPgToonExtraData *this); // idb
void __thiscall NsPgToonExtraData::CopyMembers(NsPgToonExtraData *this, NsPgToonExtraData *pDest, NiCloningProcess *kCloning); // idb
void __cdecl NsPgToonExtraData::CreateObject();
bool __stdcall NsPgToonExtraData::IsEqual(NiObject *pObject);
void __cdecl NiBinaryStreamLoad<NiCamera *>(NiBinaryStream *is, NiCamera **pValue, unsigned int uiNumEls); // idb
void __cdecl NiBinaryStreamSave<NiCamera *>(NiBinaryStream *os, NiCamera *const *pValue, unsigned int uiNumEls); // idb
NsPgToonExtraData *__thiscall NsPgToonExtraData::`vector deleting destructor'(NsPgToonExtraData *this, unsigned int a2);
NsPgToonExtraData *__thiscall NsPgToonExtraData::CreateClone(NsPgToonExtraData *this, NiCloningProcess *kCloning);
void __cdecl NiStreamLoadBinary<NiCamera *>(NiStream *kStream, NiCamera **value); // idb
void __cdecl NiStreamSaveBinary<NiCamera *>(NiStream *kStream, NiCamera *const *value); // idb
void __thiscall NsPgToonExtraData::LoadBinary(NsPgToonExtraData *this, NiStream *stream); // idb
void __thiscall NsPgToonExtraData::SaveBinary(NsPgToonExtraData *this, NiStream *stream); // idb
void __thiscall NsPgToonExtraData::GetViewerStrings(NsPgToonExtraData *this, NiTArray<char *> *pStrings); // idb
unsigned int __thiscall NsPgCatoonShader::SetupTransformations(NsPgCatoonShader *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound); // idb
void __thiscall NiD3DPass::SetVertexShader(NiD3DPass *this, NiD3DVertexShader *pkVertexShader); // idb
char __stdcall NsPgCatoonShader::PresetLine(NiD3DPass *pkPass);
char __thiscall NsPgCatoonShader::CreateShaders(NsPgCatoonShader *this);
unsigned int __thiscall NsPgCatoonShader::SetupShaderPrograms(NsPgCatoonShader *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound); // idb
void __thiscall NsPgCatoonShader::DestroyRendererData(NsPgCatoonShader *this); // idb
void __thiscall NsPgCatoonShader::RecreateRendererData(NsPgCatoonShader *this); // idb
D3DXMATRIX *__stdcall std::allocator<D3DXMATRIX>::allocate(unsigned int _Count);
char __thiscall NsPgCatoonShader::CreateStagesAndPasses(NsPgCatoonShader *this);
void __cdecl std::_Cons_val<std::allocator<D3DXMATRIX>,D3DXMATRIX,D3DXMATRIX>(std::allocator<D3DXMATRIX> *_Alval, D3DXMATRIX *_Pdest, D3DXMATRIX *_Src); // idb
D3DXMATRIX *__cdecl std::_Uninit_move<D3DXMATRIX *,D3DXMATRIX *,std::allocator<D3DXMATRIX>,D3DXMATRIX>(D3DXMATRIX *_First, D3DXMATRIX *_Last, D3DXMATRIX *_Dest, std::allocator<D3DXMATRIX> *_Al);
char __thiscall NsPgCatoonShader::Initialize(NsPgCatoonShader *this, NiDX9Renderer *pkRenderer);
unsigned int __thiscall NsPgCatoonShader::UpdatePipeline(NsPgCatoonShader *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound); // idb
void __cdecl std::_Uninit_def_fill_n<D3DXMATRIX *,unsigned int,D3DXMATRIX,std::allocator<D3DXMATRIX>,D3DXMATRIX>(D3DXMATRIX *_First, unsigned int _Count, D3DXMATRIX *__formal, std::allocator<D3DXMATRIX> *_Al);
void __thiscall std::vector<D3DXMATRIX,std::allocator<D3DXMATRIX>>::reserve(std::vector<D3DXMATRIX,std::allocator<D3DXMATRIX> > *this, unsigned int _Count); // idb
void __thiscall std::vector<D3DXMATRIX,std::allocator<D3DXMATRIX>>::_Reserve(std::vector<D3DXMATRIX,std::allocator<D3DXMATRIX> > *this, unsigned int _Count); // idb
NiRTTI *NsPgCatoonShader::GetRTTI();
void __thiscall NsPgCatoonShader::NsPgCatoonShader(NsPgCatoonShader *this, const char *_szPath); // idb
void __thiscall NsPgCatoonShader::~NsPgCatoonShader(NsPgCatoonShader *this); // idb
char __thiscall NsPgCatoonShader::SetupGeometry(NsPgCatoonShader *this, NiGeometry *pkGeometry);
void __thiscall std::vector<D3DXMATRIX,std::allocator<D3DXMATRIX>>::resize(std::vector<D3DXMATRIX,std::allocator<D3DXMATRIX> > *this, unsigned int _Newsize); // idb
NsPgCatoonShader *__thiscall NsPgCatoonShader::`vector deleting destructor'(NsPgCatoonShader *this, unsigned int a2);
signed int __thiscall NsPgCatoonShader::PreProcessPipeline(NsPgCatoonShader *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound);
void __thiscall NsEffect::Start(NsEffect *this, float _fTime); // idb
void __thiscall NsEffect::NsEffect(NsEffect *this); // idb
void __thiscall NsEffect::~NsEffect(NsEffect *this); // idb
NsEffect *__thiscall NsEffect::`vector deleting destructor'(NsEffect *this, unsigned int a2);
void __thiscall NsEffect::FindAndAdd(NsEffect *this, NiObjectNET *pkRoot); // idb
void __thiscall NsEffect::SetEffectNode(NsEffect *this, NiAVObject *_pkEffectObject); // idb
int __stdcall NsABVPicking::FindIntersection(NiAVObject *_pObject, NiBoxBV *kBoxBv, NiPoint3 *origin, NiPoint3 *dir, float *t, NiPoint3 *normal);
char __stdcall NsABVPicking::FindIntersection(NiAVObject *_pObject, NiSphereBV *kSphereBV, NiPoint3 *kOrigin, NiPoint3 *kDir, float *t);
void __thiscall NiTArray<NsABVPicking::Record *>::~NiTArray<NsABVPicking::Record *>(NiTArray<NsABVPicking::Record *> *this); // idb
NiVBBlock *__thiscall NiTArray<NsABVPicking::Record *>::RemoveAt(NiTArray<NiVBBlock *> *this, unsigned int uiIndex); // idb
NiTArray<NsABVPicking::Record *> *__thiscall NiTArray<NsABVPicking::Record *>::`scalar deleting destructor'(NiTArray<NsABVPicking::Record *> *this, unsigned int a2);
void __thiscall NsABVPicking::Record::Record(NsABVPicking::Record *this, NiAVObject *pObject); // idb
void __thiscall NsABVPicking::NsABVPicking(NsABVPicking *this); // idb
char __thiscall NsABVPicking::FindIntersectionsSwitchNode(NsABVPicking *this, NiPoint3 *kOrigin, NiPoint3 *kDir, NiSwitchNode *pkSwitch);
NsABVPicking::Record *__thiscall NsABVPicking::Record::`scalar deleting destructor'(NsABVPicking::Record *this, unsigned int a2);
unsigned int __thiscall NiTArray<void (__cdecl *)(NiStream &,NiObject *)>::AddFirstEmpty(NiTArray<NiVBBlock *> *this, NiVBBlock *const *element); // idb
void __thiscall NsABVPicking::ClearResultsArray(NsABVPicking *this); // idb
char __thiscall NsABVPicking::FindIntersectionsNode(NsABVPicking *this, NiPoint3 *kOrigin, NiPoint3 *kDir, NiNode *pkNode);
signed int __thiscall NsABVPicking::FindIntersectionsABV(NsABVPicking *this, NiPoint3 *kOrigin, NiPoint3 *kDir, NiCollisionData *pkData, NiNode *pkNode);
char __thiscall NsABVPicking::FindIntersectionsTriBasedGeom(NsABVPicking *this, NiPoint3 *kOrigin, NiPoint3 *kDir, NiTriBasedGeom *pkTBG);
void __thiscall NsABVPicking::~NsABVPicking(NsABVPicking *this); // idb
char __thiscall NsABVPicking::FindIntersections(NsABVPicking *this, NiPoint3 *kOrigin, NiPoint3 *kDir, NiAVObject *pkRoot);
char __thiscall NsABVPicking::PickObjects(NsABVPicking *this, NiPoint3 *origin, NiPoint3 *dir, bool bAppend);
void __thiscall NsDecal::Terminate(NsDecal *this); // idb
NiNode *__thiscall NsDecal::GetNextTriShape(NsDecal *this, unsigned int _uiVertexCnt);
NiPoint3 *__stdcall std::allocator<NiPoint3>::allocate(unsigned int _Count);
NiPoint2 *__stdcall std::allocator<NiPoint2>::allocate(unsigned int _Count);
NiColorA *__stdcall std::allocator<NiColorA>::allocate(unsigned int _Count);
NiPoint3 *__cdecl std::_Uninit_move<NiPoint3 *,NiPoint3 *,std::allocator<NiPoint3>,NiPoint3>(NiPoint3 *_First, NiPoint3 *_Last, NiPoint3 *_Dest);
NiPoint2 *__cdecl std::_Uninit_move<GameFrameWork::AskInform *,GameFrameWork::AskInform *,std::allocator<GameFrameWork::AskInform>,GameFrameWork::AskInform>(NiPoint2 *_First, NiPoint2 *_Last, NiPoint2 *_Dest);
void __cdecl std::_Uninit_def_fill_n<NiPoint3 *,unsigned int,NiPoint3,std::allocator<NiPoint3>,NiPoint3>(NiPoint3 *_First, unsigned int _Count);
void __cdecl std::_Uninit_def_fill_n<NiPoint2 *,unsigned int,NiPoint2,std::allocator<NiPoint2>,NiPoint2>(NiPoint2 *_First, unsigned int _Count);
void __cdecl std::_Uninit_def_fill_n<NiColorA *,unsigned int,NiColorA,std::allocator<NiColorA>,NiColorA>(NiColorA *_First, unsigned int _Count);
std::_Vector_iterator<std::_Vector_val<NiColorA,std::allocator<NiColorA> > > *__thiscall std::vector<NiColorA,std::allocator<NiColorA>>::erase(std::vector<NiColorA,std::allocator<NiColorA> > *this, std::_Vector_iterator<std::_Vector_val<NiColorA,std::allocator<NiColorA> > > *result, std::_Vector_const_iterator<std::_Vector_val<NiColorA,std::allocator<NiColorA> > > _First_arg, std::_Vector_const_iterator<std::_Vector_val<NiColorA,std::allocator<NiColorA> > > _Last_arg); // idb
void __thiscall std::vector<ItemAction,std::allocator<ItemAction>>::reserve(std::vector<NiPoint3,std::allocator<NiPoint3> > *this, unsigned int _Count); // idb
void __thiscall std::vector<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo>>::reserve(std::vector<NiColorA,std::allocator<NiColorA> > *this, unsigned int _Count); // idb
void __thiscall std::vector<ItemAction,std::allocator<ItemAction>>::_Reserve(std::vector<NiPoint3,std::allocator<NiPoint3> > *this, unsigned int _Count); // idb
void __thiscall std::vector<NiPoint2,std::allocator<NiPoint2>>::_Reserve(std::vector<NiPoint2,std::allocator<NiPoint2> > *this, unsigned int _Count); // idb
void __thiscall std::vector<NiColorA,std::allocator<NiColorA>>::_Reserve(std::vector<NiColorA,std::allocator<NiColorA> > *this, unsigned int _Count); // idb
void __thiscall NsDecal::NsDecal(NsDecal *this); // idb
void __thiscall NsDecal::~NsDecal(NsDecal *this); // idb
void __thiscall std::vector<NiPoint3,std::allocator<NiPoint3>>::resize(std::vector<NiPoint3,std::allocator<NiPoint3> > *this, unsigned int _Newsize); // idb
void __thiscall std::vector<ItemAction,std::allocator<ItemAction>>::push_back(std::vector<NiPoint3,std::allocator<NiPoint3> > *this, NiPoint3 *_Val); // idb
void __thiscall std::vector<NiPoint2,std::allocator<NiPoint2>>::resize(std::vector<NiPoint2,std::allocator<NiPoint2> > *this, unsigned int _Newsize); // idb
void __thiscall std::vector<NiPoint2,std::allocator<NiPoint2>>::push_back(std::vector<NiPoint2,std::allocator<NiPoint2> > *this, NiPoint2 *_Val); // idb
void __thiscall std::vector<NiColorA,std::allocator<NiColorA>>::resize(std::vector<NiColorA,std::allocator<NiColorA> > *this, unsigned int _Newsize); // idb
int __cdecl NsDecal::CollisionCallDecal_Vector(NiCollisionGroup::Intersect *kIntersect); // idb
void __thiscall NsDecal::Init(NsDecal *this); // idb
char __thiscall NsDecal::Update(NsDecal *this, float _fTime, NiNode *_pkDecalNode, float _fPosX, float _fPosY);
char __thiscall NsDecal::Update(NsDecal *this, float _fTime, NiNode *_pkDecalNode, NiPoint3 *_pos3Position);
void __thiscall NsFadeNode::UpdateUseScreenRate(NsFadeNode *this); // idb
void __thiscall NsFadeNode::OnVisible(NsFadeNode *this, NiCullingProcess *kCuller); // idb
void __thiscall NsFadeNode::LoadBinary(NsFadeNode *this, NiStream *stream); // idb
char __thiscall NiSwitchNode::RegisterStreamables(NsFadeNode *this, NiStream *stream);
void __thiscall NsFadeNode::SaveBinary(NsFadeNode *this, NiStream *stream); // idb
char __thiscall NsFadeNode::IsEqual(NsFadeNode *this, NiObject *pObject);
void __thiscall NiTArray<NiTPointerList<NiPointer<NiProperty>> *>::~NiTArray<NiTPointerList<NiPointer<NiProperty>> *>(NiTArray<NiTPointerList<NiPointer<NiProperty> > *> *this); // idb
NiTArray<NiTPointerList<NiPointer<NiProperty> > *> *__thiscall NiTArray<NiTPointerList<NiPointer<NiProperty>> *>::`scalar deleting destructor'(NiTArray<NiTPointerList<NiPointer<NiProperty> > *> *this, unsigned int a2);
void __thiscall NsFadeNode::InitData(NsFadeNode *this); // idb
double __thiscall NsFadeNode::GetCurAlpha(NsFadeNode *this);
void __thiscall NsFadeNode::SetMinAlpha(NsFadeNode *this, float fAlpha); // idb
void __thiscall NsFadeNode::CreateVisController(NsFadeNode *this); // idb
void __thiscall NiAlphaRefController::Update(NiAlphaRefController *this, float fTime); // idb
void __thiscall NiTArray<NiPointer<NiNode>>::RemoveAll(NiTArray<NiPointer<NiGeometry> > *this); // idb
void __thiscall NsFadeNode::NsFadeNode(NsFadeNode *this); // idb
NiRTTI *NsFadeNode::GetRTTI();
void __thiscall NsFadeNode::NsFadeNode(NsFadeNode *this, bool bLodMode); // idb
void __thiscall NsFadeNode::NsFadeNode(NsFadeNode *this, NiNode *_pLodNode, bool bLodMode); // idb
void __thiscall NsFadeNode::RemoveAllArray(NsFadeNode *this); // idb
void __thiscall NsFadeNode::IdleSetting2(NsFadeNode *this); // idb
void __thiscall NsFadeNode::FadeSetting2(NsFadeNode *this); // idb
NiNode *__thiscall NsFadeNode::CreateClone(NsFadeNode *this, NiCloningProcess *kCloning);
void __thiscall NsFadeNode::CallBackFadeEnd(NsFadeNode *this); // idb
NiRTTI *NiAlphaRefController::GetRTTI();
void __thiscall NiAlphaRefController::GetTargetFloatValue(NiAlphaRefController *this, float *fValue); // idb
char __stdcall NiAlphaRefController::InterpTargetIsCorrectType(NiObjectNET *pkTarget);
NiAlphaRefController *__thiscall NiAlphaRefController::`vector deleting destructor'(NiAlphaRefController *this, unsigned int a2);
void __thiscall NsFadeNode::GetViewerStrings(NsFadeNode *this, NiTArray<char *> *pStrings); // idb
NiPoint3InterpController *__thiscall NiAlphaRefController::CreateClone(NiAlphaRefController *this, NiCloningProcess *kCloning);
void __thiscall NiAlphaRefController::GetViewerStrings(NiAlphaRefController *this, NiTArray<char *> *pStrings); // idb
signed int __stdcall NsFadeNode::FindChildGeometry::ProcessData(NiAVObject *_pkObject, void *_pData);
void __thiscall NsFadeNode::~NsFadeNode(NsFadeNode *this); // idb
void __thiscall NsFadeNode::TestActive(NsFadeNode *this); // idb
void __thiscall NsFadeNode::Start(NsFadeNode *this, float _fTime, bool _bFadeOut); // idb
void __thiscall NsFadeNode::CreateAlphaController(NsFadeNode *this); // idb
NsFadeNode *__thiscall NsFadeNode::`scalar deleting destructor'(NsFadeNode *this, unsigned int a2);
void __thiscall NsFadeNode::InitFadeData(NsFadeNode *this); // idb
void __thiscall NsFadeNode::UpdateUseLength(NsFadeNode *this); // idb
void __thiscall NsFadeNode::UpdateFade(NsFadeNode *this, bool bSelectiveUpdate); // idb
void __thiscall NsFadeNode::UpdateDownwardPass(NsFadeNode *this, float fTime, int bUpdateControllers);
void __thiscall NsFadeNode::UpdateSelectedDownwardPass(NsFadeNode *this, float fTime); // idb
void __thiscall NsFadeNode::UpdateRigidDownwardPass(NsFadeNode *this, float fTime); // idb
void __thiscall NiTextureEffect::SetEffectTexture(NiTextureEffect *this, NiTexture *pkTexture); // idb
void __thiscall NsShadowObject::~NsShadowObject(NsShadowObject *this); // idb
void __thiscall NsShadowObject::UpdateEdgeCameraAndLineClick(NsShadowObject *this); // idb
void __thiscall NsShadowObject::MakeLines(NsShadowObject *this, unsigned int _uiSize); // idb
void __thiscall NsShadowObject::UpdateShadowCamera(NsShadowObject *this, float fTime, float fAddRadiusPercent); // idb
void __thiscall NsShadowObject::UpdateProjection(NsShadowObject *this); // idb
void __thiscall NsShadowObject::SetMultiEffect(NsShadowObject *this, bool _bMultEffect); // idb
void __thiscall NsShadowObject::ClickAndStuff(NsShadowObject *this, float fTime, float fAddRadiusPercent); // idb
NiRTTI *MasterPropertyAccumulator::GetRTTI();
MasterPropertyAccumulator *__thiscall MasterPropertyAccumulator::`scalar deleting destructor'(MasterPropertyAccumulator *this, unsigned int a2);
void __thiscall NsShadowObject::NsShadowObject(NsShadowObject *this); // idb
NsShadowObject *__cdecl NsShadowObject::Create(NiRenderer *pRenderer, unsigned int uiDetail); // idb
std::_List_nod<NiPointer<NiAVObject>,std::allocator<NiPointer<NiAVObject> > >::_Node **__stdcall std::_List_val<NiPointer<NiAVObject>,std::allocator<NiPointer<NiAVObject>>>::_Buynode(std::_List_nod<NiPointer<NiAVObject>,std::allocator<NiPointer<NiAVObject> > >::_Node *_Next, std::_List_nod<NiPointer<NiAVObject>,std::allocator<NiPointer<NiAVObject> > >::_Node *_Prev, NiPointer<NiAVObject> *_Val);
void __thiscall std::list<NiPointer<NiAVObject>,std::allocator<NiPointer<NiAVObject>>>::clear(std::list<NiPointer<NiAVObject>,std::allocator<NiPointer<NiAVObject> > > *this); // idb
signed int __stdcall FindMultiLinkNode::ProcessData(NiAVObject *_pkObject, void *_pData);
signed int __stdcall FindRoomNode::ProcessData(NiAVObject *_pkObject, void *_pData);
void __thiscall NsMergePortal::Clear(NsMergePortal *this); // idb
char __thiscall NsMergePortal::Init(NsMergePortal *this);
void __thiscall std::list<NiPointer<NiAVObject>,std::allocator<NiPointer<NiAVObject>>>::~list<NiPointer<NiAVObject>,std::allocator<NiPointer<NiAVObject>>>(std::list<NiPointer<NiAVObject>,std::allocator<NiPointer<NiAVObject> > > *this); // idb
void __thiscall NsMergePortal::NsMergePortal(NsMergePortal *this); // idb
void __thiscall NsMergePortal::~NsMergePortal(NsMergePortal *this); // idb
void __thiscall NsMergePortal::process(NsMergePortal *this, NiNode *_pNode); // idb
char __thiscall PgNsTerrain::LoadEditedVertexGap(PgNsTerrain *this, const char *_szFileName);
unsigned int __thiscall PgNsTerrain::CPgTerrainLayer::GetBlendValue(PgNsTerrain::CPgTerrainLayer *this, const float *i_fU1, const float *i_fV1, const float *i_fU2, const float *i_fV2, const float *i_fMinAlpha); // idb
std::_Tree_nod<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>::_Min(std::_Tree_nod<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *_Pnode); // idb
std::_Tree_nod<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>::_Max(std::_Tree_nod<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *_Pnode); // idb
boost::checked_deleter<PgNsTerrain::CPgBlockObject> *__thiscall boost::detail::sp_counted_base_impl<PgNsTerrain::CPgBlockObject *,boost::checked_deleter<PgNsTerrain::CPgBlockObject>>::get_deleter(boost::detail::sp_counted_base_impl<PgNsTerrain::CPgBlockObject *,boost::checked_deleter<PgNsTerrain::CPgBlockObject> > *this, type_info *ti);
NiSourceTexture *__cdecl GetImage2Image(const char *i_szImageFileName, float **o_ppData, float i_fInit);
NiSourceTexture *__cdecl GetImage2Image(const char *i_szImageFileName, float **o_ppData);
char __thiscall PgNsTerrain::BlendTest(PgNsTerrain *this, unsigned int i_uiLayerNum, float i_fX1, float i_fY1, float i_fX2, float i_fY2, float i_fMinAlpha);
char __thiscall PgNsTerrain::GetPositionDirectFind(PgNsTerrain *this, float i_fPosX, float i_fPosY, float *fPosZ_, NiPoint3 *pnormal_);
char __thiscall PgNsTerrain::GetPositionDirectFind(PgNsTerrain *this, float i_fPosX, float i_fPosY, NiPoint3 *pos3Position_, NiPoint3 *pnormal_);
char __thiscall PgNsTerrain::SetDecal(PgNsTerrain *this, float _fPosX, float _fPosY, float _fLengthX, float _fLengthY, NiTriShape *_pkTriShape);
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<Effect *,std::less<Effect *>,std::allocator<Effect *>,0>>,std::_Iterator_base0>::operator++(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >,std::_Iterator_base0> *this); // idb
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>,std::_Iterator_base0>::operator++(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *this); // idb
PgNsTerrain::CPgTerrainLayer *__stdcall std::allocator<PgNsTerrain::CPgTerrainLayer>::allocate(unsigned int _Count);
void __thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Lrotate(std::_Tree<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this, std::_Tree_nod<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *_Wherenode); // idb
void __thiscall boost::detail::sp_counted_base_impl<PgNsTerrain::CPgBlockObject *,boost::checked_deleter<PgNsTerrain::CPgBlockObject>>::dispose(boost::detail::sp_counted_base_impl<PgNsTerrain::CPgBlockObject *,boost::checked_deleter<PgNsTerrain::CPgBlockObject> > *this); // idb
void __thiscall std::pair<unsigned int const,boost::shared_ptr<PgNsTerrain::CPgBlockObject>>::~pair<unsigned int const,boost::shared_ptr<PgNsTerrain::CPgBlockObject>>(std::pair<unsigned int const ,boost::shared_ptr<PgNsTerrain::CPgBlockObject> > *this); // idb
void __thiscall boost::detail::shared_count::shared_count(boost::detail::shared_count *this, PgNsTerrain::CPgBlockObject *p, boost::checked_deleter<PgNsTerrain::CPgBlockObject> d); // idb
void __thiscall PgNsTerrain::LayerReGenerate(PgNsTerrain *this); // idb
char *__thiscall boost::pool<boost::default_user_allocator_new_delete>::malloc_need_resize(boost::pool<boost::default_user_allocator_new_delete> *this);
void __stdcall boost::fast_pool_allocator<std::pair<unsigned int const,boost::shared_ptr<PgNsTerrain::CPgBlockObject>>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>::construct(std::pair<unsigned int const ,boost::shared_ptr<PgNsTerrain::CPgBlockObject> > *const ptr, std::pair<unsigned int const ,boost::shared_ptr<PgNsTerrain::CPgBlockObject> > *t);
void __thiscall PgNsTerrain::CPgTerrainLayer::CPgTerrainLayer(PgNsTerrain::CPgTerrainLayer *this); // idb
void __thiscall PgNsTerrain::CPgTerrainLayer::~CPgTerrainLayer(PgNsTerrain::CPgTerrainLayer *this); // idb
void __thiscall PgNsTerrain::CPgTerrainLayer::CPgTerrainLayer(PgNsTerrain::CPgTerrainLayer *this, PgNsTerrain::CPgTerrainLayer *__that); // idb
PgNsTerrain::CPgTerrainLayer *__cdecl std::_Move<PgNsTerrain::CPgTerrainLayer *,PgNsTerrain::CPgTerrainLayer *>(PgNsTerrain::CPgTerrainLayer *_First, PgNsTerrain::CPgTerrainLayer *_Last, PgNsTerrain::CPgTerrainLayer *_Dest);
boost::singleton_pool<boost::fast_pool_allocator_tag,24,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>::pool_type *__cdecl boost::details::pool::singleton_default<boost::singleton_pool<boost::fast_pool_allocator_tag,24,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>::pool_type>::instance(); // idb
PgNsTerrain::CPgTerrainLayer *__cdecl std::_Uninit_move<PgNsTerrain::CPgTerrainLayer *,PgNsTerrain::CPgTerrainLayer *,std::allocator<PgNsTerrain::CPgTerrainLayer>,PgNsTerrain::CPgTerrainLayer>(PgNsTerrain::CPgTerrainLayer *_First, PgNsTerrain::CPgTerrainLayer *_Last, PgNsTerrain::CPgTerrainLayer *_Dest);
void __cdecl std::_Uninit_def_fill_n<PgNsTerrain::CPgTerrainLayer *,unsigned int,PgNsTerrain::CPgTerrainLayer,std::allocator<PgNsTerrain::CPgTerrainLayer>,PgNsTerrain::CPgTerrainLayer>(PgNsTerrain::CPgTerrainLayer *_First, unsigned int _Count);
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>::erase(std::_Tree<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > > _Where); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > > *__thiscall std::_Tree<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>::erase(std::_Tree<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > > _Where); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>::erase(std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > > _Where); // idb
void __thiscall std::_Tree<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>::_Erase(std::_Tree<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *_Rootnode); // idb
void __thiscall std::_Tree<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>::_Erase(std::_Tree<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this, std::_Tree_nod<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *_Rootnode); // idb
void __thiscall std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>::_Erase(std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *_Rootnode); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>::_Insert(std::_Tree<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *_Newnode); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>::_Insert(std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *_Newnode); // idb
std::_Tree_nod<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>::_Buynode(std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this); // idb
std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>::_Buynode(std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this); // idb
void __thiscall std::_Tree_val<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>::~_Tree_val<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>(std::_Tree_val<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this); // idb
void __thiscall std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>::~_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>(std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this); // idb
void __thiscall std::_Tree_val<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>::_Tree_val<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>(std::_Tree_val<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this, PgNsTerrain::EVGLess *_Parg, boost::fast_pool_allocator<std::pair<PgNsTerrain::val const ,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32> _Al); // idb
void __thiscall std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>(std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this, std::less<unsigned int> *_Parg, boost::fast_pool_allocator<std::pair<unsigned int const ,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32> _Al); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *_Node, bool _Leftish); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *_Node, bool _Leftish); // idb
std::_Tree_nod<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>::_Buynode<std::pair<unsigned int const,boost::shared_ptr<PgNsTerrain::CPgBlockObject>>>(std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this, std::pair<unsigned int const ,boost::shared_ptr<PgNsTerrain::CPgBlockObject> > *_Val); // idb
std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>::_Buynode<std::pair<unsigned int const,unsigned int>>(std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this, std::pair<unsigned int const ,unsigned int> *_Val); // idb
std::_Vector_iterator<std::_Vector_val<PgNsTerrain::CPgTerrainLayer,std::allocator<PgNsTerrain::CPgTerrainLayer> > > *__thiscall std::vector<PgNsTerrain::CPgTerrainLayer,std::allocator<PgNsTerrain::CPgTerrainLayer>>::erase(std::vector<PgNsTerrain::CPgTerrainLayer,std::allocator<PgNsTerrain::CPgTerrainLayer> > *this, std::_Vector_iterator<std::_Vector_val<PgNsTerrain::CPgTerrainLayer,std::allocator<PgNsTerrain::CPgTerrainLayer> > > *result, std::_Vector_const_iterator<std::_Vector_val<PgNsTerrain::CPgTerrainLayer,std::allocator<PgNsTerrain::CPgTerrainLayer> > > _First_arg, std::_Vector_const_iterator<std::_Vector_val<PgNsTerrain::CPgTerrainLayer,std::allocator<PgNsTerrain::CPgTerrainLayer> > > _Last_arg); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>::erase(std::_Tree<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > > _Last); // idb
void __thiscall std::vector<PgNsTerrain::CPgTerrainLayer,std::allocator<PgNsTerrain::CPgTerrainLayer>>::reserve(std::vector<PgNsTerrain::CPgTerrainLayer,std::allocator<PgNsTerrain::CPgTerrainLayer> > *this, unsigned int _Count); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > > *__thiscall std::_Tree<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>::erase(std::_Tree<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > > _Last); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>::erase(std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > > _Last); // idb
void __thiscall std::vector<PgNsTerrain::CPgTerrainLayer,std::allocator<PgNsTerrain::CPgTerrainLayer>>::~vector<PgNsTerrain::CPgTerrainLayer,std::allocator<PgNsTerrain::CPgTerrainLayer>>(std::vector<PgNsTerrain::CPgTerrainLayer,std::allocator<PgNsTerrain::CPgTerrainLayer> > *this); // idb
void __thiscall std::vector<PgNsTerrain::CPgTerrainLayer,std::allocator<PgNsTerrain::CPgTerrainLayer>>::_Reserve(std::vector<PgNsTerrain::CPgTerrainLayer,std::allocator<PgNsTerrain::CPgTerrainLayer> > *this, unsigned int _Count); // idb
void __thiscall std::vector<PgNsTerrain::CPgTerrainLayer,std::allocator<PgNsTerrain::CPgTerrainLayer>>::push_back(std::vector<PgNsTerrain::CPgTerrainLayer,std::allocator<PgNsTerrain::CPgTerrainLayer> > *this, PgNsTerrain::CPgTerrainLayer *_Val); // idb
void __thiscall std::vector<PgNsTerrain::CPgTerrainLayer,std::allocator<PgNsTerrain::CPgTerrainLayer>>::resize(std::vector<PgNsTerrain::CPgTerrainLayer,std::allocator<PgNsTerrain::CPgTerrainLayer> > *this, unsigned int _Newsize); // idb
void __thiscall std::map<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>>::~map<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>>(std::map<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32> > *this); // idb
char __thiscall PgNsTerrain::ReceiveScriptNode(PgNsTerrain *this, INsFile *_pNsFile);
void __thiscall std::map<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>>::~map<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>>(std::map<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32> > *this); // idb
void __thiscall PgNsTerrain::CPgTerrainBlock::CPgTerrainBlock(PgNsTerrain::CPgTerrainBlock *this); // idb
void __thiscall PgNsTerrain::CPgTerrainBlock::~CPgTerrainBlock(PgNsTerrain::CPgTerrainBlock *this); // idb
void __thiscall PgNsTerrain::PgNsTerrain(PgNsTerrain *this); // idb
char __cdecl PgTerrainScript_CallBack(INsFile *_pNsFile, void *_pData);
char __thiscall PgNsTerrain::ReadInfoFile(PgNsTerrain *this, const char *i_szFileName);
char __thiscall PgNsTerrain::MakeGeometry(PgNsTerrain *this, PgNsTerrain::CPgBlockObject *i_pBlockObject);
void __thiscall PgNsTerrain::GenerateBlock(PgNsTerrain *this); // idb
void __thiscall PgNsTerrain::~PgNsTerrain(PgNsTerrain *this); // idb
void __thiscall PgNsTerrain::GenerateLayer(PgNsTerrain *this); // idb
char __thiscall PgNsTerrain::LoadData(PgNsTerrain *this, const char *i_szFileName);
void __thiscall NsPathFinding::Init(NsPathFinding *this, unsigned int MapSx, unsigned int MapSy); // idb
int __thiscall NsPathFinding::LineIntersect(NsPathFinding *this, PXY *pxy_); // idb
int __thiscall NsPathFinding::SearchMoveable(NsPathFinding *this); // idb
void __thiscall NsPathFinding::_FindWay(NsPathFinding *this); // idb
PXY *__thiscall NsPathFinding::FindWay(NsPathFinding *this, PXY _kStartPos, PXY _kEndPos, unsigned int *dwGoalReached_, int *bDirectMove_, int *bChangedEndPos_, PXY *kJuncPos_, unsigned int *dwFWMaxStep_); // idb
bool __thiscall NsPathFinding::SearchWayPoints(NsPathFinding *this, NiPoint2 pos2Start, NiPoint2 pos2End, int nMaxArryCnt, NiPoint2 *pPos2Arr, int *nResultWayCnt); // idb
int __thiscall NsPathFinding::LineIntersect(NsPathFinding *this, float _fStartX, float _fStartY, float *_fEndX, float *_fEndY); // idb
void __thiscall IMakeBlockInfo::IMakeBlockInfo(IMakeBlockInfo *this); // idb
void __thiscall IMakeBlockInfo::~IMakeBlockInfo(IMakeBlockInfo *this); // idb
char __thiscall NsMakeBlockInfo_Byte::Save(NsMakeBlockInfo_Byte *this, const char *_szFileName);
char __thiscall NsMakeBlockInfo_Byte::Load(NsMakeBlockInfo_Byte *this, const char *_szFileName);
IMakeBlockInfo *__thiscall IMakeBlockInfo::`scalar deleting destructor'(IMakeBlockInfo *this, unsigned int a2);
Wml::Vector<3,double> *__thiscall Wml::Vector<3,double>::operator+(Wml::Vector<3,double> *this, Wml::Vector<3,double> *result, Wml::Vector<3,double> *rkV); // idb
Wml::Vector<3,double> *__thiscall Wml::Vector<3,double>::operator-(Wml::Vector<3,double> *this, Wml::Vector<3,double> *result, Wml::Vector<3,double> *rkV); // idb
long double __thiscall Wml::Vector<3,double>::Dot(Wml::Vector<3,double> *this, Wml::Vector<3,double> *rkV); // idb
long double __thiscall Wml::Vector<3,double>::Normalize(Wml::Vector<3,double> *this); // idb
Wml::Vector<3,double> *__cdecl Wml::operator*<3,double>(Wml::Vector<3,double> *result, long double fScalar, Wml::Vector<3,double> *rkV); // idb
void __thiscall Wml::Vector3<double>::Vector3<double>(Wml::Vector3<double> *this, long double fX, long double fY, long double fZ); // idb
long double *__thiscall Wml::Vector3<double>::Z(Wml::Vector3<double> *this); // idb
Wml::Vector3<double> *__thiscall Wml::Vector3<double>::Vector3<double>(Wml::Vector3<double> *this, Wml::Vector3<double> *rkV); // idb
void __cdecl Wml::Vector3<double>::GenerateOrthonormalBasis(Wml::Vector3<double> *rkU, Wml::Vector3<double> *rkV, Wml::Vector3<double> *rkW, bool bUnitLengthW); // idb
// int __usercall Find_double_@<eax>(Wml::Vector3<double> *rkDirection@<ecx>, Wml::Capsule3<double> *rkCapsule@<edx>, long double *afT@<ebx>, Wml::Vector3<double> *rkOrigin);
bool __cdecl FindIntersection<double>(Wml::Ray3<double> *rkRay, Wml::Capsule3<double> *rkCapsule, int *riQuantity, Wml::Vector3<double> *akPoint, long double *afT); // idb
void __thiscall Wml::Capsule3<double>::Capsule3<double>(Wml::Capsule3<double> *this); // idb
Wml::Vector3<double> *__thiscall Wml::Capsule3<double>::Origin(Wml::Capsule3<double> *this); // idb
Wml::Vector3<double> *__thiscall Wml::Capsule3<double>::Direction(Wml::Capsule3<double> *this); // idb
long double *__thiscall Wml::Capsule3<double>::Radius(Wml::Capsule3<double> *this); // idb
void __thiscall NiPropertyState::SwapProperties(NiPropertyState *this, NiTPointerList<NiPointer<NiProperty> > *kProplist); // idb
void __thiscall MasterPropertyAccumulator::~MasterPropertyAccumulator(MasterPropertyAccumulator *this); // idb
void __thiscall MasterPropertyAccumulator::RegisterObjectArray(HazeAccumulator *this, NiVisibleArray *kArray); // idb
void __thiscall MasterPropertyAccumulator::FinishAccumulating(MasterPropertyAccumulator *this); // idb
NiCollisionObject *__thiscall MasterPropertyAccumulator::CreateClone(MasterPropertyAccumulator *this, NiCloningProcess *kCloning);
void __thiscall PgNsPicking::PgNsPicking(PgNsPicking *this); // idb
void __thiscall PgNsPicking::~PgNsPicking(PgNsPicking *this); // idb
void __thiscall Wml::Ray3<double>::Ray3<double>(Wml::Segment3<double> *this); // idb
CBaseObject *__thiscall CDataDocument::GetObjectByName(CDataDocument *this, const char *pkName); // idb
CDataDocument *__cdecl CDataDocument::Instance(); // idb
char __thiscall CDataDocument::DelObject(CDataDocument *this, CBaseObject *pObj);
bool __thiscall CDataDocument::AddObject(CDataDocument *this, CBaseObject *pObj); // idb
char __thiscall CDataDocument::Load(CDataDocument *this, const char *pkFileFullName);
void __thiscall NiTSet<CPostProcessEffect *>::Realloc(NiTSet<CPostProcessEffect *> *this, unsigned int uiNewSize); // idb
CPostProcessEffect *__thiscall CPostProcessEffectManager::GetEffect(CPostProcessEffectManager *this, unsigned int uiType); // idb
void __thiscall CPostProcessEffectManager::RemoveAllEffects(CPostProcessEffectManager *this); // idb
void __thiscall CPostProcessEffectManager::OnRenderSceneStart(CPostProcessEffectManager *this); // idb
void __thiscall CPostProcessEffectManager::OnRenderSceneEnd(CPostProcessEffectManager *this); // idb
void __cdecl CPostProcessEffectManager::Destroy(); // idb
void __thiscall CPostProcessEffectManager::Initialize(CPostProcessEffectManager *this); // idb
void __thiscall CPostProcessEffectManager::Recreate(CPostProcessEffectManager *this); // idb
CPostProcessEffectManager *__cdecl CPostProcessEffectManager::GetInstance(); // idb
void __thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Construct<std::_String_iterator<char,std::char_traits<char>,std::allocator<char>>>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, std::_String_iterator<char,std::char_traits<char>,std::allocator<char> > _First, std::_String_iterator<char,std::char_traits<char>,std::allocator<char> > _Last, std::forward_iterator_tag __formal); // idb
CAbstractProperty *__thiscall CRTTI::FindProperty(CRTTI *this, const char *pFindName); // idb
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *_Node, bool _Leftish); // idb
std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *__cdecl std::make_pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty * &>(std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *result, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Val1, CAbstractProperty **_Val2); // idb
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,CAbstractProperty *>>,0>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>>(std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > *this, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *_Val); // idb
void __thiscall CRTTI::AddProperty(CRTTI *this, CAbstractProperty *pProperty); // idb
void __thiscall CRTTI::CRTTI(CRTTI *this, unsigned int dwStub, const char *szClassName, CRTTI *pBaseClassRTTI, bool (__cdecl *pReflectionFunc)()); // idb
CNullClass *__thiscall CNullClass::`scalar deleting destructor'(CNullClass *this, unsigned int a2);
void __thiscall CWorldConfig::SetGound_DL_Enable(CWorldConfig *this, bool bEnable); // idb
int CTypedProperty<bool>::GetType();
type_info *CTypedProperty<bool>::GetTypeInfo();
CRTTI *CRTTIClass<CBaseObject,CNullClass>::GetRTTI();
CProperty<CWorldConfig,bool> *__thiscall CProperty<CWorldConfig,bool>::`vector deleting destructor'(CProperty<CWorldConfig,bool> *this, unsigned int a2);
int __thiscall CProperty<CWorldConfig,bool>::GetValue(CProperty<CWorldConfig,bool> *this, CBaseObject *pOwner);
void __thiscall CProperty<CWorldConfig,bool>::SetValue(CProperty<CWorldConfig,bool> *this, CBaseObject *pOwner, int Value);
void __thiscall CWorldConfig::InitalizeGroundLight(CWorldConfig *this, NiPointer<NiNode> spGround, NiPointer<NiDirectionalLight> spLight); // idb
void __cdecl CWorldConfig::RegisterReflection();
void __thiscall CWorldConfig::~CWorldConfig(CWorldConfig *this); // idb
CRTTI *CRTTIClass<CWorldConfig,CBaseObject>::GetRTTI();
void __thiscall CWorldConfig::CWorldConfig(CWorldConfig *this); // idb
CWorldConfig *__thiscall CWorldConfig::`scalar deleting destructor'(CWorldConfig *this, unsigned int a2);
void __thiscall HeightMapMaker::GroupIndex::GroupIndex(HeightMapMaker::GroupIndex *this); // idb
void __thiscall HeightMapMaker::GroupIndex::~GroupIndex(HeightMapMaker::GroupIndex *this); // idb
void __thiscall HeightMapMaker::HeightMapMaker(HeightMapMaker *this); // idb
void __thiscall HeightMapMaker::Clear(HeightMapMaker *this); // idb
void __thiscall HeightMapMaker::~HeightMapMaker(HeightMapMaker *this); // idb
HeightMapMaker *__thiscall HeightMapMaker::`vector deleting destructor'(HeightMapMaker *this, unsigned int a2);
bool __thiscall CPostProcessEffect::GetActive(CPostProcessEffect *this); // idb
void __thiscall CPostProcessEffect::SetActive(CPostProcessEffect *this, bool bActive); // idb
void __thiscall CPostProcessEffect::CPostProcessEffect(CPostProcessEffect *this, bool bActive, unsigned int uiType); // idb
NiRTTI *CPostProcessEffect::GetRTTI();
bool __thiscall CHazeScreenEffect::ResizeRenderTarget(CHazeScreenEffect *this, int iWidth, int iHeight); // idb
// void __usercall HazeAccumulator::FinishAccumulating(HazeAccumulator *this@<ecx>, NiRenderer *a2@<esi>);
char __thiscall CHazeScreenEffect::CreateEffect(CHazeScreenEffect *this, int iWidth, int iHeight);
void __thiscall CHazeScreenEffect::CleanupEffect(CHazeScreenEffect *this); // idb
void __thiscall CHazeScreenEffect::RenderFrame(CHazeScreenEffect *this, NiRenderTargetGroup *pkRenderTarget); // idb
void __thiscall CHazeScreenEffect::SetParentNode(CHazeScreenEffect *this, NiPointer<NiNode> spNode, NiPointer<NiCamera> spMainCamera); // idb
void __thiscall HazeAccumulator::HazeAccumulator(HazeAccumulator *this); // idb
NiRTTI *HazeAccumulator::GetRTTI();
void __thiscall HazeAccumulator::~HazeAccumulator(HazeAccumulator *this); // idb
void __thiscall CRTTIClass<CWorldConfig,CBaseObject>::~CRTTIClass<CWorldConfig,CBaseObject>(CRTTIClass<CHazeScreenEffect,CBaseObject> *this); // idb
HazeAccumulator *__thiscall HazeAccumulator::`scalar deleting destructor'(HazeAccumulator *this, unsigned int a2);
void __thiscall CHazeScreenEffect::~CHazeScreenEffect(CHazeScreenEffect *this); // idb
NiRTTI *CHazeScreenEffect::GetRTTI();
CRTTI *CRTTIClass<CHazeScreenEffect,CBaseObject>::GetRTTI();
CHazeScreenEffect *__thiscall CHazeScreenEffect::`vector deleting destructor'(char *this, unsigned int a2);
NiD3DShaderProgramCreator *__thiscall NiShaderRequirementDesc::GetMinVertexShaderVersion(NiD3DShaderProgram *this); // idb
void __thiscall CHazeScreenEffect::CHazeScreenEffect(CHazeScreenEffect *this, const char *szShaderName, bool bActive); // idb
CHazeScreenEffect *__thiscall CHazeScreenEffect::`vector deleting destructor'(CHazeScreenEffect *this, unsigned int a2);
bool __cdecl UtilFunc::GetINI_String(const char *pcFilepath, const char *pcSection, const char *pcKey, char *pcReturnBuffer, unsigned int uiBufferSize, const char *pcDefault); // idb
bool __cdecl UtilFunc::IsFileExist(const char *pcFilePath); // idb
char __thiscall CGlowScreenEffect::ResetNumBlurring(CGlowScreenEffect *this, int iNumBlurring);
// void __userpurge CGlowScreenEffect::RenderFrame(CGlowScreenEffect *this@<ecx>, int a2@<edi>, NiRenderTargetGroup *pkRenderTarget);
int __cdecl CompareWeight(const void *pArgu1, const void *pArgu2); // idb
void __thiscall CGlowScreenEffect::UpdateDownScale4x4(CGlowScreenEffect *this); // idb
void __thiscall CGlowScreenEffect::UpdateDownScale2x2(CGlowScreenEffect *this); // idb
void __stdcall CGlowScreenEffect::SetGlowEffectGlowness(float fGlowness);
void __stdcall CGlowScreenEffect::SetGlowEffectBlendFactor(float fBlendFactor);
void __thiscall CGlowScreenEffect::SetGlowEffectNumBlurring(CGlowScreenEffect *this, unsigned int uNumBlurring); // idb
double CGlowScreenEffect::GetGlowEffectGlowness();
double CGlowScreenEffect::GetGlowEffectBlendFactor();
double CGlowScreenEffect::GetGlowEffectDownScaling();
unsigned int CGlowScreenEffect::GetGlowEffectNumBlurring();
double CGlowScreenEffect::GetGlowEffectGaussFactor();
int __thiscall  __thiscall CPostProcessEffect::`vcall'{36,{flat}}(void *this);
void __thiscall CGlowScreenEffect::UpdateSampleWeights(CGlowScreenEffect *this, float fGaussFactor); // idb
void __thiscall CGlowScreenEffect::SetGlowEffectGaussFactor(CGlowScreenEffect *this, float fGaussFactor); // idb
int CTypedProperty<float>::GetType();
type_info *CTypedProperty<float>::GetTypeInfo();
int CTypedProperty<unsigned int>::GetType();
type_info *CTypedProperty<unsigned int>::GetTypeInfo();
CProperty<CGlowScreenEffect,bool> *__thiscall CProperty<CGlowScreenEffect,bool>::`scalar deleting destructor'(CProperty<CGlowScreenEffect,bool> *this, unsigned int a2);
CProperty<CGlowScreenEffect,float> *__thiscall CProperty<CGlowScreenEffect,float>::`vector deleting destructor'(CProperty<CGlowScreenEffect,float> *this, unsigned int a2);
void __thiscall CProperty<CGlowScreenEffect,float>::SetValue(CProperty<CGlowScreenEffect,float> *this, CBaseObject *pOwner, float Value); // idb
CProperty<CGlowScreenEffect,unsigned int> *__thiscall CProperty<CGlowScreenEffect,unsigned int>::`vector deleting destructor'(CProperty<CGlowScreenEffect,unsigned int> *this, unsigned int a2);
char __thiscall CGlowScreenEffect::CreateEffect(CGlowScreenEffect *this, int iWidth, int iHeight);
char __thiscall CGlowScreenEffect::ResizeRenderTarget(CGlowScreenEffect *this, int iWidth, int iHeight);
char __thiscall CGlowScreenEffect::ResizeDownscaleRenderTarget(CGlowScreenEffect *this, int iWidth, int iHeight);
void __thiscall CGlowScreenEffect::SetGlowEffectDownScaling(CGlowScreenEffect *this, float uDownScaling); // idb
void __cdecl CGlowScreenEffect::RegisterReflection();
void __thiscall CGlowScreenEffect::~CGlowScreenEffect(CGlowScreenEffect *this); // idb
NiRTTI *CGlowScreenEffect::GetRTTI();
CRTTI *CRTTIClass<CGlowScreenEffect,CBaseObject>::GetRTTI();
CGlowScreenEffect *__thiscall CGlowScreenEffect::`vector deleting destructor'(char *this, unsigned int a2);
void __thiscall CGlowScreenEffect::CGlowScreenEffect(CGlowScreenEffect *this, const char *szShaderName, bool bActive); // idb
CGlowScreenEffect *__thiscall CGlowScreenEffect::`scalar deleting destructor'(CGlowScreenEffect *this, unsigned int a2);
void __thiscall CAfterImageEffect::SetFirstRender(CAfterImageEffect *this, bool bReset); // idb
bool __thiscall CAfterImageEffect::ResizeRenderTarget(CAfterImageEffect *this, int iWidth, int iHeight); // idb
void __thiscall CAfterImageEffect::CleanupEffect(CAfterImageEffect *this); // idb
int __thiscall  __thiscall CAfterImageEffect::`vcall'{56,{flat}}(void *this);
char __thiscall CAfterImageEffect::CreateEffect(CAfterImageEffect *this, int iWidth, int iHeight);
void __thiscall CAfterImageEffect::RenderFrame(CAfterImageEffect *this, NiRenderTargetGroup *pkRenderTarget); // idb
CProperty<CAfterImageEffect,bool> *__thiscall CProperty<CAfterImageEffect,bool>::`scalar deleting destructor'(CProperty<CAfterImageEffect,bool> *this, unsigned int a2);
int __thiscall CProperty<CGlowScreenEffect,bool>::GetValue(CProperty<CGlowScreenEffect,unsigned int> *this, CBaseObject *pOwner);
void __cdecl CAfterImageEffect::RegisterReflection();
void __thiscall CAfterImageEffect::~CAfterImageEffect(CAfterImageEffect *this); // idb
NiRTTI *CAfterImageEffect::GetRTTI();
bool __thiscall CAfterImageEffect::GetFirstRender(CAfterImageEffect *this); // idb
CRTTI *CRTTIClass<CAfterImageEffect,CBaseObject>::GetRTTI();
CAfterImageEffect *__thiscall CAfterImageEffect::`vector deleting destructor'(char *this, unsigned int a2);
CRTTIClass<CHazeScreenEffect,CBaseObject> *__thiscall CRTTIClass<CGlowScreenEffect,CBaseObject>::`vector deleting destructor'(CRTTIClass<CHazeScreenEffect,CBaseObject> *this, unsigned int a2);
void __thiscall CAfterImageEffect::CAfterImageEffect(CAfterImageEffect *this, const char *szShaderName, bool bActive); // idb
CAfterImageEffect *__thiscall CAfterImageEffect::`scalar deleting destructor'(CAfterImageEffect *this, unsigned int a2);
void __thiscall CDepthOfFieldEffect::RenderFrame(CDepthOfFieldEffect *this, NiRenderTargetGroup *pkRenderTarget); // idb
bool __thiscall CDepthOfFieldEffect::ResizeRenderTarget(CDepthOfFieldEffect *this, int iWidth, int iHeight); // idb
void __thiscall CDepthOfFieldEffect::CleanupEffect(CDepthOfFieldEffect *this); // idb
CProperty<CDepthOfFieldEffect,bool> *__thiscall CProperty<CDepthOfFieldEffect,bool>::`scalar deleting destructor'(CProperty<CDepthOfFieldEffect,bool> *this, unsigned int a2);
void __thiscall CProperty<CGlowScreenEffect,bool>::SetValue(CProperty<CGlowScreenEffect,unsigned int> *this, CBaseObject *pOwner, unsigned int Value); // idb
void __cdecl CDepthOfFieldEffect::RegisterReflection();
void __thiscall CDepthOfFieldEffect::~CDepthOfFieldEffect(CDepthOfFieldEffect *this); // idb
NiRTTI *CDepthOfFieldEffect::GetRTTI();
CRTTI *CRTTIClass<CDepthOfFieldEffect,CBaseObject>::GetRTTI();
CDepthOfFieldEffect *__thiscall CDepthOfFieldEffect::`vector deleting destructor'(char *this, unsigned int a2);
void __thiscall CDepthOfFieldEffect::CDepthOfFieldEffect(CDepthOfFieldEffect *this, const char *szShaderName, bool bActive); // idb
CDepthOfFieldEffect *__thiscall CDepthOfFieldEffect::`scalar deleting destructor'(CDepthOfFieldEffect *this, unsigned int a2);
char __thiscall CDepthOfFieldEffect::CreateEffect(CDepthOfFieldEffect *this, int iWidth, int iHeight);
int __thiscall CScreenEffect::Initialize(CScreenEffect *this);
void __thiscall CScreenEffect::CleanupEffect(CScreenEffect *this); // idb
NiPixelFormat *__thiscall NiShaderRequirementDesc::GetMinPixelShaderVersion(NiDX92DBufferData *this); // idb
void *__thiscall CScreenEffect::GetTargetTexture(NiD3DShaderProgram *this); // idb
void __thiscall CScreenEffect::RenderFrame(CScreenEffect *this, NiRenderTargetGroup *pkRenderTarget); // idb
char __thiscall CScreenEffect::CreateEffect(CScreenEffect *this, int iWidth, int iHeight);
char __thiscall CScreenEffect::CreateEffect(CScreenEffect *this, NiRenderedTexture *pkTexture);
char __thiscall CScreenEffect::ResizeRenderTarget(CScreenEffect *this, int iWidth, int iHeight);
// char __userpurge CScreenEffect::ResizeRenderTarget@<al>(CScreenEffect *this@<ecx>, int a2@<ebx>, int a3@<edi>, NiRenderedTexture *pkTexture);
void __thiscall CScreenEffect::~CScreenEffect(CScreenEffect *this); // idb
NiRTTI *CScreenEffect::GetRTTI();
CScreenEffect *__thiscall CScreenEffect::`scalar deleting destructor'(CScreenEffect *this, unsigned int a2);
void __thiscall CScreenEffect::CScreenEffect(CScreenEffect *this, const char *szShaderName, bool bActive, unsigned int uiType); // idb
void __thiscall CScreenEffect::ApplyAndSetActiveMaterial(CScreenEffect *this, char *szMaterialName); // idb
int __stdcall PgFrameWork::ProcessNetMsg(int iDepart, int iCommand, int iRevBytes, void *pvData);
void __thiscall PgFrameWork::AddMsg(PgFrameWork *this, unsigned int uiMsg, unsigned int uiwParam, unsigned int uilParam); // idb
void __thiscall PgFrameWork::ProcessAllMsg(PgFrameWork *this); // idb
void __thiscall PgFrameWork::PostFrameMsgTerminate(PgFrameWork *this); // idb
void __stdcall PgFrameWork::PostFrameMsgStart(void *ID, PgMsg::Frame *pkFrameMsg);
void __thiscall PgFrameWork::PostFrameMsgChange(PgFrameWork *this, void *NextID, PgMsg::Frame *pkFrameMsg); // idb
void __thiscall PgFrameWork::PostFrameMsgPop(PgFrameWork *this, void *PopID, PgMsg::Frame *pkFrameMsg); // idb
void __thiscall PgFrameWork::PostFrameMsgUnPop(PgFrameWork *this); // idb
void __stdcall PgFrameWork::PostMsgToFrameWork(void *ID, PgMsg::Frame *pkFrameMsg);
void __thiscall PgFrameWork::PostMsgToMe(PgFrameWork *this, PgMsg::Frame *pkFrameMsg); // idb
void __thiscall PgFrameMgr::PgFrameMgr(PgFrameMgr *this); // idb
PgFrameMgr *__thiscall PgFrameMgr::`vector deleting destructor'(PgFrameMgr *this, unsigned int a2);
void __thiscall PgFrameMgr::~PgFrameMgr(PgFrameMgr *this); // idb
char __thiscall PgFrameMgr::PgInit(PgFrameMgr *this);
void __thiscall PgFrameMgr::PgTerminate(PgFrameMgr *this); // idb
PgFrameWork *__thiscall PgFrameMgr::GetFrameWork(PgFrameMgr *this, void *id); // idb
bool __thiscall PgFrameMgr::IsInRun(PgFrameMgr *this, void *ID); // idb
void __thiscall PgFrameMgr::AddInRun(PgFrameMgr *this, void *ID); // idb
void __thiscall PgFrameMgr::RemoveFromRun(PgFrameMgr *this, void *ID); // idb
void __thiscall PgFrameMgr::AddInSleep(PgFrameMgr *this, void *ID); // idb
void __thiscall PgFrameMgr::RemoveFromSleep(PgFrameMgr *this, void *ID); // idb
// void __thiscall PgFrameMgr::RemoveFromRunAndSleep(PgFrameMgr *this, void *ID); idb
// void __thiscall PgFrameMgr::RunFrameWork(PgFrameMgr *this, void *ID); idb
// void __thiscall PgFrameMgr::SleepFrameWork(PgFrameMgr *this, void *ID); idb
bool __thiscall PgFrameMgr::OnInitFrameWork(PgFrameMgr *this, void *ID, PgMsg::Frame *pkFrameMsgMsg); // idb
char __thiscall PgFrameMgr::OnTerminateFrameWork(PgFrameMgr *this, void *ID);
char __thiscall PgFrameMgr::OnTerminateFrameWorkWithBackFrameWork(PgFrameMgr *this, void *ID);
char __thiscall PgFrameMgr::OnStartFrameWork(PgFrameMgr *this, void *ID, PgMsg::Frame *pkFrameMsg);
char __thiscall PgFrameMgr::OnChangeFrameWork(PgFrameMgr *this, void *PrevID, void *NextID, PgMsg::Frame *pkFrameMsgMsg);
char __thiscall PgFrameMgr::OnPopFrameWork(PgFrameMgr *this, void *BackID, void *PopID, PgMsg::Frame *pkFrameMsgMsg);
char __thiscall PgFrameMgr::OnUnPopFrameWork(PgFrameMgr *this, void *ID);
char __thiscall PgFrameMgr::OnPostMsgToFrameWork(PgFrameMgr *this, void *ID, PgMsg::Frame *pkFrameMsg);
void __thiscall PgFrameMgr::ProcessMsg(PgFrameMgr *this); // idb
void __stdcall PgFrameWork::DirectDispatchToParent(int iMsgTag, void *pvBody, IDirectMessenger *pkFrom);
void __thiscall PgFrameMgr::Update(PgFrameMgr *this, float fCurTime); // idb
void __thiscall PgFrameMgr::Draw(PgFrameMgr *this); // idb
// void __thiscall PgFrameMgr::PostMsg(PgFrameMgr *this, PgMsg *ptPgMsg); idb
void __thiscall PgFrameMgr::PostMsg(PgFrameMgr *this, PgMsg *kPgMsg); // idb
void *__thiscall PgFrameMgr::RegisterFrameWork(PgFrameMgr *this, PgFrameWork *pkFrameWork); // idb
// bool __thiscall PgFrameMgr::Start(PgFrameMgr *this, void *ID, PgMsg::Frame *pkFrameMsgMsg); idb
void __thiscall PgFrameMgr::PostQuitMsg(PgFrameMgr *this, unsigned int uiExitCode); // idb
void __thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,void *,PgFrameWork *>::NiTMapBase<NiTPointerAllocator<unsigned int>,void *,PgFrameWork *>(NiTMapBase<NiTPointerAllocator<unsigned int>,void *,PgFrameWork *> *this, unsigned int uiHashSize); // idb
void __thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,void *,PgFrameWork *>::GetNext(NiTMapBase<NiTPointerAllocator<unsigned int>,void *,PgFrameWork *> *this, void **pos, void **key, PgFrameWork **val); // idb
void *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,void *>::RemovePos(NiTPointerListBase<NiTPointerAllocator<unsigned int>,void *> *this, void **kPos); // idb
void __thiscall PgTQueue<PgMsg::Frame>::Add(PgTQueue<PgMsg::Frame> *this, PgMsg::Frame element); // idb
PgMsg::Frame *__thiscall PgTQueue<PgMsg::Frame>::Remove(PgTQueue<PgMsg::Frame> *this, PgMsg::Frame *result); // idb
unsigned int __thiscall PgTQueue<PgMsg>::GetSize(PgTQueue<PgMsg> *this); // idb
void __thiscall PgTQueue<PgMsg>::Add(PgTQueue<PgMsg> *this, PgMsg element); // idb
PgMsg *__thiscall PgTQueue<PgMsg>::Remove(PgTQueue<PgMsg> *this, PgMsg *result); // idb
void *__thiscall NiTPointerListBase<DFALL<SpScreenText *>,SpScreenText *>::RemoveHead(NiTPointerListBase<NiTPointerAllocator<unsigned int>,void *> *this); // idb
void __thiscall PgTQueue<PgMsg::Frame>::Realloc(PgTQueue<PgMsg::Frame> *this, unsigned int uiNewSize); // idb
void __thiscall PgTQueue<PgMsg>::Realloc(PgTQueue<PgMsg> *this, unsigned int uiNewSize); // idb
PgMsg *__thiscall PgMsg::operator=(PgMsg *this, PgMsg *kPgMsg); // idb
void __thiscall PgTQueue<PgMsg>::PgTQueue<PgMsg>(PgTQueue<PgMsg> *this, unsigned int uiInitialSize); // idb
unsigned int __thiscall NiTMapBase<DFALL<PgEditWin *>,HWND__ *,PgEditWin *>::KeyToHashIndex(NiTMapBase<NiTPointerAllocator<unsigned int>,void *,PgFrameWork *> *this, void *key); // idb
void __thiscall NiTPointerMap<void *,PgFrameWork *>::~NiTPointerMap<void *,PgFrameWork *>(NiTPointerMap<void *,PgFrameWork *> *this); // idb
void __thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,void *,PgFrameWork *>::~NiTMapBase<NiTPointerAllocator<unsigned int>,void *,PgFrameWork *>(NiTMapBase<NiTPointerAllocator<unsigned int>,void *,PgFrameWork *> *this); // idb
void __stdcall NiTPointerMap<void *,PgFrameWork *>::DeleteItem(NiTMapItem<void *,PgFrameWork *> *pkItem);
void __thiscall PgTList<void *>::~PgTList<void *>(PgTList<void *> *this); // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,void *,PgFrameWork *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,void *,PgFrameWork *>::`vector deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,void *,PgFrameWork *> *this, unsigned int a2);
NiTPointerMap<void *,PgFrameWork *> *__thiscall NiTPointerMap<void *,PgFrameWork *>::`vector deleting destructor'(NiTPointerMap<void *,PgFrameWork *> *this, unsigned int a2);
PgTList<void *> *__thiscall PgTList<void *>::`scalar deleting destructor'(PgTList<void *> *this, unsigned int a2);
// void __thiscall PgWinFrame::PgWinFrame(PgWinFrame *this); idb
PgWinFrame *__thiscall PgWinFrame::`scalar deleting destructor'(PgWinFrame *this, unsigned int a2);
void __thiscall PgWinFrame::~PgWinFrame(PgWinFrame *this); // idb
void __thiscall PgWinFrame::SetFrameWork(PgWinFrame *this, PgFrameWork *pkFrameWork); // idb
void __thiscall PgWinFrame::ProcessMeInput(PgWinFrame *this, bool *bHit); // idb
char __thiscall PgWinFrame::Create(PgWinFrame *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, PgFrameWork *pkFrameWork, char *pcName, unsigned int uiExtStyle);
char __thiscall PgWinFrame::Create(PgWinFrame *this, int iXPos, int iYPos, NiSourceTexture *pkTexture, bool bMakeHitTestBuff, unsigned int uiTexelX, unsigned int uiTexelY, unsigned int uiTexelWidth, unsigned int uiTexelHeight, PgWin *pkParent, PgFrameWork *pkFrameWork, char *pcName, unsigned int uiExtStyle);
char __thiscall PgWinFrame::Create(PgWinFrame *this, int iXPos, int iYPos, PgWin *pkParent, PgFrameWork *pkFrameWork, char *pcName, unsigned int uiExtStyle);
bool __thiscall PgWinFrame::GetLeftLike(PgWinFrame *this); // idb
bool __thiscall PgWinFrame::GetTopLike(PgWinFrame *this); // idb
bool __thiscall PgWinFrame::GetRightLike(PgWinFrame *this); // idb
bool __thiscall PgWinFrame::GetBottomLike(PgWinFrame *this); // idb
void __thiscall PgWinFrame::ResetAttachPos(PgWinFrame *this); // idb
void __thiscall PgWinFrame::LikeMoveWin(PgWinFrame *this, int iXPos, int iYPos); // idb
void __thiscall PgWinFrame::SendDirectMessage(PgWinFrame *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall PgWinFrame::DirectDispatchToParent(PgWinFrame *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
PgWin *__cdecl PgWin::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, char *pcWinText, unsigned int uiExtStyle); // idb
void __thiscall PgWin::ProcessMeInput(PgWin *this, bool *bHit); // idb
void __thiscall PgWin::EnableChildButWin(PgWin *this, bool b); // idb
void __thiscall PgWin::PgWin(PgWin *this); // idb
PgWin *__thiscall PgWin::`scalar deleting destructor'(PgWin *this, unsigned int a2);
void __thiscall PgWin::EnableOpenCloseSound(PgWin *this, bool bEnable); // idb
void __thiscall PgWin::SetTopWin(PgWin *this); // idb
void PgNet::OnConnectLost();
void __thiscall PgWin::OnShowWin(PgWin *this); // idb
void __thiscall PgWin::OnClose(PgWin *this); // idb
char __thiscall PgWin::Create(PgWin *this, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, char *pcName, unsigned int uiExtStyle);
void __thiscall PgWin::~PgWin(PgWin *this); // idb
void __thiscall PgWin::ProcessMsg(PgWin *this, unsigned int Msg, unsigned int wParam, int lParam); // idb
char __stdcall PgWin::PostMsg(PgWin *pkWin, unsigned int Msg, unsigned int wParam, int lParam);
char __stdcall PgWin::SendMsg(PgWin *pkWin, unsigned int Msg, unsigned int wParam, int lParam);
char __stdcall PgWin::PostCommandMsg(PgWin *pkWin, unsigned int wParam, int lParam);
void __thiscall PgWin::OnVisible(PgWin *this, NiCullingProcess *kCuller); // idb
void __thiscall PgWin::CompactChildArray(PgWin *this, unsigned int uiSize); // idb
void __thiscall PgWin::SetToolTipWinText(PgWin *this, char *pcText); // idb
void __thiscall PgWin::OnFirstHitWin(PgWin *this); // idb
void __thiscall PgWin::AdjustPosIfIamToolTipWin(PgWin *this); // idb
void __thiscall PgWin::DirectDispatchToChildren(PgWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall PgWin::DirectDispatchToParent(PgWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom); // idb
void __thiscall PgWin::RemoveAllChildWin(PgWin *this); // idb
void PgWin::SetCursor();
char __thiscall PgWin::ProcessChildDrop(PgWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos);
bool __thiscall PgWin::ProcessDrop(PgWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos); // idb
char __thiscall PgWin::IsVisible(PgWin *this);
bool __thiscall PgWin::ProcessChildInput(PgWin *this); // idb
bool __thiscall PgWin::ProcessInput(PgWin *this); // idb
void __thiscall PgWin::ReleaseChildInput(PgWin *this); // idb
void __thiscall PgWin::ReleaseInput(PgWin *this); // idb
PgWin *__thiscall PgWin::GetLastChildWinIndex(PgWin *this, int *iPos); // idb
NiAVObject *__thiscall PgWin::GetPreChildWin(PgWin *this, int *iPos);
void __thiscall NiTArray<NiPointer<NiAVObject>>::Compact(NiTArray<NiPointer<NiAVObject> > *this); // idb
void __thiscall NiTArray<NiPointer<NiAVObject>>::UpdateSize(NiTArray<NiPointer<NiAVObject> > *this); // idb
PgWin::Bool *__thiscall PgWin::Bool::`vector deleting destructor'(PgWin::Bool *this, unsigned int a2);
void __thiscall PgWinSpr::PgWinSpr(PgWinSpr *this); // idb
PgWinSpr *__thiscall PgWinSpr::`vector deleting destructor'(PgWinSpr *this, unsigned int a2);
void __thiscall PgWinSpr::~PgWinSpr(PgWinSpr *this); // idb
PgWinSpr *__cdecl PgWinSpr::CreateWin(NiSourceTexture *pkTexture, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, char *pcName, unsigned int uiExtStyle); // idb
PgWinSpr *__cdecl PgWinSpr::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, char *pcName, unsigned int uiExtStyle); // idb
PgWinSpr *__cdecl PgWinSpr::CreateWin(int iXPos, int iYPos, NiSourceTexture *pkTexture, bool bMakeHitTestBuff, unsigned int uiTexelX, unsigned int uiTexelY, unsigned int uiTexelWidth, unsigned int uiTexelHeight, PgWin *pkParent, char *pcName, unsigned int uiExtStyle); // idb
PgWinSpr *__cdecl PgWinSpr::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, char *pcName, unsigned int uiExtStyle); // idb
char __thiscall PgWinSpr::Create(PgWinSpr *this, NiSourceTexture *pkTexture, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, char *pcName, unsigned int uiExtStyle);
char __thiscall PgWinSpr::Create(PgWinSpr *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, char *pcName, unsigned int uiExtStyle);
char __thiscall PgWinSpr::Create(PgWinSpr *this, int iXPos, int iYPos, NiSourceTexture *pkTexture, bool bMakeHitTestBuff, unsigned int uiTexelX, unsigned int uiTexelY, unsigned int uiTexelWidth, unsigned int uiTexelHeight, PgWin *pkParent, char *pcName, unsigned int uiExtStyle);
bool __thiscall PgWinSpr::Create(PgWinSpr *this, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, char *pcName, unsigned int uiExtStyle); // idb
char __thiscall PgWinSpr::SelectSpr(PgWinSpr *this, unsigned int uiIndex);
void __thiscall PgWinSpr::UnSelectSpr(PgWinSpr *this); // idb
void __thiscall PgWinText::PgWinText(PgWinText *this); // idb
PgWinText *__thiscall PgWinText::`scalar deleting destructor'(PgWinText *this, unsigned int a2);
void __thiscall PgWinText::~PgWinText(PgWinText *this); // idb
PgWinText *__cdecl PgWinText::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgFont *pkFont, PgWin *pkParent, char *pcName, unsigned int uiExtStyle); // idb
char __thiscall PgWinText::Create(PgWinText *this, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgFont *pkFont, PgWin *pkParent, char *pcName, unsigned int uiExtStyle);
int __cdecl PgWinText::SetArrayText(PgWinText **ppkTextWin, unsigned int uiTextWinCount, char *pcText);
void __thiscall PgWinText::SetAlpha(PgWinText *this, float fAlpha); // idb
double __thiscall PgWinText::GetAlpha(PgWinText *this);
char __thiscall PgWinText::GetTextSize(PgWinText *this, tagSIZE *kSize);
void __thiscall PgWinText::SetWidth(PgWinText *this, unsigned int uiWidth); // idb
void __thiscall PgWinText::SetHeight(PgWinText *this, unsigned int uiHeight); // idb
void __thiscall PgWinText::SetMultilineText(PgWinText *this, char *pcText, int iVerticalGap); // idb
void __cdecl PgUtil::WhileSpace(char **rpcStr); // idb
int __cdecl PgUtil::StringPixelCopy(char *pdest, char *psrc, HDC__ *hDC, int max_pixel); // idb
NiTimeController *__cdecl PgUtil::GetControllerWithChild(NiAVObject *pkObject, NiRTTI *pkRTTI); // idb
NiProperty *__cdecl PgUtil::GetPropertyWithChild(NiAVObject *pkObject, int iType); // idb
void __cdecl PgUtil::RemovePropWithChild(NiAVObject *pkObject, int iType); // idb
char __cdecl PgUtil::CatchGeometry(NiAVObject *pkObject, NiGeometry **pkGeometry);
NiScreenElementsData *__cdecl PgUtil::CreateScreenGeometryData(unsigned int uiTextureWidth, unsigned int uiTextureHeight, unsigned int uiXPos, unsigned int uiYPos, unsigned int uiWidth, unsigned int uiHeight); // idb
NiScreenElementsData *__cdecl PgUtil::CreateScreenGeometryData(unsigned int uiWidth, unsigned int uiHeight); // idb
NiSourceTexture *__cdecl PgUtil::Create1PixelSourceTexture(char R, char G, char B, char A); // idb
NiNode *__cdecl PgUtil::LoadNifFile(const char *pcFileName, NiTexturePalette *pTexturePalette);
char __cdecl PgUtil::LoadNodeNifFile(const char *pcFileName, NiPointer<NiNode> *spNode, NiTexturePalette *pTexturePalette);
void __cdecl PgUtil::TurnOnLightsInNode(NiAVObject *pkObject, bool bTurnOn); // idb
NiScreenElementsData *__cdecl PgUtil::CreateScreenGeometryDataFromTriShapeData(NiTriShapeData *pkTriShapeData, int *iLeft, int *iTop, unsigned int *uiWidth, unsigned int *uiHeight, float fTransX, float fTransY); // idb
char __cdecl PgUtil::GetTriShapeRect(NiAVObject *pkAVObj, const char *pcTriShapeName, int *iLeft, int *iTop, unsigned int *uiWidth, unsigned int *uiHeight);
char __cdecl PgUtil::CatchCamera(NiAVObject *pkObject, NiCamera **pkCamera);
char __cdecl PgUtil::Get2DOrthoPosFrom3DPos(NiCamera *pkWorldCamera, float fScreenWidth, float fScreenHeight, NiPoint3 k3DPos, NiPoint3 *k2DOrthoPos);
DIRECT3DTEXTURE9 *__cdecl PgUtil::GetDxTextureFrom(NiTexture *pkTex); // idb
// void __thiscall PgWinCullingProcess::PgWinCullingProcess(PgWinCullingProcess *this, NiVisibleArray *pkVisibleSet); idb
PgWinCullingProcess *__thiscall PgWinCullingProcess::`vector deleting destructor'(PgWinCullingProcess *this, unsigned int a2);
void __thiscall PgWinCullingProcess::~PgWinCullingProcess(PgWinCullingProcess *this); // idb
void __thiscall PgWinCullingProcess::Process(PgWinCullingProcess *this, NiCamera *pkCamera, NiAVObject *pkScene, NiVisibleArray *pkVisibleSet); // idb
void __thiscall PgWinCullingProcess::Process(PgWinCullingProcess *this, NiAVObject *pkObject); // idb
void __thiscall PgWinMgr::PgWinMgr(PgWinMgr *this); // idb
PgWinMgr *__thiscall PgWinMgr::`scalar deleting destructor'(PgWinMgr *this, unsigned int a2);
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *__thiscall NiTPointerList<NiPointer<PgWin>>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *this, unsigned int a2);
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin>>::NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin>>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *this); // idb
void __thiscall PgWinMgr::~PgWinMgr(PgWinMgr *this); // idb
char __thiscall PgWinMgr::PgInit(PgWinMgr *this);
void __thiscall PgWinMgr::PgTerminate(PgWinMgr *this); // idb
char __thiscall PgWinMgr::SetTopWin(PgWinMgr *this, PgWin *pkWin);
PgWin *__thiscall PgWinMgr::GetTopWin(PgWinMgr *this); // idb
char __thiscall PgWinMgr::ShowWin(PgWinMgr *this, PgWin *pkWin);
char __thiscall PgWinMgr::ShowWinAtAbsoluteNear(PgWinMgr *this, PgWin *pkWin);
char __thiscall PgWinMgr::ShowWinAtAbsoluteFar(PgWinMgr *this, PgWin *pkWin);
void __thiscall PgWinMgr::Call_OnCloseForSubWin(PgWinMgr *this, PgWin *pkWin); // idb
char __thiscall PgWinMgr::CloseWin(PgWinMgr *this, PgWin *pkWin);
void __thiscall PgWinMgr::CloseAllWin(PgWinMgr *this); // idb
void __stdcall PgWinMgr::SetScreenInfo(NiRenderer *pkRenderer);
void __thiscall PgWinMgr::DispatchMessageA(PgWinMgr *this); // idb
void __thiscall PgWinMgr::DirectDispatchAllWin(PgWinMgr *this, int iMsgTag, void *pvBody); // idb
void __thiscall PgWinMgr::ProcessInput(PgWinMgr *this, bool bUpdateMouse); // idb
void __thiscall PgWinMgr::UpdateWin(PgWinMgr *this, float fCurTime); // idb
void __thiscall PgWinMgr::Draw(PgWinMgr *this, NiRenderer *pkRenderer); // idb
char __thiscall PgWinMgr::DoModal(PgWinMgr *this, PgWin *pkModalWin, unsigned int Msg, unsigned int wParam, int lParam);
void __thiscall PgWinMgr::DestroyWin(PgWinMgr *this, PgWin *pkWin); // idb
void __thiscall PgWinMgr::DestroyAllWin(PgWinMgr *this); // idb
void __thiscall PgWinMgr::OpenPopupWin(PgWinMgr *this, PgWin *pkParent, PgWin *pkWin); // idb
void __thiscall PgWinMgr::ClosePopupWin(PgWinMgr *this, PgWin *pkWin); // idb
void __thiscall PgWinMgr::UpdateFSEffect(PgWinMgr *this, float fTime); // idb
void __thiscall PgWinMgr::StartFullScreenEffect(PgWinMgr *this, float fTime, NiAVObject *pEffect); // idb
void __thiscall PgWinMgr::ClearFullScreenEffect(PgWinMgr *this, float fTime); // idb
bool __thiscall PgWinMgr::IsIn(PgWinMgr *this, PgWin *pkWin); // idb
PgWin *__thiscall PgWinMgr::Find(PgWinMgr *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > kWinName); // idb
void __thiscall PgTList<PgWin *>::MoveToTail(PgTList<PgWin *> *this, PgWin *const *element); // idb
void __thiscall PgTQueue<PgWinMgr::PgWinMsg>::PgTQueue<PgWinMgr::PgWinMsg>(PgTQueue<PgWinMgr::PgWinMsg> *this, unsigned int uiInitialSize); // idb
void __thiscall PgTQueue<PgWinMgr::PgWinMsg>::~PgTQueue<PgWinMgr::PgWinMsg>(StrBuffer *this); // idb
PgWinMgr::PgWinMsg *__thiscall PgTQueue<PgWinMgr::PgWinMsg>::GetAt(PgTQueue<PgWinMgr::PgWinMsg> *this, unsigned int uiIndex); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>::AddNodeHead(NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *> *this, NiTListItem<PgWin *> *pkNode); // idb
void __thiscall PgWinCamera::CompactChildArray(PgWinCamera *this, unsigned int uiSize); // idb
bool __thiscall PgWinMgr::AddInShow(PgWinMgr *this, PgWin *pkWin); // idb
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin>>::~NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin>>(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *this); // idb
void __stdcall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin>>::DeleteItem(NiTListItem<NiPointer<PgWin> > *pkItem);
void __thiscall PgTList<NiPointer<PgWin>>::~PgTList<NiPointer<PgWin>>(PgTList<NiPointer<PgWin> > *this); // idb
NiTListItem<PgWin *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWin *>::InsertBefore(NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWin *> *this, void *kPos, PgWin *const *element);
NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin>>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *this, unsigned int a2);
PgTList<NiPointer<PgWin> > *__thiscall PgTList<NiPointer<PgWin>>::`scalar deleting destructor'(PgTList<NiPointer<PgWin> > *this, unsigned int a2);
void __thiscall NiTPointerList<NiPointer<PgWin>>::~NiTPointerList<NiPointer<PgWin>>(NiTPointerList<NiPointer<PgWin> > *this); // idb
PgSprData *__cdecl PgSprData::Create(NiSourceTexture *pkTexture, bool bMakeHitTestBuff, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight); // idb
PgSprData *__cdecl PgSprData::Create(NiSourceTexture *pkTexture, bool bMakeHitTestBuff, NiRect<unsigned int> *pkRect, unsigned int uiNumSets); // idb
PgSprData *__cdecl PgSprData::Create(NiAVObject *pkObject, const char *pcTriShapeName, int *iLeft, int *iTop, NiSourceTexture *pkTexture); // idb
void __thiscall PgSprData::SetTexture(PgSprData *this, NiSourceTexture *pkTexture); // idb
void __thiscall PgSprData::Add(PgSprData *this, NiScreenElementsData *pkGeomData, unsigned int uiWidth, unsigned int uiHeight, int iXPos, int iYPos, bool bMakeHitTestBuff); // idb
char __thiscall PgSprData::Add(PgSprData *this, NiAVObject *pkObject, const char *pcTriShapeName);
void __thiscall PgSprData::PgSprData(PgSprData *this); // idb
PgSprData *__thiscall PgSprData::`scalar deleting destructor'(PgSprData *this, unsigned int a2);
void __thiscall PgSprData::~PgSprData(PgSprData *this); // idb
unsigned int __thiscall PgSprData::GetChangedWidth(PgSprData *this, unsigned int uiIndex); // idb
unsigned int __thiscall PgSprData::GetChangedHeight(PgSprData *this, unsigned int uiIndex); // idb
char __thiscall PgSprData::ChangeWidthWithNoUpdate(PgSprData *this, unsigned int uiIndex, unsigned int uiWidth, bool bReverse);
char __thiscall PgSprData::ChangeWidth(PgSprData *this, unsigned int uiIndex, unsigned int uiWidth);
char __thiscall PgSprData::ChangeHeightWithNoUpdate(PgSprData *this, unsigned int uiIndex, unsigned int uiHeight, bool bReverse);
char __thiscall PgSprData::ChangeHeight(PgSprData *this, unsigned int uiIndex, unsigned int uiHeight);
void __thiscall PgSprData::ResetChangedWidth(PgSprData *this, unsigned int uiIndex); // idb
void __thiscall PgSprData::ResetChangedHeight(PgSprData *this, unsigned int uiIndex); // idb
char __thiscall PgSprData::ChangeWidthWithUV(PgSprData *this, unsigned int uiIndex, unsigned int uiWidth, bool bReverse);
char __thiscall PgSprData::ChangeHeightWithUV(PgSprData *this, unsigned int uiIndex, unsigned int uiHeight, bool bReverse);
char *__cdecl PgSprData::PgHitTester::CreateHitTestBuffRGBA(NiPixelData *pkPixels, unsigned int uiXPos, unsigned int uiYPos, unsigned int uiWidth, unsigned int uiHeight); // idb
PgSprData::PgHitTester *__cdecl PgSprData::PgHitTester::CreatePgHitTestBuff(NiPixelData *pkPixels, bool bMakeBuff, unsigned int uiXPos, unsigned int uiYPos, unsigned int uiWidth, unsigned int uiHeight); // idb
PgSprData::PgHitTester *__cdecl PgSprData::PgHitTester::CreatePgHitTestBuff(NiPixelData *pkPixels, bool bMakeBuff, NiRect<unsigned int> *pkRect, unsigned int uiNumSets); // idb
void __thiscall PgSpr::PgSpr(PgSpr *this, PgSprData *pkSprData); // idb
PgSpr *__thiscall PgSpr::`scalar deleting destructor'(PgSpr *this, unsigned int a2);
void __thiscall PgSpr::~PgSpr(PgSpr *this); // idb
void __thiscall PgSpr::SetTexture(PgSpr *this, NiTexture *pkTex); // idb
NiSourceTexture *__thiscall PgSpr::GetTexture(PgSpr *this);
void __thiscall NiTArray<NiPointer<NiScreenElementsData>>::NiTArray<NiPointer<NiScreenElementsData>>(NiTArray<NiPointer<NiScreenElementsData> > *this, unsigned int uiMaxSize, unsigned int uiGrowBy); // idb
void __thiscall NiTArray<NiPointer<PgSprData::PgHitTester>>::NiTArray<NiPointer<PgSprData::PgHitTester>>(NiTArray<NiPointer<PgSprData::PgHitTester> > *this, unsigned int uiMaxSize, unsigned int uiGrowBy); // idb
void __thiscall NiTArray<NiPointer<NiAlphaProperty>>::NiTArray<NiPointer<NiAlphaProperty>>(NiTArray<NiPointer<NiAlphaProperty> > *this, unsigned int uiMaxSize, unsigned int uiGrowBy); // idb
void __thiscall NiPointer<PgSprData::PgHitTester>::`default constructor closure'(NiPointer<NiAlphaProperty> *this); // idb
void __thiscall NiTArray<NiPointer<NiScreenElementsData>>::SetSize(NiTArray<NiPointer<PgSprData::PgHitTester> > *this, unsigned int uiMaxSize); // idb
void __thiscall PgSprData::Add(PgSprData *this, NiAlphaProperty *pkAlphaProperty); // idb
void __thiscall PgSprData::PgHitTester::PgHitTester(PgSprData::PgHitTester *this, unsigned int uiXPos, unsigned int uiYPos, unsigned int uiWidth, unsigned int uiHeight, char *pucBuff, NiPoint2 *pkUVs); // idb
PgSprData::PgHitTester *__thiscall PgSprData::PgHitTester::`vector deleting destructor'(PgSprData::PgHitTester *this, unsigned int a2);
void __thiscall NiTArray<NiPointer<NiScreenElementsData>>::~NiTArray<NiPointer<NiScreenElementsData>>(NiTArray<NiPointer<NiScreenElementsData> > *this); // idb
void __thiscall NiTArray<NiPointer<PgSprData::PgHitTester>>::~NiTArray<NiPointer<PgSprData::PgHitTester>>(NiTArray<NiPointer<PgSprData::PgHitTester> > *this); // idb
unsigned int __thiscall NiTArray<NiPointer<NiAlphaProperty>>::Add(NiTArray<NiPointer<NiAlphaProperty> > *this, NiPointer<NiAlphaProperty> *element); // idb
NiTArray<NiPointer<NiScreenElementsData> > *__thiscall NiTArray<NiPointer<NiScreenElementsData>>::`vector deleting destructor'(NiTArray<NiPointer<NiScreenElementsData> > *this, unsigned int a2);
NiPointer<PgSprData::PgHitTester> *__thiscall NiPointer<NiScreenElementsData>::`vector deleting destructor'(NiPointer<PgSprData::PgHitTester> *this, unsigned int a2);
NiTArray<NiPointer<PgSprData::PgHitTester> > *__thiscall NiTArray<NiPointer<PgSprData::PgHitTester>>::`scalar deleting destructor'(NiTArray<NiPointer<PgSprData::PgHitTester> > *this, unsigned int a2);
NiTArray<NiPointer<NiAlphaProperty> > *__thiscall NiTArray<NiPointer<NiAlphaProperty>>::`vector deleting destructor'(NiTArray<NiPointer<NiAlphaProperty> > *this, unsigned int a2);
void __thiscall NiTArray<NiPointer<NiAlphaProperty>>::SetSize(NiTArray<NiPointer<NiAlphaProperty> > *this, unsigned int uiMaxSize); // idb
void __thiscall NiTArray<NiPointer<PgSprData::PgHitTester>>::SetAt(NiTArray<NiPointer<NiAlphaProperty> > *this, unsigned int uiIndex, NiPointer<NiAlphaProperty> *element); // idb
void __thiscall PgWinBut::PgWinBut(PgWinBut *this); // idb
PgWinBut *__thiscall PgWinBut::`scalar deleting destructor'(PgWinBut *this, unsigned int a2);
void __thiscall PgWinBut::~PgWinBut(PgWinBut *this); // idb
PgWinBut *__cdecl PgWinBut::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, char *pcName, unsigned int uiExtStyle); // idb
PgWinBut *__cdecl PgWinBut::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, unsigned int uiCmdMsg, char *pcName, unsigned int uiExtStyle); // idb
char __thiscall PgWinBut::Create(PgWinBut *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, char *pcName, unsigned int uiExtStyle);
char __thiscall PgWinBut::Create(PgWinBut *this, int iXPos, int iYPos, NiSourceTexture *pkTexture, bool bMakeHitTestBuff, NiRect<unsigned int> *pkRect, unsigned int uiNumSets, PgWin *pkParent, unsigned int uiCmdMsg);
char __thiscall PgWinBut::Create(PgWinBut *this, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, unsigned int uiCmdMsg, char *pcName, unsigned int uiExtStyle);
void __thiscall PgWinBut::ProcessMeInput(PgWinBut *this, bool *bHit); // idb
void __thiscall PgWinBut::ReleaseMeInput(PgWinBut *this); // idb
char __thiscall CBucketBlock::Init(CBucketBlock *this, unsigned int dwSize);
FontBucket *__thiscall CBucketBlock::AllocBucket(CBucketBlock *this); // idb
// void __thiscall CBucketBlock::CBucketBlock(CBucketBlock *this); idb
void __thiscall CBucketBlock::~CBucketBlock(CBucketBlock *this); // idb
void __thiscall CBucketPool::CBucketPool(CBucketPool *this, unsigned int dwBlockUnit); // idb
NiTPointerListBase<DFALL<CBucketBlock *>,CBucketBlock *> *__thiscall NiTPointerListBase<DFALL<CBucketBlock *>,CBucketBlock *>::`scalar deleting destructor'(NiTPointerListBase<DFALL<CBucketBlock *>,CBucketBlock *> *this, unsigned int a2);
void __thiscall CBucketPool::~CBucketPool(CBucketPool *this); // idb
void __thiscall NiTList<CBucketBlock *>::~NiTList<CBucketBlock *>(NiTList<CBucketBlock *> *this); // idb
CBucketBlock *__thiscall CBucketPool::CreateBlock(CBucketPool *this); // idb
FontBucket *__thiscall CBucketPool::AllocBucket(CBucketPool *this); // idb
FontBucket *__thiscall CBucketBuffer::AllocBucket(CBucketBuffer *this, tagSIZE *rkSize); // idb
void __thiscall CBucketBuffer::CBucketBuffer(CBucketBuffer *this); // idb
void __thiscall CBucketBuffer::~CBucketBuffer(CBucketBuffer *this); // idb
NiPointer<NiSourceTexture> *__thiscall CBucketBuffer::GetTexture(CBucketBuffer *this, NiPointer<NiSourceTexture> *result, unsigned int dwIndex); // idb
bool __thiscall CBucketBuffer::Init(CBucketBuffer *this, unsigned int dwMaxTexture, unsigned int dwTexSize); // idb
FontBucket *__thiscall CBucketBuffer::LoadFont(CBucketBuffer *this, FontRenderStuff *rkFontStuff, char *acStr, unsigned int dwOutlineOffset); // idb
void __thiscall CBucketBuffer::LoadFontToBucket(CBucketBuffer *this, FontRenderStuff *rkFontStuff, char *acStr, int iStrLen, FontBucket *pkBucket); // idb
void __thiscall CBucketBuffer::LoadFontToBucket(CBucketBuffer *this, FontRenderStuff *rkFontStuff, char *acStr, int iStrLen, FontBucket *pkBucket, unsigned int dwOutlineOffset); // idb
void __thiscall CBucketBuffer::Shutdown(CBucketBuffer *this); // idb
FontBucket *__thiscall CBucketBuffer::AskFont(CBucketBuffer *this, char *acStr, FontRenderStuff *rkFontStuff, unsigned int dwOutlineOffset); // idb
void __thiscall CSpFont::CSpFont(CSpFont *this); // idb
CSpFont *__thiscall CSpFont::`vector deleting destructor'(CSpFont *this, unsigned int a2);
NiTPointerListBase<DFALL<SpScreenText *>,SpScreenText *> *__thiscall NiTPointerListBase<DFALL<SpScreenText *>,SpScreenText *>::`scalar deleting destructor'(NiTPointerListBase<DFALL<SpScreenText *>,SpScreenText *> *this, unsigned int a2);
void __thiscall CSpFont::~CSpFont(CSpFont *this); // idb
void __thiscall NiTList<SpScreenText *>::~NiTList<SpScreenText *>(NiTList<SpScreenText *> *this); // idb
char __thiscall CSpFont::Create(CSpFont *this, char *acFontName, int iFontHeight, int iFontWidth, int iWeight, unsigned int dwItalic, unsigned int dwCharSet, unsigned int dwOutputPrecision, unsigned int dwQuality, unsigned int dwPitchAndFamily, unsigned int dwOutlineOffset, unsigned int dwTextureSize, unsigned int dwMaxTexture);
FontBucket *__thiscall CSpFont::AskFont(CSpFont *this, char *acChar, FontRenderStuff *rkStuff); // idb
int __cdecl GetHorzOffset(int iAlign, int iTotalWidth, int iWidth); // idb
char *__thiscall CSpFont::SplitStrByPixelSize(CSpFont *this, char *pcStr, int iPixelSize, bool bTextCmdOn); // idb
int __thiscall CSpFont::AddFontRenderPass(CSpFont *this, ScrTexturePass *pkScrText, int iMaxPass, tagRECT *rkRect, char *acStr, NiColorA *rkColor, bool bAutoWordWrap, bool bTextCmdOn, int iDrawOffsetX, int iDrawOffsetY, int iTextAlign, int iLineGap);
unsigned int __thiscall CSpFont::CalcMaxPass(CSpFont *this); // idb
void __thiscall CSpFont::RegisterScrText(CSpFont *this, SpScreenText *pkScreenText); // idb
void __thiscall CSpFont::UnregisterScrText(CSpFont *this, SpScreenText *pkScreenText); // idb
void __thiscall CSpFont::RecreateRegisterdText(CSpFont *this); // idb
char __thiscall CSpFont::GetTextSize(CSpFont *this, char *pcStr, int iTextSize, tagSIZE *rkSize, int iLineGap, bool bAutoWordWrap, bool bTextCmdOn, tagRECT *pkDrawRect);
char __thiscall CSpFont::GetCursorPosOnText(CSpFont *this, char *pcText, int iCursorPos, tagPOINT *rkPos, int iLineGap, bool bAutoWordWrap, bool bTextCmdOn, tagRECT *pkDrawRect, int iTextAlign);
char __thiscall CSpFont::GetCursorPosOnTextByRightAlign(CSpFont *this, char *pcText, int iCursorPos, tagPOINT *rkPos, int iLineGap, tagRECT *pkDrawRect);
int __thiscall CSpFont::AddImeFontRenderPass(CSpFont *this, ScrTexturePass *pkScrText, int iMaxPass, tagRECT *rkRect, char *acStr, NiColorA *rkColor, char *acCompStr, NiColorA *rkCompStrColor, NiColorA *rkCandStrColor, int iCompStrPos, char *pbComStrAttr, bool bAutoWordWrap, int iDrawOffsetX, int iDrawOffsetY, int iTextAlign, int iLineGap);
char __thiscall CSpFont::GetCandStrPos(CSpFont *this, int *iCandStrXPos, int *iCandStrYPos, int iMaxPass, tagRECT *rkRect, char *acStr, char *acCompStr, int iCompStrPos, char *pbComStrAttr, bool bAutoWordWrap, int iDrawOffsetX, int iDrawOffsetY, int iTextAlign, int iLineGap);
char __thiscall CSpFont::IsNextWordThisLineInsert(CSpFont *this, const char *pkStr, int nSize);
void __thiscall NiTMapBase<DFALL<FontBucket *>,unsigned short,FontBucket *>::NiTMapBase<DFALL<FontBucket *>,unsigned short,FontBucket *>(NiTMapBase<DFALL<FontBucket *>,unsigned short,FontBucket *> *this, unsigned int uiHashSize); // idb
void __thiscall NiTMapBase<DFALL<FontBucket *>,unsigned short,FontBucket *>::SetAt(NiTMapBase<DFALL<FontBucket *>,unsigned short,FontBucket *> *this, unsigned __int16 key, FontBucket *val); // idb
char __thiscall NiTMapBase<DFALL<FontBucket *>,unsigned short,FontBucket *>::GetAt(NiTMapBase<DFALL<FontBucket *>,unsigned short,FontBucket *> *this, unsigned __int16 key, FontBucket **val);
void __thiscall NiTPointerListBase<DFALL<int>,int>::AddTail(NiTPointerListBase<DFALL<int>,int> *this, const int *element); // idb
void __thiscall NiTListBase<DFALL<CBucketBlock *>,CBucketBlock *>::AddNodeTail(NiTListBase<NiTPointerAllocator<unsigned int>,void *> *this, NiTListItem<void *> *pkNode); // idb
SpScreenText *__thiscall NiTPointerListBase<DFALL<CBucketBlock *>,CBucketBlock *>::RemoveTail(NiTPointerListBase<DFALL<SpScreenText *>,SpScreenText *> *this); // idb
void __thiscall NiTListBase<DFALL<CBucketBlock *>,CBucketBlock *>::~NiTListBase<DFALL<CBucketBlock *>,CBucketBlock *>(NiTListBase<DFALL<CBucketBlock *>,CBucketBlock *> *this); // idb
unsigned int __thiscall NiTMapBase<DFALL<FontBucket *>,unsigned short,FontBucket *>::KeyToHashIndex(NiTMapBase<DFALL<FontBucket *>,unsigned short,FontBucket *> *this, unsigned __int16 key); // idb
bool __stdcall NiTMapBase<DFALL<FontBucket *>,unsigned short,FontBucket *>::IsKeysEqual(unsigned __int16 key1, unsigned __int16 key2);
void __stdcall NiTMapBase<DFALL<FontBucket *>,unsigned short,FontBucket *>::SetValue(NiTMapItem<unsigned short,FontBucket *> *pkItem, unsigned __int16 key, FontBucket *val);
void __thiscall NiTMap<unsigned short,FontBucket *>::~NiTMap<unsigned short,FontBucket *>(NiTMap<unsigned short,FontBucket *> *this); // idb
void __thiscall NiTMapBase<DFALL<FontBucket *>,unsigned short,FontBucket *>::~NiTMapBase<DFALL<FontBucket *>,unsigned short,FontBucket *>(NiTMapBase<DFALL<FontBucket *>,unsigned short,FontBucket *> *this); // idb
NiTListItem<SpScreenText *> *NiTPointerListBase<DFALL<CBucketBlock *>,CBucketBlock *>::NewItem();
void __thiscall NiTListBase<DFALL<SpScreenText *>,SpScreenText *>::~NiTListBase<DFALL<SpScreenText *>,SpScreenText *>(NiTListBase<DFALL<SpScreenText *>,SpScreenText *> *this); // idb
void __stdcall NiTMap<HWND__ *,PgEditWin *>::DeleteItem(NiTListItem<SpScreenText *> *pkItem);
NiTListBase<DFALL<CBucketBlock *>,CBucketBlock *> *__thiscall NiTListBase<DFALL<CBucketBlock *>,CBucketBlock *>::`vector deleting destructor'(NiTListBase<DFALL<CBucketBlock *>,CBucketBlock *> *this, unsigned int a2);
NiTMapBase<DFALL<FontBucket *>,unsigned short,FontBucket *> *__thiscall NiTMapBase<DFALL<FontBucket *>,unsigned short,FontBucket *>::`scalar deleting destructor'(NiTMapBase<DFALL<FontBucket *>,unsigned short,FontBucket *> *this, unsigned int a2);
NiTMap<unsigned short,FontBucket *> *__thiscall NiTMap<unsigned short,FontBucket *>::`scalar deleting destructor'(NiTMap<unsigned short,FontBucket *> *this, unsigned int a2);
NiTListBase<DFALL<SpScreenText *>,SpScreenText *> *__thiscall NiTListBase<DFALL<SpScreenText *>,SpScreenText *>::`scalar deleting destructor'(NiTListBase<DFALL<SpScreenText *>,SpScreenText *> *this, unsigned int a2);
bool __cdecl PgNet::PgInit(); // idb
void __cdecl PgNet::PgTerminate(); // idb
void __thiscall PgNet::PgNet(PgNet *this); // idb
PgNet *__thiscall PgNet::`vector deleting destructor'(PgNet *this, unsigned int a2);
void __thiscall PgNet::~PgNet(PgNet *this); // idb
void __thiscall PgNet::SetAddress(PgNet *this, char *padd); // idb
void __thiscall PgNet::SetPortA(PgNet *this, int n); // idb
void __thiscall PgNet::Clear(PgNet *this); // idb
char __thiscall PgNet::Connect(PgNet *this);
char __thiscall PgNet::Connect(PgNet *this, int a1, int a2, int a3, int a4, int port);
void __thiscall PgNet::Close(PgNet *this); // idb
void __thiscall PgNet::AddNetMsg(PgNet *this, void *pdata, int data_length); // idb
void __thiscall PgNet::SendNetMsg(PgNet *this, void *pdata, int data_length); // idb
char __thiscall PgNet::Flush(PgNet *this);
void __thiscall PgNet::DispatchMsg(PgNet *this, PgFrameWork *pkFrameWork, unsigned int uiLoopCount); // idb
void __thiscall PgNet::StopDispatchMsg(PgNet *this); // idb
void __thiscall PgNet::ContinueDispatchMsg(PgNet *this); // idb
void __thiscall PgNet::Update(PgNet *this, float fCurTime); // idb
int __thiscall PgNet::RevNetMsg(PgNet *this); // idb
bool __stdcall PgNet::ProcessNetMsg(int iDepart, int iCommand, int iRevBytes, void *pvData);
void __thiscall PgNet::SetSendPacketMode(PgNet *this, bool b); // idb
void __thiscall PgFont::PgFont(PgFont *this); // idb
PgFont *__thiscall PgFont::`scalar deleting destructor'(PgFont *this, unsigned int a2);
void __thiscall PgFont::~PgFont(PgFont *this); // idb
void __thiscall PgFont::GetCursorPosOnText(PgFont *this, char *pcText, int iCursorPos, tagPOINT *rkPos, int iLineGap, bool bAutoWordWrap, bool bTextCmdOn, tagRECT *pkDrawRect, int iTextAlign); // idb
void __thiscall SpScreenGeometryClip::SetClipEnable(SpScreenGeometryClip *this, bool bEnable); // idb
void __thiscall SpScreenGeometryClip::RenderImmediate(SpScreenGeometryClip *this, NiRenderer *pkRenderer); // idb
void __thiscall SpScreenGeometryClip::SpScreenGeometryClip(SpScreenGeometryClip *this, NiScreenElementsData *pkModelData); // idb
SpScreenGeometryClip *__thiscall SpScreenGeometryClip::`vector deleting destructor'(SpScreenGeometryClip *this, unsigned int a2);
void __thiscall SpScreenGeometryClip::~SpScreenGeometryClip(SpScreenGeometryClip *this); // idb
void __thiscall SpScreenGeometryClip::SetRect(SpScreenGeometryClip *this, tagRECT *pkRect); // idb
void __thiscall SpScreenText::SpScreenText(SpScreenText *this, const char *pcString); // idb
SpScreenText *__thiscall SpScreenText::`vector deleting destructor'(SpScreenText *this, unsigned int a2);
void __thiscall SpScreenText::~SpScreenText(SpScreenText *this); // idb
void *__thiscall ScrTexturePass::`vector deleting destructor'(ScrTexturePass *this, unsigned int); // idb
void __thiscall SpScreenText::UpdateDownwardPass(SpScreenText *this, float fTime, bool bUpdateControllers); // idb
void __thiscall SpScreenText::RecreateText(SpScreenText *this); // idb
void __thiscall SpScreenText::SetColor(SpScreenText *this, NiColor *kNewColor); // idb
NiColor *__thiscall SpScreenText::GetColor(SpScreenText *this, NiColor *result); // idb
void __thiscall SpScreenText::SetAlpha(SpScreenText *this, float fAlpha); // idb
double __thiscall SpScreenText::GetAlpha(SpScreenText *this);
void __thiscall SpScreenText::Init(SpScreenText *this, CSpFont *pkFont); // idb
void __thiscall SpScreenText::InitPass(SpScreenText *this); // idb
void __thiscall SpScreenText::SetShadowOffset(SpScreenText *this, unsigned int dwOffset); // idb
void __thiscall SpScreenText::SetDrawRect(SpScreenText *this, tagRECT *rkRect); // idb
void __thiscall SpScreenText::SetClipEnable(SpScreenText *this, bool bEnable); // idb
void __thiscall SpScreenText::SetDrawRect(SpScreenText *this, int left, int top, int right, int bottom); // idb
void __cdecl SpScreenText::SetCamera(NiCamera *pkCam); // idb
NiCamera *__cdecl SpScreenText::GetCamera(); // idb
void __thiscall SpScreenText::SetVerticalGap(SpScreenText *this, int iGap); // idb
BOOL __thiscall SpScreenText::AddImeFontRenderPass(SpScreenText *this, ScrTexturePass *pkScrText, int iMaxPass, tagRECT *rkRect, char *acStr, NiColorA *rkColor, char *acCompStr, NiColorA *rkCompStrColor, NiColorA *rkCandStrColor, int iCompStrPos, char *pbComStrAttr, bool bAutoWordWrap, int iDrawOffsetX, int iDrawOffsetY, int iTextAlign, int iLineGap);
void __thiscall ScrTexturePass::ScrTexturePass(ScrTexturePass *this); // idb
void __thiscall ScrTexturePass::~ScrTexturePass(ScrTexturePass *this); // idb
char __thiscall SpScreenText::SetString(SpScreenText *this, const char *pcString);
void __thiscall StrBuffer::operator=(StrBuffer *this, const char *acSrc); // idb
void __thiscall PgWinLRBut::PgWinLRBut(PgWinLRBut *this); // idb
PgWinLRBut *__thiscall PgWinLRBut::`scalar deleting destructor'(PgWinLRBut *this, unsigned int a2);
void __thiscall PgWinLRBut::~PgWinLRBut(PgWinLRBut *this); // idb
PgWinLRBut *__cdecl PgWinLRBut::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, unsigned int uiCmdMsg, unsigned int uiRCmdMsg); // idb
char __thiscall PgWinLRBut::Create(PgWinLRBut *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, unsigned int uiRCmdMsg);
char __thiscall PgWinLRBut::Create(PgWinLRBut *this, int iXPos, int iYPos, NiSourceTexture *pkTexture, bool bMakeHitTestBuff, NiRect<unsigned int> *pkRect, unsigned int uiNumSets, PgWin *pkParent, unsigned int uiCmdMsg, unsigned int uiRCmdMsg);
char __thiscall PgWinLRBut::Create(PgWinLRBut *this, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, unsigned int uiCmdMsg, unsigned int uiRCmdMsg);
void __thiscall PgWinLRBut::ProcessMeInput(PgWinLRBut *this, bool *bHit); // idb
void __thiscall PgCursor::~PgCursor(PgCursor *this); // idb
void __cdecl PgCursor::Shutdown(); // idb
char __thiscall PgCursor::ResetScreenGeometry(PgCursor *this);
void __cdecl PgCursor::SetMaxCursorType(int iMaxType); // idb
void __cdecl PgCursor::SetCursorInfo(int iIndex, int iHotSpotX, int iHotSpotY, int iTexOffLeft, int iTexOffTop); // idb
int __thiscall PgCursor::SetType(PgCursor *this, int iType); // idb
char __thiscall PgCursor::SetImage(PgCursor *this, NiSourceTexture *pkTex);
NiRefObject *__cdecl PgCursor::CreateFromTex(NiRenderer *pkRenderer, NiRect<int> *kRect, unsigned int uiFlags, int iType, NiSourceTexture *pkTex);
void __stdcall PgCursor::SetDxSurfaceCursor(IDirect3DSurface9 *pkDxSurface);
void __thiscall PgCursor::RecoverOriginalCursorTexture(PgCursor *this); // idb
void __thiscall NiCursor::SetFlags(NiCursor *this, unsigned int uiFlags); // idb
void __thiscall PgCursor::PgCursor(PgCursor *this, NiRenderer *pkRenderer); // idb
PgCursor *__thiscall PgCursor::`scalar deleting destructor'(PgCursor *this, unsigned int a2);
void __cdecl PgExternalLib::EnableOpenSound(bool bEnable); // idb
void __cdecl PgExternalLib::EnableCloseSound(bool bEnable); // idb
void __thiscall PgProfileNode::PgProfileNode(PgProfileNode *this, const char *name, PgProfileNode *parent); // idb
void __thiscall PgProfileNode::~PgProfileNode(PgProfileNode *this); // idb
void __thiscall PgProfileNode::Reset(PgProfileNode *this); // idb
// PgProfileNode *__cdecl PgProfileMgr::StartTraversal(); idb
PgProfileNode *__cdecl PgProfileMgr::GetNext(PgProfileNode *pkNode); // idb
void __thiscall PgTQueue<PgProfileNode *>::Add(PgTQueue<PgProfileNode *> *this, PgProfileNode *element); // idb
PgProfileNode *__thiscall PgTQueue<PgProfileNode *>::Remove(PgTQueue<PgProfileNode *> *this); // idb
void __thiscall PgTQueue<PgProfileNode *>::Realloc(PgTQueue<PgProfileNode *> *this, unsigned int uiNewSize); // idb
void __thiscall PgTQueue<PgProfileNode *>::PgTQueue<PgProfileNode *>(PgTQueue<PgProfileNode *> *this, unsigned int uiInitialSize); // idb
NiAVObject *__cdecl BuildNonIndexTriShape(NiTriShape *pkSrcTriShape);
void __thiscall PgWinCircleGauge::PgWinCircleGauge(PgWinCircleGauge *this); // idb
PgWinCircleGauge *__thiscall PgWinCircleGauge::`vector deleting destructor'(PgWinCircleGauge *this, unsigned int a2);
void __thiscall PgWinCircleGauge::~PgWinCircleGauge(PgWinCircleGauge *this); // idb
PgWinCircleGauge *__cdecl PgWinCircleGauge::CreateWin(int iXPos, int iYPos, NiTriShape *pkTriShape, PgWinCircleGauge::WindDir eDir, float fOrgAngle, float fMaxAngle, PgWin *pkParent); // idb
char __thiscall PgWinCircleGauge::Create(PgWinCircleGauge *this, int iXPos, int iYPos, NiTriShape *pkTriShape, PgWinCircleGauge::WindDir eDir, float fOrgAngle, float fMaxAngle, PgWin *pkParent);
signed int __cdecl FindVertIndex(NiPoint3 *pkVertices, unsigned int uiCount, bool bLeft, bool bTop);
void __thiscall PgWinCircleGauge::OnChangeValue(PgWinCircleGauge *this); // idb
void __thiscall PgWinAbbreviateText::PgWinAbbreviateText(PgWinAbbreviateText *this); // idb
PgWinAbbreviateText *__thiscall PgWinAbbreviateText::`vector deleting destructor'(PgWinAbbreviateText *this, unsigned int a2);
void __thiscall PgWinAbbreviateText::~PgWinAbbreviateText(PgWinAbbreviateText *this); // idb
PgWinAbbreviateText *__cdecl PgWinAbbreviateText::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgFont *pkFont, PgWin *pkParent, char *pcName, unsigned int uiExtStyle, unsigned int uiVisiableMaxCharNums, bool bAutoAbbreviateText, PgWin *pkToolTipWin, unsigned int uiMarginSize); // idb
char __thiscall PgWinAbbreviateText::Create(PgWinAbbreviateText *this, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgFont *pkFont, PgWin *pkParent, char *pcName, unsigned int uiExtStyle, unsigned int uiVisiableMaxCharNums, bool bAutoAbbreviateText, PgWin *pkToolTipWin, unsigned int uiMarginSize);
void __thiscall PgWinAbbreviateText::SetText(PgWinAbbreviateText *this, const char *pcText); // idb
int __stdcall PgWinAbbreviateText::StrLengthCount(const char *str);
void __stdcall PgWinAbbreviateText::AbbreviateTextCmd(char *pResult, char *pTarget, int nAbbreviationSize);
char __thiscall PgWinAbbreviateText::CheckText(PgWinAbbreviateText *this, char *pText, char *pAddText, int offset, char *pResult);
void __thiscall PgWinAbbreviateText::ProcessMeInput(PgWinAbbreviateText *this, bool *bHit); // idb
void __stdcall PgWinAbbreviateText::Abbreviate(char *pResult, char *pTarget, int nAbbreviationSize);
char *__thiscall PgWinAbbreviateText::GetText(PgWinAbbreviateText *this); // idb
void __thiscall PgWinCloseBut::PgWinCloseBut(PgWinCloseBut *this); // idb
PgWinCloseBut *__thiscall PgWinCloseBut::`scalar deleting destructor'(PgWinCloseBut *this, unsigned int a2);
void __thiscall PgWinCloseBut::~PgWinCloseBut(PgWinCloseBut *this); // idb
PgWinCloseBut *__cdecl PgWinCloseBut::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent); // idb
void __thiscall PgWinCloseBut::DoAction(PgWinCloseBut *this); // idb
void __thiscall PgWinBar::PgWinBar(PgWinBar *this); // idb
PgWinBar *__thiscall PgWinBar::`scalar deleting destructor'(PgWinBar *this, unsigned int a2);
void __thiscall PgWinBar::~PgWinBar(PgWinBar *this); // idb
PgWinBar *__cdecl PgWinBar::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, PgWinBar::BarGrowType eType); // idb
PgWinBar *__cdecl PgWinBar::CreateWin(int iXPos, int iYPos, NiSourceTexture *pkTexture, bool bMakeHitTestBuff, unsigned int uiTexelX, unsigned int uiTexelY, unsigned int uiTexelWidth, unsigned int uiTexelHeight, PgWin *pkParent, PgWinBar::BarGrowType eType, char *pcName, unsigned int uiExtStyle); // idb
void __thiscall PgWinEditText::PgWinEditText(PgWinEditText *this); // idb
PgWinEditText *__thiscall PgWinEditText::`scalar deleting destructor'(PgWinEditText *this, unsigned int a2);
void __thiscall PgWinEditText::~PgWinEditText(PgWinEditText *this); // idb
PgWinEditText *__cdecl PgWinEditText::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgFont *pkFont, PgWin *pkParent, char *pcName, unsigned int uiExtStyle); // idb
char __thiscall PgWinEditText::Create(PgWinEditText *this, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgFont *pkFont, PgWin *pkParent, char *pcName, unsigned int uiExtStyle);
void __thiscall PgWinEditText::OnEditChange(PgWinEditText *this, unsigned int wParam, int lParam); // idb
void __thiscall PgWinEditText::OnEditEnd(PgWinEditText *this, unsigned int wParam, int lParam); // idb
void __thiscall PgWinEditText::OnEditError(PgWinEditText *this, unsigned int wParam, int lParam); // idb
void __thiscall PgWinEditText::SetAutoAlign(PgWinEditText *this, bool bAutoAlign); // idb
bool __thiscall PgWinEditText::GetAutoAlign(PgWinEditText *this); // idb
PgEditWin *__cdecl PgEditWin::CreateWin(HINSTANCE__ *hInstance, HWND__ *pkParentWin, unsigned int uiStyle, unsigned int uiStopFlag, int iLimitLength, bool bClearTextOnEnd, tagRECT *pkRect, HFONT__ *hFont); // idb
bool __thiscall PgEditWin::CallBack(PgEditWin *this, unsigned int message, unsigned int wParam, int lParam); // idb
void __thiscall PgEditWin::LimitText(PgEditWin *this, int iLimitLength); // idb
char __thiscall PgEditWin::OnEnterKeyInput(PgEditWin *this);
char __thiscall PgEditWin::OnEscKeyInput(PgEditWin *this);
char __thiscall PgEditWin::OnTabKeyInput(PgEditWin *this);
void __thiscall PgEditWin::PgEditWin(PgEditWin *this); // idb
PgEditWin *__thiscall PgEditWin::`scalar deleting destructor'(PgEditWin *this, unsigned int a2);
void __thiscall PgEditWin::~PgEditWin(PgEditWin *this); // idb
char __thiscall PgEditWin::Create(PgEditWin *this, HINSTANCE__ *hInstance, unsigned int uiStyle, tagRECT *pkRect, HFONT__ *hFont);
void __cdecl PgEditWin::RegisterClassA(); // idb
int __stdcall PgEditWin::DefCallBack(HWND__ *hWnd, unsigned int message, unsigned int wParam, int lParam); // idb
void __thiscall PgEditWin::CopyTextToLastText(PgEditWin *this); // idb
int __thiscall PgEditWin::GetCaretPos(PgEditWin *this); // idb
void __thiscall PgEditWin::SetCaretPos(PgEditWin *this, int iPos); // idb
void __thiscall NiTMapBase<DFALL<PgEditWin *>,HWND__ *,PgEditWin *>::SetAt(NiTMapBase<NiTPointerAllocator<unsigned int>,void *,PgFrameWork *> *this, void *key, PgFrameWork *val); // idb
bool __thiscall NiTMapBase<DFALL<PgEditWin *>,HWND__ *,PgEditWin *>::RemoveAt(NiTMapBase<DFALL<PgEditWin *>,HWND__ *,PgEditWin *> *this, HWND__ *key); // idb
char __thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,void *,PgFrameWork *>::GetAt(NiTMapBase<NiTPointerAllocator<unsigned int>,void *,PgFrameWork *> *this, void *key, PgFrameWork **val);
void __thiscall PgEditWin::SetFocus(PgEditWin *this); // idb
char *__thiscall PgEditWin::GetText(PgEditWin *this); // idb
void __thiscall PgEditWin::SetText(PgEditWin *this, const char *pcText); // idb
void __thiscall PgEditWin::ClearText(PgEditWin *this); // idb
void __thiscall PgEditWin::SetLastText(PgEditWin *this, char *pcText); // idb
void __thiscall PgEditWin::ClearLastText(PgEditWin *this); // idb
void __thiscall PgEditWin::ClearAllText(PgEditWin *this); // idb
void __thiscall PgEditWin::SetStopFlag(PgEditWin *this, unsigned int uiStopFlag); // idb
bool __thiscall PgEditWin::GetClearTextOnEnd(PgEditWin *this); // idb
void __thiscall PgEditWin::SetClearTextOnEnd(PgEditWin *this, bool b); // idb
bool __thiscall PgEditWin::IsEnterKeyStop(PgEditWin *this); // idb
bool __thiscall PgEditWin::IsEscKeyStop(PgEditWin *this); // idb
bool __thiscall PgEditWin::IsTabKeyStop(PgEditWin *this); // idb
void __thiscall PgEditWin::AttachWinText(PgEditWin *this, PgWinText *pkWinText); // idb
void __thiscall PgEditWin::DetachWinText(PgEditWin *this); // idb
void __thiscall NiTMapBase<DFALL<PgEditWin *>,HWND__ *,PgEditWin *>::NiTMapBase<DFALL<PgEditWin *>,HWND__ *,PgEditWin *>(NiTMapBase<DFALL<PgEditWin *>,HWND__ *,PgEditWin *> *this, unsigned int uiHashSize); // idb
bool __stdcall NiTMapBase<DFALL<PgEditWin *>,HWND__ *,PgEditWin *>::IsKeysEqual(void *key1, void *key2);
void __stdcall NiTMapBase<DFALL<PgEditWin *>,HWND__ *,PgEditWin *>::SetValue(NiTMapItem<void *,PgFrameWork *> *pkItem, void *key, PgFrameWork *val);
void __stdcall PgSocket::SocketError(NiTMapItem<void *,PgFrameWork *> *__formal);
NiTMapBase<DFALL<PgEditWin *>,HWND__ *,PgEditWin *> *__thiscall NiTMapBase<DFALL<PgEditWin *>,HWND__ *,PgEditWin *>::`scalar deleting destructor'(NiTMapBase<DFALL<PgEditWin *>,HWND__ *,PgEditWin *> *this, unsigned int a2);
NiTMap<HWND__ *,PgEditWin *> *__thiscall NiTMap<HWND__ *,PgEditWin *>::`vector deleting destructor'(NiTMap<HWND__ *,PgEditWin *> *this, unsigned int a2);
void __thiscall NiTMap<HWND__ *,PgEditWin *>::~NiTMap<HWND__ *,PgEditWin *>(NiTMap<HWND__ *,PgEditWin *> *this); // idb
void __thiscall NiTMapBase<DFALL<PgEditWin *>,HWND__ *,PgEditWin *>::~NiTMapBase<DFALL<PgEditWin *>,HWND__ *,PgEditWin *>(NiTMapBase<DFALL<PgEditWin *>,HWND__ *,PgEditWin *> *this); // idb
void __thiscall NiTMapBase<DFALL<PgEditWin *>,HWND__ *,PgEditWin *>::RemoveAll(NiTMapBase<NiTPointerAllocator<unsigned int>,void *,PgFrameWork *> *this); // idb
void __thiscall PgWinPasswdText::PgWinPasswdText(PgWinPasswdText *this); // idb
PgWinPasswdText *__thiscall PgWinPasswdText::`vector deleting destructor'(PgWinPasswdText *this, unsigned int a2);
void __thiscall PgWinPasswdText::~PgWinPasswdText(PgWinPasswdText *this); // idb
PgWinPasswdText *__cdecl PgWinPasswdText::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgFont *pkFont, PgWin *pkParent, char *pcName, unsigned int uiExtStyle); // idb
char __thiscall PgWinPasswdText::Create(PgWinPasswdText *this, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgFont *pkFont, PgWin *pkParent, char *pcName, unsigned int uiExtStyle);
void __thiscall PgTextGeometry::PgTextGeometry(PgTextGeometry *this, PgFont *pkFont); // idb
PgTextGeometry *__thiscall PgTextGeometry::`scalar deleting destructor'(PgTextGeometry *this, unsigned int a2);
void __thiscall PgTextGeometry::~PgTextGeometry(PgTextGeometry *this); // idb
void __thiscall PgTextGeometry::SetText(PgTextGeometry *this, const char *pcText); // idb
// void __thiscall PgImeEditWin::PgImeEditWin(PgImeEditWin *this); idb
PgImeEditWin *__cdecl PgImeEditWin::CreateWin(HINSTANCE__ *hInstance, HWND__ *pkParentWin, unsigned int uiStyle, unsigned int uiStopFlag, int iLimitLength, bool bClearTextOnEnd, tagRECT *pkRect, HFONT__ *hFont, bool bNoAlt); // idb
char __thiscall PgImeEditWin::Create(PgImeEditWin *this, HINSTANCE__ *hInstance, unsigned int uiWinStyle, tagRECT *pkRect, HFONT__ *hFont, bool bNoAlt);
bool __thiscall PgImeEditWin::CallBack(PgImeEditWin *this, unsigned int message, unsigned int wParam, int lParam); // idb
char __thiscall PgImeEditWin::OnEnterKeyInput(PgImeEditWin *this);
// int __thiscall PgImeEditWin::GetImeCaretPos(PgImeEditWin *this); idb
void __thiscall PgImeEditWin::EnablePaste(PgImeEditWin *this, bool bEnable); // idb
void __thiscall PgWinImeEditText::PgWinImeEditText(PgWinImeEditText *this); // idb
PgWinImeEditText *__thiscall PgWinImeEditText::`vector deleting destructor'(PgWinImeEditText *this, unsigned int a2);
void __thiscall PgWinImeEditText::~PgWinImeEditText(PgWinImeEditText *this); // idb
PgWinImeEditText *__cdecl PgWinImeEditText::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgFont *pkFont, PgWin *pkParent, char *pcName, unsigned int uiExtStyle); // idb
char __thiscall PgWinImeEditText::Create(PgWinImeEditText *this, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgFont *pkFont, PgWin *pkParent, char *pcName, unsigned int uiExtStyle);
void __thiscall PgWinImeEditText::OnEditChange(PgWinImeEditText *this, unsigned int wParam, int lParam); // idb
int __thiscall PgWinImeEditText::GetCandStrXPos(PgWinImeEditText *this); // idb
int __thiscall PgWinImeEditText::GetCandStrYPos(PgWinImeEditText *this); // idb
bool __cdecl PgInitInstance(); // idb
void __cdecl PgTerminateInstance(); // idb
void __thiscall PgImeCtrl::PgImeCtrl(PgImeCtrl *this); // idb
PgImeCtrl *__thiscall PgImeCtrl::`scalar deleting destructor'(PgImeCtrl *this, unsigned int a2);
void __thiscall PgImeCtrl::~PgImeCtrl(PgImeCtrl *this); // idb
void __thiscall PgImeCtrl::SetHWND(PgImeCtrl *this, HWND__ *hWnd); // idb
bool __thiscall PgImeCtrl::MsgProc(PgImeCtrl *this, unsigned int uMsg, unsigned int wParam, int lParam); // idb
void __cdecl WM_IME_DbgOut(PgImeCtrl *kImeCtrl, unsigned int uMsg); // idb
void __cdecl OutDbg();
void __thiscall PgImeCtrl::OnFocusIn(PgImeCtrl *this, bool bNumber, bool bPassword); // idb
void __thiscall PgImeCtrl::OnFocusOut(PgImeCtrl *this); // idb
void __thiscall PgImeCtrl::Clear(PgImeCtrl *this); // idb
char __thiscall PgImeCtrl::OnImeComposition(PgImeCtrl *this, unsigned int wParam, int lParam);
char __thiscall PgImeCtrl::OnImeStartComposition(PgImeCtrl *this, unsigned int wParam, int lParam);
char __thiscall PgImeCtrl::OnImeNotify(PgImeCtrl *this, unsigned int wParam, int lParam);
void __cdecl IMN_OutDbg(PgImeCtrl *kImeCtrl, unsigned int wParam); // idb
bool __thiscall PgImeCtrl::OnImeEndComposition(PgImeCtrl *this, unsigned int wParam, int lParam); // idb
void __thiscall PgImeCtrl::GetCandidateList(PgImeCtrl *this); // idb
void __thiscall PgImeCtrl::ClearCandidate(PgImeCtrl *this); // idb
LONG __thiscall PgImeCtrl::GetCorsorPos(PgImeCtrl *this);
void __thiscall PgWinButExt::PgWinButExt(PgWinButExt *this); // idb
PgWinButExt *__thiscall PgWinButExt::`vector deleting destructor'(PgWinButExt *this, unsigned int a2);
void __thiscall PgWinButExt::~PgWinButExt(PgWinButExt *this); // idb
PgWinButExt *__cdecl PgWinButExt::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, char *pcName, unsigned int uiExtStyle); // idb
void __thiscall PgWinButExt::ProcessMeInput(PgWinButExt *this, bool *bHit); // idb
void __thiscall NiPointer<PgWinButExt>::~NiPointer<PgWinButExt>(NiPointer<SpScreenGeometryClip> *this); // idb
void __thiscall PgWinButExt::SetButShow(PgWinButExt *this, PgWinBut::ButShow eShow); // idb
void __thiscall PgWinCamera::PgWinCamera(PgWinCamera *this); // idb
void __thiscall PgWinCamera::UpdateWorldData(PgWinCamera *this); // idb
void __thiscall PgWinCamera::UpdateRenderTargetBounds(PgWinCamera *this); // idb
PgWinCamera *__thiscall PgWinCamera::`scalar deleting destructor'(PgWinCamera *this, unsigned int a2);
void __thiscall PgWinCamera::~PgWinCamera(PgWinCamera *this); // idb
NiAlphaController *__cdecl PgWinAnim::CreateLoopingAlphaAnim(); // idb
void __cdecl PgSHGetPathFromIDList(char *pszPath); // idb
void __thiscall PgSocket::PgSocket(PgSocket *this); // idb
// void __thiscall PgSocket::~PgSocket(PgSocket *this); idb
// void __thiscall PgSocket::reset(PgSocket *this); idb
void __thiscall PgSocket::set(PgSocket *this); // idb
char __thiscall PgSocket::connect(PgSocket *this, char *addr, int port);
char __thiscall PgSocket::connect(PgSocket *this, int a1, int a2, int a3, int a4, int port);
// void __thiscall PgSocket::encoding(PgSocket *this, char *buffer, int len); idb
int __thiscall PgSocket::flush(PgSocket *this); // idb
char __thiscall PgSocket::sendpacket(PgSocket *this, void *packet, int len);
int __thiscall PgSocket::frombuffer(PgSocket *this, void *packet); // idb
int __thiscall PgSocket::recievepacket(PgSocket *this, void *packet); // idb
void __thiscall PgSocket::RepositionSendEncryptTableInx(PgSocket *this, unsigned __int16 newinx); // idb
void __thiscall PgEditTextGeometry::PgEditTextGeometry(PgEditTextGeometry *this, PgFont *pkFont); // idb
PgEditTextGeometry *__thiscall PgEditTextGeometry::`scalar deleting destructor'(PgEditTextGeometry *this, unsigned int a2);
void __thiscall PgEditTextGeometry::~PgEditTextGeometry(PgEditTextGeometry *this); // idb
void __thiscall PgEditTextGeometry::SetAutoAlign(PgEditTextGeometry *this, bool bAutoAlign); // idb
bool __thiscall PgEditTextGeometry::GetAutoAlign(PgEditTextGeometry *this); // idb
void __thiscall PgEditTextGeometry::SetText(PgEditTextGeometry *this, const char *pcText); // idb
void __thiscall PgEditTextGeometry::SetDrawRect(PgEditTextGeometry *this, tagRECT *rkRect); // idb
void __thiscall PgPasswdTextGeometry::PgPasswdTextGeometry(PgPasswdTextGeometry *this, PgFont *pkFont); // idb
PgPasswdTextGeometry *__thiscall PgPasswdTextGeometry::`vector deleting destructor'(PgPasswdTextGeometry *this, unsigned int a2);
void __thiscall PgPasswdTextGeometry::~PgPasswdTextGeometry(PgPasswdTextGeometry *this); // idb
void __thiscall PgPasswdTextGeometry::SetText(PgPasswdTextGeometry *this, const char *pcText); // idb
char *__thiscall PgPasswdTextGeometry::GetText(PgPasswdTextGeometry *this); // idb
void __thiscall PgImeEditTextGeometry::PgImeEditTextGeometry(PgImeEditTextGeometry *this, PgFont *pkFont); // idb
PgImeEditTextGeometry *__thiscall PgImeEditTextGeometry::`vector deleting destructor'(PgImeEditTextGeometry *this, unsigned int a2);
void __thiscall PgImeEditTextGeometry::~PgImeEditTextGeometry(PgImeEditTextGeometry *this); // idb
char __thiscall PgImeEditTextGeometry::SetText(PgImeEditTextGeometry *this, char *pcOrgStr, char *pcCompStr, int iCompStrPos, char *pbCompStrAttr);
char *__thiscall PgImeEditTextGeometry::GetText(PgImeEditTextGeometry *this); // idb
void __thiscall PgImeEditTextGeometry::RecreateText(PgImeEditTextGeometry *this); // idb
void __thiscall StrBuffer::operator+=(StrBuffer *this, const char *acSrc); // idb
char *__thiscall PgImeEditTextGeometry::GetCompText(PgImeEditTextGeometry *this); // idb
int __cdecl rmTailSpace(char *); // idb
unsigned int __cdecl hexToInt(const char *); // idb
void __cdecl EncryptString(const char *, const char *, char *); // idb
int __cdecl DecryptString(const char *source, const char *, char *); // idb
char __cdecl GetSplitData(const char *a1, const char *a2, char *a3);
char __cdecl GetNMClipData(char *dest, unsigned int a2, const char *a3, bool a4);
void __cdecl CCoreCipher::SeedEncrypt(unsigned __int8 *, unsigned __int32 *); // idb
void __cdecl CCoreCipher::SeedDecrypt(unsigned __int8 *, unsigned __int32 *); // idb
void __cdecl CCoreCipher::SeedEncRoundKey(unsigned __int32 *, unsigned __int8 *); // idb
// HRESULT __stdcall HlinkSimpleNavigateToString(LPCWSTR szTarget, LPCWSTR szLocation, LPCWSTR szTargetFrameName, IUnknown *pUnk, IBindCtx *pbc, IBindStatusCallback *, DWORD grfHLNF, DWORD dwReserved);
// void __thiscall ATL::CSimpleArray<HINSTANCE__ *,ATL::CSimpleArrayEqualHelper<HINSTANCE__ *>>::RemoveAll(ATL::CSimpleArray<HINSTANCE__ *,ATL::CSimpleArrayEqualHelper<HINSTANCE__ *> > *this); idb
HRESULT __thiscall ATL::CComCriticalSection::Init(ATL::CComCriticalSection *this); // idb
void __thiscall ATL::_ATL_BASE_MODULE70::_ATL_BASE_MODULE70(ATL::_ATL_BASE_MODULE70 *this); // idb
void __thiscall ATL::CAtlBaseModule::~CAtlBaseModule(ATL::CAtlBaseModule *this); // idb
HINSTANCE__ *__thiscall ATL::CAtlBaseModule::GetHInstanceAt(ATL::CAtlBaseModule *this, int i); // idb
void __thiscall ATL::CAtlBaseModule::CAtlBaseModule(ATL::CAtlBaseModule *this); // idb
void __thiscall ATL::CWin32Heap::~CWin32Heap(ATL::CWin32Heap *this); // idb
void *__thiscall ATL::CWin32Heap::Allocate(ATL::CWin32Heap *this, unsigned int nBytes); // idb
void __thiscall ATL::CWin32Heap::Free(ATL::CWin32Heap *this, void *p); // idb
void *__thiscall ATL::CWin32Heap::Reallocate(ATL::CWin32Heap *this, void *p, unsigned int nBytes); // idb
unsigned int __thiscall ATL::CWin32Heap::GetSize(ATL::CWin32Heap *this, void *p); // idb
ATL::CWin32Heap *__thiscall ATL::CWin32Heap::`vector deleting destructor'(ATL::CWin32Heap *this, unsigned int a2);
// HRESULT __cdecl ATL::AtlMultiply<unsigned long>(unsigned int *piResult, unsigned int iLeft, unsigned int iRight); idb
void __thiscall ATL::CAtlStringMgr::Free(ATL::CAtlStringMgr *this, ATL::CStringData *pData); // idb
ATL::CNilStringData *__thiscall ATL::CAtlStringMgr::GetNilString(ATL::CAtlStringMgr *this);
ATL::CAtlStringMgr *__thiscall ATL::CAtlStringMgr::Clone(ATL::CAtlStringMgr *this);
ATL::CAtlStringMgr *__thiscall ATL::CAtlStringMgr::`scalar deleting destructor'(ATL::CAtlStringMgr *this, unsigned int a2);
// HRESULT __cdecl ATL::AtlAdd<unsigned long>(unsigned int *ptResult, unsigned int tLeft, unsigned int tRight); idb
ATL::CStringData *__thiscall ATL::CAtlStringMgr::Allocate(ATL::CAtlStringMgr *this, int nChars, int nCharSize); // idb
ATL::CStringData *__thiscall ATL::CAtlStringMgr::Reallocate(ATL::CAtlStringMgr *this, ATL::CStringData *pData, int nChars, int nCharSize); // idb
NiD3DShaderProgramFactory *__cdecl NiD3DShaderProgramFactory::GetInstance(); // idb
void __cdecl NiD3DShaderProgramFactory::Shutdown(); // idb
char __cdecl NiD3DShaderProgramFactory::RecreateVertexShader(NiD3DVertexShader *pkVertexShader);
char __cdecl NiD3DShaderProgramFactory::RecreatePixelShader(NiD3DPixelShader *pkPixelShader);
void __cdecl NiD3DShaderProgramFactory::SetD3DRenderer(NiDX9Renderer *pkD3DRenderer); // idb
char *__thiscall NiD3DShaderProgramFactory::GetFirstProgramDirectory(NiD3DShaderProgramFactory *this, void **kIter);
const char *__stdcall NiD3DShaderProgramFactory::GetNextProgramDirectory(void **kIter);
NiD3DVertexShader *__thiscall NiD3DShaderProgramFactory::GetVertexShader(NiD3DShaderProgramFactory *this, const char *pcShaderName); // idb
NiD3DPixelShader *__thiscall NiD3DShaderProgramFactory::GetPixelShader(NiD3DShaderProgramFactory *this, const char *pcShaderName); // idb
void __thiscall NiD3DShaderProgramFactory::InsertVertexShaderIntoMap(NiD3DShaderProgramFactory *this, NiD3DVertexShader *pkShader); // idb
void __thiscall NiD3DShaderProgramFactory::InsertPixelShaderIntoMap(NiD3DShaderProgramFactory *this, NiD3DPixelShader *pkShader); // idb
char __cdecl NiD3DShaderProgramFactory::ResolveShaderFileName(const char *pcOriginalName, char *pcTrueName, unsigned int uiStringLen);
void __cdecl NiD3DShaderProgramFactory::UnregisterShaderCreator(NiD3DShaderProgramCreator *pkCreator); // idb
NiD3DShaderProgramCreator *__cdecl NiD3DShaderProgramFactory::GetShaderCreator(const char *pcFilename); // idb
void __cdecl NiD3DShaderProgramFactory::_SDMShutdown(); // idb
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiD3DVertexShader *>,NiD3DVertexShader *>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiD3DVertexShader *>,NiD3DVertexShader *>(NiTStringTemplateMap<NiTPointerMap<char const *,NiD3DVertexShader *>,NiD3DVertexShader *> *this); // idb
void __thiscall NiTStringTemplateMap<NiTMap<char const *,NiD3DXEffectFile *>,NiD3DXEffectFile *>::ClearValue(NiTStringTemplateMap<NiTPointerMap<char const *,NiD3DShaderProgramCreator *>,NiD3DShaderProgramCreator *> *this, NiTMapItem<char const *,NiD3DShaderProgramCreator *> *pkItem); // idb
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiD3DPixelShader *>,NiD3DPixelShader *>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiD3DPixelShader *>,NiD3DPixelShader *>(NiTStringTemplateMap<NiTPointerMap<char const *,NiD3DPixelShader *>,NiD3DPixelShader *> *this); // idb
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiD3DShaderProgramCreator *>,NiD3DShaderProgramCreator *>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiD3DShaderProgramCreator *>,NiD3DShaderProgramCreator *>(NiTStringTemplateMap<NiTPointerMap<char const *,NiD3DShaderProgramCreator *>,NiD3DShaderProgramCreator *> *this); // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiD3DVertexShader *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiD3DVertexShader *>::`vector deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiD3DVertexShader *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<char const *,NiD3DVertexShader *>::`scalar deleting destructor'(NiTPointerMap<char const *,NiD3DVertexShader *> *this, unsigned int a2);
NiTStringPointerMap<NiD3DVertexShader *> *__thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiD3DVertexShader *>,NiD3DVertexShader *>::`vector deleting destructor'(NiTStringPointerMap<NiD3DVertexShader *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiD3DPixelShader *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiD3DPixelShader *>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiD3DPixelShader *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<char const *,NiD3DPixelShader *>::`vector deleting destructor'(NiTPointerMap<char const *,NiD3DPixelShader *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiD3DShaderProgramCreator *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiD3DShaderProgramCreator *>::`vector deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiD3DShaderProgramCreator *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<char const *,NiD3DShaderProgramCreator *>::`scalar deleting destructor'(NiTPointerMap<char const *,NiD3DShaderProgramCreator *> *this, unsigned int a2);
NiTStringPointerMap<NiD3DShaderProgramCreator *> *__thiscall NiTStringPointerMap<NiD3DShaderProgramCreator *>::`scalar deleting destructor'(NiTStringPointerMap<NiD3DShaderProgramCreator *> *this, unsigned int a2);
NiD3DVertexShader *__cdecl NiD3DShaderProgramFactory::CreateVertexShaderFromFile(const char *pcFileName, const char *pcShaderName, const char *pcEntryPoint, const char *pcShaderTarget, IDirect3DVertexDeclaration9 *hDecl, unsigned int uiUsage, int bSoftwareVP);
NiD3DPixelShader *__cdecl NiD3DShaderProgramFactory::CreatePixelShaderFromFile(const char *pcFileName, const char *pcShaderName, const char *pcEntryPoint, const char *pcShaderTarget); // idb
void __cdecl NiD3DShaderProgramFactory::ReleaseVertexShader(NiD3DVertexShader *pkShader); // idb
void __cdecl NiD3DShaderProgramFactory::ReleasePixelShader(NiD3DPixelShader *pkShader); // idb
void __thiscall NiD3DShaderProgramFactory::AddProgramDirectory(NiD3DShaderProgramFactory *this, const char *pacDirectory); // idb
void __thiscall NiD3DShaderProgramFactory::RemoveProgramDirectory(NiD3DShaderProgramFactory *this, const char *pcDirectory); // idb
void __thiscall NiD3DShaderProgramFactory::RemoveAllProgramDirectories(NiD3DShaderProgramFactory *this); // idb
NiTStringPointerMap<NiD3DPixelShader *> *__thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiD3DPixelShader *>,NiD3DPixelShader *>::`scalar deleting destructor'(NiTStringPointerMap<NiD3DPixelShader *> *this, unsigned int a2);
void __thiscall NiD3DShaderProgramFactory::NiD3DShaderProgramFactory(NiD3DShaderProgramFactory *this); // idb
void __thiscall NiD3DShaderProgramFactory::~NiD3DShaderProgramFactory(NiD3DShaderProgramFactory *this); // idb
void __cdecl NiD3DShaderProgramFactory::CreateShaderCreatorMap(); // idb
void __cdecl NiD3DShaderProgramFactory::_SDMInit(); // idb
NiD3DShaderProgramFactory *__thiscall NiD3DShaderProgramFactory::`scalar deleting destructor'(NiD3DShaderProgramFactory *this, unsigned int a2);
char __cdecl NiD3DShaderProgramFactory::RegisterShaderCreator(const char *pcExt, NiD3DShaderProgramCreator *pkCreator);
char __thiscall NiD3DDefaultShader::Initialize(NiD3DDefaultShader *this, NiDX9Renderer *pkRenderer);
unsigned int __thiscall NiD3DDefaultShader::PostProcessPipeline(NiD3DDefaultShader *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound); // idb
NiTArray<NiTextureEffect const *> *__thiscall NiTArray<NiTextureEffect const *>::`vector deleting destructor'(NiTArray<NiTextureEffect const *> *this, unsigned int a2);
bool __thiscall NiD3DDefaultShader::IsCurrentCombineMode(NiD3DDefaultShader *this, _D3DBLEND eSrcBlend, _D3DBLEND eDestBlend); // idb
void __thiscall NiD3DDefaultShader::ClearProjectedTextures(NiD3DDefaultShader *this); // idb
void __stdcall NiD3DDefaultShader::PackTextureTransform(NiMatrix3 *kTexMatrix, NiD3DTextureStage *pkStage);
void __thiscall NiD3DDefaultShader::~NiD3DDefaultShader(NiD3DDefaultShader *this); // idb
NiRTTI *NiD3DDefaultShader::GetRTTI();
signed int __thiscall NiD3DDefaultShader::PreProcessPipeline(NiD3DDefaultShader *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound);
NiD3DTextureStage *__thiscall NiD3DDefaultShader::AddTextureStage(NiD3DDefaultShader *this, NiTexturingProperty::Map *pkMap, unsigned int uiIndex); // idb
NiD3DTextureStage *__thiscall NiD3DDefaultShader::AddTextureStage(NiD3DDefaultShader *this, NiTexturingProperty::BumpMap *pkMap, unsigned int uiIndex); // idb
NiD3DTextureStage *__thiscall NiD3DDefaultShader::AddTextureStage(NiD3DDefaultShader *this, NiTextureEffect *pkEffect); // idb
NiD3DTextureStage *__thiscall NiD3DDefaultShader::AddClipperStage(NiD3DDefaultShader *this, NiTextureEffect *pkEffect); // idb
void __thiscall NiD3DDefaultShader::NextFrame(NiD3DDefaultShader *this); // idb
unsigned int __thiscall NiTArray<NiTextureEffect const *>::Add(NiTArray<NiTextureEffect const *> *this, NiTextureEffect *const *element); // idb
NiD3DDefaultShader *__thiscall NiD3DDefaultShader::`vector deleting destructor'(NiD3DDefaultShader *this, unsigned int a2);
void __thiscall NiD3DDefaultShader::ClosePass(NiD3DDefaultShader *this, NiTexturingProperty::Map *pkBaseMap); // idb
char __thiscall NiD3DDefaultShader::SaveProjectedTexture(NiD3DDefaultShader *this, NiTextureEffect *pkEffect, bool bClipped);
void __thiscall NiD3DDefaultShader::NiD3DDefaultShader(NiD3DDefaultShader *this); // idb
void __thiscall NiD3DDefaultShader::OpenNewPass(NiD3DDefaultShader *this, _D3DBLEND eSrcBlend, _D3DBLEND eDestBlend, bool bReturnBaseTextureAlpha, bool bReturnVertexColorAlpha); // idb
void __thiscall NiD3DDefaultShader::UpdateProjectedTextures(NiD3DDefaultShader *this, NiDynamicEffectState *pkState); // idb
void __thiscall NiD3DDefaultShader::PostProcessFogProperties(NiD3DDefaultShader *this, NiFogProperty *pkFog, NiAlphaProperty *pkAlpha, NiTexturingProperty::Map *pkBaseMap, NiTexturingProperty::ApplyMode eApply); // idb
signed int __thiscall NiD3DDefaultShader::ConstructPipeline(NiD3DDefaultShader *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound);
signed int __thiscall NiD3DDefaultShader::UpdatePipeline(NiD3DDefaultShader *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound);
void __thiscall NiD3DTextureStageGroup::NiD3DTextureStageGroup(NiD3DTextureStageGroup *this); // idb
void __thiscall NiD3DTextureStageGroup::SetStageState(NiD3DTextureStageGroup *this, unsigned int uiState, unsigned int uiValue, bool bSave); // idb
bool __thiscall NiD3DTextureStageGroup::GetStageState(NiD3DTextureStageGroup *this, unsigned int uiState, unsigned int *uiValue, bool *bSave); // idb
void __thiscall NiD3DTextureStageGroup::SetSamplerState(NiD3DTextureStageGroup *this, unsigned int uiState, unsigned int uiValue, bool bSave, bool bUseMapValue); // idb
void __thiscall NiD3DTextureStageGroup::RemoveAllStageStates(NiD3DTextureStageGroup *this); // idb
void __thiscall NiD3DTextureStageGroup::RemoveAllSamplerStates(NiD3DTextureStageGroup *this); // idb
unsigned int __thiscall NiD3DTextureStageGroup::SetAllStageStates(NiD3DTextureStageGroup *this, unsigned int uiStage); // idb
unsigned int __thiscall NiD3DTextureStageGroup::SetAllStageSamplers(NiD3DTextureStageGroup *this, unsigned int uiStage); // idb
NiTPoolContainer<NiD3DTextureStageGroup> *__thiscall NiTPoolContainer<NiD3DTextureStageGroup>::`scalar deleting destructor'(NiTPoolContainer<NiD3DTextureStageGroup> *this, unsigned int a2);
unsigned int __thiscall NiD3DTextureStageGroup::SetTextureStage(NiD3DTextureStageGroup *this, unsigned int uiStage); // idb
void __thiscall NiTPoolContainer<NiD3DTextureStageGroup>::NiTPoolContainer<NiD3DTextureStageGroup>(NiTPoolContainer<NiD3DTextureStageGroup> *this, unsigned int uiSize); // idb
void __cdecl NiD3DTextureStageGroup::InitializePools(); // idb
void __thiscall NiTPool<NiD3DTextureStageGroup>::CreateNewObjects(NiTPool<NiD3DTextureStageGroup> *this, unsigned int uiSize); // idb
void __thiscall NiTPoolContainer<NiD3DTextureStageGroup>::~NiTPoolContainer<NiD3DTextureStageGroup>(NiTPoolContainer<NiD3DTextureStageGroup> *this); // idb
void __cdecl NiD3DTextureStageGroup::ShutdownPools(); // idb
NiD3DTextureStageGroup *__cdecl NiD3DTextureStageGroup::GetFreeTextureStageGroup(); // idb
void __cdecl NiD3DTextureStageGroup::ReleaseTextureStageGroup(NiD3DTextureStageGroup *pkGroup); // idb
void __thiscall NiD3DTextureStage::ModifyClampMode(NiD3DTextureStage *this, bool bNonPow2); // idb
void __cdecl NiD3DTextureStage::DisableStage(unsigned int uiStage); // idb
NiTPoolContainer<NiD3DTextureStage> *__thiscall NiTPoolContainer<NiD3DTextureStage>::`scalar deleting destructor'(NiTPoolContainer<NiD3DTextureStage> *this, unsigned int a2);
void __thiscall NiD3DTextureStage::NiD3DTextureStage(NiD3DTextureStage *this); // idb
void __thiscall NiD3DTextureStage::SetTextureTransformFlags(NiD3DTextureStage *this, unsigned int uiFlags, const char *pszGlobalName); // idb
void __thiscall NiD3DTextureStage::SetClampMode(NiD3DTextureStage *this, NiTexturingProperty::ClampMode eClamp); // idb
void __thiscall NiD3DTextureStage::SetFilterMode(NiD3DTextureStage *this, NiTexturingProperty::FilterMode eFilter); // idb
char __stdcall NiD3DTextureStage::CalculateTransformationMatrix(unsigned int uiCalculationMethod, _D3DMATRIX *pkD3DMatSource);
void *__thiscall NiD3DTextureStage::`vector deleting destructor'(NiD3DTextureStage *this, unsigned int); // idb
void __thiscall NiTPoolContainer<NiD3DTextureStage>::NiTPoolContainer<NiD3DTextureStage>(NiTPoolContainer<NiD3DTextureStage> *this, unsigned int uiSize); // idb
void __cdecl NiD3DTextureStage::SetD3DRenderer(NiDX9Renderer *pkD3DRenderer); // idb
void __cdecl NiD3DTextureStage::InitializePools(); // idb
void __thiscall NiD3DTextureStage::ApplyTextureTransform(NiD3DTextureStage *this); // idb
void __thiscall NiD3DTextureStage::ApplyTexture(NiD3DTextureStage *this); // idb
void __thiscall NiTPool<NiD3DTextureStage>::CreateNewObjects(NiTPool<NiD3DTextureStage> *this, unsigned int uiSize); // idb
void __thiscall NiTSet<NiD3DPass *>::AddUnique(NiTSet<NiD3DTextureStageGroup *> *this, NiD3DTextureStageGroup *const *element); // idb
void __thiscall NiTPoolContainer<NiD3DTextureStage>::~NiTPoolContainer<NiD3DTextureStage>(NiTPoolContainer<NiD3DTextureStage> *this); // idb
void __cdecl NiD3DTextureStage::ShutdownPools(); // idb
char __thiscall NiD3DTextureStage::ConfigureStage(NiD3DTextureStage *this);
void __thiscall NiD3DTextureStage::ReturnStageToPool(NiD3DTextureStage *this); // idb
NiPointer<NiD3DTextureStage> *__cdecl NiD3DTextureStage::CreateNewStage(NiPointer<NiD3DTextureStage> *result); // idb
NiTPoolContainer<NiD3DRenderStateGroup::NiD3DRSEntry> *__thiscall NiTPoolContainer<NiD3DRenderStateGroup::NiD3DRSEntry>::`scalar deleting destructor'(NiTPoolContainer<NiD3DRenderStateGroup::NiD3DRSEntry> *this, unsigned int a2);
void __thiscall NiTPoolContainer<NiD3DRenderStateGroup::NiD3DRSEntry>::~NiTPoolContainer<NiD3DRenderStateGroup::NiD3DRSEntry>(NiTPoolContainer<NiD3DRenderStateGroup::NiD3DRSEntry> *this); // idb
void __cdecl NiD3DRenderStateGroup::SetD3DRenderer(NiDX9Renderer *pkD3DRenderer); // idb
unsigned int __thiscall NiD3DRenderStateGroup::SetRenderStates(NiD3DRenderStateGroup *this); // idb
unsigned int __thiscall NiD3DRenderStateGroup::RestoreRenderStates(NiD3DRenderStateGroup *this); // idb
void __thiscall NiTPoolContainer<NiD3DRenderStateGroup>::NiTPoolContainer<NiD3DRenderStateGroup>(NiTPoolContainer<NiD3DRenderStateGroup> *this, unsigned int uiSize); // idb
void __thiscall NiTPoolContainer<NiD3DRenderStateGroup::NiD3DRSEntry>::NiTPoolContainer<NiD3DRenderStateGroup::NiD3DRSEntry>(NiTPoolContainer<NiD3DRenderStateGroup::NiD3DRSEntry> *this, unsigned int uiSize); // idb
void __cdecl NiD3DRenderStateGroup::InitializePools(); // idb
char __thiscall NiD3DRenderStateGroup::GetRenderState(NiD3DRenderStateGroup *this, unsigned int uiRenderState, unsigned int *uiValue, bool *bSave);
void __thiscall NiTPool<NiD3DRenderStateGroup>::CreateNewObjects(NiTPool<NiD3DRenderStateGroup> *this, unsigned int uiSize); // idb
void __thiscall NiTPool<NiD3DRenderStateGroup::NiD3DRSEntry>::CreateNewObjects(NiTPool<NiD3DRenderStateGroup::NiD3DRSEntry> *this, unsigned int uiSize); // idb
void __cdecl NiD3DRenderStateGroup::ShutdownPools(); // idb
void __thiscall NiD3DRenderStateGroup::~NiD3DRenderStateGroup(NiD3DRenderStateGroup *this); // idb
void __thiscall NiD3DRenderStateGroup::SetRenderState(NiD3DRenderStateGroup *this, unsigned int uiRenderState, unsigned int uiValue, bool bSave); // idb
NiD3DRenderStateGroup *__cdecl NiD3DRenderStateGroup::GetFreeRenderStateGroup(); // idb
void __cdecl NiD3DRenderStateGroup::ReleaseRenderStateGroup(NiD3DRenderStateGroup *pkGroup); // idb
void __thiscall NiTPoolContainer<NiD3DRenderStateGroup>::~NiTPoolContainer<NiD3DRenderStateGroup>(NiTPoolContainer<NiD3DRenderStateGroup> *this); // idb
NiDX9Renderer *NiD3DPass::GetD3DRenderer();
unsigned int __thiscall NiD3DPass::PostProcessRenderingPass(NiD3DPass *this, unsigned int uiPass); // idb
bool __thiscall NiD3DPass::CheckFreeStages(NiD3DPass *this, unsigned int uiStages, unsigned int uiTextures); // idb
void __cdecl NiD3DPass::SetMaxTextureBlendStages(unsigned int uiMaxTextureBlendStages); // idb
void __cdecl NiD3DPass::SetMaxSimultaneousTextures(unsigned int uiMaxSimultaneousTextures); // idb
void __cdecl NiD3DPass::SetMaxSamplers(unsigned int uiMaxSamplers); // idb
NiTPoolContainer<NiD3DPass> *__thiscall NiTPoolContainer<NiD3DPass>::`scalar deleting destructor'(NiTPoolContainer<NiD3DPass> *this, unsigned int a2);
void __thiscall NiTPoolContainer<NiD3DPass>::~NiTPoolContainer<NiD3DPass>(NiTPoolContainer<NiD3DPass> *this); // idb
void __thiscall NiD3DPass::SetPixelShaderProgramFileName(NiD3DPass *this, const char *pcProgramFile); // idb
void __thiscall NiD3DPass::SetPixelShaderProgramEntryPoint(NiD3DPass *this, const char *pcEntryPoint); // idb
void __thiscall NiD3DPass::SetPixelShaderProgramShaderTarget(NiD3DPass *this, const char *pcShaderTarget); // idb
void __thiscall NiD3DPass::SetVertexShaderProgramFileName(NiD3DPass *this, const char *pcProgramFile); // idb
void __thiscall NiD3DPass::SetVertexShaderProgramEntryPoint(NiD3DPass *this, const char *pcEntryPoint); // idb
void __thiscall NiD3DPass::SetVertexShaderProgramShaderTarget(NiD3DPass *this, const char *pcShaderTarget); // idb
unsigned int __thiscall NiD3DPass::SetupRenderingPass(NiD3DPass *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound, unsigned int uiPass); // idb
void __cdecl NiD3DPass::SetD3DRenderer(NiDX9Renderer *pkD3DRenderer); // idb
void __cdecl NiD3DPass::InitializePools(); // idb
unsigned int __thiscall NiD3DPass::SetupShaderPrograms(NiD3DPass *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound, unsigned int uiPass); // idb
void __thiscall NiTArray<NiPointer<NiD3DTextureStage>>::NiTArray<NiPointer<NiD3DTextureStage>>(NiTArray<NiPointer<NiD3DTextureStage> > *this, unsigned int uiMaxSize, unsigned int uiGrowBy); // idb
void __thiscall NiTArray<NiPointer<NiD3DTextureStage>>::SetAt(NiTArray<NiPointer<NiD3DTextureStage> > *this, unsigned int uiIndex, NiPointer<NiD3DTextureStage> *element); // idb
void __thiscall NiTArray<NiPointer<NiD3DTextureStage>>::RemoveAll(NiTArray<NiPointer<NiD3DTextureStage> > *this); // idb
void __thiscall NiTArray<NiPointer<NiD3DTextureStage>>::SetSize(NiTArray<NiPointer<NiD3DTextureStage> > *this, unsigned int uiMaxSize); // idb
void __thiscall NiTArray<NiPointer<NiD3DTextureStage>>::~NiTArray<NiPointer<NiD3DTextureStage>>(NiTArray<NiPointer<NiD3DTextureStage> > *this); // idb
NiTArray<NiPointer<NiD3DTextureStage> > *__thiscall NiTArray<NiPointer<NiD3DTextureStage>>::`scalar deleting destructor'(NiTArray<NiPointer<NiD3DTextureStage> > *this, unsigned int a2);
void __thiscall NiD3DPass::NiD3DPass(NiD3DPass *this); // idb
void __cdecl NiD3DPass::ShutdownPools(); // idb
void __thiscall NiTPoolContainer<NiD3DPass>::NiTPoolContainer<NiD3DPass>(NiTPoolContainer<NiD3DPass> *this, unsigned int uiSize); // idb
void __thiscall NiD3DPass::~NiD3DPass(NiD3DPass *this); // idb
void __thiscall NiD3DPass::ReturnPassToPool(NiD3DPass *this); // idb
signed int __thiscall NiD3DPass::SetStage(NiD3DPass *this, unsigned int uiStageNum, NiD3DTextureStage *pkStage);
void __thiscall NiTPool<NiD3DPass>::CreateNewObjects(NiTPool<NiD3DPass> *this, unsigned int uiSize); // idb
unsigned int *__thiscall NiD3DPass::`vector deleting destructor'(NiD3DPass *this, unsigned int a2);
NiPointer<NiD3DPass> *__cdecl NiD3DPass::CreateNewPass(NiPointer<NiD3DPass> *result); // idb
char __thiscall NiD3DShader::Initialize(NiD3DShader *this, NiDX9Renderer *pkRenderer);
unsigned int __stdcall NiD3DShaderInterface::PreProcessPipeline(NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound);
unsigned int __thiscall NiD3DShader::PostProcessPipeline(NiD3DShader *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound); // idb
void __cdecl NiD3DShader::InitializePools(); // idb
void __cdecl NiD3DShader::ShutdownPools(); // idb
NiVBChip *__thiscall NiGeometryBufferData::GetVBChip(NiGeometryBufferData *this, unsigned int uiIndex); // idb
unsigned int __thiscall NiD3DShader::FirstPass(NiD3DShader *this); // idb
int __thiscall NiD3DShader::NextPass(NiD3DShader *this);
int __thiscall NiD3DShader::SetupRenderingPass(NiD3DShader *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound);
unsigned int __thiscall NiD3DShader::SetupTransformations(NiD3DShader *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound); // idb
NiD3DShaderDeclaration *__thiscall NiD3DXEffectShader::GetShaderDecl(NiD3DShader *this); // idb
void __cdecl NiD3DShader::PackWorldParallelEffect(NiMatrix3 *kWorldMat, NiPoint3 *kWorldTrans, NiD3DTextureStage *pkStage, bool bSave, NiDX9Renderer *pkD3DRenderer); // idb
void __cdecl NiD3DShader::PackWorldPerspectiveEffect(NiMatrix3 *kWorldMat, NiPoint3 *kWorldTrans, NiD3DTextureStage *pkStage, bool bSave, NiDX9Renderer *pkD3DRenderer); // idb
void __cdecl NiD3DShader::PackWorldSphereEffect(NiMatrix3 *kWorldMat, NiPoint3 *kWorldTrans, NiD3DTextureStage *pkStage, bool bSave, NiDX9Renderer *pkD3DRenderer); // idb
void __cdecl NiD3DShader::PackSpecularCubeEffect(NiMatrix3 *kWorldMat, NiPoint3 *kWorldTrans, NiD3DTextureStage *pkStage, bool bSave, NiDX9Renderer *pkD3DRenderer); // idb
void __cdecl NiD3DShader::PackDiffuseCubeEffect(NiMatrix3 *kWorldMat, NiPoint3 *kWorldTrans, NiD3DTextureStage *pkStage, bool bSave, NiDX9Renderer *pkD3DRenderer); // idb
// void __cdecl NiD3DShader::_SDMInit(); idb
signed int __thiscall NiD3DShader::PreProcessPipeline(NiD3DShader *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound);
unsigned int __thiscall NiD3DShader::SetupShaderPrograms(NiD3DShader *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound); // idb
NiGeometryBufferData *__thiscall NiD3DShader::PrepareGeometryForRendering(NiD3DShader *this, NiGeometry *pkGeometry, NiSkinPartition::Partition *pkPartition, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState); // idb
void __thiscall NiD3DShader::ResetPasses(NiD3DShader *this); // idb
void __thiscall NiD3DShader::DestroyRendererData(NiD3DShader *this); // idb
void __thiscall NiD3DShader::RecreateRendererData(NiD3DShader *this); // idb
char __thiscall NiD3DShader::GetVSPresentAllPasses(NiD3DShader *this);
char __thiscall NiD3DShader::GetVSPresentAnyPass(NiD3DShader *this);
char __thiscall NiD3DShader::GetPSPresentAllPasses(NiD3DShader *this);
char __thiscall NiD3DShader::GetPSPresentAnyPass(NiD3DShader *this);
void __cdecl NiD3DShader::SetupSCMExtraData(NiD3DShader *pkD3DShader, NiGeometry *pkGeometry); // idb
void __thiscall NiD3DShader::~NiD3DShader(NiD3DShader *this); // idb
char __thiscall NiD3DShader::SetupGeometry(NiD3DShader *this, NiGeometry *pkGeometry);
void __thiscall NiD3DShaderInterface::NiD3DShaderInterface(NiD3DShaderInterface *this); // idb
unsigned int __stdcall NiD3DShaderInterface::PostRender(NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound);
NiGeometryBufferData *__stdcall NiD3DShaderInterface::PrepareGeometryForRendering(NiGeometry *pkGeometry, NiSkinPartition::Partition *pkPartition, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState);
NiRTTI *NiD3DShaderInterface::GetRTTI();
void __thiscall NiD3DShaderInterface::SetIsBestImplementation(NiD3DShaderInterface *this, bool bIsBest); // idb
void __thiscall NiD3DShaderInterface::SetD3DRenderer(NiD3DShaderInterface *this, NiDX9Renderer *pkD3DRenderer); // idb
unsigned int __cdecl NiD3DShaderInterface::InitializeShaderSystem(NiDX9Renderer *pkD3DRenderer); // idb
unsigned int __cdecl NiD3DShaderInterface::ShutdownShaderSystem(); // idb
void __thiscall NiD3DShaderInterface::~NiD3DShaderInterface(NiD3DShaderInterface *this); // idb
char __thiscall NiD3DShaderInterface::Initialize(NiD3DShaderInterface *this, NiDX9Renderer *pkRenderer);
NiD3DShaderInterface *__thiscall NiD3DShaderInterface::`vector deleting destructor'(NiD3DShaderInterface *this, unsigned int a2);
void __cdecl NiDX9DeviceDesc::DisplayFormatInfo::GetDepthStencilBPPFromFormat(_D3DFORMAT eD3DFmt, unsigned int *uiDepthBPP, unsigned int *uiStencilBPP); // idb
signed int __cdecl NiDX9DeviceDesc::DisplayFormatInfo::GetDepthStencilIndex(_D3DFORMAT eDepthFormat);
char *__cdecl NiDX9SystemDesc::GetD3D9FormatString(_D3DFORMAT eD3DFmt); // idb
signed int __cdecl NiDX9SystemDesc::GetBPPFromFormat(_D3DFORMAT eD3DFmt);
NiTListBase<NiTPointerAllocator<unsigned int>,NiDX9DeviceDesc::DisplayFormatInfo *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiDX9DeviceDesc::DisplayFormatInfo *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiDX9DeviceDesc::DisplayFormatInfo *> *this, unsigned int a2);
NiTArray<NiDX9AdapterDesc::ModeDesc *> *__thiscall NiTArray<NiDX9AdapterDesc::ModeDesc *>::`vector deleting destructor'(NiTArray<NiDX9AdapterDesc::ModeDesc *> *this, unsigned int a2);
NiTArray<NiDX9AdapterDesc *> *__thiscall NiTArray<NiDX9AdapterDesc *>::`scalar deleting destructor'(NiTArray<NiDX9AdapterDesc *> *this, unsigned int a2);
unsigned int __thiscall NiDX9DeviceDesc::DisplayFormatInfo::GetNonmaskableMultiSampleQuality(NiDX9DeviceDesc::DisplayFormatInfo *this, bool bWindowed, _D3DFORMAT eRenderFormat, _D3DFORMAT eDepthFormat); // idb
bool __thiscall NiDX9DeviceDesc::DisplayFormatInfo::IsMultiSampleValid(NiDX9DeviceDesc::DisplayFormatInfo *this, bool bWindowed, _D3DMULTISAMPLE_TYPE eMultiSampleType, _D3DFORMAT eRenderFormat, _D3DFORMAT eDepthFormat); // idb
NiDX9Renderer::DepthStencilFormat __thiscall NiDX9DeviceDesc::DisplayFormatInfo::FindClosestDepthStencil(NiDX9DeviceDesc::DisplayFormatInfo *this, _D3DFORMAT eFBFormat, unsigned int uiDesiredDepthBPP, unsigned int uiDesiredStencilBPP); // idb
signed int __thiscall NiDX9DeviceDesc::GetNearestFrameBufferFormat(NiDX9DeviceDesc *this, bool bWindowed, unsigned int uiDesiredBPP);
NiDX9Renderer::DepthStencilFormat __thiscall NiDX9DeviceDesc::GetNearestDepthStencilFormat(NiDX9DeviceDesc *this, _D3DFORMAT eAdapterMode, _D3DFORMAT eFBFormat, unsigned int uiDesiredDepthBPP, unsigned int uiDesiredStencilBPP); // idb
unsigned int __thiscall NiDX9AdapterDesc::ModeDesc::GetClosestRefreshRate(NiDX9AdapterDesc::ModeDesc *this, unsigned int uiRefreshRate); // idb
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiDX9DeviceDesc::DisplayFormatInfo *>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiDX9DeviceDesc::DisplayFormatInfo *>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiDX9DeviceDesc::DisplayFormatInfo *> *this); // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,enum _D3DFORMAT,NiDX9DeviceDesc::DisplayFormatInfo::RenderTargetInfo *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,enum  _D3DFORMAT,NiDX9DeviceDesc::DisplayFormatInfo::RenderTargetInfo *>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,enum _D3DFORMAT,NiDX9DeviceDesc::DisplayFormatInfo::RenderTargetInfo *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<enum  _D3DFORMAT,NiDX9DeviceDesc::DisplayFormatInfo::RenderTargetInfo *>::`vector deleting destructor'(NiTPointerMap<enum _D3DFORMAT,NiDX9DeviceDesc::DisplayFormatInfo::RenderTargetInfo *> *this, unsigned int a2);
void __thiscall NiDX9DeviceDesc::DisplayFormatInfo::~DisplayFormatInfo(NiDX9DeviceDesc::DisplayFormatInfo *this); // idb
NiDX9Renderer::DepthStencilFormat __thiscall NiDX9DeviceDesc::DisplayFormatInfo::FindClosestDepthStencil(NiDX9DeviceDesc::DisplayFormatInfo *this, unsigned int uiDesiredDepthBPP, unsigned int uiDesiredStencilBPP); // idb
NiTPointerList<NiDX9DeviceDesc::DisplayFormatInfo *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiDX9DeviceDesc::DisplayFormatInfo *>::`scalar deleting destructor'(NiTPointerList<NiDX9DeviceDesc::DisplayFormatInfo *> *this, unsigned int a2);
NiDX9AdapterDesc::ModeDesc *__thiscall NiDX9AdapterDesc::ValidateFullscreenMode(NiDX9AdapterDesc *this, _D3DFORMAT eFormat, unsigned int uiWidth, unsigned int uiHeight, unsigned int *uiRefreshRate); // idb
void __thiscall NiDX9DeviceDesc::DisplayFormatInfo::DisplayFormatInfo(NiDX9DeviceDesc::DisplayFormatInfo *this, IDirect3D9 *pkD3D9, unsigned int uiAdapter, _D3DDEVTYPE kDevType, _D3DFORMAT eFormat, bool bFullscreen, bool bWindowed); // idb
void __thiscall NiDX9DeviceDesc::NiDX9DeviceDesc(NiDX9DeviceDesc *this, IDirect3D9 *pkD3D9, unsigned int uiAdapter, _D3DDEVTYPE kD3DDevType, _D3DFORMAT eCurrDisplayFormat, NiTPointerList<unsigned int> *kFormats); // idb
void __thiscall NiDX9AdapterDesc::NiDX9AdapterDesc(NiDX9AdapterDesc *this, IDirect3D9 *pkD3D9, unsigned int uiAdapter, NiTPointerList<unsigned int> *kFormats); // idb
void __thiscall NiDX9SystemDesc::FillAdapterInformation(NiDX9SystemDesc *this, IDirect3D9 *pkD3D9, NiTPointerList<unsigned int> *kFormats); // idb
void __thiscall NiDX9AdapterDesc::~NiDX9AdapterDesc(NiDX9AdapterDesc *this); // idb
void __thiscall NiDX9SystemDesc::NiDX9SystemDesc(NiDX9SystemDesc *this, IDirect3D9 *pkD3D9, NiTPointerList<unsigned int> *kFormats); // idb
void __thiscall NiDX9SystemDesc::~NiDX9SystemDesc(NiDX9SystemDesc *this); // idb
int __cdecl NiDX9Renderer::CreateDirect3D9(); // idb
char __cdecl NiDX9Renderer::ExpandDeviceType(NiDX9Renderer::DeviceDesc eDesc, _D3DDEVTYPE *eDevType, unsigned int *uiBehaviorFlags);
NiPixelFormat *__thiscall NiDX9Renderer::FindClosestPixelFormat(NiDX9Renderer *this, NiTexture::FormatPrefs *kFmtPrefs); // idb
unsigned int __thiscall NiDX9Renderer::GetMaxBuffersPerRenderTargetGroup(NiDX9Renderer *this); // idb
bool __thiscall NiDX9Renderer::GetIndependentBufferBitDepths(NiDX9Renderer *this); // idb
NiRenderTargetGroup *__thiscall NiDX9Renderer::GetDefaultRenderTargetGroup(NiDX9Renderer *this); // idb
NiDepthStencilBuffer *__thiscall NiDX9Renderer::GetDefaultDepthStencilBuffer(NiDX9Renderer *this); // idb
Ni2DBuffer *__thiscall NiDX9Renderer::GetDefaultBackBuffer(NiDX9Renderer *this); // idb
int __thiscall NiDX9Renderer::PrecacheTexture(NiDX9Renderer *this, NiTexture *pkIm, int bForceLoad, int bLocked);
char __stdcall NiDX9Renderer::PurgeAllTextures(bool bPurgeLocked);
char __thiscall NiDX9Renderer::Do_EndFrame(NiDX9Renderer *this);
void __thiscall NiDX9Renderer::Do_SetCameraData(NiDX9Renderer *this, NiPoint3 *kLoc, NiPoint3 *kDir, NiPoint3 *kUp, NiPoint3 *kRight, NiFrustum *kFrustum, NiRect<float> *kPort); // idb
// void __userpurge NiDX9Renderer::Do_SetScreenSpaceCameraData(NiDX9Renderer *this@<ecx>, int a2@<ebx>, int a3@<edi>, NiRect<float> *pkPort);
void __thiscall NiDX9Renderer::Do_BeginBatch(NiDX9Renderer *this, NiPropertyState *pkPropertyState, NiDynamicEffectState *pkEffectState); // idb
void __thiscall NiDX9Renderer::EmptyBatch(NiDX9Renderer *this); // idb
void __thiscall NiDX9Renderer::PurgeMaterial(NiDX9Renderer *this, NiMaterialProperty *pkMaterial); // idb
void __thiscall NiDX9Renderer::PurgeVertexShader(NiDX9Renderer *this, NiD3DVertexShader *pkShader); // idb
void __thiscall NiDX9Renderer::PurgePixelShader(NiDX9Renderer *this, NiD3DPixelShader *pkShader); // idb
void __cdecl NiRenderer::SetLastErrorString(const char *pcStr); // idb
bool __thiscall NiDX9Renderer::CreateSourceTextureRendererData(NiDX9Renderer *this, NiSourceTexture *pkTexture); // idb
// bool __userpurge NiDX9Renderer::CreateSourceCubeMapRendererData@<al>(NiDX9Renderer *this@<ecx>, int a2@<ebx>, NiSourceCubeMap *pkCubeMap);
void __thiscall NiDX9Renderer::CreatePixelFormatArray(NiDX9Renderer *this, NiPixelFormat **ppkFormatArray, unsigned int uiUsage, _D3DRESOURCETYPE eType); // idb
NiDX9SystemDesc *__cdecl NiDX9Renderer::GetSystemDesc(); // idb
bool __thiscall NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::RemoveAt(NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *this, unsigned int key); // idb
void __cdecl NiD3DUtility::GetD3DFromNi(_D3DMATRIX *kD3D, NiMatrix3 *kNiRot, NiPoint3 *kNiTrans, float fNiScale); // idb
char *__thiscall NiDX9Renderer::GetBehaviorString(NiDX9Renderer *this); // idb
signed int __cdecl NiDX9Renderer::GetCompatibleAdapterFormat(NiDX9Renderer::FrameBufferFormat eFBFormat);
signed int __cdecl NiDX9Renderer::GetMultiSampleType(unsigned int uiMode);
NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData>>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *this, unsigned int a2);
NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *this, unsigned int a2);
NiTArray<bool (__cdecl*)(bool,void *)> *__thiscall NiTArray<bool (__cdecl *)(bool,void *)>::`vector deleting destructor'(NiTArray<bool (__cdecl*)(bool,void *)> *this, unsigned int a2);
NiTArray<void *> *__thiscall NiTArray<void *>::`scalar deleting destructor'(NiTArray<void *> *this, unsigned int a2);
NiTArray<bool (__cdecl*)(void *)> *__thiscall NiTArray<bool (__cdecl *)(void *)>::`vector deleting destructor'(NiTArray<bool (__cdecl*)(void *)> *this, unsigned int a2);
void __thiscall NiDX9Renderer::InitToDefault(NiDX9Renderer *this); // idb
void __cdecl NiDX9Renderer::_SDMShutdown(); // idb
char __thiscall NiDX9Renderer::InitializePresentParams(NiDX9Renderer *this, HWND__ *kWndDevice, unsigned int uiWidth, unsigned int uiHeight, unsigned int uiUseFlags, unsigned int uiFBMode, NiDX9Renderer::FrameBufferFormat eFBFormat, NiDX9Renderer::DepthStencilFormat eDSFormat, unsigned int uiBackBufferCount, NiDX9Renderer::SwapEffect eSwapEffect, unsigned int uiRefreshRate, NiDX9Renderer::PresentationInterval ePresentationInterval, _D3DPRESENT_PARAMETERS_ *kD3DPresentParams);
char __thiscall NiDX9Renderer::InitializeDeviceCaps(NiDX9Renderer *this, _D3DPRESENT_PARAMETERS_ *kPresentParams);
char __thiscall NiDX9Renderer::GenerateDefaultTextureData(NiDX9Renderer *this);
char *__thiscall NiDX9Renderer::GetDriverInfo(NiDX9Renderer *this);
char __stdcall NiDX9Renderer::SetMipmapSkipLevel(unsigned int uiSkip);
unsigned int NiDX9Renderer::GetMipmapSkipLevel();
void __thiscall NiDX9Renderer::PurgeEffect(NiDX9Renderer *this, NiDynamicEffect *pkEffect); // idb
void __thiscall NiDX9Renderer::PurgeScreenTextureRendererData(NiDX9Renderer *this, NiScreenTexture *pkScreenTexture); // idb
void __stdcall NiDX9Renderer::PurgeSkinInstance(NiSkinInstance *pkSkinInstance);
char __thiscall NiDX9Renderer::PackGeometryBuffer(NiDX9Renderer *this, NiGeometryBufferData *pkBuffData, NiGeometryData *pkData, NiSkinInstance *pkSkinInstance, NiD3DShaderDeclaration *pkShaderDecl, bool bForce);
char __thiscall NiDX9Renderer::PackSkinnedGeometryBuffer(NiDX9Renderer *this, NiGeometryBufferData *pkBuffData, NiGeometryData *pkData, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition, NiD3DShaderDeclaration *pkShaderDecl, bool bForce);
void __thiscall NiRenderer::LockPrecacheCriticalSection(NiRenderer *this); // idb
void __thiscall NiRenderer::UnlockPrecacheCriticalSection(NiRenderer *this); // idb
char __thiscall NiDX9Renderer::ReservePrepackedBufferSpace(NiDX9Renderer *this, NiGeometryBufferData *pkBuffData, NiGeometryData *pkData, NiSkinPartition::Partition *pkPartition, NiD3DShaderDeclaration *pkShaderDecl);
char __thiscall NiDX9Renderer::CreateRenderedTextureRendererData(NiDX9Renderer *this, NiRenderedTexture *pkTexture);
char __thiscall NiDX9Renderer::CreateRenderedCubeMapRendererData(NiDX9Renderer *this, NiRenderedCubeMap *pkCubeMap);
char __thiscall NiDX9Renderer::CreateDynamicTextureRendererData(NiDX9Renderer *this, NiDynamicTexture *pkTexture);
// void *__userpurge NiDX9Renderer::LockDynamicTexture@<eax>(NiDX9Renderer *this@<ecx>, int a2@<edi>, int a3@<esi>, NiTexture::RendererData *pkRData, int *iPitch);
char __thiscall NiDX9Renderer::UnLockDynamicTexture(NiDX9Renderer *this, NiTexture::RendererData *pkRData);
bool __thiscall NiDX9Renderer::Create2DBufferRendererData(NiDX9Renderer *this, Ni2DBuffer *pkBuffer, NiPixelFormat *pkFormat); // idb
void __thiscall NiDX9Renderer::RemoveRenderedCubeMapData(NiDX9Renderer *this, NiRenderedCubeMap *pkCubeMap); // idb
void __thiscall NiDX9Renderer::RemoveRenderedTextureData(NiDX9Renderer *this, NiRenderedTexture *pkTexture); // idb
void __thiscall NiDX9Renderer::RemoveDynamicTextureData(NiDX9Renderer *this, NiDynamicTexture *pkTexture); // idb
bool __thiscall NiDX9Renderer::IsHardwareSkinned(NiDX9Renderer *this, NiGeometry *pkGeometry, NiD3DShaderInterface *pkShader); // idb
void __cdecl NiD3DUtility::GetD3DFromNi(_D3DMATRIX *kD3D, NiTransform *kNi); // idb
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData>>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData>>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *this); // idb
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *this); // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,NiVBBlock *,NiDX9Renderer::PrePackObject *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,NiVBBlock *,NiDX9Renderer::PrePackObject *>::`vector deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,NiVBBlock *,NiDX9Renderer::PrePackObject *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<NiVBBlock *,NiDX9Renderer::PrePackObject *>::`scalar deleting destructor'(NiTPointerMap<NiVBBlock *,NiDX9Renderer::PrePackObject *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,HWND__ *,NiPointer<NiRenderTargetGroup> > *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,HWND__ *,NiPointer<NiRenderTargetGroup>>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,HWND__ *,NiPointer<NiRenderTargetGroup> > *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<HWND__ *,NiPointer<NiRenderTargetGroup>>::`scalar deleting destructor'(NiTPointerMap<HWND__ *,NiPointer<NiRenderTargetGroup> > *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,NiRenderedTexture *,NiDX9RenderedTextureData *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,NiRenderedTexture *,NiDX9RenderedTextureData *>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,NiRenderedTexture *,NiDX9RenderedTextureData *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<NiRenderedTexture *,NiDX9RenderedTextureData *>::`vector deleting destructor'(NiTPointerMap<NiRenderedTexture *,NiDX9RenderedTextureData *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,NiRenderedCubeMap *,NiDX9RenderedCubeMapData *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,NiRenderedCubeMap *,NiDX9RenderedCubeMapData *>::`vector deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,NiRenderedCubeMap *,NiDX9RenderedCubeMapData *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<NiRenderedCubeMap *,NiDX9RenderedCubeMapData *>::`scalar deleting destructor'(NiTPointerMap<NiRenderedCubeMap *,NiDX9RenderedCubeMapData *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::`vector deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<NiDynamicTexture *,NiDX9DynamicTextureData *>::`vector deleting destructor'(NiTPointerMap<NiDynamicTexture *,NiDX9DynamicTextureData *> *this, unsigned int a2);
NiTPointerList<NiPointer<NiDX92DBufferData> > *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData>>::`scalar deleting destructor'(NiTPointerList<NiPointer<NiDX92DBufferData> > *this, unsigned int a2);
NiTPointerList<NiD3DShaderInterface *> *__thiscall NiTPointerList<NiD3DShaderInterface *>::`vector deleting destructor'(NiTPointerList<NiD3DShaderInterface *> *this, unsigned int a2);
char __thiscall NiDX9Renderer::InitializeTextureDefaults(NiDX9Renderer *this);
NiPixelFormat *__thiscall NiDX9Renderer::FindClosestDepthStencilFormat(NiDX9Renderer *this, NiPixelFormat *pkFrontBufferFormat, unsigned int uiDepthBPP, unsigned int uiStencilBPP); // idb
char __thiscall NiDX9Renderer::Do_BeginUsingRenderTargetGroup(NiDX9Renderer *this, NiRenderTargetGroup *pkTarget, unsigned int uiClearMode);
char __thiscall NiDX9Renderer::Do_EndUsingRenderTargetGroup(NiDX9Renderer *this);
char __thiscall NiDX9Renderer::ValidateRenderTargetGroup(NiDX9Renderer *this, NiRenderTargetGroup *pkTarget);
// bool __userpurge NiDX9Renderer::IsDepthBufferCompatible@<al>(NiDX9Renderer *this@<ecx>, int a2@<edi>, Ni2DBuffer *pkBuffer, NiDepthStencilBuffer *pkDSBuffer);
// void __userpurge NiDX9Renderer::Do_ClearBuffer(NiDX9Renderer *this@<ecx>, int a2@<ebx>, NiRect<float> *pkR, unsigned int uiMode);
// NiPixelData *__userpurge NiDX9Renderer::TakeScreenShot@<eax>(NiDX9Renderer *this@<ecx>, int a2@<ebx>, NiRect<unsigned int> *pkScreenRect);
char __thiscall NiDX9Renderer::FastCopy(NiDX9Renderer *this, Ni2DBuffer *pkSrc, Ni2DBuffer *pkDest, NiRect<unsigned int> *pkSrcRect, unsigned int uiDestX, unsigned int uiDestY);
char __thiscall NiDX9Renderer::Copy(NiDX9Renderer *this, Ni2DBuffer *pkSrc, Ni2DBuffer *pkDest, NiRect<unsigned int> *pkSrcRect, NiRect<unsigned int> *pkDestRect, Ni2DBuffer::CopyFilterPreference ePref);
char __stdcall NiDX9Renderer::PurgeTexture(NiTexture *pkIm);
void __stdcall NiDX9Renderer::FreeGeometricData(NiGeometryData *pkData, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition);
void __thiscall NiDX9Renderer::PerformPrecache(NiDX9Renderer *this); // idb
char __thiscall NiDX9Renderer::Do_DisplayFrame(NiDX9Renderer *this);
void __thiscall NiDX9Renderer::SetModelTransform(NiDX9Renderer *this, NiTransform *kXform, bool bPushToDevice); // idb
void __thiscall NiDX9Renderer::SetSkinnedModelTransforms(NiDX9Renderer *this, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition, NiTransform *kWorld); // idb
void __thiscall NiDX9Renderer::CalculateBoneMatrices(NiDX9Renderer *this, NiSkinInstance *pkSkinInstance, NiTransform *kWorld, bool bTranspose, unsigned int uiBoneMatrixRegisters, bool bPalettizedBones); // idb
// void __userpurge NiDX9Renderer::Do_RenderPoints(NiDX9Renderer *this@<ecx>, int a2@<edi>, int a3@<esi>, NiParticles *pkParticles);
// void __userpurge NiDX9Renderer::Do_RenderLines(NiDX9Renderer *this@<ecx>, int a2@<edi>, int a3@<esi>, NiLines *pkLines);
void __thiscall NiDX9Renderer::Do_EndBatch(NiDX9Renderer *this); // idb
void __thiscall NiDX9Renderer::AddToBatch(NiDX9Renderer *this, NiGeometry *pkGeometry); // idb
void __thiscall NiDX9Renderer::DrawPrimitive(NiDX9Renderer *this, NiGeometry *pkGeometry, NiGeometryData *pkData, NiSkinInstance *pkSkinInstance, NiTransform *kWorld, NiBound *kWorldBound, NiGeometryBufferData *pkBuffData); // idb
// void __userpurge NiDX9Renderer::DrawSkinnedPrimitive(NiDX9Renderer *this@<ecx>, int a2@<ebx>, int a3@<edi>, NiGeometry *pkGeometry, NiGeometryData *pkData, NiSkinInstance *pkSkinInstance, NiTransform *kWorld, NiBound *kWorldBound);
void __thiscall NiDX9Renderer::PurgeGeometryData(NiDX9Renderer *this, NiGeometryData *pkData); // idb
void __thiscall NiDX9Renderer::PurgeSkinPartitionRendererData(NiDX9Renderer *this, NiSkinPartition *pkSkinPartition); // idb
void __thiscall NiDX9Renderer::RegisterD3DShader(NiDX9Renderer *this, NiD3DShaderInterface *pkD3DShader); // idb
void __thiscall NiDX9Renderer::PackScreenTextureBuffers(NiDX9Renderer *this, NiScreenTexture *pkScreenTexture, unsigned __int16 usDirtyFlags); // idb
char __thiscall NiDX9Renderer::PrePackGeometryBuffer(NiDX9Renderer *this, NiGeometry *pkGeom, NiGeometryData *pkData, unsigned __int16 usTriCount, unsigned __int16 usMaxTriCount, const unsigned __int16 *pusIndexArray, const unsigned __int16 *pusArrayLengths, unsigned __int16 usArrayCount, NiD3DShaderDeclaration *pkShaderDecl);
char __thiscall NiDX9Renderer::PrePackSkinnedGeometryBuffer(NiDX9Renderer *this, NiGeometry *pkGeom, NiGeometryData *pkData, NiSkinInstance *pkSkin, NiD3DShaderDeclaration *pkShaderDecl, unsigned int uiBonesPerPartition, unsigned int uiBonesPerVertex);
void __thiscall NiDX9Renderer::NiDX9Renderer(NiDX9Renderer *this); // idb
NiRTTI *NiDX9Renderer::GetRTTI();
unsigned int __thiscall NiDX9Renderer::GetFlags(NiDX9Renderer *this); // idb
int __thiscall NiDX9Renderer::GetLeftRightSwap(NiDX9Renderer *this);
char __thiscall NiDX9Renderer::SetLeftRightSwap(NiDX9Renderer *this, int bSwap);
NiRenderTargetGroup *__thiscall NiDX9Renderer::GetCurrentRenderTargetGroup(NiDX9Renderer *this); // idb
void __thiscall NiDX9Renderer::SetDepthClear(NiDX9Renderer *this, const float fZClear); // idb
double __thiscall NiDX9Renderer::GetDepthClear(NiDX9Renderer *this);
void __thiscall NiDX9Renderer::SetBackgroundColor(NiDX9Renderer *this, NiColor *kColor); // idb
void __thiscall NiDX9Renderer::SetBackgroundColor(NiDX9Renderer *this, NiColorA *kColor); // idb
void __thiscall NiDX9Renderer::GetBackgroundColor(NiDX9Renderer *this, NiColorA *kColor); // idb
void __thiscall NiDX9Renderer::SetStencilClear(NiDX9Renderer *this, unsigned int uiClear); // idb
unsigned int __thiscall NiDX9Renderer::GetStencilClear(NiDX9Renderer *this); // idb
void __thiscall NiDX9Renderer::GetMaxFogValue(NiDX9Renderer *this);
void __thiscall NiDX9Renderer::SetMaxFogValue(NiDX9Renderer *this, float fFogVal); // idb
char __thiscall NiDX9Renderer::Initialize(NiDX9Renderer *this, unsigned int uiWidth, unsigned int uiHeight, unsigned int uiUseFlags, HWND__ *kWndDevice, HWND__ *kWndFocus, unsigned int uiAdapter, NiDX9Renderer::DeviceDesc eDesc, NiDX9Renderer::FrameBufferFormat eFBFormat, NiDX9Renderer::DepthStencilFormat eDSFormat, NiDX9Renderer::PresentationInterval ePresentationInterval, NiDX9Renderer::SwapEffect eSwapEffect, unsigned int uiFBMode, unsigned int uiBackBufferCount, unsigned int uiRefreshRate);
char __thiscall NiDX9Renderer::Recreate(NiDX9Renderer *this);
signed int __thiscall NiDX9Renderer::Recreate(NiDX9Renderer *this, unsigned int uiWidth, unsigned int uiHeight, unsigned int uiUseFlags, HWND__ *kWndDevice, NiDX9Renderer::FrameBufferFormat eFBFormat, NiDX9Renderer::DepthStencilFormat eDSFormat, NiDX9Renderer::PresentationInterval ePresentationInterval, NiDX9Renderer::SwapEffect eSwapEffect, unsigned int uiFBMode, unsigned int uiBackBufferCount, unsigned int uiRefreshRate);
char __thiscall NiDX9Renderer::PrecacheGeometry(NiDX9Renderer *this, NiGeometry *pkGeometry, unsigned int uiBonesPerPartition, unsigned int uiBonesPerVertex);
void __thiscall NiDX9Renderer::Do_RenderShape(NiDX9Renderer *this, NiTriStrips *pkTriStrips); // idb
void __thiscall NiDX9Renderer::Do_BatchRenderStrips(NiDX9Renderer *this, NiTriStrips *pkTriStrips); // idb
void __thiscall NiDX9Renderer::ReleaseD3DShader(NiDX9Renderer *this, NiD3DShaderInterface *pkD3DShader); // idb
void __thiscall NiDX9Renderer::PurgeAllD3DShaders(NiDX9Renderer *this); // idb
char __thiscall NiDX9Renderer::LostDeviceRestore(NiDX9Renderer *this);
void __thiscall NiDX9Renderer::PackScreenTextureGeomBuffer(NiDX9Renderer *this, NiScreenTexture *pkScreenTexture); // idb
void __thiscall NiDX9Renderer::~NiDX9Renderer(NiDX9Renderer *this); // idb
NiDX9Renderer *__cdecl NiDX9Renderer::Create(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiUseFlags, HWND__ *kWndDevice, HWND__ *kWndFocus, unsigned int uiAdapter, NiDX9Renderer::DeviceDesc eDesc, NiDX9Renderer::FrameBufferFormat eFBFormat, NiDX9Renderer::DepthStencilFormat eDSFormat, NiDX9Renderer::PresentationInterval ePresentationInterval, NiDX9Renderer::SwapEffect eSwapEffect, unsigned int uiFBMode, unsigned int uiBackBufferCount, unsigned int uiRefreshRate); // idb
char __thiscall NiDX9Renderer::Do_BeginFrame(NiDX9Renderer *this);
void __thiscall NiDX9Renderer::Do_RenderScreenTexture(NiDX9Renderer *this, NiScreenTexture *pkScreenTexture); // idb
NiDX9Renderer *__thiscall NiDX9Renderer::`vector deleting destructor'(NiDX9Renderer *this, unsigned int a2);
void __cdecl NiDX92DBufferData::ClearRenderTarget(IDirect3DDevice9 *pkD3DDevice9, unsigned int uiTarget); // idb
char __thiscall NiDX92DBufferData::Shutdown(NiDX92DBufferData *this);
char __cdecl NiDX9DepthStencilBufferData::SetNULLDepthStencilTarget(IDirect3DDevice9 *pkD3DDevice9);
bool __thiscall NiDX9ImplicitBufferData::DisplayFrame(NiDX9ImplicitBufferData *this); // idb
char __thiscall NiPixelFormat::GetBits(NiPixelFormat *this, NiPixelFormat::Component eComp); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,NiDX9AdditionalDepthStencilBufferData *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiDX9AdditionalDepthStencilBufferData *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiDX9AdditionalDepthStencilBufferData *> *this, unsigned int a2);
NiRTTI *NiDX92DBufferData::GetRTTI();
bool NiD3DTimeSyncController::CanBeExtracted();
unsigned int __thiscall NiDX92DBufferData::GetWidth(NiDX92DBufferData *this); // idb
unsigned int __thiscall NiDX92DBufferData::GetHeight(NiDX92DBufferData *this); // idb
char __thiscall NiDX92DBufferData::SetRenderTarget(NiDX92DBufferData *this, IDirect3DDevice9 *pkD3DDevice9, unsigned int uiTarget);
char __thiscall NiDX9DepthStencilBufferData::SetDepthTarget(NiDX9DepthStencilBufferData *this, IDirect3DDevice9 *pkD3DDevice9);
char __thiscall NiDX9DepthStencilBufferData::HasValidDepthBuffer(NiDX9DepthStencilBufferData *this);
char __thiscall NiDX9DepthStencilBufferData::HasValidStencilBuffer(NiDX9DepthStencilBufferData *this);
char __thiscall NiDX9ImplicitDepthStencilBufferData::Recreate(NiDX9ImplicitDepthStencilBufferData *this, IDirect3DDevice9 *pkD3DDevice9);
void __cdecl NiDX9AdditionalDepthStencilBufferData::ShutdownAll(); // idb
void __cdecl NiDX9AdditionalDepthStencilBufferData::RecreateAll(IDirect3DDevice9 *pkD3DDevice9); // idb
// char __userpurge NiDX9AdditionalDepthStencilBufferData::Recreate@<al>(NiDX9AdditionalDepthStencilBufferData *this@<ecx>, unsigned int a2@<esi>, IDirect3DDevice9 *pkD3DDevice9);
char __thiscall NiDX9ImplicitBufferData::Recreate(NiDX9ImplicitBufferData *this, IDirect3DDevice9 *pkD3DDevice9);
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiDX9AdditionalDepthStencilBufferData *>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiDX9AdditionalDepthStencilBufferData *>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiDX9AdditionalDepthStencilBufferData *> *this); // idb
void __thiscall NiDX92DBufferData::ReleaseReferences(NiDX92DBufferData *this); // idb
void __thiscall NiDX9TextureBufferData::~NiDX9TextureBufferData(NiDX9TextureBufferData *this); // idb
NiRTTI *NiDX9TextureBufferData::GetRTTI();
NiDX9TextureBufferData *__thiscall NiDX9TextureBufferData::`vector deleting destructor'(NiDX9TextureBufferData *this, unsigned int a2);
Ni2DBuffer::RendererData *__cdecl NiDX9TextureBufferData::Create(IDirect3DTexture9 *pkD3DTexture, Ni2DBuffer **pkBuffer);
Ni2DBuffer::RendererData *__cdecl NiDX9TextureBufferData::CreateCubeFace(IDirect3DCubeTexture9 *pkD3DCubeTexture, _D3DCUBEMAP_FACES eFace, NiDX9TextureBufferData *pkExistingFace, IDirect3DDevice9 *pkD3DDevice9, Ni2DBuffer **pkBuffer);
void __thiscall NiDX9TextureBufferData::ReleaseReferences(NiDX9TextureBufferData *this); // idb
NiTPointerList<NiDX9AdditionalDepthStencilBufferData *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiDX9AdditionalDepthStencilBufferData *>::`vector deleting destructor'(NiTPointerList<NiDX9AdditionalDepthStencilBufferData *> *this, unsigned int a2);
void __thiscall NiDX9AdditionalDepthStencilBufferData::NiDX9AdditionalDepthStencilBufferData(NiDX9AdditionalDepthStencilBufferData *this); // idb
NiRTTI *NiDX9AdditionalDepthStencilBufferData::GetRTTI();
// NiPixelFormat *__usercall NiDX9AdditionalDepthStencilBufferData::Create@<eax>(int a1@<ebx>, int a2@<esi>, IDirect3DDevice9 *pkD3DDevice9, NiDepthStencilBuffer **pkBuffer, NiPixelFormat *pkFormat);
void __thiscall NiDX9ImplicitBufferData::~NiDX9ImplicitBufferData(NiDX9ImplicitBufferData *this); // idb
NiRTTI *NiDX9ImplicitBufferData::GetRTTI();
void __thiscall NiDX9ImplicitBufferData::ReleaseReferences(NiDX9ImplicitBufferData *this); // idb
NiRTTI *NiDX9ImplicitDepthStencilBufferData::GetRTTI();
NiDX9ImplicitDepthStencilBufferData *__thiscall NiDX92DBufferData::`vector deleting destructor'(NiDX9ImplicitDepthStencilBufferData *this, unsigned int a2);
void __thiscall NiDX9AdditionalDepthStencilBufferData::~NiDX9AdditionalDepthStencilBufferData(NiDX9AdditionalDepthStencilBufferData *this); // idb
NiDX9ImplicitBufferData *__thiscall NiDX9ImplicitBufferData::`scalar deleting destructor'(NiDX9ImplicitBufferData *this, unsigned int a2);
NiDX9ImplicitBufferData *__cdecl NiDX9ImplicitBufferData::Create(IDirect3DDevice9 *pkD3DDevice9, _D3DPRESENT_PARAMETERS_ *kD3DPresentParams, Ni2DBuffer **pkBuffer); // idb
NiDX9ImplicitDepthStencilBufferData *__cdecl NiDX9ImplicitDepthStencilBufferData::Create(IDirect3DDevice9 *pkD3DDevice9, NiDepthStencilBuffer **pkBuffer); // idb
NiDX9AdditionalDepthStencilBufferData *__thiscall NiDX9AdditionalDepthStencilBufferData::`vector deleting destructor'(NiDX9AdditionalDepthStencilBufferData *this, unsigned int a2);
void __thiscall NSBRequirements::SetPlatformFlags(NiD3DShaderLibrary *this, NiDX9Renderer *pkRenderer); // idb
void __cdecl NiD3DShaderLibrary::SetDirectoryInfo(const char *pcDirectory); // idb
void __thiscall NiD3DShaderLibrary::NiD3DShaderLibrary(NiD3DShaderLibrary *this, char *pcName); // idb
void __thiscall NiD3DShaderLibrary::~NiD3DShaderLibrary(NiD3DShaderLibrary *this); // idb
NiD3DShaderLibrary *__thiscall NiD3DShaderLibrary::`vector deleting destructor'(NiD3DShaderLibrary *this, unsigned int a2);
void NiD3DUtility::Log(char *pcFmt, ...); // idb
char __cdecl NiD3DUtility::GetSplitPath(const char *pcFilename, char *pcDrive, char *pcDir, char *pcFname, char *pcExt);
char __cdecl NiD3DUtility::GetFilePath(const char *pcFilename, char *pcPath, unsigned int uiMaxLen);
char __cdecl NiD3DUtility::GetFileName(const char *pcFilename, char *pcName, unsigned int uiMaxLen);
char __cdecl NiD3DUtility::GetFileExtension(const char *pcFilename, char *pcExt, unsigned int uiMaxLen);
int __cdecl NiD3DUtility::SetString(char **pcDest, unsigned int uiDestSize, const char *pcSrc);
bool __cdecl NiD3DUtility::WriteData(NiBinaryStream *kStream, void *pvData, unsigned int uiSize); // idb
char __cdecl NiD3DUtility::WriteString(NiBinaryStream *kStream, const char *pcString);
char __cdecl NiD3DUtility::AllocateAndReadString(NiBinaryStream *kStream, char **pcString, unsigned int *uiStringSize);
char __cdecl NiD3DUtility::AllocateAndReadData(NiBinaryStream *kStream, void **pvData, unsigned int *uiDataSize);
void __cdecl NiD3DShaderConstantMapEntry::InitializeAttribTable(); // idb
void __cdecl NiD3DShaderConstantMapEntry::InitializeObjectTable(); // idb
// void __usercall FillDataArray(float *pfData@<ecx>, _D3DMATRIX *kMatrix@<eax>);
signed int __stdcall NiD3DSCM_Vertex::SetConstantConstant(NiD3DShaderProgram *pkShaderProgram, NiD3DShaderConstantMapEntry *pkEntry, unsigned int uiPass);
char __cdecl NiD3DSCM_Vertex::LookUpObjectMapping(const char *pcMapping, unsigned int *uiMappingID);
signed int __cdecl NiD3DSCM_Vertex::LookUpObjectMappingType(unsigned int uiMappingID, unsigned int *uiRegCount, unsigned int *uiFloatCount);
char __cdecl NiD3DSCM_Vertex::IsObjectMappingValidForType(NiD3DSCM_Vertex::Vertex_ObjectMappings eMapping, NiShaderAttributeDesc::ObjectType eType);
NiShaderAttributeDesc::ObjectType __cdecl NiD3DShaderConstantMapEntry::GetObjectType(unsigned int uiFlags); // idb
NiD3DSCM_Vertex *__thiscall NiD3DSCM_Vertex::`vector deleting destructor'(NiD3DSCM_Vertex *this, unsigned int a2);
char __cdecl NiD3DSCM_Vertex::LookUpPredefinedMapping(const char *pszMapping, unsigned int *uiMappingID, unsigned int *uiNumRegisters);
int __cdecl NiD3DSCM_Vertex::LookUpPredefinedMappingType(const char *pszMapping);
signed int __stdcall NiD3DSCM_Vertex::SetupPredefinedEntry(NiD3DShaderConstantMapEntry *pkEntry);
signed int __stdcall NiD3DSCM_Vertex::SetupObjectEntry(NiD3DShaderConstantMapEntry *pkEntry);
signed int __thiscall NiD3DSCM_Vertex::PerformOperatorMultiply(NiD3DSCM_Vertex *this, NiD3DShaderProgram *pkShaderProgram, NiD3DShaderConstantMapEntry *pkEntry, NiShaderAttributeDesc::AttributeType eType1, NiShaderAttributeDesc::AttributeType eType2, bool bInverse, bool bTranspose);
signed int __stdcall NiD3DSCM_Vertex::PerformOperatorDivide(NiD3DShaderProgram *pkShaderProgram, NiD3DShaderConstantMapEntry *pkEntry, NiShaderAttributeDesc::AttributeType eType1, NiShaderAttributeDesc::AttributeType eType2, bool bInverse, bool bTranspose);
signed int __stdcall NiD3DSCM_Vertex::PerformOperatorAdd(NiD3DShaderProgram *pkShaderProgram, NiD3DShaderConstantMapEntry *pkEntry, NiShaderAttributeDesc::AttributeType eType1, NiShaderAttributeDesc::AttributeType eType2, bool bInverse, bool bTranspose);
signed int __stdcall NiD3DSCM_Vertex::PerformOperatorSubtract(NiD3DShaderProgram *pkShaderProgram, NiD3DShaderConstantMapEntry *pkEntry, NiShaderAttributeDesc::AttributeType eType1, NiShaderAttributeDesc::AttributeType eType2, bool bInverse, bool bTranspose);
void __cdecl NiD3DSCM_Vertex::SetupTextureTransformMatrix(D3DXMATRIX *kResult, NiMatrix3 *pkTexMatrix, bool bInv, bool bTrans); // idb
BOOL __thiscall NiD3DShaderConstantMapEntry::IsBool(NiD3DShaderConstantMapEntry *this);
BOOL __thiscall NiD3DShaderConstantMapEntry::IsUnsignedInt(NiD3DShaderConstantMapEntry *this);
BOOL __thiscall NiD3DShaderConstantMapEntry::IsFloat(NiD3DShaderConstantMapEntry *this);
BOOL __thiscall NiD3DShaderConstantMapEntry::IsPoint2(NiD3DShaderConstantMapEntry *this);
BOOL __thiscall NiD3DShaderConstantMapEntry::IsPoint3(NiD3DShaderConstantMapEntry *this);
BOOL __thiscall NiD3DShaderConstantMapEntry::IsPoint4(NiD3DShaderConstantMapEntry *this);
BOOL __thiscall NiD3DShaderConstantMapEntry::IsMatrix3(NiD3DShaderConstantMapEntry *this);
BOOL __thiscall NiD3DShaderConstantMapEntry::IsMatrix4(NiD3DShaderConstantMapEntry *this);
BOOL __thiscall NiD3DShaderConstantMapEntry::IsColor(NiD3DShaderConstantMapEntry *this);
BOOL __thiscall NiD3DShaderConstantMapEntry::IsTexture(NiD3DShaderConstantMapEntry *this);
// signed int __userpurge NiD3DSCM_Vertex::SetDefinedConstant@<eax>(NiD3DSCM_Vertex *this@<ecx>, float a2@<ebp>, NiD3DShaderProgram *pkShaderProgram, NiD3DShaderConstantMapEntry *pkEntry, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound, unsigned int uiPass);
signed int __stdcall NiD3DSCM_Vertex::SetAttributeConstant(NiD3DShaderProgram *pkShaderProgram, NiD3DShaderConstantMapEntry *pkEntry, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound, unsigned int uiPass, bool bGlobal, NiExtraData *pkExtraData);
signed int __stdcall NiD3DSCM_Vertex::SetGlobalConstant(NiD3DShaderProgram *pkShaderProgram, NiD3DShaderConstantMapEntry *pkEntry, unsigned int uiPass);
bool __cdecl NiD3DSCM_Vertex::IsLightCorrectType(NiLight *pkLight, NiShaderAttributeDesc::ObjectType eType); // idb
bool __cdecl NiD3DSCM_Vertex::GetDynamicEffectData(void *pvData, unsigned int uiDataSize, NiD3DSCM_Vertex::Vertex_ObjectMappings eMapping, NiDynamicEffect *pkDynEffect, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound);
// signed int __userpurge NiD3DSCM_Vertex::SetupDefinedConstantValue@<eax>(NiD3DSCM_Vertex *this@<ecx>, int a2@<ebp>, unsigned int uiOperatorNum, NiD3DShaderConstantMapEntry *pkEntry, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound);
void __thiscall NiTArray<NiPointer<NiD3DShaderConstantMapEntry>>::~NiTArray<NiPointer<NiD3DShaderConstantMapEntry>>(NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *this); // idb
NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *__thiscall NiTArray<NiPointer<NiD3DShaderConstantMapEntry>>::`scalar deleting destructor'(NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *this, unsigned int a2);
signed int __thiscall NiD3DSCM_Vertex::SetOperatorConstant(NiD3DSCM_Vertex *this, NiD3DShaderProgram *pkShaderProgram, NiD3DShaderConstantMapEntry *pkEntry, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound, unsigned int uiPass);
NiTextureEffect *__cdecl NiD3DSCM_Vertex::GetDynamicEffectForObject(NiDynamicEffectState *pkEffectState, NiShaderAttributeDesc::ObjectType eObjectType, unsigned int uiObjectIndex);
unsigned int __stdcall NiD3DSCM_Vertex::SetObjectConstant(NiD3DShaderProgram *pkShaderProgram, NiD3DShaderConstantMapEntry *pkEntry, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound, unsigned int uiPass);
void __thiscall NiD3DShaderConstantMap::NiD3DShaderConstantMap(NiD3DShaderConstantMap *this, NiDX9Renderer *pkRenderer); // idb
NiD3DShaderConstantMap *__thiscall NiD3DShaderConstantMap::`scalar deleting destructor'(NiD3DShaderConstantMap *this, unsigned int a2);
void __thiscall NiD3DSCM_Vertex::NiD3DSCM_Vertex(NiD3DSCM_Vertex *this, NiDX9Renderer *pkRenderer); // idb
void __cdecl NiD3DShaderProgramCreator::SetD3DRenderer(NiDX9Renderer *pkD3DRenderer); // idb
void __thiscall NiD3DShaderFactory::SetRenderer(NiD3DShaderFactory *this, NiDX9Renderer *pkRenderer); // idb
NiD3DShaderInterface *__thiscall NiD3DShaderFactory::RetrieveShader(NiD3DShaderFactory *this, const char *pcName, unsigned int uiImplementation, bool bReportNotFound);
void __thiscall NiD3DShaderFactory::PurgeAllShaderRendererData(NiD3DShaderFactory *this); // idb
int __stdcall NiD3DShaderFactory::GetMajorVertexShaderVersion(const unsigned int uiVersion);
unsigned int __stdcall NiD3DShaderFactory::CreatePixelShaderVersion(const unsigned int uiMajorVersion, const unsigned int uiMinorVersion);
unsigned int __stdcall NiD3DShaderFactory::GetMinorPixelShaderVersion(const unsigned int uiVersion);
unsigned int __stdcall NiD3DShaderFactory::CreateVertexShaderVersion(const unsigned int uiMajorVersion, const unsigned int uiMinorVersion);
NiD3DShaderFactory *__cdecl NiD3DShaderFactory::GetD3DShaderFactory(); // idb
char *__stdcall NiD3DShaderFactory::GetFirstProgramDirectory(void **kIter);
const char *__stdcall NiD3DShaderFactory::GetNextProgramDirectory(void **kIter);
void __stdcall NiD3DShaderFactory::AddProgramDirectory(const char *pacDirectory);
void __stdcall NiD3DShaderFactory::RemoveProgramDirectory(const char *pacDirectory);
void NiD3DShaderFactory::RemoveAllProgramDirectories();
const char *NiD3DShaderFactory::GetRendererString();
void __cdecl NiD3DShaderFactory::_SDMShutdown(); // idb
void __thiscall NiD3DShaderFactory::InsertShader(NiD3DShaderFactory *this, NiShader *pkShader, unsigned int uiImplementation); // idb
NiShader *__thiscall NiD3DShaderFactory::FindShader(NiD3DShaderFactory *this, const char *pcName, unsigned int uiImplementation); // idb
void __thiscall NiD3DShaderFactory::RemoveShader(NiD3DShaderFactory *this, const char *pcName, unsigned int uiImplementation); // idb
void __thiscall NiD3DShaderFactory::RemoveAllShaders(NiD3DShaderFactory *this); // idb
void __thiscall NiD3DShaderFactory::RestoreAllShaderRendererData(NiD3DShaderFactory *this); // idb
NiD3DGlobalConstantEntry *__stdcall NiD3DShaderFactory::GetGlobalShaderConstantEntry(const char *pcKey);
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiShader *>,NiShader *>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiShader *>,NiShader *>(NiTStringTemplateMap<NiTPointerMap<char const *,NiShader *>,NiShader *> *this); // idb
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiShaderLibrary>>,NiPointer<NiShaderLibrary>>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiShaderLibrary>>,NiPointer<NiShaderLibrary>>(NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiShaderLibrary> >,NiPointer<NiShaderLibrary> > *this); // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::`vector deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<char const *,NiShader *>::`scalar deleting destructor'(NiTPointerMap<char const *,NiShader *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary>>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<char const *,NiPointer<NiShaderLibrary>>::`scalar deleting destructor'(NiTPointerMap<char const *,NiPointer<NiShaderLibrary> > *this, unsigned int a2);
void __thiscall NiGeometry::SetShader(NiGeometry *this, NiShader *pkShader); // idb
void __thiscall NiD3DGlobalConstantEntry::NiD3DGlobalConstantEntry(NiD3DGlobalConstantEntry *this, const char *pcKey, NiShaderAttributeDesc::AttributeType eType, unsigned int uiDataSize, const void *pvDataSource); // idb
NiD3DGlobalConstantEntry *__thiscall NiD3DGlobalConstantEntry::`scalar deleting destructor'(NiD3DGlobalConstantEntry *this, unsigned int a2);
void __thiscall NiTStringTemplateMap<NiTMap<char const *,NiD3DGlobalConstantEntry *>,NiD3DGlobalConstantEntry *>::~NiTStringTemplateMap<NiTMap<char const *,NiD3DGlobalConstantEntry *>,NiD3DGlobalConstantEntry *>(NiTStringTemplateMap<NiTMap<char const *,NiD3DGlobalConstantEntry *>,NiD3DGlobalConstantEntry *> *this); // idb
NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *> *__thiscall NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::`scalar deleting destructor'(NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTMap<char const *,NiD3DGlobalConstantEntry *>::`scalar deleting destructor'(NiTMap<char const *,NiD3DGlobalConstantEntry *> *this, unsigned int a2);
char __thiscall NiD3DShaderFactory::PerformShaderAttachment(NiD3DShaderFactory *this, NiGeometry *pkGeometry, NiD3DShaderInterface *pkShader);
char __stdcall NiD3DShaderFactory::Geometry_DetachShader(NiGeometry *pkGeometry);
char __cdecl NiD3DShaderFactory::RegisterGlobalShaderConstant(const char *pcKey, NiShaderAttributeDesc::AttributeType eType, unsigned int uiDataSize, const void *pvInitialData);
char __cdecl NiD3DShaderFactory::ReleaseGlobalShaderConstant(const char *pcKey);
char __cdecl NiD3DShaderFactory::RetrieveGlobalShaderConstant(const char *pcKey, unsigned int *uiDataSize, const void **pvData);
char __cdecl NiD3DShaderFactory::UpdateGlobalShaderConstant(const char *pcKey, unsigned int uiDataSize, const void *pvData);
char __thiscall NiD3DShaderFactory::Geometry_AttachShader(NiD3DShaderFactory *this, NiGeometry *pkGeometry, const char *pcName, unsigned int uiImplementation);
char __thiscall NiD3DShaderFactory::Geometry_AttachShader(NiD3DShaderFactory *this, NiGeometry *pkGeometry, NiShader *pkShader);
void __thiscall NiD3DShaderFactory::InsertLibrary(NiD3DShaderFactory *this, NiShaderLibrary *pkLibrary); // idb
NiShaderLibrary *__thiscall NiD3DShaderFactory::FindLibrary(NiD3DShaderFactory *this, const char *pcName); // idb
void __thiscall NiD3DShaderFactory::RemoveLibrary(NiD3DShaderFactory *this, const char *pcName); // idb
NiShaderLibrary *__thiscall NiD3DShaderFactory::GetFirstLibrary(NiD3DShaderFactory *this); // idb
NiShaderLibrary *__thiscall NiD3DShaderFactory::GetNextLibrary(NiD3DShaderFactory *this); // idb
NiTStringPointerMap<NiShader *> *__thiscall NiTStringPointerMap<NiShader *>::`scalar deleting destructor'(NiTStringPointerMap<NiShader *> *this, unsigned int a2);
NiTStringPointerMap<NiPointer<NiShaderLibrary> > *__thiscall NiTStringPointerMap<NiPointer<NiShaderLibrary>>::`vector deleting destructor'(NiTStringPointerMap<NiPointer<NiShaderLibrary> > *this, unsigned int a2);
void __thiscall NiD3DShaderFactory::RemoveAllLibraries(NiD3DShaderFactory *this); // idb
NiTStringMap<NiD3DGlobalConstantEntry *> *__thiscall NiTStringTemplateMap<NiTMap<char const *,NiD3DGlobalConstantEntry *>,NiD3DGlobalConstantEntry *>::`scalar deleting destructor'(NiTStringMap<NiD3DGlobalConstantEntry *> *this, unsigned int a2);
void __thiscall NiD3DShaderFactory::NiD3DShaderFactory(NiD3DShaderFactory *this); // idb
void __thiscall NiD3DShaderFactory::~NiD3DShaderFactory(NiD3DShaderFactory *this); // idb
NiD3DShaderFactory *__thiscall NiD3DShaderFactory::`vector deleting destructor'(NiD3DShaderFactory *this, unsigned int a2);
void __thiscall NiD3DShaderFactory::_SDMInit(NiUnsharedGeometryGroup *this);
void __thiscall NiD3DShaderConstantMapEntry::NiD3DShaderConstantMapEntry(NiD3DShaderConstantMapEntry *this); // idb
void __thiscall NiD3DShaderConstantMapEntry::SetKey(NiD3DShaderConstantMapEntry *this, const char *pcKey); // idb
void __thiscall NiD3DShaderConstantMapEntry::SetVariableName(NiD3DShaderConstantMapEntry *this, const char *pcVariableName); // idb
void __thiscall NiD3DShaderConstantMap::SetD3DRenderer(NiD3DShaderConstantMap *this, NiDX9Renderer *pkD3DRenderer); // idb
int __thiscall NiD3DShaderConstantMap::AddEntry(NiD3DShaderConstantMap *this, const char *pszKey, unsigned int uiFlags, unsigned int uiExtra, unsigned int uiShaderRegister, unsigned int uiRegisterCount, const char *pszVariableName, unsigned int uiDataSize, unsigned int uiDataStride, const void *pvDataSource, int bCopyData);
int __thiscall NiD3DShaderConstantMap::AddPredefinedEntry(NiD3DShaderConstantMap *this, const char *pszKey, unsigned int uiExtra, unsigned int uiShaderRegister, const char *pszVariableName);
int __thiscall NiD3DShaderConstantMap::AddAttributeEntry(NiD3DShaderConstantMap *this, const char *pszKey, unsigned int uiFlags, unsigned int uiExtra, unsigned int uiShaderRegister, unsigned int uiRegisterCount, const char *pszVariableName, unsigned int uiDataSize, unsigned int uiDataStride, const void *pvDataSource, bool bCopyData);
int __thiscall NiD3DShaderConstantMap::AddConstantEntry(NiD3DShaderConstantMap *this, const char *pszKey, unsigned int uiFlags, unsigned int uiExtra, unsigned int uiShaderRegister, unsigned int uiRegisterCount, const char *pszVariableName, unsigned int uiDataSize, unsigned int uiDataStride, const void *pvDataSource, bool bCopyData);
unsigned int __thiscall NiD3DShaderConstantMap::AddGlobalEntry(NiD3DShaderConstantMap *this, const char *pszKey, unsigned int uiFlags, unsigned int uiExtra, unsigned int uiShaderRegister, unsigned int uiRegisterCount, const char *pszVariableName, unsigned int uiDataSize, unsigned int uiDataStride, const void *pvDataSource, bool bCopyData); // idb
int __thiscall NiD3DShaderConstantMap::AddOperatorEntry(NiD3DShaderConstantMap *this, const char *pszKey, unsigned int uiFlags, unsigned int uiExtra, unsigned int uiShaderRegister, unsigned int uiRegisterCount, const char *pszVariableName);
int __thiscall NiD3DShaderConstantMap::AddObjectEntry(NiD3DShaderConstantMap *this, const char *pszKey, unsigned int uiShaderRegister, const char *pszVariableName, unsigned int uiObjectIndex, NiShaderAttributeDesc::ObjectType eObjectType);
NiD3DShaderConstantMapEntry *__thiscall NiD3DShaderConstantMap::GetEntry(NiD3DShaderConstantMap *this, const char *pszKey); // idb
NiD3DShaderConstantMapEntry *__thiscall NiD3DShaderConstantMap::GetEntryAtIndex(NiD3DShaderConstantMap *this, unsigned int uiIndex); // idb
BOOL __thiscall NiD3DShaderConstantMap::SetShaderConstants(NiD3DShaderConstantMap *this, NiD3DShaderProgram *pkShaderProgram, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound, unsigned int uiPass, int bGlobal);
signed int __thiscall NiD3DShaderConstantMap::GetEntryIndex(NiD3DShaderConstantMap *this, const char *pszKey);
NiD3DShaderConstantMapEntry *__thiscall NSBConstantMap::NSBCM_Entry::`scalar deleting destructor'(NiD3DShaderConstantMapEntry *this, unsigned int a2);
unsigned int __thiscall NiD3DShaderConstantMap::RemoveEntry(NiD3DShaderConstantMap *this, const char *pszKey); // idb
int *__stdcall NiD3DShaderConstantMap::MapAttributeValue(NiD3DShaderConstantMapEntry *pkEntry, NiExtraData *pkExtra);
int *__stdcall NiD3DShaderConstantMap::MapConstantValue(NiD3DShaderConstantMapEntry *pkEntry);
void __thiscall NiD3DShaderConstantMap::~NiD3DShaderConstantMap(NiD3DShaderConstantMap *this); // idb
unsigned int __thiscall NiD3DShaderConstantMap::InsertEntry(NiD3DShaderConstantMap *this, NiD3DShaderConstantMapEntry *pkEntry); // idb
void __thiscall NiD3DShaderDeclaration::ShaderRegisterEntry::ShaderRegisterEntry(NiD3DShaderDeclaration::ShaderRegisterEntry *this); // idb
bool __thiscall NiDX9ShaderDeclaration::SetEntry(NiDX9ShaderDeclaration *this, unsigned int uiEntry, unsigned int uiRegister, NiD3DShaderDeclaration::ShaderParameter eInput, NiD3DShaderDeclaration::ShaderParameterType eType, unsigned int uiStream); // idb
char __thiscall NiDX9ShaderDeclaration::SetEntry(NiDX9ShaderDeclaration *this, unsigned int uiStream, unsigned int uiEntry, unsigned int uiRegister, NiD3DShaderDeclaration::ShaderParameter eInput, NiD3DShaderDeclaration::ShaderParameterType eType, NiD3DShaderDeclaration::ShaderParameterUsage eUsage, unsigned int uiIndex, NiD3DShaderDeclaration::ShaderParameterTesselator eTess);
char __thiscall NiDX9ShaderDeclaration::RemoveEntry(NiDX9ShaderDeclaration *this, unsigned int uiEntry, unsigned int uiStream);
char __thiscall NiDX9ShaderDeclaration::ClearAllEntries(NiDX9ShaderDeclaration *this, unsigned int uiStream);
unsigned int __thiscall NiDX9ShaderDeclaration::GetVertexStride(NiDX9ShaderDeclaration *this, unsigned int uiStream); // idb
BOOL __thiscall NiDX9ShaderDeclaration::GenerateVertexParameters(NiDX9ShaderDeclaration *this, IDirect3DVertexDeclaration9 **pkDeclaration, unsigned int *uiNumStreams);
char __cdecl NiDX9ShaderDeclaration::GetShaderParameterValues(_D3DDECLUSAGE eD3DUsage, unsigned int uiUsageIndex, NiD3DShaderDeclaration::ShaderParameter *eInput, NiD3DShaderDeclaration::ShaderParameterType *eType, NiD3DShaderDeclaration::ShaderParameterUsage *eUsage, NiD3DShaderDeclaration::ShaderParameterTesselator *eTess);
unsigned int __cdecl NiD3DShaderDeclaration::Pack_FloatToShort(NiD3DShaderDeclaration::PackingParameters *kParams); // idb
unsigned int __cdecl NiD3DShaderDeclaration::Pack_LongToShort(NiD3DShaderDeclaration::PackingParameters *kParams); // idb
unsigned int __cdecl NiD3DShaderDeclaration::Pack_UnsignedLongToShort(NiD3DShaderDeclaration::PackingParameters *kParams); // idb
int __cdecl NiD3DShaderDeclaration::Pack_ByteToShort(NiD3DShaderDeclaration::PackingParameters *kParams);
int __cdecl NiD3DShaderDeclaration::Pack_UnsignedByteToShort(NiD3DShaderDeclaration::PackingParameters *kParams);
unsigned int __cdecl NiD3DShaderDeclaration::Pack_FloatToUnsignedByte(NiD3DShaderDeclaration::PackingParameters *kParams); // idb
unsigned int __cdecl NiD3DShaderDeclaration::Pack_LongToUnsignedByte(NiD3DShaderDeclaration::PackingParameters *kParams); // idb
unsigned int __cdecl NiD3DShaderDeclaration::Pack_UnsignedLongToUnsignedByte(NiD3DShaderDeclaration::PackingParameters *kParams); // idb
unsigned int __cdecl NiD3DShaderDeclaration::Pack_ShortToUnsignedByte(NiD3DShaderDeclaration::PackingParameters *kParams); // idb
unsigned int __cdecl NiD3DShaderDeclaration::Pack_UnsignedShortToUnsignedByte(NiD3DShaderDeclaration::PackingParameters *kParams); // idb
unsigned int __cdecl NiD3DShaderDeclaration::Pack_ByteToUnsignedByte(NiD3DShaderDeclaration::PackingParameters *kParams); // idb
unsigned int __cdecl NiD3DShaderDeclaration::Pack_UnsignedByteToUnsignedByte(NiD3DShaderDeclaration::PackingParameters *kParams); // idb
NiD3DShaderDeclaration *__cdecl NiDX9ShaderDeclaration::Create(NiRenderer *pkRenderer, unsigned int uiMaxStreamEntryCount, unsigned int uiStreamCount);
NiDX9ShaderDeclaration *__thiscall NiDX9ShaderDeclaration::`vector deleting destructor'(NiDX9ShaderDeclaration *this, unsigned int a2);
NiVBChip *__thiscall NiDX9ShaderDeclaration::PackUntransformedVB(NiDX9ShaderDeclaration *this, NiGeometryData *pkData, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition, int usDirtyFlags, NiVBChip *pkOldVBChip, unsigned int uiStream, void *pvLockedBuff);
IDirect3DVertexDeclaration9 *__thiscall NiDX9ShaderDeclaration::GetD3DDeclaration(NiDX9ShaderDeclaration *this); // idb
unsigned int __cdecl NiD3DShaderDeclaration::Pack_ShortToShort(NiD3DShaderDeclaration::PackingParameters *kParams); // idb
unsigned int __cdecl NiD3DShaderDeclaration::Pack_UnsignedShortToShort(NiD3DShaderDeclaration::PackingParameters *kParams); // idb
void __cdecl NiD3DShaderDeclaration::SetDefaultPackingFunction(NiD3DShaderDeclaration::ShaderParameterType eType, unsigned int uiAGDType); // idb
void __thiscall NiD3DController::NiD3DController(NiD3DController *this); // idb
void __thiscall NiD3DController::~NiD3DController(NiD3DController *this); // idb
NiRTTI *NiD3DController::GetRTTI();
NiD3DController *__thiscall NiD3DController::`vector deleting destructor'(NiD3DController *this, unsigned int a2);
bool __thiscall NiD3DTimeSyncController::IsEqual(NiD3DTimeSyncController *this, NiObject *pObject); // idb
void __thiscall NiD3DTimeSyncController::~NiD3DTimeSyncController(NiD3DTimeSyncController *this); // idb
char __thiscall NiD3DTimeSyncController::RegisterStreamables(NiD3DTimeSyncController *this, NiStream *kStream);
void __thiscall NiD3DTimeSyncController::Update(NiD3DTimeSyncController *this, float fTime); // idb
NiObject *__thiscall NiD3DTimeSyncController::CreateClone(NiD3DTimeSyncController *this, NiCloningProcess *kCloning); // idb
void __thiscall NiD3DTimeSyncController::SetTarget(NiD3DTimeSyncController *this, NiObjectNET *pkTarget); // idb
void __stdcall NiD3DTimeSyncController::GetViewerStrings(NiTArray<char *> *pStrings);
void __thiscall NiDX9RenderState::InitShaderState(NiDX9RenderState *this); // idb
void __thiscall NiDX9RenderState::SaveShaderState(NiDX9RenderState *this); // idb
void __thiscall NiDX9RenderState::RestoreShaderState(NiDX9RenderState *this); // idb
bool __thiscall NiDX9RenderState::GetSoftwareVertexProcessing(NiDX9RenderState *this); // idb
void __thiscall NiD3DRenderState::SetBoneCount(NiD3DRenderState *this, unsigned __int16 usNumBones); // idb
double __thiscall NiD3DRenderState::GetMaxFogValue(NiD3DRenderState *this);
void __thiscall NiD3DRenderState::SetMaxFogValue(NiD3DRenderState *this, float fFogVal); // idb
void __thiscall NiD3DRenderState::SetCameraNearAndFar(NiD3DRenderState *this, float fNear, float fFar); // idb
bool __thiscall NiD3DRenderState::GetLeftHanded(NiD3DRenderState *this); // idb
void __thiscall NiD3DRenderState::SetLeftHanded(NiD3DRenderState *this, bool bLeft); // idb
void __thiscall NiD3DRenderState::SetRenderState(NiD3DRenderState *this, _D3DRENDERSTATETYPE eState, unsigned int uiValue, bool bSave); // idb
unsigned int __thiscall NiD3DRenderState::GetRenderState(NiD3DRenderState *this, _D3DRENDERSTATETYPE eState); // idb
void __thiscall NiD3DRenderState::RestoreRenderState(NiD3DRenderState *this, _D3DRENDERSTATETYPE eState); // idb
void __thiscall NiD3DRenderState::SetPixelShader(NiD3DRenderState *this, IDirect3DPixelShader9 *hShader, bool bSave); // idb
IDirect3DPixelShader9 *__thiscall NiD3DRenderState::GetPixelShader(NiD3DRenderState *this); // idb
void __thiscall NiD3DRenderState::RestorePixelShader(NiD3DRenderState *this); // idb
void __thiscall NiD3DRenderState::ClearPixelShader(NiD3DRenderState *this, IDirect3DPixelShader9 *hShader); // idb
void __thiscall NiD3DRenderState::SetTextureStageState(NiD3DRenderState *this, unsigned int uiStage, _D3DTEXTURESTAGESTATETYPE eState, unsigned int uiValue, bool bSave); // idb
unsigned int __thiscall NiD3DRenderState::GetTextureStageState(NiD3DRenderState *this, unsigned int uiStage, _D3DTEXTURESTAGESTATETYPE eState); // idb
void __thiscall NiD3DRenderState::RestoreTextureStageState(NiD3DRenderState *this, unsigned int uiStage, _D3DTEXTURESTAGESTATETYPE eState); // idb
void __thiscall NiD3DRenderState::InitTextures(NiD3DRenderState *this); // idb
void __thiscall NiD3DRenderState::SetTexture(NiD3DRenderState *this, unsigned int uiStage, IDirect3DBaseTexture9 *pkTexture); // idb
IDirect3DBaseTexture9 *__thiscall NiD3DRenderState::GetTexture(NiD3DRenderState *this, unsigned int uiStage); // idb
void __thiscall NiD3DRenderState::ClearTexture(NiD3DRenderState *this, IDirect3DBaseTexture9 *pkTexture); // idb
void __thiscall NiD3DRenderState::SetForceNormalizeNormals(NiD3DRenderState *this, bool bSet); // idb
bool __thiscall NiD3DRenderState::GetForceNormalizeNormals(NiD3DRenderState *this); // idb
void __thiscall NiD3DRenderState::SetInternalNormalizeNormals(NiD3DRenderState *this, bool bSet); // idb
bool __thiscall NiD3DRenderState::GetInternalNormalizeNormals(NiD3DRenderState *this); // idb
void __thiscall NiDX9RenderState::SetVertexShader(NiDX9RenderState *this, IDirect3DVertexShader9 *hShader, bool bSave); // idb
IDirect3DVertexShader9 *__thiscall NiDX9RenderState::GetVertexShader(NiDX9RenderState *this); // idb
void __thiscall NiDX9RenderState::RestoreVertexShader(NiDX9RenderState *this); // idb
void __thiscall NiDX9RenderState::ClearVertexShader(NiDX9RenderState *this, IDirect3DVertexShader9 *hShader); // idb
void __thiscall NiDX9RenderState::SetFVF(NiDX9RenderState *this, unsigned int uiFVF, bool bSave); // idb
unsigned int __thiscall NiDX9RenderState::GetFVF(NiDX9RenderState *this); // idb
void __thiscall NiDX9RenderState::RestoreFVF(NiDX9RenderState *this); // idb
void __thiscall NiDX9RenderState::ClearFVF(NiDX9RenderState *this, unsigned int uiFVF); // idb
void __thiscall NiDX9RenderState::SetDeclaration(NiDX9RenderState *this, IDirect3DVertexDeclaration9 *hDeclaration, bool bSave); // idb
IDirect3DVertexDeclaration9 *__thiscall NiDX9RenderState::GetDeclaration(NiDX9RenderState *this); // idb
void __thiscall NiDX9RenderState::RestoreDeclaration(NiDX9RenderState *this); // idb
void __thiscall NiDX9RenderState::ClearDeclaration(NiDX9RenderState *this, IDirect3DVertexDeclaration9 *hDeclaration); // idb
void __thiscall NiDX9RenderState::SetSamplerState(NiDX9RenderState *this, unsigned int uiStage, NiD3DRenderState::NiD3DSamplerState eState, unsigned int uiValue, bool bSave); // idb
unsigned int __thiscall NiDX9RenderState::GetSamplerState(NiDX9RenderState *this, unsigned int uiStage, NiD3DRenderState::NiD3DSamplerState eState); // idb
void __thiscall NiDX9RenderState::RestoreSamplerState(NiDX9RenderState *this, unsigned int uiStage, NiD3DRenderState::NiD3DSamplerState eState); // idb
NiDX9RenderState *__thiscall NiDX9RenderState::`scalar deleting destructor'(NiDX9RenderState *this, unsigned int a2);
void __thiscall NiDX9RenderState::SetSoftwareVertexProcessing(NiDX9RenderState *this, bool bSoftwareVP); // idb
void __thiscall NiDX9RenderState::InitRenderModes(NiDX9RenderState *this); // idb
void __thiscall NiDX9RenderState::ReadRenderStateCaps(NiDX9RenderState *this); // idb
void __thiscall NiD3DRenderState::DisableAlpha(NiD3DRenderState *this); // idb
NiD3DRenderState *__cdecl NiDX9RenderState::Create(NiDX9Renderer *pkRenderer, _D3DCAPS9 *kD3DCaps9, bool bZBuffer);
void __thiscall NiD3DShaderConstantManager::NiD3DShaderConstantManager(NiD3DShaderConstantManager *this, NiDX9Renderer *pkD3DRenderer); // idb
void __thiscall NiD3DShaderConstantManager::~NiD3DShaderConstantManager(NiD3DShaderConstantManager *this); // idb
char __thiscall NiD3DShaderConstantManager::SetVertexShaderConstantB(NiD3DShaderConstantManager *this, unsigned int uiStartRegister, const int *pbConstantData, unsigned int uiBoolCount, bool bSave);
char __thiscall NiD3DShaderConstantManager::SetVertexShaderConstantF(NiD3DShaderConstantManager *this, unsigned int uiStartRegister, const float *pfConstantData, unsigned int uiFloat4Count, bool bSave);
char __thiscall NiD3DShaderConstantManager::SetVertexShaderConstantI(NiD3DShaderConstantManager *this, unsigned int uiStartRegister, const int *piConstantData, unsigned int uiInt4Count, bool bSave);
char __thiscall NiD3DShaderConstantManager::SetPixelShaderConstantB(NiD3DShaderConstantManager *this, unsigned int uiStartRegister, const int *pbConstantData, unsigned int uiBoolCount, bool bSave);
char __thiscall NiD3DShaderConstantManager::SetPixelShaderConstantF(NiD3DShaderConstantManager *this, unsigned int uiStartRegister, const float *pfConstantData, unsigned int uiFloat4Count, bool bSave);
char __thiscall NiD3DShaderConstantManager::SetPixelShaderConstantI(NiD3DShaderConstantManager *this, unsigned int uiStartRegister, const int *piConstantData, unsigned int uiInt4Count, bool bSave);
NiD3DShaderConstantManager *__thiscall NiD3DShaderConstantManager::`vector deleting destructor'(NiD3DShaderConstantManager *this, unsigned int a2);
char __thiscall NiGeometryBufferData::IsVBChipValid(NiGeometryBufferData *this);
void __thiscall NiGeometryBufferData::RemoveIB(NiGeometryBufferData *this); // idb
void __thiscall NiGeometryBufferData::SetStreamCount(NiGeometryBufferData *this, unsigned int uiStreamCount); // idb
void __thiscall NiGeometryBufferData::SetFVF(NiGeometryBufferData *this, unsigned int uiFVF); // idb
void __thiscall NiGeometryBufferData::SetVertexDeclaration(NiGeometryBufferData *this, IDirect3DVertexDeclaration9 *hDecl); // idb
void __thiscall NiGeometryBufferData::~NiGeometryBufferData(NiGeometryBufferData *this); // idb
void __thiscall NiD3DDefaultShader::InitializeDeviceCaps(NiD3DDefaultShader *this); // idb
void __thiscall NiDX9LightManager::InitRenderModes(NiDX9LightManager *this); // idb
unsigned int __thiscall NiDX9LightManager::GetNextAvailableIndex(NiDX9LightManager *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,NiLight *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiLight *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiLight *> *this, unsigned int a2);
char __thiscall NiDX9LightManager::LightEntry::Update(NiDX9LightManager::LightEntry *this, NiLight *kLight);
void __thiscall NiDX9LightManager::NextFrame(NiDX9LightManager *this); // idb
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *> *this); // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<NiLight *,NiDX9LightManager::LightEntry *>::`vector deleting destructor'(NiTPointerMap<NiLight *,NiDX9LightManager::LightEntry *> *this, unsigned int a2);
NiTPointerList<NiLight *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::`vector deleting destructor'(NiTPointerList<NiLight *> *this, unsigned int a2);
void __thiscall NiDX9LightManager::~NiDX9LightManager(NiDX9LightManager *this); // idb
void __thiscall NiDX9LightManager::UpdateLights(NiDX9LightManager *this, NiDynamicEffectState *pkState); // idb
NiD3DShaderInterface *__thiscall NiTPointerListBase<DFALL<AttackSequence *>,AttackSequence *>::Remove(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *> *this, NiLight *const *element);
void __thiscall NiDX9LightManager::NiDX9LightManager(NiDX9LightManager *this, NiDX9RenderState *pkRenderState, IDirect3DDevice9 *pkD3DDevice9); // idb
// void __userpurge NiDX9LightManager::SetState(NiDX9LightManager *this@<ecx>, int a2@<edi>, NiDynamicEffectState *pkState, NiTexturingProperty *pkTex, NiVertexColorProperty *pkColor);
void __thiscall NiDX9LightManager::RemoveLight(NiDX9LightManager *this, NiLight *kLight); // idb
void __thiscall NiDX9LightManager::ReleaseLights(NiDX9LightManager *this); // idb
NiPixelFormat *__cdecl NiDX9TextureData::FindClosestPixelFormat(NiTexture::FormatPrefs *kPrefs, NiPixelFormat *const *ppkDestFmts); // idb
char __thiscall NiDX9TextureData::InitializeFromD3DTexture(NiDX9TextureData *this, IDirect3DBaseTexture9 *pkD3DTexture);
unsigned int __thiscall NiPixelFormat::GetNumComponents(NiPixelFormat *this); // idb
void __thiscall NiDX9TextureData::NiDX9TextureData(NiDX9TextureData *this, NiTexture *pkTexture, NiDX9Renderer *pkRenderer); // idb
unsigned int __thiscall NiDX9TextureData::GetWidth(NiDX9TextureData *this); // idb
unsigned int __thiscall NiDX9TextureData::GetHeight(NiDX9TextureData *this); // idb
unsigned int __thiscall NiDX9TextureData::GetLevels(NiDX9TextureData *this); // idb
IDirect3DBaseTexture9 *__thiscall NiDX9TextureData::GetD3DTexture(NiDX9TextureData *this); // idb
void __thiscall NiDX9TextureData::~NiDX9TextureData(NiDX9TextureData *this); // idb
NiPixelFormat *__stdcall NiDX9TextureData::FindMatchingPixelFormat(NiPixelFormat *kSrcFmt, NiTexture::FormatPrefs *kPrefs, NiPixelFormat **ppkDestFmts);
void __cdecl NiDX9TextureData::ClearTextureData();
NiTexture::RendererData *__thiscall NiTexture::RendererData::`vector deleting destructor'(NiTexture::RendererData *this, unsigned int a2);
NiDX9TextureData *__thiscall NiDX9TextureData::`vector deleting destructor'(NiDX9TextureData *this, unsigned int a2);
void __thiscall NiDX9VertexBufferManager::EndFrame(NiDX9VertexBufferManager *this); // idb
char __stdcall NiDX9VertexBufferManager::AllocateBufferSpace(NiGeometryBufferData *pkBuffData, unsigned int uiStream);
void *__thiscall NiDX9VertexBufferManager::LockVB(NiDX9VertexBufferManager *this, IDirect3DVertexBuffer9 *pkVB, unsigned int uiOffset, unsigned int uiSize, unsigned int uiLockFlags); // idb
void __stdcall NiDX9VertexBufferManager::PackVB(char *pucDestBuffer, char *pucSrcBuffer, unsigned int uiVertexStride, unsigned int uiDataSize, unsigned int uiNumVerts);
bool __thiscall NiDX9VertexBufferManager::UnlockVB(NiDX9VertexBufferManager *this, IDirect3DVertexBuffer9 *pkVB); // idb
void __stdcall NiDX9VertexBufferManager::GenerateVertexParameters(NiGeometryData *pkData, NiSkinPartition::Partition *pkPartition, unsigned int *uiVertexTypeDesc, unsigned int *uiVertexStride, unsigned int *uiPosOffset, unsigned int *uiWeightOffset, unsigned int *uiNormOffset, unsigned int *uiColorOffset, unsigned int *uiTexOffset);
NiVBChip *__thiscall NiDX9VertexBufferManager::PackUntransformedVB(NiDX9VertexBufferManager *this, NiGeometryData *pkData, NiSkinInstance *pkSkin, int usDirtyFlags, NiVBChip *pkOldVBChip, void *pvLockedBuff);
NiVBChip *__thiscall NiDX9VertexBufferManager::PackTransformedVB(NiDX9VertexBufferManager *this, NiGeometryBufferData *pkBuffData, unsigned __int16 usVerts, NiPoint2 *pkScreenSpaceVerts, NiColorA *pkColors, NiPoint2 *pkTex, unsigned __int16 usDirtyFlags, NiVBChip *pkOldVBChip, void *pvLockedBuff); // idb
NiVBChip *__thiscall NiDX9VertexBufferManager::PackSkinnedVB(NiDX9VertexBufferManager *this, NiGeometryData *pkData, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition, int usDirtyFlags, NiVBChip *pkOldVBChip, void *pvLockedBuff);
void __thiscall NiDX9VertexBufferManager::DestroyDefaultBuffers(NiDX9VertexBufferManager *this); // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiDX9VertexBufferManager::NiDX9VBInfo *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiDX9VertexBufferManager::NiDX9VBInfo *>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiDX9VertexBufferManager::NiDX9VBInfo *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<unsigned int,NiDX9VertexBufferManager::NiDX9VBInfo *>::`vector deleting destructor'(NiTPointerMap<unsigned int,NiDX9VertexBufferManager::NiDX9VBInfo *> *this, unsigned int a2);
void __thiscall NiDX9VertexBufferManager::~NiDX9VertexBufferManager(NiDX9VertexBufferManager *this); // idb
void __thiscall NiDX9VertexBufferManager::NiDX9VertexBufferManager(NiDX9VertexBufferManager *this, IDirect3DDevice9 *pkD3DDevice9); // idb
NiDX9VertexBufferManager *__thiscall NiDX9VertexBufferManager::`vector deleting destructor'(NiDX9VertexBufferManager *this, unsigned int a2);
char __thiscall NiDX9SourceTextureData::CreateSurf(NiDX9SourceTextureData *this, NiPixelData *kPixels);
void __cdecl NiDX9SourceTextureData::CopyDataToSurfaceLevel(NiPixelData *kPixels, unsigned int uiLevel, IDirect3DSurface9 *pkMipLevel, unsigned int uiFace); // idb
char __thiscall NiDX9SourceTextureData::InitializeFromD3DTexture(NiDX9SourceTextureData *this, IDirect3DBaseTexture9 *pkD3DTexture);
char __thiscall NiDX9SourceTextureData::UpdatePalette(NiDX9SourceTextureData *this, NiPalette *pkNewPalette);
void __thiscall NiDX9SourceTextureData::NiDX9SourceTextureData(NiDX9SourceTextureData *this, NiSourceTexture *pkTexture, NiDX9Renderer *pkRenderer); // idb
NiPalette *__thiscall NiInputSystem::GetActionMap(NiDX9SourceTextureData *this); // idb
void __thiscall NiDX9SourceTextureData::~NiDX9SourceTextureData(NiDX9SourceTextureData *this); // idb
void __thiscall NiDX9SourceTextureData::CopyDataToSurface(NiDX9SourceTextureData *this, NiPixelData *kPixels); // idb
void __thiscall NiDX9SourceTextureData::Update(NiDX9SourceTextureData *this); // idb
bool __thiscall NiDX9SourceTextureData::LoadTextureFile(NiDX9SourceTextureData *this, const char *pcFilename, NiDX9Renderer *pkRenderer, NiTexture::FormatPrefs *kPrefs); // idb
NiDX9SourceTextureData *__thiscall NiDX9SourceTextureData::`vector deleting destructor'(NiDX9SourceTextureData *this, unsigned int a2);
// NiDX9SourceCubeMapData *__usercall NiDX9SourceTextureData::Create@<eax>(int a1@<ebx>, NiSourceTexture *pkTexture, NiDX9Renderer *pkRenderer);
NiDX9SourceCubeMapData *__thiscall NiDX9SourceCubeMapData::`scalar deleting destructor'(NiDX9SourceCubeMapData *this, unsigned int a2);
BOOL __thiscall NiPixelFormat::GetPalettized(NiPixelFormat *this);
void __thiscall NiDX9SourceCubeMapData::CopyDataToCubeMapFace(NiDX9SourceCubeMapData *this, NiPixelData *kPixels, NiSourceCubeMap::FaceID eFace); // idb
// NiDX9SourceCubeMapData *__usercall NiDX9SourceCubeMapData::Create@<eax>(NiUnsharedGeometryGroup *a1@<ecx>, int a2@<ebx>, int a3@<edi>, NiSourceCubeMap *pkTexture, NiDX9Renderer *pkRenderer);
void __thiscall NiDX9SourceCubeMapData::Update(NiDX9SourceCubeMapData *this); // idb
unsigned int __cdecl NiDX9PixelFormat::DetermineD3DFormat(NiPixelFormat *kDesc);
void __cdecl NiDX9PixelFormat::InitFromD3DFormat(_D3DFORMAT eD3DFmt, NiPixelFormat *kFormat); // idb
NiPixelFormat *__cdecl NiDX9PixelFormat::CreateFromD3DFormat(_D3DFORMAT eD3DFmt); // idb
// IDirect3DIndexBuffer9 *__userpurge NiDX9IndexBufferManager::PackBuffer@<eax>(NiDX9IndexBufferManager *this@<ecx>, int a2@<ebx>, const unsigned __int16 *pusTriList, unsigned int uiLength, unsigned int uiMaxLength, IDirect3DIndexBuffer9 *pkOldIB, unsigned int *uiIBSize, _D3DPOOL ePool, unsigned int uiUsage);
IDirect3DIndexBuffer9 *__thiscall NiDX9IndexBufferManager::ResizeTempPointConnectivity(NiDX9IndexBufferManager *this, unsigned int uiPoints, bool bRefill, unsigned int uiUsage, _D3DPOOL ePool); // idb
IDirect3DIndexBuffer9 *__thiscall NiDX9IndexBufferManager::ResizeTempLineConnectivity(NiDX9IndexBufferManager *this, unsigned int uiPoints, char *pbFlags, unsigned int *uiConn, unsigned int uiUsage, _D3DPOOL ePool); // idb
void __thiscall NiDX9IndexBufferManager::DestroyDefaultBuffers(NiDX9IndexBufferManager *this); // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiDX9IndexBufferManager::NiDX9IBInfo *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiDX9IndexBufferManager::NiDX9IBInfo *>::`vector deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiDX9IndexBufferManager::NiDX9IBInfo *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<unsigned int,NiDX9IndexBufferManager::NiDX9IBInfo *>::`vector deleting destructor'(NiTPointerMap<unsigned int,NiDX9IndexBufferManager::NiDX9IBInfo *> *this, unsigned int a2);
void __thiscall NiDX9IndexBufferManager::~NiDX9IndexBufferManager(NiDX9IndexBufferManager *this); // idb
void __thiscall NiDX9IndexBufferManager::NiDX9IndexBufferManager(NiDX9IndexBufferManager *this, IDirect3DDevice9 *pkD3DDevice9); // idb
NiDX9IndexBufferManager *__thiscall NiDX9IndexBufferManager::`vector deleting destructor'(NiDX9IndexBufferManager *this, unsigned int a2);
void __thiscall NiDX9RenderedTextureData::NiDX9RenderedTextureData(NiDX9RenderedTextureData *this, NiRenderedTexture *pkTexture, NiDX9Renderer *pkRenderer); // idb
void __thiscall NiDX9RenderedTextureData::~NiDX9RenderedTextureData(NiDX9RenderedTextureData *this); // idb
NiDX9RenderedTextureData *__thiscall NiDX9RenderedTextureData::`scalar deleting destructor'(NiDX9RenderedTextureData *this, unsigned int a2);
NiPixelFormat *__thiscall NiDX9RenderedTextureData::CreateSurf(NiDX9RenderedTextureData *this, NiRenderedTexture *pkTexture); // idb
// NiDX9RenderedTextureData *__usercall NiDX9RenderedTextureData::Create@<eax>(int a1@<edi>, NiRenderedTexture *pkTexture, NiDX9Renderer *pkRenderer);
NiDX9RenderedCubeMapData *__thiscall NiDX9RenderedCubeMapData::`scalar deleting destructor'(NiDX9RenderedCubeMapData *this, unsigned int a2);
NiPixelFormat *__thiscall NiDX9RenderedCubeMapData::CreateSurf(NiDX9RenderedCubeMapData *this, NiRenderedCubeMap *pkTexture); // idb
NiDX9RenderedCubeMapData *__cdecl NiDX9RenderedCubeMapData::Create(NiRenderedCubeMap *pkTexture, NiDX9Renderer *pkRenderer); // idb
NiDX9SourceTextureData *__thiscall NiStepBoolKey::NiStepBoolKey(NiDX9SourceTextureData *this); // idb
IDirect3DBaseTexture9 *__thiscall NiDX9DynamicTextureData::GetSysMemTexture(NiDX9DynamicTextureData *this); // idb
bool __thiscall NiDX9DynamicTextureData::IsLocked(NiDX9DynamicTextureData *this); // idb
void __thiscall NiDX9DynamicTextureData::SetLocked(NiDX9DynamicTextureData *this, bool bTextureLocked); // idb
NiDX9DynamicTextureData *__thiscall NiDX9DynamicTextureData::`vector deleting destructor'(NiDX9DynamicTextureData *this, unsigned int a2);
// NiPixelFormat *__userpurge NiDX9DynamicTextureData::CreateSurf@<eax>(NiDX9DynamicTextureData *this@<ecx>, unsigned int a2@<edi>, NiDynamicTexture *pkTexture, bool bDynTexturesCap);
NiDX9DynamicTextureData *__cdecl NiDX9DynamicTextureData::Create(NiDynamicTexture *pkTexture); // idb
char *__cdecl NiDX9ErrorString(unsigned int uiErrorCode); // idb
void __thiscall NiD3DGeometryGroupManager::SetHWSkinning(NiD3DGeometryGroupManager *this, bool bHWSkinning); // idb
void __thiscall NiD3DGeometryGroupManager::~NiD3DGeometryGroupManager(NiD3DGeometryGroupManager *this); // idb
NiGeometryGroupManager *__cdecl NiD3DGeometryGroupManager::Create(IDirect3DDevice9 *pkD3DDevice, NiDX9VertexBufferManager *pkVBManager);
char __thiscall NiD3DGeometryGroupManager::DestroyGroup(NiD3DGeometryGroupManager *this, NiGeometryGroup *pkGroup);
BOOL __stdcall NiD3DGeometryGroupManager::IsGroupEmpty(NiGeometryGroup *pkGroup);
char __stdcall NiD3DGeometryGroupManager::AddObjectToGroup(NiGeometryGroup *pkGroup, NiScreenTexture *pkScreenTexture);
char __stdcall NiD3DGeometryGroupManager::RemoveObjectFromGroup(NiScreenTexture *pkScreenTexture);
char __stdcall NiD3DGeometryGroupManager::RemoveSkinPartitionFromGroup(NiSkinPartition *pkSkinPartition);
NiD3DGeometryGroupManager *__thiscall NiD3DGeometryGroupManager::`scalar deleting destructor'(NiD3DGeometryGroupManager *this, unsigned int a2);
NiGeometryGroup *__thiscall NiD3DGeometryGroupManager::CreateGroup(NiD3DGeometryGroupManager *this, NiGeometryGroupManager::RepackingBehavior eBehavior); // idb
char __stdcall NiD3DGeometryGroupManager::AddObjectToGroup(NiGeometryGroup *pkGroup, NiGeometryData *pkData, NiSkinInstance *pkSkinInstance, bool bHWSkinning, unsigned int __formal, unsigned int a7);
char __stdcall NiD3DGeometryGroupManager::RemoveObjectFromGroup(NiGeometryData *pkData, NiSkinInstance *pkSkinInstance);
char __thiscall NiD3DGeometryGroupManager::AddObjectToGroup(NiD3DGeometryGroupManager *this, NiGeometryGroup *pkGroup, NiGeometryData *pkData, NiSkinInstance *pkSkinInstance);
IDirect3DTexture9 *__stdcall NiDX9TextureManager::GetTexture(unsigned int __formal, unsigned int __formala, unsigned int a4, unsigned int a5, _D3DFORMAT a6, _D3DPOOL a7);
void __thiscall NiDX9TextureManager::NiDX9TextureManager(NiDX9TextureManager *this, NiDX9Renderer *pkRenderer); // idb
NiDX9TextureManager *__thiscall NiDX9TextureManager::`scalar deleting destructor'(NiDX9TextureManager *this, unsigned int a2);
IDirect3DBaseTexture9 *__thiscall NiDX9TextureManager::PrepareTextureForRendering(NiDX9TextureManager *this, NiTexture *pkNewTexIm, bool *bChanged, bool *bMipmap, bool *bNonPow2); // idb
bool __thiscall NiDX9TextureManager::PrecacheTexture(NiDX9TextureManager *this, NiTexture *pkIm, bool bForceLoad, bool bLocked); // idb
signed int __thiscall NiDX9TextureManager::GetFormatFromTexture(NiDX9TextureManager *this, NiTexture *kIm);
NiD3DShaderProgramCreatorHLSL *__thiscall NiD3DShaderProgramCreatorHLSL::`vector deleting destructor'(NiD3DShaderProgramCreatorHLSL *this, unsigned int a2);
NiD3DShaderProgramCreatorObj *__thiscall NiD3DShaderProgramCreatorAsm::`scalar deleting destructor'(NiD3DShaderProgramCreatorObj *this, unsigned int a2);
void __cdecl NiDX9RendererSDM::Shutdown(); // idb
void __cdecl NiDX9Renderer::AddDisplayFormat(_D3DFORMAT eFormat); // idb
void __cdecl NiDX9RendererSDM::Init(); // idb
void NiDX9RendererSDM::NiDX9RendererSDM();
void __thiscall NiD3DGlobalConstantEntry::SetData(NiD3DGlobalConstantEntry *this, unsigned int uiDataSize, const void *pvDataSource); // idb
void __thiscall NiD3DShaderDeclaration::NiD3DShaderDeclaration(NiD3DShaderDeclaration *this); // idb
unsigned int __cdecl NiD3DShaderDeclaration::Pack_LongToFloat(NiD3DShaderDeclaration::PackingParameters *kParams); // idb
unsigned int __cdecl NiD3DShaderDeclaration::Pack_UnsignedLongToFloat(NiD3DShaderDeclaration::PackingParameters *kParams); // idb
unsigned int __cdecl NiD3DShaderDeclaration::Pack_ShortToFloat(NiD3DShaderDeclaration::PackingParameters *kParams); // idb
unsigned int __cdecl NiD3DShaderDeclaration::Pack_UnsignedShortToFloat(NiD3DShaderDeclaration::PackingParameters *kParams); // idb
unsigned int __cdecl NiD3DShaderDeclaration::Pack_ByteToFloat(NiD3DShaderDeclaration::PackingParameters *kParams); // idb
unsigned int __cdecl NiD3DShaderDeclaration::Pack_UnsignedByteToFloat(NiD3DShaderDeclaration::PackingParameters *kParams); // idb
unsigned int __cdecl NiD3DShaderDeclaration::Pack_LongToUByteColor(NiD3DShaderDeclaration::PackingParameters *kParams); // idb
unsigned int __cdecl NiD3DShaderDeclaration::Pack_ShortToUByteColor(NiD3DShaderDeclaration::PackingParameters *kParams); // idb
unsigned int __cdecl NiD3DShaderDeclaration::Pack_UnsignedShortToUByteColor(NiD3DShaderDeclaration::PackingParameters *kParams); // idb
unsigned int __cdecl NiD3DShaderDeclaration::Pack_ByteToUByteColor(NiD3DShaderDeclaration::PackingParameters *kParams); // idb
unsigned int __cdecl NiD3DShaderDeclaration::Pack_UnsignedByteToUByteColor(NiD3DShaderDeclaration::PackingParameters *kParams); // idb
NiTArray<NiD3DShaderDeclaration::NiPackerEntry *> *__thiscall NiTArray<NiD3DShaderDeclaration::NiPackerEntry *>::`vector deleting destructor'(NiTArray<NiD3DShaderDeclaration::NiPackerEntry *> *this, unsigned int a2);
NiTArray<unsigned int (__cdecl*)(NiD3DShaderDeclaration::PackingParameters &)> *__thiscall NiTArray<unsigned int (__cdecl *)(NiD3DShaderDeclaration::PackingParameters &)>::`scalar deleting destructor'(NiTArray<unsigned int (__cdecl*)(NiD3DShaderDeclaration::PackingParameters &)> *this, unsigned int a2);
void __thiscall NiD3DShaderDeclaration::~NiD3DShaderDeclaration(NiD3DShaderDeclaration *this); // idb
char __thiscall NiD3DShaderDeclaration::Initialize(NiD3DShaderDeclaration *this, NiRenderer *pkRenderer, unsigned int uiMaxStreamEntryCount, unsigned int uiStreamCount);
unsigned int __cdecl NiD3DShaderDeclaration::Pack_DropInFields(NiD3DShaderDeclaration::PackingParameters *kParams); // idb
unsigned int __cdecl NiD3DShaderDeclaration::Pack_Float_ExtraOutsToZero(NiD3DShaderDeclaration::PackingParameters *kParams); // idb
int __cdecl NiD3DShaderDeclaration::Pack_FloatToFloat(NiD3DShaderDeclaration::PackingParameters *kParams);
unsigned int __cdecl NiD3DShaderDeclaration::Pack_FloatToUByteColor(NiD3DShaderDeclaration::PackingParameters *kParams); // idb
NiD3DShaderDeclaration *__thiscall NiD3DShaderDeclaration::`scalar deleting destructor'(NiD3DShaderDeclaration *this, unsigned int a2);
char __cdecl NiD3DShaderDeclaration::InitializePackingFunctions();
int __stdcall NiD3DShaderDeclaration::PackEntry(unsigned __int16 usCount, NiGeometryData *pkData, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition, NiD3DShaderDeclaration::ShaderRegisterEntry *pkEntry, unsigned int uiStride, char *pucData);
void __cdecl NiD3DShaderDeclaration::_SDMInit(); // idb
void __cdecl NiD3DShaderDeclaration::_SDMShutdown(); // idb
void __thiscall NiD3DRenderState::ApplyMaterial(NiD3DRenderState *this, NiMaterialProperty *pkNew); // idb
void __thiscall NiD3DRenderState::SetModelTransform(NiD3DRenderState *this, NiTransform *kXform); // idb
void __thiscall NiDX9RenderState::PurgeMaterial(NiDX9RenderState *this, NiMaterialProperty *pkMaterial); // idb
void __thiscall NiD3DRenderState::RestoreRenderState(NiD3DRenderState *this); // idb
void __thiscall NiD3DRenderState::InitShaderState(NiD3DRenderState *this); // idb
void __thiscall NiD3DRenderState::SaveShaderState(NiD3DRenderState *this); // idb
void __thiscall NiD3DRenderState::RestoreShaderState(NiD3DRenderState *this); // idb
void __thiscall NiD3DRenderState::RestoreTextureStageState(NiD3DRenderState *this); // idb
void __thiscall NiD3DRenderState::SetD3DRenderer(NiD3DRenderState *this, NiDX9Renderer *pkD3DRenderer); // idb
void __thiscall NiD3DRenderState::ApplyAlpha(NiD3DRenderState *this, NiAlphaProperty *pkNew); // idb
void __thiscall NiD3DRenderState::ApplyDitherMode(NiD3DRenderState *this, NiDitherProperty *pkNew); // idb
void __thiscall NiD3DRenderState::ApplyFog(NiD3DRenderState *this, NiFogProperty *pkNew); // idb
void __thiscall NiD3DRenderState::ApplyShading(NiD3DRenderState *this, NiShadeProperty *pkNew); // idb
void __thiscall NiD3DRenderState::ApplySpecular(NiD3DRenderState *this, NiSpecularProperty *pkNew); // idb
void __thiscall NiD3DRenderState::ApplyStencil(NiD3DRenderState *this, NiStencilProperty *pkNew); // idb
void __thiscall NiD3DRenderState::ApplyWireframe(NiD3DRenderState *this, NiWireframeProperty *pkNew); // idb
void __thiscall NiD3DRenderState::ApplyZBuffer(NiD3DRenderState *this, NiZBufferProperty *pkNew); // idb
void __thiscall NiD3DRenderState::InitRenderState(NiD3DRenderState *this); // idb
void __thiscall NiD3DRenderState::SaveRenderState(NiD3DRenderState *this); // idb
void __thiscall NiD3DRenderState::InitTextureStageState(NiD3DRenderState *this); // idb
void __thiscall NiD3DRenderState::SaveTextureStageState(NiD3DRenderState *this); // idb
void __thiscall NiD3DRenderState::InitRenderModes(NiD3DRenderState *this); // idb
void __thiscall NiD3DRenderState::NiD3DRenderState(NiD3DRenderState *this, NiDX9Renderer *pkD3DRenderer); // idb
void __thiscall NiD3DRenderState::~NiD3DRenderState(NiD3DRenderState *this); // idb
void __thiscall NiD3DRenderState::UpdateRenderState(NiD3DRenderState *this, NiPropertyState *pkNew); // idb
NiD3DRenderState *__thiscall NiD3DRenderState::`vector deleting destructor'(NiD3DRenderState *this, unsigned int a2);
char __thiscall NiDX9MaterialManager::MaterialEntry::Update(NiDX9MaterialManager::MaterialEntry *this, NiMaterialProperty *kMat);
void __thiscall NiDX9MaterialManager::UpdateToDevice(NiDX9MaterialManager *this, IDirect3DDevice9 *pkD3DDevice9); // idb
void __thiscall NiDX9MaterialManager::PurgeMaterial(NiDX9MaterialManager *this, NiMaterialProperty *pkMaterial); // idb
void __thiscall NiDX9MaterialManager::~NiDX9MaterialManager(NiDX9MaterialManager *this); // idb
void __thiscall NiDX9MaterialManager::SetCurrentMaterial(NiDX9MaterialManager *this, NiMaterialProperty *kMat); // idb
void __thiscall NiDX9MaterialManager::Initialize(NiDX9MaterialManager *this); // idb
void __thiscall NiDX9ShaderConstantManager::NiDX9ShaderConstantManager(NiDX9ShaderConstantManager *this, NiDX9Renderer *pkD3DRenderer, _D3DCAPS9 *kD3DCaps9); // idb
NiDX9ShaderConstantManager *__thiscall NiDX9ShaderConstantManager::`scalar deleting destructor'(NiDX9ShaderConstantManager *this, unsigned int a2);
void __cdecl NiDX9ShaderConstantManager::Create(NiDX9Renderer *pkRenderer, _D3DCAPS9 *kD3DCaps9);
void __thiscall NiDX9ShaderConstantManager::CommitChanges(NiDX9ShaderConstantManager *this); // idb
void __thiscall NiDX9Resource::~NiDX9Resource(NiDX9Resource *this); // idb
void __cdecl NiVBSet::DetermineUsageAndPool(NiVBSet *pkSet); // idb
void __thiscall NiVBSet::RemoveBlockFromFreeSpaceList(NiVBSet *this, NiVBBlock *pkVBBlock); // idb
NiTArray<NiVBChip *> *__thiscall NiTArray<NiVBChip *>::`vector deleting destructor'(NiTArray<NiVBChip *> *this, unsigned int a2);
NiTArray<NiVBBlock *> *__thiscall NiTArray<NiVBBlock *>::`vector deleting destructor'(NiTArray<NiVBBlock *> *this, unsigned int a2);
NiVBBlock *__thiscall NiVBSet::FindBlockWithFreeSpace(NiVBSet *this, unsigned int uiFreeSize); // idb
void __thiscall NiVBSet::InsertBlockIntoFreeSpaceList(NiVBSet *this, NiVBBlock *pkVBBlock); // idb
void __cdecl NiVBSet::DeleteBlocks(); // idb
void __thiscall NiVBBlock::ClearAllData(NiVBBlock *this); // idb
void __stdcall NiVBSet::FreeBlock(NiVBBlock *pkBlock);
void __thiscall NiVBSet::~NiVBSet(NiVBSet *this); // idb
void __thiscall NiVBSet::FreeChip(NiVBSet *this, unsigned int uiBlockIndex, unsigned int uiChipIndex); // idb
void __cdecl NiVBSet::AllocateBlocks(); // idb
NiVBBlock *__thiscall NiVBSet::CreateBlock(NiVBSet *this, unsigned int uiSize); // idb
NiVBChip *__thiscall NiVBSet::AllocateChip(NiVBSet *this, unsigned int uiSize, bool bForceNewBlock); // idb
void __thiscall NiGeometryBufferData::NiGeometryBufferData(NiGeometryBufferData *this); // idb
void __thiscall NiStaticGeometryGroup::Purge(NiStaticGeometryGroup *this); // idb
void __thiscall NiStaticGeometryGroup::RemoveObject(NiUnsharedGeometryGroup *this, NiGeometryData *pkData); // idb
void __thiscall NiStaticGeometryGroup::AddObject(NiStaticGeometryGroup *this, NiScreenTexture *pkScreenTexture); // idb
void __stdcall NiStaticGeometryGroup::ReleaseChip(NiGeometryBufferData *pkBuffData, unsigned int uiStream);
void __thiscall NiVBSet::NiVBSet(NiVBSet *this); // idb
void __cdecl NiVBSet::Create(unsigned int uiBlockSize, IDirect3DDevice9 *pkD3DDevice, unsigned int uiFVF, unsigned int uiFlags, unsigned int uiIndex);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *>::`vector deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *this, unsigned int a2);
NiTPointerMap<unsigned int,NiVBSet *> *__thiscall NiTPointerMap<unsigned int,NiVBSet *>::`scalar deleting destructor'(NiTPointerMap<unsigned int,NiVBSet *> *this, unsigned int a2);
NiStaticGeometryGroup *__thiscall NiStaticGeometryGroup::`scalar deleting destructor'(NiStaticGeometryGroup *this, unsigned int a2);
NiVBChip *__thiscall NiStaticGeometryGroup::CreateChip(NiStaticGeometryGroup *this, NiGeometryBufferData *pkBuffData, unsigned int uiStream); // idb
void __thiscall NiStaticGeometryGroup::NiStaticGeometryGroup(NiStaticGeometryGroup *this); // idb
void __cdecl NiStaticGeometryGroup::Create();
void __thiscall NiUnsharedGeometryGroup::RemoveObject(NiUnsharedGeometryGroup *this, NiSkinPartition::Partition *pkPartition); // idb
NiUnsharedGeometryGroup *__thiscall NiUnsharedGeometryGroup::`vector deleting destructor'(NiUnsharedGeometryGroup *this, unsigned int a2);
NiGeometryGroup *__cdecl NiUnsharedGeometryGroup::Create(); // idb
void __thiscall NiUnsharedGeometryGroup::AddObject(NiUnsharedGeometryGroup *this, NiScreenTexture *pkScreenTexture); // idb
void __thiscall NiStaticGeometryGroup::RemoveObject(NiUnsharedGeometryGroup *this, NiScreenTexture *pkScreenTexture); // idb
NiVBChip *__cdecl NiVBChip::Create(NiVBBlock *pkBlock, IDirect3DVertexBuffer9 *pkVB, unsigned int uiOffset, unsigned int uiSize, unsigned int uiIndex); // idb
void __thiscall NiUnsharedGeometryGroup::AddObject(NiUnsharedGeometryGroup *this, NiGeometryData *pkData, NiSkinInstance *pkSkinInstance, NiSkinPartition::Partition *pkPartition); // idb
NiVBChip *__thiscall NiUnsharedGeometryGroup::CreateChip(NiUnsharedGeometryGroup *this, NiGeometryBufferData *pkBuffData, unsigned int uiStream); // idb
void __stdcall NiUnsharedGeometryGroup::ReleaseChip(NiGeometryBufferData *pkBuffData, unsigned int uiStream);
NiTArray<NiVBDynamicSet *> *__thiscall NiTArray<NiVBDynamicSet *>::`vector deleting destructor'(NiTArray<NiVBDynamicSet *> *this, unsigned int a2);
void __thiscall NiDynamicGeometryGroup::Purge(NiDynamicGeometryGroup *this); // idb
void __thiscall NiDynamicGeometryGroup::RemoveObject(NiDynamicGeometryGroup *this, NiGeometryData *pkData); // idb
void __thiscall NiDynamicGeometryGroup::RemoveObject(NiDynamicGeometryGroup *this, NiSkinPartition::Partition *pkPartition); // idb
void __thiscall NiDynamicGeometryGroup::AddObject(NiDynamicGeometryGroup *this, NiScreenTexture *pkScreenTexture); // idb
void __thiscall NiDynamicGeometryGroup::RemoveObject(NiDynamicGeometryGroup *this, NiScreenTexture *pkScreenTexture); // idb
void __stdcall NiDynamicGeometryGroup::ReleaseChip(NiGeometryBufferData *pkBuffData, unsigned int uiStream);
NiVBDynamicSet *__cdecl NiVBDynamicSet::Create(unsigned int uiBlockSize, IDirect3DDevice9 *pkD3DDevice, unsigned int uiFVF, unsigned int uiIndex); // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBDynamicSet *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBDynamicSet *>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBDynamicSet *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<unsigned int,NiVBDynamicSet *>::`vector deleting destructor'(NiTPointerMap<unsigned int,NiVBDynamicSet *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBChip *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBChip *>::`vector deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBChip *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<unsigned int,NiVBChip *>::`vector deleting destructor'(NiTPointerMap<unsigned int,NiVBChip *> *this, unsigned int a2);
void __thiscall NiDynamicGeometryGroup::~NiDynamicGeometryGroup(NiDynamicGeometryGroup *this); // idb
void __thiscall NiDynamicGeometryGroup::AddObject(NiDynamicGeometryGroup *this, NiGeometryData *pkData, NiSkinInstance *pkSkinInstance, NiSkinPartition::Partition *pkPartition); // idb
NiVBChip *__thiscall NiDynamicGeometryGroup::CreateChip(NiDynamicGeometryGroup *this, NiGeometryBufferData *pkBuffData, unsigned int uiStream); // idb
void __thiscall NiDynamicGeometryGroup::NiDynamicGeometryGroup(NiDynamicGeometryGroup *this); // idb
NiDynamicGeometryGroup *__thiscall NiDynamicGeometryGroup::`vector deleting destructor'(NiDynamicGeometryGroup *this, unsigned int a2);
void __cdecl NiDynamicGeometryGroup::Create();
char __stdcall NiD3DShaderProgramCreatorHLSL::RecreateVertexShader(NiD3DVertexShader *pkVertexShader);
char __stdcall NiD3DShaderProgramCreatorHLSL::RecreatePixelShader(NiD3DPixelShader *pkPixelShader);
void __thiscall NiD3DShaderProgram::SetName(NiD3DShaderProgram *this, const char *pszName); // idb
char *__thiscall NiD3DShaderProgram::GetShaderProgramName(NiD3DShaderProgram *this);
void __thiscall NiD3DShaderProgram::SetShaderProgramName(NiD3DShaderProgram *this, const char *pszName); // idb
void __thiscall NiD3DShaderProgram::SetCode(NiD3DShaderProgram *this, unsigned int uiSize, void *pvCode); // idb
void __thiscall CVirtualServer::ProtoStruct<PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD>::SetRevBytes(NiD3DShaderProgram *this, NiD3DShaderProgramCreator *pkCreator); // idb
NiD3DPixelShader *__thiscall NiD3DPixelShader::`scalar deleting destructor'(NiD3DPixelShader *this, unsigned int a2);
void __thiscall NiD3DPixelShader::SetShaderHandle(NiD3DPixelShader *this, IDirect3DPixelShader9 *hShader); // idb
NiD3DVertexShader *__thiscall NiD3DVertexShader::`vector deleting destructor'(NiD3DVertexShader *this, unsigned int a2);
char *__thiscall NiD3DHLSLPixelShader::GetEntryPoint(NiD3DHLSLPixelShader *this);
void __thiscall NiShaderRequirementDesc::SetBonesPerPartition(NiD3DVertexShader *this, unsigned int uiUsage); // idb
void __thiscall NiD3DVertexShader::SetVertexDeclaration(NiD3DVertexShader *this, IDirect3DVertexDeclaration9 *hDecl); // idb
bool __thiscall NiD3DVertexShader::GetSoftwareVertexProcessing(NiD3DVertexShader *this); // idb
void __thiscall NiD3DVertexShader::SetSoftwareVertexProcessing(NiD3DVertexShader *this, bool bSoftwareVP); // idb
NiD3DHLSLPixelShader *__thiscall NiD3DHLSLPixelShader::`vector deleting destructor'(NiD3DHLSLPixelShader *this, unsigned int a2);
void __thiscall NiD3DHLSLPixelShader::SetEntryPoint(NiD3DHLSLPixelShader *this, const char *pcEntryPoint); // idb
char *__thiscall NiD3DHLSLPixelShader::GetShaderTarget(NiD3DHLSLPixelShader *this);
void __thiscall NiD3DHLSLPixelShader::SetShaderTarget(NiD3DHLSLPixelShader *this, const char *pcShaderTarget); // idb
void __thiscall NiD3DHLSLPixelShader::SetConstantTable(NiD3DHLSLPixelShader *this, ID3DXConstantTable *pkTable); // idb
NiD3DHLSLVertexShader *__thiscall NiD3DHLSLVertexShader::`scalar deleting destructor'(NiD3DHLSLVertexShader *this, unsigned int a2);
char *__thiscall NiInputSystem::GetAvailableDeviceCount(NiD3DHLSLVertexShader *this);
void __thiscall NiD3DHLSLVertexShader::SetEntryPoint(NiD3DHLSLVertexShader *this, const char *pcEntryPoint); // idb
unsigned int __thiscall NiD3DHLSLVertexShader::GetShaderTarget(NiDX9VertexBufferManager *this); // idb
void __thiscall NiD3DHLSLVertexShader::SetShaderTarget(NiD3DHLSLVertexShader *this, const char *pcShaderTarget); // idb
void __thiscall NiD3DHLSLVertexShader::SetConstantTable(NiD3DHLSLVertexShader *this, ID3DXConstantTable *pkTable); // idb
char __thiscall NiD3DShaderProgramCreatorHLSL::LoadShaderCodeFromFile(NiD3DShaderProgramCreatorHLSL *this, const char *pcFileName, const char *pcEntryPoint, const char *pcShaderTarget, void **pvCode, unsigned int *uiCodeSize, ID3DXConstantTable **pkConstantTable);
// char __userpurge NiD3DShaderProgramCreatorHLSL::LoadShaderCodeFromBuffer@<al>(NiD3DShaderProgramCreatorHLSL *this@<ecx>, int a2@<ebx>, const void *pvBuffer, unsigned int uiBufferSize, const char *pcEntryPoint, const char *pcShaderTarget, void **pvCode, unsigned int *uiCodeSize, ID3DXConstantTable **pkConstantTable);
NiD3DVertexShader *__thiscall NiD3DShaderProgramCreatorHLSL::CreateVertexShaderFromFile(NiD3DShaderProgramCreatorHLSL *this, const char *pcFileName, const char *pcShaderName, const char *pcEntryPoint, const char *pcShaderTarget, IDirect3DVertexDeclaration9 *hDecl, unsigned int uiUsage, bool bSoftwareVP); // idb
NiD3DVertexShader *__thiscall NiD3DShaderProgramCreatorHLSL::CreateVertexShaderFromBuffer(NiD3DShaderProgramCreatorHLSL *this, const void *pvBuffer, unsigned int uiBufferSize, const char *pcShaderName, const char *pcEntryPoint, const char *pcShaderTarget, IDirect3DVertexDeclaration9 *hDecl, unsigned int uiUsage, bool bSoftwareVP); // idb
NiD3DPixelShader *__thiscall NiD3DShaderProgramCreatorHLSL::CreatePixelShaderFromFile(NiD3DShaderProgramCreatorHLSL *this, const char *pcFileName, const char *pcShaderName, const char *pcEntryPoint, const char *pcShaderTarget); // idb
NiD3DPixelShader *__thiscall NiD3DShaderProgramCreatorHLSL::CreatePixelShaderFromBuffer(NiD3DShaderProgramCreatorHLSL *this, const void *pvBuffer, unsigned int uiBufferSize, const char *pcShaderName, const char *pcEntryPoint, const char *pcShaderTarget); // idb
char __stdcall NiD3DShaderProgramCreatorAsm::RecreateVertexShader(NiD3DVertexShader *pkVertexShader);
char __stdcall NiD3DShaderProgramCreatorAsm::RecreatePixelShader(NiD3DPixelShader *pkPixelShader);
NiD3DVertexShader *__thiscall NiD3DShaderProgramCreatorAsm::CreateVertexShaderFromFile(NiD3DShaderProgramCreatorAsm *this, const char *pcFileName, const char *pcShaderName, const char *__formal, const char *__formal, IDirect3DVertexDeclaration9 *hDecl, unsigned int uiUsage, bool bSoftwareVP); // idb
NiD3DVertexShader *__thiscall NiD3DShaderProgramCreatorAsm::CreateVertexShaderFromBuffer(NiD3DShaderProgramCreatorAsm *this, const void *pvBuffer, unsigned int uiBufferSize, const char *pcShaderName, const char *__formal, const char *__formal, IDirect3DVertexDeclaration9 *hDecl, unsigned int uiUsage, bool bSoftwareVP); // idb
NiD3DPixelShader *__thiscall NiD3DShaderProgramCreatorAsm::CreatePixelShaderFromFile(NiD3DShaderProgramCreatorAsm *this, const char *pcFileName, const char *pcShaderName, const char *__formal, const char *__formal); // idb
NiD3DPixelShader *__thiscall NiD3DShaderProgramCreatorAsm::CreatePixelShaderFromBuffer(NiD3DShaderProgramCreatorAsm *this, const void *pvBuffer, unsigned int uiBufferSize, const char *pcShaderName, const char *__formal, const char *__formal); // idb
char __thiscall NiD3DShaderProgramCreatorAsm::LoadShaderCodeFromFile(NiD3DShaderProgramCreatorAsm *this, const char *pcFileName, void **pvCode, unsigned int *uiCodeSize, void **pvConstantData, unsigned int *uiConstantSize);
char __thiscall NiD3DShaderProgramCreatorAsm::LoadShaderCodeFromBuffer(NiD3DShaderProgramCreatorAsm *this, const void *pvBuffer, unsigned int uiBufferSize, void **pvCode, unsigned int *uiCodeSize, void **pvConstantData, unsigned int *uiConstantSize);
char __stdcall NiD3DShaderProgramCreatorObj::LoadShaderCodeFromFile(const char *pcFileName, void **pvCode, unsigned int *uiCodeSize, void **pvConstantData, unsigned int *uiConstantSize);
char __stdcall NiD3DShaderProgramCreatorObj::LoadShaderCodeFromBuffer(const void *pvBuffer, unsigned int uiBufferSize, void **pvCode, unsigned int *uiCodeSize, void **pvConstantData, unsigned int *uiConstantSize);
void __thiscall NiVBBlock::~NiVBBlock(NiVBBlock *this); // idb
unsigned int __thiscall NiVBBlock::FreeChip(NiVBBlock *this, unsigned int uiChipIndex); // idb
void __cdecl NiVBBlock::AllocateChips(); // idb
void __cdecl NiVBBlock::DeleteChips(); // idb
NiVBChip *__thiscall NiVBBlock::AllocateChip(NiVBBlock *this, unsigned int uiSize); // idb
void __thiscall NiGeometryGroup::NiGeometryGroup(NiGeometryGroup *this); // idb
void __thiscall NiGeometryGroup::~NiGeometryGroup(NiGeometryGroup *this); // idb
void __thiscall NiGeometryGroup::AddObject(NiGeometryGroup *this, NiGeometryBufferData *pkBuffData); // idb
void __thiscall NiGeometryGroup::RemoveObject(NiGeometryGroup *this, NiGeometryBufferData *pkBuffData); // idb
NiGeometryGroup *__thiscall NiGeometryGroup::`scalar deleting destructor'(NiGeometryGroup *this, unsigned int a2);
IDirect3DVertexBuffer9 *__thiscall NiVBDynamicSet::AllocateBufferSpace(NiVBDynamicSet *this, unsigned int uiSize, unsigned int *uiOffset, unsigned int *uiFlags, bool bForceDiscard, bool bSoftwareVP); // idb
IDirect3DVertexShader9 *__stdcall NiD3DShaderProgramCreator::CreateVertexShader(void *pvCode, IDirect3DVertexDeclaration9 **__formal, unsigned int a4, void *a5, unsigned int a6, bool a7);
IDirect3DPixelShader9 *__stdcall NiD3DShaderProgramCreator::CreatePixelShader(void *pvCode);
bool __stdcall NiD3DShaderProgram::SetPixelShaderConstantArray(NiD3DShaderConstantMapEntry *__formal, const void *__formala, unsigned int a4, unsigned int a5, unsigned __int16 *a6);
void __thiscall NiD3DShaderProgram::SetD3DRenderer(NiD3DShaderProgram *this, NiDX9Renderer *pkD3DRenderer); // idb
void __thiscall NiD3DShaderProgram::NiD3DShaderProgram(NiD3DShaderProgram *this, NiDX9Renderer *pkRenderer); // idb
void __thiscall NiD3DShaderProgram::~NiD3DShaderProgram(NiD3DShaderProgram *this); // idb
NiD3DShaderProgram *__thiscall NiD3DShaderProgram::`vector deleting destructor'(NiD3DShaderProgram *this, unsigned int a2);
void __thiscall NiD3DPixelShader::DestroyRendererData(NiD3DPixelShader *this); // idb
void __thiscall NiD3DPixelShader::RecreateRendererData(NiD3DPixelShader *this); // idb
void __thiscall NiD3DPixelShader::~NiD3DPixelShader(NiD3DPixelShader *this); // idb
char __thiscall NiD3DPixelShader::SetPixelShaderConstant(NiD3DPixelShader *this, NiD3DShaderConstantMapEntry *pkEntry, const void *pvDataSource, unsigned int uiRegisterCount);
char __thiscall NiD3DPixelShader::SetPixelShaderConstantArray(NiD3DPixelShader *this, NiD3DShaderConstantMapEntry *pkEntry, const void *pvDataSource, unsigned int uiNumEntries, unsigned int uiRegistersPerEntry, unsigned __int16 *pusReorderArray);
void __thiscall NiD3DVertexShader::DestroyRendererData(NiD3DVertexShader *this); // idb
void __thiscall NiD3DVertexShader::RecreateRendererData(NiD3DVertexShader *this); // idb
void __thiscall NiD3DVertexShader::~NiD3DVertexShader(NiD3DVertexShader *this); // idb
char __thiscall NiD3DVertexShader::SetVertexShaderConstant(NiD3DVertexShader *this, NiD3DShaderConstantMapEntry *pkEntry, const void *pvDataSource, unsigned int uiRegisterCount);
char __thiscall NiD3DVertexShader::SetVertexShaderConstantArray(NiD3DVertexShader *this, NiD3DShaderConstantMapEntry *pkEntry, const void *pvDataSource, unsigned int uiNumEntries, unsigned int uiRegistersPerEntry, unsigned __int16 *pusReorderArray);
void __thiscall NiD3DHLSLPixelShader::~NiD3DHLSLPixelShader(NiD3DHLSLPixelShader *this); // idb
void __thiscall NiD3DHLSLPixelShader::DestroyRendererData(NiD3DHLSLPixelShader *this); // idb
// bool __userpurge NiD3DHLSLPixelShader::SetPixelShaderConstant@<al>(NiD3DHLSLPixelShader *this@<ecx>, int a2@<ebp>, NiD3DShaderConstantMapEntry *pkEntry, const void *pvDataSource, unsigned int __formal);
// bool __userpurge NiD3DHLSLPixelShader::SetPixelShaderConstantArray@<al>(NiD3DHLSLPixelShader *this@<ecx>, int a2@<ebp>, NiD3DShaderConstantMapEntry *pkEntry, const void *pvDataSource, unsigned int uiNumEntries, unsigned int uiRegistersPerEntry, unsigned __int16 *pusReorderArray);
void __thiscall NiD3DHLSLVertexShader::~NiD3DHLSLVertexShader(NiD3DHLSLVertexShader *this); // idb
void __thiscall NiD3DHLSLVertexShader::DestroyRendererData(NiD3DHLSLVertexShader *this); // idb
// bool __userpurge NiD3DHLSLVertexShader::SetVertexShaderConstant@<al>(NiD3DHLSLVertexShader *this@<ecx>, int a2@<ebp>, NiD3DShaderConstantMapEntry *pkEntry, const void *pvDataSource, unsigned int __formal);
// bool __userpurge NiD3DHLSLVertexShader::SetVertexShaderConstantArray@<al>(NiD3DHLSLVertexShader *this@<ecx>, int a2@<ebp>, NiD3DShaderConstantMapEntry *pkEntry, const void *pvDataSource, unsigned int uiNumEntries, unsigned int uiRegistersPerEntry, unsigned __int16 *pusReorderArray);
// int __stdcall DirectInput8Create(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD); weak
// int __stdcall D3DXLoadSurfaceFromSurface(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD); weak
// int __stdcall D3DXCreateEffectCompilerFromFileA(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD); weak
// int __stdcall D3DXCreateEffectFromFileA(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD); weak
// int __thiscall D3DXMatrixMultiply(_DWORD, _DWORD, _DWORD, _DWORD); weak
// int __stdcall D3DXCreateTextureFromFileExA(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD); weak
// int __stdcall D3DXCreateVolumeTextureFromFileExA(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD); weak
// int __stdcall D3DXCreateCubeTextureFromFileExA(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD); weak
// int __stdcall D3DXMatrixInverse(_DWORD, _DWORD, _DWORD); weak
// int __stdcall D3DXGetShaderVersion(_DWORD); weak
// int __stdcall D3DXGetShaderInputSemantics(_DWORD, _DWORD, _DWORD); weak
// int __stdcall D3DXMatrixTranspose(_DWORD, _DWORD); weak
// int __thiscall D3DXVec4Transform(_DWORD, _DWORD, _DWORD, _DWORD); weak
// int __stdcall D3DXCreateVolumeTextureFromFileInMemory(_DWORD, _DWORD, _DWORD, _DWORD); weak
// int __stdcall D3DXCreateCubeTextureFromFileInMemory(_DWORD, _DWORD, _DWORD, _DWORD); weak
// int __stdcall D3DXCreateTextureFromFileInMemory(_DWORD, _DWORD, _DWORD, _DWORD); weak
// int __stdcall D3DXGetImageInfoFromFileInMemory(_DWORD, _DWORD, _DWORD); weak
// int __stdcall D3DXGetShaderConstantTable(_DWORD, _DWORD); weak
// int __stdcall D3DXCompileShaderFromFileA(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD); weak
// int __stdcall D3DXCompileShader(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD); weak
// int __stdcall D3DXGetVertexShaderProfile(_DWORD); weak
// int __stdcall D3DXGetPixelShaderProfile(_DWORD); weak
// int __stdcall D3DXAssembleShaderFromFileA(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD); weak
// int __stdcall D3DXAssembleShader(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD); weak
// int __stdcall WSAStartup(WORD wVersionRequested, LPWSADATA lpWSAData);
// int __stdcall WSACleanup();
// int __stdcall select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, const struct timeval *timeout);
// int __stdcall WSAGetLastError();
// int __stdcall setsockopt(SOCKET s, int level, int optname, const char *optval, int optlen);
// int __stdcall ioctlsocket(SOCKET s, __int32 cmd, u_long *argp);
// SOCKET __stdcall socket(int af, int type, int protocol);
// int __stdcall __WSAFDIsSet(SOCKET, fd_set *);
// int __stdcall connect(SOCKET s, const struct sockaddr *name, int namelen);
// u_short __stdcall htons(u_short hostshort);
// int __stdcall send(SOCKET s, const char *buf, int len, int flags);
// int __stdcall recv(SOCKET s, char *buf, int len, int flags);
char *__thiscall PacketEncrypt::pe_FromClientToServer(PacketEncrypt *this, char *buf, int len); // idb
// HIMC __stdcall ImmAssociateContext(HWND, HIMC);
// LONG __stdcall ImmGetCompositionStringA(HIMC, DWORD, LPVOID, DWORD);
// DWORD __stdcall ImmGetCandidateListA(HIMC, DWORD deIndex, LPCANDIDATELIST, DWORD dwBufLen);
void __cdecl png_set_sig_bytes(png_struct_def *png_ptr, int num_bytes); // idb
int __cdecl png_sig_cmp(char *sig, unsigned int start, unsigned int num_to_check); // idb
void *__cdecl png_zalloc(void *png_ptr, unsigned int items, unsigned int size); // idb
void __cdecl png_zfree(void *png_ptr, void *ptr); // idb
void __cdecl png_reset_crc(png_struct_def *png_ptr); // idb
void __cdecl png_calculate_crc(png_struct_def *png_ptr, char *ptr, unsigned int length); // idb
void __cdecl png_free_data(png_struct_def *png_ptr, png_info_struct *info_ptr, unsigned int mask, int num); // idb
void __cdecl png_info_destroy(png_struct_def *png_ptr, png_info_struct *info_ptr); // idb
void *__cdecl png_get_io_ptr(png_struct_def *png_ptr); // idb
int __cdecl png_handle_as_unknown(png_struct_def *png_ptr, char *chunk_name); // idb
void __cdecl png_init_mmx_flags(png_struct_def *png_ptr); // idb
png_struct_def *__cdecl png_create_info_struct(png_struct_def *png_ptr);
png_struct_def *__cdecl png_create_read_struct_2(const char *user_png_ver, void *error_ptr, void (__cdecl *error_fn)(png_struct_def *, const char *), void (__cdecl *warn_fn)(png_struct_def *, const char *), void *mem_ptr, void *(__cdecl *malloc_fn)(png_struct_def *, unsigned int), void (__cdecl *free_fn)(png_struct_def *, void *)); // idb
void __cdecl png_read_info(png_struct_def *png_ptr, png_info_struct *info_ptr); // idb
void __cdecl png_read_image(png_struct_def *png_ptr, char **image); // idb
void __cdecl png_read_end(png_struct_def *png_ptr, png_info_struct *info_ptr); // idb
void __cdecl png_read_destroy(png_struct_def *png_ptr, png_info_struct *info_ptr, png_info_struct *end_info_ptr); // idb
void __cdecl png_read_png(png_struct_def *png_ptr, png_info_struct *info_ptr, int transforms);
png_struct_def *__cdecl png_create_read_struct(const char *user_png_ver, void *error_ptr, void (__cdecl *error_fn)(png_struct_def *, const char *), void (__cdecl *warn_fn)(png_struct_def *, const char *)); // idb
void __cdecl png_destroy_read_struct(png_struct_def **png_ptr_ptr, png_info_struct **info_ptr_ptr, png_info_struct **end_info_ptr_ptr); // idb
void __cdecl png_read_data(png_struct_def *png_ptr, char *data, unsigned int length); // idb
void __cdecl png_default_read_data(png_struct_def *png_ptr, char *data, unsigned int length); // idb
void __cdecl png_set_read_fn(png_struct_def *png_ptr, void *io_ptr, void (__cdecl *read_data_fn)(png_struct_def *, char *, unsigned int)); // idb
// void __usercall png_format_buffer(png_struct_def *png_ptr@<edx>, char *buffer@<eax>, const char *error_message);
void __cdecl __noreturn png_default_error(png_struct_def *png_ptr, const char *error_message);
void __cdecl png_set_error_fn(png_struct_def *png_ptr, void *error_ptr, void (__cdecl *error_fn)(png_struct_def *, const char *), void (__cdecl *warning_fn)(png_struct_def *, const char *)); // idb
void __cdecl __noreturn png_error(png_struct_def *png_ptr, const char *error_message);
void __cdecl png_warning(png_struct_def *png_ptr, const char *warning_message); // idb
void __cdecl __noreturn png_chunk_error(png_struct_def *png_ptr, const char *error_message);
void __cdecl png_chunk_warning(png_struct_def *png_ptr, const char *warning_message); // idb
char *__cdecl png_create_struct_2(int type, void *(__cdecl *malloc_fn)(png_struct_def *, unsigned int), void *mem_ptr);
void __cdecl png_destroy_struct_2(void *struct_ptr, void (__cdecl *free_fn)(png_struct_def *, void *), void *mem_ptr); // idb
void __cdecl png_memcpy_check(png_struct_def *png_ptr, void *s1, void *s2, unsigned int length);
void __cdecl png_memset_check(png_struct_def *png_ptr, void *s1, int value, unsigned int length);
void __cdecl png_set_mem_fn(png_struct_def *png_ptr, void *mem_ptr, void *(__cdecl *malloc_fn)(png_struct_def *, unsigned int), void (__cdecl *free_fn)(png_struct_def *, void *)); // idb
void *__cdecl png_malloc(png_struct_def *png_ptr, unsigned int size); // idb
void __cdecl png_free(png_struct_def *png_ptr, void *ptr); // idb
void *__cdecl png_malloc_warn(png_struct_def *png_ptr, unsigned int size); // idb
int __cdecl png_get_uint_32(char *buf);
void __cdecl png_crc_read(png_struct_def *png_ptr, char *buf, unsigned int length); // idb
char *__cdecl png_decompress_chunk(png_struct_def *png_ptr, int comp_type, char *chunkdata, unsigned int chunklength, unsigned int prefix_size, unsigned int *newlength); // idb
void __cdecl png_check_chunk_name(png_struct_def *png_ptr, char *chunk_name); // idb
void __cdecl png_combine_row(png_struct_def *png_ptr, char *row, int mask); // idb
void __cdecl png_do_read_interlace(png_struct_def *png_ptr); // idb
void __cdecl png_read_filter_row(png_struct_def *png_ptr, png_row_info_struct *row_info, char *row, char *prev_row, int filter); // idb
void __cdecl png_read_start_row(png_struct_def *png_ptr); // idb
int __cdecl png_get_uint_31(png_struct_def *png_ptr, char *buf);
int __cdecl png_crc_finish(png_struct_def *png_ptr, unsigned int skip); // idb
void __cdecl png_handle_IHDR(png_struct_def *png_ptr, png_info_struct *info_ptr, unsigned int length); // idb
void __cdecl png_handle_PLTE(png_struct_def *png_ptr, png_info_struct *info_ptr, unsigned int length); // idb
void __cdecl png_handle_IEND(png_struct_def *png_ptr, png_info_struct *info_ptr, unsigned int length); // idb
void __cdecl png_handle_gAMA(png_struct_def *png_ptr, png_info_struct *info_ptr, unsigned int length); // idb
void __cdecl png_handle_sBIT(png_struct_def *png_ptr, png_info_struct *info_ptr, unsigned int length); // idb
void __cdecl png_handle_cHRM(png_struct_def *png_ptr, png_info_struct *info_ptr, unsigned int length); // idb
void __cdecl png_handle_sRGB(png_struct_def *png_ptr, png_info_struct *info_ptr, unsigned int length); // idb
void __cdecl png_handle_iCCP(png_struct_def *png_ptr, png_info_struct *info_ptr, unsigned int length); // idb
void __cdecl png_handle_sPLT(png_struct_def *png_ptr, png_info_struct *info_ptr, unsigned int length); // idb
void __cdecl png_handle_tRNS(png_struct_def *png_ptr, png_info_struct *info_ptr, unsigned int length); // idb
void __cdecl png_handle_bKGD(png_struct_def *png_ptr, png_info_struct *info_ptr, unsigned int length); // idb
void __cdecl png_handle_hIST(png_struct_def *png_ptr, png_info_struct *info_ptr, unsigned int length); // idb
void __cdecl png_handle_pHYs(png_struct_def *png_ptr, png_info_struct *info_ptr, unsigned int length); // idb
void __cdecl png_handle_oFFs(png_struct_def *png_ptr, png_info_struct *info_ptr, unsigned int length); // idb
void __cdecl png_handle_pCAL(png_struct_def *png_ptr, png_info_struct *info_ptr, unsigned int length); // idb
void __cdecl png_handle_sCAL(png_struct_def *png_ptr, png_info_struct *info_ptr, unsigned int length); // idb
void __cdecl png_handle_tIME(png_struct_def *png_ptr, png_info_struct *info_ptr, unsigned int length); // idb
void __cdecl png_handle_tEXt(png_struct_def *png_ptr, png_info_struct *info_ptr, unsigned int length); // idb
void __cdecl png_handle_zTXt(png_struct_def *png_ptr, png_info_struct *info_ptr, unsigned int length); // idb
void __cdecl png_handle_unknown(png_struct_def *png_ptr, png_info_struct *info_ptr, unsigned int length); // idb
void __cdecl png_read_finish_row(png_struct_def *png_ptr); // idb
void __cdecl png_set_strip_16(png_struct_def *png_ptr); // idb
void __cdecl png_set_strip_alpha(png_struct_def *png_ptr); // idb
void __cdecl png_set_expand(png_struct_def *png_ptr); // idb
void __cdecl png_read_transform_info(png_struct_def *png_ptr, png_info_struct *info_ptr); // idb
void __cdecl png_do_unpack(png_row_info_struct *row_info, char *row); // idb
void __cdecl png_do_unshift(png_row_info_struct *row_info, char *row, png_color_8_struct *sig_bits); // idb
void __cdecl png_do_chop(png_row_info_struct *row_info, char *row); // idb
void __cdecl png_do_read_swap_alpha(png_row_info_struct *row_info, char *row); // idb
void __cdecl png_do_read_invert_alpha(png_row_info_struct *row_info, char *row); // idb
void __cdecl png_do_read_filler(png_row_info_struct *row_info, char *row, unsigned int filler, unsigned int flags); // idb
void __cdecl png_do_gray_to_rgb(png_row_info_struct *row_info, char *row); // idb
int __cdecl png_do_rgb_to_gray(png_struct_def *png_ptr, png_row_info_struct *row_info, char *row); // idb
void __cdecl png_do_background(png_row_info_struct *row_info, char *row, png_color_16_struct *trans_values, png_color_16_struct *background, png_color_16_struct *background_1, char *gamma_table, char *gamma_from_1, char *gamma_to_1, unsigned __int16 **gamma_16, unsigned __int16 **gamma_16_from_1, unsigned __int16 **gamma_16_to_1, int gamma_shift); // idb
void __cdecl png_do_gamma(png_row_info_struct *row_info, char *row, char *gamma_table, unsigned __int16 **gamma_16_table, int gamma_shift); // idb
void __cdecl png_do_expand_palette(png_row_info_struct *row_info, char *row, png_color_struct *palette, char *trans, int num_trans); // idb
void __cdecl png_do_expand(png_row_info_struct *row_info, char *row, png_color_16_struct *trans_value); // idb
void __cdecl png_do_dither(png_row_info_struct *row_info, char *row, char *palette_lookup, char *dither_lookup); // idb
void __cdecl png_build_gamma_table(png_struct_def *png_ptr); // idb
void __cdecl png_do_read_intrapixel(png_row_info_struct *row_info, char *row); // idb
void __cdecl png_init_read_transformations(png_struct_def *png_ptr); // idb
void __cdecl png_do_read_transformations(png_struct_def *png_ptr); // idb
void __cdecl png_set_bgr(png_struct_def *png_ptr); // idb
void __cdecl png_set_swap(png_struct_def *png_ptr); // idb
void __cdecl png_set_packswap(png_struct_def *png_ptr); // idb
void __cdecl png_set_shift(png_struct_def *png_ptr, png_color_8_struct *true_bits); // idb
int __cdecl png_set_interlace_handling(png_struct_def *png_ptr); // idb
void __cdecl png_set_swap_alpha(png_struct_def *png_ptr); // idb
void __cdecl png_set_invert_alpha(png_struct_def *png_ptr); // idb
void __cdecl png_set_invert_mono(png_struct_def *png_ptr); // idb
void __cdecl png_do_invert(png_row_info_struct *row_info, char *row); // idb
void __cdecl png_do_swap(png_row_info_struct *row_info, char *row); // idb
void __cdecl png_do_packswap(png_row_info_struct *row_info, char *row); // idb
void __cdecl png_do_strip_filler(png_row_info_struct *row_info, char *row, unsigned int flags); // idb
void __cdecl png_do_bgr(png_row_info_struct *row_info, char *row); // idb
unsigned int __cdecl png_get_valid(png_struct_def *png_ptr, png_info_struct *info_ptr, unsigned int flag); // idb
unsigned int __cdecl png_get_rowbytes(png_struct_def *png_ptr, png_info_struct *info_ptr); // idb
signed int __cdecl png_get_sBIT(png_struct_def *png_ptr, png_info_struct *info_ptr, png_color_8_struct **sig_bit);
void __cdecl png_set_bKGD(png_struct_def *png_ptr, png_info_struct *info_ptr, png_color_16_struct *background); // idb
void __cdecl png_set_cHRM(png_struct_def *png_ptr, png_info_struct *info_ptr, long double white_x, long double white_y, long double red_x, long double red_y, long double green_x, long double green_y, long double blue_x, long double blue_y); // idb
void __cdecl png_set_cHRM_fixed(png_struct_def *png_ptr, png_info_struct *info_ptr, int white_x, int white_y, int red_x, int red_y, int green_x, int green_y, int blue_x, int blue_y); // idb
void __cdecl png_set_gAMA(png_struct_def *png_ptr, png_info_struct *info_ptr, long double file_gamma); // idb
void __cdecl png_set_gAMA_fixed(png_struct_def *png_ptr, png_info_struct *info_ptr, int int_gamma); // idb
void __cdecl png_set_hIST(png_struct_def *png_ptr, png_info_struct *info_ptr, unsigned __int16 *hist); // idb
void __cdecl png_set_IHDR(png_struct_def *png_ptr, png_info_struct *info_ptr, unsigned int width, unsigned int height, int bit_depth, int color_type, int interlace_type, int compression_type, int filter_type); // idb
void __cdecl png_set_oFFs(png_struct_def *png_ptr, png_info_struct *info_ptr, int offset_x, int offset_y, int unit_type); // idb
void __cdecl png_set_pCAL(png_struct_def *png_ptr, png_info_struct *info_ptr, char *purpose, int X0, int X1, int type, int nparams, char *units, char **params); // idb
void __cdecl png_set_sCAL(png_struct_def *png_ptr, png_info_struct *info_ptr, int unit, long double width, long double height); // idb
void __cdecl png_set_pHYs(png_struct_def *png_ptr, png_info_struct *info_ptr, unsigned int res_x, unsigned int res_y, int unit_type); // idb
void __cdecl png_set_PLTE(png_struct_def *png_ptr, png_info_struct *info_ptr, png_color_struct *palette, int num_palette); // idb
void __cdecl png_set_sBIT(png_struct_def *png_ptr, png_info_struct *info_ptr, png_color_8_struct *sig_bit); // idb
void __cdecl png_set_sRGB_gAMA_and_cHRM(png_struct_def *png_ptr, png_info_struct *info_ptr, int intent); // idb
void __cdecl png_set_iCCP(png_struct_def *png_ptr, png_info_struct *info_ptr, char *name, int compression_type, char *profile, unsigned int proflen); // idb
int __cdecl png_set_text_2(png_struct_def *png_ptr, png_info_struct *info_ptr, png_text_struct *text_ptr, int num_text); // idb
void __cdecl png_set_tIME(png_struct_def *png_ptr, png_info_struct *info_ptr, png_time_struct *mod_time); // idb
void __cdecl png_set_tRNS(png_struct_def *png_ptr, png_info_struct *info_ptr, char *trans, int num_trans, png_color_16_struct *trans_values); // idb
void __cdecl png_set_sPLT(png_struct_def *png_ptr, png_info_struct *info_ptr, png_sPLT_struct *entries, int nentries); // idb
void __cdecl png_set_unknown_chunks(png_struct_def *png_ptr, png_info_struct *info_ptr, png_unknown_chunk_t *unknowns, int num_unknowns); // idb
// char *__cdecl strtok_s(char *_String, const char *_Control, char **_Context); idb
// int __cdecl _splitpath_s(const char *_Path, char *_Drive, unsigned int _DriveSize, char *_Dir, unsigned int _DirSize, char *_Filename, unsigned int _FilenameSize, char *_Ext, unsigned int _ExtSize); idb
// void __cdecl _makepath(char *path, const char *drive, const char *dir, const char *fname, const char *ext); idb
// void *__cdecl operator new[](unsigned int count, std::nothrow_t *x); idb
void __cdecl NiDrawableBV::CreateFromHalfSpaceBV(NiHalfSpaceBV *pkHalfSpaceBV, const float fMult, NiAVObject *pkObject);
void __cdecl NiDrawableBV::CreateFromBox(NiBox *kBox, const float fMult);
void __cdecl NiDrawableBV::CreateFromSphere(NiSphere *kSphere, const float fMult);
void __cdecl NiDrawableBV::CreateFromCapsule(NiCapsule *kCapsule, const float fMult);
void __cdecl NiDrawableBV::CreateFromUnion(NiUnionBV *pkUnion, NiNode *pkParent, const float fMult); // idb
NiNode *__cdecl NiDrawableBV::CreateWireframeBV(NiBoundingVolume *pkBound, NiColor *kColor, const float fMult, NiAVObject *pkObject); // idb
char __thiscall NiDevImageConverter::IsASupportedMipmapGenerationFormat(NiDevImageConverter *this, NiPixelFormat *kSrcFmt);
void __cdecl NiDevImageConverter::ConvertRGBA16ToBGRA16(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc, NiDevImageConverter::PixelBits *kSrcBits); // idb
void __cdecl NiDevImageConverter::ConvertBGRA16ToRGBA16(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc, NiDevImageConverter::PixelBits *kSrcBits); // idb
void __cdecl NiDevImageConverter::ConvertRGB24To16(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc);
void __cdecl NiDevImageConverter::ConvertRGB24To24(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc);
void __cdecl NiDevImageConverter::ConvertRGB24To32(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc);
void __cdecl NiDevImageConverter::ConvertRGBA32To16(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc);
void __cdecl NiDevImageConverter::ConvertRGBA32To24(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc);
void __cdecl NiDevImageConverter::ConvertRGBA32To32(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc);
void __cdecl NiDevImageConverter::Convert16ToRGB24(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc, NiDevImageConverter::PixelBits *kSrcBits); // idb
void __cdecl NiDevImageConverter::Convert16AlphaToRGBA32(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc, NiDevImageConverter::PixelBits *kSrcBits); // idb
void __cdecl NiDevImageConverter::Convert16NoAlphaToRGBA32(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc, NiDevImageConverter::PixelBits *kSrcBits); // idb
void __cdecl NiDevImageConverter::Convert24ToRGB24(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc, NiDevImageConverter::PixelBits *kSrcBits); // idb
void __cdecl NiDevImageConverter::Convert24ToRGBA32(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc, NiDevImageConverter::PixelBits *kSrcBits); // idb
void __cdecl NiDevImageConverter::Convert32ToRGB24(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc, NiDevImageConverter::PixelBits *kSrcBits); // idb
void __cdecl NiDevImageConverter::Convert32AlphaToRGBA32(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc, NiDevImageConverter::PixelBits *kSrcBits); // idb
void __cdecl NiDevImageConverter::Convert32NoAlphaToRGBA32(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc, NiDevImageConverter::PixelBits *kSrcBits); // idb
void __cdecl NiDevImageConverter::ConvertBUMPLUMA32To32(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc);
void __cdecl NiDevImageConverter::ConvertBUMPLUMA32To16(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc);
void __cdecl NiDevImageConverter::ConvertBUMP16To32(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc);
void __cdecl NiDevImageConverter::ConvertBUMP16To16(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc);
void __thiscall NiDevImageConverter::PixelBits::PixelBits(NiDevImageConverter::PixelBits *this, NiPixelFormat *kFmt); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,NiImageReader *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiImageReader *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiImageReader *> *this, unsigned int a2);
char __thiscall NiDevImageConverter::CanReadImageFile(NiDevImageConverter *this, const char *pcFilename);
char __thiscall NiDevImageConverter::ReadImageFileInfo(NiDevImageConverter *this, const char *pcFilename, NiPixelFormat *kFmt, bool *bMipmap, unsigned int *uiWidth, unsigned int *uiHeight, unsigned int *uiNumFaces);
NiPixelData *__thiscall NiDevImageConverter::ReadImageFile(NiDevImageConverter *this, const char *pcFilename, NiPixelData *pkOptDest); // idb
char __stdcall NiDevImageConverter::CanConvertPixelData(NiPixelFormat *kSrcFmt, NiPixelFormat *kDestFmt);
char __stdcall NiDevImageConverter::IsAnAlphaSupportedMipmapGenerationFormat(NiPixelFormat *kSrcFmt);
char __stdcall NiDevImageConverter::IsANonAlphaSupportedMipmapGenerationFormat(NiPixelFormat *kSrcFmt);
NiPixelData *__thiscall NiDevImageConverter::GenerateMipmapLevels(NiDevImageConverter *this, NiPixelData *pkSrc, NiPixelData *pkOptDest); // idb
NiPixelData *__thiscall NiDevImageConverter::ConvertForPlatform(NiDevImageConverter *this, NiDevImageConverter::Platform ePlatform, NiTexture::FormatPrefs *kPrefs, NiPixelData *pkSrc, NiPixelFormat *kDesiredFormat); // idb
NiPixelFormat *__thiscall NiDevImageConverter::FindClosestPixelFormat(NiDevImageConverter *this, NiDevImageConverter::Platform ePlatform, NiTexture::FormatPrefs *kFmtPrefs, NiPixelFormat *kSrcFmt, NiPixelFormat *kDesiredFmt); // idb
NiPixelFormat *__stdcall NiDevImageConverter::FindClosestPixelFormatXenon(NiTexture::FormatPrefs *kFmtPrefs, NiPixelFormat *kSrcFmt, NiPixelFormat *kDesiredFmt);
NiPixelData *__stdcall NiDevImageConverter::GenerateBumpMap(NiPixelData *kSrc, NiPixelFormat *kDestFmt);
void __cdecl NiDevImageConverter::ConvertPALA4To24(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc);
void __cdecl NiDevImageConverter::ConvertPAL4To32(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc);
void __cdecl NiDevImageConverter::ConvertPALA4To32(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc);
void __cdecl NiDevImageConverter::ConvertPAL8To16(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc);
void __cdecl NiDevImageConverter::ConvertPAL8To32(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc);
void __cdecl NiDevImageConverter::ConvertPALA8To16(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc);
void __cdecl NiDevImageConverter::ConvertPALA8To24(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc);
void __cdecl NiDevImageConverter::ConvertPALA8To32(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiDestSize, char *pucDest, NiPalette *pkSrcPal, NiDevImageConverter::PixelBits *kDestBits, const char *pucSrc);
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiImageReader *>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiImageReader *>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiImageReader *> *this); // idb
NiTPointerList<NiImageReader *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiImageReader *>::`scalar deleting destructor'(NiTPointerList<NiImageReader *> *this, unsigned int a2);
void __thiscall NiDevImageConverter::~NiDevImageConverter(NiDevImageConverter *this); // idb
NiTPointerList<NiImageReader *> *__thiscall NiDevImageConverter::GetImageReaderList(NiDevImageConverter *this); // idb
void __thiscall NiDevImageConverter::AddReader(NiDevImageConverter *this, NiImageReader *pkReader); // idb
NiPixelData *__thiscall NiDevImageConverter::ConvertPixelData(NiDevImageConverter *this, NiPixelData *kSrc, NiPixelFormat *kDestFmt, NiPixelData *pkOptDest, bool bMipmap); // idb
bool __stdcall NiDevImageConverter::ConvertPixelDataFormat(NiPixelData *kDest, NiPixelData *kSrc, int iMipmapLevel);
NiD3DPass *__thiscall NiDevImageConverter::GenerateMipmapPyramidFromFiles(NiDevImageConverter *this, const char **apcFilenames, unsigned int uiNumLevels, NiPixelData *pkSrc);
void __thiscall NiDevImageConverter::NiDevImageConverter(NiDevImageConverter *this); // idb
NiDevImageConverter *__thiscall NiDevImageConverter::`scalar deleting destructor'(NiDevImageConverter *this, unsigned int a2);
void __thiscall NiTArray<NiPointer<NiShaderDesc>>::~NiTArray<NiPointer<NiShaderDesc>>(NiTArray<NiPointer<NiShaderDesc> > *this); // idb
NiTArray<NiPointer<NiShaderDesc> > *__thiscall NiTArray<NiPointer<NiShaderDesc>>::`vector deleting destructor'(NiTArray<NiPointer<NiShaderDesc> > *this, unsigned int a2);
void __thiscall NiShaderLibraryDesc::NiShaderLibraryDesc(NiShaderLibraryDesc *this); // idb
void __thiscall NiShaderLibraryDesc::~NiShaderLibraryDesc(NiShaderLibraryDesc *this); // idb
NiShaderLibraryDesc *__thiscall NiShaderLibraryDesc::`scalar deleting destructor'(NiShaderLibraryDesc *this, unsigned int a2);
char __thiscall NiShaderLibraryDesc::AddShaderDesc(NiShaderLibraryDesc *this, NiShaderDesc *pkDesc);
void __thiscall NiShaderDesc::SetNumberOfImplementations(NiShaderDesc *this, unsigned int uiCount); // idb
NiTArray<NiShaderRequirementDesc *> *__thiscall NiTArray<NiShaderRequirementDesc *>::`scalar deleting destructor'(NiTArray<NiShaderRequirementDesc *> *this, unsigned int a2);
NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiShaderAttributeDesc> > *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiShaderAttributeDesc>>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiShaderAttributeDesc> > *this, unsigned int a2);
NiShaderAttributeDesc *__thiscall NiShaderDesc::GetAttribute(NiShaderDesc *this, const char *pcName); // idb
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiShaderAttributeDesc>>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiShaderAttributeDesc>>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiShaderAttributeDesc> > *this); // idb
NiTPointerList<NiPointer<NiShaderAttributeDesc> > *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiShaderAttributeDesc>>::`scalar deleting destructor'(NiTPointerList<NiPointer<NiShaderAttributeDesc> > *this, unsigned int a2);
void __thiscall NiShaderDesc::~NiShaderDesc(NiShaderDesc *this); // idb
void __thiscall NiShaderDesc::SetImplementationDescription(NiShaderDesc *this, unsigned int uiImplementation, NiShaderRequirementDesc *pkReqDesc); // idb
void __thiscall NiShaderDesc::NiShaderDesc(NiShaderDesc *this); // idb
NiShaderDesc *__thiscall NiShaderDesc::`vector deleting destructor'(NiShaderDesc *this, unsigned int a2);
void __thiscall NiShaderDesc::AddAttribute(NiShaderDesc *this, NiShaderAttributeDesc *pkAttribute); // idb
void __thiscall NiShaderRequirementDesc::NiShaderRequirementDesc(NiShaderRequirementDesc *this); // idb
void __thiscall NiShaderRequirementDesc::~NiShaderRequirementDesc(NiShaderRequirementDesc *this); // idb
IDirect3DPixelShader9 *__thiscall NiShaderRequirementDesc::GetPlatformFlags(NiD3DPixelShader *this); // idb
bool __thiscall NiShaderRequirementDesc::IsPlatformDX9(NiShaderRequirementDesc *this); // idb
bool __thiscall NiShaderRequirementDesc::IsPlatformXenon(NiShaderRequirementDesc *this); // idb
bool __thiscall NiDX9ShaderDeclaration::GetSoftwareVertexProcessing(NiDX9ShaderDeclaration *this); // idb
bool __thiscall NiShaderRequirementDesc::GetSoftwareVPRequired(NiShaderRequirementDesc *this); // idb
void __thiscall NiShaderRequirementDesc::AddPixelShaderVersion(NiShaderRequirementDesc *this, unsigned int uiVersion); // idb
void __thiscall NiShaderRequirementDesc::AddVertexShaderVersion(NiShaderRequirementDesc *this, unsigned int uiVersion); // idb
void __thiscall NiShaderRequirementDesc::AddUserDefinedVersion(NiShaderRequirementDesc *this, unsigned int uiVersion); // idb
void __thiscall NiShaderRequirementDesc::AddPlatformFlags(NiShaderRequirementDesc *this, unsigned int uiPlatformFlags); // idb
void __thiscall NiShaderRequirementDesc::RemovePlatformFlags(NiShaderRequirementDesc *this, unsigned int uiPlatformFlags); // idb
void __thiscall NiShaderRequirementDesc::SetPlatformDX9(NiShaderRequirementDesc *this, bool bAllowed); // idb
void __thiscall NiShaderRequirementDesc::SetPlatformXenon(NiShaderRequirementDesc *this, bool bAllowed); // idb
void __thiscall NiD3DVertexShader::SetShaderHandle(NiD3DVertexShader *this, IDirect3DVertexShader9 *hShader); // idb
void __thiscall NiShaderRequirementDesc::SetSoftwareVPAcceptable(NiDX9ShaderDeclaration *this, bool bSoftwareVB); // idb
void __thiscall NiShaderRequirementDesc::SetSoftwareVPRequired(NiShaderRequirementDesc *this, bool bSoftwareVP); // idb
NiShaderRequirementDesc *__thiscall NiShaderRequirementDesc::`vector deleting destructor'(NiShaderRequirementDesc *this, unsigned int a2);
void __thiscall NiShaderAttributeDesc::NiShaderAttributeDesc(NiShaderAttributeDesc *this); // idb
void __thiscall NiShaderAttributeDesc::~NiShaderAttributeDesc(NiShaderAttributeDesc *this); // idb
char __thiscall NiShaderAttributeDesc::GetValue_Bool(NiShaderAttributeDesc *this, bool *bValue);
char __thiscall NiShaderAttributeDesc::GetValue_String(NiShaderAttributeDesc *this, const char **pcValue);
char __thiscall NiShaderAttributeDesc::GetValue_UnsignedInt(NiShaderAttributeDesc *this, unsigned int *uiValue);
char __thiscall NiShaderAttributeDesc::GetValue_Float(NiShaderAttributeDesc *this, float *fValue);
char __thiscall NiShaderAttributeDesc::GetValue_Point2(NiShaderAttributeDesc *this, NiPoint2 *kPt2Value);
char __thiscall NiShaderAttributeDesc::GetValue_Point3(NiShaderAttributeDesc *this, NiPoint3 *kPtValue);
char __thiscall NiShaderAttributeDesc::GetValue_Point4(NiShaderAttributeDesc *this, float **pafValue);
char __thiscall NiShaderAttributeDesc::GetValue_ColorA(NiShaderAttributeDesc *this, NiColorA *kClrValue);
void __thiscall NiShaderAttributeDesc::SetType(NiShaderAttributeDesc *this, NiShaderAttributeDesc::AttributeType eType); // idb
void __thiscall NiShaderAttributeDesc::SetValue_Bool(NiShaderAttributeDesc *this, bool bValue); // idb
void __thiscall NiShaderAttributeDesc::SetValue_UnsignedInt(NiShaderAttributeDesc *this, unsigned int uiValue); // idb
void __thiscall NiShaderAttributeDesc::SetValue_Float(NiShaderAttributeDesc *this, float fValue); // idb
void __thiscall NiShaderAttributeDesc::SetValue_Point2(NiShaderAttributeDesc *this, NiPoint2 *kPt2Value); // idb
void __thiscall NiShaderAttributeDesc::SetValue_Point3(NiShaderAttributeDesc *this, NiPoint3 *kPtValue); // idb
void __thiscall NiShaderAttributeDesc::SetValue_Color(NiShaderAttributeDesc *this, NiColor *kClrValue); // idb
void __thiscall NiShaderAttributeDesc::SetValue_ColorA(NiShaderAttributeDesc *this, NiColorA *kClrValue); // idb
void __thiscall NiShaderAttributeDesc::SetHidden(NiShaderAttributeDesc *this, bool bHide); // idb
void __thiscall NiShaderAttributeDesc::SetRanged(NiShaderAttributeDesc *this, bool bRanged); // idb
char __thiscall NiShaderAttributeDesc::SetRange_UnsignedInt(NiShaderAttributeDesc *this, unsigned int uiLow, unsigned int uiHigh);
char __thiscall NiShaderAttributeDesc::SetRange_Float(NiShaderAttributeDesc *this, float fLow, float fHigh);
char __thiscall NiShaderAttributeDesc::SetRange_Point2(NiShaderAttributeDesc *this, NiPoint2 *kPt2Low, NiPoint2 *kPt2High);
char __thiscall NiShaderAttributeDesc::SetRange_Point3(NiShaderAttributeDesc *this, NiPoint3 *kPtLow, NiPoint3 *kPtHigh);
char __thiscall NiShaderAttributeDesc::SetRange_Point4(NiShaderAttributeDesc *this, float *pafLow, float *pafHigh);
char __thiscall NiShaderAttributeDesc::SetRange_Color(NiShaderAttributeDesc *this, NiColor *kClrLow, NiColor *kClrHigh);
char __thiscall NiShaderAttributeDesc::SetRange_ColorA(NiShaderAttributeDesc *this, NiColorA *kClrLow, NiColorA *kClrHigh);
NiShaderAttributeDesc *__thiscall NiShaderAttributeDesc::`vector deleting destructor'(NiShaderAttributeDesc *this, unsigned int a2);
char __thiscall NiShaderAttributeDesc::GetValue_Matrix3(NiShaderAttributeDesc *this, NiMatrix3 *kMatValue);
char __thiscall NiShaderAttributeDesc::GetValue_Matrix4(NiShaderAttributeDesc *this, float **pafValue, unsigned int uiSizeBytes);
void __thiscall NiShaderAttributeDesc::SetValue_String(NiShaderAttributeDesc *this, const char *pcValue); // idb
void __thiscall NiShaderAttributeDesc::SetValue_Point4(NiShaderAttributeDesc *this, float *pafValue); // idb
void __thiscall NiShaderAttributeDesc::SetValue_Matrix3(NiShaderAttributeDesc *this, NiMatrix3 *kMatValue); // idb
void __thiscall NiShaderAttributeDesc::SetValue_Matrix4(NiShaderAttributeDesc *this, float *pafValue); // idb
void __thiscall NiShaderAttributeDesc::SetValue_Texture(NiShaderAttributeDesc *this, unsigned int uiValue, const char *pcValue); // idb
void __thiscall NiShaderAttributeDesc::SetValue_Array(NiShaderAttributeDesc *this, void *pValue, NiShaderAttributeDesc::AttributeType eSubType, unsigned int uiElementSize, unsigned int uiNumElements); // idb
char __thiscall NiShaderAttributeDesc::SetRange_Array(NiShaderAttributeDesc *this, unsigned int uiElementSize, unsigned int uiNumElements, void *pLow, void *pHigh);
NiShaderAttributeDesc *__thiscall NiShaderAttributeDesc::operator=(NiShaderAttributeDesc *this, NiShaderAttributeDesc *kSrcDesc); // idb
void __thiscall NiSCMExtraData::NiSCMExtraData(NiSCMExtraData *this, const char *pcName, unsigned int uiNumVertexEntries, unsigned int uiNumPixelEntries); // idb
NiRTTI *NiSCMExtraData::GetRTTI();
NiSCMExtraData *__thiscall NiSCMExtraData::`vector deleting destructor'(NiSCMExtraData *this, unsigned int a2);
void __thiscall NiTextureCodec::DecodeT3AlphaBlock(NiTextureCodec *this, char *pucAlphas); // idb
void __thiscall NiTextureCodec::DecodeT5AlphaBlock(NiTextureCodec *this, char *pucAlphas); // idb
void __thiscall NiTextureCodec::DecodeColorBlock(NiTextureCodec *this, char *pucDest); // idb
void __thiscall NiTextureCodec::DecodeColorAlphaBlock(NiTextureCodec *this, char *pucDest); // idb
void __thiscall NiTextureCodec::NiTextureCodec(NiTextureCodec *this); // idb
NiPixelData *__thiscall NiTextureCodec::ExpandCompressedData(NiTextureCodec *this, NiPixelData *kSrc); // idb
void __thiscall NiTGAReader::Unpack4BitSourceRowPal(NiTGAReader *this, char *pucSrc, char *pucDest); // idb
void __thiscall NiTGAReader::Unpack8BitSourceRowPal(NiTGAReader *this, char *pucSrc, char *pucDest); // idb
void __thiscall NiTGAReader::Unpack8BitSourceRowGray(NiTGAReader *this, char *pucSrc, char *pucDest); // idb
void __thiscall NiTGAReader::Unpack16BitSourceRowRGB(NiTGAReader *this, char *pucSrc, char *pucDest); // idb
void __thiscall NiTGAReader::Unpack16BitSourceRowIndexed(NiTGAReader *this, char *pucSrc, char *pucDest); // idb
void __thiscall NiTGAReader::Unpack16BitSourceRowIndexedAlpha(NiTGAReader *this, char *pucSrc, char *pucDest); // idb
void __thiscall NiTGAReader::Unpack24BitSourceRow(NiTGAReader *this, char *pucSrc, char *pucDest); // idb
void __thiscall NiTGAReader::Unpack32BitSourceRow(NiTGAReader *this, char *pucSrc, char *pucDest); // idb
bool __stdcall NiTGAReader::CanReadFile(const char *pcFileExtension);
void __thiscall NiTGAReader::NiTGAReader(NiTGAReader *this); // idb
NiTGAReader *__thiscall NiTGAReader::`scalar deleting destructor'(NiTGAReader *this, unsigned int a2);
void __thiscall NiTGAReader::LoadRLERow(NiTGAReader *this, NiFile *kIst, char *pucDest, unsigned int uiDestSize); // idb
void __thiscall NiTGAReader::GetColormap(NiTGAReader *this, NiFile *kIst); // idb
char __thiscall NiTGAReader::ReadHeader(NiTGAReader *this, NiFile *kIst, unsigned int *uiWidth, unsigned int *uiHeight, NiPixelFormat *kFormat, bool *bMipmap, unsigned int *uiFaces);
NiPixelData *__thiscall NiTGAReader::ReadFile(NiTGAReader *this, NiFile *kIst, NiPixelData *pkOptDest); // idb
void __thiscall NiSGIReader::ProcessRLERowByte(NiSGIReader *this, char *pucOutputImageData, char *pucInputImageData, int iImageStep); // idb
void __thiscall NiSGIReader::ProcessRLERowWord(NiSGIReader *this, char *pucOutputImageData, char *pucInputImageData, int iImageStep); // idb
bool __stdcall NiSGIReader::CanReadFile(const char *pcFileExtension);
void __thiscall NiSGIReader::NiSGIReader(NiSGIReader *this); // idb
// char __userpurge NiSGIReader::ReadHeader@<al>(NiSGIReader *this@<ecx>, int a2@<ebx>, NiFile *kIst, unsigned int *uiWidth, unsigned int *uiHeight, NiPixelFormat *kFormat, bool *bMipmap, unsigned int *uiFaces);
NiPixelData *__thiscall NiSGIReader::ReadFile(NiSGIReader *this, NiFile *kIst, NiPixelData *pkOptDest); // idb
bool __stdcall NiDDSReader::CanReadFile(const char *pcFileExtension);
NiPixelFormat *__stdcall NiDDSReader::ComputeFinalFormat(NiPixelFormat *result, NiPixelFormat kSrcFormat);
void __thiscall NiDDSReader::NiDDSReader(NiDDSReader *this); // idb
char __thiscall NiDDSReader::ReadHeader(NiDDSReader *this, NiFile *kIst, unsigned int *uiWidth, unsigned int *uiHeight, NiPixelFormat *kFormat, bool *bMipmap, unsigned int *uiFaces);
void __cdecl NiDDSReader::Read24Bit(NiFile *kIst, NiPixelData *pkDest, NiPixelFormat kSrcFmt, NiPixelFormat kDestFmt, unsigned int uiMipMapIdx, unsigned int uiFaceIdx); // idb
void __cdecl NiDDSReader::Read32Bit(NiFile *kIst, NiPixelData *pkDest, NiPixelFormat kSrcFmt, NiPixelFormat kDestFmt, unsigned int uiMipMapIdx, unsigned int uiFaceIdx); // idb
void __cdecl NiDDSReader::Read16Bit(NiFile *kIst, NiPixelData *pkDest, NiPixelFormat kSrcFmt, NiPixelFormat kDestFmt, unsigned int uiMipMapIdx, unsigned int uiFaceIdx); // idb
NiPixelData *__thiscall NiDDSReader::ReadFile(NiDDSReader *this, NiFile *kIst, NiPixelData *pkOptDest); // idb
bool __stdcall NiBMPReader::CanReadFile(const char *pcFileExtension);
void __thiscall NiBMPReader::NiBMPReader(NiBMPReader *this); // idb
// char __userpurge NiBMPReader::ReadHeader@<al>(NiBMPReader *this@<ecx>, int a2@<edi>, NiFile *kIst, unsigned int *uiWidth, unsigned int *uiHeight, NiPixelFormat *kFormat, bool *bMipmap, unsigned int *uiFaces);
NiPixelData *__thiscall NiBMPReader::ReadFile(NiBMPReader *this, NiFile *kIst, NiPixelData *pkOptDest); // idb
void __thiscall NiShaderDescBase::NiShaderDescBase(NiShaderDescBase *this); // idb
void __thiscall NiShaderDescBase::~NiShaderDescBase(NiShaderDescBase *this); // idb
void __thiscall NiShaderDescBase::SetName(NiShaderDescBase *this, const char *pcName); // idb
void __thiscall NiShaderDescBase::SetDescription(NiShaderDescBase *this, const char *pcDesc); // idb
NiShaderDescBase *__thiscall NiShaderDescBase::`scalar deleting destructor'(NiShaderDescBase *this, unsigned int a2);
int MSS_auto_cleanup();
void __cdecl func(); // idb
int __thiscall NiCursor::Show(NiCursor *this, bool bShow); // idb
char __thiscall NiCursor::SetPosition(NiCursor *this, float fTime, int iScreenSpaceX, int iScreenSpaceY);
char __thiscall NiCursor::Move(NiCursor *this, float fTime, int iDeltaX, int iDeltaY);
// char __usercall NiCursor::UpdateScreenGeometry@<al>(NiCursor *this@<ecx>, int a2@<edi>);
void __thiscall NiCursor::NiCursor(NiCursor *this, NiRenderer *pkRenderer); // idb
NiRTTI *NiCursor::GetRTTI();
void __thiscall NiCursor::~NiCursor(NiCursor *this); // idb
void __thiscall NiCursor::Draw(NiCursor *this); // idb
NiCursor *__thiscall NiCursor::`vector deleting destructor'(NiCursor *this, unsigned int a2);
// char __userpurge NiCursor::SetImage@<al>(NiCursor *this@<ecx>, int a2@<esi>, const char *pacImageFile);
void __thiscall NiCursor::GetViewerStrings(NiCursor *this, NiTArray<char *> *pStrings); // idb
void __cdecl NSBUtility::SetRenderer(NiDX9Renderer *pkRenderer); // idb
bool __cdecl NSBUtility::SaveBinaryStateGroup(NiBinaryStream *kStream, NSBStateGroup *pkStateGroup); // idb
char __cdecl NSBUtility::SaveBinaryConstantMap(NiBinaryStream *kStream, NSBConstantMap *pkMap);
char __cdecl NSBUtility::LoadBinaryStateGroup(NiBinaryStream *kStream, NSBStateGroup **pkStateGroup);
// char __usercall NSBUtility::LoadBinaryConstantMap@<al>(int a1@<edi>, NiBinaryStream *kStream, NSBConstantMap **pkMap);
NiBinaryShader *__cdecl NSBShader::DefaultCreateNiBinaryShader(const char *pcClassName); // idb
void __thiscall NSBShader::SetDescription(NSBShader *this, const char *pcDescription); // idb
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBImplementation *>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBImplementation *>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBImplementation *> *this); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,NSBImplementation *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NSBImplementation *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NSBImplementation *> *this, unsigned int a2);
NiTListBase<NiTPointerAllocator<unsigned int>,NSBObjectTable::ObjectDesc *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NSBObjectTable::ObjectDesc *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NSBObjectTable::ObjectDesc *> *this, unsigned int a2);
NiTArray<NSBImplementation *> *__thiscall NiTArray<NSBImplementation *>::`vector deleting destructor'(NiTArray<NSBImplementation *> *this, unsigned int a2);
NSBPackingDef *__thiscall NSBShader::GetPackingDef(NSBShader *this, const char *pcName, bool bCreate); // idb
NSBImplementation *__thiscall NSBShader::GetImplementationByName(NSBShader *this, const char *pcName); // idb
bool __thiscall NSBShader::RegisterTextureStageGlobals(NSBShader *this, NiDX9Renderer *pkRenderer, NSBImplementation *pkImplementation); // idb
char __thiscall NSBShader::ReleaseTextureStageGlobals(NSBShader *this, NiDX9Renderer *pkRenderer, NSBImplementation *pkImplementation);
NiTPointerList<NSBImplementation *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBImplementation *>::`vector deleting destructor'(NiTPointerList<NSBImplementation *> *this, unsigned int a2);
void __stdcall NSBShader::SetupVersionInfo(NiDX9Renderer *pkRenderer, NSBShader::VersionInfo *kVersionInfo);
signed int __stdcall NSBShader::IsImplementationValid(NSBImplementation *pkImplementation, NSBShader::VersionInfo *kVersionInfo);
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBObjectTable::ObjectDesc *>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBObjectTable::ObjectDesc *>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBObjectTable::ObjectDesc *> *this); // idb
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NSBPackingDef *>,NSBPackingDef *>::~NiTStringTemplateMap<NiTPointerMap<char const *,NSBPackingDef *>,NSBPackingDef *>(NiTStringTemplateMap<NiTPointerMap<char const *,NSBPackingDef *>,NSBPackingDef *> *this); // idb
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPSysModifier *>,NiPSysModifier *>::SetValue(NiTStringTemplateMap<NiTPointerMap<char const *,NiD3DShaderProgramCreator *>,NiD3DShaderProgramCreator *> *this, NiTMapItem<char const *,NiD3DShaderProgramCreator *> *pkItem, const char *pcKey, NiD3DShaderProgramCreator *val); // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NSBPackingDef *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NSBPackingDef *>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NSBPackingDef *> *this, unsigned int a2);
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<char const *,NSBPackingDef *>::`vector deleting destructor'(NiTPointerMap<char const *,NSBPackingDef *> *this, unsigned int a2);
NiTStringPointerMap<NSBPackingDef *> *__thiscall NiTStringPointerMap<NSBPackingDef *>::`vector deleting destructor'(NiTStringPointerMap<NSBPackingDef *> *this, unsigned int a2);
NiTPointerList<NSBObjectTable::ObjectDesc *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBObjectTable::ObjectDesc *>::`vector deleting destructor'(NiTPointerList<NSBObjectTable::ObjectDesc *> *this, unsigned int a2);
void __thiscall NSBShader::~NSBShader(NSBShader *this); // idb
NSBImplementation *__thiscall NSBShader::GetImplementation(NSBShader *this, const char *pcName, bool bCreate, unsigned int uiNextIndex); // idb
NiShaderDesc *__thiscall NSBShader::GetShaderDesc(NSBShader *this); // idb
bool __thiscall NSBShader::SaveBinaryPackingDefs(NSBShader *this, NiBinaryStream *kStream); // idb
char __thiscall NSBShader::LoadBinaryPackingDefs(NSBShader *this, NiBinaryStream *kStream);
bool __thiscall NSBShader::SaveBinaryImplementations(NSBShader *this, NiBinaryStream *kStream); // idb
char __thiscall NSBShader::LoadBinaryImplementations(NSBShader *this, NiBinaryStream *kStream);
NSBShader *__thiscall NSBShader::`scalar deleting destructor'(NSBShader *this, unsigned int a2);
bool __thiscall NSBShader::SaveBinary(NSBShader *this, NiBinaryStream *kStream, bool bEndianSwap); // idb
bool __thiscall NSBShader::LoadBinary(NSBShader *this, NiBinaryStream *kStream); // idb
NSBImplementation *__thiscall NSBShader::GetBestImplementation(NSBShader *this, NiDX9Renderer *pkRenderer); // idb
NiBinaryShader *__thiscall NSBShader::GetD3DShader(NSBShader *this, NiDX9Renderer *pkRenderer, unsigned int uiImplementation); // idb
bool __thiscall NSBShader::Save(NSBShader *this, const char *pcFilename, bool bEndianSwap); // idb
bool __thiscall NSBShader::Load(NSBShader *this, const char *pcFilename); // idb
void __thiscall NSBShader::NSBShader(NSBShader *this); // idb
void __thiscall NSBObjectTable::ObjectDesc::ObjectDesc(NSBObjectTable::ObjectDesc *this, const char *pcName, NiShaderAttributeDesc::ObjectType eType, unsigned int uiIndex); // idb
void __thiscall NSBObjectTable::~NSBObjectTable(NSBObjectTable *this); // idb
NSBObjectTable::ObjectDesc *__thiscall NSBObjectTable::GetObjectByName(NSBObjectTable *this, const char *pcName); // idb
char __thiscall NSBObjectTable::AddObject(NSBObjectTable *this, const char *pcName, NiShaderAttributeDesc::ObjectType eType, unsigned int uiIndex);
void __thiscall NSBAttributeDesc::NSBAttributeDesc(NSBAttributeDesc *this); // idb
void __thiscall NSBAttributeDesc::~NSBAttributeDesc(NSBAttributeDesc *this); // idb
char __thiscall NSBAttributeDesc::GetValue_Bool(NSBAttributeDesc *this, bool *bValue);
char __thiscall NSBAttributeDesc::GetValue_Texture(NSBAttributeDesc *this, unsigned int *uiValue, const char **pcValue);
char __thiscall NSBAttributeDesc::GetValue_UnsignedInt(NSBAttributeDesc *this, unsigned int *uiValue);
char __thiscall NSBAttributeDesc::GetValue_Float(NSBAttributeDesc *this, float *fValue);
char __thiscall NSBAttributeDesc::GetValue_Point2(NSBAttributeDesc *this, NiPoint2 *kPt2Value);
char __thiscall NSBAttributeDesc::GetValue_Point3(NSBAttributeDesc *this, NiPoint3 *kPtValue);
char __thiscall NSBAttributeDesc::GetValue_Point4(NSBAttributeDesc *this, float **pfValue);
char __thiscall NSBAttributeDesc::GetValue_ColorA(NSBAttributeDesc *this, NiColorA *kClrValue);
void __thiscall NSBAttributeDesc::SetType(NSBAttributeDesc *this, NiShaderAttributeDesc::AttributeType eType); // idb
void __thiscall NSBAttributeDesc::SetValue_Bool(NSBAttributeDesc *this, bool bValue); // idb
void __thiscall NSBAttributeDesc::SetValue_UnsignedInt(NSBAttributeDesc *this, unsigned int uiValue); // idb
void __thiscall NSBAttributeDesc::SetValue_Float(NSBAttributeDesc *this, float fValue); // idb
void __thiscall NSBAttributeDesc::SetValue_Point2(NSBAttributeDesc *this, NiPoint2 *kPt2Value); // idb
void __thiscall NSBAttributeDesc::SetValue_Point3(NSBAttributeDesc *this, NiPoint3 *kPtValue); // idb
void __thiscall NSBAttributeDesc::SetValue_Color(NSBAttributeDesc *this, NiColor *kClrValue); // idb
void __thiscall NSBAttributeDesc::SetValue_ColorA(NSBAttributeDesc *this, NiColorA *kClrValue); // idb
void __thiscall NSBAttributeDesc::SetHidden(NSBAttributeDesc *this, bool bHide); // idb
void __thiscall NSBAttributeDesc::SetRanged(NSBAttributeDesc *this, bool bRanged); // idb
char __thiscall NSBAttributeDesc::SetRange_UnsignedInt(NSBAttributeDesc *this, unsigned int uiLow, unsigned int uiHigh);
char __thiscall NSBAttributeDesc::SetRange_Float(NSBAttributeDesc *this, float fLow, float fHigh);
char __thiscall NSBAttributeDesc::SetRange_Point2(NSBAttributeDesc *this, NiPoint2 *kPt2Low, NiPoint2 *kPt2High);
char __thiscall NSBAttributeDesc::SetRange_Point3(NSBAttributeDesc *this, NiPoint3 *kPtLow, NiPoint3 *kPtHigh);
char __thiscall NSBAttributeDesc::SetRange_Point4(NSBAttributeDesc *this, float *pfLow, float *pfHigh);
char __thiscall NSBAttributeDesc::SetRange_Color(NSBAttributeDesc *this, NiColor *kClrLow, NiColor *kClrHigh);
char __thiscall NSBAttributeDesc::SetRange_ColorA(NSBAttributeDesc *this, NiColorA *kClrLow, NiColorA *kClrHigh);
NSBRequirements *__thiscall NSBAttributeDesc::GetShaderAttributeDesc(NSBAttributeDesc *this);
void __thiscall NSBAttributeDesc::SetName(NSBAttributeDesc *this, const char *pcName); // idb
char __thiscall NSBAttributeDesc::GetValue_Matrix3(NSBAttributeDesc *this, NiMatrix3 *kMatValue);
char __thiscall NSBAttributeDesc::GetValue_Matrix4(NSBAttributeDesc *this, float **pfValue, unsigned int uiSizeBytes);
void __thiscall NSBAttributeDesc::SetValue_Point4(NSBAttributeDesc *this, float *pfValue); // idb
void __thiscall NSBAttributeDesc::SetValue_Matrix3(NSBAttributeDesc *this, NiMatrix3 *kMatValue); // idb
void __thiscall NSBAttributeDesc::SetValue_Matrix4(NSBAttributeDesc *this, float *pfValue); // idb
void __thiscall NSBAttributeDesc::SetValue_Texture(NSBAttributeDesc *this, unsigned int uiValue, const char *pcValue); // idb
char __thiscall NSBAttributeDesc::SaveBinary(NSBAttributeDesc *this, NiBinaryStream *kStream);
char __thiscall NSBAttributeDesc::LoadBinary(NSBAttributeDesc *this, NiBinaryStream *kStream);
char __thiscall NSBAttributeDesc::SaveBinary_Bool(NSBAttributeDesc *this, NiBinaryStream *kStream);
char __thiscall NSBAttributeDesc::SaveBinary_String(NSBAttributeDesc *this, NiBinaryStream *kStream);
char __thiscall NSBAttributeDesc::SaveBinary_Float(NSBAttributeDesc *this, NiBinaryStream *kStream);
char __thiscall NSBAttributeDesc::SaveBinary_Point2(NSBAttributeDesc *this, NiBinaryStream *kStream);
char __thiscall NSBAttributeDesc::SaveBinary_Point3(NSBAttributeDesc *this, NiBinaryStream *kStream);
char __thiscall NSBAttributeDesc::SaveBinary_Color(NSBAttributeDesc *this, NiBinaryStream *kStream);
char __thiscall NSBAttributeDesc::SaveBinary_Matrix3(NSBAttributeDesc *this, NiBinaryStream *kStream);
char __thiscall NSBAttributeDesc::SaveBinary_Matrix4(NSBAttributeDesc *this, NiBinaryStream *kStream);
bool __thiscall NSBAttributeDesc::SaveBinary_Texture(NSBAttributeDesc *this, NiBinaryStream *kStream); // idb
char __thiscall NSBAttributeDesc::SaveBinary_Array(NSBAttributeDesc *this, NiBinaryStream *kStream);
char __thiscall NSBAttributeDesc::LoadBinary_Bool(NSBAttributeDesc *this, NiBinaryStream *kStream);
char __thiscall NSBAttributeDesc::LoadBinary_String(NSBAttributeDesc *this, NiBinaryStream *kStream);
char __thiscall NSBAttributeDesc::LoadBinary_UnsignedInt(NSBAttributeDesc *this, NiBinaryStream *kStream);
char __thiscall NSBAttributeDesc::LoadBinary_Point2(NSBAttributeDesc *this, NiBinaryStream *kStream);
char __thiscall NSBAttributeDesc::LoadBinary_Point3(NSBAttributeDesc *this, NiBinaryStream *kStream);
char __thiscall NSBAttributeDesc::LoadBinary_Matrix3(NSBAttributeDesc *this, NiBinaryStream *kStream);
char __thiscall NSBAttributeDesc::LoadBinary_Matrix4(NSBAttributeDesc *this, NiBinaryStream *kStream);
char __thiscall NSBAttributeDesc::LoadBinary_Color(NSBAttributeDesc *this, NiBinaryStream *kStream);
bool __thiscall NSBAttributeDesc::LoadBinary_Texture(NSBAttributeDesc *this, NiBinaryStream *kStream); // idb
char __thiscall NSBAttributeDesc::LoadBinary_Array(NSBAttributeDesc *this, NiBinaryStream *kStream);
NiTListBase<NiTPointerAllocator<unsigned int>,NSBAttributeDesc *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NSBAttributeDesc *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NSBAttributeDesc *> *this, unsigned int a2);
NiD3DShaderProgramCreatorAsm *__thiscall NSBAttributeTable::GetAttributeByName(NSBAttributeTable *this, char *pcName);
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBAttributeDesc *>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBAttributeDesc *>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBAttributeDesc *> *this); // idb
NiTPointerList<NSBAttributeDesc *> *__thiscall NiTPointerList<NSBAttributeDesc *>::`scalar deleting destructor'(NiTPointerList<NSBAttributeDesc *> *this, unsigned int a2);
void __thiscall NSBAttributeTable::~NSBAttributeTable(NSBAttributeTable *this); // idb
char __thiscall NSBAttributeTable::AddAttribDesc_Bool(NSBAttributeTable *this, char *pcName, char *pcDesc, bool bHidden, bool bInitValue);
char __thiscall NSBAttributeTable::AddAttribDesc_UnsignedInt(NSBAttributeTable *this, char *pcName, char *pcDesc, bool bHidden, unsigned int uiInitValue, unsigned int uiLow, unsigned int uiHigh);
char __thiscall NSBAttributeTable::AddAttribDesc_Float(NSBAttributeTable *this, char *pcName, char *pcDesc, bool bHidden, float fInitValue, float fLow, float fHigh);
char __thiscall NSBAttributeTable::AddAttribDesc_Point2(NSBAttributeTable *this, char *pcName, char *pcDesc, bool bHidden, float *pfInitValue, float *pfLow, float *pfHigh);
char __thiscall NSBAttributeTable::AddAttribDesc_Point3(NSBAttributeTable *this, char *pcName, char *pcDesc, bool bHidden, float *pfInitValue, float *pfLow, float *pfHigh);
char __thiscall NSBAttributeTable::AddAttribDesc_Point4(NSBAttributeTable *this, char *pcName, char *pcDesc, bool bHidden, float *pfInitValue, float *pfLow, float *pfHigh);
char __thiscall NSBAttributeTable::AddAttribDesc_Matrix3(NSBAttributeTable *this, char *pcName, char *pcDesc, bool bHidden, float *pfInitValue);
char __thiscall NSBAttributeTable::AddAttribDesc_Matrix4(NSBAttributeTable *this, char *pcName, char *pcDesc, bool bHidden, float *pfInitValue);
char __thiscall NSBAttributeTable::AddAttribDesc_Color(NSBAttributeTable *this, char *pcName, char *pcDesc, bool bHidden, float *pfInitValue, float *pfLow, float *pfHigh);
char __thiscall NSBAttributeTable::AddAttribDesc_ColorA(NSBAttributeTable *this, char *pcName, char *pcDesc, bool bHidden, float *pfInitValue, float *pfLow, float *pfHigh);
char __thiscall NSBAttributeTable::AddAttribDesc_Texture(NSBAttributeTable *this, char *pcName, char *pcDesc, bool bHidden, unsigned int uiSlot, const char *pcDefault);
bool __thiscall NSBAttributeTable::SaveBinary(NSBAttributeTable *this, NiBinaryStream *kStream); // idb
void __thiscall NSBAttributeTable::NSBAttributeTable(NSBAttributeTable *this); // idb
bool __thiscall NSBAttributeTable::LoadBinary(NSBAttributeTable *this, NiBinaryStream *kStream); // idb
NiTListBase<NiTPointerAllocator<unsigned int>,NSBConstantMap::NSBCM_Entry *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NSBConstantMap::NSBCM_Entry *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NSBConstantMap::NSBCM_Entry *> *this, unsigned int a2);
NSBConstantMap::NSBCM_Entry *__thiscall NSBConstantMap::GetEntryByKey(NSBConstantMap *this, char *pcKey); // idb
NSBConstantMap::NSBCM_Entry *__thiscall NSBConstantMap::GetPlatformEntryByKey(NSBConstantMap *this, NiShader::Platform ePlatform, char *pcKey); // idb
signed int __thiscall NSBConstantMap::GetEntryIndexByKey(NSBConstantMap *this, char *pcKey);
NSBConstantMap::NSBCM_Entry *__stdcall NSBConstantMap::CreateEntry(char *pcKey, unsigned int uiFlags, unsigned int uiExtra, unsigned int uiReg, unsigned int uiCount, char *pcVariableName, unsigned int uiSize, unsigned int uiStride, void *pvSource, bool bCopyData);
bool __stdcall NSBConstantMap::ProcessPixelMapEntry(NiDX9Renderer *pkRenderer, NiShaderDesc *pkShaderDesc, NSBConstantMap::NSBCM_Entry *pkEntry, NiD3DSCM_Pixel *pkSCMP);
bool __stdcall NSBConstantMap::ProcessVertexMapEntry(NiDX9Renderer *pkRenderer, NiShaderDesc *pkShaderDesc, NSBConstantMap::NSBCM_Entry *pkEntry, NiD3DSCM_Vertex *pkSCMV);
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBConstantMap::NSBCM_Entry *>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBConstantMap::NSBCM_Entry *>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBConstantMap::NSBCM_Entry *> *this); // idb
NiTPointerList<NSBConstantMap::NSBCM_Entry *> *__thiscall NiTPointerList<NSBConstantMap::NSBCM_Entry *>::`scalar deleting destructor'(NiTPointerList<NSBConstantMap::NSBCM_Entry *> *this, unsigned int a2);
bool __thiscall NSBConstantMap::NSBCM_Entry::SaveBinary(NSBConstantMap::NSBCM_Entry *this, NiBinaryStream *kStream); // idb
// char __userpurge NSBConstantMap::NSBCM_Entry::LoadBinary@<al>(NSBConstantMap::NSBCM_Entry *this@<ecx>, int a2@<ebx>, NiBinaryStream *kStream);
void __thiscall NSBConstantMap::~NSBConstantMap(NSBConstantMap *this); // idb
char __thiscall NSBConstantMap::AddEntry(NSBConstantMap *this, char *pcKey, unsigned int uiFlags, unsigned int uiExtra, unsigned int uiReg, unsigned int uiCount, char *pcVariableName, unsigned int uiSize, unsigned int uiStride, void *pvSource, bool bCopyData);
NiD3DSCM_Pixel *__thiscall NSBConstantMap::GetD3DSCM_Pixel(NSBConstantMap *this, NiDX9Renderer *pkRenderer, NiShaderDesc *pkShaderDesc); // idb
NiD3DSCM_Vertex *__thiscall NSBConstantMap::GetD3DSCM_Vertex(NSBConstantMap *this, NiDX9Renderer *pkRenderer, NiShaderDesc *pkShaderDesc); // idb
bool __thiscall NSBConstantMap::SaveBinary(NSBConstantMap *this, NiBinaryStream *kStream); // idb
bool __thiscall NSBConstantMap::LoadBinary(NSBConstantMap *this, NiBinaryStream *kStream); // idb
char __thiscall NSBConstantMap::AddPlatformSpecificEntry_DX9(NSBConstantMap *this, char *pcKey, unsigned int uiFlags, unsigned int uiExtra, unsigned int uiReg, unsigned int uiCount, char *pcVariableName, unsigned int uiSize, unsigned int uiStride, void *pvSource, bool bCopyData);
char __thiscall NSBConstantMap::AddPlatformSpecificEntry_Xenon(NSBConstantMap *this, char *pcKey, unsigned int uiFlags, unsigned int uiExtra, unsigned int uiReg, unsigned int uiCount, char *pcVariableName, unsigned int uiSize, unsigned int uiStride, void *pvSource, bool bCopyData);
bool __thiscall NSBConstantMap::SaveBinaryEntries(NSBConstantMap *this, NiBinaryStream *kStream); // idb
bool __thiscall NSBConstantMap::LoadBinaryEntries(NSBConstantMap *this, NiBinaryStream *kStream); // idb
void __thiscall NSBConstantMap::NSBConstantMap(NSBConstantMap *this); // idb
NSBConstantMap *__thiscall NSBConstantMap::`scalar deleting destructor'(NSBConstantMap *this, unsigned int a2);
char __thiscall NSBConstantMap::AddPlatformSpecificEntry(NSBConstantMap *this, unsigned int uiPlatformFlags, char *pcKey, unsigned int uiFlags, unsigned int uiExtra, unsigned int uiReg, unsigned int uiCount, char *pcVariableName, unsigned int uiSize, unsigned int uiStride, void *pvSource, bool bCopyData);
NiTListBase<NiTPointerAllocator<unsigned int>,NSBUserDefinedDataBlock *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NSBUserDefinedDataBlock *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NSBUserDefinedDataBlock *> *this, unsigned int a2);
NSBUserDefinedDataBlock *__thiscall NSBUserDefinedDataBlock::`vector deleting destructor'(NSBUserDefinedDataBlock *this, unsigned int a2);
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBUserDefinedDataBlock *>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBUserDefinedDataBlock *>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBUserDefinedDataBlock *> *this); // idb
NiTPointerList<NSBUserDefinedDataBlock *> *__thiscall NiTPointerList<NSBUserDefinedDataBlock *>::`scalar deleting destructor'(NiTPointerList<NSBUserDefinedDataBlock *> *this, unsigned int a2);
void __thiscall NSBUserDefinedDataSet::~NSBUserDefinedDataSet(NSBUserDefinedDataSet *this); // idb
NSBUserDefinedDataBlock *__thiscall NSBUserDefinedDataSet::GetBlock(NSBUserDefinedDataSet *this, const char *pcName, bool bCreate); // idb
char __thiscall NSBUserDefinedDataSet::SaveBinary(NSBUserDefinedDataSet *this, NiBinaryStream *kStream);
void __thiscall NSBUserDefinedDataSet::NSBUserDefinedDataSet(NSBUserDefinedDataSet *this); // idb
NSBUserDefinedDataSet *__thiscall NSBUserDefinedDataSet::`vector deleting destructor'(NSBUserDefinedDataSet *this, unsigned int a2);
char __thiscall NSBUserDefinedDataSet::LoadBinary(NSBUserDefinedDataSet *this, NiBinaryStream *kStream);
void __thiscall NSBImplementation::SetDesc(NSBImplementation *this, const char *pcDesc); // idb
void __thiscall NSBImplementation::GetRequirements(NSBImplementation *this);
void __thiscall NSBImplementation::GetRenderStateGroup(NSBImplementation *this);
NiTArray<NSBPass *> *__thiscall NiTArray<NSBPass *>::`vector deleting destructor'(NiTArray<NSBPass *> *this, unsigned int a2);
void __thiscall NSBImplementation::NSBImplementation(NSBImplementation *this); // idb
void __thiscall NSBImplementation::~NSBImplementation(NSBImplementation *this); // idb
NSBConstantMap *__thiscall NSBImplementation::GetPixelConstantMap(NSBImplementation *this); // idb
NSBConstantMap *__thiscall NSBImplementation::GetVertexConstantMap(NSBImplementation *this); // idb
NSBPass *__thiscall NSBImplementation::GetPass(NSBImplementation *this, unsigned int uiIndex, bool bCreate); // idb
bool __thiscall NSBImplementation::SaveBinaryPasses(NSBImplementation *this, NiBinaryStream *kStream); // idb
char __thiscall NSBImplementation::SaveBinaryRequirements(NSBImplementation *this, NiBinaryStream *kStream);
char __thiscall NSBImplementation::LoadBinaryRequirements(NSBImplementation *this, NiBinaryStream *kStream);
char __thiscall NSBImplementation::LoadBinaryPasses(NSBImplementation *this, NiBinaryStream *kStream);
char __thiscall NiBinaryShader::InsertPass(NiBinaryShader *this, unsigned int uiPass, NiD3DPass *pkPass);
char __thiscall NSBImplementation::SaveBinary(NSBImplementation *this, NiBinaryStream *kStream);
char __thiscall NSBImplementation::LoadBinary(NSBImplementation *this, NiBinaryStream *kStream);
char __thiscall NSBImplementation::SetupNiBinaryShader(NSBImplementation *this, NiBinaryShader *kShader, NiShaderDesc *pkShaderDesc);
void __thiscall NSBTextureStage::NSBTextureStage(NSBTextureStage *this); // idb
void __thiscall NSBTextureStage::GetTextureStageGroup(NSBTextureStage *this);
void __thiscall NSBTextureStage::GetSamplerStageGroup(NSBTextureStage *this);
char __thiscall NSBTextureStage::SetupD3DTextureStage(NSBTextureStage *this, NiD3DTextureStage *kD3DStage);
void __thiscall NSBTextureStage::~NSBTextureStage(NSBTextureStage *this); // idb
bool __thiscall NSBTextureStage::SaveBinaryTextureTransform(NSBTextureStage *this, NiBinaryStream *kStream); // idb
char __thiscall NSBTextureStage::SaveBinary(NSBTextureStage *this, NiBinaryStream *kStream);
bool __thiscall NSBTextureStage::LoadBinaryTextureTransform(NSBTextureStage *this, NiBinaryStream *kStream); // idb
char __thiscall NSBTextureStage::LoadBinary(NSBTextureStage *this, NiBinaryStream *kStream);
void __thiscall NSBPass::GetRenderStateGroup(NSBPass *this);
void __thiscall NSBPass::SetPixelShaderProgramFileXenon(NSBPass *this, const char *pcProgramFileName); // idb
void __thiscall NSBImplementation::SetPackingDef(NSBPass *this, const char *pcProgramFileName); // idb
void __thiscall NSBPass::SetPixelShaderProgramEntryPoint(NSBPass *this, const char *pcEntryPoint); // idb
void __thiscall NSBPass::SetPixelShaderProgramShaderTarget(NSBPass *this, const char *pcShaderTarget); // idb
void __thiscall NSBPass::SetVertexShaderProgramFileXenon(NSBPass *this, const char *pcProgramFileName); // idb
void __thiscall NSBPass::SetVertexShaderProgramFileDX9(NSBPass *this, const char *pcProgramFileName); // idb
void __thiscall NSBPass::SetVertexShaderProgramEntryPoint(NSBPass *this, const char *pcEntryPoint); // idb
void __thiscall NSBPass::SetVertexShaderProgramShaderTarget(NSBPass *this, const char *pcShaderTarget); // idb
bool __thiscall NSBPass::SaveBinaryPixelShaderProgram(NSBPass *this, NiBinaryStream *kStream); // idb
bool __thiscall NSBPass::SaveBinaryVertexShaderProgram(NSBPass *this, NiBinaryStream *kStream); // idb
NiTArray<NSBTextureStage *> *__thiscall NiTArray<NSBTextureStage *>::`scalar deleting destructor'(NiTArray<NSBTextureStage *> *this, unsigned int a2);
void __thiscall NSBPass::NSBPass(NSBPass *this); // idb
void __thiscall NSBPass::~NSBPass(NSBPass *this); // idb
NSBConstantMap *__thiscall NSBPass::GetPixelConstantMap(NSBPass *this); // idb
NSBConstantMap *__thiscall NSBPass::GetVertexConstantMap(NSBPass *this); // idb
void __thiscall NSBPass::GetStage(NSBPass *this, unsigned int uiIndex, bool bCreate);
char __thiscall NSBPass::LoadBinaryPixelShaderProgram(NSBPass *this, NiBinaryStream *kStream);
bool __thiscall NSBPass::LoadBinaryVertexShaderProgram(NSBPass *this, NiBinaryStream *kStream); // idb
char __thiscall NSBPass::SetupNiD3DPass(NSBPass *this, NiD3DPass *kPass, NiShaderDesc *pkShaderDesc);
bool __thiscall NSBPass::SaveBinaryStages(NSBPass *this, NiBinaryStream *kStream); // idb
bool __thiscall NSBPass::SaveBinary(NSBPass *this, NiBinaryStream *kStream); // idb
char __thiscall NSBPass::LoadBinaryStages(NSBPass *this, NiBinaryStream *kStream);
bool __thiscall NSBPass::LoadBinary(NSBPass *this, NiBinaryStream *kStream); // idb
void __thiscall NSBRequirements::NSBRequirements(NSBRequirements *this); // idb
void __thiscall NSBRequirements::SetPSVersion(NSBRequirements *this, unsigned int uiVersion); // idb
char *__thiscall NiGeometryData::GetGroup(NiD3DShaderProgram *this);
bool __thiscall NSBRequirements::UsesNiRenderState(NSBRequirements *this); // idb
void __thiscall NSBRequirements::SetUsesNiRenderState(NSBRequirements *this, bool bUses); // idb
bool __thiscall NSBRequirements::UsesNiLightState(NSBRequirements *this); // idb
void __thiscall NSBRequirements::SetUsesNiLightState(NSBRequirements *this, bool bUses); // idb
void __thiscall NiShaderAttributeDesc::SetFlags(NSBRequirements *this, unsigned int uiBones); // idb
void __thiscall NSBRequirements::SetBinormalTangentMethod(NSBRequirements *this, NiGeometryData::DataFlags eNBTMethod); // idb
bool __thiscall NiFile::operator bool(NSBRequirements *this); // idb
void __thiscall NSBRequirements::SetSoftwareVPAcceptable(NSBRequirements *this, bool bSoftwareVP); // idb
bool __thiscall NSBRequirements::GetSoftwareVPRequired(NSBRequirements *this); // idb
void __thiscall NSBRequirements::SetSoftwareVPRequired(NSBRequirements *this, bool bSoftwareVP); // idb
char __thiscall NSBRequirements::SaveBinary(NSBRequirements *this, NiBinaryStream *kStream);
char __thiscall NSBRequirements::LoadBinary(NSBRequirements *this, NiBinaryStream *kStream);
int __cdecl NSBRenderStates::LookupRenderState(const char *pcRenderState);
bool __cdecl NSBRenderStates::LookupRenderStateValue(NSBRenderStates::NiD3DRenderState eRenderState, const char *pcValue, unsigned int *uiValue); // idb
char __cdecl NSBRenderStates::GetD3DRenderStateType(NSBRenderStates::NiD3DRenderState eRenderState, _D3DRENDERSTATETYPE *eD3DRS);
char __cdecl NSBRenderStates::GetD3DBlend(NSBRenderStates::NiD3DBlend eBlend, unsigned int *uiD3DValue);
char __cdecl NSBRenderStates::GetD3DFillMode(NSBRenderStates::NiD3DCull eCull, unsigned int *uiD3DValue);
char __cdecl NSBRenderStates::GetD3DCmpFunc(NSBRenderStates::NiD3DStencilOp eStencilOp, unsigned int *uiD3DValue);
char __cdecl NSBRenderStates::GetD3DFogMode(NSBRenderStates::NiD3DFogMode eFogMode, unsigned int *uiD3DValue);
char __cdecl NSBRenderStates::GetD3DWrap(NSBRenderStates::NiD3DWrap eWrap, unsigned int *uiD3DValue);
char __cdecl NSBRenderStates::GetD3DMaterialColorSource(NSBRenderStates::NiD3DMaterialColorSource eMaterialColorSource, unsigned int *uiD3DValue);
char __cdecl NSBRenderStates::GetD3DVertexBlendFlags(NSBRenderStates::NiD3DVertexBlendFlags eVertexBlendFlags, unsigned int *uiD3DValue);
char __cdecl NSBRenderStates::GetD3DDebugMonitorTokens(NSBRenderStates::NiD3DDebugMonitorTokens eDebugMonitorTokens, unsigned int *uiD3DValue);
char __cdecl NSBRenderStates::GetD3DDegreeType(NSBRenderStates::NiD3DDegreeType eDegreeType, unsigned int *uiD3DValue);
char __cdecl NSBRenderStates::ConvertNSBRenderStateValue(NSBRenderStates::NiD3DRenderState eNSBState, unsigned int uiNSBValue, unsigned int *uiD3DValue);
char __thiscall NSBStateGroup::SetupRenderStateGroup(NSBStateGroup *this, NiD3DRenderStateGroup *kRSGroup);
char __thiscall NSBStateGroup::SetupTextureStageGroup(NSBStateGroup *this, NiD3DTextureStageGroup *kTSGroup);
char __thiscall NSBStateGroup::SetupTextureSamplerGroup(NSBStateGroup *this, NiD3DTextureStageGroup *kTSGroup);
NiTListBase<NiTPointerAllocator<unsigned int>,NSBStateGroup::NSBSGEntry *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NSBStateGroup::NSBSGEntry *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NSBStateGroup::NSBSGEntry *> *this, unsigned int a2);
NSBStateGroup::NSBSGEntry *__thiscall NSBStateGroup::GetFirstState(NSBStateGroup *this); // idb
NSBStateGroup::NSBSGEntry *__thiscall NSBStateGroup::GetNextState(NSBStateGroup *this); // idb
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBStateGroup::NSBSGEntry *>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBStateGroup::NSBSGEntry *>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBStateGroup::NSBSGEntry *> *this); // idb
NiTPointerList<NSBStateGroup::NSBSGEntry *> *__thiscall NiTPointerList<NSBStateGroup::NSBSGEntry *>::`vector deleting destructor'(NiTPointerList<NSBStateGroup::NSBSGEntry *> *this, unsigned int a2);
void __thiscall NSBStateGroup::~NSBStateGroup(NSBStateGroup *this); // idb
void __thiscall NSBStateGroup::SetState(NSBStateGroup *this, unsigned int uiState, unsigned int uiValue, bool bSave, bool bUseMapValue); // idb
bool __thiscall NSBStateGroup::SaveBinary(NSBStateGroup *this, NiBinaryStream *kStream); // idb
void __thiscall NSBStateGroup::NSBStateGroup(NSBStateGroup *this); // idb
char __thiscall NSBStateGroup::LoadBinary(NSBStateGroup *this, NiBinaryStream *kStream);
unsigned int __thiscall NSBPackingDef::GetName(NSBRequirements *this); // idb
void __thiscall NSBPackingDef::SetFixedFunction(NSBPackingDef *this, bool bFixedFunction); // idb
const char *__cdecl NSBPackingDef::GetTypeName(NSBPackingDef::NiD3DPackingDefType eType); // idb
const char *__cdecl NSBPackingDef::GetParameterName(NiD3DShaderDeclaration::ShaderParameter eParam); // idb
NiD3DShaderDeclaration *__thiscall NSBPackingDef::GetShaderDeclaration(NSBPackingDef *this, NiShader::Platform ePlatform, NiDX9Renderer *pkRenderer); // idb
signed int __stdcall NSBPackingDef::ConvertPackingDefType(NSBPackingDef::NiD3DPackingDefType eType);
NiTListBase<NiTPointerAllocator<unsigned int>,NSBPackingDef::NSBPDEntry *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NSBPackingDef::NSBPDEntry *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NSBPackingDef::NSBPDEntry *> *this, unsigned int a2);
NSBPackingDef::NSBPDEntry *__thiscall NSBPackingDef::GetFirstEntry(NSBPackingDef *this); // idb
NSBPackingDef::NSBPDEntry *__thiscall NSBPackingDef::GetNextEntry(NSBPackingDef *this); // idb
void __thiscall NSBPackingDef::GetStreamInfo(NSBPackingDef *this, unsigned int *uiStreamCount, unsigned int *uiMaxStreamEntryCount); // idb
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBPackingDef::NSBPDEntry *>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBPackingDef::NSBPDEntry *>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBPackingDef::NSBPDEntry *> *this); // idb
NiTPointerList<NSBPackingDef::NSBPDEntry *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBPackingDef::NSBPDEntry *>::`scalar deleting destructor'(NiTPointerList<NSBPackingDef::NSBPDEntry *> *this, unsigned int a2);
char __thiscall NSBPackingDef::NSBPDEntry::SaveBinary(NSBPackingDef::NSBPDEntry *this, NiBinaryStream *kStream);
void __thiscall NSBPackingDef::~NSBPackingDef(NSBPackingDef *this); // idb
char __thiscall NSBPackingDef::AddPackingEntry(NSBPackingDef *this, unsigned int uiStream, unsigned int uiRegister, unsigned int uiInput, NSBPackingDef::NiD3DPackingDefType eType, NiD3DShaderDeclaration::ShaderParameterTesselator eTesselator, NiD3DShaderDeclaration::ShaderParameterUsage eUsage, unsigned int uiUsageIndex);
// bool __userpurge NSBPackingDef::SaveBinary@<al>(NSBPackingDef *this@<ecx>, int a2@<ebx>, NiBinaryStream *kStream);
char __thiscall NSBPackingDef::NSBPDEntry::LoadBinary(NSBPackingDef::NSBPDEntry *this, NiBinaryStream *kStream);
void __thiscall NSBPackingDef::NSBPackingDef(NSBPackingDef *this); // idb
char __thiscall NSBPackingDef::LoadBinary(NSBPackingDef *this, NiBinaryStream *kStream);
signed int __thiscall NiBinaryShader::PreProcessPipeline(NiBinaryShader *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound);
int __thiscall NiBinaryShader::SetupRenderingPass(NiBinaryShader *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound);
unsigned int __thiscall NiBinaryShader::SetupShaderPrograms(NiBinaryShader *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound); // idb
NiGeometryBufferData *__thiscall NiBinaryShader::PrepareGeometryForRendering(NiBinaryShader *this, NiGeometry *pkGeometry, NiSkinPartition::Partition *pkPartition, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState); // idb
char __thiscall NiD3DTextureStageGroup::GetNextNoSaveSamplerState(NiD3DTextureStageGroup *this, unsigned int *uiState, unsigned int *uiValue, bool *bUseMapValue);
char __thiscall NiD3DTextureStageGroup::GetNextSavedSamplerState(NiD3DTextureStageGroup *this, unsigned int *uiState, unsigned int *uiValue, bool *bUseMapValue);
bool __thiscall NiD3DTextureStage::GetSaveTexCoordIndex(NiD3DTextureStage *this); // idb
// NiDX9Renderer *__usercall GetSamplerValue@<eax>(unsigned int uiState@<edx>, NiTexturingProperty::ClampMode eClampMode@<ecx>, NiTexturingProperty::FilterMode eFilterMode@<eax>, NiDX9Renderer *pkD3DRenderer);
char __stdcall NiBinaryShader::ResolveVertexShaderFileName(const char *pcOriginalName, char *pcTrueName, unsigned int uiNameLength);
char __stdcall NiBinaryShader::ResolvePixelShaderFileName(const char *pcOriginalName, char *pcTrueName, unsigned int uiNameLength);
void __thiscall NiPixelData::SetPalette(NiD3DPass *this, NiD3DPixelShader *pkPixelShader); // idb
unsigned int __thiscall NiBinaryShader::SetupTransformations(NiBinaryShader *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound); // idb
char __thiscall NiBinaryShader::LoadVertexShaderProgram(NiBinaryShader *this, NiD3DPass *kPass);
char __stdcall NiBinaryShader::LoadPixelShaderProgram(NiD3DPass *kPass);
void __stdcall NiBinaryShader::PrepareTextureStage(NiD3DTextureStage *pkStage, NiTexturingProperty *pkTexProp, NiDynamicEffectState *pkEffects);
void __thiscall NiTArray<NiPointer<NSBUserDefinedDataSet>>::~NiTArray<NiPointer<NSBUserDefinedDataSet>>(NiTArray<NiPointer<NSBUserDefinedDataSet> > *this); // idb
NiTArray<NiPointer<NSBUserDefinedDataSet> > *__thiscall NiTArray<NiPointer<NSBUserDefinedDataSet>>::`scalar deleting destructor'(NiTArray<NiPointer<NSBUserDefinedDataSet> > *this, unsigned int a2);
void __thiscall NiBinaryShader::~NiBinaryShader(NiBinaryShader *this); // idb
NiRTTI *NiBinaryShader::GetRTTI();
void __thiscall NiD3DXEffectShader::SetShaderDecl(NiD3DShader *this, NiD3DShaderDeclaration *pkShaderDecl); // idb
char __thiscall NiBinaryShader::Initialize(NiBinaryShader *this, NiDX9Renderer *pkRenderer);
unsigned int __thiscall NiBinaryShader::UpdatePipeline(NiBinaryShader *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound); // idb
char __thiscall NiBinaryShader::SetupGeometry(NiBinaryShader *this, NiGeometry *pkGeometry);
void __thiscall NiBinaryShader::NiBinaryShader(NiBinaryShader *this); // idb
NiBinaryShader *__thiscall NiBinaryShader::`scalar deleting destructor'(NiBinaryShader *this, unsigned int a2);
NiD3DSCM_Vertex *__stdcall NSBUserDefinedDataBlock::GetD3DSCM_Pixel(NiDX9Renderer *pkRenderer, NiShaderDesc *pkShaderDesc);
char __thiscall NSBUserDefinedDataBlock::SaveBinary(NSBUserDefinedDataBlock *this, NiBinaryStream *kStream);
char __thiscall NSBUserDefinedDataBlock::LoadBinary(NSBUserDefinedDataBlock *this, NiBinaryStream *kStream);
bool __thiscall NSBUserDefinedDataBlock::SaveBinaryEntries(NSBUserDefinedDataBlock *this, NiBinaryStream *kStream); // idb
bool __thiscall NSBUserDefinedDataBlock::LoadBinaryEntries(NSBUserDefinedDataBlock *this, NiBinaryStream *kStream); // idb
char __thiscall NSBUserDefinedDataBlock::AddEntry(NSBUserDefinedDataBlock *this, char *pcKey, unsigned int uiFlags, unsigned int uiSize, unsigned int uiStride, void *pvSource, bool bCopyData);
char __thiscall NSBTextureStage::SetupD3DTextureStage_DX9(NSBTextureStage *this, NiD3DTextureStage *kD3DStage);
char __thiscall NSBStateGroup::SetupRenderStateGroup_DX9(NSBStateGroup *this, NiD3DRenderStateGroup *kRSGroup);
char __thiscall NSBStateGroup::SetupTextureStageGroup_DX9(NSBStateGroup *this, NiD3DTextureStageGroup *kTSGroup);
char __thiscall NSBStateGroup::SetupTextureSamplerGroup_DX9(NSBStateGroup *this, NiD3DTextureStageGroup *kTSGroup);
signed int __stdcall NSBPackingDef::ConvertPackingDefType_DX9(NSBPackingDef::NiD3DPackingDefType eType);
NiD3DShaderDeclaration *__thiscall NSBPackingDef::GetShaderDeclaration_DX9(NSBPackingDef *this, NiDX9Renderer *pkRenderer); // idb
char __cdecl NSBStageAndSamplerStates::GetD3DTextureStageState(NSBStageAndSamplerStates::NiD3DTextureStageState eTSS, unsigned int *uiD3DValue);
char __cdecl NSBStageAndSamplerStates::GetD3DTextureOp(NSBStageAndSamplerStates::NiD3DTextureOp eTOP, unsigned int *uiD3DValue);
char __cdecl NSBStageAndSamplerStates::GetD3DTextureArg(unsigned int uiTA, unsigned int *uiD3DValue);
char __cdecl NSBStageAndSamplerStates::GetD3DTextureTransformFlags(NSBStageAndSamplerStates::NiD3DTextureTransformFlags eTTF, unsigned int *uiD3DValue);
bool __cdecl NSBStageAndSamplerStates::GetD3DTexCoordIndexFlags(unsigned int uiTCI, unsigned int *uiD3DValue); // idb
char __cdecl NSBRenderStates::GetD3DBlendOp(NSBStageAndSamplerStates::NiD3DTextureAddress eTA, unsigned int *uiD3DValue);
char __cdecl NSBStageAndSamplerStates::GetD3DTextureFilter(NSBStageAndSamplerStates::NiD3DTextureFilter eTF, unsigned int *uiD3DValue);
char __cdecl NSBStageAndSamplerStates::ConvertNSBTextureStageStateValue(NSBStageAndSamplerStates::NiD3DTextureStageState eTSS, unsigned int uiNSBValue, unsigned int *uiD3DValue);
char __cdecl NSBStageAndSamplerStates::ConvertNSBTextureSamplerStateValue(NSBStageAndSamplerStates::NiD3DTextureSamplerState eTSS, unsigned int uiNSBValue, unsigned int *uiD3DValue);
void __thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>,0>>::_Rrotate(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *this, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *_Wherenode); // idb
NsFNC_35 *__thiscall NsFNC_35::`vector deleting destructor'(NsFNC_35 *this, unsigned int a2);
void __cdecl std::_Cons_val<std::allocator<NiPointer<INsFile>>,NiPointer<INsFile>,NiPointer<INsFile> const &>(std::allocator<NiPointer<INsFile> > *_Alval, NiPointer<INsFile> *_Pdest, NiPointer<INsFile> *_Src); // idb
std::_List_nod<NiPointer<INsFile>,std::allocator<NiPointer<INsFile> > >::_Node *__thiscall std::_List_val<NiPointer<INsFile>,std::allocator<NiPointer<INsFile>>>::_Buynode(std::_List_val<NiPointer<INsFile>,std::allocator<NiPointer<INsFile> > > *this, std::_List_nod<NiPointer<INsFile>,std::allocator<NiPointer<INsFile> > >::_Node *_Next, std::_List_nod<NiPointer<INsFile>,std::allocator<NiPointer<INsFile> > >::_Node *_Prev, NiPointer<INsFile> *_Val); // idb
char __thiscall INsFile::AttachChild(INsFile *this, INsFile *_pkNsFile);
char __thiscall NsFNC_35::MakeNode(NsFNC_35 *this, INsFile *_Insfile_, NsTextCodeV0_2 *_pNsTextCode_, std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > > > *_pmapNodeCreater);
NsFNC_123 *__thiscall NsFNC_123::`vector deleting destructor'(NsFNC_123 *this, unsigned int a2);
char __thiscall NsFNC_123::MakeNode(NsFNC_123 *this, INsFile *_Insfile_, NsTextCodeV0_2 *_pNsTextCode_, std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > > > *_pmapNodeCreater);
NsFNC_125 *__thiscall NsFNC_125::`vector deleting destructor'(NsFNC_125 *this, unsigned int a2);
NsFNC_58 *__thiscall NsFNC_58::`vector deleting destructor'(NsFNC_58 *this, unsigned int a2);
char __thiscall NsFNC_58::MakeNode(NsFNC_58 *this, INsFile *_Insfile_, NsTextCodeV0_2 *_pNsTextCode_, std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > > > *_pmapNodeCreater);
NsFNC_34 *__thiscall NsFNC_34::`vector deleting destructor'(NsFNC_34 *this, unsigned int a2);
char __stdcall NsFNC_34::MakeNode(INsFile *_Insfile_, NsTextCodeV0_2 *_pNsTextCode_, std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > > > *_pmapNodeCreater);
void __cdecl std::_Cons_val<std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<INsFile_NodeCreater>>>,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<INsFile_NodeCreater>>,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<INsFile_NodeCreater>>>(std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > > *_Alval, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > *_Pdest, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > *_Src); // idb
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<INsFile_NodeCreater>>>,0>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<INsFile_NodeCreater>>>(std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *this, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > *_Val); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<INsFile_NodeCreater>>>,0>>::erase(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > _Where); // idb
void __thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<INsFile_NodeCreater>>>,0>>::_Erase(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *this, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *_Rootnode); // idb
bool __thiscall NsFileReader::SetNodeCreater(NsFileReader *this, const char *_strKey, INsFile_NodeCreater *_pkCreater); // idb
INsFile *__thiscall NsFileReader::LoadFile(NsFileReader *this, const char *_strFileName); // idb
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<INsFile_NodeCreater>>>,0>>::erase(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > _Last); // idb
void __thiscall std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<INsFile_NodeCreater>>>>::~map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<INsFile_NodeCreater>>>>(std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > > > *this); // idb
void __thiscall NsFileReader::~NsFileReader(NsFileReader *this); // idb
void __thiscall NsFileReader::NsFileReader(NsFileReader *this); // idb
NsFileReader *__thiscall NsFileReader::`scalar deleting destructor'(NsFileReader *this, unsigned int a2);
BOOL __stdcall NsTextCodeV0_2::CharTest(char *inChar);
char __thiscall NsTextCodeV0_3::CreateBuffer(NsTextCodeV0_3 *this, const char *_strFileName);
char __thiscall NsTextCodeV0_3::ReadFile(NsTextCodeV0_3 *this, const char *_strFileName);
int __thiscall NsTextCodeV0_2::OperaterTest(NsTextCodeV0_2 *this, int nInStart, int *pOutEnd, char *originstr, char *inChar); // idb
int __thiscall NsTextCodeV0_2::GetWord(NsTextCodeV0_2 *this, int nInStart, int *pOutEnd, char *originstr, char *outstr); // idb
bool __thiscall NsTextCodeV0_2::GetWord(NsTextCodeV0_2 *this, char *outstr_); // idb
void __thiscall NsTextCodeV0_2::~NsTextCodeV0_2(NsTextCodeV0_2 *this); // idb
int __thiscall NsTextCodeV0_2::EffStrCmp(NsTextCodeV0_2 *this, const char *instr); // idb
void __thiscall NsTextCodeV0_2::NsTextCodeV0_2(NsTextCodeV0_2 *this); // idb
NsTextCodeV0_2 *__thiscall NsTextCodeV0_2::`vector deleting destructor'(NsTextCodeV0_2 *this, unsigned int a2);
void __thiscall INsFile_NodeCreater::INsFile_NodeCreater(INsFile_NodeCreater *this); // idb
void __thiscall INsFile_NodeCreater::~INsFile_NodeCreater(INsFile_NodeCreater *this); // idb
INsFile_NodeCreater *__thiscall INsFile_NodeCreater::`vector deleting destructor'(INsFile_NodeCreater *this, unsigned int a2);
void __thiscall std::_List_val<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~_List_val<ItemViewDummy *,std::allocator<ItemViewDummy *>>(std::_List_val<NiPointer<NiAVObject>,std::allocator<NiPointer<NiAVObject> > > *this); // idb
void __cdecl std::_Dest_val<std::allocator<std::_List_nod<NiPointer<INsFile>,std::allocator<NiPointer<INsFile>>>::_Node>,std::_List_nod<NiPointer<INsFile>,std::allocator<NiPointer<INsFile>>>::_Node>(std::allocator<std::_List_nod<NiPointer<INsFile>,std::allocator<NiPointer<INsFile> > >::_Node> *_Alval, std::_List_nod<NiPointer<INsFile>,std::allocator<NiPointer<INsFile> > >::_Node *_Pdest); // idb
void __thiscall std::list<NiPointer<INsFile>,std::allocator<NiPointer<INsFile>>>::clear(std::list<NiPointer<INsFile>,std::allocator<NiPointer<INsFile> > > *this); // idb
void __thiscall INsFile::INsFile(INsFile *this); // idb
void __thiscall INsFile::~INsFile(INsFile *this); // idb
INsFile *__thiscall INsFile::`vector deleting destructor'(INsFile *this, unsigned int a2);
void __thiscall CNsReadAse::ClearMapData(CNsReadAse *this); // idb
int __thiscall CNsReadAse::GetIndex(CNsReadAse *this, float _fX, float _fY); // idb
void __thiscall CNsReadAse::CNsReadAse(CNsReadAse *this); // idb
void __thiscall CNsReadAse::~CNsReadAse(CNsReadAse *this); // idb
char __thiscall CNsReadAse::ReadAseFile(CNsReadAse *this, const char *_strASEFileName);
unsigned int __cdecl NiD3DSCM_Pixel::LookUpPredefinedMapping(const char *pszMapping); // idb
signed int __stdcall NiD3DSCM_Pixel::SetConstantConstant(NiD3DShaderProgram *pkShaderProgram, NiD3DShaderConstantMapEntry *pkEntry, unsigned int uiPass);
NiD3DSCM_Pixel *__thiscall NiD3DSCM_Pixel::`scalar deleting destructor'(NiD3DSCM_Pixel *this, unsigned int a2);
char __cdecl NiD3DSCM_Vertex::ParseKeyName(const char *pszOrigName, char *pszTrueName, unsigned int uiMaxLen, unsigned int *uiRegisterCount);
char __cdecl NiD3DSCM_Pixel::LookUpPredefinedMapping(const char *pszMapping, unsigned int *uiMappingID, unsigned int *uiNumRegisters);
signed int __cdecl NiD3DSCM_Pixel::LookUpPredefinedMappingType(const char *pszMapping);
signed int __stdcall NiD3DSCM_Pixel::SetupPredefinedEntry(NiD3DShaderConstantMapEntry *pkEntry);
signed int __stdcall NiD3DSCM_Pixel::SetupObjectEntry(NiD3DShaderConstantMapEntry *pkEntry);
signed int __thiscall NiD3DSCM_Pixel::PerformOperatorMultiply(NiD3DSCM_Pixel *this, NiD3DShaderProgram *pkShaderProgram, NiD3DShaderConstantMapEntry *pkEntry, NiShaderAttributeDesc::AttributeType eType1, NiShaderAttributeDesc::AttributeType eType2, bool bInverse, bool bTranspose);
signed int __stdcall NiD3DSCM_Pixel::PerformOperatorDivide(NiD3DShaderProgram *pkShaderProgram, NiD3DShaderConstantMapEntry *pkEntry, NiShaderAttributeDesc::AttributeType eType1, NiShaderAttributeDesc::AttributeType eType2, bool bInverse, bool bTranspose);
signed int __stdcall NiD3DSCM_Pixel::PerformOperatorAdd(NiD3DShaderProgram *pkShaderProgram, NiD3DShaderConstantMapEntry *pkEntry, NiShaderAttributeDesc::AttributeType eType1, NiShaderAttributeDesc::AttributeType eType2, bool bInverse, bool bTranspose);
signed int __stdcall NiD3DSCM_Pixel::PerformOperatorSubtract(NiD3DShaderProgram *pkShaderProgram, NiD3DShaderConstantMapEntry *pkEntry, NiShaderAttributeDesc::AttributeType eType1, NiShaderAttributeDesc::AttributeType eType2, bool bInverse, bool bTranspose);
signed int __stdcall NiD3DSCM_Pixel::SetDefinedConstant(NiD3DShaderProgram *pkShaderProgram, NiD3DShaderConstantMapEntry *pkEntry, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound, unsigned int uiPass);
signed int __stdcall NiD3DSCM_Pixel::SetAttributeConstant(NiD3DShaderProgram *pkShaderProgram, NiD3DShaderConstantMapEntry *pkEntry, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound, unsigned int uiPass, bool bGlobal, NiExtraData *pkExtraData);
signed int __stdcall NiD3DSCM_Pixel::SetGlobalConstant(NiD3DShaderProgram *pkShaderProgram, NiD3DShaderConstantMapEntry *pkEntry, unsigned int uiPass);
unsigned int __stdcall NiD3DSCM_Pixel::SetObjectConstant(NiD3DShaderProgram *pkShaderProgram, NiD3DShaderConstantMapEntry *pkEntry, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiSkinPartition::Partition *pkPartition, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound, unsigned int uiPass);
signed int __stdcall NiD3DSCM_Pixel::SetupDefinedConstantValue(unsigned int uiOperatorNum, NiD3DShaderConstantMapEntry *pkEntry, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound);
signed int __stdcall NiD3DSCM_Vertex::SetupConstantConstantValue(unsigned int uiOperatorNum, NiD3DShaderConstantMapEntry *pkEntry, unsigned int uiPass);
signed int __stdcall NiD3DSCM_Vertex::SetupAttributeConstantValue(unsigned int uiOperatorNum, NiD3DShaderConstantMapEntry *pkEntry, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiPropertyState *pkState, NiTransform *kWorld, NiBound *kWorldBound, unsigned int uiPass);
signed int __thiscall NiD3DSCM_Pixel::SetOperatorConstant(NiD3DSCM_Pixel *this, NiD3DShaderProgram *pkShaderProgram, NiD3DShaderConstantMapEntry *pkEntry, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound, unsigned int uiPass);
void __thiscall NiD3DSCM_Pixel::NiD3DSCM_Pixel(NiD3DSCM_Pixel *this, NiDX9Renderer *pkRenderer); // idb
int dynamic_initializer_for__BlockedData__();
void dynamic_initializer_for__CharCreateFrameWork::m_RTTI__();
void dynamic_initializer_for__CharSelectFrameWork::m_RTTI__();
void dynamic_initializer_for__Color::m_kDxBlackColor__();
void dynamic_initializer_for__Color::m_kDxRedColor__();
void dynamic_initializer_for__Color::m_kDxYellowColor__();
void dynamic_initializer_for__Color::m_kDxGoldColor__();
void dynamic_initializer_for__Color::m_kDxPurpleColor__();
void dynamic_initializer_for__Color::m_kDxBrownColor__();
void dynamic_initializer_for__Color::m_kDxPinkColor__();
void dynamic_initializer_for__Color::m_kDxEnemySideColor__();
void dynamic_initializer_for__Color::m_kDxNpcNameColor__();
void dynamic_initializer_for__Color::m_kDxWinTitleColor__();
int dynamic_initializer_for__Engine3D::ms_spCarToon__();
int dynamic_initializer_for__Engine3D::ms_spToonExtraData__();
void *dynamic_initializer_for__Font::ms_kFontDefine__();
int dynamic_initializer_for__Font::ms_spFont__();
int dynamic_initializer_for__IconMgr::ms_kTextureMap__();
int dynamic_initializer_for__IconMgr::ms_kAniTextureMap__();
int dynamic_initializer_for__g_kItemMixDataTab__();
int __thiscall dynamic_initializer_for__ItemViewDummyTab::m_DummyMap__(void *this);
int dynamic_initializer_for__MenuTexMgr::ms_aspTexture__();
int dynamic_initializer_for__TextFilterTable::ms_listBlockedID__();
void dynamic_initializer_for__MaskShader::m_RTTI__();
int dynamic_initializer_for__MaskShader::m_spShader__();
int dynamic_initializer_for__MaskShader::m_spNoAlphaBlendShader__();
void dynamic_initializer_for__MaskShader_NoAlphaBlend::m_RTTI__();
int dynamic_initializer_for__Cursor::ms_spDropIconTexture__();
int dynamic_initializer_for__Cursor::ms_spCursorRenderCamera__();
int dynamic_initializer_for__Cursor::ms_spCursorFrame__();
int dynamic_initializer_for__g_kSingleDataMap__();
int dynamic_initializer_for__NiFloatKeyregisterloaderreturn__();
int dynamic_initializer_for__NiBezFloatKeyregisterloaderreturn__();
int dynamic_initializer_for__NiPosKeyregisterloaderreturn__();
int dynamic_initializer_for__NiBezPosKeyregisterloaderreturn__();
int dynamic_initializer_for__NiRotKeyregisterloaderreturn__();
int dynamic_initializer_for__NiBezRotKeyregisterloaderreturn__();
int dynamic_initializer_for__NiBoolKeyregisterloaderreturn__();
int dynamic_initializer_for__NiColorKeyregisterloaderreturn__();
int dynamic_initializer_for__NiEulerRotKeyregisterloaderreturn__();
int dynamic_initializer_for__NiLinColorKeyregisterloaderreturn__();
int dynamic_initializer_for__NiLinFloatKeyregisterloaderreturn__();
int dynamic_initializer_for__NiLinPosKeyregisterloaderreturn__();
int dynamic_initializer_for__NiLinRotKeyregisterloaderreturn__();
int dynamic_initializer_for__NiTCBPosKeyregisterloaderreturn__();
int dynamic_initializer_for__NiTCBRotKeyregisterloaderreturn__();
int dynamic_initializer_for__NiTCBFloatKeyregisterloaderreturn__();
int dynamic_initializer_for__NiStepBoolKeyregisterloaderreturn__();
int dynamic_initializer_for__NiStepColorKeyregisterloaderreturn__();
int dynamic_initializer_for__NiStepFloatKeyregisterloaderreturn__();
int dynamic_initializer_for__NiStepPosKeyregisterloaderreturn__();
int dynamic_initializer_for__NiStepRotKeyregisterloaderreturn__();
void dynamic_initializer_for__NiAnimationSDMObject__();
void dynamic_initializer_for__NiCollisionSDMObject__();
void dynamic_initializer_for__NiMilesAudioSDMObject__();
void dynamic_initializer_for__NiParticleSDMObject__();
void dynamic_initializer_for__NiPortalSDMObject__();
int mhStrings::_dynamic_initializer_for__mhResObjDefaultRootName__();
int mhStrings::_dynamic_initializer_for__mhObjDefaultRootName__();
int mhStrings::_dynamic_initializer_for__mhRoomDefaultRootName__();
int mhStrings::_dynamic_initializer_for__mhRoomWallName__();
int mhStrings::_dynamic_initializer_for__mhRoomFloorName__();
int mhStrings::_dynamic_initializer_for__mhRoomRoofName__();
int mhStrings::_dynamic_initializer_for__mhRoomBlockName__();
int mhStrings::_dynamic_initializer_for__mhRoomTexStyleTileName__();
int mhStrings::_dynamic_initializer_for__mhRoomTexStyleCustomName__();
int mhStrings::_dynamic_initializer_for__mhStoCMapName__();
int mhStrings::_dynamic_initializer_for__mhCollisionParentName__();
int mhStrings::_dynamic_initializer_for__mhObjGeomParentName__();
int mhStrings::_dynamic_initializer_for__mhCollisionParentNamePick__();
int mhStrings::_dynamic_initializer_for__mhObjAmbLightNULL__();
int mhStrings::_dynamic_initializer_for__mhObjAmbLightNormal__();
int mhStrings::_dynamic_initializer_for__mhObjAmbLightMoveOK__();
int mhStrings::_dynamic_initializer_for__mhObjAmbLightMoveNO__();
int mhStrings::_dynamic_initializer_for__mhObjAmbLightRepair__();
int mhStrings::_dynamic_initializer_for__mhCharColliNodeName__();
int mhStrings::_dynamic_initializer_for__mhCharColliRootNodeName__();
int mhStrings::_dynamic_initializer_for__mhOtherCharColliRootName__();
int dynamic_initializer_for__CRTTIClass_CBaseObject_CNullClass_::ms_RTTI__();
int dynamic_initializer_for__CRTTIClass_CWorldConfig_CBaseObject_::ms_RTTI__();
void dynamic_initializer_for__AccountFrameWork::m_RTTI__();
void dynamic_initializer_for__LoginWorldNetFrameWork::m_RTTI__();
void dynamic_initializer_for__ZoneLoginNetFrameWork::m_RTTI__();
int mhStrings::_dynamic_initializer_for__mhRoomWallName___0();
int mhStrings::_dynamic_initializer_for__mhRoomFloorName___0();
int mhStrings::_dynamic_initializer_for__mhRoomRoofName___0();
int dynamic_initializer_for__m_kAttackedList__();
void dynamic_initializer_for__GameFrameWork::m_RTTI__();
int dynamic_initializer_for__GameFrameWork::ms_strLauncher__();
int dynamic_initializer_for__GameFrameWork::m_kOptionManager__();
int dynamic_initializer_for__GameFrameWork::m_kWhisperCharID__();
void dynamic_initializer_for__InvWin::m_RTTI__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spProposeTradeMenu__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spInvitePartyMenu__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spCancelMenu__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spDelegatePartyMenu__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spQuitPartyMenu__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spFirePartyMemberMenu__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spInviteGuildMenu__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spPartyMasterLootFreeSetupMenu__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spPartyMasterLootSequentialSetupMenu__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spPartyMemberLootFreeSetupMenu__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spPartyMemberLootSequentialSetupMenu__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spPartyLootSetupMenu__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spFollowCharMenu__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spPartyMasterLootSetupSubMenuWin__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spMainCharUnMetamorphosis__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spResolutionMenu0__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spResolutionMenu1__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spResolutionMenu2__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spResolutionMenu3__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spResolutionMenu4__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spResolutionMenu5__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spResolutionMenu6__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spResolutionMenu7__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spResolutionMenu8__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spResolutionMenu9__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spResolutionMenu10__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spResolutionMenu11__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spResolutionMenu12__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spResolutionMenu13__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spResolutionMenu14__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spResolutionMenu15__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spResolutionMenu16__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spResolutionMenu17__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spResolutionMenu18__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spResolutionMenu19__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spWhisper__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spTargetCharName__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spHighHolyPromise__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spPlaceMemory0__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spPlaceMemory1__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spPlaceMemory2__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spPlaceMemory3__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spPlaceMemory4__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spConfigRoom__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spShowBlog__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spChangeBlogAddr__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spKickGuest__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spSetArrModeOn__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spSetArrModeOff__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spReturnToInvMHItem__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spArrToInvMHItem__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spDeleteMHItem__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spObjAction__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spObjName__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spMHObjEndure__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spMHObjEndurePercentage__();
int dynamic_initializer_for__PopupMenuTemplate::m_spReArrange__();
int dynamic_initializer_for__PopupMenuTemplate::m_spSelectCancel__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spBuffUIMenu__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spRaidSelect__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spRaidInvite__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spRaidVanish__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spRaidLeave__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spChangeRaidLeader__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spChangeRaidLooter__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spRaidSubLeaderUp__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spRaidSubLeaderDown__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spCollectOpen__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spInviteFriend__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spRideOn__();
int dynamic_initializer_for__PopupMenuTemplate::ms_spVote__();
int dynamic_initializer_for__IconWin::ms_spOverGeom__();
int dynamic_initializer_for__IconWin::ms_spClickGeom__();
int dynamic_initializer_for__IconWin::ms_kCoolTimeIconList__();
int dynamic_initializer_for__SkillIcon::ms_kSkillIconList__();
void dynamic_initializer_for__QuestPigeonEffect::m_RTTI__();
int dynamic_initializer_for__Bank::ms_aspInv__();
int dynamic_initializer_for__Bank::ms_mapExtraInv__();
int dynamic_initializer_for__ICharDeadEvent::ms_kEventList__();
int dynamic_initializer_for__GuildTournamentStorage::ms_aspInv__();
int dynamic_initializer_for__MagicField::ms_kMagicFieldList__();
int dynamic_initializer_for__MapNavigator::ms_spMapNavigatorTask__();
int dynamic_initializer_for__ItemMarket::ms_kItemSellInfoList__();
int dynamic_initializer_for__g_kShortCutMgr__();
int dynamic_initializer_for__UserTrade::ms_aspOppInv__();
int dynamic_initializer_for__UserTrade::ms_aspMyInv__();
int dynamic_initializer_for__GuildBD::ms_spTempTexture__();
int dynamic_initializer_for__NameBD::ms_spTempTexture__();
int dynamic_initializer_for__PrivateStoreBD::ms_spTempTexture__();
int dynamic_initializer_for__g_kScrnBDMgr__();
int dynamic_initializer_for__ScreenBoardTexture::sm_spSrcTexture__();
int dynamic_initializer_for__ScreenBoardTexture::sm_spShadowSrcTexture__();
int dynamic_initializer_for__SpeechBD::ms_spTempTexture__();
void dynamic_initializer_for__LinkFrameWork::m_RTTI__();
void dynamic_initializer_for__LoadingFrameWork::m_RTTI__();
int dynamic_initializer_for__ITimer::m_kTimerList__();
void dynamic_initializer_for__CHairShopFrameWork::m_RTTI__();
int dynamic_initializer_for__ActionInfoTable::m_kCharMap__();
int dynamic_initializer_for__ActionInfoTable::m_kMobMap__();
int dynamic_initializer_for__ActionInfoTable::m_kRidePetMap__();
int dynamic_initializer_for__ActionInfoTable::m_kMoverMap__();
int dynamic_initializer_for__ActionInfoTable::m_kPetMap__();
int dynamic_initializer_for__g_kTextKeyMatch__();
int dynamic_initializer_for__g_characterTitleData__();
int dynamic_initializer_for__g_kCharMgr__();
int dynamic_initializer_for__g_kCharResMgr__();
int dynamic_initializer_for__PortraitTextureBuffer::ms_kOtherFaceTextureMap__();
int dynamic_initializer_for__PortraitTextureBuffer::ms_spBlackTexture__();
int dynamic_initializer_for__PortraitTextureBuffer::ms_spDefaultTexture__();
int dynamic_initializer_for__PortraitTextureBuffer::ms_kMobFaceTextureMap__();
int dynamic_initializer_for__PortraitTextureBuffer::ms_kMobFaceTextureList__();
int dynamic_initializer_for__PortraitTextureBuffer::ms_kMoverFaceTextureMap__();
int dynamic_initializer_for__PortraitTextureBuffer::ms_kMoverFaceTextureList__();
int dynamic_initializer_for__PortraitTextureBuffer::ms_kPetFaceTextureMap__();
int dynamic_initializer_for__PortraitTextureBuffer::ms_kPetFaceTextureList__();
int dynamic_initializer_for__g_kUser__();
int dynamic_initializer_for__g_kItemAuthority__();
int dynamic_initializer_for__g_kDropItemMgr__();
void dynamic_initializer_for__DynaminUV::m_RTTI__();
int dynamic_initializer_for__g_kInventory__();
int dynamic_initializer_for__g_kChargedItem__();
int __thiscall dynamic_initializer_for__ItemInfoTab::m_ItemInfoMapByInxName__(void *this);
int dynamic_initializer_for__ItemRepairTask::ms_spItemRepairTask__();
int dynamic_initializer_for__g_kMapObjMgr__();
int dynamic_initializer_for__g_kWorld__();
void dynamic_initializer_for__NiTextureAccumulator::m_RTTI__();
int mhStrings::_dynamic_initializer_for__mhRoomWallName___1();
int mhStrings::_dynamic_initializer_for__mhRoomFloorName___1();
int dynamic_initializer_for__dd__();
int dynamic_initializer_for__g_kServer__();
void dynamic_initializer_for__AfterImgEff::m_RTTI__();
int dynamic_initializer_for__AfterImgEff::m_mapEffectNode__();
int dynamic_initializer_for__AfterImgEff::m_mapTexture__();
void dynamic_initializer_for__ArrowEff::m_RTTI__();
void dynamic_initializer_for__AttachEff::m_RTTI__();
void dynamic_initializer_for__Effect::m_RTTI__();
int dynamic_initializer_for__CRTTIClass_CHazeScreenEffect_CBaseObject_::ms_RTTI__();
int dynamic_initializer_for__g_kEffectMgr__();
void dynamic_initializer_for__ExpEffect::m_RTTI__();
void dynamic_initializer_for__StretchEffect::m_RTTI__();
void dynamic_initializer_for__WeddingEffect::m_RTTI__();
int dynamic_initializer_for__g_kTextEffMgr__();
int dynamic_initializer_for__SoundGroup::ms_kSoundGroupList__();
int dynamic_initializer_for__g_kSoundMgr__();
int dynamic_initializer_for__MachineOpt::ms_kWinPosList__();
__int64 dynamic_initializer_for__MachineOpt::ms_kGraphicOption__();
void dynamic_initializer_for__MachineOpt::ms_kGameOption__();
int dynamic_initializer_for__MachineOpt::ms_kSoundOption__();
__int64 dynamic_initializer_for__MachineOpt::ms_shortCutSizeOptionData__();
int dynamic_initializer_for__MachineOpt::ms_kUserLoginOption__();
__int64 dynamic_initializer_for__MachineOpt::m_stSaveWinPosOption__();
void dynamic_initializer_for__MachineOpt::m_keyMappingBuff__();
int dynamic_initializer_for__Skill::m_kUseList__();
int dynamic_initializer_for__SkillEmpowerRequest::ms_kReqList__();
int dynamic_initializer_for__g_kParty__();
int __thiscall dynamic_initializer_for__ActSkillInfoTab::m_hashMap_ByNameIndex__(void *this);
int dynamic_initializer_for__ITask::ms_kRootTask__();
int dynamic_initializer_for__MHDiceGameTask::ms_spMHDiceGameTask__();
int dynamic_initializer_for__StatPointReqTask::ms_spInstance__();
int dynamic_initializer_for__WeaponTitleTab::ms_kTab__();
int __thiscall dynamic_initializer_for__ProduceInfoTable::m_MaterialMap__(void *this);
int dynamic_initializer_for__QuestHelperMgr::ms_pQuestMCList__();
int dynamic_initializer_for__GuildListTask::ms_spGuildListTask__();
int dynamic_initializer_for__GuildMemberTask::ms_spGuildMemberTask__();
int dynamic_initializer_for__GuildTask::ms_spGuildTask__();
int mhStrings::_dynamic_initializer_for__mhCollisionParentName___0();
int mhStrings::_dynamic_initializer_for__mhCollisionParentNamePick___0();
int mhStrings::_dynamic_initializer_for__mhCharColliRootNodeName___0();
int mhStrings::_dynamic_initializer_for__mhOtherCharColliRootName___0();
int mhStrings::_dynamic_initializer_for__mhResObjDefaultRootName___0();
int mhStrings::_dynamic_initializer_for__mhObjDefaultRootName___0();
int mhStrings::_dynamic_initializer_for__mhCollisionParentName___1();
int mhStrings::_dynamic_initializer_for__mhCollisionParentNamePick___1();
int mhStrings::_dynamic_initializer_for__mhObjAmbLightNormal___0();
int mhStrings::_dynamic_initializer_for__mhObjAmbLightMoveOK___0();
int mhStrings::_dynamic_initializer_for__mhObjAmbLightMoveNO___0();
int mhStrings::_dynamic_initializer_for__mhObjAmbLightRepair___0();
int mhStrings::_dynamic_initializer_for__mhCharColliNodeName___0();
int mhStrings::_dynamic_initializer_for__mhOtherCharColliRootName___1();
int dynamic_initializer_for__g_kMiniHouseMgr__();
int mhStrings::_dynamic_initializer_for__mhObjDefaultRootName___1();
int mhStrings::_dynamic_initializer_for__mhRoomDefaultRootName___0();
int mhStrings::_dynamic_initializer_for__mhRoomWallName___2();
int mhStrings::_dynamic_initializer_for__mhRoomFloorName___2();
int mhStrings::_dynamic_initializer_for__mhRoomRoofName___1();
int mhStrings::_dynamic_initializer_for__mhRoomBlockName___0();
int mhStrings::_dynamic_initializer_for__mhRoomTexStyleTileName___0();
int mhStrings::_dynamic_initializer_for__mhRoomTexStyleCustomName___0();
int mhStrings::_dynamic_initializer_for__mhCollisionParentName___2();
int dynamic_initializer_for__ChargedItemList::ms_kUsingList__();
int dynamic_initializer_for__g_kInstance__();
int dynamic_initializer_for__g_kNetMgr__();
int dynamic_initializer_for__ORTable::ort_Index__();
int dynamic_initializer_for__ORTable::ort_String__();
int dynamic_initializer_for__ORTable::ort_Byte__();
int dynamic_initializer_for__ORTable::ort_Word__();
int dynamic_initializer_for__ORTable::ort_Dwrd__();
int dynamic_initializer_for__ORTable::ort_Dword__();
int dynamic_initializer_for__OptionReader::or_CommentMark__();
int dynamic_initializer_for__OptionReader::or_Brace__();
int dynamic_initializer_for__OptionReader::or_Ignore__();
int dynamic_initializer_for__OptionReader::or_Delimiter__();
int dynamic_initializer_for__OptionReader::or_Exchange__();
int dynamic_initializer_for__OptionReader::or_Table__();
int dynamic_initializer_for__OptionReader::or_ColumnType__();
int dynamic_initializer_for__OptionReader::or_ColumnName__();
int dynamic_initializer_for__OptionReader::or_Record__();
int dynamic_initializer_for__OptionReader::or_RecordIn__();
int dynamic_initializer_for__OptionReader::or_End__();
int dynamic_initializer_for__WeddingTask::ms_spWeddingTask__();
int dynamic_initializer_for__GuildAcademyMemberTask::ms_spGuildAcademyMemberTask__();
int dynamic_initializer_for__GuildAcademySelectTask::ms_spGuildAcademySelectTask__();
int dynamic_initializer_for__GuildAcademyTask::ms_spGuildAcademyTask__();
int dynamic_initializer_for__GuildAcademyStorage::ms_aspInv__();
int dynamic_initializer_for__g_kRaidinfo__();
int dynamic_initializer_for__ShnDataFile__();
int std::_dynamic_initializer_for__initlocks__();
int std::_dynamic_initializer_for___Fac_tidy_reg__();
int std::_dynamic_initializer_for__classic_locale__();
int std::_dynamic_initializer_for___Generic_object__();
int std::_dynamic_initializer_for___Iostream_object__();
int std::_dynamic_initializer_for___System_object__();
int std::_dynamic_initializer_for__initlocks___0();
int dynamic_initializer_for__init_atexit__();
int dynamic_initializer_for__NiTAbstractPoolAllocator_NiActorManager::TimelineData_::ms_kCriticalSection__();
void dynamic_initializer_for__NiPosKey::ms_fSampleDelta__();
float dynamic_initializer_for__NiPosKey::ms_kDefault__();
int dynamic_initializer_for__NiRotKey::ms_kDefault__();
int dynamic_initializer_for__NiColorKey::ms_kDefault__();
void dynamic_initializer_for__NiTextKeyExtraData::m_RTTI__();
void dynamic_initializer_for__NiControllerSequence::m_RTTI__();
void dynamic_initializer_for__NiTransformController::m_RTTI__();
void dynamic_initializer_for__NiBoneLODController::m_RTTI__();
void dynamic_initializer_for__NiTextureTransformController::m_RTTI__();
void dynamic_initializer_for__NiMaterialColorController::m_RTTI__();
void dynamic_initializer_for__NiAlphaController::m_RTTI__();
void dynamic_initializer_for__NiControllerManager::m_RTTI__();
void dynamic_initializer_for__NiVisController::m_RTTI__();
void dynamic_initializer_for__NiUVData::m_RTTI__();
void dynamic_initializer_for__NiUVController::m_RTTI__();
void dynamic_initializer_for__NiTransformInterpolator::m_RTTI__();
void dynamic_initializer_for__NiStringPalette::m_RTTI__();
void dynamic_initializer_for__NiSequenceStreamHelper::m_RTTI__();
void dynamic_initializer_for__NiSequence::m_RTTI__();
void dynamic_initializer_for__NiRotData::m_RTTI__();
void dynamic_initializer_for__NiRollController::m_RTTI__();
void dynamic_initializer_for__NiQuaternionInterpolator::m_RTTI__();
void dynamic_initializer_for__NiPosData::m_RTTI__();
void dynamic_initializer_for__NiPoint3Interpolator::m_RTTI__();
void dynamic_initializer_for__NiPathInterpolator::m_RTTI__();
void dynamic_initializer_for__NiPathController::m_RTTI__();
void dynamic_initializer_for__NiMultiTargetTransformController::m_RTTI__();
void dynamic_initializer_for__NiMorphData::m_RTTI__();
void dynamic_initializer_for__NiLookAtInterpolator::m_RTTI__();
void dynamic_initializer_for__NiLookAtController::m_RTTI__();
void dynamic_initializer_for__NiLightDimmerController::m_RTTI__();
void dynamic_initializer_for__NiLightColorController::m_RTTI__();
void dynamic_initializer_for__NiKeyframeManager::m_RTTI__();
void dynamic_initializer_for__NiTransformData::m_RTTI__();
void dynamic_initializer_for__NiGeomMorpherController::m_RTTI__();
void dynamic_initializer_for__NiFloatsExtraDataPoint3Controller::m_RTTI__();
void dynamic_initializer_for__NiFloatsExtraDataController::m_RTTI__();
void dynamic_initializer_for__NiFloatInterpolator::m_RTTI__();
void dynamic_initializer_for__NiFloatExtraDataController::m_RTTI__();
void dynamic_initializer_for__NiFloatData::m_RTTI__();
void dynamic_initializer_for__NiFlipController::m_RTTI__();
void dynamic_initializer_for__NiColorInterpolator::m_RTTI__();
void dynamic_initializer_for__NiColorExtraDataController::m_RTTI__();
void dynamic_initializer_for__NiColorData::m_RTTI__();
void dynamic_initializer_for__NiBSplineTransformInterpolator::m_RTTI__();
void dynamic_initializer_for__NiBSplinePoint3Interpolator::m_RTTI__();
void dynamic_initializer_for__NiBSplineFloatInterpolator::m_RTTI__();
void dynamic_initializer_for__NiBSplineCompTransformInterpolator::m_RTTI__();
void dynamic_initializer_for__NiBSplineCompPoint3Interpolator::m_RTTI__();
void dynamic_initializer_for__NiBSplineCompFloatInterpolator::m_RTTI__();
void dynamic_initializer_for__NiBSplineCompColorInterpolator::m_RTTI__();
void dynamic_initializer_for__NiBSplineColorInterpolator::m_RTTI__();
void dynamic_initializer_for__NiBSplineData::m_RTTI__();
void dynamic_initializer_for__NiBSplineBasisData::m_RTTI__();
void dynamic_initializer_for__NiBoolTimelineInterpolator::m_RTTI__();
void dynamic_initializer_for__NiBoolInterpolator::m_RTTI__();
void dynamic_initializer_for__NiBoolData::m_RTTI__();
void dynamic_initializer_for__NiBlendTransformInterpolator::m_RTTI__();
void dynamic_initializer_for__NiBlendQuaternionInterpolator::m_RTTI__();
void dynamic_initializer_for__NiBlendPoint3Interpolator::m_RTTI__();
void dynamic_initializer_for__NiBlendFloatInterpolator::m_RTTI__();
void dynamic_initializer_for__NiBlendColorInterpolator::m_RTTI__();
void dynamic_initializer_for__NiBlendBoolInterpolator::m_RTTI__();
void dynamic_initializer_for__NiBlendAccumTransformInterpolator::m_RTTI__();
void dynamic_initializer_for__NiInterpController::m_RTTI__();
void dynamic_initializer_for__NiBlendInterpolator::m_RTTI__();
void dynamic_initializer_for__NiSingleInterpController::m_RTTI__();
void dynamic_initializer_for__NiQuatTransform::INVALID_ROTATE__();
void dynamic_initializer_for__NiInterpolator::m_RTTI__();
void dynamic_initializer_for__NiInterpolator::INVALID_QUATERNION__();
void dynamic_initializer_for__NiFloatInterpController::m_RTTI__();
void dynamic_initializer_for__NiPoint3InterpController::m_RTTI__();
void dynamic_initializer_for__NiBoolInterpController::m_RTTI__();
void dynamic_initializer_for__NiKeyBasedInterpolator::m_RTTI__();
void dynamic_initializer_for__NiFloatController::m_RTTI__();
void dynamic_initializer_for__NiExtraDataController::m_RTTI__();
void dynamic_initializer_for__NiBSplineInterpolator::m_RTTI__();
void dynamic_initializer_for__NiCollisionData::m_RTTI__();
int dynamic_initializer_for__NiCollisionConvert::ms_kSphereABV__();
void dynamic_initializer_for__NiNode::m_RTTI__();
void dynamic_initializer_for__NiObjectNET::m_RTTI__();
void dynamic_initializer_for__NiMainSDMObject__();
void dynamic_initializer_for__NiObject::m_RTTI__();
void dynamic_initializer_for__NiAVObject::m_RTTI__();
void dynamic_initializer_for__NiMaterialProperty::m_RTTI__();
int dynamic_initializer_for__NiMaterialProperty::ms_spDefault__();
void dynamic_initializer_for__NI_PI__();
void dynamic_initializer_for__NI_HALF_PI__();
void dynamic_initializer_for__NI_TWO_PI__();
void dynamic_initializer_for__NiRenderer::m_RTTI__();
void dynamic_initializer_for__NiProperty::m_RTTI__();
void dynamic_initializer_for__NiVertexColorProperty::m_RTTI__();
int dynamic_initializer_for__NiVertexColorProperty::ms_spDefault__();
int dynamic_initializer_for__NiTAbstractPoolAllocator_unsigned_int_::ms_kCriticalSection__();
void dynamic_initializer_for__NiAlphaProperty::m_RTTI__();
int dynamic_initializer_for__NiAlphaProperty::ms_spDefault__();
void dynamic_initializer_for__NiFogProperty::m_RTTI__();
int dynamic_initializer_for__NiFogProperty::ms_spDefault__();
void dynamic_initializer_for__NiDirectionalLight::m_RTTI__();
void dynamic_initializer_for__NiDynamicEffect::m_RTTI__();
void dynamic_initializer_for__NiAmbientLight::m_RTTI__();
void dynamic_initializer_for__NiSortAdjustNode::m_RTTI__();
void dynamic_initializer_for__NiCamera::m_RTTI__();
void dynamic_initializer_for__NiTexturingProperty::m_RTTI__();
int dynamic_initializer_for__NiTexturingProperty::ms_spDefault__();
void dynamic_initializer_for__NiSourceTexture::m_RTTI__();
int dynamic_initializer_for__NiImageConverter::ms_spConverter__();
void dynamic_initializer_for__NiTriShape::m_RTTI__();
void dynamic_initializer_for__NiRenderTargetGroup::m_RTTI__();
void dynamic_initializer_for__NiRenderedTexture::m_RTTI__();
void dynamic_initializer_for__NiScreenElementsData::m_RTTI__();
void dynamic_initializer_for__NiScreenElements::m_RTTI__();
void dynamic_initializer_for__NiExtraData::m_RTTI__();
void dynamic_initializer_for__NiBinaryExtraData::m_RTTI__();
void dynamic_initializer_for__NiShader::m_RTTI__();
void dynamic_initializer_for__NiPixelData::m_RTTI__();
void dynamic_initializer_for__NiZBufferProperty::m_RTTI__();
int dynamic_initializer_for__NiZBufferProperty::ms_spDefault__();
void dynamic_initializer_for__NiAlphaAccumulator::m_RTTI__();
void dynamic_initializer_for__NiIntegerExtraData::m_RTTI__();
void dynamic_initializer_for__NiStringExtraData::m_RTTI__();
void dynamic_initializer_for__NiTimeController::m_RTTI__();
int dynamic_initializer_for__NiTimeController::ms_kCachedValuesLock__();
void dynamic_initializer_for__NiRangeLODData::m_RTTI__();
void dynamic_initializer_for__NiLODNode::m_RTTI__();
void dynamic_initializer_for__NiGeometry::m_RTTI__();
void dynamic_initializer_for__NiSkinPartition::m_RTTI__();
void dynamic_initializer_for__NiTriBasedGeomData::m_RTTI__();
void dynamic_initializer_for__NiTriBasedGeom::m_RTTI__();
void dynamic_initializer_for__NiSkinInstance::m_RTTI__();
void dynamic_initializer_for__NiAccumulator::m_RTTI__();
void dynamic_initializer_for__NiCollisionObject::m_RTTI__();
void dynamic_initializer_for__NiTexture::m_RTTI__();
int dynamic_initializer_for__NiTexture::ms_kTextureListCriticalSection__();
int dynamic_initializer_for__NiTexture::RendererData::ms_aspReplacementData__();
void dynamic_initializer_for__NiTexture::RendererData::ms_kReplacementFormat__();
void dynamic_initializer_for__NiStencilProperty::m_RTTI__();
int dynamic_initializer_for__NiStencilProperty::ms_spDefault__();
void dynamic_initializer_for__NiTriShapeDynamicData::m_RTTI__();
void dynamic_initializer_for__NiPalette::m_RTTI__();
int dynamic_initializer_for__NiPalette::ms_kPaletteListCriticalSection__();
int dynamic_initializer_for__NiStream::ms_kCleanupCriticalSection__();
void dynamic_initializer_for__ISQRT_ADDITIVE_CONSTANT__();
void dynamic_initializer_for__ISQRT_FACTOR__();
void dynamic_initializer_for__NiSkinData::m_RTTI__();
void dynamic_initializer_for__NiTextureTransform::IDENTITY__();
void dynamic_initializer_for__NiAVObjectPalette::m_RTTI__();
void dynamic_initializer_for__NiDefaultAVObjectPalette::m_RTTI__();
void dynamic_initializer_for__NiGeometryData::m_RTTI__();
int dynamic_initializer_for__NiGeometryData::ms_kCritSec__();
void dynamic_initializer_for__NiLight::m_RTTI__();
void dynamic_initializer_for__NiFloatsExtraData::m_RTTI__();
void dynamic_initializer_for__NiColorExtraData::m_RTTI__();
void dynamic_initializer_for__NiTriStrips::m_RTTI__();
void dynamic_initializer_for__NiSwitchNode::m_RTTI__();
void dynamic_initializer_for__NiVertWeightsExtraData::m_RTTI__();
void dynamic_initializer_for__NiTriShapeData::m_RTTI__();
void dynamic_initializer_for__NiDepthStencilBuffer::m_RTTI__();
void dynamic_initializer_for__Ni2DBuffer::m_RTTI__();
void dynamic_initializer_for__NiBackToFrontAccumulator::m_RTTI__();
void dynamic_initializer_for__NiLODData::m_RTTI__();
void dynamic_initializer_for__NiTriStripsData::m_RTTI__();
void dynamic_initializer_for__NiDitherProperty::m_RTTI__();
int dynamic_initializer_for__NiDitherProperty::ms_spDefault__();
void dynamic_initializer_for__NiRendererSpecificProperty::m_RTTI__();
int dynamic_initializer_for__NiRendererSpecificProperty::ms_spDefault__();
void dynamic_initializer_for__NiShadeProperty::m_RTTI__();
int dynamic_initializer_for__NiShadeProperty::ms_spDefault__();
void dynamic_initializer_for__NiSpecularProperty::m_RTTI__();
int dynamic_initializer_for__NiSpecularProperty::ms_spDefault__();
void dynamic_initializer_for__NiWireframeProperty::m_RTTI__();
int dynamic_initializer_for__NiWireframeProperty::ms_spDefault__();
void dynamic_initializer_for__NiScreenGeometryData::m_RTTI__();
void dynamic_initializer_for__NiScreenGeometry::m_RTTI__();
void dynamic_initializer_for__NiScreenPolygon::m_RTTI__();
void dynamic_initializer_for__NiScreenSpaceCamera::m_RTTI__();
void dynamic_initializer_for__NiVectorExtraData::m_RTTI__();
void dynamic_initializer_for__NiTextureEffect::m_RTTI__();
void dynamic_initializer_for__NiSwitchStringExtraData::m_RTTI__();
void dynamic_initializer_for__NiStringsExtraData::m_RTTI__();
void dynamic_initializer_for__NiSpotLight::m_RTTI__();
void dynamic_initializer_for__NiSourceCubeMap::m_RTTI__();
void dynamic_initializer_for__NiScreenTexture::m_RTTI__();
void dynamic_initializer_for__NiScreenLODData::m_RTTI__();
void dynamic_initializer_for__NiParticlesData::m_RTTI__();
void dynamic_initializer_for__NiPointLight::m_RTTI__();
void dynamic_initializer_for__NiParticleMeshesData::m_RTTI__();
void dynamic_initializer_for__NiParticleMeshes::m_RTTI__();
void dynamic_initializer_for__NiLinesData::m_RTTI__();
void dynamic_initializer_for__NiLines::m_RTTI__();
void dynamic_initializer_for__NiIntegersExtraData::m_RTTI__();
void dynamic_initializer_for__NiFloatExtraData::m_RTTI__();
void dynamic_initializer_for__NiBSPNode::m_RTTI__();
void dynamic_initializer_for__NiBooleanExtraData::m_RTTI__();
void dynamic_initializer_for__NiBillboardNode::m_RTTI__();
void dynamic_initializer_for__NiParticles::m_RTTI__();
void dynamic_initializer_for__NiAdditionalGeometryData::m_RTTI__();
void dynamic_initializer_for__NiAudioSystem::m_RTTI__();
void dynamic_initializer_for__NiMilesAudioSystem::m_RTTI__();
void dynamic_initializer_for__NiMilesSource::m_RTTI__();
void dynamic_initializer_for__NiMilesListener::m_RTTI__();
void dynamic_initializer_for__NiAudioSource::m_RTTI__();
void dynamic_initializer_for__NiAudioListener::m_RTTI__();
void dynamic_initializer_for__NiPSysEmitterCtlr::m_RTTI__();
void dynamic_initializer_for__NiPSysVortexFieldModifier::m_RTTI__();
void dynamic_initializer_for__NiPSysUpdateCtlr::m_RTTI__();
void dynamic_initializer_for__NiPSysTurbulenceFieldModifier::m_RTTI__();
void dynamic_initializer_for__NiPSysSphericalCollider::m_RTTI__();
void dynamic_initializer_for__NiPSysSphereEmitter::m_RTTI__();
void dynamic_initializer_for__NiPSysSpawnModifier::m_RTTI__();
void dynamic_initializer_for__NiPSysRotationModifier::m_RTTI__();
void dynamic_initializer_for__NiPSysResetOnLoopCtlr::m_RTTI__();
void dynamic_initializer_for__NiPSysRadialFieldModifier::m_RTTI__();
void dynamic_initializer_for__NiPSysPositionModifier::m_RTTI__();
void dynamic_initializer_for__NiPSysPlanarCollider::m_RTTI__();
void dynamic_initializer_for__NiPSysModifierActiveCtlr::m_RTTI__();
void dynamic_initializer_for__NiPSysMeshUpdateModifier::m_RTTI__();
void dynamic_initializer_for__NiPSysMeshEmitter::m_RTTI__();
void dynamic_initializer_for__NiPSysInitialRotSpeedVarCtlr::m_RTTI__();
void dynamic_initializer_for__NiPSysInitialRotSpeedCtlr::m_RTTI__();
void dynamic_initializer_for__NiPSysInitialRotAngleVarCtlr::m_RTTI__();
void dynamic_initializer_for__NiPSysInitialRotAngleCtlr::m_RTTI__();
void dynamic_initializer_for__NiPSysGrowFadeModifier::m_RTTI__();
void dynamic_initializer_for__NiPSysGravityStrengthCtlr::m_RTTI__();
void dynamic_initializer_for__NiPSysGravityFieldModifier::m_RTTI__();
void dynamic_initializer_for__NiPSysGravityModifier::m_RTTI__();
void dynamic_initializer_for__NiPSysFieldMaxDistanceCtlr::m_RTTI__();
void dynamic_initializer_for__NiPSysFieldMagnitudeCtlr::m_RTTI__();
void dynamic_initializer_for__NiPSysFieldAttenuationCtlr::m_RTTI__();
void dynamic_initializer_for__NiPSysEmitterSpeedCtlr::m_RTTI__();
void dynamic_initializer_for__NiPSysEmitterPlanarAngleVarCtlr::m_RTTI__();
void dynamic_initializer_for__NiPSysEmitterPlanarAngleCtlr::m_RTTI__();
void dynamic_initializer_for__NiPSysEmitterLifeSpanCtlr::m_RTTI__();
void dynamic_initializer_for__NiPSysEmitterInitialRadiusCtlr::m_RTTI__();
void dynamic_initializer_for__NiPSysEmitterDeclinationVarCtlr::m_RTTI__();
void dynamic_initializer_for__NiPSysEmitterDeclinationCtlr::m_RTTI__();
void dynamic_initializer_for__NiPSysEmitterCtlrData::m_RTTI__();
void dynamic_initializer_for__NiPSysDragModifier::m_RTTI__();
void dynamic_initializer_for__NiPSysDragFieldModifier::m_RTTI__();
void dynamic_initializer_for__NiPSysData::m_RTTI__();
void dynamic_initializer_for__NiPSysCylinderEmitter::m_RTTI__();
void dynamic_initializer_for__NiPSysColorModifier::m_RTTI__();
void dynamic_initializer_for__NiPSysColliderManager::m_RTTI__();
void dynamic_initializer_for__NiPSysBoxEmitter::m_RTTI__();
void dynamic_initializer_for__NiPSysBoundUpdateModifier::m_RTTI__();
void dynamic_initializer_for__NiPSysBombModifier::m_RTTI__();
void dynamic_initializer_for__NiPSysAgeDeathModifier::m_RTTI__();
void dynamic_initializer_for__NiPSysAirFieldSpreadCtlr::m_RTTI__();
void dynamic_initializer_for__NiPSysAirFieldModifier::m_RTTI__();
void dynamic_initializer_for__NiPSysAirFieldInheritVelocityCtlr::m_RTTI__();
void dynamic_initializer_for__NiPSysAirFieldAirFrictionCtlr::m_RTTI__();
void dynamic_initializer_for__NiParticleSystem::m_RTTI__();
void dynamic_initializer_for__NiMeshPSysData::m_RTTI__();
void dynamic_initializer_for__NiMeshParticleSystem::m_RTTI__();
void dynamic_initializer_for__NiPSysModifierCtlr::m_RTTI__();
void dynamic_initializer_for__NiPSysEmitter::m_RTTI__();
void dynamic_initializer_for__NiPSysModifier::m_RTTI__();
void dynamic_initializer_for__NiPSysFieldModifier::m_RTTI__();
void dynamic_initializer_for__NiPSysCollider::m_RTTI__();
void dynamic_initializer_for__NiPSysVolumeEmitter::m_RTTI__();
void dynamic_initializer_for__NiPSysModifierBoolCtlr::m_RTTI__();
void dynamic_initializer_for__NiPSysModifierFloatCtlr::m_RTTI__();
_BYTE *dynamic_initializer_for__NiLogger::ms_akMessageOptions__();
int dynamic_initializer_for__NiLogger::ms_kCriticalSection__();
void dynamic_initializer_for__NiRoom::m_RTTI__();
void dynamic_initializer_for__NiOldWall::m_RTTI__();
void dynamic_initializer_for__NiRoomGroup::m_RTTI__();
void dynamic_initializer_for__NiPortal::m_RTTI__();
void dynamic_initializer_for__NiInputSystem::m_RTTI__();
void dynamic_initializer_for__NiInputSystem::CreateParams::m_RTTI__();
void dynamic_initializer_for__NiDI8InputSystem::m_RTTI__();
void dynamic_initializer_for__NiDI8InputSystem::DI8CreateParams::m_RTTI__();
void dynamic_initializer_for__NiInputGamePad::m_RTTI__();
void dynamic_initializer_for__NiInputDevice::m_RTTI__();
void dynamic_initializer_for__NiInputDI8Mouse::m_RTTI__();
void dynamic_initializer_for__NiInputDI8Keyboard::m_RTTI__();
void dynamic_initializer_for__NiInputDI8GamePad::m_RTTI__();
void dynamic_initializer_for__NiInputMouse::m_RTTI__();
void dynamic_initializer_for__NiInputKeyboard::m_RTTI__();
void dynamic_initializer_for__NiCollisionSDMObject___0();
void dynamic_initializer_for__NSBShaderLibSDMObject__();
int dynamic_initializer_for__g_kParsedShaderList__();
void dynamic_initializer_for__NiD3DXEffectShaderSDMObject__();
void dynamic_initializer_for__NiD3DXEffectShader::m_RTTI__();
void dynamic_initializer_for__NiCollisionSDMObject___1();
void dynamic_initializer_for__NiCollisionSDMObject___2();
int dynamic_initializer_for__NpModelData_NiTexturingProperty::ms_mapTextureProperty__();
void dynamic_initializer_for__NiCollisionSDMObject___3();
int dynamic_initializer_for__NpKMI_Tool::ms_mapPartsSIF__();
int dynamic_initializer_for__NpModelData_KFM::ms_mapKFMTool__();
int dynamic_initializer_for__NpModelData_ActorM::ms_mapActorManager__();
void dynamic_initializer_for__NiCollisionSDMObject___4();
void dynamic_initializer_for__NiCollisionSDMObject___5();
void dynamic_initializer_for__NiCollisionSDMObject___6();
void dynamic_initializer_for__NiCollisionSDMObject___7();
void dynamic_initializer_for__NsPgToonRegister_v2::m_RTTI__();
void dynamic_initializer_for__NPTR_ISShader_v2::m_RTTI__();
void dynamic_initializer_for__INpShader::m_RTTI__();
void dynamic_initializer_for__NsPgToonExtraData::m_RTTI__();
void dynamic_initializer_for__NiCollisionSDMObject___8();
void dynamic_initializer_for__NsPgCatoonShader::m_RTTI__();
int dynamic_initializer_for__NiColorKeyregisterloaderreturn___0();
int dynamic_initializer_for__NiFloatKeyregisterloaderreturn___0();
int dynamic_initializer_for__NiBoolKeyregisterloaderreturn___0();
void dynamic_initializer_for__NiParticleSDMObject___0();
void dynamic_initializer_for__NiCollisionSDMObject___9();
void dynamic_initializer_for__NiCollisionSDMObject___10();
int dynamic_initializer_for__NiFloatKeyregisterloaderreturn___1();
int dynamic_initializer_for__NiBezFloatKeyregisterloaderreturn___0();
int dynamic_initializer_for__NiPosKeyregisterloaderreturn___0();
int dynamic_initializer_for__NiBezPosKeyregisterloaderreturn___0();
int dynamic_initializer_for__NiRotKeyregisterloaderreturn___0();
int dynamic_initializer_for__NiBezRotKeyregisterloaderreturn___0();
int dynamic_initializer_for__NiBoolKeyregisterloaderreturn___1();
int dynamic_initializer_for__NiColorKeyregisterloaderreturn___1();
int dynamic_initializer_for__NiEulerRotKeyregisterloaderreturn___0();
int dynamic_initializer_for__NiLinColorKeyregisterloaderreturn___0();
int dynamic_initializer_for__NiLinFloatKeyregisterloaderreturn___0();
int dynamic_initializer_for__NiLinPosKeyregisterloaderreturn___0();
int dynamic_initializer_for__NiLinRotKeyregisterloaderreturn___0();
int dynamic_initializer_for__NiTCBPosKeyregisterloaderreturn___0();
int dynamic_initializer_for__NiTCBRotKeyregisterloaderreturn___0();
int dynamic_initializer_for__NiTCBFloatKeyregisterloaderreturn___0();
int dynamic_initializer_for__NiStepBoolKeyregisterloaderreturn___0();
int dynamic_initializer_for__NiStepColorKeyregisterloaderreturn___0();
int dynamic_initializer_for__NiStepFloatKeyregisterloaderreturn___0();
int dynamic_initializer_for__NiStepPosKeyregisterloaderreturn___0();
int dynamic_initializer_for__NiStepRotKeyregisterloaderreturn___0();
void dynamic_initializer_for__NiAnimationSDMObject___0();
void dynamic_initializer_for__NiCollisionSDMObject___11();
void dynamic_initializer_for__NsFadeNode::m_RTTI__();
void dynamic_initializer_for__NiAlphaRefController::m_RTTI__();
void dynamic_initializer_for__NiPortalSDMObject___0();
void dynamic_initializer_for__NiCollisionSDMObject___12();
void dynamic_initializer_for__NiCollisionSDMObject___13();
void dynamic_initializer_for__NiCollisionSDMObject___14();
void dynamic_initializer_for__NiCollisionSDMObject___15();
void dynamic_initializer_for__MasterPropertyAccumulator::m_RTTI__();
void dynamic_initializer_for__NiCollisionSDMObject___16();
int dynamic_initializer_for__CRTTIClass_CGlowScreenEffect_CBaseObject_::ms_RTTI__();
int dynamic_initializer_for__CRTTIClass_CDepthOfFieldEffect_CBaseObject_::ms_RTTI__();
int dynamic_initializer_for__CRTTIClass_CAfterImageEffect_CBaseObject_::ms_RTTI__();
void dynamic_initializer_for__NiCollisionSDMObject___17();
void dynamic_initializer_for__CPostProcessEffect::m_RTTI__();
void dynamic_initializer_for__HazeAccumulator::m_RTTI__();
void dynamic_initializer_for__CHazeScreenEffect::m_RTTI__();
void dynamic_initializer_for__CGlowScreenEffect::m_RTTI__();
void dynamic_initializer_for__CAfterImageEffect::m_RTTI__();
void dynamic_initializer_for__CDepthOfFieldEffect::m_RTTI__();
void dynamic_initializer_for__CScreenEffect::m_RTTI__();
void dynamic_initializer_for__PgFrameWork::m_RTTI__();
int dynamic_initializer_for__Pgg_kFrameMgr__();
void dynamic_initializer_for__PgWin::m_RTTI__();
int dynamic_initializer_for__PgWin::ms_kbLbutDown__();
int dynamic_initializer_for__PgWin::ms_kbLbutPressed__();
int dynamic_initializer_for__PgWin::ms_kbLbutReleased__();
int dynamic_initializer_for__PgWin::ms_kbRbutDown__();
int dynamic_initializer_for__PgWin::ms_kbRbutPressed__();
int dynamic_initializer_for__PgWin::ms_kbRbutReleased__();
int dynamic_initializer_for__PgWin::ms_kbMbutDown__();
int dynamic_initializer_for__PgWin::ms_kbMbutPressed__();
int dynamic_initializer_for__PgWin::ms_kbMbutReleased__();
void dynamic_initializer_for__PgWinText::m_RTTI__();
int dynamic_initializer_for__Pgg_kWinMgr__();
void dynamic_initializer_for__PgWinBut::m_RTTI__();
int dynamic_initializer_for__CSpFont::ms_spAlphaProp__();
int dynamic_initializer_for__CSpFont::ms_spVertexProp__();
void dynamic_initializer_for__PgCursor::m_RTTI__();
int dynamic_initializer_for__PgCursor::ms_spSystemCursor__();
int dynamic_initializer_for__PgCursor::ms_spCursorDxSurfaceTexture__();
int dynamic_initializer_for__PgProfileMgr::ms_kRoot__();
int dynamic_initializer_for__PgProfileMgr::ms_kTraversalQ__();
int dynamic_initializer_for__PgEditWin::ms_kCallBackMap__();
void dynamic_initializer_for__PgWinScaleCtrl::m_RTTI__();
int ATL::_dynamic_initializer_for___AtlBaseModule__();
int ATL::_dynamic_initializer_for__g_strheap__();
int ATL::_dynamic_initializer_for__g_strmgr__();
void dynamic_initializer_for__NiD3DDefaultShader::m_RTTI__();
void dynamic_initializer_for__NiD3DShader::m_RTTI__();
void dynamic_initializer_for__NiD3DShaderInterface::m_RTTI__();
void dynamic_initializer_for__NiDX9Renderer::m_RTTI__();
int dynamic_initializer_for__NiDX9Renderer::ms_kDisplayFormats__();
void dynamic_initializer_for__NiDX9RendererSDMObject__();
void dynamic_initializer_for__NiDX92DBufferData::m_RTTI__();
void dynamic_initializer_for__NiDX9TextureBufferData::m_RTTI__();
void dynamic_initializer_for__NiDX9DepthStencilBufferData::m_RTTI__();
void dynamic_initializer_for__NiDX9ImplicitDepthStencilBufferData::m_RTTI__();
void dynamic_initializer_for__NiDX9AdditionalDepthStencilBufferData::m_RTTI__();
int dynamic_initializer_for__NiDX9AdditionalDepthStencilBufferData::ms_kAddDSListCriticalSection__();
int dynamic_initializer_for__NiDX9AdditionalDepthStencilBufferData::ms_kAddDepthStencil__();
void dynamic_initializer_for__NiDX9OnscreenBufferData::m_RTTI__();
void dynamic_initializer_for__NiDX9ImplicitBufferData::m_RTTI__();
void dynamic_initializer_for__NiDX9SwapChainBufferData::m_RTTI__();
void dynamic_initializer_for__NiDX9SwapChainDepthStencilBufferData::m_RTTI__();
void dynamic_initializer_for__NiD3DController::m_RTTI__();
void dynamic_initializer_for__NiD3DTimeSyncController::m_RTTI__();
void dynamic_initializer_for__NiDX9LightManager::LightEntry::ms_fRangeMax__();
void dynamic_initializer_for__NiDX9Direct3DTexture::m_RTTI__();
void dynamic_initializer_for__NiSCMExtraData::m_RTTI__();
void dynamic_initializer_for__NiRenderedCubeMap::m_RTTI__();
void dynamic_initializer_for__NiCursor::m_RTTI__();
void dynamic_initializer_for__NiBinaryShader::m_RTTI__();
void __cdecl dynamic_atexit_destructor_for__BlockedData__(); // idb
void __cdecl dynamic_atexit_destructor_for__Engine3D::ms_spCarToon__(); // idb
void __cdecl dynamic_atexit_destructor_for__Engine3D::ms_spToonExtraData__(); // idb
void __cdecl dynamic_atexit_destructor_for__Font::ms_spFont__(); // idb
void __cdecl ITableBase_FontSet_FontSetTab_::ITableBase_FontSet_FontSetTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl dynamic_atexit_destructor_for__IconMgr::ms_kTextureMap__(); // idb
void __cdecl dynamic_atexit_destructor_for__IconMgr::ms_kAniTextureMap__(); // idb
void __cdecl dynamic_atexit_destructor_for__g_kItemMixDataTab__(); // idb
void __cdecl dynamic_atexit_destructor_for__ItemViewDummyTab::m_DummyMap__(); // idb
void __cdecl dynamic_atexit_destructor_for__MenuTexMgr::ms_aspTexture__(); // idb
void __cdecl TextFilterTable::FilterSlander_::_2_::_dynamic_atexit_destructor_for__s_kTextFilterSet__(); // idb
void __cdecl TextFilterTable::FilterEmotion_::_3_::_dynamic_atexit_destructor_for__s_kTextFilterSet__(); // idb
void __cdecl ITableBase_EmotionFilter_EmotionFilterTable_::ITableBase_EmotionFilter_EmotionFilterTable__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_SlanderFilter_SlanderFilterTable_::ITableBase_SlanderFilter_SlanderFilterTable__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_BadNameFilter_BadNameFilterTable_::ITableBase_BadNameFilter_BadNameFilterTable__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl dynamic_atexit_destructor_for__TextFilterTable::ms_listBlockedID__(); // idb
void __cdecl dynamic_atexit_destructor_for__MaskShader::m_spShader__(); // idb
void __cdecl dynamic_atexit_destructor_for__MaskShader::m_spNoAlphaBlendShader__(); // idb
void __cdecl dynamic_atexit_destructor_for__Cursor::ms_spDropIconTexture__(); // idb
void __cdecl dynamic_atexit_destructor_for__Cursor::ms_spCursorRenderCamera__(); // idb
void __cdecl dynamic_atexit_destructor_for__Cursor::ms_spCursorFrame__(); // idb
void __cdecl ITableBase_TextDataType3_TextData3_::ITableBase_TextDataType3_TextData3__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_TextDataType2_TextData2_::ITableBase_TextDataType2_TextData2__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_TextDataType_TextData_::ITableBase_TextDataType_TextData__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl dynamic_atexit_destructor_for__g_kSingleDataMap__(); // idb
void __cdecl ITableBase_ChrBasicEquip_ChrBasicEquipTab_::ITableBase_ChrBasicEquip_ChrBasicEquipTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_UseClassTypeInfo_UseCalssTypeTable_::ITableBase_UseClassTypeInfo_UseCalssTypeTable__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_ItemViewDummy_ItemViewDummyTab_::ITableBase_ItemViewDummy_ItemViewDummyTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MinimonAutoUseItem_MinimonAutoUseItemTable_::ITableBase_MinimonAutoUseItem_MinimonAutoUseItemTable__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MinimonInfo_MinimonInfoTable_::ITableBase_MinimonInfo_MinimonInfoTable__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_TermExtendMatchGroupDesc_TermExtendMatchGroupDescTable_::ITableBase_TermExtendMatchGroupDesc_TermExtendMatchGroupDescTable__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_TermExtendMatch_TermExtendMatchTable_::ITableBase_TermExtendMatch_TermExtendMatchTable__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_ChatColor_ChatColorTab_::ITableBase_ChatColor_ChatColorTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MoverUpgradeEffect_MoverUpgradeEffectTab_::ITableBase_MoverUpgradeEffect_MoverUpgradeEffectTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_ChrCreateEquip_ChrCreateEquipTab_::ITableBase_ChrCreateEquip_ChrCreateEquipTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MarketSearchInfo_MarketSearchInfoTab_::ITableBase_MarketSearchInfo_MarketSearchInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MobNoFadeIn_MobNoFadeInTab_::ITableBase_MobNoFadeIn_MobNoFadeInTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MobConditionView_MobConditionViewTab_::ITableBase_MobConditionView_MobConditionViewTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_KQTeam_KQTeamTable_::ITableBase_KQTeam_KQTeamTable__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_KQIsVote_KQIsVoteTable_::ITableBase_KQIsVote_KQIsVoteTable__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_KQVoteMajorityRate_KQVoteMajorityRateTable_::ITableBase_KQVoteMajorityRate_KQVoteMajorityRateTable__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_KQVoteDesc_KQVoteDescTable_::ITableBase_KQVoteDesc_KQVoteDescTable__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_PupView_PetViewTab_::ITableBase_PupView_PetViewTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_PupMain_PetMainTab_::ITableBase_PupMain_PetMainTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MoverItem_MoverItemTab_::ITableBase_MoverItem_MoverItemTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MoverAbility_MoverAbilityTab_::ITableBase_MoverAbility_MoverAbilityTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MoverSlotCharAni_MoverSlotCharAniTab_::ITableBase_MoverSlotCharAni_MoverSlotCharAniTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MoverSlotView_MoverSlotViewTab_::ITableBase_MoverSlotView_MoverSlotViewTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MoverView_MoverViewTab_::ITableBase_MoverView_MoverViewTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MoverHG_MoverHGTab_::ITableBase_MoverHG_MoverHGTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MoverUseSkill_MoverUseSkillTab_::ITableBase_MoverUseSkill_MoverUseSkillTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MoverMain_MoverMainTab_::ITableBase_MoverMain_MoverMainTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_CollectCardTitle_CollectCardTitleTab_::ITableBase_CollectCardTitle_CollectCardTitleTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_CollectCardReward_CollectCardRewardTab_::ITableBase_CollectCardReward_CollectCardRewardTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_CollectCardGroupDesc_CollectCardGroupDescTab_::ITableBase_CollectCardGroupDesc_CollectCardGroupDescTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_CollectCardView_CollectCardViewTab_::ITableBase_CollectCardView_CollectCardViewTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_CollectCard_CollectCardTab_::ITableBase_CollectCard_CollectCardTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_BasicInfoFindWord_BasicInfoFindWordTab_::ITableBase_BasicInfoFindWord_BasicInfoFindWordTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_BasicInfoFindUI_BasicInfoFindUITab_::ITableBase_BasicInfoFindUI_BasicInfoFindUITab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_BasicInfoFind_BasicInfoFindTab_::ITableBase_BasicInfoFind_BasicInfoFindTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_BasicInfoTipCycle_BasicInfoTipCycleTab_::ITableBase_BasicInfoTipCycle_BasicInfoTipCycleTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_BasicInfoTip_BasicInfoTipTab_::ITableBase_BasicInfoTip_BasicInfoTipTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_BasicInfoLink_BasicInfoLinkTab_::ITableBase_BasicInfoLink_BasicInfoLinkTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_BasicInfoTitle_BasicInfoTitleTab_::ITableBase_BasicInfoTitle_BasicInfoTitleTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_ChargedDeletableBuff_ChargedDeletableBuffTab_::ITableBase_ChargedDeletableBuff_ChargedDeletableBuffTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_BelongTypeInfo_BelongTypeInfoTab_::ITableBase_BelongTypeInfo_BelongTypeInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MapLinkPoint_MapLinkPointTab_::ITableBase_MapLinkPoint_MapLinkPointTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MapWayPoint_MapWayPointTab_::ITableBase_MapWayPoint_MapWayPointTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_ActiveSkillGroup_ActiveSkillGroupTab_::ITableBase_ActiveSkillGroup_ActiveSkillGroupTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_DamageEffect_DamageEffectTab_::ITableBase_DamageEffect_DamageEffectTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_GTIView_GTIViewInfoTab_::ITableBase_GTIView_GTIViewInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_CharacterTitleStateView_CharacterTitleStateViewTab_::ITableBase_CharacterTitleStateView_CharacterTitleStateViewTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MobRandomIdleAni_MobRandomIdleAniTab_::ITableBase_MobRandomIdleAni_MobRandomIdleAniTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_GBHouse_GBHouseTab_::ITableBase_GBHouse_GBHouseTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_GB_DICE_Dividind_GBDiceDividIndTab_::ITableBase_GB_DICE_Dividind_GBDiceDividIndTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_DICE_Dividind_DiceDividIndTab_::ITableBase_DICE_Dividind_DiceDividIndTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_GUILD_TOURNAMENT_REQUIRE_GTRequireTab_::ITableBase_GUILD_TOURNAMENT_REQUIRE_GTRequireTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_GUILD_TOURNAMENT_SKILL_GuildTournamentStateTab_::ITableBase_GUILD_TOURNAMENT_SKILL_GuildTournamentStateTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_GUILD_TOURNAMENT_SKILLDESC_GuildTournamentStateDescTab_::ITableBase_GUILD_TOURNAMENT_SKILLDESC_GuildTournamentStateDescTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_ItemActionCondition_ItemActionConditionTab_::ITableBase_ItemActionCondition_ItemActionConditionTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_ItemActionEffect_ItemActionEffectTab_::ITableBase_ItemActionEffect_ItemActionEffectTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_ItemAction_ItemActionTab_::ITableBase_ItemAction_ItemActionTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_ActionEffectItem_ActionEffectItemTab_::ITableBase_ActionEffectItem_ActionEffectItemTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_SetEffect_SetEffectTab_::ITableBase_SetEffect_SetEffectTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_ItemActionEffectDesc_ItemActionEffectDescTab_::ITableBase_ItemActionEffectDesc_ItemActionEffectDescTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_SetItemName_SetItemNameTab_::ITableBase_SetItemName_SetItemNameTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_TownPortal_TownPortalInfoTable_::ITableBase_TownPortal_TownPortalInfoTable__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_ItemDismantle_ItemDismantleTab_::ITableBase_ItemDismantle_ItemDismantleTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_WorldMapAvatarInfo_WorldMapAvatarInfoTab_::ITableBase_WorldMapAvatarInfo_WorldMapAvatarInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_WeaponAttrib_WeaponAttribTab_::ITableBase_WeaponAttrib_WeaponAttribTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_ItemShopView_ItemShopViewTable_::ITableBase_ItemShopView_ItemShopViewTable__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MiniHouse_MiniHouseTable_::ITableBase_MiniHouse_MiniHouseTable__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_GradeItemOption_GradeItemOptionTab_::ITableBase_GradeItemOption_GradeItemOptionTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_NpcDialogData_NpcDialogDataTable_::ITableBase_NpcDialogData_NpcDialogDataTable__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_ProduceViewInfo_ProduceViewInfoTable_::ITableBase_ProduceViewInfo_ProduceViewInfoTable__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_KINGDOM_QUEST_DESC_KQDescTable_::ITableBase_KINGDOM_QUEST_DESC_KQDescTable__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_GatherInfo_GatherInfoTable_::ITableBase_GatherInfo_GatherInfoTable__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_ProduceInfo_ProduceInfoTable_::ITableBase_ProduceInfo_ProduceInfoTable__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_DmgSndMapByArmorType_DmgSndTab_::ITableBase_DmgSndMapByArmorType_DmgSndTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_FaceInfo_FaceInfoTab_::ITableBase_FaceInfo_FaceInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_RaceName_CharRace_::ITableBase_RaceName_CharRace__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_ChargedItemEffect_ChargedEffectTable_::ITableBase_ChargedItemEffect_ChargedEffectTable__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_ScriptMsg_ScriptMsgTab_::ITableBase_ScriptMsg_ScriptMsgTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_UpEffectData_UpEffectTab_::ITableBase_UpEffectData_UpEffectTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MHEmotion_MiniHouseEmotionTab_::ITableBase_MHEmotion_MiniHouseEmotionTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MiniHouseFurniture_MiniHouseFuritureInfoTab_::ITableBase_MiniHouseFurniture_MiniHouseFuritureInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MiniHouseEndure_MiniHouseEndureInfoTable_::ITableBase_MiniHouseEndure_MiniHouseEndureInfoTable__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MiniHouseObjAni_MiniHouseObjAniInfoTab_::ITableBase_MiniHouseObjAni_MiniHouseObjAniInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MiniHouseFurnitureObjEffect_MHFurnitureObjEffectTab_::ITableBase_MiniHouseFurnitureObjEffect_MHFurnitureObjEffectTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_EffectViewInfo_ShakeEffectViewInfoTab_::ITableBase_EffectViewInfo_ShakeEffectViewInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_CharNPC_ViewInfo_NPCViewInfoTab_::ITableBase_CharNPC_ViewInfo_NPCViewInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_HairColorInfo_HairColorInfoTab_::ITableBase_HairColorInfo_HairColorInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_HairInfo_HairInfoTab_::ITableBase_HairInfo_HairInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_ActionEffectInfo_ActionEffectInfoTab_::ITableBase_ActionEffectInfo_ActionEffectInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_ClassName_CharClass_::ITableBase_ClassName_CharClass__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_ItemMoney_ItemMoneyTab_::ITableBase_ItemMoney_ItemMoneyTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_ItemViewEquipTypeInfo_ItemViewEquipTypeInfoTab_::ITableBase_ItemViewEquipTypeInfo_ItemViewEquipTypeInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_ColorInfoType_ColorInfoTable_::ITableBase_ColorInfoType_ColorInfoTable__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_SubAbStateInfo_SubAbStateInfoTab_::ITableBase_SubAbStateInfo_SubAbStateInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_AbnormalStateViewInfo_AbnormalStateViewInfoTab_::ITableBase_AbnormalStateViewInfo_AbnormalStateViewInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_AbnormalStateInfo_AbnormalStateInfoTab_::ITableBase_AbnormalStateInfo_AbnormalStateInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MobViewInfo_MobViewInfoTab_::ITableBase_MobViewInfo_MobViewInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_ItemViewInfo_ItemViewInfoTab_::ITableBase_ItemViewInfo_ItemViewInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_ItemInfo_ItemInfoTab_::ITableBase_ItemInfo_ItemInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_BRAccUpgradeInfo_BRAccUpgradeInfoTab_::ITableBase_BRAccUpgradeInfo_BRAccUpgradeInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_AttendReward_AttendRewardTab_::ITableBase_AttendReward_AttendRewardTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_ChargedMessageItem_ChargedMsgItemTab_::ITableBase_ChargedMessageItem_ChargedMsgItemTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_ChargedIconItem_ChargedIconItemTab_::ITableBase_ChargedIconItem_ChargedIconItemTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MobKillAnnounceText_MobKillAnnounceTextTab_::ITableBase_MobKillAnnounceText_MobKillAnnounceTextTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MobCoordinate_MobCoordinateTab_::ITableBase_MobCoordinate_MobCoordinateTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_RIDING_RidePetTable_::ITableBase_RIDING_RidePetTable__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_ActionViewInfo_ActionViewTable_::ITableBase_ActionViewInfo_ActionViewTable__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_UpGradeInfo_UpGradeInfoTab_::ITableBase_UpGradeInfo_UpGradeInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MapViewInfo_MapViewInfoTab_::ITableBase_MapViewInfo_MapViewInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MapInfo_MapInfoTab_::ITableBase_MapInfo_MapInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_MobInfo_MobInfoTab_::ITableBase_MobInfo_MobInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_FaceCutMsg_FaceCutMsgTab_::ITableBase_FaceCutMsg_FaceCutMsgTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhResObjDefaultRootName__(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhObjDefaultRootName__(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhRoomDefaultRootName__(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhRoomWallName__(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhRoomFloorName__(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhRoomRoofName__(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhRoomBlockName__(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhRoomTexStyleTileName__(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhRoomTexStyleCustomName__(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhStoCMapName__(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhCollisionParentName__(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhObjGeomParentName__(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhCollisionParentNamePick__(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhObjAmbLightNULL__(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhObjAmbLightNormal__(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhObjAmbLightMoveOK__(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhObjAmbLightMoveNO__(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhObjAmbLightRepair__(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhCharColliNodeName__(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhCharColliRootNodeName__(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhOtherCharColliRootName__(); // idb
void __cdecl `boost::details::pool::singleton_default<boost::singleton_pool<boost::fast_pool_allocator_tag,28,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>::pool_type>::instance'::`2'::`dynamic atexit destructor for 'obj''(); // idb
void __cdecl dynamic_atexit_destructor_for__CRTTIClass_CWorldConfig_CBaseObject_::ms_RTTI__(); // idb
void __cdecl dynamic_atexit_destructor_for__CRTTIClass_CBaseObject_CNullClass_::ms_RTTI__(); // idb
void __cdecl `TutorialMgr::GetTutorialMgr'::`2'::`dynamic atexit destructor for 'kTutorialMgr''(); // idb
void __cdecl `ScenarioMgr::GetScenarioMgr'::`2'::`dynamic atexit destructor for 'kScenarioMgr''(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhRoomWallName___0(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhRoomFloorName___0(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhRoomRoofName___0(); // idb
void __cdecl dynamic_atexit_destructor_for__m_kAttackedList__(); // idb
void __cdecl `EffectObjectMgr::GetMgr'::`2'::`dynamic atexit destructor for 'kEffectObjectMgr''(); // idb
void __cdecl `AreaInfoMgr::GetInstance'::`2'::`dynamic atexit destructor for 'kMgr''(); // idb
void __cdecl dynamic_atexit_destructor_for__GameFrameWork::m_kWhisperCharID__(); // idb
void __cdecl dynamic_atexit_destructor_for__GameFrameWork::ms_strLauncher__(); // idb
void __cdecl dynamic_atexit_destructor_for__GameFrameWork::m_kOptionManager__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spProposeTradeMenu__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spInvitePartyMenu__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spCancelMenu__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spDelegatePartyMenu__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spQuitPartyMenu__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spFirePartyMemberMenu__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spInviteGuildMenu__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spPartyMasterLootFreeSetupMenu__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spPartyMasterLootSequentialSetupMenu__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spPartyMemberLootFreeSetupMenu__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spPartyMemberLootSequentialSetupMenu__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spPartyLootSetupMenu__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spFollowCharMenu__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spPartyMasterLootSetupSubMenuWin__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spMainCharUnMetamorphosis__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spResolutionMenu0__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spResolutionMenu1__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spResolutionMenu2__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spResolutionMenu3__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spResolutionMenu4__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spResolutionMenu5__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spResolutionMenu6__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spResolutionMenu7__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spResolutionMenu8__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spResolutionMenu9__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spResolutionMenu10__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spResolutionMenu11__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spResolutionMenu12__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spResolutionMenu13__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spResolutionMenu14__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spResolutionMenu15__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spResolutionMenu16__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spResolutionMenu17__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spResolutionMenu18__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spResolutionMenu19__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spWhisper__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spTargetCharName__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spHighHolyPromise__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spPlaceMemory0__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spPlaceMemory1__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spPlaceMemory2__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spPlaceMemory3__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spPlaceMemory4__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spConfigRoom__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spShowBlog__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spChangeBlogAddr__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spKickGuest__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spSetArrModeOn__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spSetArrModeOff__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spReturnToInvMHItem__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spArrToInvMHItem__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spDeleteMHItem__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spObjAction__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spObjName__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spMHObjEndure__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spMHObjEndurePercentage__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::m_spReArrange__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::m_spSelectCancel__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spBuffUIMenu__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spRaidSelect__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spRaidInvite__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spRaidVanish__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spRaidLeave__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spChangeRaidLeader__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spChangeRaidLooter__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spRaidSubLeaderUp__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spRaidSubLeaderDown__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spCollectOpen__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spInviteFriend__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spRideOn__(); // idb
void __cdecl dynamic_atexit_destructor_for__PopupMenuTemplate::ms_spVote__(); // idb
void __cdecl RoarWin::FilterRemoveEnter_::_2_::_dynamic_atexit_destructor_for__s_kTextFilterSet__(); // idb
void __cdecl dynamic_atexit_destructor_for__IconWin::ms_spOverGeom__(); // idb
void __cdecl dynamic_atexit_destructor_for__IconWin::ms_spClickGeom__(); // idb
void __cdecl dynamic_atexit_destructor_for__IconWin::ms_kCoolTimeIconList__(); // idb
void __cdecl dynamic_atexit_destructor_for__SkillIcon::ms_kSkillIconList__(); // idb
void __cdecl dynamic_atexit_destructor_for__Bank::ms_aspInv__(); // idb
void __cdecl dynamic_atexit_destructor_for__Bank::ms_mapExtraInv__(); // idb
void __cdecl dynamic_atexit_destructor_for__ICharDeadEvent::ms_kEventList__(); // idb
void __cdecl dynamic_atexit_destructor_for__GuildTournamentStorage::ms_aspInv__(); // idb
void __cdecl dynamic_atexit_destructor_for__MagicField::ms_kMagicFieldList__(); // idb
void __cdecl dynamic_atexit_destructor_for__MapNavigator::ms_spMapNavigatorTask__(); // idb
void __cdecl dynamic_atexit_destructor_for__ItemMarket::ms_kItemSellInfoList__(); // idb
void __cdecl dynamic_atexit_destructor_for__g_kShortCutMgr__(); // idb
void __cdecl dynamic_atexit_destructor_for__UserTrade::ms_aspOppInv__(); // idb
void __cdecl dynamic_atexit_destructor_for__UserTrade::ms_aspMyInv__(); // idb
void __cdecl dynamic_atexit_destructor_for__GuildBD::ms_spTempTexture__(); // idb
void __cdecl dynamic_atexit_destructor_for__NameBD::ms_spTempTexture__(); // idb
void __cdecl dynamic_atexit_destructor_for__PrivateStoreBD::ms_spTempTexture__(); // idb
void __cdecl dynamic_atexit_destructor_for__g_kScrnBDMgr__(); // idb
void __cdecl dynamic_atexit_destructor_for__ScreenBoardTexture::sm_spSrcTexture__(); // idb
void __cdecl dynamic_atexit_destructor_for__ScreenBoardTexture::sm_spShadowSrcTexture__(); // idb
void __cdecl dynamic_atexit_destructor_for__SpeechBD::ms_spTempTexture__(); // idb
void __cdecl dynamic_atexit_destructor_for__ITimer::m_kTimerList__(); // idb
void __cdecl dynamic_atexit_destructor_for__ActionInfoTable::m_kCharMap__(); // idb
void __cdecl dynamic_atexit_destructor_for__ActionInfoTable::m_kMobMap__(); // idb
void __cdecl dynamic_atexit_destructor_for__ActionInfoTable::m_kRidePetMap__(); // idb
void __cdecl dynamic_atexit_destructor_for__ActionInfoTable::m_kMoverMap__(); // idb
void __cdecl dynamic_atexit_destructor_for__ActionInfoTable::m_kPetMap__(); // idb
void __cdecl dynamic_atexit_destructor_for__g_kTextKeyMatch__(); // idb
void __cdecl dynamic_atexit_destructor_for__g_characterTitleData__(); // idb
void __cdecl CarToonShader::GetInstance_::_2_::_dynamic_atexit_destructor_for__shader__(); // idb
void __cdecl dynamic_atexit_destructor_for__g_kCharMgr__(); // idb
void __cdecl dynamic_atexit_destructor_for__g_kCharResMgr__(); // idb
void __cdecl dynamic_atexit_destructor_for__PortraitTextureBuffer::ms_spBlackTexture__(); // idb
void __cdecl dynamic_atexit_destructor_for__PortraitTextureBuffer::ms_spDefaultTexture__(); // idb
void __cdecl dynamic_atexit_destructor_for__PortraitTextureBuffer::ms_kMoverFaceTextureList__(); // idb
void __cdecl dynamic_atexit_destructor_for__PortraitTextureBuffer::ms_kPetFaceTextureList__(); // idb
void __cdecl dynamic_atexit_destructor_for__PortraitTextureBuffer::ms_kMobFaceTextureList__(); // idb
void __cdecl dynamic_atexit_destructor_for__PortraitTextureBuffer::ms_kPetFaceTextureMap__(); // idb
void __cdecl dynamic_atexit_destructor_for__PortraitTextureBuffer::ms_kMobFaceTextureMap__(); // idb
void __cdecl dynamic_atexit_destructor_for__PortraitTextureBuffer::ms_kMoverFaceTextureMap__(); // idb
void __cdecl dynamic_atexit_destructor_for__PortraitTextureBuffer::ms_kOtherFaceTextureMap__(); // idb
void __cdecl dynamic_atexit_destructor_for__g_kUser__(); // idb
void __cdecl dynamic_atexit_destructor_for__g_kItemAuthority__(); // idb
void __cdecl dynamic_atexit_destructor_for__g_kDropItemMgr__(); // idb
void __cdecl dynamic_atexit_destructor_for__g_kChargedItem__(); // idb
void __cdecl dynamic_atexit_destructor_for__g_kInventory__(); // idb
void __cdecl dynamic_atexit_destructor_for__ItemInfoTab::m_ItemInfoMapByInxName__(); // idb
void __cdecl dynamic_atexit_destructor_for__ItemRepairTask::ms_spItemRepairTask__(); // idb
void __cdecl dynamic_atexit_destructor_for__g_kMapObjMgr__(); // idb
void __cdecl dynamic_atexit_destructor_for__g_kWorld__(); // idb
void __cdecl dynamic_atexit_destructor_for__dd__(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhRoomWallName___1(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhRoomFloorName___1(); // idb
void __cdecl dynamic_atexit_destructor_for__g_kServer__(); // idb
void __cdecl dynamic_atexit_destructor_for__AfterImgEff::m_mapEffectNode__(); // idb
void __cdecl dynamic_atexit_destructor_for__AfterImgEff::m_mapTexture__(); // idb
void __cdecl dynamic_atexit_destructor_for__CRTTIClass_CHazeScreenEffect_CBaseObject_::ms_RTTI__(); // idb
void __cdecl dynamic_atexit_destructor_for__g_kEffectMgr__(); // idb
void __cdecl dynamic_atexit_destructor_for__g_kTextEffMgr__(); // idb
void __cdecl dynamic_atexit_destructor_for__SoundGroup::ms_kSoundGroupList__(); // idb
void __cdecl ITableBase_MapAmbienceSoundInfo_MapAmbienceSoundInfoTab_::ITableBase_MapAmbienceSoundInfo_MapAmbienceSoundInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl dynamic_atexit_destructor_for__g_kSoundMgr__(); // idb
void __cdecl dynamic_atexit_destructor_for__MachineOpt::ms_kUserLoginOption__(); // idb
void __cdecl dynamic_atexit_destructor_for__MachineOpt::ms_kWinPosList__(); // idb
void __cdecl ITableBase_ActiveSkillViewInfo_ActSkillViewInfoTab_::ITableBase_ActiveSkillViewInfo_ActSkillViewInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_PassiveSkillInfo_PasSkillInfoTab_::ITableBase_PassiveSkillInfo_PasSkillInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_ActiveSkillInfo_ActSkillInfoTab_::ITableBase_ActiveSkillInfo_ActSkillInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl ITableBase_PassiveSkillViewInfo_PasSkillViewInfoTab_::ITableBase_PassiveSkillViewInfo_PasSkillViewInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____(); // idb
void __cdecl dynamic_atexit_destructor_for__Skill::m_kUseList__(); // idb
void __cdecl dynamic_atexit_destructor_for__SkillEmpowerRequest::ms_kReqList__(); // idb
void __cdecl dynamic_atexit_destructor_for__g_kParty__(); // idb
void __cdecl dynamic_atexit_destructor_for__ActSkillInfoTab::m_hashMap_ByNameIndex__(); // idb
void __cdecl dynamic_atexit_destructor_for__ITask::ms_kRootTask__(); // idb
void __cdecl dynamic_atexit_destructor_for__MHDiceGameTask::ms_spMHDiceGameTask__(); // idb
void __cdecl dynamic_atexit_destructor_for__StatPointReqTask::ms_spInstance__(); // idb
void __cdecl dynamic_atexit_destructor_for__WeaponTitleTab::ms_kTab__(); // idb
void __cdecl dynamic_atexit_destructor_for__ProduceInfoTable::m_MaterialMap__(); // idb
void __cdecl QuestDataMgr::GetQuest_::_2_::_dynamic_atexit_destructor_for__kQuestData__(); // idb
void __cdecl QuestDataMgr::GetQuest_::_2_::_dynamic_atexit_destructor_for__QuestDialog__(); // idb
void __cdecl QuestDataMgr::GetQuest_::_2_::_dynamic_atexit_destructor_for__kQuest__(); // idb
void __cdecl dynamic_atexit_destructor_for__QuestHelperMgr::ms_pQuestMCList__(); // idb
void __cdecl dynamic_atexit_destructor_for__GuildListTask::ms_spGuildListTask__(); // idb
void __cdecl dynamic_atexit_destructor_for__GuildMemberTask::ms_spGuildMemberTask__(); // idb
void __cdecl dynamic_atexit_destructor_for__GuildTask::ms_spGuildTask__(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhCollisionParentName___0(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhCollisionParentNamePick___0(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhCharColliRootNodeName___0(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhOtherCharColliRootName___0(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhResObjDefaultRootName___0(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhObjDefaultRootName___0(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhCollisionParentName___1(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhCollisionParentNamePick___1(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhObjAmbLightNormal___0(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhObjAmbLightMoveOK___0(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhObjAmbLightMoveNO___0(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhObjAmbLightRepair___0(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhCharColliNodeName___0(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhOtherCharColliRootName___1(); // idb
void __cdecl dynamic_atexit_destructor_for__g_kMiniHouseMgr__(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhObjDefaultRootName___1(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhRoomDefaultRootName___0(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhRoomWallName___2(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhRoomFloorName___2(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhRoomRoofName___1(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhRoomBlockName___0(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhRoomTexStyleTileName___0(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhRoomTexStyleCustomName___0(); // idb
void __cdecl mhStrings::_dynamic_atexit_destructor_for__mhCollisionParentName___2(); // idb
void __cdecl dynamic_atexit_destructor_for__ChargedItemList::ms_kUsingList__(); // idb
void __cdecl dynamic_atexit_destructor_for__g_kInstance__(); // idb
void __cdecl dynamic_atexit_destructor_for__g_kNetMgr__(); // idb
void __cdecl dynamic_atexit_destructor_for__ORTable::ort_Index__(); // idb
void __cdecl dynamic_atexit_destructor_for__ORTable::ort_String__(); // idb
void __cdecl dynamic_atexit_destructor_for__ORTable::ort_Byte__(); // idb
void __cdecl dynamic_atexit_destructor_for__ORTable::ort_Word__(); // idb
void __cdecl dynamic_atexit_destructor_for__ORTable::ort_Dwrd__(); // idb
void __cdecl dynamic_atexit_destructor_for__ORTable::ort_Dword__(); // idb
void __cdecl dynamic_atexit_destructor_for__OptionReader::or_CommentMark__(); // idb
void __cdecl dynamic_atexit_destructor_for__OptionReader::or_Brace__(); // idb
void __cdecl dynamic_atexit_destructor_for__OptionReader::or_Ignore__(); // idb
void __cdecl dynamic_atexit_destructor_for__OptionReader::or_Delimiter__(); // idb
void __cdecl dynamic_atexit_destructor_for__OptionReader::or_Exchange__(); // idb
void __cdecl dynamic_atexit_destructor_for__OptionReader::or_Table__(); // idb
void __cdecl dynamic_atexit_destructor_for__OptionReader::or_ColumnType__(); // idb
void __cdecl dynamic_atexit_destructor_for__OptionReader::or_ColumnName__(); // idb
void __cdecl dynamic_atexit_destructor_for__OptionReader::or_Record__(); // idb
void __cdecl dynamic_atexit_destructor_for__OptionReader::or_RecordIn__(); // idb
void __cdecl dynamic_atexit_destructor_for__OptionReader::or_End__(); // idb
void __cdecl dynamic_atexit_destructor_for__WeddingTask::ms_spWeddingTask__(); // idb
void __cdecl dynamic_atexit_destructor_for__GuildAcademyMemberTask::ms_spGuildAcademyMemberTask__(); // idb
void __cdecl dynamic_atexit_destructor_for__GuildAcademySelectTask::ms_spGuildAcademySelectTask__(); // idb
void __cdecl dynamic_atexit_destructor_for__GuildAcademyTask::ms_spGuildAcademyTask__(); // idb
void __cdecl dynamic_atexit_destructor_for__GuildAcademyStorage::ms_aspInv__(); // idb
void __cdecl dynamic_atexit_destructor_for__g_kRaidinfo__(); // idb
void __cdecl dynamic_atexit_destructor_for__ShnDataFile__(); // idb
void __cdecl std::_dynamic_atexit_destructor_for__initlocks__(); // idb
void __cdecl std::_dynamic_atexit_destructor_for__classic_locale__(); // idb
void __cdecl std::_dynamic_atexit_destructor_for___Fac_tidy_reg__(); // idb
void __cdecl std::_dynamic_atexit_destructor_for___Generic_object__(); // idb
void __cdecl std::_dynamic_atexit_destructor_for___Iostream_object__(); // idb
void __cdecl std::_dynamic_atexit_destructor_for___System_object__(); // idb
void __cdecl std::_dynamic_atexit_destructor_for__initlocks___0(); // idb
void __cdecl dynamic_atexit_destructor_for__init_atexit__(); // idb
void __cdecl operator_new_::_6_::_dynamic_atexit_destructor_for__nomem__(); // idb
void __cdecl dynamic_atexit_destructor_for__NiTAbstractPoolAllocator_NiActorManager::TimelineData_::ms_kCriticalSection__(); // idb
void __cdecl dynamic_atexit_destructor_for__NiCollisionConvert::ms_kSphereABV__(); // idb
void __cdecl dynamic_atexit_destructor_for__NiMaterialProperty::ms_spDefault__(); // idb
void __cdecl dynamic_atexit_destructor_for__NiVertexColorProperty::ms_spDefault__(); // idb
void __cdecl dynamic_atexit_destructor_for__NiTAbstractPoolAllocator_unsigned_int_::ms_kCriticalSection__(); // idb
void __cdecl dynamic_atexit_destructor_for__NiAlphaProperty::ms_spDefault__(); // idb
void __cdecl dynamic_atexit_destructor_for__NiFogProperty::ms_spDefault__(); // idb
void __cdecl dynamic_atexit_destructor_for__NiTexturingProperty::ms_spDefault__(); // idb
void __cdecl dynamic_atexit_destructor_for__NiImageConverter::ms_spConverter__(); // idb
void __cdecl dynamic_atexit_destructor_for__NiZBufferProperty::ms_spDefault__(); // idb
void __cdecl dynamic_atexit_destructor_for__NiTimeController::ms_kCachedValuesLock__(); // idb
void __cdecl dynamic_atexit_destructor_for__NiTexture::ms_kTextureListCriticalSection__(); // idb
void __cdecl dynamic_atexit_destructor_for__NiTexture::RendererData::ms_aspReplacementData__(); // idb
void __cdecl dynamic_atexit_destructor_for__NiStencilProperty::ms_spDefault__(); // idb
void __cdecl dynamic_atexit_destructor_for__NiPalette::ms_kPaletteListCriticalSection__(); // idb
void __cdecl dynamic_atexit_destructor_for__NiStream::ms_kCleanupCriticalSection__(); // idb
void __cdecl dynamic_atexit_destructor_for__NiGeometryData::ms_kCritSec__(); // idb
void __cdecl dynamic_atexit_destructor_for__NiDitherProperty::ms_spDefault__(); // idb
void __cdecl dynamic_atexit_destructor_for__NiRendererSpecificProperty::ms_spDefault__(); // idb
void __cdecl dynamic_atexit_destructor_for__NiShadeProperty::ms_spDefault__(); // idb
void __cdecl dynamic_atexit_destructor_for__NiSpecularProperty::ms_spDefault__(); // idb
void __cdecl dynamic_atexit_destructor_for__NiWireframeProperty::ms_spDefault__(); // idb
void __cdecl dynamic_atexit_destructor_for__NiLogger::ms_kCriticalSection__(); // idb
void __cdecl dynamic_atexit_destructor_for__g_kParsedShaderList__(); // idb
void __cdecl dynamic_atexit_destructor_for__NpModelData_NiTexturingProperty::ms_mapTextureProperty__(); // idb
void __cdecl dynamic_atexit_destructor_for__NpKMI_Tool::ms_mapPartsSIF__(); // idb
void __cdecl dynamic_atexit_destructor_for__NpModelData_KFM::ms_mapKFMTool__(); // idb
void __cdecl dynamic_atexit_destructor_for__NpModelData_ActorM::ms_mapActorManager__(); // idb
void __cdecl `boost::details::pool::singleton_default<boost::singleton_pool<boost::fast_pool_allocator_tag,24,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>::pool_type>::instance'::`2'::`dynamic atexit destructor for 'obj''(); // idb
void __cdecl CDataDocument::Instance_::_2_::_dynamic_atexit_destructor_for__DataDocument__(); // idb
void __cdecl dynamic_atexit_destructor_for__CRTTIClass_CAfterImageEffect_CBaseObject_::ms_RTTI__(); // idb
void __cdecl dynamic_atexit_destructor_for__CRTTIClass_CDepthOfFieldEffect_CBaseObject_::ms_RTTI__(); // idb
void __cdecl dynamic_atexit_destructor_for__CRTTIClass_CGlowScreenEffect_CBaseObject_::ms_RTTI__(); // idb
void __cdecl dynamic_atexit_destructor_for__Pgg_kFrameMgr__(); // idb
void __cdecl dynamic_atexit_destructor_for__PgWin::ms_kbLbutDown__(); // idb
void __cdecl dynamic_atexit_destructor_for__PgWin::ms_kbLbutPressed__(); // idb
void __cdecl dynamic_atexit_destructor_for__PgWin::ms_kbLbutReleased__(); // idb
void __cdecl dynamic_atexit_destructor_for__PgWin::ms_kbRbutDown__(); // idb
void __cdecl dynamic_atexit_destructor_for__PgWin::ms_kbRbutPressed__(); // idb
void __cdecl dynamic_atexit_destructor_for__PgWin::ms_kbRbutReleased__(); // idb
void __cdecl dynamic_atexit_destructor_for__PgWin::ms_kbMbutDown__(); // idb
void __cdecl dynamic_atexit_destructor_for__PgWin::ms_kbMbutPressed__(); // idb
void __cdecl dynamic_atexit_destructor_for__PgWin::ms_kbMbutReleased__(); // idb
void __cdecl dynamic_atexit_destructor_for__Pgg_kWinMgr__(); // idb
void __cdecl dynamic_atexit_destructor_for__CSpFont::ms_spAlphaProp__(); // idb
void __cdecl dynamic_atexit_destructor_for__CSpFont::ms_spVertexProp__(); // idb
void __cdecl dynamic_atexit_destructor_for__PgCursor::ms_spSystemCursor__(); // idb
void __cdecl dynamic_atexit_destructor_for__PgCursor::ms_spCursorDxSurfaceTexture__(); // idb
void __cdecl dynamic_atexit_destructor_for__PgProfileMgr::ms_kRoot__(); // idb
void __cdecl dynamic_atexit_destructor_for__PgProfileMgr::ms_kTraversalQ__(); // idb
void __cdecl dynamic_atexit_destructor_for__PgEditWin::ms_kCallBackMap__(); // idb
void __cdecl PgPasswdTextGeometry::SetText_::_4_::_dynamic_atexit_destructor_for__kTmpStr__(); // idb
void __cdecl ATL::_dynamic_atexit_destructor_for___AtlBaseModule__(); // idb
void __cdecl ATL::_dynamic_atexit_destructor_for__g_strheap__(); // idb
void __cdecl ATL::_dynamic_atexit_destructor_for__g_strmgr__(); // idb
void __cdecl dynamic_atexit_destructor_for__NiDX9Renderer::ms_kDisplayFormats__(); // idb
void __cdecl dynamic_atexit_destructor_for__NiDX9AdditionalDepthStencilBufferData::ms_kAddDSListCriticalSection__(); // idb
void __cdecl dynamic_atexit_destructor_for__NiDX9AdditionalDepthStencilBufferData::ms_kAddDepthStencil__(); // idb
// _DWORD __stdcall BT_SetAppName(_DWORD); weak
// _DWORD __stdcall BT_SetFlags(_DWORD); weak
// _DWORD __stdcall BT_SetSupportServer(_DWORD, _DWORD); weak
// _DWORD __stdcall BT_SetAppVersion(_DWORD); weak
// _DWORD __stdcall BT_InstallSehFilter(); weak
// _DWORD __stdcall BT_CloseLogFile(_DWORD); weak
// int _BT_AppLogEntryF(_DWORD, _DWORD, const char *, ...); weak
// _DWORD __stdcall BT_ClearLog(_DWORD); weak
// _DWORD __stdcall BT_AddLogFile(_DWORD); weak
// _DWORD __stdcall BT_GetLogFileName(_DWORD); weak
// _DWORD __stdcall BT_SetLogFlags(_DWORD, _DWORD); weak
// _DWORD __stdcall BT_OpenLogFile(_DWORD, _DWORD); weak
// BOOL __stdcall InitCommonControlsEx(const INITCOMMONCONTROLSEX *picce);
// HDC __stdcall CreateCompatibleDC(HDC hdc);
// int __stdcall GetDIBits(HDC hdc, HBITMAP hbm, UINT start, UINT cLines, LPVOID lpvBits, LPBITMAPINFO lpbmi, UINT usage);
// BOOL __stdcall DeleteObject(HGDIOBJ ho);
// BOOL __stdcall DeleteDC(HDC hdc);
// BOOL __stdcall ExtTextOutA(HDC hdc, int x, int y, UINT options, const RECT *lprect, LPCSTR lpString, UINT c, const INT *lpDx);
// UINT __stdcall SetTextAlign(HDC hdc, UINT align);
// HGDIOBJ __stdcall SelectObject(HDC hdc, HGDIOBJ h);
// BOOL __stdcall RemoveFontResourceA(LPCSTR lpFileName);
// HGDIOBJ __stdcall GetStockObject(int i);
// int __stdcall AddFontResourceA(LPCSTR);
// int __stdcall EnumFontFamiliesA(HDC hdc, LPCSTR lpLogfont, FONTENUMPROCA lpProc, LPARAM lParam);
// int __stdcall GetObjectA(HANDLE h, int c, LPVOID pv);
// BOOL __stdcall GetTextExtentPointA(HDC hdc, LPCSTR lpString, int c, LPSIZE lpsz);
// HFONT __stdcall CreateFontA(int cHeight, int cWidth, int cEscapement, int cOrientation, int cWeight, DWORD bItalic, DWORD bUnderline, DWORD bStrikeOut, DWORD iCharSet, DWORD iOutPrecision, DWORD iClipPrecision, DWORD iQuality, DWORD iPitchAndFamily, LPCSTR pszFaceName);
// int __stdcall SetMapMode(HDC hdc, int iMode);
// COLORREF __stdcall SetBkColor(HDC hdc, COLORREF color);
// BOOL __stdcall GetTextExtentPoint32A(HDC hdc, LPCSTR lpString, int c, LPSIZE psizl);
// HBITMAP __stdcall CreateDIBSection(HDC hdc, const BITMAPINFO *lpbmi, UINT usage, void **ppvBits, HANDLE hSection, DWORD offset);
// HBRUSH __stdcall CreateSolidBrush(COLORREF color);
// HFONT __stdcall CreateFontIndirectA(const LOGFONTA *lplf);
// int __stdcall SetBkMode(HDC hdc, int mode);
// COLORREF __stdcall SetTextColor(HDC hdc, COLORREF color);
// BOOL __stdcall TextOutA(HDC hdc, int x, int y, LPCSTR lpString, int c);
// HANDLE __stdcall OpenProcess(DWORD dwDesiredAccess, BOOL bInheritHandle, DWORD dwProcessId);
// BOOL __stdcall GetExitCodeProcess(HANDLE hProcess, LPDWORD lpExitCode);
// HANDLE __stdcall CreateMutexA(LPSECURITY_ATTRIBUTES lpMutexAttributes, BOOL bInitialOwner, LPCSTR lpName);
// void __stdcall InitializeCriticalSection(LPCRITICAL_SECTION lpCriticalSection);
// void __stdcall DeleteCriticalSection(LPCRITICAL_SECTION lpCriticalSection);
// DWORD __stdcall GetModuleFileNameW(HMODULE hModule, LPWSTR lpFilename, DWORD nSize);
// HMODULE __stdcall GetModuleHandleW(LPCWSTR lpModuleName);
// BOOL __stdcall QueryPerformanceCounter(LARGE_INTEGER *lpPerformanceCount);
// BOOL __stdcall QueryPerformanceFrequency(LARGE_INTEGER *lpFrequency);
// DWORD __stdcall SizeofResource(HMODULE hModule, HRSRC hResInfo);
// LPVOID __stdcall LockResource(HGLOBAL hResData);
// HGLOBAL __stdcall LoadResource(HMODULE hModule, HRSRC hResInfo);
// HRSRC __stdcall FindResourceW(HMODULE hModule, LPCWSTR lpName, LPCWSTR lpType);
// HRSRC __stdcall FindResourceExW(HMODULE hModule, LPCWSTR lpType, LPCWSTR lpName, WORD wLanguage);
// int __stdcall WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int cchWideChar, LPSTR lpMultiByteStr, int cbMultiByte, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar);
// LPSTR __stdcall lstrcpyA(LPSTR lpString1, LPCSTR lpString2);
// BOOL __stdcall TerminateProcess(HANDLE hProcess, UINT uExitCode);
// HANDLE __stdcall GetCurrentProcess();
// DWORD __stdcall GetFileAttributesA(LPCSTR lpFileName);
// void __stdcall GetLocalTime(LPSYSTEMTIME lpSystemTime);
// void __stdcall OutputDebugStringW(LPCWSTR lpOutputString);
// DWORD __stdcall GetEnvironmentVariableW(LPCWSTR lpName, LPWSTR lpBuffer, DWORD nSize);
// DWORD __stdcall FormatMessageA(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPSTR lpBuffer, DWORD nSize, va_list *Arguments);
// BOOL __stdcall FreeLibrary(HMODULE hLibModule);
// HMODULE __stdcall LoadLibraryExA(LPCSTR lpLibFileName, HANDLE hFile, DWORD dwFlags);
// FARPROC __stdcall GetProcAddress(HMODULE hModule, LPCSTR lpProcName);
// HMODULE __stdcall LoadLibraryW(LPCWSTR lpLibFileName);
// HMODULE __stdcall GetModuleHandleA(LPCSTR lpModuleName);
// SIZE_T __stdcall HeapSize(HANDLE hHeap, DWORD dwFlags, LPCVOID lpMem);
// BOOL __stdcall InitializeCriticalSectionAndSpinCount(LPCRITICAL_SECTION lpCriticalSection, DWORD dwSpinCount);
// BOOL __stdcall HeapDestroy(HANDLE hHeap);
// DWORD __stdcall TlsAlloc();
// BOOL __stdcall MoveFileA(LPCSTR lpExistingFileName, LPCSTR lpNewFileName);
// BOOL __stdcall CreateDirectoryA(LPCSTR lpPathName, LPSECURITY_ATTRIBUTES lpSecurityAttributes);
// LPVOID __stdcall HeapAlloc(HANDLE hHeap, DWORD dwFlags, SIZE_T dwBytes);
// int __stdcall lstrlenA(LPCSTR lpString);
// DWORD __stdcall GetLastError();
// DWORD __stdcall GetCurrentDirectoryA(DWORD nBufferLength, LPSTR lpBuffer);
// DWORD __stdcall GetShortPathNameA(LPCSTR lpszLongPath, LPSTR lpszShortPath, DWORD cchBuffer);
// BOOL __stdcall CreateProcessA(LPCSTR lpApplicationName, LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, LPSTARTUPINFOA lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation);
// HANDLE __stdcall FindFirstFileA(LPCSTR lpFileName, LPWIN32_FIND_DATAA lpFindFileData);
// BOOL __stdcall FindNextFileA(HANDLE hFindFile, LPWIN32_FIND_DATAA lpFindFileData);
// BOOL __stdcall FindClose(HANDLE hFindFile);
// BOOL __stdcall DeleteFileA(LPCSTR lpFileName);
// int __stdcall MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, int cbMultiByte, LPWSTR lpWideCharStr, int cchWideChar);
// void __stdcall LeaveCriticalSection(LPCRITICAL_SECTION lpCriticalSection);
// void __stdcall EnterCriticalSection(LPCRITICAL_SECTION lpCriticalSection);
// BOOL __stdcall IsDBCSLeadByte(BYTE TestChar);
// LONG __stdcall InterlockedExchange(volatile LONG *Target, LONG Value);
// void __stdcall OutputDebugStringA(LPCSTR lpOutputString);
// void __stdcall Sleep(DWORD dwMilliseconds);
// LPVOID __stdcall HeapReAlloc(HANDLE hHeap, DWORD dwFlags, LPVOID lpMem, SIZE_T dwBytes);
// BOOL __stdcall HeapFree(HANDLE hHeap, DWORD dwFlags, LPVOID lpMem);
// void __stdcall RaiseException(DWORD dwExceptionCode, DWORD dwExceptionFlags, DWORD nNumberOfArguments, const ULONG_PTR *lpArguments);
// DWORD __stdcall GetCurrentProcessId();
// DWORD __stdcall GetCurrentThreadId();
// PVOID __stdcall DecodePointer(PVOID Ptr);
// PVOID __stdcall EncodePointer(PVOID Ptr);
// DWORD __stdcall SetFilePointer(HANDLE hFile, LONG lDistanceToMove, PLONG lpDistanceToMoveHigh, DWORD dwMoveMethod);
// BOOL __stdcall WriteFile(HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite, LPDWORD lpNumberOfBytesWritten, LPOVERLAPPED lpOverlapped);
// BOOL __stdcall ReadFile(HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead, LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped);
// HANDLE __stdcall CreateFileA(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile);
// HANDLE __stdcall OpenThread(DWORD dwDesiredAccess, BOOL bInheritHandle, DWORD dwThreadId);
// DWORD __stdcall SuspendThread(HANDLE hThread);
// HMODULE __stdcall LoadLibraryA(LPCSTR lpLibFileName);
// BOOL __stdcall CloseHandle(HANDLE hObject);
// void __stdcall __noreturn ExitProcess(UINT uExitCode);
// LONG __stdcall InterlockedDecrement(volatile LONG *lpAddend);
// LONG __stdcall InterlockedIncrement(volatile LONG *lpAddend);
// DWORD __stdcall GetModuleFileNameA(HMODULE hModule, LPSTR lpFilename, DWORD nSize);
// HANDLE __stdcall GetProcessHeap();
// HANDLE __stdcall CreateSemaphoreA(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lInitialCount, LONG lMaximumCount, LPCSTR lpName);
// void __stdcall GetSystemInfo(LPSYSTEM_INFO lpSystemInfo);
// void __stdcall GetSystemTime(LPSYSTEMTIME lpSystemTime);
// BOOL __stdcall GetVersionExA(LPOSVERSIONINFOA lpVersionInformation);
// DWORD __stdcall GetPrivateProfileStringA(LPCSTR lpAppName, LPCSTR lpKeyName, LPCSTR lpDefault, LPSTR lpReturnedString, DWORD nSize, LPCSTR lpFileName);
// LANGID __stdcall GetUserDefaultLangID();
// BOOL __stdcall GlobalUnlock(HGLOBAL hMem);
// LPVOID __stdcall GlobalLock(HGLOBAL hMem);
// DWORD __stdcall GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh);
// BSTR __stdcall SysAllocString(const OLECHAR *psz);
// SAFEARRAY *__stdcall SafeArrayCreate(VARTYPE vt, UINT cDims, SAFEARRAYBOUND *rgsabound);
// HRESULT __stdcall SafeArrayAccessData(SAFEARRAY *psa, void **ppvData);
// HRESULT __stdcall SafeArrayUnaccessData(SAFEARRAY *psa);
// HRESULT __stdcall VariantClear(VARIANTARG *pvarg);
// void __stdcall VariantInit(VARIANTARG *pvarg);
// HRESULT __stdcall SHGetSpecialFolderLocation(HWND hwnd, int csidl, LPITEMIDLIST *ppidl);
// HINSTANCE __stdcall ShellExecuteA(HWND hwnd, LPCSTR lpOperation, LPCSTR lpFile, LPCSTR lpParameters, LPCSTR lpDirectory, INT nShowCmd);
// BOOL __stdcall SHGetPathFromIDListA(LPCITEMIDLIST pidl, LPSTR pszPath);
// BOOL __stdcall ShellExecuteExA(SHELLEXECUTEINFOA *pExecInfo);
// BOOL __stdcall PathFileExistsA(LPCSTR pszPath);
// BOOL __stdcall GetClassInfoExA(HINSTANCE hInstance, LPCSTR lpszClass, LPWNDCLASSEXA lpwcx);
// LRESULT __stdcall CallWindowProcA(WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
// int __stdcall MessageBoxA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType);
// HKL __stdcall GetKeyboardLayout(DWORD idThread);
// ATOM __stdcall RegisterClassExA(const WNDCLASSEXA *);
// HANDLE __stdcall SetClipboardData(UINT uFormat, HANDLE hMem);
// BOOL __stdcall OpenClipboard(HWND hWndNewOwner);
// UINT __stdcall RegisterClipboardFormatA(LPCSTR lpszFormat);
// HANDLE __stdcall GetClipboardData(UINT uFormat);
// BOOL __stdcall UpdateWindow(HWND hWnd);
// BOOL __stdcall AdjustWindowRect(LPRECT lpRect, DWORD dwStyle, BOOL bMenu);
// INT_PTR __stdcall DialogBoxIndirectParamA(HINSTANCE hInstance, LPCDLGTEMPLATEA hDialogTemplate, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam);
// BOOL __stdcall EndDialog(HWND hDlg, INT_PTR nResult);
// BOOL __stdcall CheckDlgButton(HWND hDlg, int nIDButton, UINT uCheck);
// LRESULT __stdcall SendDlgItemMessageA(HWND hDlg, int nIDDlgItem, UINT Msg, WPARAM wParam, LPARAM lParam);
// BOOL __stdcall PeekMessageA(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg);
// int __stdcall TranslateAcceleratorA(HWND hWnd, HACCEL hAccTable, LPMSG lpMsg);
// void __stdcall PostQuitMessage(int nExitCode);
// BOOL __stdcall PostMessageA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
// LRESULT __stdcall DispatchMessageA(const MSG *lpMsg);
// BOOL __stdcall CloseClipboard();
// int __stdcall FillRect(HDC hDC, const RECT *lprc, HBRUSH hbr);
// BOOL __stdcall GetKeyboardLayoutNameA(LPSTR pwszKLID);
// BOOL __stdcall SetWindowTextA(HWND hWnd, LPCSTR lpString);
// BOOL __stdcall ClientToScreen(HWND hWnd, LPPOINT lpPoint);
// BOOL __stdcall SetForegroundWindow(HWND hWnd);
// LONG __stdcall SetWindowLongA(HWND hWnd, int nIndex, LONG dwNewLong);
// LONG __stdcall ChangeDisplaySettingsA(DEVMODEA *lpDevMode, DWORD dwFlags);
// BOOL __stdcall SetWindowPos(HWND hWnd, HWND hWndInsertAfter, int X, int Y, int cx, int cy, UINT uFlags);
// HCURSOR __stdcall SetCursor(HCURSOR hCursor);
// HICON __stdcall LoadIconA(HINSTANCE hInstance, LPCSTR lpIconName);
// DWORD __stdcall SetClassLongA(HWND hWnd, int nIndex, LONG dwNewLong);
// LONG __stdcall GetWindowLongA(HWND hWnd, int nIndex);
// BOOL __stdcall EnumDisplaySettingsA(LPCSTR lpszDeviceName, DWORD iModeNum, DEVMODEA *lpDevMode);
// SHORT __stdcall GetAsyncKeyState(int vKey);
// BOOL __stdcall GetCursorPos(LPPOINT lpPoint);
// BOOL __stdcall ScreenToClient(HWND hWnd, LPPOINT lpPoint);
// DWORD __stdcall GetWindowThreadProcessId(HWND hWnd, LPDWORD lpdwProcessId);
// HANDLE __stdcall LoadImageA(HINSTANCE hInst, LPCSTR name, UINT type, int cx, int cy, UINT fuLoad);
// BOOL __stdcall SetCursorPos(int X, int Y);
// BOOL __stdcall DestroyCursor(HCURSOR hCursor);
// BOOL __stdcall GetIconInfo(HICON hIcon, PICONINFO piconinfo);
// int __stdcall ReleaseDC(HWND hWnd, HDC hDC);
// HCURSOR __stdcall LoadCursorA(HINSTANCE hInstance, LPCSTR lpCursorName);
// ATOM __stdcall RegisterClassA(const WNDCLASSA *lpWndClass);
// HANDLE __stdcall GetPropA(HWND hWnd, LPCSTR lpString);
// BOOL __stdcall SetPropA(HWND hWnd, LPCSTR lpString, HANDLE hData);
// HANDLE __stdcall RemovePropA(HWND hWnd, LPCSTR lpString);
// LRESULT __stdcall DefWindowProcA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
// BOOL __stdcall SetRectEmpty(LPRECT lprc);
// BOOL __stdcall GetClassInfoA(HINSTANCE hInstance, LPCSTR lpClassName, LPWNDCLASSA lpWndClass);
// BOOL __stdcall UnregisterClassA(LPCSTR lpClassName, HINSTANCE hInstance);
// int __stdcall GetSystemMetrics(int nIndex);
// BOOL __stdcall CopyRect(LPRECT lprcDst, const RECT *lprcSrc);
// BOOL __stdcall PtInRect(const RECT *lprc, POINT pt);
// UINT __stdcall GetCaretBlinkTime();
// HWND __stdcall GetFocus();
// LRESULT __stdcall SendMessageA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
// BOOL __stdcall SetRect(LPRECT lprc, int xLeft, int yTop, int xRight, int yBottom);
// int _wsprintfA(LPSTR, LPCSTR, ...);
// BOOL __stdcall AdjustWindowRectEx(LPRECT lpRect, DWORD dwStyle, BOOL bMenu, DWORD dwExStyle);
// HWND __stdcall SetFocus(HWND hWnd);
// HWND __stdcall CreateWindowExA(DWORD dwExStyle, LPCSTR lpClassName, LPCSTR lpWindowName, DWORD dwStyle, int X, int Y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam);
// BOOL __stdcall ShowWindow(HWND hWnd, int nCmdShow);
// BOOL __stdcall DestroyWindow(HWND hWnd);
// BOOL __stdcall IsWindow(HWND hWnd);
// BOOL __stdcall GetWindowRect(HWND hWnd, LPRECT lpRect);
// BOOL __stdcall MoveWindow(HWND hWnd, int X, int Y, int nWidth, int nHeight, BOOL bRepaint);
// HDC __stdcall GetDC(HWND hWnd);
// BOOL __stdcall GetClientRect(HWND hWnd, LPRECT lpRect);
// BOOL __stdcall EnumWindows(WNDENUMPROC lpEnumFunc, LPARAM lParam);
// int __stdcall GetWindowTextLengthA(HWND hWnd);
// BOOL __stdcall EnumChildWindows(HWND hWndParent, WNDENUMPROC lpEnumFunc, LPARAM lParam);
// int __stdcall GetWindowTextA(HWND hWnd, LPSTR lpString, int nMaxCount);
// BOOL __stdcall TranslateMessage(const MSG *lpMsg);
// HINTERNET __stdcall InternetConnectA(HINTERNET hInternet, LPCSTR lpszServerName, INTERNET_PORT nServerPort, LPCSTR lpszUserName, LPCSTR lpszPassword, DWORD dwService, DWORD dwFlags, DWORD_PTR dwContext);
// HINTERNET __stdcall HttpOpenRequestA(HINTERNET hConnect, LPCSTR lpszVerb, LPCSTR lpszObjectName, LPCSTR lpszVersion, LPCSTR lpszReferrer, LPCSTR *lplpszAcceptTypes, DWORD dwFlags, DWORD_PTR dwContext);
// BOOL __stdcall HttpSendRequestA(HINTERNET hRequest, LPCSTR lpszHeaders, DWORD dwHeadersLength, LPVOID lpOptional, DWORD dwOptionalLength);
// BOOL __stdcall HttpQueryInfoA(HINTERNET hRequest, DWORD dwInfoLevel, LPVOID lpBuffer, LPDWORD lpdwBufferLength, LPDWORD lpdwIndex);
// BOOL __stdcall InternetReadFile(HINTERNET hFile, LPVOID lpBuffer, DWORD dwNumberOfBytesToRead, LPDWORD lpdwNumberOfBytesRead);
// BOOL __stdcall InternetCloseHandle(HINTERNET hInternet);
// HINTERNET __stdcall InternetOpenA(LPCSTR lpszAgent, DWORD dwAccessType, LPCSTR lpszProxy, LPCSTR lpszProxyBypass, DWORD dwFlags);
// BOOL __stdcall InternetSetOptionA(HINTERNET hInternet, DWORD dwOption, LPVOID lpBuffer, DWORD dwBufferLength);
// DWORD __stdcall timeGetTime();
// _DWORD __stdcall AIL_active_3D_sample_count(_DWORD); weak
// _DWORD __stdcall AIL_open_3D_listener(_DWORD); weak
// _DWORD __stdcall AIL_close_3D_listener(_DWORD); weak
// _DWORD __stdcall AIL_allocate_3D_sample_handle(_DWORD); weak
// _DWORD __stdcall AIL_close_3D_provider(_DWORD); weak
// _DWORD __stdcall AIL_enumerate_3D_providers(_DWORD, _DWORD, _DWORD); weak
// _DWORD __stdcall AIL_quick_handles(_DWORD, _DWORD, _DWORD); weak
// _DWORD __stdcall AIL_quick_startup(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD); weak
// _DWORD __stdcall AIL_startup(); weak
// _DWORD __stdcall AIL_set_redist_directory(_DWORD); weak
// _DWORD __stdcall AIL_shutdown(); weak
// _DWORD __stdcall AIL_quick_shutdown(); weak
// _DWORD __stdcall AIL_waveOutClose(_DWORD); weak
// _DWORD __stdcall AIL_3D_speaker_type(_DWORD); weak
// _DWORD __stdcall AIL_set_3D_speaker_type(_DWORD, _DWORD); weak
// _DWORD __stdcall AIL_last_error(); weak
// _DWORD __stdcall AIL_set_3D_distance_factor(_DWORD, _DWORD); weak
// _DWORD __stdcall AIL_set_3D_provider_preference(_DWORD, _DWORD, _DWORD); weak
// _DWORD __stdcall AIL_3D_provider_attribute(_DWORD, _DWORD, _DWORD); weak
// _DWORD __stdcall AIL_3D_room_type(_DWORD); weak
// _DWORD __stdcall AIL_set_3D_room_type(_DWORD, _DWORD); weak
// _DWORD __stdcall AIL_release_3D_sample_handle(_DWORD); weak
// _DWORD __stdcall AIL_release_sample_handle(_DWORD); weak
// _DWORD __stdcall AIL_close_stream(_DWORD); weak
// _DWORD __stdcall AIL_pause_stream(_DWORD, _DWORD); weak
// _DWORD __stdcall AIL_decompress_ASI(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD); weak
// _DWORD __stdcall AIL_mem_free_lock(_DWORD); weak
// _DWORD __stdcall AIL_decompress_ADPCM(_DWORD, _DWORD, _DWORD); weak
// _DWORD __stdcall AIL_open_3D_provider(_DWORD); weak
// _DWORD __stdcall AIL_file_type(_DWORD, _DWORD); weak
// _DWORD __stdcall AIL_file_read(_DWORD, _DWORD); weak
// _DWORD __stdcall AIL_file_size(_DWORD); weak
// _DWORD __stdcall AIL_set_sample_loop_count(_DWORD, _DWORD); weak
// _DWORD __stdcall AIL_set_stream_loop_count(_DWORD, _DWORD); weak
// _DWORD __stdcall AIL_set_3D_sample_loop_count(_DWORD, _DWORD); weak
// _DWORD __stdcall AIL_set_3D_sample_cone(_DWORD, _DWORD, _DWORD, _DWORD); weak
// _DWORD __stdcall AIL_3D_sample_cone(_DWORD, _DWORD, _DWORD, _DWORD); weak
// _DWORD __stdcall AIL_set_3D_sample_distances(_DWORD, _DWORD, _DWORD); weak
// _DWORD __stdcall AIL_3D_sample_distances(_DWORD, _DWORD, _DWORD); weak
// _DWORD __stdcall AIL_set_sample_volume_levels(_DWORD, _DWORD, _DWORD); weak
// _DWORD __stdcall AIL_set_stream_volume_levels(_DWORD, _DWORD, _DWORD); weak
// _DWORD __stdcall AIL_set_3D_sample_volume(_DWORD, _DWORD); weak
// _DWORD __stdcall AIL_sample_volume_levels(_DWORD, _DWORD, _DWORD); weak
// _DWORD __stdcall AIL_stream_volume_levels(_DWORD, _DWORD, _DWORD); weak
// _DWORD __stdcall AIL_3D_sample_volume(_DWORD); weak
// _DWORD __stdcall AIL_set_sample_playback_rate(_DWORD, _DWORD); weak
// _DWORD __stdcall AIL_set_stream_playback_rate(_DWORD, _DWORD); weak
// _DWORD __stdcall AIL_set_3D_sample_playback_rate(_DWORD, _DWORD); weak
// _DWORD __stdcall AIL_sample_playback_rate(_DWORD); weak
// _DWORD __stdcall AIL_stream_playback_rate(_DWORD); weak
// _DWORD __stdcall AIL_3D_sample_playback_rate(_DWORD); weak
// _DWORD __stdcall AIL_set_3D_sample_preference(_DWORD, _DWORD, _DWORD); weak
// _DWORD __stdcall AIL_3D_sample_attribute(_DWORD, _DWORD, _DWORD); weak
// _DWORD __stdcall AIL_start_sample(_DWORD); weak
// _DWORD __stdcall AIL_start_stream(_DWORD); weak
// _DWORD __stdcall AIL_start_3D_sample(_DWORD); weak
// _DWORD __stdcall AIL_stop_sample(_DWORD); weak
// _DWORD __stdcall AIL_stop_3D_sample(_DWORD); weak
// _DWORD __stdcall AIL_set_sample_ms_position(_DWORD, _DWORD); weak
// _DWORD __stdcall AIL_set_stream_ms_position(_DWORD, _DWORD); weak
// _DWORD __stdcall AIL_set_3D_sample_offset(_DWORD, _DWORD); weak
// _DWORD __stdcall AIL_sample_status(_DWORD); weak
// _DWORD __stdcall AIL_stream_status(_DWORD); weak
// _DWORD __stdcall AIL_3D_sample_status(_DWORD); weak
// _DWORD __stdcall AIL_sample_ms_position(_DWORD, _DWORD, _DWORD); weak
// _DWORD __stdcall AIL_stream_ms_position(_DWORD, _DWORD, _DWORD); weak
// _DWORD __stdcall AIL_3D_sample_offset(_DWORD); weak
// _DWORD __stdcall AIL_set_sample_position(_DWORD, _DWORD); weak
// _DWORD __stdcall AIL_set_stream_position(_DWORD, _DWORD); weak
// _DWORD __stdcall AIL_stream_position(_DWORD); weak
// _DWORD __stdcall AIL_set_3D_orientation(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD); weak
// _DWORD __stdcall AIL_set_3D_velocity_vector(_DWORD, _DWORD, _DWORD, _DWORD); weak
// _DWORD __stdcall AIL_set_3D_position(_DWORD, _DWORD, _DWORD, _DWORD); weak
// _DWORD __stdcall AIL_set_3D_sample_effects_level(_DWORD, _DWORD); weak
// _DWORD __stdcall AIL_3D_sample_effects_level(_DWORD); weak
// _DWORD __stdcall AIL_set_3D_sample_occlusion(_DWORD, _DWORD); weak
// _DWORD __stdcall AIL_3D_sample_occlusion(_DWORD); weak
// _DWORD __stdcall AIL_set_3D_sample_obstruction(_DWORD, _DWORD); weak
// _DWORD __stdcall AIL_3D_sample_obstruction(_DWORD); weak
// _DWORD __stdcall AIL_3D_position(_DWORD, _DWORD, _DWORD, _DWORD); weak
// _DWORD __stdcall AIL_3D_orientation(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD); weak
// _DWORD __stdcall AIL_3D_velocity(_DWORD, _DWORD, _DWORD, _DWORD); weak
// _DWORD __stdcall AIL_allocate_file_sample(_DWORD, _DWORD, _DWORD); weak
// _DWORD __stdcall AIL_open_stream(_DWORD, _DWORD, _DWORD); weak
// _DWORD __stdcall AIL_set_3D_sample_file(_DWORD, _DWORD); weak
// _DWORD __stdcall AIL_WAV_info(_DWORD, _DWORD); weak
// HRESULT __stdcall CoCreateInstance(const IID *const rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, const IID *const riid, LPVOID *ppv);
// void __stdcall CoUninitialize();
// HRESULT __stdcall CLSIDFromString(LPCOLESTR lpsz, LPCLSID pclsid);
// HRESULT __stdcall CreateBindCtx(DWORD reserved, LPBC *ppbc);
// HRESULT __stdcall CoInitialize(LPVOID pvReserved);
// int _SteamUser(void); weak
// int _SteamAPI_Init(void); weak
// int __cdecl _SteamAPI_RegisterCallback(_DWORD, _DWORD); weak
// int __cdecl _SteamAPI_UnregisterCallback(_DWORD); weak
// int __fastcall _SteamAPI_IsSteamRunning(_DWORD, _DWORD); weak

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

_UNKNOWN loc_410030; // weak
_UNKNOWN loc_4B7C70; // weak
_UNKNOWN loc_4FFFFE; // weak
_UNKNOWN loc_516870; // weak
_UNKNOWN loc_56E75A; // weak
_UNKNOWN loc_580005; // weak
_UNKNOWN loc_585857; // weak
_UNKNOWN loc_5C4345; // weak
_UNKNOWN loc_5C4D3F; // weak
_UNKNOWN loc_5FFFFB; // weak
_UNKNOWN loc_600080; // weak
char byte_66696E[2] = { 'Ì', 'Ì' }; // weak
char byte_6E007B[5] = { 'Ì', 'Ì', 'Ì', 'Ì', 'Ì' }; // weak
_UNKNOWN loc_700000; // weak
_UNKNOWN loc_7FBFFC; // weak
_UNKNOWN loc_7FC03F; // weak
_UNKNOWN loc_7FFFFE; // weak
_UNKNOWN loc_800000; // weak
_UNKNOWN loc_800002; // weak
char byte_802F28[] = { '\0' }; // weak
_UNKNOWN loc_808080; // weak
_UNKNOWN loc_825A97; // weak
char byte_936B5C[] = { '\0' }; // weak
char byte_936C10[] = { '\0' }; // weak
int (__thiscall *std::bad_alloc::`vftable')(void *p, char) = &std::bad_alloc::`vector deleting destructor'; // weak
int (__thiscall *Argv::`vftable')(void *p, char) = &Argv::`vector deleting destructor'; // weak
void (__thiscall *BoxAnnounceWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *BoxAnnounceWin::`vftable'{for `NiNode'})(void *p, char) = &BoxAnnounceWin::`scalar deleting destructor'; // weak
int (__thiscall *CameraCtrl::`vftable')(void *p, char) = &CameraCtrl::`scalar deleting destructor'; // weak
char byte_96E96C = '÷'; // idb
char byte_96E9D8 = 'ó'; // idb
char byte_96EA44 = 'ð'; // idb
char byte_96EA68 = '÷'; // idb
char byte_96EAB0 = 'ô'; // idb
char byte_96EAF8 = 'ñ'; // idb
char byte_96EB64 = 'ð'; // idb
char byte_96EB88 = 'ñ'; // idb
char byte_96EBF4 = 'ñ'; // idb
char byte_96EC18 = '÷'; // idb
char byte_96EC3C = 'ö'; // idb
char byte_96ECF0 = 'ó'; // idb
char byte_96ED38 = 'ð'; // idb
char byte_96EE58 = 'ð'; // idb
char byte_96EEC4 = 'ð'; // idb
char byte_96EF30 = '÷'; // idb
char byte_96EF54 = 'ð'; // idb
char byte_96EF9C = 'ð'; // idb
char byte_96EFC0 = 'ð'; // idb
char byte_96EFE4 = '÷'; // idb
char byte_96F104 = 'ô'; // idb
char byte_96F128 = 'ö'; // idb
char byte_96F1B8 = 'ó'; // idb
char byte_96F224 = '÷'; // idb
char byte_96F248 = 'ó'; // idb
char byte_96F2D8 = '÷'; // idb
char byte_96F320 = 'ñ'; // idb
char byte_96F344 = 'ó'; // idb
char byte_96F38C = 'ð'; // idb
char byte_96F3F8 = 'ñ'; // idb
char byte_96F464 = 'ó'; // idb
char byte_96F4AC = 'ö'; // idb
char byte_96F560 = 'ö'; // idb
char byte_96F584 = '÷'; // idb
char byte_96F5A8 = 'ð'; // idb
char byte_96F614 = 'ñ'; // idb
char byte_96F680 = '÷'; // idb
char byte_96F6A4 = 'ð'; // idb
char byte_96F6C8 = 'ô'; // idb
char byte_96F710 = 'ð'; // idb
_UNKNOWN unk_96F7BE; // weak
char off_96F860[] = { 'J', 'o', 'b', '\0' }; // idb
int (__thiscall *NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::`vftable')(void *p, char) = &NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::`vector deleting destructor'; // weak
char byte_96F8EB[5] = { '\0', '\x1C', '\x15', '¡', '\0' }; // idb
int (__thiscall *NiTMap<unsigned long,NiPointer<PgWinBut>>::`vftable')(void *p, char) = &NiTMap<unsigned long,NiPointer<PgWinBut>>::`vector deleting destructor'; // weak
void (__thiscall *CharCreateClassWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CharCreateClassWin::`vftable'{for `NiNode'})(void *p, char) = &CharCreateClassWin::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned long,NiPointer<PgWinSpr>>::`vftable')(void *p, char) = &NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned long,NiPointer<PgWinSpr>>::`vector deleting destructor'; // weak
int (__thiscall *NiTMap<unsigned long,NiPointer<PgWinSpr>>::`vftable')(void *p, char) = &NiTMap<unsigned long,NiPointer<PgWinSpr>>::`scalar deleting destructor'; // weak
void (__thiscall *CharCreateDescritWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CharCreateDescritWin::`vftable'{for `NiNode'})(void *p, char) = &CharCreateDescritWin::`scalar deleting destructor'; // weak
void (__thiscall *CharCreateInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CharCreateInfoWin::`vftable'{for `NiNode'})(void *p, char) = &CharCreateInfoWin::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vector deleting destructor'; // weak
int (__thiscall *NiProperty::`vftable')(void *p, char) = &NiFogProperty::`scalar deleting destructor'; // weak
int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char) = &NiFogProperty::`scalar deleting destructor'; // weak
void (__thiscall *IDirectMessenger::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vector deleting destructor'; // weak
int (__thiscall *NiAlphaProperty::`vftable')(void *p, char) = &NiFogProperty::`scalar deleting destructor'; // weak
int (__thiscall *NiFogProperty::`vftable')(void *p, char) = &NiFogProperty::`scalar deleting destructor'; // weak
void (__thiscall *PgFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *PgTList<NiPointer<Shadow>>::`vftable')(void *p, char) = &PgTList<NiPointer<Shadow>>::`vector deleting destructor'; // weak
void (__thiscall *CharCreateFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
void (__thiscall *CharCreateOkCancelWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CharCreateOkCancelWin::`vftable'{for `NiNode'})(void *p, char) = &CharCreateOkCancelWin::`vector deleting destructor'; // weak
void (__thiscall *CharCreateStatWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CharCreateStatWin::`vftable'{for `NiNode'})(void *p, char) = &CharCreateStatWin::`scalar deleting destructor'; // weak
void (__thiscall *CharCreateViewCtrlWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CharCreateViewCtrlWin::`vftable'{for `NiNode'})(void *p, char) = &CharCreateViewCtrlWin::`vector deleting destructor'; // weak
void (__thiscall *CharSelectFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
_UNKNOWN unk_970FDA; // weak
_UNKNOWN unk_970FDB; // weak
_UNKNOWN unk_970FE2; // weak
void (__thiscall *ChangeNameWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ChangeNameWin::`vftable'{for `NiNode'})(void *p, char) = &ChangeNameWin::`scalar deleting destructor'; // weak
char byte_971303 = '\0'; // idb
char byte_97130D[3] = { '\0', '\0', '\0' }; // idb
char off_971380[] = { 'C', 'l', 's', '\0' }; // idb
void (__thiscall *ChatColorSpinWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ChatColorSpinWin::`vftable'{for `NiNode'})(void *p, char) = &ChatColorSpinWin::`scalar deleting destructor'; // weak
char byte_971681 = '\0'; // idb
char byte_971682 = '\0'; // idb
char byte_971683 = '\0'; // idb
char byte_97169D = '\0'; // idb
char byte_97169E[2] = { '\0', '\0' }; // idb
char off_971760[] = { 'C', 'l', 's', '\0' }; // idb
int (__thiscall *NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::`vftable')(void *p, char) = &NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::`vector deleting destructor'; // weak
int (__thiscall *NiTMap<unsigned char,NiPointer<PgWinSpr>>::`vftable')(void *p, char) = &NiTMap<unsigned char,NiPointer<PgWinSpr>>::`vector deleting destructor'; // weak
void (__thiscall *ClassChangeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ClassChangeWin::`vftable'{for `NiNode'})(void *p, char) = &ClassChangeWin::`vector deleting destructor'; // weak
int (__thiscall *DShowMovie::`vftable')(void *p, char) = &DShowMovie::`vector deleting destructor'; // weak
_UNKNOWN unk_971D85; // weak
_UNKNOWN unk_971D86; // weak
_UNKNOWN unk_971D87; // weak
_UNKNOWN unk_971D91; // weak
_UNKNOWN unk_971D92; // weak
_UNKNOWN unk_971D93; // weak
void (__thiscall *EventRankWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *EventRankWin::`vftable'{for `NiNode'})(void *p, char) = &EventRankWin::`scalar deleting destructor'; // weak
void (__thiscall *EventTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *EventTimeWin::`vftable'{for `NiNode'})(void *p, char) = &EventTimeWin::`scalar deleting destructor'; // weak
char filename[4] = { '\0', '\0', '\0', '\0' }; // idb
_UNKNOWN unk_9724BB; // weak
_UNKNOWN unk_9724D7; // weak
_UNKNOWN unk_9724E6; // weak
_UNKNOWN unk_9724E7; // weak
_UNKNOWN unk_9724F6; // weak
_UNKNOWN unk_9724F7; // weak
_UNKNOWN unk_9724FE; // weak
_UNKNOWN unk_9724FF; // weak
_UNKNOWN unk_972509; // weak
_UNKNOWN unk_97250A; // weak
_UNKNOWN unk_97250B; // weak
int (__thiscall *Encrypt::FileStream::`vftable')(void *p, char) = &Encrypt::FileStream::`vector deleting destructor'; // weak
int (__cdecl *ITableBase<FontSet,FontSetTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *FontSetTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
char byte_972632[2] = { '\0', '\0' }; // idb
void (__thiscall *ForumWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ForumWin::`vftable'{for `NiNode'})(void *p, char) = &ForumWin::`scalar deleting destructor'; // weak
void (__thiscall *GuildEmblemIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildEmblemIcon::`vftable'{for `NiNode'})(void *p, char) = &GuildEmblemIcon::`scalar deleting destructor'; // weak
void (__thiscall *GuildEmblemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildEmblemWin::`vftable'{for `NiNode'})(void *p, char) = &GuildEmblemWin::`vector deleting destructor'; // weak
void *off_97300C = (void *)0x786F42; // weak
int (__thiscall *NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,char const *,NiPointer<NiSourceTexture>>::`vftable')(void *p, char) = &NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,char const *,NiPointer<NiSourceTexture>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<DFALL<NiPointer<NiTexturingProperty>>,char const *,NiPointer<NiTexturingProperty>>::`vftable')(void *p, char) = &NiTMapBase<DFALL<NiPointer<NiTexturingProperty>>,char const *,NiPointer<NiTexturingProperty>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTMap<char const *,NiPointer<NiSourceTexture>>::`vftable')(void *p, char) = &NiTMap<char const *,NiPointer<NiSourceTexture>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiSourceTexture>>,NiPointer<NiSourceTexture>>::`vftable')(void *p, char) = &NiTStringMap<NiPointer<NiSourceTexture>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTMap<char const *,NiPointer<NiTexturingProperty>>::`vftable')(void *p, char) = &NiTMap<char const *,NiPointer<NiTexturingProperty>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiTexturingProperty>>,NiPointer<NiTexturingProperty>>::`vftable')(void *p, char) = &NiTStringMap<NiPointer<NiTexturingProperty>>::`vector deleting destructor'; // weak
int (__thiscall *NiTStringMap<NiPointer<NiSourceTexture>>::`vftable')(void *p, char) = &NiTStringMap<NiPointer<NiSourceTexture>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTStringMap<NiPointer<NiTexturingProperty>>::`vftable')(void *p, char) = &NiTStringMap<NiPointer<NiTexturingProperty>>::`vector deleting destructor'; // weak
int (__thiscall *ItemMixDataTab::`vftable')(void *p, char) = &ItemMixDataTab::`scalar deleting destructor'; // weak
void (__thiscall *MixItemIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MixItemIcon::`vftable'{for `NiNode'})(void *p, char) = &MixItemIcon::`scalar deleting destructor'; // weak
int (__thiscall *PgWinDrop::`vftable')(void *p, char) = &PgWinDrop::`scalar deleting destructor'; // weak
int (__thiscall *DropContents::`vftable')(void *p, char) = &DropContents::`scalar deleting destructor'; // weak
void (__thiscall *ItemMixWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ItemMixWin::`vftable'{for `NiNode'})(void *p, char) = &ItemMixWin::`vector deleting destructor'; // weak
void (__thiscall *KDTeamScoreWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *KDTeamScoreWin::`vftable'{for `NiNode'})(void *p, char) = &KDTeamScoreWin::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::`vector deleting destructor'; // weak
int (__thiscall *NiRefObject::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::`vector deleting destructor'; // weak
int (__thiscall *PgTList<KeyMap::KeyNode *>::`vftable')(void *p, char) = &PgTList<KeyMap::KeyNode *>::`scalar deleting destructor'; // weak
int (__thiscall *KeyMap::`vftable')(void *p, char) = &KeyMap::`vector deleting destructor'; // weak
char byte_973A97 = '\0'; // idb
char First2 = '\0'; // idb
int (__thiscall *LuaArgument::`vftable')(void *p, char) = &LuaArgument::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable')(void *p, char) = &NiTListBase<DFALL<DamageInfo *>,DamageInfo *>::`scalar deleting destructor'; // weak
int (__thiscall *LuaScript::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable')(void *p, char) = &NiTList<DamageInfo *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTList<DamageInfo *>::`vftable')(void *p, char) = &NiTList<DamageInfo *>::`scalar deleting destructor'; // weak
int (__thiscall *Singleton<LuaScriptMgr>::`vftable')(void *p, char) = &Singleton<LuaScriptMgr>::`vector deleting destructor'; // weak
int (__thiscall *NiTMapBase<DFALL<NiPointer<LuaScript>>,enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>::`vftable')(void *p, char) = &NiTMapBase<DFALL<NiPointer<LuaScript>>,enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>::`vector deleting destructor'; // weak
int (__thiscall *NiTMap<enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>::`vftable')(void *p, char) = &NiTMap<enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>::`scalar deleting destructor'; // weak
int (__thiscall *LuaScriptMgr::`vftable')(void *p, char) = &LuaScriptMgr::`scalar deleting destructor'; // weak
void *off_973FD8 = &loc_756F52; // weak
int (__thiscall *LuaScriptNewBie::`vftable')(void *p, char) = &LuaScriptNewBie::`scalar deleting destructor'; // weak
int (__thiscall *LuaArgumentNewBie::`vftable')(void *p, char) = &LuaArgumentNewBie::`scalar deleting destructor'; // weak
int (__thiscall *LuaArgumentBIL_QUEST_1::`vftable')(void *p, char) = &LuaArgumentBIL_QUEST_1::`vector deleting destructor'; // weak
int (__thiscall *LuaScriptTutorial::`vftable')(void *p, char) = &LuaScriptTutorial::`scalar deleting destructor'; // weak
int (__thiscall *LuaArgumentTutorial::`vftable')(void *p, char) = &LuaArgumentTutorial::`vector deleting destructor'; // weak
int (__thiscall *LuaArgumentTutorialStep::`vftable')(void *p, char) = &LuaArgumentTutorialStep::`vector deleting destructor'; // weak
void (__thiscall *ItemSlot::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ItemSlot::`vftable'{for `NiNode'})(void *p, char) = &ItemSlot::`scalar deleting destructor'; // weak
void (__thiscall *MinimonAutoItemUseWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MinimonAutoItemUseWin::`vftable'{for `NiNode'})(void *p, char) = &MinimonAutoItemUseWin::`scalar deleting destructor'; // weak
void (__thiscall *MobKillCountWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MobKillCountWin::`vftable'{for `NiNode'})(void *p, char) = &MobKillCountWin::`vector deleting destructor'; // weak
char byte_9750B6 = '\0'; // idb
char byte_9750B7 = '\0'; // idb
char byte_9750BE = '\0'; // idb
_UNKNOWN unk_9750BF; // weak
_UNKNOWN unk_9750D6; // weak
_UNKNOWN unk_9750D7; // weak
_UNKNOWN unk_9750DE; // weak
_UNKNOWN unk_9750DF; // weak
void (__thiscall *SlotWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *SlotWin::`vftable'{for `NiNode'})(void *p, char) = &SlotWin::`scalar deleting destructor'; // weak
void (__thiscall *MoverUpgradeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MoverUpgradeWin::`vftable'{for `NiNode'})(void *p, char) = &MoverUpgradeWin::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerMap<void *,CMsgEater *>::`vftable')(void *p, char) = &NiTPointerMap<void *,CMsgEater *>::`scalar deleting destructor'; // weak
int (__thiscall *CMsgMgr::`vftable')(void *p, char) = &CMsgMgr::`scalar deleting destructor'; // weak
void (__thiscall *Oscillation::`vftable')(Oscillation *__hidden this) = &Oscillation::Clear; // weak
void (__thiscall *OscillationEx::`vftable')(OscillationEx *__hidden this) = &OscillationEx::Clear; // weak
_UNKNOWN unk_975847; // weak
_UNKNOWN unk_97584E; // weak
void (__thiscall *PartyScoreWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *PartyScoreWin::`vftable'{for `NiNode'})(void *p, char) = &PartyScoreWin::`scalar deleting destructor'; // weak
struct NiActorManager *(__thiscall *Pet::`vftable'{for `AttackSequenceManager'})(Char *__hidden this) = &Char::GetActor; // weak
int (__stdcall *Pet::`vftable'{for `IEffectHolder'})(int) = &Pet::`vector deleting destructor'; // weak
void (__thiscall *Pet::`vftable'{for `AbStateInfectee'}[2])(Char *this, AbStateInst *pkAbState, bool bNoVisual) = { &Char::Affect, &Char::Deaffect }; // weak
_UNKNOWN unk_975FA7; // weak
void (__thiscall *PetNameEditWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *PetNameEditWin::`vftable'{for `NiNode'})(void *p, char) = &PetNameEditWin::`vector deleting destructor'; // weak
void (__thiscall *PuzzleTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *PuzzleTimeWin::`vftable'{for `NiNode'})(void *p, char) = &PuzzleTimeWin::`scalar deleting destructor'; // weak
char byte_97655E = '\0'; // idb
char byte_97655F = '\0'; // idb
char byte_976576[2] = { '\0', '\0' }; // idb
void (__thiscall *RandomOptCountRecoverWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *RandomOptCountRecoverWin::`vftable'{for `NiNode'})(void *p, char) = &RandomOptCountRecoverWin::`scalar deleting destructor'; // weak
char byte_976916 = '\0'; // idb
char byte_976917 = '\0'; // idb
_UNKNOWN unk_976932; // weak
char pcFormat = '\0'; // idb
void (__thiscall *ChangeSlotWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ChangeSlotWin::`vftable'{for `NiNode'})(void *p, char) = &ChangeSlotWin::`vector deleting destructor'; // weak
void (__thiscall *RandomOptionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *RandomOptionWin::`vftable'{for `NiNode'})(void *p, char) = &RandomOptionWin::`vector deleting destructor'; // weak
char byte_976FDF = '\0'; // idb
_UNKNOWN unk_976FF6; // weak
_UNKNOWN unk_976FF7; // weak
_UNKNOWN unk_976FFE; // weak
_UNKNOWN unk_976FFF; // weak
_UNKNOWN unk_97700D; // weak
_UNKNOWN unk_97700E; // weak
_UNKNOWN unk_97700F; // weak
_UNKNOWN unk_977016; // weak
_UNKNOWN unk_977017; // weak
_UNKNOWN unk_97701E; // weak
_UNKNOWN unk_97701F; // weak
_UNKNOWN unk_977041; // weak
_UNKNOWN unk_977042; // weak
_UNKNOWN unk_977043; // weak
_UNKNOWN unk_977051; // weak
_UNKNOWN unk_977052; // weak
_UNKNOWN unk_977053; // weak
char off_977204[] = { 'J', 'o', 'b', '\0' }; // idb
void (__thiscall *FaceCutMaskWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *FaceCutMaskWin::`vftable'{for `NiNode'})(void *p, char) = &FaceCutMaskWin::`scalar deleting destructor'; // weak
void (__thiscall *IDRankingWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *IDRankingWin::`vftable'{for `NiNode'})(void *p, char) = &IDRankingWin::`vector deleting destructor'; // weak
int (__stdcall *CCallback<SteamCallback,GetAuthSessionTicketResponse_t,0>::`vftable')(void *pvParam, bool __formal, int, int) = &CCallback<SteamCallback,GameOverlayActivated_t,0>::Run; // weak
int (__stdcall *CCallback<SteamCallback,GameOverlayActivated_t,0>::`vftable')(void *pvParam, bool __formal, int, int) = &CCallback<SteamCallback,GameOverlayActivated_t,0>::Run; // weak
char byte_977BFB = '\0'; // idb
char byte_977C02 = '\0'; // idb
_UNKNOWN unk_977C03; // weak
_UNKNOWN unk_977C12; // weak
void (__thiscall *ItemSlotWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ItemSlotWin::`vftable'{for `NiNode'})(void *p, char) = &ItemSlotWin::`scalar deleting destructor'; // weak
void (__thiscall *TermExtendWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *TermExtendWin::`vftable'{for `NiNode'})(void *p, char) = &TermExtendWin::`vector deleting destructor'; // weak
_UNKNOWN unk_978288; // weak
int (*TextFilter::`vftable')() = &_purecall; // weak
void (__thiscall *TextFilterReplace::`vftable')(TextFilterReplace *this, ProcessingString *pkStr, char *pcFindPos, char *) = &TextFilterReplace::DoJob; // weak
int (__thiscall *NiTListBase<DFALL<TextFilter *>,TextFilter *>::`vftable')(void *p, char) = &NiTListBase<DFALL<TextFilter *>,TextFilter *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<TextFilter *>,TextFilter *>::`vftable')(void *p, char) = &NiTList<TextFilter *>::`scalar deleting destructor'; // weak
_UNKNOWN unk_978392; // weak
int (__stdcall *`TextFilterTable::FilterEmotion'::`2'::TextFilterEmotion::`vftable')(ProcessingString *pkStr, char *pcFindPos, char *pcKey) = &TextFilterTable::FilterEmotion_::_2_::TextFilterEmotion::DoJob; // weak
int (__cdecl *ITableBase<SlanderFilter,SlanderFilterTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<BadNameFilter,BadNameFilterTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<EmotionFilter,EmotionFilterTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__thiscall *NiTList<TextFilter *>::`vftable')(void *p, char) = &NiTList<TextFilter *>::`scalar deleting destructor'; // weak
int (__cdecl *SlanderFilterTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *EmotionFilterTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *BadNameFilterTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__thiscall *Singleton<TextScreenEffect>::`vftable')(void *p, char) = &Singleton<TextScreenEffect>::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,int>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,int>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,int>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,int>::`vector deleting destructor'; // weak
int (__thiscall *PgTList<int>::`vftable')(void *p, char) = &PgTList<int>::`vector deleting destructor'; // weak
void (__thiscall *TextScreenWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *TextScreenWin::`vftable'{for `NiNode'})(void *p, char) = &TextScreenWin::`vector deleting destructor'; // weak
int (__thiscall *TextScreenEffect::`vftable')(void *p, char) = &TextScreenEffect::`scalar deleting destructor'; // weak
int (__thiscall *Singleton<Tutorial>::`vftable')(void *p, char) = &Singleton<Tutorial>::`vector deleting destructor'; // weak
int (__thiscall *NiTMapBase<DFALL<NiPointer<PgWin>>,int,NiPointer<PgWin>>::`vftable')(void *p, char) = &NiTMapBase<DFALL<NiPointer<PgWin>>,int,NiPointer<PgWin>>::`vector deleting destructor'; // weak
int (__thiscall *NiTMapBase<DFALL<PgWin *>,enum  Tutorial::eBlinkEffectType,PgWin *>::`vftable')(void *p, char) = &NiTMapBase<DFALL<PgWin *>,enum  Tutorial::eBlinkEffectType,PgWin *>::`vector deleting destructor'; // weak
int (__thiscall *NiTMap<int,NiPointer<PgWin>>::`vftable')(void *p, char) = &NiTMap<int,NiPointer<PgWin>>::`vector deleting destructor'; // weak
int (__thiscall *NiTMap<enum  Tutorial::eBlinkEffectType,PgWin *>::`vftable')(void *p, char) = &NiTMap<enum  Tutorial::eBlinkEffectType,PgWin *>::`scalar deleting destructor'; // weak
int (__thiscall *Tutorial::`vftable')(void *p, char) = &Tutorial::`vector deleting destructor'; // weak
void (__thiscall *UIBlinkEffect::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *UIBlinkEffect::`vftable'{for `NiNode'})(void *p, char) = &UIBlinkEffect::`vector deleting destructor'; // weak
char Right[] = { 'N', 'o', 'r', '\0' }; // idb
char off_9789CC[] = { 'N', 'o', 'r', '\0' }; // idb
int (__thiscall *UIUtil::`vftable')(void *p, char) = &UIUtil::`vector deleting destructor'; // weak
int (__stdcall *ZlibUtil::`vftable'[2])(int) =
{
  &NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue,
  &NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue
}; // weak
int (__thiscall *zlibUtil2::`vftable')(void *p, char) = &zlibUtil2::`vector deleting destructor'; // weak
void (__thiscall *AutoSizingTextWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *AutoSizingTextWin::`vftable'{for `NiNode'})(void *p, char) = &AutoSizingTextWin::`scalar deleting destructor'; // weak
void (__thiscall *ClientWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ClientWin::`vftable'{for `NiNode'})(void *p, char) = &ClientWin::`vector deleting destructor'; // weak
void (__thiscall *EditWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *EditWin::`vftable'{for `NiNode'})(void *p, char) = &EditWin::`scalar deleting destructor'; // weak
void (__thiscall *EditWinEx::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *EditWinEx::`vftable'{for `NiNode'})(void *p, char) = &EditWinEx::`scalar deleting destructor'; // weak
void (__thiscall *FlexMsgBox::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *FlexMsgBox::`vftable'{for `NiNode'})(void *p, char) = &FlexMsgBox::`scalar deleting destructor'; // weak
void (__thiscall *FrameBoxWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *FrameBoxWin::`vftable'{for `NiNode'})(void *p, char) = &FrameBoxWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_9797F2; // weak
void (__thiscall *ImeCandListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ImeCandListWin::`vftable'{for `NiNode'})(void *p, char) = &ImeCandListWin::`scalar deleting destructor'; // weak
void (__thiscall *ImeEditWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ImeEditWin::`vftable'{for `NiNode'})(void *p, char) = &ImeEditWin::`vector deleting destructor'; // weak
void (__thiscall *ImeEditWinEx::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ImeEditWinEx::`vftable'{for `NiNode'})(void *p, char) = &ImeEditWinEx::`vector deleting destructor'; // weak
_UNKNOWN unk_979EAF; // weak
void (__thiscall *InputBox::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *InputBox::`vftable'{for `NiNode'})(void *p, char) = &InputBox::`vector deleting destructor'; // weak
_UNKNOWN unk_97A176; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<DFALL<PgWinBut *>,PgWinBut *>::`vftable')(void *p, char) = &NiTListBase<DFALL<PgWinBut *>,PgWinBut *>::`scalar deleting destructor'; // weak
int (__thiscall *ListItem::`vftable')(void *p, char) = &ListItem::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<PgWinBut *>,PgWinBut *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<PgWinBut *>,PgWinBut *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::`vector deleting destructor'; // weak
int (__thiscall *PgTList<NiPointer<ListItem>>::`vftable')(void *p, char) = &PgTList<NiPointer<ListItem>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTList<PgWinBut *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<PgWinBut *>,PgWinBut *>::`scalar deleting destructor'; // weak
int (__thiscall *PgTList<NiPointer<PgWinText>>::`vftable')(void *p, char) = &PgTList<NiPointer<PgWinText>>::`scalar deleting destructor'; // weak
void (__thiscall *ListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ListWin::`vftable'{for `NiNode'})(void *p, char) = &ListWin::`vector deleting destructor'; // weak
int (__thiscall *NiBinaryExtraData::`vftable')(void *p, char) = &NiBinaryExtraData::`vector deleting destructor'; // weak
void (__thiscall *MaskedWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MaskedWin::`vftable'{for `NiNode'})(void *p, char) = &MaskedWin::`vector deleting destructor'; // weak
int (__thiscall *MaskShader::`vftable')(void *p, char) = &MaskShader_NoAlphaBlend::`scalar deleting destructor'; // weak
int (__thiscall *MaskShader_NoAlphaBlend::`vftable')(void *p, char) = &MaskShader_NoAlphaBlend::`scalar deleting destructor'; // weak
_UNKNOWN unk_97A7C6; // weak
void (__thiscall *MsgBox::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MsgBox::`vftable'{for `NiNode'})(void *p, char) = &MsgBox::`scalar deleting destructor'; // weak
void (__thiscall *PgWinProxy::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *PgWinProxy::`vftable'{for `NiNode'})(void *p, char) = &PgWinProxy::`scalar deleting destructor'; // weak
_UNKNOWN unk_97AE38; // weak
char off_97AE3C[] = { 'N', 'o', 'r', '\0' }; // idb
char off_97AE50[] = { 'N', 'o', 'r', '\0' }; // idb
void (__thiscall *SlideBar::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *SlideBar::`vftable'{for `NiNode'})(void *p, char) = &SlideBar::`scalar deleting destructor'; // weak
int (__thiscall *boost::detail::sp_counted_base::`vftable')(void *p, char) = &boost::detail::sp_counted_base_impl<SlideListWin::ListItem *,boost::checked_deleter<SlideListWin::ListItem>>::`vector deleting destructor'; // weak
int (__thiscall *boost::detail::sp_counted_base_impl<SlideListWin::ListItem *,boost::checked_deleter<SlideListWin::ListItem>>::`vftable')(void *p, char) = &boost::detail::sp_counted_base_impl<SlideListWin::ListItem *,boost::checked_deleter<SlideListWin::ListItem>>::`vector deleting destructor'; // weak
int (__thiscall *boost::detail::sp_counted_base_impl<SLWCreateInfo::Item *,boost::checked_deleter<SLWCreateInfo::Item>>::`vftable')(void *p, char) = &boost::detail::sp_counted_base_impl<SlideListWin::ListItem *,boost::checked_deleter<SlideListWin::ListItem>>::`vector deleting destructor'; // weak
void (__thiscall *ColumnBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ColumnBut::`vftable'{for `NiNode'})(void *p, char) = &ColumnBut::`scalar deleting destructor'; // weak
void (__thiscall *SlideListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *SlideListWin::`vftable'{for `NiNode'})(void *p, char) = &SlideListWin::`vector deleting destructor'; // weak
void (__thiscall *SpeechBubbleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *SpeechBubbleWin::`vftable'{for `NiNode'})(void *p, char) = &SpeechBubbleWin::`vector deleting destructor'; // weak
char szVerb[] = { 'G', 'E', 'T', '\0' }; // idb
const wchar_t sz = 83u; // idb
int (__stdcall *CWebContainer::`vftable'{for `IDispatch'})(int, int, int) = &CWebContainer::QueryInterface; // weak
int (__stdcall *CWebContainer::`vftable'{for `IOleControlSite'})(int, int, int) = &CWebContainer::QueryInterface; // weak
int (__stdcall *CWebContainer::`vftable'{for `IOleInPlaceFrame'})(int, int, int) = &CWebContainer::QueryInterface; // weak
int (__stdcall *CWebContainer::`vftable'{for `IOleInPlaceSite'})(int, int, int) = &CWebContainer::QueryInterface; // weak
__int32 (__stdcall *CWebContainer::`vftable'{for `IOleClientSite'})(CWebContainer *this, _GUID *riid, void **ppv) = &CWebContainer::QueryInterface; // weak
__int32 (__stdcall *CWebEventSink::`vftable')(CWebEventSink *this, _GUID *riid, void **ppv) = &CWebEventSink::QueryInterface; // weak
int (__thiscall *NiZBufferProperty::`vftable')(void *p, char) = &NiFogProperty::`scalar deleting destructor'; // weak
int (__thiscall *Singleton<CursorState>::`vftable')(void *p, char) = &Singleton<CursorState>::`scalar deleting destructor'; // weak
char off_97BF50[] = { 'U', 'S', 'A', '\0' }; // idb
int (__cdecl *ITableBase<TextDataType,TextData>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<TextDataType2,TextData2>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<TextDataType3,TextData3>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
void (__thiscall *TextData::`vftable')(TextData *__hidden this) = &TextData::BeforeTerminate; // weak
void (__thiscall *TextData2::`vftable')(TextData2 *__hidden this) = &TextData2::BeforeTerminate; // weak
void (__thiscall *TextData3::`vftable')(TextData3 *__hidden this) = &TextData3::BeforeTerminate; // weak
int (__thiscall *MainApp::`vftable')(void *p, char) = &MainApp::`scalar deleting destructor'; // weak
int (__cdecl *ITableBase<RaceName,CharRace>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MapInfo,MapInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *IIDTableBase<MapInfo,MapInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MapViewInfo,MapViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *IIDTableBase<MapViewInfo,MapViewInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<UpGradeInfo,UpGradeInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *IIDTableBase<UpGradeInfo,UpGradeInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<FaceInfo,FaceInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<DmgSndMapByArmorType,DmgSndTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ActionViewInfo,ActionViewTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *IIDTableBase<ActionViewInfo,ActionViewTable,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ProduceInfo,ProduceInfoTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<GatherInfo,GatherInfoTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ProduceViewInfo,ProduceViewInfoTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<NpcDialogData,NpcDialogDataTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<GradeItemOption,GradeItemOptionTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MiniHouse,MiniHouseTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ItemShopView,ItemShopViewTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<RIDING,RidePetTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *IIDTableBase<RIDING,RidePetTable,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<WeaponAttrib,WeaponAttribTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ItemDismantle,ItemDismantleTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<TownPortal,TownPortalInfoTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<SetItemName,SetItemNameTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<SetEffect,SetEffectTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ActionEffectItem,ActionEffectItemTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ItemAction,ItemActionTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ItemActionEffect,ItemActionEffectTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ItemActionCondition,ItemActionConditionTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<DICE_Dividind,DiceDividIndTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<GBHouse,GBHouseTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MobCoordinate,MobCoordinateTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *IIDTableBase<MobCoordinate,MobCoordinateTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *IIDTableBase<MobKillAnnounceText,MobKillAnnounceTextTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<GTIView,GTIViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<DamageEffect,DamageEffectTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MapWayPoint,MapWayPointTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MapLinkPoint,MapLinkPointTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<BelongTypeInfo,BelongTypeInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ChargedIconItem,ChargedIconItemTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *IIDTableBase<ChargedIconItem,ChargedIconItemTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ChargedMessageItem,ChargedMsgItemTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *IIDTableBase<ChargedMessageItem,ChargedMsgItemTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<BasicInfoTitle,BasicInfoTitleTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<BasicInfoLink,BasicInfoLinkTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<BasicInfoTip,BasicInfoTipTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<BasicInfoFind,BasicInfoFindTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<BasicInfoFindUI,BasicInfoFindUITab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<CollectCard,CollectCardTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<CollectCardView,CollectCardViewTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<CollectCardReward,CollectCardRewardTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<CollectCardTitle,CollectCardTitleTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<AttendReward,AttendRewardTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *IIDTableBase<AttendReward,AttendRewardTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MoverMain,MoverMainTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MoverUseSkill,MoverUseSkillTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MoverHG,MoverHGTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MoverView,MoverViewTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MoverSlotView,MoverSlotViewTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MoverAbility,MoverAbilityTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MoverItem,MoverItemTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<PupMain,PetMainTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<PupView,PetViewTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<KQVoteDesc,KQVoteDescTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<KQIsVote,KQIsVoteTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<KQTeam,KQTeamTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MobConditionView,MobConditionViewTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MobNoFadeIn,MobNoFadeInTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MarketSearchInfo,MarketSearchInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ChrCreateEquip,ChrCreateEquipTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ChatColor,ChatColorTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<TermExtendMatch,TermExtendMatchTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MinimonInfo,MinimonInfoTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ItemViewDummy,ItemViewDummyTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<UseClassTypeInfo,UseCalssTypeTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ChrBasicEquip,ChrBasicEquipTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *IIDTableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ColorInfoType,ColorInfoTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ItemInfo,ItemInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ItemViewInfo,ItemViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *IIDTableBase<ItemViewInfo,ItemViewInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ItemMoney,ItemMoneyTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ClassName,CharClass>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ActionEffectInfo,ActionEffectInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<HairInfo,HairInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<HairColorInfo,HairColorInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MobInfo,MobInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *IIDTableBase<MobInfo,MobInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MobViewInfo,MobViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *IIDTableBase<MobViewInfo,MobViewInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<MHEmotion,MiniHouseEmotionTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<UpEffectData,UpEffectTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *IIDTableBase<AbnormalStateInfo,AbnormalStateInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *IIDTableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<SubAbStateInfo,SubAbStateInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *IIDTableBase<SubAbStateInfo,SubAbStateInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ScriptMsg,ScriptMsgTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<FaceCutMsg,FaceCutMsgTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ChargedItemEffect,ChargedEffectTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ColorInfoTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ItemViewEquipTypeInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ItemMoneyTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *CharClass::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ActionEffectInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *HairInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *HairColorInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *NPCViewInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ShakeEffectViewInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MHFurnitureObjEffectTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MiniHouseObjAniInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MiniHouseEndureInfoTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MiniHouseFuritureInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MiniHouseEmotionTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *UpEffectTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ScriptMsgTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ChargedEffectTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *CharRace::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *FaceInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *DmgSndTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ProduceInfoTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *GatherInfoTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *KQDescTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ProduceViewInfoTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *NpcDialogDataTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *GradeItemOptionTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MiniHouseTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ItemShopViewTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *WeaponAttribTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *WorldMapAvatarInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ItemDismantleTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *TownPortalInfoTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *SetItemNameTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ItemActionEffectDescTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *SetEffectTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ActionEffectItemTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ItemActionTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ItemActionEffectTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ItemActionConditionTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *GuildTournamentStateDescTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *GuildTournamentStateTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *GTRequireTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *DiceDividIndTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *GBDiceDividIndTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *GBHouseTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MobRandomIdleAniTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *CharacterTitleStateViewTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *GTIViewInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *DamageEffectTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ActiveSkillGroupTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MapWayPointTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MapLinkPointTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *BelongTypeInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ChargedDeletableBuffTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *BasicInfoTitleTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *BasicInfoLinkTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *BasicInfoTipTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *BasicInfoTipCycleTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *BasicInfoFindTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *BasicInfoFindUITab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *BasicInfoFindWordTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *CollectCardTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *CollectCardViewTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *CollectCardGroupDescTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *CollectCardRewardTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *CollectCardTitleTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MoverMainTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MoverUseSkillTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MoverHGTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MoverViewTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MoverSlotViewTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MoverSlotCharAniTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MoverAbilityTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MoverItemTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *PetMainTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *PetViewTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *KQVoteDescTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *KQVoteMajorityRateTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *KQIsVoteTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *KQTeamTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MobConditionViewTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MobNoFadeInTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MarketSearchInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ChrCreateEquipTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MoverUpgradeEffectTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ChatColorTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *TermExtendMatchTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *TermExtendMatchGroupDescTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MinimonInfoTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MinimonAutoUseItemTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ItemViewDummyTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *UseCalssTypeTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ChrBasicEquipTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *FaceCutMsgTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ItemInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ItemViewInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MobInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MobViewInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *AbnormalStateInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *AbnormalStateViewInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *SubAbStateInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MapInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MapViewInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *UpGradeInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ActionViewTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *RidePetTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MobCoordinateTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *MobKillAnnounceTextTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ChargedIconItemTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ChargedMsgItemTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *AttendRewardTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *BRAccUpgradeInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__thiscall *NiActionData::`vftable')(void *p, char) = &NiActionData::`vector deleting destructor'; // weak
void *off_97EFF8 = &loc_746163; // weak
int (__thiscall *std::runtime_error::`vftable')(void *p, char) = &std::system_error::`vector deleting destructor'; // weak
int (__thiscall *std::locale::facet::`vftable')(void *p, char) = &std::codecvt<char,char,int>::`vector deleting destructor'; // weak
int (__thiscall *std::ios_base::`vftable')(void *p, char) = &std::basic_ios<char,std::char_traits<char>>::`scalar deleting destructor'; // weak
int (__stdcall *std::basic_istream<char,std::char_traits<char>>::`vftable')(char) = &std::basic_istream<char,std::char_traits<char>>::`vector deleting destructor'; // weak
int (__thiscall *std::basic_ios<char,std::char_traits<char>>::`vftable')(void *p, char) = &std::basic_ios<char,std::char_traits<char>>::`scalar deleting destructor'; // weak
int (__thiscall *std::codecvt<char,char,int>::`vftable')(void *p, char) = &std::codecvt<char,char,int>::`vector deleting destructor'; // weak
int (__thiscall *std::ctype<char>::`vftable')(void *p, char) = &std::ctype<char>::`vector deleting destructor'; // weak
int (__thiscall *std::system_error::`vftable')(void *p, char) = &std::system_error::`vector deleting destructor'; // weak
int (__thiscall *std::ios_base::failure::`vftable')(void *p, char) = &std::system_error::`vector deleting destructor'; // weak
int (__thiscall *std::basic_streambuf<char,std::char_traits<char>>::`vftable')(void *p, char) = &std::basic_streambuf<char,std::char_traits<char>>::`vector deleting destructor'; // weak
int (__thiscall *std::basic_filebuf<char,std::char_traits<char>>::`vftable')(void *p, char) = &std::basic_filebuf<char,std::char_traits<char>>::`scalar deleting destructor'; // weak
int (__stdcall *std::basic_ifstream<char,std::char_traits<char>>::`vftable')(char) = &std::basic_ifstream<char,std::char_traits<char>>::`vector deleting destructor'; // weak
_UNKNOWN std::basic_ifstream<char,std::char_traits<char>>::`vbtable'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerList<PgWin *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`vector deleting destructor'; // weak
int (__thiscall *PgTList<PgWin *>::`vftable')(void *p, char) = &PgTList<PgWin *>::`vector deleting destructor'; // weak
void (__thiscall *AccountFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
void (__thiscall *LoginWorldNetFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
void (__thiscall *SignUpWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *SignUpWin::`vftable'{for `NiNode'})(void *p, char) = &SignUpWin::`scalar deleting destructor'; // weak
void (__thiscall *SpawnAppsWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *SpawnAppsWin::`vftable'{for `NiNode'})(void *p, char) = &SpawnAppsWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_97F915; // weak
void (__thiscall *AccountWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *AccountWin::`vftable'{for `NiNode'})(void *p, char) = &AccountWin::`scalar deleting destructor'; // weak
char off_97FD54[] = { 'w', '+', 'b', '\0' }; // idb
char off_97FE4C[] = { 'C', 'l', 's', '\0' }; // idb
void (__thiscall *WorldSelectExitWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *WorldSelectExitWin::`vftable'{for `NiNode'})(void *p, char) = &WorldSelectExitWin::`scalar deleting destructor'; // weak
void (__thiscall *WorldSelectOptionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *WorldSelectOptionWin::`vftable'{for `NiNode'})(void *p, char) = &WorldSelectOptionWin::`vector deleting destructor'; // weak
void (__thiscall *WorldSelectOptionSetWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *WorldSelectOptionSetWin::`vftable'{for `NiNode'})(void *p, char) = &WorldSelectOptionSetWin::`scalar deleting destructor'; // weak
void (__thiscall *WorldSelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *WorldSelectWin::`vftable'{for `NiNode'})(void *p, char) = &WorldSelectWin::`vector deleting destructor'; // weak
void (__thiscall *ZoneLoginNetFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
_UNKNOWN unk_980877; // weak
_UNKNOWN unk_980886; // weak
_UNKNOWN unk_980887; // weak
_UNKNOWN unk_98089A; // weak
_UNKNOWN unk_98089B; // weak
_UNKNOWN unk_9808A1; // weak
_UNKNOWN unk_9808A3; // weak
_UNKNOWN unk_9808AA; // weak
char off_9808AC[] = { 'J', 'o', 'b', '\0' }; // idb
void (__thiscall *CharSelectInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CharSelectInfoWin::`vftable'{for `NiNode'})(void *p, char) = &CharSelectInfoWin::`scalar deleting destructor'; // weak
void (__thiscall *CharSelectMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CharSelectMenuWin::`vftable'{for `NiNode'})(void *p, char) = &CharSelectMenuWin::`scalar deleting destructor'; // weak
void (__thiscall *EventFriendCountWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *EventFriendCountWin::`vftable'{for `NiNode'})(void *p, char) = &EventFriendCountWin::`scalar deleting destructor'; // weak
char byte_9810FE = '\0'; // idb
_UNKNOWN unk_9810FF; // weak
_UNKNOWN unk_98110A; // weak
char off_981550[] = { 't', 'o', 'n', '\0' }; // idb
_UNKNOWN unk_9816C8; // weak
char source = '\0'; // idb
char byte_9816CB = '\0'; // idb
char byte_9816CE[2] = { '\0', '\0' }; // idb
int (__thiscall *NiTListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::`vftable')(void *p, char) = &NiTListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::`scalar deleting destructor'; // weak
void (__thiscall *GatheringTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GatheringTask::`vftable'{for `NiRefObject'})(void *p, char) = &ProductTask::`scalar deleting destructor'; // weak
void (__thiscall *ProductTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ProductTask::`vftable'{for `NiRefObject'})(void *p, char) = &ProductTask::`scalar deleting destructor'; // weak
_UNKNOWN unk_981A32; // weak
char pcPassWord = '\0'; // idb
_UNKNOWN unk_981A47; // weak
int (__thiscall *NiIntegerExtraData::`vftable')(void *p, char) = &NiIntegerExtraData::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<DFALL<PgWin *>,PgWin *>::`vftable')(void *p, char) = &NiTListBase<DFALL<PgWin *>,PgWin *>::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *>::`vftable')(void *p, char) = &NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,unsigned int>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,unsigned int>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<PgWin *>,PgWin *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<PgWin *>,PgWin *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<ScriptBtn *>,ScriptBtn *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<ScriptBtn *>,ScriptBtn *>::`vector deleting destructor'; // weak
int (__thiscall *PgTList<unsigned int>::`vftable')(void *p, char) = &PgTList<unsigned int>::`vector deleting destructor'; // weak
int (__thiscall *NiTList<PgWin *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<PgWin *>,PgWin *>::`vector deleting destructor'; // weak
int (__thiscall *NiTList<ScriptBtn *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<ScriptBtn *>,ScriptBtn *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerList<unsigned int>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,unsigned int>::`vector deleting destructor'; // weak
void (__thiscall *ISingletonTask<GuildJoinReqTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ISingletonTask<GuildJoinReqTask>::`vftable'{for `NiRefObject'})(void *p, char) = &GuildJoinReqTask::`vector deleting destructor'; // weak
void (__thiscall *GuildJoinReqTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildJoinReqTask::`vftable'{for `NiRefObject'})(void *p, char) = &GuildJoinReqTask::`vector deleting destructor'; // weak
char cName = '\0'; // idb
char byte_981D96[2] = { '\0', '\0' }; // idb
char byte_981D9F = '\0'; // idb
char byte_981E1B = '\0'; // idb
char byte_981E2A = '\0'; // idb
_UNKNOWN unk_981E2B; // weak
_UNKNOWN unk_981E61; // weak
void (__thiscall *ISingletonTask<ItemUseTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ISingletonTask<ItemUseTask>::`vftable'{for `NiRefObject'})(void *p, char) = &ISingletonTask<ItemUseTask>::`vector deleting destructor'; // weak
void (__thiscall *ItemUseTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ItemUseTask::`vftable'{for `NiRefObject'})(void *p, char) = &ISingletonTask<ItemUseTask>::`vector deleting destructor'; // weak
int (__thiscall *EffectObjectMgr::`vftable')(void *p, char) = &EffectObjectMgr::`scalar deleting destructor'; // weak
int (__thiscall *AreaInfoMgr::`vftable')(void *p, char) = &AreaInfoMgr::`vector deleting destructor'; // weak
char byte_9825F2 = '\0'; // idb
char byte_9825F3 = '\0'; // idb
char byte_9825F4[4] = { '\0', '\0', '\0', '\0' }; // idb
int (__thiscall *NiTListBase<DFALL<IOptionBase *>,IOptionBase *>::`vftable')(void *p, char) = &NiTListBase<DFALL<IOptionBase *>,IOptionBase *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<IOptionBase *>,IOptionBase *>::`vftable')(void *p, char) = &NiTList<IOptionBase *>::`scalar deleting destructor'; // weak
void (__thiscall *GameFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
void (__thiscall *PremiumActionIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *PremiumActionIcon::`vftable'{for `NiNode'})(void *p, char) = &PremiumActionIcon::`vector deleting destructor'; // weak
void (__thiscall *ActionInvTabButWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ActionInvTabButWin::`vftable'{for `NiNode'})(void *p, char) = &ActionInvTabButWin::`scalar deleting destructor'; // weak
void (__thiscall *ActionIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ActionIconWin::`vftable'{for `NiNode'})(void *p, char) = &ActionIconWin::`scalar deleting destructor'; // weak
void (__thiscall *ActionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ActionWin::`vftable'{for `NiNode'})(void *p, char) = &ActionWin::`scalar deleting destructor'; // weak
void (__thiscall *PremiumActionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *PremiumActionWin::`vftable'{for `NiNode'})(void *p, char) = &PremiumActionWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_983626; // weak
int (__thiscall *PgFadeTextGeometry::`vftable')(void *p, char) = &PgFadeTextGeometry::`scalar deleting destructor'; // weak
void (__thiscall *AnnounceWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *AnnounceWin::`vftable'{for `NiNode'})(void *p, char) = &AnnounceWin::`vector deleting destructor'; // weak
char off_983ABC[] = { 'D', 'a', 'y', '\0' }; // idb
char off_983BAC[] = { 'D', 'a', 'y', '\0' }; // idb
int (__thiscall *AttendCheckBut::`vftable')(void *p, char) = &AttendCheckBut::`vector deleting destructor'; // weak
void (__thiscall *AttendCheckWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *AttendCheckWin::`vftable'{for `NiNode'})(void *p, char) = &AttendCheckWin::`scalar deleting destructor'; // weak
void (__thiscall *AttendIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *AttendIconWin::`vftable'{for `NiNode'})(void *p, char) = &AttendIconWin::`scalar deleting destructor'; // weak
void (__thiscall *AttendRewardWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *AttendRewardWin::`vftable'{for `NiNode'})(void *p, char) = &AttendRewardWin::`vector deleting destructor'; // weak
_UNKNOWN unk_984530; // weak
void (__thiscall *BasicInfoTipWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *BasicInfoTipWin::`vftable'{for `NiNode'})(void *p, char) = &BasicInfoTipWin::`scalar deleting destructor'; // weak
void (__thiscall *StatusBuffWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *StatusBuffWin::`vftable'{for `NiNode'})(void *p, char) = &StatusBuffWin::`vector deleting destructor'; // weak
_UNKNOWN unk_984ACE; // weak
_UNKNOWN unk_984ACF; // weak
_UNKNOWN unk_984ADE; // weak
_UNKNOWN unk_984ADF; // weak
_UNKNOWN unk_984AF6; // weak
void (__thiscall *CalculatorWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CalculatorWin::`vftable'{for `NiNode'})(void *p, char) = &CalculatorWin::`vector deleting destructor'; // weak
void (__thiscall *CastingProgressWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CastingProgressWin::`vftable'{for `NiNode'})(void *p, char) = &CastingProgressWin::`scalar deleting destructor'; // weak
char byte_9850D9 = '\0'; // idb
_UNKNOWN unk_9850DA; // weak
_UNKNOWN unk_9850DB; // weak
_UNKNOWN unk_9850E2; // weak
_UNKNOWN unk_9850E3; // weak
_UNKNOWN unk_9850E9; // weak
_UNKNOWN unk_9850EA; // weak
char byte_9850EB = '\0'; // idb
char byte_985117 = '\0'; // idb
char byte_985129[3] = { '\0', '\0', '\0' }; // idb
void (__thiscall *ChargedItemListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ChargedItemListWin::`vftable'{for `NiNode'})(void *p, char) = &ChargedItemListWin::`vector deleting destructor'; // weak
char byte_98548F = '\0'; // idb
char off_9856E0[] = { 's', 'I', 'D', '\0' }; // idb
char off_9856F0[] = { 'J', 'o', 'b', '\0' }; // idb
char off_985990[] = { '%', '2', 'd', '\0' }; // idb
_UNKNOWN unk_985998; // weak
void (__thiscall *StatPointReqTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *StatPointReqTask::`vftable'{for `NiRefObject'})(void *p, char) = &ProductTask::`scalar deleting destructor'; // weak
void (__thiscall *CharInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CharInfoWin::`vftable'{for `NiNode'})(void *p, char) = &CharInfoWin::`vector deleting destructor'; // weak
_UNKNOWN unk_985C97; // weak
_UNKNOWN unk_985CAD; // weak
_UNKNOWN unk_985CAE; // weak
_UNKNOWN unk_985CAF; // weak
_UNKNOWN unk_985CB6; // weak
_UNKNOWN unk_985CB7; // weak
void (__thiscall *CharTitleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CharTitleWin::`vftable'{for `NiNode'})(void *p, char) = &CharTitleWin::`scalar deleting destructor'; // weak
void (__thiscall *ChatBlockListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ChatBlockListWin::`vftable'{for `NiNode'})(void *p, char) = &ChatBlockListWin::`scalar deleting destructor'; // weak
void (__thiscall *ChatEditWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ChatEditWin::`vftable'{for `NiNode'})(void *p, char) = &ChatEditWin::`scalar deleting destructor'; // weak
void (__thiscall *ClockShadowWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ClockShadowWin::`vftable'{for `NiNode'})(void *p, char) = &ClockShadowWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_9869FB; // weak
_UNKNOWN unk_986A02; // weak
_UNKNOWN unk_986A03; // weak
_UNKNOWN unk_986A13; // weak
void *off_986A1E = (void *)0x410000; // weak
void (__thiscall *CollectCardWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CollectCardWin::`vftable'{for `NiNode'})(void *p, char) = &CollectCardWin::`vector deleting destructor'; // weak
_UNKNOWN unk_986D77; // weak
void (__thiscall *CollectRwItemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CollectRwItemWin::`vftable'{for `NiNode'})(void *p, char) = &CollectRwItemWin::`vector deleting destructor'; // weak
void (__thiscall *CollectRwChoiceInv::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CollectRwChoiceInv::`vftable'{for `NiNode'})(void *p, char) = &CollectRwChoiceInv::`scalar deleting destructor'; // weak
void (__thiscall *CollectPopupWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CollectPopupWin::`vftable'{for `NiNode'})(void *p, char) = &CollectPopupWin::`scalar deleting destructor'; // weak
void (__thiscall *CardSlotWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CardSlotWin::`vftable'{for `NiNode'})(void *p, char) = &CardSlotWin::`vector deleting destructor'; // weak
void (__thiscall *CollectPageWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CollectPageWin::`vftable'{for `NiNode'})(void *p, char) = &CollectPageWin::`scalar deleting destructor'; // weak
void (__thiscall *CollectRwChoiceWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CollectRwChoiceWin::`vftable'{for `NiNode'})(void *p, char) = &CollectRwChoiceWin::`vector deleting destructor'; // weak
void (__thiscall *CollectCardChoiceWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CollectCardChoiceWin::`vftable'{for `NiNode'})(void *p, char) = &CollectCardChoiceWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_98805F; // weak
_UNKNOWN unk_98806E; // weak
_UNKNOWN unk_98806F; // weak
char byte_988076 = '\0'; // idb
_UNKNOWN unk_988077; // weak
_UNKNOWN unk_98807E; // weak
char off_988094[] = { 'A', 'l', 'l', '\0' }; // idb
void (__thiscall *CollectMainWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CollectMainWin::`vftable'{for `NiNode'})(void *p, char) = &CollectMainWin::`vector deleting destructor'; // weak
void (__thiscall *CollectCardListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CollectCardListWin::`vftable'{for `NiNode'})(void *p, char) = &CollectCardListWin::`vector deleting destructor'; // weak
void (__thiscall *CollectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CollectWin::`vftable'{for `NiNode'})(void *p, char) = &CollectWin::`vector deleting destructor'; // weak
void (__thiscall *DesktopWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *DesktopWin::`vftable'{for `NiNode'})(void *p, char) = &DesktopWin::`scalar deleting destructor'; // weak
void (__thiscall *ItemDropTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ItemDropTask::`vftable'{for `NiRefObject'})(void *p, char) = &ProductTask::`scalar deleting destructor'; // weak
void (__thiscall *DivideWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *DivideWin::`vftable'{for `NiNode'})(void *p, char) = &DivideWin::`scalar deleting destructor'; // weak
char byte_988F09 = '\0'; // idb
char byte_988F0A = '\0'; // idb
_UNKNOWN unk_988F0B; // weak
char byte_988F16 = '\0'; // idb
_UNKNOWN unk_988F17; // weak
_UNKNOWN unk_988F22; // weak
char byte_988F23 = '\0'; // idb
_UNKNOWN unk_988F32; // weak
void (__thiscall *EnchantGemToolTipWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *EnchantGemToolTipWin::`vftable'{for `NiNode'})(void *p, char) = &EnchantGemToolTipWin::`vector deleting destructor'; // weak
void (__thiscall *EnchantGemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *EnchantGemWin::`vftable'{for `NiNode'})(void *p, char) = &EnchantGemWin::`vector deleting destructor'; // weak
void (__thiscall *EnchantGemDeleteWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *EnchantGemDeleteWin::`vftable'{for `NiNode'})(void *p, char) = &EnchantGemWin::`vector deleting destructor'; // weak
void (__thiscall *EventFriendWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *EventFriendWin::`vftable'{for `NiNode'})(void *p, char) = &EventFriendWin::`vector deleting destructor'; // weak
_UNKNOWN unk_989C15; // weak
void (__thiscall *FeedMoverWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *FeedMoverWin::`vftable'{for `NiNode'})(void *p, char) = &FeedMoverWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_989FA9; // weak
_UNKNOWN unk_989FAA; // weak
_UNKNOWN unk_989FAB; // weak
_UNKNOWN unk_989FB7; // weak
_UNKNOWN unk_989FC2; // weak
_UNKNOWN unk_989FC3; // weak
char off_989FC4[] = { '+', '%', 'd', '\0' }; // idb
_UNKNOWN unk_989FCB; // weak
_UNKNOWN unk_989FDB; // weak
_UNKNOWN unk_98A02E; // weak
_UNKNOWN unk_98A02F; // weak
_UNKNOWN unk_98A030; // weak
void (__thiscall *FreeStatView::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *FreeStatView::`vftable'{for `NiNode'})(void *p, char) = &FreeStatView::`scalar deleting destructor'; // weak
void (__thiscall *FriendCallWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *FriendCallWin::`vftable'{for `NiNode'})(void *p, char) = &FriendCallWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_98A683; // weak
char byte_98A699 = '\0'; // idb
_UNKNOWN unk_98A69A; // weak
_UNKNOWN unk_98A69B; // weak
_UNKNOWN unk_98A6A2; // weak
void (__thiscall *FriendAddWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *FriendAddWin::`vftable'{for `NiNode'})(void *p, char) = &FriendAddWin::`vector deleting destructor'; // weak
void (__thiscall *FriendPointTipMsg::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *FriendPointTipMsg::`vftable'{for `NiNode'})(void *p, char) = &FriendPointTipMsg::`scalar deleting destructor'; // weak
void (__thiscall *FriendWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *FriendWin::`vftable'{for `NiNode'})(void *p, char) = &FriendWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_98B689; // weak
char byte_98B68A = '\0'; // idb
char byte_98B68B = '\0'; // idb
char byte_98B69A = '\0'; // idb
char byte_98B69B = '\0'; // idb
char byte_98B6B1 = '\0'; // idb
char byte_98B6B2[2] = { '\0', '\0' }; // idb
void (__thiscall *InvisibleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *InvisibleWin::`vftable'{for `NiNode'})(void *p, char) = &PgWinProxy::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,float>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,float>::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>::`vftable')(void *p, char) = &NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::`vftable')(void *p, char) = &NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,float>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,float>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`vector deleting destructor'; // weak
int (__thiscall *PgTList<NpcMarkWin *>::`vftable')(void *p, char) = &PgTList<NpcMarkWin *>::`vector deleting destructor'; // weak
int (__thiscall *NiTMap<unsigned int,MapMarkWin *>::`vftable')(void *p, char) = &NiTMap<unsigned int,MapMarkWin *>::`vector deleting destructor'; // weak
int (__thiscall *NiTMap<unsigned short,KQTeamMarkWin *>::`vftable')(void *p, char) = &NiTMap<unsigned short,KQTeamMarkWin *>::`scalar deleting destructor'; // weak
int (__thiscall *PgTList<MobCoordinate *>::`vftable')(void *p, char) = &PgTList<MobCoordinate *>::`scalar deleting destructor'; // weak
int (__thiscall *PgTList<float>::`vftable')(void *p, char) = &PgTList<float>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerList<float>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,float>::`vector deleting destructor'; // weak
int (__thiscall *PgTList<RaidMarkWin *>::`vftable')(void *p, char) = &PgTList<RaidMarkWin *>::`scalar deleting destructor'; // weak
int (__thiscall *PgTList<PartyMarkWin *>::`vftable')(void *p, char) = &PgTList<PartyMarkWin *>::`vector deleting destructor'; // weak
int (__thiscall *PgTList<GTIScanMarkWin *>::`vftable')(void *p, char) = &PgTList<GTIScanMarkWin *>::`scalar deleting destructor'; // weak
int (__thiscall *PgTList<QuestHelperMarkWin *>::`vftable')(void *p, char) = &PgTList<QuestHelperMarkWin *>::`scalar deleting destructor'; // weak
int (__thiscall *PgTList<PgWinSpr *>::`vftable')(void *p, char) = &PgTList<PgWinSpr *>::`vector deleting destructor'; // weak
int (__thiscall *PgTList<MobAreaMarkWin *>::`vftable')(void *p, char) = &PgTList<MobAreaMarkWin *>::`scalar deleting destructor'; // weak
void (__thiscall *FullMapWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *FullMapWin::`vftable'{for `NiNode'})(void *p, char) = &FullMapWin::`vector deleting destructor'; // weak
void (__thiscall *GateChannelWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GateChannelWin::`vftable'{for `NiNode'})(void *p, char) = &GateChannelWin::`scalar deleting destructor'; // weak
void (__thiscall *GatheringWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GatheringWin::`vftable'{for `NiNode'})(void *p, char) = &GatheringWin::`vector deleting destructor'; // weak
_UNKNOWN unk_98CA0B; // weak
_UNKNOWN unk_98CA12; // weak
_UNKNOWN unk_98CA13; // weak
_UNKNOWN unk_98CA21; // weak
int (__thiscall *boost::bad_function_call::`vftable')(void *p, char) = &std::system_error::`vector deleting destructor'; // weak
void (__thiscall *GuildListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildListWin::`vftable'{for `NiNode'})(void *p, char) = &GuildListWin::`vector deleting destructor'; // weak
void (__thiscall *GuildSelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildSelectWin::`vftable'{for `NiNode'})(void *p, char) = &GuildSelectWin::`vector deleting destructor'; // weak
void (__thiscall *HelpWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *HelpWin::`vftable'{for `NiNode'})(void *p, char) = &HelpWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_98D5F3; // weak
char byte_98D60E = '\0'; // idb
_UNKNOWN unk_98D60F; // weak
_UNKNOWN unk_98D616; // weak
char byte_98D617 = '\0'; // idb
char byte_98D61E = '\0'; // idb
char byte_98D61F = '\0'; // idb
char byte_98D631 = '\0'; // idb
char byte_98D632 = '\0'; // idb
char byte_98D633 = '\0'; // idb
void (__thiscall *HolyPromiseAddWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *HolyPromiseAddWin::`vftable'{for `NiNode'})(void *p, char) = &HolyPromiseAddWin::`scalar deleting destructor'; // weak
void (__thiscall *HolyPromiseWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *HolyPromiseWin::`vftable'{for `NiNode'})(void *p, char) = &HolyPromiseWin::`vector deleting destructor'; // weak
void (__thiscall *IDTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *IDTimeWin::`vftable'{for `NiNode'})(void *p, char) = &IDTimeWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_98E21C; // weak
char byte_98E21D = '\0'; // idb
_UNKNOWN unk_98E21E; // weak
char byte_98E21F = '\0'; // idb
char byte_98E233 = '\0'; // idb
_UNKNOWN unk_98E256; // weak
_UNKNOWN unk_98E257; // weak
void (__thiscall *IndunLevelSelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *IndunLevelSelectWin::`vftable'{for `NiNode'})(void *p, char) = &IndunLevelSelectWin::`vector deleting destructor'; // weak
void (__thiscall *IndunLevelMsgWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *IndunLevelMsgWin::`vftable'{for `NiNode'})(void *p, char) = &IndunLevelMsgWin::`vector deleting destructor'; // weak
void (__thiscall *InputTextWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *InputTextWin::`vftable'{for `NiNode'})(void *p, char) = &InputTextWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_98EA4B; // weak
char aItemsort_butto[23] = "ItemSort_Button_US.nif"; // weak
void (__thiscall *InvTabButWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *InvTabButWin::`vftable'{for `NiNode'})(void *p, char) = &InvTabButWin::`vector deleting destructor'; // weak
void (__thiscall *ChargedItemIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ChargedItemIcon::`vftable'{for `NiNode'})(void *p, char) = &ChargedItemIcon::`scalar deleting destructor'; // weak
void (__thiscall *ChargedItemInvenWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ChargedItemInvenWin::`vftable'{for `NiNode'})(void *p, char) = &ChargedItemInvenWin::`vector deleting destructor'; // weak
void (__thiscall *CompensationInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CompensationInvWin::`vftable'{for `NiNode'})(void *p, char) = &CompensationInvWin::`scalar deleting destructor'; // weak
void (__thiscall *InvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *InvWin::`vftable'{for `NiNode'})(void *p, char) = &InvWin::`scalar deleting destructor'; // weak
void (__thiscall *CompensationItemIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CompensationItemIcon::`vftable'{for `NiNode'})(void *p, char) = &CompensationItemIcon::`scalar deleting destructor'; // weak
void (__thiscall *InventoryWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *InventoryWin::`vftable'{for `NiNode'})(void *p, char) = &InventoryWin::`vector deleting destructor'; // weak
void (__thiscall *ISingletonTask<ChargedItemUseTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ISingletonTask<ChargedItemUseTask>::`vftable'{for `NiRefObject'})(void *p, char) = &ChargedItemUseTask::`vector deleting destructor'; // weak
void (__thiscall *ChargedItemUseTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ChargedItemUseTask::`vftable'{for `NiRefObject'})(void *p, char) = &ChargedItemUseTask::`vector deleting destructor'; // weak
_UNKNOWN unk_9901D6; // weak
_UNKNOWN unk_9901D7; // weak
_UNKNOWN unk_9901E7; // weak
_UNKNOWN unk_9901F1; // weak
_UNKNOWN unk_9901F2; // weak
_UNKNOWN unk_9901F3; // weak
_UNKNOWN unk_9901FE; // weak
_UNKNOWN unk_9901FF; // weak
_UNKNOWN unk_990221; // weak
_UNKNOWN unk_990292; // weak
void (__thiscall *ItemInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ItemInfoWin::`vftable'{for `NiNode'})(void *p, char) = &ItemInfoWin::`scalar deleting destructor'; // weak
void (__thiscall *ItemMallMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ItemMallMenuWin::`vftable'{for `NiNode'})(void *p, char) = &ItemMallMenuWin::`scalar deleting destructor'; // weak
void (__thiscall *ShopInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ShopInvWin::`vftable'{for `NiNode'})(void *p, char) = &ShopInvWin::`scalar deleting destructor'; // weak
void (__thiscall *ItemShopWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ItemShopWin::`vftable'{for `NiNode'})(void *p, char) = &ItemShopWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_99133F; // weak
_UNKNOWN unk_991355; // weak
_UNKNOWN unk_991356; // weak
_UNKNOWN unk_991357; // weak
_UNKNOWN unk_99135E; // weak
_UNKNOWN unk_99135F; // weak
void (__thiscall *ItemTradeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ItemTradeWin::`vftable'{for `NiNode'})(void *p, char) = &ItemTradeWin::`vector deleting destructor'; // weak
void (__thiscall *ForgeSlotInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ForgeSlotInvWin::`vftable'{for `NiNode'})(void *p, char) = &ForgeSlotInvWin::`scalar deleting destructor'; // weak
void (__thiscall *ItemUpgradeMsgWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ItemUpgradeMsgWin::`vftable'{for `NiNode'})(void *p, char) = &ItemUpgradeMsgWin::`vector deleting destructor'; // weak
void (__thiscall *ItemUpgradeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ItemUpgradeWin::`vftable'{for `NiNode'})(void *p, char) = &ItemUpgradeWin::`vector deleting destructor'; // weak
_UNKNOWN unk_992019; // weak
_UNKNOWN unk_99201A; // weak
void *off_992788 = (void *)0x746C41; // weak
void *off_99278C = (void *)0x746C41; // weak
void *off_992798 = &loc_424D4D; // weak
void *off_9928D4 = (void *)0x637345; // weak
_UNKNOWN unk_9928D8; // weak
char (*off_992A2C)[11] = &byte_646E45; // weak
_UNKNOWN unk_992A30; // weak
void *off_992A4C = (void *)0x736E49; // weak
_UNKNOWN unk_992A50; // weak
void *off_992A54 = (void *)0x6C6544; // weak
_UNKNOWN unk_992A58; // weak
_UNKNOWN unk_992A5C; // weak
_UNKNOWN unk_992A60; // weak
_UNKNOWN unk_992A64; // weak
_UNKNOWN unk_992A68; // weak
_UNKNOWN unk_992A6C; // weak
_UNKNOWN unk_992A70; // weak
_UNKNOWN unk_992A74; // weak
_UNKNOWN unk_992A78; // weak
void *off_992A94 = (void *)0x746C41; // weak
_UNKNOWN unk_992A98; // weak
void *off_992ACC = (void *)0x6E6957; // weak
_UNKNOWN unk_992AD0; // weak
void *off_992AD4 = &loc_626154; // weak
_UNKNOWN unk_992AD8; // weak
void *off_992B88 = (void *)0x424D4C; // weak
_UNKNOWN unk_992B8C; // weak
void *off_992B90 = &loc_424D52; // weak
_UNKNOWN unk_992B94; // weak
void *off_992B98 = &loc_424D4D; // weak
_UNKNOWN unk_992B9C; // weak
void (__thiscall *KeyRemappingBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *KeyRemappingBut::`vftable'{for `NiNode'})(void *p, char) = &KeyRemappingBut::`scalar deleting destructor'; // weak
void (__thiscall *KeyRemappingWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *KeyRemappingWin::`vftable'{for `NiNode'})(void *p, char) = &KeyRemappingWin::`vector deleting destructor'; // weak
char byte_99324F = '\0'; // idb
char byte_993256[2] = { '\0', '\0' }; // idb
void (__thiscall *KQScoreWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *KQScoreWin::`vftable'{for `NiNode'})(void *p, char) = &KQScoreWin::`vector deleting destructor'; // weak
void (__thiscall *MainCharHPBarWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MainCharHPBarWin::`vftable'{for `NiNode'})(void *p, char) = &MainCharHPBarWin::`scalar deleting destructor'; // weak
void (__thiscall *MainMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MainMenuWin::`vftable'{for `NiNode'})(void *p, char) = &MainMenuWin::`vector deleting destructor'; // weak
_UNKNOWN unk_993DFC; // weak
_UNKNOWN unk_993DFD; // weak
void (__thiscall *KarisForgeSlotInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *KarisForgeSlotInvWin::`vftable'{for `NiNode'})(void *p, char) = &KarisForgeSlotInvWin::`vector deleting destructor'; // weak
void (__thiscall *MakeKarisWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MakeKarisWin::`vftable'{for `NiNode'})(void *p, char) = &MakeKarisWin::`vector deleting destructor'; // weak
char byte_994449 = '\0'; // idb
char byte_99444A[2] = { '\0', '\0' }; // idb
void (__thiscall *MapLinkGateWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MapLinkGateWin::`vftable'{for `NiNode'})(void *p, char) = &MapLinkGateWin::`vector deleting destructor'; // weak
char byte_994872 = '\0'; // idb
_UNKNOWN unk_994873; // weak
int (__thiscall *MarketSearchItem::`vftable')(void *p, char) = &MarketSearchItem::`vector deleting destructor'; // weak
void (__thiscall *MarketSearchWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MarketSearchWin::`vftable'{for `NiNode'})(void *p, char) = &MarketSearchWin::`scalar deleting destructor'; // weak
void (__thiscall *MiniHouseInvTabButWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MiniHouseInvTabButWin::`vftable'{for `NiNode'})(void *p, char) = &MiniHouseInvTabButWin::`scalar deleting destructor'; // weak
void (__thiscall *MiniHouseInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MiniHouseInvWin::`vftable'{for `NiNode'})(void *p, char) = &MiniHouseInvWin::`scalar deleting destructor'; // weak
void (__thiscall *MiniHouseInventoryWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MiniHouseInventoryWin::`vftable'{for `NiNode'})(void *p, char) = &MiniHouseInventoryWin::`scalar deleting destructor'; // weak
void (__thiscall *MiniHouseMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MiniHouseMenuWin::`vftable'{for `NiNode'})(void *p, char) = &MiniHouseMenuWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_995B31; // weak
void (__thiscall *MiniMapMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MiniMapMarkWin::`vftable'{for `NiNode'})(void *p, char) = &GTIScanMarkWin::`scalar deleting destructor'; // weak
void (__thiscall *MainCharMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MainCharMarkWin::`vftable'{for `NiNode'})(void *p, char) = &GTIScanMarkWin::`scalar deleting destructor'; // weak
void (__thiscall *NpcMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *NpcMarkWin::`vftable'{for `NiNode'})(void *p, char) = &GTIScanMarkWin::`scalar deleting destructor'; // weak
void (__thiscall *PartyMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *PartyMarkWin::`vftable'{for `NiNode'})(void *p, char) = &GTIScanMarkWin::`scalar deleting destructor'; // weak
void (__thiscall *RaidMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *RaidMarkWin::`vftable'{for `NiNode'})(void *p, char) = &GTIScanMarkWin::`scalar deleting destructor'; // weak
void (__thiscall *GTIScanMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GTIScanMarkWin::`vftable'{for `NiNode'})(void *p, char) = &GTIScanMarkWin::`scalar deleting destructor'; // weak
void (__thiscall *KQTeamMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *KQTeamMarkWin::`vftable'{for `NiNode'})(void *p, char) = &GTIScanMarkWin::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::`scalar deleting destructor'; // weak
void (__thiscall *QuestHelperMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *QuestHelperMarkWin::`vftable'{for `NiNode'})(void *p, char) = &QuestHelperMarkWin::`vector deleting destructor'; // weak
void (__thiscall *MobAreaMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MobAreaMarkWin::`vftable'{for `NiNode'})(void *p, char) = &GTIScanMarkWin::`scalar deleting destructor'; // weak
void (__thiscall *MapMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MapMarkWin::`vftable'{for `NiNode'})(void *p, char) = &GTIScanMarkWin::`scalar deleting destructor'; // weak
int (__thiscall *PgTList<MiniMapWin::sKQAlarmInfo *>::`vftable')(void *p, char) = &PgTList<MiniMapWin::sKQAlarmInfo *>::`vector deleting destructor'; // weak
void (__thiscall *MiniMapWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MiniMapWin::`vftable'{for `NiNode'})(void *p, char) = &MiniMapWin::`vector deleting destructor'; // weak
_UNKNOWN unk_9973A1; // weak
_UNKNOWN unk_9973A2; // weak
_UNKNOWN unk_9973A3; // weak
void (__thiscall *MiniPartyWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MiniPartyWin::`vftable'{for `NiNode'})(void *p, char) = &MiniPartyWin::`vector deleting destructor'; // weak
_UNKNOWN unk_997797; // weak
_UNKNOWN unk_9977A9; // weak
_UNKNOWN unk_9977AA; // weak
_UNKNOWN unk_9977AB; // weak
_UNKNOWN unk_9977B2; // weak
_UNKNOWN unk_9977B3; // weak
_UNKNOWN unk_9977BA; // weak
_UNKNOWN unk_9977BB; // weak
_UNKNOWN unk_9977C2; // weak
_UNKNOWN unk_9977C3; // weak
void (__thiscall *MoneyWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MoneyWin::`vftable'{for `NiNode'})(void *p, char) = &MoneyWin::`vector deleting destructor'; // weak
void (__thiscall *HolyRewardMoneyWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *HolyRewardMoneyWin::`vftable'{for `NiNode'})(void *p, char) = &HolyRewardMoneyWin::`scalar deleting destructor'; // weak
void (__thiscall *MoveModeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MoveModeWin::`vftable'{for `NiNode'})(void *p, char) = &MoveModeWin::`vector deleting destructor'; // weak
void (__thiscall *MysteryVaultWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MysteryVaultWin::`vftable'{for `NiNode'})(void *p, char) = &MysteryVaultWin::`scalar deleting destructor'; // weak
char byte_99858F = '\0'; // idb
_UNKNOWN unk_998590; // weak
char byte_998591[3] = { '\0', '\0', '\0' }; // idb
void (__thiscall *ItemShopInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ItemShopInvWin::`vftable'{for `NiNode'})(void *p, char) = &ItemShopInvWin::`scalar deleting destructor'; // weak
void (__thiscall *NPCItemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *NPCItemWin::`vftable'{for `NiNode'})(void *p, char) = &NPCItemWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_998C5E; // weak
void (__thiscall *NPCSkillInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *NPCSkillInvWin::`vftable'{for `NiNode'})(void *p, char) = &NPCSkillInvWin::`vector deleting destructor'; // weak
void (__thiscall *NPCSkillWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *NPCSkillWin::`vftable'{for `NiNode'})(void *p, char) = &NPCSkillWin::`vector deleting destructor'; // weak
void (__thiscall *NPCSoulInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *NPCSoulInvWin::`vftable'{for `NiNode'})(void *p, char) = &NPCSoulInvWin::`vector deleting destructor'; // weak
void (__thiscall *NPCSoulWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *NPCSoulWin::`vftable'{for `NiNode'})(void *p, char) = &NPCSoulWin::`vector deleting destructor'; // weak
_UNKNOWN unk_999932; // weak
int (__stdcall *PartyJoinProposeWin::`vftable')(int) = &PartyJoinProposeWin::`vector deleting destructor'; // weak
void (__thiscall *PartyJoinProposeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *PartyJoinProposeWin::`vftable'{for `NiNode'})(void *p, char) = &PartyJoinProposeWin::`scalar deleting destructor'; // weak
char byte_999BED[3] = { '\0', '\0', '\0' }; // idb
void (__thiscall *PartyLootSelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *PartyLootSelectWin::`vftable'{for `NiNode'})(void *p, char) = &PartyLootSelectWin::`vector deleting destructor'; // weak
void (__thiscall *PartyLootSetupWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *PartyLootSetupWin::`vftable'{for `NiNode'})(void *p, char) = &PartyLootSetupWin::`scalar deleting destructor'; // weak
void (__thiscall *CPartyMatchWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CPartyMatchWin::`vftable'{for `NiNode'})(void *p, char) = &CPartyMatchWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_99A99B; // weak
_UNKNOWN unk_99A9A7; // weak
_UNKNOWN unk_99A9B3; // weak
_UNKNOWN unk_99A9BD; // weak
void (__thiscall *PartyWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *PartyWin::`vftable'{for `NiNode'})(void *p, char) = &PartyWin::`vector deleting destructor'; // weak
void (__thiscall *PkKqRankingWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *PkKqRankingWin::`vftable'{for `NiNode'})(void *p, char) = &PkKqRankingWin::`vector deleting destructor'; // weak
_UNKNOWN unk_99B2F9; // weak
_UNKNOWN unk_99B2FA; // weak
char off_99B334[] = { 'C', 'l', 's', '\0' }; // idb
char off_99B380[] = { 'W', 'i', 'n', '\0' }; // idb
void (__thiscall *PkRealTiemRankWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *PkRealTiemRankWin::`vftable'{for `NiNode'})(void *p, char) = &PkRealTiemRankWin::`scalar deleting destructor'; // weak
char byte_99B62A = '\0'; // idb
char byte_99B62B = '\0'; // idb
char byte_99B637 = '\0'; // idb
_UNKNOWN unk_99B653; // weak
_UNKNOWN unk_99B661; // weak
void (__thiscall *PlayGuideMinWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *PlayGuideMinWin::`vftable'{for `NiNode'})(void *p, char) = &PlayGuideMinWin::`vector deleting destructor'; // weak
void (__thiscall *PageWinSpr::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *PageWinSpr::`vftable'{for `NiNode'})(void *p, char) = &PageWinSpr::`scalar deleting destructor'; // weak
void (__thiscall *PlayGuideWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *PlayGuideWin::`vftable'{for `NiNode'})(void *p, char) = &PlayGuideWin::`scalar deleting destructor'; // weak
void (__thiscall *PopupMenu::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *PopupMenu::`vftable'{for `NiNode'})(void *p, char) = &PopupMenuTextCheck::`vector deleting destructor'; // weak
void (__thiscall *PopupMenuText::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *PopupMenuText::`vftable'{for `NiNode'})(void *p, char) = &PopupMenuTextCheck::`vector deleting destructor'; // weak
void (__thiscall *PopupMenuTextCheck::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *PopupMenuTextCheck::`vftable'{for `NiNode'})(void *p, char) = &PopupMenuTextCheck::`vector deleting destructor'; // weak
void (__thiscall *PopupMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *PopupMenuWin::`vftable'{for `NiNode'})(void *p, char) = &PopupMenuWin::`vector deleting destructor'; // weak
void (__thiscall *PopupMenuSubMenu::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *PopupMenuSubMenu::`vftable'{for `NiNode'})(void *p, char) = &PopupMenuSubMenu::`vector deleting destructor'; // weak
char off_99CDAC[] = { 'D', 'a', 'y', '\0' }; // idb
_UNKNOWN unk_99CDB0; // weak
void (__thiscall *PrisonTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *PrisonTimeWin::`vftable'{for `NiNode'})(void *p, char) = &PrisonTimeWin::`vector deleting destructor'; // weak
_UNKNOWN unk_99D00F; // weak
char byte_99D013 = '\0'; // idb
char byte_99D02A = '\0'; // idb
char byte_99D02B = '\0'; // idb
char byte_99D032 = '\0'; // idb
_UNKNOWN unk_99D033; // weak
_UNKNOWN unk_99D04A; // weak
_UNKNOWN unk_99D04B; // weak
_UNKNOWN unk_99D052; // weak
_UNKNOWN unk_99D053; // weak
_UNKNOWN unk_99D05D; // weak
_UNKNOWN unk_99D05E; // weak
void (__thiscall *PrivateStoreInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *PrivateStoreInvWin::`vftable'{for `NiNode'})(void *p, char) = &PrivateStoreInvWin::`vector deleting destructor'; // weak
void (__thiscall *PrivateStoreWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *PrivateStoreWin::`vftable'{for `NiNode'})(void *p, char) = &PrivateStoreWin::`vector deleting destructor'; // weak
char byte_99D78F = '\0'; // idb
char off_99D790[] = { ' ', '%', 's', '\0' }; // idb
char byte_99D799 = '\0'; // idb
char byte_99D79A = '\0'; // idb
char byte_99D79B = '\0'; // idb
char byte_99D7B6 = '\0'; // idb
_UNKNOWN unk_99D7B7; // weak
_UNKNOWN unk_99D7C6; // weak
char off_99D9C0[] = { 'N', 'u', 'm', '\0' }; // idb
void (__thiscall *MaterialItemIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MaterialItemIcon::`vftable'{for `NiNode'})(void *p, char) = &MaterialItemIcon::`scalar deleting destructor'; // weak
void (__thiscall *ProductionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ProductionWin::`vftable'{for `NiNode'})(void *p, char) = &ProductionWin::`vector deleting destructor'; // weak
char byte_99DF7E = '\0'; // idb
char byte_99DF7F = '\0'; // idb
void (__thiscall *ProductSkillSelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ProductSkillSelectWin::`vftable'{for `NiNode'})(void *p, char) = &ProductSkillSelectWin::`vector deleting destructor'; // weak
int (__stdcall *RebirthMenuWin::`vftable')(int) = &RebirthMenuWin::`vector deleting destructor'; // weak
void (__thiscall *RebirthMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *RebirthMenuWin::`vftable'{for `NiNode'})(void *p, char) = &RebirthMenuWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_99E70F; // weak
_UNKNOWN unk_99E716; // weak
_UNKNOWN unk_99E717; // weak
_UNKNOWN unk_99E72E; // weak
_UNKNOWN unk_99E72F; // weak
_UNKNOWN unk_99E736; // weak
void (__thiscall *ReportWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ReportWin::`vftable'{for `NiNode'})(void *p, char) = &ReportWin::`vector deleting destructor'; // weak
_UNKNOWN unk_99EAD3; // weak
_UNKNOWN unk_99EADA; // weak
void (__thiscall *ReviveMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ReviveMenuWin::`vftable'{for `NiNode'})(void *p, char) = &ReviveMenuWin::`scalar deleting destructor'; // weak
void (__thiscall *RewardWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *RewardWin::`vftable'{for `NiNode'})(void *p, char) = &RewardWin::`scalar deleting destructor'; // weak
int (__thiscall *RewardInvItem::`vftable')(void *p, char) = &RewardInvItem::`vector deleting destructor'; // weak
void (__thiscall *RewardInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *RewardInvWin::`vftable'{for `NiNode'})(void *p, char) = &RewardInvWin::`scalar deleting destructor'; // weak
void (__thiscall *RidePetWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *RidePetWin::`vftable'{for `NiNode'})(void *p, char) = &RidePetWin::`vector deleting destructor'; // weak
void (__thiscall *RoarWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *RoarWin::`vftable'{for `NiNode'})(void *p, char) = &RoarWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_99FC0B; // weak
_UNKNOWN unk_99FC12; // weak
void (__thiscall *RollingDiceWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *RollingDiceWin::`vftable'{for `NiNode'})(void *p, char) = &RollingDiceWin::`vector deleting destructor'; // weak
void (__thiscall *RollingDiceMsgWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *RollingDiceMsgWin::`vftable'{for `NiNode'})(void *p, char) = &RollingDiceMsgWin::`vector deleting destructor'; // weak
void (__thiscall *ScreenWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ScreenWin::`vftable'{for `NiNode'})(void *p, char) = &ScreenWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_9A048E; // weak
void (__thiscall *ServerMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ServerMenuWin::`vftable'{for `NiNode'})(void *p, char) = &ServerMenuWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_9A07BE; // weak
void (__thiscall *ServerTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ServerTimeWin::`vftable'{for `NiNode'})(void *p, char) = &ServerTimeWin::`vector deleting destructor'; // weak
char byte_9A0A7E[2] = { '\0', '\0' }; // idb
void (__thiscall *ShopWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ShopWin::`vftable'{for `NiNode'})(void *p, char) = &ShopWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_9A0DBF; // weak
_UNKNOWN unk_9A0DC2; // weak
_UNKNOWN unk_9A0DC3; // weak
_UNKNOWN unk_9A0DC4; // weak
_UNKNOWN unk_9A0DC5; // weak
_UNKNOWN unk_9A0DC7; // weak
void (__thiscall *ShortCutIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ShortCutIconWin::`vftable'{for `NiNode'})(void *p, char) = &ShortCutIconWin::`vector deleting destructor'; // weak
void (__thiscall *ShortCutWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ShortCutWin::`vftable'{for `NiNode'})(void *p, char) = &ShortCutWin::`vector deleting destructor'; // weak
_UNKNOWN unk_9A17B3; // weak
_UNKNOWN unk_9A17BD; // weak
_UNKNOWN unk_9A17BE; // weak
_UNKNOWN unk_9A1910; // weak
_UNKNOWN unk_9A1914; // weak
int (__thiscall *NiTListBase<DFALL<ItemAction *>,ItemAction *>::`vftable')(void *p, char) = &NiTListBase<DFALL<ItemAction *>,ItemAction *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<ItemAction *>,ItemAction *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<ItemAction *>,ItemAction *>::`vector deleting destructor'; // weak
int (__thiscall *NiTList<ItemAction *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<ItemAction *>,ItemAction *>::`vector deleting destructor'; // weak
void (__thiscall *SkillInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *SkillInfoWin::`vftable'{for `NiNode'})(void *p, char) = &SkillInfoWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_9A1D2A; // weak
void (__thiscall *off_9A1D34)(PgWinSpr *this, unsigned int uiHeight, bool bReverse) = &PgWinSpr::ChangeHeightWithUV; // weak
_UNKNOWN unk_9A1D3E; // weak
char byte_9A1D96[2] = { '\0', '\0' }; // idb
void (__thiscall *CSkillInitWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CSkillInitWin::`vftable'{for `NiNode'})(void *p, char) = &CSkillInitWin::`vector deleting destructor'; // weak
char byte_9A2119 = '\0'; // idb
_UNKNOWN unk_9A211A; // weak
_UNKNOWN unk_9A211B; // weak
_UNKNOWN unk_9A2132; // weak
_UNKNOWN unk_9A2133; // weak
void (__thiscall *SkillPowerIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *SkillPowerIconWin::`vftable'{for `NiNode'})(void *p, char) = &SkillPowerIconWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_9A24FA; // weak
int (__thiscall *off_9A2504)(NiNode *pkParent, NiPointer<NiAVObject> *result, unsigned int i, NiAVObject *pkChild) = &NiNode::SetAt; // weak
_UNKNOWN unk_9A250E; // weak
void (__thiscall *SkillPowerListItemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *SkillPowerListItemWin::`vftable'{for `NiNode'})(void *p, char) = &SkillPowerListItemWin::`scalar deleting destructor'; // weak
void (__thiscall *SkillPowerWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
_UNKNOWN unk_9A28E2; // weak
void (__thiscall *off_9A28EC)(PgWinFrame *this, int iMsgTag, void *pvBody, struct IDirectMessenger *) = &PgWinFrame::DirectDispatchToParent; // weak
int (__thiscall *SkillPowerWin::`vftable'{for `NiNode'})(void *p, char) = &SkillPowerWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_9A2B26; // weak
_UNKNOWN unk_9A2B27; // weak
_UNKNOWN unk_9A2B2E; // weak
_UNKNOWN unk_9A2B2F; // weak
_UNKNOWN unk_9A2B39; // weak
_UNKNOWN unk_9A2B3A; // weak
char off_9A2E0C[] = { '%', '2', 'd', '\0' }; // idb
void *off_9A2E10 = (void *)0x643225; // weak
char off_9A2E14[] = { '%', '2', 'd', '\0' }; // idb
char off_9A2E18[] = { '%', '2', 'd', '\0' }; // idb
void (__thiscall *PosInfoWinBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *PosInfoWinBut::`vftable'{for `NiNode'})(void *p, char) = &PosInfoWinBut::`vector deleting destructor'; // weak
void (__thiscall *LevelSelectWinBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
_UNKNOWN unk_9A30B2; // weak
int (__thiscall *LevelSelectWinBut::`vftable'{for `NiNode'})(void *p, char) = &LevelSelectWinBut::`scalar deleting destructor'; // weak
struct NiObject *(__thiscall *off_9A30BC)(NiNode *this, NiCloningProcess *kCloning) = &NiNode::CreateClone; // weak
_UNKNOWN unk_9A30C6; // weak
void (__thiscall *SkillInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *SkillInvWin::`vftable'{for `NiNode'})(void *p, char) = &SkillInvWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_9A349A; // weak
int (__stdcall *off_9A34A4[2])(int, NiD3DShaderConstantMapEntry *__formal, NsTextCodeV0_2 *_pNsTextCode_) = { &NsFNC_125::MakeNode, &NsFNC_125::MakeNode }; // weak
_UNKNOWN unk_9A34AE; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::`vector deleting destructor'; // weak
int (__thiscall *PgTList<NiPointer<PgFont>>::`vftable')(void *p, char) = &PgTList<NiPointer<PgFont>>::`scalar deleting destructor'; // weak
void (__thiscall *SkillWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *SkillWin::`vftable'{for `NiNode'})(void *p, char) = &SkillWin::`vector deleting destructor'; // weak
_UNKNOWN unk_9A37F3; // weak
_UNKNOWN unk_9A37FD; // weak
void (__thiscall *SoulStoneInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *SoulStoneInfoWin::`vftable'{for `NiNode'})(void *p, char) = &SoulStoneInfoWin::`scalar deleting destructor'; // weak
void (__thiscall *SoulStoneWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *SoulStoneWin::`vftable'{for `NiNode'})(void *p, char) = &SoulStoneWin::`vector deleting destructor'; // weak
char byte_9A3D88 = '\0'; // idb
char byte_9A3D89 = '\0'; // idb
char byte_9A3D8A = '\0'; // idb
char byte_9A3D8B = '\0'; // idb
char byte_9A3D8C = '\0'; // idb
char byte_9A3D8D[3] = { '\0', '\0', '\0' }; // idb
void (__thiscall *StatTitleListItemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *StatTitleListItemWin::`vftable'{for `NiNode'})(void *p, char) = &StatTitleListItemWin::`vector deleting destructor'; // weak
void (__thiscall *StatTitleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *StatTitleWin::`vftable'{for `NiNode'})(void *p, char) = &StatTitleWin::`vector deleting destructor'; // weak
_UNKNOWN unk_9A4403; // weak
_UNKNOWN unk_9A440A; // weak
char byte_9A440B = '\0'; // idb
_UNKNOWN unk_9A4416; // weak
char byte_9A4417 = '\0'; // idb
void (__thiscall *StatusWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *StatusWin::`vftable'{for `NiNode'})(void *p, char) = &StatusWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_9A486D; // weak
_UNKNOWN unk_9A486E; // weak
_UNKNOWN unk_9A486F; // weak
_UNKNOWN unk_9A4876; // weak
char byte_9A4877 = '\0'; // idb
char byte_9A4883 = '\0'; // idb
void (__thiscall *StorageTabButWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *StorageTabButWin::`vftable'{for `NiNode'})(void *p, char) = &StorageTabButWin::`vector deleting destructor'; // weak
void (__thiscall *StorageInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *StorageInvWin::`vftable'{for `NiNode'})(void *p, char) = &StorageInvWin::`scalar deleting destructor'; // weak
void (__thiscall *StorageWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *StorageWin::`vftable'{for `NiNode'})(void *p, char) = &StorageWin::`scalar deleting destructor'; // weak
void (__thiscall *SysMsgDisplayWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *SysMsgDisplayWin::`vftable'{for `NiNode'})(void *p, char) = &SysMsgDisplayWin::`vector deleting destructor'; // weak
void (__thiscall *SystemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *SystemWin::`vftable'{for `NiNode'})(void *p, char) = &SystemWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_9A5997; // weak
_UNKNOWN unk_9A599E; // weak
_UNKNOWN unk_9A599F; // weak
_UNKNOWN unk_9A59AA; // weak
void (__thiscall *MobIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MobIconWin::`vftable'{for `NiNode'})(void *p, char) = &MobIconWin::`scalar deleting destructor'; // weak
void (__thiscall *AbStateIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *AbStateIconWin::`vftable'{for `NiNode'})(void *p, char) = &AbStateIconWin::`vector deleting destructor'; // weak
void (__thiscall *TargetOfTheTargetWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *TargetOfTheTargetWin::`vftable'{for `NiNode'})(void *p, char) = &TargetOfTheTargetWin::`scalar deleting destructor'; // weak
void (__thiscall *TargetWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *TargetWin::`vftable'{for `NiNode'})(void *p, char) = &TargetWin::`vector deleting destructor'; // weak
_UNKNOWN unk_9A66CC; // weak
_UNKNOWN unk_9A66CD; // weak
void (__thiscall *ToolTipWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ToolTipWin::`vftable'{for `NiNode'})(void *p, char) = &ToolTipWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_9A693B; // weak
_UNKNOWN unk_9A6942; // weak
_UNKNOWN unk_9A6943; // weak
_UNKNOWN unk_9A6951; // weak
void (__thiscall *UserTradeInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *UserTradeInvWin::`vftable'{for `NiNode'})(void *p, char) = &UserTradeInvWin::`scalar deleting destructor'; // weak
void (__thiscall *UserTradeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *UserTradeWin::`vftable'{for `NiNode'})(void *p, char) = &UserTradeWin::`vector deleting destructor'; // weak
char byte_9A722A = '\0'; // idb
char byte_9A722B = '\0'; // idb
char byte_9A723A = '\0'; // idb
_UNKNOWN unk_9A723B; // weak
void (__thiscall *VoteWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *VoteWin::`vftable'{for `NiNode'})(void *p, char) = &VoteWin::`scalar deleting destructor'; // weak
void (__thiscall *VoteReasonWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *VoteReasonWin::`vftable'{for `NiNode'})(void *p, char) = &VoteReasonWin::`vector deleting destructor'; // weak
void (__thiscall *WaitingForLogoutWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *WaitingForLogoutWin::`vftable'{for `NiNode'})(void *p, char) = &WaitingForLogoutWin::`scalar deleting destructor'; // weak
void (__thiscall *LogoutAfterMinutesWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *LogoutAfterMinutesWin::`vftable'{for `NiNode'})(void *p, char) = &LogoutAfterMinutesWin::`scalar deleting destructor'; // weak
char byte_9A7C0F = '\0'; // idb
char byte_9A7C27 = '\0'; // idb
_UNKNOWN unk_9A7C2E; // weak
_UNKNOWN unk_9A7C2F; // weak
_UNKNOWN unk_9A7C36; // weak
char byte_9A7C37 = '\0'; // idb
char byte_9A7C59 = '\0'; // idb
_UNKNOWN unk_9A7C5A; // weak
_UNKNOWN unk_9A7C5B; // weak
void (__thiscall *WeaponTitleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *WeaponTitleWin::`vftable'{for `NiNode'})(void *p, char) = &WeaponTitleDeleteWin::`vector deleting destructor'; // weak
void (__thiscall *WeaponTitleDeleteWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *WeaponTitleDeleteWin::`vftable'{for `NiNode'})(void *p, char) = &WeaponTitleDeleteWin::`vector deleting destructor'; // weak
_UNKNOWN unk_9A83C9; // weak
void (__thiscall *WingStoneMapWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *WingStoneMapWin::`vftable'{for `NiNode'})(void *p, char) = &WingStoneMapWin::`scalar deleting destructor'; // weak
void *off_9A87D4 = &loc_796C46; // weak
void (__thiscall *WingStoneWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *WingStoneWin::`vftable'{for `NiNode'})(void *p, char) = &WingStoneWin::`scalar deleting destructor'; // weak
char byte_9A8B16 = '\0'; // idb
char byte_9A8B17 = '\0'; // idb
void (__thiscall *WorldMapWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *WorldMapWin::`vftable'{for `NiNode'})(void *p, char) = &WorldMapWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_9A8E2B; // weak
void (__thiscall *OptionBaseWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *OptionBaseWin::`vftable'{for `NiNode'})(void *p, char) = &OptionBaseWin::`vector deleting destructor'; // weak
_UNKNOWN unk_9A91A4; // weak
void (__thiscall *OptionGraphicWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *OptionGraphicWin::`vftable'{for `NiNode'})(void *p, char) = &OptionGraphicWin::`vector deleting destructor'; // weak
_UNKNOWN unk_9A9628; // weak
void (__thiscall *OptionSoundWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *OptionSoundWin::`vftable'{for `NiNode'})(void *p, char) = &OptionSoundWin::`vector deleting destructor'; // weak
_UNKNOWN unk_9A9914; // weak
void (__thiscall *OptionSystemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *OptionSystemWin::`vftable'{for `NiNode'})(void *p, char) = &OptionSystemWin::`vector deleting destructor'; // weak
_UNKNOWN unk_9A9EFE; // weak
char off_9A9F00[] = { 'x', '%', 'd', '\0' }; // idb
void (__thiscall *AbstateIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *AbstateIcon::`vftable'{for `NiNode'})(void *p, char) = &AbstateIcon::`vector deleting destructor'; // weak
void (__thiscall *ActionIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ActionIcon::`vftable'{for `NiNode'})(void *p, char) = &ActionIcon::`vector deleting destructor'; // weak
void (__thiscall *AniIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *AniIconWin::`vftable'{for `NiNode'})(void *p, char) = &AniIconWin::`scalar deleting destructor'; // weak
void (__thiscall *IconSlotWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *IconSlotWin::`vftable'{for `NiNode'})(void *p, char) = &IconSlotWin::`scalar deleting destructor'; // weak
void (__thiscall *IconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *IconWin::`vftable'{for `NiNode'})(void *p, char) = &IconWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_9AAB60; // weak
_UNKNOWN unk_9AAB62; // weak
_UNKNOWN unk_9AAB63; // weak
_UNKNOWN unk_9AAB69; // weak
_UNKNOWN unk_9AAB6A; // weak
_UNKNOWN unk_9AAB6B; // weak
_UNKNOWN unk_9AAB77; // weak
_UNKNOWN unk_9AAB7B; // weak
void (__thiscall *ItemIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ItemIcon::`vftable'{for `NiNode'})(void *p, char) = &MaterialItemIcon::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<DFALL<SkillIcon *>,SkillIcon *>::`vftable')(void *p, char) = &NiTListBase<DFALL<SkillIcon *>,SkillIcon *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<SkillIcon *>,SkillIcon *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<SkillIcon *>,SkillIcon *>::`vector deleting destructor'; // weak
void (__thiscall *SkillIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *SkillIcon::`vftable'{for `NiNode'})(void *p, char) = &SkillIcon::`scalar deleting destructor'; // weak
char byte_9AB166[2] = { '\0', '\0' }; // idb
void (__thiscall *GuildCombatPropensityChangeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildCombatPropensityChangeWin::`vftable'{for `NiNode'})(void *p, char) = &GuildCombatPropensityChangeWin::`vector deleting destructor'; // weak
void (__thiscall *GuildFoundWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildFoundWin::`vftable'{for `NiNode'})(void *p, char) = &GuildFoundWin::`scalar deleting destructor'; // weak
void (__thiscall *GuildMasterMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildMasterMenuWin::`vftable'{for `NiNode'})(void *p, char) = &GuildMasterMenuWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_9ABC67; // weak
void (__thiscall *GuildMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildMenuWin::`vftable'{for `NiNode'})(void *p, char) = &GuildMenuWin::`vector deleting destructor'; // weak
void (__thiscall *ISingletonTask<GuildLeaveTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ISingletonTask<GuildLeaveTask>::`vftable'{for `NiRefObject'})(void *p, char) = &ISingletonTask<GuildLeaveTask>::`vector deleting destructor'; // weak
void (__thiscall *GuildLeaveTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildLeaveTask::`vftable'{for `NiRefObject'})(void *p, char) = &ISingletonTask<GuildLeaveTask>::`vector deleting destructor'; // weak
char byte_9AC01D = '\0'; // idb
char byte_9AC01E[2] = { '\0', '\0' }; // idb
char off_9AC070[] = { 'C', 'l', 's', '\0' }; // idb
void (__thiscall *GuildNameChangeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildNameChangeWin::`vftable'{for `NiNode'})(void *p, char) = &GuildNameChangeWin::`vector deleting destructor'; // weak
void (__thiscall *GuildNoticeEditorWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildNoticeEditorWin::`vftable'{for `NiNode'})(void *p, char) = &GuildNoticeEditorWin::`scalar deleting destructor'; // weak
void (__thiscall *ISingletonTask<GuildNotifyTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ISingletonTask<GuildNotifyTask>::`vftable'{for `NiRefObject'})(void *p, char) = &ISingletonTask<GuildNotifyTask>::`vector deleting destructor'; // weak
void (__thiscall *GuildNotifyTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildNotifyTask::`vftable'{for `NiRefObject'})(void *p, char) = &GuildNotifyTask::`scalar deleting destructor'; // weak
_UNKNOWN unk_9AC6F7; // weak
void (__thiscall *GuildNpcMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildNpcMenuWin::`vftable'{for `NiNode'})(void *p, char) = &GuildNpcMenuWin::`vector deleting destructor'; // weak
void (__thiscall *ISingletonTask<GuildDismissTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ISingletonTask<GuildDismissTask>::`vftable'{for `NiRefObject'})(void *p, char) = &ISingletonTask<GuildDismissTask>::`scalar deleting destructor'; // weak
void (__thiscall *GuildDismissTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildDismissTask::`vftable'{for `NiRefObject'})(void *p, char) = &ISingletonTask<GuildDismissTask>::`scalar deleting destructor'; // weak
void (__thiscall *GuildWarInformWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildWarInformWin::`vftable'{for `NiNode'})(void *p, char) = &GuildWarInformWin::`vector deleting destructor'; // weak
void (__thiscall *GuildWarKillCountWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildWarKillCountWin::`vftable'{for `NiNode'})(void *p, char) = &GuildWarKillCountWin::`vector deleting destructor'; // weak
void (__thiscall *GuildWarStateWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildWarStateWin::`vftable'{for `NiNode'})(void *p, char) = &GuildWarStateWin::`scalar deleting destructor'; // weak
struct ShopInvWin *(__cdecl *off_9AD682)(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent) = &ShopInvWin::CreateWin; // weak
_UNKNOWN unk_9AD686; // weak
_UNKNOWN unk_9AD687; // weak
char byte_9AD68E = '\0'; // idb
char byte_9AD68F = '\0'; // idb
char byte_9AD696 = '\0'; // idb
char byte_9AD697 = '\0'; // idb
_UNKNOWN unk_9AD69E; // weak
_UNKNOWN unk_9AD69F; // weak
char byte_9AD6C5[3] = { '\0', '\0', '\0' }; // idb
void (__thiscall *ISingletonTask<GuildMemberVanishTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ISingletonTask<GuildMemberVanishTask>::`vftable'{for `NiRefObject'})(void *p, char) = &GuildMemberVanishTask::`vector deleting destructor'; // weak
void (__thiscall *ISingletonTask<GuildMemberGradeSetupTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ISingletonTask<GuildMemberGradeSetupTask>::`vftable'{for `NiRefObject'})(void *p, char) = &ISingletonTask<GuildMemberGradeSetupTask>::`vector deleting destructor'; // weak
void (__thiscall *ISingletonTask<GuildAcademyMasterAppointTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ISingletonTask<GuildAcademyMasterAppointTask>::`vftable'{for `NiRefObject'})(void *p, char) = &ISingletonTask<GuildAcademyMasterAppointTask>::`scalar deleting destructor'; // weak
void (__thiscall *ISingletonTask<GuildAcademyMasterInitializeTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ISingletonTask<GuildAcademyMasterInitializeTask>::`vftable'{for `NiRefObject'})(void *p, char) = &ISingletonTask<GuildAcademyMasterInitializeTask>::`scalar deleting destructor'; // weak
void (__thiscall *GuildMemberVanishTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildMemberVanishTask::`vftable'{for `NiRefObject'})(void *p, char) = &GuildMemberVanishTask::`vector deleting destructor'; // weak
void (__thiscall *GuildMemberGradeSetupTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildMemberGradeSetupTask::`vftable'{for `NiRefObject'})(void *p, char) = &ISingletonTask<GuildMemberGradeSetupTask>::`vector deleting destructor'; // weak
void (__thiscall *GuildAcademyMasterAppointTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildAcademyMasterAppointTask::`vftable'{for `NiRefObject'})(void *p, char) = &ISingletonTask<GuildAcademyMasterAppointTask>::`scalar deleting destructor'; // weak
void (__thiscall *GuildAcademyMasterInitializeTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildAcademyMasterInitializeTask::`vftable'{for `NiRefObject'})(void *p, char) = &ISingletonTask<GuildAcademyMasterInitializeTask>::`scalar deleting destructor'; // weak
void (__thiscall *GuildWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildWin::`vftable'{for `NiNode'})(void *p, char) = &GuildWin::`scalar deleting destructor'; // weak
void (__thiscall *GTIFlagWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GTIFlagWin::`vftable'{for `NiNode'})(void *p, char) = &GTIFlagWin::`vector deleting destructor'; // weak
_UNKNOWN unk_9AE4C4; // weak
_UNKNOWN unk_9AE4C5; // weak
void (__thiscall *GTInformWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GTInformWin::`vftable'{for `NiNode'})(void *p, char) = &GTInformWin::`vector deleting destructor'; // weak
_UNKNOWN unk_9AE73A; // weak
_UNKNOWN unk_9AE73B; // weak
_UNKNOWN unk_9AE74E; // weak
_UNKNOWN unk_9AE74F; // weak
_UNKNOWN unk_9AE756; // weak
_UNKNOWN unk_9AE757; // weak
_UNKNOWN unk_9AE761; // weak
_UNKNOWN unk_9AE762; // weak
_UNKNOWN unk_9AE763; // weak
_UNKNOWN unk_9AE77A; // weak
_UNKNOWN unk_9AE77B; // weak
_UNKNOWN unk_9AE786; // weak
_UNKNOWN unk_9AE787; // weak
_UNKNOWN unk_9AE78E; // weak
_UNKNOWN unk_9AE78F; // weak
_UNKNOWN unk_9AE79A; // weak
void (__thiscall *GTStatusMiniWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GTStatusMiniWin::`vftable'{for `NiNode'})(void *p, char) = &GTStatusMiniWin::`vector deleting destructor'; // weak
void (__thiscall *GTStatusWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GTStatusWin::`vftable'{for `NiNode'})(void *p, char) = &GTStatusWin::`vector deleting destructor'; // weak
_UNKNOWN unk_9AEFE3; // weak
_UNKNOWN unk_9AEFEA; // weak
void (__thiscall *GTTDiceWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GTTDiceWin::`vftable'{for `NiNode'})(void *p, char) = &GTTDiceWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_9AF2CE; // weak
void (__thiscall *GTTSkillWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GTTSkillWin::`vftable'{for `NiNode'})(void *p, char) = &GTTSkillWin::`scalar deleting destructor'; // weak
void (__thiscall *GTTMiniSkillWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GTTMiniSkillWin::`vftable'{for `NiNode'})(void *p, char) = &GTTMiniSkillWin::`vector deleting destructor'; // weak
_UNKNOWN unk_9AF927; // weak
_UNKNOWN unk_9AF92E; // weak
_UNKNOWN unk_9AF92F; // weak
_UNKNOWN unk_9AF947; // weak
void (__thiscall *GuildTournamentBaseWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildTournamentBaseWin::`vftable'{for `NiNode'})(void *p, char) = &GuildTournamentBaseWin::`vector deleting destructor'; // weak
void (__thiscall *GTRequestListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GTRequestListWin::`vftable'{for `NiNode'})(void *p, char) = &GTRequestListWin::`vector deleting destructor'; // weak
_UNKNOWN unk_9B0297; // weak
_UNKNOWN unk_9B029E; // weak
_UNKNOWN unk_9B029F; // weak
_UNKNOWN unk_9B02A6; // weak
_UNKNOWN unk_9B02A7; // weak
_UNKNOWN unk_9B02B7; // weak
void (__thiscall *GuildTournamentScheduleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildTournamentScheduleWin::`vftable'{for `NiNode'})(void *p, char) = &GuildTournamentScheduleWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_9B0669; // weak
_UNKNOWN unk_9B066A; // weak
_UNKNOWN unk_9B066B; // weak
_UNKNOWN unk_9B0672; // weak
char byte_9B0673 = '\0'; // idb
void (__thiscall *GTStorageInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GTStorageInvWin::`vftable'{for `NiNode'})(void *p, char) = &GTStorageInvWin::`scalar deleting destructor'; // weak
void (__thiscall *GuildTournamentStorageWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildTournamentStorageWin::`vftable'{for `NiNode'})(void *p, char) = &GuildTournamentStorageWin::`vector deleting destructor'; // weak
void (__thiscall *ChatBoard::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ChatBoard::`vftable'{for `NiNode'})(void *p, char) = &ChatBoard::`scalar deleting destructor'; // weak
_UNKNOWN unk_9B0F0A; // weak
const char byte_9B0F0B = '\0'; // idb
_UNKNOWN unk_9B0F21; // weak
const char byte_9B0F22 = '\0'; // idb
_UNKNOWN unk_9B0F23; // weak
char byte_9B0F24[2] = { '\0', '\0' }; // idb
_UNKNOWN unk_9B0F26; // weak
char byte_9B0F28[4] = { '\0', '\0', '\0', '\0' }; // idb
void (__thiscall *ChatBoardFlex::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ChatBoardFlex::`vftable'{for `NiNode'})(void *p, char) = &ChatBoardFlex::`vector deleting destructor'; // weak
_UNKNOWN unk_9B11C2; // weak
char byte_9B11C3 = '\0'; // idb
char off_9B12C8[] = { '/', '%', 's', '\0' }; // idb
void (__thiscall *ChatDisplayWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ChatDisplayWin::`vftable'{for `NiNode'})(void *p, char) = &SysMsgDisplayWin::`vector deleting destructor'; // weak
_UNKNOWN unk_9B1682; // weak
char byte_9B1683 = '\0'; // idb
char byte_9B168A = '\0'; // idb
char byte_9B168B = '\0'; // idb
char str = '\0'; // idb
char byte_9B16CB = '\0'; // idb
char byte_9B16D9 = '\0'; // idb
char byte_9B16DA = '\0'; // idb
char byte_9B16DB = '\0'; // idb
_UNKNOWN unk_9B16EB; // weak
char off_9B18CC[] = { '/', '%', 's', '\0' }; // idb
char off_9B1900[] = { '/', '%', 's', '\0' }; // idb
void (__thiscall *ChatDisplayWin2::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ChatDisplayWin2::`vftable'{for `NiNode'})(void *p, char) = &ChatDisplayWin2::`vector deleting destructor'; // weak
_UNKNOWN unk_9B1DCE; // weak
char byte_9B1DCF = '\0'; // idb
char byte_9B1DE6 = '\0'; // idb
char byte_9B1DE7 = '\0'; // idb
char byte_9B1DEE = '\0'; // idb
_UNKNOWN unk_9B1DEF; // weak
_UNKNOWN unk_9B1DF9; // weak
_UNKNOWN unk_9B1DFA; // weak
_UNKNOWN unk_9B1DFB; // weak
void (__thiscall *KingdomQuestPlayerList::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *KingdomQuestPlayerList::`vftable'{for `NiNode'})(void *p, char) = &KingdomQuestPlayerList::`scalar deleting destructor'; // weak
void (__thiscall *KingdomQuestTeamList::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *KingdomQuestTeamList::`vftable'{for `NiNode'})(void *p, char) = &KingdomQuestTeamList::`vector deleting destructor'; // weak
void (__thiscall *KingdomQuestWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *KingdomQuestWin::`vftable'{for `NiNode'})(void *p, char) = &KingdomQuestWin::`vector deleting destructor'; // weak
_UNKNOWN unk_9B3076; // weak
void (__thiscall *KQuestTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *KQuestTimeWin::`vftable'{for `NiNode'})(void *p, char) = &KQuestTimeWin::`vector deleting destructor'; // weak
_UNKNOWN unk_9B3333; // weak
void *off_9B333C = (void *)0x6E7462; // weak
void (__thiscall *FlexDlgBtn::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *FlexDlgBtn::`vftable'{for `NiNode'})(void *p, char) = &FlexDlgBtn::`scalar deleting destructor'; // weak
void (__thiscall *TextBtn::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *TextBtn::`vftable'{for `NiNode'})(void *p, char) = &TextBtn::`vector deleting destructor'; // weak
void (__thiscall *AutoSizingDialogWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *AutoSizingDialogWin::`vftable'{for `NiNode'})(void *p, char) = &AutoSizingDialogWin::`vector deleting destructor'; // weak
void (__thiscall *SpeechBubbleDlgWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *SpeechBubbleDlgWin::`vftable'{for `NiNode'})(void *p, char) = &SpeechBubbleDlgWin::`vector deleting destructor'; // weak
void (__thiscall *DlgQuestListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *DlgQuestListWin::`vftable'{for `NiNode'})(void *p, char) = &DlgQuestListWin::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::`vftable')(void *p, char) = &NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::`scalar deleting destructor'; // weak
void (__thiscall *NpcDialogWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *NpcDialogWin::`vftable'{for `NiNode'})(void *p, char) = &NpcDialogWin::`vector deleting destructor'; // weak
int (__thiscall *NiTList<AutoSizingDialogWin::VirtualRect *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::`scalar deleting destructor'; // weak
void (__thiscall *NpcQuestWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *NpcQuestWin::`vftable'{for `NiNode'})(void *p, char) = &NpcQuestWin::`vector deleting destructor'; // weak
void (__thiscall *QuestFinishWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *QuestFinishWin::`vftable'{for `NiNode'})(void *p, char) = &QuestFinishWin::`scalar deleting destructor'; // weak
char byte_9B4C7E[2] = { '\0', '\0' }; // idb
void (__thiscall *QuestNewsWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *QuestNewsWin::`vftable'{for `NiNode'})(void *p, char) = &QuestNewsWin::`vector deleting destructor'; // weak
int (__stdcall *QuestPigeonEffect::`vftable'{for `IEffectDestroyMessenger'})(int) = &QuestPigeonEffect::`vector deleting destructor'; // weak
int (__thiscall *QuestPigeonEffect::`vftable'{for `NiRefObject'})(void *p, char) = &QuestPigeonEffect::`vector deleting destructor'; // weak
char byte_9B5005 = '\0'; // idb
char byte_9B5006 = '\0'; // idb
_UNKNOWN unk_9B5007; // weak
_UNKNOWN unk_9B500E; // weak
_UNKNOWN unk_9B500F; // weak
char byte_9B5022 = '\0'; // idb
char byte_9B5023 = '\0'; // idb
char byte_9B502A = '\0'; // idb
char byte_9B502B = '\0'; // idb
char byte_9B5032[2] = { '\0', '\0' }; // idb
void (__thiscall *QuestStartItemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *QuestStartItemWin::`vftable'{for `NiNode'})(void *p, char) = &QuestStartItemWin::`scalar deleting destructor'; // weak
char byte_9B5566 = '\0'; // idb
char byte_9B5567 = '\0'; // idb
char byte_9B5576 = '\0'; // idb
char byte_9B5577 = '\0'; // idb
_UNKNOWN unk_9B5581; // weak
_UNKNOWN unk_9B5582; // weak
_UNKNOWN unk_9B5583; // weak
char byte_9B558A = '\0'; // idb
char byte_9B558B = '\0'; // idb
char byte_9B5592 = '\0'; // idb
char byte_9B5593 = '\0'; // idb
char byte_9B559D = '\0'; // idb
char byte_9B559E = '\0'; // idb
char byte_9B559F = '\0'; // idb
char byte_9B55B1 = '\0'; // idb
char byte_9B55B2 = '\0'; // idb
char byte_9B55B3 = '\0'; // idb
char byte_9B55BB = '\0'; // idb
_UNKNOWN unk_9B55C5; // weak
_UNKNOWN unk_9B55C6; // weak
_UNKNOWN unk_9B55C7; // weak
char byte_9B55F6 = '\0'; // idb
char byte_9B55F7 = '\0'; // idb
char byte_9B5605 = '\0'; // idb
char byte_9B5606 = '\0'; // idb
char byte_9B5607 = '\0'; // idb
void (__thiscall *AutoRunBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *AutoRunBut::`vftable'{for `NiNode'})(void *p, char) = &AutoRunBut::`vector deleting destructor'; // weak
int (__thiscall *NiTArray<PgWinBut *>::`vftable')(void *p, char) = &NiTArray<PgWinBut *>::`vector deleting destructor'; // weak
void (__thiscall *EpicQuestWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *EpicQuestWin::`vftable'{for `NiNode'})(void *p, char) = &EpicQuestWin::`scalar deleting destructor'; // weak
void (__thiscall *CQuestWin2::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CQuestWin2::`vftable'{for `NiNode'})(void *p, char) = &CQuestWin2::`vector deleting destructor'; // weak
char byte_9B66FA[2] = { '\0', '\0' }; // idb
int (__stdcall *std::basic_ostream<char,std::char_traits<char>>::`vftable')(char) = &std::basic_ostream<char,std::char_traits<char>>::`vector deleting destructor'; // weak
int (__stdcall *std::basic_iostream<char,std::char_traits<char>>::`vftable')(char) = &std::basic_iostream<char,std::char_traits<char>>::`vector deleting destructor'; // weak
int (__thiscall *std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::`vftable')(void *p, char) = &std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::`vector deleting destructor'; // weak
int (__thiscall *std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::`vftable')(void *p, char) = &std::codecvt<char,char,int>::`vector deleting destructor'; // weak
int (__thiscall *std::numpunct<char>::`vftable')(void *p, char) = &std::numpunct<char>::`scalar deleting destructor'; // weak
int (__stdcall *std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::`vftable')(char) = &std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::`scalar deleting destructor'; // weak
_UNKNOWN std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::`vbtable'{for `std::basic_ostream<char,std::char_traits<char>>'}; // weak
_UNKNOWN std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::`vbtable'{for `std::basic_istream<char,std::char_traits<char>>'}; // weak
void (__thiscall *MonsterCardInventoryWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MonsterCardInventoryWin::`vftable'{for `NiNode'})(void *p, char) = &MonsterCardInventoryWin::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *>::`vftable')(void *p, char) = &NiTListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *>::`vftable')(void *p, char) = &NiTList<ICharDeadEvent *>::`scalar deleting destructor'; // weak
int (*ICharDeadEvent::`vftable')() = &_purecall; // weak
void (__thiscall *CharDeadEvent_LevelUp::`vftable')(CharDeadEvent_LevelUp *__hidden this) = &CharDeadEvent_LevelUp::OnDead; // weak
void (__thiscall *CharDeadEvent_DropItem::`vftable')(CharDeadEvent_DropItem *__hidden this) = &CharDeadEvent_DropItem::OnDead; // weak
void (__thiscall *CharDeadEvent_ExpGain::`vftable')(CharDeadEvent_ExpGain *__hidden this) = &CharDeadEvent_ExpGain::OnDead; // weak
void (__thiscall *CharDeadEvent_SomeoneLevelUp::`vftable')(CharDeadEvent_SomeoneLevelUp *__hidden this) = &CharDeadEvent_SomeoneLevelUp::OnDead; // weak
void (__thiscall *CharDeadEvent_InformWhoKilledMe::`vftable')(CharDeadEvent_InformWhoKilledMe *__hidden this) = &CharDeadEvent_InformWhoKilledMe::OnDead; // weak
int (__thiscall *NiTListBase<DFALL<MagicField *>,MagicField *>::`vftable')(void *p, char) = &NiTListBase<DFALL<MagicField *>,MagicField *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>::`vftable')(void *p, char) = &NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<MagicField *>,MagicField *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<MagicField *>,MagicField *>::`vector deleting destructor'; // weak
int (__thiscall *IEffectDestroyMessenger::`vftable')(void *p, char) = &AbStateInst::`scalar deleting destructor'; // weak
int (__thiscall *NiTList<IEffectDestroyMessenger *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>::`vector deleting destructor'; // weak
int (__thiscall *MagicField::`vftable')(void *p, char) = &MagicField::`vector deleting destructor'; // weak
char byte_9B6D80 = '\0'; // idb
char byte_9B6D81[7] = { '\0', '\0', '\0', '\0', '\0', '\0', '\0' }; // idb
int (__thiscall *MapNavigator::`vftable')(void *p, char) = &MapNavigator::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>::`vftable')(void *p, char) = &NiTListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>::`vftable')(void *p, char) = &NiTList<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>::`scalar deleting destructor'; // weak
int (__thiscall *ShortCutInvPosItem::`vftable')(void *p, char) = &ActorTextKeyMatch::`scalar deleting destructor'; // weak
int (__thiscall *ShortCutSkill::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ShortCutAction::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ShortCutSoulStone::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ShortCutItem::`vftable')(void *p, char) = &ShortCutItem::`scalar deleting destructor'; // weak
bool (__thiscall *ShortCutMgr::`vftable')(ShortCutMgr *this, struct SpStream *) = &ShortCutMgr::LoadOption; // weak
int (__thiscall *CharScreenBoardBase::`vftable')(void *p, char) = &CharScreenBoardBase::`scalar deleting destructor'; // weak
int (__thiscall *CharScreenBoardUserChar::`vftable')(void *p, char) = &CharScreenBoardUserChar::`vector deleting destructor'; // weak
int (__thiscall *CharScreenBoardDropItem::`vftable')(void *p, char) = &CharScreenBoardDropItem::`scalar deleting destructor'; // weak
int (__thiscall *CharScreenBoardMiniHouse::`vftable')(void *p, char) = &CharScreenBoardMiniHouse::`vector deleting destructor'; // weak
int (__thiscall *GuildBD::`vftable')(void *p, char) = &GuildBD::`vector deleting destructor'; // weak
int (__thiscall *IConBD::`vftable')(void *p, char) = &IConBD::`scalar deleting destructor'; // weak
int (__thiscall *NameBD::`vftable')(void *p, char) = &NameBD::`scalar deleting destructor'; // weak
int (__thiscall *PrivateStoreBD::`vftable')(void *p, char) = &PrivateStoreBD::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NameBD *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NameBD *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::`scalar deleting destructor'; // weak
int (__thiscall *PgTList<SpeechBD *>::`vftable')(void *p, char) = &PgTList<SpeechBD *>::`scalar deleting destructor'; // weak
int (__thiscall *PgTList<NameBD *>::`vftable')(void *p, char) = &PgTList<NameBD *>::`scalar deleting destructor'; // weak
int (__thiscall *PgTList<CharScreenBoardBase *>::`vftable')(void *p, char) = &PgTList<CharScreenBoardBase *>::`scalar deleting destructor'; // weak
int (__thiscall *PgTList<PrivateStoreBD *>::`vftable')(void *p, char) = &PgTList<PrivateStoreBD *>::`scalar deleting destructor'; // weak
int (__thiscall *PgTList<GuildBD *>::`vftable')(void *p, char) = &PgTList<GuildBD *>::`scalar deleting destructor'; // weak
int (__thiscall *ScreenBoardGeometry::`vftable')(void *p, char) = &ScreenBoardGeometry::`vector deleting destructor'; // weak
_UNKNOWN unk_9B7121; // weak
_UNKNOWN unk_9B7122; // weak
int (__thiscall *ScreenBoardTexture::DescInfo::`vftable')(void *p, char) = &ScreenBoardTexture::DescInfo::`scalar deleting destructor'; // weak
struct tagSIZE (__thiscall *ScreenBoardTexture::`vftable')(ScreenBoardTexture *this, const char *) = &ScreenBoardTexture::GetTextRenderSize; // weak
struct tagSIZE (__thiscall *FrameScreenBoardTexture::`vftable')(ScreenBoardTexture *this, const char *) = &ScreenBoardTexture::GetTextRenderSize; // weak
int (__thiscall *SpeechBD::`vftable')(void *p, char) = &SpeechBD::`vector deleting destructor'; // weak
_UNKNOWN unk_9B71F0; // weak
_UNKNOWN unk_9B7204; // weak
_UNKNOWN unk_9B7228; // weak
void (__thiscall *GMCommandWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GMCommandWin::`vftable'{for `NiNode'})(void *p, char) = &GMCommandWin::`scalar deleting destructor'; // weak
void (__thiscall *GMPrisonWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GMPrisonWin::`vftable'{for `NiNode'})(void *p, char) = &GMPrisonWin::`scalar deleting destructor'; // weak
void (__thiscall *LinkFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
void (__thiscall *LoadingFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ITimer::`vftable')(void *p, char) = &FrameWorkTimer::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<DFALL<ITimer *>,ITimer *>::`vftable')(void *p, char) = &NiTListBase<DFALL<ITimer *>,ITimer *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<ITimer *>,ITimer *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<ITimer *>,ITimer *>::`vector deleting destructor'; // weak
int (__thiscall *FrameWorkTimer::`vftable')(void *p, char) = &FrameWorkTimer::`scalar deleting destructor'; // weak
void (__thiscall *CHairShopFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
void (__thiscall *CHairShopOkCancelWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CHairShopOkCancelWin::`vftable'{for `NiNode'})(void *p, char) = &CHairShopOkCancelWin::`vector deleting destructor'; // weak
void (__thiscall *CHairShopViewCtrlWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CHairShopViewCtrlWin::`vftable'{for `NiNode'})(void *p, char) = &CHairShopViewCtrlWin::`scalar deleting destructor'; // weak
void (__thiscall *CColorIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CColorIcon::`vftable'{for `NiNode'})(void *p, char) = &CColorIcon::`scalar deleting destructor'; // weak
void (__thiscall *CHairShopwin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CHairShopwin::`vftable'{for `NiNode'})(void *p, char) = &CHairShopwin::`scalar deleting destructor'; // weak
char off_9B8788[] = { 'B', 'o', 'w', '\0' }; // idb
char off_9B87B0[] = { 'A', 'x', 'e', '\0' }; // idb
char off_9B87B4[] = { 'H', 'o', 'e', '\0' }; // idb
char off_9B87EC[] = { 'A', 'l', 'l', '\0' }; // idb
char off_9B87F4[] = { 'H', 'o', 'e', '\0' }; // idb
char off_9B87F8[] = { 'A', 'x', 'e', '\0' }; // idb
int (__thiscall *ActionInfoSet::`vftable')(void *p, char) = &ActionInfoSet::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *>::`vftable')(void *p, char) = &NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTMap<unsigned long,ActionInfoSet *>::`vftable')(void *p, char) = &NiTMap<unsigned long,ActionInfoSet *>::`scalar deleting destructor'; // weak
_UNKNOWN unk_9B89AC; // weak
char pText[] = { '#', 'A', 'R', '\0' }; // idb
void (__thiscall *ActorCallBack::`vftable'[2])(ActorCallBack *this, struct NiActorManager *, NiActorManager *pkManager, float eEventCode, float) = { &ActorCallBack::AnimActivated, &ActorCallBack::AnimDeactivated }; // weak
int (__thiscall *NiTextKeyMatch::`vftable')(void *p, char) = &ActorTextKeyMatch::`scalar deleting destructor'; // weak
int (__thiscall *ActorTextKeyMatch::`vftable')(void *p, char) = &ActorTextKeyMatch::`scalar deleting destructor'; // weak
_UNKNOWN unk_9B8A00; // weak
int (__thiscall *NiTListBase<DFALL<AttackSequence *>,AttackSequence *>::`vftable')(void *p, char) = &NiTListBase<DFALL<AttackSequence *>,AttackSequence *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<DFALL<SkillSequence *>,SkillSequence *>::`vftable')(void *p, char) = &NiTListBase<DFALL<SkillSequence *>,SkillSequence *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<AttackSequence *>,AttackSequence *>::`vftable')(void *p, char) = &NiTList<AttackSequence *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<SkillSequence *>,SkillSequence *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<SkillSequence *>,SkillSequence *>::`vector deleting destructor'; // weak
int (__thiscall *NiTList<AttackSequence *>::`vftable')(void *p, char) = &NiTList<AttackSequence *>::`vector deleting destructor'; // weak
int (__thiscall *NiTList<SkillSequence *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<SkillSequence *>,SkillSequence *>::`vector deleting destructor'; // weak
int (*AttackSequenceManager::`vftable'[6])() = { &_purecall, &_purecall, &_purecall, &_purecall, &_purecall, &_purecall }; // weak
struct NiActorManager *(__thiscall *Avatar::`vftable'{for `AttackSequenceManager'})(Char *__hidden this) = &Char::GetActor; // weak
int (__stdcall *Avatar::`vftable'{for `IEffectHolder'})(int) = &Avatar::`vector deleting destructor'; // weak
void (__thiscall *Avatar::`vftable'{for `AbStateInfectee'}[2])(Char *this, AbStateInst *pkAbState, bool bNoVisual) = { &Char::Affect, &Char::Deaffect }; // weak
enum Ns_TourScene::TS_RESULT (__thiscall *Ns_TourScene::`vftable')(Ns_TourScene *this, NiAVObject *_pkObject, void *) = &Ns_TourScene::ProcessData; // weak
enum Ns_TourScene::TS_RESULT (__thiscall *LODNodeInActivate::`vftable')(LODNodeInActivate *this, struct NiAVObject *fNear, void *) = &LODNodeInActivate::ProcessData; // weak
int (__thiscall *NiTListBase<DFALL<AbStateInst *>,AbStateInst *>::`vftable')(void *p, char) = &NiTListBase<DFALL<AbStateInst *>,AbStateInst *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<AbStateInst *>,AbStateInst *>::`vftable')(void *p, char) = &NiTList<AbStateInst *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTList<AbStateInst *>::`vftable')(void *p, char) = &NiTList<AbStateInst *>::`scalar deleting destructor'; // weak
void (__thiscall *AbStateInfectee::`vftable'[2])(AbStateInfectee *this, struct AbStateInst *nValue, bool bNoVisual) = { &AbStateInfectee::Affect, &AbStateInfectee::Deaffect }; // weak
int (__thiscall *AbStateInst::`vftable')(void *p, char) = &AbStateInst::`scalar deleting destructor'; // weak
char byte_9B8E82 = '\0'; // idb
_UNKNOWN unk_9B8E83; // weak
char off_9B8E84[] = { '#', 'E', 'F', '\0' }; // idb
void *off_9B8ED8 = &loc_746948; // weak
void *off_9B9048 = &loc_746948; // weak
enum Ns_TourScene::TS_RESULT (__thiscall *NsFindObjectByName::`vftable')(NsFindObjectByName *this, NiAVObject *_pkObject, void *) = &NsFindObjectByName::ProcessData; // weak
struct NiActorManager *(__thiscall *Char::`vftable'{for `AttackSequenceManager'})(Char *__hidden this) = &Char::GetActor; // weak
int (__stdcall *Char::`vftable'{for `IEffectHolder'})(int) = &Char::`vector deleting destructor'; // weak
void (__thiscall *Char::`vftable'{for `AbStateInfectee'}[2])(Char *this, AbStateInst *pkAbState, bool bNoVisual) = { &Char::Affect, &Char::Deaffect }; // weak
_UNKNOWN unk_9B9568; // weak
_UNKNOWN unk_9B956C; // weak
_UNKNOWN unk_9B9580; // weak
char off_9B9668[] = { '#', 'E', 'F', '\0' }; // idb
int (__thiscall *NiTArray<NiNode *>::`vftable')(void *p, char) = &NiTArray<NiNode *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTArray<NiGeometry *>::`vftable')(void *p, char) = &NiTArray<NiGeometry *>::`scalar deleting destructor'; // weak
enum Ns_TourScene::TS_RESULT (__thiscall *FindChildGeometry::`vftable')(FindChildGeometry *this, NiGeometry *pGeome, void *) = &FindChildGeometry::ProcessData; // weak
enum Ns_TourScene::TS_RESULT (__thiscall *Find_EF_ExtraData::`vftable')(Find_EF_ExtraData *this, NiAVObject *_pkObject, void *) = &Find_EF_ExtraData::ProcessData; // weak
int (__thiscall *CSpactralGlow_Shader_Controller::`vftable')(void *p, char) = &CSpactralGlow_Shader_Controller::`scalar deleting destructor'; // weak
int (__thiscall *CarToonShader::`vftable')(void *p, char) = &CarToonShader::`vector deleting destructor'; // weak
void (__thiscall *ActionMgr::`vftable'[2])(ActionMgr *this, struct NiActorManager *, unsigned __int16 *usStrips, const unsigned __int16 **pusStripLengths, float) = { &ActionMgr::EndOfSequence, &ActionMgr::EndOfSequence }; // weak
_UNKNOWN unk_9B98E4; // weak
_UNKNOWN unk_9B98E5; // weak
char byte_9B98E6[2] = { '\0', '\0' }; // idb
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,Char *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,Char *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,Char *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,Char *>::`vector deleting destructor'; // weak
int (__thiscall *PgTList<Char *>::`vftable')(void *p, char) = &PgTList<Char *>::`vector deleting destructor'; // weak
_UNKNOWN unk_9B99B6; // weak
_UNKNOWN unk_9B99B7; // weak
_UNKNOWN unk_9B99D5; // weak
_UNKNOWN unk_9B99D6; // weak
int (__thiscall *NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>::`vftable')(void *p, char) = &NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<DFALL<NiPointer<CharSet>>,unsigned long,NiPointer<CharSet>>::`vftable')(void *p, char) = &NiTMapBase<DFALL<NiPointer<CharSet>>,unsigned long,NiPointer<CharSet>>::`vector deleting destructor'; // weak
int (__thiscall *NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::`vftable')(void *p, char) = &NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::`vector deleting destructor'; // weak
int (__thiscall *NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned char,NiPointer<NiNode>>::`vftable')(void *p, char) = &NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned char,NiPointer<NiNode>>::`vector deleting destructor'; // weak
int (__thiscall *NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>::`vftable')(void *p, char) = &NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>::`vector deleting destructor'; // weak
enum Ns_TourScene::TS_RESULT (__thiscall *ResetTexture::`vftable')(ResetTexture *this, NiAVObject *_pkObject, void *) = &ResetTexture::ProcessData; // weak
enum Ns_TourScene::TS_RESULT (__thiscall *BonePartitionReCreate::`vftable')(BonePartitionReCreate *this, NiAVObject *_pkObject, void *) = &BonePartitionReCreate::ProcessData; // weak
int (__thiscall *NiTMap<unsigned long,NiPointer<NiActorManager>>::`vftable')(void *p, char) = &NiTMap<unsigned long,NiPointer<NiActorManager>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTMap<unsigned long,NiPointer<CharSet>>::`vftable')(void *p, char) = &NiTMap<unsigned long,NiPointer<CharSet>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTMap<unsigned long,NiPointer<NiNode>>::`vftable')(void *p, char) = &NiTMap<unsigned long,NiPointer<NiNode>>::`vector deleting destructor'; // weak
int (__thiscall *NiTMap<unsigned char,NiPointer<NiNode>>::`vftable')(void *p, char) = &NiTMap<unsigned char,NiPointer<NiNode>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTMap<unsigned long,NiPointer<NiSourceTexture>>::`vftable')(void *p, char) = &NiTMap<unsigned long,NiPointer<NiSourceTexture>>::`vector deleting destructor'; // weak
int (__thiscall *CharSet::`vftable')(void *p, char) = &CharSet::`scalar deleting destructor'; // weak
char off_9BA1B0[] = { '#', '%', 's', '\0' }; // idb
_UNKNOWN unk_9BA1B4; // weak
char off_9BA1F8[] = { 'W', 'U', 'P', '\0' }; // idb
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::`vector deleting destructor'; // weak
enum Ns_TourScene::TS_RESULT (__thiscall *FindFaceNode::`vftable')(FindFaceNode *this, NiAVObject *_pkObject, void *) = &FindFaceNode::ProcessData; // weak
enum Ns_TourScene::TS_RESULT (__thiscall *FindHairNode::`vftable')(FindHairNode *this, NiAVObject *_pkObject, void *) = &FindHairNode::ProcessData; // weak
enum Ns_TourScene::TS_RESULT (__thiscall *FindGeometry::`vftable')(FindGeometry *this, NiAVObject *_pkObject, void *) = &FindGeometry::ProcessData; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::`scalar deleting destructor'; // weak
int (__thiscall *NiSkinInstance::`vftable')(void *p, char) = &NiSkinInstance::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerList<NiGeometry *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::`scalar deleting destructor'; // weak
int (__thiscall *PgTList<NiGeometry *>::`vftable')(void *p, char) = &PgTList<NiGeometry *>::`vector deleting destructor'; // weak
int (__thiscall *CharShape::`vftable')(void *p, char) = &CharShape::`vector deleting destructor'; // weak
enum Ns_TourScene::TS_RESULT (__thiscall *FindBoneNode::`vftable')(FindBoneNode *this, NiAVObject *_pkObject, void *) = &FindBoneNode::ProcessData; // weak
void *off_9BA2F8 = &loc_444323; // weak
struct NiActorManager *(__thiscall *MainChar::`vftable'{for `AttackSequenceManager'})(Char *__hidden this) = &Char::GetActor; // weak
_UNKNOWN unk_9BA3CA; // weak
int (__stdcall *MainChar::`vftable'{for `IEffectHolder'})(int) = &MainChar::`vector deleting destructor'; // weak
void (__thiscall *MainChar::`vftable'{for `AbStateInfectee'})(MainChar *this, AbStateInst *pkAbState, bool) = &MainChar::Affect; // weak
_UNKNOWN unk_9BA3DE; // weak
void *off_9BA7C6 = &loc_666C61; // weak
int (__thiscall *Ns_XYFlatMoveToTarget::`vftable')(void *p, char) = &Ns_XYFlatMoveToTarget::`vector deleting destructor'; // weak
int (__thiscall *MoveToTarget::`vftable')(void *p, char) = &Ns_XYFlatMoveToTarget::`vector deleting destructor'; // weak
struct NiActorManager *(__thiscall *ObjectChar::`vftable'{for `AttackSequenceManager'})(Char *__hidden this) = &Char::GetActor; // weak
int (__stdcall *ObjectChar::`vftable'{for `IEffectHolder'})(int) = &ObjectChar::`vector deleting destructor'; // weak
void (__thiscall *ObjectChar::`vftable'{for `AbStateInfectee'}[2])(Char *this, AbStateInst *pkAbState, bool bNoVisual) = { &Char::Affect, &Char::Deaffect }; // weak
_UNKNOWN unk_9BAB9A; // weak
int (__thiscall *NiTListBase<DFALL<NiPointer<NiTexture>>,NiPointer<NiTexture>>::`vftable')(void *p, char) = &NiTListBase<DFALL<NiPointer<NiTexture>>,NiPointer<NiTexture>>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<NiPointer<NiTexture>>,NiPointer<NiTexture>>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<NiPointer<NiTexture>>,NiPointer<NiTexture>>::`scalar deleting destructor'; // weak
char off_9BACEC[] = { 'R', 'o', 'u', '\0' }; // idb
int (__thiscall *NiTListBase<DFALL<int>,int>::`vftable')(void *p, char) = &NiTListBase<DFALL<int>,int>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<int>,int>::`vftable')(void *p, char) = &NiTList<int>::`vector deleting destructor'; // weak
int (__thiscall *NiTList<int>::`vftable')(void *p, char) = &NiTList<int>::`vector deleting destructor'; // weak
int (__thiscall *ItemAuthority::`vftable')(void *p, char) = &ItemAuthority::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode>>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture>>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture>>::`scalar deleting destructor'; // weak
int (__thiscall *DropItem::`vftable')(void *p, char) = &DropItem::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,DropItem *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,DropItem *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerMap<char const *,NiPointer<NiNode>>::`vftable')(void *p, char) = &NiTPointerMap<char const *,NiPointer<NiNode>>::`vector deleting destructor'; // weak
int (__thiscall *NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiNode>>,NiPointer<NiNode>>::`vftable')(void *p, char) = &NiTStringPointerMap<NiPointer<NiNode>>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerMap<char const *,NiPointer<NiSourceTexture>>::`vftable')(void *p, char) = &NiTPointerMap<char const *,NiPointer<NiSourceTexture>>::`vector deleting destructor'; // weak
int (__thiscall *NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSourceTexture>>,NiPointer<NiSourceTexture>>::`vftable')(void *p, char) = &NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSourceTexture>>,NiPointer<NiSourceTexture>>::`scalar deleting destructor'; // weak
int (__thiscall *PgTList<DropItem *>::`vftable')(void *p, char) = &PgTList<DropItem *>::`vector deleting destructor'; // weak
int (__thiscall *NiTStringPointerMap<NiPointer<NiNode>>::`vftable')(void *p, char) = &NiTStringPointerMap<NiPointer<NiNode>>::`vector deleting destructor'; // weak
int (__thiscall *NiTStringPointerMap<NiPointer<NiSourceTexture>>::`vftable')(void *p, char) = &NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSourceTexture>>,NiPointer<NiSourceTexture>>::`scalar deleting destructor'; // weak
enum Ns_TourScene::TS_RESULT (__thiscall *NsFindGeometry::`vftable')(NsFindGeometry *this, NiAVObject *_pkObject, void *) = &NsFindGeometry::ProcessData; // weak
int (__thiscall *DynaminUV::`vftable')(void *p, char) = &DynaminUV::`scalar deleting destructor'; // weak
_UNKNOWN unk_9BAF82; // weak
bool (__thiscall *off_9BAF8C[2])(NiD3DShader *__hidden this) = { &NiD3DShader::GetVSPresentAnyPass, &NiD3DShader::GetPSPresentAllPasses }; // weak
_UNKNOWN unk_9BAF96; // weak
int (__thiscall *Item::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemByteLot::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemWordLot::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemDwrdLot::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemQuest::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemAmulet::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemWeapon::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemCostumeWeapon::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemArmor::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemShield::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
_UNKNOWN unk_9BB36A; // weak
int (__thiscall *ItemCostumeShield::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
_UNKNOWN unk_9BB37E; // weak
int (__thiscall *ItemBoot::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemFurniture::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemDecoration::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemSkillScroll::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemRecallScroll::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemUpgradeSource::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemBind::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemChest::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemGBCoin::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemCapsule::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemEnchant::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemWeaponTitleLicense::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
_UNKNOWN unk_9BB752; // weak
unsigned int (__thiscall *off_9BB75C)(Item *__hidden this) = &Item::GetMaxLot; // weak
_UNKNOWN unk_9BB766; // weak
int (__thiscall *ItemKQ::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemHouseSkin::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemUpRed::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemUpBlue::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemKQStep::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemFeed::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemRiding::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemAmount::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemUpGold::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemChargedAction::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemCollectCloseCard::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemCollectOpenCard::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
_UNKNOWN unk_9BBB3A; // weak
unsigned int (__thiscall *off_9BBB44)(ItemCollectCloseCard *__hidden this) = &ItemCollectCloseCard::GetSerialNumber; // weak
_UNKNOWN unk_9BBB4E; // weak
int (__thiscall *ItemNoEffect::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemActiveskill::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemPet::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *ItemBracelet::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
_UNKNOWN unk_9BBCC1; // weak
_UNKNOWN unk_9BBCC2; // weak
void (__thiscall *ItemRepairWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ItemRepairWin::`vftable'{for `NiNode'})(void *p, char) = &ItemRepairWin::`vector deleting destructor'; // weak
void (__thiscall *ItemRepairTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ItemRepairTask::`vftable'{for `NiRefObject'})(void *p, char) = &ItemRepairTask::`scalar deleting destructor'; // weak
int (__thiscall *Singleton<FadeObjectMgr>::`vftable')(void *p, char) = &Singleton<FadeObjectMgr>::`scalar deleting destructor'; // weak
int (__thiscall *NiTArray<FadeObject *>::`vftable')(void *p, char) = &NiTArray<FadeObject *>::`scalar deleting destructor'; // weak
int (__thiscall *FadeObjectMgr::`vftable')(void *p, char) = &FadeObjectMgr::`scalar deleting destructor'; // weak
void *off_9BC09C = &loc_676F46; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::`vector deleting destructor'; // weak
int (__thiscall *PgTList<NiTimeController *>::`vftable')(void *p, char) = &PgTList<NiTimeController *>::`vector deleting destructor'; // weak
int (__thiscall *LightFogCtrl::`vftable')(void *p, char) = &LightFogCtrl::`scalar deleting destructor'; // weak
int (__thiscall *CMagicCircleController::`vftable')(void *p, char) = &CMagicCircleController::`scalar deleting destructor'; // weak
int (__thiscall *Shadow::`vftable')(void *p, char) = &Shadow::`vector deleting destructor'; // weak
int (__thiscall *SkyCtrl::`vftable')(void *p, char) = &SkyCtrl::`scalar deleting destructor'; // weak
int (__thiscall *NiAccumulator::`vftable')(void *p, char) = &NiAccumulator::`vector deleting destructor'; // weak
int (__thiscall *NsPathFinding::`vftable')(void *p, char) = &NsPathFinding::`vector deleting destructor'; // weak
int (__thiscall *InstantBlock::`vftable')(void *p, char) = &InstantBlock::`scalar deleting destructor'; // weak
int (__thiscall *stGlobalLightInfo::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *NiTArray<NiPointer<NiNode>>::`vftable')(void *p, char) = &NiTArray<NiPointer<NiNode>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTextureAccumulator::`vftable')(void *p, char) = &NiTextureAccumulator::`vector deleting destructor'; // weak
char inTwo[] = { 'F', 'o', 'g', '\0' }; // idb
void *off_9BC4A0 = &loc_756F52; // weak
void *off_9BC4A4 = &loc_646C45; // weak
void *off_9BC4B0 = (void *)0x677255; // weak
void *off_9BC4B4 = &loc_6C6441; // weak
char off_9BC4C0[] = { 'i', 'n', 'i', '\0' }; // idb
void *off_9BC4FC = (void *)0x796B53; // weak
void *off_9BC584 = &loc_676F46; // weak
void *off_9BC5F8 = &loc_444323; // weak
char off_9BC664[] = { 's', 'b', 'i', '\0' }; // idb
char off_9BC668[] = { 'a', 'i', 'd', '\0' }; // idb
char off_9BC684[] = { 'i', 'd', 'm', '\0' }; // idb
char pkExt[] = { 'n', 'i', 'f', '\0' }; // idb
enum Ns_TourScene::TS_RESULT (__thiscall *FindMultiMNode::`vftable')(FindMultiMNode *this, NiAVObject *_pkObject, void *) = &FindMultiMNode::ProcessData; // weak
enum Ns_TourScene::TS_RESULT (__thiscall *FindMultiCDNode::`vftable')(FindMultiCDNode *this, NiAVObject *_pkObject, void *) = &FindMultiCDNode::ProcessData; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture>>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerMap<char const *,NiPointer<NiTexture>>::`vftable')(void *p, char) = &NiTPointerMap<char const *,NiPointer<NiTexture>>::`vector deleting destructor'; // weak
int (__thiscall *NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexture>>,NiPointer<NiTexture>>::`vftable')(void *p, char) = &NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexture>>,NiPointer<NiTexture>>::`vector deleting destructor'; // weak
int (__thiscall *NiTStringPointerMap<NiPointer<NiTexture>>::`vftable')(void *p, char) = &NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexture>>,NiPointer<NiTexture>>::`vector deleting destructor'; // weak
int (__thiscall *NiDefaultTexturePalette::`vftable')(void *p, char) = &NiDefaultTexturePalette::`scalar deleting destructor'; // weak
void (__thiscall *NsMakeBlockInfo_Byte::`vftable')(NsMakeBlockInfo_Byte *this, unsigned int _uiMapSize, unsigned int _uiSplitCnt, float _fTileLength) = &NsMakeBlockInfo_Byte::SetBlockData; // weak
enum Ns_TourScene::TS_RESULT (__thiscall *FindCullUpdateNode::`vftable')(FindCullUpdateNode *this, struct NiAVObject *fNodeRadius, void *) = &FindCullUpdateNode::ProcessData; // weak
char byte_9BC8E9[3] = { '\0', '\0', '\0' }; // idb
int (*CVirtualServer::IProtoStruct::`vftable'[12])() =
{
  &_purecall,
  &_purecall,
  &_purecall,
  &_purecall,
  &_purecall,
  &_purecall,
  &_purecall,
  &_purecall,
  &_purecall,
  &_purecall,
  &_purecall,
  &_purecall
}; // weak
int (__stdcall *CVirtualServer::ProtoStruct<PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD>::`vftable'[2])(float _fRecordTime) =
{
  &CVirtualServer::ProtoStruct<PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD>::SetRecordTime,
  &CVirtualServer::ProtoStruct<PROTO_NC_BAT_SOMEONEBASH_HIT_CMD>::SetRunTime
}; // weak
int (__stdcall *CVirtualServer::ProtoStruct<PROTO_NC_BAT_SOMEONEBASH_HIT_CMD>::`vftable'[2])(float _fRecordTime) =
{
  &CVirtualServer::ProtoStruct<PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD>::SetRecordTime,
  &CVirtualServer::ProtoStruct<PROTO_NC_BAT_SOMEONEBASH_HIT_CMD>::SetRunTime
}; // weak
char off_9BCA5C[] = { 'o', 'f', 'f', '\0' }; // idb
int (__stdcall *AfterImgEff::`vftable'{for `IEffectDestroyMessenger'})(int) = &AfterImgEff::`vector deleting destructor'; // weak
int (__thiscall *AfterImgEff::`vftable'{for `NiRefObject'})(void *p, char) = &AfterImgEff::`scalar deleting destructor'; // weak
int (__thiscall *NiStencilProperty::`vftable')(void *p, char) = &NiStencilProperty::`vector deleting destructor'; // weak
int (__thiscall *AfterImgShape::`vftable')(void *p, char) = &AfterImgShape::`vector deleting destructor'; // weak
int (__thiscall *AfterImgShape0::`vftable')(void *p, char) = &AfterImgShape0::`vector deleting destructor'; // weak
int (__thiscall *AfterImgShape1::`vftable')(void *p, char) = &AfterImgShape1::`vector deleting destructor'; // weak
int (__stdcall *ArrowEff::`vftable'{for `IEffectDestroyMessenger'})(int) = &ArrowEff::`vector deleting destructor'; // weak
int (__thiscall *ArrowEff::`vftable'{for `NiRefObject'})(void *p, char) = &ArrowEff::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<DFALL<AttachEff *>,AttachEff *>::`vftable')(void *p, char) = &NiTListBase<DFALL<AttachEff *>,AttachEff *>::`vector deleting destructor'; // weak
int (__stdcall *AttachEff::`vftable'{for `IEffectDestroyMessenger'})(int) = &AttachEff::`vector deleting destructor'; // weak
int (__thiscall *AttachEff::`vftable'{for `NiRefObject'})(void *p, char) = &AttachEff::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<AttachEff *>,AttachEff *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<AttachEff *>,AttachEff *>::`vector deleting destructor'; // weak
int (__thiscall *NiTList<AttachEff *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<AttachEff *>,AttachEff *>::`vector deleting destructor'; // weak
int (__thiscall *IEffectHolder::`vftable')(void *p, char) = &IEffectHolder::`vector deleting destructor'; // weak
char byte_9BCF1F = '\0'; // idb
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::`vector deleting destructor'; // weak
int (__thiscall *CDecalEffect::`vftable')(void *p, char) = &CDecalEffect::`vector deleting destructor'; // weak
int (__thiscall *PgTList<NiPointer<Effect>>::`vftable')(void *p, char) = &PgTList<NiPointer<Effect>>::`vector deleting destructor'; // weak
int (__stdcall *Effect::`vftable'{for `IEffectDestroyMessenger'})(int) = &Effect::`vector deleting destructor'; // weak
int (__thiscall *Effect::`vftable'{for `NiRefObject'})(void *p, char) = &Effect::`vector deleting destructor'; // weak
int (__thiscall *NiTArray<NiTimeController *>::`vftable')(void *p, char) = &NiTArray<NiTimeController *>::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<DFALL<CharDecal *>,CharDecal *>::`vftable')(void *p, char) = &NiTListBase<DFALL<CharDecal *>,CharDecal *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<CharDecal *>,CharDecal *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<CharDecal *>,CharDecal *>::`vector deleting destructor'; // weak
int (__thiscall *EffectCtrl::`vftable')(void *p, char) = &EffectCtrl::`vector deleting destructor'; // weak
enum Ns_TourScene::TS_RESULT (__thiscall *FindDecalGeometry::`vftable')(FindDecalGeometry *this, NiAVObject *_pkObject, void *) = &FindDecalGeometry::ProcessData; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTList<CharDecal *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<CharDecal *>,CharDecal *>::`vector deleting destructor'; // weak
int (__thiscall *CharDecal::`vftable')(void *p, char) = &CharDecal::`vector deleting destructor'; // weak
int (__thiscall *PgTList<CharDecal *>::`vftable')(void *p, char) = &PgTList<CharDecal *>::`vector deleting destructor'; // weak
int (__thiscall *DecalMgr::`vftable')(void *p, char) = &DecalMgr::`scalar deleting destructor'; // weak
void *off_9BD0E0 = &loc_746948; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<DFALL<Effect *>,Effect *>::`vftable')(void *p, char) = &NiTListBase<DFALL<Effect *>,Effect *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,Effect *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,Effect *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<Effect *>,Effect *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<Effect *>,Effect *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTList<Effect *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<Effect *>,Effect *>::`scalar deleting destructor'; // weak
int (__thiscall *PgTList<Effect *>::`vftable')(void *p, char) = &PgTList<Effect *>::`vector deleting destructor'; // weak
int (__stdcall *ExpEffect::`vftable'{for `IEffectDestroyMessenger'})(int) = &ExpEffect::`vector deleting destructor'; // weak
int (__thiscall *ExpEffect::`vftable'{for `NiRefObject'})(void *p, char) = &ExpEffect::`vector deleting destructor'; // weak
int (__stdcall *StretchEffect::`vftable'{for `IEffectDestroyMessenger'})(int) = &StretchEffect::`vector deleting destructor'; // weak
int (__thiscall *StretchEffect::`vftable'{for `NiRefObject'})(void *p, char) = &StretchEffect::`scalar deleting destructor'; // weak
int (__stdcall *WeddingEffect::`vftable'{for `IEffectDestroyMessenger'})(int) = &WeddingEffect::`vector deleting destructor'; // weak
int (__thiscall *WeddingEffect::`vftable'{for `NiRefObject'})(void *p, char) = &WeddingEffect::`vector deleting destructor'; // weak
int (__thiscall *TextEff::`vftable')(void *p, char) = &TextEff::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,TextEff *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,TextEff *>::`vector deleting destructor'; // weak
int (__thiscall *PgTList<TextEff *>::`vftable')(void *p, char) = &PgTList<TextEff *>::`vector deleting destructor'; // weak
int (__thiscall *CBlindEffect::`vftable')(void *p, char) = &CBlindEffect::`vector deleting destructor'; // weak
int (__thiscall *CameraEffect::`vftable')(void *p, char) = &CameraEffect::`scalar deleting destructor'; // weak
int (__stdcall *ClientEffect::`vftable'{for `IEffectDestroyMessenger'})(int) = &ClientEffect::`vector deleting destructor'; // weak
int (__thiscall *ClientEffect::`vftable'{for `NiRefObject'})(void *p, char) = &ClientEffect::`vector deleting destructor'; // weak
int (__stdcall *LookAtEffect::`vftable'{for `IEffectDestroyMessenger'})(int) = &LookAtEffect::`vector deleting destructor'; // weak
int (__thiscall *LookAtEffect::`vftable'{for `NiRefObject'})(void *p, char) = &LookAtEffect::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<DFALL<SoundGroup *>,SoundGroup *>::`vftable')(void *p, char) = &NiTListBase<DFALL<SoundGroup *>,SoundGroup *>::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *>::`vftable')(void *p, char) = &NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<SoundGroup *>,SoundGroup *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<SoundGroup *>,SoundGroup *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<NiAudioSource *>,NiAudioSource *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<NiAudioSource *>,NiAudioSource *>::`vector deleting destructor'; // weak
int (__thiscall *NiTList<NiAudioSource *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<NiAudioSource *>,NiAudioSource *>::`vector deleting destructor'; // weak
int (__stdcall *SoundGroup::`vftable')(NiPointer<NiAudioSource> *result, unsigned int uiType) = &SoundGroup::CreateSource; // weak
int (__stdcall *SoundGroupStatic::`vftable')(NiPointer<NiAudioSource> *result, unsigned int uiType) = &SoundGroup::CreateSource; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,void *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,void *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`vftable')(void *p, char) = &NiTListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *>::`vftable')(void *p, char) = &NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *>::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>::`vftable')(void *p, char) = &NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,void *>::`vftable')(void *p, char) = &SpTList<void *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`vector deleting destructor'; // weak
int (__cdecl *ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__thiscall *NiTPointerListBase<DFALL<IAmbientArea *>,IAmbientArea *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<IAmbientArea *>,IAmbientArea *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>::`vector deleting destructor'; // weak
int (__stdcall *SoundGroupBgm::`vftable')(NiPointer<NiAudioSource> *result, unsigned int uiType) = &SoundGroup::CreateSource; // weak
int (__cdecl *MapAmbienceSoundInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
bool (__thiscall *CircleAmbientArea::`vftable')(CircleAmbientArea *this, float dy, float) = &CircleAmbientArea::IsInside; // weak
int (__thiscall *SoundGroupAmbient::`vftable'{for `IAmbientSoundManager'})(SoundGroupAmbient *this, struct IAmbientArea *) = &SoundGroupAmbient::OnEnterArea; // weak
int (__stdcall *SoundGroupAmbient::`vftable'{for `SoundGroupStatic'})(NiPointer<NiAudioSource> *result, unsigned int uiType) = &SoundGroup::CreateSource; // weak
char aMilesFast2dPos[31] = "Miles Fast 2D Positional Audio"; // weak
int (*IAmbientSoundManager::`vftable'[2])() = { &_purecall, &_purecall }; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::`vector deleting destructor'; // weak
int (__stdcall *SoundGroupMainChar::`vftable')(NiPointer<NiAudioSource> *result, unsigned int uiType) = &SoundGroup::CreateSource; // weak
int (__thiscall *NiTList<IAmbientArea *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<IAmbientArea *>,IAmbientArea *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTList<SoundGroupAmbient::PlayingAreaInfo *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>::`vector deleting destructor'; // weak
int (__thiscall *NiTList<NiPointer<NiAudioSource>>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerList<void *>::`vftable')(void *p, char) = &SpTList<void *>::`vector deleting destructor'; // weak
int (__thiscall *PgTList<NiPointer<NiAudioSource>>::`vftable')(void *p, char) = &PgTList<NiPointer<NiAudioSource>>::`vector deleting destructor'; // weak
int (__thiscall *SpTList<void *>::`vftable')(void *p, char) = &SpTList<void *>::`vector deleting destructor'; // weak
int (__stdcall *SoundGroupDynamic::`vftable')(NiPointer<NiAudioSource> *result, NiPointer<NiAudioSource> spSource) = &SoundGroupDynamic::CreateSource; // weak
int (__stdcall *SoundGroupInterface::`vftable')(NiPointer<NiAudioSource> *result, unsigned int uiType) = &SoundGroup::CreateSource; // weak
int (__stdcall *SoundGroupFieldEffect::`vftable')(NiPointer<NiAudioSource> *result, NiPointer<NiAudioSource> spSource) = &SoundGroupDynamic::CreateSource; // weak
int (__stdcall *SoundGroup3DAmbient::`vftable')(NiPointer<NiAudioSource> *result, NiPointer<NiAudioSource> spSource) = &SoundGroupDynamic::CreateSource; // weak
int (__stdcall *SoundGroupNPCVoice::`vftable')(NiPointer<NiAudioSource> *result, NiPointer<NiAudioSource> spSource) = &SoundGroupDynamic::CreateSource; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>::`scalar deleting destructor'; // weak
int (__thiscall *PgTList<MachineOpt::WinPos *>::`vftable')(void *p, char) = &PgTList<MachineOpt::WinPos *>::`vector deleting destructor'; // weak
int (__thiscall *Option::`vftable')(void *p, char) = &Option::`scalar deleting destructor'; // weak
int (__thiscall *OptMgr::`vftable')(void *p, char) = &Option::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord>>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>::`vftable')(void *p, char) = &NiTListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>::`vector deleting destructor'; // weak
int (__thiscall *SkillUseRecord::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord>>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>::`scalar deleting destructor'; // weak
int (__cdecl *ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *IIDTableBase<PassiveSkillViewInfo,PasSkillViewInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ActiveSkillInfo,ActSkillInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<PassiveSkillInfo,PasSkillInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *IIDTableBase<PassiveSkillInfo,PasSkillInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *IIDTableBase<ActiveSkillViewInfo,ActSkillViewInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__thiscall *PgTList<NiPointer<SkillUseRecord>>::`vftable')(void *p, char) = &PgTList<NiPointer<SkillUseRecord>>::`vector deleting destructor'; // weak
int (__cdecl *ActSkillViewInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *PasSkillViewInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *ActSkillInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__cdecl *PasSkillInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
char byte_9BEA9C = '\0'; // idb
char byte_9BEA9D = '\0'; // idb
char byte_9BEA9E[2] = { '\0', '\0' }; // idb
int (__thiscall *Party::`vftable')(void *p, char) = &Party::`vector deleting destructor'; // weak
int (__thiscall *NiTList<NiPointer<ITask>>::`vftable')(void *p, char) = &NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::`scalar deleting destructor'; // weak
void (__thiscall *ITask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ITask::`vftable'{for `NiRefObject'})(void *p, char) = &ProductTask::`scalar deleting destructor'; // weak
char byte_9BEAFD = '\0'; // idb
char byte_9BEAFE = '\0'; // idb
char byte_9BEAFF = '\0'; // idb
char byte_9BEB29[3] = { '\0', '\0', '\0' }; // idb
char byte_9BEC1B = '\0'; // idb
void (__thiscall *MHDiceGameTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MHDiceGameTask::`vftable'{for `NiRefObject'})(void *p, char) = &MHDiceGameTask::`scalar deleting destructor'; // weak
void (__thiscall *CClientQuest::`vftable')(CClientQuest *this, unsigned __int16) = &CClientQuest::_Send_NC_QUEST_CLIENT_SCENARIO_DONE_REQ; // weak
void *off_9BEF6C = (void *)0x444E45; // weak
_UNKNOWN unk_9BEF82; // weak
_UNKNOWN unk_9BEF83; // weak
_UNKNOWN unk_9BEF8F; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestMC *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestMC *>::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,unsigned short>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,unsigned short>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>::`vector deleting destructor'; // weak
int (__thiscall *PgTList<QuestMC *>::`vftable')(void *p, char) = &PgTList<QuestMC *>::`scalar deleting destructor'; // weak
int (__thiscall *PgTList<QUEST_DATA *>::`vftable')(void *p, char) = &PgTList<QUEST_DATA *>::`scalar deleting destructor'; // weak
int (__thiscall *PgTList<unsigned short>::`vftable')(void *p, char) = &PgTList<unsigned short>::`vector deleting destructor'; // weak
int (__thiscall *PgTList<QuestHelperMgr::ProgressQuestMobGroup *>::`vftable')(void *p, char) = &PgTList<QuestHelperMgr::ProgressQuestMobGroup *>::`scalar deleting destructor'; // weak
bool (__thiscall *Scenario::`vftable')(Scenario *this, float) = &Scenario::Stop; // weak
bool (__thiscall *Scenario_15::`vftable')(Scenario *this, float) = &Scenario::Stop; // weak
enum NiAnimationKey::KeyContent (__thiscall *CClientGuildList::`vftable')(NiPoint3Interpolator *this, unsigned __int16) = &NiPoint3Interpolator::GetKeyContent; // weak
enum NiAnimationKey::KeyContent (__thiscall *GuildListTask::`vftable')(NiPoint3Interpolator *this, unsigned __int16) = &NiPoint3Interpolator::GetKeyContent; // weak
void (__thiscall *GuildListTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildListTask::`vftable'{for `NiRefObject'})(void *p, char) = &GuildListTask::`scalar deleting destructor'; // weak
char byte_9BF144 = '\0'; // idb
char byte_9BF145[3] = { '\0', '\0', '\0' }; // idb
int (__stdcall *CClientGuildMember::`vftable'[6])(int) =
{
  &NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue,
  &NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue,
  &NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue,
  &NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue,
  &NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue,
  &NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue
}; // weak
void (__thiscall *GuildMemberTask::`vftable')(GuildMemberTask *this, struct PROTO_NC_GUILD_MEMBER_INVITE_ACK *) = &GuildMemberTask::Recv_NC_GUILD_MEMBER_INVITE_ACK; // weak
void (__thiscall *GuildMemberTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildMemberTask::`vftable'{for `NiRefObject'})(void *p, char) = &GuildMemberTask::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::`scalar deleting destructor'; // weak
int (__thiscall *PgTList<GUILD_HISTORY *>::`vftable')(void *p, char) = &PgTList<GUILD_HISTORY *>::`vector deleting destructor'; // weak
int (__thiscall *CClientGuild::`vftable')(CGuild *this, struct PROTO_NC_GUILD_MAKE_ACK *) = &CGuild::Recv_NC_GUILD_MAKE_ACK; // weak
int (__thiscall *GuildTask::`vftable')(GuildTask *this, PROTO_NC_GUILD_MAKE_ACK *pkProto) = &GuildTask::Recv_NC_GUILD_MAKE_ACK; // weak
void (__thiscall *GuildTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildTask::`vftable'{for `NiRefObject'})(void *p, char) = &GuildTask::`vector deleting destructor'; // weak
void (__thiscall *GuildNameCache::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildNameCache::`vftable'{for `NiRefObject'})(void *p, char) = &GuildNameCache::`vector deleting destructor'; // weak
int (__thiscall *ResElement::`vftable')(void *p, char) = &ResElement::`vector deleting destructor'; // weak
int (__thiscall *mhResTableElement::`vftable')(void *p, char) = &mhResTableElement::`vector deleting destructor'; // weak
char off_9BF910[] = { '@', '%', 'd', '\0' }; // idb
int (__thiscall *mhObjActor::`vftable')(void *p, char) = &mhObjActor::`scalar deleting destructor'; // weak
int (__thiscall *mhObjAniActor::`vftable')(void *p, char) = &mhObjActor::`scalar deleting destructor'; // weak
int (__thiscall *mhObject::`vftable')(void *p, char) = &mhObject::`scalar deleting destructor'; // weak
char byte_9BFAB8 = '\0'; // idb
char byte_9BFAB9[3] = { '\0', '\0', '\0' }; // idb
void (__thiscall *mhItemInvIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *mhItemInvIconWin::`vftable'{for `NiNode'})(void *p, char) = &mhItemInvIconWin::`scalar deleting destructor'; // weak
void (__thiscall *mhEditRoomWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *mhEditRoomWin::`vftable'{for `NiNode'})(void *p, char) = &mhEditRoomWin::`vector deleting destructor'; // weak
_UNKNOWN unk_9C01D9; // weak
void (__thiscall *mhEmotionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *mhEmotionWin::`vftable'{for `NiNode'})(void *p, char) = &mhEmotionWin::`vector deleting destructor'; // weak
char byte_9C050D[3] = { '\0', '\0', '\0' }; // idb
void (__thiscall *mhGuestBookWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *mhGuestBookWin::`vftable'{for `NiNode'})(void *p, char) = &mhGuestBookWin::`scalar deleting destructor'; // weak
char byte_9C0875[3] = { '\0', '\0', '\0' }; // idb
void (__thiscall *mhGuestBookWin2::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *mhGuestBookWin2::`vftable'{for `NiNode'})(void *p, char) = &mhGuestBookWin2::`vector deleting destructor'; // weak
_UNKNOWN unk_9C0B6A; // weak
_UNKNOWN unk_9C0B6B; // weak
_UNKNOWN unk_9C0B75; // weak
_UNKNOWN unk_9C0B76; // weak
char byte_9C0B77 = '\0'; // idb
void (__thiscall *mhInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *mhInfoWin::`vftable'{for `NiNode'})(void *p, char) = &mhInfoWin::`vector deleting destructor'; // weak
void (__thiscall *mhInputPassWordWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *mhInputPassWordWin::`vftable'{for `NiNode'})(void *p, char) = &mhInputPassWordWin::`scalar deleting destructor'; // weak
void (__thiscall *mhJoinWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *mhJoinWin::`vftable'{for `NiNode'})(void *p, char) = &mhJoinWin::`vector deleting destructor'; // weak
void (__thiscall *mhMinimizeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *mhMinimizeWin::`vftable'{for `NiNode'})(void *p, char) = &mhMinimizeWin::`vector deleting destructor'; // weak
void (__thiscall *mhMouseControlWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *mhMouseControlWin::`vftable'{for `NiNode'})(void *p, char) = &mhMouseControlWin::`vector deleting destructor'; // weak
char byte_9C1C69[3] = { '\0', '\0', '\0' }; // idb
void (__thiscall *mhPortalListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *mhPortalListWin::`vftable'{for `NiNode'})(void *p, char) = &mhPortalListWin::`vector deleting destructor'; // weak
_UNKNOWN unk_9C20BD; // weak
_UNKNOWN unk_9C20BE; // weak
void (__thiscall *mhRepairObjWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *mhRepairObjWin::`vftable'{for `NiNode'})(void *p, char) = &mhRepairObjWin::`vector deleting destructor'; // weak
_UNKNOWN unk_9C2469; // weak
_UNKNOWN unk_9C246A; // weak
void (__thiscall *mhSettingWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *mhSettingWin::`vftable'{for `NiNode'})(void *p, char) = &mhSettingWin::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *>::`vftable')(void *p, char) = &NiTListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *>::`vftable')(void *p, char) = &NiTList<PROTO_CHARGEDBUFF_INFO *>::`scalar deleting destructor'; // weak
int (__thiscall *Net::`vftable')(void *p, char) = &Net::`vector deleting destructor'; // weak
int (__thiscall *NetMgr::`vftable')(void *p, char) = &NetMgr::`scalar deleting destructor'; // weak
char off_9C29E4[] = { 'e', 'n', 'd', '\0' }; // idb
int (__stdcall *List<ORRecord>::`vftable'[3])(unsigned __int16 hnd) = { &List<ORTable>::l_AllocA, &List<ORTable>::l_AllocZ, &List<ORRecord>::l_Free }; // weak
int (__stdcall *List<ORTable>::`vftable'[3])(unsigned __int16 hnd) = { &List<ORTable>::l_AllocA, &List<ORTable>::l_AllocZ, &List<ORRecord>::l_Free }; // weak
int (__stdcall *ListIteratorDefault<ORRecord>::`vftable')(int, NiGeometry *pkGeometry) = &ListIteratorDefault<ORRecord>::lid_Call; // weak
int (__stdcall *ListIteratorDefault<ORTable>::`vftable')(int, NiGeometry *pkGeometry) = &ListIteratorDefault<ORRecord>::lid_Call; // weak
int (__stdcall *ListEraser<ORRecord>::`vftable')(ORTable *ele, int handle) = &ListEraser<ORRecord>::lid_Call; // weak
int (__stdcall *ListEraser<ORTable>::`vftable')(ORTable *ele, int handle) = &ListEraser<ORRecord>::lid_Call; // weak
int (__stdcall *ListIteratorDefault<ORField>::`vftable')(int, NiGeometry *pkGeometry) = &ListIteratorDefault<ORRecord>::lid_Call; // weak
int (__stdcall *ListIteratorDefault<ORColumnHeader>::`vftable')(int, NiGeometry *pkGeometry) = &ListIteratorDefault<ORRecord>::lid_Call; // weak
unsigned __int8 (__thiscall *MakePrimaryKeyColumn::`vftable')(MakePrimaryKeyColumn *this, ORField *ele, unsigned __int16) = &MakePrimaryKeyColumn::lid_Call; // weak
unsigned __int8 (__thiscall *MakePrimaryKey::`vftable')(MakePrimaryKey *this, ORRecord *ele, unsigned __int16) = &MakePrimaryKey::lid_Call; // weak
unsigned __int8 (__thiscall *OrderArgument::`vftable')(OrderArgument *this, ORRecord *ele, unsigned __int16) = &OrderArgument::lid_Call; // weak
unsigned __int8 (__thiscall *ColumnNameArgument::`vftable')(ColumnNameArgument *this, ORColumnHeader *ele, unsigned __int16) = &ColumnNameArgument::lid_Call; // weak
unsigned __int8 (__thiscall *DataRecordArgument::`vftable')(DataRecordArgument *this, ORColumnHeader *ele, unsigned __int16) = &DataRecordArgument::lid_Call; // weak
unsigned __int8 (__thiscall *ColumnCheckArgument::`vftable')(ColumnCheckArgument *this, ORField *ele, unsigned __int16) = &ColumnCheckArgument::lid_Call; // weak
unsigned __int8 (__thiscall *TargetColumnFindArgument::`vftable')(TargetColumnFindArgument *this, ORField *ele, unsigned __int16) = &TargetColumnFindArgument::lid_Call; // weak
unsigned __int8 (__thiscall *RecordDataCompareArgument::`vftable')(RecordDataCompareArgument *this, ORRecord *ele, unsigned __int16) = &RecordDataCompareArgument::lid_Call; // weak
unsigned __int8 (__thiscall *TableNameCompareArgument::`vftable')(TableNameCompareArgument *this, ORTable *ele, unsigned __int16) = &TableNameCompareArgument::lid_Call; // weak
int (__thiscall *ORColumnHeader::`vftable')(ORColumnHeader *this, struct ORTokenReader *, struct TokenArgument *) = &ORColumnHeader::ortr_SetLength; // weak
int (__thiscall *ORColumnHeaderIndex::`vftable')(ORColumnHeader *this, struct ORTokenReader *, struct TokenArgument *) = &ORColumnHeader::ortr_SetLength; // weak
int (__thiscall *ORColumnHeaderString::`vftable')(ORColumnHeaderString *this, struct ORTokenReader *result, struct TokenArgument *) = &ORColumnHeaderString::ortr_SetLength; // weak
int (__thiscall *ORColumnHeaderByte::`vftable')(ORColumnHeader *this, struct ORTokenReader *, struct TokenArgument *) = &ORColumnHeader::ortr_SetLength; // weak
int (__thiscall *ORColumnHeaderWord::`vftable')(ORColumnHeader *this, struct ORTokenReader *, struct TokenArgument *) = &ORColumnHeader::ortr_SetLength; // weak
int (__thiscall *ORColumnHeaderDwrd::`vftable')(ORColumnHeader *this, struct ORTokenReader *, struct TokenArgument *) = &ORColumnHeader::ortr_SetLength; // weak
unsigned __int8 (__thiscall *RecordNumber::`vftable')(RecordNumber *this, ORRecord *ele, unsigned __int16) = &RecordNumber::lid_Call; // weak
int (*ORField::`vftable'[5])() = { &_purecall, &_purecall, &_purecall, &_purecall, &_purecall }; // weak
unsigned __int8 (__thiscall *ORFieldIndex::`vftable')(ORFieldIndex *this, char *contentstring, union ORToken *) = &ORFieldIndex::orf_CompareContent; // weak
unsigned __int8 (__thiscall *ORFieldString::`vftable')(ORFieldString *this, char *contentstring, union ORToken *) = &ORFieldString::orf_CompareContent; // weak
unsigned __int8 (__thiscall *ORFieldByte::`vftable')(ORFieldByte *this, char *num, union ORToken *) = &ORFieldByte::orf_CompareContent; // weak
unsigned __int8 (__thiscall *ORFieldWord::`vftable')(ORFieldWord *this, char *num, union ORToken *) = &ORFieldWord::orf_CompareContent; // weak
unsigned __int8 (__thiscall *ORFieldDwrd::`vftable')(ORFieldDwrd *this, char *num, union ORToken *) = &ORFieldDwrd::orf_CompareContent; // weak
_UNKNOWN unk_9C2E77; // weak
_UNKNOWN unk_9C2E7E; // weak
_UNKNOWN unk_9C2E7F; // weak
_UNKNOWN unk_9C2E97; // weak
_UNKNOWN unk_9C2E9E; // weak
_UNKNOWN unk_9C2E9F; // weak
_UNKNOWN unk_9C2EA6; // weak
_UNKNOWN unk_9C2EA7; // weak
void (__thiscall *WeddingEntryWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *WeddingEntryWin::`vftable'{for `NiNode'})(void *p, char) = &WeddingEntryWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_9C31EA; // weak
_UNKNOWN unk_9C31EB; // weak
_UNKNOWN unk_9C31F2; // weak
_UNKNOWN unk_9C31F3; // weak
_UNKNOWN unk_9C3203; // weak
_UNKNOWN unk_9C320A; // weak
_UNKNOWN unk_9C320B; // weak
_UNKNOWN unk_9C3212; // weak
_UNKNOWN unk_9C3213; // weak
_UNKNOWN unk_9C321A; // weak
_UNKNOWN unk_9C321B; // weak
_UNKNOWN unk_9C3225; // weak
_UNKNOWN unk_9C3226; // weak
_UNKNOWN unk_9C3227; // weak
_UNKNOWN unk_9C322F; // weak
_UNKNOWN unk_9C3239; // weak
_UNKNOWN unk_9C323A; // weak
_UNKNOWN unk_9C323B; // weak
_UNKNOWN unk_9C326A; // weak
_UNKNOWN unk_9C326B; // weak
_UNKNOWN unk_9C3279; // weak
_UNKNOWN unk_9C327A; // weak
_UNKNOWN unk_9C327B; // weak
_UNKNOWN unk_9C3285; // weak
void (__thiscall *WeddingInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *WeddingInfoWin::`vftable'{for `NiNode'})(void *p, char) = &WeddingInfoWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_9C369A; // weak
void (__thiscall *WeddingProposeInputWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *WeddingProposeInputWin::`vftable'{for `NiNode'})(void *p, char) = &WeddingProposeInputWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_9C39F3; // weak
void (__thiscall *WeddingProposeOutputWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *WeddingProposeOutputWin::`vftable'{for `NiNode'})(void *p, char) = &WeddingProposeOutputWin::`vector deleting destructor'; // weak
_UNKNOWN unk_9C3D73; // weak
_UNKNOWN unk_9C3D7A; // weak
void (__thiscall *WeddingProposeResultWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *WeddingProposeResultWin::`vftable'{for `NiNode'})(void *p, char) = &WeddingProposeResultWin::`vector deleting destructor'; // weak
void (__thiscall *WeddingTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *WeddingTask::`vftable'{for `NiRefObject'})(void *p, char) = &WeddingTask::`scalar deleting destructor'; // weak
int (__thiscall *DirectionController::`vftable')(void *p, int) = &DirectionController::`scalar deleting destructor'; // weak
int (__thiscall *DirectionControllers::`vftable')(void *p, char) = &DirectionControllers::`scalar deleting destructor'; // weak
int (__thiscall *TimerController::`vftable')(void *p, char) = &TimerController::`scalar deleting destructor'; // weak
void (__thiscall *GuildAcademyHallOfFameWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildAcademyHallOfFameWin::`vftable'{for `NiNode'})(void *p, char) = &GuildAcademyHallOfFameWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_9C46BA; // weak
_UNKNOWN unk_9C46BB; // weak
_UNKNOWN unk_9C46C2; // weak
_UNKNOWN unk_9C46C3; // weak
_UNKNOWN unk_9C46CA; // weak
_UNKNOWN unk_9C46CB; // weak
_UNKNOWN unk_9C46E9; // weak
void (__thiscall *GuildAcademyItemRewardInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildAcademyItemRewardInvWin::`vftable'{for `NiNode'})(void *p, char) = &GuildAcademyItemRewardInvWin::`scalar deleting destructor'; // weak
void (__thiscall *GuildAcademyItemRewardWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildAcademyItemRewardWin::`vftable'{for `NiNode'})(void *p, char) = &GuildAcademyItemRewardWin::`scalar deleting destructor'; // weak
void (__thiscall *GuildAcademyMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildAcademyMenuWin::`vftable'{for `NiNode'})(void *p, char) = &GuildAcademyMenuWin::`scalar deleting destructor'; // weak
void (__thiscall *ISingletonTask<GuildAcademyLeaveTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ISingletonTask<GuildAcademyLeaveTask>::`vftable'{for `NiRefObject'})(void *p, char) = &ISingletonTask<GuildAcademyLeaveTask>::`scalar deleting destructor'; // weak
void (__thiscall *GuildAcademyLeaveTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildAcademyLeaveTask::`vftable'{for `NiRefObject'})(void *p, char) = &ISingletonTask<GuildAcademyLeaveTask>::`scalar deleting destructor'; // weak
_UNKNOWN unk_9C520E; // weak
_UNKNOWN unk_9C520F; // weak
_UNKNOWN unk_9C5216; // weak
_UNKNOWN unk_9C5217; // weak
_UNKNOWN unk_9C521E; // weak
_UNKNOWN unk_9C521F; // weak
void (__thiscall *GuildAcademyMoneyRewardWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildAcademyMoneyRewardWin::`vftable'{for `NiNode'})(void *p, char) = &GuildAcademyMoneyRewardWin::`scalar deleting destructor'; // weak
void (__thiscall *GuildAcademyNoticeEditorWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildAcademyNoticeEditorWin::`vftable'{for `NiNode'})(void *p, char) = &GuildAcademyNoticeEditorWin::`vector deleting destructor'; // weak
void (__thiscall *ISingletonTask<GuildAcademyNotifyTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ISingletonTask<GuildAcademyNotifyTask>::`vftable'{for `NiRefObject'})(void *p, char) = &ISingletonTask<GuildAcademyNotifyTask>::`vector deleting destructor'; // weak
void (__thiscall *GuildAcademyNotifyTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildAcademyNotifyTask::`vftable'{for `NiRefObject'})(void *p, char) = &GuildAcademyNotifyTask::`scalar deleting destructor'; // weak
void (__thiscall *GuildAcademyRankingWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildAcademyRankingWin::`vftable'{for `NiNode'})(void *p, char) = &GuildAcademyRankingWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_9C5F2E; // weak
void (__thiscall *GuildAcademySelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildAcademySelectWin::`vftable'{for `NiNode'})(void *p, char) = &GuildAcademySelectWin::`vector deleting destructor'; // weak
_UNKNOWN unk_9C64CD; // weak
_UNKNOWN unk_9C64CE; // weak
_UNKNOWN unk_9C64CF; // weak
_UNKNOWN unk_9C64D6; // weak
char byte_9C64D7 = '\0'; // idb
char byte_9C64E3 = '\0'; // idb
void (__thiscall *GuildAcademyStorageTabWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildAcademyStorageTabWin::`vftable'{for `NiNode'})(void *p, char) = &GuildAcademyStorageTabWin::`scalar deleting destructor'; // weak
void (__thiscall *GuildAcademyStorageInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildAcademyStorageInvWin::`vftable'{for `NiNode'})(void *p, char) = &GuildAcademyStorageInvWin::`scalar deleting destructor'; // weak
void (__thiscall *GuildAcademyStorageWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildAcademyStorageWin::`vftable'{for `NiNode'})(void *p, char) = &GuildAcademyStorageWin::`scalar deleting destructor'; // weak
_UNKNOWN unk_9C6E25; // weak
_UNKNOWN unk_9C6E26; // weak
char byte_9C6E27 = '\0'; // idb
char byte_9C6E2E = '\0'; // idb
char byte_9C6E2F = '\0'; // idb
char byte_9C6E46[2] = { '\0', '\0' }; // idb
void (__thiscall *ISingletonTask<GuildAcademyMemberVanishTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ISingletonTask<GuildAcademyMemberVanishTask>::`vftable'{for `NiRefObject'})(void *p, char) = &GuildAcademyMemberVanishTask::`vector deleting destructor'; // weak
void (__thiscall *GuildAcademyMemberVanishTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildAcademyMemberVanishTask::`vftable'{for `NiRefObject'})(void *p, char) = &GuildAcademyMemberVanishTask::`vector deleting destructor'; // weak
void (__thiscall *GuildAcademyWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildAcademyWin::`vftable'{for `NiNode'})(void *p, char) = &GuildAcademyWin::`scalar deleting destructor'; // weak
void (__thiscall *ISingletonTask<GuildAcademyJoinReqTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ISingletonTask<GuildAcademyJoinReqTask>::`vftable'{for `NiRefObject'})(void *p, char) = &GuildAcademyJoinReqTask::`scalar deleting destructor'; // weak
void (__thiscall *GuildAcademyJoinReqTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildAcademyJoinReqTask::`vftable'{for `NiRefObject'})(void *p, char) = &GuildAcademyJoinReqTask::`scalar deleting destructor'; // weak
int (__thiscall *CClientGuildAcademyMember::`vftable')(CGuildAcademyMember *this, struct PROTO_NC_GUILD_ACADEMY_MEMBER_LIST_ACK *) = &CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_LIST_ACK; // weak
int (__thiscall *GuildAcademyMemberTask::`vftable')(CGuildAcademyMember *this, struct PROTO_NC_GUILD_ACADEMY_MEMBER_LIST_ACK *) = &CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_LIST_ACK; // weak
void (__thiscall *GuildAcademyMemberTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildAcademyMemberTask::`vftable'{for `NiRefObject'})(void *p, char) = &GuildAcademyMemberTask::`scalar deleting destructor'; // weak
enum NiAnimationKey::KeyContent (__thiscall *CClientGuildAcademySelectList::`vftable')(NiPoint3Interpolator *this, unsigned __int16) = &NiPoint3Interpolator::GetKeyContent; // weak
enum NiAnimationKey::KeyContent (__thiscall *GuildAcademySelectTask::`vftable')(NiPoint3Interpolator *this, unsigned __int16) = &NiPoint3Interpolator::GetKeyContent; // weak
void (__thiscall *GuildAcademySelectTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildAcademySelectTask::`vftable'{for `NiRefObject'})(void *p, char) = &GuildAcademySelectTask::`scalar deleting destructor'; // weak
int (__thiscall *GuildAcademyTask::`vftable')(CGuild *this, struct PROTO_NC_GUILD_MAKE_ACK *) = &CGuild::Recv_NC_GUILD_MAKE_ACK; // weak
void (__thiscall *GuildAcademyTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GuildAcademyTask::`vftable'{for `NiRefObject'})(void *p, char) = &GuildAcademyTask::`scalar deleting destructor'; // weak
int (__thiscall *CClientGuildAcademy::`vftable')(CGuild *this, struct PROTO_NC_GUILD_MAKE_ACK *) = &CGuild::Recv_NC_GUILD_MAKE_ACK; // weak
_UNKNOWN unk_9C7A14; // weak
char byte_9C7A15 = '\0'; // idb
char byte_9C7A16 = '\0'; // idb
char byte_9C7A17 = '\0'; // idb
char byte_9C7A18 = '\0'; // idb
_UNKNOWN unk_9C7A19; // weak
int (__thiscall *RaidInfo::`vftable')(void *p, char) = &RaidInfo::`vector deleting destructor'; // weak
_UNKNOWN unk_9C7A42; // weak
_UNKNOWN unk_9C7A43; // weak
_UNKNOWN unk_9C7A5D; // weak
char byte_9C7A5E = '\0'; // idb
_UNKNOWN unk_9C7A5F; // weak
_UNKNOWN unk_9C7A91; // weak
_UNKNOWN unk_9C7A92; // weak
_UNKNOWN unk_9C7A93; // weak
_UNKNOWN unk_9C7AFF; // weak
_UNKNOWN unk_9C7B3E; // weak
_UNKNOWN unk_9C7B3F; // weak
_UNKNOWN unk_9C7B5E; // weak
char byte_9C7B5F = '\0'; // idb
void (__thiscall *ExpeditionMemberAddWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ExpeditionMemberAddWin::`vftable'{for `NiNode'})(void *p, char) = &ExpeditionMemberAddWin::`vector deleting destructor'; // weak
void (__thiscall *ExpeditionLootSelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ExpeditionLootSelectWin::`vftable'{for `NiNode'})(void *p, char) = &ExpeditionLootSelectWin::`vector deleting destructor'; // weak
void (__thiscall *EntryIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *EntryIconWin::`vftable'{for `NiNode'})(void *p, char) = &EntryIconWin::`scalar deleting destructor'; // weak
void (__thiscall *ExpeditionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ExpeditionWin::`vftable'{for `NiNode'})(void *p, char) = &ExpeditionWin::`scalar deleting destructor'; // weak
void (__thiscall *ExpeditionPartyWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ExpeditionPartyWin::`vftable'{for `NiNode'})(void *p, char) = &ExpeditionPartyWin::`vector deleting destructor'; // weak
void (__thiscall *ExpeditionLootOptionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ExpeditionLootOptionWin::`vftable'{for `NiNode'})(void *p, char) = &ExpeditionLootOptionWin::`vector deleting destructor'; // weak
_UNKNOWN unk_9C91A7; // weak
_UNKNOWN unk_9C91BD; // weak
void *off_9C91BE = &loc_7C0000; // weak
_UNKNOWN unk_9C91C2; // weak
_UNKNOWN unk_9C91C3; // weak
_UNKNOWN unk_9C91CA; // weak
_UNKNOWN unk_9C91CB; // weak
_UNKNOWN unk_9C91E3; // weak
_UNKNOWN unk_9C91EA; // weak
_UNKNOWN unk_9C91EB; // weak
_UNKNOWN unk_9C9202; // weak
_UNKNOWN unk_9C9203; // weak
_UNKNOWN unk_9C920A; // weak
_UNKNOWN unk_9C920B; // weak
_UNKNOWN unk_9C921D; // weak
void (__thiscall *CoinEditWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CoinEditWin::`vftable'{for `NiNode'})(void *p, char) = &CoinEditWin::`scalar deleting destructor'; // weak
void (__thiscall *CoinExchangeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *CoinExchangeWin::`vftable'{for `NiNode'})(void *p, char) = &CoinExchangeWin::`vector deleting destructor'; // weak
void (__thiscall *GambleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GambleWin::`vftable'{for `NiNode'})(void *p, char) = &GambleWin::`scalar deleting destructor'; // weak
void (__thiscall *GambleMiniWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GambleMiniWin::`vftable'{for `NiNode'})(void *p, char) = &GambleMiniWin::`scalar deleting destructor'; // weak
void (__thiscall *GambleHouseCardWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GambleHouseCardWin::`vftable'{for `NiNode'})(void *p, char) = &GambleHouseCardWin::`vector deleting destructor'; // weak
char byte_9CA167 = '\0'; // idb
_UNKNOWN unk_9CA171; // weak
_UNKNOWN unk_9CA172; // weak
_UNKNOWN unk_9CA173; // weak
_UNKNOWN unk_9CA17F; // weak
_UNKNOWN unk_9CA18F; // weak
_UNKNOWN unk_9CA1B7; // weak
char byte_9CAE08[4] = { '\0', '\0', '\0', '\0' }; // idb
void (__thiscall *BettingBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *BettingBut::`vftable'{for `NiNode'})(void *p, char) = &BettingBut::`vector deleting destructor'; // weak
void (__thiscall *ToggleBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *ToggleBut::`vftable'{for `NiNode'})(void *p, char) = &ToggleBut::`scalar deleting destructor'; // weak
void (__thiscall *mhMinimizeDiceGameWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *mhMinimizeDiceGameWin::`vftable'{for `NiNode'})(void *p, char) = &mhMinimizeDiceGameWin::`vector deleting destructor'; // weak
void (__thiscall *mhDiceHelpWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *mhDiceHelpWin::`vftable'{for `NiNode'})(void *p, char) = &mhDiceHelpWin::`vector deleting destructor'; // weak
void (__thiscall *mhDiceRateSheetWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *mhDiceRateSheetWin::`vftable'{for `NiNode'})(void *p, char) = &mhDiceRateSheetWin::`vector deleting destructor'; // weak
int (__thiscall *MHDiceAniActor::`vftable')(void *p, char) = &mhObjActor::`scalar deleting destructor'; // weak
void (__thiscall *MHDiceRewardMoneyWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MHDiceRewardMoneyWin::`vftable'{for `NiNode'})(void *p, char) = &MHDiceRewardMoneyWin::`vector deleting destructor'; // weak
void (__thiscall *MiniHouseDiceGameWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MiniHouseDiceGameWin::`vftable'{for `NiNode'})(void *p, char) = &MiniHouseDiceGameWin::`vector deleting destructor'; // weak
void (__thiscall *GambleDiceGameWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GambleDiceGameWin::`vftable'{for `NiNode'})(void *p, char) = &GambleDiceGameWin::`scalar deleting destructor'; // weak
void (__thiscall *mhDiceRankWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *mhDiceRankWin::`vftable'{for `NiNode'})(void *p, char) = &mhDiceRankWin::`vector deleting destructor'; // weak
char byte_9CD38E[2] = { '\0', '\0' }; // idb
char byte_9CD3B2[2] = { '\0', '\0' }; // idb
char byte_9CD429 = '\0'; // idb
char byte_9CD42A[2] = { '\0', '\0' }; // idb
char byte_9CDC3C[4] = { '\0', '\0', '\0', '\0' }; // idb
void (__thiscall *MiniSlotMachineWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *MiniSlotMachineWin::`vftable'{for `NiNode'})(void *p, char) = &MiniSlotMachineWin::`vector deleting destructor'; // weak
void (__thiscall *GBSlotHelpWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GBSlotHelpWin::`vftable'{for `NiNode'})(void *p, char) = &GBSlotHelpWin::`vector deleting destructor'; // weak
void (__thiscall *SlotMachineWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *SlotMachineWin::`vftable'{for `NiNode'})(void *p, char) = &SlotMachineWin::`vector deleting destructor'; // weak
void (__thiscall *GBSlotRankWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__thiscall *GBSlotRankWin::`vftable'{for `NiNode'})(void *p, char) = &GBSlotRankWin::`vector deleting destructor'; // weak
int (__thiscall *NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::`vftable')(void *p, char) = &NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::`vector deleting destructor'; // weak
int (__thiscall *NiTMap<enum  CharAniType,MoverSlot::sSlotAniCode *>::`vftable')(void *p, char) = &NiTMap<enum  CharAniType,MoverSlot::sSlotAniCode *>::`vector deleting destructor'; // weak
struct NiActorManager *(__thiscall *Mover::`vftable'{for `AttackSequenceManager'})(Char *__hidden this) = &Char::GetActor; // weak
int (__stdcall *Mover::`vftable'{for `IEffectHolder'})(int) = &Mover::`vector deleting destructor'; // weak
void (__thiscall *Mover::`vftable'{for `AbStateInfectee'})(Mover *this, AbStateInst *pkAbState, bool) = &Mover::Affect; // weak
wchar_t word_9CE908 = 34u; // idb
wchar_t word_9CE90C = 34u; // idb
wchar_t pszFormat = 83u; // idb
_UNKNOWN unk_9CE954; // weak
void *off_9CE958 = (void *)0x520045; // weak
wchar_t off_9CE9B8 = 83u; // idb
const wchar_t off_9CEA00 = 69u; // idb
wchar_t word_9CEA7C = 0u; // idb
const wchar_t off_9CEA80 = 69u; // idb
wchar_t word_9CEAFC = 0u; // idb
const wchar_t off_9CEB00 = 69u; // idb
int (__thiscall *CMD5Checksum::`vftable')(void *p, char) = &CMD5Checksum::`vector deleting destructor'; // weak
int (__thiscall *CDataReader::`vftable')(void *p, char) = &CDataReader::`scalar deleting destructor'; // weak
int (__stdcall *CQuest::`vftable')(int) = &NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue; // weak
int (__thiscall *CItemAuthorityBase::`vftable')(void *p, char) = &CItemAuthorityBase::`scalar deleting destructor'; // weak
int (__stdcall *CGuildMember::`vftable'[6])(int) =
{
  &NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue,
  &NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue,
  &NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue,
  &NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue,
  &NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue,
  &NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue
}; // weak
int (__thiscall *CGuildAcademyMember::`vftable')(CGuildAcademyMember *this, struct PROTO_NC_GUILD_ACADEMY_MEMBER_LIST_ACK *) = &CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_LIST_ACK; // weak
int (__thiscall *CGuild::`vftable')(CGuild *this, struct PROTO_NC_GUILD_MAKE_ACK *) = &CGuild::Recv_NC_GUILD_MAKE_ACK; // weak
int (__thiscall *AreaInfoData::`vftable')(void *p, char) = &AreaInfoData::`vector deleting destructor'; // weak
bool (__thiscall *AreaInfoData::AE_Square::`vftable')(AreaInfoData::AE_Square *this, float fSin, float) = &AreaInfoData::AE_Square::IntersectTest; // weak
bool (__thiscall *AreaInfoData::AE_Circle::`vftable')(AreaInfoData::AE_Circle *this, float fDistY, float) = &AreaInfoData::AE_Circle::IntersectTest; // weak
enum NiAnimationKey::KeyContent (__thiscall *CGuildList::`vftable')(NiPoint3Interpolator *this, unsigned __int16) = &NiPoint3Interpolator::GetKeyContent; // weak
int (__thiscall *Encrypt::Stream::`vftable')(void *p, char) = &Encrypt::Stream::`vector deleting destructor'; // weak
bool (__thiscall *Encrypt::EncryptMethodXor::`vftable'[2])(Encrypt::EncryptMethodXor *this, Encrypt::Stream *rkEncStream, struct Stream *) = { &Encrypt::EncryptMethodXor::Encrypt, &Encrypt::EncryptMethodXor::Decrypt }; // weak
config_s configuration_table[10] =
{
  { 0u, 0u, 0u, 0u, &deflate_stored },
  { 4u, 4u, 8u, 4u, &deflate_fast },
  { 4u, 5u, 16u, 8u, &deflate_fast },
  { 4u, 6u, 32u, 32u, &deflate_fast },
  { 4u, 4u, 16u, 16u, &deflate_slow },
  { 8u, 16u, 32u, 32u, &deflate_slow },
  { 8u, 16u, 128u, 128u, &deflate_slow },
  { 8u, 32u, 128u, 256u, &deflate_slow },
  { 32u, 128u, 258u, 1024u, &deflate_slow },
  { 32u, 258u, 258u, 4096u, &deflate_slow }
}; // idb
_UNKNOWN unk_9CFBE8; // weak
const unsigned __int16 order[19] =
{
  16u,
  17u,
  18u,
  0u,
  8u,
  7u,
  9u,
  6u,
  10u,
  5u,
  11u,
  4u,
  12u,
  3u,
  13u,
  2u,
  14u,
  1u,
  15u
}; // idb
const int extra_lbits[29] =
{
  0,
  0,
  0,
  0,
  0,
  0,
  0,
  0,
  1,
  1,
  1,
  1,
  2,
  2,
  2,
  2,
  3,
  3,
  3,
  3,
  4,
  4,
  4,
  4,
  5,
  5,
  5,
  5,
  0
}; // idb
char bl_order[19] =
{
  '\x10',
  '\x11',
  '\x12',
  '\0',
  '\b',
  '\a',
  '\t',
  '\x06',
  '\n',
  '\x05',
  '\v',
  '\x04',
  '\f',
  '\x03',
  '\r',
  '\x02',
  '\x0E',
  '\x01',
  '\x0F'
}; // idb
const int extra_dbits[30] =
{
  0,
  0,
  0,
  0,
  1,
  1,
  2,
  2,
  3,
  3,
  4,
  4,
  5,
  5,
  6,
  6,
  7,
  7,
  8,
  8,
  9,
  9,
  10,
  10,
  11,
  11,
  12,
  12,
  13,
  13
}; // idb
ct_data_s static_ltree[288] =
{
  { { 12u }, { 8u } },
  { { 140u }, { 8u } },
  { { 76u }, { 8u } },
  { { 204u }, { 8u } },
  { { 44u }, { 8u } },
  { { 172u }, { 8u } },
  { { 108u }, { 8u } },
  { { 236u }, { 8u } },
  { { 28u }, { 8u } },
  { { 156u }, { 8u } },
  { { 92u }, { 8u } },
  { { 220u }, { 8u } },
  { { 60u }, { 8u } },
  { { 188u }, { 8u } },
  { { 124u }, { 8u } },
  { { 252u }, { 8u } },
  { { 2u }, { 8u } },
  { { 130u }, { 8u } },
  { { 66u }, { 8u } },
  { { 194u }, { 8u } },
  { { 34u }, { 8u } },
  { { 162u }, { 8u } },
  { { 98u }, { 8u } },
  { { 226u }, { 8u } },
  { { 18u }, { 8u } },
  { { 146u }, { 8u } },
  { { 82u }, { 8u } },
  { { 210u }, { 8u } },
  { { 50u }, { 8u } },
  { { 178u }, { 8u } },
  { { 114u }, { 8u } },
  { { 242u }, { 8u } },
  { { 10u }, { 8u } },
  { { 138u }, { 8u } },
  { { 74u }, { 8u } },
  { { 202u }, { 8u } },
  { { 42u }, { 8u } },
  { { 170u }, { 8u } },
  { { 106u }, { 8u } },
  { { 234u }, { 8u } },
  { { 26u }, { 8u } },
  { { 154u }, { 8u } },
  { { 90u }, { 8u } },
  { { 218u }, { 8u } },
  { { 58u }, { 8u } },
  { { 186u }, { 8u } },
  { { 122u }, { 8u } },
  { { 250u }, { 8u } },
  { { 6u }, { 8u } },
  { { 134u }, { 8u } },
  { { 70u }, { 8u } },
  { { 198u }, { 8u } },
  { { 38u }, { 8u } },
  { { 166u }, { 8u } },
  { { 102u }, { 8u } },
  { { 230u }, { 8u } },
  { { 22u }, { 8u } },
  { { 150u }, { 8u } },
  { { 86u }, { 8u } },
  { { 214u }, { 8u } },
  { { 54u }, { 8u } },
  { { 182u }, { 8u } },
  { { 118u }, { 8u } },
  { { 246u }, { 8u } },
  { { 14u }, { 8u } },
  { { 142u }, { 8u } },
  { { 78u }, { 8u } },
  { { 206u }, { 8u } },
  { { 46u }, { 8u } },
  { { 174u }, { 8u } },
  { { 110u }, { 8u } },
  { { 238u }, { 8u } },
  { { 30u }, { 8u } },
  { { 158u }, { 8u } },
  { { 94u }, { 8u } },
  { { 222u }, { 8u } },
  { { 62u }, { 8u } },
  { { 190u }, { 8u } },
  { { 126u }, { 8u } },
  { { 254u }, { 8u } },
  { { 1u }, { 8u } },
  { { 129u }, { 8u } },
  { { 65u }, { 8u } },
  { { 193u }, { 8u } },
  { { 33u }, { 8u } },
  { { 161u }, { 8u } },
  { { 97u }, { 8u } },
  { { 225u }, { 8u } },
  { { 17u }, { 8u } },
  { { 145u }, { 8u } },
  { { 81u }, { 8u } },
  { { 209u }, { 8u } },
  { { 49u }, { 8u } },
  { { 177u }, { 8u } },
  { { 113u }, { 8u } },
  { { 241u }, { 8u } },
  { { 9u }, { 8u } },
  { { 137u }, { 8u } },
  { { 73u }, { 8u } },
  { { 201u }, { 8u } },
  { { 41u }, { 8u } },
  { { 169u }, { 8u } },
  { { 105u }, { 8u } },
  { { 233u }, { 8u } },
  { { 25u }, { 8u } },
  { { 153u }, { 8u } },
  { { 89u }, { 8u } },
  { { 217u }, { 8u } },
  { { 57u }, { 8u } },
  { { 185u }, { 8u } },
  { { 121u }, { 8u } },
  { { 249u }, { 8u } },
  { { 5u }, { 8u } },
  { { 133u }, { 8u } },
  { { 69u }, { 8u } },
  { { 197u }, { 8u } },
  { { 37u }, { 8u } },
  { { 165u }, { 8u } },
  { { 101u }, { 8u } },
  { { 229u }, { 8u } },
  { { 21u }, { 8u } },
  { { 149u }, { 8u } },
  { { 85u }, { 8u } },
  { { 213u }, { 8u } },
  { { 53u }, { 8u } },
  { { 181u }, { 8u } },
  { { 117u }, { 8u } },
  { { 245u }, { 8u } },
  { { 13u }, { 8u } },
  { { 141u }, { 8u } },
  { { 77u }, { 8u } },
  { { 205u }, { 8u } },
  { { 45u }, { 8u } },
  { { 173u }, { 8u } },
  { { 109u }, { 8u } },
  { { 237u }, { 8u } },
  { { 29u }, { 8u } },
  { { 157u }, { 8u } },
  { { 93u }, { 8u } },
  { { 221u }, { 8u } },
  { { 61u }, { 8u } },
  { { 189u }, { 8u } },
  { { 125u }, { 8u } },
  { { 253u }, { 8u } },
  { { 19u }, { 9u } },
  { { 275u }, { 9u } },
  { { 147u }, { 9u } },
  { { 403u }, { 9u } },
  { { 83u }, { 9u } },
  { { 339u }, { 9u } },
  { { 211u }, { 9u } },
  { { 467u }, { 9u } },
  { { 51u }, { 9u } },
  { { 307u }, { 9u } },
  { { 179u }, { 9u } },
  { { 435u }, { 9u } },
  { { 115u }, { 9u } },
  { { 371u }, { 9u } },
  { { 243u }, { 9u } },
  { { 499u }, { 9u } },
  { { 11u }, { 9u } },
  { { 267u }, { 9u } },
  { { 139u }, { 9u } },
  { { 395u }, { 9u } },
  { { 75u }, { 9u } },
  { { 331u }, { 9u } },
  { { 203u }, { 9u } },
  { { 459u }, { 9u } },
  { { 43u }, { 9u } },
  { { 299u }, { 9u } },
  { { 171u }, { 9u } },
  { { 427u }, { 9u } },
  { { 107u }, { 9u } },
  { { 363u }, { 9u } },
  { { 235u }, { 9u } },
  { { 491u }, { 9u } },
  { { 27u }, { 9u } },
  { { 283u }, { 9u } },
  { { 155u }, { 9u } },
  { { 411u }, { 9u } },
  { { 91u }, { 9u } },
  { { 347u }, { 9u } },
  { { 219u }, { 9u } },
  { { 475u }, { 9u } },
  { { 59u }, { 9u } },
  { { 315u }, { 9u } },
  { { 187u }, { 9u } },
  { { 443u }, { 9u } },
  { { 123u }, { 9u } },
  { { 379u }, { 9u } },
  { { 251u }, { 9u } },
  { { 507u }, { 9u } },
  { { 7u }, { 9u } },
  { { 263u }, { 9u } },
  { { 135u }, { 9u } },
  { { 391u }, { 9u } },
  { { 71u }, { 9u } },
  { { 327u }, { 9u } },
  { { 199u }, { 9u } },
  { { 455u }, { 9u } },
  { { 39u }, { 9u } },
  { { 295u }, { 9u } },
  { { 167u }, { 9u } },
  { { 423u }, { 9u } },
  { { 103u }, { 9u } },
  { { 359u }, { 9u } },
  { { 231u }, { 9u } },
  { { 487u }, { 9u } },
  { { 23u }, { 9u } },
  { { 279u }, { 9u } },
  { { 151u }, { 9u } },
  { { 407u }, { 9u } },
  { { 87u }, { 9u } },
  { { 343u }, { 9u } },
  { { 215u }, { 9u } },
  { { 471u }, { 9u } },
  { { 55u }, { 9u } },
  { { 311u }, { 9u } },
  { { 183u }, { 9u } },
  { { 439u }, { 9u } },
  { { 119u }, { 9u } },
  { { 375u }, { 9u } },
  { { 247u }, { 9u } },
  { { 503u }, { 9u } },
  { { 15u }, { 9u } },
  { { 271u }, { 9u } },
  { { 143u }, { 9u } },
  { { 399u }, { 9u } },
  { { 79u }, { 9u } },
  { { 335u }, { 9u } },
  { { 207u }, { 9u } },
  { { 463u }, { 9u } },
  { { 47u }, { 9u } },
  { { 303u }, { 9u } },
  { { 175u }, { 9u } },
  { { 431u }, { 9u } },
  { { 111u }, { 9u } },
  { { 367u }, { 9u } },
  { { 239u }, { 9u } },
  { { 495u }, { 9u } },
  { { 31u }, { 9u } },
  { { 287u }, { 9u } },
  { { 159u }, { 9u } },
  { { 415u }, { 9u } },
  { { 95u }, { 9u } },
  { { 351u }, { 9u } },
  { { 223u }, { 9u } },
  { { 479u }, { 9u } },
  { { 63u }, { 9u } },
  { { 319u }, { 9u } },
  { { 191u }, { 9u } },
  { { 447u }, { 9u } },
  { { 127u }, { 9u } },
  { { 383u }, { 9u } },
  { { 255u }, { 9u } },
  { { 511u }, { 9u } },
  { { 0u }, { 7u } },
  { { 64u }, { 7u } },
  { { 32u }, { 7u } },
  { { 96u }, { 7u } },
  { { 16u }, { 7u } },
  { { 80u }, { 7u } },
  { { 48u }, { 7u } },
  { { 112u }, { 7u } },
  { { 8u }, { 7u } },
  { { 72u }, { 7u } },
  { { 40u }, { 7u } },
  { { 104u }, { 7u } },
  { { 24u }, { 7u } },
  { { 88u }, { 7u } },
  { { 56u }, { 7u } },
  { { 120u }, { 7u } },
  { { 4u }, { 7u } },
  { { 68u }, { 7u } },
  { { 36u }, { 7u } },
  { { 100u }, { 7u } },
  { { 20u }, { 7u } },
  { { 84u }, { 7u } },
  { { 52u }, { 7u } },
  { { 116u }, { 7u } },
  { { 3u }, { 8u } },
  { { 131u }, { 8u } },
  { { 67u }, { 8u } },
  { { 195u }, { 8u } },
  { { 35u }, { 8u } },
  { { 163u }, { 8u } },
  { { 99u }, { 8u } },
  { { 227u }, { 8u } }
}; // idb
ct_data_s static_dtree[30] =
{
  { { 0u }, { 5u } },
  { { 16u }, { 5u } },
  { { 8u }, { 5u } },
  { { 24u }, { 5u } },
  { { 4u }, { 5u } },
  { { 20u }, { 5u } },
  { { 12u }, { 5u } },
  { { 28u }, { 5u } },
  { { 2u }, { 5u } },
  { { 18u }, { 5u } },
  { { 10u }, { 5u } },
  { { 26u }, { 5u } },
  { { 6u }, { 5u } },
  { { 22u }, { 5u } },
  { { 14u }, { 5u } },
  { { 30u }, { 5u } },
  { { 1u }, { 5u } },
  { { 17u }, { 5u } },
  { { 9u }, { 5u } },
  { { 25u }, { 5u } },
  { { 5u }, { 5u } },
  { { 21u }, { 5u } },
  { { 13u }, { 5u } },
  { { 29u }, { 5u } },
  { { 3u }, { 5u } },
  { { 19u }, { 5u } },
  { { 11u }, { 5u } },
  { { 27u }, { 5u } },
  { { 7u }, { 5u } },
  { { 23u }, { 5u } }
}; // idb
char _dist_code[] = { '\0' }; // weak
char byte_9D05A0[] = { '\0' }; // weak
char _length_code[] = { '\0' }; // weak
const int base_length[29] =
{
  0,
  1,
  2,
  3,
  4,
  5,
  6,
  7,
  8,
  10,
  12,
  14,
  16,
  20,
  24,
  28,
  32,
  40,
  48,
  56,
  64,
  80,
  96,
  112,
  128,
  160,
  192,
  224,
  0
}; // idb
const int base_dist[30] =
{
  0,
  1,
  2,
  3,
  4,
  6,
  8,
  12,
  16,
  24,
  32,
  48,
  64,
  96,
  128,
  192,
  256,
  384,
  512,
  768,
  1024,
  1536,
  2048,
  3072,
  4096,
  6144,
  8192,
  12288,
  16384,
  24576
}; // idb
const unsigned int crc_table[8][256] =
{
  {
    0u,
    1996959894u,
    3993919788u,
    2567524794u,
    124634137u,
    1886057615u,
    3915621685u,
    2657392035u,
    249268274u,
    2044508324u,
    3772115230u,
    2547177864u,
    162941995u,
    2125561021u,
    3887607047u,
    2428444049u,
    498536548u,
    1789927666u,
    4089016648u,
    2227061214u,
    450548861u,
    1843258603u,
    4107580753u,
    2211677639u,
    325883990u,
    1684777152u,
    4251122042u,
    2321926636u,
    335633487u,
    1661365465u,
    4195302755u,
    2366115317u,
    997073096u,
    1281953886u,
    3579855332u,
    2724688242u,
    1006888145u,
    1258607687u,
    3524101629u,
    2768942443u,
    901097722u,
    1119000684u,
    3686517206u,
    2898065728u,
    853044451u,
    1172266101u,
    3705015759u,
    2882616665u,
    651767980u,
    1373503546u,
    3369554304u,
    3218104598u,
    565507253u,
    1454621731u,
    3485111705u,
    3099436303u,
    671266974u,
    1594198024u,
    3322730930u,
    2970347812u,
    795835527u,
    1483230225u,
    3244367275u,
    3060149565u,
    1994146192u,
    31158534u,
    2563907772u,
    4023717930u,
    1907459465u,
    112637215u,
    2680153253u,
    3904427059u,
    2013776290u,
    251722036u,
    2517215374u,
    3775830040u,
    2137656763u,
    141376813u,
    2439277719u,
    3865271297u,
    1802195444u,
    476864866u,
    2238001368u,
    4066508878u,
    1812370925u,
    453092731u,
    2181625025u,
    4111451223u,
    1706088902u,
    314042704u,
    2344532202u,
    4240017532u,
    1658658271u,
    366619977u,
    2362670323u,
    4224994405u,
    1303535960u,
    984961486u,
    2747007092u,
    3569037538u,
    1256170817u,
    1037604311u,
    2765210733u,
    3554079995u,
    1131014506u,
    879679996u,
    2909243462u,
    3663771856u,
    1141124467u,
    855842277u,
    2852801631u,
    3708648649u,
    1342533948u,
    654459306u,
    3188396048u,
    3373015174u,
    1466479909u,
    544179635u,
    3110523913u,
    3462522015u,
    1591671054u,
    702138776u,
    2966460450u,
    3352799412u,
    1504918807u,
    783551873u,
    3082640443u,
    3233442989u,
    3988292384u,
    2596254646u,
    62317068u,
    1957810842u,
    3939845945u,
    2647816111u,
    81470997u,
    1943803523u,
    3814918930u,
    2489596804u,
    225274430u,
    2053790376u,
    3826175755u,
    2466906013u,
    167816743u,
    2097651377u,
    4027552580u,
    2265490386u,
    503444072u,
    1762050814u,
    4150417245u,
    2154129355u,
    426522225u,
    1852507879u,
    4275313526u,
    2312317920u,
    282753626u,
    1742555852u,
    4189708143u,
    2394877945u,
    397917763u,
    1622183637u,
    3604390888u,
    2714866558u,
    953729732u,
    1340076626u,
    3518719985u,
    2797360999u,
    1068828381u,
    1219638859u,
    3624741850u,
    2936675148u,
    906185462u,
    1090812512u,
    3747672003u,
    2825379669u,
    829329135u,
    1181335161u,
    3412177804u,
    3160834842u,
    628085408u,
    1382605366u,
    3423369109u,
    3138078467u,
    570562233u,
    1426400815u,
    3317316542u,
    2998733608u,
    733239954u,
    1555261956u,
    3268935591u,
    3050360625u,
    752459403u,
    1541320221u,
    2607071920u,
    3965973030u,
    1969922972u,
    40735498u,
    2617837225u,
    3943577151u,
    1913087877u,
    83908371u,
    2512341634u,
    3803740692u,
    2075208622u,
    213261112u,
    2463272603u,
    3855990285u,
    2094854071u,
    198958881u,
    2262029012u,
    4057260610u,
    1759359992u,
    534414190u,
    2176718541u,
    4139329115u,
    1873836001u,
    414664567u,
    2282248934u,
    4279200368u,
    1711684554u,
    285281116u,
    2405801727u,
    4167216745u,
    1634467795u,
    376229701u,
    2685067896u,
    3608007406u,
    1308918612u,
    956543938u,
    2808555105u,
    3495958263u,
    1231636301u,
    1047427035u,
    2932959818u,
    3654703836u,
    1088359270u,
    936918000u,
    2847714899u,
    3736837829u,
    1202900863u,
    817233897u,
    3183342108u,
    3401237130u,
    1404277552u,
    615818150u,
    3134207493u,
    3453421203u,
    1423857449u,
    601450431u,
    3009837614u,
    3294710456u,
    1567103746u,
    711928724u,
    3020668471u,
    3272380065u,
    1510334235u,
    755167117u
  },
  {
    0u,
    421212481u,
    842424962u,
    724390851u,
    1684849924u,
    2105013317u,
    1448781702u,
    1329698503u,
    3369699848u,
    3519200073u,
    4210026634u,
    3824474571u,
    2897563404u,
    3048111693u,
    2659397006u,
    2274893007u,
    1254232657u,
    1406739216u,
    2029285587u,
    1643069842u,
    783210325u,
    934667796u,
    479770071u,
    92505238u,
    2182846553u,
    2600511768u,
    2955803355u,
    2838940570u,
    3866582365u,
    4285295644u,
    3561045983u,
    3445231262u,
    2508465314u,
    2359236067u,
    2813478432u,
    3198777185u,
    4058571174u,
    3908292839u,
    3286139684u,
    3670389349u,
    1566420650u,
    1145479147u,
    1869335592u,
    1987116393u,
    959540142u,
    539646703u,
    185010476u,
    303839341u,
    3745920755u,
    3327985586u,
    3983561841u,
    4100678960u,
    3140154359u,
    2721170102u,
    2300350837u,
    2416418868u,
    396344571u,
    243568058u,
    631889529u,
    1018359608u,
    1945336319u,
    1793607870u,
    1103436669u,
    1490954812u,
    4034481925u,
    3915546180u,
    3259968903u,
    3679722694u,
    2484439553u,
    2366552896u,
    2787371139u,
    3208174018u,
    950060301u,
    565965900u,
    177645455u,
    328046286u,
    1556873225u,
    1171730760u,
    1861902987u,
    2011255754u,
    3132841300u,
    2745199637u,
    2290958294u,
    2442530455u,
    3738671184u,
    3352078609u,
    3974232786u,
    4126854035u,
    1919080284u,
    1803150877u,
    1079293406u,
    1498383519u,
    370020952u,
    253043481u,
    607678682u,
    1025720731u,
    1711106983u,
    2095471334u,
    1472923941u,
    1322268772u,
    26324643u,
    411738082u,
    866634785u,
    717028704u,
    2904875439u,
    3024081134u,
    2668790573u,
    2248782444u,
    3376948395u,
    3495106026u,
    4219356713u,
    3798300520u,
    792689142u,
    908347575u,
    487136116u,
    68299317u,
    1263779058u,
    1380486579u,
    2036719216u,
    1618931505u,
    3890672638u,
    4278043327u,
    3587215740u,
    3435896893u,
    2206873338u,
    2593195963u,
    2981909624u,
    2829542713u,
    998479947u,
    580430090u,
    162921161u,
    279890824u,
    1609522511u,
    1190423566u,
    1842954189u,
    1958874764u,
    4082766403u,
    3930137346u,
    3245109441u,
    3631694208u,
    2536953671u,
    2385372678u,
    2768287173u,
    3155920004u,
    1900120602u,
    1750776667u,
    1131931800u,
    1517083097u,
    355290910u,
    204897887u,
    656092572u,
    1040194781u,
    3113746450u,
    2692952403u,
    2343461520u,
    2461357009u,
    3723805974u,
    3304059991u,
    4022511508u,
    4141455061u,
    2919742697u,
    3072101800u,
    2620513899u,
    2234183466u,
    3396041197u,
    3547351212u,
    4166851439u,
    3779471918u,
    1725839073u,
    2143618976u,
    1424512099u,
    1307796770u,
    45282277u,
    464110244u,
    813994343u,
    698327078u,
    3838160568u,
    4259225593u,
    3606301754u,
    3488152955u,
    2158586812u,
    2578602749u,
    2996767038u,
    2877569151u,
    740041904u,
    889656817u,
    506086962u,
    120682355u,
    1215357364u,
    1366020341u,
    2051441462u,
    1667084919u,
    3422213966u,
    3538019855u,
    4190942668u,
    3772220557u,
    2945847882u,
    3062702859u,
    2644537544u,
    2226864521u,
    52649286u,
    439905287u,
    823476164u,
    672009861u,
    1733269570u,
    2119477507u,
    1434057408u,
    1281543041u,
    2167981343u,
    2552493150u,
    3004082077u,
    2853541596u,
    3847487515u,
    4233048410u,
    3613549209u,
    3464057816u,
    1239502615u,
    1358593622u,
    2077699477u,
    1657543892u,
    764250643u,
    882293586u,
    532408465u,
    111204816u,
    1585378284u,
    1197851309u,
    1816695150u,
    1968414767u,
    974272232u,
    587794345u,
    136598634u,
    289367339u,
    2527558116u,
    2411481253u,
    2760973158u,
    3179948583u,
    4073438432u,
    3956313505u,
    3237863010u,
    3655790371u,
    347922877u,
    229101820u,
    646611775u,
    1066513022u,
    1892689081u,
    1774917112u,
    1122387515u,
    1543337850u,
    3697634229u,
    3313392372u,
    3998419255u,
    4148705398u,
    3087642289u,
    2702352368u,
    2319436851u,
    2468674930u
  },
  {
    0u,
    29518391u,
    59036782u,
    38190681u,
    118073564u,
    114017003u,
    76381362u,
    89069189u,
    236147128u,
    265370511u,
    228034006u,
    206958561u,
    152762724u,
    148411219u,
    178138378u,
    190596925u,
    472294256u,
    501532999u,
    530741022u,
    509615401u,
    456068012u,
    451764635u,
    413917122u,
    426358261u,
    305525448u,
    334993663u,
    296822438u,
    275991697u,
    356276756u,
    352202787u,
    381193850u,
    393929805u,
    944588512u,
    965684439u,
    1003065998u,
    973863097u,
    1061482044u,
    1049003019u,
    1019230802u,
    1023561829u,
    912136024u,
    933002607u,
    903529270u,
    874031361u,
    827834244u,
    815125939u,
    852716522u,
    856752605u,
    611050896u,
    631869351u,
    669987326u,
    640506825u,
    593644876u,
    580921211u,
    551983394u,
    556069653u,
    712553512u,
    733666847u,
    704405574u,
    675154545u,
    762387700u,
    749958851u,
    787859610u,
    792175277u,
    1889177024u,
    1901651959u,
    1931368878u,
    1927033753u,
    2006131996u,
    1985040171u,
    1947726194u,
    1976933189u,
    2122964088u,
    2135668303u,
    2098006038u,
    2093965857u,
    2038461604u,
    2017599123u,
    2047123658u,
    2076625661u,
    1824272048u,
    1836991623u,
    1866005214u,
    1861914857u,
    1807058540u,
    1786244187u,
    1748062722u,
    1777547317u,
    1655668488u,
    1668093247u,
    1630251878u,
    1625932113u,
    1705433044u,
    1684323811u,
    1713505210u,
    1742760333u,
    1222101792u,
    1226154263u,
    1263738702u,
    1251046777u,
    1339974652u,
    1310460363u,
    1281013650u,
    1301863845u,
    1187289752u,
    1191637167u,
    1161842422u,
    1149379777u,
    1103966788u,
    1074747507u,
    1112139306u,
    1133218845u,
    1425107024u,
    1429406311u,
    1467333694u,
    1454888457u,
    1408811148u,
    1379576507u,
    1350309090u,
    1371438805u,
    1524775400u,
    1528845279u,
    1499917702u,
    1487177649u,
    1575719220u,
    1546255107u,
    1584350554u,
    1605185389u,
    3778354048u,
    3774312887u,
    3803303918u,
    3816007129u,
    3862737756u,
    3892238699u,
    3854067506u,
    3833203973u,
    4012263992u,
    4007927823u,
    3970080342u,
    3982554209u,
    3895452388u,
    3924658387u,
    3953866378u,
    3932773565u,
    4245928176u,
    4241609415u,
    4271336606u,
    4283762345u,
    4196012076u,
    4225268251u,
    4187931714u,
    4166823541u,
    4076923208u,
    4072833919u,
    4035198246u,
    4047918865u,
    4094247316u,
    4123732899u,
    4153251322u,
    4132437965u,
    3648544096u,
    3636082519u,
    3673983246u,
    3678331705u,
    3732010428u,
    3753090955u,
    3723829714u,
    3694611429u,
    3614117080u,
    3601426159u,
    3572488374u,
    3576541825u,
    3496125444u,
    3516976691u,
    3555094634u,
    3525581405u,
    3311336976u,
    3298595879u,
    3336186494u,
    3340255305u,
    3260503756u,
    3281337595u,
    3251864226u,
    3222399125u,
    3410866088u,
    3398419871u,
    3368647622u,
    3372945905u,
    3427010420u,
    3448139075u,
    3485520666u,
    3456284973u,
    2444203584u,
    2423127159u,
    2452308526u,
    2481530905u,
    2527477404u,
    2539934891u,
    2502093554u,
    2497740997u,
    2679949304u,
    2659102159u,
    2620920726u,
    2650438049u,
    2562027300u,
    2574714131u,
    2603727690u,
    2599670141u,
    2374579504u,
    2353749767u,
    2383274334u,
    2412743529u,
    2323684844u,
    2336421851u,
    2298759554u,
    2294686645u,
    2207933576u,
    2186809023u,
    2149495014u,
    2178734801u,
    2224278612u,
    2236720739u,
    2266437690u,
    2262135309u,
    2850214048u,
    2820717207u,
    2858812622u,
    2879680249u,
    2934667388u,
    2938704459u,
    2909776914u,
    2897069605u,
    2817622296u,
    2788420399u,
    2759153014u,
    2780249921u,
    2700618180u,
    2704950259u,
    2742877610u,
    2730399645u,
    3049550800u,
    3020298727u,
    3057690558u,
    3078802825u,
    2999835404u,
    3004150075u,
    2974355298u,
    2961925461u,
    3151438440u,
    3121956959u,
    3092510214u,
    3113327665u,
    3168701108u,
    3172786307u,
    3210370778u,
    3197646061u
  },
  {
    0u,
    3099354981u,
    2852767883u,
    313896942u,
    2405603159u,
    937357362u,
    627793884u,
    2648127673u,
    3316918511u,
    2097696650u,
    1874714724u,
    3607201537u,
    1255587768u,
    4067088605u,
    3772741427u,
    1482887254u,
    1343838111u,
    3903140090u,
    4195393300u,
    1118632049u,
    3749429448u,
    1741137837u,
    1970407491u,
    3452858150u,
    2511175536u,
    756094997u,
    1067759611u,
    2266550430u,
    449832999u,
    2725482306u,
    2965774508u,
    142231497u,
    2687676222u,
    412010587u,
    171665333u,
    2995192016u,
    793786473u,
    2548850444u,
    2237264098u,
    1038456711u,
    1703315409u,
    3711623348u,
    3482275674u,
    1999841343u,
    3940814982u,
    1381529571u,
    1089329165u,
    4166106984u,
    4029413537u,
    1217896388u,
    1512189994u,
    3802027855u,
    2135519222u,
    3354724499u,
    3577784189u,
    1845280792u,
    899665998u,
    2367928107u,
    2677414085u,
    657096608u,
    3137160985u,
    37822588u,
    284462994u,
    2823350519u,
    2601801789u,
    598228824u,
    824021174u,
    2309093331u,
    343330666u,
    2898962447u,
    3195996129u,
    113467524u,
    1587572946u,
    3860600759u,
    4104763481u,
    1276501820u,
    3519211397u,
    1769898208u,
    2076913422u,
    3279374443u,
    3406630818u,
    1941006535u,
    1627703081u,
    3652755532u,
    1148164341u,
    4241751952u,
    3999682686u,
    1457141531u,
    247015245u,
    3053797416u,
    2763059142u,
    470583459u,
    2178658330u,
    963106687u,
    735213713u,
    2473467892u,
    992409347u,
    2207944806u,
    2435792776u,
    697522413u,
    3024379988u,
    217581361u,
    508405983u,
    2800865210u,
    4271038444u,
    1177467017u,
    1419450215u,
    3962007554u,
    1911572667u,
    3377213406u,
    3690561584u,
    1665525589u,
    1799331996u,
    3548628985u,
    3241568279u,
    2039091058u,
    3831314379u,
    1558270126u,
    1314193216u,
    4142438437u,
    2928380019u,
    372764438u,
    75645176u,
    3158189981u,
    568925988u,
    2572515393u,
    2346768303u,
    861712586u,
    3982079547u,
    1441124702u,
    1196457648u,
    4293663189u,
    1648042348u,
    3666298377u,
    3358779879u,
    1888390786u,
    686661332u,
    2421291441u,
    2196002399u,
    978858298u,
    2811169155u,
    523464422u,
    226935048u,
    3040519789u,
    3175145892u,
    100435649u,
    390670639u,
    2952089162u,
    841119475u,
    2325614998u,
    2553003640u,
    546822429u,
    2029308235u,
    3225988654u,
    3539796416u,
    1782671013u,
    4153826844u,
    1328167289u,
    1570739863u,
    3844338162u,
    1298864389u,
    4124540512u,
    3882013070u,
    1608431339u,
    3255406162u,
    2058742071u,
    1744848601u,
    3501990332u,
    2296328682u,
    811816591u,
    584513889u,
    2590678532u,
    129869501u,
    3204563416u,
    2914283062u,
    352848211u,
    494030490u,
    2781751807u,
    3078325777u,
    264757620u,
    2450577869u,
    715964072u,
    941166918u,
    2158327331u,
    3636881013u,
    1618608400u,
    1926213374u,
    3396585883u,
    1470427426u,
    4011365959u,
    4255988137u,
    1158766284u,
    1984818694u,
    3471935843u,
    3695453837u,
    1693991400u,
    4180638033u,
    1100160564u,
    1395044826u,
    3952793279u,
    3019491049u,
    189112716u,
    435162722u,
    2706139399u,
    1016811966u,
    2217162459u,
    2526189877u,
    774831696u,
    643086745u,
    2666061564u,
    2354934034u,
    887166583u,
    2838900430u,
    294275499u,
    54519365u,
    3145957664u,
    3823145334u,
    1532818963u,
    1240029693u,
    4048895640u,
    1820460577u,
    3560857924u,
    3331051178u,
    2117577167u,
    3598663992u,
    1858283101u,
    2088143283u,
    3301633750u,
    1495127663u,
    3785470218u,
    4078182116u,
    1269332353u,
    332098007u,
    2876706482u,
    3116540252u,
    25085497u,
    2628386432u,
    605395429u,
    916469259u,
    2384220526u,
    2254837415u,
    1054503362u,
    745528876u,
    2496903497u,
    151290352u,
    2981684885u,
    2735556987u,
    464596510u,
    1137851976u,
    4218313005u,
    3923506883u,
    1365741990u,
    3434129695u,
    1946996346u,
    1723425172u,
    3724871409u
  },
  {
    0u,
    2519730039u,
    744558318u,
    3125873049u,
    432303367u,
    2415159920u,
    900031465u,
    2744476830u,
    847829774u,
    2763578489u,
    518641120u,
    2295976599u,
    726447625u,
    3179065726u,
    120436967u,
    2434645904u,
    1678817053u,
    4062228586u,
    1215412723u,
    3728850564u,
    2111101466u,
    3957644653u,
    1370871028u,
    3347436419u,
    1452829715u,
    3232263012u,
    2063164157u,
    3972621706u,
    1331429652u,
    3647735395u,
    1664946170u,
    4111272077u,
    3357568571u,
    1578133836u,
    3829489877u,
    1920034722u,
    3521381180u,
    1205077067u,
    4253355474u,
    1807026853u,
    4205360437u,
    1821946434u,
    3603545051u,
    1090108588u,
    3815561266u,
    1969020741u,
    3473790684u,
    1497223595u,
    2888882470u,
    973135441u,
    2152847304u,
    375509183u,
    3052712993u,
    600093526u,
    2576726735u,
    262520248u,
    2662859304u,
    143131999u,
    3000569030u,
    619252657u,
    2273079087u,
    290220120u,
    2870829505u,
    1026385590u,
    2420235382u,
    108124929u,
    3156267672u,
    705746415u,
    2307240305u,
    532002310u,
    2783231903u,
    869578984u,
    2731083640u,
    888733711u,
    2393377174u,
    412618465u,
    3138218623u,
    759000328u,
    2540463249u,
    22832102u,
    4098976619u,
    1650551836u,
    3627050373u,
    1308648178u,
    3985966700u,
    2074411291u,
    3253995650u,
    1472466933u,
    3336155237u,
    1357494034u,
    3937975947u,
    2089335292u,
    3743276386u,
    1227741717u,
    4085044108u,
    1699534075u,
    1482797645u,
    3461461306u,
    1946205347u,
    3794844628u,
    1101389642u,
    3616921661u,
    1841615268u,
    4227126995u,
    1793681731u,
    4242107956u,
    1183344557u,
    3501744346u,
    1932330052u,
    3843883827u,
    1598818986u,
    3380350429u,
    1014039888u,
    2856387111u,
    269487038u,
    2250247369u,
    632645719u,
    3011866400u,
    164914873u,
    2682544590u,
    251256414u,
    2563365161u,
    580440240u,
    3030964167u,
    389919577u,
    2165158958u,
    995933623u,
    2909584064u,
    545503469u,
    3065233306u,
    216184323u,
    2597499252u,
    961009130u,
    2943865501u,
    354867972u,
    2199313523u,
    302736355u,
    2218484884u,
    1047162125u,
    2824497786u,
    198119140u,
    2650737043u,
    665714698u,
    2979923837u,
    1150488560u,
    3533899911u,
    1760690462u,
    4274128489u,
    1566008055u,
    3412551040u,
    1899392025u,
    3875957614u,
    1981535486u,
    3760968585u,
    1518000656u,
    3427458407u,
    1876933113u,
    4193238670u,
    1136572183u,
    3582898272u,
    3903051478u,
    2123616673u,
    3301103672u,
    1391648591u,
    4050107345u,
    1733803174u,
    3708204351u,
    1261875784u,
    3660254680u,
    1276840623u,
    4132045622u,
    1618609217u,
    3287245023u,
    1440704424u,
    4019088945u,
    2042521926u,
    2360566219u,
    444819132u,
    2698145573u,
    920807506u,
    2507607244u,
    54987707u,
    3105227298u,
    791020885u,
    3191585477u,
    671858098u,
    2455417899u,
    74101596u,
    2818561986u,
    835702965u,
    2342443308u,
    497999451u,
    2965529755u,
    653419500u,
    2627955317u,
    177433858u,
    2835745180u,
    1060507371u,
    2238121842u,
    324468741u,
    2185936789u,
    343587042u,
    2922099067u,
    941340172u,
    2609828498u,
    230610405u,
    3085950076u,
    568318731u,
    3570586502u,
    1122161905u,
    4172537192u,
    1854134815u,
    3440819841u,
    1529264630u,
    3782717551u,
    2001188632u,
    3864660104u,
    1885999103u,
    3392865894u,
    1544225041u,
    4288570767u,
    1773036280u,
    3556731745u,
    1171221526u,
    2028079776u,
    4006743511u,
    1417872462u,
    3266511673u,
    1629906855u,
    4145438928u,
    1296525641u,
    3682037310u,
    1248514478u,
    3696940761u,
    1712054080u,
    4030453815u,
    1403960489u,
    3315514334u,
    2144318023u,
    3925849392u,
    485670333u,
    2328017610u,
    814986067u,
    2795746340u,
    87478458u,
    2466699213u,
    693624404u,
    3211254051u,
    779773619u,
    3091882436u,
    35350621u,
    2485874474u,
    935201716u,
    2710441155u,
    467600730u,
    2381251117u
  },
  {
    0u,
    1093737241u,
    2187474482u,
    3277008171u,
    80047204u,
    1173649277u,
    2259114582u,
    3348513103u,
    143317448u,
    1237041873u,
    2330521594u,
    3420058851u,
    206550444u,
    1300147893u,
    2385347486u,
    3474757767u,
    1360183882u,
    270784851u,
    3547395192u,
    2453794657u,
    1440198190u,
    350663991u,
    3619002396u,
    2525266693u,
    1503140738u,
    413728923u,
    3690606000u,
    2597009065u,
    1566406630u,
    476867839u,
    3745464788u,
    2651740877u,
    2720302229u,
    3809845132u,
    541504167u,
    1635232190u,
    2799823089u,
    3889230824u,
    612622019u,
    1706214874u,
    2863553885u,
    3953083972u,
    684485487u,
    1778217078u,
    2926260537u,
    4015663648u,
    738789131u,
    1832393746u,
    4080420575u,
    2986827206u,
    1901359341u,
    811953140u,
    4159908539u,
    3066180002u,
    1972444297u,
    882902928u,
    4223442711u,
    3129836558u,
    2044635429u,
    955232828u,
    4286182259u,
    3192449130u,
    2098971969u,
    1009442392u,
    89094640u,
    1149133545u,
    2267893698u,
    3323745499u,
    25826708u,
    1086000781u,
    2213028774u,
    3269015743u,
    231055416u,
    1291107105u,
    2410124810u,
    3465973011u,
    151047260u,
    1211225925u,
    2338519662u,
    3394494839u,
    1415429050u,
    359440547u,
    3594489224u,
    2534315665u,
    1352194014u,
    296340679u,
    3539657196u,
    2479618805u,
    1557619314u,
    501643627u,
    3736425536u,
    2676248409u,
    1477578262u,
    421729551u,
    3664787492u,
    2604737341u,
    2808872293u,
    3864716924u,
    621398871u,
    1681444942u,
    2746126593u,
    3802106392u,
    567060275u,
    1627241514u,
    2950767789u,
    4006625204u,
    763564703u,
    1823607174u,
    2871281865u,
    3927266256u,
    692485883u,
    1752655330u,
    4135141167u,
    3074958390u,
    1947928861u,
    891949572u,
    4072428363u,
    3012380754u,
    1893623161u,
    837779040u,
    4277397223u,
    3217227262u,
    2089930965u,
    1033948108u,
    4197878403u,
    3137835418u,
    2018819249u,
    962963368u,
    1268286267u,
    178886690u,
    3388650761u,
    2295049744u,
    1331556191u,
    242021446u,
    3443513709u,
    2349777524u,
    1125276403u,
    35865066u,
    3245370561u,
    2151774168u,
    1205286551u,
    115748238u,
    3316973733u,
    2223250364u,
    445268337u,
    1539005032u,
    2565371715u,
    3654904922u,
    508505365u,
    1602106892u,
    2620201767u,
    3709599806u,
    302028985u,
    1395753888u,
    2422386315u,
    3511924114u,
    382072029u,
    1475669956u,
    2494022383u,
    3583433206u,
    3921414062u,
    2827820215u,
    1809723804u,
    720317061u,
    3984157642u,
    2890428627u,
    1864064504u,
    774522593u,
    3778469478u,
    2684863871u,
    1666508884u,
    577106765u,
    3857953282u,
    2764220699u,
    1737589808u,
    648060713u,
    3098461668u,
    4188004093u,
    986510294u,
    2080237775u,
    3161172352u,
    4250579609u,
    1040818098u,
    2134410411u,
    2955156524u,
    4044687157u,
    843459102u,
    1937191175u,
    3034673224u,
    4124076881u,
    914572922u,
    2008178019u,
    1322777291u,
    266789330u,
    3434466553u,
    2374293472u,
    1242732207u,
    186879414u,
    3362824349u,
    2302786436u,
    1180508931u,
    124532762u,
    3292468529u,
    2232290856u,
    1117278055u,
    61428862u,
    3237640533u,
    2177589836u,
    533018753u,
    1593058200u,
    2644971187u,
    3700823466u,
    453006565u,
    1513181180u,
    2573361879u,
    3629349326u,
    391110985u,
    1451162192u,
    2502809467u,
    3558657122u,
    327847213u,
    1388025396u,
    2447948575u,
    3503923206u,
    3975380574u,
    2915198279u,
    1855015020u,
    799036277u,
    3895857722u,
    2835810595u,
    1783899144u,
    728055569u,
    3833178006u,
    2773007503u,
    1713082788u,
    657099453u,
    3770469362u,
    2710425835u,
    1658781120u,
    602924761u,
    3185687572u,
    4241532685u,
    1065585190u,
    2125631807u,
    3106197616u,
    4162177897u,
    994502210u,
    2054683995u,
    3043714524u,
    4099571397u,
    923358190u,
    1983400183u,
    2980972984u,
    4036956833u,
    869023626u,
    1929192595u
  },
  {
    0u,
    929743361u,
    1859421187u,
    1505641986u,
    3701999879u,
    3955411718u,
    2994507012u,
    2232831749u,
    3092321038u,
    2403062031u,
    3599079181u,
    3790558476u,
    1694046729u,
    1402198024u,
    170761738u,
    1028086795u,
    1889740316u,
    1204413469u,
    511156767u,
    689791006u,
    2886414107u,
    2606886170u,
    3269438232u,
    4122306841u,
    3371316498u,
    4288214803u,
    2787553553u,
    2437706512u,
    341457941u,
    590413332u,
    2056173590u,
    1306819095u,
    3762703672u,
    3610021689u,
    2391984443u,
    3120040762u,
    1022247999u,
    193234494u,
    1379582012u,
    1699742269u,
    1477926454u,
    1870502967u,
    918805045u,
    27858996u,
    2227132209u,
    3017119024u,
    3932934962u,
    3707834675u,
    2430954276u,
    2811210021u,
    4264685351u,
    3378195750u,
    1280139811u,
    2066194466u,
    580511264u,
    368256033u,
    682915882u,
    534690347u,
    1180761129u,
    1896496680u,
    4095504685u,
    3279336236u,
    2596861230u,
    2913089327u,
    3230505584u,
    4159133809u,
    2925076083u,
    2570312818u,
    472224631u,
    726618486u,
    1928402804u,
    1167840629u,
    2027719038u,
    1337346943u,
    369626493u,
    560123772u,
    2759098489u,
    2468233848u,
    3399484538u,
    4257924731u,
    2955852908u,
    2269412973u,
    3740940399u,
    3918592622u,
    1820767595u,
    1542223722u,
    38941032u,
    892924777u,
    142585698u,
    1058368867u,
    1722493793u,
    1371662688u,
    3570902629u,
    3820840036u,
    3120767590u,
    2372526183u,
    550229832u,
    396432713u,
    1310675787u,
    2037748042u,
    4234403407u,
    3406371918u,
    2461489740u,
    2782763085u,
    2560279622u,
    2951743047u,
    4132323397u,
    3240395332u,
    1144180033u,
    1935150912u,
    719735106u,
    495749955u,
    1349054804u,
    1728197461u,
    1052538199u,
    165066582u,
    2361456723u,
    3148495442u,
    3792993360u,
    3581853265u,
    3896107610u,
    3746766939u,
    2263705177u,
    2978456664u,
    881978205u,
    66791772u,
    1514499934u,
    1831841119u,
    2149266913u,
    3077699552u,
    4006588898u,
    3651498979u,
    1555250406u,
    1809448679u,
    845658341u,
    84769508u,
    944383727u,
    253813998u,
    1453236972u,
    1643405549u,
    3840028648u,
    3548966377u,
    2318838763u,
    3176950250u,
    4038595581u,
    3352482300u,
    2657916926u,
    2835764735u,
    739252986u,
    461035771u,
    1120182009u,
    1974361336u,
    1223229683u,
    2139341554u,
    641565936u,
    290932465u,
    2487290356u,
    2737556469u,
    4204105207u,
    3456061430u,
    1616738521u,
    1463270104u,
    243924186u,
    971194075u,
    3170202078u,
    2342499295u,
    3525440989u,
    3846911964u,
    3624692695u,
    4016482774u,
    3067670484u,
    2175938005u,
    77882064u,
    869179601u,
    1785784019u,
    1561994450u,
    285105861u,
    664050884u,
    2116737734u,
    1228937415u,
    3428210626u,
    4215051715u,
    2726482881u,
    2515014080u,
    2830061003u,
    2680524746u,
    3330001352u,
    4044426185u,
    1946633420u,
    1131251405u,
    450085071u,
    767099598u,
    1083617169u,
    2013031824u,
    776088466u,
    422111635u,
    2621351574u,
    2874434711u,
    4075430549u,
    3313557652u,
    4173839519u,
    3484253854u,
    2517842076u,
    2709125789u,
    611300760u,
    319125401u,
    1253781915u,
    2110911386u,
    808814989u,
    123685772u,
    1591807374u,
    1770770319u,
    3969745034u,
    3690414731u,
    2185823369u,
    3039020680u,
    2288294531u,
    3205388418u,
    3870301824u,
    3520781441u,
    1422693252u,
    1671844229u,
    974657415u,
    225629574u,
    2698044073u,
    2545557672u,
    3456394922u,
    4184777899u,
    2088299438u,
    1259481519u,
    313290669u,
    633777580u,
    411169191u,
    803943334u,
    1985312164u,
    1094694821u,
    3291084960u,
    4081269409u,
    2868739235u,
    2643967650u,
    3497247925u,
    3877177012u,
    3198632118u,
    2311946935u,
    215731634u,
    1001459635u,
    1645169073u,
    1432718256u,
    1747113915u,
    1598559674u,
    116806584u,
    832344505u,
    3028999868u,
    2212502717u,
    3663616703u,
    3979647166u
  },
  {
    0u,
    1701297336u,
    2345142698u,
    4004492562u,
    1469538959u,
    854646327u,
    3697240869u,
    3107510173u,
    4012422341u,
    2320435325u,
    1692450159u,
    25625047u,
    3099579978u,
    3721947890u,
    863494112u,
    1443914584u,
    2673285456u,
    4197492200u,
    345968890u,
    1912122434u,
    3368057823u,
    2913453927u,
    1124627061u,
    644861645u,
    1887415701u,
    353898797u,
    4223116351u,
    2664437895u,
    669568794u,
    1116697506u,
    2887829168u,
    3376904712u,
    1051669152u,
    1539870232u,
    3043441418u,
    3489695666u,
    1765298223u,
    207613079u,
    3807402373u,
    2274878781u,
    3515319909u,
    3034594013u,
    1515163599u,
    1059599223u,
    2249254122u,
    3816249426u,
    232320320u,
    1757368824u,
    2717395952u,
    3298793288u,
    707797594u,
    1331142370u,
    4134488447u,
    2466837959u,
    2108113109u,
    415300717u,
    1322295093u,
    733422477u,
    3306722975u,
    2692688423u,
    424148410u,
    2082488578u,
    2458907664u,
    4159195304u,
    1029182619u,
    1480566819u,
    3062897969u,
    3556221321u,
    1791981076u,
    262720172u,
    3775365054u,
    2220933894u,
    3530596446u,
    3071745254u,
    1505274356u,
    1021252940u,
    2246558417u,
    3766517353u,
    238013307u,
    1799911363u,
    2718895563u,
    3345527155u,
    700908641u,
    1285601497u,
    4120407876u,
    2432685052u,
    2119198446u,
    456645206u,
    1294448910u,
    675284406u,
    3337597092u,
    2743602204u,
    447798145u,
    2144823097u,
    2440614443u,
    4095700627u,
    66528827u,
    1720752771u,
    2285842321u,
    3982005033u,
    1415595188u,
    822605836u,
    3752348958u,
    3134189990u,
    3974075134u,
    2310549062u,
    1729600340u,
    40904684u,
    3142119537u,
    3727641801u,
    813758939u,
    1441219939u,
    2627747691u,
    4190602195u,
    392705729u,
    1913621113u,
    3409403364u,
    2924536156u,
    1090475086u,
    630778102u,
    1938328494u,
    384775958u,
    4164977156u,
    2636594876u,
    606071073u,
    1098405273u,
    2950160523u,
    3400555571u,
    1001806317u,
    1590814037u,
    2961068103u,
    3575246079u,
    1814117218u,
    155617242u,
    3890819784u,
    2190380656u,
    3567185192u,
    2985906576u,
    1599530114u,
    976312378u,
    2198441895u,
    3865981727u,
    146900493u,
    1839610549u,
    2766225597u,
    3246849029u,
    791234839u,
    1246688687u,
    4084605490u,
    2517737098u,
    2025728920u,
    500799264u,
    1271526520u,
    783173824u,
    3221355986u,
    2774942058u,
    475961079u,
    2033789519u,
    2543230813u,
    4075889637u,
    85551949u,
    1618925557u,
    2396087015u,
    3954630239u,
    1385040322u,
    938063226u,
    3645243496u,
    3156327632u,
    3929137032u,
    2404803376u,
    1643763234u,
    77490842u,
    3181821191u,
    3636527551u,
    913224877u,
    1393100821u,
    2588832285u,
    4280929957u,
    294026167u,
    1960953615u,
    3453554834u,
    2831068202u,
    1175525688u,
    594978176u,
    1969669848u,
    268532320u,
    4272869234u,
    2613670858u,
    586261591u,
    1201019119u,
    2839129597u,
    3428716869u,
    116280694u,
    1669984718u,
    2368095452u,
    3896637540u,
    1366896633u,
    874419009u,
    3669042771u,
    3218512619u,
    3922131379u,
    2359379211u,
    1645146137u,
    124341409u,
    3193019196u,
    3677759364u,
    899256982u,
    1358835246u,
    2579059750u,
    4242466974u,
    309419404u,
    1997988148u,
    3459135145u,
    2873723409u,
    1172717315u,
    545358779u,
    1989271779u,
    334912603u,
    4250528073u,
    2554222065u,
    554074732u,
    1147223764u,
    2865662918u,
    3483973502u,
    943816662u,
    1562821486u,
    3012130428u,
    3605973700u,
    1876303193u,
    179413473u,
    3827176691u,
    2172233803u,
    3614034707u,
    2987292587u,
    1554105017u,
    969309697u,
    2164173212u,
    3852014884u,
    188129334u,
    1850809486u,
    2803263110u,
    3262241342u,
    752774956u,
    1236915092u,
    4034987017u,
    2514925745u,
    2068385187u,
    506376475u,
    1212076611u,
    760835835u,
    3287735273u,
    2794547025u,
    531214540u,
    2060323956u,
    2489432422u,
    4043703774u
  }
}; // idb
const unsigned __int16 lbase[31] =
{
  3u,
  4u,
  5u,
  6u,
  7u,
  8u,
  9u,
  10u,
  11u,
  13u,
  15u,
  17u,
  19u,
  23u,
  27u,
  31u,
  35u,
  43u,
  51u,
  59u,
  67u,
  83u,
  99u,
  115u,
  131u,
  163u,
  195u,
  227u,
  258u,
  0u,
  0u
}; // idb
const unsigned __int16 lext[31] =
{
  16u,
  16u,
  16u,
  16u,
  16u,
  16u,
  16u,
  16u,
  17u,
  17u,
  17u,
  17u,
  18u,
  18u,
  18u,
  18u,
  19u,
  19u,
  19u,
  19u,
  20u,
  20u,
  20u,
  20u,
  21u,
  21u,
  21u,
  21u,
  16u,
  199u,
  198u
}; // idb
const unsigned __int16 dbase[32] =
{
  1u,
  2u,
  3u,
  4u,
  5u,
  7u,
  9u,
  13u,
  17u,
  25u,
  33u,
  49u,
  65u,
  97u,
  129u,
  193u,
  257u,
  385u,
  513u,
  769u,
  1025u,
  1537u,
  2049u,
  3073u,
  4097u,
  6145u,
  8193u,
  12289u,
  16385u,
  24577u,
  0u,
  0u
}; // idb
const unsigned __int16 dext[32] =
{
  16u,
  16u,
  16u,
  16u,
  17u,
  17u,
  18u,
  18u,
  19u,
  19u,
  20u,
  20u,
  21u,
  21u,
  22u,
  22u,
  23u,
  23u,
  24u,
  24u,
  25u,
  25u,
  26u,
  26u,
  27u,
  27u,
  28u,
  28u,
  29u,
  29u,
  64u,
  64u
}; // idb
int (__thiscall *NiImageReader::`vftable')(void *p, char) = &NiBMPReader::`scalar deleting destructor'; // weak
int (__thiscall *NiPNGReader::`vftable')(void *p, char) = &NiPNGReader::`scalar deleting destructor'; // weak
const long double version =  502.0; // idb
luaL_Reg loadedlibs[11] =
{
  { "_G", &luaopen_base },
  { "package", &luaopen_package },
  { "coroutine", &luaopen_coroutine },
  { "table", &luaopen_table },
  { "io", &luaopen_io },
  { "os", &luaopen_os },
  { "string", &luaopen_string },
  { "bit32", &luaopen_bit32 },
  { "math", &luaopen_math },
  { "debug", &luaopen_debug },
  { NULL, NULL }
}; // idb
lua_TValue luaO_nilobject_ = { { { { NULL }, 2146936064 } } }; // idb
const char log_2[256] =
{
  '\0',
  '\x01',
  '\x02',
  '\x02',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x04',
  '\x04',
  '\x04',
  '\x04',
  '\x04',
  '\x04',
  '\x04',
  '\x04',
  '\x05',
  '\x05',
  '\x05',
  '\x05',
  '\x05',
  '\x05',
  '\x05',
  '\x05',
  '\x05',
  '\x05',
  '\x05',
  '\x05',
  '\x05',
  '\x05',
  '\x05',
  '\x05',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\x06',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\a',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b',
  '\b'
}; // idb
char a____3[4] = "..."; // weak
char *off_9D3290[11] =
{
  "nil",
  "boolean",
  "userdata",
  "number",
  "string",
  "table",
  "function",
  "userdata",
  "thread",
  "proto",
  "upval"
}; // weak
const char *const luaT_eventname[17] =
{
  "__index",
  "__newindex",
  "__gc",
  "__mode",
  "__len",
  "__eq",
  "__add",
  "__sub",
  "__mul",
  "__div",
  "__mod",
  "__pow",
  "__unm",
  "__lt",
  "__le",
  "__concat",
  "__call"
}; // idb
Node dummynode_ = { { { { { NULL }, 2146936064 } } }, { { { { { NULL }, 2146936064 } }, NULL } } }; // idb
const char *const hooknames[5] = { "call", "return", "line", "count", "tail call" }; // idb
luaL_Reg dblib[17] =
{
  { "debug", &db_debug },
  { "getuservalue", &db_getuservalue },
  { "gethook", &db_gethook },
  { "getinfo", &db_getinfo },
  { "getlocal", &db_getlocal },
  { "getregistry", &db_getregistry },
  { "getmetatable", &db_getmetatable },
  { "getupvalue", &db_getupvalue },
  { "upvaluejoin", &db_upvaluejoin },
  { "upvalueid", &db_upvalueid },
  { "setuservalue", &db_setuservalue },
  { "sethook", &db_sethook },
  { "setlocal", &db_setlocal },
  { "setmetatable", &db_setmetatable },
  { "setupvalue", &db_setupvalue },
  { "traceback", &db_traceback },
  { NULL, NULL }
}; // idb
luaL_Reg mathlib[28] =
{
  { "abs", &math_abs },
  { "acos", &math_acos },
  { "asin", &math_asin },
  { "atan2", &math_atan2 },
  { "atan", &math_atan },
  { "ceil", &math_ceil },
  { "cosh", &math_cosh },
  { "cos", &math_cos },
  { "deg", &math_deg },
  { "exp", &math_exp },
  { "floor", &math_floor },
  { "fmod", &math_fmod },
  { "frexp", &math_frexp },
  { "ldexp", &math_ldexp },
  { "log", &math_log },
  { "max", &math_max },
  { "min", &math_min },
  { "modf", &math_modf },
  { "pow", &math_pow },
  { "rad", &math_rad },
  { "random", &math_random },
  { "randomseed", &math_randomseed },
  { "sinh", &math_sinh },
  { "sin", &math_sin },
  { "sqrt", &math_sqrt },
  { "tanh", &math_tanh },
  { "tan", &math_tan },
  { NULL, NULL }
}; // idb
luaL_Reg bitlib[13] =
{
  { "arshift", &b_arshift },
  { "band", &b_and },
  { "bnot", &b_not },
  { "bor", &b_or },
  { "bxor", &b_xor },
  { "btest", &b_test },
  { "extract", &b_extract },
  { "lrotate", &b_lrot },
  { "lshift", &b_lshift },
  { "replace", &b_replace },
  { "rrotate", &b_rrot },
  { "rshift", &b_rshift },
  { NULL, NULL }
}; // idb
luaL_Reg strlib[15] =
{
  { "byte", &str_byte },
  { "char", &str_char },
  { "dump", &str_dump },
  { "find", &str_find },
  { "format", &str_format },
  { "gmatch", &gmatch },
  { "gsub", &str_gsub },
  { "len", &str_len },
  { "lower", &str_lower },
  { "match", &str_match },
  { "rep", &str_rep },
  { "reverse", &str_reverse },
  { "sub", &str_sub },
  { "upper", &str_upper },
  { NULL, NULL }
}; // idb
const char *const options[2] = { "aAbBcdHIjmMpSUwWxXyYz%", &byte_96F8EB }; // idb
void *off_9D3FEC = &byte_96F8EB; // weak
const int cat[6] = { 0, 1, 2, 3, 4, 5 }; // idb
const char *const catnames[7] = { "all", "collate", "ctype", "monetary", "numeric", "time", NULL }; // idb
luaL_Reg syslib[12] =
{
  { "clock", &os_clock },
  { "date", &os_date },
  { "difftime", &os_difftime },
  { "execute", &os_execute },
  { "exit", &os_exit },
  { "getenv", &os_getenv },
  { "remove", &os_remove },
  { "rename", &os_rename },
  { "setlocale", &os_setlocale },
  { "time", &os_time },
  { "tmpname", &os_tmpname },
  { NULL, NULL }
}; // idb
const int mode[3] = { 0, 1, 2 }; // idb
const char *const modenames[4] = { "set", "cur", "end", NULL }; // idb
const int mode_0[3] = { 4, 0, 64 }; // idb
const char *const modenames_0[4] = { "no", "full", "line", NULL }; // idb
luaL_Reg iolib[12] =
{
  { "close", &io_close },
  { "flush", &io_flush },
  { "input", &io_input },
  { "lines", &io_lines },
  { "open", &io_open },
  { "output", &io_output },
  { "popen", &io_popen },
  { "read", &io_read },
  { "tmpfile", &io_tmpfile },
  { "type", &io_type },
  { "write", &io_write },
  { NULL, NULL }
}; // idb
luaL_Reg flib[10] =
{
  { "close", &io_close },
  { "flush", &f_flush },
  { "lines", &f_lines },
  { "read", &f_read },
  { "seek", &f_seek },
  { "setvbuf", &f_setvbuf },
  { "write", &f_write },
  { "__gc", &f_gc },
  { "__tostring", &f_tostring },
  { NULL, NULL }
}; // idb
luaL_Reg tab_funcs[7] =
{
  { "concat", &tconcat },
  { "insert", &tinsert },
  { "pack", &pack },
  { "unpack", &unpack },
  { "remove", &tremove },
  { "sort", &sort },
  { NULL, NULL }
}; // idb
luaL_Reg co_funcs[7] =
{
  { "create", &luaB_cocreate },
  { "resume", &luaB_coresume },
  { "running", &luaB_corunning },
  { "status", &luaB_costatus },
  { "wrap", &luaB_cowrap },
  { "yield", &luaB_yield },
  { NULL, NULL }
}; // idb
luaL_Reg pk_funcs[3] = { { "loadlib", &ll_loadlib }, { "searchpath", &ll_searchpath }, { NULL, NULL } }; // idb
luaL_Reg ll_funcs[2] = { { "require", &ll_require }, { NULL, NULL } }; // idb
int (__cdecl *const searchers[5])(lua_State *) = { &searcher_preload, &searcher_Lua, &searcher_C, &searcher_Croot, NULL }; // idb
char byte_9D479C = '\x01'; // idb
char aPcall[6] = "pcall"; // weak
const char *const opts[12] =
{
  "stop",
  "restart",
  "collect",
  "count",
  "step",
  "setpause",
  "setstepmul",
  "setmajorinc",
  "isrunning",
  "generational",
  "incremental",
  NULL
}; // idb
const int optsnum[11] = { 0, 1, 2, 3, 5, 6, 7, 8, 9, 10, 11 }; // idb
luaL_Reg base_funcs[23] =
{
  { "assert", &luaB_assert },
  { "collectgarbage", &luaB_collectgarbage },
  { "dofile", &luaB_dofile },
  { "error", &luaB_error },
  { "getmetatable", &luaB_getmetatable },
  { "ipairs", &luaB_ipairs },
  { "loadfile", &luaB_loadfile },
  { "load", &luaB_load },
  { "next", &luaB_next },
  { "pairs", &luaB_pairs },
  { "pcall", &luaB_pcall },
  { "print", &luaB_print },
  { "rawequal", &luaB_rawequal },
  { "rawlen", &luaB_rawlen },
  { "rawget", &luaB_rawget },
  { "rawset", &luaB_rawset },
  { "select", &luaB_select },
  { "setmetatable", &luaB_setmetatable },
  { "tonumber", &luaB_tonumber },
  { "tostring", &luaB_tostring },
  { "type", &luaB_type },
  { "xpcall", &luaB_xpcall },
  { NULL, NULL }
}; // idb
const char *const luaX_tokens[33] =
{
  "and",
  "break",
  "do",
  "else",
  "elseif",
  "end",
  "false",
  "for",
  "function",
  "goto",
  "if",
  "in",
  "local",
  "nil",
  "not",
  "or",
  "repeat",
  "return",
  "then",
  "true",
  "until",
  "while",
  "..",
  "...",
  "==",
  ">=",
  "<=",
  "~=",
  "::",
  "<eof>",
  "<number>",
  "<name>",
  "<string>"
}; // idb
char byte_9D4E79[] = { '\0' }; // weak
$346E9CE2A8D7888D5091AC1B7AE5459B priority[15] =
{
  { '\x06', '\x06' },
  { '\x06', '\x06' },
  { '\a', '\a' },
  { '\a', '\a' },
  { '\a', '\a' },
  { '\n', '\t' },
  { '\x05', '\x04' },
  { '\x03', '\x03' },
  { '\x03', '\x03' },
  { '\x03', '\x03' },
  { '\x03', '\x03' },
  { '\x03', '\x03' },
  { '\x03', '\x03' },
  { '\x02', '\x02' },
  { '\x01', '\x01' }
}; // idb
char luaP_opmodes[] = { '`' }; // weak
GUID IID_IUnknown = { 0u, 0u, 0u, "ÀF" };
GUID IID_IDispatch = { 132096u, 0u, 0u, "ÀF" };
GUID IID_IOleClientSite = { 280u, 0u, 0u, "ÀF" };
GUID IID_IOleObject = { 274u, 0u, 0u, "ÀF" };
GUID IID_IOleWindow = { 276u, 0u, 0u, "ÀF" };
GUID IID_IOleInPlaceUIWindow = { 277u, 0u, 0u, "ÀF" };
GUID IID_IOleInPlaceFrame = { 278u, 0u, 0u, "ÀF" };
GUID IID_IOleInPlaceObject = { 275u, 0u, 0u, "ÀF" };
GUID IID_IOleInPlaceSite = { 281u, 0u, 0u, "ÀF" };
GUID IID_IConnectionPointContainer = { 2979443332u, 47796u, 4122u, "¶œª4\x1D\a" };
GUID IID_IOleControlSite = { 2979443337u, 47796u, 4122u, "¶œª4\x1D\a" };
GUID IID_IPersistStreamInit = { 2144674688u, 19975u, 4123u, "®-\b+.Ç\x13" };
GUID IID_IWebBrowser2 = { 3540784737u, 52655u, 4560u, "Š>ÀOÉân" };
GUID DIID_DWebBrowserEvents2 = { 883365280u, 25991u, 4560u, "’J ¯Ç¬M" };
int (__thiscall *std::out_of_range::`vftable')(void *p, char) = &std::out_of_range::`vector deleting destructor'; // weak
int (__thiscall *std::error_category::`vftable')(void *p, char) = &std::_System_error_category::`scalar deleting destructor'; // weak
const __int64 std::_BADOFF = -1i64; // weak
const wchar_t *const mods[15] =
{
  L"r",
  L"w",
  L"w",
  L"a",
  L"rb",
  L"wb",
  L"wb",
  L"ab",
  L"r+",
  L"w+",
  L"a+",
  L"r+b",
  L"w+b",
  L"a+b",
  NULL
}; // idb
const int `std::_Xfiopen<wchar_t>'::`2'::valid[15] = { 1, 2, 18, 10, 33, 34, 50, 42, 3, 19, 11, 35, 51, 43, 0 }; // idb
int dword_9D5778[] = { 2 }; // weak
int (__thiscall *std::exception::`vftable')(void *p, char) = &std::bad_cast::`vector deleting destructor'; // weak
GUID CLSID_FilterGraph = { 3828804531u, 21071u, 4558u, "ŸS ¯\v§p" };
GUID IID_IMediaControl = { 1453877425u, 2772u, 4558u, "°: ¯\v§p" };
GUID IID_IMediaEventEx = { 1453877440u, 2772u, 4558u, "°: ¯\v§p" };
GUID IID_IVideoWindow = { 1453877428u, 2772u, 4558u, "°: ¯\v§p" };
GUID IID_IGraphBuilder = { 1453877417u, 2772u, 4558u, "°: ¯\v§p" };
unsigned int NiActorManager::ANY_SEQUENCE_ID = 4294967295u; // idb
const unsigned int NiActorManager::INVALID_SEQUENCE_ID = 4294967294u; // weak
const unsigned int NiActorManager::ANY_EVENT_CODE = 4294967295u; // weak
unsigned int NiActorManager::INVALID_EVENT_CODE = 4294967294u; // idb
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *>::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTObjectAllocator<NiActorManager::TimelineData>,NiActorManager::TimelineData>::`vftable')(void *p, char) = &NiTListBase<NiTObjectAllocator<NiActorManager::TimelineData>,NiActorManager::TimelineData>::`scalar deleting destructor'; // weak
int (__thiscall *NiActorManager::ChainCompletionInfo::`vftable')(void *p, char) = &NiActorManager::ChainCompletionInfo::`vector deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,bool>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,bool>::`vector deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::SequenceGroup *>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::SequenceGroup *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTObjectList<NiActorManager::TimelineData>::`vftable')(void *p, char) = &NiTObjectList<NiActorManager::TimelineData>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerMap<unsigned int,NiKFMTool::Sequence *>::`vftable')(void *p, char) = &NiTPointerMap<unsigned int,NiKFMTool::Sequence *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerMap<unsigned int,NiKFMTool::SequenceGroup *>::`vftable')(void *p, char) = &NiTPointerMap<unsigned int,NiKFMTool::SequenceGroup *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerMap<unsigned int,NiControllerSequence *>::`vftable')(void *p, char) = &NiTPointerMap<unsigned int,NiControllerSequence *>::`vector deleting destructor'; // weak
int (__thiscall *NiTArray<NiPointer<NiActorManager::CallbackData>>::`vftable')(void *p, char) = &NiTArray<NiPointer<NiActorManager::CallbackData>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTArray<NiPointer<NiInterpController>>::`vftable')(void *p, char) = &NiTArray<NiPointer<NiInterpController>>::`scalar deleting destructor'; // weak
int (__thiscall *NiActorManager::CallbackData::`vftable')(void *p, char) = &NiActorManager::CallbackData::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerMap<NiObject *,NiObject *>::`vftable')(void *p, char) = &NiTPointerMap<NiObject *,NiObject *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerMap<NiObject *,bool>::`vftable')(void *p, char) = &NiTPointerMap<NiObject *,bool>::`vector deleting destructor'; // weak
int (__thiscall *NiActorManager::`vftable')(void *p, char) = &NiActorManager::`scalar deleting destructor'; // weak
int (__thiscall *NiActorManager::CompletionInfo::`vftable')(void *p, char) = &NiActorManager::CompletionInfo::`vector deleting destructor'; // weak
int (__thiscall *NiKFMTool::`vftable')(void *p, char) = &NiKFMTool::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Transition *>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Transition *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerMap<unsigned int,NiKFMTool::Transition *>::`vftable')(void *p, char) = &NiTPointerMap<unsigned int,NiKFMTool::Transition *>::`scalar deleting destructor'; // weak
int (__stdcall *NiTextKeyExtraData::`vftable')(char) = &NiTextKeyExtraData::`scalar deleting destructor'; // weak
int (__thiscall *NiTArray<char *>::`vftable')(void *p, char) = &NiTArray<char *>::`scalar deleting destructor'; // weak
int (__thiscall *NiStringPalette::`vftable')(void *p, char) = &NiStringPalette::`scalar deleting destructor'; // weak
int (__thiscall *NiMultiTargetTransformController::`vftable')(void *p, char) = &NiMultiTargetTransformController::`vector deleting destructor'; // weak
int (__thiscall *NiControllerSequence::`vftable')(void *p, char) = &NiControllerSequence::`vector deleting destructor'; // weak
int (__thiscall *NiBlendAccumTransformInterpolator::`vftable')(void *p, char) = &NiBlendAccumTransformInterpolator::`scalar deleting destructor'; // weak
int (__thiscall *NiTransformController::`vftable')(void *p, char) = &NiSingleInterpController::`vector deleting destructor'; // weak
int (__thiscall *NiTArray<NiTSet<NiNode *> *>::`vftable')(void *p, char) = &NiTArray<NiTSet<NiNode *> *>::`vector deleting destructor'; // weak
int (__thiscall *NiTArray<NiTSet<NiBoneLODController::SkinInfo *> *>::`vftable')(void *p, char) = &NiTArray<NiTSet<NiBoneLODController::SkinInfo *> *>::`vector deleting destructor'; // weak
int (__thiscall *NiBoneLODController::`vftable')(void *p, char) = &NiBoneLODController::`scalar deleting destructor'; // weak
float NiKFMTool::MAX_DURATION = -1.0; // idb
unsigned int NiKFMTool::SYNC_SEQUENCE_ID_NONE = 4294967294u; // idb
int (__thiscall *NiTextureTransformController::`vftable')(void *p, char) = &NiTextureTransformController::`vector deleting destructor'; // weak
int (__thiscall *NiMaterialColorController::`vftable')(void *p, char) = &NiMaterialColorController::`scalar deleting destructor'; // weak
int (__thiscall *NiAlphaController::`vftable')(void *p, char) = &NiSingleInterpController::`vector deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int>::`scalar deleting destructor'; // weak
int (__thiscall *NiAVObjectPalette::`vftable')(void *p, char) = &NiAVObjectPalette::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiAVObject *>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiAVObject *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerMap<char const *,NiAVObject *>::`vftable')(void *p, char) = &NiTPointerMap<char const *,NiAVObject *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTStringTemplateMap<NiTPointerMap<char const *,NiAVObject *>,NiAVObject *>::`vftable')(void *p, char) = &NiTStringTemplateMap<NiTPointerMap<char const *,NiAVObject *>,NiAVObject *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerMap<char const *,unsigned int>::`vftable')(void *p, char) = &NiTPointerMap<char const *,unsigned int>::`scalar deleting destructor'; // weak
int (__thiscall *NiTStringTemplateMap<NiTPointerMap<char const *,unsigned int>,unsigned int>::`vftable')(void *p, char) = &NiTStringPointerMap<unsigned int>::`vector deleting destructor'; // weak
int (__thiscall *NiTArray<NiPointer<NiControllerSequence>>::`vftable')(void *p, char) = &NiTArray<NiPointer<NiControllerSequence>>::`vector deleting destructor'; // weak
int (__thiscall *NiControllerManager::`vftable')(void *p, char) = &NiControllerManager::`vector deleting destructor'; // weak
int (__thiscall *NiTStringPointerMap<NiAVObject *>::`vftable')(void *p, char) = &NiTStringTemplateMap<NiTPointerMap<char const *,NiAVObject *>,NiAVObject *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTStringPointerMap<unsigned int>::`vftable')(void *p, char) = &NiTStringPointerMap<unsigned int>::`vector deleting destructor'; // weak
int (__thiscall *NiDefaultAVObjectPalette::`vftable')(void *p, char) = &NiDefaultAVObjectPalette::`vector deleting destructor'; // weak
int (__thiscall *NiFloatData::`vftable')(void *p, char) = &NiFloatData::`vector deleting destructor'; // weak
int (__thiscall *NiPosData::`vftable')(void *p, char) = &NiPosData::`scalar deleting destructor'; // weak
int (__thiscall *NiVisController::`vftable')(void *p, char) = &NiSingleInterpController::`vector deleting destructor'; // weak
int (__thiscall *NiUVData::`vftable')(void *p, char) = &NiUVData::`scalar deleting destructor'; // weak
int (__thiscall *NiUVController::`vftable')(void *p, char) = &NiUVController::`vector deleting destructor'; // weak
int (__thiscall *NiTransformInterpolator::`vftable')(void *p, char) = &NiTransformInterpolator::`scalar deleting destructor'; // weak
int (__thiscall *NiSequenceStreamHelper::`vftable')(void *p, char) = &NiFogProperty::`scalar deleting destructor'; // weak
int (__thiscall *NiTArray<NiPointer<NiTransformController>>::`vftable')(void *p, char) = &NiTArray<NiPointer<NiTransformController>>::`vector deleting destructor'; // weak
int (__thiscall *NiSequence::`vftable')(void *p, char) = &NiSequence::`scalar deleting destructor'; // weak
int (__thiscall *NiRotData::`vftable')(void *p, char) = &NiRotData::`scalar deleting destructor'; // weak
int (__thiscall *NiFloatController::`vftable')(void *p, char) = &NiFloatController::`vector deleting destructor'; // weak
int (__thiscall *NiRollController::`vftable')(void *p, char) = &NiFloatController::`vector deleting destructor'; // weak
int (__thiscall *NiQuaternionInterpolator::`vftable')(void *p, char) = &NiColorInterpolator::`vector deleting destructor'; // weak
int (__thiscall *NiPoint3Interpolator::`vftable')(void *p, char) = &NiPoint3Interpolator::`vector deleting destructor'; // weak
int (__thiscall *NiPathInterpolator::`vftable')(void *p, char) = &NiPathInterpolator::`scalar deleting destructor'; // weak
int (__thiscall *NiPathController::`vftable')(void *p, char) = &NiPathController::`scalar deleting destructor'; // weak
int (__thiscall *NiMorphData::`vftable')(void *p, char) = &NiMorphData::`vector deleting destructor'; // weak
int (__thiscall *NiLookAtInterpolator::`vftable')(void *p, char) = &NiLookAtInterpolator::`scalar deleting destructor'; // weak
int (__thiscall *NiLookAtController::`vftable')(void *p, char) = &NiInterpController::`vector deleting destructor'; // weak
int (__thiscall *NiLightDimmerController::`vftable')(void *p, char) = &NiLightDimmerController::`vector deleting destructor'; // weak
int (__thiscall *NiLightColorController::`vftable')(void *p, char) = &NiLightColorController::`scalar deleting destructor'; // weak
int (__thiscall *NiTArray<unsigned int>::`vftable')(void *p, char) = &NiTArray<unsigned int>::`vector deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSequence>>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSequence>>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerMap<char const *,NiPointer<NiSequence>>::`vftable')(void *p, char) = &NiTPointerMap<char const *,NiPointer<NiSequence>>::`vector deleting destructor'; // weak
int (__thiscall *NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSequence>>,NiPointer<NiSequence>>::`vftable')(void *p, char) = &NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSequence>>,NiPointer<NiSequence>>::`vector deleting destructor'; // weak
int (__thiscall *NiTStringPointerMap<NiPointer<NiSequence>>::`vftable')(void *p, char) = &NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSequence>>,NiPointer<NiSequence>>::`vector deleting destructor'; // weak
int (__thiscall *NiKeyframeManager::`vftable')(void *p, char) = &NiKeyframeManager::`scalar deleting destructor'; // weak
int (__thiscall *NiTransformData::`vftable')(void *p, char) = &NiTransformData::`scalar deleting destructor'; // weak
int (__thiscall *NiGeomMorpherController::`vftable')(void *p, char) = &NiGeomMorpherController::`vector deleting destructor'; // weak
int (__thiscall *NiFloatsExtraDataPoint3Controller::`vftable')(void *p, char) = &NiFloatsExtraDataPoint3Controller::`vector deleting destructor'; // weak
int (__thiscall *NiFloatsExtraDataController::`vftable')(void *p, char) = &NiFloatsExtraDataController::`scalar deleting destructor'; // weak
int (__thiscall *NiFloatInterpolator::`vftable')(void *p, char) = &NiBoolInterpolator::`scalar deleting destructor'; // weak
int (__thiscall *NiFloatExtraDataController::`vftable')(void *p, char) = &NiFloatExtraDataController::`scalar deleting destructor'; // weak
int (__thiscall *NiTArray<NiPointer<NiTexture>>::`vftable')(void *p, char) = &NiTArray<NiPointer<NiTexture>>::`scalar deleting destructor'; // weak
int (__thiscall *NiFlipController::`vftable')(void *p, char) = &NiFlipController::`vector deleting destructor'; // weak
int (__thiscall *NiColorInterpolator::`vftable')(void *p, char) = &NiColorInterpolator::`vector deleting destructor'; // weak
int (__thiscall *NiColorExtraDataController::`vftable')(void *p, char) = &NiFloatExtraDataController::`scalar deleting destructor'; // weak
int (__thiscall *NiColorData::`vftable')(void *p, char) = &NiColorData::`vector deleting destructor'; // weak
int (__thiscall *NiBSplineTransformInterpolator::`vftable')(void *p, char) = &NiBSplinePoint3Interpolator::`vector deleting destructor'; // weak
int (__thiscall *NiBSplinePoint3Interpolator::`vftable')(void *p, char) = &NiBSplinePoint3Interpolator::`vector deleting destructor'; // weak
int (__thiscall *NiBSplineFloatInterpolator::`vftable')(void *p, char) = &NiBSplinePoint3Interpolator::`vector deleting destructor'; // weak
int (__thiscall *NiBSplineCompTransformInterpolator::`vftable')(void *p, char) = &NiBSplinePoint3Interpolator::`vector deleting destructor'; // weak
int (__thiscall *NiBSplineCompPoint3Interpolator::`vftable')(void *p, char) = &NiBSplinePoint3Interpolator::`vector deleting destructor'; // weak
int (__thiscall *NiBSplineCompFloatInterpolator::`vftable')(void *p, char) = &NiBSplinePoint3Interpolator::`vector deleting destructor'; // weak
int (__thiscall *NiBSplineCompColorInterpolator::`vftable')(void *p, char) = &NiBSplinePoint3Interpolator::`vector deleting destructor'; // weak
int (__thiscall *NiBSplineColorInterpolator::`vftable')(void *p, char) = &NiBSplinePoint3Interpolator::`vector deleting destructor'; // weak
int (__thiscall *NiBSplineData::`vftable')(void *p, char) = &NiBSplineData::`scalar deleting destructor'; // weak
int (__thiscall *NiBSplineBasisData::`vftable')(void *p, char) = &NiBSplineBasisData::`vector deleting destructor'; // weak
int (__thiscall *NiBoolTimelineInterpolator::`vftable')(void *p, char) = &NiBoolInterpolator::`scalar deleting destructor'; // weak
int (__thiscall *NiBoolInterpolator::`vftable')(void *p, char) = &NiBoolInterpolator::`scalar deleting destructor'; // weak
int (__thiscall *NiBoolData::`vftable')(void *p, char) = &NiBoolData::`vector deleting destructor'; // weak
int (__thiscall *NiBlendTransformInterpolator::`vftable')(void *p, char) = &NiBlendTransformInterpolator::`vector deleting destructor'; // weak
int (__thiscall *NiBlendQuaternionInterpolator::`vftable')(void *p, char) = &NiBlendBoolInterpolator::`vector deleting destructor'; // weak
int (__thiscall *NiBlendPoint3Interpolator::`vftable')(void *p, char) = &NiBlendBoolInterpolator::`vector deleting destructor'; // weak
int (__thiscall *NiBlendFloatInterpolator::`vftable')(void *p, char) = &NiBlendBoolInterpolator::`vector deleting destructor'; // weak
int (__thiscall *NiBlendColorInterpolator::`vftable')(void *p, char) = &NiBlendBoolInterpolator::`vector deleting destructor'; // weak
int (__thiscall *NiBlendBoolInterpolator::`vftable')(void *p, char) = &NiBlendBoolInterpolator::`vector deleting destructor'; // weak
const unsigned __int16 NiInterpController::INVALID_INDEX = 65535u; // weak
int (__thiscall *NiInterpController::`vftable')(void *p, char) = &NiInterpController::`vector deleting destructor'; // weak
const unsigned __int8 NiBlendInterpolator::INVALID_INDEX = 255u; // weak
int (__thiscall *NiBlendInterpolator::`vftable')(void *p, char) = &NiBlendBoolInterpolator::`vector deleting destructor'; // weak
int (__thiscall *NiSingleInterpController::`vftable')(void *p, char) = &NiSingleInterpController::`vector deleting destructor'; // weak
const unsigned __int8 NiInterpolator::INVALID_BOOL = 2u; // weak
int (__thiscall *NiInterpolator::`vftable')(void *p, char) = &NiInterpolator::`vector deleting destructor'; // weak
int (__thiscall *NiFloatInterpController::`vftable')(void *p, char) = &NiSingleInterpController::`vector deleting destructor'; // weak
int (__thiscall *NiPoint3InterpController::`vftable')(void *p, char) = &NiSingleInterpController::`vector deleting destructor'; // weak
int (__thiscall *NiBoolInterpController::`vftable')(void *p, char) = &NiSingleInterpController::`vector deleting destructor'; // weak
int (__thiscall *NiKeyBasedInterpolator::`vftable')(void *p, char) = &NiKeyBasedInterpolator::`vector deleting destructor'; // weak
int (__thiscall *NiExtraDataController::`vftable')(void *p, char) = &NiFloatExtraDataController::`scalar deleting destructor'; // weak
int (__thiscall *NiBSplineInterpolator::`vftable')(void *p, char) = &NiBSplineInterpolator::`vector deleting destructor'; // weak
int (__thiscall *NiTArray<NiCollisionGroup::Record *>::`vftable')(void *p, char) = &NiTArray<NiCollisionGroup::Record *>::`scalar deleting destructor'; // weak
int (__thiscall *NiCollisionData::`vftable')(void *p, char) = &NiCollisionData::`vector deleting destructor'; // weak
int (__stdcall *NiBoundingVolume::`vftable')(int) = &NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue; // weak
void (__thiscall *NiSphereBV::`vftable'[2])(NiSphereBV *this, struct NiStream *) = { &NiSphereBV::LoadBinary, &NiSphereBV::SaveBinary }; // weak
void (__thiscall *NiHalfSpaceBV::`vftable'[2])(NiHalfSpaceBV *this, struct NiStream *) = { &NiHalfSpaceBV::LoadBinary, &NiHalfSpaceBV::SaveBinary }; // weak
int (__thiscall *NiTArray<NiBoundingVolume *>::`vftable')(void *p, char) = &NiTArray<NiBoundingVolume *>::`vector deleting destructor'; // weak
void (__thiscall *NiUnionBV::`vftable'[2])(NiUnionBV *this, struct NiStream *uiSize) = { &NiUnionBV::LoadBinary, &NiUnionBV::SaveBinary }; // weak
void (__thiscall *NiCapsuleBV::`vftable'[2])(NiCapsuleBV *this, NiStream *stream) = { &NiCapsuleBV::LoadBinary, &NiCapsuleBV::SaveBinary }; // weak
void (__thiscall *NiBoxBV::`vftable'[2])(NiBoxBV *this, struct NiStream *) = { &NiBoxBV::LoadBinary, &NiBoxBV::SaveBinary }; // weak
int (__thiscall *NiOBBRoot::`vftable')(void *p, char) = &NiOBBRoot::`vector deleting destructor'; // weak
void (__thiscall *NiIntersector::`vftable')(NiIntersector *this, NiPoint3 *kV0, const struct NiPoint3 *) = &NiIntersector::Test; // weak
void (__thiscall *NiSphereTriIntersector::`vftable')(NiIntersector *this, NiPoint3 *kV0, const struct NiPoint3 *) = &NiIntersector::Test; // weak
void (__thiscall *NiCapsuleSphereIntersector::`vftable')(NiIntersector *this, NiPoint3 *kV0, const struct NiPoint3 *) = &NiIntersector::Test; // weak
void (__thiscall *NiCapsuleCapsuleIntersector::`vftable')(NiIntersector *this, NiPoint3 *kV0, const struct NiPoint3 *) = &NiIntersector::Test; // weak
void (__thiscall *NiCapsuleTriIntersector::`vftable')(NiIntersector *this, NiPoint3 *kV0, const struct NiPoint3 *) = &NiIntersector::Test; // weak
void (__thiscall *NiBoxCapsuleIntersector::`vftable')(NiIntersector *this, NiPoint3 *kV0, const struct NiPoint3 *) = &NiIntersector::Test; // weak
void (__thiscall *NiBoxSphereIntersector::`vftable')(NiIntersector *this, NiPoint3 *kV0, const struct NiPoint3 *) = &NiIntersector::Test; // weak
int (__thiscall *NiOBBNode::`vftable')(void *p, char) = &NiOBBNode::`scalar deleting destructor'; // weak
int (__thiscall *NiOBBLeaf::`vftable')(void *p, char) = &NiOBBNode::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiDynamicEffect *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiDynamicEffect *>::`vector deleting destructor'; // weak
int (__thiscall *NiDynamicEffectState::`vftable')(void *p, char) = &NiDynamicEffectState::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiDynamicEffect *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiDynamicEffect *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerList<NiDynamicEffect *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiDynamicEffect *>::`vector deleting destructor'; // weak
int (__thiscall *NiTArray<NiPointer<NiAVObject>>::`vftable')(void *p, char) = &NiTArray<NiPointer<NiAVObject>>::`vector deleting destructor'; // weak
int (__thiscall *NiNode::`vftable')(void *p, char) = &NiBillboardNode::`vector deleting destructor'; // weak
int (__thiscall *NiObjectNET::`vftable')(void *p, char) = &NiObjectNET::`scalar deleting destructor'; // weak
int (__thiscall *NiObject::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty>>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty>>::`vftable')(void *p, char) = &NiTPointerList<NiPointer<NiProperty>>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerList<NiPointer<NiProperty>>::`vftable')(void *p, char) = &NiTPointerList<NiPointer<NiProperty>>::`vector deleting destructor'; // weak
int (__thiscall *NiAVObject::`vftable')(void *p, char) = &NiAVObject::`scalar deleting destructor'; // weak
int (__thiscall *NiMaterialProperty::`vftable')(void *p, char) = &NiMaterialProperty::`scalar deleting destructor'; // weak
int (__thiscall *NiRenderer::`vftable')(void *p, char) = &NiRenderer::`vector deleting destructor'; // weak
int (__thiscall *NiCullingProcess::`vftable')(void *p, char) = &NiCullingProcess::`scalar deleting destructor'; // weak
int (__thiscall *NiDirectionalLight::`vftable')(void *p, char) = &NiDirectionalLight::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiNode *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiNode *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiNode *>::`vftable')(void *p, char) = &NiTPointerList<NiNode *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerList<NiNode *>::`vftable')(void *p, char) = &NiTPointerList<NiNode *>::`vector deleting destructor'; // weak
int (__thiscall *NiDynamicEffect::`vftable')(void *p, char) = &NiDynamicEffect::`vector deleting destructor'; // weak
int (__thiscall *NiAmbientLight::`vftable')(void *p, char) = &NiDirectionalLight::`scalar deleting destructor'; // weak
int (__thiscall *NiSortAdjustNode::`vftable')(void *p, char) = &NiSortAdjustNode::`vector deleting destructor'; // weak
int (__thiscall *NiCamera::`vftable')(void *p, char) = &NiCamera::`scalar deleting destructor'; // weak
int (__thiscall *NiShaderFactory::`vftable')(void *p, char) = &NiShaderFactory::`scalar deleting destructor'; // weak
int (__thiscall *NiTArray<NiTexturingProperty::Map *>::`vftable')(void *p, char) = &NiTArray<NiTexturingProperty::Map *>::`vector deleting destructor'; // weak
int (__thiscall *NiTArray<NiTexturingProperty::ShaderMap *>::`vftable')(void *p, char) = &NiTArray<NiTexturingProperty::ShaderMap *>::`vector deleting destructor'; // weak
int (__thiscall *NiTexturingProperty::`vftable')(void *p, char) = &NiTexturingProperty::`vector deleting destructor'; // weak
int (__thiscall *NiTexturingProperty::Map::`vftable')(void *p, char) = &NiTexturingProperty::Map::`scalar deleting destructor'; // weak
int (__thiscall *NiTexturingProperty::BumpMap::`vftable')(void *p, char) = &NiTexturingProperty::Map::`scalar deleting destructor'; // weak
int (__thiscall *NiTexturingProperty::ShaderMap::`vftable')(void *p, char) = &NiTexturingProperty::Map::`scalar deleting destructor'; // weak
int (__thiscall *NiTexture::`vftable')(void *p, char) = &NiTexture::`vector deleting destructor'; // weak
int (__thiscall *NiSourceTexture::`vftable')(void *p, char) = &NiSourceTexture::`vector deleting destructor'; // weak
int (__thiscall *NiImageConverter::`vftable')(void *p, char) = &NiImageConverter::`scalar deleting destructor'; // weak
int (__thiscall *NiTriShape::`vftable')(void *p, char) = &NiTriShape::`vector deleting destructor'; // weak
int (__thiscall *NiRenderTargetGroup::`vftable')(void *p, char) = &NiRenderTargetGroup::`scalar deleting destructor'; // weak
int (__thiscall *NiRenderedTexture::`vftable')(void *p, char) = &NiRenderedTexture::`vector deleting destructor'; // weak
int (__thiscall *NiScreenElementsData::`vftable')(void *p, char) = &NiScreenElementsData::`scalar deleting destructor'; // weak
int (__thiscall *NiScreenElements::`vftable')(void *p, char) = &NiScreenElements::`vector deleting destructor'; // weak
int (__thiscall *NiExtraData::`vftable')(void *p, char) = &NiExtraData::`vector deleting destructor'; // weak
int (__thiscall *NiShader::`vftable')(void *p, char) = &NiShader::`vector deleting destructor'; // weak
int (__thiscall *NiPixelData::`vftable')(void *p, char) = &NiPixelData::`vector deleting destructor'; // weak
int (__thiscall *NiAlphaAccumulator::`vftable')(void *p, char) = &NiAlphaAccumulator::`vector deleting destructor'; // weak
int (__thiscall *NiStringExtraData::`vftable')(void *p, char) = &NiStringExtraData::`scalar deleting destructor'; // weak
int (__thiscall *NiTimeController::`vftable')(void *p, char) = &NiInterpController::`vector deleting destructor'; // weak
int (__thiscall *NiRangeLODData::`vftable')(void *p, char) = &NiRangeLODData::`scalar deleting destructor'; // weak
int (__thiscall *NiLODNode::`vftable')(void *p, char) = &NiLODNode::`scalar deleting destructor'; // weak
int (__thiscall *NiGeometry::`vftable')(void *p, char) = &NiGeometry::`scalar deleting destructor'; // weak
int (__thiscall *NiSkinPartition::Partition::`vftable')(void *p, char) = &NiSkinPartition::Partition::`vector deleting destructor'; // weak
int (__thiscall *NiSkinPartition::`vftable')(void *p, char) = &NiSkinPartition::`vector deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,float>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,float>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerMap<unsigned int,float>::`vftable')(void *p, char) = &NiTPointerMap<unsigned int,float>::`scalar deleting destructor'; // weak
int (__thiscall *NiTriBasedGeomData::`vftable')(void *p, char) = &NiTriBasedGeomData::`scalar deleting destructor'; // weak
int (__thiscall *NiTriBasedGeom::`vftable')(void *p, char) = &NiTriBasedGeom::`scalar deleting destructor'; // weak
int (*NiCollisionObject::`vftable')() = &_purecall; // weak
int (__thiscall *NiGeometryGroupManager::`vftable')(void *p, char) = &NiGeometryGroupManager::`vector deleting destructor'; // weak
int (__thiscall *NiTriShapeDynamicData::`vftable')(void *p, char) = &NiTriShapeDynamicData::`vector deleting destructor'; // weak
int (__thiscall *NiPalette::`vftable')(void *p, char) = &NiPalette::`scalar deleting destructor'; // weak
int (__thiscall *NiTArray<NiObjectGroup *>::`vftable')(void *p, char) = &NiTArray<NiObjectGroup *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject const *,unsigned int>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject const *,unsigned int>::`scalar deleting destructor'; // weak
int (__thiscall *NiTArray<void (__cdecl *)(NiStream &,NiObject *)>::`vftable')(void *p, char) = &NiTArray<void (__cdecl *)(NiStream &,NiObject *)>::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiObject * (__cdecl *)(void)>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiObject * (__cdecl *)(void)>::`vector deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned short>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned short>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerMap<char const *,NiObject * (__cdecl *)(void)>::`vftable')(void *p, char) = &NiTPointerMap<char const *,NiObject * (__cdecl *)(void)>::`scalar deleting destructor'; // weak
int (__thiscall *NiTStringTemplateMap<NiTPointerMap<char const *,NiObject * (__cdecl *)(void)>,NiObject * (__cdecl *)(void)>::`vftable')(void *p, char) = &NiTStringTemplateMap<NiTPointerMap<char const *,NiObject * (__cdecl *)(void)>,NiObject * (__cdecl *)(void)>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerMap<char const *,unsigned short>::`vftable')(void *p, char) = &NiTPointerMap<char const *,unsigned short>::`vector deleting destructor'; // weak
int (__thiscall *NiTStringTemplateMap<NiTPointerMap<char const *,unsigned short>,unsigned short>::`vftable')(void *p, char) = &NiTStringPointerMap<unsigned short>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerMap<NiObject const *,unsigned int>::`vftable')(void *p, char) = &NiTPointerMap<NiObject const *,unsigned int>::`vector deleting destructor'; // weak
int (__thiscall *NiTArray<NiPointer<NiObject>>::`vftable')(void *p, char) = &NiTArray<NiPointer<NiObject>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTStringPointerMap<NiObject * (__cdecl *)(void)>::`vftable')(void *p, char) = &NiTStringTemplateMap<NiTPointerMap<char const *,NiObject * (__cdecl *)(void)>,NiObject * (__cdecl *)(void)>::`vector deleting destructor'; // weak
int (__thiscall *NiTStringPointerMap<unsigned short>::`vftable')(void *p, char) = &NiTStringPointerMap<unsigned short>::`vector deleting destructor'; // weak
int (__thiscall *NiStream::`vftable')(void *p, char) = &NiStream::`scalar deleting destructor'; // weak
int (__thiscall *NiSkinData::`vftable')(void *p, char) = &NiSkinData::`vector deleting destructor'; // weak
int (__thiscall *NiGeometryData::`vftable')(void *p, char) = &NiGeometryData::`scalar deleting destructor'; // weak
int (__thiscall *NiLight::`vftable')(void *p, char) = &NiLight::`vector deleting destructor'; // weak
int (__thiscall *NiFloatsExtraData::`vftable')(void *p, char) = &NiFloatsExtraData::`scalar deleting destructor'; // weak
int (__thiscall *NiColorExtraData::`vftable')(void *p, char) = &NiColorExtraData::`scalar deleting destructor'; // weak
int (__thiscall *NiTriStrips::`vftable')(void *p, char) = &NiTriShape::`vector deleting destructor'; // weak
int (__thiscall *NiSwitchNode::`vftable')(void *p, char) = &NiSwitchNode::`scalar deleting destructor'; // weak
int (__thiscall *NiPropertyState::`vftable')(void *p, char) = &NiPropertyState::`scalar deleting destructor'; // weak
int (__thiscall *NiVertWeightsExtraData::`vftable')(void *p, char) = &NiVertWeightsExtraData::`scalar deleting destructor'; // weak
int (__thiscall *NiShaderLibrary::`vftable')(void *p, char) = &NiShaderLibrary::`vector deleting destructor'; // weak
int (__thiscall *NiNIFImageReader::`vftable')(void *p, char) = &NiNIFImageReader::`vector deleting destructor'; // weak
int (__thiscall *NiTriShapeData::`vftable')(void *p, char) = &NiTriShapeData::`vector deleting destructor'; // weak
int (__thiscall *NiDepthStencilBuffer::`vftable')(void *p, char) = &NiDepthStencilBuffer::`vector deleting destructor'; // weak
int (__thiscall *Ni2DBuffer::`vftable')(void *p, char) = &Ni2DBuffer::`vector deleting destructor'; // weak
int (__thiscall *NiBackToFrontAccumulator::`vftable')(void *p, char) = &NiBackToFrontAccumulator::`vector deleting destructor'; // weak
int (__thiscall *NiLODData::`vftable')(void *p, char) = &NiLODData::`vector deleting destructor'; // weak
int (__thiscall *NiTriStripsData::`vftable')(void *p, char) = &NiTriStripsData::`scalar deleting destructor'; // weak
int (__thiscall *NiDitherProperty::`vftable')(void *p, char) = &NiFogProperty::`scalar deleting destructor'; // weak
int (__thiscall *NiRendererSpecificProperty::`vftable')(void *p, char) = &NiRendererSpecificProperty::`scalar deleting destructor'; // weak
int (__thiscall *NiShadeProperty::`vftable')(void *p, char) = &NiFogProperty::`scalar deleting destructor'; // weak
int (__thiscall *NiSpecularProperty::`vftable')(void *p, char) = &NiFogProperty::`scalar deleting destructor'; // weak
int (__thiscall *NiWireframeProperty::`vftable')(void *p, char) = &NiFogProperty::`scalar deleting destructor'; // weak
int (__thiscall *NiScreenGeometryData::ScreenElement::`vftable')(void *p, char) = &NiScreenGeometryData::ScreenElement::`vector deleting destructor'; // weak
int (__thiscall *NiScreenGeometry::`vftable')(void *p, char) = &NiScreenGeometry::`vector deleting destructor'; // weak
int (__thiscall *NiTArray<NiScreenGeometryData::ScreenElement *>::`vftable')(void *p, char) = &NiTArray<NiScreenGeometryData::ScreenElement *>::`vector deleting destructor'; // weak
int (__thiscall *NiScreenGeometryData::`vftable')(void *p, char) = &NiScreenGeometryData::`scalar deleting destructor'; // weak
int (__thiscall *NiScreenPolygon::`vftable')(void *p, char) = &NiScreenPolygon::`vector deleting destructor'; // weak
int (__thiscall *NiTArray<NiPointer<NiScreenPolygon>>::`vftable')(void *p, char) = &NiTArray<NiPointer<NiScreenPolygon>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTArray<NiPointer<NiScreenTexture>>::`vftable')(void *p, char) = &NiTArray<NiPointer<NiScreenTexture>>::`vector deleting destructor'; // weak
int (__thiscall *NiScreenSpaceCamera::`vftable')(void *p, char) = &NiScreenSpaceCamera::`scalar deleting destructor'; // weak
int (__thiscall *NiVectorExtraData::`vftable')(void *p, char) = &NiVectorExtraData::`scalar deleting destructor'; // weak
int (__thiscall *NiTextureEffect::`vftable')(void *p, char) = &NiTextureEffect::`scalar deleting destructor'; // weak
int (__thiscall *NiSwitchStringExtraData::`vftable')(void *p, char) = &NiSwitchStringExtraData::`vector deleting destructor'; // weak
int (__thiscall *NiStringsExtraData::`vftable')(void *p, char) = &NiStringsExtraData::`vector deleting destructor'; // weak
int (__thiscall *NiPointLight::`vftable')(void *p, char) = &NiDirectionalLight::`scalar deleting destructor'; // weak
int (__thiscall *NiSpotLight::`vftable')(void *p, char) = &NiDirectionalLight::`scalar deleting destructor'; // weak
int (__thiscall *NiSourceCubeMap::`vftable')(void *p, char) = &NiSourceCubeMap::`scalar deleting destructor'; // weak
int (__thiscall *NiScreenTexture::`vftable')(void *p, char) = &NiScreenTexture::`vector deleting destructor'; // weak
int (__thiscall *NiScreenLODData::`vftable')(void *p, char) = &NiScreenLODData::`scalar deleting destructor'; // weak
int (__thiscall *NiParticlesData::`vftable')(void *p, char) = &NiParticlesData::`vector deleting destructor'; // weak
int (__thiscall *NiParticleMeshesData::`vftable')(void *p, char) = &NiParticleMeshesData::`vector deleting destructor'; // weak
int (__thiscall *NiParticleMeshes::`vftable')(void *p, char) = &NiGeometry::`scalar deleting destructor'; // weak
int (__thiscall *NiLinesData::`vftable')(void *p, char) = &NiLinesData::`vector deleting destructor'; // weak
int (__thiscall *NiLines::`vftable')(void *p, char) = &NiGeometry::`scalar deleting destructor'; // weak
int (__thiscall *NiIntegersExtraData::`vftable')(void *p, char) = &NiIntegersExtraData::`vector deleting destructor'; // weak
int (__thiscall *NiFloatExtraData::`vftable')(void *p, char) = &NiFloatExtraData::`scalar deleting destructor'; // weak
int (__thiscall *NiBSPNode::`vftable')(void *p, char) = &NiBillboardNode::`vector deleting destructor'; // weak
int (__thiscall *NiBooleanExtraData::`vftable')(void *p, char) = &NiBooleanExtraData::`scalar deleting destructor'; // weak
int (__thiscall *NiBillboardNode::`vftable')(void *p, char) = &NiBillboardNode::`vector deleting destructor'; // weak
int (__thiscall *NiParticles::`vftable')(void *p, char) = &NiGeometry::`scalar deleting destructor'; // weak
int (__thiscall *NiTArray<NiAdditionalGeometryData::NiAGDDataBlock *>::`vftable')(void *p, char) = &NiTArray<NiAdditionalGeometryData::NiAGDDataBlock *>::`vector deleting destructor'; // weak
int (__thiscall *NiAdditionalGeometryData::`vftable')(void *p, char) = &NiAdditionalGeometryData::`vector deleting destructor'; // weak
int (__stdcall *NiTPointerList<NiAudioSource *>::`vftable')(int) = &NiTPointerList<NiAudioSource *>::`scalar deleting destructor'; // weak
int (__stdcall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiAudioSource *>::`vftable')(int) = &NiTPointerList<NiAudioSource *>::`scalar deleting destructor'; // weak
int (__stdcall *NiTListBase<NiTPointerAllocator<unsigned int>,NiAudioSource *>::`vftable')(int) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiAudioSource *>::`scalar deleting destructor'; // weak
int (__stdcall *NiAudioSystem::`vftable')(int) = &NiAudioSystem::`vector deleting destructor'; // weak
int (__stdcall *NiTPointerList<NiProviderInfo *>::`vftable')(int) = &NiTPointerList<NiProviderInfo *>::`scalar deleting destructor'; // weak
int (__stdcall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiProviderInfo *>::`vftable')(int) = &NiTPointerList<NiProviderInfo *>::`scalar deleting destructor'; // weak
int (__stdcall *NiTListBase<NiTPointerAllocator<unsigned int>,NiProviderInfo *>::`vftable')(int) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiProviderInfo *>::`scalar deleting destructor'; // weak
int (__stdcall *NiMilesAudioSystem::`vftable')(int) = &NiMilesAudioSystem::`vector deleting destructor'; // weak
int (__stdcall *NiMilesSource::`vftable')(int) = &NiMilesSource::`scalar deleting destructor'; // weak
int (__stdcall *NiMilesListener::`vftable')(int) = &NiMilesListener::`scalar deleting destructor'; // weak
int (__stdcall *NiAudioSource::`vftable')(int) = &NiAudioSource::`vector deleting destructor'; // weak
int (__stdcall *NiAudioListener::`vftable')(int) = &NiAudioListener::`vector deleting destructor'; // weak
int (__thiscall *NiPSysEmitterCtlr::`vftable')(void *p, char) = &NiPSysEmitterCtlr::`scalar deleting destructor'; // weak
int (__thiscall *NiPSysVortexFieldModifier::`vftable')(void *p, char) = &NiPSysRadialFieldModifier::`vector deleting destructor'; // weak
int (__thiscall *NiPSysUpdateCtlr::`vftable')(void *p, char) = &NiInterpController::`vector deleting destructor'; // weak
int (__thiscall *NiPSysTurbulenceFieldModifier::`vftable')(void *p, char) = &NiPSysRadialFieldModifier::`vector deleting destructor'; // weak
int (__thiscall *NiPSysSphericalCollider::`vftable')(void *p, char) = &NiPSysPlanarCollider::`vector deleting destructor'; // weak
int (__thiscall *NiPSysSphereEmitter::`vftable')(void *p, char) = &NiPSysRadialFieldModifier::`vector deleting destructor'; // weak
int (__thiscall *NiPSysSpawnModifier::`vftable')(void *p, char) = &NiPSysRadialFieldModifier::`vector deleting destructor'; // weak
int (__thiscall *NiPSysRotationModifier::`vftable')(void *p, char) = &NiPSysRadialFieldModifier::`vector deleting destructor'; // weak
int (__thiscall *NiPSysResetOnLoopCtlr::`vftable')(void *p, char) = &NiInterpController::`vector deleting destructor'; // weak
int (__thiscall *NiPSysRadialFieldModifier::`vftable')(void *p, char) = &NiPSysRadialFieldModifier::`vector deleting destructor'; // weak
int (__thiscall *NiPSysPositionModifier::`vftable')(void *p, char) = &NiPSysRadialFieldModifier::`vector deleting destructor'; // weak
int (__thiscall *NiPSysPlanarCollider::`vftable')(void *p, char) = &NiPSysPlanarCollider::`vector deleting destructor'; // weak
int (__thiscall *NiPSysModifierActiveCtlr::`vftable')(void *p, char) = &NiPSysModifierBoolCtlr::`vector deleting destructor'; // weak
int (__thiscall *NiPSysMeshUpdateModifier::`vftable')(void *p, char) = &NiPSysMeshUpdateModifier::`scalar deleting destructor'; // weak
int (__thiscall *NiPSysMeshEmitter::NiSkinnedEmitterData::`vftable')(void *p, char) = &NiPSysMeshEmitter::NiSkinnedEmitterData::`scalar deleting destructor'; // weak
int (__thiscall *NiTArray<NiPointer<NiGeometry>>::`vftable')(void *p, char) = &NiTArray<NiPointer<NiGeometry>>::`vector deleting destructor'; // weak
int (__thiscall *NiTArray<NiPointer<NiPSysMeshEmitter::NiSkinnedEmitterData>>::`vftable')(void *p, char) = &NiTArray<NiPointer<NiPSysMeshEmitter::NiSkinnedEmitterData>>::`vector deleting destructor'; // weak
int (__thiscall *NiPSysMeshEmitter::`vftable')(void *p, char) = &NiPSysMeshEmitter::`scalar deleting destructor'; // weak
int (__thiscall *NiPSysInitialRotSpeedVarCtlr::`vftable')(void *p, char) = &NiPSysModifierBoolCtlr::`vector deleting destructor'; // weak
int (__thiscall *NiPSysInitialRotSpeedCtlr::`vftable')(void *p, char) = &NiPSysModifierBoolCtlr::`vector deleting destructor'; // weak
int (__thiscall *NiPSysInitialRotAngleVarCtlr::`vftable')(void *p, char) = &NiPSysModifierBoolCtlr::`vector deleting destructor'; // weak
int (__thiscall *NiPSysInitialRotAngleCtlr::`vftable')(void *p, char) = &NiPSysModifierBoolCtlr::`vector deleting destructor'; // weak
int (__thiscall *NiPSysGrowFadeModifier::`vftable')(void *p, char) = &NiPSysRadialFieldModifier::`vector deleting destructor'; // weak
int (__thiscall *NiPSysGravityStrengthCtlr::`vftable')(void *p, char) = &NiPSysModifierBoolCtlr::`vector deleting destructor'; // weak
int (__thiscall *NiPSysGravityFieldModifier::`vftable')(void *p, char) = &NiPSysRadialFieldModifier::`vector deleting destructor'; // weak
int (__thiscall *NiPSysGravityModifier::`vftable')(void *p, char) = &NiPSysRadialFieldModifier::`vector deleting destructor'; // weak
int (__thiscall *NiPSysFieldMaxDistanceCtlr::`vftable')(void *p, char) = &NiPSysModifierBoolCtlr::`vector deleting destructor'; // weak
int (__thiscall *NiPSysFieldMagnitudeCtlr::`vftable')(void *p, char) = &NiPSysModifierBoolCtlr::`vector deleting destructor'; // weak
int (__thiscall *NiPSysFieldAttenuationCtlr::`vftable')(void *p, char) = &NiPSysModifierBoolCtlr::`vector deleting destructor'; // weak
int (__thiscall *NiPSysEmitterSpeedCtlr::`vftable')(void *p, char) = &NiPSysModifierBoolCtlr::`vector deleting destructor'; // weak
int (__thiscall *NiPSysEmitterPlanarAngleVarCtlr::`vftable')(void *p, char) = &NiPSysModifierBoolCtlr::`vector deleting destructor'; // weak
int (__thiscall *NiPSysEmitterPlanarAngleCtlr::`vftable')(void *p, char) = &NiPSysModifierBoolCtlr::`vector deleting destructor'; // weak
int (__thiscall *NiPSysEmitterLifeSpanCtlr::`vftable')(void *p, char) = &NiPSysModifierBoolCtlr::`vector deleting destructor'; // weak
int (__thiscall *NiPSysEmitterInitialRadiusCtlr::`vftable')(void *p, char) = &NiPSysModifierBoolCtlr::`vector deleting destructor'; // weak
int (__thiscall *NiPSysEmitterDeclinationVarCtlr::`vftable')(void *p, char) = &NiPSysModifierBoolCtlr::`vector deleting destructor'; // weak
int (__thiscall *NiPSysEmitterDeclinationCtlr::`vftable')(void *p, char) = &NiPSysModifierBoolCtlr::`vector deleting destructor'; // weak
int (__thiscall *NiPSysEmitterCtlrData::`vftable')(void *p, char) = &NiPSysEmitterCtlrData::`scalar deleting destructor'; // weak
int (__thiscall *NiPSysDragModifier::`vftable')(void *p, char) = &NiPSysRadialFieldModifier::`vector deleting destructor'; // weak
int (__thiscall *NiPSysDragFieldModifier::`vftable')(void *p, char) = &NiPSysRadialFieldModifier::`vector deleting destructor'; // weak
const unsigned __int16 NiPSysData::INVALID_PARTICLE = 65535u; // weak
int (__thiscall *NiPSysData::`vftable')(void *p, char) = &NiPSysData::`vector deleting destructor'; // weak
int (__thiscall *NiPSysCylinderEmitter::`vftable')(void *p, char) = &NiPSysRadialFieldModifier::`vector deleting destructor'; // weak
int (__thiscall *NiPSysColorModifier::`vftable')(void *p, char) = &NiPSysColliderManager::`vector deleting destructor'; // weak
int (__thiscall *NiPSysColliderManager::`vftable')(void *p, char) = &NiPSysColliderManager::`vector deleting destructor'; // weak
int (__thiscall *NiPSysBoxEmitter::`vftable')(void *p, char) = &NiPSysRadialFieldModifier::`vector deleting destructor'; // weak
int (__thiscall *NiPSysBoundUpdateModifier::`vftable')(void *p, char) = &NiPSysBoundUpdateModifier::`scalar deleting destructor'; // weak
int (__thiscall *NiPSysBombModifier::`vftable')(void *p, char) = &NiPSysRadialFieldModifier::`vector deleting destructor'; // weak
int (__thiscall *NiPSysAgeDeathModifier::`vftable')(void *p, char) = &NiPSysRadialFieldModifier::`vector deleting destructor'; // weak
int (__thiscall *NiPSysAirFieldSpreadCtlr::`vftable')(void *p, char) = &NiPSysModifierBoolCtlr::`vector deleting destructor'; // weak
int (__thiscall *NiPSysAirFieldModifier::`vftable')(void *p, char) = &NiPSysRadialFieldModifier::`vector deleting destructor'; // weak
int (__thiscall *NiPSysAirFieldInheritVelocityCtlr::`vftable')(void *p, char) = &NiPSysModifierBoolCtlr::`vector deleting destructor'; // weak
int (__thiscall *NiPSysAirFieldAirFrictionCtlr::`vftable')(void *p, char) = &NiPSysModifierBoolCtlr::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPSysModifier *>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPSysModifier *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerMap<char const *,NiPSysModifier *>::`vftable')(void *p, char) = &NiTPointerMap<char const *,NiPSysModifier *>::`vector deleting destructor'; // weak
int (__thiscall *NiTStringTemplateMap<NiTPointerMap<char const *,NiPSysModifier *>,NiPSysModifier *>::`vftable')(void *p, char) = &NiTStringPointerMap<NiPSysModifier *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerList<NiPointer<NiPSysModifier>>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTStringPointerMap<NiPSysModifier *>::`vftable')(void *p, char) = &NiTStringPointerMap<NiPSysModifier *>::`scalar deleting destructor'; // weak
int (__thiscall *NiParticleSystem::`vftable')(void *p, char) = &NiParticleSystem::`scalar deleting destructor'; // weak
int (__thiscall *NiTArray<NiTArray<NiPointer<NiAVObject>> *>::`vftable')(void *p, char) = &NiTArray<NiTArray<NiPointer<NiAVObject>> *>::`scalar deleting destructor'; // weak
int (__thiscall *NiMeshPSysData::`vftable')(void *p, char) = &NiMeshPSysData::`vector deleting destructor'; // weak
int (__thiscall *NiMeshParticleSystem::`vftable')(void *p, char) = &NiParticleSystem::`scalar deleting destructor'; // weak
int (__thiscall *NiPSysModifierCtlr::`vftable')(void *p, char) = &NiPSysModifierCtlr::`scalar deleting destructor'; // weak
int (__thiscall *NiPSysEmitter::`vftable')(void *p, char) = &NiPSysRadialFieldModifier::`vector deleting destructor'; // weak
int (__thiscall *NiPSysModifier::`vftable')(void *p, char) = &NiPSysModifier::`vector deleting destructor'; // weak
int (__thiscall *NiPSysFieldModifier::`vftable')(void *p, char) = &NiPSysRadialFieldModifier::`vector deleting destructor'; // weak
int (__thiscall *NiPSysCollider::`vftable')(void *p, char) = &NiPSysPlanarCollider::`vector deleting destructor'; // weak
int (__thiscall *NiPSysVolumeEmitter::`vftable')(void *p, char) = &NiPSysRadialFieldModifier::`vector deleting destructor'; // weak
int (__thiscall *NiPSysModifierBoolCtlr::`vftable')(void *p, char) = &NiPSysModifierBoolCtlr::`vector deleting destructor'; // weak
int (__thiscall *NiPSysModifierFloatCtlr::`vftable')(void *p, char) = &NiPSysModifierBoolCtlr::`vector deleting destructor'; // weak
int (__thiscall *NiBinaryStream::`vftable')(void *p, char) = &NiBinaryStream::`scalar deleting destructor'; // weak
int (__thiscall *NiSearchPath::`vftable')(void *p, char) = &NiSearchPath::`scalar deleting destructor'; // weak
int (__thiscall *NiMemStream::`vftable')(void *p, char) = &NiMemStream::`vector deleting destructor'; // weak
const int NiFile::ms_iSeekCur = 1; // weak
int (__thiscall *NiFile::`vftable')(void *p, char) = &NiFile::`scalar deleting destructor'; // weak
int (__thiscall *NiOldWall::`vftable')(void *p, char) = &NiOldWall::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAVObject>>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAVObject>>::`vector deleting destructor'; // weak
int (__thiscall *NiTArray<NiRoom::Wall *>::`vftable')(void *p, char) = &NiTArray<NiRoom::Wall *>::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPortal>>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPortal>>::`vector deleting destructor'; // weak
int (__thiscall *NiTArray<bool>::`vftable')(void *p, char) = &NiTArray<bool>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAVObject>>::`vftable')(void *p, char) = &NiTPointerList<NiPointer<NiAVObject>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPortal>>::`vftable')(void *p, char) = &NiTPointerList<NiPointer<NiPortal>>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerList<NiPointer<NiAVObject>>::`vftable')(void *p, char) = &NiTPointerList<NiPointer<NiAVObject>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerList<NiPointer<NiPortal>>::`vftable')(void *p, char) = &NiTPointerList<NiPointer<NiPortal>>::`vector deleting destructor'; // weak
int (__thiscall *NiRoom::`vftable')(void *p, char) = &NiRoom::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom>>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom>>::`vftable')(void *p, char) = &NiTPointerList<NiPointer<NiRoom>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerList<NiPointer<NiRoom>>::`vftable')(void *p, char) = &NiTPointerList<NiPointer<NiRoom>>::`scalar deleting destructor'; // weak
int (__thiscall *NiRoomGroup::`vftable')(void *p, char) = &NiRoomGroup::`scalar deleting destructor'; // weak
int (__thiscall *NiPortal::`vftable')(void *p, char) = &NiPortal::`vector deleting destructor'; // weak
int (__thiscall *NiTMapBase<DFALL<int>,NiGeometry *,int>::`vftable')(void *p, char) = &NiTMapBase<DFALL<int>,NiGeometry *,int>::`vector deleting destructor'; // weak
int (__thiscall *NiTMap<NiGeometry *,int>::`vftable')(void *p, char) = &NiTMap<NiGeometry *,int>::`vector deleting destructor'; // weak
int (__thiscall *NiFixtureCuller::`vftable')(void *p, char) = &NiFixtureCuller::`vector deleting destructor'; // weak
const struct NiRTTI *(__thiscall *NiInputSystem::CreateParams::`vftable')(NiInputSystem::CreateParams *__hidden this) = &NiInputSystem::CreateParams::GetRTTI; // weak
const struct NiRTTI *(__thiscall *NiDI8InputSystem::DI8CreateParams::`vftable')(NiDI8InputSystem::DI8CreateParams *__hidden this) = &NiDI8InputSystem::DI8CreateParams::GetRTTI; // weak
int (__thiscall *NiTArray<NiPointer<NiScreenElements>>::`vftable')(void *p, char) = &NiTArray<NiPointer<NiScreenElements>>::`vector deleting destructor'; // weak
int (__thiscall *NiApplication::`vftable')(void *p, char) = &NiApplication::`scalar deleting destructor'; // weak
HWND (__thiscall *NiAppWindow::`vftable')(NiAppWindow *this, int iWinMode, HWND hWnd) = &NiAppWindow::CreateMainWindow; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiInputDevice::Description>>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiInputDevice::Description>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiActionData *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiActionData *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiInputDevice::Description>>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiInputDevice::Description>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiActionData *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiActionData *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerList<NiPointer<NiInputDevice::Description>>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiInputDevice::Description>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerList<NiActionData *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiActionData *>::`vector deleting destructor'; // weak
int (__thiscall *NiInputSystem::`vftable')(void *p, char) = &NiInputSystem::`vector deleting destructor'; // weak
_GUID g_guidNiInputDefault = { 3227622884u, 33921u, 16913u, "ˆ)¸õâÍï“" }; // idb
int (__thiscall *NiDI8InputSystem::`vftable')(void *p, char) = &NiDI8InputSystem::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiInputDevice::ControlDesc *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiInputDevice::ControlDesc *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiInputDevice::ControlDesc *>::`vftable')(void *p, char) = &NiTPointerList<NiInputDevice::ControlDesc *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerList<NiInputDevice::ControlDesc *>::`vftable')(void *p, char) = &NiTPointerList<NiInputDevice::ControlDesc *>::`scalar deleting destructor'; // weak
int (__thiscall *NiInputDevice::Description::`vftable')(void *p, char) = &NiInputDevice::Description::`scalar deleting destructor'; // weak
int (__thiscall *NiDI8InputSystem::DI8Description::`vftable')(void *p, char) = &NiDI8InputSystem::DI8Description::`vector deleting destructor'; // weak
int (__thiscall *NiInputGamePad::`vftable')(void *p, char) = &NiInputGamePad::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiAction *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiAction *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiAction *>::`vftable')(void *p, char) = &NiTPointerList<NiAction *>::`vector deleting destructor'; // weak
int (__thiscall *NiInputDevice::`vftable')(void *p, char) = &NiInputDevice::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerList<NiAction *>::`vftable')(void *p, char) = &NiTPointerList<NiAction *>::`vector deleting destructor'; // weak
int (__thiscall *NiInputDI8Mouse::`vftable')(void *p, char) = &NiInputDI8Mouse::`scalar deleting destructor'; // weak
int (__thiscall *NiInputDI8Keyboard::`vftable')(void *p, char) = &NiInputDI8Keyboard::`vector deleting destructor'; // weak
int (__thiscall *NiInputDI8GamePad::`vftable')(void *p, char) = &NiInputDI8GamePad::`vector deleting destructor'; // weak
int (__thiscall *NiInputMouse::`vftable')(void *p, char) = &NiInputMouse::`scalar deleting destructor'; // weak
int (__thiscall *NiInputKeyboard::`vftable')(void *p, char) = &NiInputKeyboard::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::`vftable')(void *p, char) = &NiTPointerList<NiPointer<NSBShader>>::`scalar deleting destructor'; // weak
int (__thiscall *NSBShaderLibrary::`vftable')(void *p, char) = &NSBShaderLibrary::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerList<NiPointer<NSBShader>>::`vftable')(void *p, char) = &NiTPointerList<NiPointer<NSBShader>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,char *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,char *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,char *>::`vftable')(void *p, char) = &NiTPointerList<char *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerList<char *>::`vftable')(void *p, char) = &NiTPointerList<char *>::`vector deleting destructor'; // weak
const unsigned __int16 yytranslate[542] =
{
  0u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  287u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  288u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  2u,
  1u,
  2u,
  3u,
  4u,
  5u,
  6u,
  7u,
  8u,
  9u,
  10u,
  11u,
  12u,
  13u,
  14u,
  15u,
  16u,
  17u,
  18u,
  19u,
  20u,
  21u,
  22u,
  23u,
  24u,
  25u,
  26u,
  27u,
  28u,
  29u,
  30u,
  31u,
  32u,
  33u,
  34u,
  35u,
  36u,
  37u,
  38u,
  39u,
  40u,
  41u,
  42u,
  43u,
  44u,
  45u,
  46u,
  47u,
  48u,
  49u,
  50u,
  51u,
  52u,
  53u,
  54u,
  55u,
  56u,
  57u,
  58u,
  59u,
  60u,
  61u,
  62u,
  63u,
  64u,
  65u,
  66u,
  67u,
  68u,
  69u,
  70u,
  71u,
  72u,
  73u,
  74u,
  75u,
  76u,
  77u,
  78u,
  79u,
  80u,
  81u,
  82u,
  83u,
  84u,
  85u,
  86u,
  87u,
  88u,
  89u,
  90u,
  91u,
  92u,
  93u,
  94u,
  95u,
  96u,
  97u,
  98u,
  99u,
  100u,
  101u,
  102u,
  103u,
  104u,
  105u,
  106u,
  107u,
  108u,
  109u,
  110u,
  111u,
  112u,
  113u,
  114u,
  115u,
  116u,
  117u,
  118u,
  119u,
  120u,
  121u,
  122u,
  123u,
  124u,
  125u,
  126u,
  127u,
  128u,
  129u,
  130u,
  131u,
  132u,
  133u,
  134u,
  135u,
  136u,
  137u,
  138u,
  139u,
  140u,
  141u,
  142u,
  143u,
  144u,
  145u,
  146u,
  147u,
  148u,
  149u,
  150u,
  151u,
  152u,
  153u,
  154u,
  155u,
  156u,
  157u,
  158u,
  159u,
  160u,
  161u,
  162u,
  163u,
  164u,
  165u,
  166u,
  167u,
  168u,
  169u,
  170u,
  171u,
  172u,
  173u,
  174u,
  175u,
  176u,
  177u,
  178u,
  179u,
  180u,
  181u,
  182u,
  183u,
  184u,
  185u,
  186u,
  187u,
  188u,
  189u,
  190u,
  191u,
  192u,
  193u,
  194u,
  195u,
  196u,
  197u,
  198u,
  199u,
  200u,
  201u,
  202u,
  203u,
  204u,
  205u,
  206u,
  207u,
  208u,
  209u,
  210u,
  211u,
  212u,
  213u,
  214u,
  215u,
  216u,
  217u,
  218u,
  219u,
  220u,
  221u,
  222u,
  223u,
  224u,
  225u,
  226u,
  227u,
  228u,
  229u,
  230u,
  231u,
  232u,
  233u,
  234u,
  235u,
  236u,
  237u,
  238u,
  239u,
  240u,
  241u,
  242u,
  243u,
  244u,
  245u,
  246u,
  247u,
  248u,
  249u,
  250u,
  251u,
  252u,
  253u,
  254u,
  255u,
  256u,
  257u,
  258u,
  259u,
  260u,
  261u,
  262u,
  263u,
  264u,
  265u,
  266u,
  267u,
  268u,
  269u,
  270u,
  271u,
  272u,
  273u,
  274u,
  275u,
  276u,
  277u,
  278u,
  279u,
  280u,
  281u,
  282u,
  283u,
  284u,
  285u,
  286u
}; // idb
const unsigned __int16 yyprhs[581] =
{
  0u,
  0u,
  3u,
  6u,
  8u,
  9u,
  10u,
  19u,
  22u,
  23u,
  25u,
  28u,
  30u,
  32u,
  34u,
  36u,
  38u,
  40u,
  42u,
  43u,
  45u,
  47u,
  50u,
  51u,
  53u,
  54u,
  56u,
  58u,
  60u,
  62u,
  66u,
  67u,
  88u,
  105u,
  106u,
  127u,
  128u,
  145u,
  146u,
  159u,
  160u,
  165u,
  166u,
  171u,
  176u,
  178u,
  180u,
  182u,
  184u,
  186u,
  188u,
  190u,
  192u,
  224u,
  248u,
  266u,
  282u,
  290u,
  296u,
  304u,
  310u,
  314u,
  316u,
  317u,
  323u,
  324u,
  330u,
  333u,
  335u,
  337u,
  339u,
  341u,
  343u,
  345u,
  347u,
  349u,
  351u,
  353u,
  355u,
  357u,
  359u,
  364u,
  365u,
  372u,
  373u,
  380u,
  381u,
  388u,
  389u,
  396u,
  397u,
  404u,
  405u,
  411u,
  412u,
  418u,
  419u,
  426u,
  432u,
  433u,
  439u,
  442u,
  444u,
  446u,
  448u,
  450u,
  452u,
  454u,
  456u,
  458u,
  460u,
  464u,
  468u,
  472u,
  476u,
  480u,
  484u,
  488u,
  492u,
  493u,
  500u,
  503u,
  504u,
  506u,
  508u,
  510u,
  512u,
  514u,
  516u,
  518u,
  520u,
  522u,
  524u,
  526u,
  528u,
  530u,
  532u,
  534u,
  536u,
  538u,
  540u,
  542u,
  544u,
  546u,
  548u,
  550u,
  552u,
  554u,
  556u,
  558u,
  561u,
  563u,
  565u,
  567u,
  569u,
  571u,
  573u,
  575u,
  577u,
  579u,
  581u,
  583u,
  585u,
  587u,
  589u,
  591u,
  593u,
  595u,
  597u,
  599u,
  601u,
  603u,
  605u,
  607u,
  609u,
  611u,
  613u,
  615u,
  617u,
  619u,
  621u,
  623u,
  625u,
  627u,
  629u,
  631u,
  633u,
  635u,
  637u,
  639u,
  641u,
  644u,
  646u,
  649u,
  652u,
  655u,
  663u,
  668u,
  675u,
  679u,
  680u,
  686u,
  689u,
  691u,
  693u,
  695u,
  698u,
  700u,
  702u,
  704u,
  706u,
  708u,
  711u,
  715u,
  719u,
  723u,
  727u,
  731u,
  735u,
  738u,
  740u,
  742u,
  744u,
  746u,
  748u,
  750u,
  752u,
  754u,
  755u,
  756u,
  765u,
  771u,
  777u,
  783u,
  789u,
  795u,
  801u,
  807u,
  813u,
  818u,
  823u,
  828u,
  833u,
  839u,
  840u,
  847u,
  848u,
  854u,
  864u,
  866u,
  868u,
  870u,
  872u,
  875u,
  876u,
  878u,
  879u,
  881u,
  882u,
  888u,
  889u,
  895u,
  899u,
  902u,
  905u,
  908u,
  912u,
  915u,
  917u,
  921u,
  925u,
  929u,
  931u,
  934u,
  936u,
  940u,
  944u,
  948u,
  949u,
  950u,
  960u,
  962u,
  964u,
  967u,
  970u,
  973u,
  977u,
  980u,
  982u,
  986u,
  990u,
  994u,
  996u,
  999u,
  1001u,
  1005u,
  1009u,
  1010u,
  1011u,
  1021u,
  1023u,
  1025u,
  1026u,
  1032u,
  1035u,
  1037u,
  1039u,
  1041u,
  1043u,
  1045u,
  1047u,
  1049u,
  1051u,
  1054u,
  1058u,
  1062u,
  1066u,
  1070u,
  1078u,
  1084u,
  1088u,
  1090u,
  1094u,
  1098u,
  1102u,
  1104u,
  1106u,
  1108u,
  1110u,
  1113u,
  1115u,
  1117u,
  1118u,
  1126u,
  1127u,
  1129u,
  1132u,
  1134u,
  1136u,
  1138u,
  1140u,
  1142u,
  1144u,
  1147u,
  1149u,
  1151u,
  1153u,
  1155u,
  1157u,
  1159u,
  1161u,
  1163u,
  1165u,
  1167u,
  1169u,
  1171u,
  1173u,
  1175u,
  1177u,
  1179u,
  1181u,
  1183u,
  1186u,
  1190u,
  1194u,
  1198u,
  1200u,
  1202u,
  1204u,
  1206u,
  1208u,
  1210u,
  1213u,
  1217u,
  1221u,
  1225u,
  1229u,
  1233u,
  1237u,
  1241u,
  1245u,
  1249u,
  1253u,
  1257u,
  1261u,
  1265u,
  1269u,
  1273u,
  1277u,
  1281u,
  1285u,
  1289u,
  1293u,
  1297u,
  1301u,
  1306u,
  1311u,
  1316u,
  1320u,
  1324u,
  1326u,
  1328u,
  1330u,
  1332u,
  1333u,
  1335u,
  1337u,
  1339u,
  1341u,
  1343u,
  1345u,
  1347u,
  1349u,
  1351u,
  1353u,
  1355u,
  1357u,
  1359u,
  1361u,
  1363u,
  1365u,
  1367u,
  1369u,
  1371u,
  1373u,
  1375u,
  1377u,
  1379u,
  1381u,
  1383u,
  1385u,
  1387u,
  1390u,
  1393u,
  1396u,
  1399u,
  1402u,
  1405u,
  1408u,
  1411u,
  1412u,
  1414u,
  1417u,
  1420u,
  1422u,
  1424u,
  1425u,
  1427u,
  1429u,
  1431u,
  1433u,
  1435u,
  1438u,
  1442u,
  1446u,
  1447u,
  1452u,
  1453u,
  1455u,
  1457u,
  1459u,
  1461u,
  1463u,
  1465u,
  1468u,
  1469u,
  1477u,
  1478u,
  1480u,
  1483u,
  1485u,
  1487u,
  1489u,
  1491u,
  1494u,
  1496u,
  1498u,
  1500u,
  1502u,
  1504u,
  1506u,
  1508u,
  1510u,
  1512u,
  1514u,
  1516u,
  1518u,
  1520u,
  1522u,
  1524u,
  1526u,
  1528u,
  1531u,
  1535u,
  1539u,
  1543u,
  1547u,
  1551u,
  1555u,
  1559u,
  1563u,
  1567u,
  1571u,
  1575u,
  1579u,
  1583u,
  1587u,
  1591u,
  1595u,
  1599u,
  1603u,
  1607u,
  1611u,
  1615u,
  1619u,
  1623u,
  1627u,
  1631u,
  1635u,
  1639u,
  1641u,
  1643u,
  1645u,
  1647u,
  1649u,
  1651u,
  1653u,
  1656u,
  1658u,
  1660u,
  1662u,
  1664u,
  1666u,
  1668u,
  1670u,
  1672u,
  1674u,
  1676u,
  1678u,
  1681u,
  1683u,
  1685u,
  1688u,
  1690u,
  1692u,
  1694u,
  1696u,
  1699u,
  1702u,
  1704u,
  1706u,
  1708u,
  1710u,
  1712u,
  1714u,
  1716u,
  1718u,
  1719u,
  1726u,
  1727u,
  1729u,
  1732u,
  1734u,
  1736u,
  1738u,
  1740u,
  1742u,
  1744u,
  1746u,
  1748u,
  1750u,
  1751u,
  1752u,
  1761u,
  1765u,
  1769u,
  1773u,
  1777u,
  1779u,
  1782u,
  1783u
}; // idb
const __int16 yyrhs[1790] =
{
  290,
  0,
  65535,
  290,
  291,
  65535,
  291,
  65535,
  65535,
  65535,
  28,
  24,
  5,
  292,
  299,
  293,
  294,
  6,
  65535,
  1,
  287,
  65535,
  65535,
  295,
  65535,
  295,
  296,
  65535,
  296,
  65535,
  319,
  65535,
  344,
  65535,
  321,
  65535,
  356,
  65535,
  504,
  65535,
  509,
  65535,
  65535,
  24,
  65535,
  25,
  65535,
  298,
  25,
  65535,
  65535,
  298,
  65535,
  65535,
  25,
  65535,
  4,
  65535,
  24,
  65535,
  25,
  65535,
  11,
  24,
  12,
  65535,
  65535,
  9,
  7,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  8,
  7,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  8,
  10,
  65535,
  9,
  7,
  22,
  15,
  22,
  15,
  22,
  8,
  7,
  22,
  15,
  22,
  15,
  22,
  8,
  10,
  65535,
  65535,
  9,
  7,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  8,
  7,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  8,
  10,
  65535,
  65535,
  9,
  7,
  22,
  15,
  22,
  15,
  22,
  8,
  7,
  22,
  15,
  22,
  15,
  22,
  8,
  10,
  65535,
  65535,
  9,
  7,
  22,
  15,
  22,
  8,
  7,
  22,
  15,
  22,
  8,
  10,
  65535,
  65535,
  9,
  22,
  22,
  10,
  65535,
  65535,
  9,
  23,
  23,
  10,
  65535,
  9,
  22,
  22,
  10,
  65535,
  310,
  65535,
  311,
  65535,
  312,
  65535,
  313,
  65535,
  315,
  65535,
  316,
  65535,
  317,
  65535,
  318,
  65535,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  65535,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  65535,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  65535,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  65535,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  65535,
  22,
  15,
  22,
  15,
  22,
  65535,
  22,
  15,
  22,
  15,
  22,
  15,
  22,
  65535,
  22,
  15,
  22,
  15,
  22,
  65535,
  22,
  15,
  22,
  65535,
  22,
  65535,
  65535,
  32,
  5,
  320,
  323,
  6,
  65535,
  65535,
  33,
  5,
  322,
  323,
  6,
  65535,
  323,
  324,
  65535,
  324,
  65535,
  326,
  65535,
  327,
  65535,
  329,
  65535,
  331,
  65535,
  333,
  65535,
  335,
  65535,
  337,
  65535,
  339,
  65535,
  341,
  65535,
  343,
  65535,
  29,
  65535,
  30,
  65535,
  35,
  24,
  325,
  26,
  65535,
  65535,
  37,
  328,
  24,
  325,
  23,
  308,
  65535,
  65535,
  38,
  330,
  24,
  325,
  22,
  307,
  65535,
  65535,
  39,
  332,
  24,
  325,
  317,
  306,
  65535,
  65535,
  40,
  334,
  24,
  325,
  316,
  305,
  65535,
  65535,
  41,
  336,
  24,
  325,
  315,
  304,
  65535,
  65535,
  42,
  338,
  24,
  325,
  312,
  65535,
  65535,
  43,
  340,
  24,
  325,
  310,
  65535,
  65535,
  44,
  342,
  24,
  325,
  314,
  303,
  65535,
  45,
  24,
  325,
  23,
  300,
  65535,
  65535,
  276,
  5,
  345,
  346,
  6,
  65535,
  346,
  347,
  65535,
  347,
  65535,
  348,
  65535,
  349,
  65535,
  350,
  65535,
  351,
  65535,
  352,
  65535,
  353,
  65535,
  354,
  65535,
  355,
  65535,
  277,
  23,
  24,
  65535,
  278,
  23,
  24,
  65535,
  279,
  23,
  24,
  65535,
  280,
  23,
  24,
  65535,
  281,
  23,
  24,
  65535,
  282,
  23,
  24,
  65535,
  283,
  23,
  24,
  65535,
  284,
  23,
  24,
  65535,
  65535,
  46,
  24,
  5,
  357,
  363,
  6,
  65535,
  46,
  24,
  65535,
  65535,
  69,
  65535,
  70,
  65535,
  71,
  65535,
  72,
  65535,
  73,
  65535,
  74,
  65535,
  75,
  65535,
  76,
  65535,
  77,
  65535,
  78,
  65535,
  79,
  65535,
  80,
  65535,
  81,
  65535,
  82,
  65535,
  83,
  65535,
  84,
  65535,
  85,
  65535,
  86,
  65535,
  87,
  65535,
  88,
  65535,
  89,
  65535,
  90,
  65535,
  91,
  65535,
  92,
  65535,
  93,
  65535,
  94,
  65535,
  95,
  65535,
  1,
  287,
  65535,
  49,
  65535,
  50,
  65535,
  51,
  65535,
  52,
  65535,
  53,
  65535,
  54,
  65535,
  55,
  65535,
  56,
  65535,
  57,
  65535,
  58,
  65535,
  59,
  65535,
  60,
  65535,
  61,
  65535,
  62,
  65535,
  63,
  65535,
  64,
  65535,
  65,
  65535,
  66,
  65535,
  67,
  65535,
  96,
  65535,
  97,
  65535,
  98,
  65535,
  99,
  65535,
  100,
  65535,
  101,
  65535,
  102,
  65535,
  103,
  65535,
  104,
  65535,
  105,
  65535,
  106,
  65535,
  107,
  65535,
  108,
  65535,
  109,
  65535,
  110,
  65535,
  111,
  65535,
  112,
  65535,
  113,
  65535,
  114,
  65535,
  115,
  65535,
  116,
  65535,
  363,
  364,
  65535,
  364,
  65535,
  1,
  287,
  65535,
  47,
  23,
  65535,
  48,
  26,
  65535,
  68,
  23,
  23,
  359,
  361,
  362,
  23,
  65535,
  68,
  23,
  23,
  359,
  65535,
  360,
  23,
  359,
  361,
  362,
  23,
  65535,
  360,
  23,
  359,
  65535,
  65535,
  117,
  5,
  366,
  367,
  6,
  65535,
  367,
  368,
  65535,
  368,
  65535,
  369,
  65535,
  370,
  65535,
  370,
  31,
  65535,
  373,
  65535,
  375,
  65535,
  374,
  65535,
  371,
  65535,
  372,
  65535,
  1,
  287,
  65535,
  24,
  14,
  302,
  65535,
  24,
  14,
  24,
  65535,
  24,
  14,
  26,
  65535,
  24,
  14,
  22,
  65535,
  24,
  14,
  21,
  65535,
  24,
  14,
  23,
  65535,
  376,
  377,
  65535,
  377,
  65535,
  381,
  65535,
  382,
  65535,
  383,
  65535,
  384,
  65535,
  386,
  65535,
  388,
  65535,
  378,
  65535,
  65535,
  65535,
  5,
  379,
  139,
  14,
  423,
  380,
  376,
  6,
  65535,
  118,
  131,
  23,
  23,
  23,
  65535,
  118,
  131,
  301,
  23,
  23,
  65535,
  118,
  132,
  23,
  23,
  23,
  65535,
  118,
  132,
  301,
  23,
  23,
  65535,
  118,
  133,
  23,
  23,
  23,
  65535,
  118,
  133,
  301,
  23,
  23,
  65535,
  118,
  134,
  23,
  23,
  23,
  65535,
  118,
  134,
  301,
  23,
  23,
  65535,
  118,
  301,
  23,
  23,
  65535,
  118,
  301,
  301,
  23,
  65535,
  286,
  24,
  24,
  23,
  65535,
  286,
  24,
  24,
  24,
  65535,
  119,
  301,
  23,
  23,
  23,
  65535,
  65535,
  120,
  385,
  301,
  23,
  23,
  309,
  65535,
  65535,
  121,
  387,
  301,
  23,
  23,
  65535,
  122,
  24,
  23,
  23,
  24,
  389,
  24,
  391,
  390,
  65535,
  17,
  65535,
  18,
  65535,
  19,
  65535,
  20,
  65535,
  1,
  287,
  65535,
  65535,
  180,
  65535,
  65535,
  179,
  65535,
  65535,
  123,
  5,
  393,
  376,
  6,
  65535,
  65535,
  125,
  5,
  395,
  376,
  6,
  65535,
  148,
  14,
  301,
  65535,
  124,
  4,
  65535,
  124,
  24,
  65535,
  124,
  25,
  65535,
  397,
  24,
  24,
  65535,
  397,
  24,
  65535,
  397,
  65535,
  127,
  14,
  4,
  65535,
  127,
  14,
  24,
  65535,
  127,
  14,
  25,
  65535,
  401,
  65535,
  401,
  400,
  65535,
  399,
  65535,
  128,
  14,
  24,
  65535,
  129,
  14,
  24,
  65535,
  130,
  14,
  26,
  65535,
  65535,
  65535,
  124,
  5,
  403,
  139,
  14,
  423,
  404,
  400,
  6,
  65535,
  402,
  65535,
  398,
  65535,
  126,
  4,
  65535,
  126,
  24,
  65535,
  126,
  25,
  65535,
  406,
  24,
  24,
  65535,
  406,
  24,
  65535,
  406,
  65535,
  127,
  14,
  4,
  65535,
  127,
  14,
  24,
  65535,
  127,
  14,
  25,
  65535,
  410,
  65535,
  410,
  409,
  65535,
  408,
  65535,
  128,
  14,
  24,
  65535,
  129,
  14,
  24,
  65535,
  65535,
  65535,
  126,
  5,
  412,
  139,
  14,
  423,
  413,
  409,
  6,
  65535,
  411,
  65535,
  407,
  65535,
  65535,
  135,
  5,
  416,
  417,
  6,
  65535,
  417,
  418,
  65535,
  418,
  65535,
  419,
  65535,
  420,
  65535,
  421,
  65535,
  422,
  65535,
  425,
  65535,
  426,
  65535,
  424,
  65535,
  1,
  287,
  65535,
  136,
  14,
  27,
  65535,
  137,
  14,
  27,
  65535,
  138,
  14,
  27,
  65535,
  139,
  14,
  423,
  65535,
  24,
  13,
  24,
  13,
  24,
  13,
  24,
  65535,
  24,
  13,
  24,
  13,
  24,
  65535,
  24,
  13,
  24,
  65535,
  24,
  65535,
  24,
  14,
  26,
  65535,
  140,
  14,
  23,
  65535,
  141,
  14,
  427,
  65535,
  142,
  65535,
  143,
  65535,
  145,
  65535,
  144,
  65535,
  1,
  287,
  65535,
  429,
  65535,
  469,
  65535,
  65535,
  150,
  23,
  297,
  5,
  430,
  431,
  6,
  65535,
  65535,
  432,
  65535,
  432,
  433,
  65535,
  433,
  65535,
  437,
  65535,
  465,
  65535,
  434,
  65535,
  435,
  65535,
  436,
  65535,
  436,
  31,
  65535,
  440,
  65535,
  441,
  65535,
  442,
  65535,
  443,
  65535,
  444,
  65535,
  445,
  65535,
  446,
  65535,
  447,
  65535,
  448,
  65535,
  449,
  65535,
  450,
  65535,
  451,
  65535,
  452,
  65535,
  453,
  65535,
  454,
  65535,
  455,
  65535,
  456,
  65535,
  457,
  65535,
  1,
  287,
  65535,
  151,
  14,
  438,
  65535,
  151,
  14,
  439,
  65535,
  151,
  14,
  302,
  65535,
  229,
  65535,
  230,
  65535,
  231,
  65535,
  232,
  65535,
  233,
  65535,
  234,
  65535,
  235,
  23,
  65535,
  152,
  14,
  460,
  65535,
  153,
  14,
  461,
  65535,
  154,
  14,
  461,
  65535,
  155,
  14,
  461,
  65535,
  156,
  14,
  460,
  65535,
  157,
  14,
  461,
  65535,
  158,
  14,
  461,
  65535,
  159,
  14,
  461,
  65535,
  160,
  14,
  461,
  65535,
  161,
  14,
  21,
  65535,
  162,
  14,
  22,
  65535,
  162,
  14,
  302,
  65535,
  163,
  14,
  22,
  65535,
  163,
  14,
  302,
  65535,
  164,
  14,
  22,
  65535,
  164,
  14,
  302,
  65535,
  165,
  14,
  22,
  65535,
  165,
  14,
  302,
  65535,
  166,
  14,
  22,
  65535,
  166,
  14,
  302,
  65535,
  167,
  14,
  22,
  65535,
  167,
  14,
  302,
  65535,
  168,
  14,
  464,
  23,
  65535,
  168,
  14,
  464,
  178,
  65535,
  169,
  14,
  458,
  459,
  65535,
  169,
  14,
  176,
  65535,
  169,
  14,
  171,
  65535,
  172,
  65535,
  173,
  65535,
  174,
  65535,
  175,
  65535,
  65535,
  176,
  65535,
  194,
  65535,
  195,
  65535,
  196,
  65535,
  197,
  65535,
  198,
  65535,
  199,
  65535,
  200,
  65535,
  201,
  65535,
  202,
  65535,
  203,
  65535,
  204,
  65535,
  205,
  65535,
  206,
  65535,
  207,
  65535,
  208,
  65535,
  209,
  65535,
  210,
  65535,
  211,
  65535,
  212,
  65535,
  213,
  65535,
  214,
  65535,
  215,
  65535,
  216,
  65535,
  217,
  65535,
  218,
  65535,
  219,
  65535,
  1,
  287,
  65535,
  220,
  462,
  65535,
  221,
  462,
  65535,
  222,
  462,
  65535,
  223,
  462,
  65535,
  224,
  462,
  65535,
  225,
  462,
  65535,
  226,
  462,
  65535,
  65535,
  463,
  65535,
  227,
  228,
  65535,
  228,
  227,
  65535,
  227,
  65535,
  228,
  65535,
  65535,
  189,
  65535,
  190,
  65535,
  191,
  65535,
  192,
  65535,
  193,
  65535,
  1,
  287,
  65535,
  170,
  14,
  466,
  65535,
  181,
  468,
  24,
  65535,
  65535,
  182,
  467,
  468,
  310,
  65535,
  65535,
  183,
  65535,
  184,
  65535,
  185,
  65535,
  186,
  65535,
  187,
  65535,
  188,
  65535,
  1,
  287,
  65535,
  65535,
  236,
  23,
  297,
  5,
  470,
  471,
  6,
  65535,
  65535,
  472,
  65535,
  472,
  473,
  65535,
  473,
  65535,
  474,
  65535,
  475,
  65535,
  437,
  65535,
  475,
  31,
  65535,
  476,
  65535,
  477,
  65535,
  478,
  65535,
  479,
  65535,
  480,
  65535,
  481,
  65535,
  482,
  65535,
  483,
  65535,
  484,
  65535,
  485,
  65535,
  486,
  65535,
  487,
  65535,
  488,
  65535,
  489,
  65535,
  490,
  65535,
  491,
  65535,
  492,
  65535,
  1,
  287,
  65535,
  237,
  14,
  493,
  65535,
  238,
  14,
  493,
  65535,
  239,
  14,
  493,
  65535,
  240,
  14,
  21,
  65535,
  240,
  14,
  302,
  65535,
  241,
  14,
  494,
  65535,
  242,
  14,
  494,
  65535,
  243,
  14,
  494,
  65535,
  244,
  14,
  23,
  65535,
  244,
  14,
  302,
  65535,
  245,
  14,
  23,
  65535,
  245,
  14,
  302,
  65535,
  246,
  14,
  23,
  65535,
  246,
  14,
  302,
  65535,
  247,
  14,
  23,
  65535,
  247,
  14,
  302,
  65535,
  248,
  14,
  23,
  65535,
  248,
  14,
  302,
  65535,
  249,
  14,
  23,
  65535,
  249,
  14,
  302,
  65535,
  250,
  14,
  495,
  65535,
  250,
  14,
  302,
  65535,
  251,
  14,
  496,
  65535,
  252,
  14,
  24,
  65535,
  252,
  14,
  288,
  65535,
  253,
  14,
  21,
  65535,
  253,
  14,
  302,
  65535,
  254,
  65535,
  255,
  65535,
  256,
  65535,
  257,
  65535,
  258,
  65535,
  259,
  65535,
  285,
  65535,
  1,
  287,
  65535,
  260,
  65535,
  261,
  65535,
  262,
  65535,
  263,
  65535,
  264,
  65535,
  265,
  65535,
  268,
  65535,
  266,
  65535,
  267,
  65535,
  269,
  65535,
  285,
  65535,
  1,
  287,
  65535,
  270,
  65535,
  271,
  65535,
  1,
  287,
  65535,
  272,
  65535,
  273,
  65535,
  274,
  65535,
  275,
  65535,
  1,
  287,
  65535,
  497,
  498,
  65535,
  498,
  65535,
  365,
  65535,
  405,
  65535,
  392,
  65535,
  414,
  65535,
  394,
  65535,
  428,
  65535,
  509,
  65535,
  65535,
  149,
  297,
  5,
  500,
  497,
  6,
  65535,
  65535,
  502,
  65535,
  502,
  503,
  65535,
  503,
  65535,
  365,
  65535,
  358,
  65535,
  499,
  65535,
  415,
  65535,
  392,
  65535,
  394,
  65535,
  396,
  65535,
  509,
  65535,
  65535,
  65535,
  147,
  24,
  5,
  505,
  299,
  506,
  501,
  6,
  65535,
  301,
  14,
  23,
  65535,
  301,
  14,
  26,
  65535,
  301,
  14,
  309,
  65535,
  301,
  14,
  301,
  65535,
  507,
  65535,
  507,
  508,
  65535,
  65535,
  146,
  24,
  5,
  510,
  508,
  6,
  65535
}; // idb
const unsigned __int16 yyrline[581] =
{
  0u,
  437u,
  437u,
  438u,
  445u,
  480u,
  442u,
  502u,
  509u,
  511u,
  515u,
  516u,
  520u,
  521u,
  522u,
  523u,
  524u,
  525u,
  532u,
  533u,
  537u,
  541u,
  553u,
  554u,
  558u,
  559u,
  560u,
  564u,
  565u,
  569u,
  577u,
  580u,
  599u,
  620u,
  623u,
  646u,
  649u,
  670u,
  673u,
  688u,
  691u,
  701u,
  704u,
  710u,
  723u,
  724u,
  725u,
  726u,
  727u,
  728u,
  729u,
  730u,
  734u,
  759u,
  779u,
  796u,
  811u,
  818u,
  827u,
  837u,
  846u,
  854u,
  867u,
  865u,
  896u,
  894u,
  924u,
  925u,
  930u,
  931u,
  932u,
  933u,
  934u,
  935u,
  936u,
  937u,
  938u,
  939u,
  945u,
  946u,
  951u,
  982u,
  981u,
  1046u,
  1045u,
  1109u,
  1108u,
  1175u,
  1174u,
  1243u,
  1242u,
  1313u,
  1312u,
  1353u,
  1352u,
  1399u,
  1398u,
  1530u,
  1564u,
  1562u,
  1590u,
  1591u,
  1596u,
  1597u,
  1598u,
  1599u,
  1600u,
  1601u,
  1602u,
  1603u,
  1608u,
  1622u,
  1636u,
  1650u,
  1664u,
  1678u,
  1692u,
  1706u,
  1725u,
  1722u,
  1757u,
  1794u,
  1795u,
  1796u,
  1797u,
  1798u,
  1799u,
  1800u,
  1801u,
  1802u,
  1803u,
  1804u,
  1805u,
  1806u,
  1807u,
  1808u,
  1809u,
  1810u,
  1811u,
  1812u,
  1813u,
  1814u,
  1815u,
  1816u,
  1817u,
  1818u,
  1819u,
  1820u,
  1821u,
  1822u,
  1830u,
  1832u,
  1834u,
  1836u,
  1838u,
  1840u,
  1842u,
  1844u,
  1846u,
  1848u,
  1850u,
  1852u,
  1854u,
  1856u,
  1858u,
  1860u,
  1862u,
  1864u,
  1866u,
  1871u,
  1873u,
  1875u,
  1877u,
  1879u,
  1881u,
  1883u,
  1888u,
  1890u,
  1892u,
  1894u,
  1896u,
  1898u,
  1900u,
  1902u,
  1904u,
  1906u,
  1908u,
  1910u,
  1912u,
  1914u,
  1919u,
  1920u,
  1921u,
  1929u,
  1935u,
  1941u,
  1994u,
  2029u,
  2074u,
  2114u,
  2112u,
  2147u,
  2148u,
  2152u,
  2162u,
  2175u,
  2179u,
  2180u,
  2181u,
  2182u,
  2183u,
  2184u,
  2192u,
  2225u,
  2281u,
  2323u,
  2365u,
  2403u,
  2447u,
  2448u,
  2452u,
  2453u,
  2454u,
  2455u,
  2456u,
  2457u,
  2458u,
  2463u,
  2475u,
  2462u,
  2488u,
  2527u,
  2566u,
  2605u,
  2644u,
  2683u,
  2722u,
  2761u,
  2800u,
  2825u,
  2852u,
  2930u,
  3011u,
  3045u,
  3044u,
  3101u,
  3100u,
  3127u,
  3159u,
  3161u,
  3163u,
  3165u,
  3167u,
  3175u,
  3176u,
  3180u,
  3181u,
  3189u,
  3187u,
  3228u,
  3226u,
  3266u,
  3281u,
  3291u,
  3301u,
  3314u,
  3332u,
  3346u,
  3355u,
  3356u,
  3357u,
  3361u,
  3362u,
  3367u,
  3376u,
  3385u,
  3394u,
  3406u,
  3412u,
  3404u,
  3425u,
  3426u,
  3433u,
  3443u,
  3453u,
  3466u,
  3484u,
  3498u,
  3507u,
  3508u,
  3509u,
  3513u,
  3514u,
  3519u,
  3533u,
  3542u,
  3556u,
  3562u,
  3554u,
  3575u,
  3576u,
  3585u,
  3583u,
  3620u,
  3621u,
  3625u,
  3626u,
  3627u,
  3628u,
  3629u,
  3630u,
  3631u,
  3632u,
  3640u,
  3651u,
  3668u,
  3679u,
  3690u,
  3738u,
  3776u,
  3805u,
  3827u,
  3865u,
  3876u,
  3890u,
  3891u,
  3892u,
  3893u,
  3904u,
  3914u,
  3915u,
  3924u,
  3922u,
  3956u,
  3958u,
  3962u,
  3963u,
  3967u,
  3968u,
  3969u,
  3973u,
  3991u,
  4012u,
  4016u,
  4017u,
  4018u,
  4019u,
  4020u,
  4021u,
  4022u,
  4023u,
  4024u,
  4025u,
  4026u,
  4027u,
  4028u,
  4029u,
  4030u,
  4031u,
  4032u,
  4033u,
  4034u,
  4043u,
  4048u,
  4053u,
  4146u,
  4147u,
  4148u,
  4149u,
  4150u,
  4151u,
  4156u,
  4163u,
  4176u,
  4189u,
  4202u,
  4215u,
  4228u,
  4241u,
  4254u,
  4267u,
  4280u,
  4297u,
  4307u,
  4317u,
  4327u,
  4337u,
  4347u,
  4357u,
  4367u,
  4377u,
  4387u,
  4397u,
  4407u,
  4417u,
  4428u,
  4445u,
  4463u,
  4477u,
  4494u,
  4495u,
  4496u,
  4497u,
  4502u,
  4503u,
  4508u,
  4512u,
  4516u,
  4520u,
  4524u,
  4528u,
  4532u,
  4536u,
  4540u,
  4544u,
  4548u,
  4552u,
  4556u,
  4560u,
  4564u,
  4568u,
  4572u,
  4576u,
  4580u,
  4584u,
  4588u,
  4592u,
  4596u,
  4600u,
  4604u,
  4608u,
  4612u,
  4620u,
  4623u,
  4626u,
  4629u,
  4632u,
  4635u,
  4638u,
  4644u,
  4645u,
  4649u,
  4655u,
  4660u,
  4662u,
  4668u,
  4671u,
  4675u,
  4679u,
  4683u,
  4687u,
  4691u,
  4699u,
  4706u,
  4723u,
  4722u,
  4764u,
  4765u,
  4767u,
  4769u,
  4771u,
  4773u,
  4775u,
  4777u,
  4790u,
  4788u,
  4817u,
  4819u,
  4823u,
  4824u,
  4828u,
  4847u,
  4866u,
  4874u,
  4878u,
  4879u,
  4880u,
  4881u,
  4882u,
  4883u,
  4884u,
  4885u,
  4886u,
  4887u,
  4888u,
  4889u,
  4890u,
  4891u,
  4892u,
  4893u,
  4894u,
  4895u,
  4903u,
  4932u,
  4961u,
  5001u,
  5012u,
  5023u,
  5052u,
  5081u,
  5110u,
  5121u,
  5132u,
  5143u,
  5154u,
  5165u,
  5176u,
  5187u,
  5198u,
  5209u,
  5220u,
  5231u,
  5242u,
  5252u,
  5267u,
  5280u,
  5292u,
  5305u,
  5315u,
  5330u,
  5332u,
  5334u,
  5336u,
  5338u,
  5340u,
  5342u,
  5347u,
  5355u,
  5357u,
  5359u,
  5361u,
  5363u,
  5365u,
  5367u,
  5369u,
  5371u,
  5373u,
  5375u,
  5380u,
  5388u,
  5389u,
  5390u,
  5398u,
  5399u,
  5400u,
  5401u,
  5402u,
  5413u,
  5414u,
  5418u,
  5419u,
  5420u,
  5421u,
  5422u,
  5423u,
  5424u,
  5430u,
  5428u,
  5459u,
  5461u,
  5465u,
  5466u,
  5470u,
  5471u,
  5472u,
  5473u,
  5474u,
  5475u,
  5476u,
  5477u,
  5483u,
  5502u,
  5481u,
  5528u,
  5559u,
  5590u,
  5674u,
  5709u,
  5710u,
  5716u,
  5714u
}; // idb
const char *const yytname[512] =
{
  "$end",
  "error",
  "$undefined",
  "EOLN",
  "PATH",
  "L_ACCOLADE",
  "R_ACCOLADE",
  "L_PARENTHESE",
  "R_PARENTHESE",
  "L_BRACKET",
  "R_BRACKET",
  "L_ANGLEBRACKET",
  "R_ANGLEBRACKET",
  "OR",
  "ASSIGN",
  "COMMA",
  "UNDERSCORE",
  "ASTERIK",
  "FORWARDSLASH",
  "PLUS",
  "MINUS",
  "N_HEX",
  "N_FLOAT",
  "N_INT",
  "N_STRING",
  "N_QUOTE",
  "N_BOOL",
  "N_VERSION",
  "NSFSHADER",
  "ARTIST",
  "HIDDEN",
  "SAVE",
  "ATTRIBUTES",
  "GLOBALATTRIBUTES",
  "ATTRIB",
  "ATTRIB_BOOL",
  "ATTRIB_STRING",
  "ATTRIB_UINT",
  "ATTRIB_FLOAT",
  "ATTRIB_POINT2",
  "ATTRIB_POINT3",
  "ATTRIB_POINT4",
  "ATTRIB_MATRIX3",
  "ATTRIB_TRANSFORM",
  "ATTRIB_COLOR",
  "ATTRIB_TEXTURE",
  "PACKINGDEF",
  "PD_STREAM",
  "PD_FIXEDFUNCTION",
  "PDP_POSITION",
  "PDP_BLENDWEIGHTS",
  "PDP_BLENDINDICES",
  "PDP_NORMAL",
  "PDP_POINTSIZE",
  "PDP_COLOR",
  "PDP_COLOR2",
  "PDP_TEXCOORD0",
  "PDP_TEXCOORD1",
  "PDP_TEXCOORD2",
  "PDP_TEXCOORD3",
  "PDP_TEXCOORD4",
  "PDP_TEXCOORD5",
  "PDP_TEXCOORD6",
  "PDP_TEXCOORD7",
  "PDP_POSITION2",
  "PDP_NORMAL2",
  "PDP_TANGENT",
  "PDP_BINORMAL",
  "PDP_EXTRADATA",
  "PDT_FLOAT1",
  "PDT_FLOAT2",
  "PDT_FLOAT3",
  "PDT_FLOAT4",
  "PDT_UBYTECOLOR",
  "PDT_SHORT1",
  "PDT_SHORT2",
  "PDT_SHORT3",
  "PDT_SHORT4",
  "PDT_UBYTE4",
  "PDT_NORMSHORT1",
  "PDT_NORMSHORT2",
  "PDT_NORMSHORT3",
  "PDT_NORMSHORT4",
  "PDT_NORMPACKED3",
  "PDT_PBYTE1",
  "PDT_PBYTE2",
  "PDT_PBYTE3",
  "PDT_PBYTE4",
  "PDT_FLOAT2H",
  "PDT_NORMUBYTE4",
  "PDT_NORMUSHORT2",
  "PDT_NORMUSHORT4",
  "PDT_UDEC3",
  "PDT_NORMDEC3",
  "PDT_FLOAT16_2",
  "PDT_FLOAT16_4",
  "PDTESS_DEFAULT",
  "PDTESS_PARTIALU",
  "PDTESS_PARTIALV",
  "PDTESS_CROSSUV",
  "PDTESS_UV",
  "PDTESS_LOOKUP",
  "PDTESS_LOOKUPPRESAMPLED",
  "PDU_POSITION",
  "PDU_BLENDWEIGHT",
  "PDU_BLENDINDICES",
  "PDU_NORMAL",
  "PDU_PSIZE",
  "PDU_TEXCOORD",
  "PDU_TANGENT",
  "PDU_BINORMAL",
  "PDU_TESSFACTOR",
  "PDU_POSITIONT",
  "PDU_COLOR",
  "PDU_FOG",
  "PDU_DEPTH",
  "PDU_SAMPLE",
  "RENDERSTATES",
  "CMDEFINED",
  "CMATTRIBUTE",
  "CMCONSTANT",
  "CMGLOBAL",
  "CMOPERATOR",
  "VSCONSTANTMAP",
  "VSPROGRAM",
  "PSCONSTANTMAP",
  "PSPROGRAM",
  "PROGRAM",
  "ENTRYPOINT",
  "SHADERTARGET",
  "SOFTWAREVP",
  "BONEMATRIX3",
  "BONEMATRIX4",
  "SKINBONEMATRIX3",
  "SKINBONEMATRIX4",
  "REQUIREMENTS",
  "VSVERSION",
  "PSVERSION",
  "USERVERSION",
  "PLATFORM",
  "BONESPERPARTITION",
  "BINORMALTANGENTMETHOD",
  "NBTMETHOD_NONE",
  "NBTMETHOD_NI",
  "NBTMETHOD_MAX",
  "NBTMETHOD_ATI",
  "USERDEFINEDDATA",
  "IMPLEMENTATION",
  "CLASSNAME",
  "PASS",
  "STAGE",
  "TSS_TEXTURE",
  "TSS_COLOROP",
  "TSS_COLORARG0",
  "TSS_COLORARG1",
  "TSS_COLORARG2",
  "TSS_ALPHAOP",
  "TSS_ALPHAARG0",
  "TSS_ALPHAARG1",
  "TSS_ALPHAARG2",
  "TSS_RESULTARG",
  "TSS_CONSTANT_DEPRECATED",
  "TSS_BUMPENVMAT00",
  "TSS_BUMPENVMAT01",
  "TSS_BUMPENVMAT10",
  "TSS_BUMPENVMAT11",
  "TSS_BUMPENVLSCALE",
  "TSS_BUMPENVLOFFSET",
  "TSS_TEXCOORDINDEX",
  "TSS_TEXTURETRANSFORMFLAGS",
  "TSS_TEXTRANSMATRIX",
  "TTFF_DISABLE",
  "TTFF_COUNT1",
  "TTFF_COUNT2",
  "TTFF_COUNT3",
  "TTFF_COUNT4",
  "TTFF_PROJECTED",
  "PROJECTED",
  "USEMAPINDEX",
  "INVERSE",
  "TRANSPOSE",
  "TTSRC_GLOBAL",
  "TTSRC_CONSTANT",
  "TT_WORLD_PARALLEL",
  "TT_WORLD_PERSPECTIVE",
  "TT_WORLD_SPHERE_MAP",
  "TT_CAMERA_SPHERE_MAP",
  "TT_SPECULAR_CUBE_MAP",
  "TT_DIFFUSE_CUBE_MAP",
  "TCI_PASSTHRU",
  "TCI_CAMERASPACENORMAL",
  "TCI_CAMERASPACEPOSITION",
  "TCI_CAMERASPACEREFLECT",
  "TCI_SPHEREMAP",
  "TOP_DISABLE",
  "TOP_SELECTARG1",
  "TOP_SELECTARG2",
  "TOP_MODULATE",
  "TOP_MODULATE2X",
  "TOP_MODULATE4X",
  "TOP_ADD",
  "TOP_ADDSIGNED",
  "TOP_ADDSIGNED2X",
  "TOP_SUBTRACT",
  "TOP_ADDSMOOTH",
  "TOP_BLENDDIFFUSEALPHA",
  "TOP_BLENDTEXTUREALPHA",
  "TOP_BLENDFACTORALPHA",
  "TOP_BLENDTEXTUREALPHAPM",
  "TOP_BLENDCURRENTALPHA",
  "TOP_PREMODULATE",
  "TOP_MODULATEALPHA_ADDCOLOR",
  "TOP_MODULATECOLOR_ADDALPHA",
  "TOP_MODULATEINVALPHA_ADDCOLOR",
  "TOP_MODULATEINVCOLOR_ADDALPHA",
  "TOP_BUMPENVMAP",
  "TOP_BUMPENVMAPLUMINANCE",
  "TOP_DOTPRODUCT3",
  "TOP_MULTIPLYADD",
  "TOP_LERP",
  "TA_CURRENT",
  "TA_DIFFUSE",
  "TA_SELECTMASK",
  "TA_SPECULAR",
  "TA_TEMP",
  "TA_TEXTURE",
  "TA_TFACTOR",
  "TA_ALPHAREPLICATE",
  "TA_COMPLEMENT",
  "NTM_BASE",
  "NTM_DARK",
  "NTM_DETAIL",
  "NTM_GLOSS",
  "NTM_GLOW",
  "NTM_BUMP",
  "NTM_DECAL",
  "SAMPLER",
  "TSAMP_ADDRESSU",
  "TSAMP_ADDRESSV",
  "TSAMP_ADDRESSW",
  "TSAMP_BORDERCOLOR",
  "TSAMP_MAGFILTER",
  "TSAMP_MINFILTER",
  "TSAMP_MIPFILTER",
  "TSAMP_MIPMAPLODBIAS",
  "TSAMP_MAXMIPLEVEL",
  "TSAMP_MAXANISOTROPY",
  "TSAMP_SRGBTEXTURE",
  "TSAMP_ELEMENTINDEX",
  "TSAMP_DMAPOFFSET",
  "TSAMP_ALPHAKILL_DEPRECATED",
  "TSAMP_COLORKEYOP_DEPRECATED",
  "TSAMP_COLORSIGN_DEPRECATED",
  "TSAMP_COLORKEYCOLOR_DEPRECATED",
  "TADDR_WRAP",
  "TADDR_MIRROR",
  "TADDR_CLAMP",
  "TADDR_BORDER",
  "TADDR_MIRRORONCE",
  "TADDR_CLAMPTOEDGE_DEPRECATED",
  "TEXF_NONE",
  "TEXF_POINT",
  "TEXF_LINEAR",
  "TEXF_ANISOTROPIC",
  "TEXF_PYRAMIDALQUAD",
  "TEXF_GAUSSIANQUAD",
  "TEXF_FLATCUBIC_DEPRECATED",
  "TEXF_GAUSSIANCUBIC_DEPRECATED",
  "TEXF_QUINCUNX_DEPRECATED",
  "TEXF_MAX_DEPRECATED",
  "TAK_DISABLE_DEPRECATED",
  "TAK_ENABLE_DEPRECATED",
  "TCKOP_DISABLE_DEPRECATED",
  "TCKOP_ALPHA_DEPRECATED",
  "TCKOP_RGBA_DEPRECATED",
  "TCKOP_KILL_DEPRECATED",
  "OBJECTS",
  "EFFECT_GENERALLIGHT",
  "EFFECT_POINTLIGHT",
  "EFFECT_DIRECTIONALLIGHT",
  "EFFECT_SPOTLIGHT",
  "EFFECT_ENVIRONMENTMAP",
  "EFFECT_PROJECTEDSHADOWMAP",
  "EFFECT_PROJECTEDLIGHTMAP",
  "EFFECT_FOGMAP",
  "USEMAPVALUE",
  "CMOBJECT",
  "'\\n'",
  "'0'",
  "$accept",
  "shader_file",
  "shader",
  "@1",
  "@2",
  "nsfshader_components_optional",
  "nsfshader_components_list",
  "nsfshader_component",
  "optional_string",
  "optional_multi_string",
  "optional_description",
  "optional_filename",
  "string_or_quote",
  "attribute_name",
  "range_color_optional",
  "range_point4_optional",
  "range_point3_optional",
  "range_point2_optional",
  "range_float_optional",
  "range_int_optional",
  "float_values_list",
  "float_values_16",
  "float_values_12",
  "float_values_9",
  "float_values_8",
  "float_values_color",
  "float_values_4",
  "float_values_3",
  "float_values_2",
  "float_values_1",
  "attribute_list_with_brackets",
  "@3",
  "global_attribute_list_with_brackets",
  "@4",
  "attribute_list",
  "attribute_value",
  "artist_conditional",
  "attribute_bool",
  "attribute_uint",
  "@5",
  "attribute_float",
  "@6",
  "attribute_point2",
  "@7",
  "attribute_point3",
  "@8",
  "attribute_point4",
  "@9",
  "attribute_matrix3",
  "@10",
  "attribute_transform",
  "@11",
  "attribute_color",
  "@12",
  "attribute_texture",
  "object_list_with_brackets",
  "@13",
  "object_list",
  "object_value",
  "object_effect_general_light",
  "object_effect_point_light",
  "object_effect_directional_light",
  "object_effect_spot_light",
  "object_effect_environment_map",
  "object_effect_projected_shadow_map",
  "object_effect_projected_light_map",
  "object_effect_fog_map",
  "packing_definition_definition",
  "@14",
  "packing_definition_declaration",
  "packing_definition_type",
  "packing_definition_parameter",
  "packing_definition_tesselator",
  "packing_definition_usage",
  "packing_definition_entries",
  "packing_definition_entry",
  "renderstate_list_with_brackets",
  "@15",
  "renderstate_list",
  "renderstate_entry_save_optional",
  "renderstate_entry_save",
  "renderstate_entry",
  "renderstate_attribute",
  "renderstate_string",
  "renderstate_bool",
  "renderstate_float",
  "renderstate_hex",
  "constantmap_list",
  "constantmap_entry",
  "constantmap_platform_block",
  "@16",
  "@17",
  "constantmap_entry_defined",
  "constantmap_entry_object",
  "constantmap_entry_attribute",
  "constantmap_entry_constant",
  "@18",
  "constantmap_entry_global",
  "@19",
  "constantmap_entry_operator",
  "operator_type",
  "operator_optional_transpose",
  "operator_optional_inverse",
  "vs_constantmap_with_brackets",
  "@20",
  "ps_constantmap_with_brackets",
  "@21",
  "userdefined_classname",
  "vertexshader_program_name",
  "vertexshader_program",
  "vertexshader_program_name_only",
  "vertexshader_program_bracket_contents_list",
  "vertexshader_program_bracket_content",
  "vertexshader_program_bracket",
  "@22",
  "@23",
  "vertexshader_program_entry",
  "pixelshader_program_name",
  "pixelshader_program",
  "pixelshader_program_name_only",
  "pixelshader_program_bracket_contents_list",
  "pixelshader_program_bracket_content",
  "pixelshader_program_bracket",
  "@24",
  "@25",
  "pixelshader_program_entry",
  "requirement_list_with_brackets",
  "@26",
  "requirement_list",
  "requirement_entry",
  "requirement_vsversion",
  "requirement_psversion",
  "requirement_userdefined",
  "requirement_platform",
  "requirement_platform_list",
  "requirement_remaining",
  "requirement_bonesperpartition",
  "requirement_usesbinormaltangent",
  "binormaltanget_method",
  "stage_or_sampler",
  "stage",
  "@27",
  "stage_entry_list_optional",
  "stage_entry_list",
  "stage_entry_or_texture",
  "stage_entry_save_optional",
  "stage_entry_save",
  "stage_entry",
  "stage_texture",
  "stage_texture_map_ndl",
  "stage_texture_map_ndl_decal",
  "stage_color_op",
  "stage_color_arg0",
  "stage_color_arg1",
  "stage_color_arg2",
  "stage_alpha_op",
  "stage_alpha_arg0",
  "stage_alpha_arg1",
  "stage_alpha_arg2",
  "stage_result_arg",
  "stage_constant_deprecated",
  "stage_bumpenvmat00",
  "stage_bumpenvmat01",
  "stage_bumpenvmat10",
  "stage_bumpenvmat11",
  "stage_bumpenvlscale",
  "stage_bumpenvloffset",
  "stage_texcoordindex",
  "stage_textransflags",
  "stage_texturetransformflags_count",
  "stage_texturetransformflags_optional_projection",
  "stage_texture_operation",
  "stage_texture_argument",
  "stage_texture_argument_modifiers_optional",
  "stage_texture_argument_modifier",
  "stage_texcoordindex_flags",
  "stage_textransmatrix",
  "stage_textransmatrix_assignment",
  "@28",
  "stage_textransmatrix_option",
  "sampler",
  "@29",
  "sampler_entry_list_optional",
  "sampler_entry_list",
  "sampler_entry_save_optional",
  "sampler_entry_save",
  "sampler_entry",
  "sampler_addressu",
  "sampler_addressv",
  "sampler_addressw",
  "sampler_bordercolor",
  "sampler_magfilter",
  "sampler_minfilter",
  "sampler_mipfilter",
  "sampler_mipmaplodbias",
  "sampler_maxmiplevel",
  "sampler_maxanisotropy",
  "sampler_srgbtexture",
  "sampler_elementindex",
  "sampler_dmapoffset",
  "sampler_alphakill_deprecated",
  "sampler_colorkeyop_deprecated",
  "sampler_colorsign_deprecated",
  "sampler_colorkeycolor_deprecated",
  "sampler_texture_address",
  "sampler_texture_filter",
  "sampler_texture_alphakill",
  "sampler_texture_colorkeyop",
  "pass_component_list",
  "pass_component",
  "pass",
  "@30",
  "implementation_component_list_optional",
  "implementation_component_list",
  "implementation_component",
  "implementation",
  "@31",
  "@32",
  "userdefineddata",
  "userdefineddata_list",
  "userdefineddata_block",
  "@33",
  NULL
}; // idb
const unsigned __int16 yyr1[581] =
{
  0u,
  289u,
  290u,
  290u,
  292u,
  293u,
  291u,
  291u,
  294u,
  294u,
  295u,
  295u,
  296u,
  296u,
  296u,
  296u,
  296u,
  296u,
  297u,
  297u,
  298u,
  298u,
  299u,
  299u,
  300u,
  300u,
  300u,
  301u,
  301u,
  302u,
  303u,
  303u,
  303u,
  304u,
  304u,
  305u,
  305u,
  306u,
  306u,
  307u,
  307u,
  308u,
  308u,
  308u,
  309u,
  309u,
  309u,
  309u,
  309u,
  309u,
  309u,
  309u,
  310u,
  311u,
  312u,
  313u,
  314u,
  314u,
  315u,
  316u,
  317u,
  318u,
  320u,
  319u,
  322u,
  321u,
  323u,
  323u,
  324u,
  324u,
  324u,
  324u,
  324u,
  324u,
  324u,
  324u,
  324u,
  324u,
  325u,
  325u,
  326u,
  328u,
  327u,
  330u,
  329u,
  332u,
  331u,
  334u,
  333u,
  336u,
  335u,
  338u,
  337u,
  340u,
  339u,
  342u,
  341u,
  343u,
  345u,
  344u,
  346u,
  346u,
  347u,
  347u,
  347u,
  347u,
  347u,
  347u,
  347u,
  347u,
  348u,
  349u,
  350u,
  351u,
  352u,
  353u,
  354u,
  355u,
  357u,
  356u,
  358u,
  359u,
  359u,
  359u,
  359u,
  359u,
  359u,
  359u,
  359u,
  359u,
  359u,
  359u,
  359u,
  359u,
  359u,
  359u,
  359u,
  359u,
  359u,
  359u,
  359u,
  359u,
  359u,
  359u,
  359u,
  359u,
  359u,
  359u,
  359u,
  359u,
  360u,
  360u,
  360u,
  360u,
  360u,
  360u,
  360u,
  360u,
  360u,
  360u,
  360u,
  360u,
  360u,
  360u,
  360u,
  360u,
  360u,
  360u,
  360u,
  361u,
  361u,
  361u,
  361u,
  361u,
  361u,
  361u,
  362u,
  362u,
  362u,
  362u,
  362u,
  362u,
  362u,
  362u,
  362u,
  362u,
  362u,
  362u,
  362u,
  362u,
  363u,
  363u,
  363u,
  364u,
  364u,
  364u,
  364u,
  364u,
  364u,
  366u,
  365u,
  367u,
  367u,
  368u,
  368u,
  369u,
  370u,
  370u,
  370u,
  370u,
  370u,
  370u,
  371u,
  372u,
  373u,
  374u,
  375u,
  375u,
  376u,
  376u,
  377u,
  377u,
  377u,
  377u,
  377u,
  377u,
  377u,
  379u,
  380u,
  378u,
  381u,
  381u,
  381u,
  381u,
  381u,
  381u,
  381u,
  381u,
  381u,
  381u,
  382u,
  382u,
  383u,
  385u,
  384u,
  387u,
  386u,
  388u,
  389u,
  389u,
  389u,
  389u,
  389u,
  390u,
  390u,
  391u,
  391u,
  393u,
  392u,
  395u,
  394u,
  396u,
  397u,
  397u,
  397u,
  398u,
  398u,
  398u,
  399u,
  399u,
  399u,
  400u,
  400u,
  401u,
  401u,
  401u,
  401u,
  403u,
  404u,
  402u,
  405u,
  405u,
  406u,
  406u,
  406u,
  407u,
  407u,
  407u,
  408u,
  408u,
  408u,
  409u,
  409u,
  410u,
  410u,
  410u,
  412u,
  413u,
  411u,
  414u,
  414u,
  416u,
  415u,
  417u,
  417u,
  418u,
  418u,
  418u,
  418u,
  418u,
  418u,
  418u,
  418u,
  419u,
  420u,
  421u,
  422u,
  423u,
  423u,
  423u,
  423u,
  424u,
  425u,
  426u,
  427u,
  427u,
  427u,
  427u,
  427u,
  428u,
  428u,
  430u,
  429u,
  431u,
  431u,
  432u,
  432u,
  433u,
  433u,
  433u,
  434u,
  434u,
  435u,
  436u,
  436u,
  436u,
  436u,
  436u,
  436u,
  436u,
  436u,
  436u,
  436u,
  436u,
  436u,
  436u,
  436u,
  436u,
  436u,
  436u,
  436u,
  436u,
  437u,
  437u,
  437u,
  438u,
  438u,
  438u,
  438u,
  438u,
  438u,
  439u,
  440u,
  441u,
  442u,
  443u,
  444u,
  445u,
  446u,
  447u,
  448u,
  449u,
  450u,
  450u,
  451u,
  451u,
  452u,
  452u,
  453u,
  453u,
  454u,
  454u,
  455u,
  455u,
  456u,
  456u,
  457u,
  457u,
  457u,
  458u,
  458u,
  458u,
  458u,
  459u,
  459u,
  460u,
  460u,
  460u,
  460u,
  460u,
  460u,
  460u,
  460u,
  460u,
  460u,
  460u,
  460u,
  460u,
  460u,
  460u,
  460u,
  460u,
  460u,
  460u,
  460u,
  460u,
  460u,
  460u,
  460u,
  460u,
  460u,
  460u,
  461u,
  461u,
  461u,
  461u,
  461u,
  461u,
  461u,
  462u,
  462u,
  463u,
  463u,
  463u,
  463u,
  464u,
  464u,
  464u,
  464u,
  464u,
  464u,
  464u,
  465u,
  466u,
  467u,
  466u,
  468u,
  468u,
  468u,
  468u,
  468u,
  468u,
  468u,
  468u,
  470u,
  469u,
  471u,
  471u,
  472u,
  472u,
  473u,
  473u,
  473u,
  474u,
  475u,
  475u,
  475u,
  475u,
  475u,
  475u,
  475u,
  475u,
  475u,
  475u,
  475u,
  475u,
  475u,
  475u,
  475u,
  475u,
  475u,
  475u,
  476u,
  477u,
  478u,
  479u,
  479u,
  480u,
  481u,
  482u,
  483u,
  483u,
  484u,
  484u,
  485u,
  485u,
  486u,
  486u,
  487u,
  487u,
  488u,
  488u,
  489u,
  489u,
  490u,
  491u,
  491u,
  492u,
  492u,
  493u,
  493u,
  493u,
  493u,
  493u,
  493u,
  493u,
  493u,
  494u,
  494u,
  494u,
  494u,
  494u,
  494u,
  494u,
  494u,
  494u,
  494u,
  494u,
  494u,
  495u,
  495u,
  495u,
  496u,
  496u,
  496u,
  496u,
  496u,
  497u,
  497u,
  498u,
  498u,
  498u,
  498u,
  498u,
  498u,
  498u,
  500u,
  499u,
  501u,
  501u,
  502u,
  502u,
  503u,
  503u,
  503u,
  503u,
  503u,
  503u,
  503u,
  503u,
  505u,
  506u,
  504u,
  507u,
  507u,
  507u,
  507u,
  508u,
  508u,
  510u,
  509u
}; // idb
char yyr2[581] =
{
  '\0',
  '\x02',
  '\x02',
  '\x01',
  '\0',
  '\0',
  '\b',
  '\x02',
  '\0',
  '\x01',
  '\x02',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\0',
  '\x01',
  '\x01',
  '\x02',
  '\0',
  '\x01',
  '\0',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x03',
  '\0',
  '\x14',
  '\x10',
  '\0',
  '\x14',
  '\0',
  '\x10',
  '\0',
  '\f',
  '\0',
  '\x04',
  '\0',
  '\x04',
  '\x04',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x1F',
  '\x17',
  '\x11',
  '\x0F',
  '\a',
  '\x05',
  '\a',
  '\x05',
  '\x03',
  '\x01',
  '\0',
  '\x05',
  '\0',
  '\x05',
  '\x02',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x04',
  '\0',
  '\x06',
  '\0',
  '\x06',
  '\0',
  '\x06',
  '\0',
  '\x06',
  '\0',
  '\x06',
  '\0',
  '\x05',
  '\0',
  '\x05',
  '\0',
  '\x06',
  '\x05',
  '\0',
  '\x05',
  '\x02',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\0',
  '\x06',
  '\x02',
  '\0',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x02',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x02',
  '\x01',
  '\x02',
  '\x02',
  '\x02',
  '\a',
  '\x04',
  '\x06',
  '\x03',
  '\0',
  '\x05',
  '\x02',
  '\x01',
  '\x01',
  '\x01',
  '\x02',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x02',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x02',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\0',
  '\0',
  '\b',
  '\x05',
  '\x05',
  '\x05',
  '\x05',
  '\x05',
  '\x05',
  '\x05',
  '\x05',
  '\x04',
  '\x04',
  '\x04',
  '\x04',
  '\x05',
  '\0',
  '\x06',
  '\0',
  '\x05',
  '\t',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x02',
  '\0',
  '\x01',
  '\0',
  '\x01',
  '\0',
  '\x05',
  '\0',
  '\x05',
  '\x03',
  '\x02',
  '\x02',
  '\x02',
  '\x03',
  '\x02',
  '\x01',
  '\x03',
  '\x03',
  '\x03',
  '\x01',
  '\x02',
  '\x01',
  '\x03',
  '\x03',
  '\x03',
  '\0',
  '\0',
  '\t',
  '\x01',
  '\x01',
  '\x02',
  '\x02',
  '\x02',
  '\x03',
  '\x02',
  '\x01',
  '\x03',
  '\x03',
  '\x03',
  '\x01',
  '\x02',
  '\x01',
  '\x03',
  '\x03',
  '\0',
  '\0',
  '\t',
  '\x01',
  '\x01',
  '\0',
  '\x05',
  '\x02',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x02',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\a',
  '\x05',
  '\x03',
  '\x01',
  '\x03',
  '\x03',
  '\x03',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x02',
  '\x01',
  '\x01',
  '\0',
  '\a',
  '\0',
  '\x01',
  '\x02',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x02',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x02',
  '\x03',
  '\x03',
  '\x03',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x02',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x04',
  '\x04',
  '\x04',
  '\x03',
  '\x03',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\0',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x02',
  '\x02',
  '\x02',
  '\x02',
  '\x02',
  '\x02',
  '\x02',
  '\x02',
  '\0',
  '\x01',
  '\x02',
  '\x02',
  '\x01',
  '\x01',
  '\0',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x02',
  '\x03',
  '\x03',
  '\0',
  '\x04',
  '\0',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x02',
  '\0',
  '\a',
  '\0',
  '\x01',
  '\x02',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x02',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x02',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x02',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x02',
  '\x01',
  '\x01',
  '\x02',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x02',
  '\x02',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\0',
  '\x06',
  '\0',
  '\x01',
  '\x02',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\x01',
  '\0',
  '\0',
  '\b',
  '\x03',
  '\x03',
  '\x03',
  '\x03',
  '\x01',
  '\x02',
  '\0',
  '\x06'
}; // idb
const unsigned __int16 yydefact[1049] =
{
  0u,
  0u,
  0u,
  0u,
  3u,
  7u,
  0u,
  1u,
  2u,
  4u,
  22u,
  20u,
  23u,
  5u,
  21u,
  8u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  9u,
  11u,
  12u,
  14u,
  13u,
  15u,
  16u,
  17u,
  62u,
  64u,
  0u,
  0u,
  0u,
  98u,
  6u,
  10u,
  0u,
  0u,
  118u,
  579u,
  570u,
  0u,
  0u,
  81u,
  83u,
  85u,
  87u,
  89u,
  91u,
  93u,
  95u,
  0u,
  0u,
  67u,
  68u,
  69u,
  70u,
  71u,
  72u,
  73u,
  74u,
  75u,
  76u,
  77u,
  0u,
  0u,
  0u,
  22u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  101u,
  102u,
  103u,
  104u,
  105u,
  106u,
  107u,
  108u,
  109u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  63u,
  66u,
  65u,
  0u,
  0u,
  0u,
  150u,
  151u,
  152u,
  153u,
  154u,
  155u,
  156u,
  157u,
  158u,
  159u,
  160u,
  161u,
  162u,
  163u,
  164u,
  165u,
  166u,
  167u,
  168u,
  0u,
  0u,
  0u,
  191u,
  27u,
  28u,
  0u,
  577u,
  0u,
  571u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  99u,
  100u,
  78u,
  79u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  192u,
  193u,
  194u,
  0u,
  0u,
  119u,
  190u,
  0u,
  578u,
  580u,
  558u,
  110u,
  111u,
  112u,
  113u,
  114u,
  115u,
  116u,
  117u,
  80u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  24u,
  0u,
  0u,
  122u,
  123u,
  124u,
  125u,
  126u,
  127u,
  128u,
  129u,
  130u,
  131u,
  132u,
  133u,
  134u,
  135u,
  136u,
  137u,
  138u,
  139u,
  140u,
  141u,
  142u,
  143u,
  144u,
  145u,
  146u,
  147u,
  148u,
  198u,
  61u,
  573u,
  574u,
  576u,
  575u,
  44u,
  45u,
  46u,
  47u,
  48u,
  49u,
  50u,
  51u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  18u,
  563u,
  562u,
  566u,
  567u,
  568u,
  565u,
  564u,
  0u,
  559u,
  561u,
  569u,
  41u,
  39u,
  0u,
  37u,
  0u,
  35u,
  0u,
  33u,
  0u,
  92u,
  0u,
  94u,
  0u,
  30u,
  26u,
  25u,
  97u,
  196u,
  149u,
  169u,
  170u,
  171u,
  172u,
  173u,
  174u,
  175u,
  0u,
  0u,
  120u,
  199u,
  257u,
  259u,
  301u,
  0u,
  19u,
  0u,
  572u,
  560u,
  0u,
  82u,
  0u,
  84u,
  0u,
  0u,
  86u,
  0u,
  0u,
  88u,
  0u,
  0u,
  90u,
  0u,
  0u,
  0u,
  0u,
  96u,
  0u,
  176u,
  177u,
  178u,
  179u,
  180u,
  181u,
  182u,
  183u,
  184u,
  185u,
  186u,
  187u,
  188u,
  189u,
  0u,
  60u,
  0u,
  0u,
  0u,
  0u,
  261u,
  556u,
  0u,
  0u,
  0u,
  60u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  197u,
  0u,
  0u,
  0u,
  0u,
  202u,
  203u,
  204u,
  209u,
  210u,
  206u,
  208u,
  207u,
  227u,
  0u,
  0u,
  243u,
  245u,
  0u,
  0u,
  0u,
  219u,
  226u,
  220u,
  221u,
  222u,
  223u,
  224u,
  225u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  304u,
  305u,
  306u,
  307u,
  308u,
  311u,
  309u,
  310u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  195u,
  59u,
  211u,
  0u,
  200u,
  201u,
  205u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  258u,
  218u,
  260u,
  312u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  302u,
  303u,
  0u,
  0u,
  0u,
  0u,
  549u,
  551u,
  553u,
  267u,
  281u,
  280u,
  550u,
  287u,
  300u,
  299u,
  552u,
  554u,
  329u,
  330u,
  0u,
  548u,
  555u,
  43u,
  42u,
  40u,
  0u,
  59u,
  0u,
  0u,
  0u,
  0u,
  0u,
  57u,
  0u,
  0u,
  0u,
  216u,
  215u,
  217u,
  213u,
  214u,
  212u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  321u,
  313u,
  314u,
  315u,
  320u,
  316u,
  322u,
  0u,
  324u,
  325u,
  327u,
  326u,
  323u,
  262u,
  277u,
  263u,
  264u,
  282u,
  296u,
  283u,
  284u,
  18u,
  18u,
  266u,
  286u,
  557u,
  547u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  58u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  238u,
  239u,
  0u,
  0u,
  0u,
  0u,
  240u,
  241u,
  0u,
  328u,
  0u,
  0u,
  0u,
  0u,
  265u,
  285u,
  0u,
  0u,
  58u,
  0u,
  0u,
  0u,
  56u,
  0u,
  0u,
  29u,
  228u,
  230u,
  231u,
  232u,
  233u,
  234u,
  235u,
  236u,
  237u,
  242u,
  0u,
  246u,
  0u,
  319u,
  0u,
  0u,
  331u,
  464u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  244u,
  0u,
  248u,
  249u,
  250u,
  251u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  252u,
  255u,
  318u,
  278u,
  297u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  336u,
  339u,
  340u,
  341u,
  337u,
  343u,
  344u,
  345u,
  346u,
  347u,
  348u,
  349u,
  350u,
  351u,
  352u,
  353u,
  354u,
  355u,
  356u,
  357u,
  358u,
  359u,
  360u,
  338u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  472u,
  0u,
  0u,
  469u,
  470u,
  471u,
  474u,
  475u,
  476u,
  477u,
  478u,
  479u,
  480u,
  481u,
  482u,
  483u,
  484u,
  485u,
  486u,
  487u,
  488u,
  489u,
  490u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  229u,
  256u,
  253u,
  0u,
  0u,
  0u,
  361u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  332u,
  335u,
  342u,
  491u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  465u,
  468u,
  473u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  254u,
  247u,
  317u,
  0u,
  0u,
  0u,
  0u,
  273u,
  0u,
  271u,
  0u,
  0u,
  0u,
  293u,
  0u,
  291u,
  365u,
  366u,
  367u,
  368u,
  369u,
  370u,
  0u,
  364u,
  362u,
  363u,
  0u,
  405u,
  406u,
  407u,
  408u,
  409u,
  410u,
  411u,
  412u,
  413u,
  414u,
  415u,
  416u,
  417u,
  418u,
  419u,
  420u,
  421u,
  422u,
  423u,
  424u,
  425u,
  426u,
  427u,
  428u,
  429u,
  430u,
  372u,
  439u,
  439u,
  439u,
  439u,
  439u,
  439u,
  439u,
  373u,
  374u,
  375u,
  376u,
  377u,
  378u,
  379u,
  380u,
  381u,
  382u,
  383u,
  384u,
  385u,
  386u,
  387u,
  388u,
  389u,
  390u,
  391u,
  392u,
  393u,
  0u,
  446u,
  447u,
  448u,
  449u,
  450u,
  0u,
  398u,
  399u,
  400u,
  401u,
  402u,
  397u,
  403u,
  0u,
  454u,
  452u,
  0u,
  519u,
  520u,
  521u,
  522u,
  523u,
  524u,
  525u,
  492u,
  493u,
  494u,
  495u,
  496u,
  0u,
  527u,
  528u,
  529u,
  530u,
  531u,
  532u,
  534u,
  535u,
  533u,
  536u,
  537u,
  497u,
  498u,
  499u,
  500u,
  501u,
  502u,
  503u,
  504u,
  505u,
  506u,
  507u,
  508u,
  509u,
  510u,
  511u,
  0u,
  539u,
  540u,
  513u,
  512u,
  0u,
  542u,
  543u,
  544u,
  545u,
  514u,
  515u,
  516u,
  517u,
  518u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  279u,
  272u,
  0u,
  0u,
  0u,
  298u,
  292u,
  371u,
  431u,
  443u,
  444u,
  432u,
  440u,
  433u,
  434u,
  435u,
  436u,
  437u,
  438u,
  451u,
  394u,
  395u,
  404u,
  396u,
  0u,
  457u,
  458u,
  459u,
  460u,
  461u,
  462u,
  0u,
  0u,
  526u,
  538u,
  541u,
  546u,
  38u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  268u,
  269u,
  270u,
  274u,
  275u,
  276u,
  288u,
  289u,
  290u,
  294u,
  295u,
  441u,
  442u,
  463u,
  453u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  55u,
  455u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  54u,
  36u,
  0u,
  54u,
  0u,
  32u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  34u,
  0u,
  31u,
  0u,
  0u,
  53u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  0u,
  52u
}; // idb
const __int16 yypact[1049] =
{
  30,
  65290,
  32,
  36,
  64963,
  64963,
  49,
  64963,
  64963,
  64963,
  62,
  64963,
  80,
  64963,
  64963,
  65519,
  97,
  113,
  123,
  126,
  162,
  159,
  218,
  65519,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  221,
  298,
  319,
  64963,
  64963,
  64963,
  536,
  536,
  64963,
  64963,
  64963,
  152,
  314,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  332,
  408,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  564,
  338,
  88,
  62,
  421,
  448,
  549,
  573,
  577,
  626,
  627,
  628,
  65535,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  170,
  629,
  630,
  631,
  632,
  633,
  634,
  636,
  637,
  170,
  64963,
  64963,
  64963,
  365,
  639,
  644,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  648,
  650,
  563,
  64963,
  64963,
  64963,
  660,
  88,
  669,
  64963,
  652,
  653,
  654,
  655,
  656,
  657,
  658,
  659,
  64963,
  64963,
  64963,
  64963,
  661,
  170,
  170,
  170,
  170,
  170,
  170,
  170,
  170,
  662,
  64963,
  64963,
  64963,
  663,
  466,
  64963,
  64963,
  212,
  64963,
  64963,
  65504,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  665,
  667,
  668,
  670,
  671,
  672,
  673,
  674,
  61,
  466,
  397,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  486,
  676,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  675,
  692,
  693,
  695,
  696,
  688,
  679,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  698,
  65504,
  64963,
  64963,
  697,
  699,
  690,
  700,
  701,
  702,
  703,
  704,
  705,
  64963,
  706,
  64963,
  707,
  708,
  64963,
  64963,
  64963,
  486,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  312,
  685,
  64963,
  64963,
  64963,
  64963,
  64963,
  88,
  64963,
  709,
  64963,
  64963,
  198,
  64963,
  710,
  64963,
  711,
  712,
  64963,
  713,
  716,
  64963,
  714,
  717,
  64963,
  715,
  718,
  719,
  720,
  64963,
  312,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  687,
  723,
  44,
  18,
  18,
  301,
  64963,
  64963,
  721,
  689,
  722,
  64963,
  724,
  727,
  725,
  730,
  726,
  734,
  735,
  736,
  731,
  729,
  64963,
  732,
  428,
  741,
  37,
  64963,
  64963,
  694,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  51,
  88,
  64963,
  64963,
  733,
  737,
  1,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  6,
  439,
  742,
  744,
  745,
  746,
  748,
  749,
  750,
  33,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  65463,
  755,
  756,
  757,
  753,
  747,
  758,
  752,
  760,
  754,
  759,
  761,
  762,
  64963,
  763,
  64963,
  154,
  64963,
  64963,
  64963,
  589,
  119,
  193,
  233,
  317,
  441,
  764,
  88,
  88,
  765,
  766,
  64963,
  64963,
  64963,
  64963,
  767,
  743,
  768,
  769,
  770,
  774,
  12,
  64963,
  64963,
  42,
  58,
  775,
  776,
  64963,
  64963,
  64963,
  777,
  64963,
  64963,
  64963,
  778,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64,
  64963,
  64963,
  64963,
  64963,
  64963,
  781,
  64963,
  782,
  771,
  783,
  785,
  791,
  792,
  786,
  787,
  788,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  797,
  790,
  793,
  794,
  795,
  796,
  798,
  799,
  800,
  801,
  802,
  803,
  804,
  805,
  806,
  189,
  64963,
  64963,
  64963,
  64963,
  772,
  64963,
  64963,
  442,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  679,
  679,
  807,
  808,
  64963,
  64963,
  784,
  815,
  811,
  819,
  813,
  814,
  816,
  822,
  824,
  779,
  770,
  817,
  818,
  820,
  821,
  823,
  825,
  826,
  827,
  64963,
  64963,
  828,
  829,
  830,
  831,
  64963,
  64963,
  832,
  64963,
  591,
  592,
  809,
  810,
  64963,
  64963,
  773,
  835,
  64963,
  836,
  839,
  844,
  64963,
  838,
  840,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  841,
  64963,
  91,
  834,
  847,
  850,
  64963,
  64963,
  843,
  812,
  851,
  845,
  846,
  40,
  854,
  18,
  64963,
  447,
  64963,
  64963,
  64963,
  64963,
  848,
  849,
  770,
  770,
  322,
  2,
  855,
  864,
  852,
  860,
  861,
  870,
  856,
  857,
  13,
  64963,
  560,
  867,
  64963,
  64963,
  484,
  868,
  869,
  871,
  872,
  873,
  874,
  875,
  876,
  877,
  878,
  879,
  880,
  881,
  882,
  883,
  884,
  885,
  886,
  887,
  888,
  897,
  342,
  64963,
  64963,
  64963,
  751,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  485,
  890,
  891,
  892,
  893,
  894,
  895,
  896,
  898,
  899,
  900,
  901,
  902,
  903,
  904,
  905,
  906,
  907,
  64963,
  916,
  68,
  64963,
  64963,
  853,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  859,
  889,
  837,
  908,
  909,
  910,
  915,
  911,
  64963,
  64963,
  599,
  912,
  217,
  341,
  64963,
  65534,
  165,
  369,
  369,
  369,
  165,
  369,
  369,
  369,
  369,
  913,
  93,
  130,
  140,
  157,
  180,
  187,
  144,
  237,
  168,
  64963,
  64963,
  64963,
  64963,
  16,
  16,
  16,
  190,
  0,
  0,
  0,
  48,
  77,
  78,
  135,
  137,
  138,
  19,
  21,
  3,
  204,
  64963,
  64963,
  64963,
  917,
  914,
  920,
  918,
  922,
  923,
  921,
  919,
  64963,
  64963,
  64963,
  925,
  926,
  928,
  929,
  64963,
  938,
  217,
  931,
  932,
  933,
  64963,
  942,
  341,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  927,
  64963,
  64963,
  64963,
  497,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  227,
  227,
  227,
  227,
  227,
  227,
  227,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  502,
  64963,
  64963,
  64963,
  64963,
  64963,
  65517,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  666,
  9,
  64963,
  64963,
  664,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  677,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  678,
  64963,
  64963,
  64963,
  64963,
  680,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  939,
  930,
  934,
  935,
  936,
  937,
  940,
  945,
  56,
  944,
  946,
  943,
  64963,
  64963,
  74,
  947,
  948,
  64963,
  64963,
  64963,
  64963,
  738,
  728,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  686,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  950,
  20,
  64963,
  64963,
  64963,
  64963,
  64963,
  960,
  961,
  962,
  963,
  964,
  965,
  941,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  64963,
  673,
  959,
  966,
  967,
  968,
  969,
  970,
  971,
  64963,
  953,
  972,
  978,
  979,
  974,
  980,
  975,
  973,
  976,
  977,
  981,
  986,
  982,
  985,
  64963,
  987,
  64963,
  990,
  64963,
  991,
  988,
  989,
  992,
  993,
  994,
  999,
  997,
  1000,
  995,
  1003,
  996,
  1006,
  1004,
  64963,
  1005,
  64963,
  1001,
  1002,
  1007,
  1007,
  1008,
  1010,
  1009,
  1011,
  1012,
  1013,
  1014,
  64963
}; // idb
const __int16 yytable[1081] =
{
  257,
  878,
  245,
  658,
  952,
  142,
  352,
  417,
  65070,
  464,
  956,
  352,
  419,
  494,
  228,
  16,
  17,
  865,
  352,
  707,
  905,
  956,
  910,
  352,
  676,
  368,
  559,
  916,
  434,
  18,
  464,
  1,
  435,
  65080,
  369,
  436,
  7,
  1,
  341,
  428,
  418,
  5,
  65080,
  403,
  229,
  341,
  500,
  501,
  602,
  418,
  230,
  430,
  231,
  431,
  9,
  603,
  6,
  370,
  2,
  464,
  977,
  342,
  504,
  505,
  2,
  260,
  502,
  503,
  342,
  658,
  512,
  893,
  100,
  19,
  65069,
  128,
  129,
  432,
  983,
  245,
  978,
  979,
  506,
  507,
  100,
  229,
  261,
  11,
  464,
  464,
  434,
  230,
  586,
  231,
  435,
  609,
  610,
  436,
  984,
  985,
  895,
  897,
  31,
  232,
  464,
  14,
  676,
  218,
  587,
  588,
  589,
  590,
  128,
  129,
  19,
  836,
  233,
  234,
  32,
  353,
  354,
  355,
  356,
  357,
  353,
  354,
  355,
  356,
  357,
  19,
  20,
  353,
  354,
  355,
  356,
  357,
  353,
  354,
  355,
  356,
  357,
  464,
  472,
  128,
  129,
  848,
  464,
  33,
  464,
  464,
  34,
  464,
  838,
  612,
  495,
  496,
  497,
  498,
  899,
  953,
  901,
  903,
  840,
  433,
  36,
  464,
  792,
  65091,
  464,
  371,
  372,
  373,
  374,
  375,
  376,
  465,
  466,
  467,
  468,
  842,
  469,
  229,
  407,
  408,
  409,
  410,
  35,
  230,
  430,
  231,
  431,
  464,
  957,
  958,
  959,
  960,
  961,
  962,
  464,
  144,
  145,
  464,
  844,
  957,
  958,
  959,
  960,
  961,
  962,
  846,
  19,
  876,
  539,
  540,
  432,
  464,
  474,
  128,
  129,
  612,
  325,
  326,
  450,
  323,
  37,
  918,
  41,
  782,
  783,
  784,
  785,
  786,
  787,
  788,
  215,
  216,
  128,
  129,
  217,
  659,
  660,
  661,
  662,
  663,
  664,
  665,
  666,
  667,
  668,
  669,
  670,
  671,
  672,
  673,
  674,
  675,
  476,
  128,
  129,
  21,
  879,
  880,
  881,
  882,
  883,
  884,
  885,
  886,
  887,
  888,
  866,
  867,
  868,
  869,
  870,
  871,
  71,
  72,
  73,
  74,
  75,
  76,
  77,
  78,
  450,
  889,
  418,
  358,
  605,
  906,
  907,
  917,
  358,
  911,
  912,
  913,
  914,
  411,
  412,
  358,
  433,
  872,
  369,
  42,
  358,
  659,
  660,
  661,
  662,
  663,
  664,
  665,
  666,
  667,
  668,
  669,
  670,
  671,
  672,
  673,
  674,
  675,
  65091,
  611,
  43,
  370,
  828,
  829,
  65203,
  831,
  832,
  833,
  834,
  849,
  850,
  851,
  852,
  853,
  89,
  102,
  478,
  128,
  129,
  611,
  769,
  770,
  771,
  772,
  65202,
  862,
  863,
  473,
  475,
  477,
  479,
  481,
  98,
  483,
  484,
  793,
  794,
  795,
  796,
  797,
  798,
  799,
  800,
  801,
  802,
  803,
  804,
  805,
  806,
  807,
  808,
  809,
  810,
  811,
  812,
  813,
  814,
  815,
  816,
  817,
  818,
  103,
  104,
  105,
  106,
  107,
  108,
  109,
  110,
  111,
  112,
  113,
  114,
  115,
  116,
  117,
  118,
  119,
  120,
  121,
  122,
  123,
  124,
  155,
  855,
  856,
  857,
  858,
  859,
  860,
  99,
  303,
  304,
  305,
  306,
  307,
  308,
  309,
  310,
  311,
  312,
  313,
  314,
  315,
  316,
  71,
  72,
  73,
  74,
  75,
  76,
  77,
  78,
  371,
  372,
  373,
  374,
  375,
  376,
  45,
  134,
  46,
  47,
  48,
  49,
  50,
  51,
  52,
  53,
  54,
  941,
  942,
  176,
  177,
  178,
  179,
  180,
  181,
  182,
  183,
  480,
  128,
  129,
  186,
  776,
  777,
  778,
  135,
  65415,
  612,
  613,
  614,
  615,
  616,
  617,
  618,
  619,
  620,
  621,
  622,
  623,
  624,
  625,
  626,
  627,
  628,
  629,
  630,
  631,
  612,
  613,
  614,
  615,
  616,
  617,
  618,
  619,
  620,
  621,
  622,
  623,
  624,
  625,
  626,
  627,
  628,
  629,
  630,
  631,
  65415,
  65415,
  65415,
  65415,
  65415,
  65415,
  65415,
  65415,
  65415,
  65415,
  65415,
  65415,
  65415,
  65415,
  65415,
  65415,
  65415,
  65415,
  65415,
  65415,
  65415,
  65415,
  187,
  188,
  189,
  190,
  191,
  192,
  193,
  194,
  195,
  196,
  197,
  198,
  199,
  200,
  201,
  202,
  203,
  204,
  205,
  206,
  207,
  208,
  209,
  210,
  211,
  212,
  213,
  65415,
  65415,
  65415,
  65415,
  65415,
  65415,
  65415,
  161,
  101,
  45,
  136,
  46,
  47,
  48,
  49,
  50,
  51,
  52,
  53,
  54,
  265,
  266,
  267,
  268,
  269,
  270,
  271,
  820,
  821,
  822,
  823,
  824,
  825,
  826,
  137,
  545,
  546,
  45,
  138,
  46,
  47,
  48,
  49,
  50,
  51,
  52,
  53,
  54,
  103,
  104,
  105,
  106,
  107,
  108,
  109,
  110,
  111,
  112,
  113,
  114,
  115,
  116,
  117,
  118,
  119,
  120,
  121,
  122,
  123,
  124,
  789,
  945,
  946,
  947,
  948,
  949,
  950,
  874,
  875,
  891,
  892,
  837,
  839,
  841,
  843,
  845,
  847,
  139,
  140,
  141,
  156,
  147,
  148,
  149,
  150,
  151,
  152,
  877,
  153,
  154,
  157,
  894,
  896,
  898,
  900,
  902,
  904,
  908,
  158,
  159,
  919,
  160,
  163,
  165,
  167,
  168,
  169,
  170,
  171,
  172,
  173,
  174,
  264,
  184,
  185,
  175,
  246,
  247,
  248,
  273,
  250,
  252,
  254,
  256,
  258,
  275,
  276,
  274,
  277,
  278,
  279,
  280,
  282,
  288,
  284,
  318,
  286,
  289,
  339,
  292,
  388,
  295,
  324,
  401,
  291,
  300,
  294,
  329,
  297,
  298,
  299,
  331,
  333,
  405,
  420,
  337,
  471,
  542,
  573,
  574,
  327,
  328,
  606,
  330,
  332,
  334,
  340,
  708,
  335,
  336,
  391,
  387,
  389,
  393,
  390,
  392,
  394,
  395,
  396,
  397,
  399,
  398,
  400,
  402,
  421,
  415,
  422,
  423,
  424,
  416,
  425,
  426,
  427,
  451,
  452,
  453,
  454,
  455,
  488,
  713,
  737,
  456,
  457,
  458,
  459,
  462,
  463,
  766,
  577,
  460,
  736,
  461,
  940,
  541,
  516,
  482,
  485,
  951,
  486,
  558,
  549,
  487,
  491,
  489,
  490,
  493,
  508,
  509,
  518,
  510,
  511,
  514,
  515,
  517,
  519,
  520,
  521,
  522,
  1000,
  524,
  523,
  525,
  575,
  576,
  526,
  527,
  528,
  529,
  598,
  530,
  531,
  532,
  533,
  534,
  535,
  536,
  537,
  538,
  550,
  547,
  548,
  551,
  552,
  553,
  554,
  556,
  555,
  557,
  560,
  561,
  954,
  562,
  563,
  760,
  564,
  592,
  565,
  566,
  567,
  568,
  569,
  570,
  580,
  571,
  572,
  578,
  579,
  581,
  582,
  593,
  583,
  215,
  594,
  597,
  599,
  600,
  601,
  604,
  699,
  700,
  607,
  608,
  701,
  702,
  703,
  704,
  705,
  706,
  710,
  758,
  714,
  715,
  757,
  716,
  717,
  718,
  719,
  720,
  721,
  722,
  723,
  724,
  725,
  726,
  727,
  728,
  729,
  730,
  731,
  732,
  733,
  734,
  738,
  739,
  740,
  741,
  742,
  743,
  744,
  759,
  745,
  746,
  747,
  748,
  749,
  750,
  751,
  752,
  753,
  754,
  755,
  764,
  585,
  920,
  765,
  922,
  926,
  921,
  761,
  762,
  763,
  923,
  835,
  133,
  768,
  924,
  925,
  928,
  929,
  927,
  930,
  931,
  932,
  934,
  935,
  936,
  937,
  969,
  939,
  965,
  970,
  338,
  8,
  989,
  971,
  972,
  973,
  974,
  976,
  1008,
  975,
  999,
  966,
  967,
  988,
  968,
  980,
  982,
  981,
  986,
  987,
  990,
  991,
  993,
  994,
  995,
  996,
  997,
  998,
  1001,
  1012,
  1015,
  404,
  933,
  1007,
  1009,
  1002,
  1003,
  1004,
  1005,
  1006,
  1010,
  1011,
  1013,
  1019,
  1014,
  1016,
  1017,
  1021,
  938,
  1022,
  1018,
  1020,
  1023,
  1024,
  1030,
  1032,
  1029,
  1025,
  1026,
  1031,
  1034,
  1027,
  1028,
  1036,
  1033,
  1035,
  1037,
  1038,
  38,
  1041,
  1039,
  1040,
  1043,
  1045,
  263,
  1047,
  735,
  1042,
  1044,
  830,
  143,
  1046,
  992,
  1048,
  756,
  513,
  255,
  0,
  249,
  253,
  302,
  0,
  251,
  0,
  0,
  0,
  0,
  162,
  0,
  0,
  0,
  0,
  67,
  0,
  0,
  429,
  0,
  0,
  0,
  0,
  0,
  0,
  0,
  0,
  0,
  0,
  0,
  0,
  0,
  0,
  0,
  0,
  0,
  283,
  0,
  0,
  0,
  164
}; // idb
const __int16 yycheck[1081] =
{
  182,
  1,
  166,
  1,
  23,
  6,
  5,
  6,
  6,
  11,
  1,
  5,
  6,
  1,
  46,
  32,
  33,
  1,
  5,
  6,
  1,
  1,
  1,
  5,
  596,
  321,
  524,
  24,
  386,
  46,
  11,
  1,
  386,
  24,
  1,
  386,
  0,
  1,
  1,
  6,
  359,
  287,
  22,
  6,
  117,
  1,
  4,
  5,
  8,
  368,
  123,
  124,
  125,
  126,
  5,
  15,
  24,
  24,
  28,
  11,
  4,
  24,
  4,
  5,
  28,
  4,
  24,
  25,
  24,
  1,
  6,
  23,
  55,
  146,
  6,
  24,
  25,
  150,
  4,
  243,
  24,
  25,
  24,
  25,
  67,
  117,
  25,
  25,
  11,
  11,
  448,
  123,
  1,
  125,
  448,
  593,
  594,
  448,
  24,
  25,
  23,
  23,
  5,
  135,
  11,
  25,
  678,
  163,
  17,
  18,
  19,
  20,
  24,
  25,
  146,
  22,
  148,
  149,
  5,
  118,
  119,
  120,
  121,
  122,
  118,
  119,
  120,
  121,
  122,
  146,
  147,
  118,
  119,
  120,
  121,
  122,
  118,
  119,
  120,
  121,
  122,
  11,
  23,
  24,
  25,
  1,
  11,
  24,
  11,
  11,
  24,
  11,
  22,
  151,
  142,
  143,
  144,
  145,
  23,
  178,
  23,
  23,
  22,
  236,
  5,
  11,
  1,
  23,
  11,
  136,
  137,
  138,
  139,
  140,
  141,
  21,
  22,
  23,
  24,
  22,
  26,
  117,
  131,
  132,
  133,
  134,
  24,
  123,
  124,
  125,
  126,
  11,
  183,
  184,
  185,
  186,
  187,
  188,
  11,
  29,
  30,
  11,
  22,
  183,
  184,
  185,
  186,
  187,
  188,
  22,
  146,
  21,
  23,
  24,
  150,
  11,
  23,
  24,
  25,
  151,
  22,
  23,
  386,
  279,
  6,
  21,
  5,
  229,
  230,
  231,
  232,
  233,
  234,
  235,
  22,
  23,
  24,
  25,
  26,
  237,
  238,
  239,
  240,
  241,
  242,
  243,
  244,
  245,
  246,
  247,
  248,
  249,
  250,
  251,
  252,
  253,
  23,
  24,
  25,
  276,
  260,
  261,
  262,
  263,
  264,
  265,
  266,
  267,
  268,
  269,
  254,
  255,
  256,
  257,
  258,
  259,
  277,
  278,
  279,
  280,
  281,
  282,
  283,
  284,
  448,
  285,
  605,
  286,
  584,
  270,
  271,
  288,
  286,
  272,
  273,
  274,
  275,
  353,
  354,
  286,
  236,
  285,
  1,
  5,
  286,
  237,
  238,
  239,
  240,
  241,
  242,
  243,
  244,
  245,
  246,
  247,
  248,
  249,
  250,
  251,
  252,
  253,
  178,
  1,
  5,
  24,
  717,
  718,
  6,
  720,
  721,
  722,
  723,
  189,
  190,
  191,
  192,
  193,
  24,
  1,
  23,
  24,
  25,
  1,
  127,
  128,
  129,
  130,
  6,
  181,
  182,
  407,
  408,
  409,
  410,
  411,
  24,
  413,
  414,
  194,
  195,
  196,
  197,
  198,
  199,
  200,
  201,
  202,
  203,
  204,
  205,
  206,
  207,
  208,
  209,
  210,
  211,
  212,
  213,
  214,
  215,
  216,
  217,
  218,
  219,
  47,
  48,
  49,
  50,
  51,
  52,
  53,
  54,
  55,
  56,
  57,
  58,
  59,
  60,
  61,
  62,
  63,
  64,
  65,
  66,
  67,
  68,
  98,
  171,
  172,
  173,
  174,
  175,
  176,
  6,
  103,
  104,
  105,
  106,
  107,
  108,
  109,
  110,
  111,
  112,
  113,
  114,
  115,
  116,
  277,
  278,
  279,
  280,
  281,
  282,
  283,
  284,
  136,
  137,
  138,
  139,
  140,
  141,
  35,
  23,
  37,
  38,
  39,
  40,
  41,
  42,
  43,
  44,
  45,
  227,
  228,
  147,
  148,
  149,
  150,
  151,
  152,
  153,
  154,
  23,
  24,
  25,
  1,
  127,
  128,
  129,
  23,
  6,
  151,
  152,
  153,
  154,
  155,
  156,
  157,
  158,
  159,
  160,
  161,
  162,
  163,
  164,
  165,
  166,
  167,
  168,
  169,
  170,
  151,
  152,
  153,
  154,
  155,
  156,
  157,
  158,
  159,
  160,
  161,
  162,
  163,
  164,
  165,
  166,
  167,
  168,
  169,
  170,
  47,
  48,
  49,
  50,
  51,
  52,
  53,
  54,
  55,
  56,
  57,
  58,
  59,
  60,
  61,
  62,
  63,
  64,
  65,
  66,
  67,
  68,
  69,
  70,
  71,
  72,
  73,
  74,
  75,
  76,
  77,
  78,
  79,
  80,
  81,
  82,
  83,
  84,
  85,
  86,
  87,
  88,
  89,
  90,
  91,
  92,
  93,
  94,
  95,
  96,
  97,
  98,
  99,
  100,
  101,
  102,
  6,
  6,
  35,
  23,
  37,
  38,
  39,
  40,
  41,
  42,
  43,
  44,
  45,
  96,
  97,
  98,
  99,
  100,
  101,
  102,
  220,
  221,
  222,
  223,
  224,
  225,
  226,
  23,
  508,
  509,
  35,
  23,
  37,
  38,
  39,
  40,
  41,
  42,
  43,
  44,
  45,
  47,
  48,
  49,
  50,
  51,
  52,
  53,
  54,
  55,
  56,
  57,
  58,
  59,
  60,
  61,
  62,
  63,
  64,
  65,
  66,
  67,
  68,
  714,
  821,
  822,
  823,
  824,
  825,
  826,
  739,
  740,
  743,
  744,
  725,
  726,
  727,
  728,
  729,
  730,
  23,
  23,
  23,
  287,
  24,
  24,
  24,
  24,
  24,
  24,
  741,
  24,
  24,
  23,
  745,
  746,
  747,
  748,
  749,
  750,
  751,
  26,
  23,
  754,
  23,
  14,
  6,
  24,
  24,
  24,
  24,
  24,
  24,
  24,
  24,
  287,
  23,
  23,
  26,
  23,
  22,
  22,
  15,
  22,
  22,
  22,
  22,
  22,
  5,
  5,
  24,
  5,
  5,
  14,
  24,
  6,
  15,
  9,
  22,
  9,
  9,
  23,
  9,
  23,
  9,
  5,
  287,
  15,
  9,
  15,
  7,
  15,
  15,
  15,
  7,
  7,
  31,
  287,
  7,
  139,
  287,
  139,
  139,
  22,
  22,
  287,
  22,
  22,
  22,
  15,
  179,
  22,
  22,
  15,
  22,
  22,
  15,
  22,
  22,
  22,
  15,
  15,
  15,
  23,
  22,
  22,
  14,
  14,
  24,
  14,
  14,
  14,
  24,
  14,
  14,
  14,
  10,
  10,
  10,
  15,
  22,
  27,
  287,
  287,
  15,
  22,
  15,
  22,
  15,
  15,
  180,
  7,
  22,
  31,
  22,
  287,
  13,
  15,
  23,
  23,
  287,
  24,
  12,
  8,
  26,
  24,
  27,
  27,
  23,
  23,
  23,
  15,
  24,
  24,
  22,
  22,
  22,
  15,
  15,
  22,
  22,
  992,
  14,
  24,
  23,
  5,
  5,
  23,
  23,
  23,
  23,
  8,
  23,
  23,
  23,
  23,
  23,
  23,
  23,
  23,
  23,
  15,
  24,
  24,
  22,
  15,
  22,
  22,
  15,
  22,
  15,
  23,
  23,
  176,
  23,
  23,
  8,
  23,
  13,
  23,
  23,
  23,
  23,
  23,
  23,
  15,
  24,
  24,
  22,
  22,
  15,
  22,
  14,
  22,
  22,
  14,
  22,
  15,
  22,
  22,
  15,
  15,
  7,
  24,
  24,
  22,
  15,
  15,
  7,
  22,
  22,
  13,
  22,
  14,
  14,
  31,
  14,
  14,
  14,
  14,
  14,
  14,
  14,
  14,
  14,
  14,
  14,
  14,
  14,
  14,
  14,
  14,
  14,
  14,
  6,
  14,
  14,
  14,
  14,
  14,
  14,
  14,
  22,
  14,
  14,
  14,
  14,
  14,
  14,
  14,
  14,
  14,
  14,
  6,
  8,
  569,
  8,
  15,
  7,
  7,
  15,
  22,
  22,
  22,
  15,
  21,
  70,
  24,
  15,
  15,
  14,
  14,
  22,
  14,
  14,
  6,
  14,
  14,
  14,
  6,
  10,
  23,
  287,
  22,
  302,
  3,
  227,
  22,
  22,
  22,
  22,
  15,
  8,
  22,
  22,
  287,
  287,
  228,
  287,
  24,
  26,
  24,
  24,
  24,
  287,
  24,
  15,
  15,
  15,
  15,
  15,
  15,
  22,
  8,
  10,
  343,
  775,
  15,
  15,
  22,
  22,
  22,
  22,
  22,
  15,
  15,
  15,
  10,
  22,
  22,
  22,
  15,
  781,
  15,
  22,
  22,
  15,
  15,
  8,
  8,
  15,
  22,
  22,
  15,
  10,
  22,
  22,
  10,
  22,
  22,
  15,
  15,
  23,
  15,
  22,
  22,
  15,
  15,
  185,
  15,
  633,
  22,
  22,
  719,
  79,
  22,
  964,
  22,
  678,
  448,
  181,
  65535,
  178,
  180,
  263,
  65535,
  179,
  65535,
  65535,
  65535,
  65535,
  126,
  65535,
  65535,
  65535,
  65535,
  40,
  65535,
  65535,
  377,
  65535,
  65535,
  65535,
  65535,
  65535,
  65535,
  65535,
  65535,
  65535,
  65535,
  65535,
  65535,
  65535,
  65535,
  65535,
  65535,
  65535,
  243,
  65535,
  65535,
  65535,
  131
}; // idb
const unsigned __int16 yystos[1049] =
{
  0u,
  1u,
  28u,
  290u,
  291u,
  287u,
  24u,
  0u,
  291u,
  5u,
  292u,
  25u,
  298u,
  299u,
  25u,
  293u,
  32u,
  33u,
  46u,
  146u,
  147u,
  276u,
  294u,
  295u,
  296u,
  319u,
  321u,
  344u,
  356u,
  504u,
  509u,
  5u,
  5u,
  24u,
  24u,
  24u,
  5u,
  6u,
  296u,
  320u,
  322u,
  5u,
  5u,
  5u,
  345u,
  35u,
  37u,
  38u,
  39u,
  40u,
  41u,
  42u,
  43u,
  44u,
  45u,
  323u,
  324u,
  326u,
  327u,
  329u,
  331u,
  333u,
  335u,
  337u,
  339u,
  341u,
  343u,
  323u,
  357u,
  510u,
  505u,
  277u,
  278u,
  279u,
  280u,
  281u,
  282u,
  283u,
  284u,
  346u,
  347u,
  348u,
  349u,
  350u,
  351u,
  352u,
  353u,
  354u,
  355u,
  24u,
  328u,
  330u,
  332u,
  334u,
  336u,
  338u,
  340u,
  342u,
  24u,
  6u,
  324u,
  6u,
  1u,
  47u,
  48u,
  49u,
  50u,
  51u,
  52u,
  53u,
  54u,
  55u,
  56u,
  57u,
  58u,
  59u,
  60u,
  61u,
  62u,
  63u,
  64u,
  65u,
  66u,
  67u,
  68u,
  360u,
  363u,
  364u,
  24u,
  25u,
  301u,
  507u,
  508u,
  299u,
  23u,
  23u,
  23u,
  23u,
  23u,
  23u,
  23u,
  23u,
  6u,
  347u,
  29u,
  30u,
  325u,
  24u,
  24u,
  24u,
  24u,
  24u,
  24u,
  24u,
  24u,
  325u,
  287u,
  23u,
  26u,
  23u,
  23u,
  6u,
  364u,
  14u,
  508u,
  6u,
  506u,
  24u,
  24u,
  24u,
  24u,
  24u,
  24u,
  24u,
  24u,
  26u,
  325u,
  325u,
  325u,
  325u,
  325u,
  325u,
  325u,
  325u,
  23u,
  23u,
  1u,
  69u,
  70u,
  71u,
  72u,
  73u,
  74u,
  75u,
  76u,
  77u,
  78u,
  79u,
  80u,
  81u,
  82u,
  83u,
  84u,
  85u,
  86u,
  87u,
  88u,
  89u,
  90u,
  91u,
  92u,
  93u,
  94u,
  95u,
  359u,
  22u,
  23u,
  26u,
  301u,
  309u,
  310u,
  311u,
  312u,
  313u,
  315u,
  316u,
  317u,
  318u,
  46u,
  117u,
  123u,
  125u,
  135u,
  148u,
  149u,
  358u,
  365u,
  392u,
  394u,
  396u,
  415u,
  499u,
  501u,
  502u,
  503u,
  509u,
  23u,
  22u,
  22u,
  317u,
  22u,
  316u,
  22u,
  315u,
  22u,
  312u,
  22u,
  310u,
  22u,
  314u,
  4u,
  25u,
  300u,
  359u,
  287u,
  96u,
  97u,
  98u,
  99u,
  100u,
  101u,
  102u,
  361u,
  15u,
  24u,
  5u,
  5u,
  5u,
  5u,
  14u,
  24u,
  297u,
  6u,
  503u,
  9u,
  308u,
  9u,
  307u,
  15u,
  9u,
  306u,
  15u,
  9u,
  305u,
  15u,
  9u,
  304u,
  15u,
  15u,
  15u,
  9u,
  303u,
  361u,
  103u,
  104u,
  105u,
  106u,
  107u,
  108u,
  109u,
  110u,
  111u,
  112u,
  113u,
  114u,
  115u,
  116u,
  362u,
  22u,
  366u,
  393u,
  395u,
  416u,
  301u,
  5u,
  22u,
  23u,
  22u,
  22u,
  7u,
  22u,
  7u,
  22u,
  7u,
  22u,
  22u,
  22u,
  7u,
  362u,
  23u,
  15u,
  1u,
  24u,
  367u,
  368u,
  369u,
  370u,
  371u,
  372u,
  373u,
  374u,
  375u,
  5u,
  118u,
  119u,
  120u,
  121u,
  122u,
  286u,
  376u,
  377u,
  378u,
  381u,
  382u,
  383u,
  384u,
  386u,
  388u,
  376u,
  1u,
  24u,
  136u,
  137u,
  138u,
  139u,
  140u,
  141u,
  417u,
  418u,
  419u,
  420u,
  421u,
  422u,
  424u,
  425u,
  426u,
  500u,
  22u,
  23u,
  22u,
  22u,
  15u,
  22u,
  15u,
  22u,
  15u,
  15u,
  15u,
  22u,
  23u,
  22u,
  287u,
  14u,
  6u,
  368u,
  31u,
  379u,
  131u,
  132u,
  133u,
  134u,
  301u,
  301u,
  385u,
  387u,
  24u,
  24u,
  6u,
  377u,
  6u,
  287u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  6u,
  418u,
  124u,
  126u,
  150u,
  236u,
  365u,
  392u,
  394u,
  397u,
  398u,
  402u,
  405u,
  406u,
  407u,
  411u,
  414u,
  428u,
  429u,
  469u,
  497u,
  498u,
  509u,
  10u,
  10u,
  10u,
  15u,
  22u,
  15u,
  22u,
  15u,
  22u,
  22u,
  22u,
  15u,
  15u,
  11u,
  21u,
  22u,
  23u,
  24u,
  26u,
  302u,
  139u,
  23u,
  301u,
  23u,
  301u,
  23u,
  301u,
  23u,
  301u,
  23u,
  301u,
  23u,
  301u,
  301u,
  23u,
  24u,
  26u,
  27u,
  27u,
  27u,
  24u,
  423u,
  23u,
  1u,
  142u,
  143u,
  144u,
  145u,
  427u,
  4u,
  5u,
  24u,
  25u,
  4u,
  5u,
  24u,
  25u,
  23u,
  23u,
  24u,
  24u,
  6u,
  498u,
  22u,
  22u,
  15u,
  22u,
  15u,
  15u,
  15u,
  22u,
  22u,
  24u,
  14u,
  23u,
  23u,
  23u,
  23u,
  23u,
  23u,
  23u,
  23u,
  23u,
  23u,
  23u,
  23u,
  23u,
  23u,
  23u,
  24u,
  13u,
  287u,
  403u,
  412u,
  297u,
  297u,
  24u,
  24u,
  8u,
  15u,
  22u,
  15u,
  22u,
  22u,
  22u,
  15u,
  15u,
  12u,
  423u,
  23u,
  23u,
  23u,
  23u,
  23u,
  23u,
  23u,
  23u,
  23u,
  23u,
  23u,
  24u,
  24u,
  139u,
  139u,
  5u,
  5u,
  7u,
  22u,
  22u,
  15u,
  15u,
  22u,
  22u,
  380u,
  309u,
  1u,
  17u,
  18u,
  19u,
  20u,
  389u,
  13u,
  14u,
  14u,
  430u,
  470u,
  22u,
  8u,
  15u,
  22u,
  22u,
  8u,
  15u,
  15u,
  376u,
  287u,
  24u,
  24u,
  423u,
  423u,
  1u,
  151u,
  152u,
  153u,
  154u,
  155u,
  156u,
  157u,
  158u,
  159u,
  160u,
  161u,
  162u,
  163u,
  164u,
  165u,
  166u,
  167u,
  168u,
  169u,
  170u,
  431u,
  432u,
  433u,
  434u,
  435u,
  436u,
  437u,
  440u,
  441u,
  442u,
  443u,
  444u,
  445u,
  446u,
  447u,
  448u,
  449u,
  450u,
  451u,
  452u,
  453u,
  454u,
  455u,
  456u,
  457u,
  465u,
  1u,
  237u,
  238u,
  239u,
  240u,
  241u,
  242u,
  243u,
  244u,
  245u,
  246u,
  247u,
  248u,
  249u,
  250u,
  251u,
  252u,
  253u,
  437u,
  471u,
  472u,
  473u,
  474u,
  475u,
  476u,
  477u,
  478u,
  479u,
  480u,
  481u,
  482u,
  483u,
  484u,
  485u,
  486u,
  487u,
  488u,
  489u,
  490u,
  491u,
  492u,
  15u,
  7u,
  22u,
  15u,
  15u,
  7u,
  22u,
  22u,
  6u,
  179u,
  391u,
  13u,
  404u,
  413u,
  287u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  6u,
  433u,
  31u,
  287u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  14u,
  6u,
  473u,
  31u,
  22u,
  22u,
  8u,
  22u,
  22u,
  22u,
  8u,
  15u,
  180u,
  390u,
  24u,
  127u,
  128u,
  129u,
  130u,
  399u,
  400u,
  401u,
  127u,
  128u,
  129u,
  408u,
  409u,
  410u,
  229u,
  230u,
  231u,
  232u,
  233u,
  234u,
  235u,
  302u,
  438u,
  439u,
  1u,
  194u,
  195u,
  196u,
  197u,
  198u,
  199u,
  200u,
  201u,
  202u,
  203u,
  204u,
  205u,
  206u,
  207u,
  208u,
  209u,
  210u,
  211u,
  212u,
  213u,
  214u,
  215u,
  216u,
  217u,
  218u,
  219u,
  460u,
  220u,
  221u,
  222u,
  223u,
  224u,
  225u,
  226u,
  461u,
  461u,
  461u,
  460u,
  461u,
  461u,
  461u,
  461u,
  21u,
  22u,
  302u,
  22u,
  302u,
  22u,
  302u,
  22u,
  302u,
  22u,
  302u,
  22u,
  302u,
  1u,
  189u,
  190u,
  191u,
  192u,
  193u,
  464u,
  171u,
  172u,
  173u,
  174u,
  175u,
  176u,
  458u,
  181u,
  182u,
  466u,
  1u,
  254u,
  255u,
  256u,
  257u,
  258u,
  259u,
  285u,
  493u,
  493u,
  493u,
  21u,
  302u,
  1u,
  260u,
  261u,
  262u,
  263u,
  264u,
  265u,
  266u,
  267u,
  268u,
  269u,
  285u,
  494u,
  494u,
  494u,
  23u,
  302u,
  23u,
  302u,
  23u,
  302u,
  23u,
  302u,
  23u,
  302u,
  23u,
  302u,
  1u,
  270u,
  271u,
  302u,
  495u,
  1u,
  272u,
  273u,
  274u,
  275u,
  496u,
  24u,
  288u,
  21u,
  302u,
  8u,
  15u,
  7u,
  15u,
  15u,
  15u,
  7u,
  22u,
  14u,
  14u,
  14u,
  14u,
  6u,
  400u,
  14u,
  14u,
  14u,
  6u,
  409u,
  23u,
  287u,
  227u,
  228u,
  462u,
  463u,
  462u,
  462u,
  462u,
  462u,
  462u,
  462u,
  287u,
  23u,
  178u,
  176u,
  459u,
  1u,
  183u,
  184u,
  185u,
  186u,
  187u,
  188u,
  468u,
  467u,
  287u,
  287u,
  287u,
  287u,
  10u,
  22u,
  22u,
  22u,
  22u,
  22u,
  22u,
  15u,
  4u,
  24u,
  25u,
  24u,
  24u,
  26u,
  4u,
  24u,
  25u,
  24u,
  24u,
  228u,
  227u,
  287u,
  24u,
  468u,
  15u,
  15u,
  15u,
  15u,
  15u,
  15u,
  22u,
  310u,
  22u,
  22u,
  22u,
  22u,
  22u,
  22u,
  15u,
  8u,
  15u,
  15u,
  15u,
  8u,
  15u,
  22u,
  10u,
  22u,
  22u,
  22u,
  10u,
  22u,
  15u,
  15u,
  15u,
  15u,
  22u,
  22u,
  22u,
  22u,
  15u,
  8u,
  15u,
  8u,
  22u,
  10u,
  22u,
  10u,
  15u,
  15u,
  22u,
  22u,
  15u,
  22u,
  15u,
  22u,
  15u,
  22u,
  15u,
  22u
}; // idb
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *>::`vftable')(void *p, char) = &NiTPointerList<NSFParsedShader *>::`scalar deleting destructor'; // weak
const __int16 yy_accept[1932] =
{
  0,
  0,
  0,
  309,
  308,
  1,
  303,
  304,
  308,
  10,
  11,
  20,
  22,
  18,
  23,
  21,
  2,
  2,
  14,
  17,
  15,
  12,
  13,
  19,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  8,
  16,
  9,
  1,
  0,
  307,
  2,
  7,
  6,
  0,
  3,
  0,
  2,
  305,
  305,
  306,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  3,
  306,
  3,
  306,
  306,
  0,
  4,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  306,
  305,
  305,
  305,
  3,
  0,
  0,
  3,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  139,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  112,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  301,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  5,
  305,
  305,
  305,
  3,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  302,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  140,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  110,
  115,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  111,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  172,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  127,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  107,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  286,
  305,
  305,
  305,
  305,
  305,
  305,
  231,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  219,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  194,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  224,
  229,
  225,
  305,
  305,
  305,
  228,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  294,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  264,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  214,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  138,
  305,
  305,
  305,
  275,
  277,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  24,
  230,
  305,
  227,
  305,
  305,
  26,
  305,
  305,
  36,
  305,
  305,
  305,
  305,
  305,
  33,
  305,
  305,
  305,
  305,
  85,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  84,
  305,
  305,
  305,
  305,
  305,
  93,
  305,
  305,
  106,
  108,
  305,
  305,
  100,
  305,
  305,
  305,
  305,
  169,
  305,
  285,
  292,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  255,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  173,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  284,
  291,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  113,
  305,
  305,
  305,
  305,
  305,
  272,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  287,
  305,
  305,
  305,
  226,
  25,
  305,
  305,
  305,
  305,
  38,
  305,
  305,
  32,
  305,
  305,
  305,
  305,
  305,
  305,
  52,
  53,
  54,
  55,
  305,
  305,
  305,
  305,
  305,
  305,
  73,
  74,
  75,
  76,
  58,
  59,
  60,
  61,
  62,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  99,
  305,
  109,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  289,
  305,
  305,
  215,
  216,
  305,
  305,
  220,
  221,
  305,
  305,
  305,
  249,
  305,
  266,
  305,
  305,
  305,
  305,
  305,
  270,
  269,
  305,
  305,
  305,
  305,
  256,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  116,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  118,
  305,
  280,
  281,
  305,
  305,
  274,
  276,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  35,
  305,
  48,
  305,
  305,
  305,
  49,
  305,
  305,
  305,
  77,
  305,
  305,
  305,
  305,
  305,
  305,
  64,
  66,
  68,
  70,
  78,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  102,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  218,
  305,
  251,
  305,
  265,
  305,
  305,
  305,
  268,
  305,
  305,
  305,
  305,
  257,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  188,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  146,
  305,
  305,
  142,
  305,
  305,
  305,
  305,
  141,
  305,
  305,
  305,
  305,
  305,
  305,
  164,
  165,
  166,
  167,
  305,
  305,
  305,
  305,
  170,
  171,
  305,
  293,
  305,
  125,
  119,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  273,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  298,
  305,
  305,
  50,
  305,
  305,
  305,
  305,
  28,
  37,
  305,
  56,
  305,
  86,
  305,
  305,
  305,
  305,
  72,
  305,
  80,
  82,
  305,
  305,
  305,
  305,
  103,
  305,
  305,
  96,
  305,
  101,
  305,
  271,
  290,
  288,
  305,
  305,
  305,
  305,
  252,
  305,
  250,
  305,
  182,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  191,
  305,
  305,
  305,
  197,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  151,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  163,
  305,
  305,
  174,
  305,
  305,
  305,
  120,
  121,
  122,
  117,
  305,
  305,
  305,
  305,
  305,
  305,
  135,
  305,
  305,
  305,
  305,
  305,
  305,
  300,
  299,
  305,
  305,
  305,
  305,
  51,
  34,
  47,
  39,
  40,
  41,
  42,
  43,
  44,
  45,
  46,
  87,
  88,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  94,
  305,
  305,
  305,
  105,
  305,
  305,
  305,
  305,
  223,
  217,
  305,
  305,
  305,
  187,
  267,
  305,
  305,
  305,
  305,
  305,
  261,
  195,
  198,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  147,
  148,
  149,
  305,
  305,
  305,
  143,
  144,
  145,
  150,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  123,
  126,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  137,
  297,
  305,
  305,
  305,
  305,
  63,
  65,
  67,
  69,
  79,
  305,
  57,
  92,
  89,
  305,
  305,
  305,
  305,
  104,
  279,
  305,
  305,
  305,
  305,
  305,
  305,
  262,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  210,
  305,
  192,
  193,
  305,
  305,
  305,
  305,
  305,
  189,
  190,
  232,
  233,
  234,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  168,
  175,
  305,
  278,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  29,
  71,
  81,
  83,
  305,
  90,
  91,
  305,
  97,
  282,
  283,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  196,
  305,
  305,
  305,
  305,
  305,
  212,
  305,
  305,
  305,
  213,
  205,
  245,
  305,
  305,
  305,
  247,
  305,
  305,
  236,
  305,
  305,
  237,
  238,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  136,
  124,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  131,
  305,
  27,
  31,
  30,
  305,
  98,
  305,
  305,
  253,
  305,
  305,
  305,
  258,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  246,
  244,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  152,
  153,
  154,
  155,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  176,
  305,
  305,
  305,
  295,
  305,
  305,
  305,
  129,
  305,
  305,
  114,
  305,
  222,
  254,
  305,
  305,
  305,
  305,
  305,
  260,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  235,
  305,
  305,
  305,
  240,
  305,
  242,
  305,
  156,
  158,
  159,
  305,
  305,
  305,
  181,
  305,
  305,
  178,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  263,
  259,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  243,
  305,
  305,
  157,
  161,
  305,
  179,
  180,
  305,
  305,
  305,
  305,
  128,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  248,
  241,
  239,
  305,
  177,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  202,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  296,
  305,
  132,
  305,
  305,
  305,
  183,
  305,
  305,
  204,
  199,
  305,
  200,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  185,
  201,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  130,
  305,
  305,
  95,
  184,
  305,
  203,
  211,
  305,
  305,
  305,
  305,
  305,
  305,
  134,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  133,
  305,
  305,
  305,
  305,
  305,
  160,
  305,
  305,
  206,
  207,
  305,
  305,
  162,
  305,
  305,
  305,
  305,
  305,
  305,
  305,
  208,
  209,
  305,
  186,
  0
}; // idb
const int yy_ec[256] =
{
  0,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  2,
  3,
  1,
  1,
  4,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  2,
  1,
  5,
  1,
  1,
  1,
  1,
  1,
  6,
  7,
  8,
  9,
  10,
  11,
  12,
  13,
  14,
  15,
  16,
  17,
  18,
  19,
  20,
  21,
  22,
  22,
  1,
  1,
  23,
  24,
  25,
  1,
  1,
  29,
  30,
  31,
  32,
  33,
  34,
  35,
  36,
  37,
  38,
  39,
  40,
  41,
  42,
  43,
  44,
  45,
  46,
  47,
  48,
  49,
  50,
  51,
  52,
  53,
  54,
  26,
  1,
  27,
  1,
  28,
  1,
  29,
  30,
  31,
  32,
  33,
  34,
  35,
  36,
  37,
  38,
  39,
  40,
  41,
  42,
  43,
  44,
  45,
  46,
  47,
  48,
  49,
  50,
  51,
  52,
  53,
  54,
  55,
  56,
  57,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1
}; // idb
const int yy_meta[58] =
{
  0,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  2,
  3,
  1,
  3,
  4,
  5,
  6,
  6,
  6,
  6,
  6,
  6,
  6,
  6,
  6,
  1,
  1,
  1,
  1,
  1,
  7,
  7,
  7,
  7,
  7,
  8,
  7,
  7,
  7,
  7,
  7,
  7,
  7,
  7,
  7,
  7,
  7,
  7,
  7,
  7,
  7,
  7,
  7,
  7,
  7,
  7,
  7,
  1,
  1,
  1
}; // idb
const __int16 yy_base[1940] =
{
  0,
  0,
  0,
  196,
  6641,
  190,
  6641,
  6641,
  152,
  6641,
  6641,
  6641,
  0,
  6641,
  0,
  50,
  52,
  93,
  6641,
  6641,
  6641,
  6641,
  6641,
  47,
  49,
  79,
  77,
  63,
  86,
  65,
  89,
  111,
  113,
  119,
  70,
  124,
  126,
  129,
  166,
  72,
  203,
  6641,
  6641,
  6641,
  148,
  138,
  6641,
  123,
  6641,
  6641,
  117,
  237,
  114,
  0,
  67,
  259,
  0,
  121,
  132,
  134,
  139,
  74,
  161,
  148,
  150,
  171,
  173,
  175,
  188,
  178,
  181,
  192,
  190,
  222,
  235,
  255,
  232,
  226,
  272,
  252,
  283,
  289,
  293,
  228,
  296,
  299,
  302,
  307,
  316,
  322,
  332,
  330,
  230,
  128,
  324,
  88,
  224,
  366,
  0,
  391,
  80,
  0,
  335,
  343,
  350,
  337,
  354,
  385,
  363,
  378,
  382,
  391,
  341,
  406,
  410,
  413,
  418,
  420,
  422,
  424,
  426,
  428,
  432,
  438,
  440,
  444,
  446,
  457,
  464,
  466,
  470,
  473,
  477,
  481,
  483,
  485,
  488,
  491,
  499,
  493,
  495,
  504,
  506,
  521,
  525,
  527,
  529,
  531,
  538,
  544,
  546,
  548,
  551,
  584,
  555,
  561,
  575,
  63,
  197,
  312,
  438,
  565,
  572,
  569,
  577,
  598,
  601,
  604,
  607,
  610,
  613,
  615,
  617,
  619,
  622,
  625,
  629,
  641,
  643,
  647,
  654,
  651,
  656,
  558,
  659,
  661,
  698,
  690,
  665,
  717,
  667,
  679,
  682,
  692,
  695,
  687,
  685,
  704,
  714,
  701,
  740,
  744,
  707,
  750,
  731,
  755,
  757,
  763,
  766,
  768,
  773,
  777,
  775,
  789,
  813,
  780,
  797,
  800,
  803,
  810,
  818,
  823,
  816,
  828,
  834,
  849,
  851,
  0,
  825,
  857,
  859,
  0,
  861,
  863,
  867,
  869,
  872,
  875,
  877,
  879,
  884,
  890,
  882,
  894,
  898,
  900,
  902,
  910,
  916,
  918,
  922,
  924,
  926,
  928,
  935,
  930,
  939,
  941,
  948,
  950,
  953,
  961,
  966,
  963,
  968,
  973,
  979,
  976,
  985,
  982,
  994,
  1000,
  1012,
  1014,
  1019,
  1022,
  1026,
  1030,
  1028,
  1037,
  1039,
  1041,
  1043,
  1045,
  1052,
  1061,
  1055,
  1065,
  1071,
  1077,
  1081,
  1083,
  1086,
  1090,
  1092,
  1094,
  1096,
  1098,
  1100,
  1102,
  1107,
  1112,
  1116,
  1122,
  1125,
  1118,
  1129,
  1131,
  1136,
  1146,
  1149,
  1179,
  1151,
  1154,
  1161,
  1163,
  1157,
  1166,
  1168,
  1172,
  1174,
  1197,
  1176,
  1214,
  1216,
  1218,
  1220,
  1222,
  1226,
  1228,
  1231,
  1240,
  1233,
  1252,
  1254,
  1242,
  1235,
  1259,
  1266,
  1268,
  1270,
  1276,
  1278,
  1280,
  1282,
  1285,
  1288,
  1290,
  1300,
  1292,
  1295,
  1302,
  1306,
  1309,
  1314,
  1317,
  1323,
  1328,
  1330,
  1339,
  1336,
  1341,
  1343,
  1345,
  1349,
  1352,
  1354,
  1356,
  1358,
  1361,
  1363,
  1366,
  1381,
  1383,
  1387,
  1390,
  1392,
  1394,
  1396,
  1398,
  1400,
  1403,
  1405,
  1409,
  1413,
  1419,
  1425,
  1427,
  1429,
  1432,
  1435,
  1438,
  1440,
  1442,
  1447,
  1452,
  1454,
  1457,
  1463,
  1467,
  1469,
  1475,
  1473,
  1477,
  1482,
  1488,
  1484,
  1490,
  1494,
  1496,
  1499,
  1505,
  1514,
  1517,
  1520,
  1522,
  1524,
  1533,
  1526,
  1530,
  1536,
  1541,
  1546,
  1550,
  1556,
  1561,
  1563,
  1571,
  1573,
  1576,
  1578,
  1568,
  1582,
  1589,
  1600,
  1606,
  1608,
  1611,
  1613,
  1615,
  1617,
  1621,
  1624,
  1626,
  1635,
  1629,
  1633,
  1637,
  1669,
  1639,
  1645,
  1647,
  1658,
  1660,
  1662,
  1672,
  1665,
  1678,
  1680,
  1691,
  1695,
  1701,
  1707,
  1709,
  1712,
  1714,
  1717,
  1722,
  1752,
  1725,
  1727,
  1733,
  1735,
  1737,
  1739,
  1741,
  1743,
  1758,
  1778,
  1782,
  1785,
  1790,
  1792,
  1794,
  1756,
  1800,
  1802,
  1811,
  1813,
  1821,
  1818,
  1825,
  1827,
  1762,
  1829,
  1833,
  1837,
  1839,
  1843,
  1846,
  1850,
  1855,
  1857,
  1860,
  1863,
  1867,
  1874,
  1878,
  1880,
  1883,
  1891,
  1894,
  1897,
  1903,
  1905,
  1912,
  1907,
  1914,
  1916,
  1920,
  1918,
  1923,
  1927,
  1931,
  1934,
  1936,
  1944,
  1950,
  1954,
  1959,
  1961,
  1970,
  1972,
  1963,
  1974,
  1976,
  1980,
  1978,
  1983,
  1987,
  1990,
  1993,
  1999,
  2002,
  2004,
  2006,
  2014,
  2017,
  2024,
  2026,
  2028,
  2030,
  2032,
  2038,
  2036,
  2040,
  2044,
  2049,
  2052,
  2055,
  2046,
  2058,
  2060,
  2071,
  2073,
  2082,
  2084,
  2086,
  2089,
  2091,
  2093,
  2099,
  2106,
  2101,
  2111,
  2113,
  2115,
  2117,
  2122,
  2119,
  2124,
  2137,
  2140,
  2142,
  2146,
  2152,
  2154,
  2157,
  2159,
  2161,
  2164,
  2168,
  2178,
  2172,
  2180,
  2182,
  2186,
  2197,
  2199,
  2201,
  2207,
  2209,
  2211,
  2215,
  2218,
  2221,
  2223,
  2226,
  2230,
  2233,
  2228,
  2239,
  2242,
  2249,
  2251,
  2259,
  2261,
  2265,
  2269,
  2271,
  2273,
  2275,
  2278,
  2280,
  2282,
  2286,
  2293,
  2300,
  2306,
  2308,
  2313,
  2315,
  2319,
  2323,
  2328,
  2333,
  2337,
  2339,
  2341,
  2343,
  2348,
  2345,
  2350,
  2352,
  2356,
  2360,
  2354,
  2365,
  2368,
  2371,
  2378,
  2381,
  2383,
  2389,
  2391,
  2395,
  2397,
  2400,
  2404,
  2406,
  2408,
  2411,
  2414,
  2417,
  2421,
  2426,
  2433,
  2429,
  2435,
  2439,
  2444,
  2447,
  2451,
  2455,
  2457,
  2464,
  2470,
  2461,
  2473,
  2477,
  2486,
  2488,
  2490,
  2496,
  2499,
  2501,
  2503,
  2508,
  2510,
  2512,
  2514,
  2520,
  2522,
  2531,
  2536,
  2538,
  2547,
  2549,
  2551,
  2553,
  2555,
  2559,
  2565,
  2567,
  2572,
  2574,
  2579,
  2582,
  2584,
  2586,
  2588,
  2590,
  2596,
  2598,
  2600,
  2602,
  2607,
  2610,
  2612,
  2623,
  2626,
  2631,
  2635,
  2628,
  2639,
  2641,
  2643,
  2647,
  2650,
  2652,
  2654,
  2661,
  2664,
  2666,
  2668,
  2677,
  2672,
  2683,
  2685,
  2687,
  2689,
  2694,
  2699,
  2696,
  2707,
  2709,
  2711,
  2713,
  2715,
  2717,
  2728,
  2719,
  2734,
  2730,
  2737,
  2739,
  2741,
  2744,
  2748,
  2759,
  2763,
  2771,
  2773,
  2775,
  2777,
  2780,
  2783,
  2786,
  2788,
  2793,
  2796,
  2798,
  2800,
  2803,
  2813,
  2821,
  2823,
  2827,
  2832,
  2834,
  2836,
  2838,
  2841,
  2847,
  2844,
  2849,
  2851,
  2853,
  2857,
  2859,
  2866,
  2870,
  2873,
  2879,
  2881,
  2884,
  2890,
  2893,
  2895,
  2897,
  2899,
  2901,
  2908,
  2914,
  2912,
  2917,
  2919,
  2921,
  2927,
  2929,
  2932,
  2934,
  2940,
  2946,
  2949,
  2951,
  2953,
  2958,
  2960,
  2962,
  2969,
  2964,
  2972,
  2974,
  2976,
  2978,
  2980,
  2982,
  2989,
  2991,
  2993,
  3010,
  2996,
  3005,
  3002,
  3023,
  3027,
  3029,
  3039,
  3048,
  3036,
  3050,
  3052,
  3055,
  3059,
  3061,
  3063,
  3065,
  3068,
  3070,
  3072,
  3074,
  3078,
  3080,
  3084,
  3087,
  3091,
  3096,
  3098,
  3100,
  3109,
  3111,
  3113,
  3115,
  3118,
  3120,
  3122,
  3125,
  3128,
  3131,
  3134,
  3139,
  3142,
  3150,
  3147,
  3152,
  3160,
  3162,
  3165,
  3173,
  3169,
  3175,
  3178,
  3182,
  3184,
  3187,
  3193,
  3198,
  3205,
  3209,
  3211,
  3213,
  3216,
  3218,
  3222,
  3224,
  3226,
  3232,
  3234,
  3238,
  3240,
  3243,
  3247,
  3249,
  3252,
  3261,
  3263,
  3268,
  3272,
  3275,
  3279,
  3282,
  3286,
  3288,
  3290,
  3292,
  3294,
  3296,
  3300,
  3306,
  3304,
  3312,
  3315,
  3326,
  3330,
  3333,
  3336,
  3338,
  3340,
  3344,
  3350,
  3356,
  3347,
  3354,
  3358,
  3360,
  3362,
  3368,
  3370,
  3382,
  3384,
  3387,
  3392,
  3394,
  3398,
  3400,
  3402,
  3406,
  3408,
  3410,
  3412,
  3414,
  3416,
  3420,
  3424,
  3429,
  3426,
  3434,
  3438,
  3443,
  3447,
  3451,
  3454,
  3457,
  3460,
  3462,
  3464,
  3466,
  3469,
  3471,
  3476,
  3480,
  3490,
  3486,
  3495,
  3497,
  3500,
  3502,
  3508,
  3511,
  3513,
  3521,
  3524,
  3530,
  3535,
  3539,
  3541,
  3544,
  3548,
  3546,
  3550,
  3552,
  3557,
  3561,
  3563,
  3559,
  3567,
  3569,
  3571,
  3583,
  3585,
  3587,
  3591,
  3594,
  3596,
  3598,
  3600,
  3602,
  3604,
  3606,
  3613,
  3616,
  3618,
  3620,
  3622,
  3636,
  3640,
  3642,
  3646,
  3649,
  3651,
  3653,
  3657,
  3659,
  3662,
  3664,
  3667,
  3669,
  3673,
  3675,
  3678,
  3680,
  3684,
  3689,
  3692,
  3696,
  3701,
  3703,
  3708,
  3710,
  3712,
  3714,
  3716,
  3718,
  3720,
  3722,
  3727,
  3729,
  3731,
  3733,
  3736,
  3738,
  3742,
  3745,
  3748,
  3755,
  3757,
  3759,
  3761,
  3763,
  3765,
  3768,
  3770,
  3776,
  3773,
  3783,
  3785,
  3788,
  3798,
  3800,
  3806,
  3808,
  3812,
  3814,
  3817,
  3819,
  3821,
  3828,
  3834,
  3839,
  3841,
  3843,
  3845,
  3847,
  3850,
  3854,
  3857,
  3860,
  3862,
  3871,
  3874,
  3876,
  3878,
  3880,
  3884,
  3882,
  3890,
  3894,
  3899,
  3901,
  3906,
  3915,
  3922,
  3924,
  3926,
  3931,
  3936,
  3938,
  3940,
  3944,
  3946,
  3951,
  3953,
  3955,
  3963,
  3957,
  3965,
  3967,
  3970,
  3972,
  3977,
  3979,
  3983,
  3985,
  3989,
  3996,
  3998,
  4001,
  4006,
  4008,
  4011,
  4013,
  4015,
  4018,
  4022,
  4026,
  4028,
  4031,
  4034,
  4037,
  4041,
  4043,
  4052,
  4054,
  4057,
  4060,
  4066,
  4070,
  4072,
  4074,
  4078,
  4080,
  4083,
  4085,
  4087,
  4089,
  4094,
  4096,
  4102,
  4104,
  4109,
  4111,
  4117,
  4119,
  4121,
  4123,
  4125,
  4129,
  4135,
  4137,
  4139,
  4141,
  4143,
  4145,
  4147,
  4149,
  4152,
  4156,
  4160,
  4162,
  4167,
  4177,
  4181,
  4184,
  4186,
  4189,
  4193,
  4195,
  4197,
  4199,
  4203,
  4205,
  4207,
  4209,
  4215,
  4220,
  4222,
  4224,
  4226,
  4240,
  4229,
  4233,
  4242,
  4247,
  4251,
  4254,
  4260,
  4262,
  4264,
  4266,
  4268,
  4270,
  4273,
  4275,
  4278,
  4280,
  4286,
  4288,
  4291,
  4298,
  4300,
  4302,
  4311,
  4313,
  4304,
  4315,
  4317,
  4322,
  4327,
  4330,
  4335,
  4338,
  4341,
  4344,
  4346,
  4351,
  4353,
  4357,
  4359,
  4363,
  4365,
  4370,
  4367,
  4374,
  4380,
  4376,
  4382,
  4384,
  4386,
  4395,
  4399,
  4405,
  4407,
  4412,
  4409,
  4414,
  4416,
  4418,
  4420,
  4422,
  4424,
  4427,
  4430,
  4435,
  4432,
  4444,
  4446,
  4448,
  4452,
  4456,
  4458,
  4460,
  4463,
  4465,
  4471,
  4473,
  4475,
  4479,
  4483,
  4485,
  4487,
  4489,
  4501,
  4503,
  4505,
  4507,
  4511,
  4516,
  4519,
  4521,
  4523,
  4541,
  4528,
  4551,
  4535,
  4537,
  4553,
  4559,
  4561,
  4563,
  4565,
  4567,
  4569,
  4571,
  4573,
  4575,
  4577,
  4581,
  4584,
  4587,
  4590,
  4592,
  4597,
  4599,
  4602,
  4604,
  4611,
  4613,
  4617,
  4619,
  4621,
  4624,
  4627,
  4629,
  4632,
  4634,
  4636,
  4640,
  4643,
  4645,
  4650,
  4652,
  4656,
  4662,
  4664,
  4666,
  4671,
  4675,
  4677,
  4681,
  4687,
  4691,
  4695,
  4706,
  4708,
  4693,
  4718,
  4721,
  4726,
  4728,
  4731,
  4733,
  4735,
  4737,
  4739,
  4741,
  4743,
  4745,
  4748,
  4754,
  4759,
  4761,
  4766,
  4768,
  4786,
  4777,
  4779,
  4791,
  4793,
  4795,
  4803,
  4805,
  4807,
  4809,
  4811,
  4813,
  4817,
  4819,
  4825,
  4827,
  4831,
  4833,
  4841,
  4835,
  4838,
  4851,
  4853,
  4856,
  4858,
  4860,
  4862,
  4866,
  4864,
  4868,
  4871,
  4875,
  4873,
  4878,
  4880,
  4882,
  4884,
  4886,
  4892,
  4895,
  4902,
  4904,
  4906,
  4910,
  4914,
  4918,
  4922,
  4924,
  4926,
  4929,
  4931,
  4933,
  4935,
  4937,
  4939,
  4941,
  4943,
  4950,
  4952,
  4957,
  4954,
  4959,
  4962,
  4965,
  4967,
  4972,
  4969,
  4974,
  4977,
  4979,
  4981,
  4983,
  4989,
  4997,
  5001,
  5003,
  5005,
  5010,
  5012,
  5014,
  5016,
  5020,
  5023,
  5025,
  5028,
  5036,
  5038,
  5040,
  5042,
  5045,
  5049,
  5051,
  5053,
  5057,
  5060,
  5063,
  5065,
  5069,
  5067,
  5071,
  5078,
  5083,
  5090,
  5085,
  5099,
  5101,
  5104,
  5106,
  5108,
  5112,
  5119,
  5123,
  5130,
  5134,
  5137,
  5141,
  5145,
  5147,
  5149,
  5151,
  5153,
  5155,
  5157,
  5159,
  5162,
  5165,
  5171,
  5173,
  5175,
  5177,
  5179,
  5182,
  5184,
  5194,
  5199,
  5201,
  5203,
  5206,
  5211,
  5213,
  5216,
  5220,
  5222,
  5224,
  5228,
  5226,
  5230,
  5240,
  5234,
  5232,
  5242,
  5244,
  5248,
  5251,
  5259,
  5262,
  5264,
  5269,
  5273,
  5275,
  5277,
  5280,
  5282,
  5287,
  5289,
  5291,
  5293,
  5296,
  5298,
  5300,
  5302,
  5304,
  5306,
  5312,
  5314,
  5318,
  5320,
  5326,
  5328,
  5335,
  5337,
  5340,
  5342,
  5346,
  5348,
  5350,
  5355,
  5352,
  5358,
  5360,
  5362,
  5369,
  5366,
  5375,
  5377,
  5385,
  5387,
  5389,
  5391,
  5399,
  5401,
  5405,
  5407,
  5409,
  5411,
  5413,
  5415,
  5417,
  5419,
  5421,
  5424,
  5427,
  5430,
  5434,
  5444,
  5462,
  5440,
  5451,
  5436,
  5469,
  5473,
  5475,
  5477,
  5479,
  5482,
  5484,
  5486,
  5488,
  5490,
  5492,
  5495,
  5502,
  5505,
  5508,
  5511,
  5514,
  5516,
  5521,
  5518,
  5525,
  5527,
  5529,
  5533,
  5542,
  5544,
  5547,
  5549,
  5551,
  5555,
  5558,
  5560,
  5562,
  5565,
  5571,
  5573,
  5576,
  5578,
  5580,
  5582,
  5584,
  5586,
  5588,
  5590,
  5594,
  5601,
  5604,
  5613,
  5616,
  5619,
  5622,
  5627,
  5629,
  5631,
  5633,
  5635,
  5637,
  5639,
  5641,
  5647,
  5654,
  5651,
  5656,
  5658,
  5660,
  5662,
  5664,
  5669,
  5672,
  5676,
  5684,
  5691,
  5680,
  5688,
  5695,
  5697,
  5699,
  5705,
  5708,
  5712,
  5714,
  5716,
  5718,
  5720,
  5723,
  5725,
  5730,
  5734,
  5738,
  5741,
  5745,
  5748,
  5751,
  5753,
  5756,
  5758,
  5762,
  5765,
  5767,
  5769,
  5771,
  5774,
  5778,
  5781,
  5783,
  5791,
  5793,
  5795,
  5800,
  5803,
  5806,
  5811,
  5798,
  5813,
  5818,
  5821,
  5824,
  5831,
  5835,
  5837,
  5839,
  5841,
  5843,
  5845,
  5847,
  5850,
  5856,
  5858,
  5853,
  5860,
  5866,
  5868,
  5875,
  5881,
  5883,
  5885,
  5887,
  5889,
  5892,
  5894,
  5897,
  5899,
  5901,
  5905,
  5910,
  5912,
  5917,
  5919,
  5924,
  5926,
  5928,
  5934,
  5932,
  5939,
  5942,
  5944,
  5946,
  5952,
  5954,
  5956,
  5958,
  5960,
  5962,
  5964,
  5969,
  5966,
  5977,
  5982,
  5972,
  5984,
  5989,
  5995,
  5999,
  6001,
  6005,
  6007,
  6009,
  6013,
  6015,
  6017,
  6019,
  6021,
  6027,
  6030,
  6034,
  6036,
  6040,
  6042,
  6045,
  6047,
  6050,
  6052,
  6054,
  6056,
  6063,
  6065,
  6059,
  6070,
  6080,
  6082,
  6085,
  6089,
  6095,
  6099,
  6101,
  6104,
  6106,
  6108,
  6111,
  6113,
  6115,
  6128,
  6130,
  6137,
  6139,
  6141,
  6145,
  6147,
  6150,
  6152,
  6154,
  6156,
  6158,
  6160,
  6162,
  6164,
  6166,
  6176,
  6168,
  6182,
  6187,
  6189,
  6191,
  6194,
  6196,
  6199,
  6201,
  6205,
  6214,
  6209,
  6217,
  6222,
  6227,
  6229,
  6232,
  6234,
  6236,
  6238,
  6240,
  6244,
  6246,
  6249,
  6255,
  6252,
  6261,
  6264,
  6266,
  6268,
  6272,
  6282,
  6284,
  6286,
  6293,
  6295,
  6297,
  6290,
  6299,
  6301,
  6307,
  6313,
  6316,
  6320,
  6324,
  6327,
  6329,
  6331,
  6333,
  6338,
  6340,
  6342,
  6345,
  6347,
  6356,
  6353,
  6365,
  6367,
  6371,
  6375,
  6377,
  6379,
  6383,
  6385,
  6389,
  6391,
  6393,
  6395,
  6399,
  6401,
  6405,
  6410,
  6413,
  6415,
  6425,
  6427,
  6429,
  6431,
  6433,
  6435,
  6437,
  6439,
  6443,
  6448,
  6450,
  6452,
  6454,
  6456,
  6459,
  6466,
  6469,
  6475,
  6478,
  6480,
  6482,
  6484,
  6490,
  6498,
  6500,
  6502,
  6508,
  6504,
  6510,
  6513,
  6518,
  6520,
  6523,
  6525,
  6529,
  6537,
  6539,
  6541,
  6543,
  6546,
  6552,
  6554,
  6548,
  6558,
  6560,
  6562,
  6641,
  6606,
  75,
  6613,
  6618,
  6622,
  6625,
  6628,
  6634
}; // idb
const __int16 yy_def[1940] =
{
  0,
  1931,
  1,
  1931,
  1931,
  1931,
  1931,
  1931,
  1932,
  1931,
  1931,
  1931,
  1933,
  1931,
  1933,
  1934,
  1935,
  1935,
  1931,
  1931,
  1931,
  1931,
  1931,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  17,
  1931,
  1931,
  1931,
  1931,
  1932,
  1931,
  1933,
  1931,
  1931,
  1936,
  1937,
  1936,
  17,
  1935,
  17,
  1937,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  40,
  1935,
  1938,
  1936,
  1937,
  1937,
  1937,
  1934,
  55,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1937,
  1935,
  1935,
  1935,
  1938,
  1939,
  1939,
  99,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  187,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  153,
  1935,
  1935,
  1935,
  159,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  1935,
  0,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931
}; // idb
const __int16 yy_nxt[6699] =
{
  0,
  4,
  5,
  6,
  7,
  8,
  9,
  10,
  11,
  12,
  13,
  14,
  4,
  15,
  16,
  17,
  17,
  17,
  17,
  17,
  17,
  17,
  17,
  18,
  19,
  20,
  21,
  22,
  23,
  24,
  25,
  26,
  27,
  28,
  29,
  30,
  31,
  32,
  27,
  27,
  27,
  27,
  33,
  34,
  35,
  27,
  36,
  37,
  38,
  39,
  40,
  27,
  27,
  27,
  27,
  41,
  42,
  43,
  48,
  56,
  52,
  56,
  52,
  49,
  51,
  52,
  53,
  53,
  53,
  53,
  53,
  53,
  53,
  53,
  53,
  56,
  52,
  56,
  52,
  56,
  52,
  47,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  1931,
  65,
  57,
  158,
  58,
  56,
  52,
  73,
  56,
  52,
  106,
  55,
  51,
  52,
  53,
  53,
  53,
  53,
  53,
  53,
  53,
  53,
  53,
  59,
  61,
  62,
  92,
  63,
  158,
  60,
  56,
  52,
  56,
  52,
  100,
  64,
  66,
  52,
  56,
  52,
  56,
  52,
  95,
  56,
  52,
  56,
  52,
  153,
  56,
  52,
  46,
  56,
  52,
  56,
  52,
  67,
  70,
  44,
  56,
  52,
  74,
  68,
  69,
  75,
  46,
  80,
  79,
  56,
  52,
  56,
  52,
  76,
  81,
  71,
  72,
  82,
  102,
  77,
  78,
  83,
  56,
  52,
  54,
  104,
  84,
  56,
  52,
  103,
  105,
  108,
  56,
  52,
  56,
  52,
  56,
  52,
  107,
  56,
  52,
  44,
  56,
  52,
  85,
  1931,
  86,
  109,
  87,
  56,
  52,
  56,
  52,
  56,
  52,
  159,
  112,
  159,
  88,
  1931,
  110,
  89,
  90,
  91,
  56,
  111,
  93,
  93,
  93,
  93,
  93,
  93,
  93,
  93,
  93,
  116,
  1931,
  114,
  115,
  1931,
  117,
  113,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  1931,
  94,
  97,
  97,
  97,
  97,
  97,
  97,
  97,
  97,
  97,
  118,
  125,
  136,
  152,
  56,
  52,
  119,
  56,
  52,
  126,
  99,
  56,
  1931,
  101,
  101,
  101,
  101,
  101,
  101,
  101,
  101,
  101,
  120,
  121,
  56,
  52,
  1931,
  101,
  101,
  101,
  101,
  101,
  101,
  101,
  130,
  56,
  52,
  131,
  1931,
  122,
  127,
  56,
  52,
  123,
  124,
  56,
  52,
  1931,
  56,
  52,
  1931,
  56,
  52,
  1931,
  56,
  52,
  128,
  1931,
  134,
  56,
  52,
  1931,
  129,
  1931,
  132,
  137,
  1931,
  138,
  56,
  52,
  135,
  139,
  1931,
  133,
  56,
  52,
  56,
  52,
  140,
  141,
  1931,
  142,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  145,
  154,
  56,
  52,
  56,
  52,
  1931,
  149,
  143,
  144,
  147,
  56,
  52,
  150,
  1931,
  56,
  52,
  155,
  1931,
  164,
  146,
  161,
  175,
  156,
  56,
  52,
  151,
  1931,
  148,
  97,
  97,
  97,
  97,
  97,
  97,
  97,
  97,
  97,
  162,
  56,
  52,
  1931,
  163,
  56,
  52,
  171,
  56,
  52,
  99,
  159,
  165,
  159,
  56,
  52,
  160,
  160,
  160,
  160,
  160,
  160,
  160,
  160,
  160,
  166,
  1931,
  167,
  168,
  56,
  52,
  169,
  174,
  56,
  52,
  172,
  56,
  52,
  1931,
  170,
  173,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  177,
  56,
  52,
  176,
  1931,
  180,
  1931,
  56,
  52,
  56,
  52,
  178,
  181,
  56,
  52,
  56,
  52,
  186,
  1931,
  184,
  182,
  1931,
  179,
  187,
  1931,
  189,
  56,
  52,
  188,
  1931,
  183,
  1931,
  185,
  56,
  52,
  56,
  52,
  1931,
  191,
  56,
  52,
  192,
  56,
  52,
  1931,
  193,
  56,
  52,
  1931,
  190,
  56,
  52,
  56,
  52,
  56,
  52,
  195,
  56,
  52,
  196,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  194,
  56,
  52,
  1931,
  199,
  200,
  56,
  52,
  56,
  52,
  1931,
  198,
  197,
  210,
  1931,
  209,
  203,
  201,
  204,
  1931,
  205,
  206,
  211,
  56,
  52,
  1931,
  202,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  207,
  208,
  1931,
  212,
  56,
  52,
  1931,
  214,
  1931,
  213,
  56,
  52,
  56,
  52,
  56,
  52,
  216,
  56,
  52,
  1931,
  218,
  56,
  52,
  215,
  56,
  52,
  217,
  56,
  52,
  219,
  220,
  56,
  52,
  1931,
  223,
  56,
  52,
  1931,
  56,
  52,
  228,
  56,
  52,
  56,
  52,
  221,
  225,
  1931,
  224,
  222,
  1931,
  226,
  227,
  227,
  227,
  227,
  227,
  227,
  227,
  227,
  227,
  229,
  230,
  233,
  56,
  52,
  232,
  56,
  52,
  234,
  56,
  52,
  235,
  56,
  52,
  1931,
  56,
  52,
  236,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  1931,
  56,
  52,
  1931,
  240,
  56,
  52,
  242,
  1931,
  237,
  244,
  239,
  1931,
  238,
  241,
  247,
  246,
  56,
  52,
  56,
  52,
  243,
  248,
  56,
  52,
  1931,
  249,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  245,
  56,
  52,
  56,
  52,
  1931,
  251,
  56,
  52,
  56,
  52,
  1931,
  256,
  252,
  253,
  1931,
  254,
  250,
  1931,
  255,
  1931,
  56,
  52,
  257,
  56,
  52,
  258,
  56,
  52,
  56,
  52,
  283,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  259,
  56,
  52,
  274,
  56,
  52,
  285,
  56,
  52,
  289,
  56,
  52,
  1931,
  268,
  1931,
  269,
  284,
  56,
  52,
  260,
  261,
  262,
  263,
  270,
  288,
  271,
  286,
  1931,
  272,
  287,
  273,
  264,
  290,
  265,
  56,
  52,
  266,
  267,
  275,
  276,
  277,
  1931,
  278,
  56,
  52,
  291,
  1931,
  56,
  52,
  294,
  279,
  1931,
  280,
  56,
  52,
  281,
  282,
  54,
  56,
  52,
  56,
  52,
  296,
  1931,
  292,
  293,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  1931,
  295,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  299,
  1931,
  300,
  1931,
  297,
  302,
  303,
  56,
  52,
  1931,
  298,
  305,
  306,
  301,
  307,
  56,
  52,
  1931,
  56,
  52,
  304,
  56,
  52,
  311,
  1931,
  310,
  1931,
  308,
  56,
  52,
  309,
  56,
  52,
  319,
  56,
  52,
  56,
  52,
  321,
  322,
  323,
  56,
  52,
  56,
  52,
  326,
  56,
  52,
  312,
  313,
  320,
  314,
  56,
  52,
  1931,
  324,
  1931,
  325,
  1931,
  315,
  316,
  327,
  330,
  317,
  1931,
  329,
  318,
  56,
  52,
  56,
  52,
  331,
  1931,
  328,
  335,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  332,
  56,
  52,
  56,
  52,
  333,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  339,
  56,
  52,
  56,
  52,
  341,
  1931,
  336,
  334,
  56,
  52,
  1931,
  337,
  56,
  52,
  340,
  338,
  56,
  52,
  56,
  52,
  56,
  52,
  342,
  343,
  346,
  1931,
  348,
  345,
  56,
  52,
  1931,
  344,
  1931,
  349,
  56,
  52,
  56,
  52,
  1931,
  347,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  351,
  1931,
  350,
  56,
  52,
  1931,
  352,
  56,
  52,
  56,
  52,
  357,
  1931,
  358,
  353,
  354,
  56,
  52,
  56,
  52,
  360,
  56,
  52,
  1931,
  361,
  355,
  362,
  1931,
  356,
  56,
  52,
  56,
  52,
  359,
  56,
  52,
  56,
  52,
  1931,
  364,
  1931,
  56,
  52,
  363,
  56,
  52,
  367,
  56,
  52,
  368,
  56,
  52,
  366,
  56,
  52,
  1931,
  365,
  1931,
  378,
  370,
  369,
  376,
  56,
  52,
  1931,
  377,
  1931,
  372,
  56,
  52,
  1931,
  371,
  373,
  1931,
  379,
  1931,
  374,
  1931,
  380,
  375,
  56,
  52,
  56,
  52,
  1931,
  382,
  383,
  56,
  52,
  1931,
  56,
  52,
  1931,
  381,
  56,
  52,
  56,
  52,
  56,
  52,
  385,
  1931,
  386,
  1931,
  384,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  389,
  1931,
  387,
  390,
  392,
  56,
  52,
  388,
  56,
  52,
  391,
  397,
  393,
  398,
  56,
  52,
  1931,
  399,
  56,
  52,
  1931,
  394,
  401,
  395,
  56,
  52,
  1931,
  396,
  1931,
  400,
  56,
  52,
  1931,
  402,
  56,
  52,
  56,
  52,
  403,
  56,
  52,
  404,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  408,
  1931,
  405,
  56,
  52,
  411,
  1931,
  406,
  56,
  52,
  1931,
  407,
  56,
  52,
  56,
  52,
  409,
  410,
  56,
  52,
  415,
  56,
  52,
  413,
  412,
  56,
  52,
  56,
  52,
  417,
  414,
  416,
  56,
  52,
  1931,
  420,
  1931,
  421,
  1931,
  422,
  1931,
  418,
  56,
  52,
  424,
  56,
  52,
  56,
  52,
  425,
  56,
  52,
  419,
  56,
  52,
  423,
  1931,
  56,
  52,
  56,
  52,
  427,
  56,
  52,
  56,
  52,
  1931,
  436,
  56,
  52,
  56,
  52,
  56,
  52,
  426,
  56,
  52,
  1931,
  437,
  1931,
  441,
  1931,
  439,
  1931,
  442,
  445,
  448,
  438,
  440,
  1931,
  443,
  1931,
  428,
  56,
  52,
  1931,
  444,
  429,
  430,
  1931,
  447,
  446,
  1931,
  431,
  432,
  433,
  1931,
  434,
  435,
  450,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  449,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  452,
  1931,
  453,
  56,
  52,
  56,
  52,
  455,
  451,
  1931,
  456,
  1931,
  454,
  458,
  459,
  56,
  52,
  56,
  52,
  461,
  1931,
  466,
  56,
  52,
  1931,
  457,
  460,
  1931,
  462,
  56,
  52,
  56,
  52,
  56,
  52,
  465,
  463,
  1931,
  464,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  468,
  56,
  52,
  470,
  56,
  52,
  56,
  52,
  56,
  52,
  467,
  56,
  52,
  473,
  1931,
  472,
  56,
  52,
  56,
  52,
  1931,
  469,
  56,
  52,
  477,
  56,
  52,
  480,
  471,
  476,
  56,
  52,
  474,
  56,
  52,
  1931,
  475,
  478,
  482,
  56,
  52,
  1931,
  479,
  1931,
  56,
  52,
  56,
  52,
  1931,
  481,
  1931,
  483,
  56,
  52,
  484,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  485,
  486,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  490,
  56,
  52,
  56,
  52,
  487,
  56,
  52,
  488,
  1931,
  489,
  1931,
  494,
  495,
  492,
  496,
  1931,
  491,
  1931,
  498,
  493,
  56,
  52,
  56,
  52,
  500,
  497,
  56,
  52,
  499,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  501,
  56,
  52,
  56,
  52,
  1931,
  503,
  56,
  52,
  506,
  505,
  56,
  52,
  502,
  509,
  510,
  504,
  56,
  52,
  1931,
  507,
  1931,
  513,
  56,
  52,
  56,
  52,
  56,
  52,
  511,
  56,
  52,
  508,
  56,
  52,
  512,
  56,
  52,
  56,
  52,
  56,
  52,
  515,
  519,
  517,
  56,
  52,
  1931,
  514,
  518,
  56,
  52,
  56,
  52,
  521,
  56,
  52,
  1931,
  516,
  1931,
  520,
  56,
  52,
  524,
  522,
  56,
  52,
  56,
  52,
  1931,
  523,
  56,
  52,
  56,
  52,
  56,
  52,
  527,
  1931,
  525,
  56,
  52,
  56,
  52,
  528,
  526,
  56,
  52,
  56,
  52,
  1931,
  529,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  1931,
  530,
  532,
  533,
  56,
  52,
  531,
  1931,
  534,
  1931,
  539,
  535,
  537,
  56,
  52,
  536,
  56,
  52,
  538,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  540,
  542,
  56,
  52,
  541,
  56,
  52,
  1931,
  56,
  52,
  544,
  543,
  1931,
  56,
  52,
  1931,
  547,
  548,
  56,
  52,
  1931,
  545,
  56,
  52,
  549,
  1931,
  546,
  552,
  56,
  52,
  550,
  553,
  554,
  56,
  52,
  56,
  52,
  1931,
  551,
  558,
  56,
  52,
  555,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  556,
  557,
  56,
  52,
  1931,
  559,
  1931,
  561,
  562,
  56,
  52,
  563,
  1931,
  569,
  1931,
  568,
  560,
  1931,
  564,
  570,
  56,
  52,
  1931,
  566,
  567,
  565,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  571,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  575,
  56,
  52,
  572,
  576,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  573,
  577,
  574,
  581,
  56,
  52,
  56,
  52,
  1931,
  578,
  585,
  1931,
  579,
  582,
  580,
  583,
  584,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  1931,
  586,
  56,
  52,
  594,
  56,
  52,
  595,
  596,
  1931,
  597,
  56,
  52,
  56,
  52,
  1931,
  600,
  602,
  1931,
  587,
  588,
  589,
  590,
  591,
  56,
  52,
  598,
  601,
  56,
  52,
  1931,
  592,
  1931,
  599,
  56,
  52,
  1931,
  593,
  1931,
  603,
  56,
  52,
  56,
  52,
  604,
  56,
  52,
  56,
  52,
  605,
  56,
  52,
  1931,
  607,
  1931,
  56,
  52,
  608,
  56,
  52,
  56,
  52,
  606,
  1931,
  611,
  609,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  610,
  612,
  615,
  1931,
  613,
  1931,
  614,
  56,
  52,
  1931,
  625,
  56,
  52,
  56,
  52,
  1931,
  624,
  56,
  52,
  629,
  1931,
  628,
  626,
  1931,
  627,
  616,
  617,
  1931,
  631,
  618,
  632,
  1931,
  630,
  56,
  52,
  1931,
  619,
  56,
  52,
  620,
  56,
  52,
  621,
  622,
  623,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  633,
  1931,
  634,
  56,
  52,
  56,
  52,
  1931,
  635,
  636,
  637,
  638,
  642,
  1931,
  56,
  52,
  56,
  52,
  641,
  1931,
  639,
  56,
  52,
  640,
  56,
  52,
  645,
  643,
  56,
  52,
  56,
  52,
  56,
  52,
  644,
  646,
  56,
  52,
  649,
  1931,
  56,
  52,
  56,
  52,
  1931,
  650,
  56,
  52,
  647,
  56,
  52,
  648,
  653,
  56,
  52,
  1931,
  654,
  655,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  651,
  56,
  52,
  1931,
  652,
  56,
  52,
  1931,
  656,
  1931,
  659,
  657,
  56,
  52,
  1931,
  658,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  1931,
  661,
  1931,
  663,
  660,
  662,
  56,
  52,
  665,
  56,
  52,
  669,
  56,
  52,
  667,
  1931,
  666,
  668,
  56,
  52,
  56,
  52,
  56,
  52,
  664,
  1931,
  670,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  1931,
  671,
  56,
  52,
  1931,
  672,
  56,
  52,
  676,
  56,
  52,
  56,
  52,
  1931,
  678,
  679,
  673,
  1931,
  675,
  56,
  52,
  674,
  677,
  680,
  683,
  56,
  52,
  681,
  684,
  56,
  52,
  1931,
  682,
  685,
  56,
  52,
  56,
  52,
  56,
  52,
  687,
  1931,
  686,
  1931,
  688,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  691,
  56,
  52,
  1931,
  690,
  56,
  52,
  693,
  56,
  52,
  689,
  56,
  52,
  695,
  692,
  697,
  1931,
  56,
  52,
  694,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  698,
  701,
  1931,
  696,
  1931,
  56,
  52,
  700,
  56,
  52,
  699,
  702,
  704,
  1931,
  703,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  705,
  706,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  708,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  1931,
  56,
  52,
  707,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  1931,
  709,
  713,
  714,
  716,
  710,
  711,
  712,
  717,
  56,
  52,
  56,
  52,
  1931,
  718,
  1931,
  715,
  720,
  1931,
  719,
  56,
  52,
  56,
  52,
  56,
  52,
  721,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  722,
  1931,
  723,
  56,
  52,
  56,
  52,
  726,
  1931,
  724,
  56,
  52,
  1931,
  725,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  728,
  56,
  52,
  56,
  52,
  727,
  1931,
  733,
  730,
  1931,
  731,
  1931,
  729,
  1931,
  732,
  734,
  56,
  52,
  738,
  56,
  52,
  56,
  52,
  1931,
  736,
  56,
  52,
  735,
  737,
  1931,
  739,
  56,
  52,
  56,
  52,
  740,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  1931,
  744,
  56,
  52,
  1931,
  743,
  56,
  52,
  741,
  1931,
  742,
  747,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  748,
  56,
  52,
  745,
  746,
  749,
  1931,
  750,
  751,
  1931,
  753,
  752,
  56,
  52,
  56,
  52,
  56,
  52,
  754,
  756,
  1931,
  755,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  757,
  56,
  52,
  758,
  56,
  52,
  761,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  759,
  56,
  52,
  766,
  760,
  762,
  1931,
  56,
  52,
  763,
  56,
  52,
  1931,
  773,
  764,
  1931,
  765,
  56,
  52,
  56,
  52,
  1931,
  769,
  767,
  768,
  770,
  771,
  56,
  52,
  56,
  52,
  772,
  774,
  56,
  52,
  1931,
  777,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  775,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  776,
  56,
  52,
  782,
  1931,
  778,
  1931,
  779,
  56,
  52,
  1931,
  780,
  781,
  1931,
  785,
  56,
  52,
  1931,
  788,
  783,
  787,
  56,
  52,
  56,
  52,
  1931,
  784,
  786,
  56,
  52,
  56,
  52,
  1931,
  790,
  56,
  52,
  1931,
  789,
  56,
  52,
  1931,
  793,
  792,
  56,
  52,
  794,
  1931,
  791,
  56,
  52,
  1931,
  795,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  796,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  799,
  797,
  56,
  52,
  802,
  1931,
  798,
  56,
  52,
  800,
  56,
  52,
  801,
  56,
  52,
  1931,
  803,
  806,
  809,
  804,
  56,
  52,
  805,
  56,
  52,
  56,
  52,
  1931,
  807,
  1931,
  808,
  56,
  52,
  56,
  52,
  1931,
  810,
  56,
  52,
  56,
  52,
  811,
  56,
  52,
  1931,
  812,
  56,
  52,
  56,
  52,
  56,
  52,
  814,
  56,
  52,
  815,
  56,
  52,
  813,
  56,
  52,
  1931,
  818,
  56,
  52,
  1931,
  816,
  821,
  56,
  52,
  822,
  56,
  52,
  817,
  1931,
  56,
  52,
  56,
  52,
  1931,
  819,
  56,
  52,
  1931,
  825,
  820,
  56,
  52,
  1931,
  56,
  52,
  1931,
  823,
  56,
  52,
  824,
  827,
  56,
  52,
  56,
  52,
  1931,
  828,
  56,
  52,
  826,
  56,
  52,
  829,
  832,
  1931,
  830,
  56,
  52,
  836,
  56,
  52,
  840,
  837,
  56,
  52,
  833,
  831,
  1931,
  834,
  1931,
  835,
  839,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  838,
  1931,
  841,
  56,
  52,
  843,
  56,
  52,
  56,
  52,
  56,
  52,
  845,
  1931,
  842,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  844,
  1931,
  848,
  56,
  52,
  56,
  52,
  1931,
  851,
  1931,
  850,
  846,
  1931,
  847,
  56,
  52,
  853,
  1931,
  849,
  56,
  52,
  56,
  52,
  1931,
  855,
  854,
  1931,
  856,
  1931,
  852,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  858,
  56,
  52,
  1931,
  857,
  1931,
  859,
  56,
  52,
  56,
  52,
  1931,
  862,
  1931,
  56,
  52,
  56,
  52,
  863,
  1931,
  860,
  56,
  52,
  861,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  864,
  865,
  868,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  866,
  867,
  56,
  52,
  869,
  56,
  52,
  56,
  52,
  872,
  876,
  1931,
  870,
  1931,
  878,
  871,
  874,
  873,
  56,
  52,
  879,
  56,
  52,
  56,
  52,
  875,
  56,
  52,
  1931,
  877,
  56,
  52,
  1931,
  880,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  881,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  886,
  887,
  1931,
  882,
  883,
  56,
  52,
  884,
  56,
  52,
  56,
  52,
  56,
  52,
  885,
  891,
  56,
  52,
  1931,
  892,
  888,
  56,
  52,
  889,
  1931,
  894,
  890,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  893,
  899,
  1931,
  56,
  52,
  56,
  52,
  896,
  56,
  52,
  895,
  897,
  901,
  900,
  1931,
  898,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  902,
  903,
  1931,
  904,
  1931,
  906,
  905,
  56,
  52,
  56,
  52,
  908,
  909,
  56,
  52,
  913,
  56,
  52,
  56,
  52,
  56,
  52,
  907,
  56,
  52,
  1931,
  910,
  56,
  52,
  1931,
  911,
  1931,
  915,
  1931,
  914,
  912,
  1931,
  920,
  56,
  52,
  1931,
  919,
  56,
  52,
  921,
  1931,
  917,
  1931,
  918,
  916,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  922,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  1931,
  924,
  928,
  56,
  52,
  923,
  56,
  52,
  56,
  52,
  56,
  52,
  925,
  56,
  52,
  934,
  1931,
  926,
  930,
  1931,
  927,
  1931,
  929,
  56,
  52,
  931,
  933,
  1931,
  932,
  935,
  938,
  56,
  52,
  56,
  52,
  1931,
  936,
  56,
  52,
  937,
  1931,
  939,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  942,
  56,
  52,
  940,
  56,
  52,
  941,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  943,
  56,
  52,
  56,
  52,
  1931,
  944,
  1931,
  946,
  945,
  56,
  52,
  952,
  947,
  56,
  52,
  949,
  56,
  52,
  1931,
  955,
  948,
  950,
  56,
  52,
  56,
  52,
  953,
  56,
  52,
  1931,
  957,
  1931,
  951,
  56,
  52,
  954,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  960,
  1931,
  956,
  1931,
  56,
  52,
  1931,
  959,
  56,
  52,
  56,
  52,
  958,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  964,
  1931,
  961,
  56,
  52,
  56,
  52,
  962,
  56,
  52,
  56,
  52,
  1931,
  963,
  965,
  966,
  56,
  52,
  1931,
  967,
  971,
  972,
  56,
  52,
  968,
  56,
  52,
  56,
  52,
  56,
  52,
  969,
  1931,
  970,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  979,
  1931,
  973,
  56,
  52,
  974,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  981,
  977,
  1931,
  976,
  975,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  1931,
  978,
  982,
  984,
  56,
  52,
  980,
  56,
  52,
  1931,
  985,
  983,
  56,
  52,
  986,
  989,
  990,
  991,
  992,
  993,
  1931,
  988,
  987,
  1931,
  994,
  56,
  52,
  1931,
  995,
  56,
  52,
  56,
  52,
  1931,
  999,
  1000,
  1001,
  1002,
  56,
  52,
  1931,
  56,
  52,
  996,
  1003,
  1004,
  1005,
  1006,
  1931,
  998,
  56,
  52,
  56,
  52,
  56,
  52,
  1007,
  56,
  52,
  1931,
  997,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1008,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1011,
  56,
  52,
  56,
  52,
  1931,
  1010,
  56,
  52,
  1009,
  56,
  52,
  1931,
  1012,
  56,
  52,
  1015,
  1014,
  1013,
  56,
  52,
  56,
  52,
  56,
  52,
  1017,
  1018,
  1931,
  1019,
  1931,
  1016,
  1021,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1020,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  1022,
  56,
  52,
  1023,
  56,
  52,
  1931,
  56,
  52,
  1931,
  1027,
  1931,
  56,
  52,
  1026,
  56,
  52,
  1931,
  1025,
  1029,
  56,
  52,
  1024,
  56,
  52,
  56,
  52,
  1028,
  1032,
  1931,
  1030,
  1931,
  1034,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  1031,
  1033,
  56,
  52,
  1035,
  1037,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  1931,
  1036,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  1038,
  1042,
  1931,
  1043,
  56,
  52,
  1931,
  1039,
  1040,
  56,
  52,
  1931,
  1041,
  1044,
  1045,
  1047,
  56,
  52,
  1931,
  1046,
  56,
  52,
  56,
  52,
  56,
  52,
  1049,
  56,
  52,
  56,
  52,
  1931,
  1048,
  56,
  52,
  56,
  52,
  56,
  52,
  1051,
  1931,
  1053,
  1931,
  56,
  52,
  56,
  52,
  1050,
  1931,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  1057,
  1052,
  56,
  52,
  56,
  52,
  1055,
  56,
  52,
  1054,
  1058,
  1931,
  1060,
  1061,
  1056,
  1062,
  56,
  52,
  56,
  52,
  1059,
  1067,
  1931,
  56,
  52,
  1064,
  1065,
  56,
  52,
  1063,
  56,
  52,
  1931,
  1066,
  56,
  52,
  1069,
  56,
  52,
  1068,
  1071,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1070,
  56,
  52,
  1074,
  1073,
  56,
  52,
  56,
  52,
  1931,
  1072,
  1931,
  1079,
  56,
  52,
  1078,
  56,
  52,
  1075,
  1081,
  1077,
  1076,
  1085,
  1082,
  1080,
  1084,
  1931,
  56,
  52,
  1931,
  1083,
  56,
  52,
  1088,
  56,
  52,
  1086,
  56,
  52,
  56,
  52,
  56,
  52,
  1087,
  1090,
  56,
  52,
  1089,
  56,
  52,
  1931,
  56,
  52,
  1931,
  1093,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1092,
  1096,
  1091,
  1097,
  56,
  52,
  56,
  52,
  1094,
  1098,
  1931,
  1095,
  1102,
  1099,
  1931,
  1100,
  1931,
  1103,
  56,
  52,
  56,
  52,
  1105,
  56,
  52,
  1931,
  1101,
  1106,
  56,
  52,
  56,
  52,
  1931,
  1104,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1108,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1109,
  1107,
  56,
  52,
  1110,
  1113,
  56,
  52,
  56,
  52,
  1111,
  56,
  52,
  1121,
  1122,
  1112,
  56,
  52,
  1931,
  1116,
  56,
  52,
  1115,
  1931,
  1114,
  56,
  52,
  1931,
  1118,
  56,
  52,
  1931,
  1117,
  56,
  52,
  1931,
  56,
  52,
  1119,
  56,
  52,
  1120,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1123,
  56,
  52,
  56,
  52,
  1931,
  1124,
  1127,
  56,
  52,
  1931,
  1125,
  56,
  52,
  1128,
  1130,
  1931,
  1126,
  56,
  52,
  1931,
  1129,
  56,
  52,
  1132,
  1931,
  1131,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  1931,
  1133,
  1931,
  1136,
  56,
  52,
  1134,
  56,
  52,
  56,
  52,
  1931,
  1135,
  1140,
  1931,
  1137,
  1138,
  56,
  52,
  1931,
  56,
  52,
  1931,
  1139,
  1145,
  1142,
  56,
  52,
  1141,
  1931,
  1143,
  56,
  52,
  1931,
  1144,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1152,
  1146,
  1148,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1147,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1153,
  1931,
  1159,
  1149,
  1150,
  1151,
  1154,
  1931,
  1155,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1156,
  56,
  52,
  1158,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1157,
  1931,
  1166,
  1931,
  1167,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1160,
  1931,
  1161,
  1931,
  1162,
  1931,
  1163,
  1931,
  1164,
  1169,
  1931,
  1165,
  56,
  52,
  1931,
  1172,
  56,
  52,
  56,
  52,
  1931,
  1170,
  56,
  52,
  1168,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1171,
  56,
  52,
  56,
  52,
  1174,
  56,
  52,
  56,
  52,
  1173,
  56,
  52,
  56,
  52,
  1931,
  1177,
  56,
  52,
  56,
  52,
  1175,
  56,
  52,
  56,
  52,
  1931,
  1180,
  56,
  52,
  1931,
  1176,
  1182,
  56,
  52,
  1178,
  56,
  52,
  1931,
  1179,
  56,
  52,
  1931,
  1185,
  1181,
  56,
  52,
  56,
  52,
  1183,
  1186,
  1184,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1188,
  1931,
  1187,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1191,
  56,
  52,
  56,
  52,
  1189,
  1190,
  56,
  52,
  1195,
  56,
  52,
  1196,
  56,
  52,
  1931,
  1194,
  1931,
  1192,
  1193,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1199,
  56,
  52,
  56,
  52,
  1197,
  56,
  52,
  1198,
  56,
  52,
  1931,
  1200,
  1201,
  1931,
  1202,
  56,
  52,
  56,
  52,
  1208,
  56,
  52,
  1931,
  1204,
  1931,
  1207,
  1205,
  1931,
  1203,
  1209,
  56,
  52,
  56,
  52,
  1206,
  1931,
  1211,
  1212,
  56,
  52,
  56,
  52,
  1931,
  1210,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  1216,
  1213,
  1931,
  1214,
  1217,
  56,
  52,
  1931,
  1219,
  1931,
  1218,
  56,
  52,
  1931,
  1215,
  1220,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1223,
  56,
  52,
  1222,
  1221,
  56,
  52,
  1931,
  56,
  52,
  1224,
  56,
  52,
  56,
  52,
  1229,
  1931,
  1226,
  1931,
  1227,
  1225,
  1228,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1230,
  1931,
  1231,
  1232,
  56,
  52,
  1931,
  1237,
  56,
  52,
  1234,
  1931,
  1233,
  56,
  52,
  56,
  52,
  1235,
  1236,
  1240,
  56,
  52,
  1931,
  1242,
  1239,
  1931,
  1238,
  1931,
  1241,
  56,
  52,
  1931,
  1247,
  1248,
  1249,
  1250,
  56,
  52,
  56,
  52,
  56,
  52,
  1243,
  1931,
  1246,
  56,
  52,
  1244,
  1931,
  1245,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1252,
  56,
  52,
  56,
  52,
  1254,
  1931,
  1251,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1256,
  1257,
  1931,
  1253,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  1258,
  1931,
  1255,
  56,
  52,
  56,
  52,
  1931,
  1259,
  56,
  52,
  56,
  52,
  1260,
  1262,
  56,
  52,
  1261,
  1931,
  1263,
  1931,
  1264,
  56,
  52,
  56,
  52,
  1267,
  56,
  52,
  1931,
  1265,
  1266,
  56,
  52,
  56,
  52,
  1269,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  1270,
  1268,
  56,
  52,
  1931,
  1272,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  1931,
  56,
  52,
  1275,
  56,
  52,
  1931,
  1271,
  56,
  52,
  56,
  52,
  1273,
  1276,
  1277,
  1280,
  1274,
  1931,
  1278,
  56,
  52,
  56,
  52,
  1283,
  56,
  52,
  1281,
  56,
  52,
  1931,
  1285,
  1279,
  1282,
  56,
  52,
  1931,
  1284,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1286,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1294,
  1287,
  56,
  52,
  56,
  52,
  1291,
  1293,
  1289,
  1931,
  56,
  52,
  56,
  52,
  1290,
  1931,
  1288,
  56,
  52,
  56,
  52,
  1931,
  1292,
  1931,
  1295,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1296,
  56,
  52,
  1931,
  1297,
  1298,
  1299,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1300,
  56,
  52,
  1931,
  1301,
  56,
  52,
  1931,
  1302,
  56,
  52,
  56,
  52,
  1931,
  1308,
  1306,
  56,
  52,
  1931,
  1303,
  1307,
  1309,
  1931,
  1304,
  1931,
  1305,
  56,
  52,
  1310,
  1312,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  1313,
  1311,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1314,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1315,
  1931,
  1318,
  56,
  52,
  1316,
  1317,
  1319,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1320,
  56,
  52,
  1321,
  1326,
  56,
  52,
  1322,
  1931,
  1323,
  1931,
  1324,
  56,
  52,
  56,
  52,
  1329,
  1931,
  1325,
  56,
  52,
  1931,
  1327,
  56,
  52,
  1331,
  56,
  52,
  1931,
  1330,
  1328,
  1332,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1334,
  56,
  52,
  56,
  52,
  1333,
  56,
  52,
  56,
  52,
  1931,
  1338,
  1337,
  1931,
  56,
  52,
  56,
  52,
  1335,
  56,
  52,
  1931,
  1336,
  1931,
  1342,
  1340,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1339,
  1931,
  1344,
  1931,
  1341,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1343,
  1345,
  1931,
  56,
  52,
  1346,
  1348,
  1347,
  56,
  52,
  1350,
  56,
  52,
  1354,
  1352,
  1349,
  56,
  52,
  1351,
  56,
  52,
  1355,
  56,
  52,
  1353,
  56,
  52,
  56,
  52,
  1931,
  1356,
  1357,
  56,
  52,
  56,
  52,
  1358,
  1360,
  56,
  52,
  56,
  52,
  1361,
  1359,
  56,
  52,
  56,
  52,
  56,
  52,
  1364,
  56,
  52,
  1362,
  1363,
  56,
  52,
  56,
  52,
  1931,
  1367,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1365,
  1931,
  1366,
  1931,
  1372,
  1370,
  56,
  52,
  1373,
  1368,
  56,
  52,
  1369,
  1931,
  1375,
  1371,
  56,
  52,
  56,
  52,
  56,
  52,
  1374,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1376,
  56,
  52,
  1378,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  1379,
  1380,
  1383,
  1384,
  1385,
  1931,
  1377,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1381,
  56,
  52,
  1931,
  1386,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  1931,
  1388,
  1389,
  1382,
  56,
  52,
  56,
  52,
  56,
  52,
  1390,
  1387,
  56,
  52,
  1931,
  1394,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1392,
  1396,
  1931,
  1391,
  1393,
  1931,
  1398,
  1931,
  1395,
  1397,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1400,
  56,
  52,
  1931,
  1399,
  1931,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  1408,
  1931,
  1401,
  56,
  52,
  1931,
  1402,
  1404,
  1406,
  1405,
  56,
  52,
  56,
  52,
  1403,
  1407,
  56,
  52,
  1409,
  1410,
  1411,
  1412,
  1413,
  1414,
  1415,
  1416,
  56,
  52,
  56,
  52,
  1417,
  1931,
  1418,
  1419,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1421,
  56,
  52,
  1931,
  56,
  52,
  1931,
  56,
  52,
  1420,
  56,
  52,
  56,
  52,
  1427,
  1422,
  1423,
  56,
  52,
  56,
  52,
  1425,
  56,
  52,
  56,
  52,
  1931,
  1426,
  1424,
  1428,
  1429,
  56,
  52,
  56,
  52,
  1931,
  1432,
  56,
  52,
  56,
  52,
  56,
  52,
  1431,
  56,
  52,
  1430,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  1433,
  1931,
  56,
  52,
  1434,
  56,
  52,
  56,
  52,
  1931,
  1436,
  1439,
  56,
  52,
  56,
  52,
  1931,
  1435,
  56,
  52,
  1437,
  1931,
  1438,
  1441,
  56,
  52,
  56,
  52,
  56,
  52,
  1440,
  1445,
  1443,
  56,
  52,
  1931,
  1442,
  56,
  52,
  56,
  52,
  1931,
  1444,
  56,
  52,
  1931,
  1448,
  1931,
  1446,
  56,
  52,
  1931,
  1449,
  56,
  52,
  56,
  52,
  56,
  52,
  1451,
  1931,
  1456,
  1931,
  1457,
  1447,
  1931,
  1454,
  1450,
  56,
  52,
  56,
  52,
  1455,
  1931,
  1458,
  1452,
  1459,
  1931,
  1463,
  1453,
  56,
  52,
  1460,
  56,
  52,
  1461,
  1931,
  1462,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1466,
  56,
  52,
  1931,
  1465,
  1467,
  1931,
  56,
  52,
  1464,
  1469,
  1468,
  56,
  52,
  56,
  52,
  1478,
  1479,
  1480,
  56,
  52,
  56,
  52,
  1931,
  1473,
  1931,
  1470,
  1931,
  1471,
  1472,
  56,
  52,
  56,
  52,
  1474,
  1476,
  1931,
  1475,
  1483,
  56,
  52,
  1484,
  1485,
  1486,
  56,
  52,
  56,
  52,
  56,
  52,
  1481,
  1931,
  1477,
  1931,
  1482,
  1487,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1489,
  1488,
  56,
  52,
  56,
  52,
  1931,
  1490,
  1493,
  1492,
  56,
  52,
  56,
  52,
  1491,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  1495,
  56,
  52,
  1498,
  56,
  52,
  1496,
  1494,
  1931,
  1502,
  1497,
  1500,
  1931,
  1501,
  56,
  52,
  56,
  52,
  1499,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  1503,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1504,
  1505,
  1507,
  56,
  52,
  1508,
  56,
  52,
  1931,
  1506,
  1509,
  1510,
  1512,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1511,
  56,
  52,
  1514,
  1515,
  56,
  52,
  1931,
  1513,
  56,
  52,
  1516,
  1517,
  56,
  52,
  56,
  52,
  56,
  52,
  1518,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1520,
  1521,
  1522,
  1523,
  56,
  52,
  56,
  52,
  56,
  52,
  1524,
  56,
  52,
  56,
  52,
  1519,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1531,
  1931,
  1525,
  56,
  52,
  1526,
  1527,
  1530,
  1529,
  1528,
  1532,
  56,
  52,
  1931,
  1536,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1533,
  1534,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1537,
  1535,
  56,
  52,
  1539,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  1931,
  1538,
  1545,
  1541,
  1931,
  1542,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1540,
  56,
  52,
  1931,
  1543,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1544,
  56,
  52,
  1546,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1548,
  1559,
  1560,
  1931,
  1547,
  56,
  52,
  1931,
  1550,
  1549,
  56,
  52,
  56,
  52,
  1551,
  1554,
  1557,
  56,
  52,
  1931,
  1552,
  1555,
  1556,
  1931,
  1553,
  1931,
  56,
  52,
  56,
  52,
  1558,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1564,
  56,
  52,
  1931,
  1561,
  1562,
  1563,
  1931,
  56,
  52,
  1565,
  1567,
  56,
  52,
  1931,
  1566,
  1570,
  1931,
  1569,
  56,
  52,
  1931,
  1572,
  56,
  52,
  1568,
  56,
  52,
  1571,
  1573,
  56,
  52,
  1931,
  1574,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1575,
  56,
  52,
  1931,
  56,
  52,
  1931,
  1578,
  1577,
  1576,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  1931,
  1579,
  1582,
  1931,
  1583,
  1931,
  1580,
  1581,
  56,
  52,
  1931,
  1586,
  1585,
  56,
  52,
  56,
  52,
  56,
  52,
  1588,
  56,
  52,
  1931,
  1584,
  1587,
  56,
  52,
  56,
  52,
  1589,
  56,
  52,
  1931,
  1590,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1591,
  1593,
  1592,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1596,
  56,
  52,
  1594,
  56,
  52,
  1600,
  1599,
  1597,
  1595,
  1598,
  1602,
  56,
  52,
  1601,
  56,
  52,
  56,
  52,
  1931,
  1607,
  1603,
  56,
  52,
  1931,
  1605,
  56,
  52,
  56,
  52,
  56,
  52,
  1604,
  56,
  52,
  56,
  52,
  1608,
  1931,
  1609,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1606,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1615,
  1616,
  1931,
  56,
  52,
  56,
  52,
  1931,
  1613,
  56,
  52,
  56,
  52,
  1931,
  1617,
  1931,
  1610,
  56,
  52,
  56,
  52,
  1611,
  1612,
  1618,
  1619,
  1614,
  56,
  52,
  56,
  52,
  1620,
  56,
  52,
  56,
  52,
  1931,
  1621,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  1631,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1622,
  56,
  52,
  1623,
  56,
  52,
  1931,
  1626,
  1931,
  1624,
  56,
  52,
  56,
  52,
  1931,
  1625,
  1627,
  1628,
  1630,
  1629,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1632,
  1635,
  1931,
  1633,
  1636,
  56,
  52,
  56,
  52,
  1931,
  1634,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  1639,
  56,
  52,
  1637,
  56,
  52,
  1642,
  1638,
  56,
  52,
  56,
  52,
  1640,
  1641,
  56,
  52,
  1931,
  1643,
  56,
  52,
  1931,
  1649,
  1931,
  1644,
  1931,
  56,
  52,
  1645,
  1931,
  1647,
  1651,
  1646,
  1648,
  1931,
  1655,
  1652,
  56,
  52,
  1653,
  1654,
  1931,
  1650,
  1656,
  56,
  52,
  1931,
  1657,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1659,
  56,
  52,
  1931,
  1661,
  1658,
  1662,
  1663,
  56,
  52,
  1660,
  56,
  52,
  1665,
  56,
  52,
  1931,
  56,
  52,
  1664,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  1931,
  1666,
  56,
  52,
  56,
  52,
  56,
  52,
  1667,
  1670,
  56,
  52,
  1931,
  1668,
  1931,
  1669,
  1671,
  1672,
  1673,
  56,
  52,
  56,
  52,
  1675,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1674,
  56,
  52,
  1676,
  56,
  52,
  56,
  52,
  56,
  52,
  1677,
  56,
  52,
  1931,
  1678,
  1931,
  1679,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1680,
  56,
  52,
  1682,
  1683,
  1931,
  1687,
  1688,
  56,
  52,
  1690,
  56,
  52,
  1931,
  1681,
  1684,
  1931,
  1685,
  1931,
  1686,
  56,
  52,
  1692,
  56,
  52,
  1693,
  56,
  52,
  1689,
  56,
  52,
  1931,
  1694,
  1691,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1696,
  1698,
  1931,
  1699,
  56,
  52,
  1931,
  1695,
  56,
  52,
  1697,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1700,
  1931,
  1701,
  56,
  52,
  1702,
  56,
  52,
  1704,
  1931,
  56,
  52,
  1931,
  1706,
  56,
  52,
  1707,
  1703,
  56,
  52,
  1711,
  1712,
  56,
  52,
  1705,
  56,
  52,
  1713,
  1714,
  56,
  52,
  56,
  52,
  56,
  52,
  1715,
  1931,
  1708,
  1710,
  56,
  52,
  1709,
  56,
  52,
  1931,
  1716,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1720,
  56,
  52,
  56,
  52,
  1931,
  1719,
  1717,
  56,
  52,
  1718,
  1724,
  56,
  52,
  1931,
  1721,
  56,
  52,
  1722,
  56,
  52,
  1931,
  1725,
  56,
  52,
  1727,
  56,
  52,
  1723,
  56,
  52,
  56,
  52,
  1726,
  56,
  52,
  56,
  52,
  1931,
  1729,
  56,
  52,
  1728,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1731,
  56,
  52,
  1931,
  1730,
  56,
  52,
  1732,
  56,
  52,
  56,
  52,
  1931,
  1733,
  1931,
  1735,
  1931,
  1736,
  56,
  52,
  56,
  52,
  56,
  52,
  1734,
  56,
  52,
  56,
  52,
  1739,
  56,
  52,
  1737,
  56,
  52,
  1931,
  1738,
  1741,
  56,
  52,
  56,
  52,
  1742,
  1740,
  1743,
  56,
  52,
  1744,
  56,
  52,
  1745,
  56,
  52,
  1931,
  1748,
  1747,
  1931,
  1749,
  56,
  52,
  1931,
  1746,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1751,
  56,
  52,
  1750,
  56,
  52,
  1752,
  56,
  52,
  56,
  52,
  56,
  52,
  1755,
  1754,
  1931,
  1753,
  56,
  52,
  56,
  52,
  1931,
  1759,
  1758,
  1757,
  1756,
  56,
  52,
  1760,
  1931,
  1761,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1766,
  56,
  52,
  1765,
  1764,
  1768,
  56,
  52,
  56,
  52,
  1931,
  1762,
  1763,
  56,
  52,
  56,
  52,
  1767,
  1769,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1770,
  56,
  52,
  56,
  52,
  1931,
  1771,
  1772,
  56,
  52,
  1774,
  56,
  52,
  56,
  52,
  56,
  52,
  1773,
  1775,
  1776,
  1777,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1780,
  56,
  52,
  1781,
  56,
  52,
  1782,
  1931,
  1778,
  56,
  52,
  1779,
  1931,
  1786,
  56,
  52,
  56,
  52,
  1783,
  1931,
  1784,
  56,
  52,
  1788,
  1931,
  1789,
  1785,
  56,
  52,
  1787,
  1790,
  56,
  52,
  56,
  52,
  1931,
  1791,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1792,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1796,
  1931,
  1793,
  56,
  52,
  1931,
  56,
  52,
  1931,
  1795,
  56,
  52,
  56,
  52,
  1931,
  1794,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  1797,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1799,
  56,
  52,
  1798,
  1800,
  56,
  52,
  56,
  52,
  1931,
  1801,
  1803,
  56,
  52,
  1931,
  1808,
  1931,
  1804,
  1931,
  1807,
  1802,
  1805,
  56,
  52,
  56,
  52,
  1811,
  56,
  52,
  1931,
  1806,
  56,
  52,
  1931,
  1809,
  1931,
  1810,
  56,
  52,
  1931,
  1812,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  1813,
  1931,
  1815,
  1931,
  1814,
  1931,
  1819,
  1931,
  1820,
  1931,
  1816,
  56,
  52,
  56,
  52,
  1931,
  1817,
  1818,
  1821,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1822,
  56,
  52,
  56,
  52,
  1823,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1824,
  1825,
  1827,
  1931,
  1830,
  56,
  52,
  1931,
  1826,
  1931,
  1829,
  56,
  52,
  1832,
  1828,
  1831,
  56,
  52,
  56,
  52,
  56,
  52,
  1834,
  56,
  52,
  56,
  52,
  1833,
  56,
  52,
  56,
  52,
  1836,
  1835,
  56,
  52,
  1931,
  1839,
  56,
  52,
  1837,
  1931,
  1838,
  56,
  52,
  1842,
  56,
  52,
  1931,
  1841,
  1843,
  56,
  52,
  1931,
  1844,
  1840,
  56,
  52,
  56,
  52,
  1845,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1846,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  1931,
  56,
  52,
  1848,
  56,
  52,
  1931,
  1847,
  1849,
  1931,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  1850,
  1856,
  56,
  52,
  1853,
  1852,
  1851,
  1854,
  1857,
  1931,
  1855,
  1858,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1860,
  56,
  52,
  1859,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1862,
  1931,
  1863,
  56,
  52,
  1864,
  1931,
  1865,
  1861,
  56,
  52,
  1931,
  56,
  52,
  1931,
  1866,
  56,
  52,
  1931,
  1868,
  56,
  52,
  1867,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1869,
  1871,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  1931,
  1874,
  1931,
  1870,
  56,
  52,
  1872,
  56,
  52,
  1931,
  1876,
  1931,
  1877,
  1878,
  1873,
  1879,
  56,
  52,
  56,
  52,
  1931,
  1875,
  56,
  52,
  1880,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  1881,
  1882,
  56,
  52,
  56,
  52,
  1931,
  1884,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1886,
  1931,
  56,
  52,
  56,
  52,
  1883,
  1885,
  56,
  52,
  1931,
  1888,
  1887,
  56,
  52,
  1890,
  56,
  52,
  56,
  52,
  1931,
  1889,
  1893,
  1931,
  1894,
  1895,
  1892,
  1891,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1898,
  56,
  52,
  1931,
  1896,
  1897,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  1931,
  1899,
  1902,
  1931,
  1900,
  56,
  52,
  1903,
  56,
  52,
  1901,
  1931,
  1904,
  1931,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1905,
  1931,
  1906,
  1907,
  56,
  52,
  1931,
  1909,
  1910,
  1911,
  1931,
  1908,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1913,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  1912,
  1931,
  1916,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  1931,
  1914,
  56,
  52,
  1931,
  1915,
  1917,
  1920,
  1931,
  1918,
  56,
  52,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  56,
  52,
  56,
  52,
  1919,
  1921,
  56,
  52,
  56,
  52,
  1923,
  1922,
  56,
  52,
  56,
  52,
  56,
  52,
  1931,
  1925,
  1931,
  1931,
  1931,
  1928,
  1924,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1926,
  1927,
  1931,
  1931,
  1931,
  1931,
  1929,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1930,
  45,
  45,
  45,
  45,
  45,
  45,
  45,
  45,
  50,
  1931,
  1931,
  50,
  50,
  50,
  50,
  54,
  54,
  54,
  54,
  54,
  96,
  96,
  96,
  96,
  98,
  98,
  98,
  157,
  1931,
  157,
  231,
  1931,
  1931,
  231,
  3,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931
}; // idb
const __int16 yy_chk[6699] =
{
  0,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  1,
  15,
  23,
  23,
  24,
  24,
  15,
  16,
  16,
  16,
  16,
  16,
  16,
  16,
  16,
  16,
  16,
  16,
  27,
  27,
  29,
  29,
  54,
  54,
  1933,
  34,
  34,
  39,
  39,
  61,
  61,
  100,
  26,
  26,
  25,
  25,
  100,
  29,
  24,
  157,
  24,
  28,
  28,
  34,
  30,
  30,
  61,
  16,
  17,
  17,
  17,
  17,
  17,
  17,
  17,
  17,
  17,
  17,
  17,
  25,
  26,
  26,
  39,
  28,
  95,
  25,
  31,
  31,
  32,
  32,
  52,
  28,
  30,
  50,
  33,
  33,
  57,
  57,
  47,
  35,
  35,
  36,
  36,
  93,
  37,
  37,
  45,
  58,
  58,
  59,
  59,
  31,
  33,
  44,
  60,
  60,
  35,
  32,
  32,
  35,
  8,
  37,
  36,
  63,
  63,
  64,
  64,
  35,
  37,
  33,
  33,
  37,
  57,
  35,
  35,
  37,
  62,
  62,
  93,
  59,
  37,
  38,
  38,
  58,
  60,
  63,
  65,
  65,
  66,
  66,
  67,
  67,
  62,
  69,
  69,
  5,
  70,
  70,
  38,
  3,
  38,
  64,
  38,
  68,
  68,
  72,
  72,
  71,
  71,
  158,
  67,
  158,
  38,
  0,
  65,
  38,
  38,
  38,
  40,
  66,
  40,
  40,
  40,
  40,
  40,
  40,
  40,
  40,
  40,
  71,
  0,
  69,
  70,
  0,
  72,
  68,
  0,
  73,
  73,
  96,
  96,
  77,
  77,
  83,
  83,
  92,
  92,
  76,
  76,
  0,
  74,
  74,
  0,
  40,
  51,
  51,
  51,
  51,
  51,
  51,
  51,
  51,
  51,
  73,
  76,
  83,
  92,
  79,
  79,
  74,
  75,
  75,
  77,
  51,
  55,
  0,
  55,
  55,
  55,
  55,
  55,
  55,
  55,
  55,
  55,
  74,
  75,
  78,
  78,
  0,
  55,
  55,
  55,
  55,
  55,
  55,
  55,
  79,
  80,
  80,
  79,
  0,
  75,
  78,
  81,
  81,
  75,
  75,
  82,
  82,
  0,
  84,
  84,
  0,
  85,
  85,
  0,
  86,
  86,
  78,
  0,
  81,
  87,
  87,
  159,
  78,
  159,
  80,
  84,
  0,
  85,
  88,
  88,
  82,
  85,
  0,
  80,
  89,
  89,
  94,
  94,
  85,
  86,
  0,
  86,
  91,
  91,
  90,
  90,
  0,
  102,
  102,
  105,
  105,
  89,
  94,
  112,
  112,
  103,
  103,
  0,
  91,
  87,
  88,
  90,
  104,
  104,
  91,
  0,
  106,
  106,
  94,
  0,
  105,
  89,
  102,
  112,
  94,
  108,
  108,
  91,
  0,
  90,
  97,
  97,
  97,
  97,
  97,
  97,
  97,
  97,
  97,
  103,
  109,
  109,
  0,
  104,
  110,
  110,
  108,
  107,
  107,
  97,
  99,
  106,
  99,
  111,
  111,
  99,
  99,
  99,
  99,
  99,
  99,
  99,
  99,
  99,
  107,
  0,
  107,
  107,
  113,
  113,
  107,
  111,
  114,
  114,
  109,
  115,
  115,
  0,
  107,
  110,
  116,
  116,
  117,
  117,
  118,
  118,
  119,
  119,
  120,
  120,
  121,
  121,
  0,
  114,
  122,
  122,
  113,
  160,
  117,
  160,
  123,
  123,
  124,
  124,
  115,
  118,
  125,
  125,
  126,
  126,
  122,
  0,
  121,
  119,
  0,
  116,
  123,
  0,
  124,
  127,
  127,
  123,
  0,
  120,
  0,
  121,
  128,
  128,
  129,
  129,
  0,
  126,
  130,
  130,
  126,
  131,
  131,
  0,
  127,
  132,
  132,
  0,
  125,
  133,
  133,
  134,
  134,
  135,
  135,
  129,
  136,
  136,
  130,
  137,
  137,
  139,
  139,
  140,
  140,
  0,
  128,
  138,
  138,
  0,
  133,
  134,
  141,
  141,
  142,
  142,
  0,
  132,
  131,
  140,
  0,
  139,
  137,
  135,
  138,
  0,
  138,
  138,
  141,
  143,
  143,
  0,
  136,
  144,
  144,
  145,
  145,
  146,
  146,
  147,
  147,
  0,
  138,
  138,
  0,
  142,
  148,
  148,
  0,
  144,
  0,
  143,
  149,
  149,
  150,
  150,
  151,
  151,
  146,
  152,
  152,
  0,
  148,
  154,
  154,
  145,
  183,
  183,
  147,
  155,
  155,
  149,
  149,
  161,
  161,
  0,
  150,
  163,
  163,
  0,
  162,
  162,
  154,
  156,
  156,
  164,
  164,
  149,
  152,
  0,
  151,
  149,
  0,
  152,
  153,
  153,
  153,
  153,
  153,
  153,
  153,
  153,
  153,
  155,
  156,
  162,
  165,
  165,
  161,
  166,
  166,
  163,
  167,
  167,
  164,
  168,
  168,
  0,
  169,
  169,
  164,
  170,
  170,
  171,
  171,
  172,
  172,
  173,
  173,
  0,
  174,
  174,
  0,
  175,
  175,
  0,
  168,
  176,
  176,
  170,
  0,
  165,
  171,
  167,
  0,
  166,
  169,
  174,
  173,
  177,
  177,
  178,
  178,
  170,
  175,
  179,
  179,
  0,
  176,
  181,
  181,
  0,
  180,
  180,
  182,
  182,
  172,
  184,
  184,
  185,
  185,
  0,
  178,
  188,
  188,
  190,
  190,
  0,
  181,
  179,
  180,
  0,
  180,
  177,
  0,
  180,
  0,
  191,
  191,
  182,
  192,
  192,
  184,
  196,
  196,
  195,
  195,
  190,
  187,
  187,
  193,
  193,
  0,
  194,
  194,
  185,
  186,
  186,
  188,
  199,
  199,
  192,
  197,
  197,
  196,
  202,
  202,
  0,
  187,
  0,
  187,
  191,
  198,
  198,
  186,
  186,
  186,
  186,
  187,
  195,
  187,
  193,
  0,
  187,
  194,
  187,
  186,
  197,
  186,
  204,
  204,
  186,
  186,
  189,
  189,
  189,
  0,
  189,
  200,
  200,
  198,
  0,
  201,
  201,
  202,
  189,
  0,
  189,
  203,
  203,
  189,
  189,
  189,
  205,
  205,
  206,
  206,
  204,
  0,
  200,
  201,
  207,
  207,
  0,
  208,
  208,
  209,
  209,
  0,
  203,
  0,
  210,
  210,
  212,
  212,
  211,
  211,
  0,
  215,
  215,
  206,
  0,
  207,
  0,
  205,
  208,
  208,
  213,
  213,
  0,
  205,
  210,
  210,
  207,
  211,
  216,
  216,
  0,
  217,
  217,
  209,
  218,
  218,
  213,
  0,
  212,
  0,
  211,
  219,
  219,
  211,
  214,
  214,
  215,
  222,
  222,
  220,
  220,
  218,
  218,
  218,
  221,
  221,
  228,
  228,
  219,
  223,
  223,
  214,
  214,
  217,
  214,
  224,
  224,
  0,
  218,
  0,
  218,
  0,
  214,
  214,
  220,
  223,
  214,
  0,
  222,
  214,
  225,
  225,
  226,
  226,
  224,
  0,
  221,
  228,
  229,
  229,
  230,
  230,
  232,
  232,
  233,
  233,
  0,
  225,
  234,
  234,
  235,
  235,
  226,
  236,
  236,
  0,
  237,
  237,
  238,
  238,
  239,
  239,
  233,
  242,
  242,
  240,
  240,
  235,
  0,
  229,
  226,
  241,
  241,
  0,
  230,
  243,
  243,
  234,
  232,
  244,
  244,
  245,
  245,
  246,
  246,
  236,
  237,
  240,
  0,
  242,
  239,
  247,
  247,
  0,
  238,
  0,
  243,
  248,
  248,
  249,
  249,
  0,
  241,
  250,
  250,
  251,
  251,
  252,
  252,
  253,
  253,
  255,
  255,
  245,
  0,
  244,
  254,
  254,
  0,
  247,
  256,
  256,
  257,
  257,
  252,
  0,
  253,
  248,
  249,
  258,
  258,
  259,
  259,
  254,
  260,
  260,
  0,
  254,
  250,
  255,
  0,
  251,
  261,
  261,
  263,
  263,
  253,
  262,
  262,
  264,
  264,
  0,
  257,
  0,
  265,
  265,
  256,
  267,
  267,
  260,
  266,
  266,
  260,
  269,
  269,
  259,
  268,
  268,
  0,
  258,
  0,
  268,
  262,
  261,
  267,
  270,
  270,
  0,
  267,
  0,
  264,
  271,
  271,
  0,
  263,
  265,
  0,
  268,
  0,
  265,
  0,
  269,
  266,
  272,
  272,
  273,
  273,
  0,
  271,
  271,
  274,
  274,
  0,
  275,
  275,
  0,
  270,
  276,
  276,
  278,
  278,
  277,
  277,
  273,
  0,
  273,
  0,
  272,
  279,
  279,
  280,
  280,
  281,
  281,
  282,
  282,
  283,
  283,
  275,
  0,
  273,
  275,
  277,
  284,
  284,
  274,
  286,
  286,
  276,
  281,
  278,
  282,
  285,
  285,
  0,
  282,
  287,
  287,
  0,
  279,
  284,
  280,
  288,
  288,
  0,
  280,
  0,
  283,
  289,
  289,
  0,
  285,
  290,
  290,
  291,
  291,
  286,
  292,
  292,
  287,
  0,
  293,
  293,
  294,
  294,
  295,
  295,
  296,
  296,
  297,
  297,
  298,
  298,
  299,
  299,
  291,
  0,
  288,
  300,
  300,
  294,
  0,
  289,
  301,
  301,
  0,
  290,
  302,
  302,
  305,
  305,
  292,
  293,
  303,
  303,
  299,
  304,
  304,
  297,
  296,
  306,
  306,
  307,
  307,
  301,
  298,
  300,
  308,
  308,
  0,
  303,
  0,
  304,
  0,
  305,
  0,
  302,
  309,
  309,
  307,
  310,
  310,
  312,
  312,
  308,
  313,
  313,
  302,
  316,
  316,
  306,
  0,
  314,
  314,
  315,
  315,
  310,
  317,
  317,
  318,
  318,
  0,
  312,
  319,
  319,
  320,
  320,
  322,
  322,
  309,
  311,
  311,
  0,
  313,
  0,
  315,
  0,
  314,
  0,
  316,
  318,
  320,
  313,
  314,
  0,
  316,
  0,
  311,
  321,
  321,
  0,
  317,
  311,
  311,
  0,
  319,
  318,
  0,
  311,
  311,
  311,
  0,
  311,
  311,
  322,
  323,
  323,
  324,
  324,
  325,
  325,
  326,
  326,
  327,
  327,
  0,
  321,
  328,
  328,
  329,
  329,
  0,
  330,
  330,
  332,
  332,
  336,
  336,
  324,
  0,
  325,
  331,
  331,
  335,
  335,
  327,
  323,
  0,
  328,
  0,
  326,
  330,
  330,
  333,
  333,
  334,
  334,
  331,
  0,
  336,
  337,
  337,
  0,
  329,
  330,
  0,
  332,
  338,
  338,
  339,
  339,
  340,
  340,
  335,
  333,
  0,
  334,
  341,
  341,
  342,
  342,
  343,
  343,
  344,
  344,
  339,
  345,
  345,
  340,
  346,
  346,
  347,
  347,
  349,
  349,
  337,
  350,
  350,
  343,
  0,
  342,
  348,
  348,
  351,
  351,
  0,
  339,
  352,
  352,
  347,
  353,
  353,
  350,
  341,
  346,
  354,
  354,
  344,
  355,
  355,
  0,
  345,
  348,
  352,
  356,
  356,
  0,
  349,
  0,
  357,
  357,
  358,
  358,
  0,
  351,
  0,
  354,
  360,
  360,
  355,
  359,
  359,
  361,
  361,
  362,
  362,
  363,
  363,
  356,
  357,
  364,
  364,
  0,
  365,
  365,
  366,
  366,
  367,
  367,
  368,
  368,
  361,
  369,
  369,
  370,
  370,
  358,
  371,
  371,
  359,
  0,
  360,
  0,
  364,
  365,
  362,
  366,
  0,
  361,
  0,
  368,
  363,
  372,
  372,
  373,
  373,
  370,
  367,
  374,
  374,
  369,
  375,
  375,
  376,
  376,
  377,
  377,
  378,
  378,
  379,
  379,
  380,
  380,
  371,
  381,
  381,
  382,
  382,
  0,
  373,
  383,
  383,
  375,
  374,
  384,
  384,
  372,
  378,
  379,
  373,
  385,
  385,
  0,
  376,
  0,
  382,
  386,
  386,
  387,
  387,
  388,
  388,
  380,
  389,
  389,
  377,
  390,
  390,
  381,
  391,
  391,
  392,
  392,
  393,
  393,
  384,
  388,
  386,
  394,
  394,
  0,
  383,
  387,
  395,
  395,
  396,
  396,
  390,
  397,
  397,
  0,
  385,
  0,
  389,
  398,
  398,
  393,
  391,
  399,
  399,
  400,
  400,
  0,
  392,
  402,
  402,
  401,
  401,
  403,
  403,
  396,
  0,
  394,
  404,
  404,
  406,
  406,
  397,
  395,
  405,
  405,
  407,
  407,
  0,
  398,
  408,
  408,
  409,
  409,
  0,
  410,
  410,
  0,
  399,
  400,
  401,
  411,
  411,
  399,
  0,
  402,
  0,
  407,
  403,
  405,
  412,
  412,
  404,
  413,
  413,
  406,
  414,
  414,
  415,
  415,
  416,
  416,
  418,
  418,
  408,
  410,
  419,
  419,
  409,
  417,
  417,
  0,
  420,
  420,
  412,
  411,
  0,
  421,
  421,
  0,
  415,
  416,
  422,
  422,
  0,
  413,
  423,
  423,
  417,
  0,
  414,
  420,
  424,
  424,
  418,
  421,
  421,
  425,
  425,
  426,
  426,
  0,
  419,
  423,
  431,
  431,
  421,
  427,
  427,
  428,
  428,
  0,
  429,
  429,
  430,
  430,
  421,
  422,
  432,
  432,
  0,
  424,
  0,
  426,
  427,
  433,
  433,
  427,
  0,
  431,
  0,
  430,
  425,
  0,
  427,
  432,
  434,
  434,
  0,
  428,
  429,
  427,
  435,
  435,
  436,
  436,
  0,
  437,
  437,
  438,
  438,
  439,
  439,
  440,
  440,
  0,
  433,
  441,
  441,
  0,
  442,
  442,
  443,
  443,
  436,
  445,
  445,
  434,
  437,
  446,
  446,
  444,
  444,
  447,
  447,
  449,
  449,
  434,
  438,
  435,
  442,
  450,
  450,
  451,
  451,
  0,
  439,
  446,
  0,
  440,
  443,
  441,
  444,
  445,
  452,
  452,
  453,
  453,
  454,
  454,
  0,
  456,
  456,
  0,
  447,
  448,
  448,
  449,
  455,
  455,
  450,
  451,
  0,
  451,
  457,
  457,
  458,
  458,
  0,
  454,
  456,
  0,
  448,
  448,
  448,
  448,
  448,
  459,
  459,
  452,
  455,
  460,
  460,
  0,
  448,
  0,
  453,
  461,
  461,
  0,
  448,
  0,
  457,
  462,
  462,
  463,
  463,
  458,
  464,
  464,
  465,
  465,
  459,
  466,
  466,
  0,
  461,
  0,
  467,
  467,
  461,
  469,
  469,
  470,
  470,
  460,
  0,
  463,
  462,
  471,
  471,
  472,
  472,
  473,
  473,
  474,
  474,
  475,
  475,
  476,
  476,
  462,
  464,
  467,
  0,
  465,
  0,
  466,
  468,
  468,
  0,
  470,
  484,
  484,
  477,
  477,
  0,
  469,
  493,
  493,
  474,
  0,
  473,
  471,
  0,
  472,
  468,
  468,
  0,
  476,
  468,
  477,
  0,
  475,
  478,
  478,
  0,
  468,
  479,
  479,
  468,
  480,
  480,
  468,
  468,
  468,
  481,
  481,
  482,
  482,
  483,
  483,
  0,
  478,
  0,
  479,
  485,
  485,
  486,
  486,
  0,
  480,
  480,
  480,
  480,
  482,
  0,
  487,
  487,
  488,
  488,
  481,
  0,
  480,
  490,
  490,
  480,
  489,
  489,
  486,
  483,
  491,
  491,
  492,
  492,
  494,
  494,
  485,
  487,
  495,
  495,
  490,
  0,
  496,
  496,
  497,
  497,
  0,
  491,
  498,
  498,
  488,
  499,
  499,
  489,
  494,
  500,
  500,
  0,
  495,
  496,
  501,
  501,
  502,
  502,
  0,
  503,
  503,
  492,
  504,
  504,
  0,
  492,
  505,
  505,
  0,
  497,
  0,
  500,
  498,
  506,
  506,
  0,
  499,
  507,
  507,
  508,
  508,
  0,
  509,
  509,
  0,
  502,
  0,
  504,
  501,
  503,
  510,
  510,
  506,
  511,
  511,
  510,
  512,
  512,
  508,
  0,
  507,
  509,
  513,
  513,
  514,
  514,
  516,
  516,
  505,
  0,
  511,
  515,
  515,
  517,
  517,
  518,
  518,
  520,
  520,
  519,
  519,
  0,
  521,
  521,
  0,
  512,
  522,
  522,
  0,
  513,
  523,
  523,
  517,
  524,
  524,
  525,
  525,
  0,
  519,
  519,
  514,
  0,
  516,
  526,
  526,
  515,
  518,
  519,
  520,
  527,
  527,
  519,
  521,
  528,
  528,
  0,
  519,
  522,
  529,
  529,
  530,
  530,
  533,
  533,
  525,
  0,
  523,
  0,
  526,
  531,
  531,
  532,
  532,
  534,
  534,
  535,
  535,
  537,
  537,
  536,
  536,
  529,
  538,
  538,
  0,
  528,
  539,
  539,
  531,
  540,
  540,
  527,
  541,
  541,
  534,
  530,
  536,
  0,
  542,
  542,
  532,
  543,
  543,
  544,
  544,
  545,
  545,
  0,
  537,
  541,
  0,
  535,
  0,
  546,
  546,
  539,
  547,
  547,
  538,
  542,
  544,
  0,
  543,
  548,
  548,
  549,
  549,
  550,
  550,
  551,
  551,
  552,
  552,
  545,
  546,
  554,
  554,
  553,
  553,
  555,
  555,
  0,
  548,
  556,
  556,
  560,
  560,
  0,
  557,
  557,
  0,
  558,
  558,
  547,
  559,
  559,
  0,
  561,
  561,
  562,
  562,
  0,
  549,
  554,
  555,
  557,
  551,
  552,
  553,
  558,
  563,
  563,
  564,
  564,
  0,
  559,
  0,
  556,
  561,
  0,
  560,
  565,
  565,
  566,
  566,
  567,
  567,
  562,
  568,
  568,
  569,
  569,
  570,
  570,
  0,
  563,
  0,
  564,
  571,
  571,
  573,
  573,
  567,
  0,
  565,
  572,
  572,
  0,
  566,
  0,
  574,
  574,
  575,
  575,
  576,
  576,
  577,
  577,
  579,
  579,
  569,
  578,
  578,
  580,
  580,
  568,
  0,
  574,
  571,
  0,
  572,
  0,
  570,
  0,
  573,
  574,
  581,
  581,
  578,
  582,
  582,
  583,
  583,
  0,
  576,
  584,
  584,
  575,
  577,
  0,
  579,
  585,
  585,
  586,
  586,
  580,
  587,
  587,
  588,
  588,
  589,
  589,
  0,
  590,
  590,
  0,
  584,
  591,
  591,
  0,
  583,
  593,
  593,
  581,
  0,
  582,
  587,
  592,
  592,
  594,
  594,
  595,
  595,
  0,
  587,
  596,
  596,
  585,
  586,
  588,
  0,
  589,
  590,
  0,
  592,
  591,
  597,
  597,
  598,
  598,
  599,
  599,
  592,
  594,
  0,
  593,
  600,
  600,
  601,
  601,
  602,
  602,
  0,
  595,
  603,
  603,
  596,
  604,
  604,
  599,
  605,
  605,
  606,
  606,
  0,
  607,
  607,
  610,
  610,
  608,
  608,
  597,
  609,
  609,
  603,
  598,
  599,
  0,
  611,
  611,
  600,
  612,
  612,
  0,
  610,
  601,
  0,
  602,
  613,
  613,
  614,
  614,
  0,
  606,
  604,
  605,
  607,
  608,
  615,
  615,
  616,
  616,
  609,
  611,
  617,
  617,
  0,
  614,
  618,
  618,
  619,
  619,
  620,
  620,
  621,
  621,
  612,
  622,
  622,
  623,
  623,
  624,
  624,
  0,
  613,
  625,
  625,
  619,
  0,
  615,
  0,
  616,
  626,
  626,
  0,
  617,
  618,
  0,
  622,
  627,
  627,
  0,
  624,
  620,
  623,
  628,
  628,
  629,
  629,
  0,
  621,
  622,
  630,
  630,
  631,
  631,
  0,
  626,
  632,
  632,
  0,
  625,
  633,
  633,
  0,
  629,
  628,
  634,
  634,
  630,
  0,
  627,
  635,
  635,
  0,
  631,
  636,
  636,
  637,
  637,
  638,
  638,
  639,
  639,
  641,
  641,
  632,
  640,
  640,
  642,
  642,
  643,
  643,
  646,
  646,
  644,
  644,
  635,
  633,
  645,
  645,
  638,
  0,
  634,
  647,
  647,
  636,
  648,
  648,
  637,
  649,
  649,
  0,
  639,
  641,
  644,
  639,
  650,
  650,
  640,
  651,
  651,
  652,
  652,
  0,
  642,
  0,
  643,
  653,
  653,
  654,
  654,
  0,
  645,
  655,
  655,
  656,
  656,
  649,
  657,
  657,
  0,
  650,
  658,
  658,
  659,
  659,
  660,
  660,
  653,
  661,
  661,
  654,
  662,
  662,
  651,
  663,
  663,
  0,
  657,
  664,
  664,
  0,
  655,
  660,
  665,
  665,
  661,
  667,
  667,
  656,
  0,
  666,
  666,
  668,
  668,
  0,
  658,
  669,
  669,
  0,
  664,
  659,
  670,
  670,
  0,
  671,
  671,
  0,
  662,
  672,
  672,
  663,
  666,
  673,
  673,
  674,
  674,
  0,
  667,
  677,
  677,
  665,
  675,
  675,
  668,
  671,
  0,
  669,
  676,
  676,
  672,
  678,
  678,
  676,
  673,
  679,
  679,
  671,
  670,
  0,
  671,
  0,
  671,
  675,
  680,
  680,
  681,
  681,
  682,
  682,
  0,
  674,
  0,
  677,
  683,
  683,
  679,
  684,
  684,
  685,
  685,
  686,
  686,
  681,
  0,
  678,
  687,
  687,
  688,
  688,
  689,
  689,
  690,
  690,
  0,
  680,
  0,
  684,
  691,
  691,
  692,
  692,
  0,
  687,
  0,
  686,
  682,
  0,
  683,
  693,
  693,
  689,
  0,
  685,
  694,
  694,
  695,
  695,
  0,
  691,
  690,
  0,
  692,
  0,
  688,
  696,
  696,
  697,
  697,
  698,
  698,
  699,
  699,
  700,
  700,
  0,
  695,
  701,
  701,
  0,
  693,
  0,
  696,
  702,
  702,
  703,
  703,
  0,
  699,
  0,
  704,
  704,
  705,
  705,
  700,
  0,
  697,
  706,
  706,
  698,
  707,
  707,
  708,
  708,
  709,
  709,
  710,
  710,
  711,
  711,
  0,
  701,
  702,
  705,
  712,
  712,
  713,
  713,
  714,
  714,
  715,
  715,
  0,
  703,
  704,
  716,
  716,
  706,
  717,
  717,
  718,
  718,
  709,
  713,
  0,
  707,
  0,
  715,
  708,
  711,
  710,
  719,
  719,
  716,
  720,
  720,
  723,
  723,
  712,
  721,
  721,
  0,
  714,
  722,
  722,
  0,
  717,
  724,
  724,
  725,
  725,
  726,
  726,
  0,
  718,
  727,
  727,
  0,
  728,
  728,
  729,
  729,
  730,
  730,
  723,
  724,
  0,
  719,
  720,
  731,
  731,
  721,
  732,
  732,
  733,
  733,
  734,
  734,
  722,
  728,
  736,
  736,
  0,
  730,
  725,
  735,
  735,
  726,
  0,
  732,
  727,
  737,
  737,
  738,
  738,
  739,
  739,
  740,
  740,
  731,
  736,
  0,
  741,
  741,
  743,
  743,
  734,
  742,
  742,
  733,
  735,
  738,
  737,
  0,
  735,
  744,
  744,
  745,
  745,
  746,
  746,
  747,
  747,
  748,
  748,
  749,
  749,
  751,
  751,
  739,
  741,
  0,
  742,
  0,
  744,
  743,
  750,
  750,
  753,
  753,
  746,
  747,
  752,
  752,
  751,
  754,
  754,
  755,
  755,
  756,
  756,
  745,
  757,
  757,
  0,
  748,
  758,
  758,
  0,
  749,
  0,
  753,
  0,
  752,
  750,
  0,
  756,
  759,
  759,
  0,
  755,
  760,
  760,
  757,
  0,
  754,
  0,
  754,
  753,
  761,
  761,
  762,
  762,
  763,
  763,
  764,
  764,
  0,
  765,
  765,
  758,
  766,
  766,
  0,
  767,
  767,
  768,
  768,
  0,
  760,
  763,
  769,
  769,
  759,
  770,
  770,
  771,
  771,
  772,
  772,
  761,
  773,
  773,
  768,
  0,
  762,
  765,
  0,
  762,
  0,
  764,
  774,
  774,
  766,
  767,
  0,
  766,
  769,
  772,
  775,
  775,
  776,
  776,
  0,
  770,
  777,
  777,
  771,
  0,
  773,
  778,
  778,
  779,
  779,
  780,
  780,
  781,
  781,
  776,
  782,
  782,
  774,
  784,
  784,
  775,
  783,
  783,
  785,
  785,
  786,
  786,
  787,
  787,
  0,
  777,
  788,
  788,
  789,
  789,
  0,
  778,
  0,
  780,
  779,
  790,
  790,
  786,
  781,
  791,
  791,
  783,
  792,
  792,
  0,
  789,
  782,
  784,
  793,
  793,
  794,
  794,
  787,
  795,
  795,
  0,
  791,
  0,
  785,
  796,
  796,
  788,
  797,
  797,
  798,
  798,
  799,
  799,
  800,
  800,
  801,
  801,
  0,
  795,
  0,
  790,
  0,
  802,
  802,
  0,
  794,
  804,
  804,
  803,
  803,
  793,
  805,
  805,
  806,
  806,
  807,
  807,
  0,
  801,
  0,
  798,
  808,
  808,
  809,
  809,
  799,
  810,
  810,
  811,
  811,
  0,
  800,
  802,
  803,
  812,
  812,
  0,
  804,
  808,
  809,
  813,
  813,
  805,
  814,
  814,
  815,
  815,
  816,
  816,
  806,
  0,
  807,
  817,
  817,
  818,
  818,
  819,
  819,
  821,
  821,
  819,
  0,
  812,
  820,
  820,
  814,
  822,
  822,
  823,
  823,
  824,
  824,
  825,
  825,
  826,
  826,
  827,
  827,
  821,
  818,
  0,
  817,
  815,
  828,
  828,
  829,
  829,
  830,
  830,
  0,
  832,
  832,
  0,
  818,
  822,
  824,
  834,
  834,
  820,
  833,
  833,
  0,
  826,
  823,
  831,
  831,
  827,
  831,
  831,
  831,
  831,
  832,
  0,
  829,
  828,
  0,
  833,
  835,
  835,
  0,
  834,
  836,
  836,
  837,
  837,
  0,
  837,
  837,
  837,
  837,
  840,
  840,
  0,
  838,
  838,
  835,
  838,
  838,
  838,
  838,
  0,
  836,
  839,
  839,
  841,
  841,
  842,
  842,
  839,
  843,
  843,
  0,
  835,
  844,
  844,
  845,
  845,
  846,
  846,
  847,
  847,
  839,
  848,
  848,
  849,
  849,
  850,
  850,
  851,
  851,
  0,
  843,
  852,
  852,
  853,
  853,
  0,
  842,
  854,
  854,
  841,
  855,
  855,
  0,
  844,
  856,
  856,
  848,
  847,
  845,
  857,
  857,
  858,
  858,
  859,
  859,
  851,
  852,
  0,
  854,
  0,
  848,
  856,
  860,
  860,
  861,
  861,
  862,
  862,
  863,
  863,
  855,
  864,
  864,
  865,
  865,
  866,
  866,
  0,
  867,
  867,
  857,
  868,
  868,
  859,
  869,
  869,
  0,
  870,
  870,
  0,
  865,
  0,
  871,
  871,
  864,
  872,
  872,
  0,
  863,
  867,
  874,
  874,
  862,
  873,
  873,
  875,
  875,
  866,
  870,
  0,
  868,
  0,
  872,
  876,
  876,
  877,
  877,
  0,
  878,
  878,
  869,
  871,
  880,
  880,
  873,
  875,
  879,
  879,
  881,
  881,
  0,
  882,
  882,
  0,
  874,
  883,
  883,
  884,
  884,
  0,
  885,
  885,
  876,
  880,
  0,
  881,
  886,
  886,
  0,
  877,
  878,
  887,
  887,
  0,
  879,
  882,
  883,
  885,
  888,
  888,
  0,
  884,
  889,
  889,
  890,
  890,
  891,
  891,
  887,
  892,
  892,
  893,
  893,
  0,
  886,
  894,
  894,
  895,
  895,
  896,
  896,
  889,
  0,
  891,
  0,
  897,
  897,
  898,
  898,
  888,
  0,
  899,
  899,
  900,
  900,
  0,
  901,
  901,
  896,
  890,
  902,
  902,
  903,
  903,
  894,
  904,
  904,
  893,
  897,
  0,
  899,
  899,
  895,
  899,
  905,
  905,
  906,
  906,
  898,
  903,
  0,
  907,
  907,
  900,
  901,
  908,
  908,
  899,
  909,
  909,
  0,
  902,
  910,
  910,
  905,
  911,
  911,
  904,
  907,
  912,
  912,
  913,
  913,
  914,
  914,
  915,
  915,
  916,
  916,
  917,
  917,
  0,
  906,
  918,
  918,
  911,
  910,
  920,
  920,
  919,
  919,
  0,
  909,
  0,
  916,
  921,
  921,
  915,
  922,
  922,
  912,
  917,
  914,
  913,
  920,
  918,
  916,
  919,
  0,
  923,
  923,
  0,
  918,
  924,
  924,
  922,
  925,
  925,
  920,
  926,
  926,
  927,
  927,
  928,
  928,
  921,
  923,
  929,
  929,
  922,
  932,
  932,
  0,
  930,
  930,
  0,
  926,
  933,
  933,
  931,
  931,
  934,
  934,
  935,
  935,
  936,
  936,
  925,
  929,
  924,
  930,
  937,
  937,
  938,
  938,
  927,
  931,
  0,
  928,
  934,
  931,
  0,
  932,
  0,
  935,
  939,
  939,
  940,
  940,
  937,
  941,
  941,
  0,
  933,
  938,
  942,
  942,
  943,
  943,
  0,
  936,
  944,
  944,
  945,
  945,
  946,
  946,
  0,
  940,
  947,
  947,
  948,
  948,
  949,
  949,
  950,
  950,
  951,
  951,
  952,
  952,
  941,
  939,
  953,
  953,
  942,
  947,
  954,
  954,
  956,
  956,
  945,
  955,
  955,
  956,
  956,
  946,
  957,
  957,
  0,
  950,
  958,
  958,
  949,
  0,
  948,
  959,
  959,
  0,
  952,
  960,
  960,
  0,
  951,
  961,
  961,
  0,
  962,
  962,
  953,
  963,
  963,
  955,
  964,
  964,
  965,
  965,
  966,
  966,
  967,
  967,
  957,
  968,
  968,
  969,
  969,
  0,
  958,
  962,
  970,
  970,
  0,
  959,
  971,
  971,
  963,
  965,
  0,
  961,
  973,
  973,
  0,
  964,
  972,
  972,
  967,
  0,
  966,
  974,
  974,
  975,
  975,
  0,
  976,
  976,
  977,
  977,
  0,
  968,
  0,
  972,
  978,
  978,
  970,
  979,
  979,
  980,
  980,
  0,
  971,
  976,
  0,
  972,
  972,
  981,
  981,
  0,
  982,
  982,
  0,
  975,
  982,
  978,
  983,
  983,
  977,
  0,
  980,
  984,
  984,
  0,
  981,
  985,
  985,
  986,
  986,
  0,
  987,
  987,
  989,
  989,
  988,
  988,
  990,
  990,
  991,
  991,
  989,
  983,
  985,
  992,
  992,
  995,
  995,
  993,
  993,
  994,
  994,
  0,
  984,
  996,
  996,
  997,
  997,
  998,
  998,
  0,
  990,
  0,
  998,
  986,
  987,
  988,
  993,
  0,
  994,
  999,
  999,
  1000,
  1000,
  1001,
  1001,
  0,
  995,
  1002,
  1002,
  997,
  1003,
  1003,
  1004,
  1004,
  1005,
  1005,
  1006,
  1006,
  1007,
  1007,
  1008,
  1008,
  1009,
  1009,
  996,
  0,
  1009,
  0,
  1009,
  1010,
  1010,
  0,
  1011,
  1011,
  1012,
  1012,
  1013,
  1013,
  1014,
  1014,
  1003,
  0,
  1004,
  0,
  1005,
  0,
  1006,
  0,
  1007,
  1011,
  0,
  1008,
  1015,
  1015,
  0,
  1014,
  1016,
  1016,
  1017,
  1017,
  0,
  1012,
  1018,
  1018,
  1010,
  1019,
  1019,
  1020,
  1020,
  1021,
  1021,
  0,
  1013,
  1022,
  1022,
  1023,
  1023,
  1016,
  1024,
  1024,
  1025,
  1025,
  1015,
  1026,
  1026,
  1027,
  1027,
  0,
  1021,
  1028,
  1028,
  1029,
  1029,
  1018,
  1030,
  1030,
  1031,
  1031,
  0,
  1024,
  1032,
  1032,
  0,
  1020,
  1026,
  1033,
  1033,
  1022,
  1034,
  1034,
  0,
  1023,
  1035,
  1035,
  0,
  1030,
  1025,
  1036,
  1036,
  1037,
  1037,
  1027,
  1033,
  1029,
  1038,
  1038,
  1039,
  1039,
  1040,
  1040,
  1041,
  1041,
  1042,
  1042,
  1043,
  1043,
  1044,
  1044,
  1045,
  1045,
  1037,
  0,
  1034,
  1046,
  1046,
  1047,
  1047,
  1048,
  1048,
  1049,
  1049,
  1041,
  1050,
  1050,
  1051,
  1051,
  1038,
  1039,
  1052,
  1052,
  1046,
  1053,
  1053,
  1047,
  1054,
  1054,
  0,
  1045,
  0,
  1043,
  1044,
  1055,
  1055,
  1056,
  1056,
  1057,
  1057,
  1058,
  1058,
  1059,
  1059,
  1060,
  1060,
  1052,
  1061,
  1061,
  1062,
  1062,
  1050,
  1064,
  1064,
  1051,
  1063,
  1063,
  0,
  1053,
  1055,
  0,
  1056,
  1065,
  1065,
  1066,
  1066,
  1062,
  1067,
  1067,
  0,
  1058,
  0,
  1061,
  1059,
  0,
  1057,
  1063,
  1068,
  1068,
  1069,
  1069,
  1060,
  0,
  1065,
  1066,
  1070,
  1070,
  1071,
  1071,
  0,
  1064,
  1072,
  1072,
  1073,
  1073,
  0,
  1074,
  1074,
  1075,
  1075,
  1076,
  1076,
  1070,
  1067,
  0,
  1068,
  1071,
  1077,
  1077,
  0,
  1073,
  0,
  1072,
  1078,
  1078,
  0,
  1069,
  1074,
  1079,
  1079,
  1080,
  1080,
  1081,
  1081,
  1082,
  1082,
  1083,
  1083,
  1077,
  1084,
  1084,
  1076,
  1075,
  1085,
  1085,
  0,
  1086,
  1086,
  1078,
  1087,
  1087,
  1088,
  1088,
  1083,
  0,
  1080,
  0,
  1081,
  1079,
  1082,
  1089,
  1089,
  0,
  1090,
  1090,
  1091,
  1091,
  1092,
  1092,
  1093,
  1093,
  1095,
  1095,
  1094,
  1094,
  1084,
  0,
  1085,
  1086,
  1096,
  1096,
  0,
  1091,
  1097,
  1097,
  1088,
  0,
  1087,
  1098,
  1098,
  1099,
  1099,
  1089,
  1090,
  1094,
  1100,
  1100,
  0,
  1096,
  1093,
  0,
  1092,
  0,
  1095,
  1101,
  1101,
  0,
  1101,
  1101,
  1101,
  1101,
  1102,
  1102,
  1103,
  1103,
  1104,
  1104,
  1097,
  0,
  1100,
  1105,
  1105,
  1098,
  0,
  1099,
  1106,
  1106,
  1107,
  1107,
  1108,
  1108,
  0,
  1103,
  1109,
  1109,
  1110,
  1110,
  1105,
  0,
  1102,
  1111,
  1111,
  1112,
  1112,
  1113,
  1113,
  1115,
  1115,
  1107,
  1108,
  0,
  1104,
  1114,
  1114,
  1116,
  1116,
  1117,
  1117,
  0,
  1118,
  1118,
  1119,
  1119,
  1109,
  0,
  1106,
  1120,
  1120,
  1121,
  1121,
  0,
  1110,
  1122,
  1122,
  1123,
  1123,
  1112,
  1114,
  1124,
  1124,
  1113,
  0,
  1115,
  0,
  1116,
  1125,
  1125,
  1126,
  1126,
  1120,
  1127,
  1127,
  0,
  1117,
  1118,
  1128,
  1128,
  1129,
  1129,
  1124,
  1130,
  1130,
  1131,
  1131,
  1132,
  1132,
  0,
  1133,
  1133,
  1127,
  1123,
  1134,
  1134,
  0,
  1129,
  1135,
  1135,
  1136,
  1136,
  0,
  1137,
  1137,
  0,
  1138,
  1138,
  1132,
  1139,
  1139,
  0,
  1128,
  1140,
  1140,
  1141,
  1141,
  1130,
  1133,
  1134,
  1137,
  1131,
  0,
  1135,
  1142,
  1142,
  1143,
  1143,
  1139,
  1144,
  1144,
  1138,
  1145,
  1145,
  0,
  1141,
  1136,
  1138,
  1146,
  1146,
  0,
  1140,
  1147,
  1147,
  1148,
  1148,
  1149,
  1149,
  0,
  1142,
  1150,
  1150,
  1151,
  1151,
  0,
  1152,
  1152,
  1153,
  1153,
  1154,
  1154,
  1155,
  1155,
  0,
  1154,
  1144,
  1156,
  1156,
  1157,
  1157,
  1150,
  1152,
  1147,
  0,
  1158,
  1158,
  1159,
  1159,
  1148,
  0,
  1146,
  1160,
  1160,
  1161,
  1161,
  0,
  1151,
  0,
  1155,
  1162,
  1162,
  1163,
  1163,
  1164,
  1164,
  1165,
  1165,
  1166,
  1166,
  0,
  1156,
  1167,
  1167,
  0,
  1157,
  1158,
  1159,
  1168,
  1168,
  1169,
  1169,
  1170,
  1170,
  1171,
  1171,
  1172,
  1172,
  1173,
  1173,
  1174,
  1174,
  1175,
  1175,
  1165,
  1176,
  1176,
  0,
  1166,
  1177,
  1177,
  0,
  1167,
  1178,
  1178,
  1179,
  1179,
  0,
  1173,
  1171,
  1180,
  1180,
  0,
  1168,
  1172,
  1174,
  0,
  1169,
  0,
  1170,
  1181,
  1181,
  1175,
  1178,
  1182,
  1182,
  0,
  1183,
  1183,
  1184,
  1184,
  0,
  1185,
  1185,
  1179,
  1177,
  1186,
  1186,
  1187,
  1187,
  1188,
  1188,
  1189,
  1189,
  0,
  1180,
  1190,
  1190,
  1191,
  1191,
  1192,
  1192,
  1193,
  1193,
  0,
  1181,
  0,
  1184,
  1194,
  1194,
  1182,
  1183,
  1185,
  1195,
  1195,
  1196,
  1196,
  1197,
  1197,
  1198,
  1198,
  1186,
  1200,
  1200,
  1188,
  1194,
  1201,
  1201,
  1189,
  0,
  1190,
  0,
  1192,
  1199,
  1199,
  1202,
  1202,
  1198,
  0,
  1193,
  1203,
  1203,
  0,
  1196,
  1204,
  1204,
  1201,
  1205,
  1205,
  0,
  1199,
  1197,
  1202,
  1206,
  1206,
  1207,
  1207,
  1208,
  1208,
  1209,
  1209,
  1210,
  1210,
  1211,
  1211,
  1204,
  1212,
  1212,
  1213,
  1213,
  1203,
  1214,
  1214,
  1215,
  1215,
  0,
  1208,
  1207,
  0,
  1216,
  1216,
  1217,
  1217,
  1205,
  1218,
  1218,
  0,
  1206,
  0,
  1213,
  1210,
  1219,
  1219,
  1220,
  1220,
  1221,
  1221,
  1224,
  1224,
  1209,
  0,
  1215,
  0,
  1212,
  1222,
  1222,
  1223,
  1223,
  1225,
  1225,
  1226,
  1226,
  1214,
  1216,
  0,
  1227,
  1227,
  1217,
  1219,
  1218,
  1228,
  1228,
  1221,
  1229,
  1229,
  1224,
  1222,
  1220,
  1230,
  1230,
  1221,
  1231,
  1231,
  1225,
  1232,
  1232,
  1223,
  1233,
  1233,
  1234,
  1234,
  0,
  1226,
  1227,
  1235,
  1235,
  1236,
  1236,
  1228,
  1230,
  1237,
  1237,
  1238,
  1238,
  1231,
  1229,
  1239,
  1239,
  1240,
  1240,
  1242,
  1242,
  1234,
  1241,
  1241,
  1233,
  1233,
  1243,
  1243,
  1245,
  1245,
  0,
  1238,
  1244,
  1244,
  1246,
  1246,
  1247,
  1247,
  1248,
  1248,
  0,
  1236,
  0,
  1237,
  0,
  1243,
  1241,
  1249,
  1249,
  1244,
  1239,
  1250,
  1250,
  1240,
  0,
  1246,
  1242,
  1251,
  1251,
  1252,
  1252,
  1254,
  1254,
  1245,
  1253,
  1253,
  1255,
  1255,
  1256,
  1256,
  1257,
  1257,
  1258,
  1258,
  1259,
  1259,
  1260,
  1260,
  1251,
  1261,
  1261,
  1253,
  1262,
  1262,
  1264,
  1264,
  0,
  1263,
  1263,
  1254,
  1257,
  1263,
  1263,
  1263,
  0,
  1252,
  1265,
  1265,
  1266,
  1266,
  1267,
  1267,
  0,
  1259,
  1268,
  1268,
  0,
  1264,
  1269,
  1269,
  1270,
  1270,
  1271,
  1271,
  0,
  1272,
  1272,
  1273,
  1273,
  0,
  1266,
  1267,
  1262,
  1274,
  1274,
  1275,
  1275,
  1276,
  1276,
  1268,
  1265,
  1277,
  1277,
  0,
  1273,
  1278,
  1278,
  1279,
  1279,
  1280,
  1280,
  1281,
  1281,
  1271,
  1275,
  0,
  1270,
  1272,
  0,
  1277,
  0,
  1274,
  1276,
  1282,
  1282,
  1283,
  1283,
  1284,
  1284,
  1285,
  1285,
  0,
  1279,
  1286,
  1286,
  0,
  1278,
  0,
  1287,
  1287,
  0,
  1288,
  1288,
  1289,
  1289,
  1290,
  1290,
  1289,
  0,
  1280,
  1292,
  1292,
  0,
  1282,
  1285,
  1287,
  1286,
  1294,
  1294,
  1295,
  1295,
  1283,
  1288,
  1291,
  1291,
  1291,
  1291,
  1291,
  1291,
  1291,
  1291,
  1291,
  1291,
  1293,
  1293,
  1296,
  1296,
  1293,
  0,
  1293,
  1295,
  1297,
  1297,
  1298,
  1298,
  1299,
  1299,
  1300,
  1300,
  1301,
  1301,
  1302,
  1302,
  1303,
  1303,
  1304,
  1304,
  1305,
  1305,
  1306,
  1306,
  0,
  1297,
  1307,
  1307,
  0,
  1308,
  1308,
  0,
  1309,
  1309,
  1296,
  1310,
  1310,
  1311,
  1311,
  1306,
  1298,
  1300,
  1312,
  1312,
  1313,
  1313,
  1304,
  1314,
  1314,
  1315,
  1315,
  0,
  1305,
  1303,
  1308,
  1309,
  1316,
  1316,
  1317,
  1317,
  0,
  1313,
  1318,
  1318,
  1319,
  1319,
  1320,
  1320,
  1311,
  1321,
  1321,
  1310,
  1322,
  1322,
  1323,
  1323,
  0,
  1324,
  1324,
  1325,
  1325,
  1326,
  1326,
  1317,
  0,
  1327,
  1327,
  1318,
  1328,
  1328,
  1329,
  1329,
  0,
  1320,
  1324,
  1330,
  1330,
  1331,
  1331,
  0,
  1319,
  1332,
  1332,
  1322,
  0,
  1323,
  1327,
  1333,
  1333,
  1334,
  1334,
  1335,
  1335,
  1326,
  1331,
  1329,
  1336,
  1336,
  0,
  1328,
  1337,
  1337,
  1338,
  1338,
  0,
  1330,
  1339,
  1339,
  0,
  1334,
  0,
  1332,
  1340,
  1340,
  0,
  1335,
  1341,
  1341,
  1345,
  1345,
  1342,
  1342,
  1337,
  0,
  1342,
  0,
  1342,
  1333,
  0,
  1340,
  1336,
  1343,
  1343,
  1344,
  1344,
  1341,
  0,
  1342,
  1338,
  1342,
  0,
  1345,
  1339,
  1346,
  1346,
  1342,
  1347,
  1347,
  1343,
  0,
  1344,
  1348,
  1348,
  1349,
  1349,
  0,
  1350,
  1350,
  1351,
  1351,
  1352,
  1352,
  1353,
  1353,
  1354,
  1354,
  1355,
  1355,
  1356,
  1356,
  1357,
  1357,
  1349,
  1358,
  1358,
  0,
  1348,
  1350,
  0,
  1359,
  1359,
  1347,
  1352,
  1351,
  1360,
  1360,
  1361,
  1361,
  1361,
  1361,
  1361,
  1362,
  1362,
  1363,
  1363,
  0,
  1356,
  0,
  1353,
  0,
  1354,
  1355,
  1365,
  1365,
  1366,
  1366,
  1357,
  1359,
  0,
  1358,
  1363,
  1364,
  1364,
  1364,
  1364,
  1364,
  1367,
  1367,
  1368,
  1368,
  1369,
  1369,
  1362,
  0,
  1360,
  0,
  1362,
  1366,
  1370,
  1370,
  1371,
  1371,
  1372,
  1372,
  1373,
  1373,
  1374,
  1374,
  1375,
  1375,
  1368,
  1367,
  1376,
  1376,
  1377,
  1377,
  0,
  1368,
  1371,
  1370,
  1378,
  1378,
  1379,
  1379,
  1369,
  0,
  1380,
  1380,
  1381,
  1381,
  1383,
  1383,
  1373,
  1384,
  1384,
  1377,
  1382,
  1382,
  1374,
  1372,
  0,
  1382,
  1375,
  1380,
  0,
  1381,
  1385,
  1385,
  1386,
  1386,
  1378,
  1387,
  1387,
  1388,
  1388,
  1389,
  1389,
  1390,
  1390,
  1392,
  1392,
  1391,
  1391,
  1393,
  1393,
  0,
  1394,
  1394,
  1396,
  1396,
  1395,
  1395,
  1387,
  1397,
  1397,
  1398,
  1398,
  1399,
  1399,
  1400,
  1400,
  1401,
  1401,
  0,
  1388,
  1389,
  1391,
  1402,
  1402,
  1392,
  1403,
  1403,
  0,
  1390,
  1394,
  1395,
  1397,
  1404,
  1404,
  1405,
  1405,
  1406,
  1406,
  0,
  1396,
  1407,
  1407,
  1399,
  1402,
  1408,
  1408,
  0,
  1398,
  1409,
  1409,
  1403,
  1404,
  1410,
  1410,
  1411,
  1411,
  1412,
  1412,
  1405,
  1413,
  1413,
  1414,
  1414,
  1415,
  1415,
  1416,
  1416,
  1417,
  1417,
  1418,
  1418,
  1419,
  1419,
  1420,
  1420,
  0,
  1420,
  1420,
  1420,
  1420,
  1421,
  1421,
  1422,
  1422,
  1424,
  1424,
  1421,
  1423,
  1423,
  1425,
  1425,
  1419,
  1426,
  1426,
  0,
  1427,
  1427,
  1428,
  1428,
  1430,
  1430,
  0,
  1429,
  1429,
  1431,
  1431,
  0,
  1432,
  1432,
  1433,
  1433,
  1434,
  1434,
  1435,
  1435,
  0,
  1428,
  0,
  1422,
  1436,
  1436,
  1423,
  1424,
  1427,
  1426,
  1425,
  1429,
  1437,
  1437,
  0,
  1434,
  1438,
  1438,
  1439,
  1439,
  1440,
  1440,
  0,
  1431,
  1432,
  1441,
  1441,
  1442,
  1442,
  1443,
  1443,
  1444,
  1444,
  1437,
  1433,
  1445,
  1445,
  1439,
  1446,
  1446,
  1447,
  1447,
  0,
  1448,
  1448,
  0,
  1438,
  1448,
  1443,
  0,
  1444,
  1449,
  1449,
  1450,
  1450,
  1451,
  1451,
  1452,
  1452,
  1442,
  1453,
  1453,
  0,
  1445,
  1454,
  1454,
  1455,
  1455,
  1456,
  1456,
  0,
  1446,
  1457,
  1457,
  1450,
  1458,
  1458,
  0,
  1459,
  1459,
  1460,
  1460,
  1462,
  1462,
  1461,
  1461,
  1463,
  1463,
  1452,
  1463,
  1463,
  0,
  1451,
  1464,
  1464,
  0,
  1454,
  1453,
  1465,
  1465,
  1467,
  1467,
  1455,
  1458,
  1461,
  1466,
  1466,
  0,
  1456,
  1459,
  1460,
  0,
  1457,
  0,
  1468,
  1468,
  1469,
  1469,
  1462,
  1470,
  1470,
  1471,
  1471,
  1472,
  1472,
  0,
  1465,
  1473,
  1473,
  0,
  1464,
  1464,
  1464,
  0,
  1474,
  1474,
  1466,
  1468,
  1475,
  1475,
  0,
  1467,
  1471,
  0,
  1470,
  1476,
  1476,
  0,
  1473,
  1477,
  1477,
  1469,
  1478,
  1478,
  1472,
  1474,
  1479,
  1479,
  0,
  1475,
  1480,
  1480,
  1481,
  1481,
  1482,
  1482,
  1483,
  1483,
  1484,
  1484,
  1485,
  1485,
  1486,
  1486,
  1487,
  1487,
  1476,
  1488,
  1488,
  0,
  1489,
  1489,
  0,
  1482,
  1481,
  1477,
  1490,
  1490,
  1491,
  1491,
  1492,
  1492,
  1493,
  1493,
  1494,
  1494,
  0,
  1495,
  1495,
  1496,
  1496,
  0,
  1483,
  1490,
  0,
  1491,
  0,
  1488,
  1489,
  1497,
  1497,
  0,
  1494,
  1493,
  1498,
  1498,
  1499,
  1499,
  1500,
  1500,
  1496,
  1501,
  1501,
  0,
  1492,
  1495,
  1502,
  1502,
  1503,
  1503,
  1497,
  1504,
  1504,
  0,
  1498,
  1505,
  1505,
  1506,
  1506,
  1507,
  1507,
  1509,
  1509,
  1508,
  1508,
  1510,
  1510,
  1513,
  1513,
  1512,
  1512,
  0,
  1499,
  1501,
  1500,
  1511,
  1511,
  1514,
  1514,
  1515,
  1515,
  0,
  1506,
  1516,
  1516,
  1504,
  1517,
  1517,
  1510,
  1509,
  1507,
  1505,
  1508,
  1512,
  1518,
  1518,
  1511,
  1519,
  1519,
  1520,
  1520,
  0,
  1519,
  1513,
  1521,
  1521,
  0,
  1517,
  1522,
  1522,
  1523,
  1523,
  1524,
  1524,
  1516,
  1525,
  1525,
  1526,
  1526,
  1525,
  0,
  1525,
  1527,
  1527,
  1528,
  1528,
  1529,
  1529,
  1530,
  1530,
  1518,
  1531,
  1531,
  1532,
  1532,
  1533,
  1533,
  1534,
  1534,
  1535,
  1535,
  1536,
  1536,
  0,
  1535,
  1535,
  0,
  1537,
  1537,
  1538,
  1538,
  0,
  1531,
  1539,
  1539,
  1540,
  1540,
  0,
  1536,
  0,
  1529,
  1541,
  1541,
  1542,
  1542,
  1530,
  1530,
  1537,
  1538,
  1532,
  1543,
  1543,
  1544,
  1544,
  1539,
  1545,
  1545,
  1546,
  1546,
  0,
  1540,
  1547,
  1547,
  1548,
  1548,
  1549,
  1549,
  1551,
  1551,
  0,
  1550,
  1550,
  1551,
  1552,
  1552,
  1553,
  1553,
  1554,
  1554,
  0,
  1542,
  1556,
  1556,
  1543,
  1555,
  1555,
  0,
  1546,
  0,
  1544,
  1557,
  1557,
  1558,
  1558,
  0,
  1545,
  1547,
  1548,
  1550,
  1549,
  1559,
  1559,
  1560,
  1560,
  1561,
  1561,
  1562,
  1562,
  0,
  1554,
  1557,
  0,
  1555,
  1558,
  1563,
  1563,
  1564,
  1564,
  0,
  1556,
  1565,
  1565,
  1566,
  1566,
  1567,
  1567,
  1568,
  1568,
  1569,
  1569,
  1570,
  1570,
  1571,
  1571,
  1572,
  1572,
  1573,
  1573,
  0,
  1574,
  1574,
  1566,
  1575,
  1575,
  1564,
  1576,
  1576,
  1568,
  1565,
  1577,
  1577,
  1582,
  1582,
  1566,
  1567,
  1580,
  1580,
  0,
  1569,
  1578,
  1578,
  0,
  1575,
  0,
  1570,
  0,
  1581,
  1581,
  1571,
  0,
  1573,
  1577,
  1572,
  1574,
  0,
  1580,
  1578,
  1579,
  1579,
  1579,
  1579,
  0,
  1576,
  1581,
  1583,
  1583,
  0,
  1582,
  1584,
  1584,
  1585,
  1585,
  1586,
  1586,
  1587,
  1587,
  0,
  1588,
  1588,
  1589,
  1589,
  1590,
  1590,
  1591,
  1591,
  1592,
  1592,
  1593,
  1593,
  1584,
  1594,
  1594,
  0,
  1586,
  1583,
  1587,
  1588,
  1595,
  1595,
  1585,
  1596,
  1596,
  1592,
  1597,
  1597,
  0,
  1598,
  1598,
  1589,
  1599,
  1599,
  1600,
  1600,
  1602,
  1602,
  0,
  1601,
  1601,
  0,
  1594,
  1603,
  1603,
  1604,
  1604,
  1605,
  1605,
  1595,
  1598,
  1606,
  1606,
  0,
  1596,
  0,
  1597,
  1599,
  1600,
  1601,
  1607,
  1607,
  1608,
  1608,
  1603,
  1609,
  1609,
  1610,
  1610,
  1611,
  1611,
  0,
  1602,
  1612,
  1612,
  1604,
  1613,
  1613,
  1614,
  1614,
  1615,
  1615,
  1605,
  1616,
  1616,
  0,
  1606,
  0,
  1610,
  1617,
  1617,
  1618,
  1618,
  0,
  1619,
  1619,
  1620,
  1620,
  1621,
  1621,
  1622,
  1622,
  1623,
  1623,
  1624,
  1624,
  1625,
  1625,
  1626,
  1626,
  0,
  1613,
  1627,
  1627,
  1618,
  1619,
  0,
  1621,
  1622,
  1628,
  1628,
  1624,
  1629,
  1629,
  0,
  1617,
  1620,
  0,
  1620,
  0,
  1620,
  1630,
  1630,
  1627,
  1631,
  1631,
  1628,
  1632,
  1632,
  1623,
  1633,
  1633,
  0,
  1629,
  1626,
  1634,
  1634,
  1635,
  1635,
  1636,
  1636,
  1637,
  1637,
  1638,
  1638,
  1639,
  1639,
  1640,
  1640,
  1641,
  1641,
  1632,
  1634,
  0,
  1634,
  1642,
  1642,
  0,
  1630,
  1644,
  1644,
  1633,
  1643,
  1643,
  1645,
  1645,
  1646,
  1646,
  1647,
  1647,
  1648,
  1648,
  1649,
  1649,
  1638,
  0,
  1639,
  1650,
  1650,
  1640,
  1651,
  1651,
  1643,
  0,
  1652,
  1652,
  0,
  1646,
  1655,
  1655,
  1649,
  1642,
  1653,
  1653,
  1653,
  1653,
  1656,
  1656,
  1645,
  1654,
  1654,
  1654,
  1654,
  1657,
  1657,
  1658,
  1658,
  1659,
  1659,
  1655,
  0,
  1650,
  1652,
  1660,
  1660,
  1651,
  1661,
  1661,
  0,
  1656,
  1662,
  1662,
  1663,
  1663,
  1664,
  1664,
  1665,
  1665,
  1666,
  1666,
  1660,
  1667,
  1667,
  1668,
  1668,
  0,
  1659,
  1657,
  1669,
  1669,
  1658,
  1664,
  1670,
  1670,
  0,
  1661,
  1671,
  1671,
  1662,
  1672,
  1672,
  0,
  1667,
  1673,
  1673,
  1669,
  1674,
  1674,
  1663,
  1675,
  1675,
  1676,
  1676,
  1668,
  1677,
  1677,
  1678,
  1678,
  0,
  1671,
  1679,
  1679,
  1670,
  1680,
  1680,
  1681,
  1681,
  1682,
  1682,
  1683,
  1683,
  1673,
  1684,
  1684,
  0,
  1672,
  1685,
  1685,
  1673,
  1686,
  1686,
  1687,
  1687,
  0,
  1675,
  0,
  1681,
  0,
  1682,
  1688,
  1688,
  1689,
  1689,
  1690,
  1690,
  1679,
  1695,
  1695,
  1691,
  1691,
  1686,
  1692,
  1692,
  1684,
  1693,
  1693,
  0,
  1685,
  1689,
  1694,
  1694,
  1696,
  1696,
  1690,
  1688,
  1691,
  1697,
  1697,
  1692,
  1698,
  1698,
  1693,
  1699,
  1699,
  0,
  1695,
  1694,
  0,
  1696,
  1700,
  1700,
  0,
  1693,
  1701,
  1701,
  1702,
  1702,
  1703,
  1703,
  1704,
  1704,
  1705,
  1705,
  1706,
  1706,
  1707,
  1707,
  1698,
  1708,
  1708,
  1697,
  1711,
  1711,
  1699,
  1709,
  1709,
  1710,
  1710,
  1712,
  1712,
  1704,
  1701,
  0,
  1700,
  1713,
  1713,
  1714,
  1714,
  0,
  1708,
  1707,
  1706,
  1705,
  1715,
  1715,
  1709,
  0,
  1710,
  0,
  1716,
  1716,
  1717,
  1717,
  1718,
  1718,
  1719,
  1719,
  1720,
  1720,
  0,
  1721,
  1721,
  1722,
  1722,
  0,
  1723,
  1723,
  1724,
  1724,
  1725,
  1725,
  0,
  1719,
  1726,
  1726,
  1718,
  1717,
  1721,
  1727,
  1727,
  1728,
  1728,
  0,
  1715,
  1716,
  1729,
  1729,
  1730,
  1730,
  1720,
  1723,
  0,
  1731,
  1731,
  1732,
  1732,
  1733,
  1733,
  0,
  1724,
  1735,
  1735,
  1734,
  1734,
  0,
  1725,
  1727,
  1736,
  1736,
  1729,
  1737,
  1737,
  1738,
  1738,
  1739,
  1739,
  1728,
  1731,
  1732,
  1734,
  1740,
  1740,
  1741,
  1741,
  1742,
  1742,
  1743,
  1743,
  1744,
  1744,
  1745,
  1745,
  1746,
  1746,
  1748,
  1748,
  1739,
  1747,
  1747,
  1740,
  1751,
  1751,
  1741,
  0,
  1737,
  1749,
  1749,
  1738,
  0,
  1746,
  1750,
  1750,
  1752,
  1752,
  1743,
  0,
  1744,
  1753,
  1753,
  1748,
  0,
  1749,
  1745,
  1754,
  1754,
  1747,
  1750,
  1755,
  1755,
  1756,
  1756,
  0,
  1751,
  1757,
  1757,
  1758,
  1758,
  1759,
  1759,
  0,
  1752,
  1760,
  1760,
  1761,
  1761,
  1762,
  1762,
  1763,
  1763,
  1764,
  1764,
  0,
  1758,
  0,
  1754,
  1765,
  1765,
  0,
  1766,
  1766,
  0,
  1756,
  1767,
  1767,
  1768,
  1768,
  0,
  1755,
  1769,
  1769,
  1770,
  1770,
  0,
  1771,
  1771,
  1772,
  1772,
  1760,
  1773,
  1773,
  1774,
  1774,
  1775,
  1775,
  1776,
  1776,
  1765,
  1779,
  1779,
  1764,
  1766,
  1777,
  1777,
  1778,
  1778,
  0,
  1768,
  1771,
  1780,
  1780,
  0,
  1776,
  0,
  1772,
  0,
  1775,
  1769,
  1773,
  1781,
  1781,
  1782,
  1782,
  1779,
  1783,
  1783,
  0,
  1774,
  1784,
  1784,
  0,
  1777,
  0,
  1778,
  1785,
  1785,
  0,
  1780,
  1786,
  1786,
  1787,
  1787,
  0,
  1788,
  1788,
  1789,
  1789,
  1790,
  1790,
  0,
  1791,
  1791,
  1792,
  1792,
  1793,
  1793,
  1783,
  0,
  1785,
  0,
  1784,
  0,
  1789,
  0,
  1790,
  0,
  1786,
  1794,
  1794,
  1795,
  1795,
  0,
  1787,
  1788,
  1791,
  0,
  1796,
  1796,
  1797,
  1797,
  1798,
  1798,
  0,
  1792,
  1799,
  1799,
  1800,
  1800,
  1793,
  1801,
  1801,
  1802,
  1802,
  1803,
  1803,
  1804,
  1804,
  1805,
  1805,
  1806,
  1806,
  1807,
  1807,
  1808,
  1808,
  1809,
  1809,
  1811,
  1811,
  0,
  1795,
  1796,
  1802,
  0,
  1805,
  1810,
  1810,
  0,
  1799,
  0,
  1804,
  1812,
  1812,
  1808,
  1803,
  1807,
  1813,
  1813,
  1814,
  1814,
  1815,
  1815,
  1810,
  1816,
  1816,
  1817,
  1817,
  1809,
  1818,
  1818,
  1819,
  1819,
  1812,
  1811,
  1820,
  1820,
  0,
  1815,
  1822,
  1822,
  1813,
  0,
  1814,
  1821,
  1821,
  1818,
  1823,
  1823,
  0,
  1817,
  1819,
  1824,
  1824,
  0,
  1820,
  1816,
  1825,
  1825,
  1826,
  1826,
  1821,
  1827,
  1827,
  1828,
  1828,
  1829,
  1829,
  1830,
  1830,
  1831,
  1831,
  0,
  1822,
  1832,
  1832,
  1833,
  1833,
  0,
  1834,
  1834,
  0,
  1836,
  1836,
  1828,
  1835,
  1835,
  0,
  1826,
  1829,
  0,
  1837,
  1837,
  0,
  1838,
  1838,
  1839,
  1839,
  1840,
  1840,
  1830,
  1836,
  1841,
  1841,
  1833,
  1832,
  1831,
  1834,
  1837,
  0,
  1835,
  1838,
  1842,
  1842,
  1843,
  1843,
  1844,
  1844,
  0,
  1841,
  1848,
  1848,
  1840,
  1845,
  1845,
  1846,
  1846,
  1847,
  1847,
  1849,
  1849,
  1850,
  1850,
  0,
  1843,
  0,
  1844,
  1851,
  1851,
  1845,
  0,
  1846,
  1842,
  1852,
  1852,
  0,
  1853,
  1853,
  0,
  1847,
  1854,
  1854,
  0,
  1849,
  1855,
  1855,
  1847,
  1856,
  1856,
  1857,
  1857,
  1858,
  1858,
  1859,
  1859,
  0,
  1851,
  1853,
  1860,
  1860,
  1861,
  1861,
  1862,
  1862,
  0,
  1863,
  1863,
  1864,
  1864,
  0,
  1859,
  0,
  1852,
  1866,
  1866,
  1855,
  1865,
  1865,
  0,
  1861,
  0,
  1862,
  1863,
  1856,
  1864,
  1867,
  1867,
  1868,
  1868,
  0,
  1860,
  1869,
  1869,
  1865,
  0,
  1870,
  1870,
  1871,
  1871,
  1872,
  1872,
  1866,
  1867,
  1873,
  1873,
  1874,
  1874,
  0,
  1869,
  1875,
  1875,
  1876,
  1876,
  1877,
  1877,
  1878,
  1878,
  1871,
  0,
  1879,
  1879,
  1880,
  1880,
  1868,
  1870,
  1881,
  1881,
  0,
  1873,
  1872,
  1882,
  1882,
  1876,
  1883,
  1883,
  1884,
  1884,
  0,
  1875,
  1879,
  0,
  1880,
  1881,
  1878,
  1877,
  1885,
  1885,
  1886,
  1886,
  1887,
  1887,
  1888,
  1888,
  1889,
  1889,
  1890,
  1890,
  1891,
  1891,
  1892,
  1892,
  0,
  1885,
  1893,
  1893,
  0,
  1882,
  1884,
  1894,
  1894,
  1895,
  1895,
  1896,
  1896,
  1897,
  1897,
  1898,
  1898,
  0,
  1899,
  1899,
  0,
  1888,
  1893,
  0,
  1891,
  1900,
  1900,
  1894,
  1901,
  1901,
  1892,
  0,
  1895,
  0,
  1902,
  1902,
  0,
  1903,
  1903,
  1904,
  1904,
  1905,
  1905,
  1906,
  1906,
  1896,
  0,
  1898,
  1899,
  1907,
  1907,
  0,
  1901,
  1902,
  1903,
  0,
  1900,
  1908,
  1908,
  1909,
  1909,
  1910,
  1910,
  1912,
  1912,
  0,
  1905,
  1911,
  1911,
  1913,
  1913,
  0,
  1914,
  1914,
  1904,
  0,
  1909,
  1915,
  1915,
  1916,
  1916,
  0,
  1917,
  1917,
  1918,
  1918,
  0,
  1907,
  1919,
  1919,
  0,
  1908,
  1910,
  1914,
  0,
  1911,
  1920,
  1920,
  1921,
  1921,
  1922,
  1922,
  1923,
  1923,
  0,
  1924,
  1924,
  1927,
  1927,
  1913,
  1917,
  1925,
  1925,
  1926,
  1926,
  1920,
  1918,
  1928,
  1928,
  1929,
  1929,
  1930,
  1930,
  0,
  1922,
  0,
  0,
  0,
  1925,
  1921,
  0,
  0,
  0,
  0,
  0,
  0,
  0,
  0,
  1923,
  1924,
  0,
  0,
  0,
  0,
  1926,
  0,
  0,
  0,
  0,
  0,
  0,
  0,
  0,
  1929,
  1932,
  1932,
  1932,
  1932,
  1932,
  1932,
  1932,
  1932,
  1934,
  0,
  0,
  1934,
  1934,
  1934,
  1934,
  1935,
  1935,
  1935,
  1935,
  1935,
  1936,
  1936,
  1936,
  1936,
  1937,
  1937,
  1937,
  1938,
  0,
  1938,
  1939,
  0,
  0,
  1939,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931,
  1931
}; // idb
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectFile *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectFile *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<DFALL<NiD3DXEffectFile *>,char const *,NiD3DXEffectFile *>::`vftable')(void *p, char) = &NiTMapBase<DFALL<NiD3DXEffectFile *>,char const *,NiD3DXEffectFile *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectFile *>::`vftable')(void *p, char) = &NiTPointerList<NiD3DXEffectFile *>::`vector deleting destructor'; // weak
int (__thiscall *NiTMap<char const *,NiD3DXEffectFile *>::`vftable')(void *p, char) = &NiTMap<char const *,NiD3DXEffectFile *>::`vector deleting destructor'; // weak
int (__thiscall *NiTStringTemplateMap<NiTMap<char const *,NiD3DXEffectFile *>,NiD3DXEffectFile *>::`vftable')(void *p, char) = &NiTStringMap<NiD3DXEffectFile *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerList<NiD3DXEffectFile *>::`vftable')(void *p, char) = &NiTPointerList<NiD3DXEffectFile *>::`vector deleting destructor'; // weak
int (__thiscall *NiD3DXEffectShaderLibrary::`vftable')(void *p, char) = &NiD3DXEffectShaderLibrary::`vector deleting destructor'; // weak
int (__thiscall *NiTStringMap<NiD3DXEffectFile *>::`vftable')(void *p, char) = &NiTStringMap<NiD3DXEffectFile *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiD3DXEffectFile *>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiD3DXEffectFile *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerMap<char const *,NiD3DXEffectFile *>::`vftable')(void *p, char) = &NiTPointerMap<char const *,NiD3DXEffectFile *>::`vector deleting destructor'; // weak
int (__thiscall *NiTStringTemplateMap<NiTPointerMap<char const *,NiD3DXEffectFile *>,NiD3DXEffectFile *>::`vftable')(void *p, char) = &NiTStringPointerMap<NiD3DXEffectFile *>::`vector deleting destructor'; // weak
struct NiD3DXEffectFile *(__thiscall *NiD3DXEffectFactory::`vftable')(NiD3DXEffectFactory *this, const char *) = &NiD3DXEffectFactory::GetD3DXEffectFile; // weak
int (__thiscall *NiTStringPointerMap<NiD3DXEffectFile *>::`vftable')(void *p, char) = &NiTStringPointerMap<NiD3DXEffectFile *>::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *>::`vector deleting destructor'; // weak
int (__thiscall *NiTMapBase<DFALL<NiPointer<NiD3DXEffectTechniqueSet>>,char const *,NiPointer<NiD3DXEffectTechniqueSet>>::`vftable')(void *p, char) = &NiTMapBase<DFALL<NiPointer<NiD3DXEffectTechniqueSet>>,char const *,NiPointer<NiD3DXEffectTechniqueSet>>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *>::`vector deleting destructor'; // weak
int (__thiscall *NiTMap<char const *,NiPointer<NiD3DXEffectTechniqueSet>>::`vftable')(void *p, char) = &NiTMap<char const *,NiPointer<NiD3DXEffectTechniqueSet>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiD3DXEffectTechniqueSet>>,NiPointer<NiD3DXEffectTechniqueSet>>::`vftable')(void *p, char) = &NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiD3DXEffectTechniqueSet>>,NiPointer<NiD3DXEffectTechniqueSet>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerList<NiD3DXEffectParameter *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *>::`vector deleting destructor'; // weak
int (__thiscall *NiTStringMap<NiPointer<NiD3DXEffectTechniqueSet>>::`vftable')(void *p, char) = &NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiD3DXEffectTechniqueSet>>,NiPointer<NiD3DXEffectTechniqueSet>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTArray<NiPointer<NiD3DXEffectTechnique>>::`vftable')(void *p, char) = &NiTArray<NiPointer<NiD3DXEffectTechnique>>::`scalar deleting destructor'; // weak
int (__thiscall *NiD3DXEffectTechniqueSet::`vftable')(void *p, char) = &NiD3DXEffectTechniqueSet::`vector deleting destructor'; // weak
int (__thiscall *NiD3DXEffectTechnique::`vftable')(void *p, char) = &NiD3DXEffectTechnique::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiShaderAttributeDesc *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiShaderAttributeDesc *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiShaderAttributeDesc *>::`vftable')(void *p, char) = &NiTPointerList<NiShaderAttributeDesc *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerList<NiShaderAttributeDesc *>::`vftable')(void *p, char) = &NiTPointerList<NiShaderAttributeDesc *>::`scalar deleting destructor'; // weak
int (__thiscall *NiD3DXEffectShader::`vftable')(void *p, char) = &NiD3DXEffectShader::`vector deleting destructor'; // weak
int (__thiscall *NiD3DTimeSyncController::`vftable')(void *p, char) = &NiD3DTimeSyncController::`scalar deleting destructor'; // weak
int (__thiscall *NiTArray<NiPointer<NiD3DPass>>::`vftable')(void *p, char) = &NiTArray<NiPointer<NiD3DPass>>::`vector deleting destructor'; // weak
int (__thiscall *NiD3DShader::`vftable')(void *p, char) = &NiD3DShader::`vector deleting destructor'; // weak
__int32 (__stdcall *NiD3DXEffectStateManager::`vftable')(NiD3DXEffectStateManager *this, _GUID *iid, void **ppv) = &NiD3DXEffectStateManager::QueryInterface; // weak
int (__thiscall *NsTextCodeV0_3::`vftable')(void *p, char) = &NsTextCodeV0_3::`vector deleting destructor'; // weak
int (__thiscall *NpNs_MoveToTarget::`vftable')(void *p, char) = &NpNs_MoveToTarget::`vector deleting destructor'; // weak
enum Ns_TourScene::TS_RESULT (__thiscall *NsMakeQuadScene::Optimizer::`vftable')(NsMakeQuadScene::Optimizer *this, NiAVObject *_pkObject, void *) = &NsMakeQuadScene::Optimizer::ProcessData; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexturingProperty>>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexturingProperty>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerMap<char const *,NiPointer<NiTexturingProperty>>::`vftable')(void *p, char) = &NiTPointerMap<char const *,NiPointer<NiTexturingProperty>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexturingProperty>>,NiPointer<NiTexturingProperty>>::`vftable')(void *p, char) = &NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexturingProperty>>,NiPointer<NiTexturingProperty>>::`vector deleting destructor'; // weak
int (__thiscall *NiTStringPointerMap<NiPointer<NiTexturingProperty>>::`vftable')(void *p, char) = &NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexturingProperty>>,NiPointer<NiTexturingProperty>>::`vector deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NpSIF_Tool>>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NpSIF_Tool>>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerMap<char const *,NiPointer<NpSIF_Tool>>::`vftable')(void *p, char) = &NiTPointerMap<char const *,NiPointer<NpSIF_Tool>>::`vector deleting destructor'; // weak
int (__thiscall *NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NpSIF_Tool>>,NiPointer<NpSIF_Tool>>::`vftable')(void *p, char) = &NiTStringPointerMap<NiPointer<NpSIF_Tool>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTStringPointerMap<NiPointer<NpSIF_Tool>>::`vftable')(void *p, char) = &NiTStringPointerMap<NiPointer<NpSIF_Tool>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiKFMTool>>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiKFMTool>>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerMap<char const *,NiPointer<NiKFMTool>>::`vftable')(void *p, char) = &NiTPointerMap<char const *,NiPointer<NiKFMTool>>::`vector deleting destructor'; // weak
int (__thiscall *NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiKFMTool>>,NiPointer<NiKFMTool>>::`vftable')(void *p, char) = &NiTStringPointerMap<NiPointer<NiKFMTool>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTStringPointerMap<NiPointer<NiKFMTool>>::`vftable')(void *p, char) = &NiTStringPointerMap<NiPointer<NiKFMTool>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiActorManager>>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiActorManager>>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerMap<char const *,NiPointer<NiActorManager>>::`vftable')(void *p, char) = &NiTPointerMap<char const *,NiPointer<NiActorManager>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiActorManager>>,NiPointer<NiActorManager>>::`vftable')(void *p, char) = &NiTStringPointerMap<NiPointer<NiActorManager>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTStringPointerMap<NiPointer<NiActorManager>>::`vftable')(void *p, char) = &NiTStringPointerMap<NiPointer<NiActorManager>>::`scalar deleting destructor'; // weak
int (__thiscall *NPTR_ISShader_v2::`vftable')(void *p, char) = &NPTR_ISShader_v2::`scalar deleting destructor'; // weak
int (__thiscall *NsPgToonRegister_v2::`vftable')(void *p, char) = &NsPgToonRegister_v2::`scalar deleting destructor'; // weak
int (__thiscall *INpShader::`vftable')(void *p, char) = &INpShader::`vector deleting destructor'; // weak
int (__thiscall *NsPgToonExtraData::`vftable')(void *p, char) = &NsPgToonExtraData::`vector deleting destructor'; // weak
int (__thiscall *NsPgCatoonShader::`vftable')(void *p, char) = &NsPgCatoonShader::`vector deleting destructor'; // weak
int (__thiscall *NsEffect::`vftable')(void *p, char) = &NsEffect::`vector deleting destructor'; // weak
int (__thiscall *NiTArray<NsABVPicking::Record *>::`vftable')(void *p, char) = &NiTArray<NsABVPicking::Record *>::`scalar deleting destructor'; // weak
int (__stdcall *NsFadeNode::FindChildGeometry::`vftable')(NiAVObject *_pkObject, void *_pData) = &NsFadeNode::FindChildGeometry::ProcessData; // weak
int (__thiscall *NiTArray<NiTPointerList<NiPointer<NiProperty>> *>::`vftable')(void *p, char) = &NiTArray<NiTPointerList<NiPointer<NiProperty>> *>::`scalar deleting destructor'; // weak
int (__thiscall *NsFadeNode::`vftable')(void *p, char) = &NsFadeNode::`scalar deleting destructor'; // weak
int (__thiscall *NiAlphaRefController::`vftable')(void *p, char) = &NiAlphaRefController::`vector deleting destructor'; // weak
int (__thiscall *MasterPropertyAccumulator::`vftable')(void *p, char) = &MasterPropertyAccumulator::`scalar deleting destructor'; // weak
enum Ns_TourScene::TS_RESULT (__thiscall *FindMultiLinkNode::`vftable')(FindMultiLinkNode *this, NiAVObject *_pkObject, void *) = &FindMultiLinkNode::ProcessData; // weak
enum Ns_TourScene::TS_RESULT (__thiscall *FindRoomNode::`vftable')(FindRoomNode *this, NiAVObject *_pkObject, void *) = &FindRoomNode::ProcessData; // weak
int (__thiscall *boost::detail::sp_counted_base_impl<PgNsTerrain::CPgBlockObject *,boost::checked_deleter<PgNsTerrain::CPgBlockObject>>::`vftable')(void *p, char) = &boost::detail::sp_counted_base_impl<SlideListWin::ListItem *,boost::checked_deleter<SlideListWin::ListItem>>::`vector deleting destructor'; // weak
void (__thiscall *IMakeBlockInfo::`vftable')(IMakeBlockInfo *this, unsigned int _uiMapSize, unsigned int _uiSplitCnt, float) = &IMakeBlockInfo::SetBlockData; // weak
int (__thiscall *CNullClass::`vftable')(void *p, char) = &CNullClass::`scalar deleting destructor'; // weak
int (*CProperty<CWorldConfig,bool>::`vftable'[2])() = { &CTypedProperty<bool>::GetType, &CTypedProperty<bool>::GetTypeInfo }; // weak
int (__thiscall *CBaseObject::`vftable')(void *p, char) = &CRTTIClass<CGlowScreenEffect,CBaseObject>::`vector deleting destructor'; // weak
int (__thiscall *CWorldConfig::`vftable')(void *p, char) = &CWorldConfig::`scalar deleting destructor'; // weak
int (__thiscall *HeightMapMaker::`vftable')(void *p, char) = &HeightMapMaker::`vector deleting destructor'; // weak
int (__thiscall *CPostProcessEffect::`vftable')(void *p, char) = &ShortCutSkill::`scalar deleting destructor'; // weak
int (__thiscall *HazeAccumulator::`vftable')(void *p, char) = &HazeAccumulator::`scalar deleting destructor'; // weak
int (__stdcall *CHazeScreenEffect::`vftable'{for `CRTTIClass<CHazeScreenEffect,CBaseObject>'})(int) = &CHazeScreenEffect::`vector deleting destructor'; // weak
int (__thiscall *CHazeScreenEffect::`vftable'{for `CScreenEffect'})(void *p, char) = &CHazeScreenEffect::`vector deleting destructor'; // weak
int (__thiscall *CRTTIClass<CHazeScreenEffect,CBaseObject>::`vftable')(void *p, char) = &CRTTIClass<CGlowScreenEffect,CBaseObject>::`vector deleting destructor'; // weak
int (*CProperty<CGlowScreenEffect,bool>::`vftable'[2])() = { &CTypedProperty<bool>::GetType, &CTypedProperty<bool>::GetTypeInfo }; // weak
int (*CProperty<CGlowScreenEffect,float>::`vftable'[2])() = { &CTypedProperty<float>::GetType, &CTypedProperty<float>::GetTypeInfo }; // weak
int (*CProperty<CGlowScreenEffect,unsigned int>::`vftable'[2])() =
{
  &CTypedProperty<unsigned int>::GetType,
  &CTypedProperty<unsigned int>::GetTypeInfo
}; // weak
int (__stdcall *CGlowScreenEffect::`vftable'{for `CRTTIClass<CGlowScreenEffect,CBaseObject>'})(int) = &CGlowScreenEffect::`vector deleting destructor'; // weak
int (__thiscall *CGlowScreenEffect::`vftable'{for `CScreenEffect'})(void *p, char) = &CGlowScreenEffect::`scalar deleting destructor'; // weak
int (__thiscall *CRTTIClass<CGlowScreenEffect,CBaseObject>::`vftable')(void *p, char) = &CRTTIClass<CGlowScreenEffect,CBaseObject>::`vector deleting destructor'; // weak
int (*CProperty<CAfterImageEffect,bool>::`vftable'[2])() = { &CTypedProperty<bool>::GetType, &CTypedProperty<bool>::GetTypeInfo }; // weak
int (__stdcall *CAfterImageEffect::`vftable'{for `CRTTIClass<CAfterImageEffect,CBaseObject>'})(int) = &CAfterImageEffect::`vector deleting destructor'; // weak
int (__thiscall *CAfterImageEffect::`vftable'{for `CScreenEffect'})(void *p, char) = &CAfterImageEffect::`scalar deleting destructor'; // weak
int (__thiscall *CRTTIClass<CAfterImageEffect,CBaseObject>::`vftable')(void *p, char) = &CRTTIClass<CGlowScreenEffect,CBaseObject>::`vector deleting destructor'; // weak
int (*CProperty<CDepthOfFieldEffect,bool>::`vftable'[2])() = { &CTypedProperty<bool>::GetType, &CTypedProperty<bool>::GetTypeInfo }; // weak
int (__stdcall *CDepthOfFieldEffect::`vftable'{for `CRTTIClass<CDepthOfFieldEffect,CBaseObject>'})(int) = &CDepthOfFieldEffect::`vector deleting destructor'; // weak
int (__thiscall *CDepthOfFieldEffect::`vftable'{for `CScreenEffect'})(void *p, char) = &CDepthOfFieldEffect::`scalar deleting destructor'; // weak
int (__thiscall *CRTTIClass<CDepthOfFieldEffect,CBaseObject>::`vftable')(void *p, char) = &CRTTIClass<CGlowScreenEffect,CBaseObject>::`vector deleting destructor'; // weak
int (__thiscall *CScreenEffect::`vftable')(void *p, char) = &CScreenEffect::`scalar deleting destructor'; // weak
int (__stdcall *PgTList<void *>::`vftable')(int) = &PgTList<void *>::`scalar deleting destructor'; // weak
int (__stdcall *NiTPointerMap<void *,PgFrameWork *>::`vftable')(int) = &NiTPointerMap<void *,PgFrameWork *>::`vector deleting destructor'; // weak
int (__stdcall *PgFrameMgr::`vftable')(int) = &PgFrameMgr::`vector deleting destructor'; // weak
int (__stdcall *NiTMapBase<NiTPointerAllocator<unsigned int>,void *,PgFrameWork *>::`vftable')(int) = &NiTMapBase<NiTPointerAllocator<unsigned int>,void *,PgFrameWork *>::`vector deleting destructor'; // weak
void (__thiscall *PgWinFrame::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__stdcall *PgWinFrame::`vftable'{for `NiNode'})(int) = &PgWinFrame::`scalar deleting destructor'; // weak
void (__thiscall *PgWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__stdcall *PgWin::`vftable'{for `NiNode'})(int) = &PgWin::`scalar deleting destructor'; // weak
int (__stdcall *PgWin::Bool::`vftable')(int) = &PgWin::Bool::`vector deleting destructor'; // weak
void (__thiscall *PgWinSpr::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__stdcall *PgWinSpr::`vftable'{for `NiNode'})(int) = &PgWinSpr::`vector deleting destructor'; // weak
void (__thiscall *PgWinText::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__stdcall *PgWinText::`vftable'{for `NiNode'})(int) = &PgWinText::`scalar deleting destructor'; // weak
unsigned int std::basic_string<char,std::char_traits<char>,std::allocator<char>>::npos = 4294967295u; // idb
int (__stdcall *PgWinCullingProcess::`vftable')(int) = &PgWinCullingProcess::`vector deleting destructor'; // weak
int (__stdcall *PgTList<NiPointer<PgWin>>::`vftable')(int) = &PgTList<NiPointer<PgWin>>::`scalar deleting destructor'; // weak
int (__stdcall *NiTPointerList<NiPointer<PgWin>>::`vftable')(int) = &NiTPointerList<NiPointer<PgWin>>::`scalar deleting destructor'; // weak
int (__stdcall *PgWinMgr::`vftable')(int) = &PgWinMgr::`scalar deleting destructor'; // weak
int (__stdcall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin>>::`vftable')(int) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin>>::`vector deleting destructor'; // weak
int (__stdcall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin>>::`vftable')(int) = &NiTPointerList<NiPointer<PgWin>>::`scalar deleting destructor'; // weak
int (__stdcall *PgSprData::`vftable')(int) = &PgSprData::`scalar deleting destructor'; // weak
int (__stdcall *NiTArray<NiPointer<NiScreenElementsData>>::`vftable')(int) = &NiTArray<NiPointer<NiScreenElementsData>>::`vector deleting destructor'; // weak
int (__stdcall *NiTArray<NiPointer<PgSprData::PgHitTester>>::`vftable')(int) = &NiTArray<NiPointer<PgSprData::PgHitTester>>::`scalar deleting destructor'; // weak
int (__stdcall *NiTArray<NiPointer<NiAlphaProperty>>::`vftable')(int) = &NiTArray<NiPointer<NiAlphaProperty>>::`vector deleting destructor'; // weak
int (__stdcall *PgSpr::`vftable')(int) = &PgSpr::`scalar deleting destructor'; // weak
int (__stdcall *PgSprData::PgHitTester::`vftable')(int) = &PgSprData::PgHitTester::`vector deleting destructor'; // weak
void (__thiscall *PgWinBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__stdcall *PgWinBut::`vftable'{for `NiNode'})(int) = &PgWinBut::`scalar deleting destructor'; // weak
int (__stdcall *NiTList<CBucketBlock *>::`vftable')(int) = &NiTPointerListBase<DFALL<CBucketBlock *>,CBucketBlock *>::`scalar deleting destructor'; // weak
int (__stdcall *NiTPointerListBase<DFALL<CBucketBlock *>,CBucketBlock *>::`vftable')(int) = &NiTPointerListBase<DFALL<CBucketBlock *>,CBucketBlock *>::`scalar deleting destructor'; // weak
int (__stdcall *NiTListBase<DFALL<CBucketBlock *>,CBucketBlock *>::`vftable')(int) = &NiTListBase<DFALL<CBucketBlock *>,CBucketBlock *>::`vector deleting destructor'; // weak
int (__stdcall *NiTMap<unsigned short,FontBucket *>::`vftable')(int) = &NiTMap<unsigned short,FontBucket *>::`scalar deleting destructor'; // weak
int (__stdcall *NiTList<SpScreenText *>::`vftable')(int) = &NiTPointerListBase<DFALL<SpScreenText *>,SpScreenText *>::`scalar deleting destructor'; // weak
int (__stdcall *NiTPointerListBase<DFALL<SpScreenText *>,SpScreenText *>::`vftable')(int) = &NiTPointerListBase<DFALL<SpScreenText *>,SpScreenText *>::`scalar deleting destructor'; // weak
int (__stdcall *NiTListBase<DFALL<SpScreenText *>,SpScreenText *>::`vftable')(int) = &NiTListBase<DFALL<SpScreenText *>,SpScreenText *>::`scalar deleting destructor'; // weak
int (__stdcall *CSpFont::`vftable')(int) = &CSpFont::`vector deleting destructor'; // weak
int (__stdcall *NiTMapBase<DFALL<FontBucket *>,unsigned short,FontBucket *>::`vftable')(int) = &NiTMapBase<DFALL<FontBucket *>,unsigned short,FontBucket *>::`scalar deleting destructor'; // weak
int (__stdcall *PgNet::`vftable')(int) = &PgNet::`vector deleting destructor'; // weak
int (__stdcall *PgFont::`vftable')(int) = &PgFont::`scalar deleting destructor'; // weak
int (__stdcall *SpScreenGeometryClip::`vftable')(int) = &SpScreenGeometryClip::`vector deleting destructor'; // weak
int (__stdcall *SpScreenText::`vftable')(int) = &SpScreenText::`vector deleting destructor'; // weak
void (__thiscall *PgWinLRBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__stdcall *PgWinLRBut::`vftable'{for `NiNode'})(int) = &PgWinLRBut::`scalar deleting destructor'; // weak
int (__stdcall *PgCursor::`vftable')(int) = &PgCursor::`scalar deleting destructor'; // weak
void (__thiscall *PgWinCircleGauge::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__stdcall *PgWinCircleGauge::`vftable'{for `NiNode'})(int) = &PgWinCircleGauge::`vector deleting destructor'; // weak
void (__thiscall *PgWinAbbreviateText::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__stdcall *PgWinAbbreviateText::`vftable'{for `NiNode'})(int) = &PgWinAbbreviateText::`vector deleting destructor'; // weak
void (__thiscall *PgWinCloseBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__stdcall *PgWinCloseBut::`vftable'{for `NiNode'})(int) = &PgWinCloseBut::`scalar deleting destructor'; // weak
void (__thiscall *PgWinBar::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__stdcall *PgWinBar::`vftable'{for `NiNode'})(int) = &PgWinBar::`scalar deleting destructor'; // weak
void (__thiscall *PgWinEditText::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__stdcall *PgWinEditText::`vftable'{for `NiNode'})(int) = &PgWinEditText::`scalar deleting destructor'; // weak
int (__stdcall *PgEditWin::`vftable')(int) = &PgEditWin::`scalar deleting destructor'; // weak
int (__stdcall *NiTMap<HWND__ *,PgEditWin *>::`vftable')(int) = &NiTMap<HWND__ *,PgEditWin *>::`vector deleting destructor'; // weak
int (__stdcall *NiTMapBase<DFALL<PgEditWin *>,HWND__ *,PgEditWin *>::`vftable')(int) = &NiTMapBase<DFALL<PgEditWin *>,HWND__ *,PgEditWin *>::`scalar deleting destructor'; // weak
void (__thiscall *PgWinPasswdText::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__stdcall *PgWinPasswdText::`vftable'{for `NiNode'})(int) = &PgWinPasswdText::`vector deleting destructor'; // weak
int (__stdcall *PgTextGeometry::`vftable')(int) = &PgTextGeometry::`scalar deleting destructor'; // weak
void (__thiscall *PgWinImeEditText::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__stdcall *PgWinImeEditText::`vftable'{for `NiNode'})(int) = &PgWinImeEditText::`vector deleting destructor'; // weak
int (__stdcall *PgImeCtrl::`vftable')(int) = &PgImeCtrl::`scalar deleting destructor'; // weak
void (__thiscall *PgWinButExt::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int) = &NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags; // weak
int (__stdcall *PgWinButExt::`vftable'{for `NiNode'})(int) = &PgWinButExt::`vector deleting destructor'; // weak
int (__stdcall *PgWinCamera::`vftable')(int) = &PgWinCamera::`scalar deleting destructor'; // weak
int (__stdcall *PgEditTextGeometry::`vftable')(int) = &PgEditTextGeometry::`scalar deleting destructor'; // weak
int (__stdcall *PgPasswdTextGeometry::`vftable')(int) = &PgPasswdTextGeometry::`vector deleting destructor'; // weak
int (__stdcall *PgImeEditTextGeometry::`vftable')(int) = &PgImeEditTextGeometry::`vector deleting destructor'; // weak
GUID GUID_ATLVer100 = { 1572907466u, 37538u, 16900u, "�\x03äÎ_\x11á¨" };
void *(__thiscall *ATL::CWin32Heap::`vftable')(ATL::CWin32Heap *this, unsigned int) = &ATL::CWin32Heap::Allocate; // weak
struct ATL::CStringData *(__thiscall *ATL::CAtlStringMgr::`vftable')(ATL::CAtlStringMgr *this, unsigned int nTotalSize, int) = &ATL::CAtlStringMgr::Allocate; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiD3DVertexShader *>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiD3DVertexShader *>::`vector deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiD3DPixelShader *>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiD3DPixelShader *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiD3DShaderProgramCreator *>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiD3DShaderProgramCreator *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerMap<char const *,NiD3DVertexShader *>::`vftable')(void *p, char) = &NiTPointerMap<char const *,NiD3DVertexShader *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTStringTemplateMap<NiTPointerMap<char const *,NiD3DVertexShader *>,NiD3DVertexShader *>::`vftable')(void *p, char) = &NiTStringTemplateMap<NiTPointerMap<char const *,NiD3DVertexShader *>,NiD3DVertexShader *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerMap<char const *,NiD3DPixelShader *>::`vftable')(void *p, char) = &NiTPointerMap<char const *,NiD3DPixelShader *>::`vector deleting destructor'; // weak
int (__thiscall *NiTStringTemplateMap<NiTPointerMap<char const *,NiD3DPixelShader *>,NiD3DPixelShader *>::`vftable')(void *p, char) = &NiTStringTemplateMap<NiTPointerMap<char const *,NiD3DPixelShader *>,NiD3DPixelShader *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerMap<char const *,NiD3DShaderProgramCreator *>::`vftable')(void *p, char) = &NiTPointerMap<char const *,NiD3DShaderProgramCreator *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTStringTemplateMap<NiTPointerMap<char const *,NiD3DShaderProgramCreator *>,NiD3DShaderProgramCreator *>::`vftable')(void *p, char) = &NiTStringPointerMap<NiD3DShaderProgramCreator *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTStringPointerMap<NiD3DVertexShader *>::`vftable')(void *p, char) = &NiTStringTemplateMap<NiTPointerMap<char const *,NiD3DVertexShader *>,NiD3DVertexShader *>::`vector deleting destructor'; // weak
int (__thiscall *NiTStringPointerMap<NiD3DPixelShader *>::`vftable')(void *p, char) = &NiTStringTemplateMap<NiTPointerMap<char const *,NiD3DPixelShader *>,NiD3DPixelShader *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTStringPointerMap<NiD3DShaderProgramCreator *>::`vftable')(void *p, char) = &NiTStringPointerMap<NiD3DShaderProgramCreator *>::`scalar deleting destructor'; // weak
int (__thiscall *NiD3DShaderProgramFactory::`vftable')(void *p, char) = &NiD3DShaderProgramFactory::`scalar deleting destructor'; // weak
int (__thiscall *NiTArray<NiTextureEffect const *>::`vftable')(void *p, char) = &NiTArray<NiTextureEffect const *>::`vector deleting destructor'; // weak
int (__thiscall *NiD3DDefaultShader::`vftable')(void *p, char) = &NiD3DDefaultShader::`vector deleting destructor'; // weak
int (__thiscall *NiTArray<NiPointer<NiD3DTextureStage>>::`vftable')(void *p, char) = &NiTArray<NiPointer<NiD3DTextureStage>>::`scalar deleting destructor'; // weak
int (__thiscall *NiD3DPass::`vftable')(void *p, char) = &NiD3DPass::`vector deleting destructor'; // weak
int (__thiscall *NiD3DShaderInterface::`vftable')(void *p, char) = &NiD3DShaderInterface::`vector deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,enum  _D3DFORMAT,NiDX9DeviceDesc::DisplayFormatInfo::RenderTargetInfo *>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,enum  _D3DFORMAT,NiDX9DeviceDesc::DisplayFormatInfo::RenderTargetInfo *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiDX9DeviceDesc::DisplayFormatInfo *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiDX9DeviceDesc::DisplayFormatInfo *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTArray<NiDX9AdapterDesc::ModeDesc *>::`vftable')(void *p, char) = &NiTArray<NiDX9AdapterDesc::ModeDesc *>::`vector deleting destructor'; // weak
int (__thiscall *NiTArray<NiDX9AdapterDesc *>::`vftable')(void *p, char) = &NiTArray<NiDX9AdapterDesc *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiDX9DeviceDesc::DisplayFormatInfo *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiDX9DeviceDesc::DisplayFormatInfo *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerMap<enum  _D3DFORMAT,NiDX9DeviceDesc::DisplayFormatInfo::RenderTargetInfo *>::`vftable')(void *p, char) = &NiTPointerMap<enum  _D3DFORMAT,NiDX9DeviceDesc::DisplayFormatInfo::RenderTargetInfo *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerList<NiDX9DeviceDesc::DisplayFormatInfo *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiDX9DeviceDesc::DisplayFormatInfo *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,NiVBBlock *,NiDX9Renderer::PrePackObject *>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,NiVBBlock *,NiDX9Renderer::PrePackObject *>::`vector deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,HWND__ *,NiPointer<NiRenderTargetGroup>>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,HWND__ *,NiPointer<NiRenderTargetGroup>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,NiRenderedTexture *,NiDX9RenderedTextureData *>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,NiRenderedTexture *,NiDX9RenderedTextureData *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,NiRenderedCubeMap *,NiDX9RenderedCubeMapData *>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,NiRenderedCubeMap *,NiDX9RenderedCubeMapData *>::`vector deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData>>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData>>::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *>::`vector deleting destructor'; // weak
int (__thiscall *NiTArray<bool (__cdecl *)(bool,void *)>::`vftable')(void *p, char) = &NiTArray<bool (__cdecl *)(bool,void *)>::`vector deleting destructor'; // weak
int (__thiscall *NiTArray<void *>::`vftable')(void *p, char) = &NiTArray<void *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTArray<bool (__cdecl *)(void *)>::`vftable')(void *p, char) = &NiTArray<bool (__cdecl *)(void *)>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData>>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *>::`vftable')(void *p, char) = &NiTPointerList<NiD3DShaderInterface *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerMap<NiVBBlock *,NiDX9Renderer::PrePackObject *>::`vftable')(void *p, char) = &NiTPointerMap<NiVBBlock *,NiDX9Renderer::PrePackObject *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerMap<HWND__ *,NiPointer<NiRenderTargetGroup>>::`vftable')(void *p, char) = &NiTPointerMap<HWND__ *,NiPointer<NiRenderTargetGroup>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerMap<NiRenderedTexture *,NiDX9RenderedTextureData *>::`vftable')(void *p, char) = &NiTPointerMap<NiRenderedTexture *,NiDX9RenderedTextureData *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerMap<NiRenderedCubeMap *,NiDX9RenderedCubeMapData *>::`vftable')(void *p, char) = &NiTPointerMap<NiRenderedCubeMap *,NiDX9RenderedCubeMapData *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerMap<NiDynamicTexture *,NiDX9DynamicTextureData *>::`vftable')(void *p, char) = &NiTPointerMap<NiDynamicTexture *,NiDX9DynamicTextureData *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerList<NiPointer<NiDX92DBufferData>>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerList<NiD3DShaderInterface *>::`vftable')(void *p, char) = &NiTPointerList<NiD3DShaderInterface *>::`vector deleting destructor'; // weak
int (__thiscall *NiDX9Renderer::`vftable')(void *p, char) = &NiDX9Renderer::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiDX9AdditionalDepthStencilBufferData *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiDX9AdditionalDepthStencilBufferData *>::`scalar deleting destructor'; // weak
int (__thiscall *NiDX92DBufferData::`vftable')(void *p, char) = &NiDX92DBufferData::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiDX9AdditionalDepthStencilBufferData *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiDX9AdditionalDepthStencilBufferData *>::`vector deleting destructor'; // weak
int (__thiscall *NiDX9TextureBufferData::`vftable')(void *p, char) = &NiDX9TextureBufferData::`vector deleting destructor'; // weak
int (__thiscall *NiDX9AdditionalDepthStencilBufferData::`vftable')(void *p, char) = &NiDX9AdditionalDepthStencilBufferData::`vector deleting destructor'; // weak
int (__thiscall *NiDX9ImplicitBufferData::`vftable')(void *p, char) = &NiDX9ImplicitBufferData::`scalar deleting destructor'; // weak
int (__thiscall *NiDX9ImplicitDepthStencilBufferData::`vftable')(void *p, char) = &NiDX92DBufferData::`vector deleting destructor'; // weak
int (__thiscall *NiD3DShaderLibrary::`vftable')(void *p, char) = &NiD3DShaderLibrary::`vector deleting destructor'; // weak
int (__thiscall *NiD3DSCM_Vertex::`vftable')(void *p, char) = &NiD3DSCM_Vertex::`vector deleting destructor'; // weak
int (__thiscall *NiTArray<NiPointer<NiD3DShaderConstantMapEntry>>::`vftable')(void *p, char) = &NiTArray<NiPointer<NiD3DShaderConstantMapEntry>>::`scalar deleting destructor'; // weak
int (__thiscall *NiD3DShaderConstantMap::`vftable')(void *p, char) = &NiD3DShaderConstantMap::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::`vftable')(void *p, char) = &NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::`vector deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary>>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerMap<char const *,NiShader *>::`vftable')(void *p, char) = &NiTPointerMap<char const *,NiShader *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTStringTemplateMap<NiTPointerMap<char const *,NiShader *>,NiShader *>::`vftable')(void *p, char) = &NiTStringPointerMap<NiShader *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerMap<char const *,NiPointer<NiShaderLibrary>>::`vftable')(void *p, char) = &NiTPointerMap<char const *,NiPointer<NiShaderLibrary>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiShaderLibrary>>,NiPointer<NiShaderLibrary>>::`vftable')(void *p, char) = &NiTStringPointerMap<NiPointer<NiShaderLibrary>>::`vector deleting destructor'; // weak
int (__thiscall *NiD3DGlobalConstantEntry::`vftable')(void *p, char) = &NiD3DGlobalConstantEntry::`scalar deleting destructor'; // weak
int (__thiscall *NiTMap<char const *,NiD3DGlobalConstantEntry *>::`vftable')(void *p, char) = &NiTMap<char const *,NiD3DGlobalConstantEntry *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTStringTemplateMap<NiTMap<char const *,NiD3DGlobalConstantEntry *>,NiD3DGlobalConstantEntry *>::`vftable')(void *p, char) = &NiTStringTemplateMap<NiTMap<char const *,NiD3DGlobalConstantEntry *>,NiD3DGlobalConstantEntry *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTStringPointerMap<NiShader *>::`vftable')(void *p, char) = &NiTStringPointerMap<NiShader *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTStringPointerMap<NiPointer<NiShaderLibrary>>::`vftable')(void *p, char) = &NiTStringPointerMap<NiPointer<NiShaderLibrary>>::`vector deleting destructor'; // weak
int (__thiscall *NiTStringMap<NiD3DGlobalConstantEntry *>::`vftable')(void *p, char) = &NiTStringTemplateMap<NiTMap<char const *,NiD3DGlobalConstantEntry *>,NiD3DGlobalConstantEntry *>::`scalar deleting destructor'; // weak
int (__thiscall *NiD3DShaderFactory::`vftable')(void *p, char) = &NiD3DShaderFactory::`vector deleting destructor'; // weak
int (__thiscall *NiD3DShaderConstantMapEntry::`vftable')(void *p, char) = &NSBConstantMap::NSBCM_Entry::`scalar deleting destructor'; // weak
int (__thiscall *NiDX9ShaderDeclaration::`vftable')(void *p, char) = &NiDX9ShaderDeclaration::`vector deleting destructor'; // weak
int (__thiscall *NiD3DController::`vftable')(void *p, char) = &NiD3DController::`vector deleting destructor'; // weak
int (__thiscall *NiDX9RenderState::`vftable')(void *p, char) = &NiDX9RenderState::`scalar deleting destructor'; // weak
int (__thiscall *NiD3DShaderConstantManager::`vftable')(void *p, char) = &NiD3DShaderConstantManager::`vector deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiLight *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiLight *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerMap<NiLight *,NiDX9LightManager::LightEntry *>::`vftable')(void *p, char) = &NiTPointerMap<NiLight *,NiDX9LightManager::LightEntry *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerList<NiLight *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::`vector deleting destructor'; // weak
int (__thiscall *NiTexture::RendererData::`vftable')(void *p, char) = &NiTexture::RendererData::`vector deleting destructor'; // weak
int (__thiscall *NiDX9TextureData::`vftable')(void *p, char) = &NiDX9TextureData::`vector deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiDX9VertexBufferManager::NiDX9VBInfo *>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiDX9VertexBufferManager::NiDX9VBInfo *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerMap<unsigned int,NiDX9VertexBufferManager::NiDX9VBInfo *>::`vftable')(void *p, char) = &NiTPointerMap<unsigned int,NiDX9VertexBufferManager::NiDX9VBInfo *>::`vector deleting destructor'; // weak
int (__thiscall *NiDX9VertexBufferManager::`vftable')(void *p, char) = &NiDX9VertexBufferManager::`vector deleting destructor'; // weak
int (__thiscall *NiDX9SourceTextureData::`vftable')(void *p, char) = &NiDX9SourceTextureData::`vector deleting destructor'; // weak
int (__thiscall *NiDX9SourceCubeMapData::`vftable')(void *p, char) = &NiDX9SourceCubeMapData::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiDX9IndexBufferManager::NiDX9IBInfo *>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiDX9IndexBufferManager::NiDX9IBInfo *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerMap<unsigned int,NiDX9IndexBufferManager::NiDX9IBInfo *>::`vftable')(void *p, char) = &NiTPointerMap<unsigned int,NiDX9IndexBufferManager::NiDX9IBInfo *>::`vector deleting destructor'; // weak
int (__thiscall *NiDX9IndexBufferManager::`vftable')(void *p, char) = &NiDX9IndexBufferManager::`vector deleting destructor'; // weak
int (__thiscall *NiDX9RenderedTextureData::`vftable')(void *p, char) = &NiDX9RenderedTextureData::`scalar deleting destructor'; // weak
int (__thiscall *NiDX9RenderedCubeMapData::`vftable')(void *p, char) = &NiDX9RenderedCubeMapData::`scalar deleting destructor'; // weak
int (__thiscall *NiDX9DynamicTextureData::`vftable')(void *p, char) = &NiDX9DynamicTextureData::`vector deleting destructor'; // weak
int (__thiscall *NiD3DGeometryGroupManager::`vftable')(void *p, char) = &NiD3DGeometryGroupManager::`scalar deleting destructor'; // weak
int (__thiscall *NiDX9TextureManager::`vftable')(void *p, char) = &NiDX9TextureManager::`scalar deleting destructor'; // weak
int (__thiscall *NiD3DShaderProgramCreator::`vftable')(void *p, char) = &NiD3DShaderProgramCreatorHLSL::`vector deleting destructor'; // weak
int (__thiscall *NiD3DShaderProgramCreatorHLSL::`vftable')(void *p, char) = &NiD3DShaderProgramCreatorHLSL::`vector deleting destructor'; // weak
int (__thiscall *NiD3DShaderProgramCreatorAsm::`vftable')(void *p, char) = &NiD3DShaderProgramCreatorAsm::`scalar deleting destructor'; // weak
int (__thiscall *NiD3DShaderProgramCreatorObj::`vftable')(void *p, char) = &NiD3DShaderProgramCreatorAsm::`scalar deleting destructor'; // weak
int (__thiscall *NiD3DShaderDeclaration::`vftable')(void *p, char) = &NiD3DShaderDeclaration::`scalar deleting destructor'; // weak
int (__thiscall *NiTArray<NiD3DShaderDeclaration::NiPackerEntry *>::`vftable')(void *p, char) = &NiTArray<NiD3DShaderDeclaration::NiPackerEntry *>::`vector deleting destructor'; // weak
int (__thiscall *NiTArray<unsigned int (__cdecl *)(NiD3DShaderDeclaration::PackingParameters &)>::`vftable')(void *p, char) = &NiTArray<unsigned int (__cdecl *)(NiD3DShaderDeclaration::PackingParameters &)>::`scalar deleting destructor'; // weak
int (__thiscall *NiD3DRenderState::`vftable')(void *p, char) = &NiD3DRenderState::`vector deleting destructor'; // weak
int (__thiscall *NiDX9ShaderConstantManager::`vftable')(void *p, char) = &NiDX9ShaderConstantManager::`scalar deleting destructor'; // weak
int (__thiscall *NiTArray<NiVBChip *>::`vftable')(void *p, char) = &NiTArray<NiVBChip *>::`vector deleting destructor'; // weak
int (__thiscall *NiTArray<NiVBBlock *>::`vftable')(void *p, char) = &NiTArray<NiVBBlock *>::`vector deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerMap<unsigned int,NiVBSet *>::`vftable')(void *p, char) = &NiTPointerMap<unsigned int,NiVBSet *>::`scalar deleting destructor'; // weak
void (__thiscall *NiStaticGeometryGroup::`vftable')(NiStaticGeometryGroup *__hidden this) = &NiStaticGeometryGroup::Purge; // weak
int (__cdecl *NiUnsharedGeometryGroup::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys) = &ITableBase<TextDataType3,TextData3>::BeforeTerminate; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBDynamicSet *>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBDynamicSet *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBChip *>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBChip *>::`vector deleting destructor'; // weak
int (__thiscall *NiTArray<NiVBDynamicSet *>::`vftable')(void *p, char) = &NiTArray<NiVBDynamicSet *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerMap<unsigned int,NiVBDynamicSet *>::`vftable')(void *p, char) = &NiTPointerMap<unsigned int,NiVBDynamicSet *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerMap<unsigned int,NiVBChip *>::`vftable')(void *p, char) = &NiTPointerMap<unsigned int,NiVBChip *>::`vector deleting destructor'; // weak
void (__thiscall *NiDynamicGeometryGroup::`vftable')(NiDynamicGeometryGroup *__hidden this) = &NiDynamicGeometryGroup::Purge; // weak
int (__thiscall *NiD3DPixelShader::`vftable')(void *p, char) = &NiD3DPixelShader::`scalar deleting destructor'; // weak
int (__thiscall *NiD3DVertexShader::`vftable')(void *p, char) = &NiD3DVertexShader::`vector deleting destructor'; // weak
int (__thiscall *NiD3DHLSLPixelShader::`vftable')(void *p, char) = &NiD3DHLSLPixelShader::`vector deleting destructor'; // weak
int (__thiscall *NiD3DHLSLVertexShader::`vftable')(void *p, char) = &NiD3DHLSLVertexShader::`scalar deleting destructor'; // weak
int (*NiGeometryGroup::`vftable'[9])() =
{
  &_purecall,
  &_purecall,
  &_purecall,
  &_purecall,
  &_purecall,
  &_purecall,
  &_purecall,
  &_purecall,
  &_purecall
}; // weak
int (__thiscall *NiD3DShaderProgram::`vftable')(void *p, char) = &NiD3DShaderProgram::`vector deleting destructor'; // weak
GUID GUID_SysKeyboard = { 1864182625u, 54688u, 4559u, "¿ÇDEST" };
GUID GUID_SysMouse = { 1864182624u, 54688u, 4559u, "¿ÇDEST" };
GUID GUID_POV = { 2741830386u, 51699u, 4559u, "¿ÇDEST" };
GUID GUID_Key = { 1433567776u, 54076u, 4559u, "¿ÇDEST" };
GUID GUID_Button = { 2741830384u, 51699u, 4559u, "¿ÇDEST" };
GUID GUID_Slider = { 2741830372u, 51699u, 4559u, "¿ÇDEST" };
GUID GUID_RzAxis = { 2741830371u, 51699u, 4559u, "¿ÇDEST" };
GUID GUID_RyAxis = { 2741830389u, 51699u, 4559u, "¿ÇDEST" };
GUID GUID_RxAxis = { 2741830388u, 51699u, 4559u, "¿ÇDEST" };
GUID GUID_ZAxis = { 2741830370u, 51699u, 4559u, "¿ÇDEST" };
GUID GUID_YAxis = { 2741830369u, 51699u, 4559u, "¿ÇDEST" };
GUID GUID_XAxis = { 2741830368u, 51699u, 4559u, "¿ÇDEST" };
GUID IID_IDirectInput8A = { 3212410928u, 18490u, 19874u, "ª™]dí6—" };
GUID IID_ID3DXEffect = { 3513109681u, 25264u, 18995u, "³ú©#0Z\x11" };
GUID IID_ID3DXEffectStateManager = { 2041230727u, 28092u, 20391u, "‚Þ7ú\x17�ÅÎ" };
GUID IID_IDirect3DTexture9 = { 2244153895u, 15845u, 20224u, "›:ñ\x1AÃŒ\x18µ" };
_UNKNOWN c_dfDIMouse2; // weak
const DIDATAFORMAT c_dfDIKeyboard = { 24u, 16u, 2u, 256u, 256u, &c_rgodfDIKeyboard };
const int PacketEncrypt::pe_encryptlen = 499; // weak
char png_libpng_ver[6] = "1.2.8"; // weak
int png_IHDR = 1380206665; // weak
int png_IDAT = 1413563465; // weak
int png_IEND = 1145980233; // weak
int png_PLTE = 1163152464; // weak
int png_bKGD = 1145523042; // weak
int png_cHRM = 1297238115; // weak
int png_gAMA = 1095582055; // weak
int png_hIST = 1414744424; // weak
int png_iCCP = 1346585449; // weak
int png_oFFs = 1933985391; // weak
int png_pCAL = 1279345520; // weak
int png_sCAL = 1279345523; // weak
int png_pHYs = 1935231088; // weak
int png_sBIT = 1414087283; // weak
int png_sPLT = 1414287475; // weak
int png_sRGB = 1111970419; // weak
int png_tEXt = 1951942004; // weak
int png_tIME = 1162692980; // weak
int png_tRNS = 1397641844; // weak
int png_zTXt = 1951945850; // weak
int png_pass_start[] = { 0 }; // weak
int png_pass_inc[] = { 8 }; // weak
int png_pass_ystart[] = { 0 }; // weak
int png_pass_yinc[] = { 8 }; // weak
int png_pass_mask[] = { 128 }; // weak
char png_digit[34] = "0123456789ABCDEFlibpng error: %s\n"; // idb
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiImageReader *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiImageReader *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiImageReader *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiImageReader *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerList<NiImageReader *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiImageReader *>::`scalar deleting destructor'; // weak
int (__thiscall *NiDevImageConverter::`vftable')(void *p, char) = &NiDevImageConverter::`scalar deleting destructor'; // weak
int (__thiscall *NiTArray<NiPointer<NiShaderDesc>>::`vftable')(void *p, char) = &NiTArray<NiPointer<NiShaderDesc>>::`vector deleting destructor'; // weak
int (__thiscall *NiShaderLibraryDesc::`vftable')(void *p, char) = &NiShaderLibraryDesc::`scalar deleting destructor'; // weak
int (__thiscall *NiTArray<NiShaderRequirementDesc *>::`vftable')(void *p, char) = &NiTArray<NiShaderRequirementDesc *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiShaderAttributeDesc>>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiShaderAttributeDesc>>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiShaderAttributeDesc>>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiShaderAttributeDesc>>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerList<NiPointer<NiShaderAttributeDesc>>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiShaderAttributeDesc>>::`scalar deleting destructor'; // weak
int (__thiscall *NiShaderDesc::`vftable')(void *p, char) = &NiShaderDesc::`vector deleting destructor'; // weak
int (__thiscall *NiShaderRequirementDesc::`vftable')(void *p, char) = &NiShaderRequirementDesc::`vector deleting destructor'; // weak
int (__thiscall *NiShaderAttributeDesc::`vftable')(void *p, char) = &NiShaderAttributeDesc::`vector deleting destructor'; // weak
const unsigned int NiSCMExtraData::m_uiPassShift = 16u; // weak
int (__thiscall *NiSCMExtraData::`vftable')(void *p, char) = &NiSCMExtraData::`vector deleting destructor'; // weak
int (__thiscall *NiTGAReader::`vftable')(void *p, char) = &NiTGAReader::`scalar deleting destructor'; // weak
int (__thiscall *NiSGIReader::`vftable')(void *p, char) = &NiBMPReader::`scalar deleting destructor'; // weak
int (__thiscall *NiDDSReader::`vftable')(void *p, char) = &NiBMPReader::`scalar deleting destructor'; // weak
int (__thiscall *NiBMPReader::`vftable')(void *p, char) = &NiBMPReader::`scalar deleting destructor'; // weak
int (__thiscall *NiShaderDescBase::`vftable')(void *p, char) = &NiShaderDescBase::`scalar deleting destructor'; // weak
int (__thiscall *NiCursor::`vftable')(void *p, char) = &NiCursor::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NSBObjectTable::ObjectDesc *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NSBObjectTable::ObjectDesc *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTArray<NSBImplementation *>::`vftable')(void *p, char) = &NiTArray<NSBImplementation *>::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NSBImplementation *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NSBImplementation *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBImplementation *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBImplementation *>::`vector deleting destructor'; // weak
int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NSBPackingDef *>::`vftable')(void *p, char) = &NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NSBPackingDef *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBObjectTable::ObjectDesc *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBObjectTable::ObjectDesc *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerMap<char const *,NSBPackingDef *>::`vftable')(void *p, char) = &NiTPointerMap<char const *,NSBPackingDef *>::`vector deleting destructor'; // weak
int (__thiscall *NiTStringTemplateMap<NiTPointerMap<char const *,NSBPackingDef *>,NSBPackingDef *>::`vftable')(void *p, char) = &NiTStringPointerMap<NSBPackingDef *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerList<NSBObjectTable::ObjectDesc *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBObjectTable::ObjectDesc *>::`vector deleting destructor'; // weak
int (__thiscall *NSBShader::`vftable')(void *p, char) = &NSBShader::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerList<NSBImplementation *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBImplementation *>::`vector deleting destructor'; // weak
int (__thiscall *NiTStringPointerMap<NSBPackingDef *>::`vftable')(void *p, char) = &NiTStringPointerMap<NSBPackingDef *>::`vector deleting destructor'; // weak
bool (__thiscall *NSBAttributeDesc::`vftable'[24])(NSBAttributeDesc *this, struct NiBinaryStream *) =
{
  &NSBAttributeDesc::SaveBinary_Bool,
  &NSBAttributeDesc::SaveBinary_String,
  &NSBAttributeDesc::SaveBinary_Float,
  &NSBAttributeDesc::SaveBinary_Float,
  &NSBAttributeDesc::SaveBinary_Point2,
  &NSBAttributeDesc::SaveBinary_Point3,
  &NSBAttributeDesc::SaveBinary_Color,
  &NSBAttributeDesc::SaveBinary_Matrix3,
  &NSBAttributeDesc::SaveBinary_Matrix4,
  &NSBAttributeDesc::SaveBinary_Color,
  &NSBAttributeDesc::SaveBinary_Texture,
  &NSBAttributeDesc::SaveBinary_Array,
  &NSBAttributeDesc::LoadBinary_Bool,
  &NSBAttributeDesc::LoadBinary_String,
  &NSBAttributeDesc::LoadBinary_UnsignedInt,
  &NSBAttributeDesc::LoadBinary_UnsignedInt,
  &NSBAttributeDesc::LoadBinary_Point2,
  &NSBAttributeDesc::LoadBinary_Point3,
  &NSBAttributeDesc::LoadBinary_Color,
  &NSBAttributeDesc::LoadBinary_Matrix3,
  &NSBAttributeDesc::LoadBinary_Matrix4,
  &NSBAttributeDesc::LoadBinary_Color,
  &NSBAttributeDesc::LoadBinary_Texture,
  &NSBAttributeDesc::LoadBinary_Array
}; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NSBAttributeDesc *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NSBAttributeDesc *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBAttributeDesc *>::`vftable')(void *p, char) = &NiTPointerList<NSBAttributeDesc *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerList<NSBAttributeDesc *>::`vftable')(void *p, char) = &NiTPointerList<NSBAttributeDesc *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NSBConstantMap::NSBCM_Entry *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NSBConstantMap::NSBCM_Entry *>::`vector deleting destructor'; // weak
int (__thiscall *NSBConstantMap::NSBCM_Entry::`vftable')(void *p, char) = &NSBConstantMap::NSBCM_Entry::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBConstantMap::NSBCM_Entry *>::`vftable')(void *p, char) = &NiTPointerList<NSBConstantMap::NSBCM_Entry *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerList<NSBConstantMap::NSBCM_Entry *>::`vftable')(void *p, char) = &NiTPointerList<NSBConstantMap::NSBCM_Entry *>::`scalar deleting destructor'; // weak
int (__thiscall *NSBConstantMap::`vftable')(void *p, char) = &NSBConstantMap::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NSBUserDefinedDataBlock *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NSBUserDefinedDataBlock *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBUserDefinedDataBlock *>::`vftable')(void *p, char) = &NiTPointerList<NSBUserDefinedDataBlock *>::`scalar deleting destructor'; // weak
int (__thiscall *NSBUserDefinedDataBlock::`vftable')(void *p, char) = &NSBUserDefinedDataBlock::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerList<NSBUserDefinedDataBlock *>::`vftable')(void *p, char) = &NiTPointerList<NSBUserDefinedDataBlock *>::`scalar deleting destructor'; // weak
int (__thiscall *NSBUserDefinedDataSet::`vftable')(void *p, char) = &NSBUserDefinedDataSet::`vector deleting destructor'; // weak
int (__thiscall *NiTArray<NSBPass *>::`vftable')(void *p, char) = &NiTArray<NSBPass *>::`vector deleting destructor'; // weak
int (__thiscall *NiTArray<NSBTextureStage *>::`vftable')(void *p, char) = &NiTArray<NSBTextureStage *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NSBStateGroup::NSBSGEntry *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NSBStateGroup::NSBSGEntry *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBStateGroup::NSBSGEntry *>::`vftable')(void *p, char) = &NiTPointerList<NSBStateGroup::NSBSGEntry *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerList<NSBStateGroup::NSBSGEntry *>::`vftable')(void *p, char) = &NiTPointerList<NSBStateGroup::NSBSGEntry *>::`vector deleting destructor'; // weak
int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NSBPackingDef::NSBPDEntry *>::`vftable')(void *p, char) = &NiTListBase<NiTPointerAllocator<unsigned int>,NSBPackingDef::NSBPDEntry *>::`vector deleting destructor'; // weak
int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBPackingDef::NSBPDEntry *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBPackingDef::NSBPDEntry *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTPointerList<NSBPackingDef::NSBPDEntry *>::`vftable')(void *p, char) = &NiTPointerListBase<NiTPointerAllocator<unsigned int>,NSBPackingDef::NSBPDEntry *>::`scalar deleting destructor'; // weak
int (__thiscall *NiTArray<NiPointer<NSBUserDefinedDataSet>>::`vftable')(void *p, char) = &NiTArray<NiPointer<NSBUserDefinedDataSet>>::`scalar deleting destructor'; // weak
int (__thiscall *NiBinaryShader::`vftable')(void *p, char) = &NiBinaryShader::`scalar deleting destructor'; // weak
int (__thiscall *NsFNC_35::`vftable')(void *p, char) = &NsFNC_35::`vector deleting destructor'; // weak
int (__thiscall *NsFNC_123::`vftable')(void *p, char) = &NsFNC_123::`vector deleting destructor'; // weak
int (__thiscall *NsFNC_125::`vftable')(void *p, char) = &NsFNC_125::`vector deleting destructor'; // weak
int (__thiscall *NsFNC_58::`vftable')(void *p, char) = &NsFNC_58::`vector deleting destructor'; // weak
int (__thiscall *NsFNC_34::`vftable')(void *p, char) = &NsFNC_34::`vector deleting destructor'; // weak
struct INsFile *(__thiscall *NsFileReader::`vftable')(NsFileReader *this, const char *_strFileName) = &NsFileReader::LoadFile; // weak
int (__thiscall *NsTextCodeV0_2::`vftable')(void *p, char) = &NsTextCodeV0_2::`vector deleting destructor'; // weak
int (__thiscall *INsFile_NodeCreater::`vftable')(void *p, char) = &INsFile_NodeCreater::`vector deleting destructor'; // weak
int (__thiscall *INsFile::`vftable')(void *p, char) = &INsFile::`vector deleting destructor'; // weak
int (__thiscall *NiD3DSCM_Pixel::`vftable')(void *p, char) = &NiD3DSCM_Pixel::`scalar deleting destructor'; // weak
_UNKNOWN __rtc_izz; // weak
_UNKNOWN __rtc_tzz; // weak
_s__ThrowInfo _TI2_AVbad_alloc_std__ = { 0u, &std::bad_alloc::~bad_alloc, NULL, &_CTA2_AVbad_alloc_std__ }; // idb
_s__ThrowInfo _TI4_AVfailure_ios_base_std__ =
{
  0u,
  &boost::bad_function_call::~bad_function_call,
  NULL,
  &_CTA4_AVfailure_ios_base_std__
}; // idb
_s__ThrowInfo _TI2_AVruntime_error_std__ =
{
  0u,
  &boost::bad_function_call::~bad_function_call,
  NULL,
  &_CTA2_AVruntime_error_std__
}; // idb
_s__ThrowInfo _TI2_AVbad_cast_std__ = { 0u, &std::exception::~exception, NULL, &_CTA2_AVbad_cast_std__ }; // idb
_s__ThrowInfo _TI1_AVCAtlException_ATL__ = { 0u, NULL, NULL, &_CTA1_AVCAtlException_ATL__ }; // idb
_s__ThrowInfo _TI3_AVbad_function_call_boost__ =
{
  0u,
  &boost::bad_function_call::~bad_function_call,
  NULL,
  &_CTA3_AVbad_function_call_boost__
}; // idb
_s__ThrowInfo _TI1_AVexception_std__ = { 0u, &std::exception::~exception, NULL, &_CTA1_AVexception_std__ }; // idb
unsigned int crc_32_tab[256] =
{
  0u,
  1996959894u,
  3993919788u,
  2567524794u,
  124634137u,
  1886057615u,
  3915621685u,
  2657392035u,
  249268274u,
  2044508324u,
  3772115230u,
  2547177864u,
  162941995u,
  2125561021u,
  3887607047u,
  2428444049u,
  498536548u,
  1789927666u,
  4089016648u,
  2227061214u,
  450548861u,
  1843258603u,
  4107580753u,
  2211677639u,
  325883990u,
  1684777152u,
  4251122042u,
  2321926636u,
  335633487u,
  1661365465u,
  4195302755u,
  2366115317u,
  997073096u,
  1281953886u,
  3579855332u,
  2724688242u,
  1006888145u,
  1258607687u,
  3524101629u,
  2768942443u,
  901097722u,
  1119000684u,
  3686517206u,
  2898065728u,
  853044451u,
  1172266101u,
  3705015759u,
  2882616665u,
  651767980u,
  1373503546u,
  3369554304u,
  3218104598u,
  565507253u,
  1454621731u,
  3485111705u,
  3099436303u,
  671266974u,
  1594198024u,
  3322730930u,
  2970347812u,
  795835527u,
  1483230225u,
  3244367275u,
  3060149565u,
  1994146192u,
  31158534u,
  2563907772u,
  4023717930u,
  1907459465u,
  112637215u,
  2680153253u,
  3904427059u,
  2013776290u,
  251722036u,
  2517215374u,
  3775830040u,
  2137656763u,
  141376813u,
  2439277719u,
  3865271297u,
  1802195444u,
  476864866u,
  2238001368u,
  4066508878u,
  1812370925u,
  453092731u,
  2181625025u,
  4111451223u,
  1706088902u,
  314042704u,
  2344532202u,
  4240017532u,
  1658658271u,
  366619977u,
  2362670323u,
  4224994405u,
  1303535960u,
  984961486u,
  2747007092u,
  3569037538u,
  1256170817u,
  1037604311u,
  2765210733u,
  3554079995u,
  1131014506u,
  879679996u,
  2909243462u,
  3663771856u,
  1141124467u,
  855842277u,
  2852801631u,
  3708648649u,
  1342533948u,
  654459306u,
  3188396048u,
  3373015174u,
  1466479909u,
  544179635u,
  3110523913u,
  3462522015u,
  1591671054u,
  702138776u,
  2966460450u,
  3352799412u,
  1504918807u,
  783551873u,
  3082640443u,
  3233442989u,
  3988292384u,
  2596254646u,
  62317068u,
  1957810842u,
  3939845945u,
  2647816111u,
  81470997u,
  1943803523u,
  3814918930u,
  2489596804u,
  225274430u,
  2053790376u,
  3826175755u,
  2466906013u,
  167816743u,
  2097651377u,
  4027552580u,
  2265490386u,
  503444072u,
  1762050814u,
  4150417245u,
  2154129355u,
  426522225u,
  1852507879u,
  4275313526u,
  2312317920u,
  282753626u,
  1742555852u,
  4189708143u,
  2394877945u,
  397917763u,
  1622183637u,
  3604390888u,
  2714866558u,
  953729732u,
  1340076626u,
  3518719985u,
  2797360999u,
  1068828381u,
  1219638859u,
  3624741850u,
  2936675148u,
  906185462u,
  1090812512u,
  3747672003u,
  2825379669u,
  829329135u,
  1181335161u,
  3412177804u,
  3160834842u,
  628085408u,
  1382605366u,
  3423369109u,
  3138078467u,
  570562233u,
  1426400815u,
  3317316542u,
  2998733608u,
  733239954u,
  1555261956u,
  3268935591u,
  3050360625u,
  752459403u,
  1541320221u,
  2607071920u,
  3965973030u,
  1969922972u,
  40735498u,
  2617837225u,
  3943577151u,
  1913087877u,
  83908371u,
  2512341634u,
  3803740692u,
  2075208622u,
  213261112u,
  2463272603u,
  3855990285u,
  2094854071u,
  198958881u,
  2262029012u,
  4057260610u,
  1759359992u,
  534414190u,
  2176718541u,
  4139329115u,
  1873836001u,
  414664567u,
  2282248934u,
  4279200368u,
  1711684554u,
  285281116u,
  2405801727u,
  4167216745u,
  1634467795u,
  376229701u,
  2685067896u,
  3608007406u,
  1308918612u,
  956543938u,
  2808555105u,
  3495958263u,
  1231636301u,
  1047427035u,
  2932959818u,
  3654703836u,
  1088359270u,
  936918000u,
  2847714899u,
  3736837829u,
  1202900863u,
  817233897u,
  3183342108u,
  3401237130u,
  1404277552u,
  615818150u,
  3134207493u,
  3453421203u,
  1423857449u,
  601450431u,
  3009837614u,
  3294710456u,
  1567103746u,
  711928724u,
  3020668471u,
  3272380065u,
  1510334235u,
  755167117u
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > BlockedData[104] =
{
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      15u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  },
  {
    {,
      {
        {
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0',
          '\0'
        }
      },
      0u,
      0u,
      {  }
    }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68594 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A685B0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A685CC =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A685E8 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68604 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68620 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A6863C =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68658 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68674 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68690 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A686AC =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A686C8 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A686E4 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68700 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A6871C =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68738 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68754 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68770 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A6878C =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A687A8 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A687C4 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A687E0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A687FC =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68818 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68834 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68850 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A6886C =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68888 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A688A4 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A688C0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A688DC =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A688F8 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68914 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68930 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A6894C =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68968 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68984 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A689A0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A689BC =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A689D8 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A689F4 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68A10 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68A2C =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68A48 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68A64 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68A80 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68A9C =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68AB8 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68AD4 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68AF0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68B0C =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68B28 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68B44 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68B60 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68B7C =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68B98 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68BB4 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68BD0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68BEC =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68C08 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68C24 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68C40 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68C5C =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68C78 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68C94 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68CB0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68CCC =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68CE8 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68D04 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68D20 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68D3C =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68D58 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68D74 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68D90 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68DAC =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68DC8 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68DE4 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68E00 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68E1C =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68E38 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68E54 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68E70 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68E8C =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68EA8 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68EC4 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68EE0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68EFC =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68F18 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68F34 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68F50 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68F6C =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68F88 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68FA4 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68FC0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68FDC =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A68FF8 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A69014 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A69030 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A6904C =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A69068 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A69084 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A690A0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A690BC =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    0u,
    {  }
  }
}; // idb
int (__thiscall **NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>> `RTTI Type Descriptor')(void *p, char) = &type_info::`vftable'; // weak
bool CharSelectFrameWork::bRandomMode = true; // weak
D3DXCOLOR Color::m_kDxWhiteColor = {  1.0,  1.0,  1.0,  1.0 }; // idb
D3DXCOLOR Color::m_kDxBlackColor = {  0.0,  0.0,  0.0,  1.0 }; // idb
D3DXCOLOR Color::m_kDxRedColor = {  1.0,  0.0,  0.0,  1.0 }; // idb
D3DXCOLOR Color::m_kDxGreenColor = {  0.40000001,  1.0,  0.2,  1.0 }; // idb
struct D3DXCOLOR Color::m_kDxBlueColor = {  0.56470591,  0.78431374,  1.0,  1.0 }; // weak
__int64 qword_A695F8 = 4575657222473777152i64; // weak
D3DXCOLOR Color::m_kDxYellowColor = {  1.0,  1.0,  0.0,  1.0 }; // idb
_UNKNOWN Color::m_kDxGoldColor; // weak
float flt_A69618 =  0.0; // weak
_UNKNOWN Color::m_kDxOrangeColor; // weak
_UNKNOWN Color::m_kDxGrayColor; // weak
float flt_A69654 =  0.0; // weak
float flt_A69668 =  0.0; // weak
float flt_A69674 =  0.0; // weak
struct D3DXCOLOR Color::m_kDxLPTextColor = {  0.30980393,  0.15686275,  0.062745102,  1.0 }; // weak
_UNKNOWN Color::m_kDxMenuColor; // weak
float flt_A696C4 =  0.0; // weak
float flt_A696C8 =  0.0; // weak
struct D3DXCOLOR Color::m_kDxNpcNameColor = {  0.0,  1.0,  0.0,  1.0 }; // weak
float flt_A696D8 =  0.0; // weak
struct D3DXCOLOR Color::m_kDxWinTitleColor = {  1.0,  1.0,  0.0,  1.0 }; // weak
_UNKNOWN Color::m_kDxWinTabColor; // weak
char *ShineFontName::ORIGINAL = "verdana.ttf"; // idb
char *ShineFontName::ENCRYPTED = "npctext.dat"; // idb
char *ShineFontName::DECRYPTED = "npcdlg.dat"; // idb
char *ShineFontName::ORIGINAL_BOLD = "verdana.ttf"; // idb
char *ShineFontName::ENCRYPTED_BOLD = "npctextbox.dat"; // idb
char *ShineFontName::DECRYPTED_BOLD = "npcdlgbox.dat"; // idb
bool Font::ms_bUsePrivateFont = true; // weak
char *Font::ms_pcEncryptSeed = "shinefontfileencrypt"; // idb
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > IconMgr::ms_kTextureMap =
{
  &NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,char const *,NiPointer<NiSourceTexture>>::`vftable',
  37u,
  NULL,
  { , 0u }
}; // idb
char byte_A69BAC = '\0'; // weak
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > IconMgr::ms_kAniTextureMap =
{
  &NiTMapBase<DFALL<NiPointer<NiTexturingProperty>>,char const *,NiPointer<NiTexturingProperty>>::`vftable',
  37u,
  NULL,
  { , 0u }
}; // idb
char byte_A69BC0 = '\0'; // weak
const char **MenuTexStr = &aCommonCommon; // weak
type_info boost::checked_deleter<SlideListWin::ListItem> `RTTI Type Descriptor' = { &type_info::`vftable', NULL, "." }; // idb
type_info boost::checked_deleter<SLWCreateInfo::Item> `RTTI Type Descriptor' = { &type_info::`vftable', NULL, "." }; // idb
bool Cursor::ms_bShow = true; // weak
bool Cursor::ms_bEnableHardware = true; // weak
enum Cursor::Type Cursor::ms_eType = 17; // weak
char *apcFileName[16] =
{
  "cursor\\NorCursor.cur",
  "cursor\\AtkCursor.cur",
  "cursor\\DropCursor.cur",
  "cursor\\DropCursor2.cur",
  "cursor\\NonCastCursor.cur",
  "cursor\\CastCursor.cur",
  "cursor\\NpcCursor.cur",
  "cursor\\MiningCursor.cur",
  "cursor\\CollectCursor.cur",
  "cursor\\QuestCursor.cur",
  "cursor\\Scroll.cur",
  "cursor\\repairCursor.cur",
  "cursor\\repairCursor.cur",
  "cursor\\Enchant.cur",
  "cursor\\RecoverCusror.cur",
  "cursor\\PutOnClear.cur"
}; // idb
int (__thiscall **NiZBufferProperty `RTTI Type Descriptor')(void *p, char) = &type_info::`vftable'; // weak
int CPropertyType<bool>::ms_TypeID = 1; // weak
int CPropertyType<float>::ms_TypeID = 4; // weak
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhResObjDefaultRootName =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhObjDefaultRootName =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhRoomDefaultRootName =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhRoomWallName =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhRoomFloorName =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhRoomRoofName =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhRoomBlockName =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhRoomTexStyleTileName =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhRoomTexStyleCustomName =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhStoCMapName =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhCollisionParentName =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhObjGeomParentName =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhCollisionParentNamePick =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhObjAmbLightNULL =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhObjAmbLightNormal =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhObjAmbLightMoveOK =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhObjAmbLightMoveNO =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhObjAmbLightRepair =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhCharColliNodeName =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhCharColliRootNodeName =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhOtherCharColliRootName =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
type_info CBaseObject `RTTI Type Descriptor' = { &type_info::`vftable', NULL, "." }; // idb
type_info CWorldConfig `RTTI Type Descriptor' = { &type_info::`vftable', NULL, "." }; // idb
int dword_A6F1D0 = 0; // weak
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhRoomWallName_0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhRoomFloorName_0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhRoomRoofName_0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
float g_fAttackableDist =  50.0; // weak
unsigned int GameFrameWork::ms_uiDisResWidth = 1024u; // idb
unsigned int GameFrameWork::ms_uiDisResHeight = 768u; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > GameFrameWork::ms_strLauncher =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
OptionManager GameFrameWork::m_kOptionManager =
{
  &OptionManager::`vftable',
  { { { &NiTList<IOptionBase *>::`vftable', NULL, NULL, { , 0u } } } }
}; // idb
bool InventoryWin::ms_bGetDropItemActionReady = true; // weak
bool InventoryWin::ms_bBuyPrivateStoreActionReady = true; // weak
unsigned int PopupMenuTemplate::ms_uiWingStoneMemorySlot0 = 4294967295u; // weak
unsigned int PopupMenuTemplate::ms_uiWingStoneMemorySlot1 = 4294967295u; // weak
unsigned int PopupMenuTemplate::ms_uiWingStoneMemorySlot2 = 4294967295u; // weak
unsigned int PopupMenuTemplate::ms_uiWingStoneMemorySlot3 = 4294967295u; // weak
unsigned int PopupMenuTemplate::ms_uiWingStoneMemorySlot4 = 4294967295u; // weak
unsigned __int16 PopupMenuTemplate::ms_smiMapID0 = 65535u; // weak
unsigned __int16 PopupMenuTemplate::ms_smiMapID1 = 65535u; // weak
unsigned __int16 PopupMenuTemplate::ms_smiMapID2 = 65535u; // weak
unsigned __int16 PopupMenuTemplate::ms_smiMapID3 = 65535u; // weak
unsigned __int16 PopupMenuTemplate::ms_smiMapID4 = 65535u; // weak
unsigned int PrivateStoreWin::ms_uiPrivateStoreMode = 1u; // weak
unsigned __int8 PrivateStoreWin::ms_byBoothSize = 5u; // weak
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> SkillIcon::ms_kSkillIconList = { { &NiTList<SkillIcon *>::`vftable', NULL, NULL, { {  }, 0u } } }; // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> ICharDeadEvent::ms_kEventList = { { &NiTList<ICharDeadEvent *>::`vftable', NULL, NULL, { {  }, 0u } } }; // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> MagicField::ms_kMagicFieldList = { { &NiTList<MagicField *>::`vftable', NULL, NULL, { {  }, 0u } } }; // idb
int (__thiscall **ItemMarket::ms_kItemSellInfoList)(void *p, char) = &NiTList<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>::`vftable'; // weak
int dword_A72C94 = 0; // weak
int dword_A72C98 = 0; // weak
int dword_A72C9C = 0; // weak
float CharScreenBoardBase::ms_fMaxDistance =  1000.0; // weak
float CharScreenBoardBase::ms_fTransNear =  700.0; // weak
float CharScreenBoardBase::ms_fTransFar =  1000.0; // weak
int StandLength = 700; // idb
unsigned int LevelGapColor[5] = { 255u, 628479u, 65535u, 65280u, 13553358u }; // idb
float GuildBD::ms_fMaxDistance =  1000.0; // weak
float GuildBD::ms_fTransNear =  700.0; // weak
float GuildBD::ms_fTransFar =  1000.0; // weak
float NameBD::ms_fMaxDistance =  1000.0; // weak
float NameBD::ms_fTransNear =  700.0; // weak
float NameBD::ms_fTransFar =  1000.0; // weak
char ms_abyBoardLeftTopSpr[16] =
{
  '\0',
  '\0',
  '\0',
  '\x02',
  '\0',
  '\0',
  '\x02',
  '\x01',
  '\0',
  '\x02',
  '\x01',
  '\x02',
  '\x02',
  '\x01',
  '\x02',
  '\x02'
}; // idb
char ms_abyBoardLeftBottomSpr[16] =
{
  '\x02',
  '\x01',
  '\x02',
  '\x02',
  '\0',
  '\x02',
  '\x01',
  '\x02',
  '\0',
  '\0',
  '\x02',
  '\x01',
  '\0',
  '\0',
  '\0',
  '\x02'
}; // idb
char ms_abyBoardRightTopSpr[16] =
{
  '\x02',
  '\0',
  '\0',
  '\0',
  '\x01',
  '\x02',
  '\0',
  '\0',
  '\x02',
  '\x01',
  '\x02',
  '\0',
  '\x02',
  '\x02',
  '\x01',
  '\x02'
}; // idb
char ms_abyBoardRightBottomSpr[16] =
{
  '\x02',
  '\x02',
  '\x01',
  '\x02',
  '\x02',
  '\x01',
  '\x02',
  '\0',
  '\x01',
  '\x02',
  '\0',
  '\0',
  '\x02',
  '\0',
  '\0',
  '\0'
}; // idb
float PrivateStoreBD::ms_fLifeTime =  12.0; // weak
float PrivateStoreBD::ms_fMaxDistance =  1000.0; // weak
float PrivateStoreBD::ms_fTransNear =  700.0; // weak
float PrivateStoreBD::ms_fTransFar =  1000.0; // weak
char ms_abyBoardLeftTopSpr_0[16] =
{
  '\0',
  '\0',
  '\0',
  '\x02',
  '\0',
  '\0',
  '\x02',
  '\x01',
  '\0',
  '\x02',
  '\x01',
  '\x02',
  '\x02',
  '\x01',
  '\x02',
  '\x02'
}; // idb
char ms_abyBoardLeftBottomSpr_0[16] =
{
  '\x02',
  '\x01',
  '\x02',
  '\x02',
  '\0',
  '\x02',
  '\x01',
  '\x02',
  '\0',
  '\0',
  '\x02',
  '\x01',
  '\0',
  '\0',
  '\0',
  '\x02'
}; // idb
char ms_abyBoardRightTopSpr_0[16] =
{
  '\x02',
  '\0',
  '\0',
  '\0',
  '\x01',
  '\x02',
  '\0',
  '\0',
  '\x02',
  '\x01',
  '\x02',
  '\0',
  '\x02',
  '\x02',
  '\x01',
  '\x02'
}; // idb
char ms_abyBoardRightBottomSpr_0[16] =
{
  '\x02',
  '\x02',
  '\x01',
  '\x02',
  '\x02',
  '\x01',
  '\x02',
  '\0',
  '\x01',
  '\x02',
  '\0',
  '\0',
  '\x02',
  '\0',
  '\0',
  '\0'
}; // idb
float SpeechBD::ms_fMaxDistance =  1000.0; // weak
float SpeechBD::ms_fTransNear =  700.0; // weak
float SpeechBD::ms_fTransFar =  1000.0; // weak
int StandLength_0 = 700; // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> ITimer::m_kTimerList = { { &NiTList<ITimer *>::`vftable', NULL, NULL, { {  }, 0u } } }; // idb
char aucGener[12] =
{
  '\x01',
  '\0',
  '\x01',
  '\0',
  '\x01',
  '\0',
  '\x01',
  '\0',
  '\x01',
  '\0',
  '\x01',
  '\0'
}; // idb
char akClass[12] =
{
  '\x01',
  '\x01',
  '\x06',
  '\x06',
  '\v',
  '\v',
  '\x10',
  '\x10',
  '\x15',
  '\x15',
  '\x1A',
  '\x1A'
}; // idb
char *apcFileName_0[12] =
{
  "Fighter-M",
  "Fighter-F",
  "Cleric-M",
  "Cleric-F",
  "Archer-M",
  "Archer-F",
  "Mage-M",
  "Mage-F",
  "Joker-M",
  "Joker-F",
  "Sentinel-M",
  "Sentinel-F"
}; // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> ActionInfoTable::m_kCharMap =
{
  &NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *>::`vftable',
  37u,
  NULL,
  { {  }, 0u }
}; // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> ActionInfoTable::m_kMobMap =
{
  &NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *>::`vftable',
  37u,
  NULL,
  { {  }, 0u }
}; // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> ActionInfoTable::m_kRidePetMap =
{
  &NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *>::`vftable',
  37u,
  NULL,
  { {  }, 0u }
}; // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> ActionInfoTable::m_kMoverMap =
{
  &NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *>::`vftable',
  37u,
  NULL,
  { {  }, 0u }
}; // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> ActionInfoTable::m_kPetMap =
{
  &NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *>::`vftable',
  37u,
  NULL,
  { {  }, 0u }
}; // idb
bool Char::ms_bEnableCarToon = true; // weak
int LevelGapValue[5] = { 6, 3, 4294967294, 4294967291, 4294967146 }; // idb
char *ActionName::ITEM_CASTING = "Restart"; // idb
NiColor Char::INVALIDPOINT3 = {  9999.9004,  9999.9004,  9999.9004 }; // idb
char *CharResMgr::ms_pcCharRootNodeName = "_CharShine_"; // idb
const char **ModelPartName::ms_apcModelPartName = &aHatacc; // weak
char *off_A742D4[29] =
{
  "HairLink",
  "FaceLink",
  &off_9BA6A4,
  "Mouth",
  "Chest",
  "Chest_R",
  "Body",
  "Back",
  "TopLink",
  "LeftShoulder",
  "RightShoulder",
  "Shield",
  "Weapon",
  "LeftBracelet",
  "RightBracelet",
  "Belt",
  "Tail",
  &off_9BA738,
  "Shoes",
  "LeftShoesAcc",
  "RightShoesAcc",
  "LOD0",
  "LOD1",
  "LOD2",
  "LeftUpperArm",
  "RightUpperArm",
  "LeftThigh",
  "RightThigh",
  "LeftCalf"
}; // weak
char *off_A742D8[28] =
{
  "FaceLink",
  &off_9BA6A4,
  "Mouth",
  "Chest",
  "Chest_R",
  "Body",
  "Back",
  "TopLink",
  "LeftShoulder",
  "RightShoulder",
  "Shield",
  "Weapon",
  "LeftBracelet",
  "RightBracelet",
  "Belt",
  "Tail",
  &off_9BA738,
  "Shoes",
  "LeftShoesAcc",
  "RightShoesAcc",
  "LOD0",
  "LOD1",
  "LOD2",
  "LeftUpperArm",
  "RightUpperArm",
  "LeftThigh",
  "RightThigh",
  "LeftCalf"
}; // weak
void *off_A742DC = &off_9BA6A4; // weak
char *off_A742E0[26] =
{
  "Mouth",
  "Chest",
  "Chest_R",
  "Body",
  "Back",
  "TopLink",
  "LeftShoulder",
  "RightShoulder",
  "Shield",
  "Weapon",
  "LeftBracelet",
  "RightBracelet",
  "Belt",
  "Tail",
  &off_9BA738,
  "Shoes",
  "LeftShoesAcc",
  "RightShoesAcc",
  "LOD0",
  "LOD1",
  "LOD2",
  "LeftUpperArm",
  "RightUpperArm",
  "LeftThigh",
  "RightThigh",
  "LeftCalf"
}; // weak
char *off_A742E4[25] =
{
  "Chest",
  "Chest_R",
  "Body",
  "Back",
  "TopLink",
  "LeftShoulder",
  "RightShoulder",
  "Shield",
  "Weapon",
  "LeftBracelet",
  "RightBracelet",
  "Belt",
  "Tail",
  &off_9BA738,
  "Shoes",
  "LeftShoesAcc",
  "RightShoesAcc",
  "LOD0",
  "LOD1",
  "LOD2",
  "LeftUpperArm",
  "RightUpperArm",
  "LeftThigh",
  "RightThigh",
  "LeftCalf"
}; // weak
char *off_A742E8[24] =
{
  "Chest_R",
  "Body",
  "Back",
  "TopLink",
  "LeftShoulder",
  "RightShoulder",
  "Shield",
  "Weapon",
  "LeftBracelet",
  "RightBracelet",
  "Belt",
  "Tail",
  &off_9BA738,
  "Shoes",
  "LeftShoesAcc",
  "RightShoesAcc",
  "LOD0",
  "LOD1",
  "LOD2",
  "LeftUpperArm",
  "RightUpperArm",
  "LeftThigh",
  "RightThigh",
  "LeftCalf"
}; // weak
char *off_A742EC[23] =
{
  "Body",
  "Back",
  "TopLink",
  "LeftShoulder",
  "RightShoulder",
  "Shield",
  "Weapon",
  "LeftBracelet",
  "RightBracelet",
  "Belt",
  "Tail",
  &off_9BA738,
  "Shoes",
  "LeftShoesAcc",
  "RightShoesAcc",
  "LOD0",
  "LOD1",
  "LOD2",
  "LeftUpperArm",
  "RightUpperArm",
  "LeftThigh",
  "RightThigh",
  "LeftCalf"
}; // weak
char *off_A742F0[22] =
{
  "Back",
  "TopLink",
  "LeftShoulder",
  "RightShoulder",
  "Shield",
  "Weapon",
  "LeftBracelet",
  "RightBracelet",
  "Belt",
  "Tail",
  &off_9BA738,
  "Shoes",
  "LeftShoesAcc",
  "RightShoesAcc",
  "LOD0",
  "LOD1",
  "LOD2",
  "LeftUpperArm",
  "RightUpperArm",
  "LeftThigh",
  "RightThigh",
  "LeftCalf"
}; // weak
char *off_A742F4[21] =
{
  "TopLink",
  "LeftShoulder",
  "RightShoulder",
  "Shield",
  "Weapon",
  "LeftBracelet",
  "RightBracelet",
  "Belt",
  "Tail",
  &off_9BA738,
  "Shoes",
  "LeftShoesAcc",
  "RightShoesAcc",
  "LOD0",
  "LOD1",
  "LOD2",
  "LeftUpperArm",
  "RightUpperArm",
  "LeftThigh",
  "RightThigh",
  "LeftCalf"
}; // weak
char *off_A742F8[20] =
{
  "LeftShoulder",
  "RightShoulder",
  "Shield",
  "Weapon",
  "LeftBracelet",
  "RightBracelet",
  "Belt",
  "Tail",
  &off_9BA738,
  "Shoes",
  "LeftShoesAcc",
  "RightShoesAcc",
  "LOD0",
  "LOD1",
  "LOD2",
  "LeftUpperArm",
  "RightUpperArm",
  "LeftThigh",
  "RightThigh",
  "LeftCalf"
}; // weak
char *off_A742FC[19] =
{
  "RightShoulder",
  "Shield",
  "Weapon",
  "LeftBracelet",
  "RightBracelet",
  "Belt",
  "Tail",
  &off_9BA738,
  "Shoes",
  "LeftShoesAcc",
  "RightShoesAcc",
  "LOD0",
  "LOD1",
  "LOD2",
  "LeftUpperArm",
  "RightUpperArm",
  "LeftThigh",
  "RightThigh",
  "LeftCalf"
}; // weak
char *off_A74300[18] =
{
  "Shield",
  "Weapon",
  "LeftBracelet",
  "RightBracelet",
  "Belt",
  "Tail",
  &off_9BA738,
  "Shoes",
  "LeftShoesAcc",
  "RightShoesAcc",
  "LOD0",
  "LOD1",
  "LOD2",
  "LeftUpperArm",
  "RightUpperArm",
  "LeftThigh",
  "RightThigh",
  "LeftCalf"
}; // weak
char *off_A74304[17] =
{
  "Weapon",
  "LeftBracelet",
  "RightBracelet",
  "Belt",
  "Tail",
  &off_9BA738,
  "Shoes",
  "LeftShoesAcc",
  "RightShoesAcc",
  "LOD0",
  "LOD1",
  "LOD2",
  "LeftUpperArm",
  "RightUpperArm",
  "LeftThigh",
  "RightThigh",
  "LeftCalf"
}; // weak
char *off_A74308[16] =
{
  "LeftBracelet",
  "RightBracelet",
  "Belt",
  "Tail",
  &off_9BA738,
  "Shoes",
  "LeftShoesAcc",
  "RightShoesAcc",
  "LOD0",
  "LOD1",
  "LOD2",
  "LeftUpperArm",
  "RightUpperArm",
  "LeftThigh",
  "RightThigh",
  "LeftCalf"
}; // weak
char *off_A7430C[15] =
{
  "RightBracelet",
  "Belt",
  "Tail",
  &off_9BA738,
  "Shoes",
  "LeftShoesAcc",
  "RightShoesAcc",
  "LOD0",
  "LOD1",
  "LOD2",
  "LeftUpperArm",
  "RightUpperArm",
  "LeftThigh",
  "RightThigh",
  "LeftCalf"
}; // weak
char *off_A74310[14] =
{
  "Belt",
  "Tail",
  &off_9BA738,
  "Shoes",
  "LeftShoesAcc",
  "RightShoesAcc",
  "LOD0",
  "LOD1",
  "LOD2",
  "LeftUpperArm",
  "RightUpperArm",
  "LeftThigh",
  "RightThigh",
  "LeftCalf"
}; // weak
char *off_A74314[13] =
{
  "Tail",
  &off_9BA738,
  "Shoes",
  "LeftShoesAcc",
  "RightShoesAcc",
  "LOD0",
  "LOD1",
  "LOD2",
  "LeftUpperArm",
  "RightUpperArm",
  "LeftThigh",
  "RightThigh",
  "LeftCalf"
}; // weak
void *off_A74318 = &off_9BA738; // weak
char *off_A7431C[11] =
{
  "Shoes",
  "LeftShoesAcc",
  "RightShoesAcc",
  "LOD0",
  "LOD1",
  "LOD2",
  "LeftUpperArm",
  "RightUpperArm",
  "LeftThigh",
  "RightThigh",
  "LeftCalf"
}; // weak
char *off_A74320[10] =
{
  "LeftShoesAcc",
  "RightShoesAcc",
  "LOD0",
  "LOD1",
  "LOD2",
  "LeftUpperArm",
  "RightUpperArm",
  "LeftThigh",
  "RightThigh",
  "LeftCalf"
}; // weak
char *off_A74324[9] =
{
  "RightShoesAcc",
  "LOD0",
  "LOD1",
  "LOD2",
  "LeftUpperArm",
  "RightUpperArm",
  "LeftThigh",
  "RightThigh",
  "LeftCalf"
}; // weak
char *pLodNodeName = "LOD0"; // idb
char *off_A7432C = "LOD1"; // idb
char *off_A74330 = "LOD2"; // idb
char *off_A74334[5] = { "LeftUpperArm", "RightUpperArm", "LeftThigh", "RightThigh", "LeftCalf" }; // weak
char *off_A74338[4] = { "RightUpperArm", "LeftThigh", "RightThigh", "LeftCalf" }; // weak
char *off_A7433C[3] = { "LeftThigh", "RightThigh", "LeftCalf" }; // weak
char *off_A74340[2] = { "RightThigh", "LeftCalf" }; // weak
char *off_A74344 = "LeftCalf"; // weak
void *off_A74348 = &unk_9BA7C0; // weak
char *off_A7434C[2] = { "World", "World_Cos" }; // weak
char *off_A74350 = "World_Cos"; // weak
unsigned __int32 PortraitTextureBuffer::ms_dwMainCharTag = 4294967295u; // weak
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > PortraitTextureBuffer::ms_kMobFaceTextureList = { { &NiTList<NiPointer<NiTexture>>::`vftable', NULL, NULL, { {  }, 0u } } }; // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > PortraitTextureBuffer::ms_kMoverFaceTextureList = { { &NiTList<NiPointer<NiTexture>>::`vftable', NULL, NULL, { {  }, 0u } } }; // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > PortraitTextureBuffer::ms_kPetFaceTextureList = { { &NiTList<NiPointer<NiTexture>>::`vftable', NULL, NULL, { {  }, 0u } } }; // idb
char *DropItem::ms_pcRootNodeName = "_DropItem_"; // idb
char soundName[256] =
{
  'S',
  'F',
  'X',
  '_',
  'L',
  'e',
  'a',
  'r',
  'n',
  'S',
  'k',
  'i',
  'l',
  'l',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0'
}; // idb
MapObjMgr g_kMapObjMgr: using guessed type int ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable;

//----- (004t>,char const *,NiPointer<NiNode>>::`vftable',
          37u,
          NULL,
          { {  }, 0u }
        }
      },
      false
    }
  }
}; // idb
NiPoint3 World::ms_kUpDir = {  0.0,  0.0,  1.0 }; // idb
NiPoint3 World::ms_kDownDir = {  0.0,  0.0, -1.0 }; // idb
NiPoint3 World::ms_kNorthDir = {  0.0,  1.0,  0.0 }; // idb
const struct NiPoint3 World::ms_kEastDir = {  1.0,  0.0,  0.0 }; // weak
__int64 qword_A75248 = 0i64; // weak
const struct NiPoint3 World::ms_kWestDir = { -1.0,  0.0,  0.0 }; // weak
float flt_A75260 =  0.0; // weak
float flt_A75264 =  0.0; // weak
NiPoint3 World::ms_kDefaultDirectionalLightDir = {  0.5,  0.69999999, -0.40000001 }; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhRoomWallName_1 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhRoomFloorName_1 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
float Server::ONE_DAY_TIME =  14400.0; // weak
float fAng =  25.0; // idb
_UNKNOWN Effect::m_iUsedOscTargetList; // weak
_UNKNOWN unk_A75764; // weak
type_info CHazeScreenEffect `RTTI Type Descriptor' = { &type_info::`vftable', NULL, "." }; // idb
bool EffectMgr::s_bEnableEffect = true; // weak
float TextEff::ms_fDefLifeTime =  1.0; // weak
float TextEff::ms_fMaxDistance =  3100.0; // weak
float SoundGroup::ms_fSoundMax =  1.0e10; // weak
float SoundGroup::ms_fSoundMin =  20.0; // weak
float SoundGroup::ms_fMasterGain =  1.0; // weak
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> SoundGroup::ms_kSoundGroupList = { { &NiTList<SoundGroup *>::`vftable', NULL, NULL, { {  }, 0u } } }; // idb
SoundMgr g_kSoundMgr =
{
  0u,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  { NULL },
  { NULL },
  false,
   0.0,
   0.0,
  false,
   0.0,
   1.0,
  {
    {
      {
        {
          &PgTList<NiPointer<NiAudioSource>>::`vftable',
          NULL,
          NULL,
          { {  }, 0u }
        }
      }
    }
  },
  false
}; // idb
type_info *CPropertyType<bool>::ms_rTypeInfo = &bool `RTTI Type Descriptor'; // idb
Version CURRENT_SOUND_OPTION_VERSION = { 6u, '\x03', '\x14', '\0' }; // idb
int (__thiscall **MachineOpt::ms_kWinPosList)(void *p, char) = &PgTList<MachineOpt::WinPos *>::`vftable'; // weak
int dword_A768FC = 0; // weak
int dword_A76900 = 0; // weak
int dword_A76904 = 0; // weak
MachineOpt::GraphicOption MachineOpt::ms_kGraphicOption =
{
  { 0u, '\0', '\0', '\0' },
   1.0,
   5000.0,
   5000.0,
  {  200.0,  500.0 },
   1.0,
  0,
  true,
  0,
  1024u,
  768u,
  true,
  0u,
  false,
  false,
  true,
  true,
  true,
   1.0
}; // idb
struct MachineOpt::SoundOption MachineOpt::ms_kSoundOption = { { 0u, '\0', '\0', '\0' }, 50u, 50u, 50u, 50u }; // weak
int dword_A76950 = 50; // weak
int dword_A76954 = 50; // weak
int dword_A76958 = 50; // weak
int dword_A7695C = 50; // weak
struct MachineOpt::StSaveWinPosOption MachineOpt::m_stSaveWinPosOption =
{
  { 0u, '\0', '\0', '\0' },
  28u,
  {
    {  0.0,  0.0 },
    {  0.0,  0.0 },
    {  0.0,  0.0 },
    {  0.0,  0.0 },
    {  0.0,  0.0 },
    {  0.0,  0.0 },
    {  0.0,  0.0 },
    {  0.0,  0.0 },
    {  0.0,  0.0 },
    {  0.0,  0.0 },
    {  0.0,  0.0 },
    {  0.0,  0.0 },
    {  0.0,  0.0 },
    {  0.0,  0.0 },
    {  0.0,  0.0 },
    {  0.0,  0.0 },
    {  0.0,  0.0 },
    {  0.0,  0.0 },
    {  0.0,  0.0 },
    {  0.0,  0.0 },
    {  0.0,  0.0 },
    {  0.0,  0.0 },
    {  0.0,  0.0 },
    {  0.0,  0.0 },
    {  0.0,  0.0 },
    {  0.0,  0.0 },
    {  0.0,  0.0 },
    {  0.0,  0.0 }
  },
  0u,
  0u,
  0u,
  0u,
  0u,
  0u
}; // weak
__int16 word_A76964 = 0; // weak
int dword_A76966 = 28; // weak
float flt_A7696A[] = {  0.0 }; // weak
float flt_A7696E[] = {  0.0 }; // weak
unsigned int ruiWidth = 0u; // idb
unsigned int dword_A76A4E = 0u; // idb
unsigned int ruiHeight = 0u; // idb
unsigned int dword_A76A56 = 0u; // idb
int dword_A76A5A = 0; // weak
int dword_A76A5E = 0; // weak
struct MachineOpt::StKeyMappingBuffer MachineOpt::m_keyMappingBuff =
{
  { 0u, '\0', '\0', '\0' },
  117u,
  {
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' },
    { '\0', '\0' }
  }
}; // weak
__int16 word_A76A6C = 0; // weak
int dword_A76A6E = 117; // weak
char byte_A76A72[] = { '\0' }; // weak
char byte_A76A73[] = { '\0' }; // weak
_UNKNOWN unk_A76B31; // weak
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > Skill::m_kUseList = { { &PgTList<NiPointer<SkillUseRecord>>::`vftable', NULL, NULL, { {  }, 0u } } }; // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> SkillEmpowerRequest::ms_kReqList =
{
  {
    &NiTList<SkillEmpowerRequest::EmpowerReq *>::`vftable',
    NULL,
    NULL,
    { {  }, 0u }
  }
}; // idb
ITask ITask::ms_kRootTask =
{
  { &NiRefObject::`vftable', 0u },
  { NULL, NULL, 0u },
  TS_NONINITIALIZED,
  TT_NOTSPECIFIED,
  NULL,
  { { { NULL, NULL, NULL, { , 0u } } } },
  { { { NULL, NULL, NULL, { , 0u } } } }
}; // idb
char *SCREENSHOT_PATHNAME = "screenshots"; // idb
const char *const SCREENSHOT_FILENAME = "screenshot"; // weak
bool QuestDataMgr::m_bUpdate = true; // weak
NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *> QuestHelperMgr::ms_pQuestMCList = { &PgTList<QuestMC *>::`vftable', NULL, NULL, { {  }, 0u } }; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhCollisionParentName_0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhCollisionParentNamePick_0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhCharColliRootNodeName_0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhOtherCharColliRootName_0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
NiColor MoveOKColor_0 = {  0.5,  1.0,  0.5 }; // idb
NiColor MoveNOColor_0 = {  1.0,  0.5,  0.5 }; // idb
NiColor NormalColor_0 = {  1.0,  1.0,  1.0 }; // idb
NiColor RepairColor_0 = {  1.0,  1.0,  0.2 }; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhResObjDefaultRootName_0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhObjDefaultRootName_0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhCollisionParentName_1 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhCollisionParentNamePick_1 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhObjAmbLightNormal_0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhObjAmbLightMoveOK_0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhObjAmbLightMoveNO_0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhObjAmbLightRepair_0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhCharColliNodeName_0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhOtherCharColliRootName_1 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhObjDefaultRootName_1 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhRoomDefaultRootName_0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhRoomWallName_2 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhRoomFloorName_2 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhRoomRoofName_1 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhRoomBlockName_0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhRoomTexStyleTileName_0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhRoomTexStyleCustomName_0 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > mhCollisionParentName_2 =
{
  {,
    {
      {
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0',
        '\0'
      }
    },
    0u,
    15u,
    {  }
  }
}; // idb
int (__thiscall **ChargedItemList::ms_kUsingList)(void *p, char) = &NiTList<PROTO_CHARGEDBUFF_INFO *>::`vftable'; // weak
int dword_A77E08 = 0; // weak
int dword_A77E0C = 0; // weak
int dword_A77E10 = 0; // weak
NetMgr g_kNetMgr =
{
  &NetMgr::`vftable',
  0,
  { { NULL }, { NULL }, { NULL }, { NULL }, { NULL } },
  { NULL },
  { NULL }
}; // idb
float SlotMachineWin::ms_fk1 =  550.0; // weak
float SlotMachineWin::ms_fk2 =  5.0; // weak
char PADDING[64] =
{
  '€',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0',
  '\0'
}; // idb
static_tree_desc_s static_l_desc = { 10289064 }; // idb
static_tree_desc_s static_d_desc = { 10290216 }; // idb
static_tree_desc_s static_bl_desc = { 0 }; // idb
const char *const ijlkey = "Software\\Intel Corporation\\PLSuite\\IJLib"; // weak
char *usecpu = "USECPU"; // weak
_UNKNOWN unk_A78F40; // weak
int dword_A78F60 = 1000; // weak
__int64 qword_A78F80 = 7061751969500652032i64; // weak
__int64 qword_A78F88 = 5008079202860156288i64; // weak
__int64 qword_A78F90 = 6521311767753153152i64; // weak
__int64 qword_A78F98 = 6016900912788820864i64; // weak
__int64 qword_A78FA0 = -9223231297218904064i64; // weak
__int64 qword_A78FA8 = 6917634582367985664i64; // weak
__int64 qword_A78FB0 = -4611474908973580288i64; // weak
__int64 qword_A78FB8 = -2305596714850918400i64; // weak
__int64 qword_A78FC0 = 281479271743489i64; // weak
__int64 qword_A78FD0 = 6485282420969986560i64; // weak
__int64 qword_A78FD8 = -6025626770212869024i64; // weak
__int64 qword_A78FE0 = 4990064529468572992i64; // weak
__int64 qword_A78FE8 = 8520940514218899008i64; // weak
__int64 qword_A79010 = 36029346783166592i64; // weak
__int128 xmmword_A79030 = 0x10001000100011000100010001i64; // weak
__int128 xmmword_A79040 = 0x80000000800008000000080000i64; // weak
__int128 xmmword_A79050 = 0x32EC32EC32EC32EC32EC32EC32EC32ECi64; // weak
__int128 xmmword_A79060 = 0x6A0A6A0A6A0A6A0A6A0A6A0A6A0A6A0Ai64; // weak
__int128 xmmword_A79070 = 0xAB0EAB0EAB0EAB0EAB0EAB0EAB0EAB0Ei64; // weak
__int128 xmmword_A79090 = 0x5A825A825A825A825A825A825A825A82i64; // weak
__int64 qword_A790A0 = 5422994505513058304i64; // weak
__int64 qword_A790A8 = 1272322184919924736i64; // weak
__int64 qword_A790B0 = -1272184147311111265i64; // weak
__int64 qword_A790B8 = -3623243500459270819i64; // weak
__int64 qword_A790C0 = -6396463553414414336i64; // weak
__int64 qword_A790C8 = 5422916315633467392i64; // weak
__int64 qword_A790D0 = -3623407959052049757i64; // weak
__int64 qword_A790D8 = -6396436095195851873i64; // weak
__int64 qword_A790E0 = 7521709710815615173i64; // weak
__int64 qword_A790E8 = 1764924792106211525i64; // weak
__int64 qword_A790F0 = -1764733333053672452i64; // weak
__int64 qword_A790F8 = -5025589613507063819i64; // weak
__int64 qword_A79100 = -8872296051449833275i64; // weak
__int64 qword_A79108 = 7521601258596443963i64; // weak
__int64 qword_A79110 = -5025708777374732277i64; // weak
__int64 qword_A79118 = -8872257967291534340i64; // weak
__int64 qword_A79120 = 7085415641332536223i64; // weak
__int64 qword_A79128 = 1662463450911036319i64; // weak
__int64 qword_A79130 = -1662283098777096895i64; // weak
__int64 qword_A79138 = -4733973682026720577i64; // weak
__int64 qword_A79140 = -8357482768545786977i64; // weak
__int64 qword_A79148 = 7085313481240456289i64; // weak
__int64 qword_A79150 = -4734102264757670591i64; // weak
__int64 qword_A79158 = -8357446892040262335i64; // weak
__int64 qword_A79160 = 6376648893781920578i64; // weak
__int64 qword_A79168 = 1496104515399732034i64; // weak
__int64 qword_A79170 = -1495942202344709548i64; // weak
__int64 qword_A79178 = -4260520014963222714i64; // weak
__int64 qword_A79180 = -7521509311709820094i64; // weak
__int64 qword_A79188 = 6376556951417042110i64; // weak
__int64 qword_A79190 = -4260663892072716102i64; // weak
__int64 qword_A79198 = -7521477025861311916i64; // weak
__int128 xmmword_A791A0 = 0xCDB7A73BAC61DD5D4B4258C540004000i64; // weak
__int128 xmmword_A791B0 = 0xEE584B4222A3539F11A8324940004000i64; // weak
__int128 xmmword_A791C0 = 0xA73B4B42DD5D539FA73B3249C0004000i64; // weak
__int128 xmmword_A791D0 = 0xCDB711A8AC6122A34B4211A84000C000i64; // weak
__int128 xmmword_A791E0 = 0xBA4184DF8C04CFF568627B2158C558C5i64; // weak
__int128 xmmword_A791F0 = 0xE7826862300B73FC187E45BF58C558C5i64; // weak
__int128 xmmword_A79200 = 0x84DF6862CFF573FC84DF45BFA73B58C5i64; // weak
__int128 xmmword_A79210 = 0xBA41187E8C04300B6862187E58C5A73Bi64; // weak
__int128 xmmword_A79220 = 0xBE4D8C0492BFD2BF625473FC539F539Fi64; // weak
__int128 xmmword_A79230 = 0xE8EE62542D416D41171241B3539F539Fi64; // weak
__int128 xmmword_A79240 = 0x8C046254D2BF6D418C0441B3AC61539Fi64; // weak
__int128 xmmword_A79250 = 0xBE4D171292BF2D4162541712539FAC61i64; // weak
__int128 xmmword_A79260 = 0xC4DF979E9DACD746587E68624B424B42i64; // weak
__int128 xmmword_A79270 = 0xEB3D587E28BA625414C33B214B424B42i64; // weak
__int128 xmmword_A79280 = 0x979E587ED7466254979E3B21B4BE4B42i64; // weak
__int128 xmmword_A79290 = 0xC4DF14C39DAC28BA587E14C34B42B4BEi64; // weak
int dword_A792A0[] = { 0 }; // weak
int dword_A793A0[] = { 0 }; // weak
__int64 qword_A797A0 = 255i64; // weak
__int64 qword_A797B0 = 16711935i64; // weak
__int64 qword_A797C0 = -256i64; // weak
__int64 qword_A797D8 = -4278190081i64; // weak
__int64 qword_A797E0 = 65535i64; // weak
__int64 qword_A797E8 = 16711680i64; // weak
__int64 qword_A797F0 = 4278190080i64; // weak
__int64 qword_A797F8 = 281479271743489i64; // weak
__int64 qword_A79800 = 562958543486978i64; // weak
__int64 qword_A79808 = 844437815230467i64; // weak
__int64 qword_A79810 = 1125917086973956i64; // weak
__int64 qword_A79818 = 2251834173947912i64; // weak
__int64 qword_A79820 = 4222189076152335i64; // weak
__int64 qword_A79828 = 71777214294589695i64; // weak
__int128 xmmword_A79840 = 0x10001000100011000100010001i64; // weak
__int128 xmmword_A79850 = 0x8000000080080000000800i64; // weak
__int128 xmmword_A79860 = 0x1000100010001010001000100010i64; // weak
__int128 xmmword_A79870 = 0xF000F000F000FF000F000F000Fi64; // weak
__int128 xmmword_A79880 = 0x8000800080008080008000800080i64; // weak
__int128 xmmword_A79890 = 0i64; // weak
__int128 xmmword_A798A0 = 0x32EC32EC32EC32EC32EC32EC32EC32ECi64; // weak
__int128 xmmword_A798B0 = 0x6A0A6A0A6A0A6A0A6A0A6A0A6A0A6A0Ai64; // weak
__int128 xmmword_A798C0 = 0xAB0EAB0EAB0EAB0EAB0EAB0EAB0EAB0Ei64; // weak
__int128 xmmword_A798D0 = 0xB505B505B505B505B505B505B505B505i64; // weak
__int64 qword_A798F0 = -4611615648609452032i64; // weak
__int64 qword_A798F8 = -6025496742388870241i64; // weak
__int64 qword_A79900 = 4611756390392807424i64; // weak
__int64 qword_A79908 = -2495649084478595747i64; // weak
__int64 qword_A79910 = -6396436098066065211i64; // weak
__int64 qword_A79918 = -3623165313175499966i64; // weak
__int64 qword_A79920 = 5422916314855912009i64; // weak
__int64 qword_A79928 = -6396292658624288965i64; // weak
__int64 qword_A79930 = -6396421241128527675i64; // weak
__int64 qword_A79938 = -8357502183883967492i64; // weak
__int64 qword_A79940 = 6396616451687143621i64; // weak
__int64 qword_A79948 = -3461706787810652171i64; // weak
__int64 qword_A79950 = -8872257969610327263i64; // weak
__int64 qword_A79958 = -5025481163226060702i64; // weak
__int64 qword_A79960 = 7521601257518024127i64; // weak
__int64 qword_A79968 = -8872167950809660193i64; // weak
__int64 qword_A79970 = -6025442882677156961i64; // weak
__int64 qword_A79978 = -7872523865664950975i64; // weak
__int64 qword_A79980 = 6025626771701978015i64; // weak
__int64 qword_A79988 = -3260726254323510593i64; // weak
__int64 qword_A79990 = -8357446894473743364i64; // weak
__int64 qword_A79998 = -4733871524009581996i64; // weak
__int64 qword_A799A0 = 7085313480224555443i64; // weak
__int64 qword_A799A8 = -8357345768921330684i64; // weak
__int64 qword_A799B0 = -5422814153204937918i64; // weak
__int64 qword_A799B8 = -7085243333748301228i64; // weak
__int64 qword_A799C0 = 5422979651179793218i64; // weak
__int64 qword_A799C8 = -2934484743475636410i64; // weak
__int64 qword_A799D0 = -7521477028480980894i64; // weak
__int64 qword_A799D8 = -4260428074895320962i64; // weak
__int64 qword_A799E0 = 6376556950502718241i64; // weak
__int64 qword_A799E8 = -7521357864120707170i64; // weak
__int64 qword_A799F0 = 2495908988640509952i64; // weak
__int64 qword_A799F8 = -6025323719631355904i64; // weak
__int64 qword_A79A00 = -6025464453986959360i64; // weak
__int64 qword_A79A08 = -2495768248346230784i64; // weak
__int64 qword_A79A10 = -1272184146629601083i64; // weak
__int64 qword_A79A18 = -3623243503055130039i64; // weak
__int64 qword_A79A20 = -3623407959138422199i64; // weak
__int64 qword_A79A28 = -6396436097647111768i64; // weak
__int64 qword_A79A30 = 3461958343642077381i64; // weak
__int64 qword_A79A38 = -8357371135841838907i64; // weak
__int64 qword_A79A40 = -8357457401872033595i64; // weak
__int64 qword_A79A48 = -3461763133486618821i64; // weak
__int64 qword_A79A50 = -1764733332108444895i64; // weak
__int64 qword_A79A58 = -5025589615445260865i64; // weak
__int64 qword_A79A60 = -5025708777494592065i64; // weak
__int64 qword_A79A68 = -8872257969029244802i64; // weak
__int64 qword_A79A70 = 3260979549390853023i64; // weak
__int64 qword_A79A78 = -7872384090249276513i64; // weak
__int64 qword_A79A80 = -7872481677719678049i64; // weak
__int64 qword_A79A88 = -3260795660995023775i64; // weak
__int64 qword_A79A90 = -1662283097886657540i64; // weak
__int64 qword_A79A98 = -4733973684101693005i64; // weak
__int64 qword_A79AA0 = -4734102264870583885i64; // weak
__int64 qword_A79AA8 = -8357446893926344942i64; // weak
__int64 qword_A79AB0 = 2934740855674915650i64; // weak
__int64 qword_A79AB8 = -7085089384940549310i64; // weak
__int64 qword_A79AC0 = -7085205363308999870i64; // weak
__int64 qword_A79AC8 = -2934575358695656258i64; // weak
__int64 qword_A79AD0 = -1495942201543333790i64; // weak
__int64 qword_A79AD8 = -4260520017260233951i64; // weak
__int64 qword_A79AE0 = -4260663892174292191i64; // weak
__int64 qword_A79AE8 = -7521477027988368189i64; // weak
__int128 xmmword_A79AF0 = 0xDD5D4000539FC00022A34000539F4000i64; // weak
__int128 xmmword_A79B00 = 0xAC61C00022A34000AC614000DD5D4000i64; // weak
__int128 xmmword_A79B10 = 0xA73B4B424B4211A8EE584B424B4258C5i64; // weak
__int128 xmmword_A79B20 = 0xCDB7A73B11A83249CDB711A8A73B3249i64; // weak
__int128 xmmword_A79B30 = 0xCFF558C573FCA73B300B58C573FC58C5i64; // weak
__int128 xmmword_A79B40 = 0x8C04A73B300B58C58C0458C5CFF558C5i64; // weak
__int128 xmmword_A79B50 = 0x84DF68626862187EE782686268627B21i64; // weak
__int128 xmmword_A79B60 = 0xBA4184DF187E45BFBA41187E84DF45BFi64; // weak
__int128 xmmword_A79B70 = 0xD2BF539F6D41AC612D41539F6D41539Fi64; // weak
__int128 xmmword_A79B80 = 0x92BFAC612D41539F92BF539FD2BF539Fi64; // weak
__int128 xmmword_A79B90 = 0x8C04625462541712E8EE6254625473FCi64; // weak
__int128 xmmword_A79BA0 = 0xBE4D8C04171241B3BE4D17128C0441B3i64; // weak
__int128 xmmword_A79BB0 = 0xD7464B426254B4BE28BA4B4262544B42i64; // weak
__int128 xmmword_A79BC0 = 0x9DACB4BE28BA4B429DAC4B42D7464B42i64; // weak
__int128 xmmword_A79BD0 = 0x979E587E587E14C3EB3D587E587E6862i64; // weak
__int128 xmmword_A79BE0 = 0xC4DF979E14C33B21C4DF14C3979E3B21i64; // weak
__int64 qword_A79BF0 = 255i64; // weak
__int64 qword_A79BF8 = 65280i64; // weak
__int64 qword_A79C00 = 16711935i64; // weak
__int64 qword_A79C08 = 4278255360i64; // weak
__int64 qword_A79C10 = 124563882061i64; // weak
__int64 qword_A79C18 = 554045276117i64; // weak
__int64 qword_A79C20 = 281389070352512i64; // weak
__int64 qword_A79C28 = 330722312221i64; // weak
__int64 qword_A79C30 = 281294582513792i64; // weak
__int64 qword_A79C38 = 554043834347i64; // weak
__int64 qword_A79C40 = 140187732574080i64; // weak
__int64 qword_A79C48 = 549755814016i64; // weak
__int64 qword_A79C50 = 1099511628032i64; // weak
__int64 qword_A79C58 = 2199023256064i64; // weak
__int64 qword_A79C60 = 36029346783166592i64; // weak
__int64 qword_A79C68 = -1i64; // weak
__int64 qword_A79C70 = -72057589759737856i64; // weak
__int64 qword_A79C80 = 281470681808895i64; // weak
int dword_A79CA0 = 0; // weak
__int64 qword_A79CA8 = -1i64; // weak
__int64 qword_A79CB0 = -72057589759737856i64; // weak
__int64 qword_A79CB8 = 140187732574080i64; // weak
__int64 qword_A79CC0 = 549755814016i64; // weak
__int64 qword_A79CC8 = 2199023256064i64; // weak
__int64 qword_A79CD0 = 124563882061i64; // weak
__int64 qword_A79CD8 = 554045276117i64; // weak
__int64 qword_A79CE0 = 281389070352512i64; // weak
__int64 qword_A79CF0 = 1616816936894600816i64; // weak
__int64 qword_A79CF8 = 2044665429944704096i64; // weak
__int64 qword_A79D00 = 24770583935320247i64; // weak
__int64 qword_A79D08 = 24770175913427032i64; // weak
__int64 qword_A79D10 = 51510706729058487i64; // weak
__int64 qword_A79D18 = 63895794685772003i64; // weak
__int64 qword_A79D20 = 50384789642084531i64; // weak
__int64 qword_A79D28 = 2391850107830112i64; // weak
__int64 qword_A79D30 = -281474976710656i64; // weak
__int64 qword_A79D38 = 281470681743360i64; // weak
__int64 qword_A79D40 = 4294901760i64; // weak
__int64 qword_A79D48 = 65535i64; // weak
__int64 qword_A79D50 = -281470681808896i64; // weak
__int64 qword_A79D58 = 281470681808895i64; // weak
__int64 qword_A79D60 = -281474976645121i64; // weak
__int64 qword_A79D68 = 1616816936894600816i64; // weak
__int64 qword_A79D70 = 2044665429944704096i64; // weak
__int64 qword_A79D78 = 24770175913427032i64; // weak
__int64 qword_A79D80 = 51510706729058487i64; // weak
__int64 qword_A79D88 = 63895794685772003i64; // weak
__int64 qword_A79D90 = 50384789642084531i64; // weak
__int64 qword_A79D98 = -8649576541405673482i64; // weak
__int64 qword_A79DA0 = -72057589759737856i64; // weak
__int64 qword_A79DA8 = 71777214294589695i64; // weak
std::_Generic_error_category Generic_object = { { &std::_Generic_error_category::`vftable' }, "generic" }; // idb
std::_Iostream_error_category Iostream_object = { { &std::_Iostream_error_category::`vftable' }, "iostream" }; // idb
std::_System_error_category System_object = { { { &std::_System_error_category::`vftable' }, "generic" }, "system" }; // idb
int __security_cookie = 3141592654; // weak
FILE _iob[] = ;
double _HUGE =  1.797693134862316e308;
void *__initiallocalestructinfo = &__initiallocinfo; // weak
__int32 _timezone = 28800;
int _daylight = 1;
__int32 _dstbias = 4294963696;
char *_tzname[2] = { &tzstd, &tzdst };
char *_sys_errlist[] = { "No error" };
int _sys_nerr = 43;
FpFormatDescriptor DoubleFormat = { 1024, 4294966273, 53, 11, 64, 1023 }; // idb
FpFormatDescriptor FloatFormat = { 128, 4294967169, 24, 8, 32, 127 }; // idb
int NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_uiBlockSize = 256; // weak
int NiPosKey::ms_iSampleSize = 20; // weak
int NiBoneLODController::ms_iGlobalLOD = 4294967295; // idb
char *g_pcCurrentKFMVersion = "2.0.0.0"; // idb
unsigned __int8 NiBlendInterpolator::ms_ucArrayGrowBy = 2u; // weak
const struct NiPoint3 NiQuatTransform::INVALID_TRANSLATE = { -3.4028235e38, -3.4028235e38, -3.4028235e38 }; // weak
const struct NiPoint3 NiInterpolator::INVALID_POINT3 = { -3.4028235e38, -3.4028235e38, -3.4028235e38 }; // weak
const struct NiColorA NiInterpolator::INVALID_COLORA = { -3.4028235e38, -3.4028235e38, -3.4028235e38, -3.4028235e38 }; // weak
float fOneThird =  0.33333334; // idb
float NiTriIntersect::ms_fEpsilon =  0.0000099999997; // weak
char NiObjectNET::ms_cAppendCharacter = '$'; // weak
_UNKNOWN NiMatrix3::IDENTITY; // weak
volatile LONG NiMaterialProperty::ms_iNextIndex = 1; // idb
NiPoint3 NiPoint3::UNIT_X = {  1.0,  0.0,  0.0 }; // idb
NiPoint3 NiPoint3::UNIT_Y = {  0.0,  1.0,  0.0 }; // idb
NiPoint3 NiPoint3::UNIT_Z = {  0.0,  0.0,  1.0 }; // idb
NiPoint3 NiPoint3::UNIT_ALL = {  1.0,  1.0,  1.0 }; // idb
int NiTAbstractPoolAllocator<unsigned int>::ms_uiBlockSize = 2048; // weak
const struct NiColor NiColor::WHITE = {  1.0,  1.0,  1.0 }; // weak
const struct NiColorA NiColorA::BLACK = {  0.0,  0.0,  0.0,  1.0 }; // weak
NiColorA NiColorA::WHITE = {  1.0,  1.0,  1.0,  1.0 }; // idb
volatile LONG NiDynamicEffect::ms_iNextIndex = 1; // idb
bool NiSourceTexture::ms_bPreload = true; // weak
NiTexture::FormatPrefs NiSourceTexture::ms_kDefaultPrefs = { PIX_DEFAULT, COLUMN|ITEM, MIP_DEFAULT }; // idb
NiPixelFormat NiPixelFormat::PAL4 =
{
  '\x01',
  '\x04',
  FORMAT_PAL,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_INDEX, REP_INDEX, '\x04', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true }
  }
}; // idb
NiPixelFormat NiPixelFormat::PALA4 =
{
  '\x01',
  '\x04',
  FORMAT_PALALPHA,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_INDEX, REP_INDEX, '\x04', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true }
  }
}; // idb
NiPixelFormat NiPixelFormat::PAL8 =
{
  '\x01',
  '\b',
  FORMAT_PAL,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_INDEX, REP_INDEX, '\b', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true }
  }
}; // idb
NiPixelFormat NiPixelFormat::PALA8 =
{
  '\x01',
  '\b',
  FORMAT_PALALPHA,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_INDEX, REP_INDEX, '\b', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true }
  }
}; // idb
NiPixelFormat NiPixelFormat::RGBA32 =
{
  '\x01',
  ' ',
  FORMAT_RGBA,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_RED, REP_FIXED, '\b', true },
    { COMP_GREEN, REP_FIXED, '\b', true },
    { COMP_BLUE, REP_FIXED, '\b', true },
    { COMP_ALPHA, REP_FIXED, '\b', true }
  }
}; // idb
NiPixelFormat NiPixelFormat::RGB24 =
{
  '\x01',
  '\x18',
  FORMAT_RGB,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_RED, REP_FIXED, '\b', true },
    { COMP_GREEN, REP_FIXED, '\b', true },
    { COMP_BLUE, REP_FIXED, '\b', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true }
  }
}; // idb
NiPixelFormat NiPixelFormat::RGBA16 =
{
  '\x01',
  '\x10',
  FORMAT_RGBA,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_RED, REP_FIXED, '\x05', true },
    { COMP_GREEN, REP_FIXED, '\x05', true },
    { COMP_BLUE, REP_FIXED, '\x05', true },
    { COMP_ALPHA, REP_FIXED, '\x01', true }
  }
}; // idb
NiPixelFormat NiPixelFormat::BGRA16 =
{
  '\x01',
  '\x10',
  FORMAT_RGBA,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_BLUE, REP_FIXED, '\x05', true },
    { COMP_GREEN, REP_FIXED, '\x05', true },
    { COMP_RED, REP_FIXED, '\x05', true },
    { COMP_ALPHA, REP_FIXED, '\x01', true }
  }
}; // idb
NiPixelFormat NiPixelFormat::BUMP16 =
{
  '\x01',
  '\x10',
  FORMAT_BUMP,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_OFFSET_U, REP_FIXED, '\b', true },
    { COMP_OFFSET_V, REP_FIXED, '\b', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true }
  }
}; // idb
NiPixelFormat NiPixelFormat::BUMPLUMA32 =
{
  '\x01',
  ' ',
  FORMAT_BUMPLUMA,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_OFFSET_U, REP_FIXED, '\b', true },
    { COMP_OFFSET_V, REP_FIXED, '\b', true },
    { COMP_LUMA, REP_FIXED, '\b', false },
    { COMP_PADDING, REP_UNKNOWN, '\b', false }
  }
}; // idb
NiPixelFormat NiPixelFormat::DXT1 =
{
  '\x01',
  '\0',
  FORMAT_DXT1,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_COMPRESSED, REP_COMPRESSED, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true }
  }
}; // idb
NiPixelFormat NiPixelFormat::DXT3 =
{
  '\x01',
  '\0',
  FORMAT_DXT3,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_COMPRESSED, REP_COMPRESSED, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true }
  }
}; // idb
NiPixelFormat NiPixelFormat::DXT5 =
{
  '\x01',
  '\0',
  FORMAT_DXT5,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_COMPRESSED, REP_COMPRESSED, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true }
  }
}; // idb
NiPixelFormat NiPixelFormat::RGBA128 =
{
  '\x01',
  '€',
  FORMAT_RGBA,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_RED, REP_FLOAT, ' ', true },
    { COMP_GREEN, REP_FLOAT, ' ', true },
    { COMP_BLUE, REP_FLOAT, ' ', true },
    { COMP_ALPHA, REP_FLOAT, ' ', true }
  }
}; // idb
NiPixelFormat NiPixelFormat::RGBA64 =
{
  '\x01',
  '@',
  FORMAT_RGBA,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_RED, REP_HALF, '\x10', true },
    { COMP_GREEN, REP_HALF, '\x10', true },
    { COMP_BLUE, REP_HALF, '\x10', true },
    { COMP_ALPHA, REP_HALF, '\x10', true }
  }
}; // idb
NiPixelFormat NiPixelFormat::R32 =
{
  '\x01',
  ' ',
  FORMAT_ONE_CHANNEL,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_RED, REP_FLOAT, ' ', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true }
  }
}; // idb
NiPixelFormat NiPixelFormat::RG32 =
{
  '\x01',
  ' ',
  FORMAT_TWO_CHANNEL,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_RED, REP_HALF, '\x10', true },
    { COMP_GREEN, REP_HALF, '\x10', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true }
  }
}; // idb
NiPixelFormat NiPixelFormat::RG64 =
{
  '\x01',
  '@',
  FORMAT_TWO_CHANNEL,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_RED, REP_FLOAT, ' ', true },
    { COMP_GREEN, REP_FLOAT, ' ', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true }
  }
}; // idb
NiPixelFormat NiPixelFormat::R16 =
{
  '\x01',
  '\x10',
  FORMAT_ONE_CHANNEL,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_RED, REP_HALF, '\x10', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true }
  }
}; // idb
NiPixelFormat NiPixelFormat::I8 =
{
  '\x01',
  '\b',
  FORMAT_ONE_CHANNEL,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_INTENSITY, REP_FIXED, '\b', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true }
  }
}; // idb
NiPixelFormat NiPixelFormat::A8 =
{
  '\x01',
  '\b',
  FORMAT_ONE_CHANNEL,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_ALPHA, REP_FIXED, '\b', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true }
  }
}; // idb
_UNKNOWN NiPixelFormat::BGR233; // weak
_UNKNOWN NiPixelFormat::BGRA2338; // weak
NiPixelFormat NiPixelFormat::BGR555 =
{
  '\x01',
  '\x10',
  FORMAT_RGB,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_BLUE, REP_FIXED, '\x05', true },
    { COMP_GREEN, REP_FIXED, '\x05', true },
    { COMP_RED, REP_FIXED, '\x05', true },
    { COMP_PADDING, REP_UNKNOWN, '\x01', true }
  }
}; // idb
NiPixelFormat NiPixelFormat::BGR565 =
{
  '\x01',
  '\x10',
  FORMAT_RGB,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_BLUE, REP_FIXED, '\x05', true },
    { COMP_GREEN, REP_FIXED, '\x06', true },
    { COMP_RED, REP_FIXED, '\x05', true },
    { COMP_EMPTY, REP_UNKNOWN, '\0', true }
  }
}; // idb
NiPixelFormat NiPixelFormat::BGRA5551 =
{
  '\x01',
  '\x10',
  FORMAT_RGBA,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_BLUE, REP_FIXED, '\x05', true },
    { COMP_GREEN, REP_FIXED, '\x05', true },
    { COMP_RED, REP_FIXED, '\x05', true },
    { COMP_ALPHA, REP_FIXED, '\x01', true }
  }
}; // idb
_UNKNOWN NiPixelFormat::BGRX5551; // weak
NiPixelFormat NiPixelFormat::BGRA4444 =
{
  '\x01',
  '\x10',
  FORMAT_RGBA,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_BLUE, REP_FIXED, '\x04', true },
    { COMP_GREEN, REP_FIXED, '\x04', true },
    { COMP_RED, REP_FIXED, '\x04', true },
    { COMP_ALPHA, REP_FIXED, '\x04', true }
  }
}; // idb
_UNKNOWN NiPixelFormat::BGRX4444; // weak
_UNKNOWN NiPixelFormat::BGR888; // weak
NiPixelFormat NiPixelFormat::BGRA8888 =
{
  '\x01',
  ' ',
  FORMAT_RGBA,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_BLUE, REP_FIXED, '\b', true },
    { COMP_GREEN, REP_FIXED, '\b', true },
    { COMP_RED, REP_FIXED, '\b', true },
    { COMP_ALPHA, REP_FIXED, '\b', true }
  }
}; // idb
NiPixelFormat NiPixelFormat::BGRX8888 =
{
  '\x01',
  ' ',
  FORMAT_RGB,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_BLUE, REP_FIXED, '\b', true },
    { COMP_GREEN, REP_FIXED, '\b', true },
    { COMP_RED, REP_FIXED, '\b', true },
    { COMP_PADDING, REP_UNKNOWN, '\b', true }
  }
}; // idb
_UNKNOWN NiPixelFormat::RGBX8888; // weak
_UNKNOWN NiPixelFormat::RGBA1010102; // weak
_UNKNOWN NiPixelFormat::BGRA1010102; // weak
_UNKNOWN NiPixelFormat::GR1616; // weak
NiPixelFormat NiPixelFormat::BUMPLUMA556 =
{
  '\x01',
  '\x10',
  FORMAT_BUMPLUMA,
  TILE_NONE,
  4294967295u,
  0u,
  {
    { COMP_OFFSET_U, REP_FIXED, '\x05', true },
    { COMP_OFFSET_V, REP_FIXED, '\x05', true },
    { COMP_LUMA, REP_FIXED, '\x06', false },
    { COMP_EMPTY, REP_UNKNOWN, '\0', false }
  }
}; // idb
_UNKNOWN NiPixelFormat::PA88; // weak
_UNKNOWN NiPixelFormat::L8; // weak
_UNKNOWN NiPixelFormat::L16; // weak
_UNKNOWN NiPixelFormat::LA88; // weak
_UNKNOWN NiPixelFormat::LA44; // weak
_UNKNOWN NiPixelFormat::BUMPWQ8888; // weak
_UNKNOWN NiPixelFormat::BUMP1616; // weak
_UNKNOWN NiPixelFormat::BUMPW101111; // weak
_UNKNOWN NiPixelFormat::BUMPLUMAX8888; // weak
_UNKNOWN NiPixelFormat::RENDERERSPECIFICCOMPRESSED; // weak
_UNKNOWN NiPixelFormat::RENDERERSPECIFIC16; // weak
_UNKNOWN NiPixelFormat::RENDERERSPECIFIC32; // weak
_UNKNOWN NiPixelFormat::RENDERERSPECIFIC64; // weak
_UNKNOWN NiPixelFormat::DEPTH16; // weak
_UNKNOWN NiPixelFormat::DEPTH32; // weak
_UNKNOWN NiPixelFormat::STENCILDEPTH115; // weak
_UNKNOWN NiPixelFormat::STENCILDEPTH824; // weak
_UNKNOWN NiPixelFormat::XDEPTH824; // weak
_UNKNOWN NiPixelFormat::STENCILXDEPTH4424; // weak
NiTimeController::CycleType seLastCycle = MAX_CYCLE_TYPES; // idb
int NiLODNode::ms_iGlobalLOD = 4294967295; // weak
struct NiPixelData *(__cdecl static *NiTexture::RendererData::ms_pfnTextureFailureCallback)(struct NiTexture *, enum NiTexture::RendererData::CreationFailure) = &NiTexture::RendererData::DefaultTextureFailureCallback; // weak
int next[3] = { 1, 2, 0 }; // idb
const struct NiQuaternion NiQuaternion::IDENTITY = {  1.0,  0.0,  0.0,  0.0 }; // weak
const unsigned int NiStream::ms_uiNifMinVersion = 67240192u; // weak
const unsigned int NiStream::ms_uiNifMaxVersion = 335544324u; // weak
unsigned __int16 NiGeometryData::ms_usNextID = 1u; // weak
void (__cdecl static *NiProcessorSpecificCode::ms_pVectorsTransform)(unsigned __int16, const float *, float *, struct NiMatrix3 *) = &NiProcessorSpecificCode::TransformVectorsBasic; // weak
void (__cdecl static *NiProcessorSpecificCode::ms_pPointsTransform)(unsigned __int16, const float *, float *, const struct NiTransform *) = &NiProcessorSpecificCode::TransformPointsBasic; // weak
float NiBound::ms_fTolerance =  0.000001; // weak
unsigned __int16 NiTriStripsData::ms_usPickID = 65535u; // weak
unsigned __int16 NiTriStripsData::ms_usPrevQuery = 65535u; // weak
char *NiPSysEmitterCtlr::ms_pcBirthRate = "BirthRate"; // idb
char *NiPSysEmitterCtlr::ms_pcEmitterActive = "EmitterActive"; // idb
NiColor NiPSysAirFieldModifier::m_ckUninitializePosition = {  3.4028235e38,  3.4028235e38,  3.4028235e38 }; // idb
int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD) = &NiMessageBox::DefaultMessageBox; // weak
bool bFirst = true; // idb
int (*NiFile::ms_pfnFileCreateFunc)(void) = &NiFile::DefaultFileCreateFunc; // weak
int (*NiFile::ms_pfnFileAccessFunc)(void) = &NiFile::DefaultFileAccessFunc; // weak
struct NiLogBehavior *NiLogBehavior::ms_pkSingleton = &NiLogBehavior::ms_kDefault; // weak
bool NiPortal::ms_bPortalEnable = true; // weak
char *NiCommand::ms_acOptionNotFound = (char *)0x6974706F; // weak
char NiAppWindow::ms_acWindowClassName[] = "Gamebryo Application"; // idb
unsigned int NiInputGamePad::ms_uiMaxAxes = 8u; // weak
int NiInputGamePad::ms_iDefaultAnalogThreshold = 32; // weak
float NiInputGamePad::ms_fDefaultAnalogDeadZone =  0.2; // weak
NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *> g_kParsedShaderList = { &NiTPointerList<NSFParsedShader *>::`vftable', NULL, NULL, { {  }, 0u } }; // idb
int yy_init = 1; // idb
int NSFParser_line_number = 1; // idb
unsigned int s_uiNumObjectSemantics = 12u; // idb
NiD3DShaderConstantMap::PredefinedMapping s_akObjectSemantics[12] =
{
  { 1u, "Dimmer" },
  { 5u, "Ambient" },
  { 6u, "Diffuse" },
  { 7u, "Specular" },
  { 8u, "Position" },
  { 10u, "Direction" },
  { 12u, "World" },
  { 15u, "Attenuation" },
  { 16u, "Projection" },
  { 18u, "ProjectionTranslation" },
  { 20u, "ClippingPlane" },
  { 22u, "TexCoordGen" }
}; // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> NpModelData_NiTexturingProperty::ms_mapTextureProperty =
{
  &NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexturingProperty>>::`vftable',
  37u,
  NULL,
  { {  }, 0u }
}; // idb
char byte_A81D14 = '\0'; // weak
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> NpKMI_Tool::ms_mapPartsSIF =
{
  &NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NpSIF_Tool>>::`vftable',
  37u,
  NULL,
  { {  }, 0u }
}; // idb
char byte_A81E7C = '\0'; // weak
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> NpModelData_KFM::ms_mapKFMTool =
{
  &NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiKFMTool>>::`vftable',
  37u,
  NULL,
  { {  }, 0u }
}; // idb
char byte_A81FE0 = '\0'; // weak
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> NpModelData_ActorM::ms_mapActorManager =
{
  &NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiActorManager>>::`vftable',
  37u,
  NULL,
  { {  }, 0u }
}; // idb
char byte_A82168 = '\0'; // weak
int nLevel = 4294967295; // idb
bool NsFadeNode::ms_bIsFadeOn = true; // weak
float NsFadeNode::ms_fScreenRate =  5.0; // weak
_UNKNOWN PgNsTerrain::ms_uiIndexList_1; // weak
_UNKNOWN PgNsTerrain::ms_uiIndexList_2; // weak
type_info boost::checked_deleter<PgNsTerrain::CPgBlockObject> `RTTI Type Descriptor' = { &type_info::`vftable', NULL, "." }; // idb
unsigned __int8 *NsPathFinding::DirTbl = (unsigned __int8 *)0x6040300; // weak
unsigned __int32 *NsPathFinding::XTbl = NULL; // weak
unsigned __int32 *NsPathFinding::YTbl = NULL; // weak
Wml::Vector3<double> Wml::Vector3<double>::ZERO = { { {  0.0,  0.0,  0.0 } } }; // idb
type_info *CPropertyType<int>::ms_rTypeInfo = &int `RTTI Type Descriptor'; // idb
type_info *CPropertyType<float>::ms_rTypeInfo = &float `RTTI Type Descriptor'; // idb
type_info *CPropertyType<unsigned int>::ms_rTypeInfo = &unsigned int `RTTI Type Descriptor'; // idb
type_info CGlowScreenEffect `RTTI Type Descriptor' = { &type_info::`vftable', NULL, "." }; // idb
type_info CDepthOfFieldEffect `RTTI Type Descriptor' = { &type_info::`vftable', NULL, "." }; // idb
type_info CAfterImageEffect `RTTI Type Descriptor' = { &type_info::`vftable', NULL, "." }; // idb
float CGlowScreenEffect::m_fGlowness =  0.60000002; // weak
float CGlowScreenEffect::m_fBlendFactor =  0.5; // weak
float CGlowScreenEffect::m_fGaussFactor =  1.0; // weak
float CGlowScreenEffect::m_fDownScaling =  8.0; // weak
unsigned int CGlowScreenEffect::m_unNumBlurring = 3u; // weak
int PgWin::ms_iScreenRightPos = 1023; // weak
int PgWin::ms_iScreenBottomPos = 767; // weak
unsigned int PgWin::ms_uiScreenWidth = 1024u; // idb
unsigned int PgWin::ms_uiScreenHeight = 768u; // idb
unsigned int PgWinMgr::ms_uiObjects = 1u; // weak
unsigned int PgWinMgr::ms_uiDepth = 4294967294u; // weak
LPCSTR PgEditWin::ms_pcWindowClassName = "PgEditWin"; // idb
char a02x[] = "%02x"; // idb
char aCC[] = "%c%c"; // idb
char szFormat[] = "Netmarble_ClipFormat"; // idb
int dword_A834A8[] = { 696885672 }; // weak
int dword_A838A8[] = { 943196208 }; // weak
int dword_A83CA8[] = { 2712152457 }; // weak
int dword_A840A8[] = { 137377848 }; // weak
struct ATL::CAtlStringMgr ATL::g_strmgr =
{
  { &ATL::CAtlStringMgr::`vftable' },
  &ATL::g_strheap,
  { { &ATL::g_strmgr, 0, 0, 2 }, { 0u, 0u } }
}; // weak
unsigned int NiD3DPass::ms_uiMaxTextureBlendStages = 2u; // idb
unsigned int NiD3DPass::ms_uiMaxSimultaneousTextures = 2u; // weak
unsigned int NiD3DPass::ms_uiMaxSamplers = 2u; // weak
char *NiD3DShader::m_pcNDLShaderMapName = "__NDL_SCMData"; // idb
enum _D3DFORMAT *NiDX9DeviceDesc::DisplayFormatInfo::ms_aeDepthStencilFormats = (enum _D3DFORMAT *)0x46; // weak
NiTPointerList<unsigned int> NiDX9Renderer::ms_kDisplayFormats = { { { &NiTPointerList<unsigned int>::`vftable', NULL, NULL, { {  }, 0u } } } }; // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> NiDX9AdditionalDepthStencilBufferData::ms_kAddDepthStencil =
{
  {
    &NiTPointerList<NiDX9AdditionalDepthStencilBufferData *>::`vftable',
    NULL,
    NULL,
    { {  }, 0u }
  }
}; // idb
bool NiD3DUtility::ms_bLogEnabled = true; // weak
unsigned int NiD3DSCM_Vertex::ms_uiNumPredefinedMappings = 108u; // weak
unsigned int NiD3DSCM_Vertex::ms_uiNumObjectMappings = 22u; // weak
_UNKNOWN NiD3DSCM_Vertex::ms_akPredefinedMappings; // weak
_UNKNOWN NiD3DSCM_Vertex::ms_akObjectMappings; // weak
_UNKNOWN NiD3DShaderConstantMap::ms_vTaylorSin; // weak
_UNKNOWN NiD3DShaderConstantMap::ms_vTaylorCos; // weak
char *NiD3DShaderConstantMap::ms_pcTimeExtraDataName = "NDL_UpdateTime"; // idb
enum _D3DDECLTYPE *NiDX9ShaderDeclaration::ms_aeTypes = NULL; // weak
enum _D3DDECLMETHOD *NiDX9ShaderDeclaration::ms_aeMethods = NULL; // weak
enum _D3DDECLUSAGE *NiDX9ShaderDeclaration::ms_aeUsage = NULL; // weak
struct NiD3DRenderState::RenderStateInitialValue *NiD3DRenderState::ms_akInitialRenderStateSettings = (struct NiD3DRenderState::RenderStateInitialValue *)7; // weak
int dword_A85ECC[] = { 0 }; // weak
int dword_A85ED0[] = { 8 }; // weak
int dword_A85ED4[] = { 3 }; // weak
int dword_A85ED8[] = { 9 }; // weak
int dword_A85EDC[] = { 2 }; // weak
int dword_A85EE0[] = { 14 }; // weak
int dword_A85EE4[] = { 1 }; // weak
struct NiD3DRenderState::TextureStageStateInitialValue *NiD3DRenderState::ms_akInitialTextureStageStateSettings = (struct NiD3DRenderState::TextureStageStateInitialValue *)1; // weak
unsigned int *NiD3DRenderState::ms_auiSamplesStateMappings = (unsigned int *)1; // weak
unsigned int *NiDX9RenderState::ms_auiSamplesStatesRevMappings = (unsigned int *)0xFFFFFFFF; // weak
struct NiD3DRenderState::SamplerStateInitialValue *NiD3DRenderState::ms_akInitialSamplerStateSettings = NULL; // weak
unsigned int NiVBSet::ms_uiDefBlockAllocSize = 32u; // weak
unsigned int NiVBSet::ms_uiDefBlockSize = 65536u; // weak
unsigned int NiVBSet::ms_uiDefFreeSpaceThreshold = 128u; // weak
unsigned int NiVBBlock::ms_uiDefClipAllocSize = 32u; // weak
char *PacketEncrypt::pe_encryptstr = (char *)0x4A695907; // weak
char msg[31] = "Error decoding compressed text"; // idb
int png_gamma_shift[8] = { 16, 33, 66, 132, 272, 584, 1360, 4080 }; // idb
char onebppswaptable[256] =
{
  '\0',
  '€',
  '@',
  'À',
  ' ',
  ' ',
  '`',
  'à',
  '\x10',
  '�',
  'P',
  'Ð',
  '0',
  '°',
  'p',
  'ð',
  '\b',
  'ˆ',
  'H',
  'È',
  '(',
  '¨',
  'h',
  'è',
  '\x18',
  '˜',
  'X',
  'Ø',
  '8',
  '¸',
  'x',
  'ø',
  '\x04',
  '„',
  'D',
  'Ä',
  '$',
  '¤',
  'd',
  'ä',
  '\x14',
  '”',
  'T',
  'Ô',
  '4',
  '´',
  't',
  'ô',
  '\f',
  'Œ',
  'L',
  'Ì',
  ',',
  '¬',
  'l',
  'ì',
  '\x1C',
  'œ',
  '\\',
  'Ü',
  '<',
  '¼',
  '|',
  'ü',
  '\x02',
  '‚',
  'B',
  'Â',
  '\"',
  '¢',
  'b',
  'â',
  '\x12',
  '’',
  'R',
  'Ò',
  '2',
  '²',
  'r',
  'ò',
  '\n',
  'Š',
  'J',
  'Ê',
  '*',
  'ª',
  'j',
  'ê',
  '\x1A',
  'š',
  'Z',
  'Ú',
  ':',
  'º',
  'z',
  'ú',
  '\x06',
  '†',
  'F',
  'Æ',
  '&',
  '¦',
  'f',
  'æ',
  '\x16',
  '–',
  'V',
  'Ö',
  '6',
  '¶',
  'v',
  'ö',
  '\x0E',
  'Ž',
  'N',
  'Î',
  '.',
  '®',
  'n',
  'î',
  '\x1E',
  'ž',
  '^',
  'Þ',
  '>',
  '¾',
  '~',
  'þ',
  '\x01',
  '�',
  'A',
  'Á',
  '!',
  '¡',
  'a',
  'á',
  '\x11',
  '‘',
  'Q',
  'Ñ',
  '1',
  '±',
  'q',
  'ñ',
  '\t',
  '‰',
  'I',
  'É',
  ')',
  '©',
  'i',
  'é',
  '\x19',
  '™',
  'Y',
  'Ù',
  '9',
  '¹',
  'y',
  'ù',
  '\x05',
  '…',
  'E',
  'Å',
  '%',
  '¥',
  'e',
  'å',
  '\x15',
  '•',
  'U',
  'Õ',
  '5',
  'µ',
  'u',
  'õ',
  '\r',
  '�',
  'M',
  'Í',
  '-',
  '­',
  'm',
  'í',
  '\x1D',
  '�',
  ']',
  'Ý',
  '=',
  '½',
  '}',
  'ý',
  '\x03',
  'ƒ',
  'C',
  'Ã',
  '#',
  '£',
  'c',
  'ã',
  '\x13',
  '“',
  'S',
  'Ó',
  '3',
  '³',
  's',
  'ó',
  '\v',
  '‹',
  'K',
  'Ë',
  '+',
  '«',
  'k',
  'ë',
  '\x1B',
  '›',
  '[',
  'Û',
  ';',
  '»',
  '{',
  'û',
  '\a',
  '‡',
  'G',
  'Ç',
  '\'',
  '§',
  'g',
  'ç',
  '\x17',
  '—',
  'W',
  '×',
  '7',
  '·',
  'w',
  '÷',
  '\x0F',
  '�',
  'O',
  'Ï',
  '/',
  '¯',
  'o',
  'ï',
  '\x1F',
  'Ÿ',
  '_',
  'ß',
  '?',
  '¿',
  '',
  '\xFF'
}; // idb
char twobppswaptable[256] =
{
  '\0',
  '@',
  '€',
  'À',
  '\x10',
  'P',
  '�',
  'Ð',
  ' ',
  '`',
  ' ',
  'à',
  '0',
  'p',
  '°',
  'ð',
  '\x04',
  'D',
  '„',
  'Ä',
  '\x14',
  'T',
  '”',
  'Ô',
  '$',
  'd',
  '¤',
  'ä',
  '4',
  't',
  '´',
  'ô',
  '\b',
  'H',
  'ˆ',
  'È',
  '\x18',
  'X',
  '˜',
  'Ø',
  '(',
  'h',
  '¨',
  'è',
  '8',
  'x',
  '¸',
  'ø',
  '\f',
  'L',
  'Œ',
  'Ì',
  '\x1C',
  '\\',
  'œ',
  'Ü',
  ',',
  'l',
  '¬',
  'ì',
  '<',
  '|',
  '¼',
  'ü',
  '\x01',
  'A',
  '�',
  'Á',
  '\x11',
  'Q',
  '‘',
  'Ñ',
  '!',
  'a',
  '¡',
  'á',
  '1',
  'q',
  '±',
  'ñ',
  '\x05',
  'E',
  '…',
  'Å',
  '\x15',
  'U',
  '•',
  'Õ',
  '%',
  'e',
  '¥',
  'å',
  '5',
  'u',
  'µ',
  'õ',
  '\t',
  'I',
  '‰',
  'É',
  '\x19',
  'Y',
  '™',
  'Ù',
  ')',
  'i',
  '©',
  'é',
  '9',
  'y',
  '¹',
  'ù',
  '\r',
  'M',
  '�',
  'Í',
  '\x1D',
  ']',
  '�',
  'Ý',
  '-',
  'm',
  '­',
  'í',
  '=',
  '}',
  '½',
  'ý',
  '\x02',
  'B',
  '‚',
  'Â',
  '\x12',
  'R',
  '’',
  'Ò',
  '\"',
  'b',
  '¢',
  'â',
  '2',
  'r',
  '²',
  'ò',
  '\x06',
  'F',
  '†',
  'Æ',
  '\x16',
  'V',
  '–',
  'Ö',
  '&',
  'f',
  '¦',
  'æ',
  '6',
  'v',
  '¶',
  'ö',
  '\n',
  'J',
  'Š',
  'Ê',
  '\x1A',
  'Z',
  'š',
  'Ú',
  '*',
  'j',
  'ª',
  'ê',
  ':',
  'z',
  'º',
  'ú',
  '\x0E',
  'N',
  'Ž',
  'Î',
  '\x1E',
  '^',
  'ž',
  'Þ',
  '.',
  'n',
  '®',
  'î',
  '>',
  '~',
  '¾',
  'þ',
  '\x03',
  'C',
  'ƒ',
  'Ã',
  '\x13',
  'S',
  '“',
  'Ó',
  '#',
  'c',
  '£',
  'ã',
  '3',
  's',
  '³',
  'ó',
  '\a',
  'G',
  '‡',
  'Ç',
  '\x17',
  'W',
  '—',
  '×',
  '\'',
  'g',
  '§',
  'ç',
  '7',
  'w',
  '·',
  '÷',
  '\v',
  'K',
  '‹',
  'Ë',
  '\x1B',
  '[',
  '›',
  'Û',
  '+',
  'k',
  '«',
  'ë',
  ';',
  '{',
  '»',
  'û',
  '\x0F',
  'O',
  '�',
  'Ï',
  '\x1F',
  '_',
  'Ÿ',
  'ß',
  '/',
  'o',
  '¯',
  'ï',
  '?',
  '',
  '¿',
  '\xFF'
}; // idb
char fourbppswaptable[256] =
{
  '\0',
  '\x10',
  ' ',
  '0',
  '@',
  'P',
  '`',
  'p',
  '€',
  '�',
  ' ',
  '°',
  'À',
  'Ð',
  'à',
  'ð',
  '\x01',
  '\x11',
  '!',
  '1',
  'A',
  'Q',
  'a',
  'q',
  '�',
  '‘',
  '¡',
  '±',
  'Á',
  'Ñ',
  'á',
  'ñ',
  '\x02',
  '\x12',
  '\"',
  '2',
  'B',
  'R',
  'b',
  'r',
  '‚',
  '’',
  '¢',
  '²',
  'Â',
  'Ò',
  'â',
  'ò',
  '\x03',
  '\x13',
  '#',
  '3',
  'C',
  'S',
  'c',
  's',
  'ƒ',
  '“',
  '£',
  '³',
  'Ã',
  'Ó',
  'ã',
  'ó',
  '\x04',
  '\x14',
  '$',
  '4',
  'D',
  'T',
  'd',
  't',
  '„',
  '”',
  '¤',
  '´',
  'Ä',
  'Ô',
  'ä',
  'ô',
  '\x05',
  '\x15',
  '%',
  '5',
  'E',
  'U',
  'e',
  'u',
  '…',
  '•',
  '¥',
  'µ',
  'Å',
  'Õ',
  'å',
  'õ',
  '\x06',
  '\x16',
  '&',
  '6',
  'F',
  'V',
  'f',
  'v',
  '†',
  '–',
  '¦',
  '¶',
  'Æ',
  'Ö',
  'æ',
  'ö',
  '\a',
  '\x17',
  '\'',
  '7',
  'G',
  'W',
  'g',
  'w',
  '‡',
  '—',
  '§',
  '·',
  'Ç',
  '×',
  'ç',
  '÷',
  '\b',
  '\x18',
  '(',
  '8',
  'H',
  'X',
  'h',
  'x',
  'ˆ',
  '˜',
  '¨',
  '¸',
  'È',
  'Ø',
  'è',
  'ø',
  '\t',
  '\x19',
  ')',
  '9',
  'I',
  'Y',
  'i',
  'y',
  '‰',
  '™',
  '©',
  '¹',
  'É',
  'Ù',
  'é',
  'ù',
  '\n',
  '\x1A',
  '*',
  ':',
  'J',
  'Z',
  'j',
  'z',
  'Š',
  'š',
  'ª',
  'º',
  'Ê',
  'Ú',
  'ê',
  'ú',
  '\v',
  '\x1B',
  '+',
  ';',
  'K',
  '[',
  'k',
  '{',
  '‹',
  '›',
  '«',
  '»',
  'Ë',
  'Û',
  'ë',
  'û',
  '\f',
  '\x1C',
  ',',
  '<',
  'L',
  '\\',
  'l',
  '|',
  'Œ',
  'œ',
  '¬',
  '¼',
  'Ì',
  'Ü',
  'ì',
  'ü',
  '\r',
  '\x1D',
  '-',
  '=',
  'M',
  ']',
  'm',
  '}',
  '�',
  '�',
  '­',
  '½',
  'Í',
  'Ý',
  'í',
  'ý',
  '\x0E',
  '\x1E',
  '.',
  '>',
  'N',
  '^',
  'n',
  '~',
  'Ž',
  'ž',
  '®',
  '¾',
  'Î',
  'Þ',
  'î',
  'þ',
  '\x0F',
  '\x1F',
  '/',
  '?',
  'O',
  '_',
  'o',
  '',
  '�',
  'Ÿ',
  '¯',
  '¿',
  'Ï',
  'ß',
  'ï',
  '\xFF'
}; // idb
unsigned int NSBShader::ms_uiReadVersion = 65552u; // weak
int (__cdecl *NSBShader::ms_pfnCreateNiBinaryShader)(_DWORD) = &NSBShader::DefaultCreateNiBinaryShader; // weak
unsigned int NiD3DSCM_Pixel::ms_uiNumMappings = 18u; // weak
_UNKNOWN NiD3DSCM_Pixel::ms_akPredefinedMappings; // weak
int ITableBase<TextDataType3,TextData3>::ms_pkTable = 0; // weak
int ITableBase<TextDataType2,TextData2>::ms_pkTable = 0; // weak
int ITableBase<ClassName,CharClass>::ms_pkTable = 0; // weak
float CharCreateFrameWork::fToonLineSize =  0.0; // weak
int ITableBase<TextDataType,TextData>::ms_pkTable = 0; // weak
int ITableBase<HairInfo,HairInfoTab>::ms_pkTable = 0; // weak
int ITableBase<ChrCreateEquip,ChrCreateEquipTab>::ms_pkTable = 0; // weak
int ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable = 0; // weak
int ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable = 0; // weak
char *apcSexText[2] = { NULL, NULL }; // idb
int dword_A886A8 = 0; // weak
NiRTTI CharCreateFrameWork::m_RTTI = { NULL, NULL }; // idb
NiRTTI CharSelectFrameWork::m_RTTI = { NULL, NULL }; // idb
unsigned int CharSelectFrameWork::ui_currentFairyPos = 0u; // weak
bool CharSelectFrameWork::bIsActiveMotion = false; // weak
bool CharSelectFrameWork::m_bLoadShortCutDataOption = false; // weak
bool CharSelectFrameWork::m_bLoadShortCutSizeOption = false; // weak
bool CharSelectFrameWork::m_bLoadWindowsPosOption = false; // weak
unsigned int CharSelectFrameWork::uiActiveCode = 0u; // idb
float CharSelectFrameWork::fToonLineSize =  0.0; // weak
bool CharSelectFrameWork::m_bLoadKeyMappingOption = false; // weak
bool CharSelectFrameWork::m_bLoadNewKeyMapOption = false; // weak
bool CharSelectFrameWork::m_bLoadGameSystemOption = false; // weak
bool CharSelectFrameWork::ms_bLoadKeyMappingOptionSuccess = false; // weak
bool CharSelectFrameWork::ms_bLoadShortCutSizeOptionSuccess = false; // weak
bool CharSelectFrameWork::ms_bLoadWindowsPosOptionSuccess = false; // weak
bool CharSelectFrameWork::ms_bLoadGameSystemOptionSuccess = false; // weak
bool CharSelectFrameWork::ms_bNewCharCreat = false; // weak
bool CharSelectFrameWork::ms_bGetPrisonInfo = false; // weak
bool CharSelectFrameWork::ms_bStateIsPrison = false; // weak
bool CharSelectFrameWork::ms_bFirstRun = false; // weak
unsigned __int32 CharSelectFrameWork::ms_dPrisonTimeMinute = 0u; // weak
int ITableBase<ChatColor,ChatColorTab>::ms_pkTable = 0; // weak
int ITableBase<ChargedItemEffect,ChargedEffectTable>::ms_pkTable = 0; // weak
INpShader *Engine3D::ms_spCarToon = NULL; // idb
NsPgToonExtraData *Engine3D::ms_spToonExtraData = NULL; // idb
char Folder::m_acLuaScript = '\0'; // idb
char Folder::m_acSkin = '\0'; // idb
char Folder::m_acMerge; // idb
char *Folder::m_acMHMap; // weak
char Folder::m_acMHObj; // idb
char *Folder::m_acFileName; // weak
char Folder::m_acCtrl; // idb
char Folder::m_acSystem; // idb
char Folder::m_acCharacter; // idb
char *Folder::m_acItem; // weak
char Folder::m_acEffect; // idb
char Folder::m_acSound; // idb
char Folder::m_acMap; // idb
char Folder::m_acMenu; // idb
char Folder::m_acMain; // idb
bool Folder::m_bInit; // weak
char Font::ms_acFontFaceName[256]; // idb
char Font::ms_acUserFont[256]; // idb
bool Font::ms_bShineFontLoadFailed; // weak
bool Font::ms_bUserFontLoadSuccess; // weak
bool Font::ms_bInit; // weak
struct Font::FontDefine *Font::ms_kFontDefine; // weak
_UNKNOWN unk_A89970; // weak
int dword_A89988[]; // weak
int dword_A8999C; // weak
int dword_A899A4; // weak
int dword_A899BC; // weak
_UNKNOWN unk_A899D0; // weak
_UNKNOWN unk_A89A04; // weak
_UNKNOWN unk_A89A38; // weak
_UNKNOWN unk_A89A6C; // weak
_UNKNOWN unk_A89AA0; // weak
int dword_A89AC4; // weak
_UNKNOWN unk_A89AD4; // weak
_UNKNOWN unk_A89B08; // weak
int dword_A89B2C; // weak
_UNKNOWN unk_A89B3C; // weak
int dword_A89B60; // weak
_UNKNOWN unk_A89B70; // weak
_UNKNOWN unk_A89BA4; // weak
int Font::ms_spFont[]; // weak
int ITableBase<FontSet,FontSetTab>::ms_pkTable; // weak
int `ITableBase<FontSet,FontSetTab>::ITableBase<FontSet,FontSetTab>'::`2'::`local static guard'; // weak
ItemMixDataTab g_kItemMixDataTab; // idb
ItemMixData stru_A89C14; // idb
std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> >,0> > ItemViewDummyTab::m_DummyMap; // idb
std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > stru_A89C68; // idb
void *unk_A89C74; // idb
_UNKNOWN unk_A89C78; // weak
_UNKNOWN unk_A89C7C; // weak
int ITableBase<ScriptMsg,ScriptMsgTab>::ms_pkTable; // weak
int Singleton<LuaScriptMgr>::m_pInstance; // weak
char Singleton<LuaScriptMgr>::m_bDestroy; // weak
int MenuTexMgr::ms_aspTexture[]; // weak
int ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>::ms_pkTable; // weak
int ITableBase<MoverMain,MoverMainTab>::ms_pkTable; // weak
int ITableBase<MoverHG,MoverHGTab>::ms_pkTable; // weak
int ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::ms_pkTable; // weak
int ITableBase<PupMain,PetMainTab>::ms_pkTable; // weak
int ITableBase<PupView,PetViewTab>::ms_pkTable; // weak
int ITableBase<MapInfo,MapInfoTab>::ms_pkTable; // weak
unsigned int PuzzleTimeWin::m_second; // weak
int ITableBase<FaceCutMsg,FaceCutMsgTab>::ms_pkTable; // weak
struct SteamCallback *SteamCallback::This; // weak
bool ATL::CAtlBaseModule::m_bInitFailed; // weak
bool SteamConfig::m_bRunning; // weak
int ITableBase<TermExtendMatch,TermExtendMatchTable>::ms_pkTable; // weak
int ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>::ms_pkTable; // weak
void *TextData::ms_apkNode; // idb
void *TextData2::ms_apkNode; // idb
void *TextData3::ms_apkNode; // idb
bool acRemoveFilter[256]; // idb
bool bFilterTableInited; // idb
char acTemp[512]; // idb
int ITableBase<SlanderFilter,SlanderFilterTable>::ms_pkTable; // weak
int ITableBase<EmotionFilter,EmotionFilterTable>::ms_pkTable; // weak
int ITableBase<BadNameFilter,BadNameFilterTable>::ms_pkTable; // weak
int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable; // weak
int `ITableBase<SlanderFilter,SlanderFilterTable>::ITableBase<SlanderFilter,SlanderFilterTable>'::`2'::`local static guard'; // weak
int `ITableBase<EmotionFilter,EmotionFilterTable>::ITableBase<EmotionFilter,EmotionFilterTable>'::`2'::`local static guard'; // weak
int `ITableBase<BadNameFilter,BadNameFilterTable>::ITableBase<BadNameFilter,BadNameFilterTable>'::`2'::`local static guard'; // weak
bool s_bInit; // idb
TextFilterSet s_kTextFilterSet; // idb
_UNKNOWN unk_A8A08C; // weak
_UNKNOWN unk_A8A090; // weak
_UNKNOWN unk_A8A094; // weak
ProcessingString stru_A8A098; // idb
unsigned int _S3; // idb
bool s_bInit_0; // idb
TextFilterSet s_kTextFilterSet_0; // idb
_UNKNOWN unk_A8ACA4; // weak
_UNKNOWN unk_A8ACA8; // weak
_UNKNOWN unk_A8ACAC; // weak
ProcessingString stru_A8ACB0; // idb
unsigned int _S4; // idb
char s_acCapitalizedName[128]; // idb
bool s_bBadNameLoaded; // idb
bool s_bInit_1; // idb
std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > TextFilterTable::ms_listBlockedID; // idb
TextScreenEffect *Singleton<TextScreenEffect>::m_pInstance; // idb
char Singleton<TextScreenEffect>::m_bDestroy; // weak
LARGE_INTEGER Timer::ms_StartQPC; // idb
_UNKNOWN Timer::ms_dLastServerTime; // weak
int dword_A8B95C; // weak
int dword_A8B960; // weak
float Timer::ms_fCurTime; // weak
float Timer::ms_fDeltaTime; // weak
float Timer::ms_fOldTime; // weak
float Timer::ms_fLastRecordServerTime; // weak
char Timer::ms_cTimeZone; // weak
Tutorial *Singleton<Tutorial>::m_pInstance; // idb
char Singleton<Tutorial>::m_bDestroy; // weak
unsigned int EditWin::ms_uiCaretBlinkTime; // weak
PgWin *EditWin::ms_pkCurEditWin; // idb
NiRTTI MaskShader::m_RTTI; // idb
int MaskShader::m_spShader; // weak
int MaskShader::m_spNoAlphaBlendShader; // weak
NiRTTI MaskShader_NoAlphaBlend::m_RTTI; // idb
bool MsgBox::m_bOkCheck; // weak
PgCursor *Cursor::ms_spGraphicCursor; // idb
_UNKNOWN Cursor::ms_akHWCurRes; // weak
_UNKNOWN unk_A8B9CC; // weak
int dword_A8B9D0[]; // weak
int dword_A8B9D4[]; // weak
bool Cursor::ms_bDeviceSupportHWCursor; // weak
bool Cursor::ms_bDropContentsExist; // weak
bool Cursor::ms_bInvalidateDropIcon; // weak
Studio *Cursor::ms_pkStudio; // idb
IDirect3DSurface9 *Cursor::ms_pkDropIconSurface; // idb
struct IDirect3DSurface9 *Cursor::ms_pkDropIconSurfaceTemp; // weak
PgWin *Cursor::m_pkSlotWin; // idb
NiPointer<NiD3DDefaultShader> Cursor::ms_spDropIconTexture; // idb
NiPointer<NiD3DDefaultShader> Cursor::ms_spCursorRenderCamera; // idb
NiPointer<NiD3DDefaultShader> Cursor::ms_spCursorFrame; // idb
int Singleton<CursorState>::m_pInstance; // weak
char Singleton<CursorState>::m_bDestroy; // weak
char g_acLogFilePath[260]; // idb
char acTempStr[1024]; // idb
void *MainApp::st_pbyDummyMemory; // idb
struct MainApp *MainApp::ms_pkMainApp; // weak
unsigned __int32 g_ProcessID; // weak
int `ITableBase<TextDataType,TextData>::ITableBase<TextDataType,TextData>'::`2'::`local static guard'; // weak
int `ITableBase<TextDataType2,TextData2>::ITableBase<TextDataType2,TextData2>'::`2'::`local static guard'; // weak
int `ITableBase<TextDataType3,TextData3>::ITableBase<TextDataType3,TextData3>'::`2'::`local static guard'; // weak
char ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable[]; // idb
int ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::ms_pkTable; // weak
int ITableBase<ItemMoney,ItemMoneyTab>::ms_pkTable; // weak
int ITableBase<ActionEffectInfo,ActionEffectInfoTab>::ms_pkTable; // weak
int ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::ms_pkTable; // weak
int ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::ms_pkTable; // weak
int ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::ms_pkTable; // weak
int ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::ms_pkTable; // weak
int ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::ms_pkTable; // weak
int ITableBase<MHEmotion,MiniHouseEmotionTab>::ms_pkTable; // weak
int ITableBase<UpEffectData,UpEffectTab>::ms_pkTable; // weak
int ITableBase<RaceName,CharRace>::ms_pkTable; // weak
int ITableBase<DmgSndMapByArmorType,DmgSndTab>::ms_pkTable; // weak
int ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable; // weak
int ITableBase<GatherInfo,GatherInfoTable>::ms_pkTable; // weak
int ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::ms_pkTable; // weak
int ITableBase<ProduceViewInfo,ProduceViewInfoTable>::ms_pkTable; // weak
int ITableBase<NpcDialogData,NpcDialogDataTable>::ms_pkTable; // weak
int ITableBase<GradeItemOption,GradeItemOptionTab>::ms_pkTable; // weak
int ITableBase<MiniHouse,MiniHouseTable>::ms_pkTable; // weak
int ITableBase<ItemShopView,ItemShopViewTable>::ms_pkTable; // weak
int ITableBase<WeaponAttrib,WeaponAttribTab>::ms_pkTable; // weak
int ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::ms_pkTable; // weak
int ITableBase<ItemDismantle,ItemDismantleTab>::ms_pkTable; // weak
int ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable; // weak
int ITableBase<SetItemName,SetItemNameTab>::ms_pkTable; // weak
int ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::ms_pkTable; // weak
int ITableBase<SetEffect,SetEffectTab>::ms_pkTable; // weak
int ITableBase<ActionEffectItem,ActionEffectItemTab>::ms_pkTable; // weak
int ITableBase<ItemAction,ItemActionTab>::ms_pkTable; // weak
int ITableBase<ItemActionEffect,ItemActionEffectTab>::ms_pkTable; // weak
int ITableBase<ItemActionCondition,ItemActionConditionTab>::ms_pkTable; // weak
int ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::ms_pkTable; // weak
int ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ms_pkTable; // weak
int ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::ms_pkTable; // weak
int ITableBase<DICE_Dividind,DiceDividIndTab>::ms_pkTable; // weak
int ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::ms_pkTable; // weak
int ITableBase<GBHouse,GBHouseTab>::ms_pkTable; // weak
int ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::ms_pkTable; // weak
int ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::ms_pkTable; // weak
int ITableBase<GTIView,GTIViewInfoTab>::ms_pkTable; // weak
int ITableBase<DamageEffect,DamageEffectTab>::ms_pkTable; // weak
int ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::ms_pkTable; // weak
int ITableBase<MapWayPoint,MapWayPointTab>::ms_pkTable; // weak
int ITableBase<MapLinkPoint,MapLinkPointTab>::ms_pkTable; // weak
int ITableBase<BelongTypeInfo,BelongTypeInfoTab>::ms_pkTable; // weak
int ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>::ms_pkTable; // weak
int ITableBase<BasicInfoTitle,BasicInfoTitleTab>::ms_pkTable; // weak
int ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable; // weak
int ITableBase<BasicInfoTip,BasicInfoTipTab>::ms_pkTable; // weak
int ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>::ms_pkTable; // weak
int ITableBase<BasicInfoFind,BasicInfoFindTab>::ms_pkTable; // weak
int ITableBase<BasicInfoFindUI,BasicInfoFindUITab>::ms_pkTable; // weak
int ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::ms_pkTable; // weak
int ITableBase<CollectCard,CollectCardTab>::ms_pkTable; // weak
int ITableBase<CollectCardView,CollectCardViewTab>::ms_pkTable; // weak
int ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::ms_pkTable; // weak
int ITableBase<CollectCardReward,CollectCardRewardTab>::ms_pkTable; // weak
int ITableBase<CollectCardTitle,CollectCardTitleTab>::ms_pkTable; // weak
int ITableBase<MoverUseSkill,MoverUseSkillTab>::ms_pkTable; // weak
int ITableBase<MoverView,MoverViewTab>::ms_pkTable; // weak
int ITableBase<MoverSlotView,MoverSlotViewTab>::ms_pkTable; // weak
int ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::ms_pkTable; // weak
int ITableBase<MoverAbility,MoverAbilityTab>::ms_pkTable; // weak
int ITableBase<MoverItem,MoverItemTab>::ms_pkTable; // weak
int ITableBase<KQVoteDesc,KQVoteDescTable>::ms_pkTable; // weak
int ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::ms_pkTable; // weak
int ITableBase<KQIsVote,KQIsVoteTable>::ms_pkTable; // weak
int ITableBase<KQTeam,KQTeamTable>::ms_pkTable; // weak
int ITableBase<MobConditionView,MobConditionViewTab>::ms_pkTable; // weak
int ITableBase<MobNoFadeIn,MobNoFadeInTab>::ms_pkTable; // weak
int ITableBase<MarketSearchInfo,MarketSearchInfoTab>::ms_pkTable; // weak
int ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::ms_pkTable; // weak
int ITableBase<MinimonInfo,MinimonInfoTable>::ms_pkTable; // weak
int ITableBase<ItemViewDummy,ItemViewDummyTab>::ms_pkTable; // weak
int ITableBase<UseClassTypeInfo,UseCalssTypeTable>::ms_pkTable; // weak
int ITableBase<ChrBasicEquip,ChrBasicEquipTab>::ms_pkTable; // weak
int ITableBase<MobInfo,MobInfoTab>::ms_pkTable; // weak
int ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable; // weak
int ITableBase<UpGradeInfo,UpGradeInfoTab>::ms_pkTable; // weak
int ITableBase<RIDING,RidePetTable>::ms_pkTable; // weak
int ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable; // weak
int ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::ms_pkTable; // weak
int ITableBase<ChargedIconItem,ChargedIconItemTab>::ms_pkTable; // weak
int ITableBase<ChargedMessageItem,ChargedMsgItemTab>::ms_pkTable; // weak
int ITableBase<AttendReward,AttendRewardTab>::ms_pkTable; // weak
int ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::ms_pkTable; // weak
int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable; // weak
int ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable; // weak
int ITableBase<MobViewInfo,MobViewInfoTab>::ms_pkTable; // weak
int ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable; // weak
int ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable; // weak
int ITableBase<SubAbStateInfo,SubAbStateInfoTab>::ms_pkTable; // weak
bool ms_b32BitZBuffer; // idb
const void *ms_pkMode; // idb
NiDX9DeviceDesc *ms_pkDevice; // idb
NiDX9AdapterDesc *ms_pkAdapter; // idb
NiDX9SystemDesc *ms_pkInfo; // idb
bool ms_bFullscreen; // idb
unsigned int _S3_0; // idb
bool m_bMinimize; // idb
int `ITableBase<ColorInfoType,ColorInfoTable>::ITableBase<ColorInfoType,ColorInfoTable>'::`2'::`local static guard'; // weak
int `ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>'::`2'::`local static guard'; // weak
int `ITableBase<ItemMoney,ItemMoneyTab>::ITableBase<ItemMoney,ItemMoneyTab>'::`2'::`local static guard'; // weak
int `ITableBase<ClassName,CharClass>::ITableBase<ClassName,CharClass>'::`2'::`local static guard'; // weak
int `ITableBase<ActionEffectInfo,ActionEffectInfoTab>::ITableBase<ActionEffectInfo,ActionEffectInfoTab>'::`2'::`local static guard'; // weak
int `ITableBase<HairInfo,HairInfoTab>::ITableBase<HairInfo,HairInfoTab>'::`2'::`local static guard'; // weak
int `ITableBase<HairColorInfo,HairColorInfoTab>::ITableBase<HairColorInfo,HairColorInfoTab>'::`2'::`local static guard'; // weak
int `ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>'::`2'::`local static guard'; // weak
int `ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>'::`2'::`local static guard'; // weak
int `ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>'::`2'::`local static guard'; // weak
int `ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>'::`2'::`local static guard'; // weak
int `ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>'::`2'::`local static guard'; // weak
int `ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>'::`2'::`local static guard'; // weak
int `ITableBase<MHEmotion,MiniHouseEmotionTab>::ITableBase<MHEmotion,MiniHouseEmotionTab>'::`2'::`local static guard'; // weak
int `ITableBase<UpEffectData,UpEffectTab>::ITableBase<UpEffectData,UpEffectTab>'::`2'::`local static guard'; // weak
int `ITableBase<ScriptMsg,ScriptMsgTab>::ITableBase<ScriptMsg,ScriptMsgTab>'::`2'::`local static guard'; // weak
int `ITableBase<ChargedItemEffect,ChargedEffectTable>::ITableBase<ChargedItemEffect,ChargedEffectTable>'::`2'::`local static guard'; // weak
int `ITableBase<RaceName,CharRace>::ITableBase<RaceName,CharRace>'::`2'::`local static guard'; // weak
int `ITableBase<FaceInfo,FaceInfoTab>::ITableBase<FaceInfo,FaceInfoTab>'::`2'::`local static guard'; // weak
int `ITableBase<DmgSndMapByArmorType,DmgSndTab>::ITableBase<DmgSndMapByArmorType,DmgSndTab>'::`2'::`local static guard'; // weak
int `ITableBase<ProduceInfo,ProduceInfoTable>::ITableBase<ProduceInfo,ProduceInfoTable>'::`2'::`local static guard'; // weak
int `ITableBase<GatherInfo,GatherInfoTable>::ITableBase<GatherInfo,GatherInfoTable>'::`2'::`local static guard'; // weak
int `ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::ITableBase<KINGDOM_QUEST_DESC,KQDescTable>'::`2'::`local static guard'; // weak
int `ITableBase<ProduceViewInfo,ProduceViewInfoTable>::ITableBase<ProduceViewInfo,ProduceViewInfoTable>'::`2'::`local static guard'; // weak
int `ITableBase<NpcDialogData,NpcDialogDataTable>::ITableBase<NpcDialogData,NpcDialogDataTable>'::`2'::`local static guard'; // weak
int `ITableBase<GradeItemOption,GradeItemOptionTab>::ITableBase<GradeItemOption,GradeItemOptionTab>'::`2'::`local static guard'; // weak
int `ITableBase<MiniHouse,MiniHouseTable>::ITableBase<MiniHouse,MiniHouseTable>'::`2'::`local static guard'; // weak
int `ITableBase<ItemShopView,ItemShopViewTable>::ITableBase<ItemShopView,ItemShopViewTable>'::`2'::`local static guard'; // weak
int `ITableBase<WeaponAttrib,WeaponAttribTab>::ITableBase<WeaponAttrib,WeaponAttribTab>'::`2'::`local static guard'; // weak
int `ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>'::`2'::`local static guard'; // weak
int `ITableBase<ItemDismantle,ItemDismantleTab>::ITableBase<ItemDismantle,ItemDismantleTab>'::`2'::`local static guard'; // weak
int `ITableBase<TownPortal,TownPortalInfoTable>::ITableBase<TownPortal,TownPortalInfoTable>'::`2'::`local static guard'; // weak
int `ITableBase<SetItemName,SetItemNameTab>::ITableBase<SetItemName,SetItemNameTab>'::`2'::`local static guard'; // weak
int `ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>'::`2'::`local static guard'; // weak
int `ITableBase<SetEffect,SetEffectTab>::ITableBase<SetEffect,SetEffectTab>'::`2'::`local static guard'; // weak
int `ITableBase<ActionEffectItem,ActionEffectItemTab>::ITableBase<ActionEffectItem,ActionEffectItemTab>'::`2'::`local static guard'; // weak
int `ITableBase<ItemAction,ItemActionTab>::ITableBase<ItemAction,ItemActionTab>'::`2'::`local static guard'; // weak
int `ITableBase<ItemActionEffect,ItemActionEffectTab>::ITableBase<ItemActionEffect,ItemActionEffectTab>'::`2'::`local static guard'; // weak
int `ITableBase<ItemActionCondition,ItemActionConditionTab>::ITableBase<ItemActionCondition,ItemActionConditionTab>'::`2'::`local static guard'; // weak
int `ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>'::`2'::`local static guard'; // weak
int `ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>'::`2'::`local static guard'; // weak
int `ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>'::`2'::`local static guard'; // weak
int `ITableBase<DICE_Dividind,DiceDividIndTab>::ITableBase<DICE_Dividind,DiceDividIndTab>'::`2'::`local static guard'; // weak
int `ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>'::`2'::`local static guard'; // weak
int `ITableBase<GBHouse,GBHouseTab>::ITableBase<GBHouse,GBHouseTab>'::`2'::`local static guard'; // weak
int `ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>'::`2'::`local static guard'; // weak
int `ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>'::`2'::`local static guard'; // weak
int `ITableBase<GTIView,GTIViewInfoTab>::ITableBase<GTIView,GTIViewInfoTab>'::`2'::`local static guard'; // weak
int `ITableBase<DamageEffect,DamageEffectTab>::ITableBase<DamageEffect,DamageEffectTab>'::`2'::`local static guard'; // weak
int `ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>'::`2'::`local static guard'; // weak
int `ITableBase<MapWayPoint,MapWayPointTab>::ITableBase<MapWayPoint,MapWayPointTab>'::`2'::`local static guard'; // weak
int `ITableBase<MapLinkPoint,MapLinkPointTab>::ITableBase<MapLinkPoint,MapLinkPointTab>'::`2'::`local static guard'; // weak
int `ITableBase<BelongTypeInfo,BelongTypeInfoTab>::ITableBase<BelongTypeInfo,BelongTypeInfoTab>'::`2'::`local static guard'; // weak
int `ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>::ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>'::`2'::`local static guard'; // weak
int `ITableBase<BasicInfoTitle,BasicInfoTitleTab>::ITableBase<BasicInfoTitle,BasicInfoTitleTab>'::`2'::`local static guard'; // weak
int `ITableBase<BasicInfoLink,BasicInfoLinkTab>::ITableBase<BasicInfoLink,BasicInfoLinkTab>'::`2'::`local static guard'; // weak
int `ITableBase<BasicInfoTip,BasicInfoTipTab>::ITableBase<BasicInfoTip,BasicInfoTipTab>'::`2'::`local static guard'; // weak
int `ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>::ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>'::`2'::`local static guard'; // weak
int `ITableBase<BasicInfoFind,BasicInfoFindTab>::ITableBase<BasicInfoFind,BasicInfoFindTab>'::`2'::`local static guard'; // weak
int `ITableBase<BasicInfoFindUI,BasicInfoFindUITab>::ITableBase<BasicInfoFindUI,BasicInfoFindUITab>'::`2'::`local static guard'; // weak
int `ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>'::`2'::`local static guard'; // weak
int `ITableBase<CollectCard,CollectCardTab>::ITableBase<CollectCard,CollectCardTab>'::`2'::`local static guard'; // weak
int `ITableBase<CollectCardView,CollectCardViewTab>::ITableBase<CollectCardView,CollectCardViewTab>'::`2'::`local static guard'; // weak
int `ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>'::`2'::`local static guard'; // weak
int `ITableBase<CollectCardReward,CollectCardRewardTab>::ITableBase<CollectCardReward,CollectCardRewardTab>'::`2'::`local static guard'; // weak
int `ITableBase<CollectCardTitle,CollectCardTitleTab>::ITableBase<CollectCardTitle,CollectCardTitleTab>'::`2'::`local static guard'; // weak
int `ITableBase<MoverMain,MoverMainTab>::ITableBase<MoverMain,MoverMainTab>'::`2'::`local static guard'; // weak
int `ITableBase<MoverUseSkill,MoverUseSkillTab>::ITableBase<MoverUseSkill,MoverUseSkillTab>'::`2'::`local static guard'; // weak
int `ITableBase<MoverHG,MoverHGTab>::ITableBase<MoverHG,MoverHGTab>'::`2'::`local static guard'; // weak
int `ITableBase<MoverView,MoverViewTab>::ITableBase<MoverView,MoverViewTab>'::`2'::`local static guard'; // weak
int `ITableBase<MoverSlotView,MoverSlotViewTab>::ITableBase<MoverSlotView,MoverSlotViewTab>'::`2'::`local static guard'; // weak
int `ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>'::`2'::`local static guard'; // weak
int `ITableBase<MoverAbility,MoverAbilityTab>::ITableBase<MoverAbility,MoverAbilityTab>'::`2'::`local static guard'; // weak
int `ITableBase<MoverItem,MoverItemTab>::ITableBase<MoverItem,MoverItemTab>'::`2'::`local static guard'; // weak
int `ITableBase<PupMain,PetMainTab>::ITableBase<PupMain,PetMainTab>'::`2'::`local static guard'; // weak
int `ITableBase<PupView,PetViewTab>::ITableBase<PupView,PetViewTab>'::`2'::`local static guard'; // weak
int `ITableBase<KQVoteDesc,KQVoteDescTable>::ITableBase<KQVoteDesc,KQVoteDescTable>'::`2'::`local static guard'; // weak
int `ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>'::`2'::`local static guard'; // weak
int `ITableBase<KQIsVote,KQIsVoteTable>::ITableBase<KQIsVote,KQIsVoteTable>'::`2'::`local static guard'; // weak
int `ITableBase<KQTeam,KQTeamTable>::ITableBase<KQTeam,KQTeamTable>'::`2'::`local static guard'; // weak
int `ITableBase<MobConditionView,MobConditionViewTab>::ITableBase<MobConditionView,MobConditionViewTab>'::`2'::`local static guard'; // weak
int `ITableBase<MobNoFadeIn,MobNoFadeInTab>::ITableBase<MobNoFadeIn,MobNoFadeInTab>'::`2'::`local static guard'; // weak
int `ITableBase<MarketSearchInfo,MarketSearchInfoTab>::ITableBase<MarketSearchInfo,MarketSearchInfoTab>'::`2'::`local static guard'; // weak
int `ITableBase<ChrCreateEquip,ChrCreateEquipTab>::ITableBase<ChrCreateEquip,ChrCreateEquipTab>'::`2'::`local static guard'; // weak
int `ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>'::`2'::`local static guard'; // weak
int `ITableBase<ChatColor,ChatColorTab>::ITableBase<ChatColor,ChatColorTab>'::`2'::`local static guard'; // weak
int `ITableBase<TermExtendMatch,TermExtendMatchTable>::ITableBase<TermExtendMatch,TermExtendMatchTable>'::`2'::`local static guard'; // weak
int `ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>::ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>'::`2'::`local static guard'; // weak
int `ITableBase<MinimonInfo,MinimonInfoTable>::ITableBase<MinimonInfo,MinimonInfoTable>'::`2'::`local static guard'; // weak
int `ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>::ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>'::`2'::`local static guard'; // weak
int `ITableBase<ItemViewDummy,ItemViewDummyTab>::ITableBase<ItemViewDummy,ItemViewDummyTab>'::`2'::`local static guard'; // weak
int `ITableBase<UseClassTypeInfo,UseCalssTypeTable>::ITableBase<UseClassTypeInfo,UseCalssTypeTable>'::`2'::`local static guard'; // weak
int `ITableBase<ChrBasicEquip,ChrBasicEquipTab>::ITableBase<ChrBasicEquip,ChrBasicEquipTab>'::`2'::`local static guard'; // weak
int `ITableBase<MobInfo,MobInfoTab>::ITableBase<MobInfo,MobInfoTab>'::`2'::`local static guard'; // weak
int `ITableBase<MapInfo,MapInfoTab>::ITableBase<MapInfo,MapInfoTab>'::`2'::`local static guard'; // weak
int `ITableBase<MapViewInfo,MapViewInfoTab>::ITableBase<MapViewInfo,MapViewInfoTab>'::`2'::`local static guard'; // weak
int `ITableBase<UpGradeInfo,UpGradeInfoTab>::ITableBase<UpGradeInfo,UpGradeInfoTab>'::`2'::`local static guard'; // weak
int `ITableBase<ActionViewInfo,ActionViewTable>::ITableBase<ActionViewInfo,ActionViewTable>'::`2'::`local static guard'; // weak
int `ITableBase<RIDING,RidePetTable>::ITableBase<RIDING,RidePetTable>'::`2'::`local static guard'; // weak
int `ITableBase<MobCoordinate,MobCoordinateTab>::ITableBase<MobCoordinate,MobCoordinateTab>'::`2'::`local static guard'; // weak
int `ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>'::`2'::`local static guard'; // weak
int `ITableBase<ChargedIconItem,ChargedIconItemTab>::ITableBase<ChargedIconItem,ChargedIconItemTab>'::`2'::`local static guard'; // weak
int `ITableBase<ChargedMessageItem,ChargedMsgItemTab>::ITableBase<ChargedMessageItem,ChargedMsgItemTab>'::`2'::`local static guard'; // weak
int `ITableBase<AttendReward,AttendRewardTab>::ITableBase<AttendReward,AttendRewardTab>'::`2'::`local static guard'; // weak
int `ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>'::`2'::`local static guard'; // weak
int `ITableBase<ItemInfo,ItemInfoTab>::ITableBase<ItemInfo,ItemInfoTab>'::`2'::`local static guard'; // weak
int `ITableBase<ItemViewInfo,ItemViewInfoTab>::ITableBase<ItemViewInfo,ItemViewInfoTab>'::`2'::`local static guard'; // weak
int `ITableBase<MobViewInfo,MobViewInfoTab>::ITableBase<MobViewInfo,MobViewInfoTab>'::`2'::`local static guard'; // weak
int `ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>'::`2'::`local static guard'; // weak
int `ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>'::`2'::`local static guard'; // weak
int `ITableBase<SubAbStateInfo,SubAbStateInfoTab>::ITableBase<SubAbStateInfo,SubAbStateInfoTab>'::`2'::`local static guard'; // weak
int `ITableBase<FaceCutMsg,FaceCutMsgTab>::ITableBase<FaceCutMsg,FaceCutMsgTab>'::`2'::`local static guard'; // weak
CSingleDataMap g_kSingleDataMap; // idb
HINSTANCE g_hMainInstance; // idb
HWND g_hMainWnd; // idb
struct NiInputKeyboard *g_pkKeyboard; // weak
struct NiInputMouse *g_pkMouse; // weak
void *AccountFrameWorkID; // idb
void *LoginWorldNetFrameWorkID; // idb
void *ZoneLoginNetFrameWorkID; // idb
void *CharSelectFrameWorkID; // idb
void *CharCreateFrameWorkID; // idb
void *LoadingFrameWorkID; // idb
void *GameFrameWorkID; // idb
void *LinkFrameWorkID; // idb
void *CHairShopFrameWorkID; // idb
int NiStepFloatKeyregisterloaderreturn; // idb
int NiBoolKeyregisterloaderreturn; // idb
int NiStepColorKeyregisterloaderreturn; // idb
int NiTCBPosKeyregisterloaderreturn; // idb
int NiStepPosKeyregisterloaderreturn; // idb
int NiTCBFloatKeyregisterloaderreturn; // idb
int NiLinPosKeyregisterloaderreturn; // idb
int NiBezRotKeyregisterloaderreturn; // idb
int NiEulerRotKeyregisterloaderreturn; // idb
int NiStepBoolKeyregisterloaderreturn; // idb
int NiTCBRotKeyregisterloaderreturn; // idb
int NiColorKeyregisterloaderreturn; // idb
int NiRotKeyregisterloaderreturn; // idb
int NiLinFloatKeyregisterloaderreturn; // idb
int NiStepRotKeyregisterloaderreturn; // idb
int NiBezPosKeyregisterloaderreturn; // idb
int NiBezFloatKeyregisterloaderreturn; // idb
int NiFloatKeyregisterloaderreturn; // idb
int NiLinRotKeyregisterloaderreturn; // idb
int NiPosKeyregisterloaderreturn; // idb
int NiLinColorKeyregisterloaderreturn; // idb
boost::singleton_pool<boost::fast_pool_allocator_tag,28,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>::pool_type `boost::details::pool::singleton_default<boost::singleton_pool<boost::fast_pool_allocator_tag,28,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>::pool_type>::instance'::`2'::obj; // idb
int `boost::details::pool::singleton_default<boost::singleton_pool<boost::fast_pool_allocator_tag,28,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>::pool_type>::instance'::`2'::`local static guard'; // weak
void *CRTTIClass<CWorldConfig,CBaseObject>::ms_RTTI[4]; // idb
_UNKNOWN unk_A8C574; // weak
_UNKNOWN unk_A8C578; // weak
std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > unk_A8C584; // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > Last; // idb
void *CRTTIClass<CBaseObject,CNullClass>::ms_RTTI[4]; // idb
_UNKNOWN unk_A8C5A8; // weak
_UNKNOWN unk_A8C5AC; // weak
std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > unk_A8C5B8; // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > stru_A8C5BC; // idb
bool AccountFrameWork::ms_bWindowSizeChanged; // weak
int `std::basic_filebuf<char,std::char_traits<char>>::_Init'::`2'::_Stinit; // idb
int std::_Facetptr<std::ctype<char>>::_Psave; // weak
int std::_Facetptr<std::codecvt<char,char,int>>::_Psave; // weak
int std::codecvt<char,char,int>::id; // weak
bool AccountFrameWork::ms_bSecondStart; // weak
NiRTTI AccountFrameWork::m_RTTI; // idb
NiDX9AdapterDesc *ms_pkAdapter_0; // idb
NiDX9SystemDesc *ms_pkInfo_0; // idb
unsigned int dwPrevTime; // idb
unsigned int _S3_1; // idb
NiRTTI LoginWorldNetFrameWork::m_RTTI; // idb
bool CharSelectFrameWork::ms_bShortCutDataLoaded; // weak
NiRTTI ZoneLoginNetFrameWork::m_RTTI; // idb
TutorialMgr `TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr; // idb
int `TutorialMgr::GetTutorialMgr'::`2'::`local static guard'; // weak
ScenarioMgr `ScenarioMgr::GetScenarioMgr'::`2'::kScenarioMgr; // idb
int `ScenarioMgr::GetScenarioMgr'::`2'::`local static guard'; // weak
struct PgWin *ms_pkTestWin2; // weak
PgWin *ms_pkTestWin; // idb
char `ShineLogDisplay::Log'::`5'::acTempStr[1024]; // idb
int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable; // weak
NiDX9AdapterDesc *ms_pkAdapter_1; // idb
NiDX9SystemDesc *ms_pkInfo_1; // idb
char byte_A8CA64; // weak
int dword_A8CA68; // idb
int dword_A8CA6C; // idb
int dword_A8CA70; // weak
bool GameFrameWork::_isCheating; // weak
unsigned int dwPrevTimeWhenHouseChanged; // idb
unsigned int s_nSelNum; // idb
int ISingletonTask<GuildJoinReqTask>::ms_pkSingletonTask; // weak
void *m_kAttackedList; // idb
int dword_A8CA98; // weak
int ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable; // weak
unsigned int dwLastSendTime; // idb
unsigned int dwPrevTimeWhenHouseChanged_0; // idb
int ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ms_pkTable; // weak
float unCheckTimer; // idb
unsigned int _S3_2; // idb
float unCheckTimer_0; // idb
unsigned int _S4_0; // idb
int ISingletonTask<ItemUseTask>::ms_pkSingletonTask; // weak
EffectObjectMgr `EffectObjectMgr::GetMgr'::`2'::kEffectObjectMgr; // idb
std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > unk_A8CAC8; // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > stru_A8CACC; // idb
int dword_A8CAD0; // weak
int `EffectObjectMgr::GetMgr'::`2'::`local static guard'; // weak
AreaInfoMgr `AreaInfoMgr::GetInstance'::`2'::kMgr; // idb
int `AreaInfoMgr::GetInstance'::`2'::`local static guard'; // weak
unsigned int dwSinceSkillActive; // idb
unsigned int _S3_3; // idb
bool GameFrameWork::ms_bRendererRecreated; // weak
bool GameFrameWork::ms_bWindowSizeChanged; // weak
bool GameFrameWork::ms_bRecreatingDisplay; // weak
bool GameFrameWork::ms_bGameFrameStart; // weak
unsigned int GameFrameWork::ms_uiFirstCreateDevice; // weak
bool GameFrameWork::ms_bSpawnApps; // weak
bool GameFrameWork::ms_bFirstRun; // weak
NiRTTI GameFrameWork::m_RTTI; // idb
Name5 GameFrameWork::m_kWhisperCharID; // idb
bool AnnounceWin::m_bNoticing; // weak
bool EffStart; // idb
NiPoint3 aVerTex[15]; // idb
float flt_A8CB2C; // weak
float flt_A8CB30; // weak
float flt_A8CB34; // weak
float flt_A8CB38; // weak
float flt_A8CB3C; // weak
float flt_A8CB40; // weak
float flt_A8CB44; // weak
float flt_A8CB48; // weak
float flt_A8CB4C; // weak
float flt_A8CB50; // weak
float flt_A8CB54; // weak
float flt_A8CB58; // weak
float flt_A8CB5C; // weak
float flt_A8CB60; // weak
float flt_A8CB64; // weak
float flt_A8CB68; // weak
float flt_A8CB6C; // weak
float flt_A8CB70; // weak
float flt_A8CB74; // weak
float flt_A8CB78; // weak
float flt_A8CB7C; // weak
float flt_A8CB80; // weak
float flt_A8CB84; // weak
float flt_A8CB88; // weak
float flt_A8CB8C; // weak
float flt_A8CB90; // weak
float flt_A8CB94; // weak
float flt_A8CB98; // weak
float flt_A8CB9C; // weak
float flt_A8CBA0; // weak
float flt_A8CBA4; // weak
float flt_A8CBA8; // weak
float flt_A8CBAC; // weak
float flt_A8CBB0; // weak
float flt_A8CBB4; // weak
float flt_A8CBB8; // weak
float flt_A8CBBC; // weak
float flt_A8CBC0; // weak
float flt_A8CBC4; // weak
float flt_A8CBC8; // weak
float flt_A8CBCC; // weak
float flt_A8CBD0; // weak
float flt_A8CBD4; // weak
float flt_A8CBD8; // weak
unsigned int _S3_4; // idb
bool EnchantGemWin::ms_bSend2EndOfTrade; // weak
bool bSTotalMember; // idb
bool bSGuildGrade; // idb
bool bSGuildType; // idb
bool bSMasterName; // idb
bool bSGuildName; // idb
unsigned int IDTimeWin::m_second; // weak
ITEM_INVEN InventoryWin::ms_kTo; // idb
ITEM_INVEN InventoryWin::ms_kFrom; // idb
unsigned int InventoryWin::ms_uiMode; // weak
NiRTTI InvWin::m_RTTI; // idb
int ISingletonTask<ChargedItemUseTask>::ms_pkSingletonTask; // weak
ItemInfoWin *g_pkItemInfoWin; // idb
char acStr[64]; // idb
char resultKeyName[256]; // idb
__int64 MoneyWin::i64Money; // idb
int ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::ms_pkTable; // weak
char PopupMenuTemplate::ms_acCharName[256]; // idb
char *PopupMenuTemplate::ms_acChoiceMapNameSlot4; // weak
char *PopupMenuTemplate::ms_acChoiceMapNameSlot3; // weak
char *PopupMenuTemplate::ms_acChoiceMapNameSlot2; // weak
char *PopupMenuTemplate::ms_acChoiceMapNameSlot1; // weak
char *PopupMenuTemplate::ms_acChoiceMapNameSlot0; // weak
PgWin *PopupMenuTemplate::ms_spProposeTradeMenu; // idb
PgWin *PopupMenuTemplate::ms_spInvitePartyMenu; // idb
PgWin *PopupMenuTemplate::ms_spCancelMenu; // idb
PgWin *PopupMenuTemplate::ms_spDelegatePartyMenu; // idb
PgWin *PopupMenuTemplate::ms_spQuitPartyMenu; // idb
PgWin *PopupMenuTemplate::ms_spFirePartyMemberMenu; // idb
PgWin *PopupMenuTemplate::ms_spInviteGuildMenu; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spPartyMasterLootFreeSetupMenu; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spPartyMasterLootSequentialSetupMenu; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spPartyMemberLootFreeSetupMenu; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spPartyMemberLootSequentialSetupMenu; // idb
PgWin *PopupMenuTemplate::ms_spPartyLootSetupMenu; // idb
int PopupMenuTemplate::ms_spFollowCharMenu; // weak
PopupMenuWin *PopupMenuTemplate::ms_spPartyMasterLootSetupSubMenuWin; // idb
PgWin *PopupMenuTemplate::ms_spMainCharUnMetamorphosis; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spResolutionMenu0; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spResolutionMenu1; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spResolutionMenu2; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spResolutionMenu3; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spResolutionMenu4; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spResolutionMenu5; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spResolutionMenu6; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spResolutionMenu7; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spResolutionMenu8; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spResolutionMenu9; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spResolutionMenu10; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spResolutionMenu11; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spResolutionMenu12; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spResolutionMenu13; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spResolutionMenu14; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spResolutionMenu15; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spResolutionMenu16; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spResolutionMenu17; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spResolutionMenu18; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spResolutionMenu19; // idb
PgWin *PopupMenuTemplate::ms_spWhisper; // idb
int PopupMenuTemplate::ms_spTargetCharName; // weak
PgWin *PopupMenuTemplate::ms_spHighHolyPromise; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spPlaceMemory0; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spPlaceMemory1; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spPlaceMemory2; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spPlaceMemory3; // idb
NiPointer<NiD3DDefaultShader> PopupMenuTemplate::ms_spPlaceMemory4; // idb
PgWin *PopupMenuTemplate::ms_spConfigRoom; // idb
int PopupMenuTemplate::ms_spShowBlog; // weak
int PopupMenuTemplate::ms_spChangeBlogAddr; // weak
int PopupMenuTemplate::ms_spKickGuest; // weak
int PopupMenuTemplate::ms_spSetArrModeOn; // weak
int PopupMenuTemplate::ms_spSetArrModeOff; // weak
int PopupMenuTemplate::ms_spReturnToInvMHItem; // weak
int PopupMenuTemplate::ms_spArrToInvMHItem; // weak
int PopupMenuTemplate::ms_spDeleteMHItem; // weak
int PopupMenuTemplate::ms_spObjAction; // weak
int PopupMenuTemplate::ms_spObjName; // weak
int PopupMenuTemplate::ms_spMHObjEndure; // weak
int PopupMenuTemplate::ms_spMHObjEndurePercentage; // weak
int PopupMenuTemplate::m_spReArrange; // weak
int PopupMenuTemplate::m_spSelectCancel; // weak
PgWin *PopupMenuTemplate::ms_spBuffUIMenu; // idb
PgWin *PopupMenuTemplate::ms_spRaidSelect; // idb
PgWin *PopupMenuTemplate::ms_spRaidInvite; // idb
PgWin *PopupMenuTemplate::ms_spRaidVanish; // idb
PgWin *PopupMenuTemplate::ms_spRaidLeave; // idb
PgWin *PopupMenuTemplate::ms_spChangeRaidLeader; // idb
PgWin *PopupMenuTemplate::ms_spChangeRaidLooter; // idb
PgWin *PopupMenuTemplate::ms_spRaidSubLeaderUp; // idb
PgWin *PopupMenuTemplate::ms_spRaidSubLeaderDown; // idb
PgWin *PopupMenuTemplate::ms_spCollectOpen; // idb
PgWin *PopupMenuTemplate::ms_spInviteFriend; // idb
PgWin *PopupMenuTemplate::ms_spRideOn; // idb
PgWin *PopupMenuTemplate::ms_spVote; // idb
unsigned int PrisonTimeWin::m_second; // weak
unsigned __int16 PrivateStoreWin::ms_BoothHandle; // weak
bool PrivateStoreWin::ms_bPrivateStoreWin; // weak
unsigned __int16 ProductionWin::ms_kCurrProduceBaseSkillID; // weak
bool s_bInit_2; // idb
TextFilterSet s_kTextFilterSet_1; // idb
_UNKNOWN unk_A8D48C; // weak
_UNKNOWN unk_A8D490; // weak
_UNKNOWN unk_A8D494; // weak
ProcessingString stru_A8D498; // idb
unsigned int _S3_5; // idb
bool ShortCutWin::ms_bShortCutSizeFinish; // weak
unsigned int ShortCutWin::m_uiShortcutSubWinIndex; // weak
PgWin *g_pkSkillInfoWin; // idb
char acStr_0[64]; // idb
PgWin *g_pkSoulStoneInfoWin; // idb
union ITEM_INVEN StorageWin::ms_kFrom; // weak
PgWin *g_pkToolTipWin; // idb
NiPoint2 `WorldMapAvatarInfoTab::GetByAvatarPosition'::`2'::kAvatarPosition; // idb
int `WorldMapAvatarInfoTab::GetByAvatarPosition'::`2'::`local static guard'; // weak
NiPointer<NiD3DDefaultShader> IconWin::ms_spOverGeom; // idb
NiPointer<NiD3DDefaultShader> IconWin::ms_spClickGeom; // idb
std::vector<unsigned long,std::allocator<unsigned long> > IconWin::ms_kCoolTimeIconList; // idb
int ISingletonTask<GuildLeaveTask>::ms_pkSingletonTask; // weak
int ISingletonTask<GuildNotifyTask>::ms_pkSingletonTask; // weak
int ISingletonTask<GuildDismissTask>::ms_pkSingletonTask; // weak
char s_acTimeStr[64]; // idb
char acStr_1[17]; // idb
__int64 qword_A8E170; // weak
char byte_A8E178; // weak
int ISingletonTask<GuildMemberVanishTask>::ms_pkSingletonTask; // weak
int ISingletonTask<GuildMemberGradeSetupTask>::ms_pkSingletonTask; // weak
int ISingletonTask<GuildAcademyMasterAppointTask>::ms_pkSingletonTask; // weak
int ISingletonTask<GuildAcademyMasterInitializeTask>::ms_pkSingletonTask; // weak
bool bTitle07; // idb
bool bTitle06; // idb
bool bTitle05; // idb
bool bTitle04; // idb
bool bTitle03; // idb
bool bTitle02; // idb
bool bTitle01; // idb
bool bSTotalMember_0; // idb
bool bSGuildGrade_0; // idb
bool bSGuildType_0; // idb
bool bSMasterName_0; // idb
bool bSGuildName_0; // idb
ITEM_INVEN GuildTournamentStorageWin::ms_kTo; // idb
ITEM_INVEN GuildTournamentStorageWin::ms_kFrom; // idb
_UNKNOWN unk_A8E19E; // weak
int iZPos; // idb
int iYPos; // idb
int iXPos; // idb
bool bIsMove; // idb
bool bSortByTltle; // idb
bool bSortByUserCnt; // idb
bool bSortByStarttime; // idb
bool bSortByState; // idb
unsigned int KQuestTimeWin::m_second; // weak
unsigned int *DlgQuestListWin::QuestNameList::ms_TypePriority; // weak
int dword_A8E1BC; // weak
int dword_A8E1C0; // weak
int dword_A8E1C4; // weak
int dword_A8E1C8; // weak
int dword_A8E1CC; // weak
int dword_A8E1D0; // weak
int dword_A8E1D4; // weak
int dword_A8E1D8; // weak
int dword_A8E1DC; // weak
int dword_A8E1E0; // weak
unsigned int *DlgQuestListWin::QuestNameList::ms_StatusPriority; // weak
int dword_A8E1EC; // weak
int dword_A8E1F0; // weak
int dword_A8E1F4; // weak
int dword_A8E1F8; // weak
int dword_A8E1FC; // weak
int dword_A8E200; // weak
int dword_A8E204; // weak
int dword_A8E208; // weak
int dword_A8E20C; // weak
int dword_A8E210; // weak
int dword_A8E214; // weak
int dword_A8E218; // weak
int dword_A8E21C; // weak
int dword_A8E220; // weak
int dword_A8E224; // weak
int dword_A8E228; // weak
int dword_A8E22C; // weak
int dword_A8E230; // weak
int dword_A8E234; // weak
int dword_A8E238; // weak
char acText[2048]; // idb
char acText_0[64]; // idb
bool QuestPigeonEffect::ms_bGameStart; // weak
NiRTTI QuestPigeonEffect::m_RTTI; // idb
bool CQuestWin2::ms_bUpdate; // weak
int std::_Facetptr<std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>>::_Psave; // weak
int std::_Facetptr<std::numpunct<char>>::_Psave; // weak
int std::numpunct<char>::id; // weak
int std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::id; // weak
__int64 Bank::ms_i64Money; // weak
unsigned __int8 Bank::ms_byTotalBankPage; // weak
char Bank::ms_aspInv[2304]; // idb
std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > Bank::ms_mapExtraInv; // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > stru_A8F3B4; // idb
__int64 GuildTournamentStorage::ms_i64Money; // weak
unsigned __int64 GuildTournamentStorage::ms_uiToken; // weak
int GuildTournamentStorage::ms_aspInv[]; // weak
int MapNavigator::ms_spMapNavigatorTask; // weak
struct PROTO_NC_MENU_SHOPOPENSOULSTONE_CMD Market::ms_kSoulStone; // weak
int dword_A8F46C; // weak
int dword_A8F470; // weak
int dword_A8F474; // weak
int dword_A8F478; // weak
int dword_A8F47C; // weak
unsigned int Market::ms_uiTotalWeapontitleItem; // weak
unsigned int Market::ms_uiTotalEnchantItem; // weak
_UNKNOWN Market::ms_akProdSkill; // weak
unsigned int Market::ms_uiTotalProdSkill; // weak
unsigned int Market::ms_uiTotalSenActiveSkill; // weak
_UNKNOWN Market::ms_akWeapontitleItems; // weak
_UNKNOWN Market::ms_akEnchantItems; // weak
_UNKNOWN Market::ms_akSenPasSkill; // weak
_UNKNOWN Market::ms_akSenActSkill; // weak
_UNKNOWN Market::ms_akJokPasSkill; // weak
_UNKNOWN Market::ms_akJokActSkill; // weak
_UNKNOWN Market::ms_akMagActSkill; // weak
_UNKNOWN Market::ms_akArcActSkill; // weak
_UNKNOWN Market::ms_akCleActSkill; // weak
_UNKNOWN Market::ms_akFigActSkill; // weak
_UNKNOWN Market::ms_akMagPasSkill; // weak
_UNKNOWN Market::ms_akArcPasSkill; // weak
_UNKNOWN Market::ms_akClePasSkill; // weak
_UNKNOWN Market::ms_akFigPasSkill; // weak
unsigned int Market::ms_uiTotalSenPassiveSkill; // weak
unsigned int Market::ms_uiTotalJokActiveSkill; // weak
unsigned int Market::ms_uiTotalJokPassiveSkill; // weak
unsigned int Market::ms_uiTotalMagActiveSkill; // weak
unsigned int Market::ms_uiTotalMagPassiveSkill; // weak
unsigned int Market::ms_uiTotalArcActiveSkill; // weak
unsigned int Market::ms_uiTotalArcPassiveSkill; // weak
unsigned int Market::ms_uiTotalCleActiveSkill; // weak
unsigned int Market::ms_uiTotalClePassiveSkill; // weak
unsigned int Market::ms_uiTotalFigActiveSkill; // weak
unsigned int Market::ms_uiTotalFigPassiveSkill; // weak
unsigned int Market::ms_uiTotalRepurchase; // weak
struct ItemRepurchase *Market::ms_akRepurchase; // weak
__int16 word_A917EC[]; // weak
_UNKNOWN unk_A9193C; // weak
_UNKNOWN Market::ms_akAcc; // weak
__int16 word_A91E29; // weak
_UNKNOWN Market::ms_akArmor; // weak
__int16 word_A92081; // weak
_UNKNOWN Market::ms_akWeapon; // weak
__int16 word_A922D9; // weak
unsigned int Market::ms_uiTotalAcc; // weak
unsigned int Market::ms_uiTotalArmor; // weak
unsigned int Market::ms_uiTotalWeapon; // weak
float fLastSend; // idb
unsigned int _S3_6; // idb
ShortCutMgr g_kShortCutMgr; // idb
ShortCutItem *ptr; // idb
zlibUtil2 stru_A95734; // idb
void *unk_A96784; // idb
_UNKNOWN unk_A96788; // weak
_UNKNOWN unk_A9678C; // weak
unsigned int *UserTrade::ms_auiInventoryIndex; // weak
bool UserTrade::ms_bOppLock; // weak
bool UserTrade::ms_bMyLock; // weak
bool UserTrade::ms_bOppAgree; // weak
bool UserTrade::ms_bProposing; // weak
bool UserTrade::ms_bTrading; // weak
int UserTrade::ms_aspOppInv[]; // weak
int UserTrade::ms_aspMyInv[]; // weak
HBRUSH GuildBD::ms_hEraseBrush; // idb
HGDIOBJ GuildBD::ms_hFont; // idb
int GuildBD::ms_spTempTexture; // weak
HBRUSH NameBD::ms_hEraseBrush; // idb
HGDIOBJ NameBD::ms_hFont; // idb
struct NameBD *g_ClickedMiniHouseBD; // weak
NameBD *g_ClickedNameBD; // idb
int NameBD::ms_spTempTexture; // weak
HBRUSH PrivateStoreBD::ms_hEraseBrush; // idb
HGDIOBJ PrivateStoreBD::ms_hFont; // idb
PrivateStoreBD *g_ClickedPrivateStoreBD; // idb
int PrivateStoreBD::ms_spTempTexture; // weak
ScreenBDMgr g_kScrnBDMgr; // idb
NiPointer<NiD3DDefaultShader> ScreenBoardTexture::sm_spSrcTexture; // idb
NiPointer<NiD3DDefaultShader> ScreenBoardTexture::sm_spShadowSrcTexture; // idb
HGDIOBJ SpeechBD::ms_hEraseBrush; // idb
HGDIOBJ SpeechBD::ms_hFont; // idb
int SpeechBD::ms_spTempTexture; // weak
NiRTTI LinkFrameWork::m_RTTI; // idb
bool LoadingFrameWork::ms_bLoadDataComplete; // weak
NiRTTI LoadingFrameWork::m_RTTI; // idb
float ITimer::ms_fCurrTime; // weak
float CHairShopFrameWork::fToonLineSize; // weak
NiRTTI CHairShopFrameWork::m_RTTI; // idb
unsigned int dwTimer; // idb
NiTextKeyMatch *g_kTextKeyMatch; // idb
struct Char *g_pkMouseOvereMob; // weak
float Char::ms_fDefaultWalkSpeed; // weak
float Char::ms_fDefaultRunSpeed; // weak
CCharacterTitleData g_characterTitleData; // idb
CarToonShader shader; // idb
unsigned int _S3_7; // idb
CharMgr g_kCharMgr; // idb
std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > stru_A96B00; // idb
_UNKNOWN unk_A96B24; // weak
_UNKNOWN unk_A96B2C; // weak
_UNKNOWN unk_A96B30; // weak
_UNKNOWN unk_A96B31; // weak
CNSTimer_Interval stru_A96B34; // idb
CharResMgr g_kCharResMgr; // idb
Char *g_pkMainChar; // idb
float aPos2Arr[200]; // idb
unsigned int _S3_8; // idb
bool b_sMainCharPause; // idb
Studio *PortraitTextureBuffer::ms_pkMainCharStillCut; // idb
bool PortraitTextureBuffer::ms_bIsMeta; // weak
std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > PortraitTextureBuffer::ms_kOtherFaceTextureMap; // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > stru_A9704C; // idb
char PortraitTextureBuffer::ms_spBlackTexture[]; // idb
int PortraitTextureBuffer::ms_spDefaultTexture; // weak
std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > PortraitTextureBuffer::ms_kMobFaceTextureMap; // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > stru_A97064; // idb
std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > PortraitTextureBuffer::ms_kMoverFaceTextureMap; // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > stru_A97074; // idb
std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > PortraitTextureBuffer::ms_kPetFaceTextureMap; // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > stru_A97084; // idb
User g_kUser; // idb
_UNKNOWN unk_A97190; // weak
char unk_A97191[]; // idb
_UNKNOWN unk_A971A1; // weak
int unk_A97D74; // idb
User::FreeStatPoint rkPoint; // idb
CItemAuthorityBase g_kItemAuthority; // idb
struct DropItem *g_pkMouseOverDropItem; // weak
DropItemMgr g_kDropItemMgr; // idb
NiRTTI DynaminUV::m_RTTI; // idb
Inventory g_kInventory; // idb
CChargedItem g_kChargedItem; // idb
unsigned __int32 ItemInfoTab::crcSum; // weak
std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> >,0> > ItemInfoTab::m_ItemInfoMapByInxName; // idb
std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > stru_A99374; // idb
void *dword_A99380; // idb
_UNKNOWN unk_A99384; // weak
_UNKNOWN unk_A99388; // weak
int ItemRepairTask::ms_spItemRepairTask; // weak
int Singleton<FadeObjectMgr>::m_pInstance; // weak
char Singleton<FadeObjectMgr>::m_bDestroy; // weak
World g_kWorld; // idb
mhObjectManager stru_A993C8; // idb
mhGameMainConnectMgr *dword_A99408; // idb
std::basic_string<char,std::char_traits<char>,std::allocator<char> > stru_A9941C; // idb
mhState nowState; // idb
_UNKNOWN unk_A9943C; // weak
_UNKNOWN unk_A9944C; // weak
int dword_A99458; // idb
int dword_A9945C; // idb
_UNKNOWN unk_A9949E; // weak
_UNKNOWN unk_A994A4; // weak
PgWin *pkWin; // idb
_UNKNOWN unk_A994AC; // weak
char dest[124]; // idb
unsigned __int16 word_A99532; // idb
_UNKNOWN unk_A99534; // weak
mhObject *mhObj; // idb
_UNKNOWN unk_A99544; // weak
unsigned __int16 word_A99554[2]; // idb
unsigned __int16 qword_A99558; // idb
_UNKNOWN unk_A99560; // weak
_UNKNOWN unk_A99564; // weak
_UNKNOWN unk_A99569; // weak
_UNKNOWN unk_A99590; // weak
_UNKNOWN unk_A99594; // weak
_UNKNOWN unk_A99598; // weak
_UNKNOWN unk_A995C4; // weak
_DWORD *dword_A995CC[11]; // idb
NiNode *pBuildingScene; // idb
NiAVObject *unk_A9960C; // idb
NiAVObject *pkObject; // idb
PgNsTerrain *pkTerrain; // idb
NiCamera *pkWorldCamera; // idb
CameraCtrl _that; // idb
_UNKNOWN unk_B24FB4; // weak
Oscillation stru_B24FC0; // idb
_UNKNOWN unk_B25004; // weak
_UNKNOWN unk_B25034; // weak
_UNKNOWN unk_B2503C; // weak
_UNKNOWN unk_B25048; // weak
NiAVObject *dword_B25060; // idb
_UNKNOWN unk_B25064; // weak
_UNKNOWN unk_B25068; // weak
_UNKNOWN unk_B2506C; // weak
_UNKNOWN unk_B25074; // weak
_UNKNOWN unk_B2534C; // weak
_UNKNOWN unk_B25350; // weak
_UNKNOWN unk_B25354; // weak
DecalMgr stru_B26354; // idb
NiRTTI NiTextureAccumulator::m_RTTI; // idb
int nnn; // idb
void *dd; // idb
void *dword_B26394; // idb
char g_kUserLoginLogForXTrap[64]; // idb
char byte_B26420[]; // weak
_UNKNOWN unk_B26440; // weak
int dword_B26460; // weak
bool Server::ms_bTimeTest; // weak
float Server::ms_fCurTime; // weak
Server g_kServer; // idb
char token[40960]; // idb
char *pnow; // idb
char buf[40960]; // idb
NiRTTI AfterImgEff::m_RTTI; // idb
std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > AfterImgEff::m_mapEffectNode; // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > stru_B4F144; // idb
_UNKNOWN unk_B4F148; // weak
std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > AfterImgEff::m_mapTexture; // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > stru_B4F154; // idb
_UNKNOWN unk_B4F158; // weak
NiRTTI ArrowEff::m_RTTI; // idb
NiRTTI AttachEff::m_RTTI; // idb
void *CRTTIClass<CHazeScreenEffect,CBaseObject>::ms_RTTI[4]; // idb
_UNKNOWN unk_B4F180; // weak
_UNKNOWN unk_B4F184; // weak
std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > unk_B4F190; // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > stru_B4F194; // idb
_UNKNOWN Effect::ms_kOnePos; // weak
NiRTTI Effect::m_RTTI; // idb
EffectMgr g_kEffectMgr; // idb
std::_Tree<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > stru_B4F204; // idb
NiRTTI ExpEffect::m_RTTI; // idb
NiRTTI StretchEffect::m_RTTI; // idb
NiRTTI WeddingEffect::m_RTTI; // idb
float TextEff::ms_fShowDelay; // weak
TextEffMgr g_kTextEffMgr; // idb
int ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::ms_pkTable; // weak
int `ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>'::`2'::`local static guard'; // weak
struct MachineOpt::stKeyMapData *MachineOpt::m_keyMap; // weak
__int16 word_B4F5BA[]; // weak
int dword_B4F5BC; // weak
int dword_B4F5C0; // weak
int dword_B4F5C4; // weak
int dword_B4F5C8; // weak
int dword_B4F5CC; // weak
int dword_B4F5D0; // weak
int dword_B4F5D4; // weak
int dword_B4F5D8; // weak
int dword_B4F5DC; // weak
int dword_B4F5E0; // weak
int dword_B4F5E4; // weak
int dword_B4F5E8; // weak
int dword_B4F5EC; // weak
int dword_B4F5F0; // weak
int dword_B4F5F4; // weak
int dword_B4F5F8; // weak
int dword_B4F5FC; // weak
int dword_B4F600; // weak
int dword_B4F604; // weak
int dword_B4F608; // weak
int dword_B4F60C; // weak
int dword_B4F610; // weak
int dword_B4F614; // weak
int dword_B4F618; // weak
int dword_B4F61C; // weak
int dword_B4F620; // weak
int dword_B4F624; // weak
int dword_B4F628; // weak
int dword_B4F62C; // weak
int dword_B4F630; // weak
int dword_B4F634; // weak
__int16 word_B4F638; // weak
__int16 word_B4F63A; // weak
int dword_B4F63C; // weak
__int16 word_B4F640; // weak
__int16 word_B4F642; // weak
int dword_B4F644; // weak
__int16 word_B4F648; // weak
__int16 word_B4F64A; // weak
int dword_B4F64C; // weak
int dword_B4F650; // weak
int dword_B4F654; // weak
int dword_B4F658; // weak
int dword_B4F65C; // weak
int dword_B4F660; // weak
int dword_B4F664; // weak
int dword_B4F668; // weak
int dword_B4F66C; // weak
int dword_B4F670; // weak
int dword_B4F674; // weak
int dword_B4F678; // weak
int dword_B4F67C; // weak
int dword_B4F680; // weak
int dword_B4F688; // weak
int dword_B4F68C; // weak
int dword_B4F690; // weak
int dword_B4F694; // weak
int dword_B4F698; // weak
int dword_B4F69C; // weak
int dword_B4F6A0; // weak
int dword_B4F6A4; // weak
int dword_B4F6A8; // weak
int dword_B4F6B0; // weak
int dword_B4F6B8; // weak
int dword_B4F6C0; // weak
int dword_B4F6C8; // weak
int dword_B4F6CC; // weak
int dword_B4F6D0; // weak
int dword_B4F6D4; // weak
int dword_B4F6D8; // weak
int dword_B4F6DC; // weak
int dword_B4F6E0; // weak
int dword_B4F6E4; // weak
int dword_B4F6E8; // weak
int dword_B4F6EC; // weak
int dword_B4F6F0; // weak
int dword_B4F6F4; // weak
int dword_B4F6F8; // weak
int dword_B4F6FC; // weak
int dword_B4F700; // weak
int dword_B4F704; // weak
int dword_B4F708; // weak
int dword_B4F70C; // weak
int dword_B4F710; // weak
int dword_B4F714; // weak
int dword_B4F718; // weak
int dword_B4F71C; // weak
int dword_B4F720; // weak
int dword_B4F724; // weak
int dword_B4F728; // weak
int dword_B4F72C; // weak
int dword_B4F730; // weak
int dword_B4F734; // weak
int dword_B4F738; // weak
int dword_B4F73C; // weak
int dword_B4F740; // weak
int dword_B4F744; // weak
int dword_B4F748; // weak
int dword_B4F74C; // weak
int dword_B4F750; // weak
int dword_B4F754; // weak
int dword_B4F758; // weak
int dword_B4F75C; // weak
int dword_B4F760; // weak
int dword_B4F764; // weak
int dword_B4F768; // weak
int dword_B4F76C; // weak
int dword_B4F770; // weak
int dword_B4F774; // weak
int dword_B4F778; // weak
int dword_B4F77C; // weak
int dword_B4F780; // weak
int dword_B4F784; // weak
int dword_B4F788; // weak
int dword_B4F78C; // weak
int dword_B4F790; // weak
int dword_B4F794; // weak
int dword_B4F798; // weak
int dword_B4F79C; // weak
int dword_B4F7A0; // weak
int dword_B4F7A4; // weak
int dword_B4F7A8; // weak
int dword_B4F7AC; // weak
int dword_B4F7B0; // weak
int dword_B4F7B4; // weak
int dword_B4F7B8; // weak
int dword_B4F7BC; // weak
int dword_B4F7C0; // weak
int dword_B4F7C4; // weak
int dword_B4F7C8; // weak
int dword_B4F7CC; // weak
int dword_B4F7D0; // weak
int dword_B4F7D4; // weak
int dword_B4F7D8; // weak
int dword_B4F7DC; // weak
int dword_B4F7E0; // weak
int dword_B4F7E4; // weak
int dword_B4F7E8; // weak
int dword_B4F7EC; // weak
int dword_B4F7F0; // weak
int dword_B4F7F4; // weak
int dword_B4F7F8; // weak
int dword_B4F7FC; // weak
int dword_B4F800; // weak
int dword_B4F804; // weak
int dword_B4F808; // weak
int dword_B4F80C; // weak
int dword_B4F810; // weak
int dword_B4F814; // weak
int dword_B4F818; // weak
int dword_B4F81C; // weak
int dword_B4F820; // weak
int dword_B4F824; // weak
int dword_B4F828; // weak
int dword_B4F82C; // weak
int dword_B4F830; // weak
int dword_B4F834; // weak
int dword_B4F838; // weak
int dword_B4F83C; // weak
int dword_B4F840; // weak
int dword_B4F844; // weak
int dword_B4F848; // weak
int dword_B4F84C; // weak
int dword_B4F850; // weak
int dword_B4F854; // weak
int dword_B4F858; // weak
int dword_B4F85C; // weak
int dword_B4F860; // weak
int dword_B4F864; // weak
int dword_B4F868; // weak
int dword_B4F86C; // weak
int dword_B4F870; // weak
int dword_B4F874; // weak
int dword_B4F878; // weak
int dword_B4F87C; // weak
int dword_B4F880; // weak
int dword_B4F884; // weak
int dword_B4F888; // weak
int dword_B4F88C; // weak
int dword_B4F890; // weak
int dword_B4F894; // weak
int dword_B4F898; // weak
int dword_B4F89C; // weak
int dword_B4F8A0; // weak
int dword_B4F8A4; // weak
int dword_B4F8A8; // weak
int dword_B4F8AC; // weak
_UNKNOWN unk_B4F8B0; // weak
_UNKNOWN unk_B4F8B4; // weak
_UNKNOWN MachineOpt::ms_kOrgGamaRamp; // weak
struct MachineOpt::GameOption MachineOpt::ms_kGameOption; // weak
char byte_B4FF62; // weak
char byte_B4FF63; // weak
char byte_B4FF64; // weak
char byte_B4FF66; // weak
char byte_B4FF67; // weak
char byte_B4FF68; // weak
char byte_B4FF69; // weak
char byte_B4FF6A; // weak
char byte_B4FF6B; // weak
char byte_B4FF6C; // weak
char byte_B4FF6D; // weak
char byte_B4FF6E; // weak
char byte_B4FF6F; // weak
char byte_B4FF70; // weak
char byte_B4FF71; // weak
char byte_B4FF72; // weak
char byte_B4FF73; // weak
char byte_B4FF74; // weak
char byte_B4FF75; // weak
int dword_B4FF76[]; // weak
int dword_B4FF8A; // weak
char byte_B4FF8E; // weak
char byte_B4FF8F; // weak
char byte_B4FF90; // weak
char byte_B4FF91; // weak
char byte_B4FF92; // weak
char byte_B4FF93; // weak
char byte_B4FF94; // weak
char byte_B4FF95; // weak
char byte_B4FF96; // weak
struct MachineOpt::StShortCutSizeOption MachineOpt::ms_shortCutSizeOptionData; // weak
__int16 word_B4FF9C; // weak
_UNKNOWN unk_B4FF9E; // weak
char byte_B4FF9F; // weak
char byte_B4FFA0[]; // weak
char byte_B4FFA1[]; // weak
char byte_B4FFA2[]; // weak
_UNKNOWN unk_B4FFA4; // weak
char byte_B4FFA5[]; // weak
int dword_B4FFA8; // weak
int dword_B4FFAC; // weak
MachineOpt::UserLoginOption MachineOpt::ms_kUserLoginOption; // idb
char Skill::ms_akLearnProductSkillInfo[]; // idb
int dword_B50024[]; // weak
char Skill::ms_akLearnPassiveSkillInfo[]; // idb
char Skill::ms_akLearnActSkillInfo[]; // idb
_BYTE dword_B57552[17994]; // idb
unsigned int Skill::ms_uiTotalLearnActSkill; // weak
unsigned int Skill::ms_uiRestEmpowerPoint; // weak
unsigned int Skill::ms_uiRestEmpowerPointInEdit; // weak
unsigned int Skill::ms_uiAntiEmpowerPoint; // weak
unsigned int Skill::ms_uiAntiEmpowerPointInEdit; // weak
bool Skill::ms_bResetable; // weak
unsigned int Skill::ms_uiTotalLearnPassiveSkill; // weak
unsigned int Skill::ms_uiTotalLearnProductSkill; // weak
unsigned int Skill::m_uiMaxSkillNum; // weak
int `ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>'::`2'::`local static guard'; // weak
int `ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ITableBase<ActiveSkillInfo,ActSkillInfoTab>'::`2'::`local static guard'; // weak
int `ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ITableBase<PassiveSkillInfo,PasSkillInfoTab>'::`2'::`local static guard'; // weak
int `ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>'::`2'::`local static guard'; // weak
Party g_kParty; // idb
unsigned __int32 ActSkillInfoTab::crcSum; // weak
std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> >,0> > ActSkillInfoTab::m_hashMap_ByNameIndex; // idb
std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > stru_B5BD94; // idb
void *dword_B5BDA0; // idb
_UNKNOWN unk_B5BDA4; // weak
_UNKNOWN unk_B5BDA8; // weak
PgWin *ItemUseTask::ms_pkCastingProgressWin; // idb
int MHDiceGameTask::ms_spMHDiceGameTask; // weak
ProductionWin *ProductTask::ms_pkProductionWin; // idb
int StatPointReqTask::ms_spInstance; // weak
CWeaponTitle WeaponTitleTab::ms_kTab; // idb
std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> >,0> > ProduceInfoTable::m_MaterialMap; // idb
std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > stru_B5BE1C; // idb
void *unk_B5BE28; // idb
_UNKNOWN unk_B5BE2C; // weak
_UNKNOWN unk_B5BE30; // weak
bool bLoad; // idb
CClientQuest kQuest; // idb
std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > unk_B5BEFC; // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > stru_B5BF00; // idb
CQuestData kQuestData; // idb
CDataReader QuestDialog; // idb
unsigned int _S3_9; // idb
char acToken[128]; // idb
QuestHelperMgr *QuestHelperMgr::m_pkInstance; // idb
char TutorialMgr::m_arrPass[100]; // idb
std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *CGuildMonster::m_pInstance; // idb
GuildListWin *GuildListTask::m_pkGuildListWin; // idb
int GuildListTask::ms_spGuildListTask; // weak
int GuildMemberTask::ms_spGuildMemberTask; // weak
int GuildTask::ms_spGuildTask; // weak
enum mhColliStyle mhCollisionManager::m_ColliStyle; // weak
char mhCollisionManager::m_ColliInfo[]; // idb
int dword_B5C0DC; // weak
int dword_B5C0E0; // weak
int dword_B5C0E4; // weak
NiPoint3 ColiPoint; // idb
int dword_B5C118; // weak
int dword_B5C11C; // weak
int dword_B5C120; // weak
int MiniHouseIndoor::AddObjectID; // weak
int MiniHouseIndoor::AddTexID; // weak
int MiniHouseIndoor::AddResObjID; // weak
unsigned int dwLastSendTime_0; // idb
std::_Tree<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > g_kMiniHouseMgr; // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > stru_B5C138; // idb
int dword_B5C144; // weak
unsigned int mhEditRoomWin::m_uiShowBagPage; // weak
unsigned int mhEditRoomWin::m_uiInvType; // idb
float fOldtime; // idb
char ORTable::ort_Index[]; // idb
__int64 qword_B5C160; // weak
int dword_B5C168; // weak
char ORTable::ort_String[]; // idb
__int64 qword_B5C174; // weak
int dword_B5C17C; // weak
char ORTable::ort_Byte[]; // idb
__int64 qword_B5C188; // weak
int dword_B5C190; // weak
char ORTable::ort_Word[]; // idb
__int64 qword_B5C19C; // weak
int dword_B5C1A4; // weak
char ORTable::ort_Dwrd[]; // idb
__int64 qword_B5C1B0; // weak
int dword_B5C1B8; // weak
char ORTable::ort_Dword[]; // idb
__int64 qword_B5C1C4; // weak
int dword_B5C1CC; // weak
char OptionReader::or_CommentMark[]; // idb
__int64 qword_B5C1D4; // weak
__int64 qword_B5C1DC; // weak
char OptionReader::or_Brace[]; // idb
int dword_B5C1EC; // weak
__int64 qword_B5C1F0; // weak
char OptionReader::or_Ignore[]; // idb
int dword_B5C200; // weak
__int64 qword_B5C204; // weak
char OptionReader::or_Delimiter[]; // idb
int dword_B5C214; // weak
__int64 qword_B5C218; // weak
char OptionReader::or_Exchange[]; // idb
int dword_B5C228; // weak
__int64 qword_B5C22C; // weak
char OptionReader::or_Table[]; // idb
int dword_B5C23C; // weak
__int64 qword_B5C240; // weak
ORToken OptionReader::or_ColumnType; // idb
ORToken OptionReader::or_ColumnName; // idb
ORToken OptionReader::or_Record; // idb
ORToken OptionReader::or_RecordIn; // idb
char OptionReader::or_End[]; // idb
__int64 qword_B5C2A0; // weak
int dword_B5C2A8; // weak
int WeddingTask::ms_spWeddingTask; // weak
int ISingletonTask<GuildAcademyLeaveTask>::ms_pkSingletonTask; // weak
int ISingletonTask<GuildAcademyNotifyTask>::ms_pkSingletonTask; // weak
int ISingletonTask<GuildAcademyJoinReqTask>::ms_pkSingletonTask; // weak
union ITEM_INVEN GuildAcademyStorageWin::ms_kFrom; // weak
int ISingletonTask<GuildAcademyMemberVanishTask>::ms_pkSingletonTask; // weak
int GuildAcademyMemberTask::ms_spGuildAcademyMemberTask; // weak
PgWin *GuildAcademySelectTask::m_pkGuildAcademySelectWin; // idb
int GuildAcademySelectTask::ms_spGuildAcademySelectTask; // weak
int GuildAcademyTask::ms_spGuildAcademyTask; // weak
__int64 GuildAcademyStorage::ms_i64Money; // weak
int GuildAcademyStorage::ms_aspInv[]; // weak
RaidInfo g_kRaidinfo; // idb
_UNKNOWN unk_B5C4CC; // weak
wchar_t resultBuffer[2000]; // idb
wchar_t communicationBuffer[2000]; // idb
char szCTNull[4]; // idb
CShnDataFileCheckSum ShnDataFile; // idb
char NULLSTR[5904]; // idb
std::_Init_locks initlocks; // idb
std::_Fac_node *Fac_head; // idb
std::locale::_Locimp *global_locale; // idb
int std::locale::id::_Id_cnt; // weak
int std::ctype<char>::id; // weak
std::locale classic_locale; // idb
std::_Init_locks initlocks_0; // idb
_Init_atexit init_atexit; // idb
std::bad_alloc nomem; // idb
int __argc;
char **__argv;
__type_info_node __type_info_root_node; // idb
int __locale_changed; // weak
PVOID abort_action; // idb
int (__stdcall *g_pfnRtlGenRandom)(void *, unsigned int); // idb
PVOID pfnMessageBox; // idb
PVOID pfnGetActiveWindow; // idb
PVOID pfnGetLastActivePopup; // idb
PVOID pfnGetProcessWindowStation; // idb
PVOID pfnGetUserObjectInformation; // idb
int NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkBlockHeader; // weak
int NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkFreeMem; // weak
_RTL_CRITICAL_SECTION NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_kCriticalSection; // idb
float NiFloatKey::ms_fDefault; // weak
bool bRegistered; // idb
bool bRegistered_0; // idb
bool bRegistered_1; // idb
float NiPosKey::ms_fSampleDelta; // weak
struct NiPoint3 NiPosKey::ms_kDefault; // weak
bool bRegistered_2; // idb
bool bRegistered_3; // idb
struct NiQuaternion NiRotKey::ms_kDefault; // weak
bool bRegistered_4; // idb
bool NiBoolKey::ms_bDefault; // weak
bool bRegistered_5; // idb
bool bRegistered_6; // idb
struct NiColorA NiColorKey::ms_kDefault; // weak
bool bRegistered_7; // idb
bool bRegistered_8; // idb
bool bRegistered_9; // idb
bool bRegistered_10; // idb
bool bRegistered_11; // idb
bool bRegistered_12; // idb
bool bRegistered_13; // idb
bool bRegistered_14; // idb
bool bRegistered_15; // idb
bool bRegistered_16; // idb
bool bRegistered_17; // idb
bool bRegistered_18; // idb
bool bRegistered_19; // idb
bool NiAnimationSDM::ms_bInitialized; // weak
int siCounter; // idb
NiRTTI NiTextKeyExtraData::m_RTTI; // idb
NiRTTI NiControllerSequence::m_RTTI; // idb
NiRTTI NiTransformController::m_RTTI; // idb
NiRTTI NiBoneLODController::m_RTTI; // idb
NiRTTI NiTextureTransformController::m_RTTI; // idb
NiRTTI NiMaterialColorController::m_RTTI; // idb
NiRTTI NiAlphaController::m_RTTI; // idb
NiRTTI NiControllerManager::m_RTTI; // idb
unsigned __int8 *NiAnimationKey::ms_keysizes; // weak
char byte_B61901; // weak
char byte_B61902; // weak
char byte_B61903; // weak
char byte_B61905; // weak
char byte_B61906[]; // weak
char byte_B61907; // weak
char byte_B61908; // weak
char byte_B61909; // weak
char byte_B6190B; // weak
char byte_B6190C[]; // weak
char byte_B6190D; // weak
char byte_B6190E; // weak
char byte_B6190F; // weak
char byte_B61910; // weak
char byte_B61911; // weak
char byte_B61912[]; // weak
char byte_B61913; // weak
char byte_B61917; // weak
char byte_B6191E[]; // weak
char byte_B61923; // weak
void (__cdecl static **NiAnimationKey::ms_fillderived)(struct NiAnimationKey *, unsigned int, unsigned __int8); // weak
int dword_B6192C; // weak
int dword_B61930; // weak
int dword_B61934; // weak
int dword_B6193C; // weak
int dword_B61940[]; // weak
int dword_B61944; // weak
int dword_B61948; // weak
int dword_B6194C; // weak
int dword_B61954; // weak
int dword_B61958[]; // weak
int dword_B6195C; // weak
int dword_B61960; // weak
int dword_B61964; // weak
int dword_B61968; // weak
int dword_B6196C; // weak
int dword_B61970; // weak
int dword_B61974; // weak
int dword_B61984; // weak
int dword_B619A0[]; // weak
int dword_B619B4; // weak
bool (__cdecl static **NiAnimationKey::ms_inserts)(float, struct NiAnimationKey **, unsigned int *); // weak
int dword_B619BC; // weak
int dword_B619C0; // weak
int dword_B619C4; // weak
int dword_B619CC; // weak
int dword_B619D0; // weak
int dword_B619D4; // weak
int dword_B619D8; // weak
int dword_B619DC; // weak
int dword_B619E4; // weak
int dword_B619E8; // weak
int dword_B619EC; // weak
int dword_B619F0; // weak
int dword_B619F4; // weak
int dword_B619F8; // weak
int dword_B619FC; // weak
int dword_B61A00; // weak
int dword_B61A04; // weak
int dword_B61A14; // weak
int dword_B61A30; // weak
int dword_B61A44; // weak
void (__cdecl static **NiAnimationKey::ms_deletes)(struct NiAnimationKey *); // weak
int dword_B61A4C; // weak
int dword_B61A50; // weak
int dword_B61A54; // weak
int dword_B61A5C; // weak
int dword_B61A60[]; // weak
int dword_B61A64; // weak
int dword_B61A68; // weak
int dword_B61A6C; // weak
int dword_B61A74; // weak
int dword_B61A78[]; // weak
int dword_B61A7C; // weak
int dword_B61A80; // weak
int dword_B61A84; // weak
int dword_B61A88; // weak
int dword_B61A8C; // weak
int dword_B61A90[]; // weak
int dword_B61A94; // weak
int dword_B61AA4; // weak
int dword_B61AC0[]; // weak
int dword_B61AD4; // weak
struct NiAnimationKey *(__cdecl static **NiAnimationKey::ms_arrays)(unsigned int); // weak
int dword_B61ADC; // weak
int dword_B61AE0; // weak
int dword_B61AE4; // weak
int dword_B61AEC; // weak
int dword_B61AF0; // weak
int dword_B61AF4; // weak
int dword_B61AF8; // weak
int dword_B61AFC; // weak
int dword_B61B04; // weak
int dword_B61B08; // weak
int dword_B61B0C; // weak
int dword_B61B10; // weak
int dword_B61B14; // weak
int dword_B61B18; // weak
int dword_B61B1C; // weak
int dword_B61B20; // weak
int dword_B61B24; // weak
int dword_B61B34; // weak
int dword_B61B50; // weak
int dword_B61B64; // weak
void (__cdecl static **NiAnimationKey::ms_copies)(struct NiAnimationKey *, const struct NiAnimationKey *); // weak
int dword_B61B6C; // weak
int dword_B61B70; // weak
int dword_B61B74; // weak
int dword_B61B7C; // weak
int dword_B61B80; // weak
int dword_B61B84; // weak
int dword_B61B88; // weak
int dword_B61B8C; // weak
int dword_B61B94; // weak
int dword_B61B98; // weak
int dword_B61B9C; // weak
int dword_B61BA0; // weak
int dword_B61BA4; // weak
int dword_B61BA8; // weak
int dword_B61BAC; // weak
int dword_B61BB0; // weak
int dword_B61BB4; // weak
int dword_B61BC4; // weak
int dword_B61BE0; // weak
int dword_B61BF4; // weak
void (__cdecl static **NiAnimationKey::ms_saves)(struct NiStream *, struct NiAnimationKey *, unsigned int); // weak
int dword_B61BFC; // weak
int dword_B61C00; // weak
int dword_B61C04; // weak
int dword_B61C0C; // weak
int dword_B61C10[]; // weak
int dword_B61C14; // weak
int dword_B61C18; // weak
int dword_B61C1C; // weak
int dword_B61C24; // weak
int dword_B61C28[]; // weak
int dword_B61C2C; // weak
int dword_B61C30; // weak
int dword_B61C34; // weak
int dword_B61C38; // weak
int dword_B61C3C; // weak
int dword_B61C40[]; // weak
int dword_B61C44; // weak
int dword_B61C54; // weak
int dword_B61C70[]; // weak
int dword_B61C84; // weak
bool (__cdecl static **NiAnimationKey::ms_equals)(const struct NiAnimationKey *, const struct NiAnimationKey *); // weak
int dword_B61C8C; // weak
int dword_B61C90; // weak
int dword_B61C94; // weak
int dword_B61C9C; // weak
int dword_B61CA0[]; // weak
int dword_B61CA4; // weak
int dword_B61CA8; // weak
int dword_B61CAC; // weak
int dword_B61CB4; // weak
int dword_B61CB8[]; // weak
int dword_B61CBC; // weak
int dword_B61CC0; // weak
int dword_B61CC4; // weak
int dword_B61CC8; // weak
int dword_B61CCC; // weak
int dword_B61CD0[]; // weak
int dword_B61CD4; // weak
int dword_B61CE4; // weak
int dword_B61D00[]; // weak
int dword_B61D14; // weak
void (__cdecl static **NiAnimationKey::ms_interpd2s)(float, const struct NiAnimationKey *, const struct NiAnimationKey *, void *); // weak
int dword_B61D1C; // weak
int dword_B61D20; // weak
int dword_B61D24; // weak
int dword_B61D2C; // weak
int dword_B61D30[]; // weak
int dword_B61D34; // weak
int dword_B61D38; // weak
int dword_B61D3C; // weak
int dword_B61D44; // weak
int dword_B61D48; // weak
int dword_B61D4C; // weak
int dword_B61D50; // weak
int dword_B61D54; // weak
int dword_B61D58; // weak
int dword_B61D5C; // weak
int dword_B61D60; // weak
int dword_B61D64; // weak
int dword_B61D74; // weak
int dword_B61D90; // weak
int dword_B61DA4; // weak
void (__cdecl static **NiAnimationKey::ms_interpd1s)(float, const struct NiAnimationKey *, const struct NiAnimationKey *, void *); // weak
int dword_B61DAC; // weak
int dword_B61DB0; // weak
int dword_B61DB4; // weak
int dword_B61DBC; // weak
int dword_B61DC0[]; // weak
int dword_B61DC4; // weak
int dword_B61DC8; // weak
int dword_B61DCC; // weak
int dword_B61DD4; // weak
int dword_B61DD8; // weak
int dword_B61DDC; // weak
int dword_B61DE0; // weak
int dword_B61DE4; // weak
int dword_B61DE8; // weak
int dword_B61DEC; // weak
int dword_B61DF0; // weak
int dword_B61DF4; // weak
int dword_B61E04; // weak
int dword_B61E20; // weak
int dword_B61E34; // weak
void (__cdecl static **NiAnimationKey::ms_interps)(float, const struct NiAnimationKey *, const struct NiAnimationKey *, void *); // weak
int dword_B61E3C; // weak
int dword_B61E40; // weak
int dword_B61E44; // weak
int dword_B61E4C; // weak
int dword_B61E50[]; // weak
int dword_B61E54; // weak
int dword_B61E58; // weak
int dword_B61E5C; // weak
int dword_B61E64; // weak
int dword_B61E68[]; // weak
int dword_B61E6C; // weak
int dword_B61E70; // weak
int dword_B61E74; // weak
int dword_B61E78; // weak
int dword_B61E7C; // weak
int dword_B61E80[]; // weak
int dword_B61E84; // weak
int dword_B61E94; // weak
int dword_B61EB0[]; // weak
int dword_B61EC4; // weak
float (__cdecl static **NiAnimationKey::ms_curves)(struct NiAnimationKey *, unsigned int); // weak
int dword_B61ECC; // weak
int dword_B61ED0; // weak
int dword_B61ED4; // weak
int dword_B61EDC; // weak
int dword_B61EE0[]; // weak
int dword_B61EE4; // weak
int dword_B61EE8; // weak
int dword_B61EEC; // weak
int dword_B61EF4; // weak
int dword_B61EF8; // weak
int dword_B61EFC; // weak
int dword_B61F00; // weak
int dword_B61F04; // weak
int dword_B61F08; // weak
int dword_B61F0C; // weak
int dword_B61F10; // weak
int dword_B61F14; // weak
int dword_B61F24; // weak
int dword_B61F40; // weak
int dword_B61F54; // weak
struct NiAnimationKey *(__cdecl static **NiAnimationKey::ms_loaders)(struct NiStream *, unsigned int); // weak
int dword_B61F5C; // weak
int dword_B61F60; // weak
int dword_B61F64; // weak
int dword_B61F6C; // weak
int dword_B61F70[]; // weak
int dword_B61F74; // weak
int dword_B61F78; // weak
int dword_B61F7C; // weak
int dword_B61F84; // weak
int dword_B61F88[]; // weak
int dword_B61F8C; // weak
int dword_B61F90; // weak
int dword_B61F94; // weak
int dword_B61F98; // weak
int dword_B61F9C; // weak
int dword_B61FA0[]; // weak
int dword_B61FA4; // weak
int dword_B61FB4; // weak
int dword_B61FD0[]; // weak
int dword_B61FE4; // weak
NiRTTI NiVisController::m_RTTI; // idb
NiRTTI NiUVData::m_RTTI; // idb
NiRTTI NiUVController::m_RTTI; // idb
NiRTTI NiTransformInterpolator::m_RTTI; // idb
NiRTTI NiStringPalette::m_RTTI; // idb
NiRTTI NiSequenceStreamHelper::m_RTTI; // idb
NiRTTI NiSequence::m_RTTI; // idb
NiRTTI NiRotData::m_RTTI; // idb
NiRTTI NiRollController::m_RTTI; // idb
NiRTTI NiQuaternionInterpolator::m_RTTI; // idb
NiRTTI NiPosData::m_RTTI; // idb
NiRTTI NiPoint3Interpolator::m_RTTI; // idb
float s_fFourOverPi; // idb
unsigned int _S1_0; // idb
NiRTTI NiPathInterpolator::m_RTTI; // idb
float s_fFourOverPi_0; // idb
unsigned int _S1_1; // idb
NiRTTI NiPathController::m_RTTI; // idb
NiRTTI NiMultiTargetTransformController::m_RTTI; // idb
NiRTTI NiMorphData::m_RTTI; // idb
NiRTTI NiLookAtInterpolator::m_RTTI; // idb
NiRTTI NiLookAtController::m_RTTI; // idb
NiRTTI NiLightDimmerController::m_RTTI; // idb
NiRTTI NiLightColorController::m_RTTI; // idb
NiPointer<NiRenderTargetGroup> NiKeyframeManager::ms_pkLinkRecord; // idb
NiRTTI NiKeyframeManager::m_RTTI; // idb
NiRTTI NiTransformData::m_RTTI; // idb
bool NiGeomMorpherController::ms_bAlwaysUpdateClone; // weak
NiRTTI NiGeomMorpherController::m_RTTI; // idb
NiRTTI NiFloatsExtraDataPoint3Controller::m_RTTI; // idb
NiRTTI NiFloatsExtraDataController::m_RTTI; // idb
NiRTTI NiFloatInterpolator::m_RTTI; // idb
NiRTTI NiFloatExtraDataController::m_RTTI; // idb
NiRTTI NiFloatData::m_RTTI; // idb
NiRTTI NiFlipController::m_RTTI; // idb
NiRTTI NiColorInterpolator::m_RTTI; // idb
NiRTTI NiColorExtraDataController::m_RTTI; // idb
NiRTTI NiColorData::m_RTTI; // idb
NiRTTI NiBSplineTransformInterpolator::m_RTTI; // idb
NiRTTI NiBSplinePoint3Interpolator::m_RTTI; // idb
NiRTTI NiBSplineFloatInterpolator::m_RTTI; // idb
NiRTTI NiBSplineCompTransformInterpolator::m_RTTI; // idb
NiRTTI NiBSplineCompPoint3Interpolator::m_RTTI; // idb
NiRTTI NiBSplineCompFloatInterpolator::m_RTTI; // idb
NiRTTI NiBSplineCompColorInterpolator::m_RTTI; // idb
NiRTTI NiBSplineColorInterpolator::m_RTTI; // idb
NiRTTI NiBSplineData::m_RTTI; // idb
NiRTTI NiBSplineBasisData::m_RTTI; // idb
NiRTTI NiBoolTimelineInterpolator::m_RTTI; // idb
NiRTTI NiBoolInterpolator::m_RTTI; // idb
NiRTTI NiBoolData::m_RTTI; // idb
NiRTTI NiBlendTransformInterpolator::m_RTTI; // idb
NiRTTI NiBlendQuaternionInterpolator::m_RTTI; // idb
NiRTTI NiBlendPoint3Interpolator::m_RTTI; // idb
NiRTTI NiBlendFloatInterpolator::m_RTTI; // idb
NiRTTI NiBlendColorInterpolator::m_RTTI; // idb
NiRTTI NiBlendBoolInterpolator::m_RTTI; // idb
NiRTTI NiBlendAccumTransformInterpolator::m_RTTI; // idb
NiRTTI NiInterpController::m_RTTI; // idb
NiRTTI NiBlendInterpolator::m_RTTI; // idb
NiRTTI NiSingleInterpController::m_RTTI; // idb
NiQuaternion NiQuatTransform::INVALID_ROTATE; // idb
NiRTTI NiInterpolator::m_RTTI; // idb
NiQuaternion NiInterpolator::INVALID_QUATERNION; // idb
NiRTTI NiFloatInterpController::m_RTTI; // idb
NiRTTI NiPoint3InterpController::m_RTTI; // idb
NiRTTI NiBoolInterpController::m_RTTI; // idb
NiRTTI NiKeyBasedInterpolator::m_RTTI; // idb
NiRTTI NiFloatController::m_RTTI; // idb
NiRTTI NiExtraDataController::m_RTTI; // idb
NiRTTI NiBSplineInterpolator::m_RTTI; // idb
bool NiCollisionSDM::ms_bInitialized; // weak
int siCounter_0; // idb
bool NiCollisionData::ms_bComputeWorldVelocity; // weak
NiRTTI NiCollisionData::m_RTTI; // idb
NiSphereBV NiCollisionConvert::ms_kSphereABV; // idb
struct NiBoundingVolume *(__cdecl static **NiBoundingVolume::ms_apfnLoaders)(struct NiStream *); // weak
int dword_B62244; // weak
int dword_B62248; // weak
int dword_B6224C; // weak
int dword_B62250; // weak
int dword_B62254; // weak
void *NiBoundingVolume::ms_pfnTestFuncTable; // idb
void *NiBoundingVolume::ms_pfnFindFuncTable; // idb
void *NiBoundingVolume::ms_pfnTriTestFuncTable; // idb
void *NiBoundingVolume::ms_pfnTriFindFuncTable; // idb
int (__cdecl *NiBoundingVolume::ms_pfnConvertToSphereBV_Fast)(_DWORD, _DWORD); // weak
int (__cdecl *NiBoundingVolume::ms_pfnConvertToSphereBV_Safe)(_DWORD, _DWORD); // weak
int (*NiBoundingVolume::ms_pfnConvertToBoxBV)(void); // weak
NiRTTI NiNode::m_RTTI; // idb
enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType; // weak
NiRTTI NiObjectNET::m_RTTI; // idb
NiRTTI NiObject::m_RTTI; // idb
NiRTTI NiAVObject::m_RTTI; // idb
_UNKNOWN NiMatrix3::ZERO; // weak
NiRTTI NiMaterialProperty::m_RTTI; // idb
NiMaterialProperty *NiMaterialProperty::ms_spDefault; // idb
const float NI_PI; // weak
const float NI_HALF_PI; // weak
const float NI_TWO_PI; // weak
NiPoint3 NiPoint3::ZERO; // idb
char NiRenderer::ms_acErrorString; // idb
NiRenderer *NiRenderer::ms_pkRenderer; // idb
NiRTTI NiRenderer::m_RTTI; // idb
NiRTTI NiProperty::m_RTTI; // idb
NiRTTI NiVertexColorProperty::m_RTTI; // idb
int NiVertexColorProperty::ms_spDefault; // weak
void *NiTAbstractPoolAllocator<unsigned int>::ms_pkBlockHeader; // idb
int NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem; // weak
_RTL_CRITICAL_SECTION NiTAbstractPoolAllocator<unsigned int>::ms_kCriticalSection; // idb
int dword_B62428; // weak
int dword_B6242C; // weak
NiRTTI NiAlphaProperty::m_RTTI; // idb
int NiAlphaProperty::ms_spDefault; // weak
const struct NiColor NiColor::BLACK; // weak
NiRTTI NiFogProperty::m_RTTI; // idb
int NiFogProperty::ms_spDefault; // weak
NiRTTI NiDirectionalLight::m_RTTI; // idb
NiRTTI NiDynamicEffect::m_RTTI; // idb
NiRTTI NiAmbientLight::m_RTTI; // idb
NiRTTI NiSortAdjustNode::m_RTTI; // idb
NiRTTI NiCamera::m_RTTI; // idb
struct NiShaderFactory *NiShaderFactory::ms_pkShaderFactory; // weak
NiRTTI NiTexturingProperty::m_RTTI; // idb
NiProperty *NiTexturingProperty::ms_spDefault; // idb
bool NiSourceTexture::ms_bDestroyAppData; // weak
NiRTTI NiSourceTexture::m_RTTI; // idb
char *NiImageConverter::ms_pcPlatformSubDir; // idb
int NiImageConverter::ms_spConverter; // weak
volatile LONG NiRefObject::ms_uiObjects; // idb
NiRTTI NiTriShape::m_RTTI; // idb
NiRTTI NiRenderTargetGroup::m_RTTI; // idb
NiRTTI NiRenderedTexture::m_RTTI; // idb
NiRTTI NiScreenElementsData::m_RTTI; // idb
NiRTTI NiScreenElements::m_RTTI; // idb
NiRTTI NiExtraData::m_RTTI; // idb
NiRTTI NiBinaryExtraData::m_RTTI; // idb
NiRTTI NiShader::m_RTTI; // idb
NiRTTI NiPixelData::m_RTTI; // idb
NiRTTI NiZBufferProperty::m_RTTI; // idb
int NiZBufferProperty::ms_spDefault; // weak
NiRTTI NiAlphaAccumulator::m_RTTI; // idb
NiRTTI NiIntegerExtraData::m_RTTI; // idb
NiRTTI NiStringExtraData::m_RTTI; // idb
float sfLastScaled; // idb
float sfLastTime; // idb
float sfLastLo; // idb
float sfLastHi; // idb
NiRTTI NiTimeController::m_RTTI; // idb
_RTL_CRITICAL_SECTION NiTimeController::ms_kCachedValuesLock; // idb
const struct NiPoint2 NiPoint2::ZERO; // weak
NiRTTI NiRangeLODData::m_RTTI; // idb
NiRTTI NiLODNode::m_RTTI; // idb
NiRTTI NiGeometry::m_RTTI; // idb
NiRTTI NiSkinPartition::m_RTTI; // idb
NiRTTI NiTriBasedGeomData::m_RTTI; // idb
NiRTTI NiTriBasedGeom::m_RTTI; // idb
NiRTTI NiSkinInstance::m_RTTI; // idb
NiRTTI NiAccumulator::m_RTTI; // idb
NiRTTI NiCollisionObject::m_RTTI; // idb
struct NiTexture *NiTexture::ms_pkHead; // weak
struct NiTexture *NiTexture::ms_pkTail; // weak
bool NiTexture::ms_bMipmapByDefault; // weak
NiRTTI NiTexture::m_RTTI; // idb
_RTL_CRITICAL_SECTION NiTexture::ms_kTextureListCriticalSection; // idb
int dword_B625BC; // weak
int dword_B625C0; // weak
int NiTexture::RendererData::ms_aspReplacementData[]; // weak
int dword_B625C8; // weak
int dword_B625CC; // weak
int dword_B625D0; // weak
int dword_B625D4; // weak
int dword_B625D8; // weak
int dword_B625DC; // weak
int dword_B625E0; // weak
int dword_B625E4; // weak
int dword_B625E8; // weak
_UNKNOWN unk_B625EC; // weak
NiPixelFormat NiTexture::RendererData::ms_kReplacementFormat; // idb
NiRTTI NiStencilProperty::m_RTTI; // idb
int NiStencilProperty::ms_spDefault; // weak
struct NiGeometryGroupManager *NiGeometryGroupManager::ms_pkManager; // weak
NiRTTI NiTriShapeDynamicData::m_RTTI; // idb
struct NiPalette *NiPalette::ms_pkHead; // weak
struct NiPalette *NiPalette::ms_pkTail; // weak
NiRTTI NiPalette::m_RTTI; // idb
_RTL_CRITICAL_SECTION NiPalette::ms_kPaletteListCriticalSection; // idb
int dword_B62674; // weak
int dword_B62678; // weak
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *NiStream::ms_pkLoaders; // idb
NiTArray<NiVBBlock *> *NiStream::ms_pkPostProcessFunctions; // idb
const unsigned int NiStream::ms_uiNifMinUserDefinedVersion; // weak
const unsigned int NiStream::ms_uiNifMaxUserDefinedVersion; // weak
_RTL_CRITICAL_SECTION NiStream::ms_kCleanupCriticalSection; // idb
int dword_B626A4; // weak
int dword_B626A8; // weak
const float ISQRT_ADDITIVE_CONSTANT; // idb
const float ISQRT_FACTOR; // idb
NiRTTI NiSkinData::m_RTTI; // idb
NiTextureTransform NiTextureTransform::IDENTITY; // idb
NiRTTI NiAVObjectPalette::m_RTTI; // idb
NiRTTI NiDefaultAVObjectPalette::m_RTTI; // idb
NiRTTI NiGeometryData::m_RTTI; // idb
_RTL_CRITICAL_SECTION NiGeometryData::ms_kCritSec; // idb
int dword_B62738; // weak
int dword_B6273C; // weak
NiRTTI NiLight::m_RTTI; // idb
void *NiPoint3::ms_pSqrtTable; // idb
NiRTTI NiFloatsExtraData::m_RTTI; // idb
NiRTTI NiColorExtraData::m_RTTI; // idb
enum NiProcessorSpecificCode::ProcessorID NiProcessorSpecificCode::ms_eProcessorID; // weak
bool NiProcessorSpecificCode::ms_bIDSet; // weak
unsigned int uiCPUIDResults; // idb
NiRTTI NiTriStrips::m_RTTI; // idb
NiRTTI NiSwitchNode::m_RTTI; // idb
NiRTTI NiVertWeightsExtraData::m_RTTI; // idb
bool NiMainSDM::ms_bInitialized; // weak
int siCounter_1; // idb
NiRTTI NiTriShapeData::m_RTTI; // idb
NiRTTI NiDepthStencilBuffer::m_RTTI; // idb
NiRTTI Ni2DBuffer::m_RTTI; // idb
NiRTTI NiBackToFrontAccumulator::m_RTTI; // idb
NiRTTI NiLODData::m_RTTI; // idb
const unsigned __int16 *const NiTriStripsData::ms_pusStripList; // weak
unsigned __int16 NiTriStripsData::ms_usI; // weak
unsigned __int16 NiTriStripsData::ms_usStrip; // weak
NiRTTI NiTriStripsData::m_RTTI; // idb
NiRTTI NiDitherProperty::m_RTTI; // idb
int NiDitherProperty::ms_spDefault; // weak
NiRTTI NiRendererSpecificProperty::m_RTTI; // idb
int NiRendererSpecificProperty::ms_spDefault; // weak
NiRTTI NiShadeProperty::m_RTTI; // idb
int NiShadeProperty::ms_spDefault; // weak
NiRTTI NiSpecularProperty::m_RTTI; // idb
int NiSpecularProperty::ms_spDefault; // weak
NiRTTI NiWireframeProperty::m_RTTI; // idb
int NiWireframeProperty::ms_spDefault; // weak
NiTPool<NiD3DPass> *NiScreenGeometryData::ms_pkScreenElementPool; // idb
NiRTTI NiScreenGeometryData::m_RTTI; // idb
NiRTTI NiScreenGeometry::m_RTTI; // idb
NiRTTI NiScreenPolygon::m_RTTI; // idb
NiRTTI NiScreenSpaceCamera::m_RTTI; // idb
NiRTTI NiVectorExtraData::m_RTTI; // idb
NiRTTI NiTextureEffect::m_RTTI; // idb
NiRTTI NiSwitchStringExtraData::m_RTTI; // idb
NiRTTI NiStringsExtraData::m_RTTI; // idb
NiRTTI NiSpotLight::m_RTTI; // idb
NiRTTI NiSourceCubeMap::m_RTTI; // idb
NiRTTI NiScreenTexture::m_RTTI; // idb
NiRTTI NiScreenLODData::m_RTTI; // idb
NiRTTI NiParticlesData::m_RTTI; // idb
NiRTTI NiPointLight::m_RTTI; // idb
NiRTTI NiParticleMeshesData::m_RTTI; // idb
NiRTTI NiParticleMeshes::m_RTTI; // idb
NiRTTI NiLinesData::m_RTTI; // idb
NiRTTI NiLines::m_RTTI; // idb
NiRTTI NiIntegersExtraData::m_RTTI; // idb
NiRTTI NiFloatExtraData::m_RTTI; // idb
NiRTTI NiBSPNode::m_RTTI; // idb
NiRTTI NiBooleanExtraData::m_RTTI; // idb
NiRTTI NiBillboardNode::m_RTTI; // idb
NiRTTI NiParticles::m_RTTI; // idb
NiRTTI NiAdditionalGeometryData::m_RTTI; // idb
bool NiMilesAudioSDM::ms_bInitialized; // weak
int siCounter_2; // idb
struct NiAudioSystem *NiAudioSystem::ms_pAudioSystem; // weak
NiRTTI NiAudioSystem::m_RTTI; // idb
NiRTTI NiMilesAudioSystem::m_RTTI; // idb
NiRTTI NiMilesSource::m_RTTI; // idb
NiRTTI NiMilesListener::m_RTTI; // idb
NiRTTI NiAudioSource::m_RTTI; // idb
NiRTTI NiAudioListener::m_RTTI; // idb
bool NiParticleSDM::ms_bInitialized; // weak
int siCounter_3; // idb
NiRTTI NiPSysEmitterCtlr::m_RTTI; // idb
NiRTTI NiPSysVortexFieldModifier::m_RTTI; // idb
NiRTTI NiPSysUpdateCtlr::m_RTTI; // idb
NiRTTI NiPSysTurbulenceFieldModifier::m_RTTI; // idb
NiRTTI NiPSysSphericalCollider::m_RTTI; // idb
NiRTTI NiPSysSphereEmitter::m_RTTI; // idb
NiRTTI NiPSysSpawnModifier::m_RTTI; // idb
const float fTenPi; // idb
unsigned int _S1_2; // idb
NiRTTI NiPSysRotationModifier::m_RTTI; // idb
NiRTTI NiPSysResetOnLoopCtlr::m_RTTI; // idb
NiRTTI NiPSysRadialFieldModifier::m_RTTI; // idb
NiRTTI NiPSysPositionModifier::m_RTTI; // idb
const float sfCollisionEpsilon; // idb
unsigned int _S1_3; // idb
NiRTTI NiPSysPlanarCollider::m_RTTI; // idb
NiRTTI NiPSysModifierActiveCtlr::m_RTTI; // idb
NiRTTI NiPSysMeshUpdateModifier::m_RTTI; // idb
NiRTTI NiPSysMeshEmitter::m_RTTI; // idb
NiRTTI NiPSysInitialRotSpeedVarCtlr::m_RTTI; // idb
NiRTTI NiPSysInitialRotSpeedCtlr::m_RTTI; // idb
NiRTTI NiPSysInitialRotAngleVarCtlr::m_RTTI; // idb
NiRTTI NiPSysInitialRotAngleCtlr::m_RTTI; // idb
NiRTTI NiPSysGrowFadeModifier::m_RTTI; // idb
NiRTTI NiPSysGravityStrengthCtlr::m_RTTI; // idb
NiRTTI NiPSysGravityFieldModifier::m_RTTI; // idb
NiRTTI NiPSysGravityModifier::m_RTTI; // idb
NiRTTI NiPSysFieldMaxDistanceCtlr::m_RTTI; // idb
NiRTTI NiPSysFieldMagnitudeCtlr::m_RTTI; // idb
NiRTTI NiPSysFieldAttenuationCtlr::m_RTTI; // idb
NiRTTI NiPSysEmitterSpeedCtlr::m_RTTI; // idb
NiRTTI NiPSysEmitterPlanarAngleVarCtlr::m_RTTI; // idb
NiRTTI NiPSysEmitterPlanarAngleCtlr::m_RTTI; // idb
NiRTTI NiPSysEmitterLifeSpanCtlr::m_RTTI; // idb
NiRTTI NiPSysEmitterInitialRadiusCtlr::m_RTTI; // idb
NiRTTI NiPSysEmitterDeclinationVarCtlr::m_RTTI; // idb
NiRTTI NiPSysEmitterDeclinationCtlr::m_RTTI; // idb
NiRTTI NiPSysEmitterCtlrData::m_RTTI; // idb
NiRTTI NiPSysDragModifier::m_RTTI; // idb
NiRTTI NiPSysDragFieldModifier::m_RTTI; // idb
NiRTTI NiPSysData::m_RTTI; // idb
NiRTTI NiPSysCylinderEmitter::m_RTTI; // idb
NiRTTI NiPSysColorModifier::m_RTTI; // idb
NiRTTI NiPSysColliderManager::m_RTTI; // idb
NiRTTI NiPSysBoxEmitter::m_RTTI; // idb
NiRTTI NiPSysBoundUpdateModifier::m_RTTI; // idb
NiRTTI NiPSysBombModifier::m_RTTI; // idb
NiRTTI NiPSysAgeDeathModifier::m_RTTI; // idb
NiRTTI NiPSysAirFieldSpreadCtlr::m_RTTI; // idb
NiRTTI NiPSysAirFieldModifier::m_RTTI; // idb
NiRTTI NiPSysAirFieldInheritVelocityCtlr::m_RTTI; // idb
NiRTTI NiPSysAirFieldAirFrictionCtlr::m_RTTI; // idb
NiRTTI NiParticleSystem::m_RTTI; // idb
NiRTTI NiMeshPSysData::m_RTTI; // idb
NiRTTI NiMeshParticleSystem::m_RTTI; // idb
NiRTTI NiPSysModifierCtlr::m_RTTI; // idb
NiRTTI NiPSysEmitter::m_RTTI; // idb
NiRTTI NiPSysModifier::m_RTTI; // idb
NiRTTI NiPSysFieldModifier::m_RTTI; // idb
NiRTTI NiPSysCollider::m_RTTI; // idb
NiRTTI NiPSysVolumeEmitter::m_RTTI; // idb
NiRTTI NiPSysModifierBoolCtlr::m_RTTI; // idb
NiRTTI NiPSysModifierFloatCtlr::m_RTTI; // idb
_LARGE_INTEGER initial; // idb
_LARGE_INTEGER freq; // idb
void (__cdecl static **NiStaticDataManager::ms_apfnShutdownFunctions)(); // weak
void (__cdecl static **NiStaticDataManager::ms_apfnInitFunctions)(); // weak
unsigned int NiStaticDataManager::ms_uiNumLibraries; // weak
int (*NiStaticDataManager::ms_pfnRootInitFunction)(void); // weak
int (*NiStaticDataManager::ms_pfnRootShutdownFunction)(void); // weak
void *NiSystemDesc::ms_pkSystemDesc; // idb
bool NiBinaryStream::ms_bEndianMatchHint; // weak
char NiSearchPath::ms_acDefPath; // idb
bool NiSystemSDM::ms_bInitialized; // weak
struct NiLogger::NiLogFile **NiLogger::ms_apkLogFile; // weak
int dword_B62CAC[]; // weak
int dword_B62CB0[]; // weak
int dword_B62CB4[]; // weak
int dword_B62CB8; // weak
int dword_B62CBC; // weak
int dword_B62CC0; // weak
int dword_B62CC4; // weak
int dword_B62CC8; // weak
int dword_B62CCC; // weak
int dword_B62CD0; // weak
int dword_B62CD4; // weak
int dword_B62CD8; // weak
int dword_B62CDC; // weak
int dword_B62CE0; // weak
int dword_B62CE4; // weak
unsigned int NiLogger::ms_uiLogFileCount; // weak
_UNKNOWN unk_B62EF8; // weak
int dword_B62F18; // weak
int dword_B62F24; // weak
int dword_B62F30; // weak
int dword_B62F3C; // weak
int dword_B62F48; // weak
int dword_B62F54; // weak
int dword_B62F60; // weak
char byte_B62F64; // weak
_RTL_CRITICAL_SECTION NiLogger::ms_kCriticalSection; // idb
bool NiPortalSDM::ms_bInitialized; // weak
int siCounter_4; // idb
NiRTTI NiRoom::m_RTTI; // idb
NiRTTI NiOldWall::m_RTTI; // idb
bool NiRoomGroup::ms_bViewAllRoom; // weak
NiRTTI NiRoomGroup::m_RTTI; // idb
NiRTTI NiPortal::m_RTTI; // idb
struct NiApplication *NiApplication::ms_pkApplication; // weak
HINSTANCE NiApplication::ms_pInstance; // idb
HACCEL NiApplication::ms_pAccel; // idb
NiCommand *NiApplication::ms_pkCommand; // idb
NiDX9DeviceDesc *NiDX9Select::ms_pkDevice; // idb
const void *const NiDX9Select::ms_pkMode; // weak
const struct NiDX9AdapterDesc *const NiDX9Select::ms_pkAdapter; // weak
const struct NiDX9SystemDesc *const NiDX9Select::ms_pkInfo; // weak
bool NiDX9Select::ms_bFullscreen; // weak
bool NiDX9Select::ms_b32BitZBuffer; // weak
bool NiDX9Select::ms_bDialogOpen; // weak
unsigned int NiDX9Select::ms_uiMultisample; // idb
unsigned int NiInputSystem::ms_uiSequence; // weak
NiRTTI NiInputSystem::m_RTTI; // idb
NiRTTI NiInputSystem::CreateParams::m_RTTI; // idb
unsigned int s_uiLastModifiers; // idb
HINSTANCE NiDI8InputSystem::ms_hOwnerInst; // weak
HWND__ *NiDI8InputSystem::ms_hOwnerWnd; // idb
HMODULE NiDI8InputSystem::ms_hLibInst; // idb
NiRTTI NiDI8InputSystem::m_RTTI; // idb
NiRTTI NiDI8InputSystem::DI8CreateParams::m_RTTI; // idb
NiRTTI NiInputGamePad::m_RTTI; // idb
NiTPool<NiD3DPass> *NiActionMap::ms_pakActionPool; // idb
NiRTTI NiInputDevice::m_RTTI; // idb
NiRTTI NiInputDI8Mouse::m_RTTI; // idb
NiRTTI NiInputDI8Keyboard::m_RTTI; // idb
NiRTTI NiInputDI8GamePad::m_RTTI; // idb
NiRTTI NiInputMouse::m_RTTI; // idb
NiRTTI NiInputKeyboard::m_RTTI; // idb
bool NSBShaderLibSDM::ms_bInitialized; // weak
int siCounter_5; // idb
NiD3DXEffectLoader *NSBLoader::ms_pkLoader; // idb
NiD3DXEffectLoader *NSFLoader::ms_pkLoader; // idb
unsigned int g_uiHighFloatValues; // weak
float g_afHighValues; // idb
float flt_B63274; // weak
float flt_B63278; // weak
float flt_B6327C; // weak
float g_afValues; // idb
float flt_B63374; // weak
float flt_B63378; // weak
float flt_B6337C; // weak
float flt_B63380; // weak
float flt_B63384; // weak
float flt_B63388; // weak
float flt_B6338C; // weak
float flt_B63390; // weak
float flt_B63394; // weak
float flt_B63398; // weak
float flt_B6339C; // weak
float flt_B633A0; // weak
float flt_B633A4; // weak
float flt_B633A8; // weak
float flt_B633AC; // weak
float g_afLowValues; // idb
float flt_B63474; // weak
float flt_B63478; // weak
float flt_B6347C; // weak
bool g_bRanged; // weak
int NSFParserdebug; // weak
unsigned int g_uiLowFloatValues; // weak
unsigned int g_uiCurrentPlatforms; // weak
enum NiConstantMapMode g_eConstMapMode; // weak
int NSFParsernerrs; // weak
unsigned int g_uiFloatValues; // weak
int NSFParserchar; // weak
union YYSTYPE NSFParserlval; // weak
char g_szDSO[1024]; // idb
NSFTextFile *g_pkFile; // idb
int g_iDSOIndent; // weak
bool g_bConstantMapPlatformBlock; // weak
bool g_bGlobalAttributes; // weak
bool g_bCurrPDFixedFunction; // weak
bool g_bCurrStateValid; // weak
NSFParsedShader *g_pkCurrShader; // idb
NSBShader *g_pkCurrNSBShader; // idb
NSBAttributeTable *g_pkCurrAttribTable; // idb
NSBObjectTable *g_pkCurrObjectTable; // idb
unsigned int g_uiCurrPDStream; // idb
NSBPackingDef *g_pkCurrPackingDef; // idb
NSBRequirements *g_pkCurrRequirements; // idb
unsigned int g_uiCurrImplementation; // idb
NSBPass *g_pkCurrImplementation; // idb
NSBStateGroup *g_pkCurrRSGroup; // idb
NSBConstantMap *g_pkCurrConstantMap; // idb
unsigned int g_uiCurrPassIndex; // idb
NSBPass *g_pkCurrPass; // idb
NSBTextureStage *g_pkCurrTextureStage; // idb
unsigned int g_uiCurrStateState; // idb
unsigned int g_uiCurrStateValue; // idb
bool g_bUseMapValue; // weak
NSBUserDefinedDataSet *g_pkCurrUDDataSet; // idb
struct NSBUserDefinedDataBlock *g_pkCurrUDDataBlock; // weak
int iErrors; // weak
char yy_hold_char[28]; // idb
yy_buffer_state *yy_current_buffer; // idb
char *yy_c_buf_p; // idb
int yy_start; // idb
_iobuf *NSFParserin; // idb
_iobuf *NSFParserout; // idb
NiD3DXEffectFactory *NiD3DXEffectFactory::ms_pkFactory; // idb
void *NiD3DXEffectFactory::ms_pcD3DXEffectDirectory; // idb
struct NiDX9Renderer *NiD3DXEffectFactory::ms_pkD3DRenderer; // weak
IDirect3DDevice9 *NiD3DXEffectFactory::ms_pkD3DDevice; // idb
unsigned int NiD3DXEffectFactory::ms_uiCreationFlags; // weak
HINSTANCE NiD3DXEffectFactory::ms_hAppInstance; // weak
NiD3DXEffectLoader *NiD3DXEffectLoader::ms_pkLoader; // idb
float *NiD3DXEffectParameter::ms_afObjectData; // weak
float flt_B63A4C; // weak
float flt_B63A50; // weak
float flt_B63A54; // weak
float flt_B63A58; // weak
float flt_B63A5C; // weak
float flt_B63A60; // weak
float flt_B63A64; // weak
float flt_B63A68; // weak
float flt_B63A6C; // weak
float flt_B63A70; // weak
float flt_B63A74; // weak
float flt_B63A78; // weak
float flt_B63A7C; // weak
float flt_B63A80; // weak
float flt_B63A84; // weak
void *NiD3DXEffectParameter::ms_pkMatrixArray; // idb
unsigned int NiD3DXEffectParameter::ms_uiMatrixArraySize; // weak
D3DXVECTOR4 NiD3DXEffectParameter::ms_akVector4Array; // idb
unsigned int NiD3DXEffectParser::ms_uiShaderMapIndex; // weak
unsigned int NiD3DXEffectParser::ms_uiGeneralLightIndex; // weak
unsigned int NiD3DXEffectParser::ms_uiPointLightIndex; // weak
unsigned int NiD3DXEffectParser::ms_uiDirectionalLightIndex; // weak
unsigned int NiD3DXEffectParser::ms_uiSpotLightIndex; // weak
unsigned int NiD3DXEffectParser::ms_uiProjShadowIndex; // weak
unsigned int NiD3DXEffectParser::ms_uiProjLightIndex; // weak
char NiD3DXEffectParameterDesc::ms_kArrayDesc[]; // idb
struct NiD3DXEffectParameterObjectDesc NiD3DXEffectParameterDesc::ms_kObjectDesc; // weak
int dword_B64114; // weak
int dword_B64118; // weak
int dword_B6411C; // weak
int dword_B64120; // weak
int dword_B64124; // weak
struct NiD3DXEffectParameterPredefinedDesc NiD3DXEffectParameterDesc::ms_kPredefinedDesc; // weak
int dword_B6412C; // weak
int dword_B64130; // weak
int dword_B64134; // weak
int dword_B64138; // weak
int dword_B6413C; // weak
int dword_B64140; // weak
struct NiD3DXEffectParameterBooleanDesc NiD3DXEffectParameterDesc::ms_kBooleanDesc; // weak
int dword_B64148; // weak
int dword_B6414C; // weak
int dword_B64150; // weak
int dword_B64154; // weak
char NiD3DXEffectParameterDesc::ms_kTextureDesc[]; // idb
struct NiD3DXEffectParameterIntegerDesc NiD3DXEffectParameterDesc::ms_kIntegerDesc; // weak
int dword_B641A4; // weak
int dword_B641A8; // weak
int dword_B641AC; // weak
int dword_B641B0; // weak
int dword_B641B4; // weak
int dword_B641B8; // weak
int dword_B641BC; // weak
struct NiD3DXEffectParameterFloatDesc NiD3DXEffectParameterDesc::ms_kFloatDesc; // weak
int dword_B641C4; // weak
int dword_B641C8; // weak
int dword_B641CC; // weak
int dword_B641D0; // weak
int dword_B641D4; // weak
int dword_B641D8; // weak
int dword_B641DC; // weak
char NiD3DXEffectParameterDesc::ms_kVectorDesc[]; // idb
char NiD3DXEffectParameterDesc::ms_kMatrixDesc[]; // idb
NiRTTI NiD3DXEffectShader::m_RTTI; // idb
struct NiD3DXEffectStateManager *NiD3DXEffectStateManager::ms_pkManager; // weak
struct NiD3DXEffectTechniqueDesc NiD3DXEffectTechniqueDesc::ms_kTechniqueDesc; // weak
int dword_B642A0; // weak
int dword_B642A4; // weak
int dword_B642A8; // weak
int dword_B642AC; // weak
int dword_B642B0; // weak
int dword_B642B4; // weak
int dword_B642B8; // weak
int dword_B642BC; // weak
int dword_B642C0; // weak
bool NiD3DXEffectShaderSDM::ms_bInitialized; // weak
int siCounter_6; // idb
NiRTTI NsPgToonRegister_v2::m_RTTI; // idb
NiRTTI NPTR_ISShader_v2::m_RTTI; // idb
NiRTTI INpShader::m_RTTI; // idb
NiRTTI NsPgToonExtraData::m_RTTI; // idb
NiRTTI NsPgCatoonShader::m_RTTI; // idb
int NiBoolKeyregisterloaderreturn_0; // idb
int NiColorKeyregisterloaderreturn_0; // idb
int NiFloatKeyregisterloaderreturn_0; // idb
NiPoint3 kz; // idb
NiColorA kColor; // idb
unsigned int _S1_4; // idb
NiRTTI NiAlphaRefController::m_RTTI; // idb
NiRTTI NsFadeNode::m_RTTI; // idb
int NiStepFloatKeyregisterloaderreturn_0; // idb
int NiBoolKeyregisterloaderreturn_1; // idb
int NiStepColorKeyregisterloaderreturn_0; // idb
int NiTCBPosKeyregisterloaderreturn_0; // idb
int NiStepPosKeyregisterloaderreturn_0; // idb
int NiTCBFloatKeyregisterloaderreturn_0; // idb
int NiLinPosKeyregisterloaderreturn_0; // idb
int NiBezRotKeyregisterloaderreturn_0; // idb
int NiEulerRotKeyregisterloaderreturn_0; // idb
int NiStepBoolKeyregisterloaderreturn_0; // idb
int NiTCBRotKeyregisterloaderreturn_0; // idb
int NiColorKeyregisterloaderreturn_1; // idb
int NiRotKeyregisterloaderreturn_0; // idb
int NiLinFloatKeyregisterloaderreturn_0; // idb
int NiStepRotKeyregisterloaderreturn_0; // idb
int NiBezPosKeyregisterloaderreturn_0; // idb
int NiBezFloatKeyregisterloaderreturn_0; // idb
int NiFloatKeyregisterloaderreturn_1; // idb
int NiLinRotKeyregisterloaderreturn_0; // idb
int NiPosKeyregisterloaderreturn_0; // idb
int NiLinColorKeyregisterloaderreturn_0; // idb
boost::singleton_pool<boost::fast_pool_allocator_tag,24,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>::pool_type `boost::details::pool::singleton_default<boost::singleton_pool<boost::fast_pool_allocator_tag,24,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>::pool_type>::instance'::`2'::obj; // idb
int `boost::details::pool::singleton_default<boost::singleton_pool<boost::fast_pool_allocator_tag,24,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>::pool_type>::instance'::`2'::`local static guard'; // weak
NiRTTI MasterPropertyAccumulator::m_RTTI; // idb
CDataDocument DataDocument; // idb
unsigned int _S1_5; // idb
CPostProcessEffectManager *CPostProcessEffectManager::ms_PostProcessEffect; // idb
NiRenderer *pkRender; // idb
unsigned int _S1_6; // idb
NiRenderTargetGroup *pkDefaultRenderTarget; // idb
NiRenderer *pkRenderer; // idb
unsigned int _S2; // idb
void *CRTTIClass<CGlowScreenEffect,CBaseObject>::ms_RTTI[4]; // idb
_UNKNOWN unk_B6462C; // weak
_UNKNOWN unk_B64630; // weak
std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > unk_B6463C; // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > stru_B64640; // idb
void *CRTTIClass<CDepthOfFieldEffect,CBaseObject>::ms_RTTI[4]; // idb
_UNKNOWN unk_B6465C; // weak
_UNKNOWN unk_B64660; // weak
std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > unk_B6466C; // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > stru_B64670; // idb
void *CRTTIClass<CAfterImageEffect,CBaseObject>::ms_RTTI[4]; // idb
_UNKNOWN unk_B6468C; // weak
_UNKNOWN unk_B64690; // weak
std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > unk_B6469C; // idb
std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > stru_B646A0; // idb
NiRTTI CPostProcessEffect::m_RTTI; // idb
NiRTTI HazeAccumulator::m_RTTI; // idb
NiRTTI CHazeScreenEffect::m_RTTI; // idb
int CPropertyType<unsigned int>::ms_TypeID; // weak
NiRTTI CGlowScreenEffect::m_RTTI; // idb
int timeCount; // idb
NiRTTI CAfterImageEffect::m_RTTI; // idb
NiRTTI CDepthOfFieldEffect::m_RTTI; // idb
NiRenderTargetGroup *pkDefualtRTGroup; // idb
unsigned int _S1_7; // idb
NiRTTI CScreenEffect::m_RTTI; // idb
NiRTTI PgFrameWork::m_RTTI; // idb
PgFrameMgr Pgg_kFrameMgr; // idb
bool PgWin::ms_bShiftPressed; // weak
bool PgWin::ms_bCtrlPressed; // weak
bool PgWin::ms_bAltPressed; // weak
int PgWin::ms_iMsDeltaZ; // idb
int PgWin::ms_iMsDeltaY; // idb
int PgWin::ms_iMsDeltaX; // idb
unsigned int PgWin::ms_iMsX; // idb
int PgWin::ms_iMsY; // idb
PgWin *PgWin::ms_pkCapture; // idb
int PgWin::ms_iScreenLeftPos; // weak
int PgWin::ms_iScreenTopPos; // weak
bool PgWin::ms_bCursorSetted; // weak
NiRTTI PgWin::m_RTTI; // idb
struct PgWin::Bool PgWin::ms_kbLbutDown; // weak
char byte_B64780; // weak
int dword_B64784; // weak
struct PgWin::Bool PgWin::ms_kbLbutPressed; // weak
char byte_B6478C; // weak
int dword_B64790; // weak
struct PgWin::Bool PgWin::ms_kbLbutReleased; // weak
char byte_B64798; // weak
int dword_B6479C; // weak
struct PgWin::Bool PgWin::ms_kbRbutDown; // weak
char byte_B647A4; // weak
int dword_B647A8; // weak
PgWin::Bool PgWin::ms_kbRbutPressed; // idb
PgWin::Bool PgWin::ms_kbRbutReleased; // idb
struct PgWin::Bool PgWin::ms_kbMbutDown; // weak
char byte_B647C8; // weak
int dword_B647CC; // weak
struct PgWin::Bool PgWin::ms_kbMbutPressed; // weak
char byte_B647D4; // weak
int dword_B647D8; // weak
struct PgWin::Bool PgWin::ms_kbMbutReleased; // weak
char byte_B647E0; // weak
int dword_B647E4; // weak
NiRTTI PgWinText::m_RTTI; // idb
PgWin *pOldFocuswindow; // idb
PgWinMgr Pgg_kWinMgr; // idb
NiCamera *pkScreenCamera; // idb
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > stru_B6481C; // idb
_UNKNOWN unk_B64830; // weak
_UNKNOWN unk_B64838; // weak
PgTQueue<PgWinMgr::PgWinMsg> stru_B6483C; // idb
_UNKNOWN unk_B6484C; // weak
_UNKNOWN unk_B64860; // weak
_UNKNOWN unk_B64864; // weak
_UNKNOWN unk_B64868; // weak
_UNKNOWN unk_B64880; // weak
_DWORD *dword_B64884; // idb
NiTexturePalette *pTexturePalette; // idb
_UNKNOWN unk_B6488C; // weak
_UNKNOWN unk_B6488D; // weak
NiRTTI PgWinBut::m_RTTI; // idb
bool bInRecreateRegistedText; // idb
int CommaCount; // idb
NiRefObject *CSpFont::ms_spAlphaProp; // idb
NiRefObject *CSpFont::ms_spVertexProp; // idb
struct NiCamera *SpScreenText::m_pkScrSpaceCamera; // weak
char *PgCursor::ms_akInfo; // idb
int PgCursor::ms_iMaxCursorType; // weak
struct PgWinDrop *PgCursor::ms_pkDrop; // weak
bool PgCursor::ms_bKeepDrop; // weak
NiRTTI PgCursor::m_RTTI; // idb
NiRefObject *PgCursor::ms_spSystemCursor; // idb
NiRefObject *PgCursor::ms_spCursorDxSurfaceTexture; // idb
bool PgExternalLib::ms_bOpenSoundEnable; // weak
bool PgExternalLib::ms_bCloseSoundEnable; // weak
PgProfileNode PgProfileMgr::ms_kRoot; // idb
PgTQueue<PgProfileNode *> PgProfileMgr::ms_kTraversalQ; // idb
WNDPROC PgEditWin::ms_pfnOldProc; // idb
NiTMapBase<DFALL<PgEditWin *>,HWND__ *,PgEditWin *> PgEditWin::ms_kCallBackMap; // idb
NiRTTI PgWinScaleCtrl::m_RTTI; // idb
StrBuffer kTmpStr; // idb
unsigned int _S2_0; // idb
ATL::CAtlBaseModule ATL::_AtlBaseModule; // idb
struct ATL::CWin32Heap ATL::g_strheap; // weak
int dword_B64980; // weak
char byte_B64984; // weak
NiD3DShaderProgramFactory *NiD3DShaderProgramFactory::ms_pkFactory; // idb
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *NiD3DShaderProgramFactory::ms_pkShaderCreators; // idb
struct IDirect3DDevice9 *NiD3DShaderProgramFactory::ms_pkD3DDevice; // weak
struct NiDX9Renderer *NiD3DShaderProgramFactory::ms_pkD3DRenderer; // weak
struct NiD3DRenderState *NiD3DShaderProgramFactory::ms_pkD3DRenderState; // weak
NiRTTI NiD3DDefaultShader::m_RTTI; // idb
struct NiD3DRenderState *NiD3DTextureStageGroup::ms_pkD3DRenderState; // weak
NiTPool<NiD3DTextureStageGroup> *NiD3DTextureStageGroup::ms_pkTextureStageGroupPool; // idb
struct IDirect3DDevice9 *NiD3DTextureStage::ms_pkD3DDevice; // weak
struct NiDX9Renderer *NiD3DTextureStage::ms_pkD3DRenderer; // weak
struct NiD3DRenderState *NiD3DTextureStage::ms_pkD3DRenderState; // weak
NiTSet<NiD3DTextureStageGroup *> *NiD3DTextureStage::ms_pkTextureStagePool; // idb
char NiD3DTextureStage::ms_kCalculatedTextureTransformation[]; // idb
float flt_B649C4; // weak
float flt_B649C8; // weak
float flt_B649CC; // weak
float flt_B649D0; // weak
float flt_B649D4; // weak
float flt_B649D8; // weak
float flt_B649DC; // weak
float flt_B649E0; // weak
float flt_B649E4; // weak
float flt_B649E8; // weak
float flt_B649EC; // weak
float flt_B649F0; // weak
float flt_B649F4; // weak
float flt_B649F8; // weak
float flt_B649FC; // weak
struct NiDX9Renderer *NiD3DRenderStateGroup::ms_pkD3DRenderer; // weak
struct NiD3DRenderState *NiD3DRenderStateGroup::ms_pkD3DRenderState; // weak
NiTPool<NiD3DRenderStateGroup> *NiD3DRenderStateGroup::ms_pkRenderStateGroupPool; // idb
NiTPool<NiD3DRenderStateGroup::NiD3DRSEntry> *NiD3DRenderStateGroup::ms_pkRenderStateEntryPool; // idb
struct IDirect3DDevice9 *NiD3DPass::ms_pkD3DDevice; // weak
struct NiDX9Renderer *NiD3DPass::ms_pkD3DRenderer; // weak
struct NiD3DRenderState *NiD3DPass::ms_pkD3DRenderState; // weak
NiTPool<NiD3DPass> *NiD3DPass::ms_pkPassPool; // idb
void (__cdecl static **NiD3DShader::ms_apfnDynEffectPackers)(const struct NiMatrix3 *, const struct NiPoint3 *, struct NiD3DTextureStage *, bool, struct NiDX9Renderer *); // weak
NiRTTI NiD3DShader::m_RTTI; // idb
NiRTTI NiD3DShaderInterface::m_RTTI; // idb
char NiDX9Renderer::ms_aucD3DFormatSizes; // idb
int dword_B64A5C; // weak
int dword_B64A60; // weak
int dword_B64A64; // weak
int dword_B64A68; // weak
char byte_B64A6C; // weak
__int16 word_B64A70; // weak
__int16 word_B64A7A; // weak
char byte_B64A7C; // weak
int dword_B64A84; // weak
char byte_B64A88; // weak
char byte_B64A8B; // weak
__int16 word_B64A8E; // weak
char byte_B64A91; // weak
char byte_B64A93; // weak
char byte_B64A95; // weak
__int16 word_B64A97; // weak
char byte_B64A99; // weak
__int16 word_B64A9A; // weak
__int16 word_B64AAD; // weak
int dword_B64AB6; // weak
int dword_B64ABA; // weak
unsigned int NiDX9Renderer::ms_akD3DFilterMapping; // idb
unsigned int dword_B64AC4; // idb
unsigned int dword_B64AC8; // idb
int dword_B64ACC; // weak
int dword_B64AD0; // weak
int dword_B64AD4; // weak
int dword_B64AD8; // weak
int dword_B64ADC; // weak
int dword_B64AE0; // weak
int dword_B64AE4; // weak
int dword_B64AE8; // weak
int dword_B64AEC; // weak
int dword_B64AF0; // weak
int dword_B64AF4; // weak
int dword_B64AF8; // weak
int dword_B64AFC; // weak
int dword_B64B00; // weak
int dword_B64B04; // weak
unsigned int NiDX9Renderer::ms_akD3DAddressMapping; // idb
unsigned int uiValue; // idb
int dword_B64B10; // weak
int dword_B64B14; // weak
int dword_B64B18; // weak
int dword_B64B1C; // weak
int dword_B64B20; // weak
int dword_B64B24; // weak
HMODULE NiDX9Renderer::ms_hDXLib; // idb
struct IDirect3D9 *NiDX9Renderer::ms_pkD3D9; // weak
struct IDirect3D9 *(__stdcall static *NiDX9Renderer::ms_pfnD3DCreate9)(unsigned int); // weak
unsigned int NiDX9Renderer::ms_uiProjectedTextureFlags; // idb
NiDX9SystemDesc *NiDX9Renderer::ms_pkSystemDesc; // idb
void *NiDX9Renderer::BatchedObject::ms_pkFreeList; // idb
NiRTTI NiDX9Renderer::m_RTTI; // idb
struct IDirect3DSurface9 **NiDX92DBufferData::ms_apkCurrentBuffer; // weak
struct IDirect3DSurface9 *NiDX92DBufferData::ms_pkCurrentDepthStencil; // weak
unsigned int NiDX92DBufferData::ms_uiNumBuffers; // weak
bool NiDX92DBufferData::ms_bIndependentBitDepths; // weak
NiRTTI NiDX92DBufferData::m_RTTI; // idb
NiRTTI NiDX9TextureBufferData::m_RTTI; // idb
NiRTTI NiDX9DepthStencilBufferData::m_RTTI; // idb
NiRTTI NiDX9ImplicitDepthStencilBufferData::m_RTTI; // idb
NiRTTI NiDX9AdditionalDepthStencilBufferData::m_RTTI; // idb
_RTL_CRITICAL_SECTION NiDX9AdditionalDepthStencilBufferData::ms_kAddDSListCriticalSection; // idb
int dword_B64BA8; // weak
int dword_B64BAC; // weak
NiRTTI NiDX9OnscreenBufferData::m_RTTI; // idb
NiRTTI NiDX9ImplicitBufferData::m_RTTI; // idb
NiRTTI NiDX9SwapChainBufferData::m_RTTI; // idb
NiRTTI NiDX9SwapChainDepthStencilBufferData::m_RTTI; // idb
void *NiD3DShaderLibrary::ms_pcDirectory; // idb
unsigned __int16 *NiD3DShaderConstantMapEntry::ms_ausObjectFlags; // weak
int dword_B64BE8; // weak
int dword_B64BEC; // weak
int dword_B64BF0; // weak
__int16 word_B64BF4; // weak
NiShaderAttributeDesc::ObjectType NiD3DShaderConstantMapEntry::ms_aeObjectType; // idb
int dword_B64BFC; // weak
int dword_B64C00; // weak
int dword_B64C04; // weak
int dword_B64C08; // weak
int dword_B64C0C; // weak
int dword_B64C10; // weak
int dword_B64C14; // weak
int dword_B64C18; // weak
unsigned __int8 *NiD3DShaderConstantMapEntry::ms_aucAttribFlags; // weak
_UNKNOWN unk_B64C20; // weak
char byte_B64C23; // weak
_UNKNOWN unk_B64C24; // weak
char byte_B64C25; // weak
__int16 word_B64C28; // weak
NiShaderAttributeDesc::AttributeType NiD3DShaderConstantMapEntry::ms_aeAttribType; // idb
int dword_B64C30; // weak
int dword_B64C34; // weak
int dword_B64C38; // weak
int dword_B64C3C; // weak
int dword_B64C40; // weak
int dword_B64C44; // weak
int dword_B64C48; // weak
int dword_B64C4C; // weak
int dword_B64C50; // weak
int dword_B64C54; // weak
int dword_B64C58; // weak
int dword_B64C5C; // weak
int dword_B64C60; // weak
bool NiD3DShaderConstantMapEntry::ms_bAttribTableInitialized; // weak
bool NiD3DShaderConstantMapEntry::ms_bObjectTableInitialized; // weak
_UNKNOWN NiD3DSCM_Vertex::ms_afObjectData; // weak
unsigned int NiD3DShaderProgramCreator::ms_uiUniversalShaderCreationFlags; // weak
struct IDirect3DDevice9 *NiD3DShaderProgramCreator::ms_pkD3DDevice; // weak
NiDX9Renderer *NiD3DShaderProgramCreator::ms_pkD3DRenderer; // idb
unsigned int NiD3DShaderFactory::ms_uiNewShaderValue; // weak
struct NiD3DShaderFactory *NiD3DShaderFactory::ms_pkD3DShaderFactory; // weak
int NiD3DShaderConstantMap::ms_bMappingValue; // weak
int *NiD3DShaderConstantMap::ms_aiMappingValue; // weak
int dword_B64CD8; // weak
int dword_B64CDC; // weak
int dword_B64CE0; // weak
struct D3DXVECTOR4 NiD3DShaderConstantMap::ms_vMappingValue; // weak
float flt_B64CE8; // weak
float flt_B64CEC; // weak
float flt_B64CF0; // weak
struct D3DXMATRIX NiD3DShaderConstantMap::ms_mMappingValue; // weak
float flt_B64CFC; // weak
float flt_B64D00; // weak
float flt_B64D04; // weak
float flt_B64D08; // weak
float flt_B64D0C; // weak
float flt_B64D10; // weak
float flt_B64D14; // weak
float flt_B64D18; // weak
float flt_B64D1C; // weak
float flt_B64D20; // weak
float flt_B64D24; // weak
float flt_B64D28; // weak
float flt_B64D2C; // weak
float flt_B64D30; // weak
float flt_B64D34; // weak
struct D3DXMATRIX *NiD3DShaderConstantMap::ms_kD3DMat; // weak
float flt_B64D44; // weak
float flt_B64D48; // weak
float flt_B64D4C; // weak
float flt_B64D50; // weak
float flt_B64D54; // weak
float flt_B64D58; // weak
float flt_B64D5C; // weak
float flt_B64D60; // weak
float flt_B64D64; // weak
float flt_B64D68; // weak
float flt_B64D6C; // weak
float flt_B64D70; // weak
float flt_B64D74; // weak
float flt_B64D78; // weak
float flt_B64D7C; // weak
_UNKNOWN unk_B64D80; // weak
struct D3DXVECTOR4 *NiD3DShaderConstantMap::ms_kD3DVector4; // weak
float flt_B64DC4[]; // weak
float flt_B64DC8[]; // weak
float flt_B64DCC; // weak
float flt_B64DD0; // weak
float flt_B64DD4; // weak
float flt_B64DD8; // weak
float flt_B64DDC; // weak
_UNKNOWN NiD3DShaderConstantMap::ms_kD3DMatResult; // weak
struct D3DXVECTOR4 NiD3DShaderConstantMap::ms_kD3DVector4Result; // weak
float flt_B64E24; // weak
float flt_B64E28; // weak
float flt_B64E2C; // weak
bool NiD3DErrorSettings::ms_bAllowDynEffectNotFound; // weak
NiRTTI NiD3DController::m_RTTI; // idb
NiRTTI NiD3DTimeSyncController::m_RTTI; // idb
const float NiDX9LightManager::LightEntry::ms_fRangeMax; // weak
unsigned int NiDX9SourceTextureData::ms_uiSkipLevels; // weak
NiRTTI NiDX9Direct3DTexture::m_RTTI; // idb
bool NiDX9RendererSDM::ms_bInitialized; // weak
int siCounter_7; // idb
unsigned int *NiD3DShaderDeclaration::ms_auiTypeSizes; // weak
int dword_B64E6C; // weak
int dword_B64E70; // weak
int dword_B64E74; // weak
int dword_B64E78; // weak
int dword_B64E7C; // weak
int dword_B64E80; // weak
int dword_B64E84; // weak
int dword_B64E88; // weak
int dword_B64E8C; // weak
int dword_B64E90; // weak
int dword_B64E94; // weak
int dword_B64E98; // weak
int dword_B64E9C; // weak
int dword_B64EA0; // weak
int dword_B64EA4; // weak
int dword_B64EA8; // weak
NiTArray<NiVBBlock *> *NiD3DShaderDeclaration::ms_pkPackFunctions; // idb
NiVBBlock *NiVBSet::ms_pkBlockDump; // idb
struct NiUnsharedGeometryGroup *NiUnsharedGeometryGroup::ms_pkGroup; // weak
struct NiDynamicGeometryGroup *NiDynamicGeometryGroup::ms_pkGroup; // weak
NiD3DShaderProgramCreator *NiD3DShaderProgramCreatorHLSL::ms_pkCreator; // idb
NiD3DShaderProgramCreator *NiD3DShaderProgramCreatorAsm::ms_pkCreator; // idb
NiD3DShaderProgramCreator *NiD3DShaderProgramCreatorObj::ms_pkCreator; // idb
void *NiVBBlock::ms_pkChipDump; // idb
std::nothrow_t std::nothrow; // idb
NiRTTI NiSCMExtraData::m_RTTI; // idb
NiRTTI NiRenderedCubeMap::m_RTTI; // idb
NiRTTI NiCursor::m_RTTI; // idb
struct NiDX9Renderer *NSBUtility::ms_pkD3DRenderer; // weak
NiRTTI NiBinaryShader::m_RTTI; // idb
_UNKNOWN NiD3DSCM_Pixel::ms_afObjectData; // weak
void *off_B671EC = &loc_75E1FD; // weak
char aUnknownErrorCo[19] = "Unknown error code"; // weak
char LibFileName[] = "user32"; // idb
char ProcName[] = "MessageBoxA"; // idb
char aPeekmessagea[] = "PeekMessageA"; // idb
char aPostquitmessag[] = "PostQuitMessage"; // idb
char aWsprintfa[] = "wsprintfA"; // idb
char aAdvapi32[] = "advapi32"; // idb
char aRegopenkeyexa[] = "RegOpenKeyExA"; // idb
char aRegqueryvaluee[] = "RegQueryValueExA"; // idb
char aRegclosekey[] = "RegCloseKey"; // idb
_UNKNOWN unk_B67C80; // weak
_UNKNOWN unk_B67D40; // weak
_UNKNOWN unk_B67E00; // weak
_UNKNOWN unk_B67E40; // weak
_UNKNOWN unk_B67E80; // weak
_UNKNOWN unk_B67E90; // weak
_UNKNOWN unk_B67E9C; // weak
_UNKNOWN unk_B67EAC; // weak
_UNKNOWN unk_B67EBC; // weak
_UNKNOWN unk_B67EC8; // weak
int izigzag_index[] = { 0 }; // weak
int dword_B67EE4[] = { 1 }; // weak
int dword_B67EE8[] = { 8 }; // weak
int dword_B67EEC[] = { 16 }; // weak
int onlynbits[] = { 0 }; // weak
_WORD lowest_coef[32] =
{
  0,
  0,
  65535,
  65535,
  65533,
  65535,
  65529,
  65535,
  65521,
  65535,
  65505,
  65535,
  65473,
  65535,
  65409,
  65535,
  65281,
  65535,
  65025,
  65535,
  64513,
  65535,
  63489,
  65535,
  61441,
  65535,
  57345,
  65535,
  49153,
  65535,
  32769,
  65535
}; // idb
int twoexpnminusone[] = { 0 }; // weak
int dword_B68220[] = { 4096 }; // weak
int dword_B68224[] = { 2953 }; // weak
double dbl_B68340[] = {  0.125 }; // weak
double dbl_B68348[] = {  0.17338 }; // weak
double dbl_B68350[] = {  0.17338 }; // weak
double dbl_B68358[] = {  0.16332 }; // weak
double dbl_B68540 =  32768.0; // weak
double dbl_B68548 =  0.0625; // weak
double dbl_B68550 =  0.5; // weak
char byte_B68560[] = { '\0' }; // weak
char byte_B68660[] = { '\0' }; // weak
_DWORD dword_B688E0[4] = { 0, 0, 0, 0 }; // idb
_UNKNOWN unk_B688F0; // weak
_UNKNOWN unk_B688F8; // weak
_UNKNOWN unk_B68908; // weak
_UNKNOWN unk_B68910; // weak
_UNKNOWN unk_B68920; // weak
_UNKNOWN unk_B68928; // weak
_UNKNOWN unk_B68938; // weak
int dword_B68948 = 0; // weak
int dword_B6894C = 0; // weak
int dword_B68950 = 16; // weak
int dword_B68954 = 16; // weak
int dword_B68958 = 0; // weak
int dword_B6895C = 0; // weak
int dword_B68960 = 16; // weak
int dword_B68964 = 16; // weak
int dword_B68968 = 0; // weak
int dword_B6896C = 0; // weak
int dword_B68970 = 8; // weak
int dword_B68974 = 8; // weak
int dword_B68978 = 0; // weak
int dword_B6897C = 0; // weak
int dword_B68980 = 8; // weak
int dword_B68984 = 8; // weak
int dword_B68988 = 0; // weak
int dword_B6898C = 0; // weak
int dword_B68990 = 16; // weak
int dword_B68994 = 8; // weak
int dword_B68998 = 0; // weak
int dword_B6899C = 0; // weak
int dword_B689A0 = 16; // weak
int dword_B689A4 = 8; // weak
int dword_B689A8 = 0; // weak
int dword_B689AC = 0; // weak
int dword_B689B0 = 8; // weak
int dword_B689B4 = 8; // weak
int dword_B689B8 = 0; // weak
int dword_B689BC = 0; // weak
int dword_B689C0 = 16; // weak
int dword_B689C4 = 8; // weak
int dword_B689C8 = 0; // weak
int dword_B689CC = 0; // weak
int dword_B689D0 = 16; // weak
int dword_B689D4 = 16; // weak
int dword_B689D8 = 0; // weak
int dword_B689DC = 0; // weak
int dword_B689E0 = 8; // weak
int dword_B689E4 = 8; // weak
int dword_B689E8 = 0; // weak
int dword_B689EC = 0; // weak
int dword_B689F0 = 16; // weak
int dword_B689F4 = 8; // weak
int dword_B689F8 = 0; // weak
int dword_B689FC = 0; // weak
int dword_B68A00 = 16; // weak
int dword_B68A04 = 16; // weak
int dword_B68A08 = 0; // weak
int dword_B68A0C = 0; // weak
int dword_B68A10 = 8; // weak
int dword_B68A14 = 8; // weak
int dword_B68A18 = 0; // weak
int dword_B68A1C = 0; // weak
int dword_B68A20 = 8; // weak
int dword_B68A24 = 8; // weak
int dword_B68A28 = 0; // weak
int dword_B68A2C = 0; // weak
int dword_B68A30 = 8; // weak
int dword_B68A34 = 8; // weak
int dword_B68A38 = 0; // weak
int dword_B68A3C = 0; // weak
int dword_B68A40 = 16; // weak
int dword_B68A44 = 16; // weak
int dword_B68A48 = 0; // weak
int dword_B68A4C = 0; // weak
int dword_B68A50 = 16; // weak
int dword_B68A54 = 8; // weak
int dword_B68A58 = 0; // weak
int dword_B68A5C = 0; // weak
int dword_B68A60 = 16; // weak
int dword_B68A64 = 8; // weak
int dword_B68A68 = 0; // weak
int dword_B68A6C = 0; // weak
int dword_B68A70 = 8; // weak
int dword_B68A74 = 8; // weak
char aIntelRJpegLibr[34] = "Intel(R) JPEG Library, version %s"; // weak


//----- (00401000) --------------------------------------------------------
void AnimationMD5Checksum::AnimationMD5Checksum()
{
  ;
}

//----- (00401020) --------------------------------------------------------
void __cdecl AnimationMD5Checksum::CheckAniFileMD5(Name8 MD5Hash, Name8 Subdir, Name60Byte FileName)
{
  unsigned int v3; // eax@1
  char *v4; // edi@1
  char v5; // cl@2
  char *v6; // edi@3
  char v7; // al@4
  unsigned int v8; // eax@5
  char *v9; // edi@5
  char v10; // cl@6
  const char *v11; // eax@9
  const char *v12; // eax@9
  _iobuf *v13; // eax@11
  _iobuf *v14; // esi@11
  int v15; // eax@12
  unsigned int v16; // edi@12
  void *v17; // ebx@12
  const char *v18; // ecx@12
  char *v19; // eax@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > Path; // [sp+10h] [bp-1BCh]@1
  char Filepath[255]; // [sp+2Ch] [bp-1A0h]@1
  char file[65]; // [sp+12Ch] [bp-A0h]@1
  char hash[32]; // [sp+170h] [bp-5Ch]@1
  char v24; // [sp+190h] [bp-3Ch]@1
  _BYTE striAniFileMD5[32]; // [sp+194h] [bp-38h]@1
  unsigned int v26; // [sp+1B4h] [bp-18h]@1
  int v27; // [sp+1C8h] [bp-4h]@9

  *(Name8 *)striAniFileMD5 = Subdir;
  *(Name60Byte *)file = FileName;
  *(Name8 *)hash = MD5Hash;
  LOBYTE(v26) = 0;
  file[60] = 0;
  v24 = 0;
  strcpy(Filepath, "\\");
  v3 = strlen(striAniFileMD5) + 1;
  v4 = (char *)(&Path._Alval + 3);
  do
    v5 = (v4++)[1];
  while ( v5 );
  qmemcpy(v4, striAniFileMD5, v3);
  v6 = (char *)(&Path._Alval + 3);
  do
    v7 = (v6++)[1];
  while ( v7 );
  *(_WORD *)v6 = 92;
  v8 = strlen(file) + 1;
  v9 = (char *)(&Path._Alval + 3);
  do
    v10 = (v9++)[1];
  while ( v10 );
  qmemcpy(v9, file, v8);
  if ( !Folder::m_bInit )
    Folder::Init();
  Path._Myres = 15;
  Path._Mysize = 0;
  Path._Bx._Buf[0] = 0;
  v11 = Folder::Merge(&Folder::m_acCharacter, Filepath);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Path, v11, strlen(v11));
  v12 = Path._Bx._Ptr;
  v27 = 0;
  if ( Path._Myres < 0x10 )
    v12 = (const char *)&Path;
  v13 = fopen(v12, "rb");
  v14 = v13;
  if ( v13 )
  {
    v15 = _fileno(v13);
    v16 = _filelength(v15);
    v17 = operator new[](v16);
    fread(v17, v16, 1u, v14);
    fclose(v14);
    CMD5Checksum::GetMD5(
      (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&striAniFileMD5[12],
      (char *)v17,
      v16);
    v18 = *(const char **)&striAniFileMD5[12];
    if ( v26 < 0x10 )
      v18 = &striAniFileMD5[12];
    if ( !strcmp(hash, v18) )
    {
      if ( v26 >= 0x10 )
        operator delete(*(void **)&striAniFileMD5[12]);
      v26 = 15;
      *(_DWORD *)&striAniFileMD5[28] = 0;
      striAniFileMD5[12] = 0;
      if ( Path._Myres >= 0x10 )
        operator delete(Path._Bx._Ptr);
      return;
    }
    free(v17);
    if ( v26 >= 0x10 )
      operator delete(*(void **)&striAniFileMD5[12]);
  }
  PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, AccountFrameWorkID);
  v19 = fs(
          "thanks for changing file '%s'. unfortunately we do not support editing animation files anymore. please reinsta"
          "ll your client. kind regards, your fiesta team.",
          file);
  MsgBox::Modal(MSGBOX_OK, v19);
  AccountFrameWork::OnWrongVersionMsgClose();
  if ( Path._Myres >= 0x10 )
    operator delete(Path._Bx._Ptr);
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00401380) --------------------------------------------------------
std::bad_alloc *__thiscall std::bad_alloc::`vector deleting destructor'(std::bad_alloc *this, unsigned int a2)
{
  std::bad_alloc *v2; // esi@1

  v2 = this;
  this->vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
  std::exception::~exception((std::bad_cast *)this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (004013B0) --------------------------------------------------------
char *__cdecl Folder::Character()
{
  if ( !Folder::m_bInit )
    Folder::Init();
  return &Folder::m_acCharacter;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004013D0) --------------------------------------------------------
char *__cdecl Folder::Merge(char *pcPath, char *pcFile)
{
  strcpy(&Folder::m_acMerge, pcPath);
  return strcat(&Folder::m_acMerge, pcFile);
}

//----- (00401430) --------------------------------------------------------
void __thiscall std::bad_alloc::bad_alloc(std::bad_alloc *this, std::bad_alloc *__that)
{
  std::bad_alloc *v2; // esi@1

  v2 = this;
  std::exception::exception((std::exception *)&this->vfptr, (std::exception *)&__that->vfptr);
  v2->vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00401450) --------------------------------------------------------
const char *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::c_str(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this)
{
  const char *result; // eax@1

  result = (const char *)this;
  if ( this->_Myres >= 0x10 )
    result = this->_Bx._Ptr;
  return result;
}

//----- (00401460) --------------------------------------------------------
void __thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Tidy(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, bool _Built, unsigned int _Newsize)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // esi@1
  char *v4; // ebx@3

  v3 = this;
  if ( _Built && this->_Myres >= 0x10 )
  {
    v4 = this->_Bx._Ptr;
    if ( _Newsize )
      memcpy(this->_Bx._Buf, v4, _Newsize);
    operator delete(v4);
  }
  v3->_Mysize = _Newsize;
  v3->_Myres = 15;
  v3->_Bx._Buf[_Newsize] = 0;
}

//----- (004014B0) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::erase(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int _Off, unsigned int _Count)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // esi@1
  unsigned int v4; // eax@1
  unsigned int v5; // edi@3
  unsigned int v6; // eax@3
  unsigned int v7; // edx@6
  char *v8; // ebx@7
  char *v9; // edx@10
  int v10; // eax@12
  bool v11; // cf@12

  v3 = this;
  v4 = this->_Mysize;
  if ( v4 < _Off )
    std::_Xout_of_range("invalid string position");
  v5 = _Count;
  v6 = v4 - _Off;
  if ( v6 < _Count )
    v5 = v6;
  if ( v5 )
  {
    v7 = this->_Myres;
    if ( v7 < 0x10 )
      v8 = (char *)this;
    else
      v8 = this->_Bx._Ptr;
    if ( v7 < 0x10 )
      v9 = (char *)this;
    else
      v9 = this->_Bx._Ptr;
    memmove(&v9[_Off], &v8[_Off] + v5, v6 - v5);
    v10 = v3->_Mysize - v5;
    v11 = v3->_Myres < 0x10;
    v3->_Mysize = v10;
    if ( !v11 )
    {
      v3->_Bx._Ptr[v10] = 0;
      return v3;
    }
    v3->_Bx._Buf[v10] = 0;
  }
  return v3;
}

//----- (00401540) --------------------------------------------------------
char *__stdcall std::allocator<char>::allocate(unsigned int _Count)
{
  char *result; // eax@1
  std::exception pExceptionObject; // [sp+0h] [bp-Ch]@4

  result = 0;
  if ( _Count )
  {
    if ( _Count > 0xFFFFFFFF || (result = (char *)operator new(_Count)) == 0 )
    {
      _Count = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&_Count);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
  }
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00401590) --------------------------------------------------------
void __thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Copy(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int _Newsize, unsigned int _Oldlen)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // edi@1
  unsigned int v4; // esi@1
  unsigned int v5; // ebx@3
  unsigned int v6; // ecx@3
  char *v7; // eax@6
  char *v8; // eax@14
  int v9; // [sp+0h] [bp-38h]@1
  std::exception pExceptionObject; // [sp+10h] [bp-28h]@10
  char *_What; // [sp+20h] [bp-18h]@10
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v12; // [sp+24h] [bp-14h]@1
  int *v13; // [sp+28h] [bp-10h]@1
  int v14; // [sp+34h] [bp-4h]@6
  char *_Ptr; // [sp+40h] [bp+8h]@9

  v13 = &v9;
  v3 = this;
  v12 = this;
  v4 = _Newsize | 0xF;
  if ( (_Newsize | 0xF) <= 0xFFFFFFFE )
  {
    v5 = this->_Myres;
    v6 = this->_Myres >> 1;
    if ( v6 > v4 / 3 )
    {
      v4 = v6 + v5;
      if ( v5 > -2 - v6 )
        v4 = -2;
    }
  }
  else
  {
    v4 = _Newsize;
  }
  v7 = 0;
  v14 = 0;
  if ( v4 != -1 )
  {
    if ( v4 + 1 > 0xFFFFFFFF || (v7 = (char *)operator new(v4 + 1)) == 0 )
    {
      _What = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&_What);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
  }
  _Ptr = v7;
  if ( _Oldlen )
  {
    if ( v3->_Myres < 0x10 )
      v8 = (char *)v3;
    else
      v8 = v3->_Bx._Ptr;
    memcpy(_Ptr, v8, _Oldlen);
  }
  if ( v3->_Myres >= 0x10 )
    operator delete(v3->_Bx._Ptr);
  v3->_Bx._Buf[0] = 0;
  v3->_Bx._Ptr = _Ptr;
  v3->_Myres = v4;
  v3->_Mysize = _Oldlen;
  if ( v4 >= 0x10 )
    v3 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)_Ptr;
  v3->_Bx._Buf[_Oldlen] = 0;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00401700) --------------------------------------------------------
int __thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Grow(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int _Newsize, bool _Trim)
{
  unsigned int v3; // ebx@1
  _DWORD *v4; // esi@1
  unsigned int v5; // eax@3
  int result; // eax@4
  unsigned int v7; // edi@7
  char *v8; // ebx@10

  v3 = _Newsize;
  v4 = this;
  if ( _Newsize > 0xFFFFFFFE )
    std::_Xlength_error("string too long");
  v5 = this->_Myres;
  if ( v5 >= _Newsize )
  {
    if ( _Trim && _Newsize < 0x10 )
    {
      v7 = this->_Mysize;
      if ( _Newsize < v7 )
        v7 = _Newsize;
      if ( v5 >= 0x10 )
      {
        v8 = this->_Bx._Ptr;
        if ( v7 )
          memcpy(this->_Bx._Buf, v8, v7);
        operator delete(v8);
        v3 = _Newsize;
      }
      v4[4] = v7;
      v4[5] = 15;
      *((_BYTE *)v4 + v7) = 0;
      result = v3 > 0;
    }
    else
    {
      if ( !_Newsize )
      {
        this->_Mysize = 0;
        if ( v5 >= 0x10 )
          v4 = this->_Bx._Ptr;
        *(_BYTE *)v4 = 0;
      }
      result = _Newsize > 0;
    }
  }
  else
  {
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Copy(this, _Newsize, this->_Mysize);
    result = _Newsize > 0;
  }
  return result;
}

//----- (004017B0) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Right, unsigned int _Roff, unsigned int _Count)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v4; // esi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v5; // ecx@1
  unsigned int v6; // edi@1
  unsigned int v7; // edi@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result; // eax@6
  unsigned int v9; // eax@9
  char *v10; // eax@14
  bool v11; // cf@20

  v4 = this;
  v5 = _Right;
  v6 = _Right->_Mysize;
  if ( v6 < _Roff )
    std::_Xout_of_range("invalid string position");
  v7 = v6 - _Roff;
  if ( _Count < v7 )
    v7 = _Count;
  if ( v4 == _Right )
  {
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::erase(v4, _Roff + v7, 0xFFFFFFFF);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::erase(v4, 0, _Roff);
    return v4;
  }
  if ( v7 > 0xFFFFFFFE )
    std::_Xlength_error("string too long");
  v9 = v4->_Myres;
  if ( v9 < v7 )
  {
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Copy(v4, v7, v4->_Mysize);
    v5 = _Right;
    if ( !v7 )
      return v4;
LABEL_11:
    if ( v5->_Myres >= 0x10 )
      v5 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v5->_Bx._Ptr;
    if ( v4->_Myres < 0x10 )
      v10 = (char *)v4;
    else
      v10 = v4->_Bx._Ptr;
    memcpy(v10, (char *)v5 + _Roff, v7);
    v11 = v4->_Myres < 0x10;
    v4->_Mysize = v7;
    if ( !v11 )
    {
      v4->_Bx._Ptr[v7] = 0;
      return v4;
    }
    v4->_Bx._Buf[v7] = 0;
    return v4;
  }
  if ( v7 )
    goto LABEL_11;
  v4->_Mysize = 0;
  if ( v9 < 0x10 )
  {
    result = v4;
    v4->_Bx._Buf[0] = 0;
  }
  else
  {
    *v4->_Bx._Ptr = 0;
    result = v4;
  }
  return result;
}

//----- (004018A0) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, const char *_Ptr, unsigned int _Count)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // esi@1
  unsigned int v4; // ecx@2
  unsigned int v5; // eax@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v6; // eax@7
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result; // eax@11
  unsigned int v8; // eax@15
  char *v9; // eax@18
  bool v10; // cf@24

  v3 = this;
  if ( _Ptr )
  {
    v4 = this->_Myres;
    v5 = (unsigned int)(v4 < 0x10 ? v3 : v3->_Bx._Ptr);
    if ( (unsigned int)_Ptr >= v5 )
    {
      v6 = v4 < 0x10 ? v3 : v3->_Bx._Ptr;
      if ( (char *)v6 + v3->_Mysize > _Ptr )
      {
        if ( v4 < 0x10 )
          result = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                     v3,
                     v3,
                     _Ptr - (const char *)v3,
                     _Count);
        else
          result = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                     v3,
                     v3,
                     _Ptr - v3->_Bx._Ptr,
                     _Count);
        return result;
      }
    }
  }
  if ( _Count > 0xFFFFFFFE )
    std::_Xlength_error("string too long");
  v8 = v3->_Myres;
  if ( v8 < _Count )
  {
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Copy(v3, _Count, v3->_Mysize);
    if ( !_Count )
      return v3;
LABEL_17:
    if ( v3->_Myres < 0x10 )
      v9 = (char *)v3;
    else
      v9 = v3->_Bx._Ptr;
    memcpy(v9, (char *)_Ptr, _Count);
    v10 = v3->_Myres < 0x10;
    v3->_Mysize = _Count;
    if ( !v10 )
    {
      v3->_Bx._Ptr[_Count] = 0;
      return v3;
    }
    v3->_Bx._Buf[_Count] = 0;
    return v3;
  }
  if ( _Count )
    goto LABEL_17;
  v3->_Mysize = 0;
  if ( v8 < 0x10 )
  {
    result = v3;
    v3->_Bx._Buf[0] = 0;
  }
  else
  {
    *v3->_Bx._Ptr = 0;
    result = v3;
  }
  return result;
}

//----- (004019A0) --------------------------------------------------------
void __thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, const char *_Ptr)
{
  this->_Myres = 15;
  this->_Mysize = 0;
  this->_Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(this, _Ptr, strlen(_Ptr));
}

//----- (004019E0) --------------------------------------------------------
void __thiscall Argv::~Argv(Argv *this)
{
  this->vfptr = (ArgvVtbl *)&Argv::`vftable';
}
// 96E5C8: using guessed type int (__thiscall *Argv::`vftable')(void *p, char);

//----- (004019F0) --------------------------------------------------------
char *__thiscall Argv::GetMerge(Argv *this, char *filename)
{
  char *result; // eax@1
  char *v3; // edx@1
  signed int v4; // esi@1
  char v5; // cl@2
  unsigned int v6; // edx@3
  char *v7; // edi@3
  char v8; // cl@4

  result = this->m_Merge;
  v3 = this->m_Path;
  v4 = this->m_Merge - this->m_Path;
  do
  {
    v5 = *v3;
    v3[v4] = *v3;
    ++v3;
  }
  while ( v5 );
  v6 = strlen(filename) + 1;
  v7 = result - 1;
  do
    v8 = (v7++)[1];
  while ( v8 );
  qmemcpy(v7, filename, v6);
  return result;
}

//----- (00401A40) --------------------------------------------------------
void __thiscall Argv::Init(Argv *this)
{
  Argv *v1; // esi@1
  const char *v2; // edi@1
  char *v3; // eax@1
  int v4; // esi@3
  char v5; // cl@4
  int v6; // eax@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strFileaName; // [sp+10h] [bp-12Ch]@1
  char szExt[128]; // [sp+2Ch] [bp-110h]@1
  char szFileName[128]; // [sp+ACh] [bp-90h]@1
  int v10; // [sp+138h] [bp-4h]@1

  v1 = this;
  v2 = this->m_Path;
  GetModuleFileNameA(0, this->m_Path, 0x104u);
  _splitpath(v2, 0, 0, szFileName, szExt);
  strFileaName._Myres = 15;
  strFileaName._Mysize = 0;
  strFileaName._Bx._Buf[0] = 0;
  v10 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
    &strFileaName,
    szFileName,
    strlen(szFileName));
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strFileaName, szExt, strlen(szExt));
  v3 = strFileaName._Bx._Ptr;
  if ( strFileaName._Myres < 0x10 )
    v3 = (char *)&strFileaName;
  v4 = (char *)v1 - v3;
  do
  {
    v5 = *v3;
    v3[v4 + 780] = *v3;
    ++v3;
  }
  while ( v5 );
  strrchr((char *)v2, 92);
  *(_BYTE *)(v6 + 1) = 0;
  if ( strFileaName._Myres >= 0x10 )
    operator delete(strFileaName._Bx._Ptr);
}

//----- (00401B90) --------------------------------------------------------
Argv *__thiscall Argv::`vector deleting destructor'(Argv *this, unsigned int a2)
{
  Argv *v2; // esi@1

  v2 = this;
  this->vfptr = (ArgvVtbl *)&Argv::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 96E5C8: using guessed type int (__thiscall *Argv::`vftable')(void *p, char);

//----- (00401BC0) --------------------------------------------------------
void __thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this)
{
  this->_Myres = 15;
  this->_Mysize = 0;
  this->_Bx._Buf[0] = 0;
}

//----- (00401BE0) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Right, unsigned int _Roff, unsigned int _Count)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v4; // edx@1
  unsigned int v5; // eax@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v6; // esi@1
  unsigned int v7; // ebx@3
  unsigned int v8; // eax@3
  unsigned int v9; // eax@5
  unsigned int v10; // edi@8
  unsigned int v11; // ecx@10
  char *v12; // ecx@13
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result; // eax@16
  char *v14; // eax@20
  bool v15; // cf@22

  v4 = _Right;
  v5 = _Right->_Mysize;
  v6 = this;
  if ( v5 < _Roff )
    std::_Xout_of_range("invalid string position");
  v7 = _Count;
  v8 = v5 - _Roff;
  if ( v8 < _Count )
    v7 = v8;
  v9 = this->_Mysize;
  if ( -1 - v9 <= v7 )
    std::_Xlength_error("string too long");
  if ( !v7 )
    return v6;
  v10 = v9 + v7;
  if ( v9 + v7 > 0xFFFFFFFE )
    std::_Xlength_error("string too long");
  v11 = this->_Myres;
  if ( v11 < v10 )
  {
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Copy(v6, v9 + v7, v9);
    v4 = _Right;
    if ( v10 )
    {
LABEL_12:
      if ( v4->_Myres < 0x10 )
        v12 = (char *)v4;
      else
        v12 = v4->_Bx._Ptr;
      if ( v6->_Myres < 0x10 )
        v14 = (char *)v6;
      else
        v14 = v6->_Bx._Ptr;
      memcpy(&v14[v6->_Mysize], &v12[_Roff], v7);
      v15 = v6->_Myres < 0x10;
      v6->_Mysize = v10;
      if ( !v15 )
      {
        v6->_Bx._Ptr[v10] = 0;
        return v6;
      }
      v6->_Bx._Buf[v10] = 0;
    }
    return v6;
  }
  if ( v10 )
    goto LABEL_12;
  v6->_Mysize = 0;
  if ( v11 < 0x10 )
  {
    result = v6;
    v6->_Bx._Buf[0] = 0;
  }
  else
  {
    *v6->_Bx._Ptr = 0;
    result = v6;
  }
  return result;
}

//----- (00401CD0) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, const char *_Ptr, unsigned int _Count)
{
  char *v3; // edx@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v4; // esi@1
  unsigned int v5; // ecx@2
  unsigned int v6; // eax@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v7; // eax@7
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result; // eax@11
  unsigned int v9; // eax@13
  unsigned int v10; // edi@16
  unsigned int v11; // ecx@18
  char *v12; // eax@21
  bool v13; // cf@27

  v3 = (char *)_Ptr;
  v4 = this;
  if ( _Ptr )
  {
    v5 = this->_Myres;
    v6 = (unsigned int)(v5 < 0x10 ? v4 : v4->_Bx._Ptr);
    if ( (unsigned int)_Ptr >= v6 )
    {
      v7 = v5 < 0x10 ? v4 : v4->_Bx._Ptr;
      if ( (char *)v7 + v4->_Mysize > _Ptr )
      {
        if ( v5 < 0x10 )
          result = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
                     v4,
                     v4,
                     _Ptr - (const char *)v4,
                     _Count);
        else
          result = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
                     v4,
                     v4,
                     _Ptr - v4->_Bx._Ptr,
                     _Count);
        return result;
      }
    }
  }
  v9 = v4->_Mysize;
  if ( -1 - v9 <= _Count )
    std::_Xlength_error("string too long");
  if ( !_Count )
    return v4;
  v10 = v9 + _Count;
  if ( v9 + _Count > 0xFFFFFFFE )
    std::_Xlength_error("string too long");
  v11 = v4->_Myres;
  if ( v11 < v10 )
  {
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Copy(v4, v9 + _Count, v9);
    v3 = (char *)_Ptr;
    if ( v10 )
    {
LABEL_20:
      if ( v4->_Myres < 0x10 )
        v12 = (char *)v4;
      else
        v12 = v4->_Bx._Ptr;
      memcpy(&v12[v4->_Mysize], v3, _Count);
      v13 = v4->_Myres < 0x10;
      v4->_Mysize = v10;
      if ( !v13 )
      {
        v4->_Bx._Ptr[v10] = 0;
        return v4;
      }
      v4->_Bx._Buf[v10] = 0;
    }
    return v4;
  }
  if ( v10 )
    goto LABEL_20;
  v4->_Mysize = 0;
  if ( v11 < 0x10 )
  {
    result = v4;
    v4->_Bx._Buf[0] = 0;
  }
  else
  {
    *v4->_Bx._Ptr = 0;
    result = v4;
  }
  return result;
}

//----- (00401DF0) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, const char *_Ptr)
{
  return std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(this, _Ptr, strlen(_Ptr));
}

//----- (00401E20) --------------------------------------------------------
void __thiscall BoxAnnounceWin::BoxAnnounceWin(BoxAnnounceWin *this)
{
  BoxAnnounceWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_fStartTime = 0.0;
  v1->m_pkSprWin = 0;
  v1->m_fLifeTime = 0.0;
  v1->m_pkMsg = 0;
  v1->m_bEnableLifeTime = 0;
  v1->vfptr = (NiRefObjectVtbl *)&BoxAnnounceWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&BoxAnnounceWin::`vftable'{for `IDirectMessenger'};
}
// 96E5E0: using guessed type void (__thiscall *BoxAnnounceWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 96E5FC: using guessed type int (__thiscall *BoxAnnounceWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00401E60) --------------------------------------------------------
void __thiscall BoxAnnounceWin::~BoxAnnounceWin(BoxAnnounceWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&BoxAnnounceWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&BoxAnnounceWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 96E5E0: using guessed type void (__thiscall *BoxAnnounceWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 96E5FC: using guessed type int (__thiscall *BoxAnnounceWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00401E80) --------------------------------------------------------
void __thiscall BoxAnnounceWin::SetMsg(BoxAnnounceWin *this, const char *pcMsg)
{
  BoxAnnounceWin *v2; // esi@1
  int v3; // edi@3
  tagSIZE kSize; // [sp+24h] [bp-8h]@3

  v2 = this;
  if ( this->m_pkSprWin )
  {
    if ( this->m_pkMsg )
    {
      ((void (__stdcall *)(_DWORD))this->m_pkMsg->vfptr[118].__vecDelDtor)(pcMsg);
      ((void (__stdcall *)(_DWORD))v2->m_pkMsg->vfptr[123].__vecDelDtor)(&kSize);
      v3 = kSize.cx + 30;
      ((void (__stdcall *)(_DWORD))v2->m_pkMsg->vfptr[38].__vecDelDtor)(kSize.cx + 30);
      ((void (__stdcall *)(_DWORD))v2->m_pkMsg->vfptr[122].__vecDelDtor)(5);
      ((void (__stdcall *)(_DWORD))v2->m_pkSprWin->vfptr[117].__vecDelDtor)(v3);
      ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
        v2,
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        0.5,
        0.28);
    }
  }
}

//----- (00401F40) --------------------------------------------------------
char __thiscall BoxAnnounceWin::Create(BoxAnnounceWin *this, PgFrameWork *pkFrameWork)
{
  BoxAnnounceWin *v2; // esi@1
  char result; // al@2
  PgFont *v4; // eax@3
  unsigned int v5; // ST1C_4@4
  NiSourceTexture *v6; // eax@4
  PgWinSpr *v7; // eax@4
  PgWinSpr *v8; // edi@4
  PgWin *v9; // ST20_4@4
  PgFont *v10; // ST1C_4@4
  unsigned int v11; // ST18_4@4
  unsigned int v12; // eax@4
  PgWinText *v13; // eax@4

  v2 = this;
  if ( PgWinFrame::Create((PgWinFrame *)&this->vfptr, 0, 0, 0, pkFrameWork, "BoxAnnounceWin", 0)
    && (v4 = Font::Get(BOLD)) != 0 )
  {
    v5 = 3 * v4->m_uiDefHeight;
    v6 = PgUtil::Create1PixelSourceTexture(0, 0, 0, -1);
    v7 = PgWinSpr::CreateWin(v6, 0, 0, 0x64u, v5, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkSprWin = v7;
    v7->vfptr[60].__vecDelDtor((NiRefObject *)v7, 0);
    ((void (__stdcall *)(_DWORD))v2->m_pkSprWin->vfptr[69].__vecDelDtor)(0.5);
    v8 = v2->m_pkSprWin;
    v9 = (PgWin *)&v2->m_pkSprWin->vfptr;
    v10 = Font::Get(BOLD);
    v11 = ((int (__thiscall *)(_DWORD))v8->vfptr[37].__vecDelDtor)(v8);
    v12 = ((int (__thiscall *)(_DWORD))v8->vfptr[36].__vecDelDtor)(v8);
    v13 = PgWinText::CreateWin(0, 0, v12, v11, v10, v9, 0, 0);
    v2->m_pkMsg = v13;
    v13->vfptr[122].__vecDelDtor((NiRefObject *)v13, 5u);
    ((void (__stdcall *)(_DWORD))v2->m_pkMsg->vfptr[60].__vecDelDtor)(0);
    v2->vfptr[60].__vecDelDtor((NiRefObject *)v2, 0);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00402050) --------------------------------------------------------
void __thiscall BoxAnnounceWin::UpdateMeWin(BoxAnnounceWin *this, float fCurTime)
{
  if ( this->m_bEnableLifeTime )
  {
    if ( this->m_fLifeTime + this->m_fStartTime < Timer::ms_fCurTime )
    {
      this->m_bEnableLifeTime = 0;
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00402090) --------------------------------------------------------
void __thiscall BoxAnnounceWin::SetLifeTime(BoxAnnounceWin *this, float fLifeTime)
{
  this->m_bEnableLifeTime = 1;
  this->m_fStartTime = Timer::ms_fCurTime;
  this->m_fLifeTime = fLifeTime;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004020C0) --------------------------------------------------------
BoxAnnounceWin *__cdecl BoxAnnounceWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  BoxAnnounceWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x16Cu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2[1].m_kLocal.m_Rotate.m_pEntry[1][1] = 0.0;
    v2->vfptr = (NiRefObjectVtbl *)&BoxAnnounceWin::`vftable'{for `NiNode'};
    v2[1].m_kLocal.m_Rotate.m_pEntry[1][2] = 0.0;
    v2->vfptr = (IDirectMessengerVtbl *)&BoxAnnounceWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
    LOBYTE(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (BoxAnnounceWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 96E5E0: using guessed type void (__thiscall *BoxAnnounceWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 96E5FC: using guessed type int (__thiscall *BoxAnnounceWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00402220) --------------------------------------------------------
void __thiscall NiRefObject::DecRefCount(NiRefObject *this)
{
  NiRefObject *v1; // esi@1

  v1 = this;
  if ( !InterlockedDecrement((volatile LONG *)&this->m_uiRefCount) )
  {
    if ( v1 )
      v1->vfptr->__vecDelDtor(v1, 1u);
  }
}

//----- (00402250) --------------------------------------------------------
char __thiscall NiObject::IsKindOf(NiObject *this, NiRTTI *pkRTTI)
{
  NiRTTI *v2; // eax@1
  char result; // al@4

  v2 = (NiRTTI *)((int (*)(void))this->vfptr[1].__vecDelDtor)();
  if ( v2 )
  {
    while ( v2 != pkRTTI )
    {
      v2 = v2->m_pkBaseRTTI;
      if ( !v2 )
        goto LABEL_4;
    }
    result = 1;
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}

//----- (00402280) --------------------------------------------------------
void __thiscall NiAVObject::SetAppCulled(NiAVObject *this, bool bAppCulled)
{
  if ( bAppCulled )
    this->m_uFlags |= 1u;
  else
    this->m_uFlags &= 0xFFFEu;
}

//----- (004022A0) --------------------------------------------------------
void __cdecl PgScreenXY::GetBoxClipLeftTop(unsigned int uiScreenCx, unsigned int uiScreenCy, unsigned int uiBoxCx, unsigned int uiBoxCy, float fCenterXRate, float fCenterYRate, int *iBoxLeft, int *iBoxTop)
{
  *iBoxLeft = (signed int)((double)(uiScreenCx - 1) * fCenterXRate);
  *iBoxTop = (signed int)((double)(uiScreenCy - 1) * fCenterYRate);
  *iBoxLeft -= uiBoxCx >> 1;
  *iBoxTop -= uiBoxCy >> 1;
  if ( *iBoxLeft < 0 )
    *iBoxLeft = 0;
  if ( *iBoxTop < 0 )
    *iBoxTop = 0;
  if ( uiBoxCx + *iBoxLeft > uiScreenCx )
    *iBoxLeft = uiScreenCx - uiBoxCx;
  if ( uiBoxCy + *iBoxTop > uiScreenCy )
    *iBoxTop = uiScreenCy - uiBoxCy;
}

//----- (00402340) --------------------------------------------------------
void __thiscall NiD3DShaderProgramCreatorAsm::SetShaderCreationFlags(NiD3DShaderProgramCreatorAsm *this, unsigned int uiFlags)
{
  this->m_uiShaderCreationFlags = uiFlags;
}

//----- (00402350) --------------------------------------------------------
NiRTTI *PgWin::GetRTTI()
{
  return &PgWin::m_RTTI;
}

//----- (00402360) --------------------------------------------------------
void __thiscall PgWin::SetWinName(PgWin *this, const char *pcWinText)
{
  NiObjectNET::SetName((NiObjectNET *)&this->vfptr, pcWinText);
}

//----- (00402370) --------------------------------------------------------
unsigned int __usercall PgWin::GetWidth@<eax>(PgWin *this@<ecx>, double a2@<st0>)
{
  PgWin *v2; // esi@1

  v2 = this;
  ((void (*)(void))this->vfptr[72].__vecDelDtor)();
  return (signed __int64)(a2 * (double)v2->m_uiWidth);
}

//----- (004023C0) --------------------------------------------------------
unsigned int __usercall PgWin::GetHeight@<eax>(PgWin *this@<ecx>, double a2@<st0>)
{
  PgWin *v2; // esi@1

  v2 = this;
  ((void (*)(void))this->vfptr[72].__vecDelDtor)();
  return (signed __int64)(a2 * (double)v2->m_uiHeight);
}

//----- (00402410) --------------------------------------------------------
void __thiscall PgWin::SetHeight(PgWinSpr *this, unsigned int uiHeight)
{
  this->m_iHeight = uiHeight;
}

//----- (00402420) --------------------------------------------------------
void __thiscall PgWin::GetWinSize(PgWin *this, unsigned int *uiWidth, unsigned int *uiHeight)
{
  PgWin *v3; // esi@1

  v3 = this;
  *uiWidth = ((int (*)(void))this->vfptr[36].__vecDelDtor)();
  *uiHeight = ((int (__thiscall *)(_DWORD))v3->vfptr[37].__vecDelDtor)(v3);
}

//----- (00402450) --------------------------------------------------------
void __thiscall PgWin::GetWinRect(PgWin *this, tagRECT *kRect)
{
  PgWin *v2; // esi@1

  v2 = this;
  kRect->left = 0;
  kRect->top = 0;
  kRect->right = ((int (*)(void))this->vfptr[36].__vecDelDtor)() - 1;
  kRect->bottom = ((int (__thiscall *)(_DWORD))v2->vfptr[37].__vecDelDtor)(v2) - 1;
}

//----- (00402490) --------------------------------------------------------
void __thiscall PgWin::GetWinRect(PgWin *this, NiRect<int> *kRect)
{
  PgWin *v2; // esi@1

  v2 = this;
  kRect->m_left = 0;
  kRect->m_top = 0;
  kRect->m_right = ((int (*)(void))this->vfptr[36].__vecDelDtor)() - 1;
  kRect->m_bottom = ((int (__thiscall *)(_DWORD))v2->vfptr[37].__vecDelDtor)(v2) - 1;
}

//----- (004024D0) --------------------------------------------------------
int __thiscall PgWin::GetLeftPos(PgWin *this)
{
  return ((int (*)(void))this->vfptr[41].__vecDelDtor)();
}

//----- (004024E0) --------------------------------------------------------
int __thiscall PgWin::GetRightPos(PgWin *this)
{
  PgWin *v1; // esi@1
  int v2; // edi@1

  v1 = this;
  v2 = ((int (*)(void))this->vfptr[41].__vecDelDtor)() - 1;
  return v2 + ((int (__thiscall *)(PgWin *))v1->vfptr[36].__vecDelDtor)(v1);
}

//----- (00402510) --------------------------------------------------------
int __thiscall PgWin::GetTopPos(PgWin *this)
{
  return ((int (*)(void))this->vfptr[42].__vecDelDtor)();
}

//----- (00402520) --------------------------------------------------------
int __thiscall PgWin::GetBottomPos(PgWin *this)
{
  PgWin *v1; // esi@1
  int v2; // edi@1

  v1 = this;
  v2 = ((int (*)(void))this->vfptr[42].__vecDelDtor)() - 1;
  return v2 + ((int (__thiscall *)(PgWin *))v1->vfptr[37].__vecDelDtor)(v1);
}

//----- (00402550) --------------------------------------------------------
int __thiscall PgWin::GetXPos(PgWin *this)
{
  return (signed int)this->m_kLocal.m_Translate.x;
}

//----- (00402560) --------------------------------------------------------
int __thiscall PgWin::GetYPos(PgWin *this)
{
  return (signed int)this->m_kLocal.m_Translate.y;
}

//----- (00402570) --------------------------------------------------------
void __thiscall PgWin::SetXPos(PgWin *this, int iXPos)
{
  this->m_kLocal.m_Translate.x = (double)iXPos;
}

//----- (00402580) --------------------------------------------------------
void __thiscall PgWin::SetYPos(PgWin *this, int iYPos)
{
  this->m_kLocal.m_Translate.y = (double)iYPos;
}

//----- (00402590) --------------------------------------------------------
void __thiscall PgWin::GetWinPos(PgWin *this, int *iXPos, int *iYPos)
{
  PgWin *v3; // esi@1

  v3 = this;
  *iXPos = ((int (*)(void))this->vfptr[41].__vecDelDtor)();
  *iYPos = ((int (__thiscall *)(_DWORD))v3->vfptr[42].__vecDelDtor)(v3);
}

//----- (004025C0) --------------------------------------------------------
void __thiscall PgWin::GetWinScreenRect(PgWin *this, tagRECT *kRect)
{
  PgWin *v2; // esi@1

  v2 = this;
  ((void (__stdcall *)(_DWORD, _DWORD))this->vfptr[53].__vecDelDtor)(kRect, &kRect->top);
  kRect->right = ((int (__thiscall *)(_DWORD))v2->vfptr[36].__vecDelDtor)(v2) + kRect->left - 1;
  kRect->bottom = ((int (__thiscall *)(_DWORD))v2->vfptr[37].__vecDelDtor)(v2) + kRect->top - 1;
}

//----- (00402610) --------------------------------------------------------
void __thiscall PgWin::ClientToScreen(PgWin *this, int *iClientX, int *iClientY)
{
  int iY; // [sp+0h] [bp-8h]@1
  int iX; // [sp+4h] [bp-4h]@1

  ((void (__stdcall *)(_DWORD, _DWORD))this->vfptr[53].__vecDelDtor)(&iX, &iY);
  *iClientX += iX;
  *iClientY += iY;
}

//----- (00402640) --------------------------------------------------------
void __thiscall PgWin::ScreenToClient(PgWin *this, int *iScreenX, int *iScreenY)
{
  int iY; // [sp+0h] [bp-8h]@1
  int iX; // [sp+4h] [bp-4h]@1

  ((void (__stdcall *)(_DWORD, _DWORD))this->vfptr[53].__vecDelDtor)(&iX, &iY);
  *iScreenX -= iX;
  *iScreenY -= iY;
}

//----- (00402670) --------------------------------------------------------
void __thiscall PgWin::Enable(PgWin *this, bool b)
{
  this->m_bEnable = b;
}

//----- (00402680) --------------------------------------------------------
bool __thiscall PgWin::GetEnable(PgWin *this)
{
  return this->m_bEnable;
}

//----- (00402690) --------------------------------------------------------
void __thiscall PgWin::Show(PgWin *this, bool b)
{
  if ( b )
    this->m_uFlags &= 0xFFFEu;
  else
    this->m_uFlags |= 1u;
}

//----- (004026B0) --------------------------------------------------------
int __thiscall PgWin::GetShow(PgWin *this)
{
  return ~LOBYTE(this->m_uFlags) & 1;
}

//----- (004026C0) --------------------------------------------------------
void __thiscall PgWin::SetScale(PgWin *this, float fScale)
{
  double v2; // st6@1

  v2 = fScale;
  if ( fScale < 0.0 )
    v2 = (float)0.0;
  if ( v2 != this->m_kLocal.m_fScale )
  {
    this->m_kLocal.m_fScale = v2;
    NiAVObject::Update((NiAVObject *)&this->vfptr, 0.0, 0);
  }
}

//----- (00402710) --------------------------------------------------------
double __thiscall PgWin::GetScale(PgWin *this)
{
  return this->m_kLocal.m_fScale;
}

//----- (00402720) --------------------------------------------------------
void __thiscall PgWin::SetZRotate(PgWin *this, float fangle)
{
  PgWin *v2; // esi@1

  v2 = this;
  NiMatrix3::MakeZRotation(&this->m_kLocal.m_Rotate, fangle);
  NiAVObject::Update((NiAVObject *)&v2->vfptr, 0.0, 0);
}

//----- (00402750) --------------------------------------------------------
void __thiscall PgWin::SetRotate(PgWin *this, NiMatrix3 *kMat)
{
  qmemcpy(&this->m_kLocal, kMat, 0x24u);
}

//----- (00402770) --------------------------------------------------------
void __thiscall PgWin::SetExtStyle(PgWin *this, unsigned int uiExtstyle)
{
  this->m_uiExtStyle = uiExtstyle;
}

//----- (00402780) --------------------------------------------------------
unsigned int __thiscall PgWin::GetExtStyle(PgWin *this)
{
  return this->m_uiExtStyle;
}

//----- (00402790) --------------------------------------------------------
void __thiscall PgWin::MoveWin(PgWin *this, int iXPos, int iYPos)
{
  PgWin *v3; // esi@1

  v3 = this;
  ((void (__stdcall *)(_DWORD))this->vfptr[43].__vecDelDtor)(iXPos);
  v3->vfptr[44].__vecDelDtor((NiRefObject *)v3, iYPos);
  NiAVObject::Update((NiAVObject *)&v3->vfptr, 0.0, 0);
}

//----- (004027D0) --------------------------------------------------------
int __thiscall PgWin::HitTestEx(PgWin *this, int iSx, int iSy)
{
  return ((int (__stdcall *)(_DWORD, _DWORD))this->vfptr[87].__vecDelDtor)(iSx, iSy);
}

//----- (004027E0) --------------------------------------------------------
bool __thiscall PgWin::HitTest(PgWin *this, int iSx, int iSy)
{
  PgWin *v3; // esi@1
  int v4; // eax@2
  int v5; // eax@4
  bool result; // al@5

  v3 = this;
  ((void (__stdcall *)(int *, int *))this->vfptr[56].__vecDelDtor)(&iSx, &iSy);
  result = 0;
  if ( iSx >= 0 )
  {
    v4 = ((int (__thiscall *)(PgWin *))v3->vfptr[36].__vecDelDtor)(v3);
    if ( iSx < v4 && iSy >= 0 )
    {
      v5 = ((int (__thiscall *)(PgWin *))v3->vfptr[37].__vecDelDtor)(v3);
      if ( iSy < v5 )
        result = 1;
    }
  }
  return result;
}

//----- (00402840) --------------------------------------------------------
char __thiscall PgWin::HitTest(PgWin *this, int iSx, int iSy, int *iClientAreaX, int *iClientAreaY)
{
  PgWin *v5; // esi@1
  int v6; // eax@2
  int v7; // eax@4
  int v8; // eax@5
  int v9; // eax@5
  char result; // al@5

  v5 = this;
  ((void (__stdcall *)(_DWORD, _DWORD))this->vfptr[56].__vecDelDtor)(&iSx, &iSy);
  if ( iSx < 0
    || (v6 = ((int (__thiscall *)(_DWORD))v5->vfptr[36].__vecDelDtor)(v5), iSx >= v6)
    || iSy < 0
    || (v7 = ((int (__thiscall *)(_DWORD))v5->vfptr[37].__vecDelDtor)(v5), iSy >= v7) )
  {
    result = 0;
  }
  else
  {
    v8 = ((int (__thiscall *)(_DWORD))v5->vfptr[41].__vecDelDtor)(v5);
    *iClientAreaX = iSx - v8;
    v9 = ((int (__thiscall *)(_DWORD))v5->vfptr[42].__vecDelDtor)(v5);
    *iClientAreaY = iSy - v9;
    result = 1;
  }
  return result;
}

//----- (004028D0) --------------------------------------------------------
char __thiscall PgWin::ProcessMeDrop(PgWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  PgWin *v4; // esi@1
  char result; // al@2

  v4 = this;
  if ( (unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD, _DWORD))this->vfptr[102].__vecDelDtor)(
                          pkDrop,
                          iDropXPos,
                          iDropYPos) )
  {
    ((void (__stdcall *)(_DWORD))(*pkDrop)->m_pkSender->vfptr[104].__vecDelDtor)(pkDrop);
    result = 1;
  }
  else if ( (unsigned __int8)((int (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD))v4->vfptr[103].__vecDelDtor)(
                               v4,
                               pkDrop,
                               iDropXPos,
                               iDropYPos) )
  {
    ((void (__stdcall *)(_DWORD))(*pkDrop)->m_pkSender->vfptr[105].__vecDelDtor)(pkDrop);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00402950) --------------------------------------------------------
bool __thiscall PgWin::GetRegisterFirstHit(PgWin *this)
{
  return this->m_bResigterFirstHit;
}

//----- (00402960) --------------------------------------------------------
void __thiscall PgWin::SetRegisterFirstHit(PgWin *this, bool b)
{
  this->m_bResigterFirstHit = b;
}

//----- (00402970) --------------------------------------------------------
bool __thiscall PgSprData::PgHitTester::HitTest(PgSprData::PgHitTester *this, int iXPos, int iYPos)
{
  unsigned int v3; // esi@1
  signed int v4; // ebx@1
  unsigned int v5; // eax@1
  char *v6; // edi@5
  bool result; // al@6

  v3 = this->m_uiWidth;
  v4 = (signed int)((double)this->m_uiWidth / (double)this->m_uiChangedWidth * (double)iXPos);
  v5 = (signed int)((double)this->m_uiHeight / (double)this->m_uiChangedHeight * (double)iYPos);
  if ( v4 < 0 || (v5 & 0x80000000) != 0 || v4 >= v3 || v5 >= this->m_uiHeight )
  {
    result = 0;
  }
  else
  {
    v6 = this->m_pucBuff;
    if ( v6 )
      result = *(&v6[v5 * v3] + v4) != 0;
    else
      result = 1;
  }
  return result;
}

//----- (00402A20) --------------------------------------------------------
unsigned int __thiscall PgWinSpr::GetSelectSprIndex(PgWinSpr *this)
{
  return this->m_uiSelectSprIndex;
}

//----- (00402A30) --------------------------------------------------------
void __thiscall PgWinFrame::SetMovable(PgWinFrame *this, bool b)
{
  this->m_bMovable = b;
}

//----- (00402A40) --------------------------------------------------------
bool __thiscall PgWinFrame::GetMovable(PgWinFrame *this)
{
  return this->m_bMovable;
}

//----- (00402A50) --------------------------------------------------------
BoxAnnounceWin *__thiscall BoxAnnounceWin::`scalar deleting destructor'(BoxAnnounceWin *this, unsigned int a2)
{
  BoxAnnounceWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&BoxAnnounceWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&BoxAnnounceWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 96E5E0: using guessed type void (__thiscall *BoxAnnounceWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 96E5FC: using guessed type int (__thiscall *BoxAnnounceWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00402A90) --------------------------------------------------------
char __cdecl NiObject::IsKindOf(NiRTTI *pkRTTI, NiObject *pkObject)
{
  NiRTTI *v2; // eax@2
  char result; // al@5

  if ( pkObject && (v2 = (NiRTTI *)((int (*)(void))pkObject->vfptr[1].__vecDelDtor)()) != 0 )
  {
    while ( v2 != pkRTTI )
    {
      v2 = v2->m_pkBaseRTTI;
      if ( !v2 )
        goto LABEL_5;
    }
    result = 1;
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (00402AC0) --------------------------------------------------------
PgWin *__thiscall PgWin::GetParentWin(PgWin *this)
{
  PgWin *v1; // esi@1
  PgWin *result; // eax@2
  NiRTTI *v3; // eax@3

  v1 = (PgWin *)this->m_pkParent;
  if ( v1 )
  {
    v3 = (NiRTTI *)((int (__thiscall *)(NiNode *))v1->vfptr[1].__vecDelDtor)(this->m_pkParent);
    if ( v3 )
    {
      while ( v3 != &PgWin::m_RTTI )
      {
        v3 = v3->m_pkBaseRTTI;
        if ( !v3 )
          goto LABEL_6;
      }
      result = v1;
    }
    else
    {
LABEL_6:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00402B10) --------------------------------------------------------
PgWin *__thiscall PgWin::GetNextChildWin(PgWin *this, unsigned int *uiPos)
{
  PgWin *v2; // ebx@1
  PgWin *v3; // esi@2
  NiRTTI *v4; // eax@3
  PgWin *result; // eax@7

  v2 = this;
  if ( *uiPos >= this->m_kChildren.m_uiSize )
  {
LABEL_7:
    result = 0;
  }
  else
  {
    while ( 1 )
    {
      v3 = (PgWin *)v2->m_kChildren.m_pBase[*uiPos].m_pObject;
      if ( v3 )
      {
        v4 = (NiRTTI *)((int (__thiscall *)(PgWin *))v3->vfptr[1].__vecDelDtor)(v3);
        if ( v4 )
          break;
      }
LABEL_6:
      if ( ++*uiPos >= v2->m_kChildren.m_uiSize )
        goto LABEL_7;
    }
    while ( v4 != &PgWin::m_RTTI )
    {
      v4 = v4->m_pkBaseRTTI;
      if ( !v4 )
        goto LABEL_6;
    }
    ++*uiPos;
    result = v3;
  }
  return result;
}

//----- (00402B70) --------------------------------------------------------
void __thiscall PgWin::GetWinRectWithChild(PgWin *this, NiRect<int> *kRect)
{
  PgWin *v2; // esi@1
  void *(__thiscall *v3)(NiRefObject *, unsigned int); // edx@1
  NiRect<int> *v4; // edi@1
  PgWin *i; // esi@1
  int v6; // ebx@2
  int v7; // eax@2
  int v8; // ecx@2
  int v9; // esi@2
  int v10; // eax@2
  int v11; // edx@2
  int v12; // eax@4
  int v13; // eax@6
  int v14; // ecx@8
  int v15; // eax@8
  PgWin *v16; // ecx@10
  NiRect<int> kChildRect; // [sp+Ch] [bp-14h]@2
  PgWin *v18; // [sp+1Ch] [bp-4h]@1

  v2 = this;
  v3 = this->vfptr[46].__vecDelDtor;
  v4 = kRect;
  v18 = this;
  ((void (__stdcall *)(_DWORD))v3)(kRect);
  kRect = 0;
  for ( i = PgWin::GetNextChildWin(v2, (unsigned int *)&kRect); i; i = PgWin::GetNextChildWin(
                                                                         v16,
                                                                         (unsigned int *)&kRect) )
  {
    kChildRect.m_left = 0;
    kChildRect.m_right = 0;
    kChildRect.m_top = 0;
    kChildRect.m_bottom = 0;
    i->vfptr[52].__vecDelDtor((NiRefObject *)i, (unsigned int)&kChildRect);
    v6 = ((int (__thiscall *)(_DWORD))i->vfptr[42].__vecDelDtor)(i);
    v7 = ((int (__thiscall *)(_DWORD))i->vfptr[41].__vecDelDtor)(i);
    kChildRect.m_bottom += v6;
    v8 = v7 + kChildRect.m_left;
    v9 = v7 + kChildRect.m_right;
    v10 = v4->m_left;
    v11 = v6 + kChildRect.m_top;
    kChildRect.m_left = v8;
    kChildRect.m_right = v9;
    kChildRect.m_top += v6;
    if ( v10 > v8 )
      v10 = v8;
    v4->m_left = v10;
    v12 = v4->m_top;
    if ( v12 > v11 )
      v12 = v11;
    v4->m_top = v12;
    v13 = v4->m_right;
    if ( v13 < v9 )
      v13 = v9;
    v14 = kChildRect.m_bottom;
    v4->m_right = v13;
    v15 = v4->m_bottom;
    if ( v15 < v14 )
      v15 = v14;
    v16 = v18;
    v4->m_bottom = v15;
  }
}

//----- (00402C50) --------------------------------------------------------
void __thiscall PgWin::GetWinScreenPos(PgWin *this, int *iSx, int *iSy)
{
  PgWin *v3; // esi@1
  PgWin *v4; // esi@1
  NiNode *v5; // esi@2
  PgWin *v6; // eax@3
  NiRTTI *v7; // eax@4
  char v8; // al@7
  int iParentY; // [sp+4h] [bp-10h]@2
  int iParentX; // [sp+8h] [bp-Ch]@2
  int iMyY; // [sp+Ch] [bp-8h]@1
  int iMyX; // [sp+10h] [bp-4h]@1

  v3 = this;
  ((void (__stdcall *)(_DWORD, _DWORD))this->vfptr[45].__vecDelDtor)(&iMyX, &iMyY);
  v4 = PgWin::GetParentWin(v3);
  if ( v4 )
  {
    do
    {
      ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v4->vfptr[45].__vecDelDtor)(v4, &iParentX, &iParentY);
      iMyX += iParentX;
      iMyY += iParentY;
      v5 = v4->m_pkParent;
      if ( v5 )
      {
        v7 = (NiRTTI *)((int (__thiscall *)(_DWORD))v5->vfptr[1].__vecDelDtor)(v5);
        if ( v7 )
        {
          while ( v7 != &PgWin::m_RTTI )
          {
            v7 = v7->m_pkBaseRTTI;
            if ( !v7 )
              goto LABEL_7;
          }
          v8 = 1;
        }
        else
        {
LABEL_7:
          v8 = 0;
        }
        v6 = (PgWin *)(v8 != 0 ? (unsigned int)v5 : 0);
      }
      else
      {
        v6 = 0;
      }
      v4 = v6;
    }
    while ( v6 );
    *iSx = iMyX;
    *iSy = iMyY;
  }
  else
  {
    *iSx = iMyX;
    *iSy = iMyY;
  }
}

//----- (00402D10) --------------------------------------------------------
void __thiscall PgWin::InitPos(PgWin *this, unsigned int uiScreenWidth, unsigned int uiScreenHeight, float fXPosRate, float fYPosRate)
{
  PgWin *v5; // esi@1
  NiRect<int> kRect; // [sp+18h] [bp-10h]@1

  v5 = this;
  kRect.m_left = 0;
  kRect.m_right = 0;
  kRect.m_top = 0;
  kRect.m_bottom = 0;
  ((void (__stdcall *)(_DWORD))this->vfptr[52].__vecDelDtor)(&kRect);
  PgScreenXY::GetBoxClipLeftTop(
    uiScreenWidth,
    uiScreenHeight,
    kRect.m_right - kRect.m_left + 1,
    kRect.m_bottom - kRect.m_top + 1,
    fXPosRate,
    fYPosRate,
    (int *)&fXPosRate,
    (int *)&fYPosRate);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v5->vfptr[77].__vecDelDtor)(v5, LODWORD(fXPosRate), LODWORD(fYPosRate));
}

//----- (00402D90) --------------------------------------------------------
void __thiscall PgWin::InitPos(PgWin *this, unsigned int uiScreenWidth, unsigned int uiScreenHeight, int iXPos, float fYPosRate)
{
  PgWin *v5; // esi@1
  NiRect<int> kRect; // [sp+18h] [bp-10h]@1

  v5 = this;
  kRect.m_left = 0;
  kRect.m_right = 0;
  kRect.m_top = 0;
  kRect.m_bottom = 0;
  ((void (__stdcall *)(_DWORD))this->vfptr[52].__vecDelDtor)(&kRect);
  PgScreenXY::GetBoxClipLeftTop(
    uiScreenWidth,
    uiScreenHeight,
    kRect.m_right - kRect.m_left + 1,
    kRect.m_bottom - kRect.m_top + 1,
    0.0,
    fYPosRate,
    (int *)&uiScreenHeight,
    (int *)&fYPosRate);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v5->vfptr[77].__vecDelDtor)(v5, iXPos, LODWORD(fYPosRate));
}

//----- (00402E10) --------------------------------------------------------
void __thiscall PgWin::InitPos(PgWin *this, unsigned int uiScreenWidth, unsigned int uiScreenHeight, float fXPosRate, int iYPos)
{
  PgWin *v5; // esi@1
  NiRect<int> kRect; // [sp+18h] [bp-10h]@1

  v5 = this;
  kRect.m_left = 0;
  kRect.m_right = 0;
  kRect.m_top = 0;
  kRect.m_bottom = 0;
  ((void (__stdcall *)(_DWORD))this->vfptr[52].__vecDelDtor)(&kRect);
  PgScreenXY::GetBoxClipLeftTop(
    uiScreenWidth,
    uiScreenHeight,
    kRect.m_right - kRect.m_left + 1,
    kRect.m_bottom - kRect.m_top + 1,
    fXPosRate,
    0.0,
    (int *)&fXPosRate,
    (int *)&uiScreenHeight);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v5->vfptr[77].__vecDelDtor)(v5, LODWORD(fXPosRate), iYPos);
}

//----- (00402E90) --------------------------------------------------------
void __thiscall PgWin::EnableChildWin(PgWin *this, int b)
{
  PgWin *v2; // ebx@1
  PgWin *v3; // esi@1
  unsigned int i; // edi@2
  NiRTTI *v5; // eax@5
  unsigned int uiPos; // [sp+8h] [bp-4h]@1

  v2 = this;
  uiPos = 0;
  v3 = PgWin::GetNextChildWin(this, &uiPos);
  if ( v3 )
  {
    for ( i = uiPos; ; ++i )
    {
      v3->vfptr[60].__vecDelDtor((NiRefObject *)v3, b);
      v3->vfptr[62].__vecDelDtor((NiRefObject *)v3, b);
      if ( i >= v2->m_kChildren.m_uiSize )
        break;
      while ( 1 )
      {
        v3 = (PgWin *)v2->m_kChildren.m_pBase[i].m_pObject;
        if ( v3 )
        {
          v5 = (NiRTTI *)((int (__thiscall *)(_DWORD))v3->vfptr[1].__vecDelDtor)(v3);
          if ( v5 )
            break;
        }
LABEL_8:
        if ( ++i >= v2->m_kChildren.m_uiSize )
          return;
      }
      while ( v5 != &PgWin::m_RTTI )
      {
        v5 = v5->m_pkBaseRTTI;
        if ( !v5 )
          goto LABEL_8;
      }
    }
  }
}

//----- (00402F30) --------------------------------------------------------
bool __thiscall PgWin::IsInputPossible(PgWin *this)
{
  PgWin *v1; // esi@1

  v1 = this;
  return (unsigned __int8)((int (*)(void))this->vfptr[61].__vecDelDtor)()
      && PgWin::IsVisible(v1)
      && (!PgWin::ms_pkCapture || PgWin::ms_pkCapture == v1);
}

//----- (00402F70) --------------------------------------------------------
bool __userpurge PgWinSpr::HitTest@<al>(PgWinSpr *this@<ecx>, int a2@<ebx>, int a3@<edi>, double a4@<st0>, int iSx, int iSy)
{
  PgWinSpr *v6; // esi@1
  void *(__thiscall *v7)(NiRefObject *, unsigned int); // edx@2
  int v8; // eax@3
  int v9; // eax@5
  bool result; // al@6
  void *(__thiscall *v11)(NiRefObject *, unsigned int); // eax@9
  PgSpr *v12; // edi@9
  int v13; // ebx@9
  void *(__thiscall *v14)(NiRefObject *, unsigned int); // eax@9
  PgSprData::PgHitTester *v15; // ecx@9
  double v16; // [sp+4h] [bp-Ch]@9
  double v17; // [sp+4h] [bp-Ch]@9
  double v18; // [sp+4h] [bp-Ch]@11
  int v19; // [sp+Ch] [bp-4h]@2

  v6 = this;
  if ( !this->m_spSpr.m_pObject )
  {
    v7 = this->vfptr[56].__vecDelDtor;
    HIDWORD(v16) = iSy;
    v19 = iSx;
    ((void (__stdcall *)(int *, char *))v7)(&v19, (char *)&v16 + 4);
    if ( v19 >= 0 )
    {
      v8 = ((int (__thiscall *)(PgWinSpr *))v6->vfptr[36].__vecDelDtor)(v6);
      if ( v19 < v8 && SHIDWORD(v16) >= 0 )
      {
        v9 = ((int (__thiscall *)(PgWinSpr *))v6->vfptr[37].__vecDelDtor)(v6);
        if ( SHIDWORD(v16) < v9 )
          return 1;
      }
    }
    return 0;
  }
  ((void (*)(void))this->vfptr[72].__vecDelDtor)();
  if ( a4 <= 0.0 )
    return 0;
  ((void (__thiscall *)(PgWinSpr *, int *, int *, int, int))v6->vfptr[56].__vecDelDtor)(v6, &iSx, &iSy, a3, a2);
  v11 = v6->vfptr[72].__vecDelDtor;
  v12 = v6->m_spSpr.m_pObject;
  v16 = (double)iSy;
  ((void (__thiscall *)(PgWinSpr *))v11)(v6);
  v13 = (signed int)(v16 / v16);
  v14 = v6->vfptr[72].__vecDelDtor;
  v17 = (double)iSx;
  ((void (__thiscall *)(PgWinSpr *))v14)(v6);
  v15 = v12->m_spSprData.m_pObject->m_akHitTester.m_pBase[v6->m_uiSelectSprIndex].m_pObject;
  if ( v15 )
    result = PgSprData::PgHitTester::HitTest(v15, (signed int)(v18 / v18), v13);
  else
    result = 0;
  return result;
}

//----- (00403080) --------------------------------------------------------
char __userpurge PgWinSpr::HitTest@<al>(PgWinSpr *this@<ecx>, int a2@<ebx>, int a3@<edi>, double a4@<st0>, int iSx, int iSy, int *iClientAreaX, int *iClientAreaY)
{
  PgWinSpr *v8; // esi@1
  char result; // al@2
  double v10; // st7@5
  PgSpr *v11; // edi@5
  PgSprData::PgHitTester *v12; // ecx@5
  int v13; // eax@7
  int v14; // eax@7
  double v15; // [sp+4h] [bp-8h]@5

  v8 = this;
  if ( this->m_spSpr.m_pObject )
  {
    ((void (*)(void))this->vfptr[72].__vecDelDtor)();
    if ( a4 > 0.0 )
    {
      ((void (__thiscall *)(PgWinSpr *, int *, int *, int, int))v8->vfptr[56].__vecDelDtor)(v8, &iSx, &iSy, a3, a2);
      v10 = (double)iSy;
      v11 = v8->m_spSpr.m_pObject;
      ((void (__thiscall *)(PgWinSpr *))v8->vfptr[72].__vecDelDtor)(v8);
      v15 = (double)iSx;
      ((void (__thiscall *)(PgWinSpr *))v8->vfptr[72].__vecDelDtor)(v8);
      v12 = v11->m_spSprData.m_pObject->m_akHitTester.m_pBase[v8->m_uiSelectSprIndex].m_pObject;
      if ( v12 && PgSprData::PgHitTester::HitTest(v12, (signed int)(v15 / v15), (signed int)(v10 / v10)) )
      {
        v13 = ((int (__thiscall *)(PgWinSpr *))v8->vfptr[41].__vecDelDtor)(v8);
        *iClientAreaX = iSx + v13;
        v14 = ((int (__thiscall *)(PgWinSpr *))v8->vfptr[42].__vecDelDtor)(v8);
        *iClientAreaY = iSy + v14;
        result = 1;
      }
      else
      {
        result = 0;
      }
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = PgWin::HitTest((PgWin *)&this->vfptr, iSx, iSy, iClientAreaX, iClientAreaY);
  }
  return result;
}

//----- (00403180) --------------------------------------------------------
unsigned int __usercall PgWinSpr::GetWidth@<eax>(PgWinSpr *this@<ecx>, double a2@<st0>)
{
  PgWinSpr *v2; // esi@1
  unsigned int v3; // ecx@1
  PgSpr *v4; // eax@2
  unsigned int result; // eax@3

  v2 = this;
  v3 = this->m_uiSelectSprIndex;
  if ( v3 != -1 && (v4 = v2->m_spSpr.m_pObject) != 0 )
  {
    result = PgSprData::GetChangedWidth(v4->m_spSprData.m_pObject, v3);
  }
  else
  {
    ((void (__thiscall *)(PgWinSpr *))v2->vfptr[72].__vecDelDtor)(v2);
    result = (signed __int64)(a2 * (double)v2->m_uiWidth);
  }
  return result;
}

//----- (00403200) --------------------------------------------------------
unsigned int __usercall PgWinSpr::GetHeight@<eax>(PgWinSpr *this@<ecx>, double a2@<st0>)
{
  PgWinSpr *v2; // esi@1
  unsigned int v3; // ecx@1
  PgSpr *v4; // eax@2
  unsigned int result; // eax@3

  v2 = this;
  v3 = this->m_uiSelectSprIndex;
  if ( v3 != -1 && (v4 = v2->m_spSpr.m_pObject) != 0 )
  {
    result = PgSprData::GetChangedHeight(v4->m_spSprData.m_pObject, v3);
  }
  else
  {
    ((void (__thiscall *)(PgWinSpr *))v2->vfptr[72].__vecDelDtor)(v2);
    result = (signed __int64)(a2 * (double)v2->m_uiHeight);
  }
  return result;
}

//----- (00403280) --------------------------------------------------------
void __thiscall PgWinSpr::SetWidth(PgWinSpr *this, unsigned int uiWidth)
{
  this->m_iWidth = uiWidth;
}

//----- (00403290) --------------------------------------------------------
int __thiscall PgWinSpr::GetChangedWidth(PgWinSpr *this)
{
  unsigned int v1; // edx@1
  PgSpr *v2; // eax@2
  int result; // eax@3

  v1 = this->m_uiSelectSprIndex;
  if ( v1 != -1 && (v2 = this->m_spSpr.m_pObject) != 0 )
    result = PgSprData::GetChangedWidth(v2->m_spSprData.m_pObject, v1);
  else
    result = ((int (*)(void))this->vfptr[36].__vecDelDtor)();
  return result;
}

//----- (004032C0) --------------------------------------------------------
int __thiscall PgWinSpr::GetChangedHeight(PgWinSpr *this)
{
  unsigned int v1; // edx@1
  PgSpr *v2; // eax@2
  int result; // eax@3

  v1 = this->m_uiSelectSprIndex;
  if ( v1 != -1 && (v2 = this->m_spSpr.m_pObject) != 0 )
    result = PgSprData::GetChangedHeight(v2->m_spSprData.m_pObject, v1);
  else
    result = ((int (*)(void))this->vfptr[37].__vecDelDtor)();
  return result;
}

//----- (004032F0) --------------------------------------------------------
void __thiscall PgWinSpr::ChangeWidth(PgWinSpr *this, unsigned int uiWidth)
{
  PgWinSpr *v2; // esi@1
  unsigned int v3; // ecx@1
  PgSpr *v4; // eax@2

  v2 = this;
  v3 = this->m_uiSelectSprIndex;
  if ( v3 != -1 )
  {
    v4 = v2->m_spSpr.m_pObject;
    if ( v4 )
    {
      PgSprData::ChangeWidth(v4->m_spSprData.m_pObject, v3, uiWidth);
      NiAVObject::Update((NiAVObject *)&v2->vfptr, 0.0, 0);
    }
  }
}

//----- (00403330) --------------------------------------------------------
void __thiscall PgWinSpr::ChangeHeight(PgWinSpr *this, unsigned int uiHeight)
{
  PgWinSpr *v2; // esi@1
  unsigned int v3; // ecx@1
  PgSpr *v4; // eax@2

  v2 = this;
  v3 = this->m_uiSelectSprIndex;
  if ( v3 != -1 )
  {
    v4 = v2->m_spSpr.m_pObject;
    if ( v4 )
    {
      PgSprData::ChangeHeight(v4->m_spSprData.m_pObject, v3, uiHeight);
      NiAVObject::Update((NiAVObject *)&v2->vfptr, 0.0, 0);
    }
  }
}

//----- (00403370) --------------------------------------------------------
void __thiscall PgWinSpr::ResetChangedWidth(PgWinSpr *this)
{
  PgWinSpr *v1; // esi@1
  unsigned int v2; // ecx@1
  PgSpr *v3; // eax@2

  v1 = this;
  v2 = this->m_uiSelectSprIndex;
  if ( v2 != -1 )
  {
    v3 = v1->m_spSpr.m_pObject;
    if ( v3 )
    {
      PgSprData::ResetChangedWidth(v3->m_spSprData.m_pObject, v2);
      NiAVObject::Update((NiAVObject *)&v1->vfptr, 0.0, 0);
    }
  }
}

//----- (004033B0) --------------------------------------------------------
void __thiscall PgWinSpr::ResetChangedHeight(PgWinSpr *this)
{
  PgWinSpr *v1; // esi@1
  unsigned int v2; // ecx@1
  PgSpr *v3; // eax@2

  v1 = this;
  v2 = this->m_uiSelectSprIndex;
  if ( v2 != -1 )
  {
    v3 = v1->m_spSpr.m_pObject;
    if ( v3 )
    {
      PgSprData::ResetChangedHeight(v3->m_spSprData.m_pObject, v2);
      NiAVObject::Update((NiAVObject *)&v1->vfptr, 0.0, 0);
    }
  }
}

//----- (004033F0) --------------------------------------------------------
void __thiscall PgWinSpr::ChangeWidthWithUV(PgWinSpr *this, unsigned int uiWidth, bool bReverse)
{
  PgWinSpr *v3; // esi@1
  unsigned int v4; // ecx@1
  PgSpr *v5; // eax@2

  v3 = this;
  v4 = this->m_uiSelectSprIndex;
  if ( v4 != -1 )
  {
    v5 = v3->m_spSpr.m_pObject;
    if ( v5 )
    {
      PgSprData::ChangeWidthWithUV(v5->m_spSprData.m_pObject, v4, uiWidth, bReverse);
      NiAVObject::Update((NiAVObject *)&v3->vfptr, 0.0, 0);
    }
  }
}

//----- (00403430) --------------------------------------------------------
void __thiscall PgWinSpr::ChangeHeightWithUV(PgWinSpr *this, unsigned int uiHeight, bool bReverse)
{
  PgWinSpr *v3; // esi@1
  unsigned int v4; // ecx@1
  PgSpr *v5; // eax@2

  v3 = this;
  v4 = this->m_uiSelectSprIndex;
  if ( v4 != -1 )
  {
    v5 = v3->m_spSpr.m_pObject;
    if ( v5 )
    {
      PgSprData::ChangeHeightWithUV(v5->m_spSprData.m_pObject, v4, uiHeight, bReverse);
      NiAVObject::Update((NiAVObject *)&v3->vfptr, 0.0, 0);
    }
  }
}

//----- (00403470) --------------------------------------------------------
void __thiscall PgWinSpr::SetTexture(PgWinSpr *this, NiTexture *pkTexture)
{
  PgSpr *v2; // ecx@1

  v2 = this->m_spSpr.m_pObject;
  if ( v2 )
    PgSpr::SetTexture(v2, pkTexture);
}

//----- (00403490) --------------------------------------------------------
NiSourceTexture *__thiscall PgWinSpr::GetTexture(PgWinSpr *this)
{
  PgSpr *v1; // ecx@1
  NiSourceTexture *result; // eax@2

  v1 = this->m_spSpr.m_pObject;
  if ( v1 )
    result = PgSpr::GetTexture(v1);
  else
    result = 0;
  return result;
}

//----- (004034B0) --------------------------------------------------------
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *this, NiPointer<NiRoom> *element)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *v2; // esi@1
  int v3; // edi@1
  NiRoom *v4; // ebx@1
  NiRoom *v5; // eax@6
  NiTListItem<NiPointer<NiRoom> > *v6; // eax@8

  v2 = this;
  v3 = ((int (*)(void))this->vfptr->NewItem)();
  v4 = *(NiRoom **)(v3 + 8);
  if ( v4 != element->m_pObject )
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v5 = element->m_pObject;
    *(NiPointer<NiRoom> *)(v3 + 8) = (NiPointer<NiRoom>)element->m_pObject;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  }
  *(_DWORD *)(v3 + 4) = 0;
  *(_DWORD *)v3 = v2->m_pkHead;
  v6 = v2->m_pkHead;
  if ( v6 )
  {
    v6->m_pkPrev = (NiTListItem<NiPointer<NiRoom> > *)v3;
    ++v2->m_kAllocator.m_uiCount;
    v2->m_pkHead = (NiTListItem<NiPointer<NiRoom> > *)v3;
  }
  else
  {
    ++v2->m_kAllocator.m_uiCount;
    v2->m_pkTail = (NiTListItem<NiPointer<NiRoom> > *)v3;
    v2->m_pkHead = (NiTListItem<NiPointer<NiRoom> > *)v3;
  }
}

//----- (00403540) --------------------------------------------------------
NiTListItem<PgWin *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWin *>::FindPos(NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWin *> *this, PgWin *const *element, void *kStart)
{
  NiTListItem<PgWin *> *v3; // edx@1
  PgWin *const *v4; // ecx@3
  NiTListItem<PgWin *> *result; // eax@3

  v3 = (NiTListItem<PgWin *> *)kStart;
  if ( kStart || (v3 = this->m_pkHead) != 0 )
  {
    while ( 1 )
    {
      v4 = &v3->m_element;
      result = v3;
      v3 = v3->m_pkNext;
      if ( *element == *v4 )
        break;
      if ( !v3 )
        goto LABEL_5;
    }
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (00403570) --------------------------------------------------------
void __thiscall NiAVObject::AttachProperty(NiAVObject *this, NiProperty *pkProperty)
{
  NiAVObject *v2; // edi@1
  NiProperty *v3; // esi@1

  v2 = this;
  v3 = pkProperty;
  if ( pkProperty )
    InterlockedIncrement((volatile LONG *)&pkProperty->m_uiRefCount);
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v2->m_kPropertyList,
    (NiPointer<NiRoom> *)&pkProperty);
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  }
}

//----- (00403600) --------------------------------------------------------
char __thiscall PgWinMgr::Add(PgWinMgr *this, PgWin *pkWin)
{
  PgWinMgr *v2; // ebx@1
  PgWin *v3; // esi@1
  char result; // al@2

  v2 = this;
  v3 = pkWin;
  if ( pkWin )
  {
    InterlockedIncrement((volatile LONG *)&pkWin->m_uiRefCount);
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *)&v2->m_kWinList,
      (NiPointer<NiDX92DBufferData> *)&pkWin);
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (004036A0) --------------------------------------------------------
void __thiscall PgWin::SetAlpha(PgWin *this, float fAlpha)
{
  PgWin *v2; // esi@1
  NiMaterialProperty *v3; // ebx@1
  NiMaterialProperty *v4; // eax@2
  NiMaterialProperty *v5; // eax@3
  NiMaterialProperty *v6; // edi@4
  NiMaterialProperty *v7; // eax@11
  double v8; // st7@12
  NiMaterialProperty *v9; // esi@15

  v2 = this;
  v3 = 0;
  if ( !this->m_spMaterialProp.m_pObject )
  {
    v4 = (NiMaterialProperty *)operator new(0x60u);
    if ( v4 )
    {
      NiMaterialProperty::NiMaterialProperty(v4);
      v3 = v5;
    }
    v6 = v2->m_spMaterialProp.m_pObject;
    if ( v6 != v3 )
    {
      if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      v2->m_spMaterialProp.m_pObject = v3;
      if ( v3 )
        InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
    }
    v7 = v2->m_spMaterialProp.m_pObject;
    ++v7->m_uiRevID;
    v7->m_emit.r = 1.0;
    v7->m_emit.g = 1.0;
    v7->m_emit.b = 1.0;
    NiAVObject::AttachProperty((NiAVObject *)&v2->vfptr, (NiProperty *)&v2->m_spMaterialProp.m_pObject->vfptr);
    NiAVObject::UpdateProperties((NiAVObject *)&v2->vfptr);
  }
  v8 = 1.0;
  if ( fAlpha >= 1.0 || (v8 = 0.0, fAlpha < 0.0) )
    fAlpha = v8;
  v9 = v2->m_spMaterialProp.m_pObject;
  ++v9->m_uiRevID;
  v9->m_fAlpha = fAlpha;
}

//----- (004037C0) --------------------------------------------------------
double __thiscall PgWin::GetAlpha(PgWin *this)
{
  PgWin *v1; // esi@1
  NiMaterialProperty *v2; // ebx@1
  NiMaterialProperty *v3; // eax@2
  NiMaterialProperty *v4; // eax@3
  NiMaterialProperty *v5; // edi@4
  NiMaterialProperty *v6; // eax@11
  NiMaterialProperty *v7; // eax@11
  double result; // st7@11

  v1 = this;
  v2 = 0;
  if ( this->m_spMaterialProp.m_pObject )
  {
    result = this->m_spMaterialProp.m_pObject->m_fAlpha;
  }
  else
  {
    v3 = (NiMaterialProperty *)operator new(0x60u);
    if ( v3 )
    {
      NiMaterialProperty::NiMaterialProperty(v3);
      v2 = v4;
    }
    v5 = v1->m_spMaterialProp.m_pObject;
    if ( v5 != v2 )
    {
      if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      v1->m_spMaterialProp.m_pObject = v2;
      if ( v2 )
        InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
    }
    v6 = v1->m_spMaterialProp.m_pObject;
    v6->m_emit.r = 1.0;
    v6->m_emit.g = 1.0;
    v6->m_emit.b = 1.0;
    ++v6->m_uiRevID;
    v7 = v1->m_spMaterialProp.m_pObject;
    ++v7->m_uiRevID;
    v7->m_fAlpha = 1.0;
    NiAVObject::AttachProperty((NiAVObject *)&v1->vfptr, (NiProperty *)&v1->m_spMaterialProp.m_pObject->vfptr);
    NiAVObject::UpdateProperties((NiAVObject *)&v1->vfptr);
    result = v1->m_spMaterialProp.m_pObject->m_fAlpha;
  }
  return result;
}

//----- (004038E0) --------------------------------------------------------
NiPointer<PgWin> *__thiscall PgWinMgr::Remove(PgWinMgr *this, NiPointer<PgWin> *result, PgWin *pkWin)
{
  PgWinMgr *v3; // ebx@1
  NiTListItem<PgWin *> *v4; // eax@1
  PgWin *v5; // esi@1
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *v6; // ecx@1
  PgWin **v7; // edx@2
  PgWin *v8; // edi@2

  v3 = this;
  v4 = this->m_kShowList.m_pkHead;
  v5 = pkWin;
  v6 = (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&this->m_kShowList;
  if ( v4 )
  {
    while ( 1 )
    {
      v7 = &v4->m_element;
      v8 = (PgWin *)v4;
      v4 = v4->m_pkNext;
      if ( pkWin == *v7 )
        break;
      if ( !v4 )
        goto LABEL_4;
    }
  }
  else
  {
LABEL_4:
    v8 = 0;
  }
  pkWin = v8;
  if ( v8 )
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(v6, (void **)&pkWin);
  v3->m_bTopWinScroll = 0;
  pkWin = v5;
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::Remove(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *)&v3->m_kWinList.vfptr,
    result,
    (NiPointer<PgWin> *)&pkWin);
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  return result;
}

//----- (004039B0) --------------------------------------------------------
void __thiscall CameraCtrl::InitDirection(CameraCtrl *this, NiPoint3 kUpDir, NiPoint3 kRightDir, NiPoint3 kFrontDir)
{
  this->m_kUpDir = kUpDir;
  this->m_kRightDir = kRightDir;
  this->m_kFrontDir = kFrontDir;
}

//----- (004039F0) --------------------------------------------------------
void __thiscall CameraCtrl::InitZoomMinMax(CameraCtrl *this, const float fZoomMin, const float fZoomMax)
{
  this->m_fZoomMin = fZoomMin;
  this->m_fZoomMax = fZoomMax;
}

//----- (00403A10) --------------------------------------------------------
double __thiscall CameraCtrl::GetZoom(CameraCtrl *this)
{
  return this->m_fZoom;
}

//----- (00403A20) --------------------------------------------------------
void __thiscall CameraCtrl::SetLookAtPos(CameraCtrl *this, NiPoint3 *kPos)
{
  this->m_kLookAtPos = *kPos;
}

//----- (00403A40) --------------------------------------------------------
void __thiscall CameraCtrl::GetLookAtPos(CameraCtrl *this, NiPoint3 *kPos)
{
  kPos->x = this->m_kLookAtPos.x;
  kPos->y = this->m_kLookAtPos.y;
  kPos->z = this->m_kLookAtPos.z;
}

//----- (00403A60) --------------------------------------------------------
void __thiscall CameraCtrl::SetZoomRatePerTick(CameraCtrl *this, float fRate)
{
  this->m_fZoomRatePerTick = fRate;
}

//----- (00403A70) --------------------------------------------------------
void __thiscall CameraCtrl::SetZoomMin(CameraCtrl *this, float fMin)
{
  this->m_fZoomMin = fMin;
}

//----- (00403A80) --------------------------------------------------------
void __thiscall CameraCtrl::SetZoomMax(CameraCtrl *this, float fMax)
{
  this->m_fZoomMax = fMax;
}

//----- (00403A90) --------------------------------------------------------
void __thiscall CameraCtrl::SetZoomDef(CameraCtrl *this, float fDef)
{
  this->m_fZoomDef = fDef;
  this->m_fZoom = fDef;
  this->m_fTargetZoom = fDef;
}

//----- (00403AB0) --------------------------------------------------------
void __thiscall CameraCtrl::Update(CameraCtrl *this, float fTime)
{
  double v2; // st7@1
  float v3; // ST00_4@4
  float dta; // [sp+Ch] [bp+8h]@2
  float dt; // [sp+Ch] [bp+8h]@2
  float dtb; // [sp+Ch] [bp+8h]@4

  v2 = fTime;
  if ( 3.4028235e38 != this->m_fLastUpdateTime )
  {
    dta = v2 - this->m_fLastUpdateTime;
    dt = dta * 10.0;
    if ( dt > 1.0 )
      dt = 1.0;
    v3 = this->m_fTargetZoom - this->m_fZoom;
    dtb = v3 * (dt * 0.800000011920929);
    this->m_fZoom = dtb + this->m_fZoom;
  }
  this->m_fLastUpdateTime = v2;
}

//----- (00403B20) --------------------------------------------------------
void __thiscall CameraCtrl::AutoRotate(CameraCtrl *this, float fAngle, float fMsDeltaX)
{
  double v3; // st7@1

  v3 = 0.0;
  if ( 0.0 != fAngle )
    v3 = fMsDeltaX;
  this->m_fMsDeltaX = v3;
}

//----- (00403B50) --------------------------------------------------------
void __thiscall CameraCtrl::ChangeCheckRayTile(CameraCtrl *this)
{
  float v1; // ST08_4@1

  v1 = this->m_fTargetZoom - 360.0;
  this->m_uiCheckRayTile = (unsigned __int64)(signed __int64)(v1 / 35.0) + 8;
}

//----- (00403B90) --------------------------------------------------------
void __thiscall CameraCtrl::SetZoom(CameraCtrl *this, float fZoom)
{
  double v2; // st7@1
  double v3; // st7@2
  float fZooma; // [sp+10h] [bp+8h]@5
  float fZoomb; // [sp+10h] [bp+8h]@7

  v2 = fZoom;
  if ( this->m_fZoomMin <= (double)fZoom )
  {
    if ( this->m_fZoomMax >= v2 )
      goto LABEL_6;
    v3 = this->m_fZoomMax;
  }
  else
  {
    v3 = this->m_fZoomMin;
  }
  fZooma = v3;
  v2 = fZooma;
LABEL_6:
  this->m_fZoom = v2;
  this->m_fTargetZoom = v2;
  if ( v2 <= 360.0 )
  {
    this->m_uiCheckRayTile = 8;
  }
  else
  {
    fZoomb = v2 - 360.0;
    this->m_uiCheckRayTile = (unsigned __int64)(signed __int64)(fZoomb / 35.0) + 8;
  }
}

//----- (00403C20) --------------------------------------------------------
void __thiscall CameraCtrl::AddZoom(CameraCtrl *this, int iMsDeltaZ)
{
  double v2; // st7@2
  int iMsDeltaZb; // [sp+10h] [bp+8h]@1
  float iMsDeltaZa; // [sp+10h] [bp+8h]@1
  int iMsDeltaZc; // [sp+10h] [bp+8h]@7

  *(float *)&iMsDeltaZb = this->m_fZoom * (double)-iMsDeltaZ * this->m_fZoomRatePerTick;
  iMsDeltaZa = *(float *)&iMsDeltaZb + this->m_fTargetZoom;
  this->m_fTargetZoom = iMsDeltaZa;
  if ( this->m_fZoomMin <= (double)iMsDeltaZa )
  {
    if ( this->m_fZoomMax >= (double)iMsDeltaZa )
      goto LABEL_6;
    v2 = this->m_fZoomMax;
  }
  else
  {
    v2 = this->m_fZoomMin;
  }
  this->m_fTargetZoom = v2;
LABEL_6:
  if ( this->m_fTargetZoom <= 360.0 )
  {
    this->m_uiCheckRayTile = 8;
  }
  else
  {
    *(float *)&iMsDeltaZc = this->m_fTargetZoom - 360.0;
    this->m_uiCheckRayTile = (unsigned __int64)(signed __int64)(*(float *)&iMsDeltaZc / 35.0) + 8;
  }
}

//----- (00403CD0) --------------------------------------------------------
void __thiscall CameraCtrl::AddRotate(CameraCtrl *this, int iMsDeltaX, int iMsDeltaY)
{
  if ( this->m_lstTraceCam._Mysize )
  {
    this->m_fMsDeltaX = 0.0;
    this->m_fMsDeltaY = 0.0;
  }
  else
  {
    this->m_fMsDeltaX = (double)iMsDeltaX * 0.699999988079071 * 0.5;
    this->m_fMsDeltaY = 0.5 * (0.699999988079071 * (double)iMsDeltaY);
  }
}

//----- (00403D10) --------------------------------------------------------
void __thiscall CameraCtrl::AddRotate(CameraCtrl *this, float fDeltaX, float fDeltaY)
{
  if ( this->m_lstTraceCam._Mysize )
  {
    this->m_fMsDeltaX = 0.0;
    this->m_fMsDeltaY = 0.0;
  }
  else
  {
    this->m_fMsDeltaX = fDeltaX;
    this->m_fMsDeltaY = fDeltaY;
  }
}

//----- (00403D40) --------------------------------------------------------
void __thiscall CameraCtrl::CameraCtrl(CameraCtrl *this)
{
  CameraCtrl *v1; // esi@1
  std::_List_nod<float,std::allocator<float> >::_Node *v2; // eax@1
  const char *v3; // ecx@2
  float v4; // edx@2
  std::exceptionVtbl *v5; // eax@2
  float v6; // edx@2
  void **v7; // ecx@2
  std::_List_nod<float,std::allocator<float> >::_Node *v8; // eax@2
  std::_List_nod<float,std::allocator<float> >::_Node *v9; // edi@3
  std::exception pExceptionObject; // [sp+8h] [bp-10h]@2
  char *_What; // [sp+14h] [bp-4h]@5

  v1 = this;
  this->vfptr = (CameraCtrlVtbl *)&CameraCtrl::`vftable';
  this->m_lstTraceCam._Mysize = 0;
  v2 = (std::_List_nod<float,std::allocator<float> >::_Node *)operator new(0xCu);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_lstTraceCam._Myhead = v2;
  v2->_Next = v2;
  v1->m_lstTraceCam._Myhead->_Prev = v1->m_lstTraceCam._Myhead;
  v1->m_fZoom = 100.0;
  v1->m_fZoomDef = 100.0;
  v1->m_fZoomMax = 9000.0;
  v1->m_fZoomMin = 40.0;
  v1->m_fTargetZoom = 100.0;
  v1->m_fMsDeltaX = 0.0;
  v1->m_fMsDeltaY = 0.0;
  *(float *)&pExceptionObject._Mywhat = 1.0;
  v1->m_kLookAtPos.x = 0.0;
  v3 = pExceptionObject._Mywhat;
  *(float *)&pExceptionObject._Mydofree = 0.0;
  v1->m_fAngleUD = 0.0;
  LODWORD(v1->m_kLookAtPos.y) = v3;
  v4 = *(float *)&pExceptionObject._Mydofree;
  v1->m_fAngleUDMax = 271.0;
  v1->m_kLookAtPos.z = v4;
  v1->m_fAngleUDMin = 89.0;
  v1->m_fAngleLR = 0.0;
  v1->m_kUpDir.x = 0.0;
  v1->m_kUpDir.y = 1.0;
  v1->m_kUpDir.z = 0.0;
  *(float *)&pExceptionObject.vfptr = 0.0;
  v1->m_kRightDir.x = 1.0;
  *(float *)&pExceptionObject._Mydofree = 0.0;
  v5 = pExceptionObject.vfptr;
  v1->m_kRightDir.y = 0.0;
  *(float *)&pExceptionObject._Mywhat = 1.0;
  v1->m_kRightDir.z = 0.0;
  v1->m_fZoomRatePerTick = 0.001;
  v6 = *(float *)&pExceptionObject._Mydofree;
  LODWORD(v1->m_kFrontDir.x) = v5;
  v1->m_kFrontDir.y = 1.0;
  v1->m_kFrontDir.z = v6;
  v7 = (void **)&v1->m_lstTraceCam._Myhead->_Next;
  v8 = (std::_List_nod<float,std::allocator<float> >::_Node *)*v7;
  *v7 = v7;
  v1->m_lstTraceCam._Myhead->_Prev = v1->m_lstTraceCam._Myhead;
  v1->m_lstTraceCam._Mysize = 0;
  if ( v8 != v1->m_lstTraceCam._Myhead )
  {
    do
    {
      v9 = v8->_Next;
      operator delete(v8);
      v8 = v9;
    }
    while ( v9 != v1->m_lstTraceCam._Myhead );
  }
  v1->m_uiCheckRayTile = 8;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 96E898: using guessed type int (__thiscall *CameraCtrl::`vftable')(void *p, char);

//----- (00403E90) --------------------------------------------------------
void __thiscall CameraCtrl::~CameraCtrl(CameraCtrl *this)
{
  CameraCtrl *v1; // esi@1
  std::_List_nod<float,std::allocator<float> >::_Node *v2; // ecx@1
  std::_List_nod<float,std::allocator<float> >::_Node *v3; // eax@1
  std::_List_nod<float,std::allocator<float> >::_Node *v4; // edi@2
  void **v5; // ecx@3
  std::_List_nod<float,std::allocator<float> >::_Node *v6; // eax@3
  std::_List_nod<float,std::allocator<float> >::_Node *v7; // edi@4

  v1 = this;
  this->vfptr = (CameraCtrlVtbl *)&CameraCtrl::`vftable';
  v2 = this->m_lstTraceCam._Myhead;
  v3 = v2->_Next;
  v2->_Next = v2;
  v1->m_lstTraceCam._Myhead->_Prev = v1->m_lstTraceCam._Myhead;
  v1->m_lstTraceCam._Mysize = 0;
  if ( v3 != v1->m_lstTraceCam._Myhead )
  {
    do
    {
      v4 = v3->_Next;
      operator delete(v3);
      v3 = v4;
    }
    while ( v4 != v1->m_lstTraceCam._Myhead );
  }
  v5 = (void **)&v1->m_lstTraceCam._Myhead->_Next;
  v6 = (std::_List_nod<float,std::allocator<float> >::_Node *)*v5;
  *v5 = v5;
  v1->m_lstTraceCam._Myhead->_Prev = v1->m_lstTraceCam._Myhead;
  v1->m_lstTraceCam._Mysize = 0;
  if ( v6 != v1->m_lstTraceCam._Myhead )
  {
    do
    {
      v7 = v6->_Next;
      operator delete(v6);
      v6 = v7;
    }
    while ( v7 != v1->m_lstTraceCam._Myhead );
  }
  operator delete(v1->m_lstTraceCam._Myhead);
}
// 96E898: using guessed type int (__thiscall *CameraCtrl::`vftable')(void *p, char);

//----- (00403F10) --------------------------------------------------------
void __thiscall CameraCtrl::CalCulateCamera(CameraCtrl *this, NiPoint3 *kCameraPos)
{
  float v2; // edx@1
  CameraCtrl *v3; // ebx@1
  float v4; // ST20_4@1
  float v5; // ecx@1
  double v6; // st5@2
  double v7; // st7@4
  double v8; // st5@7
  float v9; // ST24_4@13
  float v10; // ST28_4@13
  float v11; // ST2C_4@13
  float v12; // ST24_4@13
  float v13; // ST28_4@13
  float v14; // ST2C_4@13
  NiPoint3 *v15; // eax@13
  double v16; // st7@13
  bool v17; // zf@13
  std::_List_nod<float,std::allocator<float> >::_Node *v18; // ecx@14
  std::_List_nod<float,std::allocator<float> >::_Node *v19; // eax@14
  double v20; // st5@18
  double v21; // st7@20
  double v22; // st5@23
  float z; // ST0C_4@26
  float y; // ST08_4@26
  float x; // ST04_4@26
  NiPoint3 *v26; // eax@26
  double v27; // st7@26
  float v28; // eax@26
  double v29; // st7@26
  float v30; // edx@26
  double v31; // st7@26
  double v32; // st7@26
  NiPoint3 result; // [sp+30h] [bp-44h]@13
  NiPoint3 vecCurPos; // [sp+3Ch] [bp-38h]@1
  float fOldAbgleUD; // [sp+48h] [bp-2Ch]@1
  NiMatrix3 mat; // [sp+4Ch] [bp-28h]@1

  v2 = NiPoint3::ZERO.y;
  v3 = this;
  fOldAbgleUD = this->m_fAngleUD;
  v4 = fOldAbgleUD + this->m_fMsDeltaY;
  qmemcpy(&mat, &NiMatrix3::IDENTITY, sizeof(mat));
  v5 = NiPoint3::ZERO.x;
  vecCurPos.z = NiPoint3::ZERO.z;
  v3->m_fAngleUD = v4;
  vecCurPos.x = v5;
  vecCurPos.y = v2;
  if ( v4 < 360.0 )
  {
    v7 = 360.0;
  }
  else
  {
    v6 = v3->m_fAngleUD;
    do
      v6 = v6 - 360.0;
    while ( v6 >= 360.0 );
    v7 = 360.0;
    v3->m_fAngleUD = v6;
  }
  if ( v3->m_fAngleUD < 0.0 )
  {
    v8 = v3->m_fAngleUD;
    do
      v8 = v8 + v7;
    while ( v8 < 0.0 );
    v3->m_fAngleUD = v8;
  }
  if ( v3->m_fAngleUD > (double)v3->m_fAngleUDMin && v3->m_fAngleUDMax > (double)v3->m_fAngleUD )
    v3->m_fAngleUD = fOldAbgleUD;
  v9 = -v3->m_kRightDir.x;
  v10 = -v3->m_kRightDir.y;
  v11 = -v3->m_kRightDir.z;
  fOldAbgleUD = v3->m_fAngleUD * 3.140000104904175 / 180.0;
  NiMatrix3::MakeRotation(&mat, fOldAbgleUD, v9, v10, v11);
  v12 = -v3->m_kFrontDir.x;
  v13 = -v3->m_kFrontDir.y;
  v14 = -v3->m_kFrontDir.z;
  fOldAbgleUD = v3->m_fZoom;
  result.x = v12 * fOldAbgleUD;
  vecCurPos = result;
  result.y = v13 * fOldAbgleUD;
  result.z = fOldAbgleUD * v14;
  v15 = operator*(&result, &vecCurPos, &mat);
  v16 = v3->m_fAngleLR;
  vecCurPos.x = v15->x;
  vecCurPos.y = v15->y;
  v17 = v3->m_lstTraceCam._Mysize == 0;
  vecCurPos.z = v15->z;
  if ( v17 )
  {
    v3->m_fAngleLR = v16 - v3->m_fMsDeltaX;
  }
  else
  {
    v18 = v3->m_lstTraceCam._Myhead;
    v3->m_fAngleLR = v16 - v18->_Next->_Myval;
    v19 = v18->_Next;
    if ( v18->_Next != v18 )
    {
      v19->_Prev->_Next = v19->_Next;
      v19->_Next->_Prev = v19->_Prev;
      operator delete(v19);
      --v3->m_lstTraceCam._Mysize;
    }
  }
  if ( v3->m_fAngleLR < 360.0 )
  {
    v21 = 360.0;
  }
  else
  {
    v20 = v3->m_fAngleLR;
    do
      v20 = v20 - 360.0;
    while ( v20 >= 360.0 );
    v21 = 360.0;
    v3->m_fAngleLR = v20;
  }
  if ( v3->m_fAngleLR < 0.0 )
  {
    v22 = v3->m_fAngleLR;
    do
      v22 = v22 + v21;
    while ( v22 < 0.0 );
    v3->m_fAngleLR = v22;
  }
  z = v3->m_kUpDir.z;
  y = v3->m_kUpDir.y;
  x = v3->m_kUpDir.x;
  fOldAbgleUD = v3->m_fAngleLR * 3.140000104904175 / 180.0;
  NiMatrix3::MakeRotation(&mat, fOldAbgleUD, x, y, z);
  v26 = operator*(&result, &vecCurPos, &mat);
  v27 = v3->m_kLookAtPos.x;
  vecCurPos.x = v26->x;
  vecCurPos.y = v26->y;
  v28 = v26->z;
  result.x = v27 + vecCurPos.x;
  v29 = v3->m_kLookAtPos.y + vecCurPos.y;
  vecCurPos.z = v28;
  result.y = v29;
  v30 = result.y;
  v31 = v3->m_kLookAtPos.z;
  kCameraPos->x = result.x;
  v32 = v31 + vecCurPos.z;
  kCameraPos->y = v30;
  result.z = v32;
  kCameraPos->z = result.z;
  v3->m_fMsDeltaX = 0.0;
  v3->m_fMsDeltaY = 0.0;
}

//----- (004041F0) --------------------------------------------------------
void __thiscall CameraCtrl::AddTraceRotate(CameraCtrl *this, int iMsDeltaX)
{
  CameraCtrl *v2; // esi@1
  double v3; // st7@1
  int v4; // ebx@1
  std::_List_nod<float,std::allocator<float> >::_Node *v5; // edi@2
  std::_List_nod<float,std::allocator<float> >::_Node *v6; // eax@2
  unsigned int v7; // ecx@2
  std::_List_nod<float,std::allocator<float> >::_Node *v8; // edi@5
  std::_List_nod<float,std::allocator<float> >::_Node *v9; // eax@5
  unsigned int v10; // ecx@5
  float fGap; // [sp+4h] [bp-8h]@1
  int iTickCountDeltaX; // [sp+8h] [bp-4h]@1

  v2 = this;
  *(float *)&iMsDeltaX = (double)iMsDeltaX * 0.699999988079071 * 0.5;
  v3 = *(float *)&iMsDeltaX;
  this->m_fMsDeltaX = *(float *)&iMsDeltaX;
  *(float *)&iMsDeltaX = 0.0689999982714653 * v3;
  iTickCountDeltaX = (signed int)(v3 / *(float *)&iMsDeltaX);
  v4 = 0;
  fGap = v3 - *(float *)&iMsDeltaX * (double)iTickCountDeltaX;
  if ( iTickCountDeltaX > 0 )
  {
    while ( 1 )
    {
      v5 = v2->m_lstTraceCam._Myhead;
      v6 = std::_List_val<float,std::allocator<float>>::_Buynode(
             v2->m_lstTraceCam._Myhead,
             v5->_Prev,
             (const float *)&iMsDeltaX);
      v7 = v2->m_lstTraceCam._Mysize;
      if ( 1073741822 - v7 < 1 )
        break;
      v2->m_lstTraceCam._Mysize = v7 + 1;
      v5->_Prev = v6;
      ++v4;
      v6->_Prev->_Next = v6;
      if ( v4 >= iTickCountDeltaX )
        goto LABEL_4;
    }
LABEL_6:
    std::_Xlength_error("list<T> too long");
  }
LABEL_4:
  if ( fGap >= 0.0 )
  {
    v8 = v2->m_lstTraceCam._Myhead;
    v9 = std::_List_val<float,std::allocator<float>>::_Buynode(v2->m_lstTraceCam._Myhead, v8->_Prev, &fGap);
    v10 = v2->m_lstTraceCam._Mysize;
    if ( 1073741822 - v10 < 1 )
      goto LABEL_6;
    v2->m_lstTraceCam._Mysize = v10 + 1;
    v8->_Prev = v9;
    v9->_Prev->_Next = v9;
  }
}
// 4041F0: could not find valid save-restore pair for ebx
// 4041F0: could not find valid save-restore pair for edi
// 4041F0: could not find valid save-restore pair for esi

//----- (004042D0) --------------------------------------------------------
NiPoint3 *__thiscall NiPoint3::operator+(NiPoint3 *this, NiPoint3 *result, NiPoint3 *pt)
{
  NiPoint3 *v3; // eax@1

  v3 = result;
  result->x = pt->x + this->x;
  result->y = pt->y + this->y;
  result->z = pt->z + this->z;
  return v3;
}

//----- (00404300) --------------------------------------------------------
void __thiscall NiMatrix3::MakeRotation(NiMatrix3 *this, float fAngle, NiPoint3 *axis)
{
  NiMatrix3::MakeRotation(this, fAngle, axis->x, axis->y, axis->z);
}

//----- (00404330) --------------------------------------------------------
void __thiscall std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::clear(std::list<float,std::allocator<float> > *this)
{
  std::list<float,std::allocator<float> > *v1; // esi@1
  std::_List_nod<float,std::allocator<float> >::_Node *v2; // ecx@1
  std::_List_nod<float,std::allocator<float> >::_Node *v3; // eax@1
  std::_List_nod<float,std::allocator<float> >::_Node *v4; // edi@2

  v1 = this;
  v2 = this->_Myhead;
  v3 = v2->_Next;
  v2->_Next = v2;
  v1->_Myhead->_Prev = v1->_Myhead;
  v1->_Mysize = 0;
  if ( v3 != v1->_Myhead )
  {
    do
    {
      v4 = v3->_Next;
      operator delete(v3);
      v3 = v4;
    }
    while ( v4 != v1->_Myhead );
  }
}

//----- (00404370) --------------------------------------------------------
std::_List_nod<float,std::allocator<float> >::_Node *__stdcall std::_List_val<float,std::allocator<float>>::_Buynode(std::_List_nod<float,std::allocator<float> >::_Node *_Next, std::_List_nod<float,std::allocator<float> >::_Node *_Prev, const float *_Val)
{
  std::_List_nod<float,std::allocator<float> >::_Node *result; // eax@1
  std::_List_nod<float,std::allocator<float> >::_Node *v5; // edx@2
  std::exception pExceptionObject; // [sp+0h] [bp-Ch]@5

  result = (std::_List_nod<float,std::allocator<float> >::_Node *)operator new(0xCu);
  if ( !result )
  {
    _Next = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Next);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v5 = _Prev;
  result->_Next = _Next;
  result->_Prev = v5;
  if ( result != (std::_List_nod<float,std::allocator<float> >::_Node *)-8 )
    result->_Myval = *_Val;
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (004043D0) --------------------------------------------------------
CameraCtrl *__thiscall CameraCtrl::`scalar deleting destructor'(CameraCtrl *this, unsigned int a2)
{
  CameraCtrl *v2; // esi@1

  v2 = this;
  CameraCtrl::~CameraCtrl(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00404400) --------------------------------------------------------
int __cdecl cAntiCheat::CRC32(const char *data, unsigned int size)
{
  unsigned int v2; // ecx@1
  unsigned int v3; // eax@1
  const char *v4; // edx@2

  v2 = size;
  v3 = -1;
  if ( size )
  {
    v4 = data;
    do
    {
      v3 = crc_32_tab[(unsigned __int8)(v3 ^ *v4++)] ^ (v3 >> 8);
      --v2;
    }
    while ( v2 );
  }
  return ~v3;
}

//----- (00404430) --------------------------------------------------------
void __cdecl __noreturn cAntiCheat::KillFO()
{
  signed int v0; // eax@1
  HANDLE v1; // eax@1
  void *v2; // edi@1
  HANDLE v3; // eax@6
  void *v4; // esi@6
  unsigned int myThreadID; // [sp+Ch] [bp-28h]@1
  unsigned int myProcID; // [sp+10h] [bp-24h]@1
  tagTHREADENTRY32 te; // [sp+14h] [bp-20h]@2

  v0 = rand();
  Sleep(v0 % 180000 + 60000);
  myProcID = GetCurrentProcessId();
  myThreadID = GetCurrentThreadId();
  v1 = CreateToolhelp32Snapshot(4u, 0);
  v2 = v1;
  if ( v1 != (HANDLE)-1 )
  {
    te.dwSize = 28;
    if ( Thread32First(v1, &te) )
    {
      do
      {
        if ( te.dwSize >= 0x10 && te.th32ThreadID != myThreadID && te.th32OwnerProcessID == myProcID )
        {
          v3 = OpenThread(0x1FFFFFu, 0, te.th32ThreadID);
          v4 = v3;
          if ( v3 )
          {
            SuspendThread(v3);
            CloseHandle(v4);
          }
        }
        te.dwSize = 28;
      }
      while ( Thread32Next(v2, &te) );
    }
    CloseHandle(v2);
  }
  MessageBoxA(0, "Malicious Software Intrusion Detected.", "Cheat Software Detected!", 0x10010u);
  ExitProcess(0);
}

//----- (00404510) --------------------------------------------------------
int __cdecl cAntiCheat::ComputeCRC()
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v0; // esi@1
  signed int v1; // edi@1
  unsigned int v2; // edi@3
  _BYTE *v3; // edx@3
  signed int v4; // ecx@5
  unsigned int v5; // eax@5
  int v6; // esi@7
  int v7; // esi@7
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > TmpBlock; // [sp+Ch] [bp-124h]@1
  char tmp[245]; // [sp+28h] [bp-108h]@7
  int v11; // [sp+12Ch] [bp-4h]@1

  TmpBlock._Myres = 15;
  TmpBlock._Mysize = 0;
  TmpBlock._Bx._Buf[0] = 0;
  v11 = 0;
  v0 = BlockedData;
  v1 = 104;
  do
  {
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&TmpBlock, v0, 0, 0xFFFFFFFF);
    ++v0;
    --v1;
  }
  while ( v1 );
  v2 = TmpBlock._Myres;
  v3 = TmpBlock._Bx._Ptr;
  if ( TmpBlock._Myres < 0x10 )
    v3 = &TmpBlock;
  v4 = 3328;
  v5 = -1;
  do
  {
    v5 = crc_32_tab[(unsigned __int8)(v5 ^ *v3++)] ^ (v5 >> 8);
    --v4;
  }
  while ( v4 );
  v6 = ~v5;
  sprintf(tmp, "%d", ~v5);
  v7 = v6 == 1871879518;
  if ( v2 >= 0x10 )
    operator delete(TmpBlock._Bx._Ptr);
  return v7;
}

//----- (00404620) --------------------------------------------------------
void __cdecl __noreturn cAntiCheat::CRCCheck()
{
  while ( cAntiCheat::ComputeCRC() )
    Sleep(0x7530u);
  cAntiCheat::KillFO();
}

//----- (00404650) --------------------------------------------------------
BOOL __cdecl cAntiCheat::CompareAgainstHashes(std::basic_string<char,std::char_traits<char>,std::allocator<char> > toCompare)
{
  unsigned int v1; // eax@2
  _BYTE *v2; // ecx@3
  _BYTE *v3; // esi@3
  const char *v4; // esi@6
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Right; // [sp+10h] [bp-34h]@1
  bool bFound; // [sp+17h] [bp-2Dh]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > tmpStr; // [sp+18h] [bp-2Ch]@2
  int v9; // [sp+40h] [bp-4h]@1

  v9 = 0;
  bFound = 0;
  _Right = BlockedData;
  while ( 1 )
  {
    tmpStr._Myres = 15;
    tmpStr._Mysize = 0;
    tmpStr._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&tmpStr, _Right, 0, 0xFFFFFFFF);
    v1 = 0;
    do
    {
      v2 = tmpStr._Bx._Ptr;
      v3 = tmpStr._Bx._Ptr;
      if ( tmpStr._Myres < 0x10 )
      {
        v3 = &tmpStr;
        v2 = &tmpStr;
      }
      v2[v1] = v3[v1] ^ 0x92;
      ++v1;
    }
    while ( v1 < 0x1F );
    v4 = tmpStr._Bx._Ptr;
    if ( tmpStr._Myres < 0x10 )
      v4 = (const char *)&tmpStr;
    if ( !strcmp(v4, std::basic_string<char,std::char_traits<char>,std::allocator<char>>::c_str(&toCompare)) )
      break;
    if ( tmpStr._Myres >= 0x10 )
      operator delete(tmpStr._Bx._Ptr);
    ++_Right;
    if ( (signed int)_Right >= (signed int)&NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>> `RTTI Type Descriptor' )
      goto LABEL_15;
  }
  bFound = 1;
  if ( tmpStr._Myres >= 0x10 )
    operator delete(tmpStr._Bx._Ptr);
LABEL_15:
  if ( toCompare._Myres >= 0x10 )
    operator delete(toCompare._Bx._Ptr);
  return bFound;
}
// A690D8: using guessed type int (__thiscall **NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>> `RTTI Type Descriptor')(void *p, char);

//----- (00404790) --------------------------------------------------------
int __stdcall cAntiCheat::EnumChildProc(HWND__ *hwnd, int lParam)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v3; // [sp-1Ch] [bp-150h]@2
  int v4; // [sp-Ch] [bp-140h]@2
  signed int v5; // [sp-8h] [bp-13Ch]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v6; // [sp+4h] [bp-130h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > MD5PW; // [sp+8h] [bp-12Ch]@2
  char wnd_title[256]; // [sp+24h] [bp-110h]@1
  int v9; // [sp+130h] [bp-4h]@2

  GetWindowTextA(hwnd, wnd_title, 256);
  if ( wnd_title[0] )
  {
    CMD5Checksum::GetMD5(&MD5PW, wnd_title, strlen(wnd_title));
    v6 = &v3;
    v5 = 15;
    v4 = 0;
    v9 = 0;
    v3._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v3, &MD5PW, 0, 0xFFFFFFFF);
    if ( cAntiCheat::CompareAgainstHashes(v3) )
      cAntiCheat::KillFO();
    if ( MD5PW._Myres >= 0x10 )
      operator delete(MD5PW._Bx._Ptr);
  }
  return 1;
}

//----- (00404880) --------------------------------------------------------
int __stdcall cAntiCheat::EnumWindowsProc(HWND__ *hWnd, int lParam)
{
  int v2; // eax@1
  unsigned int v3; // edi@2
  char *v4; // esi@2
  HWND v5; // edi@2
  char *v6; // eax@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v8; // [sp-1Ch] [bp-78h]@4
  int v9; // [sp-Ch] [bp-68h]@4
  signed int v10; // [sp-8h] [bp-64h]@4
  int v11; // [sp-4h] [bp-60h]@2
  HWND hWndParent; // [sp+10h] [bp-4Ch]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > MD5PW; // [sp+14h] [bp-48h]@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > windowTitle; // [sp+30h] [bp-2Ch]@2
  int v15; // [sp+58h] [bp-4h]@2

  hWndParent = hWnd;
  v2 = GetWindowTextLengthA(hWnd);
  if ( v2 )
  {
    v3 = v2 + 1;
    v4 = (char *)operator new[](v2 + 1);
    memset(v4, 0, v3);
    v11 = v3;
    v5 = hWndParent;
    GetWindowTextA(hWndParent, v4, v11);
    windowTitle._Myres = 15;
    windowTitle._Mysize = 0;
    windowTitle._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&windowTitle, v4, strlen(v4));
    v15 = 0;
    operator delete[](v4);
    v6 = windowTitle._Bx._Ptr;
    if ( windowTitle._Myres < 0x10 )
      v6 = (char *)&windowTitle;
    CMD5Checksum::GetMD5(&MD5PW, v6, windowTitle._Mysize);
    hWndParent = (HWND)&v8;
    v10 = 15;
    v9 = 0;
    LOBYTE(v15) = 1;
    v8._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v8, &MD5PW, 0, 0xFFFFFFFF);
    if ( cAntiCheat::CompareAgainstHashes(v8) )
    {
      GameFrameWork::_isCheating = 1;
      cAntiCheat::KillFO();
    }
    EnumChildWindows(v5, cAntiCheat::EnumChildProc, 0);
    if ( MD5PW._Myres >= 0x10 )
      operator delete(MD5PW._Bx._Ptr);
    MD5PW._Myres = 15;
    MD5PW._Mysize = 0;
    MD5PW._Bx._Buf[0] = 0;
    if ( windowTitle._Myres >= 0x10 )
      operator delete(windowTitle._Bx._Ptr);
  }
  return 1;
}
// A8CA74: using guessed type bool GameFrameWork::_isCheating;

//----- (004049D0) --------------------------------------------------------
void __cdecl __noreturn cAntiCheat::EnumCheck()
{
  while ( 1 )
  {
    EnumWindows(cAntiCheat::EnumWindowsProc, 0);
    Sleep(0x1388u);
  }
}

//----- (00404A00) --------------------------------------------------------
char *__cdecl Folder::Menu()
{
  if ( !Folder::m_bInit )
    Folder::Init();
  return &Folder::m_acMenu;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00404A20) --------------------------------------------------------
char *__thiscall CharCreateClassWin::GetAvatarCreateName(CharCreateClassWin *this)
{
  return (char *)((int (*)(void))this->m_spNameEdit.m_pObject->vfptr[113].__vecDelDtor)();
}

//----- (00404A30) --------------------------------------------------------
void __thiscall CharCreateClassWin::KillFocus(CharCreateClassWin *this)
{
  ImeEditWinEx *v1; // ecx@1

  v1 = this->m_spNameEdit.m_pObject;
  if ( v1 )
    ((void (__stdcall *)(_DWORD))v1->vfptr[121].__vecDelDtor)(1);
}

//----- (00404A50) --------------------------------------------------------
void __thiscall CharCreateClassWin::SetFocus(CharCreateClassWin *this)
{
  ImeEditWinEx *v1; // ecx@1

  v1 = this->m_spNameEdit.m_pObject;
  if ( v1 )
    ((void (*)(void))v1->vfptr[120].__vecDelDtor)();
}

//----- (00404A70) --------------------------------------------------------
void __thiscall CharCreateClassWin::ClearNameEditBox(CharCreateClassWin *this)
{
  ImeEditWinEx *v1; // ecx@1

  v1 = this->m_spNameEdit.m_pObject;
  if ( v1 )
    ((void (__stdcall *)(_DWORD))v1->vfptr[115].__vecDelDtor)(&unk_96F7BE);
}

//----- (00404A90) --------------------------------------------------------
void __thiscall CharCreateClassWin::Show(CharCreateClassWin *this, bool b)
{
  ImeEditWinEx *v2; // ecx@3

  if ( b )
  {
    this->m_uFlags &= 0xFFFEu;
    v2 = this->m_spNameEdit.m_pObject;
    if ( v2 )
      ((void (*)(void))v2->vfptr[120].__vecDelDtor)();
  }
  else
  {
    this->m_uFlags |= 1u;
  }
}

//----- (00404AD0) --------------------------------------------------------
void __thiscall CharCreateClassWin::SetSentinelButEnable(CharCreateClassWin *this, int bEnable)
{
  int v2; // ebx@1
  CharCreateClassWin *v3; // esi@1
  PgWinBut *v4; // ecx@1
  PgWinSpr *v5; // ecx@3

  v2 = bEnable;
  v3 = this;
  v4 = this->m_spSentinelBut.m_pObject;
  if ( v4 )
  {
    ((void (__stdcall *)(int))v4->vfptr[60].__vecDelDtor)(bEnable);
    ((void (__stdcall *)(int))v3->m_spSentinelBut.m_pObject->vfptr[64].__vecDelDtor)(bEnable);
  }
  v5 = v3->m_spSentinelDisablSpr.m_pObject;
  if ( v5 )
  {
    LOBYTE(v2) = (_BYTE)bEnable == 0;
    ((void (__stdcall *)(int))v5->vfptr[60].__vecDelDtor)(v2);
    ((void (__stdcall *)(int))v3->m_spSentinelDisablSpr.m_pObject->vfptr[64].__vecDelDtor)(v2);
  }
}

//----- (00404B40) --------------------------------------------------------
void __thiscall CharCreateClassWin::~CharCreateClassWin(CharCreateClassWin *this)
{
  CharCreateClassWin *v1; // edi@1
  ImeEditWinEx *v2; // esi@1
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl **v3; // esi@6
  PgWinSpr *v4; // esi@6
  PgWinBut *v5; // esi@10
  ImeEditWinEx *v6; // esi@14

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&CharCreateClassWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CharCreateClassWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spNameEdit.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spNameEdit.m_pObject = 0;
  }
  v3 = &v1->m_kClassMap.vfptr;
  *v3 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMap<unsigned long,NiPointer<PgWinBut>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kClassMap.vfptr);
  *v3 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kClassMap.vfptr);
  operator delete[](v1->m_kClassMap.m_ppkHashTable);
  v4 = v1->m_spSentinelDisablSpr.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v5 = v1->m_spSentinelBut.m_pObject;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  v6 = v1->m_spNameEdit.m_pObject;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 96F8CC: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::`vftable')(void *p, char);
// 96F8F0: using guessed type int (__thiscall *NiTMap<unsigned long,NiPointer<PgWinBut>>::`vftable')(void *p, char);
// 96F918: using guessed type void (__thiscall *CharCreateClassWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 96F934: using guessed type int (__thiscall *CharCreateClassWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00404C90) --------------------------------------------------------
void __thiscall CharCreateClassWin::OnSetClass(CharCreateClassWin *this, unsigned int uiClass)
{
  CharCreateClassWin *v2; // esi@1
  const char *v3; // eax@1
  const char *v4; // ebx@1
  PgWinBut *v5; // edi@2
  PgWinBut *v6; // eax@3
  unsigned int v7; // eax@10
  unsigned int v8; // edi@13

  v2 = this;
  v3 = (const char *)this->m_uiClass;
  v4 = (const char *)uiClass;
  if ( v3 != (const char *)uiClass )
  {
    v5 = 0;
    uiClass = 0;
    if ( v3 == (const char *)26 )
    {
      v6 = this->m_spSentinelBut.m_pObject;
      if ( v6 )
      {
        v5 = this->m_spSentinelBut.m_pObject;
        uiClass = (unsigned int)this->m_spSentinelBut.m_pObject;
        InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
      }
    }
    else
    {
      NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
        (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kClassMap,
        v3,
        (NiPointer<NiShaderLibrary> *)&uiClass);
      v5 = (PgWinBut *)uiClass;
    }
    v5->vfptr[133].__vecDelDtor((NiRefObject *)v5, 0);
    v2->m_uiClass = (unsigned int)v4;
    if ( v4 == (const char *)26 )
    {
      if ( v5 != v2->m_spSentinelBut.m_pObject )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
        v7 = (unsigned int)v2->m_spSentinelBut.m_pObject;
        uiClass = v7;
        if ( v7 )
          InterlockedIncrement((volatile LONG *)(v7 + 4));
      }
    }
    else
    {
      NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
        (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&v2->m_kClassMap,
        v4,
        (NiPointer<NiShaderLibrary> *)&uiClass);
    }
    NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
      (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&v2->m_kClassMap,
      v4,
      (NiPointer<NiShaderLibrary> *)&uiClass);
    v8 = uiClass;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)uiClass + 532))(uiClass, 1);
    CharCreateFrameWork::SetClass((CharCreateFrameWork *)v2->m_pkFrameWork, (char)v4);
    CharCreateFrameWork::ChangeAvatarClass((CharCreateFrameWork *)v2->m_pkFrameWork, (int)v4);
    if ( !InterlockedDecrement((volatile LONG *)(v8 + 4)) )
      (**(void (__thiscall ***)(_DWORD, _DWORD))v8)(v8, 1);
  }
}

//----- (00404DD0) --------------------------------------------------------
void __thiscall CharCreateClassWin::CharCreateClassWin(CharCreateClassWin *this)
{
  CharCreateClassWin *v1; // esi@1
  char *v2; // eax@1
  unsigned int v3; // ST08_4@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&CharCreateClassWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CharCreateClassWin::`vftable'{for `IDirectMessenger'};
  v1->m_spNameEdit.m_pObject = 0;
  v1->m_spSentinelBut.m_pObject = 0;
  v1->m_spSentinelDisablSpr.m_pObject = 0;
  v1->m_kClassMap.m_uiHashSize = 37;
  v1->m_kClassMap.vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::`vftable';
  v1->m_kClassMap.m_kAllocator.m_uiCount = 0;
  v2 = (char *)operator new[](0x94u);
  v3 = 4 * v1->m_kClassMap.m_uiHashSize;
  v1->m_kClassMap.m_ppkHashTable = (NiTMapItem<unsigned long,NiPointer<PgWinBut> > **)v2;
  memset(v2, 0, v3);
  v1->m_kClassMap.vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMap<unsigned long,NiPointer<PgWinBut>>::`vftable';
  v1->m_uiClass = 1;
  *(_DWORD *)&v1->m_acCharName[0] = 0;
  *(_DWORD *)&v1->m_acCharName[4] = 0;
  *(_DWORD *)&v1->m_acCharName[8] = 0;
  *(_DWORD *)&v1->m_acCharName[12] = 0;
}
// 96F8CC: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::`vftable')(void *p, char);
// 96F8F0: using guessed type int (__thiscall *NiTMap<unsigned long,NiPointer<PgWinBut>>::`vftable')(void *p, char);
// 96F918: using guessed type void (__thiscall *CharCreateClassWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 96F934: using guessed type int (__thiscall *CharCreateClassWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00404EC0) --------------------------------------------------------
char __thiscall CharCreateClassWin::Create(CharCreateClassWin *this, PgFrameWork *pkFrameWork)
{
  CharCreateClassWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiNode *v5; // eax@3
  NiNode *v6; // esi@7
  char result; // al@10
  PgSprData *v8; // eax@11
  NiNode *v9; // esi@12
  PgWinBut *v10; // edi@17
  float v11; // ecx@17
  PgWinBut *v12; // eax@17
  float v13; // ecx@19
  PgWinBut *v14; // eax@19
  float v15; // ecx@21
  PgWinBut *v16; // eax@21
  PgWinBut *v17; // eax@23
  ImeEditWinEx *v18; // eax@25
  ImeEditWinEx *v19; // edi@25
  ImeEditWinEx *v20; // ebx@25
  PgSprData *v21; // edi@32
  PgWinBut *v22; // eax@32
  PgWinBut *v23; // edi@32
  PgWinBut *v24; // ebx@32
  PgSprData *v25; // eax@39
  PgWinSpr *v26; // eax@39
  PgWinSpr *v27; // edi@39
  PgWinSpr *v28; // ebx@39
  PgWin *v29; // edi@46
  char *v30; // eax@46
  NiRefObjectVtbl *v31; // edi@46
  int v32; // eax@46
  NiRefObjectVtbl *v33; // edx@46
  int v34; // eax@46
  NiNode *v35; // esi@47
  NiPointer<PgWinBut> v36; // [sp+24h] [bp-40h]@17
  UIUtil ui; // [sp+38h] [bp-2Ch]@17
  int iLeft; // [sp+4Ch] [bp-18h]@11
  int iTop; // [sp+50h] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+54h] [bp-10h]@1
  int v41; // [sp+60h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v41 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "charcreate\\CreatCharClass.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = spNode.m_pObject;
  if ( spNode.m_pObject )
  {
    v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane", &iLeft, &iTop, 0);
    if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v8, 0, pkFrameWork, "CharCreateClassWin", 0) )
    {
      UIUtil::UIUtil(&ui);
      LOBYTE(v41) = 1;
      UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
      UIUtil::SetOffset(&ui, iLeft, iTop);
      UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
      UIUtil::CreateSpr(&ui, "Plane", 0);
      UIUtil::CreateSpr(&ui, "Plane_Name", 0);
      *(float *)&v10 = COERCE_FLOAT(UIUtil::CreateButton(&ui, 0, "Class_Fighter", 0, 3));
      v10->vfptr[133].__vecDelDtor((NiRefObject *)v10, 1u);
      v36.m_pObject = v10;
      InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v2->m_kClassMap.vfptr,
        1u,
        v36);
      *(float *)&v36.m_pObject = v11;
      *(float *)&v12 = COERCE_FLOAT(UIUtil::CreateButton(&ui, 1u, "Class_Archer", 0, 3));
      v36.m_pObject = v12;
      if ( *(float *)&v12 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v12->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v2->m_kClassMap.vfptr,
        0xBu,
        v36);
      *(float *)&v36.m_pObject = v13;
      *(float *)&v14 = COERCE_FLOAT(UIUtil::CreateButton(&ui, 2u, "Class_Cleric", 0, 3));
      v36.m_pObject = v14;
      if ( *(float *)&v14 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v14->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v2->m_kClassMap.vfptr,
        6u,
        v36);
      *(float *)&v36.m_pObject = v15;
      *(float *)&v16 = COERCE_FLOAT(UIUtil::CreateButton(&ui, 3u, "Class_Mage", 0, 3));
      v36.m_pObject = v16;
      if ( *(float *)&v16 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v16->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v2->m_kClassMap.vfptr,
        0x10u,
        v36);
      *(float *)&v17 = COERCE_FLOAT(UIUtil::CreateButton(&ui, 4u, "Class_Joker", 0, 3));
      v36.m_pObject = v17;
      if ( *(float *)&v17 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v17->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v2->m_kClassMap.vfptr,
        0x15u,
        v36);
      UIUtil::CreateSpr(&ui, off_96F860, 0);
      v18 = UIUtil::CreateEditEx(&ui, "Name", 16, NORMAL, 0, 0);
      v19 = v2->m_spNameEdit.m_pObject;
      v20 = v18;
      if ( v19 != v18 )
      {
        if ( v19 && !InterlockedDecrement((volatile LONG *)&v19->m_uiRefCount) && v19 )
          v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
        v2->m_spNameEdit.m_pObject = v20;
        if ( v20 )
          InterlockedIncrement((volatile LONG *)&v20->m_uiRefCount);
      }
      EditWinEx::SetDrawFormat((EditWinEx *)&v2->m_spNameEdit.m_pObject->vfptr, 5u);
      v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Class_SentinelNor", &iLeft, &iTop, 0);
      PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "Class_SentinelClick");
      PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "Class_SentinelOver");
      v22 = PgWinBut::CreateWin(iLeft, iTop, v21, (PgWin *)&v2->vfptr, 5u, 0, 0);
      v23 = v2->m_spSentinelBut.m_pObject;
      v24 = v22;
      if ( v23 != v22 )
      {
        if ( v23 && !InterlockedDecrement((volatile LONG *)&v23->m_uiRefCount) && v23 )
          v23->vfptr->__vecDelDtor((NiRefObject *)v23, 1u);
        v2->m_spSentinelBut.m_pObject = v24;
        if ( v24 )
          InterlockedIncrement((volatile LONG *)&v24->m_uiRefCount);
      }
      ((void (__stdcall *)(_DWORD))v2->m_spSentinelBut.m_pObject->vfptr[60].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v2->m_spSentinelBut.m_pObject->vfptr[64].__vecDelDtor)(0);
      v25 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Class_SentinelDisable", &iLeft, &iTop, 0);
      v26 = PgWinSpr::CreateWin(iLeft, iTop, v25, (PgWin *)&v2->vfptr, 0, 0);
      v27 = v2->m_spSentinelDisablSpr.m_pObject;
      v28 = v26;
      if ( v27 != v26 )
      {
        if ( v27 && !InterlockedDecrement((volatile LONG *)&v27->m_uiRefCount) && v27 )
          v27->vfptr->__vecDelDtor((NiRefObject *)v27, 1u);
        v2->m_spSentinelDisablSpr.m_pObject = v28;
        if ( v28 )
          InterlockedIncrement((volatile LONG *)&v28->m_uiRefCount);
      }
      ((void (__stdcall *)(signed int))v2->m_spSentinelDisablSpr.m_pObject->vfptr[60].__vecDelDtor)(1);
      ((void (__stdcall *)(signed int))v2->m_spSentinelDisablSpr.m_pObject->vfptr[64].__vecDelDtor)(1);
      v2->m_spSentinelDisablSpr.m_pObject->m_pkToolTipWin = g_pkToolTipWin;
      v29 = (PgWin *)&v2->m_spSentinelDisablSpr.m_pObject->vfptr;
      v30 = (char *)TextData3::Get(0xCBBAA1E2);
      PgWin::SetToolTipWinText(v29, v30);
      UIUtil::CreateSpr(&ui, "Job01", 0);
      ((void (__thiscall *)(CharCreateClassWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
        v2,
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        0.5,
        0.0);
      v31 = v2->vfptr;
      v32 = ((int (__thiscall *)(CharCreateClassWin *))v2->vfptr[42].__vecDelDtor)(v2);
      v33 = v2->vfptr;
      v36.m_pObject = (PgWinBut *)(v32 + 10);
      v34 = (int)v33[41].__vecDelDtor((NiRefObject *)v2, v32 + 10);
      v31[77].__vecDelDtor((NiRefObject *)v2, v34);
      v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
      LOBYTE(v41) = 0;
      UIUtil::~UIUtil(&ui);
      v41 = -1;
      if ( spNode.m_pObject )
      {
        v35 = spNode.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
        {
          if ( v35 )
            v35->vfptr->__vecDelDtor((NiRefObject *)v35, 1u);
        }
      }
      result = 1;
    }
    else
    {
      v9 = spNode.m_pObject;
      v41 = -1;
      if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v9 )
        v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      result = 0;
    }
  }
  else
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("CreatCharClass load fail", "LoadFail", 0);
      v5 = spNode.m_pObject;
    }
    v41 = -1;
    if ( v5 )
    {
      v6 = v5;
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    result = 0;
  }
  return result;
}
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00405410) --------------------------------------------------------
void __thiscall CharCreateClassWin::OnCommand(CharCreateClassWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0u:
      CharCreateClassWin::OnSetClass(this, 1u);
      break;
    case 1u:
      CharCreateClassWin::OnSetClass(this, 0xBu);
      break;
    case 2u:
      CharCreateClassWin::OnSetClass(this, 6u);
      break;
    case 3u:
      CharCreateClassWin::OnSetClass(this, 0x10u);
      break;
    case 4u:
      CharCreateClassWin::OnSetClass(this, 0x15u);
      break;
    case 5u:
      CharCreateClassWin::OnSetClass(this, 0x1Au);
      break;
    default:
      return;
  }
}

//----- (00405480) --------------------------------------------------------
CharCreateClassWin *__cdecl CharCreateClassWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  CharCreateClassWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x188u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    CharCreateClassWin::CharCreateClassWin((CharCreateClassWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (CharCreateClassWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (004055B0) --------------------------------------------------------
void __thiscall NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::~NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>(NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *this)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v1; // esi@1

  v1 = this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(this);
  operator delete[](v1->m_ppkHashTable);
}
// 96F8CC: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::`vftable')(void *p, char);

//----- (004055D0) --------------------------------------------------------
void __thiscall NiTMap<unsigned long,NiPointer<PgWinBut>>::~NiTMap<unsigned long,NiPointer<PgWinBut>>(NiTMap<unsigned long,NiPointer<PgWinBut> > *this)
{
  NiTMap<unsigned long,NiPointer<PgWinBut> > *v1; // esi@1

  v1 = this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMap<unsigned long,NiPointer<PgWinBut>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->vfptr);
  v1->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->vfptr);
  operator delete[](v1->m_ppkHashTable);
}
// 96F8CC: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::`vftable')(void *p, char);
// 96F8F0: using guessed type int (__thiscall *NiTMap<unsigned long,NiPointer<PgWinBut>>::`vftable')(void *p, char);

//----- (00405640) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::`vector deleting destructor'(NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(this);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 96F8CC: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::`vftable')(void *p, char);

//----- (00405680) --------------------------------------------------------
NiUnsharedGeometryGroup *__cdecl TextData3::Get(unsigned int eTextID)
{
  int v1; // eax@1
  unsigned int v2; // eax@2
  void *v3; // eax@4
  void *v4; // edi@4
  NiUnsharedGeometryGroup *result; // eax@5
  TextData3::Node kNode; // [sp+8h] [bp-10h]@1

  kNode.pStr = (char *)&unk_96F8EB;
  kNode.pStrVoice = (char *)&unk_96F8EB;
  kNode.pStrSoundEffect = (char *)&unk_96F8EB;
  kNode.dwEnumVal = eTextID;
  v1 = *(_DWORD *)(ITableBase<TextDataType3,TextData3>::ms_pkTable + 56);
  if ( v1 )
    v2 = *(_DWORD *)(v1 + 40);
  else
    v2 = 0;
  v3 = bsearch(&kNode, TextData3::ms_apkNode, v2, 0x10u, TextDataNodeComp);
  v4 = v3;
  if ( v3 )
  {
    if ( strcmp(*((const char **)v3 + 2), "None") )
      SoundMgr::PlayGenderVoice(&g_kSoundMgr, *((char **)v4 + 2));
    if ( strcmp(*((const char **)v4 + 3), "None") )
      SoundMgr::PlayInterfaceSound(&g_kSoundMgr, *((char **)v4 + 3));
    result = (NiUnsharedGeometryGroup *)*((_DWORD *)v4 + 1);
  }
  else
  {
    result = &unk_96F8EB;
  }
  return result;
}
// A88680: using guessed type int ITableBase<TextDataType3,TextData3>::ms_pkTable;

//----- (00405760) --------------------------------------------------------
NiTMap<unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<unsigned long,NiPointer<PgWinBut>>::`vector deleting destructor'(NiTMap<unsigned long,NiPointer<PgWinBut> > *this, unsigned int a2)
{
  NiTMap<unsigned long,NiPointer<PgWinBut> > *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMap<unsigned long,NiPointer<PgWinBut>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->vfptr);
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v2->vfptr);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 96F8CC: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::`vftable')(void *p, char);
// 96F8F0: using guessed type int (__thiscall *NiTMap<unsigned long,NiPointer<PgWinBut>>::`vftable')(void *p, char);

//----- (004057E0) --------------------------------------------------------
CharCreateClassWin *__thiscall CharCreateClassWin::`scalar deleting destructor'(CharCreateClassWin *this, unsigned int a2)
{
  CharCreateClassWin *v2; // esi@1

  v2 = this;
  CharCreateClassWin::~CharCreateClassWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00405810) --------------------------------------------------------
void __thiscall CharCreateDescritWin::SetClass(CharCreateDescritWin *this, char kClass)
{
  char v2; // al@1

  v2 = this->m_kClass;
  if ( v2 != kClass )
  {
    this->m_kOldClass = v2;
    this->m_kClass = kClass;
  }
}

//----- (00405830) --------------------------------------------------------
void __thiscall CharCreateDescritWin::OnCommand(CharCreateDescritWin *this, unsigned int wParam, int lParam)
{
  if ( !wParam )
  {
    this->m_pkListWinContent.m_pObject->m_nViewStartPos = this->m_pkSlideBarList.m_pObject->m_nCurPos;
    SlideListWin::UpdateViewList(this->m_pkListWinContent.m_pObject);
  }
}

//----- (00405860) --------------------------------------------------------
void __thiscall CharCreateDescritWin::UpdateMeWin(CharCreateDescritWin *this, float fCurTime)
{
  CharCreateDescritWin *v2; // esi@1

  v2 = this;
  if ( (unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD))this->m_pkListWinContent.m_pObject->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY) )
  {
    if ( PgWin::ms_iMsDeltaZ <= 0 )
    {
      if ( PgWin::ms_iMsDeltaZ < 0 )
        SlideBar::OnClick2(v2->m_pkSlideBarList.m_pObject);
    }
    else
    {
      SlideBar::OnClick1(v2->m_pkSlideBarList.m_pObject);
    }
  }
}

//----- (004058B0) --------------------------------------------------------
void __thiscall CharCreateDescritWin::UpdateSlideBar(CharCreateDescritWin *this)
{
  CharCreateDescritWin *v1; // esi@1
  SlideBar *v2; // ecx@1
  SlideListWin *v3; // eax@2

  v1 = this;
  v2 = this->m_pkSlideBarList.m_pObject;
  if ( v2 )
  {
    v3 = v1->m_pkListWinContent.m_pObject;
    if ( v3 )
    {
      SlideBar::SetSplitCnt(v2, v3->m_nSlideSplitCnt);
      v1->m_pkListWinContent.m_pObject->m_nViewStartPos = v1->m_pkSlideBarList.m_pObject->m_nCurPos;
      SlideListWin::UpdateViewList(v1->m_pkListWinContent.m_pObject);
    }
  }
}

//----- (00405900) --------------------------------------------------------
void __thiscall CharCreateDescritWin::SetTree(CharCreateDescritWin *this, char kClass)
{
  CharCreateDescritWin *v2; // ebx@1
  char *v3; // esi@2
  signed int v4; // edi@2
  int v5; // esi@4
  signed int v6; // edi@4
  char *v7; // esi@7
  signed int v8; // edi@7
  int v9; // esi@9
  signed int v10; // edi@9

  v2 = this;
  if ( kClass == 26 )
  {
    v3 = (char *)&this->m_pkTreeSpr[2];
    v4 = 3;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 256))(0);
      v3 += 4;
      --v4;
    }
    while ( v4 );
    v5 = (int)&v2->m_pkArrow[1];
    v6 = 3;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v5 + 256))(0);
      v5 += 4;
      --v6;
    }
    while ( v6 );
  }
  else
  {
    v7 = (char *)this->m_pkTreeSpr;
    v8 = 5;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v7 + 256))(1);
      v7 += 4;
      --v8;
    }
    while ( v8 );
    v9 = (int)&v2->m_pkArrow[1];
    v10 = 3;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v9 + 256))(1);
      v9 += 4;
      --v10;
    }
    while ( v10 );
  }
}

//----- (004059A0) --------------------------------------------------------
void __thiscall CharCreateDescritWin::~CharCreateDescritWin(CharCreateDescritWin *this)
{
  CharCreateDescritWin *v1; // esi@1
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // edi@1
  SlideBar *v3; // edi@1
  SlideListWin *v4; // edi@5

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&CharCreateDescritWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CharCreateDescritWin::`vftable'{for `IDirectMessenger'};
  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kClassMap;
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMap<unsigned long,NiPointer<PgWinSpr>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kClassMap);
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned long,NiPointer<PgWinSpr>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v2);
  operator delete[](v2->m_ppkHashTable);
  `eh vector destructor iterator'(
    v1->m_pkArrow,
    4u,
    4,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_pkTreeSpr,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_pkTreeText,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v3 = v1->m_pkSlideBarList.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v4 = v1->m_pkListWinContent.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 96FD2C: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned long,NiPointer<PgWinSpr>>::`vftable')(void *p, char);
// 96FD4C: using guessed type int (__thiscall *NiTMap<unsigned long,NiPointer<PgWinSpr>>::`vftable')(void *p, char);
// 96FD6C: using guessed type void (__thiscall *CharCreateDescritWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 96FD8C: using guessed type int (__thiscall *CharCreateDescritWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00405AE0) --------------------------------------------------------
void __thiscall CharCreateDescritWin::CharCreateDescritWin(CharCreateDescritWin *this)
{
  CharCreateDescritWin *v1; // esi@1
  char *v2; // eax@1
  unsigned int v3; // ST0C_4@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&CharCreateDescritWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CharCreateDescritWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkListWinContent.m_pObject = 0;
  v1->m_pkSlideBarList.m_pObject = 0;
  `eh vector constructor iterator'(
    v1->m_pkTreeText,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_pkTreeSpr,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_pkArrow,
    4u,
    4,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_kClassMap.m_uiHashSize = 37;
  v1->m_kClassMap.vfptr = (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned long,NiPointer<PgWinSpr> >Vtbl *)&NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned long,NiPointer<PgWinSpr>>::`vftable';
  v1->m_kClassMap.m_kAllocator.m_uiCount = 0;
  v2 = (char *)operator new[](0x94u);
  v3 = 4 * v1->m_kClassMap.m_uiHashSize;
  v1->m_kClassMap.m_ppkHashTable = (NiTMapItem<unsigned long,NiPointer<PgWinSpr> > **)v2;
  memset(v2, 0, v3);
  v1->m_kClassMap.vfptr = (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned long,NiPointer<PgWinSpr> >Vtbl *)&NiTMap<unsigned long,NiPointer<PgWinSpr>>::`vftable';
  *(_WORD *)&v1->m_kClass = 257;
}
// 96FD2C: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned long,NiPointer<PgWinSpr>>::`vftable')(void *p, char);
// 96FD4C: using guessed type int (__thiscall *NiTMap<unsigned long,NiPointer<PgWinSpr>>::`vftable')(void *p, char);
// 96FD6C: using guessed type void (__thiscall *CharCreateDescritWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 96FD8C: using guessed type int (__thiscall *CharCreateDescritWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00405C00) --------------------------------------------------------
void __thiscall CharCreateDescritWin::SetMark(CharCreateDescritWin *this, char kClass)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *v2; // esi@1
  const char *v3; // ST00_4@1
  PgWinSpr *v4; // esi@1
  NiPointer<PgWinSpr> spSpr; // [sp+8h] [bp-10h]@1
  int v6; // [sp+14h] [bp-4h]@1

  spSpr.m_pObject = 0;
  v2 = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kClassMap;
  v3 = (const char *)this->m_kOldClass;
  v6 = 0;
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kClassMap,
    v3,
    (NiPointer<NiShaderLibrary> *)&spSpr);
  ((void (__stdcall *)(_DWORD))spSpr.m_pObject->vfptr[64].__vecDelDtor)(0);
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
    v2,
    (const char *)(unsigned __int8)kClass,
    (NiPointer<NiShaderLibrary> *)&spSpr);
  v4 = spSpr.m_pObject;
  spSpr.m_pObject->vfptr[64].__vecDelDtor((NiRefObject *)spSpr.m_pObject, 1u);
  v6 = -1;
  if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
}

//----- (00405CB0) --------------------------------------------------------
void __thiscall CharCreateDescritWin::SetTreeText(CharCreateDescritWin *this, char kClass)
{
  char v2; // bl@1
  CharCreateDescritWin *v3; // esi@1
  int v4; // esi@9
  char *v5; // eax@11
  NiUnsharedGeometryGroup *v6; // eax@12
  int i; // [sp+8h] [bp-8h]@9
  char v8; // [sp+Eh] [bp-2h]@9
  char uiBaseClass; // [sp+Fh] [bp-1h]@2

  v2 = kClass;
  v3 = this;
  switch ( kClass )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      uiBaseClass = 1;
      break;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      uiBaseClass = 6;
      break;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      uiBaseClass = 11;
      break;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      uiBaseClass = 16;
      break;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      uiBaseClass = 21;
      break;
    case 0x1A:
    case 0x1B:
      uiBaseClass = 26;
      break;
    default:
      uiBaseClass = 0;
      break;
  }
  i = 0;
  v8 = CharClass::GetBaseClassID(kClass);
  v4 = (int)v3->m_pkTreeText;
  do
  {
    if ( uiBaseClass == v8 )
    {
      v5 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), (unsigned __int8)v2);
      if ( v5 )
        v6 = (NiUnsharedGeometryGroup *)(v5 + 21);
      else
        v6 = &unk_96F8EB;
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 472))(v6);
      v2 = kClass + i + 1;
    }
    v4 += 4;
    ++i;
  }
  while ( i < 5 );
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (00405DE0) --------------------------------------------------------
CharCreateDescritWin *__cdecl CharCreateDescritWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  CharCreateDescritWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1ACu);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    CharCreateDescritWin::CharCreateDescritWin((CharCreateDescritWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (CharCreateDescritWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00405F10) --------------------------------------------------------
void __thiscall CharCreateDescritWin::AddTextWithSplit(CharCreateDescritWin *this, char *pcText)
{
  char *v2; // ebx@1
  CharCreateDescritWin *v3; // edi@1
  SlideListWin *v4; // eax@1
  int v5; // ecx@1
  ColumnBut **v6; // edx@3
  PgWinText *v7; // eax@4
  CSpFont *v8; // esi@7
  int v9; // eax@8
  char *i; // esi@8
  int v11; // eax@9
  SlideBar *v12; // ecx@10
  SlideListWin *v13; // eax@11
  PgFont *pkFont; // [sp+10h] [bp-31Ch]@7
  CharCreateDescritWin *v15; // [sp+14h] [bp-318h]@1
  PgWinText *pkTestWin; // [sp+18h] [bp-314h]@2
  char szText[256]; // [sp+1Ch] [bp-310h]@1
  char szTemp2[256]; // [sp+11Ch] [bp-210h]@1
  char szTemp[256]; // [sp+21Ch] [bp-110h]@1

  v2 = pcText;
  v3 = this;
  v15 = this;
  szTemp[0] = 0;
  memset(&szTemp[1], 0, 0xFFu);
  szTemp2[0] = 0;
  memset(&szTemp2[1], 0, 0xFFu);
  szText[0] = 0;
  memset(&szText[1], 0, 0xFFu);
  v4 = v3->m_pkListWinContent.m_pObject;
  v5 = v4->m_vecButList._Mylast - v4->m_vecButList._Myfirst;
  if ( v5 )
  {
    v6 = v4->m_vecButList._Myfirst;
    if ( (*v6)->m_vecTextWin._Mylast - (*v6)->m_vecTextWin._Myfirst )
      v7 = *(*v6)->m_vecTextWin._Myfirst;
    else
      v7 = 0;
    pkTestWin = v7;
    v5 = (int)v7;
  }
  else
  {
    pkTestWin = 0;
  }
  v8 = *(CSpFont **)(*(_DWORD *)(v5 + 288) + 312);
  pkFont = (PgFont *)v8;
  if ( v8 )
  {
    v9 = (*(int (**)(void))(*(_DWORD *)v5 + 144))();
    for ( i = CSpFont::SplitStrByPixelSize(v8, pcText, v9, 1);
          i;
          i = CSpFont::SplitStrByPixelSize((CSpFont *)&pkFont->vfptr, i, v11, 1) )
    {
      strncpy(szTemp, v2, i - v2);
      szTemp[i - v2] = 0;
      sprintf(szTemp2, "%s%s", szText, szTemp);
      v3 = v15;
      SlideListWin::AddText(v15->m_pkListWinContent.m_pObject, szTemp2);
      SlideListWin::AlignText(v15->m_pkListWinContent.m_pObject, 0);
      v2 = i;
      v11 = ((int (*)(void))pkTestWin->vfptr[36].__vecDelDtor)();
    }
    v12 = v3->m_pkSlideBarList.m_pObject;
    if ( v12 )
    {
      v13 = v3->m_pkListWinContent.m_pObject;
      if ( v13 )
      {
        SlideBar::SetSplitCnt(v12, v13->m_nSlideSplitCnt);
        v3->m_pkListWinContent.m_pObject->m_nViewStartPos = v3->m_pkSlideBarList.m_pObject->m_nCurPos;
        SlideListWin::UpdateViewList(v3->m_pkListWinContent.m_pObject);
      }
    }
  }
  SlideListWin::UpdateViewList(v3->m_pkListWinContent.m_pObject);
}

//----- (00406120) --------------------------------------------------------
void __thiscall CharCreateDescritWin::SetDescription(CharCreateDescritWin *this, char kClass)
{
  CharCreateDescritWin *v2; // esi@1
  char *v3; // eax@2
  char *v4; // eax@2
  char *v5; // eax@2
  char *v6; // eax@3
  char *v7; // eax@3
  char *v8; // eax@3
  char *v9; // eax@4
  char *v10; // eax@4
  char *v11; // eax@4
  char *v12; // eax@5
  char *v13; // eax@5
  char *v14; // eax@5
  char *v15; // eax@6
  char *v16; // eax@6
  char *v17; // eax@6
  char *v18; // eax@7
  char *v19; // eax@7
  char *v20; // eax@7

  v2 = this;
  SlideListWin::RemoveAllList(this->m_pkListWinContent.m_pObject);
  switch ( kClass )
  {
    case 1:
      v3 = (char *)TextData2::Get(0xD204354D);
      CharCreateDescritWin::AddTextWithSplit(v2, v3);
      SlideListWin::AddText(v2->m_pkListWinContent.m_pObject, "\n");
      v4 = (char *)TextData2::Get(0xD205354D);
      CharCreateDescritWin::AddTextWithSplit(v2, v4);
      SlideListWin::AddText(v2->m_pkListWinContent.m_pObject, "\n");
      v5 = (char *)TextData2::Get(0xD206354D);
      CharCreateDescritWin::AddTextWithSplit(v2, v5);
      SlideListWin::AddText(v2->m_pkListWinContent.m_pObject, "\n");
      break;
    case 0xB:
      v6 = (char *)TextData2::Get(0xD9DFF23D);
      CharCreateDescritWin::AddTextWithSplit(v2, v6);
      SlideListWin::AddText(v2->m_pkListWinContent.m_pObject, "\n");
      v7 = (char *)TextData2::Get(0xD9DFF33D);
      CharCreateDescritWin::AddTextWithSplit(v2, v7);
      SlideListWin::AddText(v2->m_pkListWinContent.m_pObject, "\n");
      v8 = (char *)TextData2::Get(0xD9DFF43D);
      CharCreateDescritWin::AddTextWithSplit(v2, v8);
      SlideListWin::AddText(v2->m_pkListWinContent.m_pObject, "\n");
      break;
    case 6:
      v9 = (char *)TextData2::Get(0xDBCAF847);
      CharCreateDescritWin::AddTextWithSplit(v2, v9);
      SlideListWin::AddText(v2->m_pkListWinContent.m_pObject, "\n");
      v10 = (char *)TextData2::Get(0xDBCAF947);
      CharCreateDescritWin::AddTextWithSplit(v2, v10);
      SlideListWin::AddText(v2->m_pkListWinContent.m_pObject, "\n");
      v11 = (char *)TextData2::Get(0xDBCAFA47);
      CharCreateDescritWin::AddTextWithSplit(v2, v11);
      SlideListWin::AddText(v2->m_pkListWinContent.m_pObject, "\n");
      break;
    case 0x10:
      v12 = (char *)TextData2::Get(0xAEDEE8D8);
      CharCreateDescritWin::AddTextWithSplit(v2, v12);
      SlideListWin::AddText(v2->m_pkListWinContent.m_pObject, "\n");
      v13 = (char *)TextData2::Get(0xAFDEE8D8);
      CharCreateDescritWin::AddTextWithSplit(v2, v13);
      SlideListWin::AddText(v2->m_pkListWinContent.m_pObject, "\n");
      v14 = (char *)TextData2::Get(0xB0DEE8D8);
      CharCreateDescritWin::AddTextWithSplit(v2, v14);
      SlideListWin::AddText(v2->m_pkListWinContent.m_pObject, "\n");
      break;
    case 0x15:
      v15 = (char *)TextData2::Get(0xDBF2CF11);
      CharCreateDescritWin::AddTextWithSplit(v2, v15);
      SlideListWin::AddText(v2->m_pkListWinContent.m_pObject, "\n");
      v16 = (char *)TextData2::Get(0xDBF2CF12);
      CharCreateDescritWin::AddTextWithSplit(v2, v16);
      SlideListWin::AddText(v2->m_pkListWinContent.m_pObject, "\n");
      v17 = (char *)TextData2::Get(0xDBF2CF13);
      CharCreateDescritWin::AddTextWithSplit(v2, v17);
      SlideListWin::AddText(v2->m_pkListWinContent.m_pObject, "\n");
      break;
    case 0x1A:
      v18 = (char *)TextData3::Get(0x2745FE41u);
      CharCreateDescritWin::AddTextWithSplit(v2, v18);
      SlideListWin::AddText(v2->m_pkListWinContent.m_pObject, "\n");
      v19 = (char *)TextData3::Get(0x2745FE42u);
      CharCreateDescritWin::AddTextWithSplit(v2, v19);
      SlideListWin::AddText(v2->m_pkListWinContent.m_pObject, "\n");
      v20 = (char *)TextData3::Get(0x2745FE43u);
      CharCreateDescritWin::AddTextWithSplit(v2, v20);
      SlideListWin::AddText(v2->m_pkListWinContent.m_pObject, "\n");
      break;
    default:
      return;
  }
}

//----- (00406440) --------------------------------------------------------
void __thiscall CharCreateDescritWin::UpdateView(CharCreateDescritWin *this)
{
  CharCreateDescritWin *v1; // esi@1

  v1 = this;
  CharCreateDescritWin::SetDescription(this, this->m_kClass);
  CharCreateDescritWin::SetMark(v1, v1->m_kClass);
  CharCreateDescritWin::SetTree(v1, v1->m_kClass);
  CharCreateDescritWin::SetTreeText(v1, v1->m_kClass);
}

//----- (00406480) --------------------------------------------------------
char __thiscall CharCreateDescritWin::Create(CharCreateDescritWin *this, PgFrameWork *pkFrameWork)
{
  CharCreateDescritWin *v2; // esi@1
  NiTexturePalette *v3; // ebx@1
  const char *v4; // eax@3
  NiNode *v5; // eax@3
  NiNode *v6; // esi@7
  volatile LONG *v7; // eax@7
  PgSprData *v9; // eax@12
  float v10; // ecx@15
  PgWinSpr *v11; // eax@15
  PgWinSpr *v12; // ebx@17
  PgWinSpr *v13; // ebx@19
  PgWinSpr *v14; // ebx@21
  PgWinSpr *v15; // ebx@23
  PgWinSpr *v16; // ebx@25
  void *(__thiscall *v17)(NiRefObject *, unsigned int); // eax@27
  int v18; // eax@27
  PgWinSpr *v19; // eax@28
  PgWinSpr *v20; // edi@28
  PgWinSpr *v21; // ebx@28
  int v22; // eax@36
  int *v23; // ebx@36
  D3DXCOLOR v24; // ST24_16@37
  PgWinText *v25; // eax@37
  PgWinText *v26; // edi@37
  int v27; // edi@45
  PgFont *v28; // eax@45
  PgWinSpr *v29; // eax@47
  PgWinSpr *v30; // edi@47
  PgWinSpr *v31; // ebx@47
  SLWCreateInfo::Item *v32; // edi@55
  SLWCreateInfo::Item *v33; // edi@57
  PgSprData *v34; // eax@59
  SlideListWin *v35; // eax@59
  SlideListWin *v36; // edi@59
  PgSprData *v37; // eax@67
  SlideBar *v38; // eax@67
  SlideBar *v39; // edi@67
  SlideBar *v40; // ebx@67
  SlideBar *v41; // edi@74
  NiRefObjectVtbl *v42; // ebx@74
  int v43; // eax@74
  NiRefObjectVtbl *v44; // edx@74
  int v45; // eax@74
  NiRefObjectVtbl *v46; // edi@74
  NiNode *v47; // esi@76
  int v48; // [sp+3Ch] [bp-A4h]@15
  NiPointer<PgWinBut> v49; // [sp+40h] [bp-A0h]@19
  SLWCreateInfo kCreateInfo; // [sp+50h] [bp-90h]@55
  UIUtil ui; // [sp+6Ch] [bp-74h]@15
  int uiTop; // [sp+80h] [bp-60h]@12
  int uiLeft; // [sp+84h] [bp-5Ch]@12
  NiPointer<PgWinSpr> *v54; // [sp+88h] [bp-58h]@27
  NiPointer<NiNode> spNode; // [sp+8Ch] [bp-54h]@1
  int i; // [sp+90h] [bp-50h]@15
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+94h] [bp-4Ch]@55
  char acBuf[32]; // [sp+B0h] [bp-30h]@27
  int v59; // [sp+DCh] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v59 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "charcreate\\ClassTree.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = spNode.m_pObject;
  if ( !spNode.m_pObject )
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("ClassTree.nif Load Fail", "LoadFail", spNode.m_pObject);
      v5 = spNode.m_pObject;
    }
    v59 = -1;
    if ( !v5 )
      return 0;
    v6 = v5;
    v7 = (volatile LONG *)&v5->m_uiRefCount;
    goto LABEL_8;
  }
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "CharCreateDescritWin", 0) )
  {
    v6 = spNode.m_pObject;
    v59 = -1;
    if ( !spNode.m_pObject )
      return 0;
    v7 = (volatile LONG *)&spNode.m_pObject->m_uiRefCount;
LABEL_8:
    if ( !InterlockedDecrement(v7) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v59) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, uiLeft, uiTop);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  *(float *)&v48 = v10;
  *(float *)&i = COERCE_FLOAT(&v48);
  *(float *)&v11 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, "ClassSmall_Fighter", 0));
  v48 = (int)v11;
  if ( *(float *)&v11 != 0.0 )
    InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
  NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
    (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v2->m_kClassMap,
    1u,
    (NiPointer<PgWinBut>)v48);
  *(float *)&v12 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, "ClassSmall_Archer", 0));
  *(float *)&i = COERCE_FLOAT(&v48);
  v48 = (int)v12;
  if ( *(float *)&v12 != 0.0 )
    InterlockedIncrement((volatile LONG *)&v12->m_uiRefCount);
  NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
    (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v2->m_kClassMap,
    0xBu,
    (NiPointer<PgWinBut>)v48);
  ((void (__thiscall *)(PgWinSpr *, _DWORD, PgWinBut *))v12->vfptr[64].__vecDelDtor)(v12, 0, v49.m_pObject);
  v13 = UIUtil::CreateSpr(&ui, "ClassSmall_Cleric", 0);
  *(float *)&i = COERCE_FLOAT(&v49);
  v49.m_pObject = (PgWinBut *)v13;
  if ( v13 )
    InterlockedIncrement((volatile LONG *)&v13->m_uiRefCount);
  NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
    (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v2->m_kClassMap,
    6u,
    v49);
  v13->vfptr[64].__vecDelDtor((NiRefObject *)v13, 0);
  v14 = UIUtil::CreateSpr(&ui, "ClassSmall_Mage", 0);
  *(float *)&i = COERCE_FLOAT(&v49);
  v49.m_pObject = (PgWinBut *)v14;
  if ( v14 )
    InterlockedIncrement((volatile LONG *)&v14->m_uiRefCount);
  NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
    (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v2->m_kClassMap,
    0x10u,
    v49);
  v14->vfptr[64].__vecDelDtor((NiRefObject *)v14, 0);
  v15 = UIUtil::CreateSpr(&ui, "ClassSmall_Joker", 0);
  *(float *)&i = COERCE_FLOAT(&v49);
  v49.m_pObject = (PgWinBut *)v15;
  if ( v15 )
    InterlockedIncrement((volatile LONG *)&v15->m_uiRefCount);
  NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
    (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v2->m_kClassMap,
    0x15u,
    v49);
  v15->vfptr[64].__vecDelDtor((NiRefObject *)v15, 0);
  v16 = UIUtil::CreateSpr(&ui, "ClassSmall_Sentinel", 0);
  *(float *)&i = COERCE_FLOAT(&v49);
  v49.m_pObject = (PgWinBut *)v16;
  if ( v16 )
    InterlockedIncrement((volatile LONG *)&v16->m_uiRefCount);
  NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
    (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v2->m_kClassMap,
    0x1Au,
    v49);
  v17 = v16->vfptr[64].__vecDelDtor;
  v49.m_pObject = 0;
  ((void (__thiscall *)(PgWinSpr *))v17)(v16);
  v18 = 0;
  acBuf[0] = 0;
  *(_DWORD *)&acBuf[1] = 0;
  *(_DWORD *)&acBuf[5] = 0;
  *(_DWORD *)&acBuf[9] = 0;
  *(_DWORD *)&acBuf[13] = 0;
  *(_DWORD *)&acBuf[17] = 0;
  *(_DWORD *)&acBuf[21] = 0;
  *(_DWORD *)&acBuf[25] = 0;
  *(_WORD *)&acBuf[29] = 0;
  acBuf[31] = 0;
  v54 = v2->m_pkTreeSpr;
  do
  {
    v48 = v18 + 1;
    i = v18 + 1;
    sprintf(acBuf, "ClassTree0%d", v18 + 1);
    v19 = UIUtil::CreateSpr(&ui, acBuf, 0);
    v20 = v54->m_pObject;
    v21 = v19;
    if ( v54->m_pObject != v19 )
    {
      if ( v20 && !InterlockedDecrement((volatile LONG *)&v20->m_uiRefCount) && v20 )
        v20->vfptr->__vecDelDtor((NiRefObject *)v20, 1u);
      v54->m_pObject = v21;
      if ( v21 )
        InterlockedIncrement((volatile LONG *)&v21->m_uiRefCount);
    }
    v18 = i;
    ++v54;
  }
  while ( i < 5 );
  v22 = 0;
  v23 = (int *)v2->m_pkTreeText;
  do
  {
    v48 = v22 + 1;
    v54 = (NiPointer<PgWinSpr> *)(v22 + 1);
    sprintf(acBuf, "Text0%d", v22 + 1);
    *(_QWORD *)&v24.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v24.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v25 = UIUtil::CreateTextNoSprEx(&ui, acBuf, "-", v24, 5u, 0, 0);
    v26 = (PgWinText *)*v23;
    i = (int)v25;
    if ( v26 != v25 )
    {
      if ( v26 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v26->m_uiRefCount) && v26 )
          v26->vfptr->__vecDelDtor((NiRefObject *)v26, 1u);
        v25 = (PgWinText *)i;
      }
      *v23 = (int)v25;
      if ( v25 )
        InterlockedIncrement((volatile LONG *)&v25->m_uiRefCount);
    }
    v27 = *(_DWORD *)*v23;
    i = *v23;
    v28 = Font::Get(0);
    (*(void (__thiscall **)(int, PgFont *))(v27 + 452))(i, v28);
    (*(void (__stdcall **)(_DWORD))(*(_DWORD *)*v23 + 240))(0);
    v22 = (int)v54;
    ++v23;
  }
  while ( (signed int)v54 < 5 );
  *(float *)&i = 0.0;
  v54 = v2->m_pkArrow;
  do
  {
    v48 = i;
    sprintf(acBuf, "arrow_0%d", i);
    v29 = UIUtil::CreateSpr(&ui, acBuf, 0);
    v30 = v54->m_pObject;
    v31 = v29;
    if ( v54->m_pObject != v29 )
    {
      if ( v30 && !InterlockedDecrement((volatile LONG *)&v30->m_uiRefCount) && v30 )
        v30->vfptr->__vecDelDtor((NiRefObject *)v30, 1u);
      v54->m_pObject = v31;
      if ( v31 )
        InterlockedIncrement((volatile LONG *)&v31->m_uiRefCount);
    }
    ++v54;
    ++i;
  }
  while ( i < 4 );
  kCreateInfo.m_arrItem._Myfirst = 0;
  kCreateInfo.m_arrItem._Mylast = 0;
  kCreateInfo.m_arrItem._Myend = 0;
  LOBYTE(v59) = 2;
  kCreateInfo.m_bMakeData = 0;
  kCreateInfo.m_nOffX = 0;
  kCreateInfo.m_nOffY = 0;
  v32 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
  v32->nItemType = 1;
  v48 = 9;
  v32->pNode = spNode.m_pObject;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnNor", v48);
  LOBYTE(v59) = 3;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &v32->vecNodeName,
    &_Val);
  LOBYTE(v59) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v33 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  v33->nItemType = 2;
  v48 = 6;
  v33->pNode = spNode.m_pObject;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column", v48);
  LOBYTE(v59) = 4;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &v33->vecNodeName,
    &_Val);
  LOBYTE(v59) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
  v34 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextBox_ClassExp", &uiLeft, &uiTop, 0);
  v35 = SlideListWin::CreateWin(uiLeft, uiTop, v34, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 1);
  v36 = v2->m_pkListWinContent.m_pObject;
  i = (int)v35;
  if ( v36 != v35 )
  {
    if ( v36 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v36->m_uiRefCount) && v36 )
        v36->vfptr->__vecDelDtor((NiRefObject *)v36, 1u);
      v35 = (SlideListWin *)i;
    }
    v2->m_pkListWinContent.m_pObject = v35;
    if ( v35 )
      InterlockedIncrement((volatile LONG *)&v35->m_uiRefCount);
  }
  v2->m_pkListWinContent.m_pObject->m_bCheckEnable = 0;
  SlideListWin::UpdateViewList(v2->m_pkListWinContent.m_pObject);
  SlideListWin::AlignText(v2->m_pkListWinContent.m_pObject, 0);
  SlideListWin::UpdateViewList(v2->m_pkListWinContent.m_pObject);
  v37 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle", &uiLeft, &uiTop, 0);
  v38 = SlideBar::CreateWin(
          spNode.m_pObject,
          "SlideBar",
          "SlideBar_UpBtn",
          "SlideBar_DnBtn",
          v37,
          0,
          (PgWin *)&v2->vfptr);
  v39 = v2->m_pkSlideBarList.m_pObject;
  v40 = v38;
  if ( v39 != v38 )
  {
    if ( v39 && !InterlockedDecrement((volatile LONG *)&v39->m_uiRefCount) && v39 )
      v39->vfptr->__vecDelDtor((NiRefObject *)v39, 1u);
    v2->m_pkSlideBarList.m_pObject = v40;
    if ( v40 )
      InterlockedIncrement((volatile LONG *)&v40->m_uiRefCount);
  }
  v2->m_pkSlideBarList.m_pObject->m_uiClickMsg = 0;
  v2->m_pkSlideBarList.m_pObject->m_eType = 1;
  v41 = v2->m_pkSlideBarList.m_pObject;
  v42 = v41->vfptr;
  *(float *)&v43 = COERCE_FLOAT(((int (__thiscall *)(SlideBar *))v41->vfptr[42].__vecDelDtor)(v2->m_pkSlideBarList.m_pObject));
  v44 = v41->vfptr;
  v48 = v43;
  v45 = (int)v44[41].__vecDelDtor((NiRefObject *)v41, v43);
  v42[77].__vecDelDtor((NiRefObject *)v41, v45);
  SlideBar::SetSplitCnt(v2->m_pkSlideBarList.m_pObject, 4);
  ((void (__thiscall *)(CharCreateDescritWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    1.0,
    1.0);
  v46 = v2->vfptr;
  v48 = ((int (__thiscall *)(CharCreateDescritWin *))v2->vfptr[42].__vecDelDtor)(v2) - 10;
  *(float *)&v48 = COERCE_FLOAT((int)v2->vfptr[41].__vecDelDtor((NiRefObject *)v2, v48));
  v46[77].__vecDelDtor((NiRefObject *)v2, v48);
  v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
  v2->vfptr[60].__vecDelDtor((NiRefObject *)v2, 1u);
  LOBYTE(v59) = 1;
  if ( kCreateInfo.m_arrItem._Myfirst )
  {
    v48 = i;
    std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(
      kCreateInfo.m_arrItem._Myfirst,
      kCreateInfo.m_arrItem._Mylast);
    operator delete(kCreateInfo.m_arrItem._Myfirst);
  }
  kCreateInfo.m_arrItem._Myfirst = 0;
  kCreateInfo.m_arrItem._Mylast = 0;
  kCreateInfo.m_arrItem._Myend = 0;
  LOBYTE(v59) = 0;
  UIUtil::~UIUtil(&ui);
  v47 = spNode.m_pObject;
  v59 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v47 )
    v47->vfptr->__vecDelDtor((NiRefObject *)v47, 1u);
  return 1;
}
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00406C90) --------------------------------------------------------
void __thiscall boost::detail::sp_counted_base::weak_release(boost::detail::sp_counted_base *this)
{
  boost::detail::sp_counted_base *v1; // ebx@1
  volatile LONG *v2; // edi@1
  int v3; // esi@3

  v1 = this;
  v2 = (volatile LONG *)&this->mtx_.l_;
  while ( InterlockedExchange(v2, 1) )
    Sleep(1u);
  v3 = v1->weak_count_ - 1;
  v1->weak_count_ = v3;
  InterlockedExchange(v2, 0);
  if ( !v3 )
    v1->vfptr->destruct(v1);
}

//----- (00406CE0) --------------------------------------------------------
char __cdecl CharClass::GetBaseClassID(char kClassID)
{
  char result; // al@2

  switch ( kClassID )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      result = 1;
      break;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      result = 6;
      break;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      result = 11;
      break;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      result = 16;
      break;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      result = 21;
      break;
    case 0x1A:
    case 0x1B:
      result = 26;
      break;
    default:
      result = 0;
      break;
  }
  return result;
}

//----- (00406D80) --------------------------------------------------------
void __thiscall NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned long,NiPointer<PgWinSpr>>::~NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned long,NiPointer<PgWinSpr>>(NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned long,NiPointer<PgWinSpr> > *this)
{
  NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned long,NiPointer<PgWinSpr> > *v1; // esi@1

  v1 = this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned long,NiPointer<PgWinSpr> >Vtbl *)&NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned long,NiPointer<PgWinSpr>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v1->m_ppkHashTable);
}
// 96FD2C: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned long,NiPointer<PgWinSpr>>::`vftable')(void *p, char);

//----- (00406DA0) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned long,NiPointer<PgWinSpr> > *__thiscall NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned long,NiPointer<PgWinSpr>>::`vector deleting destructor'(NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned long,NiPointer<PgWinSpr> > *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned long,NiPointer<PgWinSpr> > *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned long,NiPointer<PgWinSpr> >Vtbl *)&NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned long,NiPointer<PgWinSpr>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 96FD2C: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned long,NiPointer<PgWinSpr>>::`vftable')(void *p, char);

//----- (00406DE0) --------------------------------------------------------
void __thiscall boost::detail::sp_counted_base::release(boost::detail::sp_counted_base *this)
{
  boost::detail::sp_counted_base *v1; // edi@1
  volatile LONG *v2; // esi@1
  int v3; // eax@3

  v1 = this;
  v2 = (volatile LONG *)&this->mtx_.l_;
  while ( InterlockedExchange(v2, 1) )
    Sleep(1u);
  v3 = v1->use_count_ - 1;
  v1->use_count_ = v3;
  if ( v3 )
  {
    InterlockedExchange(v2, 0);
  }
  else
  {
    InterlockedExchange(v2, 0);
    v1->vfptr->dispose(v1);
    boost::detail::sp_counted_base::weak_release(v1);
  }
}

//----- (00406E30) --------------------------------------------------------
boost::detail::shared_count *__thiscall boost::detail::shared_count::operator=(boost::detail::shared_count *this, boost::detail::shared_count *r)
{
  boost::detail::sp_counted_base *v2; // edi@1
  boost::detail::shared_count *v3; // esi@1
  boost::detail::shared_count *v5; // [sp+8h] [bp-4h]@1

  v2 = r->pi_;
  v3 = this;
  v5 = this;
  if ( r->pi_ )
  {
    while ( InterlockedExchange((volatile LONG *)&v2->mtx_.l_, 1) )
      Sleep(1u);
    ++v2->use_count_;
    InterlockedExchange((volatile LONG *)&v2->mtx_.l_, 0);
    v3 = v5;
  }
  if ( v3->pi_ )
    boost::detail::sp_counted_base::release(v3->pi_);
  v3->pi_ = v2;
  return v3;
}

//----- (00406E90) --------------------------------------------------------
PgWinText *__thiscall SlideListWin::GetTextWin(SlideListWin *this, unsigned int uiIndex, unsigned int uiColumn)
{
  PgWinText *result; // eax@2
  ColumnBut *v4; // eax@3

  if ( uiIndex >= this->m_vecButList._Mylast - this->m_vecButList._Myfirst
    || (v4 = this->m_vecButList._Myfirst[uiIndex], uiColumn >= v4->m_vecTextWin._Mylast - v4->m_vecTextWin._Myfirst) )
  {
    result = 0;
  }
  else
  {
    result = v4->m_vecTextWin._Myfirst[uiColumn];
  }
  return result;
}

//----- (00406EE0) --------------------------------------------------------
NiUnsharedGeometryGroup *__cdecl TextData2::Get(unsigned int eTextID)
{
  int v1; // eax@1
  unsigned int v2; // eax@2
  void *v3; // eax@4
  void *v4; // edi@4
  NiUnsharedGeometryGroup *result; // eax@5
  TextData2::Node kNode; // [sp+8h] [bp-10h]@1

  kNode.pStr = (char *)&unk_96F8EB;
  kNode.pStrVoice = (char *)&unk_96F8EB;
  kNode.pStrSoundEffect = (char *)&unk_96F8EB;
  kNode.dwEnumVal = eTextID;
  v1 = *(_DWORD *)(ITableBase<TextDataType2,TextData2>::ms_pkTable + 56);
  if ( v1 )
    v2 = *(_DWORD *)(v1 + 40);
  else
    v2 = 0;
  v3 = bsearch(&kNode, TextData2::ms_apkNode, v2, 0x10u, TextDataNodeComp);
  v4 = v3;
  if ( v3 )
  {
    if ( strcmp(*((const char **)v3 + 2), "None") )
      SoundMgr::PlayGenderVoice(&g_kSoundMgr, *((char **)v4 + 2));
    if ( strcmp(*((const char **)v4 + 3), "None") )
      SoundMgr::PlayInterfaceSound(&g_kSoundMgr, *((char **)v4 + 3));
    result = (NiUnsharedGeometryGroup *)*((_DWORD *)v4 + 1);
  }
  else
  {
    result = &unk_96F8EB;
  }
  return result;
}
// A88684: using guessed type int ITableBase<TextDataType2,TextData2>::ms_pkTable;

//----- (00406FC0) --------------------------------------------------------
void __thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Chassign(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int _Off, unsigned int _Count, char _Ch)
{
  if ( _Count == 1 )
  {
    if ( this->_Myres >= 0x10 )
      this = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)this->_Bx._Ptr;
    this->_Bx._Buf[_Off] = _Ch;
  }
  else
  {
    if ( this->_Myres >= 0x10 )
      this = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)this->_Bx._Ptr;
    memset((char *)this + _Off, _Ch, _Count);
  }
}

//----- (00407000) --------------------------------------------------------
void __thiscall boost::shared_ptr<SLWCreateInfo::Item>::~shared_ptr<SLWCreateInfo::Item>(boost::shared_ptr<PgNsTerrain::CPgBlockObject> *this)
{
  boost::detail::sp_counted_base *v1; // ecx@1

  v1 = this->pn.pi_;
  if ( v1 )
    boost::detail::sp_counted_base::release(v1);
}

//----- (00407010) --------------------------------------------------------
void __thiscall NiPointer<PgWinLRBut>::`default constructor closure'(NiPointer<NiD3DTextureStage> *this)
{
  this->m_pObject = 0;
}

//----- (00407020) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<unsigned long,NiPointer<PgWinSpr>>::`scalar deleting destructor'(NiTMap<unsigned long,NiPointer<PgWinSpr> > *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // esi@1

  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned long,NiPointer<PgWinSpr> >Vtbl *)&NiTMap<unsigned long,NiPointer<PgWinSpr>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned long,NiPointer<PgWinSpr>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v2);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 96FD2C: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned long,NiPointer<PgWinSpr>>::`vftable')(void *p, char);
// 96FD4C: using guessed type int (__thiscall *NiTMap<unsigned long,NiPointer<PgWinSpr>>::`vftable')(void *p, char);

//----- (004070A0) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__stdcall std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::allocate(unsigned int _Count)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result; // eax@1
  std::exception pExceptionObject; // [sp+0h] [bp-Ch]@4

  result = 0;
  if ( _Count )
  {
    if ( _Count > 0x9249249
      || (result = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)operator new(28 * _Count)) == 0 )
    {
      _Count = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&_Count);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
  }
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00407100) --------------------------------------------------------
NiUnsharedGeometryGroup *__cdecl CharClass::GetLocalName(char kClassID)
{
  char *v1; // eax@1
  NiUnsharedGeometryGroup *result; // eax@2

  v1 = CDataReader::GetRecord(
         (CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4),
         (unsigned __int8)kClassID);
  if ( v1 )
    result = (NiUnsharedGeometryGroup *)(v1 + 21);
  else
    result = &unk_96F8EB;
  return result;
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (00407130) --------------------------------------------------------
CharCreateDescritWin *__thiscall CharCreateDescritWin::`scalar deleting destructor'(CharCreateDescritWin *this, unsigned int a2)
{
  CharCreateDescritWin *v2; // esi@1

  v2 = this;
  CharCreateDescritWin::~CharCreateDescritWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00407160) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int _Count, char _Ch)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // esi@1
  unsigned int v4; // eax@1
  unsigned int v5; // edi@4
  unsigned int v6; // ecx@6
  bool v7; // cf@8
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result; // eax@9

  v3 = this;
  v4 = this->_Mysize;
  if ( -1 - v4 <= _Count )
    std::_Xlength_error("string too long");
  if ( !_Count )
    return v3;
  v5 = v4 + _Count;
  if ( v4 + _Count > 0xFFFFFFFE )
    std::_Xlength_error("string too long");
  v6 = this->_Myres;
  if ( v6 < v5 )
  {
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Copy(v3, v4 + _Count, v4);
    if ( v5 )
    {
LABEL_8:
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Chassign(v3, v3->_Mysize, _Count, _Ch);
      v7 = v3->_Myres < 0x10;
      v3->_Mysize = v5;
      if ( !v7 )
      {
        v3->_Bx._Ptr[v5] = 0;
        return v3;
      }
      v3->_Bx._Buf[v5] = 0;
    }
    return v3;
  }
  if ( v5 )
    goto LABEL_8;
  v3->_Mysize = 0;
  if ( v6 < 0x10 )
  {
    result = v3;
    v3->_Bx._Buf[0] = 0;
  }
  else
  {
    *v3->_Bx._Ptr = 0;
    result = v3;
  }
  return result;
}

//----- (00407210) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator=(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, const char *_Ptr)
{
  return std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(this, _Ptr, strlen(_Ptr));
}

//----- (00407240) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Right)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v2; // esi@1

  v2 = this;
  if ( this != _Right )
  {
    if ( this->_Myres >= 0x10 )
      operator delete(this->_Bx._Ptr);
    v2->_Myres = 15;
    v2->_Mysize = 0;
    v2->_Bx._Buf[0] = 0;
    if ( _Right->_Myres >= 0x10 )
    {
      v2->_Bx._Ptr = _Right->_Bx._Ptr;
      _Right->_Bx._Ptr = 0;
    }
    else
    {
      memmove(v2->_Bx._Buf, _Right->_Bx._Buf, _Right->_Mysize + 1);
    }
    v2->_Mysize = _Right->_Mysize;
    v2->_Myres = _Right->_Myres;
    _Right->_Myres = 15;
    _Right->_Mysize = 0;
    _Right->_Bx._Buf[0] = 0;
  }
  return v2;
}

//----- (004072C0) --------------------------------------------------------
void __cdecl std::_Destroy_range<std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_First, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Last)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *i; // esi@1

  for ( i = _First; i != _Last; ++i )
  {
    if ( i->_Myres >= 0x10 )
      operator delete(i->_Bx._Ptr);
    i->_Myres = 15;
    i->_Mysize = 0;
    i->_Bx._Buf[0] = 0;
  }
}

//----- (00407300) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__cdecl std::_Uninit_move<std::basic_string<char,std::char_traits<char>,std::allocator<char>> *,std::basic_string<char,std::char_traits<char>,std::allocator<char>> *,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_First, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Last, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Dest)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // edi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v4; // esi@1

  v3 = _First;
  v4 = _Dest;
  while ( v3 != _Last )
  {
    if ( v4 )
    {
      v4->_Myres = 15;
      v4->_Mysize = 0;
      v4->_Bx._Buf[0] = 0;
      if ( v4 != v3 )
      {
        if ( v4->_Myres >= 0x10 )
          operator delete(v4->_Bx._Ptr);
        v4->_Myres = 15;
        v4->_Mysize = 0;
        v4->_Bx._Buf[0] = 0;
        if ( v3->_Myres >= 0x10 )
        {
          v4->_Bx._Ptr = v3->_Bx._Ptr;
          v3->_Bx._Ptr = 0;
        }
        else
        {
          memmove(v4->_Bx._Buf, v3->_Bx._Buf, v3->_Mysize + 1);
        }
        v4->_Mysize = v3->_Mysize;
        v4->_Myres = v3->_Myres;
        v3->_Myres = 15;
        v3->_Mysize = 0;
        v3->_Bx._Buf[0] = 0;
      }
    }
    ++v4;
    ++v3;
  }
  return v4;
}

//----- (004073C0) --------------------------------------------------------
void __thiscall SLWCreateInfo::~SLWCreateInfo(SLWCreateInfo *this)
{
  SLWCreateInfo *v1; // esi@1

  v1 = this;
  if ( this->m_arrItem._Myfirst )
  {
    std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(
      this->m_arrItem._Myfirst,
      this->m_arrItem._Mylast);
    operator delete(v1->m_arrItem._Myfirst);
  }
  v1->m_arrItem._Myfirst = 0;
  v1->m_arrItem._Mylast = 0;
  v1->m_arrItem._Myend = 0;
}

//----- (00407410) --------------------------------------------------------
void __thiscall SLWCreateInfo::Clear(SLWCreateInfo *this)
{
  SLWCreateInfo *v1; // esi@1
  boost::shared_ptr<SLWCreateInfo::Item> *v2; // eax@1
  boost::shared_ptr<SLWCreateInfo::Item> *v3; // ecx@1
  boost::shared_ptr<SLWCreateInfo::Item> *v4; // edi@2

  v1 = this;
  v2 = this->m_arrItem._Mylast;
  v3 = this->m_arrItem._Myfirst;
  if ( v3 != v2 )
  {
    v4 = std::_Move<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem> *>(v2, v2, v3);
    std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(v4, v1->m_arrItem._Mylast);
    v1->m_arrItem._Mylast = v4;
  }
  v1->m_bMakeData = 0;
  v1->m_nOffX = 0;
  v1->m_nOffY = 0;
}

//----- (00407460) --------------------------------------------------------
void __thiscall std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::reserve(std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *this, unsigned int _Count)
{
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *v2; // esi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // eax@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v4; // ST04_4@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v5; // ST00_4@4
  unsigned int v6; // edx@4
  int v7; // edi@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v8; // eax@6
  int v9; // [sp+0h] [bp-24h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Ptr; // [sp+10h] [bp-14h]@4
  int *v11; // [sp+14h] [bp-10h]@1
  int v12; // [sp+20h] [bp-4h]@4

  v11 = &v9;
  v2 = this;
  if ( _Count > 0x9249249 )
    std::_Xlength_error("vector<T> too long");
  if ( this->_Myend - this->_Myfirst < _Count )
  {
    v3 = std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::allocate(_Count);
    v4 = v2->_Mylast;
    v5 = v2->_Myfirst;
    _Ptr = v3;
    v12 = 0;
    std::_Uninit_move<std::basic_string<char,std::char_traits<char>,std::allocator<char>> *,std::basic_string<char,std::char_traits<char>,std::allocator<char>> *,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>(
      v5,
      v4,
      v3);
    v6 = (signed int)((char *)v2->_Mylast
                    - (char *)v2->_Myfirst
                    + ((unsigned __int64)(-1840700269i64 * (unsigned int)((char *)v2->_Mylast - (char *)v2->_Myfirst)) >> 32)) >> 4;
    v7 = v6 + (v6 >> 31);
    if ( v2->_Myfirst )
    {
      std::_Destroy_range<std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>(
        v2->_Myfirst,
        v2->_Mylast);
      operator delete(v2->_Myfirst);
    }
    v8 = _Ptr;
    v2->_Myend = &_Ptr[_Count];
    v2->_Mylast = &v8[v7];
    v2->_Myfirst = v8;
  }
}

//----- (00407580) --------------------------------------------------------
void __thiscall std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::_Reserve(std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *this, unsigned int _Count)
{
  unsigned int v2; // esi@1
  unsigned int v3; // esi@3
  unsigned int v4; // eax@3
  unsigned int v5; // eax@5

  v2 = this->_Mylast - this->_Myfirst;
  if ( 153391689 - _Count < v2 )
    std::_Xlength_error("vector<T> too long");
  v3 = _Count + v2;
  v4 = this->_Myend - this->_Myfirst;
  if ( v3 > v4 )
  {
    if ( 153391689 - (v4 >> 1) >= v4 )
      v5 = (v4 >> 1) + v4;
    else
      v5 = 0;
    if ( v5 < v3 )
      v5 = v3;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::reserve(
      this,
      v5);
  }
}

//----- (00407600) --------------------------------------------------------
void __thiscall std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Val)
{
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *v2; // edi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // ecx@1
  unsigned int v4; // edx@3
  int v5; // esi@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v6; // ecx@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v7; // [sp-Ch] [bp-28h]@6

  v2 = this;
  v3 = this->_Mylast;
  if ( _Val >= v3 || v2->_Myfirst > _Val )
  {
    if ( v3 == v2->_Myend )
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::_Reserve(
        v2,
        1u);
    v6 = v2->_Mylast;
    if ( v6 )
    {
      v7 = _Val;
      goto LABEL_11;
    }
  }
  else
  {
    v4 = (signed int)((char *)_Val
                    - (char *)v2->_Myfirst
                    + ((unsigned __int64)(-1840700269i64 * ((char *)_Val - (char *)v2->_Myfirst)) >> 32)) >> 4;
    v5 = v4 + (v4 >> 31);
    if ( v3 == v2->_Myend )
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::_Reserve(
        v2,
        1u);
    v6 = v2->_Mylast;
    if ( v6 )
    {
      v7 = &v2->_Myfirst[v5];
LABEL_11:
      v6->_Myres = 15;
      v6->_Mysize = 0;
      v6->_Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(v6, v7, 0, 0xFFFFFFFF);
      goto LABEL_12;
    }
  }
LABEL_12:
  ++v2->_Mylast;
}

//----- (004076D0) --------------------------------------------------------
bool __usercall IsSpecialChar@<al>(char c1@<bl>, char c2)
{
  int v2; // eax@2
  bool result; // al@4

  result = 0;
  if ( IsDBCSLeadByte(c1) )
  {
    v2 = 94 * (unsigned __int8)c1 + (unsigned __int8)c2 - 16705;
    if ( v2 < 0 || v2 >= 2350 )
      result = 1;
  }
  return result;
}

//----- (00407710) --------------------------------------------------------
char __usercall IsSpecialCharInStr@<al>(char *pstr@<eax>)
{
  char *v1; // esi@1
  char v3; // al@3
  char v4; // bl@5
  BYTE c1; // [sp+4h] [bp-4h]@4

  v1 = pstr;
  if ( !pstr )
    return 0;
  v3 = *pstr;
  if ( !v3 )
    return 0;
  while ( 1 )
  {
    c1 = v3;
    if ( !IsDBCSLeadByte(v3) )
    {
      ++v1;
      goto LABEL_9;
    }
    v4 = v1[1];
    if ( IsDBCSLeadByte(c1) )
    {
      if ( 94 * (unsigned __int8)c1 + (unsigned int)(unsigned __int8)v4 - 16705 > 0x92D )
        return 1;
    }
    v1 += 2;
LABEL_9:
    v3 = *v1;
    if ( !*v1 )
      return 0;
  }
}

//----- (00407790) --------------------------------------------------------
char __thiscall IsSpecialCharInStr2(char *pstr)
{
  char *v1; // esi@1
  signed int v2; // kr00_4@1
  int v3; // esi@1
  char v4; // al@4
  char temp[128]; // [sp+Ch] [bp-84h]@1

  v1 = pstr;
  memset(temp, 0, 0x64u);
  strncpy(temp, v1, 0x5Au);
  v2 = strlen(temp);
  v3 = 0;
  if ( v2 <= 0 )
    return 0;
  while ( IsDBCSLeadByte(temp[v3]) )
  {
    ++v3;
LABEL_32:
    if ( ++v3 >= v2 )
      return 0;
  }
  v4 = temp[v3];
  if ( v4 != 32
    && v4 != 39
    && v4 != 92
    && v4 != 47
    && v4 != 58
    && v4 != 42
    && v4 != 63
    && v4 != 60
    && v4 != 62
    && v4 != 124
    && v4 != 126
    && v4 != 33
    && v4 != 64
    && v4 != 37
    && v4 != 38
    && v4 != 59
    && v4 != 46
    && v4 != 44
    && v4 != 34
    && v4 != 96
    && v4 != 40
    && v4 != 41
    && v4 != 43
    && v4 != 45
    && v4 != 35
    && v4 != 36
    && v4 != 91
    && v4 != 93 )
  {
    goto LABEL_32;
  }
  return 1;
}

//----- (004078C0) --------------------------------------------------------
char __usercall IsPeculiarStr@<al>(char *pcName@<esi>)
{
  unsigned int v1; // edx@1
  char v2; // bl@1
  unsigned int v3; // ecx@1
  char v4; // al@2
  char result; // al@12

  v1 = strlen(pcName);
  v2 = 0;
  v3 = 0;
  if ( !v1 )
    goto LABEL_16;
  do
  {
    v4 = pcName[v3];
    if ( (v4 < 65 || v4 > 90) && (v4 < 97 || v4 > 122) && (v4 < 48 || v4 > 57) && v4 != 95 )
      v2 = 1;
    ++v3;
  }
  while ( v3 < v1 );
  if ( v2 )
    result = 1;
  else
LABEL_16:
    result = 0;
  return result;
}

//----- (00407920) --------------------------------------------------------
void __thiscall CharCreateFrameWork::CreateCancel(CharCreateFrameWork *this)
{
  CharCreateFrameWork *v1; // esi@1

  v1 = this;
  PgFrameWork::PostFrameMsgChange((PgFrameWork *)&this->vfptr, CharSelectFrameWorkID, 0);
  CharCreateClassWin::KillFocus(v1->m_pkCharCreateClassWin);
}

//----- (00407940) --------------------------------------------------------
void __thiscall CharCreateFrameWork::ChangeAvatarFace(CharCreateFrameWork *this)
{
  CharCreateFrameWork *v1; // eax@1
  Avatar *v2; // ecx@1

  v1 = this;
  v2 = this->m_pkAvatar;
  if ( v2 )
    Avatar::ChangeFaceTextureShape(v2, &v1->m_kShapeData);
}

//----- (00407960) --------------------------------------------------------
void __thiscall CharCreateFrameWork::ChangeAvatarHair(CharCreateFrameWork *this)
{
  CharCreateFrameWork *v1; // eax@1
  Avatar *v2; // ecx@1

  v1 = this;
  v2 = this->m_pkAvatar;
  if ( v2 )
    Avatar::ChangeHairTypeShape(v2, &v1->m_kShapeData);
}

//----- (00407980) --------------------------------------------------------
void __thiscall CharCreateFrameWork::ChangeAvatarHairColor(CharCreateFrameWork *this)
{
  CharCreateFrameWork *v1; // eax@1
  Avatar *v2; // ecx@1

  v1 = this;
  v2 = this->m_pkAvatar;
  if ( v2 )
    Avatar::ChangeHairColorShape(v2, &v1->m_kShapeData);
}

//----- (004079A0) --------------------------------------------------------
void __thiscall CharCreateFrameWork::OnInitializeStatus(CharCreateFrameWork *this)
{
  CharCreateFrameWork *v1; // esi@1

  v1 = this;
  CharCreateClassWin::SetFocus(this->m_pkCharCreateClassWin);
  CharCreateClassWin::ClearNameEditBox(v1->m_pkCharCreateClassWin);
}

//----- (004079C0) --------------------------------------------------------
void __thiscall CharCreateFrameWork::OnErrorGotoAccount(CharCreateFrameWork *this)
{
  PgFrameWork::PostFrameMsgChange((PgFrameWork *)&this->vfptr, AccountFrameWorkID, 0);
}

//----- (004079D0) --------------------------------------------------------
void __thiscall CharCreateFrameWork::SetClass(CharCreateFrameWork *this, char kClass)
{
  CharCreateFrameWork *v2; // esi@1
  CharCreateDescritWin *v3; // ecx@1

  v2 = this;
  v3 = this->m_pkCharCreateDescritWin;
  *(_BYTE *)&v2->m_kShapeData ^= (*(_BYTE *)&v2->m_kShapeData ^ 4 * kClass) & 0x7C;
  v2->m_kClass = kClass;
  v2->m_bIsActiveMotion = 1;
  CharCreateDescritWin::SetClass(v3, kClass);
  CharCreateDescritWin::UpdateView(v2->m_pkCharCreateDescritWin);
  CharCreateStatWin::SetClass(v2->m_pkCharCreateStatWin, kClass);
  CharCreateStatWin::SetAniCode(v2->m_pkCharCreateStatWin);
}

//----- (00407A20) --------------------------------------------------------
void __thiscall CharCreateFrameWork::ActPos(CharCreateFrameWork *this)
{
  CharCreateFrameWork *v1; // esi@1
  Avatar *v2; // ecx@1

  v1 = this;
  v2 = this->m_pkAvatar;
  v1->m_uiAvatorActiveCode = 102020;
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v2->vfptr[10].SetAbStateProperty)(102020, 0, 0);
  v1->m_bIsAvatorActiveMotion = 1;
}

//----- (00407A50) --------------------------------------------------------
void __thiscall CharCreateFrameWork::ActStand(CharCreateFrameWork *this)
{
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))this->m_pkAvatar->vfptr[10].SetAbStateProperty)(102010, 0, 0);
}

//----- (00407A70) --------------------------------------------------------
void __thiscall CharCreateFrameWork::ActNormalStand(CharCreateFrameWork *this)
{
  this->m_bNormalStand = 1;
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))this->m_pkAvatar->vfptr[10].SetAbStateProperty)(102030, 0, 0);
}

//----- (00407A90) --------------------------------------------------------
void CharCreateFrameWork::OnErrorGotoExit()
{
  NetMgr::SendUserLogOutMsg2AllServer(&g_kNetMgr);
  PgFrameMgr::PostQuitMsg(&Pgg_kFrameMgr, 0);
}

//----- (00407AB0) --------------------------------------------------------
void __thiscall CharCreateFrameWork::Draw(CharCreateFrameWork *this)
{
  CharCreateFrameWork *v1; // esi@1
  NiAVObject *v2; // eax@2
  NiCamera *v3; // ST00_4@2
  NiVisibleArray m_kVisible; // [sp+Ch] [bp-B0h]@2
  NiCullingProcess m_kCuller; // [sp+1Ch] [bp-A0h]@2
  int v6; // [sp+B8h] [bp-4h]@2

  v1 = this;
  if ( this->m_spCamera.m_pObject )
  {
    m_kVisible.m_ppkArray = 0;
    m_kVisible.m_uiCurrentSize = 0;
    m_kVisible.m_uiAllocatedSize = 0;
    m_kVisible.m_uiGrowBy = 1024;
    NiVisibleArray::SetAllocatedSize(&m_kVisible, 0x400u);
    v6 = 0;
    NiCullingProcess::NiCullingProcess(&m_kCuller, &m_kVisible);
    v2 = (NiAVObject *)&v1->m_spBackgroundScene.m_pObject->vfptr;
    v3 = v1->m_spCamera.m_pObject;
    LOBYTE(v6) = 1;
    NiDrawScene(v3, v2, &m_kCuller, 0);
    PgWinMgr::Draw(&Pgg_kWinMgr, NiRenderer::ms_pkRenderer);
    LOBYTE(v6) = 0;
    NiCullingProcess::~NiCullingProcess(&m_kCuller);
    operator delete(m_kVisible.m_ppkArray);
  }
}

//----- (00407B90) --------------------------------------------------------
void __thiscall CharCreateFrameWork::ProcessMsg(CharCreateFrameWork *this, unsigned int uiMsg, unsigned int uiwParam, unsigned int uilParam)
{
  CharCreateFrameWork *v4; // esi@1

  v4 = this;
  switch ( uiMsg )
  {
    case 9u:
      PgFrameWork::PostFrameMsgChange((PgFrameWork *)&this->vfptr, AccountFrameWorkID, 0);
      break;
    case 0xAu:
      CharCreateClassWin::SetFocus(this->m_pkCharCreateClassWin);
      CharCreateClassWin::ClearNameEditBox(v4->m_pkCharCreateClassWin);
      break;
    case 0xBu:
      NetMgr::SendUserLogOutMsg2AllServer(&g_kNetMgr);
      PgFrameMgr::PostQuitMsg(&Pgg_kFrameMgr, 0);
      break;
  }
}

//----- (00407BF0) --------------------------------------------------------
void __thiscall CharCreateFrameWork::Reset(CharCreateFrameWork *this)
{
  CharCreateFrameWork *v1; // ebx@1
  void (__thiscall ***v2)(_DWORD, _DWORD); // esi@2
  PgWin *fAngle; // ST10_4@5
  int v4; // [sp+20h] [bp-2Ch]@1
  NiMatrix3 mat3Rot; // [sp+24h] [bp-28h]@5

  v1 = this;
  ((void (__stdcall *)(int *, NiNode *))this->m_spAvatarPos.m_pObject->vfptr[30].__vecDelDtor)(&v4, this->m_pkCharNode);
  if ( v4 )
  {
    v2 = (void (__thiscall ***)(_DWORD, _DWORD))v4;
    if ( !InterlockedDecrement((volatile LONG *)(v4 + 4)) )
    {
      if ( v2 )
        (**v2)(v2, 1);
    }
  }
  NiAVObject::UpdateProperties((NiAVObject *)&v1->m_spBackgroundScene.m_pObject->vfptr);
  NiAVObject::UpdateEffects((NiAVObject *)&v1->m_spBackgroundScene.m_pObject->vfptr);
  NiAVObject::Update((NiAVObject *)&v1->m_spBackgroundScene.m_pObject->vfptr, 0.0, 1);
  fAngle = (PgWin *)&v1->m_pkCharCreateInfoWin->vfptr;
  v1->m_kGender = 1;
  PgWinMgr::CloseWin(&Pgg_kWinMgr, fAngle);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkCharCreateViewCtrlWin->vfptr);
  v1->m_bAutoTurn = 0;
  NiMatrix3::MakeZRotation(&mat3Rot, 0.0);
  qmemcpy(&v1->m_spAvatarPos.m_pObject->m_kLocal, &mat3Rot, 0x24u);
  *(_WORD *)&v1->m_bActStart = 0;
  v1->m_bNormalStand = 0;
}

//----- (00407CC0) --------------------------------------------------------
void __thiscall CharCreateFrameWork::TurnRight(CharCreateFrameWork *this)
{
  CharCreateFrameWork *v1; // ebx@1
  Avatar *v2; // eax@1
  float v3; // ST14_4@3
  NiMatrix3 result; // [sp+14h] [bp-70h]@3
  NiMatrix3 mat3OldRot; // [sp+38h] [bp-4Ch]@3
  NiMatrix3 mat3Rot; // [sp+5Ch] [bp-28h]@3

  v1 = this;
  v2 = this->m_pkAvatar;
  if ( v2 )
  {
    if ( v2->m_spScene.m_pObject )
    {
      v3 = Timer::ms_fDeltaTime * -2.0;
      NiMatrix3::MakeZRotation(&mat3Rot, v3);
      qmemcpy(&mat3OldRot, &v1->m_spAvatarPos.m_pObject->m_kLocal, sizeof(mat3OldRot));
      qmemcpy(&mat3Rot, NiMatrix3::operator*(&mat3OldRot, &result, &mat3Rot), sizeof(mat3Rot));
      qmemcpy(&v1->m_spAvatarPos.m_pObject->m_kLocal, &mat3Rot, 0x24u);
    }
  }
}
// A8B980: using guessed type float Timer::ms_fDeltaTime;

//----- (00407D50) --------------------------------------------------------
void __thiscall CharCreateFrameWork::TurnLeft(CharCreateFrameWork *this)
{
  CharCreateFrameWork *v1; // ebx@1
  Avatar *v2; // eax@1
  float v3; // ST14_4@3
  NiMatrix3 result; // [sp+14h] [bp-70h]@3
  NiMatrix3 mat3OldRot; // [sp+38h] [bp-4Ch]@3
  NiMatrix3 mat3Rot; // [sp+5Ch] [bp-28h]@3

  v1 = this;
  v2 = this->m_pkAvatar;
  if ( v2 )
  {
    if ( v2->m_spScene.m_pObject )
    {
      v3 = Timer::ms_fDeltaTime + Timer::ms_fDeltaTime;
      NiMatrix3::MakeZRotation(&mat3Rot, v3);
      qmemcpy(&mat3OldRot, &v1->m_spAvatarPos.m_pObject->m_kLocal, sizeof(mat3OldRot));
      qmemcpy(&mat3Rot, NiMatrix3::operator*(&mat3OldRot, &result, &mat3Rot), sizeof(mat3Rot));
      qmemcpy(&v1->m_spAvatarPos.m_pObject->m_kLocal, &mat3Rot, 0x24u);
    }
  }
}
// A8B980: using guessed type float Timer::ms_fDeltaTime;

//----- (00407DE0) --------------------------------------------------------
void __thiscall CharCreateFrameWork::ApplyTerrain(CharCreateFrameWork *this, NiNode *pkGroundNode)
{
  NiTListItem<NiPointer<Shadow> > *v2; // ebx@1
  Shadow *v3; // esi@2
  NiNode *v4; // eax@2
  NiNode *v5; // edi@2
  NiCollisionGroup *v6; // ecx@9
  NiAVObject *pkObject; // [sp+4h] [bp-4h]@2

  v2 = this->m_kShadowList.m_pkHead;
  while ( v2 )
  {
    v3 = v2->m_element.m_pObject;
    v4 = v3->m_kDecal.m_spObTerrain.m_pObject;
    v2 = v2->m_pkNext;
    v5 = v4;
    pkObject = (NiAVObject *)&v3->m_kDecal.m_spObTerrain.m_pObject->vfptr;
    if ( v4 != pkGroundNode )
    {
      if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      v3->m_kDecal.m_spObTerrain.m_pObject = pkGroundNode;
      if ( pkGroundNode )
        InterlockedIncrement((volatile LONG *)&pkGroundNode->m_uiRefCount);
    }
    v6 = v3->m_kDecal.m_pkCollisionGroup;
    if ( v6 )
    {
      if ( pkObject )
        NiCollisionGroup::RemoveCollidee(v6, pkObject);
      if ( pkGroundNode )
        NiCollisionGroup::AddCollidee(
          v3->m_kDecal.m_pkCollisionGroup,
          (NiAVObject *)&v3->m_kDecal.m_spObTerrain.m_pObject->vfptr,
          0,
          -1,
          1);
    }
  }
}

//----- (00407E80) --------------------------------------------------------
void __thiscall CharCreateFrameWork::RenderShadow(CharCreateFrameWork *this)
{
  NsPgToonExtraData *v1; // edx@1
  bool v2; // al@1
  CharCreateFrameWork *v3; // ebx@1
  NiTListItem<NiPointer<Shadow> > *v4; // esi@1
  unsigned int v5; // eax@2
  Shadow *v6; // edi@3
  NiNode **v7; // ecx@4
  NiNode *v8; // eax@4
  Shadow *v9; // eax@7
  NiPoint3 kCharPos; // [sp+8h] [bp-18h]@4
  NsPgToonExtraData *pkToonExtraData; // [sp+14h] [bp-Ch]@1
  unsigned int i; // [sp+18h] [bp-8h]@2
  bool bOldToonFlag; // [sp+1Fh] [bp-1h]@1

  v1 = Engine3D::ms_spToonExtraData;
  v2 = Engine3D::ms_spToonExtraData->m_bOn;
  v3 = this;
  Engine3D::ms_spToonExtraData->m_bOn = 0;
  v4 = this->m_kShadowList.m_pkHead;
  pkToonExtraData = v1;
  bOldToonFlag = v2;
  if ( v4 )
  {
    v5 = 0;
    i = 0;
    if ( this->m_nMaxShadowObject )
    {
      do
      {
        v6 = v4->m_element.m_pObject;
        v4 = v4->m_pkNext;
        if ( v6 )
        {
          v7 = &v3->m_vecShadowObject._Myfirst[v5];
          v8 = *v7;
          kCharPos.x = (*v7)->m_kLocal.m_Translate.x;
          kCharPos.y = v8->m_kLocal.m_Translate.y;
          kCharPos.z = v8->m_kLocal.m_Translate.z;
          Shadow::Render(v6, *v7, &kCharPos);
          v1 = pkToonExtraData;
          v6->m_spNode.m_pObject->m_uFlags &= 0xFFFEu;
          v5 = i;
        }
        i = ++v5;
      }
      while ( v5 < v3->m_nMaxShadowObject );
    }
    for ( ; v4; v9->m_spNode.m_pObject->m_uFlags |= 1u )
    {
      v9 = v4->m_element.m_pObject;
      v4 = v4->m_pkNext;
    }
    v1->m_bOn = bOldToonFlag;
  }
}

//----- (00407F40) --------------------------------------------------------
void __thiscall CharCreateFrameWork::Update(CharCreateFrameWork *this, float fCurTime)
{
  CharCreateFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@3
  NiAVObject *v5; // ecx@5
  char *v6; // eax@9
  MsgBox *v7; // eax@9
  char *v8; // eax@10
  NiActorManager *v9; // eax@13
  Avatar *v10; // ecx@15
  PgMsg::Frame kMsg; // [sp+1Ch] [bp-18h]@11

  v2 = this;
  v3 = this->m_spWorldMgrNet.m_pObject;
  if ( v3 )
    ((void (__cdecl *)(_DWORD, _DWORD))v3->vfptr[4].__vecDelDtor)(v2, 100);
  PgFrameWork::ProcessAllMsg((PgFrameWork *)&v2->vfptr);
  PgWinMgr::ProcessInput(&Pgg_kWinMgr, 1);
  PgWinMgr::DispatchMessageA(&Pgg_kWinMgr);
  PgWinMgr::UpdateWin(&Pgg_kWinMgr, fCurTime);
  CharCreateFrameWork::RenderShadow(v2);
  v4 = (PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr;
  if ( v4 )
    PgNet::Flush(v4);
  v5 = (NiAVObject *)&v2->m_spBackgroundScene.m_pObject->vfptr;
  if ( v5 )
    NiAVObject::Update(v5, fCurTime, 1);
  if ( v2->m_spWorldMgrNet.m_pObject->m_bCut )
  {
    NetMgr::SendUserLogOutMsg2AllServer(&g_kNetMgr);
    if ( g_kServer.m_bDoubleConnected == 1 )
    {
      v6 = (char *)TextData::Get(0x16526A50u);
      v7 = MsgBox::Modal(MSGBOX_OK, v6);
      g_kServer.m_bDoubleConnected = 0;
    }
    else
    {
      v8 = (char *)TextData::Get(0xCF16104B);
      v7 = MsgBox::Modal(MSGBOX_OK, v8);
    }
    kMsg.m_uiFrameMsg = 11;
    MsgBox::SetFrameWorkMsgOnClose(v7, (PgFrameWork *)&v2->vfptr, &kMsg, 0);
  }
  if ( v2->m_bIsAvatorActiveMotion )
  {
    v9 = Char::GetSequence((Char *)&v2->m_pkAvatar->vfptr, v2->m_uiAvatorActiveCode);
    if ( v9 )
    {
      if ( v9->m_fTransStartTime <= (double)v9->m_fTransEndTime )
      {
        v10 = v2->m_pkAvatar;
        v2->m_bIsAvatorActiveMotion = 0;
        ((void (__cdecl *)(_DWORD, _DWORD, _DWORD))v10->vfptr[10].SetAbStateProperty)(102010, 0, 0);
      }
    }
  }
  if ( v2->m_bAutoTurn )
  {
    if ( v2->m_bTurnLeft )
      CharCreateFrameWork::TurnLeft(v2);
    else
      CharCreateFrameWork::TurnRight(v2);
  }
  if ( v2->m_bActStart )
  {
    v2->m_bActStart = 0;
    v2->m_fActStartTime = fCurTime;
  }
  if ( !v2->m_bActAniPlay && fCurTime - v2->m_fActStartTime > 0.800000011920929 )
  {
    CharMgr::UpdateAvatar(&g_kCharMgr, fCurTime);
    v2->m_bActAniPlay = 1;
  }
  if ( v2->m_bNormalStand )
    CharMgr::UpdateAvatar(&g_kCharMgr, fCurTime);
  if ( g_kSoundMgr.m_pkBGMGroup && !SoundGroupBgm::IsBGMPlaying(g_kSoundMgr.m_pkBGMGroup) )
  {
    SoundMgr::StopBGM(&g_kSoundMgr);
    SoundGroupBgm::SetFadeDurationTime(g_kSoundMgr.m_pkBGMGroup, 0.0);
    SoundMgr::PlayBGM(&g_kSoundMgr, "LoginBackground.mp3");
  }
  SoundMgr::Update(&g_kSoundMgr, fCurTime, 0);
}

//----- (00408140) --------------------------------------------------------
void __userpurge CharCreateFrameWork::SetAvatarEquiq(CharCreateFrameWork *this@<ecx>, int a2@<ebx>, ChrClassType eClassType, int iMale)
{
  CharShape *v4; // esi@1
  ChrCreateEquip *v5; // eax@1
  ChrCreateEquip *v6; // edi@1
  ItemInfo *v7; // eax@1
  ItemInfo *v8; // eax@1
  ItemInfo *v9; // eax@1
  ItemInfo *v10; // eax@1
  ItemInfo *v11; // eax@1
  ItemInfo *v12; // eax@1

  v4 = &this->m_pkAvatar->m_kCharShape;
  v5 = ChrCreateEquipTab::GetByIndex(eClassType, iMale);
  v6 = v5;
  v7 = ItemInfoTab::GetByInxName(v5->Equ_RightHand);
  CharShape::Equip(v4, a2, v7);
  v8 = ItemInfoTab::GetByInxName(v6->Equ_LeftHand);
  CharShape::Equip(v4, a2, v8);
  v9 = ItemInfoTab::GetByInxName(v6->Equ_Shoes);
  CharShape::Equip(v4, a2, v9);
  v10 = ItemInfoTab::GetByInxName(v6->Equ_Head);
  CharShape::Equip(v4, a2, v10);
  v11 = ItemInfoTab::GetByInxName(v6->Equ_Leg);
  CharShape::Equip(v4, a2, v11);
  v12 = ItemInfoTab::GetByInxName(v6->Equ_Body);
  CharShape::Equip(v4, a2, v12);
}

//----- (004081F0) --------------------------------------------------------
void __usercall CharCreateFrameWork::Refresh(CharCreateFrameWork *this@<ecx>, int a2@<ebx>)
{
  CharCreateFrameWork *v2; // esi@1
  Avatar *v3; // ecx@1
  Avatar *v4; // ecx@8

  v2 = this;
  v3 = this->m_pkAvatar;
  v2->m_bIsActiveMotion = 1;
  Avatar::ChangeClassShape(v3, &v2->m_kShapeData, 2u);
  switch ( v2->m_kClass )
  {
    case 1:
      CharCreateFrameWork::SetAvatarEquiq(v2, a2, 0, v2->m_kGender);
      break;
    case 6:
      CharCreateFrameWork::SetAvatarEquiq(v2, a2, CCT_CLERIC, v2->m_kGender);
      break;
    case 0xB:
      CharCreateFrameWork::SetAvatarEquiq(v2, a2, CCT_ARCHER, v2->m_kGender);
      break;
    case 0x10:
      CharCreateFrameWork::SetAvatarEquiq(v2, a2, CCT_MAGE, v2->m_kGender);
      break;
    case 0x15:
      CharCreateFrameWork::SetAvatarEquiq(v2, a2, CCT_JOKER, v2->m_kGender);
      break;
    case 0x1A:
      CharCreateFrameWork::SetAvatarEquiq(v2, a2, CCT_SENTINEL, v2->m_kGender);
      break;
    default:
      break;
  }
  ((void (__stdcall *)(_DWORD, _DWORD))v2->m_spAvatarPos.m_pObject->vfptr[29].__vecDelDtor)(v2->m_pkCharNode, 0);
  NiAVObject::UpdateProperties((NiAVObject *)&v2->m_spAvatarPos.m_pObject->vfptr);
  NiAVObject::UpdateEffects((NiAVObject *)&v2->m_spAvatarPos.m_pObject->vfptr);
  NiAVObject::Update((NiAVObject *)&v2->m_spAvatarPos.m_pObject->vfptr, 0.0, 1);
  v4 = v2->m_pkAvatar;
  v2->m_uiAvatorActiveCode = 102020;
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v4->vfptr[10].SetAbStateProperty)(102020, 0, 0);
  v2->m_bIsAvatorActiveMotion = 1;
  CharMgr::UpdateAvatar(&g_kCharMgr, Timer::ms_fCurTime);
  v2->m_bActStart = 1;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00408310) --------------------------------------------------------
void __usercall CharCreateFrameWork::ChangeAvatarClass(CharCreateFrameWork *this@<ecx>, int a2@<ebx>)
{
  CharCreateFrameWork *v2; // esi@1
  Avatar *v3; // eax@1
  void (__thiscall ***v4)(_DWORD, _DWORD); // edi@3
  int v5; // [sp+4h] [bp-4h]@2

  v2 = this;
  v3 = this->m_pkAvatar;
  if ( v3 )
  {
    ((void (__stdcall *)(int *, NiNode *))this->m_spAvatarPos.m_pObject->vfptr[30].__vecDelDtor)(
      &v5,
      v3->m_spScene.m_pObject);
    if ( v5 )
    {
      v4 = (void (__thiscall ***)(_DWORD, _DWORD))v5;
      if ( !InterlockedDecrement((volatile LONG *)(v5 + 4)) )
      {
        if ( v4 )
          (**v4)(v4, 1);
      }
    }
    if ( Avatar::ChangeClassShape(v2->m_pkAvatar, &v2->m_kShapeData, 2u) )
      CharCreateFrameWork::Refresh(v2, a2);
  }
}

//----- (00408380) --------------------------------------------------------
void __thiscall CharCreateFrameWork::ChangeAvatarGender(CharCreateFrameWork *this)
{
  CharCreateFrameWork *v1; // esi@1
  Avatar *v2; // eax@1
  void (__thiscall ***v3)(_DWORD, _DWORD); // edi@3
  unsigned __int8 *v4; // edi@6
  char v5; // ST04_1@7
  char v6; // ST00_1@7
  unsigned int *v7; // edi@10
  std::vector<unsigned long,std::allocator<unsigned long> > vecResult; // [sp+10h] [bp-20h]@7
  int v9; // [sp+20h] [bp-10h]@2
  int v10; // [sp+2Ch] [bp-4h]@7

  v1 = this;
  v2 = this->m_pkAvatar;
  if ( v2 )
  {
    ((void (__stdcall *)(int *, NiNode *))this->m_spAvatarPos.m_pObject->vfptr[30].__vecDelDtor)(
      &v9,
      v2->m_spScene.m_pObject);
    if ( v9 )
    {
      v3 = (void (__thiscall ***)(_DWORD, _DWORD))v9;
      if ( !InterlockedDecrement((volatile LONG *)(v9 + 4)) )
      {
        if ( v3 )
          (**v3)(v3, 1);
      }
    }
    v4 = (unsigned __int8 *)&v1->m_kShapeData;
    if ( Avatar::ChangeGenderShape(v1->m_pkAvatar, &v1->m_kShapeData, 2u) )
    {
      vecResult._Myfirst = 0;
      vecResult._Mylast = 0;
      vecResult._Myend = 0;
      v5 = *v4 >> 7;
      v6 = (*v4 >> 2) & 0x1F;
      v10 = 0;
      HairInfoTab::GetEquipableHairType(v6, v5, 0, &vecResult);
      if ( vecResult._Mylast - vecResult._Myfirst )
        *((_BYTE *)&v1->m_kShapeData + 1) = *(_BYTE *)vecResult._Myfirst;
      else
        *((_BYTE *)&v1->m_kShapeData + 1) = 0;
      std::vector<PgWinText *,std::allocator<PgWinText *>>::resize(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&vecResult,
        0);
      FaceInfoTab::GetEquipableFace(0, &vecResult);
      v7 = vecResult._Myfirst;
      if ( vecResult._Mylast - vecResult._Myfirst )
        *((_BYTE *)&v1->m_kShapeData + 3) = *(_BYTE *)vecResult._Myfirst;
      else
        *((_BYTE *)&v1->m_kShapeData + 3) = 0;
      *((_BYTE *)&v1->m_kShapeData + 2) = 0;
      CharCreateFrameWork::Refresh(v1, 0);
      if ( v7 )
        operator delete(v7);
    }
  }
}

//----- (004084B0) --------------------------------------------------------
void __usercall CharCreateFrameWork::CreateOk(CharCreateFrameWork *this@<ecx>, int a2@<ebx>)
{
  CharCreateFrameWork *v2; // edi@1
  int v3; // eax@1
  CharCreateClassWin *v4; // ecx@1
  const char *v5; // eax@1
  const char *v6; // esi@1
  char *v7; // eax@4
  char *v8; // eax@10
  char *v9; // eax@11

  v2 = this;
  CharCreateFrameWork::Refresh(this, a2);
  v3 = User::GetEmptyAvatarSlot(&g_kUser);
  v4 = v2->m_pkCharCreateClassWin;
  v2->m_iCreateSlot = v3;
  v5 = CharCreateClassWin::GetAvatarCreateName(v4);
  v6 = v5;
  if ( v5 && *v5 )
  {
    if ( strlen(v5) >= 4 )
    {
      if ( IsSpecialCharInStr((char *)v6)
        || IsSpecialCharInStr2((char *)v6)
        || TextFilterTable::IsBadName((char *)v6)
        || IsPeculiarStr((char *)v6) )
      {
        v8 = (char *)TextData::Get(0x329D7E83u);
        MsgBox::Modal(MSGBOX_OK, v8);
      }
      else
      {
        Name5::operator=(&v2->m_kCreateName, v6);
        CharCreateFrameWork::NcAvatarCreateReq(v2);
        CharCreateClassWin::KillFocus(v2->m_pkCharCreateClassWin);
      }
    }
    else
    {
      v7 = (char *)TextData::Get(0xFAC40730);
      MsgBox::Modal(MSGBOX_OK, v7);
    }
  }
  else
  {
    v9 = (char *)TextData::Get(0xEAF5E746);
    MsgBox::Modal(MSGBOX_OK, v9);
  }
}

//----- (00408580) --------------------------------------------------------
int __cdecl std::char_traits<char>::compare(const char *_First1, const char *_First2, unsigned int _Count)
{
  const char *v3; // ecx@1
  const char *v4; // edx@1
  unsigned int v5; // esi@1
  signed int v6; // eax@5

  v3 = _First2;
  v4 = _First1;
  v5 = _Count;
  if ( _Count < 4 )
  {
LABEL_4:
    if ( !v5 )
      return 0;
  }
  else
  {
    while ( *(_DWORD *)v4 == *(_DWORD *)v3 )
    {
      v5 -= 4;
      v3 += 4;
      v4 += 4;
      if ( v5 < 4 )
        goto LABEL_4;
    }
  }
  v6 = *v4 - *v3;
  if ( *v4 != *v3 )
    return (v6 >> 31) | 1;
  if ( v5 <= 1 )
    return 0;
  v6 = v4[1] - v3[1];
  if ( v4[1] != v3[1] )
    return (v6 >> 31) | 1;
  if ( v5 <= 2 )
    return 0;
  v6 = v4[2] - v3[2];
  if ( v4[2] != v3[2] )
    return (v6 >> 31) | 1;
  if ( v5 > 3 )
  {
    v6 = v4[3] - v3[3];
    return (v6 >> 31) | 1;
  }
  return 0;
}

//----- (00408600) --------------------------------------------------------
void __thiscall Name5::operator=(Name5 *this, const char *nm)
{
  *(_QWORD *)&this->n5_code[3] = 0i64;
  *(_QWORD *)&this->n5_code[1] = 0i64;
  this->n5_code[0] = 0;
  strncpy((char *)this->n5_code, (char *)nm, 0x14u);
}

//----- (00408630) --------------------------------------------------------
unsigned int __cdecl ITableBase<ChrCreateEquip,ChrCreateEquipTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<ChrCreateEquip,ChrCreateEquipTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A88698: using guessed type int ITableBase<ChrCreateEquip,ChrCreateEquipTab>::ms_pkTable;

//----- (00408650) --------------------------------------------------------
NiUnsharedGeometryGroup *__cdecl TextData::Get(unsigned int eTextID)
{
  int v1; // eax@1
  unsigned int v2; // eax@2
  void *v3; // eax@4
  void *v4; // edi@4
  NiUnsharedGeometryGroup *result; // eax@5
  TextData::Node kNode; // [sp+8h] [bp-10h]@1

  kNode.pStr = (char *)&unk_96F8EB;
  kNode.pStrVoice = (char *)&unk_96F8EB;
  kNode.pStrSoundEffect = (char *)&unk_96F8EB;
  kNode.dwEnumVal = eTextID;
  v1 = *(_DWORD *)(ITableBase<TextDataType,TextData>::ms_pkTable + 56);
  if ( v1 )
    v2 = *(_DWORD *)(v1 + 40);
  else
    v2 = 0;
  v3 = bsearch(&kNode, TextData::ms_apkNode, v2, 0x10u, TextDataNodeComp);
  v4 = v3;
  if ( v3 )
  {
    if ( strcmp(*((const char **)v3 + 2), "None") )
      SoundMgr::PlayGenderVoice(&g_kSoundMgr, *((char **)v4 + 2));
    if ( strcmp(*((const char **)v4 + 3), "None") )
      SoundMgr::PlayInterfaceSound(&g_kSoundMgr, *((char **)v4 + 3));
    result = (NiUnsharedGeometryGroup *)*((_DWORD *)v4 + 1);
  }
  else
  {
    result = &unk_96F8EB;
  }
  return result;
}
// A88690: using guessed type int ITableBase<TextDataType,TextData>::ms_pkTable;

//----- (00408730) --------------------------------------------------------
void __thiscall NsDecal::SetObjectTerrain(NsDecal *this, NiNode *_spTerrain)
{
  NsDecal *v2; // esi@1
  NiNode *v3; // edi@1
  NiCollisionGroup *v4; // ecx@8

  v2 = this;
  v3 = this->m_spObTerrain.m_pObject;
  if ( v3 != _spTerrain )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spObTerrain.m_pObject = _spTerrain;
    if ( _spTerrain )
      InterlockedIncrement((volatile LONG *)&_spTerrain->m_uiRefCount);
  }
  v4 = v2->m_pkCollisionGroup;
  if ( v4 )
  {
    if ( v3 )
      NiCollisionGroup::RemoveCollidee(v4, (NiAVObject *)&v3->vfptr);
    if ( _spTerrain )
      NiCollisionGroup::AddCollidee(v2->m_pkCollisionGroup, (NiAVObject *)&v2->m_spObTerrain.m_pObject->vfptr, 0, -1, 1);
  }
}

//----- (004087B0) --------------------------------------------------------
int __thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int _Off, unsigned int _N0, const char *_Ptr, unsigned int _Count)
{
  unsigned int v5; // eax@1
  unsigned int v6; // esi@3
  unsigned int v7; // eax@3
  unsigned int v8; // edx@5
  const char *v9; // eax@8
  int result; // eax@10

  v5 = this->_Mysize;
  if ( v5 < _Off )
    std::_Xout_of_range("invalid string position");
  v6 = _N0;
  v7 = v5 - _Off;
  if ( v7 < _N0 )
    v6 = v7;
  v8 = v6;
  if ( v6 >= _Count )
    v8 = _Count;
  if ( this->_Myres < 0x10 )
    v9 = (const char *)this;
  else
    v9 = this->_Bx._Ptr;
  result = std::char_traits<char>::compare(&v9[_Off], _Ptr, v8);
  if ( !result )
  {
    if ( v6 >= _Count )
      result = v6 != _Count;
    else
      result = -1;
  }
  return result;
}

//----- (00408820) --------------------------------------------------------
ChrCreateEquip *__cdecl ChrCreateEquipTab::GetByIndex(ChrClassType eClassType, int iMale)
{
  unsigned int v2; // esi@1
  ChrCreateEquip *result; // eax@2

  v2 = 0;
  if ( ITableBase<ChrCreateEquip,ChrCreateEquipTab>::GetTotal() )
  {
    while ( 1 )
    {
      result = (ChrCreateEquip *)CDataReader::GetRecord(
                                   (CDataReader *)(ITableBase<ChrCreateEquip,ChrCreateEquipTab>::ms_pkTable + 4),
                                   v2);
      if ( result->ChrClass == eClassType && result->IsMale == iMale )
        break;
      if ( ++v2 >= ITableBase<ChrCreateEquip,ChrCreateEquipTab>::GetTotal() )
        goto LABEL_5;
    }
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}
// A88698: using guessed type int ITableBase<ChrCreateEquip,ChrCreateEquipTab>::ms_pkTable;

//----- (00408870) --------------------------------------------------------
int __thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Right)
{
  const char *v2; // eax@1

  v2 = (const char *)_Right;
  if ( _Right->_Myres >= 0x10 )
    v2 = _Right->_Bx._Ptr;
  return std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
           this,
           0,
           this->_Mysize,
           v2,
           _Right->_Mysize);
}

//----- (004088A0) --------------------------------------------------------
int __stdcall stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::operator()(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Keyval)
{
  _BYTE *v2; // ecx@2
  unsigned int v3; // edx@4
  int i; // eax@4
  int v5; // esi@5
  int v6; // eax@6
  int v7; // edx@6

  if ( _Keyval->_Myres < 0x10 )
    v2 = _Keyval;
  else
    v2 = _Keyval->_Bx._Ptr;
  v3 = (unsigned int)&v2[_Keyval->_Mysize];
  for ( i = -2128831035; v2 != (_BYTE *)v3; i = v5 ^ 16777619 * i )
    v5 = *v2++;
  v6 = ldiv(i & 0x7FFFFFFF, 127773);
  return 16807 * v7 - 2836 * v6 + ((char)-(16807 * v7 - 2836 * v6 < 0) & 0x7FFFFFFF);
}

//----- (00408900) --------------------------------------------------------
bool __stdcall std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::operator()(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Left, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Right)
{
  const char *v3; // eax@1

  v3 = (const char *)_Right;
  if ( _Right->_Myres >= 0x10 )
    v3 = _Right->_Bx._Ptr;
  return std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
           _Left,
           0,
           _Left->_Mysize,
           v3,
           _Right->_Mysize) < 0;
}

//----- (00408930) --------------------------------------------------------
void __cdecl FaceInfoTab::GetEquipableFace(char ucGrade, void *padwResult)
{
  int v2; // eax@1
  unsigned int v3; // ebx@1
  std::vector<NiTimeController *,std::allocator<NiTimeController *> > *v4; // esi@5
  char *v5; // eax@6
  unsigned int v6; // eax@8
  int v7; // edi@10
  NiTimeController **v8; // eax@12
  NiTimeController **v9; // eax@16
  unsigned int v10; // [sp+4h] [bp-4h]@2

  v2 = *(_DWORD *)(ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable + 56);
  v3 = 0;
  if ( v2 )
    v10 = *(_DWORD *)(v2 + 40);
  else
    v10 = 0;
  if ( v10 > 0 )
  {
    v4 = (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)padwResult;
    do
    {
      v5 = CDataReader::GetRecord((CDataReader *)(ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable + 4), v3);
      if ( v5 && (unsigned __int8)v5[33] <= (unsigned __int8)ucGrade )
      {
        v6 = (unsigned int)v4->_Mylast;
        padwResult = (void *)v3;
        if ( (unsigned int)&padwResult >= v6 || v4->_Myfirst > (NiTimeController **)&padwResult )
        {
          if ( (NiTimeController **)v6 == v4->_Myend )
            std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(v4, 1u);
          v9 = v4->_Mylast;
          if ( v9 )
            *v9 = (NiTimeController *)v3;
        }
        else
        {
          v7 = ((char *)&padwResult - (char *)v4->_Myfirst) >> 2;
          if ( (NiTimeController **)v6 == v4->_Myend )
            std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(v4, 1u);
          v8 = v4->_Mylast;
          if ( v8 )
            *v8 = v4->_Myfirst[v7];
        }
        ++v4->_Mylast;
      }
      ++v3;
    }
    while ( v3 < v10 );
  }
}
// A8869C: using guessed type int ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable;

//----- (004089E0) --------------------------------------------------------
void __cdecl HairInfoTab::GetEquipableHairType(char kClassID, char ucGender, char ucUsableGrade, void *padwResult)
{
  char v4; // al@2
  int v5; // ecx@9
  unsigned int v6; // esi@9
  unsigned int v7; // ecx@10
  char v8; // bl@14
  unsigned int v9; // edi@14
  char *v10; // eax@15
  int v11; // ecx@15
  char v12; // bl@25
  unsigned int v13; // edi@25
  char *v14; // eax@26
  int v15; // ecx@26
  char v16; // bl@36
  unsigned int v17; // edi@36
  char *v18; // eax@37
  int v19; // ecx@37
  char v20; // bl@47
  unsigned int v21; // edi@47
  char *v22; // eax@48
  int v23; // ecx@48
  char v24; // bl@58
  unsigned int v25; // edi@58
  char *v26; // eax@59
  int v27; // ecx@59
  std::vector<unsigned long,std::allocator<unsigned long> > *v28; // edi@69
  char v29; // bl@69
  char *v30; // eax@70
  int v31; // ecx@70

  switch ( kClassID )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      v4 = 1;
      break;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      v4 = 6;
      break;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      v4 = 11;
      break;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      v4 = 16;
      break;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      v4 = 21;
      break;
    case 0x1A:
    case 0x1B:
      v4 = 26;
      break;
    default:
      v4 = 0;
      break;
  }
  v5 = *(_DWORD *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 56);
  v6 = 0;
  if ( v5 )
  {
    v7 = *(_DWORD *)(v5 + 40);
    *(_DWORD *)&kClassID = v7;
  }
  else
  {
    *(_DWORD *)&kClassID = 0;
    v7 = 0;
  }
  switch ( v4 )
  {
    case 1:
      if ( v7 > 0 )
      {
        v8 = ucGender;
        v9 = kClassID;
        do
        {
          v10 = CDataReader::GetRecord((CDataReader *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 4), v6);
          v11 = *(_DWORD *)(v10 + 66);
          if ( (v11 == 3 || v11 == 1 && v8 == 1 || v11 == 2 && !v8)
            && (unsigned __int8)v10[65] <= (unsigned __int8)ucUsableGrade )
          {
            *(_DWORD *)&kClassID = v6;
            std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
              (std::vector<unsigned long,std::allocator<unsigned long> > *)padwResult,
              (const unsigned int *)&kClassID);
          }
          ++v6;
        }
        while ( v6 < v9 );
      }
      break;
    case 6:
      if ( v7 > 0 )
      {
        v12 = ucGender;
        v13 = kClassID;
        do
        {
          v14 = CDataReader::GetRecord((CDataReader *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 4), v6);
          v15 = *(_DWORD *)(v14 + 74);
          if ( (v15 == 3 || v15 == 1 && v12 == 1 || v15 == 2 && !v12)
            && (unsigned __int8)v14[65] <= (unsigned __int8)ucUsableGrade )
          {
            *(_DWORD *)&kClassID = v6;
            std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
              (std::vector<unsigned long,std::allocator<unsigned long> > *)padwResult,
              (const unsigned int *)&kClassID);
          }
          ++v6;
        }
        while ( v6 < v13 );
      }
      break;
    case 0xB:
      if ( v7 > 0 )
      {
        v16 = ucGender;
        v17 = kClassID;
        do
        {
          v18 = CDataReader::GetRecord((CDataReader *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 4), v6);
          v19 = *(_DWORD *)(v18 + 70);
          if ( (v19 == 3 || v19 == 1 && v16 == 1 || v19 == 2 && !v16)
            && (unsigned __int8)v18[65] <= (unsigned __int8)ucUsableGrade )
          {
            *(_DWORD *)&kClassID = v6;
            std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
              (std::vector<unsigned long,std::allocator<unsigned long> > *)padwResult,
              (const unsigned int *)&kClassID);
          }
          ++v6;
        }
        while ( v6 < v17 );
      }
      break;
    case 0x10:
      if ( v7 > 0 )
      {
        v20 = ucGender;
        v21 = kClassID;
        do
        {
          v22 = CDataReader::GetRecord((CDataReader *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 4), v6);
          v23 = *(_DWORD *)(v22 + 78);
          if ( (v23 == 3 || v23 == 1 && v20 == 1 || v23 == 2 && !v20)
            && (unsigned __int8)v22[65] <= (unsigned __int8)ucUsableGrade )
          {
            *(_DWORD *)&kClassID = v6;
            std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
              (std::vector<unsigned long,std::allocator<unsigned long> > *)padwResult,
              (const unsigned int *)&kClassID);
          }
          ++v6;
        }
        while ( v6 < v21 );
      }
      break;
    case 0x15:
      if ( v7 > 0 )
      {
        v24 = ucGender;
        v25 = kClassID;
        do
        {
          v26 = CDataReader::GetRecord((CDataReader *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 4), v6);
          v27 = *(_DWORD *)(v26 + 78);
          if ( (v27 == 3 || v27 == 1 && v24 == 1 || v27 == 2 && !v24)
            && (unsigned __int8)v26[65] <= (unsigned __int8)ucUsableGrade )
          {
            *(_DWORD *)&kClassID = v6;
            std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
              (std::vector<unsigned long,std::allocator<unsigned long> > *)padwResult,
              (const unsigned int *)&kClassID);
          }
          ++v6;
        }
        while ( v6 < v25 );
      }
      break;
    case 0x1A:
      if ( v7 > 0 )
      {
        v28 = (std::vector<unsigned long,std::allocator<unsigned long> > *)padwResult;
        v29 = ucGender;
        do
        {
          v30 = CDataReader::GetRecord((CDataReader *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 4), v6);
          v31 = *(_DWORD *)(v30 + 86);
          if ( (v31 == 3 || v31 == 1 && v29 == 1 || v31 == 2 && !v29)
            && (unsigned __int8)v30[65] <= (unsigned __int8)ucUsableGrade )
          {
            padwResult = (void *)v6;
            std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(v28, (const unsigned int *)&padwResult);
          }
          ++v6;
        }
        while ( v6 < kClassID );
      }
      break;
    default:
      return;
  }
}
// A88694: using guessed type int ITableBase<HairInfo,HairInfoTab>::ms_pkTable;

//----- (00408D20) --------------------------------------------------------
ItemInfo *__cdecl ItemInfoTab::GetByInxName(char *pcInxName)
{
  ItemInfo *v1; // eax@6
  std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > result; // [sp+Ch] [bp-30h]@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Keyval; // [sp+10h] [bp-2Ch]@3
  int v4; // [sp+38h] [bp-4h]@3

  if ( !pcInxName || !*pcInxName )
    goto LABEL_10;
  _Keyval._Myres = 15;
  _Keyval._Mysize = 0;
  _Keyval._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Keyval, pcInxName, strlen(pcInxName));
  v4 = 0;
  std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ActiveSkillInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>>,0>>::lower_bound(
    &ItemInfoTab::m_ItemInfoMapByInxName,
    &result,
    &_Keyval);
  if ( _Keyval._Myres >= 0x10 )
    operator delete(_Keyval._Bx._Ptr);
  _Keyval._Myres = 15;
  _Keyval._Mysize = 0;
  _Keyval._Bx._Buf[0] = 0;
  if ( result._Ptr != stru_A99374._Myhead )
    v1 = result._Ptr->_Myval.second;
  else
LABEL_10:
    v1 = 0;
  return v1;
}

//----- (00408DF0) --------------------------------------------------------
void __thiscall CharCreateInfoWin::OnCmdSexL(CharCreateInfoWin *this)
{
  CharCreateInfoWin *v1; // esi@1
  PROTO_AVATAR_SHAPE_INFO *v2; // eax@1

  v1 = this;
  v2 = this->m_pkShapeData;
  if ( *(_BYTE *)v2 & 0x80 )
    *(_BYTE *)v2 &= 0x7Fu;
  else
    *(_BYTE *)v2 |= 0x80u;
  CharCreateFrameWork::ChangeAvatarGender((CharCreateFrameWork *)this->m_pkFrameWork);
  v1->m_nFaceTypeIndex = 0;
  v1->m_nHairColorIndex = 0;
  v1->m_nHairTypeIndex = 0;
}

//----- (00408E30) --------------------------------------------------------
void __thiscall CharCreateInfoWin::OnCmdSexR(CharCreateInfoWin *this)
{
  CharCreateInfoWin *v1; // esi@1
  PROTO_AVATAR_SHAPE_INFO *v2; // eax@1

  v1 = this;
  v2 = this->m_pkShapeData;
  if ( *(_BYTE *)v2 & 0x80 )
    *(_BYTE *)v2 &= 0x7Fu;
  else
    *(_BYTE *)v2 |= 0x80u;
  CharCreateFrameWork::ChangeAvatarGender((CharCreateFrameWork *)this->m_pkFrameWork);
  v1->m_nFaceTypeIndex = 0;
  v1->m_nHairColorIndex = 0;
  v1->m_nHairTypeIndex = 0;
}

//----- (00408E70) --------------------------------------------------------
void __thiscall CharCreateInfoWin::~CharCreateInfoWin(CharCreateInfoWin *this)
{
  CharCreateInfoWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&CharCreateInfoWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CharCreateInfoWin::`vftable'{for `IDirectMessenger'};
  `eh vector destructor iterator'(
    this->m_pkText,
    4u,
    4,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_pkBtn,
    4u,
    8,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9700CC: using guessed type void (__thiscall *CharCreateInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9700EC: using guessed type int (__thiscall *CharCreateInfoWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00408F00) --------------------------------------------------------
char __thiscall CharCreateInfoWin::Create(CharCreateInfoWin *this, PROTO_AVATAR_SHAPE_INFO *pkShapeInfo, PgFrameWork *pkFrameWork)
{
  CharCreateInfoWin *v3; // esi@1
  NiTexturePalette *v4; // edi@2
  const char *v5; // eax@4
  PROTO_AVATAR_SHAPE_INFO *v6; // eax@4
  PROTO_AVATAR_SHAPE_INFO *v7; // esi@8
  char result; // al@11
  PgSprData *v9; // eax@12
  PROTO_AVATAR_SHAPE_INFO *v10; // esi@13
  NiD3DDefaultShader *v11; // eax@18
  NiD3DDefaultShader *v12; // eax@18
  NiD3DDefaultShader *v13; // eax@18
  NiD3DDefaultShader *v14; // eax@18
  NiD3DDefaultShader *v15; // eax@18
  NiD3DDefaultShader *v16; // eax@18
  NiD3DDefaultShader *v17; // eax@18
  NiD3DDefaultShader *v18; // eax@18
  D3DXCOLOR v19; // ST0C_16@18
  PgWinSpr *v20; // eax@18
  PgWinText *v21; // eax@18
  D3DXCOLOR v22; // ST0C_16@18
  PgWinSpr *v23; // eax@18
  PgWinText *v24; // eax@18
  D3DXCOLOR v25; // ST0C_16@18
  PgWinSpr *v26; // eax@18
  PgWinText *v27; // eax@18
  D3DXCOLOR v28; // ST0C_16@18
  PgWinSpr *v29; // eax@18
  PgWinText *v30; // eax@18
  PROTO_AVATAR_SHAPE_INFO *v31; // esi@19
  UIUtil ui; // [sp+14h] [bp-28h]@18
  int iLeft; // [sp+28h] [bp-14h]@12
  int iTop; // [sp+2Ch] [bp-10h]@12
  int v35; // [sp+38h] [bp-4h]@2

  v3 = this;
  if ( !pkShapeInfo )
    return 0;
  this->m_pkShapeData = pkShapeInfo;
  pkShapeInfo = 0;
  v4 = pTexturePalette;
  v35 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "charcreate\\CreatCharInfo.nif");
  PgUtil::LoadNodeNifFile(v5, (NiPointer<NiNode> *)&pkShapeInfo, v4);
  v6 = pkShapeInfo;
  if ( !pkShapeInfo )
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("CreatCharInfo load fail", "LoadFail", pkShapeInfo);
      v6 = pkShapeInfo;
    }
    v35 = -1;
    if ( v6 )
    {
      v7 = v6;
      if ( !InterlockedDecrement((volatile LONG *)&v6[1]) )
      {
        if ( v7 )
          (**(void (__thiscall ***)(PROTO_AVATAR_SHAPE_INFO *, signed int))v7)(v7, 1);
      }
    }
    return 0;
  }
  v9 = PgSprData::Create((NiAVObject *)pkShapeInfo, "Plane", &iLeft, &iTop, 0);
  if ( PgWinFrame::Create((PgWinFrame *)&v3->vfptr, 0, 0, v9, 0, pkFrameWork, "CharCreateInfoWin", 0) )
  {
    UIUtil::UIUtil(&ui);
    LOBYTE(v35) = 1;
    UIUtil::SetParent(&ui, (PgWin *)&v3->vfptr);
    UIUtil::SetOffset(&ui, iLeft, iTop);
    UIUtil::SetUIGeom(&ui, (NiAVObject *)pkShapeInfo);
    v11 = (NiD3DDefaultShader *)UIUtil::CreateButton(&ui, 0, "FaceArrowL", 0, 3);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)v3->m_pkBtn, v11);
    v12 = (NiD3DDefaultShader *)UIUtil::CreateButton(&ui, 1u, "FaceArrowR", 0, 3);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_pkBtn[1], v12);
    v13 = (NiD3DDefaultShader *)UIUtil::CreateButton(&ui, 2u, "HairArrowL", 0, 3);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_pkBtn[4], v13);
    v14 = (NiD3DDefaultShader *)UIUtil::CreateButton(&ui, 3u, "HairArrowR", 0, 3);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_pkBtn[5], v14);
    v15 = (NiD3DDefaultShader *)UIUtil::CreateButton(&ui, 4u, "ColorArrowL", 0, 3);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_pkBtn[6], v15);
    v16 = (NiD3DDefaultShader *)UIUtil::CreateButton(&ui, 5u, "ColorArrowR", 0, 3);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_pkBtn[7], v16);
    v17 = (NiD3DDefaultShader *)UIUtil::CreateButton(&ui, 6u, "GenderArrowL", 0, 3);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_pkBtn[2], v17);
    v18 = (NiD3DDefaultShader *)UIUtil::CreateButton(&ui, 7u, "GenderArrowR", 0, 3);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_pkBtn[3], v18);
    UIUtil::CreateSpr(&ui, "Plane01", 0);
    *(_QWORD *)&v19.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v19.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v20 = UIUtil::CreateSpr(&ui, "Face", 0);
    v21 = UIUtil::CreateAttachedText((PgWin *)&v20->vfptr, "-", v19, 5u);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)v3->m_pkText, (NiD3DDefaultShader *)v21);
    *(_QWORD *)&v22.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v22.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v23 = UIUtil::CreateSpr(&ui, "Color", 0);
    v24 = UIUtil::CreateAttachedText((PgWin *)&v23->vfptr, "-", v22, 5u);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_pkText[2], (NiD3DDefaultShader *)v24);
    *(_QWORD *)&v25.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v25.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v26 = UIUtil::CreateSpr(&ui, "Hair", 0);
    v27 = UIUtil::CreateAttachedText((PgWin *)&v26->vfptr, "-", v25, 5u);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_pkText[1], (NiD3DDefaultShader *)v27);
    *(_QWORD *)&v28.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v28.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v29 = UIUtil::CreateSpr(&ui, "Gender", 0);
    v30 = UIUtil::CreateAttachedText((PgWin *)&v29->vfptr, "-", v28, 5u);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_pkText[3], (NiD3DDefaultShader *)v30);
    ((void (__thiscall *)(CharCreateInfoWin *, unsigned int, unsigned int, _DWORD, _DWORD))v3->vfptr[59].__vecDelDtor)(
      v3,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.2,
      0.5);
    v3->vfptr[130].__vecDelDtor((NiRefObject *)v3, 0);
    LOBYTE(v35) = 0;
    UIUtil::~UIUtil(&ui);
    v35 = -1;
    if ( pkShapeInfo )
    {
      v31 = pkShapeInfo;
      if ( !InterlockedDecrement((volatile LONG *)&pkShapeInfo[1]) )
      {
        if ( v31 )
          (**(void (__thiscall ***)(PROTO_AVATAR_SHAPE_INFO *, signed int))v31)(v31, 1);
      }
    }
    result = 1;
  }
  else
  {
    v10 = pkShapeInfo;
    v35 = -1;
    if ( pkShapeInfo && !InterlockedDecrement((volatile LONG *)&pkShapeInfo[1]) && v10 )
      (**(void (__thiscall ***)(PROTO_AVATAR_SHAPE_INFO *, signed int))v10)(v10, 1);
    result = 0;
  }
  return result;
}
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00409370) --------------------------------------------------------
void __thiscall CharCreateInfoWin::CharCreateInfoWin(CharCreateInfoWin *this)
{
  CharCreateInfoWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&CharCreateInfoWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CharCreateInfoWin::`vftable'{for `IDirectMessenger'};
  `eh vector constructor iterator'(
    v1->m_pkBtn,
    4u,
    8,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_pkText,
    4u,
    4,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_pkShapeData = 0;
  v1->m_nHairTypeIndex = 0;
  v1->m_nHairColorIndex = 0;
  v1->m_nFaceTypeIndex = 0;
}
// 9700CC: using guessed type void (__thiscall *CharCreateInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9700EC: using guessed type int (__thiscall *CharCreateInfoWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00409420) --------------------------------------------------------
void __thiscall CharCreateInfoWin::UpdateMeWin(CharCreateInfoWin *this, float fCurTime)
{
  CharCreateInfoWin *v2; // esi@1
  char *v3; // eax@1
  int v4; // eax@3
  unsigned int v5; // ebx@4
  unsigned int v6; // edi@6
  char *v7; // eax@7
  char *v8; // eax@11
  char v9; // [sp+4h] [bp-4h]@3

  v2 = this;
  apcSexText[0] = (char *)TextData::Get(0xA5A096A3);
  dword_A886A8 = (int)TextData::Get(0x4D5F9795u);
  ((void (__stdcall *)(char *))v2->m_pkText[3].m_pObject->vfptr[118].__vecDelDtor)(apcSexText[(unsigned int)*(_BYTE *)v2->m_pkShapeData >> 7]);
  v3 = CDataReader::GetRecord(
         (CDataReader *)(ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable + 4),
         *((_BYTE *)v2->m_pkShapeData + 3));
  if ( v3 )
    ((void (__stdcall *)(char *))v2->m_pkText[0].m_pObject->vfptr[118].__vecDelDtor)(v3 + 1);
  v4 = *(_DWORD *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 56);
  v9 = *((_BYTE *)v2->m_pkShapeData + 1);
  if ( v4 )
    v5 = *(_DWORD *)(v4 + 40);
  else
    v5 = 0;
  v6 = 0;
  if ( v5 )
  {
    while ( 1 )
    {
      v7 = CDataReader::GetRecord((CDataReader *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 4), v6);
      if ( *v7 == v9 )
        break;
      if ( ++v6 >= v5 )
        goto LABEL_11;
    }
    ((void (__stdcall *)(char *))v2->m_pkText[1].m_pObject->vfptr[118].__vecDelDtor)(v7 + 33);
  }
LABEL_11:
  v8 = CDataReader::GetRecord(
         (CDataReader *)(ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable + 4),
         *((_BYTE *)v2->m_pkShapeData + 2));
  if ( v8 )
    ((void (__stdcall *)(char *))v2->m_pkText[2].m_pObject->vfptr[118].__vecDelDtor)(v8 + 16);
}
// A88694: using guessed type int ITableBase<HairInfo,HairInfoTab>::ms_pkTable;
// A8869C: using guessed type int ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable;
// A886A0: using guessed type int ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable;
// A886A8: using guessed type int dword_A886A8;

//----- (00409530) --------------------------------------------------------
CharCreateInfoWin *__cdecl CharCreateInfoWin::CreateWin(PROTO_AVATAR_SHAPE_INFO *pkShapeInfo, PgFrameWork *pkFrameWork)
{
  PgWin *v2; // eax@1
  PgWin *v3; // eax@2
  PgWin *v4; // esi@2
  PgWin *v5; // edi@8
  CharCreateInfoWin *v6; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v2 = (PgWin *)operator new(0x198u);
  result.m_pObject = v2;
  v8 = 0;
  if ( v2 )
  {
    CharCreateInfoWin::CharCreateInfoWin((CharCreateInfoWin *)v2);
    v4 = v3;
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v8 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v4);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, PROTO_AVATAR_SHAPE_INFO *, PgFrameWork *))v4->vfptr[135].__vecDelDtor)(
                          v4,
                          pkShapeInfo,
                          pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v4->vfptr[89].__vecDelDtor)(v4);
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = (CharCreateInfoWin *)v4;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v4);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = 0;
  }
  return v6;
}

//----- (00409660) --------------------------------------------------------
void __thiscall CharCreateInfoWin::OnCmdFaceL(CharCreateInfoWin *this)
{
  CharCreateInfoWin *v1; // esi@1
  unsigned int *v2; // edi@1
  signed int v3; // eax@1
  PROTO_AVATAR_SHAPE_INFO *v4; // ecx@2
  int v5; // ecx@3
  int v6; // ecx@6
  PROTO_AVATAR_SHAPE_INFO *v7; // edx@8
  std::vector<unsigned long,std::allocator<unsigned long> > vecResult; // [sp+10h] [bp-1Ch]@1
  int v9; // [sp+28h] [bp-4h]@1

  v1 = this;
  vecResult._Myfirst = 0;
  vecResult._Mylast = 0;
  vecResult._Myend = 0;
  v9 = 0;
  FaceInfoTab::GetEquipableFace(0, &vecResult);
  v2 = vecResult._Myfirst;
  v3 = vecResult._Mylast - vecResult._Myfirst;
  if ( v3 )
  {
    v5 = v1->m_nFaceTypeIndex;
    if ( v5 )
      v1->m_nFaceTypeIndex = v5 - 1;
    else
      v1->m_nFaceTypeIndex = v3 - 1;
    v6 = v1->m_nFaceTypeIndex;
    if ( v6 >= v3 )
    {
      v7 = v1->m_pkShapeData;
      v1->m_nFaceTypeIndex = 0;
      *((_BYTE *)v7 + 3) = *(_BYTE *)v2;
    }
    else
    {
      *((_BYTE *)v1->m_pkShapeData + 3) = v2[v6];
    }
  }
  else
  {
    v4 = v1->m_pkShapeData;
    v1->m_nFaceTypeIndex = 0;
    *((_BYTE *)v4 + 3) = 0;
  }
  CharCreateFrameWork::ChangeAvatarFace((CharCreateFrameWork *)v1->m_pkFrameWork);
  if ( v2 )
    operator delete(v2);
}

//----- (00409740) --------------------------------------------------------
void __thiscall CharCreateInfoWin::OnCmdFaceR(CharCreateInfoWin *this)
{
  CharCreateInfoWin *v1; // esi@1
  unsigned int *v2; // edi@1
  signed int v3; // eax@1
  PROTO_AVATAR_SHAPE_INFO *v4; // ecx@2
  int v5; // ecx@3
  int v6; // ecx@6
  PROTO_AVATAR_SHAPE_INFO *v7; // edx@8
  std::vector<unsigned long,std::allocator<unsigned long> > vecResult; // [sp+10h] [bp-1Ch]@1
  int v9; // [sp+28h] [bp-4h]@1

  v1 = this;
  vecResult._Myfirst = 0;
  vecResult._Mylast = 0;
  vecResult._Myend = 0;
  v9 = 0;
  FaceInfoTab::GetEquipableFace(0, &vecResult);
  v2 = vecResult._Myfirst;
  v3 = vecResult._Mylast - vecResult._Myfirst;
  if ( v3 )
  {
    v5 = v1->m_nFaceTypeIndex;
    if ( v5 == v3 - 1 )
      v1->m_nFaceTypeIndex = 0;
    else
      v1->m_nFaceTypeIndex = v5 + 1;
    v6 = v1->m_nFaceTypeIndex;
    if ( v6 >= v3 )
    {
      v7 = v1->m_pkShapeData;
      v1->m_nFaceTypeIndex = 0;
      *((_BYTE *)v7 + 3) = *(_BYTE *)v2;
    }
    else
    {
      *((_BYTE *)v1->m_pkShapeData + 3) = v2[v6];
    }
  }
  else
  {
    v4 = v1->m_pkShapeData;
    v1->m_nFaceTypeIndex = 0;
    *((_BYTE *)v4 + 3) = 0;
  }
  CharCreateFrameWork::ChangeAvatarFace((CharCreateFrameWork *)v1->m_pkFrameWork);
  if ( v2 )
    operator delete(v2);
}

//----- (00409820) --------------------------------------------------------
void __thiscall CharCreateInfoWin::OnCmdHairL(CharCreateInfoWin *this)
{
  CharCreateInfoWin *v1; // esi@1
  unsigned __int8 v2; // al@1
  unsigned int *v3; // edi@1
  signed int v4; // eax@1
  PROTO_AVATAR_SHAPE_INFO *v5; // eax@2
  int v6; // ecx@3
  int v7; // ecx@4
  PROTO_AVATAR_SHAPE_INFO *v8; // ecx@8
  std::vector<unsigned long,std::allocator<unsigned long> > vecResult; // [sp+10h] [bp-1Ch]@1
  int v10; // [sp+28h] [bp-4h]@1

  v1 = this;
  vecResult._Myfirst = 0;
  vecResult._Mylast = 0;
  vecResult._Myend = 0;
  v2 = *(_BYTE *)this->m_pkShapeData;
  v10 = 0;
  HairInfoTab::GetEquipableHairType((v2 >> 2) & 0x1F, v2 >> 7, 0, &vecResult);
  v3 = vecResult._Myfirst;
  v4 = vecResult._Mylast - vecResult._Myfirst;
  if ( v4 )
  {
    v6 = v1->m_nHairTypeIndex;
    if ( v6 )
      v7 = v6 - 1;
    else
      v7 = v4 - 1;
    v1->m_nHairTypeIndex = v7;
    if ( v7 >= v4 )
    {
      v8 = v1->m_pkShapeData;
      v1->m_nHairTypeIndex = 0;
      *((_BYTE *)v8 + 1) = *(_BYTE *)v3;
    }
    else
    {
      *((_BYTE *)v1->m_pkShapeData + 1) = v3[v7];
    }
  }
  else
  {
    v5 = v1->m_pkShapeData;
    v1->m_nHairTypeIndex = 0;
    *((_BYTE *)v5 + 1) = 0;
  }
  CharCreateFrameWork::ChangeAvatarHair((CharCreateFrameWork *)v1->m_pkFrameWork);
  if ( v3 )
    operator delete(v3);
}

//----- (00409910) --------------------------------------------------------
void __thiscall CharCreateInfoWin::OnCmdHairR(CharCreateInfoWin *this)
{
  CharCreateInfoWin *v1; // esi@1
  unsigned __int8 v2; // al@1
  unsigned int *v3; // edi@1
  signed int v4; // eax@1
  PROTO_AVATAR_SHAPE_INFO *v5; // eax@2
  int v6; // ecx@3
  int v7; // ecx@6
  PROTO_AVATAR_SHAPE_INFO *v8; // edx@8
  std::vector<unsigned long,std::allocator<unsigned long> > vecResult; // [sp+10h] [bp-1Ch]@1
  int v10; // [sp+28h] [bp-4h]@1

  v1 = this;
  vecResult._Myfirst = 0;
  vecResult._Mylast = 0;
  vecResult._Myend = 0;
  v2 = *(_BYTE *)this->m_pkShapeData;
  v10 = 0;
  HairInfoTab::GetEquipableHairType((v2 >> 2) & 0x1F, v2 >> 7, 0, &vecResult);
  v3 = vecResult._Myfirst;
  v4 = vecResult._Mylast - vecResult._Myfirst;
  if ( v4 )
  {
    v6 = v1->m_nHairTypeIndex;
    if ( v6 == v4 - 1 )
      v1->m_nHairTypeIndex = 0;
    else
      v1->m_nHairTypeIndex = v6 + 1;
    v7 = v1->m_nHairTypeIndex;
    if ( v7 >= v4 )
    {
      v8 = v1->m_pkShapeData;
      v1->m_nHairTypeIndex = 0;
      *((_BYTE *)v8 + 1) = *(_BYTE *)v3;
    }
    else
    {
      *((_BYTE *)v1->m_pkShapeData + 1) = v3[v7];
    }
  }
  else
  {
    v5 = v1->m_pkShapeData;
    v1->m_nHairTypeIndex = 0;
    *((_BYTE *)v5 + 1) = 0;
  }
  CharCreateFrameWork::ChangeAvatarHair((CharCreateFrameWork *)v1->m_pkFrameWork);
  if ( v3 )
    operator delete(v3);
}

//----- (00409A00) --------------------------------------------------------
void __thiscall CharCreateInfoWin::OnCmdColorL(CharCreateInfoWin *this)
{
  CharCreateInfoWin *v1; // esi@1
  unsigned int *v2; // edi@1
  signed int v3; // eax@1
  PROTO_AVATAR_SHAPE_INFO *v4; // ecx@2
  int v5; // ecx@3
  int v6; // ecx@6
  PROTO_AVATAR_SHAPE_INFO *v7; // edx@8
  std::vector<unsigned long,std::allocator<unsigned long> > vecResult; // [sp+10h] [bp-1Ch]@1
  int v9; // [sp+28h] [bp-4h]@1

  v1 = this;
  vecResult._Myfirst = 0;
  vecResult._Mylast = 0;
  vecResult._Myend = 0;
  v9 = 0;
  HairColorInfoTab::GetEquipableHairColor(0, &vecResult);
  v2 = vecResult._Myfirst;
  v3 = vecResult._Mylast - vecResult._Myfirst;
  if ( v3 )
  {
    v5 = v1->m_nHairColorIndex;
    if ( v5 )
      v1->m_nHairColorIndex = v5 - 1;
    else
      v1->m_nHairColorIndex = v3 - 1;
    v6 = v1->m_nHairColorIndex;
    if ( v6 >= v3 )
    {
      v7 = v1->m_pkShapeData;
      v1->m_nHairColorIndex = 0;
      *((_BYTE *)v7 + 2) = *(_BYTE *)v2;
    }
    else
    {
      *((_BYTE *)v1->m_pkShapeData + 2) = v2[v6];
    }
  }
  else
  {
    v4 = v1->m_pkShapeData;
    v1->m_nHairColorIndex = 0;
    *((_BYTE *)v4 + 2) = 0;
  }
  CharCreateFrameWork::ChangeAvatarHairColor((CharCreateFrameWork *)v1->m_pkFrameWork);
  if ( v2 )
    operator delete(v2);
}

//----- (00409AE0) --------------------------------------------------------
void __thiscall CharCreateInfoWin::OnCmdColorR(CharCreateInfoWin *this)
{
  CharCreateInfoWin *v1; // esi@1
  unsigned int *v2; // edi@1
  signed int v3; // eax@1
  PROTO_AVATAR_SHAPE_INFO *v4; // ecx@2
  int v5; // ecx@3
  int v6; // ecx@6
  PROTO_AVATAR_SHAPE_INFO *v7; // edx@8
  std::vector<unsigned long,std::allocator<unsigned long> > vecResult; // [sp+10h] [bp-1Ch]@1
  int v9; // [sp+28h] [bp-4h]@1

  v1 = this;
  vecResult._Myfirst = 0;
  vecResult._Mylast = 0;
  vecResult._Myend = 0;
  v9 = 0;
  HairColorInfoTab::GetEquipableHairColor(0, &vecResult);
  v2 = vecResult._Myfirst;
  v3 = vecResult._Mylast - vecResult._Myfirst;
  if ( v3 )
  {
    v5 = v1->m_nHairColorIndex;
    if ( v5 == v3 - 1 )
      v1->m_nHairColorIndex = 0;
    else
      v1->m_nHairColorIndex = v5 + 1;
    v6 = v1->m_nHairColorIndex;
    if ( v6 >= v3 )
    {
      v7 = v1->m_pkShapeData;
      v1->m_nHairColorIndex = 0;
      *((_BYTE *)v7 + 2) = *(_BYTE *)v2;
    }
    else
    {
      *((_BYTE *)v1->m_pkShapeData + 2) = v2[v6];
    }
  }
  else
  {
    v4 = v1->m_pkShapeData;
    v1->m_nHairColorIndex = 0;
    *((_BYTE *)v4 + 2) = 0;
  }
  CharCreateFrameWork::ChangeAvatarHairColor((CharCreateFrameWork *)v1->m_pkFrameWork);
  if ( v2 )
    operator delete(v2);
}

//----- (00409BC0) --------------------------------------------------------
void __thiscall CharCreateInfoWin::OnCommand(CharCreateInfoWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 6u:
      CharCreateInfoWin::OnCmdSexL(this);
      break;
    case 7u:
      CharCreateInfoWin::OnCmdSexR(this);
      break;
    case 0u:
      CharCreateInfoWin::OnCmdFaceL(this);
      break;
    case 1u:
      CharCreateInfoWin::OnCmdFaceR(this);
      break;
    case 2u:
      CharCreateInfoWin::OnCmdHairL(this);
      break;
    case 3u:
      CharCreateInfoWin::OnCmdHairR(this);
      break;
    case 4u:
      CharCreateInfoWin::OnCmdColorL(this);
      break;
    case 5u:
      CharCreateInfoWin::OnCmdColorR(this);
      break;
    default:
      return;
  }
}

//----- (00409C40) --------------------------------------------------------
HairInfo *__cdecl HairInfoTab::GetHairInfo(char byHairID)
{
  int v1; // eax@1
  unsigned int v2; // edi@2
  unsigned int v3; // esi@4
  HairInfo *result; // eax@5

  v1 = *(_DWORD *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 56);
  if ( v1 )
    v2 = *(_DWORD *)(v1 + 40);
  else
    v2 = 0;
  v3 = 0;
  if ( v2 )
  {
    while ( 1 )
    {
      result = (HairInfo *)CDataReader::GetRecord((CDataReader *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 4), v3);
      if ( result->ID == byHairID )
        break;
      if ( ++v3 >= v2 )
        goto LABEL_7;
    }
  }
  else
  {
LABEL_7:
    result = 0;
  }
  return result;
}
// A88694: using guessed type int ITableBase<HairInfo,HairInfoTab>::ms_pkTable;

//----- (00409C90) --------------------------------------------------------
CharCreateInfoWin *__thiscall CharCreateInfoWin::`vector deleting destructor'(CharCreateInfoWin *this, unsigned int a2)
{
  CharCreateInfoWin *v2; // esi@1

  v2 = this;
  CharCreateInfoWin::~CharCreateInfoWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00409CC0) --------------------------------------------------------
void __cdecl HairColorInfoTab::GetEquipableHairColor(char ucGrade, void *padwResult)
{
  int v2; // eax@1
  unsigned int v3; // ebx@1
  std::vector<NiTimeController *,std::allocator<NiTimeController *> > *v4; // esi@5
  char *v5; // eax@6
  unsigned int v6; // eax@8
  int v7; // edi@10
  NiTimeController **v8; // eax@12
  NiTimeController **v9; // eax@16
  unsigned int v10; // [sp+4h] [bp-4h]@2

  v2 = *(_DWORD *)(ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable + 56);
  v3 = 0;
  if ( v2 )
    v10 = *(_DWORD *)(v2 + 40);
  else
    v10 = 0;
  if ( v10 > 0 )
  {
    v4 = (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)padwResult;
    do
    {
      v5 = CDataReader::GetRecord((CDataReader *)(ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable + 4), v3);
      if ( v5 && (unsigned __int8)v5[61] <= (unsigned __int8)ucGrade )
      {
        v6 = (unsigned int)v4->_Mylast;
        padwResult = (void *)v3;
        if ( (unsigned int)&padwResult >= v6 || v4->_Myfirst > (NiTimeController **)&padwResult )
        {
          if ( (NiTimeController **)v6 == v4->_Myend )
            std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(v4, 1u);
          v9 = v4->_Mylast;
          if ( v9 )
            *v9 = (NiTimeController *)v3;
        }
        else
        {
          v7 = ((char *)&padwResult - (char *)v4->_Myfirst) >> 2;
          if ( (NiTimeController **)v6 == v4->_Myend )
            std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(v4, 1u);
          v8 = v4->_Mylast;
          if ( v8 )
            *v8 = v4->_Myfirst[v7];
        }
        ++v4->_Mylast;
      }
      ++v3;
    }
    while ( v3 < v10 );
  }
}
// A886A0: using guessed type int ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable;

//----- (00409D70) --------------------------------------------------------
NiRTTI *NiProperty::GetRTTI()
{
  return &NiProperty::m_RTTI;
}

//----- (00409D80) --------------------------------------------------------
void __thiscall NiLight::SetAmbientColor(NiLight *this, NiColor *color)
{
  float v2; // eax@1

  this->m_kAmb.r = color->r;
  this->m_kAmb.g = color->g;
  v2 = color->b;
  ++this->m_uiRevID;
  this->m_kAmb.b = v2;
}

//----- (00409DB0) --------------------------------------------------------
void __thiscall NiLight::SetDiffuseColor(NiLight *this, NiColor *color)
{
  float v2; // eax@1

  this->m_kDiff.r = color->r;
  this->m_kDiff.g = color->g;
  v2 = color->b;
  ++this->m_uiRevID;
  this->m_kDiff.b = v2;
}

//----- (00409DE0) --------------------------------------------------------
void __thiscall NiLight::SetSpecularColor(NiLight *this, NiColor *color)
{
  float v2; // eax@1

  this->m_kSpec.r = color->r;
  this->m_kSpec.g = color->g;
  v2 = color->b;
  ++this->m_uiRevID;
  this->m_kSpec.b = v2;
}

//----- (00409E10) --------------------------------------------------------
void __thiscall NiVertexColorProperty::NiVertexColorProperty(NiVertexColorProperty *this)
{
  NiVertexColorProperty *v1; // esi@1

  v1 = this;
  NiObjectNET::NiObjectNET((NiObjectNET *)&this->vfptr);
  v1->m_uFlags = 0;
  v1->m_eSource = 0;
  v1->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
  v1->m_eLighting = 1;
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);

//----- (00409E40) --------------------------------------------------------
NiRTTI *NiVertexColorProperty::GetRTTI()
{
  return &NiVertexColorProperty::m_RTTI;
}

//----- (00409E50) --------------------------------------------------------
int NiVertexColorProperty::Type()
{
  return 9;
}

//----- (00409E60) --------------------------------------------------------
void __thiscall Name5::Name5(PROTO_CHAT_RESTRICT_INFO *this)
{
  *(_QWORD *)&this->sCharID.n5_code[3] = 0i64;
  *(_QWORD *)&this->sCharID.n5_code[1] = 0i64;
  this->sCharID.n5_code[0] = 0;
}

//----- (00409E90) --------------------------------------------------------
void __thiscall IDirectMessenger::SendDirectMessage(IDirectMessenger *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  IDirectMessenger *v4; // esi@1

  v4 = this;
  if ( this->m_pkMsgHooker )
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))this->m_pkMsgHooker->vfptr->DirectMessage)(iMsgTag, pvBody, pkFrom);
  v4->vfptr->DirectMessage(v4, iMsgTag, pvBody, pkFrom);
}

//----- (00409ED0) --------------------------------------------------------
char __thiscall PgFrameWork::Init(PgFrameWork *this, PgMsg::Frame *pkFrameMsg)
{
  char result; // al@1

  result = 1;
  this->m_bInit = 1;
  return result;
}

//----- (00409EE0) --------------------------------------------------------
void __thiscall PgFrameWork::Terminate(PgFrameWork *this)
{
  this->m_bInit = 0;
  this->m_BackFrameID = 0;
}

//----- (00409EF0) --------------------------------------------------------
PgWinMgr::PgWinMsg *__thiscall PgTQueue<PgWinMgr::PgWinMsg>::Remove(PgTQueue<PgWinMgr::PgWinMsg> *this, PgWinMgr::PgWinMsg *result)
{
  PgWinMgr::PgWinMsg *v2; // eax@1
  unsigned int v3; // esi@1
  PgWinMgr::PgWinMsg *v4; // edx@1
  unsigned int v5; // edi@1
  int v6; // edx@1

  v2 = result;
  v3 = this->m_uiHead;
  v4 = &this->m_pBase[this->m_uiHead];
  result->m_pkWin = v4->m_pkWin;
  result->m_Msg = v4->m_Msg;
  v5 = v4->m_wParam;
  v6 = v4->m_lParam;
  result->m_wParam = v5;
  result->m_lParam = v6;
  this->m_uiHead = v3 + 1;
  if ( v3 + 1 == this->m_uiAlloced )
    this->m_uiHead = 0;
  if ( this->m_uiHead == this->m_uiTail )
  {
    this->m_uiHead = -1;
    this->m_uiTail = 0;
  }
  return v2;
}

//----- (00409F40) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::~NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> > *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable';
}
// 9703D4: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable')(void *p, char);

//----- (00409F50) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> > *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> > *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> > *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9703D4: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable')(void *p, char);

//----- (00409F80) --------------------------------------------------------
void __thiscall Studio::SetSubject(Ni2DBuffer *this, Ni2DBuffer::RendererData *pkRendererData)
{
  Ni2DBuffer *v2; // ebx@1
  Ni2DBuffer::RendererData *v3; // esi@1

  v2 = this;
  v3 = this->m_spRendererData.m_pObject;
  if ( v3 != pkRendererData )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spRendererData.m_pObject = pkRendererData;
    if ( pkRendererData )
      InterlockedIncrement((volatile LONG *)&pkRendererData->m_uiRefCount);
  }
}

//----- (00409FD0) --------------------------------------------------------
void __thiscall NiCriticalSection::Unlock(NiCriticalSection *this)
{
  bool v1; // zf@1

  v1 = this->m_uiLockCount-- == 1;
  if ( v1 )
    this->m_ulThreadOwner = 0;
  LeaveCriticalSection(&this->m_kCriticalSection);
}

//----- (00409FF0) --------------------------------------------------------
void __stdcall NiTPointerAllocator<unsigned int>::Deallocate(void *pkDel)
{
  bool v2; // zf@1

  EnterCriticalSection(&NiTAbstractPoolAllocator<unsigned int>::ms_kCriticalSection);
  dword_B62428 = GetCurrentThreadId();
  ++dword_B6242C;
  *((_DWORD *)pkDel + 1) = 0;
  *(_DWORD *)pkDel = NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem;
  v2 = dword_B6242C-- == 1;
  NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem = (int)pkDel;
  if ( v2 )
    dword_B62428 = 0;
  LeaveCriticalSection(&NiTAbstractPoolAllocator<unsigned int>::ms_kCriticalSection);
}
// B6240C: using guessed type int NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem;
// B62428: using guessed type int dword_B62428;
// B6242C: using guessed type int dword_B6242C;

//----- (0040A050) --------------------------------------------------------
int NiTAbstractPoolAllocator<unsigned int>::CreateFreeMem()
{
  _DWORD *v0; // eax@1
  signed int v1; // ecx@1
  signed int v2; // eax@1
  unsigned int v3; // esi@2
  int result; // eax@4

  v0 = operator new[](12 * NiTAbstractPoolAllocator<unsigned int>::ms_uiBlockSize);
  NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem = (int)v0;
  v0[3 * NiTAbstractPoolAllocator<unsigned int>::ms_uiBlockSize - 3] = 0;
  v1 = 1;
  v2 = 12;
  do
  {
    *(_DWORD *)(v2 + NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem) = v2
                                                                           + NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem
                                                                           + 12;
    v3 = v1++;
    v2 += 12;
  }
  while ( v3 < NiTAbstractPoolAllocator<unsigned int>::ms_uiBlockSize - 2 );
  if ( NiTAbstractPoolAllocator<unsigned int>::ms_pkBlockHeader )
  {
    *(_DWORD *)NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem = NiTAbstractPoolAllocator<unsigned int>::ms_pkBlockHeader;
    NiTAbstractPoolAllocator<unsigned int>::ms_pkBlockHeader = (void *)NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem;
    result = NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem + 12;
    NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem += 12;
  }
  else
  {
    result = NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem;
    NiTAbstractPoolAllocator<unsigned int>::ms_pkBlockHeader = (void *)NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem;
    *(_DWORD *)NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem = 0;
    NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem += 12;
  }
  return result;
}
// A7D118: using guessed type int NiTAbstractPoolAllocator<unsigned int>::ms_uiBlockSize;
// B6240C: using guessed type int NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem;

//----- (0040A0F0) --------------------------------------------------------
void __thiscall NiAlphaProperty::NiAlphaProperty(NiAlphaProperty *this)
{
  NiAlphaProperty *v1; // esi@1

  v1 = this;
  NiObjectNET::NiObjectNET((NiObjectNET *)&this->vfptr);
  v1->m_uFlags = 236;
  v1->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
  v1->m_ucAlphaTestRef = 0;
}
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);

//----- (0040A110) --------------------------------------------------------
NiRTTI *NiAlphaProperty::GetRTTI()
{
  return &NiAlphaProperty::m_RTTI;
}

//----- (0040A130) --------------------------------------------------------
NiRTTI *NiFogProperty::GetRTTI()
{
  return &NiFogProperty::m_RTTI;
}

//----- (0040A140) --------------------------------------------------------
NiWireframeProperty *__thiscall NiFogProperty::`scalar deleting destructor'(NiWireframeProperty *this, unsigned int a2)
{
  NiWireframeProperty *v2; // esi@1

  v2 = this;
  NiObjectNET::~NiObjectNET((NiObjectNET *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0040A170) --------------------------------------------------------
NiRTTI *PgFrameWork::GetRTTI()
{
  return &PgFrameWork::m_RTTI;
}

//----- (0040A180) --------------------------------------------------------
void __thiscall PgFrameWork::Update(PgFrameWork *this, float fCurTime)
{
  PgFrameWork::ProcessAllMsg(this);
}

//----- (0040A190) --------------------------------------------------------
const char *PgFrameWork::GetFrameWorkName()
{
  return PgFrameWork::m_RTTI.m_pcName;
}

//----- (0040A1A0) --------------------------------------------------------
void __thiscall PgFrameWork::~PgFrameWork(PgFrameWork *this)
{
  PgMsg::Frame *v1; // ST00_4@1

  v1 = this->m_kMsgQ.m_pBase;
  this->vfptr = (IDirectMessengerVtbl *)&PgFrameWork::`vftable';
  operator delete[](v1);
}
// 970534: using guessed type void (__thiscall *PgFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);

//----- (0040A1C0) --------------------------------------------------------
PgFrameWork *__thiscall PgFrameWork::`scalar deleting destructor'(PgFrameWork *this, unsigned int a2)
{
  PgFrameWork *v2; // esi@1
  PgMsg::Frame *v3; // ST00_4@1

  v2 = this;
  v3 = this->m_kMsgQ.m_pBase;
  this->vfptr = (IDirectMessengerVtbl *)&PgFrameWork::`vftable';
  operator delete[](v3);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 970534: using guessed type void (__thiscall *PgFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);

//----- (0040A1F0) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> > *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> > *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> > *v2; // edi@1
  NiTListItem<NiPointer<Shadow> > *v3; // esi@1
  NiTListItem<NiPointer<Shadow> > *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> >Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> > *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9703D4: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable')(void *p, char);
// 970490: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable')(void *p, char);

//----- (0040A280) --------------------------------------------------------
void __thiscall NiTPointerList<NiPointer<Shadow>>::~NiTPointerList<NiPointer<Shadow>>(NiTPointerList<NiPointer<Shadow> > *this)
{
  NiTPointerList<NiPointer<Shadow> > *v1; // edi@1
  NiTListItem<NiPointer<Shadow> > *v2; // esi@1
  NiTListItem<NiPointer<Shadow> > *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> >Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> > *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable';
}
// 9703D4: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable')(void *p, char);
// 970490: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable')(void *p, char);

//----- (0040A300) --------------------------------------------------------
int NiTPointerAllocator<unsigned int>::Allocate()
{
  DWORD v1; // eax@1
  int v2; // esi@1

  EnterCriticalSection(&NiTAbstractPoolAllocator<unsigned int>::ms_kCriticalSection);
  v1 = GetCurrentThreadId();
  v2 = NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem;
  ++dword_B6242C;
  dword_B62428 = v1;
  if ( !NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem )
  {
    NiTAbstractPoolAllocator<unsigned int>::CreateFreeMem();
    v2 = NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem;
  }
  NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem = *(_DWORD *)v2;
  *(_DWORD *)(v2 + 8) = 0;
  *(_DWORD *)v2 = 0;
  *(_DWORD *)(v2 + 4) = 0;
  if ( !--dword_B6242C )
    dword_B62428 = 0;
  LeaveCriticalSection(&NiTAbstractPoolAllocator<unsigned int>::ms_kCriticalSection);
  return v2;
}
// B6240C: using guessed type int NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem;
// B62428: using guessed type int dword_B62428;
// B6242C: using guessed type int dword_B6242C;

//----- (0040A370) --------------------------------------------------------
void __thiscall CharCreateFrameWork::TerminateWindow(CharCreateFrameWork *this)
{
  CharCreateFrameWork *v1; // esi@1
  unsigned int v2; // eax@15

  v1 = this;
  if ( this->m_pkCharCreateInfoWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkCharCreateInfoWin->vfptr);
    v1->m_pkCharCreateInfoWin = 0;
  }
  if ( v1->m_pkCharCreateViewCtrlWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkCharCreateViewCtrlWin->vfptr);
    v1->m_pkCharCreateViewCtrlWin = 0;
  }
  if ( v1->m_pkCharCreateDescritWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkCharCreateDescritWin->vfptr);
    v1->m_pkCharCreateDescritWin = 0;
  }
  if ( v1->m_pkCharCreateStatWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkCharCreateStatWin->vfptr);
    v1->m_pkCharCreateStatWin = 0;
  }
  if ( v1->m_pkCharCreateOkCancelWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkCharCreateOkCancelWin->vfptr);
    v1->m_pkCharCreateOkCancelWin = 0;
  }
  if ( v1->m_pkCharCreateClassWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkCharCreateClassWin->vfptr);
    v1->m_pkCharCreateClassWin = 0;
  }
  if ( g_pkToolTipWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, g_pkToolTipWin);
    g_pkToolTipWin = 0;
  }
  v2 = stru_B6483C.m_uiHead;
  if ( stru_B6483C.m_uiHead != -1 )
  {
    while ( 1 )
    {
      if ( ++v2 == stru_B6483C.m_uiAlloced )
        v2 = 0;
      if ( v2 == stru_B6483C.m_uiTail )
        break;
      if ( v2 == -1 )
      {
        stru_B6483C.m_uiHead = -1;
        return;
      }
    }
    stru_B6483C.m_uiTail = 0;
    stru_B6483C.m_uiHead = -1;
  }
}

//----- (0040A460) --------------------------------------------------------
void __thiscall CharCreateFrameWork::TerminateBackgroundScene(CharCreateFrameWork *this)
{
  CharCreateFrameWork *v1; // edi@1
  NiNode *v2; // esi@1
  NiCamera *v3; // esi@6
  NiNode *v4; // esi@11
  NiNode *v5; // esi@16
  NiNode *v6; // esi@21

  v1 = this;
  v2 = this->m_spAvatarPos.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spAvatarPos.m_pObject = 0;
  }
  v3 = v1->m_spCamera.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spCamera.m_pObject = 0;
  }
  v4 = v1->m_spCharScene.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spCharScene.m_pObject = 0;
  }
  v5 = v1->m_spBackgroundScene.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spBackgroundScene.m_pObject = 0;
  }
  v6 = v1->m_spShadowScene.m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    v1->m_spShadowScene.m_pObject = 0;
  }
}

//----- (0040A530) --------------------------------------------------------
void __thiscall CharCreateFrameWork::TerminateAvatar(CharCreateFrameWork *this)
{
  NsPgToonExtraData *v1; // eax@1
  CharCreateFrameWork *v2; // edi@1
  NiNode *v3; // esi@3

  v1 = Engine3D::ms_spToonExtraData;
  v2 = this;
  if ( Engine3D::ms_spToonExtraData )
  {
    Engine3D::ms_spToonExtraData->m_fLineSize = 0.0017500001;
    v1->m_pCamera = this->m_pkOldCTCamera;
  }
  v3 = this->m_spAvatarPos.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spAvatarPos.m_pObject = 0;
  }
  v2->m_pkAvatar = 0;
  CharMgr::RemoveAllWithoutMainChar(&g_kCharMgr);
  v2->m_kClass = 1;
}

//----- (0040A5A0) --------------------------------------------------------
bool __thiscall CharCreateFrameWork::InitNet(CharCreateFrameWork *this)
{
  CharCreateFrameWork *v1; // edi@1
  Net *v2; // esi@1
  Net *v3; // ebx@1

  v1 = this;
  v2 = this->m_spWorldMgrNet.m_pObject;
  v3 = g_kNetMgr.m_spWorldMgr.m_pObject;
  if ( v2 != g_kNetMgr.m_spWorldMgr.m_pObject )
  {
    if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spWorldMgrNet.m_pObject = v3;
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
  return v1->m_spWorldMgrNet.m_pObject != 0;
}

//----- (0040A600) --------------------------------------------------------
void __thiscall CharCreateFrameWork::TerminateNet(CharCreateFrameWork *this)
{
  CharCreateFrameWork *v1; // edi@1
  Net *v2; // esi@1

  v1 = this;
  v2 = this->m_spWorldMgrNet.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
    v1->m_spWorldMgrNet.m_pObject = 0;
  }
}

//----- (0040A640) --------------------------------------------------------
char __thiscall CharCreateFrameWork::InitShadow(CharCreateFrameWork *this)
{
  CharCreateFrameWork *v1; // esi@1
  NiNode *v2; // ecx@1
  NiTListItem<NiPointer<Shadow> > **v3; // edi@1
  NiTListItem<NiPointer<Shadow> > *v4; // ST30_4@2
  Shadow *v5; // eax@4
  Shadow *v6; // edi@4
  Shadow *v7; // eax@5
  NiNode *v8; // eax@11
  unsigned int v9; // edi@11
  unsigned int v10; // eax@12
  unsigned int v11; // ebx@14
  NiNode *v12; // edi@20
  float v13; // ecx@20
  int v15; // [sp+34h] [bp-34h]@0
  int v16; // [sp+38h] [bp-30h]@0
  int v17; // [sp+3Ch] [bp-2Ch]@0
  int v18; // [sp+40h] [bp-28h]@0
  NiPoint3 kDefaultDirectionalLightDir; // [sp+44h] [bp-24h]@1
  float fTime; // [sp+50h] [bp-18h]@4
  NiPointer<Shadow> spShadow; // [sp+54h] [bp-14h]@6
  unsigned int i; // [sp+58h] [bp-10h]@3
  int v23; // [sp+64h] [bp-4h]@4

  v1 = this;
  v2 = this->m_spShadowScene.m_pObject;
  kDefaultDirectionalLightDir.x = 0.0;
  kDefaultDirectionalLightDir.y = 0.0;
  v1->m_nMaxShadowObject = 1;
  kDefaultDirectionalLightDir.z = 50.0;
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v2->m_kChildren);
  v3 = &v1->m_kShadowList.m_pkHead->m_pkNext;
  while ( v3 )
  {
    v4 = (NiTListItem<NiPointer<Shadow> > *)v3;
    v3 = (NiTListItem<NiPointer<Shadow> > **)*v3;
    v1->m_kShadowList.vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> > *)&v1->m_kShadowList,
      v4);
  }
  v1->m_kShadowList.m_kAllocator.m_uiCount = 0;
  v1->m_kShadowList.m_pkHead = 0;
  v1->m_kShadowList.m_pkTail = 0;
  for ( i = 0; i < v1->m_nMaxShadowObject; ++i )
  {
    *(float *)&v5 = COERCE_FLOAT(operator new(0x84u));
    fTime = *(float *)&v5;
    v6 = 0;
    v23 = 0;
    if ( *(float *)&v5 != 0.0 )
    {
      Shadow::Shadow(v5, &kDefaultDirectionalLightDir, 0, 0, 5u);
      v6 = v7;
    }
    spShadow.m_pObject = v6;
    if ( v6 )
      InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
    v23 = 1;
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *)&v1->m_kShadowList,
      (NiPointer<NiDX92DBufferData> *)&spShadow);
    ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spShadowScene.m_pObject->vfptr[29].__vecDelDtor)(
      v6->m_spNode.m_pObject,
      0);
    v23 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  }
  *(float *)&v8 = COERCE_FLOAT(operator new(0xE8u));
  fTime = *(float *)&v8;
  v9 = 0;
  v23 = 2;
  if ( *(float *)&v8 == 0.0 )
  {
    i = 0;
  }
  else
  {
    NiNode::NiNode(v8, 0);
    i = v10;
  }
  v23 = -1;
  NiObjectNET::SetName((NiObjectNET *)i, "ShadowNode");
  v11 = v1->m_vecBGObjectNode._Mylast - v1->m_vecBGObjectNode._Myfirst;
  if ( v11 )
  {
    do
    {
      ((void (__stdcall *)(NiPointer<Shadow> *, NiNode *))v1->m_spBackgroundScene.m_pObject->vfptr[30].__vecDelDtor)(
        &spShadow,
        v1->m_vecBGObjectNode._Myfirst[v9]);
      if ( *(float *)&spShadow.m_pObject != 0.0 )
      {
        fTime = *(float *)&spShadow.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&spShadow.m_pObject->m_uiRefCount) && fTime != 0.0 )
          (**(void (__stdcall ***)(_DWORD))LODWORD(fTime))(1);
      }
      (*(void (__stdcall **)(NiNode *, _DWORD))(*(_DWORD *)i + 116))(v1->m_vecBGObjectNode._Myfirst[v9++], 0);
    }
    while ( v9 < v11 );
  }
  v12 = (NiNode *)i;
  ((void (__stdcall *)(unsigned int, _DWORD, int, int, int, int, _DWORD, _DWORD, _DWORD, _DWORD, Shadow *))v1->m_spCharScene.m_pObject->vfptr[29].__vecDelDtor)(
    i,
    0,
    v15,
    v16,
    v17,
    v18,
    LODWORD(kDefaultDirectionalLightDir.x),
    LODWORD(kDefaultDirectionalLightDir.y),
    LODWORD(kDefaultDirectionalLightDir.z),
    LODWORD(fTime),
    spShadow.m_pObject);
  spShadow.m_pObject = (Shadow *)1;
  fTime = v13;
  NiAVObject::Update((NiAVObject *)&v1->m_spCharScene.m_pObject->vfptr, 0.0, 1);
  NiAVObject::UpdateProperties((NiAVObject *)&v1->m_spCharScene.m_pObject->vfptr);
  NiAVObject::UpdateEffects((NiAVObject *)&v1->m_spCharScene.m_pObject->vfptr);
  CharCreateFrameWork::ApplyTerrain(v1, v12);
  return 1;
}

//----- (0040A880) --------------------------------------------------------
void __thiscall CharCreateFrameWork::CharCreateFrameWork(CharCreateFrameWork *this)
{
  CharCreateFrameWork *v1; // esi@1

  v1 = this;
  this->m_pkMsgHooker = 0;
  this->m_uiMessageNum = 0;
  this->vfptr = (IDirectMessengerVtbl *)&PgFrameWork::`vftable';
  this->m_kMsgQ.m_pBase = (PgMsg::Frame *)operator new[](0x14u);
  v1->m_kMsgQ.m_uiTail = 0;
  v1->m_kMsgQ.m_uiAlloced = 1;
  v1->m_kMsgQ.m_uiHead = -1;
  v1->m_BackFrameID = 0;
  v1->m_bInit = 0;
  v1->vfptr = (IDirectMessengerVtbl *)&CharCreateFrameWork::`vftable';
  v1->m_spBackgroundScene.m_pObject = 0;
  v1->m_spCharScene.m_pObject = 0;
  v1->m_spCamera.m_pObject = 0;
  v1->m_spAvatarPos.m_pObject = 0;
  v1->m_kCreateName.n5_code[4] = 0;
  v1->m_kCreateName.n5_code[3] = 0;
  v1->m_kCreateName.n5_code[2] = 0;
  v1->m_kCreateName.n5_code[1] = 0;
  v1->m_kCreateName.n5_code[0] = 0;
  v1->m_spWorldMgrNet.m_pObject = 0;
  v1->m_spShadowScene.m_pObject = 0;
  v1->m_kShadowList.m_kAllocator.m_uiCount = 0;
  v1->m_kShadowList.m_pkHead = 0;
  v1->m_kShadowList.m_pkTail = 0;
  v1->m_kShadowList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> >Vtbl *)&PgTList<NiPointer<Shadow>>::`vftable';
  v1->m_vecBGObjectNode._Myfirst = 0;
  v1->m_vecBGObjectNode._Mylast = 0;
  v1->m_vecBGObjectNode._Myend = 0;
  v1->m_vecShadowObject._Myfirst = 0;
  v1->m_vecShadowObject._Mylast = 0;
  v1->m_vecShadowObject._Myend = 0;
  v1->m_iCreateSlot = -1;
  v1->m_iEraseSlot = -1;
  v1->m_pkAvatar = 0;
  v1->m_uiActiveCode = 0;
  *(_WORD *)&v1->m_bAutoTurn = 0;
  v1->m_bIsAvatorActiveMotion = 0;
  v1->m_uiAvatorActiveCode = 0;
  *(_WORD *)&v1->m_bActStart = 0;
  v1->m_pkCharCreateInfoWin = 0;
  v1->m_pkCharCreateViewCtrlWin = 0;
  v1->m_pkCharCreateDescritWin = 0;
  v1->m_pkCharCreateStatWin = 0;
  v1->m_pkCharCreateOkCancelWin = 0;
  v1->m_pkCharCreateClassWin = 0;
  v1->m_kShapeData = (PROTO_AVATAR_SHAPE_INFO)133;
  v1->m_bNormalStand = 1;
  *(_WORD *)&v1->m_kGender = 257;
}
// 970534: using guessed type void (__thiscall *PgFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97057C: using guessed type int (__thiscall *PgTList<NiPointer<Shadow>>::`vftable')(void *p, char);
// 970594: using guessed type void (__thiscall *CharCreateFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);

//----- (0040A990) --------------------------------------------------------
void __thiscall CharCreateFrameWork::~CharCreateFrameWork(CharCreateFrameWork *this)
{
  CharCreateFrameWork *v1; // ebx@1
  int v2; // esi@5
  NiTListItem<NiPointer<Shadow> > **v3; // edi@5
  NiTListItem<NiPointer<Shadow> > **v4; // ST00_4@6
  NiNode *v5; // esi@7
  Net *v6; // esi@11
  NiNode *v7; // esi@15
  NiCamera *v8; // esi@19
  NiNode *v9; // esi@23
  NiNode *v10; // esi@27
  PgMsg::Frame *v11; // ST00_4@31

  v1 = this;
  this->vfptr = (IDirectMessengerVtbl *)&CharCreateFrameWork::`vftable';
  if ( this->m_vecShadowObject._Myfirst )
    operator delete(this->m_vecShadowObject._Myfirst);
  v1->m_vecShadowObject._Myfirst = 0;
  v1->m_vecShadowObject._Mylast = 0;
  v1->m_vecShadowObject._Myend = 0;
  if ( v1->m_vecBGObjectNode._Myfirst )
    operator delete(v1->m_vecBGObjectNode._Myfirst);
  v1->m_vecBGObjectNode._Myfirst = 0;
  v1->m_vecBGObjectNode._Mylast = 0;
  v1->m_vecBGObjectNode._Myend = 0;
  v2 = (int)&v1->m_kShadowList;
  v1->m_kShadowList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> >Vtbl *)&PgTList<NiPointer<Shadow>>::`vftable';
  v3 = &v1->m_kShadowList.m_pkHead->m_pkNext;
  while ( v3 )
  {
    v4 = v3;
    v3 = (NiTListItem<NiPointer<Shadow> > **)*v3;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v2 + 8))(&v1->m_kShadowList, v4);
  }
  v1->m_kShadowList.m_kAllocator.m_uiCount = 0;
  v1->m_kShadowList.m_pkHead = 0;
  v1->m_kShadowList.m_pkTail = 0;
  *(_DWORD *)v2 = &NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable';
  v5 = v1->m_spShadowScene.m_pObject;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  v6 = v1->m_spWorldMgrNet.m_pObject;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  v7 = v1->m_spAvatarPos.m_pObject;
  if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  v8 = v1->m_spCamera.m_pObject;
  if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
    v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
  v9 = v1->m_spCharScene.m_pObject;
  if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
    v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
  v10 = v1->m_spBackgroundScene.m_pObject;
  if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
    v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
  v11 = v1->m_kMsgQ.m_pBase;
  v1->vfptr = (IDirectMessengerVtbl *)&PgFrameWork::`vftable';
  operator delete[](v11);
}
// 9703D4: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable')(void *p, char);
// 970534: using guessed type void (__thiscall *PgFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97057C: using guessed type int (__thiscall *PgTList<NiPointer<Shadow>>::`vftable')(void *p, char);
// 970594: using guessed type void (__thiscall *CharCreateFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);

//----- (0040AB60) --------------------------------------------------------
char __thiscall CharCreateFrameWork::InitBackgroundScene(CharCreateFrameWork *this)
{
  CharCreateFrameWork *v1; // edi@1
  NiNode *v2; // eax@1
  NiNode *v3; // ebx@1
  NiNode *v4; // eax@2
  NiNode *v5; // esi@3
  NiNode *v6; // esi@10
  NiNode *v7; // eax@15
  NiNode *v8; // eax@16
  NiNode *v9; // ebx@16
  NiNode *v10; // esi@18
  NiAlphaProperty *v11; // ebx@25
  NiNode *v12; // eax@25
  NiAlphaProperty *v13; // esi@25
  NiNode *v14; // eax@29
  int v15; // esi@29
  NiNode *v16; // eax@36
  NiNode *v17; // esi@36
  NiNode *v18; // eax@41
  NiNode *v19; // eax@42
  NiNode *v20; // esi@44
  NiNode *v21; // eax@52
  int v22; // eax@53
  int v23; // esi@53
  int v24; // eax@55
  NiNode *v25; // eax@55
  int v26; // eax@56
  int v27; // esi@56
  int v28; // eax@58
  NiNode *v29; // ST64_4@58
  const char *v30; // eax@60
  NiNode *v31; // esi@60
  NiShader *v32; // eax@61
  NiRoom *v33; // eax@61
  NiRoom *v34; // esi@61
  NiNode *v35; // eax@69
  char *v36; // eax@71
  char *v37; // ecx@73
  char *v38; // esi@73
  GameFrameWork *v39; // eax@77
  GameFrameWork::DisplayAspect v40; // eax@78
  const char *v41; // eax@83
  NiNode *v42; // eax@83
  NiNode *v43; // esi@84
  void (__thiscall ***v44)(_DWORD, _DWORD); // esi@89
  void (__thiscall ***v46)(_DWORD, _DWORD); // esi@94
  const char *v47; // eax@101
  void (__thiscall ***v48)(_DWORD, _DWORD); // esi@109
  void (__thiscall ***v49)(_DWORD, _DWORD); // esi@115
  NiNode *pkObj; // [sp+88h] [bp-28h]@1
  NiPointer<NiAlphaProperty> spkAlphaProp; // [sp+8Ch] [bp-24h]@25
  NiCamera *pkCamera; // [sp+90h] [bp-20h]@61
  NiPointer<NiRoom> element; // [sp+94h] [bp-1Ch]@27
  NiNode *v54; // [sp+98h] [bp-18h]@27
  int v55; // [sp+9Ch] [bp-14h]@32
  NiPointer<NiNode> spNode; // [sp+A0h] [bp-10h]@42
  int v57; // [sp+ACh] [bp-4h]@1

  v1 = this;
  v2 = (NiNode *)operator new(0xE8u);
  pkObj = v2;
  v3 = 0;
  v57 = 0;
  if ( v2 )
  {
    NiNode::NiNode(v2, 0);
    v3 = v4;
  }
  v5 = v1->m_spBackgroundScene.m_pObject;
  v57 = -1;
  if ( v5 != v3 )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spBackgroundScene.m_pObject = v3;
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
  v6 = v1->m_spShadowScene.m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v1->m_spShadowScene.m_pObject = 0;
  }
  v7 = (NiNode *)operator new(0xE8u);
  pkObj = v7;
  v57 = 1;
  if ( v7 )
  {
    NiNode::NiNode(v7, 0);
    v9 = v8;
  }
  else
  {
    v9 = 0;
  }
  v10 = v1->m_spShadowScene.m_pObject;
  v57 = -1;
  if ( v10 != v9 )
  {
    if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    v1->m_spShadowScene.m_pObject = v9;
    if ( v9 )
      InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  }
  v11 = 0;
  spkAlphaProp.m_pObject = 0;
  v57 = 2;
  v12 = (NiNode *)operator new(0x20u);
  v13 = (NiAlphaProperty *)v12;
  pkObj = v12;
  LOBYTE(v57) = 3;
  if ( v12 )
  {
    NiObjectNET::NiObjectNET((NiObjectNET *)&v12->vfptr);
    v13->m_ucAlphaTestRef = 0;
    v13->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
    v13->m_uFlags = 236;
    v11 = v13;
    spkAlphaProp.m_pObject = v13;
    InterlockedIncrement((volatile LONG *)&v13->m_uiRefCount);
  }
  v11->m_uFlags |= 1u;
  v11->m_uFlags |= 0x200u;
  v11->m_uFlags = v11->m_uFlags & 0xF3FF | 0x1000;
  v11->m_ucAlphaTestRef = 8;
  v11->m_uFlags = (v11->m_uFlags & 0xFE5F | 0x40) & 0xFFE3 | 2;
  v54 = v1->m_spShadowScene.m_pObject;
  element.m_pObject = (NiRoom *)v11;
  InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
  LOBYTE(v57) = 4;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v54->m_kPropertyList,
    &element);
  LOBYTE(v57) = 2;
  if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) )
    v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
  v14 = (NiNode *)operator new(0x28u);
  v15 = (int)v14;
  pkObj = v14;
  LOBYTE(v57) = 5;
  if ( v14 )
  {
    NiObjectNET::NiObjectNET((NiObjectNET *)&v14->vfptr);
    *(_DWORD *)v15 = &NiVertexColorProperty::`vftable';
    *(_WORD *)(v15 + 28) = 0;
    *(_DWORD *)(v15 + 32) = 0;
    *(_DWORD *)(v15 + 36) = 1;
  }
  else
  {
    v15 = 0;
  }
  v55 = v15;
  if ( v15 )
    InterlockedIncrement((volatile LONG *)(v15 + 4));
  *(_DWORD *)(v15 + 32) = 1;
  *(_DWORD *)(v15 + 36) = 1;
  v54 = v1->m_spShadowScene.m_pObject;
  element.m_pObject = (NiRoom *)v15;
  InterlockedIncrement((volatile LONG *)(v15 + 4));
  LOBYTE(v57) = 7;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v54->m_kPropertyList,
    &element);
  LOBYTE(v57) = 6;
  if ( !InterlockedDecrement((volatile LONG *)(v15 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v15)(v15, 1);
  v16 = (NiNode *)operator new(0x30u);
  v17 = v16;
  pkObj = v16;
  LOBYTE(v57) = 8;
  if ( v16 )
  {
    NiObjectNET::NiObjectNET((NiObjectNET *)&v16->vfptr);
    v17->vfptr = (NiRefObjectVtbl *)&NiFogProperty::`vftable';
    v17->m_kWorldBound.m_kCenter.x = 0.0;
    v17->m_kWorldBound.m_kCenter.y = 0.0;
    v17->m_kWorldBound.m_kCenter.z = 0.0;
    v17->m_uFlags = 0;
    *(float *)&v17->m_pkParent = 1.0;
    v17->m_kWorldBound.m_kCenter = (NiPoint3)NiColor::BLACK;
  }
  else
  {
    v17 = 0;
  }
  v17->m_uFlags &= 0xFFFEu;
  v54 = v1->m_spShadowScene.m_pObject;
  element.m_pObject = (NiRoom *)v17;
  InterlockedIncrement((volatile LONG *)&v17->m_uiRefCount);
  LOBYTE(v57) = 9;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v54->m_kPropertyList,
    &element);
  LOBYTE(v57) = 6;
  if ( !InterlockedDecrement((volatile LONG *)&v17->m_uiRefCount) )
    v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
  v18 = (NiNode *)operator new(0xE8u);
  pkObj = v18;
  LOBYTE(v57) = 10;
  if ( v18 )
  {
    NiNode::NiNode(v18, 0);
    spNode.m_pObject = v19;
  }
  else
  {
    spNode.m_pObject = 0;
    v19 = 0;
  }
  v20 = v1->m_spCharScene.m_pObject;
  LOBYTE(v57) = 6;
  if ( v20 != v19 )
  {
    if ( v20 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v20->m_uiRefCount) && v20 )
        v20->vfptr->__vecDelDtor((NiRefObject *)v20, 1u);
      v19 = spNode.m_pObject;
    }
    v1->m_spCharScene.m_pObject = v19;
    if ( v19 )
      InterlockedIncrement((volatile LONG *)&v19->m_uiRefCount);
  }
  v21 = (NiNode *)operator new(0x10Cu);
  pkObj = v21;
  LOBYTE(v57) = 11;
  if ( v21 )
  {
    NiAmbientLight::NiAmbientLight((NiAmbientLight *)v21);
    v23 = v22;
  }
  else
  {
    v23 = 0;
  }
  *(_DWORD *)(v23 + 188) += 2;
  *(float *)(v23 + 224) = 1.0;
  LOBYTE(v57) = 6;
  *(float *)(v23 + 228) = 0.57999998;
  *(float *)(v23 + 232) = 0.57999998;
  *(float *)(v23 + 236) = 0.57999998;
  v24 = *(_DWORD *)(v23 + 188);
  *(const struct NiColor *)(v23 + 240) = NiColor::WHITE;
  *(_DWORD *)(v23 + 188) = ++v24;
  *(const struct NiColor *)(v23 + 252) = NiColor::BLACK;
  *(_DWORD *)(v23 + 188) = v24 + 1;
  NiDynamicEffect::AttachAffectedNode((NiDynamicEffect *)v23, v1->m_spCharScene.m_pObject);
  *(_BYTE *)(v23 + 176) = 1;
  ((void (__stdcall *)(int, _DWORD))v1->m_spCharScene.m_pObject->vfptr[29].__vecDelDtor)(v23, 0);
  v25 = (NiNode *)operator new(0x118u);
  pkObj = v25;
  LOBYTE(v57) = 12;
  if ( v25 )
  {
    NiDirectionalLight::NiDirectionalLight((NiDirectionalLight *)v25);
    v27 = v26;
  }
  else
  {
    v27 = 0;
  }
  v28 = ++*(_DWORD *)(v27 + 188);
  *(float *)(v27 + 224) = 1.0;
  *(const struct NiColor *)(v27 + 228) = NiColor::BLACK;
  *(float *)(v27 + 240) = 1.0;
  *(float *)(v27 + 244) = 1.0;
  v28 += 2;
  *(_DWORD *)(v27 + 188) = v28;
  *(float *)(v27 + 248) = 1.0;
  *(const struct NiColor *)(v27 + 252) = NiColor::BLACK;
  *(_DWORD *)(v27 + 188) = v28 + 1;
  v29 = v1->m_spCharScene.m_pObject;
  LOBYTE(v57) = 6;
  NiDynamicEffect::AttachAffectedNode((NiDynamicEffect *)v27, v29);
  *(_BYTE *)(v27 + 176) = 1;
  ((void (__stdcall *)(int, _DWORD))v1->m_spCharScene.m_pObject->vfptr[29].__vecDelDtor)(v27, 0);
  spNode.m_pObject = 0;
  LOBYTE(v57) = 13;
  if ( !Folder::m_bInit )
    Folder::Init();
  v30 = Folder::Merge(&Folder::m_acMenu, "\\CharCreate\\CreatBack.nif");
  v31 = PgUtil::LoadNifFile(v30, 0);
  v54 = v31;
  if ( !v31 )
  {
    v46 = (void (__thiscall ***)(_DWORD, _DWORD))v55;
    LOBYTE(v57) = 2;
    if ( !InterlockedDecrement((volatile LONG *)(v55 + 4)) )
      (**v46)(v46, 1);
    v57 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    return 0;
  }
  spNode.m_pObject = v31;
  InterlockedIncrement((volatile LONG *)&v31->m_uiRefCount);
  pkCamera = 0;
  v32 = (NiShader *)v31->vfptr[18].__vecDelDtor((NiRefObject *)v31, (unsigned int)"Avatar01");
  v33 = (NiRoom *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v32);
  v34 = (NiRoom *)v1->m_spAvatarPos.m_pObject;
  element.m_pObject = v33;
  if ( v34 != v33 )
  {
    if ( v34 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v34->m_uiRefCount) && v34 )
        v34->vfptr->__vecDelDtor((NiRefObject *)v34, 1u);
      v33 = element.m_pObject;
    }
    v1->m_spAvatarPos.m_pObject = (NiNode *)v33;
    if ( v33 )
      InterlockedIncrement((volatile LONG *)&v33->m_uiRefCount);
  }
  v35 = v1->m_spAvatarPos.m_pObject;
  if ( v35 )
    ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spCharScene.m_pObject->vfptr[29].__vecDelDtor)(v35, 0);
  ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spBackgroundScene.m_pObject->vfptr[29].__vecDelDtor)(v54, 0);
  ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spBackgroundScene.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spCharScene.m_pObject,
    0);
  v36 = (char *)v1->m_vecShadowObject._Mylast;
  element.m_pObject = (NiRoom *)v1->m_vecShadowObject._Myfirst;
  if ( (char *)element.m_pObject != v36 )
  {
    pkObj = 0;
    memmove((char *)element.m_pObject, v36, 0);
    v1->m_vecShadowObject._Mylast = (NiNode **)element.m_pObject;
  }
  pkObj = v1->m_spAvatarPos.m_pObject;
  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
    (std::vector<unsigned long,std::allocator<unsigned long> > *)&v1->m_vecShadowObject,
    (const unsigned int *)&pkObj);
  v37 = (char *)v1->m_vecBGObjectNode._Mylast;
  v38 = (char *)v1->m_vecBGObjectNode._Myfirst;
  if ( v38 != v37 )
  {
    pkObj = 0;
    memmove(v38, v37, 0);
    v1->m_vecBGObjectNode._Mylast = (NiNode **)&v38[(_DWORD)pkObj];
  }
  pkObj = (NiNode *)((int (__stdcall *)(const char *))v54->vfptr[18].__vecDelDtor)("Object03");
  if ( pkObj )
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v1->m_vecBGObjectNode,
      (const unsigned int *)&pkObj);
  ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spCharScene.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spShadowScene.m_pObject,
    0);
  v39 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( !v39
    || (v40 = GameFrameWork::GetDisplyAspect(v39, PgWin::ms_uiScreenWidth, PgWin::ms_uiScreenHeight), v40 != 1)
    && ((unsigned int)v40 <= 2 || (unsigned int)v40 > 4) )
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    v41 = Folder::Merge(&Folder::m_acMenu, "\\Charcreate\\CreatCam_4_3.nif");
    v42 = PgUtil::LoadNifFile(v41, 0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&spNode, (NiD3DDefaultShader *)v42);
LABEL_84:
    v43 = spNode.m_pObject;
    goto LABEL_85;
  }
  if ( !Folder::m_bInit )
    Folder::Init();
  v47 = Folder::Merge(&Folder::m_acMenu, "\\Charcreate\\CreatCam_16_9.nif");
  v43 = PgUtil::LoadNifFile(v47, 0);
  if ( v54 == v43 )
    goto LABEL_84;
  if ( !InterlockedDecrement((volatile LONG *)&v54->m_uiRefCount) )
    ((void (__stdcall *)(signed int))v54->vfptr->__vecDelDtor)(1);
  spNode.m_pObject = v43;
  if ( !v43 )
    goto LABEL_86;
  InterlockedIncrement((volatile LONG *)&v43->m_uiRefCount);
LABEL_85:
  if ( !v43 )
  {
LABEL_86:
    LOBYTE(v57) = 6;
    if ( v43 && !InterlockedDecrement((volatile LONG *)&v43->m_uiRefCount) )
      v43->vfptr->__vecDelDtor((NiRefObject *)v43, 1u);
    v44 = (void (__thiscall ***)(_DWORD, _DWORD))v55;
    LOBYTE(v57) = 2;
    if ( !InterlockedDecrement((volatile LONG *)(v55 + 4)) )
      (**v44)(v44, 1);
    v57 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    return 0;
  }
  if ( !PgUtil::CatchCamera((NiAVObject *)&v43->vfptr, &pkCamera) )
  {
    LOBYTE(v57) = 6;
    if ( !InterlockedDecrement((volatile LONG *)&v43->m_uiRefCount) )
      v43->vfptr->__vecDelDtor((NiRefObject *)v43, 1u);
    v48 = (void (__thiscall ***)(_DWORD, _DWORD))v55;
    LOBYTE(v57) = 2;
    if ( !InterlockedDecrement((volatile LONG *)(v55 + 4)) )
      (**v48)(v48, 1);
    v57 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) )
    {
      ((void (__thiscall *)(NiAlphaProperty *))v11->vfptr->__vecDelDtor)(v11);
      return 0;
    }
    return 0;
  }
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v1->m_spCamera, (NiD3DDefaultShader *)pkCamera);
  ((void (__stdcall *)(_DWORD, _DWORD))v1->m_spBackgroundScene.m_pObject->vfptr[29].__vecDelDtor)(v43, 0);
  NiAVObject::UpdateProperties((NiAVObject *)&v1->m_spBackgroundScene.m_pObject->vfptr);
  NiAVObject::UpdateEffects((NiAVObject *)&v1->m_spBackgroundScene.m_pObject->vfptr);
  NiAVObject::Update((NiAVObject *)&v1->m_spBackgroundScene.m_pObject->vfptr, 0.0, 1);
  LOBYTE(v57) = 6;
  if ( !InterlockedDecrement((volatile LONG *)&v43->m_uiRefCount) )
    v43->vfptr->__vecDelDtor((NiRefObject *)v43, 1u);
  v49 = (void (__thiscall ***)(_DWORD, _DWORD))v55;
  LOBYTE(v57) = 2;
  if ( !InterlockedDecrement((volatile LONG *)(v55 + 4)) )
    (**v49)(v49, 1);
  v57 = -1;
  if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) )
    v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
  return 1;
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);
// 9704EC: using guessed type int (__thiscall *NiFogProperty::`vftable')(void *p, char);
// A7D11C: using guessed type const struct NiColor NiColor::WHITE;
// A8975C: using guessed type bool Folder::m_bInit;
// B6243C: using guessed type const struct NiColor NiColor::BLACK;

//----- (0040B550) --------------------------------------------------------
void __thiscall CharCreateFrameWork::ReleaseShadow(CharCreateFrameWork *this)
{
  CharCreateFrameWork *v1; // esi@1
  char *v2; // ecx@1
  char *v3; // edi@1
  char *v4; // ecx@3
  char *v5; // edi@3
  int v6; // edi@5
  NiTListItem<NiPointer<Shadow> > **v7; // esi@5
  NiTListItem<NiPointer<Shadow> > **v8; // ST08_4@6

  v1 = this;
  v2 = (char *)this->m_vecBGObjectNode._Mylast;
  v3 = (char *)v1->m_vecBGObjectNode._Myfirst;
  if ( v3 != v2 )
  {
    memmove(v3, v2, 0);
    v1->m_vecBGObjectNode._Mylast = (NiNode **)v3;
  }
  v4 = (char *)v1->m_vecShadowObject._Mylast;
  v5 = (char *)v1->m_vecShadowObject._Myfirst;
  if ( v5 != v4 )
  {
    memmove(v5, v4, 0);
    v1->m_vecShadowObject._Mylast = (NiNode **)v5;
  }
  v6 = (int)&v1->m_kShadowList;
  v7 = &v1->m_kShadowList.m_pkHead->m_pkNext;
  while ( v7 )
  {
    v8 = v7;
    v7 = (NiTListItem<NiPointer<Shadow> > **)*v7;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v6 + 8))(v6, v8);
  }
  *(_DWORD *)(v6 + 12) = 0;
  *(_DWORD *)(v6 + 4) = 0;
  *(_DWORD *)(v6 + 8) = 0;
}

//----- (0040B5F0) --------------------------------------------------------
void __thiscall CharCreateFrameWork::Terminate(CharCreateFrameWork *this)
{
  CharCreateFrameWork *v1; // esi@1
  Studio *v2; // edi@1
  Net *v3; // edi@3

  v1 = this;
  CharCreateFrameWork::ReleaseShadow(this);
  v2 = v1->ms_pkStudio;
  if ( v2 )
  {
    Studio::~Studio(v1->ms_pkStudio);
    operator delete(v2);
  }
  v3 = v1->m_spWorldMgrNet.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spWorldMgrNet.m_pObject = 0;
  }
  CharCreateFrameWork::TerminateWindow(v1);
  CharCreateFrameWork::TerminateAvatar(v1);
  CharCreateFrameWork::TerminateBackgroundScene(v1);
  v1->m_bInit = 0;
  v1->m_BackFrameID = 0;
}

//----- (0040B670) --------------------------------------------------------
bool __thiscall CharCreateFrameWork::InitWindow(CharCreateFrameWork *this)
{
  CharCreateFrameWork *v1; // esi@1
  int v2; // ebx@1
  NiSourceTexture *v3; // eax@2
  CharCreateInfoWin *v4; // eax@3
  CharCreateViewCtrlWin *v5; // eax@3
  bool result; // al@4
  CharCreateDescritWin *v7; // eax@5
  CharCreateStatWin *v8; // eax@6
  CharCreateOkCancelWin *v9; // eax@7
  CharCreateClassWin *v10; // eax@8
  PROTO_AVATARINFORMATION *v11; // edi@10
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v12; // [sp-1Ch] [bp-2Ch]@11
  PgWin *v13; // [sp-4h] [bp-14h]@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v14; // [sp+Ch] [bp-4h]@11

  v1 = this;
  v2 = 0;
  this->m_kGender = 1;
  this->m_uiActiveCode = 0;
  *(_WORD *)&this->m_bAutoTurn = 0;
  if ( !g_pkToolTipWin )
  {
    v3 = MenuTexMgr::GetTexture(1u);
    g_pkToolTipWin = (PgWin *)ToolTipWin::CreateWin(v3, 7u, 7u);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, g_pkToolTipWin);
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[60].__vecDelDtor)(0);
  }
  v4 = CharCreateInfoWin::CreateWin(&v1->m_kShapeData, (PgFrameWork *)&v1->vfptr);
  v13 = (PgWin *)v4;
  v1->m_pkCharCreateInfoWin = v4;
  PgWinMgr::ShowWin(&Pgg_kWinMgr, v13);
  v5 = CharCreateViewCtrlWin::CreateWin((PgFrameWork *)&v1->vfptr);
  v1->m_pkCharCreateViewCtrlWin = v5;
  if ( v5
    && (PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v5->vfptr),
        v7 = CharCreateDescritWin::CreateWin((PgFrameWork *)&v1->vfptr),
        v1->m_pkCharCreateDescritWin = v7,
        v1->m_pkCharCreateInfoWin)
    && (CharCreateDescritWin::SetClass(v7, 1),
        CharCreateDescritWin::UpdateView(v1->m_pkCharCreateDescritWin),
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkCharCreateDescritWin->vfptr),
        v8 = CharCreateStatWin::CreateWin((PgFrameWork *)&v1->vfptr),
        (v1->m_pkCharCreateStatWin = v8) != 0)
    && (PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v8->vfptr),
        v9 = CharCreateOkCancelWin::CreateWin((PgFrameWork *)&v1->vfptr),
        (v1->m_pkCharCreateOkCancelWin = v9) != 0)
    && (PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v9->vfptr),
        v10 = CharCreateClassWin::CreateWin((PgFrameWork *)&v1->vfptr),
        (v1->m_pkCharCreateClassWin = v10) != 0) )
  {
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v10->vfptr);
    while ( 1 )
    {
      v11 = User::GetAvatarInfo(&g_kUser, v2);
      if ( v11 )
      {
        v14 = &v12;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
          &v12,
          "ChrLevel_CanCreateSen");
        if ( v11->level >= (unsigned __int16)CSingleDataMap::GetValue(&g_kSingleDataMap, v12) )
          break;
      }
      if ( ++v2 >= 6 )
        return 1;
    }
    CharCreateClassWin::SetSentinelButEnable(v1->m_pkCharCreateClassWin, 1);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0040B800) --------------------------------------------------------
char __thiscall CharCreateFrameWork::InitAvatar(CharCreateFrameWork *this)
{
  CharCreateFrameWork *v1; // esi@1
  NsPgToonExtraData *v2; // eax@1
  NiCamera *v3; // ecx@1
  NiCamera *v4; // edx@1
  double v5; // st7@1
  Avatar *v6; // eax@4
  char result; // al@7
  std::vector<unsigned long,std::allocator<unsigned long> > vecResult; // [sp+1Ch] [bp-38h]@1
  NiPoint3 kPos; // [sp+2Ch] [bp-28h]@4
  NiPoint3 kDir; // [sp+38h] [bp-1Ch]@4
  float v11; // [sp+44h] [bp-10h]@1
  int v12; // [sp+50h] [bp-4h]@1

  v1 = this;
  v2 = Engine3D::ms_spToonExtraData;
  v3 = Engine3D::ms_spToonExtraData->m_pCamera;
  v4 = v1->m_spCamera.m_pObject;
  v11 = fabs(1.5);
  v5 = v11;
  v1->m_pkOldCTCamera = v3;
  v2->m_pCamera = v4;
  v1->m_spAvatarPos.m_pObject->m_kLocal.m_fScale = v5;
  CharCreateFrameWork::fToonLineSize = Engine3D::ms_spToonExtraData->m_fLineSize;
  vecResult._Myfirst = 0;
  Engine3D::ms_spToonExtraData->m_fLineSize = 0.00079999998;
  v1->m_kShapeData = (PROTO_AVATAR_SHAPE_INFO)-123;
  vecResult._Mylast = 0;
  vecResult._Myend = 0;
  v12 = 0;
  HairInfoTab::GetEquipableHairType(1, 1, 0, &vecResult);
  if ( vecResult._Mylast - vecResult._Myfirst )
    *((_BYTE *)&v1->m_kShapeData + 1) = *(_BYTE *)vecResult._Myfirst;
  else
    *((_BYTE *)&v1->m_kShapeData + 1) = 0;
  kPos.x = 0.0;
  *((_WORD *)&v1->m_kShapeData + 1) = 0;
  kPos.y = 0.0;
  kPos.z = 0.0;
  kDir.x = 0.0;
  kDir.y = -1.0;
  kDir.z = 0.0;
  CharResMgr::RemoveAllCharActor(&g_kCharResMgr);
  v6 = CharMgr::AddAvatar(&g_kCharMgr, &v1->m_kShapeData, &kPos, &kDir, 2u);
  v1->m_pkAvatar = v6;
  if ( v6 )
  {
    v1->m_pkCharNode = v6->m_spScene.m_pObject;
    ((void (__thiscall *)(Avatar *, _DWORD))v6->vfptr[17].AddAbStateByAbstateIndex)(v6, 0.0);
    NiAVObject::Update((NiAVObject *)&v1->m_pkCharNode->vfptr, 0.0, 0);
    NiAVObject::UpdateEffects((NiAVObject *)&v1->m_spAvatarPos.m_pObject->vfptr);
    NiAVObject::UpdateProperties((NiAVObject *)&v1->m_spAvatarPos.m_pObject->vfptr);
    CharCreateFrameWork::Refresh(v1, 0);
    if ( vecResult._Myfirst )
      operator delete(vecResult._Myfirst);
    result = 1;
  }
  else
  {
    if ( vecResult._Myfirst )
      operator delete(vecResult._Myfirst);
    result = 0;
  }
  return result;
}
// A8868C: using guessed type float CharCreateFrameWork::fToonLineSize;

//----- (0040B990) --------------------------------------------------------
char __thiscall CharCreateFrameWork::Init(CharCreateFrameWork *this, PgMsg::Frame *ptFrameMsg)
{
  CharCreateFrameWork *v2; // esi@1
  char result; // al@2
  Ni2DBuffer *v4; // eax@7
  Ni2DBuffer::RendererData *fDuration; // ST04_4@7

  v2 = this;
  if ( CharCreateFrameWork::InitBackgroundScene(this)
    && CharCreateFrameWork::InitAvatar(v2)
    && CharCreateFrameWork::InitWindow(v2)
    && CharCreateFrameWork::InitNet(v2)
    && CharCreateFrameWork::InitShadow(v2) )
  {
    v2->m_bInit = 1;
    v2->m_iCreateSlot = -1;
    v2->m_iEraseSlot = -1;
    v4 = (Ni2DBuffer *)Studio::Create(NiRenderer::ms_pkRenderer, 8u);
    fDuration = (Ni2DBuffer::RendererData *)v2->m_spBackgroundScene.m_pObject;
    v2->ms_pkStudio = (Studio *)v4;
    Studio::SetSubject(v4, fDuration);
    v2->m_bActStart = 0;
    if ( g_kSoundMgr.m_pkBGMGroup )
    {
      if ( !SoundGroupBgm::IsBGMPlaying(g_kSoundMgr.m_pkBGMGroup) )
      {
        SoundMgr::StopBGM(&g_kSoundMgr);
        SoundGroupBgm::SetFadeDurationTime(g_kSoundMgr.m_pkBGMGroup, 0.0);
        SoundMgr::PlayBGM(&g_kSoundMgr, "LoginBackground.mp3");
      }
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0040BA50) --------------------------------------------------------
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *this, NiPointer<NiDX92DBufferData> *element)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *v2; // esi@1
  int v3; // edi@1
  NiDX92DBufferData *v4; // ebx@1
  NiDX92DBufferData *v5; // eax@6
  _DWORD *v6; // eax@8

  v2 = this;
  v3 = ((int (*)(void))this->vfptr->NewItem)();
  v4 = *(NiDX92DBufferData **)(v3 + 8);
  if ( v4 != element->m_pObject )
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v5 = element->m_pObject;
    *(NiPointer<NiDX92DBufferData> *)(v3 + 8) = (NiPointer<NiDX92DBufferData>)element->m_pObject;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  }
  *(_DWORD *)v3 = 0;
  *(_DWORD *)(v3 + 4) = v2->m_pkTail;
  v6 = &v2->m_pkTail->m_pkNext;
  if ( v6 )
  {
    *v6 = v3;
    ++v2->m_kAllocator.m_uiCount;
    v2->m_pkTail = (NiTListItem<NiPointer<NiDX92DBufferData> > *)v3;
  }
  else
  {
    ++v2->m_kAllocator.m_uiCount;
    v2->m_pkHead = (NiTListItem<NiPointer<NiDX92DBufferData> > *)v3;
    v2->m_pkTail = (NiTListItem<NiPointer<NiDX92DBufferData> > *)v3;
  }
}

//----- (0040BAE0) --------------------------------------------------------
void __thiscall PgTList<NiPointer<Shadow>>::~PgTList<NiPointer<Shadow>>(PgTList<NiPointer<Shadow> > *this)
{
  PgTList<NiPointer<Shadow> > *v1; // edi@1
  NiTListItem<NiPointer<Shadow> > *v2; // esi@1
  NiTListItem<NiPointer<Shadow> > *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> >Vtbl *)&PgTList<NiPointer<Shadow>>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> > *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable';
}
// 9703D4: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable')(void *p, char);
// 97057C: using guessed type int (__thiscall *PgTList<NiPointer<Shadow>>::`vftable')(void *p, char);

//----- (0040BB60) --------------------------------------------------------
PgTList<NiPointer<Shadow> > *__thiscall PgTList<NiPointer<Shadow>>::`vector deleting destructor'(PgTList<NiPointer<Shadow> > *this, unsigned int a2)
{
  PgTList<NiPointer<Shadow> > *v2; // edi@1
  NiTListItem<NiPointer<Shadow> > *v3; // esi@1
  NiTListItem<NiPointer<Shadow> > *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> >Vtbl *)&PgTList<NiPointer<Shadow>>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> > *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9703D4: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable')(void *p, char);
// 97057C: using guessed type int (__thiscall *PgTList<NiPointer<Shadow>>::`vftable')(void *p, char);

//----- (0040BBF0) --------------------------------------------------------
NiRTTI *CharCreateFrameWork::GetRTTI()
{
  return &CharCreateFrameWork::m_RTTI;
}

//----- (0040BC00) --------------------------------------------------------
const char *CharCreateFrameWork::GetFrameWorkName()
{
  return CharCreateFrameWork::m_RTTI.m_pcName;
}

//----- (0040BC10) --------------------------------------------------------
CharCreateFrameWork *__thiscall CharCreateFrameWork::`vector deleting destructor'(CharCreateFrameWork *this, unsigned int a2)
{
  CharCreateFrameWork *v2; // esi@1

  v2 = this;
  CharCreateFrameWork::~CharCreateFrameWork(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0040BC40) --------------------------------------------------------
int __thiscall CharCreateFrameWork::On_NC_AVATAR_CREATESUCC_ACK(CharCreateFrameWork *this, int iRevBytes, void *pvData)
{
  CharCreateFrameWork *v3; // esi@1

  v3 = this;
  User::AddAvatarInfo(&g_kUser, (PROTO_AVATARINFORMATION *)((char *)pvData + 1));
  PgFrameWork::PostFrameMsgChange((PgFrameWork *)&v3->vfptr, CharSelectFrameWorkID, 0);
  return iRevBytes;
}

//----- (0040BC70) --------------------------------------------------------
int __stdcall CharCreateFrameWork::On_NC_USER_CONNECTCUT_CMD(int iRevBytes, void *pvData)
{
  int result; // eax@1

  result = iRevBytes;
  if ( *(_WORD *)pvData == 1667 )
    g_kServer.m_bDoubleConnected = 1;
  return result;
}

//----- (0040BC90) --------------------------------------------------------
void __thiscall CharCreateFrameWork::NcAvatarCreateReq(CharCreateFrameWork *this)
{
  CharCreateFrameWork *v1; // esi@1
  Net *v2; // ecx@2
  char v3; // al@3
  unsigned int v4; // edx@3
  unsigned int v5; // ecx@3
  unsigned int v6; // eax@3
  unsigned int v7; // edx@3
  PgNet *v8; // ecx@3
  NETCOMMAND netcmd; // [sp+4h] [bp-24h]@3
  PROTO_NC_AVATAR_CREATE_REQ kProto; // [sp+8h] [bp-20h]@3

  v1 = this;
  if ( this->m_iCreateSlot != -1 )
  {
    v2 = this->m_spWorldMgrNet.m_pObject;
    if ( v2 )
    {
      netcmd.protocol = 5121;
      PgNet::AddNetMsg((PgNet *)&v2->vfptr, &netcmd, 2);
      v3 = v1->m_iCreateSlot;
      v4 = v1->m_kCreateName.n5_code[0];
      kProto.char_shape = v1->m_kShapeData;
      v5 = v1->m_kCreateName.n5_code[2];
      kProto.slotnum = v3;
      v6 = v1->m_kCreateName.n5_code[1];
      kProto.name.n5_code[0] = v4;
      v7 = v1->m_kCreateName.n5_code[3];
      *(_QWORD *)&kProto.name.n5_code[1] = __PAIR__(v5, v6);
      v8 = (PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr;
      *(_QWORD *)&kProto.name.n5_code[3] = __PAIR__(v1->m_kCreateName.n5_code[4], v7);
      PgNet::SendNetMsg(v8, &kProto, 25);
    }
  }
}

//----- (0040BD20) --------------------------------------------------------
int __thiscall CharCreateFrameWork::On_NC_AVATAR_CREATEFAIL_ACK(CharCreateFrameWork *this, int iRevBytes, void *pvData)
{
  signed int v3; // eax@1
  CharCreateFrameWork *v4; // esi@1
  char *v5; // eax@4
  MsgBox *v6; // eax@9
  PgMsg::Frame kMsg; // [sp+4h] [bp-18h]@10

  v3 = *(_WORD *)pvData;
  v4 = this;
  if ( v3 <= 385 )
  {
    if ( v3 == 385 )
    {
      v5 = (char *)TextData::Get(0xC6C2C0D7);
LABEL_9:
      v6 = MsgBox::Modal(MSGBOX_OK, v5);
      if ( v6 )
      {
        kMsg.m_uiFrameMsg = 10;
        MsgBox::SetFrameWorkMsgOnClose(v6, (PgFrameWork *)&v4->vfptr, &kMsg, 0);
      }
    }
    else
    {
      switch ( v3 )
      {
        case 130:
          v5 = (char *)TextData::Get(0xCEFE072F);
          goto LABEL_9;
        case 131:
          v5 = (char *)TextData::Get(0xCBCCB516);
          goto LABEL_9;
        case 132:
          v5 = (char *)TextData::Get(0xA9BFDEC5);
          goto LABEL_9;
        case 133:
          v5 = (char *)TextData::Get(0xC896A91u);
          goto LABEL_9;
        default:
          return iRevBytes;
      }
    }
  }
  return iRevBytes;
}

//----- (0040BDD0) --------------------------------------------------------
int __thiscall CharCreateFrameWork::ProcessNetMsg(CharCreateFrameWork *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  CharCreateFrameWork *v5; // esi@1
  int result; // eax@1

  v5 = this;
  result = 0;
  if ( iDepart == 3 )
  {
    if ( iCommand == 23 )
    {
      if ( *(_WORD *)pvData == 1667 )
        g_kServer.m_bDoubleConnected = 1;
      result = iRevBytes;
    }
  }
  else if ( iDepart == 5 )
  {
    if ( iCommand == 4 )
    {
      result = CharCreateFrameWork::On_NC_AVATAR_CREATEFAIL_ACK(this, iRevBytes, pvData);
    }
    else if ( iCommand == 6 )
    {
      User::AddAvatarInfo(&g_kUser, (PROTO_AVATARINFORMATION *)((char *)pvData + 1));
      PgFrameWork::PostFrameMsgChange((PgFrameWork *)&v5->vfptr, CharSelectFrameWorkID, 0);
      result = iRevBytes;
    }
  }
  else if ( iDepart == 8 && iCommand == 17 )
  {
    result = iRevBytes;
  }
  return result;
}

//----- (0040BE70) --------------------------------------------------------
void __thiscall Name5::operator=(Name5 *this, Name5 *nm)
{
  *(_QWORD *)&this->n5_code[0] = *(_QWORD *)&nm->n5_code[0];
  *(_QWORD *)&this->n5_code[2] = *(_QWORD *)&nm->n5_code[2];
  this->n5_code[4] = nm->n5_code[4];
}

//----- (0040BEA0) --------------------------------------------------------
void __thiscall CharCreateOkCancelWin::CharCreateOkCancelWin(CharCreateOkCancelWin *this)
{
  CharCreateOkCancelWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&CharCreateOkCancelWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CharCreateOkCancelWin::`vftable'{for `IDirectMessenger'};
}
// 97064C: using guessed type void (__thiscall *CharCreateOkCancelWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97066C: using guessed type int (__thiscall *CharCreateOkCancelWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0040BEC0) --------------------------------------------------------
void __thiscall CharCreateOkCancelWin::~CharCreateOkCancelWin(CharCreateOkCancelWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&CharCreateOkCancelWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CharCreateOkCancelWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 97064C: using guessed type void (__thiscall *CharCreateOkCancelWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97066C: using guessed type int (__thiscall *CharCreateOkCancelWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0040BEE0) --------------------------------------------------------
void __usercall CharCreateOkCancelWin::OnCmdOK(CharCreateOkCancelWin *this@<ecx>, int a2@<ebx>)
{
  CharCreateFrameWork::CreateOk((CharCreateFrameWork *)this->m_pkFrameWork, a2);
}

//----- (0040BEF0) --------------------------------------------------------
void __thiscall CharCreateOkCancelWin::OnCmdCancel(CharCreateOkCancelWin *this)
{
  CharCreateFrameWork::CreateCancel((CharCreateFrameWork *)this->m_pkFrameWork);
}

//----- (0040BF00) --------------------------------------------------------
char __thiscall CharCreateOkCancelWin::Create(CharCreateOkCancelWin *this, PgFrameWork *pkFrameWork)
{
  CharCreateOkCancelWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiNode *v5; // eax@3
  NiNode *v6; // esi@7
  char result; // al@10
  char *v8; // edi@11
  float v9; // ST18_4@11
  D3DXCOLOR v10; // ST1C_16@11
  NiUnsharedGeometryGroup *v11; // ST0C_4@11
  int v12; // eax@11
  int v13; // eax@11
  PgWinAbbreviateText *v14; // edi@11
  NiRefObjectVtbl *v15; // ebx@11
  char v16; // ST34_1@11
  char *v17; // edi@11
  float v18; // ST18_4@11
  D3DXCOLOR v19; // ST1C_16@11
  NiUnsharedGeometryGroup *v20; // ST0C_4@11
  int v21; // eax@11
  int v22; // eax@11
  PgWinAbbreviateText *v23; // edi@11
  NiRefObjectVtbl *v24; // ebx@11
  NiRefObjectVtbl *v25; // edi@11
  int v26; // eax@11
  int v27; // eax@11
  NiNode *v28; // esi@12
  bool v29; // [sp+10h] [bp-34h]@0
  UIUtil ui; // [sp+20h] [bp-24h]@11
  NiPointer<NiNode> spNode; // [sp+34h] [bp-10h]@1
  int v32; // [sp+40h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  this->m_pkFrameWork = pkFrameWork;
  v3 = pTexturePalette;
  v32 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "charcreate\\CreatCharExitButton.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = spNode.m_pObject;
  if ( spNode.m_pObject )
  {
    UIUtil::UIUtil(&ui);
    LOBYTE(v32) = 1;
    UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
    UIUtil::SetOffset(&ui, 0, 0);
    UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
    v8 = (char *)UIUtil::CreateButton(&ui, 0, "Btn01", 0, 3);
    v9 = Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v10.r = *(_QWORD *)&Color::m_kDxWhiteColor.g;
    *(_QWORD *)&v10.b = __PAIR__(5, LODWORD(Color::m_kDxWhiteColor.a));
    v11 = TextData::Get(0x4F5F499Fu);
    v12 = (*(int (__thiscall **)(char *))(*(_DWORD *)v8 + 148))(v8);
    v13 = (*(int (__thiscall **)(char *, int))(*(_DWORD *)v8 + 144))(v8, v12);
    v14 = UIUtil::CreateTextNoTag(&ui, 0, 0, v13, (int)v11, v8, 0, LODWORD(v9), v10, 0, 0, v29);
    v15 = v14->vfptr;
    v16 = (unsigned int)Font::Get(MENU);
    ((void (__thiscall *)(PgWinAbbreviateText *))v15[113].__vecDelDtor)(v14);
    v17 = (char *)UIUtil::CreateButton(&ui, 1u, "Btn02", 0, 3);
    v18 = Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v19.r = *(_QWORD *)&Color::m_kDxWhiteColor.g;
    *(_QWORD *)&v19.b = __PAIR__(5, LODWORD(Color::m_kDxWhiteColor.a));
    v20 = TextData::Get(0x45B392ACu);
    v21 = (*(int (__thiscall **)(char *))(*(_DWORD *)v17 + 148))(v17);
    v22 = (*(int (__thiscall **)(char *, int))(*(_DWORD *)v17 + 144))(v17, v21);
    v23 = UIUtil::CreateTextNoTag(&ui, 0, 0, v22, (int)v20, v17, 0, LODWORD(v18), v19, 0, 0, v16);
    v24 = v23->vfptr;
    Font::Get(MENU);
    ((void (__thiscall *)(PgWinAbbreviateText *))v24[113].__vecDelDtor)(v23);
    ((void (__thiscall *)(CharCreateOkCancelWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      1.0);
    v25 = v2->vfptr;
    v26 = ((int (__thiscall *)(CharCreateOkCancelWin *))v2->vfptr[42].__vecDelDtor)(v2);
    v27 = (int)v2->vfptr[41].__vecDelDtor((NiRefObject *)v2, v26 - 10);
    v25[77].__vecDelDtor((NiRefObject *)v2, v27);
    v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
    LOBYTE(v32) = 0;
    UIUtil::~UIUtil(&ui);
    v32 = -1;
    if ( spNode.m_pObject )
    {
      v28 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v28 )
          v28->vfptr->__vecDelDtor((NiRefObject *)v28, 1u);
      }
    }
    result = 1;
  }
  else
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("CreatCharExitButton load fail", "LoadFail", 0);
      v5 = spNode.m_pObject;
    }
    v32 = -1;
    if ( v5 )
    {
      v6 = v5;
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    result = 0;
  }
  return result;
}
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0040C1D0) --------------------------------------------------------
void __userpurge CharCreateOkCancelWin::OnCommand(CharCreateOkCancelWin *this@<ecx>, int a2@<ebx>, unsigned int wParam, int lParam)
{
  if ( wParam )
  {
    if ( wParam == 1 )
      CharCreateFrameWork::CreateCancel((CharCreateFrameWork *)this->m_pkFrameWork);
  }
  else
  {
    CharCreateFrameWork::CreateOk((CharCreateFrameWork *)this->m_pkFrameWork, a2);
  }
}

//----- (0040C200) --------------------------------------------------------
CharCreateOkCancelWin *__cdecl CharCreateOkCancelWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  CharCreateOkCancelWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x158u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&CharCreateOkCancelWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&CharCreateOkCancelWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (CharCreateOkCancelWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 97064C: using guessed type void (__thiscall *CharCreateOkCancelWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97066C: using guessed type int (__thiscall *CharCreateOkCancelWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0040C340) --------------------------------------------------------
CharCreateOkCancelWin *__thiscall CharCreateOkCancelWin::`vector deleting destructor'(CharCreateOkCancelWin *this, unsigned int a2)
{
  CharCreateOkCancelWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&CharCreateOkCancelWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CharCreateOkCancelWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97064C: using guessed type void (__thiscall *CharCreateOkCancelWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97066C: using guessed type int (__thiscall *CharCreateOkCancelWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0040C380) --------------------------------------------------------
void __thiscall CharCreateStatWin::CharCreateStatWin(CharCreateStatWin *this)
{
  CharCreateStatWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&CharCreateStatWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CharCreateStatWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkActor = 0;
  v1->m_kClass = 1;
}
// 970974: using guessed type void (__thiscall *CharCreateStatWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 970994: using guessed type int (__thiscall *CharCreateStatWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0040C3B0) --------------------------------------------------------
void __thiscall CharCreateStatWin::~CharCreateStatWin(CharCreateStatWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&CharCreateStatWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CharCreateStatWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 970974: using guessed type void (__thiscall *CharCreateStatWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 970994: using guessed type int (__thiscall *CharCreateStatWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0040C3D0) --------------------------------------------------------
void __thiscall CharCreateStatWin::UpdateMeWin(CharCreateStatWin *this, float fCurTime)
{
  NiActorManager *v2; // ecx@1

  v2 = this->m_pkActor;
  if ( v2 )
    NiActorManager::Update(v2, fCurTime);
}

//----- (0040C3F0) --------------------------------------------------------
void __thiscall CharCreateStatWin::SetClass(CharCreateStatWin *this, char kClass)
{
  if ( this->m_kClass != kClass )
    this->m_kClass = kClass;
}

//----- (0040C410) --------------------------------------------------------
char __thiscall CharCreateStatWin::Create(CharCreateStatWin *this, PgFrameWork *pkFrameWork)
{
  CharCreateStatWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiNode *v5; // eax@3
  NiNode *v6; // esi@7
  char result; // al@10
  PgSprData *v8; // eax@11
  NiNode *v9; // esi@12
  D3DXCOLOR v10; // ST0C_16@17
  char *v11; // eax@17
  PgWinText *v12; // edi@17
  NiRefObjectVtbl *v13; // ebx@17
  PgFont *v14; // eax@17
  D3DXCOLOR v15; // ST0C_16@17
  char *v16; // eax@17
  PgWinText *v17; // edi@17
  NiRefObjectVtbl *v18; // ebx@17
  PgFont *v19; // eax@17
  D3DXCOLOR v20; // ST0C_16@17
  char *v21; // eax@17
  PgWinText *v22; // edi@17
  NiRefObjectVtbl *v23; // ebx@17
  PgFont *v24; // eax@17
  D3DXCOLOR v25; // ST0C_16@17
  char *v26; // eax@17
  PgWinText *v27; // edi@17
  NiRefObjectVtbl *v28; // ebx@17
  PgFont *v29; // eax@17
  D3DXCOLOR v30; // ST0C_16@17
  char *v31; // eax@17
  PgWinText *v32; // edi@17
  NiRefObjectVtbl *v33; // ebx@17
  PgFont *v34; // eax@17
  D3DXCOLOR v35; // ST0C_16@17
  char *v36; // eax@17
  PgWinText *v37; // edi@17
  NiRefObjectVtbl *v38; // ebx@17
  PgFont *v39; // eax@17
  const char *v40; // eax@19
  NiActorManager *v41; // eax@19
  NiRefObjectVtbl *v42; // edi@21
  int v43; // eax@21
  int v44; // eax@21
  NiNode *v45; // esi@21
  UIUtil ui; // [sp+38h] [bp-2Ch]@17
  int uiLeft; // [sp+4Ch] [bp-18h]@11
  int uiTop; // [sp+50h] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+54h] [bp-10h]@1
  int v50; // [sp+60h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v50 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "charcreate\\ClassStat.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = spNode.m_pObject;
  if ( spNode.m_pObject )
  {
    v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane01", &uiLeft, &uiTop, 0);
    if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v8, 0, pkFrameWork, "CharCreateStatWin", 0) )
    {
      UIUtil::UIUtil(&ui);
      LOBYTE(v50) = 1;
      UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
      UIUtil::SetOffset(&ui, uiLeft, uiTop);
      UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
      UIUtil::CreateSpr(&ui, "Plane02", 0);
      *(_QWORD *)&v10.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v10.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v11 = (char *)TextData3::Get(0x78E5BEEAu);
      v12 = UIUtil::CreateTextEx(&ui, "Stat01_middle", v11, 0, v10, 5u, 0, 0, 0);
      v13 = v12->vfptr;
      v14 = Font::Get(MENU);
      v13[113].__vecDelDtor((NiRefObject *)v12, (unsigned int)v14);
      *(_QWORD *)&v15.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v15.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v16 = (char *)TextData3::Get(0x78E4BBEAu);
      v17 = UIUtil::CreateTextEx(&ui, "Stat02_right", v16, 0, v15, 5u, 0, 0, 0);
      v18 = v17->vfptr;
      v19 = Font::Get(MENU);
      v18[113].__vecDelDtor((NiRefObject *)v17, (unsigned int)v19);
      *(_QWORD *)&v20.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v20.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v21 = (char *)TextData3::Get(0x78F4B4EAu);
      v22 = UIUtil::CreateTextEx(&ui, "Stat03_right", v21, 0, v20, 5u, 0, 0, 0);
      v23 = v22->vfptr;
      v24 = Font::Get(MENU);
      v23[113].__vecDelDtor((NiRefObject *)v22, (unsigned int)v24);
      *(_QWORD *)&v25.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v25.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v26 = (char *)TextData3::Get(0x78E5A8EAu);
      v27 = UIUtil::CreateTextEx(&ui, "Stat04_middle", v26, 0, v25, 5u, 0, 0, 0);
      v28 = v27->vfptr;
      v29 = Font::Get(MENU);
      v28[113].__vecDelDtor((NiRefObject *)v27, (unsigned int)v29);
      *(_QWORD *)&v30.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v30.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v31 = (char *)TextData3::Get(0x78EABBEAu);
      v32 = UIUtil::CreateTextEx(&ui, "Stat05_left", v31, 0, v30, 5u, 0, 0, 0);
      v33 = v32->vfptr;
      v34 = Font::Get(MENU);
      v33[113].__vecDelDtor((NiRefObject *)v32, (unsigned int)v34);
      *(_QWORD *)&v35.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v35.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v36 = (char *)TextData3::Get(0x78E3B4EAu);
      v37 = UIUtil::CreateTextEx(&ui, "Stat06_left", v36, 0, v35, 5u, 0, 0, 0);
      v38 = v37->vfptr;
      v39 = Font::Get(MENU);
      v38[113].__vecDelDtor((NiRefObject *)v37, (unsigned int)v39);
      if ( !Folder::m_bInit )
        Folder::Init();
      v40 = Folder::Merge(&Folder::m_acMenu, "charcreate\\class_stat\\class_stat.kfm");
      v41 = NiActorManager::Create(v40, 0, 1, 0);
      v2->m_pkActor = v41;
      if ( v41 )
      {
        ((void (__thiscall *)(CharCreateStatWin *, NiAVObject *, _DWORD))v2->vfptr[29].__vecDelDtor)(
          v2,
          v41->m_spNIFRoot.m_pObject,
          0);
        NiActorManager::SetTargetAnimation(v2->m_pkActor, 0);
      }
      ((void (__thiscall *)(CharCreateStatWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
        v2,
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        0.0,
        1.0);
      v42 = v2->vfptr;
      v43 = ((int (__thiscall *)(CharCreateStatWin *))v2->vfptr[42].__vecDelDtor)(v2);
      v44 = (int)v2->vfptr[41].__vecDelDtor((NiRefObject *)v2, v43 - 10);
      v42[77].__vecDelDtor((NiRefObject *)v2, v44);
      v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
      v2->vfptr[60].__vecDelDtor((NiRefObject *)v2, 0);
      LOBYTE(v50) = 0;
      UIUtil::~UIUtil(&ui);
      v45 = spNode.m_pObject;
      v50 = -1;
      if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v45 )
        v45->vfptr->__vecDelDtor((NiRefObject *)v45, 1u);
      result = 1;
    }
    else
    {
      v9 = spNode.m_pObject;
      v50 = -1;
      if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v9 )
        v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      result = 0;
    }
  }
  else
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("ClassStat.nif Load Fail", "LoadFail", 0);
      v5 = spNode.m_pObject;
    }
    v50 = -1;
    if ( v5 )
    {
      v6 = v5;
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    result = 0;
  }
  return result;
}
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0040C900) --------------------------------------------------------
void __thiscall CharCreateStatWin::SetAniCode(CharCreateStatWin *this)
{
  unsigned int v1; // eax@1

  v1 = 0;
  switch ( this->m_kClass )
  {
    case 1:
      NiActorManager::SetTargetAnimation(this->m_pkActor, 0);
      break;
    case 6:
      NiActorManager::SetTargetAnimation(this->m_pkActor, 1u);
      break;
    case 0xB:
      NiActorManager::SetTargetAnimation(this->m_pkActor, 2u);
      break;
    case 0x10:
      NiActorManager::SetTargetAnimation(this->m_pkActor, 3u);
      break;
    case 0x15:
      NiActorManager::SetTargetAnimation(this->m_pkActor, 4u);
      break;
    case 0x1A:
      v1 = 5;
      goto LABEL_8;
    default:
LABEL_8:
      NiActorManager::SetTargetAnimation(this->m_pkActor, v1);
      break;
  }
}

//----- (0040C9C0) --------------------------------------------------------
CharCreateStatWin *__cdecl CharCreateStatWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  CharCreateStatWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x160u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&CharCreateStatWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&CharCreateStatWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LOBYTE(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 1;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (CharCreateStatWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 970974: using guessed type void (__thiscall *CharCreateStatWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 970994: using guessed type int (__thiscall *CharCreateStatWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0040CB10) --------------------------------------------------------
CharCreateStatWin *__thiscall CharCreateStatWin::`scalar deleting destructor'(CharCreateStatWin *this, unsigned int a2)
{
  CharCreateStatWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&CharCreateStatWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CharCreateStatWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 970974: using guessed type void (__thiscall *CharCreateStatWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 970994: using guessed type int (__thiscall *CharCreateStatWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0040CB50) --------------------------------------------------------
char __thiscall NiActorManager::SetTargetAnimation(NiActorManager *this, unsigned int eSequenceID)
{
  NiActorManager *v2; // ebx@1
  NiTListItem<NiActorManager::TimelineData> *v3; // esi@1
  NiTListItem<NiActorManager::TimelineData> *v4; // ST04_4@2
  unsigned int v5; // esi@3
  char result; // al@5

  v2 = this;
  v3 = this->m_kTimeline.m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->m_kTimeline.vfptr->DeleteItem(
      (NiTListBase<NiTObjectAllocator<NiActorManager::TimelineData>,NiActorManager::TimelineData> *)&v2->m_kTimeline,
      v4);
  }
  v5 = eSequenceID;
  v2->m_kTimeline.m_kAllocator.m_uiCount = 0;
  v2->m_kTimeline.m_pkHead = 0;
  v2->m_kTimeline.m_pkTail = 0;
  if ( v2->m_eTargetID == v5 )
    goto LABEL_7;
  if ( v5 == NiActorManager::INVALID_SEQUENCE_ID
    || (result = NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
                   (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v2->m_kSequenceMap,
                   v5,
                   (NiVBSet **)&eSequenceID)) != 0 )
  {
    v2->m_eTargetID = v5;
LABEL_7:
    result = 1;
    v2->m_bBuildTimeline = 1;
  }
  return result;
}
// 9E4E90: using guessed type const unsigned int NiActorManager::INVALID_SEQUENCE_ID;

//----- (0040CBD0) --------------------------------------------------------
void __thiscall CharCreateViewCtrlWin::CharCreateViewCtrlWin(CharCreateViewCtrlWin *this)
{
  CharCreateViewCtrlWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_pkFrameWork = 0;
  v1->pTurnLeftBtn = 0;
  v1->pTurnRightBtn = 0;
  v1->vfptr = (NiRefObjectVtbl *)&CharCreateViewCtrlWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CharCreateViewCtrlWin::`vftable'{for `IDirectMessenger'};
}
// 970C04: using guessed type void (__thiscall *CharCreateViewCtrlWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 970C24: using guessed type int (__thiscall *CharCreateViewCtrlWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0040CC00) --------------------------------------------------------
void __thiscall CharCreateViewCtrlWin::~CharCreateViewCtrlWin(CharCreateViewCtrlWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&CharCreateViewCtrlWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CharCreateViewCtrlWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 970C04: using guessed type void (__thiscall *CharCreateViewCtrlWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 970C24: using guessed type int (__thiscall *CharCreateViewCtrlWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0040CC20) --------------------------------------------------------
void __thiscall CharCreateViewCtrlWin::OnMouseEvent(CharCreateViewCtrlWin *this, PgWin::PG_MOUSE_EVENT eMouseEvent, PgWin *pkWin)
{
  CharCreateViewCtrlWin *v3; // esi@1
  PgFrameWork *v4; // eax@3
  CharCreateFrameWork *v5; // ecx@4
  PgFrameWork *v6; // eax@8
  CharCreateFrameWork *v7; // ecx@9

  v3 = this;
  if ( eMouseEvent == 1 )
  {
    if ( (PgWin *)this->pTurnLeftBtn == pkWin )
    {
      v4 = this->m_pkFrameWork;
      if ( v4 )
      {
        LOBYTE(this->m_pkFrameWork[1].m_uiMessageNum) = LOBYTE(v4[1].m_uiMessageNum) == 0;
        v5 = (CharCreateFrameWork *)this->m_pkFrameWork;
        if ( v5->m_bAutoTurn )
        {
          CharCreateFrameWork::ActNormalStand(v5);
          BYTE3(v3->m_pkFrameWork[1].m_pkMsgHooker) = 1;
        }
        else
        {
          CharCreateFrameWork::ActStand(v5);
          BYTE3(v3->m_pkFrameWork[1].m_pkMsgHooker) = 1;
        }
      }
    }
    else if ( (PgWin *)this->pTurnRightBtn == pkWin )
    {
      v6 = this->m_pkFrameWork;
      if ( v6 )
      {
        LOBYTE(v6[1].m_uiMessageNum) = LOBYTE(v6[1].m_uiMessageNum) == 0;
        v7 = (CharCreateFrameWork *)this->m_pkFrameWork;
        if ( v7->m_bAutoTurn )
        {
          CharCreateFrameWork::ActNormalStand(v7);
          BYTE3(v3->m_pkFrameWork[1].m_pkMsgHooker) = 0;
        }
        else
        {
          CharCreateFrameWork::ActStand(v7);
          BYTE3(v3->m_pkFrameWork[1].m_pkMsgHooker) = 0;
        }
      }
    }
  }
}

//----- (0040CD20) --------------------------------------------------------
char __thiscall CharCreateViewCtrlWin::Create(CharCreateViewCtrlWin *this, PgFrameWork *pkFrameWork)
{
  CharCreateViewCtrlWin *v2; // esi@1
  NiTexturePalette *v3; // ebx@1
  const char *v4; // eax@3
  NiNode *v5; // esi@5
  PgWinBut *v7; // eax@10
  void *(__thiscall *v8)(NiRefObject *, unsigned int); // edx@10
  NiNode *v9; // esi@11
  UIUtil ui; // [sp+18h] [bp-24h]@10
  NiPointer<NiNode> spNode; // [sp+2Ch] [bp-10h]@1
  int v12; // [sp+38h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  this->m_pkFrameWork = pkFrameWork;
  v3 = pTexturePalette;
  v12 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "\\CharCreate\\CreatCharTurnButton.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 393, 654, 0, pkFrameWork, "CharCreateViewCtrlWin", 0) )
  {
    v5 = spNode.m_pObject;
    v12 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
    return 0;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v12) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, 0, 0);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v2->pTurnLeftBtn = UIUtil::CreateButton(&ui, 0, "TurnL", 0, 3);
  v7 = UIUtil::CreateButton(&ui, 1u, "TurnR", 0, 3);
  v8 = v2->vfptr[59].__vecDelDtor;
  v2->pTurnRightBtn = v7;
  ((void (__thiscall *)(CharCreateViewCtrlWin *, unsigned int, unsigned int, _DWORD, _DWORD))v8)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.80000001);
  v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
  LOBYTE(v12) = 0;
  UIUtil::~UIUtil(&ui);
  v12 = -1;
  if ( spNode.m_pObject )
  {
    v9 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v9 )
        v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0040CEE0) --------------------------------------------------------
CharCreateViewCtrlWin *__cdecl CharCreateViewCtrlWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  CharCreateViewCtrlWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x164u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&CharCreateViewCtrlWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&CharCreateViewCtrlWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (CharCreateViewCtrlWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 970C04: using guessed type void (__thiscall *CharCreateViewCtrlWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 970C24: using guessed type int (__thiscall *CharCreateViewCtrlWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0040D030) --------------------------------------------------------
CharCreateViewCtrlWin *__thiscall CharCreateViewCtrlWin::`vector deleting destructor'(CharCreateViewCtrlWin *this, unsigned int a2)
{
  CharCreateViewCtrlWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&CharCreateViewCtrlWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CharCreateViewCtrlWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 970C04: using guessed type void (__thiscall *CharCreateViewCtrlWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 970C24: using guessed type int (__thiscall *CharCreateViewCtrlWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0040D070) --------------------------------------------------------
void __thiscall Name3::operator=(Name3 *this, const char *nm)
{
  *(_QWORD *)&this->n3_code[1] = 0i64;
  this->n3_code[0] = 0;
  strncpy((char *)this->n3_code, (char *)nm, 0xCu);
}

//----- (0040D090) --------------------------------------------------------
void __thiscall World::SetMapName(World *this, char *pcMapName)
{
  char *v2; // eax@1

  v2 = this->m_kMapName.n3_name;
  *((_DWORD *)v2 + 2) = 0;
  *((_DWORD *)v2 + 1) = 0;
  *(_DWORD *)v2 = 0;
  strncpy(this->m_kMapName.n3_name, pcMapName, 0xCu);
}

//----- (0040D0C0) --------------------------------------------------------
char __thiscall CharSelectFrameWork::InitWindow(CharSelectFrameWork *this)
{
  CharSelectFrameWork *v1; // esi@1
  CharSelectMenuWin *v2; // eax@1
  char result; // al@2

  v1 = this;
  v2 = CharSelectMenuWin::CreateWin((PgFrameWork *)&this->vfptr);
  v1->m_pkCharSelectMenuWin = v2;
  if ( v2 )
  {
    v2->vfptr[60].__vecDelDtor((NiRefObject *)v2, 0);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkCharSelectMenuWin->vfptr);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkEventFriendCountWin->vfptr);
    v1->m_pkChangeNameWin = ChangeNameWin::CreateWin((PgFrameWork *)&v1->vfptr);
    if ( g_kSoundMgr.m_pkBGMGroup )
    {
      if ( !SoundGroupBgm::IsBGMPlaying(g_kSoundMgr.m_pkBGMGroup) )
      {
        SoundMgr::StopBGM(&g_kSoundMgr);
        SoundGroupBgm::SetFadeDurationTime(g_kSoundMgr.m_pkBGMGroup, 0.0);
        SoundMgr::PlayBGM(&g_kSoundMgr, "LoginBackground.mp3");
      }
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0040D160) --------------------------------------------------------
void __thiscall CharSelectFrameWork::TerminateWindow(CharSelectFrameWork *this)
{
  CharSelectFrameWork *v1; // esi@1
  ChangeNameWin *v2; // ecx@7
  MsgBox *v3; // edi@9

  v1 = this;
  if ( this->m_pkCharSelectMenuWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkCharSelectMenuWin->vfptr);
    v1->m_pkCharSelectMenuWin = 0;
  }
  if ( v1->m_pkEventFriendCountWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkEventFriendCountWin->vfptr);
    v1->m_pkEventFriendCountWin = 0;
  }
  if ( v1->m_spkMsgBox.m_pObject )
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_spkMsgBox.m_pObject->vfptr);
  v2 = v1->m_pkChangeNameWin;
  if ( v2 )
  {
    ((void (*)(void))v2->vfptr[90].__vecDelDtor)();
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkChangeNameWin->vfptr);
    v1->m_pkChangeNameWin = 0;
  }
  v3 = v1->m_spkMsgBox.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
    {
      if ( v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
    v1->m_spkMsgBox.m_pObject = 0;
  }
}

//----- (0040D210) --------------------------------------------------------
void __thiscall CharSelectFrameWork::TerminateBackgroundScene(CharSelectFrameWork *this)
{
  char *v1; // edi@1
  signed int v2; // ebx@1
  int v3; // esi@2
  NiPointer<NiNode> *v4; // edi@8
  signed int v5; // ebx@8
  NiNode *v6; // esi@9
  NiCamera *v7; // esi@16
  LONG (__stdcall *v8)(volatile LONG *); // ebx@17
  NiNode *v9; // esi@22
  NiSortAdjustNode *v10; // esi@27
  NiNode *v11; // esi@32
  CharSelectFrameWork *v12; // [sp+Ch] [bp-4h]@1

  v12 = this;
  v1 = (char *)this->m_spCharSelectEffect;
  v2 = 6;
  do
  {
    v3 = *(_DWORD *)v1;
    if ( *(_DWORD *)v1 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v3 + 4)) && v3 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v3)(v3, 1);
      *(_DWORD *)v1 = 0;
    }
    v1 += 4;
    --v2;
  }
  while ( v2 );
  v4 = v12->m_aspAvatarPos;
  v5 = 6;
  do
  {
    v6 = v4->m_pObject;
    if ( v4->m_pObject )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      v4->m_pObject = 0;
    }
    ++v4;
    --v5;
  }
  while ( v5 );
  if ( v12->m_spCamera.m_pObject && (v7 = v12->m_spCamera.m_pObject) != 0 )
  {
    v8 = InterlockedDecrement;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v12->m_spCamera.m_pObject = 0;
  }
  else
  {
    v8 = InterlockedDecrement;
  }
  v9 = v12->m_spCharScene.m_pObject;
  if ( v9 )
  {
    if ( !v8((volatile LONG *)&v9->m_uiRefCount) && v9 )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v12->m_spCharScene.m_pObject = 0;
  }
  v10 = v12->m_spBackgroundScene.m_pObject;
  if ( v10 )
  {
    if ( !v8((volatile LONG *)&v10->m_uiRefCount) && v10 )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    v12->m_spBackgroundScene.m_pObject = 0;
  }
  v11 = v12->m_spShadowScene.m_pObject;
  if ( v11 )
  {
    if ( !v8((volatile LONG *)&v11->m_uiRefCount) )
    {
      if ( v11 )
        v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    }
    v12->m_spShadowScene.m_pObject = 0;
  }
}

//----- (0040D360) --------------------------------------------------------
char __thiscall CharSelectFrameWork::InitAvatar(CharSelectFrameWork *this)
{
  NsPgToonExtraData *v1; // eax@1
  double v2; // st7@1
  signed int v3; // ebx@1
  Avatar **v4; // esi@1
  PROTO_AVATARINFORMATION *v5; // edi@2
  Avatar *v6; // eax@3
  NiAVObject *v7; // edi@4
  CharSelectFrameWork *v8; // esi@7
  CharSelectFrameWork *v9; // eax@9
  Picking *v10; // eax@10
  NiPoint3 kPos; // [sp+20h] [bp-2Ch]@3
  NiPoint3 kDir; // [sp+2Ch] [bp-20h]@3
  CharSelectFrameWork *v14; // [sp+38h] [bp-14h]@1
  bool bHaveAvata; // [sp+3Fh] [bp-Dh]@1
  int v16; // [sp+48h] [bp-4h]@9

  v14 = this;
  v1 = Engine3D::ms_spToonExtraData;
  this->m_pkOldCTCamera = Engine3D::ms_spToonExtraData->m_pCamera;
  v1->m_pCamera = this->m_spCamera.m_pObject;
  v2 = Engine3D::ms_spToonExtraData->m_fLineSize;
  bHaveAvata = 0;
  CharSelectFrameWork::fToonLineSize = v2;
  v3 = 0;
  v4 = this->m_apkAvatar;
  Engine3D::ms_spToonExtraData->m_fLineSize = 0.001;
  do
  {
    v5 = User::GetAvatarInfoBySlot(&g_kUser, v3);
    if ( v5 )
    {
      kPos.x = 0.0;
      kPos.y = 0.0;
      kPos.z = 0.0;
      kDir.x = 0.0;
      kDir.y = -1.0;
      kDir.z = 0.0;
      CharResMgr::RemoveAllCharActor(&g_kCharResMgr);
      v6 = CharMgr::AddAvatar(&g_kCharMgr, v5, &kPos, &kDir, 1u);
      *v4 = v6;
      if ( v6 )
      {
        NiAVObject::Update((NiAVObject *)*(v4 - 6), 0.0, 0);
        v7 = (NiAVObject *)&(*v4)->m_spScene.m_pObject->vfptr;
        ((void (__stdcall *)(NiNode *, _DWORD))(*(v4 - 6))->vfptr[3].DeleteAbStateByAbstateIndex)(
          (*v4)->m_spScene.m_pObject,
          0);
        NiAVObject::Update(v7, 0.0, 0);
        NiAVObject::UpdateEffects((NiAVObject *)*(v4 - 6));
        NiAVObject::UpdateProperties((NiAVObject *)*(v4 - 6));
        CharSelectFrameWork::ActPos(*v4, v3);
        bHaveAvata = 1;
      }
    }
    else
    {
      *v4 = 0;
    }
    ++v3;
    ++v4;
  }
  while ( v3 < 6 );
  v8 = v14;
  if ( !bHaveAvata )
    CharSelectMenuWin::DisplayNoCharMsg(v14->m_pkCharSelectMenuWin);
  User::SetSelectedAvatarSlot(&g_kUser, -1);
  v9 = (CharSelectFrameWork *)operator new(0x3Cu);
  v14 = v9;
  v16 = 0;
  if ( v9 )
    Picking::Picking((Picking *)v9);
  else
    v10 = 0;
  v8->m_pkPick = v10;
  return 1;
}
// A886C8: using guessed type float CharSelectFrameWork::fToonLineSize;

//----- (0040D4E0) --------------------------------------------------------
void __thiscall CharSelectFrameWork::TerminateAvatar(CharSelectFrameWork *this)
{
  NsPgToonExtraData *v1; // eax@1
  char *v2; // edi@3
  signed int v3; // ebx@3
  int v4; // esi@4
  Picking *v5; // esi@10
  CharSelectFrameWork *v6; // [sp+0h] [bp-4h]@1

  v1 = Engine3D::ms_spToonExtraData;
  v6 = this;
  if ( Engine3D::ms_spToonExtraData )
  {
    Engine3D::ms_spToonExtraData->m_fLineSize = 0.0017500001;
    v1->m_pCamera = this->m_pkOldCTCamera;
  }
  v2 = (char *)this->m_aspAvatarPos;
  v3 = 6;
  do
  {
    v4 = *(_DWORD *)v2;
    if ( *(_DWORD *)v2 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v4 + 4)) && v4 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v4)(v4, 1);
      *(_DWORD *)v2 = 0;
    }
    v2 += 4;
    --v3;
  }
  while ( v3 );
  CharMgr::RemoveAllWithoutMainChar(&g_kCharMgr);
  v5 = v6->m_pkPick;
  if ( v5 )
  {
    Picking::~Picking(v6->m_pkPick);
    operator delete(v5);
  }
}

//----- (0040D570) --------------------------------------------------------
char __thiscall CharSelectFrameWork::InitNet(CharSelectFrameWork *this)
{
  CharSelectFrameWork *v1; // ebx@1
  Net *v2; // esi@1
  Net *v3; // edi@1

  v1 = this;
  v2 = this->m_spWorldMgrNet.m_pObject;
  v3 = g_kNetMgr.m_spWorldMgr.m_pObject;
  if ( v2 != g_kNetMgr.m_spWorldMgr.m_pObject )
  {
    if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spWorldMgrNet.m_pObject = v3;
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
  return 1;
}

//----- (0040D5C0) --------------------------------------------------------
void __thiscall CharSelectFrameWork::TerminateNet(CharSelectFrameWork *this)
{
  CharSelectFrameWork *v1; // edi@1
  Net *v2; // esi@1

  v1 = this;
  v2 = this->m_spWorldMgrNet.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
    v1->m_spWorldMgrNet.m_pObject = 0;
  }
}

//----- (0040D600) --------------------------------------------------------
char __thiscall CharSelectFrameWork::InitShadow(CharSelectFrameWork *this)
{
  CharSelectFrameWork *v1; // esi@1
  NiNode *v2; // ecx@1
  NiTListItem<NiPointer<Shadow> > **v3; // edi@1
  NiTListItem<NiPointer<Shadow> > *v4; // ST30_4@2
  Shadow *v5; // eax@4
  Shadow *v6; // edi@4
  Shadow *v7; // eax@5
  NiNode *v8; // eax@11
  unsigned int v9; // ebx@11
  unsigned int v10; // eax@12
  unsigned int v11; // edi@14
  NiNode *v12; // edi@20
  float v13; // ecx@20
  int v15; // [sp+34h] [bp-34h]@0
  int v16; // [sp+38h] [bp-30h]@0
  int v17; // [sp+3Ch] [bp-2Ch]@0
  int v18; // [sp+40h] [bp-28h]@0
  NiPoint3 kDefaultDirectionalLightDir; // [sp+44h] [bp-24h]@1
  float fTime; // [sp+50h] [bp-18h]@4
  NiPointer<Shadow> spShadow; // [sp+54h] [bp-14h]@6
  unsigned int i; // [sp+58h] [bp-10h]@3
  int v23; // [sp+64h] [bp-4h]@4

  v1 = this;
  v2 = this->m_spShadowScene.m_pObject;
  kDefaultDirectionalLightDir.x = 4.0;
  v1->m_nMaxShadowObject = 6;
  kDefaultDirectionalLightDir.y = -45.0;
  kDefaultDirectionalLightDir.z = -17.0;
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v2->m_kChildren);
  v3 = &v1->m_kShadowList.m_pkHead->m_pkNext;
  while ( v3 )
  {
    v4 = (NiTListItem<NiPointer<Shadow> > *)v3;
    v3 = (NiTListItem<NiPointer<Shadow> > **)*v3;
    v1->m_kShadowList.vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> > *)&v1->m_kShadowList,
      v4);
  }
  v1->m_kShadowList.m_kAllocator.m_uiCount = 0;
  v1->m_kShadowList.m_pkHead = 0;
  v1->m_kShadowList.m_pkTail = 0;
  for ( i = 0; i < v1->m_nMaxShadowObject; ++i )
  {
    *(float *)&v5 = COERCE_FLOAT(operator new(0x84u));
    fTime = *(float *)&v5;
    v6 = 0;
    v23 = 0;
    if ( *(float *)&v5 != 0.0 )
    {
      Shadow::Shadow(v5, &kDefaultDirectionalLightDir, 0, 0, 5u);
      v6 = v7;
    }
    spShadow.m_pObject = v6;
    if ( v6 )
      InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
    v23 = 1;
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *)&v1->m_kShadowList,
      (NiPointer<NiDX92DBufferData> *)&spShadow);
    ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spShadowScene.m_pObject->vfptr[29].__vecDelDtor)(
      v6->m_spNode.m_pObject,
      0);
    v23 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  }
  *(float *)&v8 = COERCE_FLOAT(operator new(0xE8u));
  fTime = *(float *)&v8;
  v9 = 0;
  v23 = 2;
  if ( *(float *)&v8 == 0.0 )
  {
    i = 0;
  }
  else
  {
    NiNode::NiNode(v8, 0);
    i = v10;
  }
  v23 = -1;
  NiObjectNET::SetName((NiObjectNET *)i, "ShadowNode");
  v11 = v1->m_vecBGObjectNode._Mylast - v1->m_vecBGObjectNode._Myfirst;
  if ( v11 )
  {
    do
    {
      ((void (__stdcall *)(NiPointer<Shadow> *, NiNode *))v1->m_spBackgroundScene.m_pObject->vfptr[30].__vecDelDtor)(
        &spShadow,
        v1->m_vecBGObjectNode._Myfirst[v9]);
      if ( *(float *)&spShadow.m_pObject != 0.0 )
      {
        fTime = *(float *)&spShadow.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&spShadow.m_pObject->m_uiRefCount) && fTime != 0.0 )
          (**(void (__stdcall ***)(_DWORD))LODWORD(fTime))(1);
      }
      (*(void (__stdcall **)(NiNode *, _DWORD))(*(_DWORD *)i + 116))(v1->m_vecBGObjectNode._Myfirst[v9++], 0);
    }
    while ( v9 < v11 );
  }
  v12 = (NiNode *)i;
  ((void (__stdcall *)(unsigned int, _DWORD, int, int, int, int, _DWORD, _DWORD, _DWORD, _DWORD, Shadow *))v1->m_spCharScene.m_pObject->vfptr[29].__vecDelDtor)(
    i,
    0,
    v15,
    v16,
    v17,
    v18,
    LODWORD(kDefaultDirectionalLightDir.x),
    LODWORD(kDefaultDirectionalLightDir.y),
    LODWORD(kDefaultDirectionalLightDir.z),
    LODWORD(fTime),
    spShadow.m_pObject);
  spShadow.m_pObject = (Shadow *)1;
  fTime = v13;
  NiAVObject::Update((NiAVObject *)&v1->m_spCharScene.m_pObject->vfptr, 0.0, 1);
  NiAVObject::UpdateProperties((NiAVObject *)&v1->m_spCharScene.m_pObject->vfptr);
  NiAVObject::UpdateEffects((NiAVObject *)&v1->m_spCharScene.m_pObject->vfptr);
  CharSelectFrameWork::ApplyTerrain(v1, v12);
  return 1;
}

//----- (0040D860) --------------------------------------------------------
void __thiscall CharSelectFrameWork::CharSelectFrameWork(CharSelectFrameWork *this)
{
  CharSelectFrameWork *v1; // esi@1
  MsgBox *v2; // edi@1
  NiPointer<NiAVObject> *v3; // eax@6
  NiAVObject *v4; // edi@7
  bool v5; // zf@12
  signed int v6; // [sp+14h] [bp-14h]@6
  NiPointer<NiAVObject> *v7; // [sp+18h] [bp-10h]@6

  v1 = this;
  this->m_pkMsgHooker = 0;
  this->m_uiMessageNum = 0;
  this->vfptr = (IDirectMessengerVtbl *)&PgFrameWork::`vftable';
  this->m_kMsgQ.m_pBase = (PgMsg::Frame *)operator new[](0x14u);
  v1->m_kMsgQ.m_uiAlloced = 1;
  v1->m_kMsgQ.m_uiHead = -1;
  v1->m_kMsgQ.m_uiTail = 0;
  v1->m_BackFrameID = 0;
  v1->m_bInit = 0;
  v1->vfptr = (IDirectMessengerVtbl *)&CharSelectFrameWork::`vftable';
  `eh vector constructor iterator'(
    v1->m_spCharSelectEffect,
    4u,
    6,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_aspFairy.m_pObject = 0;
  NpNs_MoveToTarget::NpNs_MoveToTarget(&v1->m_kMoveToTarget);
  `eh vector constructor iterator'(
    v1->m_aspRandomPos,
    4u,
    6,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_aspAngelPos,
    4u,
    6,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_aspAvatarPos,
    4u,
    6,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_spBackgroundScene.m_pObject = 0;
  v1->m_spCharScene.m_pObject = 0;
  v1->m_spCamera.m_pObject = 0;
  v1->m_spkMsgBox.m_pObject = 0;
  v1->m_spWorldMgrNet.m_pObject = 0;
  v1->m_spShadowScene.m_pObject = 0;
  v1->m_kShadowList.m_kAllocator.m_uiCount = 0;
  v1->m_kShadowList.m_pkHead = 0;
  v1->m_kShadowList.m_pkTail = 0;
  v1->m_kShadowList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> >Vtbl *)&PgTList<NiPointer<Shadow>>::`vftable';
  v1->m_vecBGObjectNode._Myfirst = 0;
  v1->m_vecBGObjectNode._Mylast = 0;
  v1->m_vecBGObjectNode._Myend = 0;
  v1->m_vecShadowObject._Myfirst = 0;
  v1->m_vecShadowObject._Mylast = 0;
  v1->m_vecShadowObject._Myend = 0;
  v1->m_pkCharSelectMenuWin = 0;
  v1->m_pkEventFriendCountWin = 0;
  v1->m_iEraseSlot = -1;
  v1->m_pkPick = 0;
  v1->m_bDuringLogin = 0;
  v2 = v1->m_spkMsgBox.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spkMsgBox.m_pObject = 0;
  }
  v3 = v1->m_spCharSelectEffect;
  v1->m_bDelAvaActivityMsgCheck = 0;
  v7 = v1->m_spCharSelectEffect;
  v6 = 6;
  do
  {
    v4 = v3->m_pObject;
    if ( v3->m_pObject )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
      v7->m_pObject = 0;
    }
    v3 = v7 + 1;
    v5 = v6-- == 1;
    ++v7;
  }
  while ( !v5 );
}
// 970534: using guessed type void (__thiscall *PgFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97057C: using guessed type int (__thiscall *PgTList<NiPointer<Shadow>>::`vftable')(void *p, char);
// 970F64: using guessed type void (__thiscall *CharSelectFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);

//----- (0040DA70) --------------------------------------------------------
void __thiscall CharSelectFrameWork::~CharSelectFrameWork(CharSelectFrameWork *this)
{
  CharSelectFrameWork *v1; // esi@1
  MsgBox *v2; // eax@1
  MsgBox *v3; // edi@3
  int v4; // edi@12
  NiTListItem<NiPointer<Shadow> > **v5; // ebx@12
  NiTListItem<NiPointer<Shadow> > **v6; // ST0C_4@13
  NiNode *v7; // edi@14
  Net *v8; // edi@18
  MsgBox *v9; // edi@22
  NiCamera *v10; // edi@26
  NiNode *v11; // edi@30
  NiSortAdjustNode *v12; // edi@34
  NiNode *v13; // edi@38
  PgMsg::Frame *v14; // ST0C_4@42

  v1 = this;
  this->vfptr = (IDirectMessengerVtbl *)&CharSelectFrameWork::`vftable';
  v2 = this->m_spkMsgBox.m_pObject;
  if ( v2 )
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
  v3 = v1->m_spkMsgBox.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spkMsgBox.m_pObject = 0;
  }
  if ( v1->m_vecShadowObject._Myfirst )
    operator delete(v1->m_vecShadowObject._Myfirst);
  v1->m_vecShadowObject._Myfirst = 0;
  v1->m_vecShadowObject._Mylast = 0;
  v1->m_vecShadowObject._Myend = 0;
  if ( v1->m_vecBGObjectNode._Myfirst )
    operator delete(v1->m_vecBGObjectNode._Myfirst);
  v4 = (int)&v1->m_kShadowList;
  v1->m_vecBGObjectNode._Myfirst = 0;
  v1->m_vecBGObjectNode._Mylast = 0;
  v1->m_vecBGObjectNode._Myend = 0;
  v1->m_kShadowList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> >Vtbl *)&PgTList<NiPointer<Shadow>>::`vftable';
  v5 = &v1->m_kShadowList.m_pkHead->m_pkNext;
  while ( v5 )
  {
    v6 = v5;
    v5 = (NiTListItem<NiPointer<Shadow> > **)*v5;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v4 + 8))(&v1->m_kShadowList, v6);
  }
  v1->m_kShadowList.m_kAllocator.m_uiCount = 0;
  v1->m_kShadowList.m_pkHead = 0;
  v1->m_kShadowList.m_pkTail = 0;
  *(_DWORD *)v4 = &NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable';
  v7 = v1->m_spShadowScene.m_pObject;
  if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  v8 = v1->m_spWorldMgrNet.m_pObject;
  if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
    v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
  v9 = v1->m_spkMsgBox.m_pObject;
  if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
    v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
  v10 = v1->m_spCamera.m_pObject;
  if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
    v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
  v11 = v1->m_spCharScene.m_pObject;
  if ( v11 && !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
    v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
  v12 = v1->m_spBackgroundScene.m_pObject;
  if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
    v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
  `eh vector destructor iterator'(
    v1->m_aspAvatarPos,
    4u,
    6,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_aspAngelPos,
    4u,
    6,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_aspRandomPos,
    4u,
    6,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  NpNs_MoveToTarget::~NpNs_MoveToTarget(&v1->m_kMoveToTarget);
  v13 = v1->m_aspFairy.m_pObject;
  if ( v13 && !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) && v13 )
    v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
  `eh vector destructor iterator'(
    v1->m_spCharSelectEffect,
    4u,
    6,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v14 = v1->m_kMsgQ.m_pBase;
  v1->vfptr = (IDirectMessengerVtbl *)&PgFrameWork::`vftable';
  operator delete[](v14);
}
// 9703D4: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable')(void *p, char);
// 970534: using guessed type void (__thiscall *PgFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97057C: using guessed type int (__thiscall *PgTList<NiPointer<Shadow>>::`vftable')(void *p, char);
// 970F64: using guessed type void (__thiscall *CharSelectFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);

//----- (0040DD10) --------------------------------------------------------
char __thiscall CharSelectFrameWork::InitBackgroundScene(CharSelectFrameWork *this)
{
  CharSelectFrameWork *v1; // edi@1
  NiSortAdjustNode *v2; // eax@1
  NiSortAdjustNode *v3; // ebx@1
  NiSortAdjustNode *v4; // eax@2
  NiSortAdjustNode *v5; // esi@3
  NiNode *v6; // esi@10
  NiNode *v7; // eax@15
  NiNode *v8; // eax@16
  NiNode *v9; // ebx@16
  NiNode *v10; // esi@18
  unsigned int v11; // ebx@25
  NiObjectNET *v12; // eax@25
  NiAlphaProperty *v13; // esi@25
  CharSelectFrameWork *v14; // ecx@27
  NiNode *v15; // esi@27
  NiObjectNET *v16; // eax@29
  unsigned int v17; // esi@29
  CharSelectFrameWork *v18; // edx@34
  NiObjectNET *v19; // eax@36
  unsigned int v20; // esi@36
  CharSelectFrameWork *v21; // eax@39
  NiNode *v22; // eax@41
  volatile LONG *v23; // eax@42
  CharSelectFrameWork *v24; // edi@44
  NiNode *v25; // esi@44
  NiAmbientLight *v26; // eax@52
  int v27; // eax@53
  int v28; // esi@53
  int v29; // eax@55
  NiDirectionalLight *v30; // eax@55
  int v31; // eax@56
  int v32; // esi@56
  int v33; // eax@58
  float v34; // edx@58
  NiNode *v35; // ST7C_4@58
  const char *v36; // eax@60
  NiNode *v37; // eax@60
  NiPointer<NiNode> *v38; // ebx@61
  int v39; // eax@62
  int v40; // edi@62
  NiNode *v41; // esi@63
  char result; // al@68
  NiRTTI *v43; // eax@69
  char v44; // al@72
  NiNode *v45; // edi@74
  NiNode *v46; // eax@82
  char *v47; // eax@84
  char *v48; // edi@84
  std::vector<CBaseObject *,std::allocator<CBaseObject *> > *v49; // esi@84
  unsigned int v50; // eax@87
  unsigned int v51; // edi@87
  CBaseObject **v52; // edx@88
  CBaseObject **v53; // ecx@89
  int v54; // edi@89
  unsigned int v55; // eax@90
  unsigned int v56; // eax@91
  unsigned int v57; // ecx@91
  unsigned int v58; // ecx@93
  CBaseObject **v59; // eax@99
  CBaseObject **v60; // edi@99
  CBaseObject **v61; // ecx@101
  unsigned int v62; // eax@102
  unsigned int v63; // eax@103
  unsigned int v64; // ecx@103
  unsigned int v65; // ecx@105
  _DWORD *v66; // eax@110
  unsigned int v67; // eax@112
  char *v68; // ecx@113
  char *v69; // ebx@113
  std::vector<CBaseObject *,std::allocator<CBaseObject *> > *v70; // edi@113
  int v71; // edx@115
  unsigned int v72; // eax@116
  CBaseObject **v73; // ebx@117
  CBaseObject **v74; // ecx@118
  unsigned int v75; // edx@118
  unsigned int v76; // eax@119
  unsigned int v77; // eax@121
  unsigned int v78; // ecx@121
  unsigned int v79; // ecx@123
  CBaseObject **v80; // edx@128
  CBaseObject **v81; // eax@128
  CBaseObject **v82; // ecx@130
  unsigned int v83; // eax@131
  unsigned int v84; // eax@133
  unsigned int v85; // ecx@133
  unsigned int v86; // ecx@135
  _DWORD *v87; // eax@140
  int v88; // ebx@143
  unsigned int v89; // esi@143
  unsigned int v90; // eax@144
  CBaseObject **v91; // edx@145
  CBaseObject **v92; // ecx@146
  int v93; // esi@146
  unsigned int v94; // eax@147
  unsigned int v95; // eax@149
  unsigned int v96; // ecx@149
  unsigned int v97; // ecx@151
  CBaseObject **v98; // eax@156
  CBaseObject **v99; // esi@156
  CBaseObject **v100; // ecx@158
  unsigned int v101; // eax@159
  unsigned int v102; // eax@161
  unsigned int v103; // ecx@161
  unsigned int v104; // ecx@163
  _DWORD *v105; // eax@168
  unsigned int v106; // esi@171
  unsigned int v107; // eax@172
  CBaseObject **v108; // edx@173
  CBaseObject **v109; // ecx@174
  int v110; // esi@174
  unsigned int v111; // eax@175
  unsigned int v112; // eax@177
  unsigned int v113; // ecx@177
  unsigned int v114; // ecx@179
  CBaseObject **v115; // eax@184
  CBaseObject **v116; // esi@184
  CBaseObject **v117; // ecx@186
  unsigned int v118; // eax@187
  unsigned int v119; // eax@189
  unsigned int v120; // ecx@189
  unsigned int v121; // ecx@191
  _DWORD *v122; // eax@196
  unsigned int v123; // esi@199
  unsigned int v124; // eax@200
  CBaseObject **v125; // edx@201
  CBaseObject **v126; // ecx@202
  int v127; // esi@202
  unsigned int v128; // eax@203
  unsigned int v129; // eax@205
  unsigned int v130; // ecx@205
  unsigned int v131; // ecx@207
  CBaseObject **v132; // eax@212
  CBaseObject **v133; // esi@212
  CBaseObject **v134; // ecx@214
  unsigned int v135; // eax@215
  unsigned int v136; // eax@217
  unsigned int v137; // ecx@217
  unsigned int v138; // ecx@219
  _DWORD *v139; // eax@224
  unsigned int v140; // esi@227
  unsigned int v141; // eax@228
  CBaseObject **v142; // edx@229
  CBaseObject **v143; // ecx@230
  int v144; // esi@230
  unsigned int v145; // eax@231
  unsigned int v146; // eax@233
  unsigned int v147; // ecx@233
  unsigned int v148; // ecx@235
  CBaseObject **v149; // eax@240
  CBaseObject **v150; // esi@240
  CBaseObject **v151; // ecx@242
  unsigned int v152; // eax@243
  unsigned int v153; // eax@245
  unsigned int v154; // ecx@245
  unsigned int v155; // ecx@247
  _DWORD *v156; // eax@252
  unsigned int v157; // esi@255
  unsigned int v158; // eax@256
  CBaseObject **v159; // edx@257
  CBaseObject **v160; // ecx@258
  int v161; // esi@258
  unsigned int v162; // eax@259
  unsigned int v163; // eax@261
  unsigned int v164; // ecx@261
  unsigned int v165; // ecx@263
  CBaseObject **v166; // eax@268
  CBaseObject **v167; // esi@268
  CBaseObject **v168; // ecx@270
  unsigned int v169; // eax@271
  unsigned int v170; // eax@273
  unsigned int v171; // ecx@273
  unsigned int v172; // ecx@275
  _DWORD *v173; // eax@280
  GameFrameWork *v174; // eax@283
  GameFrameWork::DisplayAspect v175; // eax@284
  int v176; // eax@289
  char v177; // cl@290
  char *v178; // edi@291
  char v179; // al@292
  NiNode *v180; // esi@293
  LONG (__stdcall *v181)(volatile LONG *); // ebx@294
  NiNode *v182; // edi@296
  int v183; // eax@300
  char v184; // cl@301
  char *v185; // edi@302
  char v186; // al@303
  NiNode *v187; // esi@304
  void (__thiscall ***v188)(_DWORD, _DWORD); // esi@321
  NiAlphaProperty *v189; // esi@323
  NiCamera *v190; // esi@326
  unsigned int v191; // eax@331
  int v192; // esi@333
  void (__thiscall ***v193)(_DWORD, _DWORD); // esi@335
  NiAlphaProperty *v194; // esi@337
  NiCamera *pkCamera; // [sp+94h] [bp-84h]@61
  float v196; // [sp+98h] [bp-80h]@55
  float v197; // [sp+9Ch] [bp-7Ch]@55
  float v198; // [sp+A0h] [bp-78h]@55
  NiPointer<NiNode> spNode; // [sp+A4h] [bp-74h]@58
  NiPointer<NiAlphaProperty> spkAlphaProp; // [sp+A8h] [bp-70h]@25
  unsigned int v201; // [sp+ACh] [bp-6Ch]@32
  void *v202; // [sp+B0h] [bp-68h]@34
  CharSelectFrameWork *v203; // [sp+B4h] [bp-64h]@1
  volatile LONG *lpAddend; // [sp+B8h] [bp-60h]@42
  NiNode *v205; // [sp+BCh] [bp-5Ch]@60
  unsigned int k; // [sp+C0h] [bp-58h]@1
  unsigned int i; // [sp+C4h] [bp-54h]@61
  char acObjName[64]; // [sp+C8h] [bp-50h]@62
  int v209; // [sp+114h] [bp-4h]@1

  v1 = this;
  v203 = this;
  *(float *)&v2 = COERCE_FLOAT(operator new(0xECu));
  k = (unsigned int)v2;
  v3 = 0;
  v209 = 0;
  if ( *(float *)&v2 != 0.0 )
  {
    NiSortAdjustNode::NiSortAdjustNode(v2);
    v3 = v4;
  }
  v5 = v1->m_spBackgroundScene.m_pObject;
  v209 = -1;
  if ( v5 != v3 )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spBackgroundScene.m_pObject = v3;
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
  v1->m_spBackgroundScene.m_pObject->m_eSortingMode = 0;
  v6 = v1->m_spShadowScene.m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v1->m_spShadowScene.m_pObject = 0;
  }
  *(float *)&v7 = COERCE_FLOAT(operator new(0xE8u));
  k = (unsigned int)v7;
  v209 = 1;
  if ( *(float *)&v7 == 0.0 )
  {
    v9 = 0;
  }
  else
  {
    NiNode::NiNode(v7, 0);
    v9 = v8;
  }
  v10 = v1->m_spShadowScene.m_pObject;
  v209 = -1;
  if ( v10 != v9 )
  {
    if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    v1->m_spShadowScene.m_pObject = v9;
    if ( v9 )
      InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  }
  *(float *)&v11 = 0.0;
  spkAlphaProp.m_pObject = 0;
  v209 = 2;
  *(float *)&v12 = COERCE_FLOAT(operator new(0x20u));
  v13 = (NiAlphaProperty *)v12;
  k = (unsigned int)v12;
  LOBYTE(v209) = 3;
  if ( *(float *)&v12 != 0.0 )
  {
    NiObjectNET::NiObjectNET(v12);
    v13->m_ucAlphaTestRef = 0;
    v13->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
    v13->m_uFlags = 236;
    v11 = (unsigned int)v13;
    spkAlphaProp.m_pObject = v13;
    InterlockedIncrement((volatile LONG *)&v13->m_uiRefCount);
  }
  *(_WORD *)(v11 + 28) |= 1u;
  *(_WORD *)(v11 + 28) |= 0x200u;
  *(_WORD *)(v11 + 28) = *(_WORD *)(v11 + 28) & 0xF3FF | 0x1000;
  *(_BYTE *)(v11 + 30) = 8;
  v14 = v203;
  *(_WORD *)(v11 + 28) = (*(_WORD *)(v11 + 28) & 0xFE5F | 0x40) & 0xFFE3 | 2;
  v15 = v14->m_spShadowScene.m_pObject;
  k = v11;
  InterlockedIncrement((volatile LONG *)(v11 + 4));
  LOBYTE(v209) = 4;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v15->m_kPropertyList,
    (NiPointer<NiRoom> *)&k);
  LOBYTE(v209) = 2;
  if ( !InterlockedDecrement((volatile LONG *)(v11 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v11)(v11, 1);
  *(float *)&v16 = COERCE_FLOAT(operator new(0x28u));
  v17 = (unsigned int)v16;
  k = (unsigned int)v16;
  LOBYTE(v209) = 5;
  if ( *(float *)&v16 == 0.0 )
  {
    *(float *)&v17 = 0.0;
  }
  else
  {
    NiObjectNET::NiObjectNET(v16);
    *(_DWORD *)v17 = &NiVertexColorProperty::`vftable';
    *(_WORD *)(v17 + 28) = 0;
    *(_DWORD *)(v17 + 32) = 0;
    *(_DWORD *)(v17 + 36) = 1;
  }
  v201 = v17;
  if ( *(float *)&v17 != 0.0 )
    InterlockedIncrement((volatile LONG *)(v17 + 4));
  v18 = v203;
  *(_DWORD *)(v17 + 32) = 1;
  *(_DWORD *)(v17 + 36) = 1;
  v202 = v18->m_spShadowScene.m_pObject;
  k = v17;
  InterlockedIncrement((volatile LONG *)(v17 + 4));
  LOBYTE(v209) = 7;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)((char *)v202 + 156),
    (NiPointer<NiRoom> *)&k);
  LOBYTE(v209) = 6;
  if ( !InterlockedDecrement((volatile LONG *)(v17 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v17)(v17, 1);
  *(float *)&v19 = COERCE_FLOAT(operator new(0x30u));
  v20 = (unsigned int)v19;
  k = (unsigned int)v19;
  LOBYTE(v209) = 8;
  if ( *(float *)&v19 == 0.0 )
  {
    *(float *)&v20 = 0.0;
  }
  else
  {
    NiObjectNET::NiObjectNET(v19);
    *(_DWORD *)v20 = &NiFogProperty::`vftable';
    *(float *)(v20 + 36) = 0.0;
    *(float *)(v20 + 40) = 0.0;
    *(float *)(v20 + 44) = 0.0;
    *(_WORD *)(v20 + 28) = 0;
    *(float *)(v20 + 32) = 1.0;
    *(const struct NiColor *)(v20 + 36) = NiColor::BLACK;
  }
  v21 = v203;
  *(_WORD *)(v20 + 28) &= 0xFFFEu;
  v202 = v21->m_spShadowScene.m_pObject;
  k = v20;
  InterlockedIncrement((volatile LONG *)(v20 + 4));
  LOBYTE(v209) = 9;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)((char *)v202 + 156),
    (NiPointer<NiRoom> *)&k);
  LOBYTE(v209) = 6;
  if ( !InterlockedDecrement((volatile LONG *)(v20 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v20)(v20, 1);
  *(float *)&v22 = COERCE_FLOAT(operator new(0xE8u));
  k = (unsigned int)v22;
  LOBYTE(v209) = 10;
  if ( *(float *)&v22 == 0.0 )
  {
    lpAddend = 0;
    v23 = 0;
  }
  else
  {
    NiNode::NiNode(v22, 0);
    lpAddend = v23;
  }
  v24 = v203;
  v25 = v203->m_spCharScene.m_pObject;
  LOBYTE(v209) = 6;
  if ( (volatile LONG *)v25 != v23 )
  {
    if ( v25 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v25->m_uiRefCount) && v25 )
        v25->vfptr->__vecDelDtor((NiRefObject *)v25, 1u);
      v23 = lpAddend;
    }
    v203->m_spCharScene.m_pObject = (NiNode *)v23;
    if ( v23 )
      InterlockedIncrement(v23 + 1);
  }
  *(float *)&v26 = COERCE_FLOAT(operator new(0x10Cu));
  k = (unsigned int)v26;
  LOBYTE(v209) = 11;
  if ( *(float *)&v26 == 0.0 )
  {
    v28 = 0;
  }
  else
  {
    NiAmbientLight::NiAmbientLight(v26);
    v28 = v27;
  }
  *(_DWORD *)(v28 + 188) += 2;
  *(float *)(v28 + 224) = 1.0;
  LOBYTE(v209) = 6;
  v196 = 0.80000001;
  v197 = 0.80000001;
  v198 = 0.80000001;
  *(float *)(v28 + 228) = 0.80000001;
  *(float *)(v28 + 232) = 0.80000001;
  *(float *)(v28 + 236) = 0.80000001;
  v29 = *(_DWORD *)(v28 + 188);
  *(const struct NiColor *)(v28 + 240) = NiColor::WHITE;
  *(_DWORD *)(v28 + 188) = ++v29;
  *(const struct NiColor *)(v28 + 252) = NiColor::BLACK;
  *(_DWORD *)(v28 + 188) = v29 + 1;
  NiDynamicEffect::AttachAffectedNode((NiDynamicEffect *)v28, v24->m_spCharScene.m_pObject);
  *(_BYTE *)(v28 + 176) = 1;
  ((void (__stdcall *)(int, _DWORD))v24->m_spCharScene.m_pObject->vfptr[29].__vecDelDtor)(v28, 0);
  *(float *)&v30 = COERCE_FLOAT(operator new(0x118u));
  k = (unsigned int)v30;
  LOBYTE(v209) = 12;
  if ( *(float *)&v30 == 0.0 )
  {
    v32 = 0;
  }
  else
  {
    NiDirectionalLight::NiDirectionalLight(v30);
    v32 = v31;
  }
  v33 = ++*(_DWORD *)(v32 + 188);
  *(float *)(v32 + 224) = 1.0;
  v196 = 1.0;
  *(const struct NiColor *)(v32 + 228) = NiColor::BLACK;
  v197 = 1.0;
  v198 = 1.0;
  *(float *)(v32 + 240) = v196;
  v34 = v198;
  *(float *)(v32 + 244) = 1.0;
  v33 += 2;
  *(_DWORD *)(v32 + 188) = v33;
  *(float *)(v32 + 248) = v34;
  *(const struct NiColor *)(v32 + 252) = NiColor::BLACK;
  *(_DWORD *)(v32 + 188) = v33 + 1;
  v35 = v24->m_spCharScene.m_pObject;
  LOBYTE(v209) = 6;
  NiDynamicEffect::AttachAffectedNode((NiDynamicEffect *)v32, v35);
  *(_BYTE *)(v32 + 176) = 1;
  ((void (__stdcall *)(int, _DWORD))v24->m_spCharScene.m_pObject->vfptr[29].__vecDelDtor)(v32, 0);
  spNode.m_pObject = 0;
  LOBYTE(v209) = 13;
  if ( !Folder::m_bInit )
    Folder::Init();
  v36 = Folder::Merge(&Folder::m_acMenu, "\\CharSelect\\selectBack.nif");
  v37 = PgUtil::LoadNifFile(v36, 0);
  v205 = v37;
  if ( v37 )
  {
    spNode.m_pObject = v37;
    lpAddend = (volatile LONG *)&v37->m_uiRefCount;
    InterlockedIncrement((volatile LONG *)&v37->m_uiRefCount);
    *(float *)&pkCamera = 0.0;
    i = 0;
    v202 = v24->m_aspAvatarPos;
    v38 = v24->m_aspAvatarPos;
    do
    {
      sprintf(acObjName, "Avatar%d", i);
      v39 = ((int (__stdcall *)(char *))v205->vfptr[18].__vecDelDtor)(acObjName);
      v40 = v39;
      if ( v39 )
      {
        v43 = (NiRTTI *)(*(int (__thiscall **)(int))(*(_DWORD *)v39 + 4))(v39);
        if ( v43 )
        {
          while ( v43 != &NiNode::m_RTTI )
          {
            v43 = v43->m_pkBaseRTTI;
            if ( !v43 )
              goto LABEL_72;
          }
          v44 = 1;
        }
        else
        {
LABEL_72:
          v44 = 0;
        }
        v41 = (NiNode *)(v44 != 0 ? v40 : 0);
      }
      else
      {
        v41 = 0;
      }
      v45 = v38->m_pObject;
      if ( v38->m_pObject != v41 )
      {
        if ( v45 && !InterlockedDecrement((volatile LONG *)&v45->m_uiRefCount) && v45 )
          v45->vfptr->__vecDelDtor((NiRefObject *)v45, 1u);
        v38->m_pObject = v41;
        if ( v41 )
          InterlockedIncrement((volatile LONG *)&v41->m_uiRefCount);
      }
      if ( v38->m_pObject )
      {
        ((void (__stdcall *)(NiNode *, _DWORD))v203->m_spCharScene.m_pObject->vfptr[29].__vecDelDtor)(v38->m_pObject, 0);
        v46 = v38->m_pObject;
        *(float *)&k = fabs(1.0);
        v46->m_kLocal.m_fScale = *(float *)&k;
      }
      ++v38;
      ++i;
    }
    while ( i < 6 );
    ((void (__stdcall *)(NiNode *, _DWORD))v203->m_spBackgroundScene.m_pObject->vfptr[29].__vecDelDtor)(v205, 0);
    ((void (__stdcall *)(NiNode *, _DWORD))v203->m_spBackgroundScene.m_pObject->vfptr[29].__vecDelDtor)(
      v203->m_spCharScene.m_pObject,
      0);
    v47 = (char *)v203->m_vecShadowObject._Mylast;
    v48 = (char *)v203->m_vecShadowObject._Myfirst;
    v49 = (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&v203->m_vecShadowObject;
    if ( v48 != v47 )
    {
      memmove(v48, v47, 0);
      v203->m_vecShadowObject._Mylast = (NiNode **)v48;
    }
    *(float *)&k = 0.0;
    do
    {
      v50 = (unsigned int)v49->_Mylast;
      v51 = *(_DWORD *)v202;
      i = *(_DWORD *)v202;
      if ( (unsigned int)&i >= v50 || (v52 = v49->_Myfirst, v49->_Myfirst > (CBaseObject **)&i) )
      {
        v61 = v49->_Myend;
        if ( (CBaseObject **)v50 == v61 )
        {
          v62 = (signed int)(v50 - (unsigned int)v49->_Myfirst) >> 2;
          if ( v62 > 0x3FFFFFFE )
            goto LABEL_120;
          v63 = v62 + 1;
          v64 = v61 - v49->_Myfirst;
          if ( v63 > v64 )
          {
            if ( 0x3FFFFFFF - (v64 >> 1) >= v64 )
              v65 = (v64 >> 1) + v64;
            else
              v65 = 0;
            if ( v65 < v63 )
              v65 = v63;
            std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v49, v65);
          }
        }
        v66 = v49->_Mylast;
        if ( v66 )
          *v66 = v51;
      }
      else
      {
        v53 = v49->_Myend;
        v54 = ((char *)&i - (char *)v52) >> 2;
        if ( (CBaseObject **)v50 == v53 )
        {
          v55 = (signed int)(v50 - (_DWORD)v52) >> 2;
          if ( v55 > 0x3FFFFFFE )
            goto LABEL_120;
          v56 = v55 + 1;
          v57 = v53 - v52;
          if ( v56 > v57 )
          {
            if ( 0x3FFFFFFF - (v57 >> 1) >= v57 )
              v58 = (v57 >> 1) + v57;
            else
              v58 = 0;
            if ( v58 < v56 )
              v58 = v56;
            std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v49, v58);
          }
        }
        v59 = v49->_Mylast;
        v60 = &v49->_Myfirst[v54];
        if ( v59 )
          *v59 = *v60;
      }
      v67 = k;
      ++v49->_Mylast;
      v202 = (char *)v202 + 4;
      k = v67 + 1;
    }
    while ( v67 + 1 < 6 );
    v68 = (char *)v203->m_vecBGObjectNode._Mylast;
    v69 = (char *)v203->m_vecBGObjectNode._Myfirst;
    v70 = (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&v203->m_vecBGObjectNode;
    if ( v69 != v68 )
    {
      *(float *)&k = 0.0;
      memmove(v69, v68, 0);
      v203->m_vecBGObjectNode._Mylast = (NiNode **)&v69[k];
    }
    v71 = ((int (__stdcall *)(const char *))v205->vfptr[18].__vecDelDtor)("Object02");
    i = v71;
    if ( v71 )
    {
      v72 = (unsigned int)v49->_Mylast;
      if ( (unsigned int)&i >= v72 || (v73 = v49->_Myfirst, v49->_Myfirst > (CBaseObject **)&i) )
      {
        v82 = v49->_Myend;
        if ( (CBaseObject **)v72 == v82 )
        {
          v83 = (signed int)(v72 - (unsigned int)v49->_Myfirst) >> 2;
          if ( v83 > 0x3FFFFFFE )
            std::_Xlength_error("vector<T> too long");
          v84 = v83 + 1;
          v85 = v82 - v49->_Myfirst;
          if ( v84 > v85 )
          {
            if ( 0x3FFFFFFF - (v85 >> 1) >= v85 )
              v86 = (v85 >> 1) + v85;
            else
              v86 = 0;
            if ( v86 < v84 )
              v86 = v84;
            std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v49, v86);
            v71 = i;
          }
        }
        v87 = v49->_Mylast;
        if ( v87 )
          *v87 = v71;
      }
      else
      {
        v74 = v49->_Myend;
        v75 = ((char *)&i - (char *)v73) >> 2;
        k = ((char *)&i - (char *)v73) >> 2;
        if ( (CBaseObject **)v72 == v74 )
        {
          v76 = (signed int)(v72 - (_DWORD)v73) >> 2;
          if ( v76 > 0x3FFFFFFE )
LABEL_120:
            std::_Xlength_error("vector<T> too long");
          v77 = v76 + 1;
          v78 = v74 - v73;
          if ( v77 > v78 )
          {
            if ( 0x3FFFFFFF - (v78 >> 1) >= v78 )
              v79 = (v78 >> 1) + v78;
            else
              v79 = 0;
            if ( v79 < v77 )
              v79 = v77;
            std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v49, v79);
            v75 = k;
          }
        }
        v80 = &v49->_Myfirst[v75];
        v81 = v49->_Mylast;
        if ( v81 )
          *v81 = *v80;
      }
      ++v49->_Mylast;
    }
    v88 = (int)v205;
    v89 = (int)v205->vfptr[18].__vecDelDtor((NiRefObject *)v205, (unsigned int)"Object03");
    i = v89;
    if ( v89 )
    {
      v90 = (unsigned int)v70->_Mylast;
      if ( (unsigned int)&i >= v90 || (v91 = v70->_Myfirst, v70->_Myfirst > (CBaseObject **)&i) )
      {
        v100 = v70->_Myend;
        if ( (CBaseObject **)v90 == v100 )
        {
          v101 = (signed int)(v90 - (unsigned int)v70->_Myfirst) >> 2;
          if ( v101 > 0x3FFFFFFE )
            std::_Xlength_error("vector<T> too long");
          v102 = v101 + 1;
          v103 = v100 - v70->_Myfirst;
          if ( v102 > v103 )
          {
            if ( 0x3FFFFFFF - (v103 >> 1) >= v103 )
              v104 = (v103 >> 1) + v103;
            else
              v104 = 0;
            if ( v104 < v102 )
              v104 = v102;
            std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v70, v104);
            v88 = (int)v205;
          }
        }
        v105 = v70->_Mylast;
        if ( v105 )
          *v105 = v89;
      }
      else
      {
        v92 = v70->_Myend;
        v93 = ((char *)&i - (char *)v91) >> 2;
        if ( (CBaseObject **)v90 == v92 )
        {
          v94 = (signed int)(v90 - (_DWORD)v91) >> 2;
          if ( v94 > 0x3FFFFFFE )
            std::_Xlength_error("vector<T> too long");
          v95 = v94 + 1;
          v96 = v92 - v91;
          if ( v95 > v96 )
          {
            if ( 0x3FFFFFFF - (v96 >> 1) >= v96 )
              v97 = (v96 >> 1) + v96;
            else
              v97 = 0;
            if ( v97 < v95 )
              v97 = v95;
            std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v70, v97);
            v88 = (int)v205;
          }
        }
        v98 = v70->_Mylast;
        v99 = &v70->_Myfirst[v93];
        if ( v98 )
          *v98 = *v99;
      }
      ++v70->_Mylast;
    }
    v106 = (*(int (__thiscall **)(int, const char *))(*(_DWORD *)v88 + 72))(v88, "Object04");
    i = v106;
    if ( v106 )
    {
      v107 = (unsigned int)v70->_Mylast;
      if ( (unsigned int)&i >= v107 || (v108 = v70->_Myfirst, v70->_Myfirst > (CBaseObject **)&i) )
      {
        v117 = v70->_Myend;
        if ( (CBaseObject **)v107 == v117 )
        {
          v118 = (signed int)(v107 - (unsigned int)v70->_Myfirst) >> 2;
          if ( v118 > 0x3FFFFFFE )
            std::_Xlength_error("vector<T> too long");
          v119 = v118 + 1;
          v120 = v117 - v70->_Myfirst;
          if ( v119 > v120 )
          {
            if ( 0x3FFFFFFF - (v120 >> 1) >= v120 )
              v121 = (v120 >> 1) + v120;
            else
              v121 = 0;
            if ( v121 < v119 )
              v121 = v119;
            std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v70, v121);
            v88 = (int)v205;
          }
        }
        v122 = v70->_Mylast;
        if ( v122 )
          *v122 = v106;
      }
      else
      {
        v109 = v70->_Myend;
        v110 = ((char *)&i - (char *)v108) >> 2;
        if ( (CBaseObject **)v107 == v109 )
        {
          v111 = (signed int)(v107 - (_DWORD)v108) >> 2;
          if ( v111 > 0x3FFFFFFE )
            std::_Xlength_error("vector<T> too long");
          v112 = v111 + 1;
          v113 = v109 - v108;
          if ( v112 > v113 )
          {
            if ( 0x3FFFFFFF - (v113 >> 1) >= v113 )
              v114 = (v113 >> 1) + v113;
            else
              v114 = 0;
            if ( v114 < v112 )
              v114 = v112;
            std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v70, v114);
            v88 = (int)v205;
          }
        }
        v115 = v70->_Mylast;
        v116 = &v70->_Myfirst[v110];
        if ( v115 )
          *v115 = *v116;
      }
      ++v70->_Mylast;
    }
    v123 = (*(int (__thiscall **)(int, const char *))(*(_DWORD *)v88 + 72))(v88, "Object07");
    i = v123;
    if ( v123 )
    {
      v124 = (unsigned int)v70->_Mylast;
      if ( (unsigned int)&i >= v124 || (v125 = v70->_Myfirst, v70->_Myfirst > (CBaseObject **)&i) )
      {
        v134 = v70->_Myend;
        if ( (CBaseObject **)v124 == v134 )
        {
          v135 = (signed int)(v124 - (unsigned int)v70->_Myfirst) >> 2;
          if ( v135 > 0x3FFFFFFE )
            std::_Xlength_error("vector<T> too long");
          v136 = v135 + 1;
          v137 = v134 - v70->_Myfirst;
          if ( v136 > v137 )
          {
            if ( 0x3FFFFFFF - (v137 >> 1) >= v137 )
              v138 = (v137 >> 1) + v137;
            else
              v138 = 0;
            if ( v138 < v136 )
              v138 = v136;
            std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v70, v138);
            v88 = (int)v205;
          }
        }
        v139 = v70->_Mylast;
        if ( v139 )
          *v139 = v123;
      }
      else
      {
        v126 = v70->_Myend;
        v127 = ((char *)&i - (char *)v125) >> 2;
        if ( (CBaseObject **)v124 == v126 )
        {
          v128 = (signed int)(v124 - (_DWORD)v125) >> 2;
          if ( v128 > 0x3FFFFFFE )
            std::_Xlength_error("vector<T> too long");
          v129 = v128 + 1;
          v130 = v126 - v125;
          if ( v129 > v130 )
          {
            if ( 0x3FFFFFFF - (v130 >> 1) >= v130 )
              v131 = (v130 >> 1) + v130;
            else
              v131 = 0;
            if ( v131 < v129 )
              v131 = v129;
            std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v70, v131);
            v88 = (int)v205;
          }
        }
        v132 = v70->_Mylast;
        v133 = &v70->_Myfirst[v127];
        if ( v132 )
          *v132 = *v133;
      }
      ++v70->_Mylast;
    }
    v140 = (*(int (__thiscall **)(_DWORD, const char *))(*(_DWORD *)v88 + 72))(v88, "Loft01");
    i = v140;
    if ( v140 )
    {
      v141 = (unsigned int)v70->_Mylast;
      if ( (unsigned int)&i >= v141 || (v142 = v70->_Myfirst, v70->_Myfirst > (CBaseObject **)&i) )
      {
        v151 = v70->_Myend;
        if ( (CBaseObject **)v141 == v151 )
        {
          v152 = (signed int)(v141 - (unsigned int)v70->_Myfirst) >> 2;
          if ( v152 > 0x3FFFFFFE )
            std::_Xlength_error("vector<T> too long");
          v153 = v152 + 1;
          v154 = v151 - v70->_Myfirst;
          if ( v153 > v154 )
          {
            if ( 0x3FFFFFFF - (v154 >> 1) >= v154 )
              v155 = (v154 >> 1) + v154;
            else
              v155 = 0;
            if ( v155 < v153 )
              v155 = v153;
            std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v70, v155);
            v88 = (int)v205;
          }
        }
        v156 = v70->_Mylast;
        if ( v156 )
          *v156 = v140;
      }
      else
      {
        v143 = v70->_Myend;
        v144 = ((char *)&i - (char *)v142) >> 2;
        if ( (CBaseObject **)v141 == v143 )
        {
          v145 = (signed int)(v141 - (_DWORD)v142) >> 2;
          if ( v145 > 0x3FFFFFFE )
            std::_Xlength_error("vector<T> too long");
          v146 = v145 + 1;
          v147 = v143 - v142;
          if ( v146 > v147 )
          {
            if ( 0x3FFFFFFF - (v147 >> 1) >= v147 )
              v148 = (v147 >> 1) + v147;
            else
              v148 = 0;
            if ( v148 < v146 )
              v148 = v146;
            std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v70, v148);
            v88 = (int)v205;
          }
        }
        v149 = v70->_Mylast;
        v150 = &v70->_Myfirst[v144];
        if ( v149 )
          *v149 = *v150;
      }
      ++v70->_Mylast;
    }
    v157 = (*(int (__thiscall **)(_DWORD, const char *))(*(_DWORD *)v88 + 72))(v88, "Cylinder25");
    i = v157;
    if ( v157 )
    {
      v158 = (unsigned int)v70->_Mylast;
      if ( (unsigned int)&i >= v158 || (v159 = v70->_Myfirst, v70->_Myfirst > (CBaseObject **)&i) )
      {
        v168 = v70->_Myend;
        if ( (CBaseObject **)v158 == v168 )
        {
          v169 = (signed int)(v158 - (unsigned int)v70->_Myfirst) >> 2;
          if ( v169 > 0x3FFFFFFE )
            std::_Xlength_error("vector<T> too long");
          v170 = v169 + 1;
          v171 = v168 - v70->_Myfirst;
          if ( v170 > v171 )
          {
            if ( 0x3FFFFFFF - (v171 >> 1) >= v171 )
              v172 = (v171 >> 1) + v171;
            else
              v172 = 0;
            if ( v172 < v170 )
              v172 = v170;
            std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v70, v172);
            v88 = (int)v205;
          }
        }
        v173 = v70->_Mylast;
        if ( v173 )
          *v173 = v157;
      }
      else
      {
        v160 = v70->_Myend;
        v161 = ((char *)&i - (char *)v159) >> 2;
        if ( (CBaseObject **)v158 == v160 )
        {
          v162 = (signed int)(v158 - (_DWORD)v159) >> 2;
          if ( v162 > 0x3FFFFFFE )
            std::_Xlength_error("vector<T> too long");
          v163 = v162 + 1;
          v164 = v160 - v159;
          if ( v163 > v164 )
          {
            if ( 0x3FFFFFFF - (v164 >> 1) >= v164 )
              v165 = (v164 >> 1) + v164;
            else
              v165 = 0;
            if ( v165 < v163 )
              v165 = v163;
            std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v70, v165);
            v88 = (int)v205;
          }
        }
        v166 = v70->_Mylast;
        v167 = &v70->_Myfirst[v161];
        if ( v166 )
          *v166 = *v167;
      }
      ++v70->_Mylast;
    }
    ((void (__stdcall *)(NiNode *, _DWORD))v203->m_spCharScene.m_pObject->vfptr[29].__vecDelDtor)(
      v203->m_spShadowScene.m_pObject,
      0);
    v174 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v174
      && ((v175 = GameFrameWork::GetDisplyAspect(v174, PgWin::ms_uiScreenWidth, PgWin::ms_uiScreenHeight), v175 == 1)
       || (unsigned int)v175 > 2 && (unsigned int)v175 <= 4) )
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      v183 = 0;
      do
      {
        v184 = *(&Folder::m_acMenu + v183);
        *(&Folder::m_acMerge + v183++) = v184;
      }
      while ( v184 );
      v185 = &Folder::m_acMerge - 1;
      do
        v186 = (v185++)[1];
      while ( v186 );
      qmemcpy(v185, "\\CharSelect\\SelectCam_16_9.nif", 0x1Fu);
      v187 = PgUtil::LoadNifFile(&Folder::m_acMerge, 0);
      if ( (NiNode *)v88 != v187 )
      {
        v181 = InterlockedDecrement;
        if ( !InterlockedDecrement(lpAddend) )
          ((void (__stdcall *)(signed int))v205->vfptr->__vecDelDtor)(1);
        v182 = v187;
        spNode.m_pObject = v187;
        if ( !v187 )
        {
LABEL_309:
          LOBYTE(v209) = 6;
          if ( v182 && !v181((volatile LONG *)&v182->m_uiRefCount) )
            v182->vfptr->__vecDelDtor((NiRefObject *)v182, 1u);
          LOBYTE(v209) = 2;
          if ( !v181((volatile LONG *)(v201 + 4)) )
            (**(void (__thiscall ***)(_DWORD, _DWORD))v201)(v201, 1);
          v209 = -1;
          if ( !v181((volatile LONG *)&spkAlphaProp.m_pObject->m_uiRefCount) )
            spkAlphaProp.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spkAlphaProp.m_pObject, 1u);
          return 0;
        }
        lpAddend = (volatile LONG *)&v187->m_uiRefCount;
        InterlockedIncrement((volatile LONG *)&v187->m_uiRefCount);
LABEL_318:
        if ( PgUtil::CatchCamera((NiAVObject *)&v182->vfptr, &pkCamera) )
        {
          v190 = v203->m_spCamera.m_pObject;
          k = (unsigned int)pkCamera;
          if ( v190 != pkCamera )
          {
            if ( v190 && !v181((volatile LONG *)&v190->m_uiRefCount) && v190 )
              v190->vfptr->__vecDelDtor((NiRefObject *)v190, 1u);
            v191 = k;
            v203->m_spCamera.m_pObject = (NiCamera *)k;
            if ( v191 )
              InterlockedIncrement((volatile LONG *)(v191 + 4));
          }
          v192 = (int)v203;
          ((void (__stdcall *)(_DWORD, _DWORD))v203->m_spBackgroundScene.m_pObject->vfptr[29].__vecDelDtor)(v182, 0);
          NiAVObject::UpdateProperties(*(NiAVObject **)(v192 + 280));
          NiAVObject::UpdateEffects(*(NiAVObject **)(v192 + 280));
          NiAVObject::Update(*(NiAVObject **)(v192 + 280), 0.0, 1);
          LOBYTE(v209) = 6;
          if ( !v181(lpAddend) )
            v182->vfptr->__vecDelDtor((NiRefObject *)v182, 1u);
          v193 = (void (__thiscall ***)(_DWORD, _DWORD))v201;
          LOBYTE(v209) = 2;
          if ( !v181((volatile LONG *)(v201 + 4)) )
            (**v193)(v193, 1);
          v194 = spkAlphaProp.m_pObject;
          v209 = -1;
          if ( !v181((volatile LONG *)&spkAlphaProp.m_pObject->m_uiRefCount) )
            v194->vfptr->__vecDelDtor((NiRefObject *)v194, 1u);
          result = 1;
        }
        else
        {
          LOBYTE(v209) = 6;
          if ( !v181(lpAddend) )
            v182->vfptr->__vecDelDtor((NiRefObject *)v182, 1u);
          v188 = (void (__thiscall ***)(_DWORD, _DWORD))v201;
          LOBYTE(v209) = 2;
          if ( !v181((volatile LONG *)(v201 + 4)) )
            (**v188)(v188, 1);
          v189 = spkAlphaProp.m_pObject;
          v209 = -1;
          if ( !v181((volatile LONG *)&spkAlphaProp.m_pObject->m_uiRefCount) )
            v189->vfptr->__vecDelDtor((NiRefObject *)v189, 1u);
          result = 0;
        }
        return result;
      }
    }
    else
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      v176 = 0;
      do
      {
        v177 = *(&Folder::m_acMenu + v176);
        *(&Folder::m_acMerge + v176++) = v177;
      }
      while ( v177 );
      v178 = &Folder::m_acMerge - 1;
      do
        v179 = (v178++)[1];
      while ( v179 );
      qmemcpy(v178, "\\CharSelect\\SelectCam_4_3.nif", 0x1Eu);
      v180 = PgUtil::LoadNifFile(&Folder::m_acMerge, 0);
      if ( (NiNode *)v88 != v180 )
      {
        v181 = InterlockedDecrement;
        if ( !InterlockedDecrement(lpAddend) )
          ((void (__stdcall *)(signed int))v205->vfptr->__vecDelDtor)(1);
        v182 = v180;
        spNode.m_pObject = v180;
        if ( v180 )
        {
          lpAddend = (volatile LONG *)&v180->m_uiRefCount;
          InterlockedIncrement((volatile LONG *)&v180->m_uiRefCount);
          goto LABEL_318;
        }
        goto LABEL_309;
      }
    }
    v182 = spNode.m_pObject;
    v181 = InterlockedDecrement;
    goto LABEL_318;
  }
  LOBYTE(v209) = 2;
  if ( !InterlockedDecrement((volatile LONG *)(v201 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v201)(v201, 1);
  v209 = -1;
  if ( !InterlockedDecrement((volatile LONG *)(v11 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v11)(v11, 1);
  return 0;
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);
// 9704EC: using guessed type int (__thiscall *NiFogProperty::`vftable')(void *p, char);
// A7D11C: using guessed type const struct NiColor NiColor::WHITE;
// A8975C: using guessed type bool Folder::m_bInit;
// B6243C: using guessed type const struct NiColor NiColor::BLACK;

//----- (0040EEA0) --------------------------------------------------------
void __thiscall CharSelectFrameWork::ReleaseShadow(CharSelectFrameWork *this)
{
  CharSelectFrameWork *v1; // esi@1
  char *v2; // ecx@1
  char *v3; // edi@1
  char *v4; // ecx@3
  char *v5; // edi@3
  int v6; // edi@5
  NiTListItem<NiPointer<Shadow> > **v7; // esi@5
  NiTListItem<NiPointer<Shadow> > **v8; // ST08_4@6

  v1 = this;
  v2 = (char *)this->m_vecBGObjectNode._Mylast;
  v3 = (char *)v1->m_vecBGObjectNode._Myfirst;
  if ( v3 != v2 )
  {
    memmove(v3, v2, 0);
    v1->m_vecBGObjectNode._Mylast = (NiNode **)v3;
  }
  v4 = (char *)v1->m_vecShadowObject._Mylast;
  v5 = (char *)v1->m_vecShadowObject._Myfirst;
  if ( v5 != v4 )
  {
    memmove(v5, v4, 0);
    v1->m_vecShadowObject._Mylast = (NiNode **)v5;
  }
  v6 = (int)&v1->m_kShadowList;
  v7 = &v1->m_kShadowList.m_pkHead->m_pkNext;
  while ( v7 )
  {
    v8 = v7;
    v7 = (NiTListItem<NiPointer<Shadow> > **)*v7;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v6 + 8))(v6, v8);
  }
  *(_DWORD *)(v6 + 12) = 0;
  *(_DWORD *)(v6 + 4) = 0;
  *(_DWORD *)(v6 + 8) = 0;
}

//----- (0040EF40) --------------------------------------------------------
char __thiscall CharSelectFrameWork::Init(CharSelectFrameWork *this, PgMsg::Frame *ptFrameMsg)
{
  CharSelectFrameWork *v2; // esi@1
  char result; // al@2
  NiAudioSource *(__thiscall *v4)(SoundGroup *, SoundIndex *, bool, bool); // eax@9
  char *v5; // eax@11
  const char *v6; // ST08_4@11
  CDataDocument *v7; // eax@11
  char v8; // [sp+4h] [bp-8h]@9
  const char *v9; // [sp+8h] [bp-4h]@9

  v2 = this;
  if ( CharSelectFrameWork::InitWindow(this)
    && CharSelectFrameWork::InitBackgroundScene(v2)
    && CharSelectFrameWork::InitAvatar(v2)
    && CharSelectFrameWork::InitNet(v2)
    && CharSelectFrameWork::InitShadow(v2) )
  {
    if ( !CharSelectFrameWork::ms_bFirstRun )
    {
      if ( g_kSoundMgr.m_pkNPCVoiceGroup )
      {
        v4 = g_kSoundMgr.m_pkNPCVoiceGroup->vfptr->PlaySoundA;
        v9 = "s_title.wav";
        ((void (__stdcall *)(char *, _DWORD, _DWORD))v4)(&v8, 0, 0);
      }
      CharSelectFrameWork::ms_bFirstRun = 1;
    }
    World::Clear(&g_kWorld);
    Inventory::Clear(&g_kInventory);
    World::SetMapName(&g_kWorld, "-");
    v2->m_iEraseSlot = -1;
    v2->m_bDuringLogin = 0;
    v2->m_bInit = 1;
    v5 = Folder::Menu();
    v6 = Folder::Merge(v5, "\\charselect\\charselect.conf");
    v7 = CDataDocument::Instance();
    CDataDocument::Load(v7, v6);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A886D6: using guessed type bool CharSelectFrameWork::ms_bFirstRun;

//----- (0040F020) --------------------------------------------------------
void __thiscall CharSelectFrameWork::Terminate(CharSelectFrameWork *this)
{
  CharSelectFrameWork *v1; // esi@1
  Net *v2; // edi@1

  v1 = this;
  CharSelectFrameWork::ReleaseShadow(this);
  v2 = v1->m_spWorldMgrNet.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spWorldMgrNet.m_pObject = 0;
  }
  CharSelectFrameWork::TerminateAvatar(v1);
  CharSelectFrameWork::TerminateBackgroundScene(v1);
  CharSelectFrameWork::TerminateWindow(v1);
  v1->m_bInit = 0;
  v1->m_BackFrameID = 0;
}

//----- (0040F080) --------------------------------------------------------
NiRTTI *CharSelectFrameWork::GetRTTI()
{
  return &CharSelectFrameWork::m_RTTI;
}

//----- (0040F090) --------------------------------------------------------
const char *CharSelectFrameWork::GetFrameWorkName()
{
  return CharSelectFrameWork::m_RTTI.m_pcName;
}

//----- (0040F0A0) --------------------------------------------------------
CharSelectFrameWork *__thiscall CharSelectFrameWork::`scalar deleting destructor'(CharSelectFrameWork *this, unsigned int a2)
{
  CharSelectFrameWork *v2; // esi@1

  v2 = this;
  CharSelectFrameWork::~CharSelectFrameWork(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0040F0D0) --------------------------------------------------------
void __thiscall CharSelectMenuWin::EnableOKBut(CharSelectMenuWin *this, int b)
{
  CharSelectMenuWin *v2; // esi@1

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkOkBut->vfptr[60].__vecDelDtor)(b);
  ((void (__stdcall *)(_DWORD))v2->m_pkDelCharBtn->vfptr[60].__vecDelDtor)(b);
}

//----- (0040F110) --------------------------------------------------------
bool __usercall IsSpecialChar_0@<al>(char c1@<bl>, char c2)
{
  int v2; // eax@2
  bool result; // al@4

  result = 0;
  if ( IsDBCSLeadByte(c1) )
  {
    v2 = 94 * (unsigned __int8)c1 + (unsigned __int8)c2 - 16705;
    if ( v2 < 0 || v2 >= 2350 )
      result = 1;
  }
  return result;
}

//----- (0040F150) --------------------------------------------------------
char __usercall IsSpecialCharInStr_0@<al>(char *pstr@<eax>)
{
  char *v1; // esi@1
  char v3; // al@3
  char v4; // bl@5
  BYTE c1; // [sp+4h] [bp-4h]@4

  v1 = pstr;
  if ( !pstr )
    return 0;
  v3 = *pstr;
  if ( !v3 )
    return 0;
  while ( 1 )
  {
    c1 = v3;
    if ( !IsDBCSLeadByte(v3) )
    {
      ++v1;
      goto LABEL_9;
    }
    v4 = v1[1];
    if ( IsDBCSLeadByte(c1) )
    {
      if ( 94 * (unsigned __int8)c1 + (unsigned int)(unsigned __int8)v4 - 16705 > 0x92D )
        return 1;
    }
    v1 += 2;
LABEL_9:
    v3 = *v1;
    if ( !*v1 )
      return 0;
  }
}

//----- (0040F1D0) --------------------------------------------------------
char __thiscall IsSpecialCharInStr2_0(char *pstr)
{
  char *v1; // esi@1
  signed int v2; // kr00_4@1
  int v3; // esi@1
  char v4; // al@4
  char temp[128]; // [sp+Ch] [bp-84h]@1

  v1 = pstr;
  memset(temp, 0, 0x64u);
  strncpy(temp, v1, 0x5Au);
  v2 = strlen(temp);
  v3 = 0;
  if ( v2 <= 0 )
    return 0;
  while ( IsDBCSLeadByte(temp[v3]) )
  {
    ++v3;
LABEL_32:
    if ( ++v3 >= v2 )
      return 0;
  }
  v4 = temp[v3];
  if ( v4 != 32
    && v4 != 39
    && v4 != 92
    && v4 != 47
    && v4 != 58
    && v4 != 42
    && v4 != 63
    && v4 != 60
    && v4 != 62
    && v4 != 124
    && v4 != 126
    && v4 != 33
    && v4 != 64
    && v4 != 37
    && v4 != 38
    && v4 != 59
    && v4 != 46
    && v4 != 44
    && v4 != 34
    && v4 != 96
    && v4 != 40
    && v4 != 41
    && v4 != 43
    && v4 != 45
    && v4 != 35
    && v4 != 36
    && v4 != 91
    && v4 != 93 )
  {
    goto LABEL_32;
  }
  return 1;
}

//----- (0040F300) --------------------------------------------------------
char __usercall IsPeculiarStr_0@<al>(char *pcName@<esi>)
{
  unsigned int v1; // edx@1
  char v2; // bl@1
  unsigned int v3; // ecx@1
  char v4; // al@2
  char result; // al@12

  v1 = strlen(pcName);
  v2 = 0;
  v3 = 0;
  if ( !v1 )
    goto LABEL_16;
  do
  {
    v4 = pcName[v3];
    if ( (v4 < 65 || v4 > 90) && (v4 < 97 || v4 > 122) && (v4 < 48 || v4 > 57) && v4 != 95 )
      v2 = 1;
    ++v3;
  }
  while ( v3 < v1 );
  if ( v2 )
    result = 1;
  else
LABEL_16:
    result = 0;
  return result;
}

//----- (0040F360) --------------------------------------------------------
void __thiscall ChangeNameWin::OnClose(ChangeNameWin *this)
{
  ChangeNameWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkInputEdit->vfptr[121].__vecDelDtor)(1);
  PgWin::OnClose((PgWin *)&v1->vfptr);
}

//----- (0040F390) --------------------------------------------------------
void __thiscall ChangeNameWin::SetNameEdit(ChangeNameWin *this, const char *name)
{
  ChangeNameWin *v2; // esi@1

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkInputEdit->vfptr[116].__vecDelDtor)(name);
  ((void (*)(void))v2->m_pkInputEdit->vfptr[120].__vecDelDtor)();
}

//----- (0040F3C0) --------------------------------------------------------
void __thiscall CharSelectFrameWork::OnCharEraseFailMsgClose(CharSelectFrameWork *this)
{
  CharSelectFrameWork *v1; // esi@1

  v1 = this;
  NetMgr::CloseAll(&g_kNetMgr);
  PgFrameWork::PostFrameMsgChange((PgFrameWork *)&v1->vfptr, AccountFrameWorkID, 0);
}

//----- (0040F3E0) --------------------------------------------------------
void __thiscall CharSelectFrameWork::OnCharLoginFailMsgClose(CharSelectFrameWork *this)
{
  CharSelectFrameWork *v1; // esi@1

  v1 = this;
  NetMgr::CloseAll(&g_kNetMgr);
  PgFrameWork::PostFrameMsgChange((PgFrameWork *)&v1->vfptr, AccountFrameWorkID, 0);
}

//----- (0040F400) --------------------------------------------------------
void __thiscall CharSelectFrameWork::OnZoneConnectFailMsgClose(CharSelectFrameWork *this)
{
  CharSelectFrameWork *v1; // esi@1

  v1 = this;
  NetMgr::CloseAll(&g_kNetMgr);
  PgFrameWork::PostFrameMsgChange((PgFrameWork *)&v1->vfptr, AccountFrameWorkID, 0);
}

//----- (0040F420) --------------------------------------------------------
void __thiscall CharSelectFrameWork::OnZoneLoginFailMsgClose(CharSelectFrameWork *this)
{
  this->m_iEraseSlot = -1;
  this->m_bDuringLogin = 0;
  ((void (__stdcall *)(_DWORD))this->m_pkCharSelectMenuWin->vfptr[63].__vecDelDtor)(1);
}

//----- (0040F450) --------------------------------------------------------
void __thiscall CharSelectFrameWork::OnZoneLoginComplete(CharSelectFrameWork *this)
{
  CharSelectFrameWork *v1; // esi@1

  v1 = this;
  CharResMgr::RemoveAllCharActor(&g_kCharResMgr);
  CharResMgr::Init(&g_kCharResMgr);
  PgFrameWork::PostFrameMsgChange((PgFrameWork *)&v1->vfptr, LoadingFrameWorkID, 0);
}

//----- (0040F480) --------------------------------------------------------
void __thiscall CharSelectFrameWork::OnEraseMsgOk(CharSelectFrameWork *this)
{
  CharSelectFrameWork *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkCharSelectMenuWin->vfptr[63].__vecDelDtor)(0);
  CharSelectFrameWork::NcAvatarEraseReq(v1);
  v1->m_bDelAvaActivityMsgCheck = 0;
}

//----- (0040F4B0) --------------------------------------------------------
void __thiscall CharSelectFrameWork::OnEraseMsgCancel(CharSelectFrameWork *this)
{
  this->m_bDelAvaActivityMsgCheck = 0;
  this->m_iEraseSlot = -1;
  ((void (__stdcall *)(_DWORD))this->m_pkCharSelectMenuWin->vfptr[63].__vecDelDtor)(1);
}

//----- (0040F4E0) --------------------------------------------------------
void __thiscall CharSelectFrameWork::OnErrorGotoAccount(CharSelectFrameWork *this)
{
  PgFrameWork::PostFrameMsgChange((PgFrameWork *)&this->vfptr, AccountFrameWorkID, 0);
}

//----- (0040F4F0) --------------------------------------------------------
void CharSelectFrameWork::OnErrorGotoExit()
{
  NetMgr::SendUserLogOutMsg2AllServer(&g_kNetMgr);
  PgFrameMgr::PostQuitMsg(&Pgg_kFrameMgr, 0);
}

//----- (0040F510) --------------------------------------------------------
void __thiscall CharSelectFrameWork::OnTutorialPopupMsg(CharSelectFrameWork *this, bool bIsSkip)
{
  CharSelectFrameWork::NcCharTutorialPopupAck(this, bIsSkip);
}

//----- (0040F520) --------------------------------------------------------
void __thiscall ChangeNameWin::~ChangeNameWin(ChangeNameWin *this)
{
  ChangeNameWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ChangeNameWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ChangeNameWin::`vftable'{for `IDirectMessenger'};
  this->m_pkInputEdit = 0;
  `eh vector destructor iterator'(
    this->m_apkTextWin,
    4u,
    2,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 97109C: using guessed type void (__thiscall *ChangeNameWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9710BC: using guessed type int (__thiscall *ChangeNameWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0040F5A0) --------------------------------------------------------
void __thiscall ChangeNameWin::OnShowWin(ChangeNameWin *this)
{
  ((void (__stdcall *)(_DWORD))this->m_apkTextWin[0].m_pObject->vfptr[118].__vecDelDtor)(&unk_970FDB);
}

//----- (0040F5C0) --------------------------------------------------------
char __stdcall ChangeNameWin::FindCharSlot(char *pcName)
{
  int v2; // edi@2
  PROTO_AVATARINFORMATION *v3; // eax@3
  PROTO_AVATARINFORMATION *v4; // esi@3
  unsigned int v5; // ecx@4
  unsigned int v6; // edx@4
  unsigned int v7; // eax@4
  unsigned int v8; // ecx@4
  char result; // al@7
  char Name[21]; // [sp+Ch] [bp-1Ch]@4

  if ( pcName )
  {
    v2 = 0;
    while ( 1 )
    {
      v3 = User::GetAvatarInfo(&g_kUser, v2);
      v4 = v3;
      if ( v3 )
      {
        v5 = v3->name.n5_code[1];
        v6 = v3->name.n5_code[2];
        *(_DWORD *)Name = v3->name.n5_code[0];
        v7 = v3->name.n5_code[3];
        *(_DWORD *)&Name[4] = v5;
        v8 = v4->name.n5_code[4];
        *(_DWORD *)&Name[8] = v6;
        *(_DWORD *)&Name[12] = v7;
        *(_DWORD *)&Name[16] = v8;
        Name[20] = 0;
        if ( !Name[0] )
          goto LABEL_7;
        if ( !_strcmpi(pcName, Name) )
          break;
      }
      if ( ++v2 >= 6 )
        goto LABEL_7;
    }
    result = v4->slot;
  }
  else
  {
LABEL_7:
    result = -1;
  }
  return result;
}

//----- (0040F660) --------------------------------------------------------
void __thiscall ChangeNameWin::Open(ChangeNameWin *this, PgWin *pkRevWin, unsigned int uiOkMsg, unsigned int uiMax, char *pcText)
{
  ChangeNameWin *v5; // esi@1
  NiRefObjectVtbl *v6; // edi@1
  unsigned int v7; // eax@1
  NiRefObjectVtbl *v8; // edi@1
  unsigned int v9; // eax@1

  v5 = this;
  ((void (__stdcall *)(_DWORD))this->m_apkTextWin[0].m_pObject->vfptr[118].__vecDelDtor)(pcText);
  v5->m_uiOkMsg = uiOkMsg;
  PgWinMgr::DoModal(&Pgg_kWinMgr, (PgWin *)&v5->vfptr, 0, 0, 0);
  v6 = v5->vfptr;
  v7 = ((int (__thiscall *)(_DWORD))v5->vfptr[36].__vecDelDtor)(v5);
  v6[43].__vecDelDtor((NiRefObject *)v5, PgWin::ms_iMsX - (v7 >> 1));
  v8 = v5->vfptr;
  v9 = ((int (__thiscall *)(_DWORD))v5->vfptr[37].__vecDelDtor)(v5);
  v8[44].__vecDelDtor((NiRefObject *)v5, PgWin::ms_iMsY - (v9 >> 1));
}

//----- (0040F6E0) --------------------------------------------------------
char __usercall SearchSlot@<al>(NiAVObject *pkAVObject@<eax>)
{
  NiNode *v1; // esi@1
  const char *v2; // ecx@2
  char result; // al@11

  v1 = pkAVObject->m_pkParent;
  if ( v1 )
  {
    while ( 1 )
    {
      v2 = v1->m_pcName;
      if ( v2 )
      {
        if ( !strcmp("Avatar0", v1->m_pcName) )
          return 0;
        if ( !strcmp("Avatar1", v1->m_pcName) )
          return 1;
        if ( !strcmp("Avatar2", v1->m_pcName) )
          return 2;
        if ( !strcmp("Avatar3", v1->m_pcName) )
          return 3;
        if ( !strcmp("Avatar4", v1->m_pcName) )
          return 4;
        if ( !strcmp("Avatar5", v1->m_pcName) )
          return 5;
        if ( !strcmp("Avatar6", v2) )
          break;
      }
      v1 = v1->m_pkParent;
      if ( !v1 )
        goto LABEL_11;
    }
    result = 6;
  }
  else
  {
LABEL_11:
    result = -1;
  }
  return result;
}

//----- (0040F8A0) --------------------------------------------------------
void __stdcall CharSelectFrameWork::ActPos(Avatar *m_pActor, unsigned int ui_pos)
{
  char v3; // al@2

  switch ( Char::GetClass((Char *)&m_pActor->vfptr) )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      v3 = 1;
      break;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      v3 = 6;
      break;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      v3 = 11;
      break;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      v3 = 16;
      break;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      v3 = 21;
      break;
    case 0x1A:
    case 0x1B:
      v3 = 26;
      break;
    default:
      v3 = 0;
      break;
  }
  switch ( v3 )
  {
    case 1:
      if ( m_pActor->m_kCharShape.m_byGender )
      {
        switch ( ui_pos )
        {
          case 0u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)&unk_9A1D2A, 0, 0);
            break;
          case 1u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)10101010, 0, 0);
            break;
          case 2u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)&unk_9A24FA, 0, 0);
            break;
          case 3u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)&unk_9A28E2, 0, 0);
            break;
          case 4u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)10104010, 0, 0);
            break;
          case 5u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)&unk_9A30B2, 0, 0);
            break;
          case 6u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)&unk_9A349A, 0, 0);
            break;
          default:
            return;
        }
      }
      else
      {
        switch ( ui_pos )
        {
          case 0u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)&unk_9BA3CA, 0, 0);
            break;
          case 1u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)"", 0, 0);
            break;
          case 2u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)&unk_9BAB9A, 0, 0);
            break;
          case 3u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)&unk_9BAF82, 0, 0);
            break;
          case 4u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)&unk_9BB36A, 0, 0);
            break;
          case 5u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)&unk_9BB752, 0, 0);
            break;
          case 6u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)&unk_9BBB3A, 0, 0);
            break;
          default:
            return;
        }
      }
      break;
    case 6:
      if ( m_pActor->m_kCharShape.m_byGender )
      {
        switch ( ui_pos )
        {
          case 0u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)20100010, 0, 0);
            break;
          case 1u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)20101010, 0, 0);
            break;
          case 2u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)20102010, 0, 0);
            break;
          case 3u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)20103010, 0, 0);
            break;
          case 4u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)20104010, 0, 0);
            break;
          case 5u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)20105010, 0, 0);
            break;
          case 6u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)20106010, 0, 0);
            break;
          default:
            return;
        }
      }
      else
      {
        switch ( ui_pos )
        {
          case 0u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)20200010, 0, 0);
            break;
          case 1u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)20201010, 0, 0);
            break;
          case 2u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)20202010, 0, 0);
            break;
          case 3u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)20203010, 0, 0);
            break;
          case 4u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)20204010, 0, 0);
            break;
          case 5u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)20205010, 0, 0);
            break;
          case 6u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)20206010, 0, 0);
            break;
          default:
            return;
        }
      }
      break;
    case 0xB:
      if ( m_pActor->m_kCharShape.m_byGender )
      {
        switch ( ui_pos )
        {
          case 0u:
            goto $LN81_1;
          case 2u:
            goto $LN79;
          case 3u:
            goto $LN78;
          case 4u:
            goto $LN77;
          case 5u:
            goto $LN76;
          case 6u:
            goto $LN75_0;
          case 1u:
            goto $LN17;
          default:
            return;
        }
      }
      else
      {
        switch ( ui_pos )
        {
          case 0u:
            goto $LN71;
          case 2u:
            goto $LN69;
          case 3u:
            goto $LN68_0;
          case 4u:
            goto $LN67_0;
          case 5u:
            goto $LN66;
          case 1u:
            goto $LN7_2;
          case 6u:
            goto $LN2_4;
          default:
            return;
        }
      }
      break;
    case 0x10:
      if ( m_pActor->m_kCharShape.m_byGender )
      {
        switch ( ui_pos )
        {
          case 0u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40100010, 0, 0);
            break;
          case 1u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40101010, 0, 0);
            break;
          case 2u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40102010, 0, 0);
            break;
          case 3u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40103010, 0, 0);
            break;
          case 4u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40104010, 0, 0);
            break;
          case 5u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40105010, 0, 0);
            break;
          case 6u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40106010, 0, 0);
            break;
          default:
            return;
        }
      }
      else
      {
        switch ( ui_pos )
        {
          case 0u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40200010, 0, 0);
            break;
          case 1u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40201010, 0, 0);
            break;
          case 2u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40202010, 0, 0);
            break;
          case 3u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40203010, 0, 0);
            break;
          case 4u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40204010, 0, 0);
            break;
          case 5u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40205010, 0, 0);
            break;
          case 6u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40206010, 0, 0);
            break;
          default:
            return;
        }
      }
      break;
    case 0x15:
      if ( m_pActor->m_kCharShape.m_byGender )
      {
        switch ( ui_pos )
        {
          case 0u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)50100010, 0, 0);
            break;
          case 1u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)50101010, 0, 0);
            break;
          case 2u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)50102010, 0, 0);
            break;
          case 3u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)50103010, 0, 0);
            break;
          case 4u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)50104010, 0, 0);
            break;
          case 5u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)50105010, 0, 0);
            break;
          case 6u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)50106010, 0, 0);
            break;
          default:
            return;
        }
      }
      else
      {
        switch ( ui_pos )
        {
          case 0u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)50200010, 0, 0);
            break;
          case 1u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)50201010, 0, 0);
            break;
          case 2u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)50202010, 0, 0);
            break;
          case 3u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)50203010, 0, 0);
            break;
          case 4u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)50204010, 0, 0);
            break;
          case 5u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)50205010, 0, 0);
            break;
          case 6u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)50206010, 0, 0);
            break;
          default:
            return;
        }
      }
      break;
    case 0x1A:
      if ( m_pActor->m_kCharShape.m_byGender )
      {
        switch ( ui_pos )
        {
          case 0u:
$LN81_1:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30100010, 0, 0);
            break;
          case 2u:
$LN79:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30102010, 0, 0);
            break;
          case 3u:
$LN78:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30103010, 0, 0);
            break;
          case 4u:
$LN77:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30104010, 0, 0);
            break;
          case 5u:
$LN76:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30105010, 0, 0);
            break;
          case 6u:
$LN75_0:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30106010, 0, 0);
            break;
          case 1u:
$LN17:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30101010, 0, 0);
            break;
          default:
            return;
        }
      }
      else
      {
        switch ( ui_pos )
        {
          case 0u:
$LN71:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30200010, 0, 0);
            break;
          case 2u:
$LN69:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30202010, 0, 0);
            break;
          case 3u:
$LN68_0:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30203010, 0, 0);
            break;
          case 4u:
$LN67_0:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30204010, 0, 0);
            break;
          case 5u:
$LN66:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30205010, 0, 0);
            break;
          case 1u:
$LN7_2:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30201010, 0, 0);
            break;
          case 6u:
$LN2_4:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30206010, 0, 0);
            break;
          default:
            return;
        }
      }
      break;
    default:
      return;
  }
}

//----- (00410320) --------------------------------------------------------
void __stdcall CharSelectFrameWork::ActActivePos(Avatar *m_pActor, unsigned int ui_pos)
{
  char v3; // al@2
  char *v4; // eax@12

  switch ( Char::GetClass((Char *)&m_pActor->vfptr) )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      v3 = 1;
      break;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      v3 = 6;
      break;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      v3 = 11;
      break;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      v3 = 16;
      break;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      v3 = 21;
      break;
    case 0x1A:
    case 0x1B:
      v3 = 26;
      break;
    default:
      v3 = 0;
      break;
  }
  switch ( v3 )
  {
    case 1:
      if ( m_pActor->m_kCharShape.m_byGender )
      {
        switch ( ui_pos )
        {
          case 0u:
            v4 = (char *)&off_9A1D34;
            goto LABEL_98;
          case 1u:
            v4 = "Plane01";
            goto LABEL_98;
          case 2u:
            v4 = (char *)&off_9A2504;
            goto LABEL_98;
          case 3u:
            v4 = (char *)&off_9A28EC;
            goto LABEL_98;
          case 4u:
            v4 = "ActSkClick";
            goto LABEL_98;
          case 5u:
            v4 = (char *)&off_9A30BC;
            goto LABEL_98;
          case 6u:
            v4 = (char *)off_9A34A4;
            goto LABEL_98;
          default:
            return;
        }
      }
      else
      {
        switch ( ui_pos )
        {
          case 0u:
            v4 = (char *)&MainChar::`vftable'{for `AbStateInfectee'};
            goto LABEL_98;
          case 1u:
            v4 = "";
            goto LABEL_98;
          case 2u:
            v4 = "%sgame\\MobPortrait\\CharInfo\\%s.png" + 8;
            goto LABEL_98;
          case 3u:
            v4 = (char *)off_9BAF8C;
            goto LABEL_98;
          case 4u:
            v4 = (char *)&ItemCostumeShield::`vftable';
            goto LABEL_98;
          case 5u:
            v4 = (char *)&off_9BB75C;
            goto LABEL_98;
          case 6u:
            v4 = (char *)&off_9BBB44;
            goto LABEL_98;
          default:
            return;
        }
      }
      break;
    case 6:
      if ( m_pActor->m_kCharShape.m_byGender )
      {
        switch ( ui_pos )
        {
          case 0u:
            v4 = (char *)20100020;
            goto LABEL_98;
          case 1u:
            v4 = (char *)20101020;
            goto LABEL_98;
          case 2u:
            v4 = (char *)20102020;
            goto LABEL_98;
          case 3u:
            v4 = (char *)20103020;
            goto LABEL_98;
          case 4u:
            v4 = (char *)20104020;
            goto LABEL_98;
          case 5u:
            v4 = (char *)20105020;
            goto LABEL_98;
          case 6u:
            v4 = (char *)20106020;
            goto LABEL_98;
          default:
            return;
        }
      }
      else
      {
        switch ( ui_pos )
        {
          case 0u:
            v4 = (char *)20200020;
            goto LABEL_98;
          case 1u:
            v4 = (char *)20201020;
            goto LABEL_98;
          case 2u:
            v4 = (char *)20202020;
            goto LABEL_98;
          case 3u:
            v4 = (char *)20203020;
            goto LABEL_98;
          case 4u:
            v4 = (char *)20204020;
            goto LABEL_98;
          case 5u:
            v4 = (char *)20205020;
            goto LABEL_98;
          case 6u:
            v4 = (char *)20206020;
            goto LABEL_98;
          default:
            return;
        }
      }
      break;
    case 0xB:
      if ( m_pActor->m_kCharShape.m_byGender )
      {
        switch ( ui_pos )
        {
          case 0u:
            goto $LN90_0;
          case 2u:
            goto $LN88_0;
          case 3u:
            goto $LN87_1;
          case 4u:
            goto $LN86_2;
          case 5u:
            goto $LN85_1;
          case 6u:
            goto $LN84_0;
          case 1u:
            goto $LN20;
          default:
            return;
        }
      }
      else
      {
        switch ( ui_pos )
        {
          case 0u:
            goto $LN79_0;
          case 2u:
            goto $LN77_0;
          case 3u:
            goto $LN76_0;
          case 4u:
            goto $LN75_1;
          case 5u:
            goto $LN74;
          case 1u:
            goto $LN9_0;
          case 6u:
            goto $LN4_4;
          default:
            return;
        }
      }
      break;
    case 0x10:
      if ( m_pActor->m_kCharShape.m_byGender )
      {
        switch ( ui_pos )
        {
          case 0u:
            v4 = (char *)40100020;
            goto LABEL_98;
          case 1u:
            v4 = (char *)40101020;
            goto LABEL_98;
          case 2u:
            v4 = (char *)40102020;
            goto LABEL_98;
          case 3u:
            v4 = (char *)40103020;
            goto LABEL_98;
          case 4u:
            v4 = (char *)40104020;
            goto LABEL_98;
          case 5u:
            v4 = (char *)40105020;
            goto LABEL_98;
          case 6u:
            v4 = (char *)40106020;
            goto LABEL_98;
          default:
            return;
        }
      }
      else
      {
        switch ( ui_pos )
        {
          case 0u:
            v4 = (char *)40200020;
            goto LABEL_98;
          case 1u:
            v4 = (char *)40201020;
            goto LABEL_98;
          case 2u:
            v4 = (char *)40202020;
            goto LABEL_98;
          case 3u:
            v4 = (char *)40203020;
            goto LABEL_98;
          case 4u:
            v4 = (char *)40204020;
            goto LABEL_98;
          case 5u:
            v4 = (char *)40205020;
            goto LABEL_98;
          case 6u:
            v4 = (char *)40206020;
            goto LABEL_98;
          default:
            return;
        }
      }
      break;
    case 0x15:
      if ( m_pActor->m_kCharShape.m_byGender )
      {
        switch ( ui_pos )
        {
          case 0u:
            v4 = (char *)50100020;
            goto LABEL_98;
          case 1u:
            v4 = (char *)50101020;
            goto LABEL_98;
          case 2u:
            v4 = (char *)50102020;
            goto LABEL_98;
          case 3u:
            v4 = (char *)50103020;
            goto LABEL_98;
          case 4u:
            v4 = (char *)50104020;
            goto LABEL_98;
          case 5u:
            v4 = (char *)50105020;
            goto LABEL_98;
          case 6u:
            v4 = (char *)50106020;
            goto LABEL_98;
          default:
            return;
        }
      }
      else
      {
        switch ( ui_pos )
        {
          case 0u:
            v4 = (char *)50200020;
            goto LABEL_98;
          case 1u:
            v4 = (char *)50201020;
            goto LABEL_98;
          case 2u:
            v4 = (char *)50202020;
            goto LABEL_98;
          case 3u:
            v4 = (char *)50203020;
            goto LABEL_98;
          case 4u:
            v4 = (char *)50204020;
            goto LABEL_98;
          case 5u:
            v4 = (char *)50205020;
            goto LABEL_98;
          case 6u:
            v4 = (char *)50206020;
            goto LABEL_98;
          default:
            return;
        }
      }
      break;
    case 0x1A:
      if ( m_pActor->m_kCharShape.m_byGender )
      {
        switch ( ui_pos )
        {
          case 0u:
$LN90_0:
            v4 = (char *)30100020;
            goto LABEL_98;
          case 2u:
$LN88_0:
            v4 = (char *)30102020;
            goto LABEL_98;
          case 3u:
$LN87_1:
            v4 = (char *)30103020;
            goto LABEL_98;
          case 4u:
$LN86_2:
            v4 = (char *)30104020;
            goto LABEL_98;
          case 5u:
$LN85_1:
            v4 = (char *)30105020;
            goto LABEL_98;
          case 6u:
$LN84_0:
            v4 = (char *)30106020;
            goto LABEL_98;
          case 1u:
$LN20:
            v4 = (char *)30101020;
            goto LABEL_98;
          default:
            return;
        }
      }
      else
      {
        switch ( ui_pos )
        {
          case 0u:
$LN79_0:
            v4 = (char *)30200020;
            goto LABEL_98;
          case 2u:
$LN77_0:
            v4 = (char *)30202020;
            goto LABEL_98;
          case 3u:
$LN76_0:
            v4 = (char *)30203020;
            goto LABEL_98;
          case 4u:
$LN75_1:
            v4 = (char *)30204020;
            goto LABEL_98;
          case 5u:
$LN74:
            v4 = (char *)30205020;
            goto LABEL_98;
          case 1u:
$LN9_0:
            v4 = (char *)30201020;
            goto LABEL_98;
          case 6u:
$LN4_4:
            v4 = (char *)30206020;
LABEL_98:
            CharSelectFrameWork::uiActiveCode = (unsigned int)v4;
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)v4, 0, 0);
            break;
          default:
            return;
        }
      }
      break;
    default:
      return;
  }
}
// 9A1D34: using guessed type void (__thiscall *off_9A1D34)(PgWinSpr *this, unsigned int uiHeight, bool bReverse);
// 9A2504: using guessed type int (__thiscall *off_9A2504)(NiNode *pkParent, NiPointer<NiAVObject> *result, unsigned int i, NiAVObject *pkChild);
// 9A28EC: using guessed type void (__thiscall *off_9A28EC)(PgWinFrame *this, int iMsgTag, void *pvBody, struct IDirectMessenger *);
// 9A30BC: using guessed type struct NiObject *(__thiscall *off_9A30BC)(NiNode *this, NiCloningProcess *kCloning);
// 9A34A4: using guessed type int (__stdcall *off_9A34A4[2])(int, NiD3DShaderConstantMapEntry *__formal, NsTextCodeV0_2 *_pNsTextCode_);
// 9BA3D4: using guessed type void (__thiscall *MainChar::`vftable'{for `AbStateInfectee'})(MainChar *this, AbStateInst *pkAbState, bool);
// 9BAF8C: using guessed type bool (__thiscall *off_9BAF8C[2])(NiD3DShader *__hidden this);
// 9BB374: using guessed type int (__thiscall *ItemCostumeShield::`vftable')(void *p, char);
// 9BB75C: using guessed type unsigned int (__thiscall *off_9BB75C)(Item *__hidden this);
// 9BBB44: using guessed type unsigned int (__thiscall *off_9BBB44)(ItemCollectCloseCard *__hidden this);

//----- (00410920) --------------------------------------------------------
void __stdcall CharSelectFrameWork::ActActiveEndPos(Avatar *m_pActor, unsigned int ui_pos)
{
  char v3; // al@2
  ABSTATEINDEX v4; // [sp-Ch] [bp-14h]@77

  switch ( Char::GetClass((Char *)&m_pActor->vfptr) )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      v3 = 1;
      break;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      v3 = 6;
      break;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      v3 = 11;
      break;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      v3 = 16;
      break;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      v3 = 21;
      break;
    case 0x1A:
    case 0x1B:
      v3 = 26;
      break;
    default:
      v3 = 0;
      break;
  }
  switch ( v3 )
  {
    case 1:
      if ( m_pActor->m_kCharShape.m_byGender )
      {
        switch ( ui_pos )
        {
          case 0u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)&unk_9A1D3E, 0, 0);
            break;
          case 1u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)10101030, 0, 0);
            break;
          case 2u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)&unk_9A250E, 0, 0);
            break;
          case 3u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)10103030, 0, 0);
            break;
          case 4u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)10104030, 0, 0);
            break;
          case 5u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)&unk_9A30C6, 0, 0);
            break;
          case 6u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)&unk_9A34AE, 0, 0);
            break;
          default:
            return;
        }
      }
      else
      {
        switch ( ui_pos )
        {
          case 0u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)&unk_9BA3DE, 0, 0);
            break;
          case 1u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)&off_9BA7C6, 0, 0);
            break;
          case 2u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)10202030, 0, 0);
            break;
          case 3u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)&unk_9BAF96, 0, 0);
            break;
          case 4u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)&unk_9BB37E, 0, 0);
            break;
          case 5u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)&unk_9BB766, 0, 0);
            break;
          case 6u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)&unk_9BBB4E, 0, 0);
            break;
          default:
            return;
        }
      }
      break;
    case 6:
      if ( m_pActor->m_kCharShape.m_byGender )
      {
        switch ( ui_pos )
        {
          case 0u:
            m_pActor->vfptr[10].SetAbStateProperty(
              (AbStateInfectee *)m_pActor,
              MAX_ABSTATEINDEX|STA_OLDARCHONCURSE|0x132B000,
              0,
              0);
            break;
          case 1u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)20101030, 0, 0);
            break;
          case 2u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)20102030, 0, 0);
            break;
          case 3u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)20103030, 0, 0);
            break;
          case 4u:
            m_pActor->vfptr[10].SetAbStateProperty(
              (AbStateInfectee *)m_pActor,
              STA_BHKARENREF|STA_PIERCINGGUARD|0x132C000,
              0,
              0);
            break;
          case 5u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)20105030, 0, 0);
            break;
          case 6u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)20106030, 0, 0);
            break;
          default:
            return;
        }
      }
      else
      {
        switch ( ui_pos )
        {
          case 0u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)20200030, 0, 0);
            break;
          case 1u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)20201030, 0, 0);
            break;
          case 2u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)20202030, 0, 0);
            break;
          case 3u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)20203030, 0, 0);
            break;
          case 4u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, STA_SETF4ACDOWN|0x1344800, 0, 0);
            break;
          case 5u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)20205030, 0, 0);
            break;
          case 6u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)20206030, 0, 0);
            break;
          default:
            return;
        }
      }
      break;
    case 0xB:
      if ( m_pActor->m_kCharShape.m_byGender )
      {
        switch ( ui_pos )
        {
          case 0u:
            goto $LN81_2;
          case 2u:
            goto $LN79_1;
          case 3u:
            goto $LN78_0;
          case 4u:
            goto $LN77_1;
          case 5u:
            goto $LN76_1;
          case 6u:
            goto $LN75_2;
          case 1u:
            goto $LN17_0;
          default:
            return;
        }
      }
      else
      {
        switch ( ui_pos )
        {
          case 0u:
            goto $LN71_1;
          case 2u:
            goto $LN69_0;
          case 3u:
            goto $LN68_1;
          case 4u:
            goto $LN67_2;
          case 5u:
            goto $LN66_1;
          case 1u:
            goto $LN7_3;
          case 6u:
            goto $LN2_5;
          default:
            return;
        }
      }
      break;
    case 0x10:
      if ( m_pActor->m_kCharShape.m_byGender )
      {
        switch ( ui_pos )
        {
          case 0u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40100030, 0, 0);
            break;
          case 1u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40101030, 0, 0);
            break;
          case 2u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40102030, 0, 0);
            break;
          case 3u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40103030, 0, 0);
            break;
          case 4u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40104030, 0, 0);
            break;
          case 5u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40105030, 0, 0);
            break;
          case 6u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40106030, 0, 0);
            break;
          default:
            return;
        }
      }
      else
      {
        switch ( ui_pos )
        {
          case 0u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40200030, 0, 0);
            break;
          case 1u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40201030, 0, 0);
            break;
          case 2u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40202030, 0, 0);
            break;
          case 3u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40203030, 0, 0);
            break;
          case 4u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40204030, 0, 0);
            break;
          case 5u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40205030, 0, 0);
            break;
          case 6u:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)40206030, 0, 0);
            break;
          default:
            return;
        }
      }
      break;
    case 0x15:
      if ( m_pActor->m_kCharShape.m_byGender )
      {
        switch ( ui_pos )
        {
          case 0u:
            v4 = 50100030;
            goto LABEL_92;
          case 1u:
            v4 = 50101030;
            goto LABEL_92;
          case 2u:
            v4 = 50102030;
            goto LABEL_92;
          case 3u:
            v4 = 50103030;
            goto LABEL_92;
          case 4u:
            v4 = 50104030;
            goto LABEL_92;
          case 5u:
            v4 = 50105030;
            goto LABEL_92;
          case 6u:
            v4 = 50106030;
            goto LABEL_92;
          default:
            goto $LN30_0;
        }
      }
      else
      {
        switch ( ui_pos )
        {
          case 0u:
            v4 = 50200030;
            goto LABEL_92;
          case 1u:
            v4 = 50201030;
            goto LABEL_92;
          case 2u:
            v4 = 50202030;
            goto LABEL_92;
          case 3u:
            v4 = 50203030;
            goto LABEL_92;
          case 4u:
            v4 = 50204030;
            goto LABEL_92;
          case 5u:
            v4 = 50205030;
            goto LABEL_92;
          case 6u:
            v4 = 50206030;
LABEL_92:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, v4, 0, 0);
            break;
          default:
            goto $LN30_0;
        }
      }
      goto $LN30_0;
    case 0x1A:
$LN30_0:
      if ( m_pActor->m_kCharShape.m_byGender )
      {
        switch ( ui_pos )
        {
          case 0u:
$LN81_2:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30100030, 0, 0);
            break;
          case 2u:
$LN79_1:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30102030, 0, 0);
            break;
          case 3u:
$LN78_0:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30103030, 0, 0);
            break;
          case 4u:
$LN77_1:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30104030, 0, 0);
            break;
          case 5u:
$LN76_1:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30105030, 0, 0);
            break;
          case 6u:
$LN75_2:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30106030, 0, 0);
            break;
          case 1u:
$LN17_0:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30101030, 0, 0);
            break;
          default:
            return;
        }
      }
      else
      {
        switch ( ui_pos )
        {
          case 0u:
$LN71_1:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30200030, 0, 0);
            break;
          case 2u:
$LN69_0:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30202030, 0, 0);
            break;
          case 3u:
$LN68_1:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30203030, 0, 0);
            break;
          case 4u:
$LN67_2:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30204030, 0, 0);
            break;
          case 5u:
$LN66_1:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30205030, 0, 0);
            break;
          case 1u:
$LN7_3:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30201030, 0, 0);
            break;
          case 6u:
$LN2_5:
            m_pActor->vfptr[10].SetAbStateProperty((AbStateInfectee *)m_pActor, (ABSTATEINDEX)30206030, 0, 0);
            break;
          default:
            return;
        }
      }
      break;
    default:
      return;
  }
}
// 9BA7C6: using guessed type void *off_9BA7C6;

//----- (00411310) --------------------------------------------------------
void __thiscall ChangeNameWin::ChangeNameWin(ChangeNameWin *this)
{
  ChangeNameWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ChangeNameWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ChangeNameWin::`vftable'{for `IDirectMessenger'};
  `eh vector constructor iterator'(
    v1->m_apkTextWin,
    4u,
    2,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_eState = 0;
}
// 97109C: using guessed type void (__thiscall *ChangeNameWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9710BC: using guessed type int (__thiscall *ChangeNameWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00411390) --------------------------------------------------------
char __thiscall ChangeNameWin::Create(ChangeNameWin *this, PgFrameWork *pkFrameWork)
{
  ChangeNameWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // ebx@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  NiSourceTexture *v10; // eax@15
  PgSprData *v11; // eax@16
  PgWinSpr *v12; // eax@18
  PgSprData *v13; // eax@21
  PgSprData *v14; // edi@22
  PgWinBut *v15; // eax@22
  int v16; // ST24_4@22
  int v17; // ST20_4@22
  PgWinBut *v18; // eax@22
  PgWinBut *v19; // edi@22
  PgWin *v20; // ST4C_4@22
  PgFont *v21; // ST48_4@22
  unsigned int v22; // ST44_4@22
  unsigned int v23; // eax@22
  PgWinText *v24; // edi@22
  NiRefObjectVtbl *v25; // ebx@22
  NiUnsharedGeometryGroup *v26; // eax@22
  PgWinBut *v27; // edi@22
  PgWin *v28; // ST4C_4@22
  PgFont *v29; // ST48_4@22
  unsigned int v30; // ST44_4@22
  unsigned int v31; // eax@22
  PgWinText *v32; // edi@22
  NiRefObjectVtbl *v33; // ebx@22
  NiUnsharedGeometryGroup *v34; // eax@22
  PgSprData *v35; // edi@22
  PgWinBut *v36; // eax@22
  PgWinBut *v37; // edi@22
  PgWin *v38; // ST4C_4@22
  PgFont *v39; // ST48_4@22
  unsigned int v40; // ST44_4@22
  unsigned int v41; // eax@22
  PgWinText *v42; // edi@22
  NiRefObjectVtbl *v43; // ebx@22
  NiUnsharedGeometryGroup *v44; // eax@22
  PgFont *v45; // eax@22
  int v46; // edi@22
  unsigned int v47; // ebx@24
  PgFont *v48; // ST48_4@24
  unsigned int v49; // ST44_4@24
  int v50; // eax@24
  NiSourceTexture *v51; // eax@24
  NiSourceTexture *v52; // ebx@24
  NiRefObjectVtbl **v53; // ebx@33
  NiRefObjectVtbl *v54; // edi@33
  NiUnsharedGeometryGroup *v55; // eax@33
  NiNode *v56; // esi@34
  PgFont *pkFont; // [sp+50h] [bp-28h]@22
  unsigned int uiWidth; // [sp+54h] [bp-24h]@20
  unsigned int uiHeight; // [sp+58h] [bp-20h]@20
  NiSourceTexture *pkTexture; // [sp+5Ch] [bp-1Ch]@1
  int uiLeft; // [sp+60h] [bp-18h]@11
  int uiTop; // [sp+64h] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+68h] [bp-10h]@1
  int v64; // [sp+74h] [bp-4h]@1
  int i; // [sp+80h] [bp+8h]@22

  v2 = this;
  spNode.m_pObject = 0;
  v64 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  pkTexture = v3;
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v64 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "Game\\MessageWin.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "CalculatorWin", 0) )
  {
    v4 = spNode.m_pObject;
    v64 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
    goto LABEL_5;
  }
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  v12 = PgWinSpr::CreateWin(uiLeft, uiTop, v11, (PgWin *)&v2->vfptr, 0, 0);
  if ( v12 )
    v12->vfptr[60].__vecDelDtor((NiRefObject *)v12, 0);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "LotInput", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "LotInput", &uiLeft, &uiTop, v3);
    PgWinSpr::CreateWin(uiLeft, uiTop, v13, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkInputEdit = EditWin::CreateWin(
                          uiLeft + 2,
                          uiTop + 4,
                          uiWidth,
                          uiHeight,
                          (PgWin *)&v2->vfptr,
                          NORMAL,
                          0x10u,
                          3u,
                          0,
                          0,
                          1);
  }
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor02", &uiLeft, &uiTop, v3);
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick02");
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver02");
  v15 = PgWinBut::CreateWin(uiLeft, uiTop, v14, (PgWin *)&v2->vfptr, 0, 0, 0);
  v16 = uiTop;
  v17 = uiLeft;
  v2->m_apkBtnWin[1] = v15;
  v18 = PgWinBut::CreateWin(v17, v16, v14, (PgWin *)&v2->vfptr, 2u, 0, 0);
  v19 = v2->m_apkBtnWin[1];
  v20 = (PgWin *)&v2->m_apkBtnWin[1]->vfptr;
  v2->m_apkBtnWin[0] = v18;
  v21 = Font::Get(0);
  v22 = ((int (__thiscall *)(PgWinBut *))v19->vfptr[37].__vecDelDtor)(v19);
  v23 = ((int (__thiscall *)(PgWinBut *))v19->vfptr[36].__vecDelDtor)(v19);
  v24 = PgWinText::CreateWin(0, 1, v23, v22, v21, v20, 0, 0);
  v24->vfptr[122].__vecDelDtor((NiRefObject *)v24, 5u);
  v25 = v24->vfptr;
  v26 = TextData::Get(0x4F5F499Fu);
  v25[118].__vecDelDtor((NiRefObject *)v24, (unsigned int)v26);
  v24->vfptr[60].__vecDelDtor((NiRefObject *)v24, 0);
  v27 = v2->m_apkBtnWin[0];
  v28 = (PgWin *)&v2->m_apkBtnWin[0]->vfptr;
  v29 = Font::Get(0);
  v30 = ((int (__thiscall *)(PgWinBut *))v27->vfptr[37].__vecDelDtor)(v27);
  v31 = ((int (__thiscall *)(PgWinBut *))v27->vfptr[36].__vecDelDtor)(v27);
  v32 = PgWinText::CreateWin(0, 1, v31, v30, v29, v28, 0, 0);
  v32->vfptr[122].__vecDelDtor((NiRefObject *)v32, 5u);
  v33 = v32->vfptr;
  v34 = TextData::Get(0xE0E7461F);
  v33[118].__vecDelDtor((NiRefObject *)v32, (unsigned int)v34);
  v32->vfptr[60].__vecDelDtor((NiRefObject *)v32, 0);
  v35 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor04", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(v35, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick04");
  PgSprData::Add(v35, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver04");
  v36 = PgWinBut::CreateWin(uiLeft, uiTop, v35, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v37 = v36;
  v38 = (PgWin *)v36;
  v39 = Font::Get(0);
  v40 = ((int (__thiscall *)(PgWinBut *))v37->vfptr[37].__vecDelDtor)(v37);
  v41 = ((int (__thiscall *)(PgWinBut *))v37->vfptr[36].__vecDelDtor)(v37);
  v42 = PgWinText::CreateWin(0, 1, v41, v40, v39, v38, 0, 0);
  v42->vfptr[122].__vecDelDtor((NiRefObject *)v42, 5u);
  v43 = v42->vfptr;
  v44 = TextData::Get(0x88A297E1);
  v43[118].__vecDelDtor((NiRefObject *)v42, (unsigned int)v44);
  v42->vfptr[60].__vecDelDtor((NiRefObject *)v42, 0);
  v45 = Font::Get(0);
  pkFont = v45;
  i = 0;
  v46 = (int)v2->m_apkTextWin;
  while ( 1 )
  {
    v47 = v45->m_uiDefHeight;
    v48 = v45;
    v49 = v45->m_uiDefHeight;
    v50 = ((int (__thiscall *)(ChangeNameWin *))v2->vfptr[36].__vecDelDtor)(v2);
    v51 = (NiSourceTexture *)PgWinText::CreateWin(8, i * (v47 + 1) + 8, v50 - 16, v49, v48, (PgWin *)&v2->vfptr, 0, 0);
    v52 = *(NiSourceTexture **)v46;
    pkTexture = v51;
    if ( v52 != v51 )
    {
      if ( v52 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v52->m_uiRefCount) && v52 )
          v52->vfptr->__vecDelDtor((NiRefObject *)v52, 1u);
        v51 = pkTexture;
      }
      *(_DWORD *)v46 = v51;
      if ( v51 )
        InterlockedIncrement((volatile LONG *)&v51->m_uiRefCount);
    }
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v46 + 240))(0);
    v46 += 4;
    if ( ++i >= 2 )
      break;
    v45 = pkFont;
  }
  ((void (__stdcall *)(signed int))v2->m_apkTextWin[0].m_pObject->vfptr[122].__vecDelDtor)(5);
  v53 = &v2->m_apkTextWin[0].m_pObject->vfptr;
  v54 = *v53;
  v55 = TextData::Get(0xE2E29DB9);
  v54[118].__vecDelDtor((NiRefObject *)v53, (unsigned int)v55);
  ((void (__thiscall *)(ChangeNameWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.55000001,
    0.60000002);
  v64 = -1;
  if ( spNode.m_pObject )
  {
    v56 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v56 )
        v56->vfptr->__vecDelDtor((NiRefObject *)v56, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00411910) --------------------------------------------------------
void __thiscall ChangeNameWin::OnDelCharOk(ChangeNameWin *this)
{
  ChangeNameWin *v1; // esi@1
  char *v2; // eax@1
  char v3; // bl@1
  char *v4; // eax@2
  CharSelectFrameWork *v5; // eax@3

  v1 = this;
  v2 = (char *)((int (*)(void))this->m_pkInputEdit->vfptr[113].__vecDelDtor)();
  v3 = ChangeNameWin::FindCharSlot(v2);
  if ( User::GetSelectedAvatarInfo(&g_kUser)->slot == v3 )
  {
    v5 = (CharSelectFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, CharSelectFrameWorkID);
    if ( v5 )
    {
      v5->m_iEraseSlot = (unsigned __int8)v3;
      CharSelectFrameWork::NcAvatarEraseReq(v5);
    }
  }
  else
  {
    v4 = (char *)TextData2::Get(0x3CB8C4C9u);
    MsgBox::Modal(MSGBOX_OK, v4);
    ((void (__stdcall *)(_DWORD))v1->m_pkInputEdit->vfptr[116].__vecDelDtor)(&unk_970FDA);
    ((void (*)(void))v1->m_pkInputEdit->vfptr[120].__vecDelDtor)();
  }
}

//----- (004119B0) --------------------------------------------------------
void __thiscall ChangeNameWin::BtnState(ChangeNameWin *this, ChangeNameWin::BtnFunction e, int b)
{
  ChangeNameWin *v3; // esi@1
  char *v4; // edi@1
  signed int v5; // ebx@1
  NiRefObjectVtbl **v6; // ebx@7
  NiRefObjectVtbl *v7; // edi@7
  NiUnsharedGeometryGroup *v8; // eax@7
  NiRefObjectVtbl **v9; // ebx@8
  NiRefObjectVtbl *v10; // edi@8
  NiUnsharedGeometryGroup *v11; // eax@8
  NiRefObjectVtbl **v12; // ebx@9
  NiRefObjectVtbl *v13; // edi@9
  NiUnsharedGeometryGroup *v14; // eax@9

  v3 = this;
  v4 = (char *)this->m_apkBtnWin;
  v5 = 2;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 256))(0);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 240))(0);
    v4 += 4;
    --v5;
  }
  while ( v5 );
  switch ( e )
  {
    case 1:
      v12 = &v3->m_apkTextWin[0].m_pObject->vfptr;
      v13 = *v12;
      v14 = TextData2::Get(0xE1B0CB2D);
      v13[118].__vecDelDtor((NiRefObject *)v12, (unsigned int)v14);
      ((void (__stdcall *)(_DWORD))v3->m_apkBtnWin[0]->vfptr[64].__vecDelDtor)(b);
      ((void (__stdcall *)(_DWORD))v3->m_apkBtnWin[0]->vfptr[60].__vecDelDtor)(b);
      v3->m_eState = 1;
      break;
    case 2:
      v9 = &v3->m_apkTextWin[0].m_pObject->vfptr;
      v10 = *v9;
      v11 = TextData::Get(0xE2E29DB9);
      v10[118].__vecDelDtor((NiRefObject *)v9, (unsigned int)v11);
      ((void (__stdcall *)(_DWORD))v3->m_apkBtnWin[1]->vfptr[64].__vecDelDtor)(b);
      ((void (__stdcall *)(_DWORD))v3->m_apkBtnWin[1]->vfptr[60].__vecDelDtor)(b);
      v3->m_eState = 2;
      break;
    case 3:
      v6 = &v3->m_apkTextWin[0].m_pObject->vfptr;
      v7 = *v6;
      v8 = TextData::Get(0xE2E29DB9);
      v7[118].__vecDelDtor((NiRefObject *)v6, (unsigned int)v8);
      ((void (__stdcall *)(_DWORD))v3->m_apkBtnWin[1]->vfptr[64].__vecDelDtor)(b);
      ((void (__stdcall *)(_DWORD))v3->m_apkBtnWin[1]->vfptr[60].__vecDelDtor)(b);
      v3->m_eState = 3;
      break;
    default:
      v3->m_eState = 0;
      break;
  }
}

//----- (00411B10) --------------------------------------------------------
void __thiscall ChangeNameWin::OnCmdOk(ChangeNameWin *this)
{
  ChangeNameWin *v1; // ebx@1
  const char *v2; // esi@2
  const char *v3; // eax@8
  PROTO_AVATARINFORMATION *v4; // eax@8
  char *v5; // eax@10
  CharSelectFrameWork *v6; // eax@11
  _BYTE v7[20]; // ST00_20@14
  _BYTE v8[20]; // ST00_20@15
  int v9; // esi@16
  signed int v10; // edi@16
  char *v11; // eax@3
  Name5 newName; // [sp+10h] [bp-18h]@8

  v1 = this;
  if ( strlen((const char *)((int (*)(void))this->m_pkInputEdit->vfptr[113].__vecDelDtor)()) )
  {
    v2 = (const char *)((int (*)(void))v1->m_pkInputEdit->vfptr[113].__vecDelDtor)();
    if ( strlen(v2) < 4 )
    {
      v11 = (char *)TextData::Get(0xFAC40730);
LABEL_20:
      MsgBox::Modal(MSGBOX_OK, v11);
      return;
    }
    if ( IsSpecialCharInStr_0((char *)v2)
      || IsSpecialCharInStr2_0((char *)v2)
      || TextFilterTable::IsBadName((char *)v2)
      || IsPeculiarStr_0((char *)v2) )
    {
      v11 = (char *)TextData::Get(0x329D7E83u);
      goto LABEL_20;
    }
    v3 = (const char *)((int (*)(void))v1->m_pkInputEdit->vfptr[113].__vecDelDtor)();
    Name5::Name5(&newName, v3);
    v4 = User::GetSelectedAvatarInfo(&g_kUser);
    if ( v4 )
    {
      if ( Name5::operator==(&newName, &v4->name) )
      {
        v5 = (char *)TextData2::Get(0xA44706DC);
        MsgBox::Modal(MSGBOX_OK, v5);
        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
      }
      else
      {
        v6 = (CharSelectFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, CharSelectFrameWorkID);
        if ( v6 )
        {
          if ( v1->m_eState == 2 )
          {
            *(_DWORD *)v8 = newName.n5_code[0];
            *(_QWORD *)&v8[4] = *(_QWORD *)&newName.n5_code[1];
            *(_QWORD *)&v8[12] = *(_QWORD *)&newName.n5_code[3];
            CharSelectFrameWork::On_NC_AVATAR_RENAME_REQ(v6, *(Name5 *)v8);
          }
          else if ( v1->m_eState == 3 )
          {
            *(_DWORD *)v7 = newName.n5_code[0];
            *(_QWORD *)&v7[4] = *(_QWORD *)&newName.n5_code[1];
            *(_QWORD *)&v7[12] = *(_QWORD *)&newName.n5_code[3];
            CharSelectFrameWork::NcUserConnectChangeCharIDReq(v6, *(Name5 *)v7);
          }
          v9 = (int)v1->m_apkBtnWin;
          v10 = 2;
          do
          {
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v9 + 256))(0);
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v9 + 240))(0);
            v9 += 4;
            --v10;
          }
          while ( v10 );
          v1->m_eState = 0;
          PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
        }
      }
    }
  }
}

//----- (00411D10) --------------------------------------------------------
void __thiscall ChangeNameWin::OnCmdCancel(ChangeNameWin *this)
{
  ChangeNameWin *v1; // ebx@1
  PgFrameWork *v2; // edi@1
  int v3; // esi@1
  signed int v4; // edi@2
  IDirectMessengerVtbl *v5; // ecx@7
  IDirectMessengerVtbl *v6; // edi@8
  signed int v7; // edi@8

  v1 = this;
  PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, CharSelectFrameWorkID);
  v3 = (int)v1->m_apkBtnWin;
  if ( v2 )
  {
    if ( (unsigned __int8)(*(int (**)(void))(**(_DWORD **)v3 + 260))() == 1 && v1->m_eState == 1 )
    {
      v5 = v2[1].vfptr;
      LOBYTE(v2[6].vfptr) = 0;
      v2[7].m_kMsgQ.m_uiAlloced = -1;
      (*((void (__stdcall **)(_DWORD))v5->SetMsgHooker + 63))(1);
    }
    v6 = v2[1].vfptr;
    (*(void (__stdcall **)(_DWORD))(*(_DWORD *)v6[14].DirectDispatchToChildren + 240))(1);
    (*(void (__stdcall **)(_DWORD))(*(_DWORD *)v6[14].DirectDispatchToParent + 240))(1);
    v7 = 2;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 256))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 240))(0);
      v3 += 4;
      --v7;
    }
    while ( v7 );
    v1->m_eState = 0;
  }
  else
  {
    v4 = 2;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 256))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 240))(0);
      v3 += 4;
      --v4;
    }
    while ( v4 );
    v1->m_eState = 0;
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
  }
}

//----- (00411E10) --------------------------------------------------------
void __thiscall CharSelectFrameWork::Draw(CharSelectFrameWork *this)
{
  CharSelectFrameWork *v1; // esi@1
  CPostProcessEffectManager *v2; // eax@2
  NiAVObject *v3; // ST04_4@2
  NiCamera *v4; // ST00_4@2
  CPostProcessEffectManager *v5; // eax@4
  NiVisibleArray m_kVisible; // [sp+Ch] [bp-B0h]@2
  NiCullingProcess m_kCuller; // [sp+1Ch] [bp-A0h]@2
  int v8; // [sp+B8h] [bp-4h]@2

  v1 = this;
  if ( this->m_spCamera.m_pObject )
  {
    v2 = CPostProcessEffectManager::GetInstance();
    CPostProcessEffectManager::OnRenderSceneStart(v2);
    m_kVisible.m_ppkArray = 0;
    m_kVisible.m_uiCurrentSize = 0;
    m_kVisible.m_uiAllocatedSize = 0;
    m_kVisible.m_uiGrowBy = 1024;
    NiVisibleArray::SetAllocatedSize(&m_kVisible, 0x400u);
    v8 = 0;
    NiCullingProcess::NiCullingProcess(&m_kCuller, &m_kVisible);
    v3 = (NiAVObject *)&v1->m_spBackgroundScene.m_pObject->vfptr;
    v4 = v1->m_spCamera.m_pObject;
    LOBYTE(v8) = 1;
    NiDrawScene(v4, v3, &m_kCuller, 0);
    if ( unk_A9960C )
      NiDrawScene(v1->m_spCamera.m_pObject, unk_A9960C, &m_kCuller, 0);
    v5 = CPostProcessEffectManager::GetInstance();
    CPostProcessEffectManager::OnRenderSceneEnd(v5);
    PgWinMgr::Draw(&Pgg_kWinMgr, NiRenderer::ms_pkRenderer);
    LOBYTE(v8) = 0;
    NiCullingProcess::~NiCullingProcess(&m_kCuller);
    operator delete(m_kVisible.m_ppkArray);
  }
}

//----- (00411F40) --------------------------------------------------------
void __thiscall CharSelectFrameWork::SelectOk(CharSelectFrameWork *this)
{
  CharSelectFrameWork *v1; // esi@1
  PROTO_AVATARINFORMATION *v2; // eax@4
  char *v3; // eax@6
  char *v4; // eax@7
  NiD3DDefaultShader *v5; // eax@7
  char bySlot; // [sp+4h] [bp-4h]@2

  v1 = this;
  if ( this->m_bDelAvaActivityMsgCheck != 1 )
  {
    bySlot = User::GetSelectedAvatarSlot(&g_kUser);
    if ( bySlot != -1 && v1->m_bDuringLogin != 1 )
    {
      v2 = User::GetAvatarInfoBySlot(&g_kUser, bySlot);
      if ( v2 )
      {
        if ( v2->CharIDChangeData.bNeedChangeID )
        {
          v3 = (char *)TextData2::Get(0x796E65B8u);
          MsgBox::Modal(MSGBOX_OK, v3);
        }
        else
        {
          v1->m_bDuringLogin = 1;
          v4 = (char *)TextData::Get(0x24304892u);
          v5 = (NiD3DDefaultShader *)MsgBox::Modal(0, v4);
          NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v1->m_spkMsgBox, v5);
          ((void (__stdcall *)(_DWORD))v1->m_pkCharSelectMenuWin->vfptr[63].__vecDelDtor)(0);
          CharSelectFrameWork::NcCharLoginReq(v1);
        }
      }
    }
  }
}

//----- (00411FF0) --------------------------------------------------------
void __thiscall CharSelectFrameWork::SelectCancel(CharSelectFrameWork *this)
{
  CharSelectFrameWork *v1; // esi@1

  v1 = this;
  PgNet::Close((PgNet *)&g_kNetMgr.m_spLogin.m_pObject->vfptr);
  PgNet::Close((PgNet *)&g_kNetMgr.m_spWorldMgr.m_pObject->vfptr);
  PgFrameWork::PostFrameMsgChange((PgFrameWork *)&v1->vfptr, AccountFrameWorkID, 0);
}

//----- (00412020) --------------------------------------------------------
void __thiscall CharSelectFrameWork::CreateAvatar(CharSelectFrameWork *this)
{
  CharSelectFrameWork *v1; // esi@1
  char *v2; // eax@3

  v1 = this;
  if ( this->m_iEraseSlot == -1 )
  {
    if ( User::GetEmptyAvatarSlot(&g_kUser) == -1 )
    {
      v2 = (char *)TextData::Get(0x8190D6C7);
      MsgBox::Modal(MSGBOX_OK, v2);
    }
    else
    {
      SoundMgr::PlayInterfaceSound(&g_kSoundMgr, CharCreate);
      PgFrameWork::PostFrameMsgChange((PgFrameWork *)&v1->vfptr, CharCreateFrameWorkID, 0);
      CharSelectMenuWin::ChangeTextColor(v1->m_pkCharSelectMenuWin, 0);
    }
  }
}

//----- (00412080) --------------------------------------------------------
void __thiscall CharSelectFrameWork::DeleteAvatar(CharSelectFrameWork *this)
{
  CharSelectFrameWork *v1; // esi@1
  ChangeNameWin *v2; // edi@4
  CharSelectMenuWin *v3; // esi@4
  char *v4; // eax@5

  v1 = this;
  if ( User::GetSelectedAvatarSlot(&g_kUser) != -1 && User::GetSelectedAvatarInfo(&g_kUser) )
  {
    if ( !(unsigned __int8)((int (*)(void))v1->m_pkChangeNameWin->vfptr[65].__vecDelDtor)() )
    {
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkChangeNameWin->vfptr);
      ChangeNameWin::BtnState(v1->m_pkChangeNameWin, BTN_FUNC_DELCHAR_OK, 1);
      v2 = v1->m_pkChangeNameWin;
      ((void (__stdcall *)(_DWORD))v2->m_pkInputEdit->vfptr[116].__vecDelDtor)(&unk_970FE2);
      ((void (*)(void))v2->m_pkInputEdit->vfptr[120].__vecDelDtor)();
      v3 = v1->m_pkCharSelectMenuWin;
      ((void (__stdcall *)(_DWORD))v3->m_pkOkBut->vfptr[60].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v3->m_pkDelCharBtn->vfptr[60].__vecDelDtor)(0);
    }
  }
  else
  {
    v4 = (char *)TextData::Get(0x6D768ADFu);
    MsgBox::Modal(MSGBOX_OK, v4);
  }
}

//----- (00412150) --------------------------------------------------------
void __thiscall CharSelectFrameWork::OnZoneLoginFail(CharSelectFrameWork *this)
{
  CharSelectFrameWork *v1; // esi@1
  char *v2; // eax@3
  MsgBox *v3; // eax@3
  PgMsg::Frame kMsg; // [sp+4h] [bp-18h]@3

  v1 = this;
  if ( this->m_spkMsgBox.m_pObject )
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&this->m_spkMsgBox.m_pObject->vfptr);
  v2 = (char *)TextData::Get(0x807B787E);
  v3 = MsgBox::Modal(MSGBOX_OK, v2);
  kMsg.m_uiFrameMsg = 14;
  MsgBox::SetFrameWorkMsgOnClose(v3, (PgFrameWork *)&v1->vfptr, &kMsg, 0);
}

//----- (004121C0) --------------------------------------------------------
void __thiscall CharSelectFrameWork::ApplyTerrain(CharSelectFrameWork *this, NiNode *pkGroundNode)
{
  NiTListItem<NiPointer<Shadow> > *v2; // ebx@1
  Shadow *v3; // esi@2
  NiNode *v4; // eax@2
  NiNode *v5; // edi@2
  NiCollisionGroup *v6; // ecx@9
  NiAVObject *pkObject; // [sp+4h] [bp-4h]@2

  v2 = this->m_kShadowList.m_pkHead;
  while ( v2 )
  {
    v3 = v2->m_element.m_pObject;
    v4 = v3->m_kDecal.m_spObTerrain.m_pObject;
    v2 = v2->m_pkNext;
    v5 = v4;
    pkObject = (NiAVObject *)&v3->m_kDecal.m_spObTerrain.m_pObject->vfptr;
    if ( v4 != pkGroundNode )
    {
      if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      v3->m_kDecal.m_spObTerrain.m_pObject = pkGroundNode;
      if ( pkGroundNode )
        InterlockedIncrement((volatile LONG *)&pkGroundNode->m_uiRefCount);
    }
    v6 = v3->m_kDecal.m_pkCollisionGroup;
    if ( v6 )
    {
      if ( pkObject )
        NiCollisionGroup::RemoveCollidee(v6, pkObject);
      if ( pkGroundNode )
        NiCollisionGroup::AddCollidee(
          v3->m_kDecal.m_pkCollisionGroup,
          (NiAVObject *)&v3->m_kDecal.m_spObTerrain.m_pObject->vfptr,
          0,
          -1,
          1);
    }
  }
}

//----- (00412260) --------------------------------------------------------
void __thiscall CharSelectFrameWork::RenderShadow(CharSelectFrameWork *this)
{
  NsPgToonExtraData *v1; // edx@1
  bool v2; // al@1
  NiTListItem<NiPointer<Shadow> > *v3; // esi@1
  unsigned int v4; // ebx@2
  Shadow *v5; // edi@5
  NiNode *v6; // eax@6
  Shadow *v7; // eax@9
  NiPoint3 kCharPos; // [sp+4h] [bp-18h]@6
  CharSelectFrameWork *v9; // [sp+10h] [bp-Ch]@1
  NsPgToonExtraData *pkToonExtraData; // [sp+14h] [bp-8h]@1
  bool bOldToonFlag; // [sp+1Bh] [bp-1h]@1

  v1 = Engine3D::ms_spToonExtraData;
  v2 = Engine3D::ms_spToonExtraData->m_bOn;
  Engine3D::ms_spToonExtraData->m_bOn = 0;
  v3 = this->m_kShadowList.m_pkHead;
  v9 = this;
  pkToonExtraData = v1;
  bOldToonFlag = v2;
  if ( v3 )
  {
    v4 = 0;
    if ( this->m_nMaxShadowObject )
    {
      do
      {
        if ( v4 >= 6 || this->m_apkAvatar[v4] )
        {
          v5 = v3->m_element.m_pObject;
          v3 = v3->m_pkNext;
          if ( v5 )
          {
            v6 = this->m_vecShadowObject._Myfirst[v4];
            kCharPos.x = v6->m_kLocal.m_Translate.x;
            kCharPos.y = v6->m_kLocal.m_Translate.y;
            kCharPos.z = v6->m_kLocal.m_Translate.z;
            Shadow::Render(v5, v6, &kCharPos);
            v1 = pkToonExtraData;
            v5->m_spNode.m_pObject->m_uFlags &= 0xFFFEu;
            this = v9;
          }
        }
        ++v4;
      }
      while ( v4 < this->m_nMaxShadowObject );
    }
    for ( ; v3; v7->m_spNode.m_pObject->m_uFlags |= 1u )
    {
      v7 = v3->m_element.m_pObject;
      v3 = v3->m_pkNext;
    }
    v1->m_bOn = bOldToonFlag;
  }
}

//----- (00412320) --------------------------------------------------------
void __thiscall ChangeNameWin::OnCommand(ChangeNameWin *this, unsigned int wParam, int lParam)
{
  if ( wParam )
  {
    if ( wParam == 1 )
    {
      ChangeNameWin::OnCmdCancel(this);
    }
    else if ( wParam == 2 )
    {
      ChangeNameWin::OnDelCharOk(this);
    }
  }
  else
  {
    ChangeNameWin::OnCmdOk(this);
  }
}

//----- (00412350) --------------------------------------------------------
void __thiscall CharSelectFrameWork::SelectAvatar(CharSelectFrameWork *this, unsigned int uiSlot)
{
  CharSelectFrameWork *v2; // esi@1
  char v3; // al@2
  bool v4; // zf@2
  char v5; // bl@5
  NiAVObject **v6; // edi@7
  void (__thiscall ***v7)(_DWORD, _DWORD); // ebx@11
  PROTO_AVATARINFORMATION *v8; // eax@19
  CharSelectMenuWin *v9; // ecx@20
  NiAVObject *v10; // eax@22
  NiNode *v11; // ecx@23
  Avatar *v12; // ecx@26
  PROTO_AVATARINFORMATION *v13; // eax@29
  int v14; // ecx@31
  ChangeNameWin *v15; // edi@31
  int v16; // edx@31
  int v17; // ecx@31
  PROTO_AVATARINFORMATION *v18; // eax@39
  ChangeNameWin *v19; // ecx@41
  ChangeNameWin::BtnFunction fTime; // [sp+14h] [bp-54h]@31
  ChangeNameWin::BtnFunction v21; // [sp+18h] [bp-50h]@41
  int v22; // [sp+28h] [bp-40h]@10
  int v23; // [sp+2Ch] [bp-3Ch]@7
  char byOldSlot; // [sp+33h] [bp-35h]@2
  char buf[4]; // [sp+34h] [bp-34h]@31
  int v26; // [sp+38h] [bp-30h]@31
  unsigned int v27; // [sp+3Ch] [bp-2Ch]@31
  int v28; // [sp+40h] [bp-28h]@31
  int v29; // [sp+44h] [bp-24h]@31
  char v30; // [sp+48h] [bp-20h]@31
  char acName[21]; // [sp+4Ch] [bp-1Ch]@30

  v2 = this;
  if ( this->m_bDelAvaActivityMsgCheck != 1 )
  {
    v3 = User::GetSelectedAvatarSlot(&g_kUser);
    v4 = v2->m_pkChangeNameWin == 0;
    byOldSlot = v3;
    if ( !v4 && (unsigned __int8)((int (*)(void))v2->m_pkChangeNameWin->vfptr[65].__vecDelDtor)() )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkChangeNameWin->vfptr);
    v5 = uiSlot;
    if ( byOldSlot == (_BYTE)uiSlot || v2->m_bDuringLogin )
    {
      if ( byOldSlot != -1 )
      {
        if ( v2->m_pkChangeNameWin )
        {
          v18 = User::GetAvatarInfoBySlot(&g_kUser, uiSlot);
          if ( v18 )
          {
            *(_DWORD *)acName = v18->name.n5_code[0];
            *(_DWORD *)&acName[4] = v18->name.n5_code[1];
            *(_DWORD *)&acName[8] = v18->name.n5_code[2];
            *(_DWORD *)&acName[12] = v18->name.n5_code[3];
            *(_DWORD *)&acName[16] = v18->name.n5_code[4];
            acName[20] = 0;
            if ( v18->CharIDChangeData.bNeedChangeID == 1 )
            {
              Name5::n_string(&v18->name, buf);
              v19 = v2->m_pkChangeNameWin;
              v30 = 0;
              ChangeNameWin::SetNameEdit(v19, buf);
              PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkChangeNameWin->vfptr);
              v21 = 3;
            }
            else
            {
              if ( !_mbschr(acName, 0x2Du) )
              {
                CharSelectMenuWin::EnableOKBut(v2->m_pkCharSelectMenuWin, 1);
                CharSelectFrameWork::SelectOk(v2);
                return;
              }
              ChangeNameWin::SetNameEdit(v2->m_pkChangeNameWin, acName);
              PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkChangeNameWin->vfptr);
              v21 = 2;
            }
            ChangeNameWin::BtnState(v2->m_pkChangeNameWin, v21, 1);
            CharSelectMenuWin::EnableOKBut(v2->m_pkCharSelectMenuWin, 0);
            return;
          }
        }
      }
    }
    else
    {
      User::SetSelectedAvatarSlot(&g_kUser, uiSlot);
      v6 = (NiAVObject **)v2->m_aspAvatarPos;
      v23 = 4;
      do
      {
        if ( *(v6 - 44) && *v6 )
        {
          ((void (__stdcall *)(int *, _DWORD))(*v6)->vfptr[30].__vecDelDtor)(&v22, *(v6 - 44));
          if ( v22 )
          {
            v7 = (void (__thiscall ***)(_DWORD, _DWORD))v22;
            if ( !InterlockedDecrement((volatile LONG *)(v22 + 4)) && v7 )
              (**v7)(v7, 1);
            v5 = uiSlot;
          }
          NiAVObject::Update(*v6, 0.0, 0);
          NiAVObject::UpdateProperties(*v6);
        }
        ++v6;
        --v23;
      }
      while ( v23 );
      if ( v5 != -1 && v2->m_apkAvatar[(unsigned __int8)v5] )
      {
        CharSelectFrameWork::bIsActiveMotion = 1;
        CharSelectFrameWork::bRandomMode = 0;
        CharSelectFrameWork::ui_currentFairyPos = (unsigned __int8)v5;
        CharSelectFrameWork::ActActivePos(v2->m_apkAvatar[(unsigned __int8)v5], (unsigned __int8)v5);
        v8 = User::GetAvatarInfoBySlot(&g_kUser, v5);
        if ( !v8 )
          return;
        v9 = v2->m_pkCharSelectMenuWin;
        if ( v9 )
          CharSelectMenuWin::SetMenuTextInfo(v9, v8);
        v10 = v2->m_spCharSelectEffect[(unsigned __int8)v5].m_pObject;
        if ( v10 )
        {
          v11 = v2->m_aspAvatarPos[(unsigned __int8)v5].m_pObject;
          if ( v11 )
          {
            ((void (__stdcall *)(NiAVObject *, _DWORD))v11->vfptr[29].__vecDelDtor)(v10, 0);
            NiAVObject::Update((NiAVObject *)&v2->m_aspAvatarPos[(unsigned __int8)v5].m_pObject->vfptr, 0.0, 0);
            NiAVObject::UpdateProperties((NiAVObject *)&v2->m_aspAvatarPos[(unsigned __int8)v5].m_pObject->vfptr);
          }
        }
      }
      if ( byOldSlot != -1 )
      {
        v12 = v2->m_apkAvatar[(unsigned __int8)byOldSlot];
        if ( v12 )
          CharSelectFrameWork::ActPos(v12, (unsigned __int8)byOldSlot);
      }
      if ( v2->m_pkChangeNameWin )
      {
        v13 = User::GetAvatarInfoBySlot(&g_kUser, v5);
        if ( v13 )
        {
          *(_DWORD *)acName = v13->name.n5_code[0];
          *(_DWORD *)&acName[4] = v13->name.n5_code[1];
          *(_DWORD *)&acName[8] = v13->name.n5_code[2];
          *(_DWORD *)&acName[12] = v13->name.n5_code[3];
          *(_DWORD *)&acName[16] = v13->name.n5_code[4];
          acName[20] = 0;
          if ( v13->CharIDChangeData.bNeedChangeID == 1 )
          {
            v14 = v13->name.n5_code[1];
            v15 = v2->m_pkChangeNameWin;
            *(_DWORD *)buf = v13->name.n5_code[0];
            v27 = v13->name.n5_code[2];
            v16 = v13->name.n5_code[4];
            v26 = v14;
            v17 = v13->name.n5_code[3];
            v29 = v16;
            v28 = v17;
            v30 = 0;
            ((void (__stdcall *)(char *))v15->m_pkInputEdit->vfptr[116].__vecDelDtor)(buf);
            ((void (*)(void))v15->m_pkInputEdit->vfptr[120].__vecDelDtor)();
            PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkChangeNameWin->vfptr);
            fTime = 3;
LABEL_34:
            ChangeNameWin::BtnState(v2->m_pkChangeNameWin, fTime, 1);
            CharSelectMenuWin::EnableOKBut(v2->m_pkCharSelectMenuWin, 0);
            return;
          }
          if ( _mbschr(acName, 0x2Du) )
          {
            ChangeNameWin::SetNameEdit(v2->m_pkChangeNameWin, acName);
            PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkChangeNameWin->vfptr);
            fTime = 2;
            goto LABEL_34;
          }
          CharSelectMenuWin::EnableOKBut(v2->m_pkCharSelectMenuWin, 1);
        }
      }
    }
  }
}
// A694C2: using guessed type bool CharSelectFrameWork::bRandomMode;
// A886BC: using guessed type unsigned int CharSelectFrameWork::ui_currentFairyPos;
// A886C0: using guessed type bool CharSelectFrameWork::bIsActiveMotion;

//----- (00412710) --------------------------------------------------------
void __thiscall CharSelectFrameWork::OnZoneConnectFail(CharSelectFrameWork *this)
{
  CharSelectFrameWork *v1; // esi@1
  char *v2; // eax@3
  MsgBox *v3; // eax@3
  PgMsg::Frame pkFrameMsg; // [sp+4h] [bp-18h]@3

  v1 = this;
  if ( this->m_spkMsgBox.m_pObject )
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&this->m_spkMsgBox.m_pObject->vfptr);
  v2 = (char *)TextData::Get(0x807B787E);
  v3 = MsgBox::Modal(MSGBOX_OK, v2);
  pkFrameMsg.m_uiFrameMsg = 14;
  MsgBox::SetFrameWorkMsgOnClose(v3, (PgFrameWork *)&v1->vfptr, &pkFrameMsg, 0);
}

//----- (00412780) --------------------------------------------------------
void __thiscall CharSelectFrameWork::ProcessInput(CharSelectFrameWork *this)
{
  CharSelectFrameWork *v1; // esi@1
  Picking *v2; // edi@2
  int v3; // eax@2
  NiAVObject *v4; // ebx@2
  NiAVObject *v5; // eax@11
  char v6; // al@11
  NiPoint3 kOrigin; // [sp+4h] [bp-1Ch]@2
  NiPoint3 kDir; // [sp+10h] [bp-10h]@2
  int v9; // [sp+1Ch] [bp-4h]@2

  v1 = this;
  if ( dword_B64790 >= 1 )
  {
    NiCamera::WindowPointToRay(this->m_spCamera.m_pObject, PgWin::ms_iMsX, PgWin::ms_iMsY, &kOrigin, &kDir);
    v2 = v1->m_pkPick;
    v3 = (int)v1->m_spCharScene.m_pObject;
    v4 = v2->m_spRoot.m_pObject;
    v9 = v3;
    if ( v4 != (NiAVObject *)v3 )
    {
      if ( v4 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
        v3 = v9;
      }
      v2->m_spRoot.m_pObject = (NiAVObject *)v3;
      if ( v3 )
        InterlockedIncrement((volatile LONG *)(v3 + 4));
    }
    if ( Picking::PickCharacter(v1->m_pkPick, &kOrigin, &kDir) )
    {
      v5 = Picking::GetAVObject(v1->m_pkPick, 0);
      v6 = SearchSlot(v5);
      if ( v6 != -1 )
      {
        CharSelectFrameWork::SelectAvatar(v1, (unsigned __int8)v6);
        CharSelectMenuWin::ChangeTextColor(v1->m_pkCharSelectMenuWin, 1);
      }
    }
  }
}
// B64790: using guessed type int dword_B64790;

//----- (00412850) --------------------------------------------------------
void __userpurge CharSelectFrameWork::Update(CharSelectFrameWork *this@<ecx>, int a2@<ebx>, float fCurTime)
{
  CharSelectFrameWork *v3; // esi@1
  Net *v4; // ecx@1
  PgNet *v5; // ecx@3
  NiAVObject *v6; // ecx@5
  char *v7; // eax@11
  MsgBox *v8; // eax@11
  char *v9; // eax@12
  int (__thiscall *v10)(int, int); // eax@15
  int v11; // edi@15
  int v12; // ecx@15
  unsigned int v13; // eax@18
  NiNode *v14; // ebx@23
  int v15; // eax@23
  char v16; // al@26
  unsigned int v17; // edi@27
  Char *v18; // ecx@27
  NiActorManager *v19; // eax@28
  PgMsg::Frame kMsg; // [sp+28h] [bp-18h]@13

  v3 = this;
  v4 = this->m_spWorldMgrNet.m_pObject;
  if ( v4 )
    ((void (__stdcall *)(CharSelectFrameWork *, signed int))v4->vfptr[4].__vecDelDtor)(v3, 100);
  PgFrameWork::ProcessAllMsg((PgFrameWork *)&v3->vfptr);
  PgWinMgr::ProcessInput(&Pgg_kWinMgr, 1);
  PgWinMgr::DispatchMessageA(&Pgg_kWinMgr);
  PgWinMgr::UpdateWin(&Pgg_kWinMgr, fCurTime);
  CharSelectFrameWork::ProcessInput(v3);
  CharSelectFrameWork::RenderShadow(v3);
  CharMgr::UpdateAvatar(&g_kCharMgr, fCurTime);
  EffectMgr::Update(&g_kEffectMgr, fCurTime);
  NiAVObject::Update(unk_A9960C, fCurTime, 1);
  v5 = (PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr;
  if ( v5 )
    PgNet::Flush(v5);
  v6 = (NiAVObject *)&v3->m_spBackgroundScene.m_pObject->vfptr;
  if ( v6 )
    NiAVObject::Update(v6, fCurTime, 1);
  if ( v3->m_spWorldMgrNet.m_pObject->m_bCut )
  {
    if ( v3->m_spkMsgBox.m_pObject )
      PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v3->m_spkMsgBox.m_pObject->vfptr);
    NetMgr::SendUserLogOutMsg2AllServer(&g_kNetMgr);
    if ( g_kServer.m_bDoubleConnected == 1 )
    {
      v7 = (char *)TextData::Get(0x16526A50u);
      v8 = MsgBox::Modal(MSGBOX_OK, v7);
      g_kServer.m_bDoubleConnected = 0;
    }
    else
    {
      v9 = (char *)TextData::Get(0xCF16104B);
      v8 = MsgBox::Modal(MSGBOX_OK, v9);
    }
    kMsg.m_uiFrameMsg = 20;
    MsgBox::SetFrameWorkMsgOnClose(v8, (PgFrameWork *)&v3->vfptr, &kMsg, 0);
  }
  if ( v3->m_aspFairy.m_pObject )
  {
    v10 = *(int (__thiscall **)(int, int))&v3->m_kMoveToTarget.vfptr->gap4[0];
    v11 = (int)&v3->m_kMoveToTarget;
    v12 = (int)&v3->m_kMoveToTarget;
    if ( CharSelectFrameWork::bRandomMode )
    {
      if ( !(unsigned __int8)v10(v12, a2) )
      {
        if ( CharSelectFrameWork::ui_currentFairyPos >= 3 )
          v13 = 0;
        else
          v13 = CharSelectFrameWork::ui_currentFairyPos + 1;
        CharSelectFrameWork::ui_currentFairyPos = v13;
        (*(void (__thiscall **)(NpNs_MoveToTarget *, NiPoint3 *))(*(_DWORD *)v11 + 40))(
          &v3->m_kMoveToTarget,
          &v3->m_aspRandomPos[v13].m_pObject->m_kLocal.m_Translate);
        (*(void (__thiscall **)(NpNs_MoveToTarget *, _DWORD))(*(_DWORD *)v11 + 8))(&v3->m_kMoveToTarget, 10.0);
        (*(void (__thiscall **)(NpNs_MoveToTarget *, _DWORD, NiPoint3 *, NiPoint3 *))(*(_DWORD *)v11 + 28))(
          &v3->m_kMoveToTarget,
          LODWORD(fCurTime),
          &v3->m_aspFairy.m_pObject->m_kLocal.m_Translate,
          &v3->m_aspRandomPos[CharSelectFrameWork::ui_currentFairyPos].m_pObject->m_kLocal.m_Translate);
        goto LABEL_24;
      }
    }
    else if ( !(unsigned __int8)v10(v12, a2) )
    {
      (*(void (__thiscall **)(NpNs_MoveToTarget *, _DWORD))(*(_DWORD *)v11 + 8))(&v3->m_kMoveToTarget, 15.0);
      (*(void (__thiscall **)(NpNs_MoveToTarget *, _DWORD, NiPoint3 *, NiPoint3 *))(*(_DWORD *)v11 + 28))(
        &v3->m_kMoveToTarget,
        LODWORD(fCurTime),
        &v3->m_aspFairy.m_pObject->m_kLocal.m_Translate,
        &v3->m_aspAngelPos[CharSelectFrameWork::ui_currentFairyPos].m_pObject->m_kLocal.m_Translate);
LABEL_24:
      (*(void (__thiscall **)(NpNs_MoveToTarget *))(*(_DWORD *)v11 + 36))(&v3->m_kMoveToTarget);
      goto LABEL_25;
    }
    v14 = v3->m_aspFairy.m_pObject;
    v15 = (*(int (__thiscall **)(NpNs_MoveToTarget *))(*(_DWORD *)v11 + 56))(&v3->m_kMoveToTarget);
    v14->m_kLocal.m_Translate.x = *(float *)v15;
    v14->m_kLocal.m_Translate.y = *(float *)(v15 + 4);
    v14->m_kLocal.m_Translate.z = *(float *)(v15 + 8);
    goto LABEL_24;
  }
LABEL_25:
  if ( CharSelectFrameWork::bIsActiveMotion )
  {
    v16 = User::GetSelectedAvatarSlot(&g_kUser);
    if ( v16 == -1 )
      return;
    v17 = (unsigned __int8)v16;
    v18 = (Char *)&v3->m_apkAvatar[(unsigned __int8)v16]->vfptr;
    if ( !v18 )
      return;
    v19 = Char::GetSequence(v18, CharSelectFrameWork::uiActiveCode);
    if ( v19 && v19->m_fTransStartTime <= (double)v19->m_fTransEndTime )
    {
      CharSelectFrameWork::bIsActiveMotion = 0;
      CharSelectFrameWork::ActActiveEndPos(v3->m_apkAvatar[v17], v17);
    }
  }
  if ( g_kSoundMgr.m_pkBGMGroup )
  {
    if ( !SoundGroupBgm::IsBGMPlaying(g_kSoundMgr.m_pkBGMGroup) )
    {
      SoundMgr::StopBGM(&g_kSoundMgr);
      SoundGroupBgm::SetFadeDurationTime(g_kSoundMgr.m_pkBGMGroup, 0.0);
      SoundMgr::PlayBGM(&g_kSoundMgr, "LoginBackground.mp3");
    }
  }
  SoundMgr::Update(&g_kSoundMgr, fCurTime, 0);
}
// 412850: could not find valid save-restore pair for ebx
// A694C2: using guessed type bool CharSelectFrameWork::bRandomMode;
// A886BC: using guessed type unsigned int CharSelectFrameWork::ui_currentFairyPos;
// A886C0: using guessed type bool CharSelectFrameWork::bIsActiveMotion;

//----- (00412B60) --------------------------------------------------------
void __thiscall CharSelectFrameWork::ProcessMsg(CharSelectFrameWork *this, unsigned int uiMsg, unsigned int uiwParam, unsigned int uilParam)
{
  switch ( uiMsg )
  {
    case 9u:
      CharSelectFrameWork::OnCharEraseFailMsgClose(this);
      break;
    case 0xAu:
      CharSelectFrameWork::OnCharLoginFailMsgClose(this);
      break;
    case 0xBu:
      CharSelectFrameWork::OnZoneConnectFail(this);
      break;
    case 0xCu:
      CharSelectFrameWork::OnZoneConnectFailMsgClose(this);
      break;
    case 0xDu:
      CharSelectFrameWork::OnZoneLoginFail(this);
      break;
    case 0xEu:
      CharSelectFrameWork::OnZoneLoginFailMsgClose(this);
      break;
    case 0xFu:
      CharSelectFrameWork::OnZoneLoginComplete(this);
      break;
    case 0x10u:
      CharSelectFrameWork::OnEraseMsgOk(this);
      break;
    case 0x11u:
      CharSelectFrameWork::OnEraseMsgCancel(this);
      break;
    case 0x12u:
      PgFrameWork::PostFrameMsgChange((PgFrameWork *)&this->vfptr, AccountFrameWorkID, 0);
      break;
    case 0x14u:
      CharSelectFrameWork::OnErrorGotoExit();
      break;
    case 0x15u:
      CharSelectFrameWork::NcCharTutorialPopupAck(this, uiwParam != 0);
      break;
    default:
      return;
  }
}

//----- (00412C30) --------------------------------------------------------
ChangeNameWin *__cdecl ChangeNameWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  ChangeNameWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x178u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    LOBYTE(v6) = 1;
    v2->vfptr = (NiRefObjectVtbl *)&ChangeNameWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&ChangeNameWin::`vftable'{for `IDirectMessenger'};
    `eh vector constructor iterator'(
      v2[1].m_kLocal.m_Rotate.m_pEntry[2],
      4u,
      2,
      (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
      (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[2][2]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (ChangeNameWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 97109C: using guessed type void (__thiscall *ChangeNameWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9710BC: using guessed type int (__thiscall *ChangeNameWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00412D90) --------------------------------------------------------
void __thiscall Name5::Name5(Name5 *this, const char *str)
{
  *(_QWORD *)&this->n5_code[3] = 0i64;
  *(_QWORD *)&this->n5_code[1] = 0i64;
  this->n5_code[0] = 0;
  strncpy((char *)this->n5_code, (char *)str, 0x14u);
}

//----- (00412DC0) --------------------------------------------------------
BOOL __thiscall Name5::operator==(Name5 *this, Name5 *nm)
{
  return this->n5_code[0] == nm->n5_code[0]
      && this->n5_code[1] == nm->n5_code[1]
      && this->n5_code[2] == nm->n5_code[2]
      && this->n5_code[3] == nm->n5_code[3]
      && this->n5_code[4] == nm->n5_code[4];
}

//----- (00412E00) --------------------------------------------------------
char *__thiscall Name5::n_string(Name5 *this, char *buf)
{
  char *result; // eax@1

  result = buf;
  *(_QWORD *)buf = *(_QWORD *)&this->n5_code[0];
  *((_QWORD *)buf + 1) = *(_QWORD *)&this->n5_code[2];
  *((_DWORD *)buf + 4) = this->n5_code[4];
  buf[20] = 0;
  return result;
}

//----- (00412E30) --------------------------------------------------------
void __thiscall NsABVPicking::SetTarget(NsABVPicking *this, NiAVObject *pObject)
{
  NsABVPicking *v2; // ebx@1
  NiAVObject *v3; // esi@1

  v2 = this;
  v3 = this->m_spRoot.m_pObject;
  if ( v3 != pObject )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spRoot.m_pObject = pObject;
    if ( pObject )
      InterlockedIncrement((volatile LONG *)&pObject->m_uiRefCount);
  }
}

//----- (00412E80) --------------------------------------------------------
ChangeNameWin *__thiscall ChangeNameWin::`scalar deleting destructor'(ChangeNameWin *this, unsigned int a2)
{
  ChangeNameWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ChangeNameWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ChangeNameWin::`vftable'{for `IDirectMessenger'};
  this->m_pkInputEdit = 0;
  `eh vector destructor iterator'(
    this->m_apkTextWin,
    4u,
    2,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97109C: using guessed type void (__thiscall *ChangeNameWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9710BC: using guessed type int (__thiscall *ChangeNameWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00412F10) --------------------------------------------------------
void __thiscall ChatColorSpinWin::SetChatColorID(ChatColorSpinWin *this, char kColorID)
{
  this->m_kChatItem.kChatColorID = kColorID;
  this->m_bReservStop = 1;
}

//----- (00412F30) --------------------------------------------------------
void __thiscall ChatColorSpinWin::SetTimer(ChatColorSpinWin *this, bool bTimer)
{
  double v2; // st7@2

  this->m_bTimer = bTimer;
  if ( bTimer )
  {
    this->m_bStop = 1;
  }
  else
  {
    this->m_fStartTime = Timer::ms_fCurTime;
    v2 = Timer::ms_fCurTime;
    this->m_bStop = 0;
    this->m_fOldTime = v2;
    this->m_bReservStop = 0;
    this->m_bWaitAck = 0;
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00412F80) --------------------------------------------------------
void __thiscall ChatColorSpinWin::OnShowWin(ChatColorSpinWin *this)
{
  ChatColorSpinWin *v1; // esi@1
  NiRefObjectVtbl *v2; // edi@7
  NiUnsharedGeometryGroup *v3; // eax@7
  unsigned int v4; // [sp-4h] [bp-Ch]@4

  v1 = this;
  if ( this->m_kChatItem.uiColorType == 1 )
  {
    v4 = 1777710823;
  }
  else if ( this->m_kChatItem.uiColorType == 2 )
  {
    v4 = -1260144839;
  }
  else
  {
    if ( this->m_kChatItem.uiColorType != 3 )
      return;
    v4 = -181667187;
  }
  v2 = this->m_pkTitleText->vfptr;
  v3 = TextData3::Get(v4);
  v2[118].__vecDelDtor((NiRefObject *)v1->m_pkTitleText, (unsigned int)v3);
}

//----- (00412FD0) --------------------------------------------------------
void __thiscall ChatColorSpinWin::OnOK(ChatColorSpinWin *this)
{
  ChatColorSpinWin *v1; // esi@1
  Item *v2; // edi@2
  int v3; // eax@2
  char *v4; // eax@4
  MsgBox *v5; // eax@4
  GameFrameWork *v6; // esi@5
  NiUnsharedGeometryGroup *v7; // eax@6

  v1 = this;
  if ( this->m_bStop )
  {
    v2 = Inventory::GetItemByID(&g_kInventory, this->m_kChatItem.uiItemID);
    v3 = Inventory::GetSlotByID(&g_kInventory, v1->m_kChatItem.uiItemID);
    if ( v2 && v3 >= 0 )
    {
      v1->m_kChatItem.uiInveInx = v3;
      v4 = (char *)TextData3::Get(0x9FE2D7BB);
      v5 = MsgBox::Modal(MSGBOX_OKCANCEL, v4);
      ((void (__stdcall *)(_DWORD))v5->vfptr->SetMsgHooker)(&v1->vfptr);
    }
    else
    {
      v6 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v6 )
      {
        v7 = TextData3::Get(0x6955D6Eu);
        GameFrameWork::AddSysMsg(v6, (const char *)v7);
      }
    }
  }
}

//----- (00413070) --------------------------------------------------------
void __thiscall ChatColorSpinWin::Roll(ChatColorSpinWin *this)
{
  ChatColorSpinWin *v1; // esi@1
  PgWinSpr *v2; // ecx@1
  double v3; // st7@1

  v1 = this;
  v2 = this->m_pkSpr.m_pObject;
  v1->m_bTimer = 0;
  v1->m_fStartTime = Timer::ms_fCurTime;
  v3 = Timer::ms_fCurTime;
  v1->m_bStop = 0;
  v1->m_fOldTime = v3;
  *(_WORD *)&v1->m_bReservStop = 0;
  ((void (__stdcall *)(signed int))v2->vfptr[64].__vecDelDtor)(1);
  v1->m_fSpeed = 0.1;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004130D0) --------------------------------------------------------
void __thiscall ChatColorSpinWin::Decrease(ChatColorSpinWin *this, float fTime)
{
  ChatColorSpinWin *v2; // esi@1
  GameFrameWork *v3; // ecx@1
  double v4; // st7@1
  ChatColor *v5; // ebx@10
  NiRefObjectVtbl *v6; // edi@11
  NiSourceTexture *v7; // eax@11
  char *v8; // eax@11
  int v9; // esi@14
  int v10; // esi@15
  NiUnsharedGeometryGroup *v11; // eax@17
  GameFrameWork *pkGame; // [sp+4h] [bp-4h]@1
  float fTimea; // [sp+10h] [bp+8h]@2
  float fTimeb; // [sp+10h] [bp+8h]@3
  float fTimec; // [sp+10h] [bp+8h]@11

  v2 = this;
  v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  pkGame = v3;
  v4 = fTime;
  if ( v2->m_fSpeed <= 2.0 )
  {
    fTimea = v4 - v2->m_fOldTime;
    v2->m_fSpeed = fTimea * 0.009999999776482582 + v2->m_fSpeed;
  }
  fTimeb = v4 - v2->m_fStartTime;
  if ( fTimeb >= 6.0 )
  {
    if ( v2->m_bReservStop )
    {
      if ( v2->m_bWaitAck )
      {
        v5 = ChatColorTab::GetByID(v2->m_kChatItem.kChatColorID);
        if ( v5 )
        {
          SpEffect::Start(v2->m_pkChatColorEffect, (NiNode *)&v2->m_pkSpr.m_pObject->vfptr);
          v2->m_pkChatColorEffect->m_spEffect.m_pObject->m_uFlags &= 0xFFFEu;
          v6 = v2->m_pkSpr.m_pObject->vfptr;
          fTimec = *(float *)&v2->m_pkSpr.m_pObject;
          v7 = PgUtil::Create1PixelSourceTexture(v5->ColorR, v5->ColorG, v5->ColorB, -1);
          v6[113].__vecDelDtor((NiRefObject *)LODWORD(fTimec), (unsigned int)v7);
          v8 = v2->m_kStartSound._Bx._Buf;
          *(_WORD *)&v2->m_bStop = 257;
          if ( v2->m_kStartSound._Myres >= 0x10 )
            v8 = *(char **)v8;
          SoundMgr::PlayInterfaceSound(&g_kSoundMgr, v8);
          if ( pkGame )
          {
            v9 = v2->m_kChatItem.uiColorType - 1;
            if ( v9 )
            {
              v10 = v9 - 1;
              if ( v10 )
              {
                if ( v10 != 1 )
                  return;
                v11 = TextData3::Get(0x35DC82DAu);
              }
              else
              {
                v11 = TextData3::Get(0xF2884192);
              }
            }
            else
            {
              v11 = TextData3::Get(0xF136F6A4);
            }
            GameFrameWork::AddSysMsg(pkGame, (const char *)v11);
          }
        }
      }
    }
    else if ( !v2->m_bWaitAck )
    {
      if ( v3 )
      {
        GameFrameWork::NcItemChatColorChangeReq(v3, v2->m_kChatItem.uiInveInx);
        v2->m_bWaitAck = 1;
      }
    }
  }
}

//----- (00413270) --------------------------------------------------------
void __thiscall ChatColorSpinWin::Reset(ChatColorSpinWin *this)
{
  ChatColorSpinWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkSpr.m_pObject->vfptr[64].__vecDelDtor)(0);
  v1->m_pkChatColorEffect->m_spEffect.m_pObject->m_uFlags |= 1u;
}

//----- (004132A0) --------------------------------------------------------
void __thiscall ChatColorSpinWin::ChatColorSpinWin(ChatColorSpinWin *this)
{
  ChatColorSpinWin *v1; // esi@1
  PgWinSpr *v2; // edi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ChatColorSpinWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ChatColorSpinWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkSpr.m_pObject = 0;
  v1->m_kStartSound._Myres = 15;
  v1->m_kStartSound._Mysize = 0;
  v1->m_kStartSound._Bx._Buf[0] = 0;
  v2 = v1->m_pkSpr.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_pkSpr.m_pObject = 0;
  }
  v1->m_fStartTime = 0.0;
  v1->m_pkChatColorEffect = 0;
  v1->m_fOldTime = 0.0;
  *(_DWORD *)&v1->m_bDecrease = 65792;
  v1->m_bWaitAck = 0;
  v1->m_fSpeed = 0.30000001;
  v1->m_pkTitleText = 0;
  v1->m_kChatItem.uiInveInx = 0;
  v1->m_kChatItem.uiItemID = 0;
  v1->m_kChatItem.uiColorType = 0;
  *(_DWORD *)&v1->m_kChatItem.kChatColorID = 0;
}
// 97141C: using guessed type void (__thiscall *ChatColorSpinWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97143C: using guessed type int (__thiscall *ChatColorSpinWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004133A0) --------------------------------------------------------
void __thiscall ChatColorSpinWin::~ChatColorSpinWin(ChatColorSpinWin *this)
{
  ChatColorSpinWin *v1; // esi@1
  SpEffect *v2; // edi@1
  NiNode *v3; // ebx@2
  PgWinSpr *v4; // edi@9

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ChatColorSpinWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ChatColorSpinWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_pkChatColorEffect;
  if ( v2 )
  {
    NsEffect::~NsEffect(&v2->m_kEffect);
    ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v2->m_kMarkCheck);
    v3 = v2->m_spEffect.m_pObject;
    if ( v2->m_spEffect.m_pObject && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    operator delete(v2);
    v1->m_pkChatColorEffect = 0;
  }
  if ( v1->m_kStartSound._Myres >= 0x10 )
    operator delete(v1->m_kStartSound._Bx._Ptr);
  v1->m_kStartSound._Myres = 15;
  v1->m_kStartSound._Mysize = 0;
  v1->m_kStartSound._Bx._Buf[0] = 0;
  v4 = v1->m_pkSpr.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 97141C: using guessed type void (__thiscall *ChatColorSpinWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97143C: using guessed type int (__thiscall *ChatColorSpinWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004134C0) --------------------------------------------------------
void __thiscall ChatColorSpinWin::OnCommand(ChatColorSpinWin *this, unsigned int wParam, int lParam)
{
  if ( wParam )
  {
    if ( wParam == 1 )
      ((void (*)(void))this->vfptr[90].__vecDelDtor)();
  }
  else
  {
    ChatColorSpinWin::OnOK(this);
  }
}

//----- (004134F0) --------------------------------------------------------
void __thiscall ChatColorSpinWin::DirectMessage(ChatColorSpinWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  char *v4; // esi@4

  if ( iMsgTag == 27 && pvBody && !*(_DWORD *)pvBody )
  {
    v4 = (char *)&this[-1].m_kChildren.m_uiESize;
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)&this[-1].m_kChildren + 100) + 256))(0);
    *(_WORD *)(**((_DWORD **)v4 + 98) + 28) |= 1u;
    ChatColorSpinWin::Roll((ChatColorSpinWin *)v4);
  }
}

//----- (00413540) --------------------------------------------------------
void __thiscall ChatColorSpinWin::OnClose(ChatColorSpinWin *this)
{
  ChatColorSpinWin *v1; // esi@1
  PgFrameWork *v2; // eax@2
  InvWin **v3; // eax@3

  v1 = this;
  if ( this->m_bStop )
  {
    ((void (__stdcall *)(_DWORD))this->m_pkSpr.m_pObject->vfptr[64].__vecDelDtor)(0);
    v1->m_pkChatColorEffect->m_spEffect.m_pObject->m_uFlags |= 1u;
    v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v2 )
    {
      v3 = (InvWin **)v2[19].m_BackFrameID;
      if ( v3 )
        InvWin::SetLock(v3[v1->m_kChatItem.uiInveInx + 87], 0);
    }
    PgWin::PostMsg((PgWin *)&v1->vfptr, 1u, 0, 0);
  }
}

//----- (004135B0) --------------------------------------------------------
void __thiscall ChatColorSpinWin::UpdateTimer(ChatColorSpinWin *this, float fTime)
{
  ChatColorSpinWin *v2; // ebx@1
  double v3; // st7@2
  float v4; // ST1C_4@3
  unsigned int v5; // eax@4
  int v6; // ecx@4
  unsigned int v7; // ecx@5
  ChatColor *v8; // eax@7
  NiRefObjectVtbl **v9; // edi@8
  NiRefObjectVtbl *v10; // esi@8
  NiSourceTexture *v11; // eax@8
  float v12; // ST14_4@11
  float fTimea; // [sp+18h] [bp+8h]@10

  v2 = this;
  if ( this->m_bTimer != 1 )
  {
    v3 = fTime;
    if ( !this->m_bStop )
    {
      v4 = v3 - this->m_fOldTime;
      if ( this->m_fSpeed <= (double)v4 )
      {
        v5 = rand();
        v6 = *(_DWORD *)(ITableBase<ChatColor,ChatColorTab>::ms_pkTable + 56);
        if ( v6 )
          v7 = *(_DWORD *)(v6 + 40);
        else
          v7 = 0;
        v8 = ChatColorTab::GetByID(v5 % v7 + 1);
        if ( v8 )
        {
          v9 = &v2->m_pkSpr.m_pObject->vfptr;
          v10 = *v9;
          v11 = PgUtil::Create1PixelSourceTexture(v8->ColorR, v8->ColorG, v8->ColorB, -1);
          v10[113].__vecDelDtor((NiRefObject *)v9, (unsigned int)v11);
        }
        v3 = fTime;
        v2->m_fOldTime = fTime;
      }
    }
    fTimea = v3 - v2->m_fStartTime;
    if ( fTimea >= 1.5 )
    {
      v12 = v3;
      ChatColorSpinWin::Decrease(v2, v12);
    }
  }
}
// A886DC: using guessed type int ITableBase<ChatColor,ChatColorTab>::ms_pkTable;

//----- (004136A0) --------------------------------------------------------
void __thiscall ChatColorSpinWin::UpdateMeWin(ChatColorSpinWin *this, float fCurTime)
{
  ChatColorSpinWin *v2; // esi@1

  v2 = this;
  SpEffect::Update(this->m_pkChatColorEffect, fCurTime);
  ChatColorSpinWin::UpdateTimer(v2, fCurTime);
}

//----- (004136D0) --------------------------------------------------------
ChatColorSpinWin *__cdecl ChatColorSpinWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  ChatColorSpinWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1A8u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    ChatColorSpinWin::ChatColorSpinWin((ChatColorSpinWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (ChatColorSpinWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00413800) --------------------------------------------------------
char __thiscall ChatColorSpinWin::Create(ChatColorSpinWin *this, PgFrameWork *pkFrameWork)
{
  ChatColorSpinWin *v2; // ebx@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiNode *v5; // eax@3
  NiNode *v6; // esi@7
  volatile LONG *v7; // eax@7
  PgSprData *v9; // eax@12
  D3DXCOLOR v10; // ST24_16@15
  NiSourceTexture *v11; // eax@15
  PgWinSpr *v12; // eax@15
  PgWinSpr *v13; // esi@15
  PgWinSpr *v14; // edi@15
  char *v15; // esi@22
  float v16; // ST18_4@22
  D3DXCOLOR v17; // ST1C_16@22
  NiUnsharedGeometryGroup *v18; // ST0C_4@22
  int v19; // eax@22
  int v20; // eax@22
  D3DXCOLOR v21; // ST18_16@22
  PgWinText *v22; // edi@22
  NiUnsharedGeometryGroup *v23; // esi@22
  int v24; // esi@22
  unsigned int v25; // eax@23
  char *v26; // edi@26
  char v27; // al@27
  unsigned int v28; // eax@28
  char *v29; // edi@28
  char v30; // cl@29
  NiNode *v31; // esi@34
  NiNode *v32; // eax@34
  NiNode *v33; // edi@36
  PgWinSpr *v34; // esi@45
  PgWinText *v35; // edi@45
  NiNode *v36; // eax@46
  SpEffect *v37; // eax@46
  float v38; // edx@48
  float v39; // eax@48
  NiNode *v40; // eax@48
  double v41; // st7@48
  float v42; // edx@48
  float v43; // ecx@48
  NiNode *v44; // esi@49
  unsigned int uiHeight; // [sp+2Ch] [bp-378h]@22
  float v46; // [sp+30h] [bp-374h]@48
  float v47; // [sp+34h] [bp-370h]@48
  float v48; // [sp+38h] [bp-36Ch]@48
  NiPoint3 EffectPos; // [sp+3Ch] [bp-368h]@48
  unsigned int uiWidth; // [sp+48h] [bp-35Ch]@22
  HDC__ *hDC; // [sp+4Ch] [bp-358h]@22
  int uiTop; // [sp+50h] [bp-354h]@12
  int uiLeft; // [sp+54h] [bp-350h]@12
  PgWinText *pkTextWin; // [sp+58h] [bp-34Ch]@22
  UIUtil ui; // [sp+5Ch] [bp-348h]@15
  const char *pcStr; // [sp+70h] [bp-334h]@22
  NiPointer<NiNode> spNode; // [sp+74h] [bp-330h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strbuf; // [sp+78h] [bp-32Ch]@23
  char acResult[512]; // [sp+94h] [bp-310h]@22
  char acStr[256]; // [sp+294h] [bp-110h]@22
  int v61; // [sp+3A0h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v61 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\ChatColorSpin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = spNode.m_pObject;
  if ( !spNode.m_pObject )
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("ChatColorSpin.nif Load Fail", "LoadFail", spNode.m_pObject);
      v5 = spNode.m_pObject;
    }
    v61 = -1;
    if ( !v5 )
      return 0;
    v6 = v5;
    v7 = (volatile LONG *)&v5->m_uiRefCount;
    goto LABEL_8;
  }
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "ChatColorSpin", 0) )
  {
LABEL_13:
    v6 = spNode.m_pObject;
    v61 = -1;
    if ( !spNode.m_pObject )
      return 0;
    v7 = (volatile LONG *)&spNode.m_pObject->m_uiRefCount;
LABEL_8:
    if ( !InterlockedDecrement(v7) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v61) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, uiLeft, uiTop);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  *(_QWORD *)&v10.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v10.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v2->m_pkTitleText = UIUtil::CreateTextNoSpr(&ui, "WinTitle", &byte_971303, v10, 5u);
  UIUtil::CreateSpr(&ui, "Panel01", 0);
  v11 = MenuTexMgr::GetTexture(0x13u);
  UIUtil::CreateSpr(&ui, "Theme", v11);
  UIUtil::CreateSpr(&ui, "BaseSlot", 0);
  v12 = UIUtil::CreateSpr(&ui, "Slot01", 0);
  v13 = v2->m_pkSpr.m_pObject;
  v14 = v12;
  if ( v13 != v12 )
  {
    if ( v13 && !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) && v13 )
      v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
    v2->m_pkSpr.m_pObject = v14;
    if ( v14 )
      InterlockedIncrement((volatile LONG *)&v14->m_uiRefCount);
  }
  ((void (*)(void))v2->m_pkSpr.m_pObject->vfptr[64].__vecDelDtor)();
  UIUtil::CreateSpr(&ui, "Deco01", 0);
  v15 = (char *)UIUtil::CreateButton(&ui, 0, "Ok", 0, 3);
  v16 = Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v17.r = *(_QWORD *)&Color::m_kDxWhiteColor.g;
  *(_QWORD *)&v17.b = __PAIR__(5, LODWORD(Color::m_kDxWhiteColor.a));
  v18 = TextData::Get(0x4F5F499Fu);
  v19 = (*(int (__thiscall **)(char *))(*(_DWORD *)v15 + 148))(v15);
  v20 = (*(int (__thiscall **)(char *, int))(*(_DWORD *)v15 + 144))(v15, v19);
  UIUtil::CreateTextNoTag(&ui, 0, 0, v20, (int)v18, v15, 0, LODWORD(v16), v17, 0, 0, 0);
  UIUtil::CreateButton(&ui, 1u, off_971380, 0, 3);
  PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &uiLeft, &uiTop, &uiWidth, &uiHeight);
  *(_QWORD *)&v21.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v21.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v22 = UIUtil::CreateTextEx(&ui, "Text01", byte_97130D, 0, v21, 5u, 0, 0, 0);
  pkTextWin = v22;
  hDC = Font::Get(0)->m_kFontRenderStuff.hDC;
  v23 = TextData3::Get(0xDFCCCECE);
  pcStr = (const char *)v23;
  acResult[0] = 0;
  memset(&acResult[1], 0, 0x1FFu);
  memset(acStr, 0, 0x100u);
  v24 = PgUtil::StringPixelCopy(acStr, (char *)v23, hDC, uiWidth);
  if ( v24 )
  {
    do
    {
      strbuf._Myres = 15;
      strbuf._Mysize = 0;
      strbuf._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strbuf, acStr, strlen(acStr));
      v25 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::find(&strbuf, "\n", 0, 1u);
      if ( v25 == -1 )
      {
        acStr[v24] = 0;
      }
      else
      {
        acStr[v25] = 0;
        v24 = v25 + 1;
      }
      pcStr += v24;
      v26 = (char *)(&strbuf._Alval + 3);
      do
        v27 = (v26++)[1];
      while ( v27 );
      *(_WORD *)v26 = 10;
      v28 = strlen(acStr) + 1;
      v29 = (char *)(&strbuf._Alval + 3);
      do
        v30 = (v29++)[1];
      while ( v30 );
      qmemcpy(v29, acStr, v28);
      if ( strbuf._Myres >= 0x10 )
        operator delete(strbuf._Bx._Ptr);
      memset(acStr, 0, 0x100u);
      v24 = PgUtil::StringPixelCopy(acStr, (char *)pcStr, hDC, uiWidth);
    }
    while ( v24 );
    v22 = pkTextWin;
  }
  v22->vfptr[118].__vecDelDtor((NiRefObject *)v22, (unsigned int)acResult);
  v22->vfptr[60].__vecDelDtor((NiRefObject *)v22, 0);
  v31 = EffectMgr::GetEffectNode(&g_kEffectMgr, "ChatColorSpinEffect");
  v32 = spNode.m_pObject;
  if ( spNode.m_pObject != v31 )
  {
    if ( spNode.m_pObject )
    {
      v33 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v33 )
          v33->vfptr->__vecDelDtor((NiRefObject *)v33, 1u);
      }
    }
    spNode.m_pObject = v31;
    if ( !v31 )
      goto LABEL_42;
    InterlockedIncrement((volatile LONG *)&v31->m_uiRefCount);
    v32 = spNode.m_pObject;
  }
  if ( !v32 )
  {
LABEL_42:
    if ( NiMessageBox::ms_pfnMessageBox )
      NiMessageBox::ms_pfnMessageBox("ChatColorSpinEffect.nif Load Fail", "LoadFail", 0);
    LOBYTE(v61) = 0;
    UIUtil::~UIUtil(&ui);
    goto LABEL_13;
  }
  v34 = UIUtil::CreateSpr(&ui, "Effect01", 0);
  v35 = (PgWinText *)operator new(0x44u);
  pkTextWin = v35;
  LOBYTE(v61) = 2;
  if ( v35 )
  {
    v36 = (NiNode *)NiObject::Clone((NiObject *)&spNode.m_pObject->vfptr);
    SpEffect::SpEffect((SpEffect *)v35, v36);
  }
  else
  {
    v37 = 0;
  }
  v2->m_pkChatColorEffect = v37;
  v37->m_bClamp = 1;
  v38 = v34->m_kLocal.m_Translate.y;
  v39 = v34->m_kLocal.m_Translate.z;
  EffectPos.x = v34->m_kLocal.m_Translate.x;
  EffectPos.y = v38;
  v46 = -EffectPos.x;
  EffectPos.z = v39;
  v40 = v2->m_pkChatColorEffect->m_spEffect.m_pObject;
  v47 = -v38;
  v41 = EffectPos.z;
  v42 = v47;
  v40->m_kLocal.m_Translate.x = v46;
  v48 = v41;
  v43 = v48;
  v40->m_kLocal.m_Translate.y = v42;
  v40->m_kLocal.m_Translate.z = v43;
  LOBYTE(v61) = 1;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &v2->m_kStartSound,
    "MoverUpgrade_Start",
    0x12u);
  ((void (__thiscall *)(ChatColorSpinWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  LOBYTE(v61) = 0;
  UIUtil::~UIUtil(&ui);
  v61 = -1;
  if ( spNode.m_pObject )
  {
    v44 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v44 )
        v44->vfptr->__vecDelDtor((NiRefObject *)v44, 1u);
    }
  }
  return 1;
}
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00413F10) --------------------------------------------------------
void __thiscall NiAVObject::SetTranslate(NiAVObject *this, float x, float y, float z)
{
  this->m_kLocal.m_Translate.x = x;
  this->m_kLocal.m_Translate.y = y;
  this->m_kLocal.m_Translate.z = z;
}

//----- (00413F40) --------------------------------------------------------
unsigned int __thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::find(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, const char *_Ptr, unsigned int _Off, unsigned int _Count)
{
  unsigned int result; // eax@1
  unsigned int v5; // edi@2
  unsigned int v6; // edi@3
  unsigned int v7; // edi@4
  char *v8; // ebx@6
  int v9; // eax@6
  int v10; // esi@6
  int v11; // eax@8
  void *v12; // ecx@11
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v13; // [sp+0h] [bp-4h]@1

  result = _Off;
  v13 = this;
  if ( __PAIR__(_Count, _Off) > this->_Mysize )
  {
    v5 = this->_Mysize;
    if ( _Off >= v5 )
      goto LABEL_9;
    v6 = v5 - _Off;
    if ( _Count > v6 )
      goto LABEL_9;
    v7 = 1 - _Count + v6;
    if ( this->_Myres >= 0x10 )
      this = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)this->_Bx._Ptr;
    v8 = &this->_Bx._Buf[_Off];
    memchr((char *)this + _Off, *_Ptr, v7);
    v10 = v9;
    if ( v9 )
    {
      while ( std::char_traits<char>::compare((const char *)v10, _Ptr, _Count) )
      {
        v7 = (unsigned int)(&v8[v7 - 1] - v10);
        v8 = (char *)(v10 + 1);
        memchr((char *)(v10 + 1), *_Ptr, v7);
        v10 = v11;
        if ( !v11 )
          goto LABEL_9;
      }
      v12 = v13;
      if ( v13->_Myres >= 0x10 )
        v12 = v13->_Bx._Ptr;
      result = v10 - (_DWORD)v12;
    }
    else
    {
LABEL_9:
      result = -1;
    }
  }
  return result;
}

//----- (00413FF0) --------------------------------------------------------
unsigned int __cdecl ITableBase<ChatColor,ChatColorTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<ChatColor,ChatColorTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A886DC: using guessed type int ITableBase<ChatColor,ChatColorTab>::ms_pkTable;

//----- (00414010) --------------------------------------------------------
ChatColor *__cdecl ChatColorTab::GetByID(char kColorID)
{
  unsigned int v1; // esi@1
  ChatColor *result; // eax@2

  v1 = 0;
  if ( ITableBase<ChatColor,ChatColorTab>::GetTotal() )
  {
    while ( 1 )
    {
      result = (ChatColor *)CDataReader::GetRecord(
                              (CDataReader *)(ITableBase<ChatColor,ChatColorTab>::ms_pkTable + 4),
                              v1);
      if ( result->ChatColorID == kColorID )
        break;
      if ( ++v1 >= ITableBase<ChatColor,ChatColorTab>::GetTotal() )
        goto LABEL_4;
    }
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}
// A886DC: using guessed type int ITableBase<ChatColor,ChatColorTab>::ms_pkTable;

//----- (00414050) --------------------------------------------------------
ChatColorSpinWin *__thiscall ChatColorSpinWin::`scalar deleting destructor'(ChatColorSpinWin *this, unsigned int a2)
{
  ChatColorSpinWin *v2; // esi@1

  v2 = this;
  ChatColorSpinWin::~ChatColorSpinWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00414080) --------------------------------------------------------
void __thiscall ClassChangeWin::OnClose(ClassChangeWin *this)
{
  PgWinMgr::CloseWin(&Pgg_kWinMgr, this->m_pkBox);
}

//----- (004140A0) --------------------------------------------------------
void ClassChangeWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "ClassChangeWin");
}

//----- (004140D0) --------------------------------------------------------
void __thiscall ClassChangeWin::SetMoney(ClassChangeWin *this, unsigned __int64 kTotalPrice)
{
  __int64 v2; // kr00_8@1
  ClassChangeWin *v3; // esi@1
  NiRefObjectVtbl *v4; // ST20_4@1
  __int64 v5; // rax@1
  char *v6; // eax@1
  __int64 v7; // rax@1
  char *v8; // eax@1
  __int64 v9; // rax@1
  char *v10; // eax@1
  __int64 v11; // rax@1
  char *v12; // eax@1
  NiRefObjectVtbl *kTotalPrice_4; // [sp+1Ch] [bp+Ch]@1
  NiRefObjectVtbl *kTotalPrice_4a; // [sp+1Ch] [bp+Ch]@1
  NiRefObjectVtbl *kTotalPrice_4b; // [sp+1Ch] [bp+Ch]@1

  v2 = kTotalPrice;
  v3 = this;
  v4 = this->m_pkGoldText->vfptr;
  v5 = User::GetGold(kTotalPrice);
  v6 = fs("%I64d ", v5);
  v4[118].__vecDelDtor((NiRefObject *)v3->m_pkGoldText, (unsigned int)v6);
  kTotalPrice_4 = v3->m_pkSilverText->vfptr;
  v7 = User::GetSilver(v2);
  v8 = fs("%I64d ", v7);
  kTotalPrice_4[118].__vecDelDtor((NiRefObject *)v3->m_pkSilverText, (unsigned int)v8);
  kTotalPrice_4a = v3->m_pkCopperText->vfptr;
  v9 = User::GetCopper(v2);
  v10 = fs("%I64d ", v9);
  kTotalPrice_4a[118].__vecDelDtor((NiRefObject *)v3->m_pkCopperText, (unsigned int)v10);
  kTotalPrice_4b = v3->m_pkGemText->vfptr;
  v11 = User::GetGem(v2);
  v12 = fs("%I64d ", v11);
  kTotalPrice_4b[118].__vecDelDtor((NiRefObject *)v3->m_pkGemText, (unsigned int)v12);
}

//----- (004141C0) --------------------------------------------------------
void ClassChangeWin::GoCharSelectFrameWork()
{
  PgFrameWork *v1; // eax@1
  WaitingForLogoutWin *v2; // esi@2

  v1 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
  {
    v2 = (WaitingForLogoutWin *)v1[31].m_BackFrameID;
    if ( v2 )
    {
      WaitingForLogoutWin::SetLogoutType(v2, LT_CHARSELECT);
      WaitingForLogoutWin::OnTimeOver(v2);
    }
  }
}

//----- (00414200) --------------------------------------------------------
void __thiscall ClassChangeWin::~ClassChangeWin(ClassChangeWin *this)
{
  ClassChangeWin *v1; // esi@1
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // edi@1
  NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> >Vtbl **v3; // ST10_4@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ClassChangeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ClassChangeWin::`vftable'{for `IDirectMessenger'};
  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kAfterMap;
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMap<unsigned char,NiPointer<PgWinSpr>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kAfterMap);
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v2);
  operator delete[](v2->m_ppkHashTable);
  v3 = &v1->m_kBeforeMap.vfptr;
  *v3 = (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> >Vtbl *)&NiTMap<unsigned char,NiPointer<PgWinSpr>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kBeforeMap);
  *v3 = (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> >Vtbl *)&NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kBeforeMap);
  operator delete[](v1->m_kBeforeMap.m_ppkHashTable);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 971A80: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::`vftable')(void *p, char);
// 971AAC: using guessed type int (__thiscall *NiTMap<unsigned char,NiPointer<PgWinSpr>>::`vftable')(void *p, char);
// 971ACC: using guessed type void (__thiscall *ClassChangeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 971AEC: using guessed type int (__thiscall *ClassChangeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004142D0) --------------------------------------------------------
void __thiscall ClassChangeWin::OnOK(ClassChangeWin *this)
{
  ClassChangeWin *v1; // esi@1
  int v2; // ST0C_4@1
  char *v3; // eax@1
  char *v4; // eax@1
  MsgBox *v5; // eax@1

  v1 = this;
  v2 = ((int (*)(void))this->m_pkAfterText->vfptr[121].__vecDelDtor)();
  v3 = (char *)TextData3::Get(0xEF1FF512);
  v4 = fs(v3, v2);
  v5 = MsgBox::Modal(MSGBOX_OKCANCEL, v4);
  v1->m_pkBox = (PgWin *)v5;
  ((void (__stdcall *)(_DWORD))v5->vfptr->SetMsgHooker)(&v1->vfptr);
  SpEffect::Start(v1->m_pkEndEff, (NiNode *)&v1->m_pkEndWin->vfptr);
  v1->m_pkEndEff->m_spEffect.m_pObject->m_uFlags &= 0xFFFEu;
}

//----- (00414340) --------------------------------------------------------
void __thiscall ClassChangeWin::ClassChangeWin(ClassChangeWin *this)
{
  ClassChangeWin *v1; // esi@1
  char *v2; // eax@1
  unsigned int v3; // ST18_4@1
  char *v4; // eax@1
  unsigned int v5; // ST08_4@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ClassChangeWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ClassChangeWin::`vftable'{for `IDirectMessenger'};
  v1->m_kBeforeMap.m_uiHashSize = 37;
  v1->m_kBeforeMap.vfptr = (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> >Vtbl *)&NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::`vftable';
  v1->m_kBeforeMap.m_kAllocator.m_uiCount = 0;
  v2 = (char *)operator new[](0x94u);
  v3 = 4 * v1->m_kBeforeMap.m_uiHashSize;
  v1->m_kBeforeMap.m_ppkHashTable = (NiTMapItem<unsigned char,NiPointer<PgWinSpr> > **)v2;
  memset(v2, 0, v3);
  v1->m_kBeforeMap.vfptr = (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> >Vtbl *)&NiTMap<unsigned char,NiPointer<PgWinSpr>>::`vftable';
  v1->m_kAfterMap.m_uiHashSize = 37;
  v1->m_kAfterMap.vfptr = (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> >Vtbl *)&NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::`vftable';
  v1->m_kAfterMap.m_kAllocator.m_uiCount = 0;
  v4 = (char *)operator new[](0x94u);
  v5 = 4 * v1->m_kAfterMap.m_uiHashSize;
  v1->m_kAfterMap.m_ppkHashTable = (NiTMapItem<unsigned char,NiPointer<PgWinSpr> > **)v4;
  memset(v4, 0, v5);
  v1->m_kAfterMap.vfptr = (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> >Vtbl *)&NiTMap<unsigned char,NiPointer<PgWinSpr>>::`vftable';
  v1->m_pSlideBarList = 0;
  v1->m_pkBeforeText = 0;
  v1->m_pkAfterText = 0;
  v1->m_pkCopperText = 0;
  v1->m_pkSilverText = 0;
  v1->m_pkGoldText = 0;
  v1->m_pkGemText = 0;
  v1->m_pkBox = 0;
  v1->m_pkEndWin = 0;
  v1->m_pkEndEff = 0;
}
// 971A80: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::`vftable')(void *p, char);
// 971AAC: using guessed type int (__thiscall *NiTMap<unsigned char,NiPointer<PgWinSpr>>::`vftable')(void *p, char);
// 971ACC: using guessed type void (__thiscall *ClassChangeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 971AEC: using guessed type int (__thiscall *ClassChangeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00414480) --------------------------------------------------------
char __thiscall ClassChangeWin::Create(ClassChangeWin *this, PgFrameWork *pkFrameWokr)
{
  ClassChangeWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiNode *v5; // eax@3
  NiNode *v6; // esi@7
  char result; // al@10
  PgSprData *v8; // eax@11
  NiNode *v9; // esi@12
  NiSourceTexture *v10; // eax@17
  PgSprData *v11; // eax@18
  PgWinSpr *v12; // edi@20
  NiTexturePalette *v13; // ebx@20
  const char *v14; // eax@22
  SpEffect *v15; // ebx@22
  NiNode *v16; // eax@23
  SpEffect *v17; // eax@23
  float v18; // edx@25
  float v19; // ecx@25
  double v20; // st7@25
  NiNode *v21; // edx@25
  double v22; // st7@25
  NiTexturePalette *v23; // edi@25
  const char *v24; // eax@27
  SpEffect *v25; // edi@27
  NiNode *v26; // eax@28
  SpEffect *v27; // eax@28
  PgWinSpr *v28; // ecx@30
  NiNode *v29; // eax@30
  float v30; // edx@30
  float v31; // ecx@30
  double v32; // st7@30
  float v33; // ecx@30
  float v34; // edx@30
  PgWinBut *v35; // edi@30
  D3DXCOLOR v36; // ST1C_16@30
  char *v37; // ST10_4@30
  int v38; // ST0C_4@30
  int v39; // eax@30
  PgWinBut *v40; // edi@30
  D3DXCOLOR v41; // ST1C_16@30
  char *v42; // ST10_4@30
  int v43; // ST0C_4@30
  int v44; // eax@30
  D3DXCOLOR v45; // ST1C_16@30
  char *v46; // eax@30
  D3DXCOLOR v47; // ST24_16@30
  char *v48; // eax@30
  D3DXCOLOR v49; // ST24_16@30
  char *v50; // eax@30
  double v51; // st6@31
  double v52; // st3@35
  float v53; // edi@36
  double v54; // st3@40
  float v55; // edx@41
  double v56; // st7@45
  float v57; // eax@46
  D3DXCOLOR v58; // ST18_16@50
  PgWinText *v59; // eax@50
  double v60; // st6@50
  double v61; // st6@51
  double v62; // st5@51
  double v63; // st4@51
  double v64; // st3@55
  float v65; // edi@56
  double v66; // st3@60
  float v67; // edx@61
  double v68; // st7@65
  float v69; // eax@66
  double v70; // rt2@67
  double v71; // st4@67
  double v72; // st6@67
  D3DXCOLOR v73; // ST18_16@70
  PgWinText *v74; // eax@70
  double v75; // st6@70
  double v76; // st6@71
  double v77; // st5@71
  double v78; // st4@71
  double v79; // st3@75
  float v80; // edi@76
  double v81; // st3@80
  float v82; // edx@81
  double v83; // st7@85
  float v84; // eax@86
  double v85; // rt0@87
  double v86; // st4@87
  double v87; // st6@87
  D3DXCOLOR v88; // ST18_16@90
  PgWinText *v89; // eax@90
  double v90; // st6@90
  double v91; // st6@91
  double v92; // st5@91
  double v93; // st4@91
  double v94; // st3@95
  float v95; // edi@96
  double v96; // st3@100
  float v97; // edx@101
  double v98; // st7@105
  float v99; // eax@106
  double v100; // rt2@107
  double v101; // st4@107
  double v102; // st6@107
  D3DXCOLOR v103; // ST18_16@110
  PgWinText *v104; // eax@110
  D3DXCOLOR v105; // ST24_16@110
  char *v106; // eax@110
  NiSourceTexture *v107; // edi@110
  D3DXCOLOR v108; // ST1C_16@112
  PgWinAbbreviateText *v109; // eax@112
  PgWinAbbreviateText *v110; // edi@112
  NiRefObjectVtbl *v111; // ebx@112
  NiUnsharedGeometryGroup *v112; // eax@112
  D3DXCOLOR v113; // ST28_16@112
  char *v114; // eax@112
  PgSprData *v115; // eax@112
  SlideBar *v116; // eax@112
  SlideBar *v117; // eax@112
  NiRefObjectVtbl *v118; // ebx@112
  SlideBar *v119; // edi@112
  int v120; // eax@112
  int v121; // eax@112
  float v122; // ecx@112
  PgWinSpr *v123; // eax@112
  float v124; // ecx@114
  PgWinSpr *v125; // eax@114
  float v126; // ecx@116
  PgWinSpr *v127; // eax@116
  float v128; // ecx@118
  PgWinSpr *v129; // eax@118
  float v130; // ecx@120
  PgWinSpr *v131; // eax@120
  float v132; // ecx@122
  PgWinSpr *v133; // eax@122
  float v134; // ecx@124
  PgWinSpr *v135; // eax@124
  float v136; // ecx@126
  PgWinSpr *v137; // eax@126
  float v138; // ecx@128
  PgWinSpr *v139; // eax@128
  float v140; // ecx@130
  PgWinSpr *v141; // eax@130
  float v142; // ecx@132
  PgWinSpr *v143; // eax@132
  float v144; // ecx@134
  PgWinSpr *v145; // eax@134
  float v146; // ecx@136
  PgWinSpr *v147; // eax@136
  float v148; // ecx@138
  PgWinSpr *v149; // eax@138
  float v150; // ecx@140
  PgWinSpr *v151; // eax@140
  float v152; // ecx@142
  PgWinSpr *v153; // eax@142
  float v154; // ecx@144
  PgWinSpr *v155; // eax@144
  float v156; // ecx@146
  PgWinSpr *v157; // eax@146
  float v158; // ecx@148
  PgWinSpr *v159; // eax@148
  float v160; // ecx@150
  PgWinSpr *v161; // eax@150
  float v162; // ecx@152
  PgWinSpr *v163; // eax@152
  PgWinSpr *v164; // eax@154
  void *(__thiscall *v165)(NiRefObject *, unsigned int); // edx@156
  NiNode *v166; // esi@157
  NiNode *v167; // esi@160
  NiPointer<PgWinSpr> v168; // [sp+30h] [bp-5Ch]@112
  UIUtil ui; // [sp+40h] [bp-4Ch]@17
  float v170; // [sp+54h] [bp-38h]@25
  float v171; // [sp+58h] [bp-34h]@25
  float v172; // [sp+5Ch] [bp-30h]@25
  NiPoint3 EffectPos; // [sp+60h] [bp-2Ch]@25
  float v174; // [sp+6Ch] [bp-20h]@31
  NiPointer<NiNode> pkNiNodePtr; // [sp+70h] [bp-1Ch]@20
  int iLeft; // [sp+74h] [bp-18h]@11
  int iTop; // [sp+78h] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+7Ch] [bp-10h]@1
  int v179; // [sp+88h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v179 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\ClassChangeWin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = spNode.m_pObject;
  if ( spNode.m_pObject )
  {
    v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iLeft, &iTop, 0);
    if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v8, 0, pkFrameWokr, "ClassChageWin", 0) )
    {
      UIUtil::UIUtil(&ui);
      LOBYTE(v179) = 1;
      UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
      UIUtil::SetOffset(&ui, iLeft, iTop);
      UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
      v10 = MenuTexMgr::GetTexture(0x13u);
      if ( v10 )
        v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, v10);
      else
        v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, 0);
      PgWinSpr::CreateWin(iLeft, iTop, v11, (PgWin *)&v2->vfptr, 0, 0);
      UIUtil::CreateSpr(&ui, "Panel01", 0);
      UIUtil::CreateSpr(&ui, "Panel02", 0);
      v12 = UIUtil::CreateSpr(&ui, "ClassChangeImage", 0);
      pkNiNodePtr.m_pObject = 0;
      v13 = pTexturePalette;
      LOBYTE(v179) = 2;
      if ( !Folder::m_bInit )
        Folder::Init();
      v14 = Folder::Merge(&Folder::m_acEffect, "ClassChangeWin_loop.nif");
      PgUtil::LoadNodeNifFile(v14, &pkNiNodePtr, v13);
      v15 = (SpEffect *)operator new(0x44u);
      LOBYTE(v179) = 3;
      if ( v15 )
      {
        v16 = (NiNode *)NiObject::Clone((NiObject *)&pkNiNodePtr.m_pObject->vfptr);
        SpEffect::SpEffect(v15, v16);
      }
      else
      {
        v17 = 0;
      }
      v18 = v12->m_kLocal.m_Translate.y;
      EffectPos.x = v12->m_kLocal.m_Translate.x;
      v19 = v12->m_kLocal.m_Translate.z;
      v170 = -EffectPos.x;
      EffectPos.z = v19;
      EffectPos.y = v18;
      v20 = v18;
      v21 = v17->m_spEffect.m_pObject;
      v21->m_kLocal.m_Translate.x = v170;
      v171 = -v20;
      v22 = EffectPos.z;
      v21->m_kLocal.m_Translate.y = v171;
      v172 = v22;
      v21->m_kLocal.m_Translate.z = v172;
      LOBYTE(v179) = 2;
      v17->m_bLoop = 1;
      SpEffect::Start(v17, (NiNode *)&v12->vfptr);
      v2->m_pkEndWin = UIUtil::CreateSpr(&ui, "ArrowIcon", 0);
      v23 = pTexturePalette;
      if ( !Folder::m_bInit )
        Folder::Init();
      v24 = Folder::Merge(&Folder::m_acEffect, "ClassChangeWin_end.nif");
      PgUtil::LoadNodeNifFile(v24, &pkNiNodePtr, v23);
      v25 = (SpEffect *)operator new(0x44u);
      LOBYTE(v179) = 4;
      if ( v25 )
      {
        v26 = (NiNode *)NiObject::Clone((NiObject *)&pkNiNodePtr.m_pObject->vfptr);
        SpEffect::SpEffect(v25, v26);
      }
      else
      {
        v27 = 0;
      }
      v28 = v2->m_pkEndWin;
      v2->m_pkEndEff = v27;
      v29 = v27->m_spEffect.m_pObject;
      EffectPos.x = v28->m_kLocal.m_Translate.x;
      v30 = v28->m_kLocal.m_Translate.y;
      v31 = v28->m_kLocal.m_Translate.z;
      v170 = -EffectPos.x;
      EffectPos.y = v30;
      EffectPos.z = v31;
      v171 = -v30;
      v32 = v31;
      v33 = v171;
      v29->m_kLocal.m_Translate.x = v170;
      v172 = v32;
      v34 = v172;
      v29->m_kLocal.m_Translate.y = v33;
      v29->m_kLocal.m_Translate.z = v34;
      v2->m_pkEndEff->m_spEffect.m_pObject->m_uFlags |= 1u;
      LOBYTE(v179) = 2;
      v35 = UIUtil::CreateButton(&ui, 0, "Ok", 0, 3);
      *(_QWORD *)&v36.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v36.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v37 = (char *)TextData3::Get(0xB2E6EFC5);
      v38 = ((int (__thiscall *)(PgWinBut *))v35->vfptr[37].__vecDelDtor)(v35);
      v39 = ((int (__thiscall *)(PgWinBut *))v35->vfptr[36].__vecDelDtor)(v35);
      UIUtil::CreateTextNoTag(&ui, 0, 0, v39, v38, v37, (PgWin *)&v35->vfptr, 0, v36, 5u, 0, 0);
      v40 = UIUtil::CreateButton(&ui, 1u, "Cancel", 0, 3);
      *(_QWORD *)&v41.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v41.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v42 = (char *)TextData3::Get(0xF41F3213);
      v43 = ((int (__thiscall *)(PgWinBut *))v40->vfptr[37].__vecDelDtor)(v40);
      v44 = ((int (__thiscall *)(PgWinBut *))v40->vfptr[36].__vecDelDtor)(v40);
      UIUtil::CreateTextNoTag(&ui, 0, 0, v44, v43, v42, (PgWin *)&v40->vfptr, 0, v41, 5u, 0, 0);
      *(_QWORD *)&v45.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v45.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v46 = (char *)TextData3::Get(0x4620F773u);
      UIUtil::CreateTextNoSprEx(&ui, "CautionText", v46, v45, 5u, 0, 0);
      *(_QWORD *)&v47.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v47.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v48 = (char *)TextData3::Get(0x204CFC4Cu);
      v2->m_pkBeforeText = UIUtil::CreateTextNoSpr(&ui, "ClassNameText01", v48, v47, 5u);
      *(_QWORD *)&v49.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v49.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v50 = (char *)TextData3::Get(0x1F420A08u);
      v2->m_pkAfterText = UIUtil::CreateTextNoSpr(&ui, "ClassNameText02", v50, v49, 5u);
      UIUtil::CreateButton(&ui, 1u, off_971760, 0, 3);
      UIUtil::CreateSpr(&ui, "CopperBtn", 0);
      if ( Color::m_kDxWhiteColor.r < 1.0 )
      {
        if ( Color::m_kDxWhiteColor.r > 0.0 )
        {
          v51 = 0.0;
          *(_QWORD *)&EffectPos.y = (signed __int64)(Color::m_kDxWhiteColor.r * 255.0 + 0.5);
          v174 = EffectPos.y;
        }
        else
        {
          v51 = 0.0;
          v174 = 0.0;
        }
      }
      else
      {
        v51 = 0.0;
        LODWORD(v174) = 255;
      }
      v52 = Color::m_kDxWhiteColor.g;
      if ( Color::m_kDxWhiteColor.g < 1.0 )
      {
        if ( v52 > v51 )
        {
          *(_QWORD *)&EffectPos.y = (signed __int64)(v52 * 255.0 + 0.5);
          v53 = EffectPos.y;
        }
        else
        {
          v53 = 0.0;
        }
      }
      else
      {
        LODWORD(v53) = 255;
      }
      v54 = Color::m_kDxWhiteColor.b;
      if ( Color::m_kDxWhiteColor.b < 1.0 )
      {
        if ( v54 > v51 )
        {
          *(_QWORD *)&EffectPos.y = (signed __int64)(v54 * 255.0 + 0.5);
          v55 = EffectPos.y;
        }
        else
        {
          v55 = 0.0;
        }
      }
      else
      {
        LODWORD(v55) = 255;
      }
      v56 = Color::m_kDxWhiteColor.a;
      if ( Color::m_kDxWhiteColor.a < 1.0 )
      {
        if ( v51 < v56 )
        {
          *(_QWORD *)&EffectPos.y = (signed __int64)(v56 * 255.0 + 0.5);
          v57 = EffectPos.y;
        }
        else
        {
          v57 = 0.0;
        }
      }
      else
      {
        LODWORD(v57) = 255;
      }
      *(_QWORD *)&v58.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v58.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v59 = UIUtil::CreateTextEx(
              &ui,
              "CopperInput",
              &byte_971681,
              LODWORD(v55) | ((LODWORD(v53) | ((LODWORD(v174) | (LODWORD(v57) << 8)) << 8)) << 8),
              v58,
              5u,
              0,
              0,
              0);
      v2->m_pkCopperText = v59;
      v59->vfptr[122].__vecDelDtor((NiRefObject *)v59, 6u);
      UIUtil::CreateSpr(&ui, "SilverBtn", 0);
      v60 = Color::m_kDxWhiteColor.r;
      if ( Color::m_kDxWhiteColor.r < 1.0 )
      {
        if ( v60 > 0.0 )
        {
          *(_QWORD *)&EffectPos.y = (signed __int64)(v60 * 255.0 + 0.5);
          v174 = EffectPos.y;
          v61 = 0.0;
          v63 = 255.0;
          v62 = 0.5;
        }
        else
        {
          v61 = 0.0;
          v174 = 0.0;
          v62 = 0.5;
          v63 = 255.0;
        }
      }
      else
      {
        LODWORD(v174) = 255;
        v61 = 0.0;
        v62 = 0.5;
        v63 = 255.0;
      }
      v64 = Color::m_kDxWhiteColor.g;
      if ( Color::m_kDxWhiteColor.g < 1.0 )
      {
        if ( v64 > v61 )
        {
          *(_QWORD *)&EffectPos.y = (signed __int64)(v64 * v63 + v62);
          v65 = EffectPos.y;
        }
        else
        {
          v65 = 0.0;
        }
      }
      else
      {
        LODWORD(v65) = 255;
      }
      v66 = Color::m_kDxWhiteColor.b;
      if ( Color::m_kDxWhiteColor.b < 1.0 )
      {
        if ( v66 > v61 )
        {
          *(_QWORD *)&EffectPos.y = (signed __int64)(v66 * v63 + v62);
          v67 = EffectPos.y;
        }
        else
        {
          v67 = 0.0;
        }
      }
      else
      {
        LODWORD(v67) = 255;
      }
      v68 = Color::m_kDxWhiteColor.a;
      if ( Color::m_kDxWhiteColor.a < 1.0 )
      {
        v70 = v63;
        v71 = v61;
        v72 = v70;
        if ( v71 < v68 )
        {
          *(_QWORD *)&EffectPos.y = (signed __int64)(v62 + v72 * v68);
          v69 = EffectPos.y;
        }
        else
        {
          v69 = 0.0;
        }
      }
      else
      {
        LODWORD(v69) = 255;
      }
      *(_QWORD *)&v73.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v73.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v74 = UIUtil::CreateTextEx(
              &ui,
              "SilverInput",
              &byte_971682,
              LODWORD(v67) | ((LODWORD(v65) | ((LODWORD(v174) | (LODWORD(v69) << 8)) << 8)) << 8),
              v73,
              5u,
              0,
              0,
              0);
      v2->m_pkSilverText = v74;
      v74->vfptr[122].__vecDelDtor((NiRefObject *)v74, 6u);
      UIUtil::CreateSpr(&ui, "GoldBtn", 0);
      v75 = Color::m_kDxWhiteColor.r;
      if ( Color::m_kDxWhiteColor.r < 1.0 )
      {
        if ( v75 > 0.0 )
        {
          *(_QWORD *)&EffectPos.y = (signed __int64)(v75 * 255.0 + 0.5);
          v174 = EffectPos.y;
          v76 = 0.0;
          v78 = 255.0;
          v77 = 0.5;
        }
        else
        {
          v76 = 0.0;
          v174 = 0.0;
          v77 = 0.5;
          v78 = 255.0;
        }
      }
      else
      {
        LODWORD(v174) = 255;
        v76 = 0.0;
        v77 = 0.5;
        v78 = 255.0;
      }
      v79 = Color::m_kDxWhiteColor.g;
      if ( Color::m_kDxWhiteColor.g < 1.0 )
      {
        if ( v79 > v76 )
        {
          *(_QWORD *)&EffectPos.y = (signed __int64)(v79 * v78 + v77);
          v80 = EffectPos.y;
        }
        else
        {
          v80 = 0.0;
        }
      }
      else
      {
        LODWORD(v80) = 255;
      }
      v81 = Color::m_kDxWhiteColor.b;
      if ( Color::m_kDxWhiteColor.b < 1.0 )
      {
        if ( v81 > v76 )
        {
          *(_QWORD *)&EffectPos.y = (signed __int64)(v81 * v78 + v77);
          v82 = EffectPos.y;
        }
        else
        {
          v82 = 0.0;
        }
      }
      else
      {
        LODWORD(v82) = 255;
      }
      v83 = Color::m_kDxWhiteColor.a;
      if ( Color::m_kDxWhiteColor.a < 1.0 )
      {
        v85 = v78;
        v86 = v76;
        v87 = v85;
        if ( v86 < v83 )
        {
          *(_QWORD *)&EffectPos.y = (signed __int64)(v77 + v87 * v83);
          v84 = EffectPos.y;
        }
        else
        {
          v84 = 0.0;
        }
      }
      else
      {
        LODWORD(v84) = 255;
      }
      *(_QWORD *)&v88.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v88.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v89 = UIUtil::CreateTextEx(
              &ui,
              "GoldInput",
              &byte_971683,
              LODWORD(v82) | ((LODWORD(v80) | ((LODWORD(v174) | (LODWORD(v84) << 8)) << 8)) << 8),
              v88,
              5u,
              0,
              0,
              0);
      v2->m_pkGoldText = v89;
      v89->vfptr[122].__vecDelDtor((NiRefObject *)v89, 6u);
      UIUtil::CreateSpr(&ui, "GemBtn", 0);
      v90 = Color::m_kDxWhiteColor.r;
      if ( Color::m_kDxWhiteColor.r < 1.0 )
      {
        if ( v90 > 0.0 )
        {
          *(_QWORD *)&EffectPos.y = (signed __int64)(v90 * 255.0 + 0.5);
          v174 = EffectPos.y;
          v91 = 0.0;
          v93 = 255.0;
          v92 = 0.5;
        }
        else
        {
          v91 = 0.0;
          v174 = 0.0;
          v92 = 0.5;
          v93 = 255.0;
        }
      }
      else
      {
        LODWORD(v174) = 255;
        v91 = 0.0;
        v92 = 0.5;
        v93 = 255.0;
      }
      v94 = Color::m_kDxWhiteColor.g;
      if ( Color::m_kDxWhiteColor.g < 1.0 )
      {
        if ( v94 > v91 )
        {
          *(_QWORD *)&EffectPos.y = (signed __int64)(v94 * v93 + v92);
          v95 = EffectPos.y;
        }
        else
        {
          v95 = 0.0;
        }
      }
      else
      {
        LODWORD(v95) = 255;
      }
      v96 = Color::m_kDxWhiteColor.b;
      if ( Color::m_kDxWhiteColor.b < 1.0 )
      {
        if ( v96 > v91 )
        {
          *(_QWORD *)&EffectPos.y = (signed __int64)(v96 * v93 + v92);
          v97 = EffectPos.y;
        }
        else
        {
          v97 = 0.0;
        }
      }
      else
      {
        LODWORD(v97) = 255;
      }
      v98 = Color::m_kDxWhiteColor.a;
      if ( Color::m_kDxWhiteColor.a < 1.0 )
      {
        v100 = v93;
        v101 = v91;
        v102 = v100;
        if ( v101 < v98 )
        {
          *(_QWORD *)&EffectPos.y = (signed __int64)(v92 + v102 * v98);
          v99 = EffectPos.y;
        }
        else
        {
          v99 = 0.0;
        }
      }
      else
      {
        LODWORD(v99) = 255;
      }
      *(_QWORD *)&v103.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v103.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v104 = UIUtil::CreateTextEx(
               &ui,
               "GemInput",
               &byte_97169D,
               LODWORD(v97) | ((LODWORD(v95) | ((LODWORD(v174) | (LODWORD(v99) << 8)) << 8)) << 8),
               v103,
               5u,
               0,
               0,
               0);
      v2->m_pkGemText = v104;
      v104->vfptr[122].__vecDelDtor((NiRefObject *)v104, 6u);
      UIUtil::CreateSpr(&ui, "IconSlot", 0);
      *(_QWORD *)&v105.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v105.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v106 = (char *)TextData3::Get(0x68DCA5A8u);
      UIUtil::CreateTextNoSpr(&ui, "RecompenseText", v106, v105, 5u);
      v107 = MenuTexMgr::GetTexture(4u);
      if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
        UIUtil::CreateBtn(&ui, 3u, "HelpLinkNor", "HelpLinkOver", "HelpLinkClick", 0, v107);
      *(_QWORD *)&v108.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v108.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v109 = UIUtil::CreateText(&ui, "Text01", byte_97169E, 0, v108, 0, 0, 0);
      v110 = v109;
      v111 = v109->vfptr;
      v112 = TextData3::Get(0x9BCCAEDA);
      ((void (__thiscall *)(PgWinAbbreviateText *, NiUnsharedGeometryGroup *, _DWORD, PgWinSpr *))v111[120].__vecDelDtor)(
        v110,
        v112,
        0,
        v168.m_pObject);
      v110->vfptr[60].__vecDelDtor((NiRefObject *)v110, 0);
      *(_QWORD *)&v113.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v113.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v114 = (char *)TextData3::Get(0xBBCA1A3B);
      UIUtil::CreateTextNoSpr(&ui, "WinTitle", v114, v113, 5u);
      v115 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle", &iLeft, &iTop, 0);
      v116 = SlideBar::CreateWin(
               spNode.m_pObject,
               "SlideBar",
               "SlideBar_UpBtn",
               "SlideBar_DnBtn",
               v115,
               0,
               (PgWin *)&v2->vfptr);
      v2->m_pSlideBarList = v116;
      v116->m_uiClickMsg = 2;
      v2->m_pSlideBarList->m_eType = 1;
      v117 = v2->m_pSlideBarList;
      v118 = v117->vfptr;
      v119 = v2->m_pSlideBarList;
      v120 = ((int (__thiscall *)(SlideBar *))v117->vfptr[42].__vecDelDtor)(v2->m_pSlideBarList);
      v121 = (int)v119->vfptr[41].__vecDelDtor((NiRefObject *)v119, v120);
      v118[77].__vecDelDtor((NiRefObject *)v2->m_pSlideBarList, v121 - 18);
      *(float *)&v168.m_pObject = v122;
      *(float *)&v123 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, "ClassEmblemAssassin", 0));
      v168.m_pObject = v123;
      if ( *(float *)&v123 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v123->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *)&v2->m_kBeforeMap.vfptr,
        25,
        v168);
      *(float *)&v168.m_pObject = v124;
      *(float *)&v125 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, "ClassEmblemCloser", 0));
      v168.m_pObject = v125;
      if ( *(float *)&v125 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v125->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *)&v2->m_kBeforeMap.vfptr,
        24,
        v168);
      *(float *)&v168.m_pObject = v126;
      *(float *)&v127 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, "ClassEmblemGladiator", 0));
      v168.m_pObject = v127;
      if ( *(float *)&v127 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v127->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *)&v2->m_kBeforeMap.vfptr,
        4,
        v168);
      *(float *)&v168.m_pObject = v128;
      *(float *)&v129 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, "ClassEmblemGuardian", 0));
      v168.m_pObject = v129;
      if ( *(float *)&v129 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v129->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *)&v2->m_kBeforeMap.vfptr,
        10,
        v168);
      *(float *)&v168.m_pObject = v130;
      *(float *)&v131 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, "ClassEmblemHolyknight", 0));
      v168.m_pObject = v131;
      if ( *(float *)&v131 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v131->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *)&v2->m_kBeforeMap.vfptr,
        9,
        v168);
      *(float *)&v168.m_pObject = v132;
      *(float *)&v133 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, "ClassEmblemKnight", 0));
      v168.m_pObject = v133;
      if ( *(float *)&v133 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v133->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *)&v2->m_kBeforeMap.vfptr,
        5,
        v168);
      *(float *)&v168.m_pObject = v134;
      *(float *)&v135 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, "ClassEmblemRanger", 0));
      v168.m_pObject = v135;
      if ( *(float *)&v135 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v135->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *)&v2->m_kBeforeMap.vfptr,
        15,
        v168);
      *(float *)&v168.m_pObject = v136;
      *(float *)&v137 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, "ClassEmblemSentinel", 0));
      v168.m_pObject = v137;
      if ( *(float *)&v137 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v137->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *)&v2->m_kBeforeMap.vfptr,
        26,
        v168);
      *(float *)&v168.m_pObject = v138;
      *(float *)&v139 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, "ClassEmblemSharpshooter", 0));
      v168.m_pObject = v139;
      if ( *(float *)&v139 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v139->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *)&v2->m_kBeforeMap.vfptr,
        14,
        v168);
      *(float *)&v168.m_pObject = v140;
      *(float *)&v141 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, "ClassEmblemWarlock", 0));
      v168.m_pObject = v141;
      if ( *(float *)&v141 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v141->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *)&v2->m_kBeforeMap.vfptr,
        19,
        v168);
      *(float *)&v168.m_pObject = v142;
      *(float *)&v143 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, "ClassEmblemWizard", 0));
      v168.m_pObject = v143;
      if ( *(float *)&v143 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v143->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *)&v2->m_kBeforeMap.vfptr,
        20,
        v168);
      *(float *)&v168.m_pObject = v144;
      *(float *)&v145 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, "ClassEmblemAssassin01", 0));
      v168.m_pObject = v145;
      if ( *(float *)&v145 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v145->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *)&v2->m_kAfterMap.vfptr,
        25,
        v168);
      *(float *)&v168.m_pObject = v146;
      *(float *)&v147 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, "ClassEmblemCloser01", 0));
      v168.m_pObject = v147;
      if ( *(float *)&v147 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v147->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *)&v2->m_kAfterMap.vfptr,
        24,
        v168);
      *(float *)&v168.m_pObject = v148;
      *(float *)&v149 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, "ClassEmblemGladiator01", 0));
      v168.m_pObject = v149;
      if ( *(float *)&v149 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v149->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *)&v2->m_kAfterMap.vfptr,
        4,
        v168);
      *(float *)&v168.m_pObject = v150;
      *(float *)&v151 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, "ClassEmblemGuardian01", 0));
      v168.m_pObject = v151;
      if ( *(float *)&v151 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v151->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *)&v2->m_kAfterMap.vfptr,
        10,
        v168);
      *(float *)&v168.m_pObject = v152;
      *(float *)&v153 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, "ClassEmblemHolyknight01", 0));
      v168.m_pObject = v153;
      if ( *(float *)&v153 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v153->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *)&v2->m_kAfterMap.vfptr,
        9,
        v168);
      *(float *)&v168.m_pObject = v154;
      *(float *)&v155 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, "ClassEmblemKnight01", 0));
      v168.m_pObject = v155;
      if ( *(float *)&v155 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v155->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *)&v2->m_kAfterMap.vfptr,
        5,
        v168);
      *(float *)&v168.m_pObject = v156;
      *(float *)&v157 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, "ClassEmblemRanger01", 0));
      v168.m_pObject = v157;
      if ( *(float *)&v157 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v157->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *)&v2->m_kAfterMap.vfptr,
        15,
        v168);
      *(float *)&v168.m_pObject = v158;
      *(float *)&v159 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, "ClassEmblemSentinel01", 0));
      v168.m_pObject = v159;
      if ( *(float *)&v159 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v159->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *)&v2->m_kAfterMap.vfptr,
        26,
        v168);
      *(float *)&v168.m_pObject = v160;
      *(float *)&v161 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, "ClassEmblemSharpshooter01", 0));
      v168.m_pObject = v161;
      if ( *(float *)&v161 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v161->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *)&v2->m_kAfterMap.vfptr,
        14,
        v168);
      *(float *)&v168.m_pObject = v162;
      *(float *)&v163 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, "ClassEmblemWarlock01", 0));
      v168.m_pObject = v163;
      if ( *(float *)&v163 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v163->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *)&v2->m_kAfterMap.vfptr,
        19,
        v168);
      *(float *)&v164 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, "ClassEmblemWizard01", 0));
      v168.m_pObject = v164;
      if ( *(float *)&v164 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v164->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *)&v2->m_kAfterMap.vfptr,
        20,
        v168);
      v165 = v2->vfptr[59].__vecDelDtor;
      *(float *)&v168.m_pObject = 0.5;
      ((void (__thiscall *)(ClassChangeWin *, unsigned int, unsigned int, _DWORD))v165)(
        v2,
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        0.5);
      LOBYTE(v179) = 1;
      if ( pkNiNodePtr.m_pObject )
      {
        v166 = pkNiNodePtr.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&pkNiNodePtr.m_pObject->m_uiRefCount) )
        {
          if ( v166 )
            v166->vfptr->__vecDelDtor((NiRefObject *)v166, 1u);
        }
      }
      LOBYTE(v179) = 0;
      UIUtil::~UIUtil(&ui);
      v167 = spNode.m_pObject;
      v179 = -1;
      if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v167 )
        v167->vfptr->__vecDelDtor((NiRefObject *)v167, 1u);
      result = 1;
    }
    else
    {
      v9 = spNode.m_pObject;
      v179 = -1;
      if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v9 )
        v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      result = 0;
    }
  }
  else
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("ClassChangeWin load fail", "LoadFail", 0);
      v5 = spNode.m_pObject;
    }
    v179 = -1;
    if ( v5 )
    {
      v6 = v5;
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    result = 0;
  }
  return result;
}
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004157C0) --------------------------------------------------------
void __thiscall ClassChangeWin::OnCommand(ClassChangeWin *this, unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@4

  if ( wParam )
  {
    if ( wParam == 1 )
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
    }
    else if ( wParam == 3 )
    {
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v3 )
        GameFrameWork::OpenPlayGuideSearchList(v3, "ClassChangeWin");
    }
  }
  else
  {
    ClassChangeWin::OnOK(this);
  }
}

//----- (00415810) --------------------------------------------------------
void __thiscall ClassChangeWin::SetChangeClassID(ClassChangeWin *this, int kNewClass)
{
  NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *v2; // esi@1
  unsigned int v3; // ecx@1
  unsigned int v4; // eax@1
  NiTMapItem<unsigned char,NiPointer<PgWinSpr> > **v5; // edx@2
  int v6; // eax@5
  unsigned int v7; // edx@8
  NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *v8; // edi@8
  unsigned int v9; // eax@8
  NiTMapItem<unsigned char,NiPointer<PgWinSpr> > **v10; // ecx@9
  int v11; // eax@12
  char v12; // al@15
  int v13; // esi@15
  char *v14; // eax@15
  NiUnsharedGeometryGroup *v15; // eax@16
  char *v16; // eax@20
  NiUnsharedGeometryGroup *v17; // eax@21
  PgWinSpr *v18; // esi@26
  int v19; // [sp+0h] [bp-30h]@0
  NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *v20; // [sp+10h] [bp-20h]@1
  ClassChangeWin *v21; // [sp+14h] [bp-1Ch]@1
  int kBeforeClass; // [sp+18h] [bp-18h]@6
  NiPointer<PgWinSpr> spSpr; // [sp+1Ch] [bp-14h]@1
  char kClass; // [sp+23h] [bp-Dh]@7
  int v25; // [sp+2Ch] [bp-4h]@1

  v21 = this;
  spSpr.m_pObject = 0;
  v2 = (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *)&this->m_kBeforeMap.vfptr;
  v3 = this->m_kBeforeMap.m_uiHashSize;
  v4 = 0;
  v25 = 0;
  v20 = v2;
  if ( v3 )
  {
    v5 = v2->m_ppkHashTable;
    while ( !*v5 )
    {
      ++v4;
      ++v5;
      if ( v4 >= v3 )
        goto LABEL_5;
    }
    v6 = (int)v2->m_ppkHashTable[v4];
  }
  else
  {
LABEL_5:
    v6 = 0;
  }
  kBeforeClass = v6;
  while ( kBeforeClass )
  {
    NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::GetNext(
      v2,
      (void **)&kBeforeClass,
      &kClass,
      &spSpr);
    ((void (__stdcall *)(_DWORD))spSpr.m_pObject->vfptr[64].__vecDelDtor)(0);
  }
  v7 = v21->m_kAfterMap.m_uiHashSize;
  v8 = (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *)&v21->m_kAfterMap.vfptr;
  v9 = 0;
  if ( v7 <= 0 )
  {
LABEL_12:
    v11 = 0;
  }
  else
  {
    v10 = v21->m_kAfterMap.m_ppkHashTable;
    while ( !*v10 )
    {
      ++v9;
      ++v10;
      if ( v9 >= v7 )
        goto LABEL_12;
    }
    v11 = (int)v21->m_kAfterMap.m_ppkHashTable[v9];
  }
  kBeforeClass = v11;
  while ( kBeforeClass )
  {
    NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::GetNext(
      v8,
      (void **)&kBeforeClass,
      &kClass,
      &spSpr);
    ((void (__stdcall *)(_DWORD))spSpr.m_pObject->vfptr[64].__vecDelDtor)(0);
  }
  v12 = Char::GetClass(g_pkMainChar);
  v13 = (unsigned __int8)v12;
  LOBYTE(kBeforeClass) = v12;
  v14 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), (unsigned __int8)v12);
  if ( v14 )
    v15 = (NiUnsharedGeometryGroup *)(v14 + 21);
  else
    v15 = &unk_96F8EB;
  ((void (__stdcall *)(NiUnsharedGeometryGroup *))v21->m_pkBeforeText->vfptr[118].__vecDelDtor)(v15);
  v16 = CDataReader::GetRecord(
          (CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4),
          (unsigned __int8)kNewClass);
  if ( v16 )
    v17 = (NiUnsharedGeometryGroup *)(v16 + 21);
  else
    v17 = &unk_96F8EB;
  ((void (__stdcall *)(NiUnsharedGeometryGroup *))v21->m_pkAfterText->vfptr[118].__vecDelDtor)(v17);
  switch ( v13 )
  {
    case 26:
    case 27:
      NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::GetAt(v20, 26, &spSpr);
      ((void (__stdcall *)(signed int, int))spSpr.m_pObject->vfptr[64].__vecDelDtor)(1, v19);
      NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::GetAt(v8, 26, &spSpr);
      break;
    default:
      NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::GetAt(v20, kBeforeClass, &spSpr);
      ((void (__stdcall *)(signed int, int))spSpr.m_pObject->vfptr[64].__vecDelDtor)(1, v19);
      NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::GetAt(v8, kNewClass, &spSpr);
      break;
  }
  v18 = spSpr.m_pObject;
  ((void (__thiscall *)(PgWinSpr *))spSpr.m_pObject->vfptr[64].__vecDelDtor)(spSpr.m_pObject);
  v25 = -1;
  if ( !InterlockedDecrement((volatile LONG *)&v18->m_uiRefCount) )
    v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (00415A50) --------------------------------------------------------
ClassChangeWin *__cdecl ClassChangeWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  ClassChangeWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1A0u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    ClassChangeWin::ClassChangeWin((ClassChangeWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (ClassChangeWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00415B80) --------------------------------------------------------
signed int __stdcall ClassChangeWin::CheckChageState(int *iInvPos)
{
  PgFrameWork *v2; // esi@1
  ChargedItemEffect *v3; // eax@2
  InventoryWin *v4; // ecx@3
  char *v5; // esi@4
  int v6; // eax@5
  signed int result; // eax@6
  ItemInfo *v8; // esi@7
  __int64 v9; // kr00_8@10
  char v10; // al@10
  signed int v11; // eax@11
  bool v12; // cf@11

  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    v3 = ChargedEffectTable::GetByEffectEnum(EE_CLASSCHANGE);
    if ( !v3 )
      goto LABEL_19;
    v4 = (InventoryWin *)v2[19].m_BackFrameID;
    if ( !v4 )
      goto LABEL_19;
    v5 = v3->ItemID;
    if ( v3 == (ChargedItemEffect *)-2 )
      goto LABEL_19;
    v6 = InventoryWin::FindItem(v4, v3->ItemID);
    *iInvPos = v6;
    if ( v6 >= 192 )
      return 13956;
    v8 = ItemInfoTab::GetByInxName(v5);
    if ( v8
      && (v8->DemandLv > User::Lv(&g_kUser)
       || (v9 = CharClass::GetBitbyClassType(v8->UseClass),
           v10 = Char::GetClass(g_pkMainChar),
           !CharClass::TestChrClassMask(v9, (unsigned __int8)v10))) )
    {
      result = 13954;
    }
    else
    {
LABEL_19:
      v11 = 0;
      v12 = 1;
      while ( !v12 || !g_kInventory.m_aspEquip[v11].m_pObject )
      {
        v12 = (unsigned int)++v11 < 0x1E;
        if ( v11 >= 30 )
          goto LABEL_15;
      }
      result = 13957;
    }
  }
  else
  {
LABEL_15:
    result = 13952;
  }
  return result;
}

//----- (00415C70) --------------------------------------------------------
void __stdcall ClassChangeWin::DirectMessage(int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  GameFrameWork *v4; // esi@4
  Net *v5; // esi@6
  NiUnsharedGeometryGroup *v6; // eax@8
  int iInvPos; // [sp+4h] [bp-4h]@5

  if ( iMsgTag == 27 )
  {
    if ( pvBody )
    {
      if ( !*(_DWORD *)pvBody )
      {
        v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
        if ( v4 )
        {
          iInvPos = 192;
          switch ( (unsigned __int16)ClassChangeWin::CheckChageState(&iInvPos) )
          {
            case 0x3680u:
              v5 = g_kNetMgr.m_spZone[g_kNetMgr.m_iNowConnectedZone].m_pObject;
              if ( v5 )
              {
                LOWORD(pvBody) = 12382;
                PgNet::AddNetMsg((PgNet *)&v5->vfptr, &pvBody, 2);
                BYTE3(iMsgTag) = iInvPos;
                PgNet::SendNetMsg((PgNet *)&v5->vfptr, (char *)&iMsgTag + 3, 1);
              }
              return;
            case 0x3682u:
              v6 = TextData3::Get(0x54A4445Fu);
              goto LABEL_11;
            case 0x3685u:
              v6 = TextData3::Get(0x539A5864u);
              goto LABEL_11;
            case 0x3684u:
              v6 = TextData3::Get(0x79E4867u);
LABEL_11:
              GameFrameWork::AddSysMsg(v4, (const char *)v6);
              break;
            default:
              return;
          }
        }
      }
    }
  }
}

//----- (00415D60) --------------------------------------------------------
unsigned int __thiscall NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::KeyToHashIndex(NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *this, char key)
{
  return (unsigned __int8)key % this->m_uiHashSize;
}

//----- (00415D80) --------------------------------------------------------
BOOL __stdcall NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned char,NiPointer<NiNode>>::IsKeysEqual(char key1, char key2)
{
  return key1 == key2;
}

//----- (00415DA0) --------------------------------------------------------
char *__cdecl Folder::Effect()
{
  if ( !Folder::m_bInit )
    Folder::Init();
  return &Folder::m_acEffect;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00415DC0) --------------------------------------------------------
bool __cdecl CharClass::TestChrClassMask(__int64 kClassMask, unsigned int dwClass)
{
  return (kClassMask & (1i64 << dwClass)) != 0;
}

//----- (00415DF0) --------------------------------------------------------
unsigned int __cdecl ITableBase<ChargedItemEffect,ChargedEffectTable>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<ChargedItemEffect,ChargedEffectTable>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A886E0: using guessed type int ITableBase<ChargedItemEffect,ChargedEffectTable>::ms_pkTable;

//----- (00415E10) --------------------------------------------------------
void __thiscall NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::~NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>(NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *this)
{
  NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *v1; // esi@1

  v1 = this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> >Vtbl *)&NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v1->m_ppkHashTable);
}
// 971A80: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::`vftable')(void *p, char);

//----- (00415E30) --------------------------------------------------------
void __thiscall NiTMap<unsigned char,NiPointer<PgWinSpr>>::~NiTMap<unsigned char,NiPointer<PgWinSpr>>(NiTMap<unsigned char,NiPointer<PgWinSpr> > *this)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v1; // esi@1

  v1 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> >Vtbl *)&NiTMap<unsigned char,NiPointer<PgWinSpr>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v1->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v1);
  operator delete[](v1->m_ppkHashTable);
}
// 971A80: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::`vftable')(void *p, char);
// 971AAC: using guessed type int (__thiscall *NiTMap<unsigned char,NiPointer<PgWinSpr>>::`vftable')(void *p, char);

//----- (00415EA0) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *__thiscall NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::`vector deleting destructor'(NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> >Vtbl *)&NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 971A80: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::`vftable')(void *p, char);

//----- (00415EE0) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<unsigned char,NiPointer<PgWinSpr>>::`vector deleting destructor'(NiTMap<unsigned char,NiPointer<PgWinSpr> > *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // esi@1

  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> >Vtbl *)&NiTMap<unsigned char,NiPointer<PgWinSpr>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v2);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 971A80: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::`vftable')(void *p, char);
// 971AAC: using guessed type int (__thiscall *NiTMap<unsigned char,NiPointer<PgWinSpr>>::`vftable')(void *p, char);

//----- (00415F60) --------------------------------------------------------
void __thiscall NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::SetAt(NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *this, int key, NiPointer<PgWinSpr> val)
{
  NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *v3; // esi@1
  unsigned int (__thiscall *v4)(NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *, char); // edx@1
  int v5; // ebx@1
  NiTMapItem<unsigned char,NiPointer<PgWinSpr> > *v6; // edi@1
  NiTMapItem<unsigned char,NiPointer<PgWinSpr> > *v7; // edi@4
  PgWinSpr *v8; // [sp+0h] [bp-20h]@4
  PgWinSpr **v9; // [sp+10h] [bp-10h]@4
  int v10; // [sp+1Ch] [bp-4h]@1

  v3 = this;
  v4 = this->vfptr->KeyToHashIndex;
  v10 = 0;
  v5 = ((int (__stdcall *)(int))v4)(key);
  v6 = v3->m_ppkHashTable[v5];
  if ( v6 )
  {
    while ( !v3->vfptr->IsKeysEqual(v3, key, v6->m_key) )
    {
      v6 = v6->m_pkNext;
      if ( !v6 )
        goto LABEL_4;
    }
    ((void (__thiscall *)(NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *, NiTMapItem<unsigned char,NiPointer<PgWinSpr> > *, PgWinSpr *))v3->vfptr->ClearValue)(
      v3,
      v6,
      v8);
    v8 = val.m_pObject;
    v9 = &v8;
    if ( val.m_pObject )
      InterlockedIncrement((volatile LONG *)&val.m_pObject->m_uiRefCount);
    ((void (__thiscall *)(NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *, NiTMapItem<unsigned char,NiPointer<PgWinSpr> > *, int))v3->vfptr->SetValue)(
      v3,
      v6,
      key);
  }
  else
  {
LABEL_4:
    v7 = (NiTMapItem<unsigned char,NiPointer<PgWinSpr> > *)((int (__thiscall *)(NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *, PgWinSpr *))v3->vfptr->NewItem)(
                                                             v3,
                                                             v8);
    v8 = val.m_pObject;
    v9 = &v8;
    if ( val.m_pObject )
      InterlockedIncrement((volatile LONG *)&val.m_pObject->m_uiRefCount);
    ((void (__thiscall *)(NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *, NiTMapItem<unsigned char,NiPointer<PgWinSpr> > *, int))v3->vfptr->SetValue)(
      v3,
      v7,
      key);
    v7->m_pkNext = v3->m_ppkHashTable[v5];
    v3->m_ppkHashTable[v5] = v7;
    ++v3->m_kAllocator.m_uiCount;
  }
  v10 = -1;
  if ( val.m_pObject && !InterlockedDecrement((volatile LONG *)&val.m_pObject->m_uiRefCount) )
  {
    if ( val.m_pObject )
      val.m_pObject->vfptr->__vecDelDtor((NiRefObject *)val.m_pObject, 1u);
  }
}

//----- (00416090) --------------------------------------------------------
char __thiscall NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::GetAt(NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *this, int key, NiPointer<PgWinSpr> *val)
{
  NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *v3; // edi@1
  NiTMapItem<unsigned char,NiPointer<PgWinSpr> > *v4; // esi@1
  char result; // al@4
  PgWinSpr *v6; // edi@5
  PgWinSpr *v7; // esi@10

  v3 = this;
  v4 = this->m_ppkHashTable[((int (__stdcall *)(_DWORD))this->vfptr->KeyToHashIndex)(key)];
  if ( v4 )
  {
    while ( !v3->vfptr->IsKeysEqual(v3, key, v4->m_key) )
    {
      v4 = v4->m_pkNext;
      if ( !v4 )
        goto LABEL_4;
    }
    v6 = val->m_pObject;
    if ( val->m_pObject != v4->m_val.m_pObject )
    {
      if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      v7 = v4->m_val.m_pObject;
      val->m_pObject = v7;
      if ( v7 )
        InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
    }
    result = 1;
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}

//----- (00416120) --------------------------------------------------------
void __thiscall NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::GetNext(NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *this, void **pos, char *key, NiPointer<PgWinSpr> *val)
{
  void *v4; // esi@1
  NiTMapBase<DFALL<NiPointer<PgWinSpr> >,unsigned char,NiPointer<PgWinSpr> > *v5; // ebx@1
  PgWinSpr *v6; // edi@1
  PgWinSpr *v7; // eax@6
  int v8; // eax@10
  unsigned int v9; // edx@10
  unsigned int v10; // eax@10
  void **v11; // ecx@11

  v4 = *pos;
  v5 = this;
  *key = *((_BYTE *)*pos + 4);
  v6 = val->m_pObject;
  if ( val->m_pObject != (PgWinSpr *)*((_DWORD *)v4 + 2) )
  {
    if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v7 = (PgWinSpr *)*((_DWORD *)v4 + 2);
    val->m_pObject = v7;
    if ( v7 )
      InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  }
  if ( *(_DWORD *)v4 )
  {
    *pos = *(void **)v4;
  }
  else
  {
    v8 = v5->vfptr->KeyToHashIndex(v5, *((_BYTE *)v4 + 4));
    v9 = v5->m_uiHashSize;
    v10 = v8 + 1;
    if ( v10 >= v9 )
    {
LABEL_14:
      *pos = 0;
    }
    else
    {
      v11 = (void **)&v5->m_ppkHashTable[v10];
      while ( !*v11 )
      {
        ++v10;
        ++v11;
        if ( v10 >= v9 )
          goto LABEL_14;
      }
      *pos = *v11;
    }
  }
}

//----- (004161D0) --------------------------------------------------------
void __stdcall NiTMapBase<DFALL<NiPointer<PgWinSpr>>,unsigned char,NiPointer<PgWinSpr>>::SetValue(NiTMapItem<unsigned char,NiPointer<PgWinSpr> > *pkItem, char key, NiPointer<PgWinSpr> val)
{
  PgWinSpr *v4; // esi@1
  PgWinSpr *v5; // eax@1
  PgWinSpr *v6; // esi@10

  pkItem->m_key = key;
  v4 = pkItem->m_val.m_pObject;
  v5 = val.m_pObject;
  if ( v4 != val.m_pObject )
  {
    if ( v4 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      v5 = val.m_pObject;
    }
    pkItem->m_val.m_pObject = v5;
    if ( v5 )
    {
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
      v5 = val.m_pObject;
    }
  }
  if ( v5 )
  {
    v6 = v5;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
  }
}

//----- (00416290) --------------------------------------------------------
ChargedItemEffect *__cdecl ChargedEffectTable::GetByEffectEnum(EffectEnumerate eEffect)
{
  unsigned int v1; // esi@1
  ChargedItemEffect *result; // eax@4

  v1 = 0;
  if ( ITableBase<ChargedItemEffect,ChargedEffectTable>::GetTotal() )
  {
    while ( *((_DWORD *)CDataReader::GetRecord(
                          (CDataReader *)(ITableBase<ChargedItemEffect,ChargedEffectTable>::ms_pkTable + 4),
                          v1)
            + 9) != eEffect )
    {
      if ( ++v1 >= ITableBase<ChargedItemEffect,ChargedEffectTable>::GetTotal() )
        goto LABEL_4;
    }
    result = (ChargedItemEffect *)CDataReader::GetRecord(
                                    (CDataReader *)(ITableBase<ChargedItemEffect,ChargedEffectTable>::ms_pkTable + 4),
                                    v1);
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}
// A886E0: using guessed type int ITableBase<ChargedItemEffect,ChargedEffectTable>::ms_pkTable;

//----- (004162E0) --------------------------------------------------------
ClassChangeWin *__thiscall ClassChangeWin::`vector deleting destructor'(ClassChangeWin *this, unsigned int a2)
{
  ClassChangeWin *v2; // esi@1

  v2 = this;
  ClassChangeWin::~ClassChangeWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00416310) --------------------------------------------------------
NiColor *__cdecl Color::GetNiColor(NiColor *result, char ucR, char ucG, char ucB)
{
  NiColor *v4; // eax@1

  v4 = result;
  result->r = (double)(unsigned __int8)ucR / 255.0;
  result->g = (double)(unsigned __int8)ucG / 255.0;
  result->b = (double)(unsigned __int8)ucB / 255.0;
  return v4;
}

//----- (00416350) --------------------------------------------------------
D3DXCOLOR *__cdecl Color::GetDxColor(D3DXCOLOR *result, char ucR, char ucG, char ucB, char ucA)
{
  D3DXCOLOR *v5; // eax@1

  v5 = result;
  result->r = (double)(unsigned __int8)ucR / 255.0;
  result->g = (double)(unsigned __int8)ucG / 255.0;
  result->b = (double)(unsigned __int8)ucB / 255.0;
  result->a = (double)(unsigned __int8)ucA / 255.0;
  return v5;
}

//----- (004163A0) --------------------------------------------------------
NiColor *__cdecl Color::Dx2NiColor(NiColor *result, D3DXCOLOR *kDxColor)
{
  NiColor *v2; // eax@1

  v2 = result;
  result->r = kDxColor->r;
  result->g = kDxColor->g;
  result->b = kDxColor->b;
  return v2;
}

//----- (004163C0) --------------------------------------------------------
D3DXCOLOR *__cdecl Color::Ni2DxColor(D3DXCOLOR *result, NiColor *kNiColor)
{
  D3DXCOLOR *v2; // eax@1

  v2 = result;
  *(NiColor *)&result->r = *kNiColor;
  result->a = 1.0;
  return v2;
}

//----- (004163E0) --------------------------------------------------------
void __thiscall DShowMovie::DShowMovie(DShowMovie *this)
{
  DShowMovie *v1; // esi@1

  v1 = this;
  this->vfptr = (DShowMovieVtbl *)&DShowMovie::`vftable';
  CoInitialize(0);
  v1->m_hShowWnd = 0;
  v1->m_pGraph = 0;
  v1->m_pEvent = 0;
  v1->m_pMediaControl = 0;
}
// 971D1C: using guessed type int (__thiscall *DShowMovie::`vftable')(void *p, char);

//----- (00416410) --------------------------------------------------------
char __thiscall DShowMovie::Load(DShowMovie *this, char *pcFilename, HWND__ *hShowWnd)
{
  DShowMovie *v3; // esi@1
  char result; // al@2
  LPVOID *v5; // esi@3
  LPVOID v6; // eax@5
  IMediaEventEx *v7; // esi@6
  DShowMovie *v8; // [sp+8h] [bp-224h]@1
  IVideoWindow *pVidWin; // [sp+Ch] [bp-220h]@5
  tagRECT kRect; // [sp+10h] [bp-21Ch]@6
  wchar_t awFilename[260]; // [sp+20h] [bp-20Ch]@3

  v3 = this;
  v8 = this;
  if ( hShowWnd )
  {
    MultiByteToWideChar(3u, 8u, pcFilename, strlen(pcFilename) + 1, awFilename, 260);
    v5 = (LPVOID *)&v3->m_pGraph;
    if ( CoCreateInstance(&CLSID_FilterGraph, 0, 1u, &IID_IGraphBuilder, v5) >= 0
      && (*(int (__stdcall **)(LPVOID, wchar_t *, _DWORD))(*(_DWORD *)*v5 + 52))(*v5, awFilename, 0) >= 0
      && (v6 = *v5,
          pVidWin = 0,
          (**(void (__stdcall ***)(LPVOID, GUID *, IVideoWindow **))v6)(v6, &IID_IVideoWindow, &pVidWin),
          pVidWin)
      && (((void (__stdcall *)(IVideoWindow *, HWND__ *))pVidWin->lpVtbl[9].Release)(pVidWin, hShowWnd),
          ((void (__stdcall *)(IVideoWindow *, signed int))pVidWin->lpVtbl[3].QueryInterface)(pVidWin, 1140850688),
          GetClientRect(hShowWnd, &kRect),
          ((void (__stdcall *)(IVideoWindow *, int, int, int, int))pVidWin->lpVtbl[13].QueryInterface)(
            pVidWin,
            kRect.left,
            kRect.top,
            kRect.right - kRect.left,
            kRect.bottom - kRect.top),
          (**(void (__stdcall ***)(LPVOID, GUID *, IMediaEventEx **))*v5)(*v5, &IID_IMediaEventEx, &v8->m_pEvent),
          (v7 = v8->m_pEvent) != 0) )
    {
      ((void (__stdcall *)(IMediaEventEx *, HWND__ *, signed int, _DWORD))v7->lpVtbl[4].AddRef)(v7, hShowWnd, 10025, 0);
      v8->m_hShowWnd = hShowWnd;
      result = 1;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (004165A0) --------------------------------------------------------
void __thiscall DShowMovie::CleanUp(DShowMovie *this)
{
  DShowMovie *v1; // esi@1
  IGraphBuilder *v2; // eax@1
  IMediaControl *v3; // eax@3
  int levCode; // [sp+8h] [bp-8h]@3
  IVideoWindow *pVidWin; // [sp+Ch] [bp-4h]@1

  v1 = this;
  v2 = this->m_pGraph;
  pVidWin = 0;
  if ( v2 && this->m_pEvent )
  {
    v2->lpVtbl->QueryInterface((IUnknown *)v2, &IID_IVideoWindow, (void **)&pVidWin);
    v1->m_pEvent->lpVtbl[3].QueryInterface((IUnknown *)v1->m_pEvent, (_GUID *const )-1, (void **)&levCode);
    ((void (__stdcall *)(_DWORD, _DWORD))pVidWin->lpVtbl[6].AddRef)(pVidWin, 0);
    pVidWin->lpVtbl->Release((IUnknown *)pVidWin);
    v3 = v1->m_pMediaControl;
    if ( v3 )
      v3->lpVtbl->Release((IUnknown *)v1->m_pMediaControl);
    v1->m_pEvent->lpVtbl->Release((IUnknown *)v1->m_pEvent);
    v1->m_pGraph->lpVtbl->Release((IUnknown *)v1->m_pGraph);
    v1->m_pMediaControl = 0;
    v1->m_pEvent = 0;
    v1->m_pGraph = 0;
  }
}

//----- (00416630) --------------------------------------------------------
void __thiscall DShowMovie::Play(DShowMovie *this)
{
  DShowMovie *v1; // esi@1
  bool v2; // zf@1
  IGraphBuilder *v3; // eax@3
  IMediaControl **v4; // esi@3
  IVideoWindow *pVidWin; // [sp+4h] [bp-4h]@1

  v1 = this;
  v2 = this->m_pGraph == 0;
  pVidWin = 0;
  if ( !v2 )
  {
    this->m_pGraph->lpVtbl->QueryInterface((IUnknown *)this->m_pGraph, &IID_IVideoWindow, (void **)&pVidWin);
    if ( pVidWin )
    {
      ((void (__stdcall *)(_DWORD, _DWORD))pVidWin->lpVtbl[6].AddRef)(pVidWin, -1);
      v3 = v1->m_pGraph;
      v4 = &v1->m_pMediaControl;
      v3->lpVtbl->QueryInterface((IUnknown *)v3, &IID_IMediaControl, (void **)v4);
      if ( *v4 )
        (*v4)->lpVtbl[2].AddRef((IUnknown *)*v4);
    }
  }
}

//----- (00416690) --------------------------------------------------------
void __thiscall DShowMovie::Stop(DShowMovie *this)
{
  DShowMovie *v1; // esi@1
  IMediaControl *v2; // eax@1
  IMediaEventEx *v3; // eax@3
  int levCode; // [sp+4h] [bp-8h]@4
  IVideoWindow *pVidWin; // [sp+8h] [bp-4h]@1

  v1 = this;
  v2 = this->m_pMediaControl;
  pVidWin = 0;
  if ( v2 )
  {
    ((void (__stdcall *)(_DWORD))v2->lpVtbl[3].QueryInterface)(v2);
    v1->m_pGraph->lpVtbl->QueryInterface((IUnknown *)v1->m_pGraph, &IID_IVideoWindow, (void **)&pVidWin);
    if ( pVidWin )
    {
      ((void (__stdcall *)(_DWORD, _DWORD))pVidWin->lpVtbl[6].AddRef)(pVidWin, 0);
      pVidWin->lpVtbl->Release((IUnknown *)pVidWin);
      v3 = v1->m_pEvent;
      if ( v3 )
        v3->lpVtbl[3].QueryInterface((IUnknown *)v3, (_GUID *const )-1, (void **)&levCode);
      v1->m_pMediaControl->lpVtbl->Release((IUnknown *)v1->m_pMediaControl);
      v1->m_pMediaControl = 0;
    }
  }
}

//----- (00416710) --------------------------------------------------------
char __thiscall DShowMovie::MsgProc(DShowMovie *this, HWND__ *hWnd, unsigned int uiMsg, unsigned int wParam, int lParam)
{
  DShowMovie *v5; // esi@1
  char result; // al@7
  int lparam1; // [sp+4h] [bp-4h]@3

  v5 = this;
  if ( hWnd != this->m_hShowWnd
    || uiMsg != 10025
    || ((int (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))this->m_pEvent->lpVtbl[2].Release)(
         this->m_pEvent,
         &hWnd,
         &lparam1,
         &uiMsg,
         0) < 0 )
  {
LABEL_7:
    result = 1;
  }
  else
  {
    while ( 1 )
    {
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v5->m_pEvent->lpVtbl[4].QueryInterface)(
        v5->m_pEvent,
        hWnd,
        lparam1,
        uiMsg);
      if ( hWnd == (HWND__ *)1 || hWnd == (HWND__ *)2 )
        break;
      if ( ((int (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v5->m_pEvent->lpVtbl[2].Release)(
             v5->m_pEvent,
             &hWnd,
             &lparam1,
             &uiMsg,
             0) < 0 )
        goto LABEL_7;
    }
    DShowMovie::Stop(v5);
    result = 0;
  }
  return result;
}

//----- (004167A0) --------------------------------------------------------
bool DShowMovie::IsPlaying()
{
  return 0;
}

//----- (004167B0) --------------------------------------------------------
void __thiscall DShowMovie::~DShowMovie(DShowMovie *this)
{
  this->vfptr = (DShowMovieVtbl *)&DShowMovie::`vftable';
  DShowMovie::CleanUp(this);
  CoUninitialize();
}
// 971D1C: using guessed type int (__thiscall *DShowMovie::`vftable')(void *p, char);

//----- (004167D0) --------------------------------------------------------
DShowMovie *__thiscall DShowMovie::`vector deleting destructor'(DShowMovie *this, unsigned int a2)
{
  DShowMovie *v2; // esi@1

  v2 = this;
  this->vfptr = (DShowMovieVtbl *)&DShowMovie::`vftable';
  DShowMovie::CleanUp(this);
  CoUninitialize();
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 971D1C: using guessed type int (__thiscall *DShowMovie::`vftable')(void *p, char);

//----- (00416800) --------------------------------------------------------
void __cdecl Engine3D::ShaderRunParserCallback(const char *pcLibFile, NiRenderer *pkRenderer, const char *pcDirectory, bool bRecurseSubFolders)
{
  NSFParserLib_RunShaderParser(pcDirectory, bRecurseSubFolders);
}

//----- (00416820) --------------------------------------------------------
BOOL __cdecl Engine3D::ShaderClassCreateCallback(const char *pcLibFile, NiRenderer *pkRenderer, int iDirectoryCount, char **apcDirectories, bool bRecurseSubFolders, NiShaderLibrary **ppkLibrary)
{
  *ppkLibrary = 0;
  return NSBShaderLib_LoadShaderLibrary(pkRenderer, iDirectoryCount, apcDirectories, bRecurseSubFolders, ppkLibrary);
}

//----- (00416850) --------------------------------------------------------
bool __cdecl Engine3D::FXLibraryClassCreate(const char *pcLibFile, NiRenderer *pkRenderer, int iDirectoryCount, char **apcDirectories, bool bRecurseSubFolders, NiShaderLibrary **ppkLibrary)
{
  *ppkLibrary = 0;
  return NiD3DXEffectShaderLib_LoadShaderLibrary(
           pkRenderer,
           iDirectoryCount,
           apcDirectories,
           bRecurseSubFolders,
           ppkLibrary);
}

//----- (00416880) --------------------------------------------------------
bool __cdecl Engine3D::GetEnableCarToon()
{
  bool result; // al@2

  if ( Engine3D::ms_spToonExtraData )
    result = Engine3D::ms_spToonExtraData->m_bOn;
  else
    result = 0;
  return result;
}

//----- (00416890) --------------------------------------------------------
void __cdecl Engine3D::EnableCarToon(bool bEnable)
{
  if ( Engine3D::ms_spToonExtraData )
    Engine3D::ms_spToonExtraData->m_bOn = bEnable;
}

//----- (004168B0) --------------------------------------------------------
void __cdecl Engine3D::Terminate()
{
  INpShader *v0; // esi@2
  NsPgToonExtraData *v1; // esi@6

  if ( Engine3D::ms_spCarToon )
  {
    v0 = Engine3D::ms_spCarToon;
    if ( !InterlockedDecrement((volatile LONG *)&Engine3D::ms_spCarToon->m_uiRefCount) && v0 )
      v0->vfptr->__vecDelDtor((NiRefObject *)v0, 1u);
    Engine3D::ms_spCarToon = 0;
  }
  v1 = Engine3D::ms_spToonExtraData;
  if ( Engine3D::ms_spToonExtraData )
  {
    if ( !InterlockedDecrement((volatile LONG *)&Engine3D::ms_spToonExtraData->m_uiRefCount) && v1 )
      v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
    Engine3D::ms_spToonExtraData = 0;
  }
  NpModelData_ActorM::Terminate();
  NpModelData_KFM::Terminate();
  NpKMI_Tool::Terminate();
  NpModelData_NiTexturingProperty::Terminate();
}

//----- (00416930) --------------------------------------------------------
char __cdecl Engine3D::Init(NiCamera *pkCamera)
{
  const char *v1; // ST18_4@3
  NiD3DShaderProgramFactory *v2; // eax@3
  int v3; // eax@5
  char v4; // cl@6
  char *v5; // eax@7
  char v6; // cl@8
  NsPgToonRegister_v2 *v7; // eax@13
  INpShader *v8; // eax@14
  INpShader *v9; // esi@14
  INpShader *v10; // eax@16
  INpShader *v11; // edi@18
  INpShader *v12; // esi@25
  const char *v13; // eax@25
  NsPgToonExtraData *v14; // eax@25
  NsPgToonExtraData *v15; // eax@26
  NsPgToonExtraData *v16; // esi@26
  NsPgToonExtraData *v17; // eax@28
  NsPgToonExtraData *v18; // edi@30
  NsPgToonExtraData *v19; // eax@35
  char *pacShaderDir[2]; // [sp+20h] [bp-118h]@7
  char acFolder[256]; // [sp+28h] [bp-110h]@6
  int v23; // [sp+134h] [bp-4h]@13

  NiShaderFactory::RegisterRunParserCallback((unsigned int (__cdecl *)(const char *, NiRenderer *, const char *, bool))Engine3D::ShaderRunParserCallback);
  NiShaderFactory::RegisterClassCreationCallback((bool (__cdecl *)(const char *, NiRenderer *, int, char **, bool, NiShaderLibrary **))Engine3D::ShaderClassCreateCallback);
  if ( !Folder::m_bInit )
    Folder::Init();
  v1 = Folder::Merge(&Folder::m_acMain, "shader\\");
  v2 = NiD3DShaderProgramFactory::GetInstance();
  NiD3DShaderProgramFactory::AddProgramDirectory(v2, v1);
  if ( !Folder::m_bInit )
    Folder::Init();
  v3 = 0;
  do
  {
    v4 = *(&Folder::m_acMain + v3);
    acFolder[v3++] = v4;
  }
  while ( v4 );
  v5 = (char *)&pacShaderDir[1] + 3;
  do
    v6 = (v5++)[1];
  while ( v6 );
  *(_DWORD *)v5 = 1684105331;
  *((_DWORD *)v5 + 1) = 6058597;
  pacShaderDir[0] = acFolder;
  pacShaderDir[1] = 0;
  NiShaderFactory::LoadAndRunParserLibrary(0, acFolder, 1);
  if ( !NiShaderFactory::LoadAndRegisterShaderLibrary(0) )
    MessageBoxA(0, "Shader Loading Error", "Error", 0);
  NiShaderFactory::RegisterClassCreationCallback(Engine3D::FXLibraryClassCreate);
  if ( !NiShaderFactory::LoadAndRegisterShaderLibrary(0) )
    MessageBoxA(0, "Shader Loading Error", "Error", 0);
  v7 = (NsPgToonRegister_v2 *)operator new(0x44u);
  v23 = 0;
  if ( v7 )
  {
    NsPgToonRegister_v2::NsPgToonRegister_v2(v7);
    v9 = v8;
  }
  else
  {
    v9 = 0;
  }
  v10 = Engine3D::ms_spCarToon;
  v23 = -1;
  if ( Engine3D::ms_spCarToon != v9 )
  {
    if ( Engine3D::ms_spCarToon )
    {
      v11 = Engine3D::ms_spCarToon;
      if ( !InterlockedDecrement((volatile LONG *)&Engine3D::ms_spCarToon->m_uiRefCount) )
      {
        if ( v11 )
          v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
      }
    }
    v10 = v9;
    Engine3D::ms_spCarToon = v9;
    if ( v9 )
    {
      InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
      v10 = Engine3D::ms_spCarToon;
    }
  }
  if ( !Folder::m_bInit )
  {
    Folder::Init();
    v10 = Engine3D::ms_spCarToon;
  }
  v12 = v10;
  v13 = Folder::Merge(&Folder::m_acMain, "shader\\");
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v12[1].m_bShaderEnable,
    v13,
    strlen(v13));
  v14 = (NsPgToonExtraData *)operator new(0x38u);
  v23 = 1;
  if ( v14 )
  {
    NsPgToonExtraData::NsPgToonExtraData(v14);
    v16 = v15;
  }
  else
  {
    v16 = 0;
  }
  v17 = Engine3D::ms_spToonExtraData;
  v23 = -1;
  if ( Engine3D::ms_spToonExtraData != v16 )
  {
    if ( Engine3D::ms_spToonExtraData )
    {
      v18 = Engine3D::ms_spToonExtraData;
      if ( !InterlockedDecrement((volatile LONG *)&Engine3D::ms_spToonExtraData->m_uiRefCount) )
      {
        if ( v18 )
          v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
      }
    }
    v17 = v16;
    Engine3D::ms_spToonExtraData = v16;
    if ( v16 )
    {
      InterlockedIncrement((volatile LONG *)&v16->m_uiRefCount);
      v17 = Engine3D::ms_spToonExtraData;
    }
  }
  v17->m_fRevisionNear = 40.0;
  Engine3D::ms_spToonExtraData->m_fRevisionFar = 800.0;
  Engine3D::ms_spToonExtraData->m_bLineColorRevision = 0;
  Engine3D::ms_spToonExtraData->m_bLineSizeRevision = 1;
  Engine3D::ms_spToonExtraData->m_bSelfTexture = 1;
  v19 = Engine3D::ms_spToonExtraData;
  Engine3D::ms_spToonExtraData->m_vLineColor.x = 0.0;
  v19->m_vLineColor.y = 0.0;
  v19->m_vLineColor.z = 0.0;
  v19->m_vLineColor.w = 0.80000001;
  Engine3D::ms_spToonExtraData->m_fLineSize = 0.0017500001;
  Engine3D::ms_spToonExtraData->m_fLineEnableLength = 800.0;
  Engine3D::ms_spToonExtraData->m_pCamera = pkCamera;
  INpShader::Init(Engine3D::ms_spCarToon, NiRenderer::ms_pkRenderer, 0x14u);
  NsPgToonRegister_v2::SetExtraData((NsPgToonRegister_v2 *)Engine3D::ms_spCarToon, Engine3D::ms_spToonExtraData);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00416C80) --------------------------------------------------------
char *__cdecl Folder::Main()
{
  if ( !Folder::m_bInit )
    Folder::Init();
  return &Folder::m_acMain;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00416CA0) --------------------------------------------------------
char *__cdecl AbsMsgTable::GetAbstateSysMsg()
{
  return 0;
}

//----- (00416CB0) --------------------------------------------------------
char *__cdecl ErrMsgTable::GetErrMsg(int iErrCode)
{
  int v1; // esi@1
  char *result; // eax@4
  char *v3; // eax@437
  __int16 v4; // ax@467
  Item *v5; // eax@467
  NiUnsharedGeometryGroup *v6; // eax@469
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v7; // [sp-1Ch] [bp-20h]@436
  unsigned int v8; // [sp-8h] [bp-Ch]@436
  int v9; // [sp-4h] [bp-8h]@436

  v1 = 0;
  if ( iErrCode <= 844 )
  {
    if ( iErrCode == 844 )
    {
$LN141:
      result = (char *)TextData2::Get(0xC0F93709);
    }
    else
    {
      switch ( iErrCode )
      {
        case 66:
          result = (char *)TextData::Get(0x94E7E8D1);
          break;
        case 67:
          result = "DB error";
          break;
        case 68:
          result = (char *)TextData::Get(0xC8E81F16);
          break;
        case 69:
          result = (char *)TextData::Get(0x36281E1Fu);
          break;
        case 70:
          result = "DB error";
          break;
        case 71:
          result = (char *)TextData::Get(0xDE33190D);
          break;
        case 72:
          result = (char *)TextData::Get(0x25371B0Bu);
          break;
        case 73:
          result = (char *)TextData::Get(0x7E87D093u);
          break;
        case 74:
          result = (char *)TextData::Get(0x2D7D824Au);
          break;
        case 75:
          result = (char *)TextData::Get(0x2127626Du);
          break;
        case 81:
          result = (char *)TextData::Get(0x9B7E6C58);
          break;
        default:
          goto LABEL_469;
      }
    }
    return result;
  }
  if ( iErrCode <= 6977 )
  {
    if ( iErrCode == 6977 )
      return (char *)TextData2::Get(0x4910A0D6u);
    if ( iErrCode > 4801 )
    {
      if ( iErrCode > 5313 )
      {
        if ( iErrCode > 5761 )
        {
          if ( iErrCode > 6594 )
          {
            switch ( iErrCode )
            {
              case 6723:
              case 6747:
$LN341:
                result = (char *)TextData::Get(0x1C2A0981u);
                break;
              case 6595:
                result = (char *)TextData::Get(0x51A1C9A1u);
                break;
              case 6596:
                result = (char *)TextData::Get(0x61B778A9u);
                break;
              case 6722:
              case 6746:
                result = (char *)TextData::Get(0xCEF8D8D4);
                break;
              case 6727:
              case 6728:
              case 6729:
                result = (char *)TextData2::Get(0xD734031B);
                break;
              case 6751:
              case 6752:
              case 6753:
                result = (char *)TextData2::Get(0x3A7B6771u);
                break;
              case 6732:
                result = (char *)TextData2::Get(0x41DDB3B5u);
                break;
              case 6756:
                result = (char *)TextData2::Get(0xA424170B);
                break;
              case 6733:
              case 6734:
                result = (char *)TextData2::Get(0x71E6EF02u);
                break;
              case 6730:
              case 6731:
              case 6754:
              case 6755:
                result = (char *)TextData2::Get(0x8BE9D5DB);
                break;
              case 6769:
              case 6781:
                result = (char *)TextData2::Get(0x8695087u);
                break;
              case 6770:
                result = (char *)TextData2::Get(0x746155E1u);
                break;
              case 6771:
                result = (char *)TextData2::Get(0x471518Cu);
                break;
              case 6772:
                result = (char *)TextData2::Get(0x67745E7Au);
                break;
              case 6773:
                result = (char *)TextData2::Get(0x1A1F058Du);
                break;
              case 6774:
                result = (char *)TextData2::Get(0x11271834u);
                break;
              case 6776:
                result = (char *)TextData2::Get(0x11330884u);
                break;
              case 6777:
                result = (char *)TextData2::Get(0xBACBB50C);
                break;
              case 6778:
                result = (char *)TextData2::Get(0x8240C3Au);
                break;
              case 6779:
                result = (char *)TextData2::Get(0xCF220944);
                break;
              case 6780:
                result = (char *)TextData2::Get(0xCCCFB739);
                break;
              default:
                goto LABEL_469;
            }
            return result;
          }
          if ( iErrCode == 6594 )
            return (char *)TextData::Get(0x51A275A1u);
          switch ( iErrCode )
          {
            case 5825:
              return (char *)TextData2::Get(0x606E6C4Fu);
            case 5826:
              return (char *)TextData2::Get(0xA7EA00D9);
            case 5827:
              return (char *)TextData2::Get(0xADED07E9);
            case 5828:
              return (char *)TextData2::Get(0x5AB6B7A0u);
            case 5829:
              return (char *)TextData2::Get(0x325F5B3Du);
            case 5834:
              return (char *)TextData2::Get(0x95B2A897);
            case 5835:
            case 5838:
              return (char *)TextData2::Get(0x96EEE1FE);
            case 5836:
              return (char *)TextData2::Get(0xDB4C3725);
            case 5837:
              return (char *)TextData2::Get(0xBD442E39);
            case 5762:
              return (char *)TextData::Get(0xDAE0032A);
            case 5763:
              return (char *)TextData::Get(0x1B212BA3u);
            case 5764:
              return (char *)TextData::Get(0x141F698Eu);
            case 5765:
              return (char *)TextData::Get(0x3D816F94u);
            case 5766:
              goto $LN341;
            case 5767:
              return (char *)TextData::Get(0xA8BE9F32);
            case 5768:
              return (char *)TextData::Get(0xD4D72324);
            case 5769:
              return (char *)TextData::Get(0xA7D2B8D9);
            case 5770:
              return (char *)TextData::Get(0x91B099DE);
            case 5771:
              return (char *)TextData::Get(0xBFBFAE24);
            case 5772:
              return (char *)TextData::Get(0x37276777u);
            case 5960:
              return (char *)TextData::Get(0xA12C21Au);
            case 5961:
              return (char *)TextData::Get(0x80B4B4BD);
            case 5963:
              return (char *)TextData::Get(0x3DBA7A8Du);
            case 5964:
              return (char *)TextData2::Get(0xDE06A716);
            case 5998:
              return (char *)TextData2::Get(0xE3331F2A);
            case 5965:
              return (char *)TextData::Get(0x10F1927u);
            case 5966:
              return (char *)TextData::Get(0x79A374B7u);
            case 5976:
              return (char *)TextData::Get(0x504E2E5Du);
            case 5984:
              return (char *)TextData::Get(0x65896668u);
            case 5992:
              return (char *)TextData::Get(0xF94A31FA);
            case 5993:
              return (char *)TextData::Get(0x9CDBD2AF);
            case 5994:
              return (char *)TextData::Get(0x9694814F);
            case 5995:
              return (char *)TextData::Get(0xFBD7C697);
            case 5996:
              return (char *)TextData::Get(0xE5F7BD95);
            case 5997:
              return (char *)TextData::Get(0x34A36954u);
            case 5968:
              return (char *)TextData::Get(0x9BE398A8);
            case 5953:
              return (char *)TextData::Get(0x5D4E12F5u);
            case 5954:
              return (char *)TextData::Get(0xF51A1A08);
            case 5955:
              return (char *)TextData::Get(0x59697D71u);
            case 5956:
              return (char *)TextData::Get(0x4A697571u);
            case 5957:
              return (char *)TextData::Get(0x8D1AB6B9);
            case 5958:
              return (char *)TextData::Get(0x4D697D71u);
            case 5959:
              return (char *)TextData::Get(0xDF0ACA08);
            case 5900:
              return (char *)TextData2::Get(0xFD49F994);
            case 5901:
              return (char *)TextData2::Get(0xD0EAC300);
            case 5902:
              return (char *)TextData2::Get(0x5A935C05u);
            case 5903:
              return (char *)TextData2::Get(0x69AB47E8u);
            default:
              goto LABEL_469;
          }
        }
        else
        {
          if ( iErrCode == 5761 )
            return (char *)TextData::Get(0x1C1A0F22u);
          if ( iErrCode == 5314 )
            return (char *)&unk_971D86;
          if ( iErrCode == 5315 )
            return (char *)&unk_971D87;
          if ( iErrCode == 5379 )
            return (char *)TextData2::Get(0xE5270D34);
        }
      }
      else
      {
        if ( iErrCode == 5313 )
          return (char *)&unk_971D85;
        switch ( iErrCode )
        {
          case 4865:
          case 4866:
          case 4929:
          case 4993:
            return (char *)TextData::Get(0x3B4C6C74u);
          case 4802:
            return (char *)TextData::Get(0x78AEA49Fu);
          case 4803:
          case 4869:
            return (char *)TextData::Get(0xBBF5D3D9);
          case 4804:
            return (char *)TextData::Get(0x85F7BAD0);
          case 4805:
          case 4806:
            return (char *)TextData::Get(0x9BB9B9D3);
          case 4807:
            return (char *)TextData::Get(0x92B673D4);
          case 4808:
            return (char *)TextData::Get(0xE8F3BFE1);
          case 4809:
            return (char *)TextData::Get(0xD5F6BC16);
          case 4930:
            return (char *)TextData::Get(0xEE1DE136);
          case 4994:
            return (char *)TextData::Get(0x94FCC4C1);
          case 4995:
            return (char *)TextData::Get(0xDFFEBC10);
          case 4867:
            return (char *)TextData::Get(0x23491A31u);
          case 4868:
            return (char *)TextData::Get(0xDD0B1F04);
          case 4870:
            return (char *)TextData::Get(0x8908C0D3);
          case 4871:
            return (char *)TextData::Get(0x81FBD1CB);
          case 4872:
            return (char *)TextData::Get(0x869ED9C2);
          case 4873:
            return (char *)TextData::Get(0x7EB4BFB5u);
          case 4874:
            return (char *)TextData::Get(0xD2671621);
          case 4931:
            return (char *)TextData::Get(0x23381F2Fu);
          case 5000:
            return (char *)TextData::Get(0x6C11E1CEu);
          default:
            goto LABEL_469;
        }
      }
      goto LABEL_469;
    }
    if ( iErrCode == 4801 )
      return (char *)TextData::Get(0x3B4C6C74u);
    if ( iErrCode > 4482 )
    {
      switch ( iErrCode )
      {
        case 4552:
$LN362:
          result = (char *)TextData2::Get(0xFF7A6076);
          break;
        case 4550:
$LN361:
          result = (char *)TextData2::Get(0x99C1A5FE);
          break;
        case 4488:
$LN360:
          result = (char *)TextData2::Get(0x607894D4u);
          break;
        case 4483:
          result = (char *)TextData2::Get(0xB1C4C620);
          break;
        case 4484:
          result = (char *)TextData2::Get(0x647E80CAu);
          break;
        case 4485:
          result = (char *)TextData2::Get(0xBBBFB40F);
          break;
        case 4486:
          result = (char *)TextData2::Get(0xB5C1D0C7);
          break;
        case 4487:
          result = (char *)TextData2::Get(0xB4C7D301);
          break;
        case 4489:
          result = (char *)TextData2::Get(0xADC6CD0D);
          break;
        case 4490:
          result = (char *)TextData2::Get(0xF817141B);
          break;
        case 4491:
          result = (char *)TextData2::Get(0xF623065F);
          break;
        case 4492:
          result = (char *)TextData2::Get(0x53203u);
          break;
        case 4493:
          result = (char *)TextData2::Get(0x1001221u);
          break;
        case 4494:
          result = (char *)TextData2::Get(0x8D98B388);
          break;
        case 4495:
          result = (char *)TextData2::Get(0xBABBCDCB);
          break;
        case 4496:
          result = (char *)TextData2::Get(0xBDAEBAC3);
          break;
        case 4497:
          result = (char *)TextData2::Get(0x5F66B54u);
          break;
        case 4498:
          result = (char *)TextData2::Get(0x81BEAEFD);
          break;
        case 4499:
          result = (char *)TextData2::Get(0xADB7CDFE);
          break;
        case 4500:
          result = (char *)TextData2::Get(0xF305164D);
          break;
        case 4501:
          result = (char *)TextData2::Get(0xAFBF1317);
          break;
        case 4502:
          result = (char *)TextData2::Get(0x62422u);
          break;
        case 4503:
          result = (char *)TextData2::Get(0x9DC6D7C9);
          break;
        case 4504:
          result = (char *)TextData2::Get(0xC1D8585u);
          break;
        case 4505:
          result = (char *)TextData2::Get(0x68AED8CFu);
          break;
        case 4507:
          result = (char *)TextData2::Get(0x2081B5Fu);
          break;
        case 4508:
          result = (char *)TextData2::Get(0xB3C5D319);
          break;
        case 4509:
          result = (char *)TextData2::Get(0x5CC3C4CDu);
          break;
        case 4510:
          result = (char *)TextData2::Get(0xA3C3C41A);
          break;
        case 4511:
          result = (char *)TextData2::Get(0xA8BACC2C);
          break;
        case 4561:
          result = (char *)TextData2::Get(0x4136709Bu);
          break;
        case 4562:
          result = (char *)TextData2::Get(0x4A3B6E4Du);
          break;
        case 4548:
        case 4563:
          result = (char *)TextData2::Get(0xE03C615D);
          break;
        case 4564:
          result = (char *)TextData2::Get(0x273F7FA6u);
          break;
        case 4565:
          result = (char *)TextData2::Get(0x5667685Fu);
          break;
        case 4566:
          result = (char *)TextData2::Get(0x5D5CBFA5u);
          break;
        case 4567:
          result = (char *)TextData2::Get(0x67A8CD9Du);
          break;
        case 4568:
          result = (char *)TextData2::Get(0xF3000BFD);
          break;
        case 4569:
          result = (char *)TextData2::Get(0xFE010458);
          break;
        case 4571:
          result = (char *)TextData2::Get(0xACB0D7D9);
          break;
        case 4572:
          result = (char *)TextData2::Get(0xACB0E3D9);
          break;
        case 4573:
          result = (char *)TextData2::Get(0xB3CADC10);
          break;
        case 4546:
          result = (char *)TextData2::Get(0xDF0F3F61);
          break;
        case 4547:
          result = (char *)TextData2::Get(0xE160503B);
          break;
        case 4549:
          result = (char *)TextData2::Get(0xE002EB46);
          break;
        case 4551:
          result = (char *)TextData2::Get(0x45D0ADBCu);
          break;
        case 4553:
          result = (char *)TextData2::Get(0x4F77B1B9u);
          break;
        case 4554:
          result = (char *)TextData2::Get(0xACF8FD11);
          break;
        case 4555:
          result = (char *)TextData2::Get(0xB6D6577u);
          break;
        case 4556:
          result = (char *)TextData2::Get(0x51746E67u);
          break;
        case 4557:
          result = (char *)TextData2::Get(0x9BC8F40C);
          break;
        case 4558:
          result = (char *)TextData2::Get(0x4355A64u);
          break;
        case 4559:
          result = (char *)TextData2::Get(0x3D9881BFu);
          break;
        case 4574:
          result = (char *)TextData2::Get(0x56D89BA9u);
          break;
        case 4575:
          result = (char *)TextData2::Get(0xF63BFC03);
          break;
        case 4506:
          result = (char *)TextData2::Get(0x6676867Eu);
          break;
        case 4512:
          result = (char *)TextData2::Get(0xF0182711);
          break;
        case 4577:
          result = (char *)TextData2::Get(0x444C3E65u);
          break;
        case 4611:
          result = (char *)TextData::Get(0xDABF9AC3);
          break;
        case 4578:
          result = (char *)TextData2::Get(0xEEF8514A);
          break;
        default:
          goto LABEL_469;
      }
      return result;
    }
    if ( iErrCode == 4482 )
      return (char *)TextData2::Get(0xA6B6D3C1);
    if ( iErrCode <= 1793 )
    {
      if ( iErrCode == 1793 )
        return (char *)TextData::Get(0x226625A6u);
      if ( iErrCode <= 1218 )
      {
        if ( iErrCode == 1218 )
        {
          result = (char *)TextData::Get(0x122C2F2Au);
        }
        else
        {
          switch ( iErrCode )
          {
            case 911:
            case 912:
              result = (char *)TextData2::Get(0x6F7F528Bu);
              break;
            case 846:
              result = (char *)TextData2::Get(0x12A074Cu);
              break;
            case 845:
              result = (char *)TextData2::Get(0x5D8A71BAu);
              break;
            default:
              goto LABEL_469;
          }
        }
        return result;
      }
      switch ( iErrCode )
      {
        case 1219:
          return (char *)TextData::Get(0x6974C3BEu);
        case 1220:
          goto $LN448;
        case 1221:
          return (char *)TextData::Get(0xCCE7EB31);
        case 1222:
          return (char *)TextData::Get(0x7DEAE0E1u);
        case 1223:
          return (char *)TextData::Get(0xFB151376);
        case 1224:
          return (char *)TextData::Get(0x2E856C99u);
        case 1225:
          return (char *)TextData::Get(0x1D3B777Bu);
        case 1227:
          return (char *)TextData::Get(0x7A9F949Cu);
        case 1228:
          return (char *)TextData::Get(0xC8EDE62D);
        case 1229:
          return (char *)TextData::Get(0x2F402192u);
        case 1230:
          return (char *)TextData::Get(0xD9ED1C2E);
        case 1231:
          return (char *)TextData::Get(0xC13B5133);
        case 1232:
          return (char *)TextData::Get(0xD4EFEEE1);
        case 1233:
          return (char *)TextData::Get(0x71807DDCu);
        case 1234:
          return (char *)TextData::Get(0xA318996u);
        case 1235:
          return (char *)TextData::Get(0xE5E8343B);
        case 1369:
          return (char *)TextData2::Get(0x42FBCDA1u);
        case 1242:
          return (char *)TextData3::Get(0x265C0106u);
        case 1238:
          goto $LN125_0;
        default:
          goto LABEL_469;
      }
      goto LABEL_469;
    }
    if ( iErrCode <= 2130 )
    {
      if ( iErrCode != 2130 )
      {
        switch ( iErrCode )
        {
          case 1811:
            return (char *)TextData::Get(0x975D546D);
          case 1800:
            return (char *)TextData::Get(0x7FFED6DEu);
          case 1801:
            return (char *)TextData::Get(0xCF3D2711);
          case 1802:
            return (char *)TextData::Get(0xC6DF531D);
          case 1803:
            return (char *)TextData::Get(0xA3420FF4);
          case 1804:
            return (char *)TextData::Get(0x1393742u);
          case 1805:
            return (char *)TextData::Get(0x85F7D6D1);
          case 1809:
            return (char *)TextData::Get(0xC1570D02);
          case 1796:
            return (char *)TextData::Get(0xEA350C44);
          case 1815:
            return (char *)TextData::Get(0xF277060u);
          case 1808:
            return (char *)TextData::Get(0x2C601119u);
          case 1818:
            goto $LN362;
          case 1819:
            goto $LN361;
          case 1820:
            goto $LN360;
          case 1822:
            return (char *)&unk_971D91;
          case 1794:
            return (char *)TextData2::Get(0xD6370F38);
          case 1821:
            return (char *)TextData::Get(0x91A8CDCE);
          default:
            break;
        }
LABEL_469:
        v6 = TextData::Get(0xB4D3F216);
        return fs("%s: %d", v6, iErrCode);
      }
      return (char *)TextData2::Get(0x973A0E0D);
    }
    if ( iErrCode <= 3355 )
    {
      if ( iErrCode == 3355 )
        return (char *)TextData3::Get(0x9C090D3F);
      if ( iErrCode != 2888 )
      {
        if ( iErrCode == 3275 )
          return (char *)&unk_971D93;
        goto LABEL_469;
      }
      return (char *)TextData2::Get(0x973A0E0D);
    }
    if ( iErrCode != 4291 )
      goto LABEL_469;
    return (char *)TextData2::Get(0xAFDC3929);
  }
  if ( iErrCode <= 7242 )
  {
    if ( iErrCode == 7242 )
    {
      result = (char *)TextData2::Get(0x4A9E96DFu);
    }
    else
    {
      switch ( iErrCode )
      {
        case 6978:
          result = (char *)TextData2::Get(0x3DB77BDEu);
          break;
        case 6979:
          result = (char *)TextData2::Get(0x75EFBFCFu);
          break;
        case 6980:
          result = (char *)TextData2::Get(0x4B99A7C6u);
          break;
        case 6981:
          result = (char *)TextData2::Get(0x92E6F429);
          break;
        case 6982:
          result = (char *)TextData2::Get(0xA9E7E31D);
          break;
        case 6984:
          result = (char *)TextData2::Get(0xA4E79CCF);
          break;
        case 6985:
          result = (char *)TextData2::Get(0x8BEAFF15);
          break;
        case 6986:
          result = (char *)TextData2::Get(0x55E7A4D2u);
          break;
        case 6987:
          result = (char *)TextData2::Get(0x90F20026);
          break;
        case 6988:
          result = (char *)TextData2::Get(0x9E06B9E1);
          break;
        case 6989:
          result = (char *)TextData2::Get(0xE23B4D69);
          break;
        case 6990:
          result = (char *)TextData2::Get(0x4FA253DFu);
          break;
        case 6991:
          result = (char *)TextData2::Get(0x9660ED16);
          break;
        case 6992:
          result = (char *)TextData2::Get(0xA2EFA826);
          break;
        case 6993:
          result = (char *)TextData2::Get(0xEF922C5E);
          break;
        case 6994:
          result = (char *)TextData2::Get(0xE937DD7B);
          break;
        case 6995:
          result = (char *)TextData2::Get(0xA52EFA0D);
          break;
        case 6996:
          result = (char *)TextData2::Get(0xD20E1569);
          break;
        case 7017:
          result = (char *)TextData2::Get(0x2F777071u);
          break;
        case 7018:
          result = (char *)TextData2::Get(0xE76F7C79);
          break;
        case 7009:
          result = (char *)&unk_971D92;
          break;
        case 7209:
          result = (char *)TextData2::Get(0xF53F2563);
          break;
        case 7210:
          result = (char *)TextData2::Get(0xF644216B);
          break;
        case 7211:
          result = (char *)TextData2::Get(0x99CD0727);
          break;
        case 7171:
        case 7176:
          result = (char *)TextData2::Get(0xE7336090);
          break;
        case 7172:
        case 7175:
          result = (char *)TextData2::Get(0x140AD19Cu);
          break;
        default:
          goto LABEL_469;
      }
    }
    return result;
  }
  if ( iErrCode <= 7616 )
  {
    if ( iErrCode == 7616 )
      return (char *)TextData2::Get(0xC9DFC5E6);
    switch ( iErrCode )
    {
      case 7368:
        goto $LN218;
      case 7355:
        goto $LN217;
      case 7300:
        return (char *)TextData2::Get(0xD0FFB43D);
      case 7303:
        return (char *)TextData2::Get(0xBCE5CE35);
      case 7304:
        goto $LN213;
      case 7354:
        goto $LN212;
      case 7302:
        goto $LN211;
      case 7371:
        goto $LN210;
      case 7301:
        return (char *)TextData2::Get(0x8CFBBAD8);
      case 7318:
        return (char *)TextData2::Get(0xA0EAC7EC);
      case 7357:
        return (char *)TextData2::Get(0x83DE96B7);
      case 7353:
        goto $LN202;
      case 7356:
        goto $LN201;
      case 7372:
        return (char *)TextData2::Get(0xC1EBD112);
      case 7369:
        goto $LN199;
      case 7384:
        goto $LN198;
      default:
        goto LABEL_469;
    }
    goto LABEL_469;
  }
  if ( iErrCode <= 11009 )
  {
    if ( iErrCode == 11009 )
      return (char *)TextData2::Get(0x23875179u);
    if ( iErrCode > 8193 )
    {
      if ( iErrCode > 8545 )
      {
        if ( iErrCode > 9749 )
        {
          if ( iErrCode > 10370 )
          {
            switch ( iErrCode )
            {
              case 10372:
              case 10378:
              case 10379:
                result = (char *)TextData2::Get(0x7482497u);
                break;
              case 10375:
              case 10383:
                result = (char *)TextData2::Get(0x376E68u);
                break;
              case 10380:
              case 10381:
              case 10382:
                result = (char *)TextData2::Get(0xD8491D3E);
                break;
              case 10373:
                result = (char *)TextData2::Get(0x52C75182u);
                break;
              default:
                goto LABEL_469;
            }
          }
          else if ( iErrCode == 10370 )
          {
            result = (char *)TextData2::Get(0x74C2CFE9u);
          }
          else
          {
            switch ( iErrCode )
            {
              case 9799:
$LN218:
                result = (char *)TextData2::Get(0x3290474Bu);
                break;
              case 9782:
$LN217:
                result = (char *)TextData2::Get(0xC75A1515);
                break;
              case 9751:
$LN213:
                result = (char *)TextData2::Get(0x372CF70Fu);
                break;
              case 9787:
$LN212:
                result = (char *)TextData2::Get(0x363B6D65u);
                break;
              case 9755:
$LN211:
                result = (char *)TextData2::Get(0xEBE30517);
                break;
              case 9802:
$LN210:
                result = (char *)TextData2::Get(0xD1EB8EFE);
                break;
              case 9786:
$LN202:
                result = (char *)TextData2::Get(0x9587C1A6);
                break;
              case 9783:
$LN201:
                result = (char *)TextData2::Get(0x4F958ED1u);
                break;
              case 9800:
$LN199:
                result = (char *)TextData2::Get(0x5A927D84u);
                break;
              case 9814:
$LN198:
                result = (char *)TextData2::Get(0x8B9C647F);
                break;
              default:
                goto LABEL_469;
            }
          }
          return result;
        }
        if ( iErrCode == 9749 )
          return (char *)TextData2::Get(0x8CFBBAD8);
        switch ( iErrCode )
        {
          case 8554:
          case 8562:
            return (char *)TextData2::Get(0x66F847Eu);
          case 8546:
            return (char *)TextData2::Get(0xFD012840);
          case 8547:
            return (char *)TextData2::Get(0x95D8D4E3);
          case 8555:
            return (char *)TextData2::Get(0x5FA5F5B8u);
          default:
            goto LABEL_469;
        }
      }
      else
      {
        if ( iErrCode == 8545 )
          return (char *)TextData2::Get(0x66F847Eu);
        switch ( iErrCode )
        {
          case 8196:
            goto $LN141;
          case 8194:
            return (char *)TextData2::Get(0xF8418A4B);
          case 8195:
            return (char *)TextData2::Get(0xFF4A8C59);
          case 8201:
            return (char *)TextData2::Get(0x5547D5Fu);
          case 8197:
            return (char *)TextData2::Get(0x67B0D2C3u);
          case 8321:
          case 8337:
          case 8353:
            return (char *)TextData2::Get(0x3998BCE0u);
          case 8322:
          case 8338:
          case 8354:
            return (char *)TextData2::Get(0xA302BC40);
          case 8323:
            return (char *)TextData2::Get(0x569771CAu);
          case 8327:
            return (char *)TextData3::Get(0xE94B4980);
          case 8328:
            return (char *)TextData2::Get(0xB8FFB8E9);
          case 8325:
            return (char *)TextData2::Get(0x5EB9B9C7u);
          case 8326:
            return (char *)TextData2::Get(0x3AB365C8u);
          case 8324:
            return (char *)TextData2::Get(0x11556F80u);
          case 8340:
          case 8356:
            return (char *)TextData2::Get(0x5E9A6580u);
          case 8341:
            return (char *)TextData2::Get(0xB2FED439);
          case 8339:
            return (char *)TextData2::Get(0x81EAC131);
          case 8355:
            return (char *)TextData2::Get(0x5587579u);
          case 8357:
            return (char *)TextData2::Get(0xA9111A27);
          default:
            goto LABEL_469;
        }
      }
    }
    else
    {
      if ( iErrCode == 8193 )
        return (char *)TextData2::Get(0x72F5D8BEu);
      if ( iErrCode > 7809 )
      {
        switch ( iErrCode )
        {
          case 7879:
$LN448:
            result = (char *)TextData::Get(0xBC4E4033);
            break;
          case 7810:
            result = (char *)TextData2::Get(0x3C70615Cu);
            break;
          case 7811:
            result = (char *)TextData2::Get(0x24966557u);
            break;
          case 7812:
          case 7813:
          case 7814:
          case 7815:
            result = (char *)TextData2::Get(0x7DF2C4BFu);
            break;
          case 7877:
          case 7885:
          case 7907:
          case 7922:
          case 7928:
          case 7936:
          case 7944:
          case 7952:
            result = (char *)TextData2::Get(0xC4F1D12B);
            break;
          case 7878:
            result = (char *)TextData2::Get(0x8C73656F);
            break;
          case 7881:
            result = (char *)TextData2::Get(0x909BD8E0);
            break;
          case 7882:
          case 7883:
          case 7884:
            result = (char *)TextData2::Get(0x29965162u);
            break;
          case 7886:
            result = (char *)TextData2::Get(0xC8DFCE1D);
            break;
          case 7921:
          case 7929:
          case 7937:
          case 7945:
          case 7953:
            result = (char *)TextData2::Get(0xD5F3BA10);
            break;
          case 7923:
            result = (char *)TextData2::Get(0x8AEEBAB2);
            break;
          case 7898:
            result = (char *)TextData2::Get(0xD505BABE);
            break;
          case 7906:
            result = (char *)TextData2::Get(0x85FBB6BD);
            break;
          case 7930:
          case 7938:
            result = (char *)TextData2::Get(0x688F6DABu);
            break;
          case 7946:
            result = (char *)TextData2::Get(0x2E40FF0Fu);
            break;
          case 7954:
            result = (char *)TextData2::Get(0xE3621C0D);
            break;
          case 8004:
            result = (char *)TextData2::Get(0x42A0111u);
            break;
          case 8005:
            result = (char *)TextData2::Get(0x322E0C20u);
            break;
          case 8012:
            result = (char *)TextData2::Get(0x9780657F);
            break;
          case 7961:
            result = (char *)TextData2::Get(0x3EA56FA4u);
            break;
          case 7888:
$LN125_0:
            result = (char *)TextData2::Get(0x87A8C5F1);
            break;
          default:
            goto LABEL_469;
        }
        return result;
      }
      if ( iErrCode == 7809 )
        return (char *)TextData2::Get(0x314410EFu);
      if ( iErrCode == 7618 )
        return (char *)TextData2::Get(0xDBDE140D);
      if ( iErrCode == 7619 )
        return (char *)TextData2::Get(0x1A815B53u);
      if ( iErrCode == 7620 )
        return (char *)TextData2::Get(0x10112879u);
    }
    goto LABEL_469;
  }
  if ( iErrCode <= 12393 )
  {
    if ( iErrCode != 12393 )
    {
      switch ( iErrCode )
      {
        case 11010:
          result = (char *)TextData2::Get(0xA3DBB817);
          break;
        case 11073:
          result = (char *)TextData2::Get(0x9DE394D5);
          break;
        case 11074:
          result = (char *)TextData2::Get(0x9EE79BC8);
          break;
        case 11075:
          result = (char *)TextData2::Get(0x9C029E0E);
          break;
        case 11137:
          result = (char *)TextData2::Get(0x42D9BB9Fu);
          break;
        case 11138:
          result = (char *)TextData2::Get(0x598C2F96u);
          break;
        case 11153:
          result = (char *)TextData2::Get(0xCE452002);
          break;
        case 11154:
          result = (char *)TextData2::Get(0x9ECCB7F0);
          break;
        case 11155:
          result = (char *)TextData2::Get(0x48877E55u);
          break;
        case 11156:
          result = (char *)TextData2::Get(0x228F6A49u);
          break;
        case 11157:
          result = (char *)TextData2::Get(0xF896156u);
          break;
        case 11158:
          result = (char *)TextData2::Get(0x498C7871u);
          break;
        case 11169:
          result = (char *)TextData2::Get(0x609C72AFu);
          break;
        case 11170:
          result = (char *)TextData2::Get(0x5E705Eu);
          break;
        case 11171:
          result = (char *)TextData2::Get(0xFA40F960);
          break;
        case 11177:
          result = (char *)TextData2::Get(0x58B5DAADu);
          break;
        case 11178:
          result = (char *)TextData2::Get(0xA8151BF0);
          break;
        case 11179:
          result = (char *)TextData2::Get(0xA8171CEA);
          break;
        case 11180:
          result = (char *)TextData2::Get(0x13D8B58u);
          break;
        case 11181:
          result = (char *)TextData2::Get(0x3089B197u);
          break;
        case 11182:
          result = (char *)TextData2::Get(0x5403620u);
          break;
        case 11201:
          result = (char *)TextData2::Get(0xDE7F685B);
          break;
        case 11202:
          result = (char *)TextData2::Get(0x990F00EB);
          break;
        case 11203:
          result = (char *)TextData2::Get(0xE5614F3A);
          break;
        default:
          goto LABEL_469;
      }
      return result;
    }
    return (char *)TextData2::Get(0xAFDC3929);
  }
  if ( iErrCode <= 12697 )
  {
    if ( iErrCode == 12697 )
      return (char *)TextData3::Get(0xA4C1054B);
    switch ( iErrCode )
    {
      case 12585:
        return (char *)TextData::Get(0x226625A6u);
      case 12588:
        return (char *)TextData::Get(0x7FFED6DEu);
      case 12587:
        return (char *)TextData::Get(0x2C601119u);
      case 12586:
        return (char *)TextData2::Get(0xD6370F38);
      case 12394:
        return (char *)TextData2::Get(0x548184DDu);
      case 12395:
        return (char *)TextData2::Get(0x6681D6DDu);
      case 12396:
        return (char *)TextData2::Get(0xAA212A1E);
      case 12397:
        return (char *)TextData2::Get(0x5F7E8AECu);
      case 12398:
        return (char *)TextData2::Get(0x1A2DA098u);
      case 12399:
        return (char *)TextData2::Get(0x61D307F0u);
      case 12400:
        return (char *)TextData3::Get(0x64868AD3u);
      case 12417:
        return (char *)TextData2::Get(0x547DE6BDu);
      case 12418:
        return (char *)TextData2::Get(0x54CFE6CFu);
      case 12419:
        return (char *)TextData2::Get(0xF4232713);
      case 12420:
        return (char *)TextData2::Get(0x5183F5C8u);
      case 12421:
        return (char *)TextData2::Get(0x55ACA9C2u);
      case 12422:
        return (char *)TextData2::Get(0x6E88A182u);
      case 12433:
        return (char *)TextData2::Get(0xA1BD2A03);
      case 12434:
        return (char *)TextData2::Get(0xA10F2A15);
      case 12435:
        return (char *)TextData2::Get(0x41636B59u);
      case 12436:
        return (char *)TextData2::Get(0xA6B93204);
      case 12437:
        return (char *)TextData2::Get(0xF2253AFA);
      case 12438:
        return (char *)TextData2::Get(0xAD113614);
      case 12590:
        return (char *)TextData::Get(0x1E3D0573u);
      case 12591:
        return (char *)TextData2::Get(0x7CE5E1E5u);
      case 12592:
        return (char *)TextData::Get(0xD4F5BC24);
      case 12594:
        return (char *)TextData::Get(0xCD490130);
      case 12593:
        return (char *)TextData::Get(0xE85E342A);
      case 12456:
        return (char *)TextData2::Get(0xE4E83850);
      case 12458:
        return (char *)TextData2::Get(0x7669E8Eu);
      case 12459:
        return (char *)TextData2::Get(0xB01D3B4C);
      case 12460:
        return (char *)TextData3::Get(0x4FC0E9E9u);
      default:
        goto LABEL_469;
    }
    goto LABEL_469;
  }
  if ( iErrCode <= 13377 )
  {
    if ( iErrCode == 13377 )
      return (char *)TextData3::Get(0xCC0F3C39);
    switch ( iErrCode )
    {
      case 12698:
        return (char *)TextData3::Get(0x9C090D3F);
      case 12699:
        return (char *)TextData3::Get(0x9CE3F724);
      case 12700:
        return (char *)TextData3::Get(0xBA68CBFu);
      case 12701:
        return (char *)TextData3::Get(0xEBFD2B90);
      case 12702:
        return (char *)TextData3::Get(0x49599CFFu);
      case 12843:
        return (char *)TextData3::Get(0x2F2B7E6Eu);
      case 12846:
        return (char *)TextData3::Get(0x86787C69);
      case 12882:
      case 12883:
        return (char *)TextData3::Get(0x98BEF7C3);
      case 12884:
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
          &v7,
          "LimitRandomOption");
        v9 = (unsigned __int16)CSingleDataMap::GetValue(&g_kSingleDataMap, v7);
        v8 = -1765869629;
        goto LABEL_437;
      case 12885:
      case 12886:
        return (char *)TextData3::Get(0x97BEF7C3);
      default:
        goto LABEL_469;
    }
    goto LABEL_469;
  }
  if ( iErrCode <= 13913 )
  {
    if ( iErrCode == 13913 )
      return (char *)TextData3::Get(0xA72305DE);
    switch ( iErrCode )
    {
      case 13378:
      case 13406:
      case 13408:
        return (char *)TextData3::Get(0xCC0F3C39);
      case 13521:
      case 13522:
      case 13525:
      case 13533:
        return (char *)TextData3::Get(0xB7050908);
      case 13523:
        return (char *)TextData3::Get(0x87ADC7C9);
      case 13524:
        return (char *)TextData3::Get(0x889F78C5);
      case 13526:
      case 13528:
      case 13529:
      case 13530:
      case 13531:
      case 13532:
        return (char *)TextData3::Get(0x94ABBCAF);
      case 13379:
      case 13380:
        return (char *)TextData3::Get(0x97F0E247);
      case 13381:
      case 13382:
        return (char *)TextData3::Get(0x78B0E3E7u);
      case 13400:
        return (char *)TextData3::Get(0xC7ECDC49);
      case 13404:
      case 13405:
        return (char *)TextData3::Get(0xBE2F0C3D);
      case 13441:
        return (char *)TextData3::Get(0x3B5B223Bu);
      case 13442:
        return (char *)TextData3::Get(0xE209CEDC);
      default:
        goto LABEL_469;
    }
    goto LABEL_469;
  }
  if ( iErrCode > 14273 )
  {
    switch ( iErrCode )
    {
      case 14279:
        return (char *)TextData::Get(0x91A8CDCE);
      case 14274:
        return (char *)TextData3::Get(0x6A928276u);
      case 14275:
        return (char *)TextData3::Get(0x6DA5857Bu);
      case 14276:
        return (char *)TextData3::Get(0x49B8E0C8u);
      case 14278:
        return (char *)TextData3::Get(0x6B9B8770u);
      case 14277:
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
          &v7,
          "AddMixItem");
        v4 = CSingleDataMap::GetValue(&g_kSingleDataMap, v7);
        v5 = Item::Create(v4);
        if ( !v5 )
          return (char *)v1;
        v9 = (int)v5->m_pkInfo->Name;
        v8 = -1628252885;
        goto LABEL_437;
      default:
        goto LABEL_469;
    }
    goto LABEL_469;
  }
  if ( iErrCode != 14273 )
  {
    if ( iErrCode == 13914 || iErrCode == 13915 )
      return (char *)TextData3::Get(0xA7D4FEE2);
    if ( iErrCode == 13916 )
      return (char *)TextData3::Get(0xF01B3C26);
    goto LABEL_469;
  }
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
    &v7,
    "MixMinUpgrade");
  v9 = (unsigned __int16)CSingleDataMap::GetValue(&g_kSingleDataMap, v7);
  v8 = -1122297050;
LABEL_437:
  v3 = (char *)TextData3::Get(v8);
  return fs(v3, v9);
}

//----- (00419CA0) --------------------------------------------------------
void __thiscall EventRankWin::AddRank(EventRankWin *this, unsigned int uiRank, const char *pcName, unsigned int uiScore)
{
  EventRankWin *v4; // esi@1
  SlideListWin *v5; // ecx@1
  unsigned int v6; // edi@2
  const char *v7; // eax@2
  const char *v8; // eax@2

  v4 = this;
  v5 = this->m_pkListWin;
  if ( v5 )
  {
    v6 = SlideListWin::AddText(v5, 0);
    v7 = fs("%d", uiRank);
    SlideListWin::SetText(v4->m_pkListWin, v6, 0, v7);
    SlideListWin::SetText(v4->m_pkListWin, v6, 1u, pcName);
    v8 = fs("%d", uiScore);
    SlideListWin::SetText(v4->m_pkListWin, v6, 2u, v8);
    SlideListWin::AlignText(v4->m_pkListWin, 5u);
    SlideListWin::UpdateViewList(v4->m_pkListWin);
  }
}

//----- (00419D30) --------------------------------------------------------
void __thiscall EventRankWin::OnShowWin(EventRankWin *this)
{
  PgWin::PostMsg((PgWin *)&this->vfptr, 5u, 1u, 0);
}

//----- (00419D40) --------------------------------------------------------
void EventRankWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "RankingWin_Olympic");
}

//----- (00419D70) --------------------------------------------------------
void __thiscall EventRankWin::OnRankCur(EventRankWin *this)
{
  EventRankWin *v1; // edi@1
  SlideListWin *v2; // ecx@1
  std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node **v3; // eax@3
  std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *v4; // esi@3
  NiRefObjectVtbl *v5; // esi@6
  NiUnsharedGeometryGroup *v6; // eax@6
  char acName[21]; // [sp+4h] [bp-1Ch]@4

  v1 = this;
  v2 = this->m_pkListWin;
  if ( v2 )
    SlideListWin::RemoveAllList(v2);
  v3 = &v1->m_kCurRanks._Myhead->_Next;
  v4 = *v3;
  if ( (std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node **)*v3 != v3 )
  {
    do
    {
      *(_DWORD *)acName = v4->_Myval.sCharID.n5_code[0];
      *(_DWORD *)&acName[4] = v4->_Myval.sCharID.n5_code[1];
      *(_DWORD *)&acName[8] = v4->_Myval.sCharID.n5_code[2];
      *(_DWORD *)&acName[12] = v4->_Myval.sCharID.n5_code[3];
      *(_DWORD *)&acName[16] = v4->_Myval.sCharID.n5_code[4];
      acName[20] = 0;
      EventRankWin::AddRank(v1, v4->_Myval.nRanking, acName, v4->_Myval.nScore);
      v4 = v4->_Next;
    }
    while ( v4 != v1->m_kCurRanks._Myhead );
  }
  if ( v1->m_pkRankBtnText )
  {
    v5 = v1->m_pkRankBtnText->vfptr;
    v6 = TextData3::Get(0x64EDE1BEu);
    v5[118].__vecDelDtor((NiRefObject *)v1->m_pkRankBtnText, (unsigned int)v6);
  }
  if ( v1->m_pkRankBtn )
    ((void (__stdcall *)(_DWORD))v1->m_pkRankBtn->vfptr[129].__vecDelDtor)(2);
}

//----- (00419E40) --------------------------------------------------------
void __thiscall EventRankWin::OnRankPrev(EventRankWin *this)
{
  EventRankWin *v1; // edi@1
  SlideListWin *v2; // ecx@1
  std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node **v3; // eax@3
  std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *v4; // esi@3
  NiRefObjectVtbl *v5; // esi@6
  NiUnsharedGeometryGroup *v6; // eax@6
  char acName[21]; // [sp+4h] [bp-1Ch]@4

  v1 = this;
  v2 = this->m_pkListWin;
  if ( v2 )
    SlideListWin::RemoveAllList(v2);
  v3 = &v1->m_kPrevRanks._Myhead->_Next;
  v4 = *v3;
  if ( (std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node **)*v3 != v3 )
  {
    do
    {
      *(_DWORD *)acName = v4->_Myval.sCharID.n5_code[0];
      *(_DWORD *)&acName[4] = v4->_Myval.sCharID.n5_code[1];
      *(_DWORD *)&acName[8] = v4->_Myval.sCharID.n5_code[2];
      *(_DWORD *)&acName[12] = v4->_Myval.sCharID.n5_code[3];
      *(_DWORD *)&acName[16] = v4->_Myval.sCharID.n5_code[4];
      acName[20] = 0;
      EventRankWin::AddRank(v1, v4->_Myval.nRanking, acName, v4->_Myval.nScore);
      v4 = v4->_Next;
    }
    while ( v4 != v1->m_kPrevRanks._Myhead );
  }
  if ( v1->m_pkRankBtnText )
  {
    v5 = v1->m_pkRankBtnText->vfptr;
    v6 = TextData3::Get(0x57AEEBC0u);
    v5[118].__vecDelDtor((NiRefObject *)v1->m_pkRankBtnText, (unsigned int)v6);
  }
  if ( v1->m_pkRankBtn )
    ((void (__stdcall *)(_DWORD))v1->m_pkRankBtn->vfptr[129].__vecDelDtor)(1);
}

//----- (00419F10) --------------------------------------------------------
void __thiscall EventRankWin::OnCommand(EventRankWin *this, unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@5

  switch ( wParam )
  {
    case 0u:
      ((void (*)(void))this->vfptr[90].__vecDelDtor)();
      break;
    case 1u:
      EventRankWin::OnRankCur(this);
      break;
    case 2u:
      EventRankWin::OnRankPrev(this);
      break;
    case 3u:
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v3 )
        GameFrameWork::OpenPlayGuideSearchList(v3, "RankingWin_Olympic");
      break;
    default:
      return;
  }
}

//----- (00419F80) --------------------------------------------------------
void __thiscall EventRankWin::AddPrevRank(EventRankWin *this, SCENARIO_RANKING_INFO kRank)
{
  std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *v2; // edi@1
  char *v3; // esi@1
  std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *v4; // eax@1
  int v5; // ecx@1

  v2 = this->m_kPrevRanks._Myhead;
  v3 = (char *)&this->m_kPrevRanks;
  v4 = std::_List_val<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO>>::_Buynode(
         this->m_kPrevRanks._Myhead,
         v2->_Prev,
         &kRank);
  v5 = *((_DWORD *)v3 + 1);
  if ( (unsigned int)(171798690 - v5) < 1 )
    std::_Xlength_error("list<T> too long");
  *((_DWORD *)v3 + 1) = v5 + 1;
  v2->_Prev = v4;
  v4->_Prev->_Next = v4;
}

//----- (00419FD0) --------------------------------------------------------
void __thiscall EventRankWin::AddCurRank(EventRankWin *this, SCENARIO_RANKING_INFO kRank)
{
  std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *v2; // edi@1
  char *v3; // esi@1
  std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *v4; // eax@1
  int v5; // ecx@1

  v2 = this->m_kCurRanks._Myhead;
  v3 = (char *)&this->m_kCurRanks;
  v4 = std::_List_val<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO>>::_Buynode(
         this->m_kCurRanks._Myhead,
         v2->_Prev,
         &kRank);
  v5 = *((_DWORD *)v3 + 1);
  if ( (unsigned int)(171798690 - v5) < 1 )
    std::_Xlength_error("list<T> too long");
  *((_DWORD *)v3 + 1) = v5 + 1;
  v2->_Prev = v4;
  v4->_Prev->_Next = v4;
}

//----- (0041A020) --------------------------------------------------------
void __thiscall EventRankWin::OnClose(EventRankWin *this)
{
  EventRankWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  void **v3; // ecx@3
  std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *v4; // eax@3
  std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *v5; // edi@4
  void **v6; // ecx@5
  std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *v7; // eax@5
  std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *v8; // edi@6

  v1 = this;
  v2 = this->m_pkListWin;
  if ( v2 )
    SlideListWin::RemoveAllList(v2);
  v3 = (void **)&v1->m_kCurRanks._Myhead->_Next;
  v4 = (std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *)*v3;
  *v3 = v3;
  v1->m_kCurRanks._Myhead->_Prev = v1->m_kCurRanks._Myhead;
  v1->m_kCurRanks._Mysize = 0;
  if ( v4 != v1->m_kCurRanks._Myhead )
  {
    do
    {
      v5 = v4->_Next;
      operator delete(v4);
      v4 = v5;
    }
    while ( v5 != v1->m_kCurRanks._Myhead );
  }
  v6 = (void **)&v1->m_kPrevRanks._Myhead->_Next;
  v7 = (std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *)*v6;
  *v6 = v6;
  v1->m_kPrevRanks._Myhead->_Prev = v1->m_kPrevRanks._Myhead;
  v1->m_kPrevRanks._Mysize = 0;
  if ( v7 != v1->m_kPrevRanks._Myhead )
  {
    do
    {
      v8 = v7->_Next;
      operator delete(v7);
      v7 = v8;
    }
    while ( v8 != v1->m_kPrevRanks._Myhead );
  }
  PgWin::PostMsg((PgWin *)&v1->vfptr, 1u, 0, 0);
}

//----- (0041A0C0) --------------------------------------------------------
void __thiscall EventRankWin::EventRankWin(EventRankWin *this)
{
  EventRankWin *v1; // esi@1
  std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *v2; // eax@1
  std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *v3; // eax@2
  std::exception v4; // [sp+Ch] [bp-30h]@6
  std::exception pExceptionObject; // [sp+18h] [bp-24h]@4
  EventRankWin *v6; // [sp+24h] [bp-18h]@1
  char *v7; // [sp+28h] [bp-14h]@6
  char *_What; // [sp+2Ch] [bp-10h]@4
  int v9; // [sp+38h] [bp-4h]@1

  v1 = this;
  v6 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&EventRankWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&EventRankWin::`vftable'{for `IDirectMessenger'};
  v9 = 0;
  v1->m_kPrevRanks._Mysize = 0;
  v2 = (std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *)operator new(0x24u);
  if ( !v2 )
  {
    v7 = 0;
    std::exception::exception(&v4, (const char *const *)&v7);
    v4.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&v4, &_TI2_AVbad_alloc_std__);
  }
  v1->m_kPrevRanks._Myhead = v2;
  v2->_Next = v2;
  v1->m_kPrevRanks._Myhead->_Prev = v1->m_kPrevRanks._Myhead;
  LOBYTE(v9) = 1;
  v1->m_kCurRanks._Mysize = 0;
  v3 = (std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *)operator new(0x24u);
  if ( !v3 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_kCurRanks._Myhead = v3;
  v3->_Next = v3;
  v1->m_kCurRanks._Myhead->_Prev = v1->m_kCurRanks._Myhead;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 971F24: using guessed type void (__thiscall *EventRankWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 971F44: using guessed type int (__thiscall *EventRankWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0041A1B0) --------------------------------------------------------
void __thiscall EventRankWin::~EventRankWin(EventRankWin *this)
{
  EventRankWin *v1; // esi@1
  std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *v2; // ecx@1
  std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *v3; // eax@1
  std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *v4; // edi@2
  void **v5; // ecx@3
  std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *v6; // eax@3
  std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *v7; // edi@4

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&EventRankWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&EventRankWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_kCurRanks._Myhead;
  v3 = v2->_Next;
  v2->_Next = v2;
  v1->m_kCurRanks._Myhead->_Prev = v1->m_kCurRanks._Myhead;
  v1->m_kCurRanks._Mysize = 0;
  if ( v3 != v1->m_kCurRanks._Myhead )
  {
    do
    {
      v4 = v3->_Next;
      operator delete(v3);
      v3 = v4;
    }
    while ( v4 != v1->m_kCurRanks._Myhead );
  }
  operator delete(v1->m_kCurRanks._Myhead);
  v5 = (void **)&v1->m_kPrevRanks._Myhead->_Next;
  v6 = (std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *)*v5;
  *v5 = v5;
  v1->m_kPrevRanks._Myhead->_Prev = v1->m_kPrevRanks._Myhead;
  v1->m_kPrevRanks._Mysize = 0;
  if ( v6 != v1->m_kPrevRanks._Myhead )
  {
    do
    {
      v7 = v6->_Next;
      operator delete(v6);
      v6 = v7;
    }
    while ( v7 != v1->m_kPrevRanks._Myhead );
  }
  operator delete(v1->m_kPrevRanks._Myhead);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 971F24: using guessed type void (__thiscall *EventRankWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 971F44: using guessed type int (__thiscall *EventRankWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0041A270) --------------------------------------------------------
EventRankWin *__cdecl EventRankWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  EventRankWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x17Cu);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    EventRankWin::EventRankWin((EventRankWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (EventRankWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (0041A3A0) --------------------------------------------------------
char __thiscall EventRankWin::Create(EventRankWin *this, PgFrameWork *pkFrameWork)
{
  EventRankWin *v2; // esi@1
  const char *v3; // eax@3
  PgSprData *v4; // eax@4
  NiNode *v5; // esi@5
  NiSourceTexture *v7; // eax@10
  D3DXCOLOR v8; // ST1C_16@10
  char *v9; // eax@10
  D3DXCOLOR v10; // ST1C_16@10
  char *v11; // eax@10
  D3DXCOLOR v12; // ST1C_16@10
  char *v13; // eax@10
  D3DXCOLOR v14; // ST1C_16@10
  char *v15; // eax@10
  D3DXCOLOR v16; // ST1C_16@10
  char *v17; // eax@10
  PgWinBut *v18; // edi@10
  D3DXCOLOR v19; // ST1C_16@10
  char *v20; // eax@10
  SLWCreateInfo::Item *v21; // edi@10
  SLWCreateInfo::Item *v22; // edi@12
  SLWCreateInfo::Item *v23; // edi@14
  SLWCreateInfo::Item *v24; // edi@16
  PgSprData *v25; // eax@18
  SlideListWin *v26; // eax@18
  NiNode *v27; // esi@20
  NiTexturePalette *pTexturePalette; // [sp+18h] [bp-74h]@1
  int iTop; // [sp+1Ch] [bp-70h]@18
  SLWCreateInfo kCreateInfo; // [sp+20h] [bp-6Ch]@10
  int iXOff; // [sp+3Ch] [bp-50h]@4
  int iYOff; // [sp+40h] [bp-4Ch]@4
  int iLeft; // [sp+44h] [bp-48h]@18
  UIUtil ui; // [sp+48h] [bp-44h]@10
  NiPointer<NiNode> spNode; // [sp+5Ch] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+60h] [bp-2Ch]@10
  int v37; // [sp+88h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v37 = 0;
  pTexturePalette = ::pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v3 = Folder::Merge(&Folder::m_acMenu, "Game\\RankingWin_Olympic.nif");
  PgUtil::LoadNodeNifFile(v3, &spNode, pTexturePalette);
  if ( !spNode.m_pObject )
    return 0;
  v4 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iXOff, &iYOff, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v4, 0, pkFrameWork, "EventRankWin", 0) )
  {
    v5 = spNode.m_pObject;
    v37 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
    return 0;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v37) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, iXOff, iYOff);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v7 = MenuTexMgr::GetTexture(0x13u);
  UIUtil::CreateSpr(&ui, "Theme", v7);
  UIUtil::CreateSpr(&ui, "Plane", 0);
  *(_QWORD *)&v8.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v8.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v9 = (char *)TextData3::Get(0xD72D2235);
  UIUtil::CreateTextNoSpr(&ui, "WinTitle", v9, v8, 5u);
  *(_QWORD *)&v10.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v10.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v11 = (char *)TextData3::Get(0x6AA4E1D5u);
  UIUtil::CreateTextNoSpr(&ui, "Text01", v11, v10, 5u);
  *(_QWORD *)&v12.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v12.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v13 = (char *)TextData3::Get(0x6AA0DBD4u);
  UIUtil::CreateTextNoSpr(&ui, "Text02", v13, v12, 5u);
  *(_QWORD *)&v14.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v14.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v15 = (char *)TextData3::Get(0x6CEAE8D6u);
  UIUtil::CreateTextNoSpr(&ui, "Text03", v15, v14, 5u);
  UIUtil::CreateCloseBtn(&ui, "ClsNor", "ClsOver", "ClsClick");
  UIUtil::CreateBtn(&ui, 3u, "HelpLinkNor", "HelpLinkOver", "HelpLinkClick", 0, 0);
  v2->m_pkRankBtn = UIUtil::CreateBtn(&ui, 2u, "BtnNor01", "BtnOver01", "BtnClick01", 0, 0);
  *(_QWORD *)&v16.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v16.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v17 = (char *)TextData3::Get(0x64EDE1BEu);
  v2->m_pkRankBtnText = UIUtil::CreateAttachedText((PgWin *)&v2->m_pkRankBtn->vfptr, v17, v16, 5u);
  v18 = UIUtil::CreateBtn(&ui, 0, "BtnNor02", "BtnOver02", "BtnClick02", 0, 0);
  *(_QWORD *)&v19.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v19.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v20 = (char *)TextData3::Get(0x72DAFBE2u);
  UIUtil::CreateAttachedText((PgWin *)&v18->vfptr, v20, v19, 5u);
  kCreateInfo.m_arrItem._Myfirst = 0;
  kCreateInfo.m_arrItem._Mylast = 0;
  kCreateInfo.m_arrItem._Myend = 0;
  kCreateInfo.m_bMakeData = 0;
  kCreateInfo.m_nOffX = 0;
  kCreateInfo.m_nOffY = 0;
  LOBYTE(v37) = 2;
  v21 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
  v21->nItemType = 1;
  v21->pNode = spNode.m_pObject;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarNor", 0xCu);
  LOBYTE(v37) = 3;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &v21->vecNodeName,
    &_Val);
  LOBYTE(v37) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v22 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  v22->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column01", 8u);
  LOBYTE(v37) = 4;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &v22->vecNodeName,
    &_Val);
  LOBYTE(v37) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v22->pNode = spNode.m_pObject;
  v23 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  v23->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column02", 8u);
  LOBYTE(v37) = 5;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &v23->vecNodeName,
    &_Val);
  LOBYTE(v37) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v23->pNode = spNode.m_pObject;
  v23->bAbbreviatable = 1;
  v24 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  v24->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column03", 8u);
  LOBYTE(v37) = 6;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &v24->vecNodeName,
    &_Val);
  LOBYTE(v37) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  v24->pNode = spNode.m_pObject;
  SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
  v25 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextBox02", &iLeft, &iTop, 0);
  v26 = SlideListWin::CreateWin(iLeft - iXOff, iTop - iYOff, v25, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
  v2->m_pkListWin = v26;
  SlideListWin::UpdateViewList(v26);
  ((void (__thiscall *)(EventRankWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  LOBYTE(v37) = 1;
  if ( kCreateInfo.m_arrItem._Myfirst )
  {
    std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(
      kCreateInfo.m_arrItem._Myfirst,
      kCreateInfo.m_arrItem._Mylast);
    operator delete(kCreateInfo.m_arrItem._Myfirst);
  }
  kCreateInfo.m_arrItem._Myfirst = 0;
  kCreateInfo.m_arrItem._Mylast = 0;
  kCreateInfo.m_arrItem._Myend = 0;
  LOBYTE(v37) = 0;
  UIUtil::~UIUtil(&ui);
  v27 = spNode.m_pObject;
  v37 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v27 )
    v27->vfptr->__vecDelDtor((NiRefObject *)v27, 1u);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0041A970) --------------------------------------------------------
std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *__stdcall std::_List_val<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO>>::_Buynode(std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *_Next, std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *_Prev, SCENARIO_RANKING_INFO *_Val)
{
  std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *result; // eax@1
  std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *v5; // edx@2
  SCENARIO_RANKING_INFO *v6; // esi@3
  std::exception pExceptionObject; // [sp+0h] [bp-Ch]@5

  result = (std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *)operator new(0x24u);
  if ( !result )
  {
    _Next = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Next);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v5 = _Prev;
  result->_Next = _Next;
  result->_Prev = v5;
  if ( result != (std::_List_nod<SCENARIO_RANKING_INFO,std::allocator<SCENARIO_RANKING_INFO> >::_Node *)-8 )
  {
    v6 = _Val;
    qmemcpy(&result->_Myval, _Val, 0x18u);
    BYTE3(result->_Myval.nScore) = BYTE3(v6->nScore);
  }
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0041A9E0) --------------------------------------------------------
EventRankWin *__thiscall EventRankWin::`scalar deleting destructor'(EventRankWin *this, unsigned int a2)
{
  EventRankWin *v2; // esi@1

  v2 = this;
  EventRankWin::~EventRankWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0041AA10) --------------------------------------------------------
void __thiscall EventTimeWin::EventTimeWin(EventTimeWin *this)
{
  EventTimeWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&EventTimeWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&EventTimeWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkTimeTextWin = 0;
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kTimer);
  v1->m_uiSecond = 0;
  *(_WORD *)&v1->m_bTimer = 0;
}
// 9721C4: using guessed type void (__thiscall *EventTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9721E4: using guessed type int (__thiscall *EventTimeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0041AA90) --------------------------------------------------------
void __thiscall EventTimeWin::~EventTimeWin(EventTimeWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&EventTimeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&EventTimeWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9721C4: using guessed type void (__thiscall *EventTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9721E4: using guessed type int (__thiscall *EventTimeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0041AAB0) --------------------------------------------------------
void __thiscall EventTimeWin::UpdateTimer(EventTimeWin *this, float fCurTime)
{
  EventTimeWin *v2; // esi@1
  NiRefObjectVtbl **v3; // eax@4
  NiRefObjectVtbl *v4; // edi@5
  char *v5; // eax@5

  v2 = this;
  if ( this->m_bTimer )
  {
    if ( CNSTimer_Interval::IsRun_GetCount(&this->m_kTimer, fCurTime) )
      ++v2->m_uiSecond;
    v3 = &v2->m_pkTimeTextWin->vfptr;
    if ( v3 )
    {
      v4 = *v3;
      v5 = fs("%02d:%02d", v2->m_uiSecond / 0x3C % 0x3C, v2->m_uiSecond % 0x3C);
      v4[118].__vecDelDtor((NiRefObject *)v2->m_pkTimeTextWin, (unsigned int)v5);
    }
  }
}

//----- (0041AB20) --------------------------------------------------------
void __thiscall EventTimeWin::UpdateCloser(EventTimeWin *this, float fCurTime)
{
  EventTimeWin *v2; // esi@1

  v2 = this;
  if ( this->m_bCloser )
  {
    if ( CNSTimer_Interval::IsRun_GetCount(&this->m_kTimer, fCurTime) )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
  }
}

//----- (0041AB60) --------------------------------------------------------
void __thiscall EventTimeWin::UpdateMeWin(EventTimeWin *this, float fCurTime)
{
  EventTimeWin *v2; // esi@1

  v2 = this;
  EventTimeWin::UpdateTimer(this, fCurTime);
  if ( v2->m_bCloser )
  {
    if ( CNSTimer_Interval::IsRun_GetCount(&v2->m_kTimer, fCurTime) )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
  }
}

//----- (0041ABB0) --------------------------------------------------------
void __thiscall EventTimeWin::Start(EventTimeWin *this, float fCurTime)
{
  EventTimeWin *v2; // esi@1

  v2 = this;
  CNSTimer_Interval::ReSet(&this->m_kTimer, fCurTime);
  v2->m_kTimer.m_fCheckTime = 1.0;
  v2->m_uiSecond = 0;
  v2->m_bTimer = 1;
}

//----- (0041ABF0) --------------------------------------------------------
void __thiscall EventTimeWin::Stop(EventTimeWin *this, float fDeleteTime)
{
  EventTimeWin *v2; // esi@1

  v2 = this;
  *(_WORD *)&this->m_bTimer = 256;
  CNSTimer_Interval::ReSet(&this->m_kTimer, Timer::ms_fCurTime);
  v2->m_kTimer.m_fCheckTime = fDeleteTime;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0041AC30) --------------------------------------------------------
char __thiscall EventTimeWin::Create(EventTimeWin *this, PgFrameWork *pkFrameWork)
{
  EventTimeWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // ebx@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  PgSprData *v10; // eax@15
  PgWinSpr *v11; // eax@15
  PgSprData *v12; // eax@15
  PgWinSpr *v13; // eax@15
  PgSprData *v14; // eax@15
  PgSprData *v15; // edi@15
  PgWinSpr *v16; // eax@15
  NiPointer<PgSprData::PgHitTester> *v17; // ecx@15
  unsigned int v18; // edi@15
  unsigned int v19; // ebx@15
  PgFont *v20; // eax@15
  PgWinText *v21; // eax@15
  NiRefObjectVtbl *v22; // edi@15
  PgFont *v23; // eax@15
  NiRefObjectVtbl *v24; // edi@15
  int v25; // eax@15
  NiNode *v26; // esi@16
  int uiLeft; // [sp+34h] [bp-18h]@11
  int uiTop; // [sp+38h] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+3Ch] [bp-10h]@1
  int v30; // [sp+48h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v30 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v30 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "\\Game\\QuestTime.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "EventTimeWin", 0) )
  {
    v4 = spNode.m_pObject;
    v30 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
    goto LABEL_5;
  }
  v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Reward", &uiLeft, &uiTop, 0);
  v11 = PgWinSpr::CreateWin(uiLeft, uiTop, v10, (PgWin *)&v2->vfptr, 0, 0);
  v11->vfptr[64].__vecDelDtor((NiRefObject *)v11, 1u);
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  v13 = PgWinSpr::CreateWin(uiLeft, uiTop, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Time", &uiLeft, &uiTop, v3);
  v15 = v14;
  v16 = PgWinSpr::CreateWin(uiLeft, uiTop, v14, (PgWin *)&v2->vfptr, 0, 0);
  v16->vfptr[60].__vecDelDtor((NiRefObject *)v16, 0);
  v17 = v15->m_akHitTester.m_pBase;
  v18 = v17->m_pObject->m_uiHeight;
  v19 = v17->m_pObject->m_uiWidth;
  v20 = Font::Get(0);
  v21 = PgWinText::CreateWin(uiLeft, uiTop + 2, v19, v18, v20, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkTimeTextWin = v21;
  v21->vfptr[122].__vecDelDtor((NiRefObject *)v21, 5u);
  v22 = v2->m_pkTimeTextWin->vfptr;
  v23 = Font::Get(LARGEBOLD);
  v22[113].__vecDelDtor((NiRefObject *)v2->m_pkTimeTextWin, (unsigned int)v23);
  ((void (__stdcall *)(const char *))v2->m_pkTimeTextWin->vfptr[118].__vecDelDtor)("00:00:00");
  ((void (__stdcall *)(_DWORD))v2->m_pkTimeTextWin->vfptr[60].__vecDelDtor)(0);
  ((void (__thiscall *)(EventTimeWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    1.0,
    0.0);
  v24 = v2->vfptr;
  v25 = (int)v2->vfptr[41].__vecDelDtor((NiRefObject *)v2, 240u);
  v24[77].__vecDelDtor((NiRefObject *)v2, v25);
  v30 = -1;
  if ( spNode.m_pObject )
  {
    v26 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v26 )
        v26->vfptr->__vecDelDtor((NiRefObject *)v26, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0041AF20) --------------------------------------------------------
EventTimeWin *__cdecl EventTimeWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  EventTimeWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x180u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    LOBYTE(v6) = 1;
    v2->vfptr = (NiRefObjectVtbl *)&EventTimeWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&EventTimeWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    CNSTimer_Interval::CNSTimer_Interval((CNSTimer_Interval *)&v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]);
    LODWORD(v2[1].m_kLocal.m_Translate.x) = 0;
    LOWORD(v2[1].m_kLocal.m_Translate.y) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (EventTimeWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9721C4: using guessed type void (__thiscall *EventTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9721E4: using guessed type int (__thiscall *EventTimeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0041B080) --------------------------------------------------------
EventTimeWin *__thiscall EventTimeWin::`scalar deleting destructor'(EventTimeWin *this, unsigned int a2)
{
  EventTimeWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&EventTimeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&EventTimeWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9721C4: using guessed type void (__thiscall *EventTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9721E4: using guessed type int (__thiscall *EventTimeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0041B0C0) --------------------------------------------------------
void __cdecl Folder::Init()
{
  char *v0; // eax@1
  char *v1; // edx@1
  char v2; // cl@2
  int v3; // eax@3
  char v4; // cl@4
  int v5; // eax@5
  char v6; // cl@6
  char *v7; // eax@7
  char v8; // cl@8
  int v9; // eax@9
  char v10; // cl@10
  char *v11; // eax@11
  char v12; // cl@12
  int v13; // eax@13
  char v14; // cl@14
  char *v15; // eax@15
  char v16; // cl@16
  int v17; // eax@17
  char v18; // cl@18
  char *v19; // eax@19
  char v20; // cl@20
  int v21; // eax@21
  char v22; // cl@22
  char *v23; // eax@23
  char v24; // cl@24
  int v25; // eax@25
  char v26; // cl@26
  char *v27; // eax@27
  char v28; // cl@28
  int v29; // eax@29
  char v30; // cl@30
  char *v31; // eax@31
  char v32; // cl@32
  int v33; // eax@33
  char v34; // cl@34
  char *v35; // eax@35
  char v36; // cl@36
  int v37; // eax@37
  char v38; // cl@38
  char *v39; // eax@39
  char v40; // cl@40
  int v41; // eax@41
  char v42; // cl@42
  char *v43; // eax@43
  char v44; // cl@44
  int v45; // eax@45
  char v46; // cl@46
  char *v47; // eax@47
  char v48; // cl@48
  int v49; // eax@49
  char v50; // cl@50
  char *v51; // eax@51
  char v52; // cl@52
  int v53; // eax@53
  char v54; // cl@54
  char *v55; // eax@55
  char v56; // cl@56
  Argv kArgv; // [sp+4h] [bp-41Ch]@1
  int v58; // [sp+41Ch] [bp-4h]@1

  Argv::Argv(&kArgv);
  v58 = 0;
  v0 = Argv::GetMerge(&kArgv, filename);
  v1 = (char *)(&Folder::m_acMain - v0);
  do
  {
    v2 = *v0;
    v0[(_DWORD)v1] = *v0;
    ++v0;
  }
  while ( v2 );
  v3 = 0;
  do
  {
    v4 = kArgv.m_FileName[v3];
    LOBYTE((&Folder::m_acFileName)[v3++]) = v4;
  }
  while ( v4 );
  v5 = 0;
  do
  {
    v6 = *(&Folder::m_acMain + v5);
    *(&Folder::m_acMenu + v5++) = v6;
  }
  while ( v6 );
  v7 = &Folder::m_acMenu - 1;
  do
    v8 = (v7++)[1];
  while ( v8 );
  *(_DWORD *)v7 = 1299408210;
  *((_DWORD *)v7 + 1) = 1551199845;
  v7[8] = 0;
  v9 = 0;
  do
  {
    v10 = *(&Folder::m_acMain + v9);
    *(&Folder::m_acMap + v9++) = v10;
  }
  while ( v10 );
  v11 = &Folder::m_acMap - 1;
  do
    v12 = (v11++)[1];
  while ( v12 );
  *(_DWORD *)v11 = 1299408210;
  *((_DWORD *)v11 + 1) = 6058081;
  v13 = 0;
  do
  {
    v14 = *(&Folder::m_acMain + v13);
    *(&Folder::m_acSound + v13++) = v14;
  }
  while ( v14 );
  v15 = &Folder::m_acSound - 1;
  do
    v16 = (v15++)[1];
  while ( v16 );
  *(_DWORD *)v15 = 1400071506;
  *((_DWORD *)v15 + 1) = 1684960623;
  *((_WORD *)v15 + 4) = 92;
  v17 = 0;
  do
  {
    v18 = *(&Folder::m_acMain + v17);
    *(&Folder::m_acEffect + v17++) = v18;
  }
  while ( v18 );
  v19 = &Folder::m_acEffect - 1;
  do
    v20 = (v19++)[1];
  while ( v20 );
  *(_DWORD *)v19 = 1165190482;
  *((_DWORD *)v19 + 1) = 1667589734;
  *((_WORD *)v19 + 4) = 23668;
  v19[10] = 0;
  v21 = 0;
  do
  {
    v22 = *(&Folder::m_acMain + v21);
    LOBYTE((&Folder::m_acItem)[v21++]) = v22;
  }
  while ( v22 );
  v23 = (char *)&Folder::m_acItem - 1;
  do
    v24 = (v23++)[1];
  while ( v24 );
  *(_DWORD *)v23 = 1232299346;
  *((_DWORD *)v23 + 1) = 1550673268;
  v23[8] = 0;
  v25 = 0;
  do
  {
    v26 = *(&Folder::m_acMain + v25);
    *(&Folder::m_acCharacter + v25++) = v26;
  }
  while ( v26 );
  v27 = &Folder::m_acCharacter - 1;
  do
    v28 = (v27++)[1];
  while ( v28 );
  *(_DWORD *)v27 = 1131636050;
  *((_DWORD *)v27 + 1) = 1550999912;
  v27[8] = 0;
  v29 = 0;
  do
  {
    v30 = *(&Folder::m_acMain + v29);
    *(&Folder::m_acSystem + v29++) = v30;
  }
  while ( v30 );
  v31 = &Folder::m_acSystem - 1;
  do
    v32 = (v31++)[1];
  while ( v32 );
  *(_DWORD *)v31 = 1400071506;
  *((_DWORD *)v31 + 1) = 1702130553;
  *((_WORD *)v31 + 4) = 23661;
  v31[10] = 0;
  v33 = 0;
  do
  {
    v34 = *(&Folder::m_acMain + v33);
    *(&Folder::m_acEffect + v33++) = v34;
  }
  while ( v34 );
  v35 = &Folder::m_acEffect - 1;
  do
    v36 = (v35++)[1];
  while ( v36 );
  *(_DWORD *)v35 = 1165190482;
  *((_DWORD *)v35 + 1) = 1667589734;
  *((_WORD *)v35 + 4) = 23668;
  v35[10] = 0;
  v37 = 0;
  do
  {
    v38 = *(&Folder::m_acMain + v37);
    *(&Folder::m_acCtrl + v37++) = v38;
  }
  while ( v38 );
  v39 = &Folder::m_acCtrl - 1;
  do
    v40 = (v39++)[1];
  while ( v40 );
  *(_DWORD *)v39 = 1131636050;
  *((_DWORD *)v39 + 1) = 1550611060;
  v39[8] = 0;
  v41 = 0;
  do
  {
    v42 = (char)(&Folder::m_acItem)[v41];
    *(&Folder::m_acMHObj + v41++) = v42;
  }
  while ( v42 );
  v43 = &Folder::m_acMHObj - 1;
  do
    v44 = (v43++)[1];
  while ( v44 );
  *(_DWORD *)v43 = 1950959693;
  *((_DWORD *)v43 + 1) = 6057317;
  v45 = 0;
  do
  {
    v46 = *(&Folder::m_acMap + v45);
    LOBYTE((&Folder::m_acMHMap)[v45++]) = v46;
  }
  while ( v46 );
  v47 = (char *)&Folder::m_acMHMap - 1;
  do
    v48 = (v47++)[1];
  while ( v48 );
  *(_DWORD *)v47 = 1766213709;
  *((_DWORD *)v47 + 1) = 1550085221;
  v47[8] = 0;
  v49 = 0;
  do
  {
    v50 = *(&Folder::m_acMain + v49);
    *(&Folder::m_acSkin + v49++) = v50;
  }
  while ( v50 );
  v51 = &Folder::m_acSkin - 1;
  do
    v52 = (v51++)[1];
  while ( v52 );
  *(_DWORD *)v51 = 1852402515;
  *((_WORD *)v51 + 2) = 92;
  v53 = 0;
  do
  {
    v54 = *(&Folder::m_acMain + v53);
    *(&Folder::m_acLuaScript + v53++) = v54;
  }
  while ( v54 );
  v55 = &Folder::m_acLuaScript - 1;
  do
    v56 = (v55++)[1];
  while ( v56 );
  *(_DWORD *)v55 = 1398895948;
  *((_DWORD *)v55 + 1) = 1885958755;
  *((_WORD *)v55 + 4) = 23668;
  v55[10] = 0;
  Folder::m_bInit = 1;
  v58 = -1;
  Argv::~Argv(&kArgv);
}
// A88B08: using guessed type char *Folder::m_acMHMap;
// A88D18: using guessed type char *Folder::m_acFileName;
// A89130: using guessed type char *Folder::m_acItem;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0041B510) --------------------------------------------------------
bool __cdecl Font::IsInit()
{
  return Font::ms_bInit;
}
// A89962: using guessed type bool Font::ms_bInit;

//----- (0041B520) --------------------------------------------------------
struct Font::FontDefine **__cdecl Font::GetFontDefine(Font::Type eType)
{
  unsigned int v1; // esi@1
  struct Font::FontDefine **result; // eax@6

  v1 = 52 * eType;
  if ( !strcmp((const char *)dword_A89988[13 * eType], (const char *)&unk_9724BB) )
    dword_A89988[v1 / 4] = (int)Font::ms_acFontFaceName;
  if ( Font::ms_bUsePrivateFont && eType == 1 )
  {
    dword_A899BC = (int)"verdanab";
    dword_A8999C = 14;
    dword_A899A4 = 400;
  }
  result = &(&Font::ms_kFontDefine)[v1 / 0x34];
  if ( Font::ms_bShineFontLoadFailed )
    dword_A89988[v1 / 4] = (int)"verdanab";
  return result;
}
// A6977C: using guessed type bool Font::ms_bUsePrivateFont;
// A89960: using guessed type bool Font::ms_bShineFontLoadFailed;
// A89968: using guessed type struct Font::FontDefine *Font::ms_kFontDefine;
// A89988: using guessed type int dword_A89988[];
// A8999C: using guessed type int dword_A8999C;
// A899A4: using guessed type int dword_A899A4;
// A899BC: using guessed type int dword_A899BC;

//----- (0041B5C0) --------------------------------------------------------
int __stdcall Font::EnumFontsProc(tagLOGFONTA *lplf, tagTEXTMETRICA *lptm, unsigned int dwType, int lpData)
{
  bool v4; // zf@1
  int result; // eax@1

  v4 = strncmp(lplf->lfFaceName, Font::ms_acFontFaceName, strlen(Font::ms_acFontFaceName)) == 0;
  result = 1;
  if ( v4 )
  {
    Font::ms_bUserFontLoadSuccess = 1;
    Font::ms_bUsePrivateFont = 0;
  }
  return result;
}
// A6977C: using guessed type bool Font::ms_bUsePrivateFont;
// A89961: using guessed type bool Font::ms_bUserFontLoadSuccess;

//----- (0041B610) --------------------------------------------------------
void __thiscall Font::FontDefine::FontDefine(Font::FontDefine *this)
{
  this->Height = 12;
  this->Width = 0;
  this->Weight = 400;
  this->Italic = 0;
  this->CharSet = 1;
  this->OutputPrecision = 0;
  this->Quality = 0;
  this->PitchAndFamily = 0;
  this->pFacename = (const char *)&unk_97250B;
  this->dwOutline = 0;
}

//----- (0041B650) --------------------------------------------------------
void __thiscall Font::FontDefine::FontDefine(Font::FontDefine *this, const char *pName, unsigned int height, unsigned int weight)
{
  this->Width = 0;
  this->Italic = 0;
  this->OutputPrecision = 0;
  this->Quality = 0;
  this->PitchAndFamily = 0;
  this->dwOutline = 0;
  this->pFacename = pName;
  this->CharSet = 1;
  this->Height = height;
  this->Weight = weight;
}

//----- (0041B690) --------------------------------------------------------
void __thiscall Font::FontDefine::FontDefine(Font::FontDefine *this, FontSet *pkFontSet)
{
  int v2; // esi@1

  this->Height = pkFontSet->FS_Size;
  this->Width = 0;
  this->Weight = pkFontSet->FS_Bold != 0 ? 700 : 400;
  v2 = pkFontSet->FS_Italic;
  this->OutputPrecision = 0;
  this->Quality = 0;
  this->PitchAndFamily = 0;
  this->Italic = v2;
  this->CharSet = 1;
  this->pFacename = pkFontSet->FS_FontName;
  this->dwOutline = pkFontSet->FS_Outline;
  this->R = pkFontSet->FS_R;
  this->G = pkFontSet->FS_G;
  this->B = pkFontSet->FS_B;
}

//----- (0041B700) --------------------------------------------------------
void __cdecl Font::Termiante()
{
  unsigned int v0; // edi@1
  int v1; // esi@2
  const char *v2; // eax@11
  const char *v3; // eax@13
  const char *v4; // eax@15
  const char *v5; // eax@17
  const char *v6; // eax@21

  v0 = 0;
  do
  {
    v1 = Font::ms_spFont[v0];
    if ( v1 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v1 + 4)) && v1 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v1)(v1, 1);
      Font::ms_spFont[v0] = 0;
    }
    ++v0;
  }
  while ( v0 < 12 );
  Font::ms_bInit = 0;
  if ( Font::ms_bUsePrivateFont == 1 )
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    v2 = Folder::Merge(&Folder::m_acSystem, ShineFontName::DECRYPTED);
    RemoveFontResourceA(v2);
    if ( !Folder::m_bInit )
      Folder::Init();
    v3 = Folder::Merge(&Folder::m_acSystem, ShineFontName::DECRYPTED);
    DeleteFileA(v3);
    if ( !Folder::m_bInit )
      Folder::Init();
    v4 = Folder::Merge(&Folder::m_acSystem, ShineFontName::DECRYPTED_BOLD);
    RemoveFontResourceA(v4);
    if ( !Folder::m_bInit )
      Folder::Init();
    v5 = Folder::Merge(&Folder::m_acSystem, ShineFontName::DECRYPTED_BOLD);
    DeleteFileA(v5);
  }
  if ( Font::ms_bUserFontLoadSuccess == 1 )
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    v6 = Folder::Merge(&Folder::m_acSkin, Font::ms_acUserFont);
    RemoveFontResourceA(v6);
  }
}
// A6977C: using guessed type bool Font::ms_bUsePrivateFont;
// A8975C: using guessed type bool Folder::m_bInit;
// A89961: using guessed type bool Font::ms_bUserFontLoadSuccess;
// A89962: using guessed type bool Font::ms_bInit;
// A89BD8: using guessed type int Font::ms_spFont[];

//----- (0041B820) --------------------------------------------------------
void __cdecl Font::EncryptFontFile()
{
  Encrypt::EncryptMethodXor *v0; // eax@1
  Encrypt::IEncryptMethod *v1; // eax@2
  Encrypt::IEncryptMethod *v2; // esi@2
  char *v3; // eax@6
  char *v4; // eax@9
  const char *v5; // eax@12
  char *v6; // eax@14
  char *v7; // eax@17
  const char *v8; // eax@20
  Encrypt::EncryptStream kEnc; // [sp+Ch] [bp-1Ch]@1
  Encrypt::EncryptMethodXor *v10; // [sp+18h] [bp-10h]@1
  int v11; // [sp+24h] [bp-4h]@1

  Encrypt::Stream::Stream((Encrypt::Stream *)&kEnc.m_kOriginal.vfptr);
  kEnc.m_kOriginal.vfptr = (Encrypt::StreamVtbl *)&Encrypt::FileStream::`vftable';
  v11 = 0;
  v0 = (Encrypt::EncryptMethodXor *)operator new(0x24u);
  v10 = v0;
  LOBYTE(v11) = 1;
  if ( v0 )
  {
    Encrypt::EncryptMethodXor::EncryptMethodXor(v0, Font::ms_pcEncryptSeed);
    v2 = v1;
  }
  else
  {
    v2 = 0;
  }
  LOBYTE(v11) = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v3 = Folder::Merge(&Folder::m_acSystem, ShineFontName::ORIGINAL);
  if ( Encrypt::EncryptStream::LoadOriginal(&kEnc, v3) )
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    v4 = Folder::Merge(&Folder::m_acSystem, ShineFontName::ENCRYPTED);
    Encrypt::EncryptStream::SaveEncrypted(&kEnc, v4, v2);
  }
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acSystem, ShineFontName::ORIGINAL);
  DeleteFileA(v5);
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = Folder::Merge(&Folder::m_acSystem, ShineFontName::ORIGINAL_BOLD);
  if ( Encrypt::EncryptStream::LoadOriginal(&kEnc, v6) )
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    v7 = Folder::Merge(&Folder::m_acSystem, ShineFontName::ENCRYPTED_BOLD);
    Encrypt::EncryptStream::SaveEncrypted(&kEnc, v7, v2);
  }
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acSystem, ShineFontName::ORIGINAL_BOLD);
  DeleteFileA(v8);
  operator delete(v2);
  v11 = -1;
  Encrypt::Stream::~Stream((Encrypt::Stream *)&kEnc.m_kOriginal.vfptr);
}
// 9725FC: using guessed type int (__thiscall *Encrypt::FileStream::`vftable')(void *p, char);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0041B9C0) --------------------------------------------------------
PgFont *__cdecl Font::Create(Font::Type eType)
{
  struct Font::FontDefine **v1; // esi@1
  PgFont *v2; // eax@1
  PgFont *v3; // edi@1
  PgFont *v4; // eax@2
  PgFont *result; // eax@4

  v1 = Font::GetFontDefine(eType);
  v2 = (PgFont *)operator new(0x184u);
  v3 = 0;
  if ( v2 )
  {
    PgFont::PgFont(v2);
    v3 = v4;
  }
  if ( CSpFont::Create(
         (CSpFont *)&v3->vfptr,
         (char *)v1[8],
         (int)*v1,
         (int)v1[1],
         (int)v1[2],
         (unsigned int)v1[3],
         (unsigned int)v1[4],
         (unsigned int)v1[5],
         (unsigned int)v1[6],
         (unsigned int)v1[7],
         (unsigned int)v1[9],
         0x200u,
         5u) )
  {
    v3->m_uiDefHeight = (unsigned int)&(&Font::ms_kFontDefine)[eType]->Height;
    result = v3;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A89968: using guessed type struct Font::FontDefine *Font::ms_kFontDefine;

//----- (0041BA90) --------------------------------------------------------
char __cdecl Font::ParseIniFile()
{
  const char *v0; // eax@3
  _iobuf *v1; // eax@3
  _iobuf *v2; // esi@3
  int iUsePrivateFont; // [sp+0h] [bp-108h]@7
  char acFileBuff[256]; // [sp+4h] [bp-104h]@4

  if ( !Folder::m_bInit )
    Folder::Init();
  v0 = Folder::Merge(&Folder::m_acSystem, "font.ini");
  v1 = fopen(v0, "r");
  v2 = v1;
  if ( !v1 )
    return 0;
  if ( !fgets(acFileBuff, 256, v1) )
  {
    fclose(v2);
    return 0;
  }
  fclose(v2);
  sscanf(acFileBuff, "%s %d", Font::ms_acFontFaceName, &iUsePrivateFont);
  PgUtil::ChangeCharInText(Font::ms_acFontFaceName, 35, 32, strlen(Font::ms_acFontFaceName));
  Font::ms_bUsePrivateFont = iUsePrivateFont != 0;
  return 1;
}
// A6977C: using guessed type bool Font::ms_bUsePrivateFont;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0041BB80) --------------------------------------------------------
bool __cdecl Font::IsUserFont()
{
  const char *v0; // eax@3
  HANDLE v1; // esi@3
  bool result; // al@4
  signed int v3; // kr00_4@6
  int v4; // esi@7
  char *acTTF[8]; // [sp+0h] [bp-168h]@1
  void *hFind; // [sp+20h] [bp-148h]@3
  _WIN32_FIND_DATAA FindData; // [sp+24h] [bp-144h]@3

  acTTF[0] = ".ttf";
  acTTF[1] = ".ttF";
  acTTF[2] = ".tTf";
  acTTF[3] = ".tTF";
  acTTF[4] = ".Ttf";
  acTTF[5] = ".TtF";
  acTTF[6] = ".TTf";
  acTTF[7] = ".TTF";
  if ( !Folder::m_bInit )
    Folder::Init();
  v0 = Folder::Merge(&Folder::m_acSkin, "*");
  v1 = FindFirstFileA(v0, &FindData);
  hFind = v1;
  if ( v1 == (HANDLE)-1 )
  {
    result = 0;
  }
  else
  {
    while ( 1 )
    {
      if ( FindData.dwFileAttributes != 16 )
      {
        v3 = strlen(FindData.cFileName);
        if ( v3 >= 4 )
          break;
      }
LABEL_11:
      if ( !FindNextFileA(v1, &FindData) )
        goto LABEL_14;
    }
    v4 = 0;
    while ( strncmp(acTTF[v4], (const char *)&FindData.dwReserved1 + v3, 4u) )
    {
      if ( (unsigned int)++v4 >= 8 )
      {
        v1 = hFind;
        goto LABEL_11;
      }
    }
    strncpy(Font::ms_acFontFaceName, FindData.cFileName, v3 - 4);
    v1 = hFind;
LABEL_14:
    FindClose(v1);
    sprintf(Font::ms_acUserFont, "%s.ttf", Font::ms_acFontFaceName);
    result = strlen(Font::ms_acFontFaceName) > 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0041BD00) --------------------------------------------------------
PgFont *__cdecl Font::Get(Font::Type eType)
{
  PgFont *v1; // eax@2
  int v2; // edi@2
  int v3; // ebx@2
  PgFont *result; // eax@9
  PgFont *v5; // eax@10
  int v6; // edi@10
  int v7; // ebx@10

  if ( !Font::ms_spFont[eType] )
  {
    v1 = Font::Create(eType);
    v2 = Font::ms_spFont[eType];
    v3 = (int)v1;
    if ( (PgFont *)v2 != v1 )
    {
      if ( v2 && !InterlockedDecrement((volatile LONG *)(v2 + 4)) && v2 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v2)(v2, 1);
      Font::ms_spFont[eType] = v3;
      if ( v3 )
        InterlockedIncrement((volatile LONG *)(v3 + 4));
    }
  }
  result = (PgFont *)Font::ms_spFont[eType];
  if ( !result )
  {
    Font::ms_bShineFontLoadFailed = 1;
    v5 = Font::Create(eType);
    v6 = Font::ms_spFont[eType];
    v7 = (int)v5;
    if ( (PgFont *)v6 != v5 )
    {
      if ( v6 && !InterlockedDecrement((volatile LONG *)(v6 + 4)) && v6 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v6)(v6, 1);
      Font::ms_spFont[eType] = v7;
      if ( v7 )
        InterlockedIncrement((volatile LONG *)(v7 + 4));
    }
    result = (PgFont *)Font::ms_spFont[eType];
  }
  return result;
}
// A89960: using guessed type bool Font::ms_bShineFontLoadFailed;
// A89BD8: using guessed type int Font::ms_spFont[];

//----- (0041BDD0) --------------------------------------------------------
void __cdecl Font::FontInit()
{
  char *v0; // eax@3
  struct Font::FontDefine **v1; // eax@5
  int *v2; // edi@6
  FontSet *v3; // eax@7
  int v4; // edx@7
  int v5; // ecx@7
  int v6; // ecx@7
  int v7; // edx@7
  int v8; // ecx@7
  int v9; // edx@7
  FontSet *v10; // eax@7
  int v11; // edx@7
  int v12; // ecx@7
  int v13; // ecx@7
  int v14; // edx@7
  int v15; // ecx@7
  int v16; // edx@7
  int v17; // [sp+4h] [bp-34h]@6
  int v18; // [sp+8h] [bp-30h]@6
  int v19; // [sp+Ch] [bp-2Ch]@6
  int v20; // [sp+10h] [bp-28h]@6
  int v21; // [sp+14h] [bp-24h]@6
  int v22; // [sp+18h] [bp-20h]@6
  int v23; // [sp+1Ch] [bp-1Ch]@6
  int v24; // [sp+20h] [bp-18h]@6
  const char *v25; // [sp+24h] [bp-14h]@6
  int v26; // [sp+28h] [bp-10h]@6
  int v27; // [sp+2Ch] [bp-Ch]@7
  int v28; // [sp+30h] [bp-8h]@7
  int v29; // [sp+34h] [bp-4h]@7

  if ( !Folder::m_bInit )
    Folder::Init();
  v0 = Folder::Merge(&Folder::m_acSystem, "FontSet.shn");
  if ( ITableBase<FontSet,FontSetTab>::Load(v0) )
  {
    v1 = &Font::ms_kFontDefine;
    do
    {
      v2 = (int *)v1;
      v1 += 13;
      v17 = 12;
      v18 = 0;
      v19 = 400;
      v20 = 0;
      v21 = 1;
      v22 = 0;
      v23 = 0;
      v24 = 0;
      v25 = (const char *)&unk_97250B;
      v26 = 0;
      qmemcpy(v2, &v17, 0x34u);
    }
    while ( (signed int)v1 < (signed int)Font::ms_spFont );
    v18 = 0;
    v20 = 0;
    v21 = 1;
    v22 = 0;
    v23 = 0;
    v24 = 0;
    v26 = 0;
    v25 = "verdana";
    v17 = 14;
    v19 = 400;
    qmemcpy(&Font::ms_kFontDefine, &v17, 0x34u);
    v17 = 12;
    v18 = 0;
    v20 = 0;
    v21 = 1;
    v22 = 0;
    v23 = 0;
    v24 = 0;
    v26 = 0;
    v25 = (const char *)&unk_9724D7;
    v19 = 700;
    qmemcpy(&dword_A8999C, &v17, 0x34u);
    v18 = 0;
    v20 = 0;
    v21 = 1;
    v22 = 0;
    v23 = 0;
    v24 = 0;
    v26 = 0;
    v25 = (const char *)&unk_9724E6;
    v17 = 14;
    v19 = 400;
    qmemcpy(&unk_A899D0, &v17, 0x34u);
    v18 = 0;
    v20 = 0;
    v21 = 1;
    v22 = 0;
    v23 = 0;
    v24 = 0;
    v26 = 0;
    v25 = (const char *)&unk_9724E7;
    v17 = 15;
    v19 = 700;
    qmemcpy(&unk_A89A04, &v17, 0x34u);
    v18 = 0;
    v20 = 0;
    v21 = 1;
    v22 = 0;
    v23 = 0;
    v24 = 0;
    v26 = 0;
    v25 = (const char *)&unk_9724F6;
    v17 = 15;
    v19 = 400;
    qmemcpy(&unk_A89A38, &v17, 0x34u);
    v18 = 0;
    v20 = 0;
    v21 = 1;
    v22 = 0;
    v23 = 0;
    v24 = 0;
    v26 = 0;
    v25 = (const char *)&unk_9724F7;
    v17 = 24;
    v19 = 400;
    qmemcpy(&unk_A89A6C, &v17, 0x34u);
    v21 = 1;
    v18 = 0;
    v20 = 0;
    v22 = 0;
    v23 = 0;
    v24 = 0;
    v26 = 0;
    v25 = (const char *)&unk_9724FE;
    v17 = 14;
    v19 = 400;
    qmemcpy(&unk_A89AD4, &v17, 0x34u);
    v21 = 1;
    v19 = 700;
    v18 = 0;
    v20 = 0;
    v22 = 0;
    v23 = 0;
    v24 = 0;
    v26 = 0;
    v25 = (const char *)&unk_9724FF;
    v17 = 24;
    qmemcpy(&unk_A89AA0, &v17, 0x34u);
    v21 = 1;
    v19 = 700;
    dword_A89AC4 = 1;
    v18 = 0;
    v20 = 0;
    v22 = 0;
    v23 = 0;
    v24 = 0;
    v26 = 0;
    v25 = (const char *)&unk_972509;
    v17 = 16;
    qmemcpy(&unk_A89B08, &v17, 0x34u);
    dword_A89B2C = 1;
    v21 = 1;
    v17 = 13;
    v19 = 700;
    v18 = 0;
    v20 = 0;
    v22 = 0;
    v23 = 0;
    v24 = 0;
    v26 = 0;
    v25 = (const char *)&unk_97250A;
    qmemcpy(&unk_A89B3C, &v17, 0x34u);
    dword_A89B60 = 1;
    v3 = FontSetTab::GetByFSIndex("FS_NamePanel");
    v4 = -(v3->FS_Bold != 0);
    v17 = v3->FS_Size;
    v5 = v3->FS_Italic;
    v18 = 0;
    v19 = (v4 & 0x12C) + 400;
    v20 = v5;
    v21 = 1;
    v22 = 0;
    v23 = 0;
    v24 = 0;
    v6 = v3->FS_Outline;
    v25 = v3->FS_FontName;
    v7 = v3->FS_R;
    v26 = v6;
    v8 = v3->FS_G;
    v27 = v7;
    v9 = v3->FS_B;
    v28 = v8;
    v29 = v9;
    qmemcpy(&unk_A89B70, &v17, 0x34u);
    v10 = FontSetTab::GetByFSIndex("FS_GM");
    v11 = -(v10->FS_Bold != 0);
    v17 = v10->FS_Size;
    v12 = v10->FS_Italic;
    v19 = (v11 & 0x12C) + 400;
    v20 = v12;
    v13 = v10->FS_Outline;
    v25 = v10->FS_FontName;
    v14 = v10->FS_R;
    v26 = v13;
    v15 = v10->FS_G;
    v27 = v14;
    v16 = v10->FS_B;
    v28 = v15;
    v18 = 0;
    v22 = 0;
    v23 = 0;
    v24 = 0;
    v21 = 1;
    v29 = v16;
    qmemcpy(&unk_A89BA4, &v17, 0x34u);
  }
  else
  {
    MessageBoxA(0, "FontSet.shn InitError!!", "Application Initialize Error!", 0x10u);
  }
}
// A8975C: using guessed type bool Folder::m_bInit;
// A89968: using guessed type struct Font::FontDefine *Font::ms_kFontDefine;
// A8999C: using guessed type int dword_A8999C;
// A89AC4: using guessed type int dword_A89AC4;
// A89B2C: using guessed type int dword_A89B2C;
// A89B60: using guessed type int dword_A89B60;
// A89BD8: using guessed type int Font::ms_spFont[];

//----- (0041C1A0) --------------------------------------------------------
char __cdecl Font::Init()
{
  const char *v0; // eax@4
  const char *v1; // eax@6
  HDC v2; // eax@6
  const char *v3; // eax@10
  char result; // al@11
  const char *v5; // eax@14
  const char *v6; // eax@16
  HANDLE v7; // esi@16
  signed int v8; // kr00_4@18
  const char *v9; // eax@22
  Encrypt::IEncryptMethod *v10; // esi@25
  Encrypt::EncryptMethodXor *v11; // eax@25
  Encrypt::IEncryptMethod *v12; // eax@26
  char *v13; // eax@29
  char *v14; // eax@32
  char *v15; // eax@35
  char *v16; // eax@38
  const char *v17; // eax@41
  const char *v18; // eax@43
  const char *v19; // eax@45
  const char *v20; // eax@47
  Encrypt::EncryptStream kEnc; // [sp+14h] [bp-15Ch]@25
  _WIN32_FIND_DATAA FindData; // [sp+20h] [bp-150h]@16
  int v23; // [sp+16Ch] [bp-4h]@25

  Font::FontInit();
  if ( Font::IsUserFont() )
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    v0 = Folder::Merge(&Folder::m_acSkin, Font::ms_acUserFont);
    RemoveFontResourceA(v0);
    if ( !Folder::m_bInit )
      Folder::Init();
    v1 = Folder::Merge(&Folder::m_acSkin, Font::ms_acUserFont);
    AddFontResourceA(v1);
    v2 = GetDC(0);
    EnumFontFamiliesA(v2, 0, Font::EnumFontsProc, 0);
  }
  if ( !Font::ms_bUserFontLoadSuccess )
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    v3 = Folder::Merge(&Folder::m_acSkin, Font::ms_acUserFont);
    RemoveFontResourceA(v3);
    if ( !Font::ParseIniFile() )
      goto LABEL_51;
  }
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acSystem, "verdana.ttf");
  AddFontResourceA(v5);
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = Folder::Merge(&Folder::m_acSystem, "*");
  v7 = FindFirstFileA(v6, &FindData);
  if ( v7 != (HANDLE)-1 )
  {
    do
    {
      if ( FindData.dwFileAttributes != 16 )
      {
        v8 = strlen(FindData.cFileName);
        if ( v8 >= 4 && !_strnicmp(".ttf", (const char *)&FindData.dwReserved1 + v8, 4u) )
        {
          if ( !Folder::m_bInit )
            Folder::Init();
          v9 = Folder::Merge(&Folder::m_acSystem, FindData.cFileName);
          AddFontResourceA(v9);
        }
      }
    }
    while ( FindNextFileA(v7, &FindData) );
    FindClose(v7);
    Font::ms_bInit = 1;
    Font::EncryptFontFile();
    SpScreenText::SetCamera(pkScreenCamera);
    if ( Font::ms_bUsePrivateFont == 1 )
    {
      Encrypt::Stream::Stream((Encrypt::Stream *)&kEnc.m_kOriginal.vfptr);
      kEnc.m_kOriginal.vfptr = (Encrypt::StreamVtbl *)&Encrypt::FileStream::`vftable';
      v10 = 0;
      v23 = 0;
      v11 = (Encrypt::EncryptMethodXor *)operator new(0x24u);
      LOBYTE(v23) = 1;
      if ( v11 )
      {
        Encrypt::EncryptMethodXor::EncryptMethodXor(v11, Font::ms_pcEncryptSeed);
        v10 = v12;
      }
      LOBYTE(v23) = 0;
      if ( !Folder::m_bInit )
        Folder::Init();
      v13 = Folder::Merge(&Folder::m_acSystem, ShineFontName::ENCRYPTED);
      if ( Encrypt::EncryptStream::LoadEncrypted(&kEnc, v13, v10) )
      {
        if ( !Folder::m_bInit )
          Folder::Init();
        v14 = Folder::Merge(&Folder::m_acSystem, ShineFontName::DECRYPTED);
        Encrypt::EncryptStream::SaveOriginal(&kEnc, v14);
      }
      if ( !Folder::m_bInit )
        Folder::Init();
      v15 = Folder::Merge(&Folder::m_acSystem, ShineFontName::ENCRYPTED_BOLD);
      if ( Encrypt::EncryptStream::LoadEncrypted(&kEnc, v15, v10) )
      {
        if ( !Folder::m_bInit )
          Folder::Init();
        v16 = Folder::Merge(&Folder::m_acSystem, ShineFontName::DECRYPTED_BOLD);
        Encrypt::EncryptStream::SaveOriginal(&kEnc, v16);
      }
      operator delete(v10);
      v23 = -1;
      Encrypt::Stream::~Stream((Encrypt::Stream *)&kEnc.m_kOriginal.vfptr);
      if ( !Folder::m_bInit )
        Folder::Init();
      v17 = Folder::Merge(&Folder::m_acSystem, ShineFontName::DECRYPTED);
      RemoveFontResourceA(v17);
      if ( !Folder::m_bInit )
        Folder::Init();
      v18 = Folder::Merge(&Folder::m_acSystem, ShineFontName::DECRYPTED);
      AddFontResourceA(v18);
      if ( !Folder::m_bInit )
        Folder::Init();
      v19 = Folder::Merge(&Folder::m_acSystem, ShineFontName::DECRYPTED_BOLD);
      RemoveFontResourceA(v19);
      if ( !Folder::m_bInit )
        Folder::Init();
      v20 = Folder::Merge(&Folder::m_acSystem, ShineFontName::DECRYPTED_BOLD);
      AddFontResourceA(v20);
    }
    result = 1;
  }
  else
  {
LABEL_51:
    result = 0;
  }
  return result;
}
// 9725FC: using guessed type int (__thiscall *Encrypt::FileStream::`vftable')(void *p, char);
// A6977C: using guessed type bool Font::ms_bUsePrivateFont;
// A8975C: using guessed type bool Folder::m_bInit;
// A89961: using guessed type bool Font::ms_bUserFontLoadSuccess;
// A89962: using guessed type bool Font::ms_bInit;

//----- (0041C570) --------------------------------------------------------
Encrypt::FileStream *__thiscall Encrypt::FileStream::`vector deleting destructor'(Encrypt::FileStream *this, unsigned int a2)
{
  Encrypt::FileStream *v2; // esi@1

  v2 = this;
  Encrypt::Stream::~Stream((Encrypt::Stream *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0041C5A0) --------------------------------------------------------
void __stdcall `vector constructor iterator'(void *__t, unsigned int __s, int __n, void *(__thiscall *__f)(void *))
{
  int v4; // edi@1
  char *v5; // esi@2

  v4 = __n - 1;
  if ( __n - 1 >= 0 )
  {
    v5 = (char *)__t;
    do
    {
      __f(v5);
      v5 += __s;
      --v4;
    }
    while ( v4 >= 0 );
  }
}

//----- (0041C5D0) --------------------------------------------------------
void __cdecl PgUtil::ChangeCharInText(char *pcText, char cOld, char cNew, unsigned int uiLen)
{
  char *v4; // esi@1
  unsigned int v5; // edi@3
  signed int v6; // eax@8

  v4 = pcText;
  if ( pcText && *pcText )
  {
    v5 = uiLen;
    do
    {
      if ( !v5 )
        break;
      if ( *v4 == cOld )
        *v4 = cNew;
      if ( IsDBCSLeadByte(*v4) )
      {
        v4 += 2;
        v6 = 2;
      }
      else
      {
        ++v4;
        v6 = 1;
      }
      v5 -= v6;
    }
    while ( *v4 );
  }
}

//----- (0041C620) --------------------------------------------------------
char *__cdecl Folder::System()
{
  if ( !Folder::m_bInit )
    Folder::Init();
  return &Folder::m_acSystem;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0041C650) --------------------------------------------------------
FontSet *__cdecl FontSetTab::GetByFSIndex(const char *pcIndex)
{
  int v1; // eax@1
  unsigned int v2; // edi@1
  char *v3; // eax@5
  FontSet *v4; // esi@5
  FontSet *result; // eax@8
  unsigned int v6; // [sp+Ch] [bp-4h]@2

  v1 = *(_DWORD *)(ITableBase<FontSet,FontSetTab>::ms_pkTable + 56);
  v2 = 0;
  if ( v1 )
    v6 = *(_DWORD *)(v1 + 40);
  else
    v6 = 0;
  if ( v6 <= 0 )
  {
LABEL_8:
    result = 0;
  }
  else
  {
    while ( 1 )
    {
      v3 = CDataReader::GetRecord((CDataReader *)(ITableBase<FontSet,FontSetTab>::ms_pkTable + 4), v2);
      v4 = (FontSet *)v3;
      if ( v3 )
      {
        if ( !strncmp(pcIndex, v3, strlen(v3)) )
          break;
      }
      if ( ++v2 >= v6 )
        goto LABEL_8;
    }
    result = v4;
  }
  return result;
}
// A89C08: using guessed type int ITableBase<FontSet,FontSetTab>::ms_pkTable;

//----- (0041C6D0) --------------------------------------------------------
void __thiscall FontSetTab::FontSetTab(FontSetTab *this)
{
  FontSetTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<FontSet,FontSetTab>Vtbl *)&ITableBase<FontSet,FontSetTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<FontSet,FontSetTab>::ITableBase<FontSet,FontSetTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<FontSet,FontSetTab>::ITableBase<FontSet,FontSetTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_FontSet_FontSetTab_::ITableBase_FontSet_FontSetTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<FontSet,FontSetTab>Vtbl *)&FontSetTab::`vftable';
}
// 972604: using guessed type int (__cdecl *ITableBase<FontSet,FontSetTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 972614: using guessed type int (__cdecl *FontSetTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A89C08: using guessed type int ITableBase<FontSet,FontSetTab>::ms_pkTable;
// A89C0C: using guessed type int `ITableBase<FontSet,FontSetTab>::ITableBase<FontSet,FontSetTab>'::`2'::`local static guard';

//----- (0041C710) --------------------------------------------------------
FontSetTab *__thiscall FontSetTab::`vector deleting destructor'(FontSetTab *this, unsigned int a2)
{
  FontSetTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<FontSet,FontSetTab>Vtbl *)&ITableBase<FontSet,FontSetTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 972604: using guessed type int (__cdecl *ITableBase<FontSet,FontSetTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (0041C790) --------------------------------------------------------
bool __cdecl ITableBase<FontSet,FontSetTab>::Load(char *acFn)
{
  int v1; // eax@1
  FontSetTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<FontSet,FontSetTab>::ms_pkTable;
  if ( !ITableBase<FontSet,FontSetTab>::ms_pkTable )
  {
    v2 = (FontSetTab *)operator new(0xC4u);
    if ( v2 )
      FontSetTab::FontSetTab(v2);
    else
      v1 = 0;
    ITableBase<FontSet,FontSetTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<FontSet,FontSetTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<FontSet,FontSetTab>::ms_pkTable + 56)) != 0
    && *v3 == 156 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<FontSet,FontSetTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<FontSet,FontSetTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A89C08: using guessed type int ITableBase<FontSet,FontSetTab>::ms_pkTable;

//----- (0041C880) --------------------------------------------------------
void __thiscall ForumWin::ReGenPos(ForumWin *this)
{
  ForumWin *v1; // esi@1
  int v2; // eax@1
  unsigned int v3; // ecx@1

  v1 = this;
  v1->m_uiWebXPos = v1->m_uiPlaneWebXPos + ((int (*)(void))this->vfptr[41].__vecDelDtor)();
  v2 = ((int (__thiscall *)(_DWORD))v1->vfptr[42].__vecDelDtor)(v1);
  v3 = v1->m_uiPlaneWebHeight;
  v1->m_uiWebYPos = v1->m_uiPlaneWebYPos + v2;
  v1->m_uiWebWidth = v1->m_uiPlaneWebWidth;
  v1->m_uiWebHeight = v3;
}

//----- (0041C8D0) --------------------------------------------------------
void __thiscall ForumWin::UpdateWebPos(ForumWin *this)
{
  ForumWin *v1; // esi@1
  tagRECT rect; // [sp+4h] [bp-14h]@3

  v1 = this;
  if ( IsWindow(this->m_hWebWindow) )
  {
    if ( v1->m_bOpen )
    {
      ForumWin::ReGenPos(v1);
      GetWindowRect(g_hMainWnd, &rect);
      MoveWindow(
        v1->m_hWebWindow,
        rect.left + v1->m_uiWebXPos,
        rect.top + v1->m_uiWebYPos,
        v1->m_uiWebWidth,
        v1->m_uiWebHeight,
        1);
    }
  }
}

//----- (0041C960) --------------------------------------------------------
void __thiscall ForumWin::OnWinClose(ForumWin *this)
{
  ForumWin *v1; // esi@1
  HWND__ *v2; // ST0C_4@1
  GameFrameWork *v3; // ecx@3

  v1 = this;
  v2 = this->m_hWebWindow;
  this->m_bOpen = 0;
  if ( !DestroyWindow(v2) )
    MessageBoxA(0, "Error", "Unable to close Forum Win!", 0);
  DestroyWindow(v1->m_hPopWebWindow);
  v3 = (GameFrameWork *)v1->m_pkFrameWork;
  v1->m_hWebWindow = 0;
  GameFrameWork::CloseForumWin(v3);
}

//----- (0041C9B0) --------------------------------------------------------
void __thiscall ForumWin::UpdateMeWin(ForumWin *this, float fCurTime)
{
  ForumWin::UpdateWebPos(this);
}

//----- (0041C9C0) --------------------------------------------------------
char __thiscall ForumWin::Create(ForumWin *this, PgFrameWork *pkFrameWork)
{
  ForumWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiAVObject *v5; // eax@4
  NiTexturingProperty *v6; // eax@4
  NiTexturingProperty *v7; // edi@4
  NiTexturingProperty::Map *v8; // eax@6
  PgSprData *v9; // eax@9
  NiNode *v10; // esi@12
  char result; // al@16
  int v12; // ebx@17
  NiNode *v13; // esi@20
  PgFont *v14; // eax@24
  PgWinText *v15; // edi@24
  NiRefObjectVtbl *v16; // ST3C_4@24
  NiUnsharedGeometryGroup *v17; // eax@24
  NiSourceTexture *v18; // edi@26
  PgSprData *v19; // eax@26
  PgWinSpr *v20; // eax@26
  PgSprData *v21; // eax@26
  PgWinSpr *v22; // eax@26
  PgSprData *v23; // edi@26
  unsigned int uiWidth; // [sp+38h] [bp-28h]@17
  unsigned int uiHeight; // [sp+3Ch] [bp-24h]@17
  NiPointer<NiTexturingProperty> spTexProp; // [sp+40h] [bp-20h]@4
  NiSourceTexture *pkTexture; // [sp+44h] [bp-1Ch]@7
  int uiLeft; // [sp+48h] [bp-18h]@9
  int uiTop; // [sp+4Ch] [bp-14h]@9
  NiPointer<NiNode> spNode; // [sp+50h] [bp-10h]@1
  int v31; // [sp+5Ch] [bp-4h]@1
  int iOffY; // [sp+68h] [bp+8h]@17

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v31 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\ForumWin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Panel01");
  v6 = (NiTexturingProperty *)NiAVObject::GetProperty(v5, 8);
  v7 = v6;
  spTexProp.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v8 = *v7->m_kMaps.m_pBase;
  LOBYTE(v31) = 1;
  if ( v8 )
    pkTexture = (NiSourceTexture *)v8->m_spTexture.m_pObject;
  else
    pkTexture = 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, pkTexture);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "ShopWin", 0) )
  {
    LOBYTE(v31) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v10 = spNode.m_pObject;
    v31 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
    return 0;
  }
  v12 = uiLeft;
  iOffY = uiTop;
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v14 = Font::Get(0);
    v15 = PgWinText::CreateWin(uiLeft - v12 + 55, uiTop - iOffY, uiWidth, uiHeight, v14, (PgWin *)&v2->vfptr, 0, 0);
    v15->vfptr[122].__vecDelDtor((NiRefObject *)v15, 1u);
    v15->vfptr[117].__vecDelDtor((NiRefObject *)v15, (unsigned int)&Color::m_kDxWinTitleColor);
    v16 = v15->vfptr;
    v17 = TextData3::Get(0x35468BADu);
    v16[118].__vecDelDtor((NiRefObject *)v15, (unsigned int)v17);
    v15->vfptr[60].__vecDelDtor((NiRefObject *)v15, 0);
    if ( PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Panel01",
           &v2->m_uiPlaneWebXPos,
           &v2->m_uiPlaneWebYPos,
           &v2->m_uiPlaneWebWidth,
           &v2->m_uiPlaneWebHeight) )
    {
      v18 = pkTexture;
      v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
      v20 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - iOffY, v19, (PgWin *)&v2->vfptr, 0, 0);
      v20->vfptr[60].__vecDelDtor((NiRefObject *)v20, 1u);
      v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, v18);
      v22 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - iOffY, v21, (PgWin *)&v2->vfptr, 0, 0);
      v22->vfptr[60].__vecDelDtor((NiRefObject *)v22, 1u);
      v23 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, v18);
      PgSprData::Add(v23, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
      PgSprData::Add(v23, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
      PgWinBut::CreateWin(uiLeft - v12 + 155, uiTop - iOffY, v23, (PgWin *)&v2->vfptr, 0, 0, 0);
      ((void (__thiscall *)(ForumWin *))v2->vfptr[59].__vecDelDtor)(v2);
      v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
      ForumWin::ReGenPos(v2);
      LOBYTE(v31) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
      v31 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 1;
    }
    else
    {
      LOBYTE(v31) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
      v31 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 0;
    }
  }
  else
  {
    LOBYTE(v31) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v13 = spNode.m_pObject;
    v31 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v13 )
      return 0;
    ((void (__thiscall *)(NiNode *))v13->vfptr->__vecDelDtor)(v13);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0041CDE0) --------------------------------------------------------
void __thiscall ForumWin::ForumWin(ForumWin *this)
{
  ForumWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ForumWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ForumWin::`vftable'{for `IDirectMessenger'};
  v1->m_ForumURL._Mysize = 0;
  v1->m_ForumURL._Myres = 15;
  v1->m_ForumURL._Bx._Buf[0] = 0;
  *(_WORD *)&v1->m_bOpen = 0;
}
// 9726F8: using guessed type void (__thiscall *ForumWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 972714: using guessed type int (__thiscall *ForumWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0041CE20) --------------------------------------------------------
void __thiscall ForumWin::~ForumWin(ForumWin *this)
{
  ForumWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ForumWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ForumWin::`vftable'{for `IDirectMessenger'};
  if ( this->m_ForumURL._Myres >= 0x10 )
    operator delete(this->m_ForumURL._Bx._Ptr);
  v1->m_ForumURL._Myres = 15;
  v1->m_ForumURL._Mysize = 0;
  v1->m_ForumURL._Bx._Buf[0] = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9726F8: using guessed type void (__thiscall *ForumWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 972714: using guessed type int (__thiscall *ForumWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0041CE70) --------------------------------------------------------
ForumWin *__cdecl ForumWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  ForumWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1A4u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&ForumWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&ForumWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kWorld.m_Rotate.m_pEntry[1][2]) = 15;
    LODWORD(v2[1].m_kWorld.m_Rotate.m_pEntry[1][1]) = 0;
    LOBYTE(v2[1].m_kWorld.m_Rotate.m_pEntry[0][0]) = 0;
    LOWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[2][1]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (ForumWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9726F8: using guessed type void (__thiscall *ForumWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 972714: using guessed type int (__thiscall *ForumWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0041CFD0) --------------------------------------------------------
void __thiscall ForumWin::OnShowWin(ForumWin *this)
{
  unsigned int v1; // ebx@1
  ForumWin *v2; // esi@1
  int v3; // eax@1
  int v4; // ecx@1
  const char *v5; // edi@1
  HWND v6; // edi@3
  void *(__thiscall *v7)(NiRefObject *, unsigned int); // edx@7
  unsigned int v8; // edx@7
  int nWidth; // [sp+14h] [bp-30h]@1
  int nHeight; // [sp+18h] [bp-2Ch]@1
  NiRect<int> kRect; // [sp+1Ch] [bp-28h]@7
  unsigned int uiPosY; // [sp+2Ch] [bp-18h]@7
  tagRECT WindowRect; // [sp+30h] [bp-14h]@1

  v1 = 0;
  v2 = this;
  v3 = this->m_uiWebWidth;
  v4 = this->m_uiWebHeight;
  nWidth = v3;
  WindowRect.right = v3;
  nHeight = v4;
  WindowRect.left = 0;
  WindowRect.top = 0;
  WindowRect.bottom = v4;
  AdjustWindowRectEx(&WindowRect, 0x40000000u, 0, 0);
  v5 = v2->m_ForumURL._Bx._Buf;
  v2->m_hWebWindow = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &v2->m_ForumURL,
    "http://fiesta.gamigo.com/us/forum/",
    0x22u);
  if ( v2->m_ForumURL._Myres >= 0x10 )
    v5 = *(const char **)v5;
  v6 = CreateWindowExA(0, "WebCtrl32", v5, 0x90000000, 0, 0, nWidth, nHeight, g_hMainWnd, 0, g_hMainInstance, 0);
  ShowWindow(v6, 5);
  v2->m_hWebWindow = v6;
  if ( IsWindow(v6) )
  {
    ShowWindow(v2->m_hWebWindow, 5);
  }
  else if ( NiMessageBox::ms_pfnMessageBox )
  {
    NiMessageBox::ms_pfnMessageBox("CreateWindow Fail", byte_972632, 0);
  }
  v7 = v2->vfptr[52].__vecDelDtor;
  v2->m_bOpen = 1;
  kRect.m_left = 0;
  kRect.m_right = 0;
  kRect.m_top = 0;
  kRect.m_bottom = 0;
  v7((NiRefObject *)&v2->vfptr, (unsigned int)&kRect);
  v8 = kRect.m_bottom - kRect.m_top;
  uiPosY = 0;
  if ( PgWin::ms_uiScreenWidth >= kRect.m_right - kRect.m_left && PgWin::ms_uiScreenHeight >= v8 )
  {
    v1 = (PgWin::ms_uiScreenWidth - (kRect.m_right - kRect.m_left)) >> 1;
    uiPosY = (PgWin::ms_uiScreenHeight - v8) >> 1;
  }
  v2->vfptr[43].__vecDelDtor((NiRefObject *)v2, v1);
  v2->vfptr[44].__vecDelDtor((NiRefObject *)v2, uiPosY);
  SetFocus(g_hMainWnd);
}
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);

//----- (0041D140) --------------------------------------------------------
HWND__ *__cdecl CreateWebWindow(HWND__ *hParent, HINSTANCE__ *hInstance, const char *acWebAddr, tagRECT *rkRect, PgWin *pkWin)
{
  HWND v5; // esi@1
  GameFrameWork *v6; // eax@3

  v5 = CreateWindowExA(
         0,
         "WebCtrl32",
         acWebAddr,
         0x90000000,
         rkRect->left,
         rkRect->top,
         rkRect->right,
         rkRect->bottom,
         hParent,
         0,
         hInstance,
         0);
  if ( GameFrameWork::ms_bSpawnApps == 1 )
  {
    if ( pkWin )
    {
      v6 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v6 )
        GameFrameWork::AddWebList(v6, (std::pair<HWND__ *,PgWin *>)__PAIR__((unsigned int)pkWin, (unsigned int)v5));
    }
  }
  ShowWindow(v5, 5);
  return v5;
}
// A8CB04: using guessed type bool GameFrameWork::ms_bSpawnApps;

//----- (0041D1C0) --------------------------------------------------------
ForumWin *__thiscall ForumWin::`scalar deleting destructor'(ForumWin *this, unsigned int a2)
{
  ForumWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ForumWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ForumWin::`vftable'{for `IDirectMessenger'};
  if ( this->m_ForumURL._Myres >= 0x10 )
    operator delete(this->m_ForumURL._Bx._Ptr);
  v2->m_ForumURL._Myres = 15;
  v2->m_ForumURL._Mysize = 0;
  v2->m_ForumURL._Bx._Buf[0] = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9726F8: using guessed type void (__thiscall *ForumWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 972714: using guessed type int (__thiscall *ForumWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0041D230) --------------------------------------------------------
void __thiscall GuildEmblemIcon::GuildEmblemIcon(GuildEmblemIcon *this)
{
  GuildEmblemIcon *v1; // esi@1

  v1 = this;
  IconWin::IconWin((IconWin *)&this->vfptr);
  v1->m_pkFrameWork = 0;
  v1->m_bInputEmblem = 0;
  v1->vfptr = (NiRefObjectVtbl *)&GuildEmblemIcon::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildEmblemIcon::`vftable'{for `IDirectMessenger'};
}
// 972958: using guessed type void (__thiscall *GuildEmblemIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 972974: using guessed type int (__thiscall *GuildEmblemIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (0041D260) --------------------------------------------------------
void __thiscall GuildEmblemIcon::~GuildEmblemIcon(GuildEmblemIcon *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GuildEmblemIcon::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildEmblemIcon::`vftable'{for `IDirectMessenger'};
  IconWin::~IconWin((IconWin *)&this->vfptr);
}
// 972958: using guessed type void (__thiscall *GuildEmblemIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 972974: using guessed type int (__thiscall *GuildEmblemIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (0041D280) --------------------------------------------------------
unsigned int __thiscall GuildEmblemIcon::GetEmblemIconIndex(GuildEmblemIcon *this)
{
  return this->m_nIconIndex;
}

//----- (0041D290) --------------------------------------------------------
void __thiscall GuildEmblemIcon::SetSelectEmblem(GuildEmblemIcon *this, bool bInput)
{
  this->m_bInputEmblem = bInput;
}

//----- (0041D2A0) --------------------------------------------------------
bool __stdcall GuildEmblemIcon::IsSelectEmblemIcon(const char *nFileNo, const char *nIconNo)
{
  return *nFileNo < 0xFFu && *nIconNo < 0xFFu;
}

//----- (0041D2C0) --------------------------------------------------------
char __thiscall GuildEmblemIcon::SetEmblemIcon(GuildEmblemIcon *this, const char *nFileNo, const char *nIconNo, int bShow)
{
  GuildEmblemIcon *v4; // esi@1
  char result; // al@3
  NiSourceTexture *v6; // eax@4
  char pFilePath[256]; // [sp+24h] [bp-104h]@4

  v4 = this;
  if ( *nFileNo < 0xFFu && *nIconNo < 0xFFu )
  {
    sprintf(pFilePath, "GuildEmblem%03d", *nFileNo);
    v6 = IconMgr::GetTexturePng(pFilePath);
    if ( v6 )
    {
      ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v4->vfptr[146].__vecDelDtor)(
        v4,
        v6,
        *nIconNo,
        32,
        32);
      v4->vfptr[64].__vecDelDtor((NiRefObject *)v4, bShow);
      v4->vfptr[60].__vecDelDtor((NiRefObject *)v4, bShow);
      v4->vfptr[81].__vecDelDtor((NiRefObject *)v4, COERCE_UNSIGNED_INT(0.0));
      result = 1;
    }
    else
    {
      v4->vfptr[64].__vecDelDtor((NiRefObject *)v4, 0);
      v4->vfptr[60].__vecDelDtor((NiRefObject *)v4, 0);
      result = 0;
    }
  }
  else
  {
    ((void (__stdcall *)(_DWORD))this->vfptr[64].__vecDelDtor)(0);
    v4->vfptr[60].__vecDelDtor((NiRefObject *)v4, 0);
    result = 0;
  }
  return result;
}

//----- (0041D3D0) --------------------------------------------------------
void __thiscall GuildEmblemIcon::UpdateMeWin(GuildEmblemIcon *this, float fCurTime)
{
  if ( this->m_bInputEmblem )
    IconWin::SelectIcon((IconWin *)&this->vfptr);
}

//----- (0041D3F0) --------------------------------------------------------
void __thiscall GuildEmblemIcon::DoAction(GuildEmblemIcon *this)
{
  GuildEmblemIcon *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_nIconIndex);
}

//----- (0041D420) --------------------------------------------------------
char __thiscall GuildEmblemIcon::Create(GuildEmblemIcon *this, int iXPos, int iYPos, unsigned int nIconIndex, PgWin *pkParent, PgFrameWork *pkFrameWork, unsigned int uiWidth, unsigned int uiHeight)
{
  GuildEmblemIcon *v8; // esi@1
  char result; // al@1
  NiProperty *v10; // edi@2
  NiMaterialProperty *v11; // eax@3
  NiProperty *v12; // eax@4

  v8 = this;
  this->m_pkFrameWork = pkFrameWork;
  result = PgWinLRBut::Create((PgWinLRBut *)&this->vfptr, iXPos, iYPos, uiWidth, uiHeight, pkParent, 0, 0);
  if ( result )
  {
    ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD))v8->vfptr[147].__vecDelDtor)(
      v8,
      uiWidth,
      uiHeight,
      "GuildEmblemPick");
    v8->m_nIconIndex = nIconIndex;
    v10 = NiAVObject::GetProperty((NiAVObject *)&v8->vfptr, 3);
    if ( !v10 )
    {
      v11 = (NiMaterialProperty *)operator new(0x60u);
      if ( v11 )
        NiMaterialProperty::NiMaterialProperty(v11);
      else
        v12 = 0;
      v10 = v12;
      NiAVObject::AttachProperty((NiAVObject *)&v8->vfptr, v12);
    }
    *(float *)&v10[2].m_spControllers.m_pObject = 1.0;
    *(float *)&v10[2].m_ppkExtra = 1.0;
    result = 1;
    ++v10[3].m_uiRefCount;
    *(float *)&v10[2].m_uiExtraDataSize = 1.0;
  }
  return result;
}

//----- (0041D520) --------------------------------------------------------
void __thiscall GuildEmblemIcon::SetAlpha(GuildEmblemIcon *this, const float *fAlpha)
{
  GuildEmblemIcon *v2; // edi@1
  NiProperty *v3; // esi@1
  NiMaterialProperty *v4; // eax@2
  NiProperty *v5; // eax@3
  double v6; // st7@6

  v2 = this;
  v3 = NiAVObject::GetProperty((NiAVObject *)&this->vfptr, 3);
  if ( !v3 )
  {
    v4 = (NiMaterialProperty *)operator new(0x60u);
    if ( v4 )
      NiMaterialProperty::NiMaterialProperty(v4);
    else
      v5 = 0;
    v3 = v5;
    NiAVObject::AttachProperty((NiAVObject *)&v2->vfptr, v5);
  }
  v6 = *fAlpha;
  ++v3[3].m_uiRefCount;
  *(float *)&v3[3].vfptr = v6;
}

//----- (0041D5B0) --------------------------------------------------------
GuildEmblemIcon *__cdecl GuildEmblemIcon::CreateWin(int iXPos, int iYPos, unsigned int nIconIndex, PgWin *pkParent, PgFrameWork *pkFrameWork, unsigned int uiWidth, unsigned int uiHeight)
{
  PgWin *v7; // eax@1
  PgWin *v8; // esi@1
  PgWin *v9; // edi@8
  GuildEmblemIcon *v10; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v12; // [sp+20h] [bp-4h]@1

  v7 = (PgWin *)operator new(0x188u);
  v8 = v7;
  result.m_pObject = v7;
  v12 = 0;
  if ( v7 )
  {
    IconWin::IconWin((IconWin *)v7);
    v8->vfptr = (NiRefObjectVtbl *)&GuildEmblemIcon::`vftable'{for `NiNode'};
    v8->vfptr = (IDirectMessengerVtbl *)&GuildEmblemIcon::`vftable'{for `IDirectMessenger'};
    LODWORD(v8[1].m_kLocal.m_Translate.y) = 0;
    LOBYTE(v8[1].m_kLocal.m_fScale) = 0;
  }
  else
  {
    v8 = 0;
  }
  if ( v8 )
    InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  v12 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v8);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, PgWin *, PgFrameWork *, unsigned int, unsigned int))v8->vfptr[152].__vecDelDtor)(
                          v8,
                          iXPos,
                          iYPos,
                          nIconIndex,
                          pkParent,
                          pkFrameWork,
                          uiWidth,
                          uiHeight) )
  {
    ((void (__thiscall *)(PgWin *))v8->vfptr[89].__vecDelDtor)(v8);
    v12 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v10 = (GuildEmblemIcon *)v8;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v8);
    if ( result.m_pObject )
    {
      v9 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v9 )
          v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      }
    }
    v12 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v10 = 0;
  }
  return v10;
}
// 972958: using guessed type void (__thiscall *GuildEmblemIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 972974: using guessed type int (__thiscall *GuildEmblemIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (0041D710) --------------------------------------------------------
NiRTTI *PgWinBut::GetRTTI()
{
  return &PgWinBut::m_RTTI;
}

//----- (0041D720) --------------------------------------------------------
void __thiscall PgWinBut::SetCommandMsg(PgWinBut *this, unsigned int uiCmdMsg)
{
  this->m_uiCmdMsg = uiCmdMsg;
}

//----- (0041D730) --------------------------------------------------------
void __thiscall PgWinBut::SetCommandMsgParam(PgWinBut *this, unsigned int uiCmdMsgParam)
{
  this->m_uiCmdMsgParam = uiCmdMsgParam;
}

//----- (0041D740) --------------------------------------------------------
void __thiscall PgWinBut::Enable(PgWinBut *this, bool b)
{
  PgWinBut *v2; // esi@1
  NiRefObjectVtbl *v3; // edx@1

  v2 = this;
  v3 = this->vfptr;
  this->m_bEnable = b;
  if ( !(unsigned __int8)((int (*)(void))v3[61].__vecDelDtor)() )
    v2->vfptr[138].__vecDelDtor((NiRefObject *)v2, 3u);
}

//----- (0041D770) --------------------------------------------------------
void __thiscall PgWinBut::DisableAlwaysButShow(PgWinBut *this, bool b)
{
  this->m_bClickCheck = b;
}

//----- (0041D780) --------------------------------------------------------
unsigned int __thiscall PgWinBut::GetCommandMsg(PgWinBut *this)
{
  return this->m_uiCmdMsg;
}

//----- (0041D790) --------------------------------------------------------
void __thiscall PgWinLRBut::SetRCommandMsg(PgWinLRBut *this, unsigned int uiCmdMsg)
{
  this->m_uiRCmdMsg = uiCmdMsg;
}

//----- (0041D7A0) --------------------------------------------------------
void __thiscall PgWinLRBut::SetRCommandMsgParam(PgWinLRBut *this, unsigned int uiCmdMsgParam)
{
  this->m_uiRCmdMsgParam = uiCmdMsgParam;
}

//----- (0041D7B0) --------------------------------------------------------
GuildEmblemIcon *__thiscall GuildEmblemIcon::`scalar deleting destructor'(GuildEmblemIcon *this, unsigned int a2)
{
  GuildEmblemIcon *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildEmblemIcon::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildEmblemIcon::`vftable'{for `IDirectMessenger'};
  IconWin::~IconWin((IconWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 972958: using guessed type void (__thiscall *GuildEmblemIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 972974: using guessed type int (__thiscall *GuildEmblemIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (0041D7F0) --------------------------------------------------------
void __thiscall NiTexturingProperty::SetBaseTexture(NiTexturingProperty *this, NiTexture *pkTexture)
{
  NiTexturingProperty *v2; // esi@1
  NiTexturingProperty::Map *v3; // edi@1
  NiTexturingProperty::Map *v4; // eax@2
  NiTexturingProperty::Map *v5; // eax@3
  NiTexture *v6; // esi@6
  NiTexturingProperty::Map *pkBaseMap; // [sp+10h] [bp-10h]@2
  int v8; // [sp+1Ch] [bp-4h]@2

  v2 = this;
  v3 = *this->m_kMaps.m_pBase;
  if ( !v3 )
  {
    v4 = (NiTexturingProperty::Map *)operator new(0x18u);
    pkBaseMap = v4;
    v8 = 0;
    if ( v4 )
      NiTexturingProperty::Map::Map(v4);
    else
      v5 = 0;
    v3 = v5;
    v8 = -1;
    pkBaseMap = v5;
    NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)&v2->m_kMaps, 0, (NiVBChip *const *)&pkBaseMap);
  }
  v6 = v3->m_spTexture.m_pObject;
  if ( v6 != pkTexture )
  {
    if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v3->m_spTexture.m_pObject = pkTexture;
    if ( pkTexture )
      InterlockedIncrement((volatile LONG *)&pkTexture->m_uiRefCount);
  }
}

//----- (0041D8B0) --------------------------------------------------------
void __thiscall PgWinBut::SetButShow(PgWinBut *this, PgWinBut::ButShow eShow)
{
  PgWinBut::ButShow v2; // edi@1
  PgWinBut *v3; // esi@1
  void *(__thiscall *v4)(NiRefObject *, unsigned int); // edx@2
  void *(__thiscall *v5)(NiRefObject *, unsigned int); // edx@7
  PgWinBut *v6; // ecx@7

  v2 = eShow;
  v3 = this;
  if ( this->m_eButShow != eShow )
  {
    ((void (__stdcall *)(_DWORD))this->vfptr[139].__vecDelDtor)(eShow);
    v4 = v3->vfptr[61].__vecDelDtor;
    v3->m_eButShow = eShow;
    if ( !(unsigned __int8)((int (__thiscall *)(_DWORD))v4)(v3) )
    {
      v2 = 3;
      if ( v3->m_uiButNum > 3 )
        v3->m_eButShow = 3;
    }
    switch ( v2 )
    {
      case 0:
        v3->vfptr[123].__vecDelDtor((NiRefObject *)v3, 0);
        break;
      case 1:
        v5 = v3->vfptr[123].__vecDelDtor;
        v6 = v3;
        if ( v3->m_uiButNum <= 1 )
          goto LABEL_8;
        v5((NiRefObject *)&v3->vfptr, 1u);
        break;
      case 2:
        v5 = v3->vfptr[123].__vecDelDtor;
        v6 = v3;
        if ( v3->m_uiButNum <= 2 )
LABEL_8:
          v5((NiRefObject *)&v6->vfptr, 0);
        else
          v5((NiRefObject *)&v3->vfptr, 2u);
        break;
      case 3:
        if ( v3->m_uiButNum > 3 )
          v3->vfptr[123].__vecDelDtor((NiRefObject *)v3, 3u);
        else
          v3->vfptr[123].__vecDelDtor((NiRefObject *)v3, 0);
        break;
      default:
        return;
    }
  }
}

//----- (0041D9B0) --------------------------------------------------------
void __thiscall PgWinLRBut::DoRAction(PgWinLRBut *this)
{
  PgWinLRBut *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiRCmdMsg, v1->m_uiRCmdMsgParam);
}

//----- (0041D9E0) --------------------------------------------------------
void __thiscall IconWin::SetTexture(IconWin *this, NiSourceTexture *pkTexture)
{
  NiTexturingProperty::SetBaseTexture(this->m_spTexProp.m_pObject, (NiTexture *)&pkTexture->vfptr);
}

//----- (0041D9F0) --------------------------------------------------------
void __thiscall GuildEmblemWin::GuildEmblemWin(GuildEmblemWin *this)
{
  GuildEmblemWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GuildEmblemWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildEmblemWin::`vftable'{for `IDirectMessenger'};
  v1->m_CheckEmblem.nSelect = 255;
  v1->m_CheckEmblem.nIndex = 255;
  v1->m_CheckEmblem.nColor = 0;
  v1->m_CheckEmblem.nFilePage = 0;
  v1->m_bMaxPage = 0;
  v1->m_nMaxSlotPageCnt = 0;
  v1->m_nCurSlotPageCnt = 0;
  v1->m_pkEmblemSlot = 0;
  memset((char *)v1->m_pkSlotIcon, 0, 0x100u);
  v1->m_pkColorIcon[0] = 0;
  v1->m_pkColorIcon[1] = 0;
  v1->m_pkColorIcon[2] = 0;
  v1->m_pkColorIcon[3] = 0;
  v1->m_pkColorIcon[4] = 0;
  v1->m_pkColorIcon[5] = 0;
  v1->m_pkColorIcon[6] = 0;
  v1->m_pkColorIcon[7] = 0;
}
// 972DAC: using guessed type void (__thiscall *GuildEmblemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 972DCC: using guessed type int (__thiscall *GuildEmblemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0041DA90) --------------------------------------------------------
void __thiscall GuildEmblemWin::~GuildEmblemWin(GuildEmblemWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GuildEmblemWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildEmblemWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 972DAC: using guessed type void (__thiscall *GuildEmblemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 972DCC: using guessed type int (__thiscall *GuildEmblemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0041DAB0) --------------------------------------------------------
void __thiscall GuildEmblemWin::OnClose(GuildEmblemWin *this)
{
  GuildEmblemWin *v1; // esi@1
  int v2; // eax@2
  int v3; // eax@5
  bool v4; // zf@5
  GuildEmblemIcon **v5; // eax@5

  v1 = this;
  if ( this->m_CheckEmblem.nIndex != 255 )
  {
    v2 = this->m_CheckEmblem.nSelect;
    if ( v2 != 255 )
    {
      if ( this->m_pkSlotIcon[v2] )
        GuildEmblemIcon::SetSelectEmblem(this->m_pkSlotIcon[v2], 0);
      v3 = v1->m_CheckEmblem.nColor;
      v4 = v1->m_pkColorIcon[v3] == 0;
      v5 = &v1->m_pkColorIcon[v3];
      if ( !v4 )
        GuildEmblemIcon::SetSelectEmblem(*v5, 0);
    }
  }
  GuildEmblemIcon::SetSelectEmblem(v1->m_pkColorIcon[v1->m_CheckEmblem.nColor], 0);
  v1->m_CheckEmblem.nSelect = 255;
  v1->m_CheckEmblem.nIndex = 255;
  v1->m_CheckEmblem.nColor = 0;
  v1->m_CheckEmblem.nFilePage = 0;
  v1->m_nCurSlotPageCnt = 0;
}

//----- (0041DB50) --------------------------------------------------------
void GuildEmblemWin::OnCancelWin()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::GuildEmblemShowWin(v1, 0);
}

//----- (0041DB70) --------------------------------------------------------
void GuildEmblemWin::OnHelp()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "GuildEmblemWin");
}

//----- (0041DBA0) --------------------------------------------------------
void __thiscall GuildEmblemWin::ShowSlot(GuildEmblemWin *this, const unsigned int *nColor, const int *nSlotPage)
{
  signed int v3; // eax@3
  char *v4; // ecx@3
  signed int v5; // ebx@4
  int v6; // edi@5
  GuildEmblemIcon *v7; // esi@6
  int v8; // eax@8
  GuildEmblemWin *v9; // [sp+0h] [bp-14h]@1
  char *v10; // [sp+4h] [bp-10h]@3
  int i; // [sp+8h] [bp-Ch]@3
  GuildEmblemIcon **v12; // [sp+Ch] [bp-8h]@4
  char nFileNo; // [sp+12h] [bp-2h]@7
  char nIconNo; // [sp+13h] [bp-1h]@7

  v9 = this;
  if ( *nColor < 8 && *nSlotPage >= 0 )
  {
    v3 = 0;
    v4 = (char *)this->m_pkSlotIcon;
    i = 0;
    v10 = v4;
    do
    {
      v5 = 0;
      v12 = (GuildEmblemIcon **)v4;
      do
      {
        v6 = v5 + 8 * v3;
        if ( v6 >= 64 )
          break;
        v7 = *v12;
        if ( *v12 )
        {
          nIconNo = v5 + 8 * *(_BYTE *)nColor;
          nFileNo = v3 + 8 * *(_BYTE *)nSlotPage;
          if ( !GuildEmblemIcon::SetEmblemIcon(v7, &nFileNo, &nIconNo, 1) )
          {
            v8 = v9->m_CheckEmblem.nSelect;
            if ( v6 == v8 )
            {
              GuildEmblemIcon::SetSelectEmblem(v9->m_pkSlotIcon[v8], 0);
              ((void (__stdcall *)(_DWORD))v9->m_pkEmblemSlot->vfptr[64].__vecDelDtor)(0);
            }
          }
          v3 = i;
        }
        ++v12;
        ++v5;
      }
      while ( v5 < 8 );
      ++v3;
      v4 = v10 + 32;
      i = v3;
      v10 += 32;
    }
    while ( v3 < 8 );
  }
}

//----- (0041DC90) --------------------------------------------------------
char __thiscall GuildEmblemWin::ShowEmblemSlot(GuildEmblemWin *this, const unsigned int *nSelect, const unsigned int *nColor)
{
  GuildEmblemWin *v3; // esi@1
  char result; // al@2
  unsigned int v5; // ecx@3
  signed int v6; // ebx@3
  const unsigned int *v7; // edi@6
  unsigned int v8; // eax@6
  GuildEmblemIcon *v9; // ecx@7
  unsigned int v10; // ecx@8
  bool v11; // zf@8
  GuildEmblemIcon **v12; // esi@8
  int nIconIdx; // [sp+4h] [bp-8h]@6
  char nFileNo; // [sp+Bh] [bp-1h]@7

  v3 = this;
  if ( this->m_pkEmblemSlot )
  {
    v5 = *nSelect;
    v6 = 8 * v3->m_nCurSlotPageCnt + (*nSelect >> 3);
    if ( v6 >= 0 && ((v5 >> 3) & 0x80000000) == 0 )
    {
      v7 = nColor;
      v8 = v5 + 8 * (*nColor - (v5 >> 3));
      nIconIdx = v8;
      if ( v8 > 0x3F )
      {
        result = 0;
      }
      else
      {
        v9 = v3->m_pkEmblemSlot;
        BYTE3(nColor) = v8;
        nFileNo = v6;
        if ( GuildEmblemIcon::SetEmblemIcon(v9, &nFileNo, (const char *)&nColor + 3, 1) )
        {
          v10 = *nSelect;
          v3->m_CheckEmblem.nSelect = *nSelect;
          v3->m_CheckEmblem.nFilePage = v6;
          v3->m_CheckEmblem.nIndex = nIconIdx;
          v3->m_CheckEmblem.nColor = *v7;
          v11 = v3->m_pkSlotIcon[v10] == 0;
          v12 = &v3->m_pkSlotIcon[v10];
          if ( !v11 )
            GuildEmblemIcon::SetSelectEmblem(*v12, 1);
        }
        result = 1;
      }
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0041DD60) --------------------------------------------------------
void __thiscall GuildEmblemWin::OnShowWin(GuildEmblemWin *this)
{
  GuildEmblemWin *v1; // esi@1
  unsigned int nColor; // [sp+4h] [bp-4h]@1

  v1 = this;
  nColor = 0;
  GuildEmblemWin::ShowSlot(this, &nColor, &this->m_nCurSlotPageCnt);
  ((void (__stdcall *)(_DWORD))v1->m_pkEmblemSlot->vfptr[64].__vecDelDtor)(0);
  GuildEmblemIcon::SetSelectEmblem(v1->m_pkColorIcon[0], 1);
}

//----- (0041DDB0) --------------------------------------------------------
void __thiscall GuildEmblemWin::ChangeSlot(GuildEmblemWin *this, bool bNextPage)
{
  GuildEmblemWin *v2; // esi@1
  const int *v3; // edi@1
  int v4; // eax@2
  bool v5; // sf@7
  int v6; // eax@11
  int v7; // ecx@11
  unsigned int nSelect; // [sp+8h] [bp-4h]@11

  v2 = this;
  v3 = &this->m_nCurSlotPageCnt;
  if ( bNextPage )
  {
    v4 = ++*v3;
    if ( this->m_bMaxPage == 1 )
    {
      if ( v4 >= this->m_nMaxSlotPageCnt )
        *v3 = 0;
    }
    else if ( v4 > this->m_nMaxSlotPageCnt )
    {
      *v3 = 0;
    }
  }
  else
  {
    v5 = (*v3)-- - 1 < 0;
    if ( v5 )
    {
      if ( this->m_bMaxPage )
        *v3 = this->m_nMaxSlotPageCnt - 1;
      else
        *v3 = this->m_nMaxSlotPageCnt;
    }
  }
  v6 = this->m_CheckEmblem.nColor;
  v7 = this->m_CheckEmblem.nSelect;
  v2->m_CheckEmblem.nFilePage = 8 * *v3;
  *(_DWORD *)&bNextPage = v6;
  nSelect = v7;
  GuildEmblemWin::ShowEmblemSlot(v2, &nSelect, (const unsigned int *)&bNextPage);
  *(_DWORD *)&bNextPage = v2->m_CheckEmblem.nColor;
  GuildEmblemWin::ShowSlot(v2, (const unsigned int *)&bNextPage, v3);
}

//----- (0041DE60) --------------------------------------------------------
void __thiscall GuildEmblemWin::SelectEmblem(GuildEmblemWin *this, const unsigned int *nSelect)
{
  const unsigned int *v2; // ebx@1
  GuildEmblemWin *v3; // esi@1
  int v4; // eax@4
  GuildEmblemIcon *v5; // ecx@8

  v2 = nSelect;
  v3 = this;
  if ( *nSelect < 0x40 && this->m_pkEmblemSlot )
  {
    if ( this->m_CheckEmblem.nIndex < 255 )
    {
      v4 = this->m_CheckEmblem.nSelect;
      if ( v4 < 255 )
      {
        if ( this->m_pkSlotIcon[v4] )
          GuildEmblemIcon::SetSelectEmblem(this->m_pkSlotIcon[v4], 0);
      }
    }
    if ( v3->m_CheckEmblem.nSelect == *v2 )
    {
      v5 = v3->m_pkEmblemSlot;
      v3->m_CheckEmblem.nSelect = 255;
      v3->m_CheckEmblem.nIndex = 255;
      ((void (__stdcall *)(_DWORD))v5->vfptr[64].__vecDelDtor)(0);
    }
    else
    {
      nSelect = (const unsigned int *)v3->m_CheckEmblem.nColor;
      GuildEmblemWin::ShowEmblemSlot(v3, v2, (const unsigned int *)&nSelect);
    }
  }
}

//----- (0041DF00) --------------------------------------------------------
void __thiscall GuildEmblemWin::SelectColor(GuildEmblemWin *this, const unsigned int *nChangeColorSlot)
{
  const unsigned int *v2; // edi@1
  GuildEmblemWin *v3; // esi@1
  int v4; // eax@2

  v2 = nChangeColorSlot;
  v3 = this;
  if ( *nChangeColorSlot < 8 )
  {
    v4 = this->m_CheckEmblem.nColor;
    if ( v4 < 8 )
    {
      if ( this->m_pkColorIcon[v4] )
      {
        if ( this->m_pkColorIcon[*nChangeColorSlot] )
        {
          GuildEmblemIcon::SetSelectEmblem(this->m_pkColorIcon[v4], 0);
          GuildEmblemIcon::SetSelectEmblem(v3->m_pkColorIcon[*v2], 1);
          v3->m_CheckEmblem.nColor = *v2;
          GuildEmblemWin::ShowSlot(v3, v2, &v3->m_nCurSlotPageCnt);
          if ( v3->m_CheckEmblem.nIndex < 255 || v3->m_CheckEmblem.nSelect < 255 )
          {
            nChangeColorSlot = (const unsigned int *)v3->m_CheckEmblem.nSelect;
            GuildEmblemWin::ShowEmblemSlot(v3, (const unsigned int *)&nChangeColorSlot, v2);
          }
        }
      }
    }
  }
}

//----- (0041DFA0) --------------------------------------------------------
char __thiscall GuildEmblemWin::Create(GuildEmblemWin *this, PgFrameWork *pkFrameWork)
{
  GuildEmblemWin *v2; // esi@1
  NiTexturePalette *v3; // ebx@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  int v6; // edi@5
  int v7; // ebx@5
  NiSourceTexture *v8; // eax@5
  PgSprData *v9; // eax@6
  NiSourceTexture *v10; // eax@8
  PgSprData *v11; // eax@8
  D3DXCOLOR v12; // ST40_16@8
  char *v13; // eax@8
  int v14; // eax@8
  int v15; // edx@8
  PgFont *v16; // eax@8
  PgWinText *v17; // eax@8
  NiRefObjectVtbl *v18; // edx@8
  NiUnsharedGeometryGroup *v19; // eax@8
  int v20; // ecx@8
  int v21; // eax@8
  PgFont *v22; // eax@8
  PgWinText *v23; // eax@8
  NiRefObjectVtbl *v24; // edx@8
  NiUnsharedGeometryGroup *v25; // eax@8
  int v26; // ecx@8
  int v27; // eax@8
  PgFont *v28; // eax@8
  PgWinText *v29; // eax@8
  NiRefObjectVtbl *v30; // edx@8
  NiUnsharedGeometryGroup *v31; // eax@8
  D3DXCOLOR v32; // ST40_16@8
  char *v33; // eax@8
  PgSprData *v34; // eax@9
  PgWinBut *v35; // eax@9
  GuildEmblemIcon *v36; // eax@10
  PgSprData *v37; // eax@12
  GuildEmblemIcon *v38; // eax@12
  int v39; // ecx@13
  int v40; // ecx@16
  int v41; // eax@16
  int v42; // eax@16
  NiNode *v43; // esi@18
  LONG v44; // eax@19
  PgSprData *v46; // eax@26
  GuildEmblemIcon *v47; // eax@26
  PgWinBut *v48; // eax@29
  PgWin *v49; // edi@29
  int v50; // ebx@30
  NiRefObjectVtbl *v51; // edx@30
  char *v52; // eax@32
  PgWinBut *v53; // eax@33
  PgWin *v54; // edi@33
  NiNode *v55; // esi@34
  NiRefObjectVtbl *v56; // eax@38
  char *v57; // eax@40
  NiNode *v58; // esi@41
  NiSourceTexture *pkTexture; // [sp+64h] [bp-80h]@8
  UIUtil ui; // [sp+6Ch] [bp-78h]@5
  NiPointer<NiNode> spNode; // [sp+80h] [bp-64h]@1
  int uiLeft; // [sp+84h] [bp-60h]@4
  int uiTop; // [sp+88h] [bp-5Ch]@4
  int nPage; // [sp+8Ch] [bp-58h]@8
  int i; // [sp+90h] [bp-54h]@8
  char acSlotName[64]; // [sp+94h] [bp-50h]@9
  int v67; // [sp+E0h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v67 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildEmblemWin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "GuildEmblemWin", 0) )
  {
    v6 = uiLeft;
    v7 = uiTop;
    UIUtil::UIUtil(&ui);
    LOBYTE(v67) = 1;
    UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
    UIUtil::SetOffset(&ui, v6, v7);
    UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
    v8 = MenuTexMgr::GetTexture(0x13u);
    if ( v8 )
      v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v8);
    else
      v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v6, uiTop - v7, v9, (PgWin *)&v2->vfptr, 0, 0);
    v10 = MenuTexMgr::GetTexture(0x1Du);
    pkTexture = v10;
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, v10);
    PgWinSpr::CreateWin(uiLeft - v6, uiTop - v7, v11, (PgWin *)&v2->vfptr, 0, 0);
    UIUtil::CreateSpr(&ui, "Panel01", 0);
    UIUtil::CreateSpr(&ui, "Panel02", 0);
    UIUtil::CreateSpr(&ui, "Panel03", 0);
    *(_QWORD *)&v12.r = *(_QWORD *)&Color::m_kDxWinTitleColor.r;
    *(_QWORD *)&v12.b = qword_A696E8;
    v13 = (char *)TextData3::Get(0x99F0E4FC);
    UIUtil::CreateTextNoSpr(&ui, "WinTitle", v13, v12, 5u);
    i = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "OutlineText", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v6, uiTop - v7, (PgSprData *)i, (PgWin *)&v2->vfptr, 0, 0);
    v14 = **(_DWORD **)(i + 36);
    v15 = *(_DWORD *)(v14 + 20);
    nPage = *(_DWORD *)(v14 + 24);
    i = v15;
    v16 = Font::Get(0);
    v17 = PgWinText::CreateWin(uiLeft - v6, uiTop - v7, i, nPage, v16, (PgWin *)&v2->vfptr, 0, 0);
    v18 = v17->vfptr;
    i = (int)v17;
    v18[122].__vecDelDtor((NiRefObject *)v17, 5u);
    nPage = *(_DWORD *)i + 472;
    v19 = TextData3::Get(0xEA533926);
    (*(void (__thiscall **)(int, NiUnsharedGeometryGroup *))nPage)(i, v19);
    (*(void (__stdcall **)(_DWORD))(*(_DWORD *)i + 240))(0);
    i = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SymbolText01", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v6, uiTop - v7, (PgSprData *)i, (PgWin *)&v2->vfptr, 0, 0);
    v20 = *(_DWORD *)(i + 36);
    v21 = *(_DWORD *)(*(_DWORD *)v20 + 20);
    nPage = *(_DWORD *)(*(_DWORD *)v20 + 24);
    i = v21;
    v22 = Font::Get(0);
    v23 = PgWinText::CreateWin(uiLeft - v6, uiTop - v7, i, nPage, v22, (PgWin *)&v2->vfptr, 0, 0);
    v24 = v23->vfptr;
    i = (int)v23;
    v24[122].__vecDelDtor((NiRefObject *)v23, 5u);
    nPage = *(_DWORD *)i + 472;
    v25 = TextData3::Get(0x2E533E7Cu);
    (*(void (__thiscall **)(int, NiUnsharedGeometryGroup *))nPage)(i, v25);
    (*(void (__stdcall **)(_DWORD))(*(_DWORD *)i + 240))(0);
    i = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NoticeText00", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v6, uiTop - v7, (PgSprData *)i, (PgWin *)&v2->vfptr, 0, 0);
    v26 = *(_DWORD *)(i + 36);
    v27 = *(_DWORD *)(*(_DWORD *)v26 + 20);
    nPage = *(_DWORD *)(*(_DWORD *)v26 + 24);
    i = v27;
    v28 = Font::Get(0);
    v29 = PgWinText::CreateWin(uiLeft - v6, uiTop - v7, i, nPage, v28, (PgWin *)&v2->vfptr, 0, 0);
    v30 = v29->vfptr;
    i = (int)v29;
    v30[122].__vecDelDtor((NiRefObject *)v29, 5u);
    nPage = *(_DWORD *)i + 472;
    v31 = TextData3::Get(0xC44F1605);
    (*(void (__thiscall **)(_DWORD, _DWORD))nPage)(i, v31);
    (*(void (__stdcall **)(_DWORD))(*(_DWORD *)i + 240))(0);
    UIUtil::CreateBtn(&ui, 0xDu, "HelpLinkNor", "HelpLinkClick", "HelpLinkOver", 0, 0);
    UIUtil::CreateBtn(&ui, 0xCu, "ClsNor", "ClsClick", "ClsOver", 0, 0);
    nPage = (int)UIUtil::CreateBtn(&ui, 0xBu, "OkNor", "OkClick", "OkOver", 0, 0);
    *(_QWORD *)&v32.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v32.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v33 = (char *)TextData3::Get(0x2C3B4F9Bu);
    UIUtil::CreateAttachedText((PgWin *)nPage, v33, v32, 5u);
    i = 0;
    nPage = (int)v2->m_pkColorIcon;
    while ( 1 )
    {
      sprintf(acSlotName, "OutlineColorSlot%02d", i);
      v34 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acSlotName, &uiLeft, &uiTop, pkTexture);
      v35 = PgWinBut::CreateWin(uiLeft - v6, uiTop - v7, v34, (PgWin *)&v2->vfptr, 0x11u, 0, 0);
      if ( !v35 )
        break;
      v35->vfptr[130].__vecDelDtor((NiRefObject *)v35, i);
      v36 = GuildEmblemIcon::CreateWin(uiLeft - v6, uiTop - v7, i, (PgWin *)&v2->vfptr, pkFrameWork, 0x20u, 0x20u);
      *(_DWORD *)nPage = v36;
      v36->vfptr[60].__vecDelDtor((NiRefObject *)v36, 0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)nPage + 256))(0);
      nPage += 4;
      if ( ++i >= 8 )
      {
        i = 0;
        nPage = (int)v2->m_pkSlotIcon;
        while ( 1 )
        {
          sprintf(acSlotName, "SymbolEmblemSlot%02d", i);
          v37 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acSlotName, &uiLeft, &uiTop, pkTexture);
          PgWinSpr::CreateWin(uiLeft - v6, uiTop - v7, v37, (PgWin *)&v2->vfptr, 0, 0);
          v38 = GuildEmblemIcon::CreateWin(uiLeft - v6, uiTop - v7, i, (PgWin *)&v2->vfptr, pkFrameWork, 0x20u, 0x20u);
          *(_DWORD *)nPage = v38;
          if ( !v38 )
            goto LABEL_27;
          v38->vfptr[60].__vecDelDtor((NiRefObject *)v38, 1u);
          (*(void (__stdcall **)(signed int))(**(_DWORD **)nPage + 256))(1);
          v39 = nPage;
          *(_DWORD *)(*(_DWORD *)nPage + 304) = 1;
          (*(void (__stdcall **)(signed int))(**(_DWORD **)v39 + 516))(16);
          nPage += 4;
          if ( ++i >= 64 )
          {
            nPage = 0;
            sprintf(acSlotName, "GuildEmblem%03d", 0);
            while ( IconMgr::GetTexturePng(acSlotName) )
              sprintf(acSlotName, "GuildEmblem%03d", ++nPage);
            v40 = nPage;
            v41 = nPage / 8;
            v2->m_nMaxSlotPageCnt = nPage / 8;
            v42 = v40 - 8 * v41;
            if ( v42 < 0 )
            {
              LOBYTE(v67) = 0;
              UIUtil::~UIUtil(&ui);
              goto LABEL_18;
            }
            if ( !v42 )
              v2->m_bMaxPage = 1;
            v46 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "EmblemSlot", &uiLeft, &uiTop, 0);
            PgWinSpr::CreateWin(uiLeft - v6, uiTop - v7, v46, (PgWin *)&v2->vfptr, 0, 0);
            v47 = GuildEmblemIcon::CreateWin(uiLeft - v6, uiTop - v7, i, (PgWin *)&v2->vfptr, pkFrameWork, 0x40u, 0x40u);
            v2->m_pkEmblemSlot = v47;
            if ( !v47 )
              goto LABEL_27;
            v47->vfptr[64].__vecDelDtor((NiRefObject *)v47, 0);
            ((void (__stdcall *)(_DWORD))v2->m_pkEmblemSlot->vfptr[60].__vecDelDtor)(0);
            v48 = UIUtil::CreateBtn(&ui, 0xEu, "OutlinePage_Nor00", "OutlinePage_Click00", "OutlinePage_Over00", 0, 0);
            v49 = (PgWin *)v48;
            if ( !v48 )
              goto LABEL_27;
            v50 = nPage;
            v51 = v48->vfptr;
            if ( nPage > 8 )
            {
              v51[130].__vecDelDtor((NiRefObject *)v48, 1u);
              v49->m_pkToolTipWin = g_pkToolTipWin;
              v52 = (char *)TextData3::Get(0x1B4C4C56u);
              PgWin::SetToolTipWinText(v49, v52);
            }
            else
            {
              v51[64].__vecDelDtor((NiRefObject *)v48, 0);
              v49->vfptr[60].__vecDelDtor((NiRefObject *)v49, 0);
            }
            v53 = UIUtil::CreateBtn(&ui, 0xFu, "OutlinePage_Nor01", "OutlinePage_Click01", "OutlinePage_Over01", 0, 0);
            v54 = (PgWin *)v53;
            if ( v53 )
            {
              v56 = v53->vfptr;
              if ( v50 > 8 )
              {
                v56[130].__vecDelDtor((NiRefObject *)v54, 1u);
                v54->m_pkToolTipWin = g_pkToolTipWin;
                v57 = (char *)TextData3::Get(0x2E3F4AAAu);
                PgWin::SetToolTipWinText(v54, v57);
              }
              else
              {
                v56[64].__vecDelDtor((NiRefObject *)v54, 0);
                v54->vfptr[60].__vecDelDtor((NiRefObject *)v54, 0);
              }
              ((void (__thiscall *)(GuildEmblemWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
                v2,
                PgWin::ms_uiScreenWidth,
                PgWin::ms_uiScreenHeight,
                0.5,
                0.5);
              LOBYTE(v67) = 0;
              UIUtil::~UIUtil(&ui);
              v58 = spNode.m_pObject;
              v67 = -1;
              if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v58 )
                v58->vfptr->__vecDelDtor((NiRefObject *)v58, 1u);
              return 1;
            }
            LOBYTE(v67) = 0;
            UIUtil::~UIUtil(&ui);
            v55 = spNode.m_pObject;
            v67 = -1;
            if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v55 )
            {
              v55->vfptr->__vecDelDtor((NiRefObject *)v55, 1u);
              return 0;
            }
            return 0;
          }
        }
      }
    }
LABEL_27:
    LOBYTE(v67) = 0;
    UIUtil::~UIUtil(&ui);
    v43 = spNode.m_pObject;
    v67 = -1;
    if ( spNode.m_pObject )
    {
      v44 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
LABEL_20:
      if ( !v44 )
      {
        if ( v43 )
          v43->vfptr->__vecDelDtor((NiRefObject *)v43, 1u);
      }
      return 0;
    }
  }
  else
  {
LABEL_18:
    v43 = spNode.m_pObject;
    v67 = -1;
    if ( spNode.m_pObject )
    {
      v44 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
      goto LABEL_20;
    }
  }
  return 0;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A696E8: using guessed type __int64 qword_A696E8;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0041E8E0) --------------------------------------------------------
void __thiscall GuildEmblemWin::OnApplyEmblem(GuildEmblemWin *this)
{
  GuildEmblemWin *v1; // esi@1
  GameFrameWork *v2; // edi@1
  GUILD_EMBLEM_INFO ST0C_2_4; // ST0C_2@4
  NiUnsharedGeometryGroup *v4; // eax@5

  v1 = this;
  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    if ( v1->m_CheckEmblem.nIndex < 255
      && (unsigned __int8)((int (*)(void))v1->m_pkEmblemSlot->vfptr[65].__vecDelDtor)() )
    {
      ST0C_2_4.nPTFileNo = v1->m_CheckEmblem.nFilePage;
      ST0C_2_4.nPTIconNo = v1->m_CheckEmblem.nIndex;
      GameFrameWork::NcGuildEmblemSaveReq(v2, ST0C_2_4);
    }
    else
    {
      v4 = TextData3::Get(0x73A38DDBu);
      GameFrameWork::AddSysMsg(v2, (const char *)v4);
    }
  }
}

//----- (0041E960) --------------------------------------------------------
void __thiscall GuildEmblemWin::OnCommand(GuildEmblemWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0xBu:
      GuildEmblemWin::OnApplyEmblem(this);
      break;
    case 0xCu:
      GuildEmblemWin::OnCancelWin();
      break;
    case 0xDu:
      GuildEmblemWin::OnHelp();
      break;
    case 0xEu:
      GuildEmblemWin::ChangeSlot(this, 0);
      break;
    case 0xFu:
      GuildEmblemWin::ChangeSlot(this, 1);
      break;
    case 0x10u:
      GuildEmblemWin::SelectEmblem(this, (const unsigned int *)&lParam);
      break;
    case 0x11u:
      GuildEmblemWin::SelectColor(this, (const unsigned int *)&lParam);
      break;
    default:
      return;
  }
}

//----- (0041E9F0) --------------------------------------------------------
GuildEmblemWin *__cdecl GuildEmblemWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  GuildEmblemWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x298u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    GuildEmblemWin::GuildEmblemWin((GuildEmblemWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (GuildEmblemWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (0041EB20) --------------------------------------------------------
GuildEmblemWin *__thiscall GuildEmblemWin::`vector deleting destructor'(GuildEmblemWin *this, unsigned int a2)
{
  GuildEmblemWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildEmblemWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildEmblemWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 972DAC: using guessed type void (__thiscall *GuildEmblemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 972DCC: using guessed type int (__thiscall *GuildEmblemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0041EB60) --------------------------------------------------------
char __cdecl IconMgr::Init()
{
  return 1;
}

//----- (0041EB70) --------------------------------------------------------
void __cdecl IconMgr::Terminate()
{
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(&IconMgr::ms_kTextureMap);
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(&IconMgr::ms_kAniTextureMap);
}

//----- (0041EB90) --------------------------------------------------------
NiSourceTexture *__cdecl IconMgr::LoadIconImage(char *pcFileName)
{
  NiImageConverter *v1; // eax@1
  NiSourceTexture *result; // eax@1
  NiTexture::FormatPrefs kPrefs; // [sp+0h] [bp-Ch]@2

  v1 = NiImageConverter::GetImageConverter();
  result = (NiSourceTexture *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v1->vfptr[2].__vecDelDtor)(
                                v1,
                                pcFileName,
                                0);
  if ( result )
  {
    kPrefs.m_ePixelLayout = 6;
    kPrefs.m_eAlphaFmt = 3;
    kPrefs.m_eMipMapped = 0;
    result = NiSourceTexture::Create((NiPixelData *)result, &kPrefs);
  }
  return result;
}

//----- (0041EBE0) --------------------------------------------------------
NiSourceTexture *__cdecl IconMgr::GetTexture(char *pcFileName)
{
  NiSourceTexture *v1; // edi@1
  NiSourceTexture *v2; // esi@2
  bool v3; // zf@2
  NiImageConverter *v4; // eax@5
  NiPixelData *v5; // eax@5
  char *v7; // [sp-4h] [bp-13Ch]@5
  char **v8; // [sp+10h] [bp-128h]@14
  NiTexture::FormatPrefs kPrefs; // [sp+14h] [bp-124h]@6
  NiPointer<NiSourceTexture> spTexture; // [sp+20h] [bp-118h]@1
  char acPathName[260]; // [sp+24h] [bp-114h]@5
  int v12; // [sp+134h] [bp-4h]@1

  v1 = 0;
  spTexture.m_pObject = 0;
  v12 = 0;
  if ( !NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
          (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&IconMgr::ms_kTextureMap,
          pcFileName,
          (NiPointer<NiShaderLibrary> *)&spTexture) )
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    v7 = pcFileName;
    sprintf(acPathName, "%sIcon\\%s.dds", &Folder::m_acMenu, pcFileName);
    v4 = NiImageConverter::GetImageConverter();
    v5 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v4->vfptr[2].__vecDelDtor)(
                          v4,
                          acPathName,
                          0);
    if ( v5 )
    {
      kPrefs.m_ePixelLayout = 6;
      kPrefs.m_eAlphaFmt = 3;
      kPrefs.m_eMipMapped = 0;
      v1 = NiSourceTexture::Create(v5, &kPrefs);
    }
    v2 = spTexture.m_pObject;
    if ( spTexture.m_pObject != v1 )
    {
      if ( spTexture.m_pObject && !InterlockedDecrement((volatile LONG *)&spTexture.m_pObject->m_uiRefCount) )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
      v2 = v1;
      spTexture.m_pObject = v1;
      if ( !v1 )
        goto LABEL_15;
      InterlockedIncrement((volatile LONG *)&v1->m_uiRefCount);
    }
    v3 = v2 == 0;
    if ( !v2 )
      goto LABEL_16;
    v7 = (char *)v2;
    v8 = &v7;
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
    NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
      &IconMgr::ms_kTextureMap,
      (unsigned int)pcFileName,
      (NiPointer<PgWinBut>)v7);
LABEL_15:
    v3 = v2 == 0;
    goto LABEL_16;
  }
  v2 = spTexture.m_pObject;
  v3 = spTexture.m_pObject == 0;
LABEL_16:
  v12 = -1;
  if ( !v3 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  return v2;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0041ED50) --------------------------------------------------------
NiSourceTexture *__cdecl IconMgr::GetTexturePng(char *pcFileName)
{
  NiSourceTexture *v1; // edi@1
  NiSourceTexture *v2; // esi@2
  bool v3; // zf@2
  NiImageConverter *v4; // eax@5
  NiPixelData *v5; // eax@5
  char *v7; // [sp-4h] [bp-13Ch]@5
  char **v8; // [sp+10h] [bp-128h]@14
  NiTexture::FormatPrefs kPrefs; // [sp+14h] [bp-124h]@6
  NiPointer<NiSourceTexture> spTexture; // [sp+20h] [bp-118h]@1
  char acPathName[260]; // [sp+24h] [bp-114h]@5
  int v12; // [sp+134h] [bp-4h]@1

  v1 = 0;
  spTexture.m_pObject = 0;
  v12 = 0;
  if ( !NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
          (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&IconMgr::ms_kTextureMap,
          pcFileName,
          (NiPointer<NiShaderLibrary> *)&spTexture) )
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    v7 = pcFileName;
    sprintf(acPathName, "%sIcon\\Png\\%s.png", &Folder::m_acMenu, pcFileName);
    v4 = NiImageConverter::GetImageConverter();
    v5 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v4->vfptr[2].__vecDelDtor)(
                          v4,
                          acPathName,
                          0);
    if ( v5 )
    {
      kPrefs.m_ePixelLayout = 6;
      kPrefs.m_eAlphaFmt = 3;
      kPrefs.m_eMipMapped = 0;
      v1 = NiSourceTexture::Create(v5, &kPrefs);
    }
    v2 = spTexture.m_pObject;
    if ( spTexture.m_pObject != v1 )
    {
      if ( spTexture.m_pObject && !InterlockedDecrement((volatile LONG *)&spTexture.m_pObject->m_uiRefCount) )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
      v2 = v1;
      spTexture.m_pObject = v1;
      if ( !v1 )
        goto LABEL_15;
      InterlockedIncrement((volatile LONG *)&v1->m_uiRefCount);
    }
    v3 = v2 == 0;
    if ( !v2 )
      goto LABEL_16;
    v7 = (char *)v2;
    v8 = &v7;
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
    NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
      &IconMgr::ms_kTextureMap,
      (unsigned int)pcFileName,
      (NiPointer<PgWinBut>)v7);
LABEL_15:
    v3 = v2 == 0;
    goto LABEL_16;
  }
  v2 = spTexture.m_pObject;
  v3 = spTexture.m_pObject == 0;
LABEL_16:
  v12 = -1;
  if ( !v3 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  return v2;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0041EEC0) --------------------------------------------------------
NiPointer<NiTexturingProperty> *__cdecl IconMgr::GetAniTextureProperty(NiPointer<NiTexturingProperty> *result, const char *pkFileName)
{
  NiTexturingProperty *v2; // esi@2
  NiNode *v4; // eax@10
  NiNode *v5; // esi@10
  NiTexturingProperty *v6; // esi@13
  NiAVObject *v7; // edi@18
  NiTexturingProperty *v8; // edi@21
  NiRefObjectVtbl *v9; // edx@27
  NiTexturingProperty *v10; // ecx@27
  NiD3DDefaultShader *v11; // eax@28
  NiTexturingProperty *v12; // ebx@28
  const char *v13; // [sp-4h] [bp-144h]@10
  NiPointer<NiNode> spNode; // [sp+10h] [bp-130h]@10
  NiPointer<NiAVObject> spFindObj; // [sp+14h] [bp-12Ch]@18
  const char **v16; // [sp+18h] [bp-128h]@29
  unsigned int key; // [sp+1Ch] [bp-124h]@1
  int v18; // [sp+20h] [bp-120h]@1
  NiPointer<NiTexturingProperty> spTextureProperty; // [sp+24h] [bp-11Ch]@1
  NiPointer<NiTexturingProperty> *v20; // [sp+28h] [bp-118h]@1
  char acPathName[260]; // [sp+2Ch] [bp-114h]@10
  int v22; // [sp+13Ch] [bp-4h]@1

  v18 = 0;
  v20 = result;
  key = (unsigned int)pkFileName;
  spTextureProperty.m_pObject = 0;
  v22 = 1;
  if ( !NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
          (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&IconMgr::ms_kAniTextureMap,
          pkFileName,
          (NiPointer<NiShaderLibrary> *)&spTextureProperty) )
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    v13 = pkFileName;
    sprintf(acPathName, "%sIcon\\%s.nif", &Folder::m_acMenu, pkFileName);
    v4 = PgUtil::LoadNifFile(acPathName, 0);
    v5 = v4;
    spNode.m_pObject = v4;
    if ( v4 )
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
    LOBYTE(v22) = 2;
    if ( v5 )
    {
      v7 = (NiAVObject *)v5->vfptr[18].__vecDelDtor((NiRefObject *)v5, (unsigned int)&off_97300C);
      spFindObj.m_pObject = v7;
      if ( v7 )
        InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
      LOBYTE(v22) = 3;
      if ( v7 )
      {
        v11 = (NiD3DDefaultShader *)NiAVObject::GetProperty(v7, 8);
        NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&spTextureProperty, v11);
        v12 = spTextureProperty.m_pObject;
        if ( !spTextureProperty.m_pObject )
        {
          v16 = &v13;
          NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
            &IconMgr::ms_kAniTextureMap,
            key,
            (NiPointer<PgWinBut>)spTextureProperty.m_pObject);
        }
        v20->m_pObject = v12;
        if ( v12 )
          InterlockedIncrement((volatile LONG *)&v12->m_uiRefCount);
        v18 = 1;
        LOBYTE(v22) = 2;
        if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
        LOBYTE(v22) = 1;
        if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
        LOBYTE(v22) = 0;
        if ( !v12 || InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) )
          return v20;
        v9 = v12->vfptr;
        v10 = v12;
      }
      else
      {
        v8 = spTextureProperty.m_pObject;
        v20->m_pObject = spTextureProperty.m_pObject;
        if ( v8 )
          InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
        v18 = 1;
        LOBYTE(v22) = 1;
        if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
        LOBYTE(v22) = 0;
        if ( !v8 || InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
          return v20;
        v9 = v8->vfptr;
        v10 = v8;
      }
      v9->__vecDelDtor(v10, 1);
    }
    else
    {
      v6 = spTextureProperty.m_pObject;
      v20->m_pObject = spTextureProperty.m_pObject;
      if ( v6 )
        InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
      v18 = 1;
      LOBYTE(v22) = 0;
      if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return v20;
  }
  v2 = spTextureProperty.m_pObject;
  result->m_pObject = spTextureProperty.m_pObject;
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v18 = 1;
  LOBYTE(v22) = 0;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  }
  return result;
}
// 97300C: using guessed type void *off_97300C;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0041F180) --------------------------------------------------------
NiPointer<NiD3DDefaultShader> *__thiscall NiPointer<PopupMenuWin>::operator=(NiPointer<NiD3DDefaultShader> *this, NiD3DDefaultShader *pObject)
{
  NiPointer<NiD3DDefaultShader> *v2; // edi@1
  NiD3DDefaultShader *v3; // esi@1

  v2 = this;
  v3 = this->m_pObject;
  if ( this->m_pObject != pObject )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_pObject = pObject;
    if ( pObject )
      InterlockedIncrement((volatile LONG *)&pObject->m_uiRefCount);
  }
  return v2;
}

//----- (0041F1D0) --------------------------------------------------------
void __thiscall NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,char const *,NiPointer<NiSourceTexture>>::~NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,char const *,NiPointer<NiSourceTexture>>(NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,char const *,NiPointer<NiSourceTexture> > *this)
{
  NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,char const *,NiPointer<NiSourceTexture> > *v1; // esi@1

  v1 = this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,char const *,NiPointer<NiSourceTexture> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,char const *,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v1->m_ppkHashTable);
}
// 973028: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,char const *,NiPointer<NiSourceTexture>>::`vftable')(void *p, char);

//----- (0041F1F0) --------------------------------------------------------
void __thiscall NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiSourceTexture>>,NiPointer<NiSourceTexture>>::~NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiSourceTexture>>,NiPointer<NiSourceTexture>>(NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiSourceTexture> >,NiPointer<NiSourceTexture> > *this)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v1; // edi@1
  bool v2; // zf@1
  unsigned int v3; // ebx@2
  NiTMapItem<unsigned long,NiPointer<PgWinBut> > *v4; // esi@3
  void *v5; // eax@4

  v1 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  v2 = this->m_bCopy == 0;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,char const *,NiPointer<NiSourceTexture> >Vtbl *)&NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiSourceTexture>>,NiPointer<NiSourceTexture>>::`vftable';
  if ( !v2 )
  {
    v3 = 0;
    if ( this->m_uiHashSize )
    {
      do
      {
        v4 = v1->m_ppkHashTable[v3];
        while ( v4 )
        {
          v5 = (void *)v4->m_key;
          v4 = v4->m_pkNext;
          operator delete[](v5);
        }
        ++v3;
      }
      while ( v3 < v1->m_uiHashSize );
    }
  }
  v1->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMap<char const *,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v1);
  v1->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,char const *,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v1);
  operator delete[](v1->m_ppkHashTable);
}
// 973028: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,char const *,NiPointer<NiSourceTexture>>::`vftable')(void *p, char);
// 973068: using guessed type int (__thiscall *NiTMap<char const *,NiPointer<NiSourceTexture>>::`vftable')(void *p, char);
// 973088: using guessed type int (__thiscall *NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiSourceTexture>>,NiPointer<NiSourceTexture>>::`vftable')(void *p, char);

//----- (0041F2A0) --------------------------------------------------------
void __thiscall NiTMapBase<DFALL<NiPointer<NiTexturingProperty>>,char const *,NiPointer<NiTexturingProperty>>::~NiTMapBase<DFALL<NiPointer<NiTexturingProperty>>,char const *,NiPointer<NiTexturingProperty>>(NiTMapBase<DFALL<NiPointer<NiTexturingProperty> >,char const *,NiPointer<NiTexturingProperty> > *this)
{
  NiTMapBase<DFALL<NiPointer<NiTexturingProperty> >,char const *,NiPointer<NiTexturingProperty> > *v1; // esi@1

  v1 = this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<NiTexturingProperty> >,char const *,NiPointer<NiTexturingProperty> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiTexturingProperty>>,char const *,NiPointer<NiTexturingProperty>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v1->m_ppkHashTable);
}
// 973048: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiTexturingProperty>>,char const *,NiPointer<NiTexturingProperty>>::`vftable')(void *p, char);

//----- (0041F2C0) --------------------------------------------------------
void __thiscall NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiTexturingProperty>>,NiPointer<NiTexturingProperty>>::~NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiTexturingProperty>>,NiPointer<NiTexturingProperty>>(NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiTexturingProperty> >,NiPointer<NiTexturingProperty> > *this)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v1; // edi@1
  bool v2; // zf@1
  unsigned int v3; // ebx@2
  NiTMapItem<unsigned long,NiPointer<PgWinBut> > *v4; // esi@3
  void *v5; // eax@4

  v1 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  v2 = this->m_bCopy == 0;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<NiTexturingProperty> >,char const *,NiPointer<NiTexturingProperty> >Vtbl *)&NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiTexturingProperty>>,NiPointer<NiTexturingProperty>>::`vftable';
  if ( !v2 )
  {
    v3 = 0;
    if ( this->m_uiHashSize )
    {
      do
      {
        v4 = v1->m_ppkHashTable[v3];
        while ( v4 )
        {
          v5 = (void *)v4->m_key;
          v4 = v4->m_pkNext;
          operator delete[](v5);
        }
        ++v3;
      }
      while ( v3 < v1->m_uiHashSize );
    }
  }
  v1->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMap<char const *,NiPointer<NiTexturingProperty>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v1);
  v1->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiTexturingProperty>>,char const *,NiPointer<NiTexturingProperty>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v1);
  operator delete[](v1->m_ppkHashTable);
}
// 973048: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiTexturingProperty>>,char const *,NiPointer<NiTexturingProperty>>::`vftable')(void *p, char);
// 9730A8: using guessed type int (__thiscall *NiTMap<char const *,NiPointer<NiTexturingProperty>>::`vftable')(void *p, char);
// 9730C8: using guessed type int (__thiscall *NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiTexturingProperty>>,NiPointer<NiTexturingProperty>>::`vftable')(void *p, char);

//----- (0041F370) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,char const *,NiPointer<NiSourceTexture> > *__thiscall NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,char const *,NiPointer<NiSourceTexture>>::`scalar deleting destructor'(NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,char const *,NiPointer<NiSourceTexture> > *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,char const *,NiPointer<NiSourceTexture> > *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,char const *,NiPointer<NiSourceTexture> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,char const *,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 973028: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,char const *,NiPointer<NiSourceTexture>>::`vftable')(void *p, char);

//----- (0041F3B0) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<char const *,NiPointer<NiSourceTexture>>::`scalar deleting destructor'(NiTMap<char const *,NiPointer<NiSourceTexture> > *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // esi@1

  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,char const *,NiPointer<NiSourceTexture> >Vtbl *)&NiTMap<char const *,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,char const *,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v2);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 973028: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,char const *,NiPointer<NiSourceTexture>>::`vftable')(void *p, char);
// 973068: using guessed type int (__thiscall *NiTMap<char const *,NiPointer<NiSourceTexture>>::`vftable')(void *p, char);

//----- (0041F430) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<NiTexturingProperty> >,char const *,NiPointer<NiTexturingProperty> > *__thiscall NiTMapBase<DFALL<NiPointer<NiTexturingProperty>>,char const *,NiPointer<NiTexturingProperty>>::`scalar deleting destructor'(NiTMapBase<DFALL<NiPointer<NiTexturingProperty> >,char const *,NiPointer<NiTexturingProperty> > *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<NiTexturingProperty> >,char const *,NiPointer<NiTexturingProperty> > *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<NiTexturingProperty> >,char const *,NiPointer<NiTexturingProperty> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiTexturingProperty>>,char const *,NiPointer<NiTexturingProperty>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 973048: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiTexturingProperty>>,char const *,NiPointer<NiTexturingProperty>>::`vftable')(void *p, char);

//----- (0041F470) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<char const *,NiPointer<NiTexturingProperty>>::`scalar deleting destructor'(NiTMap<char const *,NiPointer<NiTexturingProperty> > *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // esi@1

  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<NiTexturingProperty> >,char const *,NiPointer<NiTexturingProperty> >Vtbl *)&NiTMap<char const *,NiPointer<NiTexturingProperty>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiTexturingProperty>>,char const *,NiPointer<NiTexturingProperty>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v2);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 973048: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiTexturingProperty>>,char const *,NiPointer<NiTexturingProperty>>::`vftable')(void *p, char);
// 9730A8: using guessed type int (__thiscall *NiTMap<char const *,NiPointer<NiTexturingProperty>>::`vftable')(void *p, char);

//----- (0041F4F0) --------------------------------------------------------
NiTStringMap<NiPointer<NiTexturingProperty> > *__thiscall NiTStringMap<NiPointer<NiTexturingProperty>>::`vector deleting destructor'(NiTStringMap<NiPointer<NiTexturingProperty> > *this, unsigned int a2)
{
  NiTStringMap<NiPointer<NiTexturingProperty> > *v2; // esi@1

  v2 = this;
  NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiTexturingProperty>>,NiPointer<NiTexturingProperty>>::~NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiTexturingProperty>>,NiPointer<NiTexturingProperty>>((NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiTexturingProperty> >,NiPointer<NiTexturingProperty> > *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0041F520) --------------------------------------------------------
NiTStringMap<NiPointer<NiSourceTexture> > *__thiscall NiTStringMap<NiPointer<NiSourceTexture>>::`scalar deleting destructor'(NiTStringMap<NiPointer<NiSourceTexture> > *this, unsigned int a2)
{
  NiTStringMap<NiPointer<NiSourceTexture> > *v2; // esi@1

  v2 = this;
  NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiSourceTexture>>,NiPointer<NiSourceTexture>>::~NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiSourceTexture>>,NiPointer<NiSourceTexture>>((NiTStringTemplateMap<NiTMap<char const *,NiPointer<NiSourceTexture> >,NiPointer<NiSourceTexture> > *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0041F550) --------------------------------------------------------
ItemMixDataTab *__thiscall ItemMixDataTab::`scalar deleting destructor'(ItemMixDataTab *this, unsigned int a2)
{
  ItemMixDataTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ItemMixDataTabVtbl *)&ItemMixDataTab::`vftable';
  ItemMixData::~ItemMixData((ItemMixData *)&this->m_ItemMixDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 973234: using guessed type int (__thiscall *ItemMixDataTab::`vftable')(void *p, char);

//----- (0041F580) --------------------------------------------------------
void __thiscall MixItemIcon::MixItemIcon(MixItemIcon *this)
{
  MixItemIcon *v1; // esi@1

  v1 = this;
  ItemIcon::ItemIcon((ItemIcon *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&MixItemIcon::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MixItemIcon::`vftable'{for `IDirectMessenger'};
  v1->m_uiInvIndex = -1;
  v1->m_uiInvType = -1;
  v1->m_pkSender = 0;
  v1->m_uiSenderType = -1;
  v1->m_uiSenderInvIndex = -1;
  ItemIcon::SetItem((ItemIcon *)&v1->vfptr, 0, 1);
  v1->m_pkFrameWork = 0;
  v1->m_bLock = 0;
}
// 97323C: using guessed type void (__thiscall *MixItemIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97325C: using guessed type int (__thiscall *MixItemIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (0041F610) --------------------------------------------------------
void __thiscall MixItemIcon::~MixItemIcon(MixItemIcon *this)
{
  this->vfptr = (NiRefObjectVtbl *)&MixItemIcon::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MixItemIcon::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
}
// 97323C: using guessed type void (__thiscall *MixItemIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97325C: using guessed type int (__thiscall *MixItemIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (0041F630) --------------------------------------------------------
void __thiscall MixItemIcon::SetTranslucence(MixItemIcon *this)
{
  MixItemIcon *v1; // esi@1

  v1 = this;
  ItemIcon::SetBackPlaneColor((ItemIcon *)&this->vfptr, 175.0, 175.0, 175.0, 100.0);
  ItemIcon::SetTopPlaneColor((ItemIcon *)&v1->vfptr, 175.0, 175.0, 175.0, 100.0);
}

//----- (0041F680) --------------------------------------------------------
void __thiscall MixItemIcon::SetTransparency(MixItemIcon *this)
{
  MixItemIcon *v1; // esi@1

  v1 = this;
  ItemIcon::SetBackPlaneColor((ItemIcon *)&this->vfptr, 0.0, 0.0, 0.0, 0.0);
  ItemIcon::SetTopPlaneColor((ItemIcon *)&v1->vfptr, 0.0, 0.0, 0.0, 0.0);
}

//----- (0041F6D0) --------------------------------------------------------
MixItemIcon *__thiscall ItemMixWin::GetInsertedSlot(ItemMixWin *this, unsigned int _uiSlotNum)
{
  MixItemIcon *result; // eax@2

  if ( !_uiSlotNum )
  {
    result = this->m_apkItemIconWin[0];
    if ( result->m_uiSenderInvIndex != -1 )
      return result;
    return 0;
  }
  if ( _uiSlotNum == 1 )
  {
    result = this->m_apkItemIconWin[1];
    if ( result->m_uiSenderInvIndex == -1 )
      return 0;
  }
  else
  {
    if ( _uiSlotNum != 2 )
      return 0;
    result = this->m_apkItemIconWin[2];
    if ( result->m_uiSenderInvIndex == -1 )
      return 0;
  }
  return result;
}

//----- (0041F720) --------------------------------------------------------
char __thiscall MixItemIcon::Create(MixItemIcon *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork)
{
  MixItemIcon *v6; // esi@1
  char result; // al@1

  v6 = this;
  this->m_pkFrameWork = pkFrameWork;
  result = ItemIcon::Create((ItemIcon *)&this->vfptr, iXPos, iYPos, pkParent);
  if ( result )
  {
    v6->m_uiInvIndex = uiInvIndex;
    ItemIcon::PlaneInit((ItemIcon *)&v6->vfptr);
    ItemIcon::SetBackPlaneColor((ItemIcon *)&v6->vfptr, 0.0, 0.0, 0.0, 0.0);
    ItemIcon::SetTopPlaneColor((ItemIcon *)&v6->vfptr, 0.0, 0.0, 0.0, 0.0);
    ItemIcon::ShowLotText((ItemIcon *)&v6->vfptr, 0);
    result = 1;
  }
  return result;
}

//----- (0041F7C0) --------------------------------------------------------
char __thiscall MixItemIcon::SetSenderInvSlotLock(MixItemIcon *this, bool _bLock)
{
  PgWin *v2; // eax@1
  char result; // al@2
  unsigned int v4; // ecx@3
  InvWin *v5; // ecx@4

  v2 = this->m_pkSender;
  if ( v2
    && (v4 = this->m_uiSenderInvIndex, v4 < 0xC0)
    && (v5 = (InvWin *)LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][v4 + 2])) != 0 )
  {
    InvWin::SetLock(v5, _bLock);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0041F800) --------------------------------------------------------
void __thiscall MixItemIcon::ReSetSlot(MixItemIcon *this)
{
  MixItemIcon *v1; // esi@1
  void *(__thiscall *v2)(NiRefObject *, unsigned int); // edx@1
  PgWin *v3; // eax@1
  unsigned int v4; // ecx@2
  InvWin *v5; // eax@3

  v1 = this;
  v2 = this->vfptr[60].__vecDelDtor;
  this->m_bLock = 0;
  ((void (__stdcall *)(_DWORD))v2)(1);
  v3 = v1->m_pkSender;
  if ( v3 )
  {
    v4 = v1->m_uiSenderInvIndex;
    if ( v4 < 0xC0 )
    {
      v5 = (InvWin *)LODWORD(v3[1].m_kLocal.m_Rotate.m_pEntry[0][v4 + 2]);
      if ( v5 )
        InvWin::SetLock(v5, 0);
    }
  }
  v1->m_uiSenderType = -1;
  v1->m_uiSenderInvIndex = -1;
  v1->m_pkSender = 0;
  ItemIcon::SetItem((ItemIcon *)&v1->vfptr, 0, 1);
  ItemIcon::SetBackPlaneColor((ItemIcon *)&v1->vfptr, 0.0, 0.0, 0.0, 0.0);
  ItemIcon::SetTopPlaneColor((ItemIcon *)&v1->vfptr, 0.0, 0.0, 0.0, 0.0);
}

//----- (0041F8A0) --------------------------------------------------------
void __thiscall MixItemIcon::SetTemporaryIcon(MixItemIcon *this, unsigned __int16 _pItemId)
{
  MixItemIcon *v2; // esi@1
  Item *v3; // eax@2
  ItemViewInfo *v4; // edi@3
  NiRefObjectVtbl *v5; // ebx@3
  unsigned int v6; // ST04_4@3
  NiSourceTexture *v7; // eax@3
  void *(__thiscall *v8)(NiRefObject *, unsigned int); // eax@3

  v2 = this;
  if ( _pItemId != -1 && (v3 = Item::Create(_pItemId)) != 0 )
  {
    v4 = v3->m_pkViewInfo;
    ItemIcon::SetItem((ItemIcon *)&v2->vfptr, v3, 1);
    v5 = v2->vfptr;
    v6 = v4->IconIndex;
    v7 = IconMgr::GetTexture(v4->IconFile);
    ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v5[146].__vecDelDtor)(v2, v7, v6, 32, 32);
    MixItemIcon::SetTranslucence(v2);
    v8 = v2->vfptr[60].__vecDelDtor;
    v2->m_uFlags &= 0xFFFEu;
    v2->m_bLock = 0;
    v8((NiRefObject *)&v2->vfptr, 1u);
  }
  else
  {
    MixItemIcon::ReSetSlot(v2);
  }
}

//----- (0041F930) --------------------------------------------------------
void __thiscall MixItemIcon::OnFirstHitWin(MixItemIcon *this)
{
  MixItemIcon *v1; // esi@1
  PgWin *v2; // eax@5
  unsigned int v3; // ecx@6
  ItemIcon *v4; // ecx@7
  Item *v5; // edi@8
  Item *v6; // eax@9
  ItemInfoWin *v7; // ecx@11

  v1 = this;
  if ( !this->m_bLock )
  {
    if ( ItemIcon::GetItem((ItemIcon *)&this->vfptr) )
      v1->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
    else
      v1->m_pkToolTipWin = g_pkToolTipWin;
    PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
    v2 = v1->m_pkSender;
    if ( v2 )
    {
      v3 = v1->m_uiSenderInvIndex;
      if ( v3 < 0xC0 )
      {
        v4 = (ItemIcon *)LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][v3 + 2]);
        if ( v4 )
        {
          v5 = ItemIcon::GetItem(v4);
          if ( v5 )
          {
            v6 = ItemIcon::GetItem((ItemIcon *)&v1->vfptr);
            if ( v6 )
            {
              if ( v5->m_kStruct.itemid == v6->m_kStruct.itemid )
              {
                v7 = (ItemInfoWin *)v1->m_pkToolTipWin;
                if ( v7 )
                {
                  ItemInfoWin::SetItemInfo(v7, v6);
                  PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
                }
              }
            }
          }
        }
      }
    }
  }
}

//----- (0041F9D0) --------------------------------------------------------
void __thiscall ItemMixWin::UpdateMeWin(ItemMixWin *this, float fCurTime)
{
  ItemMixWin *v2; // esi@1
  MixItemIcon *v3; // eax@1
  Item *v4; // eax@4
  ItemInfoWin *v5; // ecx@4
  MixItemIcon *v6; // eax@7
  MixItemIcon *v7; // eax@9
  Item *v8; // eax@13
  ItemInfoWin *v9; // ecx@13
  MixItemIcon *v10; // eax@17
  signed __int16 v11; // ax@19
  Item *v12; // eax@19
  ItemInfoWin *v13; // ecx@19
  MixItemIcon *v14; // eax@23
  signed __int16 v15; // ax@25
  Item *v16; // eax@25
  ItemInfoWin *v17; // ecx@25
  NiRefObjectVtbl **v18; // ebx@29
  NiRefObjectVtbl *v19; // edi@29
  char v20; // al@29
  SpEffect *v21; // ecx@30

  v2 = this;
  v3 = this->m_apkItemIconWin[2];
  if ( v3->m_uiSenderInvIndex == -1 || !v3 )
  {
    if ( (unsigned __int8)((int (__stdcall *)(unsigned int, int))v3->vfptr[83].__vecDelDtor)(
                            PgWin::ms_iMsX,
                            PgWin::ms_iMsY) )
    {
      v4 = Item::Create(v2->m_uiAddItemID);
      v5 = (ItemInfoWin *)v2->m_apkItemIconWin[2]->m_pkToolTipWin;
      if ( v5 )
      {
        if ( v4 )
          ItemInfoWin::SetItemInfo(v5, v4);
      }
    }
  }
  v6 = v2->m_apkItemIconWin[0];
  if ( v6->m_uiSenderInvIndex != -1 && v6 || (v7 = v2->m_apkItemIconWin[1], v7->m_uiSenderInvIndex != -1) && v7 )
  {
    if ( (unsigned __int8)((int (__stdcall *)(unsigned int, int))v2->m_apkItemIconWin[3]->vfptr[83].__vecDelDtor)(
                            PgWin::ms_iMsX,
                            PgWin::ms_iMsY) )
    {
      if ( v2->m_uiResultItemID != -1 )
      {
        v8 = Item::Create(v2->m_uiResultItemID);
        v9 = (ItemInfoWin *)v2->m_apkItemIconWin[3]->m_pkToolTipWin;
        if ( v9 )
        {
          if ( v8 )
            ItemInfoWin::SetItemInfo(v9, v8);
        }
      }
    }
    if ( (unsigned __int8)((int (__stdcall *)(unsigned int, int))v2->m_apkItemIconWin[0]->vfptr[83].__vecDelDtor)(
                            PgWin::ms_iMsX,
                            PgWin::ms_iMsY) )
    {
      v10 = v2->m_apkItemIconWin[0];
      if ( v10->m_uiSenderInvIndex == -1 || !v10 )
      {
        v11 = ItemIcon::GetItemID((ItemIcon *)&v2->m_apkItemIconWin[1]->vfptr);
        v12 = Item::Create(v11);
        v13 = (ItemInfoWin *)v2->m_apkItemIconWin[0]->m_pkToolTipWin;
        if ( v13 )
        {
          if ( v12 )
            ItemInfoWin::SetItemInfo(v13, v12);
        }
      }
    }
    if ( (unsigned __int8)((int (__stdcall *)(unsigned int, int))v2->m_apkItemIconWin[1]->vfptr[83].__vecDelDtor)(
                            PgWin::ms_iMsX,
                            PgWin::ms_iMsY) )
    {
      v14 = v2->m_apkItemIconWin[1];
      if ( v14->m_uiSenderInvIndex == -1 || !v14 )
      {
        v15 = ItemIcon::GetItemID((ItemIcon *)&v2->m_apkItemIconWin[0]->vfptr);
        v16 = Item::Create(v15);
        v17 = (ItemInfoWin *)v2->m_apkItemIconWin[1]->m_pkToolTipWin;
        if ( v17 )
        {
          if ( v16 )
            ItemInfoWin::SetItemInfo(v17, v16);
        }
      }
    }
  }
  if ( !(unsigned __int8)((int (*)(void))v2->m_pkMixBtn->vfptr[61].__vecDelDtor)() )
  {
    v18 = &v2->m_pkMixSpr.m_pObject->vfptr;
    v19 = *v18;
    v20 = ((int (*)(void))v2->m_pkMixBtn->vfptr[61].__vecDelDtor)();
    v19[60].__vecDelDtor((NiRefObject *)v18, v20 == 0);
  }
  v21 = v2->m_apkEffect;
  if ( v21->m_bLive )
    SpEffect::Update(v21, fCurTime);
  else
    SpEffect::End(v21, v2->m_pAttachEffect.m_pObject);
}

//----- (0041FBF0) --------------------------------------------------------
void __thiscall ItemMixWin::ResetAddItemIcon(ItemMixWin *this)
{
  MixItemIcon::SetTemporaryIcon(this->m_apkItemIconWin[2], this->m_uiAddItemID);
}

//----- (0041FC10) --------------------------------------------------------
void __thiscall ItemMixWin::SetDisableMixButton(ItemMixWin *this, bool bDisable)
{
  ItemMixWin *v2; // esi@1
  NiRefObjectVtbl **v3; // ebx@1
  NiRefObjectVtbl *v4; // edi@1
  char v5; // al@1

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkMixBtn->vfptr[60].__vecDelDtor)(bDisable == 0);
  v3 = &v2->m_pkMixSpr.m_pObject->vfptr;
  v4 = *v3;
  v5 = ((int (*)(void))v2->m_pkMixBtn->vfptr[61].__vecDelDtor)();
  v4[60].__vecDelDtor((NiRefObject *)v3, v5 == 0);
}

//----- (0041FC70) --------------------------------------------------------
void __thiscall ItemMixWin::OnCancel(ItemMixWin *this)
{
  if ( this->m_pkMsgBox )
    this->m_pkMsgBox = 0;
  GameFrameWork::OnCloseItemMixWin((GameFrameWork *)this->m_pkFrameWork, 1);
}

//----- (0041FCA0) --------------------------------------------------------
void __thiscall ItemMixWin::DirectMessage(ItemMixWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  ItemMixWin *v4; // esi@1
  NiTListBase<NiTPointerAllocator<unsigned int>,NiDynamicEffect *>Vtbl *v5; // ecx@4
  void (__stdcall *v6)(_DWORD); // edx@4
  NiTListItem<NiDynamicEffect *> *v7; // ecx@4
  NiTListItem<NiDynamicEffect *> *v8; // edx@4
  NiTListItem<NiDynamicEffect *> *v9; // ecx@4
  NiTListItem<NiDynamicEffect *> *v10; // edx@4
  unsigned int v11; // ecx@4
  void (__stdcall *v12)(_DWORD); // edx@4

  v4 = this;
  if ( iMsgTag == 27 && pvBody && !*(_DWORD *)pvBody )
  {
    v5 = this->m_kEffectList.vfptr;
    v6 = (void (__stdcall *)(_DWORD))*((_DWORD *)v5->__vecDelDtor + 60);
    LOBYTE(v5[37].NewItem) = 1;
    v6(0);
    v7 = v4->m_kEffectList.m_pkHead;
    v8 = v7->m_pkNext[20].m_pkNext;
    LOBYTE(v7[37].m_pkPrev) = 1;
    ((void (__stdcall *)(_DWORD))v8)(0);
    v9 = v4->m_kEffectList.m_pkTail;
    v10 = v9->m_pkNext[20].m_pkNext;
    LOBYTE(v9[37].m_pkPrev) = 1;
    ((void (__stdcall *)(_DWORD))v10)(0);
    v11 = v4->m_kEffectList.m_kAllocator.m_uiCount;
    v12 = *(void (__stdcall **)(_DWORD))(*(_DWORD *)v11 + 240);
    *(_BYTE *)(v11 + 448) = 1;
    v12(0);
    GameFrameWork::NcItemMixItemReq(
      (GameFrameWork *)LODWORD(v4->m_kLocal.m_Rotate.m_pEntry[1][0]),
      LODWORD(v4->m_kBound.m_kCenter.x),
      LODWORD(v4->m_kBound.m_kCenter.y),
      LODWORD(v4->m_kBound.m_kCenter.z));
    v4->m_iHeight = 0;
  }
}

//----- (0041FD60) --------------------------------------------------------
void __thiscall MixItemIcon::DoAction(MixItemIcon *this)
{
  MixItemIcon *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiInvIndex);
}

//----- (0041FD90) --------------------------------------------------------
void __thiscall MixItemIcon::DoRAction(MixItemIcon *this)
{
  MixItemIcon *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiInvIndex);
}

//----- (0041FDC0) --------------------------------------------------------
void __thiscall ItemMixWin::OnApply(ItemMixWin *this)
{
  ItemMixWin *v1; // esi@1
  Item *v2; // eax@7
  int v3; // ST0C_4@8
  char *v4; // eax@8
  char *v5; // eax@8
  MsgBox *v6; // eax@8

  v1 = this;
  if ( ItemIcon::GetItem((ItemIcon *)&this->m_apkItemIconWin[0]->vfptr) )
    v1->m_uiSlotItemInvNum[0] = LOBYTE(v1->m_apkItemIconWin[0]->m_uiSenderInvIndex);
  if ( ItemIcon::GetItem((ItemIcon *)&v1->m_apkItemIconWin[1]->vfptr) )
    v1->m_uiSlotItemInvNum[1] = LOBYTE(v1->m_apkItemIconWin[1]->m_uiSenderInvIndex);
  if ( ItemIcon::GetItem((ItemIcon *)&v1->m_apkItemIconWin[2]->vfptr) )
    v1->m_uiSlotItemInvNum[2] = LOBYTE(v1->m_apkItemIconWin[2]->m_uiSenderInvIndex);
  v2 = ItemIcon::GetItem((ItemIcon *)&v1->m_apkItemIconWin[3]->vfptr);
  if ( v2 )
  {
    v3 = (int)v2->m_pkInfo->Name;
    v4 = (char *)TextData3::Get(0x6C8BA3D6u);
    v5 = fs(v4, v3);
    v6 = MsgBox::Modal(MSGBOX_OKCANCEL, v5);
    v1->m_pkMsgBox = v6;
    ((void (__stdcall *)(_DWORD))v6->vfptr->SetMsgHooker)(&v1->vfptr);
  }
}

//----- (0041FE80) --------------------------------------------------------
void __thiscall ItemMixWin::~ItemMixWin(ItemMixWin *this)
{
  ItemMixWin *v1; // esi@1
  SpEffect *v2; // edi@1
  NiNode *v3; // ebx@2
  NiNode *v4; // edi@7
  PgWinSpr *v5; // edi@11

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ItemMixWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ItemMixWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_apkEffect;
  if ( v2 )
  {
    NsEffect::~NsEffect(&v2->m_kEffect);
    ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v2->m_kMarkCheck);
    v3 = v2->m_spEffect.m_pObject;
    if ( v2->m_spEffect.m_pObject && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    operator delete(v2);
    v1->m_apkEffect = 0;
  }
  v4 = v1->m_pAttachEffect.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v5 = v1->m_pkMixSpr.m_pObject;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  v1->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9734E0: using guessed type void (__thiscall *ItemMixWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9734FC: using guessed type int (__thiscall *ItemMixWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0041FFB0) --------------------------------------------------------
MixItemIcon *__cdecl MixItemIcon::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork)
{
  PgWin *v5; // eax@1
  PgWin *v6; // eax@2
  PgWin *v7; // esi@2
  PgWin *v8; // edi@8
  MixItemIcon *v9; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v11; // [sp+20h] [bp-4h]@1

  v5 = (PgWin *)operator new(0x1DCu);
  result.m_pObject = v5;
  v11 = 0;
  if ( v5 )
  {
    MixItemIcon::MixItemIcon((MixItemIcon *)v5);
    v7 = v6;
  }
  else
  {
    v7 = 0;
  }
  if ( v7 )
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  v11 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v7);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, PgWin *, PgFrameWork *))v7->vfptr[154].__vecDelDtor)(
                          v7,
                          iXPos,
                          iYPos,
                          uiInvIndex,
                          pkParent,
                          pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v7->vfptr[89].__vecDelDtor)(v7);
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = (MixItemIcon *)v7;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v7);
    if ( result.m_pObject )
    {
      v8 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v8 )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      }
    }
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = 0;
  }
  return v9;
}

//----- (004200F0) --------------------------------------------------------
void __thiscall ItemMixWin::ItemMixWin(ItemMixWin *this)
{
  ItemMixWin *v1; // esi@1
  int v2; // edi@1
  __int16 v3; // ax@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v4; // [sp-1Ch] [bp-40h]@1
  int v5; // [sp-Ch] [bp-30h]@1
  signed int v6; // [sp-8h] [bp-2Ch]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v7; // [sp+10h] [bp-14h]@1
  ItemMixWin *v8; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v1 = this;
  v8 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ItemMixWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ItemMixWin::`vftable'{for `IDirectMessenger'};
  v9 = 0;
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  v1->m_kDrop.m_pkContents = 0;
  v1->m_kDrop.m_pkSender = 0;
  v2 = (int)&v1->m_kDropContents;
  *(_DWORD *)v2 = &DropContents::`vftable';
  *(_WORD *)(v2 + 60) = -1;
  *(_DWORD *)(v2 + 64) = 0;
  v1->m_pkMixSpr.m_pObject = 0;
  v1->m_apkEffect = 0;
  v1->m_pAttachEffect.m_pObject = 0;
  v7 = &v4;
  v1->m_pkMsgBox = 0;
  v6 = 15;
  v5 = 0;
  LOBYTE(v9) = 4;
  v4._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v4, "MixMinUpgrade", 0xDu);
  v1->m_uiMinMixItemLevel = (unsigned __int16)CSingleDataMap::GetValue(&g_kSingleDataMap, v4);
  v7 = &v4;
  v6 = 15;
  v5 = 0;
  v4._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v4, "AddMixItem", 0xAu);
  v3 = CSingleDataMap::GetValue(&g_kSingleDataMap, v4);
  v1->m_uiResultItemID = -1;
  v1->m_kDrop.m_pkContents = &v1->m_kDropContents;
  v1->m_uiAddItemID = (unsigned __int16)v3;
  v1->m_uiSlotItemInvNum[0] = 255;
  v1->m_uiSlotItemInvNum[1] = 255;
  v1->m_uiSlotItemInvNum[2] = 255;
  v1->m_uiSlotItemInvNum[3] = 255;
  v1->m_apkItemIconWin[0] = 0;
  v1->m_apkItemIconWin[1] = 0;
  v1->m_apkItemIconWin[2] = 0;
  v1->m_apkItemIconWin[3] = 0;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9734E0: using guessed type void (__thiscall *ItemMixWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9734FC: using guessed type int (__thiscall *ItemMixWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00420240) --------------------------------------------------------
ItemMixWin *__cdecl ItemMixWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  ItemMixWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1F0u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    ItemMixWin::ItemMixWin((ItemMixWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (ItemMixWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00420370) --------------------------------------------------------
void __thiscall ItemMixWin::SetResultItemSlot(ItemMixWin *this, Item *pMaterialItem)
{
  ItemMixWin *v2; // edi@1
  ItemInfo *v3; // eax@2
  char *v4; // eax@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v5; // eax@5
  ItemInfo *v6; // esi@5
  MixItemIcon *v7; // ecx@8

  v2 = this;
  if ( pMaterialItem )
  {
    v3 = pMaterialItem->m_pkInfo;
    if ( v3 )
      v4 = v3->InxName;
    else
      v4 = 0;
    v5 = ItemMixDataTab::GetResultItem(&g_kItemMixDataTab, v4);
    v6 = ItemInfoTab::GetByInxName(v5->_Bx._Buf);
    if ( v6 )
      MixItemIcon::SetTemporaryIcon(v2->m_apkItemIconWin[3], v6->ID);
    v2->m_uiResultItemID = v6->ID;
  }
  else
  {
    v7 = this->m_apkItemIconWin[3];
    v2->m_uiResultItemID = -1;
    MixItemIcon::ReSetSlot(v7);
    v2->m_uiSlotItemInvNum[3] = 255;
  }
}

//----- (004203F0) --------------------------------------------------------
char __userpurge ItemMixWin::DropItemSlot@<al>(ItemMixWin *this@<ecx>, unsigned int a2@<esi>, unsigned int _uiReceiverInvIndex, PgWinDrop *_pkDrop)
{
  void *v4; // eax@1
  ItemMixWin *v5; // edi@1
  Item *v7; // ebx@3
  MixItemIcon *v8; // esi@8
  Item *v9; // eax@9
  GameFrameWork *v10; // edi@9
  int v11; // ST04_4@9
  char *v12; // eax@9
  const char *v13; // eax@9
  ItemInfo *v14; // eax@10
  char *v15; // eax@11
  int v16; // eax@15
  GameFrameWork *v17; // edi@16
  int v18; // ST04_4@16
  char *v19; // eax@16
  const char *v20; // eax@16
  ItemIcon *v21; // ecx@18
  MixItemIcon *v22; // eax@23
  MixItemIcon *v23; // eax@25
  MixItemIcon *v24; // eax@27
  Item *v25; // eax@31
  GameFrameWork *v26; // edi@33
  NiUnsharedGeometryGroup *v27; // eax@33
  unsigned int v28; // [sp-4h] [bp-10h]@14
  DropContents *pkContents; // [sp+4h] [bp-8h]@1
  int iLevel; // [sp+8h] [bp-4h]@5
  unsigned int _uiReceiverInvIndexa; // [sp+14h] [bp+8h]@31

  v4 = _pkDrop->m_pkContents;
  v5 = this;
  pkContents = (DropContents *)v4;
  if ( !v4 )
    return 0;
  v7 = (Item *)*((_DWORD *)v4 + 5);
  if ( !v7 )
    return 0;
  iLevel = (int)v7->vfptr[9].__vecDelDtor((NiRefObject *)v7, a2);
  if ( _uiReceiverInvIndex && _uiReceiverInvIndex != 1 )
  {
    if ( _uiReceiverInvIndex == 2 )
    {
      v8 = v5->m_apkItemIconWin[2];
      if ( v7->m_kStruct.itemid != v5->m_uiAddItemID )
      {
        v9 = Item::Create(v5->m_uiAddItemID);
        v10 = (GameFrameWork *)v5->m_pkFrameWork;
        v11 = (int)v9->m_pkInfo->Name;
        v12 = (char *)TextData3::Get(0x9EF2D52B);
        v13 = fs(v12, v11);
        GameFrameWork::AddSysMsg(v10, v13);
        return 0;
      }
      goto LABEL_23;
    }
    return 0;
  }
  v14 = v7->m_pkInfo;
  if ( v14 )
    v15 = v14->InxName;
  else
    v15 = 0;
  if ( !ItemMixDataTab::IsMixItem(&g_kItemMixDataTab, v15) )
  {
    v28 = 1805354864;
LABEL_33:
    v26 = (GameFrameWork *)v5->m_pkFrameWork;
    v27 = TextData3::Get(v28);
    GameFrameWork::AddSysMsg(v26, (const char *)v27);
    return 0;
  }
  v16 = v5->m_uiMinMixItemLevel;
  if ( iLevel < v16 )
  {
    v17 = (GameFrameWork *)v5->m_pkFrameWork;
    v18 = v16;
    v19 = (char *)TextData3::Get(0xBD1B1B26);
    v20 = fs(v19, v18);
    GameFrameWork::AddSysMsg(v17, v20);
    return 0;
  }
  if ( _uiReceiverInvIndex )
  {
    v8 = v5->m_apkItemIconWin[1];
    v21 = (ItemIcon *)&v5->m_apkItemIconWin[0]->vfptr;
  }
  else
  {
    v8 = v5->m_apkItemIconWin[0];
    v21 = (ItemIcon *)&v5->m_apkItemIconWin[1]->vfptr;
  }
  if ( v21[1].m_spControllers.m_pObject != (NiTimeController *)-1 && v21 )
  {
    _uiReceiverInvIndexa = (unsigned int)v7->vfptr;
    v25 = ItemIcon::GetItem(v21);
    if ( !(unsigned __int8)(*(int (__thiscall **)(Item *, Item *))(_uiReceiverInvIndexa + 24))(v7, v25) )
    {
      v28 = 1236852936;
      goto LABEL_33;
    }
  }
  else
  {
    MixItemIcon::SetTemporaryIcon((MixItemIcon *)v21, v7->m_kStruct.itemid);
    ItemMixWin::SetResultItemSlot(v5, v7);
  }
LABEL_23:
  MixItemIcon::ReSetSlot(v8);
  v8->m_uiSenderType = pkContents->m_eSenderType;
  v8->m_uiSenderInvIndex = pkContents->m_uiSenderIndex;
  v8->m_pkSender = _pkDrop->m_pkSender;
  MixItemIcon::SetSenderInvSlotLock(v8, 1);
  ItemIcon::SetItem((ItemIcon *)&v8->vfptr, v7, 1);
  v22 = v5->m_apkItemIconWin[0];
  if ( v22->m_uiSenderInvIndex != -1 )
  {
    if ( v22 )
    {
      v23 = v5->m_apkItemIconWin[1];
      if ( v23->m_uiSenderInvIndex != -1 )
      {
        if ( v23 )
        {
          v24 = v5->m_apkItemIconWin[2];
          if ( v24->m_uiSenderInvIndex != -1 )
          {
            if ( v24 )
            {
              ItemMixWin::SetDisableMixButton(v5, 0);
              MixItemIcon::SetTransparency(v5->m_apkItemIconWin[3]);
            }
          }
        }
      }
    }
  }
  return 1;
}

//----- (00420620) --------------------------------------------------------
void __thiscall ItemMixWin::ResetAllData(ItemMixWin *this)
{
  ItemMixWin *v1; // esi@1
  MixItemIcon *v2; // ecx@1

  v1 = this;
  MixItemIcon::ReSetSlot(this->m_apkItemIconWin[0]);
  MixItemIcon::ReSetSlot(v1->m_apkItemIconWin[1]);
  MixItemIcon::ReSetSlot(v1->m_apkItemIconWin[2]);
  v2 = v1->m_apkItemIconWin[3];
  v1->m_uiSlotItemInvNum[0] = 255;
  v1->m_uiSlotItemInvNum[1] = 255;
  v1->m_uiSlotItemInvNum[2] = 255;
  v1->m_uiResultItemID = -1;
  MixItemIcon::ReSetSlot(v2);
  v1->m_uiSlotItemInvNum[3] = 255;
}

//----- (00420680) --------------------------------------------------------
void __thiscall ItemMixWin::ShowMixResult(ItemMixWin *this, bool bSuccess)
{
  ItemMixWin *v2; // esi@1
  MixItemIcon *v3; // ecx@1
  int v4; // ebx@2
  int v5; // edi@2
  Item *v6; // eax@4
  Item *v7; // eax@7
  char *v8; // eax@9
  const char *v9; // eax@9
  NiRefObjectVtbl **v10; // ebx@9
  NiRefObjectVtbl *v11; // edi@9
  char v12; // al@9
  void *(__thiscall *v13)(NiRefObject *, unsigned int); // eax@10
  MixItemIcon *v14; // ecx@10
  void *(__thiscall *v15)(NiRefObject *, unsigned int); // eax@10
  MixItemIcon *v16; // ecx@10
  void *(__thiscall *v17)(NiRefObject *, unsigned int); // eax@10
  MixItemIcon *v18; // ecx@10
  void *(__thiscall *v19)(NiRefObject *, unsigned int); // eax@10
  GameFrameWork *bSuccessa; // [sp+Ch] [bp+8h]@9

  v2 = this;
  v3 = this->m_apkItemIconWin[0];
  if ( bSuccess == 1 )
  {
    v4 = 0;
    v5 = 0;
    if ( v3->m_uiSenderInvIndex != -1 )
    {
      if ( v3 )
      {
        v6 = ItemIcon::GetItem((ItemIcon *)&v3->vfptr);
        if ( v6 )
          v4 = (int)v6->m_pkInfo->Name;
      }
    }
    if ( v2->m_uiResultItemID != -1 )
    {
      v7 = Item::Create(v2->m_uiResultItemID);
      if ( v7 )
        v5 = (int)v7->m_pkInfo->Name;
    }
    SpEffect::Start(v2->m_apkEffect, v2->m_pAttachEffect.m_pObject);
    bSuccessa = (GameFrameWork *)v2->m_pkFrameWork;
    v8 = (char *)TextData3::Get(0x78FFDAE2u);
    v9 = fs(v8, v4, v5);
    GameFrameWork::AddSysMsg(bSuccessa, v9);
    ItemMixWin::ResetAllData(v2);
    MixItemIcon::SetTemporaryIcon(v2->m_apkItemIconWin[2], v2->m_uiAddItemID);
    ((void (__stdcall *)(_DWORD))v2->m_pkMixBtn->vfptr[60].__vecDelDtor)(0);
    v10 = &v2->m_pkMixSpr.m_pObject->vfptr;
    v11 = *v10;
    v12 = ((int (*)(void))v2->m_pkMixBtn->vfptr[61].__vecDelDtor)();
    v11[60].__vecDelDtor((NiRefObject *)v10, v12 == 0);
  }
  else
  {
    v13 = v3->vfptr[60].__vecDelDtor;
    v3->m_bLock = 0;
    ((void (__stdcall *)(signed int))v13)(1);
    v14 = v2->m_apkItemIconWin[1];
    v15 = v14->vfptr[60].__vecDelDtor;
    v14->m_bLock = 0;
    ((void (__stdcall *)(signed int))v15)(1);
    v16 = v2->m_apkItemIconWin[2];
    v17 = v16->vfptr[60].__vecDelDtor;
    v16->m_bLock = 0;
    ((void (__stdcall *)(signed int))v17)(1);
    v18 = v2->m_apkItemIconWin[3];
    v19 = v18->vfptr[60].__vecDelDtor;
    v18->m_bLock = 0;
    ((void (__stdcall *)(signed int))v19)(1);
  }
}

//----- (004207E0) --------------------------------------------------------
void __thiscall ItemMixWin::OnSlotLClick(ItemMixWin *this, unsigned int _uiSlotIndex)
{
  ItemMixWin *v2; // esi@1
  MixItemIcon *v3; // ebx@2
  MixItemIcon *v4; // edi@2
  Item *v5; // eax@15
  unsigned int v6; // ecx@16
  MixItemIcon *v7; // ecx@22
  signed __int16 v8; // ST00_2@23
  NiRefObjectVtbl **v9; // ebx@24
  NiRefObjectVtbl *v10; // edi@24
  char v11; // al@24
  bool bOtherItemSetting; // [sp+Fh] [bp-1h]@1

  v2 = this;
  bOtherItemSetting = 1;
  if ( !_uiSlotIndex )
  {
    v3 = this->m_apkItemIconWin[0];
    v4 = this->m_apkItemIconWin[1];
LABEL_5:
    if ( v4->m_uiSenderInvIndex == -1 || !v4 )
      bOtherItemSetting = 0;
    goto LABEL_14;
  }
  if ( _uiSlotIndex == 1 )
  {
    v3 = this->m_apkItemIconWin[1];
    v4 = this->m_apkItemIconWin[0];
    goto LABEL_5;
  }
  if ( _uiSlotIndex != 2 )
    return;
  v3 = this->m_apkItemIconWin[2];
  if ( v3->m_uiSenderInvIndex == -1 || !v3 )
    return;
  v4 = this->m_apkItemIconWin[0];
  if ( v4->m_uiSenderInvIndex == -1 || !v4 )
    v4 = this->m_apkItemIconWin[1]->m_uiSenderInvIndex != -1 ? this->m_apkItemIconWin[1] : 0;
LABEL_14:
  if ( v3 )
  {
    v5 = ItemIcon::GetItem((ItemIcon *)&v3->vfptr);
    if ( v5 )
    {
      v2->m_kDropContents.m_eSenderType = v3->m_uiSenderType;
      v2->m_kDropContents.m_eType = 0;
      v6 = v3->m_uiSenderInvIndex;
      v2->m_kDropContents.m_apvParam[0] = v5;
      v2->m_kDropContents.m_uiSenderIndex = v6;
      v2->m_kDropContents.m_apvParam[1] = 0;
      v2->m_kDropContents.m_uiLot = ((int (__thiscall *)(Item *))v5->vfptr[3].__vecDelDtor)(v5);
      v2->m_kDrop.m_pkSender = v3->m_pkSender;
      PgCursor::ms_pkDrop = &v2->m_kDrop;
      MixItemIcon::ReSetSlot(v3);
      if ( _uiSlotIndex && _uiSlotIndex != 1 )
      {
        if ( !v4 )
          ItemMixWin::ResetAllData(v2);
        MixItemIcon::ReSetSlot(v3);
        MixItemIcon::SetTemporaryIcon(v2->m_apkItemIconWin[2], v2->m_uiAddItemID);
      }
      else if ( bOtherItemSetting )
      {
        v8 = ItemIcon::GetItemID((ItemIcon *)&v4->vfptr);
        MixItemIcon::SetTemporaryIcon(v3, v8);
      }
      else
      {
        MixItemIcon::ReSetSlot(v4);
        v7 = v2->m_apkItemIconWin[3];
        v2->m_uiResultItemID = -1;
        MixItemIcon::ReSetSlot(v7);
        v2->m_uiSlotItemInvNum[3] = 255;
      }
      MixItemIcon::SetTranslucence(v2->m_apkItemIconWin[3]);
      ((void (__stdcall *)(_DWORD))v2->m_pkMixBtn->vfptr[60].__vecDelDtor)(0);
      v9 = &v2->m_pkMixSpr.m_pObject->vfptr;
      v10 = *v9;
      v11 = ((int (*)(void))v2->m_pkMixBtn->vfptr[61].__vecDelDtor)();
      v10[60].__vecDelDtor((NiRefObject *)v9, v11 == 0);
    }
  }
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (004209A0) --------------------------------------------------------
void __thiscall ItemMixWin::OnClose(ItemMixWin *this)
{
  ItemMixWin *v1; // esi@1
  MsgBox *v2; // ecx@1

  v1 = this;
  v2 = this->m_pkMsgBox;
  if ( v2 )
  {
    MsgBox::Close(v2);
    v1->m_pkMsgBox = 0;
  }
  SpEffect::End(v1->m_apkEffect, v1->m_pAttachEffect.m_pObject);
  ItemMixWin::ResetAllData(v1);
}

//----- (004209E0) --------------------------------------------------------
char __thiscall MixItemIcon::EatDropInstance(MixItemIcon *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  MixItemIcon *v4; // esi@1
  _DWORD *v6; // eax@4
  int v7; // ecx@5
  GameFrameWork *v8; // esi@6
  NiUnsharedGeometryGroup *v9; // eax@6
  ItemMixWin *v10; // eax@9

  v4 = this;
  if ( this->m_bLock )
  {
    PgCursor::ms_bKeepDrop = 1;
    return 0;
  }
  if ( *pkDrop )
  {
    v6 = (*pkDrop)->m_pkContents;
    if ( !v6[4] )
    {
      v7 = v6[2];
      if ( v7 == 1 )
      {
        v8 = (GameFrameWork *)v4->m_pkFrameWork;
        v9 = TextData3::Get(0x6A928276u);
        GameFrameWork::AddSysMsg(v8, (const char *)v9);
        return 0;
      }
      if ( !v7 )
      {
        if ( v6[5] )
        {
          v10 = (ItemMixWin *)PgWin::GetParentWin((PgWin *)&v4->vfptr);
          if ( ItemMixWin::DropItemSlot(v10, (unsigned int)v4, v4->m_uiInvIndex, *pkDrop) )
          {
            MixItemIcon::SetTransparency(v4);
            return 1;
          }
        }
      }
    }
    PgCursor::ms_bKeepDrop = 1;
  }
  return 0;
}
// B648B8: using guessed type bool PgCursor::ms_bKeepDrop;

//----- (00420A80) --------------------------------------------------------
char __thiscall ItemMixWin::Create(ItemMixWin *this, PgFrameWork *pkFrameWork)
{
  ItemMixWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  char result; // al@9
  int v8; // edi@10
  int v9; // ebx@10
  NiSourceTexture *v10; // eax@10
  PgSprData *v11; // eax@11
  NiSourceTexture *v12; // eax@13
  PgSprData *v13; // eax@13
  PgSprData *v14; // eax@13
  D3DXCOLOR v15; // ST44_16@13
  char *v16; // eax@13
  D3DXCOLOR v17; // ST44_16@13
  char *v18; // eax@13
  PgWinBut *v19; // ecx@13
  PgWinSpr *v20; // eax@13
  PgWinSpr *v21; // ecx@13
  char *v22; // eax@21
  PgSprData *v23; // eax@21
  char *v24; // eax@21
  MixItemIcon *v25; // eax@21
  PgSprData *v26; // eax@21
  char *v27; // eax@21
  MixItemIcon *v28; // eax@21
  PgSprData *v29; // eax@21
  PgWinSpr *v30; // eax@21
  NiRefObjectVtbl *v31; // edx@21
  MixItemIcon *v32; // eax@21
  PgSprData *v33; // eax@21
  PgWinSpr *v34; // eax@21
  NiRefObjectVtbl *v35; // edx@21
  char *v36; // eax@23
  MixItemIcon *v37; // eax@23
  const char *v38; // eax@25
  NiNode *v39; // esi@26
  SpEffect *v40; // edi@31
  NiNode *v41; // eax@32
  SpEffect *v42; // eax@32
  NiNode *v43; // eax@35
  NiRefObjectVtbl **v44; // ebx@36
  NiRefObjectVtbl *v45; // edi@36
  char v46; // al@36
  NiNode *v47; // esi@37
  NiNode *v48; // esi@40
  UIUtil ui; // [sp+68h] [bp-50h]@10
  float v50; // [sp+7Ch] [bp-3Ch]@35
  float v51; // [sp+80h] [bp-38h]@35
  float v52; // [sp+84h] [bp-34h]@35
  PgSprData *pkSprData; // [sp+88h] [bp-30h]@21
  PgWinSpr *FirstSlot; // [sp+8Ch] [bp-2Ch]@13
  int iXPos; // [sp+90h] [bp-28h]@13
  int iYPos; // [sp+94h] [bp-24h]@13
  NiPointer<NiNode> pkNiNodePtr; // [sp+98h] [bp-20h]@23
  PgWinSpr *EffectSlot; // [sp+9Ch] [bp-1Ch]@13
  NiPointer<NiNode> spNode; // [sp+A0h] [bp-18h]@1
  int iLeft; // [sp+A4h] [bp-14h]@4
  int iTop; // [sp+A8h] [bp-10h]@4
  int v62; // [sp+B4h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v62 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\ItemMix.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iLeft, &iTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "ItemMixWin", 0) )
  {
    v6 = spNode.m_pObject;
    v62 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = iLeft;
  v9 = iTop;
  UIUtil::UIUtil(&ui);
  LOBYTE(v62) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, v8, v9);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft - v8, iTop - v9, v11, (PgWin *)&v2->vfptr, 0, 0);
  v12 = MenuTexMgr::GetTexture(0x1Du);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plan01", &iLeft, &iTop, v12);
  PgWinSpr::CreateWin(iLeft - v8, iTop - v9, v13, (PgWin *)&v2->vfptr, 0, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft - v8, iTop - v9, v14, (PgWin *)&v2->vfptr, 0, 0);
  UIUtil::CreateSpr(&ui, "Panel01", 0);
  *(_QWORD *)&v15.r = *(_QWORD *)&Color::m_kDxWinTitleColor.r;
  *(_QWORD *)&v15.b = qword_A696E8;
  v16 = (char *)TextData3::Get(0x36483349u);
  UIUtil::CreateTextNoSpr(&ui, "WinTitle", v16, v15, 5u);
  UIUtil::CreateBtn(&ui, 0xDu, "ClsNor", "ClsOver", "ClsClick", 0, 0);
  v2->m_pkMixBtn = UIUtil::CreateBtn(&ui, 0xCu, "OkNor", "OkClick", "OkOver", "OkDisable", 0);
  *(_QWORD *)&v17.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v17.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v18 = (char *)TextData3::Get(0x7D90A894u);
  UIUtil::CreateAttachedText((PgWin *)&v2->m_pkMixBtn->vfptr, v18, v17, 5u);
  v19 = v2->m_pkMixBtn;
  iXPos = 0;
  iYPos = 0;
  ((void (__stdcall *)(int *, int *))v19->vfptr[45].__vecDelDtor)(&iXPos, &iYPos);
  v20 = UIUtil::CreateSpr(&ui, "OkNor", 0);
  v21 = v2->m_pkMixSpr.m_pObject;
  EffectSlot = v20;
  FirstSlot = v21;
  if ( v21 != v20 )
  {
    if ( v21 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v21->m_uiRefCount) && FirstSlot )
        ((void (__stdcall *)(signed int))FirstSlot->vfptr->__vecDelDtor)(1);
      v20 = EffectSlot;
    }
    v2->m_pkMixSpr.m_pObject = v20;
    if ( v20 )
      InterlockedIncrement((volatile LONG *)&v20->m_uiRefCount);
  }
  ((void (__stdcall *)(int, int))v2->m_pkMixSpr.m_pObject->vfptr[77].__vecDelDtor)(iXPos, iYPos);
  v2->m_pkMixSpr.m_pObject->m_pkToolTipWin = g_pkToolTipWin;
  FirstSlot = v2->m_pkMixSpr.m_pObject;
  v22 = (char *)TextData3::Get(0x6DA5857Bu);
  PgWin::SetToolTipWinText((PgWin *)&FirstSlot->vfptr, v22);
  ((void (__stdcall *)(_DWORD))v2->m_pkMixSpr.m_pObject->vfptr[69].__vecDelDtor)(0.0);
  ((void (__stdcall *)(signed int))v2->m_pkMixSpr.m_pObject->vfptr[64].__vecDelDtor)(1);
  v23 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MixItemSlot01", &iLeft, &iTop, 0);
  FirstSlot = PgWinSpr::CreateWin(iLeft - v8, iTop - v9, v23, (PgWin *)&v2->vfptr, 0, 0);
  FirstSlot->m_pkToolTipWin = g_pkToolTipWin;
  v24 = (char *)TextData3::Get(0xD962211E);
  PgWin::SetToolTipWinText((PgWin *)&FirstSlot->vfptr, v24);
  v25 = MixItemIcon::CreateWin(iLeft - v8 + 1, iTop - v9 + 1, 0, (PgWin *)&v2->vfptr, pkFrameWork);
  v2->m_apkItemIconWin[0] = v25;
  v25->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
  ((void (__stdcall *)(signed int))v2->m_apkItemIconWin[0]->vfptr[129].__vecDelDtor)(11);
  ((void (__stdcall *)(signed int))v2->m_apkItemIconWin[0]->vfptr[140].__vecDelDtor)(10);
  v2->m_apkItemIconWin[0]->m_eType = 1;
  IconWin::ShowFocus((IconWin *)&v2->m_apkItemIconWin[0]->vfptr, 1);
  v26 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MixItemSlot02", &iLeft, &iTop, 0);
  FirstSlot = PgWinSpr::CreateWin(iLeft - v8, iTop - v9, v26, (PgWin *)&v2->vfptr, 0, 0);
  FirstSlot->m_pkToolTipWin = g_pkToolTipWin;
  v27 = (char *)TextData3::Get(0xD962211E);
  PgWin::SetToolTipWinText((PgWin *)&FirstSlot->vfptr, v27);
  v28 = MixItemIcon::CreateWin(iLeft - v8 + 1, iTop - v9 + 1, 1u, (PgWin *)&v2->vfptr, pkFrameWork);
  v2->m_apkItemIconWin[1] = v28;
  v28->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
  ((void (__stdcall *)(signed int))v2->m_apkItemIconWin[1]->vfptr[129].__vecDelDtor)(11);
  ((void (__stdcall *)(signed int))v2->m_apkItemIconWin[1]->vfptr[140].__vecDelDtor)(10);
  v2->m_apkItemIconWin[1]->m_eType = 1;
  IconWin::ShowFocus((IconWin *)&v2->m_apkItemIconWin[1]->vfptr, 1);
  v29 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MaterialSlot", &iLeft, &iTop, 0);
  v30 = PgWinSpr::CreateWin(iLeft - v8, iTop - v9, v29, (PgWin *)&v2->vfptr, 0, 0);
  v31 = v30->vfptr;
  FirstSlot = v30;
  v31[60].__vecDelDtor((NiRefObject *)v30, 1u);
  ((void (__stdcall *)(signed int))FirstSlot->vfptr[64].__vecDelDtor)(1);
  v32 = MixItemIcon::CreateWin(iLeft - v8 + 1, iTop - v9 + 1, 2u, (PgWin *)&v2->vfptr, pkFrameWork);
  v2->m_apkItemIconWin[2] = v32;
  v32->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
  ((void (__stdcall *)(signed int))v2->m_apkItemIconWin[2]->vfptr[129].__vecDelDtor)(11);
  ((void (__stdcall *)(signed int))v2->m_apkItemIconWin[2]->vfptr[140].__vecDelDtor)(10);
  v2->m_apkItemIconWin[2]->m_eType = 1;
  IconWin::ShowFocus((IconWin *)&v2->m_apkItemIconWin[2]->vfptr, 1);
  v33 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CplMixItem", &iLeft, &iTop, 0);
  pkSprData = v33;
  v34 = PgWinSpr::CreateWin(iLeft - v8, iTop - v9, v33, (PgWin *)&v2->vfptr, 0, 0);
  v35 = v34->vfptr;
  EffectSlot = v34;
  v35[69].__vecDelDtor((NiRefObject *)v34, COERCE_UNSIGNED_INT(0.0));
  ((void (__stdcall *)(signed int))EffectSlot->vfptr[64].__vecDelDtor)(1);
  FirstSlot = EffectSlot;
  InterlockedIncrement((volatile LONG *)&EffectSlot->m_uiRefCount);
  LOBYTE(v62) = 2;
  NiPointer<NiActorManager>::operator=(
    (NiPointer<NiPixelData> *)&v2->m_pAttachEffect,
    (NiPointer<NiPixelData> *)&FirstSlot);
  LOBYTE(v62) = 1;
  if ( !InterlockedDecrement((volatile LONG *)&EffectSlot->m_uiRefCount) )
    ((void (__stdcall *)(signed int))EffectSlot->vfptr->__vecDelDtor)(1);
  EffectSlot = PgWinSpr::CreateWin(iLeft - v8, iTop - v9, pkSprData, (PgWin *)&v2->vfptr, 0, 0);
  EffectSlot->m_pkToolTipWin = g_pkToolTipWin;
  v36 = (char *)TextData3::Get(0xD4622226);
  PgWin::SetToolTipWinText((PgWin *)&EffectSlot->vfptr, v36);
  ((void (__stdcall *)(signed int))EffectSlot->vfptr[60].__vecDelDtor)(1);
  ((void (__stdcall *)(signed int))EffectSlot->vfptr[64].__vecDelDtor)(1);
  v37 = MixItemIcon::CreateWin(iLeft - v8 + 1, iTop - v9 + 1, 3u, (PgWin *)&v2->vfptr, pkFrameWork);
  v2->m_apkItemIconWin[3] = v37;
  v37->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
  v2->m_apkItemIconWin[3]->m_bDroppable = 0;
  pkNiNodePtr.m_pObject = 0;
  LOBYTE(v62) = 3;
  if ( !Folder::m_bInit )
    Folder::Init();
  v38 = Folder::Merge(&Folder::m_acEffect, "SUCC_1.nif");
  PgUtil::LoadNodeNifFile(v38, &pkNiNodePtr, 0);
  if ( pkNiNodePtr.m_pObject )
  {
    v40 = (SpEffect *)operator new(0x44u);
    LOBYTE(v62) = 4;
    if ( v40 )
    {
      v41 = (NiNode *)NiObject::Clone((NiObject *)&pkNiNodePtr.m_pObject->vfptr);
      SpEffect::SpEffect(v40, v41);
    }
    else
    {
      v42 = 0;
    }
    LOBYTE(v62) = 3;
    v2->m_apkEffect = v42;
    if ( v42 )
    {
      v43 = v42->m_spEffect.m_pObject;
      v50 = 0.0;
      v51 = 0.0;
      v43->m_kLocal.m_Translate.x = 0.0;
      v52 = 1000.0;
      v43->m_kLocal.m_Translate.y = 0.0;
      v43->m_kLocal.m_Translate.z = 1000.0;
      v2->m_apkEffect->m_bClamp = 0;
    }
    ((void (__thiscall *)(ItemMixWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.30000001,
      0.5);
    ItemMixWin::ResetAllData(v2);
    MixItemIcon::SetTemporaryIcon(v2->m_apkItemIconWin[2], v2->m_uiAddItemID);
    ((void (__stdcall *)(_DWORD))v2->m_pkMixBtn->vfptr[60].__vecDelDtor)(0);
    v44 = &v2->m_pkMixSpr.m_pObject->vfptr;
    v45 = *v44;
    v46 = ((int (__thiscall *)(PgWinBut *))v2->m_pkMixBtn->vfptr[61].__vecDelDtor)(v2->m_pkMixBtn);
    v45[60].__vecDelDtor((NiRefObject *)v44, v46 == 0);
    LOBYTE(v62) = 1;
    if ( pkNiNodePtr.m_pObject )
    {
      v47 = pkNiNodePtr.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&pkNiNodePtr.m_pObject->m_uiRefCount) )
      {
        if ( v47 )
          v47->vfptr->__vecDelDtor((NiRefObject *)v47, 1u);
      }
    }
    LOBYTE(v62) = 0;
    UIUtil::~UIUtil(&ui);
    v48 = spNode.m_pObject;
    v62 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v48 )
      v48->vfptr->__vecDelDtor((NiRefObject *)v48, 1u);
    result = 1;
  }
  else
  {
    LOBYTE(v62) = 0;
    UIUtil::~UIUtil(&ui);
    v39 = spNode.m_pObject;
    v62 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v39 )
      v39->vfptr->__vecDelDtor((NiRefObject *)v39, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A696E8: using guessed type __int64 qword_A696E8;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00421380) --------------------------------------------------------
void __thiscall ItemMixWin::OnCommand(ItemMixWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0xBu:
      ItemMixWin::OnSlotLClick(this, lParam);
      break;
    case 0xCu:
      ItemMixWin::OnApply(this);
      break;
    case 0xDu:
      if ( this->m_pkMsgBox )
        this->m_pkMsgBox = 0;
      GameFrameWork::OnCloseItemMixWin((GameFrameWork *)this->m_pkFrameWork, 1);
      break;
    default:
      return;
  }
}

//----- (004213E0) --------------------------------------------------------
void __thiscall PgWinDrop::~PgWinDrop(PgWinDrop *this)
{
  this->vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);

//----- (004213F0) --------------------------------------------------------
PgWinDrop *__thiscall PgWinDrop::`scalar deleting destructor'(PgWinDrop *this, unsigned int a2)
{
  PgWinDrop *v2; // esi@1

  v2 = this;
  this->vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);

//----- (00421420) --------------------------------------------------------
void __thiscall DropContents::~DropContents(DropContents *this)
{
  this->vfptr = (DropContentsVtbl *)&DropContents::`vftable';
}
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);

//----- (00421430) --------------------------------------------------------
DropContents *__thiscall DropContents::`scalar deleting destructor'(DropContents *this, unsigned int a2)
{
  DropContents *v2; // esi@1

  v2 = this;
  this->vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);

//----- (00421460) --------------------------------------------------------
InvWin *__thiscall InventoryWin::GetInvWin(InventoryWin *this, unsigned int uiIndex)
{
  InvWin *result; // eax@2

  if ( uiIndex < 0xC0 )
    result = this->m_apkInvWin[uiIndex];
  else
    result = 0;
  return result;
}

//----- (00421480) --------------------------------------------------------
MixItemIcon *__thiscall MixItemIcon::`scalar deleting destructor'(MixItemIcon *this, unsigned int a2)
{
  MixItemIcon *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&MixItemIcon::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MixItemIcon::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97323C: using guessed type void (__thiscall *MixItemIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97325C: using guessed type int (__thiscall *MixItemIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (004214C0) --------------------------------------------------------
ItemMixWin *__thiscall ItemMixWin::`vector deleting destructor'(ItemMixWin *this, unsigned int a2)
{
  ItemMixWin *v2; // esi@1

  v2 = this;
  ItemMixWin::~ItemMixWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (004214F0) --------------------------------------------------------
bool __thiscall ItemMixDataTab::IsMixItem(ItemMixDataTab *this, char *pcInxName)
{
  ItemMixDataTab *v2; // esi@1
  bool v4; // [sp+Fh] [bp-2Dh]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > sRawItemIndex; // [sp+10h] [bp-2Ch]@1
  int v6; // [sp+38h] [bp-4h]@1

  v2 = this;
  sRawItemIndex._Myres = 15;
  sRawItemIndex._Mysize = 0;
  sRawItemIndex._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &sRawItemIndex,
    pcInxName,
    strlen(pcInxName));
  v6 = 0;
  v4 = ItemMixData::GetMixItemIndex((ItemMixData *)&v2->m_ItemMixDataReader, &sRawItemIndex) == 0;
  if ( sRawItemIndex._Myres >= 0x10 )
    operator delete(sRawItemIndex._Bx._Ptr);
  return v4 == 0;
}

//----- (004215A0) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall ItemMixDataTab::GetResultItem(ItemMixDataTab *this, char *pcInxName)
{
  ItemMixDataTab *v2; // esi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // esi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > sRawItemIndex; // [sp+Ch] [bp-2Ch]@1
  int v6; // [sp+34h] [bp-4h]@1

  v2 = this;
  sRawItemIndex._Myres = 15;
  sRawItemIndex._Mysize = 0;
  sRawItemIndex._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &sRawItemIndex,
    pcInxName,
    strlen(pcInxName));
  v6 = 0;
  v3 = ItemMixData::GetMixItemIndex((ItemMixData *)&v2->m_ItemMixDataReader, &sRawItemIndex);
  if ( sRawItemIndex._Myres >= 0x10 )
    operator delete(sRawItemIndex._Bx._Ptr);
  return v3;
}

//----- (00421640) --------------------------------------------------------
void __thiscall std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>::clear(std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > *this)
{
  std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > *v1; // edi@1
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *v2; // esi@1
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *v3; // ebx@2

  v1 = this;
  v2 = this->_Myhead->_Next;
  this->_Myhead->_Next = this->_Myhead;
  this->_Myhead->_Prev = this->_Myhead;
  this->_Mysize = 0;
  if ( v2 != this->_Myhead )
  {
    do
    {
      v3 = v2->_Next;
      std::_Pair_base<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>::~_Pair_base<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>((std::_Pair_base<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > *)&v2->_Myval.first);
      operator delete(v2);
      v2 = v3;
    }
    while ( v3 != v1->_Myhead );
  }
}

//----- (00421680) --------------------------------------------------------
void __thiscall std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>::~list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>(std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > *this)
{
  std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > *v1; // esi@1

  v1 = this;
  std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>::clear(this);
  operator delete(v1->_Myhead);
}

//----- (004216A0) --------------------------------------------------------
void __thiscall std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>,0>>::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>,0>>(std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> >,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > >,0> > *this, stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *_Parg, std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > *_Al)
{
  std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> >,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > >,0> > *v3; // esi@1
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *v4; // eax@1
  std::vector<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,std::allocator<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > > > *v5; // ecx@2
  stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *v6; // edx@2
  std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > > *v7; // edi@2
  std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > > *v8; // eax@2
  std::exception pExceptionObject; // [sp+10h] [bp-1Ch]@7
  std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> >,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > >,0> > *v12; // [sp+1Ch] [bp-10h]@1
  int v13; // [sp+28h] [bp-4h]@2

  v3 = this;
  v12 = this;
  this->comp = (stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >)_Parg->comp.0;
  this->_List._Mysize = 0;
  v4 = (std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *)operator new(0x30u);
  if ( !v4 )
  {
    _Parg = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Parg);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v3->_List._Myhead = v4;
  v4->_Next = v4;
  v3->_List._Myhead->_Prev = v3->_List._Myhead;
  v5 = (std::vector<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,std::allocator<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > > > *)&v3->_Vec;
  v13 = 0;
  v5->_Myfirst = 0;
  v5->_Mylast = 0;
  v5->_Myend = 0;
  v6 = (stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)v3->_List._Myhead;
  v3->_Max_bucket_size = 1.0;
  v7 = v3->_Vec._Myfirst;
  v8 = v3->_Vec._Mylast;
  LOBYTE(v13) = 1;
  _Parg = v6;
  if ( v7 != v8 )
    v3->_Vec._Mylast = v7;
  std::vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>::_Insert_n(
    v5,
    (std::_Vector_const_iterator<std::_Vector_val<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,std::allocator<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > > > >)v5->_Myfirst,
    0x10u,
    (std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *)&_Parg);
  v3->_Mask = 7;
  v3->_Maxidx = 8;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00421790) --------------------------------------------------------
void __thiscall KDTeamScoreWin::ResetScore(KDTeamScoreWin *this)
{
  char *v1; // esi@1
  signed int v2; // edi@1
  int v3; // ecx@6
  int v4; // ecx@8

  v1 = (char *)this->m_pkOneNum;
  v2 = 10;
  do
  {
    if ( *(_DWORD *)v1 )
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v1 + 256))(0);
    if ( *((_DWORD *)v1 + 10) )
      (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v1 + 30) + 256))(0);
    v3 = *((_DWORD *)v1 + 40);
    if ( v3 )
      (*(void (__stdcall **)(_DWORD))(*(_DWORD *)v3 + 256))(0);
    v4 = *((_DWORD *)v1 + 50);
    if ( v4 )
      (*(void (__stdcall **)(_DWORD))(*(_DWORD *)v4 + 256))(0);
    v1 += 4;
    --v2;
  }
  while ( v2 );
}

//----- (00421800) --------------------------------------------------------
void __thiscall KDTeamScoreWin::ResetWinFlag(KDTeamScoreWin *this)
{
  char *v1; // esi@1
  signed int v2; // edi@1
  int v3; // ecx@2

  v1 = (char *)this->m_pkFlag[1];
  v2 = 5;
  do
  {
    v3 = *((_DWORD *)v1 - 5);
    if ( v3 )
      (*(void (__stdcall **)(_DWORD))(*(_DWORD *)v3 + 256))(0);
    if ( *(_DWORD *)v1 )
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v1 + 256))(0);
    v1 += 4;
    --v2;
  }
  while ( v2 );
}

//----- (00421840) --------------------------------------------------------
void __thiscall KDTeamScoreWin::SetScore(KDTeamScoreWin *this, KQ_TEAM_TYPE uiTeam, unsigned int uiScore)
{
  KQ_TEAM_TYPE v3; // edi@1
  unsigned int v4; // esi@3
  unsigned int v5; // ebx@5
  signed int v6; // esi@5
  char *v7; // edi@5
  int v8; // ecx@6
  int v9; // ecx@10
  unsigned int nOneNumber; // [sp+Ch] [bp+8h]@5
  unsigned int nTenNumber; // [sp+10h] [bp+Ch]@5

  v3 = uiTeam;
  if ( uiTeam == KQTT_RED || uiTeam == 1 )
  {
    v4 = uiScore;
    if ( uiScore > 0x3E7 )
      v4 = 999;
    nOneNumber = v4 % 0xA;
    v5 = v4 / 0x64;
    nTenNumber = v4 % 0x64 / 0xA;
    v6 = 0;
    v7 = (char *)this->m_pkTenNum[v3];
    do
    {
      v8 = *((_DWORD *)v7 - 20);
      if ( v8 )
        (*(void (__stdcall **)(_DWORD))(*(_DWORD *)v8 + 256))(v6 == nOneNumber);
      if ( *(_DWORD *)v7 )
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v7 + 256))(v6 == nTenNumber);
      v9 = *((_DWORD *)v7 + 20);
      if ( v9 )
        (*(void (__stdcall **)(_DWORD))(*(_DWORD *)v9 + 256))(v6 == v5);
      ++v6;
      v7 += 4;
    }
    while ( v6 < 10 );
  }
}

//----- (00421920) --------------------------------------------------------
void __thiscall KDTeamScoreWin::SetWinFlag(KDTeamScoreWin *this, unsigned int uiTeam, unsigned int nWin)
{
  unsigned int v3; // ebx@4
  unsigned int v4; // esi@6
  char *v5; // edi@6

  if ( this->m_bUseRound && (!uiTeam || uiTeam == 1) )
  {
    v3 = nWin;
    if ( nWin > 5 )
      v3 = 5;
    v4 = 0;
    v5 = (char *)this->m_pkFlag[uiTeam];
    do
    {
      if ( *(_DWORD *)v5 )
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v5 + 256))(v4 < v3);
      ++v4;
      v5 += 4;
    }
    while ( v4 < 5 );
  }
}

//----- (00421980) --------------------------------------------------------
void __thiscall KDTeamScoreWin::SetUseRound(KDTeamScoreWin *this, bool bUse)
{
  KDTeamScoreWin *v2; // esi@1
  PgWinText *v3; // ecx@1
  void *(__thiscall *v4)(NiRefObject *, unsigned int); // edx@2

  v2 = this;
  v3 = this->m_pkRoundTextWin.m_pObject;
  v2->m_bUseRound = bUse;
  if ( v3 )
  {
    v4 = v3->vfptr[64].__vecDelDtor;
    if ( bUse == 1 )
    {
      ((void (__stdcall *)(_DWORD))v4)(1);
    }
    else
    {
      ((void (__stdcall *)(_DWORD))v4)(0);
      KDTeamScoreWin::ResetWinFlag(v2);
    }
  }
}

//----- (004219C0) --------------------------------------------------------
void __thiscall KDTeamScoreWin::SetTitleText(KDTeamScoreWin *this, char *acString)
{
  PgWinText *v2; // ecx@1

  v2 = this->m_pkScoreTextWin.m_pObject;
  if ( v2 )
  {
    if ( acString )
      ((void (__stdcall *)(_DWORD))v2->vfptr[118].__vecDelDtor)(acString);
  }
}

//----- (004219F0) --------------------------------------------------------
void __thiscall KDTeamScoreWin::~KDTeamScoreWin(KDTeamScoreWin *this)
{
  KDTeamScoreWin *v1; // esi@1
  PgWinText *v2; // edi@1
  PgWinText *v3; // edi@5

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&KDTeamScoreWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&KDTeamScoreWin::`vftable'{for `IDirectMessenger'};
  `eh vector destructor iterator'(
    this->m_pkFlag,
    4u,
    10,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_pkHNum,
    4u,
    20,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_pkTenNum,
    4u,
    20,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_pkOneNum,
    4u,
    20,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v2 = v1->m_pkScoreTextWin.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_pkRoundTextWin.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9737E4: using guessed type void (__thiscall *KDTeamScoreWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 973804: using guessed type int (__thiscall *KDTeamScoreWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00421B10) --------------------------------------------------------
void __thiscall KDTeamScoreWin::ResetRound(KDTeamScoreWin *this)
{
  KDTeamScoreWin *v1; // esi@1
  PgWinText *v2; // ecx@1
  NiRefObjectVtbl **v3; // esi@2
  NiRefObjectVtbl *v4; // edi@2
  char *v5; // eax@2
  char *v6; // eax@2

  v1 = this;
  v2 = this->m_pkRoundTextWin.m_pObject;
  if ( v2 )
  {
    v1->m_bUseRound = 0;
    ((void (__stdcall *)(_DWORD))v2->vfptr[64].__vecDelDtor)(0);
    KDTeamScoreWin::ResetWinFlag(v1);
    v3 = &v1->m_pkRoundTextWin.m_pObject->vfptr;
    v4 = *v3;
    v5 = (char *)TextData3::Get(0x3E5B283Cu);
    v6 = fs(v5, 1);
    v4[118].__vecDelDtor((NiRefObject *)v3, (unsigned int)v6);
  }
}

//----- (00421B70) --------------------------------------------------------
void __thiscall KDTeamScoreWin::SetRound(KDTeamScoreWin *this, unsigned int nRound)
{
  unsigned int v2; // eax@1
  PgWinText *v3; // edi@3
  NiRefObjectVtbl *v4; // esi@4
  unsigned int v5; // ST04_4@4
  char *v6; // eax@4
  char *v7; // eax@4

  v2 = nRound;
  if ( nRound > 9 )
    v2 = 9;
  v3 = this->m_pkRoundTextWin.m_pObject;
  if ( v3 )
  {
    v4 = v3->vfptr;
    v5 = v2;
    v6 = (char *)TextData3::Get(0x3E5B283Cu);
    v7 = fs(v6, v5);
    v4[118].__vecDelDtor((NiRefObject *)v3, (unsigned int)v7);
  }
}

//----- (00421BC0) --------------------------------------------------------
void __thiscall KDTeamScoreWin::KDTeamScoreWin(KDTeamScoreWin *this)
{
  KDTeamScoreWin *v1; // ebx@1
  int v2; // edi@1
  PgWinText *v3; // esi@1
  PgWinText *v4; // esi@6
  int v5; // esi@13
  int v6; // esi@18
  int v7; // esi@23
  bool v8; // zf@29
  NiPointer<PgWinSpr> (*v9)[5]; // edi@30
  PgWinSpr *v10; // esi@32
  signed int v11; // [sp+14h] [bp-18h]@11
  signed int v12; // [sp+14h] [bp-18h]@31
  int v13; // [sp+18h] [bp-14h]@11
  int v14; // [sp+18h] [bp-14h]@30
  signed int v15; // [sp+1Ch] [bp-10h]@12
  signed int v16; // [sp+1Ch] [bp-10h]@30

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&KDTeamScoreWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&KDTeamScoreWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkRoundTextWin.m_pObject = 0;
  v1->m_pkScoreTextWin.m_pObject = 0;
  `eh vector constructor iterator'(
    v1->m_pkOneNum,
    4u,
    20,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v2 = (int)v1->m_pkTenNum;
  `eh vector constructor iterator'(
    v1->m_pkTenNum,
    4u,
    20,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_pkHNum,
    4u,
    20,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_pkFlag,
    4u,
    10,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_bUseRound = 0;
  v3 = v1->m_pkRoundTextWin.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_pkRoundTextWin.m_pObject = 0;
  }
  v4 = v1->m_pkScoreTextWin.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_pkScoreTextWin.m_pObject = 0;
  }
  v13 = (int)v1->m_pkTenNum;
  v11 = 10;
  do
  {
    v15 = 2;
    do
    {
      v5 = *(_DWORD *)(v2 - 80);
      if ( v5 )
      {
        if ( !InterlockedDecrement((volatile LONG *)(v5 + 4)) && v5 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v5)(v5, 1);
        *(_DWORD *)(v2 - 80) = 0;
      }
      v6 = *(_DWORD *)v2;
      if ( *(_DWORD *)v2 )
      {
        if ( !InterlockedDecrement((volatile LONG *)(v6 + 4)) && v6 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v6)(v6, 1);
        *(_DWORD *)v2 = 0;
      }
      v7 = *(_DWORD *)(v2 + 80);
      if ( v7 )
      {
        if ( !InterlockedDecrement((volatile LONG *)(v7 + 4)) && v7 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v7)(v7, 1);
        *(_DWORD *)(v2 + 80) = 0;
      }
      v2 += 40;
      --v15;
    }
    while ( v15 );
    v2 = v13 + 4;
    v8 = v11-- == 1;
    v13 += 4;
  }
  while ( !v8 );
  v9 = v1->m_pkFlag;
  v14 = (int)v1->m_pkFlag;
  v16 = 5;
  do
  {
    v12 = 2;
    do
    {
      v10 = (*v9)[0].m_pObject;
      if ( (*v9)[0].m_pObject )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) )
        {
          if ( v10 )
            v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
        }
        (*v9)[0].m_pObject = 0;
      }
      ++v9;
      --v12;
    }
    while ( v12 );
    v9 = (NiPointer<PgWinSpr> (*)[5])(v14 + 4);
    v8 = v16-- == 1;
    v14 += 4;
  }
  while ( !v8 );
}
// 9737E4: using guessed type void (__thiscall *KDTeamScoreWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 973804: using guessed type int (__thiscall *KDTeamScoreWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00421E10) --------------------------------------------------------
void __thiscall KDTeamScoreWin::Reset(KDTeamScoreWin *this)
{
  KDTeamScoreWin *v1; // esi@1
  PgWinText *v2; // ecx@1
  NiRefObjectVtbl **v3; // esi@2
  NiRefObjectVtbl *v4; // edi@2
  char *v5; // eax@2
  char *v6; // eax@2

  v1 = this;
  KDTeamScoreWin::ResetScore(this);
  KDTeamScoreWin::ResetWinFlag(v1);
  v2 = v1->m_pkRoundTextWin.m_pObject;
  if ( v2 )
  {
    v1->m_bUseRound = 0;
    ((void (__stdcall *)(_DWORD))v2->vfptr[64].__vecDelDtor)(0);
    KDTeamScoreWin::ResetWinFlag(v1);
    v3 = &v1->m_pkRoundTextWin.m_pObject->vfptr;
    v4 = *v3;
    v5 = (char *)TextData3::Get(0x3E5B283Cu);
    v6 = fs(v5, 1);
    v4[118].__vecDelDtor((NiRefObject *)v3, (unsigned int)v6);
  }
}

//----- (00421E80) --------------------------------------------------------
char __thiscall KDTeamScoreWin::Create(KDTeamScoreWin *this, PgFrameWork *pkFrameWork)
{
  KDTeamScoreWin *v2; // ebx@1
  NiSourceTexture *v3; // eax@1
  NiTexturePalette *v4; // esi@1
  NiSourceTexture *v5; // edi@1
  const char *v6; // eax@3
  PgSprData *v7; // eax@4
  NiNode *v8; // esi@5
  char result; // al@9
  NiNode *v10; // esi@11
  int v11; // edi@16
  int v12; // esi@16
  PgSprData *v13; // eax@16
  PgSprData *v14; // eax@19
  PgWinSpr *v15; // eax@20
  PgFont *v16; // eax@21
  NiD3DDefaultShader *v17; // eax@21
  PgWinText *v18; // ecx@21
  NiRefObjectVtbl *v19; // edi@22
  char *v20; // eax@22
  char *v21; // eax@22
  PgFont *v22; // eax@23
  NiD3DDefaultShader *v23; // eax@23
  NiRefObjectVtbl *v24; // esi@24
  NiUnsharedGeometryGroup *v25; // eax@24
  signed int v26; // edi@24
  NiNode *v27; // esi@25
  const char *v28; // eax@25
  PgSprData *v29; // eax@25
  NiD3DDefaultShader *v30; // esi@26
  NiNode *v31; // esi@27
  const char *v32; // eax@27
  PgSprData *v33; // eax@27
  PgWinSpr *v34; // eax@28
  NiD3DDefaultShader *v35; // esi@28
  NiNode *v36; // esi@29
  const char *v37; // eax@29
  PgSprData *v38; // eax@29
  PgWinSpr *v39; // eax@30
  NiD3DDefaultShader *v40; // esi@30
  NiNode *v41; // esi@31
  const char *v42; // eax@31
  PgSprData *v43; // eax@31
  PgWinSpr *v44; // eax@32
  NiD3DDefaultShader *v45; // esi@32
  NiNode *v46; // esi@33
  const char *v47; // eax@33
  PgSprData *v48; // eax@33
  PgWinSpr *v49; // eax@34
  NiD3DDefaultShader *v50; // esi@34
  NiNode *v51; // esi@35
  const char *v52; // eax@35
  PgSprData *v53; // eax@35
  PgWinSpr *v54; // eax@36
  PgWinSpr *v55; // esi@36
  NiD3DDefaultShader *v56; // ST68_4@37
  NiPointer<NiD3DDefaultShader> *v57; // esi@37
  signed int v58; // edi@38
  NiNode *v59; // esi@39
  const char *v60; // eax@39
  PgSprData *v61; // eax@39
  NiD3DDefaultShader *v62; // esi@40
  NiNode *v63; // esi@41
  const char *v64; // eax@41
  PgSprData *v65; // eax@41
  PgWinSpr *v66; // eax@42
  PgWinSpr *v67; // esi@42
  NiD3DDefaultShader *v68; // ST68_4@43
  NiPointer<NiD3DDefaultShader> *v69; // esi@43
  unsigned int uiWidth; // [sp+7Ch] [bp-28h]@20
  unsigned int uiHeight; // [sp+80h] [bp-24h]@20
  NiPointer<NiD3DDefaultShader> *v72; // [sp+84h] [bp-20h]@22
  int iOffX; // [sp+88h] [bp-1Ch]@16
  int uiLeft; // [sp+8Ch] [bp-18h]@4
  int uiTop; // [sp+90h] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+94h] [bp-10h]@1
  int v77; // [sp+A0h] [bp-4h]@1
  int iOffY; // [sp+ACh] [bp+8h]@16

  v2 = this;
  spNode.m_pObject = 0;
  v77 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  v4 = pTexturePalette;
  v5 = v3;
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = Folder::Merge(&Folder::m_acMenu, "\\Game\\KDTeamScoreWin.nif");
  PgUtil::LoadNodeNifFile(v6, &spNode, v4);
  if ( !spNode.m_pObject )
    return 0;
  v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v5);
  if ( !v7 )
  {
    v8 = spNode.m_pObject;
    v77 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v8 )
        v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    }
    return 0;
  }
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v7, 0, pkFrameWork, "KDTeamScoreWin", 0) )
  {
    v11 = uiLeft;
    v12 = uiTop;
    iOffX = uiLeft;
    iOffY = uiTop;
    v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
    if ( v13 )
    {
      if ( PgWinSpr::CreateWin(uiLeft - v11, uiTop - v12, v13, (PgWin *)&v2->vfptr, 0, 0) )
      {
        v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel00", &uiLeft, &uiTop, 0);
        if ( v14 )
        {
          v15 = PgWinSpr::CreateWin(uiLeft - v11, uiTop - v12, v14, (PgWin *)&v2->vfptr, 0, 0);
          v15->vfptr[60].__vecDelDtor((NiRefObject *)v15, 0);
          if ( PgUtil::GetTriShapeRect(
                 (NiAVObject *)&spNode.m_pObject->vfptr,
                 "TextRound",
                 &uiLeft,
                 &uiTop,
                 &uiWidth,
                 &uiHeight) )
          {
            v16 = Font::Get(0);
            v17 = (NiD3DDefaultShader *)PgWinText::CreateWin(
                                          uiLeft - v11,
                                          uiTop - v12,
                                          uiWidth,
                                          uiHeight,
                                          v16,
                                          (PgWin *)&v2->vfptr,
                                          0,
                                          0);
            NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_pkRoundTextWin, v17);
            v18 = v2->m_pkRoundTextWin.m_pObject;
            if ( v18 )
            {
              ((void (__stdcall *)(signed int))v18->vfptr[122].__vecDelDtor)(1);
              ((void (__stdcall *)(D3DXCOLOR *))v2->m_pkRoundTextWin.m_pObject->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
              v19 = v2->m_pkRoundTextWin.m_pObject->vfptr;
              v72 = (NiPointer<NiD3DDefaultShader> *)v2->m_pkRoundTextWin.m_pObject;
              v20 = (char *)TextData3::Get(0x3E5B283Cu);
              v21 = fs(v20, 1);
              v19[118].__vecDelDtor((NiRefObject *)v72, (unsigned int)v21);
              ((void (__stdcall *)(_DWORD))v2->m_pkRoundTextWin.m_pObject->vfptr[60].__vecDelDtor)(0);
              if ( PgUtil::GetTriShapeRect(
                     (NiAVObject *)&spNode.m_pObject->vfptr,
                     "Frame",
                     &uiLeft,
                     &uiTop,
                     &uiWidth,
                     &uiHeight) )
              {
                v22 = Font::Get(0);
                v23 = (NiD3DDefaultShader *)PgWinText::CreateWin(
                                              uiLeft,
                                              uiTop,
                                              uiWidth,
                                              uiHeight,
                                              v22,
                                              (PgWin *)&v2->vfptr,
                                              0,
                                              0);
                NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_pkScoreTextWin, v23);
                if ( v2->m_pkRoundTextWin.m_pObject )
                {
                  ((void (__stdcall *)(signed int))v2->m_pkScoreTextWin.m_pObject->vfptr[122].__vecDelDtor)(1);
                  ((void (__stdcall *)(D3DXCOLOR *))v2->m_pkScoreTextWin.m_pObject->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
                  v24 = v2->m_pkScoreTextWin.m_pObject->vfptr;
                  v72 = (NiPointer<NiD3DDefaultShader> *)v2->m_pkScoreTextWin.m_pObject;
                  v25 = TextData3::Get(0x405F2230u);
                  v24[118].__vecDelDtor((NiRefObject *)v72, (unsigned int)v25);
                  v2->m_pkScoreTextWin.m_pObject->vfptr[60].__vecDelDtor(
                    (NiRefObject *)v2->m_pkScoreTextWin.m_pObject,
                    0);
                  v26 = 0;
                  v72 = (NiPointer<NiD3DDefaultShader> *)v2->m_pkTenNum[1];
                  while ( 1 )
                  {
                    v27 = spNode.m_pObject;
                    v28 = fs("BlueOneNum%d", v26);
                    v29 = PgSprData::Create((NiAVObject *)&v27->vfptr, v28, &uiLeft, &uiTop, 0);
                    if ( !v29 )
                      break;
                    v30 = (NiD3DDefaultShader *)PgWinSpr::CreateWin(
                                                  uiLeft - iOffX,
                                                  uiTop - iOffY,
                                                  v29,
                                                  (PgWin *)&v2->vfptr,
                                                  0,
                                                  0);
                    if ( !v30 )
                      break;
                    v30->vfptr[60].__vecDelDtor((NiRefObject *)v30, 0);
                    v30->vfptr[64].__vecDelDtor((NiRefObject *)v30, 0);
                    NiPointer<PopupMenuWin>::operator=(v72 - 20, v30);
                    v31 = spNode.m_pObject;
                    v32 = fs("BlueTenNum%d", v26);
                    v33 = PgSprData::Create((NiAVObject *)&v31->vfptr, v32, &uiLeft, &uiTop, 0);
                    if ( !v33 )
                      break;
                    v34 = PgWinSpr::CreateWin(uiLeft - iOffX, uiTop - iOffY, v33, (PgWin *)&v2->vfptr, 0, 0);
                    v35 = (NiD3DDefaultShader *)v34;
                    if ( !v34 )
                      break;
                    v34->vfptr[60].__vecDelDtor((NiRefObject *)v34, 0);
                    v35->vfptr[64].__vecDelDtor((NiRefObject *)v35, 0);
                    NiPointer<PopupMenuWin>::operator=(v72, v35);
                    v36 = spNode.m_pObject;
                    v37 = fs("BlueHNum%d", v26);
                    v38 = PgSprData::Create((NiAVObject *)&v36->vfptr, v37, &uiLeft, &uiTop, 0);
                    if ( !v38 )
                      break;
                    v39 = PgWinSpr::CreateWin(uiLeft - iOffX, uiTop - iOffY, v38, (PgWin *)&v2->vfptr, 0, 0);
                    v40 = (NiD3DDefaultShader *)v39;
                    if ( !v39 )
                      break;
                    v39->vfptr[60].__vecDelDtor((NiRefObject *)v39, 0);
                    v40->vfptr[64].__vecDelDtor((NiRefObject *)v40, 0);
                    NiPointer<PopupMenuWin>::operator=(v72 + 20, v40);
                    v41 = spNode.m_pObject;
                    v42 = fs("RedOneNum%d", v26);
                    v43 = PgSprData::Create((NiAVObject *)&v41->vfptr, v42, &uiLeft, &uiTop, 0);
                    if ( !v43 )
                      break;
                    v44 = PgWinSpr::CreateWin(uiLeft - iOffX, uiTop - iOffY, v43, (PgWin *)&v2->vfptr, 0, 0);
                    v45 = (NiD3DDefaultShader *)v44;
                    if ( !v44 )
                      break;
                    v44->vfptr[60].__vecDelDtor((NiRefObject *)v44, 0);
                    v45->vfptr[64].__vecDelDtor((NiRefObject *)v45, 0);
                    NiPointer<PopupMenuWin>::operator=(v72 - 30, v45);
                    v46 = spNode.m_pObject;
                    v47 = fs("RedTenNum%d", v26);
                    v48 = PgSprData::Create((NiAVObject *)&v46->vfptr, v47, &uiLeft, &uiTop, 0);
                    if ( !v48 )
                      break;
                    v49 = PgWinSpr::CreateWin(uiLeft - iOffX, uiTop - iOffY, v48, (PgWin *)&v2->vfptr, 0, 0);
                    v50 = (NiD3DDefaultShader *)v49;
                    if ( !v49 )
                      break;
                    v49->vfptr[60].__vecDelDtor((NiRefObject *)v49, 0);
                    v50->vfptr[64].__vecDelDtor((NiRefObject *)v50, 0);
                    NiPointer<PopupMenuWin>::operator=(v72 - 10, v50);
                    v51 = spNode.m_pObject;
                    v52 = fs("RedHNum%d", v26);
                    v53 = PgSprData::Create((NiAVObject *)&v51->vfptr, v52, &uiLeft, &uiTop, 0);
                    if ( !v53 )
                      break;
                    v54 = PgWinSpr::CreateWin(uiLeft - iOffX, uiTop - iOffY, v53, (PgWin *)&v2->vfptr, 0, 0);
                    v55 = v54;
                    if ( !v54 )
                      break;
                    v54->vfptr[60].__vecDelDtor((NiRefObject *)v54, 0);
                    v55->vfptr[64].__vecDelDtor((NiRefObject *)v55, 0);
                    v56 = (NiD3DDefaultShader *)v55;
                    v57 = v72;
                    NiPointer<PopupMenuWin>::operator=(v72 + 10, v56);
                    ++v26;
                    v72 = v57 + 1;
                    if ( v26 >= 10 )
                    {
                      v58 = 0;
                      v72 = (NiPointer<NiD3DDefaultShader> *)v2->m_pkFlag;
                      while ( 1 )
                      {
                        v59 = spNode.m_pObject;
                        v60 = fs("BlueFlag0%d", v58);
                        v61 = PgSprData::Create((NiAVObject *)&v59->vfptr, v60, &uiLeft, &uiTop, 0);
                        if ( !v61 )
                          break;
                        v62 = (NiD3DDefaultShader *)PgWinSpr::CreateWin(
                                                      uiLeft - iOffX,
                                                      uiTop - iOffY,
                                                      v61,
                                                      (PgWin *)&v2->vfptr,
                                                      0,
                                                      0);
                        if ( !v62 )
                          break;
                        v62->vfptr[60].__vecDelDtor((NiRefObject *)v62, 0);
                        v62->vfptr[64].__vecDelDtor((NiRefObject *)v62, 1u);
                        NiPointer<PopupMenuWin>::operator=(v72 + 5, v62);
                        v63 = spNode.m_pObject;
                        v64 = fs("RedFlag0%d", v58);
                        v65 = PgSprData::Create((NiAVObject *)&v63->vfptr, v64, &uiLeft, &uiTop, 0);
                        if ( !v65 )
                          break;
                        v66 = PgWinSpr::CreateWin(uiLeft - iOffX, uiTop - iOffY, v65, (PgWin *)&v2->vfptr, 0, 0);
                        v67 = v66;
                        if ( !v66 )
                          break;
                        v66->vfptr[60].__vecDelDtor((NiRefObject *)v66, 0);
                        v67->vfptr[64].__vecDelDtor((NiRefObject *)v67, 1u);
                        v68 = (NiD3DDefaultShader *)v67;
                        v69 = v72;
                        NiPointer<PopupMenuWin>::operator=(v72, v68);
                        ++v58;
                        v72 = v69 + 1;
                        if ( v58 >= 5 )
                        {
                          KDTeamScoreWin::Reset(v2);
                          ((void (__thiscall *)(KDTeamScoreWin *))v2->vfptr[59].__vecDelDtor)(v2);
                          v77 = -1;
                          NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
                          return 1;
                        }
                      }
                      break;
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
    v77 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    result = 0;
  }
  else
  {
    v10 = spNode.m_pObject;
    v77 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v10 )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00422680) --------------------------------------------------------
KDTeamScoreWin *__cdecl KDTeamScoreWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  KDTeamScoreWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x27Cu);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    KDTeamScoreWin::KDTeamScoreWin((KDTeamScoreWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (KDTeamScoreWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (004227B0) --------------------------------------------------------
KDTeamScoreWin *__thiscall KDTeamScoreWin::`scalar deleting destructor'(KDTeamScoreWin *this, unsigned int a2)
{
  KDTeamScoreWin *v2; // esi@1

  v2 = this;
  KDTeamScoreWin::~KDTeamScoreWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (004227E0) --------------------------------------------------------
void __thiscall KeyMap::KeyNode::Set(KeyMap::KeyNode *this, unsigned int uiMsg, NiInputKeyboard::KeyCode eC, KeyMap::PressType ePress, unsigned int uiModif, KeyMap::ModifType eModifType)
{
  this->m_uiMsg = uiMsg;
  this->m_eCode = eC;
  this->m_ePressType = ePress;
  this->m_uiModif = uiModif;
  this->m_eModifType = eModifType;
  this->m_bKeyboard = 1;
}

//----- (00422810) --------------------------------------------------------
void __thiscall KeyMap::KeyNode::SetMouse(KeyMap::KeyNode *this, unsigned int uiMsg, NiInputMouse::Button eC, KeyMap::PressType ePress, unsigned int uiModif, KeyMap::ModifType eModifType)
{
  this->m_uiMsg = uiMsg;
  this->m_ePressType = ePress;
  this->m_eMouseCode = eC;
  switch ( uiModif )
  {
    case 1u:
      this->m_uiModif = 256;
      this->m_eModifType = eModifType;
      this->m_bKeyboard = 0;
      break;
    case 4u:
      this->m_uiModif = 1024;
      this->m_eModifType = eModifType;
      this->m_bKeyboard = 0;
      break;
    case 0x40u:
      this->m_uiModif = 0x4000;
      this->m_eModifType = eModifType;
      this->m_bKeyboard = 0;
      break;
    default:
      this->m_uiModif = 0;
      this->m_eModifType = eModifType;
      this->m_bKeyboard = 0;
      break;
  }
}

//----- (00422890) --------------------------------------------------------
BOOL __thiscall KeyMap::KeyNode::IsSame(KeyMap::KeyNode *this, NiInputKeyboard::KeyCode eC, unsigned int uiModif)
{
  return this->m_eCode == eC && this->m_uiModif == uiModif;
}

//----- (004228C0) --------------------------------------------------------
BOOL __thiscall KeyMap::KeyNode::IsSame(KeyMap::KeyNode *this, NiInputMouse::Button eC, unsigned int uiModif)
{
  return this->m_eMouseCode == eC && this->m_uiModif == uiModif;
}

//----- (004228F0) --------------------------------------------------------
void __thiscall KeyMap::Process(KeyMap *this)
{
  struct NiInputKeyboard *v1; // ebx@3
  KeyMap::KeyNode *v2; // edi@4
  KeyMap::PressType v3; // eax@4
  int v4; // eax@5
  signed int v5; // ecx@8
  unsigned int v6; // ecx@10
  signed int v7; // eax@11
  char *v8; // eax@12
  unsigned int v9; // edx@13
  NiTListItem<KeyMap::KeyNode *> *i; // eax@20
  signed int v11; // eax@24
  signed int v12; // esi@25
  unsigned __int8 v13; // dl@25
  char v14; // al@25
  signed int v15; // eax@28
  char *v16; // eax@29
  signed int v17; // eax@33
  signed int v18; // esi@34
  unsigned __int8 v19; // dl@34
  char v20; // al@34
  signed int v21; // eax@37
  char *v22; // eax@38
  KeyMap::ModifType v23; // eax@41
  KeyMap *v24; // [sp+0h] [bp-8h]@1
  NiTListItem<KeyMap::KeyNode *> *kPos; // [sp+4h] [bp-4h]@3

  v24 = this;
  if ( !this->m_bEnable || !this->m_pkFrameWork )
    return;
  v1 = g_pkKeyboard;
  kPos = this->m_kList.m_pkHead;
  if ( !kPos )
    goto LABEL_19;
  do
  {
    v2 = kPos->m_element;
    v3 = v2->m_ePressType;
    if ( v3 )
    {
      v4 = v3 - 1;
      if ( v4 )
      {
        if ( v4 != 1 )
          goto LABEL_17;
        if ( v2->m_bKeyboard )
        {
          v5 = v2->m_eCode;
          if ( !v5 || !(((unsigned __int8)v1->m_aucKeystate[v5 >> 3] >> (v5 & 7)) & 1) )
            goto LABEL_17;
          v6 = v1->m_uiModifiers;
        }
        else
        {
          v7 = v2->m_eMouseCode;
          if ( v7 >= 8 )
            goto LABEL_17;
          v8 = (char *)g_pkMouse + 16 * (v7 + 8);
          v6 = *((_DWORD *)v8 + 2);
          if ( !v8[1] )
            goto LABEL_17;
        }
      }
      else if ( v2->m_bKeyboard )
      {
        v11 = v2->m_eCode;
        if ( !v11 )
          goto LABEL_17;
        v12 = v11 >> 3;
        v13 = v1->m_aucKeystate[v11 >> 3];
        v14 = v11 & 7;
        if ( (v13 >> v14) & 1 || !(((unsigned __int8)v1->m_aucKeystateLastUpdate[v12] >> v14) & 1) )
          goto LABEL_17;
        v6 = v1->m_uiModifiers;
      }
      else
      {
        v15 = v2->m_eMouseCode;
        if ( v15 >= 8 )
          goto LABEL_17;
        v16 = (char *)g_pkMouse + 16 * (v15 + 8);
        v6 = *((_DWORD *)v16 + 2);
        if ( v16[1] || !v16[3] )
          goto LABEL_17;
      }
    }
    else if ( v2->m_bKeyboard )
    {
      v17 = v2->m_eCode;
      if ( !v17 )
        goto LABEL_17;
      v18 = v17 >> 3;
      v19 = v1->m_aucKeystate[v17 >> 3];
      v20 = v17 & 7;
      if ( !((v19 >> v20) & 1) || ((unsigned __int8)v1->m_aucKeystateLastUpdate[v18] >> v20) & 1 )
        goto LABEL_17;
      v6 = v1->m_uiModifiers;
    }
    else
    {
      v21 = v2->m_eMouseCode;
      if ( v21 >= 8 )
        goto LABEL_17;
      v22 = (char *)g_pkMouse + 16 * (v21 + 8);
      v6 = *((_DWORD *)v22 + 2);
      if ( !v22[1] || v22[3] )
        goto LABEL_17;
    }
    v9 = v2->m_uiModif;
    if ( v9 )
    {
      v23 = v2->m_eModifType;
      if ( v23 )
      {
        if ( v23 != 1 || v2->m_uiModif != (v6 & v9) )
          goto LABEL_17;
      }
      else if ( !(v9 & v6) )
      {
        goto LABEL_17;
      }
    }
    else if ( v6 )
    {
      goto LABEL_17;
    }
    if ( !EditWin::ms_pkCurEditWin )
    {
      PgFrameWork::AddMsg(v24->m_pkFrameWork, v2->m_uiMsg, 0, 0);
      v1 = g_pkKeyboard;
    }
LABEL_17:
    kPos = kPos->m_pkNext;
  }
  while ( kPos );
  this = v24;
LABEL_19:
  if ( v1->m_aucKeystate[10] & 4 )
  {
    for ( i = this->m_kList.m_pkHead; i; i = i->m_pkNext )
      ;
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;
// A8C4A8: using guessed type struct NiInputMouse *g_pkMouse;

//----- (00422B00) --------------------------------------------------------
bool __stdcall KeyMap::KeyIsDown(NiInputKeyboard::KeyCode eKey)
{
  bool result; // al@2

  if ( eKey )
    result = ((unsigned __int8)g_pkKeyboard->m_aucKeystate[(signed int)eKey >> 3] >> (eKey & 7)) & 1;
  else
    result = 0;
  return result;
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (00422B30) --------------------------------------------------------
void __thiscall KeyMap::~KeyMap(KeyMap *this)
{
  KeyMap *v1; // ebx@1
  int v2; // edi@1
  NiTListItem<KeyMap::KeyNode *> **v3; // esi@1
  NiTListItem<KeyMap::KeyNode *> **v4; // ST00_4@2

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&KeyMap::`vftable';
  KeyMap::RemoveAll(this);
  v2 = (int)&v1->m_kList;
  v1->m_kList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>Vtbl *)&PgTList<KeyMap::KeyNode *>::`vftable';
  v3 = &v1->m_kList.m_pkHead->m_pkNext;
  while ( v3 )
  {
    v4 = v3;
    v3 = (NiTListItem<KeyMap::KeyNode *> **)*v3;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v2 + 8))(&v1->m_kList, v4);
  }
  v1->m_kList.m_kAllocator.m_uiCount = 0;
  v1->m_kList.m_pkHead = 0;
  v1->m_kList.m_pkTail = 0;
  *(_DWORD *)v2 = &NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::`vftable';
  v1->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
}
// 973A2C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::`vftable')(void *p, char);
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 973A54: using guessed type int (__thiscall *PgTList<KeyMap::KeyNode *>::`vftable')(void *p, char);
// 973A64: using guessed type int (__thiscall *KeyMap::`vftable')(void *p, char);

//----- (00422BD0) --------------------------------------------------------
void __thiscall KeyMap::Add(KeyMap *this, unsigned int uiMsg, NiInputKeyboard::KeyCode eC, KeyMap::PressType ePress, unsigned int uiModif, KeyMap::ModifType eModifType)
{
  KeyMap *v6; // ebx@1
  NiTListItem<KeyMap::KeyNode *> *v7; // eax@1
  KeyMap::KeyNode *v8; // ecx@2
  _BYTE *v9; // eax@4
  _BYTE *v10; // esi@5
  int v11; // eax@9
  _DWORD *v12; // ecx@9

  v6 = this;
  v7 = this->m_kList.m_pkHead;
  if ( !v7 )
    goto LABEL_4;
  while ( 1 )
  {
    v8 = v7->m_element;
    if ( v8->m_uiMsg == uiMsg )
      break;
    v7 = v7->m_pkNext;
    if ( !v7 )
      goto LABEL_4;
  }
  if ( v8 )
  {
    v8->m_uiMsg = uiMsg;
    v8->m_eCode = eC;
    v8->m_ePressType = ePress;
    v8->m_uiModif = uiModif;
    v8->m_eModifType = eModifType;
    v8->m_bKeyboard = 1;
  }
  else
  {
LABEL_4:
    v9 = operator new(0x1Cu);
    if ( v9 )
    {
      v9[20] = 1;
      v10 = v9;
    }
    else
    {
      v10 = 0;
    }
    *((_DWORD *)v10 + 1) = eC;
    *((_DWORD *)v10 + 3) = ePress;
    *((_DWORD *)v10 + 4) = eModifType;
    *(_DWORD *)v10 = uiMsg;
    *((_DWORD *)v10 + 2) = uiModif;
    v10[20] = 1;
    v11 = (int)v6->m_kList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *> *)&v6->m_kList);
    *(_DWORD *)(v11 + 8) = v10;
    *(_DWORD *)v11 = 0;
    *(_DWORD *)(v11 + 4) = v6->m_kList.m_pkTail;
    v12 = &v6->m_kList.m_pkTail->m_pkNext;
    if ( v12 )
    {
      *v12 = v11;
      ++v6->m_kList.m_kAllocator.m_uiCount;
      v6->m_kList.m_pkTail = (NiTListItem<KeyMap::KeyNode *> *)v11;
    }
    else
    {
      ++v6->m_kList.m_kAllocator.m_uiCount;
      v6->m_kList.m_pkHead = (NiTListItem<KeyMap::KeyNode *> *)v11;
      v6->m_kList.m_pkTail = (NiTListItem<KeyMap::KeyNode *> *)v11;
    }
  }
}

//----- (00422C90) --------------------------------------------------------
void __thiscall KeyMap::AddMouse(KeyMap *this, unsigned int uiMsg, NiInputMouse::Button eC, KeyMap::PressType ePress, unsigned int uiModif, KeyMap::ModifType eModifType)
{
  KeyMap *v6; // ebx@1
  NiTListItem<KeyMap::KeyNode *> *v7; // eax@1
  KeyMap::KeyNode *v8; // ecx@2
  KeyMap::KeyNode *v9; // eax@4
  KeyMap::KeyNode *v10; // edi@5
  int v11; // eax@9
  _DWORD *v12; // ecx@9

  v6 = this;
  v7 = this->m_kList.m_pkHead;
  if ( !v7 )
    goto LABEL_4;
  while ( 1 )
  {
    v8 = v7->m_element;
    if ( v8->m_uiMsg == uiMsg )
      break;
    v7 = v7->m_pkNext;
    if ( !v7 )
      goto LABEL_4;
  }
  if ( v8 )
  {
    v8->m_bKeyboard = 0;
    KeyMap::KeyNode::SetMouse(v8, uiMsg, eC, ePress, uiModif, eModifType);
  }
  else
  {
LABEL_4:
    v9 = (KeyMap::KeyNode *)operator new(0x1Cu);
    if ( v9 )
    {
      v9->m_bKeyboard = 1;
      v10 = v9;
    }
    else
    {
      v10 = 0;
    }
    KeyMap::KeyNode::SetMouse(v10, uiMsg, eC, ePress, uiModif, eModifType);
    v10->m_bKeyboard = 0;
    v11 = (int)v6->m_kList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *> *)&v6->m_kList);
    *(_DWORD *)(v11 + 8) = v10;
    *(_DWORD *)v11 = 0;
    *(_DWORD *)(v11 + 4) = v6->m_kList.m_pkTail;
    v12 = &v6->m_kList.m_pkTail->m_pkNext;
    if ( v12 )
    {
      *v12 = v11;
      ++v6->m_kList.m_kAllocator.m_uiCount;
      v6->m_kList.m_pkTail = (NiTListItem<KeyMap::KeyNode *> *)v11;
    }
    else
    {
      ++v6->m_kList.m_kAllocator.m_uiCount;
      v6->m_kList.m_pkHead = (NiTListItem<KeyMap::KeyNode *> *)v11;
      v6->m_kList.m_pkTail = (NiTListItem<KeyMap::KeyNode *> *)v11;
    }
  }
}

//----- (00422D50) --------------------------------------------------------
void __thiscall KeyMap::Remove(KeyMap *this, NiInputKeyboard::KeyCode eC, unsigned int uiModif)
{
  NiTListItem<KeyMap::KeyNode *> *v3; // eax@1
  KeyMap::KeyNode *v4; // esi@2
  NiTListItem<KeyMap::KeyNode *> *v5; // eax@6
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *v6; // ecx@6
  KeyMap::KeyNode **v7; // edx@7
  unsigned int v8; // edi@7

  v3 = this->m_kList.m_pkHead;
  if ( v3 )
  {
    while ( 1 )
    {
      v4 = v3->m_element;
      if ( v4->m_eCode == eC && v4->m_uiModif == uiModif )
        break;
      v3 = v3->m_pkNext;
      if ( !v3 )
        return;
    }
    v5 = this->m_kList.m_pkHead;
    v6 = (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&this->m_kList;
    if ( v5 )
    {
      while ( 1 )
      {
        v7 = &v5->m_element;
        v8 = (unsigned int)v5;
        v5 = v5->m_pkNext;
        if ( v4 == *v7 )
          break;
        if ( !v5 )
          goto LABEL_9;
      }
    }
    else
    {
LABEL_9:
      v8 = 0;
    }
    uiModif = v8;
    if ( v8 )
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(v6, (void **)&uiModif);
    operator delete(v4);
  }
}

//----- (00422DC0) --------------------------------------------------------
void __thiscall KeyMap::Remove(KeyMap *this, NiInputMouse::Button eC, unsigned int uiModif)
{
  NiTListItem<KeyMap::KeyNode *> *v3; // eax@1
  KeyMap::KeyNode *v4; // esi@2
  NiTListItem<KeyMap::KeyNode *> *v5; // eax@6
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *v6; // ecx@6
  KeyMap::KeyNode **v7; // edx@7
  unsigned int v8; // edi@7

  v3 = this->m_kList.m_pkHead;
  if ( v3 )
  {
    while ( 1 )
    {
      v4 = v3->m_element;
      if ( v4->m_eMouseCode == eC && v4->m_uiModif == uiModif )
        break;
      v3 = v3->m_pkNext;
      if ( !v3 )
        return;
    }
    v5 = this->m_kList.m_pkHead;
    v6 = (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&this->m_kList;
    if ( v5 )
    {
      while ( 1 )
      {
        v7 = &v5->m_element;
        v8 = (unsigned int)v5;
        v5 = v5->m_pkNext;
        if ( v4 == *v7 )
          break;
        if ( !v5 )
          goto LABEL_9;
      }
    }
    else
    {
LABEL_9:
      v8 = 0;
    }
    uiModif = v8;
    if ( v8 )
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(v6, (void **)&uiModif);
    operator delete(v4);
  }
}

//----- (00422E30) --------------------------------------------------------
void __thiscall KeyMap::KeyMap(KeyMap *this)
{
  KeyMap *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v1->vfptr = (NiRefObjectVtbl *)&KeyMap::`vftable';
  v1->m_kList.m_kAllocator.m_uiCount = 0;
  v1->m_kList.m_pkHead = 0;
  v1->m_kList.m_pkTail = 0;
  v1->m_kList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>Vtbl *)&PgTList<KeyMap::KeyNode *>::`vftable';
  v1->m_pkFrameWork = 0;
  v1->m_bEnable = 1;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 973A54: using guessed type int (__thiscall *PgTList<KeyMap::KeyNode *>::`vftable')(void *p, char);
// 973A64: using guessed type int (__thiscall *KeyMap::`vftable')(void *p, char);

//----- (00422E70) --------------------------------------------------------
bool __thiscall NiInputDevice::Button::WasPressed(NiInputDevice::Button *this, unsigned int *uiModifiers)
{
  *uiModifiers = this->m_uiModifiers;
  return this->m_bPressed && !this->m_bLastPressed;
}

//----- (00422EA0) --------------------------------------------------------
bool __thiscall NiInputDevice::Button::WasReleased(NiInputDevice::Button *this, unsigned int *uiModifiers)
{
  *uiModifiers = this->m_uiModifiers;
  return !this->m_bPressed && this->m_bLastPressed;
}

//----- (00422ED0) --------------------------------------------------------
char __thiscall NiInputMouse::ButtonIsDown(NiInputMouse *this, NiInputMouse::Button eButton, unsigned int *uiModifiers)
{
  char result; // al@2
  char *v4; // eax@3

  if ( (signed int)eButton < 8 )
  {
    v4 = (char *)this + 16 * (eButton + 8);
    *uiModifiers = *((_DWORD *)v4 + 2);
    result = v4[1];
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00422F00) --------------------------------------------------------
bool __thiscall NiInputMouse::ButtonWasPressed(NiInputMouse *this, NiInputMouse::Button eButton, unsigned int *uiModifiers)
{
  char *v3; // eax@2
  bool result; // al@4

  result = 0;
  if ( (signed int)eButton < 8 )
  {
    v3 = (char *)this + 16 * (eButton + 8);
    *uiModifiers = *((_DWORD *)v3 + 2);
    if ( v3[1] )
    {
      if ( !v3[3] )
        result = 1;
    }
  }
  return result;
}

//----- (00422F40) --------------------------------------------------------
bool __thiscall NiInputMouse::ButtonWasReleased(NiInputMouse *this, NiInputMouse::Button eButton, unsigned int *uiModifiers)
{
  char *v3; // eax@2
  bool result; // al@4

  result = 0;
  if ( (signed int)eButton < 8 )
  {
    v3 = (char *)this + 16 * (eButton + 8);
    *uiModifiers = *((_DWORD *)v3 + 2);
    if ( !v3[1] )
    {
      if ( v3[3] )
        result = 1;
    }
  }
  return result;
}

//----- (00422F80) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::~NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>(NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::`vftable';
}
// 973A2C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::`vftable')(void *p, char);

//----- (00422F90) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 973A2C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::`vftable')(void *p, char);

//----- (00422FC0) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *> *v2; // edi@1
  NiTListItem<KeyMap::KeyNode *> *v3; // esi@1
  NiTListItem<KeyMap::KeyNode *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 973A2C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::`vftable')(void *p, char);
// 973A44: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::`vftable')(void *p, char);

//----- (00423050) --------------------------------------------------------
void __thiscall NiTPointerList<KeyMap::KeyNode *>::~NiTPointerList<KeyMap::KeyNode *>(NiTPointerList<KeyMap::KeyNode *> *this)
{
  NiTPointerList<KeyMap::KeyNode *> *v1; // edi@1
  NiTListItem<KeyMap::KeyNode *> *v2; // esi@1
  NiTListItem<KeyMap::KeyNode *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::`vftable';
}
// 973A2C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::`vftable')(void *p, char);
// 973A44: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::`vftable')(void *p, char);

//----- (004230D0) --------------------------------------------------------
void __thiscall KeyMap::RemoveAll(KeyMap *this)
{
  KeyMap *v1; // edi@1
  NiTListItem<KeyMap::KeyNode *> *i; // esi@1
  NiTListItem<KeyMap::KeyNode *> **v3; // esi@5
  NiTListItem<KeyMap::KeyNode *> *v4; // ST00_4@6

  v1 = this;
  for ( i = this->m_kList.m_pkHead; i; i = i->m_pkNext )
  {
    if ( i->m_element )
      operator delete(i->m_element);
  }
  v3 = &v1->m_kList.m_pkHead->m_pkNext;
  while ( v3 )
  {
    v4 = (NiTListItem<KeyMap::KeyNode *> *)v3;
    v3 = (NiTListItem<KeyMap::KeyNode *> **)*v3;
    v1->m_kList.vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *> *)&v1->m_kList, v4);
  }
  v1->m_kList.m_kAllocator.m_uiCount = 0;
  v1->m_kList.m_pkHead = 0;
  v1->m_kList.m_pkTail = 0;
}

//----- (00423130) --------------------------------------------------------
void __thiscall PgTList<KeyMap::KeyNode *>::~PgTList<KeyMap::KeyNode *>(PgTList<KeyMap::KeyNode *> *this)
{
  PgTList<KeyMap::KeyNode *> *v1; // edi@1
  NiTListItem<KeyMap::KeyNode *> *v2; // esi@1
  NiTListItem<KeyMap::KeyNode *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>Vtbl *)&PgTList<KeyMap::KeyNode *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::`vftable';
}
// 973A2C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::`vftable')(void *p, char);
// 973A54: using guessed type int (__thiscall *PgTList<KeyMap::KeyNode *>::`vftable')(void *p, char);

//----- (004231B0) --------------------------------------------------------
PgTList<KeyMap::KeyNode *> *__thiscall PgTList<KeyMap::KeyNode *>::`scalar deleting destructor'(PgTList<KeyMap::KeyNode *> *this, unsigned int a2)
{
  PgTList<KeyMap::KeyNode *> *v2; // edi@1
  NiTListItem<KeyMap::KeyNode *> *v3; // esi@1
  NiTListItem<KeyMap::KeyNode *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>Vtbl *)&PgTList<KeyMap::KeyNode *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 973A2C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,KeyMap::KeyNode *>::`vftable')(void *p, char);
// 973A54: using guessed type int (__thiscall *PgTList<KeyMap::KeyNode *>::`vftable')(void *p, char);

//----- (00423240) --------------------------------------------------------
KeyMap *__thiscall KeyMap::`vector deleting destructor'(KeyMap *this, unsigned int a2)
{
  KeyMap *v2; // esi@1

  v2 = this;
  KeyMap::~KeyMap(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00423270) --------------------------------------------------------
void *__cdecl CreateMyProcessSubfunc(const char *szExeFullPath, char *szCmdLine, _PROCESS_INFORMATION *pi)
{
  int v3; // eax@2
  int v4; // eax@7
  char v5; // cl@8
  _BYTE *v6; // eax@9
  BOOL v7; // eax@13
  void *result; // eax@15
  _PROCESS_INFORMATION *v9; // ecx@17
  void *v10; // edx@18
  _STARTUPINFOA StartupInfo; // [sp+Ch] [bp-374h]@12
  _PROCESS_INFORMATION ProcessInformation; // [sp+50h] [bp-330h]@13
  _PROCESS_INFORMATION *v13; // [sp+60h] [bp-320h]@1
  char *szCmdLinePtr; // [sp+64h] [bp-31Ch]@1
  char szDirectory[261]; // [sp+68h] [bp-318h]@8
  char szFullCmdLine[261]; // [sp+170h] [bp-210h]@1
  char szExe[260]; // [sp+278h] [bp-108h]@1

  v13 = pi;
  GetShortPathNameA(szExeFullPath, szExe, 0x104u);
  szCmdLinePtr = szFullCmdLine;
  if ( szCmdLine )
  {
    strchr((char *)szExeFullPath, 34);
    if ( v3 )
      _wsprintfA(szFullCmdLine, "%s %s", szExe, szCmdLine);
    else
      _wsprintfA(szFullCmdLine, "\"%s\" %s", szExe, szCmdLine);
  }
  else
  {
    szCmdLinePtr = 0;
  }
  if ( strlen(szExe) > 0x104 )
    goto LABEL_21;
  v4 = 0;
  do
  {
    v5 = szExe[v4];
    szDirectory[v4++] = v5;
  }
  while ( v5 );
  strrchr(szDirectory, 92);
  if ( !v6 )
    goto LABEL_21;
  if ( *(v6 - 1) == 58 )
    ++v6;
  *v6 = 0;
  StartupInfo.cb = 68;
  StartupInfo.lpReserved = 0;
  StartupInfo.lpDesktop = 0;
  StartupInfo.lpTitle = 0;
  StartupInfo.dwX = 0;
  StartupInfo.dwY = 0;
  StartupInfo.dwXSize = 0;
  StartupInfo.dwYSize = 0;
  StartupInfo.dwXCountChars = 0;
  StartupInfo.dwYCountChars = 0;
  StartupInfo.dwFillAttribute = 0;
  StartupInfo.dwFlags = 1;
  *(_DWORD *)&StartupInfo.wShowWindow = 1;
  StartupInfo.lpReserved2 = 0;
  StartupInfo.hStdInput = 0;
  StartupInfo.hStdOutput = 0;
  StartupInfo.hStdError = 0;
  v7 = szCmdLinePtr ? CreateProcessA(
                        0,
                        szFullCmdLine,
                        0,
                        0,
                        0,
                        0x20u,
                        0,
                        szDirectory,
                        &StartupInfo,
                        &ProcessInformation) : CreateProcessA(
                                                 szExeFullPath,
                                                 0,
                                                 0,
                                                 0,
                                                 0,
                                                 0x20u,
                                                 0,
                                                 szDirectory,
                                                 &StartupInfo,
                                                 &ProcessInformation);
  if ( v7 )
  {
    v9 = v13;
    result = ProcessInformation.hProcess;
    if ( v13 )
    {
      v10 = ProcessInformation.hThread;
      v13->hProcess = ProcessInformation.hProcess;
      v9->hThread = v10;
      v9->dwProcessId = ProcessInformation.dwProcessId;
      v9->dwThreadId = ProcessInformation.dwThreadId;
    }
  }
  else
  {
LABEL_21:
    result = 0;
  }
  return result;
}

//----- (00423470) --------------------------------------------------------
void *__stdcall CreateMyProcess(const char *szExeFullPath, char *szCmdLine)
{
  return CreateMyProcessSubfunc(szExeFullPath, szCmdLine, 0);
}

//----- (00423490) --------------------------------------------------------
void *__stdcall CreateMyProcess2(const char *szExeFullPath, char *szCmdLine, _PROCESS_INFORMATION *pi)
{
  return CreateMyProcessSubfunc(szExeFullPath, szCmdLine, pi);
}

//----- (004234B0) --------------------------------------------------------
void *__stdcall MyShellExecute(const char *szFilename)
{
  void *result; // eax@2
  char *v2; // edi@6
  char v3; // al@7
  unsigned int v4; // eax@9
  char *v5; // edi@9
  char v6; // cl@10
  const char *v7; // eax@12
  const char *v8; // esi@12
  char *v9; // edi@13
  char v10; // al@14
  _SHELLEXECUTEINFOA ShellExecuteInfo; // [sp+4h] [bp-144h]@6
  char szDirectory[260]; // [sp+40h] [bp-108h]@4

  if ( szFilename )
  {
    if ( _mbschr(szFilename, 0x3Au) )
    {
      strcpy(szDirectory, szFilename);
    }
    else
    {
      GetCurrentDirectoryA(0x104u, szDirectory);
      if ( _mbsrchr(szDirectory, 0x5Cu)[1] )
      {
        v2 = (char *)&ShellExecuteInfo.hProcess + 3;
        do
          v3 = (v2++)[1];
        while ( v3 );
        *(_WORD *)v2 = 92;
      }
      v4 = strlen(szFilename) + 1;
      v5 = (char *)&ShellExecuteInfo.hProcess + 3;
      do
        v6 = (v5++)[1];
      while ( v6 );
      qmemcpy(v5, szFilename, v4);
    }
    v7 = _mbsrchr(szDirectory, 0x5Cu);
    *v7 = 0;
    v8 = v7 + 1;
    if ( !_mbschr(szDirectory, 0x5Cu) )
    {
      v9 = (char *)&ShellExecuteInfo.hProcess + 3;
      do
        v10 = (v9++)[1];
      while ( v10 );
      *(_WORD *)v9 = 92;
    }
    ShellExecuteInfo.cbSize = 60;
    ShellExecuteInfo.fMask = 320;
    ShellExecuteInfo.hwnd = 0;
    ShellExecuteInfo.lpVerb = 0;
    ShellExecuteInfo.lpFile = v8;
    ShellExecuteInfo.lpParameters = 0;
    ShellExecuteInfo.lpDirectory = szDirectory;
    ShellExecuteInfo.nShow = 1;
    ShellExecuteExA(&ShellExecuteInfo);
    result = ShellExecuteInfo.hProcess;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00423630) --------------------------------------------------------
void __thiscall LuaArgument::LuaArgument(LuaArgument *this)
{
  this->vfptr = (LuaArgumentVtbl *)&LuaArgument::`vftable';
  this->m_return_number = 0;
  this->m_return_value = 0;
}
// 973DA4: using guessed type int (__thiscall *LuaArgument::`vftable')(void *p, char);

//----- (00423650) --------------------------------------------------------
void __thiscall LuaArgument::~LuaArgument(LuaArgument *this)
{
  this->vfptr = (LuaArgumentVtbl *)&LuaArgument::`vftable';
}
// 973DA4: using guessed type int (__thiscall *LuaArgument::`vftable')(void *p, char);

//----- (00423660) --------------------------------------------------------
int __stdcall LuaArgument::setArgument(lua_State *L)
{
  return 0;
}

//----- (00423670) --------------------------------------------------------
void __thiscall LuaArgument::setReturn(LuaArgument *this, lua_State *L)
{
  LuaArgument *v2; // esi@1
  bool v3; // zf@1

  v2 = this;
  v3 = this->m_return_number == 1;
  this->m_return_value = -1;
  if ( v3 )
  {
    if ( lua_isnumber(L, -1) )
      v2->m_return_value = (signed int)lua_tonumberx(L, -1, 0);
    lua_settop(L, -2);
  }
}

//----- (004236C0) --------------------------------------------------------
int __thiscall LuaArgument::getReturnNumber(LuaArgument *this)
{
  return this->m_return_number;
}

//----- (004236D0) --------------------------------------------------------
int __thiscall LuaArgument::getReturnValue(LuaArgument *this)
{
  return this->m_return_value;
}

//----- (004236E0) --------------------------------------------------------
bool __thiscall LuaScript::loadFile(LuaScript *this, char *filename)
{
  LuaScript *v2; // esi@1
  lua_State *v3; // eax@1
  bool result; // al@2

  v2 = this;
  ((void (*)(void))this->vfptr[4].__vecDelDtor)();
  v3 = luaL_newstate();
  v2->m_state = v3;
  luaL_openlibs(v3);
  ((void (__thiscall *)(LuaScript *))v2->vfptr[5].__vecDelDtor)(v2);
  if ( luaL_loadfilex(v2->m_state, filename, 0) )
    result = 0;
  else
    result = lua_pcallk(v2->m_state, 0, 0, 0, 0, 0) == 0;
  return result;
}

//----- (00423750) --------------------------------------------------------
bool __thiscall LuaScript::callFunc(LuaScript *this, const char *funcname, LuaArgument *lua_arg)
{
  LuaScript *v3; // edi@1
  int v4; // ebx@1
  int v5; // eax@1
  int v6; // eax@1
  bool v7; // bl@1

  v3 = this;
  lua_getglobal(this->m_state, funcname);
  v4 = lua_arg->vfptr->setArgument(lua_arg, v3->m_state);
  v5 = lua_arg->vfptr->getReturnNumber(lua_arg);
  v6 = lua_pcallk(v3->m_state, v4, v5, 0, 0, 0);
  v7 = v6 == 0;
  if ( !v6 )
    lua_arg->vfptr->setReturn(lua_arg, v3->m_state);
  return v7;
}

//----- (004237D0) --------------------------------------------------------
void __thiscall LuaScript::clear(LuaScript *this)
{
  LuaScript *v1; // esi@1

  v1 = this;
  if ( this->m_state )
    lua_close(this->m_state);
  v1->m_state = 0;
}

//----- (004237F0) --------------------------------------------------------
void __thiscall LuaScript::pushFunc(LuaScript *this, const char *luafunc, int (__cdecl *func)(lua_State *))
{
  LuaScript *v3; // esi@1

  v3 = this;
  lua_pushcclosure(this->m_state, func, 0);
  lua_setglobal(v3->m_state, luafunc);
}

//----- (00423820) --------------------------------------------------------
int __cdecl LuaScript::cSetEnableInput(lua_State *L)
{
  MainApp *v1; // eax@1
  bool Enable; // [sp+0h] [bp-4h]@1

  Enable = lua_toboolean(L, 1) != 0;
  v1 = MainApp::GetMainAppInstance();
  if ( v1 )
    MainApp::EnableInput(v1, Enable);
  return 0;
}

//----- (00423860) --------------------------------------------------------
int __cdecl LuaScript::cGetHP(lua_State *L)
{
  int v1; // eax@1

  v1 = User::HP(&g_kUser);
  lua_pushinteger(L, v1);
  return 1;
}

//----- (00423890) --------------------------------------------------------
int __cdecl LuaScript::cGetMaxHP(lua_State *L)
{
  int v1; // eax@1

  v1 = User::MaxHP(&g_kUser);
  lua_pushinteger(L, v1);
  return 1;
}

//----- (004238C0) --------------------------------------------------------
int __cdecl LuaScript::cDeleteChar(lua_State *L)
{
  unsigned __int16 v1; // ax@1
  Char *v2; // eax@1

  v1 = lua_tointegerx(L, 1, 0);
  v2 = CharMgr::GetChar(&g_kCharMgr, v1);
  if ( v2 )
    CharMgr::DeleteChar(&g_kCharMgr, v2);
  return 0;
}

//----- (00423900) --------------------------------------------------------
int __cdecl LuaScript::cActChar(lua_State *L)
{
  unsigned __int16 v1; // di@1
  int v2; // esi@1
  Char *v3; // eax@1

  v1 = lua_tointegerx(L, 1, 0);
  v2 = lua_tointegerx(L, 2, 0);
  v3 = CharMgr::GetChar(&g_kCharMgr, v1);
  if ( v3 )
    v3->vfptr[10].SetAbStateProperty((AbStateInfectee *)v3, (ABSTATEINDEX)v2, 0, 0);
  return 0;
}

//----- (00423950) --------------------------------------------------------
int __cdecl LuaScript::cIsDuringMove(lua_State *L)
{
  unsigned __int16 v1; // ax@1
  Char *v2; // esi@1
  int result; // eax@4

  v1 = lua_tointegerx(L, 1, 0);
  v2 = CharMgr::GetChar(&g_kCharMgr, v1);
  if ( v2 )
  {
    if ( (unsigned __int8)((int (__thiscall *)(Char *))v2->vfptr[7].GetAbstateColor)(v2)
      || !(unsigned __int8)((int (__thiscall *)(Char *))v2->vfptr[8].Affect)(v2) )
    {
      lua_pushboolean(L, 1);
      result = 1;
    }
    else
    {
      lua_pushboolean(L, 0);
      result = 1;
    }
  }
  else
  {
    lua_pushboolean(L, 0);
    result = 1;
  }
  return result;
}

//----- (004239E0) --------------------------------------------------------
int __cdecl LuaScript::cIsAttack(lua_State *L)
{
  unsigned __int16 v1; // ax@1
  Char *v2; // eax@1
  int v4; // [sp-4h] [bp-Ch]@1
  unsigned int AniCode; // [sp+4h] [bp-4h]@2

  v1 = lua_tointegerx(L, 1, 0);
  v2 = CharMgr::GetChar(&g_kCharMgr, v1);
  v4 = 0;
  if ( v2 )
  {
    Char::GetAniCode(v2, 0, &AniCode, 0);
    if ( AniCode != 300000 && AniCode != 600000 && AniCode != 700000 )
    {
      lua_pushboolean(L, 0);
      return 1;
    }
    v4 = 1;
  }
  lua_pushboolean(L, v4);
  return 1;
}

//----- (00423A60) --------------------------------------------------------
int __cdecl LuaScript::cGetQuestStatus(lua_State *L)
{
  unsigned __int16 v1; // di@1
  CClientQuest *v2; // eax@1
  QUEST_DATA *v3; // eax@1

  v1 = lua_tointegerx(L, 1, 0);
  v2 = QuestDataMgr::GetQuest();
  v3 = CQuest::GetNewQuestStatus((CQuest *)&v2->vfptr, v1);
  lua_pushinteger(L, (int)v3);
  return 1;
}

//----- (00423AA0) --------------------------------------------------------
int __cdecl LuaScript::cShowHelpWin(lua_State *L)
{
  bool v1; // bl@1
  GameFrameWork *v2; // ecx@1

  v1 = lua_toboolean(L, 1) != 0;
  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    if ( v1 )
    {
      GameFrameWork::OpenHelpWin(v2);
      return 0;
    }
    GameFrameWork::CloseHelpWin(v2);
  }
  return 0;
}

//----- (00423AF0) --------------------------------------------------------
int __cdecl LuaScript::cShowCharWin(lua_State *L)
{
  bool v1; // bl@1
  GameFrameWork *v2; // ecx@1

  v1 = lua_toboolean(L, 1) != 0;
  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    if ( v1 )
    {
      GameFrameWork::OpenCharInfoWin(v2);
      return 0;
    }
    GameFrameWork::CloseCharInfoWin(v2);
  }
  return 0;
}

//----- (00423B40) --------------------------------------------------------
int __cdecl LuaScript::cShowInvenWin(lua_State *L)
{
  bool v1; // bl@1
  GameFrameWork *v2; // ecx@1

  v1 = lua_toboolean(L, 1) != 0;
  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    if ( v1 )
    {
      GameFrameWork::OpenInventoryWin(v2);
      return 0;
    }
    GameFrameWork::CloseInventoryWin(v2);
  }
  return 0;
}

//----- (00423B90) --------------------------------------------------------
int __cdecl LuaScript::cShowQuestNewsWin(lua_State *L)
{
  bool v1; // bl@1
  GameFrameWork *v2; // ecx@1

  v1 = lua_toboolean(L, 1) != 0;
  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    if ( v1 )
    {
      GameFrameWork::OpenQuestNewsWin(v2);
      return 0;
    }
    GameFrameWork::CloseQuestNewsWin(v2);
  }
  return 0;
}

//----- (00423BE0) --------------------------------------------------------
int __cdecl LuaScript::cShowQuestWin(lua_State *L)
{
  bool v1; // bl@1
  GameFrameWork *v2; // ecx@1

  v1 = lua_toboolean(L, 1) != 0;
  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    if ( v1 )
    {
      GameFrameWork::OpenQuestWin(v2, 0, 1);
      return 0;
    }
    GameFrameWork::CloseQuestWin(v2);
  }
  return 0;
}

//----- (00423C30) --------------------------------------------------------
int __cdecl LuaScript::cCloseShopWin()
{
  GameFrameWork *v0; // eax@1
  GameFrameWork *v1; // esi@1

  v0 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  v1 = v0;
  if ( v0 )
  {
    GameFrameWork::CloseShopMenu(v0, 1);
    GameFrameWork::CloseSkillShopMenu(v1);
    GameFrameWork::CloseSoulStoneShopMenu(v1);
  }
  return 0;
}

//----- (00423C70) --------------------------------------------------------
int __cdecl LuaScript::cGetShowWin(lua_State *L)
{
  void *v1; // esi@1
  unsigned __int8 v2; // al@2
  int result; // eax@2

  v1 = lua_touserdata(L, 1);
  if ( v1 )
  {
    lua_pushboolean(L, 1);
    v2 = (*(int (__thiscall **)(void *))(*(_DWORD *)v1 + 260))(v1);
    lua_pushboolean(L, v2);
    result = 2;
  }
  else
  {
    lua_pushboolean(L, 0);
    result = 1;
  }
  return result;
}

//----- (00423CD0) --------------------------------------------------------
int __cdecl LuaScript::cCreateSprite(lua_State *L)
{
  PgWin *v1; // edi@1
  int v2; // ebx@1
  bool Enable; // ST54_1@1
  NiSourceTexture *v4; // eax@3
  PgWinSpr *v5; // edi@3
  float v6; // ST54_4@3
  double Alpha; // [sp+14h] [bp-18h]@1
  int Y; // [sp+20h] [bp-Ch]@1
  int Width; // [sp+24h] [bp-8h]@1
  int Height; // [sp+28h] [bp-4h]@1

  v1 = (PgWin *)lua_touserdata(L, 1);
  v2 = lua_tointegerx(L, 2, 0);
  Y = lua_tointegerx(L, 3, 0);
  Width = lua_tointegerx(L, 4, 0);
  Height = lua_tointegerx(L, 5, 0);
  Enable = lua_toboolean(L, 6) != 0;
  Alpha = lua_tonumberx(L, 7, 0);
  if ( !lua_type(L, (int)v1) )
    v1 = 0;
  v4 = PgUtil::Create1PixelSourceTexture(0, 0, 0, -1);
  v5 = PgWinSpr::CreateWin(v4, v2, Y, Width, Height, v1, 0, 0);
  ((void (__thiscall *)(PgWinSpr *))v5->vfptr[60].__vecDelDtor)(v5);
  v6 = Alpha;
  v5->vfptr[69].__vecDelDtor((NiRefObject *)v5, LODWORD(v6));
  lua_pushlightuserdata(L, v5);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v5->vfptr);
  return 1;
}

//----- (00423DD0) --------------------------------------------------------
void __thiscall LuaScript::LuaScript(LuaScript *this)
{
  LuaScript *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v1->vfptr = (NiRefObjectVtbl *)&LuaScript::`vftable';
  v1->m_state = 0;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 973DCC: using guessed type int (__thiscall *LuaScript::`vftable')(void *p, char);

//----- (00423E00) --------------------------------------------------------
void __thiscall LuaScript::~LuaScript(LuaScript *this)
{
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);

//----- (00423E20) --------------------------------------------------------
int __cdecl LuaScript::cGetCurTime(lua_State *L)
{
  lua_pushnumber(L, Timer::ms_fCurTime);
  return 1;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00423E50) --------------------------------------------------------
int __cdecl LuaScript::cGetUser(lua_State *L)
{
  int v1; // eax@1
  int v2; // eax@1
  int v3; // eax@1
  int v4; // eax@1

  v1 = User::HP(&g_kUser);
  lua_pushinteger(L, v1);
  v2 = User::MaxHP(&g_kUser);
  lua_pushinteger(L, v2);
  v3 = User::SP(&g_kUser);
  lua_pushinteger(L, v3);
  v4 = User::MaxSP(&g_kUser);
  lua_pushinteger(L, v4);
  lua_pushinteger(L, unk_A97D74);
  return 1;
}

//----- (00423EC0) --------------------------------------------------------
int __cdecl LuaScript::cGetRemainStatPoint(lua_State *L)
{
  lua_pushinteger(L, unk_A97D74);
  return 1;
}

//----- (00423EE0) --------------------------------------------------------
int __cdecl LuaScript::cLoadChar(lua_State *L)
{
  int v1; // edi@1
  unsigned __int16 v2; // bx@1
  float fY; // ST34_4@1
  float fX; // ST30_4@1
  NiPoint3 kPos; // [sp+18h] [bp-58h]@1
  NiPoint3 kDir; // [sp+24h] [bp-4Ch]@1
  NiPoint3 result; // [sp+30h] [bp-40h]@1
  int PosY; // [sp+3Ch] [bp-34h]@1
  int PosX; // [sp+40h] [bp-30h]@1
  int Dir; // [sp+44h] [bp-2Ch]@1
  NiMatrix3 v12; // [sp+48h] [bp-28h]@1

  v1 = lua_tointegerx(L, 1, 0);
  v2 = lua_tointegerx(L, 2, 0);
  PosX = lua_tointegerx(L, 3, 0);
  PosY = lua_tointegerx(L, 4, 0);
  *(float *)&Dir = COERCE_FLOAT(lua_tointegerx(L, 5, 0));
  fY = (double)PosY;
  fX = (double)PosX;
  World::GetAdvGroundPos(&g_kWorld, fX, fY, &kPos);
  *(float *)&Dir = (NI_PI + NI_PI) * (double)(unsigned __int8)Dir / 180.0;
  NiMatrix3::MakeZRotation(&v12, *(float *)&Dir);
  NiMatrix3::operator*(&v12, &result, &World::ms_kNorthDir);
  kDir = result;
  CharMgr::AddMob(&g_kCharMgr, v1, v2, &kPos, &kDir, 0, 0);
  return 0;
}
// B622CC: using guessed type const float NI_PI;

//----- (00423FD0) --------------------------------------------------------
int __cdecl LuaScript::cMoveChar(lua_State *L)
{
  unsigned __int16 v1; // di@1
  int v2; // ebx@1
  float fY; // ST28_4@1
  float fX; // ST24_4@1
  Char *v5; // eax@1
  Char *v6; // esi@1
  bool v7; // zf@2
  void (__thiscall *v8)(AbStateInfectee *, AbStateInst *, bool); // eax@2
  NiPoint3 kPos; // [sp+18h] [bp-14h]@1
  int ChangMove; // [sp+24h] [bp-8h]@1
  int PosY; // [sp+28h] [bp-4h]@1

  v1 = lua_tointegerx(L, 1, 0);
  ChangMove = lua_tointegerx(L, 2, 0);
  PosY = lua_tointegerx(L, 3, 0);
  v2 = lua_tointegerx(L, 4, 0);
  fY = (double)PosY;
  fX = (double)ChangMove;
  World::GetAdvGroundPos(&g_kWorld, fX, fY, &kPos);
  v5 = CharMgr::GetChar(&g_kCharMgr, v1);
  v6 = v5;
  if ( v5 )
  {
    v7 = ((int (__thiscall *)(Char *))v5->vfptr[7].Affect)(v5) == v2;
    v8 = v6->vfptr[7].Deaffect;
    LOBYTE(ChangMove) = !v7;
    ((void (__thiscall *)(Char *, int))v8)(v6, v2);
    ((void (__thiscall *)(Char *, NiPoint3 *, int, NiColor *, signed int))v6->vfptr[7].SetAbStateProperty)(
      v6,
      &kPos,
      ChangMove,
      &Char::INVALIDPOINT3,
      1);
  }
  return 0;
}

//----- (00424090) --------------------------------------------------------
int __cdecl LuaScript::cGetCharPos(lua_State *L)
{
  unsigned __int16 v1; // ax@1
  Char *v2; // eax@1
  int result; // eax@2
  NiPoint3 kPos; // [sp+4h] [bp-Ch]@2

  v1 = lua_tointegerx(L, 1, 0);
  v2 = CharMgr::GetChar(&g_kCharMgr, v1);
  if ( v2 )
  {
    ((void (__thiscall *)(Char *, NiPoint3 *))v2->vfptr[6].SetAbStateProperty)(v2, &kPos);
    lua_pushboolean(L, 1);
    lua_pushinteger(L, (signed int)kPos.x);
    lua_pushinteger(L, (signed int)kPos.y);
    result = 3;
  }
  else
  {
    lua_pushboolean(L, 0);
    result = 1;
  }
  return result;
}

//----- (00424110) --------------------------------------------------------
int __cdecl LuaScript::cGetClass(lua_State *L)
{
  unsigned __int16 v1; // ax@1
  Char *v2; // eax@1
  char v3; // al@3

  v1 = lua_tointegerx(L, 1, 0);
  v2 = CharMgr::GetChar(&g_kCharMgr, v1);
  if ( v2 )
  {
    switch ( Char::GetClass(v2) )
    {
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
        v3 = 1;
        break;
      case 6:
      case 7:
      case 8:
      case 9:
      case 0xA:
        v3 = 6;
        break;
      case 0xB:
      case 0xC:
      case 0xD:
      case 0xE:
      case 0xF:
        v3 = 11;
        break;
      case 0x10:
      case 0x11:
      case 0x12:
      case 0x13:
      case 0x14:
        v3 = 16;
        break;
      case 0x15:
      case 0x16:
      case 0x17:
      case 0x18:
      case 0x19:
        v3 = 21;
        break;
      case 0x1A:
      case 0x1B:
        v3 = 26;
        break;
      default:
        v3 = 0;
        break;
    }
    lua_pushinteger(L, (unsigned __int8)v3);
  }
  return 1;
}

//----- (004241F0) --------------------------------------------------------
int __cdecl LuaScript::cGetCharMode(lua_State *L)
{
  unsigned __int16 v1; // ax@1
  Char *v2; // eax@1
  int result; // eax@2

  v1 = lua_tointegerx(L, 1, 0);
  v2 = CharMgr::GetChar(&g_kCharMgr, v1);
  if ( v2 )
  {
    lua_pushinteger(L, v2->m_byMode);
    result = 1;
  }
  else
  {
    lua_pushnil(L);
    result = 1;
  }
  return result;
}

//----- (00424240) --------------------------------------------------------
int __cdecl LuaScript::cGetMainCharHandle(lua_State *L)
{
  lua_pushinteger(L, g_pkMainChar->m_kHandle);
  return 1;
}

//----- (00424270) --------------------------------------------------------
int __cdecl LuaScript::cMoveMainChar(lua_State *L)
{
  int v1; // edi@1
  int result; // eax@2
  float fY; // ST1C_4@3
  float fX; // ST18_4@3
  NiPoint3 kPos; // [sp+14h] [bp-14h]@3
  int PosX; // [sp+20h] [bp-8h]@1
  int PosY; // [sp+24h] [bp-4h]@1

  PosX = lua_tointegerx(L, 1, 0);
  PosY = lua_tointegerx(L, 2, 0);
  v1 = lua_tointegerx(L, 3, 0);
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
  {
    fY = (double)PosY;
    fX = (double)PosX;
    World::GetAdvGroundPos(&g_kWorld, fX, fY, &kPos);
    if ( g_pkMainChar )
    {
      ((void (__stdcall *)(int))g_pkMainChar->vfptr[7].Deaffect)(v1);
      g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[7].dwEffectIndex[0] = 0;
      MainChar::SetStartReserveAct((MainChar *)g_pkMainChar, RESERVEACT_PICKGROUND);
      MainChar::SetRevserveMovePos((MainChar *)g_pkMainChar, &kPos);
      MainChar::StartMoveTarget((MainChar *)g_pkMainChar);
    }
    result = 0;
  }
  else
  {
    lua_pushboolean(L, 0);
    result = 1;
  }
  return result;
}

//----- (00424340) --------------------------------------------------------
int __cdecl LuaScript::cShowInterface(lua_State *L)
{
  bool v1; // bl@1
  GameFrameWork *v2; // eax@1

  v1 = lua_toboolean(L, 1) != 0;
  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    if ( !v1 )
      GameFrameWork::HideEscapeWin(v2);
    byte_B4FF6D = v1;
  }
  return 0;
}
// B4FF6D: using guessed type char byte_B4FF6D;

//----- (00424390) --------------------------------------------------------
int __cdecl LuaScript::cShowBasicInfo(lua_State *L)
{
  byte_B4FF94 = lua_toboolean(L, 1) != 0;
  return 0;
}
// B4FF94: using guessed type char byte_B4FF94;

//----- (004243B0) --------------------------------------------------------
int __cdecl LuaScript::cShowSkillWin(lua_State *L)
{
  bool v1; // bl@1
  PgFrameWork *v2; // eax@1
  PgWin *v3; // esi@2

  v1 = lua_toboolean(L, 1) != 0;
  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    v3 = (PgWin *)v2[20].m_pkMsgHooker;
    if ( v3 )
    {
      if ( v1 )
      {
        SkillWin::ResetContents((SkillWin *)v2[20].m_pkMsgHooker);
        PgWinMgr::ShowWin(&Pgg_kWinMgr, v3);
        return 0;
      }
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)v2[20].m_pkMsgHooker);
    }
  }
  return 0;
}

//----- (00424420) --------------------------------------------------------
int __cdecl LuaScript::cShowAnnounceWin(lua_State *L)
{
  bool v1; // bl@1
  PgFrameWork *v2; // eax@1
  PgWin *v3; // eax@2

  v1 = lua_toboolean(L, 1) != 0;
  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    v3 = (PgWin *)v2[28].m_kMsgQ.m_uiHead;
    if ( v3 )
    {
      if ( v1 )
      {
        PgWinMgr::ShowWin(&Pgg_kWinMgr, v3);
        return 0;
      }
      PgWinMgr::CloseWin(&Pgg_kWinMgr, v3);
    }
  }
  return 0;
}

//----- (00424480) --------------------------------------------------------
int __cdecl LuaScript::cShowMiniMapSideWin(lua_State *L)
{
  int v1; // ecx@0
  PgFrameWork *v2; // eax@1
  MiniMapWin *v3; // ecx@2
  int Show; // [sp+0h] [bp-4h]@1

  Show = v1;
  LOBYTE(Show) = lua_toboolean(L, 1) != 0;
  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    v3 = *(MiniMapWin **)&v2[15].m_bInit;
    if ( v3 )
      MiniMapWin::ShowSideWin(v3, Show);
  }
  return 0;
}

//----- (004244D0) --------------------------------------------------------
int __cdecl LuaScript::cShowHPBar(lua_State *L)
{
  byte_B4FF6B = lua_toboolean(L, 1) != 0;
  return 0;
}
// B4FF6B: using guessed type char byte_B4FF6B;

//----- (004244F0) --------------------------------------------------------
int __cdecl LuaScript::cShowSPBar(lua_State *L)
{
  byte_B4FF6C = lua_toboolean(L, 1) != 0;
  return 0;
}
// B4FF6C: using guessed type char byte_B4FF6C;

//----- (00424510) --------------------------------------------------------
int __cdecl LuaScript::cShowNPCName(lua_State *L)
{
  byte_B4FF68 = lua_toboolean(L, 1) != 0;
  return 0;
}
// B4FF68: using guessed type char byte_B4FF68;

//----- (00424530) --------------------------------------------------------
int __cdecl LuaScript::cCloseNPCDialog()
{
  PgFrameWork *v0; // eax@1
  NpcDialogWin *v1; // ecx@2

  v0 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v0 )
  {
    v1 = *(NpcDialogWin **)&v0[26].m_bInit;
    if ( v1 )
      NpcDialogWin::CloseDialog(v1);
  }
  if ( g_pkMainChar )
    MainChar::SetTargetChar((MainChar *)g_pkMainChar, 0);
  return 0;
}

//----- (00424570) --------------------------------------------------------
int __cdecl LuaScript::cOpenFreeStat()
{
  PgFrameWork *v0; // eax@1
  PgWin *v1; // esi@2

  v0 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v0 )
  {
    v1 = (PgWin *)v0[19].m_kMsgQ.m_uiTail;
    if ( PgWinMgr::IsIn(&Pgg_kWinMgr, (PgWin *)v0[19].m_kMsgQ.m_uiTail) )
      PgWin::ProcessMsg(v1, 5u, 0x15u, 0);
  }
  return 0;
}

//----- (004245B0) --------------------------------------------------------
int __cdecl LuaScript::cEnablePlayGuide(lua_State *L)
{
  int v1; // eax@1
  bool v2; // bl@1
  GameFrameWork *v3; // eax@1
  GameFrameWork *v4; // esi@1
  int v5; // eax@3

  v1 = lua_toboolean(L, 1);
  v2 = v1 != 0;
  byte_B4FF95 = v1 != 0;
  v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  v4 = v3;
  if ( v3 )
  {
    if ( v2 )
    {
      GameFrameWork::OpenPlayGuideMinWin(v3);
      Singleton<Tutorial>::getInstance();
      *(_BYTE *)(v5 + 18) = 1;
      return 0;
    }
    GameFrameWork::ClosePlayGuideWin(v3);
    GameFrameWork::ClosePlayGuideMinWin(v4);
  }
  return 0;
}
// B4FF95: using guessed type char byte_B4FF95;

//----- (00424620) --------------------------------------------------------
int __cdecl LuaScript::cResetCamera()
{
  PgFrameWork *v0; // eax@1
  CameraEffect *v1; // ecx@2

  v0 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v0 )
  {
    v1 = (CameraEffect *)v0[134].vfptr;
    if ( v1 )
      CameraEffect::Start(v1, Timer::ms_fCurTime, 0.5, 4u, 1u);
  }
  return 0;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00424660) --------------------------------------------------------
int __cdecl LuaScript::cMoveCamera(lua_State *L)
{
  PgFrameWork *v1; // eax@1
  PgFrameWork *v2; // esi@1
  float fY; // ST34_4@3
  float fX; // ST30_4@3
  IDirectMessengerVtbl *v5; // eax@3
  float v6; // edx@3
  double v7; // st7@3
  double v8; // st7@3
  float fAngleUD; // ST38_4@3
  float v10; // ST34_4@3
  CameraEffect *v11; // ecx@3
  NiPoint3 CameraLookAt; // [sp+18h] [bp-38h]@3
  NiPoint3 DestPos; // [sp+24h] [bp-2Ch]@3
  void (__thiscall *v15)(IDirectMessenger *, int, void *, IDirectMessenger *); // [sp+30h] [bp-20h]@3
  float v16; // [sp+34h] [bp-1Ch]@3
  void (__thiscall *v17)(IDirectMessenger *, int, void *, IDirectMessenger *); // [sp+38h] [bp-18h]@3
  int Dist; // [sp+3Ch] [bp-14h]@1
  int AngleXZ; // [sp+40h] [bp-10h]@1
  int AngleY; // [sp+44h] [bp-Ch]@1
  int PosX; // [sp+48h] [bp-8h]@1
  int PosY; // [sp+4Ch] [bp-4h]@1

  PosX = lua_tointegerx(L, 1, 0);
  PosY = lua_tointegerx(L, 2, 0);
  AngleXZ = lua_tointegerx(L, 3, 0);
  AngleY = lua_tointegerx(L, 4, 0);
  Dist = lua_tointegerx(L, 5, 0);
  v1 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  v2 = v1;
  if ( v1 && v1[134].vfptr )
  {
    fY = (double)PosY;
    fX = (double)PosX;
    World::GetAdvGroundPos(&g_kWorld, fX, fY, &DestPos);
    ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[21].Affect)(&CameraLookAt);
    v5 = v2[134].vfptr;
    *(float *)&v15 = DestPos.x - CameraLookAt.x;
    v16 = DestPos.y - CameraLookAt.y;
    v6 = v16;
    v7 = DestPos.z - CameraLookAt.z;
    v5[1].DirectDispatchToParent = v15;
    *(float *)&v5[2].SetMsgHooker = v6;
    *(float *)&v17 = v7;
    v8 = (double)AngleY;
    v5[2].SendDirectMessage = v17;
    fAngleUD = v8;
    v10 = (double)AngleXZ;
    CameraEffect::SetAngle((CameraEffect *)v2[134].vfptr, v10, fAngleUD);
    v11 = (CameraEffect *)v2[134].vfptr;
    v11->m_fDist = (double)Dist;
    CameraEffect::Start(v11, Timer::ms_fCurTime, 0.5, 3u, 1u);
  }
  return 0;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00424790) --------------------------------------------------------
int __cdecl LuaScript::cCameraEffect(lua_State *L)
{
  unsigned int v1; // esi@1
  PgFrameWork *v2; // eax@1
  CameraEffect *v3; // eax@2

  v1 = lua_tointegerx(L, 1, 0);
  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    v3 = (CameraEffect *)v2[134].vfptr;
    if ( v3 )
      CameraEffect::Start(v3, Timer::ms_fCurTime, 0.5, v1, 1u);
  }
  return 0;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004247F0) --------------------------------------------------------
int __cdecl LuaScript::cSetCameraCtrl(lua_State *L)
{
  float Zoom; // ST30_4@1
  float AngleUD; // ST2C_4@1
  float AngleLR; // ST28_4@1
  int result; // eax@1

  Zoom = lua_tonumberx(L, 1, 0);
  AngleUD = lua_tonumberx(L, 2, 0);
  AngleLR = lua_tonumberx(L, 3, 0);
  CameraCtrl::SetZoom(&_that, Zoom);
  _that.m_fAngleUD = AngleUD;
  result = 0;
  _that.m_fAngleLR = AngleLR;
  return result;
}

//----- (00424850) --------------------------------------------------------
int __cdecl LuaScript::cAddSysMsg(lua_State *L)
{
  const char *v1; // eax@1
  GameFrameWork *v2; // eax@1
  const char *v3; // ecx@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > SysMsg; // [sp+8h] [bp-2Ch]@1
  int v6; // [sp+30h] [bp-4h]@1

  SysMsg._Myres = 15;
  SysMsg._Mysize = 0;
  SysMsg._Bx._Buf[0] = 0;
  v1 = lua_tolstring(L, 1, 0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&SysMsg, v1, strlen(v1));
  v6 = 0;
  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    v3 = SysMsg._Bx._Ptr;
    if ( SysMsg._Myres < 0x10 )
      v3 = (const char *)&SysMsg;
    GameFrameWork::AddSysMsg(v2, v3);
  }
  if ( SysMsg._Myres >= 0x10 )
    operator delete(SysMsg._Bx._Ptr);
  return 0;
}

//----- (00424920) --------------------------------------------------------
int __cdecl LuaScript::cScriptMsg(lua_State *L)
{
  const char *v1; // eax@1
  unsigned __int16 v2; // si@1
  const char *v3; // eax@1
  ScriptMsg *v4; // eax@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > ScriptIndex; // [sp+Ch] [bp-2Ch]@1
  int v7; // [sp+34h] [bp-4h]@1

  ScriptIndex._Myres = 15;
  ScriptIndex._Mysize = 0;
  ScriptIndex._Bx._Buf[0] = 0;
  v1 = lua_tolstring(L, 1, 0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&ScriptIndex, v1, strlen(v1));
  v7 = 0;
  v2 = lua_tointegerx(L, 2, 0);
  v3 = ScriptIndex._Bx._Ptr;
  if ( ScriptIndex._Myres < 0x10 )
    v3 = (const char *)&ScriptIndex;
  v4 = ScriptMsgTab::GetScriptMsgInfo(v3);
  ScriptMsgCtrl::AddMsg(v4, 0, v2);
  if ( ScriptIndex._Myres >= 0x10 )
    operator delete(ScriptIndex._Bx._Ptr);
  return 0;
}

//----- (004249F0) --------------------------------------------------------
int __cdecl LuaScript::cLoadEffect(lua_State *L)
{
  const char *v1; // eax@1
  unsigned __int8 v2; // bl@1
  float fY; // ST28_4@1
  float fX; // ST24_4@1
  char *v5; // ecx@1
  _BYTE v6[12]; // ST1C_12@3
  _BYTE v7[12]; // ST10_12@3
  Effect *v8; // eax@3
  Effect *v9; // esi@3
  NiNode *v10; // eax@4
  NiPoint3 kPos; // [sp+18h] [bp-74h]@1
  NiPoint3 kDir; // [sp+24h] [bp-68h]@1
  int PosY; // [sp+30h] [bp-5Ch]@1
  float Scale; // [sp+34h] [bp-58h]@1
  int PosX; // [sp+38h] [bp-54h]@1
  NiMatrix3 v17; // [sp+3Ch] [bp-50h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > EffectName; // [sp+60h] [bp-2Ch]@1
  int v19; // [sp+88h] [bp-4h]@1

  EffectName._Myres = 15;
  EffectName._Mysize = 0;
  EffectName._Bx._Buf[0] = 0;
  v1 = lua_tolstring(L, 1, 0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&EffectName, v1, strlen(v1));
  v19 = 0;
  *(float *)&PosX = COERCE_FLOAT(lua_tointegerx(L, 2, 0));
  PosY = lua_tointegerx(L, 3, 0);
  v2 = lua_tointegerx(L, 4, 0);
  Scale = lua_tonumberx(L, 5, 0);
  fY = (double)PosY;
  fX = (double)PosX;
  World::GetAdvGroundPos(&g_kWorld, fX, fY, &kPos);
  *(float *)&PosX = (NI_PI + NI_PI) * (double)v2 / 180.0;
  NiMatrix3::MakeZRotation(&v17, *(float *)&PosX);
  NiMatrix3::operator*(&v17, &kDir, &World::ms_kNorthDir);
  v5 = EffectName._Bx._Ptr;
  if ( EffectName._Myres < 0x10 )
    v5 = (char *)&EffectName;
  *(float *)v6 = kDir.x;
  *(_QWORD *)&v6[4] = *(_QWORD *)&kDir.y;
  *(float *)v7 = kPos.x;
  *(_QWORD *)&v7[4] = *(_QWORD *)&kPos.y;
  v8 = EffectMgr::JustCreateEffect(&g_kEffectMgr, v5, *(NiPoint3 *)v7, *(NiPoint3 *)v6, 0.0, 1);
  v9 = v8;
  if ( v8 )
  {
    v10 = v8->m_spDefaultEffect.m_pObject;
    if ( v10 )
    {
      Scale = fabs(Scale);
      v10->m_kLocal.m_fScale = Scale;
    }
    EffectMgr::AttachEffectToWorld(&g_kEffectMgr, v9);
    v9->vfptr[15].__vecDelDtor((NiRefObject *)v9, LODWORD(Timer::ms_fCurTime));
  }
  if ( EffectName._Myres >= 0x10 )
    operator delete(EffectName._Bx._Ptr);
  return 0;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// B622CC: using guessed type const float NI_PI;

//----- (00424BB0) --------------------------------------------------------
int __cdecl LuaScript::cLoadKFM(lua_State *L)
{
  const char *v1; // eax@1
  unsigned __int8 v2; // bl@1
  float fY; // ST1C_4@1
  float fX; // ST18_4@1
  void *v5; // esi@1
  void *v6; // edi@1
  char *v7; // eax@5
  const char *v8; // eax@5
  NiActorManager *v9; // esi@5
  NiAVObject *v10; // ebx@8
  NiPoint3 kDir; // [sp+1Ch] [bp-70h]@1
  NiPoint3 kPos; // [sp+28h] [bp-64h]@1
  NiPointer<NiAVObject> spRootNode; // [sp+34h] [bp-58h]@1
  int PosX; // [sp+38h] [bp-54h]@1
  NiMatrix3 kRot; // [sp+3Ch] [bp-50h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > filename; // [sp+60h] [bp-2Ch]@1
  int v18; // [sp+88h] [bp-4h]@1

  filename._Myres = 15;
  filename._Mysize = 0;
  filename._Bx._Buf[0] = 0;
  v1 = lua_tolstring(L, 1, 0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&filename, v1, strlen(v1));
  v18 = 0;
  *(float *)&PosX = COERCE_FLOAT(lua_tointegerx(L, 2, 0));
  spRootNode.m_pObject = (NiAVObject *)lua_tointegerx(L, 3, 0);
  v2 = lua_tointegerx(L, 4, 0);
  fY = (double)(signed int)spRootNode.m_pObject;
  fX = (double)PosX;
  World::GetAdvGroundPos(&g_kWorld, fX, fY, &kPos);
  *(float *)&PosX = (NI_PI + NI_PI) * (double)v2 / 180.0;
  NiMatrix3::MakeZRotation(&kRot, *(float *)&PosX);
  NiMatrix3::operator*(&kRot, &kDir, &World::ms_kNorthDir);
  v5 = filename._Bx._Ptr;
  v6 = filename._Bx._Ptr;
  if ( filename._Myres < 0x10 )
  {
    v6 = &filename;
    v5 = &filename;
  }
  if ( !Folder::m_bInit )
    Folder::Init();
  v7 = fs("%s\\%s.kfm", v5, v6);
  v8 = Folder::Merge(&Folder::m_acCharacter, v7);
  v9 = NiActorManager::Create(v8, 0, 1, 0);
  PosX = (int)v9;
  if ( v9 )
    InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  if ( v9 )
  {
    v10 = v9->m_spNIFRoot.m_pObject;
    spRootNode.m_pObject = v10;
    if ( v10 )
      InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
    LOBYTE(v18) = 2;
    if ( v10 )
    {
      v10->m_kLocal.m_Translate = kPos;
      NpNs_RotateModelZToVector(&kDir, &kRot);
      qmemcpy(&v10->m_kLocal, &kRot, 0x24u);
      NiAVObject::Update(v10, 0.0, 1);
      NiAVObject::UpdateProperties(v10);
      NiAVObject::UpdateEffects(v10);
      v10->m_uFlags &= 0xFFFEu;
      (*(void (__stdcall **)(NiAVObject *, _DWORD))(*unk_A995C4 + 116))(v10, 0);
      v9 = (NiActorManager *)PosX;
    }
    NiActorManager::SetTargetAnimation(v9, 0x18A88u);
    NiActorManager::Update(v9, 0.0);
    LOBYTE(v18) = 1;
    if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
  }
  LOBYTE(v18) = 0;
  if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
    v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
  if ( filename._Myres >= 0x10 )
    operator delete(filename._Bx._Ptr);
  return 0;
}
// A8975C: using guessed type bool Folder::m_bInit;
// B622CC: using guessed type const float NI_PI;

//----- (00424E10) --------------------------------------------------------
int __cdecl LuaScript::cShowGroundObject(lua_State *L)
{
  const char *v1; // eax@1
  bool v2; // zf@1
  const char *v3; // eax@1
  bool v4; // bl@1
  NiAVObject *v5; // esi@7
  NiPointer<NiAVObject> spObj; // [sp+10h] [bp-30h]@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > NodeName; // [sp+14h] [bp-2Ch]@1
  int v9; // [sp+3Ch] [bp-4h]@1

  NodeName._Myres = 15;
  NodeName._Mysize = 0;
  NodeName._Bx._Buf[0] = 0;
  v1 = lua_tolstring(L, 1, 0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&NodeName, v1, strlen(v1));
  v9 = 0;
  v2 = lua_toboolean(L, 2) == 0;
  v3 = NodeName._Bx._Ptr;
  v4 = !v2;
  if ( NodeName._Myres < 0x10 )
    v3 = (const char *)&NodeName;
  World::GetGroundObject(&g_kWorld, (int)L, &spObj, v3);
  if ( spObj.m_pObject )
  {
    if ( v4 )
      spObj.m_pObject->m_uFlags &= 0xFFFEu;
    else
      spObj.m_pObject->m_uFlags |= 1u;
    v5 = spObj.m_pObject;
    if ( spObj.m_pObject )
    {
      if ( !InterlockedDecrement((volatile LONG *)&spObj.m_pObject->m_uiRefCount) && v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
  }
  if ( NodeName._Myres >= 0x10 )
    operator delete(NodeName._Bx._Ptr);
  return 0;
}

//----- (00424F20) --------------------------------------------------------
int __cdecl LuaScript::cPersonalScriptMsg(lua_State *L)
{
  const char *v1; // eax@1
  const char *v2; // eax@1
  unsigned int v3; // eax@3
  char *v4; // edi@3
  unsigned int v5; // esi@3
  int v6; // eax@6
  const char *v7; // eax@6
  unsigned int v8; // esi@7
  char *v9; // edi@7
  const char *v10; // eax@7
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v11; // eax@11
  ScriptMsg *pkScriptMsg; // [sp+10h] [bp-6Ch]@3
  unsigned __int16 Handle; // [sp+14h] [bp-68h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > ScriptIndex; // [sp+18h] [bp-64h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > message; // [sp+34h] [bp-48h]@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > personalText; // [sp+50h] [bp-2Ch]@5
  int v18; // [sp+78h] [bp-4h]@1

  ScriptIndex._Myres = 15;
  ScriptIndex._Mysize = 0;
  ScriptIndex._Bx._Buf[0] = 0;
  v1 = lua_tolstring(L, 1, 0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&ScriptIndex, v1, strlen(v1));
  v18 = 0;
  Handle = lua_tointegerx(L, 2, 0);
  v2 = ScriptIndex._Bx._Ptr;
  if ( ScriptIndex._Myres < 0x10 )
    v2 = (const char *)&ScriptIndex;
  pkScriptMsg = ScriptMsgTab::GetScriptMsgInfo(v2);
  message._Myres = 15;
  message._Mysize = 0;
  message._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &message,
    pkScriptMsg->SM_Msg,
    strlen(pkScriptMsg->SM_Msg));
  LOBYTE(v18) = 1;
  v3 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::find(&message, "%s", 0, 2u);
  v4 = message._Bx._Ptr;
  v5 = v3;
  if ( message._Myres < 0x10 )
    v4 = (char *)&message;
  personalText._Myres = 15;
  personalText._Mysize = 0;
  personalText._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&personalText, &byte_973A97, 0);
  LOBYTE(v18) = 2;
  if ( v5 != -1 )
  {
    v6 = ((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)();
    v7 = fs(v4, v6);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&personalText, v7, strlen(v7));
  }
  v8 = personalText._Myres;
  v9 = personalText._Bx._Ptr;
  v10 = personalText._Bx._Ptr;
  if ( personalText._Myres < 0x10 )
    v10 = (const char *)&personalText;
  if ( std::char_traits<char>::compare(v10, &First2, 0) || personalText._Mysize != 0 )
  {
    v11 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v9;
    if ( v8 < 0x10 )
      v11 = &personalText;
    ScriptMsgCtrl::AddMsg(pkScriptMsg, v11->_Bx._Buf, Handle);
  }
  else
  {
    ScriptMsgCtrl::AddMsg(pkScriptMsg, 0, Handle);
  }
  if ( personalText._Myres >= 0x10 )
    operator delete(personalText._Bx._Ptr);
  personalText._Myres = 15;
  personalText._Mysize = 0;
  personalText._Bx._Buf[0] = 0;
  if ( message._Myres >= 0x10 )
    operator delete(message._Bx._Ptr);
  message._Myres = 15;
  message._Mysize = 0;
  message._Bx._Buf[0] = 0;
  if ( ScriptIndex._Myres >= 0x10 )
    operator delete(ScriptIndex._Bx._Ptr);
  return 0;
}

//----- (00425120) --------------------------------------------------------
int __cdecl LuaScript::cOpenNPCDialog(lua_State *L)
{
  const char *v1; // eax@1
  PgFrameWork *v2; // esi@1
  const char *v3; // eax@2
  ScriptMsg *v4; // edi@4
  NpcDialogWin *v5; // esi@5
  bool CloseBtn; // [sp+Ch] [bp-34h]@1
  int MobID; // [sp+10h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > ScriptIndex; // [sp+14h] [bp-2Ch]@1
  int v10; // [sp+3Ch] [bp-4h]@1

  MobID = lua_tointegerx(L, 1, 0);
  ScriptIndex._Myres = 15;
  ScriptIndex._Mysize = 0;
  ScriptIndex._Bx._Buf[0] = 0;
  v1 = lua_tolstring(L, 2, 0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&ScriptIndex, v1, strlen(v1));
  v10 = 0;
  CloseBtn = lua_toboolean(L, 3) != 0;
  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    v3 = ScriptIndex._Bx._Ptr;
    if ( ScriptIndex._Myres < 0x10 )
      v3 = (const char *)&ScriptIndex;
    v4 = ScriptMsgTab::GetScriptMsgInfo(v3);
    if ( v4 )
    {
      v5 = *(NpcDialogWin **)&v2[26].m_bInit;
      if ( v5 )
      {
        NpcDialogWin::CloseDialog(v5);
        NpcDialogWin::OpenNpcScriptDialog(v5, MobID, v4->SM_Msg, CloseBtn);
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v5->vfptr);
      }
    }
  }
  if ( ScriptIndex._Myres >= 0x10 )
    operator delete(ScriptIndex._Bx._Ptr);
  return 0;
}

//----- (00425240) --------------------------------------------------------
int __cdecl LuaScript::cGetWin(lua_State *L)
{
  const char *v1; // eax@1
  PgWin *v2; // esi@1
  int result; // eax@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v4; // [sp-1Ch] [bp-5Ch]@1
  int v5; // [sp-Ch] [bp-4Ch]@1
  signed int v6; // [sp-8h] [bp-48h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v7; // [sp+10h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > WinName; // [sp+14h] [bp-2Ch]@1
  int v9; // [sp+3Ch] [bp-4h]@1

  WinName._Myres = 15;
  WinName._Mysize = 0;
  WinName._Bx._Buf[0] = 0;
  v1 = lua_tolstring(L, 1, 0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&WinName, v1, strlen(v1));
  v7 = &v4;
  v6 = 15;
  v5 = 0;
  v9 = 0;
  v4._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v4, &WinName, 0, 0xFFFFFFFF);
  v2 = PgWinMgr::Find(&Pgg_kWinMgr, v4);
  if ( v2 )
  {
    lua_pushboolean(L, 1);
    lua_pushlightuserdata(L, v2);
    if ( WinName._Myres >= 0x10 )
      operator delete(WinName._Bx._Ptr);
    result = 2;
  }
  else
  {
    lua_pushboolean(L, 0);
    if ( WinName._Myres >= 0x10 )
      operator delete(WinName._Bx._Ptr);
    result = 1;
  }
  return result;
}

//----- (00425340) --------------------------------------------------------
int __cdecl LuaScript::cCreateText(lua_State *L)
{
  PgWin *v1; // edi@1
  bool Enable; // ST58_1@1
  const char *v3; // eax@1
  PgFont *v4; // eax@3
  PgWinText *v5; // edi@3
  void *v6; // eax@3
  int Width; // [sp+10h] [bp-40h]@1
  int Height; // [sp+14h] [bp-3Ch]@1
  int X; // [sp+1Ch] [bp-34h]@1
  int Y; // [sp+20h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > Text; // [sp+24h] [bp-2Ch]@1
  int v13; // [sp+4Ch] [bp-4h]@1

  v1 = (PgWin *)lua_touserdata(L, 1);
  X = lua_tointegerx(L, 2, 0);
  Y = lua_tointegerx(L, 3, 0);
  Width = lua_tointegerx(L, 4, 0);
  Height = lua_tointegerx(L, 5, 0);
  Enable = lua_toboolean(L, 6) != 0;
  v3 = lua_tolstring(L, 7, 0);
  Text._Myres = 15;
  Text._Mysize = 0;
  Text._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Text, v3, strlen(v3));
  v13 = 0;
  if ( !lua_type(L, (int)v1) )
    v1 = 0;
  v4 = Font::Get(0);
  v5 = PgWinText::CreateWin(X, Y, Width, Height, v4, v1, 0, 0);
  ((void (__thiscall *)(PgWinText *))v5->vfptr[60].__vecDelDtor)(v5);
  v5->vfptr[64].__vecDelDtor((NiRefObject *)v5, 1u);
  v6 = Text._Bx._Ptr;
  if ( Text._Myres < 0x10 )
    v6 = &Text;
  v5->vfptr[118].__vecDelDtor((NiRefObject *)v5, (unsigned int)v6);
  v5->vfptr[122].__vecDelDtor((NiRefObject *)v5, 5u);
  lua_pushlightuserdata(L, v5);
  if ( Text._Myres >= 0x10 )
    operator delete(Text._Bx._Ptr);
  return 1;
}

//----- (004254C0) --------------------------------------------------------
int __cdecl LuaScript::cCreateButton(lua_State *L)
{
  PgWin *v1; // ebx@1
  bool Enable; // ST50_1@1
  const char *v3; // edi@1
  NiSourceTexture *v4; // eax@3
  PgSprData *v5; // eax@3
  PgWinBut *v6; // ebx@3
  PgFont *v7; // eax@3
  PgWinText *v8; // edi@3
  void *v9; // eax@3
  int X; // [sp+14h] [bp-3Ch]@1
  int Y; // [sp+18h] [bp-38h]@1
  int Height; // [sp+1Ch] [bp-34h]@1
  int Width; // [sp+20h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > Text; // [sp+24h] [bp-2Ch]@1
  int v16; // [sp+4Ch] [bp-4h]@1

  v1 = (PgWin *)lua_touserdata(L, 1);
  X = lua_tointegerx(L, 2, 0);
  Y = lua_tointegerx(L, 3, 0);
  Width = lua_tointegerx(L, 4, 0);
  Height = lua_tointegerx(L, 5, 0);
  Enable = lua_toboolean(L, 6) != 0;
  Text._Myres = 15;
  Text._Mysize = 0;
  Text._Bx._Buf[0] = 0;
  v3 = lua_tolstring(L, 7, 0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Text, v3, strlen(v3));
  v16 = 0;
  lua_tointegerx(L, 8, 0);
  if ( !lua_type(L, (int)v1) )
    v1 = 0;
  v4 = PgUtil::Create1PixelSourceTexture(0, 0, 0, -1);
  v5 = PgSprData::Create(v4, 1, X, Y, Width, Height);
  v6 = PgWinBut::CreateWin(X, Y, v5, v1, 1u, 0, 0);
  ((void (__thiscall *)(PgWinBut *))v6->vfptr[60].__vecDelDtor)(v6);
  v6->vfptr[64].__vecDelDtor((NiRefObject *)v6, 1u);
  v7 = Font::Get(0);
  v8 = PgWinText::CreateWin(0, 0, Width, Height, v7, (PgWin *)&v6->vfptr, 0, 0);
  v8->vfptr[60].__vecDelDtor((NiRefObject *)v8, 0);
  v8->vfptr[64].__vecDelDtor((NiRefObject *)v8, 1u);
  v9 = Text._Bx._Ptr;
  if ( Text._Myres < 0x10 )
    v9 = &Text;
  v8->vfptr[118].__vecDelDtor((NiRefObject *)v8, (unsigned int)v9);
  v8->vfptr[122].__vecDelDtor((NiRefObject *)v8, 5u);
  lua_pushlightuserdata(L, v6);
  if ( Text._Myres >= 0x10 )
    operator delete(Text._Bx._Ptr);
  return 1;
}

//----- (004256A0) --------------------------------------------------------
int __cdecl LuaScript::cActSkill(lua_State *L)
{
  unsigned __int16 v1; // di@1
  const char *v2; // eax@1
  Char *v3; // edi@1
  char *v4; // eax@4
  Char *v5; // eax@9
  Char *v6; // esi@9
  SkillSequence *v7; // eax@10
  unsigned __int16 v8; // dx@13
  unsigned __int16 AttackerHandle; // [sp+10h] [bp-34h]@1
  ActiveSkillInfo *pkInfo; // [sp+14h] [bp-30h]@6
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > SkillIndex; // [sp+18h] [bp-2Ch]@1
  int v13; // [sp+40h] [bp-4h]@1

  AttackerHandle = lua_tointegerx(L, 1, 0);
  v1 = lua_tointegerx(L, 2, 0);
  SkillIndex._Myres = 15;
  SkillIndex._Mysize = 0;
  SkillIndex._Bx._Buf[0] = 0;
  v2 = lua_tolstring(L, 3, 0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&SkillIndex, v2, strlen(v2));
  v13 = 0;
  v3 = CharMgr::GetChar(&g_kCharMgr, v1);
  if ( v3 )
  {
    v4 = SkillIndex._Bx._Ptr;
    if ( SkillIndex._Myres < 0x10 )
      v4 = (char *)&SkillIndex;
    pkInfo = ActSkillInfoTab::GetByInxName(v4);
    if ( pkInfo )
    {
      v5 = CharMgr::GetChar(&g_kCharMgr, AttackerHandle);
      v6 = v5;
      if ( v5 )
      {
        ((void (__thiscall *)(Char *, Char *, signed int, _DWORD))v5->vfptr[9].GetAbstateColor)(v5, v3, 1, pkInfo->ID);
        v7 = (SkillSequence *)operator new(0x18u);
        if ( v7 )
        {
          v7->kDamageInfoSet.kDamageList.m_kAllocator.m_uiCount = 0;
          v7->kDamageInfoSet.kDamageList.m_pkHead = 0;
          v7->kDamageInfoSet.kDamageList.m_pkTail = 0;
          v7->kDamageInfoSet.kDamageList.vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTList<DamageInfo *>::`vftable';
        }
        else
        {
          v7 = 0;
        }
        v8 = pkInfo->ID;
        v7->m_Index = 0;
        v7->kSkillID = v8;
        AttackSequenceManager::AddSkillSeq((AttackSequenceManager *)&v6->vfptr, v7);
      }
      if ( SkillIndex._Myres >= 0x10 )
        operator delete(SkillIndex._Bx._Ptr);
    }
    else if ( SkillIndex._Myres >= 0x10 )
    {
      operator delete(SkillIndex._Bx._Ptr);
    }
  }
  else if ( SkillIndex._Myres >= 0x10 )
  {
    operator delete(SkillIndex._Bx._Ptr);
  }
  return 0;
}
// 973DFC: using guessed type int (__thiscall *NiTList<DamageInfo *>::`vftable')(void *p, char);

//----- (00425800) --------------------------------------------------------
int __cdecl LuaScript::cGetCameraCtrl(lua_State *L)
{
  double v1; // st7@1
  CameraCtrl kCameraCtrl; // [sp+10h] [bp-88h]@1
  int v4; // [sp+94h] [bp-4h]@1

  CameraCtrl::CameraCtrl(&kCameraCtrl, &_that);
  v4 = 0;
  v1 = CameraCtrl::GetZoom(&kCameraCtrl);
  lua_pushnumber(L, v1);
  lua_pushnumber(L, kCameraCtrl.m_fAngleUD);
  lua_pushnumber(L, kCameraCtrl.m_fAngleLR);
  v4 = -1;
  CameraCtrl::~CameraCtrl(&kCameraCtrl);
  return 3;
}

//----- (004258A0) --------------------------------------------------------
void __thiscall LuaScript::initFunc(LuaScript *this)
{
  LuaScript *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD, _DWORD))this->vfptr[6].__vecDelDtor)("cGetCurTime", LuaScript::cGetCurTime);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(v1, "cAddSysMsg", LuaScript::cAddSysMsg);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cSetEnableInput",
    LuaScript::cSetEnableInput);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(v1, "cScriptMsg", LuaScript::cScriptMsg);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(v1, "cGetUser", LuaScript::cGetUser);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cGetRemainStatPoint",
    LuaScript::cGetRemainStatPoint);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(v1, "cGetHP", LuaScript::cGetHP);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(v1, "cGetMaxHP", LuaScript::cGetMaxHP);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(v1, "cLoadChar", LuaScript::cLoadChar);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(v1, "cDeleteChar", LuaScript::cDeleteChar);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(v1, "cMoveChar", LuaScript::cMoveChar);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(v1, "cGetCharPos", LuaScript::cGetCharPos);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(v1, "cActChar", LuaScript::cActChar);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(v1, "cActSkill", LuaScript::cActSkill);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(v1, "cGetClass", LuaScript::cGetClass);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cIsDuringMove",
    LuaScript::cIsDuringMove);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(v1, "cIsAttack", LuaScript::cIsAttack);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(v1, "cGetCharMode", LuaScript::cGetCharMode);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cGetMainCharHandle",
    LuaScript::cGetMainCharHandle);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cMoveMainChar",
    LuaScript::cMoveMainChar);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cGetQuestStatus",
    LuaScript::cGetQuestStatus);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(v1, "cLoadEffect", LuaScript::cLoadEffect);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(v1, "cLoadKFM", LuaScript::cLoadKFM);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cShowGroundObject",
    LuaScript::cShowGroundObject);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cShowInterface",
    LuaScript::cShowInterface);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cShowBasicInfo",
    LuaScript::cShowBasicInfo);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(v1, "cShowHelpWin", LuaScript::cShowHelpWin);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(v1, "cShowCharWin", LuaScript::cShowCharWin);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cShowInvenWin",
    LuaScript::cShowInvenWin);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cShowSkillWin",
    LuaScript::cShowSkillWin);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cShowAnnounceWin",
    LuaScript::cShowAnnounceWin);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cShowQuestNewsWin",
    LuaScript::cShowQuestNewsWin);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cShowMiniMapSideWin",
    LuaScript::cShowMiniMapSideWin);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(v1, "cShowHPBar", LuaScript::cShowHPBar);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(v1, "cShowSPBar", LuaScript::cShowSPBar);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(v1, "cShowNPCName", LuaScript::cShowNPCName);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cOpenNPCDialog",
    LuaScript::cOpenNPCDialog);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cCloseNPCDialog",
    LuaScript::cCloseNPCDialog);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cOpenFreeStat",
    LuaScript::cOpenFreeStat);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cCloseShopWin",
    LuaScript::cCloseShopWin);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cEnablePlayGuide",
    LuaScript::cEnablePlayGuide);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(v1, "cGetWin", LuaScript::cGetWin);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(v1, "cGetShowWin", LuaScript::cGetShowWin);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(v1, "cResetCamera", LuaScript::cResetCamera);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(v1, "cMoveCamera", LuaScript::cMoveCamera);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cCameraEffect",
    LuaScript::cCameraEffect);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cGetCameraCtrl",
    LuaScript::cGetCameraCtrl);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cSetCameraCtrl",
    LuaScript::cSetCameraCtrl);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cCreateSprite",
    LuaScript::cCreateSprite);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(v1, "cCreateText", LuaScript::cCreateText);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cCreateButton",
    LuaScript::cCreateButton);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cShowQuestWin",
    LuaScript::cShowQuestWin);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cPersonalScriptMsg",
    LuaScript::cPersonalScriptMsg);
}

//----- (00425CA0) --------------------------------------------------------
void __cdecl Singleton<Tutorial>::getInstance()
{
  Tutorial *v0; // eax@2
  Tutorial *v1; // eax@3

  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v0 = (Tutorial *)operator new(0xB4u);
    if ( v0 )
    {
      Tutorial::Tutorial(v0);
      Singleton<Tutorial>::m_pInstance = v1;
    }
    else
    {
      Singleton<Tutorial>::m_pInstance = 0;
    }
  }
}

//----- (00425D20) --------------------------------------------------------
NiPoint3 *__thiscall NiPoint3::operator-(NiPoint3 *this, NiPoint3 *result, NiPoint3 *pt)
{
  NiPoint3 *v3; // eax@1

  v3 = result;
  result->x = this->x - pt->x;
  result->y = this->y - pt->y;
  result->z = this->z - pt->z;
  return v3;
}

//----- (00425D50) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<DamageInfo *>,DamageInfo *>::~NiTListBase<DFALL<DamageInfo *>,DamageInfo *>(NiTListBase<DFALL<DamageInfo *>,DamageInfo *> *this)
{
  this->vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable';
}
// 973DBC: using guessed type int (__thiscall *NiTListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable')(void *p, char);

//----- (00425D60) --------------------------------------------------------
unsigned int __cdecl ITableBase<ScriptMsg,ScriptMsgTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<ScriptMsg,ScriptMsgTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A89C90: using guessed type int ITableBase<ScriptMsg,ScriptMsgTab>::ms_pkTable;

//----- (00425D80) --------------------------------------------------------
NiTListBase<DFALL<DamageInfo *>,DamageInfo *> *__thiscall NiTListBase<DFALL<DamageInfo *>,DamageInfo *>::`scalar deleting destructor'(NiTListBase<DFALL<DamageInfo *>,DamageInfo *> *this, unsigned int a2)
{
  NiTListBase<DFALL<DamageInfo *>,DamageInfo *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 973DBC: using guessed type int (__thiscall *NiTListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable')(void *p, char);

//----- (00425DB0) --------------------------------------------------------
NiPoint3 *__cdecl NetUtil::NetDir2Point3Dir(NiPoint3 *result, char byNetDir)
{
  float v2; // ST0C_4@1
  NiMatrix3 kMat3; // [sp+Ch] [bp-28h]@1

  v2 = (NI_PI + NI_PI) * (double)(unsigned __int8)byNetDir / 180.0;
  NiMatrix3::MakeZRotation(&kMat3, v2);
  NiMatrix3::operator*(&kMat3, result, &World::ms_kNorthDir);
  return result;
}
// B622CC: using guessed type const float NI_PI;

//----- (00425E10) --------------------------------------------------------
LuaArgument *__thiscall LuaArgument::`scalar deleting destructor'(LuaArgument *this, unsigned int a2)
{
  LuaArgument *v2; // esi@1

  v2 = this;
  this->vfptr = (LuaArgumentVtbl *)&LuaArgument::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 973DA4: using guessed type int (__thiscall *LuaArgument::`vftable')(void *p, char);

//----- (00425E40) --------------------------------------------------------
void __thiscall Effect::SetScale(Effect *this, float fScale)
{
  NiNode *v2; // eax@1
  float fScalea; // [sp+8h] [bp+8h]@2

  v2 = this->m_spDefaultEffect.m_pObject;
  if ( v2 )
  {
    fScalea = fabs(fScale);
    v2->m_kLocal.m_fScale = fScalea;
  }
}

//----- (00425E60) --------------------------------------------------------
void __thiscall DamageInfoSet::Clear(DamageInfoSet *this)
{
  DamageInfoSet *v1; // esi@1
  NiTListItem<DamageInfo *> *v2; // eax@2
  NiTListItem<DamageInfo *> *v3; // ecx@2
  DamageInfo *v4; // edi@5

  v1 = this;
  while ( v1->kDamageList.m_kAllocator.m_uiCount )
  {
    v2 = v1->kDamageList.m_pkHead;
    v3 = v2->m_pkNext;
    v1->kDamageList.m_pkHead = v2->m_pkNext;
    if ( v3 )
      v3->m_pkPrev = 0;
    else
      v1->kDamageList.m_pkTail = 0;
    v4 = v2->m_element;
    v1->kDamageList.vfptr->DeleteItem((NiTListBase<DFALL<DamageInfo *>,DamageInfo *> *)v1, v2);
    --v1->kDamageList.m_kAllocator.m_uiCount;
    operator delete(v4);
  }
}

//----- (00425EB0) --------------------------------------------------------
void __thiscall NiTList<DamageInfo *>::~NiTList<DamageInfo *>(NiTList<DamageInfo *> *this)
{
  NiTList<DamageInfo *> *v1; // edi@1
  NiTListItem<DamageInfo *> *v2; // esi@1
  NiTListItem<DamageInfo *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTPointerListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<DFALL<DamageInfo *>,DamageInfo *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable';
}
// 973DBC: using guessed type int (__thiscall *NiTListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable')(void *p, char);
// 973DEC: using guessed type int (__thiscall *NiTPointerListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable')(void *p, char);

//----- (00425F30) --------------------------------------------------------
NiTPointerListBase<DFALL<DamageInfo *>,DamageInfo *> *__thiscall NiTList<DamageInfo *>::`scalar deleting destructor'(NiTPointerListBase<DFALL<DamageInfo *>,DamageInfo *> *this, unsigned int a2)
{
  NiTPointerListBase<DFALL<DamageInfo *>,DamageInfo *> *v2; // edi@1
  NiTListItem<DamageInfo *> *v3; // esi@1
  NiTListItem<DamageInfo *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTPointerListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<DFALL<DamageInfo *>,DamageInfo *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 973DBC: using guessed type int (__thiscall *NiTListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable')(void *p, char);
// 973DEC: using guessed type int (__thiscall *NiTPointerListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable')(void *p, char);

//----- (00425FC0) --------------------------------------------------------
ScriptMsg *__cdecl ScriptMsgTab::GetScriptMsgInfo(const char *kIndex)
{
  ScriptMsg *result; // eax@2
  unsigned int v2; // esi@3

  if ( kIndex )
  {
    v2 = 0;
    if ( ITableBase<ScriptMsg,ScriptMsgTab>::GetTotal() )
    {
      while ( 1 )
      {
        result = (ScriptMsg *)CDataReader::GetRecord(
                                (CDataReader *)(ITableBase<ScriptMsg,ScriptMsgTab>::ms_pkTable + 4),
                                v2);
        if ( result )
        {
          if ( result != (ScriptMsg *)-2 && !strcmp(kIndex, result->SM_Inx) )
            break;
        }
        if ( ++v2 >= ITableBase<ScriptMsg,ScriptMsgTab>::GetTotal() )
          goto LABEL_8;
      }
    }
    else
    {
LABEL_8:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A89C90: using guessed type int ITableBase<ScriptMsg,ScriptMsgTab>::ms_pkTable;

//----- (00426040) --------------------------------------------------------
int __thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, const char *_Ptr)
{
  return std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
           this,
           0,
           this->_Mysize,
           _Ptr,
           strlen(_Ptr));
}

//----- (00426070) --------------------------------------------------------
void __thiscall DamageInfoSet::~DamageInfoSet(DamageInfoSet *this)
{
  DamageInfoSet *v1; // edi@1
  NiTListItem<DamageInfo *> **v2; // esi@1
  NiTListItem<DamageInfo *> *v3; // ST00_4@2

  v1 = this;
  DamageInfoSet::Clear(this);
  v1->kDamageList.vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTPointerListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable';
  v2 = &v1->kDamageList.m_pkHead->m_pkNext;
  while ( v2 )
  {
    v3 = (NiTListItem<DamageInfo *> *)v2;
    v2 = (NiTListItem<DamageInfo *> **)*v2;
    v1->kDamageList.vfptr->DeleteItem((NiTListBase<DFALL<DamageInfo *>,DamageInfo *> *)v1, v3);
  }
  v1->kDamageList.m_kAllocator.m_uiCount = 0;
  v1->kDamageList.m_pkHead = 0;
  v1->kDamageList.m_pkTail = 0;
  v1->kDamageList.vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable';
}
// 973DBC: using guessed type int (__thiscall *NiTListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable')(void *p, char);
// 973DEC: using guessed type int (__thiscall *NiTPointerListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable')(void *p, char);

//----- (00426100) --------------------------------------------------------
void __thiscall std::list<float,std::allocator<float>>::_Insert<std::_List_const_iterator<std::_List_val<float,std::allocator<float>>>>(std::list<float,std::allocator<float> > *this, std::_List_const_iterator<std::_List_val<float,std::allocator<float> > > _Where, std::_List_const_iterator<std::_List_val<float,std::allocator<float> > > _First, std::_List_const_iterator<std::_List_val<float,std::allocator<float> > > _Last, std::forward_iterator_tag __formal)
{
  std::list<float,std::allocator<float> > *v5; // edi@1
  std::_List_nod<float,std::allocator<float> >::_Node *v6; // eax@1
  std::_List_nod<float,std::allocator<float> >::_Node *v7; // eax@3
  unsigned int v8; // ecx@3
  int v9; // [sp+0h] [bp-28h]@1
  std::_List_iterator<std::_List_val<float,std::allocator<float> > > result; // [sp+10h] [bp-18h]@1
  std::_List_const_iterator<std::_List_val<float,std::allocator<float> > > _Next; // [sp+14h] [bp-14h]@1
  int *v12; // [sp+18h] [bp-10h]@1
  int v13; // [sp+24h] [bp-4h]@1

  v12 = &v9;
  v5 = this;
  result._Ptr = (std::_List_nod<float,std::allocator<float> >::_Node *)this;
  v6 = _First._Ptr;
  _Next._Ptr = _First._Ptr;
  v13 = 0;
  while ( v6 != _Last._Ptr )
  {
    v7 = std::_List_val<float,std::allocator<float>>::_Buynode(_Where._Ptr, _Where._Ptr->_Prev, &v6->_Myval);
    v8 = v5->_Mysize;
    if ( 1073741822 - v8 < 1 )
      std::_Xlength_error("list<T> too long");
    v5->_Mysize = v8 + 1;
    _Where._Ptr->_Prev = v7;
    v7->_Prev->_Next = v7;
    v6 = _First._Ptr->_Next;
    _First._Ptr = _First._Ptr->_Next;
  }
}

//----- (004261D0) --------------------------------------------------------
ActiveSkillInfo *__cdecl ActSkillInfoTab::GetByInxName(char *pcInxName)
{
  ActiveSkillInfo *result; // eax@4
  std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ActiveSkillInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ActiveSkillInfo *> > > > iter; // [sp+8h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Keyval; // [sp+Ch] [bp-2Ch]@1
  int v4; // [sp+34h] [bp-4h]@1

  _Keyval._Myres = 15;
  _Keyval._Mysize = 0;
  _Keyval._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Keyval, pcInxName, strlen(pcInxName));
  v4 = 0;
  std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ActiveSkillInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>>,0>>::lower_bound(
    &ActSkillInfoTab::m_hashMap_ByNameIndex,
    (std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > *)&iter,
    &_Keyval);
  if ( _Keyval._Myres >= 0x10 )
    operator delete(_Keyval._Bx._Ptr);
  if ( iter._Ptr == (std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ActiveSkillInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ActiveSkillInfo *> > >::_Node *)stru_B5BD94._Myhead )
    result = 0;
  else
    result = iter._Ptr->_Myval.second;
  return result;
}

//----- (00426280) --------------------------------------------------------
void __thiscall std::list<float,std::allocator<float>>::list<float,std::allocator<float>>(std::list<float,std::allocator<float> > *this, std::list<float,std::allocator<float> > *_Right)
{
  std::list<float,std::allocator<float> > *v2; // esi@1
  std::_List_nod<float,std::allocator<float> >::_Node *v3; // eax@1
  std::_List_const_iterator<std::_List_val<float,std::allocator<float> > > v4; // ecx@2
  std::_List_nod<float,std::allocator<float> >::_Node *v5; // eax@2
  std::_List_nod<float,std::allocator<float> >::_Node *v6; // edx@2
  int v7; // [sp+0h] [bp-34h]@1
  std::exception pExceptionObject; // [sp+10h] [bp-24h]@3
  char *_What; // [sp+1Ch] [bp-18h]@3
  std::list<float,std::allocator<float> > *v10; // [sp+20h] [bp-14h]@1
  int *v11; // [sp+24h] [bp-10h]@1
  int v12; // [sp+30h] [bp-4h]@2

  v11 = &v7;
  v2 = this;
  v10 = this;
  this->_Mysize = 0;
  v3 = (std::_List_nod<float,std::allocator<float> >::_Node *)operator new(0xCu);
  if ( !v3 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v2->_Myhead = v3;
  v3->_Next = v3;
  v2->_Myhead->_Prev = v2->_Myhead;
  v4._Ptr = v2->_Myhead->_Next;
  v5 = _Right->_Myhead;
  v6 = _Right->_Myhead->_Next;
  v12 = 0;
  LOBYTE(v12) = 1;
  std::list<float,std::allocator<float>>::_Insert<std::_List_const_iterator<std::_List_val<float,std::allocator<float>>>>(
    v2,
    v4,
    (std::_List_const_iterator<std::_List_val<float,std::allocator<float> > >)v6,
    (std::_List_const_iterator<std::_List_val<float,std::allocator<float> > >)v5,
    (std::forward_iterator_tag)_Right);
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00426340) --------------------------------------------------------
void __thiscall CameraCtrl::CameraCtrl(CameraCtrl *this, CameraCtrl *__that)
{
  CameraCtrl *v2; // esi@1

  v2 = this;
  this->vfptr = (CameraCtrlVtbl *)&CameraCtrl::`vftable';
  this->m_fZoom = __that->m_fZoom;
  this->m_fZoomMax = __that->m_fZoomMax;
  this->m_fZoomMin = __that->m_fZoomMin;
  this->m_fZoomDef = __that->m_fZoomDef;
  this->m_fMsDeltaX = __that->m_fMsDeltaX;
  this->m_fMsDeltaY = __that->m_fMsDeltaY;
  std::list<float,std::allocator<float>>::list<float,std::allocator<float>>(
    &this->m_lstTraceCam,
    &__that->m_lstTraceCam);
  v2->m_kLookAtPos.x = __that->m_kLookAtPos.x;
  v2->m_kLookAtPos.y = __that->m_kLookAtPos.y;
  v2->m_kLookAtPos.z = __that->m_kLookAtPos.z;
  v2->m_fAngleUD = __that->m_fAngleUD;
  v2->m_fAngleUDMax = __that->m_fAngleUDMax;
  v2->m_fAngleUDMin = __that->m_fAngleUDMin;
  v2->m_fAngleLR = __that->m_fAngleLR;
  v2->m_kUpDir.x = __that->m_kUpDir.x;
  v2->m_kUpDir.y = __that->m_kUpDir.y;
  v2->m_kUpDir.z = __that->m_kUpDir.z;
  v2->m_kRightDir.x = __that->m_kRightDir.x;
  v2->m_kRightDir.y = __that->m_kRightDir.y;
  v2->m_kRightDir.z = __that->m_kRightDir.z;
  v2->m_kFrontDir.x = __that->m_kFrontDir.x;
  v2->m_kFrontDir.y = __that->m_kFrontDir.y;
  v2->m_kFrontDir.z = __that->m_kFrontDir.z;
  v2->m_fZoomRatePerTick = __that->m_fZoomRatePerTick;
  v2->m_fLastUpdateTime = __that->m_fLastUpdateTime;
  v2->m_fTargetZoom = __that->m_fTargetZoom;
  v2->m_fTargetAngleLR = __that->m_fTargetAngleLR;
  v2->m_uiCheckRayTile = __that->m_uiCheckRayTile;
}
// 96E898: using guessed type int (__thiscall *CameraCtrl::`vftable')(void *p, char);

//----- (00426410) --------------------------------------------------------
void __thiscall Singleton<LuaScriptMgr>::~Singleton<LuaScriptMgr>(Singleton<LuaScriptMgr> *this)
{
  this->vfptr = (Singleton<LuaScriptMgr>Vtbl *)&Singleton<LuaScriptMgr>::`vftable';
  if ( Singleton<LuaScriptMgr>::m_pInstance )
  {
    (**(void (__stdcall ***)(_DWORD))Singleton<LuaScriptMgr>::m_pInstance)(1);
    Singleton<LuaScriptMgr>::m_pInstance = 0;
  }
  Singleton<LuaScriptMgr>::m_bDestroy = 1;
}
// 973F58: using guessed type int (__thiscall *Singleton<LuaScriptMgr>::`vftable')(void *p, char);
// A89C94: using guessed type int Singleton<LuaScriptMgr>::m_pInstance;
// A89C98: using guessed type char Singleton<LuaScriptMgr>::m_bDestroy;

//----- (00426440) --------------------------------------------------------
Singleton<LuaScriptMgr> *__thiscall Singleton<LuaScriptMgr>::`vector deleting destructor'(Singleton<LuaScriptMgr> *this, unsigned int a2)
{
  Singleton<LuaScriptMgr> *v2; // esi@1

  v2 = this;
  this->vfptr = (Singleton<LuaScriptMgr>Vtbl *)&Singleton<LuaScriptMgr>::`vftable';
  if ( Singleton<LuaScriptMgr>::m_pInstance )
  {
    (**(void (__stdcall ***)(_DWORD))Singleton<LuaScriptMgr>::m_pInstance)(1);
    Singleton<LuaScriptMgr>::m_pInstance = 0;
  }
  Singleton<LuaScriptMgr>::m_bDestroy = 1;
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 973F58: using guessed type int (__thiscall *Singleton<LuaScriptMgr>::`vftable')(void *p, char);
// A89C94: using guessed type int Singleton<LuaScriptMgr>::m_pInstance;
// A89C98: using guessed type char Singleton<LuaScriptMgr>::m_bDestroy;

//----- (00426490) --------------------------------------------------------
char LuaScriptMgr::Init()
{
  char *v1; // ST0C_4@3
  char *v2; // eax@3
  const char *v3; // eax@3
  char *v4; // ST0C_4@5
  char *v5; // eax@5
  const char *v6; // eax@5
  char *v7; // ST0C_4@7
  char *v8; // eax@7
  const char *v9; // eax@7
  char *v10; // ST0C_4@9
  char *v11; // eax@9
  const char *v12; // eax@9
  char *v13; // ST0C_4@11
  char *v14; // eax@11
  const char *v15; // eax@11
  char *v16; // ST0C_4@13
  char *v17; // eax@13
  const char *v18; // eax@13

  if ( !Folder::m_bInit )
    Folder::Init();
  v1 = Folder::Merge(&Folder::m_acLuaScript, "?.lua");
  v2 = getenv("LUA_PATH");
  v3 = fs("LUA_PATH=%s;%s", v2, v1);
  _putenv(v3);
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acLuaScript, "?.script");
  v5 = getenv("LUA_PATH");
  v6 = fs("LUA_PATH=%s;%s", v5, v4);
  _putenv(v6);
  if ( !Folder::m_bInit )
    Folder::Init();
  v7 = Folder::Merge(&Folder::m_acLuaScript, "Tutorial/?.lua");
  v8 = getenv("LUA_PATH");
  v9 = fs("LUA_PATH=%s;%s", v8, v7);
  _putenv(v9);
  if ( !Folder::m_bInit )
    Folder::Init();
  v10 = Folder::Merge(&Folder::m_acLuaScript, "Tutorial/?.script");
  v11 = getenv("LUA_PATH");
  v12 = fs("LUA_PATH=%s;%s", v11, v10);
  _putenv(v12);
  if ( !Folder::m_bInit )
    Folder::Init();
  v13 = Folder::Merge(&Folder::m_acLuaScript, "NewbieImprove/?.lua");
  v14 = getenv("LUA_PATH");
  v15 = fs("LUA_PATH=%s;%s", v14, v13);
  _putenv(v15);
  if ( !Folder::m_bInit )
    Folder::Init();
  v16 = Folder::Merge(&Folder::m_acLuaScript, "NewbieImprove/?.script");
  v17 = getenv("LUA_PATH");
  v18 = fs("LUA_PATH=%s;%s", v17, v16);
  _putenv(v18);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00426620) --------------------------------------------------------
char __thiscall LuaScriptMgr::Terminate(LuaScriptMgr *this)
{
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kMap);
  return 1;
}

//----- (00426630) --------------------------------------------------------
bool __thiscall LuaScriptMgr::DeleteLuaScript(LuaScriptMgr *this, LuaScriptMgr::eLuaScriptType eType)
{
  return NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::RemoveAt(
           (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_kMap,
           eType);
}

//----- (00426640) --------------------------------------------------------
void __thiscall LuaScriptMgr::~LuaScriptMgr(LuaScriptMgr *this)
{
  LuaScriptMgr *v1; // edi@1
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // ST10_4@1

  v1 = this;
  this->vfptr = (Singleton<LuaScriptMgr>Vtbl *)&LuaScriptMgr::`vftable';
  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kMap;
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMap<enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kMap);
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<LuaScript>>,enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v2);
  operator delete[](v2->m_ppkHashTable);
  v1->vfptr = (Singleton<LuaScriptMgr>Vtbl *)&Singleton<LuaScriptMgr>::`vftable';
  if ( Singleton<LuaScriptMgr>::m_pInstance )
  {
    (**(void (__stdcall ***)(_DWORD))Singleton<LuaScriptMgr>::m_pInstance)(1);
    Singleton<LuaScriptMgr>::m_pInstance = 0;
  }
  Singleton<LuaScriptMgr>::m_bDestroy = 1;
}
// 973F58: using guessed type int (__thiscall *Singleton<LuaScriptMgr>::`vftable')(void *p, char);
// 973F60: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<LuaScript>>,enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>::`vftable')(void *p, char);
// 973F80: using guessed type int (__thiscall *NiTMap<enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>::`vftable')(void *p, char);
// 973FA0: using guessed type int (__thiscall *LuaScriptMgr::`vftable')(void *p, char);
// A89C94: using guessed type int Singleton<LuaScriptMgr>::m_pInstance;
// A89C98: using guessed type char Singleton<LuaScriptMgr>::m_bDestroy;

//----- (004266F0) --------------------------------------------------------
void __thiscall LuaScriptMgr::LuaScriptMgr(LuaScriptMgr *this)
{
  LuaScriptMgr *v1; // esi@1
  char *v2; // eax@1
  unsigned int v3; // ST08_4@1

  v1 = this;
  this->vfptr = (Singleton<LuaScriptMgr>Vtbl *)&LuaScriptMgr::`vftable';
  this->m_kMap.m_uiHashSize = 37;
  this->m_kMap.vfptr = (NiTMapBase<DFALL<NiPointer<LuaScript> >,enum LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript> >Vtbl *)&NiTMapBase<DFALL<NiPointer<LuaScript>>,enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>::`vftable';
  this->m_kMap.m_kAllocator.m_uiCount = 0;
  v2 = (char *)operator new[](0x94u);
  v3 = 4 * v1->m_kMap.m_uiHashSize;
  v1->m_kMap.m_ppkHashTable = (NiTMapItem<enum LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript> > **)v2;
  memset(v2, 0, v3);
  v1->m_kMap.vfptr = (NiTMapBase<DFALL<NiPointer<LuaScript> >,enum LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript> >Vtbl *)&NiTMap<enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>::`vftable';
}
// 973F60: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<LuaScript>>,enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>::`vftable')(void *p, char);
// 973F80: using guessed type int (__thiscall *NiTMap<enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>::`vftable')(void *p, char);
// 973FA0: using guessed type int (__thiscall *LuaScriptMgr::`vftable')(void *p, char);

//----- (00426790) --------------------------------------------------------
LuaScript *__thiscall LuaScriptMgr::GetLuaScript(LuaScriptMgr *this, LuaScriptMgr::eLuaScriptType eType)
{
  LuaScript *v2; // esi@1
  NiPointer<LuaScript> spLuaScript; // [sp+8h] [bp-10h]@1
  int v5; // [sp+14h] [bp-4h]@1

  spLuaScript.m_pObject = 0;
  v5 = 0;
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kMap,
    (const char *)eType,
    (NiPointer<NiShaderLibrary> *)&spLuaScript);
  v2 = spLuaScript.m_pObject;
  v5 = -1;
  if ( spLuaScript.m_pObject && !InterlockedDecrement((volatile LONG *)&spLuaScript.m_pObject->m_uiRefCount) )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  return v2;
}

//----- (00426810) --------------------------------------------------------
void __thiscall LuaScriptMgr::Update(LuaScriptMgr *this, float fCurTime)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,HWND__ *,NiPointer<NiRenderTargetGroup> > *v2; // edi@1
  unsigned int v3; // ecx@1
  unsigned int v4; // eax@1
  NiTMapItem<HWND__ *,NiPointer<NiRenderTargetGroup> > **v5; // edx@2
  NiTMapItem<HWND__ *,NiPointer<NiRenderTargetGroup> > *v6; // eax@5
  LuaScript *v7; // esi@7
  LuaScriptMgr::eLuaScriptType eType; // [sp+14h] [bp-18h]@7
  void *kIter; // [sp+18h] [bp-14h]@6
  NiPointer<LuaScript> spLuaScript; // [sp+1Ch] [bp-10h]@7
  int v11; // [sp+28h] [bp-4h]@7

  v2 = (NiTMapBase<NiTPointerAllocator<unsigned int>,HWND__ *,NiPointer<NiRenderTargetGroup> > *)&this->m_kMap;
  v3 = this->m_kMap.m_uiHashSize;
  v4 = 0;
  if ( v3 )
  {
    v5 = v2->m_ppkHashTable;
    while ( !*v5 )
    {
      ++v4;
      ++v5;
      if ( v4 >= v3 )
        goto LABEL_5;
    }
    v6 = v2->m_ppkHashTable[v4];
  }
  else
  {
LABEL_5:
    v6 = 0;
  }
  kIter = v6;
  while ( kIter )
  {
    spLuaScript.m_pObject = 0;
    v11 = 0;
    NiTMapBase<DFALL<NiPointer<NiD3DXEffectTechniqueSet>>,char const *,NiPointer<NiD3DXEffectTechniqueSet>>::GetNext(
      v2,
      &kIter,
      (HWND__ **)&eType,
      (NiPointer<NiRenderTargetGroup> *)&spLuaScript);
    v7 = spLuaScript.m_pObject;
    if ( spLuaScript.m_pObject )
      spLuaScript.m_pObject->vfptr[3].__vecDelDtor((NiRefObject *)spLuaScript.m_pObject, LODWORD(fCurTime));
    v11 = -1;
    if ( v7 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    }
  }
}

//----- (004268E0) --------------------------------------------------------
char __thiscall LuaScriptMgr::CreateLuaScript(LuaScriptMgr *this, LuaScriptMgr::eLuaScriptType eType)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v2; // ebx@1
  NiShaderLibrary *v3; // esi@1
  LuaScriptNewBie *v5; // eax@8
  PgWinBut *v6; // eax@9
  PgWinBut *v7; // esi@9
  NiRefObjectVtbl *v8; // edi@15
  char *v9; // eax@15
  volatile LONG *v10; // edi@15
  LuaScriptTutorial *v11; // eax@16
  PgWinBut *v12; // eax@17
  NiRefObjectVtbl *v13; // edi@23
  char *v14; // eax@23
  NiPointer<PgWinBut> v15; // [sp-4h] [bp-24h]@15
  NiPointer<NiShaderLibrary> val; // [sp+10h] [bp-10h]@1
  int v17; // [sp+1Ch] [bp-4h]@1

  val.m_pObject = 0;
  v17 = 0;
  v2 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_kMap;
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kMap,
    (const char *)eType,
    &val);
  v3 = val.m_pObject;
  v17 = -1;
  if ( val.m_pObject )
  {
    if ( !InterlockedDecrement((volatile LONG *)&val.m_pObject->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    if ( !NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::RemoveAt(v2, eType) )
      return 0;
  }
  if ( eType )
  {
    if ( eType != 1 )
      return 0;
    v5 = (LuaScriptNewBie *)operator new(0xCu);
    v17 = 3;
    if ( v5 )
    {
      LuaScriptNewBie::LuaScriptNewBie(v5);
      v7 = v6;
    }
    else
    {
      v7 = 0;
    }
    if ( v7 )
      InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
    v17 = 4;
    if ( !Folder::m_bInit )
      Folder::Init();
    v8 = v7->vfptr;
    v9 = Folder::Merge(&Folder::m_acLuaScript, "NewbieImprove/NewbieImprove.script");
    v8[1].__vecDelDtor((NiRefObject *)v7, (unsigned int)v9);
    val.m_pObject = (NiShaderLibrary *)&v15;
    v10 = (volatile LONG *)&v7->m_uiRefCount;
    v15.m_pObject = v7;
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
    NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
      (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)v2,
      1u,
      v15);
  }
  else
  {
    v11 = (LuaScriptTutorial *)operator new(0xCu);
    v17 = 1;
    if ( v11 )
    {
      LuaScriptTutorial::LuaScriptTutorial(v11);
      v7 = v12;
    }
    else
    {
      v7 = 0;
    }
    if ( v7 )
      InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
    v17 = 2;
    if ( !Folder::m_bInit )
      Folder::Init();
    v13 = v7->vfptr;
    v14 = Folder::Merge(&Folder::m_acLuaScript, "Tutorial/Tutorial.script");
    v13[1].__vecDelDtor((NiRefObject *)v7, (unsigned int)v14);
    val.m_pObject = (NiShaderLibrary *)&v15;
    v10 = (volatile LONG *)&v7->m_uiRefCount;
    v15.m_pObject = v7;
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
    NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
      (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)v2,
      0,
      v15);
  }
  v17 = -1;
  if ( !InterlockedDecrement(v10) )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00426AB0) --------------------------------------------------------
void __thiscall NiTMapBase<DFALL<NiPointer<LuaScript>>,enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>::~NiTMapBase<DFALL<NiPointer<LuaScript>>,enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>(NiTMapBase<DFALL<NiPointer<LuaScript> >,enum LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript> > *this)
{
  NiTMapBase<DFALL<NiPointer<LuaScript> >,enum LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript> > *v1; // esi@1

  v1 = this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<LuaScript> >,enum LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript> >Vtbl *)&NiTMapBase<DFALL<NiPointer<LuaScript>>,enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v1->m_ppkHashTable);
}
// 973F60: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<LuaScript>>,enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>::`vftable')(void *p, char);

//----- (00426AD0) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<LuaScript> >,enum LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript> > *__thiscall NiTMapBase<DFALL<NiPointer<LuaScript>>,enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>::`vector deleting destructor'(NiTMapBase<DFALL<NiPointer<LuaScript> >,enum LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript> > *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<LuaScript> >,enum LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript> > *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<LuaScript> >,enum LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript> >Vtbl *)&NiTMapBase<DFALL<NiPointer<LuaScript>>,enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 973F60: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<LuaScript>>,enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>::`vftable')(void *p, char);

//----- (00426B10) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>::`scalar deleting destructor'(NiTMap<enum LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript> > *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // esi@1

  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<LuaScript> >,enum LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript> >Vtbl *)&NiTMap<enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<LuaScript>>,enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v2);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 973F60: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<LuaScript>>,enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>::`vftable')(void *p, char);
// 973F80: using guessed type int (__thiscall *NiTMap<enum  LuaScriptMgr::eLuaScriptType,NiPointer<LuaScript>>::`vftable')(void *p, char);

//----- (00426B90) --------------------------------------------------------
char __thiscall NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *this, const char *key, NiPointer<NiShaderLibrary> *val)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *v3; // edi@1
  NiTMapItem<char const *,NiPointer<NiShaderLibrary> > *v4; // esi@1
  char result; // al@4
  NiShaderLibrary *v6; // edi@5
  NiShaderLibrary *v7; // esi@10

  v3 = this;
  v4 = this->m_ppkHashTable[((int (__stdcall *)(_DWORD))this->vfptr->KeyToHashIndex)(key)];
  if ( v4 )
  {
    while ( !v3->vfptr->IsKeysEqual(v3, key, v4->m_key) )
    {
      v4 = v4->m_pkNext;
      if ( !v4 )
        goto LABEL_4;
    }
    v6 = val->m_pObject;
    if ( val->m_pObject != v4->m_val.m_pObject )
    {
      if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      v7 = v4->m_val.m_pObject;
      val->m_pObject = v7;
      if ( v7 )
        InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
    }
    result = 1;
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}

//----- (00426C20) --------------------------------------------------------
LuaScriptMgr *__thiscall LuaScriptMgr::`scalar deleting destructor'(LuaScriptMgr *this, unsigned int a2)
{
  LuaScriptMgr *v2; // esi@1

  v2 = this;
  LuaScriptMgr::~LuaScriptMgr(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00426C50) --------------------------------------------------------
NiTMapItem<char const *,NiPointer<NiD3DXEffectTechniqueSet> > *NiTPointerListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::NewItem()
{
  _DWORD *v1; // eax@1
  _DWORD *v2; // edi@2
  int v3; // esi@4

  v1 = operator new(0xCu);
  if ( v1 )
  {
    v1[2] = 0;
    v2 = v1;
  }
  else
  {
    v2 = 0;
  }
  v3 = v2[2];
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)(v3 + 4)) && v3 )
      (**(void (__thiscall ***)(_DWORD, _DWORD))v3)(v3, 1);
    v2[2] = 0;
  }
  return (NiTMapItem<char const *,NiPointer<NiD3DXEffectTechniqueSet> > *)v2;
}

//----- (00426CA0) --------------------------------------------------------
void __thiscall LuaScriptNewBie::LuaScriptNewBie(LuaScriptNewBie *this)
{
  LuaScriptNewBie *v1; // esi@1

  v1 = this;
  LuaScript::LuaScript((LuaScript *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&LuaScriptNewBie::`vftable';
}
// 974020: using guessed type int (__thiscall *LuaScriptNewBie::`vftable')(void *p, char);

//----- (00426CC0) --------------------------------------------------------
void __thiscall LuaScriptNewBie::~LuaScriptNewBie(LuaScriptNewBie *this)
{
  this->vfptr = (NiRefObjectVtbl *)&LuaScriptNewBie::`vftable';
  LuaScript::~LuaScript((LuaScript *)&this->vfptr);
}
// 974020: using guessed type int (__thiscall *LuaScriptNewBie::`vftable')(void *p, char);

//----- (00426CD0) --------------------------------------------------------
int __cdecl LuaScriptNewBie::cOpenPlayGuide()
{
  GameFrameWork *v0; // eax@1

  v0 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v0 )
    GameFrameWork::OpenPlayGuideWin(v0, BIL_BATTLE_2);
  return 0;
}

//----- (00426CF0) --------------------------------------------------------
int __cdecl LuaScriptNewBie::cOpenPlayGuide_BIL_QUEST_1()
{
  GameFrameWork *v0; // eax@1

  v0 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v0 )
    GameFrameWork::OpenPlayGuideWin(v0, BIL_QUEST_1);
  return 0;
}

//----- (00426D10) --------------------------------------------------------
void __thiscall LuaScriptNewBie::initFunc(LuaScriptNewBie *this)
{
  LuaScriptNewBie *v1; // esi@1

  v1 = this;
  LuaScript::initFunc((LuaScript *)&this->vfptr);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cOpenPlayGuide",
    LuaScriptNewBie::cOpenPlayGuide);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cOpenPlayGuide_BIL_QUEST_1",
    LuaScriptNewBie::cOpenPlayGuide_BIL_QUEST_1);
}

//----- (00426D40) --------------------------------------------------------
int __thiscall LuaArgumentNewBie::setArgument(LuaArgumentNewBie *this, lua_State *L)
{
  char *v2; // eax@1

  v2 = this->m_name._Bx._Buf;
  if ( this->m_name._Myres >= 0x10 )
    v2 = *(char **)v2;
  lua_pushstring(L, v2);
  return 1;
}

//----- (00426D70) --------------------------------------------------------
int __thiscall LuaArgumentBIL_QUEST_1::setArgument(LuaArgumentBIL_QUEST_1 *this, lua_State *L)
{
  LuaArgumentBIL_QUEST_1 *v2; // esi@1
  char *v3; // eax@1
  const char *v4; // eax@3

  v2 = this;
  v3 = this->m_name._Bx._Buf;
  if ( this->m_name._Myres >= 0x10 )
    v3 = *(char **)v3;
  lua_pushstring(L, v3);
  v4 = v2->m_MapName._Bx._Buf;
  if ( v2->m_MapName._Myres >= 0x10 )
    v4 = *(const char **)v4;
  lua_pushstring(L, v4);
  return 2;
}

//----- (00426DB0) --------------------------------------------------------
void __thiscall LuaArgumentNewBie::~LuaArgumentNewBie(LuaArgumentNewBie *this)
{
  LuaArgumentNewBie *v1; // esi@1

  v1 = this;
  this->vfptr = (LuaArgumentVtbl *)&LuaArgumentNewBie::`vftable';
  if ( this->m_name._Myres >= 0x10 )
    operator delete(this->m_name._Bx._Ptr);
  v1->m_name._Myres = 15;
  v1->m_name._Mysize = 0;
  v1->m_name._Bx._Buf[0] = 0;
  LuaArgument::~LuaArgument((LuaArgument *)&v1->vfptr);
}
// 974040: using guessed type int (__thiscall *LuaArgumentNewBie::`vftable')(void *p, char);

//----- (00426DF0) --------------------------------------------------------
void __thiscall LuaArgumentBIL_QUEST_1::~LuaArgumentBIL_QUEST_1(LuaArgumentBIL_QUEST_1 *this)
{
  LuaArgumentBIL_QUEST_1 *v1; // esi@1

  v1 = this;
  this->vfptr = (LuaArgumentVtbl *)&LuaArgumentBIL_QUEST_1::`vftable';
  if ( this->m_MapName._Myres >= 0x10 )
    operator delete(this->m_MapName._Bx._Ptr);
  v1->m_MapName._Myres = 15;
  v1->m_MapName._Mysize = 0;
  v1->m_MapName._Bx._Buf[0] = 0;
  if ( v1->m_name._Myres >= 0x10 )
    operator delete(v1->m_name._Bx._Ptr);
  v1->m_name._Mysize = 0;
  v1->m_name._Myres = 15;
  v1->m_name._Bx._Buf[0] = 0;
  LuaArgument::~LuaArgument((LuaArgument *)&v1->vfptr);
}
// 974058: using guessed type int (__thiscall *LuaArgumentBIL_QUEST_1::`vftable')(void *p, char);

//----- (00426E50) --------------------------------------------------------
void __thiscall LuaArgumentNewBie::LuaArgumentNewBie(LuaArgumentNewBie *this)
{
  LuaArgumentNewBie *v1; // esi@1
  int v2; // ecx@1

  v1 = this;
  LuaArgument::LuaArgument((LuaArgument *)&this->vfptr);
  v2 = (int)&v1->m_name;
  v1->vfptr = (LuaArgumentVtbl *)&LuaArgumentNewBie::`vftable';
  *(_DWORD *)(v2 + 20) = 15;
  *(_DWORD *)(v2 + 16) = 0;
  *(_BYTE *)v2 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v1->m_name, "NewbieGuide", 0xBu);
}
// 974040: using guessed type int (__thiscall *LuaArgumentNewBie::`vftable')(void *p, char);

//----- (00426EC0) --------------------------------------------------------
void __thiscall LuaArgumentBIL_QUEST_1::LuaArgumentBIL_QUEST_1(LuaArgumentBIL_QUEST_1 *this, char *pkName)
{
  LuaArgumentBIL_QUEST_1 *v2; // esi@1
  int v3; // ecx@1
  int v4; // ecx@1

  v2 = this;
  LuaArgument::LuaArgument((LuaArgument *)&this->vfptr);
  v3 = (int)&v2->m_name;
  v2->vfptr = (LuaArgumentVtbl *)&LuaArgumentBIL_QUEST_1::`vftable';
  *(_DWORD *)(v3 + 20) = 15;
  *(_DWORD *)(v3 + 16) = 0;
  *(_BYTE *)v3 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v2->m_name, "BIL_QUEST_1", 0xBu);
  v4 = (int)&v2->m_MapName;
  *(_DWORD *)(v4 + 20) = 15;
  *(_DWORD *)(v4 + 16) = 0;
  *(_BYTE *)v4 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v2->m_MapName, pkName, strlen(pkName));
}
// 974058: using guessed type int (__thiscall *LuaArgumentBIL_QUEST_1::`vftable')(void *p, char);

//----- (00426F70) --------------------------------------------------------
void __thiscall LuaScriptNewBie::update(LuaScriptNewBie *this, float time)
{
  LuaScriptNewBie *v2; // esi@1
  Name3 *v3; // eax@1
  GameFrameWork *v4; // eax@1
  int v5; // eax@4
  int v6; // ST04_4@4
  void *(__thiscall *v7)(NiRefObject *, unsigned int); // eax@4
  void *(__thiscall *v8)(NiRefObject *, unsigned int); // edx@6
  Name3 result; // [sp+8h] [bp-98h]@1
  LuaArgumentBIL_QUEST_1 v10; // [sp+14h] [bp-8Ch]@4
  LuaArgument v11; // [sp+58h] [bp-48h]@6
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v12; // [sp+64h] [bp-3Ch]@6
  char acName[13]; // [sp+80h] [bp-20h]@1
  int v14; // [sp+9Ch] [bp-4h]@4

  v2 = this;
  v3 = World::GetMapName(&g_kWorld, &result);
  *(_DWORD *)acName = v3->n3_code[0];
  *(_DWORD *)&acName[4] = v3->n3_code[1];
  *(_DWORD *)&acName[8] = v3->n3_code[2];
  acName[12] = 0;
  v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v4 && GameFrameWork::GetOpenPlayGuideCheck(v4, BIL_QUEST_1) && World::IsInArea(&g_kWorld, "BIL_QUEST_1") )
  {
    LuaArgumentBIL_QUEST_1::LuaArgumentBIL_QUEST_1(&v10, acName);
    v6 = v5;
    v7 = v2->vfptr[2].__vecDelDtor;
    v14 = 0;
    ((void (__thiscall *)(LuaScriptNewBie *, const char *, int))v7)(v2, "OpenPlayGuide_BIL_QUEST_1", v6);
    v14 = -1;
    LuaArgumentBIL_QUEST_1::~LuaArgumentBIL_QUEST_1(&v10);
  }
  if ( !strcmp(acName, (const char *)&off_973FD8) )
  {
    LuaArgument::LuaArgument(&v11);
    v14 = 1;
    v11.vfptr = (LuaArgumentVtbl *)&LuaArgumentNewBie::`vftable';
    v12._Myres = 15;
    v12._Mysize = 0;
    v12._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v12, "NewbieGuide", 0xBu);
    v8 = v2->vfptr[2].__vecDelDtor;
    v14 = 2;
    ((void (__thiscall *)(LuaScriptNewBie *, const char *, LuaArgument *))v8)(v2, "Main", &v11);
    v14 = -1;
    v11.vfptr = (LuaArgumentVtbl *)&LuaArgumentNewBie::`vftable';
    if ( v12._Myres >= 0x10 )
      operator delete(v12._Bx._Ptr);
    v12._Myres = 15;
    v12._Mysize = 0;
    v12._Bx._Buf[0] = 0;
    LuaArgument::~LuaArgument(&v11);
  }
}
// 973FD8: using guessed type void *off_973FD8;
// 974040: using guessed type int (__thiscall *LuaArgumentNewBie::`vftable')(void *p, char);

//----- (00427110) --------------------------------------------------------
Name3 *__thiscall World::GetMapName(World *this, Name3 *result)
{
  Name3 *v2; // eax@1

  v2 = result;
  result->n3_code[0] = this->m_kMapName.n3_code[0];
  *(_QWORD *)&result->n3_code[1] = *(_QWORD *)&this->m_kMapName.n3_code[1];
  return v2;
}

//----- (00427140) --------------------------------------------------------
LuaScriptNewBie *__thiscall LuaScriptNewBie::`scalar deleting destructor'(LuaScriptNewBie *this, unsigned int a2)
{
  LuaScriptNewBie *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&LuaScriptNewBie::`vftable';
  LuaScript::~LuaScript((LuaScript *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 974020: using guessed type int (__thiscall *LuaScriptNewBie::`vftable')(void *p, char);

//----- (00427170) --------------------------------------------------------
LuaArgumentNewBie *__thiscall LuaArgumentNewBie::`scalar deleting destructor'(LuaArgumentNewBie *this, unsigned int a2)
{
  LuaArgumentNewBie *v2; // esi@1

  v2 = this;
  this->vfptr = (LuaArgumentVtbl *)&LuaArgumentNewBie::`vftable';
  if ( this->m_name._Myres >= 0x10 )
    operator delete(this->m_name._Bx._Ptr);
  v2->m_name._Myres = 15;
  v2->m_name._Mysize = 0;
  v2->m_name._Bx._Buf[0] = 0;
  LuaArgument::~LuaArgument((LuaArgument *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 974040: using guessed type int (__thiscall *LuaArgumentNewBie::`vftable')(void *p, char);

//----- (004271C0) --------------------------------------------------------
LuaArgumentBIL_QUEST_1 *__thiscall LuaArgumentBIL_QUEST_1::`vector deleting destructor'(LuaArgumentBIL_QUEST_1 *this, unsigned int a2)
{
  LuaArgumentBIL_QUEST_1 *v2; // esi@1

  v2 = this;
  this->vfptr = (LuaArgumentVtbl *)&LuaArgumentBIL_QUEST_1::`vftable';
  if ( this->m_MapName._Myres >= 0x10 )
    operator delete(this->m_MapName._Bx._Ptr);
  v2->m_MapName._Myres = 15;
  v2->m_MapName._Mysize = 0;
  v2->m_MapName._Bx._Buf[0] = 0;
  if ( v2->m_name._Myres >= 0x10 )
    operator delete(v2->m_name._Bx._Ptr);
  v2->m_name._Myres = 15;
  v2->m_name._Mysize = 0;
  v2->m_name._Bx._Buf[0] = 0;
  LuaArgument::~LuaArgument((LuaArgument *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 974058: using guessed type int (__thiscall *LuaArgumentBIL_QUEST_1::`vftable')(void *p, char);

//----- (00427230) --------------------------------------------------------
void __thiscall LuaScriptTutorial::LuaScriptTutorial(LuaScriptTutorial *this)
{
  LuaScriptTutorial *v1; // esi@1

  v1 = this;
  LuaScript::LuaScript((LuaScript *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&LuaScriptTutorial::`vftable';
}
// 9744D0: using guessed type int (__thiscall *LuaScriptTutorial::`vftable')(void *p, char);

//----- (00427250) --------------------------------------------------------
void __thiscall LuaScriptTutorial::~LuaScriptTutorial(LuaScriptTutorial *this)
{
  this->vfptr = (NiRefObjectVtbl *)&LuaScriptTutorial::`vftable';
  LuaScript::~LuaScript((LuaScript *)&this->vfptr);
}
// 9744D0: using guessed type int (__thiscall *LuaScriptTutorial::`vftable')(void *p, char);

//----- (00427260) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cAckMainStep(lua_State *L)
{
  unsigned int v1; // esi@1
  GameFrameWork *v2; // eax@1

  v1 = lua_tointegerx(L, 1, 0);
  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
    GameFrameWork::NcCharTutorialStepAck(v2, v1);
  return 0;
}

//----- (004272A0) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cCloseTextBoxMsgWin(lua_State *L)
{
  unsigned __int16 v1; // ax@1

  v1 = lua_tointegerx(L, 1, 0);
  ScreenBDMgr::EndSpeechBD(&g_kScrnBDMgr, v1);
  return 0;
}

//----- (004272D0) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cHideNewbieToolTip()
{
  return 0;
}

//----- (004272E0) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cTutorialEnable(lua_State *L)
{
  bool v1; // zf@1
  Tutorial *v2; // eax@1
  bool v3; // bl@1
  Tutorial *v4; // eax@2

  v1 = lua_toboolean(L, 1) == 0;
  v2 = Singleton<Tutorial>::m_pInstance;
  v3 = !v1;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v4 = (Tutorial *)operator new(0xB4u);
    if ( v4 )
      Tutorial::Tutorial(v4);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  v2->m_bEnable = v3;
  return 0;
}

//----- (00427360) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cBlinkMainMenu(lua_State *L)
{
  int v1; // esi@1
  Tutorial *v2; // eax@6
  Tutorial *v3; // eax@7

  v1 = 10;
  switch ( lua_tointegerx(L, 1, 0) )
  {
    case 1:
      v1 = 6;
      break;
    case 2:
      v1 = 5;
      break;
    case 3:
      v1 = 1;
      break;
    default:
      break;
  }
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v2 = (Tutorial *)operator new(0xB4u);
    if ( v2 )
      Tutorial::Tutorial(v2);
    else
      v3 = 0;
    Singleton<Tutorial>::m_pInstance = v3;
  }
  Tutorial::BlinkMainMenu(1, v1);
  return 0;
}

//----- (00427430) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cBlinkFreeStat(lua_State *L)
{
  Tutorial *v1; // ecx@1
  Tutorial *v2; // eax@2
  Tutorial *v3; // eax@3
  int EffectCount; // [sp+Ch] [bp-14h]@6
  int EffectKey; // [sp+10h] [bp-10h]@6
  int v7; // [sp+1Ch] [bp-4h]@2

  v1 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v2 = (Tutorial *)operator new(0xB4u);
    v7 = 0;
    if ( v2 )
      Tutorial::Tutorial(v2);
    else
      v3 = 0;
    v1 = v3;
    v7 = -1;
    Singleton<Tutorial>::m_pInstance = v3;
  }
  Tutorial::BlinkFreeStat(v1, &EffectKey, &EffectCount);
  lua_pushinteger(L, EffectKey);
  lua_pushinteger(L, EffectCount);
  return 2;
}

//----- (004274E0) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cBlinkStoneShop(lua_State *L)
{
  int v1; // eax@1
  Tutorial *v2; // ecx@1
  unsigned int v3; // edi@1
  Tutorial *v4; // eax@2
  Tutorial *v5; // eax@3
  int EffectKey; // [sp+10h] [bp-10h]@6
  int v8; // [sp+1Ch] [bp-4h]@2

  v1 = lua_tointegerx(L, 1, 0);
  v2 = Singleton<Tutorial>::m_pInstance;
  v3 = v1;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v4 = (Tutorial *)operator new(0xB4u);
    v8 = 0;
    if ( v4 )
      Tutorial::Tutorial(v4);
    else
      v5 = 0;
    v2 = v5;
    v8 = -1;
    Singleton<Tutorial>::m_pInstance = v5;
  }
  Tutorial::BlinkStoneShop(v2, v3, &EffectKey);
  lua_pushinteger(L, EffectKey);
  return 1;
}

//----- (004276B0) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cRemoveBlinkMainMenu(lua_State *L)
{
  Tutorial *v1; // eax@2
  Tutorial *v2; // eax@3

  lua_toboolean(L, 1);
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v1 = (Tutorial *)operator new(0xB4u);
    if ( v1 )
      Tutorial::Tutorial(v1);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  Tutorial::BlinkMainMenu(0, 0);
  return 0;
}

//----- (00427740) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cStopTextScreenEffect()
{
  TextScreenEffect *v0; // ecx@1
  TextScreenEffect *v1; // eax@2
  TextScreenEffect *v2; // eax@3
  TextScreenEffect *v3; // ecx@6
  TextScreenEffect *v4; // eax@7
  TextScreenEffect *v5; // eax@8

  v0 = Singleton<TextScreenEffect>::m_pInstance;
  if ( !Singleton<TextScreenEffect>::m_pInstance )
  {
    v1 = (TextScreenEffect *)operator new(0x28u);
    if ( v1 )
      TextScreenEffect::TextScreenEffect(v1);
    else
      v2 = 0;
    v0 = v2;
    Singleton<TextScreenEffect>::m_pInstance = v2;
  }
  TextScreenEffect::AddSchedule(v0, 3);
  v3 = Singleton<TextScreenEffect>::m_pInstance;
  if ( !Singleton<TextScreenEffect>::m_pInstance )
  {
    v4 = (TextScreenEffect *)operator new(0x28u);
    if ( v4 )
      TextScreenEffect::TextScreenEffect(v4);
    else
      v5 = 0;
    v3 = v5;
    Singleton<TextScreenEffect>::m_pInstance = v5;
  }
  TextScreenEffect::AddSchedule(v3, 4);
  return 0;
}

//----- (00427800) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cShowTutorialMark(lua_State *L)
{
  int v1; // eax@1
  bool v2; // bl@1
  float fY; // ST24_4@2
  float fX; // ST20_4@2
  Tutorial *v5; // ecx@3
  Tutorial *v6; // eax@4
  Tutorial *v7; // eax@5
  float fSize; // ST28_4@8
  _BYTE v9[12]; // ST1C_12@8
  NiPoint3 kPos; // [sp+18h] [bp-28h]@2
  int Show; // [sp+24h] [bp-1Ch]@1
  int Size; // [sp+28h] [bp-18h]@1
  int PosX; // [sp+2Ch] [bp-14h]@1
  int PosY; // [sp+30h] [bp-10h]@1
  int v16; // [sp+3Ch] [bp-4h]@4

  v1 = lua_toboolean(L, 1);
  v2 = v1 != 0;
  LOBYTE(Show) = v1 != 0;
  PosX = lua_tointegerx(L, 2, 0);
  PosY = lua_tointegerx(L, 3, 0);
  Size = lua_tointegerx(L, 4, 0);
  if ( v2 )
  {
    fY = (double)PosY;
    fX = (double)PosX;
    World::GetAdvGroundPos(&g_kWorld, fX, fY, &kPos);
  }
  v5 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v6 = (Tutorial *)operator new(0xB4u);
    PosX = (int)v6;
    v16 = 0;
    if ( v6 )
      Tutorial::Tutorial(v6);
    else
      v7 = 0;
    v5 = v7;
    v16 = -1;
    Singleton<Tutorial>::m_pInstance = v7;
  }
  fSize = (double)Size;
  *(float *)v9 = kPos.x;
  *(_QWORD *)&v9[4] = *(_QWORD *)&kPos.y;
  Tutorial::SetTutorialMark(v5, Show, *(NiPoint3 *)v9, fSize);
  return 0;
}

//----- (00427900) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cOpenQuestConditionWin(lua_State *L)
{
  unsigned __int16 v1; // di@1
  int v2; // eax@1
  Tutorial *v3; // ecx@1
  unsigned int v4; // esi@1
  Tutorial *v5; // eax@2
  Tutorial *v6; // eax@3
  Tutorial *v7; // eax@6
  Tutorial *v8; // eax@7

  v1 = lua_tointegerx(L, 1, 0);
  v2 = lua_tointegerx(L, 2, 0);
  v3 = Singleton<Tutorial>::m_pInstance;
  v4 = v2;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v5 = (Tutorial *)operator new(0xB4u);
    if ( v5 )
      Tutorial::Tutorial(v5);
    else
      v6 = 0;
    v3 = v6;
    Singleton<Tutorial>::m_pInstance = v6;
  }
  Tutorial::InitMobKillCount(v3, v1, v4);
  v7 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v8 = (Tutorial *)operator new(0xB4u);
    if ( v8 )
      Tutorial::Tutorial(v8);
    else
      v7 = 0;
    Singleton<Tutorial>::m_pInstance = v7;
  }
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v7->m_pkMobKillCountWin->vfptr);
  return 0;
}

//----- (004279F0) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cCloseQuestConditionWin(lua_State *L)
{
  Tutorial *v1; // eax@1
  Tutorial *v2; // eax@2

  lua_tointegerx(L, 1, 0);
  v1 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v2 = (Tutorial *)operator new(0xB4u);
    if ( v2 )
      Tutorial::Tutorial(v2);
    else
      v1 = 0;
    Singleton<Tutorial>::m_pInstance = v1;
  }
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMobKillCountWin->vfptr);
  return 0;
}

//----- (00427A80) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cCloseBoxAnnounceWin()
{
  Tutorial *v0; // eax@1
  Tutorial *v1; // eax@2

  v0 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v1 = (Tutorial *)operator new(0xB4u);
    if ( v1 )
      Tutorial::Tutorial(v1);
    else
      v0 = 0;
    Singleton<Tutorial>::m_pInstance = v0;
  }
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v0->m_pkBoxAnnounceWin->vfptr);
  return 0;
}

//----- (00427B00) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cSetItemShopTab(lua_State *L)
{
  unsigned int v1; // esi@1
  Tutorial *v2; // eax@2
  Tutorial *v3; // eax@3

  v1 = lua_tointegerx(L, 1, 0);
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v2 = (Tutorial *)operator new(0xB4u);
    if ( v2 )
      Tutorial::Tutorial(v2);
    else
      v3 = 0;
    Singleton<Tutorial>::m_pInstance = v3;
  }
  Tutorial::SetItemShopTab(v1);
  return 0;
}

//----- (00427B90) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cIsOpenCharWin(lua_State *L)
{
  Tutorial *v1; // eax@1
  Tutorial *v2; // eax@2

  v1 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v2 = (Tutorial *)operator new(0xB4u);
    if ( v2 )
      Tutorial::Tutorial(v2);
    else
      v1 = 0;
    Singleton<Tutorial>::m_pInstance = v1;
  }
  lua_pushboolean(L, v1->m_bOpenCharWin);
  return 1;
}

//----- (00427C10) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cIsOpenItemShop(lua_State *L)
{
  Tutorial *v1; // eax@2
  Tutorial *v2; // eax@3
  bool v3; // al@6

  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v1 = (Tutorial *)operator new(0xB4u);
    if ( v1 )
      Tutorial::Tutorial(v1);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  v3 = Tutorial::IsOpenItemShop();
  lua_pushboolean(L, v3);
  return 1;
}

//----- (00427CA0) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cIsOpenInvenWin(lua_State *L)
{
  Tutorial *v1; // eax@1
  Tutorial *v2; // eax@2

  v1 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v2 = (Tutorial *)operator new(0xB4u);
    if ( v2 )
      Tutorial::Tutorial(v2);
    else
      v1 = 0;
    Singleton<Tutorial>::m_pInstance = v1;
  }
  lua_pushboolean(L, v1->m_bOpenInvenWin);
  return 1;
}

//----- (00427D20) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cIsBuyStone(lua_State *L)
{
  Tutorial *v1; // eax@1
  Tutorial *v2; // eax@2

  v1 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v2 = (Tutorial *)operator new(0xB4u);
    if ( v2 )
      Tutorial::Tutorial(v2);
    else
      v1 = 0;
    Singleton<Tutorial>::m_pInstance = v1;
  }
  lua_pushboolean(L, v1->m_bBuyStone);
  return 1;
}

//----- (00427DA0) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cIsUseStone(lua_State *L)
{
  Tutorial *v1; // eax@1
  Tutorial *v2; // eax@2

  v1 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v2 = (Tutorial *)operator new(0xB4u);
    if ( v2 )
      Tutorial::Tutorial(v2);
    else
      v1 = 0;
    Singleton<Tutorial>::m_pInstance = v1;
  }
  lua_pushboolean(L, v1->m_bUseStone);
  return 1;
}

//----- (00427E20) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cIsEndWar(lua_State *L)
{
  Tutorial *v1; // eax@1
  Tutorial *v2; // eax@2
  bool v3; // al@6

  v1 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v2 = (Tutorial *)operator new(0xB4u);
    if ( v2 )
      Tutorial::Tutorial(v2);
    else
      v1 = 0;
    Singleton<Tutorial>::m_pInstance = v1;
  }
  v3 = Tutorial::IsEndMobKillCount(v1);
  lua_pushboolean(L, v3);
  return 1;
}

//----- (00427EB0) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cIsOpenSkillShop(lua_State *L)
{
  Tutorial *v1; // eax@2
  Tutorial *v2; // eax@3
  bool v3; // al@6

  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v1 = (Tutorial *)operator new(0xB4u);
    if ( v1 )
      Tutorial::Tutorial(v1);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  v3 = Tutorial::IsOpenSkillShop();
  lua_pushboolean(L, v3);
  return 1;
}

//----- (00427F40) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cIsOpenSkillWin(lua_State *L)
{
  Tutorial *v1; // eax@1
  Tutorial *v2; // eax@2

  v1 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v2 = (Tutorial *)operator new(0xB4u);
    if ( v2 )
      Tutorial::Tutorial(v2);
    else
      v1 = 0;
    Singleton<Tutorial>::m_pInstance = v1;
  }
  lua_pushboolean(L, v1->m_bOpenSkillWin);
  return 1;
}

//----- (00427FC0) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cIsRegistSkill(lua_State *L)
{
  Tutorial *v1; // eax@1
  Tutorial *v2; // eax@2

  v1 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v2 = (Tutorial *)operator new(0xB4u);
    if ( v2 )
      Tutorial::Tutorial(v2);
    else
      v1 = 0;
    Singleton<Tutorial>::m_pInstance = v1;
  }
  lua_pushboolean(L, v1->m_bRegistSkill);
  return 1;
}

//----- (00428040) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cIsEndTextScreenEffect(lua_State *L)
{
  TextScreenEffect *v1; // eax@1
  TextScreenEffect *v2; // eax@2
  bool v3; // al@6

  v1 = Singleton<TextScreenEffect>::m_pInstance;
  if ( !Singleton<TextScreenEffect>::m_pInstance )
  {
    v2 = (TextScreenEffect *)operator new(0x28u);
    if ( v2 )
      TextScreenEffect::TextScreenEffect(v2);
    else
      v1 = 0;
    Singleton<TextScreenEffect>::m_pInstance = v1;
  }
  v3 = TextScreenEffect::IsEnd(v1);
  lua_pushboolean(L, v3);
  return 1;
}

//----- (004280D0) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cIsOpenNPCDialog(lua_State *L)
{
  Tutorial *v1; // eax@2
  Tutorial *v2; // eax@3
  bool v3; // al@6

  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v1 = (Tutorial *)operator new(0xB4u);
    if ( v1 )
      Tutorial::Tutorial(v1);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  v3 = Tutorial::IsOpenNPCDialog();
  lua_pushboolean(L, v3);
  return 1;
}

//----- (00428160) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cLockStoneShopInv(lua_State *L)
{
  unsigned int v1; // esi@1
  Tutorial *v2; // eax@2
  Tutorial *v3; // eax@3

  v1 = lua_tointegerx(L, 1, 0);
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v2 = (Tutorial *)operator new(0xB4u);
    if ( v2 )
      Tutorial::Tutorial(v2);
    else
      v3 = 0;
    Singleton<Tutorial>::m_pInstance = v3;
  }
  Tutorial::LockStoneShopInv(v1);
  return 0;
}

//----- (004281F0) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cSetLockItemSell(lua_State *L)
{
  bool v1; // zf@1
  Tutorial *v2; // eax@1
  Tutorial *v3; // eax@2
  bool b; // [sp+8h] [bp-10h]@1

  v1 = lua_toboolean(L, 1) == 0;
  v2 = Singleton<Tutorial>::m_pInstance;
  b = !v1;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v3 = (Tutorial *)operator new(0xB4u);
    if ( v3 )
      Tutorial::Tutorial(v3);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  Tutorial::SetLockItemSell(v2, b);
  return 0;
}

//----- (00428290) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cSetLockItemShop(lua_State *L)
{
  bool v1; // zf@1
  Tutorial *v2; // eax@1
  Tutorial *v3; // eax@2
  bool b; // [sp+8h] [bp-10h]@1

  v1 = lua_toboolean(L, 1) == 0;
  v2 = Singleton<Tutorial>::m_pInstance;
  b = !v1;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v3 = (Tutorial *)operator new(0xB4u);
    if ( v3 )
      Tutorial::Tutorial(v3);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  Tutorial::SetLockItemShop(v2, b);
  return 0;
}

//----- (00428330) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cSetLockStoneShop(lua_State *L)
{
  Tutorial *v1; // eax@2
  Tutorial *v2; // eax@3
  bool b; // [sp+8h] [bp-10h]@1

  b = lua_toboolean(L, 1) != 0;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v1 = (Tutorial *)operator new(0xB4u);
    if ( v1 )
      Tutorial::Tutorial(v1);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  Tutorial::SetLockStoneShop(b);
  return 0;
}

//----- (004283D0) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cSetLockSkillShop(lua_State *L)
{
  bool v1; // zf@1
  Tutorial *v2; // eax@1
  Tutorial *v3; // eax@2
  bool b; // [sp+8h] [bp-10h]@1

  v1 = lua_toboolean(L, 1) == 0;
  v2 = Singleton<Tutorial>::m_pInstance;
  b = !v1;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v3 = (Tutorial *)operator new(0xB4u);
    if ( v3 )
      Tutorial::Tutorial(v3);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  Tutorial::SetLockSkillShop(v2, b);
  return 0;
}

//----- (00428470) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cSetLockItemShopTab(lua_State *L)
{
  bool v1; // zf@1
  Tutorial *v2; // eax@1
  Tutorial *v3; // eax@2
  bool b; // [sp+8h] [bp-10h]@1

  v1 = lua_toboolean(L, 1) == 0;
  v2 = Singleton<Tutorial>::m_pInstance;
  b = !v1;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v3 = (Tutorial *)operator new(0xB4u);
    if ( v3 )
      Tutorial::Tutorial(v3);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  Tutorial::SetLockItemShopTab(v2, b);
  return 0;
}

//----- (00428510) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cSetLockSkillShopTab(lua_State *L)
{
  bool v1; // zf@1
  Tutorial *v2; // eax@1
  Tutorial *v3; // eax@2
  bool b; // [sp+8h] [bp-10h]@1

  v1 = lua_toboolean(L, 1) == 0;
  v2 = Singleton<Tutorial>::m_pInstance;
  b = !v1;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v3 = (Tutorial *)operator new(0xB4u);
    if ( v3 )
      Tutorial::Tutorial(v3);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  Tutorial::SetLockSkillShopTab(v2, b);
  return 0;
}

//----- (004285B0) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cSetHideQuestGiveUp(lua_State *L)
{
  bool v1; // zf@1
  Tutorial *v2; // eax@1
  Tutorial *v3; // eax@2
  bool b; // [sp+8h] [bp-10h]@1

  v1 = lua_toboolean(L, 1) == 0;
  v2 = Singleton<Tutorial>::m_pInstance;
  b = !v1;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v3 = (Tutorial *)operator new(0xB4u);
    if ( v3 )
      Tutorial::Tutorial(v3);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  Tutorial::SetHideQuestGiveUp(v2, b);
  return 0;
}

//----- (00428650) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cSetOpenCharWin(lua_State *L)
{
  bool v1; // zf@1
  Tutorial *v2; // eax@1
  bool v3; // bl@1
  Tutorial *v4; // eax@2

  v1 = lua_toboolean(L, 1) == 0;
  v2 = Singleton<Tutorial>::m_pInstance;
  v3 = !v1;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v4 = (Tutorial *)operator new(0xB4u);
    if ( v4 )
      Tutorial::Tutorial(v4);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  v2->m_bOpenCharWin = v3;
  return 0;
}

//----- (004286D0) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cSetOpenInvenWin(lua_State *L)
{
  bool v1; // zf@1
  Tutorial *v2; // eax@1
  bool v3; // bl@1
  Tutorial *v4; // eax@2

  v1 = lua_toboolean(L, 1) == 0;
  v2 = Singleton<Tutorial>::m_pInstance;
  v3 = !v1;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v4 = (Tutorial *)operator new(0xB4u);
    if ( v4 )
      Tutorial::Tutorial(v4);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  v2->m_bOpenInvenWin = v3;
  return 0;
}

//----- (00428750) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cSetOpenSkillWin(lua_State *L)
{
  bool v1; // zf@1
  Tutorial *v2; // eax@1
  bool v3; // bl@1
  Tutorial *v4; // eax@2

  v1 = lua_toboolean(L, 1) == 0;
  v2 = Singleton<Tutorial>::m_pInstance;
  v3 = !v1;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v4 = (Tutorial *)operator new(0xB4u);
    if ( v4 )
      Tutorial::Tutorial(v4);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  v2->m_bOpenSkillWin = v3;
  return 0;
}

//----- (004287D0) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cSetBuyStone(lua_State *L)
{
  bool v1; // zf@1
  Tutorial *v2; // eax@1
  bool v3; // bl@1
  Tutorial *v4; // eax@2

  v1 = lua_toboolean(L, 1) == 0;
  v2 = Singleton<Tutorial>::m_pInstance;
  v3 = !v1;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v4 = (Tutorial *)operator new(0xB4u);
    if ( v4 )
      Tutorial::Tutorial(v4);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  v2->m_bBuyStone = v3;
  return 0;
}

//----- (00428850) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cSetUseStone(lua_State *L)
{
  bool v1; // zf@1
  Tutorial *v2; // eax@1
  bool v3; // bl@1
  Tutorial *v4; // eax@2

  v1 = lua_toboolean(L, 1) == 0;
  v2 = Singleton<Tutorial>::m_pInstance;
  v3 = !v1;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v4 = (Tutorial *)operator new(0xB4u);
    if ( v4 )
      Tutorial::Tutorial(v4);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  v2->m_bUseStone = v3;
  return 0;
}

//----- (004288D0) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cSetRegistSkill(lua_State *L)
{
  bool v1; // zf@1
  Tutorial *v2; // eax@1
  bool v3; // bl@1
  Tutorial *v4; // eax@2

  v1 = lua_toboolean(L, 1) == 0;
  v2 = Singleton<Tutorial>::m_pInstance;
  v3 = !v1;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v4 = (Tutorial *)operator new(0xB4u);
    if ( v4 )
      Tutorial::Tutorial(v4);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  v2->m_bRegistSkill = v3;
  return 0;
}

//----- (00428950) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cIsOpenQuestWin(lua_State *L)
{
  Tutorial *v1; // eax@1
  Tutorial *v2; // eax@2

  v1 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v2 = (Tutorial *)operator new(0xB4u);
    if ( v2 )
      Tutorial::Tutorial(v2);
    else
      v1 = 0;
    Singleton<Tutorial>::m_pInstance = v1;
  }
  lua_pushboolean(L, v1->m_bOpenQuestWin);
  return 1;
}

//----- (004289D0) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cSetOpenQuestWin(lua_State *L)
{
  bool v1; // zf@1
  Tutorial *v2; // eax@1
  bool v3; // bl@1
  Tutorial *v4; // eax@2

  v1 = lua_toboolean(L, 1) == 0;
  v2 = Singleton<Tutorial>::m_pInstance;
  v3 = !v1;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v4 = (Tutorial *)operator new(0xB4u);
    if ( v4 )
      Tutorial::Tutorial(v4);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  v2->m_bOpenQuestWin = v3;
  return 0;
}

//----- (00428B70) --------------------------------------------------------
int __thiscall LuaArgumentTutorial::setArgument(LuaArgumentTutorial *this, lua_State *L)
{
  char *v2; // eax@1

  v2 = this->m_name._Bx._Buf;
  if ( this->m_name._Myres >= 0x10 )
    v2 = *(char **)v2;
  lua_pushstring(L, v2);
  return 1;
}

//----- (00428BA0) --------------------------------------------------------
int __thiscall LuaArgumentTutorialStep::setArgument(LuaArgumentTutorialStep *this, lua_State *L)
{
  LuaArgumentTutorialStep *v2; // edi@1
  char *v3; // eax@1

  v2 = this;
  v3 = this->m_name._Bx._Buf;
  if ( this->m_name._Myres >= 0x10 )
    v3 = *(char **)v3;
  lua_pushstring(L, v3);
  lua_pushnumber(L, (double)v2->m_step);
  return 2;
}

//----- (00428BE0) --------------------------------------------------------
void __thiscall LuaArgumentTutorial::~LuaArgumentTutorial(LuaArgumentTutorial *this)
{
  LuaArgumentTutorial *v1; // esi@1

  v1 = this;
  this->vfptr = (LuaArgumentVtbl *)&LuaArgumentTutorial::`vftable';
  if ( this->m_name._Myres >= 0x10 )
    operator delete(this->m_name._Bx._Ptr);
  v1->m_name._Myres = 15;
  v1->m_name._Mysize = 0;
  v1->m_name._Bx._Buf[0] = 0;
  LuaArgument::~LuaArgument((LuaArgument *)&v1->vfptr);
}
// 9744F0: using guessed type int (__thiscall *LuaArgumentTutorial::`vftable')(void *p, char);

//----- (00428C20) --------------------------------------------------------
void __thiscall LuaArgumentTutorialStep::~LuaArgumentTutorialStep(LuaArgumentTutorialStep *this)
{
  LuaArgumentTutorialStep *v1; // esi@1

  v1 = this;
  this->vfptr = (LuaArgumentVtbl *)&LuaArgumentTutorialStep::`vftable';
  if ( this->m_name._Myres >= 0x10 )
    operator delete(this->m_name._Bx._Ptr);
  v1->m_name._Myres = 15;
  v1->m_name._Mysize = 0;
  v1->m_name._Bx._Buf[0] = 0;
  LuaArgument::~LuaArgument((LuaArgument *)&v1->vfptr);
}
// 974508: using guessed type int (__thiscall *LuaArgumentTutorialStep::`vftable')(void *p, char);

//----- (00428C60) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cBlinkEffect(lua_State *L)
{
  Tutorial *v1; // ecx@1
  Tutorial *v2; // eax@2
  Tutorial *v3; // eax@3
  std::vector<enum Tutorial::eBlinkEffectType,std::allocator<enum Tutorial::eBlinkEffectType> > BlinkEffectTypeList; // [sp+Ch] [bp-28h]@1
  int EffectCount; // [sp+1Ch] [bp-18h]@6
  int EffectKey; // [sp+20h] [bp-14h]@6
  unsigned int _Val; // [sp+24h] [bp-10h]@1
  int v9; // [sp+30h] [bp-4h]@1

  BlinkEffectTypeList._Myfirst = 0;
  BlinkEffectTypeList._Mylast = 0;
  BlinkEffectTypeList._Myend = 0;
  _Val = lua_tointegerx(L, 1, 0);
  v9 = 0;
  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
    (std::vector<unsigned long,std::allocator<unsigned long> > *)&BlinkEffectTypeList,
    &_Val);
  v1 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v2 = (Tutorial *)operator new(0xB4u);
    _Val = (unsigned int)v2;
    LOBYTE(v9) = 1;
    if ( v2 )
      Tutorial::Tutorial(v2);
    else
      v3 = 0;
    v1 = v3;
    LOBYTE(v9) = 0;
    Singleton<Tutorial>::m_pInstance = v3;
  }
  Tutorial::BlinkEffect(v1, &BlinkEffectTypeList, &EffectKey, &EffectCount);
  lua_pushinteger(L, EffectKey);
  lua_pushinteger(L, EffectCount);
  if ( BlinkEffectTypeList._Myfirst )
    operator delete(BlinkEffectTypeList._Myfirst);
  return 2;
}

//----- (00428D40) --------------------------------------------------------
void __thiscall LuaArgumentTutorial::LuaArgumentTutorial(LuaArgumentTutorial *this)
{
  LuaArgumentTutorial *v1; // esi@1
  int v2; // ecx@1

  v1 = this;
  LuaArgument::LuaArgument((LuaArgument *)&this->vfptr);
  v2 = (int)&v1->m_name;
  v1->vfptr = (LuaArgumentVtbl *)&LuaArgumentTutorial::`vftable';
  *(_DWORD *)(v2 + 20) = 15;
  *(_DWORD *)(v2 + 16) = 0;
  *(_BYTE *)v2 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v1->m_name, "Tutorial", 8u);
}
// 9744F0: using guessed type int (__thiscall *LuaArgumentTutorial::`vftable')(void *p, char);

//----- (00428DB0) --------------------------------------------------------
void __thiscall LuaArgumentTutorialStep::LuaArgumentTutorialStep(LuaArgumentTutorialStep *this, int step)
{
  LuaArgumentTutorialStep *v2; // esi@1
  int v3; // ecx@1

  v2 = this;
  LuaArgument::LuaArgument((LuaArgument *)&this->vfptr);
  v3 = (int)&v2->m_name;
  v2->vfptr = (LuaArgumentVtbl *)&LuaArgumentTutorialStep::`vftable';
  *(_DWORD *)(v3 + 20) = 15;
  *(_DWORD *)(v3 + 16) = 0;
  *(_BYTE *)v3 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v2->m_name, "Tutorial", 8u);
  v2->m_step = step;
}
// 974508: using guessed type int (__thiscall *LuaArgumentTutorialStep::`vftable')(void *p, char);

//----- (00428E20) --------------------------------------------------------
void __thiscall LuaScriptTutorial::update(LuaScriptTutorial *this, float time)
{
  LuaScriptTutorial *v2; // esi@1
  void *(__thiscall *v3)(NiRefObject *, unsigned int); // edx@1
  LuaArgument v4; // [sp+Ch] [bp-38h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v5; // [sp+18h] [bp-2Ch]@1
  int v6; // [sp+40h] [bp-4h]@1

  v2 = this;
  LuaArgument::LuaArgument(&v4);
  v6 = 0;
  v4.vfptr = (LuaArgumentVtbl *)&LuaArgumentTutorial::`vftable';
  v5._Myres = 15;
  v5._Mysize = 0;
  v5._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v5, "Tutorial", 8u);
  v3 = v2->vfptr[2].__vecDelDtor;
  v6 = 1;
  ((void (__thiscall *)(LuaScriptTutorial *, const char *, LuaArgument *))v3)(v2, "Main", &v4);
  v6 = -1;
  v4.vfptr = (LuaArgumentVtbl *)&LuaArgumentTutorial::`vftable';
  if ( v5._Myres >= 0x10 )
    operator delete(v5._Bx._Ptr);
  v5._Myres = 15;
  v5._Mysize = 0;
  v5._Bx._Buf[0] = 0;
  LuaArgument::~LuaArgument(&v4);
}
// 9744F0: using guessed type int (__thiscall *LuaArgumentTutorial::`vftable')(void *p, char);

//----- (00428EF0) --------------------------------------------------------
void __thiscall LuaScriptTutorial::UpdateStep(LuaScriptTutorial *this, int Step)
{
  LuaScriptTutorial *v2; // esi@1
  void *(__thiscall *v3)(NiRefObject *, unsigned int); // edx@1
  LuaArgument v4; // [sp+Ch] [bp-3Ch]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v5; // [sp+18h] [bp-30h]@1
  int v6; // [sp+34h] [bp-14h]@1
  int v7; // [sp+44h] [bp-4h]@1

  v2 = this;
  LuaArgument::LuaArgument(&v4);
  v7 = 0;
  v4.vfptr = (LuaArgumentVtbl *)&LuaArgumentTutorialStep::`vftable';
  v5._Myres = 15;
  v5._Mysize = 0;
  v5._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v5, "Tutorial", 8u);
  v6 = Step;
  v3 = v2->vfptr[2].__vecDelDtor;
  v7 = 1;
  ((void (__thiscall *)(LuaScriptTutorial *, const char *, LuaArgument *))v3)(v2, "UpdateStep", &v4);
  v7 = -1;
  v4.vfptr = (LuaArgumentVtbl *)&LuaArgumentTutorialStep::`vftable';
  if ( v5._Myres >= 0x10 )
    operator delete(v5._Bx._Ptr);
  v5._Myres = 15;
  v5._Mysize = 0;
  v5._Bx._Buf[0] = 0;
  LuaArgument::~LuaArgument(&v4);
}
// 974508: using guessed type int (__thiscall *LuaArgumentTutorialStep::`vftable')(void *p, char);

//----- (00428FC0) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cBlinkItemShop(lua_State *L)
{
  const char *v1; // eax@1
  unsigned int v2; // edi@1
  Tutorial *v3; // ecx@4
  Tutorial *v4; // eax@5
  Tutorial *v5; // eax@6
  int Page; // [sp+14h] [bp-38h]@1
  int EffectKey; // [sp+18h] [bp-34h]@9
  char *pcItemIdx; // [sp+1Ch] [bp-30h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > ItemIdx; // [sp+20h] [bp-2Ch]@1
  int v11; // [sp+48h] [bp-4h]@1

  ItemIdx._Myres = 15;
  ItemIdx._Mysize = 0;
  ItemIdx._Bx._Buf[0] = 0;
  v1 = lua_tolstring(L, 1, 0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&ItemIdx, v1, strlen(v1));
  v11 = 0;
  v2 = lua_tointegerx(L, 2, 0);
  Page = lua_tointegerx(L, 3, 0);
  if ( ItemIdx._Myres < 0x10 )
    pcItemIdx = (char *)&ItemIdx;
  else
    pcItemIdx = ItemIdx._Bx._Ptr;
  v3 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v4 = (Tutorial *)operator new(0xB4u);
    LOBYTE(v11) = 1;
    if ( v4 )
      Tutorial::Tutorial(v4);
    else
      v5 = 0;
    v3 = v5;
    LOBYTE(v11) = 0;
    Singleton<Tutorial>::m_pInstance = v5;
  }
  Tutorial::BlinkItemShop(v3, pcItemIdx, v2, Page, &EffectKey);
  lua_pushinteger(L, EffectKey);
  if ( ItemIdx._Myres >= 0x10 )
    operator delete(ItemIdx._Bx._Ptr);
  return 1;
}

//----- (004290E0) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cBlinkInven(lua_State *L)
{
  const char *v1; // eax@1
  const char *v2; // esi@1
  Tutorial *v3; // ecx@3
  Tutorial *v4; // eax@4
  Tutorial *v5; // eax@5
  Tutorial *v6; // eax@9
  Tutorial *v7; // eax@10
  int EffectKey; // [sp+14h] [bp-30h]@8
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > ItemIdx; // [sp+18h] [bp-2Ch]@1
  int v11; // [sp+40h] [bp-4h]@1

  ItemIdx._Myres = 15;
  ItemIdx._Mysize = 0;
  ItemIdx._Bx._Buf[0] = 0;
  v1 = lua_tolstring(L, 1, 0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&ItemIdx, v1, strlen(v1));
  v2 = ItemIdx._Bx._Ptr;
  v11 = 0;
  if ( ItemIdx._Myres < 0x10 )
    v2 = (const char *)&ItemIdx;
  v3 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v4 = (Tutorial *)operator new(0xB4u);
    LOBYTE(v11) = 1;
    if ( v4 )
      Tutorial::Tutorial(v4);
    else
      v5 = 0;
    v3 = v5;
    LOBYTE(v11) = 0;
    Singleton<Tutorial>::m_pInstance = v5;
  }
  Tutorial::BlinkInven(v3, v2, &EffectKey);
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v6 = (Tutorial *)operator new(0xB4u);
    LOBYTE(v11) = 2;
    if ( v6 )
      Tutorial::Tutorial(v6);
    else
      v7 = 0;
    LOBYTE(v11) = 0;
    Singleton<Tutorial>::m_pInstance = v7;
  }
  Tutorial::SetItemMoveEffectKey(EffectKey);
  lua_pushinteger(L, EffectKey);
  if ( ItemIdx._Myres >= 0x10 )
    operator delete(ItemIdx._Bx._Ptr);
  return 1;
}

//----- (00429220) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cBlinkSkillShop(lua_State *L)
{
  const char *v1; // eax@1
  unsigned int v2; // edi@1
  Tutorial *v3; // ecx@4
  Tutorial *v4; // eax@5
  Tutorial *v5; // eax@6
  int Page; // [sp+14h] [bp-38h]@1
  int EffectKey; // [sp+18h] [bp-34h]@9
  char *pcItemIdx; // [sp+1Ch] [bp-30h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > ItemIdx; // [sp+20h] [bp-2Ch]@1
  int v11; // [sp+48h] [bp-4h]@1

  ItemIdx._Myres = 15;
  ItemIdx._Mysize = 0;
  ItemIdx._Bx._Buf[0] = 0;
  v1 = lua_tolstring(L, 1, 0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&ItemIdx, v1, strlen(v1));
  v11 = 0;
  v2 = lua_tointegerx(L, 2, 0);
  Page = lua_tointegerx(L, 3, 0);
  if ( ItemIdx._Myres < 0x10 )
    pcItemIdx = (char *)&ItemIdx;
  else
    pcItemIdx = ItemIdx._Bx._Ptr;
  v3 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v4 = (Tutorial *)operator new(0xB4u);
    LOBYTE(v11) = 1;
    if ( v4 )
      Tutorial::Tutorial(v4);
    else
      v5 = 0;
    v3 = v5;
    LOBYTE(v11) = 0;
    Singleton<Tutorial>::m_pInstance = v5;
  }
  Tutorial::BlinkSkillShop(v3, pcItemIdx, v2, Page, &EffectKey);
  lua_pushinteger(L, EffectKey);
  if ( ItemIdx._Myres >= 0x10 )
    operator delete(ItemIdx._Bx._Ptr);
  return 1;
}

//----- (00429340) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cBlinkSkill(lua_State *L)
{
  const char *v1; // eax@1
  const char *v2; // esi@1
  Tutorial *v3; // ecx@3
  Tutorial *v4; // eax@4
  Tutorial *v5; // eax@5
  int EffectKey; // [sp+14h] [bp-30h]@8
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > SkillIdx; // [sp+18h] [bp-2Ch]@1
  int v9; // [sp+40h] [bp-4h]@1

  SkillIdx._Myres = 15;
  SkillIdx._Mysize = 0;
  SkillIdx._Bx._Buf[0] = 0;
  v1 = lua_tolstring(L, 1, 0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&SkillIdx, v1, strlen(v1));
  v2 = SkillIdx._Bx._Ptr;
  v9 = 0;
  if ( SkillIdx._Myres < 0x10 )
    v2 = (const char *)&SkillIdx;
  v3 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v4 = (Tutorial *)operator new(0xB4u);
    LOBYTE(v9) = 1;
    if ( v4 )
      Tutorial::Tutorial(v4);
    else
      v5 = 0;
    v3 = v5;
    LOBYTE(v9) = 0;
    Singleton<Tutorial>::m_pInstance = v5;
  }
  Tutorial::BlinkSkill(v3, v2, &EffectKey);
  lua_pushinteger(L, EffectKey);
  if ( SkillIdx._Myres >= 0x10 )
    operator delete(SkillIdx._Bx._Ptr);
  return 1;
}

//----- (00429440) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cStartTextScreenEffect(lua_State *L)
{
  const char *v1; // eax@1
  const char *v2; // eax@1
  ScriptMsg *v3; // esi@3
  TextScreenEffect *v4; // ecx@4
  TextScreenEffect *v5; // eax@5
  TextScreenEffect *v6; // eax@6
  TextScreenEffect *v7; // ecx@9
  TextScreenEffect *v8; // eax@10
  TextScreenEffect *v9; // eax@11
  TextScreenEffect *v10; // ecx@14
  TextScreenEffect *v11; // eax@15
  TextScreenEffect *v12; // eax@16
  float v14; // [sp+18h] [bp-34h]@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > ScriptIndex; // [sp+20h] [bp-2Ch]@1
  int v16; // [sp+48h] [bp-4h]@1

  ScriptIndex._Myres = 15;
  ScriptIndex._Mysize = 0;
  ScriptIndex._Bx._Buf[0] = 0;
  v1 = lua_tolstring(L, 1, 0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&ScriptIndex, v1, strlen(v1));
  v2 = ScriptIndex._Bx._Ptr;
  v16 = 0;
  if ( ScriptIndex._Myres < 0x10 )
    v2 = (const char *)&ScriptIndex;
  v3 = ScriptMsgTab::GetScriptMsgInfo(v2);
  if ( v3 )
  {
    v4 = Singleton<TextScreenEffect>::m_pInstance;
    v14 = Timer::ms_fCurTime;
    if ( !Singleton<TextScreenEffect>::m_pInstance )
    {
      v5 = (TextScreenEffect *)operator new(0x28u);
      LOBYTE(v16) = 1;
      if ( v5 )
        TextScreenEffect::TextScreenEffect(v5);
      else
        v6 = 0;
      v4 = v6;
      LOBYTE(v16) = 0;
      Singleton<TextScreenEffect>::m_pInstance = v6;
    }
    TextScreenEffect::Start(v4, v3->SM_Msg, v14, 0.5, 0);
    v7 = Singleton<TextScreenEffect>::m_pInstance;
    if ( !Singleton<TextScreenEffect>::m_pInstance )
    {
      v8 = (TextScreenEffect *)operator new(0x28u);
      LOBYTE(v16) = 2;
      if ( v8 )
        TextScreenEffect::TextScreenEffect(v8);
      else
        v9 = 0;
      v7 = v9;
      LOBYTE(v16) = 0;
      Singleton<TextScreenEffect>::m_pInstance = v9;
    }
    TextScreenEffect::AddSchedule(v7, 1);
    v10 = Singleton<TextScreenEffect>::m_pInstance;
    if ( !Singleton<TextScreenEffect>::m_pInstance )
    {
      v11 = (TextScreenEffect *)operator new(0x28u);
      LOBYTE(v16) = 3;
      if ( v11 )
        TextScreenEffect::TextScreenEffect(v11);
      else
        v12 = 0;
      v10 = v12;
      LOBYTE(v16) = 0;
      Singleton<TextScreenEffect>::m_pInstance = v12;
    }
    TextScreenEffect::AddSchedule(v10, 2);
  }
  if ( ScriptIndex._Myres >= 0x10 )
    operator delete(ScriptIndex._Bx._Ptr);
  return 0;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004295D0) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cOpenBoxAnnounceWin(lua_State *L)
{
  const char *v1; // eax@1
  const char *v2; // eax@1
  ScriptMsg *v3; // esi@3
  Tutorial *v4; // ecx@4
  Tutorial *v5; // eax@5
  Tutorial *v6; // eax@6
  Tutorial *v7; // eax@9
  Tutorial *v8; // eax@10
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > ScriptIndex; // [sp+10h] [bp-2Ch]@1
  int v11; // [sp+38h] [bp-4h]@1

  ScriptIndex._Myres = 15;
  ScriptIndex._Mysize = 0;
  ScriptIndex._Bx._Buf[0] = 0;
  v1 = lua_tolstring(L, 1, 0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&ScriptIndex, v1, strlen(v1));
  v2 = ScriptIndex._Bx._Ptr;
  v11 = 0;
  if ( ScriptIndex._Myres < 0x10 )
    v2 = (const char *)&ScriptIndex;
  v3 = ScriptMsgTab::GetScriptMsgInfo(v2);
  if ( v3 )
  {
    v4 = Singleton<Tutorial>::m_pInstance;
    if ( !Singleton<Tutorial>::m_pInstance )
    {
      v5 = (Tutorial *)operator new(0xB4u);
      LOBYTE(v11) = 1;
      if ( v5 )
        Tutorial::Tutorial(v5);
      else
        v6 = 0;
      v4 = v6;
      LOBYTE(v11) = 0;
      Singleton<Tutorial>::m_pInstance = v6;
    }
    Tutorial::SetBoxAnnounceMsg(v4, v3->SM_Msg);
    v7 = Singleton<Tutorial>::m_pInstance;
    if ( !Singleton<Tutorial>::m_pInstance )
    {
      v8 = (Tutorial *)operator new(0xB4u);
      LOBYTE(v11) = 2;
      if ( v8 )
        Tutorial::Tutorial(v8);
      else
        v7 = 0;
      LOBYTE(v11) = 0;
      Singleton<Tutorial>::m_pInstance = v7;
    }
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v7->m_pkBoxAnnounceWin->vfptr);
  }
  if ( ScriptIndex._Myres >= 0x10 )
    operator delete(ScriptIndex._Bx._Ptr);
  return 0;
}

//----- (00429710) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cOpenTextBoxMsgWin(lua_State *L)
{
  unsigned __int16 v1; // di@1
  const char *v2; // eax@1
  const char *v3; // eax@1
  ScriptMsg *v4; // eax@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > ScriptIndex; // [sp+10h] [bp-2Ch]@1
  int v7; // [sp+38h] [bp-4h]@1

  v1 = lua_tointegerx(L, 1, 0);
  ScriptIndex._Myres = 15;
  ScriptIndex._Mysize = 0;
  ScriptIndex._Bx._Buf[0] = 0;
  v2 = lua_tolstring(L, 2, 0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&ScriptIndex, v2, strlen(v2));
  v3 = ScriptIndex._Bx._Ptr;
  v7 = 0;
  if ( ScriptIndex._Myres < 0x10 )
    v3 = (const char *)&ScriptIndex;
  v4 = ScriptMsgTab::GetScriptMsgInfo(v3);
  if ( v4 )
    ScreenBDMgr::AddSpeechBD(&g_kScrnBDMgr, v1, v4->SM_Msg, 1000000.0);
  if ( ScriptIndex._Myres >= 0x10 )
    operator delete(ScriptIndex._Bx._Ptr);
  return 0;
}

//----- (004297F0) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cIsHaveItem(lua_State *L)
{
  const char *v1; // eax@1
  const char *v2; // esi@1
  Tutorial *v3; // eax@4
  Tutorial *v4; // eax@5
  bool v5; // al@8
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > ItemIdx; // [sp+14h] [bp-2Ch]@1
  int v8; // [sp+3Ch] [bp-4h]@1

  ItemIdx._Myres = 15;
  ItemIdx._Mysize = 0;
  ItemIdx._Bx._Buf[0] = 0;
  v1 = lua_tolstring(L, 1, 0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&ItemIdx, v1, strlen(v1));
  v2 = ItemIdx._Bx._Ptr;
  v8 = 0;
  if ( ItemIdx._Myres < 0x10 )
    v2 = (const char *)&ItemIdx;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v3 = (Tutorial *)operator new(0xB4u);
    LOBYTE(v8) = 1;
    if ( v3 )
      Tutorial::Tutorial(v3);
    else
      v4 = 0;
    LOBYTE(v8) = 0;
    Singleton<Tutorial>::m_pInstance = v4;
  }
  v5 = Tutorial::IsHaveItem(v2);
  lua_pushboolean(L, v5);
  if ( ItemIdx._Myres >= 0x10 )
    operator delete(ItemIdx._Bx._Ptr);
  return 1;
}

//----- (004298E0) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cIsEquipItem(lua_State *L)
{
  const char *v1; // eax@1
  const char *v2; // esi@1
  Tutorial *v3; // eax@4
  Tutorial *v4; // eax@5
  bool v5; // al@8
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > ItemIdx; // [sp+14h] [bp-2Ch]@1
  int v8; // [sp+3Ch] [bp-4h]@1

  ItemIdx._Myres = 15;
  ItemIdx._Mysize = 0;
  ItemIdx._Bx._Buf[0] = 0;
  v1 = lua_tolstring(L, 1, 0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&ItemIdx, v1, strlen(v1));
  v2 = ItemIdx._Bx._Ptr;
  v8 = 0;
  if ( ItemIdx._Myres < 0x10 )
    v2 = (const char *)&ItemIdx;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v3 = (Tutorial *)operator new(0xB4u);
    LOBYTE(v8) = 1;
    if ( v3 )
      Tutorial::Tutorial(v3);
    else
      v4 = 0;
    LOBYTE(v8) = 0;
    Singleton<Tutorial>::m_pInstance = v4;
  }
  v5 = Tutorial::IsEquipItem(v2);
  lua_pushboolean(L, v5);
  if ( ItemIdx._Myres >= 0x10 )
    operator delete(ItemIdx._Bx._Ptr);
  return 1;
}

//----- (004299D0) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cIsLearnSkill(lua_State *L)
{
  const char *v1; // eax@1
  const char *v2; // esi@1
  Tutorial *v3; // eax@4
  Tutorial *v4; // eax@5
  char v5; // al@8
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > SkillIdx; // [sp+14h] [bp-2Ch]@1
  int v8; // [sp+3Ch] [bp-4h]@1

  SkillIdx._Myres = 15;
  SkillIdx._Mysize = 0;
  SkillIdx._Bx._Buf[0] = 0;
  v1 = lua_tolstring(L, 1, 0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&SkillIdx, v1, strlen(v1));
  v2 = SkillIdx._Bx._Ptr;
  v8 = 0;
  if ( SkillIdx._Myres < 0x10 )
    v2 = (const char *)&SkillIdx;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v3 = (Tutorial *)operator new(0xB4u);
    LOBYTE(v8) = 1;
    if ( v3 )
      Tutorial::Tutorial(v3);
    else
      v4 = 0;
    LOBYTE(v8) = 0;
    Singleton<Tutorial>::m_pInstance = v4;
  }
  v5 = Tutorial::IsLearnSkill(v2);
  lua_pushboolean(L, (unsigned __int8)v5);
  if ( SkillIdx._Myres >= 0x10 )
    operator delete(SkillIdx._Bx._Ptr);
  return 1;
}

//----- (00429AC0) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cIsSelectSkill(lua_State *L)
{
  const char *v1; // eax@1
  const char *v2; // esi@1
  Tutorial *v3; // eax@4
  Tutorial *v4; // eax@5
  bool v5; // al@8
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > SkillIdx; // [sp+14h] [bp-2Ch]@1
  int v8; // [sp+3Ch] [bp-4h]@1

  SkillIdx._Myres = 15;
  SkillIdx._Mysize = 0;
  SkillIdx._Bx._Buf[0] = 0;
  v1 = lua_tolstring(L, 1, 0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&SkillIdx, v1, strlen(v1));
  v2 = SkillIdx._Bx._Ptr;
  v8 = 0;
  if ( SkillIdx._Myres < 0x10 )
    v2 = (const char *)&SkillIdx;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v3 = (Tutorial *)operator new(0xB4u);
    LOBYTE(v8) = 1;
    if ( v3 )
      Tutorial::Tutorial(v3);
    else
      v4 = 0;
    LOBYTE(v8) = 0;
    Singleton<Tutorial>::m_pInstance = v4;
  }
  v5 = Tutorial::IsSelectSkill(v2);
  lua_pushboolean(L, v5);
  if ( SkillIdx._Myres >= 0x10 )
    operator delete(SkillIdx._Bx._Ptr);
  return 1;
}

//----- (00429BB0) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cLockItemShopInv(lua_State *L)
{
  const char *v1; // eax@1
  unsigned int v2; // edi@1
  unsigned int v3; // esi@1
  Tutorial *v4; // eax@5
  Tutorial *v5; // eax@6
  char *pcIgnoreItemIdx; // [sp+14h] [bp-30h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > Ignore_ItemIdx; // [sp+18h] [bp-2Ch]@1
  int v9; // [sp+40h] [bp-4h]@1

  Ignore_ItemIdx._Myres = 15;
  Ignore_ItemIdx._Mysize = 0;
  Ignore_ItemIdx._Bx._Buf[0] = 0;
  v1 = lua_tolstring(L, 1, 0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Ignore_ItemIdx, v1, strlen(v1));
  v9 = 0;
  v2 = lua_tointegerx(L, 2, 0);
  v3 = lua_tointegerx(L, 3, 0);
  if ( Ignore_ItemIdx._Myres < 0x10 )
    pcIgnoreItemIdx = (char *)&Ignore_ItemIdx;
  else
    pcIgnoreItemIdx = Ignore_ItemIdx._Bx._Ptr;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v4 = (Tutorial *)operator new(0xB4u);
    LOBYTE(v9) = 1;
    if ( v4 )
      Tutorial::Tutorial(v4);
    else
      v5 = 0;
    LOBYTE(v9) = 0;
    Singleton<Tutorial>::m_pInstance = v5;
  }
  Tutorial::LockItemShopInv(pcIgnoreItemIdx, v2, v3);
  if ( Ignore_ItemIdx._Myres >= 0x10 )
    operator delete(Ignore_ItemIdx._Bx._Ptr);
  return 0;
}

//----- (00429CC0) --------------------------------------------------------
int __cdecl LuaScriptTutorial::cLockSkillShopInv(lua_State *L)
{
  const char *v1; // eax@1
  unsigned int v2; // edi@1
  unsigned int v3; // esi@1
  Tutorial *v4; // eax@5
  Tutorial *v5; // eax@6
  char *pcIgnoreItemIdx; // [sp+14h] [bp-30h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > Ignore_ItemIdx; // [sp+18h] [bp-2Ch]@1
  int v9; // [sp+40h] [bp-4h]@1

  Ignore_ItemIdx._Myres = 15;
  Ignore_ItemIdx._Mysize = 0;
  Ignore_ItemIdx._Bx._Buf[0] = 0;
  v1 = lua_tolstring(L, 1, 0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Ignore_ItemIdx, v1, strlen(v1));
  v9 = 0;
  v2 = lua_tointegerx(L, 2, 0);
  v3 = lua_tointegerx(L, 3, 0);
  if ( Ignore_ItemIdx._Myres < 0x10 )
    pcIgnoreItemIdx = (char *)&Ignore_ItemIdx;
  else
    pcIgnoreItemIdx = Ignore_ItemIdx._Bx._Ptr;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v4 = (Tutorial *)operator new(0xB4u);
    LOBYTE(v9) = 1;
    if ( v4 )
      Tutorial::Tutorial(v4);
    else
      v5 = 0;
    LOBYTE(v9) = 0;
    Singleton<Tutorial>::m_pInstance = v5;
  }
  Tutorial::LockSkillShopInv(pcIgnoreItemIdx, v2, v3);
  if ( Ignore_ItemIdx._Myres >= 0x10 )
    operator delete(Ignore_ItemIdx._Bx._Ptr);
  return 0;
}

//----- (00429DD0) --------------------------------------------------------
void __thiscall LuaScriptTutorial::initFunc(LuaScriptTutorial *this)
{
  LuaScriptTutorial *v1; // esi@1

  v1 = this;
  LuaScript::initFunc((LuaScript *)&this->vfptr);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cAckMainStep",
    LuaScriptTutorial::cAckMainStep);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cTutorialEnable",
    LuaScriptTutorial::cTutorialEnable);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cBlinkMainMenu",
    LuaScriptTutorial::cBlinkMainMenu);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cBlinkFreeStat",
    LuaScriptTutorial::cBlinkFreeStat);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cBlinkItemShop",
    LuaScriptTutorial::cBlinkItemShop);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cBlinkInven",
    LuaScriptTutorial::cBlinkInven);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cBlinkSkillShop",
    LuaScriptTutorial::cBlinkSkillShop);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cBlinkStoneShop",
    LuaScriptTutorial::cBlinkStoneShop);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cBlinkSkill",
    LuaScriptTutorial::cBlinkSkill);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cBlinkShortCut",
    LuaScriptTutorial::cBlinkShortCut);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cBlinkEffect",
    LuaScriptTutorial::cBlinkEffect);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cRemoveBlinkEffect",
    LuaScriptTutorial::cRemoveBlinkEffect);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cRemoveBlinkMainMenu",
    LuaScriptTutorial::cRemoveBlinkMainMenu);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cStartTextScreenEffect",
    LuaScriptTutorial::cStartTextScreenEffect);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cStopTextScreenEffect",
    LuaScriptTutorial::cStopTextScreenEffect);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cBlinkQuestAccept",
    LuaScriptTutorial::cBlinkQuestAccept);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cRemoveQuestBlinkEffect",
    LuaScriptTutorial::cRemoveQuestBlinkEffect);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cShowTutorialMark",
    LuaScriptTutorial::cShowTutorialMark);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cOpenQuestConditionWin",
    LuaScriptTutorial::cOpenQuestConditionWin);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cCloseQuestConditionWin",
    LuaScriptTutorial::cCloseQuestConditionWin);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cOpenBoxAnnounceWin",
    LuaScriptTutorial::cOpenBoxAnnounceWin);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cCloseBoxAnnounceWin",
    LuaScriptTutorial::cCloseBoxAnnounceWin);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cOpenTextBoxMsgWin",
    LuaScriptTutorial::cOpenTextBoxMsgWin);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cCloseTextBoxMsgWin",
    LuaScriptTutorial::cCloseTextBoxMsgWin);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cHideNewbieToolTip",
    LuaScriptTutorial::cHideNewbieToolTip);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cSetItemShopTab",
    LuaScriptTutorial::cSetItemShopTab);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cIsOpenCharWin",
    LuaScriptTutorial::cIsOpenCharWin);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cIsOpenItemShop",
    LuaScriptTutorial::cIsOpenItemShop);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cIsHaveItem",
    LuaScriptTutorial::cIsHaveItem);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cIsOpenInvenWin",
    LuaScriptTutorial::cIsOpenInvenWin);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cIsEquipItem",
    LuaScriptTutorial::cIsEquipItem);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cIsBuyStone",
    LuaScriptTutorial::cIsBuyStone);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cIsUseStone",
    LuaScriptTutorial::cIsUseStone);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cIsEndWar",
    LuaScriptTutorial::cIsEndWar);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cIsOpenSkillShop",
    LuaScriptTutorial::cIsOpenSkillShop);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cIsLearnSkill",
    LuaScriptTutorial::cIsLearnSkill);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cIsOpenSkillWin",
    LuaScriptTutorial::cIsOpenSkillWin);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cIsSelectSkill",
    LuaScriptTutorial::cIsSelectSkill);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cIsRegistSkill",
    LuaScriptTutorial::cIsRegistSkill);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cIsEndTextScreenEffect",
    LuaScriptTutorial::cIsEndTextScreenEffect);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cIsOpenNPCDialog",
    LuaScriptTutorial::cIsOpenNPCDialog);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cIsOpenQuestWin",
    LuaScriptTutorial::cIsOpenQuestWin);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cLockItemShopInv",
    LuaScriptTutorial::cLockItemShopInv);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cLockStoneShopInv",
    LuaScriptTutorial::cLockStoneShopInv);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cLockSkillShopInv",
    LuaScriptTutorial::cLockSkillShopInv);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cSetLockItemSell",
    LuaScriptTutorial::cSetLockItemSell);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cSetLockItemShop",
    LuaScriptTutorial::cSetLockItemShop);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cSetLockStoneShop",
    LuaScriptTutorial::cSetLockStoneShop);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cSetLockSkillShop",
    LuaScriptTutorial::cSetLockSkillShop);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cSetLockItemShopTab",
    LuaScriptTutorial::cSetLockItemShopTab);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cSetLockSkillShopTab",
    LuaScriptTutorial::cSetLockSkillShopTab);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cSetHideQuestGiveUp",
    LuaScriptTutorial::cSetHideQuestGiveUp);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cSetOpenCharWin",
    LuaScriptTutorial::cSetOpenCharWin);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cSetOpenInvenWin",
    LuaScriptTutorial::cSetOpenInvenWin);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cSetOpenSkillWin",
    LuaScriptTutorial::cSetOpenSkillWin);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cSetBuyStone",
    LuaScriptTutorial::cSetBuyStone);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cSetUseStone",
    LuaScriptTutorial::cSetUseStone);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cSetRegistSkill",
    LuaScriptTutorial::cSetRegistSkill);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[6].__vecDelDtor)(
    v1,
    "cSetOpenQuestWin",
    LuaScriptTutorial::cSetOpenQuestWin);
}

//----- (0042A240) --------------------------------------------------------
LuaScriptTutorial *__thiscall LuaScriptTutorial::`scalar deleting destructor'(LuaScriptTutorial *this, unsigned int a2)
{
  LuaScriptTutorial *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&LuaScriptTutorial::`vftable';
  LuaScript::~LuaScript((LuaScript *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9744D0: using guessed type int (__thiscall *LuaScriptTutorial::`vftable')(void *p, char);

//----- (0042A270) --------------------------------------------------------
LuaArgumentTutorial *__thiscall LuaArgumentTutorial::`vector deleting destructor'(LuaArgumentTutorial *this, unsigned int a2)
{
  LuaArgumentTutorial *v2; // esi@1

  v2 = this;
  this->vfptr = (LuaArgumentVtbl *)&LuaArgumentTutorial::`vftable';
  if ( this->m_name._Myres >= 0x10 )
    operator delete(this->m_name._Bx._Ptr);
  v2->m_name._Myres = 15;
  v2->m_name._Mysize = 0;
  v2->m_name._Bx._Buf[0] = 0;
  LuaArgument::~LuaArgument((LuaArgument *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9744F0: using guessed type int (__thiscall *LuaArgumentTutorial::`vftable')(void *p, char);

//----- (0042A2C0) --------------------------------------------------------
LuaArgumentTutorialStep *__thiscall LuaArgumentTutorialStep::`vector deleting destructor'(LuaArgumentTutorialStep *this, unsigned int a2)
{
  LuaArgumentTutorialStep *v2; // esi@1

  v2 = this;
  this->vfptr = (LuaArgumentVtbl *)&LuaArgumentTutorialStep::`vftable';
  if ( this->m_name._Myres >= 0x10 )
    operator delete(this->m_name._Bx._Ptr);
  v2->m_name._Myres = 15;
  v2->m_name._Mysize = 0;
  v2->m_name._Bx._Buf[0] = 0;
  LuaArgument::~LuaArgument((LuaArgument *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 974508: using guessed type int (__thiscall *LuaArgumentTutorialStep::`vftable')(void *p, char);

//----- (0042A310) --------------------------------------------------------
void __thiscall std::vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>::~vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>(std::vector<HeightMapMaker::TriangleIndex *,std::allocator<HeightMapMaker::TriangleIndex *> > *this)
{
  std::vector<HeightMapMaker::TriangleIndex *,std::allocator<HeightMapMaker::TriangleIndex *> > *v1; // esi@1

  v1 = this;
  if ( this->_Myfirst )
    operator delete(this->_Myfirst);
  v1->_Myfirst = 0;
  v1->_Mylast = 0;
  v1->_Myend = 0;
}

//----- (0042A340) --------------------------------------------------------
char __cdecl MenuTexMgr::Init()
{
  return 1;
}

//----- (0042A350) --------------------------------------------------------
void __cdecl MenuTexMgr::Terminate()
{
  unsigned int v0; // edi@1
  int v1; // esi@2

  v0 = 0;
  do
  {
    v1 = MenuTexMgr::ms_aspTexture[v0];
    if ( v1 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v1 + 4)) )
      {
        if ( v1 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v1)(v1, 1);
      }
      MenuTexMgr::ms_aspTexture[v0] = 0;
    }
    ++v0;
  }
  while ( v0 < 32 );
}
// A89CA0: using guessed type int MenuTexMgr::ms_aspTexture[];

//----- (0042A3A0) --------------------------------------------------------
void __cdecl MenuTexMgr::Remove(unsigned int uiEnum)
{
  int v1; // esi@2

  if ( uiEnum < 0x20 )
  {
    v1 = MenuTexMgr::ms_aspTexture[uiEnum];
    if ( v1 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v1 + 4)) )
      {
        if ( v1 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v1)(v1, 1);
      }
      MenuTexMgr::ms_aspTexture[uiEnum] = 0;
    }
  }
}
// A89CA0: using guessed type int MenuTexMgr::ms_aspTexture[];

//----- (0042A3F0) --------------------------------------------------------
NiSourceTexture *__cdecl MenuTexMgr::Create(unsigned int uiEnum)
{
  NiImageConverter *v1; // eax@3
  NiSourceTexture *result; // eax@3
  NiTexture::FormatPrefs kPrefs; // [sp+4h] [bp-114h]@4
  char acFileName[260]; // [sp+10h] [bp-108h]@3

  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acFileName, "%s%s.tga", &Folder::m_acMenu, (&MenuTexStr)[uiEnum]);
  v1 = NiImageConverter::GetImageConverter();
  result = (NiSourceTexture *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v1->vfptr[2].__vecDelDtor)(
                                v1,
                                acFileName,
                                0);
  if ( result )
  {
    kPrefs.m_ePixelLayout = 6;
    kPrefs.m_eAlphaFmt = 3;
    kPrefs.m_eMipMapped = 0;
    result = NiSourceTexture::Create((NiPixelData *)result, &kPrefs);
  }
  return result;
}
// A6A0B0: using guessed type const char **MenuTexStr;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0042A4A0) --------------------------------------------------------
NiSourceTexture *__cdecl MenuTexMgr::GetTexture(unsigned int uiEnum)
{
  NiSourceTexture *result; // eax@2
  NiSourceTexture *v2; // eax@4
  int v3; // esi@4
  int v4; // edi@4

  if ( uiEnum < 0x20 )
  {
    if ( !MenuTexMgr::ms_aspTexture[uiEnum] )
    {
      v2 = MenuTexMgr::Create(uiEnum);
      v3 = MenuTexMgr::ms_aspTexture[uiEnum];
      v4 = (int)v2;
      if ( (NiSourceTexture *)v3 != v2 )
      {
        if ( v3 && !InterlockedDecrement((volatile LONG *)(v3 + 4)) && v3 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v3)(v3, 1);
        MenuTexMgr::ms_aspTexture[uiEnum] = v4;
        if ( v4 )
          InterlockedIncrement((volatile LONG *)(v4 + 4));
      }
    }
    result = (NiSourceTexture *)MenuTexMgr::ms_aspTexture[uiEnum];
  }
  else
  {
    result = 0;
  }
  return result;
}
// A89CA0: using guessed type int MenuTexMgr::ms_aspTexture[];

//----- (0042A520) --------------------------------------------------------
void __thiscall ItemSlot::ItemSlot(ItemSlot *this)
{
  ItemSlot *v1; // esi@1

  v1 = this;
  ItemIcon::ItemIcon((ItemIcon *)&this->vfptr);
  v1->m_pkFrameWork = 0;
  v1->m_pkSender = 0;
  v1->vfptr = (NiRefObjectVtbl *)&ItemSlot::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ItemSlot::`vftable'{for `IDirectMessenger'};
  v1->m_uiSenderType = -1;
  v1->m_uiSenderInvIndex = -1;
  v1->m_uiInvIndex = -1;
  v1->m_uiInvType = -1;
  ItemIcon::SetItem((ItemIcon *)&v1->vfptr, 0, 1);
}
// 974954: using guessed type void (__thiscall *ItemSlot::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 974974: using guessed type int (__thiscall *ItemSlot::`vftable'{for `NiNode'})(void *p, char);

//----- (0042A5B0) --------------------------------------------------------
void __thiscall ItemSlot::~ItemSlot(ItemSlot *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ItemSlot::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ItemSlot::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
}
// 974954: using guessed type void (__thiscall *ItemSlot::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 974974: using guessed type int (__thiscall *ItemSlot::`vftable'{for `NiNode'})(void *p, char);

//----- (0042A5D0) --------------------------------------------------------
char __thiscall ItemSlot::Create(ItemSlot *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork)
{
  ItemSlot *v6; // esi@1
  char result; // al@1

  v6 = this;
  this->m_pkFrameWork = pkFrameWork;
  result = ItemIcon::Create((ItemIcon *)&this->vfptr, iXPos, iYPos, pkParent);
  if ( result )
  {
    v6->m_uiInvIndex = uiInvIndex;
    result = 1;
  }
  return result;
}

//----- (0042A610) --------------------------------------------------------
void __thiscall ItemSlot::OnFirstHitWin(ItemSlot *this)
{
  ItemSlot *v1; // esi@1
  signed __int16 v2; // ax@2
  Item *v3; // eax@2
  ItemInfoWin *v4; // ecx@3

  v1 = this;
  if ( ItemIcon::GetItemID((ItemIcon *)&this->vfptr) == -1 )
    goto LABEL_5;
  v2 = ItemIcon::GetItemID((ItemIcon *)&v1->vfptr);
  v3 = Inventory::GetItemByID(&g_kInventory, v2);
  if ( v3 )
  {
    v4 = g_pkItemInfoWin;
    v1->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
    if ( v4 )
      ItemInfoWin::SetItemInfo(v4, v3);
LABEL_5:
    PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
    return;
  }
  v1->m_pkToolTipWin = 0;
}

//----- (0042A670) --------------------------------------------------------
void __thiscall ItemSlot::ReSetSlot(ItemSlot *this)
{
  this->m_uiSenderType = -1;
  this->m_uiSenderInvIndex = -1;
  this->m_pkSender = 0;
  ItemIcon::SetItem((ItemIcon *)&this->vfptr, 0, 1);
}

//----- (0042A6A0) --------------------------------------------------------
void __thiscall ItemSlot::SetItemByID(ItemSlot *this, unsigned __int16 ItemID)
{
  ItemSlot *v2; // esi@1
  Item *v3; // eax@3

  v2 = this;
  if ( ItemID == -1 )
  {
    ItemIcon::SetItem((ItemIcon *)&this->vfptr, 0, 1);
  }
  else
  {
    v3 = Inventory::GetItemByID(&g_kInventory, ItemID);
    ItemIcon::SetItem((ItemIcon *)&v2->vfptr, v3, 1);
    v2->m_uiSenderInvIndex = Inventory::GetSlotByID(&g_kInventory, ItemID);
  }
}

//----- (0042A700) --------------------------------------------------------
void __thiscall MinimonAutoItemUseWin::ShowAutoUseItemInfo(MinimonAutoItemUseWin *this)
{
  unsigned __int16 *v1; // ebx@1
  unsigned __int16 v2; // si@2
  ItemIcon *v3; // edi@2
  Item *v4; // eax@4
  unsigned __int16 *v5; // ebx@6
  unsigned __int16 v6; // si@7
  ItemIcon *v7; // edi@7
  Item *v8; // eax@9
  MinimonAutoItemUseWin *v9; // [sp+Ch] [bp-Ch]@1
  signed int v10; // [sp+10h] [bp-8h]@1
  signed int v11; // [sp+10h] [bp-8h]@6
  ItemIcon **v12; // [sp+14h] [bp-4h]@1
  ItemIcon **v13; // [sp+14h] [bp-4h]@6

  v9 = this;
  v12 = (ItemIcon **)this->m_apkBuffSlot;
  v1 = this->m_pkBuffItemList;
  v10 = 12;
  do
  {
    v2 = *v1;
    v3 = *v12;
    if ( *v1 == -1 )
    {
      ItemIcon::SetItem(v3, 0, 1);
    }
    else
    {
      v4 = Inventory::GetItemByID(&g_kInventory, *v1);
      ItemIcon::SetItem(v3, v4, 1);
      v3[1].m_spControllers.m_pObject = (NiTimeController *)Inventory::GetSlotByID(&g_kInventory, v2);
    }
    ++v12;
    ++v1;
    --v10;
  }
  while ( v10 );
  v13 = (ItemIcon **)v9->m_apkChargedSlot;
  v5 = v9->m_pkChargedItemList;
  v11 = 12;
  do
  {
    v6 = *v5;
    v7 = *v13;
    if ( *v5 == -1 )
    {
      ItemIcon::SetItem(v7, 0, 1);
    }
    else
    {
      v8 = Inventory::GetItemByID(&g_kInventory, *v5);
      ItemIcon::SetItem(v7, v8, 1);
      v7[1].m_spControllers.m_pObject = (NiTimeController *)Inventory::GetSlotByID(&g_kInventory, v6);
    }
    ++v13;
    ++v5;
    --v11;
  }
  while ( v11 );
}

//----- (0042A800) --------------------------------------------------------
void MinimonAutoItemUseWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "Minimon_AutoItemUse");
}

//----- (0042A830) --------------------------------------------------------
void __thiscall MinimonAutoItemUseWin::OnCancel(MinimonAutoItemUseWin *this)
{
  PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
}

//----- (0042A840) --------------------------------------------------------
void __thiscall MinimonAutoItemUseWin::MinimonAutoItemUseWin(MinimonAutoItemUseWin *this)
{
  MinimonAutoItemUseWin *v1; // esi@1
  int v2; // eax@1
  ItemSlot **v3; // ecx@1
  unsigned __int16 *v4; // eax@1
  signed int v5; // edx@1
  ItemSlot **v6; // ecx@3
  unsigned __int16 *v7; // eax@3
  signed int v8; // edx@3

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&MinimonAutoItemUseWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MinimonAutoItemUseWin::`vftable'{for `IDirectMessenger'};
  v2 = (int)&v1->m_kDropContents;
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  v1->m_kDrop.m_pkSender = 0;
  *(_WORD *)(v2 + 60) = -1;
  *(_DWORD *)v2 = &DropContents::`vftable';
  *(_DWORD *)(v2 + 64) = 0;
  v1->m_kDrop.m_pkContents = &v1->m_kDropContents;
  *(_WORD *)&v1->m_bAutoUseBuffItem = 0;
  v3 = v1->m_apkBuffSlot;
  v4 = v1->m_pkBuffItemList;
  v5 = 12;
  do
  {
    *v4 = -1;
    *v3 = 0;
    ++v4;
    ++v3;
    --v5;
  }
  while ( v5 );
  v6 = v1->m_apkChargedSlot;
  v7 = v1->m_pkChargedItemList;
  v8 = 12;
  do
  {
    *v7 = -1;
    *v6 = 0;
    ++v7;
    ++v6;
    --v8;
  }
  while ( v8 );
  v1->m_pkBuffBtn = 0;
  v1->m_pkChargedBtn = 0;
  v1->m_pkCancelBtn = 0;
  v1->m_pkBuffBtnText = 0;
  v1->m_pkChargedBtnText = 0;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 974BE4: using guessed type void (__thiscall *MinimonAutoItemUseWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 974C04: using guessed type int (__thiscall *MinimonAutoItemUseWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0042A900) --------------------------------------------------------
void __thiscall MinimonAutoItemUseWin::~MinimonAutoItemUseWin(MinimonAutoItemUseWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&MinimonAutoItemUseWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MinimonAutoItemUseWin::`vftable'{for `IDirectMessenger'};
  this->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  this->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 974BE4: using guessed type void (__thiscall *MinimonAutoItemUseWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 974C04: using guessed type int (__thiscall *MinimonAutoItemUseWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0042A930) --------------------------------------------------------
void __thiscall MinimonAutoItemUseWin::OnSlotLClick(MinimonAutoItemUseWin *this, unsigned int uiSlotIndex)
{
  MinimonAutoItemUseWin *v2; // esi@1
  ItemSlot *v3; // edi@1
  Item *v4; // ebx@2
  unsigned int v5; // eax@3
  unsigned int v6; // eax@3

  v2 = this;
  v3 = this->m_apkBuffSlot[uiSlotIndex];
  if ( v3 )
  {
    v4 = ItemIcon::GetItem((ItemIcon *)&v3->vfptr);
    if ( v4 )
    {
      v2->m_kDropContents.m_eSenderType = 0;
      v2->m_kDropContents.m_eType = 6;
      v5 = v3->m_uiSenderInvIndex;
      v2->m_kDropContents.m_apvParam[1] = 0;
      v2->m_kDropContents.m_apvParam[0] = v4;
      v2->m_kDropContents.m_uiSenderIndex = v5;
      v2->m_kDropContents.m_uiLot = ((int (__thiscall *)(_DWORD))v4->vfptr[3].__vecDelDtor)(v4);
      v2->m_kDropContents.m_kItemID = v4->m_pkInfo->ID;
      v2->m_kDrop.m_pkSender = (PgWin *)v2;
      PgCursor::ms_pkDrop = &v2->m_kDrop;
      v6 = v3->m_uiInvType;
      if ( v6 )
      {
        if ( v6 == 1 && v2->m_bAutoUseChargedItem )
          GameFrameWork::NcCharChargedItemAutoUseOffReq((GameFrameWork *)v2->m_pkFrameWork);
      }
      else if ( v2->m_bAutoUseBuffItem )
      {
        GameFrameWork::NcCharBuffItemAutoUseOffReq((GameFrameWork *)v2->m_pkFrameWork);
      }
      v3->m_uiSenderType = -1;
      v3->m_uiSenderInvIndex = -1;
      v3->m_pkSender = 0;
      ItemIcon::SetItem((ItemIcon *)&v3->vfptr, 0, 1);
    }
  }
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (0042AA20) --------------------------------------------------------
void __thiscall MinimonAutoItemUseWin::OnBuffItemUse(MinimonAutoItemUseWin *this)
{
  char *v1; // esi@3
  ItemIcon **v2; // edi@3
  signed int v3; // ebx@3
  MinimonAutoItemUseWin *v4; // [sp+0h] [bp-4h]@1

  v4 = this;
  if ( this->m_bAutoUseBuffItem )
  {
    GameFrameWork::NcCharBuffItemAutoUseOffReq((GameFrameWork *)this->m_pkFrameWork);
  }
  else
  {
    v1 = (char *)this->m_pkBuffItemList;
    v2 = (ItemIcon **)this->m_apkBuffSlot;
    v3 = 12;
    do
    {
      if ( ItemIcon::GetItem(*v2) )
        *(_WORD *)v1 = ItemIcon::GetItem(*v2)->m_kStruct.itemid;
      else
        *(_WORD *)v1 = -1;
      ++v2;
      v1 += 2;
      --v3;
    }
    while ( v3 );
    GameFrameWork::NcCharBuffItemAutoUseOnReq((GameFrameWork *)v4->m_pkFrameWork, v4->m_pkBuffItemList);
  }
}

//----- (0042AAA0) --------------------------------------------------------
void __thiscall MinimonAutoItemUseWin::OnChargedItemUse(MinimonAutoItemUseWin *this)
{
  char *v1; // esi@3
  ItemIcon **v2; // edi@3
  signed int v3; // ebx@3
  MinimonAutoItemUseWin *v4; // [sp+0h] [bp-4h]@1

  v4 = this;
  if ( this->m_bAutoUseChargedItem )
  {
    GameFrameWork::NcCharChargedItemAutoUseOffReq((GameFrameWork *)this->m_pkFrameWork);
  }
  else
  {
    v1 = (char *)this->m_pkChargedItemList;
    v2 = (ItemIcon **)this->m_apkChargedSlot;
    v3 = 12;
    do
    {
      if ( ItemIcon::GetItem(*v2) )
        *(_WORD *)v1 = ItemIcon::GetItem(*v2)->m_kStruct.itemid;
      else
        *(_WORD *)v1 = -1;
      ++v2;
      v1 += 2;
      --v3;
    }
    while ( v3 );
    GameFrameWork::NcCharChargedItemAutoUseOnReq((GameFrameWork *)v4->m_pkFrameWork, v4->m_pkChargedItemList);
  }
}

//----- (0042AB20) --------------------------------------------------------
void __thiscall ItemSlot::DoAction(ItemSlot *this)
{
  ItemSlot *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiInvIndex);
}

//----- (0042AB50) --------------------------------------------------------
void __thiscall ItemSlot::DoRAction(ItemSlot *this)
{
  ItemSlot *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiRCmdMsg, v1->m_uiInvIndex);
}

//----- (0042AB80) --------------------------------------------------------
void __thiscall MinimonAutoItemUseWin::OnCommand(MinimonAutoItemUseWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0xBu:
      MinimonAutoItemUseWin::OnSlotLClick(this, lParam);
      break;
    case 0xCu:
      MinimonAutoItemUseWin::OnBuffItemUse(this);
      break;
    case 0xDu:
      MinimonAutoItemUseWin::OnChargedItemUse(this);
      break;
    case 0xEu:
      PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
      break;
    case 0xFu:
      MinimonAutoItemUseWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (0042ABF0) --------------------------------------------------------
void __thiscall MinimonAutoItemUseWin::SetAutoUseBuffItem(MinimonAutoItemUseWin *this, int bUse)
{
  MinimonAutoItemUseWin *v2; // esi@1
  NiRefObjectVtbl *v3; // edi@1
  NiUnsharedGeometryGroup *v4; // eax@2
  NiUnsharedGeometryGroup *v5; // eax@3
  GameFrameWork *v6; // esi@4
  NiUnsharedGeometryGroup *v7; // eax@4
  unsigned int v8; // [sp-4h] [bp-10h]@2

  v2 = this;
  this->m_bAutoUseBuffItem = bUse;
  Char::SetItemAutoUseBuff(g_pkMainChar, (int)this, bUse);
  v3 = v2->m_pkBuffBtnText->vfptr;
  if ( (_BYTE)bUse )
  {
    v4 = TextData3::Get(0xF887E8Au);
    v3[118].__vecDelDtor((NiRefObject *)v2->m_pkBuffBtnText, (unsigned int)v4);
    v8 = -791211485;
  }
  else
  {
    v5 = TextData3::Get(0x55807E8Au);
    v3[118].__vecDelDtor((NiRefObject *)v2->m_pkBuffBtnText, (unsigned int)v5);
    v8 = -803403229;
  }
  v6 = (GameFrameWork *)v2->m_pkFrameWork;
  v7 = TextData3::Get(v8);
  GameFrameWork::AddSysMsg(v6, (const char *)v7);
}

//----- (0042AC80) --------------------------------------------------------
void __thiscall MinimonAutoItemUseWin::SetAutoUseChargedItem(MinimonAutoItemUseWin *this, int bUse)
{
  MinimonAutoItemUseWin *v2; // esi@1
  NiRefObjectVtbl *v3; // edi@1
  NiUnsharedGeometryGroup *v4; // eax@2
  NiUnsharedGeometryGroup *v5; // eax@3
  GameFrameWork *v6; // esi@4
  NiUnsharedGeometryGroup *v7; // eax@4
  unsigned int v8; // [sp-4h] [bp-10h]@2

  v2 = this;
  this->m_bAutoUseChargedItem = bUse;
  Char::SetItemAutoUseCharged(g_pkMainChar, (int)this, bUse);
  v3 = v2->m_pkChargedBtnText->vfptr;
  if ( (_BYTE)bUse )
  {
    v4 = TextData3::Get(0xF887E8Au);
    v3[118].__vecDelDtor((NiRefObject *)v2->m_pkChargedBtnText, (unsigned int)v4);
    v8 = 138543962;
  }
  else
  {
    v5 = TextData3::Get(0x55807E8Au);
    v3[118].__vecDelDtor((NiRefObject *)v2->m_pkChargedBtnText, (unsigned int)v5);
    v8 = 138561874;
  }
  v6 = (GameFrameWork *)v2->m_pkFrameWork;
  v7 = TextData3::Get(v8);
  GameFrameWork::AddSysMsg(v6, (const char *)v7);
}

//----- (0042AD10) --------------------------------------------------------
char __thiscall MinimonAutoItemUseWin::DropItemSlot(MinimonAutoItemUseWin *this, unsigned int uiReceiverInvIndex, PgWinDrop *pkDrop)
{
  ItemSlot *v3; // esi@1
  DropContents *v5; // eax@3
  Item *v6; // eax@5
  unsigned int v7; // edx@6
  signed int v8; // edi@7
  ItemIcon **v9; // ebx@7
  unsigned __int16 v10; // ST18_2@9
  GameFrameWork *v11; // esi@13
  signed int v12; // edi@15
  ItemIcon **v13; // ebx@15
  unsigned __int16 v14; // ST18_2@17
  NiUnsharedGeometryGroup *v15; // eax@23
  DropContents *pkContents; // [sp+4h] [bp-Ch]@3
  MinimonAutoItemUseWin *v17; // [sp+Ch] [bp-4h]@1
  Item *pItem; // [sp+18h] [bp+8h]@5

  v3 = this->m_apkBuffSlot[uiReceiverInvIndex];
  v17 = this;
  if ( !v3 )
    return 0;
  v5 = (DropContents *)pkDrop->m_pkContents;
  pkContents = v5;
  if ( !v5 )
    return 0;
  if ( v5->m_apvParam[1] == (void *)1 )
    return 0;
  v6 = (Item *)v5->m_apvParam[0];
  pItem = v6;
  if ( !v6 )
    return 0;
  v7 = v3->m_uiInvType;
  if ( !v7 )
  {
    v8 = 0;
    v9 = (ItemIcon **)this->m_apkBuffSlot;
    while ( 1 )
    {
      v10 = v6->m_kStruct.itemid;
      if ( ItemIcon::GetItemID(*v9) == v10 )
      {
        v11 = (GameFrameWork *)v17->m_pkFrameWork;
        goto LABEL_23;
      }
      ++v8;
      ++v9;
      if ( v8 >= 12 )
        break;
      v6 = pItem;
    }
    if ( v17->m_bAutoUseBuffItem )
      GameFrameWork::NcCharBuffItemAutoUseOffReq((GameFrameWork *)v17->m_pkFrameWork);
    goto LABEL_21;
  }
  if ( v7 != 1 )
  {
LABEL_21:
    v3->m_uiSenderType = -1;
    v3->m_uiSenderInvIndex = -1;
    v3->m_pkSender = 0;
    ItemIcon::SetItem((ItemIcon *)&v3->vfptr, 0, 1);
    v3->m_uiSenderType = pkContents->m_eSenderType;
    v3->m_uiSenderInvIndex = pkContents->m_uiSenderIndex;
    v3->m_pkSender = pkDrop->m_pkSender;
    ItemIcon::SetItem((ItemIcon *)&v3->vfptr, pItem, 1);
    return 1;
  }
  v12 = 0;
  v13 = (ItemIcon **)this->m_apkChargedSlot;
  while ( 1 )
  {
    v14 = v6->m_kStruct.itemid;
    if ( ItemIcon::GetItemID(*v13) == v14 )
      break;
    ++v12;
    ++v13;
    if ( v12 >= 12 )
    {
      if ( v17->m_bAutoUseChargedItem )
        GameFrameWork::NcCharChargedItemAutoUseOffReq((GameFrameWork *)v17->m_pkFrameWork);
      goto LABEL_21;
    }
    v6 = pItem;
  }
  v11 = (GameFrameWork *)v17->m_pkFrameWork;
LABEL_23:
  v15 = TextData3::Get(0xFB855966);
  GameFrameWork::AddSysMsg(v11, (const char *)v15);
  PgCursor::ms_bKeepDrop = 1;
  return 0;
}
// B648B8: using guessed type bool PgCursor::ms_bKeepDrop;

//----- (0042AE90) --------------------------------------------------------
void __thiscall MinimonAutoItemUseWin::AutoUseItemExhausted(MinimonAutoItemUseWin *this, unsigned __int16 ItemID)
{
  MinimonAutoItemUseWin *v2; // edi@1
  unsigned __int16 v3; // cx@1
  signed int v4; // esi@2
  unsigned __int16 *v5; // eax@2
  ItemIcon *v6; // ecx@6
  signed int v7; // esi@7
  unsigned __int16 *v8; // eax@7
  ItemIcon *v9; // ecx@11
  Item *v10; // eax@12
  int v11; // eax@13
  GameFrameWork *v12; // edi@14
  int v13; // ST08_4@14
  char *v14; // eax@14
  const char *v15; // eax@14

  v2 = this;
  v3 = ItemID;
  if ( ItemID != -1 )
  {
    v4 = 0;
    v5 = v2->m_pkBuffItemList;
    while ( *v5 != ItemID )
    {
      ++v4;
      ++v5;
      if ( v4 >= 12 )
        goto LABEL_7;
    }
    v6 = (ItemIcon *)&v2->m_apkBuffSlot[v4]->vfptr;
    v6[1].m_pcName = (char *)-1;
    v6[1].m_spControllers.m_pObject = (NiTimeController *)-1;
    v6[1].m_uiMaxSize = 0;
    ItemIcon::SetItem(v6, 0, 1);
    v2->m_pkBuffItemList[v4] = -1;
    v3 = ItemID;
LABEL_7:
    v7 = 0;
    v8 = v2->m_pkChargedItemList;
    while ( *v8 != v3 )
    {
      ++v7;
      ++v8;
      if ( v7 >= 12 )
        goto LABEL_12;
    }
    v9 = (ItemIcon *)&v2->m_apkChargedSlot[v7]->vfptr;
    v9[1].m_pcName = (char *)-1;
    v9[1].m_spControllers.m_pObject = (NiTimeController *)-1;
    v9[1].m_uiMaxSize = 0;
    ItemIcon::SetItem(v9, 0, 1);
    v3 = ItemID;
    v2->m_pkChargedItemList[v7] = -1;
LABEL_12:
    v10 = Inventory::GetItemByID(&g_kInventory, v3);
    if ( v10 )
    {
      v11 = (int)v10->m_pkInfo->InxName;
      if ( v11 )
      {
        v12 = (GameFrameWork *)v2->m_pkFrameWork;
        v13 = v11;
        v14 = (char *)TextData3::Get(0xC1F181Bu);
        v15 = fs(v14, v13);
        GameFrameWork::AddSysMsg(v12, v15);
      }
    }
  }
}

//----- (0042AFA0) --------------------------------------------------------
void __thiscall ItemSlot::UpdateMeWin(ItemSlot *this, float fCurTime)
{
  ItemSlot *v2; // edi@1
  signed __int16 v3; // si@2
  PgFrameWork *v4; // eax@3
  InventoryWin *v5; // ecx@4
  unsigned int v6; // eax@5
  char *v7; // eax@6
  MinimonAutoItemUseWin *v8; // eax@7

  v2 = this;
  if ( this->m_fLastUpdateTime + 0.1000000014901161 <= fCurTime )
  {
    this->m_fLastUpdateTime = fCurTime;
    v3 = ItemIcon::GetItemID((ItemIcon *)&this->vfptr);
    if ( v3 != -1 )
    {
      v4 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v4 )
      {
        v5 = (InventoryWin *)v4[19].m_BackFrameID;
        if ( v5 )
        {
          v6 = InventoryWin::GetTotalItemCount(v5, v3);
          if ( v6 )
          {
            v7 = fs("%d", v6);
            ItemIcon::SetLotText((ItemIcon *)&v2->vfptr, v7);
          }
          else
          {
            v8 = (MinimonAutoItemUseWin *)PgWin::GetParentWin((PgWin *)&v2->vfptr);
            MinimonAutoItemUseWin::AutoUseItemExhausted(v8, v3);
          }
        }
      }
    }
  }
}

//----- (0042B040) --------------------------------------------------------
char __thiscall ItemSlot::EatDropInstance(ItemSlot *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  ItemSlot *v4; // esi@1
  _DWORD *v5; // eax@2
  int v6; // ecx@3
  int v7; // eax@5
  MinimonAutoUseItem *v8; // eax@6
  GameFrameWork *v9; // esi@8
  NiUnsharedGeometryGroup *v10; // eax@8
  unsigned int v12; // ecx@11
  MinimonAutoItemUseWin *v13; // eax@17
  unsigned int v14; // [sp-4h] [bp-Ch]@7

  v4 = this;
  if ( !*pkDrop )
    return 0;
  v5 = (*pkDrop)->m_pkContents;
  if ( v5[2] || (v6 = v5[4], v6 != 6) && v6 || (v7 = v5[5]) == 0 )
  {
LABEL_9:
    PgCursor::ms_bKeepDrop = 1;
    return 0;
  }
  v8 = MinimonAutoUseItemTable::GetMiniMonDataByIDX((char *)(*(_DWORD *)(v7 + 112) + 2));
  if ( !v8 )
  {
    v14 = -1211163901;
LABEL_8:
    v9 = (GameFrameWork *)v4->m_pkFrameWork;
    v10 = TextData3::Get(v14);
    GameFrameWork::AddSysMsg(v9, (const char *)v10);
    goto LABEL_9;
  }
  v12 = v4->m_uiInvType;
  if ( v12 )
  {
    if ( v12 == 1 && v8->MAUItem != 1 )
    {
      v14 = -267378621;
      goto LABEL_8;
    }
  }
  else if ( v8->MAUItem != 2 )
  {
    v14 = -1194847228;
    goto LABEL_8;
  }
  v13 = (MinimonAutoItemUseWin *)PgWin::GetParentWin((PgWin *)&v4->vfptr);
  return MinimonAutoItemUseWin::DropItemSlot(v13, v4->m_uiInvIndex, *pkDrop);
}
// B648B8: using guessed type bool PgCursor::ms_bKeepDrop;

//----- (0042B0F0) --------------------------------------------------------
void __thiscall MinimonAutoItemUseWin::SetAutoUseItemInfo(MinimonAutoItemUseWin *this, USEITEM_MINIMON_INFO *pInfo)
{
  MinimonAutoItemUseWin *v2; // edi@1
  unsigned __int16 *v3; // ecx@6
  char *v4; // eax@6
  signed int v5; // edx@6
  unsigned __int16 *v6; // ecx@8
  char *v7; // eax@8
  signed int v8; // edx@8

  v2 = this;
  if ( pInfo )
  {
    if ( pInfo->bNormalItem )
      MinimonAutoItemUseWin::SetAutoUseBuffItem(this, 1);
    if ( pInfo->bChargedItem )
      MinimonAutoItemUseWin::SetAutoUseChargedItem(v2, 1);
    v3 = v2->m_pkBuffItemList;
    v4 = (char *)pInfo->NormalItemList;
    v5 = 12;
    do
    {
      *v3 = *(_WORD *)v4;
      v4 += 2;
      ++v3;
      --v5;
    }
    while ( v5 );
    v6 = v2->m_pkChargedItemList;
    v7 = (char *)pInfo->ChargedItemList;
    v8 = 12;
    do
    {
      *v6 = *(_WORD *)v7;
      v7 += 2;
      ++v6;
      --v8;
    }
    while ( v8 );
    MinimonAutoItemUseWin::ShowAutoUseItemInfo(v2);
  }
}

//----- (0042B170) --------------------------------------------------------
ItemSlot *__cdecl ItemSlot::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork)
{
  PgWin *v5; // eax@1
  PgWin *v6; // eax@2
  PgWin *v7; // esi@2
  PgWin *v8; // edi@8
  ItemSlot *v9; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v11; // [sp+20h] [bp-4h]@1

  v5 = (PgWin *)operator new(0x1E0u);
  result.m_pObject = v5;
  v11 = 0;
  if ( v5 )
  {
    ItemSlot::ItemSlot((ItemSlot *)v5);
    v7 = v6;
  }
  else
  {
    v7 = 0;
  }
  if ( v7 )
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  v11 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v7);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, PgWin *, PgFrameWork *))v7->vfptr[154].__vecDelDtor)(
                          v7,
                          iXPos,
                          iYPos,
                          uiInvIndex,
                          pkParent,
                          pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v7->vfptr[89].__vecDelDtor)(v7);
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = (ItemSlot *)v7;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v7);
    if ( result.m_pObject )
    {
      v8 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v8 )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      }
    }
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = 0;
  }
  return v9;
}

//----- (0042B2B0) --------------------------------------------------------
MinimonAutoItemUseWin *__cdecl MinimonAutoItemUseWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  MinimonAutoItemUseWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x258u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    MinimonAutoItemUseWin::MinimonAutoItemUseWin((MinimonAutoItemUseWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (MinimonAutoItemUseWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (0042B3E0) --------------------------------------------------------
char __thiscall MinimonAutoItemUseWin::Create(MinimonAutoItemUseWin *this, PgFrameWork *pkFrameWork)
{
  MinimonAutoItemUseWin *v2; // edi@1
  NiTexturePalette *v3; // esi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  int v8; // esi@10
  int v9; // ebx@10
  NiSourceTexture *v10; // eax@10
  PgSprData *v11; // eax@11
  D3DXCOLOR v12; // ST1C_16@13
  char *v13; // eax@13
  D3DXCOLOR v14; // ST1C_16@13
  char *v15; // eax@13
  D3DXCOLOR v16; // ST1C_16@13
  char *v17; // eax@13
  D3DXCOLOR v18; // ST1C_16@13
  char *v19; // eax@13
  D3DXCOLOR v20; // ST1C_16@13
  char *v21; // eax@13
  D3DXCOLOR v22; // ST1C_16@13
  char *v23; // eax@13
  D3DXCOLOR v24; // ST1C_16@13
  char *v25; // eax@13
  IconWin **v26; // esi@13
  NiNode *v27; // ebx@14
  const char *v28; // eax@14
  PgSprData *v29; // eax@14
  PgWinSpr *v30; // ebx@14
  char *v31; // eax@14
  int v32; // ebx@14
  ItemSlot *v33; // eax@14
  ItemIcon *v34; // ecx@14
  IconWin **v35; // esi@15
  NiNode *v36; // ebx@16
  const char *v37; // eax@16
  PgSprData *v38; // eax@16
  PgWinSpr *v39; // ebx@16
  char *v40; // eax@16
  int v41; // ebx@16
  ItemSlot *v42; // eax@16
  ItemIcon *v43; // ecx@16
  NiNode *v44; // esi@17
  UIUtil ui; // [sp+40h] [bp-38h]@10
  int i; // [sp+54h] [bp-24h]@13
  int iOffX; // [sp+58h] [bp-20h]@10
  int iOffY; // [sp+5Ch] [bp-1Ch]@10
  NiPointer<NiNode> spNode; // [sp+60h] [bp-18h]@1
  int uiLeft; // [sp+64h] [bp-14h]@4
  int uiTop; // [sp+68h] [bp-10h]@4
  int v52; // [sp+74h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v52 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\Minimon_AutoItemUse.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "MinimonAutoItemUseWin", 0) )
  {
    v6 = spNode.m_pObject;
    v52 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = uiLeft;
  v9 = uiTop;
  iOffX = uiLeft;
  iOffY = uiTop;
  UIUtil::UIUtil(&ui);
  LOBYTE(v52) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, v8, v9);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v11, (PgWin *)&v2->vfptr, 0, 0);
  UIUtil::CreateSpr(&ui, "Panel01", 0);
  *(_QWORD *)&v12.r = *(_QWORD *)&Color::m_kDxWinTitleColor.r;
  *(_QWORD *)&v12.b = qword_A696E8;
  v13 = (char *)TextData3::Get(0xCD29242F);
  UIUtil::CreateTextNoSpr(&ui, "WinTitle", v13, v12, 5u);
  UIUtil::CreateBtn(&ui, 0xFu, "HelpLinkNor", "HelpLinkOver", "HelpLinkClick", 0, 0);
  UIUtil::CreateBtn(&ui, 0xEu, "ClsNor", "ClsClick", "ClsOver", 0, 0);
  UIUtil::CreateSpr(&ui, "BuffIcon", 0);
  UIUtil::CreateSpr(&ui, "ChargedIcon", 0);
  *(_QWORD *)&v14.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v14.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v15 = (char *)TextData3::Get(0x2E2E2861u);
  UIUtil::CreateTextNoSpr(&ui, "BuffTipText", v15, v14, 4u);
  *(_QWORD *)&v16.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v16.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v17 = (char *)TextData3::Get(0x3161264Cu);
  UIUtil::CreateTextNoSpr(&ui, "ChargedTipText", v17, v16, 4u);
  *(_QWORD *)&v18.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v18.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v19 = (char *)TextData3::Get(0x2F415D72u);
  UIUtil::CreateTextNoSpr(&ui, "TipText", v19, v18, 4u);
  v2->m_pkBuffBtn = UIUtil::CreateBtn(&ui, 0xCu, "BuffBtnNor", "BuffBtnClick", "BuffBtnOver", 0, 0);
  v2->m_pkChargedBtn = UIUtil::CreateBtn(&ui, 0xDu, "ChargedBtnNor", "ChargedBtnClick", "ChargedBtnOver", 0, 0);
  v2->m_pkCancelBtn = UIUtil::CreateBtn(&ui, 0xEu, "CancelNor", "CancelClick", "CancelOver", 0, 0);
  *(_QWORD *)&v20.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v20.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v21 = (char *)TextData3::Get(0xF857E8Au);
  UIUtil::CreateAttachedText((PgWin *)&v2->m_pkCancelBtn->vfptr, v21, v20, 5u);
  *(_QWORD *)&v22.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v22.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v23 = (char *)TextData3::Get(0x55807E8Au);
  v2->m_pkBuffBtnText = UIUtil::CreateAttachedText((PgWin *)&v2->m_pkBuffBtn->vfptr, v23, v22, 5u);
  *(_QWORD *)&v24.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v24.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v25 = (char *)TextData3::Get(0x55807E8Au);
  v2->m_pkChargedBtnText = UIUtil::CreateAttachedText((PgWin *)&v2->m_pkChargedBtn->vfptr, v25, v24, 5u);
  i = 0;
  v26 = (IconWin **)v2->m_apkBuffSlot;
  do
  {
    v27 = spNode.m_pObject;
    v28 = fs("BuffSlot%02d", i);
    v29 = PgSprData::Create((NiAVObject *)&v27->vfptr, v28, &uiLeft, &uiTop, 0);
    v30 = PgWinSpr::CreateWin(uiLeft - iOffX, uiTop - iOffY, v29, (PgWin *)&v2->vfptr, 0, 0);
    v30->m_pkToolTipWin = g_pkToolTipWin;
    v31 = (char *)TextData3::Get(0x4B4B6849u);
    PgWin::SetToolTipWinText((PgWin *)&v30->vfptr, v31);
    v30->vfptr[64].__vecDelDtor((NiRefObject *)v30, 1u);
    v32 = i;
    v33 = ItemSlot::CreateWin(uiLeft - iOffX + 1, uiTop - iOffY + 1, i, (PgWin *)&v2->vfptr, pkFrameWork);
    *v26 = (IconWin *)v33;
    v33->vfptr[60].__vecDelDtor((NiRefObject *)v33, 1u);
    ((void (__stdcall *)(signed int))(*v26)->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(signed int))(*v26)->vfptr[129].__vecDelDtor)(11);
    ((void (__stdcall *)(signed int))(*v26)->vfptr[140].__vecDelDtor)(10);
    (*v26)->m_eType = 1;
    LODWORD((*v26)[1].m_kLocal.m_Translate.x) = 0;
    IconWin::ShowFocus(*v26, 1);
    v34 = (ItemIcon *)*v26;
    v34[1].m_pcName = (char *)-1;
    v34[1].m_spControllers.m_pObject = (NiTimeController *)-1;
    v34[1].m_uiMaxSize = 0;
    ItemIcon::SetItem(v34, 0, 1);
    ++v26;
    i = v32 + 1;
  }
  while ( v32 + 1 < 12 );
  i = 0;
  v35 = (IconWin **)v2->m_apkChargedSlot;
  do
  {
    v36 = spNode.m_pObject;
    v37 = fs("ChargedSlot%02d", i);
    v38 = PgSprData::Create((NiAVObject *)&v36->vfptr, v37, &uiLeft, &uiTop, 0);
    v39 = PgWinSpr::CreateWin(uiLeft - iOffX, uiTop - iOffY, v38, (PgWin *)&v2->vfptr, 0, 0);
    v39->m_pkToolTipWin = g_pkToolTipWin;
    v40 = (char *)TextData3::Get(0x4C4B6849u);
    PgWin::SetToolTipWinText((PgWin *)&v39->vfptr, v40);
    v39->vfptr[64].__vecDelDtor((NiRefObject *)v39, 1u);
    v41 = i;
    v42 = ItemSlot::CreateWin(uiLeft - iOffX + 1, uiTop - iOffY + 1, i + 12, (PgWin *)&v2->vfptr, pkFrameWork);
    *v35 = (IconWin *)v42;
    v42->vfptr[60].__vecDelDtor((NiRefObject *)v42, 1u);
    ((void (__stdcall *)(signed int))(*v35)->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(signed int))(*v35)->vfptr[129].__vecDelDtor)(11);
    ((void (__stdcall *)(signed int))(*v35)->vfptr[140].__vecDelDtor)(10);
    (*v35)->m_eType = 1;
    LODWORD((*v35)[1].m_kLocal.m_Translate.x) = 1;
    IconWin::ShowFocus(*v35, 1);
    v43 = (ItemIcon *)*v35;
    v43[1].m_pcName = (char *)-1;
    v43[1].m_spControllers.m_pObject = (NiTimeController *)-1;
    v43[1].m_uiMaxSize = 0;
    ItemIcon::SetItem(v43, 0, 1);
    ++v35;
    i = v41 + 1;
  }
  while ( v41 + 1 < 12 );
  ((void (__thiscall *)(MinimonAutoItemUseWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.30000001,
    0.5);
  LOBYTE(v52) = 0;
  UIUtil::~UIUtil(&ui);
  v44 = spNode.m_pObject;
  v52 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v44 )
    v44->vfptr->__vecDelDtor((NiRefObject *)v44, 1u);
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A696E8: using guessed type __int64 qword_A696E8;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0042BAE0) --------------------------------------------------------
void __thiscall ItemIcon::SetLotText(ItemIcon *this, char *pcText)
{
  ItemIcon *v2; // esi@1

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkLotText->vfptr[118].__vecDelDtor)(pcText);
  ((void (__stdcall *)(_DWORD))v2->m_pkLotText->vfptr[64].__vecDelDtor)(1);
}

//----- (0042BB20) --------------------------------------------------------
ItemSlot *__thiscall ItemSlot::`scalar deleting destructor'(ItemSlot *this, unsigned int a2)
{
  ItemSlot *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ItemSlot::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ItemSlot::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 974954: using guessed type void (__thiscall *ItemSlot::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 974974: using guessed type int (__thiscall *ItemSlot::`vftable'{for `NiNode'})(void *p, char);

//----- (0042BB60) --------------------------------------------------------
MinimonAutoUseItem *__cdecl MinimonAutoUseItemTable::GetMiniMonDataByIDX(char *pcItemIDX)
{
  char *v1; // ebx@1
  int v2; // eax@3
  unsigned int v3; // edi@4
  unsigned int v4; // esi@6
  MinimonAutoUseItem *result; // eax@7

  v1 = pcItemIDX;
  if ( pcItemIDX && *pcItemIDX )
  {
    v2 = *(_DWORD *)(ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>::ms_pkTable + 56);
    if ( v2 )
      v3 = *(_DWORD *)(v2 + 40);
    else
      v3 = 0;
    v4 = 0;
    if ( v3 )
    {
      do
      {
        result = (MinimonAutoUseItem *)CDataReader::GetRecord(
                                         (CDataReader *)(ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>::ms_pkTable
                                                       + 4),
                                         v4);
        if ( result )
        {
          if ( !strcmp(result->ItemIDX, v1) )
            return result;
          v1 = pcItemIDX;
        }
        ++v4;
      }
      while ( v4 < v3 );
    }
    result = 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A89D20: using guessed type int ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>::ms_pkTable;

//----- (0042BBF0) --------------------------------------------------------
MinimonAutoItemUseWin *__thiscall MinimonAutoItemUseWin::`scalar deleting destructor'(MinimonAutoItemUseWin *this, unsigned int a2)
{
  MinimonAutoItemUseWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&MinimonAutoItemUseWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MinimonAutoItemUseWin::`vftable'{for `IDirectMessenger'};
  this->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  this->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 974BE4: using guessed type void (__thiscall *MinimonAutoItemUseWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 974C04: using guessed type int (__thiscall *MinimonAutoItemUseWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0042BC40) --------------------------------------------------------
void __thiscall MobKillCountWin::MobKillCountWin(MobKillCountWin *this)
{
  MobKillCountWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_pkPortrait = 0;
  v1->m_pkText = 0;
  v1->m_uiKillCount = 0;
  v1->m_uiMobCount = 0;
  v1->vfptr = (NiRefObjectVtbl *)&MobKillCountWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MobKillCountWin::`vftable'{for `IDirectMessenger'};
}
// 974E5C: using guessed type void (__thiscall *MobKillCountWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 974E7C: using guessed type int (__thiscall *MobKillCountWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0042BC80) --------------------------------------------------------
void __thiscall MobKillCountWin::~MobKillCountWin(MobKillCountWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&MobKillCountWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MobKillCountWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 974E5C: using guessed type void (__thiscall *MobKillCountWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 974E7C: using guessed type int (__thiscall *MobKillCountWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0042BCA0) --------------------------------------------------------
char __thiscall MobKillCountWin::Create(MobKillCountWin *this, PgFrameWork *pkFrameWork)
{
  MobKillCountWin *v2; // edi@1
  char result; // al@1
  NiSourceTexture *v4; // eax@2
  PgWinSpr *v5; // esi@2
  PgFont *v6; // ST1C_4@2
  unsigned int v7; // ST18_4@2
  unsigned int v8; // eax@2
  PgWinText *v9; // eax@2
  NiSourceTexture *v10; // esi@2
  unsigned int v11; // ST1C_4@2
  unsigned int v12; // eax@2
  PgWinSpr *v13; // eax@2

  v2 = this;
  result = PgWinFrame::Create((PgWinFrame *)&this->vfptr, 0, 0, 0, pkFrameWork, "MobKillCountWin", 0);
  if ( result )
  {
    v4 = PgUtil::Create1PixelSourceTexture(0, 0, 0, -1);
    v5 = PgWinSpr::CreateWin(v4, 20, 5, 0x64u, 0x1Eu, (PgWin *)&v2->vfptr, 0, 0);
    v5->vfptr[69].__vecDelDtor((NiRefObject *)v5, COERCE_UNSIGNED_INT(0.5));
    v5->vfptr[60].__vecDelDtor((NiRefObject *)v5, 0);
    v6 = Font::Get(0);
    v7 = ((int (__thiscall *)(_DWORD))v5->vfptr[37].__vecDelDtor)(v5);
    v8 = ((int (__thiscall *)(_DWORD))v5->vfptr[36].__vecDelDtor)(v5);
    v9 = PgWinText::CreateWin(0, 0, v8, v7, v6, (PgWin *)&v5->vfptr, 0, 0);
    v2->m_pkText = v9;
    v9->vfptr[122].__vecDelDtor((NiRefObject *)v9, 5u);
    ((void (__stdcall *)(_DWORD))v2->m_pkText->vfptr[60].__vecDelDtor)(0);
    v10 = PortraitTextureBuffer::GetMobPortrait(0);
    v11 = ((int (__thiscall *)(_DWORD))v10->vfptr[16].__vecDelDtor)(v10);
    v12 = ((int (__thiscall *)(_DWORD))v10->vfptr[15].__vecDelDtor)(v10);
    v13 = PgWinSpr::CreateWin(v10, 0, 0, v12, v11, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkPortrait = v13;
    v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
    ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.34999999);
    result = 1;
  }
  return result;
}

//----- (0042BDF0) --------------------------------------------------------
void __thiscall MobKillCountWin::AddCount(MobKillCountWin *this)
{
  MobKillCountWin *v1; // esi@1
  unsigned int v2; // eax@1
  unsigned int v3; // ecx@1
  NiRefObjectVtbl **v4; // eax@3
  NiRefObjectVtbl *v5; // edi@4
  char *v6; // eax@4

  v1 = this;
  v2 = this->m_uiKillCount;
  v3 = this->m_uiMobCount;
  if ( v2 < v3 )
    v1->m_uiKillCount = v2 + 1;
  v4 = &v1->m_pkText->vfptr;
  if ( v4 )
  {
    v5 = *v4;
    v6 = fs("(%d / %d)", v1->m_uiKillCount, v3);
    v5[118].__vecDelDtor((NiRefObject *)v1->m_pkText, (unsigned int)v6);
  }
}

//----- (0042BE40) --------------------------------------------------------
bool __thiscall MobKillCountWin::IsEnd(MobKillCountWin *this)
{
  return this->m_uiKillCount == this->m_uiMobCount;
}

//----- (0042BE60) --------------------------------------------------------
void __thiscall MobKillCountWin::Init(MobKillCountWin *this, unsigned __int16 kMobID, unsigned int uiMobCount)
{
  MobKillCountWin *v3; // esi@1
  PgWinSpr *v4; // eax@1
  PgSpr *v5; // edi@2
  NiSourceTexture *v6; // eax@2
  NiRefObjectVtbl **v7; // eax@3
  NiRefObjectVtbl *v8; // edi@4
  char *v9; // eax@4

  v3 = this;
  v4 = this->m_pkPortrait;
  if ( v4 )
  {
    v5 = v4->m_spSpr.m_pObject;
    v6 = PortraitTextureBuffer::GetMobPortrait(kMobID);
    PgSpr::SetTexture(v5, (NiTexture *)&v6->vfptr);
  }
  v7 = &v3->m_pkText->vfptr;
  v3->m_uiKillCount = 0;
  v3->m_uiMobCount = uiMobCount;
  if ( v7 )
  {
    v8 = *v7;
    v9 = fs("(%d / %d)", 0, uiMobCount);
    v8[118].__vecDelDtor((NiRefObject *)v3->m_pkText, (unsigned int)v9);
  }
}

//----- (0042BED0) --------------------------------------------------------
MobKillCountWin *__cdecl MobKillCountWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  MobKillCountWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x168u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&MobKillCountWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&MobKillCountWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][1]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (MobKillCountWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 974E5C: using guessed type void (__thiscall *MobKillCountWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 974E7C: using guessed type int (__thiscall *MobKillCountWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0042C030) --------------------------------------------------------
MobKillCountWin *__thiscall MobKillCountWin::`vector deleting destructor'(MobKillCountWin *this, unsigned int a2)
{
  MobKillCountWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&MobKillCountWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MobKillCountWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 974E5C: using guessed type void (__thiscall *MobKillCountWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 974E7C: using guessed type int (__thiscall *MobKillCountWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0042C070) --------------------------------------------------------
void __thiscall SlotWin::SlotWin(SlotWin *this)
{
  SlotWin *v1; // esi@1

  v1 = this;
  ItemIcon::ItemIcon((ItemIcon *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&SlotWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&SlotWin::`vftable'{for `IDirectMessenger'};
  v1->m_uiSenderType = -1;
  v1->m_uiSenderInvIndex = -1;
  v1->m_pkSender = 0;
  v1->m_uiInvIndex = -1;
  v1->m_uiInvType = -1;
  ItemIcon::SetItem((ItemIcon *)&v1->vfptr, 0, 1);
  v1->m_pkFrameWork = 0;
  v1->m_bLock = 0;
}
// 975224: using guessed type void (__thiscall *SlotWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 975244: using guessed type int (__thiscall *SlotWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0042C100) --------------------------------------------------------
void __thiscall SlotWin::~SlotWin(SlotWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&SlotWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SlotWin::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
}
// 975224: using guessed type void (__thiscall *SlotWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 975244: using guessed type int (__thiscall *SlotWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0042C120) --------------------------------------------------------
char __thiscall SlotWin::Create(SlotWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork)
{
  SlotWin *v6; // esi@1
  char result; // al@1

  v6 = this;
  this->m_pkFrameWork = pkFrameWork;
  result = ItemIcon::Create((ItemIcon *)&this->vfptr, iXPos, iYPos, pkParent);
  if ( result )
  {
    v6->m_uiInvIndex = uiInvIndex;
    ItemIcon::ShowLotText((ItemIcon *)&v6->vfptr, 0);
    result = 1;
  }
  return result;
}

//----- (0042C180) --------------------------------------------------------
void MoverUpgradeWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "MoverUpgrade");
}

//----- (0042C1B0) --------------------------------------------------------
void MoverUpgradeWin::OnShowWin()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideWin(v1, BIL_MOVER_3);
}

//----- (0042C1E0) --------------------------------------------------------
SlotWin *__thiscall MoverUpgradeWin::GetInsertedOldSlot(MoverUpgradeWin *this, unsigned int _uiSlotNum)
{
  MoverUpgradeWin *v2; // esi@1

  v2 = this;
  if ( _uiSlotNum )
  {
    if ( _uiSlotNum == 1 && ItemIcon::GetItem((ItemIcon *)&this->m_apkSlotWin[1]->vfptr) )
      return v2->m_apkSlotWin[1];
  }
  else if ( ItemIcon::GetItem((ItemIcon *)&this->m_apkSlotWin[0]->vfptr) )
  {
    return v2->m_apkSlotWin[0];
  }
  return 0;
}

//----- (0042C240) --------------------------------------------------------
void __thiscall SlotWin::OnFirstHitWin(SlotWin *this)
{
  SlotWin *v1; // esi@1
  PgWin *v2; // eax@5
  unsigned int v3; // ecx@6
  ItemIcon *v4; // ecx@7
  Item *v5; // eax@9
  ItemInfoWin *v6; // ecx@10

  v1 = this;
  if ( !this->m_bLock )
  {
    if ( ItemIcon::GetItem((ItemIcon *)&this->vfptr) )
      v1->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
    else
      v1->m_pkToolTipWin = g_pkToolTipWin;
    PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
    v2 = v1->m_pkSender;
    if ( v2 )
    {
      v3 = v1->m_uiSenderInvIndex;
      if ( v3 < 0xC0 )
      {
        v4 = (ItemIcon *)LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][v3 + 2]);
        if ( v4 )
        {
          if ( ItemIcon::GetItem(v4) )
          {
            v5 = ItemIcon::GetItem((ItemIcon *)&v1->vfptr);
            if ( v5 )
            {
              v6 = (ItemInfoWin *)v1->m_pkToolTipWin;
              if ( v6 )
              {
                ItemInfoWin::SetItemInfo(v6, v5);
                PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
              }
            }
          }
        }
      }
    }
  }
}

//----- (0042C2D0) --------------------------------------------------------
char __thiscall SlotWin::SetSenderInvSlotLock(SlotWin *this, bool _bLock)
{
  PgWin *v2; // eax@1
  char result; // al@2
  unsigned int v4; // ecx@3
  InvWin *v5; // ecx@4

  v2 = this->m_pkSender;
  if ( v2
    && (v4 = this->m_uiSenderInvIndex, v4 < 0xC0)
    && (v5 = (InvWin *)LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][v4 + 2])) != 0 )
  {
    InvWin::SetLock(v5, _bLock);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0042C310) --------------------------------------------------------
void __thiscall MoverUpgradeWin::UpdateMeWin(MoverUpgradeWin *this, float fCurTime)
{
  SpEffect *v2; // ecx@1

  v2 = this->m_apkEffect;
  if ( v2->m_bLive )
    SpEffect::Update(v2, fCurTime);
}

//----- (0042C330) --------------------------------------------------------
void __thiscall MoverUpgradeWin::OnCancel(MoverUpgradeWin *this)
{
  if ( this->m_pkMsgBox )
    this->m_pkMsgBox = 0;
  GameFrameWork::CloseMoverUpgradeWin((GameFrameWork *)this->m_pkFrameWork, 1);
}

//----- (0042C360) --------------------------------------------------------
void __thiscall MoverUpgradeWin::DirectMessage(MoverUpgradeWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  MoverUpgradeWin *v4; // esi@1

  v4 = this;
  if ( iMsgTag == 27 && pvBody && !*(_DWORD *)pvBody )
  {
    LOBYTE(this->m_kEffectList.m_pkTail[37].m_pkPrev) = 1;
    *(_BYTE *)(this->m_kEffectList.m_kAllocator.m_uiCount + 448) = 1;
    GameFrameWork::NcMoverUpgradeReq(
      (GameFrameWork *)LODWORD(this->m_kLocal.m_Rotate.m_pEntry[1][0]),
      LODWORD(this->m_kBound.m_kCenter.x),
      LODWORD(this->m_kBound.m_kCenter.y));
    SpEffect::Start((SpEffect *)v4->vfptr, (NiNode *)v4->m_pkMsgHooker);
    LODWORD(v4->m_kBound.m_fRadius) = 0;
  }
}

//----- (0042C3D0) --------------------------------------------------------
bool __thiscall MoverUpgradeWin::IsUpgrading(MoverUpgradeWin *this)
{
  SpEffect *v1; // eax@1
  bool result; // al@2

  v1 = this->m_apkEffect;
  if ( v1 )
    result = v1->m_bLive;
  else
    result = 0;
  return result;
}

//----- (0042C3F0) --------------------------------------------------------
void __thiscall SlotWin::DoAction(SlotWin *this)
{
  SlotWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiInvIndex);
}

//----- (0042C420) --------------------------------------------------------
void __thiscall SlotWin::DoRAction(SlotWin *this)
{
  SlotWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiRCmdMsg, v1->m_uiInvIndex);
}

//----- (0042C450) --------------------------------------------------------
void __thiscall SlotWin::ReSetSlot(SlotWin *this)
{
  SlotWin *v1; // esi@1
  PgWin *v2; // eax@1
  unsigned int v3; // ecx@2
  InvWin *v4; // ecx@3

  v1 = this;
  v2 = this->m_pkSender;
  this->m_bLock = 0;
  if ( v2 )
  {
    v3 = this->m_uiSenderInvIndex;
    if ( v3 < 0xC0 )
    {
      v4 = (InvWin *)LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][v3 + 2]);
      if ( v4 )
        InvWin::SetLock(v4, 0);
    }
  }
  v1->m_uiSenderType = -1;
  v1->m_uiSenderInvIndex = -1;
  v1->m_pkSender = 0;
  ItemIcon::SetItem((ItemIcon *)&v1->vfptr, 0, 1);
}

//----- (0042C4B0) --------------------------------------------------------
void __userpurge MoverUpgradeWin::ShowUpgradeResult(MoverUpgradeWin *this@<ecx>, unsigned int a2@<edi>, unsigned int uiSlotIndex, bool bRare, bool bUpgrade)
{
  MoverUpgradeWin *v5; // esi@1
  InventoryWin *v6; // eax@1
  ItemIcon *v7; // ecx@3
  Item *v8; // eax@4
  Item *v9; // edi@4
  SlotWin *v10; // eax@5
  PgWin *v11; // ecx@5
  unsigned int v12; // eax@6
  InvWin *v13; // ecx@7
  int v14; // ebx@9
  int v15; // eax@9
  PgWinText *v16; // ecx@9
  NiRefObjectVtbl *v17; // edi@10
  void *(__thiscall *v18)(NiRefObject *, unsigned int); // edx@10
  const char *v19; // edi@12
  char *v20; // ST04_4@14
  char *v21; // eax@14
  unsigned int v22; // eax@14
  InvWin *v23; // eax@15
  char *v24; // ST04_4@18
  char *v25; // eax@18
  NiUnsharedGeometryGroup *v26; // eax@18
  char *v27; // eax@21
  unsigned int v28; // [sp-8h] [bp-10h]@4
  InventoryWin *pkInventoryWin; // [sp+4h] [bp-4h]@1

  v5 = this;
  v6 = (InventoryWin *)this->m_pkFrameWork[19].m_BackFrameID;
  pkInventoryWin = v6;
  if ( v6 )
  {
    if ( uiSlotIndex < 0xC0 )
    {
      v7 = (ItemIcon *)&v6->m_apkInvWin[uiSlotIndex]->vfptr;
      if ( v7 )
      {
        v28 = a2;
        v8 = ItemIcon::GetItem(v7);
        v9 = v8;
        if ( v8 )
        {
          ItemIcon::SetItem((ItemIcon *)&v5->m_apkSlotWin[0]->vfptr, v8, 1);
          v5->m_apkSlotWin[0]->m_bLock = 0;
          v5->m_apkSlotWin[0]->m_uiSenderInvIndex = uiSlotIndex;
          v10 = v5->m_apkSlotWin[0];
          v11 = v10->m_pkSender;
          if ( v11 )
          {
            v12 = v10->m_uiSenderInvIndex;
            if ( v12 < 0xC0 )
            {
              v13 = (InvWin *)LODWORD(v11[1].m_kLocal.m_Rotate.m_pEntry[0][v12 + 2]);
              if ( v13 )
                InvWin::SetLock(v13, 1);
            }
          }
          v14 = (int)v9->m_pkInfo->Name;
          v15 = (int)v9->vfptr[10].__vecDelDtor((NiRefObject *)v9, v28);
          v16 = v5->m_pkMoverNameWin[0];
          if ( v15 )
          {
            v17 = v16->vfptr;
            fs("(+%d)%s", v15);
            v16 = v5->m_pkMoverNameWin[0];
            v18 = v17[118].__vecDelDtor;
          }
          else
          {
            v18 = v16->vfptr[118].__vecDelDtor;
          }
          ((void (__thiscall *)(_DWORD))v18)(v16);
          v19 = 0;
          if ( bRare )
          {
            if ( !bUpgrade )
            {
              v20 = v5->m_acBeforeMoverName;
              v21 = (char *)TextData3::Get(0x8C8B5BCA);
              v19 = fs(v21, v20);
              v22 = v5->m_uiSlotItemInvNum[0];
              if ( v22 >= 0xC0 )
                return;
              v23 = pkInventoryWin->m_apkInvWin[v22];
              if ( !v23 )
                return;
              InvWin::SetLock(v23, 0);
              v5->m_uiSlotItemInvNum[0] = 255;
            }
          }
          else
          {
            if ( bUpgrade )
            {
              v24 = v5->m_acBeforeMoverName;
              v25 = (char *)TextData3::Get(0xF3B4B5BE);
              v26 = (NiUnsharedGeometryGroup *)fs(v25, v24);
            }
            else
            {
              v26 = TextData3::Get(0x2D3C166Du);
            }
            v19 = (const char *)v26;
          }
          GameFrameWork::AddSysMsg((GameFrameWork *)v5->m_pkFrameWork, v19);
          v27 = v5->m_kSuccessSound._Bx._Buf;
          if ( v5->m_kSuccessSound._Myres >= 0x10 )
            v27 = *(char **)v27;
          SoundMgr::PlayInterfaceSound(&g_kSoundMgr, v27);
        }
      }
    }
  }
}
// 42C4B0: could not find valid save-restore pair for edi

//----- (0042C660) --------------------------------------------------------
void __thiscall MoverUpgradeWin::OnSlotLClick(MoverUpgradeWin *this, unsigned int uiSlotIndex)
{
  MoverUpgradeWin *v2; // esi@1
  SlotWin *v3; // edi@2
  Item *v4; // eax@7
  unsigned int v5; // ecx@8

  v2 = this;
  if ( uiSlotIndex )
  {
    if ( uiSlotIndex == 1 )
    {
      v3 = this->m_apkSlotWin[1];
      ((void (__stdcall *)(_DWORD))this->m_pkMoverNameWin[1]->vfptr[118].__vecDelDtor)(&unk_9750D6);
    }
    else
    {
      v3 = (SlotWin *)uiSlotIndex;
    }
  }
  else
  {
    v3 = this->m_apkSlotWin[0];
    ((void (__stdcall *)(_DWORD))this->m_pkMoverNameWin[0]->vfptr[118].__vecDelDtor)(&unk_9750BF);
  }
  if ( v3 )
  {
    v4 = ItemIcon::GetItem((ItemIcon *)&v3->vfptr);
    if ( v4 )
    {
      v2->m_kDropContents.m_eSenderType = v3->m_uiSenderType;
      v2->m_kDropContents.m_eType = 0;
      v5 = v3->m_uiSenderInvIndex;
      v2->m_kDropContents.m_apvParam[0] = v4;
      v2->m_kDropContents.m_uiSenderIndex = v5;
      v2->m_kDropContents.m_apvParam[1] = 0;
      v2->m_kDropContents.m_uiLot = ((int (__thiscall *)(_DWORD))v4->vfptr[3].__vecDelDtor)(v4);
      v2->m_kDrop.m_pkSender = v3->m_pkSender;
      PgCursor::ms_pkDrop = &v2->m_kDrop;
      SlotWin::ReSetSlot(v3);
    }
  }
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (0042C730) --------------------------------------------------------
char __userpurge MoverUpgradeWin::DropItemSlot@<al>(MoverUpgradeWin *this@<ecx>, int a2@<ebx>, int a3@<edi>, unsigned int uiReceiverInvIndex, PgWinDrop *pkDrop)
{
  DropContents *v5; // eax@1
  MoverUpgradeWin *v6; // esi@1
  Item *v8; // ecx@3
  int v9; // ST08_4@4
  int v10; // ebx@4
  int v11; // eax@4
  SlotWin *v12; // edi@5
  PgWinText *v13; // ecx@5
  NiRefObjectVtbl *v14; // ST18_4@6
  char *v15; // eax@6
  NiRefObjectVtbl *v16; // ST18_4@9
  char *v17; // eax@9
  SlotWin *v18; // eax@12
  int v19; // [sp-4h] [bp-14h]@5
  Item *pItem; // [sp+4h] [bp-Ch]@3
  DropContents *pkContents; // [sp+8h] [bp-8h]@1

  v5 = (DropContents *)pkDrop->m_pkContents;
  v6 = this;
  pkContents = v5;
  if ( !v5 )
    return 0;
  v8 = (Item *)v5->m_apvParam[0];
  pItem = v8;
  if ( !v8 )
    return 0;
  v9 = a2;
  v10 = (int)v8->m_pkInfo->Name;
  v11 = ((int (__stdcall *)(int, int))v8->vfptr[10].__vecDelDtor)(a3, v9);
  if ( uiReceiverInvIndex )
  {
    if ( uiReceiverInvIndex != 1 )
      return 0;
    v12 = v6->m_apkSlotWin[1];
    v13 = v6->m_pkMoverNameWin[1];
    v19 = v10;
    if ( v11 )
    {
      v16 = v13->vfptr;
      v17 = fs("(+%d)%s", v11, v10);
      v16[118].__vecDelDtor((NiRefObject *)v6->m_pkMoverNameWin[1], (unsigned int)v17);
      goto LABEL_11;
    }
  }
  else
  {
    v12 = v6->m_apkSlotWin[0];
    v13 = v6->m_pkMoverNameWin[0];
    v19 = v10;
    if ( v11 )
    {
      v14 = v13->vfptr;
      v15 = fs("(+%d)%s", v11, v10);
      v14[118].__vecDelDtor((NiRefObject *)v6->m_pkMoverNameWin[0], (unsigned int)v15);
      goto LABEL_11;
    }
  }
  v13->vfptr[118].__vecDelDtor((NiRefObject *)v13, v19);
LABEL_11:
  if ( !v12 )
    return 0;
  v18 = MoverUpgradeWin::GetInsertedOldSlot(v6, uiReceiverInvIndex);
  if ( v18 )
    SlotWin::ReSetSlot(v18);
  SlotWin::ReSetSlot(v12);
  v12->m_uiSenderType = pkContents->m_eSenderType;
  v12->m_uiSenderInvIndex = pkContents->m_uiSenderIndex;
  v12->m_pkSender = pkDrop->m_pkSender;
  SlotWin::SetSenderInvSlotLock(v12, 1);
  ItemIcon::SetItem((ItemIcon *)&v12->vfptr, pItem, 1);
  return 1;
}
// 42C730: could not find valid save-restore pair for ebx

//----- (0042C850) --------------------------------------------------------
void __thiscall MoverUpgradeWin::ResetAllData(MoverUpgradeWin *this)
{
  MoverUpgradeWin *v1; // esi@1

  v1 = this;
  SlotWin::ReSetSlot(this->m_apkSlotWin[0]);
  SlotWin::ReSetSlot(v1->m_apkSlotWin[1]);
  ((void (__stdcall *)(_DWORD))v1->m_pkMoverNameWin[0]->vfptr[118].__vecDelDtor)(&unk_9750D7);
  ((void (__stdcall *)(_DWORD))v1->m_pkMoverNameWin[1]->vfptr[118].__vecDelDtor)(&unk_9750DE);
  v1->m_uiSlotItemInvNum[0] = 255;
  v1->m_uiSlotItemInvNum[1] = 255;
}

//----- (0042C8B0) --------------------------------------------------------
void __thiscall MoverUpgradeWin::ResetSubSlot(MoverUpgradeWin *this)
{
  MoverUpgradeWin *v1; // esi@1

  v1 = this;
  SlotWin::ReSetSlot(this->m_apkSlotWin[1]);
  ((void (__stdcall *)(_DWORD))v1->m_pkMoverNameWin[1]->vfptr[118].__vecDelDtor)(&unk_9750DF);
  v1->m_uiSlotItemInvNum[1] = 255;
}

//----- (0042C8E0) --------------------------------------------------------
char __userpurge SlotWin::EatDropInstance@<al>(SlotWin *this@<ecx>, int a2@<ebx>, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  SlotWin *v5; // esi@1
  GameFrameWork *v7; // esi@5
  NiUnsharedGeometryGroup *v8; // eax@5
  _DWORD *v9; // eax@6
  int v10; // eax@8
  GameFrameWork *v11; // esi@10
  NiUnsharedGeometryGroup *v12; // eax@10
  MoverUpgradeWin *v13; // eax@13

  v5 = this;
  if ( this->m_bLock )
  {
    PgCursor::ms_bKeepDrop = 1;
    return 0;
  }
  if ( !*pkDrop )
    return 0;
  if ( g_pkMainChar->m_byMode == 6 )
  {
    v7 = (GameFrameWork *)this->m_pkFrameWork;
    v8 = TextData3::Get(0xE2CEEF05);
    GameFrameWork::AddSysMsg(v7, (const char *)v8);
    return 0;
  }
  v9 = (*pkDrop)->m_pkContents;
  if ( v9[2] || v9[4] || (v10 = v9[5]) == 0 )
  {
LABEL_11:
    PgCursor::ms_bKeepDrop = 1;
    return 0;
  }
  if ( (unsigned __int8)(*(int (__thiscall **)(int))(*(_DWORD *)v10 + 4))(v10) != 23 )
  {
    v11 = (GameFrameWork *)v5->m_pkFrameWork;
    v12 = TextData3::Get(0x442A727Eu);
    GameFrameWork::AddSysMsg(v11, (const char *)v12);
    goto LABEL_11;
  }
  v13 = (MoverUpgradeWin *)PgWin::GetParentWin((PgWin *)&v5->vfptr);
  return MoverUpgradeWin::DropItemSlot(v13, a2, (int)pkDrop, v5->m_uiInvIndex, *pkDrop);
}
// B648B8: using guessed type bool PgCursor::ms_bKeepDrop;

//----- (0042C9B0) --------------------------------------------------------
void __thiscall MoverUpgradeWin::MoverUpgradeWin(MoverUpgradeWin *this)
{
  MoverUpgradeWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&MoverUpgradeWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MoverUpgradeWin::`vftable'{for `IDirectMessenger'};
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  v1->m_kDrop.m_pkSender = 0;
  v1->m_kDropContents.m_uiLot = 0;
  v1->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v1->m_kDropContents.m_kItemID = -1;
  v1->m_pAttachEffect.m_pObject = 0;
  v1->m_kSuccessSound._Mysize = 0;
  v1->m_kSuccessSound._Myres = 15;
  v1->m_kSuccessSound._Bx._Buf[0] = 0;
  v1->m_kDrop.m_pkContents = &v1->m_kDropContents;
  v1->m_pkMoverNameWin[0] = 0;
  v1->m_apkSlotWin[0] = 0;
  v1->m_pkMoverNameWin[1] = 0;
  v1->m_apkSlotWin[1] = 0;
  v1->m_uiSlotItemInvNum[0] = 255;
  v1->m_uiSlotItemInvNum[1] = 255;
  v1->m_acBeforeMoverName = 0;
  v1->m_pkMsgBox = 0;
  v1->m_apkEffect = 0;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9754B4: using guessed type void (__thiscall *MoverUpgradeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9754D4: using guessed type int (__thiscall *MoverUpgradeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0042CA60) --------------------------------------------------------
void __thiscall MoverUpgradeWin::~MoverUpgradeWin(MoverUpgradeWin *this)
{
  MoverUpgradeWin *v1; // esi@1
  SpEffect *v2; // edi@1
  NiNode *v3; // ebx@2
  NiNode *v4; // edi@9

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&MoverUpgradeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MoverUpgradeWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_apkEffect;
  if ( v2 )
  {
    NsEffect::~NsEffect(&v2->m_kEffect);
    ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v2->m_kMarkCheck);
    v3 = v2->m_spEffect.m_pObject;
    if ( v2->m_spEffect.m_pObject && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    operator delete(v2);
    v1->m_apkEffect = 0;
  }
  if ( v1->m_kSuccessSound._Myres >= 0x10 )
    operator delete(v1->m_kSuccessSound._Bx._Ptr);
  v1->m_kSuccessSound._Myres = 15;
  v1->m_kSuccessSound._Mysize = 0;
  v1->m_kSuccessSound._Bx._Buf[0] = 0;
  v4 = v1->m_pAttachEffect.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v1->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9754B4: using guessed type void (__thiscall *MoverUpgradeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9754D4: using guessed type int (__thiscall *MoverUpgradeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0042CBA0) --------------------------------------------------------
void __thiscall MoverUpgradeWin::OnClose(MoverUpgradeWin *this)
{
  MoverUpgradeWin *v1; // esi@1
  MsgBox *v2; // ecx@1

  v1 = this;
  v2 = this->m_pkMsgBox;
  if ( v2 )
  {
    MsgBox::Close(v2);
    v1->m_pkMsgBox = 0;
  }
  SpEffect::End(v1->m_apkEffect, v1->m_pAttachEffect.m_pObject);
  SlotWin::ReSetSlot(v1->m_apkSlotWin[0]);
  SlotWin::ReSetSlot(v1->m_apkSlotWin[1]);
  ((void (__stdcall *)(_DWORD))v1->m_pkMoverNameWin[0]->vfptr[118].__vecDelDtor)(&unk_9750D7);
  ((void (__stdcall *)(_DWORD))v1->m_pkMoverNameWin[1]->vfptr[118].__vecDelDtor)(&unk_9750DE);
  v1->m_uiSlotItemInvNum[0] = 255;
  v1->m_uiSlotItemInvNum[1] = 255;
}

//----- (0042CC30) --------------------------------------------------------
SlotWin *__cdecl SlotWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork)
{
  PgWin *v5; // eax@1
  PgWin *v6; // eax@2
  PgWin *v7; // esi@2
  PgWin *v8; // edi@8
  SlotWin *v9; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v11; // [sp+20h] [bp-4h]@1

  v5 = (PgWin *)operator new(0x1DCu);
  result.m_pObject = v5;
  v11 = 0;
  if ( v5 )
  {
    SlotWin::SlotWin((SlotWin *)v5);
    v7 = v6;
  }
  else
  {
    v7 = 0;
  }
  if ( v7 )
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  v11 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v7);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, PgWin *, PgFrameWork *))v7->vfptr[154].__vecDelDtor)(
                          v7,
                          iXPos,
                          iYPos,
                          uiInvIndex,
                          pkParent,
                          pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v7->vfptr[89].__vecDelDtor)(v7);
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = (SlotWin *)v7;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v7);
    if ( result.m_pObject )
    {
      v8 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v8 )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      }
    }
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = 0;
  }
  return v9;
}

//----- (0042CD70) --------------------------------------------------------
MoverUpgradeWin *__cdecl MoverUpgradeWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  MoverUpgradeWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1F8u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    MoverUpgradeWin::MoverUpgradeWin((MoverUpgradeWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (MoverUpgradeWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (0042CEA0) --------------------------------------------------------
char __thiscall MoverUpgradeWin::Create(MoverUpgradeWin *this, PgFrameWork *pkFrameWork)
{
  MoverUpgradeWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  bool v7; // zf@7
  int v9; // edi@11
  int v10; // ebx@11
  NiSourceTexture *v11; // eax@11
  PgSprData *v12; // eax@12
  PgWinBut *v13; // eax@14
  PgSprData *v14; // eax@14
  D3DXCOLOR v15; // ST34_16@14
  char *v16; // eax@14
  D3DXCOLOR v17; // ST34_16@14
  char *v18; // eax@14
  D3DXCOLOR v19; // ST34_16@14
  char *v20; // eax@14
  PgSprData *v21; // eax@14
  PgWinSpr *v22; // eax@14
  PgWin *v23; // edi@14
  char *v24; // eax@14
  int v25; // edi@14
  SlotWin *v26; // eax@14
  PgSprData *v27; // eax@14
  PgWinSpr *v28; // eax@14
  PgWin *v29; // edi@14
  char *v30; // eax@14
  SlotWin *v31; // eax@14
  D3DXCOLOR v32; // ST2C_16@14
  D3DXCOLOR v33; // ST2C_16@14
  D3DXCOLOR v34; // ST2C_16@14
  PgWinAbbreviateText *v35; // eax@14
  PgWinAbbreviateText *v36; // edi@14
  NiRefObjectVtbl *v37; // ebx@14
  NiUnsharedGeometryGroup *v38; // eax@14
  PgWinSpr *v39; // eax@14
  PgWinSpr *v40; // edi@14
  const char *v41; // eax@21
  PgFrameWork *v42; // edi@25
  NiNode *v43; // eax@26
  SpEffect *v44; // eax@26
  NiNode *v45; // eax@29
  NiNode *v46; // esi@31
  NiNode *v47; // esi@34
  UIUtil ui; // [sp+58h] [bp-44h]@11
  float v49; // [sp+6Ch] [bp-30h]@29
  float v50; // [sp+70h] [bp-2Ch]@29
  float v51; // [sp+74h] [bp-28h]@29
  int iOffY; // [sp+78h] [bp-24h]@11
  PgWinBut *pkBtn; // [sp+7Ch] [bp-20h]@14
  NiPointer<NiNode> pkNiNodePtr; // [sp+80h] [bp-1Ch]@19
  NiPointer<NiNode> spNode; // [sp+84h] [bp-18h]@1
  int uiLeft; // [sp+88h] [bp-14h]@4
  int uiTop; // [sp+8Ch] [bp-10h]@4
  int v58; // [sp+98h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v58 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\MoverUpgrade.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "MoverUpgradeWin", 0) )
  {
    v6 = spNode.m_pObject;
    v58 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v7 = v6 == 0;
LABEL_8:
    if ( !v7 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    return 0;
  }
  v9 = uiTop;
  v10 = uiLeft;
  iOffY = uiTop;
  UIUtil::UIUtil(&ui);
  LOBYTE(v58) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, v10, v9);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v11 = MenuTexMgr::GetTexture(0x13u);
  if ( v11 )
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v11);
  else
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop - v9, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13 = (PgWinBut *)MenuTexMgr::GetTexture(0x1Cu);
  pkBtn = v13;
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, (NiSourceTexture *)v13);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop - v9, v14, (PgWin *)&v2->vfptr, 0, 0);
  UIUtil::CreateSpr(&ui, "Panel01", 0);
  UIUtil::CreateSpr(&ui, "Panel02", 0);
  UIUtil::CreateSpr(&ui, "Panel03", 0);
  *(_QWORD *)&v15.r = *(_QWORD *)&Color::m_kDxWinTitleColor.r;
  *(_QWORD *)&v15.b = qword_A696E8;
  v16 = (char *)TextData3::Get(0x83908ECD);
  UIUtil::CreateTextNoSpr(&ui, "WinTitle", v16, v15, 5u);
  UIUtil::CreateBtn(&ui, 0xEu, "HelpLinkNor", "HelpLinkOver", "HelpLinkClick", 0, 0);
  UIUtil::CreateBtn(&ui, 0xDu, "ClsNor", "ClsOver", "ClsClick", 0, 0);
  pkBtn = UIUtil::CreateBtn(&ui, 0xCu, "OkNor", "OkOver", "OkClick", 0, (NiSourceTexture *)pkBtn);
  *(_QWORD *)&v17.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v17.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v18 = (char *)TextData3::Get(0xC555975u);
  UIUtil::CreateAttachedText((PgWin *)&pkBtn->vfptr, v18, v17, 5u);
  pkBtn = UIUtil::CreateBtn(&ui, 0xDu, "CancelNor", "CancelOver", "CancelClick", 0, 0);
  *(_QWORD *)&v19.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v19.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v20 = (char *)TextData::Get(0x97A4A8DF);
  UIUtil::CreateAttachedText((PgWin *)&pkBtn->vfptr, v20, v19, 5u);
  v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MainSlot", &uiLeft, &uiTop, 0);
  v22 = PgWinSpr::CreateWin(uiLeft - v10, uiTop - v9, v21, (PgWin *)&v2->vfptr, 0, 0);
  v23 = (PgWin *)v22;
  v22->m_pkToolTipWin = g_pkToolTipWin;
  v24 = (char *)TextData3::Get(0x957066D1);
  PgWin::SetToolTipWinText(v23, v24);
  v23->vfptr[60].__vecDelDtor((NiRefObject *)v23, 1u);
  v23->vfptr[64].__vecDelDtor((NiRefObject *)v23, 1u);
  v25 = iOffY;
  v26 = SlotWin::CreateWin(uiLeft - v10 + 1, uiTop - iOffY + 1, 0, (PgWin *)&v2->vfptr, pkFrameWork);
  v2->m_apkSlotWin[0] = v26;
  v26->vfptr[60].__vecDelDtor((NiRefObject *)v26, 1u);
  ((void (__stdcall *)(signed int))v2->m_apkSlotWin[0]->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(signed int))v2->m_apkSlotWin[0]->vfptr[129].__vecDelDtor)(11);
  ((void (__stdcall *)(signed int))v2->m_apkSlotWin[0]->vfptr[140].__vecDelDtor)(10);
  v2->m_apkSlotWin[0]->m_eType = 1;
  IconWin::ShowFocus((IconWin *)&v2->m_apkSlotWin[0]->vfptr, 1);
  SlotWin::ReSetSlot(v2->m_apkSlotWin[0]);
  v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SubSlot", &uiLeft, &uiTop, 0);
  v28 = PgWinSpr::CreateWin(uiLeft - v10, uiTop - v25, v27, (PgWin *)&v2->vfptr, 0, 0);
  v29 = (PgWin *)v28;
  v28->m_pkToolTipWin = g_pkToolTipWin;
  v30 = (char *)TextData3::Get(0xAB6C7377);
  PgWin::SetToolTipWinText(v29, v30);
  v29->vfptr[60].__vecDelDtor((NiRefObject *)v29, 1u);
  v29->vfptr[64].__vecDelDtor((NiRefObject *)v29, 1u);
  v31 = SlotWin::CreateWin(uiLeft - v10 + 1, uiTop - iOffY + 1, 1u, (PgWin *)&v2->vfptr, pkFrameWork);
  v2->m_apkSlotWin[1] = v31;
  v31->vfptr[60].__vecDelDtor((NiRefObject *)v31, 1u);
  ((void (__stdcall *)(signed int))v2->m_apkSlotWin[1]->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(signed int))v2->m_apkSlotWin[1]->vfptr[129].__vecDelDtor)(11);
  ((void (__stdcall *)(signed int))v2->m_apkSlotWin[1]->vfptr[140].__vecDelDtor)(10);
  v2->m_apkSlotWin[1]->m_eType = 1;
  IconWin::ShowFocus((IconWin *)&v2->m_apkSlotWin[1]->vfptr, 1);
  SlotWin::ReSetSlot(v2->m_apkSlotWin[1]);
  *(_QWORD *)&v32.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v32.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v2->m_pkMoverNameWin[0] = (PgWinText *)UIUtil::CreateText(&ui, "MainText", &byte_9750B6, 0, v32, 5u, 0, 1);
  *(_QWORD *)&v33.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v33.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v2->m_pkMoverNameWin[1] = (PgWinText *)UIUtil::CreateText(&ui, "SubText", &byte_9750B7, 0, v33, 4u, 0, 1);
  *(_QWORD *)&v34.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v34.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v35 = UIUtil::CreateText(&ui, "Text01", &byte_9750BE, 0, v34, 0, 0, 0);
  v36 = v35;
  v37 = v35->vfptr;
  v38 = TextData3::Get(0xCCDDB835);
  ((void (__thiscall *)(PgWinAbbreviateText *, NiUnsharedGeometryGroup *, _DWORD))v37[120].__vecDelDtor)(v36, v38, 0);
  v36->vfptr[60].__vecDelDtor((NiRefObject *)v36, 0);
  v39 = PgWinSpr::CreateWin(0, 0, 1u, 1u, (PgWin *)&v2->vfptr, 0, 0);
  v40 = v39;
  pkFrameWork = (PgFrameWork *)v39;
  if ( v39 )
    InterlockedIncrement((volatile LONG *)&v39->m_uiRefCount);
  LOBYTE(v58) = 2;
  NiPointer<NiActorManager>::operator=(
    (NiPointer<NiPixelData> *)&v2->m_pAttachEffect,
    (NiPointer<NiPixelData> *)&pkFrameWork);
  LOBYTE(v58) = 1;
  if ( v40 && !InterlockedDecrement((volatile LONG *)&v40->m_uiRefCount) )
    v40->vfptr->__vecDelDtor((NiRefObject *)v40, 1u);
  pkNiNodePtr.m_pObject = 0;
  LOBYTE(v58) = 3;
  if ( !Folder::m_bInit )
    Folder::Init();
  v41 = Folder::Merge(&Folder::m_acEffect, "MoverUpgrade_Start.nif");
  PgUtil::LoadNodeNifFile(v41, &pkNiNodePtr, 0);
  if ( !pkNiNodePtr.m_pObject )
  {
    LOBYTE(v58) = 0;
    UIUtil::~UIUtil(&ui);
    v6 = spNode.m_pObject;
    v58 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v7 = v6 == 0;
    goto LABEL_8;
  }
  v42 = (PgFrameWork *)operator new(0x44u);
  pkFrameWork = v42;
  LOBYTE(v58) = 4;
  if ( v42 )
  {
    v43 = (NiNode *)NiObject::Clone((NiObject *)&pkNiNodePtr.m_pObject->vfptr);
    SpEffect::SpEffect((SpEffect *)v42, v43);
  }
  else
  {
    v44 = 0;
  }
  LOBYTE(v58) = 3;
  v2->m_apkEffect = v44;
  if ( v44 )
  {
    v45 = v44->m_spEffect.m_pObject;
    v49 = 0.0;
    v50 = 0.0;
    v45->m_kLocal.m_Translate.x = 0.0;
    v51 = 1000.0;
    v45->m_kLocal.m_Translate.y = 0.0;
    v45->m_kLocal.m_Translate.z = 1000.0;
    v2->m_apkEffect->m_bClamp = 1;
  }
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &v2->m_kSuccessSound,
    "MoverUpgrade_Start",
    0x12u);
  ((void (__thiscall *)(MoverUpgradeWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.30000001,
    0.5);
  LOBYTE(v58) = 1;
  if ( pkNiNodePtr.m_pObject )
  {
    v46 = pkNiNodePtr.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&pkNiNodePtr.m_pObject->m_uiRefCount) )
    {
      if ( v46 )
        v46->vfptr->__vecDelDtor((NiRefObject *)v46, 1u);
    }
  }
  LOBYTE(v58) = 0;
  UIUtil::~UIUtil(&ui);
  v47 = spNode.m_pObject;
  v58 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v47 )
    v47->vfptr->__vecDelDtor((NiRefObject *)v47, 1u);
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A696E8: using guessed type __int64 qword_A696E8;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0042D6A0) --------------------------------------------------------
void __thiscall MoverUpgradeWin::OnApply(MoverUpgradeWin *this)
{
  MoverUpgradeWin *v1; // esi@1
  GameFrameWork *v2; // esi@2
  NiUnsharedGeometryGroup *v3; // eax@2
  Item *v4; // eax@3
  Item *v5; // edi@3
  ItemIcon *v6; // ecx@4
  Item *v7; // eax@4
  const char *v8; // esi@5
  const char *v9; // edi@5
  MoverMain *v10; // ebx@5
  MoverMain *v11; // eax@5
  MoverHG *v12; // esi@9
  MoverHG *v13; // eax@9
  MoverHG *v14; // edi@9
  char *v15; // eax@13
  char *v16; // eax@13
  MsgBox *v17; // eax@13
  GameFrameWork *v18; // esi@15
  NiUnsharedGeometryGroup *v19; // eax@15
  GameFrameWork *v20; // esi@18
  NiUnsharedGeometryGroup *v21; // eax@18
  MoverUpgradeWin *v22; // [sp+4h] [bp-4h]@1

  v1 = this;
  v22 = this;
  if ( g_pkMainChar->m_byMode == 6 )
  {
    v2 = (GameFrameWork *)this->m_pkFrameWork;
    v3 = TextData3::Get(0xE2CEEF05);
    GameFrameWork::AddSysMsg(v2, (const char *)v3);
    return;
  }
  v4 = ItemIcon::GetItem((ItemIcon *)&this->m_apkSlotWin[0]->vfptr);
  v5 = v4;
  if ( !v4
    || (v6 = (ItemIcon *)&v1->m_apkSlotWin[1]->vfptr,
        v1->m_uiSlotItemInvNum[0] = LOBYTE(v1->m_apkSlotWin[0]->m_uiSenderInvIndex),
        v1->m_acBeforeMoverName = v4->m_pkInfo->Name,
        (v7 = ItemIcon::GetItem(v6)) == 0) )
  {
    v20 = (GameFrameWork *)v1->m_pkFrameWork;
    v21 = TextData3::Get(0x846E64D5);
    GameFrameWork::AddSysMsg(v20, (const char *)v21);
    return;
  }
  v1->m_uiSlotItemInvNum[1] = LOBYTE(v1->m_apkSlotWin[1]->m_uiSenderInvIndex);
  v8 = v5->m_pkInfo->InxName;
  v9 = v7->m_pkInfo->InxName;
  v10 = MoverMainTab::GetByMoverIdx(v8);
  v11 = MoverMainTab::GetByMoverIdx(v9);
  if ( v10 && v11 )
  {
    if ( v10->DurationHour || v11->DurationHour )
    {
      v18 = (GameFrameWork *)v22->m_pkFrameWork;
      v19 = TextData3::Get(0xE8BE0E22);
      goto LABEL_17;
    }
    v12 = MoverHGTab::GetByMoverIdx(v8);
    v13 = MoverHGTab::GetByMoverIdx(v9);
    v14 = v13;
    if ( v12 && v13 )
    {
      if ( !strcmp(v12->FeedType, "-") && !strcmp(v14->FeedType, "-") )
      {
        v15 = (char *)TextData3::Get(0x509DA7D8u);
        v16 = fs(v15);
        v17 = MsgBox::Modal(MSGBOX_OKCANCEL, v16);
        v22->m_pkMsgBox = v17;
        ((void (__stdcall *)(_DWORD))v17->vfptr->SetMsgHooker)(&v22->vfptr);
        return;
      }
      v18 = (GameFrameWork *)v22->m_pkFrameWork;
      v19 = TextData3::Get(0xD6180728);
LABEL_17:
      GameFrameWork::AddSysMsg(v18, (const char *)v19);
      return;
    }
  }
}

//----- (0042D890) --------------------------------------------------------
void __thiscall MoverUpgradeWin::OnCommand(MoverUpgradeWin *this, unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@7

  switch ( wParam )
  {
    case 0xBu:
      MoverUpgradeWin::OnSlotLClick(this, lParam);
      break;
    case 0xCu:
      MoverUpgradeWin::OnApply(this);
      break;
    case 0xDu:
      if ( this->m_pkMsgBox )
        this->m_pkMsgBox = 0;
      GameFrameWork::CloseMoverUpgradeWin((GameFrameWork *)this->m_pkFrameWork, 1);
      break;
    case 0xEu:
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v3 )
        GameFrameWork::OpenPlayGuideSearchList(v3, "MoverUpgrade");
      break;
    default:
      return;
  }
}

//----- (0042D920) --------------------------------------------------------
Item *__thiscall InventoryWin::GetItemInInv(InventoryWin *this, unsigned int uiIndex)
{
  InvWin *v2; // ecx@2
  Item *result; // eax@3

  if ( uiIndex < 0xC0 && (v2 = this->m_apkInvWin[uiIndex]) != 0 )
    result = ItemIcon::GetItem((ItemIcon *)&v2->vfptr);
  else
    result = 0;
  return result;
}

//----- (0042D950) --------------------------------------------------------
SlotWin *__thiscall SlotWin::`scalar deleting destructor'(SlotWin *this, unsigned int a2)
{
  SlotWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&SlotWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SlotWin::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 975224: using guessed type void (__thiscall *SlotWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 975244: using guessed type int (__thiscall *SlotWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0042D990) --------------------------------------------------------
MoverUpgradeWin *__thiscall MoverUpgradeWin::`scalar deleting destructor'(MoverUpgradeWin *this, unsigned int a2)
{
  MoverUpgradeWin *v2; // esi@1

  v2 = this;
  MoverUpgradeWin::~MoverUpgradeWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0042D9C0) --------------------------------------------------------
MoverMain *__cdecl MoverMainTab::GetByMoverIdx(const char *pcMoverIdx)
{
  int v1; // eax@1
  unsigned int v2; // esi@1
  char *v3; // eax@5
  unsigned int v4; // eax@6
  unsigned int v5; // ebx@6
  unsigned int v6; // esi@6
  unsigned int v7; // ecx@6
  unsigned int v8; // edi@8
  const char *v9; // eax@8
  int v10; // eax@10
  bool v11; // zf@10
  signed int v12; // eax@12
  bool v13; // bl@15
  MoverMain *pkMoverMain; // [sp+10h] [bp-3Ch]@5
  unsigned int i; // [sp+18h] [bp-34h]@4
  unsigned int v17; // [sp+1Ch] [bp-30h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v18; // [sp+20h] [bp-2Ch]@6
  int v19; // [sp+48h] [bp-4h]@15

  v1 = *(_DWORD *)(ITableBase<MoverMain,MoverMainTab>::ms_pkTable + 56);
  v2 = 0;
  if ( v1 )
    v17 = *(_DWORD *)(v1 + 40);
  else
    v17 = 0;
  i = 0;
  if ( v17 <= 0 )
    return 0;
  while ( 1 )
  {
    v3 = CDataReader::GetRecord((CDataReader *)(ITableBase<MoverMain,MoverMainTab>::ms_pkTable + 4), v2);
    pkMoverMain = (MoverMain *)v3;
    if ( v3 )
      break;
LABEL_19:
    i = ++v2;
    if ( v2 >= v17 )
      return 0;
  }
  v18._Myres = 15;
  v18._Mysize = 0;
  v18._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v18, v3 + 4, strlen(v3 + 4));
  v4 = strlen(pcMoverIdx);
  v5 = v18._Mysize;
  v6 = v4;
  v7 = v18._Mysize;
  if ( v18._Mysize >= v4 )
    v7 = v4;
  v8 = v18._Myres;
  v9 = v18._Bx._Ptr;
  if ( v18._Myres < 0x10 )
    v9 = (const char *)&v18;
  v10 = std::char_traits<char>::compare(v9, pcMoverIdx, v7);
  v11 = v10 == 0;
  if ( !v10 )
  {
    if ( v5 >= v6 )
      v12 = v5 != v6;
    else
      v12 = -1;
    v11 = v12 == 0;
  }
  v13 = v11;
  v19 = -1;
  if ( v8 >= 0x10 )
    operator delete(v18._Bx._Ptr);
  v18._Myres = 15;
  v18._Mysize = 0;
  v18._Bx._Buf[0] = 0;
  if ( !v13 )
  {
    v2 = i;
    goto LABEL_19;
  }
  return pkMoverMain;
}
// A89D24: using guessed type int ITableBase<MoverMain,MoverMainTab>::ms_pkTable;

//----- (0042DB20) --------------------------------------------------------
MoverHG *__cdecl MoverHGTab::GetByMoverIdx(const char *pcMoverIdx)
{
  int v1; // eax@1
  unsigned int v2; // edi@1
  char *v3; // eax@5
  unsigned int v4; // eax@6
  unsigned int v5; // ebx@6
  unsigned int v6; // esi@6
  unsigned int v7; // ecx@6
  unsigned int v8; // edi@8
  const char *v9; // eax@8
  int v10; // eax@10
  bool v11; // zf@10
  signed int v12; // eax@12
  bool v13; // bl@15
  MoverHG *pkMoverHG; // [sp+10h] [bp-3Ch]@5
  unsigned int i; // [sp+18h] [bp-34h]@4
  unsigned int v17; // [sp+1Ch] [bp-30h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v18; // [sp+20h] [bp-2Ch]@6
  int v19; // [sp+48h] [bp-4h]@15

  v1 = *(_DWORD *)(ITableBase<MoverHG,MoverHGTab>::ms_pkTable + 56);
  v2 = 0;
  if ( v1 )
    v17 = *(_DWORD *)(v1 + 40);
  else
    v17 = 0;
  i = 0;
  if ( v17 <= 0 )
    return 0;
  while ( 1 )
  {
    v3 = CDataReader::GetRecord((CDataReader *)(ITableBase<MoverHG,MoverHGTab>::ms_pkTable + 4), v2);
    pkMoverHG = (MoverHG *)v3;
    if ( v3 )
      break;
LABEL_19:
    i = ++v2;
    if ( v2 >= v17 )
      return 0;
  }
  v18._Myres = 15;
  v18._Mysize = 0;
  v18._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v18, v3, strlen(v3));
  v4 = strlen(pcMoverIdx);
  v5 = v18._Mysize;
  v6 = v4;
  v7 = v18._Mysize;
  if ( v18._Mysize >= v4 )
    v7 = v4;
  v8 = v18._Myres;
  v9 = v18._Bx._Ptr;
  if ( v18._Myres < 0x10 )
    v9 = (const char *)&v18;
  v10 = std::char_traits<char>::compare(v9, pcMoverIdx, v7);
  v11 = v10 == 0;
  if ( !v10 )
  {
    if ( v5 >= v6 )
      v12 = v5 != v6;
    else
      v12 = -1;
    v11 = v12 == 0;
  }
  v13 = v11;
  v19 = -1;
  if ( v8 >= 0x10 )
    operator delete(v18._Bx._Ptr);
  v18._Myres = 15;
  v18._Mysize = 0;
  v18._Bx._Buf[0] = 0;
  if ( !v13 )
  {
    v2 = i;
    goto LABEL_19;
  }
  return pkMoverHG;
}
// A89D28: using guessed type int ITableBase<MoverHG,MoverHGTab>::ms_pkTable;

//----- (0042DC70) --------------------------------------------------------
void __thiscall NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *this)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v1; // esi@1
  unsigned int v2; // ebx@1
  NiTMapItem<unsigned long,NiPointer<PgWinBut> > **v3; // eax@3
  NiTMapItem<unsigned long,NiPointer<PgWinBut> > *v4; // edi@3
  char buff[256]; // [sp+8h] [bp-104h]@3

  v1 = this;
  v2 = 0;
  if ( this->m_uiHashSize )
  {
    do
    {
      while ( v1->m_ppkHashTable[v2] )
      {
        sprintf(buff, "%d", v2);
        OutputDebugStringA(buff);
        v3 = v1->m_ppkHashTable;
        v4 = v3[v2];
        v3[v2] = v4->m_pkNext;
        v1->vfptr->ClearValue(v1, v4);
        v1->vfptr->DeleteItem(v1, v4);
      }
      ++v2;
    }
    while ( v2 < v1->m_uiHashSize );
    v1->m_kAllocator.m_uiCount = 0;
  }
  else
  {
    this->m_kAllocator.m_uiCount = 0;
  }
}

//----- (0042DD20) --------------------------------------------------------
void __thiscall PgTQueue<CMsg *>::Realloc(PgTQueue<CMsg *> *this, unsigned int uiNewSize)
{
  PgTQueue<CMsg *> *v2; // esi@1
  CMsg **v3; // eax@1
  unsigned int v4; // ecx@1
  CMsg **v5; // edi@1
  unsigned int v6; // eax@1
  unsigned int v7; // ecx@4
  CMsg **v8; // ST00_4@8

  v2 = this;
  v3 = (CMsg **)operator new[](4 * uiNewSize);
  v4 = v2->m_uiHead;
  v5 = v3;
  v6 = 0;
  if ( v4 < v2->m_uiTail )
  {
    do
      v5[v6++] = v2->m_pBase[v4++];
    while ( v4 < v2->m_uiTail );
  }
  else
  {
    for ( ; v4 < v2->m_uiAlloced; ++v6 )
      v5[v6] = v2->m_pBase[v4++];
    v7 = 0;
    if ( v2->m_uiTail )
    {
      do
        v5[v6++] = v2->m_pBase[v7++];
      while ( v7 < v2->m_uiTail );
    }
  }
  v2->m_uiTail = v6;
  v8 = v2->m_pBase;
  v2->m_uiHead = 0;
  v2->m_uiAlloced = uiNewSize;
  operator delete[](v8);
  v2->m_pBase = v5;
}

//----- (0042DDC0) --------------------------------------------------------
char __thiscall CMsgMgr::RegisterMsgEater(CMsgMgr *this, void *kMsgID, CMsgEater *pkMsgEater)
{
  void *v3; // edi@1
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v4; // esi@1
  char result; // al@2

  v3 = kMsgID;
  v4 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_kMsgMap;
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_kMsgMap,
    (unsigned int)kMsgID,
    (NiVBSet **)&kMsgID);
  if ( kMsgID )
  {
    result = 0;
  }
  else
  {
    NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::SetAt(
      v4,
      (unsigned int)v3,
      (NiVBSet *)pkMsgEater);
    result = 1;
  }
  return result;
}

//----- (0042DE00) --------------------------------------------------------
void __thiscall CMsgMgr::~CMsgMgr(CMsgMgr *this)
{
  CMsgMgr *v1; // esi@1
  CMsg **v2; // ST00_4@1
  NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>Vtbl **v3; // ST0C_4@1

  v1 = this;
  v2 = this->m_kMsgQ.m_pBase;
  this->vfptr = (CMsgMgrVtbl *)&CMsgMgr::`vftable';
  operator delete[](v2);
  v3 = &v1->m_kMsgMap.vfptr;
  *v3 = (NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>Vtbl *)&NiTPointerMap<void *,CMsgEater *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kMsgMap);
  *v3 = (NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kMsgMap);
  operator delete[](v1->m_kMsgMap.m_ppkHashTable);
}
// 9756F8: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>::`vftable')(void *p, char);
// 975718: using guessed type int (__thiscall *NiTPointerMap<void *,CMsgEater *>::`vftable')(void *p, char);
// 975738: using guessed type int (__thiscall *CMsgMgr::`vftable')(void *p, char);

//----- (0042DE90) --------------------------------------------------------
void __thiscall CMsgMgr::PostMsg(CMsgMgr *this, CMsg *pkMsg)
{
  if ( pkMsg )
    PgTQueue<CMsg *>::Add(&this->m_kMsgQ, pkMsg);
}

//----- (0042DEB0) --------------------------------------------------------
bool __thiscall CMsgMgr::ProcessMsg(CMsgMgr *this)
{
  CMsgMgr *v1; // edi@1
  unsigned int v2; // edx@1
  int v3; // eax@2
  unsigned int v4; // ecx@3
  unsigned int v5; // eax@8
  CMsg *v6; // ecx@8
  NiTMapItem<void *,CMsgEater *> *v7; // esi@12
  CMsgEater *v8; // ecx@15
  CMsg *v10; // [sp+4h] [bp-10h]@8
  int v11; // [sp+8h] [bp-Ch]@12
  int v12; // [sp+Ch] [bp-8h]@7
  CMsgEater *pkMsgEater; // [sp+10h] [bp-4h]@0

  v1 = this;
  v2 = this->m_kMsgQ.m_uiHead;
  if ( v2 == -1 )
  {
    v3 = 0;
  }
  else
  {
    v4 = this->m_kMsgQ.m_uiTail;
    if ( v2 < v4 )
      v3 = v4 - v2;
    else
      v3 = v4 + v1->m_kMsgQ.m_uiAlloced - v2;
  }
  if ( v3 )
  {
    v12 = v3;
    do
    {
      v5 = v1->m_kMsgQ.m_uiHead;
      v6 = v1->m_kMsgQ.m_pBase[v5++];
      v10 = v6;
      v1->m_kMsgQ.m_uiHead = v5;
      if ( v5 == v1->m_kMsgQ.m_uiAlloced )
        v1->m_kMsgQ.m_uiHead = 0;
      if ( v1->m_kMsgQ.m_uiHead == v1->m_kMsgQ.m_uiTail )
      {
        v1->m_kMsgQ.m_uiHead = -1;
        v1->m_kMsgQ.m_uiTail = 0;
      }
      v11 = ((int (*)(void))v6->vfptr[2].__vecDelDtor)();
      v7 = v1->m_kMsgMap.m_ppkHashTable[v1->m_kMsgMap.vfptr->KeyToHashIndex(
                                          (NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *> *)&v1->m_kMsgMap,
                                          (void *)v11)];
      if ( v7 )
      {
        while ( !v1->m_kMsgMap.vfptr->IsKeysEqual(
                   (NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *> *)&v1->m_kMsgMap,
                   (void *)v11,
                   v7->m_key) )
        {
          v7 = v7->m_pkNext;
          if ( !v7 )
            goto LABEL_15;
        }
        v8 = v7->m_val;
        pkMsgEater = v7->m_val;
      }
      else
      {
LABEL_15:
        v8 = pkMsgEater;
      }
      if ( v8 )
        ((void (__stdcall *)(CMsg *))v8->vfptr->ProcessMsg)(v10);
      --v12;
    }
    while ( v12 );
  }
  return 0;
}

//----- (0042DF90) --------------------------------------------------------
void __thiscall CMsgMgr::Terminate(CMsgMgr *this)
{
  CMsgMgr *v1; // esi@1
  unsigned int v2; // edx@1
  int v3; // eax@2
  unsigned int v4; // ecx@3
  unsigned int v5; // eax@8
  CMsg *v6; // edi@8
  int v7; // [sp+14h] [bp-10h]@7

  v1 = this;
  v2 = this->m_kMsgQ.m_uiHead;
  if ( v2 == -1 )
  {
    v3 = 0;
  }
  else
  {
    v4 = this->m_kMsgQ.m_uiTail;
    if ( v2 < v4 )
      v3 = v4 - v2;
    else
      v3 = v4 + v1->m_kMsgQ.m_uiAlloced - v2;
  }
  if ( v3 )
  {
    v7 = v3;
    do
    {
      v5 = v1->m_kMsgQ.m_uiHead;
      v6 = v1->m_kMsgQ.m_pBase[v5++];
      v1->m_kMsgQ.m_uiHead = v5;
      if ( v5 == v1->m_kMsgQ.m_uiAlloced )
        v1->m_kMsgQ.m_uiHead = 0;
      if ( v1->m_kMsgQ.m_uiHead == v1->m_kMsgQ.m_uiTail )
      {
        v1->m_kMsgQ.m_uiHead = -1;
        v1->m_kMsgQ.m_uiTail = 0;
      }
      if ( v6 )
      {
        InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
        if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
      --v7;
    }
    while ( v7 );
  }
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kMsgMap);
}

//----- (0042E060) --------------------------------------------------------
void __thiscall CMsgMgr::CMsgMgr(CMsgMgr *this)
{
  CMsgMgr *v1; // esi@1
  char *v2; // eax@1
  unsigned int v3; // ST0C_4@1

  v1 = this;
  this->vfptr = (CMsgMgrVtbl *)&CMsgMgr::`vftable';
  this->m_kMsgMap.m_uiHashSize = 37;
  this->m_kMsgMap.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>::`vftable';
  this->m_kMsgMap.m_kAllocator.m_uiCount = 0;
  v2 = (char *)operator new[](0x94u);
  v3 = 4 * v1->m_kMsgMap.m_uiHashSize;
  v1->m_kMsgMap.m_ppkHashTable = (NiTMapItem<void *,CMsgEater *> **)v2;
  memset(v2, 0, v3);
  v1->m_kMsgMap.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>Vtbl *)&NiTPointerMap<void *,CMsgEater *>::`vftable';
  v1->m_kMsgQ.m_pBase = (CMsg **)operator new[](4u);
  v1->m_kMsgQ.m_uiAlloced = 1;
  v1->m_kMsgQ.m_uiHead = -1;
  v1->m_kMsgQ.m_uiTail = 0;
}
// 9756F8: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>::`vftable')(void *p, char);
// 975718: using guessed type int (__thiscall *NiTPointerMap<void *,CMsgEater *>::`vftable')(void *p, char);
// 975738: using guessed type int (__thiscall *CMsgMgr::`vftable')(void *p, char);

//----- (0042E130) --------------------------------------------------------
void __thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>::~NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>(NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *> *this)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *> *v1; // esi@1

  v1 = this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v1->m_ppkHashTable);
}
// 9756F8: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>::`vftable')(void *p, char);

//----- (0042E150) --------------------------------------------------------
void __thiscall NiTPointerMap<void *,CMsgEater *>::~NiTPointerMap<void *,CMsgEater *>(NiTPointerMap<void *,CMsgEater *> *this)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v1; // esi@1

  v1 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>Vtbl *)&NiTPointerMap<void *,CMsgEater *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v1->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v1);
  operator delete[](v1->m_ppkHashTable);
}
// 9756F8: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>::`vftable')(void *p, char);
// 975718: using guessed type int (__thiscall *NiTPointerMap<void *,CMsgEater *>::`vftable')(void *p, char);

//----- (0042E1C0) --------------------------------------------------------
void __thiscall PgTQueue<CMsg *>::Add(PgTQueue<CMsg *> *this, CMsg *element)
{
  PgTQueue<CMsg *> *v2; // esi@1
  unsigned int v3; // eax@1
  CMsg **v4; // eax@2

  v2 = this;
  v3 = this->m_uiHead;
  if ( v3 == -1 )
  {
    v4 = this->m_pBase;
    this->m_uiHead = 0;
    *v4 = element;
    this->m_uiTail = 1;
  }
  else
  {
    if ( v3 == this->m_uiTail )
      PgTQueue<CMsg *>::Realloc(this, 2 * this->m_uiAlloced);
    v2->m_pBase[v2->m_uiTail++] = element;
  }
  if ( v2->m_uiTail == v2->m_uiAlloced )
    v2->m_uiTail = 0;
}

//----- (0042E220) --------------------------------------------------------
NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>::`vector deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *> *this, unsigned int a2)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9756F8: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>::`vftable')(void *p, char);

//----- (0042E260) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTPointerMap<void *,CMsgEater *>::`scalar deleting destructor'(NiTPointerMap<void *,CMsgEater *> *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // esi@1

  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>Vtbl *)&NiTPointerMap<void *,CMsgEater *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v2);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9756F8: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>::`vftable')(void *p, char);
// 975718: using guessed type int (__thiscall *NiTPointerMap<void *,CMsgEater *>::`vftable')(void *p, char);

//----- (0042E2E0) --------------------------------------------------------
CMsgMgr *__thiscall CMsgMgr::`scalar deleting destructor'(CMsgMgr *this, unsigned int a2)
{
  CMsgMgr *v2; // edi@1
  CMsg **v3; // ST00_4@1
  NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>Vtbl **v4; // ST10_4@1

  v2 = this;
  v3 = this->m_kMsgQ.m_pBase;
  this->vfptr = (CMsgMgrVtbl *)&CMsgMgr::`vftable';
  operator delete[](v3);
  v4 = &v2->m_kMsgMap.vfptr;
  *v4 = (NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>Vtbl *)&NiTPointerMap<void *,CMsgEater *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v2->m_kMsgMap);
  *v4 = (NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v2->m_kMsgMap);
  operator delete[](v2->m_kMsgMap.m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9756F8: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,void *,CMsgEater *>::`vftable')(void *p, char);
// 975718: using guessed type int (__thiscall *NiTPointerMap<void *,CMsgEater *>::`vftable')(void *p, char);
// 975738: using guessed type int (__thiscall *CMsgMgr::`vftable')(void *p, char);

//----- (0042E380) --------------------------------------------------------
void __thiscall NifVideo::NifVideo(NifVideo *this)
{
  this->LoadedNif = 0;
}

//----- (0042E3A0) --------------------------------------------------------
void __thiscall NifVideo::LoadNifVideoSequence(NifVideo *this)
{
  NifVideo *v1; // esi@1
  const char *v2; // eax@3

  v1 = this;
  if ( !Folder::m_bInit )
    Folder::Init();
  v2 = Folder::Merge(&Folder::m_acEffect, "Cam.nif");
  if ( PgUtil::LoadNifFile(v2, 0) )
  {
    v1->LoadedNif = 1;
    OutputDebugStringA("LoadNifVideoSequence - loaded nif\n");
  }
  else
  {
    OutputDebugStringA("LoadNifVideoSequence - not able to load nif\n");
  }
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0042E400) --------------------------------------------------------
void __thiscall Oscillation::Oscillation(Oscillation *this)
{
  this->m_fAmplitude = 0.0;
  this->vfptr = (OscillationVtbl *)&Oscillation::`vftable';
  this->m_fValue = 0.0;
  this->m_fCurrTime = 3.4028235e38;
  this->m_fNextPeakTime = 0.025;
  this->m_fPeriod = 0.1;
  this->m_fDampingMagnitude = 0.5;
  this->m_fPhase = 0.0;
}
// 975808: using guessed type void (__thiscall *Oscillation::`vftable')(Oscillation *__hidden this);

//----- (0042E440) --------------------------------------------------------
void __thiscall Oscillation::~Oscillation(Oscillation *this)
{
  this->vfptr = (OscillationVtbl *)&Oscillation::`vftable';
}
// 975808: using guessed type void (__thiscall *Oscillation::`vftable')(Oscillation *__hidden this);

//----- (0042E450) --------------------------------------------------------
bool __thiscall Oscillation::IsImpacting(Oscillation *this)
{
  return 3.4028235e38 != this->m_fCurrTime;
}

//----- (0042E470) --------------------------------------------------------
void __thiscall Oscillation::Impact(Oscillation *this, float fAmplitude, float fStartTime)
{
  this->m_fStartTime = fStartTime;
  this->m_fCurrTime = fStartTime;
  this->m_fTargetAmplitude = 0.0;
  this->m_fAmplitude = fAmplitude;
  this->m_fNextPeakTime = fStartTime + this->m_fPeriod * 0.25;
}

//----- (0042E4A0) --------------------------------------------------------
void __thiscall Oscillation::Clear(Oscillation *this)
{
  this->m_fTargetAmplitude = 0.0;
  this->m_fAmplitude = 0.0;
  this->m_fValue = 0.0;
  this->m_fCurrTime = 3.4028235e38;
}

//----- (0042E4C0) --------------------------------------------------------
void __thiscall OscillationEx::OscillationEx(OscillationEx *this)
{
  this->m_fAmplitude = 0.0;
  this->vfptr = (OscillationVtbl *)&Oscillation::`vftable';
  this->m_fValue = 0.0;
  this->m_fCurrTime = 3.4028235e38;
  this->vfptr = (OscillationVtbl *)&OscillationEx::`vftable';
  this->m_eAxis = 0;
  this->m_fNextPeakTime = 0.025;
  this->m_fPeriod = 0.1;
  this->m_fDampingMagnitude = 0.5;
  this->m_fPhase = 0.0;
}
// 975808: using guessed type void (__thiscall *Oscillation::`vftable')(Oscillation *__hidden this);
// 97581C: using guessed type void (__thiscall *OscillationEx::`vftable')(OscillationEx *__hidden this);

//----- (0042E510) --------------------------------------------------------
void __thiscall OscillationEx::~OscillationEx(OscillationEx *this)
{
  this->vfptr = (OscillationVtbl *)&Oscillation::`vftable';
}
// 975808: using guessed type void (__thiscall *Oscillation::`vftable')(Oscillation *__hidden this);

//----- (0042E520) --------------------------------------------------------
void __thiscall OscillationEx::Clear(OscillationEx *this)
{
  this->m_fTargetAmplitude = 0.0;
  this->m_fAmplitude = 0.0;
  this->m_fValue = 0.0;
  this->m_fCurrTime = 3.4028235e38;
  this->m_eAxis = 0;
}

//----- (0042E540) --------------------------------------------------------
void __thiscall Oscillation::Update(Oscillation *this, float fTime)
{
  float dest; // ST04_4@2
  double v3; // st7@2
  double v4; // st6@2
  bool v5; // c0@2
  bool v6; // c3@2
  double v7; // st7@2
  double v8; // st6@4
  float v9; // ST04_4@4
  float v10; // ST04_4@5
  float v11; // ST04_4@5
  double v12; // st6@5
  float fOffset; // [sp+10h] [bp+8h]@2
  float fOffseta; // [sp+10h] [bp+8h]@4
  float fOffsetb; // [sp+10h] [bp+8h]@7

  if ( 3.4028235e38 != this->m_fCurrTime )
  {
    fOffset = fTime - this->m_fCurrTime;
    dest = fOffset + this->m_fCurrTime;
    v3 = this->m_fCurrTime;
    v4 = this->m_fNextPeakTime;
    v5 = v4 < v3;
    v6 = v4 == v3;
    v7 = dest;
    if ( !v5 && !v6 && this->m_fNextPeakTime < v7 )
    {
      fOffseta = v7 - this->m_fNextPeakTime;
      v8 = fOffseta;
      this->m_fStartTime = this->m_fStartTime + fOffseta;
      fOffset = this->m_fNextPeakTime - this->m_fCurrTime;
      v9 = v8 + this->m_fNextPeakTime;
      this->m_fNextPeakTime = v9 + this->m_fPeriod * 0.5;
    }
    this->m_fCurrTime = v7;
    v10 = (v7 - this->m_fStartTime + this->m_fPhase) / this->m_fPeriod * NI_TWO_PI;
    v11 = sin(v10);
    v12 = this->m_fAmplitude;
    if ( v11 < 0.0 )
      v12 = -v12;
    this->m_fValue = v12;
    fOffsetb = (this->m_fTargetAmplitude - this->m_fAmplitude) * this->m_fDampingMagnitude * fOffset
             + this->m_fAmplitude;
    this->m_fAmplitude = fOffsetb;
    if ( fOffsetb < 0.0099999998 )
    {
      this->m_fCurrTime = 3.4028235e38;
      this->m_fValue = 0.0;
    }
  }
}
// B622D4: using guessed type const float NI_TWO_PI;

//----- (0042E640) --------------------------------------------------------
void __thiscall OscillationEx::ImPact(OscillationEx *this, float fAmplitude, float fPeriod, float fDamp, EffectAxisEnum eValue, float fStartTime)
{
  this->m_fStartTime = fStartTime;
  this->m_eAxis = eValue;
  this->m_fCurrTime = fStartTime;
  this->m_fTargetAmplitude = 0.0;
  this->m_fAmplitude = fAmplitude;
  this->m_fNextPeakTime = fStartTime + this->m_fPeriod * 0.25;
  this->m_fPeriod = fPeriod;
  this->m_fDampingMagnitude = fDamp;
}

//----- (0042E680) --------------------------------------------------------
void __thiscall OscillationEx::Impact(OscillationEx *this, EffectViewInfo *ImpactInfo, float fStartTime)
{
  EffectViewInfo *v3; // eax@1
  EffectViewInfo *ImpactInfoa; // [sp+8h] [bp+8h]@2

  v3 = ImpactInfo;
  if ( ImpactInfo )
  {
    *(float *)&ImpactInfoa = (double)ImpactInfo->Amplitude / 100.0;
    this->m_fStartTime = fStartTime;
    this->m_fCurrTime = fStartTime;
    this->m_fTargetAmplitude = 0.0;
    this->m_fAmplitude = *(float *)&ImpactInfoa;
    this->m_fNextPeakTime = fStartTime + this->m_fPeriod * 0.25;
    this->m_fPeriod = (double)v3->Period / 100.0;
    this->m_fDampingMagnitude = (double)v3->Damp / 100.0;
    this->m_eAxis = v3->Axis;
  }
}

//----- (0042E700) --------------------------------------------------------
void __thiscall OscillationEx::Impact(OscillationEx *this, unsigned __int16 EffectViewInfoID, float fStartTime)
{
  OscillationEx *v3; // esi@1
  EffectViewInfo *v4; // eax@1
  float EffectViewInfoIDa; // [sp+Ch] [bp+8h]@2

  v3 = this;
  v4 = ShakeEffectViewInfoTab::GetByID(EffectViewInfoID);
  if ( v4 )
  {
    EffectViewInfoIDa = (double)v4->Amplitude / 100.0;
    v3->m_fStartTime = fStartTime;
    v3->m_fCurrTime = fStartTime;
    v3->m_fTargetAmplitude = 0.0;
    v3->m_fAmplitude = EffectViewInfoIDa;
    v3->m_fNextPeakTime = fStartTime + v3->m_fPeriod * 0.25;
    v3->m_fPeriod = (double)v4->Period / 100.0;
    v3->m_fDampingMagnitude = (double)v4->Damp / 100.0;
    v3->m_eAxis = v4->Axis;
  }
}

//----- (0042E790) --------------------------------------------------------
void __cdecl OscillationEx::GetOscillationStr(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *TargetStr, OscTarget e)
{
  _BYTE *v2; // eax@11
  bool v3; // cf@11

  switch ( e )
  {
    case 4:
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(TargetStr, "MyCamOsc", 8u);
      break;
    case 0:
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(TargetStr, "FMyCamOsc", 9u);
      break;
    case 7:
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(TargetStr, "AllCamOsc", 9u);
      break;
    case 3:
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(TargetStr, "FAllCamOsc", 0xAu);
      break;
    case 5:
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(TargetStr, "EneCamOsc", 9u);
      break;
    case 1:
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(TargetStr, "FEneCamOsc", 0xAu);
      break;
    case 6:
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(TargetStr, "ParCamOsc", 9u);
      break;
    case 2:
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(TargetStr, "FParCamOsc", 0xAu);
      break;
    case 8:
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(TargetStr, "DmgOsc", 6u);
      break;
    default:
      v2 = TargetStr;
      v3 = TargetStr->_Myres < 0x10;
      TargetStr->_Mysize = 0;
      if ( !v3 )
        v2 = TargetStr->_Bx._Ptr;
      *v2 = 0;
      break;
  }
}

//----- (0042E880) --------------------------------------------------------
unsigned int __cdecl ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A89D2C: using guessed type int ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::ms_pkTable;

//----- (0042E8A0) --------------------------------------------------------
OscillationEx *__thiscall OscillationEx::`scalar deleting destructor'(OscillationEx *this, unsigned int a2)
{
  OscillationEx *v2; // esi@1

  v2 = this;
  this->vfptr = (OscillationVtbl *)&Oscillation::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 975808: using guessed type void (__thiscall *Oscillation::`vftable')(Oscillation *__hidden this);

//----- (0042E8D0) --------------------------------------------------------
EffectViewInfo *__cdecl ShakeEffectViewInfoTab::GetByID(unsigned __int16 ID)
{
  unsigned int v1; // esi@1
  EffectViewInfo *result; // eax@4

  v1 = 0;
  if ( ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::GetTotal() )
  {
    while ( *(_WORD *)CDataReader::GetRecord(
                        (CDataReader *)(ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::ms_pkTable + 4),
                        v1) != ID )
    {
      if ( ++v1 >= ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::GetTotal() )
        goto LABEL_4;
    }
    result = (EffectViewInfo *)CDataReader::GetRecord(
                                 (CDataReader *)(ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::ms_pkTable + 4),
                                 v1);
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}
// A89D2C: using guessed type int ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::ms_pkTable;

//----- (0042E920) --------------------------------------------------------
void PartyScoreWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "PartyScoreWin");
}

//----- (0042E950) --------------------------------------------------------
void PartyScoreWin::OnCancelWin()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::PartyScoreShowWin(v1, 0);
}

//----- (0042E970) --------------------------------------------------------
void __thiscall PartyScoreWin::OnSortByTitle01(PartyScoreWin *this)
{
  PartyScoreWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  bool v3; // al@2

  v1 = this;
  v2 = this->m_pkListWin;
  if ( v2 )
  {
    v3 = v1->m_bReverse1 == 0;
    v1->m_bReverse1 = v3;
    SlideListWin::Sort(v2, 0, v3, 0);
    SlideListWin::UpdateViewList(v1->m_pkListWin);
  }
}

//----- (0042E9B0) --------------------------------------------------------
void __thiscall PartyScoreWin::OnSortByTitle02(PartyScoreWin *this)
{
  PartyScoreWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  bool v3; // al@2

  v1 = this;
  v2 = this->m_pkListWin;
  if ( v2 )
  {
    v3 = v1->m_bReverse2 == 0;
    v1->m_bReverse2 = v3;
    SlideListWin::Sort(v2, 1, v3, 0);
    SlideListWin::UpdateViewList(v1->m_pkListWin);
  }
}

//----- (0042E9F0) --------------------------------------------------------
void __thiscall PartyScoreWin::OnSortByTitle03(PartyScoreWin *this)
{
  PartyScoreWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  bool v3; // al@2

  v1 = this;
  v2 = this->m_pkListWin;
  if ( v2 )
  {
    v3 = v1->m_bReverse3 == 0;
    v1->m_bReverse3 = v3;
    SlideListWin::Sort(v2, 2, v3, 1);
    SlideListWin::UpdateViewList(v1->m_pkListWin);
  }
}

//----- (0042EA30) --------------------------------------------------------
void __thiscall PartyScoreWin::OnSortByTitle04(PartyScoreWin *this)
{
  PartyScoreWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  bool v3; // al@2

  v1 = this;
  v2 = this->m_pkListWin;
  if ( v2 )
  {
    v3 = v1->m_bReverse4 == 0;
    v1->m_bReverse4 = v3;
    SlideListWin::Sort(v2, 3, v3, 1);
    SlideListWin::UpdateViewList(v1->m_pkListWin);
  }
}

//----- (0042EA70) --------------------------------------------------------
void __thiscall PartyScoreWin::OnSortByTitle05(PartyScoreWin *this)
{
  PartyScoreWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  bool v3; // al@2

  v1 = this;
  v2 = this->m_pkListWin;
  if ( v2 )
  {
    v3 = v1->m_bReverse5 == 0;
    v1->m_bReverse5 = v3;
    SlideListWin::Sort(v2, 4, v3, 1);
    SlideListWin::UpdateViewList(v1->m_pkListWin);
  }
}

//----- (0042EAB0) --------------------------------------------------------
void __thiscall PartyScoreWin::OnCommand(PartyScoreWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0xAu:
      PartyScoreWin::OnSortByTitle01(this);
      break;
    case 0xBu:
      PartyScoreWin::OnSortByTitle02(this);
      break;
    case 0xCu:
      PartyScoreWin::OnSortByTitle03(this);
      break;
    case 0xDu:
      PartyScoreWin::OnSortByTitle04(this);
      break;
    case 0xEu:
      PartyScoreWin::OnSortByTitle05(this);
      break;
    case 0x11u:
      PartyScoreWin::OnHelpLink();
      break;
    case 0x12u:
      PartyScoreWin::OnCancelWin();
      break;
    default:
      return;
  }
}

//----- (0042EB30) --------------------------------------------------------
void __userpurge PartyScoreWin::ShowRaidPartyInfo(PartyScoreWin *this@<ecx>, int a2@<ebx>, const char *byStatus, const int *iLev, const int *nIndex, Name5 *Charid, const char *CharClass)
{
  int v7; // eax@1
  PartyScoreWin *v8; // esi@1
  EntryIconWin *v9; // edx@8
  NiRefObjectVtbl *v10; // ebx@8
  PgWinText *v11; // ST14_4@8
  char *v12; // eax@8
  unsigned int v13; // edx@9
  unsigned int v14; // ecx@9
  unsigned int v15; // edx@9
  unsigned int v16; // eax@9
  int v17; // ecx@9
  char v18; // al@10
  PgWinSpr *v19; // ecx@19
  int v20; // [sp+0h] [bp-2Ch]@0
  char acstr[21]; // [sp+10h] [bp-1Ch]@9

  v7 = *nIndex;
  v8 = this;
  if ( *nIndex >= 0 && v7 < 20 )
  {
    if ( *byStatus )
    {
      ((void (__stdcall *)(D3DXCOLOR *, int, int))this->m_spEntry[v7].m_pObject->m_spLevelText.m_pObject->vfptr[117].__vecDelDtor)(
        &Color::m_kDxWhiteColor,
        a2,
        v20);
      ((void (__cdecl *)(D3DXCOLOR *))v8->m_spEntry[*nIndex].m_pObject->m_spNameText.m_pObject->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
    }
    else
    {
      ((void (__stdcall *)(void *, int, int))this->m_spEntry[v7].m_pObject->m_spLevelText.m_pObject->vfptr[117].__vecDelDtor)(
        &Color::m_kDxGrayColor,
        a2,
        v20);
      ((void (__cdecl *)(void *))v8->m_spEntry[*nIndex].m_pObject->m_spNameText.m_pObject->vfptr[117].__vecDelDtor)(&Color::m_kDxGrayColor);
    }
    if ( *byStatus )
    {
      v9 = v8->m_spEntry[*nIndex].m_pObject;
      v10 = v9->m_spLevelText.m_pObject->vfptr;
      v11 = v9->m_spLevelText.m_pObject;
      v12 = fs("%d", *iLev);
      v10[118].__vecDelDtor((NiRefObject *)v11, (unsigned int)v12);
    }
    else
    {
      ((void (__stdcall *)(const char *))v8->m_spEntry[*nIndex].m_pObject->m_spLevelText.m_pObject->vfptr[118].__vecDelDtor)("?");
    }
    v13 = Charid->n5_code[1];
    *(_DWORD *)acstr = Charid->n5_code[0];
    v14 = Charid->n5_code[2];
    *(_DWORD *)&acstr[4] = v13;
    v15 = Charid->n5_code[3];
    v16 = Charid->n5_code[4];
    *(_DWORD *)&acstr[8] = v14;
    v17 = *nIndex;
    *(_DWORD *)&acstr[12] = v15;
    *(_DWORD *)&acstr[16] = v16;
    acstr[20] = 0;
    ((void (__cdecl *)(char *))v8->m_spEntry[v17].m_pObject->m_spNameText.m_pObject->vfptr[118].__vecDelDtor)(acstr);
    switch ( *CharClass )
    {
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
        v18 = 1;
        break;
      case 6:
      case 7:
      case 8:
      case 9:
      case 0xA:
        v18 = 6;
        break;
      case 0xB:
      case 0xC:
      case 0xD:
      case 0xE:
      case 0xF:
        v18 = 11;
        break;
      case 0x10:
      case 0x11:
      case 0x12:
      case 0x13:
      case 0x14:
        v18 = 16;
        break;
      case 0x15:
      case 0x16:
      case 0x17:
      case 0x18:
      case 0x19:
        v18 = 21;
        break;
      case 0x1A:
      case 0x1B:
        v18 = 26;
        break;
      default:
        v18 = 0;
        break;
    }
    switch ( v18 )
    {
      case 1:
        ((void (__stdcall *)(signed int))v8->m_spEntry[*nIndex].m_pObject->m_spClassBar[0].m_pObject->vfptr[64].__vecDelDtor)(1);
        return;
      case 6:
        v19 = v8->m_spEntry[*nIndex].m_pObject->m_spClassBar[1].m_pObject;
        goto LABEL_24;
      case 0xB:
        ((void (__stdcall *)(signed int))v8->m_spEntry[*nIndex].m_pObject->m_spClassBar[2].m_pObject->vfptr[64].__vecDelDtor)(1);
        return;
      case 0x10:
        v19 = v8->m_spEntry[*nIndex].m_pObject->m_spClassBar[3].m_pObject;
        goto LABEL_24;
      case 0x15:
        ((void (__stdcall *)(signed int))v8->m_spEntry[*nIndex].m_pObject->m_spClassBar[4].m_pObject->vfptr[64].__vecDelDtor)(1);
        break;
      case 0x1A:
        v19 = v8->m_spEntry[*nIndex].m_pObject->m_spClassBar[5].m_pObject;
LABEL_24:
        ((void (__stdcall *)(signed int))v19->vfptr[64].__vecDelDtor)(1);
        break;
      default:
        return;
    }
  }
}
// 42EB30: could not find valid save-restore pair for ebx

//----- (0042EE30) --------------------------------------------------------
void __thiscall PartyScoreWin::InitRaidInfo(PartyScoreWin *this)
{
  EntryIconWin **v1; // esi@1
  signed int v2; // ebx@2
  signed int v3; // edi@4
  signed int v4; // [sp+Ch] [bp-4h]@1

  v1 = (EntryIconWin **)this->m_spEntry;
  v4 = 4;
  do
  {
    v2 = 5;
    do
    {
      if ( *v1 )
      {
        ((void (__stdcall *)(_DWORD))(*v1)->m_spLevelText.m_pObject->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
        ((void (__stdcall *)(_DWORD))(*v1)->m_spNameText.m_pObject->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
        ((void (__stdcall *)(_DWORD))(*v1)->m_spLevelText.m_pObject->vfptr[118].__vecDelDtor)(&unk_975847);
        ((void (__stdcall *)(_DWORD))(*v1)->m_spNameText.m_pObject->vfptr[118].__vecDelDtor)(&unk_97584E);
        EntryIconWin::InitLeaderLooterMark(*v1);
        v3 = 79;
        do
        {
          (*((void (__stdcall **)(_DWORD))(&(*v1)->vfptr)[v3]->__vecDelDtor + 64))(0);
          ++v3;
        }
        while ( v3 < 85 );
      }
      ++v1;
      --v2;
    }
    while ( v2 );
    --v4;
  }
  while ( v4 );
}

//----- (0042EF00) --------------------------------------------------------
void __thiscall PartyScoreWin::~PartyScoreWin(PartyScoreWin *this)
{
  PartyScoreWin *v1; // esi@1
  char *v2; // ebx@1
  int v3; // edi@2
  signed int v4; // [sp+14h] [bp-10h]@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&PartyScoreWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PartyScoreWin::`vftable'{for `IDirectMessenger'};
  v2 = (char *)this->m_spEntry;
  v4 = 4;
  do
  {
    v3 = *(_DWORD *)v2;
    if ( *(_DWORD *)v2 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v3 + 4)) && v3 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v3)(v3, 1);
      *(_DWORD *)v2 = 0;
    }
    v2 += 4;
    --v4;
  }
  while ( v4 );
  *(_DWORD *)&v1->m_bReverse1 = 0;
  v1->m_bReverse5 = 0;
  `eh vector destructor iterator'(
    v1->m_spEntry,
    4u,
    20,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 975A40: using guessed type void (__thiscall *PartyScoreWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 975A5C: using guessed type int (__thiscall *PartyScoreWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0042EFD0) --------------------------------------------------------
void __thiscall PartyScoreWin::OnClose(PartyScoreWin *this)
{
  PartyScoreWin *v1; // esi@1

  v1 = this;
  PartyScoreWin::InitRaidInfo(this);
  SlideListWin::RemoveAllList(v1->m_pkListWin);
}

//----- (0042EFF0) --------------------------------------------------------
void __thiscall PartyScoreWin::ShowPartyInfo(PartyScoreWin *this)
{
  PartyScoreWin *v1; // ebx@1
  char v2; // al@1
  AbStateInfecteeVtbl *v3; // edx@1
  char *v4; // eax@1
  int (*v5)(void); // eax@1
  int i; // esi@1
  PartyMemberInfo *v7; // eax@2
  int nIndex; // [sp+Ch] [bp-28h]@1
  int nPartyTotalmember; // [sp+10h] [bp-24h]@1
  int iLev; // [sp+14h] [bp-20h]@1
  char CharClass; // [sp+1Ah] [bp-1Ah]@1
  char byStatus; // [sp+1Bh] [bp-19h]@1
  char dest[4]; // [sp+1Ch] [bp-18h]@1
  int v14; // [sp+20h] [bp-14h]@1
  int v15; // [sp+24h] [bp-10h]@1
  int v16; // [sp+28h] [bp-Ch]@1
  int v17; // [sp+2Ch] [bp-8h]@1

  v1 = this;
  nPartyTotalmember = g_kParty.m_uiTotalMember;
  v2 = Char::GetClass(g_pkMainChar);
  v3 = g_pkMainChar->vfptr;
  CharClass = v2;
  v4 = (char *)((int (*)(void))v3[2].DeleteAbStateByAbstateIndex)();
  v17 = 0;
  v16 = 0;
  v15 = 0;
  v14 = 0;
  *(_DWORD *)dest = 0;
  strncpy(dest, v4, 0x14u);
  v5 = (int (*)(void))g_pkMainChar->vfptr[20].IsVisible;
  nIndex = 0;
  iLev = v5();
  byStatus = 1;
  PartyScoreWin::ShowRaidPartyInfo(v1, (int)v1, &byStatus, &iLev, &nIndex, (Name5 *)dest, &CharClass);
  for ( i = 0; i < nPartyTotalmember; ++i )
  {
    v7 = Party::GetMemberInfo(&g_kParty, i);
    if ( v7 )
    {
      iLev = i + 1;
      PartyScoreWin::ShowRaidPartyInfo(
        v1,
        (int)v1,
        &v7->m_ucStatus,
        &v7->m_iLv,
        &iLev,
        &v7->m_kCharID,
        &v7->m_byChrClass);
    }
  }
}

//----- (0042F0D0) --------------------------------------------------------
void __thiscall PartyScoreWin::PartyScoreWin(PartyScoreWin *this)
{
  PartyScoreWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&PartyScoreWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&PartyScoreWin::`vftable'{for `IDirectMessenger'};
  `eh vector constructor iterator'(
    v1->m_spEntry,
    4u,
    20,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_pkListWin = 0;
}
// 975A40: using guessed type void (__thiscall *PartyScoreWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 975A5C: using guessed type int (__thiscall *PartyScoreWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0042F150) --------------------------------------------------------
void __thiscall PartyScoreWin::SetPartyScore(PartyScoreWin *this, SHINE_INDUN_RANK_CLIENT *pData, const unsigned __int16 *nRankCount, const char *nPlayTimeHour, const char *nPlayTimeMinute, const char *nPlayTimeSecond)
{
  PartyScoreWin *v6; // edi@1
  char *v7; // esi@4
  int v8; // edx@5
  int v9; // eax@5
  int v10; // ecx@5
  int v11; // eax@5
  SlideListWin *v12; // ecx@5
  unsigned int v13; // ebx@5
  char *v14; // eax@5
  const char *v15; // eax@6
  int v16; // ST0C_4@8
  int v17; // ST08_4@8
  int v18; // ST04_4@8
  char *v19; // eax@8
  const char *v20; // eax@8
  int i; // [sp+14h] [bp-124h]@3
  char pNumberString[256]; // [sp+1Ch] [bp-11Ch]@8
  char acname[21]; // [sp+11Ch] [bp-1Ch]@5

  v6 = this;
  if ( this->m_pkListWin && PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
  {
    i = 0;
    if ( *nRankCount > 0u )
    {
      v7 = &pData->nCharID.n5_name[8];
      do
      {
        v8 = *(_DWORD *)v7;
        v9 = *((_DWORD *)v7 - 2);
        *(_DWORD *)&acname[4] = *((_DWORD *)v7 - 1);
        v10 = *((_DWORD *)v7 + 2);
        *(_DWORD *)&acname[8] = v8;
        *(_DWORD *)acname = v9;
        v11 = *((_DWORD *)v7 + 1);
        *(_DWORD *)&acname[16] = v10;
        v12 = v6->m_pkListWin;
        *(_DWORD *)&acname[12] = v11;
        acname[20] = 0;
        v13 = SlideListWin::AddText(v12, acname);
        v14 = CDataReader::GetRecord(
                (CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4),
                (unsigned __int8)v7[12]);
        if ( v14 )
          v15 = v14 + 21;
        else
          v15 = (const char *)&unk_96F8EB;
        SlideListWin::SetText(v6->m_pkListWin, v13, 1u, v15);
        GameFrameWork::ConvertCommaNumberWork(*((_QWORD *)v7 + 2), pNumberString);
        SlideListWin::SetText(v6->m_pkListWin, v13, 2u, pNumberString);
        GameFrameWork::ConvertCommaNumberWork(*((_QWORD *)v7 + 3), pNumberString);
        SlideListWin::SetText(v6->m_pkListWin, v13, 3u, pNumberString);
        GameFrameWork::ConvertCommaNumberWork(*((_QWORD *)v7 + 4), pNumberString);
        SlideListWin::SetText(v6->m_pkListWin, v13, 4u, pNumberString);
        v16 = *nPlayTimeSecond;
        v17 = *nPlayTimeMinute;
        v18 = *nPlayTimeHour;
        v19 = (char *)TextData3::Get(0xE0D1BE17);
        v20 = fs(v19, v18, v17, v16);
        SlideListWin::SetText(v6->m_pkListWin, v13, 5u, v20);
        v7 += 48;
        ++i;
      }
      while ( i < *nRankCount );
    }
    SlideListWin::UpdateViewList(v6->m_pkListWin);
  }
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (0042F340) --------------------------------------------------------
PartyScoreWin *__cdecl PartyScoreWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  PartyScoreWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1B4u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    LOBYTE(v6) = 1;
    v2->vfptr = (NiRefObjectVtbl *)&PartyScoreWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&PartyScoreWin::`vftable'{for `IDirectMessenger'};
    `eh vector constructor iterator'(
      &v2[1].m_kLocal.m_Rotate.m_pEntry[0][1],
      4u,
      20,
      (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
      (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
    LODWORD(v2[1].m_kWorld.m_Rotate.m_pEntry[2][2]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (PartyScoreWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 975A40: using guessed type void (__thiscall *PartyScoreWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 975A5C: using guessed type int (__thiscall *PartyScoreWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0042F4A0) --------------------------------------------------------
void __thiscall PartyScoreWin::ShowRaidInfo(PartyScoreWin *this)
{
  unsigned int v1; // edi@1
  std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *v2; // esi@1
  unsigned int v3; // edx@3
  unsigned int v4; // ebx@3
  char *v5; // esi@4
  std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > kInfo; // [sp+10h] [bp-34h]@3
  PartyScoreWin *v7; // [sp+20h] [bp-24h]@1
  int nIndex; // [sp+24h] [bp-20h]@5
  std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *v9; // [sp+28h] [bp-1Ch]@1
  int v10; // [sp+2Ch] [bp-18h]@1
  NiPointer<EntryIconWin> *v11; // [sp+30h] [bp-14h]@1
  NiPointer<EntryIconWin> *v12; // [sp+34h] [bp-10h]@4
  int v13; // [sp+40h] [bp-4h]@3

  v7 = this;
  v1 = 0;
  v2 = g_kRaidinfo.m_MemberInfo;
  v10 = 0;
  v9 = g_kRaidinfo.m_MemberInfo;
  v11 = this->m_spEntry;
  do
  {
    if ( v2->_Myfirst != v2->_Mylast )
    {
      std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>(
        &kInfo,
        v2);
      v3 = (signed int)((unsigned __int64)(2021161081i64 * (unsigned int)((char *)kInfo._Mylast - (char *)kInfo._Myfirst)) >> 32) >> 5;
      v4 = v3 + (v3 >> 31);
      v13 = 0;
      if ( v3 + (v3 >> 31) )
      {
        v12 = v11;
        v5 = (char *)&kInfo._Myfirst->m_iLv;
        do
        {
          nIndex = v1 + v10;
          PartyScoreWin::ShowRaidPartyInfo(v7, v4, v5 - 4, (const int *)v5, &nIndex, (Name5 *)(v5 - 24), v5 + 28);
          EntryIconWin::ShowLeaderLooterMark(v12->m_pObject);
          ++v12;
          ++v1;
          v5 += 68;
        }
        while ( v1 < v4 );
        v2 = v9;
        v1 = 0;
      }
      v13 = -1;
      if ( kInfo._Myfirst )
        operator delete(kInfo._Myfirst);
      kInfo._Myfirst = 0;
      kInfo._Mylast = 0;
      kInfo._Myend = 0;
    }
    v11 += 5;
    v10 += 5;
    ++v2;
    v9 = v2;
  }
  while ( (signed int)v2 < (signed int)&unk_B5C4CC );
}

//----- (0042F5B0) --------------------------------------------------------
void __thiscall PartyScoreWin::OnShowWin(PartyScoreWin *this)
{
  PartyScoreWin *v1; // esi@1

  v1 = this;
  if ( RaidInfo::IsMeRaidMember(&g_kRaidinfo) )
  {
    PartyScoreWin::ShowRaidInfo(v1);
  }
  else if ( g_kParty.m_uiTotalMember )
  {
    PartyScoreWin::ShowPartyInfo(v1);
  }
}

//----- (0042F5E0) --------------------------------------------------------
char __thiscall PartyScoreWin::Create(PartyScoreWin *this, PgFrameWork *pkFrameWork)
{
  PartyScoreWin *v2; // esi@1
  const char *v3; // eax@3
  PgSprData *v4; // eax@4
  int v5; // edi@5
  NiSourceTexture *v6; // eax@5
  PgSprData *v7; // eax@6
  PgSprData::PgHitTester *v8; // eax@8
  int v9; // edx@8
  PgFont *v10; // eax@8
  PgWinText *v11; // esi@8
  NiRefObjectVtbl *v12; // edi@8
  NiUnsharedGeometryGroup *v13; // eax@8
  SLWCreateInfo::Item *v14; // esi@8
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *v15; // esi@8
  NiTexturePalette *v16; // edi@14
  SLWCreateInfo::Item *v17; // esi@15
  const char *v18; // edi@15
  PgSprData *v19; // eax@18
  SlideListWin *v20; // eax@18
  signed int v21; // esi@18
  char *v22; // eax@19
  D3DXCOLOR v23; // ST1C_16@20
  char *v24; // eax@20
  char *v25; // eax@20
  int v26; // eax@21
  NiTexturePalette *v27; // eax@23
  NiTexturePalette *v28; // esi@23
  int v29; // esi@29
  NiNode *v30; // esi@34
  int v32; // esi@40
  NiRTTI *v33; // eax@41
  PgWinBut *v34; // esi@48
  D3DXCOLOR v35; // ST1C_16@48
  char *v36; // eax@48
  PgWinBut *v37; // esi@48
  D3DXCOLOR v38; // ST1C_16@48
  char *v39; // eax@48
  PgWinBut *v40; // esi@48
  D3DXCOLOR v41; // ST1C_16@48
  char *v42; // eax@48
  PgWinBut *v43; // esi@48
  D3DXCOLOR v44; // ST1C_16@48
  char *v45; // eax@48
  PgWinBut *v46; // esi@48
  D3DXCOLOR v47; // ST1C_16@48
  char *v48; // eax@48
  PgWinBut *v49; // esi@48
  D3DXCOLOR v50; // ST1C_16@48
  char *v51; // eax@48
  NiNode *v52; // esi@50
  PartyScoreWin *pkParent; // [sp+34h] [bp-80h]@1
  SLWCreateInfo kCreateInfo; // [sp+38h] [bp-7Ch]@8
  UIUtil ui; // [sp+54h] [bp-60h]@5
  PgWinSpr *pkWinSpr; // [sp+68h] [bp-4Ch]@5
  int j; // [sp+6Ch] [bp-48h]@8
  int i; // [sp+70h] [bp-44h]@8
  NiTexturePalette *pTexturePalette; // [sp+74h] [bp-40h]@1
  int uiTop; // [sp+78h] [bp-3Ch]@4
  int uiLeft; // [sp+7Ch] [bp-38h]@4
  int iOffY; // [sp+80h] [bp-34h]@5
  NiPointer<NiNode> spNode; // [sp+84h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+88h] [bp-2Ch]@8
  int v65; // [sp+B0h] [bp-4h]@1

  v2 = this;
  pkParent = this;
  spNode.m_pObject = 0;
  v65 = 0;
  pTexturePalette = ::pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v3 = Folder::Merge(&Folder::m_acMenu, "Game\\PartyScoreWin.nif");
  PgUtil::LoadNodeNifFile(v3, &spNode, pTexturePalette);
  if ( !spNode.m_pObject )
    return 0;
  v4 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v4, 0, pkFrameWork, "PartyScoreWin", 0) )
  {
LABEL_34:
    v30 = spNode.m_pObject;
    v65 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v30 )
      v30->vfptr->__vecDelDtor((NiRefObject *)v30, 1u);
    return 0;
  }
  v5 = uiLeft;
  iOffY = uiTop;
  pkWinSpr = (PgWinSpr *)uiLeft;
  UIUtil::UIUtil(&ui);
  LOBYTE(v65) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, v5, iOffY);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v6 = MenuTexMgr::GetTexture(0x13u);
  if ( v6 )
    v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v6);
  else
    v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v5, uiTop - iOffY, v7, (PgWin *)&v2->vfptr, 0, 0);
  j = (int)MenuTexMgr::GetTexture(0x1Du);
  UIUtil::CreateSpr(&ui, "Panel01", 0);
  UIUtil::CreateSpr(&ui, "Panel02", 0);
  UIUtil::CreateSpr(&ui, "Panel03", 0);
  v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v9 = v8->m_uiWidth;
  pTexturePalette = (NiTexturePalette *)v8->m_uiHeight;
  i = v9;
  v10 = Font::Get(MAIN_MENU);
  v11 = PgWinText::CreateWin(
          uiLeft - v5,
          uiTop - iOffY,
          i,
          (unsigned int)pTexturePalette,
          v10,
          (PgWin *)&v2->vfptr,
          0,
          0);
  v11->vfptr[117].__vecDelDtor((NiRefObject *)v11, (unsigned int)&Color::m_kDxWinTitleColor);
  v11->vfptr[122].__vecDelDtor((NiRefObject *)v11, 5u);
  v12 = v11->vfptr;
  v13 = TextData3::Get(0x7F6231C4u);
  v12[118].__vecDelDtor((NiRefObject *)v11, (unsigned int)v13);
  v11->vfptr[60].__vecDelDtor((NiRefObject *)v11, 0);
  v11->vfptr[64].__vecDelDtor((NiRefObject *)v11, 1u);
  UIUtil::CreateBtn(&ui, 0x12u, "ClsNor", "ClsClick", "ClsOver", 0, 0);
  UIUtil::CreateBtn(&ui, 0x11u, "HelpLinkNor", "HelpLinkClick", "HelpLinkOver", 0, 0);
  kCreateInfo.m_arrItem._Myfirst = 0;
  kCreateInfo.m_arrItem._Mylast = 0;
  kCreateInfo.m_arrItem._Myend = 0;
  kCreateInfo.m_bMakeData = 0;
  kCreateInfo.m_nOffX = 0;
  kCreateInfo.m_nOffY = 0;
  LOBYTE(v65) = 2;
  v14 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
  v14->nItemType = 1;
  v14->pNode = spNode.m_pObject;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarNor", 0xCu);
  v15 = &v14->vecNodeName;
  LOBYTE(v65) = 3;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v15,
    &_Val);
  LOBYTE(v65) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarClick", 0xEu);
  LOBYTE(v65) = 4;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v15,
    &_Val);
  LOBYTE(v65) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarOver", 0xDu);
  LOBYTE(v65) = 5;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v15,
    &_Val);
  LOBYTE(v65) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v16 = 0;
  do
  {
    v17 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    v17->nItemType = 2;
    pTexturePalette = (NiTexturePalette *)((char *)v16 + 1);
    v18 = fs("Column%.2d", (char *)&v16->vfptr + 1);
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, v18, strlen(v18));
    LOBYTE(v65) = 6;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      &v17->vecNodeName,
      &_Val);
    LOBYTE(v65) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    v16 = pTexturePalette;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    v17->pNode = spNode.m_pObject;
    v17->bAbbreviatable = 1;
  }
  while ( (signed int)v16 < 6 );
  SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
  v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SubText01", &uiLeft, &uiTop, (NiSourceTexture *)j);
  v20 = SlideListWin::CreateWin(
          uiLeft - (_DWORD)pkWinSpr,
          uiTop - iOffY,
          v19,
          (PgWin *)&pkParent->vfptr,
          &kCreateInfo,
          0,
          0);
  pkParent->m_pkListWin = v20;
  SlideListWin::UpdateViewList(v20);
  v21 = 1;
  do
  {
    v22 = fs("Party%.2dNor", v21);
    pkWinSpr = UIUtil::CreateSpr(&ui, v22, 0);
    if ( !pkWinSpr )
    {
      LOBYTE(v65) = 1;
      if ( kCreateInfo.m_arrItem._Myfirst )
      {
        std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(
          kCreateInfo.m_arrItem._Myfirst,
          kCreateInfo.m_arrItem._Mylast);
        operator delete(kCreateInfo.m_arrItem._Myfirst);
      }
      kCreateInfo.m_arrItem._Myfirst = 0;
      kCreateInfo.m_arrItem._Mylast = 0;
      kCreateInfo.m_arrItem._Myend = 0;
      LOBYTE(v65) = 0;
      UIUtil::~UIUtil(&ui);
      goto LABEL_34;
    }
    *(_QWORD *)&v23.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v23.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v24 = (char *)TextData2::Get(0x5F5D33Eu);
    v25 = fs(v24, v21);
    UIUtil::CreateAttachedText((PgWin *)&pkWinSpr->vfptr, v25, v23, 5u);
    ++v21;
  }
  while ( v21 - 1 < 4 );
  i = 0;
  v26 = (int)pkParent->m_spEntry;
  do
  {
    j = 0;
    iOffY = v26;
    do
    {
      v27 = (NiTexturePalette *)EntryIconWin::CreateWin(
                                  (NiAVObject *)&spNode.m_pObject->vfptr,
                                  i,
                                  j,
                                  (PgWin *)&pkParent->vfptr,
                                  0,
                                  0);
      v28 = *(NiTexturePalette **)iOffY;
      pTexturePalette = v27;
      if ( v28 == v27 )
      {
        v29 = iOffY;
      }
      else
      {
        if ( v28 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v28->m_uiRefCount) && v28 )
            v28->vfptr->__vecDelDtor((NiRefObject *)v28, 1u);
          v27 = pTexturePalette;
        }
        v29 = iOffY;
        *(_DWORD *)iOffY = v27;
        if ( v27 )
          InterlockedIncrement((volatile LONG *)&v27->m_uiRefCount);
      }
      *(_BYTE *)(*(_DWORD *)v29 + 412) = 1;
      v32 = *(_DWORD *)v29;
      if ( v32 )
      {
        v33 = (NiRTTI *)(*(int (__thiscall **)(int))(*(_DWORD *)v32 + 4))(v32);
        if ( v33 )
        {
          while ( v33 != &PgWin::m_RTTI )
          {
            v33 = v33->m_pkBaseRTTI;
            if ( !v33 )
              goto LABEL_46;
          }
          ((void (__thiscall *)(PartyScoreWin *, int, _DWORD))pkParent->vfptr[29].__vecDelDtor)(pkParent, v32, 0);
          NiAVObject::UpdateProperties((NiAVObject *)&pkParent->vfptr);
          NiAVObject::Update((NiAVObject *)&pkParent->vfptr, 0.0, 1);
        }
      }
LABEL_46:
      iOffY += 4;
      ++j;
    }
    while ( j < 5 );
    v26 = iOffY;
    ++i;
  }
  while ( i < 4 );
  v34 = UIUtil::CreateBtn(&ui, 0xAu, "Title01Nor", "Title01Click", "Title01Over", 0, 0);
  *(_QWORD *)&v35.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v35.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v36 = (char *)TextData::Get(0x4EA49695u);
  UIUtil::CreateAttachedText((PgWin *)&v34->vfptr, v36, v35, 5u);
  v37 = UIUtil::CreateBtn(&ui, 0xBu, "Title02Nor", "Title02Click", "Title02Over", 0, 0);
  *(_QWORD *)&v38.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v38.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v39 = (char *)TextData::Get(0x4A5F8BA3u);
  UIUtil::CreateAttachedText((PgWin *)&v37->vfptr, v39, v38, 5u);
  v40 = UIUtil::CreateBtn(&ui, 0xCu, "Title03Nor", "Title03Click", "Title03Over", 0, 0);
  *(_QWORD *)&v41.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v41.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v42 = (char *)TextData3::Get(0x9390A4C8);
  UIUtil::CreateAttachedText((PgWin *)&v40->vfptr, v42, v41, 5u);
  v43 = UIUtil::CreateBtn(&ui, 0xDu, "Title04Nor", "Title04Click", "Title04Over", 0, 0);
  *(_QWORD *)&v44.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v44.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v45 = (char *)TextData3::Get(0x2E342C63u);
  UIUtil::CreateAttachedText((PgWin *)&v43->vfptr, v45, v44, 5u);
  v46 = UIUtil::CreateBtn(&ui, 0xEu, "Title05Nor", "Title05Click", "Title05Over", 0, 0);
  *(_QWORD *)&v47.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v47.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v48 = (char *)TextData3::Get(0x9E846385);
  UIUtil::CreateAttachedText((PgWin *)&v46->vfptr, v48, v47, 5u);
  v49 = UIUtil::CreateBtn(&ui, 0xFu, "Title06Nor", "Title06Click", "Title06Over", 0, 0);
  *(_QWORD *)&v50.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v50.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v51 = (char *)TextData3::Get(0xF3DFBB2D);
  UIUtil::CreateAttachedText((PgWin *)&v49->vfptr, v51, v50, 5u);
  ((void (__thiscall *)(PartyScoreWin *, unsigned int, unsigned int, _DWORD, _DWORD))pkParent->vfptr[59].__vecDelDtor)(
    pkParent,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  LOBYTE(v65) = 1;
  if ( kCreateInfo.m_arrItem._Myfirst )
  {
    std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(
      kCreateInfo.m_arrItem._Myfirst,
      kCreateInfo.m_arrItem._Mylast);
    operator delete(kCreateInfo.m_arrItem._Myfirst);
  }
  kCreateInfo.m_arrItem._Myfirst = 0;
  kCreateInfo.m_arrItem._Mylast = 0;
  kCreateInfo.m_arrItem._Myend = 0;
  LOBYTE(v65) = 0;
  UIUtil::~UIUtil(&ui);
  v52 = spNode.m_pObject;
  v65 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
  {
    if ( v52 )
      v52->vfptr->__vecDelDtor((NiRefObject *)v52, 1u);
  }
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0042FED0) --------------------------------------------------------
void __thiscall PgWin::AttachChildWin(PgWin *this, PgWin *pkChild)
{
  PgWin *v2; // esi@1
  NiRTTI *v3; // eax@2

  v2 = this;
  if ( pkChild )
  {
    v3 = (NiRTTI *)((int (__thiscall *)(_DWORD))pkChild->vfptr[1].__vecDelDtor)(pkChild);
    if ( v3 )
    {
      while ( v3 != &PgWin::m_RTTI )
      {
        v3 = v3->m_pkBaseRTTI;
        if ( !v3 )
          return;
      }
      ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v2->vfptr[29].__vecDelDtor)(v2, pkChild, 0);
      NiAVObject::UpdateProperties((NiAVObject *)&v2->vfptr);
      NiAVObject::Update((NiAVObject *)&v2->vfptr, 0.0, 1);
    }
  }
}

//----- (0042FF30) --------------------------------------------------------
PartyScoreWin *__thiscall PartyScoreWin::`scalar deleting destructor'(PartyScoreWin *this, unsigned int a2)
{
  PartyScoreWin *v2; // esi@1

  v2 = this;
  PartyScoreWin::~PartyScoreWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0042FF60) --------------------------------------------------------
RaidMemberInfo *__cdecl std::_Uninit_copy<std::_Vector_const_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo>>>,RaidMemberInfo *,std::allocator<RaidMemberInfo>>(std::_Vector_const_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo> > > _First, std::_Vector_const_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo> > > _Last, RaidMemberInfo *_Dest)
{
  RaidMemberInfo *v3; // edx@1
  RaidMemberInfo *result; // eax@1

  v3 = _First._Ptr;
  for ( result = _Dest; v3 != _Last._Ptr; ++result )
  {
    if ( result )
      qmemcpy(result, v3, sizeof(RaidMemberInfo));
    ++v3;
  }
  return result;
}

//----- (0042FFA0) --------------------------------------------------------
void __thiscall std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>(std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *this, std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *_Right)
{
  std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *v2; // esi@1
  unsigned int v3; // edi@1
  RaidMemberInfo *v4; // eax@4
  RaidMemberInfo *v5; // ecx@4
  RaidMemberInfo *v6; // ST00_4@4
  int v7; // [sp+0h] [bp-24h]@1
  std::vector<HeightMapMaker::TriangleIndex *,std::allocator<HeightMapMaker::TriangleIndex *> > *v8; // [sp+10h] [bp-14h]@1
  int *v9; // [sp+14h] [bp-10h]@1
  int v10; // [sp+20h] [bp-4h]@4

  v9 = &v7;
  v2 = this;
  v8 = (std::vector<HeightMapMaker::TriangleIndex *,std::allocator<HeightMapMaker::TriangleIndex *> > *)this;
  this->_Myfirst = 0;
  this->_Mylast = 0;
  this->_Myend = 0;
  v3 = _Right->_Mylast - _Right->_Myfirst;
  this->_Myfirst = 0;
  this->_Mylast = 0;
  this->_Myend = 0;
  if ( v3 )
  {
    if ( v3 > 0x3C3C3C3 )
      std::_Xlength_error("vector<T> too long");
    v4 = std::allocator<GuildAcademySelectWin::GuildInfo>::allocate(v3);
    v2->_Myend = &v4[v3];
    v2->_Myfirst = v4;
    v2->_Mylast = v4;
    v5 = _Right->_Mylast;
    v6 = _Right->_Myfirst;
    v10 = 0;
    v2->_Mylast = std::_Uninit_copy<std::_Vector_const_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo>>>,RaidMemberInfo *,std::allocator<RaidMemberInfo>>(
                    (std::_Vector_const_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo> > >)v6,
                    (std::_Vector_const_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo> > >)v5,
                    v4);
  }
}

//----- (00430080) --------------------------------------------------------
void __thiscall std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Val)
{
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *v2; // edi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // ecx@1
  unsigned int v4; // edx@3
  int v5; // esi@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v6; // ecx@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v7; // [sp-4h] [bp-20h]@6

  v2 = this;
  v3 = this->_Mylast;
  if ( _Val >= v3 || v2->_Myfirst > _Val )
  {
    if ( v3 == v2->_Myend )
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::_Reserve(
        v2,
        1u);
    v6 = v2->_Mylast;
    if ( v6 )
    {
      v7 = _Val;
      goto LABEL_11;
    }
  }
  else
  {
    v4 = (signed int)((char *)_Val
                    - (char *)v2->_Myfirst
                    + ((unsigned __int64)(-1840700269i64 * ((char *)_Val - (char *)v2->_Myfirst)) >> 32)) >> 4;
    v5 = v4 + (v4 >> 31);
    if ( v3 == v2->_Myend )
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::_Reserve(
        v2,
        1u);
    v6 = v2->_Mylast;
    if ( v6 )
    {
      v7 = &v2->_Myfirst[v5];
LABEL_11:
      v6->_Myres = 15;
      v6->_Mysize = 0;
      v6->_Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(v6, v7);
      goto LABEL_12;
    }
  }
LABEL_12:
  ++v2->_Mylast;
}

//----- (00430150) --------------------------------------------------------
void __thiscall Pet::Pet(Pet *this)
{
  Pet *v1; // esi@1

  v1 = this;
  Char::Char((Char *)&this->vfptr);
  v1->vfptr = (AbStateInfecteeVtbl *)Pet::`vftable'{for `AbStateInfectee'};
  v1->vfptr = (IEffectHolderVtbl *)&Pet::`vftable'{for `IEffectHolder'};
  v1->vfptr = (AttackSequenceManagerVtbl *)&Pet::`vftable'{for `AttackSequenceManager'};
  v1->m_kPetID = -1;
}
// 975C80: using guessed type struct NiActorManager *(__thiscall *Pet::`vftable'{for `AttackSequenceManager'})(Char *__hidden this);
// 975CA0: using guessed type int (__stdcall *Pet::`vftable'{for `IEffectHolder'})(int);
// 975CAC: using guessed type void (__thiscall *Pet::`vftable'{for `AbStateInfectee'}[2])(Char *this, AbStateInst *pkAbState, bool bNoVisual);

//----- (00430180) --------------------------------------------------------
void __thiscall Pet::~Pet(Pet *this)
{
  this->vfptr = (AbStateInfecteeVtbl *)Pet::`vftable'{for `AbStateInfectee'};
  this->vfptr = (IEffectHolderVtbl *)&Pet::`vftable'{for `IEffectHolder'};
  this->vfptr = (AttackSequenceManagerVtbl *)&Pet::`vftable'{for `AttackSequenceManager'};
  Char::~Char((Char *)&this->vfptr);
}
// 975C80: using guessed type struct NiActorManager *(__thiscall *Pet::`vftable'{for `AttackSequenceManager'})(Char *__hidden this);
// 975CA0: using guessed type int (__stdcall *Pet::`vftable'{for `IEffectHolder'})(int);
// 975CAC: using guessed type void (__thiscall *Pet::`vftable'{for `AbStateInfectee'}[2])(Char *this, AbStateInst *pkAbState, bool bNoVisual);

//----- (004301A0) --------------------------------------------------------
bool __thiscall Pet::InitView(Pet *this, int bEquip, unsigned int uiFrame)
{
  Pet *v3; // edi@1
  char *v4; // esi@1
  NiActorManager *v5; // eax@1
  NiActorManager *v6; // ecx@1
  NiActorManager *v7; // eax@9
  bool result; // al@10
  NiActorManager *v9; // [sp+Ch] [bp-8h]@1
  NiActorManager *v10; // [sp+10h] [bp-4h]@1

  v3 = this;
  v4 = (char *)&this->m_kActionMgr;
  *((float *)v4 + 22) = 0.0;
  *((_DWORD *)v4 + 3) = 0;
  *((float *)v4 + 23) = 0.0;
  *((_DWORD *)v4 + 1) = 0;
  *((_DWORD *)v4 + 2) = 0;
  *((_DWORD *)v4 + 4) = 0;
  *((_DWORD *)v4 + 6) = 0;
  *((_DWORD *)v4 + 21) = 0;
  *((_DWORD *)v4 + 24) = 0;
  v4[104] = 0;
  *((_DWORD *)v4 + 5) = 0;
  *((_WORD *)v4 + 38) = 0;
  v4[78] = 0;
  *(_WORD *)(v4 + 79) = 0;
  *((float *)v4 + 25) = 0.0;
  v5 = CharResMgr::GetPetActor(&g_kCharResMgr, this->m_kPetID);
  v6 = v3->m_spActor.m_pObject;
  v10 = v5;
  v9 = v6;
  if ( v6 != v5 )
  {
    if ( v6 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v9 )
        ((void (__stdcall *)(signed int))v9->vfptr->__vecDelDtor)(1);
      v5 = v10;
    }
    v3->m_spActor.m_pObject = v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  }
  v3->m_kActionMgr.m_pkActInfoSet = ActionInfoTable::GetPetActionInfo(v3->m_kPetID);
  v7 = v3->m_spActor.m_pObject;
  v3->m_kActionMgr.m_pkChar = (Char *)v3;
  if ( v7 )
  {
    v7->m_pkCallbackObject = (NiActorManager::CallbackObject *)v4;
    NiActorManager::RegisterCallback(
      v3->m_spActor.m_pObject,
      TEXT_KEY_EVENT,
      NiActorManager::ANY_SEQUENCE_ID,
      g_kTextKeyMatch);
    result = ((int (__thiscall *)(Pet *, int))v3->vfptr[18].GetAbstateColor)(v3, bEquip);
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (004302B0) --------------------------------------------------------
char __thiscall Pet::Init(Pet *this, unsigned int kPetID, unsigned __int16 kPetHandle, const char *pcName)
{
  Pet *v4; // esi@1
  AbStateInfecteeVtbl *v5; // edx@1
  int (*v6)(void); // eax@1
  char v7; // al@1
  AbStateInfecteeVtbl *v8; // edx@1
  bool (__thiscall *v9)(AbStateInfectee *, ABSTATEINDEX, float, bool); // eax@1
  void (__thiscall *v10)(AbStateInfectee *, AbStateInst *, bool); // eax@3
  PupMain *v11; // eax@5
  PupView *v12; // eax@6
  Name3 *v13; // eax@8
  MapInfo *v14; // eax@8
  Name3 result; // [sp+10h] [bp-40h]@8
  unsigned int v17; // [sp+1Ch] [bp-34h]@1
  char v18; // [sp+23h] [bp-2Dh]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > PetName; // [sp+24h] [bp-2Ch]@3
  int v20; // [sp+4Ch] [bp-4h]@3

  v4 = this;
  v5 = this->vfptr;
  v17 = kPetID;
  v6 = (int (*)(void))v5[1].AddAbStateByAbstateIndex;
  this->m_kHandle = kPetHandle;
  v7 = v6();
  v8 = v4->vfptr;
  v18 = v7;
  v9 = v8[1].AddAbStateByAbstateIndex;
  v4->m_byMode = 1;
  v4->m_eStandMode = 0;
  if ( v18 != (unsigned __int8)((int (__thiscall *)(Pet *))v9)(v4) )
    v4->m_bIsChangeCampMode = 1;
  v10 = v4->vfptr[4].Affect;
  v4->m_kPetID = v17;
  v4->m_kCharShape.m_kClassID = 0;
  v4->m_bUserCharacter = 0;
  ((void (__thiscall *)(Pet *, signed int))v10)(v4, 1);
  v4->m_bConnectServer = 1;
  PetName._Myres = 15;
  PetName._Mysize = 0;
  PetName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&PetName, pcName, strlen(pcName));
  v20 = 0;
  if ( PetName._Mysize <= 0 )
  {
    v11 = PetMainTab::GetByPetID(v17);
    if ( v11 )
    {
      v12 = PetViewTab::GetByPetIdx(v11->PupIDX);
      if ( v12 )
        ((void (__thiscall *)(Pet *, char *))v4->vfptr[2].GetAbstateColor)(v4, v12->Name);
    }
  }
  else
  {
    ((void (__thiscall *)(Pet *, const char *))v4->vfptr[2].GetAbstateColor)(v4, pcName);
  }
  v13 = World::GetMapName(&g_kWorld, &result);
  v14 = MapInfoTab::GetByMapName(v13);
  if ( v14 )
    v4->m_fMaxViewLength = (double)v14->Sight;
  if ( PetName._Myres >= 0x10 )
    operator delete(PetName._Bx._Ptr);
  return 1;
}

//----- (00430410) --------------------------------------------------------
Pet *__thiscall Pet::`vector deleting destructor'(char *this, unsigned int a2)
{
  return Pet::`vector deleting destructor'((Pet *)(this - 88), a2);
}

//----- (00430420) --------------------------------------------------------
Pet *__thiscall Pet::`vector deleting destructor'(char *this, unsigned int a2)
{
  return Pet::`vector deleting destructor'((Pet *)(this - 64), a2);
}

//----- (00430430) --------------------------------------------------------
NiPoint3 *__thiscall NiPoint3::operator/(NiPoint3 *this, NiPoint3 *result, float fScalar)
{
  NiPoint3 *v3; // eax@1
  float fInvScalar; // [sp+Ch] [bp+Ch]@1

  v3 = result;
  fInvScalar = 1.0 / fScalar;
  result->x = this->x * fInvScalar;
  result->y = this->y * fInvScalar;
  result->z = fInvScalar * this->z;
  return v3;
}

//----- (00430460) --------------------------------------------------------
double __thiscall NiPoint3::Length(NiPoint3 *this)
{
  float v1; // ST00_4@1

  v1 = this->y * this->y + this->x * this->x + this->z * this->z;
  return (float)sqrt(v1);
}

//----- (004304A0) --------------------------------------------------------
double __thiscall NiPoint3::Unitize(NiPoint3 *this)
{
  float fRecip; // ST04_4@1
  float v2; // ST04_4@1
  double result; // st7@1
  float v4; // ST04_4@2

  fRecip = this->y * this->y + this->x * this->x + this->z * this->z;
  v2 = sqrt(fRecip);
  result = v2;
  if ( v2 <= 0.000001 )
  {
    this->x = 0.0;
    this->y = 0.0;
    this->z = 0.0;
    result = (float)0.0;
  }
  else
  {
    v4 = 1.0 / result;
    this->x = this->x * v4;
    this->y = v4 * this->y;
    this->z = v4 * this->z;
  }
  return result;
}

//----- (00430530) --------------------------------------------------------
NiPoint3 *__thiscall NiPoint3::UnitCross(NiPoint3 *this, NiPoint3 *result, NiPoint3 *pt)
{
  NiPoint3 *v3; // eax@1
  float cross; // [sp+0h] [bp-Ch]@1
  float cross_4; // [sp+4h] [bp-8h]@1
  float cross_8; // [sp+8h] [bp-4h]@1
  float fLengtha; // [sp+18h] [bp+Ch]@1
  float fLength; // [sp+18h] [bp+Ch]@1
  float fLengthb; // [sp+18h] [bp+Ch]@2

  cross = pt->z * this->y - pt->y * this->z;
  cross_4 = this->z * pt->x - this->x * pt->z;
  cross_8 = pt->y * this->x - pt->x * this->y;
  fLengtha = cross_4 * cross_4 + cross * cross + cross_8 * cross_8;
  fLength = sqrt(fLengtha);
  v3 = result;
  if ( fLength <= 0.000001 )
  {
    result->x = 0.0;
    result->y = 0.0;
    result->z = 0.0;
  }
  else
  {
    fLengthb = 1.0 / fLength;
    result->x = fLengthb * cross;
    result->y = fLengthb * cross_4;
    result->z = fLengthb * cross_8;
  }
  return v3;
}

//----- (004305F0) --------------------------------------------------------
BOOL __thiscall Name3::operator==(Name3 *this, Name3 *nm)
{
  return this->n3_code[0] == nm->n3_code[0] && this->n3_code[1] == nm->n3_code[1] && this->n3_code[2] == nm->n3_code[2];
}

//----- (00430620) --------------------------------------------------------
char __cdecl Math3D::VectToZRot(NiPoint3 *kTargetVect, NiMatrix3 *kRot)
{
  float v2; // edx@1
  float v3; // eax@1
  char v4; // al@2
  NiPoint3 *v5; // eax@3
  float v6; // ecx@3
  float v7; // edx@3
  NiPoint3 *v8; // eax@3
  float v9; // ecx@3
  float v10; // edx@3
  NiPoint3 result; // [sp+0h] [bp-24h]@3
  NiPoint3 kYVect; // [sp+Ch] [bp-18h]@3
  NiPoint3 kXVect; // [sp+18h] [bp-Ch]@1
  NiPoint3 *kTargetVecta; // [sp+2Ch] [bp+8h]@1
  NiPoint3 *kTargetVectb; // [sp+2Ch] [bp+8h]@1

  v2 = kTargetVect->y;
  v3 = kTargetVect->z;
  kXVect.x = kTargetVect->x;
  kXVect.z = 0.0;
  kXVect.y = v2;
  NiPoint3::Unitize(&kXVect);
  *(float *)&kTargetVecta = World::ms_kUpDir.x * kXVect.x
                          + World::ms_kUpDir.y * kXVect.y
                          + World::ms_kUpDir.z * kXVect.z;
  *(float *)&kTargetVectb = fabs(*(float *)&kTargetVecta);
  if ( 1.0 - *(float *)&kTargetVectb >= 0.0000009999999974752427 )
  {
    v5 = NiPoint3::UnitCross(&kXVect, &kYVect, &World::ms_kUpDir);
    v6 = v5->y;
    kXVect.x = v5->x;
    v7 = v5->z;
    kXVect.y = v6;
    kXVect.z = v7;
    v8 = NiPoint3::UnitCross(&World::ms_kUpDir, &result, &kXVect);
    v9 = v8->y;
    kYVect.x = v8->x;
    v10 = v8->z;
    kRot->m_pEntry[0][0] = kXVect.x;
    kYVect.y = v9;
    kYVect.z = v10;
    kRot->m_pEntry[1][0] = kXVect.y;
    kRot->m_pEntry[2][0] = kXVect.z;
    kRot->m_pEntry[0][1] = kYVect.x;
    kRot->m_pEntry[1][1] = kYVect.y;
    kRot->m_pEntry[2][1] = kYVect.z;
    kRot->m_pEntry[0][2] = World::ms_kUpDir.x;
    kRot->m_pEntry[1][2] = World::ms_kUpDir.y;
    kRot->m_pEntry[2][2] = World::ms_kUpDir.z;
    v4 = 1;
  }
  else
  {
    v4 = 0;
  }
  return v4;
}

//----- (00430720) --------------------------------------------------------
void __thiscall ActionMgr::SetCurPlayActInfo(ActionMgr *this, ActionInfo *pkActionInfo)
{
  unsigned int v2; // edx@2

  this->m_pkCurPlayActInfo = pkActionInfo;
  if ( pkActionInfo )
  {
    v2 = pkActionInfo->uiEventCode;
    this->m_uiCurEventCode = v2;
    if ( 10000 * (v2 / 0x2710) == 300000 )
      this->m_pkLastAttackActInfo = pkActionInfo;
  }
}

//----- (00430760) --------------------------------------------------------
char __thiscall ActionMgr::GetEventCode(ActionMgr *this, const char *_szActionName, unsigned int *OUT_uiEventCode)
{
  ActionInfoSet *v3; // ecx@1
  ActionInfo *v4; // eax@2
  char result; // al@3

  v3 = this->m_pkActInfoSet;
  if ( v3 && (v4 = ActionInfoSet::GetByInxName(v3, _szActionName)) != 0 )
  {
    *OUT_uiEventCode = v4->uiEventCode;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00430790) --------------------------------------------------------
int __thiscall Char::GetPrevHP(Char *this)
{
  return this->m_iPrevHP;
}

//----- (004307A0) --------------------------------------------------------
void __thiscall Char::SetPrevHP(Char *this, int iHP)
{
  this->m_iPrevHP = iHP;
}

//----- (004307B0) --------------------------------------------------------
void __thiscall Char::SetMode(Char *this, char byMode)
{
  Char *v2; // esi@1
  char v3; // bl@1

  v2 = this;
  v3 = ((int (*)(void))this->vfptr[1].AddAbStateByAbstateIndex)();
  v2->m_byMode = byMode;
  switch ( byMode )
  {
    case 2:
      v2->m_eStandMode = 1;
      break;
    case 3:
      Char::OnDead(v2);
      goto $LN2_18;
    default:
$LN2_18:
      v2->m_eStandMode = 0;
      break;
  }
  if ( v3 != (unsigned __int8)((int (__thiscall *)(Char *))v2->vfptr[1].AddAbStateByAbstateIndex)(v2) )
    v2->m_bIsChangeCampMode = 1;
}

//----- (00430830) --------------------------------------------------------
bool __thiscall Char::IsAlive(Char *this)
{
  return this->m_byMode != 3;
}

//----- (00430840) --------------------------------------------------------
char *__thiscall Char::GetName(Char *this)
{
  return this->m_acName;
}

//----- (00430850) --------------------------------------------------------
void __thiscall Char::SetName(Char *this, char *pcName)
{
  char *v2; // eax@1
  signed int v3; // edx@1
  char v4; // cl@2

  v2 = pcName;
  v3 = this->m_acName - pcName;
  do
  {
    v4 = *v2;
    v2[v3] = *v2;
    ++v2;
  }
  while ( v4 );
}

//----- (00430870) --------------------------------------------------------
int __thiscall Char::GetHP(Char *this)
{
  return this->m_iHP;
}

//----- (00430880) --------------------------------------------------------
int __thiscall Char::GetMaxHP(Char *this)
{
  return this->m_iMaxHP;
}

//----- (00430890) --------------------------------------------------------
int __thiscall Char::GetSP(Char *this)
{
  return this->m_iSP;
}

//----- (004308A0) --------------------------------------------------------
int __thiscall Char::GetMaxSP(Char *this)
{
  return this->m_iMaxSP;
}

//----- (004308B0) --------------------------------------------------------
int __thiscall Char::GetAP(Char *this)
{
  return this->m_iAP;
}

//----- (004308C0) --------------------------------------------------------
int __thiscall Char::GetMaxAP(Char *this)
{
  return this->m_iMaxAP;
}

//----- (004308D0) --------------------------------------------------------
int __thiscall Char::GetMaxLP(Char *this)
{
  return this->m_iMaxLP;
}

//----- (004308E0) --------------------------------------------------------
void __thiscall Char::SetMaxHP(Char *this, int iHP)
{
  this->m_iMaxHP = iHP;
}

//----- (004308F0) --------------------------------------------------------
void __thiscall Char::SetSP(Char *this, int iSP)
{
  this->m_iSP = iSP;
}

//----- (00430900) --------------------------------------------------------
void __thiscall Char::SetMaxSP(Char *this, int iSP)
{
  this->m_iMaxSP = iSP;
}

//----- (00430910) --------------------------------------------------------
void __thiscall Char::SetAP(Char *this, int iAP)
{
  this->m_iAP = iAP;
}

//----- (00430920) --------------------------------------------------------
void __thiscall Char::SetMaxAP(Char *this, int iAP)
{
  this->m_iMaxAP = iAP;
}

//----- (00430930) --------------------------------------------------------
void __thiscall ArrowEff::SetHitDamage(Char *this, int iLP)
{
  this->m_iLP = iLP;
}

//----- (00430940) --------------------------------------------------------
void __thiscall Char::SetMaxLP(Char *this, int iLP)
{
  this->m_iMaxLP = iLP;
}

//----- (00430950) --------------------------------------------------------
int __thiscall Char::GetTOTHP(Char *this)
{
  return this->m_iTOTHP;
}

//----- (00430960) --------------------------------------------------------
int __thiscall Char::GetMaxTOTHP(Char *this)
{
  return this->m_iMaxTOTHP;
}

//----- (00430970) --------------------------------------------------------
void __thiscall Char::SetTOTHP(Char *this, int iHP)
{
  this->m_iTOTHP = iHP;
}

//----- (00430980) --------------------------------------------------------
void __thiscall Char::SetMaxTOTHP(Char *this, int iHP)
{
  this->m_iMaxTOTHP = iHP;
}

//----- (00430990) --------------------------------------------------------
void __thiscall Char::SetPos(Char *this, NiPoint3 *kPos)
{
  Char *v2; // esi@1

  v2 = this;
  this->m_kMoveToTarget.vfptr->SetCurrentPos((NpNs_MoveToTarget *)&this->m_kMoveToTarget, kPos);
  v2->m_pos3CameraPos = *kPos;
}

//----- (004309D0) --------------------------------------------------------
NiPoint3 *__thiscall Char::GetCameraPos(Char *this)
{
  return &this->m_pos3CameraPos;
}

//----- (004309E0) --------------------------------------------------------
void __thiscall Char::GetDir(Char *this, NiPoint3 *kDir)
{
  NpNs_SmoothRotateControler::GetDirection(&this->m_kSmoothRotater, kDir);
}

//----- (004309F0) --------------------------------------------------------
Wml::Vector3<double> *__thiscall Char::GetDir(Char *this)
{
  return Wml::Segment3<double>::Direction((Wml::Segment3<double> *)&this->m_kSmoothRotater);
}

//----- (00430A00) --------------------------------------------------------
Char::MoveMode __thiscall Char::GetMoveMode(Char *this)
{
  return this->m_eMoveMode;
}

//----- (00430A10) --------------------------------------------------------
void __thiscall Char::SetMoveMode(Char *this, Char::MoveMode eMoveMode)
{
  this->m_eMoveMode = eMoveMode;
}

//----- (00430A20) --------------------------------------------------------
int __thiscall Char::IsDuringMove(Char *this)
{
  return (*(int (__thiscall **)(_DWORD))&this->m_kMoveToTarget.vfptr->gap4[0])(&this->m_kMoveToTarget);
}

//----- (00430A40) --------------------------------------------------------
bool __thiscall Char::IsDuringRotate(Char *this)
{
  return this->m_kSmoothRotater.m_bRotate;
}

//----- (00430A50) --------------------------------------------------------
void __thiscall Char::SetWalkSpeed(Char *this, float fSpeed)
{
  Char *v2; // esi@1
  AbStateInfecteeVtbl *v3; // eax@1

  v2 = this;
  v3 = this->vfptr;
  this->m_fWalkSpeed = fSpeed;
  ((void (*)(void))v3[8].IsVisible)();
  MoveToTarget::ChangeSpeed(&v2->m_kMoveToTarget, fSpeed);
}

//----- (00430A80) --------------------------------------------------------
void __thiscall Char::SetRunSpeed(Char *this, float fSpeed)
{
  Char *v2; // esi@1
  AbStateInfecteeVtbl *v3; // eax@1

  v2 = this;
  v3 = this->vfptr;
  this->m_fRunSpeed = fSpeed;
  ((void (*)(void))v3[8].AddAbStateByAbstateIndex)();
  MoveToTarget::ChangeSpeed(&v2->m_kMoveToTarget, fSpeed);
}

//----- (00430AB0) --------------------------------------------------------
double __thiscall Char::GetWalkSpeed(Char *this)
{
  return (float)(this->m_fMoveSpeedRate * this->m_fWalkSpeed);
}

//----- (00430AD0) --------------------------------------------------------
double __thiscall Char::GetRunSpeed(Char *this)
{
  return (float)(this->m_fMoveSpeedRate * this->m_fRunSpeed);
}

//----- (00430AF0) --------------------------------------------------------
void __userpurge Char::SetMoveSpeedRate(Char *this@<ecx>, double a2@<st0>, float fMoveSpeedRate)
{
  Char *v3; // esi@1
  float fOldRunSpeed; // ST10_4@2
  AbStateInfectee::AbstateColor (__thiscall *v5)(AbStateInfectee *); // edx@1
  AbStateInfecteeVtbl *v6; // eax@2
  void (__thiscall *v7)(Char *); // edx@3
  float fOldSpeed; // [sp+14h] [bp-4h]@1

  v3 = this;
  this->m_kMoveToTarget.vfptr->GetSpeed((NpNs_MoveToTarget *)&this->m_kMoveToTarget);
  fOldSpeed = a2;
  ((void (__thiscall *)(Char *))v3->vfptr[8].AddAbStateByAbstateIndex)(v3);
  v5 = v3->vfptr[7].GetAbstateColor;
  v3->m_fMoveSpeedRate = fMoveSpeedRate;
  if ( (unsigned __int8)((int (__thiscall *)(Char *))v5)(v3) )
  {
    v6 = v3->vfptr;
    fOldRunSpeed = a2;
    if ( fOldRunSpeed == fOldSpeed )
      v7 = (void (__thiscall *)(Char *))v6[8].AddAbStateByAbstateIndex;
    else
      v7 = (void (__thiscall *)(Char *))v6[8].IsVisible;
    v7(v3);
    MoveToTarget::ChangeSpeed(&v3->m_kMoveToTarget, fOldSpeed);
  }
  ((void (__thiscall *)(_DWORD, _DWORD))v3->vfptr[12].Deaffect)(v3, v3->m_fMoveSpeedRate);
  ((void (__thiscall *)(_DWORD, _DWORD))v3->vfptr[12].Affect)(v3, v3->m_fMoveSpeedRate);
}

//----- (00430BA0) --------------------------------------------------------
double __thiscall Char::GetMoveSpeedRate(Char *this)
{
  return this->m_fMoveSpeedRate;
}

//----- (00430BB0) --------------------------------------------------------
void __thiscall Char::ActRideMove(Char *this)
{
  Char *v1; // esi@1
  ActionInfoSet *v2; // ecx@1
  ActionInfo *v3; // eax@2
  unsigned int uiActRide; // [sp+4h] [bp-4h]@0

  v1 = this;
  v2 = this->m_kActionMgr.m_pkActInfoSet;
  if ( v2 && (v3 = ActionInfoSet::GetByInxName(v2, "Emotion_ActRide")) != 0 )
    Char::ActNonWeightAction(v1, v3->uiEventCode);
  else
    Char::ActNonWeightAction(v1, uiActRide);
}

//----- (00430BF0) --------------------------------------------------------
void __thiscall Char::ActRideStand(Char *this)
{
  Char *v1; // esi@1
  ActionInfoSet *v2; // ecx@1
  ActionInfo *v3; // eax@2
  unsigned int uiActPetSit; // [sp+4h] [bp-4h]@0

  v1 = this;
  v2 = this->m_kActionMgr.m_pkActInfoSet;
  if ( v2 && (v3 = ActionInfoSet::GetByInxName(v2, "Emotion_ActPetSit")) != 0 )
    Char::ActNonWeightAction(v1, v3->uiEventCode);
  else
    Char::ActNonWeightAction(v1, uiActPetSit);
}

//----- (00430C30) --------------------------------------------------------
void __thiscall Char::SetReservedHitDamage(Char *this, unsigned int uiDamage)
{
  this->m_uiHitDamage = uiDamage;
}

//----- (00430C40) --------------------------------------------------------
unsigned int __thiscall Char::GetReservedHitDamage(Char *this)
{
  return this->m_uiHitDamage;
}

//----- (00430C50) --------------------------------------------------------
bool __thiscall Char::IsChangeCampMode(Char *this)
{
  return this->m_bIsChangeCampMode;
}

//----- (00430C60) --------------------------------------------------------
bool __thiscall Char::IsCampMode(Char *this)
{
  char v1; // al@1
  bool result; // al@2

  v1 = this->m_byMode;
  if ( v1 == 4 )
    result = 1;
  else
    result = v1 == 5;
  return result;
}

//----- (00430C80) --------------------------------------------------------
bool __thiscall Char::IsIndividualStorageMode(Char *this)
{
  return this->m_byMode == 5;
}

//----- (00430C90) --------------------------------------------------------
void __thiscall Char::ChangeCampMode(Char *this, bool bCampMode, char byMode)
{
  Char *v3; // esi@1
  AbStateInfectee::AbstateColor (__thiscall *v4)(AbStateInfectee *); // eax@2
  void (__thiscall *v5)(AbStateInfectee *); // eax@3

  v3 = this;
  if ( bCampMode )
  {
    Char::SetMode(this, byMode);
    v4 = v3->vfptr[1].GetAbstateColor;
    v3->m_bIsChangeCampMode = 1;
    ((void (__thiscall *)(_DWORD, _DWORD))v4)(v3, 0);
  }
  else
  {
    Char::SetMode(this, 1);
    v5 = v3->vfptr[1].~AbStateInfectee;
    v3->m_bIsChangeCampMode = 1;
    ((void (__thiscall *)(_DWORD, _DWORD))v5)(v3, 0);
  }
}

//----- (00430CE0) --------------------------------------------------------
int __thiscall Char::GetCharLevel(Char *this)
{
  return this->m_iCharLevel;
}

//----- (00430CF0) --------------------------------------------------------
Pet *__thiscall Pet::`vector deleting destructor'(Pet *this, unsigned int a2)
{
  Pet *v2; // esi@1

  v2 = this;
  this->vfptr = (AbStateInfecteeVtbl *)Pet::`vftable'{for `AbStateInfectee'};
  this->vfptr = (IEffectHolderVtbl *)&Pet::`vftable'{for `IEffectHolder'};
  this->vfptr = (AttackSequenceManagerVtbl *)&Pet::`vftable'{for `AttackSequenceManager'};
  Char::~Char((Char *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 975C80: using guessed type struct NiActorManager *(__thiscall *Pet::`vftable'{for `AttackSequenceManager'})(Char *__hidden this);
// 975CA0: using guessed type int (__stdcall *Pet::`vftable'{for `IEffectHolder'})(int);
// 975CAC: using guessed type void (__thiscall *Pet::`vftable'{for `AbStateInfectee'}[2])(Char *this, AbStateInst *pkAbState, bool bNoVisual);

//----- (00430D30) --------------------------------------------------------
unsigned int __cdecl ITableBase<MapInfo,MapInfoTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<MapInfo,MapInfoTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A89D38: using guessed type int ITableBase<MapInfo,MapInfoTab>::ms_pkTable;

//----- (00430D50) --------------------------------------------------------
void __thiscall Char::InitPos(Char *this, NiPoint3 *kPos, NiPoint3 *kDir)
{
  Char *v3; // esi@1
  float v4; // edx@1
  float v5; // eax@1
  NiPoint3 *v6; // eax@1
  NiMatrix3 kRot; // [sp+8h] [bp-30h]@1
  NiPoint3 kTargetDir; // [sp+2Ch] [bp-Ch]@1

  v3 = this;
  ((void (__stdcall *)(_DWORD))this->vfptr[5].~AbStateInfectee)(kPos);
  v3->m_spScene.m_pObject->m_kLocal.m_Translate = *kPos;
  ((void (__thiscall *)(_DWORD, _DWORD))v3->vfptr[6].Affect)(v3, kDir);
  v4 = kDir->y;
  v5 = kDir->z;
  kTargetDir.x = kDir->x;
  kTargetDir.y = v4;
  kTargetDir.z = v5;
  NpNs_SmoothRotateControler::GetTargetDirection(&v3->m_kSmoothRotater, &kTargetDir);
  v6 = (NiPoint3 *)Wml::Segment3<double>::Direction((Wml::Segment3<double> *)&v3->m_kSmoothRotater);
  Math3D::VectToZRot(v6, &kRot);
  qmemcpy(&v3->m_spScene.m_pObject->m_kLocal, &kRot, 0x24u);
}

//----- (00430DF0) --------------------------------------------------------
void __thiscall Char::GetPos(Char *this, NiPoint3 *kPos)
{
  NiNode *v2; // eax@1

  v2 = this->m_spScene.m_pObject;
  if ( v2 )
  {
    kPos->x = v2->m_kLocal.m_Translate.x;
    kPos->y = v2->m_kLocal.m_Translate.y;
    kPos->z = v2->m_kLocal.m_Translate.z;
  }
  else
  {
    this->m_kMoveToTarget.vfptr->GetCurrentPos((NpNs_MoveToTarget *)&this->m_kMoveToTarget, kPos);
  }
}

//----- (00430E30) --------------------------------------------------------
void __thiscall Char::GetDir(Char *this, NiMatrix3 *kMat)
{
  qmemcpy(kMat, &this->m_spScene.m_pObject->m_kLocal, sizeof(NiMatrix3));
}

//----- (00430E50) --------------------------------------------------------
BOOL __thiscall Char::IsRiding(Char *this)
{
  return this->m_kRidePetCtl.m_spPetActor.m_pObject || this->m_pkMover;
}

//----- (00430E70) --------------------------------------------------------
void __thiscall Char::SetScale(Char *this, float fScale)
{
  NiNode *v2; // eax@1
  float fScalea; // [sp+8h] [bp+8h]@2

  v2 = this->m_spScene.m_pObject;
  if ( v2 )
  {
    fScalea = fabs(fScale);
    v2->m_kLocal.m_fScale = fScalea;
  }
}

//----- (00430E90) --------------------------------------------------------
PupMain *__cdecl PetMainTab::GetByPetID(unsigned int kPetID)
{
  int v1; // eax@1
  unsigned int v2; // edi@2
  unsigned int v3; // esi@4
  PupMain *result; // eax@5

  v1 = *(_DWORD *)(ITableBase<PupMain,PetMainTab>::ms_pkTable + 56);
  if ( v1 )
    v2 = *(_DWORD *)(v1 + 40);
  else
    v2 = 0;
  v3 = 0;
  if ( v2 )
  {
    while ( 1 )
    {
      result = (PupMain *)CDataReader::GetRecord((CDataReader *)(ITableBase<PupMain,PetMainTab>::ms_pkTable + 4), v3);
      if ( result )
      {
        if ( result->PupID == kPetID )
          break;
      }
      if ( ++v3 >= v2 )
        goto LABEL_8;
    }
  }
  else
  {
LABEL_8:
    result = 0;
  }
  return result;
}
// A89D30: using guessed type int ITableBase<PupMain,PetMainTab>::ms_pkTable;

//----- (00430EE0) --------------------------------------------------------
MapInfo *__cdecl MapInfoTab::GetByMapName(Name3 *kMapName)
{
  unsigned int v1; // edi@1
  char *v2; // eax@2
  MapInfo *result; // eax@6

  v1 = 0;
  if ( ITableBase<MapInfo,MapInfoTab>::GetTotal() )
  {
    while ( 1 )
    {
      v2 = CDataReader::GetRecord((CDataReader *)(ITableBase<MapInfo,MapInfoTab>::ms_pkTable + 4), v1);
      if ( *(_DWORD *)(v2 + 2) == kMapName->n3_code[0]
        && *(_DWORD *)(v2 + 6) == kMapName->n3_code[1]
        && *(_DWORD *)(v2 + 10) == kMapName->n3_code[2] )
      {
        break;
      }
      if ( ++v1 >= ITableBase<MapInfo,MapInfoTab>::GetTotal() )
        goto LABEL_6;
    }
    result = (MapInfo *)CDataReader::GetRecord((CDataReader *)(ITableBase<MapInfo,MapInfoTab>::ms_pkTable + 4), v1);
  }
  else
  {
LABEL_6:
    result = 0;
  }
  return result;
}
// A89D38: using guessed type int ITableBase<MapInfo,MapInfoTab>::ms_pkTable;

//----- (00430F40) --------------------------------------------------------
PupView *__cdecl PetViewTab::GetByPetIdx(const char *pcPetIdx)
{
  int v1; // eax@1
  unsigned int v2; // edi@1
  char *v3; // eax@5
  unsigned int v4; // eax@6
  unsigned int v5; // ebx@6
  unsigned int v6; // esi@6
  unsigned int v7; // ecx@6
  unsigned int v8; // edi@8
  const char *v9; // eax@8
  int v10; // eax@10
  bool v11; // zf@10
  signed int v12; // eax@12
  bool v13; // bl@15
  PupView *pkPetView; // [sp+10h] [bp-3Ch]@5
  unsigned int i; // [sp+18h] [bp-34h]@4
  unsigned int v17; // [sp+1Ch] [bp-30h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v18; // [sp+20h] [bp-2Ch]@6
  int v19; // [sp+48h] [bp-4h]@15

  v1 = *(_DWORD *)(ITableBase<PupView,PetViewTab>::ms_pkTable + 56);
  v2 = 0;
  if ( v1 )
    v17 = *(_DWORD *)(v1 + 40);
  else
    v17 = 0;
  i = 0;
  if ( v17 <= 0 )
    return 0;
  while ( 1 )
  {
    v3 = CDataReader::GetRecord((CDataReader *)(ITableBase<PupView,PetViewTab>::ms_pkTable + 4), v2);
    pkPetView = (PupView *)v3;
    if ( v3 )
      break;
LABEL_19:
    i = ++v2;
    if ( v2 >= v17 )
      return 0;
  }
  v18._Myres = 15;
  v18._Mysize = 0;
  v18._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v18, v3, strlen(v3));
  v4 = strlen(pcPetIdx);
  v5 = v18._Mysize;
  v6 = v4;
  v7 = v18._Mysize;
  if ( v18._Mysize >= v4 )
    v7 = v4;
  v8 = v18._Myres;
  v9 = v18._Bx._Ptr;
  if ( v18._Myres < 0x10 )
    v9 = (const char *)&v18;
  v10 = std::char_traits<char>::compare(v9, pcPetIdx, v7);
  v11 = v10 == 0;
  if ( !v10 )
  {
    if ( v5 >= v6 )
      v12 = v5 != v6;
    else
      v12 = -1;
    v11 = v12 == 0;
  }
  v13 = v11;
  v19 = -1;
  if ( v8 >= 0x10 )
    operator delete(v18._Bx._Ptr);
  v18._Myres = 15;
  v18._Mysize = 0;
  v18._Bx._Buf[0] = 0;
  if ( !v13 )
  {
    v2 = i;
    goto LABEL_19;
  }
  return pkPetView;
}
// A89D34: using guessed type int ITableBase<PupView,PetViewTab>::ms_pkTable;

//----- (00431090) --------------------------------------------------------
void __thiscall PetNameEditWin::PetNameEditWin(PetNameEditWin *this)
{
  PetNameEditWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_pkOkBtn = 0;
  v1->m_pkNameEdit = 0;
  v1->m_kPetHandle = -1;
  v1->vfptr = (NiRefObjectVtbl *)&PetNameEditWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&PetNameEditWin::`vftable'{for `IDirectMessenger'};
}
// 976014: using guessed type void (__thiscall *PetNameEditWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 976034: using guessed type int (__thiscall *PetNameEditWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004310D0) --------------------------------------------------------
void __thiscall PetNameEditWin::~PetNameEditWin(PetNameEditWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&PetNameEditWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PetNameEditWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 976014: using guessed type void (__thiscall *PetNameEditWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 976034: using guessed type int (__thiscall *PetNameEditWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004310F0) --------------------------------------------------------
void __thiscall PetNameEditWin::UpdateMeWin(PetNameEditWin *this, float fCurTime)
{
  PetNameEditWin *v2; // esi@1
  unsigned int v3; // kr00_4@3

  v2 = this;
  if ( this->m_pkOkBtn )
  {
    if ( this->m_pkNameEdit )
    {
      v3 = strlen((const char *)((int (*)(void))this->m_pkNameEdit->vfptr[113].__vecDelDtor)());
      ((void (__stdcall *)(_DWORD))v2->m_pkOkBtn->vfptr[60].__vecDelDtor)(v3 >= 4);
    }
  }
}

//----- (00431140) --------------------------------------------------------
void __thiscall PetNameEditWin::OnShowWin(PetNameEditWin *this)
{
  PetNameEditWin *v1; // esi@1

  v1 = this;
  if ( this->m_pkNameEdit )
  {
    ((void (__stdcall *)(_DWORD))this->m_pkNameEdit->vfptr[115].__vecDelDtor)(&unk_975FA7);
    ((void (*)(void))v1->m_pkNameEdit->vfptr[120].__vecDelDtor)();
  }
}

//----- (00431180) --------------------------------------------------------
void __thiscall PetNameEditWin::OnClose(PetNameEditWin *this)
{
  PetNameEditWin *v1; // esi@1

  v1 = this;
  if ( this->m_pkNameEdit )
    ((void (__stdcall *)(_DWORD))this->m_pkNameEdit->vfptr[121].__vecDelDtor)(1);
  PgWin::OnClose((PgWin *)&v1->vfptr);
}

//----- (004311B0) --------------------------------------------------------
void __thiscall PetNameEditWin::SetName(PetNameEditWin *this, const char *pcName)
{
  PetNameEditWin *v2; // esi@1

  v2 = this;
  if ( this->m_pkNameEdit )
  {
    ((void (__stdcall *)(_DWORD))this->m_pkNameEdit->vfptr[116].__vecDelDtor)(pcName);
    ((void (*)(void))v2->m_pkNameEdit->vfptr[120].__vecDelDtor)();
  }
}

//----- (004311F0) --------------------------------------------------------
const char *__thiscall PetNameEditWin::GetName(PetNameEditWin *this)
{
  const char *result; // eax@2

  if ( this->m_pkNameEdit )
    result = (const char *)((int (*)(void))this->m_pkNameEdit->vfptr[113].__vecDelDtor)();
  else
    result = 0;
  return result;
}

//----- (00431210) --------------------------------------------------------
void __thiscall PetNameEditWin::SetPetHandle(PetNameEditWin *this, unsigned __int16 kPetHandle)
{
  this->m_kPetHandle = kPetHandle;
}

//----- (00431230) --------------------------------------------------------
unsigned __int16 __thiscall PetNameEditWin::GetPetHandle(PetNameEditWin *this)
{
  return this->m_kPetHandle;
}

//----- (00431240) --------------------------------------------------------
void __thiscall PetNameEditWin::OnOk(PetNameEditWin *this)
{
  PetNameEditWin *v1; // esi@1
  char *v2; // eax@1
  const char *v3; // eax@3
  int v4; // esi@6

  v1 = this;
  v2 = (char *)((int (*)(void))this->m_pkNameEdit->vfptr[113].__vecDelDtor)();
  if ( !TextFilterTable::IsBadName(v2) )
  {
    v3 = (const char *)(v1->m_pkNameEdit ? ((int (*)(void))v1->m_pkNameEdit->vfptr[113].__vecDelDtor)() : 0);
    if ( strlen(v3) >= 4 )
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
      v4 = (int)&v1->vfptr;
      if ( *(_DWORD *)(v4 + 4) )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v4 + 4) + 4))(79, 0, v4);
        if ( *(_DWORD *)(v4 + 4) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v4 + 4) + 20))(79, 0, v4);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v4 + 20))(v4, 79, 0, v4);
    }
  }
}

//----- (004312E0) --------------------------------------------------------
void __thiscall PetNameEditWin::OnCancel(PetNameEditWin *this)
{
  PetNameEditWin *v1; // esi@1
  int v2; // esi@1

  v1 = this;
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
  v2 = (int)&v1->vfptr;
  if ( *(_DWORD *)(v2 + 4) )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v2 + 4) + 4))(81, 0, v2);
    if ( *(_DWORD *)(v2 + 4) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v2 + 4) + 20))(81, 0, v2);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v2 + 20))(v2, 81, 0, v2);
}

//----- (00431330) --------------------------------------------------------
char __thiscall PetNameEditWin::Create(PetNameEditWin *this, PgFrameWork *pkFrameWork)
{
  PetNameEditWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  NiNode *v8; // edi@10
  NiSourceTexture *v9; // eax@10
  PgSprData *v10; // eax@10
  PgWinSpr *v11; // eax@10
  PgSprData *v12; // eax@11
  PgSprData *v13; // edi@12
  PgWinBut *v14; // ST4C_4@12
  PgWinBut *v15; // edi@12
  PgFont *v16; // ST48_4@12
  unsigned int v17; // ST44_4@12
  unsigned int v18; // eax@12
  PgWinText *v19; // edi@12
  NiRefObjectVtbl *v20; // ebx@12
  NiUnsharedGeometryGroup *v21; // eax@12
  PgSprData *v22; // edi@12
  PgWinBut *v23; // ST4C_4@12
  PgFont *v24; // ST48_4@12
  unsigned int v25; // ST44_4@12
  unsigned int v26; // eax@12
  PgWinText *v27; // edi@12
  NiRefObjectVtbl *v28; // ebx@12
  NiUnsharedGeometryGroup *v29; // eax@12
  PgFont *v30; // ST48_4@12
  unsigned int v31; // ST44_4@12
  int v32; // eax@12
  PgWinText *v33; // edi@12
  NiRefObjectVtbl *v34; // ebx@12
  NiUnsharedGeometryGroup *v35; // eax@12
  NiNode *v36; // esi@13
  unsigned int uiWidth; // [sp+44h] [bp-20h]@10
  unsigned int uiHeight; // [sp+48h] [bp-1Ch]@10
  int iLeft; // [sp+4Ch] [bp-18h]@4
  int iTop; // [sp+50h] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+54h] [bp-10h]@1
  int v42; // [sp+60h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v42 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\MessageWin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iLeft, &iTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "PetNameEditWin", 0) )
  {
    v6 = spNode.m_pObject;
    v42 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = spNode.m_pObject;
  v9 = MenuTexMgr::GetTexture(0x13u);
  v10 = PgSprData::Create((NiAVObject *)&v8->vfptr, "Theme", &iLeft, &iTop, v9);
  v11 = PgWinSpr::CreateWin(iLeft, iTop, v10, (PgWin *)&v2->vfptr, 0, 0);
  v11->vfptr[60].__vecDelDtor((NiRefObject *)v11, 0);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "LotInput", &iLeft, &iTop, &uiWidth, &uiHeight) )
  {
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "LotInput", &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft, iTop, v12, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkNameEdit = EditWin::CreateWin(
                         iLeft + 2,
                         iTop + 4,
                         uiWidth,
                         uiHeight,
                         (PgWin *)&v2->vfptr,
                         NORMAL,
                         0x10u,
                         3u,
                         0,
                         0,
                         1);
  }
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor02", &iLeft, &iTop, 0);
  PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick02");
  PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver02");
  v14 = PgWinBut::CreateWin(iLeft, iTop, v13, (PgWin *)&v2->vfptr, 0, 0, 0);
  v2->m_pkOkBtn = v14;
  v15 = v14;
  v16 = Font::Get(0);
  v17 = ((int (__thiscall *)(PgWinBut *))v15->vfptr[37].__vecDelDtor)(v15);
  v18 = ((int (__thiscall *)(PgWinBut *))v15->vfptr[36].__vecDelDtor)(v15);
  v19 = PgWinText::CreateWin(0, 0, v18, v17, v16, (PgWin *)&v14->vfptr, 0, 0);
  v19->vfptr[122].__vecDelDtor((NiRefObject *)v19, 5u);
  v20 = v19->vfptr;
  v21 = TextData3::Get(0x9403039u);
  v20[118].__vecDelDtor((NiRefObject *)v19, (unsigned int)v21);
  v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
  v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor04", &iLeft, &iTop, 0);
  PgSprData::Add(v22, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick04");
  PgSprData::Add(v22, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver04");
  v23 = PgWinBut::CreateWin(iLeft, iTop, v22, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v24 = Font::Get(0);
  v25 = ((int (__thiscall *)(PgWinBut *))v23->vfptr[37].__vecDelDtor)(v23);
  v26 = ((int (__thiscall *)(PgWinBut *))v23->vfptr[36].__vecDelDtor)(v23);
  v27 = PgWinText::CreateWin(0, 0, v26, v25, v24, (PgWin *)&v23->vfptr, 0, 0);
  v27->vfptr[122].__vecDelDtor((NiRefObject *)v27, 5u);
  v28 = v27->vfptr;
  v29 = TextData3::Get(0xC2E04238);
  v28[118].__vecDelDtor((NiRefObject *)v27, (unsigned int)v29);
  v27->vfptr[60].__vecDelDtor((NiRefObject *)v27, 0);
  v30 = Font::Get(0);
  v31 = v30->m_uiDefHeight;
  v32 = ((int (__thiscall *)(PetNameEditWin *))v2->vfptr[36].__vecDelDtor)(v2);
  v33 = PgWinText::CreateWin(8, 8, v32 - 16, v31, v30, (PgWin *)&v2->vfptr, 0, 0);
  v33->vfptr[60].__vecDelDtor((NiRefObject *)v33, 0);
  v33->vfptr[122].__vecDelDtor((NiRefObject *)v33, 0);
  v34 = v33->vfptr;
  v35 = TextData3::Get(0x504B6C8Eu);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *, _DWORD))v34[120].__vecDelDtor)(v33, v35, 0);
  ((void (__thiscall *)(PetNameEditWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  v42 = -1;
  if ( spNode.m_pObject )
  {
    v36 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v36 )
        v36->vfptr->__vecDelDtor((NiRefObject *)v36, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00431730) --------------------------------------------------------
void __thiscall PetNameEditWin::OnCommand(PetNameEditWin *this, unsigned int wParam, int lParam)
{
  if ( wParam )
  {
    if ( wParam == 1 )
      PetNameEditWin::OnCancel(this);
  }
  else
  {
    PetNameEditWin::OnOk(this);
  }
}

//----- (00431750) --------------------------------------------------------
PetNameEditWin *__cdecl PetNameEditWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  PetNameEditWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x164u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&PetNameEditWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&PetNameEditWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
    LOWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = -1;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (PetNameEditWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 976014: using guessed type void (__thiscall *PetNameEditWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 976034: using guessed type int (__thiscall *PetNameEditWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004318B0) --------------------------------------------------------
void __thiscall IDirectMessenger::DirectDispatch(IDirectMessenger *this, int iMsgTag, void *pvBody, IDirectMessenger::DispatchTo eDispatch)
{
  IDirectMessenger *v4; // esi@1

  v4 = this;
  if ( this->m_pkMsgHooker )
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))this->m_pkMsgHooker->vfptr->SendDirectMessage)(iMsgTag, pvBody, this);
  if ( eDispatch )
  {
    if ( eDispatch == 1 )
    {
      if ( v4->m_pkMsgHooker )
        ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v4->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          iMsgTag,
          pvBody,
          v4);
      v4->vfptr->DirectDispatchToParent(v4, iMsgTag, pvBody, v4);
    }
  }
  else
  {
    if ( v4->m_pkMsgHooker )
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v4->m_pkMsgHooker->vfptr->DirectDispatchToChildren)(
        iMsgTag,
        pvBody,
        v4);
    v4->vfptr->DirectDispatchToChildren(v4, iMsgTag, pvBody, v4);
  }
}

//----- (00431930) --------------------------------------------------------
PetNameEditWin *__thiscall PetNameEditWin::`vector deleting destructor'(PetNameEditWin *this, unsigned int a2)
{
  PetNameEditWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&PetNameEditWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PetNameEditWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 976014: using guessed type void (__thiscall *PetNameEditWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 976034: using guessed type int (__thiscall *PetNameEditWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004319A0) --------------------------------------------------------
void __cdecl PgExternalLib::ClickSound()
{
  SoundIndex rkIndex; // [sp+0h] [bp-8h]@1

  rkIndex.m_dwIndex = 4;
  rkIndex.m_acFilename = 0;
  SoundGroupStatic::PlaySoundA((SoundGroupStatic *)&g_kSoundMgr.m_pkInterfaceGroup->vfptr, &rkIndex, 0, 0);
}

//----- (004319D0) --------------------------------------------------------
void __cdecl PgExternalLib::WindowOpenSound()
{
  SoundIndex rkIndex; // [sp+0h] [bp-8h]@2

  if ( PgExternalLib::ms_bOpenSoundEnable )
  {
    rkIndex.m_dwIndex = 27;
    rkIndex.m_acFilename = 0;
    SoundGroupStatic::PlaySoundA((SoundGroupStatic *)&g_kSoundMgr.m_pkInterfaceGroup->vfptr, &rkIndex, 0, 0);
  }
}
// B648CC: using guessed type bool PgExternalLib::ms_bOpenSoundEnable;

//----- (00431A10) --------------------------------------------------------
void __cdecl PgExternalLib::WindowCloseSound()
{
  SoundIndex rkIndex; // [sp+0h] [bp-8h]@2

  if ( PgExternalLib::ms_bCloseSoundEnable )
  {
    rkIndex.m_dwIndex = 27;
    rkIndex.m_acFilename = 0;
    SoundGroupStatic::PlaySoundA((SoundGroupStatic *)&g_kSoundMgr.m_pkInterfaceGroup->vfptr, &rkIndex, 0, 0);
    PgExternalLib::ms_bCloseSoundEnable = 0;
  }
}
// B648CD: using guessed type bool PgExternalLib::ms_bCloseSoundEnable;

//----- (00431A50) --------------------------------------------------------
void __cdecl PgExternalLib::ConsonantSound()
{
  SoundIndex rkIndex; // [sp+0h] [bp-8h]@1

  rkIndex.m_dwIndex = 28;
  rkIndex.m_acFilename = 0;
  SoundGroupStatic::PlaySoundA((SoundGroupStatic *)&g_kSoundMgr.m_pkInterfaceGroup->vfptr, &rkIndex, 0, 0);
}

//----- (00431A80) --------------------------------------------------------
void __cdecl PgExternalLib::VowelSound()
{
  SoundIndex rkIndex; // [sp+0h] [bp-8h]@1

  rkIndex.m_dwIndex = 29;
  rkIndex.m_acFilename = 0;
  SoundGroupStatic::PlaySoundA((SoundGroupStatic *)&g_kSoundMgr.m_pkInterfaceGroup->vfptr, &rkIndex, 0, 0);
}

//----- (00431AC0) --------------------------------------------------------
void __thiscall Picking::Picking(Picking *this)
{
  Picking *v1; // esi@1

  v1 = this;
  NsABVPicking::NsABVPicking((NsABVPicking *)&this->m_fExpand);
  v1->m_ePickType = 0;
  v1->m_eSortType = 0;
  v1->m_eIntersectType = 0;
  *(_DWORD *)&v1->m_bReturnTexture = 0;
  v1->m_eCoordinateType = 1;
  *(_WORD *)&v1->m_bFrontOnly = 1;
}

//----- (00431AF0) --------------------------------------------------------
char __thiscall Picking::FirstPick(Picking *this, NiPoint3 *kOrigin, NiPoint3 *kDir)
{
  this->m_ePickType = 1;
  this->m_eSortType = 1;
  return NsABVPicking::PickObjects((NsABVPicking *)&this->m_fExpand, kOrigin, kDir, 0);
}

//----- (00431B20) --------------------------------------------------------
char __thiscall Picking::BestPick(Picking *this, NiPoint3 *kOrigin, NiPoint3 *kDir)
{
  this->m_ePickType = 0;
  this->m_eSortType = 0;
  return NsABVPicking::PickObjects((NsABVPicking *)&this->m_fExpand, kOrigin, kDir, 0);
}

//----- (00431B40) --------------------------------------------------------
char __thiscall Picking::GetNormal(Picking *this, NiPoint3 *kNormal, unsigned int uiIndex)
{
  char result; // al@2
  NsABVPicking::Record *v4; // eax@3

  if ( uiIndex < this->m_pickResults.m_uiESize && (v4 = this->m_pickResults.m_pBase[uiIndex]) != 0 )
  {
    kNormal->x = v4->m_normal.x;
    kNormal->y = v4->m_normal.y;
    kNormal->z = v4->m_normal.z;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00431B80) --------------------------------------------------------
double __thiscall Picking::GetDistance(Picking *this, unsigned int uiIndex)
{
  double result; // st7@2
  NsABVPicking::Record *v3; // eax@3

  if ( uiIndex < this->m_pickResults.m_uiESize && (v3 = this->m_pickResults.m_pBase[uiIndex]) != 0 )
    result = v3->m_fDistance;
  else
    result = -1.0;
  return result;
}

//----- (00431BB0) --------------------------------------------------------
char __thiscall Picking::GetIntersection(Picking *this, NiPoint3 *kPos, unsigned int uiIndex)
{
  NsABVPicking::Record *v3; // eax@1
  char result; // al@2

  v3 = this->m_pickResults.m_pBase[uiIndex];
  if ( v3 )
  {
    kPos->x = v3->m_intersect.x;
    kPos->y = v3->m_intersect.y;
    kPos->z = v3->m_intersect.z;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00431BE0) --------------------------------------------------------
char __thiscall Picking::PickGround(Picking *this, NiPoint3 *kOrigin, NiPoint3 *kDir)
{
  this->m_ePickType = 0;
  this->m_eSortType = 0;
  this->m_eIntersectType = 1;
  return NsABVPicking::PickObjects((NsABVPicking *)&this->m_fExpand, kOrigin, kDir, 0);
}

//----- (00431C10) --------------------------------------------------------
char __thiscall Picking::PickCharacter(Picking *this, NiPoint3 *kOrigin, NiPoint3 *kDir)
{
  this->m_ePickType = 0;
  this->m_eSortType = 0;
  this->m_eIntersectType = 2;
  return NsABVPicking::PickObjects((NsABVPicking *)&this->m_fExpand, kOrigin, kDir, 0);
}

//----- (00431C40) --------------------------------------------------------
NiAVObject *__thiscall Picking::GetAVObject(Picking *this, unsigned int uiIndex)
{
  NiAVObject *result; // eax@2
  NsABVPicking::Record *v3; // eax@3

  if ( uiIndex < this->m_pickResults.m_uiESize && (v3 = this->m_pickResults.m_pBase[uiIndex]) != 0 )
    result = v3->m_spObject.m_pObject;
  else
    result = 0;
  return result;
}

//----- (00431C80) --------------------------------------------------------
void __cdecl PgProfile::Report()
{
  PgProfileNode *v0; // esi@1
  _iobuf *i; // edi@1

  v0 = PgProfileMgr::StartTraversal();
  for ( i = fopen("profile.txt", "w"); v0; v0 = PgProfileMgr::GetNext(v0) )
    fprintf(i, "%s: calls(%u) time(%f) \n", v0->m_pcName, v0->m_iTotalCalls, v0->m_fTotalTime);
  fclose(i);
}

//----- (00431D00) --------------------------------------------------------
void __thiscall PuzzleTimeWin::ResetTime(PuzzleTimeWin *this, unsigned int second)
{
  PuzzleTimeWin *v2; // ebx@1
  int v3; // esi@1
  signed int v4; // edi@1
  int v5; // esi@3
  signed int v6; // edi@3

  v2 = this;
  PuzzleTimeWin::m_second = second;
  CNSTimer_Interval::ReSet(&this->m_kTimer, Timer::ms_fCurTime);
  v2->m_kTimer.m_fCheckTime = 1.0;
  v3 = (int)v2->m_pkSec01;
  v4 = 6;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v3 - 64) + 256))(0);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 256))(0);
    v3 += 4;
    --v4;
  }
  while ( v4 );
  v5 = (int)v2->m_pkSec02;
  v6 = 10;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v5 - 64) + 256))(0);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v5 + 256))(0);
    v5 += 4;
    --v6;
  }
  while ( v6 );
}
// A89D3C: using guessed type unsigned int PuzzleTimeWin::m_second;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00431DA0) --------------------------------------------------------
void __userpurge PuzzleTimeWin::UpdateMeWin(PuzzleTimeWin *this@<ecx>, int a2@<ebx>, int a3@<edi>, float fCurTime)
{
  PuzzleTimeWin *v4; // esi@1
  unsigned int v5; // edi@3
  char *v6; // eax@6
  unsigned int v7; // ebx@9
  unsigned int v8; // ecx@9
  unsigned int v9; // edi@9
  unsigned int v10; // ebx@9
  PgWinSpr *v11; // ecx@10
  PgWinSpr *v12; // ecx@13
  PgWinSpr *v13; // ecx@16
  PgWinSpr *v14; // ecx@19
  int v15; // [sp+4h] [bp-10h]@2
  int v16; // [sp+8h] [bp-Ch]@2
  int v17; // [sp+Ch] [bp-8h]@0
  unsigned int dSec02; // [sp+10h] [bp-4h]@9
  unsigned int dMin02; // [sp+1Ch] [bp+8h]@9

  v4 = this;
  if ( PuzzleTimeWin::m_second )
  {
    v16 = a2;
    v15 = a3;
    if ( CNSTimer_Interval::IsRun_GetCount(&this->m_kTimer, fCurTime) )
    {
      v4->vfptr[64].__vecDelDtor((NiRefObject *)v4, 1u);
      v5 = PuzzleTimeWin::m_second-- - 1;
    }
    else
    {
      v5 = PuzzleTimeWin::m_second;
    }
    if ( v5 == 10 )
    {
      SpEffect::Start(v4->m_pkFireEffect, (NiNode *)&v4->m_pkTimer->vfptr);
      v6 = v4->m_kFireSound._Bx._Buf;
      if ( v4->m_kFireSound._Myres >= 0x10 )
        v6 = *(char **)v6;
      SoundMgr::PlayInterfaceSound(&g_kSoundMgr, v6);
      v5 = PuzzleTimeWin::m_second;
    }
    v7 = v5 / 0x3C % 0x3C;
    v8 = v5 % 0x3C;
    v9 = v7 / 0xA;
    dMin02 = v7 % 0xA;
    v10 = v8 / 0xA;
    dSec02 = v8 % 0xA;
    if ( v9 == 5 )
      v11 = v4->m_pkMin01[0];
    else
      v11 = v4->m_pkMin01[v9 + 1];
    ((void (__stdcall *)(_DWORD, int, int, int))v11->vfptr[64].__vecDelDtor)(0, v15, v16, v17);
    if ( dMin02 == 9 )
      v12 = v4->m_pkMin02[0];
    else
      v12 = v4->m_pkMin02[dMin02 + 1];
    ((void (__stdcall *)(_DWORD))v12->vfptr[64].__vecDelDtor)(0);
    if ( v10 == 5 )
      v13 = v4->m_pkSec01[0];
    else
      v13 = v4->m_pkSec01[v10 + 1];
    ((void (__stdcall *)(_DWORD))v13->vfptr[64].__vecDelDtor)(0);
    if ( dSec02 == 9 )
      v14 = v4->m_pkSec02[0];
    else
      v14 = v4->m_pkSec02[dSec02 + 1];
    ((void (__cdecl *)(_DWORD))v14->vfptr[64].__vecDelDtor)(0);
    ((void (__thiscall *)(PgWinSpr *))v4->m_pkMin01[v9]->vfptr[64].__vecDelDtor)(v4->m_pkMin01[v9]);
    ((void (__cdecl *)(signed int))v4->m_pkMin02[dMin02]->vfptr[64].__vecDelDtor)(1);
    v4->m_pkSec01[v10]->vfptr[64].__vecDelDtor((NiRefObject *)v4->m_pkSec01[v10], 1u);
    v4->m_pkSec02[dSec02]->vfptr[64].__vecDelDtor((NiRefObject *)v4->m_pkSec02[dSec02], 1u);
  }
}
// 431DA0: could not find valid save-restore pair for ebx
// 431DA0: could not find valid save-restore pair for edi
// A89D3C: using guessed type unsigned int PuzzleTimeWin::m_second;

//----- (00431F70) --------------------------------------------------------
void __thiscall PuzzleTimeWin::PuzzleTimeWin(PuzzleTimeWin *this)
{
  PuzzleTimeWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&PuzzleTimeWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&PuzzleTimeWin::`vftable'{for `IDirectMessenger'};
  v1->m_kFireSound._Myres = 15;
  v1->m_kFireSound._Mysize = 0;
  v1->m_kFireSound._Bx._Buf[0] = 0;
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kTimer);
}
// 97630C: using guessed type void (__thiscall *PuzzleTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97632C: using guessed type int (__thiscall *PuzzleTimeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00431FF0) --------------------------------------------------------
void __thiscall PuzzleTimeWin::~PuzzleTimeWin(PuzzleTimeWin *this)
{
  PuzzleTimeWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&PuzzleTimeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PuzzleTimeWin::`vftable'{for `IDirectMessenger'};
  if ( this->m_kFireSound._Myres >= 0x10 )
    operator delete(this->m_kFireSound._Bx._Ptr);
  v1->m_kFireSound._Myres = 15;
  v1->m_kFireSound._Mysize = 0;
  v1->m_kFireSound._Bx._Buf[0] = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 97630C: using guessed type void (__thiscall *PuzzleTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97632C: using guessed type int (__thiscall *PuzzleTimeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00432040) --------------------------------------------------------
PuzzleTimeWin *__cdecl PuzzleTimeWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  PuzzleTimeWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x218u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&PuzzleTimeWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&PuzzleTimeWin::`vftable'{for `IDirectMessenger'};
    v2[1].m_kEffectList.m_kAllocator.m_uiCount = 15;
    v2[1].m_kEffectList.m_pkTail = 0;
    LOBYTE(v2[1].m_kChildren.m_uiESize) = 0;
    LOBYTE(v6) = 2;
    CNSTimer_Interval::CNSTimer_Interval((CNSTimer_Interval *)&v2[1].m_kBound.m_kCenter.y);
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 3;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (PuzzleTimeWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 97630C: using guessed type void (__thiscall *PuzzleTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97632C: using guessed type int (__thiscall *PuzzleTimeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004321A0) --------------------------------------------------------
char __thiscall PuzzleTimeWin::Create(PuzzleTimeWin *this, PgFrameWork *pkFrameWork)
{
  PuzzleTimeWin *v2; // edi@1
  signed int v3; // ebx@1
  NiTexturePalette *v4; // esi@1
  const char *v5; // eax@3
  PgSprData *v6; // eax@4
  PgSprData *v7; // esi@4
  PgWinSpr *v8; // eax@4
  NiNode *v9; // esi@5
  PgSprData *v11; // eax@10
  PgWinSpr *v12; // eax@10
  NiNode *v13; // esi@11
  const char *v14; // eax@11
  PgSprData *v15; // eax@11
  PgWinSpr *v16; // esi@11
  NiNode *v17; // esi@11
  const char *v18; // eax@11
  PgSprData *v19; // eax@11
  PgWinSpr *v20; // esi@11
  signed int v21; // ebx@12
  NiNode *v22; // esi@13
  const char *v23; // eax@13
  PgSprData *v24; // eax@13
  PgWinSpr *v25; // esi@13
  NiNode *v26; // esi@13
  const char *v27; // eax@13
  PgSprData *v28; // eax@13
  PgWinSpr *v29; // esi@13
  unsigned int v30; // eax@14
  NiRefObjectVtbl *v31; // esi@14
  int v32; // eax@14
  int v33; // eax@16
  char v34; // cl@17
  char *v35; // eax@18
  char v36; // cl@19
  NiObjectNET *v37; // ebx@20
  SpEffect *v38; // esi@20
  NiNode *v39; // eax@21
  SpEffect *v40; // eax@21
  NiNode *v41; // esi@24
  NiPointer<NiNode> spNode; // [sp+40h] [bp-18h]@1
  int uiLeft; // [sp+44h] [bp-14h]@4
  int uiTop; // [sp+48h] [bp-10h]@4
  int v45; // [sp+54h] [bp-4h]@1
  PgFrameWork *pkFrameWorka; // [sp+60h] [bp+8h]@10
  PgFrameWork *pkFrameWorkb; // [sp+60h] [bp+8h]@12

  v2 = this;
  v3 = 0;
  spNode.m_pObject = 0;
  v4 = pTexturePalette;
  v45 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "\\Game\\StopWatch.nif");
  PgUtil::LoadNodeNifFile(v5, &spNode, v4);
  if ( !spNode.m_pObject )
    return 0;
  v6 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  v7 = v6;
  v8 = PgWinSpr::CreateWin(uiLeft, uiTop, v6, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkTimer = v8;
  v8->vfptr[60].__vecDelDtor((NiRefObject *)v8, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v7, 0, pkFrameWork, "PuzzleTimeWin", 0) )
  {
    v9 = spNode.m_pObject;
    v45 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v9 )
        v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    }
    return 0;
  }
  v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, 0);
  v12 = PgWinSpr::CreateWin(uiLeft, uiTop, v11, (PgWin *)&v2->vfptr, 0, 0);
  v12->vfptr[60].__vecDelDtor((NiRefObject *)v12, 0);
  pkFrameWorka = (PgFrameWork *)v2->m_pkSec01;
  do
  {
    v13 = spNode.m_pObject;
    v14 = fs("Num01_%d", v3);
    v15 = PgSprData::Create((NiAVObject *)&v13->vfptr, v14, &uiLeft, &uiTop, 0);
    v16 = PgWinSpr::CreateWin(uiLeft, uiTop, v15, (PgWin *)&v2->vfptr, 0, 0);
    v16->vfptr[60].__vecDelDtor((NiRefObject *)v16, 0);
    v16->vfptr[64].__vecDelDtor((NiRefObject *)v16, 0);
    pkFrameWorka[-2].m_uiMessageNum = (unsigned int)v16;
    v17 = spNode.m_pObject;
    v18 = fs("Num03_%d", v3);
    v19 = PgSprData::Create((NiAVObject *)&v17->vfptr, v18, &uiLeft, &uiTop, 0);
    v20 = PgWinSpr::CreateWin(uiLeft, uiTop, v19, (PgWin *)&v2->vfptr, 0, 0);
    v20->vfptr[60].__vecDelDtor((NiRefObject *)v20, 0);
    v20->vfptr[64].__vecDelDtor((NiRefObject *)v20, 0);
    pkFrameWorka->vfptr = (IDirectMessengerVtbl *)v20;
    ++v3;
    pkFrameWorka = (PgFrameWork *)((char *)pkFrameWorka + 4);
  }
  while ( v3 < 6 );
  v21 = 0;
  pkFrameWorkb = (PgFrameWork *)v2->m_pkSec02;
  do
  {
    v22 = spNode.m_pObject;
    v23 = fs("Num02_%d", v21);
    v24 = PgSprData::Create((NiAVObject *)&v22->vfptr, v23, &uiLeft, &uiTop, 0);
    v25 = PgWinSpr::CreateWin(uiLeft, uiTop, v24, (PgWin *)&v2->vfptr, 0, 0);
    v25->vfptr[60].__vecDelDtor((NiRefObject *)v25, 0);
    v25->vfptr[64].__vecDelDtor((NiRefObject *)v25, 0);
    pkFrameWorkb[-2].m_uiMessageNum = (unsigned int)v25;
    v26 = spNode.m_pObject;
    v27 = fs("Num04_%d", v21);
    v28 = PgSprData::Create((NiAVObject *)&v26->vfptr, v27, &uiLeft, &uiTop, 0);
    v29 = PgWinSpr::CreateWin(uiLeft, uiTop, v28, (PgWin *)&v2->vfptr, 0, 0);
    v29->vfptr[60].__vecDelDtor((NiRefObject *)v29, 0);
    v29->vfptr[64].__vecDelDtor((NiRefObject *)v29, 0);
    pkFrameWorkb->vfptr = (IDirectMessengerVtbl *)v29;
    ++v21;
    pkFrameWorkb = (PgFrameWork *)((char *)pkFrameWorkb + 4);
  }
  while ( v21 < 10 );
  v30 = ((int (*)(void))v2->m_pkTimer->vfptr[36].__vecDelDtor)();
  ((void (__thiscall *)(PuzzleTimeWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    (v30 >> 1) + (PgWin::ms_uiScreenWidth >> 1),
    PgWin::ms_uiScreenHeight,
    1.0,
    0.0);
  v31 = v2->vfptr;
  v32 = (int)v2->vfptr[41].__vecDelDtor((NiRefObject *)v2, 70u);
  v31[77].__vecDelDtor((NiRefObject *)v2, v32);
  if ( !Folder::m_bInit )
    Folder::Init();
  v33 = 0;
  do
  {
    v34 = *(&Folder::m_acEffect + v33);
    *(&Folder::m_acMerge + v33++) = v34;
  }
  while ( v34 );
  v35 = &Folder::m_acMerge - 1;
  do
    v36 = (v35++)[1];
  while ( v36 );
  *(_DWORD *)v35 = 1886352467;
  *((_DWORD *)v35 + 1) = 1668571479;
  *((_DWORD *)v35 + 2) = 1919501928;
  *((_DWORD *)v35 + 3) = 1768828517;
  *((_WORD *)v35 + 8) = 102;
  v37 = Ns_LoadNifFile(&Folder::m_acMerge, 0);
  v38 = (SpEffect *)operator new(0x44u);
  LOBYTE(v45) = 1;
  if ( v38 )
  {
    v39 = (NiNode *)NiObject::Clone((NiObject *)&v37->vfptr);
    SpEffect::SpEffect(v38, v39);
  }
  else
  {
    v40 = 0;
  }
  LOBYTE(v45) = 0;
  v2->m_pkFireEffect = v40;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v2->m_kFireSound, "StopWatchFire", 0xDu);
  v45 = -1;
  if ( spNode.m_pObject )
  {
    v41 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v41 )
        v41->vfptr->__vecDelDtor((NiRefObject *)v41, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004325E0) --------------------------------------------------------
PuzzleTimeWin *__thiscall PuzzleTimeWin::`scalar deleting destructor'(PuzzleTimeWin *this, unsigned int a2)
{
  PuzzleTimeWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&PuzzleTimeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PuzzleTimeWin::`vftable'{for `IDirectMessenger'};
  if ( this->m_kFireSound._Myres >= 0x10 )
    operator delete(this->m_kFireSound._Bx._Ptr);
  v2->m_kFireSound._Myres = 15;
  v2->m_kFireSound._Mysize = 0;
  v2->m_kFireSound._Bx._Buf[0] = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97630C: using guessed type void (__thiscall *PuzzleTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97632C: using guessed type int (__thiscall *PuzzleTimeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00432650) --------------------------------------------------------
void __thiscall RandomOptCountRecoverWin::~RandomOptCountRecoverWin(RandomOptCountRecoverWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&RandomOptCountRecoverWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&RandomOptCountRecoverWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9766C4: using guessed type void (__thiscall *RandomOptCountRecoverWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9766E4: using guessed type int (__thiscall *RandomOptCountRecoverWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00432670) --------------------------------------------------------
RandomOptCountRecoverWin *__cdecl RandomOptCountRecoverWin::Modal(RandomOptCountRecoverWin *pkWin)
{
  if ( pkWin )
    PgWinMgr::DoModal(&Pgg_kWinMgr, (PgWin *)&pkWin->vfptr, 0, 0, 0);
  return pkWin;
}

//----- (004326A0) --------------------------------------------------------
void __thiscall RandomOptCountRecoverWin::OnAddtionCount(RandomOptCountRecoverWin *this)
{
  unsigned int v1; // eax@1

  v1 = this->m_uiReqRecoverCount;
  if ( v1 < this->m_uiCurAbleRecoverCount )
  {
    if ( v1 )
    {
      this->m_uiReqRecoverCount = v1 + 1;
      this->m_bChangedRecoverReqCount = 1;
    }
  }
}

//----- (004326D0) --------------------------------------------------------
void __thiscall RandomOptCountRecoverWin::OnSubtractionCount(RandomOptCountRecoverWin *this)
{
  unsigned int v1; // eax@1

  v1 = this->m_uiReqRecoverCount;
  if ( v1 <= this->m_uiCurAbleRecoverCount && v1 > 1 )
  {
    this->m_uiReqRecoverCount = v1 - 1;
    this->m_bChangedRecoverReqCount = 1;
  }
}

//----- (00432710) --------------------------------------------------------
void __thiscall RandomOptCountRecoverWin::SetInvenSlotLock(RandomOptCountRecoverWin *this, bool _bLock)
{
  RandomOptCountRecoverWin *v2; // esi@1
  _DWORD *v3; // edi@1
  IconSlotWin *v4; // eax@2
  unsigned int v5; // ecx@2
  InvWin *v6; // ecx@4

  v2 = this;
  v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID)[19].m_BackFrameID;
  if ( v3 )
  {
    v4 = v2->m_apkRecoverCountItemWin;
    v5 = v4->m_kContentsDetail.kItem.uiSenderIndex;
    if ( !v4->m_kContentsDetail.kItem.uiSenderType )
    {
      if ( v5 < 0xC0 )
      {
        v6 = (InvWin *)v3[v5 + 87];
        if ( v6 )
          InvWin::SetLock(v6, _bLock);
      }
      if ( !_bLock )
        v3[371] = -1;
    }
  }
}

//----- (00432780) --------------------------------------------------------
void __thiscall RandomOptCountRecoverWin::OnApply(RandomOptCountRecoverWin *this)
{
  RandomOptCountRecoverWin *v1; // esi@1
  unsigned int v2; // eax@1
  IconSlotWin *v3; // eax@4
  GameFrameWork *v4; // esi@6
  NiUnsharedGeometryGroup *v5; // eax@6

  v1 = this;
  v2 = this->m_uiReqRecoverCount;
  if ( v2 < 1 || v2 > this->m_uiRecoverItemTotalCount )
  {
    v4 = (GameFrameWork *)this->m_pkFrameWork;
    v5 = TextData3::Get(0x97BEF7C3);
    GameFrameWork::AddSysMsg(v4, (const char *)v5);
  }
  else if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID)[19].m_BackFrameID )
  {
    v3 = v1->m_apkRecoverCountItemWin;
    if ( !v3->m_kContentsDetail.kItem.uiSenderType )
      GameFrameWork::NcItemRandomOptRecoverCountLimitReq(
        (GameFrameWork *)v1->m_pkFrameWork,
        v3->m_kContentsDetail.kItem.uiSenderIndex,
        v1->m_uiReqRecoverCount);
  }
}

//----- (00432800) --------------------------------------------------------
void __thiscall RandomOptCountRecoverWin::UpdateMeWin(RandomOptCountRecoverWin *this, float fCurTime)
{
  RandomOptCountRecoverWin *v2; // esi@1
  NiRefObjectVtbl *v3; // edi@2
  char *v4; // eax@2
  NiRefObjectVtbl *v5; // edi@2
  unsigned int v6; // ST04_4@2
  char *v7; // eax@2
  char *v8; // eax@2
  NiRefObjectVtbl *v9; // edi@2
  unsigned int v10; // ST04_4@2
  char *v11; // eax@2
  char *v12; // eax@2

  v2 = this;
  if ( this->m_bChangedRecoverReqCount )
  {
    v3 = this->m_pkText_Count->vfptr;
    v4 = fs("%d", this->m_uiReqRecoverCount);
    v3[118].__vecDelDtor((NiRefObject *)v2->m_pkText_Count, (unsigned int)v4);
    v5 = v2->m_pkText_Notice_01->vfptr;
    v6 = v2->m_uiReqRecoverCount;
    v7 = (char *)TextData3::Get(0x636E9D6Du);
    v8 = fs(v7, v6);
    v5[118].__vecDelDtor((NiRefObject *)v2->m_pkText_Notice_01, (unsigned int)v8);
    v9 = v2->m_pkText_Notice_02->vfptr;
    v10 = v2->m_uiReqRecoverCount;
    v11 = (char *)TextData3::Get(0x646E9D6Du);
    v12 = fs(v11, v10);
    v9[118].__vecDelDtor((NiRefObject *)v2->m_pkText_Notice_02, (unsigned int)v12);
    v2->m_bChangedRecoverReqCount = 0;
  }
}

//----- (004328B0) --------------------------------------------------------
char __thiscall RandomOptCountRecoverWin::SetRecoverCountItemSlot(RandomOptCountRecoverWin *this, unsigned int _uiReceiverInvIndex, Item *_pkRecoverCountItem)
{
  RandomOptCountRecoverWin *v3; // esi@1
  Item *v4; // edi@1
  char result; // al@2
  void *(__thiscall *v6)(NiRefObject *, unsigned int); // eax@3
  unsigned int v7; // eax@3
  IconSlotWin *v8; // ecx@3
  _DWORD *v9; // ecx@3
  IconSlotWin *v10; // eax@4
  InvWin *v11; // ecx@5
  unsigned int v12; // eax@7
  unsigned int v13; // ecx@7
  NiRefObjectVtbl **v14; // edx@9
  NiRefObjectVtbl *v15; // edi@9
  char *v16; // eax@9
  NiRefObjectVtbl *v17; // edi@9
  char *v18; // eax@9
  char *v19; // eax@9
  PgWinText *v20; // ecx@9
  NiRefObjectVtbl *v21; // edi@9
  char *v22; // eax@9
  char *v23; // eax@9
  PgWinText *v24; // ecx@9
  DropContents pkDropContents; // [sp+10h] [bp-54h]@3
  int v26; // [sp+60h] [bp-4h]@3

  v3 = this;
  v4 = _pkRecoverCountItem;
  if ( _pkRecoverCountItem )
  {
    IconSlotWin::SetItem(this->m_apkRecoverCountItemWin, _pkRecoverCountItem, 0, 1);
    pkDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
    pkDropContents.m_kItemID = -1;
    pkDropContents.m_uiLot = 0;
    v6 = v4->vfptr[3].__vecDelDtor;
    pkDropContents.m_uiSenderIndex = _uiReceiverInvIndex;
    v26 = 0;
    pkDropContents.m_eSenderType = 0;
    pkDropContents.m_eType = 0;
    pkDropContents.m_apvParam[0] = v4;
    pkDropContents.m_apvParam[1] = 0;
    v7 = ((int (__thiscall *)(Item *))v6)(v4);
    v8 = v3->m_apkRecoverCountItemWin;
    pkDropContents.m_uiLot = v7;
    IconSlotWin::SetDropContents(v8, 0, &pkDropContents);
    v9 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID)[19].m_BackFrameID;
    if ( v9 )
    {
      v10 = v3->m_apkRecoverCountItemWin;
      if ( *(_QWORD *)&v10->m_kContentsDetail < 0xC0ui64 )
      {
        v11 = (InvWin *)v9[v10->m_kContentsDetail.kItem.uiSenderIndex + 87];
        if ( v11 )
          InvWin::SetLock(v11, 1);
      }
    }
    v3->m_uiCurAbleRecoverCount = (unsigned __int8)((int (__thiscall *)(Item *))v4->vfptr[18].__vecDelDtor)(v4);
    v12 = Inventory::GetRandomOptRecoverItemCount(&g_kInventory, (ITEM_INVEN *)&_pkRecoverCountItem);
    v13 = v3->m_uiCurAbleRecoverCount;
    v3->m_uiRecoverItemTotalCount = v12;
    if ( v13 <= v12 )
      v12 = v13;
    v14 = &v3->m_pkText_Count->vfptr;
    v3->m_uiReqRecoverCount = v12;
    v15 = *v14;
    v16 = fs("%d", v12);
    v15[118].__vecDelDtor((NiRefObject *)v3->m_pkText_Count, (unsigned int)v16);
    v17 = v3->m_pkText_Notice_01->vfptr;
    *(&pkDropContents.m_uiLot + 1) = v3->m_uiReqRecoverCount;
    v18 = (char *)TextData3::Get(0x636E9D6Du);
    v19 = fs(v18, *(&pkDropContents.m_uiLot + 1));
    v20 = v3->m_pkText_Notice_01;
    *(&pkDropContents.m_uiLot + 1) = (unsigned int)v19;
    v17[118].__vecDelDtor((NiRefObject *)v20, (unsigned int)v19);
    v21 = v3->m_pkText_Notice_02->vfptr;
    *(&pkDropContents.m_uiLot + 1) = v3->m_uiReqRecoverCount;
    v22 = (char *)TextData3::Get(0x646E9D6Du);
    v23 = fs(v22, *(&pkDropContents.m_uiLot + 1));
    v24 = v3->m_pkText_Notice_02;
    *(&pkDropContents.m_uiLot + 1) = (unsigned int)v23;
    ((void (__cdecl *)(char *))v21[118].__vecDelDtor)(v23);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);

//----- (00432A70) --------------------------------------------------------
void __thiscall RandomOptCountRecoverWin::ResetAllData(RandomOptCountRecoverWin *this)
{
  RandomOptCountRecoverWin *v1; // esi@1
  _DWORD *v2; // edi@1
  IconSlotWin *v3; // eax@2
  unsigned int v4; // ecx@2
  InvWin *v5; // ecx@4
  NiRefObjectVtbl **v6; // ecx@7
  NiRefObjectVtbl *v7; // edi@7
  char *v8; // eax@7
  NiRefObjectVtbl *v9; // edi@7
  unsigned int v10; // ST04_4@7
  char *v11; // eax@7
  char *v12; // eax@7
  NiRefObjectVtbl *v13; // edi@7
  unsigned int v14; // ST04_4@7
  char *v15; // eax@7
  char *v16; // eax@7

  v1 = this;
  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID)[19].m_BackFrameID;
  if ( v2 )
  {
    v3 = v1->m_apkRecoverCountItemWin;
    v4 = v3->m_kContentsDetail.kItem.uiSenderIndex;
    if ( !v3->m_kContentsDetail.kItem.uiSenderType )
    {
      if ( v4 < 0xC0 )
      {
        v5 = (InvWin *)v2[v4 + 87];
        if ( v5 )
          InvWin::SetLock(v5, 0);
      }
      v2[371] = -1;
    }
  }
  IconSlotWin::Clear(v1->m_apkRecoverCountItemWin);
  v6 = &v1->m_pkText_Count->vfptr;
  v1->m_uiCurAbleRecoverCount = 0;
  v1->m_uiRecoverItemTotalCount = 0;
  v1->m_uiReqRecoverCount = 0;
  v7 = *v6;
  v8 = fs("%d", 0);
  v7[118].__vecDelDtor((NiRefObject *)v1->m_pkText_Count, (unsigned int)v8);
  v9 = v1->m_pkText_Notice_01->vfptr;
  v10 = v1->m_uiReqRecoverCount;
  v11 = (char *)TextData3::Get(0x636E9D6Du);
  v12 = fs(v11, v10);
  v9[118].__vecDelDtor((NiRefObject *)v1->m_pkText_Notice_01, (unsigned int)v12);
  v13 = v1->m_pkText_Notice_02->vfptr;
  v14 = v1->m_uiReqRecoverCount;
  v15 = (char *)TextData3::Get(0x646E9D6Du);
  v16 = fs(v15, v14);
  v13[118].__vecDelDtor((NiRefObject *)v1->m_pkText_Notice_02, (unsigned int)v16);
}

//----- (00432B90) --------------------------------------------------------
void __thiscall RandomOptCountRecoverWin::ShowRecoverCountResult(RandomOptCountRecoverWin *this, bool _bSuccess)
{
  RandomOptCountRecoverWin *v2; // esi@1
  Item *v3; // eax@2
  GameFrameWork *v4; // edi@3
  int v5; // ST04_4@3
  char *v6; // eax@3
  const char *v7; // eax@3

  v2 = this;
  if ( _bSuccess )
  {
    v3 = IconSlotWin::GetItem(this->m_apkRecoverCountItemWin);
    if ( v3 )
    {
      v4 = (GameFrameWork *)v2->m_pkFrameWork;
      v5 = (int)v3->m_pkInfo->Name;
      v6 = (char *)TextData3::Get(0x87819CBE);
      v7 = fs(v6, v5);
      GameFrameWork::AddSysMsg(v4, v7);
    }
  }
  RandomOptCountRecoverWin::ResetAllData(v2);
}

//----- (00432BF0) --------------------------------------------------------
char __thiscall RandomOptCountRecoverWin::Create(RandomOptCountRecoverWin *this, PgFrameWork *pkFrameWork)
{
  RandomOptCountRecoverWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  int v6; // edi@5
  NiSourceTexture *v7; // eax@5
  PgSprData *v8; // eax@6
  NiSourceTexture *v9; // edi@8
  NiNode *v10; // esi@10
  D3DXCOLOR v12; // ST1C_16@15
  char *v13; // eax@15
  D3DXCOLOR v14; // ST1C_16@15
  char *v15; // eax@15
  D3DXCOLOR v16; // ST1C_16@15
  char *v17; // eax@15
  PgWinSpr *v18; // eax@15
  IconSlotWin *v19; // eax@15
  D3DXCOLOR v20; // ST1C_16@15
  char *v21; // eax@15
  D3DXCOLOR v22; // ST14_16@15
  PgWinAbbreviateText *v23; // eax@15
  NiRefObjectVtbl *v24; // edi@15
  char *v25; // eax@15
  D3DXCOLOR v26; // ST14_16@15
  PgWinAbbreviateText *v27; // eax@15
  NiRefObjectVtbl *v28; // edi@15
  char *v29; // eax@15
  char *v30; // eax@15
  D3DXCOLOR v31; // ST14_16@15
  PgWinAbbreviateText *v32; // eax@15
  NiRefObjectVtbl *v33; // edi@15
  char *v34; // eax@15
  char *v35; // eax@15
  NiNode *v36; // esi@16
  UIUtil ui; // [sp+40h] [bp-2Ch]@5
  int iLeft; // [sp+54h] [bp-18h]@4
  int iTop; // [sp+58h] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+5Ch] [bp-10h]@1
  int v41; // [sp+68h] [bp-4h]@1
  int iOffY; // [sp+74h] [bp+8h]@5

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v41 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\MessageWin03.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iLeft, &iTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "RandomOptCountRecoverWin", 0) )
  {
LABEL_10:
    v10 = spNode.m_pObject;
    v41 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
    return 0;
  }
  v6 = iLeft;
  iOffY = iTop;
  UIUtil::UIUtil(&ui);
  LOBYTE(v41) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, v6, iOffY);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v7 = MenuTexMgr::GetTexture(0x13u);
  if ( v7 )
    v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, v7);
  else
    v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft - v6, iTop - iOffY, v8, (PgWin *)&v2->vfptr, 0, 0);
  v9 = MenuTexMgr::GetTexture(0x1Cu);
  if ( !v9 )
  {
    LOBYTE(v41) = 0;
    UIUtil::~UIUtil(&ui);
    goto LABEL_10;
  }
  UIUtil::CreateSpr(&ui, "Panel01", 0);
  *(_QWORD *)&v12.r = *(_QWORD *)&Color::m_kDxWinTitleColor.r;
  *(_QWORD *)&v12.b = qword_A696E8;
  v13 = (char *)TextData3::Get(0x4A7F7C86u);
  UIUtil::CreateTextNoSpr(&ui, "WinTitle", v13, v12, 5u);
  UIUtil::CreateBtn(&ui, 0xDu, "ClsNor", "ClsClick", "ClsOver", 0, 0);
  v2->m_pkAddCountBtn = UIUtil::CreateBtn(&ui, 0xBu, "FrontPageNor", "FrontPageClick", "FrontPageOver", 0, v9);
  v2->m_pkSubCountBtn = UIUtil::CreateBtn(&ui, 0xAu, "NextPageNor", "NextPageClick", "NextPageOver", 0, v9);
  v2->m_pkOkBtn = UIUtil::CreateBtn(&ui, 0xCu, "Btn01Nor", "Btn01Click", "Btn01Over", 0, 0);
  *(_QWORD *)&v14.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v14.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v15 = (char *)TextData::Get(0x4F5F499Fu);
  UIUtil::CreateAttachedText((PgWin *)&v2->m_pkOkBtn->vfptr, v15, v14, 5u);
  v2->m_pkCancelBtn = UIUtil::CreateBtn(&ui, 0xDu, "Btn02Nor", "Btn02Click", "Btn02Over", 0, 0);
  *(_QWORD *)&v16.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v16.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v17 = (char *)TextData::Get(0x88A297E1);
  UIUtil::CreateAttachedText((PgWin *)&v2->m_pkCancelBtn->vfptr, v17, v16, 5u);
  v18 = UIUtil::CreateSpr(&ui, "ItemSlot", 0);
  v19 = IconSlotWin::CreateWin(1, 0, (PgWin *)&v18->vfptr);
  v2->m_apkRecoverCountItemWin = v19;
  v19->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
  v2->m_apkRecoverCountItemWin->m_bDroppable = 0;
  ((void (__stdcall *)(signed int))v2->m_apkRecoverCountItemWin->vfptr[60].__vecDelDtor)(1);
  ((void (__stdcall *)(signed int))v2->m_apkRecoverCountItemWin->vfptr[64].__vecDelDtor)(1);
  *(_QWORD *)&v20.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v20.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v21 = (char *)TextData3::Get(0x2E80A77Du);
  UIUtil::CreateTextNoSpr(&ui, "Text01", v21, v20, 5u);
  *(_QWORD *)&v22.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v22.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v23 = UIUtil::CreateText(&ui, "MyGoldInput", &byte_97655E, 0, v22, 1u, 0, 0);
  v2->m_pkText_Count = (PgWinText *)v23;
  v24 = v23->vfptr;
  v25 = fs("%d", 0);
  v24[118].__vecDelDtor((NiRefObject *)v2->m_pkText_Count, (unsigned int)v25);
  ((void (__stdcall *)(signed int))v2->m_pkText_Count->vfptr[60].__vecDelDtor)(1);
  *(_QWORD *)&v26.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v26.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v27 = UIUtil::CreateText(&ui, "Text02", &byte_97655F, 0, v26, 1u, 0, 0);
  v2->m_pkText_Notice_01 = (PgWinText *)v27;
  v28 = v27->vfptr;
  v29 = (char *)TextData3::Get(0x636E9D6Du);
  v30 = fs(v29, 0);
  v28[118].__vecDelDtor((NiRefObject *)v2->m_pkText_Notice_01, (unsigned int)v30);
  ((void (__stdcall *)(signed int))v2->m_pkText_Notice_01->vfptr[60].__vecDelDtor)(1);
  ((void (__stdcall *)(signed int))v2->m_pkText_Notice_01->vfptr[64].__vecDelDtor)(1);
  *(_QWORD *)&v31.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v31.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v32 = UIUtil::CreateText(&ui, "Text03", byte_976576, 0, v31, 1u, 0, 0);
  v2->m_pkText_Notice_02 = (PgWinText *)v32;
  v33 = v32->vfptr;
  v34 = (char *)TextData3::Get(0x646E9D6Du);
  v35 = fs(v34, 0);
  v33[118].__vecDelDtor((NiRefObject *)v2->m_pkText_Notice_02, (unsigned int)v35);
  ((void (__stdcall *)(signed int))v2->m_pkText_Notice_02->vfptr[60].__vecDelDtor)(1);
  ((void (__stdcall *)(signed int))v2->m_pkText_Notice_02->vfptr[64].__vecDelDtor)(1);
  ((void (__thiscall *)(RandomOptCountRecoverWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  RandomOptCountRecoverWin::ResetAllData(v2);
  LOBYTE(v41) = 0;
  UIUtil::~UIUtil(&ui);
  v41 = -1;
  if ( spNode.m_pObject )
  {
    v36 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v36 )
        v36->vfptr->__vecDelDtor((NiRefObject *)v36, 1u);
    }
  }
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A696E8: using guessed type __int64 qword_A696E8;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004331B0) --------------------------------------------------------
void __thiscall RandomOptCountRecoverWin::OnCancel(RandomOptCountRecoverWin *this)
{
  GameFrameWork *v1; // esi@1
  InventoryWin *v2; // ecx@1

  RandomOptCountRecoverWin::ResetAllData(this);
  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  GameFrameWork::NcActEndOfTrade(v1);
  v2 = v1->m_pkInventoryWin;
  if ( v2 )
    InventoryWin::OnResetRecoverCountState(v2);
}

//----- (004331F0) --------------------------------------------------------
void __thiscall RandomOptCountRecoverWin::OnCommand(RandomOptCountRecoverWin *this, unsigned int wParam, int lParam)
{
  unsigned int v3; // eax@2
  unsigned int v4; // eax@5

  switch ( wParam )
  {
    case 0xAu:
      v3 = this->m_uiReqRecoverCount;
      if ( v3 < this->m_uiCurAbleRecoverCount )
      {
        if ( v3 )
        {
          this->m_uiReqRecoverCount = v3 + 1;
          this->m_bChangedRecoverReqCount = 1;
        }
      }
      break;
    case 0xBu:
      v4 = this->m_uiReqRecoverCount;
      if ( v4 <= this->m_uiCurAbleRecoverCount && v4 > 1 )
      {
        this->m_uiReqRecoverCount = v4 - 1;
        this->m_bChangedRecoverReqCount = 1;
      }
      break;
    case 0xCu:
      RandomOptCountRecoverWin::OnApply(this);
      break;
    case 0xDu:
      RandomOptCountRecoverWin::OnCancel(this);
      break;
    default:
      return;
  }
}

//----- (00433270) --------------------------------------------------------
void __thiscall RandomOptCountRecoverWin::RandomOptCountRecoverWin(RandomOptCountRecoverWin *this)
{
  RandomOptCountRecoverWin *v1; // esi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v2; // [sp-1Ch] [bp-3Ch]@1
  int v3; // [sp-Ch] [bp-2Ch]@1
  signed int v4; // [sp-8h] [bp-28h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v5; // [sp+Ch] [bp-14h]@1
  RandomOptCountRecoverWin *v6; // [sp+10h] [bp-10h]@1
  int v7; // [sp+1Ch] [bp-4h]@1

  v1 = this;
  v6 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v5 = &v2;
  v1->vfptr = (NiRefObjectVtbl *)&RandomOptCountRecoverWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&RandomOptCountRecoverWin::`vftable'{for `IDirectMessenger'};
  v1->m_apkRecoverCountItemWin = 0;
  v1->m_pkAddCountBtn = 0;
  v1->m_pkSubCountBtn = 0;
  v1->m_pkOkBtn = 0;
  v1->m_pkCancelBtn = 0;
  v1->m_pkText_Count = 0;
  v1->m_pkText_Notice_01 = 0;
  v1->m_pkText_Notice_02 = 0;
  v4 = 15;
  v3 = 0;
  v7 = 0;
  v2._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v2, "LimitRandomOption", 0x11u);
  v1->m_uiLimitRandomOptCount = (unsigned __int16)CSingleDataMap::GetValue(&g_kSingleDataMap, v2);
  v1->m_uiCurAbleRecoverCount = 0;
  v1->m_uiRecoverItemTotalCount = 0;
  v1->m_uiReqRecoverCount = 0;
  v1->m_bChangedRecoverReqCount = 0;
}
// 9766C4: using guessed type void (__thiscall *RandomOptCountRecoverWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9766E4: using guessed type int (__thiscall *RandomOptCountRecoverWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00433350) --------------------------------------------------------
RandomOptCountRecoverWin *__cdecl RandomOptCountRecoverWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  RandomOptCountRecoverWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x18Cu);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    RandomOptCountRecoverWin::RandomOptCountRecoverWin((RandomOptCountRecoverWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (RandomOptCountRecoverWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00433480) --------------------------------------------------------
RandomOptCountRecoverWin *__thiscall RandomOptCountRecoverWin::`scalar deleting destructor'(RandomOptCountRecoverWin *this, unsigned int a2)
{
  RandomOptCountRecoverWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&RandomOptCountRecoverWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&RandomOptCountRecoverWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9766C4: using guessed type void (__thiscall *RandomOptCountRecoverWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9766E4: using guessed type int (__thiscall *RandomOptCountRecoverWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004334C0) --------------------------------------------------------
void __thiscall ChangeSlotWin::ChangeSlotWin(ChangeSlotWin *this)
{
  ChangeSlotWin *v1; // esi@1

  v1 = this;
  ItemIcon::ItemIcon((ItemIcon *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ChangeSlotWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ChangeSlotWin::`vftable'{for `IDirectMessenger'};
  ItemIcon::SetItem((ItemIcon *)&v1->vfptr, 0, 1);
}
// 976AFC: using guessed type void (__thiscall *ChangeSlotWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 976B1C: using guessed type int (__thiscall *ChangeSlotWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00433530) --------------------------------------------------------
void __thiscall ChangeSlotWin::~ChangeSlotWin(ChangeSlotWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ChangeSlotWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ChangeSlotWin::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
}
// 976AFC: using guessed type void (__thiscall *ChangeSlotWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 976B1C: using guessed type int (__thiscall *ChangeSlotWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00433550) --------------------------------------------------------
bool __thiscall ChangeSlotWin::Create(ChangeSlotWin *this, int iXPos, int iYPos, PgWin *pkParent)
{
  return ItemIcon::Create((ItemIcon *)&this->vfptr, iXPos, iYPos, pkParent) != 0;
}

//----- (00433570) --------------------------------------------------------
void __thiscall ChangeSlotWin::SetLock(ChangeSlotWin *this, bool bLock)
{
  void *(__thiscall *v2)(NiRefObject *, unsigned int); // edx@1

  v2 = this->vfptr[60].__vecDelDtor;
  this->m_bLock = bLock;
  ((void (__stdcall *)(_DWORD))v2)(bLock == 0);
}

//----- (004335B0) --------------------------------------------------------
void RandomOptionWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "RandomOptionWin");
}

//----- (004335E0) --------------------------------------------------------
void __thiscall RandomOptionWin::OnShowWin(RandomOptionWin *this)
{
  GameFrameWork *v1; // eax@1

  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkInventoryWin->vfptr);
  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideWin(v1, BIL_RANDOMOPTIONITEM_1);
}

//----- (00433620) --------------------------------------------------------
bool __thiscall RandomOptionWin::IsChangingOption(RandomOptionWin *this)
{
  return this->m_bRandomStart;
}

//----- (00433640) --------------------------------------------------------
void __thiscall ChangeSlotWin::OnFirstHitWin(ChangeSlotWin *this)
{
  ChangeSlotWin *v1; // esi@1
  PgWin *v2; // eax@5
  unsigned int v3; // ecx@6
  ItemIcon *v4; // ecx@7
  Item *v5; // eax@9
  ItemInfoWin *v6; // ecx@10

  v1 = this;
  if ( !this->m_bLock )
  {
    if ( ItemIcon::GetItem((ItemIcon *)&this->vfptr) )
      v1->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
    else
      v1->m_pkToolTipWin = g_pkToolTipWin;
    PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
    v2 = v1->m_pkSender;
    if ( v2 )
    {
      v3 = v1->m_uiSenderInvIndex;
      if ( v3 < 0xC0 )
      {
        v4 = (ItemIcon *)LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][v3 + 2]);
        if ( v4 )
        {
          if ( ItemIcon::GetItem(v4) )
          {
            v5 = ItemIcon::GetItem((ItemIcon *)&v1->vfptr);
            if ( v5 )
            {
              v6 = (ItemInfoWin *)v1->m_pkToolTipWin;
              if ( v6 )
              {
                ItemInfoWin::SetItemInfo(v6, v5);
                PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
              }
            }
          }
        }
      }
    }
  }
}

//----- (004336D0) --------------------------------------------------------
char __thiscall ChangeSlotWin::SetSenderInvSlotLock(ChangeSlotWin *this, bool _bLock)
{
  PgWin *v2; // eax@1
  char result; // al@2
  unsigned int v4; // ecx@3
  InvWin *v5; // ecx@4

  v2 = this->m_pkSender;
  if ( v2
    && (v4 = this->m_uiSenderInvIndex, v4 < 0xC0)
    && (v5 = (InvWin *)LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][v4 + 2])) != 0 )
  {
    InvWin::SetLock(v5, _bLock);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00433710) --------------------------------------------------------
void __thiscall RandomOptionWin::SetItemOptionTextDetail(RandomOptionWin *this, unsigned int uiItemPos, unsigned int uiOPTNum, unsigned int uiRotNum)
{
  char *v4; // esi@3
  char *v5; // ecx@3
  signed int v6; // eax@8
  int v7; // ebx@13
  char *v8; // eax@13
  int v9; // ebx@15
  char *v10; // eax@16
  int v11; // eax@23
  int v12; // ecx@23
  char *v13[5]; // [sp+0h] [bp-18h]@14
  int v14; // [sp+4h] [bp-14h]@14
  int *kOptionValueCompare; // [sp+14h] [bp-4h]@5
  char *kOptionValue; // [sp+20h] [bp+8h]@3

  if ( uiItemPos )
  {
    if ( uiItemPos != 1 )
      return;
    v4 = (char *)this->m_pkAfterOptionText;
    kOptionValue = (char *)this->m_kAfterOptionValue;
    v5 = (char *)this->m_kBeforeOptionValue;
  }
  else
  {
    v4 = (char *)this->m_pkBeforeOptionText;
    kOptionValue = (char *)this->m_kBeforeOptionValue;
    v5 = (char *)this->m_kAfterOptionValue;
  }
  kOptionValueCompare = (int *)v5;
  if ( v4 )
  {
    if ( kOptionValue )
    {
      if ( *(_DWORD *)&v4[4 * uiOPTNum] )
      {
        v6 = *(_DWORD *)&kOptionValue[4 * uiRotNum];
        if ( v6 >= 0 )
        {
          if ( v6 > 0 || *(_DWORD *)&v5[4 * uiRotNum] > 0 )
          {
            switch ( uiOPTNum )
            {
              case 0u:
              case 1u:
              case 2u:
              case 3u:
              case 4u:
              case 5u:
              case 6u:
              case 7u:
              case 8u:
              case 9u:
              case 0xAu:
              case 0xBu:
                if ( v6 )
                {
                  v14 = *(_DWORD *)&kOptionValue[4 * uiRotNum];
                  v13[0] = "+ %d";
                  goto LABEL_21;
                }
                v7 = **(_DWORD **)&v4[4 * uiOPTNum];
                v8 = fs("%d", 0);
                (*(void (__thiscall **)(_DWORD, char *))(v7 + 472))(*(_DWORD *)&v4[4 * uiOPTNum], v8);
                break;
              case 0xCu:
              case 0xDu:
                v9 = **(_DWORD **)&v4[4 * uiOPTNum];
                if ( v6 )
                  v10 = fs("+ %.1f", (double)v6 / 10.0);
                else
                  v10 = fs("%.1f", 0.0 / 10.0);
                goto LABEL_22;
              case 0xEu:
                if ( v6 )
                {
                  v14 = *(_DWORD *)&kOptionValue[4 * uiRotNum];
                  v13[0] = "- %d";
LABEL_21:
                  v9 = **(_DWORD **)&v4[4 * uiOPTNum];
                  v10 = fs(v13[0], v14);
                }
                else
                {
                  v9 = **(_DWORD **)&v4[4 * uiOPTNum];
                  v10 = fs("%d", 0);
                }
LABEL_22:
                (*(void (__thiscall **)(_DWORD, char *))(v9 + 472))(*(_DWORD *)&v4[4 * uiOPTNum], v10);
                break;
              default:
                break;
            }
          }
          v11 = *(_DWORD *)&kOptionValue[4 * uiRotNum];
          v12 = kOptionValueCompare[uiRotNum];
          if ( v11 <= v12 )
          {
            if ( v11 < v12 )
              (*(void (__stdcall **)(D3DXCOLOR *))(**(_DWORD **)&v4[4 * uiOPTNum] + 468))(&Color::m_kDxRedColor);
          }
          else
          {
            (*(void (__stdcall **)(D3DXCOLOR *))(**(_DWORD **)&v4[4 * uiOPTNum] + 468))(&Color::m_kDxGreenColor);
          }
        }
      }
    }
  }
}

//----- (004338A0) --------------------------------------------------------
void __thiscall RandomOptionWin::ItemOptionCompare(RandomOptionWin *this, unsigned int uiItemPos)
{
  char *v2; // esi@2
  signed int v3; // edi@2

  if ( !uiItemPos )
  {
    v2 = (char *)this->m_pkBeforeOptionText;
    v3 = 15;
    do
    {
      if ( (char *)(*(int (**)(void))(**(_DWORD **)v2 + 484))() != "-" )
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 468))(&Color::m_kDxGreenColor);
      v2 += 4;
      --v3;
    }
    while ( v3 );
  }
}

//----- (004338F0) --------------------------------------------------------
void __thiscall RandomOptionWin::ResetItemOption(RandomOptionWin *this)
{
  char *v1; // esi@1
  signed int v2; // edi@1
  int v3; // ecx@2
  int v4; // ecx@4
  RandomOptionWin *v5; // [sp+Ch] [bp-4h]@1

  v5 = this;
  v1 = (char *)this->m_pkBeforeOptionText;
  v2 = 15;
  do
  {
    v3 = *(_DWORD *)v1;
    *((_DWORD *)v1 + 30) = 0;
    *((_DWORD *)v1 + 45) = 0;
    if ( v3 )
    {
      (*(void (__stdcall **)(const char *))(*(_DWORD *)v3 + 472))("-");
      (*(void (__stdcall **)(D3DXCOLOR *))(**(_DWORD **)v1 + 468))(&Color::m_kDxWhiteColor);
    }
    v4 = *((_DWORD *)v1 + 15);
    if ( v4 )
    {
      (*(void (__stdcall **)(const char *))(*(_DWORD *)v4 + 472))("-");
      (*(void (__stdcall **)(D3DXCOLOR *))(**((_DWORD **)v1 + 15) + 468))(&Color::m_kDxWhiteColor);
    }
    v1 += 4;
    --v2;
  }
  while ( v2 );
  ((void (__stdcall *)(void *))v5->m_pkRandomCntTextWin->vfptr[118].__vecDelDtor)(&unk_976932);
  v5->m_bStartEffect = 0;
}

//----- (004339A0) --------------------------------------------------------
void __thiscall RandomOptionWin::SetChangeAbleOption(RandomOptionWin *this, ItemOptionStorage *pChangeAbleOption)
{
  RandomOptionWin *v2; // esi@1
  signed int v3; // ecx@3
  char *v4; // eax@4
  unsigned int v5; // eax@6
  ItemIcon *v6; // ecx@7
  Item *v7; // eax@8

  v2 = this;
  if ( pChangeAbleOption && this->m_pkChangeSlot )
  {
    v3 = 0;
    if ( pChangeAbleOption->fixed.optionnumber.bin & 0xFE )
    {
      v4 = (char *)pChangeAbleOption->optionlist;
      do
      {
        v2->m_kAfterOptionValue[(unsigned __int8)*v4] = *(_WORD *)(v4 + 1);
        ++v3;
        v4 += 3;
      }
      while ( v3 < (signed int)((unsigned int)pChangeAbleOption->fixed.optionnumber.bin >> 1) );
    }
    v5 = v2->m_pkChangeSlot->m_uiSenderInvIndex;
    if ( v5 < 0xC0 )
    {
      v6 = (ItemIcon *)&v2->m_pkInventoryWin->m_apkInvWin[v5]->vfptr;
      if ( v6 )
      {
        v7 = ItemIcon::GetItem(v6);
        if ( v7 )
          v2->m_iAfterReMainRandomCnt = v2->m_uiLimitRandomOption
                                      - (unsigned __int8)((int (__thiscall *)(_DWORD))v7->vfptr[18].__vecDelDtor)(v7);
      }
    }
  }
}

//----- (00433A30) --------------------------------------------------------
void __thiscall ChangeSlotWin::DoAction(ChangeSlotWin *this)
{
  ChangeSlotWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiInvIndex);
}

//----- (00433A60) --------------------------------------------------------
void __thiscall ChangeSlotWin::DoRAction(ChangeSlotWin *this)
{
  ChangeSlotWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiRCmdMsg, v1->m_uiInvIndex);
}

//----- (00433A90) --------------------------------------------------------
void __thiscall ChangeSlotWin::ReSetSlot(ChangeSlotWin *this)
{
  ChangeSlotWin *v1; // esi@1
  void *(__thiscall *v2)(NiRefObject *, unsigned int); // edx@1
  PgWin *v3; // eax@1
  unsigned int v4; // ecx@2
  InvWin *v5; // eax@3

  v1 = this;
  v2 = this->vfptr[60].__vecDelDtor;
  this->m_bLock = 0;
  ((void (__stdcall *)(_DWORD))v2)(1);
  v1->vfptr[60].__vecDelDtor((NiRefObject *)v1, 1u);
  v3 = v1->m_pkSender;
  if ( v3 )
  {
    v4 = v1->m_uiSenderInvIndex;
    if ( v4 < 0xC0 )
    {
      v5 = (InvWin *)LODWORD(v3[1].m_kLocal.m_Rotate.m_pEntry[0][v4 + 2]);
      if ( v5 )
        InvWin::SetLock(v5, 0);
    }
  }
  v1->m_uiSenderType = -1;
  v1->m_uiSenderInvIndex = -1;
  v1->m_pkSender = 0;
  ItemIcon::SetItem((ItemIcon *)&v1->vfptr, 0, 1);
}

//----- (00433B10) --------------------------------------------------------
void __thiscall RandomOptionWin::OnClose(RandomOptionWin *this)
{
  RandomOptionWin *v1; // esi@1
  SpEffect *v2; // ecx@3
  NiNode *v3; // ST08_4@3
  int v4; // esi@3
  bool v5; // zf@3
  DirectUserMsgBody_SendPacket kPacket; // [sp+4h] [bp-Ch]@3

  v1 = this;
  if ( this->m_pkMsgBox )
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkMsgBox->vfptr);
    v1->m_pkMsgBox = 0;
  }
  v2 = v1->m_apkEffect;
  v3 = v1->m_pAttachEffect.m_pObject;
  *(_WORD *)&v1->m_bUseRandomOption = 1;
  SpEffect::End(v2, v3);
  ChangeSlotWin::ReSetSlot(v1->m_pkChangeSlot);
  RandomOptionWin::ResetItemOption(v1);
  v4 = (int)&v1->vfptr;
  v5 = *(_DWORD *)(v4 + 4) == 0;
  *(_DWORD *)&kPacket.wDepartment = 720904;
  kPacket.pvPacket = 0;
  if ( !v5 )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v4 + 4) + 4))(23, &kPacket, v4);
    if ( *(_DWORD *)(v4 + 4) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v4 + 4) + 20))(23, &kPacket, v4);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v4 + 20))(v4, 23, &kPacket, v4);
}

//----- (00433BC0) --------------------------------------------------------
void __thiscall RandomOptionWin::OnSlotLClick(RandomOptionWin *this)
{
  RandomOptionWin *v1; // esi@1
  ChangeSlotWin *v2; // ecx@1
  Item *v3; // eax@3
  ChangeSlotWin *v4; // ecx@4
  unsigned int v5; // ecx@4

  v1 = this;
  v2 = this->m_pkChangeSlot;
  if ( v2 && v1->m_bSelectChangeOpt != 1 )
  {
    v3 = ItemIcon::GetItem((ItemIcon *)&v2->vfptr);
    if ( v3 )
    {
      v4 = v1->m_pkChangeSlot;
      v1->m_kDropContents.m_eSenderType = v4->m_uiSenderType;
      v1->m_kDropContents.m_eType = 0;
      v5 = v4->m_uiSenderInvIndex;
      v1->m_kDropContents.m_apvParam[0] = v3;
      v1->m_kDropContents.m_uiSenderIndex = v5;
      v1->m_kDropContents.m_apvParam[1] = 0;
      v1->m_kDropContents.m_uiLot = ((int (__thiscall *)(_DWORD))v3->vfptr[3].__vecDelDtor)(v3);
      v1->m_kDrop.m_pkSender = v1->m_pkChangeSlot->m_pkSender;
      PgCursor::ms_pkDrop = &v1->m_kDrop;
      ChangeSlotWin::ReSetSlot(v1->m_pkChangeSlot);
      RandomOptionWin::ResetItemOption(v1);
    }
  }
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (00433C60) --------------------------------------------------------
void __thiscall RandomOptionWin::SetRandomCntTextDetail(RandomOptionWin *this, unsigned int uiItemPos)
{
  RandomOptionWin *v2; // esi@1
  int v3; // eax@3
  NiRefObjectVtbl *v4; // edi@7
  int v5; // ST04_4@7
  char *v6; // eax@7
  char *v7; // eax@7

  v2 = this;
  if ( uiItemPos )
  {
    if ( uiItemPos != 1 )
      return;
    v3 = this->m_iAfterReMainRandomCnt;
  }
  else
  {
    v3 = this->m_iBeforeReMainRandomCnt;
  }
  if ( v3 >= 0 )
  {
    if ( this->m_pkRandomCntTextWin )
    {
      v4 = this->m_pkRandomCntTextWin->vfptr;
      v5 = v3;
      v6 = (char *)TextData3::Get(0xD7E3063F);
      v7 = fs(v6, v5);
      v4[118].__vecDelDtor((NiRefObject *)v2->m_pkRandomCntTextWin, (unsigned int)v7);
    }
  }
}

//----- (00433CD0) --------------------------------------------------------
void __thiscall RandomOptionWin::SetChangeOption(RandomOptionWin *this)
{
  RandomOptionWin *v1; // esi@1
  unsigned int v2; // eax@1
  InventoryWin *v3; // ecx@1
  ItemIcon *v4; // ecx@2
  Item *v5; // eax@3
  Item *v6; // edi@3
  int v7; // ST04_4@5
  char *v8; // eax@5
  const char *v9; // eax@5

  v1 = this;
  v2 = this->m_pkChangeSlot->m_uiSenderInvIndex;
  v3 = this->m_pkInventoryWin;
  if ( v2 < 0xC0 )
  {
    v4 = (ItemIcon *)&v3->m_apkInvWin[v2]->vfptr;
    if ( v4 )
    {
      v5 = ItemIcon::GetItem(v4);
      v6 = v5;
      if ( v5 )
      {
        if ( v1->m_pkChangeSlot )
        {
          v7 = (int)v5->m_pkInfo->Name;
          v8 = (char *)TextData3::Get(0xEA36301C);
          v9 = fs(v8, v7);
          GameFrameWork::AddSysMsg((GameFrameWork *)v1->m_pkFrameWork, v9);
          ItemIcon::SetItem((ItemIcon *)&v1->m_pkChangeSlot->vfptr, v6, 1);
        }
      }
    }
  }
}

//----- (00433D50) --------------------------------------------------------
void __thiscall RandomOptionWin::OnCancel(RandomOptionWin *this)
{
  GameFrameWork *v1; // esi@2
  NiUnsharedGeometryGroup *v2; // eax@3

  if ( this->m_bRandomStart == 1 )
  {
    v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v1 )
    {
      v2 = TextData3::Get(0x217D8867u);
      GameFrameWork::AddSysMsg(v1, (const char *)v2);
    }
  }
  else
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
  }
}

//----- (00433DA0) --------------------------------------------------------
void __thiscall RandomOptionWin::~RandomOptionWin(RandomOptionWin *this)
{
  RandomOptionWin *v1; // esi@1
  SpEffect *v2; // edi@1
  NiNode *v3; // ebx@2
  NiNode *v4; // edi@7

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&RandomOptionWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&RandomOptionWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_apkEffect;
  if ( v2 )
  {
    NsEffect::~NsEffect(&v2->m_kEffect);
    ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v2->m_kMarkCheck);
    v3 = v2->m_spEffect.m_pObject;
    if ( v2->m_spEffect.m_pObject && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    operator delete(v2);
    v1->m_apkEffect = 0;
  }
  v4 = v1->m_pAttachEffect.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v1->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 976D88: using guessed type void (__thiscall *RandomOptionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 976DA4: using guessed type int (__thiscall *RandomOptionWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00433EA0) --------------------------------------------------------
void __thiscall RandomOptionWin::SetItemOptionText(RandomOptionWin *this, unsigned int uiItemPos)
{
  RandomOptionWin *v2; // esi@1
  int v3; // edi@3
  int v4; // ebx@3
  int v5; // eax@8
  int v6; // ST68_4@12
  char *v7; // eax@12
  int v8; // ebx@13
  char *v9; // eax@13
  int v10; // eax@14
  int v11; // ecx@14
  int v12; // edi@20
  int v13; // ebx@20
  int v14; // eax@25
  int v15; // ST68_4@29
  char *v16; // eax@29
  int v17; // ebx@30
  char *v18; // eax@30
  int v19; // eax@31
  int v20; // ecx@31
  int v21; // edi@37
  int v22; // ebx@37
  int v23; // eax@42
  int v24; // ST68_4@46
  char *v25; // eax@46
  int v26; // ebx@47
  char *v27; // eax@47
  int v28; // eax@48
  int v29; // ecx@48
  int v30; // edi@54
  int v31; // ebx@54
  int v32; // eax@59
  int v33; // ST68_4@63
  char *v34; // eax@63
  int v35; // ebx@64
  char *v36; // eax@64
  int v37; // eax@65
  int v38; // ecx@65
  int v39; // edi@71
  int v40; // ebx@71
  int v41; // eax@76
  int v42; // ST68_4@80
  char *v43; // eax@80
  int v44; // ebx@81
  char *v45; // eax@81
  int v46; // eax@82
  int v47; // ecx@82
  int v48; // edi@88
  int v49; // ebx@88
  int v50; // eax@93
  int v51; // ST68_4@97
  char *v52; // eax@97
  int v53; // ebx@98
  char *v54; // eax@98
  int v55; // eax@99
  int v56; // ecx@99
  int v57; // edi@105
  int v58; // ebx@105
  int v59; // eax@110
  int v60; // ST68_4@114
  char *v61; // eax@114
  int v62; // ebx@115
  char *v63; // eax@115
  int v64; // eax@116
  int v65; // ecx@116
  int v66; // edi@122
  int v67; // ebx@122
  int v68; // eax@127
  int v69; // ST68_4@131
  char *v70; // eax@131
  int v71; // ebx@132
  char *v72; // eax@132
  int v73; // eax@133
  int v74; // ecx@133
  int v75; // edi@139
  int v76; // ebx@139
  int v77; // eax@144
  int v78; // ST68_4@148
  char *v79; // eax@148
  int v80; // ebx@149
  char *v81; // eax@149
  int v82; // eax@150
  int v83; // ecx@150
  int v84; // edi@156
  int v85; // ebx@156
  int v86; // eax@161
  int v87; // ST68_4@165
  char *v88; // eax@165
  int v89; // ebx@166
  char *v90; // eax@166
  int v91; // eax@167
  int v92; // ecx@167
  int v93; // edi@173
  int v94; // ebx@173
  signed int v95; // eax@178
  int v96; // ST68_4@182
  char *v97; // eax@182
  int v98; // ST64_4@183
  char *v99; // eax@183
  int v100; // eax@184
  int v101; // ecx@184
  int v102; // edi@190
  int v103; // ebx@190
  signed int v104; // eax@195
  int v105; // ST64_4@199
  char *v106; // eax@199
  int v107; // ST68_4@200
  char *v108; // eax@200
  int v109; // eax@201
  int v110; // ecx@201
  int v111; // edi@207
  int v112; // ebx@207
  int v113; // eax@212
  int v114; // ST64_4@216
  char *v115; // eax@216
  int v116; // ST64_4@217
  char *v117; // eax@217
  int v118; // eax@218
  int v119; // ecx@218
  int v120; // edi@224
  int v121; // ebx@224
  int v122; // ecx@224
  int v123; // eax@229
  int v124; // ST64_4@233
  char *v125; // eax@233
  int v126; // ebx@234
  char *v127; // eax@234
  int v128; // eax@235
  int v129; // ecx@235
  int v130; // eax@241
  NiRefObjectVtbl *v131; // edi@245
  int v132; // ST54_4@245
  char *v133; // eax@245
  char *v134; // eax@245
  unsigned int v135; // [sp+50h] [bp-20h]@0
  int v136; // [sp+68h] [bp-8h]@5
  int v137; // [sp+68h] [bp-8h]@22
  int v138; // [sp+68h] [bp-8h]@39
  int v139; // [sp+68h] [bp-8h]@56
  int v140; // [sp+68h] [bp-8h]@73
  int v141; // [sp+68h] [bp-8h]@90
  int v142; // [sp+68h] [bp-8h]@107
  int v143; // [sp+68h] [bp-8h]@124
  int v144; // [sp+68h] [bp-8h]@141
  int v145; // [sp+68h] [bp-8h]@158
  int v146; // [sp+68h] [bp-8h]@226
  int v147; // [sp+6Ch] [bp-4h]@3
  int v148; // [sp+6Ch] [bp-4h]@20
  int v149; // [sp+6Ch] [bp-4h]@37
  int v150; // [sp+6Ch] [bp-4h]@54
  int v151; // [sp+6Ch] [bp-4h]@71
  int v152; // [sp+6Ch] [bp-4h]@88
  int v153; // [sp+6Ch] [bp-4h]@105
  int v154; // [sp+6Ch] [bp-4h]@122
  int v155; // [sp+6Ch] [bp-4h]@139
  int v156; // [sp+6Ch] [bp-4h]@156
  int v157; // [sp+6Ch] [bp-4h]@173
  int v158; // [sp+6Ch] [bp-4h]@190
  int v159; // [sp+6Ch] [bp-4h]@207
  int v160; // [sp+6Ch] [bp-4h]@226

  v2 = this;
  RandomOptionWin::SetItemOptionTextDetail(this, uiItemPos, v135, 0);
  if ( uiItemPos )
  {
    if ( uiItemPos != 1 )
      goto LABEL_18;
    v3 = (int)v2->m_pkAfterOptionText;
    v4 = (int)v2->m_kAfterOptionValue;
    v147 = (int)v2->m_kBeforeOptionValue;
  }
  else
  {
    v3 = (int)v2->m_pkBeforeOptionText;
    v4 = (int)v2->m_kBeforeOptionValue;
    v147 = (int)v2->m_kAfterOptionValue;
  }
  v136 = v4;
  if ( v3 )
  {
    if ( v4 )
    {
      if ( *(_DWORD *)(v3 + 4) )
      {
        v5 = *(_DWORD *)(v4 + 8);
        if ( v5 >= 0 )
        {
          if ( v5 > 0 )
            goto LABEL_248;
          if ( *(_DWORD *)(v147 + 8) <= 0 )
            goto LABEL_14;
          if ( v5 )
          {
LABEL_248:
            v8 = **(_DWORD **)(v3 + 4);
            v9 = fs("+ %d", v5);
            (*(void (__thiscall **)(_DWORD, char *))(v8 + 472))(*(_DWORD *)(v3 + 4), v9);
            v4 = v136;
          }
          else
          {
            v6 = **(_DWORD **)(v3 + 4);
            v7 = fs("%d", 0);
            (*(void (__thiscall **)(_DWORD, char *))(v6 + 472))(*(_DWORD *)(v3 + 4), v7);
          }
LABEL_14:
          v10 = *(_DWORD *)(v4 + 8);
          v11 = *(_DWORD *)(v147 + 8);
          if ( v10 <= v11 )
          {
            if ( v10 < v11 )
              (*(void (__thiscall **)(_DWORD, D3DXCOLOR *))(**(_DWORD **)(v3 + 4) + 468))(
                *(_DWORD *)(v3 + 4),
                &Color::m_kDxRedColor);
          }
          else
          {
            (*(void (__thiscall **)(_DWORD, D3DXCOLOR *))(**(_DWORD **)(v3 + 4) + 468))(
              *(_DWORD *)(v3 + 4),
              &Color::m_kDxGreenColor);
          }
          goto LABEL_18;
        }
      }
    }
  }
LABEL_18:
  if ( uiItemPos )
  {
    if ( uiItemPos != 1 )
      goto LABEL_35;
    v12 = (int)v2->m_pkAfterOptionText;
    v13 = (int)v2->m_kAfterOptionValue;
    v148 = (int)v2->m_kBeforeOptionValue;
  }
  else
  {
    v12 = (int)v2->m_pkBeforeOptionText;
    v13 = (int)v2->m_kBeforeOptionValue;
    v148 = (int)v2->m_kAfterOptionValue;
  }
  v137 = v13;
  if ( v12 )
  {
    if ( v13 )
    {
      if ( *(_DWORD *)(v12 + 8) )
      {
        v14 = *(_DWORD *)(v13 + 4);
        if ( v14 >= 0 )
        {
          if ( v14 > 0 )
            goto LABEL_249;
          if ( *(_DWORD *)(v148 + 4) <= 0 )
            goto LABEL_31;
          if ( v14 )
          {
LABEL_249:
            v17 = **(_DWORD **)(v12 + 8);
            v18 = fs("+ %d", v14);
            (*(void (__thiscall **)(_DWORD, char *))(v17 + 472))(*(_DWORD *)(v12 + 8), v18);
            v13 = v137;
          }
          else
          {
            v15 = **(_DWORD **)(v12 + 8);
            v16 = fs("%d", 0);
            (*(void (__thiscall **)(_DWORD, char *))(v15 + 472))(*(_DWORD *)(v12 + 8), v16);
          }
LABEL_31:
          v19 = *(_DWORD *)(v13 + 4);
          v20 = *(_DWORD *)(v148 + 4);
          if ( v19 <= v20 )
          {
            if ( v19 < v20 )
              (*(void (__thiscall **)(_DWORD, D3DXCOLOR *))(**(_DWORD **)(v12 + 8) + 468))(
                *(_DWORD *)(v12 + 8),
                &Color::m_kDxRedColor);
          }
          else
          {
            (*(void (__thiscall **)(_DWORD, D3DXCOLOR *))(**(_DWORD **)(v12 + 8) + 468))(
              *(_DWORD *)(v12 + 8),
              &Color::m_kDxGreenColor);
          }
          goto LABEL_35;
        }
      }
    }
  }
LABEL_35:
  if ( uiItemPos )
  {
    if ( uiItemPos != 1 )
      goto LABEL_52;
    v21 = (int)v2->m_pkAfterOptionText;
    v22 = (int)v2->m_kAfterOptionValue;
    v149 = (int)v2->m_kBeforeOptionValue;
  }
  else
  {
    v21 = (int)v2->m_pkBeforeOptionText;
    v22 = (int)v2->m_kBeforeOptionValue;
    v149 = (int)v2->m_kAfterOptionValue;
  }
  v138 = v22;
  if ( v21 )
  {
    if ( v22 )
    {
      if ( *(_DWORD *)(v21 + 12) )
      {
        v23 = *(_DWORD *)(v22 + 12);
        if ( v23 >= 0 )
        {
          if ( v23 > 0 )
            goto LABEL_250;
          if ( *(_DWORD *)(v149 + 12) <= 0 )
            goto LABEL_48;
          if ( v23 )
          {
LABEL_250:
            v26 = **(_DWORD **)(v21 + 12);
            v27 = fs("+ %d", v23);
            (*(void (__thiscall **)(_DWORD, char *))(v26 + 472))(*(_DWORD *)(v21 + 12), v27);
            v22 = v138;
          }
          else
          {
            v24 = **(_DWORD **)(v21 + 12);
            v25 = fs("%d", 0);
            (*(void (__thiscall **)(_DWORD, char *))(v24 + 472))(*(_DWORD *)(v21 + 12), v25);
          }
LABEL_48:
          v28 = *(_DWORD *)(v22 + 12);
          v29 = *(_DWORD *)(v149 + 12);
          if ( v28 <= v29 )
          {
            if ( v28 < v29 )
              (*(void (__thiscall **)(_DWORD, D3DXCOLOR *))(**(_DWORD **)(v21 + 12) + 468))(
                *(_DWORD *)(v21 + 12),
                &Color::m_kDxRedColor);
          }
          else
          {
            (*(void (__thiscall **)(_DWORD, D3DXCOLOR *))(**(_DWORD **)(v21 + 12) + 468))(
              *(_DWORD *)(v21 + 12),
              &Color::m_kDxGreenColor);
          }
          goto LABEL_52;
        }
      }
    }
  }
LABEL_52:
  if ( uiItemPos )
  {
    if ( uiItemPos != 1 )
      goto LABEL_69;
    v30 = (int)v2->m_pkAfterOptionText;
    v31 = (int)v2->m_kAfterOptionValue;
    v150 = (int)v2->m_kBeforeOptionValue;
  }
  else
  {
    v30 = (int)v2->m_pkBeforeOptionText;
    v31 = (int)v2->m_kBeforeOptionValue;
    v150 = (int)v2->m_kAfterOptionValue;
  }
  v139 = v31;
  if ( v30 )
  {
    if ( v31 )
    {
      if ( *(_DWORD *)(v30 + 16) )
      {
        v32 = *(_DWORD *)(v31 + 16);
        if ( v32 >= 0 )
        {
          if ( v32 > 0 )
            goto LABEL_251;
          if ( *(_DWORD *)(v150 + 16) <= 0 )
            goto LABEL_65;
          if ( v32 )
          {
LABEL_251:
            v35 = **(_DWORD **)(v30 + 16);
            v36 = fs("+ %d", v32);
            (*(void (__thiscall **)(_DWORD, char *))(v35 + 472))(*(_DWORD *)(v30 + 16), v36);
            v31 = v139;
          }
          else
          {
            v33 = **(_DWORD **)(v30 + 16);
            v34 = fs("%d", 0);
            (*(void (__thiscall **)(_DWORD, char *))(v33 + 472))(*(_DWORD *)(v30 + 16), v34);
          }
LABEL_65:
          v37 = *(_DWORD *)(v31 + 16);
          v38 = *(_DWORD *)(v150 + 16);
          if ( v37 <= v38 )
          {
            if ( v37 < v38 )
              (*(void (__thiscall **)(_DWORD, D3DXCOLOR *))(**(_DWORD **)(v30 + 16) + 468))(
                *(_DWORD *)(v30 + 16),
                &Color::m_kDxRedColor);
          }
          else
          {
            (*(void (__thiscall **)(_DWORD, D3DXCOLOR *))(**(_DWORD **)(v30 + 16) + 468))(
              *(_DWORD *)(v30 + 16),
              &Color::m_kDxGreenColor);
          }
          goto LABEL_69;
        }
      }
    }
  }
LABEL_69:
  if ( uiItemPos )
  {
    if ( uiItemPos != 1 )
      goto LABEL_86;
    v39 = (int)v2->m_pkAfterOptionText;
    v40 = (int)v2->m_kAfterOptionValue;
    v151 = (int)v2->m_kBeforeOptionValue;
  }
  else
  {
    v39 = (int)v2->m_pkBeforeOptionText;
    v40 = (int)v2->m_kBeforeOptionValue;
    v151 = (int)v2->m_kAfterOptionValue;
  }
  v140 = v40;
  if ( v39 )
  {
    if ( v40 )
    {
      if ( *(_DWORD *)(v39 + 24) )
      {
        v41 = *(_DWORD *)(v40 + 28);
        if ( v41 >= 0 )
        {
          if ( v41 > 0 )
            goto LABEL_252;
          if ( *(_DWORD *)(v151 + 28) <= 0 )
            goto LABEL_82;
          if ( v41 )
          {
LABEL_252:
            v44 = **(_DWORD **)(v39 + 24);
            v45 = fs("+ %d", v41);
            (*(void (__thiscall **)(_DWORD, char *))(v44 + 472))(*(_DWORD *)(v39 + 24), v45);
            v40 = v140;
          }
          else
          {
            v42 = **(_DWORD **)(v39 + 24);
            v43 = fs("%d", 0);
            (*(void (__thiscall **)(_DWORD, char *))(v42 + 472))(*(_DWORD *)(v39 + 24), v43);
          }
LABEL_82:
          v46 = *(_DWORD *)(v40 + 28);
          v47 = *(_DWORD *)(v151 + 28);
          if ( v46 <= v47 )
          {
            if ( v46 < v47 )
              (*(void (__thiscall **)(_DWORD, D3DXCOLOR *))(**(_DWORD **)(v39 + 24) + 468))(
                *(_DWORD *)(v39 + 24),
                &Color::m_kDxRedColor);
          }
          else
          {
            (*(void (__thiscall **)(_DWORD, D3DXCOLOR *))(**(_DWORD **)(v39 + 24) + 468))(
              *(_DWORD *)(v39 + 24),
              &Color::m_kDxGreenColor);
          }
          goto LABEL_86;
        }
      }
    }
  }
LABEL_86:
  if ( uiItemPos )
  {
    if ( uiItemPos != 1 )
      goto LABEL_103;
    v48 = (int)v2->m_pkAfterOptionText;
    v49 = (int)v2->m_kAfterOptionValue;
    v152 = (int)v2->m_kBeforeOptionValue;
  }
  else
  {
    v48 = (int)v2->m_pkBeforeOptionText;
    v49 = (int)v2->m_kBeforeOptionValue;
    v152 = (int)v2->m_kAfterOptionValue;
  }
  v141 = v49;
  if ( v48 )
  {
    if ( v49 )
    {
      if ( *(_DWORD *)(v48 + 28) )
      {
        v50 = *(_DWORD *)(v49 + 32);
        if ( v50 >= 0 )
        {
          if ( v50 > 0 )
            goto LABEL_253;
          if ( *(_DWORD *)(v152 + 32) <= 0 )
            goto LABEL_99;
          if ( v50 )
          {
LABEL_253:
            v53 = **(_DWORD **)(v48 + 28);
            v54 = fs("+ %d", v50);
            (*(void (__thiscall **)(_DWORD, char *))(v53 + 472))(*(_DWORD *)(v48 + 28), v54);
            v49 = v141;
          }
          else
          {
            v51 = **(_DWORD **)(v48 + 28);
            v52 = fs("%d", 0);
            (*(void (__thiscall **)(_DWORD, char *))(v51 + 472))(*(_DWORD *)(v48 + 28), v52);
          }
LABEL_99:
          v55 = *(_DWORD *)(v49 + 32);
          v56 = *(_DWORD *)(v152 + 32);
          if ( v55 <= v56 )
          {
            if ( v55 < v56 )
              (*(void (__thiscall **)(_DWORD, D3DXCOLOR *))(**(_DWORD **)(v48 + 28) + 468))(
                *(_DWORD *)(v48 + 28),
                &Color::m_kDxRedColor);
          }
          else
          {
            (*(void (__thiscall **)(_DWORD, D3DXCOLOR *))(**(_DWORD **)(v48 + 28) + 468))(
              *(_DWORD *)(v48 + 28),
              &Color::m_kDxGreenColor);
          }
          goto LABEL_103;
        }
      }
    }
  }
LABEL_103:
  if ( uiItemPos )
  {
    if ( uiItemPos != 1 )
      goto LABEL_120;
    v57 = (int)v2->m_pkAfterOptionText;
    v58 = (int)v2->m_kAfterOptionValue;
    v153 = (int)v2->m_kBeforeOptionValue;
  }
  else
  {
    v57 = (int)v2->m_pkBeforeOptionText;
    v58 = (int)v2->m_kBeforeOptionValue;
    v153 = (int)v2->m_kAfterOptionValue;
  }
  v142 = v58;
  if ( v57 )
  {
    if ( v58 )
    {
      if ( *(_DWORD *)(v57 + 32) )
      {
        v59 = *(_DWORD *)(v58 + 36);
        if ( v59 >= 0 )
        {
          if ( v59 > 0 )
            goto LABEL_254;
          if ( *(_DWORD *)(v153 + 36) <= 0 )
            goto LABEL_116;
          if ( v59 )
          {
LABEL_254:
            v62 = **(_DWORD **)(v57 + 32);
            v63 = fs("+ %d", v59);
            (*(void (__thiscall **)(_DWORD, char *))(v62 + 472))(*(_DWORD *)(v57 + 32), v63);
            v58 = v142;
          }
          else
          {
            v60 = **(_DWORD **)(v57 + 32);
            v61 = fs("%d", 0);
            (*(void (__thiscall **)(_DWORD, char *))(v60 + 472))(*(_DWORD *)(v57 + 32), v61);
          }
LABEL_116:
          v64 = *(_DWORD *)(v58 + 36);
          v65 = *(_DWORD *)(v153 + 36);
          if ( v64 <= v65 )
          {
            if ( v64 < v65 )
              (*(void (__thiscall **)(_DWORD, D3DXCOLOR *))(**(_DWORD **)(v57 + 32) + 468))(
                *(_DWORD *)(v57 + 32),
                &Color::m_kDxRedColor);
          }
          else
          {
            (*(void (__thiscall **)(_DWORD, D3DXCOLOR *))(**(_DWORD **)(v57 + 32) + 468))(
              *(_DWORD *)(v57 + 32),
              &Color::m_kDxGreenColor);
          }
          goto LABEL_120;
        }
      }
    }
  }
LABEL_120:
  if ( uiItemPos )
  {
    if ( uiItemPos != 1 )
      goto LABEL_137;
    v66 = (int)v2->m_pkAfterOptionText;
    v67 = (int)v2->m_kAfterOptionValue;
    v154 = (int)v2->m_kBeforeOptionValue;
  }
  else
  {
    v66 = (int)v2->m_pkBeforeOptionText;
    v67 = (int)v2->m_kBeforeOptionValue;
    v154 = (int)v2->m_kAfterOptionValue;
  }
  v143 = v67;
  if ( v66 )
  {
    if ( v67 )
    {
      if ( *(_DWORD *)(v66 + 36) )
      {
        v68 = *(_DWORD *)(v67 + 40);
        if ( v68 >= 0 )
        {
          if ( v68 > 0 )
            goto LABEL_255;
          if ( *(_DWORD *)(v154 + 40) <= 0 )
            goto LABEL_133;
          if ( v68 )
          {
LABEL_255:
            v71 = **(_DWORD **)(v66 + 36);
            v72 = fs("+ %d", v68);
            (*(void (__thiscall **)(_DWORD, char *))(v71 + 472))(*(_DWORD *)(v66 + 36), v72);
            v67 = v143;
          }
          else
          {
            v69 = **(_DWORD **)(v66 + 36);
            v70 = fs("%d", 0);
            (*(void (__thiscall **)(_DWORD, char *))(v69 + 472))(*(_DWORD *)(v66 + 36), v70);
          }
LABEL_133:
          v73 = *(_DWORD *)(v67 + 40);
          v74 = *(_DWORD *)(v154 + 40);
          if ( v73 <= v74 )
          {
            if ( v73 < v74 )
              (*(void (__thiscall **)(_DWORD, D3DXCOLOR *))(**(_DWORD **)(v66 + 36) + 468))(
                *(_DWORD *)(v66 + 36),
                &Color::m_kDxRedColor);
          }
          else
          {
            (*(void (__thiscall **)(_DWORD, D3DXCOLOR *))(**(_DWORD **)(v66 + 36) + 468))(
              *(_DWORD *)(v66 + 36),
              &Color::m_kDxGreenColor);
          }
          goto LABEL_137;
        }
      }
    }
  }
LABEL_137:
  if ( uiItemPos )
  {
    if ( uiItemPos != 1 )
      goto LABEL_154;
    v75 = (int)v2->m_pkAfterOptionText;
    v76 = (int)v2->m_kAfterOptionValue;
    v155 = (int)v2->m_kBeforeOptionValue;
  }
  else
  {
    v75 = (int)v2->m_pkBeforeOptionText;
    v76 = (int)v2->m_kBeforeOptionValue;
    v155 = (int)v2->m_kAfterOptionValue;
  }
  v144 = v76;
  if ( v75 )
  {
    if ( v76 )
    {
      if ( *(_DWORD *)(v75 + 40) )
      {
        v77 = *(_DWORD *)(v76 + 20);
        if ( v77 >= 0 )
        {
          if ( v77 > 0 )
            goto LABEL_256;
          if ( *(_DWORD *)(v155 + 20) <= 0 )
            goto LABEL_150;
          if ( v77 )
          {
LABEL_256:
            v80 = **(_DWORD **)(v75 + 40);
            v81 = fs("+ %d", v77);
            (*(void (__thiscall **)(_DWORD, char *))(v80 + 472))(*(_DWORD *)(v75 + 40), v81);
            v76 = v144;
          }
          else
          {
            v78 = **(_DWORD **)(v75 + 40);
            v79 = fs("%d", 0);
            (*(void (__thiscall **)(_DWORD, char *))(v78 + 472))(*(_DWORD *)(v75 + 40), v79);
          }
LABEL_150:
          v82 = *(_DWORD *)(v76 + 20);
          v83 = *(_DWORD *)(v155 + 20);
          if ( v82 <= v83 )
          {
            if ( v82 < v83 )
              (*(void (__thiscall **)(_DWORD, D3DXCOLOR *))(**(_DWORD **)(v75 + 40) + 468))(
                *(_DWORD *)(v75 + 40),
                &Color::m_kDxRedColor);
          }
          else
          {
            (*(void (__thiscall **)(_DWORD, D3DXCOLOR *))(**(_DWORD **)(v75 + 40) + 468))(
              *(_DWORD *)(v75 + 40),
              &Color::m_kDxGreenColor);
          }
          goto LABEL_154;
        }
      }
    }
  }
LABEL_154:
  if ( uiItemPos )
  {
    if ( uiItemPos != 1 )
      goto LABEL_171;
    v84 = (int)v2->m_pkAfterOptionText;
    v85 = (int)v2->m_kAfterOptionValue;
    v156 = (int)v2->m_kBeforeOptionValue;
  }
  else
  {
    v84 = (int)v2->m_pkBeforeOptionText;
    v85 = (int)v2->m_kBeforeOptionValue;
    v156 = (int)v2->m_kAfterOptionValue;
  }
  v145 = v85;
  if ( v84 )
  {
    if ( v85 )
    {
      if ( *(_DWORD *)(v84 + 44) )
      {
        v86 = *(_DWORD *)(v85 + 44);
        if ( v86 >= 0 )
        {
          if ( v86 > 0 )
            goto LABEL_257;
          if ( *(_DWORD *)(v156 + 44) <= 0 )
            goto LABEL_167;
          if ( v86 )
          {
LABEL_257:
            v89 = **(_DWORD **)(v84 + 44);
            v90 = fs("+ %d", v86);
            (*(void (__thiscall **)(_DWORD, char *))(v89 + 472))(*(_DWORD *)(v84 + 44), v90);
            v85 = v145;
          }
          else
          {
            v87 = **(_DWORD **)(v84 + 44);
            v88 = fs("%d", 0);
            (*(void (__thiscall **)(_DWORD, char *))(v87 + 472))(*(_DWORD *)(v84 + 44), v88);
          }
LABEL_167:
          v91 = *(_DWORD *)(v85 + 44);
          v92 = *(_DWORD *)(v156 + 44);
          if ( v91 <= v92 )
          {
            if ( v91 < v92 )
              (*(void (__thiscall **)(_DWORD, D3DXCOLOR *))(**(_DWORD **)(v84 + 44) + 468))(
                *(_DWORD *)(v84 + 44),
                &Color::m_kDxRedColor);
          }
          else
          {
            (*(void (__thiscall **)(_DWORD, D3DXCOLOR *))(**(_DWORD **)(v84 + 44) + 468))(
              *(_DWORD *)(v84 + 44),
              &Color::m_kDxGreenColor);
          }
          goto LABEL_171;
        }
      }
    }
  }
LABEL_171:
  if ( uiItemPos )
  {
    if ( uiItemPos != 1 )
      goto LABEL_188;
    v93 = (int)v2->m_pkAfterOptionText;
    v94 = (int)v2->m_kAfterOptionValue;
    v157 = (int)v2->m_kBeforeOptionValue;
  }
  else
  {
    v93 = (int)v2->m_pkBeforeOptionText;
    v94 = (int)v2->m_kBeforeOptionValue;
    v157 = (int)v2->m_kAfterOptionValue;
  }
  if ( v93 )
  {
    if ( v94 )
    {
      if ( *(_DWORD *)(v93 + 48) )
      {
        v95 = *(_DWORD *)(v94 + 24);
        if ( v95 >= 0 )
        {
          if ( v95 > 0 )
            goto LABEL_258;
          if ( *(_DWORD *)(v157 + 24) <= 0 )
            goto LABEL_184;
          if ( v95 )
          {
LABEL_258:
            v98 = **(_DWORD **)(v93 + 48);
            v99 = fs("+ %.1f", (double)v95 / 10.0);
            (*(void (__thiscall **)(_DWORD, char *))(v98 + 472))(*(_DWORD *)(v93 + 48), v99);
          }
          else
          {
            v96 = **(_DWORD **)(v93 + 48);
            v97 = fs("%.1f", 0.0 / 10.0);
            (*(void (__thiscall **)(_DWORD, char *))(v96 + 472))(*(_DWORD *)(v93 + 48), v97);
          }
LABEL_184:
          v100 = *(_DWORD *)(v94 + 24);
          v101 = *(_DWORD *)(v157 + 24);
          if ( v100 <= v101 )
          {
            if ( v100 < v101 )
              (*(void (__thiscall **)(_DWORD, D3DXCOLOR *))(**(_DWORD **)(v93 + 48) + 468))(
                *(_DWORD *)(v93 + 48),
                &Color::m_kDxRedColor);
          }
          else
          {
            (*(void (__thiscall **)(_DWORD, D3DXCOLOR *))(**(_DWORD **)(v93 + 48) + 468))(
              *(_DWORD *)(v93 + 48),
              &Color::m_kDxGreenColor);
          }
          goto LABEL_188;
        }
      }
    }
  }
LABEL_188:
  if ( uiItemPos )
  {
    if ( uiItemPos != 1 )
      goto LABEL_205;
    v102 = (int)v2->m_pkAfterOptionText;
    v103 = (int)v2->m_kAfterOptionValue;
    v158 = (int)v2->m_kBeforeOptionValue;
  }
  else
  {
    v102 = (int)v2->m_pkBeforeOptionText;
    v103 = (int)v2->m_kBeforeOptionValue;
    v158 = (int)v2->m_kAfterOptionValue;
  }
  if ( v102 )
  {
    if ( v103 )
    {
      if ( *(_DWORD *)(v102 + 52) )
      {
        v104 = *(_DWORD *)(v103 + 48);
        if ( v104 >= 0 )
        {
          if ( v104 > 0 )
            goto LABEL_259;
          if ( *(_DWORD *)(v158 + 48) <= 0 )
            goto LABEL_201;
          if ( v104 )
          {
LABEL_259:
            v107 = **(_DWORD **)(v102 + 52);
            v108 = fs("+ %.1f", (double)v104 / 10.0);
            (*(void (__thiscall **)(_DWORD, char *))(v107 + 472))(*(_DWORD *)(v102 + 52), v108);
          }
          else
          {
            v105 = **(_DWORD **)(v102 + 52);
            v106 = fs("%.1f", 0.0 / 10.0);
            (*(void (__thiscall **)(_DWORD, char *))(v105 + 472))(*(_DWORD *)(v102 + 52), v106);
          }
LABEL_201:
          v109 = *(_DWORD *)(v103 + 48);
          v110 = *(_DWORD *)(v158 + 48);
          if ( v109 <= v110 )
          {
            if ( v109 < v110 )
              (*(void (__thiscall **)(_DWORD, D3DXCOLOR *))(**(_DWORD **)(v102 + 52) + 468))(
                *(_DWORD *)(v102 + 52),
                &Color::m_kDxRedColor);
          }
          else
          {
            (*(void (__thiscall **)(_DWORD, D3DXCOLOR *))(**(_DWORD **)(v102 + 52) + 468))(
              *(_DWORD *)(v102 + 52),
              &Color::m_kDxGreenColor);
          }
          goto LABEL_205;
        }
      }
    }
  }
LABEL_205:
  if ( uiItemPos )
  {
    if ( uiItemPos != 1 )
      goto LABEL_222;
    v111 = (int)v2->m_pkAfterOptionText;
    v112 = (int)v2->m_kAfterOptionValue;
    v159 = (int)v2->m_kBeforeOptionValue;
  }
  else
  {
    v111 = (int)v2->m_pkBeforeOptionText;
    v112 = (int)v2->m_kBeforeOptionValue;
    v159 = (int)v2->m_kAfterOptionValue;
  }
  if ( v111 )
  {
    if ( v112 )
    {
      if ( *(_DWORD *)(v111 + 56) )
      {
        v113 = *(_DWORD *)(v112 + 52);
        if ( v113 >= 0 )
        {
          if ( v113 > 0 )
            goto LABEL_260;
          if ( *(_DWORD *)(v159 + 52) <= 0 )
            goto LABEL_218;
          if ( v113 )
          {
LABEL_260:
            v116 = **(_DWORD **)(v111 + 56);
            v117 = fs("- %d", *(_DWORD *)(v112 + 52));
            (*(void (__thiscall **)(_DWORD, char *))(v116 + 472))(*(_DWORD *)(v111 + 56), v117);
          }
          else
          {
            v114 = **(_DWORD **)(v111 + 56);
            v115 = fs("%d", 0);
            (*(void (__thiscall **)(_DWORD, char *))(v114 + 472))(*(_DWORD *)(v111 + 56), v115);
          }
LABEL_218:
          v118 = *(_DWORD *)(v112 + 52);
          v119 = *(_DWORD *)(v159 + 52);
          if ( v118 <= v119 )
          {
            if ( v118 < v119 )
              (*(void (__stdcall **)(D3DXCOLOR *))(**(_DWORD **)(v111 + 56) + 468))(&Color::m_kDxRedColor);
          }
          else
          {
            (*(void (__stdcall **)(D3DXCOLOR *))(**(_DWORD **)(v111 + 56) + 468))(&Color::m_kDxGreenColor);
          }
          goto LABEL_222;
        }
      }
    }
  }
LABEL_222:
  if ( uiItemPos )
  {
    if ( uiItemPos != 1 )
      goto LABEL_239;
    v120 = (int)v2->m_pkAfterOptionText;
    v121 = (int)v2->m_kAfterOptionValue;
    v122 = (int)v2->m_kBeforeOptionValue;
  }
  else
  {
    v120 = (int)v2->m_pkBeforeOptionText;
    v121 = (int)v2->m_kBeforeOptionValue;
    v122 = (int)v2->m_kAfterOptionValue;
  }
  v160 = v122;
  v146 = v121;
  if ( v120 )
  {
    if ( v121 )
    {
      if ( *(_DWORD *)(v120 + 20) )
      {
        v123 = *(_DWORD *)(v121 + 56);
        if ( v123 >= 0 )
        {
          if ( v123 > 0 )
            goto LABEL_261;
          if ( *(_DWORD *)(v122 + 56) <= 0 )
            goto LABEL_235;
          if ( v123 )
          {
LABEL_261:
            v126 = **(_DWORD **)(v120 + 20);
            v127 = fs("+ %d", v123);
            (*(void (__thiscall **)(_DWORD, char *))(v126 + 472))(*(_DWORD *)(v120 + 20), v127);
            v121 = v146;
          }
          else
          {
            v124 = **(_DWORD **)(v120 + 20);
            v125 = fs("%d", 0);
            (*(void (__thiscall **)(_DWORD, char *))(v124 + 472))(*(_DWORD *)(v120 + 20), v125);
          }
LABEL_235:
          v128 = *(_DWORD *)(v121 + 56);
          v129 = *(_DWORD *)(v160 + 56);
          if ( v128 <= v129 )
          {
            if ( v128 < v129 )
              (*(void (__stdcall **)(D3DXCOLOR *))(**(_DWORD **)(v120 + 20) + 468))(&Color::m_kDxRedColor);
          }
          else
          {
            (*(void (__stdcall **)(D3DXCOLOR *))(**(_DWORD **)(v120 + 20) + 468))(&Color::m_kDxGreenColor);
          }
          goto LABEL_239;
        }
      }
    }
  }
LABEL_239:
  if ( uiItemPos )
  {
    if ( uiItemPos != 1 )
      return;
    v130 = v2->m_iAfterReMainRandomCnt;
  }
  else
  {
    v130 = v2->m_iBeforeReMainRandomCnt;
  }
  if ( v130 >= 0 )
  {
    if ( v2->m_pkRandomCntTextWin )
    {
      v131 = v2->m_pkRandomCntTextWin->vfptr;
      v132 = v130;
      v133 = (char *)TextData3::Get(0xD7E3063F);
      v134 = fs(v133, v132);
      v131[118].__vecDelDtor((NiRefObject *)v2->m_pkRandomCntTextWin, (unsigned int)v134);
    }
  }
}

//----- (00434BF0) --------------------------------------------------------
void __thiscall RandomOptionWin::RefreshItemSlot(RandomOptionWin *this)
{
  RandomOptionWin *v1; // esi@1
  unsigned int v2; // eax@1
  InventoryWin *v3; // ecx@1
  ItemIcon *v4; // ecx@2
  Item *v5; // eax@3

  v1 = this;
  v2 = this->m_pkChangeSlot->m_uiSenderInvIndex;
  v3 = this->m_pkInventoryWin;
  if ( v2 < 0xC0 && (v4 = (ItemIcon *)&v3->m_apkInvWin[v2]->vfptr) != 0 )
    v5 = ItemIcon::GetItem(v4);
  else
    v5 = 0;
  ItemIcon::SetItem((ItemIcon *)&v1->m_pkChangeSlot->vfptr, v5, 1);
  RandomOptionWin::SetItemOptionText(v1, 1u);
}

//----- (00434C40) --------------------------------------------------------
void __thiscall RandomOptionWin::SetItemOption(RandomOptionWin *this, unsigned int uiItemPos, ItemOptionStorage *kOptionStorage)
{
  char *v3; // esi@4
  signed int v4; // edx@7
  char *v5; // eax@8

  if ( kOptionStorage )
  {
    if ( uiItemPos )
    {
      if ( uiItemPos != 1 )
        return;
      v3 = (char *)this->m_kAfterOptionValue;
    }
    else
    {
      v3 = (char *)this->m_kBeforeOptionValue;
    }
    if ( v3 )
    {
      v4 = 0;
      if ( kOptionStorage->fixed.optionnumber.bin & 0xFE )
      {
        v5 = (char *)kOptionStorage->optionlist;
        do
        {
          *(_DWORD *)&v3[4 * (unsigned __int8)*v5] = *(_WORD *)(v5 + 1);
          ++v4;
          v5 += 3;
        }
        while ( v4 < (signed int)((unsigned int)kOptionStorage->fixed.optionnumber.bin >> 1) );
      }
      RandomOptionWin::SetItemOptionText(this, uiItemPos);
    }
  }
}

//----- (00434CB0) --------------------------------------------------------
ChangeSlotWin *__cdecl ChangeSlotWin::CreateWin(int iXPos, int iYPos, PgWin *pkParent)
{
  PgWin *v3; // eax@1
  ItemIcon *v4; // esi@1
  PgWin *v5; // edi@8
  ChangeSlotWin *v6; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x1D4u);
  v4 = (ItemIcon *)v3;
  result.m_pObject = v3;
  v8 = 0;
  if ( v3 )
  {
    ItemIcon::ItemIcon((ItemIcon *)v3);
    LOBYTE(v8) = 1;
    v4->vfptr = (NiRefObjectVtbl *)&ChangeSlotWin::`vftable'{for `NiNode'};
    v4->vfptr = (IDirectMessengerVtbl *)&ChangeSlotWin::`vftable'{for `IDirectMessenger'};
    ItemIcon::SetItem(v4, 0, 1);
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v8 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, (PgWin *)&v4->vfptr);
  if ( (unsigned __int8)((int (__thiscall *)(ItemIcon *, int, int, PgWin *))v4->vfptr[153].__vecDelDtor)(
                          v4,
                          iXPos,
                          iYPos,
                          pkParent) )
  {
    ((void (__thiscall *)(ItemIcon *))v4->vfptr[89].__vecDelDtor)(v4);
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = (ChangeSlotWin *)v4;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, (PgWin *)&v4->vfptr);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = 0;
  }
  return v6;
}
// 976AFC: using guessed type void (__thiscall *ChangeSlotWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 976B1C: using guessed type int (__thiscall *ChangeSlotWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00434E10) --------------------------------------------------------
char __thiscall RandomOptionWin::Create(RandomOptionWin *this, PgFrameWork *pkFrameWork)
{
  RandomOptionWin *v2; // esi@1
  PgFrameWork *v3; // edi@1
  NiTexturePalette *v4; // ebx@1
  const char *v5; // eax@3
  NiNode *v6; // eax@3
  NiNode *v7; // esi@7
  volatile LONG *v8; // eax@7
  PgSprData *v10; // eax@12
  int v11; // ebx@15
  NiSourceTexture *v12; // eax@17
  PgSprData *v13; // eax@20
  PgSprData *v14; // edi@21
  PgSprData *v15; // edi@22
  char *v16; // eax@22
  PgWinText *v17; // edi@22
  NiRefObjectVtbl *v18; // ebx@22
  PgFont *v19; // eax@22
  char *v20; // eax@22
  char *v21; // eax@22
  PgWinText *v22; // ebx@22
  NiRefObjectVtbl *v23; // edi@22
  NiUnsharedGeometryGroup *v24; // eax@22
  PgWinAbbreviateText *v25; // eax@22
  NiRefObjectVtbl *v26; // edi@22
  PgFont *v27; // eax@22
  signed int v28; // edi@22
  _DWORD *v29; // ebx@22
  char *v30; // ST24_4@23
  char *v31; // eax@23
  char *v32; // eax@23
  PgWinAbbreviateText *v33; // eax@23
  char *v34; // eax@23
  PgWinAbbreviateText *v35; // eax@23
  PgSprData *v36; // eax@24
  int v37; // ebx@24
  PgWinSpr *v38; // edi@24
  ChangeSlotWin *v39; // eax@24
  PgWinBut *v40; // eax@24
  PgWin *v41; // edi@24
  char *v42; // eax@24
  PgWinSpr *v43; // edi@24
  PgWinSpr *v44; // ebx@26
  const char *v45; // eax@38
  NiNode *v46; // esi@39
  SpEffect *v47; // edi@43
  NiNode *v48; // eax@44
  SpEffect *v49; // eax@44
  NiNode *v50; // eax@47
  NiNode *v51; // esi@49
  NiNode *v52; // esi@52
  D3DXCOLOR v53; // [sp+2Ch] [bp-B0h]@18
  int *v54; // [sp+3Ch] [bp-A0h]@18
  int *v55; // [sp+40h] [bp-9Ch]@18
  NiSourceTexture *v56; // [sp+44h] [bp-98h]@18
  char *kOptionText[15]; // [sp+58h] [bp-84h]@22
  UIUtil ui; // [sp+94h] [bp-48h]@15
  float v59; // [sp+A8h] [bp-34h]@47
  float v60; // [sp+ACh] [bp-30h]@47
  float v61; // [sp+B0h] [bp-2Ch]@47
  int iOffX; // [sp+B4h] [bp-28h]@15
  int v63; // [sp+B8h] [bp-24h]@22
  int iOffY; // [sp+BCh] [bp-20h]@15
  char **v65; // [sp+C0h] [bp-1Ch]@22
  NiPointer<NiNode> pkNiNodePtr; // [sp+C4h] [bp-18h]@36
  int iLeft; // [sp+C8h] [bp-14h]@12
  NiPointer<NiNode> spNode; // [sp+CCh] [bp-10h]@1
  int v69; // [sp+D8h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pkFrameWork;
  this->m_pkFrameWork = pkFrameWork;
  v69 = 0;
  this->m_pkInventoryWin = (InventoryWin *)v3[19].m_BackFrameID;
  v4 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "Game\\RandomOptionWin.nif ");
  PgUtil::LoadNodeNifFile(v5, &spNode, v4);
  v6 = spNode.m_pObject;
  if ( !spNode.m_pObject )
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("Game\\RandomOptionWin.nif load fila", "LoadFail", spNode.m_pObject);
      v6 = spNode.m_pObject;
    }
    v69 = -1;
    if ( !v6 )
      return 0;
    v7 = v6;
    v8 = (volatile LONG *)&v6->m_uiRefCount;
    goto LABEL_8;
  }
  v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iLeft, (int *)&pkFrameWork, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v10, 0, v3, "RandomOptionWin", 0) )
  {
LABEL_13:
    v7 = spNode.m_pObject;
    v69 = -1;
    if ( !spNode.m_pObject )
      return 0;
    v8 = (volatile LONG *)&spNode.m_pObject->m_uiRefCount;
LABEL_8:
    if ( !InterlockedDecrement(v8) )
    {
      if ( v7 )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    }
    return 0;
  }
  v11 = iLeft;
  iOffY = (int)pkFrameWork;
  iOffX = iLeft;
  UIUtil::UIUtil(&ui);
  LOBYTE(v69) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, 0, 0);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  if ( !MenuTexMgr::GetTexture(0x18u) )
  {
    LOBYTE(v69) = 0;
    UIUtil::~UIUtil(&ui);
    goto LABEL_13;
  }
  v12 = MenuTexMgr::GetTexture(0x13u);
  if ( v12 )
  {
    v56 = v12;
    v55 = (int *)&pkFrameWork;
    v54 = &iLeft;
    LODWORD(v53.a) = "Theme";
  }
  else
  {
    *(float *)&v56 = 0.0;
    v55 = (int *)&pkFrameWork;
    v54 = &iLeft;
    LODWORD(v53.a) = "Theme";
  }
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, (const char *)LODWORD(v53.a), v54, v55, v56);
  PgWinSpr::CreateWin(iLeft, (int)pkFrameWork, v13, (PgWin *)&v2->vfptr, 0, 0);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &iLeft, (int *)&pkFrameWork, 0);
    PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(iLeft, (int)pkFrameWork, v14, (PgWin *)&v2->vfptr, 3u, 0, 0);
  }
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &iLeft, (int *)&pkFrameWork, 0);
  PgSprData::Add(v15, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(v15, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinBut::CreateWin(iLeft - v11, (int)pkFrameWork - iOffY, v15, (PgWin *)&v2->vfptr, 4u, 0, 0);
  UIUtil::CreateSpr(&ui, "IconSlot", 0);
  *(D3DXCOLOR *)((char *)&v53 + 8) = Color::m_kDxWhiteColor;
  v16 = (char *)TextData3::Get(0x858292DE);
  v17 = UIUtil::CreateTextNoSpr(&ui, "WinTitle", v16, *(D3DXCOLOR *)((char *)&v53 + 8), 5u);
  v18 = v17->vfptr;
  v19 = Font::Get(MAIN_MENU);
  v18[113].__vecDelDtor((NiRefObject *)v17, (unsigned int)v19);
  v17->vfptr[117].__vecDelDtor((NiRefObject *)v17, (unsigned int)&Color::m_kDxWinTitleColor);
  v17->vfptr[122].__vecDelDtor((NiRefObject *)v17, 1u);
  v17->vfptr[60].__vecDelDtor((NiRefObject *)v17, 0);
  UIUtil::CreateSpr(&ui, "Panel01", 0);
  UIUtil::CreateSpr(&ui, "Panel02", 0);
  UIUtil::CreateSpr(&ui, "Panel03", 0);
  v53 = Color::m_kDxWhiteColor;
  v20 = (char *)TextData3::Get(0xD024FA45);
  UIUtil::CreateText(&ui, "Text01", v20, 0, v53, 4u, 0, 1);
  v53 = Color::m_kDxWhiteColor;
  v21 = (char *)TextData3::Get(0xDEE0F93B);
  UIUtil::CreateText(&ui, "Text02", v21, 0, v53, 4u, 0, 1);
  v22 = UIUtil::CreateTextNoSpr(&ui, "Text03", &byte_976916, Color::m_kDxWhiteColor, 4u);
  v23 = v22->vfptr;
  v24 = TextData3::Get(0x2D2AF24Au);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *, _DWORD))v23[120].__vecDelDtor)(v22, v24, 0);
  kOptionText[0] = (char *)TextData::Get(0x535F9BA8u);
  kOptionText[1] = (char *)TextData::Get(0x445FA199u);
  kOptionText[2] = (char *)TextData::Get(0x9CAB8AE1);
  kOptionText[3] = (char *)TextData::Get(0x495F9DA2u);
  kOptionText[4] = (char *)TextData::Get(0x575F9C9Du);
  kOptionText[5] = (char *)TextData3::Get(0xE2DB033E);
  kOptionText[6] = (char *)TextData::Get(0xD342414A);
  kOptionText[7] = (char *)TextData::Get(0x34482B2Bu);
  kOptionText[8] = (char *)TextData::Get(0x3B4B7398u);
  kOptionText[9] = (char *)TextData::Get(0x2D3C7698u);
  kOptionText[10] = (char *)TextData::Get(0x9A03F1DE);
  kOptionText[11] = (char *)TextData::Get(0xD9E9EA4E);
  kOptionText[12] = (char *)TextData::Get(0x2D8F9C72u);
  kOptionText[13] = (char *)TextData3::Get(0x939BE20u);
  kOptionText[14] = (char *)TextData3::Get(0x65C9A5E5u);
  v25 = UIUtil::CreateText(&ui, "Text04", &byte_976917, 0, Color::m_kDxWhiteColor, 5u, 0, 1);
  v2->m_pkRandomCntTextWin = (PgWinText *)v25;
  v26 = v25->vfptr;
  v27 = Font::Get(TITLEBOLD);
  v26[113].__vecDelDtor((NiRefObject *)v2->m_pkRandomCntTextWin, (unsigned int)v27);
  v28 = 1;
  v65 = kOptionText;
  v29 = v2->m_pkAfterOptionText;
  v63 = 15;
  do
  {
    *(float *)&v56 = 0.0;
    v55 = 0;
    v54 = (int *)4;
    v53 = Color::m_kDxWhiteColor;
    v30 = *v65;
    v31 = fs("ItemText%02d", v28);
    UIUtil::CreateText(&ui, v31, v30, 0, v53, (unsigned int)v54, (NiSourceTexture *)v55, (bool)v56);
    *(float *)&v56 = 0.0;
    v55 = 0;
    v54 = (int *)5;
    v53 = Color::m_kDxWhiteColor;
    v32 = fs("BeforeCount%02d", v28);
    v33 = UIUtil::CreateText(&ui, v32, "-", 0, v53, (unsigned int)v54, (NiSourceTexture *)v55, (bool)v56);
    *(float *)&v56 = 0.0;
    v55 = 0;
    v54 = (int *)5;
    *(v29 - 15) = v33;
    v53 = Color::m_kDxWhiteColor;
    v34 = fs("AfterCount%02d", v28);
    v35 = UIUtil::CreateText(&ui, v34, "-", 0, v53, (unsigned int)v54, (NiSourceTexture *)v55, (bool)v56);
    ++v65;
    *v29 = v35;
    ++v29;
    ++v28;
    --v63;
  }
  while ( v63 );
  v36 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ForgeSlot", &iLeft, (int *)&pkFrameWork, 0);
  v37 = iOffX;
  v38 = PgWinSpr::CreateWin(iLeft - iOffX, (int)pkFrameWork - iOffY, v36, (PgWin *)&v2->vfptr, 0, 0);
  v39 = ChangeSlotWin::CreateWin(iLeft - v37 + 1, (int)&pkFrameWork->vfptr + -iOffY + 1, (PgWin *)&v2->vfptr);
  v2->m_pkChangeSlot = v39;
  v39->vfptr[60].__vecDelDtor((NiRefObject *)v39, 1u);
  ((void (__stdcall *)(signed int))v2->m_pkChangeSlot->vfptr[64].__vecDelDtor)(1);
  v38->vfptr[60].__vecDelDtor((NiRefObject *)v38, 1u);
  v38->vfptr[64].__vecDelDtor((NiRefObject *)v38, 1u);
  ((void (__stdcall *)(signed int))v2->m_pkChangeSlot->vfptr[129].__vecDelDtor)(1);
  ((void (__stdcall *)(signed int))v2->m_pkChangeSlot->vfptr[140].__vecDelDtor)(2);
  v2->m_pkChangeSlot->m_eType = 1;
  IconWin::ShowFocus((IconWin *)&v2->m_pkChangeSlot->vfptr, 1);
  ChangeSlotWin::ReSetSlot(v2->m_pkChangeSlot);
  v40 = UIUtil::CreateButton(&ui, 0, "Ok", 0, 3);
  v56 = (NiSourceTexture *)5;
  v41 = (PgWin *)v40;
  *(D3DXCOLOR *)((char *)&v53 + 8) = Color::m_kDxWhiteColor;
  v42 = (char *)TextData3::Get(0xF591F37u);
  UIUtil::CreateAttachedText(v41, v42, *(D3DXCOLOR *)((char *)&v53 + 8), (unsigned int)v56);
  v43 = PgWinSpr::CreateWin(0, 0, 1u, 1u, (PgWin *)&v2->vfptr, 0, 0);
  iOffX = (int)v43;
  if ( v43 )
    InterlockedIncrement((volatile LONG *)&v43->m_uiRefCount);
  v44 = (PgWinSpr *)v2->m_pAttachEffect.m_pObject;
  LOBYTE(v69) = 2;
  if ( v44 != v43 )
  {
    if ( v44 && !InterlockedDecrement((volatile LONG *)&v44->m_uiRefCount) && v44 )
      v44->vfptr->__vecDelDtor((NiRefObject *)v44, 1u);
    v2->m_pAttachEffect.m_pObject = (NiNode *)v43;
    if ( v43 )
      InterlockedIncrement((volatile LONG *)&v43->m_uiRefCount);
  }
  LOBYTE(v69) = 1;
  if ( v43 && !InterlockedDecrement((volatile LONG *)&v43->m_uiRefCount) )
    v43->vfptr->__vecDelDtor((NiRefObject *)v43, 1u);
  ((void (__thiscall *)(RandomOptionWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.30000001,
    0.5);
  pkNiNodePtr.m_pObject = 0;
  LOBYTE(v69) = 3;
  if ( !Folder::m_bInit )
    Folder::Init();
  *(float *)&v56 = 0.0;
  v55 = (int *)&pkNiNodePtr;
  v45 = Folder::Merge(&Folder::m_acEffect, "RandomOptionProgress.nif");
  PgUtil::LoadNodeNifFile(v45, (NiPointer<NiNode> *)v55, (NiTexturePalette *)v56);
  if ( !pkNiNodePtr.m_pObject )
  {
    LOBYTE(v69) = 0;
    UIUtil::~UIUtil(&ui);
    v46 = spNode.m_pObject;
    v69 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v46 )
      v46->vfptr->__vecDelDtor((NiRefObject *)v46, 1u);
    return 0;
  }
  v47 = (SpEffect *)operator new(0x44u);
  iOffX = (int)v47;
  LOBYTE(v69) = 4;
  if ( v47 )
  {
    v48 = (NiNode *)NiObject::Clone((NiObject *)&pkNiNodePtr.m_pObject->vfptr);
    SpEffect::SpEffect(v47, v48);
  }
  else
  {
    v49 = 0;
  }
  LOBYTE(v69) = 3;
  v2->m_apkEffect = v49;
  if ( v49 )
  {
    v50 = v49->m_spEffect.m_pObject;
    v59 = 0.0;
    v60 = 0.0;
    v50->m_kLocal.m_Translate.x = 0.0;
    v61 = 1000.0;
    v50->m_kLocal.m_Translate.y = 0.0;
    v50->m_kLocal.m_Translate.z = 1000.0;
    v2->m_apkEffect->m_bClamp = 1;
  }
  RandomOptionWin::ResetItemOption(v2);
  LOBYTE(v69) = 1;
  if ( pkNiNodePtr.m_pObject )
  {
    v51 = pkNiNodePtr.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&pkNiNodePtr.m_pObject->m_uiRefCount) )
    {
      if ( v51 )
        v51->vfptr->__vecDelDtor((NiRefObject *)v51, 1u);
    }
  }
  LOBYTE(v69) = 0;
  UIUtil::~UIUtil(&ui);
  v52 = spNode.m_pObject;
  v69 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v52 )
    v52->vfptr->__vecDelDtor((NiRefObject *)v52, 1u);
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004357E0) --------------------------------------------------------
void __thiscall RandomOptionWin::UpdateMeWin(RandomOptionWin *this, float fCurTime)
{
  RandomOptionWin *v2; // esi@1
  SpEffect *v3; // ecx@1
  char *v4; // eax@6
  MsgBox *v5; // eax@6

  v2 = this;
  v3 = this->m_apkEffect;
  if ( v3->m_bLive )
  {
    SpEffect::Update(v3, fCurTime);
  }
  else if ( v2->m_bStartEffect && v2->m_bSuccess && ItemIcon::GetItem((ItemIcon *)&v2->m_pkChangeSlot->vfptr) )
  {
    RandomOptionWin::RefreshItemSlot(v2);
    v2->m_bUseRandomOption = 0;
    v4 = (char *)TextData3::Get(0x99D2D6C4);
    v5 = MsgBox::Modeless(MSGBOX_OKCANCEL, v4);
    v2->m_pkMsgBox = v5;
    if ( v5 )
    {
      ((void (__stdcall *)(_DWORD))v5->vfptr->SetMsgHooker)(&v2->vfptr);
      v2->m_bStartEffect = 0;
      v2->m_bSuccess = 0;
    }
  }
}

//----- (00435880) --------------------------------------------------------
void __thiscall RandomOptionWin::SetItem(RandomOptionWin *this, unsigned int uiItemPos, Item *pkItem)
{
  RandomOptionWin *v3; // edi@1
  bool v4; // sf@4
  int v5; // eax@4
  int v6; // eax@5
  ItemOptionStorage *v7; // eax@7

  v3 = this;
  if ( pkItem )
  {
    ItemIcon::SetItem((ItemIcon *)&this->m_pkChangeSlot->vfptr, pkItem, 1);
    if ( uiItemPos )
    {
      if ( uiItemPos != 1 )
      {
LABEL_7:
        v7 = (ItemOptionStorage *)((int (__thiscall *)(_DWORD))pkItem->vfptr[12].__vecDelDtor)(pkItem);
        RandomOptionWin::SetItemOption(v3, uiItemPos, v7);
        return;
      }
      v5 = v3->m_uiLimitRandomOption
         - (unsigned __int8)((int (__thiscall *)(_DWORD))pkItem->vfptr[18].__vecDelDtor)(pkItem);
      v4 = v5 < 0;
      v3->m_iAfterReMainRandomCnt = v5;
    }
    else
    {
      v6 = v3->m_uiLimitRandomOption
         - (unsigned __int8)((int (__thiscall *)(_DWORD))pkItem->vfptr[18].__vecDelDtor)(pkItem);
      v4 = v6 < 0;
      v3->m_iBeforeReMainRandomCnt = v6;
    }
    if ( v4 )
      return;
    goto LABEL_7;
  }
}

//----- (00435900) --------------------------------------------------------
char __thiscall RandomOptionWin::DropItemSlot(RandomOptionWin *this, PgWinDrop *pkDrop)
{
  RandomOptionWin *v2; // esi@1
  void *v3; // ebx@1
  Item *v5; // edi@3
  NiUnsharedGeometryGroup *v6; // eax@5
  int v7; // eax@7
  ItemOptionStorage *v8; // eax@8

  v2 = this;
  RandomOptionWin::ResetItemOption(this);
  v3 = pkDrop->m_pkContents;
  if ( !v3 )
    return 0;
  v5 = (Item *)*((_DWORD *)v3 + 5);
  if ( !v5 )
    return 0;
  if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v5->vfptr[18].__vecDelDtor)(*((_DWORD *)v3 + 5)) >= v2->m_uiLimitRandomOption )
  {
    v6 = TextData3::Get(0xE5E9C8F5);
    GameFrameWork::AddSysMsg((GameFrameWork *)v2->m_pkFrameWork, (const char *)v6);
    return 0;
  }
  ChangeSlotWin::ReSetSlot(v2->m_pkChangeSlot);
  v2->m_pkChangeSlot->m_uiSenderType = *((_DWORD *)v3 + 2);
  v2->m_pkChangeSlot->m_uiSenderInvIndex = *((_DWORD *)v3 + 3);
  v2->m_pkChangeSlot->m_pkSender = pkDrop->m_pkSender;
  ChangeSlotWin::SetSenderInvSlotLock(v2->m_pkChangeSlot, 1);
  ItemIcon::SetItem((ItemIcon *)&v2->m_pkChangeSlot->vfptr, v5, 1);
  v7 = v2->m_uiLimitRandomOption - (unsigned __int8)((int (__thiscall *)(Item *))v5->vfptr[18].__vecDelDtor)(v5);
  v2->m_iBeforeReMainRandomCnt = v7;
  if ( v7 >= 0 )
  {
    v8 = (ItemOptionStorage *)((int (__thiscall *)(Item *))v5->vfptr[12].__vecDelDtor)(v5);
    RandomOptionWin::SetItemOption(v2, 0, v8);
  }
  return 1;
}

//----- (004359F0) --------------------------------------------------------
char __thiscall ChangeSlotWin::EatDropInstance(ChangeSlotWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  ChangeSlotWin *v4; // esi@1
  _DWORD *v6; // eax@4
  int v7; // ecx@5
  _BYTE *v8; // eax@8
  RandomOptionWin *v9; // eax@10
  GameFrameWork *v10; // esi@12
  NiUnsharedGeometryGroup *v11; // eax@13

  v4 = this;
  if ( this->m_bLock )
  {
    PgCursor::ms_bKeepDrop = 1;
    return 0;
  }
  if ( !*pkDrop )
    return 0;
  v6 = (*pkDrop)->m_pkContents;
  if ( v6 )
  {
    v7 = v6[5];
    if ( !v7 || v6[4] || v6[2] )
      goto LABEL_14;
    v8 = (_BYTE *)(*(int (**)(void))(*(_DWORD *)v7 + 48))();
    if ( v8 )
    {
      if ( *v8 & 0xFE )
      {
        v9 = (RandomOptionWin *)PgWin::GetParentWin((PgWin *)&v4->vfptr);
        if ( v9 )
          return RandomOptionWin::DropItemSlot(v9, *pkDrop);
      }
    }
  }
  v10 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v10 )
  {
    v11 = TextData3::Get(0x37482A69u);
    GameFrameWork::AddSysMsg(v10, (const char *)v11);
  }
LABEL_14:
  PgCursor::ms_bKeepDrop = 1;
  return 0;
}
// B648B8: using guessed type bool PgCursor::ms_bKeepDrop;

//----- (00435AA0) --------------------------------------------------------
void __thiscall RandomOptionWin::RandomOptionWin(RandomOptionWin *this)
{
  RandomOptionWin *v1; // esi@1
  int v2; // edi@1
  PgWinText **v3; // eax@1
  signed int v4; // ecx@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v5; // [sp-1Ch] [bp-40h]@1
  int v6; // [sp-Ch] [bp-30h]@1
  signed int v7; // [sp-8h] [bp-2Ch]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v8; // [sp+10h] [bp-14h]@1
  RandomOptionWin *v9; // [sp+14h] [bp-10h]@1
  int v10; // [sp+20h] [bp-4h]@1

  v1 = this;
  v9 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&RandomOptionWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&RandomOptionWin::`vftable'{for `IDirectMessenger'};
  v10 = 0;
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  v1->m_kDrop.m_pkContents = 0;
  v1->m_kDrop.m_pkSender = 0;
  v2 = (int)&v1->m_kDropContents;
  *(_DWORD *)v2 = &DropContents::`vftable';
  *(_WORD *)(v2 + 60) = -1;
  *(_DWORD *)(v2 + 64) = 0;
  v1->m_pkChangeSlot = 0;
  v1->m_bStartEffect = 0;
  v1->m_apkEffect = 0;
  v1->m_pAttachEffect.m_pObject = 0;
  v1->m_fCurReqTime = -1.0;
  v8 = &v5;
  *(_WORD *)&v1->m_bSuccess = 256;
  v1->m_bSelectChangeOpt = 0;
  v1->m_iBeforeReMainRandomCnt = 0;
  v1->m_iAfterReMainRandomCnt = 0;
  v7 = 15;
  v6 = 0;
  LOBYTE(v10) = 3;
  v5._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v5, "LimitRandomOption", 0x11u);
  v1->m_uiLimitRandomOption = (unsigned __int16)CSingleDataMap::GetValue(&g_kSingleDataMap, v5);
  v1->m_pkMsgBox = 0;
  v1->m_bRandomStart = 0;
  v1->m_kDrop.m_pkContents = &v1->m_kDropContents;
  v3 = v1->m_pkAfterOptionText;
  v4 = 15;
  do
  {
    *(v3 - 15) = 0;
    *v3 = 0;
    ++v3;
    --v4;
  }
  while ( v4 );
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 976D88: using guessed type void (__thiscall *RandomOptionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 976DA4: using guessed type int (__thiscall *RandomOptionWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00435BD0) --------------------------------------------------------
RandomOptionWin *__cdecl RandomOptionWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  RandomOptionWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x2D8u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    RandomOptionWin::RandomOptionWin((RandomOptionWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (RandomOptionWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00435D00) --------------------------------------------------------
void __thiscall RandomOptionWin::DirectMessage(RandomOptionWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  RandomOptionWin *v4; // esi@1
  _DWORD *v5; // edi@2
  Item *v6; // eax@5
  Item *v7; // edi@5
  int v8; // eax@6
  ItemOptionStorage *v9; // eax@7
  ItemInfo *v10; // eax@8
  int v11; // eax@9
  PgWinText *v12; // ecx@9
  void *(__thiscall *v13)(NiRefObject *, unsigned int); // eax@9
  PgWinText *v14; // ecx@10
  void *(__thiscall *v15)(NiRefObject *, unsigned int); // eax@10
  PgWinText *v16; // ecx@13
  void *(__thiscall *v17)(NiRefObject *, unsigned int); // eax@13

  v4 = this;
  if ( iMsgTag != 27 )
    return;
  v5 = pvBody;
  if ( !pvBody )
    return;
  if ( *(_DWORD *)pvBody )
    goto LABEL_12;
  if ( !BYTE1(this->m_pkAfterOptionText[14]) )
  {
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x61u, 0, 0);
    v14 = v4->m_pkAfterOptionText[9];
    *(_WORD *)((char *)&v4->m_pkAfterOptionText[14] + 1) = 1;
    v15 = v14->vfptr[60].__vecDelDtor;
    LOBYTE(v14[1].m_spCollisionObject.m_pObject) = 0;
    ((void (__stdcall *)(signed int))v15)(1);
    goto LABEL_11;
  }
  RandomOptionWin::ResetItemOption((RandomOptionWin *)((char *)this - 232));
  v6 = InventoryWin::GetItemInInv(
         (InventoryWin *)LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[1][0]),
         (unsigned int)v4->m_pkAfterOptionText[9][1].m_kPropertyList.m_pkTail);
  v7 = v6;
  if ( v6 )
  {
    ItemIcon::SetItem((ItemIcon *)v4->m_pkAfterOptionText[9], v6, 1);
    v8 = v4->m_kBeforeOptionValue[2] - (unsigned __int8)((int (__thiscall *)(Item *))v7->vfptr[18].__vecDelDtor)(v7);
    v4->m_kBeforeOptionValue[0] = v8;
    if ( v8 >= 0 )
    {
      v9 = (ItemOptionStorage *)((int (__thiscall *)(Item *))v7->vfptr[12].__vecDelDtor)(v7);
      RandomOptionWin::SetItemOption((RandomOptionWin *)((char *)v4 - 232), 0, v9);
    }
  }
  v10 = ItemInfoTab::GetByInxName("RandomOption");
  if ( v10 )
  {
    v11 = InventoryWin::FindItem((InventoryWin *)LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[1][0]), v10->ID);
    GameFrameWork::NcItemRandomOptionChangeReq(
      (GameFrameWork *)LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[0][2]),
      (int)v4->m_pkAfterOptionText[9][1].m_kPropertyList.m_pkTail,
      v11);
    SpEffect::Start((SpEffect *)v4->m_pkAfterOptionText[11], (NiNode *)&v4->m_pkAfterOptionText[12]->vfptr);
    v12 = v4->m_pkAfterOptionText[9];
    LOBYTE(v4->m_pkAfterOptionText[10]) = 1;
    v13 = v12->vfptr[60].__vecDelDtor;
    LOBYTE(v12[1].m_spCollisionObject.m_pObject) = 1;
    ((void (__stdcall *)(_DWORD))v13)(0);
    SoundMgr::PlayInterfaceSound(&g_kSoundMgr, RandomOptionProgress);
    v5 = pvBody;
    *(float *)&v4->m_pkAfterOptionText[13] = Timer::ms_fCurTime;
    BYTE2(v4->m_pkAfterOptionText[14]) = 1;
LABEL_11:
    LOBYTE(v4->m_kBeforeOptionValue[5]) ^= 1u;
LABEL_12:
    if ( *v5 == 1 )
    {
      v16 = v4->m_pkAfterOptionText[9];
      *(_WORD *)((char *)&v4->m_pkAfterOptionText[14] + 1) = 1;
      v17 = v16->vfptr[60].__vecDelDtor;
      LOBYTE(v16[1].m_spCollisionObject.m_pObject) = 0;
      ((void (__stdcall *)(signed int))v17)(1);
      if ( LOBYTE(v4->m_kBeforeOptionValue[5]) == 1 )
        LOBYTE(v4->m_kBeforeOptionValue[5]) = 0;
    }
    v4->m_kBeforeOptionValue[4] = 0;
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00435EB0) --------------------------------------------------------
void __thiscall RandomOptionWin::OnApply(RandomOptionWin *this)
{
  RandomOptionWin *v1; // esi@1
  ItemInfo *v2; // edi@2
  NiUnsharedGeometryGroup *v3; // eax@4
  Item *v4; // eax@5
  NiUnsharedGeometryGroup *v5; // eax@6
  NiUnsharedGeometryGroup *v6; // eax@9
  MsgBox *v7; // eax@11
  char *v8; // eax@11
  char *v9; // eax@12
  const char *v10; // eax@12
  float CurTime; // [sp+4h] [bp-4h]@2

  v1 = this;
  if ( this->m_bUseRandomOption )
  {
    CurTime = Timer::ms_fCurTime;
    v2 = ItemInfoTab::GetByInxName("RandomOption");
    if ( v2 )
    {
      if ( ItemIcon::GetItem((ItemIcon *)&v1->m_pkChangeSlot->vfptr) )
      {
        v4 = ItemIcon::GetItem((ItemIcon *)&v1->m_pkChangeSlot->vfptr);
        if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v4->vfptr[18].__vecDelDtor)(v4) < v1->m_uiLimitRandomOption )
        {
          if ( v1->m_fCurReqTime < 0.0 || CurTime - v1->m_fCurReqTime > 5.0 )
          {
            if ( InventoryWin::GetTotalItemCount(v1->m_pkInventoryWin, v2->ID) )
            {
              v7 = MsgBox::Modal(MSGBOX_RANDOMOPTION, &pcFormat);
              v1->m_pkMsgBox = v7;
              ((void (__stdcall *)(_DWORD))v7->vfptr->SetMsgHooker)(&v1->vfptr);
              v8 = (char *)TextData3::Get(0x8AE9ADF6);
              MsgBox::SetUnderSlotText(v1->m_pkMsgBox, v8);
            }
            else
            {
              v9 = (char *)TextData3::Get(0x23515B58u);
              v10 = fs(v9, v2->Name);
              GameFrameWork::AddSysMsg((GameFrameWork *)v1->m_pkFrameWork, v10);
            }
          }
          else
          {
            v6 = TextData::Get(0x85F7D6D1);
            GameFrameWork::AddSysMsg((GameFrameWork *)v1->m_pkFrameWork, (const char *)v6);
          }
        }
        else
        {
          v5 = TextData3::Get(0xE5E9C8F5);
          GameFrameWork::AddSysMsg((GameFrameWork *)v1->m_pkFrameWork, (const char *)v5);
        }
      }
      else
      {
        v3 = TextData3::Get(0xE24C1B1F);
        GameFrameWork::AddSysMsg((GameFrameWork *)v1->m_pkFrameWork, (const char *)v3);
      }
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00436020) --------------------------------------------------------
void __thiscall RandomOptionWin::OnCommand(RandomOptionWin *this, unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@4

  switch ( wParam )
  {
    case 0u:
      RandomOptionWin::OnApply(this);
      break;
    case 1u:
      RandomOptionWin::OnSlotLClick(this);
      break;
    case 3u:
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v3 )
        GameFrameWork::OpenPlayGuideSearchList(v3, "RandomOptionWin");
      break;
    case 4u:
      RandomOptionWin::OnCancel(this);
      break;
    default:
      return;
  }
}

//----- (00436090) --------------------------------------------------------
ChangeSlotWin *__thiscall ChangeSlotWin::`vector deleting destructor'(ChangeSlotWin *this, unsigned int a2)
{
  ChangeSlotWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ChangeSlotWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ChangeSlotWin::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 976AFC: using guessed type void (__thiscall *ChangeSlotWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 976B1C: using guessed type int (__thiscall *ChangeSlotWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004360D0) --------------------------------------------------------
RandomOptionWin *__thiscall RandomOptionWin::`vector deleting destructor'(RandomOptionWin *this, unsigned int a2)
{
  RandomOptionWin *v2; // esi@1

  v2 = this;
  RandomOptionWin::~RandomOptionWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00436100) --------------------------------------------------------
void __thiscall IDRankingWin::UpdateMeWin(IDRankingWin *this, float fCurTime)
{
  IDRankingWin *v2; // esi@1
  int v3; // esi@5
  signed int v4; // edi@5

  v2 = this;
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
    GameFrameWork::UpdateUIScroll(v2->m_pkIDSlideListWin, v2->m_pkIDSlideBar);
  if ( (IDRankingWin *)PgWinMgr::GetTopWin(&Pgg_kWinMgr) == v2 && !v2->m_bShowIDSlideList )
  {
    v3 = (int)v2->m_pkTopPortrait;
    v4 = 3;
    do
    {
      (*(void (**)(void))(**(_DWORD **)v3 + 268))();
      v3 += 4;
      --v4;
    }
    while ( v4 );
  }
}

//----- (00436170) --------------------------------------------------------
void __thiscall IDRankingWin::OnMouseEvent(IDRankingWin *this, PgWin::PG_MOUSE_EVENT eMouseEvent, PgWin *pkWin)
{
  IDRankingWin *v3; // esi@1
  int v4; // esi@6
  signed int v5; // edi@6

  v3 = this;
  if ( !(unsigned __int8)((int (*)(void))this->m_pkIDSlideListWin->vfptr[65].__vecDelDtor)()
    && (eMouseEvent == PGME_LBUTTONDOWN || eMouseEvent == 3)
    && (unsigned __int8)((int (__thiscall *)(_DWORD))v3->vfptr[61].__vecDelDtor)(v3)
    && pkWin != (PgWin *)v3->m_pkIDSlideBtn )
  {
    v4 = (int)v3->m_pkTopPortrait;
    v5 = 3;
    do
    {
      (*(void (**)(void))(**(_DWORD **)v4 + 268))();
      v4 += 4;
      --v5;
    }
    while ( v5 );
  }
}

//----- (004361E0) --------------------------------------------------------
void __thiscall IDRankingWin::DirectMessage(IDRankingWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  IDRankingWin *v4; // esi@1
  unsigned int v5; // eax@1
  IDirectMessenger *v6; // eax@2
  NiMaterialProperty *v7; // eax@5
  IDirectMessenger *v8; // eax@6
  int v9; // esi@12
  signed int v10; // edi@12
  int v11; // esi@15
  signed int v12; // edi@15

  v4 = this;
  v5 = this->m_uiExtStyle;
  if ( v5 )
    v6 = (IDirectMessenger *)(v5 + 232);
  else
    v6 = 0;
  if ( pkFrom != v6 )
  {
    v7 = this->m_spMaterialProp.m_pObject;
    v8 = (IDirectMessenger *)(v7 ? (NiMaterialProperty *)&v7[2].m_amb.b : 0);
    if ( pkFrom != v8 && !(unsigned __int8)((int (*)(void))this->m_spMaterialProp.m_pObject->vfptr[65].__vecDelDtor)() )
    {
      if ( iMsgTag == 4 )
      {
        v11 = (int)&v4->m_iWidth;
        v12 = 3;
        do
        {
          (*(void (**)(void))(**(_DWORD **)v11 + 268))();
          v11 += 4;
          --v12;
        }
        while ( v12 );
      }
      else if ( iMsgTag == 7 )
      {
        v9 = (int)&v4->m_iWidth;
        v10 = 3;
        do
        {
          (*(void (**)(void))(**(_DWORD **)v9 + 268))();
          v9 += 4;
          --v10;
        }
        while ( v10 );
      }
    }
  }
}

//----- (00436280) --------------------------------------------------------
void IDRankingWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "IDRankingWin");
}

//----- (004362B0) --------------------------------------------------------
void IDRankingWin::OnCancelWin()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::IDRankingShowWin(v1, 0);
}

//----- (004362D0) --------------------------------------------------------
void __thiscall IDRankingWin::ShowTopPortrait(IDRankingWin *this)
{
  PgWin **v1; // esi@1
  signed int v2; // edi@1

  v1 = (PgWin **)this->m_pkTopPortrait;
  v2 = 3;
  do
  {
    PgWinMgr::ShowWin(&Pgg_kWinMgr, *v1);
    ++v1;
    --v2;
  }
  while ( v2 );
}

//----- (00436300) --------------------------------------------------------
void __thiscall IDRankingWin::ClearMyRecordInfo(IDRankingWin *this)
{
  IDRankingWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkMyRecordMyInfo[0]->vfptr[118].__vecDelDtor)(&unk_976FFF);
  ((void (__stdcall *)(_DWORD))v1->m_pkMyRecordMyInfo[1]->vfptr[118].__vecDelDtor)(&unk_97700D);
  ((void (__stdcall *)(_DWORD))v1->m_pkMyRecordMyInfo[2]->vfptr[118].__vecDelDtor)(&unk_97700E);
  ((void (__stdcall *)(_DWORD))v1->m_pkMyRecordMyInfo[3]->vfptr[118].__vecDelDtor)(&unk_97700F);
  ((void (__stdcall *)(_DWORD))v1->m_pkMyRecord[0][0]->vfptr[118].__vecDelDtor)(&unk_977016);
  ((void (__stdcall *)(_DWORD))v1->m_pkMyRecord[0][1]->vfptr[118].__vecDelDtor)(&unk_977017);
  ((void (__stdcall *)(_DWORD))v1->m_pkMyRecord[0][2]->vfptr[118].__vecDelDtor)(&unk_97701E);
  ((void (__stdcall *)(_DWORD))v1->m_pkMyRecord[0][3]->vfptr[118].__vecDelDtor)(&unk_97701F);
  ((void (__stdcall *)(_DWORD))v1->m_pkMyRecord[1][0]->vfptr[118].__vecDelDtor)(&unk_977041);
  ((void (__stdcall *)(_DWORD))v1->m_pkMyRecord[1][1]->vfptr[118].__vecDelDtor)(&unk_977042);
  ((void (__stdcall *)(_DWORD))v1->m_pkMyRecord[1][2]->vfptr[118].__vecDelDtor)(&unk_977043);
  ((void (__stdcall *)(_DWORD))v1->m_pkMyRecord[1][3]->vfptr[118].__vecDelDtor)(&unk_977051);
  ((void (__stdcall *)(_DWORD))v1->m_pkMyDate[0]->vfptr[118].__vecDelDtor)(&unk_977052);
  ((void (__stdcall *)(_DWORD))v1->m_pkMyDate[1]->vfptr[118].__vecDelDtor)(&unk_977053);
}

//----- (00436430) --------------------------------------------------------
void __thiscall FaceCutMaskWin::FaceCutMaskWin(FaceCutMaskWin *this)
{
  FaceCutMaskWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&FaceCutMaskWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&FaceCutMaskWin::`vftable'{for `IDirectMessenger'};
  v1->m_pPortraitTexture = 0;
}
// 97753C: using guessed type void (__thiscall *FaceCutMaskWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97755C: using guessed type int (__thiscall *FaceCutMaskWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00436460) --------------------------------------------------------
void __thiscall FaceCutMaskWin::~FaceCutMaskWin(FaceCutMaskWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&FaceCutMaskWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&FaceCutMaskWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 97753C: using guessed type void (__thiscall *FaceCutMaskWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97755C: using guessed type int (__thiscall *FaceCutMaskWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00436480) --------------------------------------------------------
void __thiscall FaceCutMaskWin::SetPortraitTexture(FaceCutMaskWin *this, NiTexture *pTexture)
{
  FaceCutMaskWin *v2; // esi@1

  v2 = this;
  MaskedWin::SetBaseTexture(this->m_pkTopPortrait, pTexture);
  ((void (__stdcall *)(_DWORD))v2->m_pkTopPortrait->vfptr[81].__vecDelDtor)(0.0);
}

//----- (004364B0) --------------------------------------------------------
void __thiscall IDRankingWin::OnShowWin(IDRankingWin *this)
{
  GameFrameWork *v1; // eax@2

  if ( this->m_vecIDInfo._Myfirst == this->m_vecIDInfo._Mylast )
  {
    v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v1 )
      GameFrameWork::NcInstanceDungeonRankListReq(v1);
  }
}

//----- (004364E0) --------------------------------------------------------
void __thiscall IDRankingWin::ClearRankInfo(IDRankingWin *this)
{
  IDRankingWin *v1; // esi@1
  int v2; // esi@1
  signed int v3; // ebx@1
  NiSourceTexture *v4; // eax@2
  int v5; // edi@2

  v1 = this;
  SlideListWin::RemoveAllList(this->m_pkRankListWin);
  v2 = (int)v1->m_pkTopName;
  v3 = 3;
  do
  {
    v4 = PortraitTextureBuffer::GetBlackTexture();
    v5 = *(_DWORD *)(v2 + 24);
    MaskedWin::SetBaseTexture(*(MaskedWin **)(v5 + 344), (NiTexture *)&v4->vfptr);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v5 + 344) + 324))(0.0);
    (*(void (__stdcall **)(void *))(**(_DWORD **)v2 + 472))(&unk_976FF7);
    (*(void (__stdcall **)(void *))(**(_DWORD **)(v2 + 12) + 472))(&unk_976FFE);
    v2 += 4;
    --v3;
  }
  while ( v3 );
}

//----- (00436560) --------------------------------------------------------
void __thiscall IDRankingWin::OnSlideIDList(IDRankingWin *this)
{
  IDRankingWin *v1; // esi@1
  SlideBar *v2; // ecx@1
  SlideListWin *v3; // eax@2

  v1 = this;
  v2 = this->m_pkIDSlideBar;
  if ( v2 )
  {
    v3 = v1->m_pkIDSlideListWin;
    if ( v3 )
    {
      SlideBar::SetSplitCnt(v2, v3->m_nSlideSplitCnt);
      v1->m_pkIDSlideListWin->m_nViewStartPos = v1->m_pkIDSlideBar->m_nCurPos;
      SlideListWin::UpdateViewList(v1->m_pkIDSlideListWin);
    }
  }
}

//----- (004365B0) --------------------------------------------------------
void __thiscall IDRankingWin::RecordInfoReq(IDRankingWin *this, unsigned int nTitle, unsigned int nSelectID)
{
  IDRankingWin *v3; // esi@1
  GameFrameWork *v4; // ecx@1
  SHINE_INDUN_INFO *v5; // edx@3

  v3 = this;
  v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v4 )
  {
    if ( nSelectID != -1 )
    {
      v5 = v3->m_vecIDInfo._Myfirst;
      if ( v5 != v3->m_vecIDInfo._Mylast )
      {
        switch ( nTitle )
        {
          case 0u:
            GameFrameWork::NcInstanceDungeonRankTabDamagedealtReq(v4, &v5[nSelectID]);
            v3->m_nReqTitleState = nTitle;
            v3->m_nReqSelectID = nSelectID;
            break;
          case 1u:
            GameFrameWork::NcInstanceDungeonRankTabDamagetakenReq(v4, &v3->m_vecIDInfo._Myfirst[nSelectID]);
            v3->m_nReqTitleState = nTitle;
            v3->m_nReqSelectID = nSelectID;
            break;
          case 2u:
            GameFrameWork::NcInstanceDungeonRankTabHealingdoneReq(v4, &v5[nSelectID]);
            v3->m_nReqTitleState = nTitle;
            v3->m_nReqSelectID = nSelectID;
            break;
          case 3u:
            GameFrameWork::NcInstanceDungeonRankTabMyRankReq(v4, &v3->m_vecIDInfo._Myfirst[nSelectID]);
            goto LABEL_9;
          default:
LABEL_9:
            v3->m_nReqTitleState = nTitle;
            v3->m_nReqSelectID = nSelectID;
            break;
        }
      }
    }
  }
}

//----- (004366A0) --------------------------------------------------------
void __thiscall IDRankingWin::SetIDSelectBtn(IDRankingWin *this, unsigned int nSelectIDIdx)
{
  IDRankingWin *v2; // esi@1
  MapInfo *v3; // eax@2
  NiUnsharedGeometryGroup *v4; // eax@3
  PgWinText *v5; // ecx@4
  unsigned int dwMapID; // [sp+8h] [bp-108h]@1
  char chData[256]; // [sp+Ch] [bp-104h]@2

  v2 = this;
  if ( SlideListWin::GetData(this->m_pkIDSlideListWin, nSelectIDIdx, &dwMapID) )
  {
    v3 = MapInfoTab::GetByMapName(dwMapID);
    strncpy(chData, v3->Name, 0x20u);
    if ( v2->m_vecIDInfo._Myfirst[nSelectIDIdx].ModeIDLv == 2 )
    {
      v4 = TextData3::Get(0x4026F785u);
      strncat(chData, (const char *)v4, 0x100u);
    }
    v5 = v2->m_pkIDSlideText;
    v2->m_nSelectID = nSelectIDIdx;
    ((void (__stdcall *)(_DWORD))v5->vfptr[118].__vecDelDtor)(chData);
  }
}

//----- (00436760) --------------------------------------------------------
char __thiscall FaceCutMaskWin::Create(FaceCutMaskWin *this, int nIndex)
{
  FaceCutMaskWin *v2; // ebx@1
  NiTexturePalette *v3; // esi@1
  const char *v4; // eax@3
  NiSourceTexture *v5; // eax@3
  NiNode *v6; // edi@3
  NiSourceTexture *v7; // ST18_4@3
  int v8; // esi@3
  const char *v9; // eax@3
  NiRefObjectVtbl *v10; // edi@3
  char *v11; // eax@3
  NiTriShape *v12; // eax@3
  NiTriShape *v13; // edi@3
  NiRTTI *v14; // eax@4
  char v15; // al@7
  NiSourceTexture *v16; // eax@9
  MaskedWin *v17; // ecx@9
  NiNode *v18; // edi@9
  const char *v19; // eax@9
  NiRefObjectVtbl *v20; // edi@9
  char *v21; // eax@9
  NiTriShape *v22; // eax@9
  NiTriShape *v23; // esi@9
  NiRTTI *v24; // eax@12
  char v25; // al@15
  NiNode *v26; // esi@17
  NiSourceTexture *pkTexture; // [sp+28h] [bp-1Ch]@3
  int uiLeft; // [sp+2Ch] [bp-18h]@3
  int uiTop; // [sp+30h] [bp-14h]@3
  NiPointer<NiNode> spNode; // [sp+34h] [bp-10h]@1
  int v32; // [sp+40h] [bp-4h]@1
  NiNode *nIndexa; // [sp+4Ch] [bp+8h]@3
  NiNode *nIndexb; // [sp+4Ch] [bp+8h]@9

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v32 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\IDRankingWin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = MenuTexMgr::GetTexture(0x1Du);
  v6 = spNode.m_pObject;
  v7 = v5;
  v8 = nIndex + 1;
  pkTexture = v5;
  v9 = fs("FaceCut_Mask%.2d", nIndex + 1);
  PgSprData::Create((NiAVObject *)&v6->vfptr, v9, &uiLeft, &uiTop, v7);
  v10 = spNode.m_pObject->vfptr;
  nIndexa = spNode.m_pObject;
  v11 = fs("FaceCut_Mask%.2d", v8);
  v12 = (NiTriShape *)v10[18].__vecDelDtor((NiRefObject *)nIndexa, (unsigned int)v11);
  v13 = v12;
  if ( v12 )
  {
    v14 = (NiRTTI *)((int (__thiscall *)(NiTriShape *))v12->vfptr[1].__vecDelDtor)(v12);
    if ( v14 )
    {
      while ( v14 != &NiTriShape::m_RTTI )
      {
        v14 = v14->m_pkBaseRTTI;
        if ( !v14 )
          goto LABEL_7;
      }
      v15 = 1;
    }
    else
    {
LABEL_7:
      v15 = 0;
    }
    v12 = (NiTriShape *)(v15 != 0 ? (unsigned int)v13 : 0);
  }
  v2->m_pkTopPortrait = MaskedWin::CreateWin(uiLeft, uiTop, v12, (PgWin *)&v2->vfptr);
  v16 = PortraitTextureBuffer::GetBlackTexture();
  v17 = v2->m_pkTopPortrait;
  v2->m_pPortraitTexture = (NiTexture *)v16;
  MaskedWin::SetBaseTexture(v17, (NiTexture *)&v16->vfptr);
  ((void (__stdcall *)(signed int))v2->m_pkTopPortrait->vfptr[64].__vecDelDtor)(1);
  v18 = spNode.m_pObject;
  v19 = fs("Fill_Exp%.2d", v8);
  PgSprData::Create((NiAVObject *)&v18->vfptr, v19, &uiLeft, &uiTop, pkTexture);
  v20 = spNode.m_pObject->vfptr;
  nIndexb = spNode.m_pObject;
  v21 = fs("Fill_Exp%.2d", v8);
  v22 = (NiTriShape *)v20[18].__vecDelDtor((NiRefObject *)nIndexb, (unsigned int)v21);
  v23 = v22;
  if ( v22 )
  {
    v24 = (NiRTTI *)((int (__thiscall *)(NiTriShape *))v22->vfptr[1].__vecDelDtor)(v22);
    if ( v24 )
    {
      while ( v24 != &NiTriShape::m_RTTI )
      {
        v24 = v24->m_pkBaseRTTI;
        if ( !v24 )
          goto LABEL_15;
      }
      v25 = 1;
    }
    else
    {
LABEL_15:
      v25 = 0;
    }
    v22 = (NiTriShape *)(v25 != 0 ? (unsigned int)v23 : 0);
  }
  PgWinCircleGauge::CreateWin(uiLeft, uiTop, v22, 0, 0.0, 360.0, (PgWin *)&v2->vfptr);
  v26 = spNode.m_pObject;
  v32 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v26 )
    v26->vfptr->__vecDelDtor((NiRefObject *)v26, 1u);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00436980) --------------------------------------------------------
void __thiscall IDRankingWin::ShowRankNode(IDRankingWin *this, int bIsRankNode)
{
  int v2; // ebx@1
  IDRankingWin *v3; // edi@1
  PgWin **v4; // esi@1
  PgWin **i; // esi@3

  v2 = bIsRankNode;
  v3 = this;
  v4 = this->m_vecVisibleRank._Myfirst;
  if ( v4 != this->m_vecVisibleRank._Mylast )
  {
    do
    {
      ((void (__stdcall *)(int))(*v4)->vfptr[64].__vecDelDtor)(bIsRankNode);
      ++v4;
    }
    while ( v4 != v3->m_vecVisibleRank._Mylast );
  }
  for ( i = v3->m_vecVisibleMyRecord._Myfirst; i != v3->m_vecVisibleMyRecord._Mylast; ++i )
  {
    LOBYTE(v2) = (_BYTE)bIsRankNode == 0;
    ((void (__stdcall *)(int))(*i)->vfptr[64].__vecDelDtor)(v2);
  }
}

//----- (004369F0) --------------------------------------------------------
void __thiscall IDRankingWin::SetTitleBtn(IDRankingWin *this, unsigned int nTitleIdx)
{
  IDRankingWin *v2; // esi@1
  ColumnBut *v3; // eax@1
  ColumnBut *v4; // eax@3
  ColumnBut *v5; // eax@5
  ColumnBut *v6; // eax@7
  PgWinText *v7; // edi@10
  NiRefObjectVtbl *v8; // ebx@10
  NiUnsharedGeometryGroup *v9; // eax@10
  PgWinText *v10; // edi@11
  NiRefObjectVtbl *v11; // ebx@11
  NiUnsharedGeometryGroup *v12; // eax@11
  PgWinText *v13; // edi@12
  NiRefObjectVtbl *v14; // ebx@12
  NiUnsharedGeometryGroup *v15; // eax@12

  v2 = this;
  v3 = this->m_pkTitleStateCheckBox[0];
  if ( v3 )
    v3->m_bCheck = 0;
  v4 = this->m_pkTitleStateCheckBox[1];
  if ( v4 )
    v4->m_bCheck = 0;
  v5 = this->m_pkTitleStateCheckBox[2];
  if ( v5 )
    v5->m_bCheck = 0;
  v6 = this->m_pkTitleStateCheckBox[3];
  if ( v6 )
    v6->m_bCheck = 0;
  switch ( nTitleIdx )
  {
    case 0u:
      this->m_pkTitleStateCheckBox[0]->m_bCheck = 1;
      v7 = this->m_pkRecordListText;
      v8 = v7->vfptr;
      v9 = TextData3::Get(0x9390A4C8);
      v8[118].__vecDelDtor((NiRefObject *)v7, (unsigned int)v9);
      IDRankingWin::ShowRankNode(v2, 1);
      v2->m_nTitleState = 0;
      break;
    case 1u:
      this->m_pkTitleStateCheckBox[1]->m_bCheck = 1;
      v10 = this->m_pkRecordListText;
      v11 = v10->vfptr;
      v12 = TextData3::Get(0x2E342C63u);
      v11[118].__vecDelDtor((NiRefObject *)v10, (unsigned int)v12);
      IDRankingWin::ShowRankNode(v2, 1);
      v2->m_nTitleState = 1;
      break;
    case 2u:
      this->m_pkTitleStateCheckBox[2]->m_bCheck = 1;
      v13 = this->m_pkRecordListText;
      v14 = v13->vfptr;
      v15 = TextData3::Get(0x9E846385);
      v14[118].__vecDelDtor((NiRefObject *)v13, (unsigned int)v15);
      IDRankingWin::ShowRankNode(v2, 1);
      v2->m_nTitleState = 2;
      break;
    case 3u:
      this->m_pkTitleStateCheckBox[3]->m_bCheck = 1;
      IDRankingWin::ShowRankNode(this, 0);
      v2->m_nTitleState = 3;
      break;
    default:
      return;
  }
}

//----- (00436B60) --------------------------------------------------------
void __thiscall IDRankingWin::ShowIDList(IDRankingWin *this, int bShow)
{
  IDRankingWin *v2; // edi@1
  SlideBar *v3; // ecx@1
  PgWin **i; // esi@1

  v2 = this;
  v3 = this->m_pkIDSlideBar;
  v2->m_bShowIDSlideList = bShow;
  SlideBar::SetSplitCnt(v3, 0);
  v2->m_pkIDSlideListWin->m_nViewStartPos = 0;
  SlideListWin::UpdateViewList(v2->m_pkIDSlideListWin);
  for ( i = v2->m_vecVisibleIDSelect._Myfirst; i != v2->m_vecVisibleIDSelect._Mylast; ++i )
    ((void (__stdcall *)(_DWORD))(*i)->vfptr[64].__vecDelDtor)(bShow);
}

//----- (00436BD0) --------------------------------------------------------
void __userpurge IDRankingWin::SetRankInfo(IDRankingWin *this@<ecx>, float a2@<esi>, const unsigned int *dwMyRank, const int *nRankCnt, SHINE_INDUN_RANK_CLIENT_VALUE *pValue, PROTO_AVATAR_SHAPE_INFO *pShapeInfo1st, PROTO_AVATAR_SHAPE_INFO *pShapeInfo2nd, PROTO_AVATAR_SHAPE_INFO *pShapeInfo3th)
{
  PROTO_AVATAR_SHAPE_INFO *v8; // edi@1
  IDRankingWin *v9; // ebx@1
  SHINE_INDUN_RANK_CLIENT_VALUE *v10; // ecx@5
  NiRefObjectVtbl *v11; // esi@9
  char *v12; // eax@9
  char *v13; // eax@9
  NiSourceTexture *v14; // eax@10
  FaceCutMaskWin *v15; // esi@10
  char v16; // al@12
  NiRefObjectVtbl *v17; // esi@20
  char *v18; // eax@20
  char *v19; // eax@20
  char v20; // al@23
  NiRefObjectVtbl *v21; // esi@31
  char *v22; // eax@31
  char *v23; // eax@31
  char v24; // al@34
  int v25; // edi@45
  const char *v26; // eax@45
  unsigned int v27; // esi@45
  char *v28; // eax@45
  const char *v29; // eax@46
  float v30; // [sp+8h] [bp-144h]@3
  int i; // [sp+28h] [bp-124h]@2
  SHINE_INDUN_RANK_CLIENT_VALUE *v32; // [sp+2Ch] [bp-120h]@5
  char pNumberString[256]; // [sp+30h] [bp-11Ch]@44
  char acName[21]; // [sp+130h] [bp-1Ch]@5

  v8 = pShapeInfo1st;
  v9 = this;
  if ( pValue )
  {
    IDRankingWin::ClearRankInfo(this);
    IDRankingWin::SetIDSelectBtn(v9, v9->m_nReqSelectID);
    IDRankingWin::SetTitleBtn(v9, v9->m_nReqTitleState);
    PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    i = 0;
    if ( *nRankCnt > 0 )
    {
      v30 = a2;
      while ( 1 )
      {
        v10 = &pValue[i];
        acName[20] = 0;
        *(_DWORD *)acName = v10->nCharID.n5_code[0];
        *(_DWORD *)&acName[4] = v10->nCharID.n5_code[1];
        *(_DWORD *)&acName[8] = v10->nCharID.n5_code[2];
        *(_DWORD *)&acName[12] = v10->nCharID.n5_code[3];
        v32 = &pValue[i];
        *(_DWORD *)&acName[16] = v10->nCharID.n5_code[4];
        if ( i >= 3 )
          goto LABEL_45;
        if ( !i )
        {
          v21 = v9->m_pkTopName[0]->vfptr;
          v22 = (char *)TextData3::Get(0xF6E4B2BC);
          v23 = fs(v22, acName);
          ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v21[118].__vecDelDtor)(v9->m_pkTopName[0], v23, LODWORD(v30));
          if ( v8 == (PROTO_AVATAR_SHAPE_INFO *)-1 )
          {
            v14 = PortraitTextureBuffer::GetBlackTexture();
          }
          else
          {
            switch ( pValue->nCharClass )
            {
              case 1:
              case 2:
              case 3:
              case 4:
              case 5:
                v24 = 1;
                break;
              case 6:
              case 7:
              case 8:
              case 9:
              case 0xA:
                v24 = 6;
                break;
              case 0xB:
              case 0xC:
              case 0xD:
              case 0xE:
              case 0xF:
                v24 = 11;
                break;
              case 0x10:
              case 0x11:
              case 0x12:
              case 0x13:
              case 0x14:
                v24 = 16;
                break;
              case 0x15:
              case 0x16:
              case 0x17:
              case 0x18:
              case 0x19:
                v24 = 21;
                break;
              case 0x1A:
              case 0x1B:
                v24 = 26;
                break;
              default:
                v24 = 0;
                break;
            }
            v14 = PortraitTextureBuffer::GetOtherCharPortrait(
                    (int)v9,
                    (unsigned __int8)v24,
                    (unsigned int)*(_BYTE *)v8 >> 7,
                    *((_BYTE *)v8 + 3),
                    *((_BYTE *)v8 + 1),
                    *((_BYTE *)v8 + 2),
                    0xFFFFu,
                    5u,
                    v9->m_nRankingCamPos);
          }
          v15 = v9->m_pkTopPortrait[0];
          goto LABEL_43;
        }
        if ( i == 1 )
          break;
        if ( i == 2 )
        {
          v11 = v9->m_pkTopName[2]->vfptr;
          v12 = (char *)TextData3::Get(0xF6D4B1BE);
          v13 = fs(v12, acName);
          ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v11[118].__vecDelDtor)(v9->m_pkTopName[2], v13, LODWORD(v30));
          if ( *pShapeInfo3th == -1 )
          {
            v14 = PortraitTextureBuffer::GetBlackTexture();
            v15 = v9->m_pkTopPortrait[2];
          }
          else
          {
            switch ( pValue[2].nCharClass )
            {
              case 1:
              case 2:
              case 3:
              case 4:
              case 5:
                v16 = 1;
                break;
              case 6:
              case 7:
              case 8:
              case 9:
              case 0xA:
                v16 = 6;
                break;
              case 0xB:
              case 0xC:
              case 0xD:
              case 0xE:
              case 0xF:
                v16 = 11;
                break;
              case 0x10:
              case 0x11:
              case 0x12:
              case 0x13:
              case 0x14:
                v16 = 16;
                break;
              case 0x15:
              case 0x16:
              case 0x17:
              case 0x18:
              case 0x19:
                v16 = 21;
                break;
              case 0x1A:
              case 0x1B:
                v16 = 26;
                break;
              default:
                v16 = 0;
                break;
            }
            v14 = PortraitTextureBuffer::GetOtherCharPortrait(
                    (int)v9,
                    (unsigned __int8)v16,
                    (unsigned int)*(_BYTE *)pShapeInfo3th >> 7,
                    *((_BYTE *)pShapeInfo3th + 3),
                    *((_BYTE *)pShapeInfo3th + 1),
                    *((_BYTE *)pShapeInfo3th + 2),
                    0xFFFFu,
                    5u,
                    v9->m_nRankingCamPos);
            v15 = v9->m_pkTopPortrait[2];
          }
LABEL_43:
          MaskedWin::SetBaseTexture(v15->m_pkTopPortrait, (NiTexture *)&v14->vfptr);
          v30 = 0.0;
          ((void (*)(void))v15->m_pkTopPortrait->vfptr[81].__vecDelDtor)();
          v10 = &pValue[i];
        }
        GameFrameWork::ConvertCommaNumberWork(v10->nValue, pNumberString);
        ((void (__stdcall *)(_DWORD))v9->m_pkTopRecord[i]->vfptr[118].__vecDelDtor)(pNumberString);
LABEL_45:
        v25 = i + 1;
        v26 = fs("%d", i + 1);
        v27 = SlideListWin::AddText(v9->m_pkRankListWin, v26);
        SlideListWin::SetText(v9->m_pkRankListWin, v27, 1u, acName);
        v28 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), v32->nCharClass);
        if ( v28 )
          v29 = v28 + 21;
        else
          v29 = (const char *)&unk_96F8EB;
        SlideListWin::SetText(v9->m_pkRankListWin, v27, 2u, v29);
        GameFrameWork::ConvertCommaNumberWork(v32->nValue, pNumberString);
        SlideListWin::SetText(v9->m_pkRankListWin, v27, 3u, pNumberString);
        ++i;
        if ( v25 >= *nRankCnt )
          goto LABEL_49;
        v8 = pShapeInfo1st;
      }
      v17 = v9->m_pkTopName[1]->vfptr;
      v18 = (char *)TextData3::Get(0xF6D4ADBD);
      v19 = fs(v18, acName);
      ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v17[118].__vecDelDtor)(v9->m_pkTopName[1], v19, LODWORD(v30));
      if ( *pShapeInfo2nd == -1 )
      {
        v14 = PortraitTextureBuffer::GetBlackTexture();
        v15 = v9->m_pkTopPortrait[1];
      }
      else
      {
        switch ( pValue[1].nCharClass )
        {
          case 1:
          case 2:
          case 3:
          case 4:
          case 5:
            v20 = 1;
            break;
          case 6:
          case 7:
          case 8:
          case 9:
          case 0xA:
            v20 = 6;
            break;
          case 0xB:
          case 0xC:
          case 0xD:
          case 0xE:
          case 0xF:
            v20 = 11;
            break;
          case 0x10:
          case 0x11:
          case 0x12:
          case 0x13:
          case 0x14:
            v20 = 16;
            break;
          case 0x15:
          case 0x16:
          case 0x17:
          case 0x18:
          case 0x19:
            v20 = 21;
            break;
          case 0x1A:
          case 0x1B:
            v20 = 26;
            break;
          default:
            v20 = 0;
            break;
        }
        v14 = PortraitTextureBuffer::GetOtherCharPortrait(
                (int)v9,
                (unsigned __int8)v20,
                (unsigned int)*(_BYTE *)pShapeInfo2nd >> 7,
                *((_BYTE *)pShapeInfo2nd + 3),
                *((_BYTE *)pShapeInfo2nd + 1),
                *((_BYTE *)pShapeInfo2nd + 2),
                0xFFFFu,
                5u,
                v9->m_nRankingCamPos);
        v15 = v9->m_pkTopPortrait[1];
      }
      goto LABEL_43;
    }
LABEL_49:
    SlideListWin::UpdateViewList(v9->m_pkRankListWin);
  }
}
// 436BD0: could not find valid save-restore pair for esi
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (00437160) --------------------------------------------------------
void __thiscall IDRankingWin::SetMyRecord(IDRankingWin *this, PROTO_NC_INSTANCE_DUNGEON_RANK_TAB_MYRANK_ACK *pValue)
{
  IDRankingWin *v2; // esi@1
  char *v3; // ST0C_4@1
  NiRefObjectVtbl *v4; // ST1C_4@1
  char *v5; // eax@1
  char *v6; // eax@1
  NiRefObjectVtbl *v7; // ST1C_4@1
  int v8; // ST0C_4@1
  char *v9; // eax@1
  char *v10; // eax@1
  NiRefObjectVtbl *v11; // ST1C_4@1
  int v12; // ST0C_4@1
  char *v13; // eax@1
  char *v14; // eax@1
  char v15; // al@1
  char *v16; // eax@1
  NiUnsharedGeometryGroup *v17; // eax@2
  NiUnsharedGeometryGroup *v18; // ST0C_4@4
  NiRefObjectVtbl *v19; // ST1C_4@4
  char *v20; // eax@4
  char *v21; // eax@4
  int v22; // ST0C_4@4
  NiRefObjectVtbl *v23; // ST1C_4@4
  int v24; // ST08_4@4
  int v25; // ST04_4@4
  char *v26; // eax@4
  char *v27; // eax@4
  NiRefObjectVtbl *v28; // ebx@4
  int v29; // ST0C_4@4
  int v30; // ST08_4@4
  int v31; // ST04_4@4
  char *v32; // eax@4
  char *v33; // eax@4
  NiRefObjectVtbl *v34; // edi@4
  char *v35; // eax@4
  char *v36; // eax@4
  NiRefObjectVtbl *v37; // edi@4
  char *v38; // eax@4
  char *v39; // eax@4
  char pNumberString[256]; // [sp+10h] [bp-104h]@4

  v2 = this;
  PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  IDRankingWin::ClearMyRecordInfo(v2);
  IDRankingWin::SetIDSelectBtn(v2, v2->m_nReqSelectID);
  IDRankingWin::SetTitleBtn(v2, v2->m_nReqTitleState);
  v3 = g_pkMainChar->m_CharTitleName;
  v4 = v2->m_pkMyRecordMyInfo[0]->vfptr;
  v5 = (char *)TextData3::Get(0xEBE1BAC9);
  v6 = fs(v5, v3);
  v4[118].__vecDelDtor((NiRefObject *)v2->m_pkMyRecordMyInfo[0], (unsigned int)v6);
  v7 = v2->m_pkMyRecordMyInfo[1]->vfptr;
  v8 = ((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)();
  v9 = (char *)TextData3::Get(0xF3D7B52D);
  v10 = fs(v9, v8);
  v7[118].__vecDelDtor((NiRefObject *)v2->m_pkMyRecordMyInfo[1], (unsigned int)v10);
  v11 = v2->m_pkMyRecordMyInfo[2]->vfptr;
  v12 = ((int (*)(void))g_pkMainChar->vfptr[20].IsVisible)();
  v13 = (char *)TextData3::Get(0xFCDBFF2D);
  v14 = fs(v13, v12);
  v11[118].__vecDelDtor((NiRefObject *)v2->m_pkMyRecordMyInfo[2], (unsigned int)v14);
  v15 = Char::GetClass(g_pkMainChar);
  v16 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), (unsigned __int8)v15);
  if ( v16 )
    v17 = (NiUnsharedGeometryGroup *)(v16 + 21);
  else
    v17 = &unk_96F8EB;
  v18 = v17;
  v19 = v2->m_pkMyRecordMyInfo[3]->vfptr;
  v20 = (char *)TextData3::Get(0xE7E2FD3B);
  v21 = fs(v20, v18);
  v19[118].__vecDelDtor((NiRefObject *)v2->m_pkMyRecordMyInfo[3], (unsigned int)v21);
  GameFrameWork::ConvertCommaNumberWork(pValue->nPrevDamageDealt, pNumberString);
  ((void (__stdcall *)(char *))v2->m_pkMyRecord[0][0]->vfptr[118].__vecDelDtor)(pNumberString);
  GameFrameWork::ConvertCommaNumberWork(pValue->nPrevDamageTaken, pNumberString);
  ((void (__stdcall *)(char *))v2->m_pkMyRecord[0][1]->vfptr[118].__vecDelDtor)(pNumberString);
  GameFrameWork::ConvertCommaNumberWork(pValue->nPrevHealingDone, pNumberString);
  ((void (__stdcall *)(char *))v2->m_pkMyRecord[0][2]->vfptr[118].__vecDelDtor)(pNumberString);
  v22 = pValue->nPrevPlayTimeSecond;
  v23 = v2->m_pkMyRecord[0][3]->vfptr;
  v24 = pValue->nPrevPlayTimeMinute;
  v25 = pValue->nPrevPlayTimeHour;
  v26 = (char *)TextData3::Get(0xE0D1BE17);
  v27 = fs(v26, v25, v24, v22);
  v23[118].__vecDelDtor((NiRefObject *)v2->m_pkMyRecord[0][3], (unsigned int)v27);
  GameFrameWork::ConvertCommaNumberWork(pValue->nCurrDamageDealt, pNumberString);
  ((void (__stdcall *)(char *))v2->m_pkMyRecord[1][0]->vfptr[118].__vecDelDtor)(pNumberString);
  GameFrameWork::ConvertCommaNumberWork(pValue->nCurrDamageTaken, pNumberString);
  ((void (__stdcall *)(char *))v2->m_pkMyRecord[1][1]->vfptr[118].__vecDelDtor)(pNumberString);
  GameFrameWork::ConvertCommaNumberWork(pValue->nCurrHealingDone, pNumberString);
  ((void (__stdcall *)(char *))v2->m_pkMyRecord[1][2]->vfptr[118].__vecDelDtor)(pNumberString);
  v28 = v2->m_pkMyRecord[1][3]->vfptr;
  v29 = pValue->nCurrPlayTimeSecond;
  v30 = pValue->nCurrPlayTimeMinute;
  v31 = pValue->nCurrPlayTimeHour;
  v32 = (char *)TextData3::Get(0xE0D1BE17);
  v33 = fs(v32, v31, v30, v29);
  v28[118].__vecDelDtor((NiRefObject *)v2->m_pkMyRecord[1][3], (unsigned int)v33);
  v34 = v2->m_pkMyDate[0]->vfptr;
  v35 = (char *)TextData3::Get(0xA2F8BCDC);
  v36 = fs(v35);
  v34[118].__vecDelDtor((NiRefObject *)v2->m_pkMyDate[0], (unsigned int)v36);
  v37 = v2->m_pkMyDate[1]->vfptr;
  v38 = (char *)TextData3::Get(0x95F4C9DF);
  v39 = fs(v38);
  v37[118].__vecDelDtor((NiRefObject *)v2->m_pkMyDate[1], (unsigned int)v39);
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (004374F0) --------------------------------------------------------
void __thiscall IDRankingWin::InitRankInfo(IDRankingWin *this)
{
  IDRankingWin *v1; // esi@1
  NiRefObjectVtbl *v2; // edi@1
  NiUnsharedGeometryGroup *v3; // eax@1

  v1 = this;
  IDRankingWin::ClearRankInfo(this);
  IDRankingWin::SetTitleBtn(v1, v1->m_nTitleState);
  ((void (__stdcall *)(_DWORD))v1->m_pkBottomMyRank->vfptr[118].__vecDelDtor)(&unk_976FF6);
  v2 = v1->m_pkIDSlideText->vfptr;
  v3 = TextData3::Get(0x9B8FB6D9);
  v2[118].__vecDelDtor((NiRefObject *)v1->m_pkIDSlideText, (unsigned int)v3);
}

//----- (00437550) --------------------------------------------------------
void __thiscall IDRankingWin::OnSelectTitle(IDRankingWin *this, int uiMsg)
{
  IDRankingWin *v2; // esi@1
  int v3; // edi@2

  v2 = this;
  IDRankingWin::ShowIDList(this, 0);
  switch ( uiMsg )
  {
    case 11:
      v3 = 0;
      break;
    case 12:
      v3 = 1;
      break;
    case 13:
      v3 = 2;
      break;
    case 14:
      v3 = 3;
      break;
    default:
      v3 = uiMsg;
      break;
  }
  if ( v2->m_nSelectID == -1 )
    IDRankingWin::SetTitleBtn(v2, v3);
  IDRankingWin::RecordInfoReq(v2, v3, v2->m_nSelectID);
}

//----- (004375D0) --------------------------------------------------------
void __thiscall IDRankingWin::OnSelectID(IDRankingWin *this, int nIndex)
{
  IDRankingWin *v2; // esi@1

  v2 = this;
  if ( this->m_nTitleState == 4 )
    IDRankingWin::SetIDSelectBtn(this, nIndex);
  IDRankingWin::ShowIDList(v2, 0);
  IDRankingWin::RecordInfoReq(v2, v2->m_nTitleState, nIndex);
}

//----- (00437610) --------------------------------------------------------
void __thiscall IDRankingWin::OnIDSelectList(IDRankingWin *this)
{
  IDRankingWin *v1; // esi@1
  char v2; // bl@1

  v1 = this;
  v2 = ((int (*)(void))this->m_pkIDSlideListWin->vfptr[65].__vecDelDtor)();
  IDRankingWin::ShowIDList(v1, v2 == 0);
  if ( !v2 )
    ((void (__thiscall *)(IDRankingWin *))v1->vfptr[67].__vecDelDtor)(v1);
}

//----- (00437650) --------------------------------------------------------
FaceCutMaskWin *__cdecl FaceCutMaskWin::CreateWin(int nIndex)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  FaceCutMaskWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x160u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&FaceCutMaskWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&FaceCutMaskWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, nIndex) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (FaceCutMaskWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 97753C: using guessed type void (__thiscall *FaceCutMaskWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97755C: using guessed type int (__thiscall *FaceCutMaskWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00437790) --------------------------------------------------------
void __thiscall IDRankingWin::OnClose(IDRankingWin *this)
{
  IDRankingWin *v1; // esi@1
  PgWin **v2; // edi@1
  signed int v3; // ebx@1
  PgWin **i; // edi@3
  PgWin **j; // edi@5
  NiRefObjectVtbl *v6; // edi@7
  NiUnsharedGeometryGroup *v7; // eax@7
  int v8; // esi@7
  DirectUserMsgBody_SendPacket kPacket; // [sp+Ch] [bp-Ch]@7

  v1 = this;
  v2 = (PgWin **)this->m_pkTopPortrait;
  v3 = 3;
  do
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, *v2);
    ++v2;
    --v3;
  }
  while ( v3 );
  v1->m_nTitleState = 0;
  v1->m_nSelectID = -1;
  IDRankingWin::ShowIDList(v1, 0);
  for ( i = v1->m_vecVisibleRank._Myfirst; i != v1->m_vecVisibleRank._Mylast; ++i )
    ((void (__stdcall *)(_DWORD))(*i)->vfptr[64].__vecDelDtor)(1);
  for ( j = v1->m_vecVisibleMyRecord._Myfirst; j != v1->m_vecVisibleMyRecord._Mylast; ++j )
    ((void (__stdcall *)(_DWORD))(*j)->vfptr[64].__vecDelDtor)(0);
  SlideListWin::RemoveAllList(v1->m_pkRankListWin);
  IDRankingWin::ClearRankInfo(v1);
  IDRankingWin::SetTitleBtn(v1, v1->m_nTitleState);
  ((void (__stdcall *)(_DWORD))v1->m_pkBottomMyRank->vfptr[118].__vecDelDtor)(&unk_976FF6);
  v6 = v1->m_pkIDSlideText->vfptr;
  v7 = TextData3::Get(0x9B8FB6D9);
  v6[118].__vecDelDtor((NiRefObject *)v1->m_pkIDSlideText, (unsigned int)v7);
  IDRankingWin::ClearMyRecordInfo(v1);
  v8 = (int)&v1->vfptr;
  *(_DWORD *)&kPacket.wDepartment = 720904;
  kPacket.pvPacket = 0;
  if ( *(_DWORD *)(v8 + 4) )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v8 + 4) + 4))(23, &kPacket, v8);
    if ( *(_DWORD *)(v8 + 4) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v8 + 4) + 20))(23, &kPacket, v8);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v8 + 20))(v8, 23, &kPacket, v8);
}

//----- (004378E0) --------------------------------------------------------
void __thiscall IDRankingWin::OnCommand(IDRankingWin *this, unsigned int wParam, int lParam)
{
  IDRankingWin *v3; // esi@1
  GameFrameWork *v4; // eax@4

  v3 = this;
  switch ( wParam )
  {
    case 0xBu:
    case 0xCu:
    case 0xDu:
    case 0xEu:
      IDRankingWin::OnSelectTitle(this, wParam);
      break;
    case 0xFu:
      IDRankingWin::OnHelpLink();
      break;
    case 0x10u:
      v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v4 )
        GameFrameWork::IDRankingShowWin(v4, 0);
      break;
    case 0x11u:
      IDRankingWin::OnIDSelectList(this);
      break;
    case 0x12u:
      IDRankingWin::OnSelectID(this, lParam);
      break;
    case 0x13u:
      IDRankingWin::OnSlideIDList(this);
      break;
    default:
      if ( (unsigned __int8)((int (*)(void))this->m_pkIDSlideListWin->vfptr[65].__vecDelDtor)() )
        IDRankingWin::ShowIDList(v3, 0);
      break;
  }
}

//----- (004379B0) --------------------------------------------------------
void __thiscall IDRankingWin::IDRankingWin(IDRankingWin *this)
{
  IDRankingWin *v1; // esi@1
  char *v2; // edi@1
  char *v3; // eax@1
  char *v4; // edi@3
  char *v5; // ecx@3
  IDRankingWin *v6; // eax@5
  SHINE_INDUN_INFO *v7; // ecx@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v10; // [sp-1Ch] [bp-40h]@1
  int v11; // [sp-Ch] [bp-30h]@1
  signed int v12; // [sp-8h] [bp-2Ch]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v13; // [sp+10h] [bp-14h]@1
  IDRankingWin *v14; // [sp+14h] [bp-10h]@1
  int v15; // [sp+20h] [bp-4h]@1

  v1 = this;
  v14 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&IDRankingWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&IDRankingWin::`vftable'{for `IDirectMessenger'};
  v15 = 0;
  v1->m_vecVisibleRank._Myfirst = 0;
  v1->m_vecVisibleRank._Mylast = 0;
  v1->m_vecVisibleRank._Myend = 0;
  v1->m_vecVisibleMyRecord._Myfirst = 0;
  v1->m_vecVisibleMyRecord._Mylast = 0;
  v1->m_vecVisibleMyRecord._Myend = 0;
  v1->m_vecVisibleIDSelect._Myfirst = 0;
  v1->m_vecVisibleIDSelect._Mylast = 0;
  v1->m_vecVisibleIDSelect._Myend = 0;
  v1->m_vecIDInfo._Myfirst = 0;
  v1->m_vecIDInfo._Mylast = 0;
  v1->m_vecIDInfo._Myend = 0;
  v13 = &v10;
  v1->m_nTitleState = 0;
  v1->m_nSelectID = -1;
  v1->m_pkRankListWin = 0;
  v1->m_pkRecordListText = 0;
  v1->m_pkIDSlideText = 0;
  v1->m_pkIDSlideListWin = 0;
  v1->m_pkIDSlideBar = 0;
  v1->m_pkIDSlideBtn = 0;
  v12 = 15;
  v11 = 0;
  LOBYTE(v15) = 4;
  v10._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v10, "Ranking_Camera", 0xEu);
  v1->m_nRankingCamPos = (unsigned __int16)CSingleDataMap::GetValue(&g_kSingleDataMap, v10);
  v1->m_pkMyRecord[0][0] = 0;
  v1->m_pkMyRecord[0][1] = 0;
  v1->m_pkMyRecord[0][2] = 0;
  v1->m_pkMyRecord[0][3] = 0;
  v1->m_pkMyRecord[1][0] = 0;
  v1->m_pkMyRecord[1][1] = 0;
  v1->m_pkMyRecord[1][2] = 0;
  v1->m_pkMyRecord[1][3] = 0;
  v1->m_pkMyDate[0] = 0;
  v1->m_pkMyDate[1] = 0;
  v1->m_pkMyRecordMyInfo[0] = 0;
  v1->m_pkMyRecordMyInfo[1] = 0;
  v1->m_pkMyRecordMyInfo[2] = 0;
  v1->m_pkMyRecordMyInfo[3] = 0;
  v1->m_pkTitleStateCheckBox[0] = 0;
  v1->m_pkTitleStateCheckBox[1] = 0;
  v1->m_pkTitleStateCheckBox[2] = 0;
  v1->m_pkTitleStateCheckBox[3] = 0;
  v1->m_pkTopPortrait[0] = 0;
  v1->m_pkTopName[0] = 0;
  v1->m_pkTopRecord[0] = 0;
  v1->m_pkTopPortrait[1] = 0;
  v1->m_pkTopName[1] = 0;
  v1->m_pkTopRecord[1] = 0;
  v1->m_pkTopPortrait[2] = 0;
  v1->m_pkTopName[2] = 0;
  v1->m_pkTopRecord[2] = 0;
  v1->m_pkIDListPanel[0] = 0;
  v1->m_pkIDListPanel[1] = 0;
  v2 = (char *)v1->m_vecVisibleRank._Myfirst;
  v3 = (char *)v1->m_vecVisibleRank._Mylast;
  if ( v2 != v3 )
  {
    v14 = 0;
    memmove(v2, v3, 0);
    v1->m_vecVisibleRank._Mylast = (PgWin **)&v2[(_DWORD)v14];
  }
  v4 = (char *)v1->m_vecVisibleMyRecord._Myfirst;
  v5 = (char *)v1->m_vecVisibleMyRecord._Mylast;
  if ( v4 != v5 )
  {
    v14 = 0;
    memmove(v4, v5, 0);
    v1->m_vecVisibleMyRecord._Mylast = (PgWin **)&v4[(_DWORD)v14];
  }
  v6 = (IDRankingWin *)v1->m_vecIDInfo._Myfirst;
  v7 = v1->m_vecIDInfo._Mylast;
  v14 = v6;
  if ( (SHINE_INDUN_INFO *)v6 != v7 )
    v1->m_vecIDInfo._Mylast = (SHINE_INDUN_INFO *)v6;
  v1->m_bShowIDSlideList = 0;
}
// 977780: using guessed type void (__thiscall *IDRankingWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97779C: using guessed type int (__thiscall *IDRankingWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00437C30) --------------------------------------------------------
void __thiscall IDRankingWin::~IDRankingWin(IDRankingWin *this)
{
  IDRankingWin *v1; // esi@1
  SHINE_INDUN_INFO *v2; // eax@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&IDRankingWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&IDRankingWin::`vftable'{for `IDirectMessenger'};
  this->m_pkTopPortrait[0] = 0;
  this->m_pkTopPortrait[1] = 0;
  this->m_pkTopPortrait[2] = 0;
  v2 = this->m_vecIDInfo._Myfirst;
  if ( v2 != this->m_vecIDInfo._Mylast )
    v1->m_vecIDInfo._Mylast = v2;
  if ( v1->m_vecIDInfo._Myfirst )
    operator delete(v1->m_vecIDInfo._Myfirst);
  v1->m_vecIDInfo._Myfirst = 0;
  v1->m_vecIDInfo._Mylast = 0;
  v1->m_vecIDInfo._Myend = 0;
  if ( v1->m_vecVisibleIDSelect._Myfirst )
    operator delete(v1->m_vecVisibleIDSelect._Myfirst);
  v1->m_vecVisibleIDSelect._Myfirst = 0;
  v1->m_vecVisibleIDSelect._Mylast = 0;
  v1->m_vecVisibleIDSelect._Myend = 0;
  if ( v1->m_vecVisibleMyRecord._Myfirst )
    operator delete(v1->m_vecVisibleMyRecord._Myfirst);
  v1->m_vecVisibleMyRecord._Myfirst = 0;
  v1->m_vecVisibleMyRecord._Mylast = 0;
  v1->m_vecVisibleMyRecord._Myend = 0;
  if ( v1->m_vecVisibleRank._Myfirst )
    operator delete(v1->m_vecVisibleRank._Myfirst);
  v1->m_vecVisibleRank._Myfirst = 0;
  v1->m_vecVisibleRank._Mylast = 0;
  v1->m_vecVisibleRank._Myend = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 977780: using guessed type void (__thiscall *IDRankingWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97779C: using guessed type int (__thiscall *IDRankingWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00437D40) --------------------------------------------------------
IDRankingWin *__cdecl IDRankingWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  IDRankingWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x240u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    IDRankingWin::IDRankingWin((IDRankingWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (IDRankingWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00437E70) --------------------------------------------------------
void __thiscall IDRankingWin::SetIDList(IDRankingWin *this, const unsigned __int16 *nIDListCnt, SHINE_INDUN_INFO *pIndunInfo)
{
  IDRankingWin *v3; // esi@1
  std::vector<SHINE_INDUN_INFO,std::allocator<SHINE_INDUN_INFO> > *v4; // edi@3
  char *v5; // ebx@3
  NiUnsharedGeometryGroup *v6; // eax@5
  unsigned int v7; // esi@6
  char v8; // cl@6
  unsigned int v9; // esi@6
  unsigned int v10; // eax@6
  unsigned int v11; // ecx@6
  unsigned int v12; // edx@8
  int v13; // esi@8
  SHINE_INDUN_INFO *v14; // eax@10
  int v15; // esi@10
  SHINE_INDUN_INFO *v16; // eax@14
  __int64 v17; // kr00_8@15
  char v18; // cl@15
  MapInfo *pkMapInfo; // [sp+8h] [bp-120h]@4
  int i; // [sp+Ch] [bp-11Ch]@2
  IDRankingWin *v21; // [sp+10h] [bp-118h]@1
  SHINE_INDUN_INFO IndounInfo; // [sp+14h] [bp-114h]@2
  char chData[256]; // [sp+24h] [bp-104h]@4

  v3 = this;
  v21 = this;
  if ( pIndunInfo )
  {
    *(_QWORD *)&IndounInfo.MapIDClient.n3_code[1] = 0i64;
    IndounInfo.MapIDClient.n3_code[0] = 0;
    i = 0;
    if ( *nIDListCnt > 0u )
    {
      v4 = &this->m_vecIDInfo;
      v5 = &pIndunInfo->ModeIDLv;
      do
      {
        pkMapInfo = MapInfoTab::GetByMapName((Name3 *)v5 - 1);
        strncpy(chData, pkMapInfo->Name, 0x20u);
        if ( *v5 == 2 )
        {
          v6 = TextData3::Get(0x4026F785u);
          strncat(chData, (const char *)v6, 0x100u);
        }
        v7 = SlideListWin::AddText(v3->m_pkIDSlideListWin, chData);
        SlideListWin::SetText(v21->m_pkIDSlideListWin, v7, 0, chData);
        SlideListWin::SetFontColor(v21->m_pkIDSlideListWin, v7, 255, 255, 255);
        SlideListWin::SetData(v21->m_pkIDSlideListWin, v7, pkMapInfo->ID);
        v8 = *v5;
        v9 = *((_DWORD *)v5 - 3);
        v10 = *((_DWORD *)v5 - 1);
        IndounInfo.MapIDClient.n3_code[1] = *((_DWORD *)v5 - 2);
        IndounInfo.ModeIDLv = v8;
        v11 = (unsigned int)v4->_Mylast;
        IndounInfo.MapIDClient.n3_code[0] = v9;
        IndounInfo.MapIDClient.n3_code[2] = v10;
        if ( (unsigned int)&IndounInfo >= v11 || v4->_Myfirst > &IndounInfo )
        {
          if ( (SHINE_INDUN_INFO *)v11 == v4->_Myend )
            std::vector<SHINE_INDUN_INFO,std::allocator<SHINE_INDUN_INFO>>::_Reserve(v4, 1u);
          v16 = v4->_Mylast;
          if ( v16 )
          {
            v17 = *(_QWORD *)&IndounInfo.MapIDClient.n3_code[1];
            v16->MapIDClient.n3_code[0] = v9;
            v16->MapIDClient.n3_code[1] = v17;
            v18 = IndounInfo.ModeIDLv;
            v16->MapIDClient.n3_code[2] = HIDWORD(v17);
            v16->ModeIDLv = v18;
          }
        }
        else
        {
          v12 = (signed int)((unsigned __int64)(1321528399i64 * ((char *)&IndounInfo - (char *)v4->_Myfirst)) >> 32) >> 2;
          v13 = v12 + (v12 >> 31);
          if ( (SHINE_INDUN_INFO *)v11 == v4->_Myend )
            std::vector<SHINE_INDUN_INFO,std::allocator<SHINE_INDUN_INFO>>::_Reserve(v4, 1u);
          v14 = v4->_Mylast;
          v15 = (int)&v4->_Myfirst[v13];
          if ( v14 )
          {
            v14->MapIDClient.n3_code[0] = *(_DWORD *)v15;
            v14->MapIDClient.n3_code[1] = *(_DWORD *)(v15 + 4);
            v14->MapIDClient.n3_code[2] = *(_DWORD *)(v15 + 8);
            v14->ModeIDLv = *(_BYTE *)(v15 + 12);
          }
        }
        ++v4->_Mylast;
        v3 = v21;
        v5 += 13;
        ++i;
      }
      while ( i < *nIDListCnt );
    }
    SlideListWin::UpdateViewList(v3->m_pkIDSlideListWin);
  }
}

//----- (00438080) --------------------------------------------------------
char __thiscall IDRankingWin::Create(IDRankingWin *this, PgFrameWork *pkFrameWork)
{
  IDRankingWin *v2; // esi@1
  NiTexturePalette *v3; // ebx@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  int v8; // edi@10
  int v9; // ebx@10
  NiSourceTexture *v10; // eax@10
  PgSprData *v11; // eax@11
  PgSprData::PgHitTester *v12; // eax@13
  unsigned int v13; // edi@13
  PgFont *v14; // eax@13
  PgWinText *v15; // edi@13
  NiUnsharedGeometryGroup *v16; // eax@13
  D3DXCOLOR v17; // ST16C_16@13
  PgWinSpr *v18; // eax@13
  PgSprData *v19; // edi@13
  PgSprData *v20; // ST178_4@13
  int v21; // edi@13
  ColumnBut *v22; // eax@13
  D3DXCOLOR v23; // ST174_16@13
  char *v24; // eax@13
  ColumnBut *v25; // eax@13
  D3DXCOLOR v26; // ST174_16@13
  char *v27; // eax@13
  ColumnBut *v28; // eax@13
  D3DXCOLOR v29; // ST174_16@13
  char *v30; // eax@13
  ColumnBut *v31; // eax@13
  D3DXCOLOR v32; // ST174_16@13
  char *v33; // eax@13
  SLWCreateInfo::Item *v34; // edi@13
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *v35; // edi@13
  SLWCreateInfo::Item *v36; // edi@20
  int v37; // eax@20
  int v38; // ST184_4@20
  char *v39; // eax@20
  char *v40; // ecx@20
  char v41; // dl@21
  signed int v42; // eax@24
  PgSprData *v43; // eax@25
  SlideListWin *v44; // eax@25
  unsigned int v45; // eax@25
  unsigned int v46; // edx@26
  PgWinSpr *v47; // ecx@27
  PgWin **v48; // eax@29
  PgWin **v49; // ecx@29
  _DWORD *v50; // eax@33
  D3DXCOLOR v51; // ST174_16@35
  char *v52; // eax@35
  unsigned int v53; // ecx@35
  unsigned int v54; // edx@36
  PgWinSpr *v55; // eax@37
  PgWin **v56; // ecx@39
  PgWin **v57; // eax@39
  _DWORD *v58; // eax@43
  D3DXCOLOR v59; // ST174_16@45
  char *v60; // eax@45
  unsigned int v61; // ecx@45
  unsigned int v62; // edx@46
  PgWinSpr *v63; // eax@47
  PgWin **v64; // ecx@49
  PgWin **v65; // eax@49
  _DWORD *v66; // eax@53
  D3DXCOLOR v67; // ST174_16@55
  char *v68; // eax@55
  unsigned int v69; // ecx@55
  unsigned int v70; // edx@56
  PgWinSpr *v71; // eax@57
  PgWin **v72; // ecx@59
  PgWin **v73; // eax@59
  _DWORD *v74; // eax@63
  D3DXCOLOR v75; // ST174_16@65
  char *v76; // eax@65
  unsigned int v77; // eax@65
  unsigned int v78; // edx@66
  PgWinSpr *v79; // ecx@67
  PgWin **v80; // eax@69
  PgWin **v81; // ecx@69
  _DWORD *v82; // eax@73
  PgWinSpr *v83; // edi@75
  void *(__thiscall *v84)(NiRefObject *, unsigned int); // edx@75
  unsigned int v85; // ecx@75
  unsigned int v86; // edx@76
  PgWinSpr *v87; // eax@77
  PgWin **v88; // ecx@79
  PgWin **v89; // eax@79
  _DWORD *v90; // eax@83
  NiNode *v91; // ecx@85
  PgSprData::PgHitTester *v92; // eax@85
  int v93; // edx@85
  PgFont *v94; // eax@85
  PgWinText *v95; // eax@85
  unsigned int v96; // eax@85
  unsigned int v97; // edx@86
  PgWinSpr *v98; // ecx@87
  PgWin **v99; // eax@89
  PgWin **v100; // ecx@89
  _DWORD *v101; // eax@93
  NiNode *v102; // edx@95
  PgSprData::PgHitTester *v103; // eax@95
  int v104; // edx@95
  PgFont *v105; // eax@95
  PgWinText *v106; // eax@95
  unsigned int v107; // eax@95
  unsigned int v108; // edx@96
  PgWinSpr *v109; // ecx@97
  PgWin **v110; // eax@99
  PgWin **v111; // ecx@99
  _DWORD *v112; // eax@103
  NiNode *v113; // edx@105
  PgSprData::PgHitTester *v114; // eax@105
  int v115; // edx@105
  PgFont *v116; // eax@105
  PgWinText *v117; // eax@105
  unsigned int v118; // eax@105
  unsigned int v119; // edx@106
  PgWinSpr *v120; // ecx@107
  PgWin **v121; // eax@109
  PgWin **v122; // ecx@109
  _DWORD *v123; // eax@113
  NiNode *v124; // edx@115
  PgSprData::PgHitTester *v125; // eax@115
  int v126; // edx@115
  PgFont *v127; // eax@115
  PgWinText *v128; // eax@115
  unsigned int v129; // eax@115
  unsigned int v130; // edx@116
  PgWinSpr *v131; // ecx@117
  PgWin **v132; // eax@119
  PgWin **v133; // ecx@119
  _DWORD *v134; // eax@123
  NiNode *v135; // edx@125
  PgSprData::PgHitTester *v136; // eax@125
  int v137; // edx@125
  PgWin *v138; // ST180_4@125
  PgFont *v139; // eax@125
  PgWinAbbreviateText *v140; // eax@125
  unsigned int v141; // eax@125
  unsigned int v142; // edx@126
  PgWinSpr *v143; // ecx@127
  PgWin **v144; // eax@129
  PgWin **v145; // ecx@129
  _DWORD *v146; // eax@133
  NiNode *v147; // edx@135
  PgSprData::PgHitTester *v148; // eax@135
  int v149; // edx@135
  PgWin *v150; // ST180_4@135
  PgFont *v151; // eax@135
  PgWinAbbreviateText *v152; // eax@135
  unsigned int v153; // eax@135
  unsigned int v154; // edx@136
  PgWinSpr *v155; // ecx@137
  PgWin **v156; // eax@139
  PgWin **v157; // ecx@139
  _DWORD *v158; // eax@143
  NiNode *v159; // edx@145
  PgSprData::PgHitTester *v160; // eax@145
  int v161; // edx@145
  PgFont *v162; // eax@145
  PgWinText *v163; // eax@145
  NiRefObjectVtbl *v164; // edx@145
  NiUnsharedGeometryGroup *v165; // eax@145
  unsigned int v166; // eax@145
  unsigned int v167; // edx@146
  PgWinSpr *v168; // ecx@147
  PgWin **v169; // eax@149
  PgWin **v170; // ecx@149
  _DWORD *v171; // eax@153
  NiNode *v172; // edx@155
  PgSprData::PgHitTester *v173; // eax@155
  int v174; // edx@155
  PgWin *v175; // ST180_4@155
  PgFont *v176; // eax@155
  PgWinAbbreviateText *v177; // eax@155
  unsigned int v178; // eax@155
  unsigned int v179; // edx@156
  PgWinSpr *v180; // ecx@157
  PgWin **v181; // eax@159
  PgWin **v182; // ecx@159
  _DWORD *v183; // eax@163
  NiNode *v184; // edx@165
  PgSprData::PgHitTester *v185; // eax@165
  int v186; // edx@165
  PgWin *v187; // ST180_4@165
  PgFont *v188; // eax@165
  PgWinAbbreviateText *v189; // eax@165
  unsigned int v190; // eax@165
  unsigned int v191; // edx@166
  PgWinSpr *v192; // ecx@167
  PgWin **v193; // eax@169
  PgWin **v194; // ecx@169
  _DWORD *v195; // eax@173
  NiNode *v196; // edx@175
  PgSprData::PgHitTester *v197; // eax@175
  int v198; // edx@175
  PgFont *v199; // eax@175
  PgWinText *v200; // eax@175
  NiRefObjectVtbl *v201; // edx@175
  NiUnsharedGeometryGroup *v202; // eax@175
  unsigned int v203; // eax@175
  unsigned int v204; // edx@176
  PgWinSpr *v205; // ecx@177
  PgWin **v206; // eax@179
  PgWin **v207; // ecx@179
  _DWORD *v208; // eax@183
  NiNode *v209; // edx@185
  PgSprData::PgHitTester *v210; // eax@185
  int v211; // edx@185
  PgWin *v212; // ST180_4@185
  PgFont *v213; // eax@185
  PgWinAbbreviateText *v214; // eax@185
  unsigned int v215; // eax@185
  unsigned int v216; // edx@186
  PgWinSpr *v217; // ecx@187
  PgWin **v218; // eax@189
  PgWin **v219; // ecx@189
  _DWORD *v220; // eax@193
  NiNode *v221; // edx@195
  PgSprData::PgHitTester *v222; // eax@195
  int v223; // edx@195
  PgWin *v224; // ST180_4@195
  PgFont *v225; // eax@195
  PgWinAbbreviateText *v226; // eax@195
  unsigned int v227; // eax@195
  unsigned int v228; // edx@196
  PgWinSpr *v229; // ecx@197
  PgWin **v230; // eax@199
  PgWin **v231; // ecx@199
  _DWORD *v232; // eax@203
  NiNode *v233; // edx@205
  PgSprData::PgHitTester *v234; // eax@205
  int v235; // edx@205
  PgFont *v236; // eax@205
  PgWinText *v237; // eax@205
  NiRefObjectVtbl *v238; // edx@205
  NiUnsharedGeometryGroup *v239; // eax@205
  unsigned int v240; // eax@205
  unsigned int v241; // edx@206
  PgWinSpr *v242; // ecx@207
  PgWin **v243; // eax@209
  PgWin **v244; // ecx@209
  _DWORD *v245; // eax@213
  NiNode *v246; // edx@215
  PgSprData::PgHitTester *v247; // eax@215
  int v248; // edx@215
  PgWin *v249; // ST180_4@215
  PgFont *v250; // eax@215
  PgWinAbbreviateText *v251; // eax@215
  unsigned int v252; // eax@215
  unsigned int v253; // edx@216
  PgWinSpr *v254; // ecx@217
  PgWin **v255; // eax@219
  PgWin **v256; // ecx@219
  _DWORD *v257; // eax@223
  NiNode *v258; // edx@225
  PgSprData::PgHitTester *v259; // eax@225
  int v260; // edx@225
  PgWin *v261; // ST180_4@225
  PgFont *v262; // eax@225
  PgWinAbbreviateText *v263; // eax@225
  unsigned int v264; // eax@225
  unsigned int v265; // edx@226
  PgWinSpr *v266; // ecx@227
  PgWin **v267; // eax@229
  PgWin **v268; // ecx@229
  _DWORD *v269; // eax@233
  NiNode *v270; // edx@235
  PgSprData::PgHitTester *v271; // eax@235
  int v272; // edx@235
  PgFont *v273; // eax@235
  PgWinText *v274; // eax@235
  NiRefObjectVtbl *v275; // edx@235
  NiUnsharedGeometryGroup *v276; // eax@235
  unsigned int v277; // eax@235
  unsigned int v278; // edx@236
  PgWinSpr *v279; // ecx@237
  PgWin **v280; // eax@239
  PgWin **v281; // ecx@239
  _DWORD *v282; // eax@243
  NiNode *v283; // edx@245
  PgSprData::PgHitTester *v284; // eax@245
  int v285; // edx@245
  PgWin *v286; // ST180_4@245
  PgFont *v287; // eax@245
  PgWinAbbreviateText *v288; // eax@245
  unsigned int v289; // eax@245
  unsigned int v290; // edx@246
  PgWinSpr *v291; // ecx@247
  PgWin **v292; // eax@249
  PgWin **v293; // ecx@249
  _DWORD *v294; // eax@253
  NiNode *v295; // edx@255
  PgSprData::PgHitTester *v296; // eax@255
  int v297; // edx@255
  PgWin *v298; // ST180_4@255
  PgFont *v299; // eax@255
  PgWinAbbreviateText *v300; // eax@255
  unsigned int v301; // eax@255
  unsigned int v302; // edx@256
  PgWinSpr *v303; // ecx@257
  PgWin **v304; // eax@259
  PgWin **v305; // ecx@259
  _DWORD *v306; // eax@263
  PgWinText *v307; // eax@266
  unsigned int v308; // eax@266
  unsigned int v309; // ecx@267
  signed int v310; // edx@268
  PgWin **v311; // ecx@268
  PgWinSpr *v312; // edx@268
  PgWin **v313; // edx@269
  unsigned int v314; // eax@269
  unsigned int v315; // ecx@270
  NiAVObject *v316; // ecx@272
  PgWin **v317; // eax@278
  _DWORD *v318; // eax@282
  NiSourceTexture *v319; // eax@284
  int v320; // eax@285
  NiAVObject **v321; // edi@285
  const char *v322; // eax@286
  PgSprData::PgHitTester *v323; // eax@286
  PgWinSpr *v324; // edx@286
  PgWin *v325; // ST180_4@286
  PgFont *v326; // eax@286
  PgWinAbbreviateText *v327; // eax@286
  int v328; // eax@287
  NiAVObject **v329; // edi@287
  const char *v330; // eax@288
  PgSprData::PgHitTester *v331; // eax@288
  PgWinSpr *v332; // edx@288
  PgWin *v333; // ST180_4@288
  PgFont *v334; // eax@288
  PgWinAbbreviateText *v335; // eax@288
  NiAVObject **v336; // edi@289
  char *v337; // eax@290
  PgWinSpr *v338; // eax@290
  D3DXCOLOR v339; // ST174_16@291
  char *v340; // eax@291
  PgWinText *v341; // eax@291
  boost::shared_ptr<SLWCreateInfo::Item> *v342; // ecx@291
  boost::shared_ptr<SLWCreateInfo::Item> *v343; // edi@292
  SLWCreateInfo::Item *v344; // edi@293
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *v345; // edi@293
  SLWCreateInfo::Item *v346; // edi@299
  NiSourceTexture *v347; // eax@301
  NiSourceTexture *v348; // edi@301
  PgSprData *v349; // eax@301
  SlideListWin *v350; // eax@301
  PgSprData *v351; // edi@301
  NiObjectNET *v352; // eax@301
  NiObjectNET *v353; // eax@301
  NiObjectNET *v354; // eax@301
  NiObjectNET *v355; // eax@301
  NiObjectNET *v356; // eax@301
  NiObjectNET *v357; // eax@301
  SlideBar *v358; // eax@301
  FaceCutMaskWin **v359; // edi@301
  signed int v360; // esi@301
  signed int v361; // eax@302
  NiNode *v362; // esi@305
  SLWCreateInfo kCreateInfo; // [sp+198h] [bp-84h]@13
  FaceCutMaskWin **v364; // [sp+1B4h] [bp-68h]@265
  UIUtil ui; // [sp+1B8h] [bp-64h]@10
  NiAVObject *pkObject; // [sp+1CCh] [bp-50h]@270
  int iOffY; // [sp+1D0h] [bp-4Ch]@10
  NiSourceTexture *pkTexture; // [sp+1D4h] [bp-48h]@13
  NiPointer<NiNode> spNode; // [sp+1D8h] [bp-44h]@1
  int i; // [sp+1DCh] [bp-40h]@19
  int uiLeft; // [sp+1E0h] [bp-3Ch]@4
  int uiTop; // [sp+1E4h] [bp-38h]@4
  PgWinSpr *pkWinSpr; // [sp+1E8h] [bp-34h]@13
  PgWinText *pkTextWin; // [sp+1ECh] [bp-30h]@13
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+1F0h] [bp-2Ch]@13
  int v376; // [sp+218h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v376 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\IDRankingWin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "IDRankingWin", 0) )
  {
    v6 = spNode.m_pObject;
    v376 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = uiTop;
  v9 = uiLeft;
  iOffY = uiTop;
  UIUtil::UIUtil(&ui);
  LOBYTE(v376) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, v9, v8);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - iOffY, v11, (PgWin *)&v2->vfptr, 0, 0);
  pkTexture = MenuTexMgr::GetTexture(0x1Du);
  UIUtil::CreateSpr(&ui, "Panel01", 0);
  UIUtil::CreateSpr(&ui, "Panel02", 0);
  pkWinSpr = UIUtil::CreateSpr(&ui, "Panel03", 0);
  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
    (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_vecVisibleRank,
    (const unsigned int *)&pkWinSpr);
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v13 = v12->m_uiHeight;
  pkWinSpr = (PgWinSpr *)v12->m_uiWidth;
  v14 = Font::Get(MAIN_MENU);
  v15 = PgWinText::CreateWin(uiLeft - v9, uiTop - iOffY, (unsigned int)pkWinSpr, v13, v14, (PgWin *)&v2->vfptr, 0, 0);
  v15->vfptr[117].__vecDelDtor((NiRefObject *)v15, (unsigned int)&Color::m_kDxWinTitleColor);
  v15->vfptr[122].__vecDelDtor((NiRefObject *)v15, 5u);
  pkWinSpr = (PgWinSpr *)&v15->vfptr[118];
  v16 = TextData3::Get(0x438F7E97u);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkWinSpr->vfptr)(v15, v16);
  v15->vfptr[60].__vecDelDtor((NiRefObject *)v15, 0);
  v15->vfptr[64].__vecDelDtor((NiRefObject *)v15, 1u);
  UIUtil::CreateBtn(&ui, 0xFu, "HelpLinkNor", "HelpLinkClick", "HelpLinkOver", 0, 0);
  UIUtil::CreateBtn(&ui, 0x10u, "ClsNor", "ClsClick", "ClsOver", 0, 0);
  *(_QWORD *)&v17.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v17.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v18 = (PgWinSpr *)UIUtil::CreateText(&ui, "BottomRank", &byte_976FDF, 0, v17, 1u, 0, 0);
  v2->m_pkBottomMyRank = (PgWinText *)v18;
  pkWinSpr = v18;
  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
    (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_vecVisibleRank,
    (const unsigned int *)&pkWinSpr);
  v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab01_Off", &uiLeft, &uiTop, 0);
  PgSprData::Add(v19, (NiAVObject *)&spNode.m_pObject->vfptr, "Tab01_On");
  v20 = v19;
  v21 = iOffY;
  v22 = ColumnBut::CreateWin(uiLeft - v9, uiTop - iOffY, v20, (PgWin *)&v2->vfptr, 0xBu, 0);
  v2->m_pkTitleStateCheckBox[0] = v22;
  v22->m_bCheck = 1;
  *(_QWORD *)&v23.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v23.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v24 = (char *)TextData3::Get(0x9390A4C8);
  UIUtil::CreateAttachedText((PgWin *)&v2->m_pkTitleStateCheckBox[0]->vfptr, v24, v23, 5u);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab02_Off", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Tab02_On");
  v25 = ColumnBut::CreateWin(uiLeft - v9, uiTop - v21, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xCu, 0);
  v2->m_pkTitleStateCheckBox[1] = v25;
  v25->m_bCheck = 0;
  *(_QWORD *)&v26.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v26.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v27 = (char *)TextData3::Get(0x2E342C63u);
  UIUtil::CreateAttachedText((PgWin *)&v2->m_pkTitleStateCheckBox[1]->vfptr, v27, v26, 5u);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab03_Off", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Tab03_On");
  v28 = ColumnBut::CreateWin(uiLeft - v9, uiTop - v21, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xDu, 0);
  v2->m_pkTitleStateCheckBox[2] = v28;
  v28->m_bCheck = 0;
  *(_QWORD *)&v29.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v29.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v30 = (char *)TextData3::Get(0x9E846385);
  UIUtil::CreateAttachedText((PgWin *)&v2->m_pkTitleStateCheckBox[2]->vfptr, v30, v29, 5u);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab04_Off", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Tab04_On");
  v31 = ColumnBut::CreateWin(uiLeft - v9, uiTop - v21, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xEu, 0);
  v2->m_pkTitleStateCheckBox[3] = v31;
  v31->m_bCheck = 0;
  *(_QWORD *)&v32.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v32.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v33 = (char *)TextData3::Get(0xE91F0B37);
  UIUtil::CreateAttachedText((PgWin *)&v2->m_pkTitleStateCheckBox[3]->vfptr, v33, v32, 5u);
  kCreateInfo.m_arrItem._Myfirst = 0;
  kCreateInfo.m_arrItem._Mylast = 0;
  kCreateInfo.m_arrItem._Myend = 0;
  LOBYTE(v376) = 2;
  kCreateInfo.m_bMakeData = 0;
  kCreateInfo.m_nOffX = 0;
  kCreateInfo.m_nOffY = 0;
  v34 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
  v34->nItemType = 1;
  v34->pNode = spNode.m_pObject;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarNor", 0xCu);
  v35 = &v34->vecNodeName;
  LOBYTE(v376) = 3;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v35,
    &_Val);
  LOBYTE(v376) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarClick", 0xEu);
  LOBYTE(v376) = 4;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v35,
    &_Val);
  LOBYTE(v376) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarOver", 0xDu);
  LOBYTE(v376) = 5;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v35,
    &_Val);
  LOBYTE(v376) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  i = 0;
  do
  {
    v36 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    v37 = i + 1;
    v38 = i + 1;
    v36->nItemType = 2;
    i = v37;
    v39 = fs("Column%.2d", v38);
    v40 = v39;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    pkWinSpr = (PgWinSpr *)(v39 + 1);
    do
      v41 = *v40++;
    while ( v41 );
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, v39, v40 - (char *)pkWinSpr);
    LOBYTE(v376) = 6;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      &v36->vecNodeName,
      &_Val);
    LOBYTE(v376) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    v42 = i;
    v36->pNode = spNode.m_pObject;
    v36->bAbbreviatable = 1;
    i = v42;
  }
  while ( v42 < 4 );
  SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
  v43 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SubText01", &uiLeft, &uiTop, pkTexture);
  v44 = SlideListWin::CreateWin(uiLeft - v9, uiTop - iOffY, v43, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
  v2->m_pkRankListWin = v44;
  SlideListWin::UpdateViewList(v44);
  v45 = (unsigned int)v2->m_vecVisibleRank._Mylast;
  pkTextWin = (PgWinText *)v2->m_pkRankListWin;
  if ( (unsigned int)&pkTextWin >= v45
    || (v46 = (unsigned int)v2->m_vecVisibleRank._Myfirst, v46 > (unsigned int)&pkTextWin) )
  {
    if ( (PgWin **)v45 == v2->m_vecVisibleRank._Myend )
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleRank,
        1u);
    v50 = v2->m_vecVisibleRank._Mylast;
    if ( v50 )
      *v50 = pkTextWin;
  }
  else
  {
    v47 = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v46) >> 2);
    pkWinSpr = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v46) >> 2);
    if ( (PgWin **)v45 == v2->m_vecVisibleRank._Myend )
    {
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleRank,
        1u);
      v47 = pkWinSpr;
    }
    v48 = v2->m_vecVisibleRank._Mylast;
    v49 = &v2->m_vecVisibleRank._Myfirst[(_DWORD)v47];
    if ( v48 )
      *v48 = *v49;
  }
  ++v2->m_vecVisibleRank._Mylast;
  pkTextWin = (PgWinText *)UIUtil::CreateBtn(&ui, 0xAu, "Title01Nor", "Title01Click", "Title01Over", 0, 0);
  *(_QWORD *)&v51.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v51.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v52 = (char *)TextData3::Get(0xA6966789);
  UIUtil::CreateAttachedText((PgWin *)&pkTextWin->vfptr, v52, v51, 5u);
  pkTexture = (NiSourceTexture *)pkTextWin;
  v53 = (unsigned int)v2->m_vecVisibleRank._Mylast;
  if ( (unsigned int)&pkTexture >= v53
    || (v54 = (unsigned int)v2->m_vecVisibleRank._Myfirst, v54 > (unsigned int)&pkTexture) )
  {
    if ( (PgWin **)v53 == v2->m_vecVisibleRank._Myend )
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleRank,
        1u);
    v58 = v2->m_vecVisibleRank._Mylast;
    if ( v58 )
      *v58 = pkTextWin;
  }
  else
  {
    v55 = (PgWinSpr *)((signed int)((signed int)&pkTexture - v54) >> 2);
    pkWinSpr = (PgWinSpr *)((signed int)((signed int)&pkTexture - v54) >> 2);
    if ( (PgWin **)v53 == v2->m_vecVisibleRank._Myend )
    {
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleRank,
        1u);
      v55 = pkWinSpr;
    }
    v56 = &v2->m_vecVisibleRank._Myfirst[(_DWORD)v55];
    v57 = v2->m_vecVisibleRank._Mylast;
    if ( v57 )
      *v57 = *v56;
  }
  ++v2->m_vecVisibleRank._Mylast;
  pkTextWin = (PgWinText *)UIUtil::CreateBtn(&ui, 0xAu, "Title02Nor", "Title02Click", "Title02Over", 0, 0);
  *(_QWORD *)&v59.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v59.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v60 = (char *)TextData::Get(0x4EA49695u);
  UIUtil::CreateAttachedText((PgWin *)&pkTextWin->vfptr, v60, v59, 5u);
  v61 = (unsigned int)v2->m_vecVisibleRank._Mylast;
  pkTexture = (NiSourceTexture *)pkTextWin;
  if ( (unsigned int)&pkTexture >= v61
    || (v62 = (unsigned int)v2->m_vecVisibleRank._Myfirst, v62 > (unsigned int)&pkTexture) )
  {
    if ( (PgWin **)v61 == v2->m_vecVisibleRank._Myend )
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleRank,
        1u);
    v66 = v2->m_vecVisibleRank._Mylast;
    if ( v66 )
      *v66 = pkTextWin;
  }
  else
  {
    v63 = (PgWinSpr *)((signed int)((signed int)&pkTexture - v62) >> 2);
    pkWinSpr = (PgWinSpr *)((signed int)((signed int)&pkTexture - v62) >> 2);
    if ( (PgWin **)v61 == v2->m_vecVisibleRank._Myend )
    {
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleRank,
        1u);
      v63 = pkWinSpr;
    }
    v64 = &v2->m_vecVisibleRank._Myfirst[(_DWORD)v63];
    v65 = v2->m_vecVisibleRank._Mylast;
    if ( v65 )
      *v65 = *v64;
  }
  ++v2->m_vecVisibleRank._Mylast;
  pkTextWin = (PgWinText *)UIUtil::CreateBtn(&ui, 0xAu, "Title03Nor", "Title03Click", "Title03Over", 0, 0);
  *(_QWORD *)&v67.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v67.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v68 = (char *)TextData::Get(0x4A5F8BA3u);
  UIUtil::CreateAttachedText((PgWin *)&pkTextWin->vfptr, v68, v67, 5u);
  v69 = (unsigned int)v2->m_vecVisibleRank._Mylast;
  pkTexture = (NiSourceTexture *)pkTextWin;
  if ( (unsigned int)&pkTexture >= v69
    || (v70 = (unsigned int)v2->m_vecVisibleRank._Myfirst, v70 > (unsigned int)&pkTexture) )
  {
    if ( (PgWin **)v69 == v2->m_vecVisibleRank._Myend )
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleRank,
        1u);
    v74 = v2->m_vecVisibleRank._Mylast;
    if ( v74 )
      *v74 = pkTextWin;
  }
  else
  {
    v71 = (PgWinSpr *)((signed int)((signed int)&pkTexture - v70) >> 2);
    pkWinSpr = (PgWinSpr *)((signed int)((signed int)&pkTexture - v70) >> 2);
    if ( (PgWin **)v69 == v2->m_vecVisibleRank._Myend )
    {
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleRank,
        1u);
      v71 = pkWinSpr;
    }
    v72 = &v2->m_vecVisibleRank._Myfirst[(_DWORD)v71];
    v73 = v2->m_vecVisibleRank._Mylast;
    if ( v73 )
      *v73 = *v72;
  }
  ++v2->m_vecVisibleRank._Mylast;
  pkTextWin = (PgWinText *)UIUtil::CreateBtn(&ui, 0xAu, "Title04Nor", "Title04Click", "Title04Over", 0, 0);
  *(_QWORD *)&v75.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v75.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v76 = (char *)TextData3::Get(0x9390A4C8);
  v2->m_pkRecordListText = UIUtil::CreateAttachedText((PgWin *)&pkTextWin->vfptr, v76, v75, 5u);
  pkTexture = (NiSourceTexture *)pkTextWin;
  v77 = (unsigned int)v2->m_vecVisibleRank._Mylast;
  if ( (unsigned int)&pkTexture >= v77
    || (v78 = (unsigned int)v2->m_vecVisibleRank._Myfirst, v78 > (unsigned int)&pkTexture) )
  {
    if ( (PgWin **)v77 == v2->m_vecVisibleRank._Myend )
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleRank,
        1u);
    v82 = v2->m_vecVisibleRank._Mylast;
    if ( v82 )
      *v82 = pkTextWin;
  }
  else
  {
    v79 = (PgWinSpr *)((signed int)((signed int)&pkTexture - v78) >> 2);
    pkWinSpr = (PgWinSpr *)((signed int)((signed int)&pkTexture - v78) >> 2);
    if ( (PgWin **)v77 == v2->m_vecVisibleRank._Myend )
    {
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleRank,
        1u);
      v79 = pkWinSpr;
    }
    v80 = v2->m_vecVisibleRank._Mylast;
    v81 = &v2->m_vecVisibleRank._Myfirst[(_DWORD)v79];
    if ( v80 )
      *v80 = *v81;
  }
  ++v2->m_vecVisibleRank._Mylast;
  v83 = UIUtil::CreateSpr(&ui, "Object02", 0);
  v84 = v83->vfptr[64].__vecDelDtor;
  pkWinSpr = v83;
  v84((NiRefObject *)&v83->vfptr, 0);
  v85 = (unsigned int)v2->m_vecVisibleMyRecord._Mylast;
  pkTexture = (NiSourceTexture *)v83;
  if ( (unsigned int)&pkTexture >= v85
    || (v86 = (unsigned int)v2->m_vecVisibleMyRecord._Myfirst, v86 > (unsigned int)&pkTexture) )
  {
    if ( (PgWin **)v85 == v2->m_vecVisibleMyRecord._Myend )
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
    v90 = v2->m_vecVisibleMyRecord._Mylast;
    if ( v90 )
      *v90 = pkWinSpr;
  }
  else
  {
    v87 = (PgWinSpr *)((signed int)((signed int)&pkTexture - v86) >> 2);
    pkWinSpr = (PgWinSpr *)((signed int)((signed int)&pkTexture - v86) >> 2);
    if ( (PgWin **)v85 == v2->m_vecVisibleMyRecord._Myend )
    {
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
      v87 = pkWinSpr;
    }
    v88 = &v2->m_vecVisibleMyRecord._Myfirst[(_DWORD)v87];
    v89 = v2->m_vecVisibleMyRecord._Mylast;
    if ( v89 )
      *v89 = *v88;
  }
  v91 = spNode.m_pObject;
  ++v2->m_vecVisibleMyRecord._Mylast;
  v92 = PgSprData::Create((NiAVObject *)&v91->vfptr, "Title", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v93 = v92->m_uiWidth;
  pkWinSpr = (PgWinSpr *)v92->m_uiHeight;
  i = v93;
  v94 = Font::Get(MAIN_MENU);
  v95 = PgWinText::CreateWin(uiLeft - v9, uiTop - iOffY, i, (unsigned int)pkWinSpr, v94, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkMyRecordMyInfo[0] = v95;
  v95->vfptr[122].__vecDelDtor((NiRefObject *)v95, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecordMyInfo[0]->vfptr[118].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecordMyInfo[0]->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecordMyInfo[0]->vfptr[64].__vecDelDtor)(0);
  v96 = (unsigned int)v2->m_vecVisibleMyRecord._Mylast;
  pkTextWin = v2->m_pkMyRecordMyInfo[0];
  if ( (unsigned int)&pkTextWin >= v96
    || (v97 = (unsigned int)v2->m_vecVisibleMyRecord._Myfirst, v97 > (unsigned int)&pkTextWin) )
  {
    if ( (PgWin **)v96 == v2->m_vecVisibleMyRecord._Myend )
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
    v101 = v2->m_vecVisibleMyRecord._Mylast;
    if ( v101 )
      *v101 = pkTextWin;
  }
  else
  {
    v98 = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v97) >> 2);
    pkWinSpr = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v97) >> 2);
    if ( (PgWin **)v96 == v2->m_vecVisibleMyRecord._Myend )
    {
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
      v98 = pkWinSpr;
    }
    v99 = v2->m_vecVisibleMyRecord._Mylast;
    v100 = &v2->m_vecVisibleMyRecord._Myfirst[(_DWORD)v98];
    if ( v99 )
      *v99 = *v100;
  }
  v102 = spNode.m_pObject;
  ++v2->m_vecVisibleMyRecord._Mylast;
  v103 = PgSprData::Create((NiAVObject *)&v102->vfptr, "Name", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v104 = v103->m_uiWidth;
  pkWinSpr = (PgWinSpr *)v103->m_uiHeight;
  i = v104;
  v105 = Font::Get(MAIN_MENU);
  v106 = PgWinText::CreateWin(uiLeft - v9, uiTop - iOffY, i, (unsigned int)pkWinSpr, v105, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkMyRecordMyInfo[1] = v106;
  v106->vfptr[122].__vecDelDtor((NiRefObject *)v106, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecordMyInfo[1]->vfptr[118].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecordMyInfo[1]->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecordMyInfo[1]->vfptr[64].__vecDelDtor)(0);
  v107 = (unsigned int)v2->m_vecVisibleMyRecord._Mylast;
  pkTextWin = v2->m_pkMyRecordMyInfo[1];
  if ( (unsigned int)&pkTextWin >= v107
    || (v108 = (unsigned int)v2->m_vecVisibleMyRecord._Myfirst, v108 > (unsigned int)&pkTextWin) )
  {
    if ( (PgWin **)v107 == v2->m_vecVisibleMyRecord._Myend )
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
    v112 = v2->m_vecVisibleMyRecord._Mylast;
    if ( v112 )
      *v112 = pkTextWin;
  }
  else
  {
    v109 = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v108) >> 2);
    pkWinSpr = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v108) >> 2);
    if ( (PgWin **)v107 == v2->m_vecVisibleMyRecord._Myend )
    {
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
      v109 = pkWinSpr;
    }
    v110 = v2->m_vecVisibleMyRecord._Mylast;
    v111 = &v2->m_vecVisibleMyRecord._Myfirst[(_DWORD)v109];
    if ( v110 )
      *v110 = *v111;
  }
  v113 = spNode.m_pObject;
  ++v2->m_vecVisibleMyRecord._Mylast;
  v114 = PgSprData::Create((NiAVObject *)&v113->vfptr, "Level", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v115 = v114->m_uiWidth;
  pkWinSpr = (PgWinSpr *)v114->m_uiHeight;
  i = v115;
  v116 = Font::Get(MAIN_MENU);
  v117 = PgWinText::CreateWin(uiLeft - v9, uiTop - iOffY, i, (unsigned int)pkWinSpr, v116, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkMyRecordMyInfo[2] = v117;
  v117->vfptr[122].__vecDelDtor((NiRefObject *)v117, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecordMyInfo[2]->vfptr[118].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecordMyInfo[2]->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecordMyInfo[2]->vfptr[64].__vecDelDtor)(0);
  v118 = (unsigned int)v2->m_vecVisibleMyRecord._Mylast;
  pkTextWin = v2->m_pkMyRecordMyInfo[2];
  if ( (unsigned int)&pkTextWin >= v118
    || (v119 = (unsigned int)v2->m_vecVisibleMyRecord._Myfirst, v119 > (unsigned int)&pkTextWin) )
  {
    if ( (PgWin **)v118 == v2->m_vecVisibleMyRecord._Myend )
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
    v123 = v2->m_vecVisibleMyRecord._Mylast;
    if ( v123 )
      *v123 = pkTextWin;
  }
  else
  {
    v120 = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v119) >> 2);
    pkWinSpr = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v119) >> 2);
    if ( (PgWin **)v118 == v2->m_vecVisibleMyRecord._Myend )
    {
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
      v120 = pkWinSpr;
    }
    v121 = v2->m_vecVisibleMyRecord._Mylast;
    v122 = &v2->m_vecVisibleMyRecord._Myfirst[(_DWORD)v120];
    if ( v121 )
      *v121 = *v122;
  }
  v124 = spNode.m_pObject;
  ++v2->m_vecVisibleMyRecord._Mylast;
  v125 = PgSprData::Create((NiAVObject *)&v124->vfptr, off_977204, &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v126 = v125->m_uiWidth;
  pkWinSpr = (PgWinSpr *)v125->m_uiHeight;
  i = v126;
  v127 = Font::Get(MAIN_MENU);
  v128 = PgWinText::CreateWin(uiLeft - v9, uiTop - iOffY, i, (unsigned int)pkWinSpr, v127, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkMyRecordMyInfo[3] = v128;
  v128->vfptr[122].__vecDelDtor((NiRefObject *)v128, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecordMyInfo[3]->vfptr[118].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecordMyInfo[3]->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecordMyInfo[3]->vfptr[64].__vecDelDtor)(0);
  v129 = (unsigned int)v2->m_vecVisibleMyRecord._Mylast;
  pkTextWin = v2->m_pkMyRecordMyInfo[3];
  if ( (unsigned int)&pkTextWin >= v129
    || (v130 = (unsigned int)v2->m_vecVisibleMyRecord._Myfirst, v130 > (unsigned int)&pkTextWin) )
  {
    if ( (PgWin **)v129 == v2->m_vecVisibleMyRecord._Myend )
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
    v134 = v2->m_vecVisibleMyRecord._Mylast;
    if ( v134 )
      *v134 = pkTextWin;
  }
  else
  {
    v131 = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v130) >> 2);
    pkWinSpr = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v130) >> 2);
    if ( (PgWin **)v129 == v2->m_vecVisibleMyRecord._Myend )
    {
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
      v131 = pkWinSpr;
    }
    v132 = v2->m_vecVisibleMyRecord._Mylast;
    v133 = &v2->m_vecVisibleMyRecord._Myfirst[(_DWORD)v131];
    if ( v132 )
      *v132 = *v133;
  }
  v135 = spNode.m_pObject;
  ++v2->m_vecVisibleMyRecord._Mylast;
  v136 = PgSprData::Create((NiAVObject *)&v135->vfptr, "PastRecord", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v137 = v136->m_uiWidth;
  v138 = g_pkToolTipWin;
  pkWinSpr = (PgWinSpr *)v136->m_uiHeight;
  i = v137;
  v139 = Font::Get(MAIN_MENU);
  v140 = PgWinAbbreviateText::CreateWin(
           uiLeft - v9,
           uiTop - iOffY,
           i,
           (unsigned int)pkWinSpr,
           v139,
           (PgWin *)&v2->vfptr,
           0,
           0,
           0,
           1,
           v138,
           7u);
  v2->m_pkMyDate[0] = (PgWinText *)v140;
  v140->vfptr[122].__vecDelDtor((NiRefObject *)v140, 5u);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyDate[0]->vfptr[118].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyDate[0]->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyDate[0]->vfptr[64].__vecDelDtor)(0);
  v141 = (unsigned int)v2->m_vecVisibleMyRecord._Mylast;
  pkTextWin = v2->m_pkMyDate[0];
  if ( (unsigned int)&pkTextWin >= v141
    || (v142 = (unsigned int)v2->m_vecVisibleMyRecord._Myfirst, v142 > (unsigned int)&pkTextWin) )
  {
    if ( (PgWin **)v141 == v2->m_vecVisibleMyRecord._Myend )
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
    v146 = v2->m_vecVisibleMyRecord._Mylast;
    if ( v146 )
      *v146 = pkTextWin;
  }
  else
  {
    v143 = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v142) >> 2);
    pkWinSpr = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v142) >> 2);
    if ( (PgWin **)v141 == v2->m_vecVisibleMyRecord._Myend )
    {
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
      v143 = pkWinSpr;
    }
    v144 = v2->m_vecVisibleMyRecord._Mylast;
    v145 = &v2->m_vecVisibleMyRecord._Myfirst[(_DWORD)v143];
    if ( v144 )
      *v144 = *v145;
  }
  v147 = spNode.m_pObject;
  ++v2->m_vecVisibleMyRecord._Mylast;
  v148 = PgSprData::Create((NiAVObject *)&v147->vfptr, "NewRecord", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v149 = v148->m_uiWidth;
  v150 = g_pkToolTipWin;
  pkWinSpr = (PgWinSpr *)v148->m_uiHeight;
  i = v149;
  v151 = Font::Get(MAIN_MENU);
  v152 = PgWinAbbreviateText::CreateWin(
           uiLeft - v9,
           uiTop - iOffY,
           i,
           (unsigned int)pkWinSpr,
           v151,
           (PgWin *)&v2->vfptr,
           0,
           0,
           0,
           1,
           v150,
           7u);
  v2->m_pkMyDate[1] = (PgWinText *)v152;
  v152->vfptr[122].__vecDelDtor((NiRefObject *)v152, 5u);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyDate[1]->vfptr[118].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyDate[1]->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyDate[1]->vfptr[64].__vecDelDtor)(0);
  v153 = (unsigned int)v2->m_vecVisibleMyRecord._Mylast;
  pkTextWin = v2->m_pkMyDate[1];
  if ( (unsigned int)&pkTextWin >= v153
    || (v154 = (unsigned int)v2->m_vecVisibleMyRecord._Myfirst, v154 > (unsigned int)&pkTextWin) )
  {
    if ( (PgWin **)v153 == v2->m_vecVisibleMyRecord._Myend )
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
    v158 = v2->m_vecVisibleMyRecord._Mylast;
    if ( v158 )
      *v158 = pkTextWin;
  }
  else
  {
    v155 = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v154) >> 2);
    pkWinSpr = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v154) >> 2);
    if ( (PgWin **)v153 == v2->m_vecVisibleMyRecord._Myend )
    {
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
      v155 = pkWinSpr;
    }
    v156 = v2->m_vecVisibleMyRecord._Mylast;
    v157 = &v2->m_vecVisibleMyRecord._Myfirst[(_DWORD)v155];
    if ( v156 )
      *v156 = *v157;
  }
  v159 = spNode.m_pObject;
  ++v2->m_vecVisibleMyRecord._Mylast;
  v160 = PgSprData::Create((NiAVObject *)&v159->vfptr, "Damage", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v161 = v160->m_uiWidth;
  pkWinSpr = (PgWinSpr *)v160->m_uiHeight;
  i = v161;
  v162 = Font::Get(MAIN_MENU);
  v163 = PgWinText::CreateWin(uiLeft - v9, uiTop - iOffY, i, (unsigned int)pkWinSpr, v162, (PgWin *)&v2->vfptr, 0, 0);
  v164 = v163->vfptr;
  pkTextWin = v163;
  v164[122].__vecDelDtor((NiRefObject *)v163, 5u);
  pkWinSpr = (PgWinSpr *)&pkTextWin->vfptr[118];
  v165 = TextData3::Get(0x9390A4C8);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkWinSpr->vfptr)(pkTextWin, v165);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[64].__vecDelDtor)(0);
  v166 = (unsigned int)v2->m_vecVisibleMyRecord._Mylast;
  pkTexture = (NiSourceTexture *)pkTextWin;
  if ( (unsigned int)&pkTexture >= v166
    || (v167 = (unsigned int)v2->m_vecVisibleMyRecord._Myfirst, v167 > (unsigned int)&pkTexture) )
  {
    if ( (PgWin **)v166 == v2->m_vecVisibleMyRecord._Myend )
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
    v171 = v2->m_vecVisibleMyRecord._Mylast;
    if ( v171 )
      *v171 = pkTextWin;
  }
  else
  {
    v168 = (PgWinSpr *)((signed int)((signed int)&pkTexture - v167) >> 2);
    pkWinSpr = (PgWinSpr *)((signed int)((signed int)&pkTexture - v167) >> 2);
    if ( (PgWin **)v166 == v2->m_vecVisibleMyRecord._Myend )
    {
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
      v168 = pkWinSpr;
    }
    v169 = v2->m_vecVisibleMyRecord._Mylast;
    v170 = &v2->m_vecVisibleMyRecord._Myfirst[(_DWORD)v168];
    if ( v169 )
      *v169 = *v170;
  }
  v172 = spNode.m_pObject;
  ++v2->m_vecVisibleMyRecord._Mylast;
  v173 = PgSprData::Create((NiAVObject *)&v172->vfptr, "DamagePastVal", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v174 = v173->m_uiWidth;
  v175 = g_pkToolTipWin;
  pkWinSpr = (PgWinSpr *)v173->m_uiHeight;
  i = v174;
  v176 = Font::Get(MAIN_MENU);
  v177 = PgWinAbbreviateText::CreateWin(
           uiLeft - v9,
           uiTop - iOffY,
           i,
           (unsigned int)pkWinSpr,
           v176,
           (PgWin *)&v2->vfptr,
           0,
           0,
           0,
           1,
           v175,
           7u);
  v2->m_pkMyRecord[0][0] = (PgWinText *)v177;
  v177->vfptr[122].__vecDelDtor((NiRefObject *)v177, 5u);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecord[0][0]->vfptr[118].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecord[0][0]->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecord[0][0]->vfptr[64].__vecDelDtor)(0);
  v178 = (unsigned int)v2->m_vecVisibleMyRecord._Mylast;
  pkTextWin = v2->m_pkMyRecord[0][0];
  if ( (unsigned int)&pkTextWin >= v178
    || (v179 = (unsigned int)v2->m_vecVisibleMyRecord._Myfirst, v179 > (unsigned int)&pkTextWin) )
  {
    if ( (PgWin **)v178 == v2->m_vecVisibleMyRecord._Myend )
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
    v183 = v2->m_vecVisibleMyRecord._Mylast;
    if ( v183 )
      *v183 = pkTextWin;
  }
  else
  {
    v180 = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v179) >> 2);
    pkWinSpr = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v179) >> 2);
    if ( (PgWin **)v178 == v2->m_vecVisibleMyRecord._Myend )
    {
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
      v180 = pkWinSpr;
    }
    v181 = v2->m_vecVisibleMyRecord._Mylast;
    v182 = &v2->m_vecVisibleMyRecord._Myfirst[(_DWORD)v180];
    if ( v181 )
      *v181 = *v182;
  }
  v184 = spNode.m_pObject;
  ++v2->m_vecVisibleMyRecord._Mylast;
  v185 = PgSprData::Create((NiAVObject *)&v184->vfptr, "DamageNewVal", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v186 = v185->m_uiWidth;
  v187 = g_pkToolTipWin;
  pkWinSpr = (PgWinSpr *)v185->m_uiHeight;
  i = v186;
  v188 = Font::Get(MAIN_MENU);
  v189 = PgWinAbbreviateText::CreateWin(
           uiLeft - v9,
           uiTop - iOffY,
           i,
           (unsigned int)pkWinSpr,
           v188,
           (PgWin *)&v2->vfptr,
           0,
           0,
           0,
           1,
           v187,
           7u);
  v2->m_pkMyRecord[1][0] = (PgWinText *)v189;
  v189->vfptr[122].__vecDelDtor((NiRefObject *)v189, 5u);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecord[1][0]->vfptr[118].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecord[1][0]->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecord[1][0]->vfptr[64].__vecDelDtor)(0);
  v190 = (unsigned int)v2->m_vecVisibleMyRecord._Mylast;
  pkTextWin = v2->m_pkMyRecord[1][0];
  if ( (unsigned int)&pkTextWin >= v190
    || (v191 = (unsigned int)v2->m_vecVisibleMyRecord._Myfirst, v191 > (unsigned int)&pkTextWin) )
  {
    if ( (PgWin **)v190 == v2->m_vecVisibleMyRecord._Myend )
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
    v195 = v2->m_vecVisibleMyRecord._Mylast;
    if ( v195 )
      *v195 = pkTextWin;
  }
  else
  {
    v192 = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v191) >> 2);
    pkWinSpr = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v191) >> 2);
    if ( (PgWin **)v190 == v2->m_vecVisibleMyRecord._Myend )
    {
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
      v192 = pkWinSpr;
    }
    v193 = v2->m_vecVisibleMyRecord._Mylast;
    v194 = &v2->m_vecVisibleMyRecord._Myfirst[(_DWORD)v192];
    if ( v193 )
      *v193 = *v194;
  }
  v196 = spNode.m_pObject;
  ++v2->m_vecVisibleMyRecord._Mylast;
  v197 = PgSprData::Create((NiAVObject *)&v196->vfptr, "DamageReceive", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v198 = v197->m_uiWidth;
  pkWinSpr = (PgWinSpr *)v197->m_uiHeight;
  i = v198;
  v199 = Font::Get(MAIN_MENU);
  v200 = PgWinText::CreateWin(uiLeft - v9, uiTop - iOffY, i, (unsigned int)pkWinSpr, v199, (PgWin *)&v2->vfptr, 0, 0);
  v201 = v200->vfptr;
  pkTextWin = v200;
  v201[122].__vecDelDtor((NiRefObject *)v200, 5u);
  pkWinSpr = (PgWinSpr *)&pkTextWin->vfptr[118];
  v202 = TextData3::Get(0x2E342C63u);
  ((void (__thiscall *)(_DWORD, _DWORD))pkWinSpr->vfptr)(pkTextWin, v202);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[64].__vecDelDtor)(0);
  v203 = (unsigned int)v2->m_vecVisibleMyRecord._Mylast;
  pkTexture = (NiSourceTexture *)pkTextWin;
  if ( (unsigned int)&pkTexture >= v203
    || (v204 = (unsigned int)v2->m_vecVisibleMyRecord._Myfirst, v204 > (unsigned int)&pkTexture) )
  {
    if ( (PgWin **)v203 == v2->m_vecVisibleMyRecord._Myend )
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
    v208 = v2->m_vecVisibleMyRecord._Mylast;
    if ( v208 )
      *v208 = pkTextWin;
  }
  else
  {
    v205 = (PgWinSpr *)((signed int)((signed int)&pkTexture - v204) >> 2);
    pkWinSpr = (PgWinSpr *)((signed int)((signed int)&pkTexture - v204) >> 2);
    if ( (PgWin **)v203 == v2->m_vecVisibleMyRecord._Myend )
    {
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
      v205 = pkWinSpr;
    }
    v206 = v2->m_vecVisibleMyRecord._Mylast;
    v207 = &v2->m_vecVisibleMyRecord._Myfirst[(_DWORD)v205];
    if ( v206 )
      *v206 = *v207;
  }
  v209 = spNode.m_pObject;
  ++v2->m_vecVisibleMyRecord._Mylast;
  v210 = PgSprData::Create((NiAVObject *)&v209->vfptr, "DamageReceivePastVal", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v211 = v210->m_uiWidth;
  v212 = g_pkToolTipWin;
  pkWinSpr = (PgWinSpr *)v210->m_uiHeight;
  i = v211;
  v213 = Font::Get(MAIN_MENU);
  v214 = PgWinAbbreviateText::CreateWin(
           uiLeft - v9,
           uiTop - iOffY,
           i,
           (unsigned int)pkWinSpr,
           v213,
           (PgWin *)&v2->vfptr,
           0,
           0,
           0,
           1,
           v212,
           7u);
  v2->m_pkMyRecord[0][1] = (PgWinText *)v214;
  v214->vfptr[122].__vecDelDtor((NiRefObject *)v214, 5u);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecord[0][1]->vfptr[118].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecord[0][1]->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecord[0][1]->vfptr[64].__vecDelDtor)(0);
  v215 = (unsigned int)v2->m_vecVisibleMyRecord._Mylast;
  pkTextWin = v2->m_pkMyRecord[0][1];
  if ( (unsigned int)&pkTextWin >= v215
    || (v216 = (unsigned int)v2->m_vecVisibleMyRecord._Myfirst, v216 > (unsigned int)&pkTextWin) )
  {
    if ( (PgWin **)v215 == v2->m_vecVisibleMyRecord._Myend )
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
    v220 = v2->m_vecVisibleMyRecord._Mylast;
    if ( v220 )
      *v220 = pkTextWin;
  }
  else
  {
    v217 = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v216) >> 2);
    pkWinSpr = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v216) >> 2);
    if ( (PgWin **)v215 == v2->m_vecVisibleMyRecord._Myend )
    {
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
      v217 = pkWinSpr;
    }
    v218 = v2->m_vecVisibleMyRecord._Mylast;
    v219 = &v2->m_vecVisibleMyRecord._Myfirst[(_DWORD)v217];
    if ( v218 )
      *v218 = *v219;
  }
  v221 = spNode.m_pObject;
  ++v2->m_vecVisibleMyRecord._Mylast;
  v222 = PgSprData::Create((NiAVObject *)&v221->vfptr, "DamageReceiveNewVal", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v223 = v222->m_uiWidth;
  v224 = g_pkToolTipWin;
  pkWinSpr = (PgWinSpr *)v222->m_uiHeight;
  i = v223;
  v225 = Font::Get(MAIN_MENU);
  v226 = PgWinAbbreviateText::CreateWin(
           uiLeft - v9,
           uiTop - iOffY,
           i,
           (unsigned int)pkWinSpr,
           v225,
           (PgWin *)&v2->vfptr,
           0,
           0,
           0,
           1,
           v224,
           7u);
  v2->m_pkMyRecord[1][1] = (PgWinText *)v226;
  v226->vfptr[122].__vecDelDtor((NiRefObject *)v226, 5u);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecord[1][1]->vfptr[118].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecord[1][1]->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecord[1][1]->vfptr[64].__vecDelDtor)(0);
  v227 = (unsigned int)v2->m_vecVisibleMyRecord._Mylast;
  pkTextWin = v2->m_pkMyRecord[1][1];
  if ( (unsigned int)&pkTextWin >= v227
    || (v228 = (unsigned int)v2->m_vecVisibleMyRecord._Myfirst, v228 > (unsigned int)&pkTextWin) )
  {
    if ( (PgWin **)v227 == v2->m_vecVisibleMyRecord._Myend )
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
    v232 = v2->m_vecVisibleMyRecord._Mylast;
    if ( v232 )
      *v232 = pkTextWin;
  }
  else
  {
    v229 = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v228) >> 2);
    pkWinSpr = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v228) >> 2);
    if ( (PgWin **)v227 == v2->m_vecVisibleMyRecord._Myend )
    {
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
      v229 = pkWinSpr;
    }
    v230 = v2->m_vecVisibleMyRecord._Mylast;
    v231 = &v2->m_vecVisibleMyRecord._Myfirst[(_DWORD)v229];
    if ( v230 )
      *v230 = *v231;
  }
  v233 = spNode.m_pObject;
  ++v2->m_vecVisibleMyRecord._Mylast;
  v234 = PgSprData::Create((NiAVObject *)&v233->vfptr, "Heal", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v235 = v234->m_uiWidth;
  pkWinSpr = (PgWinSpr *)v234->m_uiHeight;
  i = v235;
  v236 = Font::Get(MAIN_MENU);
  v237 = PgWinText::CreateWin(uiLeft - v9, uiTop - iOffY, i, (unsigned int)pkWinSpr, v236, (PgWin *)&v2->vfptr, 0, 0);
  v238 = v237->vfptr;
  pkTextWin = v237;
  v238[122].__vecDelDtor((NiRefObject *)v237, 5u);
  pkWinSpr = (PgWinSpr *)&pkTextWin->vfptr[118];
  v239 = TextData3::Get(0x9E846385);
  ((void (__thiscall *)(_DWORD, _DWORD))pkWinSpr->vfptr)(pkTextWin, v239);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[64].__vecDelDtor)(0);
  v240 = (unsigned int)v2->m_vecVisibleMyRecord._Mylast;
  pkTexture = (NiSourceTexture *)pkTextWin;
  if ( (unsigned int)&pkTexture >= v240
    || (v241 = (unsigned int)v2->m_vecVisibleMyRecord._Myfirst, v241 > (unsigned int)&pkTexture) )
  {
    if ( (PgWin **)v240 == v2->m_vecVisibleMyRecord._Myend )
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
    v245 = v2->m_vecVisibleMyRecord._Mylast;
    if ( v245 )
      *v245 = pkTextWin;
  }
  else
  {
    v242 = (PgWinSpr *)((signed int)((signed int)&pkTexture - v241) >> 2);
    pkWinSpr = (PgWinSpr *)((signed int)((signed int)&pkTexture - v241) >> 2);
    if ( (PgWin **)v240 == v2->m_vecVisibleMyRecord._Myend )
    {
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
      v242 = pkWinSpr;
    }
    v243 = v2->m_vecVisibleMyRecord._Mylast;
    v244 = &v2->m_vecVisibleMyRecord._Myfirst[(_DWORD)v242];
    if ( v243 )
      *v243 = *v244;
  }
  v246 = spNode.m_pObject;
  ++v2->m_vecVisibleMyRecord._Mylast;
  v247 = PgSprData::Create((NiAVObject *)&v246->vfptr, "HealPastVal", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v248 = v247->m_uiWidth;
  v249 = g_pkToolTipWin;
  pkWinSpr = (PgWinSpr *)v247->m_uiHeight;
  i = v248;
  v250 = Font::Get(MAIN_MENU);
  v251 = PgWinAbbreviateText::CreateWin(
           uiLeft - v9,
           uiTop - iOffY,
           i,
           (unsigned int)pkWinSpr,
           v250,
           (PgWin *)&v2->vfptr,
           0,
           0,
           0,
           1,
           v249,
           7u);
  v2->m_pkMyRecord[0][2] = (PgWinText *)v251;
  v251->vfptr[122].__vecDelDtor((NiRefObject *)v251, 5u);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecord[0][2]->vfptr[118].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecord[0][2]->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecord[0][2]->vfptr[64].__vecDelDtor)(0);
  v252 = (unsigned int)v2->m_vecVisibleMyRecord._Mylast;
  pkTextWin = v2->m_pkMyRecord[0][2];
  if ( (unsigned int)&pkTextWin >= v252
    || (v253 = (unsigned int)v2->m_vecVisibleMyRecord._Myfirst, v253 > (unsigned int)&pkTextWin) )
  {
    if ( (PgWin **)v252 == v2->m_vecVisibleMyRecord._Myend )
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
    v257 = v2->m_vecVisibleMyRecord._Mylast;
    if ( v257 )
      *v257 = pkTextWin;
  }
  else
  {
    v254 = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v253) >> 2);
    pkWinSpr = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v253) >> 2);
    if ( (PgWin **)v252 == v2->m_vecVisibleMyRecord._Myend )
    {
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
      v254 = pkWinSpr;
    }
    v255 = v2->m_vecVisibleMyRecord._Mylast;
    v256 = &v2->m_vecVisibleMyRecord._Myfirst[(_DWORD)v254];
    if ( v255 )
      *v255 = *v256;
  }
  v258 = spNode.m_pObject;
  ++v2->m_vecVisibleMyRecord._Mylast;
  v259 = PgSprData::Create((NiAVObject *)&v258->vfptr, "HealNewVal", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v260 = v259->m_uiWidth;
  v261 = g_pkToolTipWin;
  pkWinSpr = (PgWinSpr *)v259->m_uiHeight;
  i = v260;
  v262 = Font::Get(MAIN_MENU);
  v263 = PgWinAbbreviateText::CreateWin(
           uiLeft - v9,
           uiTop - iOffY,
           i,
           (unsigned int)pkWinSpr,
           v262,
           (PgWin *)&v2->vfptr,
           0,
           0,
           0,
           1,
           v261,
           7u);
  v2->m_pkMyRecord[1][2] = (PgWinText *)v263;
  v263->vfptr[122].__vecDelDtor((NiRefObject *)v263, 5u);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecord[1][2]->vfptr[118].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecord[1][2]->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecord[1][2]->vfptr[64].__vecDelDtor)(0);
  v264 = (unsigned int)v2->m_vecVisibleMyRecord._Mylast;
  pkTextWin = v2->m_pkMyRecord[1][2];
  if ( (unsigned int)&pkTextWin >= v264
    || (v265 = (unsigned int)v2->m_vecVisibleMyRecord._Myfirst, v265 > (unsigned int)&pkTextWin) )
  {
    if ( (PgWin **)v264 == v2->m_vecVisibleMyRecord._Myend )
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
    v269 = v2->m_vecVisibleMyRecord._Mylast;
    if ( v269 )
      *v269 = pkTextWin;
  }
  else
  {
    v266 = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v265) >> 2);
    pkWinSpr = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v265) >> 2);
    if ( (PgWin **)v264 == v2->m_vecVisibleMyRecord._Myend )
    {
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
      v266 = pkWinSpr;
    }
    v267 = v2->m_vecVisibleMyRecord._Mylast;
    v268 = &v2->m_vecVisibleMyRecord._Myfirst[(_DWORD)v266];
    if ( v267 )
      *v267 = *v268;
  }
  v270 = spNode.m_pObject;
  ++v2->m_vecVisibleMyRecord._Mylast;
  v271 = PgSprData::Create((NiAVObject *)&v270->vfptr, "ClearTime", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v272 = v271->m_uiWidth;
  pkWinSpr = (PgWinSpr *)v271->m_uiHeight;
  i = v272;
  v273 = Font::Get(MAIN_MENU);
  v274 = PgWinText::CreateWin(uiLeft - v9, uiTop - iOffY, i, (unsigned int)pkWinSpr, v273, (PgWin *)&v2->vfptr, 0, 0);
  v275 = v274->vfptr;
  pkTextWin = v274;
  v275[122].__vecDelDtor((NiRefObject *)v274, 5u);
  pkWinSpr = (PgWinSpr *)&pkTextWin->vfptr[118];
  v276 = TextData3::Get(0xF3DFBB2D);
  ((void (__thiscall *)(_DWORD, _DWORD))pkWinSpr->vfptr)(pkTextWin, v276);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[64].__vecDelDtor)(0);
  v277 = (unsigned int)v2->m_vecVisibleMyRecord._Mylast;
  pkTexture = (NiSourceTexture *)pkTextWin;
  if ( (unsigned int)&pkTexture >= v277
    || (v278 = (unsigned int)v2->m_vecVisibleMyRecord._Myfirst, v278 > (unsigned int)&pkTexture) )
  {
    if ( (PgWin **)v277 == v2->m_vecVisibleMyRecord._Myend )
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
    v282 = v2->m_vecVisibleMyRecord._Mylast;
    if ( v282 )
      *v282 = pkTextWin;
  }
  else
  {
    v279 = (PgWinSpr *)((signed int)((signed int)&pkTexture - v278) >> 2);
    pkWinSpr = (PgWinSpr *)((signed int)((signed int)&pkTexture - v278) >> 2);
    if ( (PgWin **)v277 == v2->m_vecVisibleMyRecord._Myend )
    {
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
      v279 = pkWinSpr;
    }
    v280 = v2->m_vecVisibleMyRecord._Mylast;
    v281 = &v2->m_vecVisibleMyRecord._Myfirst[(_DWORD)v279];
    if ( v280 )
      *v280 = *v281;
  }
  v283 = spNode.m_pObject;
  ++v2->m_vecVisibleMyRecord._Mylast;
  v284 = PgSprData::Create((NiAVObject *)&v283->vfptr, "ClearTimePastVal", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v285 = v284->m_uiWidth;
  v286 = g_pkToolTipWin;
  pkWinSpr = (PgWinSpr *)v284->m_uiHeight;
  i = v285;
  v287 = Font::Get(MAIN_MENU);
  v288 = PgWinAbbreviateText::CreateWin(
           uiLeft - v9,
           uiTop - iOffY,
           i,
           (unsigned int)pkWinSpr,
           v287,
           (PgWin *)&v2->vfptr,
           0,
           0,
           0,
           1,
           v286,
           7u);
  v2->m_pkMyRecord[0][3] = (PgWinText *)v288;
  v288->vfptr[122].__vecDelDtor((NiRefObject *)v288, 5u);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecord[0][3]->vfptr[118].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecord[0][3]->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecord[0][3]->vfptr[64].__vecDelDtor)(0);
  v289 = (unsigned int)v2->m_vecVisibleMyRecord._Mylast;
  pkTextWin = v2->m_pkMyRecord[0][3];
  if ( (unsigned int)&pkTextWin >= v289
    || (v290 = (unsigned int)v2->m_vecVisibleMyRecord._Myfirst, v290 > (unsigned int)&pkTextWin) )
  {
    if ( (PgWin **)v289 == v2->m_vecVisibleMyRecord._Myend )
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
    v294 = v2->m_vecVisibleMyRecord._Mylast;
    if ( v294 )
      *v294 = pkTextWin;
  }
  else
  {
    v291 = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v290) >> 2);
    pkWinSpr = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v290) >> 2);
    if ( (PgWin **)v289 == v2->m_vecVisibleMyRecord._Myend )
    {
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
      v291 = pkWinSpr;
    }
    v292 = v2->m_vecVisibleMyRecord._Mylast;
    v293 = &v2->m_vecVisibleMyRecord._Myfirst[(_DWORD)v291];
    if ( v292 )
      *v292 = *v293;
  }
  v295 = spNode.m_pObject;
  ++v2->m_vecVisibleMyRecord._Mylast;
  v296 = PgSprData::Create((NiAVObject *)&v295->vfptr, "ClearTimeNewVal", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v297 = v296->m_uiWidth;
  v298 = g_pkToolTipWin;
  pkWinSpr = (PgWinSpr *)v296->m_uiHeight;
  i = v297;
  v299 = Font::Get(MAIN_MENU);
  v300 = PgWinAbbreviateText::CreateWin(
           uiLeft - v9,
           uiTop - iOffY,
           i,
           (unsigned int)pkWinSpr,
           v299,
           (PgWin *)&v2->vfptr,
           0,
           0,
           0,
           1,
           v298,
           7u);
  v2->m_pkMyRecord[1][3] = (PgWinText *)v300;
  v300->vfptr[122].__vecDelDtor((NiRefObject *)v300, 5u);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecord[1][3]->vfptr[118].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecord[1][3]->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyRecord[1][3]->vfptr[64].__vecDelDtor)(0);
  v301 = (unsigned int)v2->m_vecVisibleMyRecord._Mylast;
  pkTextWin = v2->m_pkMyRecord[1][3];
  if ( (unsigned int)&pkTextWin >= v301
    || (v302 = (unsigned int)v2->m_vecVisibleMyRecord._Myfirst, v302 > (unsigned int)&pkTextWin) )
  {
    if ( (PgWin **)v301 == v2->m_vecVisibleMyRecord._Myend )
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
    v306 = v2->m_vecVisibleMyRecord._Mylast;
    if ( v306 )
      *v306 = pkTextWin;
  }
  else
  {
    v303 = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v302) >> 2);
    pkWinSpr = (PgWinSpr *)((signed int)((signed int)&pkTextWin - v302) >> 2);
    if ( (PgWin **)v301 == v2->m_vecVisibleMyRecord._Myend )
    {
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleMyRecord,
        1u);
      v303 = pkWinSpr;
    }
    v304 = v2->m_vecVisibleMyRecord._Mylast;
    v305 = &v2->m_vecVisibleMyRecord._Myfirst[(_DWORD)v303];
    if ( v304 )
      *v304 = *v305;
  }
  ++v2->m_vecVisibleMyRecord._Mylast;
  pkTexture = 0;
  v364 = v2->m_pkTopPortrait;
  i = (int)v2->m_pkTopPortrait;
  do
  {
    v307 = (PgWinText *)FaceCutMaskWin::CreateWin((int)pkTexture);
    *(_DWORD *)i = v307;
    pkTextWin = v307;
    v308 = (unsigned int)v2->m_vecVisibleRank._Mylast;
    if ( (unsigned int)&pkTextWin >= v308
      || (v309 = (unsigned int)v2->m_vecVisibleRank._Myfirst, v309 > (unsigned int)&pkTextWin) )
    {
      if ( (PgWin **)v308 == v2->m_vecVisibleRank._Myend )
        std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
          (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v2->m_vecVisibleRank,
          1u);
      v318 = v2->m_vecVisibleRank._Mylast;
      if ( v318 )
        *v318 = pkTextWin;
    }
    else
    {
      v310 = (signed int)&pkTextWin - v309;
      v311 = v2->m_vecVisibleRank._Myend;
      v312 = (PgWinSpr *)(v310 >> 2);
      pkWinSpr = v312;
      if ( (PgWin **)v308 == v311 )
      {
        v313 = v2->m_vecVisibleRank._Myfirst;
        v314 = (signed int)(v308 - (_DWORD)v313) >> 2;
        if ( v314 > 0x3FFFFFFE )
          std::_Xlength_error("vector<T> too long");
        v315 = v311 - v313;
        pkObject = (NiAVObject *)(v314 + 1);
        if ( v314 + 1 > v315 )
        {
          if ( 0x3FFFFFFF - (v315 >> 1) >= v315 )
            v316 = (NiAVObject *)((v315 >> 1) + v315);
          else
            v316 = 0;
          if ( v316 < pkObject )
            v316 = pkObject;
          std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
            (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&v2->m_vecVisibleRank,
            (unsigned int)v316);
        }
        v312 = pkWinSpr;
      }
      v317 = v2->m_vecVisibleRank._Mylast;
      if ( v317 )
        *v317 = v2->m_vecVisibleRank._Myfirst[(_DWORD)v312];
    }
    v319 = pkTexture;
    ++v2->m_vecVisibleRank._Mylast;
    i += 4;
    pkTexture = (NiSourceTexture *)((char *)v319 + 1);
  }
  while ( (signed int)&v319->vfptr + 1 < 3 );
  v320 = 0;
  v321 = (NiAVObject **)v2->m_pkTopName;
  do
  {
    pkObject = (NiAVObject *)spNode.m_pObject;
    i = v320 + 1;
    v322 = fs("TopRankName%.2d", v320 + 1);
    v323 = PgSprData::Create(pkObject, v322, &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
    v324 = (PgWinSpr *)v323->m_uiWidth;
    v325 = g_pkToolTipWin;
    pkObject = (NiAVObject *)v323->m_uiHeight;
    pkWinSpr = v324;
    v326 = Font::Get(MAIN_MENU);
    v327 = PgWinAbbreviateText::CreateWin(
             uiLeft - v9,
             uiTop - iOffY,
             (unsigned int)pkWinSpr,
             (unsigned int)pkObject,
             v326,
             (PgWin *)&v2->vfptr,
             0,
             0,
             0,
             1,
             v325,
             7u);
    *v321 = (NiAVObject *)v327;
    v327->vfptr[122].__vecDelDtor((NiRefObject *)v327, 5u);
    ((void (__stdcall *)(_DWORD))(*v321)->vfptr[118].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))(*v321)->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))(*v321)->vfptr[64].__vecDelDtor)(0);
    pkObject = *v321;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_vecVisibleRank,
      (const unsigned int *)&pkObject);
    v320 = i;
    ++v321;
  }
  while ( i < 3 );
  v328 = 0;
  v329 = (NiAVObject **)v2->m_pkTopRecord;
  do
  {
    pkObject = (NiAVObject *)spNode.m_pObject;
    i = v328 + 1;
    v330 = fs("TopDamage%.2d", v328 + 1);
    v331 = PgSprData::Create(pkObject, v330, &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
    v332 = (PgWinSpr *)v331->m_uiWidth;
    v333 = g_pkToolTipWin;
    pkObject = (NiAVObject *)v331->m_uiHeight;
    pkWinSpr = v332;
    v334 = Font::Get(MAIN_MENU);
    v335 = PgWinAbbreviateText::CreateWin(
             uiLeft - v9,
             uiTop - iOffY,
             (unsigned int)pkWinSpr,
             (unsigned int)pkObject,
             v334,
             (PgWin *)&v2->vfptr,
             0,
             0,
             0,
             1,
             v333,
             7u);
    *v329 = (NiAVObject *)v335;
    v335->vfptr[122].__vecDelDtor((NiRefObject *)v335, 5u);
    ((void (__stdcall *)(_DWORD))(*v329)->vfptr[118].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))(*v329)->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))(*v329)->vfptr[64].__vecDelDtor)(0);
    pkObject = *v329;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_vecVisibleRank,
      (const unsigned int *)&pkObject);
    v328 = i;
    ++v329;
  }
  while ( i < 3 );
  i = 0;
  v336 = (NiAVObject **)v2->m_pkIDListPanel;
  do
  {
    v337 = fs("Panel%02d", i + 7);
    v338 = UIUtil::CreateSpr(&ui, v337, 0);
    *v336 = (NiAVObject *)v338;
    v338->vfptr[64].__vecDelDtor((NiRefObject *)v338, 0);
    ((void (__stdcall *)(_DWORD))(*v336)->vfptr[60].__vecDelDtor)(0);
    pkObject = *v336;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_vecVisibleIDSelect,
      (const unsigned int *)&pkObject);
    ++v336;
    ++i;
  }
  while ( i < 2 );
  v2->m_pkIDSlideBtn = UIUtil::CreateBtn(&ui, 0x11u, "BtnNor", "BtnClick", "BtnOver", 0, 0);
  *(_QWORD *)&v339.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v339.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v340 = (char *)TextData3::Get(0x9B8FB6D9);
  v341 = UIUtil::CreateAttachedText((PgWin *)&v2->m_pkIDSlideBtn->vfptr, v340, v339, 5u);
  v342 = kCreateInfo.m_arrItem._Myfirst;
  v2->m_pkIDSlideText = v341;
  if ( v342 != kCreateInfo.m_arrItem._Mylast )
  {
    v343 = std::_Move<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem> *>(
             kCreateInfo.m_arrItem._Mylast,
             kCreateInfo.m_arrItem._Mylast,
             v342);
    std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(v343, kCreateInfo.m_arrItem._Mylast);
    kCreateInfo.m_arrItem._Mylast = v343;
  }
  kCreateInfo.m_bMakeData = 0;
  kCreateInfo.m_nOffX = 0;
  kCreateInfo.m_nOffY = 0;
  v344 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
  v344->nItemType = 1;
  v344->pNode = spNode.m_pObject;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarNor01", 0xEu);
  v345 = &v344->vecNodeName;
  LOBYTE(v376) = 7;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v345,
    &_Val);
  LOBYTE(v376) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarClick01", 0x10u);
  LOBYTE(v376) = 8;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v345,
    &_Val);
  LOBYTE(v376) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarOver01", 0xFu);
  LOBYTE(v376) = 9;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v345,
    &_Val);
  LOBYTE(v376) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v346 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  v346->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column05", 8u);
  LOBYTE(v376) = 10;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &v346->vecNodeName,
    &_Val);
  LOBYTE(v376) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v346->pNode = spNode.m_pObject;
  SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
  v347 = MenuTexMgr::GetTexture(4u);
  v348 = v347;
  v349 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SubText02", &uiLeft, &uiTop, v347);
  v350 = SlideListWin::CreateWin(uiLeft, uiTop, v349, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
  v2->m_pkIDSlideListWin = v350;
  v350->m_uiLClickMsg = 18;
  SlideListWin::AlignText(v2->m_pkIDSlideListWin, 4u);
  SlideListWin::UpdateViewList(v2->m_pkIDSlideListWin);
  v2->m_pkIDSlideListWin->m_bCheckEnable = 0;
  ((void (__stdcall *)(_DWORD))v2->m_pkIDSlideListWin->vfptr[64].__vecDelDtor)(0);
  pkObject = (NiAVObject *)&v2->m_pkIDSlideListWin->vfptr;
  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
    (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_vecVisibleIDSelect,
    (const unsigned int *)&pkObject);
  v351 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle", &uiLeft, &uiTop, v348);
  v352 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnNor01");
  NiObjectNET::SetName(v352, "SlideBar_DnBtn01Nor");
  v353 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnClick01");
  NiObjectNET::SetName(v353, "SlideBar_DnBtn01Click");
  v354 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnOver01");
  NiObjectNET::SetName(v354, "SlideBar_DnBtn01Over");
  v355 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnNor01");
  NiObjectNET::SetName(v355, "SlideBar_UpBtn01Nor");
  v356 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnClick01");
  NiObjectNET::SetName(v356, "SlideBar_UpBtn01Click");
  v357 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnOver01");
  NiObjectNET::SetName(v357, "SlideBar_UpBtn01Over");
  v358 = SlideBar::CreateWin(
           spNode.m_pObject,
           "SlideBar01",
           "SlideBar_UpBtn01",
           "SlideBar_DnBtn01",
           v351,
           0,
           (PgWin *)&v2->vfptr);
  v2->m_pkIDSlideBar = v358;
  v358->m_uiClickMsg = 19;
  v2->m_pkIDSlideBar->m_eType = 1;
  ((void (__stdcall *)(_DWORD))v2->m_pkIDSlideBar->vfptr[64].__vecDelDtor)(0);
  SlideBar::SetSplitCnt(v2->m_pkIDSlideBar, v2->m_pkIDSlideListWin->m_nSlideSplitCnt);
  pkObject = (NiAVObject *)&v2->m_pkIDSlideBar->vfptr;
  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
    (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_vecVisibleIDSelect,
    (const unsigned int *)&pkObject);
  ((void (__thiscall *)(IDRankingWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
  v359 = v364;
  pkWinSpr = (PgWinSpr *)&v2->m_kLocal.m_Translate;
  pkObject = (NiAVObject *)&v2->m_kLocal.m_Translate.y;
  v360 = 3;
  do
  {
    v361 = (signed int)*(float *)&pkObject->vfptr;
    (*v359)->vfptr[77].__vecDelDtor((NiRefObject *)*v359, (signed int)*(float *)&pkWinSpr->vfptr);
    ++v359;
    --v360;
  }
  while ( v360 );
  LOBYTE(v376) = 1;
  if ( kCreateInfo.m_arrItem._Myfirst )
  {
    std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(
      kCreateInfo.m_arrItem._Myfirst,
      kCreateInfo.m_arrItem._Mylast);
    operator delete(kCreateInfo.m_arrItem._Myfirst);
  }
  kCreateInfo.m_arrItem._Myfirst = 0;
  kCreateInfo.m_arrItem._Mylast = 0;
  kCreateInfo.m_arrItem._Myend = 0;
  LOBYTE(v376) = 0;
  UIUtil::~UIUtil(&ui);
  v362 = spNode.m_pObject;
  v376 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v362 )
    v362->vfptr->__vecDelDtor((NiRefObject *)v362, 1u);
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0043AA70) --------------------------------------------------------
void __thiscall Name3::Name3(Name3 *this)
{
  *(_QWORD *)&this->n3_code[1] = 0i64;
  this->n3_code[0] = 0;
}

//----- (0043AA80) --------------------------------------------------------
FaceCutMaskWin *__thiscall FaceCutMaskWin::`scalar deleting destructor'(FaceCutMaskWin *this, unsigned int a2)
{
  FaceCutMaskWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&FaceCutMaskWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&FaceCutMaskWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97753C: using guessed type void (__thiscall *FaceCutMaskWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97755C: using guessed type int (__thiscall *FaceCutMaskWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0043AAC0) --------------------------------------------------------
MapInfo *__cdecl MapInfoTab::GetByMapName(const unsigned __int16 id)
{
  unsigned int v1; // esi@1
  MapInfo *result; // eax@4

  v1 = 0;
  if ( ITableBase<MapInfo,MapInfoTab>::GetTotal() )
  {
    while ( *(_WORD *)CDataReader::GetRecord((CDataReader *)(ITableBase<MapInfo,MapInfoTab>::ms_pkTable + 4), v1) != id )
    {
      if ( ++v1 >= ITableBase<MapInfo,MapInfoTab>::GetTotal() )
        goto LABEL_4;
    }
    result = (MapInfo *)CDataReader::GetRecord((CDataReader *)(ITableBase<MapInfo,MapInfoTab>::ms_pkTable + 4), v1);
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}
// A89D38: using guessed type int ITableBase<MapInfo,MapInfoTab>::ms_pkTable;

//----- (0043AB10) --------------------------------------------------------
SHINE_INDUN_INFO *__stdcall std::allocator<SHINE_INDUN_INFO>::allocate(unsigned int _Count)
{
  SHINE_INDUN_INFO *result; // eax@1
  std::exception pExceptionObject; // [sp+0h] [bp-Ch]@4

  result = 0;
  if ( _Count )
  {
    if ( _Count > 0x13B13B13 || (result = (SHINE_INDUN_INFO *)operator new(13 * _Count)) == 0 )
    {
      _Count = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&_Count);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
  }
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0043AB70) --------------------------------------------------------
void __thiscall std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(std::vector<unsigned long,std::allocator<unsigned long> > *this, const unsigned int *_Val)
{
  std::vector<unsigned long,std::allocator<unsigned long> > *v2; // esi@1
  unsigned int *v3; // eax@1
  signed int v4; // edi@3
  unsigned int *v5; // eax@5
  _DWORD *v6; // eax@9

  v2 = this;
  v3 = this->_Mylast;
  if ( _Val >= v3 || this->_Myfirst > _Val )
  {
    if ( v3 == this->_Myend )
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)this,
        1u);
    v6 = v2->_Mylast;
    if ( v6 )
      *v6 = *_Val;
  }
  else
  {
    v4 = _Val - this->_Myfirst;
    if ( v3 == this->_Myend )
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)this,
        1u);
    v5 = v2->_Mylast;
    if ( v5 )
    {
      *v5 = v2->_Myfirst[v4];
      ++v2->_Mylast;
      return;
    }
  }
  ++v2->_Mylast;
}

//----- (0043ABE0) --------------------------------------------------------
SHINE_INDUN_INFO *__cdecl std::_Uninit_move<SHINE_INDUN_INFO *,SHINE_INDUN_INFO *,std::allocator<SHINE_INDUN_INFO>,SHINE_INDUN_INFO>(SHINE_INDUN_INFO *_First, SHINE_INDUN_INFO *_Last, SHINE_INDUN_INFO *_Dest)
{
  SHINE_INDUN_INFO *v3; // ecx@1
  SHINE_INDUN_INFO *result; // eax@1

  v3 = _First;
  for ( result = _Dest; v3 != _Last; ++result )
  {
    if ( result )
    {
      result->MapIDClient.n3_code[0] = v3->MapIDClient.n3_code[0];
      result->MapIDClient.n3_code[1] = v3->MapIDClient.n3_code[1];
      result->MapIDClient.n3_code[2] = v3->MapIDClient.n3_code[2];
      result->ModeIDLv = v3->ModeIDLv;
    }
    ++v3;
  }
  return result;
}

//----- (0043AC20) --------------------------------------------------------
void __thiscall std::vector<SHINE_INDUN_INFO,std::allocator<SHINE_INDUN_INFO>>::reserve(std::vector<SHINE_INDUN_INFO,std::allocator<SHINE_INDUN_INFO> > *this, unsigned int _Count)
{
  std::vector<SHINE_INDUN_INFO,std::allocator<SHINE_INDUN_INFO> > *v2; // esi@1
  SHINE_INDUN_INFO *v3; // eax@4
  SHINE_INDUN_INFO *v4; // ST04_4@4
  SHINE_INDUN_INFO *v5; // ST00_4@4
  SHINE_INDUN_INFO *v6; // ebx@4
  unsigned int v7; // edx@4
  int v8; // edi@4
  SHINE_INDUN_INFO *i; // eax@5
  SHINE_INDUN_INFO *v10; // ecx@8
  SHINE_INDUN_INFO *v11; // edi@8
  int v12; // [sp+0h] [bp-24h]@1
  SHINE_INDUN_INFO *_Ptr; // [sp+10h] [bp-14h]@4
  int *v14; // [sp+14h] [bp-10h]@1
  int v15; // [sp+20h] [bp-4h]@4

  v14 = &v12;
  v2 = this;
  if ( _Count > 0x13B13B13 )
    std::_Xlength_error("vector<T> too long");
  if ( this->_Myend - this->_Myfirst < _Count )
  {
    v3 = std::allocator<SHINE_INDUN_INFO>::allocate(_Count);
    v4 = v2->_Mylast;
    v5 = v2->_Myfirst;
    _Ptr = v3;
    v15 = 0;
    std::_Uninit_move<SHINE_INDUN_INFO *,SHINE_INDUN_INFO *,std::allocator<SHINE_INDUN_INFO>,SHINE_INDUN_INFO>(
      v5,
      v4,
      v3);
    v6 = v2->_Myfirst;
    v7 = (signed int)((unsigned __int64)(1321528399i64 * (unsigned int)((char *)v2->_Mylast - (char *)v2->_Myfirst)) >> 32) >> 2;
    v8 = v7 + (v7 >> 31);
    if ( v2->_Myfirst )
    {
      for ( i = v2->_Mylast; v6 != i; ++v6 )
        ;
      operator delete(v2->_Myfirst);
    }
    v10 = _Ptr;
    v11 = &_Ptr[v8];
    v2->_Myend = &_Ptr[_Count];
    v2->_Mylast = v11;
    v2->_Myfirst = v10;
  }
}

//----- (0043AD30) --------------------------------------------------------
void __thiscall std::vector<SHINE_INDUN_INFO,std::allocator<SHINE_INDUN_INFO>>::_Reserve(std::vector<SHINE_INDUN_INFO,std::allocator<SHINE_INDUN_INFO> > *this, unsigned int _Count)
{
  unsigned int v2; // esi@1
  unsigned int v3; // esi@3
  unsigned int v4; // eax@3
  unsigned int v5; // eax@5

  v2 = this->_Mylast - this->_Myfirst;
  if ( 330382099 - _Count < v2 )
    std::_Xlength_error("vector<T> too long");
  v3 = _Count + v2;
  v4 = this->_Myend - this->_Myfirst;
  if ( v3 > v4 )
  {
    if ( 330382099 - (v4 >> 1) >= v4 )
      v5 = (v4 >> 1) + v4;
    else
      v5 = 0;
    if ( v5 < v3 )
      v5 = v3;
    std::vector<SHINE_INDUN_INFO,std::allocator<SHINE_INDUN_INFO>>::reserve(this, v5);
  }
}

//----- (0043ADB0) --------------------------------------------------------
IDRankingWin *__thiscall IDRankingWin::`vector deleting destructor'(IDRankingWin *this, unsigned int a2)
{
  IDRankingWin *v2; // esi@1

  v2 = this;
  IDRankingWin::~IDRankingWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0043ADE0) --------------------------------------------------------
void __cdecl ScriptMsgCtrl::OnChat(const char *pcStr, unsigned __int16 kHandle, float fLifeTime)
{
  if ( kHandle != -1 )
    ScreenBDMgr::AddSpeechBD(&g_kScrnBDMgr, kHandle, (char *)pcStr, fLifeTime);
}

//----- (0043AE10) --------------------------------------------------------
void __usercall ScriptMsgCtrl::OnAnnounce(int a1@<edi>, int a2@<esi>, const char *pcStr, D3DXCOLOR kColor, float fLifeTime)
{
  PgFrameWork *v5; // eax@1
  AnnounceWin *v6; // ecx@2

  v5 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v5 )
  {
    v6 = (AnnounceWin *)v5[28].m_kMsgQ.m_uiHead;
    if ( v6 )
      AnnounceWin::AddText(v6, a1, a2, (char *)pcStr, &kColor, 0, fLifeTime);
  }
}

//----- (0043AE50) --------------------------------------------------------
void __usercall ScriptMsgCtrl::OnRemain(int a1@<edi>, int a2@<esi>, const char *pcStr, D3DXCOLOR kColor, float fLifeTime)
{
  PgFrameWork *v5; // eax@1
  AnnounceWin *v6; // ecx@2

  v5 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v5 )
  {
    v6 = (AnnounceWin *)v5[28].m_kMsgQ.m_uiTail;
    if ( v6 )
      AnnounceWin::AddText(v6, a1, a2, (char *)pcStr, &kColor, 1, fLifeTime);
  }
}

//----- (0043AE90) --------------------------------------------------------
void __cdecl ScriptMsgCtrl::OnAutorun(const char *pcStr, D3DXCOLOR kColor, float fLifeTime)
{
  PgFrameWork *v3; // eax@1
  GTInformWin *v4; // ecx@2
  D3DXCOLOR v5; // ST04_16@3

  v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v3 )
  {
    v4 = (GTInformWin *)v3[33].m_kMsgQ.m_uiHead;
    if ( v4 )
    {
      *(_QWORD *)&v5.r = *(_QWORD *)&kColor.r;
      *(_QWORD *)&v5.b = *(_QWORD *)&kColor.b;
      GTInformWin::AddText(v4, (char *)pcStr, v5, 0, fLifeTime);
    }
  }
}

//----- (0043AEF0) --------------------------------------------------------
void __cdecl ScriptMsgCtrl::OnNPCDlg(const char *pcStr, const char *pcFaceCutIndex, bool bCloseBtn, float fLifeTime)
{
  PgFrameWork *v4; // eax@1
  PgFrameWork *v5; // esi@1

  v4 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  v5 = v4;
  if ( v4 && *(_DWORD *)&v4[26].m_bInit )
  {
    if ( (unsigned __int8)(*(int (**)(void))(v4[28].m_kMsgQ.m_pBase->m_uiDumy[0] + 260))()
      || (unsigned __int8)(*(int (**)(void))(*(_DWORD *)v5[25].m_kMsgQ.m_uiTail + 260))()
      || (unsigned __int8)(*(int (**)(void))(*(_DWORD *)v5[26].m_kMsgQ.m_uiAlloced + 260))()
      || (unsigned __int8)(*(int (**)(void))(**(_DWORD **)&v5[25].m_bInit + 260))()
      || (unsigned __int8)(*((int (**)(void))v5[26].vfptr->SetMsgHooker + 65))() )
    {
      OutputDebugStringA("\ni don't open the dialog since shop is open\n");
    }
    else
    {
      NpcDialogWin::CloseDialog(*(NpcDialogWin **)&v5[26].m_bInit);
      NpcDialogWin::OpenNpcScriptDialog(
        *(NpcDialogWin **)&v5[26].m_bInit,
        (char *)pcFaceCutIndex,
        (char *)pcStr,
        bCloseBtn);
      NpcDialogWin::SetCloseTime(*(NpcDialogWin **)&v5[26].m_bInit, fLifeTime);
      PgWinMgr::ShowWin(&Pgg_kWinMgr, *(PgWin **)&v5[26].m_bInit);
    }
  }
}

//----- (0043AFE0) --------------------------------------------------------
void __cdecl ScriptMsgCtrl::OnBoxAnnounce(const char *pcStr, float fLifeTime)
{
  Tutorial *v2; // eax@1
  Tutorial *v3; // eax@2
  BoxAnnounceWin *v4; // eax@6
  Tutorial *v5; // eax@7
  Tutorial *v6; // eax@8
  Tutorial *v7; // eax@12
  Tutorial *v8; // eax@13

  v2 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v3 = (Tutorial *)operator new(0xB4u);
    if ( v3 )
      Tutorial::Tutorial(v3);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  v4 = v2->m_pkBoxAnnounceWin;
  if ( v4 )
  {
    BoxAnnounceWin::SetMsg(v4, pcStr);
    v5 = Singleton<Tutorial>::m_pInstance;
    if ( !Singleton<Tutorial>::m_pInstance )
    {
      v6 = (Tutorial *)operator new(0xB4u);
      if ( v6 )
        Tutorial::Tutorial(v6);
      else
        v5 = 0;
      Singleton<Tutorial>::m_pInstance = v5;
    }
    BoxAnnounceWin::SetLifeTime(v5->m_pkBoxAnnounceWin, fLifeTime);
    v7 = Singleton<Tutorial>::m_pInstance;
    if ( !Singleton<Tutorial>::m_pInstance )
    {
      v8 = (Tutorial *)operator new(0xB4u);
      if ( v8 )
        Tutorial::Tutorial(v8);
      else
        v7 = 0;
      Singleton<Tutorial>::m_pInstance = v7;
    }
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v7->m_pkBoxAnnounceWin->vfptr);
  }
}

//----- (0043B110) --------------------------------------------------------
void __cdecl ScriptMsgCtrl::AddMsg(ScriptMsg *pkScriptMsg, const char *pcStr, unsigned __int16 kHandle)
{
  char *v3; // eax@4
  char v4; // cl@5
  unsigned int v5; // ecx@7
  const char *v6; // eax@10
  const char *v7; // ecx@13
  D3DXCOLOR v8; // ST04_16@15
  const char *v9; // ecx@16
  D3DXCOLOR v10; // ST04_16@18
  const char *v11; // ecx@19
  D3DXCOLOR v12; // ST04_16@21
  FaceCutMsg *v13; // eax@22
  const char *v14; // ecx@23
  const char *v15; // eax@26
  D3DXCOLOR kColor; // [sp+10h] [bp-40h]@9
  float fLifeTime; // [sp+20h] [bp-30h]@7
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kStr; // [sp+24h] [bp-2Ch]@2
  int v19; // [sp+4Ch] [bp-4h]@2

  if ( pkScriptMsg )
  {
    kStr._Myres = 15;
    kStr._Mysize = 0;
    kStr._Bx._Buf[0] = 0;
    v19 = 0;
    if ( !pcStr
      || (std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&kStr, pcStr, strlen(pcStr)),
          !kStr._Mysize) )
    {
      v3 = pkScriptMsg->SM_Msg;
      do
        v4 = *v3++;
      while ( v4 );
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &kStr,
        pkScriptMsg->SM_Msg,
        v3 - &pkScriptMsg->SM_Msg[1]);
    }
    v5 = pkScriptMsg->SM_LifeTime;
    fLifeTime = 1000000.0;
    if ( v5 )
      fLifeTime = (double)(v5 / 0x3E8);
    Color::GetDxColor(&kColor, pkScriptMsg->R, pkScriptMsg->G, pkScriptMsg->B, -1);
    switch ( pkScriptMsg->SM_Pos )
    {
      case 0:
        v6 = kStr._Bx._Ptr;
        if ( kStr._Myres < 0x10 )
          v6 = (const char *)&kStr;
        ScriptMsgCtrl::OnChat(v6, kHandle, fLifeTime);
        break;
      case 1:
        v7 = kStr._Bx._Ptr;
        if ( kStr._Myres < 0x10 )
          v7 = (const char *)&kStr;
        *(_QWORD *)&v8.r = *(_QWORD *)&kColor.r;
        *(_QWORD *)&v8.b = *(_QWORD *)&kColor.b;
        ScriptMsgCtrl::OnAnnounce(16, (int)pkScriptMsg, v7, v8, fLifeTime);
        break;
      case 2:
        v9 = kStr._Bx._Ptr;
        if ( kStr._Myres < 0x10 )
          v9 = (const char *)&kStr;
        *(_QWORD *)&v10.r = *(_QWORD *)&kColor.r;
        *(_QWORD *)&v10.b = *(_QWORD *)&kColor.b;
        ScriptMsgCtrl::OnRemain(16, (int)pkScriptMsg, v9, v10, fLifeTime);
        break;
      case 3:
        v11 = kStr._Bx._Ptr;
        if ( kStr._Myres < 0x10 )
          v11 = (const char *)&kStr;
        *(_QWORD *)&v12.r = *(_QWORD *)&kColor.r;
        *(_QWORD *)&v12.b = *(_QWORD *)&kColor.b;
        ScriptMsgCtrl::OnAutorun(v11, v12, fLifeTime);
        break;
      case 4:
        v13 = FaceCutMsgTab::GetByScripMsgInx(pkScriptMsg->SM_Inx);
        if ( v13 )
        {
          v14 = kStr._Bx._Ptr;
          if ( kStr._Myres < 0x10 )
            v14 = (const char *)&kStr;
          ScriptMsgCtrl::OnNPCDlg(v14, v13->FaceCutFile, v13->IsCloseBtn != 0, fLifeTime);
        }
        break;
      case 5:
        v15 = kStr._Bx._Ptr;
        if ( kStr._Myres < 0x10 )
          v15 = (const char *)&kStr;
        ScriptMsgCtrl::OnBoxAnnounce(v15, fLifeTime);
        break;
      default:
        break;
    }
    if ( kStr._Myres >= 0x10 )
      operator delete(kStr._Bx._Ptr);
  }
}

//----- (0043B390) --------------------------------------------------------
FaceCutMsg *__cdecl FaceCutMsgTab::GetByScripMsgInx(const char *pcScriptMsgInx)
{
  const char *v1; // ebx@1
  unsigned int v2; // edi@1
  int v3; // eax@2
  char *v4; // eax@6
  unsigned int v5; // eax@7
  unsigned int v6; // ebx@7
  unsigned int v7; // esi@7
  unsigned int v8; // ecx@7
  unsigned int v9; // edi@9
  const char *v10; // eax@9
  int v11; // eax@11
  bool v12; // zf@11
  signed int v13; // eax@13
  bool v14; // bl@16
  FaceCutMsg *pkFaceCutMsg; // [sp+10h] [bp-3Ch]@6
  unsigned int i; // [sp+18h] [bp-34h]@5
  unsigned int v18; // [sp+1Ch] [bp-30h]@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v19; // [sp+20h] [bp-2Ch]@7
  int v20; // [sp+48h] [bp-4h]@16

  v1 = pcScriptMsgInx;
  v2 = 0;
  if ( !pcScriptMsgInx )
    return 0;
  v3 = *(_DWORD *)(ITableBase<FaceCutMsg,FaceCutMsgTab>::ms_pkTable + 56);
  v18 = v3 ? *(_DWORD *)(v3 + 40) : 0;
  i = 0;
  if ( v18 <= 0 )
    return 0;
  while ( 1 )
  {
    v4 = CDataReader::GetRecord((CDataReader *)(ITableBase<FaceCutMsg,FaceCutMsgTab>::ms_pkTable + 4), v2);
    pkFaceCutMsg = (FaceCutMsg *)v4;
    if ( v4 )
      break;
LABEL_20:
    i = ++v2;
    if ( v2 >= v18 )
      return 0;
  }
  v19._Myres = 15;
  v19._Mysize = 0;
  v19._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v19, v4, strlen(v4));
  v5 = strlen(v1);
  v6 = v19._Mysize;
  v7 = v5;
  v8 = v19._Mysize;
  if ( v19._Mysize >= v5 )
    v8 = v5;
  v9 = v19._Myres;
  v10 = v19._Bx._Ptr;
  if ( v19._Myres < 0x10 )
    v10 = (const char *)&v19;
  v11 = std::char_traits<char>::compare(v10, pcScriptMsgInx, v8);
  v12 = v11 == 0;
  if ( !v11 )
  {
    if ( v6 >= v7 )
      v13 = v6 != v7;
    else
      v13 = -1;
    v12 = v13 == 0;
  }
  v14 = v12;
  v20 = -1;
  if ( v9 >= 0x10 )
    operator delete(v19._Bx._Ptr);
  v19._Myres = 15;
  v19._Mysize = 0;
  v19._Bx._Buf[0] = 0;
  if ( !v14 )
  {
    v2 = i;
    v1 = pcScriptMsgInx;
    goto LABEL_20;
  }
  return pkFaceCutMsg;
}
// A89D40: using guessed type int ITableBase<FaceCutMsg,FaceCutMsgTab>::ms_pkTable;

//----- (0043B540) --------------------------------------------------------
void __thiscall SteamCallback::~SteamCallback(SteamCallback *this)
{
  SteamCallback *v1; // esi@1
  bool v2; // zf@1

  v1 = this;
  v2 = (this->m_CallbackGameOverlayActivated.m_nCallbackFlags & 1) == 0;
  this->m_CallbackGameOverlayActivated.vfptr = (CCallbackBaseVtbl *)&CCallback<SteamCallback,GameOverlayActivated_t,0>::`vftable';
  if ( !v2 )
    _SteamAPI_UnregisterCallback(&this->m_CallbackGameOverlayActivated);
  v2 = (v1->m_GetAuthSessionTicketResponse.m_nCallbackFlags & 1) == 0;
  v1->m_GetAuthSessionTicketResponse.vfptr = (CCallbackBaseVtbl *)&CCallback<SteamCallback,GetAuthSessionTicketResponse_t,0>::`vftable';
  if ( !v2 )
    _SteamAPI_UnregisterCallback(v1);
}
// 96D690: using guessed type int __cdecl _SteamAPI_UnregisterCallback(_DWORD);
// 977AC4: using guessed type int (__stdcall *CCallback<SteamCallback,GetAuthSessionTicketResponse_t,0>::`vftable')(void *pvParam, bool __formal, int, int);
// 977AD4: using guessed type int (__stdcall *CCallback<SteamCallback,GameOverlayActivated_t,0>::`vftable')(void *pvParam, bool __formal, int, int);

//----- (0043B580) --------------------------------------------------------
void __thiscall SteamCallback::SteamCallback(SteamCallback *this)
{
  SteamCallback *v1; // esi@1
  int v2; // eax@3

  v1 = this;
  this->m_GetAuthSessionTicketResponse.m_nCallbackFlags = 0;
  this->m_GetAuthSessionTicketResponse.m_iCallback = 0;
  this->m_GetAuthSessionTicketResponse.vfptr = (CCallbackBaseVtbl *)&CCallback<SteamCallback,GetAuthSessionTicketResponse_t,0>::`vftable';
  v1->m_GetAuthSessionTicketResponse.m_pObj = v1;
  this->m_GetAuthSessionTicketResponse.m_Func = SteamCallback::OnGetAuthSessionTicketResponse;
  if ( SteamCallback::OnGetAuthSessionTicketResponse )
  {
    this->m_GetAuthSessionTicketResponse.m_pObj = this;
    this->m_GetAuthSessionTicketResponse.m_Func = SteamCallback::OnGetAuthSessionTicketResponse;
    _SteamAPI_RegisterCallback(this, 163);
  }
  v2 = (int)&v1->m_CallbackGameOverlayActivated;
  *(_BYTE *)(v2 + 4) = 0;
  *(_DWORD *)(v2 + 8) = 0;
  *(_DWORD *)v2 = &CCallback<SteamCallback,GameOverlayActivated_t,0>::`vftable';
  *(_DWORD *)(v2 + 12) = v1;
  *(_DWORD *)(v2 + 16) = SteamCallback::OnGameOverlayActivated;
  if ( SteamCallback::OnGameOverlayActivated )
  {
    v1->m_CallbackGameOverlayActivated.m_pObj = v1;
    v1->m_CallbackGameOverlayActivated.m_Func = SteamCallback::OnGameOverlayActivated;
    _SteamAPI_RegisterCallback(v2, 331);
  }
}
// 96D68C: using guessed type int __cdecl _SteamAPI_RegisterCallback(_DWORD, _DWORD);
// 977AC4: using guessed type int (__stdcall *CCallback<SteamCallback,GetAuthSessionTicketResponse_t,0>::`vftable')(void *pvParam, bool __formal, int, int);
// 977AD4: using guessed type int (__stdcall *CCallback<SteamCallback,GameOverlayActivated_t,0>::`vftable')(void *pvParam, bool __formal, int, int);

//----- (0043B600) --------------------------------------------------------
void __thiscall CCallback<SteamCallback,GameOverlayActivated_t,0>::Run(CCallback<SteamCallback,GameOverlayActivated_t,0> *this, void *pvParam, bool __formal, unsigned __int64 a4)
{
  this->m_Func(this->m_pObj, (GameOverlayActivated_t *)pvParam);
}

//----- (0043B620) --------------------------------------------------------
int CCallback<SteamCallback,GetAuthSessionTicketResponse_t,0>::GetCallbackSizeBytes()
{
  return 8;
}

//----- (0043B630) --------------------------------------------------------
void __thiscall CCallback<SteamCallback,GetAuthSessionTicketResponse_t,0>::Run(CCallback<SteamCallback,GameOverlayActivated_t,0> *this, void *pvParam)
{
  this->m_Func(this->m_pObj, (GameOverlayActivated_t *)pvParam);
}

//----- (0043B640) --------------------------------------------------------
void __cdecl SteamConfig::Running()
{
  SteamConfig::m_bRunning = 1;
}
// A89D49: using guessed type bool SteamConfig::m_bRunning;

//----- (0043B650) --------------------------------------------------------
bool __cdecl SteamConfig::IsRunning()
{
  return SteamConfig::m_bRunning;
}
// A89D49: using guessed type bool SteamConfig::m_bRunning;

//----- (0043B660) --------------------------------------------------------
const char *__cdecl SteamConfig::GetURL(unsigned __int64 uiSteamAccountID)
{
  ItemMallInfo *v1; // eax@1
  ItemMallInfo *v2; // eax@2
  ItemMallInfo *v3; // esi@2
  const char *v4; // eax@6
  const char *v5; // eax@7
  tagItemMallFileData *v6; // eax@8
  const char *v7; // eax@12
  char *v8; // eax@12
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v9; // eax@14
  void *v10; // ecx@16
  void *v11; // eax@18
  const char *v12; // edi@20
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+1Ch] [bp-E4h]@14
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > stID; // [sp+38h] [bp-C8h]@12
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > stHash; // [sp+54h] [bp-ACh]@12
  char acURL[128]; // [sp+70h] [bp-90h]@9
  int v17; // [sp+FCh] [bp-4h]@1

  v1 = (ItemMallInfo *)operator new(0x2224u);
  v17 = 0;
  if ( v1 )
  {
    ItemMallInfo::ItemMallInfo(v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  v17 = -1;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = fs("%sSteamStartURL.hb", &Folder::m_acSystem);
  ItemMallInfo::LoadFromFile(v3, v4);
  if ( ItemMallInfo::GetTotalURLNum(v3, 0) == -1 )
  {
    v5 = 0;
  }
  else
  {
    v6 = ItemMallInfo::GetData(v3, 0, 0);
    if ( v6 )
      strncpy(acURL, v6->Path, 0x80u);
    if ( v3 )
    {
      ItemMallInfo::~ItemMallInfo(v3);
      operator delete(v3);
    }
    stID._Myres = 15;
    stID._Mysize = 0;
    stID._Bx._Buf[0] = 0;
    v17 = 1;
    v7 = fs("%I64d", uiSteamAccountID);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&stID, v7, strlen(v7));
    stHash._Myres = 15;
    stHash._Mysize = 0;
    stHash._Bx._Buf[0] = 0;
    LOBYTE(v17) = 2;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&stHash, "qfgt3L9Li88lJMxo", 0x10u);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&stHash, &stID, 0, 0xFFFFFFFF);
    v8 = stHash._Bx._Ptr;
    if ( stHash._Myres < 0x10 )
      v8 = (char *)&stHash;
    v9 = CMD5Checksum::GetMD5(&result, v8, stHash._Mysize);
    LOBYTE(v17) = 3;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&stHash, v9);
    LOBYTE(v17) = 2;
    if ( result._Myres >= 0x10 )
      operator delete(result._Bx._Ptr);
    v10 = stHash._Bx._Ptr;
    if ( stHash._Myres < 0x10 )
      v10 = &stHash;
    v11 = stID._Bx._Ptr;
    if ( stID._Myres < 0x10 )
      v11 = &stID;
    v12 = fs(acURL, v11, v10);
    if ( stHash._Myres >= 0x10 )
      operator delete(stHash._Bx._Ptr);
    stHash._Myres = 15;
    stHash._Mysize = 0;
    stHash._Bx._Buf[0] = 0;
    if ( stID._Myres >= 0x10 )
      operator delete(stID._Bx._Ptr);
    v5 = v12;
  }
  return v5;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0043B8D0) --------------------------------------------------------
bool __thiscall NiRenderer::Check_RenderTargetGroupActive(NiRenderer *this, const char *pcCallingFunction, bool bExpectedValue)
{
  bool result; // al@3

  if ( this->m_eFrameState == 1 || this->m_eOffScreenFrameState == 1 )
    result = this->m_bRenderTargetGroupActive == bExpectedValue;
  else
    result = 0;
  return result;
}

//----- (0043B910) --------------------------------------------------------
void __thiscall Studio::Studio(Studio *this)
{
  Studio *v1; // ebx@1
  NiVisibleArray *v2; // esi@1
  NiNode *v3; // esi@1
  NiCamera *v4; // eax@6
  int v5; // eax@7
  NiAVObject *v6; // esi@9
  NiCamera *v7; // eax@17
  NiCamera *v8; // ecx@17
  NiCamera *v9; // eax@17
  NiFrustum frust; // [sp+20h] [bp-48h]@17
  NiPoint3 kWorldPt; // [sp+3Ch] [bp-2Ch]@17
  NiPoint3 kWorldUp; // [sp+48h] [bp-20h]@17
  Studio *v13; // [sp+54h] [bp-14h]@1
  NiCamera *v14; // [sp+58h] [bp-10h]@6
  int v15; // [sp+64h] [bp-4h]@1

  v1 = this;
  v13 = this;
  this->m_spCamera.m_pObject = 0;
  v15 = 0;
  this->m_spRenderer.m_pObject = 0;
  this->m_spRenderedTexture.m_pObject = 0;
  this->m_spRenderTargetGroup.m_pObject = 0;
  this->m_spSubject.m_pObject = 0;
  this->m_bgColor.r = 0.0;
  v2 = &this->m_kVisible;
  this->m_bgColor.g = 0.0;
  this->m_bgColor.b = 0.0;
  this->m_bgColor.a = 0.0;
  v2->m_ppkArray = 0;
  v2->m_uiCurrentSize = 0;
  v2->m_uiAllocatedSize = 0;
  v2->m_uiGrowBy = 128;
  NiVisibleArray::SetAllocatedSize(&this->m_kVisible, 0x80u);
  LOBYTE(v15) = 5;
  NiCullingProcess::NiCullingProcess(&v1->m_kCuller, v2);
  v3 = v1->m_spSubject.m_pObject;
  LOBYTE(v15) = 6;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spSubject.m_pObject = 0;
  }
  v4 = (NiCamera *)operator new(0x128u);
  v14 = v4;
  LOBYTE(v15) = 7;
  if ( v4 )
  {
    NiCamera::NiCamera(v4);
    v14 = (NiCamera *)v5;
  }
  else
  {
    v14 = 0;
    v5 = 0;
  }
  v6 = (NiAVObject *)&v1->m_spCamera.m_pObject->vfptr;
  LOBYTE(v15) = 6;
  if ( v6 != (NiAVObject *)v5 )
  {
    if ( v6 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      v5 = (int)v14;
    }
    v1->m_spCamera.m_pObject = (NiCamera *)v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)(v5 + 4));
  }
  v7 = v1->m_spCamera.m_pObject;
  kWorldUp.x = 0.0;
  kWorldUp.y = 0.0;
  v7->m_kLocal.m_Translate.x = 0.0;
  kWorldUp.z = -100.0;
  v7->m_kLocal.m_Translate.y = 0.0;
  v7->m_kLocal.m_Translate.z = -100.0;
  NiAVObject::Update((NiAVObject *)&v1->m_spCamera.m_pObject->vfptr, 0.0, 1);
  v8 = v1->m_spCamera.m_pObject;
  kWorldUp.x = 0.0;
  kWorldUp.y = -1.0;
  kWorldUp.z = 0.0;
  kWorldPt.x = 0.0;
  kWorldPt.y = 0.0;
  kWorldPt.z = 100.0;
  NiCamera::LookAtWorldPoint(v8, &kWorldPt, &kWorldUp);
  v9 = v1->m_spCamera.m_pObject;
  qmemcpy(&frust, &v1->m_spCamera.m_pObject->m_kViewFrustum, sizeof(frust));
  frust.m_fFar = 10000.0;
  frust.m_fNear = 0.0099999998;
  frust.m_fLeft = -15.5;
  frust.m_fTop = 15.5;
  frust.m_fRight = 16.5;
  frust.m_fBottom = -16.5;
  frust.m_bOrtho = 1;
  NiCamera::SetViewFrustum(v9, &frust);
  NiAVObject::Update((NiAVObject *)&v1->m_spCamera.m_pObject->vfptr, 0.0, 1);
  v1->m_bgColor.r = 1.0;
  v1->m_bgColor.g = 0.0;
  v1->m_bgColor.b = 0.0;
  v1->m_bgColor.a = 1.0;
}

//----- (0043BB10) --------------------------------------------------------
void __thiscall Studio::~Studio(Studio *this)
{
  Studio *v1; // esi@1
  NiNode *v2; // edi@1
  NiCamera *v3; // edi@6
  NiRenderer *v4; // edi@11
  NiNode *v5; // edi@16
  NiRenderTargetGroup *v6; // edi@20
  NiRenderedTexture *v7; // edi@24
  NiRenderer *v8; // edi@28
  NiCamera *v9; // esi@32

  v1 = this;
  v2 = this->m_spSubject.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spSubject.m_pObject = 0;
  }
  v3 = v1->m_spCamera.m_pObject;
  if ( v1->m_spCamera.m_pObject )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spCamera.m_pObject = 0;
  }
  v4 = v1->m_spRenderer.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spRenderer.m_pObject = 0;
  }
  NiCullingProcess::~NiCullingProcess(&v1->m_kCuller);
  operator delete(v1->m_kVisible.m_ppkArray);
  v5 = v1->m_spSubject.m_pObject;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  v6 = v1->m_spRenderTargetGroup.m_pObject;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  v7 = v1->m_spRenderedTexture.m_pObject;
  if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  v8 = v1->m_spRenderer.m_pObject;
  if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
    v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
  v9 = v1->m_spCamera.m_pObject;
  if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
  {
    if ( v9 )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
  }
}

//----- (0043BCB0) --------------------------------------------------------
void __thiscall Studio::ClickAndStuff(Studio *this, float fTime)
{
  Studio *v2; // esi@1
  NiCamera *v3; // eax@4
  NsPgToonExtraData *v4; // edi@5
  NiCamera *v5; // ecx@5
  NiD3DDefaultShader *v6; // ST0C_4@5
  NiAccumulator *v7; // ebx@5
  NiCamera *pkOldCTCamera; // [sp+10h] [bp-18h]@5
  NiRenderer *v9; // [sp+14h] [bp-14h]@5
  NiPointer<NiAccumulator> spOldSorter; // [sp+18h] [bp-10h]@5
  int v11; // [sp+24h] [bp-4h]@5

  v2 = this;
  if ( this->m_spRenderer.m_pObject )
  {
    if ( this->m_spSubject.m_pObject )
    {
      if ( this->m_spRenderedTexture.m_pObject )
      {
        v3 = this->m_spCamera.m_pObject;
        if ( this->m_spCamera.m_pObject )
        {
          v4 = Engine3D::ms_spToonExtraData;
          v5 = Engine3D::ms_spToonExtraData->m_pCamera;
          Engine3D::ms_spToonExtraData->m_pCamera = v3;
          pkOldCTCamera = v5;
          ((void (__stdcall *)(NiColorA *))v2->m_spRenderer.m_pObject->vfptr[19].__vecDelDtor)(&v2->m_bgColor);
          NiRenderer::BeginFrame(v2->m_spRenderer.m_pObject);
          NiRenderer::BeginUsingRenderTargetGroup(v2->m_spRenderer.m_pObject, v2->m_spRenderTargetGroup.m_pObject, 7u);
          spOldSorter.m_pObject = 0;
          v6 = (NiD3DDefaultShader *)v2->m_spRenderer.m_pObject->m_spAccum.m_pObject;
          v11 = 0;
          NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&spOldSorter, v6);
          v7 = v2->m_spRenderer.m_pObject->m_spAccum.m_pObject;
          v9 = v2->m_spRenderer.m_pObject;
          if ( v7 )
          {
            if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
            {
              if ( v7 )
                v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
            }
            v9->m_spAccum.m_pObject = 0;
          }
          NiDrawScene(v2->m_spCamera.m_pObject, (NiAVObject *)&v2->m_spSubject.m_pObject->vfptr, &v2->m_kCuller, 0);
          NiRenderer::SetSorter(v2->m_spRenderer.m_pObject, spOldSorter.m_pObject);
          NiRenderer::EndUsingRenderTargetGroup(v2->m_spRenderer.m_pObject);
          NiRenderer::EndFrame(v2->m_spRenderer.m_pObject);
          NiRenderer::DisplayFrame(v2->m_spRenderer.m_pObject);
          v4->m_pCamera = pkOldCTCamera;
          v11 = -1;
          NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spOldSorter);
        }
      }
    }
  }
}

//----- (0043BDE0) --------------------------------------------------------
void __thiscall Studio::SetCamera(Studio *this, NiCamera *pkCamera)
{
  Studio *v2; // edi@1
  NiCamera *v3; // esi@1
  NiCamera *v4; // esi@6

  v2 = this;
  v3 = this->m_spCamera.m_pObject;
  if ( this->m_spCamera.m_pObject )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spCamera.m_pObject = 0;
  }
  v4 = v2->m_spCamera.m_pObject;
  if ( v2->m_spCamera.m_pObject != pkCamera )
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v2->m_spCamera.m_pObject = pkCamera;
    if ( pkCamera )
      InterlockedIncrement((volatile LONG *)&pkCamera->m_uiRefCount);
  }
}

//----- (0043BE50) --------------------------------------------------------
Studio *__cdecl Studio::Create(NiRenderer *pRenderer, unsigned int uiDetail)
{
  Studio *v2; // eax@1
  Studio *v3; // esi@1
  Studio *v4; // eax@2
  NiRenderer *v5; // ebx@3
  Studio *result; // eax@11
  void *(__thiscall *v7)(NiRefObject *, unsigned int); // eax@12
  int v8; // eax@12
  NiRenderedTexture *v9; // eax@12
  NiRenderedTexture *v10; // edi@12
  NiRenderedTexture *v11; // ebx@12
  NiRenderedTexture *v12; // ecx@19
  NiRenderer *v13; // ST04_4@20
  Ni2DBuffer *v14; // eax@20
  NiRenderTargetGroup *v15; // eax@20
  NiRenderTargetGroup *v16; // edi@20
  NiRenderTargetGroup *v17; // ebx@20
  NiTexture::FormatPrefs kPrefs; // [sp+10h] [bp-1Ch]@12
  Studio *v19; // [sp+1Ch] [bp-10h]@1
  int v20; // [sp+28h] [bp-4h]@1

  v2 = (Studio *)operator new(0xC4u);
  v19 = v2;
  v3 = 0;
  v20 = 0;
  if ( v2 )
  {
    Studio::Studio(v2);
    v3 = v4;
  }
  v5 = v3->m_spRenderer.m_pObject;
  v20 = -1;
  if ( v5 != pRenderer )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v3->m_spRenderer.m_pObject = pRenderer;
    if ( pRenderer )
      InterlockedIncrement((volatile LONG *)&pRenderer->m_uiRefCount);
  }
  if ( !v3->m_spRenderer.m_pObject )
    goto LABEL_30;
  v7 = pRenderer->vfptr[26].__vecDelDtor;
  kPrefs.m_ePixelLayout = 6;
  kPrefs.m_eAlphaFmt = 3;
  kPrefs.m_eMipMapped = 2;
  v8 = ((int (__thiscall *)(NiRenderer *))v7)(pRenderer);
  (*(void (__thiscall **)(int, _DWORD))(*(_DWORD *)v8 + 76))(v8, 0);
  kPrefs.m_ePixelLayout = 2;
  v9 = NiRenderedTexture::Create(1 << uiDetail, 1 << uiDetail, v3->m_spRenderer.m_pObject, &kPrefs);
  v10 = v3->m_spRenderedTexture.m_pObject;
  v11 = v9;
  if ( v10 != v9 )
  {
    if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    v3->m_spRenderedTexture.m_pObject = v11;
    if ( v11 )
      InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
  }
  v12 = v3->m_spRenderedTexture.m_pObject;
  if ( v12 )
  {
    v13 = v3->m_spRenderer.m_pObject;
    v14 = (Ni2DBuffer *)((int (*)(void))v12->vfptr[17].__vecDelDtor)();
    v15 = NiRenderTargetGroup::Create(v14, v13, 1, 1);
    v16 = v3->m_spRenderTargetGroup.m_pObject;
    v17 = v15;
    if ( v16 != v15 )
    {
      if ( v16 && !InterlockedDecrement((volatile LONG *)&v16->m_uiRefCount) && v16 )
        v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
      v3->m_spRenderTargetGroup.m_pObject = v17;
      if ( v17 )
        InterlockedIncrement((volatile LONG *)&v17->m_uiRefCount);
    }
    result = v3;
  }
  else
  {
LABEL_30:
    Studio::~Studio(v3);
    operator delete(v3);
    result = 0;
  }
  return result;
}

//----- (0043C000) --------------------------------------------------------
void __thiscall NiPointer<NiProperty>::NiPointer<NiProperty>(NiPointer<NiProperty> *this, NiProperty *pObject)
{
  this->m_pObject = pObject;
  if ( pObject )
    InterlockedIncrement((volatile LONG *)&pObject->m_uiRefCount);
}

//----- (0043C020) --------------------------------------------------------
char __thiscall NiRenderer::BeginFrame(NiRenderer *this)
{
  NiRenderer *v1; // esi@1
  char result; // al@2

  v1 = this;
  if ( this->m_eFrameState
    || this->m_eOffScreenFrameState
    || !(unsigned __int8)((int (*)(void))this->vfptr[66].__vecDelDtor)() )
  {
    result = 0;
  }
  else
  {
    result = 1;
    v1->m_eFrameState = 1;
  }
  return result;
}

//----- (0043C050) --------------------------------------------------------
char __thiscall NiRenderer::EndFrame(NiRenderer *this)
{
  NiRenderer *v1; // esi@1
  char result; // al@2

  v1 = this;
  if ( this->m_eFrameState != 1
    || this->m_eOffScreenFrameState
    || !(unsigned __int8)((int (*)(void))this->vfptr[67].__vecDelDtor)() )
  {
    result = 0;
  }
  else
  {
    v1->m_eFrameState = 2;
    result = 1;
  }
  return result;
}

//----- (0043C080) --------------------------------------------------------
char __thiscall NiRenderer::DisplayFrame(NiRenderer *this)
{
  NiRenderer *v1; // esi@1
  char result; // al@2

  v1 = this;
  if ( this->m_eFrameState != 2
    || this->m_eOffScreenFrameState
    || !(unsigned __int8)((int (*)(void))this->vfptr[68].__vecDelDtor)() )
  {
    result = 0;
  }
  else
  {
    result = 1;
    ++v1->m_uiFrameID;
    v1->m_eFrameState = 0;
  }
  return result;
}

//----- (0043C0C0) --------------------------------------------------------
bool __thiscall NiRenderer::BeginUsingRenderTargetGroup(NiRenderer *this, NiRenderTargetGroup *pkTarget, unsigned int uiClearMode)
{
  NiRenderer *v3; // esi@1
  bool result; // al@4
  bool v5; // bl@9
  bool v6; // zf@13

  v3 = this;
  if ( this->m_eFrameState != 1 && this->m_eOffScreenFrameState != 1 || this->m_bRenderTargetGroupActive )
  {
    result = 0;
  }
  else if ( pkTarget )
  {
    EnterCriticalSection(&this->m_kRendererLock.m_kCriticalSection);
    v3->m_kRendererLock.m_ulThreadOwner = GetCurrentThreadId();
    if ( ++v3->m_kRendererLock.m_uiLockCount == 1 )
      ((void (__thiscall *)(NiRenderer *))v3->vfptr[64].__vecDelDtor)(v3);
    result = ((int (__thiscall *)(NiRenderer *, NiRenderTargetGroup *, unsigned int))v3->vfptr[72].__vecDelDtor)(
               v3,
               pkTarget,
               uiClearMode);
    v5 = result;
    if ( result )
    {
      v3->m_bRenderTargetGroupActive = 1;
    }
    else
    {
      if ( v3->m_kRendererLock.m_uiLockCount == 1 )
        ((void (__thiscall *)(NiRenderer *))v3->vfptr[65].__vecDelDtor)(v3);
      v6 = v3->m_kRendererLock.m_uiLockCount-- == 1;
      if ( v6 )
        v3->m_kRendererLock.m_ulThreadOwner = 0;
      LeaveCriticalSection(&v3->m_kRendererLock.m_kCriticalSection);
      result = v5;
    }
  }
  else
  {
    ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)this);
    result = 0;
  }
  return result;
}

//----- (0043C190) --------------------------------------------------------
char __thiscall NiRenderer::EndUsingRenderTargetGroup(NiRenderer *this)
{
  NiRenderer *v1; // esi@1
  char result; // al@4
  bool v3; // zf@8

  v1 = this;
  if ( (this->m_eFrameState == 1 || this->m_eOffScreenFrameState == 1)
    && this->m_bRenderTargetGroupActive == 1
    && (unsigned __int8)((int (*)(void))this->vfptr[73].__vecDelDtor)() )
  {
    if ( v1->m_kRendererLock.m_uiLockCount == 1 )
      ((void (__thiscall *)(_DWORD))v1->vfptr[65].__vecDelDtor)(v1);
    v3 = v1->m_kRendererLock.m_uiLockCount-- == 1;
    if ( v3 )
      v1->m_kRendererLock.m_ulThreadOwner = 0;
    LeaveCriticalSection(&v1->m_kRendererLock.m_kCriticalSection);
    v1->m_bRenderTargetGroupActive = 0;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0043C1F0) --------------------------------------------------------
void __thiscall NiRenderer::SetSorter(NiRenderer *this, NiAccumulator *pkAccum)
{
  NiRenderer *v2; // ebx@1
  NiAccumulator *v3; // esi@1

  v2 = this;
  v3 = this->m_spAccum.m_pObject;
  if ( v3 != pkAccum )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spAccum.m_pObject = pkAccum;
    if ( pkAccum )
      InterlockedIncrement((volatile LONG *)&pkAccum->m_uiRefCount);
  }
}

//----- (0043C240) --------------------------------------------------------
void __thiscall ItemSlotWin::ItemSlotWin(ItemSlotWin *this)
{
  ItemSlotWin *v1; // esi@1

  v1 = this;
  ItemIcon::ItemIcon((ItemIcon *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ItemSlotWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ItemSlotWin::`vftable'{for `IDirectMessenger'};
  v1->m_uiSenderType = -1;
  v1->m_uiSenderInvIndex = -1;
  v1->m_pkSender = 0;
  v1->m_uiInvIndex = -1;
  ItemIcon::SetItem((ItemIcon *)&v1->vfptr, 0, 1);
  v1->m_pkFrameWork = 0;
  v1->m_bLock = 0;
}
// 977D74: using guessed type void (__thiscall *ItemSlotWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 977D94: using guessed type int (__thiscall *ItemSlotWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0043C2D0) --------------------------------------------------------
void __thiscall ItemSlotWin::~ItemSlotWin(ItemSlotWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ItemSlotWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ItemSlotWin::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
}
// 977D74: using guessed type void (__thiscall *ItemSlotWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 977D94: using guessed type int (__thiscall *ItemSlotWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0043C2F0) --------------------------------------------------------
char __thiscall ItemSlotWin::Create(ItemSlotWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork)
{
  ItemSlotWin *v6; // esi@1
  char result; // al@1

  v6 = this;
  this->m_pkFrameWork = pkFrameWork;
  result = ItemIcon::Create((ItemIcon *)&this->vfptr, iXPos, iYPos, pkParent);
  if ( result )
  {
    v6->m_uiInvIndex = uiInvIndex;
    ItemIcon::ShowLotText((ItemIcon *)&v6->vfptr, 0);
    result = 1;
  }
  return result;
}

//----- (0043C350) --------------------------------------------------------
void TermExtendWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "TermExtendWin");
}

//----- (0043C380) --------------------------------------------------------
ItemSlotWin *__thiscall TermExtendWin::GetInsertedOldSlot(TermExtendWin *this)
{
  TermExtendWin *v1; // esi@1
  ItemSlotWin *result; // eax@2

  v1 = this;
  if ( ItemIcon::GetItem((ItemIcon *)&this->m_apkSlotWin->vfptr) )
    result = v1->m_apkSlotWin;
  else
    result = 0;
  return result;
}

//----- (0043C3A0) --------------------------------------------------------
long double __usercall difftime@<edx:eax>(int _Time1@<ecx>, int _Time2@<eax>)
{
  long double result; // rax@1

  _difftime32(_Time1, _Time2);
  return result;
}

//----- (0043C3B0) --------------------------------------------------------
int __usercall mktime@<eax>(tm *_Tm@<eax>)
{
  return _mktime32(_Tm);
}

//----- (0043C3D0) --------------------------------------------------------
void __thiscall ItemSlotWin::OnFirstHitWin(ItemSlotWin *this)
{
  ItemSlotWin *v1; // esi@1
  PgWin *v2; // eax@5
  unsigned int v3; // ecx@6
  ItemIcon *v4; // ecx@7
  Item *v5; // eax@9
  ItemInfoWin *v6; // ecx@10

  v1 = this;
  if ( !this->m_bLock )
  {
    if ( ItemIcon::GetItem((ItemIcon *)&this->vfptr) )
      v1->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
    else
      v1->m_pkToolTipWin = g_pkToolTipWin;
    PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
    v2 = v1->m_pkSender;
    if ( v2 )
    {
      v3 = v1->m_uiSenderInvIndex;
      if ( v3 < 0xC0 )
      {
        v4 = (ItemIcon *)LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][v3 + 2]);
        if ( v4 )
        {
          if ( ItemIcon::GetItem(v4) )
          {
            v5 = ItemIcon::GetItem((ItemIcon *)&v1->vfptr);
            if ( v5 )
            {
              v6 = (ItemInfoWin *)v1->m_pkToolTipWin;
              if ( v6 )
              {
                ItemInfoWin::SetItemInfo(v6, v5);
                PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
              }
            }
          }
        }
      }
    }
  }
}

//----- (0043C460) --------------------------------------------------------
char __thiscall ItemSlotWin::SetSenderInvSlotLock(ItemSlotWin *this, bool _bLock)
{
  PgWin *v2; // eax@1
  char result; // al@2
  unsigned int v4; // ecx@3
  InvWin *v5; // ecx@4

  v2 = this->m_pkSender;
  if ( v2
    && (v4 = this->m_uiSenderInvIndex, v4 < 0xC0)
    && (v5 = (InvWin *)LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][v4 + 2])) != 0 )
  {
    InvWin::SetLock(v5, _bLock);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0043C4A0) --------------------------------------------------------
void __thiscall TermExtendWin::UpdateMeWin(TermExtendWin *this, float fCurTime)
{
  TermExtendWin *v2; // esi@1
  SpEffect *v3; // ecx@1

  v2 = this;
  v3 = this->m_apkEffect;
  if ( v3->m_bLive )
    SpEffect::Update(v3, fCurTime);
  if ( v2->m_bIsExtendItem && v2->m_bIsTermItem )
    ((void (__stdcall *)(_DWORD))v2->m_pkOKBtn->vfptr[60].__vecDelDtor)(1);
  else
    ((void (__stdcall *)(_DWORD))v2->m_pkOKBtn->vfptr[60].__vecDelDtor)(0);
}

//----- (0043C4F0) --------------------------------------------------------
void __thiscall TermExtendWin::ExtendItemInvenLock(TermExtendWin *this, bool bLock)
{
  _DWORD *v2; // eax@1
  unsigned int v3; // ecx@2
  InvWin *v4; // ecx@3

  v2 = this->m_pkFrameWork[19].m_BackFrameID;
  if ( v2 )
  {
    v3 = this->m_uiExtendItemInvNum;
    if ( v3 < 0xC0 )
    {
      v4 = (InvWin *)v2[v3 + 87];
      if ( v4 )
        InvWin::SetLock(v4, bLock);
    }
  }
}

//----- (0043C530) --------------------------------------------------------
void __thiscall TermExtendWin::DirectMessage(TermExtendWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  TermExtendWin *v4; // esi@1

  v4 = this;
  if ( iMsgTag == 27 && pvBody && !*(_DWORD *)pvBody )
  {
    LOBYTE(this->m_kEffectList.vfptr[37].NewItem) = 1;
    GameFrameWork::NcTermExtendReq(
      (GameFrameWork *)LODWORD(this->m_kLocal.m_Rotate.m_pEntry[1][0]),
      LODWORD(this->m_kBound.m_kCenter.y),
      LODWORD(this->m_kBound.m_kCenter.z));
    SpEffect::Start((SpEffect *)v4->m_uiMessageNum, (NiNode *)v4->m_iWidth);
    v4->m_pkMsgHooker = 0;
  }
}

//----- (0043C590) --------------------------------------------------------
void __thiscall ItemSlotWin::DoAction(ItemSlotWin *this)
{
  ItemSlotWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiInvIndex);
}

//----- (0043C5C0) --------------------------------------------------------
void __thiscall ItemSlotWin::DoRAction(ItemSlotWin *this)
{
  ItemSlotWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiRCmdMsg, v1->m_uiInvIndex);
}

//----- (0043C5F0) --------------------------------------------------------
void __thiscall ItemSlotWin::ReSetSlot(ItemSlotWin *this)
{
  ItemSlotWin *v1; // esi@1
  PgWin *v2; // eax@1
  unsigned int v3; // ecx@2
  InvWin *v4; // ecx@3

  v1 = this;
  v2 = this->m_pkSender;
  this->m_bLock = 0;
  if ( v2 )
  {
    v3 = this->m_uiSenderInvIndex;
    if ( v3 < 0xC0 )
    {
      v4 = (InvWin *)LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][v3 + 2]);
      if ( v4 )
        InvWin::SetLock(v4, 0);
    }
  }
  v1->m_uiSenderType = -1;
  v1->m_uiSenderInvIndex = -1;
  v1->m_pkSender = 0;
  ItemIcon::SetItem((ItemIcon *)&v1->vfptr, 0, 1);
}

//----- (0043C650) --------------------------------------------------------
void __thiscall TermExtendWin::SetExtendInfo(TermExtendWin *this, ExtendItemInfo pExtendInfo)
{
  TermExtendWin *v2; // esi@1
  char *v3; // edi@2
  char *v4; // eax@3
  char *v5; // eax@3
  _DWORD *v6; // eax@3
  unsigned int v7; // ecx@4
  InvWin *v8; // eax@5

  v2 = this;
  if ( pExtendInfo.pcItemIDX )
  {
    v3 = TermExtendMatchGroupDescTable::GetGroupNameByExtendItemIDX(pExtendInfo.pcItemIDX);
    if ( v3 )
    {
      v2->m_uiExtendItemInvNum = pExtendInfo.uiInventoryNum;
      v2->m_ExtendGroup = pExtendInfo.pcItemIDX;
      v4 = (char *)TextData3::Get(0x7EF6C3CEu);
      v5 = fs(
             v4,
             v3,
             (unsigned __int16)(((signed int)(pExtendInfo.wExtendHour / 6u) >> 2) + pExtendInfo.wExtendHour / 0u));
      ((void (__stdcall *)(char *, _DWORD))v2->m_pkInfoDescText->vfptr[120].__vecDelDtor)(v5, 0);
      v6 = v2->m_pkFrameWork[19].m_BackFrameID;
      if ( v6 )
      {
        v7 = v2->m_uiExtendItemInvNum;
        if ( v7 < 0xC0 )
        {
          v8 = (InvWin *)v6[v7 + 87];
          if ( v8 )
            InvWin::SetLock(v8, 1);
        }
      }
      v2->m_bIsExtendItem = 1;
    }
  }
}

//----- (0043C710) --------------------------------------------------------
void __thiscall TermExtendWin::OnApply(TermExtendWin *this)
{
  TermExtendWin *v1; // esi@1
  char *v2; // eax@1
  char *v3; // eax@1
  MsgBox *v4; // eax@1

  v1 = this;
  this->m_uiTermItemInvNum = LOBYTE(this->m_apkSlotWin->m_uiSenderInvIndex);
  v2 = (char *)TextData3::Get(0xC6071319);
  v3 = fs(v2);
  v4 = MsgBox::Modal(MSGBOX_OKCANCEL, v3);
  v1->m_pkMsgBox = v4;
  ((void (__stdcall *)(_DWORD))v4->vfptr->SetMsgHooker)(&v1->vfptr);
}

//----- (0043C760) --------------------------------------------------------
void __thiscall TermExtendWin::TermExtendWin(TermExtendWin *this)
{
  TermExtendWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&TermExtendWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&TermExtendWin::`vftable'{for `IDirectMessenger'};
  v1->m_kDrop.m_pkSender = 0;
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  v1->m_kDropContents.m_uiLot = 0;
  v1->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v1->m_kDropContents.m_kItemID = -1;
  v1->m_pAttachEffect.m_pObject = 0;
  v1->m_kSuccessSound._Mysize = 0;
  v1->m_kSuccessSound._Myres = 15;
  v1->m_kSuccessSound._Bx._Buf[0] = 0;
  v1->m_kDrop.m_pkContents = &v1->m_kDropContents;
  v1->m_apkSlotWin = 0;
  v1->m_pkItemNameText = 0;
  v1->m_pkTermText = 0;
  v1->m_pkInfoDescText = 0;
  v1->m_ExtendGroup = 0;
  *(_WORD *)&v1->m_bIsExtendItem = 0;
  v1->m_pkOKBtn = 0;
  v1->m_pkMsgBox = 0;
  v1->m_apkEffect = 0;
  v1->m_uiExtendItemInvNum = 255;
  v1->m_uiTermItemInvNum = 255;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 978004: using guessed type void (__thiscall *TermExtendWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 978024: using guessed type int (__thiscall *TermExtendWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0043C820) --------------------------------------------------------
void __thiscall TermExtendWin::~TermExtendWin(TermExtendWin *this)
{
  TermExtendWin *v1; // esi@1
  SpEffect *v2; // edi@1
  NiNode *v3; // ebx@2
  NiNode *v4; // edi@9

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&TermExtendWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&TermExtendWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_apkEffect;
  if ( v2 )
  {
    NsEffect::~NsEffect(&v2->m_kEffect);
    ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v2->m_kMarkCheck);
    v3 = v2->m_spEffect.m_pObject;
    if ( v2->m_spEffect.m_pObject && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    operator delete(v2);
    v1->m_apkEffect = 0;
  }
  if ( v1->m_kSuccessSound._Myres >= 0x10 )
    operator delete(v1->m_kSuccessSound._Bx._Ptr);
  v1->m_kSuccessSound._Myres = 15;
  v1->m_kSuccessSound._Mysize = 0;
  v1->m_kSuccessSound._Bx._Buf[0] = 0;
  v4 = v1->m_pAttachEffect.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v1->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 978004: using guessed type void (__thiscall *TermExtendWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 978024: using guessed type int (__thiscall *TermExtendWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0043C960) --------------------------------------------------------
void __userpurge TermExtendWin::SetTermItemInfo(TermExtendWin *this@<ecx>, unsigned int a2@<ebx>, Item *pItem)
{
  TermExtendWin *v3; // edi@1
  NiRefObjectVtbl *v4; // esi@2
  NiUnsharedGeometryGroup *v5; // eax@2
  unsigned int v6; // eax@4
  int v7; // ebx@4
  int v8; // ST2C_4@4
  int v9; // ST28_4@4
  int result_4; // ST34_4@4
  int v11; // ST24_4@4
  int v12; // eax@4
  int v13; // esi@4
  int v14; // eax@4
  long double v15; // st7@4
  long double v16; // st7@4
  void *(__thiscall *v17)(NiRefObject *, unsigned int); // eax@4
  TermExtendWin *v18; // [sp+1Ch] [bp-D0h]@1
  tm TimeRL; // [sp+20h] [bp-CCh]@4
  tm TimeRH; // [sp+44h] [bp-A8h]@4
  char acRemainigTime[128]; // [sp+68h] [bp-84h]@3

  v3 = this;
  v18 = this;
  if ( pItem )
  {
    ((void (__stdcall *)(char *))this->m_pkItemNameText->vfptr[118].__vecDelDtor)(pItem->m_pkInfo->Name);
    acRemainigTime[0] = 0;
    memset(&acRemainigTime[1], 0, 0x7Fu);
    if ( ((int (__thiscall *)(Item *))pItem->vfptr[11].__vecDelDtor)(pItem) )
    {
      v6 = *(_DWORD *)pItem->vfptr[11].__vecDelDtor((NiRefObject *)pItem, a2);
      v7 = (v6 >> 19) & 0x3F;
      v8 = (unsigned __int8)v6;
      v9 = (v6 >> 13) & 0x3F;
      result_4 = v6 >> 25;
      v11 = (v6 >> 8) & 0x1F;
      sprintf(acRemainigTime, "%04d-%02d-%02d %02d:%02d", (unsigned __int8)v6 + 2000, v11, v9, v7, v6 >> 25);
      ((void (__cdecl *)(char *))v3->m_pkTermText->vfptr[118].__vecDelDtor)(acRemainigTime);
      qmemcpy(&TimeRL, &Timer::ms_dLastServerTime, sizeof(TimeRL));
      v12 = _mktime32(&TimeRL);
      TimeRH.tm_mon = v11 - 1;
      v13 = v12;
      TimeRH.tm_year = v8 + 100;
      TimeRH.tm_mday = v9;
      TimeRH.tm_hour = v7;
      TimeRH.tm_min = result_4;
      TimeRH.tm_sec = 0;
      v14 = _mktime32(&TimeRH);
      v15 = _difftime32(v14, v13);
      v16 = (double)ChargedEffectTable::GetByInxName(v18->m_ExtendGroup)->KeepTime_Hour + v15 / 3600.0;
      v17 = v18->m_pkTermText->vfptr[117].__vecDelDtor;
      if ( v16 <= 2160.0 )
        ((void (__stdcall *)(D3DXCOLOR *))v17)(&Color::m_kDxGreenColor);
      else
        ((void (__stdcall *)(D3DXCOLOR *))v17)(&Color::m_kDxRedColor);
    }
  }
  else
  {
    v4 = this->m_pkItemNameText->vfptr;
    v5 = TextData3::Get(0xD0F48A22);
    v4[118].__vecDelDtor((NiRefObject *)v3->m_pkItemNameText, (unsigned int)v5);
    ((void (__stdcall *)(void *))v3->m_pkTermText->vfptr[118].__vecDelDtor)(&unk_977C03);
  }
}

//----- (0043CB90) --------------------------------------------------------
char __thiscall TermExtendWin::DropItemSlot(TermExtendWin *this, PgWinDrop *pkDrop)
{
  PgWinDrop *v2; // ebx@1
  void *v3; // edi@1
  TermExtendWin *v4; // esi@1
  char result; // al@2
  Item *v6; // eax@3
  ItemSlotWin *v7; // ecx@5
  ItemSlotWin *v8; // ecx@7
  PgWin *v9; // eax@7
  unsigned int v10; // ecx@8
  InvWin *v11; // eax@9
  Item *pItem; // [sp+14h] [bp+8h]@3

  v2 = pkDrop;
  v3 = pkDrop->m_pkContents;
  v4 = this;
  if ( v3 && (v6 = (Item *)*((_DWORD *)v3 + 5), (pItem = v6) != 0) )
  {
    TermExtendWin::SetTermItemInfo(this, (unsigned int)v2, v6);
    if ( ItemIcon::GetItem((ItemIcon *)&v4->m_apkSlotWin->vfptr) )
    {
      v7 = v4->m_apkSlotWin;
      if ( v7 )
        ItemSlotWin::ReSetSlot(v7);
    }
    ItemSlotWin::ReSetSlot(v4->m_apkSlotWin);
    v4->m_apkSlotWin->m_uiSenderType = *((_DWORD *)v3 + 2);
    v4->m_apkSlotWin->m_uiSenderInvIndex = *((_DWORD *)v3 + 3);
    v4->m_apkSlotWin->m_pkSender = v2->m_pkSender;
    v8 = v4->m_apkSlotWin;
    v9 = v8->m_pkSender;
    if ( v9 )
    {
      v10 = v8->m_uiSenderInvIndex;
      if ( v10 < 0xC0 )
      {
        v11 = (InvWin *)LODWORD(v9[1].m_kLocal.m_Rotate.m_pEntry[0][v10 + 2]);
        if ( v11 )
          InvWin::SetLock(v11, 1);
      }
    }
    ItemIcon::SetItem((ItemIcon *)&v4->m_apkSlotWin->vfptr, pItem, 1);
    v4->m_bIsTermItem = 1;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0043CC70) --------------------------------------------------------
void __usercall TermExtendWin::ResetAllData(TermExtendWin *this@<ecx>, unsigned int a2@<ebx>)
{
  TermExtendWin *v2; // esi@1

  v2 = this;
  ItemSlotWin::ReSetSlot(this->m_apkSlotWin);
  TermExtendWin::SetTermItemInfo(v2, a2, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkInfoDescText->vfptr[118].__vecDelDtor)(&unk_977C12);
  v2->m_uiExtendItemInvNum = 255;
  v2->m_uiTermItemInvNum = 255;
  *(_WORD *)&v2->m_bIsExtendItem = 0;
}

//----- (0043CCC0) --------------------------------------------------------
char __thiscall ItemSlotWin::EatDropInstance(ItemSlotWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  _DWORD *v5; // eax@5
  int v6; // esi@7
  TermExtendWin *v7; // ebx@9
  TermExtendMatch *v8; // edi@9
  int v9; // eax@11
  GameFrameWork *v10; // esi@13
  NiUnsharedGeometryGroup *v11; // eax@13
  ItemSlotWin *v12; // [sp+0h] [bp-4h]@1

  v12 = this;
  if ( this->m_bLock )
    goto LABEL_20;
  if ( !*pkDrop )
    return 0;
  v5 = (*pkDrop)->m_pkContents;
  if ( v5[2] || v5[4] )
  {
LABEL_20:
    PgCursor::ms_bKeepDrop = 1;
    return 0;
  }
  v6 = v5[5];
  if ( !v6 )
  {
    PgCursor::ms_bKeepDrop = 1;
    return 0;
  }
  v7 = (TermExtendWin *)PgWin::GetParentWin((PgWin *)&this->vfptr);
  v8 = TermExtendMatchTable::GetTermExtendMatchByItemIDX((char *)(*(_DWORD *)(v6 + 112) + 2));
  if ( !v8
    || (*(int (__thiscall **)(int))(*(_DWORD *)v6 + 44))(v6)
    && (v9 = *(_DWORD *)(*(int (__thiscall **)(int))(*(_DWORD *)v6 + 44))(v6), !(_BYTE)v9)
    && !(v9 & 0xFFFFFF00) )
  {
    v10 = (GameFrameWork *)v12->m_pkFrameWork;
    v11 = TextData3::Get(0x51E5D2C7u);
LABEL_16:
    GameFrameWork::AddSysMsg(v10, (const char *)v11);
    PgCursor::ms_bKeepDrop = 1;
    return 0;
  }
  if ( strcmp(v7->m_ExtendGroup, v8->ExtendItemIDX) )
  {
    v10 = (GameFrameWork *)v12->m_pkFrameWork;
    v11 = TextData3::Get(0xA4CCCE21);
    goto LABEL_16;
  }
  return TermExtendWin::DropItemSlot(v7, *pkDrop);
}
// B648B8: using guessed type bool PgCursor::ms_bKeepDrop;

//----- (0043CDE0) --------------------------------------------------------
void __thiscall TermExtendWin::ShowUpgradeResult(TermExtendWin *this)
{
  TermExtendWin *v1; // esi@1
  _DWORD *v2; // ebx@1
  unsigned int v3; // eax@2
  ItemIcon *v4; // ecx@3
  Item *v5; // eax@4
  Item *v6; // edi@4
  ItemSlotWin *v7; // eax@5
  PgWin *v8; // ecx@5
  unsigned int v9; // eax@6
  InvWin *v10; // ecx@7
  GameFrameWork *v11; // edi@9
  NiUnsharedGeometryGroup *v12; // eax@9
  char *v13; // eax@9
  unsigned int v14; // eax@11
  ItemIcon *v15; // eax@12

  v1 = this;
  v2 = this->m_pkFrameWork[19].m_BackFrameID;
  if ( v2 )
  {
    v3 = this->m_uiTermItemInvNum;
    if ( v3 < 0xC0 )
    {
      v4 = (ItemIcon *)v2[v3 + 87];
      if ( v4 )
      {
        v5 = ItemIcon::GetItem(v4);
        v6 = v5;
        if ( v5 )
        {
          ItemIcon::SetItem((ItemIcon *)&v1->m_apkSlotWin->vfptr, v5, 1);
          v1->m_apkSlotWin->m_bLock = 0;
          v1->m_apkSlotWin->m_uiSenderInvIndex = v1->m_uiTermItemInvNum;
          v7 = v1->m_apkSlotWin;
          v8 = v7->m_pkSender;
          if ( v8 )
          {
            v9 = v7->m_uiSenderInvIndex;
            if ( v9 < 0xC0 )
            {
              v10 = (InvWin *)LODWORD(v8[1].m_kLocal.m_Rotate.m_pEntry[0][v9 + 2]);
              if ( v10 )
                InvWin::SetLock(v10, 1);
            }
          }
          TermExtendWin::SetTermItemInfo(v1, (unsigned int)v2, v6);
          v11 = (GameFrameWork *)v1->m_pkFrameWork;
          v12 = TextData3::Get(0xE2E8E424);
          GameFrameWork::AddSysMsg(v11, (const char *)v12);
          v13 = v1->m_kSuccessSound._Bx._Buf;
          if ( v1->m_kSuccessSound._Myres >= 0x10 )
            v13 = *(char **)v13;
          SoundMgr::PlayInterfaceSound(&g_kSoundMgr, v13);
          v14 = v1->m_uiExtendItemInvNum;
          if ( v14 >= 0xC0 || (v15 = (ItemIcon *)v2[v14 + 87]) == 0 || !ItemIcon::GetItem(v15) )
            v1->m_bIsExtendItem = 0;
        }
      }
    }
  }
}

//----- (0043CF00) --------------------------------------------------------
void __usercall TermExtendWin::OnSlotLClick(TermExtendWin *this@<ecx>, unsigned int a2@<ebx>)
{
  TermExtendWin *v2; // esi@1
  ItemSlotWin *v3; // edi@1
  Item *v4; // eax@2
  unsigned int v5; // ecx@3

  v2 = this;
  TermExtendWin::SetTermItemInfo(this, a2, 0);
  v3 = v2->m_apkSlotWin;
  if ( v3 )
  {
    v4 = ItemIcon::GetItem((ItemIcon *)&v2->m_apkSlotWin->vfptr);
    if ( v4 )
    {
      v2->m_kDropContents.m_eSenderType = v3->m_uiSenderType;
      v2->m_kDropContents.m_eType = 0;
      v5 = v3->m_uiSenderInvIndex;
      v2->m_kDropContents.m_apvParam[0] = v4;
      v2->m_kDropContents.m_uiSenderIndex = v5;
      v2->m_kDropContents.m_apvParam[1] = 0;
      v2->m_kDropContents.m_uiLot = ((int (__thiscall *)(_DWORD))v4->vfptr[3].__vecDelDtor)(v4);
      v2->m_kDrop.m_pkSender = v3->m_pkSender;
      PgCursor::ms_pkDrop = &v2->m_kDrop;
      ItemSlotWin::ReSetSlot(v3);
      v2->m_bIsTermItem = 0;
    }
  }
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (0043CF90) --------------------------------------------------------
void __usercall TermExtendWin::OnCancel(TermExtendWin *this@<ecx>, unsigned int a2@<ebx>)
{
  TermExtendWin *v2; // esi@1
  _DWORD *v3; // eax@1
  unsigned int v4; // ecx@2
  InvWin *v5; // ecx@3

  v2 = this;
  v3 = this->m_pkFrameWork[19].m_BackFrameID;
  if ( v3 )
  {
    v4 = this->m_uiExtendItemInvNum;
    if ( v4 < 0xC0 )
    {
      v5 = (InvWin *)v3[v4 + 87];
      if ( v5 )
        InvWin::SetLock(v5, 0);
    }
  }
  ItemSlotWin::ReSetSlot(v2->m_apkSlotWin);
  TermExtendWin::SetTermItemInfo(v2, a2, 0);
  ((void (__stdcall *)(void *))v2->m_pkInfoDescText->vfptr[118].__vecDelDtor)(&unk_977C12);
  v2->m_uiExtendItemInvNum = 255;
  v2->m_uiTermItemInvNum = 255;
  *(_WORD *)&v2->m_bIsExtendItem = 0;
  PgWin::PostMsg((PgWin *)&v2->vfptr, 1u, 0, 0);
}

//----- (0043D020) --------------------------------------------------------
void __usercall TermExtendWin::OnClose(TermExtendWin *this@<ecx>, unsigned int a2@<ebx>)
{
  TermExtendWin *v2; // esi@1
  _DWORD *v3; // eax@1
  unsigned int v4; // ecx@2
  InvWin *v5; // ecx@3
  NiNode *v6; // ST00_4@5
  SpEffect *v7; // ecx@5

  v2 = this;
  v3 = this->m_pkFrameWork[19].m_BackFrameID;
  if ( v3 )
  {
    v4 = this->m_uiExtendItemInvNum;
    if ( v4 < 0xC0 )
    {
      v5 = (InvWin *)v3[v4 + 87];
      if ( v5 )
        InvWin::SetLock(v5, 0);
    }
  }
  ItemSlotWin::ReSetSlot(v2->m_apkSlotWin);
  TermExtendWin::SetTermItemInfo(v2, a2, 0);
  ((void (__stdcall *)(void *))v2->m_pkInfoDescText->vfptr[118].__vecDelDtor)(&unk_977C12);
  v6 = v2->m_pAttachEffect.m_pObject;
  v7 = v2->m_apkEffect;
  v2->m_uiExtendItemInvNum = 255;
  v2->m_uiTermItemInvNum = 255;
  *(_WORD *)&v2->m_bIsExtendItem = 0;
  SpEffect::End(v7, v6);
}

//----- (0043D0B0) --------------------------------------------------------
ItemSlotWin *__cdecl ItemSlotWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork)
{
  PgWin *v5; // eax@1
  PgWin *v6; // eax@2
  PgWin *v7; // esi@2
  PgWin *v8; // edi@8
  ItemSlotWin *v9; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v11; // [sp+20h] [bp-4h]@1

  v5 = (PgWin *)operator new(0x1D8u);
  result.m_pObject = v5;
  v11 = 0;
  if ( v5 )
  {
    ItemSlotWin::ItemSlotWin((ItemSlotWin *)v5);
    v7 = v6;
  }
  else
  {
    v7 = 0;
  }
  if ( v7 )
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  v11 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v7);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, PgWin *, PgFrameWork *))v7->vfptr[154].__vecDelDtor)(
                          v7,
                          iXPos,
                          iYPos,
                          uiInvIndex,
                          pkParent,
                          pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v7->vfptr[89].__vecDelDtor)(v7);
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = (ItemSlotWin *)v7;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v7);
    if ( result.m_pObject )
    {
      v8 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v8 )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      }
    }
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = 0;
  }
  return v9;
}

//----- (0043D1F0) --------------------------------------------------------
TermExtendWin *__cdecl TermExtendWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  TermExtendWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x200u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    TermExtendWin::TermExtendWin((TermExtendWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (TermExtendWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (0043D320) --------------------------------------------------------
void __userpurge TermExtendWin::OnCommand(TermExtendWin *this@<ecx>, unsigned int a2@<ebx>, unsigned int wParam, int lParam)
{
  GameFrameWork *v4; // eax@5

  switch ( wParam )
  {
    case 0xBu:
      TermExtendWin::OnSlotLClick(this, a2);
      break;
    case 0xCu:
      TermExtendWin::OnApply(this);
      break;
    case 0xDu:
      TermExtendWin::OnCancel(this, a2);
      break;
    case 0xEu:
      v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v4 )
        GameFrameWork::OpenPlayGuideSearchList(v4, "TermExtendWin");
      break;
    default:
      return;
  }
}

//----- (0043D390) --------------------------------------------------------
char __thiscall TermExtendWin::Create(TermExtendWin *this, PgFrameWork *pkFrameWork)
{
  TermExtendWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  char result; // al@9
  int v8; // edi@10
  int v9; // ebx@10
  NiSourceTexture *v10; // eax@10
  PgSprData *v11; // eax@11
  D3DXCOLOR v12; // ST18_16@13
  char *v13; // eax@13
  D3DXCOLOR v14; // ST18_16@13
  char *v15; // eax@13
  D3DXCOLOR v16; // ST18_16@13
  char *v17; // eax@13
  PgSprData *v18; // eax@13
  PgWinSpr *v19; // eax@13
  ItemSlotWin *v20; // eax@13
  D3DXCOLOR v21; // ST10_16@13
  char *v22; // eax@13
  D3DXCOLOR v23; // ST10_16@13
  D3DXCOLOR v24; // ST10_16@13
  PgWinSpr *v25; // edi@13
  const char *v26; // eax@20
  NiNode *v27; // esi@21
  PgFrameWork *v28; // edi@26
  NiNode *v29; // eax@27
  SpEffect *v30; // eax@27
  NiNode *v31; // eax@30
  NiNode *v32; // esi@32
  NiNode *v33; // esi@35
  UIUtil ui; // [sp+30h] [bp-40h]@10
  float v35; // [sp+44h] [bp-2Ch]@30
  float v36; // [sp+48h] [bp-28h]@30
  float v37; // [sp+4Ch] [bp-24h]@30
  PgWinBut *pkBtn; // [sp+50h] [bp-20h]@13
  NiPointer<NiNode> pkNiNodePtr; // [sp+54h] [bp-1Ch]@18
  int uiLeft; // [sp+58h] [bp-18h]@4
  int uiTop; // [sp+5Ch] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+60h] [bp-10h]@1
  int v43; // [sp+6Ch] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v43 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\TermExtendWin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "TermExtendWin", 0) )
  {
    v6 = spNode.m_pObject;
    v43 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = uiLeft;
  v9 = uiTop;
  UIUtil::UIUtil(&ui);
  LOBYTE(v43) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, v8, v9);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v11, (PgWin *)&v2->vfptr, 0, 0);
  UIUtil::CreateSpr(&ui, "IconSlot", 0);
  UIUtil::CreateSpr(&ui, "Panel01", 0);
  UIUtil::CreateSpr(&ui, "Panel02", 0);
  UIUtil::CreateSpr(&ui, "Panel03", 0);
  *(_QWORD *)&v12.r = *(_QWORD *)&Color::m_kDxWinTitleColor.r;
  *(_QWORD *)&v12.b = qword_A696E8;
  v13 = (char *)TextData3::Get(0x3F8C848Eu);
  UIUtil::CreateTextNoSpr(&ui, "WinTitle", v13, v12, 5u);
  UIUtil::CreateBtn(&ui, 0xEu, "HelpLinkNor", "HelpLinkOver", "HelpLinkClick", 0, 0);
  UIUtil::CreateCloseBtn(&ui, "ClsNor", "ClsOver", "ClsClick");
  v2->m_pkOKBtn = UIUtil::CreateBtn(&ui, 0xCu, "OkNor", "OkOver", "OkClick", "OkDisable", 0);
  *(_QWORD *)&v14.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v14.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v15 = (char *)TextData3::Get(0xB3EE354E);
  UIUtil::CreateAttachedText((PgWin *)&v2->m_pkOKBtn->vfptr, v15, v14, 5u);
  pkBtn = UIUtil::CreateBtn(&ui, 0xDu, "CancelNor", "CancelOver", "CancelClick", 0, 0);
  *(_QWORD *)&v16.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v16.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v17 = (char *)TextData::Get(0x97A4A8DF);
  UIUtil::CreateAttachedText((PgWin *)&pkBtn->vfptr, v17, v16, 5u);
  v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MainSlot", &uiLeft, &uiTop, 0);
  v19 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v18, (PgWin *)&v2->vfptr, 0, 0);
  v19->vfptr[64].__vecDelDtor((NiRefObject *)v19, 1u);
  v20 = ItemSlotWin::CreateWin(uiLeft - v8 + 1, uiTop - v9 + 1, 0, (PgWin *)&v2->vfptr, pkFrameWork);
  v2->m_apkSlotWin = v20;
  v20->vfptr[60].__vecDelDtor((NiRefObject *)v20, 1u);
  ((void (__stdcall *)(signed int))v2->m_apkSlotWin->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(signed int))v2->m_apkSlotWin->vfptr[129].__vecDelDtor)(11);
  ((void (__stdcall *)(signed int))v2->m_apkSlotWin->vfptr[140].__vecDelDtor)(10);
  v2->m_apkSlotWin->m_eType = 1;
  IconWin::ShowFocus((IconWin *)&v2->m_apkSlotWin->vfptr, 1);
  ItemSlotWin::ReSetSlot(v2->m_apkSlotWin);
  *(_QWORD *)&v21.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v21.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v22 = (char *)TextData3::Get(0xD0F48A22);
  v2->m_pkItemNameText = (PgWinText *)UIUtil::CreateText(&ui, "NoticeText01", v22, 0, v21, 5u, 0, 1);
  *(_QWORD *)&v23.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v23.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v2->m_pkTermText = (PgWinText *)UIUtil::CreateText(&ui, "NoticeText02", &byte_977BFB, 0, v23, 5u, 0, 1);
  *(_QWORD *)&v24.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v24.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v2->m_pkInfoDescText = (PgWinText *)UIUtil::CreateText(&ui, "NoticeText03", &byte_977C02, 0, v24, 0, 0, 0);
  v25 = PgWinSpr::CreateWin(0, 0, 1u, 1u, (PgWin *)&v2->vfptr, 0, 0);
  pkFrameWork = (PgFrameWork *)v25;
  if ( v25 )
    InterlockedIncrement((volatile LONG *)&v25->m_uiRefCount);
  LOBYTE(v43) = 2;
  NiPointer<NiActorManager>::operator=(
    (NiPointer<NiPixelData> *)&v2->m_pAttachEffect,
    (NiPointer<NiPixelData> *)&pkFrameWork);
  LOBYTE(v43) = 1;
  if ( v25 && !InterlockedDecrement((volatile LONG *)&v25->m_uiRefCount) )
    v25->vfptr->__vecDelDtor((NiRefObject *)v25, 1u);
  pkNiNodePtr.m_pObject = 0;
  LOBYTE(v43) = 3;
  if ( !Folder::m_bInit )
    Folder::Init();
  v26 = Folder::Merge(&Folder::m_acEffect, "TermExtend.nif");
  PgUtil::LoadNodeNifFile(v26, &pkNiNodePtr, 0);
  if ( pkNiNodePtr.m_pObject )
  {
    v28 = (PgFrameWork *)operator new(0x44u);
    pkFrameWork = v28;
    LOBYTE(v43) = 4;
    if ( v28 )
    {
      v29 = (NiNode *)NiObject::Clone((NiObject *)&pkNiNodePtr.m_pObject->vfptr);
      SpEffect::SpEffect((SpEffect *)v28, v29);
    }
    else
    {
      v30 = 0;
    }
    LOBYTE(v43) = 3;
    v2->m_apkEffect = v30;
    if ( v30 )
    {
      v31 = v30->m_spEffect.m_pObject;
      v35 = 0.0;
      v36 = 0.0;
      v31->m_kLocal.m_Translate.x = 0.0;
      v37 = 1000.0;
      v31->m_kLocal.m_Translate.y = 0.0;
      v31->m_kLocal.m_Translate.z = 1000.0;
      v2->m_apkEffect->m_bClamp = 1;
    }
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v2->m_kSuccessSound,
      "MoverUpgrade_Start",
      0x12u);
    ((void (__thiscall *)(TermExtendWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.30000001,
      0.5);
    LOBYTE(v43) = 1;
    if ( pkNiNodePtr.m_pObject )
    {
      v32 = pkNiNodePtr.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&pkNiNodePtr.m_pObject->m_uiRefCount) )
      {
        if ( v32 )
          v32->vfptr->__vecDelDtor((NiRefObject *)v32, 1u);
      }
    }
    LOBYTE(v43) = 0;
    UIUtil::~UIUtil(&ui);
    v33 = spNode.m_pObject;
    v43 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v33 )
      v33->vfptr->__vecDelDtor((NiRefObject *)v33, 1u);
    result = 1;
  }
  else
  {
    LOBYTE(v43) = 0;
    UIUtil::~UIUtil(&ui);
    v27 = spNode.m_pObject;
    v43 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v27 )
      v27->vfptr->__vecDelDtor((NiRefObject *)v27, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A696E8: using guessed type __int64 qword_A696E8;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0043DA30) --------------------------------------------------------
ItemSlotWin *__thiscall ItemSlotWin::`scalar deleting destructor'(ItemSlotWin *this, unsigned int a2)
{
  ItemSlotWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ItemSlotWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ItemSlotWin::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 977D74: using guessed type void (__thiscall *ItemSlotWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 977D94: using guessed type int (__thiscall *ItemSlotWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0043DA70) --------------------------------------------------------
TermExtendMatch *__cdecl TermExtendMatchTable::GetTermExtendMatchByItemIDX(char *pcItemIDX)
{
  char *v1; // ebx@1
  int v2; // eax@3
  unsigned int v3; // edi@4
  unsigned int v4; // esi@6
  TermExtendMatch *result; // eax@7

  v1 = pcItemIDX;
  if ( pcItemIDX && *pcItemIDX )
  {
    v2 = *(_DWORD *)(ITableBase<TermExtendMatch,TermExtendMatchTable>::ms_pkTable + 56);
    if ( v2 )
      v3 = *(_DWORD *)(v2 + 40);
    else
      v3 = 0;
    v4 = 0;
    if ( v3 )
    {
      do
      {
        result = (TermExtendMatch *)CDataReader::GetRecord(
                                      (CDataReader *)(ITableBase<TermExtendMatch,TermExtendMatchTable>::ms_pkTable + 4),
                                      v4);
        if ( result )
        {
          if ( !strcmp(result->TermItemIDX, v1) )
            return result;
          v1 = pcItemIDX;
        }
        ++v4;
      }
      while ( v4 < v3 );
    }
    result = 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A89D4C: using guessed type int ITableBase<TermExtendMatch,TermExtendMatchTable>::ms_pkTable;

//----- (0043DB00) --------------------------------------------------------
char *__cdecl TermExtendMatchGroupDescTable::GetGroupNameByExtendItemIDX(char *pcItemIDX)
{
  char *v1; // ebx@1
  int v2; // eax@3
  unsigned int v3; // edi@4
  unsigned int v4; // esi@6
  char *v5; // eax@7

  v1 = pcItemIDX;
  if ( pcItemIDX && *pcItemIDX )
  {
    v2 = *(_DWORD *)(ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>::ms_pkTable + 56);
    if ( v2 )
      v3 = *(_DWORD *)(v2 + 40);
    else
      v3 = 0;
    v4 = 0;
    if ( !v3 )
      return 0;
    while ( 1 )
    {
      v5 = CDataReader::GetRecord(
             (CDataReader *)(ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>::ms_pkTable + 4),
             v4);
      if ( v5 )
      {
        if ( !strcmp(v5, v1) )
          return v5 + 32;
        v1 = pcItemIDX;
      }
      if ( ++v4 >= v3 )
        return 0;
    }
  }
  return 0;
}
// A89D50: using guessed type int ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>::ms_pkTable;

//----- (0043DB90) --------------------------------------------------------
ChargedItemEffect *__cdecl ChargedEffectTable::GetByInxName(char *pcInxName)
{
  unsigned int v1; // edi@3
  ChargedItemEffect *result; // eax@6

  if ( pcInxName && *pcInxName )
  {
    v1 = 0;
    if ( ITableBase<ChargedItemEffect,ChargedEffectTable>::GetTotal() )
    {
      while ( strcmp(
                CDataReader::GetRecord(
                  (CDataReader *)(ITableBase<ChargedItemEffect,ChargedEffectTable>::ms_pkTable + 4),
                  v1)
              + 2,
                pcInxName) )
      {
        if ( ++v1 >= ITableBase<ChargedItemEffect,ChargedEffectTable>::GetTotal() )
          goto LABEL_6;
      }
      result = (ChargedItemEffect *)CDataReader::GetRecord(
                                      (CDataReader *)(ITableBase<ChargedItemEffect,ChargedEffectTable>::ms_pkTable + 4),
                                      v1);
    }
    else
    {
LABEL_6:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A886E0: using guessed type int ITableBase<ChargedItemEffect,ChargedEffectTable>::ms_pkTable;

//----- (0043DC20) --------------------------------------------------------
TermExtendWin *__thiscall TermExtendWin::`vector deleting destructor'(TermExtendWin *this, unsigned int a2)
{
  TermExtendWin *v2; // esi@1

  v2 = this;
  TermExtendWin::~TermExtendWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0043DC50) --------------------------------------------------------
int __cdecl TextDataNodeComp(const void *p1, const void *p2)
{
  int result; // eax@2

  if ( *(_DWORD *)p1 >= *(_DWORD *)p2 )
    result = *(_DWORD *)p1 != *(_DWORD *)p2;
  else
    result = -1;
  return result;
}

//----- (0043DC80) --------------------------------------------------------
void TextData::BeforeTerminate()
{
  operator delete[](TextData::ms_apkNode);
  TextData::ms_apkNode = 0;
}

//----- (0043DCA0) --------------------------------------------------------
char TextData::DataProcess()
{
  char result; // al@2
  int v2; // eax@3
  unsigned int v3; // ebx@4
  char *v4; // eax@5
  int v5; // edx@6
  int v6; // ecx@7
  unsigned int v7; // esi@11
  int v8; // edi@12
  char *v9; // eax@13
  int v10; // eax@16
  unsigned int v11; // eax@17

  if ( ITableBase<TextDataType,TextData>::ms_pkTable )
  {
    v2 = *(_DWORD *)(ITableBase<TextDataType,TextData>::ms_pkTable + 56);
    if ( v2 )
    {
      v3 = *(_DWORD *)(v2 + 40);
      if ( v3 )
      {
        v4 = (char *)operator new[](16 * v3);
        if ( v4 )
        {
          v5 = v3 - 1;
          if ( ((v3 - 1) & 0x80000000) == 0 )
          {
            v6 = (int)(v4 + 8);
            do
            {
              *(_DWORD *)(v6 - 4) = &unk_96F8EB;
              *(_DWORD *)v6 = &unk_96F8EB;
              *(_DWORD *)(v6 + 4) = &unk_96F8EB;
              v6 += 16;
              --v5;
            }
            while ( v5 >= 0 );
          }
        }
        else
        {
          v4 = 0;
        }
        v7 = 0;
        TextData::ms_apkNode = v4;
        if ( v3 )
        {
          v8 = 0;
          do
          {
            v9 = CDataReader::GetRecord((CDataReader *)(ITableBase<TextDataType,TextData>::ms_pkTable + 4), v7);
            if ( v9 )
            {
              *(_DWORD *)((char *)TextData::ms_apkNode + v8) = *(_DWORD *)v9;
              *(_DWORD *)((char *)TextData::ms_apkNode + v8 + 4) = v9 + 68;
              *(_DWORD *)((char *)TextData::ms_apkNode + v8 + 8) = v9 + 4;
              *(_DWORD *)((char *)TextData::ms_apkNode + v8 + 12) = v9 + 36;
            }
            ++v7;
            v8 += 16;
          }
          while ( v7 < v3 );
        }
        v10 = *(_DWORD *)(ITableBase<TextDataType,TextData>::ms_pkTable + 56);
        if ( v10 )
          v11 = *(_DWORD *)(v10 + 40);
        else
          v11 = 0;
        qsort(TextData::ms_apkNode, v11, 0x10u, TextDataNodeComp);
      }
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A88690: using guessed type int ITableBase<TextDataType,TextData>::ms_pkTable;

//----- (0043DD90) --------------------------------------------------------
int __cdecl TextData2NodeComp(const void *p1, const void *p2)
{
  int result; // eax@2

  if ( *(_DWORD *)p1 >= *(_DWORD *)p2 )
    result = *(_DWORD *)p1 != *(_DWORD *)p2;
  else
    result = -1;
  return result;
}

//----- (0043DDC0) --------------------------------------------------------
void TextData2::BeforeTerminate()
{
  operator delete[](TextData2::ms_apkNode);
  TextData2::ms_apkNode = 0;
}

//----- (0043DDE0) --------------------------------------------------------
char TextData2::DataProcess()
{
  char result; // al@2
  int v2; // eax@3
  unsigned int v3; // ebx@4
  char *v4; // eax@5
  int v5; // edx@6
  int v6; // ecx@7
  unsigned int v7; // esi@11
  int v8; // edi@12
  char *v9; // eax@13
  int v10; // eax@16
  unsigned int v11; // eax@17

  if ( ITableBase<TextDataType2,TextData2>::ms_pkTable )
  {
    v2 = *(_DWORD *)(ITableBase<TextDataType2,TextData2>::ms_pkTable + 56);
    if ( v2 )
    {
      v3 = *(_DWORD *)(v2 + 40);
      if ( v3 )
      {
        v4 = (char *)operator new[](16 * v3);
        if ( v4 )
        {
          v5 = v3 - 1;
          if ( ((v3 - 1) & 0x80000000) == 0 )
          {
            v6 = (int)(v4 + 8);
            do
            {
              *(_DWORD *)(v6 - 4) = &unk_96F8EB;
              *(_DWORD *)v6 = &unk_96F8EB;
              *(_DWORD *)(v6 + 4) = &unk_96F8EB;
              v6 += 16;
              --v5;
            }
            while ( v5 >= 0 );
          }
        }
        else
        {
          v4 = 0;
        }
        v7 = 0;
        TextData2::ms_apkNode = v4;
        if ( v3 )
        {
          v8 = 0;
          do
          {
            v9 = CDataReader::GetRecord((CDataReader *)(ITableBase<TextDataType2,TextData2>::ms_pkTable + 4), v7);
            if ( v9 )
            {
              *(_DWORD *)((char *)TextData2::ms_apkNode + v8) = *(_DWORD *)v9;
              *(_DWORD *)((char *)TextData2::ms_apkNode + v8 + 4) = v9 + 68;
              *(_DWORD *)((char *)TextData2::ms_apkNode + v8 + 8) = v9 + 4;
              *(_DWORD *)((char *)TextData2::ms_apkNode + v8 + 12) = v9 + 36;
            }
            ++v7;
            v8 += 16;
          }
          while ( v7 < v3 );
        }
        v10 = *(_DWORD *)(ITableBase<TextDataType2,TextData2>::ms_pkTable + 56);
        if ( v10 )
          v11 = *(_DWORD *)(v10 + 40);
        else
          v11 = 0;
        qsort(TextData2::ms_apkNode, v11, 0x10u, TextData2NodeComp);
      }
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A88684: using guessed type int ITableBase<TextDataType2,TextData2>::ms_pkTable;

//----- (0043DED0) --------------------------------------------------------
int __cdecl TextData3NodeComp(const void *p1, const void *p2)
{
  int result; // eax@2

  if ( *(_DWORD *)p1 >= *(_DWORD *)p2 )
    result = *(_DWORD *)p1 != *(_DWORD *)p2;
  else
    result = -1;
  return result;
}

//----- (0043DF00) --------------------------------------------------------
void TextData3::BeforeTerminate()
{
  operator delete[](TextData3::ms_apkNode);
  TextData3::ms_apkNode = 0;
}

//----- (0043DF20) --------------------------------------------------------
char TextData3::DataProcess()
{
  char result; // al@2
  int v2; // eax@3
  unsigned int v3; // ebx@4
  char *v4; // eax@5
  int v5; // edx@6
  int v6; // ecx@7
  unsigned int v7; // esi@11
  int v8; // edi@12
  char *v9; // eax@13
  int v10; // eax@16
  unsigned int v11; // eax@17

  if ( ITableBase<TextDataType3,TextData3>::ms_pkTable )
  {
    v2 = *(_DWORD *)(ITableBase<TextDataType3,TextData3>::ms_pkTable + 56);
    if ( v2 )
    {
      v3 = *(_DWORD *)(v2 + 40);
      if ( v3 )
      {
        v4 = (char *)operator new[](16 * v3);
        if ( v4 )
        {
          v5 = v3 - 1;
          if ( ((v3 - 1) & 0x80000000) == 0 )
          {
            v6 = (int)(v4 + 8);
            do
            {
              *(_DWORD *)(v6 - 4) = &unk_96F8EB;
              *(_DWORD *)v6 = &unk_96F8EB;
              *(_DWORD *)(v6 + 4) = &unk_96F8EB;
              v6 += 16;
              --v5;
            }
            while ( v5 >= 0 );
          }
        }
        else
        {
          v4 = 0;
        }
        v7 = 0;
        TextData3::ms_apkNode = v4;
        if ( v3 )
        {
          v8 = 0;
          do
          {
            v9 = CDataReader::GetRecord((CDataReader *)(ITableBase<TextDataType3,TextData3>::ms_pkTable + 4), v7);
            if ( v9 )
            {
              *(_DWORD *)((char *)TextData3::ms_apkNode + v8) = *(_DWORD *)v9;
              *(_DWORD *)((char *)TextData3::ms_apkNode + v8 + 4) = v9 + 68;
              *(_DWORD *)((char *)TextData3::ms_apkNode + v8 + 8) = v9 + 4;
              *(_DWORD *)((char *)TextData3::ms_apkNode + v8 + 12) = v9 + 36;
            }
            ++v7;
            v8 += 16;
          }
          while ( v7 < v3 );
        }
        v10 = *(_DWORD *)(ITableBase<TextDataType3,TextData3>::ms_pkTable + 56);
        if ( v10 )
          v11 = *(_DWORD *)(v10 + 40);
        else
          v11 = 0;
        qsort(TextData3::ms_apkNode, v11, 0x10u, TextData3NodeComp);
      }
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A88680: using guessed type int ITableBase<TextDataType3,TextData3>::ms_pkTable;

//----- (0043E010) --------------------------------------------------------
bool __stdcall ProcessingString::IsRemovableCharacter(char ch)
{
  const char *v2; // ecx@2
  char v3; // al@2
  bool result; // al@4

  if ( bFilterTableInited )
  {
    result = acRemoveFilter[ch];
  }
  else
  {
    v2 = "`~!#$^&*()_+|-=\\[]{};':\",.<>/?";
    v3 = 96;
    do
    {
      ++v2;
      acRemoveFilter[v3] = 1;
      v3 = *v2;
    }
    while ( *v2 );
    result = acRemoveFilter[ch];
    bFilterTableInited = 1;
  }
  return result;
}

//----- (0043E070) --------------------------------------------------------
void __thiscall ProcessingString::ProcessingString(ProcessingString *this)
{
  this->m_acSource[0] = 0;
}

//----- (0043E080) --------------------------------------------------------
void __thiscall TextFilter::~TextFilter(TextFilter *this)
{
  char *v1; // ST00_4@1

  v1 = this->m_pcKeyStr;
  this->vfptr = (TextFilterVtbl *)&TextFilter::`vftable';
  operator delete[](v1);
}
// 97834C: using guessed type int (*TextFilter::`vftable')();

//----- (0043E0A0) --------------------------------------------------------
void __thiscall TextFilterReplace::~TextFilterReplace(TextFilterReplace *this)
{
  TextFilterReplace *v1; // esi@1
  char *v2; // ST04_4@1
  char *v3; // ST00_4@1

  v1 = this;
  v2 = this->m_pcAlternateStr;
  this->vfptr = (TextFilterVtbl *)&TextFilterReplace::`vftable';
  operator delete[](v2);
  v3 = v1->m_pcKeyStr;
  v1->vfptr = (TextFilterVtbl *)&TextFilter::`vftable';
  operator delete[](v3);
}
// 97834C: using guessed type int (*TextFilter::`vftable')();
// 978358: using guessed type void (__thiscall *TextFilterReplace::`vftable')(TextFilterReplace *this, ProcessingString *pkStr, char *pcFindPos, char *);

//----- (0043E0D0) --------------------------------------------------------
void __thiscall ProcessingString::Replace(ProcessingString *this, char *pcBasePos, char *pcKey, char *pcAlternate)
{
  ProcessingString *v4; // ebx@1
  char *v5; // edi@2
  char *v6; // esi@5
  char *v7; // edi@5
  char *v8; // ebx@5
  int v9; // ebx@5
  unsigned int v10; // edi@5
  char v11; // cl@13
  char *i; // eax@13
  char **v13; // ecx@15
  char v14; // dl@15
  char *v15; // eax@15
  char *v16; // esi@16
  char *j; // eax@19
  const char *v18; // [sp-10h] [bp-30h]@8
  const char *v19; // [sp-Ch] [bp-2Ch]@8
  char **v20; // [sp+8h] [bp-18h]@5
  char *pcSourceKeyEnd; // [sp+Ch] [bp-14h]@5
  int iShiftCount; // [sp+10h] [bp-10h]@5
  const char *v23; // [sp+14h] [bp-Ch]@1
  char *s1; // [sp+18h] [bp-8h]@5
  ProcessingString *v25; // [sp+1Ch] [bp-4h]@1

  v4 = this;
  v25 = this;
  v23 = this->m_acPreprocessed;
  if ( pcBasePos < this->m_acPreprocessed )
    return;
  v5 = (char *)this->m_apcMapToSource;
  if ( pcBasePos > (char *)this->m_apcMapToSource
    || &pcBasePos[strlen(pcAlternate)] > v5
    || &pcBasePos[strlen(pcKey)] > v5 )
  {
    return;
  }
  v6 = (char *)(pcBasePos - (char *)v4 - 512);
  v7 = v4->m_apcMapToSource[(_DWORD)v6];
  v20 = &v4->m_apcMapToSource[(_DWORD)v6];
  s1 = *v20;
  v8 = *(char **)&v4->m_acPreprocessed[4 * (_DWORD)&v6[strlen(pcKey)] + 508];
  pcSourceKeyEnd = v8;
  iShiftCount = (int)&v7[strlen(pcAlternate) - (_DWORD)v8 - 1];
  v9 = strlen(v23);
  v10 = strlen(pcKey);
  if ( v10 != v9 && _mbsncmp(s1, " ", 1u) )
  {
    if ( (signed int)&v6[v10] < v9 )
    {
      v19 = " ";
      v18 = v25->m_apcMapToSource[(_DWORD)&v6[v10]];
      goto LABEL_11;
    }
    if ( (signed int)(v6 - 1) > 0 )
    {
      v19 = " ";
      v18 = *(const char **)&v25->m_acPreprocessed[4 * (_DWORD)v6 + 508];
LABEL_11:
      if ( _mbsncmp(v18, v19, 1u) )
        return;
      goto LABEL_12;
    }
  }
LABEL_12:
  if ( iShiftCount )
  {
    v11 = pcSourceKeyEnd[1];
    for ( i = acTemp; v11; ++i )
    {
      *i = v11;
      v11 = i[pcSourceKeyEnd + 1 - acTemp + 1];
    }
    v13 = v20;
    *i = 0;
    v14 = acTemp[0];
    v15 = &pcSourceKeyEnd[iShiftCount + 1];
    if ( acTemp[0] )
    {
      v16 = (char *)(acTemp - v15);
      do
      {
        *v15 = v14;
        *v13 += iShiftCount;
        v14 = (v15++)[(_DWORD)v16 + 1];
        ++v13;
      }
      while ( v14 );
    }
    *v15 = 0;
  }
  for ( j = pcKey; *j; ++pcBasePos )
  {
    *pcBasePos = 32;
    ++j;
  }
  memcpy(s1, pcAlternate, strlen(pcAlternate));
}

//----- (0043E2C0) --------------------------------------------------------
void __stdcall ProcessingString::ClearOddStuff(char *string)
{
  unsigned int v2; // kr00_4@1
  signed int v3; // ebx@1
  signed int i; // edi@1
  unsigned int v5; // esi@2
  const char *v6; // eax@2
  char v7; // bl@3
  char repl[96]; // [sp+14h] [bp-C4h]@1
  char look[94]; // [sp+74h] [bp-64h]@1

  qmemcpy(look, &unk_978288, sizeof(look));
  qmemcpy(
    repl,
    "olbasbtbgalllllclsllasfsyecysloouqaaaaaaceeeeiiiidnoooooxouuuuydbaaaaaaceeeeiiiionoooooouuuuydy",
    sizeof(repl));
  v2 = strlen(look);
  v3 = v2;
  for ( i = 0; i < v3; ++i )
  {
    v5 = look[i];
    v6 = _mbschr(string, v5);
    if ( v6 )
    {
      v7 = repl[i];
      do
      {
        *v6 = v7;
        v6 = _mbschr(string, v5);
      }
      while ( v6 );
      v3 = v2;
    }
  }
}

//----- (0043E380) --------------------------------------------------------
void __thiscall ProcessingString::Preprocess(ProcessingString *this, char *pcSource, bool bPreprecess)
{
  ProcessingString *v3; // esi@1
  char *v4; // eax@2
  char *v5; // ebx@2
  int v6; // edi@2
  int v7; // [sp+8h] [bp-210h]@2
  char *pcSrcCopy; // [sp+10h] [bp-208h]@2
  char acSrcCopy[512]; // [sp+14h] [bp-204h]@2

  v3 = this;
  if ( (signed int)strlen(pcSource) < 512 )
  {
    strcpy(v3->m_acSource, pcSource);
    strcpy(acSrcCopy, pcSource);
    pcSrcCopy = acSrcCopy;
    v4 = v3->m_acPreprocessed;
    v7 = (int)v3->m_acPreprocessed;
    v5 = v3->m_acPreprocessed;
    v6 = (int)v3->m_apcMapToSource;
    if ( v3->m_acSource[0] )
    {
      do
      {
        if ( IsDBCSLeadByte(v3->m_acSource[0]) )
        {
          *(_WORD *)v5 = *(_WORD *)pcSrcCopy;
          *(_DWORD *)v6 = v3;
          *(_DWORD *)(v6 + 4) = (char *)v3 + 1;
          v5 += 2;
          v6 += 8;
          v3 = (ProcessingString *)((char *)v3 + 2);
          pcSrcCopy += 2;
        }
        else
        {
          if ( !bPreprecess || !ProcessingString::IsRemovableCharacter(v3->m_acSource[0]) )
          {
            *v5 = *pcSrcCopy;
            *(_DWORD *)v6 = v3;
            ++v5;
            v6 += 4;
          }
          v3 = (ProcessingString *)((char *)v3 + 1);
          ++pcSrcCopy;
        }
      }
      while ( v3->m_acSource[0] );
      v4 = (char *)v7;
    }
    *v5 = 0;
    _mbsupr(v4);
  }
}

//----- (0043E4A0) --------------------------------------------------------
void __thiscall TextFilter::TextFilter(TextFilter *this, char *pcKey)
{
  TextFilter *v2; // edi@1
  char *v3; // eax@3
  char *v4; // ecx@3
  char *v5; // edx@3
  char v6; // al@4

  v2 = this;
  this->vfptr = (TextFilterVtbl *)&TextFilter::`vftable';
  if ( pcKey )
  {
    v3 = (char *)operator new[](strlen(pcKey) + 1);
    v2->m_pcKeyStr = v3;
    v4 = pcKey;
    v5 = v3;
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    _mbsupr(v2->m_pcKeyStr);
  }
  else
  {
    this->m_pcKeyStr = 0;
  }
}
// 97834C: using guessed type int (*TextFilter::`vftable')();

//----- (0043E500) --------------------------------------------------------
void __thiscall TextFilter::Filter(TextFilter *this, ProcessingString *pkStr)
{
  TextFilter *v2; // edi@1
  char *v3; // edx@1
  char *v4; // eax@2
  int v5; // esi@2
  char v6; // cl@3
  const char *i; // esi@5
  int PatLen; // [sp+4h] [bp-4h]@4

  v2 = this;
  v3 = this->m_pcKeyStr;
  if ( v3 )
  {
    v4 = this->m_pcKeyStr;
    v5 = (int)(v3 + 1);
    do
      v6 = *v4++;
    while ( v6 );
    PatLen = (int)&v4[-v5];
    if ( (signed int)&v4[-v5] >= 1 )
    {
      for ( i = _mbsstr(pkStr->m_acPreprocessed, v3); i; i = _mbsstr(&i[PatLen], v2->m_pcKeyStr) )
        v2->vfptr->DoJob(v2, pkStr, (char *)i, v2->m_pcKeyStr);
    }
  }
}

//----- (0043E570) --------------------------------------------------------
void __thiscall TextFilterReplace::TextFilterReplace(TextFilterReplace *this, char *pcKey, char *pcAlternate)
{
  TextFilterReplace *v3; // esi@1
  char *v4; // eax@3
  char *v5; // ecx@3
  char *v6; // edx@3
  char v7; // al@4

  v3 = this;
  TextFilter::TextFilter((TextFilter *)&this->vfptr, pcKey);
  v3->vfptr = (TextFilterVtbl *)&TextFilterReplace::`vftable';
  if ( pcAlternate )
  {
    v4 = (char *)operator new[](strlen(pcAlternate) + 1);
    v3->m_pcAlternateStr = v4;
    v5 = pcAlternate;
    v6 = v4;
    do
    {
      v7 = *v5;
      *v6++ = *v5++;
    }
    while ( v7 );
  }
  else
  {
    v3->m_pcAlternateStr = 0;
  }
}
// 978358: using guessed type void (__thiscall *TextFilterReplace::`vftable')(TextFilterReplace *this, ProcessingString *pkStr, char *pcFindPos, char *);

//----- (0043E600) --------------------------------------------------------
void __thiscall TextFilterReplace::DoJob(TextFilterReplace *this, ProcessingString *pkStr, char *pcFindPos, char *pcKey)
{
  ProcessingString::Replace(pkStr, pcFindPos, pcKey, this->m_pcAlternateStr);
}

//----- (0043E620) --------------------------------------------------------
void __thiscall TextFilterSet::Terminate(TextFilterSet *this)
{
  TextFilterSet *v1; // esi@1
  NiTListItem<TextFilter *> *v2; // eax@2
  NiTListItem<TextFilter *> *v3; // ecx@2
  TextFilter *v4; // edi@5

  v1 = this;
  while ( v1->m_kTextFilterList.m_kAllocator.m_uiCount )
  {
    v2 = v1->m_kTextFilterList.m_pkTail;
    v3 = v2->m_pkPrev;
    v1->m_kTextFilterList.m_pkTail = v3;
    if ( v3 )
      v3->m_pkNext = 0;
    else
      v1->m_kTextFilterList.m_pkHead = 0;
    v4 = v2->m_element;
    v1->m_kTextFilterList.vfptr->DeleteItem((NiTListBase<DFALL<TextFilter *>,TextFilter *> *)v1, v2);
    --v1->m_kTextFilterList.m_kAllocator.m_uiCount;
    if ( v4 )
      ((void (__thiscall *)(_DWORD, _DWORD))v4->vfptr->~TextFilter)(v4, 1);
  }
}

//----- (0043E680) --------------------------------------------------------
ProcessingString *__thiscall TextFilterSet::Filter(TextFilterSet *this, char *pcSourceStr, bool bPreprecess)
{
  TextFilterSet *v3; // esi@1
  ProcessingString *v4; // edi@1
  NiTListItem<TextFilter *> *v5; // esi@1
  TextFilter *v6; // ecx@2

  v3 = this;
  v4 = &this->m_kPrcStr;
  ProcessingString::Preprocess(&this->m_kPrcStr, pcSourceStr, bPreprecess);
  v5 = v3->m_kTextFilterList.m_pkHead;
  while ( v5 )
  {
    v6 = v5->m_element;
    v5 = v5->m_pkNext;
    TextFilter::Filter(v6, v4);
  }
  return v4;
}

//----- (0043E6C0) --------------------------------------------------------
void __thiscall TextFilterSet::AddFilter(TextFilterSet *this, TextFilter *pkFilter)
{
  TextFilterSet *v2; // esi@1
  int v3; // eax@1
  _DWORD *v4; // ecx@1

  v2 = this;
  v3 = ((int (*)(void))this->m_kTextFilterList.vfptr->NewItem)();
  *(_DWORD *)(v3 + 8) = pkFilter;
  *(_DWORD *)v3 = 0;
  *(_DWORD *)(v3 + 4) = v2->m_kTextFilterList.m_pkTail;
  v4 = &v2->m_kTextFilterList.m_pkTail->m_pkNext;
  if ( v4 )
  {
    *v4 = v3;
    ++v2->m_kTextFilterList.m_kAllocator.m_uiCount;
    v2->m_kTextFilterList.m_pkTail = (NiTListItem<TextFilter *> *)v3;
  }
  else
  {
    ++v2->m_kTextFilterList.m_kAllocator.m_uiCount;
    v2->m_kTextFilterList.m_pkHead = (NiTListItem<TextFilter *> *)v3;
    v2->m_kTextFilterList.m_pkTail = (NiTListItem<TextFilter *> *)v3;
  }
}

//----- (0043E710) --------------------------------------------------------
void __thiscall TextFilterSet::~TextFilterSet(TextFilterSet *this)
{
  TextFilterSet *v1; // edi@1
  NiTListItem<TextFilter *> **v2; // esi@1
  NiTListItem<TextFilter *> *v3; // ST00_4@2

  v1 = this;
  TextFilterSet::Terminate(this);
  v1->m_kTextFilterList.vfptr = (NiTListBase<DFALL<TextFilter *>,TextFilter *>Vtbl *)&NiTPointerListBase<DFALL<TextFilter *>,TextFilter *>::`vftable';
  v2 = &v1->m_kTextFilterList.m_pkHead->m_pkNext;
  while ( v2 )
  {
    v3 = (NiTListItem<TextFilter *> *)v2;
    v2 = (NiTListItem<TextFilter *> **)*v2;
    v1->m_kTextFilterList.vfptr->DeleteItem((NiTListBase<DFALL<TextFilter *>,TextFilter *> *)v1, v3);
  }
  v1->m_kTextFilterList.m_kAllocator.m_uiCount = 0;
  v1->m_kTextFilterList.m_pkHead = 0;
  v1->m_kTextFilterList.m_pkTail = 0;
  v1->m_kTextFilterList.vfptr = (NiTListBase<DFALL<TextFilter *>,TextFilter *>Vtbl *)&NiTListBase<DFALL<TextFilter *>,TextFilter *>::`vftable';
}
// 978364: using guessed type int (__thiscall *NiTListBase<DFALL<TextFilter *>,TextFilter *>::`vftable')(void *p, char);
// 978374: using guessed type int (__thiscall *NiTPointerListBase<DFALL<TextFilter *>,TextFilter *>::`vftable')(void *p, char);

//----- (0043E7A0) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<TextFilter *>,TextFilter *>::~NiTListBase<DFALL<TextFilter *>,TextFilter *>(NiTListBase<DFALL<TextFilter *>,TextFilter *> *this)
{
  this->vfptr = (NiTListBase<DFALL<TextFilter *>,TextFilter *>Vtbl *)&NiTListBase<DFALL<TextFilter *>,TextFilter *>::`vftable';
}
// 978364: using guessed type int (__thiscall *NiTListBase<DFALL<TextFilter *>,TextFilter *>::`vftable')(void *p, char);

//----- (0043E7B0) --------------------------------------------------------
NiTListBase<DFALL<TextFilter *>,TextFilter *> *__thiscall NiTListBase<DFALL<TextFilter *>,TextFilter *>::`scalar deleting destructor'(NiTListBase<DFALL<TextFilter *>,TextFilter *> *this, unsigned int a2)
{
  NiTListBase<DFALL<TextFilter *>,TextFilter *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<TextFilter *>,TextFilter *>Vtbl *)&NiTListBase<DFALL<TextFilter *>,TextFilter *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 978364: using guessed type int (__thiscall *NiTListBase<DFALL<TextFilter *>,TextFilter *>::`vftable')(void *p, char);

//----- (0043E7E0) --------------------------------------------------------
TextFilter *__thiscall TextFilter::`scalar deleting destructor'(TextFilter *this, unsigned int a2)
{
  TextFilter *v2; // esi@1
  char *v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pcKeyStr;
  this->vfptr = (TextFilterVtbl *)&TextFilter::`vftable';
  operator delete[](v3);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97834C: using guessed type int (*TextFilter::`vftable')();

//----- (0043E810) --------------------------------------------------------
TextFilterReplace *__thiscall TextFilterReplace::`scalar deleting destructor'(TextFilterReplace *this, unsigned int a2)
{
  TextFilterReplace *v2; // esi@1
  char *v3; // ST04_4@1
  char *v4; // ST00_4@1

  v2 = this;
  v3 = this->m_pcAlternateStr;
  this->vfptr = (TextFilterVtbl *)&TextFilterReplace::`vftable';
  operator delete[](v3);
  v4 = v2->m_pcKeyStr;
  v2->vfptr = (TextFilterVtbl *)&TextFilter::`vftable';
  operator delete[](v4);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97834C: using guessed type int (*TextFilter::`vftable')();
// 978358: using guessed type void (__thiscall *TextFilterReplace::`vftable')(TextFilterReplace *this, ProcessingString *pkStr, char *pcFindPos, char *);

//----- (0043E850) --------------------------------------------------------
void __thiscall NiTList<TextFilter *>::~NiTList<TextFilter *>(NiTList<TextFilter *> *this)
{
  NiTList<TextFilter *> *v1; // edi@1
  NiTListItem<TextFilter *> *v2; // esi@1
  NiTListItem<TextFilter *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<DFALL<TextFilter *>,TextFilter *>Vtbl *)&NiTPointerListBase<DFALL<TextFilter *>,TextFilter *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<DFALL<TextFilter *>,TextFilter *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<DFALL<TextFilter *>,TextFilter *>Vtbl *)&NiTListBase<DFALL<TextFilter *>,TextFilter *>::`vftable';
}
// 978364: using guessed type int (__thiscall *NiTListBase<DFALL<TextFilter *>,TextFilter *>::`vftable')(void *p, char);
// 978374: using guessed type int (__thiscall *NiTPointerListBase<DFALL<TextFilter *>,TextFilter *>::`vftable')(void *p, char);

//----- (0043E8D0) --------------------------------------------------------
void __userpurge TextFilterTable::FilterEmotion_::_2_::TextFilterEmotion::TextFilterEmotion(char *pcEmotionCmd@<esi>, char *pcKey, char *pcKeya)
{
  _BYTE *v3; // eax@3
  char *v4; // ecx@3
  _BYTE *v5; // edx@3
  char v6; // al@4

  TextFilter::TextFilter((TextFilter *)pcKey, pcKeya);
  *(_DWORD *)pcKey = &`TextFilterTable::FilterEmotion'::`2'::TextFilterEmotion::`vftable';
  if ( pcEmotionCmd )
  {
    v3 = operator new[](strlen(pcEmotionCmd) + 1);
    *((_DWORD *)pcKey + 2) = v3;
    v4 = pcEmotionCmd;
    v5 = v3;
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
  }
  else
  {
    *((_DWORD *)pcKey + 2) = 0;
  }
}
// 978404: using guessed type int (__stdcall *`TextFilterTable::FilterEmotion'::`2'::TextFilterEmotion::`vftable')(ProcessingString *pkStr, char *pcFindPos, char *pcKey);

//----- (0043E970) --------------------------------------------------------
void __usercall TextFilterTable::FilterEmotion_::_2_::TextFilterEmotion::_TextFilterEmotion(TextFilter *a1@<esi>)
{
  TextFilterVtbl *v1; // ST00_4@1

  v1 = a1[1].vfptr;
  a1->vfptr = (TextFilterVtbl *)&`TextFilterTable::FilterEmotion'::`2'::TextFilterEmotion::`vftable';
  operator delete[](v1);
  TextFilter::~TextFilter(a1);
}
// 978404: using guessed type int (__stdcall *`TextFilterTable::FilterEmotion'::`2'::TextFilterEmotion::`vftable')(ProcessingString *pkStr, char *pcFindPos, char *pcKey);

//----- (0043E990) --------------------------------------------------------
int __cdecl TextFilterTable::IsForbiddenGuildName(char *pcName)
{
  unsigned int v1; // eax@3
  int result; // eax@5

  result = 1;
  if ( pcName )
  {
    if ( strcmp(pcName, (const char *)&unk_978392) )
    {
      v1 = strlen(pcName);
      if ( *pcName != 32 && pcName[v1 - 1] != 32 )
        result = 0;
    }
  }
  return result;
}

//----- (0043EA00) --------------------------------------------------------
void __thiscall TextFilterTable::FilterEmotion_::_2_::TextFilterEmotion::DoJob(ProcessingString *pkStr, char *pcFindPos, char *pcKey, char *pcKeya)
{
  char v4; // al@1
  ActionViewInfo *v5; // eax@3
  ProcessingString *v6; // [sp-2h] [bp-4h]@1

  v6 = pkStr;
  v4 = g_pkMainChar->m_byMode;
  if ( v4 != 4 && v4 != 5 )
  {
    v5 = ActionViewTable::GetByInxName(*(char **)&pkStr->m_acSource[8]);
    if ( v5 )
    {
      BYTE3(v6) = v5->nIndex;
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 8u, 0x20u, (char *)&v6 + 3, 1);
    }
  }
}

//----- (0043EA50) --------------------------------------------------------
bool __cdecl TextFilterTable::LoadSlanderFilter()
{
  char *v0; // eax@3
  bool result; // al@3

  if ( !Folder::m_bInit )
    Folder::Init();
  v0 = Folder::Merge(&Folder::m_acSystem, "SlanderFilter.shn");
  result = ITableBase<SlanderFilter,SlanderFilterTable>::Load(v0);
  if ( result )
  {
    if ( ITableBase<SlanderFilter,SlanderFilterTable>::ms_pkTable )
    {
      (**(void (***)(void))ITableBase<SlanderFilter,SlanderFilterTable>::ms_pkTable)();
      if ( ITableBase<SlanderFilter,SlanderFilterTable>::ms_pkTable )
        (*(void (__stdcall **)(signed int))(*(_DWORD *)ITableBase<SlanderFilter,SlanderFilterTable>::ms_pkTable + 8))(1);
      ITableBase<SlanderFilter,SlanderFilterTable>::ms_pkTable = 0;
    }
    result = 1;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;
// A8A068: using guessed type int ITableBase<SlanderFilter,SlanderFilterTable>::ms_pkTable;

//----- (0043EAB0) --------------------------------------------------------
ProcessingString *__cdecl TextFilterTable::FilterSlander(char *pcSlander)
{
  char *v1; // eax@6
  TextFilterReplace *v3; // eax@8
  TextFilter *v4; // eax@9
  unsigned int v5; // esi@11
  char *v6; // edi@12
  TextFilterReplace *v7; // eax@12
  TextFilter *v8; // eax@13

  if ( !(_S3 & 1) )
  {
    _S3 |= 1u;
    unk_A8A094 = 0;
    unk_A8A08C = 0;
    unk_A8A090 = 0;
    s_kTextFilterSet.m_kTextFilterList.vfptr = (NiTListBase<DFALL<TextFilter *>,TextFilter *>Vtbl *)&NiTList<TextFilter *>::`vftable';
    ProcessingString::ProcessingString(&stru_A8A098);
    atexit(TextFilterTable::FilterSlander_::_2_::_dynamic_atexit_destructor_for__s_kTextFilterSet__);
  }
  if ( !s_bInit )
  {
    s_bInit = 1;
    if ( !Folder::m_bInit )
      Folder::Init();
    v1 = Folder::Merge(&Folder::m_acSystem, "SlanderFilter.shn");
    if ( !ITableBase<SlanderFilter,SlanderFilterTable>::Load(v1) )
      return (ProcessingString *)pcSlander;
    v3 = (TextFilterReplace *)operator new(0xCu);
    if ( v3 )
      TextFilterReplace::TextFilterReplace(v3, "%s", "s");
    else
      v4 = 0;
    TextFilterSet::AddFilter(&s_kTextFilterSet, v4);
    v5 = 0;
    if ( ITableBase<SlanderFilter,SlanderFilterTable>::GetTotal() )
    {
      do
      {
        v6 = CDataReader::GetRecord((CDataReader *)(ITableBase<SlanderFilter,SlanderFilterTable>::ms_pkTable + 4), v5);
        v7 = (TextFilterReplace *)operator new(0xCu);
        if ( v7 )
          TextFilterReplace::TextFilterReplace(v7, v6, v6 + 32);
        else
          v8 = 0;
        TextFilterSet::AddFilter(&s_kTextFilterSet, v8);
        ++v5;
      }
      while ( v5 < ITableBase<SlanderFilter,SlanderFilterTable>::GetTotal() );
    }
    if ( ITableBase<SlanderFilter,SlanderFilterTable>::ms_pkTable )
    {
      (**(void (***)(void))ITableBase<SlanderFilter,SlanderFilterTable>::ms_pkTable)();
      if ( ITableBase<SlanderFilter,SlanderFilterTable>::ms_pkTable )
        (*(void (__stdcall **)(_DWORD))(*(_DWORD *)ITableBase<SlanderFilter,SlanderFilterTable>::ms_pkTable + 8))(1);
      ITableBase<SlanderFilter,SlanderFilterTable>::ms_pkTable = 0;
    }
  }
  return TextFilterSet::Filter(&s_kTextFilterSet, pcSlander, 1);
}
// 978440: using guessed type int (__thiscall *NiTList<TextFilter *>::`vftable')(void *p, char);
// A8975C: using guessed type bool Folder::m_bInit;
// A8A068: using guessed type int ITableBase<SlanderFilter,SlanderFilterTable>::ms_pkTable;

//----- (0043EC70) --------------------------------------------------------
void __cdecl TextFilterTable::FilterEmotion(char *pcEmotion)
{
  bool v1; // si@2
  char *v2; // eax@7
  unsigned int v3; // edi@8
  char *v4; // ebx@9
  char *v5; // eax@9
  TextFilter *v6; // eax@10

  if ( _S4 & 1 )
  {
    v1 = 0;
  }
  else
  {
    _S4 |= 1u;
    v1 = 0;
    unk_A8ACAC = 0;
    unk_A8ACA4 = 0;
    unk_A8ACA8 = 0;
    s_kTextFilterSet_0.m_kTextFilterList.vfptr = (NiTListBase<DFALL<TextFilter *>,TextFilter *>Vtbl *)&NiTList<TextFilter *>::`vftable';
    ProcessingString::ProcessingString(&stru_A8ACB0);
    atexit(TextFilterTable::FilterEmotion_::_3_::_dynamic_atexit_destructor_for__s_kTextFilterSet__);
  }
  if ( s_bInit_0 )
  {
LABEL_17:
    TextFilterSet::Filter(&s_kTextFilterSet_0, pcEmotion, v1);
    return;
  }
  s_bInit_0 = 1;
  if ( !Folder::m_bInit )
    Folder::Init();
  v2 = Folder::Merge(&Folder::m_acSystem, "EmotionFilter.shn");
  if ( ITableBase<EmotionFilter,EmotionFilterTable>::Load(v2) )
  {
    v3 = 0;
    if ( ITableBase<EmotionFilter,EmotionFilterTable>::GetTotal() )
    {
      do
      {
        v4 = CDataReader::GetRecord((CDataReader *)(ITableBase<EmotionFilter,EmotionFilterTable>::ms_pkTable + 4), v3);
        v5 = (char *)operator new(0xCu);
        if ( v5 )
        {
          TextFilterTable::FilterEmotion_::_2_::TextFilterEmotion::TextFilterEmotion(v4 + 32, v5, v4);
          v1 = 0;
        }
        else
        {
          v6 = 0;
        }
        TextFilterSet::AddFilter(&s_kTextFilterSet_0, v6);
        ++v3;
      }
      while ( v3 < ITableBase<EmotionFilter,EmotionFilterTable>::GetTotal() );
    }
    if ( ITableBase<EmotionFilter,EmotionFilterTable>::ms_pkTable )
    {
      (**(void (***)(void))ITableBase<EmotionFilter,EmotionFilterTable>::ms_pkTable)();
      if ( ITableBase<EmotionFilter,EmotionFilterTable>::ms_pkTable )
        (*(void (__stdcall **)(_DWORD))(*(_DWORD *)ITableBase<EmotionFilter,EmotionFilterTable>::ms_pkTable + 8))(1);
      ITableBase<EmotionFilter,EmotionFilterTable>::ms_pkTable = 0;
    }
    goto LABEL_17;
  }
}
// 978440: using guessed type int (__thiscall *NiTList<TextFilter *>::`vftable')(void *p, char);
// A8975C: using guessed type bool Folder::m_bInit;
// A8A06C: using guessed type int ITableBase<EmotionFilter,EmotionFilterTable>::ms_pkTable;

//----- (0043EDE0) --------------------------------------------------------
char __cdecl TextFilterTable::IsBadName(char *pcName)
{
  char *v1; // eax@4
  unsigned int v3; // esi@7
  char *v4; // eax@8
  unsigned int v5; // esi@10
  char *v6; // eax@11
  int v7; // ecx@11

  if ( s_bInit_1 )
  {
LABEL_9:
    if ( !s_bBadNameLoaded )
      return 1;
    goto LABEL_10;
  }
  s_bInit_1 = 1;
  if ( !Folder::m_bInit )
    Folder::Init();
  v1 = Folder::Merge(&Folder::m_acSystem, "BadNameFilter.shn");
  if ( !ITableBase<BadNameFilter,BadNameFilterTable>::Load(v1) )
  {
    s_bBadNameLoaded = 0;
    return 1;
  }
  s_bBadNameLoaded = 1;
  v3 = 0;
  if ( ITableBase<BadNameFilter,BadNameFilterTable>::GetTotal() )
  {
    do
    {
      v4 = CDataReader::GetRecord((CDataReader *)(ITableBase<BadNameFilter,BadNameFilterTable>::ms_pkTable + 4), v3);
      _mbsupr(v4);
      ++v3;
    }
    while ( v3 < ITableBase<BadNameFilter,BadNameFilterTable>::GetTotal() );
    goto LABEL_9;
  }
LABEL_10:
  strcpy(s_acCapitalizedName, pcName);
  _mbsupr(s_acCapitalizedName);
  v5 = 0;
  if ( ITableBase<BadNameFilter,BadNameFilterTable>::GetTotal() )
  {
    do
    {
      v6 = CDataReader::GetRecord((CDataReader *)(ITableBase<BadNameFilter,BadNameFilterTable>::ms_pkTable + 4), v5);
      v7 = *((_DWORD *)v6 + 8);
      if ( v7 )
      {
        if ( v7 == 1 && _mbsstr(s_acCapitalizedName, v6) )
          return 1;
      }
      else if ( !_mbsicmp(pcName, v6) )
      {
        return 1;
      }
      ++v5;
    }
    while ( v5 < ITableBase<BadNameFilter,BadNameFilterTable>::GetTotal() );
  }
  return 0;
}
// A8975C: using guessed type bool Folder::m_bInit;
// A8A070: using guessed type int ITableBase<BadNameFilter,BadNameFilterTable>::ms_pkTable;

//----- (0043EF00) --------------------------------------------------------
char __cdecl TextFilterTable::IsBlockedID(char *pcID)
{
  unsigned int v1; // esi@1
  std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *v2; // edi@1
  _BYTE *v3; // eax@2
  const char *v4; // eax@4
  char result; // al@10
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strTemp; // [sp+10h] [bp-2Ch]@1
  int v7; // [sp+38h] [bp-4h]@1

  v1 = 15;
  strTemp._Myres = 15;
  strTemp._Mysize = 0;
  strTemp._Bx._Buf[0] = 0;
  v2 = TextFilterTable::ms_listBlockedID._Myhead->_Next;
  v7 = 0;
  if ( v2 == TextFilterTable::ms_listBlockedID._Myhead )
  {
LABEL_10:
    result = 0;
  }
  else
  {
    while ( 1 )
    {
      v3 = strTemp._Bx._Ptr;
      strTemp._Mysize = 0;
      if ( v1 < 0x10 )
        v3 = &strTemp;
      *v3 = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strTemp, &v2->_Myval, 0, 0xFFFFFFFF);
      v1 = strTemp._Myres;
      v4 = strTemp._Bx._Ptr;
      if ( strTemp._Myres < 0x10 )
        v4 = (const char *)&strTemp;
      if ( !strcmp(v4, pcID) )
        break;
      v2 = v2->_Next;
      if ( v2 == TextFilterTable::ms_listBlockedID._Myhead )
      {
        if ( strTemp._Myres >= 0x10 )
          operator delete(strTemp._Bx._Ptr);
        goto LABEL_10;
      }
    }
    if ( strTemp._Myres >= 0x10 )
      operator delete(strTemp._Bx._Ptr);
    result = 1;
  }
  return result;
}

//----- (0043F000) --------------------------------------------------------
void __cdecl TextFilterTable::DelFromBlockedID(char *pcTargetID)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val_arg; // [sp+8h] [bp-2Ch]@2
  int v2; // [sp+30h] [bp-4h]@2

  if ( TextFilterTable::IsBlockedID(pcTargetID) )
  {
    _Val_arg._Myres = 15;
    _Val_arg._Mysize = 0;
    _Val_arg._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &_Val_arg,
      pcTargetID,
      strlen(pcTargetID));
    v2 = 0;
    std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::remove(
      &TextFilterTable::ms_listBlockedID,
      &_Val_arg);
    if ( _Val_arg._Myres >= 0x10 )
      operator delete(_Val_arg._Bx._Ptr);
  }
}

//----- (0043F0B0) --------------------------------------------------------
void __cdecl TextFilterTable::SaveBlockedID()
{
  const char *v0; // eax@3
  _iobuf *v1; // edi@3
  std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *v2; // esi@5
  _BYTE *v3; // eax@6
  char *v4; // eax@8
  char *v5; // edx@10
  char v6; // cl@11
  int ntotal; // [sp+10h] [bp-50h]@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strTemp; // [sp+14h] [bp-4Ch]@5
  char temp[32]; // [sp+30h] [bp-30h]@8
  int v10; // [sp+5Ch] [bp-4h]@5

  if ( !Folder::m_bInit )
    Folder::Init();
  v0 = fs("%s\\blist.shd", &Folder::m_acSystem);
  v1 = fopen(v0, "wb");
  if ( v1 )
  {
    ntotal = TextFilterTable::ms_listBlockedID._Mysize;
    if ( (signed int)TextFilterTable::ms_listBlockedID._Mysize > 0 )
    {
      fwrite(&ntotal, 4u, 1u, v1);
      strTemp._Myres = 15;
      strTemp._Mysize = 0;
      strTemp._Bx._Buf[0] = 0;
      v2 = TextFilterTable::ms_listBlockedID._Myhead->_Next;
      v10 = 0;
      if ( v2 != TextFilterTable::ms_listBlockedID._Myhead )
      {
        do
        {
          v3 = strTemp._Bx._Ptr;
          strTemp._Mysize = 0;
          if ( strTemp._Myres < 0x10 )
            v3 = &strTemp;
          *v3 = 0;
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
            &strTemp,
            &v2->_Myval,
            0,
            0xFFFFFFFF);
          *(_DWORD *)temp = 0;
          *(_DWORD *)&temp[4] = 0;
          *(_DWORD *)&temp[8] = 0;
          *(_DWORD *)&temp[12] = 0;
          *(_DWORD *)&temp[16] = 0;
          *(_DWORD *)&temp[20] = 0;
          *(_DWORD *)&temp[24] = 0;
          *(_DWORD *)&temp[28] = 0;
          v4 = strTemp._Bx._Ptr;
          if ( strTemp._Myres < 0x10 )
            v4 = (char *)&strTemp;
          v5 = (char *)(temp - v4);
          do
          {
            v6 = *v4;
            v4[(_DWORD)v5] = *v4;
            ++v4;
          }
          while ( v6 );
          fwrite(temp, 0x20u, 1u, v1);
          v2 = v2->_Next;
        }
        while ( v2 != TextFilterTable::ms_listBlockedID._Myhead );
        if ( strTemp._Myres >= 0x10 )
          operator delete(strTemp._Bx._Ptr);
      }
    }
    fclose(v1);
  }
  std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>>>::clear(&TextFilterTable::ms_listBlockedID);
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0043F210) --------------------------------------------------------
void __cdecl TextFilterTable::AddToBlockedID(char *pcTargetID)
{
  std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *v1; // esi@3
  std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *v2; // esi@7
  std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *v3; // ST04_4@7
  std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *v4; // eax@7
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+10h] [bp-2Ch]@7
  int v6; // [sp+38h] [bp-4h]@7

  if ( TextFilterTable::IsBlockedID(pcTargetID) != 1 )
  {
    if ( TextFilterTable::ms_listBlockedID._Mysize >= 0x64 )
    {
      v1 = TextFilterTable::ms_listBlockedID._Myhead->_Next;
      if ( TextFilterTable::ms_listBlockedID._Myhead->_Next != TextFilterTable::ms_listBlockedID._Myhead )
      {
        v1->_Prev->_Next = v1->_Next;
        v1->_Next->_Prev = v1->_Prev;
        if ( v1->_Myval._Myres >= 0x10 )
          operator delete(v1->_Myval._Bx._Ptr);
        v1->_Myval._Myres = 15;
        v1->_Myval._Mysize = 0;
        v1->_Myval._Bx._Buf[0] = 0;
        operator delete(v1);
        --TextFilterTable::ms_listBlockedID._Mysize;
      }
    }
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, pcTargetID, strlen(pcTargetID));
    v2 = TextFilterTable::ms_listBlockedID._Myhead;
    v3 = TextFilterTable::ms_listBlockedID._Myhead->_Prev;
    v6 = 0;
    v4 = std::_List_val<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::_Buynode(
           TextFilterTable::ms_listBlockedID._Myhead,
           v3,
           &_Val);
    if ( 153391688 - TextFilterTable::ms_listBlockedID._Mysize < 1 )
      std::_Xlength_error("list<T> too long");
    ++TextFilterTable::ms_listBlockedID._Mysize;
    v2->_Prev = v4;
    v4->_Prev->_Next = v4;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
  }
}

//----- (0043F340) --------------------------------------------------------
void __cdecl TextFilterTable::LoadBlockedID()
{
  const char *v0; // eax@3
  _iobuf *v1; // eax@3
  _iobuf *v2; // edi@3
  unsigned int v3; // kr00_4@7
  std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *v4; // esi@8
  std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *v5; // ST14_4@8
  std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *v6; // eax@8
  int i; // [sp+10h] [bp-54h]@6
  int totalcnt; // [sp+14h] [bp-50h]@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+18h] [bp-4Ch]@8
  char temp[32]; // [sp+34h] [bp-30h]@7
  int v11; // [sp+60h] [bp-4h]@8

  std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>>>::clear(&TextFilterTable::ms_listBlockedID);
  if ( !Folder::m_bInit )
    Folder::Init();
  v0 = fs("%s\\blist.shd", &Folder::m_acSystem);
  v1 = fopen(v0, "rb");
  v2 = v1;
  if ( v1 )
  {
    fseek(v1, 0, 2);
    if ( ftell(v2) )
    {
      fseek(v2, 0, 0);
      fread(&totalcnt, 4u, 1u, v2);
      if ( totalcnt < 100 )
      {
        for ( i = 0; i < totalcnt; ++i )
        {
          *(_DWORD *)temp = 0;
          *(_DWORD *)&temp[4] = 0;
          *(_DWORD *)&temp[8] = 0;
          *(_DWORD *)&temp[12] = 0;
          *(_DWORD *)&temp[16] = 0;
          *(_DWORD *)&temp[20] = 0;
          *(_DWORD *)&temp[24] = 0;
          *(_DWORD *)&temp[28] = 0;
          fread(temp, 0x20u, 1u, v2);
          v3 = strlen(temp);
          if ( v3 )
          {
            _Val._Myres = 15;
            _Val._Mysize = 0;
            _Val._Bx._Buf[0] = 0;
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, temp, v3);
            v4 = TextFilterTable::ms_listBlockedID._Myhead;
            v5 = TextFilterTable::ms_listBlockedID._Myhead->_Prev;
            v11 = 0;
            v6 = std::_List_val<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::_Buynode(
                   TextFilterTable::ms_listBlockedID._Myhead,
                   v5,
                   &_Val);
            if ( 153391688 - TextFilterTable::ms_listBlockedID._Mysize < 1 )
              std::_Xlength_error("list<T> too long");
            ++TextFilterTable::ms_listBlockedID._Mysize;
            v4->_Prev = v6;
            v6->_Prev->_Next = v6;
            v11 = -1;
            if ( _Val._Myres >= 0x10 )
              operator delete(_Val._Bx._Ptr);
          }
        }
      }
    }
    fclose(v2);
  }
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0043F4E0) --------------------------------------------------------
TextFilterTable::FilterEmotion::__l2::TextFilterEmotion *__thiscall `TextFilterTable::FilterEmotion'::`2'::TextFilterEmotion::`scalar deleting destructor'(TextFilterTable::FilterEmotion::__l2::TextFilterEmotion *this, unsigned int a2)
{
  TextFilterTable::FilterEmotion::__l2::TextFilterEmotion *v2; // esi@1
  char *v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pcEmotionCmd;
  this->vfptr = (TextFilterVtbl *)&`TextFilterTable::FilterEmotion'::`2'::TextFilterEmotion::`vftable';
  operator delete[](v3);
  TextFilter::~TextFilter((TextFilter *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 978404: using guessed type int (__stdcall *`TextFilterTable::FilterEmotion'::`2'::TextFilterEmotion::`vftable')(ProcessingString *pkStr, char *pcFindPos, char *pcKey);

//----- (0043F520) --------------------------------------------------------
unsigned int __cdecl ITableBase<ActionViewInfo,ActionViewTable>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;

//----- (0043F540) --------------------------------------------------------
unsigned int __cdecl ITableBase<SlanderFilter,SlanderFilterTable>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<SlanderFilter,SlanderFilterTable>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8A068: using guessed type int ITableBase<SlanderFilter,SlanderFilterTable>::ms_pkTable;

//----- (0043F560) --------------------------------------------------------
unsigned int __cdecl ITableBase<BadNameFilter,BadNameFilterTable>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<BadNameFilter,BadNameFilterTable>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8A070: using guessed type int ITableBase<BadNameFilter,BadNameFilterTable>::ms_pkTable;

//----- (0043F580) --------------------------------------------------------
unsigned int __cdecl ITableBase<EmotionFilter,EmotionFilterTable>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<EmotionFilter,EmotionFilterTable>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8A06C: using guessed type int ITableBase<EmotionFilter,EmotionFilterTable>::ms_pkTable;

//----- (0043F5A0) --------------------------------------------------------
ActionViewInfo *__cdecl ActionViewTable::GetByInxName(char *pcInxName)
{
  unsigned int v1; // edi@3
  ActionViewInfo *result; // eax@6

  if ( pcInxName && *pcInxName )
  {
    v1 = 0;
    if ( ITableBase<ActionViewInfo,ActionViewTable>::GetTotal() )
    {
      while ( strcmp(
                CDataReader::GetRecord((CDataReader *)(ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable + 4), v1)
              + 1,
                pcInxName) )
      {
        if ( ++v1 >= ITableBase<ActionViewInfo,ActionViewTable>::GetTotal() )
          goto LABEL_6;
      }
      result = (ActionViewInfo *)CDataReader::GetRecord(
                                   (CDataReader *)(ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable + 4),
                                   v1);
    }
    else
    {
LABEL_6:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;

//----- (0043F630) --------------------------------------------------------
NiTPointerListBase<DFALL<TextFilter *>,TextFilter *> *__thiscall NiTList<TextFilter *>::`scalar deleting destructor'(NiTPointerListBase<DFALL<TextFilter *>,TextFilter *> *this, unsigned int a2)
{
  NiTPointerListBase<DFALL<TextFilter *>,TextFilter *> *v2; // edi@1
  NiTListItem<TextFilter *> *v3; // esi@1
  NiTListItem<TextFilter *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<TextFilter *>,TextFilter *>Vtbl *)&NiTPointerListBase<DFALL<TextFilter *>,TextFilter *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<DFALL<TextFilter *>,TextFilter *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<TextFilter *>,TextFilter *>Vtbl *)&NiTListBase<DFALL<TextFilter *>,TextFilter *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 978364: using guessed type int (__thiscall *NiTListBase<DFALL<TextFilter *>,TextFilter *>::`vftable')(void *p, char);
// 978374: using guessed type int (__thiscall *NiTPointerListBase<DFALL<TextFilter *>,TextFilter *>::`vftable')(void *p, char);

//----- (0043F6C0) --------------------------------------------------------
BOOL __cdecl std::operator==<char,std::char_traits<char>,std::allocator<char>>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Left, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Right)
{
  const char *v2; // eax@1

  v2 = (const char *)_Right;
  if ( _Right->_Myres >= 0x10 )
    v2 = _Right->_Bx._Ptr;
  return std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
           _Left,
           0,
           _Left->_Mysize,
           v2,
           _Right->_Mysize) == 0;
}

//----- (0043F6F0) --------------------------------------------------------
void __thiscall SlanderFilterTable::SlanderFilterTable(SlanderFilterTable *this)
{
  SlanderFilterTable *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<SlanderFilter,SlanderFilterTable>Vtbl *)&ITableBase<SlanderFilter,SlanderFilterTable>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<SlanderFilter,SlanderFilterTable>::ITableBase<SlanderFilter,SlanderFilterTable>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<SlanderFilter,SlanderFilterTable>::ITableBase<SlanderFilter,SlanderFilterTable>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_SlanderFilter_SlanderFilterTable_::ITableBase_SlanderFilter_SlanderFilterTable__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<SlanderFilter,SlanderFilterTable>Vtbl *)&SlanderFilterTable::`vftable';
}
// 978410: using guessed type int (__cdecl *ITableBase<SlanderFilter,SlanderFilterTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 978450: using guessed type int (__cdecl *SlanderFilterTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;
// A8A078: using guessed type int `ITableBase<SlanderFilter,SlanderFilterTable>::ITableBase<SlanderFilter,SlanderFilterTable>'::`2'::`local static guard';

//----- (0043F730) --------------------------------------------------------
SlanderFilterTable *__thiscall SlanderFilterTable::`vector deleting destructor'(SlanderFilterTable *this, unsigned int a2)
{
  SlanderFilterTable *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<SlanderFilter,SlanderFilterTable>Vtbl *)&ITableBase<SlanderFilter,SlanderFilterTable>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 978410: using guessed type int (__cdecl *ITableBase<SlanderFilter,SlanderFilterTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (0043F7B0) --------------------------------------------------------
void __thiscall EmotionFilterTable::EmotionFilterTable(EmotionFilterTable *this)
{
  EmotionFilterTable *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<EmotionFilter,EmotionFilterTable>Vtbl *)&ITableBase<EmotionFilter,EmotionFilterTable>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<EmotionFilter,EmotionFilterTable>::ITableBase<EmotionFilter,EmotionFilterTable>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<EmotionFilter,EmotionFilterTable>::ITableBase<EmotionFilter,EmotionFilterTable>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_EmotionFilter_EmotionFilterTable_::ITableBase_EmotionFilter_EmotionFilterTable__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<EmotionFilter,EmotionFilterTable>Vtbl *)&EmotionFilterTable::`vftable';
}
// 978430: using guessed type int (__cdecl *ITableBase<EmotionFilter,EmotionFilterTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 978460: using guessed type int (__cdecl *EmotionFilterTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8A078: using guessed type int `ITableBase<SlanderFilter,SlanderFilterTable>::ITableBase<SlanderFilter,SlanderFilterTable>'::`2'::`local static guard';
// A8A07C: using guessed type int `ITableBase<EmotionFilter,EmotionFilterTable>::ITableBase<EmotionFilter,EmotionFilterTable>'::`2'::`local static guard';

//----- (0043F7F0) --------------------------------------------------------
EmotionFilterTable *__thiscall EmotionFilterTable::`scalar deleting destructor'(EmotionFilterTable *this, unsigned int a2)
{
  EmotionFilterTable *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<EmotionFilter,EmotionFilterTable>Vtbl *)&ITableBase<EmotionFilter,EmotionFilterTable>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 978430: using guessed type int (__cdecl *ITableBase<EmotionFilter,EmotionFilterTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (0043F870) --------------------------------------------------------
bool __cdecl ITableBase<SlanderFilter,SlanderFilterTable>::Load(char *acFn)
{
  int v1; // eax@1
  SlanderFilterTable *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<SlanderFilter,SlanderFilterTable>::ms_pkTable;
  if ( !ITableBase<SlanderFilter,SlanderFilterTable>::ms_pkTable )
  {
    v2 = (SlanderFilterTable *)operator new(0xC4u);
    if ( v2 )
      SlanderFilterTable::SlanderFilterTable(v2);
    else
      v1 = 0;
    ITableBase<SlanderFilter,SlanderFilterTable>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<SlanderFilter,SlanderFilterTable>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<SlanderFilter,SlanderFilterTable>::ms_pkTable + 56)) != 0
    && *v3 == 44 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<SlanderFilter,SlanderFilterTable>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<SlanderFilter,SlanderFilterTable>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8A068: using guessed type int ITableBase<SlanderFilter,SlanderFilterTable>::ms_pkTable;

//----- (0043F950) --------------------------------------------------------
bool __cdecl ITableBase<EmotionFilter,EmotionFilterTable>::Load(char *acFn)
{
  int v1; // eax@1
  EmotionFilterTable *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<EmotionFilter,EmotionFilterTable>::ms_pkTable;
  if ( !ITableBase<EmotionFilter,EmotionFilterTable>::ms_pkTable )
  {
    v2 = (EmotionFilterTable *)operator new(0xC4u);
    if ( v2 )
      EmotionFilterTable::EmotionFilterTable(v2);
    else
      v1 = 0;
    ITableBase<EmotionFilter,EmotionFilterTable>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<EmotionFilter,EmotionFilterTable>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<EmotionFilter,EmotionFilterTable>::ms_pkTable + 56)) != 0
    && *v3 == 44 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<EmotionFilter,EmotionFilterTable>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<EmotionFilter,EmotionFilterTable>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8A06C: using guessed type int ITableBase<EmotionFilter,EmotionFilterTable>::ms_pkTable;

//----- (0043FA30) --------------------------------------------------------
void __thiscall BadNameFilterTable::BadNameFilterTable(BadNameFilterTable *this)
{
  BadNameFilterTable *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<BadNameFilter,BadNameFilterTable>Vtbl *)&ITableBase<BadNameFilter,BadNameFilterTable>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<BadNameFilter,BadNameFilterTable>::ITableBase<BadNameFilter,BadNameFilterTable>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<BadNameFilter,BadNameFilterTable>::ITableBase<BadNameFilter,BadNameFilterTable>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_BadNameFilter_BadNameFilterTable_::ITableBase_BadNameFilter_BadNameFilterTable__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<BadNameFilter,BadNameFilterTable>Vtbl *)&BadNameFilterTable::`vftable';
}
// 978420: using guessed type int (__cdecl *ITableBase<BadNameFilter,BadNameFilterTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 978470: using guessed type int (__cdecl *BadNameFilterTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8A080: using guessed type int `ITableBase<BadNameFilter,BadNameFilterTable>::ITableBase<BadNameFilter,BadNameFilterTable>'::`2'::`local static guard';

//----- (0043FA70) --------------------------------------------------------
BadNameFilterTable *__thiscall BadNameFilterTable::`scalar deleting destructor'(BadNameFilterTable *this, unsigned int a2)
{
  BadNameFilterTable *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<BadNameFilter,BadNameFilterTable>Vtbl *)&ITableBase<BadNameFilter,BadNameFilterTable>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 978420: using guessed type int (__cdecl *ITableBase<BadNameFilter,BadNameFilterTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (0043FAF0) --------------------------------------------------------
bool __cdecl ITableBase<BadNameFilter,BadNameFilterTable>::Load(char *acFn)
{
  int v1; // eax@1
  BadNameFilterTable *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<BadNameFilter,BadNameFilterTable>::ms_pkTable;
  if ( !ITableBase<BadNameFilter,BadNameFilterTable>::ms_pkTable )
  {
    v2 = (BadNameFilterTable *)operator new(0xC4u);
    if ( v2 )
      BadNameFilterTable::BadNameFilterTable(v2);
    else
      v1 = 0;
    ITableBase<BadNameFilter,BadNameFilterTable>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<BadNameFilter,BadNameFilterTable>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<BadNameFilter,BadNameFilterTable>::ms_pkTable + 56)) != 0
    && *v3 == 18 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<BadNameFilter,BadNameFilterTable>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<BadNameFilter,BadNameFilterTable>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8A070: using guessed type int ITableBase<BadNameFilter,BadNameFilterTable>::ms_pkTable;

//----- (0043FBD0) --------------------------------------------------------
void __thiscall std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::remove(std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Val_arg)
{
  std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *v2; // ebx@1
  std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *v3; // edi@1
  const char *v4; // edx@2
  const char *v5; // eax@2
  unsigned int v6; // esi@4
  unsigned int v7; // ecx@4
  std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *v8; // eax@11
  std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *v9; // esi@11
  std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *_Phead; // [sp+10h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+14h] [bp-2Ch]@1

  v2 = this;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, _Val_arg, 0, 0xFFFFFFFF);
  v3 = v2->_Myhead->_Next;
  _Phead = v2->_Myhead;
  while ( v3 != _Phead )
  {
    v4 = _Val._Bx._Ptr;
    v5 = v3->_Myval._Bx._Buf;
    if ( _Val._Myres < 0x10 )
      v4 = (const char *)&_Val;
    v6 = v3->_Myval._Mysize;
    v7 = _Val._Mysize;
    if ( v6 < _Val._Mysize )
      v7 = v3->_Myval._Mysize;
    if ( v3->_Myval._Myres >= 0x10 )
      v5 = *(const char **)v5;
    if ( std::char_traits<char>::compare(v5, v4, v7) || v6 < _Val._Mysize || v6 != _Val._Mysize )
    {
      v3 = v3->_Next;
    }
    else
    {
      v8 = v3->_Prev;
      v9 = v3;
      v3 = v3->_Next;
      v8->_Next = v3;
      v3->_Prev = v8;
      if ( v9->_Myval._Myres >= 0x10 )
        operator delete(v9->_Myval._Bx._Ptr);
      v9->_Myval._Myres = 15;
      v9->_Myval._Mysize = 0;
      v9->_Myval._Bx._Buf[0] = 0;
      operator delete(v9);
      --v2->_Mysize;
    }
  }
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
}

//----- (0043FD00) --------------------------------------------------------
std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *__stdcall std::_List_val<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::_Buynode(std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *_Next, std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *_Prev, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Val)
{
  void *v4; // esi@1
  std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *v5; // edx@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v6; // ecx@2
  int v8; // [sp+0h] [bp-30h]@1
  std::exception pExceptionObject; // [sp+10h] [bp-20h]@5
  void *p; // [sp+1Ch] [bp-14h]@1
  int *v11; // [sp+20h] [bp-10h]@1
  int v12; // [sp+2Ch] [bp-4h]@2

  v11 = &v8;
  v4 = operator new(0x24u);
  p = v4;
  if ( !v4 )
  {
    _Next = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Next);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v5 = _Prev;
  *(_DWORD *)v4 = _Next;
  v6 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)v4 + 8);
  v12 = 0;
  *((_DWORD *)v4 + 1) = v5;
  _Next = (std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *)((char *)v4 + 8);
  _Prev = (std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *)((char *)v4 + 8);
  LOBYTE(v12) = 1;
  if ( v4 != (void *)-8 )
  {
    *((_DWORD *)v4 + 6) = 0;
    *((_DWORD *)v4 + 7) = 15;
    v6->_Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(v6, _Val, 0, 0xFFFFFFFF);
  }
  return (std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *)v4;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0043FDE0) --------------------------------------------------------
void __thiscall TextScreenWin::Start(TextScreenWin *this, const char *pcText)
{
  TextScreenWin *v2; // esi@1
  PgWinText *v3; // ecx@1
  bool v4; // sf@4
  double v5; // st7@4

  v2 = this;
  v3 = this->m_spText.m_pObject;
  if ( v3 )
    ((void (__stdcall *)(const char *))v3->vfptr[118].__vecDelDtor)(pcText);
  if ( v2->m_bIsCinematic )
  {
    v4 = ((PgWin::ms_uiScreenHeight - 180) & 0x80000000) != 0;
    v5 = (double)(signed int)(PgWin::ms_uiScreenHeight - 180);
  }
  else
  {
    v5 = (double)(signed int)PgWin::ms_uiScreenHeight;
    v4 = (PgWin::ms_uiScreenHeight & 0x80000000) != 0;
  }
  if ( v4 )
    v5 = v5 + 4294967300.0;
  v2->m_fTextYPos = v5;
  v2->m_bEnd = 0;
}

//----- (0043FE50) --------------------------------------------------------
void __thiscall TextScreenWin::UpdateMeWin(TextScreenWin *this, float fTime)
{
  TextScreenWin *v2; // esi@1
  PgWinText *v3; // edi@2
  double v4; // st7@6
  tagSIZE kSize; // [sp+4h] [bp-8h]@3

  v2 = this;
  if ( !this->m_bEnd )
  {
    v3 = this->m_spText.m_pObject;
    if ( v3 )
    {
      v3->vfptr[44].__vecDelDtor((NiRefObject *)v3, (signed int)this->m_fTextYPos);
      ((void (__stdcall *)(tagSIZE *))v2->m_spText.m_pObject->vfptr[123].__vecDelDtor)(&kSize);
    }
    if ( v2->m_bIsCinematic )
    {
      kSize.cy = PgWin::ms_uiScreenHeight - 180;
      v2->m_fTextYPos = (double)(PgWin::ms_uiScreenHeight - 180);
    }
    else
    {
      v4 = v2->m_fTextYPos;
      kSize.cy = -kSize.cy;
      if ( (double)kSize.cy >= v4 )
        v2->m_bEnd = 1;
      else
        v2->m_fTextYPos = v2->m_fTextYPos - 0.5;
    }
  }
}

//----- (0043FF10) --------------------------------------------------------
bool __thiscall TextScreenEffect::IsEnd(TextScreenEffect *this)
{
  TextScreenWin *v1; // eax@1
  bool result; // al@2

  v1 = this->m_spTextScreenWin.m_pObject;
  if ( v1 )
    result = v1->m_bEnd;
  else
    result = 0;
  return result;
}

//----- (0043FF30) --------------------------------------------------------
void __thiscall TextScreenEffect::UpdateTextScreen(TextScreenEffect *this, float fCurTime)
{
  TextScreenWin *v2; // eax@1

  v2 = this->m_spTextScreenWin.m_pObject;
  if ( v2 )
  {
    if ( v2->m_bEnd )
    {
      this->m_eSchedule = 0;
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
    }
  }
}

//----- (0043FF60) --------------------------------------------------------
void __thiscall TextScreenWin::TextScreenWin(TextScreenWin *this)
{
  TextScreenWin *v1; // esi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&TextScreenWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&TextScreenWin::`vftable'{for `IDirectMessenger'};
  v1->m_spText.m_pObject = 0;
  v1->m_fTextYPos = 0.0;
  *(_WORD *)&v1->m_bEnd = 0;
}
// 9784B8: using guessed type void (__thiscall *TextScreenWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9784D4: using guessed type int (__thiscall *TextScreenWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0043FFA0) --------------------------------------------------------
void __thiscall TextScreenWin::~TextScreenWin(TextScreenWin *this)
{
  TextScreenWin *v1; // esi@1
  PgWinText *v2; // edi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&TextScreenWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&TextScreenWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spText.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  PgWin::~PgWin((PgWin *)&v1->vfptr);
}
// 9784B8: using guessed type void (__thiscall *TextScreenWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9784D4: using guessed type int (__thiscall *TextScreenWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00440030) --------------------------------------------------------
char __usercall TextScreenWin::Create@<al>(TextScreenWin *this@<ecx>, int a2@<ebx>)
{
  TextScreenWin *v2; // esi@1
  unsigned int v3; // edi@1
  char result; // al@1
  PgFont *v5; // eax@2
  PgWinText *v6; // eax@2
  PgWinText *v7; // ebx@2
  PgWinText *v8; // eax@10
  float v9; // ST5C_4@10
  NiSourceTexture *v10; // ebx@10
  int v11; // [sp-4h] [bp-10h]@2
  PgWinText *v12; // [sp+8h] [bp-4h]@2

  v2 = this;
  v3 = PgWin::ms_uiScreenHeight >> 2;
  result = PgWin::Create((PgWin *)&this->vfptr, 0, 0, 1u, 1u, 0, 0, 0);
  if ( result )
  {
    v11 = a2;
    v5 = Font::Get(LARGEBOLD);
    v6 = PgWinText::CreateWin(0, 0, PgWin::ms_uiScreenWidth, PgWin::ms_uiScreenHeight, v5, (PgWin *)&v2->vfptr, 0, 0);
    v7 = v2->m_spText.m_pObject;
    v12 = v6;
    if ( v7 != v6 )
    {
      if ( v7 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
        v6 = v12;
      }
      v2->m_spText.m_pObject = v6;
      if ( v6 )
        InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
    }
    ((void (__stdcall *)(signed int, int))v2->m_spText.m_pObject->vfptr[122].__vecDelDtor)(1, v11);
    v8 = v2->m_spText.m_pObject;
    v9 = (double)PgWin::ms_uiScreenHeight;
    v2->m_fTextYPos = v9;
    ((void (__thiscall *)(PgWinText *))v8->vfptr[44].__vecDelDtor)(v2->m_spText.m_pObject);
    v10 = PgUtil::Create1PixelSourceTexture(0, 0, 0, -56);
    PgWinSpr::CreateWin(v10, 0, 0, PgWin::ms_uiScreenWidth, v3, (PgWin *)&v2->vfptr, 0, 0);
    PgWinSpr::CreateWin(v10, 0, 3 * v3, PgWin::ms_uiScreenWidth, v3, (PgWin *)&v2->vfptr, 0, 0);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
    result = 1;
  }
  return result;
}
// 440030: could not find valid save-restore pair for ebx

//----- (00440180) --------------------------------------------------------
void __thiscall TextScreenEffect::~TextScreenEffect(TextScreenEffect *this)
{
  TextScreenEffect *v1; // ebx@1
  TextScreenWin *v2; // esi@1
  NiScreenElements *v3; // esi@5
  int v4; // esi@9
  NiTListItem<int> **v5; // edi@9
  NiTListItem<int> **v6; // ST00_4@10

  v1 = this;
  this->vfptr = (Singleton<TextScreenEffect>Vtbl *)&TextScreenEffect::`vftable';
  v2 = this->m_spTextScreenWin.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_spFadeScreen.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v4 = (int)&v1->m_kListSchedule;
  v1->m_kListSchedule.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,int>Vtbl *)&PgTList<int>::`vftable';
  v5 = &v1->m_kListSchedule.m_pkHead->m_pkNext;
  while ( v5 )
  {
    v6 = v5;
    v5 = (NiTListItem<int> **)*v5;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v4 + 8))(&v1->m_kListSchedule, v6);
  }
  v1->m_kListSchedule.m_kAllocator.m_uiCount = 0;
  v1->m_kListSchedule.m_pkHead = 0;
  v1->m_kListSchedule.m_pkTail = 0;
  *(_DWORD *)v4 = &NiTListBase<NiTPointerAllocator<unsigned int>,int>::`vftable';
  v1->vfptr = (Singleton<TextScreenEffect>Vtbl *)&Singleton<TextScreenEffect>::`vftable';
  if ( Singleton<TextScreenEffect>::m_pInstance )
  {
    ((void (__stdcall *)(_DWORD))Singleton<TextScreenEffect>::m_pInstance->vfptr->__vecDelDtor)(1);
    Singleton<TextScreenEffect>::m_pInstance = 0;
  }
  Singleton<TextScreenEffect>::m_bDestroy = 1;
}
// 978480: using guessed type int (__thiscall *Singleton<TextScreenEffect>::`vftable')(void *p, char);
// 978488: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,int>::`vftable')(void *p, char);
// 9784A8: using guessed type int (__thiscall *PgTList<int>::`vftable')(void *p, char);
// 9786A0: using guessed type int (__thiscall *TextScreenEffect::`vftable')(void *p, char);
// A8B94C: using guessed type char Singleton<TextScreenEffect>::m_bDestroy;

//----- (00440290) --------------------------------------------------------
void __thiscall TextScreenEffect::Stop(TextScreenEffect *this)
{
  TextScreenEffect *v1; // ebx@1
  NiTListItem<int> *v2; // edi@1
  NiTListItem<int> *v3; // ST00_4@2
  NiScreenElements *v4; // esi@3
  TextScreenWin *v5; // esi@9

  v1 = this;
  this->m_eSchedule = 0;
  v2 = this->m_kListSchedule.m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->m_kListSchedule.vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,int> *)&v1->m_kListSchedule,
      v3);
  }
  v1->m_kListSchedule.m_kAllocator.m_uiCount = 0;
  v1->m_kListSchedule.m_pkHead = 0;
  v1->m_kListSchedule.m_pkTail = 0;
  v1->m_fStartTime = 0.0;
  v1->m_fFadeTime = 0.0;
  v4 = v1->m_spFadeScreen.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spFadeScreen.m_pObject = 0;
  }
  if ( v1->m_spTextScreenWin.m_pObject )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_spTextScreenWin.m_pObject->vfptr);
    v5 = v1->m_spTextScreenWin.m_pObject;
    if ( v5 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
      v1->m_spTextScreenWin.m_pObject = 0;
    }
  }
}

//----- (00440330) --------------------------------------------------------
void __thiscall TextScreenEffect::Draw(TextScreenEffect *this, NiRenderer *pkRenderer)
{
  TextScreenEffect *v2; // esi@1
  NiAVObject *v3; // ST04_4@3
  NiScreenElements *v4; // ecx@9
  NiVisibleArray kWinVisible; // [sp+10h] [bp-B4h]@3
  PgWinCamera *pkCamera; // [sp+20h] [bp-A4h]@2
  PgWinCullingProcess kWinCuller; // [sp+24h] [bp-A0h]@3
  int v8; // [sp+C0h] [bp-4h]@3

  v2 = this;
  if ( this->m_eSchedule == 2 )
  {
    pkCamera = (PgWinCamera *)pkScreenCamera;
    if ( !pkScreenCamera )
      return;
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&this->m_spTextScreenWin.m_pObject->vfptr);
    kWinVisible.m_ppkArray = 0;
    kWinVisible.m_uiCurrentSize = 0;
    kWinVisible.m_uiAllocatedSize = 0;
    kWinVisible.m_uiGrowBy = 1024;
    NiVisibleArray::SetAllocatedSize(&kWinVisible, 0x400u);
    v8 = 0;
    PgWinCullingProcess::PgWinCullingProcess(&kWinCuller, &kWinVisible);
    v3 = (NiAVObject *)&v2->m_spTextScreenWin.m_pObject->vfptr;
    LOBYTE(v8) = 1;
    NiDrawScene((NiCamera *)&pkCamera->vfptr, v3, (NiCullingProcess *)&kWinCuller.vfptr, 0);
    LOBYTE(v8) = 0;
    PgWinCullingProcess::~PgWinCullingProcess(&kWinCuller);
    v8 = -1;
    operator delete(kWinVisible.m_ppkArray);
  }
  if ( pkRenderer )
  {
    if ( (pkRenderer->m_eFrameState == 1 || pkRenderer->m_eOffScreenFrameState == 1)
      && pkRenderer->m_bRenderTargetGroupActive == 1 )
    {
      pkRenderer->vfptr[71].__vecDelDtor((NiRefObject *)pkRenderer, 0);
    }
    v4 = v2->m_spFadeScreen.m_pObject;
    if ( v4 )
      NiScreenElements::Draw(v4, pkRenderer);
  }
}

//----- (00440470) --------------------------------------------------------
void __thiscall TextScreenEffect::UpdateFade(TextScreenEffect *this, float fCurTime)
{
  double v2; // st7@5
  float *v3; // edx@6
  float *v4; // edx@11
  NiScreenElements *v5; // eax@16
  NiColorA Color; // [sp+0h] [bp-18h]@3
  float v7; // [sp+10h] [bp-8h]@6
  float v8; // [sp+14h] [bp-4h]@6

  fCurTime = (fCurTime - this->m_fStartTime) / this->m_fFadeTime;
  if ( fCurTime < 1.0 )
  {
    Color = NiColorA::BLACK;
    if ( this->m_eSchedule == 1 )
    {
      v4 = &v7;
      v7 = 0.0;
      v8 = 1.0;
      if ( fCurTime >= 0.0 )
        v4 = &fCurTime;
      if ( *v4 >= 1.0 )
        v4 = &v8;
      v2 = *v4 + 0.0;
    }
    else if ( this->m_eSchedule == 3 )
    {
      v3 = &v8;
      v8 = 0.0;
      v7 = 1.0;
      if ( fCurTime >= 0.0 )
        v3 = &fCurTime;
      if ( *v3 >= 1.0 )
        v3 = &v7;
      v2 = 1.0 - *v3;
    }
    else
    {
      v2 = 0.0;
    }
    v5 = this->m_spFadeScreen.m_pObject;
    Color.a = v2;
    if ( v5 )
      NiScreenElementsData::SetColors((NiScreenElementsData *)v5->m_spModelData.m_pObject, 0, &Color);
  }
  else
  {
    this->m_eSchedule = 0;
  }
}
// A7D128: using guessed type const struct NiColorA NiColorA::BLACK;

//----- (00440560) --------------------------------------------------------
void __thiscall TextScreenEffect::AddSchedule(TextScreenEffect *this, int eSchedule)
{
  char *v2; // esi@1
  NiTListItem<int> *v3; // eax@1
  NiTListItem<int> **v4; // ecx@1

  v2 = (char *)&this->m_kListSchedule;
  v3 = this->m_kListSchedule.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,int> *)&this->m_kListSchedule);
  v3->m_element = eSchedule;
  v3->m_pkNext = 0;
  v3->m_pkPrev = (NiTListItem<int> *)*((_DWORD *)v2 + 2);
  v4 = (NiTListItem<int> **)*((_DWORD *)v2 + 2);
  if ( v4 )
  {
    *v4 = v3;
    ++*((_DWORD *)v2 + 3);
    *((_DWORD *)v2 + 2) = v3;
  }
  else
  {
    ++*((_DWORD *)v2 + 3);
    *((_DWORD *)v2 + 1) = v3;
    *((_DWORD *)v2 + 2) = v3;
  }
}

//----- (004405C0) --------------------------------------------------------
char __thiscall TextScreenEffect::InitFadeScreen(TextScreenEffect *this)
{
  TextScreenEffect *v1; // edi@1
  NiScreenElements *v2; // ebx@1
  NiScreenElements *v3; // esi@2
  NiScreenElementsData *v4; // eax@3
  NiScreenElementsData *v5; // eax@4
  NiScreenElements *v6; // eax@6
  NiScreenElements *v7; // esi@7
  NiScreenElements *v8; // eax@14
  NiObjectNET *v10; // eax@16
  NiObjectNET *v11; // esi@16
  NiObjectNET *v12; // eax@20
  NiObjectNET *v13; // esi@20

  v1 = this;
  v2 = 0;
  if ( !this->m_spFadeScreen.m_pObject )
  {
    v3 = (NiScreenElements *)operator new(0xC4u);
    if ( v3 )
    {
      v4 = (NiScreenElementsData *)operator new(0x70u);
      if ( v4 )
        NiScreenElementsData::NiScreenElementsData(v4, 0, 1, 0, 1, 1, 4, 1, 2, 1);
      else
        v5 = 0;
      NiScreenElements::NiScreenElements(v3, v5);
      v2 = v6;
    }
    v7 = v1->m_spFadeScreen.m_pObject;
    if ( v7 != v2 )
    {
      if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      v1->m_spFadeScreen.m_pObject = v2;
      if ( v2 )
        InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
    }
    v8 = v1->m_spFadeScreen.m_pObject;
    if ( !v8 )
      return 0;
    NiScreenElementsData::Insert((NiScreenElementsData *)v8->m_spModelData.m_pObject, 4u, 0, 0);
    NiScreenElementsData::SetRectangle(
      (NiScreenElementsData *)v1->m_spFadeScreen.m_pObject->m_spModelData.m_pObject,
      0,
      0.0,
      0.0,
      1.0,
      1.0);
    NiScreenElementsData::UpdateBound((NiScreenElementsData *)v1->m_spFadeScreen.m_pObject->m_spModelData.m_pObject);
    v10 = (NiObjectNET *)operator new(0x28u);
    v11 = v10;
    if ( v10 )
    {
      NiObjectNET::NiObjectNET(v10);
      v11->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
      LOWORD(v11[1].vfptr) = 0;
      v11[1].m_uiRefCount = 0;
      v11[1].m_pcName = (char *)1;
    }
    else
    {
      v11 = 0;
    }
    if ( !v11 )
      return 0;
    v11[1].m_uiRefCount = 1;
    v11[1].m_pcName = 0;
    NiAVObject::AttachProperty((NiAVObject *)&v1->m_spFadeScreen.m_pObject->vfptr, (NiProperty *)v11);
    v12 = (NiObjectNET *)operator new(0x20u);
    v13 = v12;
    if ( v12 )
    {
      NiObjectNET::NiObjectNET(v12);
      v13->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
      LOWORD(v13[1].vfptr) = 236;
      BYTE2(v13[1].vfptr) = 0;
    }
    else
    {
      v13 = 0;
    }
    if ( !v13 )
      return 0;
    LOWORD(v13[1].vfptr) = (unsigned int)v13[1].vfptr & 0xFEED | 0xED;
    NiAVObject::AttachProperty((NiAVObject *)&v1->m_spFadeScreen.m_pObject->vfptr, (NiProperty *)v13);
    NiAVObject::UpdateProperties((NiAVObject *)&v1->m_spFadeScreen.m_pObject->vfptr);
  }
  return 1;
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);

//----- (004407D0) --------------------------------------------------------
void __thiscall TextScreenEffect::Update(TextScreenEffect *this, float fCurTime)
{
  TextScreenEffect *v2; // esi@1
  char *v3; // eax@2
  NiTListItem<int> *v4; // ecx@3
  TextScreenWin *v5; // eax@7
  PgWin *v6; // ST00_4@9

  v2 = this;
  if ( this->m_kListSchedule.m_kAllocator.m_uiCount )
  {
    v3 = (char *)&this->m_eSchedule;
    if ( !this->m_eSchedule )
    {
      v4 = this->m_kListSchedule.m_pkHead;
      if ( !v4 )
        return;
      *(_DWORD *)v3 = v4->m_element;
      NiTPointerListBase<DFALL<AttackSequence *>,AttackSequence *>::Remove(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *> *)&v2->m_kListSchedule,
        (NiLight *const *)&v2->m_eSchedule);
      v2->m_fStartTime = fCurTime;
    }
  }
  switch ( v2->m_eSchedule )
  {
    case 1:
    case 3:
      TextScreenEffect::UpdateFade(v2, fCurTime);
      break;
    case 2:
      v5 = v2->m_spTextScreenWin.m_pObject;
      if ( v5 )
      {
        if ( v5->m_bEnd )
        {
          v6 = (PgWin *)&v2->m_spTextScreenWin.m_pObject->vfptr;
          v2->m_eSchedule = 0;
          PgWinMgr::CloseWin(&Pgg_kWinMgr, v6);
        }
      }
      break;
    case 4:
      TextScreenEffect::Stop(v2);
      break;
    default:
      return;
  }
}

//----- (00440870) --------------------------------------------------------
void __thiscall TextScreenEffect::TextScreenEffect(TextScreenEffect *this)
{
  this->vfptr = (Singleton<TextScreenEffect>Vtbl *)&TextScreenEffect::`vftable';
  this->m_eSchedule = 0;
  this->m_kListSchedule.m_kAllocator.m_uiCount = 0;
  this->m_kListSchedule.m_pkHead = 0;
  this->m_kListSchedule.m_pkTail = 0;
  this->m_kListSchedule.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,int>Vtbl *)&PgTList<int>::`vftable';
  this->m_fStartTime = 0.0;
  this->m_fFadeTime = 0.0;
  this->m_spFadeScreen.m_pObject = 0;
  this->m_spTextScreenWin.m_pObject = 0;
}
// 9784A8: using guessed type int (__thiscall *PgTList<int>::`vftable')(void *p, char);
// 9786A0: using guessed type int (__thiscall *TextScreenEffect::`vftable')(void *p, char);

//----- (004408A0) --------------------------------------------------------
TextScreenWin *__cdecl TextScreenWin::CreateWin()
{
  PgWin *v0; // eax@1
  PgWin *v1; // esi@1
  PgWin *v2; // edi@8
  TextScreenWin *v3; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v5; // [sp+20h] [bp-4h]@1

  v0 = (PgWin *)operator new(0x12Cu);
  v1 = v0;
  result.m_pObject = v0;
  v5 = 0;
  if ( v0 )
  {
    PgWin::PgWin(v0);
    v1->vfptr = (NiRefObjectVtbl *)&TextScreenWin::`vftable'{for `NiNode'};
    v1->vfptr = (IDirectMessengerVtbl *)&TextScreenWin::`vftable'{for `IDirectMessenger'};
    v1[1].vfptr = 0;
    *(float *)&v1[1].m_uiRefCount = 0.0;
    LOWORD(v1[1].m_pcName) = 0;
  }
  else
  {
    v1 = 0;
  }
  if ( v1 )
    InterlockedIncrement((volatile LONG *)&v1->m_uiRefCount);
  v5 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v1);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *))v1->vfptr[113].__vecDelDtor)(v1) )
  {
    ((void (__thiscall *)(PgWin *))v1->vfptr[89].__vecDelDtor)(v1);
    v5 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
      v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
    v3 = (TextScreenWin *)v1;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v1);
    if ( result.m_pObject )
    {
      v2 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v2 )
          v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
      }
    }
    v5 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
      v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
    v3 = 0;
  }
  return v3;
}
// 9784B8: using guessed type void (__thiscall *TextScreenWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9784D4: using guessed type int (__thiscall *TextScreenWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004409F0) --------------------------------------------------------
bool __thiscall TextScreenEffect::InitWin(TextScreenEffect *this)
{
  TextScreenEffect *v1; // ebx@1
  bool result; // al@2
  TextScreenWin *v3; // eax@3
  TextScreenWin *v4; // esi@3
  TextScreenWin *v5; // edi@3

  v1 = this;
  if ( this->m_spTextScreenWin.m_pObject )
  {
    result = 1;
  }
  else
  {
    v3 = TextScreenWin::CreateWin();
    v4 = v1->m_spTextScreenWin.m_pObject;
    v5 = v3;
    if ( v4 != v3 )
    {
      if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      v1->m_spTextScreenWin.m_pObject = v5;
      if ( v5 )
        InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
    }
    result = v1->m_spTextScreenWin.m_pObject != 0;
  }
  return result;
}

//----- (00440A50) --------------------------------------------------------
void __thiscall TextScreenEffect::Start(TextScreenEffect *this, const char *pcText, float fCurTime, float fFadeTime, bool isCinematic)
{
  TextScreenEffect *v5; // esi@1
  TextScreenWin *v6; // eax@3

  v5 = this;
  if ( TextScreenEffect::InitWin(this) && TextScreenEffect::InitFadeScreen(v5) )
  {
    v6 = v5->m_spTextScreenWin.m_pObject;
    if ( v6 )
    {
      v6->m_bIsCinematic = isCinematic;
      TextScreenWin::Start(v5->m_spTextScreenWin.m_pObject, pcText);
    }
    v5->m_fStartTime = fCurTime;
    v5->m_fFadeTime = fFadeTime;
    NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *>::RemoveAll((NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *> *)&v5->m_kListSchedule);
    v5->m_eSchedule = 0;
  }
}

//----- (00440AB0) --------------------------------------------------------
void __thiscall Singleton<TextScreenEffect>::~Singleton<TextScreenEffect>(Singleton<TextScreenEffect> *this)
{
  this->vfptr = (Singleton<TextScreenEffect>Vtbl *)&Singleton<TextScreenEffect>::`vftable';
  if ( Singleton<TextScreenEffect>::m_pInstance )
  {
    ((void (__stdcall *)(_DWORD))Singleton<TextScreenEffect>::m_pInstance->vfptr->__vecDelDtor)(1);
    Singleton<TextScreenEffect>::m_pInstance = 0;
  }
  Singleton<TextScreenEffect>::m_bDestroy = 1;
}
// 978480: using guessed type int (__thiscall *Singleton<TextScreenEffect>::`vftable')(void *p, char);
// A8B94C: using guessed type char Singleton<TextScreenEffect>::m_bDestroy;

//----- (00440AE0) --------------------------------------------------------
Singleton<TextScreenEffect> *__thiscall Singleton<TextScreenEffect>::`vector deleting destructor'(Singleton<TextScreenEffect> *this, unsigned int a2)
{
  Singleton<TextScreenEffect> *v2; // esi@1

  v2 = this;
  this->vfptr = (Singleton<TextScreenEffect>Vtbl *)&Singleton<TextScreenEffect>::`vftable';
  if ( Singleton<TextScreenEffect>::m_pInstance )
  {
    ((void (__stdcall *)(_DWORD))Singleton<TextScreenEffect>::m_pInstance->vfptr->__vecDelDtor)(1);
    Singleton<TextScreenEffect>::m_pInstance = 0;
  }
  Singleton<TextScreenEffect>::m_bDestroy = 1;
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 978480: using guessed type int (__thiscall *Singleton<TextScreenEffect>::`vftable')(void *p, char);
// A8B94C: using guessed type char Singleton<TextScreenEffect>::m_bDestroy;

//----- (00440B30) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,int>::~NiTListBase<NiTPointerAllocator<unsigned int>,int>(NiTListBase<NiTPointerAllocator<unsigned int>,int> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,int>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,int>::`vftable';
}
// 978488: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,int>::`vftable')(void *p, char);

//----- (00440B40) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,int> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,int>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,int> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,int> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,int>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,int>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 978488: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,int>::`vftable')(void *p, char);

//----- (00440B70) --------------------------------------------------------
void __thiscall NiTPointerList<int>::~NiTPointerList<int>(NiTPointerList<int> *this)
{
  NiTPointerList<int> *v1; // edi@1
  NiTListItem<int> *v2; // esi@1
  NiTListItem<int> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,int>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,int>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,int> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,int>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,int>::`vftable';
}
// 978488: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,int>::`vftable')(void *p, char);
// 978498: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,int>::`vftable')(void *p, char);

//----- (00440BF0) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,int> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,int>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,int> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,int> *v2; // edi@1
  NiTListItem<int> *v3; // esi@1
  NiTListItem<int> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,int>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,int>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,int> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,int>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,int>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 978488: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,int>::`vftable')(void *p, char);
// 978498: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,int>::`vftable')(void *p, char);

//----- (00440C80) --------------------------------------------------------
void __thiscall PgTList<int>::~PgTList<int>(PgTList<int> *this)
{
  PgTList<int> *v1; // edi@1
  NiTListItem<int> *v2; // esi@1
  NiTListItem<int> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,int>Vtbl *)&PgTList<int>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,int> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,int>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,int>::`vftable';
}
// 978488: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,int>::`vftable')(void *p, char);
// 9784A8: using guessed type int (__thiscall *PgTList<int>::`vftable')(void *p, char);

//----- (00440D00) --------------------------------------------------------
PgTList<int> *__thiscall PgTList<int>::`vector deleting destructor'(PgTList<int> *this, unsigned int a2)
{
  PgTList<int> *v2; // edi@1
  NiTListItem<int> *v3; // esi@1
  NiTListItem<int> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,int>Vtbl *)&PgTList<int>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,int> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,int>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,int>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 978488: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,int>::`vftable')(void *p, char);
// 9784A8: using guessed type int (__thiscall *PgTList<int>::`vftable')(void *p, char);

//----- (00440D90) --------------------------------------------------------
TextScreenWin *__thiscall TextScreenWin::`vector deleting destructor'(TextScreenWin *this, unsigned int a2)
{
  TextScreenWin *v2; // esi@1
  PgWinText *v3; // edi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&TextScreenWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&TextScreenWin::`vftable'{for `IDirectMessenger'};
  v3 = this->m_spText.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  PgWin::~PgWin((PgWin *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9784B8: using guessed type void (__thiscall *TextScreenWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9784D4: using guessed type int (__thiscall *TextScreenWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00440E30) --------------------------------------------------------
TextScreenEffect *__thiscall TextScreenEffect::`scalar deleting destructor'(TextScreenEffect *this, unsigned int a2)
{
  TextScreenEffect *v2; // esi@1

  v2 = this;
  TextScreenEffect::~TextScreenEffect(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00440E60) --------------------------------------------------------
int __cdecl Timer::GetHour(long double Sec)
{
  return (signed int)(Sec / 3600.0);
}

//----- (00440E80) --------------------------------------------------------
int __cdecl Timer::GetDay(long double Sec)
{
  return (signed int)(Sec / 86400.0);
}

//----- (00440EA0) --------------------------------------------------------
int __cdecl Timer::GetMin(long double Sec)
{
  return (signed int)(Sec / 60.0);
}

//----- (00440EC0) --------------------------------------------------------
bool __cdecl Timer::TimeCheck(tm *kTime)
{
  int v1; // ecx@4
  int v2; // ecx@6
  int v3; // ecx@8
  int v4; // ecx@10
  int v5; // ecx@12
  int v6; // eax@14
  bool result; // al@16

  result = 0;
  if ( kTime )
  {
    if ( kTime->tm_sec >= 0 && kTime->tm_sec <= 59 )
    {
      v1 = kTime->tm_min;
      if ( v1 >= 0 && v1 <= 59 )
      {
        v2 = kTime->tm_hour;
        if ( v2 >= 0 && v2 <= 23 )
        {
          v3 = kTime->tm_mday;
          if ( v3 >= 1 && v3 <= 31 )
          {
            v4 = kTime->tm_mon;
            if ( v4 >= 0 && v4 <= 31 )
            {
              v5 = kTime->tm_wday;
              if ( v5 >= 0 && v5 <= 6 )
              {
                v6 = kTime->tm_yday;
                if ( v6 >= 0 && v6 <= 365 )
                  result = 1;
              }
            }
          }
        }
      }
    }
  }
  return result;
}

//----- (00440F30) --------------------------------------------------------
char __thiscall Tutorial::SetLockItemSell(Tutorial *this, bool b)
{
  this->m_bLockItemSell = b;
  return 1;
}

//----- (00440F40) --------------------------------------------------------
char __thiscall Tutorial::SetLockItemShop(Tutorial *this, bool b)
{
  this->m_bLockItemShop = b;
  return 1;
}

//----- (00440F50) --------------------------------------------------------
char __thiscall Tutorial::SetLockSkillShop(Tutorial *this, bool b)
{
  this->m_bLockSkillShop = b;
  return 1;
}

//----- (00440F60) --------------------------------------------------------
char __thiscall Tutorial::SetLockItemShopTab(Tutorial *this, bool b)
{
  this->m_bLockItemShopTab = b;
  return 1;
}

//----- (00440F70) --------------------------------------------------------
char __thiscall Tutorial::SetLockSkillShopTab(Tutorial *this, bool b)
{
  this->m_bLockSkillShopTab = b;
  return 1;
}

//----- (00440F80) --------------------------------------------------------
char __thiscall Tutorial::SetHideQuestGiveUp(Tutorial *this, bool b)
{
  this->m_bHideQuestGiveUp = b;
  return 1;
}

//----- (00440F90) --------------------------------------------------------
void __thiscall Tutorial::SetBoxAnnounceMsg(Tutorial *this, const char *pcMsg)
{
  BoxAnnounceWin *v2; // ecx@1

  v2 = this->m_pkBoxAnnounceWin;
  if ( v2 )
    BoxAnnounceWin::SetMsg(v2, pcMsg);
}

//----- (00440FB0) --------------------------------------------------------
void __thiscall Tutorial::InitMobKillCount(Tutorial *this, unsigned __int16 kMobID, unsigned int uiMobCount)
{
  MobKillCountWin *v3; // ecx@1

  v3 = this->m_pkMobKillCountWin;
  if ( v3 )
    MobKillCountWin::Init(v3, kMobID, uiMobCount);
}

//----- (00440FD0) --------------------------------------------------------
void __thiscall Tutorial::AddMobKillCount(Tutorial *this)
{
  MobKillCountWin *v1; // ecx@1

  v1 = this->m_pkMobKillCountWin;
  if ( v1 )
    MobKillCountWin::AddCount(v1);
}

//----- (00440FE0) --------------------------------------------------------
bool __thiscall Tutorial::IsEndMobKillCount(Tutorial *this)
{
  MobKillCountWin *v1; // ecx@1
  bool result; // al@2

  v1 = this->m_pkMobKillCountWin;
  if ( v1 )
    result = MobKillCountWin::IsEnd(v1);
  else
    result = 0;
  return result;
}

//----- (00441000) --------------------------------------------------------
void __thiscall Tutorial::Terminate(Tutorial *this)
{
  Tutorial *v1; // esi@1
  NiNode *v2; // edi@2

  v1 = this;
  *(_DWORD *)&this->m_bEnable = 0;
  *(_DWORD *)&this->m_bBuyStone = 0;
  *(_DWORD *)&this->m_bLockItemShop = 0;
  *(_WORD *)&this->m_bHideQuestGiveUp = 0;
  if ( this->m_spTutorialMark.m_pObject )
  {
    v2 = this->m_spTutorialMark.m_pObject;
    if ( v2 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
      v1->m_spTutorialMark.m_pObject = 0;
    }
  }
  if ( v1->m_pkBoxAnnounceWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkBoxAnnounceWin->vfptr);
    v1->m_pkBoxAnnounceWin = 0;
  }
  if ( v1->m_pkMobKillCountWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMobKillCountWin->vfptr);
    v1->m_pkMobKillCountWin = 0;
  }
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_UIEffectList);
  NsDecal::Terminate(&v1->m_kTutorialMarkDecal);
  v1->m_kTutorialMarkPos = NiPoint3::ZERO;
}

//----- (004410C0) --------------------------------------------------------
void __thiscall Tutorial::Update(Tutorial *this, float fTime)
{
  NiNode *v2; // eax@2

  if ( this->m_bEnable )
  {
    v2 = this->m_spTutorialMark.m_pObject;
    if ( v2 )
      NsDecal::Update(&this->m_kTutorialMarkDecal, 0.0, v2, &this->m_kTutorialMarkPos);
  }
}

//----- (004410F0) --------------------------------------------------------
char __stdcall Tutorial::BlinkMainMenu(bool bActive, int iSlotType)
{
  PgFrameWork *v3; // eax@1
  char result; // al@2
  MainMenuWin *v5; // ecx@3

  v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v3 && (v5 = (MainMenuWin *)v3[16].vfptr) != 0 )
  {
    MainMenuWin::SetBlinkEffect(v5, bActive, iSlotType);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00441130) --------------------------------------------------------
void __stdcall Tutorial::SetItemMoveEffectKey(int iEffectKey)
{
  PgFrameWork *v2; // eax@1
  _DWORD *v3; // eax@2

  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    v3 = v2[19].m_BackFrameID;
    if ( v3 )
      v3[640] = iEffectKey;
  }
}

//----- (00441160) --------------------------------------------------------
bool __stdcall Tutorial::IsHaveItem(const char *pcItemIdx)
{
  PgFrameWork *v2; // eax@1
  int v3; // eax@2
  InventoryWin *v4; // ecx@3

  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 && (v4 = (InventoryWin *)v2[19].m_BackFrameID) != 0 )
    v3 = (unsigned int)InventoryWin::FindItem(v4, (char *)pcItemIdx) < 0xC1;
  else
    LOBYTE(v3) = 0;
  return v3;
}

//----- (004411A0) --------------------------------------------------------
bool __stdcall Tutorial::IsEquipItem(const char *pcItemIdx)
{
  PgFrameWork *v2; // eax@1
  int v3; // eax@2
  InventoryWin *v4; // ecx@3

  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 && (v4 = (InventoryWin *)v2[19].m_BackFrameID) != 0 )
    v3 = (unsigned int)InventoryWin::FindEquipItem(v4, pcItemIdx) < 0x1F;
  else
    LOBYTE(v3) = 0;
  return v3;
}

//----- (004411E0) --------------------------------------------------------
bool Tutorial::IsOpenItemShop()
{
  PgFrameWork *v1; // eax@1
  bool result; // al@2
  unsigned int v3; // ecx@3

  v1 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 && (v3 = v1[25].m_kMsgQ.m_uiTail) != 0 )
    result = (*(int (**)(void))(*(_DWORD *)v3 + 260))();
  else
    result = 0;
  return result;
}

//----- (00441210) --------------------------------------------------------
bool Tutorial::IsOpenSkillShop()
{
  PgFrameWork *v1; // eax@1
  bool result; // al@2
  int v3; // ecx@3

  v1 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 && (v3 = *(_DWORD *)&v1[25].m_bInit) != 0 )
    result = (*(int (**)(void))(*(_DWORD *)v3 + 260))();
  else
    result = 0;
  return result;
}

//----- (00441240) --------------------------------------------------------
bool Tutorial::IsOpenNPCDialog()
{
  PgFrameWork *v1; // eax@1
  bool result; // al@2
  int v3; // ecx@3

  v1 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 && (v3 = *(_DWORD *)&v1[26].m_bInit) != 0 )
    result = (*(int (**)(void))(*(_DWORD *)v3 + 260))();
  else
    result = 0;
  return result;
}

//----- (00441270) --------------------------------------------------------
char __stdcall Tutorial::LockStoneShopInv(unsigned int uiIgnoreSlot)
{
  PgFrameWork *v2; // eax@1
  char result; // al@2
  IDirectMessengerVtbl *v4; // ebx@3
  unsigned int v5; // edi@5
  void (__thiscall **v6)(IDirectMessenger *, int, void *, IDirectMessenger *); // ebx@5
  void (__thiscall *v7)(IDirectMessenger *, int, void *, IDirectMessenger *); // esi@8

  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    v4 = v2[26].vfptr;
    if ( v4 )
    {
      v5 = 0;
      v6 = &v4[14].DirectDispatchToParent;
      do
      {
        if ( v5 != uiIgnoreSlot && v5 < 0xC0 )
        {
          v7 = *v6;
          if ( *v6 )
          {
            (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v7 + 276))(*v6, 0.5);
            (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v7 + 240))(v7, 0);
          }
        }
        ++v5;
        ++v6;
      }
      while ( v5 < 2 );
      result = 1;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00441300) --------------------------------------------------------
bool __stdcall Tutorial::SetLockStoneShop(bool b)
{
  PgFrameWork *v2; // eax@1
  IDirectMessengerVtbl *v3; // ebx@2
  unsigned int v4; // edi@3
  void (__thiscall **v5)(IDirectMessenger *, int, void *, IDirectMessenger *); // ebx@3
  void (__thiscall *v6)(IDirectMessenger *, int, void *, IDirectMessenger *); // esi@5
  double v7; // st7@7
  float v8; // ST10_4@9

  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    v3 = v2[26].vfptr;
    if ( v3 )
    {
      v4 = 0;
      v5 = &v3[14].DirectDispatchToParent;
      do
      {
        if ( v4 < 0xC0 )
        {
          v6 = *v5;
          if ( *v5 )
          {
            if ( b )
              v7 = 0.5;
            else
              v7 = 1.0;
            v8 = v7;
            (*(void (__thiscall **)(void (__thiscall *)(IDirectMessenger *, int, void *, IDirectMessenger *), _DWORD))(*(_DWORD *)v6 + 276))(
              v6,
              LODWORD(v8));
            (*(void (__thiscall **)(void (__thiscall *)(IDirectMessenger *, int, void *, IDirectMessenger *), _DWORD))(*(_DWORD *)v6 + 240))(
              v6,
              b == 0);
          }
        }
        ++v4;
        ++v5;
      }
      while ( v4 < 2 );
    }
  }
  return 0;
}

//----- (00441390) --------------------------------------------------------
bool __stdcall Tutorial::SetItemShopTab(unsigned int uiTab)
{
  PgFrameWork *v2; // eax@1
  bool result; // al@2
  PgWin *v4; // edi@3
  unsigned int v5; // esi@5

  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    v4 = (PgWin *)v2[25].m_kMsgQ.m_uiTail;
    if ( v4 )
    {
      v5 = 2;
      if ( uiTab )
      {
        if ( uiTab == 1 )
        {
          v5 = 3;
        }
        else if ( uiTab == 2 )
        {
          v5 = 4;
        }
      }
      result = PgWinMgr::IsIn(&Pgg_kWinMgr, v4);
      if ( result )
      {
        PgWin::ProcessMsg(v4, 5u, v5, 0);
        result = 1;
      }
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00441410) --------------------------------------------------------
void __thiscall Tutorial::~Tutorial(Tutorial *this)
{
  Tutorial *v1; // esi@1
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // edi@1
  NiNode *v3; // edi@1
  NiTMapBase<DFALL<NiPointer<PgWin> >,int,NiPointer<PgWin> >Vtbl **v4; // ST10_4@5

  v1 = this;
  this->vfptr = (Singleton<Tutorial>Vtbl *)&Tutorial::`vftable';
  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kBlinkWinList;
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMap<enum  Tutorial::eBlinkEffectType,PgWin *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kBlinkWinList);
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<PgWin *>,enum  Tutorial::eBlinkEffectType,PgWin *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v2);
  operator delete[](v2->m_ppkHashTable);
  v3 = v1->m_spTutorialMark.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  NsDecal::~NsDecal(&v1->m_kTutorialMarkDecal);
  v4 = &v1->m_UIEffectList.vfptr;
  *v4 = (NiTMapBase<DFALL<NiPointer<PgWin> >,int,NiPointer<PgWin> >Vtbl *)&NiTMap<int,NiPointer<PgWin>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_UIEffectList);
  *v4 = (NiTMapBase<DFALL<NiPointer<PgWin> >,int,NiPointer<PgWin> >Vtbl *)&NiTMapBase<DFALL<NiPointer<PgWin>>,int,NiPointer<PgWin>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_UIEffectList);
  operator delete[](v1->m_UIEffectList.m_ppkHashTable);
  v1->vfptr = (Singleton<Tutorial>Vtbl *)&Singleton<Tutorial>::`vftable';
  if ( Singleton<Tutorial>::m_pInstance )
  {
    ((void (__stdcall *)(_DWORD))Singleton<Tutorial>::m_pInstance->vfptr->__vecDelDtor)(1);
    Singleton<Tutorial>::m_pInstance = 0;
  }
  Singleton<Tutorial>::m_bDestroy = 1;
}
// 9786DC: using guessed type int (__thiscall *Singleton<Tutorial>::`vftable')(void *p, char);
// 9786E4: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<PgWin>>,int,NiPointer<PgWin>>::`vftable')(void *p, char);
// 978704: using guessed type int (__thiscall *NiTMapBase<DFALL<PgWin *>,enum  Tutorial::eBlinkEffectType,PgWin *>::`vftable')(void *p, char);
// 978724: using guessed type int (__thiscall *NiTMap<int,NiPointer<PgWin>>::`vftable')(void *p, char);
// 978744: using guessed type int (__thiscall *NiTMap<enum  Tutorial::eBlinkEffectType,PgWin *>::`vftable')(void *p, char);
// 978764: using guessed type int (__thiscall *Tutorial::`vftable')(void *p, char);
// A8B994: using guessed type char Singleton<Tutorial>::m_bDestroy;

//----- (00441530) --------------------------------------------------------
char __thiscall Tutorial::BlinkStoneShop(Tutorial *this, unsigned int uiSlot, int *iEffectKey)
{
  Tutorial *v3; // ebx@1
  PgFrameWork *v4; // eax@1
  char result; // al@2
  IDirectMessengerVtbl *v6; // eax@3
  PgWin *v7; // eax@5
  int v8; // ecx@6
  UIBlinkEffect *v9; // eax@6
  NiPointer<PgWinBut> v10; // [sp-4h] [bp-20h]@6
  NiColorA kColor; // [sp+Ch] [bp-10h]@6

  v3 = this;
  v4 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v4
    && (v6 = v4[26].vfptr) != 0
    && uiSlot < 0xC0
    && (v7 = (PgWin *)*((_DWORD *)&v6[14].DirectDispatchToParent + uiSlot)) != 0 )
  {
    v8 = v3->m_UIEffectList.m_kAllocator.m_uiCount;
    kColor.r = 255.0;
    v10.m_pObject = (PgWinBut *)v8;
    kColor.g = 250.0;
    kColor.b = 205.0;
    kColor.a = 255.0;
    *iEffectKey = v8;
    v9 = UIBlinkEffect::CreateWin(v7, &kColor);
    v10.m_pObject = (PgWinBut *)v9;
    if ( v9 )
      InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
    NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
      (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v3->m_UIEffectList,
      *iEffectKey,
      v10);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (004415E0) --------------------------------------------------------
char __thiscall Tutorial::BlinkInven(Tutorial *this, const char *pcItemIdx, int *iEffectKey)
{
  Tutorial *v3; // edi@1
  PgFrameWork *v4; // eax@1
  char result; // al@2
  InventoryWin *v6; // esi@3
  unsigned int v7; // eax@4
  int v8; // ebx@4
  PgWin *v9; // eax@5
  int v10; // edx@6
  UIBlinkEffect *v11; // eax@6
  int v12; // edi@8
  int *v13; // [sp-4h] [bp-28h]@6
  NiColorA kColor; // [sp+Ch] [bp-18h]@6
  int **v15; // [sp+1Ch] [bp-8h]@6
  Tutorial *v16; // [sp+20h] [bp-4h]@1

  v3 = this;
  v16 = this;
  v4 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v4
    && (v6 = (InventoryWin *)v4[19].m_BackFrameID) != 0
    && (v7 = InventoryWin::FindItem(v6, (char *)pcItemIdx), v8 = v7, v7 < 0xC0)
    && (v9 = (PgWin *)&v6->m_apkInvWin[v7]->vfptr) != 0 )
  {
    v10 = v3->m_UIEffectList.m_kAllocator.m_uiCount;
    kColor.r = 255.0;
    v13 = iEffectKey;
    kColor.g = 250.0;
    *iEffectKey = v10;
    v15 = &v13;
    kColor.b = 205.0;
    kColor.a = 255.0;
    v11 = UIBlinkEffect::CreateWin(v9, &kColor);
    v13 = (int *)v11;
    if ( v11 )
      InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
    v12 = (int)&v16->m_UIEffectList;
    NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
      (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v16->m_UIEffectList,
      *iEffectKey,
      (NiPointer<PgWinBut>)v13);
    v6->currPcItemId = InventoryWin::FindItemID((char *)pcItemIdx);
    v6->m_UIEffectList = (NiTMap<int,NiPointer<PgWin> > *)v12;
    result = 1;
    v6->m_iBlinkSlotNum = v8;
    v6->m_bBlinkActive = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (004416D0) --------------------------------------------------------
char __thiscall Tutorial::BlinkShortCut(Tutorial *this, int *iEffectKey)
{
  Tutorial *v2; // ebx@1
  PgFrameWork *v3; // eax@1
  char result; // al@2
  unsigned int v5; // edx@3
  unsigned int v6; // ecx@3
  IDirectMessengerVtbl *v7; // eax@9
  PgWin *v8; // eax@10
  int v9; // ecx@11
  UIBlinkEffect *v10; // eax@11
  NiPointer<PgWinBut> v11; // [sp-4h] [bp-20h]@11
  NiColorA kColor; // [sp+Ch] [bp-10h]@11

  v2 = this;
  v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( !v3 )
    goto LABEL_16;
  v5 = 0;
  v6 = 0;
  while ( v6 < 0x64 && *(&ptr + v6) )
  {
    if ( ++v6 >= 0x12 )
      goto LABEL_9;
  }
  v5 = v6;
LABEL_9:
  v7 = v3[18].vfptr;
  if ( !v7 )
    goto LABEL_16;
  v8 = (PgWin *)*((_DWORD *)&v7[14].DirectDispatchToChildren + v5);
  if ( v8 )
  {
    v9 = v2->m_UIEffectList.m_kAllocator.m_uiCount;
    kColor.r = 255.0;
    v11.m_pObject = (PgWinBut *)v9;
    kColor.g = 250.0;
    kColor.b = 205.0;
    kColor.a = 255.0;
    *iEffectKey = v9;
    v10 = UIBlinkEffect::CreateWin(v8, &kColor);
    v11.m_pObject = (PgWinBut *)v10;
    if ( v10 )
      InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
    NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
      (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v2->m_UIEffectList,
      *iEffectKey,
      v11);
    result = 1;
  }
  else
  {
LABEL_16:
    result = 0;
  }
  return result;
}

//----- (00441790) --------------------------------------------------------
char __thiscall Tutorial::BlinkEffect(Tutorial *this, std::vector<enum Tutorial::eBlinkEffectType,std::allocator<enum Tutorial::eBlinkEffectType> > *kBlinkEffectTypeList, int *riEffectKey, int *riEffectCount)
{
  std::vector<enum Tutorial::eBlinkEffectType,std::allocator<enum Tutorial::eBlinkEffectType> > *v4; // edx@1
  int v5; // eax@1
  char result; // al@2
  char *v7; // edi@4
  Tutorial::eBlinkEffectType v8; // ebx@6
  int v9; // eax@6
  PgWinBut *v10; // ecx@6
  NiRefObjectVtbl *v11; // esi@6
  UIBlinkEffect *v12; // eax@12
  NiPointer<PgWinBut> v13; // [sp-4h] [bp-34h]@12
  NiColorA kColor; // [sp+Ch] [bp-24h]@12
  NiPointer<PgWinBut> *v15; // [sp+1Ch] [bp-14h]@12
  int iSize; // [sp+20h] [bp-10h]@1
  PgWin *pkWin; // [sp+24h] [bp-Ch]@10
  Tutorial *v18; // [sp+28h] [bp-8h]@1
  int i; // [sp+2Ch] [bp-4h]@3

  v4 = kBlinkEffectTypeList;
  v5 = kBlinkEffectTypeList->_Mylast - kBlinkEffectTypeList->_Myfirst;
  v18 = this;
  iSize = v5;
  if ( v5 > 0 )
  {
    *riEffectKey = this->m_UIEffectList.m_kAllocator.m_uiCount;
    i = 0;
    if ( v5 > 0 )
    {
      v7 = (char *)&this->m_kBlinkWinList;
      while ( 1 )
      {
        v8 = v4->_Myfirst[i];
        v9 = (*(int (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v7 + 4))(v7, v4->_Myfirst[i]);
        v10 = (PgWinBut *)*((_DWORD *)v7 + 2);
        v11 = (&v10->vfptr)[v9];
        if ( v11 )
        {
          while ( !(unsigned __int8)(*(int (__thiscall **)(_DWORD, _DWORD, _DWORD))(*(_DWORD *)v7 + 8))(
                                      v7,
                                      v8,
                                      v11[1].__vecDelDtor) )
          {
            v11 = (NiRefObjectVtbl *)v11->__vecDelDtor;
            if ( !v11 )
              goto LABEL_11;
          }
          pkWin = (PgWin *)v11[2].__vecDelDtor;
        }
LABEL_11:
        if ( pkWin )
        {
          v13.m_pObject = v10;
          kColor.r = 255.0;
          v15 = &v13;
          kColor.g = 250.0;
          kColor.b = 205.0;
          kColor.a = 255.0;
          v12 = UIBlinkEffect::CreateWin(pkWin, &kColor);
          v13.m_pObject = (PgWinBut *)v12;
          if ( v12 )
            InterlockedIncrement((volatile LONG *)&v12->m_uiRefCount);
          NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
            (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v18->m_UIEffectList,
            *riEffectKey,
            v13);
        }
        if ( ++i >= iSize )
          break;
        v4 = kBlinkEffectTypeList;
      }
      this = v18;
    }
    *riEffectCount = this->m_UIEffectList.m_kAllocator.m_uiCount - *riEffectKey;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (004418A0) --------------------------------------------------------
char __thiscall Tutorial::BlinkQuestAccept(Tutorial *this, int *iEffectKey)
{
  Tutorial *v2; // ebx@1
  PgFrameWork *v3; // eax@1
  char result; // al@2
  CQuestWin2 *v5; // esi@3
  NiPointer<PgWinBut> v6; // [sp-4h] [bp-10h]@6

  v2 = this;
  v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v3
    && (v5 = (CQuestWin2 *)v3[21].m_kMsgQ.m_uiAlloced) != 0
    && v5->m_pkAcceptBtn
    && CQuestWin2::AddAutoBlinkBut(v5, v5->m_pkAcceptBtn) )
  {
    *iEffectKey = v2->m_UIEffectList.m_kAllocator.m_uiCount;
    v6.m_pObject = (PgWinBut *)v5;
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
    NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
      (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v2->m_UIEffectList,
      *iEffectKey,
      v6);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00441920) --------------------------------------------------------
void __thiscall Tutorial::RemoveBlinkQuestAccept(Tutorial *this, int *iEffectKey)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v2; // edi@1
  const char *v3; // ST00_4@1
  PgWin *v4; // esi@1
  CQuestWin2 *v5; // eax@2
  NiPointer<PgWin> spWin; // [sp+Ch] [bp-10h]@1
  int v7; // [sp+18h] [bp-4h]@1

  spWin.m_pObject = 0;
  v2 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_UIEffectList;
  v3 = (const char *)*iEffectKey;
  v7 = 0;
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_UIEffectList,
    v3,
    (NiPointer<NiShaderLibrary> *)&spWin);
  v4 = spWin.m_pObject;
  if ( spWin.m_pObject )
  {
    v5 = (CQuestWin2 *)CPostProcessEffect::DynamicCast(&PgWin::m_RTTI, (NiShader *)spWin.m_pObject);
    if ( v5 )
    {
      if ( v5->m_pkAcceptBtn )
      {
        if ( CQuestWin2::RemoveAutoBlinkBut(v5, v5->m_pkAcceptBtn) )
          NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::RemoveAt(
            v2,
            *iEffectKey);
        v7 = -1;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spWin);
      }
      else
      {
        v7 = -1;
        if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
          ((void (__cdecl *)(signed int))v4->vfptr->__vecDelDtor)(1);
      }
    }
    else
    {
      v7 = -1;
      if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
        ((void (__cdecl *)(signed int))v4->vfptr->__vecDelDtor)(1);
    }
  }
}

//----- (00441A40) --------------------------------------------------------
void __thiscall Tutorial::Tutorial(Tutorial *this)
{
  Tutorial *v1; // esi@1
  char *v2; // eax@1
  unsigned int v3; // ST08_4@1
  char *v4; // eax@1
  unsigned int v5; // ST08_4@1

  v1 = this;
  this->vfptr = (Singleton<Tutorial>Vtbl *)&Tutorial::`vftable';
  *(_DWORD *)&this->m_bEnable = 0;
  *(_DWORD *)&this->m_bBuyStone = 0;
  *(_DWORD *)&this->m_bLockItemShop = 0;
  *(_WORD *)&this->m_bHideQuestGiveUp = 0;
  this->m_bTutorialFinishMapLink = 0;
  this->m_UIEffectList.vfptr = (NiTMapBase<DFALL<NiPointer<PgWin> >,int,NiPointer<PgWin> >Vtbl *)&NiTMapBase<DFALL<NiPointer<PgWin>>,int,NiPointer<PgWin>>::`vftable';
  this->m_UIEffectList.m_uiHashSize = 37;
  this->m_UIEffectList.m_kAllocator.m_uiCount = 0;
  v2 = (char *)operator new[](0x94u);
  v3 = 4 * v1->m_UIEffectList.m_uiHashSize;
  v1->m_UIEffectList.m_ppkHashTable = (NiTMapItem<int,NiPointer<PgWin> > **)v2;
  memset(v2, 0, v3);
  v1->m_UIEffectList.vfptr = (NiTMapBase<DFALL<NiPointer<PgWin> >,int,NiPointer<PgWin> >Vtbl *)&NiTMap<int,NiPointer<PgWin>>::`vftable';
  NsDecal::NsDecal(&v1->m_kTutorialMarkDecal);
  v1->m_kTutorialMarkPos = NiPoint3::ZERO;
  v1->m_spTutorialMark.m_pObject = 0;
  v1->m_pkBoxAnnounceWin = 0;
  v1->m_pkMobKillCountWin = 0;
  v1->m_kBlinkWinList.vfptr = (NiTMapBase<DFALL<PgWin *>,enum Tutorial::eBlinkEffectType,PgWin *>Vtbl *)&NiTMapBase<DFALL<PgWin *>,enum  Tutorial::eBlinkEffectType,PgWin *>::`vftable';
  v1->m_kBlinkWinList.m_uiHashSize = 37;
  v1->m_kBlinkWinList.m_kAllocator.m_uiCount = 0;
  v4 = (char *)operator new[](0x94u);
  v5 = 4 * v1->m_kBlinkWinList.m_uiHashSize;
  v1->m_kBlinkWinList.m_ppkHashTable = (NiTMapItem<enum Tutorial::eBlinkEffectType,PgWin *> **)v4;
  memset(v4, 0, v5);
  v1->m_kBlinkWinList.vfptr = (NiTMapBase<DFALL<PgWin *>,enum Tutorial::eBlinkEffectType,PgWin *>Vtbl *)&NiTMap<enum  Tutorial::eBlinkEffectType,PgWin *>::`vftable';
}
// 9786E4: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<PgWin>>,int,NiPointer<PgWin>>::`vftable')(void *p, char);
// 978704: using guessed type int (__thiscall *NiTMapBase<DFALL<PgWin *>,enum  Tutorial::eBlinkEffectType,PgWin *>::`vftable')(void *p, char);
// 978724: using guessed type int (__thiscall *NiTMap<int,NiPointer<PgWin>>::`vftable')(void *p, char);
// 978744: using guessed type int (__thiscall *NiTMap<enum  Tutorial::eBlinkEffectType,PgWin *>::`vftable')(void *p, char);
// 978764: using guessed type int (__thiscall *Tutorial::`vftable')(void *p, char);

//----- (00441B80) --------------------------------------------------------
void __thiscall Tutorial::Init(Tutorial *this, PgFrameWork *pkFrameWork)
{
  Tutorial *v2; // ebx@1
  NiNode *v3; // edi@3
  const char *v4; // eax@3
  NiNode *v5; // esi@3
  void *(__thiscall *v6)(NiRefObject *, unsigned int); // eax@5
  NiNode *v7; // eax@7
  NiNode *v8; // eax@8
  NiNode *v9; // esi@9
  NiTListItem<NiPointer<NiProperty> > *v10; // edi@16
  NiObject *v11; // ecx@17
  NiAVObject *v12; // esi@17
  volatile LONG *v13; // [sp-4h] [bp-2Ch]@6
  NiPointer<NiNode> spNode; // [sp+10h] [bp-18h]@3
  NiNode *v15; // [sp+14h] [bp-14h]@17
  NiAVObject *pkObject; // [sp+18h] [bp-10h]@5
  int v17; // [sp+24h] [bp-4h]@5

  v2 = this;
  if ( !Folder::m_bInit )
    Folder::Init();
  v3 = 0;
  v4 = Folder::Merge(&Folder::m_acSystem, "Misc\\TutorialMark.nif");
  v5 = PgUtil::LoadNifFile(v4, 0);
  spNode.m_pObject = v5;
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v6 = v5->vfptr[18].__vecDelDtor;
  v17 = 0;
  pkObject = (NiAVObject *)v6((NiRefObject *)&v5->vfptr, (unsigned int)"Plane01");
  if ( pkObject )
  {
    v7 = (NiNode *)operator new(0xE8u);
    LOBYTE(v17) = 1;
    if ( v7 )
    {
      NiNode::NiNode(v7, 0);
      v3 = v8;
    }
    v9 = v2->m_spTutorialMark.m_pObject;
    LOBYTE(v17) = 0;
    if ( v9 != v3 )
    {
      if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
        v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      v2->m_spTutorialMark.m_pObject = v3;
      if ( v3 )
        InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
    }
    v10 = pkObject->m_kPropertyList.m_pkHead;
    while ( v10 )
    {
      v11 = (NiObject *)&v10->m_element.m_pObject->vfptr;
      v10 = v10->m_pkNext;
      v15 = v2->m_spTutorialMark.m_pObject;
      v12 = (NiAVObject *)NiObject::Clone(v11);
      pkObject = v12;
      if ( v12 )
        InterlockedIncrement((volatile LONG *)&v12->m_uiRefCount);
      LOBYTE(v17) = 2;
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v15->m_kPropertyList,
        (NiPointer<NiRoom> *)&pkObject);
      LOBYTE(v17) = 0;
      if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) )
        v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
    }
    (*(void (__stdcall **)(NiNode *, _DWORD))(*unk_A995C4 + 116))(v2->m_spTutorialMark.m_pObject, 0);
    NsDecal::Init(&v2->m_kTutorialMarkDecal);
    v2->m_kTutorialMarkDecal.m_pkHpTerrain = pkTerrain;
    NsDecal::SetObjectTerrain(&v2->m_kTutorialMarkDecal, pBuildingScene);
    v2->m_pkBoxAnnounceWin = BoxAnnounceWin::CreateWin(pkFrameWork);
    v5 = spNode.m_pObject;
    v2->m_pkMobKillCountWin = MobKillCountWin::CreateWin(pkFrameWork);
    v13 = (volatile LONG *)&spNode.m_pObject->m_uiRefCount;
  }
  else
  {
    v13 = (volatile LONG *)&v5->m_uiRefCount;
  }
  v17 = -1;
  if ( !InterlockedDecrement(v13) )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00441D70) --------------------------------------------------------
void __thiscall Tutorial::SetTutorialMark(Tutorial *this, bool bShow, NiPoint3 kPos, float fSize)
{
  NiNode *v4; // eax@1

  v4 = this->m_spTutorialMark.m_pObject;
  if ( v4 )
  {
    if ( bShow )
      v4->m_uFlags &= 0xFFFEu;
    else
      v4->m_uFlags |= 1u;
    this->m_kTutorialMarkPos = kPos;
    NsDecal::SetDecalSize(&this->m_kTutorialMarkDecal, fSize, fSize);
  }
}

//----- (00441DD0) --------------------------------------------------------
void __thiscall Tutorial::RemoveBlinkEffect(Tutorial *this, int iEffectKey)
{
  PgWin *v2; // esi@1
  PgWin *v3; // edi@2
  PgWin *v4; // ebx@6
  PgWin *v5; // ebx@9
  LONG (__stdcall *v6)(volatile LONG *); // ebx@13
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v7; // [sp+14h] [bp-18h]@1
  NiPointer<PgWin> result; // [sp+18h] [bp-14h]@5
  NiPointer<PgWin> spWin; // [sp+1Ch] [bp-10h]@1
  int v10; // [sp+28h] [bp-4h]@1

  spWin.m_pObject = 0;
  v10 = 0;
  v7 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_UIEffectList;
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_UIEffectList,
    (const char *)iEffectKey,
    (NiPointer<NiShaderLibrary> *)&spWin);
  v2 = spWin.m_pObject;
  if ( spWin.m_pObject )
  {
    v3 = PgWin::GetParentWin(spWin.m_pObject);
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
    LOBYTE(v10) = 1;
    if ( v3 )
    {
      PgWin::DetachChildWin(v3, &result, v2);
      if ( result.m_pObject )
      {
        v4 = result.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
        {
          if ( v4 )
            v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
        }
      }
    }
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    v5 = result.m_pObject;
    if ( result.m_pObject && !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v6 = InterlockedDecrement;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v2 = 0;
    spWin.m_pObject = 0;
    LOBYTE(v10) = 0;
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  }
  else
  {
    v6 = InterlockedDecrement;
  }
  NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::RemoveAt(v7, iEffectKey);
  v10 = -1;
  if ( v2 )
  {
    if ( !v6((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  }
}

//----- (00441F30) --------------------------------------------------------
char __thiscall Tutorial::BlinkFreeStat(Tutorial *this, int *iEffectKey, int *iEffectCount)
{
  Tutorial *v3; // edi@1
  PgFrameWork *v4; // eax@1
  char result; // al@2
  unsigned int v6; // esi@3
  PgWinBut *v7; // ecx@4
  int v8; // edx@4
  PgWin **v9; // edi@4
  PgWin **v10; // eax@4
  signed int v11; // edi@4
  signed int v12; // esi@4
  UIBlinkEffect *v13; // eax@5
  NiPointer<PgWinBut> v14; // [sp-4h] [bp-48h]@5
  NiColorA kColor; // [sp+10h] [bp-34h]@5
  std::vector<PgWin *,std::allocator<PgWin *> > vecWin; // [sp+20h] [bp-24h]@4
  unsigned int _Val; // [sp+30h] [bp-14h]@4
  Tutorial *v18; // [sp+34h] [bp-10h]@1
  int v19; // [sp+40h] [bp-4h]@4

  v3 = this;
  v18 = this;
  v4 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v4 && (v6 = v4[19].m_kMsgQ.m_uiTail) != 0 )
  {
    vecWin._Myfirst = 0;
    vecWin._Mylast = 0;
    vecWin._Myend = 0;
    _Val = *(_DWORD *)(v6 + 572);
    v19 = 0;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&vecWin,
      &_Val);
    _Val = *(_DWORD *)(v6 + 576);
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&vecWin,
      &_Val);
    _Val = *(_DWORD *)(v6 + 580);
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&vecWin,
      &_Val);
    _Val = *(_DWORD *)(v6 + 584);
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&vecWin,
      &_Val);
    _Val = *(_DWORD *)(v6 + 588);
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&vecWin,
      &_Val);
    v8 = v3->m_UIEffectList.m_kAllocator.m_uiCount;
    v9 = vecWin._Mylast;
    *iEffectKey = v8;
    v10 = vecWin._Myfirst;
    v11 = v9 - vecWin._Myfirst;
    v12 = 0;
    if ( v11 > 0 )
    {
      do
      {
        kColor.r = 255.0;
        v14.m_pObject = v7;
        kColor.g = 250.0;
        _Val = (unsigned int)&v14;
        kColor.b = 205.0;
        kColor.a = 255.0;
        v13 = UIBlinkEffect::CreateWin(vecWin._Myfirst[v12], &kColor);
        v14.m_pObject = (PgWinBut *)v13;
        if ( v13 )
          InterlockedIncrement((volatile LONG *)&v13->m_uiRefCount);
        NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
          (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v18->m_UIEffectList,
          v12++ + *iEffectKey,
          v14);
      }
      while ( v12 < v11 );
      v10 = vecWin._Myfirst;
    }
    *iEffectCount = v18->m_UIEffectList.m_kAllocator.m_uiCount - *iEffectKey;
    if ( v10 )
      operator delete(v10);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (004420C0) --------------------------------------------------------
char __thiscall Tutorial::BlinkItemShop(Tutorial *this, const char *pcItemIdx, unsigned int uiTab, unsigned int uiPage, int *iEffectKey)
{
  PgFrameWork *v5; // eax@1
  unsigned int v6; // ebx@1
  unsigned int v8; // edi@5
  unsigned int v9; // eax@8
  unsigned int v10; // esi@11
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v11; // eax@16
  ShopInvWin *v12; // eax@24
  PgWin *v13; // esi@24
  NiNode *v14; // edx@25
  UIBlinkEffect *v15; // eax@25
  unsigned int v16; // esi@27
  ItemShopWin *v17; // edi@32
  PgWinBut *v18; // [sp-4h] [bp-30h]@25
  NiColorA kColor; // [sp+Ch] [bp-20h]@25
  ItemInfo *pkItemInfo; // [sp+1Ch] [bp-10h]@4
  ItemShopWin *pkWin; // [sp+20h] [bp-Ch]@3
  NiPointer<PgWinBut> val; // [sp+24h] [bp-8h]@1
  unsigned int uiSlot; // [sp+28h] [bp-4h]@5
  unsigned int uiTotal; // [sp+34h] [bp+8h]@11

  val.m_pObject = (PgWinBut *)this;
  v5 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  v6 = 0;
  if ( !v5 )
    return 0;
  pkWin = (ItemShopWin *)v5[25].m_kMsgQ.m_uiTail;
  if ( !pkWin )
    return 0;
  pkItemInfo = ItemInfoTab::GetByInxName((char *)pcItemIdx);
  if ( !pkItemInfo )
    return 0;
  v8 = 42 * uiPage;
  uiSlot = 0;
  if ( uiTab )
  {
    if ( uiTab != 1 )
    {
      if ( uiTab == 2 )
      {
        v9 = Market::GetTotalAcc();
        goto LABEL_11;
      }
      return 0;
    }
    v9 = Market::GetTotalArmor();
  }
  else
  {
    v9 = Market::GetTotalWeapon();
  }
LABEL_11:
  uiTotal = v9;
  v10 = 42 * uiPage;
  if ( v8 < v9 )
  {
    while ( v6 < 0x2A )
    {
      if ( uiTab )
      {
        if ( uiTab == 1 )
        {
          v11 = Market::GetArmor(v10);
        }
        else
        {
          if ( uiTab != 2 )
            return 0;
          v11 = Market::GetAcc(v10);
        }
      }
      else
      {
        v11 = Market::GetWeaopn(v10);
      }
      if ( v11 && v11->item == pkItemInfo->ID )
      {
        uiSlot = v10 - v8;
        break;
      }
      ++v10;
      ++v6;
      if ( v10 >= uiTotal )
        break;
    }
  }
  v12 = ItemShopWin::GetInvWin(pkWin, uiSlot);
  v13 = (PgWin *)v12;
  if ( !v12 )
    return 0;
  IconWin::IconDisable((IconWin *)&v12->vfptr, 0);
  v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 1u);
  kColor.r = 255.0;
  v14 = val.m_pObject->m_pkParent;
  kColor.g = 250.0;
  v18 = val.m_pObject;
  kColor.b = 205.0;
  kColor.a = 255.0;
  *iEffectKey = (int)v14;
  v15 = UIBlinkEffect::CreateWin(v13, &kColor);
  v18 = (PgWinBut *)v15;
  if ( v15 )
    InterlockedIncrement((volatile LONG *)&v15->m_uiRefCount);
  NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
    (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&val.m_pObject->m_uiExtraDataSize,
    *iEffectKey,
    (NiPointer<PgWinBut>)v18);
  v16 = 2;
  if ( uiTab )
  {
    if ( uiTab == 1 )
    {
      v16 = 3;
    }
    else if ( uiTab == 2 )
    {
      v16 = 4;
    }
  }
  v17 = pkWin;
  if ( PgWinMgr::IsIn(&Pgg_kWinMgr, (PgWin *)&pkWin->vfptr) )
    PgWin::ProcessMsg((PgWin *)&v17->vfptr, 5u, v16, 0);
  if ( PgWinMgr::IsIn(&Pgg_kWinMgr, (PgWin *)&v17->vfptr) )
    PgWin::ProcessMsg((PgWin *)&v17->vfptr, 5u, 0xCu, uiPage);
  return 1;
}

//----- (00442280) --------------------------------------------------------
char __thiscall Tutorial::BlinkSkillShop(Tutorial *this, const char *pcItemIdx, unsigned int uiTab, unsigned int uiPage, int *iEffectKey)
{
  PgFrameWork *v5; // eax@1
  unsigned int v6; // ebx@1
  unsigned int v7; // edi@4
  unsigned int v8; // eax@5
  unsigned int v9; // esi@10
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v10; // eax@13
  NPCSkillInvWin *v11; // eax@23
  PgWin *v12; // esi@23
  int v13; // ecx@24
  UIBlinkEffect *v14; // eax@24
  NPCSkillWin *v15; // esi@26
  char result; // al@32
  NiPointer<PgWinBut> v17; // [sp-4h] [bp-30h]@24
  NiColorA kColor; // [sp+Ch] [bp-20h]@24
  ItemInfo *pkItemInfo; // [sp+1Ch] [bp-10h]@3
  NPCSkillWin *pkWin; // [sp+20h] [bp-Ch]@2
  Tutorial *v21; // [sp+24h] [bp-8h]@1
  unsigned int uiSlot; // [sp+28h] [bp-4h]@4
  unsigned int uiTotal; // [sp+34h] [bp+8h]@10

  v21 = this;
  v5 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  v6 = 0;
  if ( !v5 )
    goto LABEL_33;
  pkWin = *(NPCSkillWin **)&v5[25].m_bInit;
  if ( !pkWin )
    goto LABEL_33;
  pkItemInfo = ItemInfoTab::GetByInxName((char *)pcItemIdx);
  if ( !pkItemInfo )
    goto LABEL_33;
  v7 = 42 * uiPage;
  uiSlot = 0;
  switch ( uiTab )
  {
    case 0u:
      v8 = Market::GetTotalFigActiveSkill();
      break;
    case 1u:
      v8 = Market::GetTotalCleActiveSkill();
      break;
    case 2u:
      v8 = Market::GetTotalArcActiveSkill();
      break;
    case 3u:
      v8 = Market::GetTotalMagActiveSkill();
      break;
    case 4u:
      v8 = Market::GetTotalJokActiveSkill();
      break;
    default:
      goto LABEL_33;
  }
  uiTotal = v8;
  v9 = 42 * uiPage;
  if ( v7 < v8 )
  {
    while ( v6 < 0x2A )
    {
      switch ( uiTab )
      {
        case 0u:
          v10 = Market::GetFigActSkill(v9);
          break;
        case 1u:
          v10 = Market::GetCleActSkill(v9);
          break;
        case 2u:
          v10 = Market::GetArcActSkill(v9);
          break;
        case 3u:
          v10 = Market::GetMagActSkill(v9);
          break;
        case 4u:
          v10 = Market::GetJokActSkill(v9);
          break;
      }
      if ( v10 && v10->item == pkItemInfo->ID )
      {
        uiSlot = v9 - v7;
        break;
      }
      ++v9;
      ++v6;
      if ( v9 >= uiTotal )
        break;
    }
  }
  v11 = NPCSkillWin::GetInvWin(pkWin, uiSlot);
  v12 = (PgWin *)v11;
  if ( v11 )
  {
    IconWin::IconDisable((IconWin *)&v11->vfptr, 0);
    v12->vfptr[60].__vecDelDtor((NiRefObject *)v12, 1u);
    kColor.r = 255.0;
    v13 = v21->m_UIEffectList.m_kAllocator.m_uiCount;
    kColor.g = 250.0;
    v17.m_pObject = (PgWinBut *)v13;
    kColor.b = 205.0;
    kColor.a = 255.0;
    *iEffectKey = v13;
    v14 = UIBlinkEffect::CreateWin(v12, &kColor);
    v17.m_pObject = (PgWinBut *)v14;
    if ( v14 )
      InterlockedIncrement((volatile LONG *)&v14->m_uiRefCount);
    NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
      (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v21->m_UIEffectList,
      *iEffectKey,
      v17);
    v15 = pkWin;
    if ( PgWinMgr::IsIn(&Pgg_kWinMgr, (PgWin *)&pkWin->vfptr) )
      PgWin::ProcessMsg((PgWin *)&v15->vfptr, 5u, 2u, 0);
    if ( PgWinMgr::IsIn(&Pgg_kWinMgr, (PgWin *)&v15->vfptr) )
      PgWin::ProcessMsg((PgWin *)&v15->vfptr, 5u, 8u, uiTab);
    if ( PgWinMgr::IsIn(&Pgg_kWinMgr, (PgWin *)&v15->vfptr) )
      PgWin::ProcessMsg((PgWin *)&v15->vfptr, 5u, 0xCu, uiPage);
    result = 1;
  }
  else
  {
LABEL_33:
    result = 0;
  }
  return result;
}

//----- (00442490) --------------------------------------------------------
char __thiscall Tutorial::BlinkSkill(Tutorial *this, const char *pcSkillIdx, int *iEffectKey)
{
  PgFrameWork *v3; // eax@1
  char result; // al@2
  IDirectMessenger *v5; // ebx@3
  unsigned int v6; // edi@5
  SkillIcon **v7; // ebx@5
  SkillIcon *v8; // esi@6
  int v9; // ecx@9
  UIBlinkEffect *v10; // eax@9
  NiPointer<PgWinBut> v11; // [sp-4h] [bp-24h]@9
  NiColorA kColor; // [sp+Ch] [bp-14h]@9
  Tutorial *v13; // [sp+1Ch] [bp-4h]@1
  ActiveSkillInfo *pkActiveSkillInfo; // [sp+28h] [bp+8h]@4

  v13 = this;
  v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v3
    && (v5 = v3[20].m_pkMsgHooker) != 0
    && (pkActiveSkillInfo = ActSkillInfoTab::GetByInxName((char *)pcSkillIdx)) != 0 )
  {
    v6 = 0;
    v7 = (SkillIcon **)&v5[29].m_pkMsgHooker;
    do
    {
      v8 = *v7;
      if ( *v7 && SkillIcon::GetSkill(*v7) == pkActiveSkillInfo->ID )
        break;
      ++v6;
      ++v7;
    }
    while ( v6 < 8 );
    v9 = v13->m_UIEffectList.m_kAllocator.m_uiCount;
    kColor.r = 255.0;
    v11.m_pObject = (PgWinBut *)v9;
    kColor.g = 250.0;
    kColor.b = 205.0;
    kColor.a = 255.0;
    *iEffectKey = v9;
    v10 = UIBlinkEffect::CreateWin((PgWin *)&v8->vfptr, &kColor);
    v11.m_pObject = (PgWinBut *)v10;
    if ( v10 )
      InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
    NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
      (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v13->m_UIEffectList,
      *iEffectKey,
      v11);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00442570) --------------------------------------------------------
char __stdcall Tutorial::IsLearnSkill(const char *pcSkillIdx)
{
  ActiveSkillInfo *v2; // eax@1
  char result; // al@2

  v2 = ActSkillInfoTab::GetByInxName((char *)pcSkillIdx);
  if ( v2 )
    result = Skill::IsLearnSkill(v2->ID);
  else
    result = 0;
  return result;
}

//----- (004425A0) --------------------------------------------------------
bool __stdcall Tutorial::IsSelectSkill(const char *pcSkillIdx)
{
  _WORD *v2; // eax@2
  __int16 v3; // si@3
  ActiveSkillInfo *v4; // eax@4
  bool result; // al@5

  if ( PgCursor::ms_pkDrop
    && (v2 = PgCursor::ms_pkDrop->m_pkContents) != 0
    && (v3 = v2[10], v3 != -1)
    && (v4 = ActSkillInfoTab::GetByInxName((char *)pcSkillIdx)) != 0 )
  {
    result = v4->ID == v3;
  }
  else
  {
    result = 0;
  }
  return result;
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (004425F0) --------------------------------------------------------
char __stdcall Tutorial::LockItemShopInv(const char *pcIgnoreItemIdx, unsigned int uiTab, unsigned int uiPage)
{
  PgFrameWork *v4; // eax@1
  unsigned int v6; // edi@4
  unsigned int v7; // eax@8
  unsigned int v8; // esi@11
  unsigned int v9; // ebx@12
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v10; // eax@17
  unsigned int v11; // edi@27
  ShopInvWin *v12; // eax@29
  ShopInvWin *v13; // esi@29
  ItemShopWin *pkWin; // [sp+0h] [bp-Ch]@3
  ItemInfo *pkItemInfo; // [sp+4h] [bp-8h]@4
  unsigned int uiIgnoreSlot; // [sp+8h] [bp-4h]@4
  unsigned int uiTotal; // [sp+14h] [bp+8h]@11

  v4 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( !v4 )
    return 0;
  pkWin = (ItemShopWin *)v4[25].m_kMsgQ.m_uiTail;
  if ( !pkWin )
    return 0;
  pkItemInfo = ItemInfoTab::GetByInxName((char *)pcIgnoreItemIdx);
  v6 = 42 * uiPage;
  uiIgnoreSlot = 42;
  if ( uiTab )
  {
    if ( uiTab == 1 )
    {
      v7 = Market::GetTotalArmor();
    }
    else
    {
      if ( uiTab != 2 )
        return 0;
      v7 = Market::GetTotalAcc();
    }
  }
  else
  {
    v7 = Market::GetTotalWeapon();
  }
  uiTotal = v7;
  v8 = 42 * uiPage;
  if ( v6 < v7 )
  {
    v9 = 0;
    while ( v9 < 0x2A )
    {
      if ( uiTab )
      {
        if ( uiTab == 1 )
        {
          v10 = Market::GetArmor(v8);
        }
        else
        {
          if ( uiTab != 2 )
            return 0;
          v10 = Market::GetAcc(v8);
        }
      }
      else
      {
        v10 = Market::GetWeaopn(v8);
      }
      if ( v10 && pkItemInfo && v10->item == pkItemInfo->ID )
      {
        uiIgnoreSlot = v8 - v6;
        break;
      }
      ++v8;
      ++v9;
      if ( v8 >= uiTotal )
        break;
    }
  }
  v11 = 0;
  do
  {
    if ( v11 != uiIgnoreSlot )
    {
      v12 = ItemShopWin::GetInvWin(pkWin, v11);
      v13 = v12;
      if ( v12 )
      {
        IconWin::IconDisable((IconWin *)&v12->vfptr, 1);
        v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
      }
    }
    ++v11;
  }
  while ( v11 < 0x2A );
  return 1;
}

//----- (00442710) --------------------------------------------------------
char __stdcall Tutorial::LockSkillShopInv(const char *pcIgnoreItemIdx, unsigned int uiTab, unsigned int uiPage)
{
  PgFrameWork *v4; // eax@1
  char result; // al@2
  unsigned int v6; // edi@4
  unsigned int v7; // eax@5
  unsigned int v8; // esi@10
  unsigned int v9; // ebx@11
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v10; // eax@14
  unsigned int v11; // edi@23
  NPCSkillInvWin *v12; // eax@25
  NPCSkillInvWin *v13; // esi@25
  NPCSkillWin *pkWin; // [sp+0h] [bp-Ch]@3
  ItemInfo *pkItemInfo; // [sp+4h] [bp-8h]@4
  unsigned int uiIgnoreSlot; // [sp+8h] [bp-4h]@4
  unsigned int uiTotal; // [sp+14h] [bp+8h]@10

  v4 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v4 && (pkWin = *(NPCSkillWin **)&v4[25].m_bInit) != 0 )
  {
    pkItemInfo = ItemInfoTab::GetByInxName((char *)pcIgnoreItemIdx);
    v6 = 42 * uiPage;
    uiIgnoreSlot = 42;
    switch ( uiTab )
    {
      case 0u:
        v7 = Market::GetTotalFigActiveSkill();
        goto LABEL_10;
      case 1u:
        v7 = Market::GetTotalCleActiveSkill();
        goto LABEL_10;
      case 2u:
        v7 = Market::GetTotalArcActiveSkill();
        goto LABEL_10;
      case 3u:
        v7 = Market::GetTotalMagActiveSkill();
        goto LABEL_10;
      case 4u:
        v7 = Market::GetTotalJokActiveSkill();
LABEL_10:
        uiTotal = v7;
        v8 = 42 * uiPage;
        if ( v6 >= v7 )
          goto LABEL_23;
        v9 = 0;
        break;
      default:
        return 0;
    }
    while ( v9 < 0x2A )
    {
      switch ( uiTab )
      {
        case 0u:
          v10 = Market::GetFigActSkill(v8);
          break;
        case 1u:
          v10 = Market::GetCleActSkill(v8);
          break;
        case 2u:
          v10 = Market::GetArcActSkill(v8);
          break;
        case 3u:
          v10 = Market::GetMagActSkill(v8);
          break;
        case 4u:
          v10 = Market::GetJokActSkill(v8);
          break;
      }
      if ( v10 && pkItemInfo && v10->item == pkItemInfo->ID )
      {
        uiIgnoreSlot = v8 - v6;
        break;
      }
      ++v8;
      ++v9;
      if ( v8 >= uiTotal )
        break;
    }
LABEL_23:
    v11 = 0;
    do
    {
      if ( v11 != uiIgnoreSlot )
      {
        v12 = NPCSkillWin::GetInvWin(pkWin, v11);
        v13 = v12;
        if ( v12 )
        {
          IconWin::IconDisable((IconWin *)&v12->vfptr, 1);
          v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
        }
      }
      ++v11;
    }
    while ( v11 < 0x2A );
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00442870) --------------------------------------------------------
void __thiscall Singleton<Tutorial>::~Singleton<Tutorial>(Singleton<Tutorial> *this)
{
  this->vfptr = (Singleton<Tutorial>Vtbl *)&Singleton<Tutorial>::`vftable';
  if ( Singleton<Tutorial>::m_pInstance )
  {
    ((void (__stdcall *)(_DWORD))Singleton<Tutorial>::m_pInstance->vfptr->__vecDelDtor)(1);
    Singleton<Tutorial>::m_pInstance = 0;
  }
  Singleton<Tutorial>::m_bDestroy = 1;
}
// 9786DC: using guessed type int (__thiscall *Singleton<Tutorial>::`vftable')(void *p, char);
// A8B994: using guessed type char Singleton<Tutorial>::m_bDestroy;

//----- (004428A0) --------------------------------------------------------
Singleton<Tutorial> *__thiscall Singleton<Tutorial>::`vector deleting destructor'(Singleton<Tutorial> *this, unsigned int a2)
{
  Singleton<Tutorial> *v2; // esi@1

  v2 = this;
  this->vfptr = (Singleton<Tutorial>Vtbl *)&Singleton<Tutorial>::`vftable';
  if ( Singleton<Tutorial>::m_pInstance )
  {
    ((void (__stdcall *)(_DWORD))Singleton<Tutorial>::m_pInstance->vfptr->__vecDelDtor)(1);
    Singleton<Tutorial>::m_pInstance = 0;
  }
  Singleton<Tutorial>::m_bDestroy = 1;
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9786DC: using guessed type int (__thiscall *Singleton<Tutorial>::`vftable')(void *p, char);
// A8B994: using guessed type char Singleton<Tutorial>::m_bDestroy;

//----- (004428F0) --------------------------------------------------------
void __thiscall NiTMapBase<DFALL<NiPointer<PgWin>>,int,NiPointer<PgWin>>::~NiTMapBase<DFALL<NiPointer<PgWin>>,int,NiPointer<PgWin>>(NiTMapBase<DFALL<NiPointer<PgWin> >,int,NiPointer<PgWin> > *this)
{
  NiTMapBase<DFALL<NiPointer<PgWin> >,int,NiPointer<PgWin> > *v1; // esi@1

  v1 = this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<PgWin> >,int,NiPointer<PgWin> >Vtbl *)&NiTMapBase<DFALL<NiPointer<PgWin>>,int,NiPointer<PgWin>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v1->m_ppkHashTable);
}
// 9786E4: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<PgWin>>,int,NiPointer<PgWin>>::`vftable')(void *p, char);

//----- (00442910) --------------------------------------------------------
void __thiscall NiTMap<int,NiPointer<PgWin>>::~NiTMap<int,NiPointer<PgWin>>(NiTMap<int,NiPointer<PgWin> > *this)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v1; // esi@1

  v1 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<PgWin> >,int,NiPointer<PgWin> >Vtbl *)&NiTMap<int,NiPointer<PgWin>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v1->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<PgWin>>,int,NiPointer<PgWin>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v1);
  operator delete[](v1->m_ppkHashTable);
}
// 9786E4: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<PgWin>>,int,NiPointer<PgWin>>::`vftable')(void *p, char);
// 978724: using guessed type int (__thiscall *NiTMap<int,NiPointer<PgWin>>::`vftable')(void *p, char);

//----- (00442980) --------------------------------------------------------
void __thiscall NiTMapBase<DFALL<PgWin *>,enum  Tutorial::eBlinkEffectType,PgWin *>::~NiTMapBase<DFALL<PgWin *>,enum  Tutorial::eBlinkEffectType,PgWin *>(NiTMapBase<DFALL<PgWin *>,enum Tutorial::eBlinkEffectType,PgWin *> *this)
{
  NiTMapBase<DFALL<PgWin *>,enum Tutorial::eBlinkEffectType,PgWin *> *v1; // esi@1

  v1 = this;
  this->vfptr = (NiTMapBase<DFALL<PgWin *>,enum Tutorial::eBlinkEffectType,PgWin *>Vtbl *)&NiTMapBase<DFALL<PgWin *>,enum  Tutorial::eBlinkEffectType,PgWin *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v1->m_ppkHashTable);
}
// 978704: using guessed type int (__thiscall *NiTMapBase<DFALL<PgWin *>,enum  Tutorial::eBlinkEffectType,PgWin *>::`vftable')(void *p, char);

//----- (004429A0) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<PgWin> >,int,NiPointer<PgWin> > *__thiscall NiTMapBase<DFALL<NiPointer<PgWin>>,int,NiPointer<PgWin>>::`vector deleting destructor'(NiTMapBase<DFALL<NiPointer<PgWin> >,int,NiPointer<PgWin> > *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<PgWin> >,int,NiPointer<PgWin> > *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<PgWin> >,int,NiPointer<PgWin> >Vtbl *)&NiTMapBase<DFALL<NiPointer<PgWin>>,int,NiPointer<PgWin>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9786E4: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<PgWin>>,int,NiPointer<PgWin>>::`vftable')(void *p, char);

//----- (004429E0) --------------------------------------------------------
NiTMapBase<DFALL<PgWin *>,enum Tutorial::eBlinkEffectType,PgWin *> *__thiscall NiTMapBase<DFALL<PgWin *>,enum  Tutorial::eBlinkEffectType,PgWin *>::`vector deleting destructor'(NiTMapBase<DFALL<PgWin *>,enum Tutorial::eBlinkEffectType,PgWin *> *this, unsigned int a2)
{
  NiTMapBase<DFALL<PgWin *>,enum Tutorial::eBlinkEffectType,PgWin *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<DFALL<PgWin *>,enum Tutorial::eBlinkEffectType,PgWin *>Vtbl *)&NiTMapBase<DFALL<PgWin *>,enum  Tutorial::eBlinkEffectType,PgWin *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 978704: using guessed type int (__thiscall *NiTMapBase<DFALL<PgWin *>,enum  Tutorial::eBlinkEffectType,PgWin *>::`vftable')(void *p, char);

//----- (00442A20) --------------------------------------------------------
NiPointer<PgWin> *__thiscall PgWin::DetachChildWin(PgWin *this, NiPointer<PgWin> *result, PgWin *pkChild)
{
  PgWin *v3; // ecx@1
  PgWin *v4; // esi@1
  PgWin *v5; // eax@2
  NiRTTI *v6; // eax@3
  char v7; // al@6
  PgWin *v8; // esi@11

  ((void (__stdcall *)(PgWin **, PgWin *))this->vfptr[30].__vecDelDtor)(&pkChild, pkChild);
  v3 = pkChild;
  v4 = pkChild;
  if ( pkChild )
  {
    v6 = (NiRTTI *)((int (*)(void))pkChild->vfptr[1].__vecDelDtor)();
    if ( v6 )
    {
      while ( v6 != &PgWin::m_RTTI )
      {
        v6 = v6->m_pkBaseRTTI;
        if ( !v6 )
          goto LABEL_6;
      }
      v7 = 1;
    }
    else
    {
LABEL_6:
      v7 = 0;
    }
    v3 = pkChild;
    v5 = (PgWin *)(v7 != 0 ? (unsigned int)v4 : 0);
  }
  else
  {
    v5 = 0;
  }
  result->m_pObject = v5;
  if ( v5 )
  {
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
    v3 = pkChild;
  }
  if ( v3 )
  {
    v8 = v3;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
    {
      if ( v8 )
        v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    }
  }
  return result;
}

//----- (00442B00) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<int,NiPointer<PgWin>>::`vector deleting destructor'(NiTMap<int,NiPointer<PgWin> > *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // esi@1

  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<PgWin> >,int,NiPointer<PgWin> >Vtbl *)&NiTMap<int,NiPointer<PgWin>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<PgWin>>,int,NiPointer<PgWin>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v2);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9786E4: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<PgWin>>,int,NiPointer<PgWin>>::`vftable')(void *p, char);
// 978724: using guessed type int (__thiscall *NiTMap<int,NiPointer<PgWin>>::`vftable')(void *p, char);

//----- (00442B80) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<enum  Tutorial::eBlinkEffectType,PgWin *>::`scalar deleting destructor'(NiTMap<enum Tutorial::eBlinkEffectType,PgWin *> *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // esi@1

  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<DFALL<PgWin *>,enum Tutorial::eBlinkEffectType,PgWin *>Vtbl *)&NiTMap<enum  Tutorial::eBlinkEffectType,PgWin *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<PgWin *>,enum  Tutorial::eBlinkEffectType,PgWin *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v2);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 978704: using guessed type int (__thiscall *NiTMapBase<DFALL<PgWin *>,enum  Tutorial::eBlinkEffectType,PgWin *>::`vftable')(void *p, char);
// 978744: using guessed type int (__thiscall *NiTMap<enum  Tutorial::eBlinkEffectType,PgWin *>::`vftable')(void *p, char);

//----- (00442C00) --------------------------------------------------------
void __thiscall NsDecal::SetDecalSize(NsDecal *this, float fHeight_, float fWidth_)
{
  NsDecal *v3; // esi@1
  NiNode *v4; // eax@1
  NiAVObject *v5; // edi@2
  NiAVObject *v6; // edx@3
  NiColor kColor; // [sp+14h] [bp-Ch]@3

  v3 = this;
  v4 = this->m_spCollider.m_pObject;
  this->m_fDecalHight = fHeight_;
  this->m_fDecalWidth = fWidth_;
  if ( v4 )
  {
    v5 = v4->m_spCollisionObject.m_pObject[3].m_pkSceneObject;
    if ( ((int (__thiscall *)(_DWORD))v5->vfptr[3].__vecDelDtor)(v5) == 1 )
    {
      v5->m_kLocal.m_Rotate.m_pEntry[0][0] = v3->m_fDecalWidth * 0.5;
      v5->m_kLocal.m_Rotate.m_pEntry[0][1] = 0.5 * v3->m_fDecalHight;
      v5->m_kLocal.m_Rotate.m_pEntry[0][2] = v3->m_fDecalHight;
      NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v3->m_spCollider.m_pObject->m_kChildren);
      v6 = (NiAVObject *)&v3->m_spCollider.m_pObject->vfptr;
      kColor.r = 0.0;
      kColor.g = 0.0;
      kColor.b = 1.0;
      NiOptimizeABV::CreateWireABV(v6, &kColor, 1.0, "WireABVTemp", 0);
      NiAVObject::Update((NiAVObject *)&v3->m_spCollider.m_pObject->vfptr, 0.0, 1);
    }
  }
}

//----- (00442CA0) --------------------------------------------------------
Tutorial *__thiscall Tutorial::`vector deleting destructor'(Tutorial *this, unsigned int a2)
{
  Tutorial *v2; // esi@1

  v2 = this;
  Tutorial::~Tutorial(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00442CD0) --------------------------------------------------------
void __thiscall UIBlinkEffect::UIBlinkEffect(UIBlinkEffect *this)
{
  UIBlinkEffect *v1; // esi@1

  v1 = this;
  PgWinSpr::PgWinSpr((PgWinSpr *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&UIBlinkEffect::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&UIBlinkEffect::`vftable'{for `IDirectMessenger'};
  v1->m_bActive = 0;
}
// 978784: using guessed type void (__thiscall *UIBlinkEffect::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9787A4: using guessed type int (__thiscall *UIBlinkEffect::`vftable'{for `NiNode'})(void *p, char);

//----- (00442D00) --------------------------------------------------------
void __thiscall UIBlinkEffect::~UIBlinkEffect(UIBlinkEffect *this)
{
  this->vfptr = (NiRefObjectVtbl *)&UIBlinkEffect::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&UIBlinkEffect::`vftable'{for `IDirectMessenger'};
  PgWinSpr::~PgWinSpr((PgWinSpr *)&this->vfptr);
}
// 978784: using guessed type void (__thiscall *UIBlinkEffect::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9787A4: using guessed type int (__thiscall *UIBlinkEffect::`vftable'{for `NiNode'})(void *p, char);

//----- (00442D20) --------------------------------------------------------
char __thiscall UIBlinkEffect::Create(UIBlinkEffect *this, PgWin *pkParent, NiColorA *kColor)
{
  unsigned int v3; // edi@1
  unsigned int v4; // ebx@1
  NiSourceTexture *v5; // eax@3
  char result; // al@3
  UIBlinkEffect *v7; // [sp+Ch] [bp-4h]@1

  v3 = 0;
  v4 = 0;
  v7 = this;
  if ( pkParent )
  {
    v3 = ((int (__thiscall *)(_DWORD))pkParent->vfptr[36].__vecDelDtor)(pkParent);
    v4 = ((int (__thiscall *)(_DWORD))pkParent->vfptr[37].__vecDelDtor)(pkParent);
  }
  v5 = PgUtil::Create1PixelSourceTexture(
         (signed int)kColor->r,
         (signed int)kColor->g,
         (signed int)kColor->b,
         (signed int)kColor->a);
  result = PgWinSpr::Create((PgWinSpr *)&v7->vfptr, v5, 0, 0, v3, v4, pkParent, 0, 0);
  if ( result )
  {
    v7->vfptr[60].__vecDelDtor((NiRefObject *)v7, 0);
    result = 1;
  }
  return result;
}

//----- (00442E20) --------------------------------------------------------
char __thiscall UIBlinkEffect::Create(UIBlinkEffect *this, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, NiColorA *kColor)
{
  UIBlinkEffect *v7; // esi@1
  NiSourceTexture *v8; // eax@1
  char result; // al@1

  v7 = this;
  v8 = PgUtil::Create1PixelSourceTexture(
         (signed int)kColor->r,
         (signed int)kColor->g,
         (signed int)kColor->b,
         (signed int)kColor->a);
  result = PgWinSpr::Create((PgWinSpr *)&v7->vfptr, v8, iXPos, iYPos, uiWidth, uiHeight, pkParent, 0, 0);
  if ( result )
  {
    v7->vfptr[60].__vecDelDtor((NiRefObject *)v7, 0);
    result = 1;
  }
  return result;
}

//----- (00442F00) --------------------------------------------------------
void __userpurge UIBlinkEffect::UpdateMeWin(UIBlinkEffect *this@<ecx>, double a2@<st0>, float fTime)
{
  UIBlinkEffect *v3; // esi@1
  double v4; // st6@2
  float v5; // ST08_4@3
  double v6; // st7@5
  float v7; // ST08_4@7
  float v8; // ST00_4@11
  float fAlpha; // [sp+8h] [bp-4h]@1

  v3 = this;
  ((void (*)(void))this->vfptr[70].__vecDelDtor)();
  fAlpha = a2;
  if ( !v3->m_bActive )
  {
    v4 = fAlpha;
    if ( fAlpha <= 1.0 )
    {
      v7 = v4 + Timer::ms_fDeltaTime;
      v4 = v7;
    }
    if ( v4 >= 1.0 )
    {
      v3->m_bActive = 1;
      v6 = (float)1.0;
      goto LABEL_11;
    }
LABEL_10:
    v6 = v4;
    goto LABEL_11;
  }
  v4 = fAlpha;
  if ( fAlpha >= 0.0 )
  {
    v5 = v4 - Timer::ms_fDeltaTime;
    v4 = v5;
  }
  if ( v4 > 0.0 )
    goto LABEL_10;
  v3->m_bActive = 0;
  v6 = (float)0.0;
LABEL_11:
  v8 = v6;
  v3->vfptr[69].__vecDelDtor((NiRefObject *)v3, LODWORD(v8));
}
// A8B980: using guessed type float Timer::ms_fDeltaTime;

//----- (00442FA0) --------------------------------------------------------
UIBlinkEffect *__cdecl UIBlinkEffect::CreateWin(PgWin *pkParent, NiColorA *kColor)
{
  PgWin *v2; // eax@1
  PgWin *v3; // esi@1
  PgWin *v4; // edi@8
  UIBlinkEffect *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v2 = (PgWin *)operator new(0x12Cu);
  v3 = v2;
  result.m_pObject = v2;
  v7 = 0;
  if ( v2 )
  {
    PgWinSpr::PgWinSpr((PgWinSpr *)v2);
    v3->vfptr = (NiRefObjectVtbl *)&UIBlinkEffect::`vftable'{for `NiNode'};
    v3->vfptr = (IDirectMessengerVtbl *)&UIBlinkEffect::`vftable'{for `IDirectMessenger'};
    LOBYTE(v3[1].m_pcName) = 0;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, PgWin *, NiColorA *))v3->vfptr[130].__vecDelDtor)(
                          v3,
                          pkParent,
                          kColor) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (UIBlinkEffect *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}
// 978784: using guessed type void (__thiscall *UIBlinkEffect::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9787A4: using guessed type int (__thiscall *UIBlinkEffect::`vftable'{for `NiNode'})(void *p, char);

//----- (004430F0) --------------------------------------------------------
UIBlinkEffect *__cdecl UIBlinkEffect::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, NiColorA *kColor)
{
  PgWin *v6; // eax@1
  PgWin *v7; // esi@1
  PgWin *v8; // edi@8
  UIBlinkEffect *v9; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v11; // [sp+20h] [bp-4h]@1

  v6 = (PgWin *)operator new(0x12Cu);
  v7 = v6;
  result.m_pObject = v6;
  v11 = 0;
  if ( v6 )
  {
    PgWinSpr::PgWinSpr((PgWinSpr *)v6);
    v7->vfptr = (NiRefObjectVtbl *)&UIBlinkEffect::`vftable'{for `NiNode'};
    v7->vfptr = (IDirectMessengerVtbl *)&UIBlinkEffect::`vftable'{for `IDirectMessenger'};
    LOBYTE(v7[1].m_pcName) = 0;
  }
  else
  {
    v7 = 0;
  }
  if ( v7 )
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  v11 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v7);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, unsigned int, PgWin *, NiColorA *))v7->vfptr[129].__vecDelDtor)(
                          v7,
                          iXPos,
                          iYPos,
                          uiWidth,
                          uiHeight,
                          pkParent,
                          kColor) )
  {
    ((void (__thiscall *)(PgWin *))v7->vfptr[89].__vecDelDtor)(v7);
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = (UIBlinkEffect *)v7;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v7);
    if ( result.m_pObject )
    {
      v8 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v8 )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      }
    }
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = 0;
  }
  return v9;
}
// 978784: using guessed type void (__thiscall *UIBlinkEffect::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9787A4: using guessed type int (__thiscall *UIBlinkEffect::`vftable'{for `NiNode'})(void *p, char);

//----- (00443250) --------------------------------------------------------
UIBlinkEffect *__thiscall UIBlinkEffect::`vector deleting destructor'(UIBlinkEffect *this, unsigned int a2)
{
  UIBlinkEffect *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&UIBlinkEffect::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&UIBlinkEffect::`vftable'{for `IDirectMessenger'};
  PgWinSpr::~PgWinSpr((PgWinSpr *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 978784: using guessed type void (__thiscall *UIBlinkEffect::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9787A4: using guessed type int (__thiscall *UIBlinkEffect::`vftable'{for `NiNode'})(void *p, char);

//----- (00443290) --------------------------------------------------------
void __thiscall UIUtil::SetParent(UIUtil *this, PgWin *pkParent)
{
  this->m_pkParent = pkParent;
}

//----- (004432A0) --------------------------------------------------------
void __thiscall UIUtil::SetOffset(UIUtil *this, int iXOff, int iYOff)
{
  this->m_iXOff = iXOff;
  this->m_iYOff = iYOff;
}

//----- (004432C0) --------------------------------------------------------
void __thiscall UIUtil::GetOffset(UIUtil *this, int *iXOff, int *iYOff)
{
  *iXOff = this->m_iXOff;
  *iYOff = this->m_iYOff;
}

//----- (004432E0) --------------------------------------------------------
PgWinText *__stdcall UIUtil::CreateAttachedText(PgWin *pkParent, char *pcText, D3DXCOLOR kColor, unsigned int uiAlign)
{
  PgWin *v5; // esi@1
  PgFont *v6; // ST10_4@1
  unsigned int v7; // ST0C_4@1
  unsigned int v8; // eax@1
  PgWinText *v9; // esi@1

  v5 = pkParent;
  v6 = Font::Get(0);
  v7 = ((int (__thiscall *)(PgWin *))v5->vfptr[37].__vecDelDtor)(v5);
  v8 = ((int (__thiscall *)(PgWin *))v5->vfptr[36].__vecDelDtor)(v5);
  v9 = PgWinText::CreateWin(0, 1, v8, v7, v6, pkParent, 0, 0);
  v9->vfptr[122].__vecDelDtor((NiRefObject *)v9, uiAlign);
  v9->vfptr[118].__vecDelDtor((NiRefObject *)v9, (unsigned int)pcText);
  v9->vfptr[117].__vecDelDtor((NiRefObject *)v9, (unsigned int)&kColor);
  v9->vfptr[60].__vecDelDtor((NiRefObject *)v9, 0);
  return v9;
}

//----- (00443370) --------------------------------------------------------
char __stdcall UIUtil::CreateFrame(const char *pkFileName, const char *pkSprName, PgWinFrame *pkWinFrame, PgFrameWork *pkFrameWork, const char *pkFrameName)
{
  return 1;
}

//----- (00443380) --------------------------------------------------------
PgFont *__stdcall UIUtil::AddOutLineFromFontType(Font::Type pkType, unsigned int dwOutline)
{
  PgFont *result; // eax@2
  PgFont *v4; // eax@3
  CSpFont *v5; // eax@4
  CSpFont *v6; // esi@4
  Font::FontDefine kFontDefine; // [sp+Ch] [bp-40h]@3
  int v8; // [sp+48h] [bp-4h]@3

  if ( (signed int)pkType < 12 )
  {
    qmemcpy(&kFontDefine, Font::GetFontDefine(pkType), sizeof(kFontDefine));
    v4 = (PgFont *)operator new(0x184u);
    v8 = 0;
    if ( v4 )
    {
      PgFont::PgFont(v4);
      v6 = v5;
    }
    else
    {
      v6 = 0;
    }
    v8 = -1;
    if ( v6 )
      CSpFont::Create(
        v6,
        (char *)kFontDefine.pFacename,
        kFontDefine.Height,
        kFontDefine.Width,
        kFontDefine.Weight,
        kFontDefine.Italic,
        kFontDefine.CharSet,
        kFontDefine.OutputPrecision,
        kFontDefine.Quality,
        kFontDefine.PitchAndFamily,
        dwOutline,
        0x200u,
        5u);
    result = (PgFont *)v6;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00443460) --------------------------------------------------------
PgWinAbbreviateText *__thiscall UIUtil::CreateTextNoTag(UIUtil *this, int uiLeft, int uiTop, int uiWidth, int uiHeight, char *pcText, PgWin *pkParent, unsigned int uiMargin, D3DXCOLOR kColor, unsigned int uiAlign, NiSourceTexture *pkTexture, bool bAutoAbberitate)
{
  PgWin *v12; // ST28_4@1
  UIUtil *v13; // esi@1
  bool v14; // ST24_1@1
  PgFont *v15; // eax@1
  PgWinAbbreviateText *v16; // esi@1

  v12 = g_pkToolTipWin;
  v13 = this;
  v14 = bAutoAbberitate;
  v15 = Font::Get(SMALL);
  v16 = PgWinAbbreviateText::CreateWin(
          uiMargin + uiLeft - v13->m_iXOff,
          uiMargin + uiTop - v13->m_iYOff,
          uiWidth - uiMargin,
          uiHeight - uiMargin,
          v15,
          pkParent,
          0,
          0,
          0,
          v14,
          v12,
          0x1Eu);
  v16->vfptr[122].__vecDelDtor((NiRefObject *)v16, uiAlign);
  v16->vfptr[117].__vecDelDtor((NiRefObject *)v16, (unsigned int)&kColor);
  v16->vfptr[118].__vecDelDtor((NiRefObject *)v16, (unsigned int)pcText);
  v16->vfptr[60].__vecDelDtor((NiRefObject *)v16, 0);
  return v16;
}

//----- (00443500) --------------------------------------------------------
void __thiscall UIUtil::UIUtil(UIUtil *this)
{
  UIUtil *v1; // esi@1
  NiAVObject *v2; // edi@1

  v1 = this;
  this->vfptr = (UIUtilVtbl *)&UIUtil::`vftable';
  this->m_spUIGeom.m_pObject = 0;
  this->m_iXOff = 0;
  this->m_iYOff = 0;
  this->m_pkParent = 0;
  v2 = this->m_spUIGeom.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
    v1->m_spUIGeom.m_pObject = 0;
  }
}
// 9789EC: using guessed type int (__thiscall *UIUtil::`vftable')(void *p, char);

//----- (00443580) --------------------------------------------------------
void __thiscall UIUtil::~UIUtil(UIUtil *this)
{
  UIUtil *v1; // edi@1
  NiAVObject *v2; // esi@1
  NiAVObject *v3; // edi@6

  v1 = this;
  this->vfptr = (UIUtilVtbl *)&UIUtil::`vftable';
  v2 = this->m_spUIGeom.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spUIGeom.m_pObject = 0;
  }
  v3 = v1->m_spUIGeom.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
  {
    if ( v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  }
}
// 9789EC: using guessed type int (__thiscall *UIUtil::`vftable')(void *p, char);

//----- (00443620) --------------------------------------------------------
void __thiscall UIUtil::SetUIGeom(UIUtil *this, NiAVObject *pkNode)
{
  UIUtil *v2; // ebx@1
  NiAVObject *v3; // esi@1

  v2 = this;
  v3 = this->m_spUIGeom.m_pObject;
  if ( v3 != pkNode )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spUIGeom.m_pObject = pkNode;
    if ( pkNode )
      InterlockedIncrement((volatile LONG *)&pkNode->m_uiRefCount);
  }
}

//----- (00443670) --------------------------------------------------------
PgWinBut *__thiscall UIUtil::CreateBtn(UIUtil *this, unsigned int uiCmdMsg, char *pcNormal, char *pcFocus, char *pcPushed, char *pcDisable, NiSourceTexture *pkTexture)
{
  UIUtil *v7; // esi@1
  PgSprData *v8; // edi@1

  v7 = this;
  v8 = PgSprData::Create(this->m_spUIGeom.m_pObject, pcNormal, (int *)&pcNormal, (int *)&pkTexture, pkTexture);
  if ( pcFocus )
    PgSprData::Add(v8, v7->m_spUIGeom.m_pObject, pcFocus);
  if ( pcPushed )
    PgSprData::Add(v8, v7->m_spUIGeom.m_pObject, pcPushed);
  if ( pcDisable )
    PgSprData::Add(v8, v7->m_spUIGeom.m_pObject, pcDisable);
  return PgWinBut::CreateWin(
           (int)&pcNormal[-v7->m_iXOff],
           (int)pkTexture - v7->m_iYOff,
           v8,
           v7->m_pkParent,
           uiCmdMsg,
           0,
           0);
}

//----- (00443700) --------------------------------------------------------
PgWinBut *__thiscall UIUtil::CreateBtnNoSpr(UIUtil *this, unsigned int uiCmdMsg, char *pcTag)
{
  UIUtil *v3; // esi@1
  PgWinBut *result; // eax@2
  int uiLeft; // [sp+4h] [bp-Ch]@1
  int uiTop; // [sp+8h] [bp-8h]@1
  unsigned int uiWidth; // [sp+Ch] [bp-4h]@1

  v3 = this;
  if ( PgUtil::GetTriShapeRect(this->m_spUIGeom.m_pObject, pcTag, &uiLeft, &uiTop, &uiWidth, (unsigned int *)&pcTag) )
    result = PgWinBut::CreateWin(
               uiLeft - v3->m_iXOff,
               uiTop - v3->m_iYOff,
               uiWidth,
               (unsigned int)pcTag,
               v3->m_pkParent,
               uiCmdMsg,
               0,
               0);
  else
    result = 0;
  return result;
}

//----- (00443770) --------------------------------------------------------
PgWinCloseBut *__thiscall UIUtil::CreateCloseBtn(UIUtil *this, char *pcNormal, char *pcFocus, char *pcClick)
{
  UIUtil *v4; // esi@1
  PgSprData *v5; // edi@1
  int uiLeft; // [sp+8h] [bp-4h]@1

  v4 = this;
  v5 = PgSprData::Create(this->m_spUIGeom.m_pObject, pcNormal, &uiLeft, (int *)&pcNormal, 0);
  if ( pcFocus )
    PgSprData::Add(v5, v4->m_spUIGeom.m_pObject, pcFocus);
  if ( pcClick )
    PgSprData::Add(v5, v4->m_spUIGeom.m_pObject, pcClick);
  return PgWinCloseBut::CreateWin(uiLeft - v4->m_iXOff, (int)&pcNormal[-v4->m_iYOff], v5, v4->m_pkParent);
}

//----- (004437E0) --------------------------------------------------------
ImeEditWinEx *__thiscall UIUtil::CreateEditEx(UIUtil *this, char *pcTag, int iLimit, EditWin::Type eType, NiSourceTexture *pkTexture, bool bClearTextOnEnd)
{
  char *v6; // edi@1
  UIUtil *v7; // esi@1
  ImeEditWinEx *result; // eax@2
  PgSprData *v9; // eax@3
  unsigned int uiWidth; // [sp+8h] [bp-Ch]@1
  unsigned int uiHeight; // [sp+Ch] [bp-8h]@1
  int uiLeft; // [sp+10h] [bp-4h]@1

  v6 = pcTag;
  v7 = this;
  if ( PgUtil::GetTriShapeRect(this->m_spUIGeom.m_pObject, pcTag, &uiLeft, (int *)&pcTag, &uiWidth, &uiHeight) )
  {
    v9 = PgSprData::Create(v7->m_spUIGeom.m_pObject, v6, &uiLeft, (int *)&pcTag, pkTexture);
    PgWinSpr::CreateWin(uiLeft, (int)pcTag, v9, v7->m_pkParent, 0, 0);
    result = ImeEditWinEx::CreateWin(
               uiLeft - v7->m_iXOff + 2,
               (int)&pcTag[-v7->m_iYOff + 2],
               uiWidth - 3,
               uiHeight,
               v7->m_pkParent,
               eType,
               iLimit,
               0,
               bClearTextOnEnd,
               0,
               1,
               0);
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00443890) --------------------------------------------------------
EditWin *__thiscall UIUtil::CreateEdit(UIUtil *this, char *pcTag, int iLimit, EditWin::Type eType, NiSourceTexture *pkTexture, bool bClearTextOnEnd)
{
  char *v6; // edi@1
  UIUtil *v7; // esi@1
  EditWin *result; // eax@2
  PgSprData *v9; // eax@3
  unsigned int uiWidth; // [sp+8h] [bp-Ch]@1
  unsigned int uiHeight; // [sp+Ch] [bp-8h]@1
  int uiLeft; // [sp+10h] [bp-4h]@1

  v6 = pcTag;
  v7 = this;
  if ( PgUtil::GetTriShapeRect(this->m_spUIGeom.m_pObject, pcTag, &uiLeft, (int *)&pcTag, &uiWidth, &uiHeight) )
  {
    v9 = PgSprData::Create(v7->m_spUIGeom.m_pObject, v6, &uiLeft, (int *)&pcTag, pkTexture);
    PgWinSpr::CreateWin(uiLeft - v7->m_iXOff, (int)&pcTag[-v7->m_iYOff], v9, v7->m_pkParent, 0, 0);
    result = EditWin::CreateWin(
               uiLeft - v7->m_iXOff + 2,
               (int)&pcTag[-v7->m_iYOff + 4],
               uiWidth + 10,
               uiHeight,
               v7->m_pkParent,
               eType,
               iLimit,
               1u,
               bClearTextOnEnd,
               0,
               1);
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00443940) --------------------------------------------------------
PgWinText *__thiscall UIUtil::CreateTextNoSprEx(UIUtil *this, char *pcTag, char *pcText, D3DXCOLOR kColor, unsigned int uiAlign, unsigned int uiMinusLeft, unsigned int uiMinusTop)
{
  UIUtil *v7; // esi@1
  PgWinText *result; // eax@2
  PgWin *v9; // ST14_4@3
  PgFont *v10; // eax@3
  PgWinText *v11; // esi@3
  int uiLeft; // [sp+4h] [bp-Ch]@1
  int uiTop; // [sp+8h] [bp-8h]@1
  unsigned int uiWidth; // [sp+Ch] [bp-4h]@1

  v7 = this;
  if ( PgUtil::GetTriShapeRect(this->m_spUIGeom.m_pObject, pcTag, &uiLeft, &uiTop, &uiWidth, (unsigned int *)&pcTag) )
  {
    v9 = v7->m_pkParent;
    v10 = Font::Get(SMALL);
    v11 = PgWinText::CreateWin(
            uiLeft - v7->m_iXOff - uiMinusLeft - 2,
            uiTop - v7->m_iYOff - uiMinusTop + 2,
            uiWidth,
            (unsigned int)pcTag,
            v10,
            v9,
            0,
            0);
    v11->vfptr[122].__vecDelDtor((NiRefObject *)v11, uiAlign);
    v11->vfptr[117].__vecDelDtor((NiRefObject *)v11, (unsigned int)&kColor);
    v11->vfptr[118].__vecDelDtor((NiRefObject *)v11, (unsigned int)pcText);
    v11->vfptr[60].__vecDelDtor((NiRefObject *)v11, 0);
    result = v11;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00443A00) --------------------------------------------------------
PgWinText *__thiscall UIUtil::CreateTextNoSpr(UIUtil *this, char *pcTag, char *pcText, D3DXCOLOR kColor, unsigned int uiAlign)
{
  UIUtil *v5; // esi@1
  PgWinText *result; // eax@2
  PgWin *v7; // ST14_4@3
  PgFont *v8; // eax@3
  PgWinText *v9; // esi@3
  int uiLeft; // [sp+4h] [bp-Ch]@1
  int uiTop; // [sp+8h] [bp-8h]@1
  unsigned int uiWidth; // [sp+Ch] [bp-4h]@1

  v5 = this;
  if ( PgUtil::GetTriShapeRect(this->m_spUIGeom.m_pObject, pcTag, &uiLeft, &uiTop, &uiWidth, (unsigned int *)&pcTag) )
  {
    v7 = v5->m_pkParent;
    v8 = Font::Get(SMALL);
    v9 = PgWinText::CreateWin(
           uiLeft - v5->m_iXOff - 2,
           uiTop - v5->m_iYOff + 2,
           uiWidth,
           (unsigned int)pcTag,
           v8,
           v7,
           0,
           0);
    v9->vfptr[122].__vecDelDtor((NiRefObject *)v9, uiAlign);
    v9->vfptr[117].__vecDelDtor((NiRefObject *)v9, (unsigned int)&kColor);
    v9->vfptr[118].__vecDelDtor((NiRefObject *)v9, (unsigned int)pcText);
    v9->vfptr[60].__vecDelDtor((NiRefObject *)v9, 0);
    result = v9;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00443AC0) --------------------------------------------------------
PgWinSpr *__thiscall UIUtil::CreateSpr(UIUtil *this, char *pcTag, NiSourceTexture *pkTexture)
{
  UIUtil *v3; // esi@1
  PgSprData *v4; // eax@1

  v3 = this;
  v4 = PgSprData::Create(this->m_spUIGeom.m_pObject, pcTag, (int *)&pcTag, (int *)&pkTexture, pkTexture);
  return PgWinSpr::CreateWin((int)&pcTag[-v3->m_iXOff], (int)pkTexture - v3->m_iYOff, v4, v3->m_pkParent, 0, 0);
}

//----- (00443B10) --------------------------------------------------------
IconWin *__thiscall UIUtil::CreateIcon(UIUtil *this, const char *pkIconName, int Index, int LbuttonMsg, int RbuttonMgg, UIUtil::IconCreateFunc *rFunction)
{
  UIUtil *v6; // esi@1
  PgSprData *v7; // eax@1
  int v8; // esi@1
  int v9; // edi@1
  int uiLeft; // [sp+8h] [bp-4h]@1

  v6 = this;
  v7 = PgSprData::Create(this->m_spUIGeom.m_pObject, pkIconName, &uiLeft, (int *)&pkIconName, 0);
  PgWinSpr::CreateWin(uiLeft - v6->m_iXOff, (int)&pkIconName[-v6->m_iYOff], v7, v6->m_pkParent, 0, 0);
  v8 = ((int (__stdcall *)(int, const char *, PgWin *))rFunction->vfptr->Create)(
         uiLeft - v6->m_iXOff + 1,
         &pkIconName[-v6->m_iYOff + 1],
         v6->m_pkParent);
  (*(void (__thiscall **)(int, int))(*(_DWORD *)v8 + 516))(v8, LbuttonMsg);
  v9 = Index;
  (*(void (__thiscall **)(int, int))(*(_DWORD *)v8 + 520))(v8, Index);
  (*(void (__thiscall **)(int, int))(*(_DWORD *)v8 + 560))(v8, RbuttonMgg);
  (*(void (__thiscall **)(int, int))(*(_DWORD *)v8 + 564))(v8, v9);
  return (IconWin *)v8;
}

//----- (00443BC0) --------------------------------------------------------
PgWinBar *__thiscall UIUtil::CreateBar(UIUtil *this, char *pkTag, NiSourceTexture *pkTexture)
{
  UIUtil *v3; // esi@1
  PgSprData *v4; // eax@1
  PgWinBar *v5; // esi@1

  v3 = this;
  v4 = PgSprData::Create(this->m_spUIGeom.m_pObject, pkTag, (int *)&pkTag, (int *)&pkTexture, pkTexture);
  v5 = PgWinBar::CreateWin((int)&pkTag[-v3->m_iXOff], (int)pkTexture - v3->m_iYOff, v4, v3->m_pkParent, BGT_RIGHT);
  v5->vfptr[60].__vecDelDtor((NiRefObject *)v5, 0);
  return v5;
}

//----- (00443C20) --------------------------------------------------------
PgWinAbbreviateText *__thiscall UIUtil::CreateText(UIUtil *this, char *pcTag, char *pcText, unsigned int uiMargin, D3DXCOLOR kColor, unsigned int uiAlign, NiSourceTexture *pkTexture, bool bAutoAbberitate)
{
  UIUtil *v8; // esi@1
  PgSprData *v9; // edi@1
  PgSprData::PgHitTester *v10; // eax@1
  unsigned int v11; // edi@1
  unsigned int v12; // ebx@1
  PgWin *v13; // ST28_4@1
  bool v14; // ST24_1@1
  PgWin *v15; // ST14_4@1
  PgFont *v16; // eax@1
  PgWinAbbreviateText *v17; // esi@1

  v8 = this;
  v9 = PgSprData::Create(this->m_spUIGeom.m_pObject, pcTag, (int *)&pcTag, (int *)&pkTexture, pkTexture);
  PgWinSpr::CreateWin((int)&pcTag[-v8->m_iXOff], (int)pkTexture - v8->m_iYOff, v9, v8->m_pkParent, 0, 0);
  v10 = v9->m_akHitTester.m_pBase->m_pObject;
  v11 = v10->m_uiWidth;
  v12 = v10->m_uiHeight;
  v13 = g_pkToolTipWin;
  v14 = bAutoAbberitate;
  v15 = v8->m_pkParent;
  v16 = Font::Get(SMALL);
  v17 = PgWinAbbreviateText::CreateWin(
          (int)(&pcTag[uiMargin] - v8->m_iXOff),
          (int)&pkTexture->vfptr + uiMargin - v8->m_iYOff + 2,
          v11 - uiMargin,
          v12 - uiMargin,
          v16,
          v15,
          0,
          0,
          0,
          v14,
          v13,
          0x1Eu);
  v17->vfptr[122].__vecDelDtor((NiRefObject *)v17, uiAlign);
  v17->vfptr[117].__vecDelDtor((NiRefObject *)v17, (unsigned int)&kColor);
  v17->vfptr[118].__vecDelDtor((NiRefObject *)v17, (unsigned int)pcText);
  return v17;
}

//----- (00443CF0) --------------------------------------------------------
PgWinText *__thiscall UIUtil::CreateTextEx(UIUtil *this, char *pcTag, char *pcText, unsigned int uiMargin, D3DXCOLOR kColor, unsigned int uiAlign, NiSourceTexture *pkTexture, int uiMinusTop, int uiMinusLeft)
{
  UIUtil *v9; // esi@1
  PgSprData *v10; // edi@1
  PgSprData::PgHitTester *v11; // eax@1
  unsigned int v12; // edi@1
  unsigned int v13; // ebx@1
  PgWin *v14; // ST20_4@1
  PgFont *v15; // eax@1
  PgWinText *v16; // esi@1

  v9 = this;
  v10 = PgSprData::Create(this->m_spUIGeom.m_pObject, pcTag, (int *)&pcTag, (int *)&pkTexture, pkTexture);
  PgWinSpr::CreateWin((int)&pcTag[-v9->m_iXOff], (int)pkTexture - v9->m_iYOff, v10, v9->m_pkParent, 0, 0);
  v11 = v10->m_akHitTester.m_pBase->m_pObject;
  v12 = v11->m_uiWidth;
  v13 = v11->m_uiHeight;
  v14 = v9->m_pkParent;
  v15 = Font::Get(SMALL);
  v16 = PgWinText::CreateWin(
          (int)(&pcTag[uiMargin] + -uiMinusLeft - v9->m_iXOff),
          (int)pkTexture + uiMargin - v9->m_iYOff + uiMinusTop,
          v12 - uiMargin,
          v13 - uiMargin,
          v15,
          v14,
          0,
          0);
  v16->vfptr[122].__vecDelDtor((NiRefObject *)v16, uiAlign);
  v16->vfptr[117].__vecDelDtor((NiRefObject *)v16, (unsigned int)&kColor);
  v16->vfptr[118].__vecDelDtor((NiRefObject *)v16, (unsigned int)pcText);
  v16->vfptr[60].__vecDelDtor((NiRefObject *)v16, 0);
  return v16;
}

//----- (00443DD0) --------------------------------------------------------
PgWinBut *__thiscall UIUtil::CreateButton(UIUtil *this, unsigned int uiCmdMsg, const char *pkButtonName, NiSourceTexture *pkTexture, int nCheckButtonCount)
{
  UIUtil *v5; // esi@1
  const char *v6; // ecx@1
  int v8; // edi@9
  const char *v9; // ecx@10
  PgWinBut *v10; // esi@26
  int uiTop; // [sp+14h] [bp-C8h]@3
  int uiLeft; // [sp+18h] [bp-C4h]@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Right; // [sp+1Ch] [bp-C0h]@9
  PgSprData *pkSprData; // [sp+20h] [bp-BCh]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strButtonName; // [sp+24h] [bp-B8h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strName; // [sp+40h] [bp-9Ch]@10
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strNorName; // [sp+5Ch] [bp-80h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strdata[3]; // [sp+78h] [bp-64h]@9
  int v19; // [sp+D8h] [bp-4h]@1

  v5 = this;
  pkSprData = (PgSprData *)pkTexture;
  strButtonName._Myres = 15;
  strButtonName._Mysize = 0;
  strButtonName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &strButtonName,
    pkButtonName,
    strlen(pkButtonName));
  v19 = 0;
  std::operator+<char,std::char_traits<char>,std::allocator<char>>(&strNorName, &strButtonName, Right);
  v6 = strNorName._Bx._Ptr;
  LOBYTE(v19) = 1;
  if ( strNorName._Myres < 0x10 )
    v6 = (const char *)&strNorName;
  pkSprData = PgSprData::Create(v5->m_spUIGeom.m_pObject, v6, &uiLeft, &uiTop, (NiSourceTexture *)pkSprData);
  if ( pkSprData )
  {
    strdata[0]._Myres = 15;
    strdata[0]._Mysize = 0;
    strdata[0]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(strdata, "Click", 5u);
    LOBYTE(v19) = 2;
    strdata[1]._Myres = 15;
    strdata[1]._Mysize = 0;
    strdata[1]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strdata[1], "Over", 4u);
    LOBYTE(v19) = 3;
    strdata[2]._Myres = 15;
    strdata[2]._Mysize = 0;
    strdata[2]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strdata[2], "Disable", 7u);
    LOBYTE(v19) = 4;
    v8 = 0;
    _Right = strdata;
    while ( 1 )
    {
      std::operator+<char,std::char_traits<char>,std::allocator<char>>(&strName, &strButtonName, _Right);
      v9 = strName._Bx._Ptr;
      LOBYTE(v19) = 5;
      if ( strName._Myres < 0x10 )
        v9 = (const char *)&strName;
      if ( !PgSprData::Add(pkSprData, v5->m_spUIGeom.m_pObject, v9) )
        break;
      LOBYTE(v19) = 4;
      if ( strName._Myres >= 0x10 )
        operator delete(strName._Bx._Ptr);
      ++_Right;
      if ( (unsigned int)++v8 >= 3 )
        goto LABEL_26;
    }
    if ( nCheckButtonCount == v8 + 1 )
    {
      LOBYTE(v19) = 4;
      if ( strName._Myres >= 0x10 )
        operator delete(strName._Bx._Ptr);
LABEL_26:
      v10 = PgWinBut::CreateWin(uiLeft - v5->m_iXOff, uiTop - v5->m_iYOff, pkSprData, v5->m_pkParent, uiCmdMsg, 0, 0);
      LOBYTE(v19) = 1;
      `eh vector destructor iterator'(
        strdata,
        0x1Cu,
        3,
        (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
      if ( strNorName._Myres >= 0x10 )
        operator delete(strNorName._Bx._Ptr);
      strNorName._Myres = 15;
      strNorName._Mysize = 0;
      strNorName._Bx._Buf[0] = 0;
      if ( strButtonName._Myres >= 0x10 )
        operator delete(strButtonName._Bx._Ptr);
      return v10;
    }
    if ( strName._Myres >= 0x10 )
      operator delete(strName._Bx._Ptr);
    strName._Myres = 15;
    strName._Mysize = 0;
    strName._Bx._Buf[0] = 0;
    LOBYTE(v19) = 1;
    `eh vector destructor iterator'(
      strdata,
      0x1Cu,
      3,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    if ( strNorName._Myres >= 0x10 )
      operator delete(strNorName._Bx._Ptr);
    strNorName._Myres = 15;
    strNorName._Mysize = 0;
    strNorName._Bx._Buf[0] = 0;
    if ( strButtonName._Myres >= 0x10 )
    {
      operator delete(strButtonName._Bx._Ptr);
      return 0;
    }
  }
  else
  {
    if ( strNorName._Myres >= 0x10 )
      operator delete(strNorName._Bx._Ptr);
    strNorName._Myres = 15;
    strNorName._Mysize = 0;
    strNorName._Bx._Buf[0] = 0;
    if ( strButtonName._Myres >= 0x10 )
      operator delete(strButtonName._Bx._Ptr);
  }
  return 0;
}

//----- (00444110) --------------------------------------------------------
ColumnBut *__thiscall UIUtil::CreateCheckButton(UIUtil *this, unsigned int uiCmdMsg, const char *pkButtonTagName, NiSourceTexture *pkTexture, int nCheckButtonCount)
{
  UIUtil *v5; // esi@1
  const char *v6; // ecx@1
  int v8; // edi@9
  const char *v9; // ecx@10
  ColumnBut *v10; // esi@26
  int uiTop; // [sp+14h] [bp-C8h]@3
  int uiLeft; // [sp+18h] [bp-C4h]@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Right; // [sp+1Ch] [bp-C0h]@9
  PgSprData *pkSprData; // [sp+20h] [bp-BCh]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strButtonName; // [sp+24h] [bp-B8h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strName; // [sp+40h] [bp-9Ch]@10
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strNorName; // [sp+5Ch] [bp-80h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strdata[3]; // [sp+78h] [bp-64h]@9
  int v19; // [sp+D8h] [bp-4h]@1

  v5 = this;
  pkSprData = (PgSprData *)pkTexture;
  strButtonName._Myres = 15;
  strButtonName._Mysize = 0;
  strButtonName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &strButtonName,
    pkButtonTagName,
    strlen(pkButtonTagName));
  v19 = 0;
  std::operator+<char,std::char_traits<char>,std::allocator<char>>(&strNorName, &strButtonName, off_9789CC);
  v6 = strNorName._Bx._Ptr;
  LOBYTE(v19) = 1;
  if ( strNorName._Myres < 0x10 )
    v6 = (const char *)&strNorName;
  pkSprData = PgSprData::Create(v5->m_spUIGeom.m_pObject, v6, &uiLeft, &uiTop, (NiSourceTexture *)pkSprData);
  if ( pkSprData )
  {
    strdata[0]._Myres = 15;
    strdata[0]._Mysize = 0;
    strdata[0]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(strdata, "Click", 5u);
    LOBYTE(v19) = 2;
    strdata[1]._Myres = 15;
    strdata[1]._Mysize = 0;
    strdata[1]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strdata[1], "Over", 4u);
    LOBYTE(v19) = 3;
    strdata[2]._Myres = 15;
    strdata[2]._Mysize = 0;
    strdata[2]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strdata[2], "Disable", 7u);
    LOBYTE(v19) = 4;
    v8 = 0;
    _Right = strdata;
    while ( 1 )
    {
      std::operator+<char,std::char_traits<char>,std::allocator<char>>(&strName, &strButtonName, _Right);
      v9 = strName._Bx._Ptr;
      LOBYTE(v19) = 5;
      if ( strName._Myres < 0x10 )
        v9 = (const char *)&strName;
      if ( !PgSprData::Add(pkSprData, v5->m_spUIGeom.m_pObject, v9) )
        break;
      LOBYTE(v19) = 4;
      if ( strName._Myres >= 0x10 )
        operator delete(strName._Bx._Ptr);
      ++_Right;
      if ( (unsigned int)++v8 >= 3 )
        goto LABEL_26;
    }
    if ( nCheckButtonCount == v8 + 1 )
    {
      LOBYTE(v19) = 4;
      if ( strName._Myres >= 0x10 )
        operator delete(strName._Bx._Ptr);
LABEL_26:
      v10 = ColumnBut::CreateWin(uiLeft - v5->m_iXOff, uiTop - v5->m_iYOff, pkSprData, v5->m_pkParent, uiCmdMsg, 0);
      LOBYTE(v19) = 1;
      `eh vector destructor iterator'(
        strdata,
        0x1Cu,
        3,
        (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
      if ( strNorName._Myres >= 0x10 )
        operator delete(strNorName._Bx._Ptr);
      strNorName._Myres = 15;
      strNorName._Mysize = 0;
      strNorName._Bx._Buf[0] = 0;
      if ( strButtonName._Myres >= 0x10 )
        operator delete(strButtonName._Bx._Ptr);
      return v10;
    }
    if ( strName._Myres >= 0x10 )
      operator delete(strName._Bx._Ptr);
    strName._Myres = 15;
    strName._Mysize = 0;
    strName._Bx._Buf[0] = 0;
    LOBYTE(v19) = 1;
    `eh vector destructor iterator'(
      strdata,
      0x1Cu,
      3,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    if ( strNorName._Myres >= 0x10 )
      operator delete(strNorName._Bx._Ptr);
    strNorName._Myres = 15;
    strNorName._Mysize = 0;
    strNorName._Bx._Buf[0] = 0;
    if ( strButtonName._Myres >= 0x10 )
    {
      operator delete(strButtonName._Bx._Ptr);
      return 0;
    }
  }
  else
  {
    if ( strNorName._Myres >= 0x10 )
      operator delete(strNorName._Bx._Ptr);
    strNorName._Myres = 15;
    strNorName._Mysize = 0;
    strNorName._Bx._Buf[0] = 0;
    if ( strButtonName._Myres >= 0x10 )
      operator delete(strButtonName._Bx._Ptr);
  }
  return 0;
}

//----- (00444450) --------------------------------------------------------
UIUtil *__thiscall UIUtil::`vector deleting destructor'(UIUtil *this, unsigned int a2)
{
  UIUtil *v2; // esi@1

  v2 = this;
  UIUtil::~UIUtil(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00444480) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__cdecl std::operator+<char,std::char_traits<char>,std::allocator<char>>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Left, const char *_Right)
{
  unsigned int v3; // edi@1
  unsigned int v4; // eax@1
  bool v5; // cf@4
  _BYTE *v6; // eax@5

  result->_Myres = 15;
  result->_Mysize = 0;
  result->_Bx._Buf[0] = 0;
  v3 = result->_Mysize;
  v4 = _Left->_Mysize + strlen(_Right);
  if ( v3 <= v4
    && result->_Myres != v4
    && (unsigned __int8)std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Grow(result, v4, 1) )
  {
    v5 = result->_Myres < 0x10;
    result->_Mysize = v3;
    if ( v5 )
      v6 = result;
    else
      v6 = result->_Bx._Ptr;
    v6[v3] = 0;
  }
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(result, _Left, 0, 0xFFFFFFFF);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(result, _Right, strlen(_Right));
  return result;
}

//----- (00444560) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__cdecl std::operator+<char,std::char_traits<char>,std::allocator<char>>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Left, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Right)
{
  unsigned int v3; // edi@1
  unsigned int v4; // eax@1
  bool v5; // cf@4
  _BYTE *v6; // eax@5

  result->_Myres = 15;
  result->_Mysize = 0;
  result->_Bx._Buf[0] = 0;
  v3 = result->_Mysize;
  v4 = _Right->_Mysize + _Left->_Mysize;
  if ( v3 <= v4
    && result->_Myres != v4
    && (unsigned __int8)std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Grow(result, v4, 1) )
  {
    v5 = result->_Myres < 0x10;
    result->_Mysize = v3;
    if ( v5 )
      v6 = result;
    else
      v6 = result->_Bx._Ptr;
    v6[v3] = 0;
  }
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(result, _Left, 0, 0xFFFFFFFF);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(result, _Right, 0, 0xFFFFFFFF);
  return result;
}

//----- (00444620) --------------------------------------------------------
void __thiscall ZlibUtil::ZlibUtil(ZlibUtil *this)
{
  this->vfptr = (ZlibUtilVtbl *)ZlibUtil::`vftable';
  this->zalloc = 0;
  this->zfree = 0;
  this->opaque = 0;
  this->m_uiSize = 0;
}
// 978ABC: using guessed type int (__stdcall *ZlibUtil::`vftable'[2])(int);

//----- (00444640) --------------------------------------------------------
unsigned int __thiscall ZlibUtil::load_input(ZlibUtil *this)
{
  ZlibUtil *v1; // esi@1
  _iobuf *v2; // ST0C_4@2

  v1 = this;
  if ( !this->avail_in )
  {
    v2 = this->fin;
    this->next_in = this->input_buffer;
    this->avail_in = fread(this->input_buffer, 1u, 0x1000u, v2);
  }
  return v1->avail_in;
}

//----- (00444670) --------------------------------------------------------
unsigned int __thiscall ZlibUtil::flush_output(ZlibUtil *this)
{
  ZlibUtil *v1; // esi@1
  unsigned int v2; // edi@1
  char *v3; // ebx@2

  v1 = this;
  v2 = 4096 - this->avail_out;
  if ( 4096 != this->avail_out )
  {
    v3 = this->output_buffer;
    if ( fwrite(this->output_buffer, 1u, v2, this->fout) != v2 )
    {
      v1->err = -1;
      return 0;
    }
    v1->next_out = v3;
    v1->avail_out = 4096;
  }
  v1->m_uiSize = v2;
  return v2;
}

//----- (004446C0) --------------------------------------------------------
unsigned int __thiscall ZlibUtil::flush_outputToBuffer(ZlibUtil *this)
{
  bool v1; // zf@1
  unsigned int result; // eax@1

  result = 4096 - this->avail_out;
  v1 = 4096 == this->avail_out;
  this->m_uiSize = result;
  if ( !v1 )
  {
    this->next_out = this->output_buffer;
    this->avail_out = 4096;
  }
  return result;
}

//----- (004446F0) --------------------------------------------------------
void __thiscall zlibUtil2::zlibUtil2(zlibUtil2 *this)
{
  this->vfptr = (zlibUtil2Vtbl *)&zlibUtil2::`vftable';
  this->zalloc = 0;
  this->zfree = 0;
  this->opaque = 0;
  this->result_output_buffer = 0;
  this->result_output_size = 0;
  this->result_output_max_size = 0;
}
// 978AC8: using guessed type int (__thiscall *zlibUtil2::`vftable')(void *p, char);

//----- (00444720) --------------------------------------------------------
void __thiscall zlibUtil2::~zlibUtil2(zlibUtil2 *this)
{
  char *v1; // ecx@1

  this->vfptr = (zlibUtil2Vtbl *)&zlibUtil2::`vftable';
  v1 = this->result_output_buffer;
  if ( v1 )
    free(v1);
}
// 978AC8: using guessed type int (__thiscall *zlibUtil2::`vftable')(void *p, char);

//----- (00444740) --------------------------------------------------------
char *__thiscall zlibUtil2::flush_output(zlibUtil2 *this)
{
  zlibUtil2 *v1; // esi@1
  unsigned int v2; // edi@1
  unsigned int v3; // eax@2
  char *result; // eax@3

  v1 = this;
  v2 = 4096 - this->avail_out;
  if ( 4096 != this->avail_out )
  {
    v3 = this->result_output_max_size;
    if ( v2 + this->result_output_size > v3 )
    {
      result = (char *)realloc(this->result_output_buffer, v3 + 4096);
      v1->result_output_buffer = result;
      if ( !result )
      {
        v1->err = -1;
        return result;
      }
      v1->result_output_max_size += 4096;
    }
    memcpy(&v1->result_output_buffer[v1->result_output_size], v1->output_buffer, v2);
    v1->result_output_size += v2;
    v1->next_out = v1->output_buffer;
    v1->avail_out = 4096;
  }
  return (char *)v2;
}

//----- (004447D0) --------------------------------------------------------
int __thiscall ZlibUtil::compress(ZlibUtil *this, const char *input, const char *output, int level)
{
  ZlibUtil *v4; // esi@1
  _iobuf *v5; // ST28_4@3
  unsigned int v6; // eax@3
  int v7; // eax@4
  bool v8; // zf@4
  unsigned int v9; // edi@4
  int v10; // eax@12
  unsigned int v11; // edi@12
  int v12; // eax@22
  int result; // eax@26

  v4 = this;
  memset(this->result_input_buffer, 0, 0x1000u);
  v4->m_uiSize = 0;
  v4->err = 0;
  v4->avail_in = 0;
  v4->avail_out = 4096;
  v4->next_out = v4->output_buffer;
  v4->m_AbortFlag = 0;
  v4->fin = fopen(input, "rb");
  v4->fout = fopen(output, "wb");
  deflateInit_((z_stream_s *)&v4->next_in, level, "1.2.2", 56);
  if ( !v4->m_AbortFlag )
  {
    do
    {
      if ( !v4->avail_in )
      {
        v5 = v4->fin;
        v4->next_in = v4->input_buffer;
        v6 = fread(v4->input_buffer, 1u, 0x1000u, v5);
        v4->avail_in = v6;
        if ( !v6 )
          break;
      }
      v7 = deflate((z_stream_s *)&v4->next_in, 0);
      v9 = 4096 - v4->avail_out;
      v8 = 4096 == v4->avail_out;
      v4->err = v7;
      if ( !v8 )
      {
        if ( fwrite(v4->output_buffer, 1u, v9, v4->fout) != v9 )
        {
          v4->err = -1;
          break;
        }
        v4->next_out = v4->output_buffer;
        v4->avail_out = 4096;
      }
      v8 = v4->err == 0;
      v4->m_uiSize = v9;
    }
    while ( v8 && !v4->m_AbortFlag );
  }
  if ( v4->m_AbortFlag )
    goto LABEL_20;
  while ( 1 )
  {
    v10 = deflate((z_stream_s *)&v4->next_in, 4);
    v11 = 4096 - v4->avail_out;
    v8 = 4096 == v4->avail_out;
    v4->err = v10;
    if ( v8 )
      goto LABEL_15;
    if ( fwrite(v4->output_buffer, 1u, v11, v4->fout) != v11 )
      break;
    v4->next_out = v4->output_buffer;
    v4->avail_out = 4096;
LABEL_15:
    v4->m_uiSize = v11;
    if ( !v11 || v4->err || v4->m_AbortFlag )
      goto LABEL_20;
  }
  v4->err = -1;
LABEL_20:
  deflateEnd((z_stream_s *)&v4->next_in);
  if ( v4->m_AbortFlag )
  {
    v4->vfptr->status(v4, "User Abort");
  }
  else
  {
    v12 = v4->err;
    if ( v12 && v12 != 1 )
    {
      v4->vfptr->status(v4, "Zlib Error");
    }
    else
    {
      v4->vfptr->status(v4, "Success");
      v4->err = 0;
    }
  }
  fclose(v4->fin);
  fclose(v4->fout);
  v4->fin = 0;
  v4->fout = 0;
  result = -7;
  if ( !v4->m_AbortFlag )
    result = v4->err;
  return result;
}

//----- (004449C0) --------------------------------------------------------
int __thiscall ZlibUtil::compressToMemory(ZlibUtil *this, const char *input, int level)
{
  ZlibUtil *v3; // ebx@1
  _iobuf *v4; // ST20_4@3
  unsigned int v5; // eax@3
  int v6; // eax@4
  bool v7; // zf@4
  int v8; // ecx@4
  unsigned int v9; // edx@8
  int v10; // eax@11
  int v11; // ecx@11
  int v12; // edi@18
  char *v13; // eax@18
  int v14; // eax@23
  int result; // eax@27
  unsigned int uiOffset; // [sp+14h] [bp+8h]@8

  v3 = this;
  memset(this->result_input_buffer, 0, 0x1000u);
  v3->next_out = v3->output_buffer;
  v3->m_uiSize = 0;
  v3->err = 0;
  v3->avail_in = 0;
  v3->avail_out = 4096;
  v3->m_AbortFlag = 0;
  v3->fin = fopen(input, "rb");
  deflateInit_((z_stream_s *)&v3->next_in, level, "1.2.2", 56);
  while ( !v3->m_AbortFlag )
  {
    if ( !v3->avail_in )
    {
      v4 = v3->fin;
      v3->next_in = v3->input_buffer;
      v5 = fread(v3->input_buffer, 1u, 0x1000u, v4);
      v3->avail_in = v5;
      if ( !v5 )
        break;
    }
    v6 = deflate((z_stream_s *)&v3->next_in, 0);
    v8 = 4096 - v3->avail_out;
    v7 = 4096 == v3->avail_out;
    v3->err = v6;
    if ( !v7 )
    {
      v3->next_out = v3->output_buffer;
      v3->avail_out = 4096;
    }
    v3->m_uiSize = v8;
    if ( v6 )
      break;
  }
  v9 = v3->m_uiSize;
  uiOffset = v9;
  if ( v9 > 0 )
    qmemcpy(v3->result_input_buffer, v3->output_buffer, v9);
  if ( !v3->m_AbortFlag )
  {
    do
    {
      v10 = deflate((z_stream_s *)&v3->next_in, 4);
      v11 = 4096 - v3->avail_out;
      v7 = 4096 == v3->avail_out;
      v3->err = v10;
      if ( !v7 )
      {
        v3->next_out = v3->output_buffer;
        v3->avail_out = 4096;
      }
      v3->m_uiSize = v11;
    }
    while ( v11 && !v10 && !v3->m_AbortFlag );
    v9 = uiOffset;
  }
  if ( v9 < v9 + v3->m_uiSize )
  {
    v12 = -8268 - (_DWORD)v3;
    v13 = &v3->result_input_buffer[v9];
    while ( 1 )
    {
      *v13 = v13[-4096 - v9];
      if ( (unsigned int)&(++v13)[v12] >= v9 + v3->m_uiSize )
        break;
      v12 = -8268 - (_DWORD)v3;
    }
  }
  v3->m_uiSize += v9;
  deflateEnd((z_stream_s *)&v3->next_in);
  if ( v3->m_AbortFlag )
  {
    v3->vfptr->status(v3, "User Abort");
  }
  else
  {
    v14 = v3->err;
    if ( v14 && v14 != 1 )
    {
      v3->vfptr->status(v3, "Zlib Error");
    }
    else
    {
      v3->vfptr->status(v3, "Success");
      v3->err = 0;
    }
  }
  fclose(v3->fin);
  v3->fin = 0;
  result = -7;
  if ( !v3->m_AbortFlag )
    result = v3->err;
  return result;
}

//----- (00444BA0) --------------------------------------------------------
int __thiscall ZlibUtil::decompress(ZlibUtil *this, const char *input, const char *output)
{
  ZlibUtil *v3; // esi@1
  _iobuf *v4; // ST24_4@3
  unsigned int v5; // eax@3
  int v6; // eax@4
  bool v7; // zf@4
  unsigned int v8; // edi@4
  int v9; // eax@12
  unsigned int v10; // edi@12
  int v11; // eax@22
  _iobuf *v12; // eax@28
  int result; // eax@30

  v3 = this;
  memset(this->result_input_buffer, 0, 0x1000u);
  v3->err = 0;
  v3->avail_in = 0;
  v3->avail_out = 4096;
  v3->next_out = v3->output_buffer;
  v3->m_AbortFlag = 0;
  v3->fin = fopen(input, "rb");
  v3->fout = fopen(output, "wb");
  inflateInit_((z_stream_s *)&v3->next_in, "1.2.2", 56);
  if ( !v3->m_AbortFlag )
  {
    do
    {
      if ( !v3->avail_in )
      {
        v4 = v3->fin;
        v3->next_in = v3->input_buffer;
        v5 = fread(v3->input_buffer, 1u, 0x1000u, v4);
        v3->avail_in = v5;
        if ( !v5 )
          break;
      }
      v6 = inflate((z_stream_s *)&v3->next_in, 0);
      v8 = 4096 - v3->avail_out;
      v7 = 4096 == v3->avail_out;
      v3->err = v6;
      if ( !v7 )
      {
        if ( fwrite(v3->output_buffer, 1u, v8, v3->fout) != v8 )
        {
          v3->err = -1;
          break;
        }
        v3->next_out = v3->output_buffer;
        v3->avail_out = 4096;
      }
      v7 = v3->err == 0;
      v3->m_uiSize = v8;
    }
    while ( v7 && !v3->m_AbortFlag );
  }
  if ( v3->m_AbortFlag )
    goto LABEL_20;
  while ( 1 )
  {
    v9 = inflate((z_stream_s *)&v3->next_in, 4);
    v10 = 4096 - v3->avail_out;
    v7 = 4096 == v3->avail_out;
    v3->err = v9;
    if ( v7 )
      goto LABEL_15;
    if ( fwrite(v3->output_buffer, 1u, v10, v3->fout) != v10 )
      break;
    v3->next_out = v3->output_buffer;
    v3->avail_out = 4096;
LABEL_15:
    v3->m_uiSize = v10;
    if ( !v10 || v3->err || v3->m_AbortFlag )
      goto LABEL_20;
  }
  v3->err = -1;
LABEL_20:
  inflateEnd((z_stream_s *)&v3->next_in);
  if ( v3->m_AbortFlag )
  {
    v3->vfptr->status(v3, "User Abort");
  }
  else
  {
    v11 = v3->err;
    if ( v11 && v11 != 1 )
    {
      v3->vfptr->status(v3, "Zlib Error");
    }
    else
    {
      v3->vfptr->status(v3, "Success");
      v3->err = 0;
    }
  }
  if ( v3->fin )
    fclose(v3->fin);
  v12 = v3->fout;
  v3->fin = 0;
  if ( v12 )
    fclose(v12);
  v3->fout = 0;
  result = -7;
  if ( !v3->m_AbortFlag )
    result = v3->err;
  return result;
}

//----- (00444D90) --------------------------------------------------------
int __thiscall ZlibUtil::decompressToBuffer(ZlibUtil *this, const char *input)
{
  ZlibUtil *v2; // ebx@1
  _iobuf *v3; // ST1C_4@3
  unsigned int v4; // eax@3
  int v5; // eax@4
  bool v6; // zf@4
  int v7; // ecx@4
  unsigned int v8; // edx@8
  int v9; // eax@11
  int v10; // ecx@11
  int v11; // edi@18
  char *v12; // eax@18
  int v13; // eax@23
  int result; // eax@29
  unsigned int uiOffset; // [sp+14h] [bp+8h]@8

  v2 = this;
  memset(this->result_input_buffer, 0, 0x1000u);
  v2->next_out = v2->output_buffer;
  v2->m_uiSize = 0;
  v2->err = 0;
  v2->avail_in = 0;
  v2->avail_out = 4096;
  v2->m_AbortFlag = 0;
  v2->fin = fopen(input, "rb");
  inflateInit_((z_stream_s *)&v2->next_in, "1.2.2", 56);
  while ( !v2->m_AbortFlag )
  {
    if ( !v2->avail_in )
    {
      v3 = v2->fin;
      v2->next_in = v2->input_buffer;
      v4 = fread(v2->input_buffer, 1u, 0x1000u, v3);
      v2->avail_in = v4;
      if ( !v4 )
        break;
    }
    v5 = inflate((z_stream_s *)&v2->next_in, 0);
    v7 = 4096 - v2->avail_out;
    v6 = 4096 == v2->avail_out;
    v2->err = v5;
    if ( !v6 )
    {
      v2->next_out = v2->output_buffer;
      v2->avail_out = 4096;
    }
    v2->m_uiSize = v7;
    if ( v5 )
      break;
  }
  v8 = v2->m_uiSize;
  uiOffset = v8;
  if ( v8 > 0 )
    qmemcpy(v2->result_input_buffer, v2->output_buffer, v8);
  if ( !v2->m_AbortFlag )
  {
    do
    {
      v9 = inflate((z_stream_s *)&v2->next_in, 4);
      v10 = 4096 - v2->avail_out;
      v6 = 4096 == v2->avail_out;
      v2->err = v9;
      if ( !v6 )
      {
        v2->next_out = v2->output_buffer;
        v2->avail_out = 4096;
      }
      v2->m_uiSize = v10;
    }
    while ( v10 && !v9 && !v2->m_AbortFlag );
    v8 = uiOffset;
  }
  if ( v8 < v8 + v2->m_uiSize )
  {
    v11 = -8268 - (_DWORD)v2;
    v12 = &v2->result_input_buffer[v8];
    while ( 1 )
    {
      *v12 = v12[-4096 - v8];
      if ( (unsigned int)&(++v12)[v11] >= v8 + v2->m_uiSize )
        break;
      v11 = -8268 - (_DWORD)v2;
    }
  }
  v2->m_uiSize += v8;
  inflateEnd((z_stream_s *)&v2->next_in);
  if ( v2->m_AbortFlag )
  {
    v2->vfptr->status(v2, "User Abort");
  }
  else
  {
    v13 = v2->err;
    if ( v13 && v13 != 1 )
    {
      v2->vfptr->status(v2, "Zlib Error");
    }
    else
    {
      v2->vfptr->status(v2, "Success");
      v2->err = 0;
    }
  }
  if ( v2->fin )
    fclose(v2->fin);
  v2->fin = 0;
  result = -7;
  if ( !v2->m_AbortFlag )
    result = v2->err;
  return result;
}

//----- (00444F80) --------------------------------------------------------
int __thiscall zlibUtil2::compress(zlibUtil2 *this, char *input, unsigned int input_size, char **output, unsigned int *output_size, int level)
{
  zlibUtil2 *v6; // esi@1
  char *v7; // eax@1

  v6 = this;
  this->next_in = input;
  v7 = this->result_output_buffer;
  this->err = 0;
  this->avail_in = input_size;
  v6->next_out = v6->output_buffer;
  this->avail_out = 4096;
  if ( v7 )
    free(v7);
  v6->result_output_buffer = 0;
  v6->result_output_max_size = 0;
  v6->result_output_size = 0;
  deflateInit_((z_stream_s *)&v6->next_in, level, "1.2.2", 56);
  do
  {
    v6->err = deflate((z_stream_s *)&v6->next_in, 0);
    zlibUtil2::flush_output(v6);
  }
  while ( !v6->err );
  do
    v6->err = deflate((z_stream_s *)&v6->next_in, 4);
  while ( zlibUtil2::flush_output(v6) && !v6->err );
  deflateEnd((z_stream_s *)&v6->next_in);
  if ( v6->err == 1 )
    v6->err = 0;
  *output = v6->result_output_buffer;
  *output_size = v6->result_output_size;
  return v6->err;
}

//----- (00445050) --------------------------------------------------------
int __thiscall zlibUtil2::decompress(zlibUtil2 *this, char *input, unsigned int input_size, char **output, unsigned int *output_size)
{
  zlibUtil2 *v5; // esi@1
  char *v6; // eax@1

  v5 = this;
  this->next_in = input;
  v6 = this->result_output_buffer;
  this->err = 0;
  this->avail_in = input_size;
  v5->next_out = v5->output_buffer;
  this->avail_out = 4096;
  if ( v6 )
    free(v6);
  v5->result_output_buffer = 0;
  v5->result_output_max_size = 0;
  v5->result_output_size = 0;
  inflateInit_((z_stream_s *)&v5->next_in, "1.2.2", 56);
  do
  {
    v5->err = inflate((z_stream_s *)&v5->next_in, 0);
    zlibUtil2::flush_output(v5);
  }
  while ( !v5->err );
  do
    v5->err = inflate((z_stream_s *)&v5->next_in, 4);
  while ( zlibUtil2::flush_output(v5) && !v5->err );
  inflateEnd((z_stream_s *)&v5->next_in);
  if ( v5->err == 1 )
    v5->err = 0;
  *output = v5->result_output_buffer;
  *output_size = v5->result_output_size;
  return v5->err;
}

//----- (00445120) --------------------------------------------------------
zlibUtil2 *__thiscall zlibUtil2::`vector deleting destructor'(zlibUtil2 *this, unsigned int a2)
{
  zlibUtil2 *v2; // esi@1
  char *v3; // eax@1

  v2 = this;
  v3 = this->result_output_buffer;
  this->vfptr = (zlibUtil2Vtbl *)&zlibUtil2::`vftable';
  if ( v3 )
    free(v3);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 978AC8: using guessed type int (__thiscall *zlibUtil2::`vftable')(void *p, char);

//----- (00445160) --------------------------------------------------------
void __thiscall AutoSizingTextWin::AutoSizingTextWin(AutoSizingTextWin *this)
{
  AutoSizingTextWin *v1; // esi@1

  v1 = this;
  PgWinText::PgWinText((PgWinText *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&AutoSizingTextWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&AutoSizingTextWin::`vftable'{for `IDirectMessenger'};
}
// 978AD0: using guessed type void (__thiscall *AutoSizingTextWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 978AEC: using guessed type int (__thiscall *AutoSizingTextWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00445180) --------------------------------------------------------
void __thiscall AutoSizingTextWin::~AutoSizingTextWin(AutoSizingTextWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&AutoSizingTextWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&AutoSizingTextWin::`vftable'{for `IDirectMessenger'};
  PgWinText::~PgWinText((PgWinText *)&this->vfptr);
}
// 978AD0: using guessed type void (__thiscall *AutoSizingTextWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 978AEC: using guessed type int (__thiscall *AutoSizingTextWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004451A0) --------------------------------------------------------
bool __thiscall AutoSizingTextWin::Create(AutoSizingTextWin *this, int iXPos, int iYPos, PgFont *pkFont, PgWin *pkParent)
{
  return PgWinText::Create((PgWinText *)&this->vfptr, iXPos, iYPos, 0, 0, pkFont, pkParent, 0, 0) != 0;
}

//----- (004451D0) --------------------------------------------------------
void __thiscall AutoSizingTextWin::SetText(AutoSizingTextWin *this, char *pcText)
{
  AutoSizingTextWin *v2; // esi@1
  PgTextGeometry *v3; // ecx@1
  PgFont *v4; // ebx@3
  PgTextGeometry *v5; // ecx@6
  tagSIZE kSize; // [sp+Ch] [bp-1Ch]@6
  tagRECT kRect; // [sp+14h] [bp-14h]@3

  v2 = this;
  v3 = this->m_spTextGeom.m_pObject;
  if ( v3 )
    ((void (__stdcall *)(_DWORD))v3->vfptr[37].__vecDelDtor)(pcText);
  v4 = (PgFont *)((int (__thiscall *)(_DWORD))v2->vfptr[114].__vecDelDtor)(v2);
  SetRect(&kRect, 0, 0, 0, 0);
  if ( pcText && *pcText && v4 )
  {
    SelectObject(v4->m_kFontRenderStuff.hDC, v4->m_hFont);
    PgFont::GetTextSize(v4, pcText, strlen(pcText), &kSize);
    v2->vfptr[38].__vecDelDtor((NiRefObject *)v2, kSize.cx);
    v2->vfptr[39].__vecDelDtor((NiRefObject *)v2, kSize.cy);
    v5 = v2->m_spTextGeom.m_pObject;
    *(tagSIZE *)&kRect.right = kSize;
    if ( v5 )
      v5->vfptr[43].__vecDelDtor((NiRefObject *)v5, (unsigned int)&kRect);
  }
  else
  {
    v2->vfptr[38].__vecDelDtor((NiRefObject *)v2, 0);
    v2->vfptr[39].__vecDelDtor((NiRefObject *)v2, 0);
  }
}

//----- (004452D0) --------------------------------------------------------
AutoSizingTextWin *__cdecl AutoSizingTextWin::CreateWin(int iXPos, int iYPos, PgFont *pkFont, PgWin *pkParent)
{
  PgWin *v4; // eax@1
  PgWin *v5; // esi@1
  PgWin *v6; // edi@8
  AutoSizingTextWin *v7; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v4 = (PgWin *)operator new(0x124u);
  v5 = v4;
  result.m_pObject = v4;
  v9 = 0;
  if ( v4 )
  {
    PgWinText::PgWinText((PgWinText *)v4);
    v5->vfptr = (NiRefObjectVtbl *)&AutoSizingTextWin::`vftable'{for `NiNode'};
    v5->vfptr = (IDirectMessengerVtbl *)&AutoSizingTextWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v9 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v5);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgFont *, PgWin *))v5->vfptr[126].__vecDelDtor)(
                          v5,
                          iXPos,
                          iYPos,
                          pkFont,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v5->vfptr[89].__vecDelDtor)(v5);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = (AutoSizingTextWin *)v5;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v5);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = 0;
  }
  return v7;
}
// 978AD0: using guessed type void (__thiscall *AutoSizingTextWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 978AEC: using guessed type int (__thiscall *AutoSizingTextWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00445420) --------------------------------------------------------
void __thiscall PgFont::GetTextSize(PgFont *this, char *pcText, int iTextSize, tagSIZE *kSize)
{
  char *v4; // esi@1
  int v5; // edi@1
  PgFont *v6; // ebx@1
  int v7; // ebx@3
  tagSIZE *v8; // eax@11
  PgFont *v9; // [sp+Ch] [bp-4h]@1

  v4 = pcText;
  v5 = iTextSize;
  v6 = this;
  v9 = this;
  if ( !CSpFont::GetTextSize((CSpFont *)&this->vfptr, pcText, iTextSize, kSize, 0, 0, 0, 0) )
  {
    GetTextExtentPoint32A(v6->m_kFontRenderStuff.hDC, pcText, iTextSize, kSize);
    if ( v6->m_dwOutlineOffset )
    {
      v7 = 0;
      if ( *pcText )
      {
        do
        {
          if ( v5 <= 0 )
            break;
          if ( *v4 == 32 )
          {
            --v5;
            ++v4;
          }
          else
          {
            ++v7;
            if ( IsDBCSLeadByte(*v4) )
            {
              v4 += 2;
              v5 -= 2;
            }
            else
            {
              ++v4;
              --v5;
            }
          }
        }
        while ( *v4 );
      }
      v8 = kSize;
      v8->cy += 2 * v9->m_dwOutlineOffset;
      v8->cx += 2 * v7 * v9->m_dwOutlineOffset;
    }
  }
}

//----- (004454C0) --------------------------------------------------------
void __thiscall PgTextGeometry::SetDrawFormat(PgTextGeometry *this, unsigned int uiDrawFormat)
{
  unsigned int v2; // eax@2
  int v3; // eax@5

  this->m_uiDrawFormat = uiDrawFormat;
  if ( uiDrawFormat & 1 )
    v2 = 2;
  else
    v2 = uiDrawFormat & 2 | 1;
  if ( uiDrawFormat & 4 )
  {
    v3 = v2 | 0x20;
  }
  else if ( uiDrawFormat & 8 )
  {
    v3 = v2 | 0x30;
  }
  else
  {
    v3 = v2 | 0x10;
  }
  if ( v3 != this->m_iAlignOption )
  {
    this->m_iAlignOption = v3;
    this->m_bInvalidate = 1;
  }
}

//----- (00445520) --------------------------------------------------------
NiRTTI *PgWinText::GetRTTI()
{
  return &PgWinText::m_RTTI;
}

//----- (00445530) --------------------------------------------------------
void PgWinText::VsSetText(PgWinText *this, char *pcFormat, ...)
{
  char pcText[256]; // [sp+4h] [bp-104h]@1
  va_list va; // [sp+118h] [bp+10h]@1

  va_start(va, pcFormat);
  vsprintf(pcText, pcFormat, va);
  this->vfptr[118].__vecDelDtor((NiRefObject *)this, (unsigned int)pcText);
}

//----- (00445580) --------------------------------------------------------
void __thiscall PgWinText::SetTextColor(PgWinText *this, char ucR, char ucG, char ucB, char ucA)
{
  void *(__thiscall *v5)(NiRefObject *, unsigned int); // eax@1
  D3DXCOLOR kColor; // [sp+0h] [bp-10h]@1

  kColor.r = (double)(unsigned __int8)ucR / 255.0;
  v5 = this->vfptr[117].__vecDelDtor;
  kColor.g = (double)(unsigned __int8)ucG / 255.0;
  kColor.b = (double)(unsigned __int8)ucB / 255.0;
  kColor.a = (double)(unsigned __int8)ucA / 255.0;
  ((void (__stdcall *)(_DWORD))v5)(&kColor);
}

//----- (004455E0) --------------------------------------------------------
AutoSizingTextWin *__thiscall AutoSizingTextWin::`scalar deleting destructor'(AutoSizingTextWin *this, unsigned int a2)
{
  AutoSizingTextWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&AutoSizingTextWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&AutoSizingTextWin::`vftable'{for `IDirectMessenger'};
  PgWinText::~PgWinText((PgWinText *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 978AD0: using guessed type void (__thiscall *AutoSizingTextWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 978AEC: using guessed type int (__thiscall *AutoSizingTextWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00445620) --------------------------------------------------------
void __thiscall PgWinText::SetFont(PgWinText *this, PgFont *pkFont)
{
  PgTextGeometry *v2; // ecx@1

  v2 = this->m_spTextGeom.m_pObject;
  if ( v2 )
    ((void (__stdcall *)(_DWORD))v2->vfptr[36].__vecDelDtor)(pkFont);
}

//----- (00445640) --------------------------------------------------------
PgFont *__thiscall PgWinText::GetFont(PgWinText *this)
{
  PgTextGeometry *v1; // eax@1
  PgFont *result; // eax@2

  v1 = this->m_spTextGeom.m_pObject;
  if ( v1 )
    result = v1->m_spPgFont.m_pObject;
  else
    result = 0;
  return result;
}

//----- (00445660) --------------------------------------------------------
void __thiscall PgWinText::SetTextRect(PgWinText *this, tagRECT *kRect)
{
  PgTextGeometry *v2; // ecx@1

  v2 = this->m_spTextGeom.m_pObject;
  if ( v2 )
    ((void (__stdcall *)(_DWORD))v2->vfptr[43].__vecDelDtor)(kRect);
}

//----- (00445680) --------------------------------------------------------
void __thiscall PgWinText::SetTextColor(PgWinText *this, D3DXCOLOR *kColor)
{
  PgTextGeometry *v2; // ecx@1

  v2 = this->m_spTextGeom.m_pObject;
  if ( v2 )
    ((void (__stdcall *)(_DWORD))v2->vfptr[44].__vecDelDtor)(kColor);
}

//----- (004456A0) --------------------------------------------------------
void __thiscall PgWinText::SetText(PgWinText *this, const char *pcText)
{
  PgTextGeometry *v2; // ecx@1

  v2 = this->m_spTextGeom.m_pObject;
  if ( v2 )
    ((void (__stdcall *)(_DWORD))v2->vfptr[37].__vecDelDtor)(pcText);
}

//----- (004456C0) --------------------------------------------------------
char *__thiscall PgWinText::GetText(PgWinText *this)
{
  PgTextGeometry *v1; // ecx@1
  char *result; // eax@2

  v1 = this->m_spTextGeom.m_pObject;
  if ( v1 )
    result = (char *)((int (*)(void))v1->vfptr[38].__vecDelDtor)();
  else
    result = 0;
  return result;
}

//----- (004456E0) --------------------------------------------------------
void __thiscall PgWinText::SetDrawFormat(PgWinText *this, unsigned int uiDrawFormat)
{
  PgTextGeometry *v2; // edx@1
  unsigned int v3; // eax@3
  int v4; // eax@6

  v2 = this->m_spTextGeom.m_pObject;
  if ( v2 )
  {
    v2->m_uiDrawFormat = uiDrawFormat;
    if ( uiDrawFormat & 1 )
      v3 = 2;
    else
      v3 = uiDrawFormat & 2 | 1;
    if ( uiDrawFormat & 4 )
    {
      v4 = v3 | 0x20;
    }
    else if ( uiDrawFormat & 8 )
    {
      v4 = v3 | 0x30;
    }
    else
    {
      v4 = v3 | 0x10;
    }
    if ( v4 != v2->m_iAlignOption )
    {
      v2->m_iAlignOption = v4;
      v2->m_bInvalidate = 1;
    }
  }
}

//----- (00445740) --------------------------------------------------------
void __thiscall ClientWin::ClientWin(ClientWin *this)
{
  ClientWin *v1; // esi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ClientWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ClientWin::`vftable'{for `IDirectMessenger'};
}
// 978CEC: using guessed type void (__thiscall *ClientWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 978D0C: using guessed type int (__thiscall *ClientWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00445760) --------------------------------------------------------
void __thiscall ClientWin::~ClientWin(ClientWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ClientWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ClientWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
}
// 978CEC: using guessed type void (__thiscall *ClientWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 978D0C: using guessed type int (__thiscall *ClientWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00445780) --------------------------------------------------------
bool __thiscall ClientWin::Create(ClientWin *this, int iXPos, int iYPos, PgWin *pkParent)
{
  bool result; // al@2

  if ( pkParent )
    result = PgWin::Create((PgWin *)&this->vfptr, iXPos, iYPos, 1u, 1u, pkParent, 0, 0) != 0;
  else
    result = 0;
  return result;
}

//----- (004457B0) --------------------------------------------------------
void __thiscall ClientWin::OnCommand(ClientWin *this, unsigned int wParam, int lParam)
{
  PgWin *v3; // eax@1

  v3 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v3->vfptr[95].__vecDelDtor)(v3, wParam, lParam);
}

//----- (004457D0) --------------------------------------------------------
ClientWin *__cdecl ClientWin::CreateWin(int iXPos, int iYPos, PgWin *pkParent)
{
  PgWin *v3; // eax@1
  PgWin *v4; // esi@1
  PgWin *v5; // edi@8
  ClientWin *v6; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x120u);
  v4 = v3;
  result.m_pObject = v3;
  v8 = 0;
  if ( v3 )
  {
    PgWin::PgWin(v3);
    v4->vfptr = (NiRefObjectVtbl *)&ClientWin::`vftable'{for `NiNode'};
    v4->vfptr = (IDirectMessengerVtbl *)&ClientWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v8 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v4);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgWin *))v4->vfptr[113].__vecDelDtor)(
                          v4,
                          iXPos,
                          iYPos,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v4->vfptr[89].__vecDelDtor)(v4);
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = (ClientWin *)v4;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v4);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = 0;
  }
  return v6;
}
// 978CEC: using guessed type void (__thiscall *ClientWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 978D0C: using guessed type int (__thiscall *ClientWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00445920) --------------------------------------------------------
ClientWin *__thiscall ClientWin::`vector deleting destructor'(ClientWin *this, unsigned int a2)
{
  ClientWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ClientWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ClientWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 978CEC: using guessed type void (__thiscall *ClientWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 978D0C: using guessed type int (__thiscall *ClientWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00445960) --------------------------------------------------------
void __thiscall EditWin::OnCommand(EditWin *this, unsigned int wParam, int lParam)
{
  if ( !wParam && this->m_bEnalbe )
  {
    if ( this->m_bForceFocusWhenClick )
      ((void (*)(void))this->vfptr[120].__vecDelDtor)();
  }
}

//----- (00445990) --------------------------------------------------------
void __thiscall EditWin::OnClose(EditWin *this)
{
  EditWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->vfptr[121].__vecDelDtor)(1);
  PgWin::OnClose((PgWin *)&v1->vfptr);
}

//----- (004459B0) --------------------------------------------------------
void __thiscall EditWin::SetEnable(EditWin *this, bool bRes)
{
  this->m_bEnalbe = bRes;
  if ( !bRes )
    ((void (__stdcall *)(_DWORD))this->vfptr[121].__vecDelDtor)(1);
}

//----- (004459D0) --------------------------------------------------------
void __thiscall EditWinEx::SetFocusClear(EditWinEx *this, bool b)
{
  this->m_bClearTextWhenFocusOn = b;
}

//----- (004459E0) --------------------------------------------------------
char *__thiscall EditWin::GetText(EditWin *this)
{
  return (char *)((int (*)(void))this->m_spEditWin.m_pObject->vfptr[4].__vecDelDtor)();
}

//----- (004459F0) --------------------------------------------------------
char *__thiscall EditWin::GetLastText(EditWin *this)
{
  return (char *)((int (*)(void))this->m_spEditWin.m_pObject->vfptr[7].__vecDelDtor)();
}

//----- (00445A00) --------------------------------------------------------
void __thiscall EditWin::SetText(EditWin *this, const char *pcText)
{
  ((void (__stdcall *)(_DWORD))this->m_spEditWin.m_pObject->vfptr[5].__vecDelDtor)(pcText);
}

//----- (00445A20) --------------------------------------------------------
void __thiscall EditWin::ChangeText(EditWin *this, const char *pcText)
{
  EditWin *v2; // esi@1

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->m_spEditWin.m_pObject->vfptr[5].__vecDelDtor)(pcText);
  SendMessageA(v2->m_spEditWin.m_pObject->m_hWnd, 0x100u, 0x23u, 0);
}

//----- (00445A60) --------------------------------------------------------
void __thiscall EditWin::ClearAllText(EditWin *this)
{
  ((void (*)(void))this->m_spEditWin.m_pObject->vfptr[11].__vecDelDtor)();
}

//----- (00445A70) --------------------------------------------------------
void __thiscall EditWin::SetTextColor(EditWin *this, D3DXCOLOR *kDxColor)
{
  ((void (__stdcall *)(_DWORD))this->m_spTextWin.m_pObject->vfptr[117].__vecDelDtor)(kDxColor);
}

//----- (00445A90) --------------------------------------------------------
void __thiscall EditWin::SetFocus(EditWin *this)
{
  EditWin *v1; // esi@1
  PgWinEditText *v2; // ecx@2

  v1 = this;
  if ( this->m_bEnalbe )
  {
    EditWin::ms_pkCurEditWin = (PgWin *)this;
    ((void (*)(void))this->m_spEditWin.m_pObject->vfptr[3].__vecDelDtor)();
    v2 = v1->m_spTextWin.m_pObject;
    v1->m_uiLastBlinkTime = 0;
    v1->m_iShowCaret = 0;
    ((void (__stdcall *)(_DWORD))v2->vfptr[64].__vecDelDtor)(1);
  }
}

//----- (00445AE0) --------------------------------------------------------
void __thiscall EditWin::KillFocus(EditWin *this, int bShowText)
{
  if ( (EditWin *)EditWin::ms_pkCurEditWin == this )
  {
    EditWin::ms_pkCurEditWin = 0;
    ((void (__stdcall *)(_DWORD))this->m_spTextWin.m_pObject->vfptr[64].__vecDelDtor)(bShowText);
    SetFocus(g_hMainWnd);
  }
}

//----- (00445B20) --------------------------------------------------------
void __thiscall EditWin::Recover_focus(EditWin *this)
{
  HWND__ *v1; // esi@3

  if ( this->m_bEnalbe && (EditWin *)EditWin::ms_pkCurEditWin == this )
  {
    v1 = this->m_spEditWin.m_pObject->m_hWnd;
    if ( v1 != GetFocus() )
      SetFocus(v1);
  }
}

//----- (00445B50) --------------------------------------------------------
HIMC __thiscall EditWin::GetImeStatus(EditWin *this)
{
  HWND__ *v1; // ebx@1
  HIMC result; // eax@2
  HIMC v3; // edi@3
  int v4; // esi@4
  unsigned int dwSent; // [sp+4h] [bp-8h]@4
  unsigned int dwConv; // [sp+8h] [bp-4h]@4

  v1 = this->m_spEditWin.m_pObject->m_hWnd;
  if ( v1 )
  {
    result = ImmGetContext(v1);
    v3 = result;
    if ( result )
    {
      ImmGetConversionStatus(result, &dwConv, &dwSent);
      v4 = -((dwConv & 1) != 0);
      ImmReleaseContext(v1, v3);
      result = (HIMC)(v4 + 2);
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00445BB0) --------------------------------------------------------
void __thiscall EditWin::SetImeStatus(EditWin *this, EditWin::ImeStatus eStatus)
{
  HWND__ *v2; // edi@1
  HIMC v3; // eax@2
  HIMC v4; // esi@2
  unsigned int dwConv; // [sp+4h] [bp-8h]@3
  unsigned int dwSent; // [sp+8h] [bp-4h]@3

  v2 = this->m_spEditWin.m_pObject->m_hWnd;
  if ( v2 )
  {
    v3 = ImmGetContext(v2);
    v4 = v3;
    if ( v3 )
    {
      ImmGetConversionStatus(v3, &dwConv, &dwSent);
      if ( eStatus == 1 )
        ImmSetConversionStatus(v4, 1u, dwSent);
      else
        ImmSetConversionStatus(v4, 0, dwSent);
      ImmReleaseContext(v2, v4);
    }
  }
}

//----- (00445C10) --------------------------------------------------------
void __thiscall EditWin::SetWidth(EditWin *this, unsigned int uiWidth)
{
  PgWinEditText *v2; // ecx@1

  this->m_iWidth = uiWidth;
  v2 = this->m_spTextWin.m_pObject;
  if ( v2 )
    ((void (__stdcall *)(_DWORD))v2->vfptr[38].__vecDelDtor)(uiWidth);
}

//----- (00445C40) --------------------------------------------------------
void __thiscall EditWin::SetHeight(EditWin *this, unsigned int uiHeight)
{
  PgWinEditText *v2; // ecx@1

  this->m_iHeight = uiHeight;
  v2 = this->m_spTextWin.m_pObject;
  if ( v2 )
    ((void (__stdcall *)(_DWORD))v2->vfptr[39].__vecDelDtor)(uiHeight);
}

//----- (00445C70) --------------------------------------------------------
void __thiscall EditWin::SetAutoAlign(EditWin *this, bool bAutoAlign)
{
  PgWinEditText *v2; // ecx@1

  v2 = this->m_spTextWin.m_pObject;
  if ( v2 )
    PgWinEditText::SetAutoAlign(v2, bAutoAlign);
}

//----- (00445C90) --------------------------------------------------------
bool __thiscall EditWin::GetAutoAlign(EditWin *this)
{
  PgWinEditText *v1; // ecx@1
  bool result; // al@2

  v1 = this->m_spTextWin.m_pObject;
  if ( v1 )
    result = PgWinEditText::GetAutoAlign(v1);
  else
    result = 0;
  return result;
}

//----- (00445CB0) --------------------------------------------------------
void __thiscall EditWin::SelectAll(EditWin *this)
{
  HWND__ *v1; // eax@1

  v1 = this->m_spEditWin.m_pObject->m_hWnd;
  if ( v1 )
    SendMessageA(v1, 0xB1u, 0, -1);
}

//----- (00445CD0) --------------------------------------------------------
void __thiscall EditWin::StrAlign(EditWin *this)
{
  const char *v1; // eax@1
  tagSIZE kSize; // [sp+0h] [bp-8h]@2

  v1 = (const char *)((int (*)(void))this->m_spEditWin.m_pObject->vfptr[4].__vecDelDtor)();
  if ( v1 )
    GetTextExtentPoint32A(0, v1, strlen(v1), &kSize);
}

//----- (00445D10) --------------------------------------------------------
void __thiscall EditWin::EditWin(EditWin *this)
{
  EditWin *v1; // esi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&EditWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&EditWin::`vftable'{for `IDirectMessenger'};
  v1->m_spFont.m_pObject = 0;
  v1->m_spEditWin.m_pObject = 0;
  v1->m_spTextWin.m_pObject = 0;
  v1->m_spCaret.m_pObject = 0;
  if ( !EditWin::ms_uiCaretBlinkTime )
    EditWin::ms_uiCaretBlinkTime = GetCaretBlinkTime();
  v1->m_uiLastBlinkTime = 0;
  v1->m_iShowCaret = 0;
  v1->m_bIsLinkEdit = 0;
  v1->m_bEnalbe = 1;
}
// 978EDC: using guessed type void (__thiscall *EditWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 978EFC: using guessed type int (__thiscall *EditWin::`vftable'{for `NiNode'})(void *p, char);
// A8B998: using guessed type unsigned int EditWin::ms_uiCaretBlinkTime;

//----- (00445D80) --------------------------------------------------------
void __thiscall EditWin::~EditWin(EditWin *this)
{
  EditWin *v1; // esi@1
  PgFont *v2; // edi@1
  PgEditWin *v3; // edi@6
  PgWinEditText *v4; // edi@11
  NiScreenElements *v5; // edi@16
  NiScreenElements *v6; // edi@21
  PgWinEditText *v7; // edi@25
  PgEditWin *v8; // edi@29
  PgFont *v9; // edi@33

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&EditWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&EditWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spFont.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spFont.m_pObject = 0;
  }
  v3 = v1->m_spEditWin.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spEditWin.m_pObject = 0;
  }
  v4 = v1->m_spTextWin.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spTextWin.m_pObject = 0;
  }
  v5 = v1->m_spCaret.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spCaret.m_pObject = 0;
  }
  v6 = v1->m_spCaret.m_pObject;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  v7 = v1->m_spTextWin.m_pObject;
  if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  v8 = v1->m_spEditWin.m_pObject;
  if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
    v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
  v9 = v1->m_spFont.m_pObject;
  if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
    v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
  PgWin::~PgWin((PgWin *)&v1->vfptr);
}
// 978EDC: using guessed type void (__thiscall *EditWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 978EFC: using guessed type int (__thiscall *EditWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00445F40) --------------------------------------------------------
void __thiscall EditWin::SetCaretColor(EditWin *this, D3DXCOLOR *kDxColor)
{
  NiScreenElements *v2; // ecx@1
  NiProperty *v3; // eax@2
  NiExtraData **v4; // edx@3
  double v5; // st7@3
  NiTimeController *v6; // ecx@3
  unsigned int v7; // ST0C_4@3

  v2 = this->m_spCaret.m_pObject;
  if ( v2 )
  {
    v3 = NiAVObject::GetProperty((NiAVObject *)&v2->vfptr, 3);
    if ( v3 )
    {
      v4 = (NiExtraData **)LODWORD(kDxColor->g);
      v5 = kDxColor->b;
      v6 = (NiTimeController *)LODWORD(kDxColor->r);
      ++v3[3].m_uiRefCount;
      *(float *)&v7 = v5;
      v3[2].m_spControllers.m_pObject = v6;
      v3[2].m_ppkExtra = v4;
      v3[2].m_uiExtraDataSize = v7;
    }
  }
}

//----- (00445F90) --------------------------------------------------------
void __thiscall EditWin::OnEditEnd(EditWin *this, unsigned int wParam, int lParam)
{
  EditWin *v3; // esi@1
  PgWin *v4; // eax@1

  v3 = this;
  v4 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v4 )
    PgWin::PostMsg(v4, 4u, wParam, (int)v3);
  v3->vfptr[121].__vecDelDtor((NiRefObject *)v3, 1u);
}

//----- (00445FD0) --------------------------------------------------------
void __thiscall EditWin::UpdateMeWin(EditWin *this, float fCurTime)
{
  EditWin *v2; // esi@1
  unsigned int v3; // ecx@2
  int v4; // edx@3
  NiScreenElements *v5; // eax@4
  unsigned int v6; // edi@7
  const char *v7; // eax@7
  const char *v8; // ebx@7
  char *v9; // edi@10
  char *v10; // edx@10
  unsigned int v11; // eax@10
  unsigned int v12; // ebx@10
  PgTextGeometry *v13; // eax@14
  bool v14; // cl@15
  PgFont *v15; // ebx@15
  tagRECT *v16; // ST18_4@15
  bool v17; // ST14_1@15
  bool v18; // ST10_1@15
  int v19; // ST0C_4@15
  int v20; // eax@15
  NiScreenElements *v21; // esi@17
  float v22; // ecx@17
  float v23; // edx@17
  float v24; // eax@17
  float v25; // ST2C_4@17
  tagPOINT kPoint; // [sp+8h] [bp-Ch]@2
  bool bAutoWordWrap[4]; // [sp+10h] [bp-4h]@2
  signed int iYPos; // [sp+1Ch] [bp+8h]@7

  v2 = this;
  if ( !(unsigned __int8)((int (*)(void))this->vfptr[122].__vecDelDtor)() )
  {
    v2->m_spCaret.m_pObject->m_uFlags |= 1u;
    return;
  }
  v3 = EditWin::ms_uiCaretBlinkTime + v2->m_uiLastBlinkTime;
  *(_DWORD *)bAutoWordWrap = HIWORD(fCurTime) | 0xC00;
  kPoint = (tagPOINT)(signed __int64)(fCurTime * 1000.0);
  if ( v3 <= kPoint.x )
  {
    v4 = 1 - v2->m_iShowCaret;
    v2->m_uiLastBlinkTime = kPoint.x;
    v2->m_iShowCaret = v4;
  }
  v5 = v2->m_spCaret.m_pObject;
  if ( v2->m_iShowCaret == 1 )
    v5->m_uFlags &= 0xFFFEu;
  else
    v5->m_uFlags |= 1u;
  v6 = 0;
  iYPos = 0;
  v7 = (const char *)((int (*)(void))v2->m_spTextWin.m_pObject->vfptr[121].__vecDelDtor)();
  v8 = v7;
  if ( !v7 || !*v7 )
    goto LABEL_17;
  SelectObject(v2->m_spFont.m_pObject->m_kFontRenderStuff.hDC, v2->m_spFont.m_pObject->m_hFont);
  if ( v2->m_eType == 1342177312 )
  {
    v9 = fs(0);
    v10 = v9;
    v11 = strlen(v8);
    v12 = v11;
    if ( v11 )
    {
      memset(v9, 42, v11);
      v10 = &v9[v12];
    }
    *v10 = 0;
  }
  else
  {
    v9 = (char *)v8;
  }
  v13 = v2->m_spTextWin.m_pObject->m_spTextGeom.m_pObject;
  if ( v13 )
  {
    v14 = v13->m_bTextCmdOn;
    v15 = v2->m_spFont.m_pObject;
    bAutoWordWrap[0] = v13->m_bAutoWordWrap;
    v16 = &v13->m_kRect;
    v17 = v14;
    v18 = bAutoWordWrap[0];
    v19 = v13->m_iVerticalGap;
    v20 = PgEditWin::GetCaretPos(v2->m_spEditWin.m_pObject);
    PgFont::GetCursorPosOnText(v15, v9, v20, &kPoint, v19, v18, v17, v16, 17);
    v6 = kPoint.x;
    iYPos = kPoint.y;
    if ( v6 >= ((int (__thiscall *)(EditWin *))v2->vfptr[36].__vecDelDtor)(v2) )
      v6 = ((int (__thiscall *)(EditWin *))v2->vfptr[36].__vecDelDtor)(v2) - 1;
LABEL_17:
    v21 = v2->m_spCaret.m_pObject;
    v22 = v21->m_kLocal.m_Translate.x;
    v23 = v21->m_kLocal.m_Translate.y;
    v24 = v21->m_kLocal.m_Translate.z;
    *(_DWORD *)bAutoWordWrap = v6 + 1;
    v25 = (double)(signed int)(v6 + 1) - 1.0;
    v21->m_kLocal.m_Translate.x = v25;
    *(float *)&kPoint.x = (double)iYPos - 2.0;
    LODWORD(v21->m_kLocal.m_Translate.y) = kPoint.x;
    v21->m_kLocal.m_Translate.z = v24;
  }
}
// A8B998: using guessed type unsigned int EditWin::ms_uiCaretBlinkTime;

//----- (004461D0) --------------------------------------------------------
void __thiscall EditWinEx::SetDrawFormat(EditWinEx *this, unsigned int uiAlign)
{
  EditWinEx *v2; // esi@1

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->m_spTextWin.m_pObject->vfptr[122].__vecDelDtor)(uiAlign);
  ((void (*)(void))v2->m_spTextWin.m_pObject->m_spTextGeom.m_pObject->vfptr[39].__vecDelDtor)();
  ((void (*)(void))v2->m_spTextWin.m_pObject->m_spTextGeom.m_pObject->vfptr[40].__vecDelDtor)();
}

//----- (00446220) --------------------------------------------------------
unsigned int __thiscall EditWinEx::GetDrawFormat(EditWinEx *this)
{
  PgTextGeometry *v1; // eax@1
  unsigned int result; // eax@2

  v1 = this->m_spTextWin.m_pObject->m_spTextGeom.m_pObject;
  if ( v1 )
    result = v1->m_uiDrawFormat;
  else
    result = 0;
  return result;
}

//----- (00446240) --------------------------------------------------------
void __thiscall EditWinEx::OnEditEnd(EditWinEx *this, unsigned int wParam, int lParam)
{
  EditWinEx *v3; // esi@1
  PgWin *v4; // eax@1

  v3 = this;
  v4 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v4 )
    PgWin::PostMsg(v4, 4u, 0, (int)v3);
  v3->vfptr[121].__vecDelDtor((NiRefObject *)v3, 1u);
}

//----- (00446270) --------------------------------------------------------
void __thiscall EditWinEx::KillFocus(EditWinEx *this, int bShowText)
{
  EditWinEx *v2; // esi@1
  char **v3; // eax@4

  v2 = this;
  if ( (EditWinEx *)EditWin::ms_pkCurEditWin == this )
  {
    EditWin::ms_pkCurEditWin = 0;
    ((void (__stdcall *)(_DWORD))this->m_spTextWin.m_pObject->vfptr[64].__vecDelDtor)(bShowText);
    SetFocus(g_hMainWnd);
    if ( !strlen((const char *)((int (__thiscall *)(_DWORD))v2->vfptr[113].__vecDelDtor)(v2)) )
    {
      if ( v2->m_DefaultStr._Mysize )
      {
        v3 = &v2->m_DefaultStr._Bx._Ptr;
        if ( v2->m_DefaultStr._Myres >= 0x10 )
          v3 = (char **)*v3;
        v2->vfptr[115].__vecDelDtor((NiRefObject *)v2, (unsigned int)v3);
      }
    }
  }
}

//----- (004462F0) --------------------------------------------------------
void __thiscall EditWinEx::SetFocus(EditWinEx *this)
{
  EditWinEx *v1; // esi@1
  PgWin *v2; // eax@3
  PgWin *v3; // ebx@3
  PgWin *v4; // edi@3
  PgWinEditText *v5; // ecx@5

  v1 = this;
  if ( this->m_bEnalbe )
  {
    if ( EditWin::ms_pkCurEditWin )
    {
      v2 = PgWin::GetParentWin(EditWin::ms_pkCurEditWin);
      v3 = EditWin::ms_pkCurEditWin;
      v4 = v2;
      if ( PgWinMgr::IsIn(&Pgg_kWinMgr, v2) )
        PgWin::ProcessMsg(v4, 3u, 0, (int)v3);
    }
    EditWin::ms_pkCurEditWin = (PgWin *)v1;
    ((void (*)(void))v1->m_spEditWin.m_pObject->vfptr[3].__vecDelDtor)();
    v5 = v1->m_spTextWin.m_pObject;
    v1->m_uiLastBlinkTime = 0;
    v1->m_iShowCaret = 0;
    ((void (__stdcall *)(_DWORD))v5->vfptr[64].__vecDelDtor)(1);
    if ( v1->m_bClearTextWhenFocusOn == 1 )
      ((void (__thiscall *)(_DWORD))v1->vfptr[117].__vecDelDtor)(v1);
  }
}

//----- (00446380) --------------------------------------------------------
char __thiscall EditWin::Create(EditWin *this, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, EditWin::Type eType, unsigned int uiLimitTextLen, unsigned int uiStopFlag, bool bClearTextOnEnd, Font::Type eFontType, bool bForceFocusWhenClick)
{
  EditWin *v12; // esi@1
  PgFont *v13; // eax@1
  PgFont *v14; // edi@1
  PgFont *v15; // ebx@1
  char result; // al@9
  unsigned int v17; // edi@11
  PgEditWin *v18; // eax@12
  PgFont *v19; // eax@14
  bool v20; // zf@14
  PgWinEditText **v21; // edi@14
  NiD3DDefaultShader *v22; // eax@15
  NiD3DDefaultShader *v23; // eax@16
  NiScreenElementsData *v24; // edi@20
  PgWin *v25; // eax@20
  NiScreenElements *v26; // ebx@20
  NiScreenElements *v27; // eax@21
  NiScreenElements *v28; // edi@22
  PgWin *v29; // eax@29
  int v30; // eax@30
  float v31; // ecx@32
  NiAVObject *v32; // ecx@32
  PgWin *v33; // eax@32
  PgWin *v34; // edi@32
  NiAVObject *v35; // ecx@35
  NiScreenElements *v36; // eax@35
  float v37; // edx@35
  float v38; // ecx@35
  float v39; // edx@35
  tagSIZE kSize; // [sp+2Ch] [bp-50h]@20
  float v41; // [sp+34h] [bp-48h]@32
  float v42; // [sp+38h] [bp-44h]@32
  float v43; // [sp+3Ch] [bp-40h]@32
  bool v44[4]; // [sp+40h] [bp-3Ch]@1
  unsigned int uiStyle; // [sp+44h] [bp-38h]@1
  int iLimitLength; // [sp+48h] [bp-34h]@1
  unsigned int v47; // [sp+4Ch] [bp-30h]@1
  PgWin *v48; // [sp+50h] [bp-2Ch]@1
  unsigned int v49; // [sp+54h] [bp-28h]@1
  unsigned int v50; // [sp+58h] [bp-24h]@1
  tagRECT kRect; // [sp+5Ch] [bp-20h]@11
  int v52; // [sp+78h] [bp-4h]@20

  v50 = uiWidth;
  uiStyle = eType;
  v12 = this;
  v44[0] = bClearTextOnEnd;
  v49 = uiHeight;
  v48 = pkParent;
  iLimitLength = uiLimitTextLen;
  v47 = uiStopFlag;
  v13 = Font::Get(eFontType);
  v14 = v12->m_spFont.m_pObject;
  v15 = v13;
  if ( v14 != v13 )
  {
    if ( v14 && !InterlockedDecrement((volatile LONG *)&v14->m_uiRefCount) && v14 )
      v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
    v12->m_spFont.m_pObject = v15;
    if ( v15 )
      InterlockedIncrement((volatile LONG *)&v15->m_uiRefCount);
  }
  if ( v12->m_spFont.m_pObject && PgWin::Create((PgWin *)&v12->vfptr, iXPos, iYPos, v50, v49, v48, 0, 0) )
  {
    kRect.top = iYPos;
    v17 = uiStyle;
    kRect.left = iXPos;
    kRect.right = iXPos + v50;
    kRect.bottom = iYPos + v49;
    if ( uiStyle == 1342181380 )
      v18 = PgEditWin::CreateWin(
              g_hMainInstance,
              g_hMainWnd,
              uiStyle,
              v47,
              iLimitLength,
              v44[0],
              &kRect,
              v12->m_spFont.m_pObject->m_hFont);
    else
      v18 = PgEditWin::CreateWin(g_hMainInstance, g_hMainWnd, uiStyle, v47, iLimitLength, v44[0], 0, 0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v12->m_spEditWin, (NiD3DDefaultShader *)v18);
    EditWin::SetFont(v12);
    v19 = v12->m_spFont.m_pObject;
    v12->m_eType = uiStyle;
    v20 = v17 == 1342177312;
    v21 = &v12->m_spTextWin.m_pObject;
    if ( v20 )
    {
      v22 = (NiD3DDefaultShader *)PgWinPasswdText::CreateWin(0, 0, v50, v49, v19, (PgWin *)&v12->vfptr, 0, 0);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v12->m_spTextWin, v22);
    }
    else
    {
      v23 = (NiD3DDefaultShader *)PgWinEditText::CreateWin(0, 0, v50, v49, v19, (PgWin *)&v12->vfptr, 0, 0);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v12->m_spTextWin, v23);
      if ( uiStyle == 1342181380 )
      {
        (*v21)->m_spTextGeom.m_pObject->m_bAutoWordWrap = 1;
        PgWinEditText::SetAutoAlign(*v21, 0);
      }
    }
    ((void (__stdcall *)(PgWinEditText *))v12->m_spEditWin.m_pObject->vfptr[22].__vecDelDtor)(*v21);
    v12->m_bForceFocusWhenClick = bForceFocusWhenClick;
    if ( bForceFocusWhenClick )
      PgWinBut::CreateWin(0, 0, v50, v49, (PgWin *)&v12->vfptr, 0, 0, 0);
    SelectObject(v12->m_spFont.m_pObject->m_kFontRenderStuff.hDC, v12->m_spFont.m_pObject->m_hFont);
    PgFont::GetTextSize(v12->m_spFont.m_pObject, "|", 1, &kSize);
    v24 = PgUtil::CreateScreenGeometryData(2u, kSize.cy + 2);
    v25 = (PgWin *)operator new(0xC4u);
    v48 = v25;
    v26 = 0;
    v52 = 0;
    if ( v25 )
    {
      NiScreenElements::NiScreenElements((NiScreenElements *)v25, v24);
      v26 = v27;
    }
    v28 = v12->m_spCaret.m_pObject;
    v52 = -1;
    if ( v28 != v26 )
    {
      if ( v28 && !InterlockedDecrement((volatile LONG *)&v28->m_uiRefCount) && v28 )
        v28->vfptr->__vecDelDtor((NiRefObject *)v28, 1u);
      v12->m_spCaret.m_pObject = v26;
      if ( v26 )
        InterlockedIncrement((volatile LONG *)&v26->m_uiRefCount);
    }
    v29 = (PgWin *)operator new(0x60u);
    v48 = v29;
    v52 = 1;
    if ( v29 )
      NiMaterialProperty::NiMaterialProperty((NiMaterialProperty *)v29);
    else
      v30 = 0;
    ++*(_DWORD *)(v30 + 88);
    v41 = 1.0;
    v42 = 1.0;
    v43 = 1.0;
    *(float *)(v30 + 68) = 1.0;
    v31 = v43;
    *(float *)(v30 + 72) = 1.0;
    *(float *)(v30 + 76) = v31;
    v32 = (NiAVObject *)&v12->m_spCaret.m_pObject->vfptr;
    v52 = -1;
    NiAVObject::AttachProperty(v32, (NiProperty *)v30);
    v33 = (PgWin *)operator new(0x28u);
    v34 = v33;
    v48 = v33;
    v52 = 2;
    if ( v33 )
    {
      NiObjectNET::NiObjectNET((NiObjectNET *)&v33->vfptr);
      v34->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
      v34->m_uFlags = 0;
      v34->m_pkParent = 0;
      LODWORD(v34->m_kWorldBound.m_kCenter.x) = 1;
    }
    else
    {
      v34 = 0;
    }
    v34->m_pkParent = 0;
    LODWORD(v34->m_kWorldBound.m_kCenter.x) = 0;
    v35 = (NiAVObject *)&v12->m_spCaret.m_pObject->vfptr;
    v52 = -1;
    NiAVObject::AttachProperty(v35, (NiProperty *)v34);
    v36 = v12->m_spCaret.m_pObject;
    v37 = v36->m_kLocal.m_Translate.y;
    v38 = v36->m_kLocal.m_Translate.x;
    v42 = -2.0;
    v39 = v36->m_kLocal.m_Translate.z;
    v36->m_kLocal.m_Translate.x = v38;
    v36->m_kLocal.m_Translate.y = v42;
    v36->m_kLocal.m_Translate.z = v39;
    ((void (__thiscall *)(EditWin *, NiScreenElements *, _DWORD))v12->vfptr[29].__vecDelDtor)(
      v12,
      v12->m_spCaret.m_pObject,
      0);
    NiAVObject::UpdateProperties((NiAVObject *)&v12->vfptr);
    NiAVObject::Update((NiAVObject *)&v12->vfptr, 0.0, 0);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);

//----- (00446760) --------------------------------------------------------
void __thiscall EditWinEx::EditWinEx(EditWinEx *this)
{
  EditWinEx *v1; // esi@1
  int v2; // edi@1
  bool v3; // cf@3

  v1 = this;
  EditWin::EditWin((EditWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&EditWinEx::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&EditWinEx::`vftable'{for `IDirectMessenger'};
  v2 = (int)&v1->m_DefaultStr;
  *(_DWORD *)(v2 + 20) = 15;
  *(_DWORD *)(v2 + 16) = 0;
  *(_BYTE *)v2 = 0;
  if ( !EditWin::ms_uiCaretBlinkTime )
    EditWin::ms_uiCaretBlinkTime = GetCaretBlinkTime();
  v1->m_uiLastBlinkTime = 0;
  v1->m_iShowCaret = 0;
  v1->m_bEnalbe = 1;
  v3 = v1->m_DefaultStr._Myres < 0x10;
  v1->m_DefaultStr._Mysize = 0;
  if ( !v3 )
    v2 = *(_DWORD *)v2;
  *(_BYTE *)v2 = 0;
  v1->m_bClearTextWhenFocusOn = 0;
}
// 979108: using guessed type void (__thiscall *EditWinEx::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 979124: using guessed type int (__thiscall *EditWinEx::`vftable'{for `NiNode'})(void *p, char);
// A8B998: using guessed type unsigned int EditWin::ms_uiCaretBlinkTime;

//----- (004467D0) --------------------------------------------------------
void __thiscall EditWinEx::~EditWinEx(EditWinEx *this)
{
  EditWinEx *v1; // edi@1
  PgFont *v2; // esi@1
  PgEditWin *v3; // esi@6
  PgWinEditText *v4; // esi@11
  NiScreenElements *v5; // esi@16
  char *v6; // eax@22

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&EditWinEx::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&EditWinEx::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spFont.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spFont.m_pObject = 0;
  }
  v3 = v1->m_spEditWin.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spEditWin.m_pObject = 0;
  }
  v4 = v1->m_spTextWin.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spTextWin.m_pObject = 0;
  }
  v5 = v1->m_spCaret.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spCaret.m_pObject = 0;
  }
  v1->m_DefaultStr._Mysize = 0;
  if ( v1->m_DefaultStr._Myres < 0x10 )
    v6 = v1->m_DefaultStr._Bx._Buf;
  else
    v6 = v1->m_DefaultStr._Bx._Ptr;
  *v6 = 0;
  if ( v1->m_DefaultStr._Myres >= 0x10 )
    operator delete(v1->m_DefaultStr._Bx._Ptr);
  v1->m_DefaultStr._Myres = 15;
  v1->m_DefaultStr._Mysize = 0;
  v1->m_DefaultStr._Bx._Buf[0] = 0;
  EditWin::~EditWin((EditWin *)&v1->vfptr);
}
// 979108: using guessed type void (__thiscall *EditWinEx::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 979124: using guessed type int (__thiscall *EditWinEx::`vftable'{for `NiNode'})(void *p, char);

//----- (00446940) --------------------------------------------------------
char __thiscall EditWinEx::Create(EditWinEx *this, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, EditWin::Type eType, unsigned int uiLimitTextLen, unsigned int uiStopFlag, bool bClearTextOnEnd, Font::Type eFontType, bool bForceFocusWhenClick)
{
  return EditWin::Create(
           (EditWin *)&this->vfptr,
           iXPos,
           iYPos,
           uiWidth,
           uiHeight,
           pkParent,
           eType,
           uiLimitTextLen,
           uiStopFlag,
           bClearTextOnEnd,
           eFontType,
           bForceFocusWhenClick);
}

//----- (00446950) --------------------------------------------------------
EditWin *__cdecl EditWin::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, EditWin::Type eType, unsigned int uiLimitTextLen, unsigned int uiStopFlag, int bClearTextOnEnd, Font::Type eFontType, int bForceFocusWhenClick)
{
  PgWin *v11; // eax@1
  PgWin *v12; // eax@2
  PgWin *v13; // esi@2
  PgWin *v14; // edi@8
  EditWin *v15; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v17; // [sp+20h] [bp-4h]@1

  v11 = (PgWin *)operator new(0x148u);
  result.m_pObject = v11;
  v17 = 0;
  if ( v11 )
  {
    EditWin::EditWin((EditWin *)v11);
    v13 = v12;
  }
  else
  {
    v13 = 0;
  }
  if ( v13 )
    InterlockedIncrement((volatile LONG *)&v13->m_uiRefCount);
  v17 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v13);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, unsigned int, PgWin *, EditWin::Type, unsigned int, unsigned int, int, Font::Type, int))v13->vfptr[123].__vecDelDtor)(
                          v13,
                          iXPos,
                          iYPos,
                          uiWidth,
                          uiHeight,
                          pkParent,
                          eType,
                          uiLimitTextLen,
                          uiStopFlag,
                          bClearTextOnEnd,
                          eFontType,
                          bForceFocusWhenClick) )
  {
    ((void (__thiscall *)(PgWin *))v13->vfptr[89].__vecDelDtor)(v13);
    v17 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) )
      v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
    v15 = (EditWin *)v13;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v13);
    if ( result.m_pObject )
    {
      v14 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v14 )
          v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
      }
    }
    v17 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) )
      v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
    v15 = 0;
  }
  return v15;
}

//----- (00446AB0) --------------------------------------------------------
EditWinEx *__cdecl EditWinEx::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, EditWin::Type eType, unsigned int uiLimitTextLen, unsigned int uiStopFlag, int bClearTextOnEnd, Font::Type eFontType, int bForceFocusWhenClick)
{
  PgWin *v11; // eax@1
  PgWin *v12; // eax@2
  PgWin *v13; // esi@2
  PgWin *v14; // edi@8
  EditWinEx *v15; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v17; // [sp+20h] [bp-4h]@1

  v11 = (PgWin *)operator new(0x168u);
  result.m_pObject = v11;
  v17 = 0;
  if ( v11 )
  {
    EditWinEx::EditWinEx((EditWinEx *)v11);
    v13 = v12;
  }
  else
  {
    v13 = 0;
  }
  if ( v13 )
    InterlockedIncrement((volatile LONG *)&v13->m_uiRefCount);
  v17 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v13);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, unsigned int, PgWin *, EditWin::Type, unsigned int, unsigned int, int, Font::Type, int))v13->vfptr[123].__vecDelDtor)(
                          v13,
                          iXPos,
                          iYPos,
                          uiWidth,
                          uiHeight,
                          pkParent,
                          eType,
                          uiLimitTextLen,
                          uiStopFlag,
                          bClearTextOnEnd,
                          eFontType,
                          bForceFocusWhenClick) )
  {
    ((void (__thiscall *)(PgWin *))v13->vfptr[89].__vecDelDtor)(v13);
    v17 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) )
      v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
    v15 = (EditWinEx *)v13;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v13);
    if ( result.m_pObject )
    {
      v14 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v14 )
          v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
      }
    }
    v17 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) )
      v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
    v15 = 0;
  }
  return v15;
}

//----- (00446C10) --------------------------------------------------------
void __thiscall EditWinEx::SetDefaultStr(EditWinEx *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *DefaultStr)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &this->m_DefaultStr,
    DefaultStr,
    0,
    0xFFFFFFFF);
}

//----- (00446C30) --------------------------------------------------------
void __cdecl PgUtil::SetXYTranslate(NiAVObject *pkAVObj, float fX, float fY)
{
  float v3; // ecx@1
  float v4; // edx@1
  float v5; // ecx@1

  v3 = pkAVObj->m_kLocal.m_Translate.x;
  v4 = pkAVObj->m_kLocal.m_Translate.y;
  v5 = pkAVObj->m_kLocal.m_Translate.z;
  pkAVObj->m_kLocal.m_Translate.x = fX;
  pkAVObj->m_kLocal.m_Translate.y = fY;
  pkAVObj->m_kLocal.m_Translate.z = v5;
}

//----- (00446C70) --------------------------------------------------------
void __thiscall EditWin::SetFont(EditWin *this)
{
  PgFont *v1; // ebx@1
  PgEditWin *v2; // esi@1
  PgFont *v3; // edi@1

  v1 = this->m_spFont.m_pObject;
  v2 = this->m_spEditWin.m_pObject;
  v3 = v2->m_spFont.m_pObject;
  if ( v3 != v1 )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spFont.m_pObject = v1;
    if ( v1 )
      InterlockedIncrement((volatile LONG *)&v1->m_uiRefCount);
  }
}

//----- (00446CC0) --------------------------------------------------------
bool __thiscall EditWin::IsDuringEdit(EditWin *this)
{
  bool result; // al@2

  if ( (EditWin *)EditWin::ms_pkCurEditWin == this )
    result = GetFocus() != 0;
  else
    result = 0;
  return result;
}

//----- (00446CE0) --------------------------------------------------------
EditWin *__thiscall EditWin::`scalar deleting destructor'(EditWin *this, unsigned int a2)
{
  EditWin *v2; // esi@1

  v2 = this;
  EditWin::~EditWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00446D10) --------------------------------------------------------
EditWinEx *__thiscall EditWinEx::`scalar deleting destructor'(EditWinEx *this, unsigned int a2)
{
  EditWinEx *v2; // esi@1

  v2 = this;
  EditWinEx::~EditWinEx(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00446D40) --------------------------------------------------------
void __thiscall FlexMsgBox::FlexMsgBox(FlexMsgBox *this)
{
  FlexMsgBox *v1; // esi@1

  v1 = this;
  FrameBoxWin::FrameBoxWin((FrameBoxWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&FlexMsgBox::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&FlexMsgBox::`vftable'{for `IDirectMessenger'};
  v1->m_pkTextGeom = 0;
}
// 979360: using guessed type void (__thiscall *FlexMsgBox::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97937C: using guessed type int (__thiscall *FlexMsgBox::`vftable'{for `NiNode'})(void *p, char);

//----- (00446D70) --------------------------------------------------------
void __thiscall FlexMsgBox::~FlexMsgBox(FlexMsgBox *this)
{
  this->vfptr = (NiRefObjectVtbl *)&FlexMsgBox::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&FlexMsgBox::`vftable'{for `IDirectMessenger'};
  FrameBoxWin::~FrameBoxWin((FrameBoxWin *)&this->vfptr);
}
// 979360: using guessed type void (__thiscall *FlexMsgBox::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97937C: using guessed type int (__thiscall *FlexMsgBox::`vftable'{for `NiNode'})(void *p, char);

//----- (00446D90) --------------------------------------------------------
void __thiscall FlexMsgBox::SetText(FlexMsgBox *this, char *pcText)
{
  FlexMsgBox *v2; // esi@1
  NiRefObjectVtbl *v3; // edi@1
  int v4; // eax@1
  unsigned int v5; // edi@1
  PgWinBut *v6; // edi@2
  NiRefObjectVtbl *v7; // ST10_4@2
  int v8; // eax@2
  int v9; // edx@2
  NiRefObjectVtbl *v10; // eax@2
  NiRefObjectVtbl *v11; // ebx@3
  unsigned int v12; // edi@3
  unsigned int v13; // eax@3
  PgWinBut *v14; // edi@3
  NiRefObjectVtbl *v15; // ST10_4@3
  PgTextGeometry *v16; // ebx@3
  int v17; // eax@3
  NiRefObjectVtbl *v18; // edi@4
  int v19; // eax@4
  NiRefObjectVtbl *v20; // edi@4
  int v21; // eax@4
  char *pcTexta; // [sp+18h] [bp+8h]@2
  char *pcTextb; // [sp+18h] [bp+8h]@3

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkTextGeom->vfptr[37].__vecDelDtor)(pcText);
  v3 = v2->m_pkOKBut->vfptr;
  v4 = ((int (*)(void))v2->m_pkTextGeom->vfptr[40].__vecDelDtor)();
  v3[44].__vecDelDtor((NiRefObject *)v2->m_pkOKBut, v4 + 2 * v2->m_uiEdgeHeight + 3);
  v5 = ((int (*)(void))v2->m_pkTextGeom->vfptr[39].__vecDelDtor)() + 2 * v2->m_uiEdgeWidth;
  if ( v5 >= ((int (*)(void))v2->m_pkOKBut->vfptr[36].__vecDelDtor)() )
  {
    v11 = v2->m_pkOKBut->vfptr;
    v12 = v2->m_uiEdgeWidth - ((unsigned int)((int (*)(void))v2->m_pkOKBut->vfptr[36].__vecDelDtor)() >> 1);
    v13 = ((int (*)(void))v2->m_pkTextGeom->vfptr[39].__vecDelDtor)();
    v11[43].__vecDelDtor((NiRefObject *)v2->m_pkOKBut, v12 + (v13 >> 1));
    v14 = v2->m_pkOKBut;
    v15 = v2->vfptr;
    v16 = v2->m_pkTextGeom;
    pcTextb = (char *)((int (*)(void))v2->m_pkTextGeom->vfptr[40].__vecDelDtor)();
    v17 = ((int (__thiscall *)(_DWORD))v14->vfptr[37].__vecDelDtor)(v14);
    v9 = (int)v16->vfptr[39].__vecDelDtor(
                (NiRefObject *)v16,
                (unsigned int)(&pcTextb[2 * v2->m_uiEdgeHeight + 6] + v17))
       + 2 * v2->m_uiEdgeWidth;
    v10 = v15;
  }
  else
  {
    ((void (__stdcall *)(_DWORD))v2->m_pkOKBut->vfptr[43].__vecDelDtor)(v2->m_uiEdgeWidth);
    v6 = v2->m_pkOKBut;
    v7 = v2->vfptr;
    pcTexta = (char *)((int (*)(void))v2->m_pkTextGeom->vfptr[40].__vecDelDtor)();
    v8 = ((int (__thiscall *)(_DWORD))v6->vfptr[37].__vecDelDtor)(v6);
    v9 = (int)v6->vfptr[36].__vecDelDtor((NiRefObject *)v6, (unsigned int)(&pcTexta[2 * v2->m_uiEdgeHeight + 6] + v8))
       + 2 * v2->m_uiEdgeWidth;
    v10 = v7;
  }
  v10[135].__vecDelDtor((NiRefObject *)v2, v9);
  v18 = v2->m_pkThemeWin->vfptr;
  v19 = ((int (__thiscall *)(_DWORD))v2->vfptr[36].__vecDelDtor)(v2);
  v18[117].__vecDelDtor((NiRefObject *)v2->m_pkThemeWin, v19 - (v2->m_uiEdgeWidth >> 1) - 1);
  v20 = v2->m_pkThemeWin->vfptr;
  v21 = ((int (__thiscall *)(_DWORD))v2->vfptr[37].__vecDelDtor)(v2);
  v20[118].__vecDelDtor((NiRefObject *)v2->m_pkThemeWin, v21 - (v2->m_uiEdgeHeight >> 1) - 1);
}

//----- (00446F80) --------------------------------------------------------
void __thiscall FlexMsgBox::SetVerticalGap(FlexMsgBox *this, int iGap)
{
  SpScreenText::SetVerticalGap((SpScreenText *)&this->m_pkTextGeom->vfptr, iGap);
}

//----- (00446F90) --------------------------------------------------------
void __thiscall FlexMsgBox::OnCommand(FlexMsgBox *this, unsigned int wParam, int lParam)
{
  FlexMsgBox *v3; // edi@1
  bool v4; // zf@2
  char *v5; // esi@2

  v3 = this;
  if ( wParam == 10 )
  {
    v4 = this->m_pkMsgHooker == 0;
    v5 = (char *)&this->vfptr;
    wParam = 0;
    if ( !v4 )
    {
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))this->m_pkMsgHooker->vfptr->SendDirectMessage)(
        27,
        &wParam,
        &this->vfptr);
      if ( v3->m_pkMsgHooker )
        ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v3->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          27,
          &wParam,
          &v3->vfptr);
    }
    (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v5 + 20))(&v3->vfptr, 27, &wParam, &v3->vfptr);
    PgWin::PostMsg((PgWin *)&v3->vfptr, 2u, 0, 0);
  }
}

//----- (00447000) --------------------------------------------------------
char __thiscall FlexMsgBox::Create(FlexMsgBox *this, NiSourceTexture *pkTexture, unsigned int uiEdgeWidth, unsigned int uiEdgeHeight, PgFrameWork *pkFrameWork)
{
  FlexMsgBox *v5; // esi@1
  unsigned int v6; // edi@1
  unsigned int v7; // ebx@1
  char result; // al@2
  PgFont *v9; // eax@4
  int v10; // eax@4
  int v11; // ST30_4@6
  int v12; // ecx@6
  int v13; // ST34_4@6
  float v14; // ST30_4@6
  float v15; // ST34_4@6
  NiTexturePalette *v16; // edi@6
  const char *v17; // eax@8
  NiSourceTexture *v18; // eax@9
  PgSprData *v19; // eax@10
  PgWinSpr *v20; // eax@12
  PgSprData *v21; // edi@14
  PgWinBut *v22; // ST14_4@14
  PgWinBut *v23; // edi@14
  PgFont *v24; // ST10_4@14
  unsigned int v25; // ST0C_4@14
  unsigned int v26; // eax@14
  PgWinText *v27; // edi@14
  NiRefObjectVtbl *v28; // ebx@14
  NiUnsharedGeometryGroup *v29; // eax@14
  PgFrameWork *v30; // esi@15
  NiSourceTexture *pkTexturea; // [sp+30h] [bp+8h]@3

  v5 = this;
  v6 = uiEdgeHeight;
  v7 = uiEdgeWidth;
  if ( !FrameBoxWin::Create((FrameBoxWin *)&this->vfptr, pkTexture, uiEdgeWidth, uiEdgeHeight, 0, 0, 0, pkFrameWork) )
    goto LABEL_21;
  ((void (__thiscall *)(FlexMsgBox *, unsigned int, unsigned int))v5->vfptr[135].__vecDelDtor)(
    v5,
    2 * v5->m_uiEdgeWidth + 128,
    2 * v5->m_uiEdgeHeight + 12);
  pkTexturea = (NiSourceTexture *)operator new(0x14Cu);
  if ( pkTexturea )
  {
    v9 = Font::Get(0);
    PgTextGeometry::PgTextGeometry((PgTextGeometry *)pkTexturea, v9);
  }
  else
  {
    v10 = 0;
  }
  v5->m_pkTextGeom = (PgTextGeometry *)v10;
  v11 = *(_DWORD *)(v10 + 88);
  v12 = *(_DWORD *)(v10 + 96);
  v13 = *(_DWORD *)(v10 + 92);
  v14 = (double)v7;
  v15 = (double)v6;
  *(float *)(v10 + 88) = v14;
  *(float *)(v10 + 92) = v15;
  *(_DWORD *)(v10 + 96) = v12;
  v5->m_pkTextGeom->m_bTextCmdOn = 1;
  SpScreenText::SetVerticalGap((SpScreenText *)&v5->m_pkTextGeom->vfptr, 3);
  pkFrameWork = 0;
  v16 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v17 = Folder::Merge(&Folder::m_acMenu, "Game\\MessageWin.nif");
  PgUtil::LoadNodeNifFile(v17, (NiPointer<NiNode> *)&pkFrameWork, v16);
  if ( pkFrameWork )
  {
    v18 = MenuTexMgr::GetTexture(0x13u);
    if ( v18 )
      v19 = PgSprData::Create((NiAVObject *)pkFrameWork, "Theme", (int *)&uiEdgeWidth, (int *)&uiEdgeHeight, v18);
    else
      v19 = PgSprData::Create((NiAVObject *)pkFrameWork, "Theme", (int *)&uiEdgeWidth, (int *)&uiEdgeHeight, 0);
    v20 = PgWinSpr::CreateWin(uiEdgeWidth, uiEdgeHeight, v19, (PgWin *)&v5->vfptr, 0, 0);
    v5->m_pkThemeWin = v20;
    if ( v20 )
    {
      v20->vfptr[60].__vecDelDtor((NiRefObject *)v20, 0);
      ((void (__stdcall *)(PgTextGeometry *, _DWORD))v5->m_pkThemeWin->vfptr[29].__vecDelDtor)(v5->m_pkTextGeom, 0);
    }
    v21 = PgSprData::Create((NiAVObject *)pkFrameWork, "BtnNor01", (int *)&uiEdgeWidth, (int *)&uiEdgeHeight, 0);
    PgSprData::Add(v21, (NiAVObject *)pkFrameWork, "BtnClick01");
    PgSprData::Add(v21, (NiAVObject *)pkFrameWork, "BtnOver01");
    v22 = PgWinBut::CreateWin(uiEdgeWidth, uiEdgeHeight, v21, (PgWin *)&v5->vfptr, 0xAu, 0, 0);
    v5->m_pkOKBut = v22;
    v23 = v22;
    v24 = Font::Get(0);
    v25 = ((int (__thiscall *)(PgWinBut *))v23->vfptr[37].__vecDelDtor)(v23);
    v26 = ((int (__thiscall *)(PgWinBut *))v23->vfptr[36].__vecDelDtor)(v23);
    v27 = PgWinText::CreateWin(0, 0, v26, v25, v24, (PgWin *)&v22->vfptr, 0, 0);
    v27->vfptr[122].__vecDelDtor((NiRefObject *)v27, 5u);
    v28 = v27->vfptr;
    v29 = TextData::Get(0x4F5F499Fu);
    v28[118].__vecDelDtor((NiRefObject *)v27, (unsigned int)v29);
    v27->vfptr[60].__vecDelDtor((NiRefObject *)v27, 0);
    NiAVObject::UpdateProperties((NiAVObject *)&v5->vfptr);
    if ( pkFrameWork )
    {
      v30 = pkFrameWork;
      if ( !InterlockedDecrement((volatile LONG *)&pkFrameWork->m_pkMsgHooker) )
      {
        if ( v30 )
          v30->vfptr->SetMsgHooker((IDirectMessenger *)v30, (IDirectMessenger *)1);
      }
    }
    result = 1;
  }
  else
  {
LABEL_21:
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00447300) --------------------------------------------------------
FlexMsgBox *__cdecl FlexMsgBox::CreateWin(NiSourceTexture *pkTexture, unsigned int uiEdgeHeight, unsigned int uiEdgeWidth, PgFrameWork *pkFrameWork)
{
  PgWin *v4; // eax@1
  PgWin *v5; // esi@1
  PgWin *v6; // edi@8
  FlexMsgBox *v7; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v4 = (PgWin *)operator new(0x1ACu);
  v5 = v4;
  result.m_pObject = v4;
  v9 = 0;
  if ( v4 )
  {
    FrameBoxWin::FrameBoxWin((FrameBoxWin *)v4);
    v5->vfptr = (NiRefObjectVtbl *)&FlexMsgBox::`vftable'{for `NiNode'};
    v5->vfptr = (IDirectMessengerVtbl *)&FlexMsgBox::`vftable'{for `IDirectMessenger'};
    LODWORD(v5[1].m_kWorld.m_Rotate.m_pEntry[2][0]) = 0;
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v9 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v5);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, NiSourceTexture *, unsigned int, unsigned int, PgFrameWork *))v5->vfptr[137].__vecDelDtor)(
                          v5,
                          pkTexture,
                          uiEdgeHeight,
                          uiEdgeWidth,
                          pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v5->vfptr[89].__vecDelDtor)(v5);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = (FlexMsgBox *)v5;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v5);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = 0;
  }
  return v7;
}
// 979360: using guessed type void (__thiscall *FlexMsgBox::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97937C: using guessed type int (__thiscall *FlexMsgBox::`vftable'{for `NiNode'})(void *p, char);

//----- (00447450) --------------------------------------------------------
void __cdecl FlexMsgBox::Open(char *pcText)
{
  NiSourceTexture *v1; // eax@1
  FlexMsgBox *v2; // esi@1

  v1 = MenuTexMgr::GetTexture(1u);
  v2 = FlexMsgBox::CreateWin(v1, 5u, 5u, 0);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
  FlexMsgBox::SetText(v2, pcText);
}

//----- (004474B0) --------------------------------------------------------
FlexMsgBox *__thiscall FlexMsgBox::`scalar deleting destructor'(FlexMsgBox *this, unsigned int a2)
{
  FlexMsgBox *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&FlexMsgBox::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&FlexMsgBox::`vftable'{for `IDirectMessenger'};
  FrameBoxWin::~FrameBoxWin((FrameBoxWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 979360: using guessed type void (__thiscall *FlexMsgBox::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97937C: using guessed type int (__thiscall *FlexMsgBox::`vftable'{for `NiNode'})(void *p, char);

//----- (004474F0) --------------------------------------------------------
void __thiscall FrameBoxWin::FrameBoxWin(FrameBoxWin *this)
{
  FrameBoxWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_bLock = 0;
  v1->vfptr = (NiRefObjectVtbl *)&FrameBoxWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&FrameBoxWin::`vftable'{for `IDirectMessenger'};
  *(_WORD *)&v1->m_bSizeDraggable = 0;
  v1->m_iSizeDragMinWidth = 100;
  v1->m_iSizeDragMaxWidth = 500;
  v1->m_iSizeDragMinHeight = 60;
  v1->m_iSizeDragMaxHeight = 300;
}
// 9795AC: using guessed type void (__thiscall *FrameBoxWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9795CC: using guessed type int (__thiscall *FrameBoxWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00447550) --------------------------------------------------------
void __thiscall FrameBoxWin::~FrameBoxWin(FrameBoxWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&FrameBoxWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&FrameBoxWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9795AC: using guessed type void (__thiscall *FrameBoxWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9795CC: using guessed type int (__thiscall *FrameBoxWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00447570) --------------------------------------------------------
BOOL __thiscall FrameBoxWin::SizeDragHitTest(FrameBoxWin *this)
{
  FrameBoxWin *v1; // esi@1
  void *(__thiscall *v2)(NiRefObject *, unsigned int); // eax@1
  NiRefObjectVtbl *v3; // eax@1
  int v4; // eax@1
  NiRefObjectVtbl *v5; // eax@1
  void *(__thiscall *v6)(NiRefObject *, unsigned int); // edx@1
  int v7; // eax@1
  NiRefObjectVtbl *v8; // edx@1
  int v9; // eax@1
  NiRefObjectVtbl *v10; // edx@1
  int v11; // eax@1
  int v12; // edx@1
  NiRefObjectVtbl *v13; // eax@1
  int v14; // eax@1
  NiRefObjectVtbl *v15; // edx@1
  int v16; // eax@1
  int v17; // edx@1
  NiRefObjectVtbl *v18; // eax@1
  int v19; // eax@1
  int v20; // edx@1
  NiRefObjectVtbl *v21; // eax@1
  int v22; // eax@1
  int v23; // ebx@1
  int v24; // edi@1
  bool v25; // al@1
  int x; // [sp+Ch] [bp-4Ch]@1
  int y; // [sp+10h] [bp-48h]@1
  tagRECT kRight; // [sp+14h] [bp-44h]@1
  tagRECT kBottom; // [sp+24h] [bp-34h]@1
  tagRECT kTop; // [sp+34h] [bp-24h]@1
  tagRECT kLeft; // [sp+44h] [bp-14h]@1

  v1 = this;
  y = 0;
  x = 0;
  v2 = this->vfptr[55].__vecDelDtor;
  this->m_kSizeDragBarState.bLeft = 0;
  *(_WORD *)&this->m_kSizeDragBarState.bRight = 0;
  this->m_kSizeDragBarState.bBottom = 0;
  ((void (__stdcall *)(int *, int *))v2)(&x, &y);
  kLeft.right = x + 7;
  v3 = v1->vfptr;
  kLeft.left = x - 7;
  kLeft.top = y - 7;
  v4 = ((int (__thiscall *)(FrameBoxWin *))v3[37].__vecDelDtor)(v1);
  kLeft.bottom = v4 + y + 7;
  v5 = v1->vfptr;
  kTop.left = x - 7;
  v6 = v5[36].__vecDelDtor;
  kTop.top = y - 7;
  v7 = ((int (__thiscall *)(FrameBoxWin *))v6)(v1);
  kTop.right = v7 + x + 7;
  v8 = v1->vfptr;
  kTop.bottom = y + 7;
  v9 = ((int (__thiscall *)(FrameBoxWin *))v8[36].__vecDelDtor)(v1);
  kRight.left = v9 + x - 7;
  v10 = v1->vfptr;
  kRight.top = y - 7;
  v11 = ((int (__thiscall *)(FrameBoxWin *))v10[36].__vecDelDtor)(v1);
  v12 = v11 + x + 7;
  v13 = v1->vfptr;
  kRight.right = v12;
  v14 = ((int (__thiscall *)(FrameBoxWin *))v13[37].__vecDelDtor)(v1);
  kRight.bottom = v14 + y + 7;
  v15 = v1->vfptr;
  kBottom.left = x - 7;
  v16 = ((int (__thiscall *)(FrameBoxWin *))v15[37].__vecDelDtor)(v1);
  v17 = v16 + y - 7;
  v18 = v1->vfptr;
  kBottom.top = v17;
  v19 = ((int (__thiscall *)(FrameBoxWin *))v18[36].__vecDelDtor)(v1);
  v20 = v19 + x + 7;
  v21 = v1->vfptr;
  kBottom.right = v20;
  v22 = ((int (__thiscall *)(FrameBoxWin *))v21[37].__vecDelDtor)(v1);
  v23 = PgWin::ms_iMsY;
  v24 = PgWin::ms_iMsX;
  kBottom.bottom = v22 + y + 7;
  v1->m_kSizeDragBarState.bLeft = PtInRect(&kLeft, (POINT)__PAIR__(PgWin::ms_iMsY, PgWin::ms_iMsX)) != 0;
  v1->m_kSizeDragBarState.bTop = PtInRect(&kTop, (POINT)__PAIR__(v23, v24)) != 0;
  v1->m_kSizeDragBarState.bRight = PtInRect(&kRight, (POINT)__PAIR__(v23, v24)) != 0;
  v25 = PtInRect(&kBottom, (POINT)__PAIR__(v23, v24)) != 0;
  v1->m_kSizeDragBarState.bBottom = v25;
  if ( v1->m_kSizeDragBarState.bRight == 1 && v1->m_kSizeDragBarState.bLeft == 1 )
    *(_WORD *)&v1->m_kSizeDragBarState.bLeft = 1;
  if ( v25 == 1 && v1->m_kSizeDragBarState.bTop == 1 )
    *(_WORD *)&v1->m_kSizeDragBarState.bTop = 1;
  return v1->m_kSizeDragBarState.bLeft
      || v1->m_kSizeDragBarState.bRight
      || v1->m_kSizeDragBarState.bTop
      || v1->m_kSizeDragBarState.bBottom;
}

//----- (00447790) --------------------------------------------------------
void __thiscall FrameBoxWin::ResizeLimited(FrameBoxWin *this, int iWidth, int iHeight)
{
  int v3; // esi@1
  int v4; // eax@5

  v3 = iWidth;
  if ( iWidth < this->m_iSizeDragMinWidth )
    v3 = this->m_iSizeDragMinWidth;
  if ( v3 > this->m_iSizeDragMaxWidth )
    v3 = this->m_iSizeDragMaxWidth;
  v4 = iHeight;
  if ( iHeight < this->m_iSizeDragMinHeight )
    v4 = this->m_iSizeDragMinHeight;
  if ( v4 > this->m_iSizeDragMaxHeight )
    v4 = this->m_iSizeDragMaxHeight;
  ((void (__stdcall *)(_DWORD, _DWORD))this->vfptr[135].__vecDelDtor)(v3, v4);
}

//----- (004477E0) --------------------------------------------------------
bool __thiscall FrameBoxWin::HitTestEx(FrameBoxWin *this, int iSx, int iSy)
{
  FrameBoxWin *v3; // esi@1
  int v4; // eax@2
  int v5; // eax@4
  bool result; // al@5

  v3 = this;
  ((void (__stdcall *)(int *, int *))this->vfptr[56].__vecDelDtor)(&iSx, &iSy);
  result = 0;
  if ( iSx >= -7 )
  {
    v4 = ((int (__thiscall *)(FrameBoxWin *))v3->vfptr[36].__vecDelDtor)(v3);
    if ( iSx < v4 + 7 && iSy >= -7 )
    {
      v5 = ((int (__thiscall *)(FrameBoxWin *))v3->vfptr[37].__vecDelDtor)(v3);
      if ( iSy < v5 + 7 )
        result = 1;
    }
  }
  return result;
}

//----- (00447840) --------------------------------------------------------
void __userpurge FrameBoxWin::ProcessMeInput(FrameBoxWin *this@<ecx>, int a2@<ebx>, int a3@<edi>, bool *bHit)
{
  FrameBoxWin *v4; // esi@1
  NiRefObjectVtbl *v5; // eax@10
  unsigned int v6; // edx@17
  int v7; // eax@17
  int v8; // ecx@17
  int v9; // edi@17
  int v10; // ebx@17
  int v11; // eax@22
  NiRefObjectVtbl *v12; // edx@22
  int v13; // eax@22
  NiRefObjectVtbl *v14; // edx@22
  int v15; // eax@22
  NiRefObjectVtbl *v16; // edx@22
  int v17; // eax@22
  bool v18; // zf@22
  int v19; // ecx@23
  int v20; // ecx@25
  int v21; // edx@25
  bool v22; // sf@25
  unsigned __int8 v23; // of@25
  int v24; // edx@25
  int v25; // ecx@29
  int v26; // ecx@31
  int v27; // ecx@33
  int v28; // ecx@37
  int v29; // ecx@39
  int v30; // edi@41
  int v31; // ecx@43
  int v32; // ecx@45
  int v33; // ebx@47
  int v34; // ecx@50
  void *(__thiscall *v35)(NiRefObject *, unsigned int); // eax@50
  int v36; // eax@50
  void *(__thiscall *v37)(NiRefObject *, unsigned int); // edx@50
  int v38; // eax@50
  void *(__thiscall *v39)(NiRefObject *, unsigned int); // edx@50
  int v40; // eax@50
  int v41; // [sp-8h] [bp-2Ch]@17
  int v42; // [sp-4h] [bp-28h]@2
  int iNewLeft; // [sp+8h] [bp-1Ch]@27
  int iNewWidth; // [sp+Ch] [bp-18h]@27
  DirectUserMsgBody_SizeDrag kDrag; // [sp+10h] [bp-14h]@50

  v4 = this;
  if ( this->m_bLock )
    return;
  v42 = a3;
  if ( dword_B64790 < 1 )
  {
    if ( dword_B6479C < 1 )
      goto LABEL_15;
    if ( (FrameBoxWin *)PgWin::ms_pkCapture == this )
    {
      PgWin::ms_pkCapture = 0;
      PgWinFrame::ResetAttachPos((PgWinFrame *)&this->vfptr);
    }
LABEL_14:
    v4->m_bIsDuringSizeDrag = 0;
LABEL_15:
    if ( !v4->m_bIsDuringSizeDrag )
      goto LABEL_54;
    goto LABEL_16;
  }
  if ( !(unsigned __int8)((int (__thiscall *)(FrameBoxWin *))this->vfptr[65].__vecDelDtor)(this)
    || !(unsigned __int8)FrameBoxWin::SizeDragHitTest(v4) )
  {
    goto LABEL_14;
  }
  ((void (__thiscall *)(FrameBoxWin *))v4->vfptr[67].__vecDelDtor)(v4);
  byte_B6478C = 0;
  if ( dword_B64790 )
    --dword_B64790;
  if ( !v4->m_bSizeDraggable || PgWin::ms_pkCapture )
    goto LABEL_14;
  PgWin::ms_pkCapture = (PgWin *)v4;
  if ( !v4->m_bIsDuringSizeDrag )
  {
    v5 = v4->vfptr;
    v4->m_bIsDuringSizeDrag = 1;
    v4->m_iSizeDragOrgX = PgWin::ms_iMsX;
    v4->m_iSizeDragOrgY = PgWin::ms_iMsY;
    v4->m_iSizeDragOrgLeft = ((int (__thiscall *)(FrameBoxWin *))v5[41].__vecDelDtor)(v4);
    v4->m_iSizeDragOrgTop = ((int (__thiscall *)(FrameBoxWin *))v4->vfptr[42].__vecDelDtor)(v4);
    v4->m_iSizeDragOrgWidth = ((int (__thiscall *)(FrameBoxWin *))v4->vfptr[36].__vecDelDtor)(v4);
    v4->m_iSizeDragOrgHeight = ((int (__thiscall *)(FrameBoxWin *))v4->vfptr[37].__vecDelDtor)(v4);
    goto LABEL_15;
  }
LABEL_16:
  if ( (FrameBoxWin *)PgWin::ms_pkCapture == v4 )
  {
    v6 = PgWin::ms_iMsX;
    v7 = v4->m_iSizeDragOrgX;
    v8 = v4->m_iSizeDragOrgY;
    v41 = a2;
    v9 = PgWin::ms_iMsX - v7;
    v10 = PgWin::ms_iMsY - v8;
    if ( !PgWin::ms_iMsX )
    {
      if ( PgWin::ms_iMsY == PgWin::ms_iMsX )
      {
        v10 = g_pkMouse->m_akAxes[1].m_iValue;
        v9 = 1;
        v4->m_iSizeDragOrgX = v7 + 1;
        v4->m_iSizeDragOrgY = v10 + v8;
        goto LABEL_22;
      }
      v6 = PgWin::ms_iMsX;
    }
    v4->m_iSizeDragOrgX = v6;
    v4->m_iSizeDragOrgY = PgWin::ms_iMsY;
LABEL_22:
    v11 = ((int (__thiscall *)(FrameBoxWin *, int, int))v4->vfptr[41].__vecDelDtor)(v4, v41, v42);
    v12 = v4->vfptr;
    v4->m_iSizeDragOrgLeft = v11;
    v13 = ((int (__thiscall *)(FrameBoxWin *))v12[42].__vecDelDtor)(v4);
    v14 = v4->vfptr;
    v4->m_iSizeDragOrgTop = v13;
    v15 = ((int (__thiscall *)(FrameBoxWin *))v14[36].__vecDelDtor)(v4);
    v16 = v4->vfptr;
    v4->m_iSizeDragOrgWidth = v15;
    v17 = ((int (__thiscall *)(FrameBoxWin *))v16[37].__vecDelDtor)(v4);
    v18 = v4->m_kSizeDragBarState.bLeft == 0;
    v4->m_iSizeDragOrgHeight = v17;
    if ( v18 )
    {
      if ( v4->m_kSizeDragBarState.bRight )
      {
        v25 = v4->m_iSizeDragMaxWidth;
        if ( v9 + v4->m_iSizeDragOrgWidth > v25 )
          v9 = v25 - v4->m_iSizeDragOrgWidth;
        v26 = v4->m_iSizeDragMinWidth;
        if ( v9 + v4->m_iSizeDragOrgWidth < v26 )
          v9 = v26 - v4->m_iSizeDragOrgWidth;
        iNewLeft = v4->m_iSizeDragOrgLeft;
        v27 = v9 + v4->m_iSizeDragOrgWidth;
      }
      else
      {
        v27 = v4->m_iSizeDragOrgWidth;
        iNewLeft = v4->m_iSizeDragOrgLeft;
      }
      iNewWidth = v27;
    }
    else
    {
      v19 = v4->m_iSizeDragMaxWidth;
      if ( v4->m_iSizeDragOrgWidth - v9 > v19 )
        v9 = v4->m_iSizeDragOrgWidth - v19;
      v20 = v4->m_iSizeDragMinWidth;
      v21 = v4->m_iSizeDragOrgWidth - v9;
      v23 = __OFSUB__(v21, v20);
      v22 = v21 - v20 < 0;
      v24 = v4->m_iSizeDragOrgWidth;
      if ( v22 ^ v23 )
        v9 = v24 - v20;
      iNewLeft = v9 + v4->m_iSizeDragOrgLeft;
      iNewWidth = v24 - v9;
    }
    if ( v4->m_kSizeDragBarState.bTop )
    {
      v28 = v4->m_iSizeDragMaxHeight;
      if ( v17 - v10 > v28 )
        v10 = v17 - v28;
      v29 = v4->m_iSizeDragMinHeight;
      if ( v17 - v10 < v29 )
        v10 = v17 - v29;
      v30 = v10 + v4->m_iSizeDragOrgTop;
      v17 -= v10;
    }
    else
    {
      if ( v4->m_kSizeDragBarState.bBottom )
      {
        v31 = v4->m_iSizeDragMaxHeight;
        if ( v17 + v10 > v31 )
          v10 = v31 - v17;
        v32 = v4->m_iSizeDragMinHeight;
        if ( v17 + v10 < v32 )
          v10 = v32 - v17;
        v30 = v4->m_iSizeDragOrgTop;
        v33 = v17 + v10;
        goto LABEL_50;
      }
      v30 = v4->m_iSizeDragOrgTop;
    }
    v33 = v17;
LABEL_50:
    ((void (__thiscall *)(FrameBoxWin *))v4->vfptr[36].__vecDelDtor)(v4);
    ((void (__thiscall *)(FrameBoxWin *))v4->vfptr[37].__vecDelDtor)(v4);
    v34 = iNewWidth - ((int (__thiscall *)(FrameBoxWin *))v4->vfptr[36].__vecDelDtor)(v4);
    v35 = v4->vfptr[37].__vecDelDtor;
    kDrag.iDeltaWidth = v34;
    v36 = ((int (__thiscall *)(FrameBoxWin *))v35)(v4);
    v37 = v4->vfptr[135].__vecDelDtor;
    kDrag.iDeltaHeight = v33 - v36;
    ((void (__thiscall *)(FrameBoxWin *))v37)(v4);
    v38 = ((int (__thiscall *)(FrameBoxWin *))v4->vfptr[41].__vecDelDtor)(v4);
    v39 = v4->vfptr[42].__vecDelDtor;
    kDrag.iDeltaLeft = iNewLeft - v38;
    v40 = ((int (__thiscall *)(FrameBoxWin *))v39)(v4);
    v18 = v4->m_pkMsgHooker == 0;
    kDrag.iDeltaTop = v30 - v40;
    if ( !v18 )
    {
      ((void (__stdcall *)(signed int, DirectUserMsgBody_SizeDrag *, IDirectMessengerVtbl **))v4->m_pkMsgHooker->vfptr->SendDirectMessage)(
        14,
        &kDrag,
        &v4->vfptr);
      if ( v4->m_pkMsgHooker )
        ((void (__stdcall *)(signed int, DirectUserMsgBody_SizeDrag *, IDirectMessengerVtbl **))v4->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          14,
          &kDrag,
          &v4->vfptr);
    }
    ((void (__thiscall *)(IDirectMessengerVtbl **, signed int, DirectUserMsgBody_SizeDrag *))v4->vfptr->DirectDispatchToParent)(
      &v4->vfptr,
      14,
      &kDrag);
  }
LABEL_54:
  if ( (unsigned __int8)((int (__thiscall *)(FrameBoxWin *))v4->vfptr[78].__vecDelDtor)(v4) )
  {
    if ( dword_B64790 )
      ++dword_B64790;
    if ( PgWin::ms_kbRbutPressed.m_iBool )
      ++PgWin::ms_kbRbutPressed.m_iBool;
    PgWinFrame::ProcessMeInput((PgWinFrame *)&v4->vfptr, bHit);
    PgWin::ms_kbRbutPressed.m_bReserveFalse = 0;
    if ( PgWin::ms_kbRbutPressed.m_iBool )
      --PgWin::ms_kbRbutPressed.m_iBool;
    byte_B6478C = 0;
    if ( dword_B64790 )
      --dword_B64790;
  }
}
// 447840: could not find valid save-restore pair for ebx
// 447840: could not find valid save-restore pair for edi
// A8C4A8: using guessed type struct NiInputMouse *g_pkMouse;
// B6478C: using guessed type char byte_B6478C;
// B64790: using guessed type int dword_B64790;
// B6479C: using guessed type int dword_B6479C;

//----- (00447CB0) --------------------------------------------------------
void __stdcall FrameBoxWin::AddScreenElement(NiScreenElements *pkGeom, unsigned int uiTextureWidth, unsigned int uiTextureHeight, unsigned int uiXPos, unsigned int uiYPos, unsigned int uiWidth, unsigned int uiHeight)
{
  float v8; // ST20_4@1
  float v9; // ST2C_4@1
  float v10; // ST34_4@1
  float v11; // ST30_4@1
  NiScreenElementsData *v12; // ecx@1
  int v13; // edi@1
  float fRight; // ST48_4@1
  float fBottom; // ST40_4@1
  double v16; // st7@1
  float v17; // ST48_4@1
  float v18; // ST14_4@1
  float v19; // ST48_4@1
  float v20; // ST10_4@1
  float v21; // ST48_4@1
  float v22; // ST0C_4@1
  float v23; // ST48_4@1
  NiPoint2 pkPts[4]; // [sp+44h] [bp-24h]@1

  v11 = (double)(uiHeight + uiYPos);
  pkPts[0].x = (double)uiXPos;
  pkPts[0].y = (double)uiYPos;
  pkPts[1].x = (double)uiXPos;
  pkPts[1].y = v11;
  pkPts[2].x = (double)(uiWidth + uiXPos);
  pkPts[2].y = v11;
  pkPts[3].x = (double)(uiWidth + uiXPos);
  v12 = (NiScreenElementsData *)pkGeom->m_spModelData.m_pObject;
  pkPts[3].y = (double)uiYPos;
  v13 = NiScreenElementsData::Insert(v12, 4u, 0, 0);
  NiScreenElementsData::SetVertex((NiScreenElementsData *)pkGeom->m_spModelData.m_pObject, v13, 0, pkPts);
  NiScreenElementsData::SetVertex((NiScreenElementsData *)pkGeom->m_spModelData.m_pObject, v13, 1, &pkPts[1]);
  NiScreenElementsData::SetVertex((NiScreenElementsData *)pkGeom->m_spModelData.m_pObject, v13, 2, &pkPts[2]);
  NiScreenElementsData::SetVertex((NiScreenElementsData *)pkGeom->m_spModelData.m_pObject, v13, 3, &pkPts[3]);
  NiScreenElementsData::UpdateBound((NiScreenElementsData *)pkGeom->m_spModelData.m_pObject);
  fRight = (double)uiTextureHeight;
  fBottom = (double)uiTextureWidth;
  v16 = fRight;
  v17 = v11 / fRight;
  v18 = v17;
  v10 = (double)(uiWidth + uiXPos);
  v19 = v10 / fBottom;
  v20 = v19;
  v9 = (double)uiYPos;
  v21 = v9 / v16;
  v22 = v21;
  v8 = (double)uiXPos;
  v23 = v8 / fBottom;
  NiScreenElementsData::SetTextures((NiScreenElementsData *)pkGeom->m_spModelData.m_pObject, v13, 0, v23, v22, v20, v18);
}

//----- (00447E90) --------------------------------------------------------
void __stdcall FrameBoxWin::ResizeScreenElement(NiScreenElements *pkGeom, unsigned int uiIndex, unsigned int uiXPos, unsigned int uiYPos, unsigned int uiWidth, unsigned int uiHeight)
{
  NiScreenElements *v7; // esi@1
  NiScreenElementsData *v8; // ecx@2
  bool v9; // sf@3
  unsigned int v10; // edx@3
  double v11; // st7@3
  NiScreenElementsData *v12; // ecx@5
  NiScreenElementsData *v13; // ecx@5
  NiScreenElementsData *v14; // ecx@5
  NiPoint2 kValue; // [sp+4h] [bp-Ch]@5
  float fTop; // [sp+Ch] [bp-4h]@3
  float fLeft; // [sp+18h] [bp+8h]@3
  float fBottom; // [sp+20h] [bp+10h]@5
  float fRight; // [sp+24h] [bp+14h]@3

  v7 = pkGeom;
  if ( pkGeom )
  {
    v8 = (NiScreenElementsData *)pkGeom->m_spModelData.m_pObject;
    if ( v8->m_usPQuantity )
    {
      fLeft = (double)uiXPos;
      fTop = (double)uiYPos;
      v9 = ((uiHeight + uiYPos) & 0x80000000) != 0;
      v10 = uiHeight + uiYPos;
      fRight = (double)(uiWidth + uiXPos);
      v11 = (double)(signed int)v10;
      if ( v9 )
        v11 = v11 + 4294967300.0;
      fBottom = v11;
      kValue.x = fLeft;
      kValue.y = fTop;
      NiScreenElementsData::SetVertex(v8, uiIndex, 0, &kValue);
      v12 = (NiScreenElementsData *)v7->m_spModelData.m_pObject;
      kValue.x = fLeft;
      kValue.y = fBottom;
      NiScreenElementsData::SetVertex(v12, uiIndex, 1, &kValue);
      kValue.x = fRight;
      v13 = (NiScreenElementsData *)v7->m_spModelData.m_pObject;
      kValue.y = fBottom;
      NiScreenElementsData::SetVertex(v13, uiIndex, 2, &kValue);
      v14 = (NiScreenElementsData *)v7->m_spModelData.m_pObject;
      kValue.x = fRight;
      kValue.y = fTop;
      NiScreenElementsData::SetVertex(v14, uiIndex, 3, &kValue);
      NiScreenElementsData::UpdateBound((NiScreenElementsData *)v7->m_spModelData.m_pObject);
    }
  }
}

//----- (00447FA0) --------------------------------------------------------
void __thiscall FrameBoxWin::Resize(FrameBoxWin *this, unsigned int uiWidth, unsigned int uiHeight)
{
  unsigned int v3; // eax@1
  FrameBoxWin *v4; // esi@1
  NiRefObjectVtbl *v5; // edx@7
  unsigned int v6; // ST14_4@7
  void *(__thiscall *v7)(NiRefObject *, unsigned int); // eax@7

  v3 = uiWidth;
  v4 = this;
  if ( this->m_uiOrgWidth != uiWidth || this->m_uiOrgHeight != uiHeight )
  {
    if ( uiWidth < 2 * this->m_uiEdgeWidth + 1 )
      v3 = 2 * this->m_uiEdgeWidth + 1;
    if ( uiHeight < 2 * this->m_uiEdgeHeight + 1 )
      v3 = 2 * this->m_uiEdgeHeight + 1;
    v5 = this->vfptr;
    this->m_uiOrgWidth = v3;
    v6 = v3;
    v7 = v5[38].__vecDelDtor;
    this->m_uiOrgHeight = uiHeight;
    v7((NiRefObject *)&this->vfptr, v6);
    v4->vfptr[39].__vecDelDtor((NiRefObject *)v4, uiHeight);
    FrameBoxWin::ResizeScreenElement(v4->m_pkGeom, 0, 0, 0, v4->m_uiEdgeWidth, v4->m_uiEdgeHeight);
    FrameBoxWin::ResizeScreenElement(
      v4->m_pkGeom,
      1u,
      v4->m_uiOrgWidth - v4->m_uiEdgeWidth,
      0,
      v4->m_uiEdgeWidth,
      v4->m_uiEdgeHeight);
    FrameBoxWin::ResizeScreenElement(
      v4->m_pkGeom,
      2u,
      0,
      v4->m_uiOrgHeight - v4->m_uiEdgeHeight,
      v4->m_uiEdgeWidth,
      v4->m_uiEdgeHeight);
    FrameBoxWin::ResizeScreenElement(
      v4->m_pkGeom,
      3u,
      v4->m_uiOrgWidth - v4->m_uiEdgeWidth,
      v4->m_uiOrgHeight - v4->m_uiEdgeHeight,
      v4->m_uiEdgeWidth,
      v4->m_uiEdgeHeight);
    FrameBoxWin::ResizeScreenElement(
      v4->m_pkGeom,
      4u,
      v4->m_uiEdgeWidth,
      0,
      v4->m_uiOrgWidth - 2 * v4->m_uiEdgeWidth,
      v4->m_uiEdgeHeight);
    FrameBoxWin::ResizeScreenElement(
      v4->m_pkGeom,
      5u,
      0,
      v4->m_uiEdgeHeight,
      v4->m_uiEdgeWidth,
      v4->m_uiOrgHeight - 2 * v4->m_uiEdgeHeight);
    FrameBoxWin::ResizeScreenElement(
      v4->m_pkGeom,
      6u,
      v4->m_uiOrgWidth - v4->m_uiEdgeWidth,
      v4->m_uiEdgeHeight,
      v4->m_uiEdgeWidth,
      v4->m_uiOrgHeight - 2 * v4->m_uiEdgeHeight);
    FrameBoxWin::ResizeScreenElement(
      v4->m_pkGeom,
      7u,
      v4->m_uiEdgeWidth,
      v4->m_uiOrgHeight - v4->m_uiEdgeHeight,
      v4->m_uiOrgWidth - 2 * v4->m_uiEdgeWidth,
      v4->m_uiEdgeHeight);
    FrameBoxWin::ResizeScreenElement(
      v4->m_pkGeom,
      8u,
      v4->m_uiEdgeWidth,
      v4->m_uiEdgeHeight,
      v4->m_uiOrgWidth - 2 * v4->m_uiEdgeWidth,
      v4->m_uiOrgHeight - 2 * v4->m_uiEdgeHeight);
    ((void (__thiscall *)(_DWORD))v4->vfptr[16].__vecDelDtor)(v4);
    NiAVObject::Update((NiAVObject *)&v4->vfptr, 0.0, 1);
  }
}

//----- (004481C0) --------------------------------------------------------
char __thiscall FrameBoxWin::CreateGeometry(FrameBoxWin *this, NiSourceTexture *pkTexture, unsigned int uiEdgeWidth, unsigned int uiEdgeHeight)
{
  FrameBoxWin *v4; // esi@1
  char result; // al@2
  NiScreenElementsData *v6; // eax@5
  NiScreenElementsData *v7; // edi@5
  NiScreenElementsData *v8; // eax@6
  NiScreenElements *v9; // eax@7
  NiScreenElements *v10; // eax@8
  NiObjectNET *v11; // eax@10
  NiObjectNET *v12; // edi@10
  NiTexturingProperty *v13; // eax@13
  int v14; // eax@14
  int v15; // edi@14

  v4 = this;
  if ( pkTexture
    && ((int (__thiscall *)(NiSourceTexture *))pkTexture->vfptr[15].__vecDelDtor)(pkTexture) > 2 * uiEdgeWidth
    && ((int (__thiscall *)(NiSourceTexture *))pkTexture->vfptr[16].__vecDelDtor)(pkTexture) > 2 * uiEdgeHeight )
  {
    v4->m_uiEdgeHeight = uiEdgeHeight;
    v4->m_uiEdgeWidth = uiEdgeWidth;
    v4->m_uiOrgWidth = ((int (__thiscall *)(NiSourceTexture *))pkTexture->vfptr[15].__vecDelDtor)(pkTexture);
    v4->m_uiOrgHeight = ((int (__thiscall *)(NiSourceTexture *))pkTexture->vfptr[16].__vecDelDtor)(pkTexture);
    v6 = (NiScreenElementsData *)operator new(0x70u);
    v7 = 0;
    if ( v6 )
    {
      NiScreenElementsData::NiScreenElementsData(v6, 0, 1, 1u, 1, 1, 4, 1, 2, 1);
      v7 = v8;
    }
    v9 = (NiScreenElements *)operator new(0xC4u);
    if ( v9 )
      NiScreenElements::NiScreenElements(v9, v7);
    else
      v10 = 0;
    v4->m_pkGeom = v10;
    v11 = (NiObjectNET *)operator new(0x20u);
    v12 = v11;
    if ( v11 )
    {
      NiObjectNET::NiObjectNET(v11);
      v12->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
      LOWORD(v12[1].vfptr) = 236;
      BYTE2(v12[1].vfptr) = 0;
    }
    else
    {
      v12 = 0;
    }
    LOWORD(v12[1].vfptr) |= 1u;
    NiAVObject::AttachProperty((NiAVObject *)&v4->m_pkGeom->vfptr, (NiProperty *)v12);
    v13 = (NiTexturingProperty *)operator new(0x44u);
    if ( v13 )
    {
      NiTexturingProperty::NiTexturingProperty(v13);
      v15 = v14;
    }
    else
    {
      v15 = 0;
    }
    NiTexturingProperty::SetBaseTexture((NiTexturingProperty *)v15, (NiTexture *)&pkTexture->vfptr);
    NiTexturingProperty::SetBaseFilterMode((NiTexturingProperty *)v15, 0);
    *(_DWORD *)(v15 + 28) = 2;
    NiAVObject::AttachProperty((NiAVObject *)&v4->m_pkGeom->vfptr, (NiProperty *)v15);
    FrameBoxWin::AddScreenElement(
      v4->m_pkGeom,
      v4->m_uiOrgWidth,
      v4->m_uiOrgHeight,
      0,
      0,
      v4->m_uiEdgeWidth,
      v4->m_uiEdgeHeight);
    FrameBoxWin::AddScreenElement(
      v4->m_pkGeom,
      v4->m_uiOrgWidth,
      v4->m_uiOrgHeight,
      v4->m_uiOrgWidth - v4->m_uiEdgeWidth,
      0,
      v4->m_uiEdgeWidth,
      v4->m_uiEdgeHeight);
    FrameBoxWin::AddScreenElement(
      v4->m_pkGeom,
      v4->m_uiOrgWidth,
      v4->m_uiOrgHeight,
      0,
      v4->m_uiOrgHeight - v4->m_uiEdgeHeight,
      v4->m_uiEdgeWidth,
      v4->m_uiEdgeHeight);
    FrameBoxWin::AddScreenElement(
      v4->m_pkGeom,
      v4->m_uiOrgWidth,
      v4->m_uiOrgHeight,
      v4->m_uiOrgWidth - v4->m_uiEdgeWidth,
      v4->m_uiOrgHeight - v4->m_uiEdgeHeight,
      v4->m_uiEdgeWidth,
      v4->m_uiEdgeHeight);
    FrameBoxWin::AddScreenElement(
      v4->m_pkGeom,
      v4->m_uiOrgWidth,
      v4->m_uiOrgHeight,
      v4->m_uiEdgeWidth,
      0,
      v4->m_uiOrgWidth - 2 * v4->m_uiEdgeWidth,
      v4->m_uiEdgeHeight);
    FrameBoxWin::AddScreenElement(
      v4->m_pkGeom,
      v4->m_uiOrgWidth,
      v4->m_uiOrgHeight,
      0,
      v4->m_uiEdgeHeight,
      v4->m_uiEdgeWidth,
      v4->m_uiOrgHeight - 2 * v4->m_uiEdgeHeight);
    FrameBoxWin::AddScreenElement(
      v4->m_pkGeom,
      v4->m_uiOrgWidth,
      v4->m_uiOrgHeight,
      v4->m_uiOrgWidth - v4->m_uiEdgeWidth,
      v4->m_uiEdgeHeight,
      v4->m_uiEdgeWidth,
      v4->m_uiOrgHeight - 2 * v4->m_uiEdgeHeight);
    FrameBoxWin::AddScreenElement(
      v4->m_pkGeom,
      v4->m_uiOrgWidth,
      v4->m_uiOrgHeight,
      v4->m_uiEdgeWidth,
      v4->m_uiOrgHeight - v4->m_uiEdgeHeight,
      v4->m_uiOrgWidth - 2 * v4->m_uiEdgeWidth,
      v4->m_uiEdgeHeight);
    FrameBoxWin::AddScreenElement(
      v4->m_pkGeom,
      v4->m_uiOrgWidth,
      v4->m_uiOrgHeight,
      v4->m_uiEdgeWidth,
      v4->m_uiEdgeHeight,
      v4->m_uiOrgWidth - 2 * v4->m_uiEdgeWidth,
      v4->m_uiOrgHeight - 2 * v4->m_uiEdgeHeight);
    ((void (__thiscall *)(FrameBoxWin *))v4->vfptr[16].__vecDelDtor)(v4);
    ((void (__thiscall *)(FrameBoxWin *, NiScreenElements *, _DWORD))v4->vfptr[29].__vecDelDtor)(v4, v4->m_pkGeom, 0);
    NiAVObject::UpdateProperties((NiAVObject *)&v4->vfptr);
    NiAVObject::Update((NiAVObject *)&v4->vfptr, 0.0, 1);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);

//----- (00448580) --------------------------------------------------------
char __thiscall FrameBoxWin::Create(FrameBoxWin *this, NiSourceTexture *pkTexture, unsigned int uiEdgeWidth, unsigned int uiEdgeHeight, int iXPos, int iYPos, PgWin *pkParent, PgFrameWork *pkFrameWork)
{
  FrameBoxWin *v8; // esi@1
  char result; // al@1
  NiRefObjectVtbl *v10; // ebx@3
  int v11; // eax@3
  NiRefObjectVtbl *v12; // ebx@3
  int v13; // eax@3

  v8 = this;
  result = PgWinFrame::Create((PgWinFrame *)&this->vfptr, iXPos, iYPos, pkParent, pkFrameWork, 0, 0);
  if ( result )
  {
    result = FrameBoxWin::CreateGeometry(v8, pkTexture, uiEdgeHeight, uiEdgeWidth);
    if ( result )
    {
      v10 = v8->vfptr;
      v11 = ((int (__thiscall *)(_DWORD))pkTexture->vfptr[15].__vecDelDtor)(pkTexture);
      v10[38].__vecDelDtor((NiRefObject *)v8, v11);
      v12 = v8->vfptr;
      v13 = ((int (__thiscall *)(_DWORD))pkTexture->vfptr[16].__vecDelDtor)(pkTexture);
      v12[39].__vecDelDtor((NiRefObject *)v8, v13);
      result = 1;
    }
  }
  return result;
}

//----- (00448600) --------------------------------------------------------
FrameBoxWin *__cdecl FrameBoxWin::CreateWin(NiSourceTexture *pkTexture, unsigned int uiEdgeHeight, unsigned int uiEdgeWidth, int iXPos, int iYPos, PgWin *pkParent, PgFrameWork *pkFrameWork)
{
  PgWin *v7; // eax@1
  PgWin *v8; // eax@2
  PgWin *v9; // esi@2
  PgWin *v10; // edi@8
  FrameBoxWin *v11; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v13; // [sp+20h] [bp-4h]@1

  v7 = (PgWin *)operator new(0x1A0u);
  result.m_pObject = v7;
  v13 = 0;
  if ( v7 )
  {
    FrameBoxWin::FrameBoxWin((FrameBoxWin *)v7);
    v9 = v8;
  }
  else
  {
    v9 = 0;
  }
  if ( v9 )
    InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  v13 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v9);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, NiSourceTexture *, unsigned int, unsigned int, int, int, PgWin *, PgFrameWork *))v9->vfptr[136].__vecDelDtor)(
                          v9,
                          pkTexture,
                          uiEdgeHeight,
                          uiEdgeWidth,
                          iXPos,
                          iYPos,
                          pkParent,
                          pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v9->vfptr[89].__vecDelDtor)(v9);
    v13 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v11 = (FrameBoxWin *)v9;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v9);
    if ( result.m_pObject )
    {
      v10 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v10 )
          v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
      }
    }
    v13 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v11 = 0;
  }
  return v11;
}

//----- (00448750) --------------------------------------------------------
void __thiscall PgWin::Bool::RealizeFalse(PgWin::Bool *this)
{
  bool v1; // zf@1
  int v2; // eax@2

  v1 = this->m_bReserveFalse == 0;
  this->m_bReserveFalse = 0;
  if ( !v1 )
  {
    v2 = this->m_iBool;
    if ( v2 )
      this->m_iBool = v2 - 1;
  }
}

//----- (00448770) --------------------------------------------------------
FrameBoxWin *__thiscall FrameBoxWin::`scalar deleting destructor'(FrameBoxWin *this, unsigned int a2)
{
  FrameBoxWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&FrameBoxWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&FrameBoxWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9795AC: using guessed type void (__thiscall *FrameBoxWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9795CC: using guessed type int (__thiscall *FrameBoxWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004487B0) --------------------------------------------------------
void __thiscall NiTexturingProperty::SetBaseFilterMode(NiTexturingProperty *this, NiTexturingProperty::FilterMode eMode)
{
  NiTexturingProperty *v2; // edi@1
  NiTexturingProperty::Map *v3; // eax@1
  NiTexturingProperty::Map *v4; // eax@2
  NiTexturingProperty::Map *v5; // eax@3
  NiTexturingProperty::Map *v6; // esi@5
  NiTexturingProperty::Map *pkBaseMap; // [sp+Ch] [bp-10h]@2
  int v8; // [sp+18h] [bp-4h]@2

  v2 = this;
  v3 = *this->m_kMaps.m_pBase;
  if ( v3 )
  {
    v3->m_eFilter = eMode;
  }
  else
  {
    v4 = (NiTexturingProperty::Map *)operator new(0x18u);
    pkBaseMap = v4;
    v8 = 0;
    if ( v4 )
      NiTexturingProperty::Map::Map(v4);
    else
      v5 = 0;
    v6 = v5;
    pkBaseMap = v5;
    NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)&v2->m_kMaps, 0, (NiVBChip *const *)&pkBaseMap);
    v6->m_eFilter = eMode;
  }
}

//----- (00448850) --------------------------------------------------------
void __thiscall ImeCandListWin::ImeCandListWin(ImeCandListWin *this)
{
  ImeCandListWin *v1; // esi@1

  v1 = this;
  FrameBoxWin::FrameBoxWin((FrameBoxWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ImeCandListWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ImeCandListWin::`vftable'{for `IDirectMessenger'};
  v1->m_bAttachBottom = 0;
}
// 97981C: using guessed type void (__thiscall *ImeCandListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97983C: using guessed type int (__thiscall *ImeCandListWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00448880) --------------------------------------------------------
void __thiscall ImeCandListWin::~ImeCandListWin(ImeCandListWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ImeCandListWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ImeCandListWin::`vftable'{for `IDirectMessenger'};
  FrameBoxWin::~FrameBoxWin((FrameBoxWin *)&this->vfptr);
}
// 97981C: using guessed type void (__thiscall *ImeCandListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97983C: using guessed type int (__thiscall *ImeCandListWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004488A0) --------------------------------------------------------
void __thiscall ImeCandListWin::ClearText(ImeCandListWin *this)
{
  char *v1; // esi@1
  signed int v2; // edi@1

  v1 = (char *)this->m_apkTextWin;
  v2 = 10;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v1 + 472))(&unk_9797F2);
    v1 += 4;
    --v2;
  }
  while ( v2 );
}

//----- (004488D0) --------------------------------------------------------
char __thiscall ImeCandListWin::SetText(ImeCandListWin *this, int nLine, char *pcText, int r, int g, int b)
{
  ImeCandListWin *v6; // edi@1
  char result; // al@2
  char acStr[256]; // [sp+Ch] [bp-104h]@3

  v6 = this;
  if ( nLine < 9 )
  {
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))this->m_apkTextWin[nLine]->vfptr[116].__vecDelDtor)(
      r,
      g,
      b,
      255);
    sprintf(acStr, "%d: %s", nLine + 1, pcText);
    ((void (__stdcall *)(_DWORD))v6->m_apkTextWin[nLine]->vfptr[118].__vecDelDtor)(acStr);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00448970) --------------------------------------------------------
void __thiscall ImeCandListWin::EnableAttachBottom(ImeCandListWin *this, bool b)
{
  this->m_bAttachBottom = b;
}

//----- (00448980) --------------------------------------------------------
char __thiscall ImeCandListWin::Create(ImeCandListWin *this, NiSourceTexture *pkTexture, unsigned int uiEdgeWidth, unsigned int uiEdgeHeight, PgWin *pkParent)
{
  ImeCandListWin *v5; // esi@1
  char result; // al@1
  PgFont *v7; // eax@2
  unsigned int v8; // eax@4
  int v9; // ebx@4
  PgWinText **v10; // edi@4
  PgWinText *v11; // eax@6
  tagSIZE kSize; // [sp+4h] [bp-Ch]@3
  PgFont *pkFont; // [sp+Ch] [bp-4h]@2
  unsigned int uiEdgeWidtha; // [sp+1Ch] [bp+Ch]@4
  signed int iFontW; // [sp+20h] [bp+10h]@2
  int iFontH; // [sp+24h] [bp+14h]@2

  v5 = this;
  result = FrameBoxWin::Create((FrameBoxWin *)&this->vfptr, pkTexture, uiEdgeWidth, uiEdgeHeight, 0, 0, pkParent, 0);
  if ( result )
  {
    iFontH = 12;
    iFontW = 8;
    v7 = Font::Get(0);
    pkFont = v7;
    if ( v7 )
    {
      PgFont::GetTextSize(v7, "W", 1, &kSize);
      iFontW = kSize.cx;
      iFontH = kSize.cy + 2;
    }
    v8 = 32 * iFontW;
    v9 = 0;
    v10 = v5->m_apkTextWin;
    uiEdgeWidtha = 10;
    while ( 1 )
    {
      v11 = PgWinText::CreateWin(
              v5->m_uiEdgeWidth,
              v5->m_uiEdgeHeight + v9 + 2,
              v8,
              iFontH + 2,
              pkFont,
              (PgWin *)&v5->vfptr,
              0,
              0);
      *v10 = v11;
      v11->vfptr[60].__vecDelDtor((NiRefObject *)v11, 0);
      v9 += iFontH;
      ++v10;
      if ( !--uiEdgeWidtha )
        break;
      v8 = 32 * iFontW;
    }
    ((void (__thiscall *)(ImeCandListWin *, unsigned int, unsigned int))v5->vfptr[135].__vecDelDtor)(
      v5,
      2 * (v5->m_uiEdgeWidth + 8 * iFontW),
      iFontH + 2 * v5->m_uiEdgeHeight);
    v5->vfptr[60].__vecDelDtor((NiRefObject *)v5, 0);
    v5->vfptr[64].__vecDelDtor((NiRefObject *)v5, 0);
    result = 1;
  }
  return result;
}

//----- (00448AB0) --------------------------------------------------------
void __thiscall ImeCandListWin::SetCandList(ImeCandListWin *this, PgImeCtrl::CandList *kCandList)
{
  ImeCandListWin *v2; // edi@1
  char *v3; // esi@1
  void *(__thiscall *v4)(NiRefObject *, unsigned int); // edx@3
  int v5; // esi@6
  PgImeCtrl::CandList *v6; // eax@7
  NiRefObjectVtbl **v7; // edi@15
  NiRefObjectVtbl *v8; // edx@15
  NiRefObjectVtbl **v9; // ecx@15
  unsigned int v10; // eax@16
  PgImeCtrl::CandList *v11; // ecx@17
  unsigned int v12; // eax@20
  char *v13; // edi@20
  char v14; // cl@21
  char *v15; // edi@22
  char *v16; // esi@22
  char v17; // cl@22
  unsigned int v18; // eax@23
  char *v19; // edi@23
  char v20; // cl@24
  char *v21; // [sp-10h] [bp-22Ch]@11
  int v22; // [sp-Ch] [bp-228h]@11
  int v23; // [sp-4h] [bp-220h]@11
  unsigned int v24; // [sp+Ch] [bp-210h]@20
  char *v25; // [sp+10h] [bp-20Ch]@1
  signed int v26; // [sp+14h] [bp-208h]@1
  PgImeCtrl::CandList *i; // [sp+14h] [bp-208h]@7
  PgImeCtrl::CandList *j; // [sp+14h] [bp-208h]@17
  char acTempStr[256]; // [sp+18h] [bp-204h]@16
  char acStr[256]; // [sp+118h] [bp-104h]@15

  v2 = this;
  v3 = (char *)this->m_apkTextWin;
  v25 = (char *)this->m_apkTextWin;
  v26 = 10;
  do
  {
    (*(void (__stdcall **)(void *))(**(_DWORD **)v3 + 472))(&unk_9797F2);
    v3 += 4;
    --v26;
  }
  while ( v26 );
  v4 = v2->vfptr[64].__vecDelDtor;
  if ( kCandList->dwCount )
  {
    v4((NiRefObject *)&v2->vfptr, 1u);
    if ( kCandList->bVerticalCand )
    {
      v5 = 0;
      if ( kCandList->dwPageSize )
      {
        v6 = kCandList;
        for ( i = kCandList; ; v6 = i )
        {
          if ( v6->acCandidate[0][0] )
          {
            if ( kCandList->dwSelection == v5 )
            {
              v23 = 0;
              v22 = 0;
              v21 = (char *)v6;
            }
            else
            {
              v23 = 255;
              v22 = 255;
              v21 = (char *)v6;
            }
          }
          else
          {
            v23 = 255;
            v22 = 255;
            v21 = " ";
          }
          ImeCandListWin::SetText(v2, v5, v21, v22, 255, v23);
          i = (PgImeCtrl::CandList *)((char *)i + 256);
          if ( ++v5 >= kCandList->dwPageSize )
            break;
        }
      }
      sprintf(acStr, "(%d/%d)", kCandList->dwPageTopIndex + kCandList->dwSelection + 1, kCandList->dwCount);
      ((void (__stdcall *)(signed int, signed int, signed int, signed int))v2->m_apkTextWin[9]->vfptr[116].__vecDelDtor)(
        255,
        255,
        255,
        255);
      v7 = &v2->m_apkTextWin[9]->vfptr;
      v8 = *v7;
      v9 = v7;
    }
    else
    {
      v10 = 0;
      acStr[0] = 0;
      acTempStr[0] = 0;
      if ( kCandList->dwPageSize )
      {
        v11 = kCandList;
        for ( j = kCandList; v11->acCandidate[0][0]; v11 = j )
        {
          v24 = v10 + 1;
          sprintf(acTempStr, "%d:%s", v10 + 1, v11);
          v12 = strlen(acTempStr) + 1;
          v13 = &acTempStr[255];
          do
            v14 = (v13++)[1];
          while ( v14 );
          j = (PgImeCtrl::CandList *)((char *)j + 256);
          qmemcpy(v13, acTempStr, 4 * (v12 >> 2));
          v16 = &acTempStr[4 * (v12 >> 2)];
          v15 = &v13[4 * (v12 >> 2)];
          v17 = v12;
          v10 = v24;
          qmemcpy(v15, v16, v17 & 3);
          if ( v24 >= kCandList->dwPageSize )
            break;
        }
      }
      sprintf(acTempStr, "(%d/%d)", kCandList->dwPageTopIndex + 1, kCandList->dwCount);
      v18 = strlen(acTempStr) + 1;
      v19 = &acTempStr[255];
      do
        v20 = (v19++)[1];
      while ( v20 );
      qmemcpy(v19, acTempStr, v18);
      (*(void (__stdcall **)(signed int, signed int, signed int, signed int))(**(_DWORD **)v25 + 464))(
        255,
        255,
        255,
        255);
      v9 = *(NiRefObjectVtbl ***)v25;
      v8 = **(NiRefObjectVtbl ***)v25;
    }
    v8[118].__vecDelDtor((NiRefObject *)v9, (unsigned int)acStr);
  }
  else
  {
    v4((NiRefObject *)&v2->vfptr, 0);
  }
}

//----- (00448D40) --------------------------------------------------------
void __thiscall ImeCandListWin::AdjustSizeWin(ImeCandListWin *this, int iXPos, int iYPos, int iBottomYPos)
{
  ImeCandListWin *v4; // edi@1
  int (*v5)(void); // edx@1
  char *v6; // esi@1
  PgFont *v7; // ebx@1
  char *v8; // eax@3
  tagSIZE kSize; // [sp+Ch] [bp-18h]@5
  ImeCandListWin *v10; // [sp+14h] [bp-10h]@1
  int v11; // [sp+18h] [bp-Ch]@2
  int iMaxCx; // [sp+1Ch] [bp-8h]@2
  int iCy; // [sp+20h] [bp-4h]@2

  v4 = this;
  v5 = (int (*)(void))this->m_apkTextWin[0]->vfptr[114].__vecDelDtor;
  v6 = (char *)this->m_apkTextWin;
  v10 = this;
  v7 = (PgFont *)v5();
  if ( v7 )
  {
    SelectObject(v7->m_kFontRenderStuff.hDC, v7->m_hFont);
    iMaxCx = 0;
    iCy = 0;
    v11 = 10;
    do
    {
      v8 = (char *)(*(int (**)(void))(**(_DWORD **)v6 + 484))();
      if ( v8 && *v8 )
      {
        PgFont::GetTextSize(v7, v8, strlen(v8), &kSize);
        if ( kSize.cx > iMaxCx )
          iMaxCx = kSize.cx;
        v4 = v10;
        iCy += kSize.cy + 2;
      }
      v6 += 4;
      --v11;
    }
    while ( v11 );
    if ( iMaxCx )
      ((void (__thiscall *)(ImeCandListWin *, unsigned int, unsigned int))v4->vfptr[135].__vecDelDtor)(
        v4,
        iMaxCx + 2 * v4->m_uiEdgeWidth,
        iCy + 2 * v4->m_uiEdgeHeight);
    if ( v4->m_bAttachBottom )
      ((void (__thiscall *)(ImeCandListWin *, int, int))v4->vfptr[77].__vecDelDtor)(v4, iXPos, iBottomYPos);
    else
      ((void (__thiscall *)(ImeCandListWin *, int, unsigned int))v4->vfptr[77].__vecDelDtor)(
        v4,
        iXPos,
        iYPos - 2 * v4->m_uiEdgeHeight - iCy);
  }
}

//----- (00448E70) --------------------------------------------------------
ImeCandListWin *__cdecl ImeCandListWin::CreateWin(PgWin *pkParent)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  NiRefObjectVtbl *v3; // edi@6
  NiSourceTexture *v4; // eax@6
  PgWin *v5; // edi@8
  ImeCandListWin *v6; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1CCu);
  v2 = v1;
  result.m_pObject = v1;
  v8 = 0;
  if ( v1 )
  {
    FrameBoxWin::FrameBoxWin((FrameBoxWin *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&ImeCandListWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&ImeCandListWin::`vftable'{for `IDirectMessenger'};
    LOBYTE(v2[1].m_kPropertyList.m_kAllocator.m_uiCount) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v8 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  v3 = v2->vfptr;
  v4 = MenuTexMgr::GetTexture(1u);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, NiSourceTexture *, signed int, signed int, PgWin *))v3[137].__vecDelDtor)(
                          v2,
                          v4,
                          7,
                          7,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v6 = (ImeCandListWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v6 = 0;
  }
  return v6;
}
// 97981C: using guessed type void (__thiscall *ImeCandListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97983C: using guessed type int (__thiscall *ImeCandListWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00448FD0) --------------------------------------------------------
ImeCandListWin *__thiscall ImeCandListWin::`scalar deleting destructor'(ImeCandListWin *this, unsigned int a2)
{
  ImeCandListWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ImeCandListWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ImeCandListWin::`vftable'{for `IDirectMessenger'};
  FrameBoxWin::~FrameBoxWin((FrameBoxWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97981C: using guessed type void (__thiscall *ImeCandListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97983C: using guessed type int (__thiscall *ImeCandListWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00449010) --------------------------------------------------------
void __thiscall ImeEditWin::EnalbeCompStrAttachBottom(ImeEditWin *this, bool b)
{
  ImeCandListWin *v2; // ecx@1

  v2 = this->m_spCandListWin.m_pObject;
  if ( v2 )
    ImeCandListWin::EnableAttachBottom(v2, b);
}

//----- (00449030) --------------------------------------------------------
void __thiscall ImeEditWin::EnablePaste(ImeEditWin *this, bool bEnable)
{
  PgImeEditWin::EnablePaste((PgImeEditWin *)this->m_spEditWin.m_pObject, bEnable);
}

//----- (00449040) --------------------------------------------------------
bool __thiscall ImeEditWin::IsCompStrExist(ImeEditWin *this)
{
  PgEditWin *v1; // eax@1
  bool result; // al@2

  v1 = this->m_spEditWin.m_pObject;
  if ( v1 )
    result = LOBYTE(v1[1].m_pcText) != 0;
  else
    result = 0;
  return result;
}

//----- (00449060) --------------------------------------------------------
char __thiscall ImeEditWin::IsOnCandList(ImeEditWin *this)
{
  PgEditWin *v1; // eax@1
  char result; // al@3
  PgImeCtrl::CandList NowCandList; // [sp+0h] [bp-914h]@3

  v1 = this->m_spEditWin.m_pObject;
  if ( !v1
    || !this->m_spCandListWin.m_pObject
    || (qmemcpy(&NowCandList, &v1[7], sizeof(NowCandList)), result = 1, NowCandList.bShowWindow != 1)
    || NowCandList.dwSelection >= 0xA )
  {
    result = 0;
  }
  return result;
}

//----- (004490B0) --------------------------------------------------------
void __thiscall ImeEditWinEx::EnalbeCompStrAttachBottom(ImeEditWinEx *this, bool b)
{
  ImeCandListWin *v2; // ecx@1

  v2 = this->m_spCandListWin.m_pObject;
  if ( v2 )
    ImeCandListWin::EnableAttachBottom(v2, b);
}

//----- (004490D0) --------------------------------------------------------
void __thiscall ImeEditWinEx::EnablePaste(ImeEditWinEx *this, bool bEnable)
{
  PgImeEditWin::EnablePaste((PgImeEditWin *)this->m_spEditWin.m_pObject, bEnable);
}

//----- (004490E0) --------------------------------------------------------
bool __thiscall ImeEditWinEx::IsCompStrExist(ImeEditWinEx *this)
{
  PgEditWin *v1; // eax@1
  bool result; // al@2

  v1 = this->m_spEditWin.m_pObject;
  if ( v1 )
    result = LOBYTE(v1[1].m_pcText) != 0;
  else
    result = 0;
  return result;
}

//----- (00449100) --------------------------------------------------------
char __thiscall ImeEditWinEx::IsOnCandList(ImeEditWinEx *this)
{
  PgEditWin *v1; // eax@1
  char result; // al@3
  PgImeCtrl::CandList NowCandList; // [sp+0h] [bp-914h]@3

  v1 = this->m_spEditWin.m_pObject;
  if ( !v1
    || !this->m_spCandListWin.m_pObject
    || (qmemcpy(&NowCandList, &v1[7], sizeof(NowCandList)), result = 1, NowCandList.bShowWindow != 1)
    || NowCandList.dwSelection >= 0xA )
  {
    result = 0;
  }
  return result;
}

//----- (00449150) --------------------------------------------------------
void __thiscall ImeEditWin::ImeEditWin(ImeEditWin *this)
{
  ImeEditWin *v1; // esi@1

  v1 = this;
  EditWin::EditWin((EditWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ImeEditWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ImeEditWin::`vftable'{for `IDirectMessenger'};
  v1->m_spCandListWin.m_pObject = 0;
  if ( !EditWin::ms_uiCaretBlinkTime )
    EditWin::ms_uiCaretBlinkTime = GetCaretBlinkTime();
  v1->m_uiLastBlinkTime = 0;
  v1->m_iShowCaret = 0;
  v1->m_bEnalbe = 1;
}
// 979A70: using guessed type void (__thiscall *ImeEditWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 979A8C: using guessed type int (__thiscall *ImeEditWin::`vftable'{for `NiNode'})(void *p, char);
// A8B998: using guessed type unsigned int EditWin::ms_uiCaretBlinkTime;

//----- (004491B0) --------------------------------------------------------
void __thiscall ImeEditWin::~ImeEditWin(ImeEditWin *this)
{
  ImeEditWin *v1; // esi@1
  PgFont *v2; // edi@1
  PgEditWin *v3; // edi@6
  PgWinEditText *v4; // edi@11
  NiScreenElements *v5; // edi@16
  ImeCandListWin *v6; // edi@21

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ImeEditWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ImeEditWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spFont.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spFont.m_pObject = 0;
  }
  v3 = v1->m_spEditWin.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spEditWin.m_pObject = 0;
  }
  v4 = v1->m_spTextWin.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spTextWin.m_pObject = 0;
  }
  v5 = v1->m_spCaret.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spCaret.m_pObject = 0;
  }
  v6 = v1->m_spCandListWin.m_pObject;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  EditWin::~EditWin((EditWin *)&v1->vfptr);
}
// 979A70: using guessed type void (__thiscall *ImeEditWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 979A8C: using guessed type int (__thiscall *ImeEditWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004492F0) --------------------------------------------------------
void __thiscall ImeEditWin::UpdateMeWin(ImeEditWin *this, float fCurTime)
{
  ImeEditWin *v2; // esi@1
  PgEditWin *v3; // eax@1
  char v4; // bl@1
  HWND v5; // edi@4
  unsigned int v6; // ecx@8
  int v7; // edx@9
  NiScreenElements *v8; // eax@10
  unsigned int v9; // edi@14
  char *v10; // eax@14
  char *v11; // ebx@14
  PgTextGeometry *v12; // edi@16
  int v13; // eax@17
  NiScreenElements *v14; // eax@21
  float v15; // ecx@21
  float v16; // edx@21
  float v17; // ecx@21
  float v18; // ST2C_4@21
  float v19; // ST30_4@21
  ImeCandListWin *v20; // ecx@21
  PgWinImeEditText *v21; // edi@24
  ImeCandListWin *v22; // ebx@25
  int v23; // ST1C_4@26
  int v24; // ST18_4@26
  int v25; // eax@26
  ImeCandListWin *v26; // esi@27
  tagPOINT rkPoint; // [sp+14h] [bp-Ch]@8
  PgEditWin *v28; // [sp+1Ch] [bp-4h]@1
  signed int iCaretPos; // [sp+28h] [bp+8h]@14
  int iCaretPosa; // [sp+28h] [bp+8h]@17

  v2 = this;
  v3 = this->m_spEditWin.m_pObject;
  v4 = 1;
  v28 = v3;
  if ( v3 )
  {
    if ( BYTE2(v3[41].m_hParentWnd) == 1 && (ImeEditWin *)EditWin::ms_pkCurEditWin == this )
    {
      v5 = v3->m_hWnd;
      if ( v5 != GetFocus() )
        v4 = 0;
    }
    if ( (unsigned __int8)((int (__thiscall *)(ImeEditWin *))v2->vfptr[122].__vecDelDtor)(v2) && v4 == 1 )
    {
      v6 = EditWin::ms_uiCaretBlinkTime + v2->m_uiLastBlinkTime;
      rkPoint = (tagPOINT)(signed __int64)(fCurTime * 1000.0);
      if ( v6 <= rkPoint.x )
      {
        v7 = 1 - v2->m_iShowCaret;
        v2->m_uiLastBlinkTime = rkPoint.x;
        v2->m_iShowCaret = v7;
      }
      v8 = v2->m_spCaret.m_pObject;
      if ( v2->m_iShowCaret == 1 )
        v8->m_uFlags &= 0xFFFEu;
      else
        v8->m_uFlags |= 1u;
    }
    else
    {
      v2->m_spCaret.m_pObject->m_uFlags |= 1u;
    }
    v9 = 0;
    iCaretPos = 0;
    v10 = (char *)((int (*)(void))v2->m_spTextWin.m_pObject->vfptr[121].__vecDelDtor)();
    v11 = v10;
    if ( v10 && *v10 )
    {
      SelectObject(v2->m_spFont.m_pObject->m_kFontRenderStuff.hDC, v2->m_spFont.m_pObject->m_hFont);
      v12 = v2->m_spTextWin.m_pObject->m_spTextGeom.m_pObject;
      if ( !v12 )
        return;
      v13 = PgEditWin::GetCaretPos(v28);
      iCaretPosa = v13;
      if ( LOBYTE(v28[1].m_pcText) )
        iCaretPosa = PgImeEditWin::GetImeCaretPos((PgImeEditWin *)v28) + v13;
      PgFont::GetCursorPosOnText(
        v2->m_spFont.m_pObject,
        v11,
        iCaretPosa,
        &rkPoint,
        v12->m_iVerticalGap,
        v12->m_bAutoWordWrap,
        v12->m_bTextCmdOn,
        &v12->m_kRect,
        v12->m_iAlignOption);
      v9 = rkPoint.x;
      iCaretPos = rkPoint.y;
      if ( v9 >= ((int (__thiscall *)(ImeEditWin *))v2->vfptr[36].__vecDelDtor)(v2) )
        v9 = ((int (__thiscall *)(ImeEditWin *))v2->vfptr[36].__vecDelDtor)(v2) - 1;
    }
    v14 = v2->m_spCaret.m_pObject;
    v15 = v14->m_kLocal.m_Translate.x;
    v16 = v14->m_kLocal.m_Translate.y;
    rkPoint.y = v9 + 1;
    v17 = v14->m_kLocal.m_Translate.z;
    v18 = (double)(signed int)(v9 + 1);
    v14->m_kLocal.m_Translate.x = v18;
    v19 = (double)iCaretPos;
    v14->m_kLocal.m_Translate.y = v19;
    v14->m_kLocal.m_Translate.z = v17;
    v20 = v2->m_spCandListWin.m_pObject;
    if ( v20 )
      ImeCandListWin::SetCandList(v20, (PgImeCtrl::CandList *)&v28[7]);
    if ( LOBYTE(v28[1].m_pcText) )
    {
      v21 = (PgWinImeEditText *)v2->m_spTextWin.m_pObject;
      if ( v21 )
      {
        v22 = v2->m_spCandListWin.m_pObject;
        if ( v22 )
        {
          v23 = ((int (__thiscall *)(ImeEditWin *))v2->vfptr[37].__vecDelDtor)(v2);
          v24 = PgWinImeEditText::GetCandStrYPos(v21);
          v25 = PgWinImeEditText::GetCandStrXPos(v21);
          ImeCandListWin::AdjustSizeWin(v22, v25, v24, v23);
        }
      }
    }
    else
    {
      v26 = v2->m_spCandListWin.m_pObject;
      if ( v26 )
        ImeCandListWin::AdjustSizeWin(v26, 0, 0, 0);
    }
  }
}
// A8B998: using guessed type unsigned int EditWin::ms_uiCaretBlinkTime;

//----- (00449550) --------------------------------------------------------
void __thiscall ImeEditWinEx::ImeEditWinEx(ImeEditWinEx *this)
{
  ImeEditWinEx *v1; // esi@1

  v1 = this;
  EditWinEx::EditWinEx((EditWinEx *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ImeEditWinEx::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ImeEditWinEx::`vftable'{for `IDirectMessenger'};
  v1->m_spCandListWin.m_pObject = 0;
  if ( !EditWin::ms_uiCaretBlinkTime )
    EditWin::ms_uiCaretBlinkTime = GetCaretBlinkTime();
  v1->m_uiLastBlinkTime = 0;
  v1->m_iShowCaret = 0;
  v1->m_bEnalbe = 1;
}
// 979C84: using guessed type void (__thiscall *ImeEditWinEx::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 979CA4: using guessed type int (__thiscall *ImeEditWinEx::`vftable'{for `NiNode'})(void *p, char);
// A8B998: using guessed type unsigned int EditWin::ms_uiCaretBlinkTime;

//----- (004495B0) --------------------------------------------------------
void __thiscall ImeEditWinEx::~ImeEditWinEx(ImeEditWinEx *this)
{
  ImeEditWinEx *v1; // esi@1
  PgFont *v2; // edi@1
  PgEditWin *v3; // edi@6
  PgWinEditText *v4; // edi@11
  NiScreenElements *v5; // edi@16
  ImeCandListWin *v6; // edi@21

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ImeEditWinEx::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ImeEditWinEx::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spFont.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spFont.m_pObject = 0;
  }
  v3 = v1->m_spEditWin.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spEditWin.m_pObject = 0;
  }
  v4 = v1->m_spTextWin.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spTextWin.m_pObject = 0;
  }
  v5 = v1->m_spCaret.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spCaret.m_pObject = 0;
  }
  v6 = v1->m_spCandListWin.m_pObject;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  EditWinEx::~EditWinEx((EditWinEx *)&v1->vfptr);
}
// 979C84: using guessed type void (__thiscall *ImeEditWinEx::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 979CA4: using guessed type int (__thiscall *ImeEditWinEx::`vftable'{for `NiNode'})(void *p, char);

//----- (004496F0) --------------------------------------------------------
void __thiscall ImeEditWinEx::UpdateMeWin(ImeEditWinEx *this, float fCurTime)
{
  ImeEditWinEx *v2; // esi@1
  PgEditWin *v3; // edi@1
  char v4; // bl@1
  HWND__ *v5; // edi@4
  bool v6; // zf@4
  unsigned int v7; // ecx@8
  int v8; // edx@9
  NiScreenElements *v9; // eax@10
  unsigned int v10; // ebx@14
  char *v11; // eax@17
  PgTextGeometry *v12; // edi@19
  int v13; // eax@20
  NiScreenElements *v14; // eax@29
  float v15; // ecx@29
  float v16; // edx@29
  float v17; // ecx@29
  float v18; // ST2C_4@29
  ImeCandListWin *v19; // ecx@29
  PgWinImeEditText *v20; // edi@32
  ImeCandListWin *v21; // ebx@33
  int v22; // ST1C_4@34
  int v23; // ST18_4@34
  int v24; // eax@34
  ImeCandListWin *v25; // esi@35
  tagPOINT rkPoint; // [sp+10h] [bp-10h]@8
  char *pcText; // [sp+18h] [bp-8h]@8
  PgEditWin *v28; // [sp+1Ch] [bp-4h]@1
  signed int iCaretPos; // [sp+28h] [bp+8h]@17
  int iCaretPosa; // [sp+28h] [bp+8h]@20

  v2 = this;
  v3 = this->m_spEditWin.m_pObject;
  v4 = 1;
  v28 = v3;
  if ( v3 )
  {
    if ( BYTE2(v3[41].m_hParentWnd) == 1 && (ImeEditWinEx *)EditWin::ms_pkCurEditWin == this )
    {
      v5 = v3->m_hWnd;
      v6 = v5 == GetFocus();
      v3 = v28;
      if ( !v6 )
        v4 = 0;
    }
    if ( (unsigned __int8)((int (__thiscall *)(ImeEditWinEx *))v2->vfptr[122].__vecDelDtor)(v2) && v4 == 1 )
    {
      v7 = EditWin::ms_uiCaretBlinkTime + v2->m_uiLastBlinkTime;
      pcText = (char *)(HIWORD(fCurTime) | 0xC00);
      rkPoint = (tagPOINT)(signed __int64)(fCurTime * 1000.0);
      if ( v7 <= rkPoint.x )
      {
        v8 = 1 - v2->m_iShowCaret;
        v2->m_uiLastBlinkTime = rkPoint.x;
        v2->m_iShowCaret = v8;
      }
      v9 = v2->m_spCaret.m_pObject;
      if ( v2->m_iShowCaret == 1 )
        v9->m_uFlags &= 0xFFFEu;
      else
        v9->m_uFlags |= 1u;
    }
    else
    {
      v2->m_spCaret.m_pObject->m_uFlags |= 1u;
    }
    v10 = 0;
    if ( EditWinEx::GetDrawFormat((EditWinEx *)&v2->vfptr) == 1 && !EditWin::GetAutoAlign((EditWin *)&v2->vfptr) )
      v10 = (unsigned int)((int (__thiscall *)(ImeEditWinEx *))v2->vfptr[36].__vecDelDtor)(v2) >> 1;
    iCaretPos = 0;
    v11 = (char *)((int (*)(void))v2->m_spTextWin.m_pObject->vfptr[121].__vecDelDtor)();
    pcText = v11;
    if ( v11 && *v11 )
    {
      SelectObject(v2->m_spFont.m_pObject->m_kFontRenderStuff.hDC, v2->m_spFont.m_pObject->m_hFont);
      v12 = v2->m_spTextWin.m_pObject->m_spTextGeom.m_pObject;
      if ( !v12 )
        return;
      v13 = PgEditWin::GetCaretPos(v28);
      iCaretPosa = v13;
      if ( LOBYTE(v28[1].m_pcText) )
        iCaretPosa = PgImeEditWin::GetImeCaretPos((PgImeEditWin *)v28) + v13;
      PgFont::GetCursorPosOnText(
        v2->m_spFont.m_pObject,
        pcText,
        iCaretPosa,
        &rkPoint,
        v12->m_iVerticalGap,
        v12->m_bAutoWordWrap,
        v12->m_bTextCmdOn,
        &v12->m_kRect,
        v12->m_iAlignOption);
      if ( EditWinEx::GetDrawFormat((EditWinEx *)&v2->vfptr) != 1 || EditWin::GetAutoAlign((EditWin *)&v2->vfptr) )
        v10 = rkPoint.x;
      else
        v10 += rkPoint.x / 2;
      iCaretPos = rkPoint.y;
      if ( v10 >= ((int (__thiscall *)(_DWORD))v2->vfptr[36].__vecDelDtor)(v2) )
        v10 = ((int (__thiscall *)(ImeEditWinEx *))v2->vfptr[36].__vecDelDtor)(v2) - 1;
      v3 = v28;
    }
    v14 = v2->m_spCaret.m_pObject;
    v15 = v14->m_kLocal.m_Translate.x;
    v16 = v14->m_kLocal.m_Translate.y;
    pcText = (char *)(v10 + 1);
    v17 = v14->m_kLocal.m_Translate.z;
    v18 = (double)(signed int)(v10 + 1);
    v14->m_kLocal.m_Translate.x = v18;
    *(float *)&rkPoint.x = (double)iCaretPos;
    LODWORD(v14->m_kLocal.m_Translate.y) = rkPoint.x;
    v14->m_kLocal.m_Translate.z = v17;
    v19 = v2->m_spCandListWin.m_pObject;
    if ( v19 )
      ImeCandListWin::SetCandList(v19, (PgImeCtrl::CandList *)&v3[7]);
    if ( LOBYTE(v3[1].m_pcText) )
    {
      v20 = (PgWinImeEditText *)v2->m_spTextWin.m_pObject;
      if ( v20 )
      {
        v21 = v2->m_spCandListWin.m_pObject;
        if ( v21 )
        {
          v22 = ((int (__thiscall *)(ImeEditWinEx *))v2->vfptr[37].__vecDelDtor)(v2);
          v23 = PgWinImeEditText::GetCandStrYPos(v20);
          v24 = PgWinImeEditText::GetCandStrXPos(v20);
          ImeCandListWin::AdjustSizeWin(v21, v24, v23, v22);
        }
      }
    }
    else
    {
      v25 = v2->m_spCandListWin.m_pObject;
      if ( v25 )
        ImeCandListWin::AdjustSizeWin(v25, 0, 0, 0);
    }
  }
}
// A8B998: using guessed type unsigned int EditWin::ms_uiCaretBlinkTime;

//----- (004499A0) --------------------------------------------------------
char __thiscall ImeEditWin::Create(ImeEditWin *this, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, EditWin::Type eType, unsigned int uiLimitTextLen, unsigned int uiStopFlag, bool bClearTextOnEnd, Font::Type eFontType, bool bForceFocusWhenClick, bool bNoAlt)
{
  ImeEditWin *v13; // esi@1
  PgFont *v14; // eax@1
  PgFont *v15; // edi@1
  PgFont *v16; // ebx@1
  char result; // al@9
  unsigned int v18; // eax@11
  unsigned int v19; // edi@11
  bool v20; // cl@11
  int v21; // edx@11
  PgImeEditWin *v22; // eax@12
  PgWinImeEditText *v23; // eax@14
  PgWinImeEditText *v24; // edi@14
  ImeCandListWin *v25; // eax@26
  ImeCandListWin *v26; // edi@26
  ImeCandListWin *v27; // ebx@26
  NiScreenElementsData *v28; // edi@33
  PgWin *v29; // eax@33
  NiScreenElements *v30; // ebx@33
  NiScreenElements *v31; // eax@34
  NiScreenElements *v32; // edi@35
  PgWin *v33; // eax@42
  int v34; // eax@43
  float v35; // ecx@45
  NiAVObject *v36; // ecx@45
  PgWin *v37; // eax@45
  PgWin *v38; // edi@45
  NiAVObject *v39; // ecx@48
  NiScreenElements *v40; // eax@48
  float v41; // edx@48
  float v42; // ecx@48
  float v43; // edx@48
  tagSIZE kSize; // [sp+38h] [bp-50h]@33
  float v45; // [sp+40h] [bp-48h]@45
  float v46; // [sp+44h] [bp-44h]@45
  float v47; // [sp+48h] [bp-40h]@45
  bool v48[4]; // [sp+4Ch] [bp-3Ch]@1
  int iLimitLength; // [sp+50h] [bp-38h]@1
  unsigned int uiStyle; // [sp+54h] [bp-34h]@1
  unsigned int v51; // [sp+58h] [bp-30h]@1
  PgWin *v52; // [sp+5Ch] [bp-2Ch]@1
  unsigned int v53; // [sp+60h] [bp-28h]@1
  unsigned int v54; // [sp+64h] [bp-24h]@1
  tagRECT kRect; // [sp+68h] [bp-20h]@11
  int v56; // [sp+84h] [bp-4h]@33

  v53 = uiWidth;
  uiStyle = eType;
  v13 = this;
  v48[0] = bClearTextOnEnd;
  v51 = uiHeight;
  v52 = pkParent;
  iLimitLength = uiLimitTextLen;
  v54 = uiStopFlag;
  v14 = Font::Get(eFontType);
  v15 = v13->m_spFont.m_pObject;
  v16 = v14;
  if ( v15 != v14 )
  {
    if ( v15 && !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) && v15 )
      v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
    v13->m_spFont.m_pObject = v16;
    if ( v16 )
      InterlockedIncrement((volatile LONG *)&v16->m_uiRefCount);
  }
  if ( v13->m_spFont.m_pObject && PgWin::Create((PgWin *)&v13->vfptr, iXPos, iYPos, v53, v51, v52, 0, 0) )
  {
    v18 = uiStyle;
    kRect.left = iXPos;
    v19 = v51;
    kRect.top = iYPos;
    kRect.right = iXPos + v53;
    v20 = v48[0];
    kRect.bottom = v51 + iYPos;
    v21 = iLimitLength;
    v13->m_eType = uiStyle;
    if ( v18 == 1342181380 )
      v22 = PgImeEditWin::CreateWin(
              g_hMainInstance,
              g_hMainWnd,
              0x50001004u,
              v54,
              v21,
              v20,
              &kRect,
              v13->m_spFont.m_pObject->m_hFont,
              1);
    else
      v22 = PgImeEditWin::CreateWin(g_hMainInstance, g_hMainWnd, v18, v54, v21, v20, 0, 0, 1);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v13->m_spEditWin, (NiD3DDefaultShader *)v22);
    v23 = PgWinImeEditText::CreateWin(0, 0, v53, v19, v13->m_spFont.m_pObject, (PgWin *)&v13->vfptr, 0, 0);
    v24 = (PgWinImeEditText *)v13->m_spTextWin.m_pObject;
    v54 = (unsigned int)v23;
    if ( v24 != v23 )
    {
      if ( v24 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v24->m_uiRefCount) && v24 )
          v24->vfptr->__vecDelDtor((NiRefObject *)v24, 1u);
        v23 = (PgWinImeEditText *)v54;
      }
      v13->m_spTextWin.m_pObject = (PgWinEditText *)v23;
      if ( v23 )
        InterlockedIncrement((volatile LONG *)&v23->m_uiRefCount);
    }
    if ( uiStyle == 1342181380 )
    {
      v13->m_spTextWin.m_pObject->m_spTextGeom.m_pObject->m_bAutoWordWrap = 1;
      PgWinEditText::SetAutoAlign(v13->m_spTextWin.m_pObject, 0);
    }
    v13->m_spEditWin.m_pObject->vfptr[22].__vecDelDtor(
      (NiRefObject *)v13->m_spEditWin.m_pObject,
      (unsigned int)v13->m_spTextWin.m_pObject);
    v13->m_bForceFocusWhenClick = bForceFocusWhenClick;
    if ( bForceFocusWhenClick )
      PgWinBut::CreateWin(0, 0, v53, v51, (PgWin *)&v13->vfptr, 0, 0, 0);
    v25 = ImeCandListWin::CreateWin((PgWin *)&v13->vfptr);
    v26 = v13->m_spCandListWin.m_pObject;
    v27 = v25;
    if ( v26 != v25 )
    {
      if ( v26 && !InterlockedDecrement((volatile LONG *)&v26->m_uiRefCount) && v26 )
        v26->vfptr->__vecDelDtor((NiRefObject *)v26, 1u);
      v13->m_spCandListWin.m_pObject = v27;
      if ( v27 )
        InterlockedIncrement((volatile LONG *)&v27->m_uiRefCount);
    }
    ((void (__stdcall *)(_DWORD))v13->m_spCandListWin.m_pObject->vfptr[69].__vecDelDtor)(1.0);
    SelectObject(v13->m_spFont.m_pObject->m_kFontRenderStuff.hDC, v13->m_spFont.m_pObject->m_hFont);
    PgFont::GetTextSize(v13->m_spFont.m_pObject, "|", 1, &kSize);
    v28 = PgUtil::CreateScreenGeometryData(2u, kSize.cy + 2);
    v29 = (PgWin *)operator new(0xC4u);
    v52 = v29;
    v30 = 0;
    v56 = 0;
    if ( v29 )
    {
      NiScreenElements::NiScreenElements((NiScreenElements *)v29, v28);
      v30 = v31;
    }
    v32 = v13->m_spCaret.m_pObject;
    v56 = -1;
    if ( v32 != v30 )
    {
      if ( v32 && !InterlockedDecrement((volatile LONG *)&v32->m_uiRefCount) && v32 )
        v32->vfptr->__vecDelDtor((NiRefObject *)v32, 1u);
      v13->m_spCaret.m_pObject = v30;
      if ( v30 )
        InterlockedIncrement((volatile LONG *)&v30->m_uiRefCount);
    }
    v33 = (PgWin *)operator new(0x60u);
    v52 = v33;
    v56 = 1;
    if ( v33 )
      NiMaterialProperty::NiMaterialProperty((NiMaterialProperty *)v33);
    else
      v34 = 0;
    ++*(_DWORD *)(v34 + 88);
    v45 = 1.0;
    v46 = 1.0;
    v47 = 1.0;
    *(float *)(v34 + 68) = 1.0;
    v35 = v47;
    *(float *)(v34 + 72) = 1.0;
    *(float *)(v34 + 76) = v35;
    v36 = (NiAVObject *)&v13->m_spCaret.m_pObject->vfptr;
    v56 = -1;
    NiAVObject::AttachProperty(v36, (NiProperty *)v34);
    v37 = (PgWin *)operator new(0x28u);
    v38 = v37;
    v52 = v37;
    v56 = 2;
    if ( v37 )
    {
      NiObjectNET::NiObjectNET((NiObjectNET *)&v37->vfptr);
      v38->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
      v38->m_uFlags = 0;
      v38->m_pkParent = 0;
      LODWORD(v38->m_kWorldBound.m_kCenter.x) = 1;
    }
    else
    {
      v38 = 0;
    }
    v38->m_pkParent = 0;
    LODWORD(v38->m_kWorldBound.m_kCenter.x) = 0;
    v39 = (NiAVObject *)&v13->m_spCaret.m_pObject->vfptr;
    v56 = -1;
    NiAVObject::AttachProperty(v39, (NiProperty *)v38);
    v40 = v13->m_spCaret.m_pObject;
    v41 = v40->m_kLocal.m_Translate.y;
    v42 = v40->m_kLocal.m_Translate.x;
    v46 = -2.0;
    v43 = v40->m_kLocal.m_Translate.z;
    v40->m_kLocal.m_Translate.x = v42;
    v40->m_kLocal.m_Translate.y = v46;
    v40->m_kLocal.m_Translate.z = v43;
    ((void (__thiscall *)(ImeEditWin *, NiScreenElements *, _DWORD))v13->vfptr[29].__vecDelDtor)(
      v13,
      v13->m_spCaret.m_pObject,
      0);
    NiAVObject::UpdateProperties((NiAVObject *)&v13->vfptr);
    NiAVObject::Update((NiAVObject *)&v13->vfptr, 0.0, 0);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);

//----- (00449DF0) --------------------------------------------------------
char __thiscall ImeEditWinEx::Create(ImeEditWinEx *this, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, EditWin::Type eType, unsigned int uiLimitTextLen, unsigned int uiStopFlag, bool bClearTextOnEnd, Font::Type eFontType, bool bForceFocusWhenClick, bool bNoAlt)
{
  ImeEditWinEx *v13; // esi@1
  PgFont *v14; // eax@1
  PgFont *v15; // edi@1
  PgFont *v16; // ebx@1
  char result; // al@9
  unsigned int v18; // eax@11
  unsigned int v19; // edi@11
  bool v20; // cl@11
  int v21; // edx@11
  PgImeEditWin *v22; // eax@12
  PgWinImeEditText *v23; // eax@14
  PgWinImeEditText *v24; // edi@14
  ImeCandListWin *v25; // eax@26
  ImeCandListWin *v26; // edi@26
  ImeCandListWin *v27; // ebx@26
  NiScreenElementsData *v28; // edi@33
  PgWin *v29; // eax@33
  NiScreenElements *v30; // ebx@33
  NiScreenElements *v31; // eax@34
  NiScreenElements *v32; // edi@35
  PgWin *v33; // eax@42
  int v34; // eax@43
  float v35; // ecx@45
  NiAVObject *v36; // ecx@45
  PgWin *v37; // eax@45
  PgWin *v38; // edi@45
  NiAVObject *v39; // ecx@48
  NiScreenElements *v40; // eax@48
  float v41; // edx@48
  float v42; // ecx@48
  float v43; // edx@48
  tagSIZE kSize; // [sp+38h] [bp-50h]@33
  float v45; // [sp+40h] [bp-48h]@45
  float v46; // [sp+44h] [bp-44h]@45
  float v47; // [sp+48h] [bp-40h]@45
  bool v48[4]; // [sp+4Ch] [bp-3Ch]@1
  int iLimitLength; // [sp+50h] [bp-38h]@1
  unsigned int uiStyle; // [sp+54h] [bp-34h]@1
  unsigned int v51; // [sp+58h] [bp-30h]@1
  PgWin *v52; // [sp+5Ch] [bp-2Ch]@1
  unsigned int v53; // [sp+60h] [bp-28h]@1
  unsigned int v54; // [sp+64h] [bp-24h]@1
  tagRECT kRect; // [sp+68h] [bp-20h]@11
  int v56; // [sp+84h] [bp-4h]@33

  v53 = uiWidth;
  uiStyle = eType;
  v13 = this;
  v48[0] = bClearTextOnEnd;
  v51 = uiHeight;
  v52 = pkParent;
  iLimitLength = uiLimitTextLen;
  v54 = uiStopFlag;
  v14 = Font::Get(eFontType);
  v15 = v13->m_spFont.m_pObject;
  v16 = v14;
  if ( v15 != v14 )
  {
    if ( v15 && !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) && v15 )
      v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
    v13->m_spFont.m_pObject = v16;
    if ( v16 )
      InterlockedIncrement((volatile LONG *)&v16->m_uiRefCount);
  }
  if ( v13->m_spFont.m_pObject && PgWin::Create((PgWin *)&v13->vfptr, iXPos, iYPos, v53, v51, v52, 0, 0) )
  {
    v18 = uiStyle;
    kRect.left = iXPos;
    v19 = v51;
    kRect.top = iYPos;
    kRect.right = iXPos + v53;
    v20 = v48[0];
    kRect.bottom = v51 + iYPos;
    v21 = iLimitLength;
    v13->m_eType = uiStyle;
    if ( v18 == 1342181380 )
      v22 = PgImeEditWin::CreateWin(
              g_hMainInstance,
              g_hMainWnd,
              0x50001004u,
              v54,
              v21,
              v20,
              &kRect,
              v13->m_spFont.m_pObject->m_hFont,
              1);
    else
      v22 = PgImeEditWin::CreateWin(g_hMainInstance, g_hMainWnd, v18, v54, v21, v20, 0, 0, 1);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v13->m_spEditWin, (NiD3DDefaultShader *)v22);
    v23 = PgWinImeEditText::CreateWin(0, 0, v53, v19, v13->m_spFont.m_pObject, (PgWin *)&v13->vfptr, 0, 0);
    v24 = (PgWinImeEditText *)v13->m_spTextWin.m_pObject;
    v54 = (unsigned int)v23;
    if ( v24 != v23 )
    {
      if ( v24 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v24->m_uiRefCount) && v24 )
          v24->vfptr->__vecDelDtor((NiRefObject *)v24, 1u);
        v23 = (PgWinImeEditText *)v54;
      }
      v13->m_spTextWin.m_pObject = (PgWinEditText *)v23;
      if ( v23 )
        InterlockedIncrement((volatile LONG *)&v23->m_uiRefCount);
    }
    if ( uiStyle == 1342181380 )
    {
      v13->m_spTextWin.m_pObject->m_spTextGeom.m_pObject->m_bAutoWordWrap = 1;
      PgWinEditText::SetAutoAlign(v13->m_spTextWin.m_pObject, 0);
    }
    v13->m_spEditWin.m_pObject->vfptr[22].__vecDelDtor(
      (NiRefObject *)v13->m_spEditWin.m_pObject,
      (unsigned int)v13->m_spTextWin.m_pObject);
    v13->m_bForceFocusWhenClick = bForceFocusWhenClick;
    if ( bForceFocusWhenClick )
      PgWinBut::CreateWin(0, 0, v53, v51, (PgWin *)&v13->vfptr, 0, 0, 0);
    v25 = ImeCandListWin::CreateWin((PgWin *)&v13->vfptr);
    v26 = v13->m_spCandListWin.m_pObject;
    v27 = v25;
    if ( v26 != v25 )
    {
      if ( v26 && !InterlockedDecrement((volatile LONG *)&v26->m_uiRefCount) && v26 )
        v26->vfptr->__vecDelDtor((NiRefObject *)v26, 1u);
      v13->m_spCandListWin.m_pObject = v27;
      if ( v27 )
        InterlockedIncrement((volatile LONG *)&v27->m_uiRefCount);
    }
    ((void (__stdcall *)(_DWORD))v13->m_spCandListWin.m_pObject->vfptr[69].__vecDelDtor)(1.0);
    SelectObject(v13->m_spFont.m_pObject->m_kFontRenderStuff.hDC, v13->m_spFont.m_pObject->m_hFont);
    PgFont::GetTextSize(v13->m_spFont.m_pObject, "|", 1, &kSize);
    v28 = PgUtil::CreateScreenGeometryData(2u, kSize.cy + 2);
    v29 = (PgWin *)operator new(0xC4u);
    v52 = v29;
    v30 = 0;
    v56 = 0;
    if ( v29 )
    {
      NiScreenElements::NiScreenElements((NiScreenElements *)v29, v28);
      v30 = v31;
    }
    v32 = v13->m_spCaret.m_pObject;
    v56 = -1;
    if ( v32 != v30 )
    {
      if ( v32 && !InterlockedDecrement((volatile LONG *)&v32->m_uiRefCount) && v32 )
        v32->vfptr->__vecDelDtor((NiRefObject *)v32, 1u);
      v13->m_spCaret.m_pObject = v30;
      if ( v30 )
        InterlockedIncrement((volatile LONG *)&v30->m_uiRefCount);
    }
    v33 = (PgWin *)operator new(0x60u);
    v52 = v33;
    v56 = 1;
    if ( v33 )
      NiMaterialProperty::NiMaterialProperty((NiMaterialProperty *)v33);
    else
      v34 = 0;
    ++*(_DWORD *)(v34 + 88);
    v45 = 1.0;
    v46 = 1.0;
    v47 = 1.0;
    *(float *)(v34 + 68) = 1.0;
    v35 = v47;
    *(float *)(v34 + 72) = 1.0;
    *(float *)(v34 + 76) = v35;
    v36 = (NiAVObject *)&v13->m_spCaret.m_pObject->vfptr;
    v56 = -1;
    NiAVObject::AttachProperty(v36, (NiProperty *)v34);
    v37 = (PgWin *)operator new(0x28u);
    v38 = v37;
    v52 = v37;
    v56 = 2;
    if ( v37 )
    {
      NiObjectNET::NiObjectNET((NiObjectNET *)&v37->vfptr);
      v38->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
      v38->m_uFlags = 0;
      v38->m_pkParent = 0;
      LODWORD(v38->m_kWorldBound.m_kCenter.x) = 1;
    }
    else
    {
      v38 = 0;
    }
    v38->m_pkParent = 0;
    LODWORD(v38->m_kWorldBound.m_kCenter.x) = 0;
    v39 = (NiAVObject *)&v13->m_spCaret.m_pObject->vfptr;
    v56 = -1;
    NiAVObject::AttachProperty(v39, (NiProperty *)v38);
    v40 = v13->m_spCaret.m_pObject;
    v41 = v40->m_kLocal.m_Translate.y;
    v42 = v40->m_kLocal.m_Translate.x;
    v46 = -2.0;
    v43 = v40->m_kLocal.m_Translate.z;
    v40->m_kLocal.m_Translate.x = v42;
    v40->m_kLocal.m_Translate.y = v46;
    v40->m_kLocal.m_Translate.z = v43;
    ((void (__thiscall *)(ImeEditWinEx *, NiScreenElements *, _DWORD))v13->vfptr[29].__vecDelDtor)(
      v13,
      v13->m_spCaret.m_pObject,
      0);
    NiAVObject::UpdateProperties((NiAVObject *)&v13->vfptr);
    NiAVObject::Update((NiAVObject *)&v13->vfptr, 0.0, 0);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);

//----- (0044A240) --------------------------------------------------------
ImeEditWin *__cdecl ImeEditWin::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, EditWin::Type eType, unsigned int uiLimitTextLen, unsigned int uiStopFlag, int bClearTextOnEnd, Font::Type eFontType, int bForceFocusWhenClick, int bNoAlt)
{
  PgWin *v12; // eax@1
  PgWin *v13; // eax@2
  PgWin *v14; // esi@2
  PgWin *v15; // edi@8
  ImeEditWin *v16; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v18; // [sp+20h] [bp-4h]@1

  v12 = (PgWin *)operator new(0x14Cu);
  result.m_pObject = v12;
  v18 = 0;
  if ( v12 )
  {
    ImeEditWin::ImeEditWin((ImeEditWin *)v12);
    v14 = v13;
  }
  else
  {
    v14 = 0;
  }
  if ( v14 )
    InterlockedIncrement((volatile LONG *)&v14->m_uiRefCount);
  v18 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v14);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, unsigned int, PgWin *, EditWin::Type, unsigned int, unsigned int, int, Font::Type, int, int))v14->vfptr[124].__vecDelDtor)(
                          v14,
                          iXPos,
                          iYPos,
                          uiWidth,
                          uiHeight,
                          pkParent,
                          eType,
                          uiLimitTextLen,
                          uiStopFlag,
                          bClearTextOnEnd,
                          eFontType,
                          bForceFocusWhenClick,
                          bNoAlt) )
  {
    ((void (__thiscall *)(PgWin *))v14->vfptr[89].__vecDelDtor)(v14);
    v18 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v14->m_uiRefCount) )
      v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
    v16 = (ImeEditWin *)v14;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v14);
    if ( result.m_pObject )
    {
      v15 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v15 )
          v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
      }
    }
    v18 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v14->m_uiRefCount) )
      v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
    v16 = 0;
  }
  return v16;
}

//----- (0044A3A0) --------------------------------------------------------
ImeEditWinEx *__cdecl ImeEditWinEx::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, EditWin::Type eType, unsigned int uiLimitTextLen, unsigned int uiStopFlag, int bClearTextOnEnd, Font::Type eFontType, int bForceFocusWhenClick, int bNoAlt)
{
  PgWin *v12; // eax@1
  PgWin *v13; // eax@2
  PgWin *v14; // esi@2
  PgWin *v15; // edi@8
  ImeEditWinEx *v16; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v18; // [sp+20h] [bp-4h]@1

  v12 = (PgWin *)operator new(0x16Cu);
  result.m_pObject = v12;
  v18 = 0;
  if ( v12 )
  {
    ImeEditWinEx::ImeEditWinEx((ImeEditWinEx *)v12);
    v14 = v13;
  }
  else
  {
    v14 = 0;
  }
  if ( v14 )
    InterlockedIncrement((volatile LONG *)&v14->m_uiRefCount);
  v18 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v14);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, unsigned int, PgWin *, EditWin::Type, unsigned int, unsigned int, int, Font::Type, int, int))v14->vfptr[124].__vecDelDtor)(
                          v14,
                          iXPos,
                          iYPos,
                          uiWidth,
                          uiHeight,
                          pkParent,
                          eType,
                          uiLimitTextLen,
                          uiStopFlag,
                          bClearTextOnEnd,
                          eFontType,
                          bForceFocusWhenClick,
                          bNoAlt) )
  {
    ((void (__thiscall *)(PgWin *))v14->vfptr[89].__vecDelDtor)(v14);
    v18 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v14->m_uiRefCount) )
      v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
    v16 = (ImeEditWinEx *)v14;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v14);
    if ( result.m_pObject )
    {
      v15 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v15 )
          v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
      }
    }
    v18 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v14->m_uiRefCount) )
      v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
    v16 = 0;
  }
  return v16;
}

//----- (0044A500) --------------------------------------------------------
ImeEditWin *__thiscall ImeEditWin::`vector deleting destructor'(ImeEditWin *this, unsigned int a2)
{
  ImeEditWin *v2; // esi@1

  v2 = this;
  ImeEditWin::~ImeEditWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0044A530) --------------------------------------------------------
ImeEditWinEx *__thiscall ImeEditWinEx::`vector deleting destructor'(ImeEditWinEx *this, unsigned int a2)
{
  ImeEditWinEx *v2; // esi@1

  v2 = this;
  ImeEditWinEx::~ImeEditWinEx(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0044A560) --------------------------------------------------------
void __thiscall InputBox::InputBox(InputBox *this)
{
  InputBox *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&InputBox::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&InputBox::`vftable'{for `IDirectMessenger'};
  v1->m_eActionAfterInputEnd = 1;
}
// 979F34: using guessed type void (__thiscall *InputBox::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 979F54: using guessed type int (__thiscall *InputBox::`vftable'{for `NiNode'})(void *p, char);

//----- (0044A590) --------------------------------------------------------
void __thiscall InputBox::~InputBox(InputBox *this)
{
  this->vfptr = (NiRefObjectVtbl *)&InputBox::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&InputBox::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 979F34: using guessed type void (__thiscall *InputBox::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 979F54: using guessed type int (__thiscall *InputBox::`vftable'{for `NiNode'})(void *p, char);

//----- (0044A5B0) --------------------------------------------------------
void __thiscall InputBox::SetText(InputBox *this, char *pcText)
{
  ((void (__stdcall *)(_DWORD))this->m_pkTextWin->vfptr[118].__vecDelDtor)(pcText);
}

//----- (0044A5D0) --------------------------------------------------------
void __thiscall InputBox::SetActionAfterInputEnd(InputBox *this, InputBox::ActionAfterInputEnd eInputEnd)
{
  this->m_eActionAfterInputEnd = eInputEnd;
}

//----- (0044A5E0) --------------------------------------------------------
void __thiscall InputBox::OnClose(InputBox *this)
{
  ((void (__stdcall *)(_DWORD))this->m_pkEditWin->vfptr[121].__vecDelDtor)(1);
}

//----- (0044A600) --------------------------------------------------------
void __thiscall InputBox::OnShowWin(InputBox *this)
{
  InputBox *v1; // esi@1

  v1 = this;
  PgWin::OnShowWin((PgWin *)&this->vfptr);
  ((void (*)(void))v1->m_pkEditWin->vfptr[117].__vecDelDtor)();
  ((void (*)(void))v1->m_pkEditWin->vfptr[120].__vecDelDtor)();
}

//----- (0044A630) --------------------------------------------------------
void __thiscall InputBox::SetFocus(InputBox *this)
{
  ((void (*)(void))this->m_pkEditWin->vfptr[120].__vecDelDtor)();
}

//----- (0044A640) --------------------------------------------------------
void __thiscall InputBox::OnCmdOk(InputBox *this)
{
  InputBox *v1; // edi@1
  char *v2; // eax@1
  bool v3; // zf@1
  DirectUserMsgBody_InputBoxResponse kBody; // [sp+8h] [bp-8h]@1

  v1 = this;
  v2 = (char *)((int (*)(void))this->m_pkEditWin->vfptr[113].__vecDelDtor)();
  v3 = v1->m_pkMsgHooker == 0;
  kBody.pcInputText = v2;
  kBody.eResponse = 0;
  if ( !v3 )
  {
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->SendDirectMessage)(28, &kBody, &v1->vfptr);
    if ( v1->m_pkMsgHooker )
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->DirectDispatchToChildren)(
        28,
        &kBody,
        &v1->vfptr);
  }
  v1->vfptr->DirectDispatchToChildren((IDirectMessenger *)&v1->vfptr, 28, &kBody, (IDirectMessenger *)&v1->vfptr);
  if ( v1->m_eActionAfterInputEnd == 1 )
  {
    PgWin::PostMsg((PgWin *)&v1->vfptr, 1u, 0, 0);
  }
  else if ( v1->m_eActionAfterInputEnd == 2 )
  {
    PgWin::PostMsg((PgWin *)&v1->vfptr, 2u, 0, 0);
  }
}

//----- (0044A6E0) --------------------------------------------------------
void __thiscall InputBox::OnCmdCancel(InputBox *this)
{
  InputBox *v1; // edi@1
  char *v2; // eax@1
  bool v3; // zf@1
  DirectUserMsgBody_InputBoxResponse kBody; // [sp+8h] [bp-8h]@1

  v1 = this;
  v2 = (char *)((int (*)(void))this->m_pkEditWin->vfptr[113].__vecDelDtor)();
  v3 = v1->m_pkMsgHooker == 0;
  kBody.pcInputText = v2;
  kBody.eResponse = 1;
  if ( !v3 )
  {
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->SendDirectMessage)(28, &kBody, &v1->vfptr);
    if ( v1->m_pkMsgHooker )
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->DirectDispatchToChildren)(
        28,
        &kBody,
        &v1->vfptr);
  }
  v1->vfptr->DirectDispatchToChildren((IDirectMessenger *)&v1->vfptr, 28, &kBody, (IDirectMessenger *)&v1->vfptr);
  if ( v1->m_eActionAfterInputEnd == 1 )
  {
    PgWin::PostMsg((PgWin *)&v1->vfptr, 1u, 0, 0);
  }
  else if ( v1->m_eActionAfterInputEnd == 2 )
  {
    PgWin::PostMsg((PgWin *)&v1->vfptr, 2u, 0, 0);
  }
}

//----- (0044A780) --------------------------------------------------------
void __thiscall InputBox::OnEditEnd(InputBox *this, unsigned int wParam, int lParam)
{
  if ( wParam == 1 )
  {
    InputBox::OnCmdOk(this);
  }
  else if ( wParam == 4 )
  {
    InputBox::OnCmdCancel(this);
  }
}

//----- (0044A7B0) --------------------------------------------------------
char __thiscall InputBox::Create(InputBox *this)
{
  InputBox *v1; // esi@1
  NiTexturePalette *v2; // edi@1
  const char *v3; // eax@3
  PgSprData *v4; // eax@4
  NiNode *v5; // esi@5
  NiSourceTexture *v7; // eax@10
  PgSprData *v8; // eax@11
  PgWinSpr *v9; // eax@13
  PgFont *v10; // eax@16
  PgWinText *v11; // edi@16
  NiNode *v12; // ST0C_4@16
  PgSprData *v13; // edi@16
  NiPointer<PgSprData::PgHitTester> *v14; // edx@16
  unsigned int v15; // edi@16
  unsigned int v16; // ebx@16
  PgFont *v17; // eax@16
  PgWinText *v18; // edi@16
  NiRefObjectVtbl *v19; // ebx@16
  NiUnsharedGeometryGroup *v20; // eax@16
  PgSprData *v21; // edi@16
  NiPointer<PgSprData::PgHitTester> *v22; // ecx@16
  unsigned int v23; // edi@16
  unsigned int v24; // ebx@16
  PgFont *v25; // eax@16
  PgWinText *v26; // edi@16
  NiRefObjectVtbl *v27; // ebx@16
  NiUnsharedGeometryGroup *v28; // eax@16
  EditWin *v29; // eax@16
  NiNode *v30; // esi@17
  UIUtil ui; // [sp+10h] [bp-34h]@16
  unsigned int uiWidth; // [sp+24h] [bp-20h]@15
  unsigned int uiHeight; // [sp+28h] [bp-1Ch]@15
  int uiLeft; // [sp+2Ch] [bp-18h]@4
  int uiTop; // [sp+30h] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+34h] [bp-10h]@1
  int v37; // [sp+40h] [bp-4h]@1

  v1 = this;
  spNode.m_pObject = 0;
  v2 = pTexturePalette;
  v37 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v3 = Folder::Merge(&Folder::m_acMenu, "Game\\AddFriendList.nif");
  PgUtil::LoadNodeNifFile(v3, &spNode, v2);
  if ( !spNode.m_pObject )
    return 0;
  v4 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v1->vfptr, 0, 0, v4, 0, 0, "InputBox", 0) )
    goto LABEL_23;
  v7 = MenuTexMgr::GetTexture(0x13u);
  if ( v7 )
    v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v7);
  else
    v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  v9 = PgWinSpr::CreateWin(uiLeft, uiTop, v8, (PgWin *)&v1->vfptr, 0, 0);
  if ( v9 )
    v9->vfptr[60].__vecDelDtor((NiRefObject *)v9, 0);
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "TextBox", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
LABEL_23:
    v5 = spNode.m_pObject;
    v37 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
    return 0;
  }
  v10 = Font::Get(0);
  v11 = PgWinText::CreateWin(uiLeft, uiTop, uiWidth, uiHeight, v10, (PgWin *)&v1->vfptr, 0, 0);
  v11->vfptr[122].__vecDelDtor((NiRefObject *)v11, 1u);
  v11->vfptr[117].__vecDelDtor((NiRefObject *)v11, (unsigned int)&Color::m_kDxWinTitleColor);
  v11->vfptr[60].__vecDelDtor((NiRefObject *)v11, 0);
  v12 = spNode.m_pObject;
  v1->m_pkTextWin = v11;
  v13 = PgSprData::Create((NiAVObject *)&v12->vfptr, "BtnNor02", &uiLeft, &uiTop, 0);
  PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick02");
  PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver02");
  PgWinBut::CreateWin(uiLeft, uiTop, v13, (PgWin *)&v1->vfptr, 0, 0, 0);
  v14 = v13->m_akHitTester.m_pBase;
  v15 = v14->m_pObject->m_uiHeight;
  v16 = v14->m_pObject->m_uiWidth;
  v17 = Font::Get(0);
  v18 = PgWinText::CreateWin(uiLeft, uiTop + 1, v16, v15, v17, (PgWin *)&v1->vfptr, 0, 0);
  v18->vfptr[122].__vecDelDtor((NiRefObject *)v18, 5u);
  v19 = v18->vfptr;
  v20 = TextData::Get(0x4F5F499Fu);
  v19[118].__vecDelDtor((NiRefObject *)v18, (unsigned int)v20);
  v18->vfptr[60].__vecDelDtor((NiRefObject *)v18, 0);
  v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor03", &uiLeft, &uiTop, 0);
  PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick03");
  PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver03");
  PgWinBut::CreateWin(uiLeft, uiTop, v21, (PgWin *)&v1->vfptr, 1u, 0, 0);
  v22 = v21->m_akHitTester.m_pBase;
  v23 = v22->m_pObject->m_uiHeight;
  v24 = v22->m_pObject->m_uiWidth;
  v25 = Font::Get(0);
  v26 = PgWinText::CreateWin(uiLeft, uiTop + 1, v24, v23, v25, (PgWin *)&v1->vfptr, 0, 0);
  v26->vfptr[122].__vecDelDtor((NiRefObject *)v26, 5u);
  v27 = v26->vfptr;
  v28 = TextData::Get(0x88A297E1);
  v27[118].__vecDelDtor((NiRefObject *)v26, (unsigned int)v28);
  v26->vfptr[60].__vecDelDtor((NiRefObject *)v26, 0);
  UIUtil::UIUtil(&ui);
  LOBYTE(v37) = 1;
  UIUtil::SetOffset(&ui, 0, 0);
  UIUtil::SetParent(&ui, (PgWin *)&v1->vfptr);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v29 = UIUtil::CreateEdit(&ui, "InputBox", 16, NORMAL, 0, 1);
  v1->m_pkEditWin = v29;
  v29->vfptr[115].__vecDelDtor((NiRefObject *)v29, (unsigned int)&unk_979EAF);
  ((void (__stdcall *)(signed int))v1->m_pkEditWin->m_spEditWin.m_pObject->vfptr[13].__vecDelDtor)(5);
  ((void (__stdcall *)(_DWORD))v1->m_pkEditWin->m_spEditWin.m_pObject->vfptr[15].__vecDelDtor)(0);
  LOBYTE(v37) = 0;
  UIUtil::~UIUtil(&ui);
  v37 = -1;
  if ( spNode.m_pObject )
  {
    v30 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v30 )
        v30->vfptr->__vecDelDtor((NiRefObject *)v30, 1u);
    }
  }
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0044ABB0) --------------------------------------------------------
void __thiscall InputBox::OnCommand(InputBox *this, unsigned int wParam, int lParam)
{
  if ( wParam )
  {
    if ( wParam == 1 )
      InputBox::OnCmdCancel(this);
  }
  else
  {
    InputBox::OnCmdOk(this);
  }
}

//----- (0044ABD0) --------------------------------------------------------
InputBox *__cdecl InputBox::CreateWin()
{
  PgWin *v0; // eax@1
  PgWin *v1; // esi@1
  PgWin *v2; // edi@8
  InputBox *v3; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v5; // [sp+20h] [bp-4h]@1

  v0 = (PgWin *)operator new(0x168u);
  v1 = v0;
  result.m_pObject = v0;
  v5 = 0;
  if ( v0 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v0);
    v1->vfptr = (NiRefObjectVtbl *)&InputBox::`vftable'{for `NiNode'};
    v1->vfptr = (IDirectMessengerVtbl *)&InputBox::`vftable'{for `IDirectMessenger'};
    LODWORD(v1[1].m_kLocal.m_Rotate.m_pEntry[1][1]) = 1;
  }
  else
  {
    v1 = 0;
  }
  if ( v1 )
    InterlockedIncrement((volatile LONG *)&v1->m_uiRefCount);
  v5 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v1);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *))v1->vfptr[135].__vecDelDtor)(v1) )
  {
    ((void (__thiscall *)(PgWin *))v1->vfptr[89].__vecDelDtor)(v1);
    v5 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
      v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
    v3 = (InputBox *)v1;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v1);
    if ( result.m_pObject )
    {
      v2 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v2 )
          v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
      }
    }
    v5 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
      v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
    v3 = 0;
  }
  return v3;
}
// 979F34: using guessed type void (__thiscall *InputBox::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 979F54: using guessed type int (__thiscall *InputBox::`vftable'{for `NiNode'})(void *p, char);

//----- (0044AD20) --------------------------------------------------------
InputBox *__thiscall InputBox::`vector deleting destructor'(InputBox *this, unsigned int a2)
{
  InputBox *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&InputBox::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&InputBox::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 979F34: using guessed type void (__thiscall *InputBox::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 979F54: using guessed type int (__thiscall *InputBox::`vftable'{for `NiNode'})(void *p, char);

//----- (0044AD60) --------------------------------------------------------
void __thiscall ListItem::SetText(ListItem *this, char *pcText)
{
  ListItem *v2; // esi@1
  char *v3; // eax@2
  unsigned int v4; // edi@4
  char *v5; // edx@6
  char *v6; // ecx@6
  char v7; // al@7

  v2 = this;
  if ( pcText || (v3 = this->m_pcText) == 0 )
  {
    v4 = strlen(pcText);
    if ( v2->m_uiAllocLength <= v4 )
    {
      operator delete[](v2->m_pcText);
      v2->m_uiAllocLength = v4 + 1;
      v2->m_pcText = (char *)operator new[](v4 + 1);
    }
    v5 = v2->m_pcText;
    v6 = pcText;
    do
    {
      v7 = *v6;
      *v5++ = *v6++;
    }
    while ( v7 );
  }
  else
  {
    *v3 = 0;
  }
}

//----- (0044ADD0) --------------------------------------------------------
char __thiscall ListWin::SetItem(ListWin *this, int iIndex, void *pvItem)
{
  int v3; // eax@1
  char result; // al@2

  v3 = ((int (__stdcall *)(_DWORD))this->vfptr[121].__vecDelDtor)(iIndex);
  if ( v3 )
  {
    *(_DWORD *)(v3 + 8) = pvItem;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0044AE00) --------------------------------------------------------
_DWORD *__thiscall ListWin::GetItem(ListWin *this, int iIndex)
{
  _DWORD *result; // eax@1

  result = (_DWORD *)((int (__stdcall *)(int))this->vfptr[121].__vecDelDtor)(iIndex);
  if ( result )
    result = (_DWORD *)result[2];
  return result;
}

//----- (0044AE20) --------------------------------------------------------
int __thiscall ListWin::GetCurSel(ListWin *this)
{
  return this->m_iCurSelIndex;
}

//----- (0044AE30) --------------------------------------------------------
void __thiscall ListWin::SetTextColor(ListWin *this, char ucR, char ucG, char ucB, char ucA)
{
  ListWin *v5; // esi@1
  D3DXCOLOR *v6; // eax@1
  D3DXCOLOR result; // [sp+4h] [bp-10h]@1

  v5 = this;
  v6 = Color::GetDxColor(&result, ucR, ucG, ucB, ucA);
  v5->m_kTextColor.r = v6->r;
  v5->m_kTextColor.g = v6->g;
  v5->m_kTextColor.b = v6->b;
  v5->m_kTextColor.a = v6->a;
}

//----- (0044AE80) --------------------------------------------------------
void __thiscall ListWin::SetSelectedTextColor(ListWin *this, char ucR, char ucG, char ucB, char ucA)
{
  ListWin *v5; // esi@1
  D3DXCOLOR *v6; // eax@1
  D3DXCOLOR result; // [sp+4h] [bp-10h]@1

  v5 = this;
  v6 = Color::GetDxColor(&result, ucR, ucG, ucB, ucA);
  v5->m_kSelectedTextColor.r = v6->r;
  v5->m_kSelectedTextColor.g = v6->g;
  v5->m_kSelectedTextColor.b = v6->b;
  v5->m_kSelectedTextColor.a = v6->a;
}

//----- (0044AED0) --------------------------------------------------------
void __thiscall ListWin::SetSelectedTextColor(ListWin *this, D3DXCOLOR *kColor)
{
  this->m_kSelectedTextColor = *kColor;
}

//----- (0044AF00) --------------------------------------------------------
void __thiscall ListWin::OnCommand(ListWin *this, unsigned int wParam, int lParam)
{
  if ( !wParam )
    ((void (__stdcall *)(_DWORD))this->vfptr[126].__vecDelDtor)(lParam);
}

//----- (0044AF20) --------------------------------------------------------
void __thiscall ListWin::OnSelected(ListWin *this, int lParam)
{
  ((void (__stdcall *)(_DWORD))this->vfptr[118].__vecDelDtor)(lParam);
}

//----- (0044AF30) --------------------------------------------------------
unsigned int __thiscall ListWin::GetCount(ListWin *this)
{
  return this->m_kItemList.m_kAllocator.m_uiCount;
}

//----- (0044AF40) --------------------------------------------------------
ListItem *__thiscall ListWin::GetListItem(ListWin *this, int iIndex)
{
  int v2; // edi@1
  ListWin *v3; // esi@1
  NiTListItem<NiPointer<ListItem> > *v4; // eax@4
  ListItem *result; // eax@10

  v2 = iIndex;
  v3 = this;
  if ( iIndex < 0
    || iIndex >= ((int (*)(void))this->vfptr[113].__vecDelDtor)()
    || iIndex >= v3->m_kItemList.m_kAllocator.m_uiCount )
  {
    goto LABEL_14;
  }
  v4 = v3->m_kItemList.m_pkHead;
  if ( iIndex )
  {
    do
    {
      if ( v4 )
        v4 = v4->m_pkNext;
      else
        v4 = 0;
      --v2;
    }
    while ( v2 );
  }
  if ( v4 )
    result = v4->m_element.m_pObject;
  else
LABEL_14:
    result = 0;
  return result;
}

//----- (0044AFA0) --------------------------------------------------------
PgWinText *__thiscall ListWin::GetTextWin(ListWin *this, int iIndex)
{
  int v2; // edi@1
  ListWin *v3; // esi@1
  NiTListItem<NiPointer<PgWinText> > *v4; // eax@4
  PgWinText *result; // eax@10

  v2 = iIndex;
  v3 = this;
  if ( iIndex < 0
    || iIndex >= ((int (*)(void))this->vfptr[113].__vecDelDtor)()
    || iIndex >= v3->m_kTextWinList.m_kAllocator.m_uiCount )
  {
    goto LABEL_14;
  }
  v4 = v3->m_kTextWinList.m_pkHead;
  if ( iIndex )
  {
    do
    {
      if ( v4 )
        v4 = v4->m_pkNext;
      else
        v4 = 0;
      --v2;
    }
    while ( v2 );
  }
  if ( v4 )
    result = v4->m_element.m_pObject;
  else
LABEL_14:
    result = 0;
  return result;
}

//----- (0044B000) --------------------------------------------------------
void __thiscall ListWin::~ListWin(ListWin *this)
{
  char *v1; // esi@1
  NiTListItem<PgWinBut *> *v2; // edi@1
  NiTListItem<PgWinBut *> *v3; // ST00_4@2
  char *v4; // esi@4
  NiTListItem<NiPointer<PgWinText> > *v5; // edi@4
  NiTListItem<NiPointer<PgWinText> > *v6; // ST00_4@5
  char *v7; // esi@7
  NiTListItem<NiPointer<ListItem> > *v8; // edi@7
  NiTListItem<NiPointer<ListItem> > *v9; // ST00_4@8
  ListWin *v10; // [sp+14h] [bp-10h]@1

  v10 = this;
  this->vfptr = (NiRefObjectVtbl *)&ListWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ListWin::`vftable'{for `IDirectMessenger'};
  v1 = (char *)&this->m_kBtnList;
  this->m_kBtnList.vfptr = (NiTListBase<DFALL<PgWinBut *>,PgWinBut *>Vtbl *)&NiTPointerListBase<DFALL<PgWinBut *>,PgWinBut *>::`vftable';
  v2 = this->m_kBtnList.m_pkHead;
  if ( v2 )
  {
    do
    {
      v3 = v2;
      v2 = v2->m_pkNext;
      (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v1 + 8))(v1, v3);
    }
    while ( v2 );
    this = v10;
  }
  *((_DWORD *)v1 + 3) = 0;
  *((_DWORD *)v1 + 1) = 0;
  *((_DWORD *)v1 + 2) = 0;
  *(_DWORD *)v1 = &NiTListBase<DFALL<PgWinBut *>,PgWinBut *>::`vftable';
  v4 = (char *)&this->m_kTextWinList;
  this->m_kTextWinList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> >Vtbl *)&PgTList<NiPointer<PgWinText>>::`vftable';
  v5 = this->m_kTextWinList.m_pkHead;
  if ( v5 )
  {
    do
    {
      v6 = v5;
      v5 = v5->m_pkNext;
      (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v4 + 8))(v4, v6);
    }
    while ( v5 );
    this = v10;
  }
  *((_DWORD *)v4 + 3) = 0;
  *((_DWORD *)v4 + 1) = 0;
  *((_DWORD *)v4 + 2) = 0;
  *(_DWORD *)v4 = &NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::`vftable';
  v7 = (char *)&this->m_kItemList;
  this->m_kItemList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> >Vtbl *)&PgTList<NiPointer<ListItem>>::`vftable';
  v8 = this->m_kItemList.m_pkHead;
  if ( v8 )
  {
    do
    {
      v9 = v8;
      v8 = v8->m_pkNext;
      (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v7 + 8))(v7, v9);
    }
    while ( v8 );
    this = v10;
  }
  *((_DWORD *)v7 + 3) = 0;
  *((_DWORD *)v7 + 1) = 0;
  *((_DWORD *)v7 + 2) = 0;
  *(_DWORD *)v7 = &NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::`vftable';
  PgWin::~PgWin((PgWin *)&this->vfptr);
}
// 97A17C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::`vftable')(void *p, char);
// 97A19C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::`vftable')(void *p, char);
// 97A1AC: using guessed type int (__thiscall *NiTListBase<DFALL<PgWinBut *>,PgWinBut *>::`vftable')(void *p, char);
// 97A1C4: using guessed type int (__thiscall *NiTPointerListBase<DFALL<PgWinBut *>,PgWinBut *>::`vftable')(void *p, char);
// 97A1E4: using guessed type int (__thiscall *PgTList<NiPointer<ListItem>>::`vftable')(void *p, char);
// 97A204: using guessed type int (__thiscall *PgTList<NiPointer<PgWinText>>::`vftable')(void *p, char);
// 97A214: using guessed type void (__thiscall *ListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97A234: using guessed type int (__thiscall *ListWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0044B120) --------------------------------------------------------
char __thiscall ListWin::Create(ListWin *this, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgFont *pkFont, PgWin *pkParent, unsigned int uiLineSpace)
{
  ListWin *v8; // ebx@1
  unsigned int v9; // esi@1
  char result; // al@2
  PgFont *v11; // edi@3
  unsigned int v12; // eax@4
  int v13; // ecx@4
  unsigned int v14; // eax@4
  PgWinText *v15; // eax@8
  PgWinText *v16; // edi@8
  PgWinBut *v17; // eax@13
  PgWinBut *v18; // edi@13
  void *(__thiscall *v19)(NiRefObject *, unsigned int); // edx@13
  unsigned int v20; // ST1C_4@13
  int v21; // eax@13
  _DWORD *v22; // ecx@13
  tagSIZE kSize; // [sp+10h] [bp-14h]@4
  int v24; // [sp+20h] [bp-4h]@10

  v8 = this;
  v9 = uiHeight;
  if ( PgWin::Create((PgWin *)&this->vfptr, iXPos, iYPos, uiWidth, uiHeight, pkParent, 0, 0)
    && (v11 = pkFont) != 0
    && (PgFont::GetTextSize(pkFont, "W", 1, &kSize),
        v12 = uiLineSpace,
        v13 = kSize.cy,
        v8->m_uiLineSpace = uiLineSpace,
        pkParent = (PgWin *)(v13 + v12),
        v14 = v9 / (v13 + v12),
        (v8->m_uiTotalViewLineNum = v14) != 0) )
  {
    pkParent = 0;
    uiHeight = 0;
    if ( v14 )
    {
      while ( 1 )
      {
        v15 = PgWinText::CreateWin(0, (int)pkParent, uiWidth, v13, v11, (PgWin *)&v8->vfptr, 0, 0);
        v16 = v15;
        iYPos = (int)v15;
        if ( v15 )
          InterlockedIncrement((volatile LONG *)&v15->m_uiRefCount);
        v24 = 0;
        NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *)&v8->m_kTextWinList,
          (NiPointer<NiDX92DBufferData> *)&iYPos);
        v24 = -1;
        if ( v16 && !InterlockedDecrement((volatile LONG *)&v16->m_uiRefCount) )
          v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
        v17 = PgWinBut::CreateWin(0, (int)pkParent, uiWidth, kSize.cy + v8->m_uiLineSpace, (PgWin *)&v8->vfptr, 0, 0, 0);
        v18 = v17;
        v19 = v17->vfptr[130].__vecDelDtor;
        v20 = uiHeight;
        v17->m_eType = 0;
        v19((NiRefObject *)&v17->vfptr, v20);
        v21 = (int)v8->m_kBtnList.vfptr->NewItem((NiTListBase<DFALL<PgWinBut *>,PgWinBut *> *)&v8->m_kBtnList);
        *(_DWORD *)(v21 + 8) = v18;
        *(_DWORD *)v21 = 0;
        *(_DWORD *)(v21 + 4) = v8->m_kBtnList.m_pkTail;
        v22 = &v8->m_kBtnList.m_pkTail->m_pkNext;
        if ( v22 )
          *v22 = v21;
        else
          v8->m_kBtnList.m_pkHead = (NiTListItem<PgWinBut *> *)v21;
        ++v8->m_kBtnList.m_kAllocator.m_uiCount;
        v13 = kSize.cy;
        v8->m_kBtnList.m_pkTail = (NiTListItem<PgWinBut *> *)v21;
        pkParent = (PgWin *)((char *)pkParent + v13 + v8->m_uiLineSpace);
        if ( ++uiHeight >= v8->m_uiTotalViewLineNum )
          break;
        v11 = pkFont;
      }
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0044B300) --------------------------------------------------------
int __thiscall ListWin::AddString(ListWin *this, char *pcText)
{
  ListWin *v2; // edi@1
  ListItem *v3; // eax@1
  ListItem *v4; // esi@1
  PgWinText *v5; // eax@6
  NiPointer<ListItem> spListItem; // [sp+10h] [bp-14h]@4
  int iIndex; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@6

  v2 = this;
  iIndex = ((int (*)(void))this->vfptr[113].__vecDelDtor)();
  v3 = (ListItem *)operator new(0x14u);
  v4 = v3;
  if ( v3 )
  {
    v3->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
    v3->m_uiRefCount = 0;
    InterlockedIncrement(&NiRefObject::ms_uiObjects);
    v4->vfptr = (NiRefObjectVtbl *)&ListItem::`vftable';
    v4->m_pvItem = 0;
    v4->m_pcText = 0;
    v4->m_uiAllocLength = 0;
  }
  else
  {
    v4 = 0;
  }
  spListItem.m_pObject = v4;
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v9 = 0;
  ListItem::SetText(v4, pcText);
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *)&v2->m_kItemList,
    (NiPointer<NiDX92DBufferData> *)&spListItem);
  v5 = ListWin::GetTextWin(v2, iIndex);
  if ( v5 )
    v5->vfptr[118].__vecDelDtor((NiRefObject *)v5, (unsigned int)pcText);
  v9 = -1;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  return iIndex;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 97A1BC: using guessed type int (__thiscall *ListItem::`vftable')(void *p, char);

//----- (0044B400) --------------------------------------------------------
char __thiscall ListWin::SetCurSel(ListWin *this, int iIndex)
{
  ListWin *v2; // esi@1
  char result; // al@2
  PgWinText *v4; // eax@4
  PgWinText *v5; // eax@6
  PgWin *v6; // eax@8

  v2 = this;
  if ( iIndex < ((int (*)(void))this->vfptr[113].__vecDelDtor)() )
  {
    if ( v2->m_iCurSelIndex != iIndex )
    {
      v4 = ListWin::GetTextWin(v2, v2->m_iCurSelIndex);
      if ( v4 )
        v4->vfptr[117].__vecDelDtor((NiRefObject *)v4, (unsigned int)&v2->m_kTextColor);
      v2->m_iCurSelIndex = iIndex;
      v5 = ListWin::GetTextWin(v2, iIndex);
      if ( v5 )
        v5->vfptr[117].__vecDelDtor((NiRefObject *)v5, (unsigned int)&v2->m_kSelectedTextColor);
      v6 = PgWin::GetParentWin((PgWin *)&v2->vfptr);
      if ( v6 )
        PgWin::PostMsg(v6, 0, v2->m_iCurSelIndex, (int)v2);
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0044B4A0) --------------------------------------------------------
void __thiscall ListWin::ResetContent(ListWin *this)
{
  ListWin *v1; // ebx@1
  PgWinText *v2; // eax@1
  NiTListItem<NiPointer<PgWinText> > *v3; // esi@3
  PgWinText *v4; // ecx@4
  NiTListItem<NiPointer<ListItem> > **v5; // esi@7
  NiTListItem<NiPointer<ListItem> > *v6; // ST00_4@8

  v1 = this;
  v2 = ListWin::GetTextWin(this, this->m_iCurSelIndex);
  if ( v2 )
    v2->vfptr[117].__vecDelDtor((NiRefObject *)v2, (unsigned int)&v1->m_kTextColor);
  v3 = v1->m_kTextWinList.m_pkHead;
  while ( v3 )
  {
    v4 = v3->m_element.m_pObject;
    v3 = v3->m_pkNext;
    if ( v4 )
      ((void (__stdcall *)(_DWORD))v4->vfptr[118].__vecDelDtor)(&unk_97A176);
  }
  v5 = &v1->m_kItemList.m_pkHead->m_pkNext;
  while ( v5 )
  {
    v6 = (NiTListItem<NiPointer<ListItem> > *)v5;
    v5 = (NiTListItem<NiPointer<ListItem> > **)*v5;
    v1->m_kItemList.vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> > *)&v1->m_kItemList,
      v6);
  }
  v1->m_kItemList.m_kAllocator.m_uiCount = 0;
  v1->m_kItemList.m_pkHead = 0;
  v1->m_kItemList.m_pkTail = 0;
  v1->m_iCurSelIndex = -1;
}

//----- (0044B540) --------------------------------------------------------
void __thiscall ListWin::UpdateMeWin(ListWin *this, float fCurTime)
{
  ListWin *v2; // esi@1
  NiTListItem<PgWinBut *> *v3; // ebx@1
  int v4; // edi@1
  PgWinBut *v5; // eax@2
  NiTListItem<NiPointer<PgWinText> > *v6; // eax@5
  int v7; // ecx@6
  NiRefObjectVtbl **v8; // esi@12
  bool v9; // zf@14
  NiRefObjectVtbl *v10; // eax@14
  PgWinBut *pkBtn; // [sp+Ch] [bp-8h]@2
  ListWin *i; // [sp+10h] [bp-4h]@1

  v2 = this;
  v3 = this->m_kBtnList.m_pkHead;
  v4 = 0;
  for ( i = this; v3; ++v4 )
  {
    v5 = v3->m_element;
    v3 = v3->m_pkNext;
    pkBtn = v5;
    if ( v4 >= 0
      && v4 < ((int (__thiscall *)(_DWORD))v2->vfptr[113].__vecDelDtor)(v2)
      && v4 < v2->m_kTextWinList.m_kAllocator.m_uiCount )
    {
      v6 = v2->m_kTextWinList.m_pkHead;
      if ( v4 )
      {
        v7 = v4;
        do
        {
          if ( v6 )
            v6 = v6->m_pkNext;
          else
            v6 = 0;
          --v7;
        }
        while ( v7 );
      }
      if ( v6 )
      {
        v8 = &v6->m_element.m_pObject->vfptr;
        if ( v8 && i->m_iCurSelIndex != v4 )
        {
          v9 = (unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD))pkBtn->vfptr[83].__vecDelDtor)(
                                  PgWin::ms_iMsX,
                                  PgWin::ms_iMsY) == 0;
          v10 = *v8;
          if ( v9 )
            v10[117].__vecDelDtor((NiRefObject *)v8, (unsigned int)&i->m_kTextColor);
          else
            ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v10[116].__vecDelDtor)(v8, 0, 255, 0, 255);
        }
        v2 = i;
      }
    }
  }
}

//----- (0044B630) --------------------------------------------------------
void __thiscall ListWin::ListWin(ListWin *this)
{
  ListWin *v1; // esi@1
  D3DXCOLOR *v2; // eax@1
  D3DXCOLOR *v3; // eax@1
  D3DXCOLOR result; // [sp+Ch] [bp-20h]@1
  ListWin *v5; // [sp+1Ch] [bp-10h]@1
  int v6; // [sp+28h] [bp-4h]@1

  v1 = this;
  v5 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ListWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ListWin::`vftable'{for `IDirectMessenger'};
  v6 = 0;
  v1->m_kItemList.m_kAllocator.m_uiCount = 0;
  v1->m_kItemList.m_pkHead = 0;
  v1->m_kItemList.m_pkTail = 0;
  v1->m_kItemList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> >Vtbl *)&PgTList<NiPointer<ListItem>>::`vftable';
  v1->m_kTextWinList.m_kAllocator.m_uiCount = 0;
  v1->m_kTextWinList.m_pkHead = 0;
  v1->m_kTextWinList.m_pkTail = 0;
  v1->m_kTextWinList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> >Vtbl *)&PgTList<NiPointer<PgWinText>>::`vftable';
  v1->m_kBtnList.m_kAllocator.m_uiCount = 0;
  v1->m_kBtnList.m_pkHead = 0;
  v1->m_kBtnList.m_pkTail = 0;
  v1->m_kBtnList.vfptr = (NiTListBase<DFALL<PgWinBut *>,PgWinBut *>Vtbl *)&NiTList<PgWinBut *>::`vftable';
  LOBYTE(v6) = 3;
  v1->m_iCurSelIndex = -1;
  v1->m_uiLineSpace = 1;
  v2 = Color::GetDxColor(&result, -1, -1, -1, -1);
  v1->m_kTextColor.r = v2->r;
  v1->m_kTextColor.g = v2->g;
  v1->m_kTextColor.b = v2->b;
  v1->m_kTextColor.a = v2->a;
  v3 = Color::GetDxColor(&result, 0, -1, 0, -1);
  v1->m_kSelectedTextColor.r = v3->r;
  v1->m_kSelectedTextColor.g = v3->g;
  v1->m_kSelectedTextColor.b = v3->b;
  v1->m_kSelectedTextColor.a = v3->a;
  v1->m_uiTotalViewLineNum = 0;
}
// 97A1E4: using guessed type int (__thiscall *PgTList<NiPointer<ListItem>>::`vftable')(void *p, char);
// 97A1F4: using guessed type int (__thiscall *NiTList<PgWinBut *>::`vftable')(void *p, char);
// 97A204: using guessed type int (__thiscall *PgTList<NiPointer<PgWinText>>::`vftable')(void *p, char);
// 97A214: using guessed type void (__thiscall *ListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97A234: using guessed type int (__thiscall *ListWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0044B780) --------------------------------------------------------
char __thiscall ListWin::DeleteString(ListWin *this, int iIndex)
{
  ListWin *v2; // esi@1
  int v3; // eax@1
  int v4; // edx@1
  char v5; // al@2
  NiTListItem<NiPointer<ListItem> > **v6; // eax@4
  PgWin *v7; // esi@11
  NiPointer<PgWin> result; // [sp+4h] [bp-4h]@11

  v2 = this;
  v3 = ((int (*)(void))this->vfptr[113].__vecDelDtor)();
  v4 = iIndex;
  if ( iIndex >= v3 )
    goto LABEL_18;
  if ( iIndex < v2->m_kItemList.m_kAllocator.m_uiCount )
  {
    v6 = &v2->m_kItemList.m_pkHead->m_pkNext;
    if ( iIndex )
    {
      do
      {
        if ( v6 )
          v6 = (NiTListItem<NiPointer<ListItem> > **)*v6;
        else
          v6 = 0;
        --v4;
      }
      while ( v4 );
    }
  }
  else
  {
    v6 = 0;
  }
  iIndex = (int)v6;
  if ( v6 )
  {
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::RemovePos(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *)&v2->m_kItemList,
      &result,
      (void **)&iIndex);
    v7 = result.m_pObject;
    if ( result.m_pObject && !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v7 )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    }
    v5 = 1;
  }
  else
  {
LABEL_18:
    v5 = 0;
  }
  return v5;
}

//----- (0044B810) --------------------------------------------------------
ListWin *__cdecl ListWin::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgFont *pkFont, PgWin *pkParent, unsigned int uiLineSpace)
{
  PgWin *v7; // eax@1
  PgWin *v8; // eax@2
  PgWin *v9; // esi@2
  PgWin *v10; // edi@8
  ListWin *v11; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v13; // [sp+20h] [bp-4h]@1

  v7 = (PgWin *)operator new(0x17Cu);
  result.m_pObject = v7;
  v13 = 0;
  if ( v7 )
  {
    ListWin::ListWin((ListWin *)v7);
    v9 = v8;
  }
  else
  {
    v9 = 0;
  }
  if ( v9 )
    InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  v13 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v9);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, unsigned int, PgFont *, PgWin *, unsigned int))v9->vfptr[125].__vecDelDtor)(
                          v9,
                          iXPos,
                          iYPos,
                          uiWidth,
                          uiHeight,
                          pkFont,
                          pkParent,
                          uiLineSpace) )
  {
    ((void (__thiscall *)(PgWin *))v9->vfptr[89].__vecDelDtor)(v9);
    v13 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v11 = (ListWin *)v9;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v9);
    if ( result.m_pObject )
    {
      v10 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v10 )
          v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
      }
    }
    v13 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v11 = 0;
  }
  return v11;
}

//----- (0044B960) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::~NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> > *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::`vftable';
}
// 97A17C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::`vftable')(void *p, char);

//----- (0044B970) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::~NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> > *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::`vftable';
}
// 97A19C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::`vftable')(void *p, char);

//----- (0044B980) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<PgWinBut *>,PgWinBut *>::~NiTListBase<DFALL<PgWinBut *>,PgWinBut *>(NiTListBase<DFALL<PgWinBut *>,PgWinBut *> *this)
{
  this->vfptr = (NiTListBase<DFALL<PgWinBut *>,PgWinBut *>Vtbl *)&NiTListBase<DFALL<PgWinBut *>,PgWinBut *>::`vftable';
}
// 97A1AC: using guessed type int (__thiscall *NiTListBase<DFALL<PgWinBut *>,PgWinBut *>::`vftable')(void *p, char);

//----- (0044B990) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> > *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> > *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> > *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 97A17C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::`vftable')(void *p, char);

//----- (0044B9C0) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> > *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> > *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> > *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 97A19C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::`vftable')(void *p, char);

//----- (0044B9F0) --------------------------------------------------------
NiTListBase<DFALL<PgWinBut *>,PgWinBut *> *__thiscall NiTListBase<DFALL<PgWinBut *>,PgWinBut *>::`scalar deleting destructor'(NiTListBase<DFALL<PgWinBut *>,PgWinBut *> *this, unsigned int a2)
{
  NiTListBase<DFALL<PgWinBut *>,PgWinBut *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<PgWinBut *>,PgWinBut *>Vtbl *)&NiTListBase<DFALL<PgWinBut *>,PgWinBut *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 97A1AC: using guessed type int (__thiscall *NiTListBase<DFALL<PgWinBut *>,PgWinBut *>::`vftable')(void *p, char);

//----- (0044BA20) --------------------------------------------------------
void __thiscall NiTPointerList<NiPointer<ListItem>>::~NiTPointerList<NiPointer<ListItem>>(NiTPointerList<NiPointer<ListItem> > *this)
{
  NiTPointerList<NiPointer<ListItem> > *v1; // edi@1
  NiTListItem<NiPointer<ListItem> > *v2; // esi@1
  NiTListItem<NiPointer<ListItem> > *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> >Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> > *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::`vftable';
}
// 97A17C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::`vftable')(void *p, char);
// 97A18C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::`vftable')(void *p, char);

//----- (0044BAA0) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> > *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> > *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> > *v2; // edi@1
  NiTListItem<NiPointer<ListItem> > *v3; // esi@1
  NiTListItem<NiPointer<ListItem> > *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> >Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> > *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97A17C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::`vftable')(void *p, char);
// 97A18C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::`vftable')(void *p, char);

//----- (0044BB30) --------------------------------------------------------
void __thiscall PgTList<NiPointer<ListItem>>::~PgTList<NiPointer<ListItem>>(PgTList<NiPointer<ListItem> > *this)
{
  PgTList<NiPointer<ListItem> > *v1; // edi@1
  NiTListItem<NiPointer<ListItem> > *v2; // esi@1
  NiTListItem<NiPointer<ListItem> > *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> >Vtbl *)&PgTList<NiPointer<ListItem>>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> > *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::`vftable';
}
// 97A17C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::`vftable')(void *p, char);
// 97A1E4: using guessed type int (__thiscall *PgTList<NiPointer<ListItem>>::`vftable')(void *p, char);

//----- (0044BBB0) --------------------------------------------------------
ListItem *__thiscall ListItem::`scalar deleting destructor'(ListItem *this, unsigned int a2)
{
  ListItem *v2; // esi@1
  char *v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pcText;
  this->vfptr = (NiRefObjectVtbl *)&ListItem::`vftable';
  operator delete[](v3);
  v2->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 97A1BC: using guessed type int (__thiscall *ListItem::`vftable')(void *p, char);

//----- (0044BBF0) --------------------------------------------------------
void __thiscall NiTList<PgWinBut *>::~NiTList<PgWinBut *>(NiTList<PgWinBut *> *this)
{
  NiTList<PgWinBut *> *v1; // edi@1
  NiTListItem<PgWinBut *> *v2; // esi@1
  NiTListItem<PgWinBut *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<DFALL<PgWinBut *>,PgWinBut *>Vtbl *)&NiTPointerListBase<DFALL<PgWinBut *>,PgWinBut *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<DFALL<PgWinBut *>,PgWinBut *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<DFALL<PgWinBut *>,PgWinBut *>Vtbl *)&NiTListBase<DFALL<PgWinBut *>,PgWinBut *>::`vftable';
}
// 97A1AC: using guessed type int (__thiscall *NiTListBase<DFALL<PgWinBut *>,PgWinBut *>::`vftable')(void *p, char);
// 97A1C4: using guessed type int (__thiscall *NiTPointerListBase<DFALL<PgWinBut *>,PgWinBut *>::`vftable')(void *p, char);

//----- (0044BC70) --------------------------------------------------------
PgTList<NiPointer<ListItem> > *__thiscall PgTList<NiPointer<ListItem>>::`scalar deleting destructor'(PgTList<NiPointer<ListItem> > *this, unsigned int a2)
{
  PgTList<NiPointer<ListItem> > *v2; // edi@1
  NiTListItem<NiPointer<ListItem> > *v3; // esi@1
  NiTListItem<NiPointer<ListItem> > *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> >Vtbl *)&PgTList<NiPointer<ListItem>>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> > *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97A17C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::`vftable')(void *p, char);
// 97A1E4: using guessed type int (__thiscall *PgTList<NiPointer<ListItem>>::`vftable')(void *p, char);

//----- (0044BD00) --------------------------------------------------------
void __thiscall NiTPointerList<NiPointer<PgWinText>>::~NiTPointerList<NiPointer<PgWinText>>(NiTPointerList<NiPointer<PgWinText> > *this)
{
  NiTPointerList<NiPointer<PgWinText> > *v1; // edi@1
  NiTListItem<NiPointer<PgWinText> > *v2; // esi@1
  NiTListItem<NiPointer<PgWinText> > *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> >Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> > *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::`vftable';
}
// 97A19C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::`vftable')(void *p, char);
// 97A1D4: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::`vftable')(void *p, char);

//----- (0044BD80) --------------------------------------------------------
NiTPointerListBase<DFALL<PgWinBut *>,PgWinBut *> *__thiscall NiTPointerListBase<DFALL<PgWinBut *>,PgWinBut *>::`scalar deleting destructor'(NiTPointerListBase<DFALL<PgWinBut *>,PgWinBut *> *this, unsigned int a2)
{
  NiTPointerListBase<DFALL<PgWinBut *>,PgWinBut *> *v2; // edi@1
  NiTListItem<PgWinBut *> *v3; // esi@1
  NiTListItem<PgWinBut *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<PgWinBut *>,PgWinBut *>Vtbl *)&NiTPointerListBase<DFALL<PgWinBut *>,PgWinBut *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<DFALL<PgWinBut *>,PgWinBut *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<PgWinBut *>,PgWinBut *>Vtbl *)&NiTListBase<DFALL<PgWinBut *>,PgWinBut *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97A1AC: using guessed type int (__thiscall *NiTListBase<DFALL<PgWinBut *>,PgWinBut *>::`vftable')(void *p, char);
// 97A1C4: using guessed type int (__thiscall *NiTPointerListBase<DFALL<PgWinBut *>,PgWinBut *>::`vftable')(void *p, char);

//----- (0044BE10) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> > *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> > *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> > *v2; // edi@1
  NiTListItem<NiPointer<PgWinText> > *v3; // esi@1
  NiTListItem<NiPointer<PgWinText> > *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> >Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> > *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97A19C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::`vftable')(void *p, char);
// 97A1D4: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::`vftable')(void *p, char);

//----- (0044BEA0) --------------------------------------------------------
void __thiscall PgTList<NiPointer<PgWinText>>::~PgTList<NiPointer<PgWinText>>(PgTList<NiPointer<PgWinText> > *this)
{
  PgTList<NiPointer<PgWinText> > *v1; // edi@1
  NiTListItem<NiPointer<PgWinText> > *v2; // esi@1
  NiTListItem<NiPointer<PgWinText> > *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> >Vtbl *)&PgTList<NiPointer<PgWinText>>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> > *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::`vftable';
}
// 97A19C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::`vftable')(void *p, char);
// 97A204: using guessed type int (__thiscall *PgTList<NiPointer<PgWinText>>::`vftable')(void *p, char);

//----- (0044BF20) --------------------------------------------------------
PgTList<NiPointer<PgWinText> > *__thiscall PgTList<NiPointer<PgWinText>>::`scalar deleting destructor'(PgTList<NiPointer<PgWinText> > *this, unsigned int a2)
{
  PgTList<NiPointer<PgWinText> > *v2; // edi@1
  NiTListItem<NiPointer<PgWinText> > *v3; // esi@1
  NiTListItem<NiPointer<PgWinText> > *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> >Vtbl *)&PgTList<NiPointer<PgWinText>>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> > *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97A19C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWinText>>::`vftable')(void *p, char);
// 97A204: using guessed type int (__thiscall *PgTList<NiPointer<PgWinText>>::`vftable')(void *p, char);

//----- (0044BFB0) --------------------------------------------------------
NiPointer<PgWin> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::RemovePos(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *this, NiPointer<PgWin> *result, void **kPos)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *v3; // esi@1
  NiTListItem<NiPointer<PgWin> > *v4; // ebx@1
  NiPointer<PgWin> *v5; // eax@2
  NiTListItem<NiPointer<PgWin> > **v6; // edx@5
  NiTListItem<NiPointer<PgWin> > **v7; // eax@5
  PgWin *v8; // edi@9

  v3 = this;
  v4 = (NiTListItem<NiPointer<PgWin> > *)*kPos;
  if ( *kPos == this->m_pkHead )
  {
    *kPos = v4->m_pkNext;
    NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::RemoveHead(this, result);
    v5 = result;
  }
  else if ( v4 == this->m_pkTail )
  {
    *kPos = 0;
    NiTPointerListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::RemoveTail(this, result);
    v5 = result;
  }
  else
  {
    v6 = &v4->m_pkPrev->m_pkNext;
    v7 = &v4->m_pkNext->m_pkNext;
    *kPos = v4->m_pkNext;
    if ( v6 )
      *v6 = (NiTListItem<NiPointer<PgWin> > *)v7;
    if ( v7 )
      v7[1] = (NiTListItem<NiPointer<PgWin> > *)v6;
    v8 = v4->m_element.m_pObject;
    if ( v8 )
      InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
    v3->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *)v3, v4);
    --v3->m_kAllocator.m_uiCount;
    result->m_pObject = v8;
    if ( v8 )
      InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
    if ( v8 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
        v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    }
    v5 = result;
  }
  return v5;
}

//----- (0044C0D0) --------------------------------------------------------
ListWin *__thiscall ListWin::`vector deleting destructor'(ListWin *this, unsigned int a2)
{
  ListWin *v2; // esi@1

  v2 = this;
  ListWin::~ListWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0044C100) --------------------------------------------------------
NiTexture *__thiscall MaskedWin::GetBaseTexture(MaskedWin *this)
{
  return this->m_pkCurrTexture;
}

//----- (0044C110) --------------------------------------------------------
NiTriShape *__thiscall MaskedWin::GetTriShape(MaskedWin *this)
{
  return this->m_spShape.m_pObject;
}

//----- (0044C120) --------------------------------------------------------
void __thiscall MaskedWin::MaskedWin(MaskedWin *this)
{
  MaskedWin *v1; // esi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&MaskedWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MaskedWin::`vftable'{for `IDirectMessenger'};
  v1->m_spShape.m_pObject = 0;
  v1->m_pkCurrTexture = 0;
}
// 97A48C: using guessed type void (__thiscall *MaskedWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97A4AC: using guessed type int (__thiscall *MaskedWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0044C150) --------------------------------------------------------
void __thiscall MaskedWin::~MaskedWin(MaskedWin *this)
{
  MaskedWin *v1; // esi@1
  NiTriShape *v2; // edi@1
  NiTriShape *v3; // edi@6

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&MaskedWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MaskedWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spShape.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spShape.m_pObject = 0;
  }
  v3 = v1->m_spShape.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  PgWin::~PgWin((PgWin *)&v1->vfptr);
}
// 97A48C: using guessed type void (__thiscall *MaskedWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97A4AC: using guessed type int (__thiscall *MaskedWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0044C210) --------------------------------------------------------
char __thiscall MaskedWin::Create(MaskedWin *this, int iXPos, int iYPos, NiTriShape *pkTriShape, bool bAlphaBlend, PgWin *pkParent)
{
  NiGeometryData *v6; // eax@1
  NiPoint3 *v7; // ebx@1
  float fRight; // ST3C_4@1
  double v9; // st7@1
  unsigned int v10; // edi@1
  unsigned int v11; // edx@1
  float v12; // ST3C_4@1
  double v13; // st6@1
  unsigned int v14; // esi@3
  int v15; // ecx@3
  int v16; // ecx@38
  int v17; // esi@38
  NiTriShape *v18; // esi@48
  MaskShader *v19; // ST18_4@55
  MaskShader *v20; // ST18_4@56
  MaskedWin *v22; // [sp+10h] [bp-10h]@1
  float fTop; // [sp+14h] [bp-Ch]@1
  float fLeft; // [sp+18h] [bp-8h]@1
  NiGeometry *bAlphaBlenda; // [sp+34h] [bp+14h]@55
  NiGeometry *bAlphaBlendb; // [sp+34h] [bp+14h]@56

  v6 = pkTriShape->m_spModelData.m_pObject;
  v7 = v6->m_pkVertex;
  fRight = v7->x;
  v9 = fRight;
  v10 = v6->m_usVertices;
  fLeft = fRight;
  v11 = 1;
  v22 = this;
  v12 = v7->y;
  v13 = v12;
  fTop = v12;
  if ( v10 > 1 )
  {
    if ( (signed int)(v10 - 1) >= 4 )
    {
      v14 = ((v10 - 5) >> 2) + 1;
      v15 = (int)&v7[2];
      v11 = 4 * v14 + 1;
      do
      {
        if ( fLeft <= (double)*(float *)(v15 - 12) )
        {
          if ( *(float *)(v15 - 12) > v9 )
            v9 = *(float *)(v15 - 12);
        }
        else
        {
          fLeft = *(float *)(v15 - 12);
        }
        if ( fTop <= (double)*(float *)(v15 - 8) )
        {
          if ( *(float *)(v15 - 8) > v13 )
            v13 = *(float *)(v15 - 8);
        }
        else
        {
          fTop = *(float *)(v15 - 8);
        }
        if ( fLeft <= (double)*(float *)v15 )
        {
          if ( *(float *)v15 > v9 )
            v9 = *(float *)v15;
        }
        else
        {
          fLeft = *(float *)v15;
        }
        if ( fTop <= (double)*(float *)(v15 + 4) )
        {
          if ( *(float *)(v15 + 4) > v13 )
            v13 = *(float *)(v15 + 4);
        }
        else
        {
          fTop = *(float *)(v15 + 4);
        }
        if ( fLeft <= (double)*(float *)(v15 + 12) )
        {
          if ( *(float *)(v15 + 12) > v9 )
            v9 = *(float *)(v15 + 12);
        }
        else
        {
          fLeft = *(float *)(v15 + 12);
        }
        if ( fTop <= (double)*(float *)(v15 + 16) )
        {
          if ( *(float *)(v15 + 16) > v13 )
            v13 = *(float *)(v15 + 16);
        }
        else
        {
          fTop = *(float *)(v15 + 16);
        }
        if ( fLeft <= (double)*(float *)(v15 + 24) )
        {
          if ( *(float *)(v15 + 24) > v9 )
            v9 = *(float *)(v15 + 24);
        }
        else
        {
          fLeft = *(float *)(v15 + 24);
        }
        if ( fTop <= (double)*(float *)(v15 + 28) )
        {
          if ( *(float *)(v15 + 28) > v13 )
            v13 = *(float *)(v15 + 28);
        }
        else
        {
          fTop = *(float *)(v15 + 28);
        }
        v15 += 48;
        --v14;
      }
      while ( v14 );
    }
    if ( v11 < v10 )
    {
      v16 = (int)&v7[v11];
      v17 = v10 - v11;
      do
      {
        if ( fLeft <= (double)*(float *)v16 )
        {
          if ( *(float *)v16 > v9 )
            v9 = *(float *)v16;
        }
        else
        {
          fLeft = *(float *)v16;
        }
        if ( fTop <= (double)*(float *)(v16 + 4) )
        {
          if ( *(float *)(v16 + 4) > v13 )
            v13 = *(float *)(v16 + 4);
        }
        else
        {
          fTop = *(float *)(v16 + 4);
        }
        v16 += 12;
        --v17;
      }
      while ( v17 );
    }
  }
  v18 = v22->m_spShape.m_pObject;
  if ( v18 != pkTriShape )
  {
    if ( v18 && !InterlockedDecrement((volatile LONG *)&v18->m_uiRefCount) && v18 )
      v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
    v22->m_spShape.m_pObject = pkTriShape;
    InterlockedIncrement((volatile LONG *)&pkTriShape->m_uiRefCount);
  }
  ((void (__stdcall *)(NiTriShape *, signed int))v22->vfptr[29].__vecDelDtor)(v22->m_spShape.m_pObject, 1);
  NiAVObject::UpdateProperties((NiAVObject *)&v22->vfptr);
  v22->m_spShape.m_pObject->m_uFlags &= 0xFFFEu;
  if ( bAlphaBlend )
  {
    bAlphaBlenda = (NiGeometry *)&v22->m_spShape.m_pObject->vfptr;
    v19 = MaskShader::GetShader();
    NiShaderFactory::AttachShader(bAlphaBlenda, (NiShader *)&v19->vfptr);
  }
  else
  {
    bAlphaBlendb = (NiGeometry *)&v22->m_spShape.m_pObject->vfptr;
    v20 = MaskShader::GetShader_NoAlphaBlend();
    NiShaderFactory::AttachShader(bAlphaBlendb, (NiShader *)&v20->vfptr);
  }
  return PgWin::Create(
           (PgWin *)&v22->vfptr,
           iXPos,
           iYPos,
           (signed __int64)(v9 + 0.5) - (signed __int64)(fLeft + 0.5),
           (signed __int64)(v13 + 0.5) - (signed __int64)(fTop + 0.5),
           pkParent,
           0,
           0);
}

//----- (0044C5B0) --------------------------------------------------------
void __thiscall MaskedWin::SetBaseTextureMatrix(MaskedWin *this, float fOffX, float fOffY, float fScaleX, float fScaleY)
{
  MaskedWin *v5; // ebx@1
  NiExtraData *v6; // eax@1
  float *v7; // eax@2
  NiRefObjectVtbl *v8; // edi@2
  NiExtraData *v9; // eax@2
  NiExtraData *v10; // esi@2
  NiRefObjectVtbl *v11; // eax@6

  v5 = this;
  v6 = NiObjectNET::GetExtraData((NiObjectNET *)&this->m_spShape.m_pObject->vfptr, "*texmat");
  if ( v6 )
  {
    v11 = v6[1].vfptr;
    *(float *)&v11->__vecDelDtor = fOffX;
    *(float *)&v11[1].__vecDelDtor = fOffY;
    *(float *)&v11[2].__vecDelDtor = fScaleX;
    *(float *)&v11[3].__vecDelDtor = fScaleY;
  }
  else
  {
    v7 = (float *)operator new(0x10u);
    v8 = (NiRefObjectVtbl *)v7;
    *v7 = fOffX;
    v7[1] = fOffY;
    v7[2] = fScaleX;
    v7[3] = fScaleY;
    v9 = (NiExtraData *)operator new(0x14u);
    v10 = v9;
    if ( v9 )
    {
      NiExtraData::NiExtraData(v9);
      v10->vfptr = (NiRefObjectVtbl *)&NiBinaryExtraData::`vftable';
      v10[1].m_uiRefCount = 16;
      v10[1].vfptr = v8;
    }
    else
    {
      v10 = 0;
    }
    NiObjectNET::AddExtraData((NiObjectNET *)&v5->m_spShape.m_pObject->vfptr, "*texmat", v10);
  }
}
// 97A444: using guessed type int (__thiscall *NiBinaryExtraData::`vftable')(void *p, char);

//----- (0044C6A0) --------------------------------------------------------
void __thiscall MaskedWin::SetDarkMap(MaskedWin *this, NiTexture *pkTexture)
{
  unsigned int v2; // esi@1
  NiTexture *v3; // edi@1

  v2 = NiAVObject::GetProperty((NiAVObject *)&this->m_spShape.m_pObject->vfptr, 8)[1].m_spControllers.m_pObject->m_uiRefCount;
  v3 = *(NiTexture **)(v2 + 4);
  if ( v3 != pkTexture )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    *(_DWORD *)(v2 + 4) = pkTexture;
    if ( pkTexture )
      InterlockedIncrement((volatile LONG *)&pkTexture->m_uiRefCount);
  }
}

//----- (0044C700) --------------------------------------------------------
void __thiscall MaskedWin::SetBaseTexture(MaskedWin *this, NiTexture *pkTexture)
{
  MaskedWin *v2; // esi@1
  NiTexturingProperty *v3; // edi@1
  NiTexturingProperty *v4; // eax@2
  NiProperty *v5; // eax@3
  NiAVObject *v6; // ecx@7

  v2 = this;
  v3 = (NiTexturingProperty *)NiAVObject::GetProperty((NiAVObject *)&this->m_spShape.m_pObject->vfptr, 8);
  if ( !v3 )
  {
    v4 = (NiTexturingProperty *)operator new(0x44u);
    if ( v4 )
      NiTexturingProperty::NiTexturingProperty(v4);
    else
      v5 = 0;
    v3 = (NiTexturingProperty *)v5;
    NiAVObject::AttachProperty((NiAVObject *)&v2->m_spShape.m_pObject->vfptr, v5);
  }
  if ( v2->m_pkCurrTexture != pkTexture )
  {
    NiTexturingProperty::SetBaseTexture(v3, pkTexture);
    v6 = (NiAVObject *)&v2->m_spShape.m_pObject->vfptr;
    v2->m_pkCurrTexture = pkTexture;
    NiAVObject::UpdateProperties(v6);
  }
}

//----- (0044C7B0) --------------------------------------------------------
MaskedWin *__cdecl MaskedWin::CreateWin(int iXPos, int iYPos, NiTriShape *pkTriShape, PgWin *pkParent)
{
  PgWin *v4; // eax@1
  PgWin *v5; // esi@1
  PgWin *v6; // edi@8
  MaskedWin *v7; // eax@14
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v4 = (PgWin *)operator new(0x128u);
  v5 = v4;
  result.m_pObject = v4;
  v9 = 0;
  if ( v4 )
  {
    PgWin::PgWin(v4);
    v5->vfptr = (NiRefObjectVtbl *)&MaskedWin::`vftable'{for `NiNode'};
    v5->vfptr = (IDirectMessengerVtbl *)&MaskedWin::`vftable'{for `IDirectMessenger'};
    v5[1].vfptr = 0;
    v5[1].m_uiRefCount = 0;
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v9 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v5);
  if ( MaskedWin::Create((MaskedWin *)v5, iXPos, iYPos, pkTriShape, 1, pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v5->vfptr[89].__vecDelDtor)(v5);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = (MaskedWin *)v5;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v5);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v9 = -1;
    if ( v5 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
    v7 = 0;
  }
  return v7;
}
// 97A48C: using guessed type void (__thiscall *MaskedWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97A4AC: using guessed type int (__thiscall *MaskedWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0044C910) --------------------------------------------------------
MaskedWin *__cdecl MaskedWin::CreateWin_MaskShaderNoAlphaBlend(int iXPos, int iYPos, NiTriShape *pkTriShape, PgWin *pkParent)
{
  PgWin *v4; // eax@1
  PgWin *v5; // esi@1
  PgWin *v6; // edi@8
  MaskedWin *v7; // eax@14
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v4 = (PgWin *)operator new(0x128u);
  v5 = v4;
  result.m_pObject = v4;
  v9 = 0;
  if ( v4 )
  {
    PgWin::PgWin(v4);
    v5->vfptr = (NiRefObjectVtbl *)&MaskedWin::`vftable'{for `NiNode'};
    v5->vfptr = (IDirectMessengerVtbl *)&MaskedWin::`vftable'{for `IDirectMessenger'};
    v5[1].vfptr = 0;
    v5[1].m_uiRefCount = 0;
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v9 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v5);
  if ( MaskedWin::Create((MaskedWin *)v5, iXPos, iYPos, pkTriShape, 0, pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v5->vfptr[89].__vecDelDtor)(v5);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = (MaskedWin *)v5;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v5);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v9 = -1;
    if ( v5 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
    v7 = 0;
  }
  return v7;
}
// 97A48C: using guessed type void (__thiscall *MaskedWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97A4AC: using guessed type int (__thiscall *MaskedWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0044CA70) --------------------------------------------------------
void __thiscall NiBinaryExtraData::NiBinaryExtraData(NiBinaryExtraData *this, const unsigned int uiSize, char *pcBinaryData)
{
  NiBinaryExtraData *v3; // esi@1

  v3 = this;
  NiExtraData::NiExtraData((NiExtraData *)&this->vfptr);
  v3->m_uiSize = uiSize;
  v3->vfptr = (NiRefObjectVtbl *)&NiBinaryExtraData::`vftable';
  v3->m_pcBinaryData = pcBinaryData;
}
// 97A444: using guessed type int (__thiscall *NiBinaryExtraData::`vftable')(void *p, char);

//----- (0044CAA0) --------------------------------------------------------
NiRTTI *NiBinaryExtraData::GetRTTI()
{
  return &NiBinaryExtraData::m_RTTI;
}

//----- (0044CAB0) --------------------------------------------------------
NiBinaryExtraData *__thiscall NiBinaryExtraData::`vector deleting destructor'(NiBinaryExtraData *this, unsigned int a2)
{
  NiBinaryExtraData *v2; // esi@1
  char *v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pcBinaryData;
  this->vfptr = (NiRefObjectVtbl *)&NiBinaryExtraData::`vftable';
  operator delete(v3);
  v2->m_pcBinaryData = 0;
  NiExtraData::~NiExtraData((NiExtraData *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97A444: using guessed type int (__thiscall *NiBinaryExtraData::`vftable')(void *p, char);

//----- (0044CAF0) --------------------------------------------------------
MaskedWin *__thiscall MaskedWin::`vector deleting destructor'(MaskedWin *this, unsigned int a2)
{
  MaskedWin *v2; // esi@1

  v2 = this;
  MaskedWin::~MaskedWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0044CB20) --------------------------------------------------------
bool __thiscall MaskShader::Initialize(MaskShader *this, NiDX9Renderer *pkRenderer)
{
  return NiD3DDefaultShader::Initialize((NiD3DDefaultShader *)&this->vfptr, pkRenderer) != 0;
}

//----- (0044CB40) --------------------------------------------------------
void __thiscall MaskShader::~MaskShader(MaskShader *this)
{
  MaskShader *v1; // esi@1
  NiD3DPass *v2; // ecx@1
  bool v3; // zf@2
  NiD3DPass *v4; // ecx@5

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&MaskShader::`vftable';
  v2 = this->m_spPassOne.m_pObject;
  if ( v2 )
  {
    v3 = v2->m_uiRefCount-- == 1;
    if ( v3 )
      NiD3DPass::ReturnPassToPool(v2);
    v1->m_spPassOne.m_pObject = 0;
  }
  v4 = v1->m_spPassOne.m_pObject;
  if ( v4 )
  {
    v3 = v4->m_uiRefCount-- == 1;
    if ( v3 )
      NiD3DPass::ReturnPassToPool(v4);
  }
  NiD3DDefaultShader::~NiD3DDefaultShader((NiD3DDefaultShader *)&v1->vfptr);
}
// 97A6BC: using guessed type int (__thiscall *MaskShader::`vftable')(void *p, char);

//----- (0044CBD0) --------------------------------------------------------
char __thiscall MaskShader::CreateStagesAndPasses(MaskShader *this)
{
  MaskShader *v1; // esi@1
  NiD3DTextureStage *v2; // edi@1
  NiTexture *v3; // ebx@1
  NiD3DTextureStageGroup *v4; // ecx@6
  NiD3DTextureStage *v5; // ebx@6
  NiTexture *v6; // edi@6
  NiPointer<NiD3DPass> *v7; // edi@11
  NiD3DPass *v8; // ecx@11
  bool v9; // zf@13
  NiD3DPass *v10; // edi@15
  NiD3DPass *v11; // eax@17
  NiD3DPass *v12; // edi@20
  NiD3DPass *v13; // edi@22
  NiD3DPass *v14; // edi@24
  NiD3DPass *v15; // edi@26
  unsigned int v16; // ebx@26
  NiD3DPass *v17; // edi@28
  NiD3DPass *v18; // edi@30
  NiD3DPass *v19; // edi@32
  NiD3DPass *v20; // edi@34
  NiD3DPass *v21; // edi@36
  NiD3DPass *v22; // edi@38
  NiD3DPass *v23; // esi@40
  NiD3DTextureStage *v24; // eax@42
  NiD3DTextureStage *v25; // eax@45
  NiPointer<NiD3DPass> result; // [sp+10h] [bp-18h]@11
  NiPointer<NiD3DTextureStage> spStage; // [sp+14h] [bp-14h]@1
  NiPointer<NiD3DTextureStage> spStage2; // [sp+18h] [bp-10h]@6
  int v30; // [sp+24h] [bp-4h]@1

  v1 = this;
  NiD3DTextureStage::CreateNewStage(&spStage);
  v2 = spStage.m_pObject;
  spStage.m_pObject->m_uiStage = 0;
  v3 = v2->m_spTexture.m_pObject;
  v30 = 0;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spTexture.m_pObject = 0;
  }
  NiD3DTextureStageGroup::SetStageState(v2->m_pkTextureStageGroup, 0xBu, 0, 0);
  v4 = v2->m_pkTextureStageGroup;
  v2->m_bTextureTransform = 1;
  NiD3DTextureStageGroup::SetStageState(v4, 0x18u, 2u, 0);
  NiD3DTextureStageGroup::SetStageState(spStage.m_pObject->m_pkTextureStageGroup, 1u, 2u, 0);
  NiD3DTextureStageGroup::SetStageState(spStage.m_pObject->m_pkTextureStageGroup, 2u, 2u, 0);
  NiD3DTextureStageGroup::SetStageState(spStage.m_pObject->m_pkTextureStageGroup, 3u, 0, 0);
  NiD3DTextureStageGroup::SetStageState(spStage.m_pObject->m_pkTextureStageGroup, 4u, 2u, 0);
  NiD3DTextureStageGroup::SetStageState(spStage.m_pObject->m_pkTextureStageGroup, 5u, 2u, 0);
  NiD3DTextureStage::SetFilterMode(spStage.m_pObject, FILTER_TRILERP);
  NiD3DTextureStage::CreateNewStage(&spStage2);
  spStage2.m_pObject->m_uiStage = 1;
  v5 = spStage2.m_pObject;
  v6 = spStage2.m_pObject->m_spTexture.m_pObject;
  LOBYTE(v30) = 1;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v5->m_spTexture.m_pObject = 0;
  }
  NiD3DTextureStageGroup::SetStageState(spStage2.m_pObject->m_pkTextureStageGroup, 0xBu, 1u, 0);
  NiD3DTextureStageGroup::SetStageState(spStage2.m_pObject->m_pkTextureStageGroup, 1u, 4u, 0);
  NiD3DTextureStageGroup::SetStageState(spStage2.m_pObject->m_pkTextureStageGroup, 2u, 2u, 0);
  NiD3DTextureStageGroup::SetStageState(spStage2.m_pObject->m_pkTextureStageGroup, 3u, 1u, 0);
  NiD3DTextureStageGroup::SetStageState(spStage2.m_pObject->m_pkTextureStageGroup, 4u, 4u, 0);
  NiD3DTextureStageGroup::SetStageState(spStage2.m_pObject->m_pkTextureStageGroup, 5u, 2u, 0);
  NiD3DTextureStageGroup::SetStageState(spStage2.m_pObject->m_pkTextureStageGroup, 6u, 1u, 0);
  v7 = NiD3DPass::CreateNewPass(&result);
  v8 = v1->m_spPassOne.m_pObject;
  LOBYTE(v30) = 2;
  if ( v8 != v7->m_pObject )
  {
    if ( v8 )
    {
      v9 = v8->m_uiRefCount-- == 1;
      if ( v9 )
        NiD3DPass::ReturnPassToPool(v8);
    }
    v10 = v7->m_pObject;
    v1->m_spPassOne.m_pObject = v10;
    if ( v10 )
      ++v10->m_uiRefCount;
  }
  v11 = result.m_pObject;
  LOBYTE(v30) = 1;
  if ( result.m_pObject )
  {
    --result.m_pObject->m_uiRefCount;
    if ( !v11->m_uiRefCount )
      NiD3DPass::ReturnPassToPool(v11);
  }
  NiD3DPass::SetStage(v1->m_spPassOne.m_pObject, v1->m_spPassOne.m_pObject->m_uiCurrentStage, spStage.m_pObject);
  NiD3DPass::SetStage(v1->m_spPassOne.m_pObject, v1->m_spPassOne.m_pObject->m_uiCurrentStage, spStage2.m_pObject);
  v12 = v1->m_spPassOne.m_pObject;
  if ( !v12->m_pkRenderStateGroup )
    v12->m_pkRenderStateGroup = NiD3DRenderStateGroup::GetFreeRenderStateGroup();
  NiD3DRenderStateGroup::SetRenderState(v12->m_pkRenderStateGroup, 0x16u, 2u, 0);
  v13 = v1->m_spPassOne.m_pObject;
  if ( !v13->m_pkRenderStateGroup )
    v13->m_pkRenderStateGroup = NiD3DRenderStateGroup::GetFreeRenderStateGroup();
  NiD3DRenderStateGroup::SetRenderState(v13->m_pkRenderStateGroup, 7u, 0, 0);
  v14 = v1->m_spPassOne.m_pObject;
  if ( !v14->m_pkRenderStateGroup )
    v14->m_pkRenderStateGroup = NiD3DRenderStateGroup::GetFreeRenderStateGroup();
  NiD3DRenderStateGroup::SetRenderState(v14->m_pkRenderStateGroup, 0xEu, 0, 0);
  v15 = v1->m_spPassOne.m_pObject;
  v16 = v1->m_bAlphaBlend;
  if ( !v15->m_pkRenderStateGroup )
    v15->m_pkRenderStateGroup = NiD3DRenderStateGroup::GetFreeRenderStateGroup();
  NiD3DRenderStateGroup::SetRenderState(v15->m_pkRenderStateGroup, 0x1Bu, v16, 0);
  v17 = v1->m_spPassOne.m_pObject;
  if ( !v17->m_pkRenderStateGroup )
    v17->m_pkRenderStateGroup = NiD3DRenderStateGroup::GetFreeRenderStateGroup();
  NiD3DRenderStateGroup::SetRenderState(v17->m_pkRenderStateGroup, 0x13u, 5u, 0);
  v18 = v1->m_spPassOne.m_pObject;
  if ( !v18->m_pkRenderStateGroup )
    v18->m_pkRenderStateGroup = NiD3DRenderStateGroup::GetFreeRenderStateGroup();
  NiD3DRenderStateGroup::SetRenderState(v18->m_pkRenderStateGroup, 0x14u, 6u, 0);
  v19 = v1->m_spPassOne.m_pObject;
  if ( !v19->m_pkRenderStateGroup )
    v19->m_pkRenderStateGroup = NiD3DRenderStateGroup::GetFreeRenderStateGroup();
  NiD3DRenderStateGroup::SetRenderState(v19->m_pkRenderStateGroup, 0x1Cu, 0, 0);
  v20 = v1->m_spPassOne.m_pObject;
  if ( !v20->m_pkRenderStateGroup )
    v20->m_pkRenderStateGroup = NiD3DRenderStateGroup::GetFreeRenderStateGroup();
  NiD3DRenderStateGroup::SetRenderState(v20->m_pkRenderStateGroup, 0x89u, 0, 0);
  v21 = v1->m_spPassOne.m_pObject;
  if ( !v21->m_pkRenderStateGroup )
    v21->m_pkRenderStateGroup = NiD3DRenderStateGroup::GetFreeRenderStateGroup();
  NiD3DRenderStateGroup::SetRenderState(v21->m_pkRenderStateGroup, 0xFu, 1u, 0);
  v22 = v1->m_spPassOne.m_pObject;
  if ( !v22->m_pkRenderStateGroup )
    v22->m_pkRenderStateGroup = NiD3DRenderStateGroup::GetFreeRenderStateGroup();
  NiD3DRenderStateGroup::SetRenderState(v22->m_pkRenderStateGroup, 0x19u, 7u, 0);
  v23 = v1->m_spPassOne.m_pObject;
  if ( !v23->m_pkRenderStateGroup )
    v23->m_pkRenderStateGroup = NiD3DRenderStateGroup::GetFreeRenderStateGroup();
  NiD3DRenderStateGroup::SetRenderState(v23->m_pkRenderStateGroup, 0x18u, 0, 0);
  v24 = spStage2.m_pObject;
  LOBYTE(v30) = 0;
  if ( spStage2.m_pObject )
  {
    --spStage2.m_pObject->m_uiRefCount;
    if ( !v24->m_uiRefCount )
      NiD3DTextureStage::ReturnStageToPool(v24);
  }
  v25 = spStage.m_pObject;
  v30 = -1;
  if ( spStage.m_pObject )
  {
    --spStage.m_pObject->m_uiRefCount;
    if ( !v25->m_uiRefCount )
      NiD3DTextureStage::ReturnStageToPool(v25);
  }
  return 1;
}

//----- (0044CFD0) --------------------------------------------------------
void __cdecl MaskShader::Terminate()
{
  void (__thiscall ***v0)(_DWORD, _DWORD); // esi@2
  void (__thiscall ***v1)(_DWORD, _DWORD); // esi@6

  if ( MaskShader::m_spShader )
  {
    v0 = (void (__thiscall ***)(_DWORD, _DWORD))MaskShader::m_spShader;
    if ( !InterlockedDecrement((volatile LONG *)(MaskShader::m_spShader + 4)) && v0 )
      (**v0)(v0, 1);
    MaskShader::m_spShader = 0;
  }
  v1 = (void (__thiscall ***)(_DWORD, _DWORD))MaskShader::m_spNoAlphaBlendShader;
  if ( MaskShader::m_spNoAlphaBlendShader )
  {
    if ( !InterlockedDecrement((volatile LONG *)(MaskShader::m_spNoAlphaBlendShader + 4)) )
    {
      if ( v1 )
        (**v1)(v1, 1);
    }
    MaskShader::m_spNoAlphaBlendShader = 0;
  }
}
// A8B9A8: using guessed type int MaskShader::m_spShader;
// A8B9AC: using guessed type int MaskShader::m_spNoAlphaBlendShader;

//----- (0044D040) --------------------------------------------------------
void __thiscall MaskShader::MaskShader(MaskShader *this, bool bEnableAlphaBlend)
{
  MaskShader *v2; // esi@1

  v2 = this;
  NiD3DDefaultShader::NiD3DDefaultShader((NiD3DDefaultShader *)&this->vfptr);
  v2->vfptr = (NiRefObjectVtbl *)&MaskShader::`vftable';
  v2->m_spPassOne.m_pObject = 0;
  v2->m_uiLinePassNum = 0;
  v2->m_bAlphaBlend = bEnableAlphaBlend;
  if ( bEnableAlphaBlend )
    NiShader::SetName((NiShaderLibrary *)v2, "SHPortrait");
  else
    NiShader::SetName((NiShaderLibrary *)v2, "SHPortrait22");
  MaskShader::CreateStagesAndPasses(v2);
  v2->m_bAlphaBlend = bEnableAlphaBlend;
}
// 97A6BC: using guessed type int (__thiscall *MaskShader::`vftable')(void *p, char);

//----- (0044D0F0) --------------------------------------------------------
signed int __thiscall MaskShader::UpdatePipeline(MaskShader *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound)
{
  MaskShader *v8; // esi@1
  NiD3DPass **v9; // edi@3
  NiProperty *v10; // ebx@3
  NiD3DTextureStage *v11; // eax@3
  NiD3DTextureStage *v12; // esi@3
  NiD3DTextureStage *v13; // eax@5
  NiD3DTextureStage *v14; // edi@5
  NiRefObjectVtbl *v15; // eax@8
  NiTexture *v16; // ebx@9
  NiTexture *v17; // edi@11
  int v18; // eax@18
  NiExtraData *v19; // eax@21
  NiRefObjectVtbl *v20; // eax@22
  bool v21; // zf@24
  NiTexturingProperty *pkTexProp; // [sp+14h] [bp-10h]@3
  NiTexturingProperty::Map *spStage2; // [sp+38h] [bp+14h]@5

  v8 = this;
  if ( !this->m_kPasses.m_uiMaxSize )
    NiTArray<NiPointer<NiD3DPass>>::SetSize(&this->m_kPasses, this->m_kPasses.m_uiGrowBy);
  v9 = &v8->m_spPassOne.m_pObject;
  NiTArray<NiPointer<NiD3DPass>>::SetAt(&v8->m_kPasses, 0, &v8->m_spPassOne);
  v8->m_uiPassCount = 1;
  v10 = pkState->m_aspProps[8].m_pObject;
  pkTexProp = (NiTexturingProperty *)pkState->m_aspProps[8].m_pObject;
  v11 = NiD3DPass::GetStage(v8->m_spPassOne.m_pObject, 0);
  v12 = v11;
  if ( v11 )
    ++v11->m_uiRefCount;
  v13 = NiD3DPass::GetStage(*v9, 1u);
  v14 = v13;
  spStage2 = (NiTexturingProperty::Map *)v13;
  if ( v13 )
    ++v13->m_uiRefCount;
  if ( v10 )
  {
    v15 = v10[1].m_spControllers.m_pObject->vfptr;
    if ( v15 )
      v16 = (NiTexture *)v15[1].__vecDelDtor;
    else
      v16 = 0;
    v17 = v12->m_spTexture.m_pObject;
    if ( v17 != v16 )
    {
      if ( v17 && !InterlockedDecrement((volatile LONG *)&v17->m_uiRefCount) && v17 )
        v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
      v12->m_spTexture.m_pObject = v16;
      if ( v16 )
        InterlockedIncrement((volatile LONG *)&v16->m_uiRefCount);
    }
    v18 = *((_DWORD *)pkTexProp->m_kMaps.m_pBase + 1);
    if ( v18 )
      NiD3DTextureStage::SetTexture(spStage2, *(NiTexture **)(v18 + 4));
    v14 = (NiD3DTextureStage *)spStage2;
  }
  v12->m_kTextureTransformation._11 = 1.0;
  v12->m_kTextureTransformation._21 = 0.0;
  v12->m_kTextureTransformation._31 = 0.0;
  v12->m_kTextureTransformation._41 = 0.0;
  v12->m_kTextureTransformation._12 = 0.0;
  v12->m_kTextureTransformation._32 = 0.0;
  v12->m_kTextureTransformation._42 = 0.0;
  v12->m_kTextureTransformation._13 = 0.0;
  v12->m_kTextureTransformation._23 = 0.0;
  v12->m_kTextureTransformation._43 = 0.0;
  v12->m_kTextureTransformation._14 = 0.0;
  v12->m_kTextureTransformation._24 = 0.0;
  v12->m_kTextureTransformation._34 = 0.0;
  v12->m_kTextureTransformation._22 = 1.0;
  v12->m_kTextureTransformation._33 = 1.0;
  v12->m_kTextureTransformation._44 = 1.0;
  v19 = NiObjectNET::GetExtraData((NiObjectNET *)&pkGeometry->vfptr, "*texmat");
  if ( v19 )
  {
    v20 = v19[1].vfptr;
    v12->m_kTextureTransformation._11 = *(float *)&v20[2].__vecDelDtor;
    v12->m_kTextureTransformation._22 = *(float *)&v20[3].__vecDelDtor;
    v12->m_kTextureTransformation._31 = *(float *)&v20->__vecDelDtor;
    v12->m_kTextureTransformation._32 = *(float *)&v20[1].__vecDelDtor;
  }
  if ( v14 )
  {
    v21 = v14->m_uiRefCount-- == 1;
    if ( v21 )
      NiD3DTextureStage::ReturnStageToPool(v14);
  }
  if ( v12 )
  {
    v21 = v12->m_uiRefCount-- == 1;
    if ( v21 )
      NiD3DTextureStage::ReturnStageToPool(v12);
  }
  return 1;
}

//----- (0044D290) --------------------------------------------------------
MaskShader *__cdecl MaskShader::GetShader()
{
  MaskShader *result; // eax@1
  NiD3DDefaultShader *v1; // eax@2
  int v2; // esi@2
  void (__thiscall ***v3)(_DWORD, _DWORD); // edi@7

  result = (MaskShader *)MaskShader::m_spShader;
  if ( !MaskShader::m_spShader )
  {
    v1 = (NiD3DDefaultShader *)operator new(0x120u);
    v2 = (int)v1;
    if ( v1 )
    {
      NiD3DDefaultShader::NiD3DDefaultShader(v1);
      *(_DWORD *)v2 = &MaskShader::`vftable';
      *(_DWORD *)(v2 + 276) = 0;
      *(_DWORD *)(v2 + 280) = 0;
      *(_BYTE *)(v2 + 284) = 1;
      NiShader::SetName((NiShaderLibrary *)v2, "SHPortrait");
      MaskShader::CreateStagesAndPasses((MaskShader *)v2);
      *(_BYTE *)(v2 + 284) = 1;
    }
    else
    {
      v2 = 0;
    }
    result = (MaskShader *)MaskShader::m_spShader;
    if ( MaskShader::m_spShader != v2 )
    {
      if ( MaskShader::m_spShader )
      {
        v3 = (void (__thiscall ***)(_DWORD, _DWORD))MaskShader::m_spShader;
        if ( !InterlockedDecrement((volatile LONG *)(MaskShader::m_spShader + 4)) )
        {
          if ( v3 )
            (**v3)(v3, 1);
        }
      }
      result = (MaskShader *)v2;
      MaskShader::m_spShader = v2;
      if ( v2 )
      {
        InterlockedIncrement((volatile LONG *)(v2 + 4));
        result = (MaskShader *)MaskShader::m_spShader;
      }
    }
  }
  return result;
}
// 97A6BC: using guessed type int (__thiscall *MaskShader::`vftable')(void *p, char);
// A8B9A8: using guessed type int MaskShader::m_spShader;

//----- (0044D3A0) --------------------------------------------------------
MaskShader *__cdecl MaskShader::GetShader_NoAlphaBlend()
{
  MaskShader *result; // eax@1
  NiD3DDefaultShader *v1; // eax@2
  int v2; // esi@2
  void (__thiscall ***v3)(_DWORD, _DWORD); // edi@7

  result = (MaskShader *)MaskShader::m_spNoAlphaBlendShader;
  if ( !MaskShader::m_spNoAlphaBlendShader )
  {
    v1 = (NiD3DDefaultShader *)operator new(0x120u);
    v2 = (int)v1;
    if ( v1 )
    {
      NiD3DDefaultShader::NiD3DDefaultShader(v1);
      *(_DWORD *)v2 = &MaskShader::`vftable';
      *(_DWORD *)(v2 + 276) = 0;
      *(_DWORD *)(v2 + 280) = 0;
      *(_BYTE *)(v2 + 284) = 0;
      NiShader::SetName((NiShaderLibrary *)v2, "SHPortrait22");
      MaskShader::CreateStagesAndPasses((MaskShader *)v2);
      *(_BYTE *)(v2 + 284) = 0;
      *(_DWORD *)v2 = &MaskShader_NoAlphaBlend::`vftable';
    }
    else
    {
      v2 = 0;
    }
    result = (MaskShader *)MaskShader::m_spNoAlphaBlendShader;
    if ( MaskShader::m_spNoAlphaBlendShader != v2 )
    {
      if ( MaskShader::m_spNoAlphaBlendShader )
      {
        v3 = (void (__thiscall ***)(_DWORD, _DWORD))MaskShader::m_spNoAlphaBlendShader;
        if ( !InterlockedDecrement((volatile LONG *)(MaskShader::m_spNoAlphaBlendShader + 4)) )
        {
          if ( v3 )
            (**v3)(v3, 1);
        }
      }
      result = (MaskShader *)v2;
      MaskShader::m_spNoAlphaBlendShader = v2;
      if ( v2 )
      {
        InterlockedIncrement((volatile LONG *)(v2 + 4));
        result = (MaskShader *)MaskShader::m_spNoAlphaBlendShader;
      }
    }
  }
  return result;
}
// 97A6BC: using guessed type int (__thiscall *MaskShader::`vftable')(void *p, char);
// 97A734: using guessed type int (__thiscall *MaskShader_NoAlphaBlend::`vftable')(void *p, char);
// A8B9AC: using guessed type int MaskShader::m_spNoAlphaBlendShader;

//----- (0044D4B0) --------------------------------------------------------
void __thiscall NiPointer<NiD3DTextureStage>::~NiPointer<NiD3DTextureStage>(NiPointer<NiD3DTextureStage> *this)
{
  NiD3DTextureStage *v1; // ecx@1
  bool v2; // zf@2

  v1 = this->m_pObject;
  if ( v1 )
  {
    v2 = v1->m_uiRefCount-- == 1;
    if ( v2 )
      NiD3DTextureStage::ReturnStageToPool(v1);
  }
}

//----- (0044D4D0) --------------------------------------------------------
void __thiscall NiPointer<NiD3DPass>::~NiPointer<NiD3DPass>(NiPointer<NiD3DPass> *this)
{
  NiD3DPass *v1; // ecx@1
  bool v2; // zf@2

  v1 = this->m_pObject;
  if ( v1 )
  {
    v2 = v1->m_uiRefCount-- == 1;
    if ( v2 )
      NiD3DPass::ReturnPassToPool(v1);
  }
}

//----- (0044D4F0) --------------------------------------------------------
void __thiscall NiTArray<NiPointer<NiD3DPass>>::SetSize(NiTArray<NiPointer<NiD3DPass> > *this, unsigned int uiMaxSize)
{
  NiTArray<NiPointer<NiD3DPass> > *v2; // esi@1
  int v3; // ebx@1
  unsigned int v4; // edx@3
  NiD3DPass **v5; // edi@4
  NiD3DPass *v6; // ecx@5
  bool v7; // zf@6
  char *v8; // eax@12
  int v9; // ecx@13
  void *v10; // eax@13
  int v11; // edi@14
  unsigned int v12; // eax@16
  NiPointer<NiD3DPass> *v13; // edi@17
  int v14; // ebx@17
  NiD3DPass *v15; // ecx@17
  NiD3DPass **v16; // edi@17
  NiD3DPass *v17; // ebx@21
  unsigned int j; // edi@24
  NiPointer<NiD3DPass> *v19; // eax@25
  NiD3DPass *v20; // ecx@25
  NiD3DPass **v21; // ebx@25
  char *v22; // esi@32
  NiPointer<NiD3DPass> *pSaveBase; // [sp+10h] [bp-10h]@12
  unsigned int i; // [sp+28h] [bp+8h]@16

  v2 = this;
  v3 = uiMaxSize;
  if ( uiMaxSize != this->m_uiMaxSize )
  {
    if ( uiMaxSize < this->m_uiSize )
    {
      v4 = uiMaxSize;
      do
      {
        v5 = &v2->m_pBase[v4].m_pObject;
        if ( *v5 )
        {
          v6 = *v5;
          if ( *v5 )
          {
            v7 = v6->m_uiRefCount-- == 1;
            if ( v7 )
            {
              NiD3DPass::ReturnPassToPool(v6);
              v4 = uiMaxSize;
            }
            *v5 = 0;
          }
          --v2->m_uiESize;
        }
        uiMaxSize = ++v4;
      }
      while ( v4 < v2->m_uiSize );
      v2->m_uiSize = v3;
    }
    v8 = (char *)v2->m_pBase;
    pSaveBase = v2->m_pBase;
    v2->m_uiMaxSize = v3;
    if ( v3 )
    {
      v9 = 4 * v3 | -((unsigned __int64)(unsigned int)v3 >> 30 != 0);
      v10 = operator new[]((v9 + 4) | -__CFADD__(v9, 4));
      if ( v10 )
      {
        v11 = (int)v10 + 4;
        *(_DWORD *)v10 = v3;
        `eh vector constructor iterator'(
          (char *)v10 + 4,
          4u,
          v3,
          (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
          (void (__thiscall *)(void *))NiPointer<NiD3DPass>::~NiPointer<NiD3DPass>);
      }
      else
      {
        v11 = 0;
      }
      v12 = 0;
      v2->m_pBase = (NiPointer<NiD3DPass> *)v11;
      i = 0;
      if ( v2->m_uiSize )
      {
        do
        {
          v13 = v2->m_pBase;
          v14 = v12;
          v15 = v13[v12].m_pObject;
          v16 = &v13[v12].m_pObject;
          if ( v15 != pSaveBase[v12].m_pObject )
          {
            if ( v15 )
            {
              v7 = v15->m_uiRefCount-- == 1;
              if ( v7 )
              {
                NiD3DPass::ReturnPassToPool(v15);
                v12 = i;
              }
            }
            v17 = pSaveBase[v14].m_pObject;
            *v16 = v17;
            if ( v17 )
              ++v17->m_uiRefCount;
          }
          i = ++v12;
        }
        while ( v12 < v2->m_uiSize );
      }
      for ( j = v2->m_uiSize; j < v2->m_uiMaxSize; ++j )
      {
        v19 = v2->m_pBase;
        v20 = v19[j].m_pObject;
        v21 = &v19[j].m_pObject;
        if ( v20 )
        {
          v7 = v20->m_uiRefCount-- == 1;
          if ( v7 )
            NiD3DPass::ReturnPassToPool(v20);
          *v21 = 0;
        }
      }
      v8 = (char *)pSaveBase;
    }
    else
    {
      v2->m_pBase = 0;
    }
    if ( v8 )
    {
      v22 = v8 - 4;
      `eh vector destructor iterator'(
        v8,
        4u,
        *((_DWORD *)v8 - 1),
        (void (__thiscall *)(void *))NiPointer<NiD3DPass>::~NiPointer<NiD3DPass>);
      operator delete[](v22);
    }
  }
}

//----- (0044D6C0) --------------------------------------------------------
void __thiscall NiTArray<NiPointer<NiD3DPass>>::SetAt(NiTArray<NiPointer<NiD3DPass> > *this, unsigned int uiIndex, NiPointer<NiD3DPass> *element)
{
  NiPointer<NiD3DPass> *v3; // edx@5
  NiPointer<NiD3DPass> *v4; // esi@10
  NiD3DPass *v5; // ecx@10
  bool v6; // zf@12
  NiD3DPass *v7; // eax@14

  if ( uiIndex < this->m_uiMaxSize )
  {
    if ( uiIndex < this->m_uiSize )
    {
      v3 = this->m_pBase;
      if ( element->m_pObject )
      {
        if ( v3[uiIndex].m_pObject == 0 )
          ++this->m_uiESize;
      }
      else if ( v3[uiIndex].m_pObject != 0 )
      {
        --this->m_uiESize;
      }
    }
    else
    {
      this->m_uiSize = uiIndex + 1;
      if ( element->m_pObject )
        ++this->m_uiESize;
    }
    v4 = &this->m_pBase[uiIndex];
    v5 = v4->m_pObject;
    if ( v4->m_pObject != element->m_pObject )
    {
      if ( v5 )
      {
        v6 = v5->m_uiRefCount-- == 1;
        if ( v6 )
          NiD3DPass::ReturnPassToPool(v5);
      }
      v7 = element->m_pObject;
      v4->m_pObject = element->m_pObject;
      if ( v7 )
        ++v7->m_uiRefCount;
    }
  }
}

//----- (0044D740) --------------------------------------------------------
void __thiscall NiD3DTextureStage::SetTexture(NiTexturingProperty::Map *this, NiTexture *pkTexture)
{
  NiTexturingProperty::Map *v2; // ebx@1
  NiTexture *v3; // esi@1

  v2 = this;
  v3 = this->m_spTexture.m_pObject;
  if ( v3 != pkTexture )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spTexture.m_pObject = pkTexture;
    if ( pkTexture )
      InterlockedIncrement((volatile LONG *)&pkTexture->m_uiRefCount);
  }
}

//----- (0044D790) --------------------------------------------------------
NiD3DTextureStage *__thiscall NiD3DPass::GetStage(NiD3DPass *this, unsigned int uiStageNum)
{
  NiD3DTextureStage *v2; // esi@2
  NiD3DTextureStage *v3; // ecx@4
  char v4; // bl@4
  bool v5; // zf@8
  unsigned int uiStageNuma; // [sp+28h] [bp+8h]@2

  if ( uiStageNum >= this->m_kStages.m_uiSize )
  {
    v3 = 0;
    uiStageNuma = 0;
    v2 = 0;
    v4 = 2;
  }
  else
  {
    v2 = this->m_kStages.m_pBase[uiStageNum].m_pObject;
    uiStageNuma = (unsigned int)v2;
    if ( v2 )
      ++v2->m_uiRefCount;
    v3 = v2;
    v4 = 1;
  }
  if ( v4 & 2 )
  {
    v4 &= 0xFDu;
    if ( v3 )
    {
      v5 = v3->m_uiRefCount-- == 1;
      if ( v5 )
        NiD3DTextureStage::ReturnStageToPool(v3);
    }
  }
  if ( v4 & 1 )
  {
    if ( v2 )
    {
      v5 = v2->m_uiRefCount-- == 1;
      if ( v5 )
        NiD3DTextureStage::ReturnStageToPool(v2);
    }
  }
  return (NiD3DTextureStage *)uiStageNuma;
}

//----- (0044D840) --------------------------------------------------------
NiRTTI *MaskShader::GetRTTI()
{
  return &MaskShader::m_RTTI;
}

//----- (0044D850) --------------------------------------------------------
bool __thiscall NiD3DShader::GetIsBestImplementation(NiD3DShaderInterface *this)
{
  return this->m_bIsBestImplementation;
}

//----- (0044D860) --------------------------------------------------------
MaskShader_NoAlphaBlend *__thiscall MaskShader_NoAlphaBlend::`scalar deleting destructor'(MaskShader_NoAlphaBlend *this, unsigned int a2)
{
  MaskShader_NoAlphaBlend *v2; // esi@1
  NiD3DPass *v3; // ecx@1
  bool v4; // zf@2
  NiD3DPass *v5; // ecx@5

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&MaskShader::`vftable';
  v3 = this->m_spPassOne.m_pObject;
  if ( v3 )
  {
    v4 = v3->m_uiRefCount-- == 1;
    if ( v4 )
      NiD3DPass::ReturnPassToPool(v3);
    v2->m_spPassOne.m_pObject = 0;
  }
  v5 = v2->m_spPassOne.m_pObject;
  if ( v5 )
  {
    v4 = v5->m_uiRefCount-- == 1;
    if ( v4 )
      NiD3DPass::ReturnPassToPool(v5);
  }
  NiD3DDefaultShader::~NiD3DDefaultShader((NiD3DDefaultShader *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97A6BC: using guessed type int (__thiscall *MaskShader::`vftable')(void *p, char);

//----- (0044D900) --------------------------------------------------------
NiRTTI *MaskShader_NoAlphaBlend::GetRTTI()
{
  return &MaskShader_NoAlphaBlend::m_RTTI;
}

//----- (0044D910) --------------------------------------------------------
void __thiscall MsgBox::SetFrameWorkMsgOnClose(MsgBox *this, PgFrameWork *pkFrameWork, PgMsg::Frame *pkFrameMsg, PgMsg::Frame *pkFrameCancelMsg)
{
  MsgBox *v4; // esi@1

  v4 = this;
  ((void (__stdcall *)(_DWORD))this->vfptr[129].__vecDelDtor)(pkFrameWork);
  if ( pkFrameMsg )
    v4->m_kFrameMsg = *pkFrameMsg;
  if ( pkFrameCancelMsg )
    v4->m_kFrameCancelMsg = *pkFrameCancelMsg;
}

//----- (0044D9A0) --------------------------------------------------------
void __thiscall MsgBox::SetFrameWorkMsgOnPrivateStore(MsgBox *this, PgFrameWork *pkFrameWork, PgMsg::Frame *pkFrameMsg, PgMsg::Frame *pkFrameCancelMsg, PgMsg::Frame *pkFrameSearchMsg, PgMsg::Frame *pkFrameCloseMsg)
{
  MsgBox *v6; // esi@1

  v6 = this;
  ((void (__stdcall *)(_DWORD))this->vfptr[129].__vecDelDtor)(pkFrameWork);
  if ( pkFrameMsg )
    v6->m_kFrameMsg = *pkFrameMsg;
  if ( pkFrameCancelMsg )
    v6->m_kFrameCancelMsg = *pkFrameCancelMsg;
  if ( pkFrameSearchMsg )
    v6->m_kFrameSearchMsg = *pkFrameSearchMsg;
  if ( pkFrameCloseMsg )
    v6->m_kFrameCloseMsg = *pkFrameCloseMsg;
}

//----- (0044DA90) --------------------------------------------------------
void __thiscall MsgBox::SetWindowMsgOnClose(MsgBox *this, PgWin *pkRevMsgWin, unsigned int uiOkMsg, unsigned int wOkParam, int lOkParam, unsigned int uiCancelMsg, unsigned int wCancelParam, int lCancelParam)
{
  this->m_pkRevMsgWinOnClose = pkRevMsgWin;
  this->m_uiOkMsg = uiOkMsg;
  this->m_wOkParam = wOkParam;
  this->m_lOkParam = lOkParam;
  this->m_uiCancelMsg = uiCancelMsg;
  this->m_wCancelParam = wCancelParam;
  this->m_lCancelParam = lCancelParam;
}

//----- (0044DAE0) --------------------------------------------------------
void __userpurge MsgBox::SetItemIconByID(MsgBox *this@<ecx>, int a2@<edi>, int nID)
{
  ItemIcon *v3; // ecx@1

  v3 = this->m_pkItemSlotWin;
  if ( v3 )
    ItemIcon::SetItemAsID(v3, a2, nID);
}

//----- (0044DB00) --------------------------------------------------------
void __thiscall MsgBox::SetUnderSlotText(MsgBox *this, char *pkText)
{
  ((void (__stdcall *)(_DWORD))this->m_pkUnderSlotTextWin.m_pObject->vfptr[118].__vecDelDtor)(pkText);
}

//----- (0044DB20) --------------------------------------------------------
void __thiscall MsgBox::OnCmdBut1(MsgBox *this)
{
  MsgBox *v1; // esi@1
  PgFrameWork *v2; // ecx@1
  PgWin *v3; // ecx@3
  unsigned int v4; // eax@4
  bool v5; // zf@6
  DirectUserMsgBody_MsgBoxResponse kBody; // [sp+8h] [bp-4h]@6

  v1 = this;
  v2 = this->m_pkFrameWork;
  if ( v2 )
  {
    PgFrameWork::AddMsg(
      v2,
      v1->m_kFrameMsg.m_uiFrameMsg,
      v1->m_kFrameMsg.m_uiFrameWParam,
      v1->m_kFrameMsg.m_uiFramelParam);
  }
  else
  {
    v3 = v1->m_pkRevMsgWinOnClose;
    if ( v3 )
    {
      v4 = v1->m_uiOkMsg;
      if ( v4 )
        PgWin::PostMsg(v3, v4, v1->m_wOkParam, v1->m_lOkParam);
    }
  }
  v5 = v1->m_pkMsgHooker == 0;
  kBody.eResponse = 0;
  if ( !v5 )
  {
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->SendDirectMessage)(27, &kBody, &v1->vfptr);
    if ( v1->m_pkMsgHooker )
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
        27,
        &kBody,
        &v1->vfptr);
  }
  v1->vfptr->DirectDispatchToParent((IDirectMessenger *)&v1->vfptr, 27, &kBody, (IDirectMessenger *)&v1->vfptr);
  MsgBox::m_bOkCheck = 1;
  PgWin::PostMsg((PgWin *)&v1->vfptr, 2u, 0, 0);
}
// A8B9B8: using guessed type bool MsgBox::m_bOkCheck;

//----- (0044DBF0) --------------------------------------------------------
void __thiscall MsgBox::OnCmdBut2(MsgBox *this)
{
  MsgBox *v1; // esi@1
  PgFrameWork *v2; // ecx@1
  PgWin *v3; // ecx@3
  unsigned int v4; // eax@4
  bool v5; // zf@6
  DirectUserMsgBody_MsgBoxResponse kBody; // [sp+8h] [bp-4h]@6

  v1 = this;
  v2 = this->m_pkFrameWork;
  if ( v2 )
  {
    PgFrameWork::AddMsg(
      v2,
      v1->m_kFrameCancelMsg.m_uiFrameMsg,
      v1->m_kFrameCancelMsg.m_uiFrameWParam,
      v1->m_kFrameCancelMsg.m_uiFramelParam);
  }
  else
  {
    v3 = v1->m_pkRevMsgWinOnClose;
    if ( v3 )
    {
      v4 = v1->m_uiCancelMsg;
      if ( v4 )
        PgWin::PostMsg(v3, v4, v1->m_wCancelParam, v1->m_lCancelParam);
    }
  }
  v5 = v1->m_pkMsgHooker == 0;
  kBody.eResponse = 1;
  if ( !v5 )
  {
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->SendDirectMessage)(27, &kBody, &v1->vfptr);
    if ( v1->m_pkMsgHooker )
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->DirectDispatchToChildren)(
        27,
        &kBody,
        &v1->vfptr);
  }
  v1->vfptr->DirectDispatchToChildren((IDirectMessenger *)&v1->vfptr, 27, &kBody, (IDirectMessenger *)&v1->vfptr);
  PgWin::PostMsg((PgWin *)&v1->vfptr, 2u, 0, 0);
}

//----- (0044DCB0) --------------------------------------------------------
void __thiscall MsgBox::OnCmdBut4(MsgBox *this)
{
  MsgBox *v1; // edi@1
  PgFrameWork *v2; // ecx@1
  bool v3; // zf@3
  DirectUserMsgBody_MsgBoxResponse kBody; // [sp+8h] [bp-4h]@3

  v1 = this;
  v2 = this->m_pkFrameWork;
  if ( v2 )
    PgFrameWork::AddMsg(
      v2,
      v1->m_kFrameCloseMsg.m_uiFrameMsg,
      v1->m_kFrameCloseMsg.m_uiFrameWParam,
      v1->m_kFrameCloseMsg.m_uiFramelParam);
  v3 = v1->m_pkMsgHooker == 0;
  kBody.eResponse = 1;
  if ( !v3 )
  {
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->SendDirectMessage)(27, &kBody, &v1->vfptr);
    if ( v1->m_pkMsgHooker )
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->DirectDispatchToChildren)(
        27,
        &kBody,
        &v1->vfptr);
  }
  v1->vfptr->DirectDispatchToChildren((IDirectMessenger *)&v1->vfptr, 27, &kBody, (IDirectMessenger *)&v1->vfptr);
  PgWin::PostMsg((PgWin *)&v1->vfptr, 2u, 0, 0);
}

//----- (0044DD40) --------------------------------------------------------
void __thiscall MsgBox::ProcessMeInput(MsgBox *this, bool *bHit)
{
  if ( g_pkKeyboard->m_aucKeystate[0] & 2 )
  {
    BYTE3(PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID)[73].m_kMsgQ.m_uiAlloced) = 0;
    switch ( this->m_eButType )
    {
      case 2:
      case 3:
      case 4:
      case 5:
      case 6:
        MsgBox::OnCmdBut4(this);
        break;
      case 1:
        MsgBox::OnCmdBut1(this);
        break;
      default:
        return;
    }
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (0044DDB0) --------------------------------------------------------
void __thiscall MsgBox::SetMsg(MsgBox *this, char *pcText)
{
  char *v2; // edi@1
  char *v3; // esi@1
  signed int v4; // ebx@1
  char *v5; // esi@5
  int v6; // eax@7
  int v7; // eax@7
  int v8; // ecx@7
  int v9; // edi@7
  signed int v10; // esi@10
  HDC__ *hDC; // [sp+Ch] [bp-110h]@5
  char *v12; // [sp+10h] [bp-10Ch]@1
  char *psrc; // [sp+14h] [bp-108h]@1
  char acStr[256]; // [sp+18h] [bp-104h]@7

  v2 = (char *)this->m_apkTextWin;
  psrc = pcText;
  v12 = (char *)this->m_apkTextWin;
  v3 = (char *)this->m_apkTextWin;
  v4 = 6;
  do
  {
    (*(void (__stdcall **)(void *))(**(_DWORD **)v3 + 472))(&unk_97A7C6);
    v3 += 4;
    --v4;
  }
  while ( v4 );
  if ( pcText && *pcText )
  {
    hDC = *(HDC__ **)((*(int (**)(void))(**(_DWORD **)v2 + 456))() + 192);
    v5 = v2;
    do
    {
      if ( !*psrc )
        break;
      v6 = (*(int (**)(void))(**(_DWORD **)v5 + 144))();
      v7 = PgUtil::StringPixelCopy(acStr, psrc, hDC, v6);
      v8 = *(_DWORD *)v5;
      v9 = v7;
      acStr[v7] = 0;
      (*(void (__stdcall **)(char *))(*(_DWORD *)v8 + 472))(acStr);
      psrc += v9;
      v2 = v12;
      ++v4;
      v5 += 4;
    }
    while ( v4 < 6 );
    if ( v4 == 1 )
    {
      (*(void (__thiscall **)(_DWORD, signed int))(**(_DWORD **)v2 + 488))(*(_DWORD *)v2, 1);
    }
    else
    {
      v10 = 6;
      do
      {
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 488))(0);
        v2 += 4;
        --v10;
      }
      while ( v10 );
    }
  }
}

//----- (0044DEF0) --------------------------------------------------------
void __thiscall MsgBox::~MsgBox(MsgBox *this)
{
  MsgBox *v1; // esi@1
  PgWinText *v2; // edi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&MsgBox::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MsgBox::`vftable'{for `IDirectMessenger'};
  v2 = this->m_pkUnderSlotTextWin.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  `eh vector destructor iterator'(
    v1->m_apkTextWin,
    4u,
    6,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 97AA18: using guessed type void (__thiscall *MsgBox::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97AA34: using guessed type int (__thiscall *MsgBox::`vftable'{for `NiNode'})(void *p, char);

//----- (0044DF90) --------------------------------------------------------
char __thiscall MsgBox::CreateOkBut(MsgBox *this, NiNode *spNode, NiSourceTexture *pkTexture)
{
  NiNode *v3; // edi@1
  MsgBox *v4; // ebx@1
  PgSprData *v5; // esi@1
  PgWinBut *v6; // eax@1
  PgWinBut *v7; // esi@1
  PgWin *v8; // ST14_4@1
  PgFont *v9; // ST10_4@1
  unsigned int v10; // ST0C_4@1
  unsigned int v11; // eax@1
  PgWinText *v12; // esi@1
  NiRefObjectVtbl *v13; // edi@1
  NiUnsharedGeometryGroup *v14; // eax@1

  v3 = spNode;
  v4 = this;
  v5 = PgSprData::Create((NiAVObject *)&spNode->vfptr, "BtnNor01", (int *)&spNode, (int *)&pkTexture, pkTexture);
  PgSprData::Add(v5, (NiAVObject *)&v3->vfptr, "BtnClick01");
  PgSprData::Add(v5, (NiAVObject *)&v3->vfptr, "BtnOver01");
  v6 = PgWinBut::CreateWin((int)spNode, (int)pkTexture, v5, (PgWin *)&v4->vfptr, 1u, 0, 0);
  v7 = v6;
  v8 = (PgWin *)v6;
  v9 = Font::Get(0);
  v10 = ((int (__thiscall *)(_DWORD))v7->vfptr[37].__vecDelDtor)(v7);
  v11 = ((int (__thiscall *)(_DWORD))v7->vfptr[36].__vecDelDtor)(v7);
  v12 = PgWinText::CreateWin(0, 0, v11, v10, v9, v8, 0, 0);
  v12->vfptr[122].__vecDelDtor((NiRefObject *)v12, 5u);
  v13 = v12->vfptr;
  v14 = TextData::Get(0x4F5F499Fu);
  v13[118].__vecDelDtor((NiRefObject *)v12, (unsigned int)v14);
  v12->vfptr[60].__vecDelDtor((NiRefObject *)v12, 0);
  return 1;
}

//----- (0044E070) --------------------------------------------------------
char __thiscall MsgBox::CreateOkCancelBut(MsgBox *this, NiNode *spNode, NiSourceTexture *pkTexture)
{
  NiNode *v3; // edi@1
  MsgBox *v4; // ebx@1
  PgSprData *v5; // esi@1
  PgWinBut *v6; // eax@1
  PgWinBut *v7; // esi@1
  PgWin *v8; // ST14_4@1
  PgFont *v9; // ST10_4@1
  unsigned int v10; // ST0C_4@1
  unsigned int v11; // eax@1
  PgWinText *v12; // esi@1
  NiRefObjectVtbl *v13; // ST2C_4@1
  NiUnsharedGeometryGroup *v14; // eax@1
  PgSprData *v15; // esi@1
  PgWinBut *v16; // eax@1
  PgWinBut *v17; // esi@1
  PgWin *v18; // ST14_4@1
  PgFont *v19; // ST10_4@1
  unsigned int v20; // ST0C_4@1
  unsigned int v21; // eax@1
  PgWinText *v22; // esi@1
  NiRefObjectVtbl *v23; // edi@1
  NiUnsharedGeometryGroup *v24; // eax@1
  int uiLeft; // [sp+10h] [bp-4h]@1

  v3 = spNode;
  v4 = this;
  v5 = PgSprData::Create((NiAVObject *)&spNode->vfptr, "BtnNor02", &uiLeft, (int *)&spNode, pkTexture);
  PgSprData::Add(v5, (NiAVObject *)&v3->vfptr, "BtnClick02");
  PgSprData::Add(v5, (NiAVObject *)&v3->vfptr, "BtnOver02");
  v6 = PgWinBut::CreateWin(uiLeft, (int)spNode, v5, (PgWin *)&v4->vfptr, 1u, 0, 0);
  v7 = v6;
  v8 = (PgWin *)v6;
  v9 = Font::Get(0);
  v10 = ((int (__thiscall *)(_DWORD))v7->vfptr[37].__vecDelDtor)(v7);
  v11 = ((int (__thiscall *)(_DWORD))v7->vfptr[36].__vecDelDtor)(v7);
  v12 = PgWinText::CreateWin(0, 0, v11, v10, v9, v8, 0, 0);
  v12->vfptr[122].__vecDelDtor((NiRefObject *)v12, 5u);
  v13 = v12->vfptr;
  v14 = TextData::Get(0x4F5F499Fu);
  v13[118].__vecDelDtor((NiRefObject *)v12, (unsigned int)v14);
  v12->vfptr[60].__vecDelDtor((NiRefObject *)v12, 0);
  v15 = PgSprData::Create((NiAVObject *)&v3->vfptr, "BtnNor03", &uiLeft, (int *)&spNode, pkTexture);
  PgSprData::Add(v15, (NiAVObject *)&v3->vfptr, "BtnClick03");
  PgSprData::Add(v15, (NiAVObject *)&v3->vfptr, "BtnOver03");
  v16 = PgWinBut::CreateWin(uiLeft, (int)spNode, v15, (PgWin *)&v4->vfptr, 2u, 0, 0);
  v17 = v16;
  v18 = (PgWin *)v16;
  v19 = Font::Get(0);
  v20 = ((int (__thiscall *)(_DWORD))v17->vfptr[37].__vecDelDtor)(v17);
  v21 = ((int (__thiscall *)(_DWORD))v17->vfptr[36].__vecDelDtor)(v17);
  v22 = PgWinText::CreateWin(0, 0, v21, v20, v19, v18, 0, 0);
  v22->vfptr[122].__vecDelDtor((NiRefObject *)v22, 5u);
  v23 = v22->vfptr;
  v24 = TextData::Get(0x88A297E1);
  v23[118].__vecDelDtor((NiRefObject *)v22, (unsigned int)v24);
  v22->vfptr[60].__vecDelDtor((NiRefObject *)v22, 0);
  return 1;
}

//----- (0044E210) --------------------------------------------------------
char __thiscall MsgBox::CreateCancelBut(MsgBox *this, NiNode *pkNode, NiSourceTexture *pkTexture)
{
  NiNode *v3; // edi@1
  MsgBox *v4; // ebx@1
  PgSprData *v5; // esi@1
  PgWinBut *v6; // eax@1
  PgWinBut *v7; // esi@1
  PgWin *v8; // ST14_4@1
  PgFont *v9; // ST10_4@1
  unsigned int v10; // ST0C_4@1
  unsigned int v11; // eax@1
  PgWinText *v12; // esi@1
  NiRefObjectVtbl *v13; // edi@1
  NiUnsharedGeometryGroup *v14; // eax@1

  v3 = pkNode;
  v4 = this;
  v5 = PgSprData::Create((NiAVObject *)&pkNode->vfptr, "BtnNor01", (int *)&pkNode, (int *)&pkTexture, pkTexture);
  PgSprData::Add(v5, (NiAVObject *)&v3->vfptr, "BtnClick01");
  PgSprData::Add(v5, (NiAVObject *)&v3->vfptr, "BtnOver01");
  v6 = PgWinBut::CreateWin((int)pkNode, (int)pkTexture, v5, (PgWin *)&v4->vfptr, 1u, 0, 0);
  v7 = v6;
  v8 = (PgWin *)v6;
  v9 = Font::Get(0);
  v10 = ((int (__thiscall *)(_DWORD))v7->vfptr[37].__vecDelDtor)(v7);
  v11 = ((int (__thiscall *)(_DWORD))v7->vfptr[36].__vecDelDtor)(v7);
  v12 = PgWinText::CreateWin(0, 0, v11, v10, v9, v8, 0, 0);
  v12->vfptr[122].__vecDelDtor((NiRefObject *)v12, 5u);
  v13 = v12->vfptr;
  v14 = TextData::Get(0x88A297E1);
  v13[118].__vecDelDtor((NiRefObject *)v12, (unsigned int)v14);
  v12->vfptr[60].__vecDelDtor((NiRefObject *)v12, 0);
  return 1;
}

//----- (0044E2F0) --------------------------------------------------------
char __thiscall MsgBox::CreateDenialCloseBut(MsgBox *this, NiNode *spNode, NiSourceTexture *pkTexture)
{
  NiNode *v3; // edi@1
  MsgBox *v4; // ebx@1
  PgSprData *v5; // esi@1
  PgWinBut *v6; // eax@1
  PgWinBut *v7; // esi@1
  PgWin *v8; // ST14_4@1
  PgFont *v9; // ST10_4@1
  unsigned int v10; // ST0C_4@1
  unsigned int v11; // eax@1
  PgWinText *v12; // esi@1
  NiRefObjectVtbl *v13; // ST2C_4@1
  NiUnsharedGeometryGroup *v14; // eax@1
  PgSprData *v15; // esi@1
  PgWinBut *v16; // eax@1
  PgWinBut *v17; // esi@1
  PgWin *v18; // ST14_4@1
  PgFont *v19; // ST10_4@1
  unsigned int v20; // ST0C_4@1
  unsigned int v21; // eax@1
  PgWinText *v22; // esi@1
  NiRefObjectVtbl *v23; // edi@1
  NiUnsharedGeometryGroup *v24; // eax@1
  int uiLeft; // [sp+10h] [bp-4h]@1

  v3 = spNode;
  v4 = this;
  v5 = PgSprData::Create((NiAVObject *)&spNode->vfptr, "BtnNor02", &uiLeft, (int *)&spNode, pkTexture);
  PgSprData::Add(v5, (NiAVObject *)&v3->vfptr, "BtnClick02");
  PgSprData::Add(v5, (NiAVObject *)&v3->vfptr, "BtnOver02");
  v6 = PgWinBut::CreateWin(uiLeft, (int)spNode, v5, (PgWin *)&v4->vfptr, 1u, 0, 0);
  v7 = v6;
  v8 = (PgWin *)v6;
  v9 = Font::Get(0);
  v10 = ((int (__thiscall *)(_DWORD))v7->vfptr[37].__vecDelDtor)(v7);
  v11 = ((int (__thiscall *)(_DWORD))v7->vfptr[36].__vecDelDtor)(v7);
  v12 = PgWinText::CreateWin(0, 0, v11, v10, v9, v8, 0, 0);
  v12->vfptr[122].__vecDelDtor((NiRefObject *)v12, 5u);
  v13 = v12->vfptr;
  v14 = TextData::Get(0x92C1BAAB);
  v13[118].__vecDelDtor((NiRefObject *)v12, (unsigned int)v14);
  v12->vfptr[60].__vecDelDtor((NiRefObject *)v12, 0);
  v15 = PgSprData::Create((NiAVObject *)&v3->vfptr, "BtnNor03", &uiLeft, (int *)&spNode, pkTexture);
  PgSprData::Add(v15, (NiAVObject *)&v3->vfptr, "BtnClick03");
  PgSprData::Add(v15, (NiAVObject *)&v3->vfptr, "BtnOver03");
  v16 = PgWinBut::CreateWin(uiLeft, (int)spNode, v15, (PgWin *)&v4->vfptr, 2u, 0, 0);
  v17 = v16;
  v18 = (PgWin *)v16;
  v19 = Font::Get(0);
  v20 = ((int (__thiscall *)(_DWORD))v17->vfptr[37].__vecDelDtor)(v17);
  v21 = ((int (__thiscall *)(_DWORD))v17->vfptr[36].__vecDelDtor)(v17);
  v22 = PgWinText::CreateWin(0, 0, v21, v20, v19, v18, 0, 0);
  v22->vfptr[122].__vecDelDtor((NiRefObject *)v22, 5u);
  v23 = v22->vfptr;
  v24 = TextData::Get(0x9AE7FBE7);
  v23[118].__vecDelDtor((NiRefObject *)v22, (unsigned int)v24);
  v22->vfptr[60].__vecDelDtor((NiRefObject *)v22, 0);
  return 1;
}

//----- (0044E490) --------------------------------------------------------
char __thiscall MsgBox::CreatePrivateStoreBut(MsgBox *this, NiNode *spNode, NiSourceTexture *pkTexture)
{
  NiNode *v3; // esi@1
  MsgBox *v4; // ebx@1
  PgSprData *v5; // edi@1
  PgWinBut *v6; // eax@1
  PgWinBut *v7; // edi@1
  PgWin *v8; // ST14_4@1
  PgFont *v9; // ST10_4@1
  unsigned int v10; // ST0C_4@1
  unsigned int v11; // eax@1
  PgWinText *v12; // edi@1
  NiRefObjectVtbl *v13; // ST2C_4@1
  NiUnsharedGeometryGroup *v14; // eax@1
  PgSprData *v15; // edi@1
  PgWinBut *v16; // eax@1
  PgWinBut *v17; // edi@1
  PgWin *v18; // ST14_4@1
  PgFont *v19; // ST10_4@1
  unsigned int v20; // ST0C_4@1
  unsigned int v21; // eax@1
  PgWinText *v22; // edi@1
  NiRefObjectVtbl *v23; // ST2C_4@1
  NiUnsharedGeometryGroup *v24; // eax@1
  PgSprData *v25; // edi@1
  PgWinBut *v26; // eax@1
  PgWin *v27; // edi@1
  char *v28; // eax@1
  PgFont *v29; // ST10_4@1
  unsigned int v30; // ST0C_4@1
  unsigned int v31; // eax@1
  PgWinText *v32; // edi@1
  NiRefObjectVtbl *v33; // ST2C_4@1
  NiUnsharedGeometryGroup *v34; // eax@1
  PgSprData *v35; // edi@1
  PgWinBut *v36; // eax@1
  PgWinBut *v37; // esi@1
  PgWin *v38; // ST14_4@1
  PgFont *v39; // ST10_4@1
  unsigned int v40; // ST0C_4@1
  unsigned int v41; // eax@1
  PgWinText *v42; // esi@1
  NiRefObjectVtbl *v43; // edi@1
  NiUnsharedGeometryGroup *v44; // eax@1
  int uiLeft; // [sp+10h] [bp-4h]@1

  v3 = spNode;
  v4 = this;
  v5 = PgSprData::Create((NiAVObject *)&spNode->vfptr, "BtnNor06", &uiLeft, (int *)&spNode, pkTexture);
  PgSprData::Add(v5, (NiAVObject *)&v3->vfptr, "BtnClick06");
  PgSprData::Add(v5, (NiAVObject *)&v3->vfptr, "BtnOver06");
  v6 = PgWinBut::CreateWin(uiLeft, (int)spNode, v5, (PgWin *)&v4->vfptr, 1u, 0, 0);
  v7 = v6;
  v8 = (PgWin *)v6;
  v9 = Font::Get(0);
  v10 = ((int (__thiscall *)(_DWORD))v7->vfptr[37].__vecDelDtor)(v7);
  v11 = ((int (__thiscall *)(_DWORD))v7->vfptr[36].__vecDelDtor)(v7);
  v12 = PgWinText::CreateWin(0, 0, v11, v10, v9, v8, 0, 0);
  v12->vfptr[122].__vecDelDtor((NiRefObject *)v12, 5u);
  v13 = v12->vfptr;
  v14 = TextData::Get(0x425FA2A9u);
  v13[118].__vecDelDtor((NiRefObject *)v12, (unsigned int)v14);
  v12->vfptr[60].__vecDelDtor((NiRefObject *)v12, 0);
  v15 = PgSprData::Create((NiAVObject *)&v3->vfptr, "BtnNor07", &uiLeft, (int *)&spNode, pkTexture);
  PgSprData::Add(v15, (NiAVObject *)&v3->vfptr, "BtnClick07");
  PgSprData::Add(v15, (NiAVObject *)&v3->vfptr, "BtnOver07");
  v16 = PgWinBut::CreateWin(uiLeft, (int)spNode, v15, (PgWin *)&v4->vfptr, 2u, 0, 0);
  v17 = v16;
  v18 = (PgWin *)v16;
  v19 = Font::Get(0);
  v20 = ((int (__thiscall *)(_DWORD))v17->vfptr[37].__vecDelDtor)(v17);
  v21 = ((int (__thiscall *)(_DWORD))v17->vfptr[36].__vecDelDtor)(v17);
  v22 = PgWinText::CreateWin(0, 0, v21, v20, v19, v18, 0, 0);
  v22->vfptr[122].__vecDelDtor((NiRefObject *)v22, 5u);
  v23 = v22->vfptr;
  v24 = TextData::Get(0x53AB9599u);
  v23[118].__vecDelDtor((NiRefObject *)v22, (unsigned int)v24);
  v22->vfptr[60].__vecDelDtor((NiRefObject *)v22, 0);
  v25 = PgSprData::Create((NiAVObject *)&v3->vfptr, "BtnNor08", &uiLeft, (int *)&spNode, pkTexture);
  PgSprData::Add(v25, (NiAVObject *)&v3->vfptr, "BtnClick08");
  PgSprData::Add(v25, (NiAVObject *)&v3->vfptr, "BtnOver08");
  v26 = PgWinBut::CreateWin(uiLeft, (int)spNode, v25, (PgWin *)&v4->vfptr, 3u, 0, 0);
  v27 = (PgWin *)v26;
  v26->m_pkToolTipWin = g_pkToolTipWin;
  v28 = (char *)TextData3::Get(0x150C5652u);
  PgWin::SetToolTipWinText(v27, v28);
  v29 = Font::Get(0);
  v30 = ((int (__thiscall *)(_DWORD))v27->vfptr[37].__vecDelDtor)(v27);
  v31 = ((int (__thiscall *)(_DWORD))v27->vfptr[36].__vecDelDtor)(v27);
  v32 = PgWinText::CreateWin(0, 0, v31, v30, v29, v27, 0, 0);
  v32->vfptr[122].__vecDelDtor((NiRefObject *)v32, 5u);
  v33 = v32->vfptr;
  v34 = TextData3::Get(0xE37156Cu);
  v33[118].__vecDelDtor((NiRefObject *)v32, (unsigned int)v34);
  v32->vfptr[60].__vecDelDtor((NiRefObject *)v32, 0);
  v35 = PgSprData::Create((NiAVObject *)&v3->vfptr, "BtnNor09", &uiLeft, (int *)&spNode, pkTexture);
  PgSprData::Add(v35, (NiAVObject *)&v3->vfptr, "BtnClick09");
  PgSprData::Add(v35, (NiAVObject *)&v3->vfptr, "BtnOver09");
  v36 = PgWinBut::CreateWin(uiLeft, (int)spNode, v35, (PgWin *)&v4->vfptr, 4u, 0, 0);
  v37 = v36;
  v38 = (PgWin *)v36;
  v39 = Font::Get(0);
  v40 = ((int (__thiscall *)(_DWORD))v37->vfptr[37].__vecDelDtor)(v37);
  v41 = ((int (__thiscall *)(_DWORD))v37->vfptr[36].__vecDelDtor)(v37);
  v42 = PgWinText::CreateWin(0, 0, v41, v40, v39, v38, 0, 0);
  v42->vfptr[122].__vecDelDtor((NiRefObject *)v42, 5u);
  v43 = v42->vfptr;
  v44 = TextData::Get(0x88A297E1);
  v43[118].__vecDelDtor((NiRefObject *)v42, (unsigned int)v44);
  v42->vfptr[60].__vecDelDtor((NiRefObject *)v42, 0);
  return 1;
}

//----- (0044E7D0) --------------------------------------------------------
char __thiscall MsgBox::CreateAgreeRefusal(MsgBox *this, NiNode *spNode, NiSourceTexture *pkTexture)
{
  NiNode *v3; // edi@1
  MsgBox *v4; // ebx@1
  PgSprData *v5; // esi@1
  PgWinBut *v6; // eax@1
  PgWinBut *v7; // esi@1
  PgWin *v8; // ST14_4@1
  PgFont *v9; // ST10_4@1
  unsigned int v10; // ST0C_4@1
  unsigned int v11; // eax@1
  PgWinText *v12; // esi@1
  NiRefObjectVtbl *v13; // ST2C_4@1
  NiUnsharedGeometryGroup *v14; // eax@1
  PgSprData *v15; // esi@1
  PgWinBut *v16; // eax@1
  PgWinBut *v17; // esi@1
  PgWin *v18; // ST14_4@1
  PgFont *v19; // ST10_4@1
  unsigned int v20; // ST0C_4@1
  unsigned int v21; // eax@1
  PgWinText *v22; // esi@1
  NiRefObjectVtbl *v23; // edi@1
  NiUnsharedGeometryGroup *v24; // eax@1
  int uiLeft; // [sp+10h] [bp-4h]@1

  v3 = spNode;
  v4 = this;
  v5 = PgSprData::Create((NiAVObject *)&spNode->vfptr, "BtnNor02", &uiLeft, (int *)&spNode, pkTexture);
  PgSprData::Add(v5, (NiAVObject *)&v3->vfptr, "BtnClick02");
  PgSprData::Add(v5, (NiAVObject *)&v3->vfptr, "BtnOver02");
  v6 = PgWinBut::CreateWin(uiLeft, (int)spNode, v5, (PgWin *)&v4->vfptr, 1u, 0, 0);
  v7 = v6;
  v8 = (PgWin *)v6;
  v9 = Font::Get(0);
  v10 = ((int (__thiscall *)(_DWORD))v7->vfptr[37].__vecDelDtor)(v7);
  v11 = ((int (__thiscall *)(_DWORD))v7->vfptr[36].__vecDelDtor)(v7);
  v12 = PgWinText::CreateWin(0, 0, v11, v10, v9, v8, 0, 0);
  v12->vfptr[122].__vecDelDtor((NiRefObject *)v12, 5u);
  v13 = v12->vfptr;
  v14 = TextData::Get(0x4B512F76u);
  v13[118].__vecDelDtor((NiRefObject *)v12, (unsigned int)v14);
  v12->vfptr[60].__vecDelDtor((NiRefObject *)v12, 0);
  v15 = PgSprData::Create((NiAVObject *)&v3->vfptr, "BtnNor03", &uiLeft, (int *)&spNode, pkTexture);
  PgSprData::Add(v15, (NiAVObject *)&v3->vfptr, "BtnClick03");
  PgSprData::Add(v15, (NiAVObject *)&v3->vfptr, "BtnOver03");
  v16 = PgWinBut::CreateWin(uiLeft, (int)spNode, v15, (PgWin *)&v4->vfptr, 2u, 0, 0);
  v17 = v16;
  v18 = (PgWin *)v16;
  v19 = Font::Get(0);
  v20 = ((int (__thiscall *)(_DWORD))v17->vfptr[37].__vecDelDtor)(v17);
  v21 = ((int (__thiscall *)(_DWORD))v17->vfptr[36].__vecDelDtor)(v17);
  v22 = PgWinText::CreateWin(0, 0, v21, v20, v19, v18, 0, 0);
  v22->vfptr[122].__vecDelDtor((NiRefObject *)v22, 5u);
  v23 = v22->vfptr;
  v24 = TextData::Get(0x5B916E95u);
  v23[118].__vecDelDtor((NiRefObject *)v22, (unsigned int)v24);
  v22->vfptr[60].__vecDelDtor((NiRefObject *)v22, 0);
  return 1;
}

//----- (0044E970) --------------------------------------------------------
char __thiscall MsgBox::CreateSearching(MsgBox *this, NiNode *spNode, NiSourceTexture *pkTexture)
{
  NiNode *v3; // edi@1
  MsgBox *v4; // ebx@1
  PgSprData *v5; // esi@1
  PgWinBut *v6; // eax@1
  PgWinBut *v7; // esi@1
  PgWin *v8; // ST14_4@1
  PgFont *v9; // ST10_4@1
  unsigned int v10; // ST0C_4@1
  unsigned int v11; // eax@1
  PgWinText *v12; // esi@1
  NiRefObjectVtbl *v13; // edi@1
  NiUnsharedGeometryGroup *v14; // eax@1

  v3 = spNode;
  v4 = this;
  v5 = PgSprData::Create((NiAVObject *)&spNode->vfptr, "BtnNor01", (int *)&spNode, (int *)&pkTexture, pkTexture);
  PgSprData::Add(v5, (NiAVObject *)&v3->vfptr, "BtnClick01");
  PgSprData::Add(v5, (NiAVObject *)&v3->vfptr, "BtnOver01");
  v6 = PgWinBut::CreateWin((int)spNode, (int)pkTexture, v5, (PgWin *)&v4->vfptr, 1u, 0, 0);
  v7 = v6;
  v8 = (PgWin *)v6;
  v9 = Font::Get(0);
  v10 = ((int (__thiscall *)(_DWORD))v7->vfptr[37].__vecDelDtor)(v7);
  v11 = ((int (__thiscall *)(_DWORD))v7->vfptr[36].__vecDelDtor)(v7);
  v12 = PgWinText::CreateWin(0, 0, v11, v10, v9, v8, 0, 0);
  v12->vfptr[122].__vecDelDtor((NiRefObject *)v12, 5u);
  v13 = v12->vfptr;
  v14 = TextData3::Get(0x7C76B0C9u);
  v13[118].__vecDelDtor((NiRefObject *)v12, (unsigned int)v14);
  v12->vfptr[60].__vecDelDtor((NiRefObject *)v12, 0);
  return 1;
}

//----- (0044EA80) --------------------------------------------------------
void __thiscall MsgBox::OnCmdBut3(MsgBox *this)
{
  MsgBox *v1; // esi@1
  MarketSearchWin *v2; // ecx@2
  int v3; // esi@4
  NiUnsharedGeometryGroup *v4; // edi@4
  PgFrameWork *v5; // ecx@8
  PgWin *v6; // ecx@10
  unsigned int v7; // eax@11
  bool v8; // zf@13
  DirectUserMsgBody_MsgBoxResponse kBody; // [sp+8h] [bp-4h]@13

  v1 = this;
  if ( this->m_eButType != 4
    || (v2 = (MarketSearchWin *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID)[141].m_kMsgQ.m_uiAlloced) == 0
    || (unsigned __int8)MarketSearchWin::DelayTimeCheck(v2) )
  {
    v5 = v1->m_pkFrameWork;
    if ( v5 )
    {
      PgFrameWork::AddMsg(
        v5,
        v1->m_kFrameSearchMsg.m_uiFrameMsg,
        v1->m_kFrameSearchMsg.m_uiFrameWParam,
        v1->m_kFrameSearchMsg.m_uiFramelParam);
    }
    else
    {
      v6 = v1->m_pkRevMsgWinOnClose;
      if ( v6 )
      {
        v7 = v1->m_uiCancelMsg;
        if ( v7 )
          PgWin::PostMsg(v6, v7, v1->m_wCancelParam, v1->m_lCancelParam);
      }
    }
    v8 = v1->m_pkMsgHooker == 0;
    kBody.eResponse = 1;
    if ( !v8 )
    {
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->SendDirectMessage)(27, &kBody, &v1->vfptr);
      if ( v1->m_pkMsgHooker )
        ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->DirectDispatchToChildren)(
          27,
          &kBody,
          &v1->vfptr);
    }
    v1->vfptr->DirectDispatchToChildren((IDirectMessenger *)&v1->vfptr, 27, &kBody, (IDirectMessenger *)&v1->vfptr);
    PgWin::PostMsg((PgWin *)&v1->vfptr, 2u, 0, 0);
  }
  else
  {
    v3 = (int)&v1->vfptr;
    v4 = TextData3::Get(0xE40B203C);
    if ( *(_DWORD *)(v3 + 4) )
    {
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v3 + 4) + 4))(25, v4, v3);
      if ( *(_DWORD *)(v3 + 4) )
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v3 + 4) + 20))(25, v4, v3);
    }
    (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v3 + 20))(v3, 25, v4, v3);
  }
}

//----- (0044EBC0) --------------------------------------------------------
void __thiscall MsgBox::MsgBox(MsgBox *this)
{
  MsgBox *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&MsgBox::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MsgBox::`vftable'{for `IDirectMessenger'};
  `eh vector constructor iterator'(
    v1->m_apkTextWin,
    4u,
    6,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_pkUnderSlotTextWin.m_pObject = 0;
  v1->m_pkRevMsgWinOnClose = 0;
}
// 97AA18: using guessed type void (__thiscall *MsgBox::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97AA34: using guessed type int (__thiscall *MsgBox::`vftable'{for `NiNode'})(void *p, char);

//----- (0044EC50) --------------------------------------------------------
void __thiscall MsgBox::OnCommand(MsgBox *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 1u:
      MsgBox::OnCmdBut1(this);
      break;
    case 2u:
      MsgBox::OnCmdBut2(this);
      break;
    case 3u:
      MsgBox::OnCmdBut3(this);
      break;
    case 4u:
      MsgBox::OnCmdBut4(this);
      break;
    default:
      return;
  }
}

//----- (0044ECA0) --------------------------------------------------------
MsgBox *__cdecl MsgBox::CreateWin(MsgBox::ButType eBut)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  MsgBox *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1E8u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    MsgBox::MsgBox((MsgBox *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, eBut) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (MsgBox *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (0044EDD0) --------------------------------------------------------
MsgBox *MsgBox::Modal(MsgBox::ButType eBut, char *pcFormat, ...)
{
  MsgBox *result; // eax@1
  MsgBox *v3; // esi@1
  char pcText[512]; // [sp+4h] [bp-204h]@2
  va_list va; // [sp+218h] [bp+10h]@1

  va_start(va, pcFormat);
  result = MsgBox::CreateWin(eBut);
  v3 = result;
  if ( result )
  {
    vsprintf(pcText, pcFormat, va);
    MsgBox::SetMsg(v3, pcText);
    PgWinMgr::DoModal(&Pgg_kWinMgr, (PgWin *)&v3->vfptr, 0, 0, 0);
    result = v3;
  }
  return result;
}

//----- (0044EE40) --------------------------------------------------------
MsgBox *MsgBox::Modeless(MsgBox::ButType eBut, char *pcFormat, ...)
{
  MsgBox *result; // eax@1
  MsgBox *v3; // esi@1
  char pcText[512]; // [sp+4h] [bp-204h]@2
  va_list va; // [sp+218h] [bp+10h]@1

  va_start(va, pcFormat);
  result = MsgBox::CreateWin(eBut);
  v3 = result;
  if ( result )
  {
    vsprintf(pcText, pcFormat, va);
    MsgBox::SetMsg(v3, pcText);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
    result = v3;
  }
  return result;
}

//----- (0044EEB0) --------------------------------------------------------
char __thiscall MsgBox::CreateRandomOption(MsgBox *this, NiNode *spNode, NiSourceTexture *pkTexture)
{
  NiNode *v3; // edi@1
  MsgBox *v4; // esi@1
  PgSprData *v5; // ebx@1
  PgWinBut *v6; // eax@1
  PgWinBut *v7; // ebx@1
  PgWin *v8; // ST2C_4@1
  PgFont *v9; // ST28_4@1
  unsigned int v10; // ST24_4@1
  unsigned int v11; // eax@1
  PgWinText *v12; // ebx@1
  NiUnsharedGeometryGroup *v13; // eax@1
  PgSprData *v14; // ebx@1
  PgWinBut *v15; // eax@1
  PgWinBut *v16; // ebx@1
  PgWin *v17; // ST2C_4@1
  PgFont *v18; // ST28_4@1
  unsigned int v19; // ST24_4@1
  unsigned int v20; // eax@1
  PgWinText *v21; // ebx@1
  NiUnsharedGeometryGroup *v22; // eax@1
  PgSprData *v23; // eax@1
  ItemIcon *v24; // eax@1
  ItemInfo *v25; // eax@1
  char result; // al@1
  PgFont *v27; // eax@2
  PgWinText *v28; // eax@2
  PgWinText *v29; // edi@2
  PgWinText *v30; // ebx@2
  unsigned int uiWidth; // [sp+Ch] [bp-10h]@1
  unsigned int uiHeight; // [sp+10h] [bp-Ch]@1
  NiRefObjectVtbl *v33; // [sp+14h] [bp-8h]@1
  int iLeft; // [sp+18h] [bp-4h]@1

  v3 = spNode;
  v4 = this;
  v5 = PgSprData::Create((NiAVObject *)&spNode->vfptr, "BtnNor02", &iLeft, (int *)&spNode, pkTexture);
  PgSprData::Add(v5, (NiAVObject *)&v3->vfptr, "BtnClick02");
  PgSprData::Add(v5, (NiAVObject *)&v3->vfptr, "BtnOver02");
  v6 = PgWinBut::CreateWin(iLeft, (int)spNode, v5, (PgWin *)&v4->vfptr, 1u, 0, 0);
  v7 = v6;
  v8 = (PgWin *)v6;
  v9 = Font::Get(0);
  v10 = ((int (__thiscall *)(_DWORD))v7->vfptr[37].__vecDelDtor)(v7);
  v11 = ((int (__thiscall *)(_DWORD))v7->vfptr[36].__vecDelDtor)(v7);
  v12 = PgWinText::CreateWin(0, 0, v11, v10, v9, v8, 0, 0);
  v12->vfptr[122].__vecDelDtor((NiRefObject *)v12, 5u);
  v33 = v12->vfptr;
  v13 = TextData::Get(0x4F5F499Fu);
  v33[118].__vecDelDtor((NiRefObject *)v12, (unsigned int)v13);
  v12->vfptr[60].__vecDelDtor((NiRefObject *)v12, 0);
  v14 = PgSprData::Create((NiAVObject *)&v3->vfptr, "BtnNor03", &iLeft, (int *)&spNode, pkTexture);
  PgSprData::Add(v14, (NiAVObject *)&v3->vfptr, "BtnClick03");
  PgSprData::Add(v14, (NiAVObject *)&v3->vfptr, "BtnOver03");
  v15 = PgWinBut::CreateWin(iLeft, (int)spNode, v14, (PgWin *)&v4->vfptr, 2u, 0, 0);
  v16 = v15;
  v17 = (PgWin *)v15;
  v18 = Font::Get(0);
  v19 = ((int (__thiscall *)(_DWORD))v16->vfptr[37].__vecDelDtor)(v16);
  v20 = ((int (__thiscall *)(_DWORD))v16->vfptr[36].__vecDelDtor)(v16);
  v21 = PgWinText::CreateWin(0, 0, v20, v19, v18, v17, 0, 0);
  v21->vfptr[122].__vecDelDtor((NiRefObject *)v21, 5u);
  v33 = v21->vfptr;
  v22 = TextData::Get(0x88A297E1);
  v33[118].__vecDelDtor((NiRefObject *)v21, (unsigned int)v22);
  v21->vfptr[60].__vecDelDtor((NiRefObject *)v21, 0);
  v23 = PgSprData::Create((NiAVObject *)&v3->vfptr, "ItemSlot", &iLeft, (int *)&spNode, pkTexture);
  PgWinSpr::CreateWin(iLeft, (int)spNode, v23, 0, 0, 0);
  v24 = ItemIcon::CreateWin(iLeft + 1, (int)&spNode->vfptr + 1, (PgWin *)&v4->vfptr);
  v4->m_pkItemSlotWin = v24;
  v24->vfptr[60].__vecDelDtor((NiRefObject *)v24, 0);
  ((void (__stdcall *)(_DWORD))v4->m_pkItemSlotWin->vfptr[64].__vecDelDtor)(1);
  v25 = ItemInfoTab::GetByInxName("RandomOption");
  ItemIcon::SetItemAsID(v4->m_pkItemSlotWin, (int)v3, v25->ID);
  v4->m_pkItemSlotWin->vfptr->SetMessageNum((IDirectMessenger *)&v4->m_pkItemSlotWin->vfptr, 0);
  result = PgUtil::GetTriShapeRect((NiAVObject *)&v3->vfptr, "Text01", &iLeft, (int *)&spNode, &uiWidth, &uiHeight);
  if ( result )
  {
    v27 = Font::Get(0);
    v28 = PgWinText::CreateWin(iLeft, (int)spNode, uiWidth, uiHeight, v27, (PgWin *)&v4->vfptr, 0, 0);
    v29 = v4->m_pkUnderSlotTextWin.m_pObject;
    v30 = v28;
    if ( v29 != v28 )
    {
      if ( v29 && !InterlockedDecrement((volatile LONG *)&v29->m_uiRefCount) && v29 )
        v29->vfptr->__vecDelDtor((NiRefObject *)v29, 1u);
      v4->m_pkUnderSlotTextWin.m_pObject = v30;
      if ( v30 )
        InterlockedIncrement((volatile LONG *)&v30->m_uiRefCount);
    }
    ((void (__stdcall *)(_DWORD))v4->m_pkUnderSlotTextWin.m_pObject->vfptr[122].__vecDelDtor)(5);
    ((void (__stdcall *)(_DWORD))v4->m_pkUnderSlotTextWin.m_pObject->vfptr[118].__vecDelDtor)("-");
    v4->m_pkUnderSlotTextWin.m_pObject->vfptr[60].__vecDelDtor((NiRefObject *)v4->m_pkUnderSlotTextWin.m_pObject, 0);
    result = 1;
  }
  return result;
}

//----- (0044F1C0) --------------------------------------------------------
char __thiscall MsgBox::Create(MsgBox *this, MsgBox::ButType eBut)
{
  MsgBox *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  char result; // al@6
  NiTexturePalette *v5; // ebx@7
  const char *v6; // eax@9
  PgSprData *v7; // eax@10
  NiNode *v8; // esi@11
  NiSourceTexture *v9; // eax@16
  PgSprData *v10; // eax@17
  PgWinSpr *v11; // eax@19
  PgFont *v12; // eax@21
  unsigned int v13; // edi@23
  PgFont *v14; // ST10_4@23
  unsigned int v15; // ST0C_4@23
  int v16; // eax@23
  PgWinText *v17; // eax@23
  PgWinText *v18; // edi@23
  PgWinText *v19; // ebx@23
  void *(__thiscall *v20)(NiRefObject *, unsigned int); // edx@40
  NiNode *v21; // eax@40
  NiNode *v22; // esi@41
  PgFont *pkFont; // [sp+24h] [bp-28h]@21
  int i; // [sp+28h] [bp-24h]@21
  int uiLeft; // [sp+2Ch] [bp-20h]@10
  int uiTop; // [sp+30h] [bp-1Ch]@10
  NiPointer<PgWinText> *v27; // [sp+34h] [bp-18h]@21
  NiSourceTexture *pkTexture; // [sp+38h] [bp-14h]@1
  NiPointer<NiNode> spNode; // [sp+3Ch] [bp-10h]@1
  int v30; // [sp+48h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v30 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  pkTexture = v3;
  if ( !v3 )
  {
    v30 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( spNode.m_pObject )
        spNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spNode.m_pObject, 1u);
    }
    return 0;
  }
  v5 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = Folder::Merge(&Folder::m_acMenu, "Game\\MessageWin.nif");
  PgUtil::LoadNodeNifFile(v6, &spNode, v5);
  if ( !spNode.m_pObject )
    return 0;
  v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, v3);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v7, 0, 0, 0, 0) )
  {
    v9 = MenuTexMgr::GetTexture(0x13u);
    if ( v9 )
      v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v9);
    else
      v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
    v11 = PgWinSpr::CreateWin(uiLeft, uiTop, v10, (PgWin *)&v2->vfptr, 0, 0);
    if ( v11 )
      v11->vfptr[60].__vecDelDtor((NiRefObject *)v11, 0);
    v12 = Font::Get(0);
    pkFont = v12;
    i = 0;
    v27 = v2->m_apkTextWin;
    while ( 1 )
    {
      v13 = v12->m_uiDefHeight;
      v14 = v12;
      v15 = v12->m_uiDefHeight;
      v16 = ((int (__thiscall *)(MsgBox *))v2->vfptr[36].__vecDelDtor)(v2);
      v17 = PgWinText::CreateWin(8, i * (v13 + 1) + 8, v16 - 16, v15, v14, (PgWin *)&v2->vfptr, 0, 0);
      v18 = v27->m_pObject;
      v19 = v17;
      if ( v27->m_pObject != v17 )
      {
        if ( v18 && !InterlockedDecrement((volatile LONG *)&v18->m_uiRefCount) && v18 )
          v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
        v27->m_pObject = v19;
        if ( v19 )
          InterlockedIncrement((volatile LONG *)&v19->m_uiRefCount);
      }
      ((void (__stdcall *)(_DWORD))v27->m_pObject->vfptr[60].__vecDelDtor)(0);
      ++v27;
      if ( ++i >= 6 )
        break;
      v12 = pkFont;
    }
    switch ( eBut )
    {
      case 1:
        MsgBox::CreateOkBut(v2, spNode.m_pObject, pkTexture);
        break;
      case 3:
        MsgBox::CreateCancelBut(v2, spNode.m_pObject, pkTexture);
        break;
      case 2:
        MsgBox::CreateOkCancelBut(v2, spNode.m_pObject, pkTexture);
        break;
      case 4:
        MsgBox::CreatePrivateStoreBut(v2, spNode.m_pObject, pkTexture);
        break;
      case 5:
        MsgBox::CreateDenialCloseBut(v2, spNode.m_pObject, pkTexture);
        break;
      case 6:
        MsgBox::CreateAgreeRefusal(v2, spNode.m_pObject, pkTexture);
        break;
      case 7:
        MsgBox::CreateSearching(v2, spNode.m_pObject, pkTexture);
        break;
      case 8:
        MsgBox::CreateRandomOption(v2, spNode.m_pObject, pkTexture);
        break;
      default:
        break;
    }
    v20 = v2->vfptr[59].__vecDelDtor;
    v2->m_eButType = eBut;
    ((void (__thiscall *)(MsgBox *, unsigned int, unsigned int, _DWORD, _DWORD))v20)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    v2->vfptr[129].__vecDelDtor((NiRefObject *)v2, 0);
    v21 = spNode.m_pObject;
    v2->m_pkRevMsgWinOnClose = 0;
    v2->m_uiOkMsg = 0;
    v2->m_wOkParam = 0;
    v2->m_lOkParam = 0;
    v2->m_uiCancelMsg = 0;
    v2->m_wCancelParam = 0;
    v2->m_lCancelParam = 0;
    v30 = -1;
    if ( v21 )
    {
      v22 = v21;
      if ( !InterlockedDecrement((volatile LONG *)&v21->m_uiRefCount) )
      {
        if ( v22 )
          v22->vfptr->__vecDelDtor((NiRefObject *)v22, 1u);
      }
    }
    result = 1;
  }
  else
  {
    v8 = spNode.m_pObject;
    v30 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v8 )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0044F570) --------------------------------------------------------
MsgBox *__thiscall MsgBox::`scalar deleting destructor'(MsgBox *this, unsigned int a2)
{
  MsgBox *v2; // esi@1

  v2 = this;
  MsgBox::~MsgBox(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0044F5A0) --------------------------------------------------------
PgWinProxy *__thiscall PgWinProxy::`scalar deleting destructor'(PgWinProxy *this, unsigned int a2)
{
  PgWinProxy *v2; // esi@1

  v2 = this;
  PgWin::~PgWin((PgWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0044F5D0) --------------------------------------------------------
void __thiscall PgWinProxy::OnCommand(PgWinProxy *this, unsigned int wParam, int lParam)
{
  PgWin *v3; // eax@1

  v3 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v3 )
    PgWin::PostCommandMsg(v3, wParam, lParam);
}

//----- (0044F600) --------------------------------------------------------
void __thiscall PgWinProxy::OnEditEnd(PgWinProxy *this, unsigned int wParam, int lParam)
{
  PgWin *v3; // eax@1

  v3 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v3 )
    PgWin::PostMsg(v3, 4u, wParam, lParam);
}

//----- (0044F630) --------------------------------------------------------
PgWinProxy *__cdecl PgWinProxy::CreateWin(PgWin *pkParent)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  PgWinProxy *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x120u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWin::PgWin(v1);
    v2->vfptr = (NiRefObjectVtbl *)&PgWinProxy::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&PgWinProxy::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, _DWORD, _DWORD, signed int, signed int, PgWin *, _DWORD, _DWORD))v2->vfptr[84].__vecDelDtor)(
                          v2,
                          0,
                          0,
                          1,
                          1,
                          pkParent,
                          0,
                          0) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (PgWinProxy *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 97AC58: using guessed type void (__thiscall *PgWinProxy::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97AC74: using guessed type int (__thiscall *PgWinProxy::`vftable'{for `NiNode'})(void *p, char);

//----- (0044F780) --------------------------------------------------------
PgWinProxy *__cdecl PgWinProxy::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent)
{
  PgWin *v5; // eax@1
  PgWin *v6; // esi@1
  PgWin *v7; // edi@8
  PgWinProxy *v8; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v10; // [sp+20h] [bp-4h]@1

  v5 = (PgWin *)operator new(0x120u);
  v6 = v5;
  result.m_pObject = v5;
  v10 = 0;
  if ( v5 )
  {
    PgWin::PgWin(v5);
    v6->vfptr = (NiRefObjectVtbl *)&PgWinProxy::`vftable'{for `NiNode'};
    v6->vfptr = (IDirectMessengerVtbl *)&PgWinProxy::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v6 = 0;
  }
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v10 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v6);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, unsigned int, PgWin *, _DWORD, _DWORD))v6->vfptr[84].__vecDelDtor)(
                          v6,
                          iXPos,
                          iYPos,
                          uiWidth,
                          uiHeight,
                          pkParent,
                          0,
                          0) )
  {
    ((void (__thiscall *)(PgWin *))v6->vfptr[89].__vecDelDtor)(v6);
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = (PgWinProxy *)v6;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v6);
    if ( result.m_pObject )
    {
      v7 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      }
    }
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = 0;
  }
  return v8;
}
// 97AC58: using guessed type void (__thiscall *PgWinProxy::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97AC74: using guessed type int (__thiscall *PgWinProxy::`vftable'{for `NiNode'})(void *p, char);

//----- (0044F8D0) --------------------------------------------------------
void __thiscall SlideBar::SlideBar(SlideBar *this)
{
  SlideBar *v1; // esi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->m_nSplitCnt = 0;
  v1->m_nCurPos = 0;
  v1->m_eType = 0;
  v1->m_pkSlidePoint = 0;
  v1->m_pkSlide = 0;
  v1->vfptr = (NiRefObjectVtbl *)&SlideBar::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&SlideBar::`vftable'{for `IDirectMessenger'};
  v1->m_uiClickMsg = -1;
  v1->m_uiID = -1;
}
// 97AE68: using guessed type void (__thiscall *SlideBar::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97AE84: using guessed type int (__thiscall *SlideBar::`vftable'{for `NiNode'})(void *p, char);

//----- (0044F920) --------------------------------------------------------
void __thiscall SlideBar::~SlideBar(SlideBar *this)
{
  this->vfptr = (NiRefObjectVtbl *)&SlideBar::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SlideBar::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
}
// 97AE68: using guessed type void (__thiscall *SlideBar::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97AE84: using guessed type int (__thiscall *SlideBar::`vftable'{for `NiNode'})(void *p, char);

//----- (0044F940) --------------------------------------------------------
void __thiscall SlideBar::SetCurPos(SlideBar *this, int nPos)
{
  int v2; // eax@1
  SlideBar *v3; // esi@1
  int v4; // ecx@1
  PgWinSpr *v5; // ecx@5
  int v6; // edi@5
  int v7; // ebx@5
  SlideBar::Type v8; // ecx@7
  signed int v9; // edx@7
  signed int v10; // eax@7
  PgWinSpr *v11; // esi@11
  int nLeft; // [sp+Ch] [bp-8h]@5
  int nTop; // [sp+10h] [bp-4h]@5
  int fSplitLength; // [sp+1Ch] [bp+8h]@5
  float fSplitLengtha; // [sp+1Ch] [bp+8h]@8
  float fSplitLengthb; // [sp+1Ch] [bp+8h]@8
  float fSplitLengthc; // [sp+1Ch] [bp+8h]@10
  float fSplitLengthd; // [sp+1Ch] [bp+8h]@10

  v2 = nPos;
  v3 = this;
  v4 = this->m_nSplitCnt;
  if ( nPos >= v4 )
    v2 = v4 - 1;
  if ( v2 < 0 )
    v2 = 0;
  v5 = v3->m_pkSlide;
  v3->m_nCurPos = v2;
  nLeft = ((int (*)(void))v5->vfptr[48].__vecDelDtor)();
  ((void (*)(void))v3->m_pkSlide->vfptr[49].__vecDelDtor)();
  nTop = ((int (*)(void))v3->m_pkSlide->vfptr[50].__vecDelDtor)();
  ((void (*)(void))v3->m_pkSlide->vfptr[51].__vecDelDtor)();
  v6 = ((int (*)(void))v3->m_pkSlide->vfptr[36].__vecDelDtor)();
  v7 = ((int (*)(void))v3->m_pkSlide->vfptr[37].__vecDelDtor)();
  fSplitLength = v3->m_nSplitCnt - 1;
  if ( v3->m_nSplitCnt == 1 )
    fSplitLength = 1;
  v8 = v3->m_eType;
  v9 = 0;
  v10 = 0;
  if ( v8 )
  {
    if ( v8 == 1 )
    {
      fSplitLengthc = (double)(v7 - ((int (*)(void))v3->m_pkSlidePoint->vfptr[37].__vecDelDtor)())
                    / (double)fSplitLength;
      fSplitLengthd = (double)v3->m_nCurPos * fSplitLengthc;
      v10 = (signed int)(fSplitLengthd + (double)nTop);
      v9 = nLeft;
    }
  }
  else
  {
    fSplitLengtha = (double)(v6 - ((int (*)(void))v3->m_pkSlidePoint->vfptr[36].__vecDelDtor)()) / (double)fSplitLength;
    fSplitLengthb = (double)v3->m_nCurPos * fSplitLengtha;
    v9 = (signed int)(fSplitLengthb + (double)nLeft);
    v10 = nTop;
  }
  v11 = v3->m_pkSlidePoint;
  if ( v11 )
    ((void (__thiscall *)(PgWinSpr *, signed int, signed int))v11->vfptr[77].__vecDelDtor)(v11, v9, v10);
}

//----- (0044FA90) --------------------------------------------------------
void __thiscall SlideBar::SetSplitCnt(SlideBar *this, int nSplitCnt)
{
  int v2; // ST00_4@1

  v2 = this->m_nCurPos;
  this->m_nSplitCnt = nSplitCnt;
  SlideBar::SetCurPos(this, v2);
}

//----- (0044FAB0) --------------------------------------------------------
void __thiscall SlideBar::SendMessageToParent(SlideBar *this)
{
  SlideBar *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::SendMsg(v2, 5u, v1->m_uiClickMsg, v1->m_uiID);
}

//----- (0044FAE0) --------------------------------------------------------
void __thiscall SlideBar::OnSlideBar(SlideBar *this)
{
  SlideBar *v1; // esi@1
  int v2; // edi@1
  int v3; // ebx@1
  void *(__thiscall *v4)(NiRefObject *, unsigned int); // eax@2
  SlideBar::Type v5; // eax@2
  double v6; // st7@3
  int v7; // eax@7
  PgWin *v8; // eax@7
  int nWidth; // [sp+Ch] [bp-10h]@1
  float fSlidePos; // [sp+10h] [bp-Ch]@1
  int nPosY; // [sp+14h] [bp-8h]@2
  int nPosX; // [sp+18h] [bp-4h]@2

  v1 = this;
  v2 = ((int (*)(void))this->m_pkSlide->vfptr[48].__vecDelDtor)();
  ((void (*)(void))v1->m_pkSlide->vfptr[49].__vecDelDtor)();
  v3 = ((int (*)(void))v1->m_pkSlide->vfptr[50].__vecDelDtor)();
  ((void (*)(void))v1->m_pkSlide->vfptr[51].__vecDelDtor)();
  nWidth = ((int (*)(void))v1->m_pkSlide->vfptr[36].__vecDelDtor)();
  fSlidePos = COERCE_FLOAT(((int (*)(void))v1->m_pkSlide->vfptr[37].__vecDelDtor)());
  if ( (unsigned __int8)((int (__stdcall *)(unsigned int, int))v1->m_pkSlide->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY) )
  {
    v4 = v1->vfptr[56].__vecDelDtor;
    nPosX = PgWin::ms_iMsX;
    nPosY = PgWin::ms_iMsY;
    ((void (__thiscall *)(SlideBar *, int *, int *))v4)(v1, &nPosX, &nPosY);
    v5 = v1->m_eType;
    if ( v5 )
    {
      if ( v5 != 1 )
        goto LABEL_7;
      v6 = (double)(nPosY - v3) / (double)SLODWORD(fSlidePos);
    }
    else
    {
      v6 = (double)(nPosX - v2) / (double)nWidth;
    }
    fSlidePos = v6;
LABEL_7:
    v7 = (signed int)((double)v1->m_nSplitCnt * fSlidePos);
    v1->m_nCurPos = v7;
    SlideBar::SetCurPos(v1, v7);
    v8 = PgWin::GetParentWin((PgWin *)&v1->vfptr);
    if ( v8 )
      PgWin::SendMsg(v8, 5u, v1->m_uiClickMsg, v1->m_uiID);
  }
}

//----- (0044FC20) --------------------------------------------------------
void __thiscall SlideBar::OnClick1(SlideBar *this)
{
  SlideBar *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  SlideBar::SetCurPos(this, this->m_nCurPos - 1);
  v2 = PgWin::GetParentWin((PgWin *)&v1->vfptr);
  if ( v2 )
    PgWin::SendMsg(v2, 5u, v1->m_uiClickMsg, v1->m_uiID);
}

//----- (0044FC60) --------------------------------------------------------
void __thiscall SlideBar::OnClick2(SlideBar *this)
{
  SlideBar *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  SlideBar::SetCurPos(this, this->m_nCurPos + 1);
  v2 = PgWin::GetParentWin((PgWin *)&v1->vfptr);
  if ( v2 )
    PgWin::SendMsg(v2, 5u, v1->m_uiClickMsg, v1->m_uiID);
}

//----- (0044FCA0) --------------------------------------------------------
void __thiscall SlideBar::OnMouseEvent(SlideBar *this, PgWin::PG_MOUSE_EVENT eMouseEvent, PgWin *pkWin)
{
  SlideBar *v3; // esi@1

  v3 = this;
  if ( PgWin::IsVisible((PgWin *)&this->vfptr) && pkWin == (PgWin *)v3->m_pkSlide && eMouseEvent == PGME_LBUTTONDOWN )
  {
    if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v3->vfptr[61].__vecDelDtor)(v3) )
      SlideBar::OnSlideBar(v3);
  }
}

//----- (0044FCE0) --------------------------------------------------------
void __thiscall SlideBar::OnCommand(SlideBar *this, unsigned int wParam, int lParam)
{
  SlideBar *v3; // esi@1
  int v4; // eax@3
  PgWin *v5; // eax@5

  v3 = this;
  if ( wParam )
  {
    if ( wParam != 1 )
      return;
    v4 = this->m_nCurPos + 1;
  }
  else
  {
    v4 = this->m_nCurPos - 1;
  }
  SlideBar::SetCurPos(this, v4);
  v5 = PgWin::GetParentWin((PgWin *)&v3->vfptr);
  if ( v5 )
    PgWin::SendMsg(v5, 5u, v3->m_uiClickMsg, v3->m_uiID);
}

//----- (0044FD30) --------------------------------------------------------
char __thiscall SlideBar::Create(SlideBar *this, NiNode *pNode, char *pName, char *pName1, char *pName2, PgSprData *pkMovePoint, unsigned int uiID, PgWin *pkParent)
{
  SlideBar *v8; // esi@1
  NiAVObject *v9; // eax@1
  NiProperty *v10; // eax@1
  NiRefObjectVtbl *v11; // eax@3
  PgSprData *v12; // eax@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v13; // eax@6
  const char *v14; // eax@8
  PgSprData *v15; // ebx@10
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v16; // eax@10
  const char *v17; // eax@12
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v18; // eax@14
  const char *v19; // eax@16
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v20; // eax@18
  const char *v21; // eax@20
  PgSprData *v22; // ebx@22
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v23; // eax@22
  const char *v24; // eax@24
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v25; // eax@26
  const char *v26; // eax@28
  PgWinSpr *v27; // eax@30
  NiPointer<NiTexturingProperty> spTexProp; // [sp+1Ch] [bp-74h]@1
  NiSourceTexture *pkTexture; // [sp+20h] [bp-70h]@4
  int uiTop; // [sp+24h] [bp-6Ch]@4
  int uiLeft; // [sp+28h] [bp-68h]@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strName; // [sp+2Ch] [bp-64h]@6
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+48h] [bp-48h]@6
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strResult; // [sp+64h] [bp-2Ch]@6
  int v36; // [sp+8Ch] [bp-4h]@3

  v8 = this;
  PgWin::AttachChildWin(pkParent, (PgWin *)&this->vfptr);
  v8->vfptr[43].__vecDelDtor((NiRefObject *)v8, 0);
  v8->vfptr[44].__vecDelDtor((NiRefObject *)v8, 0);
  v8->vfptr[38].__vecDelDtor((NiRefObject *)v8, 0);
  v8->vfptr[39].__vecDelDtor((NiRefObject *)v8, 0);
  v8->vfptr[35].__vecDelDtor((NiRefObject *)v8, (unsigned int)&unk_97AE38);
  v8->vfptr[75].__vecDelDtor((NiRefObject *)v8, 0);
  v8->vfptr[60].__vecDelDtor((NiRefObject *)v8, 1u);
  v8->vfptr[64].__vecDelDtor((NiRefObject *)v8, 1u);
  v8->m_uiID = uiID;
  v9 = (NiAVObject *)pNode->vfptr[18].__vecDelDtor((NiRefObject *)pNode, (unsigned int)pName);
  v10 = NiAVObject::GetProperty(v9, 8);
  spTexProp.m_pObject = (NiTexturingProperty *)v10;
  if ( v10 )
  {
    InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
    v10 = (NiProperty *)spTexProp.m_pObject;
  }
  v11 = v10[1].m_spControllers.m_pObject->vfptr;
  v36 = 0;
  if ( v11 )
  {
    pkTexture = (NiSourceTexture *)v11[1].__vecDelDtor;
    v12 = PgSprData::Create((NiAVObject *)&pNode->vfptr, pName, &uiLeft, &uiTop, pkTexture);
  }
  else
  {
    pkTexture = 0;
    v12 = PgSprData::Create((NiAVObject *)&pNode->vfptr, pName, &uiLeft, &uiTop, 0);
  }
  v8->m_pkSlide = PgWinSpr::CreateWin(uiLeft, uiTop, v12, (PgWin *)&v8->vfptr, 0, 0);
  strResult._Myres = 15;
  strResult._Mysize = 0;
  strResult._Bx._Buf[0] = 0;
  strName._Myres = 15;
  strName._Mysize = 0;
  strName._Bx._Buf[0] = 0;
  LOBYTE(v36) = 2;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strName, pName1, strlen(pName1));
  v13 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&result, &strName, off_97AE3C);
  LOBYTE(v36) = 3;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strResult, v13);
  LOBYTE(v36) = 2;
  if ( result._Myres >= 0x10 )
    operator delete(result._Bx._Ptr);
  v14 = strResult._Bx._Ptr;
  if ( strResult._Myres < 0x10 )
    v14 = (const char *)&strResult;
  v15 = PgSprData::Create((NiAVObject *)&pNode->vfptr, v14, &uiLeft, &uiTop, pkTexture);
  v16 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&result, &strName, "Click");
  LOBYTE(v36) = 4;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strResult, v16);
  LOBYTE(v36) = 2;
  if ( result._Myres >= 0x10 )
    operator delete(result._Bx._Ptr);
  v17 = strResult._Bx._Ptr;
  if ( strResult._Myres < 0x10 )
    v17 = (const char *)&strResult;
  PgSprData::Add(v15, (NiAVObject *)&pNode->vfptr, v17);
  v18 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&result, &strName, "Over");
  LOBYTE(v36) = 5;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strResult, v18);
  LOBYTE(v36) = 2;
  if ( result._Myres >= 0x10 )
    operator delete(result._Bx._Ptr);
  v19 = strResult._Bx._Ptr;
  if ( strResult._Myres < 0x10 )
    v19 = (const char *)&strResult;
  PgSprData::Add(v15, (NiAVObject *)&pNode->vfptr, v19);
  PgWinBut::CreateWin(uiLeft, uiTop, v15, (PgWin *)&v8->vfptr, 0, 0, 0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strName, pName2, strlen(pName2));
  v20 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&result, &strName, off_97AE50);
  LOBYTE(v36) = 6;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strResult, v20);
  LOBYTE(v36) = 2;
  if ( result._Myres >= 0x10 )
    operator delete(result._Bx._Ptr);
  v21 = strResult._Bx._Ptr;
  if ( strResult._Myres < 0x10 )
    v21 = (const char *)&strResult;
  v22 = PgSprData::Create((NiAVObject *)&pNode->vfptr, v21, &uiLeft, &uiTop, pkTexture);
  v23 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&result, &strName, "Click");
  LOBYTE(v36) = 7;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strResult, v23);
  LOBYTE(v36) = 2;
  if ( result._Myres >= 0x10 )
    operator delete(result._Bx._Ptr);
  v24 = strResult._Bx._Ptr;
  if ( strResult._Myres < 0x10 )
    v24 = (const char *)&strResult;
  PgSprData::Add(v22, (NiAVObject *)&pNode->vfptr, v24);
  v25 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&result, &strName, "Over");
  LOBYTE(v36) = 8;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strResult, v25);
  LOBYTE(v36) = 2;
  if ( result._Myres >= 0x10 )
    operator delete(result._Bx._Ptr);
  v26 = strResult._Bx._Ptr;
  result._Myres = 15;
  result._Mysize = 0;
  result._Bx._Buf[0] = 0;
  if ( strResult._Myres < 0x10 )
    v26 = (const char *)&strResult;
  PgSprData::Add(v22, (NiAVObject *)&pNode->vfptr, v26);
  PgWinBut::CreateWin(uiLeft, uiTop, v22, (PgWin *)&v8->vfptr, 1u, 0, 0);
  v27 = PgWinSpr::CreateWin(0, 0, pkMovePoint, (PgWin *)&v8->vfptr, 0, 0);
  v8->m_pkSlidePoint = v27;
  v27->vfptr[60].__vecDelDtor((NiRefObject *)v27, 0);
  SlideBar::SetCurPos(v8, 0);
  if ( strName._Myres >= 0x10 )
    operator delete(strName._Bx._Ptr);
  strName._Myres = 15;
  strName._Mysize = 0;
  strName._Bx._Buf[0] = 0;
  if ( strResult._Myres >= 0x10 )
    operator delete(strResult._Bx._Ptr);
  strResult._Myres = 15;
  strResult._Mysize = 0;
  strResult._Bx._Buf[0] = 0;
  v36 = -1;
  if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
    spTexProp.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spTexProp.m_pObject, 1u);
  return 1;
}

//----- (004501A0) --------------------------------------------------------
SlideBar *__cdecl SlideBar::CreateWin(NiNode *pNode, char *pName, char *pName1, char *pName2, PgSprData *pkMovePoint, unsigned int uiID, PgWin *pkParent)
{
  PgWin *v7; // eax@1
  PgWin *v8; // esi@1
  PgWin *v9; // edi@8
  SlideBar *v10; // eax@14
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v12; // [sp+20h] [bp-4h]@1

  v7 = (PgWin *)operator new(0x13Cu);
  v8 = v7;
  result.m_pObject = v7;
  v12 = 0;
  if ( v7 )
  {
    PgWin::PgWin(v7);
    v8->vfptr = (NiRefObjectVtbl *)&SlideBar::`vftable'{for `NiNode'};
    v8->vfptr = (IDirectMessengerVtbl *)&SlideBar::`vftable'{for `IDirectMessenger'};
    v8[1].m_pcName = 0;
    v8[1].m_spControllers.m_pObject = 0;
    v8[1].m_ppkExtra = 0;
    v8[1].m_uiMaxSize = -1;
    v8[1].m_uiExtraDataSize = -1;
    v8[1].m_uiRefCount = 0;
    v8[1].vfptr = 0;
  }
  else
  {
    v8 = 0;
  }
  if ( v8 )
    InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  v12 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v8);
  if ( SlideBar::Create((SlideBar *)v8, pNode, pName, pName1, pName2, pkMovePoint, uiID, pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v8->vfptr[89].__vecDelDtor)(v8);
    v12 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v10 = (SlideBar *)v8;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v8);
    if ( result.m_pObject )
    {
      v9 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v9 )
          v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      }
    }
    v12 = -1;
    if ( v8 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
        v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    }
    v10 = 0;
  }
  return v10;
}
// 97AE68: using guessed type void (__thiscall *SlideBar::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97AE84: using guessed type int (__thiscall *SlideBar::`vftable'{for `NiNode'})(void *p, char);

//----- (00450320) --------------------------------------------------------
SlideBar *__thiscall SlideBar::`scalar deleting destructor'(SlideBar *this, unsigned int a2)
{
  SlideBar *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&SlideBar::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SlideBar::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97AE68: using guessed type void (__thiscall *SlideBar::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97AE84: using guessed type int (__thiscall *SlideBar::`vftable'{for `NiNode'})(void *p, char);

//----- (00450360) --------------------------------------------------------
int __stdcall SlideListWin::GetFontSize(unsigned int uiIndex, int nSize)
{
  return 0;
}

//----- (00450370) --------------------------------------------------------
char __thiscall SlideListWin::ListItem::SetData(SlideListWin::ListItem *this, unsigned int dwData)
{
  this->m_dwData = dwData;
  return 1;
}

//----- (00450380) --------------------------------------------------------
char __thiscall SlideListWin::ListItem::GetData(SlideListWin::ListItem *this, unsigned int *dwData)
{
  *dwData = this->m_dwData;
  return 1;
}

//----- (00450390) --------------------------------------------------------
signed int __thiscall ColumnBut::GetTextWinSize(ColumnBut *this)
{
  return this->m_vecTextWin._Mylast - this->m_vecTextWin._Myfirst;
}

//----- (004503A0) --------------------------------------------------------
char __thiscall ColumnBut::SetFontSize(ColumnBut *this, unsigned int uiIndex, int nSize)
{
  char result; // al@2
  PgWinText *v4; // edi@3
  NiRefObjectVtbl *v5; // esi@3
  PgFont *v6; // eax@3

  if ( uiIndex < this->m_vecTextWin._Mylast - this->m_vecTextWin._Myfirst )
  {
    v4 = this->m_vecTextWin._Myfirst[uiIndex];
    v5 = v4->vfptr;
    v6 = Font::Get((Font::Type)nSize);
    v5[113].__vecDelDtor((NiRefObject *)v4, (unsigned int)v6);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (004503F0) --------------------------------------------------------
char __thiscall ColumnBut::SetFontColor(ColumnBut *this, unsigned int uiIndex, int r, int g, int b)
{
  char result; // al@2

  if ( uiIndex < this->m_vecTextWin._Mylast - this->m_vecTextWin._Myfirst )
  {
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))this->m_vecTextWin._Myfirst[uiIndex]->vfptr[116].__vecDelDtor)(
      r,
      g,
      b,
      255);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00450440) --------------------------------------------------------
char __thiscall ColumnBut::AlignText(ColumnBut *this, unsigned int uiIndex, unsigned int uiDrawFormat)
{
  char result; // al@2

  if ( uiIndex < this->m_vecTextWin._Mylast - this->m_vecTextWin._Myfirst )
  {
    ((void (__stdcall *)(_DWORD))this->m_vecTextWin._Myfirst[uiIndex]->vfptr[122].__vecDelDtor)(uiDrawFormat);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00450480) --------------------------------------------------------
void __thiscall ColumnBut::SetText(ColumnBut *this, unsigned int uiIndex, const char *szString)
{
  if ( uiIndex < this->m_vecTextWin._Mylast - this->m_vecTextWin._Myfirst )
    ((void (__stdcall *)(_DWORD))this->m_vecTextWin._Myfirst[uiIndex]->vfptr[118].__vecDelDtor)(szString);
}

//----- (004504C0) --------------------------------------------------------
void __thiscall ColumnBut::SetButShow(ColumnBut *this, PgWinBut::ButShow eShow)
{
  void *(__thiscall *v2)(NiRefObject *, unsigned int); // edx@4

  if ( this->m_eButShow != eShow )
  {
    this->m_eButShow = eShow;
    switch ( eShow )
    {
      case 0:
        goto $LN10_4;
      case 4:
        v2 = this->vfptr[123].__vecDelDtor;
        if ( this->m_uiButNum <= 1 )
          goto LABEL_5;
        ((void (__stdcall *)(_DWORD))v2)(1);
        break;
      case 2:
        v2 = this->vfptr[123].__vecDelDtor;
        if ( this->m_uiButNum <= 2 )
LABEL_5:
          ((void (__stdcall *)(_DWORD))v2)(0);
        else
          ((void (__stdcall *)(_DWORD))v2)(2);
        break;
      case 3:
        if ( this->m_uiButNum <= 3 )
$LN10_4:
          ((void (__stdcall *)(_DWORD))this->vfptr[123].__vecDelDtor)(0);
        else
          ((void (__stdcall *)(_DWORD))this->vfptr[123].__vecDelDtor)(3);
        break;
      default:
        return;
    }
  }
}

//----- (00450560) --------------------------------------------------------
void __thiscall ColumnBut::ProcessMeInput(ColumnBut *this, bool *bHit)
{
  ColumnBut *v2; // esi@1

  v2 = this;
  PgWinLRBut::ProcessMeInput((PgWinLRBut *)&this->vfptr, bHit);
  if ( v2->m_bCheck )
    v2->vfptr[138].__vecDelDtor((NiRefObject *)v2, 4u);
}

//----- (00450590) --------------------------------------------------------
signed int __thiscall SlideListWin::GetItemSize(SlideListWin *this)
{
  return this->m_arrListItem._Mylast - this->m_arrListItem._Myfirst;
}

//----- (004505A0) --------------------------------------------------------
char __thiscall SlideListWin::SetData(SlideListWin *this, unsigned int uiIndex, unsigned int dwData)
{
  char result; // al@2

  if ( uiIndex < this->m_arrListItem._Mylast - this->m_arrListItem._Myfirst )
  {
    this->m_arrListItem._Myfirst[uiIndex].px->m_dwData = dwData;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (004505E0) --------------------------------------------------------
char __thiscall SlideListWin::GetData(SlideListWin *this, unsigned int uiColumn, unsigned int *dwData)
{
  char result; // al@2

  if ( uiColumn < this->m_arrListItem._Mylast - this->m_arrListItem._Myfirst )
  {
    *dwData = this->m_arrListItem._Myfirst[uiColumn].px->m_dwData;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00450620) --------------------------------------------------------
void __thiscall SlideListWin::SetToolTipWin(SlideListWin *this, PgWin *pkToolTipWin)
{
  unsigned int v2; // eax@1
  ColumnBut *v3; // edx@2

  v2 = 0;
  if ( this->m_vecButList._Mylast - this->m_vecButList._Myfirst )
  {
    do
    {
      v3 = this->m_vecButList._Myfirst[v2];
      if ( v3 )
        v3->m_pkToolTipWin = pkToolTipWin;
      ++v2;
    }
    while ( v2 < this->m_vecButList._Mylast - this->m_vecButList._Myfirst );
  }
}

//----- (00450670) --------------------------------------------------------
void __thiscall SlideListWin::SetToolTipWinText(SlideListWin *this, int nItemIndex, char *pcText)
{
  ColumnBut *v3; // ecx@2

  if ( this->m_vecButList._Mylast - this->m_vecButList._Myfirst > nItemIndex )
  {
    v3 = this->m_vecButList._Myfirst[nItemIndex];
    if ( v3 )
    {
      if ( v3->m_pkToolTipWin )
        PgWin::SetToolTipWinText((PgWin *)&v3->vfptr, pcText);
    }
  }
}

//----- (004506B0) --------------------------------------------------------
ColumnBut *__thiscall SlideListWin::GetColumn(SlideListWin *this, unsigned int iItemIndex, unsigned int uiColumn)
{
  ColumnBut *result; // eax@2

  if ( iItemIndex < this->m_arrListItem._Mylast - this->m_arrListItem._Myfirst
    && this->m_arrListItem._Myfirst[iItemIndex].px
    && iItemIndex < this->m_vecButList._Mylast - this->m_vecButList._Myfirst )
  {
    result = this->m_vecButList._Myfirst[iItemIndex];
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00450700) --------------------------------------------------------
unsigned int __thiscall SlideListWin::GetCurSelIndex(SlideListWin *this)
{
  unsigned int result; // eax@1
  unsigned int v2; // edx@1
  boost::shared_ptr<SlideListWin::ListItem> *v3; // esi@2

  result = 0;
  v2 = this->m_arrListItem._Mylast - this->m_arrListItem._Myfirst;
  if ( v2 )
  {
    v3 = this->m_arrListItem._Myfirst;
    while ( !v3->px || !v3->px->m_bCheck )
    {
      ++result;
      ++v3;
      if ( result >= v2 )
        goto LABEL_6;
    }
  }
  else
  {
LABEL_6:
    result = -1;
  }
  return result;
}

//----- (00450740) --------------------------------------------------------
char __thiscall SlideListWin::SetCurSelIndex(SlideListWin *this, int nSelIndex)
{
  int v2; // eax@1
  unsigned int v3; // edx@3
  SlideListWin::ListItem *v4; // eax@4
  SlideListWin::ListItem *v5; // eax@8
  char result; // al@9

  v2 = this->m_arrListItem._Mylast - this->m_arrListItem._Myfirst;
  if ( nSelIndex >= v2 && nSelIndex >= 0 )
    goto LABEL_13;
  v3 = 0;
  if ( v2 )
  {
    do
    {
      v4 = this->m_arrListItem._Myfirst[v3].px;
      if ( v4 )
        v4->m_bCheck = 0;
      ++v3;
    }
    while ( v3 < this->m_arrListItem._Mylast - this->m_arrListItem._Myfirst );
  }
  if ( nSelIndex >= 0 && (v5 = this->m_arrListItem._Myfirst[nSelIndex].px) != 0 )
  {
    v5->m_bCheck = 1;
    result = 1;
  }
  else
  {
LABEL_13:
    result = 0;
  }
  return result;
}

//----- (004507B0) --------------------------------------------------------
signed int __thiscall SLWCreateInfo::GetItemCnt(SLWCreateInfo *this)
{
  return this->m_arrItem._Mylast - this->m_arrItem._Myfirst;
}

//----- (004507C0) --------------------------------------------------------
SLWCreateInfo::Item *__thiscall SLWCreateInfo::GetItemInfo(SLWCreateInfo *this, int nIndex)
{
  SLWCreateInfo::Item *result; // eax@2

  if ( nIndex < this->m_arrItem._Mylast - this->m_arrItem._Myfirst )
    result = this->m_arrItem._Myfirst[nIndex].px;
  else
    result = 0;
  return result;
}

//----- (004507F0) --------------------------------------------------------
signed int __thiscall SlideListWin::ListItem::GetColumnSize(SlideListWin::ListItem *this)
{
  return this->m_vecColumn._Mylast - this->m_vecColumn._Myfirst;
}

//----- (00450810) --------------------------------------------------------
char __thiscall SlideListWin::ListItem::SetFontSize(SlideListWin::ListItem *this, unsigned int uiColumn, int nSize)
{
  char result; // al@2

  if ( uiColumn < this->m_vecColumn._Mylast - this->m_vecColumn._Myfirst )
  {
    this->m_vecColumn._Myfirst[uiColumn].m_nFontSize = nSize;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00450850) --------------------------------------------------------
char __thiscall SlideListWin::ListItem::SetFontColor(SlideListWin::ListItem *this, unsigned int uiColumn, int r, int g, int b)
{
  char result; // al@2
  unsigned int v6; // eax@3

  if ( uiColumn < this->m_vecColumn._Mylast - this->m_vecColumn._Myfirst )
  {
    v6 = 6 * uiColumn;
    this->m_vecColumn._Myfirst[8 * v6 / 0x30].m_r = r;
    this->m_vecColumn._Myfirst[8 * v6 / 0x30].m_g = g;
    this->m_vecColumn._Myfirst[8 * v6 / 0x30].m_b = b;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (004508B0) --------------------------------------------------------
char __thiscall SlideListWin::ListItem::AlignText(SlideListWin::ListItem *this, unsigned int uiColumn, unsigned int uiDrawFormat)
{
  char result; // al@2

  if ( uiColumn < this->m_vecColumn._Mylast - this->m_vecColumn._Myfirst )
  {
    this->m_vecColumn._Myfirst[uiColumn].m_uiAlignText = uiDrawFormat;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (004508F0) --------------------------------------------------------
char __thiscall SlideListWin::ListItem::GetAlignText(SlideListWin::ListItem *this, unsigned int uiColumn, unsigned int *uiDrawFormat)
{
  char result; // al@2

  if ( uiColumn < this->m_vecColumn._Mylast - this->m_vecColumn._Myfirst )
  {
    *uiDrawFormat = this->m_vecColumn._Myfirst[uiColumn].m_uiAlignText;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00450930) --------------------------------------------------------
char __thiscall SlideListWin::ListItem::GetFontSize(SlideListWin::ListItem *this, unsigned int uiColumn, int *nSize)
{
  char result; // al@2

  if ( uiColumn < this->m_vecColumn._Mylast - this->m_vecColumn._Myfirst )
  {
    *nSize = this->m_vecColumn._Myfirst[uiColumn].m_nFontSize;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00450970) --------------------------------------------------------
char __thiscall SlideListWin::ListItem::GetFontColor(SlideListWin::ListItem *this, unsigned int uiColumn, int *r, int *g, int *b)
{
  char result; // al@2

  if ( uiColumn < this->m_vecColumn._Mylast - this->m_vecColumn._Myfirst )
  {
    *r = this->m_vecColumn._Myfirst[uiColumn].m_r;
    *g = this->m_vecColumn._Myfirst[uiColumn].m_g;
    *b = this->m_vecColumn._Myfirst[uiColumn].m_b;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (004509D0) --------------------------------------------------------
void __thiscall SlideListWin::ListItem::SetFontSize(SlideListWin::ListItem *this, int nSize)
{
  unsigned int v2; // esi@1
  unsigned int v3; // eax@1
  int v4; // edi@2

  v2 = 0;
  v3 = this->m_vecColumn._Mylast - this->m_vecColumn._Myfirst;
  if ( v3 )
  {
    v4 = 0;
    if ( v3 <= 0 )
      goto LABEL_4;
    do
    {
      this->m_vecColumn._Myfirst[v4].m_nFontSize = nSize;
LABEL_4:
      ++v2;
      ++v4;
    }
    while ( v2 < this->m_vecColumn._Mylast - this->m_vecColumn._Myfirst );
  }
}

//----- (00450A30) --------------------------------------------------------
void __thiscall SlideListWin::ListItem::SetFontColor(SlideListWin::ListItem *this, int r, int g, int b)
{
  unsigned int v4; // edi@1
  unsigned int v5; // eax@1
  int v6; // esi@2

  v4 = 0;
  v5 = this->m_vecColumn._Mylast - this->m_vecColumn._Myfirst;
  if ( v5 )
  {
    v6 = 0;
    if ( v5 <= 0 )
      goto LABEL_4;
    do
    {
      this->m_vecColumn._Myfirst[v6].m_r = r;
      this->m_vecColumn._Myfirst[v6].m_g = g;
      this->m_vecColumn._Myfirst[v6].m_b = b;
LABEL_4:
      ++v4;
      ++v6;
    }
    while ( v4 < this->m_vecColumn._Mylast - this->m_vecColumn._Myfirst );
  }
}

//----- (00450AA0) --------------------------------------------------------
void __thiscall SlideListWin::ListItem::AlignText(SlideListWin::ListItem *this, unsigned int uiDrawFormat)
{
  unsigned int v2; // esi@1
  unsigned int v3; // eax@1
  int v4; // edi@2

  v2 = 0;
  v3 = this->m_vecColumn._Mylast - this->m_vecColumn._Myfirst;
  if ( v3 )
  {
    v4 = 0;
    if ( v3 <= 0 )
      goto LABEL_4;
    do
    {
      this->m_vecColumn._Myfirst[v4].m_uiAlignText = uiDrawFormat;
LABEL_4:
      ++v2;
      ++v4;
    }
    while ( v2 < this->m_vecColumn._Mylast - this->m_vecColumn._Myfirst );
  }
}

//----- (00450B00) --------------------------------------------------------
void __thiscall ColumnBut::DoAction(ColumnBut *this)
{
  ColumnBut *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_nIndex);
}

//----- (00450B30) --------------------------------------------------------
void __thiscall ColumnBut::DoRAction(ColumnBut *this)
{
  ColumnBut *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiRCmdMsg, v1->m_nIndex);
}

//----- (00450B60) --------------------------------------------------------
char __thiscall SlideListWin::SetFontSize(SlideListWin *this, unsigned int uiIndex, int nSize)
{
  char result; // al@2

  if ( uiIndex < this->m_arrListItem._Mylast - this->m_arrListItem._Myfirst )
  {
    SlideListWin::ListItem::SetFontSize(this->m_arrListItem._Myfirst[uiIndex].px, nSize);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00450BA0) --------------------------------------------------------
char __thiscall SlideListWin::SetFontColor(SlideListWin *this, unsigned int uiIndex, int r, int g, int b)
{
  char result; // al@2

  if ( uiIndex < this->m_arrListItem._Mylast - this->m_arrListItem._Myfirst )
  {
    SlideListWin::ListItem::SetFontColor(this->m_arrListItem._Myfirst[uiIndex].px, r, g, b);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00450BE0) --------------------------------------------------------
char __thiscall SlideListWin::SetFontSize(SlideListWin *this, unsigned int uiIndex, unsigned int uiColumn, int nSize)
{
  char result; // al@2
  SlideListWin::ListItem *v5; // esi@3

  if ( uiIndex < this->m_arrListItem._Mylast - this->m_arrListItem._Myfirst )
  {
    v5 = this->m_arrListItem._Myfirst[uiIndex].px;
    if ( uiColumn < v5->m_vecColumn._Mylast - v5->m_vecColumn._Myfirst )
      v5->m_vecColumn._Myfirst[uiColumn].m_nFontSize = nSize;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00450C40) --------------------------------------------------------
char __thiscall SlideListWin::SetFontColor(SlideListWin *this, unsigned int uiIndex, unsigned int uiColumn, int r, int g, int b)
{
  char result; // al@2
  SlideListWin::ListItem *v7; // ecx@3
  unsigned int v8; // edx@3
  unsigned int v9; // eax@4

  if ( uiIndex < this->m_arrListItem._Mylast - this->m_arrListItem._Myfirst )
  {
    v7 = this->m_arrListItem._Myfirst[uiIndex].px;
    v8 = (signed int)((unsigned __int64)(715827883i64
                                       * (unsigned int)((char *)v7->m_vecColumn._Mylast
                                                      - (char *)v7->m_vecColumn._Myfirst)) >> 32) >> 3;
    if ( uiColumn < v8 + (v8 >> 31) )
    {
      v9 = 6 * uiColumn;
      v7->m_vecColumn._Myfirst[8 * v9 / 0x30].m_r = r;
      v7->m_vecColumn._Myfirst[8 * v9 / 0x30].m_g = g;
      v7->m_vecColumn._Myfirst[8 * v9 / 0x30].m_b = b;
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00450CC0) --------------------------------------------------------
char __thiscall SlideListWin::AlignText(SlideListWin *this, unsigned int uiDrawFormat)
{
  unsigned int v2; // ebx@1
  SlideListWin::ListItem *v3; // esi@2
  unsigned int v4; // edi@2
  unsigned int v5; // eax@2
  int v6; // ebx@3
  unsigned int ui; // [sp+4h] [bp-4h]@1

  v2 = 0;
  ui = 0;
  if ( this->m_arrListItem._Mylast - this->m_arrListItem._Myfirst )
  {
    while ( 1 )
    {
      v3 = this->m_arrListItem._Myfirst[v2].px;
      v4 = 0;
      v5 = v3->m_vecColumn._Mylast - v3->m_vecColumn._Myfirst;
      if ( v5 )
        break;
LABEL_7:
      ui = ++v2;
      if ( v2 >= this->m_arrListItem._Mylast - this->m_arrListItem._Myfirst )
        return 1;
    }
    v6 = 0;
    if ( v5 <= 0 )
      goto LABEL_5;
    while ( 1 )
    {
      v3->m_vecColumn._Myfirst[v6].m_uiAlignText = uiDrawFormat;
LABEL_5:
      ++v4;
      ++v6;
      if ( v4 >= v3->m_vecColumn._Mylast - v3->m_vecColumn._Myfirst )
      {
        v2 = ui;
        goto LABEL_7;
      }
    }
  }
  return 1;
}

//----- (00450D60) --------------------------------------------------------
char __thiscall SlideListWin::AlignText(SlideListWin *this, unsigned int uiColumn, unsigned int uiDrawFormat)
{
  unsigned int v3; // edi@1
  SlideListWin::ListItem *v4; // esi@2

  v3 = 0;
  if ( this->m_arrListItem._Mylast - this->m_arrListItem._Myfirst )
  {
    do
    {
      v4 = this->m_arrListItem._Myfirst[v3].px;
      if ( uiColumn < v4->m_vecColumn._Mylast - v4->m_vecColumn._Myfirst )
        v4->m_vecColumn._Myfirst[uiColumn].m_uiAlignText = uiDrawFormat;
      ++v3;
    }
    while ( v3 < this->m_arrListItem._Mylast - this->m_arrListItem._Myfirst );
  }
  return 1;
}

//----- (00450DD0) --------------------------------------------------------
void __thiscall SlideListWin::SetToolTipWinTextInColumn(SlideListWin *this, unsigned int TextWinIndex, char *pcText)
{
  SlideListWin *v3; // esi@1
  unsigned int v4; // edi@1
  ColumnBut *v5; // ecx@2
  PgWin *v6; // ecx@4

  v3 = this;
  v4 = 0;
  if ( this->m_vecButList._Mylast - this->m_vecButList._Myfirst )
  {
    do
    {
      v5 = v3->m_vecButList._Myfirst[v4];
      if ( v5 && TextWinIndex < v5->m_vecTextWin._Mylast - v5->m_vecTextWin._Myfirst )
      {
        v6 = (PgWin *)&v5->m_vecTextWin._Myfirst[TextWinIndex]->vfptr;
        if ( v6 )
          PgWin::SetToolTipWinText(v6, pcText);
      }
      ++v4;
    }
    while ( v4 < v3->m_vecButList._Mylast - v3->m_vecButList._Myfirst );
  }
}

//----- (00450E50) --------------------------------------------------------
void __thiscall SlideListWin::SetToolTipWin(SlideListWin *this, unsigned int TextWinIndex, PgWin *pkToolTipWin)
{
  unsigned int v3; // esi@1
  ColumnBut *v4; // edx@2
  PgWinText *v5; // eax@4

  v3 = 0;
  if ( this->m_vecButList._Mylast - this->m_vecButList._Myfirst )
  {
    do
    {
      v4 = this->m_vecButList._Myfirst[v3];
      if ( v4 && TextWinIndex < v4->m_vecTextWin._Mylast - v4->m_vecTextWin._Myfirst )
      {
        v5 = v4->m_vecTextWin._Myfirst[TextWinIndex];
        if ( v5 )
          v5->m_pkToolTipWin = pkToolTipWin;
      }
      ++v3;
    }
    while ( v3 < this->m_vecButList._Mylast - this->m_vecButList._Myfirst );
  }
}

//----- (00450EC0) --------------------------------------------------------
double __thiscall SLWCreateInfo::GetHeight(SLWCreateInfo *this)
{
  double result; // st7@2
  SLWCreateInfo::Item *v2; // eax@3
  NiPointer<PgSprData> *v3; // edx@3

  if ( this->m_arrItem._Mylast - this->m_arrItem._Myfirst
    && (v2 = this->m_arrItem._Myfirst->px, v3 = v2->vecSprData._Myfirst, v3 != v2->vecSprData._Mylast) )
  {
    result = (double)v3->m_pObject->m_akHitTester.m_pBase->m_pObject->m_uiHeight;
  }
  else
  {
    result = -1.0;
  }
  return result;
}

//----- (00450F10) --------------------------------------------------------
char *__thiscall SlideListWin::ListItem::GetText(SlideListWin::ListItem *this, unsigned int nIndex)
{
  char *result; // eax@2

  if ( nIndex < this->m_vecColumn._Mylast - this->m_vecColumn._Myfirst )
  {
    result = this->m_vecColumn._Myfirst[nIndex].m_strColumnText._Bx._Buf;
    if ( *((_DWORD *)result + 5) >= 0x10u )
      result = *(char **)result;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00450F50) --------------------------------------------------------
char *__thiscall SlideListWin::GetText(SlideListWin *this, unsigned int uiIndex, unsigned int uiColumn)
{
  char *result; // eax@2
  SlideListWin::ListItem *v4; // esi@3

  if ( uiIndex < this->m_arrListItem._Mylast - this->m_arrListItem._Myfirst )
  {
    v4 = this->m_arrListItem._Myfirst[uiIndex].px;
    if ( uiColumn < v4->m_vecColumn._Mylast - v4->m_vecColumn._Myfirst )
    {
      result = v4->m_vecColumn._Myfirst[uiColumn].m_strColumnText._Bx._Buf;
      if ( *((_DWORD *)result + 5) >= 0x10u )
        result = *(char **)result;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00450FC0) --------------------------------------------------------
void __thiscall SlideListWin::UpdateViewList(SlideListWin *this)
{
  SlideListWin *v1; // esi@1
  ColumnBut **v2; // eax@1
  unsigned int v3; // ebx@1
  ColumnBut *v4; // edi@2
  boost::shared_ptr<SlideListWin::ListItem> *v5; // eax@5
  unsigned int v6; // ecx@5
  unsigned int v7; // edx@5
  SlideListWin::ListItem *v8; // edi@6
  ColumnBut **v9; // eax@7
  ColumnBut *v10; // ebx@8
  unsigned int v11; // esi@12
  unsigned int v12; // eax@12
  int v13; // ecx@15
  SlideListWin::ListItem::ColumnData *v14; // ecx@21
  unsigned int v15; // ecx@22
  SlideListWin *v16; // [sp+14h] [bp-14h]@1
  unsigned int uiButIndex; // [sp+18h] [bp-10h]@8
  unsigned int ui; // [sp+1Ch] [bp-Ch]@5
  const char *szText; // [sp+20h] [bp-8h]@14
  int v20; // [sp+24h] [bp-4h]@13

  v1 = this;
  v2 = this->m_vecButList._Myfirst;
  v3 = 0;
  v16 = this;
  if ( this->m_vecButList._Mylast - v2 )
  {
    do
    {
      v4 = v2[v3];
      if ( v4 )
      {
        v4->vfptr[64].__vecDelDtor((NiRefObject *)v4, 0);
        v4->vfptr[60].__vecDelDtor((NiRefObject *)v4, 0);
      }
      v2 = v1->m_vecButList._Myfirst;
      ++v3;
    }
    while ( v3 < v1->m_vecButList._Mylast - v2 );
  }
  v5 = v1->m_arrListItem._Myfirst;
  v6 = v1->m_nViewStartPos;
  v7 = 0;
  ui = v6;
  while ( v6 < v1->m_arrListItem._Mylast - v5 )
  {
    v8 = v5[v6].px;
    if ( v8 )
    {
      v9 = v1->m_vecButList._Myfirst;
      if ( v7 >= v1->m_vecButList._Mylast - v9 )
        return;
      v10 = v9[v7];
      uiButIndex = v7 + 1;
      if ( !v10 )
        return;
      v10->vfptr[64].__vecDelDtor((NiRefObject *)v10, 1u);
      v10->vfptr[60].__vecDelDtor((NiRefObject *)v10, 1u);
      if ( v1->m_bCheckEnable )
        v10->m_bCheck = v8->m_bCheck;
      else
        v10->m_bCheck = 0;
      v11 = 0;
      v12 = v8->m_vecColumn._Mylast - v8->m_vecColumn._Myfirst;
      if ( v12 )
      {
        v20 = 0;
        if ( v12 <= 0 )
        {
          szText = 0;
          goto LABEL_18;
        }
        do
        {
          v13 = (int)&v8->m_vecColumn._Myfirst[v20];
          if ( *(_DWORD *)(v13 + 20) >= 0x10u )
            v13 = *(_DWORD *)v13;
          szText = (const char *)v13;
LABEL_18:
          if ( v11 < v10->m_vecTextWin._Mylast - v10->m_vecTextWin._Myfirst )
          {
            if ( v11 < v12 )
              ((void (__stdcall *)(int, int, int, signed int))v10->m_vecTextWin._Myfirst[v11]->vfptr[116].__vecDelDtor)(
                v8->m_vecColumn._Myfirst[v20].m_r,
                v8->m_vecColumn._Myfirst[v20].m_g,
                v8->m_vecColumn._Myfirst[v20].m_b,
                255);
            v14 = v8->m_vecColumn._Myfirst;
            if ( v11 < v8->m_vecColumn._Mylast - v14 )
            {
              v15 = v14[v20].m_uiAlignText;
              if ( v11 < v10->m_vecTextWin._Mylast - v10->m_vecTextWin._Myfirst )
                v10->m_vecTextWin._Myfirst[v11]->vfptr[122].__vecDelDtor(
                  (NiRefObject *)v10->m_vecTextWin._Myfirst[v11],
                  v15);
            }
            if ( v11 < v10->m_vecTextWin._Mylast - v10->m_vecTextWin._Myfirst )
              ((void (__stdcall *)(const char *))v10->m_vecTextWin._Myfirst[v11]->vfptr[118].__vecDelDtor)(szText);
          }
          ++v20;
          ++v11;
          v12 = v8->m_vecColumn._Mylast - v8->m_vecColumn._Myfirst;
        }
        while ( v11 < v12 );
      }
      v1 = v16;
      v7 = uiButIndex;
      v6 = ui;
    }
    v5 = v1->m_arrListItem._Myfirst;
    ui = ++v6;
  }
}

//----- (00451210) --------------------------------------------------------
void __thiscall SlideListWin::OnClickItem(SlideListWin *this, int nItemIndex)
{
  SlideListWin *v2; // esi@1
  boost::shared_ptr<SlideListWin::ListItem> *v3; // eax@2
  int v4; // edi@2
  unsigned int v5; // ecx@2
  SlideListWin::ListItem *v6; // eax@3
  boost::shared_ptr<SlideListWin::ListItem> *v7; // eax@6
  int v8; // edi@6
  NiNode *v9; // ebx@7
  NiRTTI *v10; // eax@8
  char v11; // al@11
  PgWin *v12; // eax@12

  v2 = this;
  if ( nItemIndex < this->m_vecButList._Mylast - this->m_vecButList._Myfirst )
  {
    v3 = this->m_arrListItem._Myfirst;
    v4 = this->m_arrListItem._Mylast - v3;
    v5 = 0;
    if ( v4 )
    {
      do
      {
        v6 = v3[v5].px;
        if ( v6 )
          v6->m_bCheck = 0;
        v3 = v2->m_arrListItem._Myfirst;
        ++v5;
      }
      while ( v5 < v2->m_arrListItem._Mylast - v3 );
    }
    v7 = v2->m_arrListItem._Myfirst;
    v8 = nItemIndex + v2->m_nViewStartPos;
    if ( v8 < v2->m_arrListItem._Mylast - v7 )
    {
      v7[v8].px->m_bCheck = 1;
      v9 = v2->m_pkParent;
      if ( v9 )
      {
        v10 = (NiRTTI *)((int (__thiscall *)(_DWORD))v9->vfptr[1].__vecDelDtor)(v2->m_pkParent);
        if ( v10 )
        {
          while ( v10 != &PgWin::m_RTTI )
          {
            v10 = v10->m_pkBaseRTTI;
            if ( !v10 )
              goto LABEL_11;
          }
          v11 = 1;
        }
        else
        {
LABEL_11:
          v11 = 0;
        }
        v12 = (PgWin *)(v11 != 0 ? (unsigned int)v9 : 0);
        if ( v12 )
          PgWin::SendMsg(v12, 5u, v2->m_uiLClickMsg, v8);
      }
      SlideListWin::UpdateViewList(v2);
    }
  }
}

//----- (004512F0) --------------------------------------------------------
void __thiscall SlideListWin::OnRClickItem(SlideListWin *this, int nItemIndex)
{
  SlideListWin *v2; // esi@1
  boost::shared_ptr<SlideListWin::ListItem> *v3; // eax@2
  int v4; // edi@2
  unsigned int v5; // ecx@2
  SlideListWin::ListItem *v6; // eax@3
  boost::shared_ptr<SlideListWin::ListItem> *v7; // eax@6
  int v8; // edi@6
  NiNode *v9; // ebx@7
  NiRTTI *v10; // eax@8
  char v11; // al@11
  PgWin *v12; // eax@12

  v2 = this;
  if ( nItemIndex < this->m_vecButList._Mylast - this->m_vecButList._Myfirst )
  {
    v3 = this->m_arrListItem._Myfirst;
    v4 = this->m_arrListItem._Mylast - v3;
    v5 = 0;
    if ( v4 )
    {
      do
      {
        v6 = v3[v5].px;
        if ( v6 )
          v6->m_bCheck = 0;
        v3 = v2->m_arrListItem._Myfirst;
        ++v5;
      }
      while ( v5 < v2->m_arrListItem._Mylast - v3 );
    }
    v7 = v2->m_arrListItem._Myfirst;
    v8 = nItemIndex + v2->m_nViewStartPos;
    if ( v8 < v2->m_arrListItem._Mylast - v7 )
    {
      v7[v8].px->m_bCheck = 1;
      v9 = v2->m_pkParent;
      if ( v9 )
      {
        v10 = (NiRTTI *)((int (__thiscall *)(_DWORD))v9->vfptr[1].__vecDelDtor)(v2->m_pkParent);
        if ( v10 )
        {
          while ( v10 != &PgWin::m_RTTI )
          {
            v10 = v10->m_pkBaseRTTI;
            if ( !v10 )
              goto LABEL_11;
          }
          v11 = 1;
        }
        else
        {
LABEL_11:
          v11 = 0;
        }
        v12 = (PgWin *)(v11 != 0 ? (unsigned int)v9 : 0);
        if ( v12 )
          PgWin::SendMsg(v12, 5u, v2->m_uiRClickMsg, v8);
      }
      SlideListWin::UpdateViewList(v2);
    }
  }
}

//----- (004513D0) --------------------------------------------------------
void __thiscall SlideListWin::KillSelIndex(SlideListWin *this)
{
  SlideListWin *v1; // esi@1
  boost::shared_ptr<SlideListWin::ListItem> *v2; // eax@1
  int v3; // edx@1
  unsigned int v4; // ecx@1
  SlideListWin::ListItem *v5; // eax@2
  ColumnBut **v6; // eax@5
  unsigned int v7; // ebx@5
  ColumnBut *v8; // edi@6
  boost::shared_ptr<SlideListWin::ListItem> *v9; // eax@9
  unsigned int v10; // ecx@9
  unsigned int v11; // edx@9
  SlideListWin::ListItem *v12; // edi@10
  ColumnBut **v13; // eax@11
  ColumnBut *v14; // ebx@12
  unsigned int v15; // esi@16
  unsigned int v16; // eax@16
  int v17; // ecx@19
  SlideListWin::ListItem::ColumnData *v18; // ecx@25
  unsigned int v19; // ecx@26
  SlideListWin *v20; // [sp+14h] [bp-14h]@1
  int v21; // [sp+18h] [bp-10h]@12
  unsigned int v22; // [sp+1Ch] [bp-Ch]@9
  int v23; // [sp+20h] [bp-8h]@18
  int v24; // [sp+24h] [bp-4h]@17

  v1 = this;
  v2 = this->m_arrListItem._Myfirst;
  v3 = this->m_arrListItem._Mylast - v2;
  v4 = 0;
  v20 = v1;
  if ( v3 )
  {
    do
    {
      v5 = v2[v4].px;
      if ( v5 )
        v5->m_bCheck = 0;
      v2 = v1->m_arrListItem._Myfirst;
      ++v4;
    }
    while ( v4 < v1->m_arrListItem._Mylast - v2 );
  }
  v6 = v1->m_vecButList._Myfirst;
  v7 = 0;
  if ( v1->m_vecButList._Mylast - v6 )
  {
    do
    {
      v8 = v6[v7];
      if ( v8 )
      {
        v8->vfptr[64].__vecDelDtor((NiRefObject *)v8, 0);
        v8->vfptr[60].__vecDelDtor((NiRefObject *)v8, 0);
      }
      v6 = v1->m_vecButList._Myfirst;
      ++v7;
    }
    while ( v7 < v1->m_vecButList._Mylast - v6 );
  }
  v9 = v1->m_arrListItem._Myfirst;
  v10 = v1->m_nViewStartPos;
  v11 = 0;
  v22 = v10;
  while ( v10 < v1->m_arrListItem._Mylast - v9 )
  {
    v12 = v9[v10].px;
    if ( v12 )
    {
      v13 = v1->m_vecButList._Myfirst;
      if ( v11 >= v1->m_vecButList._Mylast - v13 )
        return;
      v14 = v13[v11];
      v21 = v11 + 1;
      if ( !v14 )
        return;
      v14->vfptr[64].__vecDelDtor((NiRefObject *)v14, 1u);
      v14->vfptr[60].__vecDelDtor((NiRefObject *)v14, 1u);
      if ( v1->m_bCheckEnable )
        v14->m_bCheck = v12->m_bCheck;
      else
        v14->m_bCheck = 0;
      v15 = 0;
      v16 = v12->m_vecColumn._Mylast - v12->m_vecColumn._Myfirst;
      if ( v16 )
      {
        v24 = 0;
        if ( v16 <= 0 )
        {
          v23 = 0;
          goto LABEL_22;
        }
        do
        {
          v17 = (int)&v12->m_vecColumn._Myfirst[v24];
          if ( *(_DWORD *)(v17 + 20) >= 0x10u )
            v17 = *(_DWORD *)v17;
          v23 = v17;
LABEL_22:
          if ( v15 < v14->m_vecTextWin._Mylast - v14->m_vecTextWin._Myfirst )
          {
            if ( v15 < v16 )
              ((void (__stdcall *)(int, int, int, signed int))v14->m_vecTextWin._Myfirst[v15]->vfptr[116].__vecDelDtor)(
                v12->m_vecColumn._Myfirst[v24].m_r,
                v12->m_vecColumn._Myfirst[v24].m_g,
                v12->m_vecColumn._Myfirst[v24].m_b,
                255);
            v18 = v12->m_vecColumn._Myfirst;
            if ( v15 < v12->m_vecColumn._Mylast - v18 )
            {
              v19 = v18[v24].m_uiAlignText;
              if ( v15 < v14->m_vecTextWin._Mylast - v14->m_vecTextWin._Myfirst )
                v14->m_vecTextWin._Myfirst[v15]->vfptr[122].__vecDelDtor(
                  (NiRefObject *)v14->m_vecTextWin._Myfirst[v15],
                  v19);
            }
            if ( v15 < v14->m_vecTextWin._Mylast - v14->m_vecTextWin._Myfirst )
              ((void (__stdcall *)(int))v14->m_vecTextWin._Myfirst[v15]->vfptr[118].__vecDelDtor)(v23);
          }
          ++v24;
          ++v15;
          v16 = v12->m_vecColumn._Mylast - v12->m_vecColumn._Myfirst;
        }
        while ( v15 < v16 );
      }
      v1 = v20;
      v11 = v21;
      v10 = v22;
    }
    v9 = v1->m_arrListItem._Myfirst;
    v22 = ++v10;
  }
}

//----- (00451650) --------------------------------------------------------
void __thiscall SlideListWin::OnCommand(SlideListWin *this, unsigned int wParam, int lParam)
{
  SlideListWin *v3; // esi@1

  v3 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[61].__vecDelDtor)() )
  {
    if ( wParam )
    {
      if ( wParam == 1 )
        SlideListWin::OnRClickItem(v3, lParam);
    }
    else
    {
      SlideListWin::OnClickItem(v3, lParam);
    }
  }
}

//----- (00451690) --------------------------------------------------------
void __thiscall ColumnBut::ColumnBut(ColumnBut *this)
{
  ColumnBut *v1; // esi@1
  int v2; // ecx@1

  v1 = this;
  PgWinLRBut::PgWinLRBut((PgWinLRBut *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ColumnBut::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ColumnBut::`vftable'{for `IDirectMessenger'};
  v1->m_vecTextWin._Myfirst = 0;
  v1->m_vecTextWin._Mylast = 0;
  v1->m_vecTextWin._Myend = 0;
  v1->m_vecSprWin._Myfirst = 0;
  v1->m_vecSprWin._Mylast = 0;
  v1->m_vecSprWin._Myend = 0;
  v2 = (int)&v1->m_vecAddWin;
  *(_DWORD *)v2 = 0;
  *(_DWORD *)(v2 + 4) = 0;
  *(_DWORD *)(v2 + 8) = 0;
  v1->m_bCheck = 0;
  v1->m_nIndex = -1;
  std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
    (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&v1->m_vecAddWin,
    0x3Cu);
}
// 97B094: using guessed type void (__thiscall *ColumnBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97B0B4: using guessed type int (__thiscall *ColumnBut::`vftable'{for `NiNode'})(void *p, char);

//----- (00451740) --------------------------------------------------------
void __thiscall ColumnBut::~ColumnBut(ColumnBut *this)
{
  ColumnBut *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ColumnBut::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ColumnBut::`vftable'{for `IDirectMessenger'};
  if ( this->m_vecAddWin._Myfirst )
    operator delete(this->m_vecAddWin._Myfirst);
  v1->m_vecAddWin._Myfirst = 0;
  v1->m_vecAddWin._Mylast = 0;
  v1->m_vecAddWin._Myend = 0;
  if ( v1->m_vecSprWin._Myfirst )
    operator delete(v1->m_vecSprWin._Myfirst);
  v1->m_vecSprWin._Myfirst = 0;
  v1->m_vecSprWin._Mylast = 0;
  v1->m_vecSprWin._Myend = 0;
  if ( v1->m_vecTextWin._Myfirst )
    operator delete(v1->m_vecTextWin._Myfirst);
  v1->m_vecTextWin._Myfirst = 0;
  v1->m_vecTextWin._Mylast = 0;
  v1->m_vecTextWin._Myend = 0;
  PgWinLRBut::~PgWinLRBut((PgWinLRBut *)&v1->vfptr);
}
// 97B094: using guessed type void (__thiscall *ColumnBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97B0B4: using guessed type int (__thiscall *ColumnBut::`vftable'{for `NiNode'})(void *p, char);

//----- (004517D0) --------------------------------------------------------
ColumnBut *__cdecl ColumnBut::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, unsigned int uiRCmdMsg)
{
  PgWin *v6; // eax@1
  PgWin *v7; // eax@2
  PgWin *v8; // esi@2
  PgWin *v9; // edi@8
  ColumnBut *v10; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v12; // [sp+20h] [bp-4h]@1

  v6 = (PgWin *)operator new(0x184u);
  result.m_pObject = v6;
  v12 = 0;
  if ( v6 )
  {
    ColumnBut::ColumnBut((ColumnBut *)v6);
    v8 = v7;
  }
  else
  {
    v8 = 0;
  }
  if ( v8 )
    InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  v12 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v8);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgSprData *, PgWin *, unsigned int, unsigned int))v8->vfptr[145].__vecDelDtor)(
                          v8,
                          iXPos,
                          iYPos,
                          pkSprData,
                          pkParent,
                          uiCmdMsg,
                          uiRCmdMsg) )
  {
    ((void (__thiscall *)(PgWin *))v8->vfptr[89].__vecDelDtor)(v8);
    v12 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v10 = (ColumnBut *)v8;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v8);
    if ( result.m_pObject )
    {
      v9 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v9 )
          v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      }
    }
    v12 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v10 = 0;
  }
  return v10;
}

//----- (00451910) --------------------------------------------------------
void __thiscall ColumnBut::AddTextWin(ColumnBut *this, PgWinText *pkTextWin)
{
  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
    (std::vector<unsigned long,std::allocator<unsigned long> > *)&this->m_vecTextWin,
    (const unsigned int *)&pkTextWin);
}

//----- (00451930) --------------------------------------------------------
char __thiscall SlideListWin::Create(SlideListWin *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, SLWCreateInfo *kCreateInfo, unsigned int uiLineSpace, bool bTextCmd)
{
  void *v8; // edi@1
  SLWCreateInfo *v9; // esi@2
  signed int v10; // ebx@3
  double v11; // st7@4
  SLWCreateInfo::Item *v12; // eax@5
  NiPointer<PgSprData> *v13; // ecx@5
  signed int v14; // eax@8
  unsigned int v15; // edx@8
  unsigned int v16; // ebx@8
  int (__thiscall *v17)(void *); // edx@8
  unsigned int v18; // eax@8
  int v19; // eax@9
  int v20; // edx@9
  PgWin *v21; // ebx@9
  char result; // al@10
  boost::shared_ptr<SLWCreateInfo::Item> *v23; // ecx@12
  unsigned int v24; // eax@12
  int v25; // edi@14
  unsigned int v26; // esi@15
  PgSprData **v27; // eax@17
  ColumnBut *v28; // eax@18
  int v29; // edx@18
  int v30; // eax@22
  int v31; // ecx@22
  PgWinAbbreviateText *v32; // esi@29
  PgTextGeometry *v33; // eax@30
  int v34; // eax@33
  unsigned int v35; // edx@34
  PgFont *v36; // ecx@35
  unsigned int v37; // eax@35
  int v38; // eax@40
  PgFont **v39; // eax@42
  PgFont *v40; // eax@44
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v41; // esi@45
  PgFont *v42; // eax@45
  unsigned int v43; // ecx@46
  int v44; // eax@46
  PgFont **v45; // eax@49
  PgFont *v46; // ebx@51
  int v47; // ebx@53
  char *v48; // eax@54
  PgWinSpr *v49; // eax@56
  ColumnBut *v50; // esi@56
  int v51; // ebx@59
  const char *v52; // eax@60
  int v53; // ebx@65
  char *v54; // ecx@66
  D3DXCOLOR v55; // ST1C_16@68
  PgWinText *v56; // eax@68
  NiRefObjectVtbl *v57; // ebx@70
  PgFont *v58; // eax@70
  ItemIcon *v59; // eax@71
  const char *v60; // eax@71
  unsigned int v61; // eax@80
  std::vector<CBaseObject *,std::allocator<CBaseObject *> > *v62; // esi@80
  CBaseObject **v63; // edx@81
  int v64; // ecx@82
  int v65; // ebx@82
  unsigned int v66; // eax@83
  unsigned int v67; // eax@84
  unsigned int v68; // ecx@84
  unsigned int v69; // ecx@86
  CBaseObject **v70; // eax@91
  CBaseObject **v71; // ebx@91
  int v72; // ecx@93
  unsigned int v73; // eax@94
  unsigned int v74; // eax@95
  unsigned int v75; // ecx@95
  unsigned int v76; // ecx@97
  _DWORD *v77; // eax@102
  int v78; // eax@104
  int v79; // edx@104
  PgFont **v80; // [sp-4h] [bp-50h]@58
  UIUtil ui; // [sp+10h] [bp-3Ch]@9
  int v82; // [sp+24h] [bp-28h]@8
  int v83; // [sp+28h] [bp-24h]@50
  int v84; // [sp+2Ch] [bp-20h]@43
  unsigned int uiHeight; // [sp+30h] [bp-1Ch]@24
  PgFont *pkFont; // [sp+34h] [bp-18h]@20
  int i; // [sp+38h] [bp-14h]@9
  PgWin *pkParenta; // [sp+3Ch] [bp-10h]@1
  int v89; // [sp+48h] [bp-4h]@9
  int iOffX; // [sp+54h] [bp+8h]@9
  int iOffY; // [sp+58h] [bp+Ch]@9
  signed int uii; // [sp+5Ch] [bp+10h]@12

  v8 = this;
  pkParenta = (PgWin *)this;
  if ( PgWinSpr::Create((PgWinSpr *)&this->vfptr, iXPos, iYPos, pkSprData, pkParent, 0, 0)
    && (v9 = kCreateInfo, kCreateInfo->m_bMakeData)
    && ((v10 = kCreateInfo->m_arrItem._Mylast - kCreateInfo->m_arrItem._Myfirst) != 0 ? ((v12 = kCreateInfo->m_arrItem._Myfirst->px,
                                                                                          v13 = v12->vecSprData._Myfirst,
                                                                                          v13 != v12->vecSprData._Mylast) ? (v11 = (double)v13->m_pObject->m_akHitTester.m_pBase->m_pObject->m_uiHeight) : (v11 = -1.0)) : (v11 = -1.0),
        *(float *)&pkParent = v11,
        v14 = (signed int)*(float *)&pkParent,
        v15 = uiLineSpace,
        *((_DWORD *)v8 + 82) = v10 - 1,
        v16 = v14 + v15,
        v17 = *(int (__thiscall **)(void *))(*(_DWORD *)v8 + 148),
        v82 = v16,
        v18 = v17(v8) / v16,
        (*((_DWORD *)v8 + 83) = v18) != 0) )
  {
    *((_DWORD *)v8 + 83) = (*(int (__thiscall **)(void *))(*(_DWORD *)v8 + 148))(v8) / v16;
    v19 = (*(int (__thiscall **)(void *))(*(_DWORD *)v8 + 148))(v8);
    v20 = v9->m_nOffX;
    uiLineSpace = (v19 - v16 * *((_DWORD *)v8 + 83)) >> 1;
    iOffX = v20;
    iOffY = v9->m_nOffY;
    UIUtil::UIUtil(&ui);
    v21 = 0;
    v89 = 0;
    i = 0;
    if ( *((_DWORD *)v8 + 83) > 0 )
    {
      while ( 1 )
      {
        v23 = v9->m_arrItem._Myfirst;
        v24 = v9->m_arrItem._Mylast - v9->m_arrItem._Myfirst;
        *(float *)&pkParent = 0.0;
        uii = 0;
        if ( v24 > 0 )
        {
          while ( 1 )
          {
            if ( uii < (signed int)v24 )
            {
              v25 = (int)&v23[uii].px->nItemType;
              if ( v25 )
              {
                v26 = 0;
                if ( uii )
                {
                  if ( *(_DWORD *)v25 == 2 )
                  {
                    pkFont = Font::Get(0);
                    if ( LODWORD(pkParenta[1].m_kLocal.m_Rotate.m_pEntry[1][2]) )
                      pkFont = (PgFont *)LODWORD(pkParenta[1].m_kLocal.m_Rotate.m_pEntry[1][2]);
                    v30 = *(_DWORD *)(v25 + 8);
                    v31 = *(_DWORD *)(v25 + 12);
                    if ( v30 == v31 || (signed int)((v31 - v30) & 0xFFFFFFFC) <= 0 )
                      uiHeight = 0;
                    else
                      uiHeight = *(_DWORD *)(**(_DWORD **)(*(_DWORD *)v30 + 36) + 24);
                    if ( v30 != v31 && (signed int)((v31 - v30) & 0xFFFFFFFC) > 0 )
                      v26 = *(_DWORD *)(**(_DWORD **)(*(_DWORD *)v30 + 36) + 20);
                    v32 = PgWinAbbreviateText::CreateWin(
                            iOffX + *(_DWORD *)(v25 + 56),
                            iOffY + *(_DWORD *)(v25 + 60),
                            v26,
                            uiHeight,
                            pkFont,
                            v21,
                            0,
                            0,
                            *(_DWORD *)(v25 + 92),
                            *(_BYTE *)(v25 + 88),
                            g_pkToolTipWin,
                            0x1Eu);
                    v32->vfptr[122].__vecDelDtor((NiRefObject *)v32, 5u);
                    v32->vfptr[118].__vecDelDtor((NiRefObject *)v32, (unsigned int)"Column");
                    if ( bTextCmd )
                    {
                      v33 = v32->m_spTextGeom.m_pObject;
                      if ( v33 )
                        v33->m_bTextCmdOn = 1;
                    }
                    uiHeight = (unsigned int)v32;
                    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
                      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v21[1].m_kWorldBound.m_kCenter.z,
                      &uiHeight);
                  }
                  v34 = *(_DWORD *)(v25 + 48);
                  if ( v34 )
                  {
                    v35 = 0;
                    uiHeight = 0;
                    if ( v34 )
                    {
                      do
                      {
                        v36 = *(PgFont **)(v25 + 44);
                        v37 = v36->m_uiRefCount;
                        while ( !*(_BYTE *)(v37 + 45) )
                        {
                          if ( *(_DWORD *)(v37 + 12) >= v35 )
                          {
                            v36 = (PgFont *)v37;
                            v37 = *(_DWORD *)v37;
                          }
                          else
                          {
                            v37 = *(_DWORD *)(v37 + 8);
                          }
                        }
                        v38 = *(_DWORD *)(v25 + 44);
                        pkFont = v36;
                        if ( v36 == (PgFont *)v38 || v35 < v36->m_kBucketBuffer.m_dwMaxTexture )
                        {
                          v84 = v38;
                          v39 = (PgFont **)&v84;
                        }
                        else
                        {
                          v39 = &pkFont;
                        }
                        v40 = *v39;
                        if ( v40 != *(PgFont **)(v25 + 44) )
                        {
                          v41 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v40->m_kBucketBuffer.m_dwTextureSize;
                          v42 = (PgFont *)std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::_Lbound(
                                            (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > *)(v25 + 24),
                                            (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v40->m_kBucketBuffer.m_dwTextureSize);
                          pkFont = v42;
                          if ( v42 == *(PgFont **)(v25 + 28) )
                            goto LABEL_111;
                          v43 = v42->m_kBucketBuffer.m_dwCurrTextureIndex;
                          v44 = (int)&v42->m_kBucketBuffer.m_dwMaxTexture;
                          if ( *(_DWORD *)(v44 + 20) >= 0x10u )
                            v44 = *(_DWORD *)v44;
                          if ( std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
                                 v41,
                                 0,
                                 v41->_Mysize,
                                 (const char *)v44,
                                 v43) < 0 )
                          {
LABEL_111:
                            v83 = *(_DWORD *)(v25 + 28);
                            v45 = (PgFont **)&v83;
                          }
                          else
                          {
                            v45 = &pkFont;
                          }
                          v46 = *v45;
                          if ( *v45 != *(PgFont **)(v25 + 28) )
                          {
                            switch ( v46->m_kBucketBuffer.m_aspkTextures[1].m_pObject )
                            {
                              case 0u:
                                v47 = (int)&v46->m_kBucketBuffer.m_dwMaxTexture;
                                if ( *(_DWORD *)(v47 + 20) < 0x10u )
                                  v48 = (char *)v47;
                                else
                                  v48 = *(char **)v47;
                                v49 = UIUtil::CreateSpr(&ui, v48, 0);
                                v50 = (ColumnBut *)v49;
                                if ( *(_DWORD *)(v47 + 20) >= 0x10u )
                                  v47 = *(_DWORD *)v47;
                                NiObjectNET::SetName((NiObjectNET *)&v49->vfptr, (const char *)v47);
                                v80 = &pkFont;
                                goto LABEL_75;
                              case 2u:
                                v51 = (int)&v46->m_kBucketBuffer.m_dwMaxTexture;
                                if ( *(_DWORD *)(v51 + 20) < 0x10u )
                                  v52 = (const char *)v51;
                                else
                                  v52 = *(const char **)v51;
                                v50 = UIUtil::CreateCheckButton(&ui, 0, v52, 0, 2);
                                if ( *(_DWORD *)(v51 + 20) >= 0x10u )
                                  v51 = *(_DWORD *)v51;
                                NiObjectNET::SetName((NiObjectNET *)&v50->vfptr, (const char *)v51);
                                goto LABEL_74;
                              case 4u:
                                v53 = (int)&v46->m_kBucketBuffer.m_dwMaxTexture;
                                if ( *(_DWORD *)(v53 + 20) < 0x10u )
                                  v54 = (char *)v53;
                                else
                                  v54 = *(char **)v53;
                                *(_QWORD *)&v55.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
                                *(_QWORD *)&v55.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
                                v56 = UIUtil::CreateTextNoSpr(&ui, v54, "-", v55, 5u);
                                v50 = (ColumnBut *)v56;
                                if ( *(_DWORD *)(v53 + 20) >= 0x10u )
                                  v53 = *(_DWORD *)v53;
                                NiObjectNET::SetName((NiObjectNET *)&v56->vfptr, (const char *)v53);
                                v57 = v50->vfptr;
                                v58 = Font::Get(0);
                                v57[113].__vecDelDtor((NiRefObject *)v50, (unsigned int)v58);
                                v80 = &pkFont;
                                goto LABEL_75;
                              case 3u:
                                v59 = ItemIcon::CreateWin(
                                        iOffX + *(_DWORD *)(v25 + 56),
                                        iOffY + *(_DWORD *)(v25 + 60),
                                        pkParent);
                                v50 = (ColumnBut *)v59;
                                v59->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
                                ItemIcon::SetItem(v59, 0, 1);
                                ItemIcon::SetItemAsID((ItemIcon *)v50, v25, 0);
                                v60 = (const char *)&v46->m_kBucketBuffer.m_dwMaxTexture;
                                if ( v46->m_kBucketBuffer.m_dwLoadedFontCount >= 0x10 )
                                  v60 = *(const char **)v60;
                                NiObjectNET::SetName((NiObjectNET *)&v50->vfptr, v60);
LABEL_74:
                                v80 = &pkFont;
LABEL_75:
                                pkFont = (PgFont *)v50;
                                std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
                                  (std::vector<unsigned long,std::allocator<unsigned long> > *)pkParent[1].m_kLocal.m_Rotate.m_pEntry[2],
                                  (const unsigned int *)v80);
                                break;
                              default:
                                break;
                            }
                          }
                        }
                        v35 = uiHeight + 1;
                        uiHeight = v35;
                      }
                      while ( v35 < *(_DWORD *)(v25 + 48) );
                      v21 = pkParent;
                    }
                  }
                }
                else if ( *(_DWORD *)v25 == 1 )
                {
                  v27 = *(PgSprData ***)(v25 + 8);
                  if ( v27 == *(PgSprData ***)(v25 + 12) )
                  {
                    v89 = -1;
                    UIUtil::~UIUtil(&ui);
                    goto LABEL_107;
                  }
                  v28 = ColumnBut::CreateWin(iOffX, uiLineSpace + iOffY, *v27, pkParenta, 0, 1u);
                  v29 = i;
                  v21 = (PgWin *)v28;
                  v28->m_eType = 1;
                  v28->m_nIndex = v29;
                  pkParent = (PgWin *)v28;
                  v28->m_bCheck = 0;
                  UIUtil::SetParent(&ui, (PgWin *)&v28->vfptr);
                  UIUtil::SetOffset(&ui, 0, 0);
                  UIUtil::SetUIGeom(&ui, *(NiAVObject **)(v25 + 4));
                }
              }
            }
            v23 = kCreateInfo->m_arrItem._Myfirst;
            v24 = kCreateInfo->m_arrItem._Mylast - kCreateInfo->m_arrItem._Myfirst;
            if ( ++uii >= v24 )
            {
              v8 = pkParenta;
              break;
            }
          }
        }
        v61 = *((_DWORD *)v8 + 75);
        v62 = (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)((char *)v8 + 296);
        if ( (unsigned int)&pkParent >= v61 || (v63 = v62->_Myfirst, v62->_Myfirst > (CBaseObject **)&pkParent) )
        {
          v72 = *((_DWORD *)v8 + 76);
          if ( v61 == v72 )
          {
            v73 = (signed int)(v61 - (unsigned int)v62->_Myfirst) >> 2;
            if ( v73 > 0x3FFFFFFE )
LABEL_108:
              std::_Xlength_error("vector<T> too long");
            v74 = v73 + 1;
            v75 = (signed int)(v72 - (unsigned int)v62->_Myfirst) >> 2;
            if ( v74 > v75 )
            {
              if ( 0x3FFFFFFF - (v75 >> 1) >= v75 )
                v76 = (v75 >> 1) + v75;
              else
                v76 = 0;
              if ( v76 < v74 )
                v76 = v74;
              std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v62, v76);
              v8 = pkParenta;
            }
          }
          v77 = v62->_Mylast;
          if ( v77 )
            *v77 = v21;
        }
        else
        {
          v64 = *((_DWORD *)v8 + 76);
          v65 = ((char *)&pkParent - (char *)v63) >> 2;
          if ( v61 == v64 )
          {
            v66 = (signed int)(v61 - (_DWORD)v63) >> 2;
            if ( v66 > 0x3FFFFFFE )
              goto LABEL_108;
            v67 = v66 + 1;
            v68 = (v64 - (signed int)v63) >> 2;
            if ( v67 > v68 )
            {
              if ( 0x3FFFFFFF - (v68 >> 1) >= v68 )
                v69 = (v68 >> 1) + v68;
              else
                v69 = 0;
              if ( v69 < v67 )
                v69 = v67;
              std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v62, v69);
              v8 = pkParenta;
            }
          }
          v70 = v62->_Mylast;
          v71 = &v62->_Myfirst[v65];
          if ( v70 )
            *v70 = *v71;
        }
        v78 = i;
        v79 = v82;
        ++v62->_Mylast;
        uiLineSpace += v79;
        i = v78 + 1;
        if ( v78 + 1 >= *((_DWORD *)v8 + 83) )
          break;
        v9 = kCreateInfo;
        v21 = 0;
      }
    }
    v89 = -1;
    UIUtil::~UIUtil(&ui);
    result = 1;
  }
  else
  {
LABEL_107:
    result = 0;
  }
  return result;
}

//----- (00451F70) --------------------------------------------------------
char __thiscall SlideListWin::Create(SlideListWin *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, PgFont *pkFont, SLWCreateInfo *kCreateInfo, unsigned int uiLineSpace, bool bTextCmd)
{
  this->m_pkFont = pkFont;
  return SlideListWin::Create(this, iXPos, iYPos, pkSprData, pkParent, kCreateInfo, uiLineSpace, bTextCmd);
}

//----- (00451FB0) --------------------------------------------------------
char __thiscall SlideListWin::ListItem::SetText(SlideListWin::ListItem *this, unsigned int uiColumn, const char *szText)
{
  char result; // al@2

  if ( uiColumn < this->m_vecColumn._Mylast - this->m_vecColumn._Myfirst )
  {
    if ( szText )
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &this->m_vecColumn._Myfirst[uiColumn].m_strColumnText,
        szText,
        strlen(szText));
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00452020) --------------------------------------------------------
char __thiscall SlideListWin::SetText(SlideListWin *this, unsigned int uiIndex, unsigned int uiColumn, const char *szText)
{
  char result; // al@2

  if ( uiIndex < this->m_arrListItem._Mylast - this->m_arrListItem._Myfirst )
  {
    SlideListWin::ListItem::SetText(this->m_arrListItem._Myfirst[uiIndex].px, uiColumn, szText);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00452060) --------------------------------------------------------
void __thiscall SlideListWin::SlideListWin(SlideListWin *this)
{
  SlideListWin *v1; // esi@1

  v1 = this;
  PgWinSpr::PgWinSpr((PgWinSpr *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&SlideListWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&SlideListWin::`vftable'{for `IDirectMessenger'};
  v1->m_vecButList._Myfirst = 0;
  v1->m_vecButList._Mylast = 0;
  v1->m_vecButList._Myend = 0;
  v1->m_arrListItem._Myfirst = 0;
  v1->m_arrListItem._Mylast = 0;
  v1->m_arrListItem._Myend = 0;
  v1->m_fCurSlideBtnPos = 0.0;
  v1->m_nColumnCnt = 0;
  v1->m_nMaxViewListCnt = 0;
  v1->m_nSlideSplitCnt = 0;
  v1->m_nViewStartPos = 0;
  v1->m_pkFont = 0;
  v1->m_uiLClickMsg = -1;
  v1->m_uiRClickMsg = -1;
  v1->m_bCheckEnable = 1;
}
// 97B31C: using guessed type void (__thiscall *SlideListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97B33C: using guessed type int (__thiscall *SlideListWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004520E0) --------------------------------------------------------
void __thiscall SlideListWin::~SlideListWin(SlideListWin *this)
{
  SlideListWin *v1; // esi@1
  boost::shared_ptr<SlideListWin::ListItem> *v2; // eax@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&SlideListWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SlideListWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_arrListItem._Myfirst;
  if ( v2 )
  {
    std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(
      (boost::shared_ptr<SLWCreateInfo::Item> *)v2,
      (boost::shared_ptr<SLWCreateInfo::Item> *)this->m_arrListItem._Mylast);
    operator delete(v1->m_arrListItem._Myfirst);
  }
  v1->m_arrListItem._Myfirst = 0;
  v1->m_arrListItem._Mylast = 0;
  v1->m_arrListItem._Myend = 0;
  if ( v1->m_vecButList._Myfirst )
    operator delete(v1->m_vecButList._Myfirst);
  v1->m_vecButList._Myfirst = 0;
  v1->m_vecButList._Mylast = 0;
  v1->m_vecButList._Myend = 0;
  PgWinSpr::~PgWinSpr((PgWinSpr *)&v1->vfptr);
}
// 97B31C: using guessed type void (__thiscall *SlideListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97B33C: using guessed type int (__thiscall *SlideListWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004521B0) --------------------------------------------------------
SlideListWin *__cdecl SlideListWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, SLWCreateInfo *kCreateInfo, unsigned int uiLineSpace, bool bTextCmd)
{
  PgWin *v7; // eax@1
  PgWin *v8; // eax@2
  PgWin *v9; // esi@2
  PgWin *v10; // edi@8
  SlideListWin *v11; // eax@14
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v13; // [sp+20h] [bp-4h]@1

  v7 = (PgWin *)operator new(0x16Cu);
  result.m_pObject = v7;
  v13 = 0;
  if ( v7 )
  {
    SlideListWin::SlideListWin((SlideListWin *)v7);
    v9 = v8;
  }
  else
  {
    v9 = 0;
  }
  if ( v9 )
    InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  v13 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v9);
  if ( SlideListWin::Create((SlideListWin *)v9, iXPos, iYPos, pkSprData, pkParent, kCreateInfo, uiLineSpace, bTextCmd) )
  {
    ((void (__thiscall *)(PgWin *))v9->vfptr[89].__vecDelDtor)(v9);
    v13 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v11 = (SlideListWin *)v9;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v9);
    if ( result.m_pObject )
    {
      v10 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v10 )
          v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
      }
    }
    v13 = -1;
    if ( v9 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
        v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    }
    v11 = 0;
  }
  return v11;
}

//----- (00452300) --------------------------------------------------------
SlideListWin *__cdecl SlideListWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, PgFont *pkFont, SLWCreateInfo *kCreateInfo, unsigned int uiLineSpace, bool bTextCmd)
{
  SlideListWin *v8; // eax@1
  int v9; // eax@2
  int v10; // esi@2
  bool v11; // ST18_1@6
  unsigned int v12; // ST14_4@6
  PgFont *v13; // edi@8
  SlideListWin *result; // eax@13

  v8 = (SlideListWin *)operator new(0x16Cu);
  if ( v8 )
  {
    SlideListWin::SlideListWin(v8);
    v10 = v9;
  }
  else
  {
    v10 = 0;
  }
  if ( v10 )
    InterlockedIncrement((volatile LONG *)(v10 + 4));
  PgWinMgr::Add(&Pgg_kWinMgr, (PgWin *)v10);
  v11 = bTextCmd;
  v12 = uiLineSpace;
  *(_DWORD *)(v10 + 360) = pkFont;
  if ( SlideListWin::Create((SlideListWin *)v10, iXPos, iYPos, pkSprData, pkParent, kCreateInfo, v12, v11) )
  {
    (*(void (__thiscall **)(int))(*(_DWORD *)v10 + 356))(v10);
    if ( !InterlockedDecrement((volatile LONG *)(v10 + 4)) )
      (**(void (__thiscall ***)(_DWORD, _DWORD))v10)(v10, 1);
    result = (SlideListWin *)v10;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, (NiPointer<PgWin> *)&pkFont, (PgWin *)v10);
    if ( pkFont )
    {
      v13 = pkFont;
      if ( !InterlockedDecrement((volatile LONG *)&pkFont->m_uiRefCount) )
      {
        if ( v13 )
          v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
      }
    }
    if ( !InterlockedDecrement((volatile LONG *)(v10 + 4)) )
      (**(void (__thiscall ***)(_DWORD, _DWORD))v10)(v10, 1);
    result = 0;
  }
  return result;
}

//----- (00452450) --------------------------------------------------------
char __thiscall SlideListWin::RemoveItem(SlideListWin *this, unsigned int uiIndex)
{
  SlideListWin *v2; // esi@1
  char result; // al@2
  boost::shared_ptr<SlideListWin::ListItem> *v4; // eax@3
  int v5; // ecx@3
  int v6; // eax@8

  v2 = this;
  if ( uiIndex < this->m_arrListItem._Mylast - this->m_arrListItem._Myfirst )
  {
    v4 = this->m_arrListItem._Myfirst;
    v5 = 0;
    if ( v4 != v2->m_arrListItem._Mylast )
    {
      while ( v5 != uiIndex )
      {
        ++v4;
        ++v5;
        if ( v4 == v2->m_arrListItem._Mylast )
          goto LABEL_8;
      }
      std::_Move<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem> *>(
        (boost::shared_ptr<SLWCreateInfo::Item> *)&v4[1],
        (boost::shared_ptr<SLWCreateInfo::Item> *)v2->m_arrListItem._Mylast,
        (boost::shared_ptr<SLWCreateInfo::Item> *)v4);
      std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(
        (boost::shared_ptr<SLWCreateInfo::Item> *)&v2->m_arrListItem._Mylast[-1],
        (boost::shared_ptr<SLWCreateInfo::Item> *)v2->m_arrListItem._Mylast);
      --v2->m_arrListItem._Mylast;
    }
LABEL_8:
    v6 = v2->m_arrListItem._Mylast - v2->m_arrListItem._Myfirst - v2->m_nMaxViewListCnt + 1;
    v2->m_nSlideSplitCnt = v6;
    if ( v6 <= 0 )
      v2->m_nSlideSplitCnt = 0;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00452500) --------------------------------------------------------
char __thiscall SLWCreateInfo::MakeTempData(SLWCreateInfo *this, NiSourceTexture *pkTexture)
{
  signed int v3; // ebx@3
  signed int v4; // eax@3
  SLWCreateInfo::Item *v5; // esi@5
  NiNode *v6; // ecx@7
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v7; // eax@12
  NiAVObject *v8; // eax@14
  NiTexturingProperty *v9; // eax@15
  NiTexturingProperty *v10; // edi@15
  NiTexturingProperty::Map *v11; // eax@16
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v12; // eax@20
  PgSprData *v13; // eax@22
  PgSprData *v14; // edi@24
  unsigned int v15; // edi@27
  signed int v16; // ebx@28
  PgSprData **v17; // ecx@29
  int v18; // eax@30
  int v19; // ecx@33
  unsigned int v20; // edx@33
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v21; // eax@36
  bool v22; // cf@36
  NiAVObject *v23; // eax@38
  NiProperty *v24; // eax@39
  NiProperty *v25; // edi@39
  NiRefObjectVtbl *v26; // eax@40
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v27; // eax@45
  PgSprData *v28; // eax@47
  unsigned int v29; // ebx@49
  PgSprData *v30; // edi@49
  char *v31; // eax@54
  NiTexturingProperty *v32; // eax@56
  NiTexturingProperty *v33; // edi@58
  int v34; // ecx@61
  unsigned int v35; // edx@61
  unsigned int v36; // edx@63
  NiPointer<NiTexturingProperty> spTexProp; // [sp+10h] [bp-30h]@15
  int uiTop; // [sp+14h] [bp-2Ch]@47
  int uiLeft; // [sp+18h] [bp-28h]@47
  int nItemTop; // [sp+1Ch] [bp-24h]@22
  int nItemLeft; // [sp+20h] [bp-20h]@22
  SLWCreateInfo *v42; // [sp+24h] [bp-1Ch]@1
  NiPointer<PgSprData> _Val; // [sp+28h] [bp-18h]@22
  unsigned int uiIndex; // [sp+2Ch] [bp-14h]@3
  NiSourceTexture *v45; // [sp+30h] [bp-10h]@36
  int v46; // [sp+3Ch] [bp-4h]@24

  v42 = this;
  if ( this->m_bMakeData )
    return 0;
  v3 = 0;
  v4 = this->m_arrItem._Mylast - this->m_arrItem._Myfirst;
  uiIndex = 0;
  if ( v4 )
  {
    do
    {
      if ( v3 < this->m_arrItem._Mylast - this->m_arrItem._Myfirst )
        v5 = this->m_arrItem._Myfirst[v3].px;
      else
        v5 = 0;
      v6 = v5->pNode;
      if ( !v6 || !(v5->vecNodeName._Mylast - v5->vecNodeName._Myfirst) )
        return 0;
      if ( v3 )
      {
        if ( v5->nItemType != 2 )
          return 0;
        v21 = v5->vecNodeName._Myfirst;
        v22 = v21->_Myres < 0x10;
        v45 = 0;
        if ( !v22 )
          v21 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v21->_Bx._Ptr;
        v23 = (NiAVObject *)((int (__stdcall *)(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *))v6->vfptr[18].__vecDelDtor)(v21);
        if ( v23 )
        {
          v24 = NiAVObject::GetProperty(v23, 8);
          v25 = v24;
          if ( v24 )
          {
            InterlockedIncrement((volatile LONG *)&v24->m_uiRefCount);
            v26 = v25[1].m_spControllers.m_pObject->vfptr;
            v45 = (NiSourceTexture *)(v26 ? v26[1].__vecDelDtor : 0);
            if ( !InterlockedDecrement((volatile LONG *)&v25->m_uiRefCount) )
              v25->vfptr->__vecDelDtor((NiRefObject *)v25, 1u);
          }
        }
        v27 = v5->vecNodeName._Myfirst;
        if ( v27->_Myres >= 0x10 )
          v27 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v27->_Bx._Ptr;
        v28 = PgSprData::Create((NiAVObject *)&v5->pNode->vfptr, v27->_Bx._Buf, &uiTop, &uiLeft, v45);
        _Val.m_pObject = v28;
        if ( v28 )
          InterlockedIncrement((volatile LONG *)&v28->m_uiRefCount);
        v29 = 1;
        v46 = 1;
        std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData>>>::push_back(&v5->vecSprData, &_Val);
        v30 = _Val.m_pObject;
        v46 = -1;
        if ( _Val.m_pObject && !InterlockedDecrement((volatile LONG *)&_Val.m_pObject->m_uiRefCount) )
          v30->vfptr->__vecDelDtor((NiRefObject *)v30, 1u);
        v5->rect.left = uiTop - nItemLeft;
        v5->rect.top = uiLeft - nItemTop;
        if ( (unsigned int)(v5->vecNodeName._Mylast - v5->vecNodeName._Myfirst) > 1 )
        {
          _Val.m_pObject = (PgSprData *)28;
          do
          {
            v31 = (char *)_Val.m_pObject + (unsigned int)v5->vecNodeName._Myfirst;
            if ( *((_DWORD *)v31 + 5) >= 0x10u )
              v31 = *(char **)v31;
            v32 = (NiTexturingProperty *)PgSprData::Create((NiAVObject *)&v5->pNode->vfptr, v31, &uiTop, &uiLeft, v45);
            spTexProp.m_pObject = v32;
            if ( v32 )
              InterlockedIncrement((volatile LONG *)&v32->m_uiRefCount);
            v46 = 2;
            std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData>>>::push_back(
              &v5->vecSprData,
              (NiPointer<PgSprData> *)&spTexProp);
            v33 = spTexProp.m_pObject;
            v46 = -1;
            if ( spTexProp.m_pObject && !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
              v33->vfptr->__vecDelDtor((NiRefObject *)v33, 1u);
            v34 = (char *)v5->vecNodeName._Mylast - (char *)v5->vecNodeName._Myfirst;
            _Val.m_pObject = (PgSprData *)((char *)_Val.m_pObject + 28);
            v35 = (signed int)(v34 + ((unsigned __int64)(-1840700269i64 * v34) >> 32)) >> 4;
            ++v29;
          }
          while ( v29 < v35 + (v35 >> 31) );
        }
      }
      else
      {
        if ( v5->nItemType != 1 )
          return 0;
        if ( !pkTexture )
        {
          v7 = v5->vecNodeName._Myfirst;
          if ( v7->_Myres >= 0x10 )
            v7 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v7->_Bx._Ptr;
          v8 = (NiAVObject *)((int (__stdcall *)(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *))v6->vfptr[18].__vecDelDtor)(v7);
          if ( v8 )
          {
            v9 = (NiTexturingProperty *)NiAVObject::GetProperty(v8, 8);
            v10 = v9;
            spTexProp.m_pObject = v9;
            if ( v9 )
            {
              InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
              v11 = *v10->m_kMaps.m_pBase;
              if ( v11 )
                pkTexture = (NiSourceTexture *)v11->m_spTexture.m_pObject;
              else
                pkTexture = 0;
            }
            NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
          }
        }
        v12 = v5->vecNodeName._Myfirst;
        if ( v12->_Myres >= 0x10 )
          v12 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v12->_Bx._Ptr;
        v13 = PgSprData::Create((NiAVObject *)&v5->pNode->vfptr, v12->_Bx._Buf, &nItemLeft, &nItemTop, pkTexture);
        _Val.m_pObject = v13;
        if ( v13 )
          InterlockedIncrement((volatile LONG *)&v13->m_uiRefCount);
        v46 = 0;
        std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData>>>::push_back(&v5->vecSprData, &_Val);
        v14 = _Val.m_pObject;
        v46 = -1;
        if ( _Val.m_pObject && !InterlockedDecrement((volatile LONG *)&_Val.m_pObject->m_uiRefCount) )
          v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
        v5->rect.left = nItemLeft;
        v5->rect.top = nItemTop;
        v15 = 1;
        if ( (unsigned int)(v5->vecNodeName._Mylast - v5->vecNodeName._Myfirst) <= 1 )
          goto LABEL_63;
        v16 = 1;
        do
        {
          v17 = &v5->vecSprData._Myfirst->m_pObject;
          if ( v17 != (PgSprData **)v5->vecSprData._Mylast )
          {
            v18 = (int)&v5->vecNodeName._Myfirst[v16];
            if ( *(_DWORD *)(v18 + 20) >= 0x10u )
              v18 = *(_DWORD *)v18;
            PgSprData::Add(*v17, (NiAVObject *)&v5->pNode->vfptr, (const char *)v18);
          }
          v19 = (char *)v5->vecNodeName._Mylast - (char *)v5->vecNodeName._Myfirst;
          v20 = (signed int)(v19 + ((unsigned __int64)(-1840700269i64 * v19) >> 32)) >> 4;
          ++v15;
          ++v16;
        }
        while ( v15 < v20 + (v20 >> 31) );
      }
      v3 = uiIndex;
LABEL_63:
      ++v3;
      v36 = v42->m_arrItem._Mylast - v42->m_arrItem._Myfirst;
      uiIndex = v3;
      this = v42;
    }
    while ( v3 < v36 );
  }
  this->m_bMakeData = 1;
  return 1;
}

//----- (004528D0) --------------------------------------------------------
void __thiscall SlideListWin::RemoveAllList(SlideListWin *this)
{
  SlideListWin *v1; // esi@1
  boost::shared_ptr<SlideListWin::ListItem> *v2; // eax@1
  boost::shared_ptr<SlideListWin::ListItem> *v3; // ecx@1
  boost::shared_ptr<SLWCreateInfo::Item> *v4; // edi@2

  v1 = this;
  v2 = this->m_arrListItem._Mylast;
  v3 = this->m_arrListItem._Myfirst;
  if ( v3 != v2 )
  {
    v4 = std::_Move<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem> *>(
           (boost::shared_ptr<SLWCreateInfo::Item> *)v2,
           (boost::shared_ptr<SLWCreateInfo::Item> *)v2,
           (boost::shared_ptr<SLWCreateInfo::Item> *)v3);
    std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(
      v4,
      (boost::shared_ptr<SLWCreateInfo::Item> *)v1->m_arrListItem._Mylast);
    v1->m_arrListItem._Mylast = (boost::shared_ptr<SlideListWin::ListItem> *)v4;
  }
  SlideListWin::UpdateViewList(v1);
  v1->m_nSlideSplitCnt = 0;
}

//----- (00452930) --------------------------------------------------------
void __thiscall SlideListWin::Sort(SlideListWin *this, int nColumnNum, bool bReverse, bool bSortByNUm)
{
  SlideListWin *v4; // esi@1
  boost::shared_ptr<SlideListWin::ListItem> *v5; // eax@1
  boost::shared_ptr<SlideListWin::ListItem> *v6; // ecx@1
  int v7; // [sp-8h] [bp-Ch]@1

  v4 = this;
  v5 = this->m_arrListItem._Mylast;
  v6 = this->m_arrListItem._Myfirst;
  v7 = v5 - v6;
  if ( bSortByNUm )
    std::_Sort<boost::shared_ptr<SlideListWin::ListItem> *,int,SlideListWin::ListNumSorter>(
      v6,
      v5,
      v7,
      (SlideListWin::ListNumSorter)nColumnNum);
  else
    std::_Sort<boost::shared_ptr<SlideListWin::ListItem> *,int,SlideListWin::ListSorter>(
      v6,
      v5,
      v7,
      (SlideListWin::ListSorter)nColumnNum);
  if ( bReverse )
    std::_Reverse<boost::shared_ptr<SlideListWin::ListItem> *>(v4->m_arrListItem._Myfirst, v4->m_arrListItem._Mylast);
}

//----- (00452990) --------------------------------------------------------
char __thiscall SlideListWin::ListItem::SetColumnCnt(SlideListWin::ListItem *this, unsigned int uiColumnCnt)
{
  signed int v2; // edx@1
  std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData> > *v3; // ecx@1
  char result; // al@2

  v2 = (char *)this->m_vecColumn._Myend - (char *)this->m_vecColumn._Myfirst;
  v3 = &this->m_vecColumn;
  if ( uiColumnCnt > v2 / 48 )
  {
    std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData>>::reserve(
      v3,
      uiColumnCnt);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (004529D0) --------------------------------------------------------
void __thiscall SlideListWin::ListItem::ListItem(SlideListWin::ListItem *this, const char *szText, int ncolumnCnt)
{
  SlideListWin::ListItem *v3; // edi@1

  v3 = this;
  this->m_vecColumn._Myfirst = 0;
  this->m_vecColumn._Mylast = 0;
  this->m_vecColumn._Myend = 0;
  if ( ncolumnCnt )
  {
    std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData>>::resize(
      &this->m_vecColumn,
      ncolumnCnt);
    if ( szText )
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v3->m_vecColumn._Myfirst->m_strColumnText,
        szText,
        strlen(szText));
    v3->m_dwData = 0;
    v3->m_bCheck = 0;
  }
}

//----- (00452A60) --------------------------------------------------------
void __thiscall SlideListWin::ListItem::AddText(SlideListWin::ListItem *this, const char *szText)
{
  SlideListWin::ListItem *v2; // edi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v3; // [sp+10h] [bp-40h]@1
  int v4; // [sp+2Ch] [bp-24h]@3
  int v5; // [sp+30h] [bp-20h]@3
  int v6; // [sp+34h] [bp-1Ch]@3
  int v7; // [sp+38h] [bp-18h]@3
  int v8; // [sp+4Ch] [bp-4h]@1

  v2 = this;
  v3._Myres = 15;
  v3._Mysize = 0;
  v3._Bx._Buf[0] = 0;
  v8 = 0;
  if ( szText )
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v3, szText, strlen(szText));
  v4 = 0;
  v7 = 255;
  v6 = 255;
  v5 = 255;
  v8 = 1;
  std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData>>::push_back(
    &v2->m_vecColumn,
    (SlideListWin::ListItem::ColumnData *)&v3);
  if ( v3._Myres >= 0x10 )
    operator delete(v3._Bx._Ptr);
}

//----- (00452B20) --------------------------------------------------------
int __thiscall SlideListWin::AddText(SlideListWin *this, const char *szText)
{
  SlideListWin *v2; // edi@1
  boost::detail::sp_counted_base *v3; // ebx@1
  unsigned int v4; // eax@2
  SlideListWin::ListItem *v5; // eax@6
  int result; // eax@10
  int v7; // ecx@10
  boost::shared_ptr<SlideListWin::ListItem> _Val; // [sp+10h] [bp-14h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v2 = this;
  v3 = (boost::detail::sp_counted_base *)operator new(0x18u);
  _Val.pn.pi_ = v3;
  v9 = 0;
  if ( v3 )
  {
    v4 = v2->m_nColumnCnt;
    v3->weak_count_ = 0;
    v3->mtx_.l_ = 0;
    v3[1].vfptr = 0;
    LOBYTE(v9) = 1;
    if ( v4 )
    {
      std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData>>::resize(
        (std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData> > *)&v3->weak_count_,
        v4);
      if ( szText )
      {
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v3->weak_count_,
          szText,
          strlen(szText));
        v3 = _Val.pn.pi_;
      }
      v3->vfptr = 0;
      LOBYTE(v3->use_count_) = 0;
    }
    v5 = (SlideListWin::ListItem *)v3;
  }
  else
  {
    v5 = 0;
  }
  v9 = -1;
  _Val.px = v5;
  boost::detail::shared_count::shared_count(&_Val.pn, v5, 0);
  v9 = 2;
  std::vector<boost::shared_ptr<SlideListWin::ListItem>,std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>::push_back(
    &v2->m_arrListItem,
    &_Val);
  v9 = -1;
  if ( _Val.pn.pi_ )
    boost::detail::sp_counted_base::release(_Val.pn.pi_);
  result = v2->m_arrListItem._Mylast - v2->m_arrListItem._Myfirst - 1;
  v7 = v2->m_arrListItem._Mylast - v2->m_arrListItem._Myfirst - v2->m_nMaxViewListCnt + 1;
  v2->m_nSlideSplitCnt = v7;
  if ( v7 <= 0 )
    v2->m_nSlideSplitCnt = 0;
  return result;
}

//----- (00452C40) --------------------------------------------------------
int __thiscall SlideListWin::AddHeadText(SlideListWin *this, const char *szText)
{
  SlideListWin *v2; // ebx@1
  boost::detail::sp_counted_base *v3; // ecx@1
  unsigned int v4; // eax@2
  int v5; // esi@2
  boost::detail::sp_counted_base *v6; // eax@5
  SlideListWin::ListItem *v7; // eax@6
  boost::shared_ptr<SlideListWin::ListItem> *v8; // edi@8
  signed int v9; // edi@8
  boost::shared_ptr<SlideListWin::ListItem> *v10; // eax@8
  boost::shared_ptr<SlideListWin::ListItem> *v11; // edx@8
  int v12; // eax@13
  boost::shared_ptr<SlideListWin::ListItem> _Val; // [sp+10h] [bp-14h]@1
  int v15; // [sp+20h] [bp-4h]@1

  v2 = this;
  v3 = (boost::detail::sp_counted_base *)operator new(0x18u);
  _Val.pn.pi_ = v3;
  v15 = 0;
  if ( v3 )
  {
    v4 = v2->m_nColumnCnt;
    v5 = (int)&v3->weak_count_;
    *(_DWORD *)v5 = 0;
    *(_DWORD *)(v5 + 4) = 0;
    *(_DWORD *)(v5 + 8) = 0;
    LOBYTE(v15) = 1;
    if ( v4 )
    {
      std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData>>::resize(
        (std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData> > *)&v3->weak_count_,
        v4);
      if ( szText )
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          *(std::basic_string<char,std::char_traits<char>,std::allocator<char> > **)v5,
          szText,
          strlen(szText));
      v6 = _Val.pn.pi_;
      _Val.pn.pi_->vfptr = 0;
      LOBYTE(v6->use_count_) = 0;
      v3 = v6;
    }
    v7 = (SlideListWin::ListItem *)v3;
  }
  else
  {
    v7 = 0;
  }
  v8 = v2->m_arrListItem._Myfirst;
  v15 = -1;
  _Val.px = v7;
  boost::detail::shared_count::shared_count(&_Val.pn, v7, 0);
  v9 = (char *)v8 - (char *)v2->m_arrListItem._Myfirst;
  v15 = 2;
  std::vector<boost::shared_ptr<SlideListWin::ListItem>,std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>::push_back(
    &v2->m_arrListItem,
    &_Val);
  v10 = v2->m_arrListItem._Mylast;
  v11 = &v2->m_arrListItem._Myfirst[v9 >> 3];
  if ( v11 != &v10[-1] && &v10[-1] != v10 )
    std::_Rotate<boost::shared_ptr<SlideListWin::ListItem> *,int,boost::shared_ptr<SlideListWin::ListItem>>(
      v11,
      v10 - 1,
      v10);
  v15 = -1;
  if ( _Val.pn.pi_ )
    boost::detail::sp_counted_base::release(_Val.pn.pi_);
  v12 = v2->m_arrListItem._Mylast - v2->m_arrListItem._Myfirst - v2->m_nMaxViewListCnt + 1;
  v2->m_nSlideSplitCnt = v12;
  if ( v12 <= 0 )
    v2->m_nSlideSplitCnt = 0;
  return 0;
}

//----- (00452DA0) --------------------------------------------------------
SLWCreateInfo::Item *__thiscall SLWCreateInfo::AddItemInfo(SLWCreateInfo *this, int nItemType)
{
  SLWCreateInfo *v2; // esi@1
  SLWCreateInfo::Item *v3; // eax@1
  SLWCreateInfo::Item *v4; // eax@2
  boost::shared_ptr<SLWCreateInfo::Item> spItem; // [sp+8h] [bp-18h]@4
  SLWCreateInfo::Item *v7; // [sp+10h] [bp-10h]@1
  int v8; // [sp+1Ch] [bp-4h]@1

  v2 = this;
  v3 = (SLWCreateInfo::Item *)operator new(0x60u);
  v7 = v3;
  v8 = 0;
  if ( v3 )
    SLWCreateInfo::Item::Item(v3);
  else
    v4 = 0;
  LOBYTE(v7) = 0;
  v8 = -1;
  spItem.px = v4;
  boost::detail::shared_count::shared_count(&spItem.pn, v4, 0);
  v8 = 1;
  std::vector<boost::shared_ptr<SLWCreateInfo::Item>,std::allocator<boost::shared_ptr<SLWCreateInfo::Item>>>::push_back(
    &v2->m_arrItem,
    &spItem);
  v8 = -1;
  if ( spItem.pn.pi_ )
    boost::detail::sp_counted_base::release(spItem.pn.pi_);
  return spItem.px;
}

//----- (00452E40) --------------------------------------------------------
void __thiscall boost::detail::sp_counted_base::destruct(boost::detail::sp_counted_base *this)
{
  if ( this )
    ((void (__stdcall *)(_DWORD))this->vfptr->__vecDelDtor)(1);
}

//----- (00452E50) --------------------------------------------------------
boost::detail::sp_counted_base_impl<PgNsTerrain::CPgBlockObject *,boost::checked_deleter<PgNsTerrain::CPgBlockObject> > *__thiscall boost::detail::sp_counted_base_impl<SlideListWin::ListItem *,boost::checked_deleter<SlideListWin::ListItem>>::`vector deleting destructor'(boost::detail::sp_counted_base_impl<PgNsTerrain::CPgBlockObject *,boost::checked_deleter<PgNsTerrain::CPgBlockObject> > *this, unsigned int a2)
{
  boost::detail::sp_counted_base_impl<PgNsTerrain::CPgBlockObject *,boost::checked_deleter<PgNsTerrain::CPgBlockObject> > *v2; // esi@1

  v2 = this;
  this->vfptr = (boost::detail::sp_counted_baseVtbl *)&boost::detail::sp_counted_base::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 97B058: using guessed type int (__thiscall *boost::detail::sp_counted_base::`vftable')(void *p, char);

//----- (00452E80) --------------------------------------------------------
boost::checked_deleter<SlideListWin::ListItem> *__thiscall boost::detail::sp_counted_base_impl<SlideListWin::ListItem *,boost::checked_deleter<SlideListWin::ListItem>>::get_deleter(boost::detail::sp_counted_base_impl<SlideListWin::ListItem *,boost::checked_deleter<SlideListWin::ListItem> > *this, type_info *ti)
{
  boost::detail::sp_counted_base_impl<SlideListWin::ListItem *,boost::checked_deleter<SlideListWin::ListItem> > *v2; // esi@1
  boost::checked_deleter<SlideListWin::ListItem> *result; // eax@2

  v2 = this;
  if ( type_info::operator==(ti, &boost::checked_deleter<SlideListWin::ListItem> `RTTI Type Descriptor') )
    result = &v2->del;
  else
    result = 0;
  return result;
}

//----- (00452EB0) --------------------------------------------------------
boost::checked_deleter<SLWCreateInfo::Item> *__thiscall boost::detail::sp_counted_base_impl<SLWCreateInfo::Item *,boost::checked_deleter<SLWCreateInfo::Item>>::get_deleter(boost::detail::sp_counted_base_impl<SLWCreateInfo::Item *,boost::checked_deleter<SLWCreateInfo::Item> > *this, type_info *ti)
{
  boost::detail::sp_counted_base_impl<SLWCreateInfo::Item *,boost::checked_deleter<SLWCreateInfo::Item> > *v2; // esi@1
  boost::checked_deleter<SLWCreateInfo::Item> *result; // eax@2

  v2 = this;
  if ( type_info::operator==(ti, &boost::checked_deleter<SLWCreateInfo::Item> `RTTI Type Descriptor') )
    result = &v2->del;
  else
    result = 0;
  return result;
}

//----- (00452EE0) --------------------------------------------------------
SlideListWin::ListItem::ColumnData *__stdcall std::allocator<SlideListWin::ListItem::ColumnData>::allocate(unsigned int _Count)
{
  SlideListWin::ListItem::ColumnData *result; // eax@1
  std::exception pExceptionObject; // [sp+0h] [bp-Ch]@4

  result = 0;
  if ( _Count )
  {
    if ( _Count > 0x5555555 || (result = (SlideListWin::ListItem::ColumnData *)operator new(48 * _Count)) == 0 )
    {
      _Count = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&_Count);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
  }
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00452F40) --------------------------------------------------------
boost::shared_ptr<SlideListWin::ListItem> *__cdecl std::_Move_backward<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem> *>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last, boost::shared_ptr<SlideListWin::ListItem> *_Dest)
{
  boost::shared_ptr<SlideListWin::ListItem> *v3; // eax@1
  SlideListWin::ListItem *v4; // edx@4
  int v5; // eax@4
  boost::detail::sp_counted_base *v6; // edi@4
  boost::detail::sp_counted_base *v7; // ebx@8
  int v8; // eax@11
  int v9; // ST14_4@15
  volatile LONG *v11; // [sp-14h] [bp-1Ch]@11
  boost::shared_ptr<SlideListWin::ListItem> *_Lasta; // [sp+14h] [bp+Ch]@4

  v3 = _Last;
  if ( _First != _Last )
  {
    while ( 1 )
    {
      v4 = v3[-1].px;
      v5 = (int)&v3[-1];
      _Dest[-1].px = v4;
      v6 = *(boost::detail::sp_counted_base **)(v5 + 4);
      _Lasta = (boost::shared_ptr<SlideListWin::ListItem> *)v5;
      --_Dest;
      if ( v6 )
      {
        while ( InterlockedExchange((volatile LONG *)&v6->mtx_.l_, 1) )
          Sleep(1u);
        ++v6->use_count_;
        InterlockedExchange((volatile LONG *)&v6->mtx_.l_, 0);
      }
      v7 = _Dest->pn.pi_;
      if ( v7 )
      {
        while ( InterlockedExchange((volatile LONG *)&v7->mtx_.l_, 1) )
          Sleep(1u);
        v8 = v7->use_count_ - 1;
        v7->use_count_ = v8;
        v11 = (volatile LONG *)&v7->mtx_.l_;
        if ( v8 )
        {
          InterlockedExchange(v11, 0);
        }
        else
        {
          InterlockedExchange(v11, 0);
          v7->vfptr->dispose(v7);
          while ( InterlockedExchange((volatile LONG *)&v7->mtx_.l_, 1) )
            Sleep(1u);
          v9 = v7->weak_count_ - 1;
          v7->weak_count_ = v9;
          InterlockedExchange((volatile LONG *)&v7->mtx_.l_, 0);
          if ( !v9 )
            v7->vfptr->destruct(v7);
        }
      }
      _Dest->pn.pi_ = v6;
      if ( _Lasta == _First )
        break;
      v3 = _Lasta;
    }
  }
  return _Dest;
}

//----- (00453050) --------------------------------------------------------
bool __thiscall SlideListWin::ListNumSorter::operator()(SlideListWin::ListNumSorter *this, boost::shared_ptr<SlideListWin::ListItem> *spItem1, boost::shared_ptr<SlideListWin::ListItem> *spItem2)
{
  int v3; // ecx@1
  SlideListWin::ListItem *v4; // esi@1
  bool result; // al@2
  SlideListWin::ListItem *v6; // edi@3
  const char *v7; // ebx@5
  int v8; // eax@6
  const char *v9; // esi@10
  int v10; // eax@11
  long double v11; // ST14_8@14

  v3 = this->m_nColumnNumForSort;
  v4 = spItem1->px;
  if ( v3 < spItem1->px->m_vecColumn._Mylast - spItem1->px->m_vecColumn._Myfirst )
  {
    v6 = spItem2->px;
    result = 0;
    if ( v3 < spItem2->px->m_vecColumn._Mylast - spItem2->px->m_vecColumn._Myfirst )
    {
      if ( v3 < (unsigned int)(v4->m_vecColumn._Mylast - v4->m_vecColumn._Myfirst) )
      {
        v8 = (int)&v4->m_vecColumn._Myfirst[v3];
        v7 = (const char *)(*(_DWORD *)(v8 + 20) < 0x10u ? &v4->m_vecColumn._Myfirst[v3] : *(_DWORD *)v8);
      }
      else
      {
        v7 = 0;
      }
      if ( v3 < (unsigned int)(v6->m_vecColumn._Mylast - v6->m_vecColumn._Myfirst) )
      {
        v10 = (int)&v6->m_vecColumn._Myfirst[v3];
        v9 = (const char *)(*(_DWORD *)(v10 + 20) < 0x10u ? &v6->m_vecColumn._Myfirst[v3] : *(_DWORD *)v10);
      }
      else
      {
        v9 = 0;
      }
      v11 = atof(v7);
      if ( atof(v9) > v11 )
        result = 1;
    }
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (00453150) --------------------------------------------------------
bool __thiscall SlideListWin::ListSorter::operator()(SlideListWin::ListSorter *this, boost::shared_ptr<SlideListWin::ListItem> *spItem1, boost::shared_ptr<SlideListWin::ListItem> *spItem2)
{
  int v3; // ecx@1
  SlideListWin::ListItem *v4; // edi@1
  bool result; // al@2
  SlideListWin::ListItem *v6; // esi@3
  const char *v7; // esi@6
  int v8; // eax@7
  int v9; // eax@11
  int v10; // kr00_4@14

  v3 = this->m_nColumnNumForSort;
  v4 = spItem1->px;
  if ( v3 < spItem1->px->m_vecColumn._Mylast - spItem1->px->m_vecColumn._Myfirst )
  {
    v6 = spItem2->px;
    if ( v3 < spItem2->px->m_vecColumn._Mylast - spItem2->px->m_vecColumn._Myfirst )
    {
      if ( v3 < (unsigned int)(v6->m_vecColumn._Mylast - v6->m_vecColumn._Myfirst) )
      {
        v8 = (int)&v6->m_vecColumn._Myfirst[v3];
        if ( *(_DWORD *)(v8 + 20) < 0x10u )
          v7 = v6->m_vecColumn._Myfirst[v3].m_strColumnText._Bx._Buf;
        else
          v7 = *(const char **)v8;
      }
      else
      {
        v7 = 0;
      }
      if ( v3 < (unsigned int)(v4->m_vecColumn._Mylast - v4->m_vecColumn._Myfirst) )
      {
        v9 = (int)&v4->m_vecColumn._Myfirst[v3];
        if ( *(_DWORD *)(v9 + 20) >= 0x10u )
          v9 = *(_DWORD *)v9;
      }
      else
      {
        v9 = 0;
      }
      v10 = strcmp((const char *)v9, v7);
      if ( v10 )
        result = -(v10 < 0) - ((v10 < 0) - 1) < 0;
      else
        result = 0;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (00453250) --------------------------------------------------------
void __stdcall std::allocator<boost::shared_ptr<SlideListWin::ListItem>>::construct(boost::shared_ptr<SLWCreateInfo::Item> *_Ptr, boost::shared_ptr<SLWCreateInfo::Item> *_Val)
{
  boost::detail::sp_counted_base *v3; // esi@2

  if ( _Ptr )
  {
    _Ptr->px = _Val->px;
    v3 = _Val->pn.pi_;
    _Ptr->pn.pi_ = v3;
    if ( v3 )
    {
      while ( InterlockedExchange((volatile LONG *)&v3->mtx_.l_, 1) )
        Sleep(1u);
      ++v3->use_count_;
      InterlockedExchange((volatile LONG *)&v3->mtx_.l_, 0);
    }
  }
}

//----- (004532A0) --------------------------------------------------------
boost::shared_ptr<SLWCreateInfo::Item> *__cdecl std::_Move<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem> *>(boost::shared_ptr<SLWCreateInfo::Item> *_First, boost::shared_ptr<SLWCreateInfo::Item> *_Last, boost::shared_ptr<SLWCreateInfo::Item> *_Dest)
{
  boost::shared_ptr<SLWCreateInfo::Item> *v3; // eax@1
  boost::detail::sp_counted_base *v4; // edi@4
  boost::detail::sp_counted_base *v5; // ebx@8
  int v6; // eax@11
  int v7; // ST14_4@15
  volatile LONG *v9; // [sp-14h] [bp-1Ch]@11

  v3 = _First;
  if ( _First != _Last )
  {
    while ( 1 )
    {
      _Dest->px = v3->px;
      v4 = v3->pn.pi_;
      if ( v4 )
      {
        while ( InterlockedExchange((volatile LONG *)&v4->mtx_.l_, 1) )
          Sleep(1u);
        ++v4->use_count_;
        InterlockedExchange((volatile LONG *)&v4->mtx_.l_, 0);
      }
      v5 = _Dest->pn.pi_;
      if ( v5 )
      {
        while ( InterlockedExchange((volatile LONG *)&v5->mtx_.l_, 1) )
          Sleep(1u);
        v6 = v5->use_count_ - 1;
        v5->use_count_ = v6;
        v9 = (volatile LONG *)&v5->mtx_.l_;
        if ( v6 )
        {
          InterlockedExchange(v9, 0);
        }
        else
        {
          InterlockedExchange(v9, 0);
          v5->vfptr->dispose(v5);
          while ( InterlockedExchange((volatile LONG *)&v5->mtx_.l_, 1) )
            Sleep(1u);
          v7 = v5->weak_count_ - 1;
          v5->weak_count_ = v7;
          InterlockedExchange((volatile LONG *)&v5->mtx_.l_, 0);
          if ( !v7 )
            v5->vfptr->destruct(v5);
        }
      }
      _Dest->pn.pi_ = v4;
      ++_Dest;
      ++_First;
      if ( _First == _Last )
        break;
      v3 = _First;
    }
  }
  return _Dest;
}

//----- (004533A0) --------------------------------------------------------
void __cdecl std::_Construct<boost::shared_ptr<SLWCreateInfo::Item>,boost::shared_ptr<SLWCreateInfo::Item> const &>(boost::shared_ptr<SLWCreateInfo::Item> *_Ptr, boost::shared_ptr<SLWCreateInfo::Item> *_Val)
{
  boost::detail::sp_counted_base *v2; // esi@2

  if ( _Ptr )
  {
    _Ptr->px = _Val->px;
    v2 = _Val->pn.pi_;
    _Ptr->pn.pi_ = v2;
    if ( v2 )
    {
      while ( InterlockedExchange((volatile LONG *)&v2->mtx_.l_, 1) )
        Sleep(1u);
      ++v2->use_count_;
      InterlockedExchange((volatile LONG *)&v2->mtx_.l_, 0);
    }
  }
}

//----- (004533F0) --------------------------------------------------------
void __cdecl std::_Push_heap<boost::shared_ptr<SlideListWin::ListItem> *,int,boost::shared_ptr<SlideListWin::ListItem>,SlideListWin::ListNumSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, int _Hole, int _Top, boost::shared_ptr<SlideListWin::ListItem> *_Val, SlideListWin::ListNumSorter _Pred)
{
  int v5; // eax@1
  boost::shared_ptr<SlideListWin::ListItem> *v6; // edi@4
  boost::shared_ptr<SlideListWin::ListItem> *v7; // ebx@4
  boost::detail::sp_counted_base *v8; // ebx@5
  boost::detail::sp_counted_base *v9; // edi@9
  int v10; // eax@12
  boost::detail::sp_counted_base *v11; // ebx@17
  volatile LONG *v12; // ebx@18
  boost::detail::sp_counted_base *v13; // ebx@21
  int v14; // eax@24
  volatile LONG *v15; // [sp-8h] [bp-1Ch]@12
  volatile LONG *v16; // [sp-8h] [bp-1Ch]@24
  int _Idx; // [sp+10h] [bp-4h]@1
  boost::detail::sp_counted_base *_Topa; // [sp+24h] [bp+10h]@17
  boost::shared_ptr<SlideListWin::ListItem> *_Vala; // [sp+28h] [bp+14h]@29

  v5 = (_Hole - 1) / 2;
  _Idx = (_Hole - 1) / 2;
  if ( _Top >= _Hole )
  {
LABEL_16:
    v6 = _First;
  }
  else
  {
    while ( 1 )
    {
      v6 = _First;
      v7 = &_First[v5];
      if ( !SlideListWin::ListNumSorter::operator()(&_Pred, &_First[v5], _Val) )
        break;
      _First[_Hole].px = v7->px;
      v8 = v7->pn.pi_;
      if ( v8 )
      {
        while ( InterlockedExchange((volatile LONG *)&v8->mtx_.l_, 1) )
          Sleep(1u);
        ++v8->use_count_;
        InterlockedExchange((volatile LONG *)&v8->mtx_.l_, 0);
        v6 = _First;
      }
      v9 = v6[_Hole].pn.pi_;
      if ( v9 )
      {
        while ( InterlockedExchange((volatile LONG *)&v9->mtx_.l_, 1) )
          Sleep(1u);
        v10 = v9->use_count_ - 1;
        v9->use_count_ = v10;
        v15 = (volatile LONG *)&v9->mtx_.l_;
        if ( v10 )
        {
          InterlockedExchange(v15, 0);
        }
        else
        {
          InterlockedExchange(v15, 0);
          v9->vfptr->dispose(v9);
          boost::detail::sp_counted_base::weak_release(v9);
        }
      }
      _First[_Hole].pn.pi_ = v8;
      _Hole = _Idx;
      _Idx = (_Idx - 1) / 2;
      if ( _Top >= _Hole )
        goto LABEL_16;
      v5 = _Idx;
    }
  }
  v6[_Hole].px = _Val->px;
  v11 = _Val->pn.pi_;
  _Topa = v11;
  if ( v11 )
  {
    v12 = (volatile LONG *)&v11->mtx_.l_;
    while ( InterlockedExchange(v12, 1) )
      Sleep(1u);
    ++_Topa->use_count_;
    InterlockedExchange(v12, 0);
  }
  v13 = v6[_Hole].pn.pi_;
  if ( v13 )
  {
    while ( InterlockedExchange((volatile LONG *)&v13->mtx_.l_, 1) )
      Sleep(1u);
    v14 = v13->use_count_ - 1;
    v13->use_count_ = v14;
    v16 = (volatile LONG *)&v13->mtx_.l_;
    if ( v14 )
    {
      InterlockedExchange(v16, 0);
LABEL_26:
      _First[_Hole].pn.pi_ = _Topa;
      return;
    }
    InterlockedExchange(v16, 0);
    v13->vfptr->dispose(v13);
    while ( InterlockedExchange((volatile LONG *)&v13->mtx_.l_, 1) )
      Sleep(1u);
    _Vala = (boost::shared_ptr<SlideListWin::ListItem> *)(v13->weak_count_ - 1);
    v13->weak_count_ = (int)_Vala;
    InterlockedExchange((volatile LONG *)&v13->mtx_.l_, 0);
    if ( _Vala )
      goto LABEL_26;
    v13->vfptr->destruct(v13);
    _First[_Hole].pn.pi_ = _Topa;
  }
  else
  {
    v6[_Hole].pn.pi_ = _Topa;
  }
}

//----- (004535F0) --------------------------------------------------------
void __cdecl std::_Push_heap<boost::shared_ptr<SlideListWin::ListItem> *,int,boost::shared_ptr<SlideListWin::ListItem>,SlideListWin::ListSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, int _Hole, int _Top, boost::shared_ptr<SlideListWin::ListItem> *_Val, SlideListWin::ListSorter _Pred)
{
  int v5; // eax@1
  boost::shared_ptr<SlideListWin::ListItem> *v6; // edi@4
  boost::shared_ptr<SlideListWin::ListItem> *v7; // ebx@4
  boost::detail::sp_counted_base *v8; // ebx@5
  boost::detail::sp_counted_base *v9; // edi@9
  int v10; // eax@12
  boost::detail::sp_counted_base *v11; // ebx@17
  volatile LONG *v12; // ebx@18
  boost::detail::sp_counted_base *v13; // ebx@21
  int v14; // eax@24
  volatile LONG *v15; // [sp-8h] [bp-1Ch]@12
  volatile LONG *v16; // [sp-8h] [bp-1Ch]@24
  int _Idx; // [sp+10h] [bp-4h]@1
  boost::detail::sp_counted_base *_Topa; // [sp+24h] [bp+10h]@17
  boost::shared_ptr<SlideListWin::ListItem> *_Vala; // [sp+28h] [bp+14h]@29

  v5 = (_Hole - 1) / 2;
  _Idx = (_Hole - 1) / 2;
  if ( _Top >= _Hole )
  {
LABEL_16:
    v6 = _First;
  }
  else
  {
    while ( 1 )
    {
      v6 = _First;
      v7 = &_First[v5];
      if ( !SlideListWin::ListSorter::operator()(&_Pred, &_First[v5], _Val) )
        break;
      _First[_Hole].px = v7->px;
      v8 = v7->pn.pi_;
      if ( v8 )
      {
        while ( InterlockedExchange((volatile LONG *)&v8->mtx_.l_, 1) )
          Sleep(1u);
        ++v8->use_count_;
        InterlockedExchange((volatile LONG *)&v8->mtx_.l_, 0);
        v6 = _First;
      }
      v9 = v6[_Hole].pn.pi_;
      if ( v9 )
      {
        while ( InterlockedExchange((volatile LONG *)&v9->mtx_.l_, 1) )
          Sleep(1u);
        v10 = v9->use_count_ - 1;
        v9->use_count_ = v10;
        v15 = (volatile LONG *)&v9->mtx_.l_;
        if ( v10 )
        {
          InterlockedExchange(v15, 0);
        }
        else
        {
          InterlockedExchange(v15, 0);
          v9->vfptr->dispose(v9);
          boost::detail::sp_counted_base::weak_release(v9);
        }
      }
      _First[_Hole].pn.pi_ = v8;
      _Hole = _Idx;
      _Idx = (_Idx - 1) / 2;
      if ( _Top >= _Hole )
        goto LABEL_16;
      v5 = _Idx;
    }
  }
  v6[_Hole].px = _Val->px;
  v11 = _Val->pn.pi_;
  _Topa = v11;
  if ( v11 )
  {
    v12 = (volatile LONG *)&v11->mtx_.l_;
    while ( InterlockedExchange(v12, 1) )
      Sleep(1u);
    ++_Topa->use_count_;
    InterlockedExchange(v12, 0);
  }
  v13 = v6[_Hole].pn.pi_;
  if ( v13 )
  {
    while ( InterlockedExchange((volatile LONG *)&v13->mtx_.l_, 1) )
      Sleep(1u);
    v14 = v13->use_count_ - 1;
    v13->use_count_ = v14;
    v16 = (volatile LONG *)&v13->mtx_.l_;
    if ( v14 )
    {
      InterlockedExchange(v16, 0);
LABEL_26:
      _First[_Hole].pn.pi_ = _Topa;
      return;
    }
    InterlockedExchange(v16, 0);
    v13->vfptr->dispose(v13);
    while ( InterlockedExchange((volatile LONG *)&v13->mtx_.l_, 1) )
      Sleep(1u);
    _Vala = (boost::shared_ptr<SlideListWin::ListItem> *)(v13->weak_count_ - 1);
    v13->weak_count_ = (int)_Vala;
    InterlockedExchange((volatile LONG *)&v13->mtx_.l_, 0);
    if ( _Vala )
      goto LABEL_26;
    v13->vfptr->destruct(v13);
    _First[_Hole].pn.pi_ = _Topa;
  }
  else
  {
    v6[_Hole].pn.pi_ = _Topa;
  }
}

//----- (004537F0) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::_Lbound(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Keyval)
{
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v3; // edi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v4; // edx@2
  unsigned int v5; // ebx@2
  const char *v6; // eax@4
  unsigned int v7; // esi@6
  unsigned int v8; // ecx@6
  int v9; // eax@10
  bool v10; // sf@10
  unsigned int v11; // [sp+4h] [bp-8h]@2
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *_Wherenode; // [sp+8h] [bp-4h]@1

  result = this->_Myhead;
  v3 = result->_Parent;
  _Wherenode = this->_Myhead;
  if ( !v3->_Isnil )
  {
    v4 = _Keyval;
    v5 = _Keyval->_Mysize;
    v11 = _Keyval->_Myres;
    while ( 1 )
    {
      v6 = v3->_Myval.first._Bx._Buf;
      if ( v11 >= 0x10 )
        v4 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v4->_Bx._Ptr;
      v7 = v3->_Myval.first._Mysize;
      v8 = v3->_Myval.first._Mysize;
      if ( v7 >= v5 )
        v8 = v5;
      if ( v3->_Myval.first._Myres >= 0x10 )
        v6 = *(const char **)v6;
      v9 = std::char_traits<char>::compare(v6, v4->_Bx._Buf, v8);
      v10 = v9 < 0;
      if ( !v9 )
      {
        if ( v7 < v5 )
          goto LABEL_14;
        LOBYTE(v9) = v7 != v5;
        v10 = v9 < 0;
      }
      if ( v10 )
      {
LABEL_14:
        v3 = v3->_Right;
        goto LABEL_16;
      }
      _Wherenode = v3;
      v3 = v3->_Left;
LABEL_16:
      if ( v3->_Isnil )
        return _Wherenode;
      v4 = _Keyval;
    }
  }
  return result;
}

//----- (00453880) --------------------------------------------------------
void __cdecl std::_Insertion_sort1<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListNumSorter,boost::shared_ptr<SlideListWin::ListItem>>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListNumSorter _Pred)
{
  boost::shared_ptr<SlideListWin::ListItem> *v3; // edi@2
  boost::detail::sp_counted_base *v4; // ebx@5
  SlideListWin::ListItem *v5; // ecx@5
  boost::shared_ptr<SlideListWin::ListItem> *v6; // ST04_4@10
  boost::shared_ptr<SlideListWin::ListItem> *v7; // edi@10
  boost::detail::sp_counted_base *v8; // edi@14
  int v9; // eax@17
  boost::shared_ptr<SlideListWin::ListItem> *v10; // ecx@18
  boost::shared_ptr<SlideListWin::ListItem> *v11; // edi@21
  boost::detail::sp_counted_base *v12; // edi@24
  boost::detail::sp_counted_base *v13; // ebx@28
  int v14; // eax@31
  boost::detail::sp_counted_base *v15; // edi@44
  int v16; // eax@47
  volatile LONG *v17; // ebx@56
  boost::detail::sp_counted_base *v18; // edi@58
  int v19; // eax@58
  volatile LONG *v20; // [sp-8h] [bp-44h]@31
  volatile LONG *v21; // [sp-8h] [bp-44h]@47
  boost::shared_ptr<SlideListWin::ListItem> _Val; // [sp+10h] [bp-2Ch]@5
  int v23; // [sp+18h] [bp-24h]@35
  boost::shared_ptr<SlideListWin::ListItem> *_First1; // [sp+1Ch] [bp-20h]@5
  boost::detail::sp_counted_base *v25; // [sp+20h] [bp-1Ch]@24
  boost::shared_ptr<SlideListWin::ListItem> *spItem2; // [sp+24h] [bp-18h]@3
  boost::shared_ptr<SlideListWin::ListItem> *_Next; // [sp+28h] [bp-14h]@2
  boost::shared_ptr<SlideListWin::ListItem> *_Next1; // [sp+2Ch] [bp-10h]@5
  int v29; // [sp+38h] [bp-4h]@9

  if ( _First != _Last )
  {
    v3 = _First + 1;
    _Next = _First + 1;
    if ( &_First[1] != _Last )
    {
      spItem2 = _First;
      while ( 1 )
      {
        v4 = spItem2[1].pn.pi_;
        v5 = v3->px;
        _Next1 = v3;
        _Val.px = v5;
        _First1 = spItem2 + 2;
        _Val.pn.pi_ = v4;
        if ( v4 )
        {
          while ( InterlockedExchange((volatile LONG *)&v4->mtx_.l_, 1) )
            Sleep(1u);
          ++v4->use_count_;
          InterlockedExchange((volatile LONG *)&v4->mtx_.l_, 0);
          v3 = _Next;
        }
        v29 = 0;
        if ( SlideListWin::ListNumSorter::operator()(&_Pred, &_Val, _First) )
        {
          v6 = v3;
          v7 = _First;
          std::_Move_backward<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem> *>(
            _First,
            v6,
            _First1);
          _First->px = _Val.px;
          if ( v4 )
          {
            while ( InterlockedExchange((volatile LONG *)&v4->mtx_.l_, 1) )
              Sleep(1u);
            ++v4->use_count_;
            InterlockedExchange((volatile LONG *)&v4->mtx_.l_, 0);
            v7 = _First;
          }
          v8 = v7->pn.pi_;
          if ( v8 )
          {
            _Next1 = (boost::shared_ptr<SlideListWin::ListItem> *)&v8->mtx_;
            while ( InterlockedExchange((volatile LONG *)_Next1, 1) )
              Sleep(1u);
            v9 = v8->use_count_ - 1;
            v8->use_count_ = v9;
            if ( v9 )
            {
              InterlockedExchange((volatile LONG *)_Next1, 0);
              v10 = _First;
              goto LABEL_55;
            }
            InterlockedExchange((volatile LONG *)_Next1, 0);
            v8->vfptr->dispose(v8);
            boost::detail::sp_counted_base::weak_release(v8);
          }
          v10 = _First;
        }
        else
        {
          v11 = spItem2;
          _First1 = spItem2;
          if ( SlideListWin::ListNumSorter::operator()(&_Pred, &_Val, spItem2) )
          {
            while ( 1 )
            {
              _Next1->px = v11->px;
              v12 = v11->pn.pi_;
              v25 = v12;
              if ( v12 )
              {
                while ( InterlockedExchange((volatile LONG *)&v12->mtx_.l_, 1) )
                  Sleep(1u);
                ++v12->use_count_;
                InterlockedExchange((volatile LONG *)&v12->mtx_.l_, 0);
              }
              v13 = _Next1->pn.pi_;
              if ( v13 )
              {
                while ( InterlockedExchange((volatile LONG *)&v13->mtx_.l_, 1) )
                  Sleep(1u);
                v14 = v13->use_count_ - 1;
                v13->use_count_ = v14;
                v20 = (volatile LONG *)&v13->mtx_.l_;
                if ( v14 )
                {
                  InterlockedExchange(v20, 0);
                }
                else
                {
                  InterlockedExchange(v20, 0);
                  v13->vfptr->dispose(v13);
                  while ( InterlockedExchange((volatile LONG *)&v13->mtx_.l_, 1) )
                    Sleep(1u);
                  v23 = v13->weak_count_ - 1;
                  v13->weak_count_ = v23;
                  InterlockedExchange((volatile LONG *)&v13->mtx_.l_, 0);
                  if ( !v23 )
                    v13->vfptr->destruct(v13);
                }
                v12 = v25;
              }
              _Next1->pn.pi_ = v12;
              _Next1 = _First1;
              --_First1;
              if ( !SlideListWin::ListNumSorter::operator()(&_Pred, &_Val, _First1) )
                break;
              v11 = _First1;
            }
            v4 = _Val.pn.pi_;
          }
          _Next1->px = _Val.px;
          if ( v4 )
          {
            while ( InterlockedExchange((volatile LONG *)&v4->mtx_.l_, 1) )
              Sleep(1u);
            ++v4->use_count_;
            InterlockedExchange((volatile LONG *)&v4->mtx_.l_, 0);
          }
          v15 = _Next1->pn.pi_;
          if ( v15 )
          {
            while ( InterlockedExchange((volatile LONG *)&v15->mtx_.l_, 1) )
              Sleep(1u);
            v16 = v15->use_count_ - 1;
            v15->use_count_ = v16;
            v21 = (volatile LONG *)&v15->mtx_.l_;
            if ( v16 )
            {
              InterlockedExchange(v21, 0);
            }
            else
            {
              InterlockedExchange(v21, 0);
              v15->vfptr->dispose(v15);
              while ( InterlockedExchange((volatile LONG *)&v15->mtx_.l_, 1) )
                Sleep(1u);
              v23 = v15->weak_count_ - 1;
              v15->weak_count_ = v23;
              InterlockedExchange((volatile LONG *)&v15->mtx_.l_, 0);
              if ( !v23 )
                v15->vfptr->destruct(v15);
            }
            v4 = _Val.pn.pi_;
          }
          v10 = _Next1;
        }
LABEL_55:
        v10->pn.pi_ = v4;
        v29 = -1;
        if ( v4 )
        {
          v17 = (volatile LONG *)&v4->mtx_.l_;
          while ( InterlockedExchange(v17, 1) )
            Sleep(1u);
          v18 = _Val.pn.pi_;
          v19 = _Val.pn.pi_->use_count_ - 1;
          _Val.pn.pi_->use_count_ = v19;
          if ( v19 )
          {
            InterlockedExchange(v17, 0);
          }
          else
          {
            InterlockedExchange(v17, 0);
            v18->vfptr->dispose(v18);
            while ( InterlockedExchange(v17, 1) )
              Sleep(1u);
            v23 = v18->weak_count_ - 1;
            v18->weak_count_ = v23;
            InterlockedExchange(v17, 0);
            if ( !v23 )
              v18->vfptr->destruct(v18);
          }
        }
        ++spItem2;
        ++_Next;
        if ( _Next == _Last )
          return;
        v3 = _Next;
      }
    }
  }
}

//----- (00453C50) --------------------------------------------------------
void __cdecl std::_Insertion_sort1<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListSorter,boost::shared_ptr<SlideListWin::ListItem>>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListSorter _Pred)
{
  boost::shared_ptr<SlideListWin::ListItem> *v3; // edi@2
  boost::detail::sp_counted_base *v4; // ebx@5
  SlideListWin::ListItem *v5; // ecx@5
  boost::shared_ptr<SlideListWin::ListItem> *v6; // ST04_4@10
  boost::shared_ptr<SlideListWin::ListItem> *v7; // edi@10
  boost::detail::sp_counted_base *v8; // edi@14
  int v9; // eax@17
  boost::shared_ptr<SlideListWin::ListItem> *v10; // ecx@18
  boost::shared_ptr<SlideListWin::ListItem> *v11; // edi@21
  boost::detail::sp_counted_base *v12; // edi@24
  boost::detail::sp_counted_base *v13; // ebx@28
  int v14; // eax@31
  boost::detail::sp_counted_base *v15; // edi@44
  int v16; // eax@47
  volatile LONG *v17; // ebx@56
  boost::detail::sp_counted_base *v18; // edi@58
  int v19; // eax@58
  volatile LONG *v20; // [sp-8h] [bp-44h]@31
  volatile LONG *v21; // [sp-8h] [bp-44h]@47
  boost::shared_ptr<SlideListWin::ListItem> _Val; // [sp+10h] [bp-2Ch]@5
  int v23; // [sp+18h] [bp-24h]@35
  boost::shared_ptr<SlideListWin::ListItem> *_First1; // [sp+1Ch] [bp-20h]@5
  boost::detail::sp_counted_base *v25; // [sp+20h] [bp-1Ch]@24
  boost::shared_ptr<SlideListWin::ListItem> *spItem2; // [sp+24h] [bp-18h]@3
  boost::shared_ptr<SlideListWin::ListItem> *_Next; // [sp+28h] [bp-14h]@2
  boost::shared_ptr<SlideListWin::ListItem> *_Next1; // [sp+2Ch] [bp-10h]@5
  int v29; // [sp+38h] [bp-4h]@9

  if ( _First != _Last )
  {
    v3 = _First + 1;
    _Next = _First + 1;
    if ( &_First[1] != _Last )
    {
      spItem2 = _First;
      while ( 1 )
      {
        v4 = spItem2[1].pn.pi_;
        v5 = v3->px;
        _Next1 = v3;
        _Val.px = v5;
        _First1 = spItem2 + 2;
        _Val.pn.pi_ = v4;
        if ( v4 )
        {
          while ( InterlockedExchange((volatile LONG *)&v4->mtx_.l_, 1) )
            Sleep(1u);
          ++v4->use_count_;
          InterlockedExchange((volatile LONG *)&v4->mtx_.l_, 0);
          v3 = _Next;
        }
        v29 = 0;
        if ( SlideListWin::ListSorter::operator()(&_Pred, &_Val, _First) )
        {
          v6 = v3;
          v7 = _First;
          std::_Move_backward<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem> *>(
            _First,
            v6,
            _First1);
          _First->px = _Val.px;
          if ( v4 )
          {
            while ( InterlockedExchange((volatile LONG *)&v4->mtx_.l_, 1) )
              Sleep(1u);
            ++v4->use_count_;
            InterlockedExchange((volatile LONG *)&v4->mtx_.l_, 0);
            v7 = _First;
          }
          v8 = v7->pn.pi_;
          if ( v8 )
          {
            _Next1 = (boost::shared_ptr<SlideListWin::ListItem> *)&v8->mtx_;
            while ( InterlockedExchange((volatile LONG *)_Next1, 1) )
              Sleep(1u);
            v9 = v8->use_count_ - 1;
            v8->use_count_ = v9;
            if ( v9 )
            {
              InterlockedExchange((volatile LONG *)_Next1, 0);
              v10 = _First;
              goto LABEL_55;
            }
            InterlockedExchange((volatile LONG *)_Next1, 0);
            v8->vfptr->dispose(v8);
            boost::detail::sp_counted_base::weak_release(v8);
          }
          v10 = _First;
        }
        else
        {
          v11 = spItem2;
          _First1 = spItem2;
          if ( SlideListWin::ListSorter::operator()(&_Pred, &_Val, spItem2) )
          {
            while ( 1 )
            {
              _Next1->px = v11->px;
              v12 = v11->pn.pi_;
              v25 = v12;
              if ( v12 )
              {
                while ( InterlockedExchange((volatile LONG *)&v12->mtx_.l_, 1) )
                  Sleep(1u);
                ++v12->use_count_;
                InterlockedExchange((volatile LONG *)&v12->mtx_.l_, 0);
              }
              v13 = _Next1->pn.pi_;
              if ( v13 )
              {
                while ( InterlockedExchange((volatile LONG *)&v13->mtx_.l_, 1) )
                  Sleep(1u);
                v14 = v13->use_count_ - 1;
                v13->use_count_ = v14;
                v20 = (volatile LONG *)&v13->mtx_.l_;
                if ( v14 )
                {
                  InterlockedExchange(v20, 0);
                }
                else
                {
                  InterlockedExchange(v20, 0);
                  v13->vfptr->dispose(v13);
                  while ( InterlockedExchange((volatile LONG *)&v13->mtx_.l_, 1) )
                    Sleep(1u);
                  v23 = v13->weak_count_ - 1;
                  v13->weak_count_ = v23;
                  InterlockedExchange((volatile LONG *)&v13->mtx_.l_, 0);
                  if ( !v23 )
                    v13->vfptr->destruct(v13);
                }
                v12 = v25;
              }
              _Next1->pn.pi_ = v12;
              _Next1 = _First1;
              --_First1;
              if ( !SlideListWin::ListSorter::operator()(&_Pred, &_Val, _First1) )
                break;
              v11 = _First1;
            }
            v4 = _Val.pn.pi_;
          }
          _Next1->px = _Val.px;
          if ( v4 )
          {
            while ( InterlockedExchange((volatile LONG *)&v4->mtx_.l_, 1) )
              Sleep(1u);
            ++v4->use_count_;
            InterlockedExchange((volatile LONG *)&v4->mtx_.l_, 0);
          }
          v15 = _Next1->pn.pi_;
          if ( v15 )
          {
            while ( InterlockedExchange((volatile LONG *)&v15->mtx_.l_, 1) )
              Sleep(1u);
            v16 = v15->use_count_ - 1;
            v15->use_count_ = v16;
            v21 = (volatile LONG *)&v15->mtx_.l_;
            if ( v16 )
            {
              InterlockedExchange(v21, 0);
            }
            else
            {
              InterlockedExchange(v21, 0);
              v15->vfptr->dispose(v15);
              while ( InterlockedExchange((volatile LONG *)&v15->mtx_.l_, 1) )
                Sleep(1u);
              v23 = v15->weak_count_ - 1;
              v15->weak_count_ = v23;
              InterlockedExchange((volatile LONG *)&v15->mtx_.l_, 0);
              if ( !v23 )
                v15->vfptr->destruct(v15);
            }
            v4 = _Val.pn.pi_;
          }
          v10 = _Next1;
        }
LABEL_55:
        v10->pn.pi_ = v4;
        v29 = -1;
        if ( v4 )
        {
          v17 = (volatile LONG *)&v4->mtx_.l_;
          while ( InterlockedExchange(v17, 1) )
            Sleep(1u);
          v18 = _Val.pn.pi_;
          v19 = _Val.pn.pi_->use_count_ - 1;
          _Val.pn.pi_->use_count_ = v19;
          if ( v19 )
          {
            InterlockedExchange(v17, 0);
          }
          else
          {
            InterlockedExchange(v17, 0);
            v18->vfptr->dispose(v18);
            while ( InterlockedExchange(v17, 1) )
              Sleep(1u);
            v23 = v18->weak_count_ - 1;
            v18->weak_count_ = v23;
            InterlockedExchange(v17, 0);
            if ( !v23 )
              v18->vfptr->destruct(v18);
          }
        }
        ++spItem2;
        ++_Next;
        if ( _Next == _Last )
          return;
        v3 = _Next;
      }
    }
  }
}

//----- (00454020) --------------------------------------------------------
void __cdecl std::_Med3<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListNumSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Mid, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListNumSorter _Pred)
{
  SlideListWin::ListItem *v4; // eax@2
  boost::detail::sp_counted_base *v5; // eax@2
  SlideListWin::ListItem *v6; // eax@4
  boost::detail::sp_counted_base *v7; // eax@4
  SlideListWin::ListItem *v8; // eax@6
  boost::detail::sp_counted_base *v9; // eax@6

  if ( SlideListWin::ListNumSorter::operator()(&_Pred, _Mid, _First) )
  {
    v4 = _Mid->px;
    _Mid->px = _First->px;
    _First->px = v4;
    v5 = _First->pn.pi_;
    _First->pn.pi_ = _Mid->pn.pi_;
    _Mid->pn.pi_ = v5;
  }
  if ( SlideListWin::ListNumSorter::operator()(&_Pred, _Last, _Mid) )
  {
    v6 = _Last->px;
    _Last->px = _Mid->px;
    _Mid->px = v6;
    v7 = _Mid->pn.pi_;
    _Mid->pn.pi_ = _Last->pn.pi_;
    _Last->pn.pi_ = v7;
  }
  if ( SlideListWin::ListNumSorter::operator()(&_Pred, _Mid, _First) )
  {
    v8 = _Mid->px;
    _Mid->px = _First->px;
    _First->px = v8;
    v9 = _First->pn.pi_;
    _First->pn.pi_ = _Mid->pn.pi_;
    _Mid->pn.pi_ = v9;
  }
}

//----- (004540A0) --------------------------------------------------------
void __cdecl std::_Adjust_heap<boost::shared_ptr<SlideListWin::ListItem> *,int,boost::shared_ptr<SlideListWin::ListItem>,SlideListWin::ListNumSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, int _Hole, int _Bottom, boost::shared_ptr<SlideListWin::ListItem> *_Val, SlideListWin::ListNumSorter _Pred)
{
  int v5; // edi@1
  boost::shared_ptr<SlideListWin::ListItem> *v6; // ebx@2
  boost::detail::sp_counted_base *v7; // edi@4
  boost::detail::sp_counted_base *v8; // ebx@8
  int v9; // eax@11
  int v10; // ST24_4@15
  int v11; // ecx@17
  boost::shared_ptr<SlideListWin::ListItem> *v12; // ebx@17
  boost::detail::sp_counted_base *v13; // edi@21
  boost::detail::sp_counted_base *v14; // edi@25
  int v15; // eax@28
  volatile LONG *v16; // [sp-8h] [bp-24h]@11
  volatile LONG *v17; // [sp-8h] [bp-24h]@28
  int _Top; // [sp+Ch] [bp-10h]@1
  boost::detail::sp_counted_base *v19; // [sp+10h] [bp-Ch]@21
  volatile LONG *Target; // [sp+14h] [bp-8h]@22
  int _Idx; // [sp+18h] [bp-4h]@1

  v5 = 2 * _Hole + 2;
  _Top = _Hole;
  _Idx = v5;
  if ( v5 >= _Bottom )
  {
    v12 = _First;
  }
  else
  {
    do
    {
      v6 = _First;
      if ( SlideListWin::ListNumSorter::operator()(&_Pred, &_First[v5], &_First[v5 - 1]) )
        _Idx = --v5;
      _First[_Hole].px = _First[v5].px;
      v7 = _First[v5].pn.pi_;
      if ( v7 )
      {
        while ( InterlockedExchange((volatile LONG *)&v7->mtx_.l_, 1) )
          Sleep(1u);
        ++v7->use_count_;
        InterlockedExchange((volatile LONG *)&v7->mtx_.l_, 0);
        v6 = _First;
      }
      v8 = v6[_Hole].pn.pi_;
      if ( v8 )
      {
        while ( InterlockedExchange((volatile LONG *)&v8->mtx_.l_, 1) )
          Sleep(1u);
        v9 = v8->use_count_ - 1;
        v8->use_count_ = v9;
        v16 = (volatile LONG *)&v8->mtx_.l_;
        if ( v9 )
        {
          InterlockedExchange(v16, 0);
        }
        else
        {
          InterlockedExchange(v16, 0);
          v8->vfptr->dispose(v8);
          while ( InterlockedExchange((volatile LONG *)&v8->mtx_.l_, 1) )
            Sleep(1u);
          v10 = v8->weak_count_ - 1;
          v8->weak_count_ = v10;
          InterlockedExchange((volatile LONG *)&v8->mtx_.l_, 0);
          if ( !v10 )
            v8->vfptr->destruct(v8);
        }
      }
      v11 = _Hole;
      v12 = _First;
      _Hole = _Idx;
      _First[v11].pn.pi_ = v7;
      _Idx = 2 * _Idx + 2;
      v5 = _Idx;
    }
    while ( _Idx < _Bottom );
  }
  if ( v5 == _Bottom )
  {
    v12[_Hole].px = v12[_Bottom - 1].px;
    v13 = (boost::detail::sp_counted_base *)*((_DWORD *)&v12[_Bottom] - 1);
    v19 = v13;
    if ( v13 )
    {
      Target = (volatile LONG *)&v13->mtx_.l_;
      while ( InterlockedExchange(Target, 1) )
        Sleep(1u);
      ++v13->use_count_;
      InterlockedExchange(Target, 0);
    }
    v14 = v12[_Hole].pn.pi_;
    if ( v14 )
    {
      while ( InterlockedExchange((volatile LONG *)&v14->mtx_.l_, 1) )
        Sleep(1u);
      v15 = v14->use_count_ - 1;
      v14->use_count_ = v15;
      v17 = (volatile LONG *)&v14->mtx_.l_;
      if ( v15 )
      {
        InterlockedExchange(v17, 0);
      }
      else
      {
        InterlockedExchange(v17, 0);
        v14->vfptr->dispose(v14);
        boost::detail::sp_counted_base::weak_release(v14);
      }
      v12 = _First;
    }
    v12[_Hole].pn.pi_ = v19;
    _Hole = _Bottom - 1;
  }
  std::_Push_heap<boost::shared_ptr<SlideListWin::ListItem> *,int,boost::shared_ptr<SlideListWin::ListItem>,SlideListWin::ListNumSorter>(
    v12,
    _Hole,
    _Top,
    _Val,
    _Pred);
}

//----- (00454290) --------------------------------------------------------
void __cdecl std::_Med3<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Mid, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListSorter _Pred)
{
  SlideListWin::ListItem *v4; // eax@2
  boost::detail::sp_counted_base *v5; // eax@2
  SlideListWin::ListItem *v6; // eax@4
  boost::detail::sp_counted_base *v7; // eax@4
  SlideListWin::ListItem *v8; // eax@6
  boost::detail::sp_counted_base *v9; // eax@6

  if ( SlideListWin::ListSorter::operator()(&_Pred, _Mid, _First) )
  {
    v4 = _Mid->px;
    _Mid->px = _First->px;
    _First->px = v4;
    v5 = _First->pn.pi_;
    _First->pn.pi_ = _Mid->pn.pi_;
    _Mid->pn.pi_ = v5;
  }
  if ( SlideListWin::ListSorter::operator()(&_Pred, _Last, _Mid) )
  {
    v6 = _Last->px;
    _Last->px = _Mid->px;
    _Mid->px = v6;
    v7 = _Mid->pn.pi_;
    _Mid->pn.pi_ = _Last->pn.pi_;
    _Last->pn.pi_ = v7;
  }
  if ( SlideListWin::ListSorter::operator()(&_Pred, _Mid, _First) )
  {
    v8 = _Mid->px;
    _Mid->px = _First->px;
    _First->px = v8;
    v9 = _First->pn.pi_;
    _First->pn.pi_ = _Mid->pn.pi_;
    _Mid->pn.pi_ = v9;
  }
}

//----- (00454310) --------------------------------------------------------
void __cdecl std::_Adjust_heap<boost::shared_ptr<SlideListWin::ListItem> *,int,boost::shared_ptr<SlideListWin::ListItem>,SlideListWin::ListSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, int _Hole, int _Bottom, boost::shared_ptr<SlideListWin::ListItem> *_Val, SlideListWin::ListSorter _Pred)
{
  int v5; // edi@1
  boost::shared_ptr<SlideListWin::ListItem> *v6; // ebx@2
  boost::detail::sp_counted_base *v7; // edi@4
  boost::detail::sp_counted_base *v8; // ebx@8
  int v9; // eax@11
  int v10; // ST24_4@15
  int v11; // ecx@17
  boost::shared_ptr<SlideListWin::ListItem> *v12; // ebx@17
  boost::detail::sp_counted_base *v13; // edi@21
  boost::detail::sp_counted_base *v14; // edi@25
  int v15; // eax@28
  volatile LONG *v16; // [sp-8h] [bp-24h]@11
  volatile LONG *v17; // [sp-8h] [bp-24h]@28
  int _Top; // [sp+Ch] [bp-10h]@1
  boost::detail::sp_counted_base *v19; // [sp+10h] [bp-Ch]@21
  volatile LONG *Target; // [sp+14h] [bp-8h]@22
  int _Idx; // [sp+18h] [bp-4h]@1

  v5 = 2 * _Hole + 2;
  _Top = _Hole;
  _Idx = v5;
  if ( v5 >= _Bottom )
  {
    v12 = _First;
  }
  else
  {
    do
    {
      v6 = _First;
      if ( SlideListWin::ListSorter::operator()(&_Pred, &_First[v5], &_First[v5 - 1]) )
        _Idx = --v5;
      _First[_Hole].px = _First[v5].px;
      v7 = _First[v5].pn.pi_;
      if ( v7 )
      {
        while ( InterlockedExchange((volatile LONG *)&v7->mtx_.l_, 1) )
          Sleep(1u);
        ++v7->use_count_;
        InterlockedExchange((volatile LONG *)&v7->mtx_.l_, 0);
        v6 = _First;
      }
      v8 = v6[_Hole].pn.pi_;
      if ( v8 )
      {
        while ( InterlockedExchange((volatile LONG *)&v8->mtx_.l_, 1) )
          Sleep(1u);
        v9 = v8->use_count_ - 1;
        v8->use_count_ = v9;
        v16 = (volatile LONG *)&v8->mtx_.l_;
        if ( v9 )
        {
          InterlockedExchange(v16, 0);
        }
        else
        {
          InterlockedExchange(v16, 0);
          v8->vfptr->dispose(v8);
          while ( InterlockedExchange((volatile LONG *)&v8->mtx_.l_, 1) )
            Sleep(1u);
          v10 = v8->weak_count_ - 1;
          v8->weak_count_ = v10;
          InterlockedExchange((volatile LONG *)&v8->mtx_.l_, 0);
          if ( !v10 )
            v8->vfptr->destruct(v8);
        }
      }
      v11 = _Hole;
      v12 = _First;
      _Hole = _Idx;
      _First[v11].pn.pi_ = v7;
      _Idx = 2 * _Idx + 2;
      v5 = _Idx;
    }
    while ( _Idx < _Bottom );
  }
  if ( v5 == _Bottom )
  {
    v12[_Hole].px = v12[_Bottom - 1].px;
    v13 = (boost::detail::sp_counted_base *)*((_DWORD *)&v12[_Bottom] - 1);
    v19 = v13;
    if ( v13 )
    {
      Target = (volatile LONG *)&v13->mtx_.l_;
      while ( InterlockedExchange(Target, 1) )
        Sleep(1u);
      ++v13->use_count_;
      InterlockedExchange(Target, 0);
    }
    v14 = v12[_Hole].pn.pi_;
    if ( v14 )
    {
      while ( InterlockedExchange((volatile LONG *)&v14->mtx_.l_, 1) )
        Sleep(1u);
      v15 = v14->use_count_ - 1;
      v14->use_count_ = v15;
      v17 = (volatile LONG *)&v14->mtx_.l_;
      if ( v15 )
      {
        InterlockedExchange(v17, 0);
      }
      else
      {
        InterlockedExchange(v17, 0);
        v14->vfptr->dispose(v14);
        boost::detail::sp_counted_base::weak_release(v14);
      }
      v12 = _First;
    }
    v12[_Hole].pn.pi_ = v19;
    _Hole = _Bottom - 1;
  }
  std::_Push_heap<boost::shared_ptr<SlideListWin::ListItem> *,int,boost::shared_ptr<SlideListWin::ListItem>,SlideListWin::ListSorter>(
    v12,
    _Hole,
    _Top,
    _Val,
    _Pred);
}

//----- (00454500) --------------------------------------------------------
void __cdecl std::_Rotate<boost::shared_ptr<SlideListWin::ListItem> *,int,boost::shared_ptr<SlideListWin::ListItem>>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Mid, boost::shared_ptr<SlideListWin::ListItem> *_Last)
{
  boost::shared_ptr<SlideListWin::ListItem> *v3; // edx@1
  boost::shared_ptr<SlideListWin::ListItem> *v4; // ebx@1
  signed int v5; // edi@1
  signed int v6; // eax@1
  signed int v7; // esi@1
  int v8; // edx@2
  int v9; // edx@6
  boost::shared_ptr<SlideListWin::ListItem> *v10; // ecx@7
  boost::shared_ptr<SlideListWin::ListItem> *v11; // esi@7
  SlideListWin::ListItem *v12; // edx@9
  boost::detail::sp_counted_base *v13; // edx@9
  int v14; // edx@9
  boost::shared_ptr<SlideListWin::ListItem> *_Mida; // [sp+18h] [bp+Ch]@6

  v3 = _First;
  v4 = _Last;
  v5 = _Mid - _First;
  v6 = _Last - _First;
  v7 = v5;
  if ( v5 )
  {
    do
    {
      v8 = v6 % v7;
      v6 = v7;
      v7 = v8;
    }
    while ( v8 );
    v3 = _First;
  }
  if ( v6 < _Last - _First && v6 > 0 )
  {
    v9 = (int)&v3[v6];
    _Mida = (boost::shared_ptr<SlideListWin::ListItem> *)v9;
    do
    {
      v10 = (boost::shared_ptr<SlideListWin::ListItem> *)(v9 + 8 * v5);
      v11 = (boost::shared_ptr<SlideListWin::ListItem> *)v9;
      if ( v10 == v4 )
        v10 = _First;
      do
      {
        v12 = v11->px;
        v11->px = v10->px;
        v10->px = v12;
        v13 = v10->pn.pi_;
        v10->pn.pi_ = v11->pn.pi_;
        v4 = _Last;
        v11->pn.pi_ = v13;
        v14 = _Last - v10;
        v11 = v10;
        if ( v5 >= v14 )
          v10 = &_First[v5 - v14];
        else
          v10 += v5;
      }
      while ( v10 != _Mida );
      --v6;
      v9 = (int)&_Mida[-1];
      --_Mida;
    }
    while ( v6 > 0 );
  }
}

//----- (004545A0) --------------------------------------------------------
void __cdecl std::_Reverse<boost::shared_ptr<SlideListWin::ListItem> *>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last)
{
  boost::shared_ptr<SlideListWin::ListItem> *v2; // eax@1
  boost::shared_ptr<SlideListWin::ListItem> *i; // ecx@1
  SlideListWin::ListItem *v4; // edx@3
  boost::detail::sp_counted_base *v5; // edx@3

  v2 = _First;
  for ( i = _Last; v2 != i; ++v2 )
  {
    --i;
    if ( v2 == i )
      break;
    v4 = v2->px;
    v2->px = i->px;
    i->px = v4;
    v5 = i->pn.pi_;
    i->pn.pi_ = v2->pn.pi_;
    v2->pn.pi_ = v5;
  }
}

//----- (004545E0) --------------------------------------------------------
boost::shared_ptr<SLWCreateInfo::Item> *__cdecl std::_Uninit_move<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem> *,std::allocator<boost::shared_ptr<SlideListWin::ListItem>>,boost::shared_ptr<SlideListWin::ListItem>>(boost::shared_ptr<SLWCreateInfo::Item> *_First, boost::shared_ptr<SLWCreateInfo::Item> *_Last, boost::shared_ptr<SLWCreateInfo::Item> *_Dest)
{
  boost::shared_ptr<SLWCreateInfo::Item> *v3; // ecx@1
  boost::shared_ptr<SLWCreateInfo::Item> *v4; // eax@2
  boost::detail::sp_counted_base *v5; // esi@3
  boost::shared_ptr<SLWCreateInfo::Item> *result; // eax@7

  v3 = _First;
  if ( _First == _Last )
  {
    result = _Dest;
  }
  else
  {
    do
    {
      v4 = _Dest;
      if ( _Dest )
      {
        _Dest->px = v3->px;
        v5 = v3->pn.pi_;
        _Dest->pn.pi_ = v5;
        if ( v5 )
        {
          while ( InterlockedExchange((volatile LONG *)&v5->mtx_.l_, 1) )
            Sleep(1u);
          ++v5->use_count_;
          InterlockedExchange((volatile LONG *)&v5->mtx_.l_, 0);
          v4 = _Dest;
          v3 = _First;
        }
      }
      ++v3;
      result = v4 + 1;
      _Dest = result;
      _First = v3;
    }
    while ( v3 != _Last );
  }
  return result;
}

//----- (00454660) --------------------------------------------------------
void __cdecl std::_Median<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListNumSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Mid, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListNumSorter _Pred)
{
  signed int v4; // eax@1
  int v5; // eax@2
  int v6; // edi@2
  unsigned int v7; // ebx@2
  boost::shared_ptr<SlideListWin::ListItem> *v8; // edx@2
  boost::shared_ptr<SlideListWin::ListItem> *v9; // ST30_4@2
  boost::shared_ptr<SlideListWin::ListItem> *_Firsta; // [sp+Ch] [bp+8h]@2

  v4 = _Last - _First;
  if ( v4 <= 40 )
  {
    std::_Med3<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListNumSorter>(_First, _Mid, _Last, _Pred);
  }
  else
  {
    v5 = (v4 + 1) / 8;
    v6 = 16 * v5;
    v7 = 8 * v5;
    v8 = &_First[2 * v5];
    v9 = _First;
    _Firsta = &_First[v5];
    std::_Med3<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListNumSorter>(v9, _Firsta, v8, _Pred);
    std::_Med3<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListNumSorter>(
      &_Mid[-v7 / 8],
      _Mid,
      &_Mid[v7 / 8],
      _Pred);
    std::_Med3<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListNumSorter>(
      &_Last[-v6 / 8u],
      &_Last[-v7 / 8],
      _Last,
      _Pred);
    std::_Med3<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListNumSorter>(
      _Firsta,
      _Mid,
      &_Last[-v7 / 8],
      _Pred);
  }
}

//----- (00454700) --------------------------------------------------------
void __cdecl std::_Make_heap<boost::shared_ptr<SlideListWin::ListItem> *,int,boost::shared_ptr<SlideListWin::ListItem>,SlideListWin::ListNumSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListNumSorter _Pred)
{
  boost::shared_ptr<SlideListWin::ListItem> *v3; // ecx@1
  int v4; // ebx@1
  boost::detail::sp_counted_base *v5; // esi@4
  SlideListWin::ListItem *v6; // eax@4
  int v7; // eax@11
  volatile LONG *v8; // [sp-8h] [bp-34h]@11
  boost::shared_ptr<SlideListWin::ListItem> _Val; // [sp+10h] [bp-1Ch]@4
  int v10; // [sp+18h] [bp-14h]@15
  int _Bottom; // [sp+1Ch] [bp-10h]@1
  int v12; // [sp+28h] [bp-4h]@8

  v3 = _First;
  _Bottom = _Last - _First;
  v4 = _Bottom / 2;
  if ( _Bottom / 2 > 0 )
  {
    while ( 1 )
    {
      v5 = (boost::detail::sp_counted_base *)*((_DWORD *)&v3[v4] - 1);
      v6 = v3[v4-- - 1].px;
      _Val.px = v6;
      _Val.pn.pi_ = v5;
      if ( v5 )
      {
        while ( InterlockedExchange((volatile LONG *)&v5->mtx_.l_, 1) )
          Sleep(1u);
        ++v5->use_count_;
        InterlockedExchange((volatile LONG *)&v5->mtx_.l_, 0);
        v3 = _First;
      }
      v12 = 0;
      std::_Adjust_heap<boost::shared_ptr<SlideListWin::ListItem> *,int,boost::shared_ptr<SlideListWin::ListItem>,SlideListWin::ListNumSorter>(
        v3,
        v4,
        _Bottom,
        &_Val,
        _Pred);
      v12 = -1;
      if ( v5 )
      {
        while ( InterlockedExchange((volatile LONG *)&v5->mtx_.l_, 1) )
          Sleep(1u);
        v7 = v5->use_count_ - 1;
        v5->use_count_ = v7;
        v8 = (volatile LONG *)&v5->mtx_.l_;
        if ( v7 )
        {
          InterlockedExchange(v8, 0);
        }
        else
        {
          InterlockedExchange(v8, 0);
          v5->vfptr->dispose(v5);
          while ( InterlockedExchange((volatile LONG *)&v5->mtx_.l_, 1) )
            Sleep(1u);
          v10 = v5->weak_count_ - 1;
          v5->weak_count_ = v10;
          InterlockedExchange((volatile LONG *)&v5->mtx_.l_, 0);
          if ( !v10 )
            v5->vfptr->destruct(v5);
        }
      }
      if ( v4 <= 0 )
        break;
      v3 = _First;
    }
  }
}

//----- (00454860) --------------------------------------------------------
void __cdecl std::_Median<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Mid, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListSorter _Pred)
{
  signed int v4; // eax@1
  int v5; // eax@2
  int v6; // edi@2
  unsigned int v7; // ebx@2
  boost::shared_ptr<SlideListWin::ListItem> *v8; // edx@2
  boost::shared_ptr<SlideListWin::ListItem> *v9; // ST30_4@2
  boost::shared_ptr<SlideListWin::ListItem> *_Firsta; // [sp+Ch] [bp+8h]@2

  v4 = _Last - _First;
  if ( v4 <= 40 )
  {
    std::_Med3<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListSorter>(_First, _Mid, _Last, _Pred);
  }
  else
  {
    v5 = (v4 + 1) / 8;
    v6 = 16 * v5;
    v7 = 8 * v5;
    v8 = &_First[2 * v5];
    v9 = _First;
    _Firsta = &_First[v5];
    std::_Med3<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListSorter>(v9, _Firsta, v8, _Pred);
    std::_Med3<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListSorter>(
      &_Mid[-v7 / 8],
      _Mid,
      &_Mid[v7 / 8],
      _Pred);
    std::_Med3<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListSorter>(
      &_Last[-v6 / 8u],
      &_Last[-v7 / 8],
      _Last,
      _Pred);
    std::_Med3<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListSorter>(
      _Firsta,
      _Mid,
      &_Last[-v7 / 8],
      _Pred);
  }
}

//----- (00454900) --------------------------------------------------------
void __cdecl std::_Make_heap<boost::shared_ptr<SlideListWin::ListItem> *,int,boost::shared_ptr<SlideListWin::ListItem>,SlideListWin::ListSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListSorter _Pred)
{
  boost::shared_ptr<SlideListWin::ListItem> *v3; // ecx@1
  int v4; // ebx@1
  boost::detail::sp_counted_base *v5; // esi@4
  SlideListWin::ListItem *v6; // eax@4
  int v7; // eax@11
  volatile LONG *v8; // [sp-8h] [bp-34h]@11
  boost::shared_ptr<SlideListWin::ListItem> _Val; // [sp+10h] [bp-1Ch]@4
  int v10; // [sp+18h] [bp-14h]@15
  int _Bottom; // [sp+1Ch] [bp-10h]@1
  int v12; // [sp+28h] [bp-4h]@8

  v3 = _First;
  _Bottom = _Last - _First;
  v4 = _Bottom / 2;
  if ( _Bottom / 2 > 0 )
  {
    while ( 1 )
    {
      v5 = (boost::detail::sp_counted_base *)*((_DWORD *)&v3[v4] - 1);
      v6 = v3[v4-- - 1].px;
      _Val.px = v6;
      _Val.pn.pi_ = v5;
      if ( v5 )
      {
        while ( InterlockedExchange((volatile LONG *)&v5->mtx_.l_, 1) )
          Sleep(1u);
        ++v5->use_count_;
        InterlockedExchange((volatile LONG *)&v5->mtx_.l_, 0);
        v3 = _First;
      }
      v12 = 0;
      std::_Adjust_heap<boost::shared_ptr<SlideListWin::ListItem> *,int,boost::shared_ptr<SlideListWin::ListItem>,SlideListWin::ListSorter>(
        v3,
        v4,
        _Bottom,
        &_Val,
        _Pred);
      v12 = -1;
      if ( v5 )
      {
        while ( InterlockedExchange((volatile LONG *)&v5->mtx_.l_, 1) )
          Sleep(1u);
        v7 = v5->use_count_ - 1;
        v5->use_count_ = v7;
        v8 = (volatile LONG *)&v5->mtx_.l_;
        if ( v7 )
        {
          InterlockedExchange(v8, 0);
        }
        else
        {
          InterlockedExchange(v8, 0);
          v5->vfptr->dispose(v5);
          while ( InterlockedExchange((volatile LONG *)&v5->mtx_.l_, 1) )
            Sleep(1u);
          v10 = v5->weak_count_ - 1;
          v5->weak_count_ = v10;
          InterlockedExchange((volatile LONG *)&v5->mtx_.l_, 0);
          if ( !v10 )
            v5->vfptr->destruct(v5);
        }
      }
      if ( v4 <= 0 )
        break;
      v3 = _First;
    }
  }
}

//----- (00454A60) --------------------------------------------------------
void __cdecl std::_Pop_heap_0<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem>,SlideListWin::ListNumSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListNumSorter _Pred)
{
  boost::detail::sp_counted_base *v3; // edi@1
  boost::shared_ptr<SlideListWin::ListItem> _Val; // [sp+10h] [bp-14h]@1
  int v5; // [sp+20h] [bp-4h]@5

  v3 = _Last[-1].pn.pi_;
  _Val.px = _Last[-1].px;
  _Val.pn.pi_ = v3;
  if ( v3 )
  {
    while ( InterlockedExchange((volatile LONG *)&v3->mtx_.l_, 1) )
      Sleep(1u);
    ++v3->use_count_;
    InterlockedExchange((volatile LONG *)&v3->mtx_.l_, 0);
  }
  _Last[-1].px = _First->px;
  v5 = 0;
  boost::detail::shared_count::operator=(&_Last[-1].pn, &_First->pn);
  std::_Adjust_heap<boost::shared_ptr<SlideListWin::ListItem> *,int,boost::shared_ptr<SlideListWin::ListItem>,SlideListWin::ListNumSorter>(
    _First,
    0,
    ((char *)_Last - (char *)_First - 8) >> 3,
    &_Val,
    _Pred);
  v5 = -1;
  if ( v3 )
    boost::detail::sp_counted_base::release(v3);
}

//----- (00454B30) --------------------------------------------------------
void __cdecl std::_Pop_heap_0<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem>,SlideListWin::ListSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListSorter _Pred)
{
  boost::detail::sp_counted_base *v3; // edi@1
  boost::shared_ptr<SlideListWin::ListItem> _Val; // [sp+10h] [bp-14h]@1
  int v5; // [sp+20h] [bp-4h]@5

  v3 = _Last[-1].pn.pi_;
  _Val.px = _Last[-1].px;
  _Val.pn.pi_ = v3;
  if ( v3 )
  {
    while ( InterlockedExchange((volatile LONG *)&v3->mtx_.l_, 1) )
      Sleep(1u);
    ++v3->use_count_;
    InterlockedExchange((volatile LONG *)&v3->mtx_.l_, 0);
  }
  _Last[-1].px = _First->px;
  v5 = 0;
  boost::detail::shared_count::operator=(&_Last[-1].pn, &_First->pn);
  std::_Adjust_heap<boost::shared_ptr<SlideListWin::ListItem> *,int,boost::shared_ptr<SlideListWin::ListItem>,SlideListWin::ListSorter>(
    _First,
    0,
    ((char *)_Last - (char *)_First - 8) >> 3,
    &_Val,
    _Pred);
  v5 = -1;
  if ( v3 )
    boost::detail::sp_counted_base::release(v3);
}

//----- (00454C00) --------------------------------------------------------
ColumnBut *__thiscall ColumnBut::`scalar deleting destructor'(ColumnBut *this, unsigned int a2)
{
  ColumnBut *v2; // esi@1

  v2 = this;
  ColumnBut::~ColumnBut(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00454C30) --------------------------------------------------------
void __cdecl std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(boost::shared_ptr<SLWCreateInfo::Item> *_First, boost::shared_ptr<SLWCreateInfo::Item> *_Last)
{
  char *v2; // eax@2
  int v3; // ebx@3
  int v4; // eax@6
  int v5; // ST14_4@10
  boost::shared_ptr<SLWCreateInfo::Item> *v6; // ecx@12
  volatile LONG *v7; // [sp-14h] [bp-18h]@6
  boost::shared_ptr<SLWCreateInfo::Item> *_Firsta; // [sp+Ch] [bp+8h]@2

  if ( _First != _Last )
  {
    v2 = (char *)&_First->pn;
    _Firsta = (boost::shared_ptr<SLWCreateInfo::Item> *)((char *)_First + 4);
    do
    {
      v3 = *(_DWORD *)v2;
      if ( *(_DWORD *)v2 )
      {
        while ( InterlockedExchange((volatile LONG *)(v3 + 12), 1) )
          Sleep(1u);
        v4 = *(_DWORD *)(v3 + 4) - 1;
        *(_DWORD *)(v3 + 4) = v4;
        v7 = (volatile LONG *)(v3 + 12);
        if ( v4 )
        {
          InterlockedExchange(v7, 0);
        }
        else
        {
          InterlockedExchange(v7, 0);
          (*(void (__thiscall **)(int))(*(_DWORD *)v3 + 4))(v3);
          while ( InterlockedExchange((volatile LONG *)(v3 + 12), 1) )
            Sleep(1u);
          v5 = *(_DWORD *)(v3 + 8) - 1;
          *(_DWORD *)(v3 + 8) = v5;
          InterlockedExchange((volatile LONG *)(v3 + 12), 0);
          if ( !v5 )
            (*(void (__thiscall **)(int))(*(_DWORD *)v3 + 8))(v3);
        }
      }
      v2 = (char *)&_Firsta[1];
      v6 = (boost::shared_ptr<SLWCreateInfo::Item> *)((char *)_Firsta + 4);
      ++_Firsta;
    }
    while ( v6 != _Last );
  }
}

//----- (00454CF0) --------------------------------------------------------
std::pair<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem> *> *__cdecl std::_Unguarded_partition<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListNumSorter>(std::pair<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem> *> *result, boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListNumSorter _Pred)
{
  boost::shared_ptr<SlideListWin::ListItem> *v4; // esi@1
  boost::shared_ptr<SlideListWin::ListItem> *v5; // ebx@1
  unsigned int v6; // eax@10
  boost::shared_ptr<SlideListWin::ListItem> *v7; // edi@10
  boost::shared_ptr<SlideListWin::ListItem> *v8; // eax@14
  SlideListWin::ListItem *v9; // ecx@14
  boost::detail::sp_counted_base *v10; // ecx@14
  bool v11; // zf@17
  boost::shared_ptr<SlideListWin::ListItem> *v12; // ebx@18
  SlideListWin::ListItem *v13; // eax@21
  boost::detail::sp_counted_base *v14; // eax@21
  SlideListWin::ListItem *v15; // ecx@27
  boost::detail::sp_counted_base *v16; // ecx@27
  SlideListWin::ListItem *v17; // ST1C_4@28
  boost::detail::sp_counted_base *v18; // ST1C_4@28
  boost::shared_ptr<SlideListWin::ListItem> *v19; // edx@28
  SlideListWin::ListItem *v20; // ecx@31
  boost::detail::sp_counted_base *v21; // ecx@31
  SlideListWin::ListItem *v22; // edx@32
  SlideListWin::ListItem *v23; // ecx@32
  boost::detail::sp_counted_base *v24; // ecx@32
  SlideListWin::ListItem *v25; // ecx@33
  boost::detail::sp_counted_base *v26; // ecx@33
  std::pair<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem> *> *v27; // eax@34
  boost::shared_ptr<SlideListWin::ListItem> *_Glast; // [sp+18h] [bp-8h]@2
  boost::shared_ptr<SlideListWin::ListItem> *_Glasta; // [sp+18h] [bp-8h]@10
  boost::shared_ptr<SlideListWin::ListItem> *_Plast; // [sp+1Ch] [bp-4h]@1

  v4 = &_First[(_Last - _First) / 2];
  std::_Median<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListNumSorter>(
    _First,
    &_First[(_Last - _First) / 2],
    _Last - 1,
    _Pred);
  v5 = v4 + 1;
  _Plast = v4 + 1;
  if ( _First < v4 )
  {
    do
    {
      _Glast = v4 - 1;
      if ( SlideListWin::ListNumSorter::operator()(&_Pred, v4 - 1, v4) )
        break;
      if ( SlideListWin::ListNumSorter::operator()(&_Pred, v4, _Glast) )
        break;
      --v4;
    }
    while ( _First < _Glast );
  }
  if ( v5 < _Last )
  {
    do
    {
      if ( SlideListWin::ListNumSorter::operator()(&_Pred, v5, v4) )
        break;
      if ( SlideListWin::ListNumSorter::operator()(&_Pred, v4, v5) )
        break;
      ++v5;
    }
    while ( v5 < _Last );
    _Plast = v5;
  }
  v6 = (unsigned int)v4;
  v7 = v5;
  _Glasta = v4;
  while ( 1 )
  {
    while ( 1 )
    {
      if ( v7 < _Last )
      {
        do
        {
          if ( !SlideListWin::ListNumSorter::operator()(&_Pred, v4, v7) )
          {
            if ( SlideListWin::ListNumSorter::operator()(&_Pred, v7, v4) )
              break;
            v8 = v5;
            v9 = v5->px;
            v5->px = v7->px;
            v7->px = v9;
            v10 = v7->pn.pi_;
            v7->pn.pi_ = v5->pn.pi_;
            ++v5;
            v8->pn.pi_ = v10;
          }
          ++v7;
        }
        while ( v7 < _Last );
        v6 = (unsigned int)_Glasta;
        _Plast = v5;
      }
      v11 = v6 == (_DWORD)_First;
      if ( v6 > (unsigned int)_First )
      {
        v12 = (boost::shared_ptr<SlideListWin::ListItem> *)(v6 - 8);
        do
        {
          if ( !SlideListWin::ListNumSorter::operator()(&_Pred, v12, v4) )
          {
            if ( SlideListWin::ListNumSorter::operator()(&_Pred, v4, v12) )
              break;
            v13 = v4[-1].px;
            --v4;
            v4->px = v12->px;
            v12->px = v13;
            v14 = v12->pn.pi_;
            v12->pn.pi_ = v4->pn.pi_;
            v4->pn.pi_ = v14;
          }
          --v12;
          --_Glasta;
        }
        while ( _First < _Glasta );
        v6 = (unsigned int)_Glasta;
        v5 = _Plast;
        v11 = _Glasta == _First;
      }
      if ( v11 )
        break;
      v6 -= 8;
      _Glasta = (boost::shared_ptr<SlideListWin::ListItem> *)v6;
      if ( v7 == _Last )
      {
        --v4;
        if ( (boost::shared_ptr<SlideListWin::ListItem> *)v6 != v4 )
        {
          v20 = *(SlideListWin::ListItem **)v6;
          *(_DWORD *)v6 = v4->px;
          v4->px = v20;
          v21 = v4->pn.pi_;
          v4->pn.pi_ = *(boost::detail::sp_counted_base **)(v6 + 4);
          *(_DWORD *)(v6 + 4) = v21;
        }
        v22 = v5[-1].px;
        v23 = v4->px;
        --v5;
        v4->px = v22;
        v5->px = v23;
        v24 = v5->pn.pi_;
        v5->pn.pi_ = v4->pn.pi_;
        _Plast = v5;
        v4->pn.pi_ = v24;
      }
      else
      {
        v25 = v7->px;
        v7->px = *(SlideListWin::ListItem **)v6;
        *(_DWORD *)v6 = v25;
        v26 = *(boost::detail::sp_counted_base **)(v6 + 4);
        *(_DWORD *)(v6 + 4) = v7->pn.pi_;
        v7->pn.pi_ = v26;
        ++v7;
      }
    }
    if ( v7 == _Last )
      break;
    if ( v5 != v7 )
    {
      v15 = v4->px;
      v4->px = v5->px;
      v5->px = v15;
      v16 = v5->pn.pi_;
      v5->pn.pi_ = v4->pn.pi_;
      v4->pn.pi_ = v16;
    }
    v17 = v4->px;
    v4->px = v7->px;
    v7->px = v17;
    v18 = v7->pn.pi_;
    v7->pn.pi_ = v4->pn.pi_;
    v19 = v4;
    ++v5;
    ++v4;
    _Plast = v5;
    ++v7;
    v19->pn.pi_ = v18;
  }
  v27 = result;
  result->first = v4;
  result->second = v5;
  return v27;
}

//----- (00454F10) --------------------------------------------------------
std::pair<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem> *> *__cdecl std::_Unguarded_partition<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListSorter>(std::pair<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem> *> *result, boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListSorter _Pred)
{
  boost::shared_ptr<SlideListWin::ListItem> *v4; // esi@1
  boost::shared_ptr<SlideListWin::ListItem> *v5; // ebx@1
  unsigned int v6; // eax@10
  boost::shared_ptr<SlideListWin::ListItem> *v7; // edi@10
  boost::shared_ptr<SlideListWin::ListItem> *v8; // eax@14
  SlideListWin::ListItem *v9; // ecx@14
  boost::detail::sp_counted_base *v10; // ecx@14
  bool v11; // zf@17
  boost::shared_ptr<SlideListWin::ListItem> *v12; // ebx@18
  SlideListWin::ListItem *v13; // eax@21
  boost::detail::sp_counted_base *v14; // eax@21
  SlideListWin::ListItem *v15; // ecx@27
  boost::detail::sp_counted_base *v16; // ecx@27
  SlideListWin::ListItem *v17; // ST1C_4@28
  boost::detail::sp_counted_base *v18; // ST1C_4@28
  boost::shared_ptr<SlideListWin::ListItem> *v19; // edx@28
  SlideListWin::ListItem *v20; // ecx@31
  boost::detail::sp_counted_base *v21; // ecx@31
  SlideListWin::ListItem *v22; // edx@32
  SlideListWin::ListItem *v23; // ecx@32
  boost::detail::sp_counted_base *v24; // ecx@32
  SlideListWin::ListItem *v25; // ecx@33
  boost::detail::sp_counted_base *v26; // ecx@33
  std::pair<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem> *> *v27; // eax@34
  boost::shared_ptr<SlideListWin::ListItem> *_Glast; // [sp+18h] [bp-8h]@2
  boost::shared_ptr<SlideListWin::ListItem> *_Glasta; // [sp+18h] [bp-8h]@10
  boost::shared_ptr<SlideListWin::ListItem> *_Plast; // [sp+1Ch] [bp-4h]@1

  v4 = &_First[(_Last - _First) / 2];
  std::_Median<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListSorter>(
    _First,
    &_First[(_Last - _First) / 2],
    _Last - 1,
    _Pred);
  v5 = v4 + 1;
  _Plast = v4 + 1;
  if ( _First < v4 )
  {
    do
    {
      _Glast = v4 - 1;
      if ( SlideListWin::ListSorter::operator()(&_Pred, v4 - 1, v4) )
        break;
      if ( SlideListWin::ListSorter::operator()(&_Pred, v4, _Glast) )
        break;
      --v4;
    }
    while ( _First < _Glast );
  }
  if ( v5 < _Last )
  {
    do
    {
      if ( SlideListWin::ListSorter::operator()(&_Pred, v5, v4) )
        break;
      if ( SlideListWin::ListSorter::operator()(&_Pred, v4, v5) )
        break;
      ++v5;
    }
    while ( v5 < _Last );
    _Plast = v5;
  }
  v6 = (unsigned int)v4;
  v7 = v5;
  _Glasta = v4;
  while ( 1 )
  {
    while ( 1 )
    {
      if ( v7 < _Last )
      {
        do
        {
          if ( !SlideListWin::ListSorter::operator()(&_Pred, v4, v7) )
          {
            if ( SlideListWin::ListSorter::operator()(&_Pred, v7, v4) )
              break;
            v8 = v5;
            v9 = v5->px;
            v5->px = v7->px;
            v7->px = v9;
            v10 = v7->pn.pi_;
            v7->pn.pi_ = v5->pn.pi_;
            ++v5;
            v8->pn.pi_ = v10;
          }
          ++v7;
        }
        while ( v7 < _Last );
        v6 = (unsigned int)_Glasta;
        _Plast = v5;
      }
      v11 = v6 == (_DWORD)_First;
      if ( v6 > (unsigned int)_First )
      {
        v12 = (boost::shared_ptr<SlideListWin::ListItem> *)(v6 - 8);
        do
        {
          if ( !SlideListWin::ListSorter::operator()(&_Pred, v12, v4) )
          {
            if ( SlideListWin::ListSorter::operator()(&_Pred, v4, v12) )
              break;
            v13 = v4[-1].px;
            --v4;
            v4->px = v12->px;
            v12->px = v13;
            v14 = v12->pn.pi_;
            v12->pn.pi_ = v4->pn.pi_;
            v4->pn.pi_ = v14;
          }
          --v12;
          --_Glasta;
        }
        while ( _First < _Glasta );
        v6 = (unsigned int)_Glasta;
        v5 = _Plast;
        v11 = _Glasta == _First;
      }
      if ( v11 )
        break;
      v6 -= 8;
      _Glasta = (boost::shared_ptr<SlideListWin::ListItem> *)v6;
      if ( v7 == _Last )
      {
        --v4;
        if ( (boost::shared_ptr<SlideListWin::ListItem> *)v6 != v4 )
        {
          v20 = *(SlideListWin::ListItem **)v6;
          *(_DWORD *)v6 = v4->px;
          v4->px = v20;
          v21 = v4->pn.pi_;
          v4->pn.pi_ = *(boost::detail::sp_counted_base **)(v6 + 4);
          *(_DWORD *)(v6 + 4) = v21;
        }
        v22 = v5[-1].px;
        v23 = v4->px;
        --v5;
        v4->px = v22;
        v5->px = v23;
        v24 = v5->pn.pi_;
        v5->pn.pi_ = v4->pn.pi_;
        _Plast = v5;
        v4->pn.pi_ = v24;
      }
      else
      {
        v25 = v7->px;
        v7->px = *(SlideListWin::ListItem **)v6;
        *(_DWORD *)v6 = v25;
        v26 = *(boost::detail::sp_counted_base **)(v6 + 4);
        *(_DWORD *)(v6 + 4) = v7->pn.pi_;
        v7->pn.pi_ = v26;
        ++v7;
      }
    }
    if ( v7 == _Last )
      break;
    if ( v5 != v7 )
    {
      v15 = v4->px;
      v4->px = v5->px;
      v5->px = v15;
      v16 = v5->pn.pi_;
      v5->pn.pi_ = v4->pn.pi_;
      v4->pn.pi_ = v16;
    }
    v17 = v4->px;
    v4->px = v7->px;
    v7->px = v17;
    v18 = v7->pn.pi_;
    v7->pn.pi_ = v4->pn.pi_;
    v19 = v4;
    ++v5;
    ++v4;
    _Plast = v5;
    ++v7;
    v19->pn.pi_ = v18;
  }
  v27 = result;
  result->first = v4;
  result->second = v5;
  return v27;
}

//----- (00455130) --------------------------------------------------------
void __thiscall std::vector<NiPointer<NiAVObject>,std::allocator<NiPointer<NiAVObject>>>::reserve(std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData> > > *this, unsigned int _Count)
{
  std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData> > > *v2; // esi@1
  CBaseObject **v3; // eax@4
  CBaseObject **v4; // ebx@4
  NiPointer<PgSprData> *v5; // ST04_4@4
  NiPointer<PgSprData> *v6; // ST00_4@4
  NiPointer<PgSprData> *v7; // ecx@4
  NiPointer<PgSprData> *v8; // eax@4
  int v9; // edi@4
  int v10; // [sp+0h] [bp-24h]@1
  NiPointer<PgSprData> *_Ptr; // [sp+10h] [bp-14h]@4
  int *v12; // [sp+14h] [bp-10h]@1
  int v13; // [sp+20h] [bp-4h]@4

  v12 = &v10;
  v2 = this;
  if ( _Count > 0x3FFFFFFF )
    std::_Xlength_error("vector<T> too long");
  if ( this->_Myend - this->_Myfirst < _Count )
  {
    v3 = std::allocator<QUEST_DATA *>::allocate(_Count);
    v4 = v3;
    v5 = v2->_Mylast;
    v6 = v2->_Myfirst;
    _Ptr = (NiPointer<PgSprData> *)v3;
    v13 = 0;
    std::_Uninit_move<NiPointer<ScreenBoardTexture::DescInfo> *,NiPointer<ScreenBoardTexture::DescInfo> *,std::allocator<NiPointer<ScreenBoardTexture::DescInfo>>,NiPointer<ScreenBoardTexture::DescInfo>>(
      v6,
      v5,
      (NiPointer<PgSprData> *)v3);
    v7 = v2->_Mylast;
    v8 = v2->_Myfirst;
    v9 = v2->_Mylast - v2->_Myfirst;
    v13 = -1;
    if ( v8 )
    {
      std::_Destroy_range<std::allocator<NiPointer<PgSprData>>>(v8, v7);
      operator delete(v2->_Myfirst);
    }
    v2->_Myend = (NiPointer<PgSprData> *)&v4[_Count];
    v2->_Mylast = (NiPointer<PgSprData> *)&v4[v9];
    v2->_Myfirst = (NiPointer<PgSprData> *)v4;
  }
}

//----- (00455220) --------------------------------------------------------
void __cdecl std::_Destroy_range<std::allocator<SlideListWin::ListItem::ColumnData>>(SlideListWin::ListItem::ColumnData *_First, SlideListWin::ListItem::ColumnData *_Last)
{
  SlideListWin::ListItem::ColumnData *i; // esi@1

  for ( i = _First; i != _Last; ++i )
  {
    if ( i->m_strColumnText._Myres >= 0x10 )
      operator delete(i->m_strColumnText._Bx._Ptr);
    i->m_strColumnText._Myres = 15;
    i->m_strColumnText._Mysize = 0;
    i->m_strColumnText._Bx._Buf[0] = 0;
  }
}

//----- (00455260) --------------------------------------------------------
void __cdecl std::_Sort_heap<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListNumSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListNumSorter _Pred)
{
  boost::shared_ptr<SlideListWin::ListItem> *v3; // esi@1
  signed int i; // edi@1

  v3 = _Last;
  for ( i = (char *)_Last - (char *)_First; (signed int)(i & 0xFFFFFFF8) > 8; --v3 )
  {
    std::_Pop_heap_0<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem>,SlideListWin::ListNumSorter>(
      _First,
      v3,
      _Pred);
    i -= 8;
  }
}

//----- (004552B0) --------------------------------------------------------
void __cdecl std::_Sort_heap<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last, SlideListWin::ListSorter _Pred)
{
  boost::shared_ptr<SlideListWin::ListItem> *v3; // esi@1
  signed int i; // edi@1

  v3 = _Last;
  for ( i = (char *)_Last - (char *)_First; (signed int)(i & 0xFFFFFFF8) > 8; --v3 )
  {
    std::_Pop_heap_0<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem>,SlideListWin::ListSorter>(
      _First,
      v3,
      _Pred);
    i -= 8;
  }
}

//----- (00455300) --------------------------------------------------------
void __thiscall std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData>>>::_Reserve(std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData> > > *this, unsigned int _Count)
{
  unsigned int v2; // eax@1
  unsigned int v3; // eax@3
  unsigned int v4; // edx@3
  unsigned int v5; // edx@5

  v2 = this->_Mylast - this->_Myfirst;
  if ( 0x3FFFFFFF - _Count < v2 )
    std::_Xlength_error("vector<T> too long");
  v3 = _Count + v2;
  v4 = this->_Myend - this->_Myfirst;
  if ( v3 > v4 )
  {
    if ( 0x3FFFFFFF - (v4 >> 1) >= v4 )
      v5 = (v4 >> 1) + v4;
    else
      v5 = 0;
    if ( v5 < v3 )
      v5 = v3;
    std::vector<NiPointer<NiAVObject>,std::allocator<NiPointer<NiAVObject>>>::reserve(this, v5);
  }
}

//----- (00455360) --------------------------------------------------------
void __cdecl std::_Uninit_def_fill_n<SlideListWin::ListItem::ColumnData *,unsigned int,SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData>,SlideListWin::ListItem::ColumnData>(SlideListWin::ListItem::ColumnData *_First, unsigned int _Count)
{
  SlideListWin::ListItem::ColumnData *v2; // esi@1
  int v3; // edx@4
  int v4; // eax@4
  int v5; // ecx@4
  int v6; // edx@4
  int v7; // [sp+0h] [bp-60h]@1
  SlideListWin::ListItem::ColumnData *v8; // [sp+10h] [bp-50h]@3
  SlideListWin::ListItem::ColumnData *_Next; // [sp+14h] [bp-4Ch]@1
  SlideListWin::ListItem::ColumnData *v10; // [sp+18h] [bp-48h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Right; // [sp+1Ch] [bp-44h]@3
  int v12; // [sp+38h] [bp-28h]@3
  int v13; // [sp+3Ch] [bp-24h]@3
  int v14; // [sp+40h] [bp-20h]@3
  int v15; // [sp+44h] [bp-1Ch]@3
  int v16; // [sp+48h] [bp-18h]@3
  int *v17; // [sp+50h] [bp-10h]@1
  int v18; // [sp+5Ch] [bp-4h]@1

  v17 = &v7;
  v2 = _First;
  _Next = _First;
  v18 = 0;
  while ( 1 )
  {
    v10 = v2;
    if ( _Count <= 0 )
      break;
    _Right._Myres = 15;
    _Right._Mysize = 0;
    _Right._Bx._Buf[0] = 0;
    v12 = 0;
    v15 = 255;
    v14 = 255;
    v13 = 255;
    v16 = 5;
    v8 = v2;
    LOBYTE(v18) = 2;
    if ( v2 )
    {
      v2->m_strColumnText._Myres = 15;
      v2->m_strColumnText._Mysize = 0;
      v2->m_strColumnText._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v2->m_strColumnText,
        &_Right,
        0,
        0xFFFFFFFF);
      v3 = v13;
      v4 = v14;
      v2->m_nFontSize = v12;
      v5 = v15;
      v2->m_r = v3;
      v6 = v16;
      v2->m_g = v4;
      v2->m_b = v5;
      v2->m_uiAlignText = v6;
    }
    LOBYTE(v18) = 0;
    if ( _Right._Myres >= 0x10 )
      operator delete(_Right._Bx._Ptr);
    --_Count;
    ++v2;
  }
}

//----- (00455470) --------------------------------------------------------
SlideListWin::ListItem::ColumnData *__cdecl std::_Move<SlideListWin::ListItem::ColumnData *,SlideListWin::ListItem::ColumnData *>(SlideListWin::ListItem::ColumnData *_First, SlideListWin::ListItem::ColumnData *_Last, SlideListWin::ListItem::ColumnData *_Dest)
{
  SlideListWin::ListItem::ColumnData *v3; // edi@2
  char *v4; // esi@2
  unsigned int v5; // edx@3
  SlideListWin::ListItem::ColumnData *result; // eax@4

  if ( _First == _Last )
  {
    result = _Dest;
  }
  else
  {
    v3 = _Dest;
    v4 = (char *)&_First->m_r;
    do
    {
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v3->m_strColumnText,
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)(v4 - 32),
        0,
        0xFFFFFFFF);
      v3->m_nFontSize = *((_DWORD *)v4 - 1);
      v3->m_r = *(_DWORD *)v4;
      v3->m_g = *((_DWORD *)v4 + 1);
      v3->m_b = *((_DWORD *)v4 + 2);
      v5 = *((_DWORD *)v4 + 3);
      v4 += 48;
      v3->m_uiAlignText = v5;
      ++v3;
    }
    while ( (SlideListWin::ListItem::ColumnData *)(v4 - 32) != _Last );
    result = v3;
  }
  return result;
}

//----- (004554D0) --------------------------------------------------------
SlideListWin::ListItem::ColumnData *__cdecl std::_Uninit_move<SlideListWin::ListItem::ColumnData *,SlideListWin::ListItem::ColumnData *,std::allocator<SlideListWin::ListItem::ColumnData>,SlideListWin::ListItem::ColumnData>(SlideListWin::ListItem::ColumnData *_First, SlideListWin::ListItem::ColumnData *_Last, SlideListWin::ListItem::ColumnData *_Dest)
{
  SlideListWin::ListItem::ColumnData *v3; // esi@1
  SlideListWin::ListItem::ColumnData *v4; // edi@1
  int v6; // [sp+0h] [bp-24h]@1
  SlideListWin::ListItem::ColumnData *_Next; // [sp+10h] [bp-14h]@1
  int *v8; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v8 = &v6;
  v3 = _Dest;
  v4 = _First;
  _Next = _Dest;
  v9 = 0;
  while ( v4 != _Last )
  {
    LOBYTE(v9) = 1;
    if ( v3 )
    {
      v3->m_strColumnText._Myres = 15;
      v3->m_strColumnText._Mysize = 0;
      v3->m_strColumnText._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v3->m_strColumnText,
        &v4->m_strColumnText,
        0,
        0xFFFFFFFF);
      v3->m_nFontSize = v4->m_nFontSize;
      v3->m_r = v4->m_r;
      v3->m_g = v4->m_g;
      v3->m_b = v4->m_b;
      v3->m_uiAlignText = v4->m_uiAlignText;
    }
    ++v3;
    LOBYTE(v9) = 0;
    ++v4;
  }
  return v3;
}

//----- (004555A0) --------------------------------------------------------
void __thiscall std::vector<NiPointer<NiAVObject>,std::allocator<NiPointer<NiAVObject>>>::~vector<NiPointer<NiAVObject>,std::allocator<NiPointer<NiAVObject>>>(std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData> > > *this)
{
  std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData> > > *v1; // esi@1

  v1 = this;
  if ( this->_Myfirst )
  {
    std::_Destroy_range<std::allocator<NiPointer<PgSprData>>>(this->_Myfirst, this->_Mylast);
    operator delete(v1->_Myfirst);
  }
  v1->_Myfirst = 0;
  v1->_Mylast = 0;
  v1->_Myend = 0;
}

//----- (004555F0) --------------------------------------------------------
void __thiscall std::vector<boost::shared_ptr<SLWCreateInfo::Item>,std::allocator<boost::shared_ptr<SLWCreateInfo::Item>>>::reserve(std::vector<boost::shared_ptr<SLWCreateInfo::Item>,std::allocator<boost::shared_ptr<SLWCreateInfo::Item> > > *this, unsigned int _Count)
{
  std::vector<boost::shared_ptr<SLWCreateInfo::Item>,std::allocator<boost::shared_ptr<SLWCreateInfo::Item> > > *v2; // esi@1
  NiPoint2 *v3; // eax@4
  NiPoint2 *v4; // ebx@4
  boost::shared_ptr<SLWCreateInfo::Item> *v5; // ST04_4@4
  boost::shared_ptr<SLWCreateInfo::Item> *v6; // ST00_4@4
  boost::shared_ptr<SLWCreateInfo::Item> *v7; // ecx@4
  boost::shared_ptr<SLWCreateInfo::Item> *v8; // eax@4
  int v9; // edi@4
  int v10; // [sp+0h] [bp-24h]@1
  boost::shared_ptr<SLWCreateInfo::Item> *_Ptr; // [sp+10h] [bp-14h]@4
  int *v12; // [sp+14h] [bp-10h]@1
  int v13; // [sp+20h] [bp-4h]@4

  v12 = &v10;
  v2 = this;
  if ( _Count > 0x1FFFFFFF )
    std::_Xlength_error("vector<T> too long");
  if ( this->_Myend - this->_Myfirst < _Count )
  {
    v3 = std::allocator<NiPoint2>::allocate(_Count);
    v4 = v3;
    v5 = v2->_Mylast;
    v6 = v2->_Myfirst;
    _Ptr = (boost::shared_ptr<SLWCreateInfo::Item> *)v3;
    v13 = 0;
    std::_Uninit_move<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem> *,std::allocator<boost::shared_ptr<SlideListWin::ListItem>>,boost::shared_ptr<SlideListWin::ListItem>>(
      v6,
      v5,
      (boost::shared_ptr<SLWCreateInfo::Item> *)v3);
    v7 = v2->_Mylast;
    v8 = v2->_Myfirst;
    v9 = v2->_Mylast - v2->_Myfirst;
    v13 = -1;
    if ( v8 )
    {
      std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(v8, v7);
      operator delete(v2->_Myfirst);
    }
    v2->_Myend = (boost::shared_ptr<SLWCreateInfo::Item> *)&v4[_Count];
    v2->_Mylast = (boost::shared_ptr<SLWCreateInfo::Item> *)&v4[v9];
    v2->_Myfirst = (boost::shared_ptr<SLWCreateInfo::Item> *)v4;
  }
}

//----- (004556E0) --------------------------------------------------------
void __cdecl std::_Sort<boost::shared_ptr<SlideListWin::ListItem> *,int,SlideListWin::ListNumSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last, int _Ideal, SlideListWin::ListNumSorter _Pred)
{
  boost::shared_ptr<SlideListWin::ListItem> *v4; // ebx@1
  boost::shared_ptr<SlideListWin::ListItem> *v5; // edi@1
  int v6; // eax@1
  signed int v7; // esi@2
  std::pair<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem> *> _Mid; // [sp+Ch] [bp-8h]@4

  v4 = _First;
  v5 = _Last;
  v6 = _Last - _First;
  if ( v6 <= 32 )
    goto LABEL_8;
  v7 = _Ideal;
  while ( v7 > 0 )
  {
    std::_Unguarded_partition<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListNumSorter>(
      &_Mid,
      v4,
      v5,
      _Pred);
    v7 = v7 / 2 / 2 + v7 / 2;
    if ( (signed int)((unsigned int)((char *)_Mid.first - (char *)v4) & 0xFFFFFFF8) >= (signed int)(((char *)v5 - (char *)_Mid.second) & 0xFFFFFFF8) )
    {
      std::_Sort<boost::shared_ptr<SlideListWin::ListItem> *,int,SlideListWin::ListNumSorter>(
        _Mid.second,
        v5,
        v7,
        _Pred);
      v5 = _Mid.first;
    }
    else
    {
      std::_Sort<boost::shared_ptr<SlideListWin::ListItem> *,int,SlideListWin::ListNumSorter>(v4, _Mid.first, v7, _Pred);
      v4 = _Mid.second;
    }
    v6 = v5 - v4;
    if ( v6 <= 32 )
      goto LABEL_8;
  }
  if ( v6 <= 32 )
  {
LABEL_8:
    if ( v6 > 1 )
      std::_Insertion_sort1<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListNumSorter,boost::shared_ptr<SlideListWin::ListItem>>(
        v4,
        v5,
        _Pred);
  }
  else
  {
    if ( (signed int)(((char *)v5 - (char *)v4) & 0xFFFFFFF8) > 8 )
      std::_Make_heap<boost::shared_ptr<SlideListWin::ListItem> *,int,boost::shared_ptr<SlideListWin::ListItem>,SlideListWin::ListNumSorter>(
        v4,
        v5,
        _Pred);
    std::_Sort_heap<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListNumSorter>(v4, v5, _Pred);
  }
}

//----- (004557D0) --------------------------------------------------------
void __cdecl std::_Sort<boost::shared_ptr<SlideListWin::ListItem> *,int,SlideListWin::ListSorter>(boost::shared_ptr<SlideListWin::ListItem> *_First, boost::shared_ptr<SlideListWin::ListItem> *_Last, int _Ideal, SlideListWin::ListSorter _Pred)
{
  boost::shared_ptr<SlideListWin::ListItem> *v4; // ebx@1
  boost::shared_ptr<SlideListWin::ListItem> *v5; // edi@1
  int v6; // eax@1
  signed int v7; // esi@2
  std::pair<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem> *> _Mid; // [sp+Ch] [bp-8h]@4

  v4 = _First;
  v5 = _Last;
  v6 = _Last - _First;
  if ( v6 <= 32 )
    goto LABEL_8;
  v7 = _Ideal;
  while ( v7 > 0 )
  {
    std::_Unguarded_partition<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListSorter>(
      &_Mid,
      v4,
      v5,
      _Pred);
    v7 = v7 / 2 / 2 + v7 / 2;
    if ( (signed int)((unsigned int)((char *)_Mid.first - (char *)v4) & 0xFFFFFFF8) >= (signed int)(((char *)v5 - (char *)_Mid.second) & 0xFFFFFFF8) )
    {
      std::_Sort<boost::shared_ptr<SlideListWin::ListItem> *,int,SlideListWin::ListSorter>(_Mid.second, v5, v7, _Pred);
      v5 = _Mid.first;
    }
    else
    {
      std::_Sort<boost::shared_ptr<SlideListWin::ListItem> *,int,SlideListWin::ListSorter>(v4, _Mid.first, v7, _Pred);
      v4 = _Mid.second;
    }
    v6 = v5 - v4;
    if ( v6 <= 32 )
      goto LABEL_8;
  }
  if ( v6 <= 32 )
  {
LABEL_8:
    if ( v6 > 1 )
      std::_Insertion_sort1<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListSorter,boost::shared_ptr<SlideListWin::ListItem>>(
        v4,
        v5,
        _Pred);
  }
  else
  {
    if ( (signed int)(((char *)v5 - (char *)v4) & 0xFFFFFFF8) > 8 )
      std::_Make_heap<boost::shared_ptr<SlideListWin::ListItem> *,int,boost::shared_ptr<SlideListWin::ListItem>,SlideListWin::ListSorter>(
        v4,
        v5,
        _Pred);
    std::_Sort_heap<boost::shared_ptr<SlideListWin::ListItem> *,SlideListWin::ListSorter>(v4, v5, _Pred);
  }
}

//----- (004558C0) --------------------------------------------------------
void __thiscall std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData>>::~vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData>>(std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData> > *this)
{
  std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData> > *v1; // esi@1

  v1 = this;
  if ( this->_Myfirst )
  {
    std::_Destroy_range<std::allocator<SlideListWin::ListItem::ColumnData>>(this->_Myfirst, this->_Mylast);
    operator delete(v1->_Myfirst);
  }
  v1->_Myfirst = 0;
  v1->_Mylast = 0;
  v1->_Myend = 0;
}

//----- (00455910) --------------------------------------------------------
void __thiscall std::vector<boost::shared_ptr<SlideListWin::ListItem>,std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>::push_back(std::vector<boost::shared_ptr<SlideListWin::ListItem>,std::allocator<boost::shared_ptr<SlideListWin::ListItem> > > *this, boost::shared_ptr<SlideListWin::ListItem> *_Val)
{
  std::vector<boost::shared_ptr<SlideListWin::ListItem>,std::allocator<boost::shared_ptr<SlideListWin::ListItem> > > *v2; // esi@1
  boost::shared_ptr<SlideListWin::ListItem> *v3; // eax@1
  signed int v4; // edi@3

  v2 = this;
  v3 = this->_Mylast;
  if ( _Val >= v3 || this->_Myfirst > _Val )
  {
    if ( v3 == this->_Myend )
      std::vector<boost::shared_ptr<SLWCreateInfo::Item>,std::allocator<boost::shared_ptr<SLWCreateInfo::Item>>>::_Reserve(
        (std::vector<boost::shared_ptr<SLWCreateInfo::Item>,std::allocator<boost::shared_ptr<SLWCreateInfo::Item> > > *)this,
        1u);
    std::allocator<boost::shared_ptr<SlideListWin::ListItem>>::construct(
      (boost::shared_ptr<SLWCreateInfo::Item> *)v2->_Mylast,
      (boost::shared_ptr<SLWCreateInfo::Item> *)_Val);
    ++v2->_Mylast;
  }
  else
  {
    v4 = _Val - this->_Myfirst;
    if ( v3 == this->_Myend )
      std::vector<boost::shared_ptr<SLWCreateInfo::Item>,std::allocator<boost::shared_ptr<SLWCreateInfo::Item>>>::_Reserve(
        (std::vector<boost::shared_ptr<SLWCreateInfo::Item>,std::allocator<boost::shared_ptr<SLWCreateInfo::Item> > > *)this,
        1u);
    std::allocator<boost::shared_ptr<SlideListWin::ListItem>>::construct(
      (boost::shared_ptr<SLWCreateInfo::Item> *)v2->_Mylast,
      (boost::shared_ptr<SLWCreateInfo::Item> *)&v2->_Myfirst[v4]);
    ++v2->_Mylast;
  }
}

//----- (00455980) --------------------------------------------------------
void __thiscall std::vector<boost::shared_ptr<SLWCreateInfo::Item>,std::allocator<boost::shared_ptr<SLWCreateInfo::Item>>>::_Reserve(std::vector<boost::shared_ptr<SLWCreateInfo::Item>,std::allocator<boost::shared_ptr<SLWCreateInfo::Item> > > *this, unsigned int _Count)
{
  unsigned int v2; // eax@1
  unsigned int v3; // eax@3
  unsigned int v4; // edx@3
  unsigned int v5; // edx@5

  v2 = this->_Mylast - this->_Myfirst;
  if ( 0x1FFFFFFF - _Count < v2 )
    std::_Xlength_error("vector<T> too long");
  v3 = _Count + v2;
  v4 = this->_Myend - this->_Myfirst;
  if ( v3 > v4 )
  {
    if ( 0x1FFFFFFF - (v4 >> 1) >= v4 )
      v5 = (v4 >> 1) + v4;
    else
      v5 = 0;
    if ( v5 < v3 )
      v5 = v3;
    std::vector<boost::shared_ptr<SLWCreateInfo::Item>,std::allocator<boost::shared_ptr<SLWCreateInfo::Item>>>::reserve(
      this,
      v5);
  }
}

//----- (004559E0) --------------------------------------------------------
SlideListWin *__thiscall SlideListWin::`vector deleting destructor'(SlideListWin *this, unsigned int a2)
{
  SlideListWin *v2; // esi@1

  v2 = this;
  SlideListWin::~SlideListWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00455A10) --------------------------------------------------------
void __thiscall std::vector<boost::shared_ptr<SLWCreateInfo::Item>,std::allocator<boost::shared_ptr<SLWCreateInfo::Item>>>::push_back(std::vector<boost::shared_ptr<SLWCreateInfo::Item>,std::allocator<boost::shared_ptr<SLWCreateInfo::Item> > > *this, boost::shared_ptr<SLWCreateInfo::Item> *_Val)
{
  std::vector<boost::shared_ptr<SLWCreateInfo::Item>,std::allocator<boost::shared_ptr<SLWCreateInfo::Item> > > *v2; // esi@1
  boost::shared_ptr<SLWCreateInfo::Item> *v3; // eax@1
  boost::shared_ptr<SLWCreateInfo::Item> *v4; // ecx@2
  int v5; // edi@3

  v2 = this;
  v3 = this->_Mylast;
  if ( _Val >= v3 || (v4 = this->_Myfirst, v2->_Myfirst > _Val) )
  {
    if ( v3 == v2->_Myend )
      std::vector<boost::shared_ptr<SLWCreateInfo::Item>,std::allocator<boost::shared_ptr<SLWCreateInfo::Item>>>::_Reserve(
        v2,
        1u);
    std::_Construct<boost::shared_ptr<SLWCreateInfo::Item>,boost::shared_ptr<SLWCreateInfo::Item> const &>(
      v2->_Mylast,
      _Val);
    ++v2->_Mylast;
  }
  else
  {
    v5 = _Val - v4;
    if ( v3 == v2->_Myend )
      std::vector<boost::shared_ptr<SLWCreateInfo::Item>,std::allocator<boost::shared_ptr<SLWCreateInfo::Item>>>::_Reserve(
        v2,
        1u);
    std::allocator<boost::shared_ptr<SlideListWin::ListItem>>::construct(v2->_Mylast, &v2->_Myfirst[v5]);
    ++v2->_Mylast;
  }
}

//----- (00455A80) --------------------------------------------------------
void __thiscall std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData>>::reserve(std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData> > *this, unsigned int _Count)
{
  std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData> > *v2; // esi@1
  SlideListWin::ListItem::ColumnData *v3; // eax@4
  SlideListWin::ListItem::ColumnData *v4; // ST04_4@4
  SlideListWin::ListItem::ColumnData *v5; // ST00_4@4
  unsigned int v6; // edx@4
  int v7; // edi@4
  SlideListWin::ListItem::ColumnData *v8; // eax@6
  SlideListWin::ListItem::ColumnData *v9; // edx@6
  int v10; // [sp+0h] [bp-24h]@1
  SlideListWin::ListItem::ColumnData *_Ptr; // [sp+10h] [bp-14h]@4
  int *v12; // [sp+14h] [bp-10h]@1
  int v13; // [sp+20h] [bp-4h]@4

  v12 = &v10;
  v2 = this;
  if ( _Count > 0x5555555 )
    std::_Xlength_error("vector<T> too long");
  if ( this->_Myend - this->_Myfirst < _Count )
  {
    v3 = std::allocator<SlideListWin::ListItem::ColumnData>::allocate(_Count);
    v4 = v2->_Mylast;
    v5 = v2->_Myfirst;
    _Ptr = v3;
    v13 = 0;
    std::_Uninit_move<SlideListWin::ListItem::ColumnData *,SlideListWin::ListItem::ColumnData *,std::allocator<SlideListWin::ListItem::ColumnData>,SlideListWin::ListItem::ColumnData>(
      v5,
      v4,
      v3);
    v6 = (signed int)((unsigned __int64)(715827883i64 * (unsigned int)((char *)v2->_Mylast - (char *)v2->_Myfirst)) >> 32) >> 3;
    v7 = v6 + (v6 >> 31);
    if ( v2->_Myfirst )
    {
      std::_Destroy_range<std::allocator<SlideListWin::ListItem::ColumnData>>(v2->_Myfirst, v2->_Mylast);
      operator delete(v2->_Myfirst);
    }
    v8 = _Ptr;
    v9 = &_Ptr[v7];
    v2->_Myend = &_Ptr[_Count];
    v2->_Mylast = v9;
    v2->_Myfirst = v8;
  }
}

//----- (00455B90) --------------------------------------------------------
void __thiscall std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData>>::_Reserve(std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData> > *this, unsigned int _Count)
{
  unsigned int v2; // esi@1
  unsigned int v3; // esi@3
  unsigned int v4; // eax@3
  unsigned int v5; // eax@5

  v2 = this->_Mylast - this->_Myfirst;
  if ( 89478485 - _Count < v2 )
    std::_Xlength_error("vector<T> too long");
  v3 = _Count + v2;
  v4 = this->_Myend - this->_Myfirst;
  if ( v3 > v4 )
  {
    if ( 89478485 - (v4 >> 1) >= v4 )
      v5 = (v4 >> 1) + v4;
    else
      v5 = 0;
    if ( v5 < v3 )
      v5 = v3;
    std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData>>::reserve(
      this,
      v5);
  }
}

//----- (00455C10) --------------------------------------------------------
void __thiscall std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData>>::push_back(std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData> > *this, SlideListWin::ListItem::ColumnData *_Val)
{
  std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData> > *v2; // ebx@1
  SlideListWin::ListItem::ColumnData *v3; // ecx@1
  unsigned int v4; // edx@3
  int v5; // esi@3
  int v6; // edi@5
  SlideListWin::ListItem::ColumnData *v7; // esi@5
  int v8; // edi@5
  SlideListWin::ListItem::ColumnData *v9; // edi@9

  v2 = this;
  v3 = this->_Mylast;
  if ( _Val >= v3 || v2->_Myfirst > _Val )
  {
    if ( v3 == v2->_Myend )
      std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData>>::_Reserve(
        v2,
        1u);
    v9 = v2->_Mylast;
    if ( v9 )
    {
      v9->m_strColumnText._Myres = 15;
      v9->m_strColumnText._Mysize = 0;
      v9->m_strColumnText._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v9->m_strColumnText,
        &_Val->m_strColumnText,
        0,
        0xFFFFFFFF);
      v9->m_nFontSize = _Val->m_nFontSize;
      v9->m_r = _Val->m_r;
      v9->m_g = _Val->m_g;
      v9->m_b = _Val->m_b;
      v9->m_uiAlignText = _Val->m_uiAlignText;
    }
  }
  else
  {
    v4 = (signed int)((unsigned __int64)(715827883i64 * ((char *)_Val - (char *)v2->_Myfirst)) >> 32) >> 3;
    v5 = v4 + (v4 >> 31);
    if ( v3 == v2->_Myend )
      std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData>>::_Reserve(
        v2,
        1u);
    v6 = 3 * v5;
    v7 = v2->_Mylast;
    v8 = (int)&v2->_Myfirst[16 * v6 / 0x30u];
    if ( v7 )
    {
      v7->m_strColumnText._Myres = 15;
      v7->m_strColumnText._Mysize = 0;
      v7->m_strColumnText._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v7->m_strColumnText,
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v8,
        0,
        0xFFFFFFFF);
      v7->m_nFontSize = *(_DWORD *)(v8 + 28);
      v7->m_r = *(_DWORD *)(v8 + 32);
      v7->m_g = *(_DWORD *)(v8 + 36);
      v7->m_b = *(_DWORD *)(v8 + 40);
      v7->m_uiAlignText = *(_DWORD *)(v8 + 44);
    }
  }
  ++v2->_Mylast;
}

//----- (00455D30) --------------------------------------------------------
void __thiscall std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData>>::resize(std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData> > *this, unsigned int _Newsize)
{
  std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData> > *v2; // esi@1
  SlideListWin::ListItem::ColumnData *v3; // ebx@1
  signed int v4; // ecx@1
  SlideListWin::ListItem::ColumnData *v5; // edi@2
  SlideListWin::ListItem::ColumnData *v6; // edi@3

  v2 = this;
  v3 = this->_Mylast;
  v4 = (char *)this->_Mylast - (char *)this->_Myfirst;
  if ( v4 / 48 <= _Newsize )
  {
    if ( v4 / 48 < _Newsize )
    {
      std::vector<SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData>>::_Reserve(
        v2,
        _Newsize - v4 / 48);
      std::_Uninit_def_fill_n<SlideListWin::ListItem::ColumnData *,unsigned int,SlideListWin::ListItem::ColumnData,std::allocator<SlideListWin::ListItem::ColumnData>,SlideListWin::ListItem::ColumnData>(
        v2->_Mylast,
        _Newsize - (v2->_Mylast - v2->_Myfirst));
      v2->_Mylast += _Newsize - (v2->_Mylast - v2->_Myfirst);
    }
  }
  else
  {
    v5 = &v2->_Myfirst[_Newsize];
    if ( v5 != v3 )
    {
      v6 = std::_Move<SlideListWin::ListItem::ColumnData *,SlideListWin::ListItem::ColumnData *>(v3, v3, v5);
      std::_Destroy_range<std::allocator<SlideListWin::ListItem::ColumnData>>(v6, v2->_Mylast);
      v2->_Mylast = v6;
    }
  }
}

//----- (00455E00) --------------------------------------------------------
void __stdcall boost::checked_deleter<SlideListWin::ListItem>::operator()(SlideListWin::ListItem *x)
{
  SlideListWin::ListItem::ColumnData *v2; // eax@2

  if ( x )
  {
    v2 = x->m_vecColumn._Myfirst;
    if ( v2 )
    {
      std::_Destroy_range<std::allocator<SlideListWin::ListItem::ColumnData>>(v2, x->m_vecColumn._Mylast);
      operator delete(x->m_vecColumn._Myfirst);
    }
    x->m_vecColumn._Myfirst = 0;
    x->m_vecColumn._Mylast = 0;
    x->m_vecColumn._Myend = 0;
    operator delete(x);
  }
}

//----- (00455E60) --------------------------------------------------------
void __thiscall boost::detail::sp_counted_base_impl<SlideListWin::ListItem *,boost::checked_deleter<SlideListWin::ListItem>>::dispose(boost::detail::sp_counted_base_impl<SlideListWin::ListItem *,boost::checked_deleter<SlideListWin::ListItem> > *this)
{
  SlideListWin::ListItem *v1; // esi@1
  SlideListWin::ListItem::ColumnData *v2; // eax@2

  v1 = this->ptr;
  if ( v1 )
  {
    v2 = v1->m_vecColumn._Myfirst;
    if ( v2 )
    {
      std::_Destroy_range<std::allocator<SlideListWin::ListItem::ColumnData>>(v2, v1->m_vecColumn._Mylast);
      operator delete(v1->m_vecColumn._Myfirst);
    }
    v1->m_vecColumn._Myfirst = 0;
    v1->m_vecColumn._Mylast = 0;
    v1->m_vecColumn._Myend = 0;
    operator delete(v1);
  }
}

//----- (00455EC0) --------------------------------------------------------
void __thiscall boost::detail::shared_count::shared_count(boost::detail::shared_count *this, SlideListWin::ListItem *p, boost::checked_deleter<SlideListWin::ListItem> d)
{
  boost::detail::shared_count *v3; // esi@1
  boost::detail::sp_counted_base *v4; // eax@1
  int v5; // [sp+0h] [bp-20h]@1
  int *v6; // [sp+10h] [bp-10h]@1
  int v7; // [sp+1Ch] [bp-4h]@1

  v6 = &v5;
  v3 = this;
  this->pi_ = 0;
  v7 = 0;
  v4 = (boost::detail::sp_counted_base *)operator new(0x18u);
  if ( v4 )
  {
    v4->use_count_ = 1;
    v4->weak_count_ = 1;
    v4->mtx_.l_ = 0;
    v4->vfptr = (boost::detail::sp_counted_baseVtbl *)&boost::detail::sp_counted_base_impl<SlideListWin::ListItem *,boost::checked_deleter<SlideListWin::ListItem>>::`vftable';
    v4[1].vfptr = (boost::detail::sp_counted_baseVtbl *)p;
  }
  else
  {
    v4 = 0;
  }
  v3->pi_ = v4;
}
// 97B06C: using guessed type int (__thiscall *boost::detail::sp_counted_base_impl<SlideListWin::ListItem *,boost::checked_deleter<SlideListWin::ListItem>>::`vftable')(void *p, char);

//----- (00455F60) --------------------------------------------------------
void __thiscall SLWCreateInfo::Item::~Item(SLWCreateInfo::Item *this)
{
  SLWCreateInfo::Item *v1; // esi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v2; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > v3; // ST10_4@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > v4; // ST0C_4@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > v5; // ST10_4@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > v6; // ST0C_4@3
  NiPointer<PgSprData> *v7; // eax@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > result; // [sp+10h] [bp-18h]@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > v9; // [sp+14h] [bp-14h]@3
  SLWCreateInfo::Item *v10; // [sp+18h] [bp-10h]@1
  int v11; // [sp+24h] [bp-4h]@1

  v1 = this;
  v10 = this;
  v11 = 0;
  v2 = this->vecNodeName._Myfirst;
  if ( v2 )
  {
    std::_Destroy_range<std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>(
      v2,
      this->vecNodeName._Mylast);
    operator delete(v1->vecNodeName._Myfirst);
  }
  v1->vecNodeName._Myfirst = 0;
  v1->vecNodeName._Mylast = 0;
  v1->vecNodeName._Myend = 0;
  v9._Ptr = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *)&v1->mapSprDataWinStateOrder;
  v3._Ptr = v1->mapSprDataWinStateOrder._Myhead;
  v4._Ptr = v1->mapSprDataWinStateOrder._Myhead->_Left;
  LOBYTE(v11) = 2;
  std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *)&v1->mapSprDataWinStateOrder.comp,
    &result,
    v4,
    v3);
  operator delete(v1->mapSprDataWinStateOrder._Myhead);
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)&v1->mapSprDataWinState;
  v5._Ptr = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *)v1->mapSprDataWinState._Myhead;
  v6._Ptr = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *)v1->mapSprDataWinState._Myhead->_Left;
  LOBYTE(v11) = 3;
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > *)&v1->mapSprDataWinState,
    &v9,
    v6,
    v5);
  operator delete(v1->mapSprDataWinState._Myhead);
  v7 = v1->vecSprData._Myfirst;
  v11 = -1;
  if ( v7 )
  {
    std::_Destroy_range<std::allocator<NiPointer<PgSprData>>>(v7, v1->vecSprData._Mylast);
    operator delete(v1->vecSprData._Myfirst);
  }
  v1->vecSprData._Myfirst = 0;
  v1->vecSprData._Mylast = 0;
  v1->vecSprData._Myend = 0;
}

//----- (00456060) --------------------------------------------------------
void __thiscall SLWCreateInfo::Item::Item(SLWCreateInfo::Item *this)
{
  SLWCreateInfo::Item *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,enum SLWCreateInfo::SprDataType,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,enum SLWCreateInfo::SprDataType> >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v3; // eax@2
  std::exception v4; // [sp+Ch] [bp-30h]@6
  std::exception pExceptionObject; // [sp+18h] [bp-24h]@4
  SLWCreateInfo::Item *v6; // [sp+24h] [bp-18h]@1
  char *v7; // [sp+28h] [bp-14h]@6
  char *_What; // [sp+2Ch] [bp-10h]@4
  int v9; // [sp+38h] [bp-4h]@1

  v1 = this;
  v6 = this;
  this->vecSprData._Myfirst = 0;
  this->vecSprData._Mylast = 0;
  this->vecSprData._Myend = 0;
  v9 = 0;
  this->mapSprDataWinState._Mysize = 0;
  v2 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,enum SLWCreateInfo::SprDataType,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,enum SLWCreateInfo::SprDataType> >,0> >::_Node *)operator new(0x30u);
  if ( !v2 )
  {
    v7 = 0;
    std::exception::exception(&v4, (const char *const *)&v7);
    v4.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&v4, &_TI2_AVbad_alloc_std__);
  }
  v1->mapSprDataWinState._Myhead = v2;
  v2->_Left = v2;
  v1->mapSprDataWinState._Myhead->_Parent = v1->mapSprDataWinState._Myhead;
  v1->mapSprDataWinState._Myhead->_Right = v1->mapSprDataWinState._Myhead;
  v1->mapSprDataWinState._Myhead->_Color = 1;
  v1->mapSprDataWinState._Myhead->_Isnil = 1;
  LOBYTE(v9) = 1;
  v1->mapSprDataWinStateOrder._Mysize = 0;
  v3 = (std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)operator new(0x30u);
  if ( !v3 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->mapSprDataWinStateOrder._Myhead = v3;
  v3->_Left = v3;
  v1->mapSprDataWinStateOrder._Myhead->_Parent = v1->mapSprDataWinStateOrder._Myhead;
  v1->mapSprDataWinStateOrder._Myhead->_Right = v1->mapSprDataWinStateOrder._Myhead;
  v1->mapSprDataWinStateOrder._Myhead->_Color = 1;
  v1->mapSprDataWinStateOrder._Myhead->_Isnil = 1;
  v1->vecNodeName._Myfirst = 0;
  v1->vecNodeName._Mylast = 0;
  v1->vecNodeName._Myend = 0;
  v1->nItemType = 0;
  v1->pNode = 0;
  v1->bAbbreviatable = 0;
  v1->nVisiableTextMaxNums = 0;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00456180) --------------------------------------------------------
void __stdcall boost::checked_deleter<SLWCreateInfo::Item>::operator()(SLWCreateInfo::Item *x)
{
  if ( x )
  {
    SLWCreateInfo::Item::~Item(x);
    operator delete(x);
  }
}

//----- (004561A0) --------------------------------------------------------
void __thiscall boost::detail::sp_counted_base_impl<SLWCreateInfo::Item *,boost::checked_deleter<SLWCreateInfo::Item>>::dispose(boost::detail::sp_counted_base_impl<SLWCreateInfo::Item *,boost::checked_deleter<SLWCreateInfo::Item> > *this)
{
  SLWCreateInfo::Item *v1; // esi@1

  v1 = this->ptr;
  if ( v1 )
  {
    SLWCreateInfo::Item::~Item(this->ptr);
    operator delete(v1);
  }
}

//----- (004561C0) --------------------------------------------------------
void __thiscall boost::detail::shared_count::shared_count(boost::detail::shared_count *this, SLWCreateInfo::Item *p, boost::checked_deleter<SLWCreateInfo::Item> d)
{
  boost::detail::shared_count *v3; // esi@1
  boost::detail::sp_counted_base *v4; // eax@1
  int v5; // [sp+0h] [bp-20h]@1
  int *v6; // [sp+10h] [bp-10h]@1
  int v7; // [sp+1Ch] [bp-4h]@1

  v6 = &v5;
  v3 = this;
  this->pi_ = 0;
  v7 = 0;
  v4 = (boost::detail::sp_counted_base *)operator new(0x18u);
  if ( v4 )
  {
    v4->use_count_ = 1;
    v4->weak_count_ = 1;
    v4->mtx_.l_ = 0;
    v4->vfptr = (boost::detail::sp_counted_baseVtbl *)&boost::detail::sp_counted_base_impl<SLWCreateInfo::Item *,boost::checked_deleter<SLWCreateInfo::Item>>::`vftable';
    v4[1].vfptr = (boost::detail::sp_counted_baseVtbl *)p;
  }
  else
  {
    v4 = 0;
  }
  v3->pi_ = v4;
}
// 97B080: using guessed type int (__thiscall *boost::detail::sp_counted_base_impl<SLWCreateInfo::Item *,boost::checked_deleter<SLWCreateInfo::Item>>::`vftable')(void *p, char);

//----- (00456260) --------------------------------------------------------
void __thiscall SpeechBubbleWin::SpeechBubbleWin(SpeechBubbleWin *this)
{
  SpeechBubbleWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_fNpcPosX = 0.0;
  v1->vfptr = (NiRefObjectVtbl *)&SpeechBubbleWin::`vftable'{for `NiNode'};
  v1->m_fNpcPosY = 0.0;
  v1->vfptr = (IDirectMessengerVtbl *)&SpeechBubbleWin::`vftable'{for `IDirectMessenger'};
  v1->m_uiMode = 0;
}
// 97B684: using guessed type void (__thiscall *SpeechBubbleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97B6A4: using guessed type int (__thiscall *SpeechBubbleWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004562A0) --------------------------------------------------------
void __thiscall SpeechBubbleWin::~SpeechBubbleWin(SpeechBubbleWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&SpeechBubbleWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SpeechBubbleWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 97B684: using guessed type void (__thiscall *SpeechBubbleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97B6A4: using guessed type int (__thiscall *SpeechBubbleWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004562C0) --------------------------------------------------------
void __thiscall SpeechBubbleWin::SetBubbleWidth(SpeechBubbleWin *this, unsigned int uiWidth)
{
  unsigned int v2; // eax@1
  SpeechBubbleWin *v3; // esi@1
  unsigned int v4; // ecx@1
  int v5; // eax@3
  int v6; // ebx@3
  int v7; // edi@3
  int v8; // eax@3
  int v9; // eax@3
  NiRefObjectVtbl *v10; // edi@3
  int v11; // eax@3
  NiRefObjectVtbl *v12; // edi@3
  int v13; // eax@3
  NiRefObjectVtbl *v14; // ebx@3
  PgWinSpr *v15; // edi@3
  int v16; // eax@3
  PgWinSpr *v17; // ecx@3
  NiRefObjectVtbl *v18; // ebx@3
  PgWinSpr *v19; // edi@3
  int v20; // eax@3
  NiRefObjectVtbl *v21; // edi@3
  int v22; // eax@3
  NiRefObjectVtbl *v23; // ebx@3
  PgWinSpr *v24; // edi@3
  int v25; // eax@3
  unsigned int uiWidtha; // [sp+14h] [bp+8h]@3
  unsigned int uiWidthb; // [sp+14h] [bp+8h]@3
  unsigned int uiWidthc; // [sp+14h] [bp+8h]@3
  unsigned int uiWidthd; // [sp+14h] [bp+8h]@3
  unsigned int uiWidthe; // [sp+14h] [bp+8h]@3

  v2 = uiWidth;
  v3 = this;
  v4 = this->m_uiMinWidth;
  if ( v4 > uiWidth )
    v2 = v4;
  v3->vfptr[117].__vecDelDtor((NiRefObject *)v3, v2);
  v5 = ((int (__thiscall *)(_DWORD))v3->vfptr[115].__vecDelDtor)(v3);
  v6 = v3->m_iWidth;
  v7 = v5;
  ((void (__stdcall *)(_DWORD))v3->m_pkCornor02->vfptr[43].__vecDelDtor)(v5 + v3->m_uiConner02PosX - v6);
  uiWidtha = (unsigned int)v3->m_pkCornor02ArrowUp->vfptr;
  v8 = ((int (*)(void))v3->m_pkCornor02->vfptr[41].__vecDelDtor)();
  (*(void (__thiscall **)(_DWORD, _DWORD))(uiWidtha + 172))(v3->m_pkCornor02ArrowUp, v8);
  uiWidthb = (unsigned int)v3->m_pkCornor02ArrowRight->vfptr;
  v9 = ((int (*)(void))v3->m_pkCornor02->vfptr[41].__vecDelDtor)();
  (*(void (__thiscall **)(_DWORD, _DWORD))(uiWidthb + 172))(v3->m_pkCornor02ArrowRight, v9);
  ((void (__stdcall *)(_DWORD))v3->m_pkCornor04->vfptr[43].__vecDelDtor)(v7 + v3->m_uiConner02PosX - v6);
  v10 = v3->m_pkCornor04ArrowDown->vfptr;
  v11 = ((int (*)(void))v3->m_pkCornor04->vfptr[41].__vecDelDtor)();
  v10[43].__vecDelDtor((NiRefObject *)v3->m_pkCornor04ArrowDown, v11);
  v12 = v3->m_pkCornor04ArrowRight->vfptr;
  v13 = ((int (*)(void))v3->m_pkCornor04->vfptr[41].__vecDelDtor)();
  v12[43].__vecDelDtor((NiRefObject *)v3->m_pkCornor04ArrowRight, v13);
  v14 = v3->m_pkMiddleUP->vfptr;
  v15 = v3->m_pkCornor02;
  uiWidthc = ((int (*)(void))v3->m_pkMiddleUP->vfptr[41].__vecDelDtor)();
  v16 = ((int (__thiscall *)(_DWORD))v15->vfptr[41].__vecDelDtor)(v15);
  v14[117].__vecDelDtor((NiRefObject *)v3->m_pkMiddleUP, v16 - uiWidthc);
  v17 = v3->m_pkMiddleDown;
  v18 = v17->vfptr;
  v19 = v3->m_pkCornor04;
  uiWidthd = ((int (*)(void))v17->vfptr[41].__vecDelDtor)();
  v20 = ((int (__thiscall *)(_DWORD))v19->vfptr[41].__vecDelDtor)(v19);
  v18[117].__vecDelDtor((NiRefObject *)v3->m_pkMiddleDown, v20 - uiWidthd);
  v21 = v3->m_pkMiddleRight->vfptr;
  v22 = ((int (*)(void))v3->m_pkCornor02->vfptr[41].__vecDelDtor)();
  v21[43].__vecDelDtor((NiRefObject *)v3->m_pkMiddleRight, v22);
  v23 = v3->m_pkCenter->vfptr;
  v24 = v3->m_pkMiddleUP;
  uiWidthe = ((int (*)(void))v3->m_pkCornor02->vfptr[41].__vecDelDtor)();
  v25 = ((int (__thiscall *)(_DWORD))v24->vfptr[41].__vecDelDtor)(v24);
  v23[117].__vecDelDtor((NiRefObject *)v3->m_pkCenter, uiWidthe - v25);
}

//----- (004564C0) --------------------------------------------------------
void __thiscall SpeechBubbleWin::SetBubbleHeight(SpeechBubbleWin *this, unsigned int uiHeight)
{
  unsigned int v2; // eax@1
  SpeechBubbleWin *v3; // esi@1
  unsigned int v4; // ecx@1
  int v5; // eax@3
  int v6; // ebx@3
  int v7; // edi@3
  int v8; // eax@3
  int v9; // eax@3
  NiRefObjectVtbl *v10; // edi@3
  int v11; // eax@3
  NiRefObjectVtbl *v12; // edi@3
  int v13; // eax@3
  NiRefObjectVtbl *v14; // ebx@3
  PgWinSpr *v15; // edi@3
  int v16; // eax@3
  NiRefObjectVtbl *v17; // edi@3
  int v18; // eax@3
  NiRefObjectVtbl *v19; // ebx@3
  PgWinSpr *v20; // edi@3
  int v21; // eax@3
  NiRefObjectVtbl *v22; // ebx@3
  PgWinSpr *v23; // edi@3
  int v24; // eax@3
  unsigned int uiHeighta; // [sp+14h] [bp+8h]@3
  unsigned int uiHeightb; // [sp+14h] [bp+8h]@3
  unsigned int uiHeightc; // [sp+14h] [bp+8h]@3
  unsigned int uiHeightd; // [sp+14h] [bp+8h]@3
  unsigned int uiHeighte; // [sp+14h] [bp+8h]@3

  v2 = uiHeight;
  v3 = this;
  v4 = this->m_uiMinHeight;
  if ( v4 > uiHeight )
    v2 = v4;
  v3->vfptr[118].__vecDelDtor((NiRefObject *)v3, v2);
  v5 = ((int (__thiscall *)(_DWORD))v3->vfptr[116].__vecDelDtor)(v3);
  v6 = v3->m_iHeight;
  v7 = v5;
  ((void (__stdcall *)(_DWORD))v3->m_pkCornor03->vfptr[44].__vecDelDtor)(v5 + v3->m_uiConner03PosY - v6);
  uiHeighta = (unsigned int)v3->m_pkCornor03ArrowDown->vfptr;
  v8 = ((int (*)(void))v3->m_pkCornor03->vfptr[42].__vecDelDtor)();
  (*(void (__thiscall **)(_DWORD, _DWORD))(uiHeighta + 176))(v3->m_pkCornor03ArrowDown, v8);
  uiHeightb = (unsigned int)v3->m_pkCornor03ArrowLeft->vfptr;
  v9 = ((int (*)(void))v3->m_pkCornor03->vfptr[42].__vecDelDtor)();
  (*(void (__thiscall **)(_DWORD, _DWORD))(uiHeightb + 176))(v3->m_pkCornor03ArrowLeft, v9);
  ((void (__stdcall *)(_DWORD))v3->m_pkCornor04->vfptr[44].__vecDelDtor)(v7 + v3->m_uiConner03PosY - v6);
  v10 = v3->m_pkCornor04ArrowDown->vfptr;
  v11 = ((int (*)(void))v3->m_pkCornor04->vfptr[42].__vecDelDtor)();
  v10[44].__vecDelDtor((NiRefObject *)v3->m_pkCornor04ArrowDown, v11);
  v12 = v3->m_pkCornor04ArrowRight->vfptr;
  v13 = ((int (*)(void))v3->m_pkCornor04->vfptr[42].__vecDelDtor)();
  v12[44].__vecDelDtor((NiRefObject *)v3->m_pkCornor04ArrowRight, v13);
  v14 = v3->m_pkMiddleLeft->vfptr;
  v15 = v3->m_pkCornor03;
  uiHeightc = ((int (*)(void))v3->m_pkMiddleLeft->vfptr[42].__vecDelDtor)();
  v16 = ((int (__thiscall *)(_DWORD))v15->vfptr[42].__vecDelDtor)(v15);
  v14[118].__vecDelDtor((NiRefObject *)v3->m_pkMiddleLeft, v16 - uiHeightc);
  v17 = v3->m_pkMiddleDown->vfptr;
  v18 = ((int (*)(void))v3->m_pkCornor03->vfptr[42].__vecDelDtor)();
  v17[44].__vecDelDtor((NiRefObject *)v3->m_pkMiddleDown, v18);
  v19 = v3->m_pkMiddleRight->vfptr;
  v20 = v3->m_pkCornor04;
  uiHeightd = ((int (*)(void))v3->m_pkMiddleRight->vfptr[42].__vecDelDtor)();
  v21 = ((int (__thiscall *)(_DWORD))v20->vfptr[42].__vecDelDtor)(v20);
  v19[118].__vecDelDtor((NiRefObject *)v3->m_pkMiddleRight, v21 - uiHeightd);
  v22 = v3->m_pkCenter->vfptr;
  v23 = v3->m_pkMiddleLeft;
  uiHeighte = ((int (*)(void))v3->m_pkCornor03->vfptr[42].__vecDelDtor)();
  v24 = ((int (__thiscall *)(_DWORD))v23->vfptr[42].__vecDelDtor)(v23);
  v22[118].__vecDelDtor((NiRefObject *)v3->m_pkCenter, uiHeighte - v24);
}

//----- (004566C0) --------------------------------------------------------
void __thiscall SpeechBubbleWin::HideArrowWin(SpeechBubbleWin *this)
{
  SpeechBubbleWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkCornor01ArrowUp->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkCornor01ArrowLeft->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkCornor02ArrowUp->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkCornor02ArrowRight->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkCornor03ArrowDown->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkCornor03ArrowLeft->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkCornor04ArrowDown->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkCornor04ArrowRight->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkCornor01->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkCornor02->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkCornor03->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkCornor04->vfptr[64].__vecDelDtor)(1);
}

//----- (004567A0) --------------------------------------------------------
void __thiscall SpeechBubbleWin::SetNpcPos(SpeechBubbleWin *this, float x, float y)
{
  this->m_fNpcPosX = x;
  this->m_fNpcPosY = y;
}

//----- (004567C0) --------------------------------------------------------
void __userpurge SpeechBubbleWin::SetTargetXY(SpeechBubbleWin *this@<ecx>, unsigned int a2@<edi>, int a3@<esi>, float fTargetX, float fTargetY)
{
  int v5; // ST04_4@1
  SpeechBubbleWin *v6; // esi@1
  unsigned int v7; // edi@5
  int v8; // edi@8
  int v9; // edi@13
  int v10; // edi@16
  unsigned int v11; // edi@17
  int v12; // edi@19
  int v13; // edi@20
  int v14; // edi@22
  double v15; // [sp+8h] [bp-Ch]@1
  double v16; // [sp+8h] [bp-Ch]@13

  v5 = a3;
  v6 = this;
  v15 = fTargetX + 50.0;
  if ( (double)((int (__stdcall *)(int))this->vfptr[41].__vecDelDtor)(v5) <= v15
    || (double)((int (__thiscall *)(_DWORD))v6->vfptr[42].__vecDelDtor)(v6) <= fTargetY + 50.0 )
  {
    if ( (double)(int)v6->vfptr[41].__vecDelDtor((NiRefObject *)v6, a2) <= v15
      || (v7 = (unsigned int)((int (__thiscall *)(_DWORD))v6->vfptr[116].__vecDelDtor)(v6) >> 1,
          (double)(((int (__thiscall *)(_DWORD))v6->vfptr[42].__vecDelDtor)(v6) - v7) >= fTargetY + 50.0) )
    {
      if ( (double)((int (__thiscall *)(_DWORD))v6->vfptr[41].__vecDelDtor)(v6) <= v15
        || (v8 = ((int (__thiscall *)(_DWORD))v6->vfptr[116].__vecDelDtor)(v6),
            (double)(unsigned int)(((int (__thiscall *)(_DWORD))v6->vfptr[42].__vecDelDtor)(v6) + v8) <= fTargetY + 50.0) )
      {
        if ( (double)((int (__thiscall *)(_DWORD))v6->vfptr[41].__vecDelDtor)(v6) <= v15
          || (double)((int (__thiscall *)(_DWORD))v6->vfptr[42].__vecDelDtor)(v6) >= fTargetY + 50.0 )
        {
          v16 = fTargetX - 50.0;
          v9 = ((int (__thiscall *)(SpeechBubbleWin *))v6->vfptr[115].__vecDelDtor)(v6);
          if ( (double)(unsigned int)(((int (__thiscall *)(_DWORD))v6->vfptr[41].__vecDelDtor)(v6) + v9) >= v16
            || (double)((int (__thiscall *)(_DWORD))v6->vfptr[42].__vecDelDtor)(v6) <= fTargetY + 50.0 )
          {
            v10 = ((int (__thiscall *)(SpeechBubbleWin *))v6->vfptr[115].__vecDelDtor)(v6);
            if ( (double)(unsigned int)(((int (__thiscall *)(_DWORD))v6->vfptr[41].__vecDelDtor)(v6) + v10) >= v16
              || (v11 = (unsigned int)((int (__thiscall *)(SpeechBubbleWin *))v6->vfptr[116].__vecDelDtor)(v6) >> 1,
                  (double)(((int (__thiscall *)(_DWORD))v6->vfptr[42].__vecDelDtor)(v6) - v11) >= fTargetY + 50.0) )
            {
              v12 = ((int (__thiscall *)(_DWORD))v6->vfptr[115].__vecDelDtor)(v6);
              if ( (double)(unsigned int)(((int (__thiscall *)(SpeechBubbleWin *))v6->vfptr[41].__vecDelDtor)(v6) + v12) >= v16
                || (v13 = ((int (__thiscall *)(SpeechBubbleWin *))v6->vfptr[116].__vecDelDtor)(v6),
                    (double)(unsigned int)(((int (__thiscall *)(SpeechBubbleWin *))v6->vfptr[42].__vecDelDtor)(v6) + v13) <= fTargetY + 50.0) )
              {
                v14 = ((int (__thiscall *)(_DWORD))v6->vfptr[115].__vecDelDtor)(v6);
                if ( (double)(unsigned int)(((int (__thiscall *)(SpeechBubbleWin *))v6->vfptr[41].__vecDelDtor)(v6) + v14) < v16
                  && (double)((int (__thiscall *)(SpeechBubbleWin *))v6->vfptr[42].__vecDelDtor)(v6) < fTargetY + 50.0 )
                {
                  SpeechBubbleWin::HideArrowWin(v6);
                  ((void (__stdcall *)(_DWORD))v6->m_pkCornor04->vfptr[64].__vecDelDtor)(0);
                  ((void (__stdcall *)(signed int))v6->m_pkCornor04ArrowDown->vfptr[64].__vecDelDtor)(1);
                }
              }
              else
              {
                SpeechBubbleWin::HideArrowWin(v6);
                ((void (__cdecl *)(_DWORD))v6->m_pkCornor04->vfptr[64].__vecDelDtor)(0);
                ((void (__cdecl *)(signed int))v6->m_pkCornor04ArrowRight->vfptr[64].__vecDelDtor)(1);
              }
            }
            else
            {
              SpeechBubbleWin::HideArrowWin(v6);
              ((void (__cdecl *)(_DWORD))v6->m_pkCornor02->vfptr[64].__vecDelDtor)(0);
              ((void (__cdecl *)(signed int))v6->m_pkCornor02ArrowRight->vfptr[64].__vecDelDtor)(1);
            }
          }
          else
          {
            SpeechBubbleWin::HideArrowWin(v6);
            ((void (__cdecl *)(_DWORD))v6->m_pkCornor02->vfptr[64].__vecDelDtor)(0);
            ((void (__cdecl *)(signed int))v6->m_pkCornor02ArrowUp->vfptr[64].__vecDelDtor)(1);
          }
        }
        else
        {
          SpeechBubbleWin::HideArrowWin(v6);
          ((void (__cdecl *)(_DWORD))v6->m_pkCornor03->vfptr[64].__vecDelDtor)(0);
          ((void (__cdecl *)(signed int))v6->m_pkCornor03ArrowDown->vfptr[64].__vecDelDtor)(1);
        }
      }
      else
      {
        SpeechBubbleWin::HideArrowWin(v6);
        ((void (__cdecl *)(_DWORD))v6->m_pkCornor03->vfptr[64].__vecDelDtor)(0);
        ((void (__cdecl *)(signed int))v6->m_pkCornor03ArrowLeft->vfptr[64].__vecDelDtor)(1);
      }
    }
    else
    {
      SpeechBubbleWin::HideArrowWin(v6);
      ((void (__cdecl *)(_DWORD))v6->m_pkCornor01->vfptr[64].__vecDelDtor)(0);
      ((void (__cdecl *)(signed int))v6->m_pkCornor01ArrowLeft->vfptr[64].__vecDelDtor)(1);
    }
  }
  else
  {
    SpeechBubbleWin::HideArrowWin(v6);
    ((void (__cdecl *)(_DWORD))v6->m_pkCornor01->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(signed int))v6->m_pkCornor01ArrowUp->vfptr[64].__vecDelDtor)(1);
  }
}
// 4567C0: could not find valid save-restore pair for esi

//----- (00456C60) --------------------------------------------------------
int __thiscall SpeechBubbleWin::GetBubbleHeight(SpeechBubbleWin *this)
{
  return ((int (*)(void))this->vfptr[116].__vecDelDtor)();
}

//----- (00456C70) --------------------------------------------------------
void __userpurge SpeechBubbleWin::UpdateMainCharMode(SpeechBubbleWin *this@<ecx>, int a2@<ebx>, unsigned int a3@<edi>, NiCamera *pkWorldCamera)
{
  SpeechBubbleWin *v4; // esi@1
  Char *v5; // eax@1
  _BYTE v6[12]; // ST0C_12@2
  float fScreenHeight; // ST08_4@2
  float fScreenWidth; // ST04_4@2
  NiPoint3 k2DOrthoPos; // [sp+1Ch] [bp-1Ch]@2
  NiPoint3 kWorldPos; // [sp+28h] [bp-10h]@2

  v4 = this;
  v5 = CharMgr::GetChar(&g_kCharMgr, g_pkMainChar->m_kHandle);
  if ( v5 )
  {
    Char::GetHeightPos(v5, a2, &kWorldPos);
    kWorldPos.z = kWorldPos.z - 3.0;
    *(float *)v6 = kWorldPos.x;
    *(_QWORD *)&v6[4] = *(_QWORD *)&kWorldPos.y;
    fScreenHeight = (double)PgWin::ms_uiScreenHeight;
    fScreenWidth = (double)PgWin::ms_uiScreenWidth;
    if ( PgUtil::Get2DOrthoPosFrom3DPos(pkWorldCamera, fScreenWidth, fScreenHeight, *(NiPoint3 *)v6, &k2DOrthoPos) )
      SpeechBubbleWin::SetTargetXY(v4, a3, (int)v4, k2DOrthoPos.x, k2DOrthoPos.y);
  }
}

//----- (00456D30) --------------------------------------------------------
char __thiscall SpeechBubbleWin::Create(SpeechBubbleWin *this, PgFrameWork *pkFrameWork)
{
  SpeechBubbleWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // ebx@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  int v10; // eax@15
  NiRefObjectVtbl *v11; // edx@15
  int v12; // eax@15
  int v13; // edi@15
  int v14; // ebx@15
  NiNode *v15; // ecx@15
  PgSprData *v16; // eax@15
  PgWinSpr *v17; // eax@15
  PgSprData *v18; // eax@15
  PgWinSpr *v19; // eax@15
  PgSprData *v20; // eax@15
  PgWinSpr *v21; // eax@15
  PgSprData *v22; // eax@15
  PgWinSpr *v23; // eax@15
  PgSprData *v24; // eax@15
  PgWinSpr *v25; // eax@15
  int v26; // eax@15
  NiNode *v27; // ecx@15
  PgSprData *v28; // eax@15
  PgWinSpr *v29; // eax@15
  PgSprData *v30; // eax@15
  PgWinSpr *v31; // eax@15
  PgSprData *v32; // eax@15
  PgWinSpr *v33; // eax@15
  PgSprData *v34; // eax@15
  PgWinSpr *v35; // eax@15
  int v36; // eax@15
  NiNode *v37; // ecx@15
  PgSprData *v38; // eax@15
  PgWinSpr *v39; // eax@15
  PgSprData *v40; // eax@15
  PgWinSpr *v41; // eax@15
  PgSprData *v42; // eax@15
  PgWinSpr *v43; // eax@15
  PgSprData *v44; // eax@15
  PgWinSpr *v45; // eax@15
  PgSprData *v46; // eax@15
  PgWinSpr *v47; // eax@15
  PgSprData *v48; // eax@15
  PgWinSpr *v49; // eax@15
  PgSprData *v50; // eax@15
  PgWinSpr *v51; // eax@15
  PgSprData *v52; // eax@15
  PgWinSpr *v53; // eax@15
  PgFont *v54; // eax@15
  PgWinText *v55; // eax@15
  NiRefObjectVtbl *v56; // edi@15
  PgFont *v57; // eax@15
  NiNode *v58; // esi@16
  NiSourceTexture *pkTexture; // [sp+88h] [bp-1Ch]@1
  NiPointer<NiNode> spNode; // [sp+8Ch] [bp-18h]@1
  int uiLeft; // [sp+90h] [bp-14h]@11
  int uiTop; // [sp+94h] [bp-10h]@11
  int v63; // [sp+A0h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v63 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  pkTexture = v3;
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v63 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "\\Game\\SpeechBubbleWin.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "SpeechBubbleWin", 0) )
  {
    v4 = spNode.m_pObject;
    v63 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
    goto LABEL_5;
  }
  v10 = ((int (__thiscall *)(SpeechBubbleWin *))v2->vfptr[36].__vecDelDtor)(v2);
  v11 = v2->vfptr;
  v2->m_uiMinWidth = v10;
  v12 = ((int (__thiscall *)(SpeechBubbleWin *))v11[37].__vecDelDtor)(v2);
  v13 = uiLeft;
  v14 = uiTop;
  v15 = spNode.m_pObject;
  v2->m_uiMinHeight = v12;
  v16 = PgSprData::Create((NiAVObject *)&v15->vfptr, "Corner01Nor", &uiLeft, &uiTop, pkTexture);
  v17 = PgWinSpr::CreateWin(uiLeft - v13, uiTop - v14, v16, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkCornor01 = v17;
  v17->vfptr[60].__vecDelDtor((NiRefObject *)v17, 0);
  v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Corner01ArrowUp", &uiLeft, &uiTop, pkTexture);
  v19 = PgWinSpr::CreateWin(uiLeft - v13, uiTop - v14, v18, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkCornor01ArrowUp = v19;
  v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkCornor01ArrowUp->vfptr[64].__vecDelDtor)(0);
  v20 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Corner01ArrowLeft01", &uiLeft, &uiTop, pkTexture);
  v21 = PgWinSpr::CreateWin(uiLeft - v13, uiTop - v14, v20, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkCornor01ArrowLeft = v21;
  v21->vfptr[60].__vecDelDtor((NiRefObject *)v21, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkCornor01ArrowLeft->vfptr[64].__vecDelDtor)(0);
  v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Middle_Up", &uiLeft, &uiTop, pkTexture);
  v23 = PgWinSpr::CreateWin(uiLeft - v13, uiTop - v14, v22, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkMiddleUP = v23;
  v23->vfptr[60].__vecDelDtor((NiRefObject *)v23, 0);
  v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Corner02Nor", &uiLeft, &uiTop, pkTexture);
  v25 = PgWinSpr::CreateWin(uiLeft - v13, uiTop - v14, v24, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkCornor02 = v25;
  v25->vfptr[60].__vecDelDtor((NiRefObject *)v25, 0);
  v26 = ((int (*)(void))v2->m_pkCornor02->vfptr[41].__vecDelDtor)();
  v27 = spNode.m_pObject;
  v2->m_uiConner02PosX = v26;
  v28 = PgSprData::Create((NiAVObject *)&v27->vfptr, "Corner02ArrowUp", &uiLeft, &uiTop, pkTexture);
  v29 = PgWinSpr::CreateWin(uiLeft - v13, uiTop - v14, v28, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkCornor02ArrowUp = v29;
  v29->vfptr[60].__vecDelDtor((NiRefObject *)v29, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkCornor02ArrowUp->vfptr[64].__vecDelDtor)(0);
  v30 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Corner02ArrowRight01", &uiLeft, &uiTop, pkTexture);
  v31 = PgWinSpr::CreateWin(uiLeft - v13, uiTop - v14, v30, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkCornor02ArrowRight = v31;
  v31->vfptr[60].__vecDelDtor((NiRefObject *)v31, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkCornor02ArrowRight->vfptr[64].__vecDelDtor)(0);
  v32 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Middle_Left", &uiLeft, &uiTop, pkTexture);
  v33 = PgWinSpr::CreateWin(uiLeft - v13, uiTop - v14, v32, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkMiddleLeft = v33;
  v33->vfptr[60].__vecDelDtor((NiRefObject *)v33, 0);
  v34 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Corner03Nor", &uiLeft, &uiTop, pkTexture);
  v35 = PgWinSpr::CreateWin(uiLeft - v13, uiTop - v14, v34, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkCornor03 = v35;
  v35->vfptr[60].__vecDelDtor((NiRefObject *)v35, 0);
  v36 = ((int (*)(void))v2->m_pkCornor03->vfptr[42].__vecDelDtor)();
  v37 = spNode.m_pObject;
  v2->m_uiConner03PosY = v36;
  v38 = PgSprData::Create((NiAVObject *)&v37->vfptr, "Corner03ArrowDown", &uiLeft, &uiTop, pkTexture);
  v39 = PgWinSpr::CreateWin(uiLeft - v13, uiTop - v14, v38, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkCornor03ArrowDown = v39;
  v39->vfptr[60].__vecDelDtor((NiRefObject *)v39, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkCornor03ArrowDown->vfptr[64].__vecDelDtor)(0);
  v40 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Corner03ArrowLeft01", &uiLeft, &uiTop, pkTexture);
  v41 = PgWinSpr::CreateWin(uiLeft - v13, uiTop - v14, v40, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkCornor03ArrowLeft = v41;
  v41->vfptr[60].__vecDelDtor((NiRefObject *)v41, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkCornor03ArrowLeft->vfptr[64].__vecDelDtor)(0);
  v42 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Middle_Down", &uiLeft, &uiTop, pkTexture);
  v43 = PgWinSpr::CreateWin(uiLeft - v13, uiTop - v14, v42, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkMiddleDown = v43;
  v43->vfptr[60].__vecDelDtor((NiRefObject *)v43, 0);
  v44 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Corner04Nor", &uiLeft, &uiTop, pkTexture);
  v45 = PgWinSpr::CreateWin(uiLeft - v13, uiTop - v14, v44, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkCornor04 = v45;
  v45->vfptr[60].__vecDelDtor((NiRefObject *)v45, 0);
  v46 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Corner04ArrowDown", &uiLeft, &uiTop, pkTexture);
  v47 = PgWinSpr::CreateWin(uiLeft - v13, uiTop - v14, v46, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkCornor04ArrowDown = v47;
  v47->vfptr[60].__vecDelDtor((NiRefObject *)v47, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkCornor04ArrowDown->vfptr[64].__vecDelDtor)(0);
  v48 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Corner04ArrowRight01", &uiLeft, &uiTop, pkTexture);
  v49 = PgWinSpr::CreateWin(uiLeft - v13, uiTop - v14, v48, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkCornor04ArrowRight = v49;
  v49->vfptr[60].__vecDelDtor((NiRefObject *)v49, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkCornor04ArrowRight->vfptr[64].__vecDelDtor)(0);
  v50 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Middle_Right", &uiLeft, &uiTop, pkTexture);
  v51 = PgWinSpr::CreateWin(uiLeft - v13, uiTop - v14, v50, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkMiddleRight = v51;
  v51->vfptr[60].__vecDelDtor((NiRefObject *)v51, 0);
  v52 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Center", &uiLeft, &uiTop, pkTexture);
  v53 = PgWinSpr::CreateWin(uiLeft - v13, uiTop - v14, v52, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkCenter = v53;
  v53->vfptr[60].__vecDelDtor((NiRefObject *)v53, 0);
  v54 = Font::Get(0);
  v55 = PgWinText::CreateWin(0, 1, 0x12Cu, 0x12Cu, v54, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkTextWin = v55;
  v55->vfptr[122].__vecDelDtor((NiRefObject *)v55, 0);
  SpScreenText::SetVerticalGap((SpScreenText *)&v2->m_pkTextWin->m_spTextGeom.m_pObject->vfptr, 6);
  v56 = v2->m_pkTextWin->vfptr;
  v57 = Font::Get(BOLD);
  v56[113].__vecDelDtor((NiRefObject *)v2->m_pkTextWin, (unsigned int)v57);
  ((void (__stdcall *)(_DWORD))v2->m_pkTextWin->vfptr[60].__vecDelDtor)(0);
  ((void (__thiscall *)(SpeechBubbleWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.0,
    0.0);
  v63 = -1;
  if ( spNode.m_pObject )
  {
    v58 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v58 )
        v58->vfptr->__vecDelDtor((NiRefObject *)v58, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004574F0) --------------------------------------------------------
void __userpurge SpeechBubbleWin::Update(SpeechBubbleWin *this@<ecx>, int a2@<ebx>, unsigned int a3@<edi>, int a4@<esi>, float fTime, NiCamera *pkWorldCamera, PgWinCamera *pkScreenCamera)
{
  unsigned int v7; // eax@1

  v7 = this->m_uiMode;
  if ( v7 )
  {
    if ( v7 == 1 )
      SpeechBubbleWin::SetTargetXY(this, a3, a4, this->m_fNpcPosX, this->m_fNpcPosY);
  }
  else
  {
    SpeechBubbleWin::UpdateMainCharMode(this, a2, a3, pkWorldCamera);
  }
}

//----- (00457530) --------------------------------------------------------
void __thiscall SpeechBubbleWin::SetText(SpeechBubbleWin *this, const char *text)
{
  SpeechBubbleWin *v2; // esi@1
  void (__thiscall ***v3)(_DWORD, _DWORD); // edi@1
  PgFont *v4; // eax@5
  PgWinText *v5; // eax@5
  NiRefObjectVtbl *v6; // edi@5
  PgFont *v7; // eax@5
  int v8; // [sp+8h] [bp-4h]@1

  v2 = this;
  ((void (__stdcall *)(int *, PgWinText *))this->vfptr[30].__vecDelDtor)(&v8, this->m_pkTextWin);
  v3 = (void (__thiscall ***)(_DWORD, _DWORD))v8;
  if ( v8 && !InterlockedDecrement((volatile LONG *)(v8 + 4)) && v3 )
    (**v3)(v3, 1);
  v2->m_pkTextWin = 0;
  v4 = Font::Get(0);
  v5 = PgWinText::CreateWin(0, 1, 0x190u, 0x12Cu, v4, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkTextWin = v5;
  v5->vfptr[122].__vecDelDtor((NiRefObject *)v5, 0);
  SpScreenText::SetVerticalGap((SpScreenText *)&v2->m_pkTextWin->m_spTextGeom.m_pObject->vfptr, 4);
  v6 = v2->m_pkTextWin->vfptr;
  v7 = Font::Get(BOLD);
  v6[113].__vecDelDtor((NiRefObject *)v2->m_pkTextWin, (unsigned int)v7);
  ((void (__stdcall *)(_DWORD))v2->m_pkTextWin->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(const char *))v2->m_pkTextWin->vfptr[118].__vecDelDtor)(text);
  SpeechBubbleWin::SetBubbleWidth(v2, 0x190u);
  SpeechBubbleWin::SetBubbleHeight(v2, 0x12Cu);
}

//----- (00457630) --------------------------------------------------------
SpeechBubbleWin *__cdecl SpeechBubbleWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  SpeechBubbleWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1BCu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2[1].m_kWorld.m_Translate.z = 0.0;
    v2->vfptr = (NiRefObjectVtbl *)&SpeechBubbleWin::`vftable'{for `NiNode'};
    v2[1].m_kWorld.m_fScale = 0.0;
    v2->vfptr = (IDirectMessengerVtbl *)&SpeechBubbleWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (SpeechBubbleWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 97B684: using guessed type void (__thiscall *SpeechBubbleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97B6A4: using guessed type int (__thiscall *SpeechBubbleWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00457780) --------------------------------------------------------
SpeechBubbleWin *__thiscall SpeechBubbleWin::`vector deleting destructor'(SpeechBubbleWin *this, unsigned int a2)
{
  SpeechBubbleWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&SpeechBubbleWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SpeechBubbleWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97B684: using guessed type void (__thiscall *SpeechBubbleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97B6A4: using guessed type int (__thiscall *SpeechBubbleWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004577C0) --------------------------------------------------------
int __thiscall CWebHttpConnect::SetPortA(CWebHttpConnect *this, unsigned __int16 nPort)
{
  int result; // eax@2

  if ( !nPort || this->UrlInfo.bUsePort )
  {
    result = 0;
  }
  else
  {
    this->UrlInfo.bUsePort = 1;
    this->UrlInfo.nPort = nPort;
    result = 1;
  }
  return result;
}

//----- (00457800) --------------------------------------------------------
int __thiscall CWebHttpConnect::SetServer(CWebHttpConnect *this, char *sServer)
{
  CWebHttpConnect *v2; // esi@1
  int result; // eax@2

  v2 = this;
  if ( !sServer || this->UrlInfo.bUseServer )
  {
    result = 0;
  }
  else
  {
    strncpy(this->UrlInfo.sServer, sServer, 0x40u);
    result = 1;
    ++v2->UrlInfo.bUseServer;
  }
  return result;
}

//----- (00457840) --------------------------------------------------------
int __thiscall CWebHttpConnect::SetPath(CWebHttpConnect *this, char *sPath)
{
  CWebHttpConnect *v2; // esi@1
  int result; // eax@2

  v2 = this;
  if ( !sPath || this->UrlInfo.bUsePath )
  {
    result = 0;
  }
  else
  {
    strncpy(this->UrlInfo.sPath, sPath, 0x100u);
    result = 1;
    ++v2->UrlInfo.bUsePath;
  }
  return result;
}

//----- (00457890) --------------------------------------------------------
int __thiscall CWebHttpConnect::SetVersion(CWebHttpConnect *this, char *sVersion)
{
  CWebHttpConnect *v2; // esi@1
  int result; // eax@2

  v2 = this;
  if ( !sVersion || this->UrlInfo.bUseVersion )
  {
    result = 0;
  }
  else
  {
    strncpy(this->UrlInfo.sVersion, sVersion, 0x10u);
    result = 1;
    ++v2->UrlInfo.bUseVersion;
  }
  return result;
}

//----- (004578D0) --------------------------------------------------------
int __thiscall CWebHttpConnect::SetFuntion(CWebHttpConnect *this, char *sFuntion)
{
  CWebHttpConnect *v2; // esi@1
  int result; // eax@2

  v2 = this;
  if ( !sFuntion || this->UrlInfo.bUseFuntion )
  {
    result = 0;
  }
  else
  {
    strncpy(this->UrlInfo.sFuntion, sFuntion, 0x40u);
    result = 1;
    ++v2->UrlInfo.bUseFuntion;
  }
  return result;
}

//----- (00457910) --------------------------------------------------------
int __thiscall CWebHttpConnect::SetParameter(CWebHttpConnect *this, char *sParameter, char *sParameterData)
{
  CWebHttpConnect *v3; // esi@1
  int result; // eax@2
  unsigned int v5; // eax@4

  v3 = this;
  if ( sParameter && sParameterData && (v5 = this->UrlInfo.nParameterCnt, v5 < 0xC) )
  {
    _snprintf(this->UrlInfo.sParameter[v5], 0x80u, "%s=%s", sParameter, sParameterData);
    result = 1;
    ++v3->UrlInfo.nParameterCnt;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00457970) --------------------------------------------------------
int __thiscall CWebHttpConnect::SetParameter(CWebHttpConnect *this, char *sParameter)
{
  CWebHttpConnect *v2; // esi@1
  int result; // eax@2
  unsigned int v4; // eax@3

  v2 = this;
  if ( sParameter && (v4 = this->UrlInfo.nParameterCnt, v4 < 0xC) )
  {
    _snprintf(this->UrlInfo.sParameter[v4], 0x80u, "%s", sParameter);
    result = 1;
    ++v2->UrlInfo.nParameterCnt;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (004579C0) --------------------------------------------------------
int __thiscall CWebHttpConnect::SetSharedSecret(CWebHttpConnect *this, char *sSharedSecret)
{
  CWebHttpConnect *v2; // esi@1
  int result; // eax@2

  v2 = this;
  if ( !sSharedSecret || this->UrlInfo.bUseSharedSecret )
  {
    result = 0;
  }
  else
  {
    strncpy(this->UrlInfo.sSharedSecret, sSharedSecret, 0x100u);
    result = 1;
    ++v2->UrlInfo.bUseSharedSecret;
  }
  return result;
}

//----- (00457A10) --------------------------------------------------------
int __thiscall CWebHttpConnect::SetTokenSecret(CWebHttpConnect *this, char *sTokenSecret)
{
  CWebHttpConnect *v2; // esi@1
  int result; // eax@2

  v2 = this;
  if ( !sTokenSecret || this->UrlInfo.bUseTokenSecret )
  {
    result = 0;
  }
  else
  {
    strncpy(this->UrlInfo.sTokenSecret, sTokenSecret, 0x100u);
    result = 1;
    ++v2->UrlInfo.bUseTokenSecret;
  }
  return result;
}

//----- (00457A60) --------------------------------------------------------
char *__thiscall CWebHttpConnect::MakeAddress(CWebHttpConnect *this)
{
  CWebHttpConnect *v1; // esi@1
  unsigned int v2; // eax@1
  unsigned int v3; // edi@2
  char *v4; // ebx@3

  v1 = this;
  v2 = this->UrlInfo.nParameterCnt;
  if ( v2 )
  {
    v3 = 0;
    if ( v2 )
    {
      v4 = (char *)this->UrlInfo.sParameter;
      do
      {
        v1->UrlInfo.nAddressLen += _snprintf(
                                     &v1->UrlInfo.sAddress[v1->UrlInfo.nAddressLen],
                                     1024 - v1->UrlInfo.nAddressLen,
                                     "%s&",
                                     v4);
        ++v3;
        v4 += 128;
      }
      while ( v3 < v1->UrlInfo.nParameterCnt );
    }
    v1->UrlInfo.sAddress[--v1->UrlInfo.nAddressLen] = 0;
    v1->UrlInfo.nParameterCnt = 0;
  }
  return v1->UrlInfo.sAddress;
}

//----- (00457AE0) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall CWebHttpConnect::GetHTMLDocument(CWebHttpConnect *this)
{
  return &this->HTMLDocument;
}

//----- (00457AF0) --------------------------------------------------------
char *__thiscall CWebHttpConnect::GetString(CWebHttpConnect *this, char *sItem)
{
  char *v2; // edx@1
  CWebHttpConnect *v3; // esi@1
  char *result; // eax@2
  int v5; // edi@4
  int v6; // eax@8
  unsigned int v7; // ecx@13
  int v8; // eax@15
  char v9; // al@17
  unsigned int nItemLen; // [sp+4h] [bp-4h]@4

  v2 = sItem;
  v3 = this;
  if ( sItem && this->bHtmlSuccess )
  {
    nItemLen = strlen(sItem);
    v5 = 0;
    if ( v3->nHTMLDocumentLen )
    {
      while ( 1 )
      {
        v6 = (int)(v3->HTMLDocument._Myres < 0x10 ? &v3->HTMLDocument : v3->HTMLDocument._Bx._Ptr);
        if ( !strncmp((const char *)(v5 + v6), v2, nItemLen) )
          break;
        if ( ++v5 >= v3->nHTMLDocumentLen )
          return 0;
        v2 = sItem;
      }
      v7 = 0;
      if ( v3->nHTMLDocumentLen )
      {
        do
        {
          if ( v3->HTMLDocument._Myres < 0x10 )
            v8 = (int)&v3->HTMLDocument;
          else
            v8 = (int)v3->HTMLDocument._Bx._Ptr;
          v9 = *(_BYTE *)(v5 + v7 + v8 + nItemLen + 3);
          v3->sSelectItem[v7] = v9;
          if ( v9 == 34 )
            break;
          ++v7;
        }
        while ( v7 < v3->nHTMLDocumentLen );
      }
      v3->sSelectItem[v7] = 0;
      result = v3->sSelectItem;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00457BC0) --------------------------------------------------------
void __thiscall CWebHttpConnect::CWebHttpConnect(CWebHttpConnect *this)
{
  this->HTMLDocument._Myres = 15;
  this->HTMLDocument._Mysize = 0;
  this->HTMLDocument._Bx._Buf[0] = 0;
}

//----- (00457BE0) --------------------------------------------------------
void __thiscall CWebHttpConnect::~CWebHttpConnect(CWebHttpConnect *this)
{
  CWebHttpConnect *v1; // esi@1

  v1 = this;
  if ( this->HTMLDocument._Myres >= 0x10 )
    operator delete(this->HTMLDocument._Bx._Ptr);
  v1->HTMLDocument._Myres = 15;
  v1->HTMLDocument._Mysize = 0;
  v1->HTMLDocument._Bx._Buf[0] = 0;
}

//----- (00457C10) --------------------------------------------------------
int __thiscall CWebHttpConnect::InitConnection(CWebHttpConnect *this, unsigned int nTimeOut)
{
  CWebHttpConnect *v2; // esi@1
  char *v3; // eax@1
  bool v4; // cf@1
  HINTERNET v5; // eax@3
  int result; // eax@4

  v2 = this;
  v3 = this->HTMLDocument._Bx._Buf;
  this->nError = 0;
  v4 = this->HTMLDocument._Myres < 0x10;
  this->HTMLDocument._Mysize = 0;
  if ( !v4 )
    v3 = *(char **)v3;
  *v3 = 0;
  memset(&this->UrlInfo.bUsePort, 0, 0xDA4u);
  v5 = InternetOpenA("HTTP_CONNECT", 0, 0, 0, 0);
  v2->hInternet = v5;
  if ( v5 )
  {
    InternetSetOptionA(v5, 2u, &nTimeOut, 4u);
    InternetSetOptionA(v2->hInternet, 6u, &nTimeOut, 4u);
    InternetSetOptionA(v2->hInternet, 5u, &nTimeOut, 4u);
    InternetSetOptionA(v2->hInternet, 7u, &nTimeOut, 4u);
    InternetSetOptionA(v2->hInternet, 8u, &nTimeOut, 4u);
    result = 1;
  }
  else
  {
    v2->nError = GetLastError();
    result = 0;
  }
  return result;
}

//----- (00457CD0) --------------------------------------------------------
int __thiscall CWebHttpConnect::QueryToServer(CWebHttpConnect *this)
{
  CWebHttpConnect *v1; // esi@1
  unsigned __int16 v2; // ST08_2@1
  void *v3; // ST00_4@1
  HINTERNET v4; // eax@1
  const char *v6; // eax@4
  HINTERNET v7; // eax@5
  void *i; // edi@7
  unsigned int v9; // ecx@11
  unsigned int v10; // eax@12
  unsigned int dwRead; // [sp+4h] [bp-110h]@11
  unsigned int dwInfoBufferLength; // [sp+8h] [bp-10Ch]@7
  char szReadBuffer[257]; // [sp+Ch] [bp-108h]@10

  v1 = this;
  v2 = this->UrlInfo.nPort;
  v3 = this->hInternet;
  this->bHtmlSuccess = 0;
  v4 = InternetConnectA(v3, this->UrlInfo.sServer, v2, 0, 0, 3u, 0, 0);
  v1->hConnection = v4;
  if ( !v4 )
    goto LABEL_18;
  v6 = CWebHttpConnect::MakeAddress(v1);
  if ( !v6 )
    return 0;
  v7 = HttpOpenRequestA(v1->hConnection, szVerb, v6, 0, 0, 0, 0, 0);
  v1->hRequest = v7;
  if ( !v7 || !HttpSendRequestA(v7, 0, 0, 0, 0) )
  {
LABEL_18:
    v1->nError = GetLastError();
    return 0;
  }
  dwInfoBufferLength = 10;
  for ( i = malloc(0xBu);
        !HttpQueryInfoA(v1->hRequest, 0x13u, i, &dwInfoBufferLength, 0);
        i = malloc(dwInfoBufferLength + 1) )
  {
    if ( GetLastError() != 122 )
      break;
    free(i);
  }
  szReadBuffer[0] = 0;
  memset(&szReadBuffer[1], 0, 0x100u);
  v1->nHTMLDocumentLen = 0;
  while ( 1 )
  {
    InternetReadFile(v1->hRequest, szReadBuffer, 0x100u, &dwRead);
    v9 = dwRead + v1->nHTMLDocumentLen;
    szReadBuffer[dwRead] = 0;
    if ( v9 >= 0x186A0 )
      break;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
      &v1->HTMLDocument,
      szReadBuffer,
      strlen(szReadBuffer));
    v10 = dwRead;
    v1->nHTMLDocumentLen += dwRead;
    v1->bHtmlSuccess = 1;
    if ( !v10 )
      goto LABEL_15;
  }
  v1->bHtmlSuccess = 0;
LABEL_15:
  InternetCloseHandle(v1->hRequest);
  InternetCloseHandle(v1->hConnection);
  InternetCloseHandle(v1->hInternet);
  return 1;
}

//----- (00457EB0) --------------------------------------------------------
void __thiscall CWebContainer::~CWebContainer(CWebContainer *this)
{
  CWebContainer *v1; // esi@1
  CWebEventSink *v2; // eax@1

  v1 = this;
  v2 = this->m_pEvent;
  this->lpVtbl = (IUnknownVtbl *)&CWebContainer::`vftable'{for `IOleClientSite'};
  this->lpVtbl = (IUnknownVtbl *)&CWebContainer::`vftable'{for `IOleInPlaceSite'};
  this->lpVtbl = (IUnknownVtbl *)&CWebContainer::`vftable'{for `IOleInPlaceFrame'};
  this->lpVtbl = (IUnknownVtbl *)&CWebContainer::`vftable'{for `IOleControlSite'};
  this->lpVtbl = (IUnknownVtbl *)&CWebContainer::`vftable'{for `IDispatch'};
  v2->lpVtbl->Release((IUnknown *)v2);
  v1->m_punk->lpVtbl->Release(v1->m_punk);
}
// 97BA6C: using guessed type int (__stdcall *CWebContainer::`vftable'{for `IDispatch'})(int, int, int);
// 97BA8C: using guessed type int (__stdcall *CWebContainer::`vftable'{for `IOleControlSite'})(int, int, int);
// 97BABC: using guessed type int (__stdcall *CWebContainer::`vftable'{for `IOleInPlaceFrame'})(int, int, int);
// 97BAFC: using guessed type int (__stdcall *CWebContainer::`vftable'{for `IOleInPlaceSite'})(int, int, int);
// 97BB3C: using guessed type __int32 (__stdcall *CWebContainer::`vftable'{for `IOleClientSite'})(CWebContainer *this, _GUID *riid, void **ppv);

//----- (00457EF0) --------------------------------------------------------
void __thiscall CWebContainer::setLocation(CWebContainer *this, int x, int y, int cx, int cy)
{
  int v5; // eax@1
  int v6; // edx@1
  char *v7; // esi@1
  int v8; // eax@1

  v5 = x;
  this->m_rect.top = y;
  v6 = cy;
  v7 = (char *)&this->m_rect;
  this->m_rect.left = v5;
  v8 = cx;
  this->m_rect.bottom = v6;
  this->m_rect.right = v8;
  this->m_punk->lpVtbl->QueryInterface(this->m_punk, &IID_IOleInPlaceObject, (void **)&x);
  (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(*(_DWORD *)x + 28))(x, v7, v7);
  (*(void (__stdcall **)(_DWORD))(*(_DWORD *)x + 8))(x);
}

//----- (00457F40) --------------------------------------------------------
void __userpurge CWebContainer::setVisible(CWebContainer *this@<ecx>, int a2@<edi>, bool bVisible)
{
  CWebContainer *v3; // esi@1
  HWND__ *v4; // edx@1
  IUnknownVtbl *v5; // ecx@1
  IOleObject *pioo; // [sp+4h] [bp-4h]@1

  v3 = this;
  this->m_punk->lpVtbl->QueryInterface(this->m_punk, &IID_IOleObject, (void **)&pioo);
  v4 = v3->m_hWnd;
  v5 = pioo->lpVtbl;
  if ( bVisible )
  {
    ((void (__stdcall *)(IOleObject *, signed int, _DWORD, CWebContainer *, _DWORD, HWND__ *, tagRECT *, int))v5[3].Release)(
      pioo,
      -5,
      0,
      v3,
      0,
      v4,
      &v3->m_rect,
      a2);
    ((void (__stdcall *)(IOleObject *, signed int, _DWORD, CWebContainer *, _DWORD, HWND__ *, tagRECT *))pioo->lpVtbl[3].Release)(
      pioo,
      -1,
      0,
      v3,
      0,
      v3->m_hWnd,
      &v3->m_rect);
    ((void (__cdecl *)(IOleObject *))pioo->lpVtbl->Release)(pioo);
  }
  else
  {
    ((void (__stdcall *)(IOleObject *, signed int, _DWORD, CWebContainer *, _DWORD, HWND__ *, _DWORD))v5[3].Release)(
      pioo,
      -3,
      0,
      v3,
      0,
      v4,
      0);
    pioo->lpVtbl->Release((IUnknown *)pioo);
  }
}
// 457F40: could not find valid save-restore pair for edi

//----- (00457FD0) --------------------------------------------------------
void __thiscall CWebContainer::setFocus(CWebContainer *this, bool bFocus)
{
  CWebContainer *v2; // esi@1

  v2 = this;
  if ( bFocus )
  {
    this->m_punk->lpVtbl->QueryInterface(this->m_punk, &IID_IOleObject, (void **)&bFocus);
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)bFocus + 44))(
      bFocus,
      -4,
      0,
      v2,
      0,
      v2->m_hWnd,
      &v2->m_rect);
    (*(void (__stdcall **)(_DWORD))(*(_DWORD *)bFocus + 8))(bFocus);
  }
}

//----- (00458020) --------------------------------------------------------
HRESULT __stdcall CWebEventSink::Invoke(CWebEventSink *this, int dispidMember, _GUID *riid, unsigned int lcid, unsigned __int16 wFlags, tagDISPPARAMS *pDispParams, tagVARIANT *pvarResult, tagEXCEPINFO *pExcepInfo, unsigned int *puArgErr)
{
  return pDispParams != 0 ? 0 : -2147024809;
}

//----- (00458040) --------------------------------------------------------
IConnectionPoint *__thiscall CWebContainer::GetConnectionPoint(CWebContainer *this, _GUID *riid)
{
  IConnectionPoint *pcp; // [sp+0h] [bp-8h]@1
  IConnectionPointContainer *pcpc; // [sp+4h] [bp-4h]@1

  this->m_punk->lpVtbl->QueryInterface(this->m_punk, &IID_IConnectionPointContainer, (void **)&pcpc);
  ((void (__stdcall *)(IConnectionPointContainer *, _GUID *, IConnectionPoint **))pcpc->lpVtbl[1].AddRef)(
    pcpc,
    riid,
    &pcp);
  pcpc->lpVtbl->Release((IUnknown *)pcpc);
  return pcp;
}

//----- (00458080) --------------------------------------------------------
HRESULT __thiscall CWebContainer::getWeb(CWebContainer *this, IWebBrowser2 **ppweb)
{
  return this->m_punk->lpVtbl->QueryInterface(this->m_punk, &IID_IWebBrowser2, (void **)ppweb);
}

//----- (004580A0) --------------------------------------------------------
void __thiscall CWebCtrl::CWebCtrl(CWebCtrl *this, HWND__ *hwnd)
{
  CWebCtrl *v2; // esi@1

  v2 = this;
  this->m_hWnd = hwnd;
  this->m_cxScroll = GetSystemMetrics(21) + 2;
  v2->m_cyScroll = GetSystemMetrics(20) + 2;
}

//----- (004580D0) --------------------------------------------------------
void __thiscall CWebCtrl::Navigate(CWebCtrl *this, char *psz)
{
  int v2; // esi@3
  wchar_t *v3; // edi@3
  tagVARIANT v; // [sp+4h] [bp-14h]@3
  CWebCtrl *v5; // [sp+14h] [bp-4h]@1

  v5 = this;
  if ( psz )
  {
    if ( *psz )
    {
      v2 = lstrlenA(psz) + 1;
      v3 = (wchar_t *)operator new[](2 * v2);
      MultiByteToWideChar(0, 0, psz, -1, v3, v2);
      VariantInit(&v);
      v.vt = 8;
      v.decVal.Lo32 = (unsigned int)SysAllocString(v3);
      operator delete[](v3);
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v5->m_pweb->lpVtbl[17].AddRef)(
        v5->m_pweb,
        &v,
        0,
        0,
        0,
        0);
      VariantClear(&v);
    }
  }
}

//----- (00458180) --------------------------------------------------------
void __thiscall CWebCtrl::Navigate(CWebCtrl *this, char *szURL, char *szPostData, char *szHeaders)
{
  int v4; // esi@3
  wchar_t *v5; // edi@3
  int v6; // eax@3
  int v7; // esi@4
  wchar_t *v8; // edi@4
  tagVARIANT *v9; // edi@4
  int v10; // esi@6
  VARIANTARG *v11; // esi@7
  tagVARIANT varHeaders; // [sp+4h] [bp-40h]@4
  tagVARIANT varURL; // [sp+14h] [bp-30h]@3
  tagVARIANT varPostData; // [sp+24h] [bp-20h]@7
  CWebCtrl *v15; // [sp+34h] [bp-10h]@1
  SAFEARRAYBOUND rgsabound; // [sp+38h] [bp-Ch]@1
  tagVARIANT *pvarHeaders; // [sp+40h] [bp-4h]@1

  v15 = this;
  rgsabound.lLbound = 0;
  pvarHeaders = 0;
  if ( szURL && *szURL )
  {
    v4 = lstrlenA(szURL) + 1;
    v5 = (wchar_t *)operator new[](2 * v4);
    MultiByteToWideChar(0, 0, szURL, -1, v5, v4);
    VariantInit(&varURL);
    varURL.vt = 8;
    varURL.decVal.Lo32 = (unsigned int)SysAllocString(v5);
    operator delete[](v5);
    v6 = lstrlenA(szHeaders);
    if ( v6 <= 0 )
    {
      v9 = pvarHeaders;
    }
    else
    {
      v7 = v6 + 1;
      v8 = (wchar_t *)operator new[](2 * (v6 + 1));
      MultiByteToWideChar(0, 0, szHeaders, -1, v8, v7);
      VariantInit(&varHeaders);
      varHeaders.vt = 8;
      varHeaders.decVal.Lo32 = (unsigned int)SysAllocString(v8);
      operator delete[](v8);
      v9 = &varHeaders;
    }
    v10 = lstrlenA(szPostData);
    if ( v10 <= 0 )
    {
      v11 = (VARIANTARG *)rgsabound.lLbound;
    }
    else
    {
      VariantInit(&varPostData);
      rgsabound.cElements = v10;
      rgsabound.lLbound = 0;
      varPostData.decVal.Lo32 = (unsigned int)SafeArrayCreate(0x11u, 1u, &rgsabound);
      varPostData.vt = 8209;
      SafeArrayAccessData(varPostData.parray, (void **)&szHeaders);
      memcpy(szHeaders, szPostData, v10);
      SafeArrayUnaccessData(varPostData.parray);
      v11 = &varPostData;
    }
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v15->m_pweb->lpVtbl[17].AddRef)(
      v15->m_pweb,
      &varURL,
      0,
      0,
      v11,
      v9);
    VariantClear(&varURL);
    if ( v11 )
      VariantClear(v11);
    if ( v9 )
      VariantClear(v9);
  }
}

//----- (00458320) --------------------------------------------------------
bool __stdcall UninitWebCtrl()
{
  bool v0; // bl@1
  HMODULE v1; // eax@1
  tagWNDCLASSA wc; // [sp+4h] [bp-28h]@1

  v0 = 0;
  v1 = GetModuleHandleA(0);
  if ( GetClassInfoA(v1, "WebCtrl32", &wc) )
    v0 = UnregisterClassA("WebCtrl32", wc.hInstance) != 0;
  CoUninitialize();
  return v0;
}

//----- (00458370) --------------------------------------------------------
void __thiscall CWebContainer::ConnectEvents(CWebContainer *this)
{
  CWebContainer *v1; // esi@1
  int v2; // edi@1
  int v3; // [sp+8h] [bp-8h]@1
  int v4; // [sp+Ch] [bp-4h]@1

  v1 = this;
  this->m_punk->lpVtbl->QueryInterface(this->m_punk, &IID_IConnectionPointContainer, (void **)&v4);
  (*(void (__stdcall **)(int, GUID *, int *))(*(_DWORD *)v4 + 16))(v4, &DIID_DWebBrowserEvents2, &v3);
  (*(void (__stdcall **)(int))(*(_DWORD *)v4 + 8))(v4);
  v2 = v3;
  (*(void (__stdcall **)(int, CWebEventSink *, unsigned int *))(*(_DWORD *)v3 + 20))(
    v3,
    v1->m_pEvent,
    &v1->m_eventCookie);
  (*(void (__stdcall **)(int))(*(_DWORD *)v2 + 8))(v2);
}

//----- (004583D0) --------------------------------------------------------
void __thiscall CWebContainer::DisconnectEvents(CWebContainer *this)
{
  CWebContainer *v1; // esi@1
  int v2; // edi@1
  int v3; // [sp+8h] [bp-8h]@1
  int v4; // [sp+Ch] [bp-4h]@1

  v1 = this;
  this->m_punk->lpVtbl->QueryInterface(this->m_punk, &IID_IConnectionPointContainer, (void **)&v4);
  (*(void (__stdcall **)(int, GUID *, int *))(*(_DWORD *)v4 + 16))(v4, &DIID_DWebBrowserEvents2, &v3);
  (*(void (__stdcall **)(int))(*(_DWORD *)v4 + 8))(v4);
  v2 = v3;
  (*(void (__stdcall **)(int, unsigned int))(*(_DWORD *)v3 + 24))(v3, v1->m_eventCookie);
  (*(void (__stdcall **)(int))(*(_DWORD *)v2 + 8))(v2);
}

//----- (00458430) --------------------------------------------------------
void __thiscall CWebCtrl::Navigate_EX(CWebCtrl *this, char *URL)
{
  signed int v2; // kr08_4@2
  signed int i; // eax@2
  char *v4; // edi@3
  int v5; // esi@7
  wchar_t *v6; // edi@7
  int v7; // eax@7
  int v8; // esi@8
  wchar_t *v9; // edi@8
  VARIANTARG *v10; // edi@8
  int v11; // esi@10
  VARIANTARG *v12; // esi@11
  VARIANTARG v13; // [sp+4h] [bp-244h]@8
  VARIANTARG pvarg; // [sp+14h] [bp-234h]@7
  VARIANTARG v15; // [sp+24h] [bp-224h]@11
  CWebCtrl *v16; // [sp+34h] [bp-214h]@1
  SAFEARRAYBOUND rgsabound; // [sp+38h] [bp-210h]@6
  void *ppvData; // [sp+40h] [bp-208h]@6
  char szFlag[256]; // [sp+44h] [bp-204h]@2
  char szURL[256]; // [sp+144h] [bp-104h]@2

  v16 = this;
  if ( strlen(URL) <= 0xFF )
  {
    memset(szURL, 0, 0x100u);
    memset(szFlag, 0, 0x100u);
    strcpy(szURL, URL);
    v2 = strlen(szURL);
    for ( i = 0; i < v2; ++i )
    {
      v4 = &szURL[i];
      if ( szURL[i] == 63 )
      {
        memcpy(szFlag, &szURL[i + 1], v2 - i);
        *v4 = 0;
        i = v2;
      }
    }
    rgsabound.lLbound = 0;
    ppvData = 0;
    if ( szURL[0] )
    {
      v5 = lstrlenA(szURL) + 1;
      v6 = (wchar_t *)operator new[](2 * v5);
      MultiByteToWideChar(0, 0, szURL, -1, v6, v5);
      VariantInit(&pvarg);
      pvarg.vt = 8;
      pvarg.decVal.Lo32 = (unsigned int)SysAllocString(v6);
      operator delete[](v6);
      v7 = lstrlenA("Content-Type: application/x-www-form-urlencoded");
      if ( v7 <= 0 )
      {
        v10 = (VARIANTARG *)ppvData;
      }
      else
      {
        v8 = v7 + 1;
        v9 = (wchar_t *)operator new[](2 * (v7 + 1));
        MultiByteToWideChar(0, 0, "Content-Type: application/x-www-form-urlencoded", -1, v9, v8);
        VariantInit(&v13);
        v13.vt = 8;
        v13.decVal.Lo32 = (unsigned int)SysAllocString(v9);
        operator delete[](v9);
        v10 = &v13;
      }
      v11 = lstrlenA(szFlag);
      if ( v11 <= 0 )
      {
        v12 = (VARIANTARG *)rgsabound.lLbound;
      }
      else
      {
        VariantInit(&v15);
        rgsabound.cElements = v11;
        rgsabound.lLbound = 0;
        v15.decVal.Lo32 = (unsigned int)SafeArrayCreate(0x11u, 1u, &rgsabound);
        v15.vt = 8209;
        SafeArrayAccessData(v15.parray, &ppvData);
        memcpy((char *)ppvData, szFlag, v11);
        SafeArrayUnaccessData(v15.parray);
        v12 = &v15;
      }
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v16->m_pweb->lpVtbl[17].AddRef)(
        v16->m_pweb,
        &pvarg,
        0,
        0,
        v12,
        v10);
      VariantClear(&pvarg);
      if ( v12 )
        VariantClear(v12);
      if ( v10 )
        VariantClear(v10);
    }
  }
}

//----- (004586F0) --------------------------------------------------------
void __thiscall CWebContainer::CWebContainer(CWebContainer *this, HWND__ *hwnd)
{
  CWebContainer *v2; // esi@1
  CWebEventSink *v3; // eax@1

  v2 = this;
  this->lpVtbl = (IUnknownVtbl *)&CWebContainer::`vftable'{for `IOleClientSite'};
  this->lpVtbl = (IUnknownVtbl *)&CWebContainer::`vftable'{for `IOleInPlaceSite'};
  this->lpVtbl = (IUnknownVtbl *)&CWebContainer::`vftable'{for `IOleInPlaceFrame'};
  this->lpVtbl = (IUnknownVtbl *)&CWebContainer::`vftable'{for `IOleControlSite'};
  this->lpVtbl = (IUnknownVtbl *)&CWebContainer::`vftable'{for `IDispatch'};
  this->m_cRef = 0;
  this->m_hWnd = hwnd;
  this->m_punk = 0;
  SetRectEmpty(&this->m_rect);
  v3 = (CWebEventSink *)operator new(8u);
  if ( v3 )
  {
    v3->lpVtbl = (IUnknownVtbl *)&CWebEventSink::`vftable';
    v3->m_cRef = 0;
    v2->m_pEvent = v3;
    v3->lpVtbl->AddRef((IUnknown *)v3);
  }
  else
  {
    v2->m_pEvent = 0;
    (*(void (__stdcall **)(_DWORD))(v0 + 4))(0);
  }
}
// 97BA6C: using guessed type int (__stdcall *CWebContainer::`vftable'{for `IDispatch'})(int, int, int);
// 97BA8C: using guessed type int (__stdcall *CWebContainer::`vftable'{for `IOleControlSite'})(int, int, int);
// 97BABC: using guessed type int (__stdcall *CWebContainer::`vftable'{for `IOleInPlaceFrame'})(int, int, int);
// 97BAFC: using guessed type int (__stdcall *CWebContainer::`vftable'{for `IOleInPlaceSite'})(int, int, int);
// 97BB3C: using guessed type __int32 (__stdcall *CWebContainer::`vftable'{for `IOleClientSite'})(CWebContainer *this, _GUID *riid, void **ppv);
// 97BB64: using guessed type __int32 (__stdcall *CWebEventSink::`vftable')(CWebEventSink *this, _GUID *riid, void **ppv);

//----- (00458780) --------------------------------------------------------
void __thiscall CWebContainer::add(CWebContainer *this)
{
  CWebContainer *v1; // esi@1
  IUnknown **v2; // edi@1
  int v3; // ebx@1
  int v4; // [sp+Ch] [bp-24h]@1
  IOleObject *pioo; // [sp+10h] [bp-20h]@1
  IPersistStreamInit *ppsi; // [sp+14h] [bp-1Ch]@1
  int v7; // [sp+18h] [bp-18h]@1
  _GUID clsid; // [sp+1Ch] [bp-14h]@1

  v1 = this;
  CLSIDFromString(&sz, &clsid);
  v2 = &v1->m_punk;
  CoCreateInstance(&clsid, 0, 5u, &IID_IUnknown, (LPVOID *)&v1->m_punk);
  (*v2)->lpVtbl->QueryInterface(*v2, &IID_IOleObject, (void **)&pioo);
  ((void (__stdcall *)(IOleObject *, CWebContainer *))pioo->lpVtbl[1].QueryInterface)(pioo, v1);
  pioo->lpVtbl->Release((IUnknown *)pioo);
  (*v2)->lpVtbl->QueryInterface(*v2, &IID_IPersistStreamInit, (void **)&ppsi);
  ppsi->lpVtbl[2].Release((IUnknown *)ppsi);
  ppsi->lpVtbl->Release((IUnknown *)ppsi);
  (*v2)->lpVtbl->QueryInterface(*v2, &IID_IConnectionPointContainer, (void **)&v7);
  (*(void (__stdcall **)(int, GUID *, int *))(*(_DWORD *)v7 + 16))(v7, &DIID_DWebBrowserEvents2, &v4);
  (*(void (__stdcall **)(int))(*(_DWORD *)v7 + 8))(v7);
  v3 = v4;
  (*(void (__stdcall **)(int, CWebEventSink *, unsigned int *))(*(_DWORD *)v4 + 20))(
    v4,
    v1->m_pEvent,
    &v1->m_eventCookie);
  (*(void (__stdcall **)(int))(*(_DWORD *)v3 + 8))(v3);
  (*v2)->lpVtbl->QueryInterface(*v2, &IID_IOleObject, (void **)&v7);
  (*(void (__stdcall **)(int, signed int, _DWORD, CWebContainer *, _DWORD, HWND__ *, tagRECT *))(*(_DWORD *)v7 + 44))(
    v7,
    -5,
    0,
    v1,
    0,
    v1->m_hWnd,
    &v1->m_rect);
  (*(void (__stdcall **)(int, signed int, _DWORD, CWebContainer *, _DWORD, HWND__ *, tagRECT *))(*(_DWORD *)v7 + 44))(
    v7,
    -1,
    0,
    v1,
    0,
    v1->m_hWnd,
    &v1->m_rect);
  (*(void (__stdcall **)(int))(*(_DWORD *)v7 + 8))(v7);
  (*v2)->lpVtbl->QueryInterface(*v2, &IID_IOleObject, (void **)&v7);
  (*(void (__stdcall **)(_DWORD, signed int, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v7 + 44))(
    v7,
    -4,
    0,
    v1,
    0,
    v1->m_hWnd,
    &v1->m_rect);
  (*(void (__stdcall **)(_DWORD))(*(_DWORD *)v7 + 8))(v7);
}

//----- (004588F0) --------------------------------------------------------
void __thiscall CWebContainer::remove(CWebContainer *this)
{
  CWebContainer *v1; // esi@1
  int v2; // edi@1
  int v3; // [sp+8h] [bp-10h]@1
  int v4; // [sp+Ch] [bp-Ch]@1
  IOleInPlaceObject *pipo; // [sp+10h] [bp-8h]@1
  IOleObject *pioo; // [sp+14h] [bp-4h]@1

  v1 = this;
  this->m_punk->lpVtbl->QueryInterface(this->m_punk, &IID_IOleObject, (void **)&pioo);
  ((void (__stdcall *)(IOleObject *, signed int))pioo->lpVtbl[2].QueryInterface)(pioo, 1);
  ((void (__stdcall *)(IOleObject *, _DWORD))pioo->lpVtbl[1].QueryInterface)(pioo, 0);
  pioo->lpVtbl->Release((IUnknown *)pioo);
  v1->m_punk->lpVtbl->QueryInterface(v1->m_punk, &IID_IOleInPlaceObject, (void **)&pipo);
  ((void (__stdcall *)(IOleInPlaceObject *))pipo->lpVtbl[2].QueryInterface)(pipo);
  pipo->lpVtbl[1].Release((IUnknown *)pipo);
  pipo->lpVtbl->Release((IUnknown *)pipo);
  v1->m_punk->lpVtbl->QueryInterface(v1->m_punk, &IID_IConnectionPointContainer, (void **)&v4);
  (*(void (__stdcall **)(int, GUID *, int *))(*(_DWORD *)v4 + 16))(v4, &DIID_DWebBrowserEvents2, &v3);
  (*(void (__stdcall **)(int))(*(_DWORD *)v4 + 8))(v4);
  v2 = v3;
  (*(void (__stdcall **)(int, unsigned int))(*(_DWORD *)v3 + 24))(v3, v1->m_eventCookie);
  (*(void (__stdcall **)(int))(*(_DWORD *)v2 + 8))(v2);
}

//----- (004589C0) --------------------------------------------------------
int __thiscall CWebCtrl::WebCtrlProc(CWebCtrl *this, unsigned int uMsg, unsigned int wParam, int lParam)
{
  CWebCtrl *v4; // esi@1
  CWebContainer *v5; // eax@8
  CWebContainer *v6; // eax@9
  CWebContainer *v8; // esi@17

  v4 = this;
  if ( uMsg > 0xC )
  {
    if ( uMsg == 277 )
      return 0;
    if ( uMsg == 1025 )
    {
      CWebContainer::setVisible(this->m_pContainer, 0, 1);
      return 0;
    }
    if ( uMsg == 1026 )
    {
      v8 = this->m_pContainer;
      v8->m_punk->lpVtbl->QueryInterface(v8->m_punk, &IID_IOleObject, (void **)&lParam);
      (*(void (__stdcall **)(int, signed int, _DWORD, CWebContainer *, _DWORD, HWND__ *, _DWORD))(*(_DWORD *)lParam + 44))(
        lParam,
        -3,
        0,
        v8,
        0,
        v8->m_hWnd,
        0);
      (*(void (__stdcall **)(int))(*(_DWORD *)lParam + 8))(lParam);
      return 0;
    }
    return DefWindowProcA(this->m_hWnd, uMsg, wParam, lParam);
  }
  if ( uMsg == 12 )
  {
    CWebCtrl::Navigate_EX(this, (char *)lParam);
    return 0;
  }
  if ( uMsg == 1 )
  {
    v5 = (CWebContainer *)operator new(0x38u);
    if ( v5 )
      CWebContainer::CWebContainer(v5, v4->m_hWnd);
    else
      v6 = 0;
    v4->m_pContainer = v6;
    v6->lpVtbl->AddRef((IUnknown *)v6);
    CWebContainer::add(v4->m_pContainer);
    v4->m_pContainer->m_punk->lpVtbl->QueryInterface(v4->m_pContainer->m_punk, &IID_IWebBrowser2, (void **)&v4->m_pweb);
    CWebCtrl::Navigate_EX(v4, *(char **)(lParam + 36));
    return 0;
  }
  if ( uMsg == 2 )
  {
    this->m_pweb->lpVtbl->Release((IUnknown *)this->m_pweb);
    CWebContainer::remove(v4->m_pContainer);
    v4->m_pContainer->lpVtbl->Release((IUnknown *)v4->m_pContainer);
    return 0;
  }
  if ( uMsg != 5 )
    return DefWindowProcA(this->m_hWnd, uMsg, wParam, lParam);
  CWebContainer::setLocation(this->m_pContainer, 0, 0, (unsigned __int16)lParam, (unsigned int)lParam >> 16);
  return 0;
}

//----- (00458B50) --------------------------------------------------------
int __stdcall WebCtrlProc(HWND__ *hwnd, unsigned int uMsg, unsigned int wParam, int lParam)
{
  signed int v4; // ebx@1
  _DWORD *v5; // esi@1
  HWND__ **v7; // eax@4
  int lResult; // [sp+18h] [bp+Ch]@8

  v4 = uMsg;
  v5 = GetPropA(hwnd, "this");
  if ( !v5 )
  {
    if ( uMsg != 1 )
      return DefWindowProcA(hwnd, uMsg, wParam, lParam);
    v7 = (HWND__ **)operator new(0x14u);
    v5 = v7;
    if ( v7 )
    {
      *v7 = hwnd;
      v7[1] = (HWND__ *)(GetSystemMetrics(21) + 2);
      v4 = 1;
      v5[2] = GetSystemMetrics(20) + 2;
    }
    else
    {
      v5 = 0;
    }
    SetPropA(hwnd, "this", v5);
  }
  lResult = CWebCtrl::WebCtrlProc((CWebCtrl *)v5, v4, wParam, lParam);
  if ( v4 == 2 )
  {
    RemovePropA(hwnd, "this");
    operator delete(v5);
  }
  return lResult;
}

//----- (00458C10) --------------------------------------------------------
bool __stdcall InitWebCtrl()
{
  HINSTANCE__ *v0; // esi@1
  bool result; // al@2
  tagWNDCLASSA wc; // [sp+4h] [bp-28h]@1

  CoInitialize(0);
  v0 = GetModuleHandleA(0);
  if ( GetClassInfoA(v0, "WebCtrl32", &wc) )
  {
    result = 1;
  }
  else
  {
    wc.cbClsExtra = 0;
    wc.cbWndExtra = 0;
    wc.hIcon = 0;
    wc.hCursor = 0;
    wc.hbrBackground = 0;
    wc.lpszMenuName = 0;
    wc.lpszClassName = 0;
    wc.style = 16936;
    wc.lpfnWndProc = WebCtrlProc;
    wc.hInstance = v0;
    wc.hCursor = LoadCursorA(0, (LPCSTR)0x7F00);
    wc.lpszClassName = "WebCtrl32";
    result = RegisterClassA(&wc) != 0;
  }
  return result;
}

//----- (00458CA0) --------------------------------------------------------
int __cdecl IsEqualGUID(_GUID *rguid1, _GUID *rguid2)
{
  _GUID *v2; // ecx@1
  _GUID *v3; // edx@1
  unsigned int v4; // eax@1
  signed int v6; // eax@5

  v2 = rguid2;
  v3 = rguid1;
  v4 = 16;
  while ( v3->Data1 == v2->Data1 )
  {
    v4 -= 4;
    v2 = (_GUID *)((char *)v2 + 4);
    v3 = (_GUID *)((char *)v3 + 4);
    if ( v4 < 4 )
      return 1;
  }
  v6 = LOBYTE(v3->Data1) - LOBYTE(v2->Data1);
  if ( LOBYTE(v3->Data1) == LOBYTE(v2->Data1) )
  {
    v6 = BYTE1(v3->Data1) - BYTE1(v2->Data1);
    if ( BYTE1(v3->Data1) == BYTE1(v2->Data1) )
    {
      v6 = BYTE2(v3->Data1) - BYTE2(v2->Data1);
      if ( BYTE2(v3->Data1) == BYTE2(v2->Data1) )
        v6 = BYTE3(v3->Data1) - BYTE3(v2->Data1);
    }
  }
  return ((v6 >> 31) | 1) == 0;
}

//----- (00458D10) --------------------------------------------------------
HRESULT __stdcall CWebContainer::QueryInterface(CWebContainer *this, _GUID *riid, void **ppv)
{
  CWebContainer *v3; // eax@3
  HRESULT result; // eax@4

  if ( IsEqualGUID(riid, &IID_IOleClientSite) )
    goto LABEL_22;
  if ( IsEqualGUID(riid, &IID_IOleInPlaceSite) )
  {
    v3 = this;
    if ( this )
    {
      *ppv = &this->lpVtbl;
      this->lpVtbl->AddRef((IUnknown *)this);
      return 0;
    }
LABEL_16:
    *ppv = 0;
    v3->lpVtbl->AddRef((IUnknown *)v3);
    return 0;
  }
  if ( IsEqualGUID(riid, &IID_IOleInPlaceFrame) || IsEqualGUID(riid, &IID_IOleInPlaceUIWindow) )
  {
    v3 = this;
    if ( this )
    {
      *ppv = &this->lpVtbl;
      this->lpVtbl->AddRef((IUnknown *)this);
      return 0;
    }
    goto LABEL_16;
  }
  if ( IsEqualGUID(riid, &IID_IOleControlSite) )
  {
    v3 = this;
    if ( this )
    {
      *ppv = &this->lpVtbl;
      this->lpVtbl->AddRef((IUnknown *)this);
      return 0;
    }
    goto LABEL_16;
  }
  if ( IsEqualGUID(riid, &IID_IOleWindow) )
    goto LABEL_22;
  if ( IsEqualGUID(riid, &IID_IDispatch) )
  {
    v3 = this;
    if ( this )
    {
      *ppv = &this->lpVtbl;
      this->lpVtbl->AddRef((IUnknown *)this);
      return 0;
    }
    goto LABEL_16;
  }
  if ( IsEqualGUID(riid, &IID_IUnknown) )
  {
LABEL_22:
    *ppv = this;
    this->lpVtbl->AddRef((IUnknown *)this);
    result = 0;
  }
  else
  {
    *ppv = 0;
    result = -2147467262;
  }
  return result;
}

//----- (00458E70) --------------------------------------------------------
LONG __stdcall CWebContainer::AddRef(CWebContainer *this)
{
  return InterlockedIncrement((volatile LONG *)&this->m_cRef);
}

//----- (00458E90) --------------------------------------------------------
HRESULT __stdcall CWebContainer::GetContainer(CWebContainer *this, IOleContainer **__formal)
{
  return -2147467262;
}

//----- (00458EA0) --------------------------------------------------------
HRESULT __stdcall CWebContainer::GetWindow(CWebContainer *this, HWND__ **phwnd)
{
  *phwnd = (HWND__ *)this->m_cRef;
  return 0;
}

//----- (00458EC0) --------------------------------------------------------
HRESULT __stdcall CWebContainer::GetWindowContext(CWebContainer *this, IOleInPlaceFrame **ppFrame, IOleInPlaceUIWindow **ppIIPUIWin, tagRECT *prcPosRect, tagRECT *prcClipRect, tagOIFI *pFrameInfo)
{
  IOleInPlaceFrame *v6; // ecx@2
  int v7; // ecx@4
  int v8; // edx@4
  tagRECT rc; // [sp+14h] [bp-14h]@4

  if ( this == (CWebContainer *)4 )
    v6 = 0;
  else
    v6 = (IOleInPlaceFrame *)&this->lpVtbl;
  *ppFrame = v6;
  *ppIIPUIWin = 0;
  GetClientRect((HWND)this->m_cRef, &rc);
  v7 = rc.right;
  v8 = rc.bottom;
  prcPosRect->left = 0;
  prcPosRect->top = 0;
  prcPosRect->right = v7;
  prcPosRect->bottom = v8;
  CopyRect(prcClipRect, prcPosRect);
  pFrameInfo->cb = 20;
  pFrameInfo->fMDIApp = 0;
  pFrameInfo->hwndFrame = (HWND__ *)this->m_cRef;
  pFrameInfo->haccel = 0;
  pFrameInfo->cAccelEntries = 0;
  (*ppFrame)->lpVtbl->AddRef((IUnknown *)*ppFrame);
  return 0;
}

//----- (00458F70) --------------------------------------------------------
HRESULT __stdcall CWebContainer::Scroll(CWebContainer *this, tagMSG *__formal, unsigned int __formala)
{
  return -2147467263;
}

//----- (00458F80) --------------------------------------------------------
HRESULT __stdcall CWebContainer::SetBorderSpace(CWebEventSink *this, unsigned int *__formal)
{
  return -2147467263;
}

//----- (00458F90) --------------------------------------------------------
NiShader *__stdcall NiShaderFactory::RetrieveShader(NiRenderer *pkRenderer, char *pcName, unsigned int uiImplementation)
{
  return 0;
}

//----- (00458FA0) --------------------------------------------------------
HRESULT __stdcall CWebContainer::SaveObject(CWebContainer *this)
{
  return -2147467263;
}

//----- (00458FB0) --------------------------------------------------------
HRESULT __stdcall CWebEventSink::GetIDsOfNames(CWebEventSink *this, _GUID *__formal, wchar_t **a3, unsigned int a4, unsigned int a5, int *pdispid)
{
  *pdispid = -1;
  return -2147352570;
}

//----- (00458FD0) --------------------------------------------------------
HRESULT __stdcall CWebEventSink::GetTypeInfo(CWebEventSink *this, unsigned int __formal, unsigned int __formala, ITypeInfo **a4)
{
  return -2147467263;
}

//----- (00458FE0) --------------------------------------------------------
HRESULT __stdcall CWebContainer::Invoke(CWebContainer *this, int __formal, _GUID *__formala, unsigned int a4, unsigned __int16 a5, tagDISPPARAMS *a6, tagVARIANT *a7, tagEXCEPINFO *a8, unsigned int *a9)
{
  return -2147352573;
}

//----- (00458FF0) --------------------------------------------------------
LONG __stdcall CWebContainer::AddRef(int a1)
{
  return CWebContainer::AddRef((CWebContainer *)(a1 - 4));
}

//----- (00459000) --------------------------------------------------------
LONG __stdcall CWebContainer::AddRef(int a1)
{
  return CWebContainer::AddRef((CWebContainer *)(a1 - 8));
}

//----- (00459010) --------------------------------------------------------
LONG __stdcall CWebContainer::AddRef(int a1)
{
  return CWebContainer::AddRef((CWebContainer *)(a1 - 12));
}

//----- (00459020) --------------------------------------------------------
HRESULT __stdcall CWebContainer::QueryInterface(int a1, _GUID *a2, void **a3)
{
  return CWebContainer::QueryInterface((CWebContainer *)(a1 - 4), a2, a3);
}

//----- (00459030) --------------------------------------------------------
LONG __stdcall CWebContainer::AddRef(int a1)
{
  return CWebContainer::AddRef((CWebContainer *)(a1 - 16));
}

//----- (00459040) --------------------------------------------------------
HRESULT __stdcall CWebContainer::ContextSensitiveHelp(int a1, unsigned int *a2)
{
  return CWebContainer::SetBorderSpace((CWebEventSink *)(a1 - 4), a2);
}

//----- (00459050) --------------------------------------------------------
HRESULT __stdcall CWebContainer::QueryInterface(int a1, _GUID *a2, void **a3)
{
  return CWebContainer::QueryInterface((CWebContainer *)(a1 - 8), a2, a3);
}

//----- (00459060) --------------------------------------------------------
HRESULT __stdcall CWebContainer::QueryInterface(int a1, _GUID *a2, void **a3)
{
  return CWebContainer::QueryInterface((CWebContainer *)(a1 - 12), a2, a3);
}

//----- (00459070) --------------------------------------------------------
HRESULT __stdcall CWebContainer::QueryInterface(int a1, _GUID *a2, void **a3)
{
  return CWebContainer::QueryInterface((CWebContainer *)(a1 - 16), a2, a3);
}

//----- (00459080) --------------------------------------------------------
HRESULT __stdcall CWebContainer::GetWindow(int a1, HWND__ **a2)
{
  return CWebContainer::GetWindow((CWebContainer *)(a1 - 4), a2);
}

//----- (00459090) --------------------------------------------------------
HRESULT __stdcall CWebEventSink::QueryInterface(CWebEventSink *this, _GUID *riid, void **ppv)
{
  HRESULT result; // eax@2

  if ( IsEqualGUID(riid, &IID_IDispatch) )
  {
    *ppv = this;
    this->lpVtbl->AddRef((IUnknown *)this);
    result = 0;
  }
  else if ( IsEqualGUID(riid, &IID_IUnknown) )
  {
    *ppv = this;
    this->lpVtbl->AddRef((IUnknown *)this);
    result = 0;
  }
  else
  {
    *ppv = 0;
    result = -2147467262;
  }
  return result;
}

//----- (00459120) --------------------------------------------------------
LONG __stdcall CWebEventSink::Release(CWebEventSink *this)
{
  LONG result; // eax@1
  unsigned int v2; // esi@1

  result = InterlockedDecrement((volatile LONG *)&this->m_cRef);
  v2 = result;
  if ( !result )
  {
    operator delete(this);
    result = v2;
  }
  return result;
}

//----- (00459150) --------------------------------------------------------
LONG __stdcall CWebContainer::Release(CWebContainer *this)
{
  LONG result; // eax@1
  unsigned int v2; // edi@1
  CWebEventSink *v3; // eax@3

  result = InterlockedDecrement((volatile LONG *)&this->m_cRef);
  v2 = result;
  if ( !result )
  {
    if ( this )
    {
      v3 = this->m_pEvent;
      this->lpVtbl = (IUnknownVtbl *)&CWebContainer::`vftable'{for `IOleClientSite'};
      this->lpVtbl = (IUnknownVtbl *)&CWebContainer::`vftable'{for `IOleInPlaceSite'};
      this->lpVtbl = (IUnknownVtbl *)&CWebContainer::`vftable'{for `IOleInPlaceFrame'};
      this->lpVtbl = (IUnknownVtbl *)&CWebContainer::`vftable'{for `IOleControlSite'};
      this->lpVtbl = (IUnknownVtbl *)&CWebContainer::`vftable'{for `IDispatch'};
      v3->lpVtbl->Release((IUnknown *)v3);
      this->m_punk->lpVtbl->Release(this->m_punk);
      operator delete(this);
      result = v2;
    }
  }
  return result;
}
// 97BA6C: using guessed type int (__stdcall *CWebContainer::`vftable'{for `IDispatch'})(int, int, int);
// 97BA8C: using guessed type int (__stdcall *CWebContainer::`vftable'{for `IOleControlSite'})(int, int, int);
// 97BABC: using guessed type int (__stdcall *CWebContainer::`vftable'{for `IOleInPlaceFrame'})(int, int, int);
// 97BAFC: using guessed type int (__stdcall *CWebContainer::`vftable'{for `IOleInPlaceSite'})(int, int, int);
// 97BB3C: using guessed type __int32 (__stdcall *CWebContainer::`vftable'{for `IOleClientSite'})(CWebContainer *this, _GUID *riid, void **ppv);

//----- (004591C0) --------------------------------------------------------
LONG __stdcall CWebContainer::Release(int a1)
{
  return CWebContainer::Release((CWebContainer *)(a1 - 8));
}

//----- (004591D0) --------------------------------------------------------
LONG __stdcall CWebContainer::Release(int a1)
{
  return CWebContainer::Release((CWebContainer *)(a1 - 12));
}

//----- (004591E0) --------------------------------------------------------
LONG __stdcall CWebContainer::Release(int a1)
{
  return CWebContainer::Release((CWebContainer *)(a1 - 16));
}

//----- (004591F0) --------------------------------------------------------
LONG __stdcall CWebContainer::Release(int a1)
{
  return CWebContainer::Release((CWebContainer *)(a1 - 4));
}

//----- (00459200) --------------------------------------------------------
HRESULT __usercall D3DUtil_LoadDeviceCursor@<eax>(HICON__ *hCursor@<ecx>, IDirect3DSurface9 **rpkSurf@<edx>, IDirect3DDevice9 *pd3dDevice, bool bAddWatermark)
{
  int v4; // edi@1
  int v5; // esi@3
  unsigned int v6; // ebx@3
  int (__stdcall *v7)(void *, int, unsigned int, signed int, signed int, IDirect3DSurface9 **, _DWORD); // eax@6
  int v8; // edi@7
  HDC__ *v9; // edi@7
  HDC__ *v10; // eax@10
  HDC v11; // edi@10
  int v12; // ecx@14
  char *v13; // edx@14
  unsigned int v14; // edi@15
  signed int v15; // eax@16
  unsigned int *v16; // ebx@16
  unsigned int v17; // eax@19
  unsigned int v18; // esi@19
  HRESULT result; // eax@46
  tagBITMAP bm; // [sp+Ch] [bp-B8h]@2
  _D3DLOCKED_RECT lr; // [sp+24h] [bp-A0h]@13
  int v22; // [sp+2Ch] [bp-98h]@14
  int i; // [sp+30h] [bp-94h]@16
  int v24; // [sp+34h] [bp-90h]@14
  _ICONINFO iconinfo; // [sp+38h] [bp-8Ch]@1
  HDC__ *hdcColor; // [sp+4Ch] [bp-78h]@1
  IDirect3DSurface9 **v27; // [sp+50h] [bp-74h]@1
  unsigned int dwWidth; // [sp+54h] [bp-70h]@3
  HDC__ *hdcMask; // [sp+58h] [bp-6Ch]@1
  HDC__ *hdcScreen; // [sp+5Ch] [bp-68h]@1
  char *v31; // [sp+60h] [bp-64h]@14
  unsigned int dwHeightDest; // [sp+64h] [bp-60h]@6
  unsigned int v33; // [sp+68h] [bp-5Ch]@14
  unsigned int y; // [sp+6Ch] [bp-58h]@13
  unsigned int *pcrArrayColor; // [sp+70h] [bp-54h]@1
  IDirect3DSurface9 *pCursorSurface; // [sp+74h] [bp-50h]@1
  unsigned int *pcrArrayMask; // [sp+78h] [bp-4Ch]@1
  void *hgdiobjOld; // [sp+7Ch] [bp-48h]@1
  unsigned int dwHeightSrc; // [sp+80h] [bp-44h]@3
  bool bBWCursor; // [sp+87h] [bp-3Dh]@4
  tagBITMAPINFO bmi; // [sp+88h] [bp-3Ch]@7
  const unsigned __int16 wMask[5]; // [sp+B4h] [bp-10h]@27

  hgdiobjOld = pd3dDevice;
  iconinfo.fIcon = 0;
  iconinfo.xHotspot = 0;
  iconinfo.yHotspot = 0;
  iconinfo.hbmMask = 0;
  iconinfo.hbmColor = 0;
  v27 = rpkSurf;
  v4 = -2147467259;
  pCursorSurface = 0;
  hdcColor = 0;
  hdcMask = 0;
  hdcScreen = 0;
  pcrArrayColor = 0;
  pcrArrayMask = 0;
  if ( GetIconInfo(hCursor, &iconinfo) && GetObjectA(iconinfo.hbmMask, 24, &bm) )
  {
    v5 = bm.bmWidth;
    v6 = bm.bmHeight;
    dwWidth = bm.bmWidth;
    dwHeightSrc = bm.bmHeight;
    if ( iconinfo.hbmColor )
    {
      bBWCursor = 0;
    }
    else
    {
      bBWCursor = 1;
      v6 = (unsigned int)bm.bmHeight >> 1;
    }
    v7 = *(int (__stdcall **)(void *, int, unsigned int, signed int, signed int, IDirect3DSurface9 **, _DWORD))(*(_DWORD *)hgdiobjOld + 144);
    dwHeightDest = v6;
    v4 = v7(hgdiobjOld, bm.bmWidth, v6, 21, 3, &pCursorSurface, 0);
    if ( v4 >= 0 )
    {
      v8 = dwHeightSrc;
      pcrArrayMask = (unsigned int *)operator new[](4 * v5 * dwHeightSrc);
      memset((char *)&bmi, 0, 0x2Cu);
      bmi.bmiHeader.biSize = 40;
      bmi.bmiHeader.biWidth = v5;
      bmi.bmiHeader.biHeight = v8;
      *(_DWORD *)&bmi.bmiHeader.biPlanes = 2097153;
      bmi.bmiHeader.biCompression = 0;
      hdcScreen = GetDC(0);
      v9 = CreateCompatibleDC(hdcScreen);
      hdcMask = v9;
      if ( !v9 )
      {
        v4 = -2147467259;
        goto End;
      }
      hgdiobjOld = SelectObject(v9, iconinfo.hbmMask);
      GetDIBits(v9, iconinfo.hbmMask, 0, dwHeightSrc, pcrArrayMask, &bmi, 0);
      SelectObject(v9, hgdiobjOld);
      if ( !bBWCursor )
      {
        pcrArrayColor = (unsigned int *)operator new[](4 * v5 * v6);
        v10 = CreateCompatibleDC(hdcScreen);
        v11 = v10;
        hdcColor = v10;
        if ( !v10 )
        {
          v4 = -2147467259;
          goto End;
        }
        SelectObject(v10, iconinfo.hbmColor);
        GetDIBits(v11, iconinfo.hbmColor, 0, v6, pcrArrayColor, &bmi, 0);
      }
      ((void (__stdcall *)(IDirect3DSurface9 *, _D3DLOCKED_RECT *, _DWORD, _DWORD))pCursorSurface->lpVtbl[4].AddRef)(
        pCursorSurface,
        &lr,
        0,
        0);
      y = 0;
      if ( v6 )
      {
        v24 = -v5;
        v31 = (char *)lr.pBits;
        v12 = -4 * v5;
        v13 = (char *)pcrArrayMask + v5 * (4 * v6 - 4);
        v22 = -4 * v5;
        v33 = v5 * (dwHeightSrc - 1);
        hgdiobjOld = (char *)pcrArrayMask + v5 * (4 * v6 - 4);
        do
        {
          v14 = 0;
          if ( v5 )
          {
            v15 = (char *)pcrArrayColor - (char *)pcrArrayMask;
            v16 = (unsigned int *)v31;
            dwHeightSrc = 15;
            for ( i = (char *)pcrArrayColor - (char *)pcrArrayMask; ; v15 = i )
            {
              if ( bBWCursor )
              {
                v17 = *(_DWORD *)v13;
                v18 = pcrArrayMask[v14 + v33];
              }
              else
              {
                v17 = *(_DWORD *)&v13[v15];
                v18 = *(_DWORD *)v13;
              }
              if ( v18 )
                *v16 = 0;
              else
                *v16 = v17 | 0xFF000000;
              if ( bAddWatermark && v14 < 0xC && y < 5 )
              {
                wMask[0] = -13120;
                wMask[1] = -23904;
                wMask[2] = -23392;
                wMask[3] = -23904;
                wMask[4] = -13120;
                if ( wMask[y] & (1 << dwHeightSrc) )
                  *v16 |= 0xFF808080;
              }
              --dwHeightSrc;
              ++v14;
              v13 += 4;
              ++v16;
              if ( v14 >= dwWidth )
                break;
            }
            v5 = dwWidth;
            v6 = dwHeightDest;
            v13 = (char *)hgdiobjOld;
            v12 = v22;
          }
          ++y;
          v31 += 4 * v5;
          v33 += v24;
          v13 += v12;
          hgdiobjOld = v13;
        }
        while ( y < v6 );
      }
      pCursorSurface->lpVtbl[4].Release((IUnknown *)pCursorSurface);
      v4 = 0;
    }
  }
End:
  if ( iconinfo.hbmMask )
    DeleteObject(iconinfo.hbmMask);
  if ( iconinfo.hbmColor )
    DeleteObject(iconinfo.hbmColor);
  if ( hdcScreen )
    ReleaseDC(0, hdcScreen);
  if ( hdcColor )
    DeleteDC(hdcColor);
  if ( hdcMask )
    DeleteDC(hdcMask);
  if ( pcrArrayColor )
    operator delete[](pcrArrayColor);
  if ( pcrArrayMask )
  {
    operator delete[](pcrArrayMask);
    *v27 = pCursorSurface;
    result = v4;
  }
  else
  {
    *v27 = pCursorSurface;
    result = v4;
  }
  return result;
}

//----- (004595E0) --------------------------------------------------------
Cursor::Type __cdecl Cursor::GetCursor()
{
  return Cursor::ms_eType;
}
// A6B378: using guessed type enum Cursor::Type Cursor::ms_eType;

//----- (004595F0) --------------------------------------------------------
bool __cdecl Cursor::GetEnableHardware()
{
  return Cursor::ms_bEnableHardware;
}
// A6B375: using guessed type bool Cursor::ms_bEnableHardware;

//----- (00459610) --------------------------------------------------------
void __cdecl Cursor::ReleaseSystemCursor()
{
  HCURSOR *v0; // esi@1

  v0 = (HCURSOR *)&Cursor::ms_akHWCurRes;
  do
  {
    if ( *v0 )
    {
      DestroyCursor(*v0);
      *v0 = 0;
    }
    v0 += 4;
  }
  while ( (signed int)v0 < (signed int)&Cursor::ms_bDeviceSupportHWCursor );
}
// A8BAC8: using guessed type bool Cursor::ms_bDeviceSupportHWCursor;

//----- (00459640) --------------------------------------------------------
void __cdecl Cursor::ReleaseHWCurRes()
{
  _DWORD *v0; // esi@1

  v0 = &unk_A8B9CC;
  do
  {
    if ( *v0 )
    {
      (*(void (__stdcall **)(_DWORD))(*(_DWORD *)*v0 + 8))(*v0);
      *v0 = 0;
    }
    v0 += 4;
  }
  while ( (signed int)v0 < (signed int)&Cursor::ms_pkStudio );
}

//----- (00459680) --------------------------------------------------------
PgCursor *__cdecl Cursor::GetPgCursor()
{
  return Cursor::ms_spGraphicCursor;
}

//----- (00459690) --------------------------------------------------------
void __cdecl Cursor::UpdateGraphicCursorPos(int iXPos, int iYPos)
{
  if ( Cursor::ms_spGraphicCursor )
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))Cursor::ms_spGraphicCursor->vfptr[4].__vecDelDtor)(0.0, iXPos, iYPos);
}

//----- (004596C0) --------------------------------------------------------
void __cdecl Cursor::SetGraphicCursorInfo(Cursor::Type eType, int iTexOffLeft, int iTexOffTop)
{
  PgCursor::SetCursorInfo(eType, dword_A8B9D0[4 * eType], dword_A8B9D4[4 * eType], iTexOffLeft, iTexOffTop);
}
// A8B9D0: using guessed type int dword_A8B9D0[];
// A8B9D4: using guessed type int dword_A8B9D4[];

//----- (004596F0) --------------------------------------------------------
void __cdecl Cursor::TerminateGraphicCursor()
{
  Cursor::ms_spGraphicCursor = 0;
  PgCursor::Shutdown();
}

//----- (00459700) --------------------------------------------------------
char __cdecl Cursor::SetGraphicCursor(Cursor::Type eType)
{
  if ( Cursor::ms_eType != eType )
  {
    Cursor::ms_eType = eType;
    PgCursor::SetType(Cursor::ms_spGraphicCursor, eType);
  }
  return 1;
}
// A6B378: using guessed type enum Cursor::Type Cursor::ms_eType;

//----- (00459730) --------------------------------------------------------
void __cdecl Cursor::ShowGraphicCursor(int bShow)
{
  if ( Cursor::ms_spGraphicCursor )
    ((void (__stdcall *)(_DWORD))Cursor::ms_spGraphicCursor->vfptr[3].__vecDelDtor)(bShow);
}

//----- (00459760) --------------------------------------------------------
void __cdecl Cursor::DrawGraphicCursor()
{
  if ( Cursor::ms_spGraphicCursor )
    ((void (*)(void))Cursor::ms_spGraphicCursor->vfptr[6].__vecDelDtor)();
}

//----- (00459780) --------------------------------------------------------
void __cdecl Cursor::InvalidateDropIcon()
{
  Cursor::ms_bInvalidateDropIcon = 1;
  Cursor::ms_bDropContentsExist = 0;
}
// A8BAC9: using guessed type bool Cursor::ms_bDropContentsExist;
// A8BACA: using guessed type bool Cursor::ms_bInvalidateDropIcon;

//----- (004597A0) --------------------------------------------------------
void __cdecl Cursor::SetCursorPos(int iXPos, int iYPos)
{
  if ( Cursor::ms_spGraphicCursor )
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))Cursor::ms_spGraphicCursor->vfptr[4].__vecDelDtor)(0.0, iXPos, iYPos);
  SetCursorPos(iXPos, iYPos);
}

//----- (004597D0) --------------------------------------------------------
void __cdecl Cursor::Draw()
{
  if ( !Cursor::ms_bEnableHardware )
  {
    if ( Cursor::ms_spGraphicCursor )
      ((void (*)(void))Cursor::ms_spGraphicCursor->vfptr[6].__vecDelDtor)();
  }
}
// A6B375: using guessed type bool Cursor::ms_bEnableHardware;

//----- (004597F0) --------------------------------------------------------
char __cdecl Cursor::CreateSystemCursor()
{
  int *v0; // ebx@1
  char *v1; // eax@4
  int v2; // ecx@4
  char v3; // dl@5
  char *v4; // esi@6
  char v5; // cl@7
  unsigned int v6; // eax@8
  char *v7; // edi@8
  char v8; // cl@9
  HICON v9; // eax@10
  unsigned int v10; // edx@12
  char **v11; // eax@12
  _ICONINFO iconinfo; // [sp+Ch] [bp-18h]@11
  char **v14; // [sp+20h] [bp-4h]@1

  v0 = dword_A8B9D0;
  v14 = apcFileName;
  while ( 1 )
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    v1 = *v14;
    v2 = 0;
    do
    {
      v3 = *(&Folder::m_acMenu + v2);
      *(&Folder::m_acMerge + v2++) = v3;
    }
    while ( v3 );
    v4 = v1;
    do
      v5 = *v1++;
    while ( v5 );
    v6 = v1 - v4;
    v7 = &Folder::m_acMerge - 1;
    do
      v8 = (v7++)[1];
    while ( v8 );
    qmemcpy(v7, v4, v6);
    v9 = (HICON)LoadImageA(0, &Folder::m_acMerge, 2u, 0, 0, 0x2010u);
    *(v0 - 2) = (int)v9;
    if ( !v9 )
      break;
    iconinfo.fIcon = 0;
    iconinfo.xHotspot = 0;
    iconinfo.yHotspot = 0;
    iconinfo.hbmMask = 0;
    iconinfo.hbmColor = 0;
    if ( !GetIconInfo(v9, &iconinfo) )
      break;
    v10 = iconinfo.xHotspot;
    v0[1] = iconinfo.yHotspot;
    v11 = v14 + 1;
    *v0 = v10;
    v0 += 4;
    v14 = v11;
    if ( (signed int)v11 >= (signed int)&NiZBufferProperty `RTTI Type Descriptor' )
      return 1;
  }
  return 0;
}
// A6B3C0: using guessed type int (__thiscall **NiZBufferProperty `RTTI Type Descriptor')(void *p, char);
// A8975C: using guessed type bool Folder::m_bInit;
// A8B9D0: using guessed type int dword_A8B9D0[];

//----- (004598D0) --------------------------------------------------------
char __cdecl Cursor::CreateHWCurRes()
{
  HICON *v0; // eax@1
  HICON v1; // ecx@2
  int v2; // ebx@3
  unsigned int v3; // edi@5
  unsigned int v4; // esi@5
  UINT v5; // ebx@9
  HDC v6; // ebx@9
  HDC v7; // eax@12
  HDC v8; // ebx@12
  UINT v9; // ebx@16
  int v10; // ecx@16
  char *v11; // eax@16
  unsigned int v12; // edi@17
  signed int v13; // ecx@18
  int v14; // ecx@21
  int v15; // edx@21
  bool v16; // zf@28
  char pv; // [sp+Ch] [bp-A8h]@4
  unsigned int v19; // [sp+10h] [bp-A4h]@5
  UINT v20; // [sp+14h] [bp-A0h]@5
  char v21; // [sp+24h] [bp-90h]@15
  UINT v22; // [sp+28h] [bp-8Ch]@16
  IDirect3DDevice9 *pkDevice; // [sp+2Ch] [bp-88h]@1
  unsigned int v24; // [sp+30h] [bp-84h]@16
  int i; // [sp+34h] [bp-80h]@18
  int v26; // [sp+38h] [bp-7Ch]@16
  _ICONINFO piconinfo; // [sp+3Ch] [bp-78h]@3
  HDC v28; // [sp+50h] [bp-64h]@3
  UINT v29; // [sp+54h] [bp-60h]@16
  char *v30; // [sp+58h] [bp-5Ch]@16
  HICON *v31; // [sp+5Ch] [bp-58h]@1
  HDC v32; // [sp+60h] [bp-54h]@3
  UINT v33; // [sp+64h] [bp-50h]@16
  HDC hdc; // [sp+68h] [bp-4Ch]@3
  HGDIOBJ h; // [sp+6Ch] [bp-48h]@11
  LPVOID p; // [sp+70h] [bp-44h]@3
  HICON v37; // [sp+74h] [bp-40h]@3
  LPVOID lpvBits; // [sp+78h] [bp-3Ch]@3
  UINT cLines; // [sp+7Ch] [bp-38h]@5
  char v40; // [sp+83h] [bp-31h]@6
  char dst[4]; // [sp+84h] [bp-30h]@9
  unsigned int v42; // [sp+88h] [bp-2Ch]@9
  UINT v43; // [sp+8Ch] [bp-28h]@9
  int v44; // [sp+90h] [bp-24h]@9
  int v45; // [sp+94h] [bp-20h]@9

  v0 = (HICON *)&Cursor::ms_akHWCurRes;
  pkDevice = (IDirect3DDevice9 *)NiRenderer::ms_pkRenderer[1].vfptr;
  v31 = (HICON *)&Cursor::ms_akHWCurRes;
  while ( 1 )
  {
    v1 = *v0;
    if ( *v0 )
      break;
LABEL_45:
    v0 += 4;
    v31 = v0;
    if ( (signed int)v0 >= (signed int)&Cursor::ms_bDeviceSupportHWCursor )
      return 1;
  }
  v2 = -2147467259;
  v37 = 0;
  v32 = 0;
  v28 = 0;
  hdc = 0;
  p = 0;
  lpvBits = 0;
  piconinfo.fIcon = 0;
  piconinfo.xHotspot = 0;
  piconinfo.yHotspot = 0;
  piconinfo.hbmMask = 0;
  piconinfo.hbmColor = 0;
  if ( GetIconInfo(v1, &piconinfo) && GetObjectA(piconinfo.hbmMask, 24, &pv) )
  {
    v3 = v20;
    v4 = v19;
    cLines = v20;
    if ( piconinfo.hbmColor )
    {
      v40 = 0;
    }
    else
    {
      v40 = 1;
      v3 = v20 >> 1;
    }
    v2 = ((int (__stdcall *)(IDirect3DDevice9 *, unsigned int, unsigned int, signed int, signed int, HICON *, _DWORD))pkDevice->lpVtbl[12].QueryInterface)(
           pkDevice,
           v19,
           v3,
           21,
           3,
           &v37,
           0);
    if ( v2 >= 0 )
    {
      v5 = cLines;
      lpvBits = operator new[](4 * v4 * cLines);
      memset(dst, 0, 0x2Cu);
      *(_DWORD *)dst = 40;
      v42 = v4;
      v43 = v5;
      v44 = 2097153;
      v45 = 0;
      hdc = GetDC(0);
      v6 = CreateCompatibleDC(hdc);
      v28 = v6;
      if ( !v6 )
      {
        v2 = -2147467259;
        goto LABEL_30;
      }
      h = SelectObject(v6, piconinfo.hbmMask);
      GetDIBits(v6, piconinfo.hbmMask, 0, cLines, lpvBits, (LPBITMAPINFO)dst, 0);
      SelectObject(v6, h);
      if ( !v40 )
      {
        p = operator new[](4 * v4 * v3);
        v7 = CreateCompatibleDC(hdc);
        v8 = v7;
        v32 = v7;
        if ( !v7 )
        {
          v2 = -2147467259;
          goto LABEL_30;
        }
        SelectObject(v7, piconinfo.hbmColor);
        GetDIBits(v8, piconinfo.hbmColor, 0, v3, p, (LPBITMAPINFO)dst, 0);
      }
      (*(void (__stdcall **)(HICON, char *, _DWORD, _DWORD))(*(_DWORD *)v37 + 52))(v37, &v21, 0, 0);
      if ( v3 )
      {
        v24 = -v4;
        v33 = v22;
        v9 = v4 * (cLines - 1);
        v10 = -4 * v4;
        v11 = (char *)lpvBits + v4 * (4 * v3 - 4);
        v26 = -4 * v4;
        v29 = v4 * (cLines - 1);
        v30 = (char *)lpvBits + v4 * (4 * v3 - 4);
        h = (HGDIOBJ)v3;
        do
        {
          v12 = 0;
          if ( v4 )
          {
            cLines = v33;
            v13 = (_BYTE *)p - (_BYTE *)lpvBits;
            for ( i = (_BYTE *)p - (_BYTE *)lpvBits; ; v13 = i )
            {
              if ( v40 )
              {
                v14 = *(_DWORD *)v11;
                v15 = *((_DWORD *)lpvBits + v12 + v9);
                v9 = v29;
              }
              else
              {
                v14 = *(_DWORD *)&v11[v13];
                v15 = *(_DWORD *)v11;
              }
              *(_DWORD *)cLines = v15 ? 0 : v14 | 0xFF000000;
              cLines += 4;
              ++v12;
              v11 += 4;
              if ( v12 >= v4 )
                break;
            }
            v10 = v26;
            v11 = v30;
          }
          v9 += v24;
          v33 += 4 * v4;
          v11 += v10;
          v16 = h == (HGDIOBJ)1;
          h = (char *)h - 1;
          v30 = v11;
          v29 = v9;
        }
        while ( !v16 );
      }
      (*(void (__stdcall **)(HICON))(*(_DWORD *)v37 + 56))(v37);
      v2 = 0;
    }
  }
LABEL_30:
  if ( piconinfo.hbmMask )
    DeleteObject(piconinfo.hbmMask);
  if ( piconinfo.hbmColor )
    DeleteObject(piconinfo.hbmColor);
  if ( hdc )
    ReleaseDC(0, hdc);
  if ( v32 )
    DeleteDC(v32);
  if ( v28 )
    DeleteDC(v28);
  if ( p )
    operator delete[](p);
  if ( lpvBits )
    operator delete[](lpvBits);
  v0 = v31;
  v31[1] = v37;
  if ( !v2 )
    goto LABEL_45;
  return 0;
}
// A8BAC8: using guessed type bool Cursor::ms_bDeviceSupportHWCursor;

//----- (00459C50) --------------------------------------------------------
bool __cdecl Cursor::ResetHardwareCursor(Cursor::Type eType)
{
  bool result; // al@2

  if ( eType == 17 )
    result = 0;
  else
    result = (*((int (__stdcall **)(_DWORD, _DWORD, _DWORD, _DWORD))NiRenderer::ms_pkRenderer[1].vfptr->__vecDelDtor + 10))(
               NiRenderer::ms_pkRenderer[1].vfptr,
               *((_DWORD *)&Cursor::ms_akHWCurRes + 4 * eType + 2),
               *((_DWORD *)&Cursor::ms_akHWCurRes + 4 * eType + 3),
               *((_DWORD *)&Cursor::ms_akHWCurRes + 4 * eType + 1)) >= 0;
  return result;
}

//----- (00459C90) --------------------------------------------------------
void __cdecl Cursor::ShowHardwareCursor(bool bShow)
{
  NiRefObjectVtbl *v1; // eax@2

  if ( NiRenderer::ms_pkRenderer )
  {
    v1 = NiRenderer::ms_pkRenderer[1].vfptr;
    if ( v1 )
      (*((void (__stdcall **)(_DWORD, _DWORD))v1->__vecDelDtor + 12))(v1, bShow);
  }
}

//----- (00459CC0) --------------------------------------------------------
void __cdecl Cursor::SetHardwareCursorPos(int iXPos, int iYPos)
{
  NiRefObjectVtbl *v2; // eax@2

  if ( NiRenderer::ms_pkRenderer )
  {
    v2 = NiRenderer::ms_pkRenderer[1].vfptr;
    if ( v2 )
      (*((void (__stdcall **)(_DWORD, _DWORD, _DWORD, _DWORD))v2->__vecDelDtor + 11))(v2, iXPos, iYPos, 1);
  }
}

//----- (00459CF0) --------------------------------------------------------
void __usercall PutCursorOnTexture(int a1@<ebx>, int a2@<esi>, IDirect3DSurface9 *pkSurf, int iXOff, int iYOff, NiSourceTexture *pkTex)
{
  NiTexture::RendererData *v6; // ecx@2
  IDirect3DTexture9 *v7; // eax@3
  IDirect3DTexture9 *v8; // esi@3
  unsigned int (__stdcall *v9)(IUnknown *); // edx@3
  char *v10; // ebx@3
  char *v11; // eax@3
  signed int v12; // edx@3
  _D3DLOCKED_RECT kLRSrc; // [sp+4h] [bp-2Ch]@3
  _D3DLOCKED_RECT kLRDest; // [sp+Ch] [bp-24h]@3
  IDirect3DTexture9 *pkDXTex; // [sp+14h] [bp-1Ch]@3
  IDirect3DSurface9 *v16; // [sp+18h] [bp-18h]@1
  tagRECT kLockRect; // [sp+1Ch] [bp-14h]@3

  v16 = pkSurf;
  if ( pkTex )
  {
    v6 = pkTex->m_pkRendererData;
    if ( v6 )
    {
      v7 = (IDirect3DTexture9 *)((int (__stdcall *)(int, int))v6->vfptr[1].GetWidth)(a2, a1);
      v8 = v7;
      v9 = pkSurf->lpVtbl[4].AddRef;
      pkDXTex = v7;
      ((void (__stdcall *)(IDirect3DSurface9 *, _D3DLOCKED_RECT *, _DWORD, _DWORD))v9)(pkSurf, &kLRSrc, 0, 0);
      v10 = (char *)kLRSrc.pBits;
      kLockRect.top = iYOff;
      kLockRect.bottom = iYOff + 32;
      kLockRect.left = iXOff;
      kLockRect.right = iXOff + 32;
      ((void (__stdcall *)(IDirect3DTexture9 *, _DWORD, _D3DLOCKED_RECT *, tagRECT *, _DWORD))v8->lpVtbl[6].AddRef)(
        v8,
        0,
        &kLRDest,
        &kLockRect,
        0);
      v11 = (char *)kLRDest.pBits;
      v12 = 32;
      do
      {
        qmemcpy(v11, v10, 0x80u);
        v11 += kLRDest.Pitch;
        v10 += kLRSrc.Pitch;
        --v12;
      }
      while ( v12 );
      ((void (__cdecl *)(IDirect3DTexture9 *, _DWORD))pkDXTex->lpVtbl[6].Release)(pkDXTex, 0);
      v16->lpVtbl[4].Release((IUnknown *)v16);
    }
  }
}

//----- (00459DB0) --------------------------------------------------------
bool __cdecl Cursor::InitGraphicCursor()
{
  NiSourceTexture *v0; // eax@1
  int v1; // ebx@1
  NiPixelData *v2; // eax@2
  int v3; // esi@4
  void *v4; // edi@4
  NiRenderer *v5; // edi@10
  int v6; // esi@10
  NiRect<int> kRect; // [sp+10h] [bp-24h]@10
  NiSourceTexture *pkTexture; // [sp+20h] [bp-14h]@1
  int i; // [sp+24h] [bp-10h]@4
  int v11; // [sp+30h] [bp-4h]@1

  PgCursor::SetMaxCursorType(16);
  v0 = (NiSourceTexture *)operator new(0x70u);
  pkTexture = v0;
  v1 = 0;
  v11 = 0;
  if ( v0 )
    NiPixelData::NiPixelData((NiPixelData *)v0, 0x80u, 0x80u, &NiPixelFormat::RGBA32, 1u, 1u);
  else
    v2 = 0;
  v11 = -1;
  pkTexture = NiSourceTexture::Create(v2, &NiSourceTexture::ms_kDefaultPrefs);
  v3 = 0;
  i = 0;
  v4 = &unk_A8B9CC;
  while ( 1 )
  {
    if ( !*(_DWORD *)v4 )
      goto LABEL_9;
    PutCursorOnTexture(v1, v3, *(IDirect3DSurface9 **)v4, v3, v1, pkTexture);
    PgCursor::SetCursorInfo(i, *((_DWORD *)v4 + 1), *((_DWORD *)v4 + 2), v3, v1);
    v3 += 32;
    if ( v3 + 32 <= 128 )
      goto LABEL_9;
    v1 += 32;
    if ( v1 > 128 )
      return 0;
    v3 = 0;
LABEL_9:
    ++i;
    v4 = (char *)v4 + 16;
    if ( (signed int)v4 >= (signed int)&Cursor::ms_pkStudio )
    {
      v5 = NiRenderer::ms_pkRenderer;
      v6 = ((int (__thiscall *)(NiRenderer *))NiRenderer::ms_pkRenderer->vfptr[26].__vecDelDtor)(NiRenderer::ms_pkRenderer);
      kRect.m_right = 0;
      kRect.m_bottom = 0;
      kRect.m_left = 0;
      kRect.m_top = 0;
      kRect.m_right = (*(int (__thiscall **)(int))(*(_DWORD *)v6 + 60))(v6);
      kRect.m_bottom = (*(int (__thiscall **)(int))(*(_DWORD *)v6 + 64))(v6);
      Cursor::ms_spGraphicCursor = (PgCursor *)PgCursor::CreateFromTex(v5, &kRect, 4u, 0, pkTexture);
      return Cursor::ms_spGraphicCursor != 0;
    }
  }
}

//----- (00459F10) --------------------------------------------------------
char __cdecl Cursor::IsHWCursorSupport()
{
  char result; // al@2
  NiRefObjectVtbl *v1; // eax@3
  _D3DCAPS9 kCaps; // [sp+0h] [bp-134h]@4

  if ( NiRenderer::ms_pkRenderer
    && (v1 = NiRenderer::ms_pkRenderer[1].vfptr) != 0
    && !(*((int (__stdcall **)(_DWORD, _DWORD))v1->__vecDelDtor + 7))(v1, &kCaps) )
  {
    if ( kCaps.CursorCaps & 1 )
      result = 1;
    else
      result = (LOBYTE(kCaps.CursorCaps) >> 1) & 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00459F90) --------------------------------------------------------
void __cdecl Cursor::ShowCursor(int bShow)
{
  NiRefObjectVtbl *v1; // eax@4

  if ( Cursor::ms_bShow )
  {
    if ( Cursor::ms_bEnableHardware )
    {
      if ( NiRenderer::ms_pkRenderer )
      {
        v1 = NiRenderer::ms_pkRenderer[1].vfptr;
        if ( v1 )
          (*((void (__stdcall **)(_DWORD, _DWORD))v1->__vecDelDtor + 12))(v1, (unsigned __int8)bShow);
      }
    }
    else if ( Cursor::ms_spGraphicCursor )
    {
      ((void (__stdcall *)(_DWORD))Cursor::ms_spGraphicCursor->vfptr[3].__vecDelDtor)(bShow);
    }
  }
}
// A6B374: using guessed type bool Cursor::ms_bShow;
// A6B375: using guessed type bool Cursor::ms_bEnableHardware;

//----- (00459FE0) --------------------------------------------------------
void __cdecl Cursor::OnResetDevice()
{
  if ( Cursor::ms_bEnableHardware && Cursor::ms_eType != 17 )
    (*((void (__stdcall **)(_DWORD, _DWORD, _DWORD, _DWORD))NiRenderer::ms_pkRenderer[1].vfptr->__vecDelDtor + 10))(
      NiRenderer::ms_pkRenderer[1].vfptr,
      *((_DWORD *)&Cursor::ms_akHWCurRes + 4 * Cursor::ms_eType + 2),
      *((_DWORD *)&Cursor::ms_akHWCurRes + 4 * Cursor::ms_eType + 3),
      *((_DWORD *)&Cursor::ms_akHWCurRes + 4 * Cursor::ms_eType + 1));
}
// A6B375: using guessed type bool Cursor::ms_bEnableHardware;
// A6B378: using guessed type enum Cursor::Type Cursor::ms_eType;

//----- (0045A020) --------------------------------------------------------
bool __cdecl Cursor::InitHardwareCursor()
{
  return Cursor::CreateHWCurRes()
      && (Cursor::ms_pkDropIconSurface
       || (*((int (__stdcall **)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))NiRenderer::ms_pkRenderer[1].vfptr->__vecDelDtor
           + 36))(
            NiRenderer::ms_pkRenderer[1].vfptr,
            32,
            32,
            21,
            3,
            &Cursor::ms_pkDropIconSurface,
            0) >= 0);
}

//----- (0045A070) --------------------------------------------------------
void __cdecl Cursor::TerminateHardwareCursor()
{
  NiD3DDefaultShader *v0; // esi@5
  _DWORD *v1; // esi@10

  if ( Cursor::ms_pkDropIconSurface )
  {
    Cursor::ms_pkDropIconSurface->lpVtbl->Release((IUnknown *)Cursor::ms_pkDropIconSurface);
    Cursor::ms_pkDropIconSurface = 0;
  }
  if ( Cursor::ms_pkDropIconSurfaceTemp )
  {
    Cursor::ms_pkDropIconSurfaceTemp->lpVtbl->Release((IUnknown *)Cursor::ms_pkDropIconSurfaceTemp);
    Cursor::ms_pkDropIconSurfaceTemp = 0;
  }
  v0 = Cursor::ms_spDropIconTexture.m_pObject;
  if ( Cursor::ms_spDropIconTexture.m_pObject )
  {
    if ( !InterlockedDecrement((volatile LONG *)&Cursor::ms_spDropIconTexture.m_pObject->m_uiRefCount) && v0 )
      v0->vfptr->__vecDelDtor((NiRefObject *)v0, 1u);
    Cursor::ms_spDropIconTexture.m_pObject = 0;
  }
  v1 = &unk_A8B9CC;
  do
  {
    if ( *v1 )
    {
      (*(void (__stdcall **)(_DWORD))(*(_DWORD *)*v1 + 8))(*v1);
      *v1 = 0;
    }
    v1 += 4;
  }
  while ( (signed int)v1 < (signed int)&Cursor::ms_pkStudio );
}
// A8BAD4: using guessed type struct IDirect3DSurface9 *Cursor::ms_pkDropIconSurfaceTemp;

//----- (0045A110) --------------------------------------------------------
bool __cdecl Cursor::SetHardwareCursor(Cursor::Type eType)
{
  bool result; // al@2

  if ( Cursor::ms_eType == eType )
  {
    result = 1;
  }
  else if ( (signed int)eType < 16 )
  {
    Cursor::ms_eType = eType;
    result = Cursor::ResetHardwareCursor(eType);
  }
  else
  {
    result = 0;
  }
  return result;
}
// A6B378: using guessed type enum Cursor::Type Cursor::ms_eType;

//----- (0045A140) --------------------------------------------------------
void __cdecl Cursor::Show(int bShow)
{
  if ( (_BYTE)bShow )
  {
    Cursor::ms_bShow = bShow;
    Cursor::ShowCursor(bShow);
  }
  else
  {
    Cursor::ShowCursor(0);
    Cursor::ms_bShow = 0;
  }
}
// A6B374: using guessed type bool Cursor::ms_bShow;

//----- (0045A170) --------------------------------------------------------
void __cdecl Cursor::Terminate()
{
  Studio *v0; // esi@1
  NiD3DDefaultShader *v1; // esi@4
  HCURSOR *v2; // esi@8
  NiD3DDefaultShader *v3; // esi@13

  v0 = Cursor::ms_pkStudio;
  if ( Cursor::ms_pkStudio )
  {
    Studio::~Studio(Cursor::ms_pkStudio);
    operator delete(v0);
  }
  if ( Cursor::ms_spCursorRenderCamera.m_pObject )
  {
    v1 = Cursor::ms_spCursorRenderCamera.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&Cursor::ms_spCursorRenderCamera.m_pObject->m_uiRefCount) && v1 )
      v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
    Cursor::ms_spCursorRenderCamera.m_pObject = 0;
  }
  v2 = (HCURSOR *)&Cursor::ms_akHWCurRes;
  do
  {
    if ( *v2 )
    {
      DestroyCursor(*v2);
      *v2 = 0;
    }
    v2 += 4;
  }
  while ( (signed int)v2 < (signed int)&Cursor::ms_bDeviceSupportHWCursor );
  Cursor::TerminateHardwareCursor();
  Cursor::ms_spGraphicCursor = 0;
  PgCursor::Shutdown();
  if ( Cursor::ms_spCursorFrame.m_pObject )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)Cursor::ms_spCursorFrame.m_pObject);
    v3 = Cursor::ms_spCursorFrame.m_pObject;
    if ( Cursor::ms_spCursorFrame.m_pObject )
    {
      if ( !InterlockedDecrement((volatile LONG *)&Cursor::ms_spCursorFrame.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
      Cursor::ms_spCursorFrame.m_pObject = 0;
    }
  }
}
// A8BAC8: using guessed type bool Cursor::ms_bDeviceSupportHWCursor;

//----- (0045A240) --------------------------------------------------------
bool __cdecl Cursor::SetCursor(Cursor::Type eType)
{
  if ( Cursor::ms_bDropContentsExist )
    return 0;
  if ( !Cursor::ms_bEnableHardware )
  {
    if ( Cursor::ms_eType != eType )
    {
      Cursor::ms_eType = eType;
      PgCursor::SetType(Cursor::ms_spGraphicCursor, eType);
    }
    return 1;
  }
  if ( Cursor::ms_eType == eType )
    return 1;
  if ( (signed int)eType >= 16 )
    return 0;
  Cursor::ms_eType = eType;
  return Cursor::ResetHardwareCursor(eType);
}
// A6B375: using guessed type bool Cursor::ms_bEnableHardware;
// A6B378: using guessed type enum Cursor::Type Cursor::ms_eType;
// A8BAC9: using guessed type bool Cursor::ms_bDropContentsExist;

//----- (0045A2A0) --------------------------------------------------------
void __cdecl Cursor::EnableHardware(bool bEnable)
{
  NiRefObjectVtbl *v1; // eax@5
  NiRefObjectVtbl *v2; // eax@8

  if ( bEnable )
  {
    Cursor::ms_bEnableHardware = 1;
    if ( Cursor::ms_spGraphicCursor )
      ((void (__stdcall *)(_DWORD))Cursor::ms_spGraphicCursor->vfptr[3].__vecDelDtor)(0);
    if ( NiRenderer::ms_pkRenderer )
    {
      v1 = NiRenderer::ms_pkRenderer[1].vfptr;
      if ( v1 )
        (*((void (__stdcall **)(_DWORD, _DWORD))v1->__vecDelDtor + 12))(v1, 1);
    }
  }
  else
  {
    Cursor::ms_bEnableHardware = 0;
    if ( NiRenderer::ms_pkRenderer )
    {
      v2 = NiRenderer::ms_pkRenderer[1].vfptr;
      if ( v2 )
        (*((void (__stdcall **)(_DWORD, _DWORD))v2->__vecDelDtor + 12))(v2, 0);
    }
    if ( Cursor::ms_spGraphicCursor )
      ((void (__stdcall *)(_DWORD))Cursor::ms_spGraphicCursor->vfptr[3].__vecDelDtor)(1);
  }
}
// A6B375: using guessed type bool Cursor::ms_bEnableHardware;

//----- (0045A320) --------------------------------------------------------
void __cdecl Cursor::SwitchCursor()
{
  NiRefObjectVtbl *v0; // eax@5
  NiRefObjectVtbl *v1; // eax@8

  if ( Cursor::ms_bEnableHardware )
  {
    Cursor::ms_bEnableHardware = 0;
    if ( Cursor::ms_spGraphicCursor )
      ((void (__stdcall *)(_DWORD))Cursor::ms_spGraphicCursor->vfptr[3].__vecDelDtor)(0);
    if ( NiRenderer::ms_pkRenderer )
    {
      v0 = NiRenderer::ms_pkRenderer[1].vfptr;
      if ( v0 )
        (*((void (__stdcall **)(_DWORD, _DWORD))v0->__vecDelDtor + 12))(v0, 1);
    }
  }
  else
  {
    Cursor::ms_bEnableHardware = 1;
    if ( NiRenderer::ms_pkRenderer )
    {
      v1 = NiRenderer::ms_pkRenderer[1].vfptr;
      if ( v1 )
        (*((void (__stdcall **)(_DWORD, _DWORD))v1->__vecDelDtor + 12))(v1, 0);
    }
    if ( Cursor::ms_spGraphicCursor )
      ((void (__stdcall *)(_DWORD))Cursor::ms_spGraphicCursor->vfptr[3].__vecDelDtor)(1);
  }
}
// A6B375: using guessed type bool Cursor::ms_bEnableHardware;

//----- (0045A3A0) --------------------------------------------------------
void __cdecl Cursor::Update()
{
  struct PgWinDrop *v0; // esi@1
  enum Cursor::Type v1; // eax@4
  IconSlotWin *v2; // ebx@19
  NiD3DDefaultShader *v3; // eax@20
  NiTexturePalette *v4; // esi@21
  const char *v5; // eax@23
  IDirect3DSurface9 *v6; // eax@23
  PgSprData *v7; // eax@24
  NiD3DDefaultShader *v8; // eax@24
  IDirect3DSurface9 *v9; // esi@26
  NiObjectNET *v10; // eax@31
  NiObjectNET *v11; // esi@31
  NiObjectNET *v12; // eax@32
  NiMaterialProperty *v13; // eax@34
  int v14; // eax@35
  float v15; // ecx@37
  int v16; // ecx@37
  float v17; // edx@37
  float v18; // edx@37
  NiObjectNET *v19; // eax@37
  NiObjectNET *v20; // esi@37
  NiCamera *v21; // eax@41
  NiD3DDefaultShader *v22; // eax@42
  NiD3DDefaultShader *v23; // eax@44
  Studio *v24; // eax@45
  float v25; // ecx@45
  float v26; // edx@45
  Studio *v27; // edi@45
  NiNode *v28; // esi@45
  NiRefObjectVtbl *v29; // esi@50
  DIRECT3DTEXTURE9 *v30; // eax@50
  IDirect3DSurface9 *v31; // eax@51
  bool v32; // sf@53
  float v33; // esi@55
  unsigned int (__stdcall *v34)(IUnknown *); // eax@55
  float v35; // edi@55
  int v36; // ecx@57
  int v37; // eax@57
  int v38; // esi@57
  signed int v39; // edi@57
  NiPoint3 kWorldPt; // [sp+24h] [bp-60h]@44
  char *pbyDest; // [sp+30h] [bp-54h]@55
  char *pbySrc; // [sp+34h] [bp-50h]@24
  NiPointer<HazeAccumulator> v43; // [sp+38h] [bp-4Ch]@17
  float v44; // [sp+3Ch] [bp-48h]@45
  NiPoint3 kWorldUp; // [sp+40h] [bp-44h]@44
  int iTop; // [sp+4Ch] [bp-38h]@24
  IDirect3DSurface9 *pkDxSurf; // [sp+50h] [bp-34h]@21
  int v48; // [sp+54h] [bp-30h]@53
  NiFrustum frust; // [sp+58h] [bp-2Ch]@44
  int v50; // [sp+80h] [bp-4h]@21

  v0 = PgCursor::ms_pkDrop;
  if ( !PgCursor::ms_pkDrop && !Cursor::ms_bInvalidateDropIcon )
  {
    if ( !Cursor::ms_bDropContentsExist )
      return;
    v1 = Cursor::ms_eType;
    Cursor::ms_bDropContentsExist = 0;
    if ( Cursor::ms_bEnableHardware )
    {
      if ( Cursor::ms_eType == 1 )
      {
LABEL_11:
        if ( Cursor::ms_bEnableHardware )
        {
          if ( v1 )
          {
            Cursor::ms_eType = 0;
            Cursor::ResetHardwareCursor(0);
          }
          goto LABEL_16;
        }
LABEL_14:
        if ( v1 )
        {
          Cursor::ms_eType = 0;
          PgCursor::SetType(Cursor::ms_spGraphicCursor, 0);
        }
        goto LABEL_16;
      }
      Cursor::ms_eType = 1;
      Cursor::ResetHardwareCursor((Cursor::Type)1);
    }
    else
    {
      if ( Cursor::ms_eType == 1 )
        goto LABEL_14;
      Cursor::ms_eType = 1;
      PgCursor::SetType(Cursor::ms_spGraphicCursor, 1);
    }
    if ( Cursor::ms_bDropContentsExist )
    {
LABEL_16:
      if ( Cursor::m_pkSlotWin )
      {
        ((void (__stdcall *)(NiPointer<HazeAccumulator> *, NiD3DDefaultShader *))Cursor::m_pkSlotWin->vfptr[30].__vecDelDtor)(
          &v43,
          Cursor::ms_spCursorFrame.m_pObject);
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>(&v43);
        PgWinMgr::DestroyWin(&Pgg_kWinMgr, Cursor::m_pkSlotWin);
        Cursor::m_pkSlotWin = 0;
      }
      return;
    }
    v1 = Cursor::ms_eType;
    goto LABEL_11;
  }
  if ( !Cursor::ms_bDropContentsExist )
  {
    v2 = IconSlotWin::CreateWin(-16, -16, 0);
    if ( !v0->m_pkContents )
      return;
    IconSlotWin::SetDropContents(v2, (int)v2, (DropContents *)v0->m_pkContents);
    v3 = Cursor::ms_spCursorFrame.m_pObject;
    if ( Cursor::ms_spCursorFrame.m_pObject )
      goto LABEL_68;
    pkDxSurf = 0;
    v4 = pTexturePalette;
    v50 = 0;
    if ( !Folder::m_bInit )
      Folder::Init();
    v5 = Folder::Merge(&Folder::m_acMenu, "Game\\ItemCursor.nif");
    PgUtil::LoadNodeNifFile(v5, (NiPointer<NiNode> *)&pkDxSurf, v4);
    v6 = pkDxSurf;
    if ( pkDxSurf )
    {
      v7 = PgSprData::Create((NiAVObject *)pkDxSurf, "ItemCurser", (int *)&pbySrc, &iTop, 0);
      v8 = (NiD3DDefaultShader *)PgWinSpr::CreateWin(0, 0, v7, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&Cursor::ms_spCursorFrame, v8);
      v6 = pkDxSurf;
    }
    v50 = -1;
    if ( v6 )
    {
      v9 = v6;
      if ( !InterlockedDecrement((volatile LONG *)&v6[1]) )
      {
        if ( v9 )
          ((void (__thiscall *)(IDirect3DSurface9 *, signed int))v9->lpVtbl->QueryInterface)(v9, 1);
      }
    }
    v3 = Cursor::ms_spCursorFrame.m_pObject;
    if ( Cursor::ms_spCursorFrame.m_pObject )
LABEL_68:
      ((void (__thiscall *)(IconSlotWin *, NiD3DDefaultShader *, _DWORD))v2->vfptr[29].__vecDelDtor)(v2, v3, 0);
    v10 = (NiObjectNET *)operator new(0x24u);
    v11 = v10;
    iTop = (int)v10;
    v50 = 1;
    if ( v10 )
    {
      NiObjectNET::NiObjectNET(v10);
      v11->vfptr = (NiRefObjectVtbl *)&NiZBufferProperty::`vftable';
      LOWORD(v11[1].vfptr) = 3;
      v11[1].m_uiRefCount = 3;
      v12 = v11;
    }
    else
    {
      v12 = 0;
    }
    LOWORD(v12[1].vfptr) &= 0xFFFCu;
    v50 = -1;
    NiAVObject::AttachProperty((NiAVObject *)&v2->vfptr, (NiProperty *)v12);
    v13 = (NiMaterialProperty *)operator new(0x60u);
    iTop = (int)v13;
    v50 = 2;
    if ( v13 )
      NiMaterialProperty::NiMaterialProperty(v13);
    else
      v14 = 0;
    *(float *)(v14 + 68) = NiColor::WHITE.r;
    *(float *)(v14 + 72) = NiColor::WHITE.g;
    v15 = NiColor::WHITE.b;
    ++*(_DWORD *)(v14 + 88);
    *(float *)(v14 + 76) = v15;
    v16 = *(_DWORD *)(v14 + 88);
    *(float *)(v14 + 32) = NiColor::WHITE.r;
    *(float *)(v14 + 36) = NiColor::WHITE.g;
    v17 = NiColor::WHITE.b;
    *(_DWORD *)(v14 + 88) = ++v16;
    *(float *)(v14 + 40) = v17;
    *(float *)(v14 + 44) = NiColor::WHITE.r;
    *(float *)(v14 + 48) = NiColor::WHITE.g;
    v18 = NiColor::WHITE.b;
    *(float *)(v14 + 84) = 1.0;
    *(_DWORD *)(v14 + 88) = v16 + 2;
    v50 = -1;
    *(float *)(v14 + 52) = v18;
    NiAVObject::AttachProperty((NiAVObject *)&v2->vfptr, (NiProperty *)v14);
    v19 = (NiObjectNET *)operator new(0x28u);
    v20 = v19;
    iTop = (int)v19;
    v50 = 3;
    if ( v19 )
    {
      NiObjectNET::NiObjectNET(v19);
      v20->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
      LOWORD(v20[1].vfptr) = 0;
      v20[1].m_uiRefCount = 0;
      v20[1].m_pcName = (char *)1;
    }
    else
    {
      v20 = 0;
    }
    v50 = -1;
    v20[1].m_uiRefCount = 0;
    v20[1].m_pcName = 0;
    NiAVObject::AttachProperty((NiAVObject *)&v2->vfptr, (NiProperty *)v20);
    NiAVObject::Update((NiAVObject *)&v2->vfptr, 0.0, 1);
    NiAVObject::UpdateProperties((NiAVObject *)&v2->vfptr);
    NiAVObject::UpdateEffects((NiAVObject *)&v2->vfptr);
    if ( !Cursor::ms_spCursorRenderCamera.m_pObject )
    {
      v21 = (NiCamera *)operator new(0x128u);
      iTop = (int)v21;
      v50 = 4;
      if ( v21 )
        NiCamera::NiCamera(v21);
      else
        v22 = 0;
      v50 = -1;
      NiPointer<PopupMenuWin>::operator=(&Cursor::ms_spCursorRenderCamera, v22);
      v23 = Cursor::ms_spCursorRenderCamera.m_pObject;
      kWorldUp.x = 0.0;
      kWorldUp.y = 0.0;
      *(float *)&Cursor::ms_spCursorRenderCamera.m_pObject->m_kClippedProjectedLights.vfptr = 0.0;
      kWorldUp.z = -100.0;
      *(float *)&v23->m_kClippedProjectedLights.m_pBase = 0.0;
      *(float *)&v23->m_kClippedProjectedLights.m_uiMaxSize = -100.0;
      NiAVObject::Update((NiAVObject *)Cursor::ms_spCursorRenderCamera.m_pObject, 0.0, 1);
      kWorldUp.x = 0.0;
      kWorldUp.y = -1.0;
      kWorldUp.z = 0.0;
      kWorldPt.x = 0.0;
      kWorldPt.y = 0.0;
      kWorldPt.z = 100.0;
      NiCamera::LookAtWorldPoint((NiCamera *)Cursor::ms_spCursorRenderCamera.m_pObject, &kWorldPt, &kWorldUp);
      qmemcpy(&frust, &Cursor::ms_spCursorRenderCamera.m_pObject->m_uiRemainingStages, sizeof(frust));
      frust.m_fFar = 10000.0;
      frust.m_fNear = 0.0099999998;
      frust.m_fLeft = -15.5;
      frust.m_fTop = 15.5;
      frust.m_fRight = 16.5;
      frust.m_fBottom = -16.5;
      frust.m_bOrtho = 1;
      NiCamera::SetViewFrustum((NiCamera *)Cursor::ms_spCursorRenderCamera.m_pObject, &frust);
      NiAVObject::Update((NiAVObject *)Cursor::ms_spCursorRenderCamera.m_pObject, 0.0, 1);
    }
    Studio::SetCamera(Cursor::ms_pkStudio, (NiCamera *)Cursor::ms_spCursorRenderCamera.m_pObject);
    Studio::SetSubject((Ni2DBuffer *)Cursor::ms_pkStudio, (Ni2DBuffer::RendererData *)v2);
    v24 = Cursor::ms_pkStudio;
    v44 = 0.0;
    kWorldUp.x = 0.0;
    kWorldUp.y = 0.0;
    Cursor::ms_pkStudio->m_bgColor.r = 0.0;
    v25 = kWorldUp.y;
    kWorldUp.z = 1.0;
    v24->m_bgColor.g = 0.0;
    v26 = kWorldUp.z;
    v24->m_bgColor.b = v25;
    v24->m_bgColor.a = v26;
    Studio::ClickAndStuff(Cursor::ms_pkStudio, 0.0);
    NiPointer<PopupMenuWin>::operator=(
      &Cursor::ms_spDropIconTexture,
      (NiD3DDefaultShader *)Cursor::ms_pkStudio->m_spRenderedTexture.m_pObject);
    v27 = Cursor::ms_pkStudio;
    v28 = Cursor::ms_pkStudio->m_spSubject.m_pObject;
    if ( v28 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v28->m_uiRefCount) && v28 )
        v28->vfptr->__vecDelDtor((NiRefObject *)v28, 1u);
      v27->m_spSubject.m_pObject = 0;
    }
    Cursor::m_pkSlotWin = (PgWin *)v2;
    v29 = NiRenderer::ms_pkRenderer[1].vfptr;
    iTop = (int)NiRenderer::ms_pkRenderer[1].vfptr;
    v30 = PgUtil::GetDxTextureFrom((NiTexture *)Cursor::ms_spDropIconTexture.m_pObject);
    if ( v30 )
    {
      (*(void (__stdcall **)(DIRECT3DTEXTURE9 *, _DWORD, IDirect3DSurface9 **))(*(_DWORD *)v30 + 72))(v30, 0, &pkDxSurf);
      v31 = pkDxSurf;
      if ( pkDxSurf )
      {
        if ( !Cursor::ms_pkDropIconSurfaceTemp )
        {
          ((void (__stdcall *)(IDirect3DSurface9 *, int *))pkDxSurf->lpVtbl[4].QueryInterface)(pkDxSurf, &v48);
          v32 = (*((int (__stdcall **)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v29->__vecDelDtor + 36))(
                  v29,
                  32,
                  32,
                  v48,
                  2,
                  &Cursor::ms_pkDropIconSurfaceTemp,
                  0) < 0;
          v31 = pkDxSurf;
          if ( v32 )
          {
            pkDxSurf->lpVtbl->Release((IUnknown *)pkDxSurf);
            return;
          }
        }
        (*((void (__stdcall **)(_DWORD, _DWORD, _DWORD))v29->__vecDelDtor + 32))(
          v29,
          v31,
          Cursor::ms_pkDropIconSurfaceTemp);
        pkDxSurf->lpVtbl->Release((IUnknown *)pkDxSurf);
        ((void (__stdcall *)(struct IDirect3DSurface9 *, float *, _DWORD, _DWORD))Cursor::ms_pkDropIconSurfaceTemp->lpVtbl[4].AddRef)(
          Cursor::ms_pkDropIconSurfaceTemp,
          &kWorldUp.y,
          0,
          0);
        v33 = kWorldUp.z;
        v34 = Cursor::ms_pkDropIconSurface->lpVtbl[4].AddRef;
        pbySrc = (char *)LODWORD(kWorldUp.z);
        ((void (__stdcall *)(IDirect3DSurface9 *, float *, _DWORD, _DWORD))v34)(
          Cursor::ms_pkDropIconSurface,
          &kWorldPt.y,
          0,
          0);
        v35 = kWorldPt.z;
        pbyDest = (char *)LODWORD(kWorldPt.z);
        v43.m_pObject = (HazeAccumulator *)32;
        while ( 1 )
        {
          v36 = LODWORD(v33) + 4;
          v37 = LODWORD(v35) + 1;
          v38 = LODWORD(v33) - LODWORD(v35);
          v39 = 8;
          do
          {
            *(_BYTE *)(v37 - 1) = *(_BYTE *)(v36 - 4);
            *(_BYTE *)v37 = *(_BYTE *)(v38 + v37);
            *(_BYTE *)(v37 + 1) = *(_BYTE *)(v36 - 2);
            *(_BYTE *)(v37 + 2) = -1;
            *(_BYTE *)(v37 + 3) = *(_BYTE *)v36;
            *(_BYTE *)(v37 + 4) = *(_BYTE *)(v36 + 1);
            *(_BYTE *)(v37 + 5) = *(_BYTE *)(v36 + 2);
            *(_BYTE *)(v37 + 6) = -1;
            *(_BYTE *)(v37 + 7) = *(_BYTE *)(v36 + 4);
            *(_BYTE *)(v37 + 8) = *(_BYTE *)(v36 + 5);
            *(_BYTE *)(v37 + 9) = *(_BYTE *)(v36 + 6);
            *(_BYTE *)(v37 + 10) = -1;
            *(_BYTE *)(v37 + 11) = *(_BYTE *)(v36 + 8);
            *(_BYTE *)(v37 + 12) = *(_BYTE *)(v36 + 9);
            *(_BYTE *)(v37 + 13) = *(_BYTE *)(v36 + 10);
            *(_BYTE *)(v37 + 14) = -1;
            v36 += 16;
            v37 += 16;
            --v39;
          }
          while ( v39 );
          pbyDest += LODWORD(kWorldPt.y);
          pbySrc += LODWORD(kWorldUp.y);
          if ( !--v43.m_pObject )
            break;
          v33 = *(float *)&pbySrc;
          v35 = *(float *)&pbyDest;
        }
        Cursor::ms_pkDropIconSurfaceTemp->lpVtbl[4].Release((IUnknown *)Cursor::ms_pkDropIconSurfaceTemp);
        Cursor::ms_pkDropIconSurface->lpVtbl[4].Release((IUnknown *)Cursor::ms_pkDropIconSurface);
        if ( Cursor::ms_bEnableHardware )
        {
          if ( (*(int (__stdcall **)(int, _DWORD, _DWORD, IDirect3DSurface9 *))(*(_DWORD *)iTop + 40))(
                 iTop,
                 0,
                 0,
                 Cursor::ms_pkDropIconSurface) < 0 )
            return;
        }
        else if ( Cursor::ms_spGraphicCursor )
        {
          PgCursor::SetDxSurfaceCursor(Cursor::ms_pkDropIconSurface);
        }
      }
    }
  }
  Cursor::ms_bDropContentsExist = 1;
  Cursor::ms_bInvalidateDropIcon = 0;
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);
// 97BD2C: using guessed type int (__thiscall *NiZBufferProperty::`vftable')(void *p, char);
// A6B375: using guessed type bool Cursor::ms_bEnableHardware;
// A6B378: using guessed type enum Cursor::Type Cursor::ms_eType;
// A7D11C: using guessed type const struct NiColor NiColor::WHITE;
// A8975C: using guessed type bool Folder::m_bInit;
// A8BAC9: using guessed type bool Cursor::ms_bDropContentsExist;
// A8BACA: using guessed type bool Cursor::ms_bInvalidateDropIcon;
// A8BAD4: using guessed type struct IDirect3DSurface9 *Cursor::ms_pkDropIconSurfaceTemp;
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (0045AAC0) --------------------------------------------------------
char __cdecl Cursor::Init()
{
  char result; // al@2
  NiRefObjectVtbl *v1; // eax@15

  if ( Cursor::CreateSystemCursor()
    && Cursor::CreateHWCurRes()
    && (Cursor::ms_pkDropIconSurface
     || (*((int (__stdcall **)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))NiRenderer::ms_pkRenderer[1].vfptr->__vecDelDtor
         + 36))(
          NiRenderer::ms_pkRenderer[1].vfptr,
          32,
          32,
          21,
          3,
          &Cursor::ms_pkDropIconSurface,
          0) >= 0)
    && Cursor::InitGraphicCursor() )
  {
    Cursor::ms_bDeviceSupportHWCursor = Cursor::IsHWCursorSupport();
    Cursor::EnableHardware(Cursor::ms_bDeviceSupportHWCursor);
    if ( !Cursor::ms_bDropContentsExist )
    {
      if ( Cursor::ms_bEnableHardware )
      {
        if ( Cursor::ms_eType )
        {
          Cursor::ms_eType = 0;
          Cursor::ResetHardwareCursor(0);
        }
      }
      else if ( Cursor::ms_eType )
      {
        Cursor::ms_eType = 0;
        PgCursor::SetType(Cursor::ms_spGraphicCursor, 0);
      }
    }
    Cursor::ms_bShow = 1;
    if ( Cursor::ms_bEnableHardware )
    {
      if ( NiRenderer::ms_pkRenderer )
      {
        v1 = NiRenderer::ms_pkRenderer[1].vfptr;
        if ( v1 )
          (*((void (__stdcall **)(_DWORD, _DWORD))v1->__vecDelDtor + 12))(v1, 1);
      }
    }
    else if ( Cursor::ms_spGraphicCursor )
    {
      ((void (__stdcall *)(_DWORD))Cursor::ms_spGraphicCursor->vfptr[3].__vecDelDtor)(1);
    }
    Cursor::ShowCursor(1);
    Cursor::ms_pkStudio = Studio::Create(NiRenderer::ms_pkRenderer, 5u);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A6B374: using guessed type bool Cursor::ms_bShow;
// A6B375: using guessed type bool Cursor::ms_bEnableHardware;
// A6B378: using guessed type enum Cursor::Type Cursor::ms_eType;
// A8BAC8: using guessed type bool Cursor::ms_bDeviceSupportHWCursor;
// A8BAC9: using guessed type bool Cursor::ms_bDropContentsExist;

//----- (0045ABE0) --------------------------------------------------------
void __thiscall NiAlphaProperty::SetBit(NiAlphaProperty *this, bool bVal, unsigned __int16 uMask)
{
  if ( bVal )
    this->m_uFlags |= uMask;
  else
    this->m_uFlags &= ~uMask;
}

//----- (0045AC10) --------------------------------------------------------
void __thiscall NiZBufferProperty::NiZBufferProperty(NiZBufferProperty *this)
{
  NiZBufferProperty *v1; // esi@1

  v1 = this;
  NiObjectNET::NiObjectNET((NiObjectNET *)&this->vfptr);
  v1->m_uFlags = 3;
  v1->m_eTest = 3;
  v1->vfptr = (NiRefObjectVtbl *)&NiZBufferProperty::`vftable';
}
// 97BD2C: using guessed type int (__thiscall *NiZBufferProperty::`vftable')(void *p, char);

//----- (0045AC30) --------------------------------------------------------
NiRTTI *NiZBufferProperty::GetRTTI()
{
  return &NiZBufferProperty::m_RTTI;
}

//----- (0045AC40) --------------------------------------------------------
void __thiscall CursorState::SetState(CursorState *this, CursorState::CURSORSTATE eState)
{
  this->m_eState = eState;
}

//----- (0045AC50) --------------------------------------------------------
void CursorState::CancelPutOnBelongClear()
{
  PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
}

//----- (0045AC80) --------------------------------------------------------
void __thiscall CursorState::~CursorState(CursorState *this)
{
  this->vfptr = (Singleton<CursorState>Vtbl *)&Singleton<CursorState>::`vftable';
  if ( Singleton<CursorState>::m_pInstance )
  {
    (**(void (__stdcall ***)(_DWORD))Singleton<CursorState>::m_pInstance)(1);
    Singleton<CursorState>::m_pInstance = 0;
  }
  Singleton<CursorState>::m_bDestroy = 1;
}
// 97BD74: using guessed type int (__thiscall *Singleton<CursorState>::`vftable')(void *p, char);
// A8BAE8: using guessed type int Singleton<CursorState>::m_pInstance;
// A8BAEC: using guessed type char Singleton<CursorState>::m_bDestroy;

//----- (0045ACB0) --------------------------------------------------------
void __thiscall CursorState::CancelState(CursorState *this, CursorState::CURSORSTATE e)
{
  CursorState *v2; // esi@1

  v2 = this;
  if ( e == 1 )
    PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  v2->m_eState = 0;
}

//----- (0045ACE0) --------------------------------------------------------
CursorState *__thiscall Singleton<CursorState>::`scalar deleting destructor'(CursorState *this, unsigned int a2)
{
  CursorState *v2; // esi@1

  v2 = this;
  this->vfptr = (Singleton<CursorState>Vtbl *)&Singleton<CursorState>::`vftable';
  if ( Singleton<CursorState>::m_pInstance )
  {
    (**(void (__stdcall ***)(_DWORD))Singleton<CursorState>::m_pInstance)(1);
    Singleton<CursorState>::m_pInstance = 0;
  }
  Singleton<CursorState>::m_bDestroy = 1;
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97BD74: using guessed type int (__thiscall *Singleton<CursorState>::`vftable')(void *p, char);
// A8BAE8: using guessed type int Singleton<CursorState>::m_pInstance;
// A8BAEC: using guessed type char Singleton<CursorState>::m_bDestroy;

//----- (0045AD30) --------------------------------------------------------
void GlobalTokens::GlobalTokens()
{
  ;
}

//----- (0045AD50) --------------------------------------------------------
void _loclog(char *acMsg, ...)
{
  _iobuf *v1; // eax@2
  _iobuf *v2; // esi@2
  va_list va; // [sp+Ch] [bp+Ch]@1

  va_start(va, acMsg);
  if ( g_acLogFilePath[0] )
  {
    vsprintf(acTempStr, acMsg, va);
    v1 = fopen(g_acLogFilePath, "a");
    v2 = v1;
    if ( v1 )
    {
      fprintf(v1, acTempStr);
      fclose(v2);
    }
  }
}

//----- (0045ADA0) --------------------------------------------------------
char __cdecl _loclog_init(char *acDirName, char *acLogFileName, char *acDescriptor)
{
  int v3; // eax@1
  unsigned int v4; // eax@1
  char *v5; // edi@1
  char v6; // cl@2
  tm *v7; // eax@3
  tm *v8; // esi@3
  _iobuf *v9; // eax@5
  char result; // al@6
  __int64 ltime; // [sp+4h] [bp-25Ch]@3
  char *v12; // [sp+Ch] [bp-254h]@1
  char *v13; // [sp+10h] [bp-250h]@1
  char acTempStr[260]; // [sp+14h] [bp-24Ch]@1
  char acLogDir[260]; // [sp+118h] [bp-148h]@1
  char acDateTime[32]; // [sp+21Ch] [bp-44h]@3
  char acTime[16]; // [sp+23Ch] [bp-24h]@6
  char acDate[16]; // [sp+24Ch] [bp-14h]@6

  v12 = acLogFileName;
  v13 = acDescriptor;
  GetModuleFileNameA(0, acLogDir, 0x104u);
  strrchr(acLogDir, 92);
  *(_BYTE *)(v3 + 1) = 0;
  sprintf(acTempStr, "%s", acDirName);
  v4 = strlen(acTempStr) + 1;
  v5 = &acTempStr[259];
  do
    v6 = (v5++)[1];
  while ( v6 );
  qmemcpy(v5, acTempStr, v4);
  _mkdir(acLogDir);
  acDateTime[0] = 0;
  _time64(&ltime);
  v7 = _localtime64(&ltime);
  v8 = v7;
  if ( v7 )
    strftime(acDateTime, 0x1Fu, "%m_%d-%H_%M", v7);
  sprintf(g_acLogFilePath, "%s\\%s", acLogDir, v12);
  v9 = fopen(g_acLogFilePath, "wt");
  if ( v9 )
  {
    fclose(v9);
    _loclog("=============================Starting Log==============================\n");
    strftime(acDate, 0xFu, "%Y/%m/%d", v8);
    strftime(acTime, 0xFu, "%I:%M:%S %p", v8);
    _loclog("Descriptor: %s\n", v13);
    _loclog("Date: %s\n", acDate);
    _loclog("Time: %s\n", acTime);
    _loclog("=======================================================================\n");
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0045AF50) --------------------------------------------------------
int __cdecl _purecall()
{
  return 0;
}

//----- (0045AF60) --------------------------------------------------------
MainApp *__cdecl MainApp::GetMainAppInstance()
{
  return MainApp::ms_pkMainApp;
}
// A8C124: using guessed type struct MainApp *MainApp::ms_pkMainApp;

//----- (0045AF70) --------------------------------------------------------
int __stdcall EnumMyWndProc(HWND__ *hWnd, int lParam)
{
  unsigned int dwProcessID; // [sp+4h] [bp-10h]@1
  char szName[7]; // [sp+8h] [bp-Ch]@2

  GetWindowThreadProcessId(hWnd, &dwProcessID);
  if ( g_ProcessID == dwProcessID )
  {
    GetWindowTextA(hWnd, szName, 7);
    if ( !strncmp("³Ý¸¶ºí", szName, 6u) )
      ShowWindow(hWnd, 6);
  }
  return 1;
}
// A8C128: using guessed type unsigned __int32 g_ProcessID;

//----- (0045AFE0) --------------------------------------------------------
int __cdecl MinimizeProcess()
{
  HANDLE v0; // esi@1
  HANDLE v1; // esi@4
  unsigned int dwExitCode; // [sp+4h] [bp-134h]@5
  void *hSnapshot; // [sp+8h] [bp-130h]@1
  tagPROCESSENTRY32 pe32; // [sp+Ch] [bp-12Ch]@2

  v0 = CreateToolhelp32Snapshot(2u, 0);
  hSnapshot = v0;
  if ( v0 != (HANDLE)-1 )
  {
    pe32.dwSize = 296;
    if ( Process32First(v0, &pe32) )
    {
      do
      {
        _strupr(pe32.szExeFile);
        if ( !strcmp(pe32.szExeFile, "IEXPLORE.EXE") )
        {
          v1 = OpenProcess(0x1FFFFFu, 0, pe32.th32ProcessID);
          if ( v1 )
          {
            GetExitCodeProcess(v1, &dwExitCode);
            g_ProcessID = pe32.th32ProcessID;
            EnumWindows(EnumMyWndProc, 0);
            CloseHandle(v1);
          }
          v0 = hSnapshot;
        }
      }
      while ( Process32Next(v0, &pe32) );
    }
    CloseHandle(v0);
  }
  return 0;
}
// A8C128: using guessed type unsigned __int32 g_ProcessID;

//----- (0045B100) --------------------------------------------------------
void __thiscall MainApp::Terminate(MainApp *this)
{
  MainApp *v1; // esi@1
  DShowMovie *v2; // ecx@1

  v1 = this;
  CPostProcessEffectManager::Destroy();
  TextEffMgr::Terminate(&g_kTextEffMgr);
  ScreenBDMgr::Terminate(&g_kScrnBDMgr);
  EffectMgr::Terminate(&g_kEffectMgr);
  Engine3D::Terminate();
  World::Terminate(&g_kWorld);
  MenuTexMgr::Terminate();
  DropItemMgr::Terminate(&g_kDropItemMgr);
  MapObjMgr::Terminate(&g_kMapObjMgr);
  CharResMgr::Terminate(&g_kCharResMgr);
  CharMgr::Terminate(&g_kCharMgr);
  NetMgr::Terminate(&g_kNetMgr);
  MainApp::TerminateInput(v1);
  PgTerminateInstance();
  MainApp::TerminateGameData();
  MachineOpt::Save();
  MaskShader::Terminate();
  NiApplication::Terminate((NiApplication *)&v1->vfptr);
  SoundMgr::Terminate(&g_kSoundMgr);
  v2 = v1->m_pkNetMarbleLogo;
  if ( v2 )
  {
    ((void (__cdecl *)(_DWORD))v2->vfptr->__vecDelDtor)(1);
    v1->m_pkNetMarbleLogo = 0;
  }
  if ( MainApp::st_pbyDummyMemory )
  {
    operator delete[](MainApp::st_pbyDummyMemory);
    MainApp::st_pbyDummyMemory = 0;
  }
  Font::Termiante();
}

//----- (0045B1E0) --------------------------------------------------------
bool __thiscall MainApp::MeasureTime(MainApp *this)
{
  MainApp *v1; // esi@1
  float v2; // ST04_4@3
  bool v3; // zf@3
  double v4; // st7@3
  float v5; // ST04_4@3
  double v6; // st6@3
  double v7; // st5@4
  bool result; // al@5
  float v9; // ST04_4@8
  float fDeltaTime; // [sp+4h] [bp-4h]@9

  v1 = this;
  if ( -1.0 == this->m_fLastTime )
  {
    this->m_fLastTime = NiGetCurrentTimeInSec();
    v1->m_iClicks = 0;
    v1->m_fAccumTime = 0.0;
  }
  v2 = NiGetCurrentTimeInSec();
  v3 = v1->m_bNVPerfHUD == 0;
  v4 = v2;
  v1->m_fCurrentTime = v2;
  v5 = v2 - v1->m_fLastTime;
  v6 = v5;
  if ( v3 )
  {
    v7 = 0.0;
  }
  else
  {
    v7 = 0.0;
    if ( 0.0 == v6 )
      return 1;
  }
  if ( v7 > v6 )
  {
    v9 = v7;
    v6 = v9;
  }
  v1->m_fLastTime = v4;
  fDeltaTime = v6 + v1->m_fAccumTime;
  v1->m_fAccumTime = fDeltaTime;
  if ( v1->m_fMinFramePeriod + v1->m_fLastFrame <= fDeltaTime )
  {
    result = 1;
    v1->m_fFrameTime = fDeltaTime - v1->m_fLastFrame;
    v1->m_fLastFrame = v1->m_fAccumTime;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0045B2B0) --------------------------------------------------------
void __thiscall MainApp::EnableInput(MainApp *this, bool bEnable)
{
  this->m_bEnableInput = bEnable;
}

//----- (0045B2C0) --------------------------------------------------------
void __thiscall MainApp::ProcessInput(MainApp *this)
{
  MainApp *v1; // esi@1
  tagPOINT kPoint; // [sp+4h] [bp-8h]@1

  v1 = this;
  GetCursorPos(&kPoint);
  if ( !v1->m_bFullscreen )
    ScreenToClient(v1->m_pkAppWindow->m_pRenderWnd, &kPoint);
  Cursor::UpdateGraphicCursorPos(kPoint.x, kPoint.y);
}

//----- (0045B300) --------------------------------------------------------
void __cdecl LoadSoundOption()
{
  MachineOpt::SoundOption *v0; // eax@1
  int v1; // edx@1
  unsigned int v2; // esi@1
  unsigned int v3; // edi@1
  unsigned int v4; // ebx@1
  int kOpt; // ST10_4@1
  float v6; // ST28_4@2
  float v7; // ST28_4@2
  float v8; // ST28_4@2
  float v9; // ST28_4@2

  v0 = MachineOpt::GetSoundOption();
  v1 = *(_DWORD *)&v0->kVersion.hour;
  v2 = v0->uiBgVolume;
  v3 = v0->uiEffectVolume;
  v4 = v0->uiEnvEffectVolume;
  kOpt = *(_DWORD *)&v0->kVersion.year;
  if ( g_kSoundMgr.m_pkBGMGroup )
  {
    v6 = (double)v0->uiMasterVolume / 50.0;
    SoundMgr::SetMasterVolume(v6);
    v7 = (double)v2 / 50.0;
    SoundMgr::SetBgVolume(&g_kSoundMgr, v7);
    v8 = (double)v3 / 50.0;
    SoundMgr::SetEffectVolume(&g_kSoundMgr, v8);
    v9 = (double)v4 / 50.0;
    SoundMgr::SetEnvEffectVolume(&g_kSoundMgr, v9);
  }
}

//----- (0045B3F0) --------------------------------------------------------
void __cdecl LogZBufferState(PgWin *pkWin)
{
  PgWin *i; // esi@1
  NiRTTI *v2; // eax@2
  unsigned int uiPos; // [sp+8h] [bp-4h]@1

  uiPos = 0;
  for ( i = PgWin::GetNextChildWin(pkWin, &uiPos); i; i = PgWin::GetNextChildWin(pkWin, &uiPos) )
  {
    v2 = (NiRTTI *)((int (__thiscall *)(_DWORD))i->vfptr[1].__vecDelDtor)(i);
    if ( v2 )
    {
      while ( v2 != &PgWinText::m_RTTI )
      {
        v2 = v2->m_pkBaseRTTI;
        if ( !v2 )
          goto LABEL_7;
      }
      NiAVObject::GetProperty((NiAVObject *)&i->vfptr, 11);
      NiAVObject::GetProperty((NiAVObject *)&i->vfptr, 0);
    }
LABEL_7:
    LogZBufferState(i);
  }
}

//----- (0045B470) --------------------------------------------------------
void __thiscall MainApp::DisplaySplash(MainApp *this, const char *pcName, const char *pcProgressBarName, int LoadingRate)
{
  NiScreenElements *v4; // esi@1
  int v5; // ebx@1
  NiScreenElementsData *v6; // eax@2
  NiScreenElementsData *v7; // eax@3
  int v8; // eax@5
  NiScreenElements *v9; // esi@6
  NiScreenElementsData *v10; // eax@7
  NiScreenElementsData *v11; // eax@8
  int v12; // eax@8
  int v13; // esi@8
  int v14; // eax@9
  NiScreenElementsData *v15; // ecx@11
  double v16; // ST34_8@11
  NiScreenElementsData *v17; // ecx@11
  NiTexturingProperty *v18; // eax@11
  NiTexturingProperty *v19; // eax@12
  NiTexturingProperty *v20; // edi@12
  NiTexturingProperty *v21; // eax@14
  int v22; // eax@15
  int v23; // edi@22
  NiObjectNET *v24; // eax@27
  int v25; // edi@27
  NiObjectNET *v26; // eax@34
  int v27; // edi@34
  NiRenderer *v28; // ecx@41
  bool v29; // zf@41
  int v30; // ecx@45
  NiRenderTargetGroup *v31; // eax@48
  NiRenderer *v32; // ecx@49
  NiRenderer *v33; // ecx@53
  NiRenderer *v34; // edi@57
  MainApp *v35; // [sp+3Ch] [bp-10h]@1

  v35 = this;
  v4 = (NiScreenElements *)operator new(0xC4u);
  v5 = 0;
  if ( v4 )
  {
    v6 = (NiScreenElementsData *)operator new(0x70u);
    if ( v6 )
      NiScreenElementsData::NiScreenElementsData(v6, 0, 1, 1u, 1, 1, 4, 1, 2, 1);
    else
      v7 = 0;
    NiScreenElements::NiScreenElements(v4, v7);
    v5 = v8;
  }
  v9 = (NiScreenElements *)operator new(0xC4u);
  if ( v9 )
  {
    v10 = (NiScreenElementsData *)operator new(0x70u);
    if ( v10 )
    {
      NiScreenElementsData::NiScreenElementsData(v10, 0, 1, 1u, 1, 1, 4, 1, 2, 1);
      NiScreenElements::NiScreenElements(v9, v11);
      v13 = v12;
    }
    else
    {
      NiScreenElements::NiScreenElements(v9, 0);
      v13 = v14;
    }
  }
  else
  {
    v13 = 0;
  }
  NiScreenElementsData::Insert(*(NiScreenElementsData **)(v5 + 184), 4u, 0, 0);
  NiScreenElementsData::Insert(*(NiScreenElementsData **)(v13 + 184), 4u, 0, 0);
  NiScreenElementsData::SetRectangle(*(NiScreenElementsData **)(v5 + 184), 0, 0.0, 0.0, 1.0, 1.0);
  v15 = *(NiScreenElementsData **)(v13 + 184);
  v16 = (double)LoadingRate / 100.0;
  *(float *)&LoadingRate = v16 * 0.5;
  NiScreenElementsData::SetRectangle(v15, 0, 0.27734751, 0.75520003, *(float *)&LoadingRate, 0.015);
  NiScreenElementsData::UpdateBound(*(NiScreenElementsData **)(v5 + 184));
  NiScreenElementsData::UpdateBound(*(NiScreenElementsData **)(v13 + 184));
  NiScreenElementsData::SetColors(*(NiScreenElementsData **)(v5 + 184), 0, &NiColorA::WHITE);
  NiScreenElementsData::SetColors(*(NiScreenElementsData **)(v13 + 184), 0, &NiColorA::WHITE);
  NiScreenElementsData::SetTextures(*(NiScreenElementsData **)(v5 + 184), 0, 0, 0.0, 0.0, 1.0, 1.0);
  v17 = *(NiScreenElementsData **)(v13 + 184);
  *(float *)&LoadingRate = v16;
  NiScreenElementsData::SetTextures(v17, 0, 0, 0.0, 0.0, *(float *)&LoadingRate, 1.0);
  v18 = (NiTexturingProperty *)operator new(0x44u);
  LoadingRate = (int)v18;
  if ( v18 )
  {
    NiTexturingProperty::NiTexturingProperty(v18, pcName);
    v20 = v19;
  }
  else
  {
    v20 = 0;
  }
  NiTexturingProperty::SetBaseClampMode(v20, 0);
  v21 = (NiTexturingProperty *)operator new(0x44u);
  LoadingRate = (int)v21;
  if ( v21 )
  {
    NiTexturingProperty::NiTexturingProperty(v21, pcProgressBarName);
    LoadingRate = v22;
  }
  else
  {
    *(float *)&LoadingRate = 0.0;
  }
  NiTexturingProperty::SetBaseClampMode((NiTexturingProperty *)LoadingRate, 0);
  pcName = (const char *)v20;
  if ( v20 )
    InterlockedIncrement((volatile LONG *)&v20->m_uiRefCount);
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(v5 + 156),
    (NiPointer<NiRoom> *)&pcName);
  if ( v20 && !InterlockedDecrement((volatile LONG *)&v20->m_uiRefCount) )
    v20->vfptr->__vecDelDtor((NiRefObject *)v20, 1u);
  v23 = LoadingRate;
  if ( *(float *)&LoadingRate != 0.0 )
    InterlockedIncrement((volatile LONG *)(LoadingRate + 4));
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(v13 + 156),
    (NiPointer<NiRoom> *)&LoadingRate);
  if ( v23 && !InterlockedDecrement((volatile LONG *)(v23 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v23)(v23, 1);
  v24 = (NiObjectNET *)operator new(0x28u);
  v25 = (int)v24;
  LoadingRate = (int)v24;
  if ( v24 )
  {
    NiObjectNET::NiObjectNET(v24);
    *(_DWORD *)v25 = &NiVertexColorProperty::`vftable';
    *(_WORD *)(v25 + 28) = 0;
    *(_DWORD *)(v25 + 32) = 0;
    *(_DWORD *)(v25 + 36) = 1;
  }
  else
  {
    v25 = 0;
  }
  *(_DWORD *)(v25 + 32) = 1;
  *(_DWORD *)(v25 + 36) = 0;
  LoadingRate = v25;
  InterlockedIncrement((volatile LONG *)(v25 + 4));
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(v5 + 156),
    (NiPointer<NiRoom> *)&LoadingRate);
  if ( !InterlockedDecrement((volatile LONG *)(v25 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v25)(v25, 1);
  LoadingRate = v25;
  InterlockedIncrement((volatile LONG *)(v25 + 4));
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(v13 + 156),
    (NiPointer<NiRoom> *)&LoadingRate);
  if ( !InterlockedDecrement((volatile LONG *)(v25 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v25)(v25, 1);
  v26 = (NiObjectNET *)operator new(0x20u);
  v27 = (int)v26;
  LoadingRate = (int)v26;
  if ( v26 )
  {
    NiObjectNET::NiObjectNET(v26);
    *(_DWORD *)v27 = &NiAlphaProperty::`vftable';
    *(_WORD *)(v27 + 28) = 236;
    *(_BYTE *)(v27 + 30) = 0;
  }
  else
  {
    v27 = 0;
  }
  *(_WORD *)(v27 + 28) &= 0xFFFEu;
  LoadingRate = v27;
  InterlockedIncrement((volatile LONG *)(v27 + 4));
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(v5 + 156),
    (NiPointer<NiRoom> *)&LoadingRate);
  if ( !InterlockedDecrement((volatile LONG *)(v27 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v27)(v27, 1);
  LoadingRate = v27;
  InterlockedIncrement((volatile LONG *)(v27 + 4));
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(v13 + 156),
    (NiPointer<NiRoom> *)&LoadingRate);
  if ( !InterlockedDecrement((volatile LONG *)(v27 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v27)(v27, 1);
  NiAVObject::UpdateProperties((NiAVObject *)v5);
  NiAVObject::Update((NiAVObject *)v5, 0.0, 1);
  NiAVObject::UpdateProperties((NiAVObject *)v13);
  NiAVObject::Update((NiAVObject *)v13, 0.0, 1);
  v28 = v35->m_spRenderer.m_pObject;
  v29 = v28->m_eFrameState == 0;
  LoadingRate = (int)v35->m_spRenderer.m_pObject;
  if ( v29
    && v28->m_eOffScreenFrameState == FRAMESTATE_OUTSIDE_FRAME
    && (unsigned __int8)((int (*)(void))v28->vfptr[66].__vecDelDtor)() )
  {
    *(_DWORD *)(LoadingRate + 116) = 1;
  }
  v30 = (int)v35->m_spRenderer.m_pObject;
  LoadingRate = v30;
  if ( (*(_DWORD *)(v30 + 116) == 1 || *(_DWORD *)(v30 + 120) == 1) && !*(_BYTE *)(v30 + 128) )
  {
    v31 = (NiRenderTargetGroup *)(*(int (**)(void))(*(_DWORD *)v30 + 104))();
    NiRenderer::BeginUsingRenderTargetGroup((NiRenderer *)LoadingRate, v31, 7u);
  }
  v32 = v35->m_spRenderer.m_pObject;
  if ( (v32->m_eFrameState == 1 || v32->m_eOffScreenFrameState == 1) && v32->m_bRenderTargetGroupActive == 1 )
    ((void (__stdcall *)(_DWORD))v32->vfptr[71].__vecDelDtor)(0);
  NiScreenElements::Draw((NiScreenElements *)v5, v35->m_spRenderer.m_pObject);
  NiScreenElements::Draw((NiScreenElements *)v13, v35->m_spRenderer.m_pObject);
  NiRenderer::EndUsingRenderTargetGroup(v35->m_spRenderer.m_pObject);
  v33 = v35->m_spRenderer.m_pObject;
  v29 = v33->m_eFrameState == 1;
  LoadingRate = (int)v35->m_spRenderer.m_pObject;
  if ( v29
    && v33->m_eOffScreenFrameState == FRAMESTATE_OUTSIDE_FRAME
    && (unsigned __int8)((int (*)(void))v33->vfptr[67].__vecDelDtor)() )
  {
    *(_DWORD *)(LoadingRate + 116) = 2;
  }
  v34 = v35->m_spRenderer.m_pObject;
  if ( v34->m_eFrameState == 2
    && v34->m_eOffScreenFrameState == FRAMESTATE_OUTSIDE_FRAME
    && (unsigned __int8)((int (__thiscall *)(NiRenderer *))v34->vfptr[68].__vecDelDtor)(v34) )
  {
    ++v34->m_uiFrameID;
    v34->m_eFrameState = 0;
  }
  (**(void (__thiscall ***)(_DWORD))v5)(v5);
  (**(void (__cdecl ***)(_DWORD))v13)(1);
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);

//----- (0045BA80) --------------------------------------------------------
void __thiscall MainApp::ChangeDisplayMode(MainApp *this)
{
  MainApp *v1; // esi@1
  int systemScreenWidht; // ST10_4@5
  int v3; // eax@5
  char *v4; // eax@6

  v1 = this;
  if ( GameFrameWork::ms_bSpawnApps == 1 )
  {
    if ( GameFrameWork::ms_bGameFrameStart )
    {
      if ( MachineOpt::ms_kGraphicOption.bWindowFullMode )
      {
        OutputDebugStringA("Window Mode");
        v1->m_pkAppWindow->m_uiWidth = 1024;
        v1->m_pkAppWindow->m_uiHeight = 768;
        MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = 1024;
        MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = 768;
        MachineOpt::ms_kGraphicOption.bWindowFullMode = 0;
        MainApp::ReCreateRenderer(v1);
      }
      else
      {
        OutputDebugStringA("SpawnApps:detachWindow()");
        systemScreenWidht = GetSystemMetrics(0);
        v3 = GetSystemMetrics(1);
        MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = systemScreenWidht;
        MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = v3;
        MachineOpt::ms_kGraphicOption.bWindowFullMode = 1;
        MainApp::ReCreateRenderer(v1);
        OutputDebugStringA("FullScreen Mode");
      }
    }
    else
    {
      v4 = (char *)TextData2::Get(0x170AE918u);
      MsgBox::Modal(MSGBOX_OK, v4);
    }
    CNSTimer_Interval::ReSet(&v1->m_kTimerInterval, Timer::ms_fCurTime);
    v1->m_kTimerInterval.m_fCheckTime = 1.0;
    v1->m_bChangeDisplay = 1;
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8CAFF: using guessed type bool GameFrameWork::ms_bGameFrameStart;
// A8CB04: using guessed type bool GameFrameWork::ms_bSpawnApps;

//----- (0045BB70) --------------------------------------------------------
void __usercall MainApp::OnIdle(MainApp *this@<ecx>, int a2@<ebx>)
{
  MainApp *v2; // esi@1
  AccountFrameWork *v3; // eax@12
  float v4; // ST0C_4@15
  NiFrameRate *v5; // ecx@18
  CClientQuest *v6; // eax@20
  unsigned int v7; // edi@21
  NiRenderer *v8; // edi@23
  NiRenderer *v9; // edi@27

  v2 = this;
  if ( this->m_bChangeDisplay && CNSTimer_Interval::IsRun_GetCount(&this->m_kTimerInterval, Timer::ms_fCurTime) )
    v2->m_bChangeDisplay = 0;
  if ( GetAsyncKeyState(13) & 0x8000 && GetAsyncKeyState(18) & 0x8000 && !v2->m_bChangeDisplay )
    MainApp::ChangeDisplayMode(v2);
  if ( !v2->m_pkNetMarbleLogo )
  {
    if ( GameFrameWork::ms_bWindowSizeChanged )
    {
      GameFrameWork::ms_bWindowSizeChanged = 0;
      MainApp::ReCreateRenderer(v2);
    }
    if ( AccountFrameWork::ms_bWindowSizeChanged )
    {
      AccountFrameWork::ms_bWindowSizeChanged = 0;
      MainApp::ReCreateRenderer(v2);
      v3 = (AccountFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, AccountFrameWorkID);
      if ( v3 )
        AccountFrameWork::ChangeResolution(v3);
    }
    if ( v2->vfptr->MeasureTime((NiApplication *)v2) )
    {
      v4 = v2->m_fCurrentTime;
      Timer::ms_fOldTime = Timer::ms_fCurTime;
      Timer::ms_fCurTime = v4;
      Timer::ms_fDeltaTime = v4 - Timer::ms_fOldTime;
      if ( v2->m_bEnableInput )
        v2->vfptr->UpdateInput((NiApplication *)v2);
      v2->vfptr->ProcessInput((NiApplication *)v2);
      Cursor::Update();
      if ( v2->m_bFrameRateEnabled )
      {
        v5 = v2->m_pkFrameRate;
        if ( v5 )
        {
          NiFrameRate::TakeSample(v5);
          NiFrameRate::Update(v2->m_pkFrameRate, a2);
        }
      }
      NetMgr::Update(&g_kNetMgr, Timer::ms_fCurTime);
      PgFrameMgr::Update(&Pgg_kFrameMgr, Timer::ms_fCurTime);
      v6 = QuestDataMgr::GetQuest();
      v6->vfptr->QuestPlayer_TimeProcess((CQuest *)v6);
      if ( !MainApp::IsSkipDraw(Timer::ms_fCurTime) )
      {
        v7 = NiRenderer::ms_pkRenderer[9].m_kPrecacheCriticalSection.m_uiLockCount;
        if ( v7 != v2->m_dwResetCounter )
        {
          Cursor::OnResetDevice();
          PortraitTextureBuffer::Terminate();
          v2->m_dwResetCounter = v7;
        }
        ((void (__stdcall *)(void *))v2->m_spRenderer.m_pObject->vfptr[20].__vecDelDtor)(&unk_B2503C);
        v8 = v2->m_spRenderer.m_pObject;
        if ( v8->m_eFrameState == FRAMESTATE_OUTSIDE_FRAME
          && v8->m_eOffScreenFrameState == FRAMESTATE_OUTSIDE_FRAME
          && (unsigned __int8)((int (__thiscall *)(NiRenderer *))v8->vfptr[66].__vecDelDtor)(v2->m_spRenderer.m_pObject) )
        {
          v8->m_eFrameState = 1;
        }
        NiRenderer::BeginUsingDefaultRenderTargetGroup(v2->m_spRenderer.m_pObject, 7u);
        PgFrameMgr::Draw(&Pgg_kFrameMgr);
        Cursor::Draw();
        NiRenderer::EndUsingRenderTargetGroup(v2->m_spRenderer.m_pObject);
        v9 = v2->m_spRenderer.m_pObject;
        if ( v9->m_eFrameState == 1
          && v9->m_eOffScreenFrameState == FRAMESTATE_OUTSIDE_FRAME
          && (unsigned __int8)((int (__thiscall *)(NiRenderer *))v9->vfptr[67].__vecDelDtor)(v2->m_spRenderer.m_pObject) )
        {
          v9->m_eFrameState = 2;
        }
        NiRenderer::DisplayFrame(v2->m_spRenderer.m_pObject);
        ++v2->m_iClicks;
      }
      if ( Pgg_kFrameMgr.m_bQuit )
        NiApplication::QuitApplication((NiApplication *)&v2->vfptr);
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8B980: using guessed type float Timer::ms_fDeltaTime;
// A8B984: using guessed type float Timer::ms_fOldTime;
// A8C5C8: using guessed type bool AccountFrameWork::ms_bWindowSizeChanged;
// A8CAFD: using guessed type bool GameFrameWork::ms_bWindowSizeChanged;

//----- (0045BDC0) --------------------------------------------------------
bool MainApp::CheckSpawnApps()
{
  int v1; // ebx@1
  ItemMallInfo *v2; // eax@3
  ItemMallInfo *v3; // eax@4
  ItemMallInfo *v4; // esi@4
  int v5; // eax@7
  tagItemMallFileData *v6; // eax@9
  tagItemMallFileData *v7; // edi@9
  char *v8; // eax@10
  char v9; // cl@11
  char *v10; // eax@14
  char v11; // cl@15
  char *v12; // eax@20
  char v13; // cl@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v14; // eax@22
  int MaxURLNum; // [sp+14h] [bp-11Ch]@7
  ItemMallInfo *v17; // [sp+18h] [bp-118h]@4
  char acPathName[260]; // [sp+1Ch] [bp-114h]@1
  int v19; // [sp+12Ch] [bp-4h]@3

  v1 = 0;
  memset(acPathName, 0, 0x104u);
  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acPathName, "%sFiesta.ini", &Folder::m_acMain);
  GameFrameWork::ms_bSpawnApps = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &GameFrameWork::ms_strLauncher,
    "Original",
    8u);
  v2 = (ItemMallInfo *)operator new(0x2224u);
  v19 = 0;
  if ( v2 )
  {
    ItemMallInfo::ItemMallInfo(v2);
    v4 = v3;
    v17 = v3;
  }
  else
  {
    v17 = 0;
    v4 = 0;
  }
  v19 = -1;
  if ( !v4 )
    return 0;
  ItemMallInfo::LoadFromFile(v4, acPathName);
  v5 = ItemMallInfo::GetTotalURLNum(v4, 0);
  MaxURLNum = v5;
  if ( v5 == -1 || v5 < 0 )
    goto LABEL_25;
  while ( 1 )
  {
    v6 = ItemMallInfo::GetData(v4, 0, v1);
    v7 = v6;
    if ( v6 )
      break;
LABEL_18:
    if ( ++v1 > MaxURLNum )
      goto LABEL_25;
  }
  v8 = v6->Path;
  do
    v9 = *v8++;
  while ( v9 );
  if ( !strncmp(v7->Path, "Original", v8 - &v7->Path[1]) )
  {
    OutputDebugStringA("SpawnApps Off.");
LABEL_17:
    v4 = v17;
    goto LABEL_18;
  }
  v10 = v7->Path;
  do
    v11 = *v10++;
  while ( v11 );
  if ( v10 == &v7->Path[1] )
    goto LABEL_17;
  v12 = v7->Path;
  GameFrameWork::ms_bSpawnApps = 1;
  GameFrameWork::ms_bFirstRun = 1;
  do
    v13 = *v12++;
  while ( v13 );
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &GameFrameWork::ms_strLauncher,
    v7->Path,
    v12 - &v7->Path[1]);
  v14 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)GameFrameWork::ms_strLauncher._Bx._Ptr;
  if ( GameFrameWork::ms_strLauncher._Myres < 0x10 )
    v14 = &GameFrameWork::ms_strLauncher;
  OutputDebugStringA(v14->_Bx._Buf);
  v4 = v17;
  MachineOpt::ms_kGraphicOption.bWindowFullMode = 0;
LABEL_25:
  ItemMallInfo::~ItemMallInfo(v4);
  operator delete(v4);
  return 0;
}
// A8975C: using guessed type bool Folder::m_bInit;
// A8CB04: using guessed type bool GameFrameWork::ms_bSpawnApps;
// A8CB05: using guessed type bool GameFrameWork::ms_bFirstRun;

//----- (0045BFA0) --------------------------------------------------------
void SetupExceptionHandler()
{
  void *v0; // eax@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > AppName; // [sp+8h] [bp-48h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > AppVersion; // [sp+24h] [bp-2Ch]@1
  int v3; // [sp+4Ch] [bp-4h]@1

  AppName._Myres = 15;
  AppName._Mysize = 0;
  AppName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&AppName, off_97BF50, 3u);
  v3 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&AppName, "_Release ", 9u);
  AppVersion._Myres = 15;
  AppVersion._Mysize = 0;
  AppVersion._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&AppVersion, &AppName, 0, 0xFFFFFFFF);
  LOBYTE(v3) = 1;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&AppVersion, "Aug 21 2017", 0xBu);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&AppVersion, " ", 1u);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&AppVersion, "16:34:36", 8u);
  BT_InstallSehFilter();
  BT_SetAppName("FiestaOnline");
  v0 = AppVersion._Bx._Ptr;
  if ( AppVersion._Myres < 0x10 )
    v0 = &AppVersion;
  BT_SetAppVersion(v0);
  BT_SetSupportServer("46.253.154.134", 9010);
  BT_SetFlags(41);
  if ( AppVersion._Myres >= 0x10 )
    operator delete(AppVersion._Bx._Ptr);
  AppVersion._Myres = 15;
  AppVersion._Mysize = 0;
  AppVersion._Bx._Buf[0] = 0;
  if ( AppName._Myres >= 0x10 )
    operator delete(AppName._Bx._Ptr);
}
// 96D000: using guessed type _DWORD __stdcall BT_SetAppName(_DWORD);
// 96D004: using guessed type _DWORD __stdcall BT_SetFlags(_DWORD);
// 96D008: using guessed type _DWORD __stdcall BT_SetSupportServer(_DWORD, _DWORD);
// 96D00C: using guessed type _DWORD __stdcall BT_SetAppVersion(_DWORD);
// 96D010: using guessed type _DWORD __stdcall BT_InstallSehFilter();

//----- (0045C0D0) --------------------------------------------------------
void __thiscall MainApp::MainApp(MainApp *this)
{
  MainApp *v1; // esi@1
  int v2; // eax@3
  unsigned int v3; // edi@3
  unsigned __int8 v4; // ST33_1@3
  int v5; // edi@4
  signed int v6; // eax@5
  bool v7; // zf@5
  NiUnsharedGeometryGroup *v8; // ecx@6
  int v9; // [sp+14h] [bp-209Ch]@3
  CPData kCpData; // [sp+1Ch] [bp-2094h]@1
  int v11; // [sp+20ACh] [bp-4h]@1

  v1 = this;
  NiApplication::NiApplication((NiApplication *)&this->vfptr, "FiestaOnline", 0x400u, 0x300u, 0, 0, 0);
  v11 = 0;
  v1->vfptr = (NiApplicationVtbl *)&MainApp::`vftable';
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kTimerInterval);
  PgImeCtrl::PgImeCtrl(&v1->m_kImeCtrl);
  v1->m_SplashTexName._Myres = 15;
  v1->m_SplashTexName._Mysize = 0;
  v1->m_SplashTexName._Bx._Buf[0] = 0;
  v1->m_ProgressBarTexName._Myres = 15;
  v1->m_ProgressBarTexName._Mysize = 0;
  v1->m_ProgressBarTexName._Bx._Buf[0] = 0;
  LOBYTE(v11) = 3;
  SetupExceptionHandler();
  if ( InitAnalyzeArgument(&kCpData) )
  {
    *(_QWORD *)&g_kServer.m_kLoginAddr.m_kAddr.n4_code[2] = 0i64;
    *(_QWORD *)&g_kServer.m_kLoginAddr.m_kAddr.n4_name[0] = 0i64;
    strncpy(g_kServer.m_kLoginAddr.m_kAddr.n4_name, kCpData.ServIP, 0x10u);
    g_kServer.m_kLoginAddr.m_iPort = kCpData.ServPort;
  }
  v2 = rand() % 100 + 1;
  v3 = (unsigned __int8)v2;
  v4 = v2;
  v9 = (unsigned __int8)v2;
  MainApp::st_pbyDummyMemory = operator new[]((unsigned __int8)v2);
  memset((char *)MainApp::st_pbyDummyMemory, 0, v3);
  if ( v4 > 0u )
  {
    v5 = 0;
    do
    {
      v6 = rand();
      ++v5;
      v7 = v9-- == 1;
      *((char *)MainApp::st_pbyDummyMemory + v5 - 1) = v6 % 255;
    }
    while ( !v7 );
  }
  v1->m_fOldDrawTime = 0.0;
  *(_WORD *)&v1->m_bUseFoption = 0;
  v1->m_bUseWinoption = 0;
  v1->m_bRendererDialog = 0;
  v1->m_bExclusiveMouse = 0;
  v1->m_bEnableInput = 1;
  enable_sperror(1);
  enable_spcritical(1);
  EnumDisplaySettingsA(0, 0xFFFFFFFE, &v1->m_SaveMode);
  MainApp::ProcessCommandLineBeforInit(v1);
  MainApp::SetupWindow(v1);
  ITableBase<TextDataType3,TextData3>::BeforeTerminate(v8);
  v1->m_dwResetCounter = 0;
  v1->m_pkNetMarbleLogo = 0;
  InitWebCtrl();
  v1->m_bChangeDisplay = 0;
}
// 97C35C: using guessed type int (__thiscall *MainApp::`vftable')(void *p, char);

//----- (0045C2C0) --------------------------------------------------------
char __thiscall MainApp::Initialize(MainApp *this)
{
  MainApp *v1; // esi@1
  char *v2; // eax@3
  char *v3; // eax@7
  char *v4; // eax@11
  HANDLE v5; // ebx@13
  HWND v6; // ebx@15
  HICON v7; // eax@15
  char *v8; // eax@16
  const char *v9; // eax@16
  char *v10; // eax@16
  const char *v11; // eax@16
  const char *v12; // ebx@16
  const char *v13; // edi@16
  const char *v14; // ecx@17
  const char *v15; // eax@20
  const char *v16; // ecx@34
  const char *v17; // eax@37
  const char *v18; // ecx@42
  const char *v19; // eax@45
  const char *v20; // ecx@52
  const char *v21; // eax@55
  NiAppWindow *v22; // eax@63
  float fSpeed; // ST08_4@63
  float fScreenWidth; // ST04_4@63
  bool v25; // zf@77
  NiRenderer *v26; // ecx@80
  NiAlphaAccumulator *v27; // eax@80
  NiAccumulator *v28; // eax@81
  NiAccumulator *v29; // edi@81
  NiRenderer *v30; // ecx@85
  NiImageConverter *v31; // esi@85
  NiPNGReader *v32; // eax@86
  float v33; // eax@87
  float v34; // ST08_4@89
  void *(__thiscall *v35)(NiRefObject *, unsigned int); // eax@89
  char *v36; // eax@90
  const char *v37; // ST08_4@90
  CDataDocument *v38; // eax@90
  float v40; // [sp+1Ch] [bp-68h]@80
  __int64 seed; // [sp+20h] [bp-64h]@63
  float v42; // [sp+28h] [bp-5Ch]@80
  tagRECT kRect; // [sp+2Ch] [bp-58h]@77
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > ProgressBarTexName; // [sp+3Ch] [bp-48h]@16
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > SplashTexName; // [sp+58h] [bp-2Ch]@16
  int v46; // [sp+80h] [bp-4h]@16

  v1 = this;
  if ( !Folder::m_bInit )
    Folder::Init();
  v2 = Folder::Merge(&Folder::m_acSystem, "TextData.shn");
  if ( !ITableBase<TextDataType,TextData>::Load(v2) )
  {
    MainApp::InitError("Text Data Initialize Fail!");
    return 0;
  }
  if ( !Folder::m_bInit )
    Folder::Init();
  v3 = Folder::Merge(&Folder::m_acSystem, "TextData2.shn");
  if ( !ITableBase<TextDataType2,TextData2>::Load(v3) )
  {
    MainApp::InitError("Text Data2 Initialize Fail!");
    return 0;
  }
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acSystem, "TextData3.shn");
  if ( !ITableBase<TextDataType3,TextData3>::Load(v4) )
  {
    MainApp::InitError("Text Data3 Initialize Fail!");
    return 0;
  }
  v5 = CreateMutexA(0, 0, "FiestaOnline");
  if ( !v5 || GetLastError() == 183 )
  {
    CloseHandle(v5);
    return 0;
  }
  v6 = v1->m_pkAppWindow->m_pWnd;
  v7 = LoadIconA(NiApplication::ms_pInstance, (LPCSTR)5);
  SetClassLongA(v6, -14, (LONG)v7);
  if ( !NiApplication::Initialize((NiApplication *)&v1->vfptr) )
    return 0;
  SplashTexName._Myres = 15;
  SplashTexName._Mysize = 0;
  SplashTexName._Bx._Buf[0] = 0;
  v46 = 0;
  ProgressBarTexName._Myres = 15;
  ProgressBarTexName._Mysize = 0;
  ProgressBarTexName._Bx._Buf[0] = 0;
  LOBYTE(v46) = 1;
  v8 = Folder::Menu();
  v9 = Folder::Merge(v8, "loading\\NowLoading.TGA");
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator=(&SplashTexName, v9);
  v10 = Folder::Menu();
  v11 = Folder::Merge(v10, "loading\\ProgressBar.tga");
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator=(&ProgressBarTexName, v11);
  v12 = v1->m_SplashTexName._Bx._Buf;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &v1->m_SplashTexName,
    &SplashTexName,
    0,
    0xFFFFFFFF);
  v13 = v1->m_ProgressBarTexName._Bx._Buf;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &v1->m_ProgressBarTexName,
    &ProgressBarTexName,
    0,
    0xFFFFFFFF);
  if ( v1->m_ProgressBarTexName._Myres < 0x10 )
    v14 = v1->m_ProgressBarTexName._Bx._Buf;
  else
    v14 = *(const char **)v13;
  if ( v1->m_SplashTexName._Myres < 0x10 )
    v15 = v1->m_SplashTexName._Bx._Buf;
  else
    v15 = *(const char **)v12;
  MainApp::DisplaySplash(v1, v15, v14, 10);
  Char::SetDefWalkSpeed(60.0);
  Char::SetDefRunSpeed(115.0);
  if ( !PgInitInstance() )
  {
    MainApp::InitError("PgInstance Initialize Fail!");
LABEL_24:
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&ProgressBarTexName);
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&SplashTexName);
    return 0;
  }
  if ( !MainApp::InitAppHandle(v1) )
  {
    MainApp::InitError("AppHandle Initialize Fail!");
    goto LABEL_24;
  }
  if ( !MainApp::InitInput(v1) )
  {
    MainApp::InitError("Input Initialize Fail!");
    goto LABEL_24;
  }
  if ( !Font::Init() )
  {
    MainApp::InitError("Font Initialize Fail!");
    goto LABEL_24;
  }
  if ( !NetMgr::Init(&g_kNetMgr) )
  {
    MainApp::InitError("Network Initialize Fail!");
    goto LABEL_24;
  }
  if ( v1->m_ProgressBarTexName._Myres < 0x10 )
    v16 = v1->m_ProgressBarTexName._Bx._Buf;
  else
    v16 = *(const char **)v13;
  if ( v1->m_SplashTexName._Myres < 0x10 )
    v17 = v1->m_SplashTexName._Bx._Buf;
  else
    v17 = *(const char **)v12;
  MainApp::DisplaySplash(v1, v17, v16, 20);
  if ( !MainApp::InitGameData(v1) )
  {
    MainApp::InitError("Game Data Initialize Fail!");
    goto LABEL_24;
  }
  if ( v1->m_ProgressBarTexName._Myres < 0x10 )
    v18 = v1->m_ProgressBarTexName._Bx._Buf;
  else
    v18 = *(const char **)v13;
  if ( v1->m_SplashTexName._Myres < 0x10 )
    v19 = v1->m_SplashTexName._Bx._Buf;
  else
    v19 = *(const char **)v12;
  MainApp::DisplaySplash(v1, v19, v18, 70);
  if ( !CharMgr::Init(&g_kCharMgr) )
  {
    MainApp::InitError("Character Manager Initialize Fail!");
    goto LABEL_24;
  }
  if ( !CharResMgr::Init(&g_kCharResMgr) )
  {
    MainApp::InitError("Character Resource Manager Initialize Fail!");
    goto LABEL_24;
  }
  if ( v1->m_ProgressBarTexName._Myres < 0x10 )
    v20 = v1->m_ProgressBarTexName._Bx._Buf;
  else
    v20 = *(const char **)v13;
  if ( v1->m_SplashTexName._Myres < 0x10 )
    v21 = v1->m_SplashTexName._Bx._Buf;
  else
    v21 = *(const char **)v12;
  MainApp::DisplaySplash(v1, v21, v20, 90);
  if ( !MapObjMgr::Init() )
  {
    MainApp::InitError("Map Object Manager Initialize Fail!");
    goto LABEL_24;
  }
  if ( !DropItemMgr::Init(&g_kDropItemMgr) )
  {
    MainApp::InitError("DropItem Manager Initialize Fail!");
    goto LABEL_24;
  }
  if ( !MenuTexMgr::Init() )
  {
    MainApp::InitError("Menu Texture Manager Initialize Fail!");
    goto LABEL_24;
  }
  v22 = v1->m_pkAppWindow;
  fSpeed = (double)v22->m_uiHeight;
  HIDWORD(seed) = v22->m_uiWidth;
  fScreenWidth = (double)HIDWORD(seed);
  if ( !World::Init(&g_kWorld, fScreenWidth, fSpeed) )
  {
    MainApp::InitError("World Initialize Fail!");
    goto LABEL_24;
  }
  if ( !Engine3D::Init(pkWorldCamera) )
  {
    MainApp::InitError("Engine3D Initialize Fail!");
    goto LABEL_24;
  }
  if ( v1->m_ProgressBarTexName._Myres >= 0x10 )
    v13 = *(const char **)v13;
  if ( v1->m_SplashTexName._Myres >= 0x10 )
    v12 = *(const char **)v12;
  MainApp::DisplaySplash(v1, v12, v13, 100);
  SoundMgr::Init(&g_kSoundMgr);
  LoadSoundOption();
  if ( !EffectMgr::Init(&g_kEffectMgr) )
  {
    MainApp::InitError("Effect Initialize Fail!");
    goto LABEL_24;
  }
  if ( !ScreenBDMgr::Init(&g_kScrnBDMgr) )
  {
    MainApp::InitError("Speech Initialize Fail!");
    goto LABEL_24;
  }
  if ( !TextEffMgr::Init(&g_kTextEffMgr) )
  {
    MainApp::InitError("Text Effect Initialize Fail!");
    goto LABEL_24;
  }
  v1->m_dwStyle = GetWindowLongA(v1->m_pkAppWindow->m_pWnd, -16);
  GetWindowRect(v1->m_pkAppWindow->m_pRenderWnd, &kRect);
  v25 = v1->m_bRendererDialog == 0;
  v1->m_uiStartHeight = kRect.bottom - kRect.top;
  if ( v25 && MachineOpt::ms_kGraphicOption.bWindowFullMode )
    MainApp::ReCreateRenderer(v1);
  v42 = v1->m_fCurrentTime;
  seed = (signed __int64)(v42 * 1000.0);
  srand(seed);
  v26 = v1->m_spRenderer.m_pObject;
  v40 = 1.0;
  *(float *)&seed = 0.0;
  *((float *)&seed + 1) = 1.0;
  ((void (__stdcall *)(float *))v26->vfptr[20].__vecDelDtor)(&v40);
  v27 = (NiAlphaAccumulator *)operator new(0x34u);
  HIDWORD(seed) = v27;
  LOBYTE(v46) = 2;
  if ( v27 )
  {
    NiAlphaAccumulator::NiAlphaAccumulator(v27);
    v29 = v28;
  }
  else
  {
    v29 = 0;
  }
  HIDWORD(seed) = v29;
  if ( v29 )
    InterlockedIncrement((volatile LONG *)&v29->m_uiRefCount);
  v30 = v1->m_spRenderer.m_pObject;
  LOBYTE(v46) = 3;
  NiRenderer::SetSorter(v30, v29);
  PgFrameMgr::RegisterAllFrameWork(&Pgg_kFrameMgr);
  v1->m_kStartFrameWorkID = AccountFrameWorkID;
  MainApp::CheckSpawnApps();
  MainApp::ProcessCommandLine(v1);
  v31 = NiImageConverter::GetImageConverter();
  if ( v31 )
  {
    *(float *)&v32 = COERCE_FLOAT(operator new(0xB0u));
    v42 = *(float *)&v32;
    LOBYTE(v46) = 4;
    if ( *(float *)&v32 == 0.0 )
      v33 = 0.0;
    else
      NiPNGReader::NiPNGReader(v32);
    v34 = v33;
    v35 = v31->vfptr[13].__vecDelDtor;
    LOBYTE(v46) = 3;
    v35((NiRefObject *)&v31->vfptr, LODWORD(v34));
  }
  World::SetCameraZoomRatePerTick(&g_kWorld, 0.001);
  World::SetCameraZoomMin(&g_kWorld, 40.0);
  World::SetCameraZoomMax(&g_kWorld, 360.0);
  World::SetCameraZoomDef(&g_kWorld, 280.0);
  CPostProcessEffectManager::GetInstance();
  v36 = Folder::Main();
  v37 = Folder::Merge(v36, "Default.conf");
  v38 = CDataDocument::Instance();
  CDataDocument::Load(v38, v37);
  PgFrameMgr::Start(&Pgg_kFrameMgr, AccountFrameWorkID, 0);
  MaskShader::GetShader();
  MaskShader::GetShader_NoAlphaBlend();
  Singleton<LuaScriptMgr>::getInstance();
  LuaScriptMgr::Init();
  LOBYTE(v46) = 1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&seed + 1);
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&ProgressBarTexName);
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&SplashTexName);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0045C940) --------------------------------------------------------
void __cdecl NiApplication::Create()
{
  MainApp *v0; // eax@2
  struct MainApp *v1; // eax@3

  if ( MainApp::CheckWindowLocale() )
  {
    v0 = (MainApp *)operator new(0xD90u);
    if ( v0 )
    {
      MainApp::MainApp(v0);
      MainApp::ms_pkMainApp = v1;
    }
    else
    {
      MainApp::ms_pkMainApp = 0;
    }
  }
}
// A8C124: using guessed type struct MainApp *MainApp::ms_pkMainApp;

//----- (0045C9D0) --------------------------------------------------------
void __cdecl Singleton<LuaScriptMgr>::getInstance()
{
  LuaScriptMgr *v0; // eax@2
  int v1; // eax@3

  if ( !Singleton<LuaScriptMgr>::m_pInstance )
  {
    v0 = (LuaScriptMgr *)operator new(0x14u);
    if ( v0 )
    {
      LuaScriptMgr::LuaScriptMgr(v0);
      Singleton<LuaScriptMgr>::m_pInstance = v1;
    }
    else
    {
      Singleton<LuaScriptMgr>::m_pInstance = 0;
    }
  }
}
// A89C94: using guessed type int Singleton<LuaScriptMgr>::m_pInstance;

//----- (0045CA50) --------------------------------------------------------
void __thiscall NiTexturingProperty::SetBaseClampMode(NiTexturingProperty *this, NiTexturingProperty::ClampMode eMode)
{
  NiTexturingProperty *v2; // edi@1
  NiTexturingProperty::Map *v3; // eax@1
  NiTexturingProperty::Map *v4; // eax@2
  NiTexturingProperty::Map *v5; // eax@3
  NiTexturingProperty::Map *v6; // esi@5
  NiTexturingProperty::Map *pkBaseMap; // [sp+Ch] [bp-10h]@2
  int v8; // [sp+18h] [bp-4h]@2

  v2 = this;
  v3 = *this->m_kMaps.m_pBase;
  if ( v3 )
  {
    v3->m_eClamp = eMode;
  }
  else
  {
    v4 = (NiTexturingProperty::Map *)operator new(0x18u);
    pkBaseMap = v4;
    v8 = 0;
    if ( v4 )
      NiTexturingProperty::Map::Map(v4);
    else
      v5 = 0;
    v6 = v5;
    pkBaseMap = v5;
    NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)&v2->m_kMaps, 0, (NiVBChip *const *)&pkBaseMap);
    v6->m_eClamp = eMode;
  }
}

//----- (0045CAF0) --------------------------------------------------------
void __thiscall Server::SetLoginAddr(Server *this, char *pcAddr)
{
  char *v2; // eax@1

  v2 = this->m_kLoginAddr.m_kAddr.n4_name;
  *((_DWORD *)v2 + 3) = 0;
  *((_DWORD *)v2 + 2) = 0;
  *((_DWORD *)v2 + 1) = 0;
  *(_DWORD *)v2 = 0;
  strncpy(this->m_kLoginAddr.m_kAddr.n4_name, pcAddr, 0x10u);
}

//----- (0045CB20) --------------------------------------------------------
bool __thiscall NiRenderer::BeginUsingDefaultRenderTargetGroup(NiRenderer *this, unsigned int uiClearMode)
{
  NiRenderer *v2; // esi@1
  bool result; // al@4
  NiRenderTargetGroup *v4; // eax@5

  v2 = this;
  if ( this->m_eFrameState != 1 && this->m_eOffScreenFrameState != 1 || this->m_bRenderTargetGroupActive )
  {
    result = 0;
  }
  else
  {
    v4 = (NiRenderTargetGroup *)((int (*)(void))this->vfptr[26].__vecDelDtor)();
    result = NiRenderer::BeginUsingRenderTargetGroup(v2, v4, uiClearMode);
  }
  return result;
}

//----- (0045CB60) --------------------------------------------------------
TextData *__thiscall TextData::`vector deleting destructor'(TextData *this, unsigned int a2)
{
  TextData *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<TextDataType,TextData>Vtbl *)&ITableBase<TextDataType,TextData>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97C2F0: using guessed type int (__cdecl *ITableBase<TextDataType,TextData>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (0045CBE0) --------------------------------------------------------
void __thiscall TextData::TextData(TextData *this)
{
  TextData *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<TextDataType,TextData>Vtbl *)&ITableBase<TextDataType,TextData>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<TextDataType,TextData>::ITableBase<TextDataType,TextData>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<TextDataType,TextData>::ITableBase<TextDataType,TextData>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_TextDataType_TextData_::ITableBase_TextDataType_TextData__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<TextDataType,TextData>Vtbl *)&TextData::`vftable';
}
// 97C2F0: using guessed type int (__cdecl *ITableBase<TextDataType,TextData>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97C32C: using guessed type void (__thiscall *TextData::`vftable')(TextData *__hidden this);
// A8C128: using guessed type unsigned __int32 g_ProcessID;
// A8C12C: using guessed type int `ITableBase<TextDataType,TextData>::ITableBase<TextDataType,TextData>'::`2'::`local static guard';

//----- (0045CC20) --------------------------------------------------------
void __thiscall TextData2::TextData2(TextData2 *this)
{
  TextData2 *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<TextDataType2,TextData2>Vtbl *)&ITableBase<TextDataType2,TextData2>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<TextDataType2,TextData2>::ITableBase<TextDataType2,TextData2>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<TextDataType2,TextData2>::ITableBase<TextDataType2,TextData2>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_TextDataType2_TextData2_::ITableBase_TextDataType2_TextData2__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<TextDataType2,TextData2>Vtbl *)&TextData2::`vftable';
}
// 97C300: using guessed type int (__cdecl *ITableBase<TextDataType2,TextData2>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97C33C: using guessed type void (__thiscall *TextData2::`vftable')(TextData2 *__hidden this);
// A8C12C: using guessed type int `ITableBase<TextDataType,TextData>::ITableBase<TextDataType,TextData>'::`2'::`local static guard';
// A8C130: using guessed type int `ITableBase<TextDataType2,TextData2>::ITableBase<TextDataType2,TextData2>'::`2'::`local static guard';

//----- (0045CC60) --------------------------------------------------------
TextData2 *__thiscall TextData2::`scalar deleting destructor'(TextData2 *this, unsigned int a2)
{
  TextData2 *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<TextDataType2,TextData2>Vtbl *)&ITableBase<TextDataType2,TextData2>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97C300: using guessed type int (__cdecl *ITableBase<TextDataType2,TextData2>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (0045CCE0) --------------------------------------------------------
void __thiscall TextData3::TextData3(TextData3 *this)
{
  TextData3 *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<TextDataType3,TextData3>Vtbl *)&ITableBase<TextDataType3,TextData3>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<TextDataType3,TextData3>::ITableBase<TextDataType3,TextData3>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<TextDataType3,TextData3>::ITableBase<TextDataType3,TextData3>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_TextDataType3_TextData3_::ITableBase_TextDataType3_TextData3__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<TextDataType3,TextData3>Vtbl *)&TextData3::`vftable';
}
// 97C310: using guessed type int (__cdecl *ITableBase<TextDataType3,TextData3>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97C34C: using guessed type void (__thiscall *TextData3::`vftable')(TextData3 *__hidden this);
// A8C130: using guessed type int `ITableBase<TextDataType2,TextData2>::ITableBase<TextDataType2,TextData2>'::`2'::`local static guard';
// A8C134: using guessed type int `ITableBase<TextDataType3,TextData3>::ITableBase<TextDataType3,TextData3>'::`2'::`local static guard';

//----- (0045CD20) --------------------------------------------------------
TextData3 *__thiscall TextData3::`scalar deleting destructor'(TextData3 *this, unsigned int a2)
{
  TextData3 *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<TextDataType3,TextData3>Vtbl *)&ITableBase<TextDataType3,TextData3>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97C310: using guessed type int (__cdecl *ITableBase<TextDataType3,TextData3>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (0045CDA0) --------------------------------------------------------
bool __cdecl ITableBase<TextDataType,TextData>::Load(char *acFn)
{
  int v1; // eax@1
  TextData *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<TextDataType,TextData>::ms_pkTable;
  if ( !ITableBase<TextDataType,TextData>::ms_pkTable )
  {
    v2 = (TextData *)operator new(0xC4u);
    if ( v2 )
      TextData::TextData(v2);
    else
      v1 = 0;
    ITableBase<TextDataType,TextData>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<TextDataType,TextData>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<TextDataType,TextData>::ms_pkTable + 56)) != 0
    && *v3 == 385 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<TextDataType,TextData>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<TextDataType,TextData>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A88690: using guessed type int ITableBase<TextDataType,TextData>::ms_pkTable;

//----- (0045CE80) --------------------------------------------------------
bool __cdecl ITableBase<TextDataType2,TextData2>::Load(char *acFn)
{
  int v1; // eax@1
  TextData2 *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<TextDataType2,TextData2>::ms_pkTable;
  if ( !ITableBase<TextDataType2,TextData2>::ms_pkTable )
  {
    v2 = (TextData2 *)operator new(0xC4u);
    if ( v2 )
      TextData2::TextData2(v2);
    else
      v1 = 0;
    ITableBase<TextDataType2,TextData2>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<TextDataType2,TextData2>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<TextDataType2,TextData2>::ms_pkTable + 56)) != 0
    && *v3 == 385 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<TextDataType2,TextData2>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<TextDataType2,TextData2>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A88684: using guessed type int ITableBase<TextDataType2,TextData2>::ms_pkTable;

//----- (0045CF60) --------------------------------------------------------
bool __cdecl ITableBase<TextDataType3,TextData3>::Load(char *acFn)
{
  int v1; // eax@1
  TextData3 *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<TextDataType3,TextData3>::ms_pkTable;
  if ( !ITableBase<TextDataType3,TextData3>::ms_pkTable )
  {
    v2 = (TextData3 *)operator new(0xC4u);
    if ( v2 )
      TextData3::TextData3(v2);
    else
      v1 = 0;
    ITableBase<TextDataType3,TextData3>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<TextDataType3,TextData3>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<TextDataType3,TextData3>::ms_pkTable + 56)) != 0
    && *v3 == 385 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<TextDataType3,TextData3>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<TextDataType3,TextData3>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A88680: using guessed type int ITableBase<TextDataType3,TextData3>::ms_pkTable;

//----- (0045D040) --------------------------------------------------------
MainApp *__thiscall MainApp::`scalar deleting destructor'(MainApp *this, unsigned int a2)
{
  MainApp *v2; // esi@1

  v2 = this;
  MainApp::~MainApp(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0045D070) --------------------------------------------------------
char __cdecl MainApp::CheckWindowLocale()
{
  return 1;
}

//----- (0045D080) --------------------------------------------------------
void __usercall SetImeNativeModeFalse(HWND__ *hWnd@<edi>)
{
  HIMC v1; // esi@1

  v1 = ImmGetContext(hWnd);
  ImmNotifyIME(v1, 0x15u, 4u, 0);
  ImmNotifyIME(v1, 0x11u, 0, 0);
  ImmReleaseContext(hWnd, v1);
}

//----- (0045D0B0) --------------------------------------------------------
char __stdcall MainApp::OnIme(NiEventRecord *pEventRecord)
{
  unsigned int v2; // edx@1
  char result; // al@1
  unsigned int v4; // edx@3
  HWND__ *v5; // edi@5
  HIMC v6; // esi@5

  v2 = pEventRecord->uiMsg;
  result = 0;
  if ( v2 == 269 || v2 == 642 && ((v4 = pEventRecord->wParam, v4 == 6) || v4 == 8) )
  {
    v5 = pEventRecord->hWnd;
    v6 = ImmGetContext(pEventRecord->hWnd);
    ImmNotifyIME(v6, 0x15u, 4u, 0);
    ImmNotifyIME(v6, 0x11u, 0, 0);
    ImmReleaseContext(v5, v6);
    result = 1;
  }
  return result;
}

//----- (0045D110) --------------------------------------------------------
bool __cdecl WeaponTitleTab::Load(char *pcFn)
{
  return CWeaponTitle::Read(&WeaponTitleTab::ms_kTab, pcFn, 0x6C0u, 0x40u) != 0;
}

//----- (0045D130) --------------------------------------------------------
bool __stdcall MainApp::OnWindowDestroy(HWND__ *pWnd, bool bOption)
{
  return NiApplication::OnWindowDestroy(pWnd, bOption);
}

//----- (0045D140) --------------------------------------------------------
void __cdecl MainApp::InitError(char *pcErrMsg)
{
  MessageBoxA(0, pcErrMsg, "Application Initialize Error!", 0x10u);
}

//----- (0045D170) --------------------------------------------------------
bool __stdcall MainApp::IsSkipDraw(float fCurTime)
{
  return 0;
}

//----- (0045D180) --------------------------------------------------------
void MainApp::TerminateGameData()
{
  ShortCutMgr::Terminate(&g_kShortCutMgr);
  Inventory::Clear(&g_kInventory);
  Inventory::ClearMiniHouse(&g_kInventory);
  Inventory::ClearMiniHouseAllItemInv(&g_kInventory);
  IconMgr::Terminate();
  ActionInfoTable::Terminate();
  Skill::Terminate();
}

//----- (0045D1C0) --------------------------------------------------------
void __stdcall MainApp::OnWindowActivate(HDC__ *pDrawContext, bool bActivate)
{
  if ( bActivate )
  {
    if ( EditWin::ms_pkCurEditWin )
      EditWin::Recover_focus((EditWin *)EditWin::ms_pkCurEditWin);
  }
}

//----- (0045D1E0) --------------------------------------------------------
char __thiscall MainApp::InitAppHandle(MainApp *this)
{
  NiAppWindow *v1; // eax@1
  HWND v2; // ecx@2
  char result; // al@2
  HWND v4; // ecx@3

  v1 = this->m_pkAppWindow;
  if ( this->m_bFullscreen )
  {
    v2 = v1->m_pWnd;
    result = 1;
    g_hMainInstance = NiApplication::ms_pInstance;
    g_hMainWnd = v2;
  }
  else
  {
    v4 = v1->m_pRenderWnd;
    result = 1;
    g_hMainInstance = NiApplication::ms_pInstance;
    g_hMainWnd = v4;
  }
  return result;
}

//----- (0045D220) --------------------------------------------------------
void __thiscall MainApp::ProcessCommandLineBeforInit(MainApp *this)
{
  signed int v1; // eax@1
  char *v2; // edi@4
  char *v3; // esi@4
  const char *v4; // edx@13
  char *v5; // ecx@13
  bool v6; // cf@14
  unsigned __int8 v7; // al@16
  int v8; // eax@18
  SteamCallback *v9; // eax@24
  struct SteamCallback *v10; // eax@25
  MainApp *v11; // [sp+14h] [bp-14h]@1
  signed int i; // [sp+18h] [bp-10h]@1

  v11 = this;
  v1 = 1;
  i = 1;
  if ( __argc > 1 )
  {
    while ( 1 )
    {
      v2 = __argv[v1];
      v3 = __argv[v1 + 1];
      if ( !v2 || !*v2 )
        return;
      if ( strcmp(__argv[v1], "-f") )
      {
        if ( !strcmp(v2, "-d") )
        {
          v11->m_bUseDoption = 1;
          v11->m_bRendererDialog = 1;
        }
        else if ( !strcmp(v2, "-win") )
        {
          v11->m_bUseWinoption = 1;
        }
      }
      if ( !strcmp(v2, "-w") )
        ++i;
      v4 = "-steam_login";
      v5 = v2;
      while ( 1 )
      {
        v6 = (unsigned __int8)*v5 < *v4;
        if ( *v5 != *v4 )
          break;
        if ( !*v5 )
          goto LABEL_18;
        v7 = v5[1];
        v6 = v7 < v4[1];
        if ( v7 != v4[1] )
          break;
        v5 += 2;
        v4 += 2;
        if ( !v7 )
        {
LABEL_18:
          v8 = 0;
          goto LABEL_20;
        }
      }
      v8 = -v6 - (v6 - 1);
LABEL_20:
      if ( !v8 )
        break;
      if ( !strcmp(v2, "-i") )
      {
        if ( v3 && *v3 )
        {
          *(_QWORD *)&g_kServer.m_kLoginAddr.m_kAddr.n4_code[2] = 0i64;
          *(_QWORD *)&g_kServer.m_kLoginAddr.m_kAddr.n4_name[0] = 0i64;
          strncpy(g_kServer.m_kLoginAddr.m_kAddr.n4_name, v3, 0x10u);
          strcpy(g_kServer.m_szCPIP, v3);
        }
        i += 2;
      }
      else if ( !strcmp(v2, "-u") )
      {
        if ( v3 && *v3 )
          strcpy(g_kServer.m_szCPShopUrl, v3);
        i += 2;
      }
      else if ( !strcmp(v2, "-p") )
      {
        if ( v3 && *v3 )
          g_kServer.m_kLoginAddr.m_iPort = atoi(v3);
        i += 2;
      }
      else if ( !strcmp(v2, "-osk_server") )
      {
        if ( !g_kServer.m_bTestServer && v3 && *v3 )
        {
          Server::SetLoginAddr(&g_kServer, v3);
          strcpy(g_kServer.m_szCPIP, v3);
        }
        i += 2;
      }
      else if ( !strcmp(v2, "-osk_store") )
      {
        if ( v3 && *v3 )
          strcpy(g_kServer.m_szCPShopUrl, v3);
        i += 2;
      }
      else
      {
        if ( strcmp(v2, "-tip") )
          goto LABEL_29;
        if ( v3 && *v3 )
        {
          Server::SetLoginAddr(&g_kServer, v3);
          strcpy(g_kServer.m_szCPIP, v3);
          g_kServer.m_bTestServer = 1;
        }
        i += 2;
      }
LABEL_30:
      if ( i >= __argc )
        return;
      v1 = i;
    }
    if ( (unsigned __int8)_SteamAPI_IsSteamRunning(v5, v4) && (unsigned __int8)_SteamAPI_Init() )
    {
      if ( !SteamCallback::This )
      {
        v9 = (SteamCallback *)operator new(0x2Cu);
        if ( v9 )
          SteamCallback::SteamCallback(v9);
        else
          v10 = 0;
        SteamCallback::This = v10;
      }
      SteamConfig::Running();
    }
LABEL_29:
    ++i;
    goto LABEL_30;
  }
}
// 96D688: using guessed type int _SteamAPI_Init(void);
// 96D698: using guessed type int __fastcall _SteamAPI_IsSteamRunning(_DWORD, _DWORD);
// A89D44: using guessed type struct SteamCallback *SteamCallback::This;

//----- (0045D680) --------------------------------------------------------
bool __stdcall MainApp::CheckDisplayCard(unsigned int uiWidth, unsigned int uiHeight, unsigned int uiMultisample, int bFullScreen)
{
  NiDX9SystemDesc *v5; // eax@3
  unsigned int v6; // edx@3
  NiDX9AdapterDesc *v7; // ecx@4
  NiDX9DeviceDesc *v8; // ecx@7
  bool result; // al@10
  NiDX9AdapterDesc *v10; // edx@12
  unsigned int v11; // ebx@14
  NiDX9DeviceDesc *v12; // eax@14
  unsigned int v13; // ecx@14
  NiDX9AdapterDesc::ModeDesc **v14; // edi@15
  NiDX9AdapterDesc::ModeDesc *v15; // esi@16
  NiDX9AdapterDesc::ModeDesc *v16; // ecx@20
  _D3DFORMAT v17; // esi@27
  NiTListItem<NiDX9DeviceDesc::DisplayFormatInfo *> *v18; // eax@29
  NiDX9DeviceDesc::DisplayFormatInfo *v19; // edi@30
  _D3DFORMAT v20; // ebx@33
  _D3DMULTISAMPLE_TYPE v21; // esi@33
  unsigned int uiMode; // [sp+0h] [bp-Ch]@16
  NiDX9AdapterDesc::ModeDesc **v23; // [sp+4h] [bp-8h]@15
  bool bDisplayRes; // [sp+Bh] [bp-1h]@14

  if ( !(_S3_0 & 1) )
  {
    _S3_0 |= 1u;
    ms_bFullscreen = bFullScreen;
  }
  v5 = NiDX9Renderer::GetSystemDesc();
  v6 = v5->m_kAdapterList.m_uiSize;
  ms_pkInfo = v5;
  if ( v6 )
    v7 = *v5->m_kAdapterList.m_pBase;
  else
    v7 = 0;
  if ( ms_bFullscreen || (v8 = v7->m_pkHALDeviceDesc, v8->m_kD3DCaps9.DeviceType) && v8 && v8->m_bRenderWindowed )
  {
    if ( v6 )
      v10 = *v5->m_kAdapterList.m_pBase;
    else
      v10 = 0;
    v11 = v10->m_kModeList.m_uiSize;
    v12 = v10->m_pkHALDeviceDesc->m_kD3DCaps9.DeviceType != 0 ? v10->m_pkHALDeviceDesc : 0;
    v13 = 0;
    ms_pkAdapter = v10;
    ms_pkDevice = v12;
    BYTE3(bFullScreen) = 0;
    bDisplayRes = 0;
    if ( !v11 )
      goto LABEL_44;
    v23 = v10->m_kModeList.m_pBase;
    v14 = v10->m_kModeList.m_pBase;
    while ( 1 )
    {
      v15 = *v14;
      uiMode = v13;
      if ( (*v14)->m_uiWidth == uiWidth && v15->m_uiHeight == uiHeight && v15->m_uiBPP == 32 )
        break;
      ++v13;
      ++v14;
      BYTE3(bFullScreen) = 1;
      if ( v13 >= v11 )
      {
        v16 = v23[uiMode];
        goto LABEL_24;
      }
    }
    bDisplayRes = 1;
    if ( BYTE3(bFullScreen) )
      v16 = v23[v13];
    else
LABEL_44:
      v16 = 0;
LABEL_24:
    ms_pkMode = v16;
    if ( v12 )
    {
      if ( v16 )
      {
        v17 = v16->m_eD3DFormat;
        bFullScreen = v16->m_eD3DFormat;
      }
      else
      {
        v17 = bFullScreen;
      }
      v18 = v12->m_kScreenFormats.m_pkHead;
      if ( v18 )
      {
        while ( 1 )
        {
          v19 = v18->m_element;
          v18 = v18->m_pkNext;
          if ( v19->m_eFormat == v17 )
            break;
          if ( !v18 )
            goto LABEL_32;
        }
      }
      else
      {
LABEL_32:
        v19 = 0;
      }
      v20 = NiDX9DeviceDesc::DisplayFormatInfo::FindClosestDepthStencil(v19, ms_b32BitZBuffer != 0 ? 32 : 16, 0);
      NiDX9DeviceDesc::DisplayFormatInfo::GetNonmaskableMultiSampleQuality(v19, ms_bFullscreen == 0, v17, v20);
      NiDX9Select::ms_uiMultisample = 0;
      v21 = 2;
      while ( !NiDX9DeviceDesc::DisplayFormatInfo::IsMultiSampleValid(
                 v19,
                 ms_bFullscreen == 0,
                 v21,
                 (_D3DFORMAT)bFullScreen,
                 v20) )
      {
        if ( (unsigned int)++v21 >= 0x11 )
          goto LABEL_39;
      }
      if ( uiMultisample == 1 )
        NiDX9Select::ms_uiMultisample = v21;
LABEL_39:
      if ( !NiDX9Select::ms_uiMultisample )
        MachineOpt::ms_kGraphicOption.ui_DisplayMultisample = 0;
      result = bDisplayRes;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0045D860) --------------------------------------------------------
void __thiscall MainApp::SetWinMinimized(MainApp *this)
{
  ShowWindow(this->m_pkAppWindow->m_pWnd, 6);
}

//----- (0045D870) --------------------------------------------------------
char __thiscall MainApp::InitInput(MainApp *this)
{
  MainApp *v1; // esi@1
  NiInputSystem *v2; // ecx@1
  struct NiInputKeyboard *v3; // edi@1
  void (__thiscall ***v4)(_DWORD, _DWORD); // esi@3
  struct NiInputMouse *v5; // edi@8
  void (__thiscall ***v6)(_DWORD, _DWORD); // esi@10
  char result; // al@15

  v1 = this;
  PgImeCtrl::SetHWND(&this->m_kImeCtrl, g_hMainWnd);
  v2 = v1->m_spInputSystem.m_pObject;
  v1->m_kImeCtrl.m_bPreventNative = 1;
  g_pkKeyboard = v2->m_spKeyboard.m_pObject;
  g_pkMouse = v1->m_spInputSystem.m_pObject->m_spMouse.m_pObject;
  v3 = g_pkKeyboard;
  if ( (struct NiInputKeyboard *)unk_B64868 != g_pkKeyboard )
  {
    if ( unk_B64868 )
    {
      v4 = (void (__thiscall ***)(_DWORD, _DWORD))unk_B64868;
      if ( !InterlockedDecrement((volatile LONG *)(unk_B64868 + 4)) )
      {
        if ( v4 )
          (**v4)(v4, 1);
      }
    }
    unk_B64868 = v3;
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
  v5 = g_pkMouse;
  if ( (struct NiInputMouse *)unk_B64864 != g_pkMouse )
  {
    if ( unk_B64864 )
    {
      v6 = (void (__thiscall ***)(_DWORD, _DWORD))unk_B64864;
      if ( !InterlockedDecrement((volatile LONG *)(unk_B64864 + 4)) )
      {
        if ( v6 )
          (**v6)(v6, 1);
      }
    }
    unk_B64864 = v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  }
  SetCursor(0);
  result = Cursor::Init();
  if ( result )
  {
    unk_B64860 = Cursor::GetPgCursor();
    result = 1;
  }
  return result;
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;
// A8C4A8: using guessed type struct NiInputMouse *g_pkMouse;

//----- (0045D950) --------------------------------------------------------
void __thiscall MainApp::SetupWindow(MainApp *this)
{
  MainApp *v1; // esi@1
  NiAppWindow *v2; // edx@1
  unsigned int v3; // edi@1
  unsigned int v4; // ebx@1
  unsigned int v5; // ecx@1
  bool v6; // al@2
  NiAppWindow *v7; // edx@2
  unsigned int systemScreenWidht; // [sp+Ch] [bp-Ch]@1
  unsigned int systemScreenHeight; // [sp+10h] [bp-8h]@1
  unsigned int uiDisplayMultisample; // [sp+14h] [bp-4h]@1

  v1 = this;
  MachineOpt::Load();
  v2 = v1->m_pkAppWindow;
  v1->m_bFullscreen = MachineOpt::ms_kGraphicOption.bWindowFullMode;
  v3 = MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth;
  v4 = MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight;
  v5 = MachineOpt::ms_kGraphicOption.ui_DisplayMultisample;
  v2->m_uiWidth = MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth;
  v1->m_pkAppWindow->m_uiHeight = v4;
  uiDisplayMultisample = v5;
  MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = v3;
  MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = v4;
  systemScreenWidht = GetSystemMetrics(0);
  systemScreenHeight = GetSystemMetrics(1);
  if ( v1->m_bFullscreen )
  {
    MachineOpt::ms_kGraphicOption.bWindowFullMode = 1;
    v1->m_bFullscreen = 0;
    v6 = MainApp::CheckDisplayCard(v3, v4, uiDisplayMultisample, 0);
    v7 = v1->m_pkAppWindow;
    if ( v6 )
    {
      v7->m_uiWidth = v3;
      v1->m_pkAppWindow->m_uiHeight = v4;
    }
    else
    {
      v7->m_uiWidth = 800;
      v1->m_pkAppWindow->m_uiHeight = 600;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = 800;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = 600;
    }
  }
  else
  {
    if ( !MainApp::CheckDisplayCard(v3, v4, uiDisplayMultisample, 0) )
    {
      MessageBoxA(0, "¿¡·¯", "¿¡·¯", 0);
      if ( !MainApp::CheckDisplayCard(0x320u, 0x258u, 0, 1) )
      {
        MessageBoxA(0, "¿¡·¯2", "¿¡·¯2", 0);
        MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = 800;
        MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = 600;
      }
    }
    MachineOpt::ms_kGraphicOption.bWindowFullMode = 0;
    if ( systemScreenWidht < 0x400 || systemScreenHeight < 0x300 )
    {
      v1->m_pkAppWindow->m_uiWidth = 800;
      v1->m_pkAppWindow->m_uiHeight = 600;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = 800;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = 600;
    }
    else if ( v3 >= systemScreenWidht || v4 >= systemScreenHeight )
    {
      v1->m_pkAppWindow->m_uiWidth = v3;
      v1->m_pkAppWindow->m_uiHeight = v4;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = v3;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = v4;
    }
  }
  v1->m_bRendererDialog = 0;
  v1->m_bStartUseAntiOption = MachineOpt::ms_kGraphicOption.ui_DisplayMultisample != 0;
}

//----- (0045DAF0) --------------------------------------------------------
void __thiscall MainApp::SetWinMaxmized(MainApp *this)
{
  int v1; // ebx@1
  MainApp *v2; // esi@1
  NiAppWindow *v3; // edx@1
  LONG v4; // eax@1
  NiAppWindow *v5; // eax@4
  int v6; // edi@4
  HWND *v7; // eax@5
  BOOL v8; // eax@6
  unsigned int uiDisplayHeight; // [sp+Ch] [bp-B8h]@1
  HWND__ *hStatusWnd; // [sp+10h] [bp-B4h]@6
  _devicemodeA dm; // [sp+14h] [bp-B0h]@1
  tagRECT statusRect; // [sp+B0h] [bp-14h]@9

  v1 = MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth;
  v2 = this;
  uiDisplayHeight = MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight;
  memset(dm.dmDeviceName, 0, 0x9Cu);
  v3 = v2->m_pkAppWindow;
  dm.dmSize = 156;
  dm.dmFields = 1835008;
  dm.dmBitsPerPel = 32;
  dm.dmPelsWidth = MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth;
  dm.dmPelsHeight = MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight;
  v4 = GetWindowLongA(v3->m_pWnd, -16);
  SetWindowLongA(v2->m_pkAppWindow->m_pWnd, -16, v4 & 0xFF37FFFF | 0x80);
  if ( !ChangeDisplaySettingsA(&dm, 2u) )
  {
    if ( ChangeDisplaySettingsA(&dm, 4u) )
      ChangeDisplaySettingsA(&dm, 0);
    ShowWindow(v2->m_pkAppWindow->m_pWnd, 3);
    v5 = v2->m_pkAppWindow;
    v6 = 0;
    if ( v5->m_uiNumStatusPanes && (v7 = v5->m_ppStatusWnd) != 0 )
    {
      hStatusWnd = *v7;
      v8 = IsWindow(*v7);
    }
    else
    {
      hStatusWnd = 0;
      v8 = IsWindow(0);
    }
    if ( v8 )
    {
      GetWindowRect(hStatusWnd, &statusRect);
      v6 = statusRect.bottom - statusRect.top;
      ShowWindow(hStatusWnd, 0);
    }
    SetWindowPos(v2->m_pkAppWindow->m_pWnd, 0, 0, 0, v1, uiDisplayHeight + v6, 0);
  }
}

//----- (0045DC50) --------------------------------------------------------
void __thiscall MainApp::SetWinNormal(MainApp *this)
{
  unsigned int v1; // ebx@1
  MainApp *v2; // edi@1
  DEVMODEA *v3; // esi@1
  unsigned int v4; // eax@2
  NiAppWindow *v5; // edi@5
  HWND *v6; // edi@6
  HWND v7; // edi@7
  int v8; // edi@11
  int v9; // edi@11
  int v10; // ebx@11
  int v11; // ebx@11
  int v12; // eax@11
  MainApp *v13; // [sp+Ch] [bp-24h]@1
  unsigned int uiDisplayWidth; // [sp+10h] [bp-20h]@1
  unsigned int uiDisplayHeight; // [sp+14h] [bp-1Ch]@1
  unsigned int systemScreenWidht; // [sp+18h] [bp-18h]@2
  unsigned int systemScreenWidhta; // [sp+18h] [bp-18h]@5
  tagRECT statusRect; // [sp+1Ch] [bp-14h]@10

  v1 = MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth;
  v2 = this;
  v3 = &this->m_SaveMode;
  v13 = this;
  uiDisplayWidth = MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth;
  uiDisplayHeight = MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight;
  if ( !ChangeDisplaySettingsA(&this->m_SaveMode, 2u) )
  {
    ChangeDisplaySettingsA(v3, 0);
    systemScreenWidht = GetSystemMetrics(0);
    v4 = GetSystemMetrics(1);
    if ( systemScreenWidht < v1 || v4 < uiDisplayHeight )
    {
      uiDisplayWidth = systemScreenWidht;
      uiDisplayHeight = v4;
      v1 = systemScreenWidht;
    }
    GameFrameWork::ms_uiDisResWidth = v1;
    GameFrameWork::ms_uiDisResHeight = uiDisplayHeight;
    SetWindowLongA(v2->m_pkAppWindow->m_pWnd, -16, v2->m_dwStyle);
    ShowWindow(v2->m_pkAppWindow->m_pWnd, 9);
    v5 = v2->m_pkAppWindow;
    systemScreenWidhta = 0;
    if ( v5->m_uiNumStatusPanes && (v6 = v5->m_ppStatusWnd) != 0 )
      v7 = *v6;
    else
      v7 = 0;
    if ( IsWindow(v7) )
    {
      ShowWindow(v7, 5);
      GetWindowRect(v7, &statusRect);
      systemScreenWidhta = statusRect.bottom - statusRect.top;
    }
    v8 = GetSystemMetrics(45);
    v9 = 2 * (GetSystemMetrics(5) + v8);
    v10 = GetSystemMetrics(46);
    v11 = 2 * (GetSystemMetrics(6) + v10);
    v12 = systemScreenWidhta + v11 + GetSystemMetrics(4);
    SetWindowPos(v13->m_pkAppWindow->m_pWnd, 0, 0, 0, uiDisplayWidth + v9, uiDisplayHeight + v12, 0);
    MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = uiDisplayWidth;
    MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = uiDisplayHeight;
  }
}

//----- (0045DDA0) --------------------------------------------------------
void __thiscall MainApp::ReCreateRenderer(MainApp *this)
{
  unsigned int v1; // ebx@1
  unsigned int v2; // edi@1
  MainApp *v3; // esi@1
  unsigned int v4; // eax@1
  unsigned int v5; // eax@7
  unsigned int v6; // ecx@7
  char *v7; // eax@16
  int v8; // ecx@17
  NiAppWindow *v9; // eax@17
  unsigned int v10; // edx@17
  unsigned int v11; // eax@17
  signed int v12; // edx@19
  double v13; // st6@19
  float fScreenHeight; // ST28_4@21
  float fScreenWidth; // ST24_4@21
  CPostProcessEffectManager *v16; // eax@21
  HWND__ *v17; // [sp-18h] [bp-54h]@10
  NiDX9Renderer::PresentationInterval v18; // [sp-Ch] [bp-48h]@10
  unsigned int v19; // [sp-4h] [bp-40h]@10
  NiFrustum m_kViewFrustum; // [sp+14h] [bp-28h]@21
  unsigned int systemScreenHeight; // [sp+30h] [bp-Ch]@1
  float fHeight; // [sp+34h] [bp-8h]@1
  float offsetY; // [sp+38h] [bp-4h]@1

  v1 = MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight;
  v2 = MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth;
  v3 = this;
  offsetY = *(float *)&MachineOpt::ms_kGraphicOption.ui_DisplayMultisample;
  GameFrameWork::ms_uiDisResWidth = MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth;
  GameFrameWork::ms_uiDisResHeight = MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight;
  fHeight = COERCE_FLOAT(GetSystemMetrics(0));
  v4 = GetSystemMetrics(1);
  systemScreenHeight = v4;
  if ( MachineOpt::ms_kGraphicOption.bWindowFullMode )
  {
    if ( !MainApp::CheckDisplayCard(v2, v1, LODWORD(offsetY), v3->m_bFullscreen) )
    {
      v5 = LODWORD(fHeight);
      *(float *)&v3->m_pkAppWindow->m_uiWidth = fHeight;
      v6 = systemScreenHeight;
      v3->m_pkAppWindow->m_uiHeight = systemScreenHeight;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = v5;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = v6;
      GameFrameWork::ms_uiDisResWidth = v5;
      GameFrameWork::ms_uiDisResHeight = v6;
    }
    MainApp::SetWinMaxmized(v3);
  }
  else
  {
    if ( v2 > LODWORD(fHeight) || v1 > v4 )
    {
      v3->m_pkAppWindow->m_uiWidth = v2;
      v3->m_pkAppWindow->m_uiHeight = v1;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = v2;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = v1;
      GameFrameWork::ms_uiDisResWidth = v2;
      GameFrameWork::ms_uiDisResHeight = v1;
    }
    MainApp::CheckDisplayCard(v2, v1, LODWORD(offsetY), v3->m_bFullscreen);
    MainApp::SetWinNormal(v3);
  }
  SetForegroundWindow(v3->m_pkAppWindow->m_pWnd);
  SetFocus(v3->m_pkAppWindow->m_pWnd);
  if ( offsetY == 0.0 )
  {
    v19 = 0;
    v18 = 1;
    v17 = v3->m_pkAppWindow->m_pRenderWnd;
  }
  else if ( v3->m_bStartUseAntiOption )
  {
    v19 = NiDX9Select::ms_uiMultisample;
    v18 = 0;
    v17 = v3->m_pkAppWindow->m_pRenderWnd;
  }
  else
  {
    v19 = 0;
    v18 = 1;
    v17 = v3->m_pkAppWindow->m_pRenderWnd;
  }
  NiDX9Renderer::Recreate((NiDX9Renderer *)v3->m_spRenderer.m_pObject, 0, 0, 0x28u, v17, 0, 0, v18, 0, v19, 1u, 0);
  if ( v3->m_bStartUseAntiOption != (LODWORD(offsetY) != 0) && !v3->m_bStartUseAntiOption )
  {
    v7 = (char *)TextData::Get(0x1547855Cu);
    MsgBox::Modal(MSGBOX_OK, v7);
  }
  PgWin::ms_uiScreenHeight = MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight;
  PgWin::ms_uiScreenWidth = MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth;
  PgWin::ms_iScreenBottomPos = MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight - 1;
  v8 = unk_B64860;
  PgWin::ms_iScreenTopPos = 0;
  PgWin::ms_iScreenLeftPos = 0;
  PgWin::ms_iScreenRightPos = MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth - 1;
  v9 = v3->m_pkAppWindow;
  v10 = v9->m_uiWidth;
  v11 = v9->m_uiHeight;
  PgWin::ms_uiScreenWidth = v10;
  PgWin::ms_uiScreenHeight = v11;
  if ( unk_B64860 )
  {
    *(_DWORD *)(unk_B64860 + 68) = 0;
    *(_DWORD *)(v8 + 76) = 0;
    *(_DWORD *)(v8 + 72) = v10;
    *(_DWORD *)(v8 + 80) = v11;
  }
  *(float *)&systemScreenHeight = (double)PgWin::ms_uiScreenWidth;
  v12 = v3->m_uiStartHeight;
  fHeight = (double)PgWin::ms_uiScreenHeight;
  v13 = (double)(signed int)v3->m_uiStartHeight;
  if ( v12 < 0 )
    v13 = v13 + 4294967300.0;
  offsetY = fHeight - v13 + 0.5;
  NiFrustum::NiFrustum(&m_kViewFrustum, 0);
  m_kViewFrustum.m_fLeft = 0.5;
  m_kViewFrustum.m_bOrtho = 1;
  m_kViewFrustum.m_fRight = *(float *)&systemScreenHeight + 0.5;
  m_kViewFrustum.m_fTop = fHeight - offsetY;
  m_kViewFrustum.m_fBottom = -offsetY;
  m_kViewFrustum.m_fNear = 1.0;
  m_kViewFrustum.m_fFar = 10000.0;
  NiCamera::SetViewFrustum(pkScreenCamera, &m_kViewFrustum);
  NiCamera::SetViewFrustum((NiCamera *)&g_kScrnBDMgr.m_spScreenSpaceCamera.m_pObject->vfptr, &m_kViewFrustum);
  NiCamera::SetViewFrustum((NiCamera *)&g_kTextEffMgr.m_spScreenSpaceCamera.m_pObject->vfptr, &m_kViewFrustum);
  fScreenHeight = (double)PgWin::ms_uiScreenHeight;
  fScreenWidth = (double)PgWin::ms_uiScreenWidth;
  World::SetCameraFrustum(&g_kWorld, fScreenWidth, fScreenHeight);
  v16 = CPostProcessEffectManager::GetInstance();
  CPostProcessEffectManager::Recreate(v16);
  MachineOpt::SetGlowEffect(MachineOpt::ms_kGraphicOption.bGlowEnable);
  GameFrameWork::ms_bRendererRecreated = 1;
}
// A82B04: using guessed type int PgWin::ms_iScreenRightPos;
// A82B08: using guessed type int PgWin::ms_iScreenBottomPos;
// A8CAFC: using guessed type bool GameFrameWork::ms_bRendererRecreated;
// B64768: using guessed type int PgWin::ms_iScreenLeftPos;
// B6476C: using guessed type int PgWin::ms_iScreenTopPos;

//----- (0045E0A0) --------------------------------------------------------
bool __thiscall MainApp::OnDefault(MainApp *this, NiEventRecord *pEventRecord)
{
  NiEventRecord *v2; // esi@1
  unsigned int v3; // eax@1
  MainApp *v4; // edi@1
  NiInputSystem *v5; // ecx@6
  struct NiInputMouse *v6; // ecx@7
  struct NiInputMouse *v7; // ecx@7
  MachineOpt::SoundOption *v8; // eax@12
  unsigned int v9; // esi@12
  int kOpt; // ST1C_4@12
  unsigned int kOpt_8; // ST24_4@12
  int kOpt_4; // ST20_4@12
  unsigned int kOpt_12; // ST28_4@12
  NiInputSystem *v14; // ecx@14
  bool result; // al@18
  unsigned int v16; // eax@19
  PgFrameWork *v17; // eax@24
  PgFrameWork *v18; // eax@29
  int v19; // ecx@38
  char *v20; // eax@44
  int v21; // ebx@46
  int v22; // eax@46
  tagPOINT point; // [sp+28h] [bp-110h]@1
  char acFilename[260]; // [sp+30h] [bp-108h]@26

  v2 = pEventRecord;
  v3 = pEventRecord->uiMsg;
  v4 = this;
  point.y = (int)pEventRecord;
  if ( v3 > 0x10F )
  {
    if ( v3 > 0x288 )
    {
      if ( v3 < 0x290 )
        return NiDX92DBufferData::Recreate((IDirect3DDevice9 *)v2);
      if ( v3 > 0x291 )
      {
        if ( v3 != 32769 || GameFrameWork::ms_bSpawnApps != 1 )
          return NiDX92DBufferData::Recreate((IDirect3DDevice9 *)v2);
        OutputDebugStringA("WM_APP_FULLSCREEN");
        if ( GameFrameWork::ms_bGameFrameStart )
        {
          v21 = GetSystemMetrics(0);
          v22 = GetSystemMetrics(1);
          MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = v21;
          MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = v22;
          MachineOpt::ms_kGraphicOption.bWindowFullMode = 1;
          MainApp::ReCreateRenderer(v4);
          v2 = (NiEventRecord *)point.y;
          return NiDX92DBufferData::Recreate((IDirect3DDevice9 *)v2);
        }
        MachineOpt::ms_kGraphicOption.bWindowFullMode = 0;
        v20 = (char *)TextData2::Get(0x170AE918u);
        MsgBox::Modal(MSGBOX_OK, v20);
        return 1;
      }
    }
    else if ( v3 != 648 )
    {
      if ( v3 == 512 )
      {
        if ( this->m_bFullscreen )
        {
          v19 = HIWORD(pEventRecord->lParam);
          point.x = LOWORD(pEventRecord->lParam);
          point.y = v19;
          ClientToScreen(g_hMainWnd, &point);
          Cursor::SetHardwareCursorPos(point.x, point.y);
        }
        return NiDX92DBufferData::Recreate((IDirect3DDevice9 *)v2);
      }
      if ( v3 <= 0x280 || v3 > 0x286 )
        return NiDX92DBufferData::Recreate((IDirect3DDevice9 *)v2);
    }
LABEL_35:
    if ( MainApp::OnIme(pEventRecord) != 1 )
      return NiDX92DBufferData::Recreate((IDirect3DDevice9 *)v2);
    return 1;
  }
  if ( v3 >= 0x10D )
    goto LABEL_35;
  switch ( v3 )
  {
    case 6u:
      if ( LOWORD(pEventRecord->wParam) )
      {
        if ( (unsigned int)LOWORD(pEventRecord->wParam) - 1 <= 1 )
        {
          v5 = this->m_spInputSystem.m_pObject;
          if ( v5 )
          {
            ((void (*)(void))v5->vfptr[8].__vecDelDtor)();
            v6 = g_pkMouse;
            g_pkMouse->m_akButtons[0].m_ucLastValue = g_pkMouse->m_akButtons[0].m_ucValue;
            v6->m_akButtons[0].m_bLastPressed = v6->m_akButtons[0].m_bPressed;
            v6->m_akButtons[0].m_uiLastModifiers = v6->m_akButtons[0].m_uiModifiers;
            *(_WORD *)&v6->m_akButtons[0].m_ucValue = 0;
            v6->m_akButtons[0].m_uiModifiers = 0;
            v6->m_uiModifiers &= 0xFFFFFFFE;
            v7 = g_pkMouse;
            g_pkMouse->m_akButtons[1].m_ucLastValue = g_pkMouse->m_akButtons[1].m_ucValue;
            v7->m_akButtons[1].m_bLastPressed = v7->m_akButtons[1].m_bPressed;
            v7->m_akButtons[1].m_uiLastModifiers = v7->m_akButtons[1].m_uiModifiers;
            *(_WORD *)&v7->m_akButtons[1].m_ucValue = 0;
            v7->m_akButtons[1].m_uiModifiers = 0;
            v7->m_uiModifiers &= 0xFFFFFFFD;
          }
          if ( EditWin::ms_pkCurEditWin )
            EditWin::Recover_focus((EditWin *)EditWin::ms_pkCurEditWin);
          if ( !m_bMinimize )
          {
            m_bMinimize = 1;
            SoundMgr::MuteSound(&g_kSoundMgr, 0);
            if ( SoundMgr::GetEnable(&g_kSoundMgr) )
            {
              v8 = MachineOpt::GetSoundOption();
              v9 = v8->uiEnvEffectVolume;
              kOpt = *(_DWORD *)&v8->kVersion.year;
              kOpt_8 = v8->uiMasterVolume;
              kOpt_4 = *(_DWORD *)&v8->kVersion.hour;
              kOpt_12 = v8->uiBgVolume;
              *(float *)&point.y = (double)v8->uiEffectVolume / 50.0;
              SoundMgr::SetEffectVolume(&g_kSoundMgr, *(float *)&point.y);
              *(float *)&point.y = (double)v9 / 50.0;
              SoundMgr::SetEnvEffectVolume(&g_kSoundMgr, *(float *)&point.y);
            }
            SoundMgr::SetAmbientVolumeSync(&g_kSoundMgr);
          }
        }
      }
      else
      {
        v14 = this->m_spInputSystem.m_pObject;
        if ( v14 )
          ((void (*)(void))v14->vfptr[8].__vecDelDtor)();
        if ( m_bMinimize == 1 )
        {
          m_bMinimize = 0;
          SoundMgr::MuteSound(&g_kSoundMgr, 1);
        }
      }
      goto $LN88_3;
    case 0x20u:
$LN88_3:
      SetCursor(0);
      Cursor::ShowCursor(1);
      return 1;
    case 0x104u:
      v16 = pEventRecord->wParam;
      if ( v16 != 121 && v16 != 18 )
        return NiDX92DBufferData::Recreate((IDirect3DDevice9 *)v2);
      return 1;
    case 0x101u:
      if ( pEventRecord->wParam != 44 )
        return NiDX92DBufferData::Recreate((IDirect3DDevice9 *)v2);
      if ( MachineOpt::ms_kGraphicOption.bScreenShotEnable )
      {
        ScreenShot(this->m_spRenderer.m_pObject, g_hMainWnd, acFilename, 260);
      }
      else
      {
        v17 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
        if ( v17 )
        {
          BYTE1(v17[142].vfptr) = 0;
          return 1;
        }
      }
      result = 1;
      break;
    case 0x10u:
      if ( !PgFrameMgr::IsInRun(&Pgg_kFrameMgr, GameFrameWorkID) )
        return NiDX92DBufferData::Recreate((IDirect3DDevice9 *)v2);
      v18 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      PgFrameWork::AddMsg(v18, 0x1Au, 0, 0);
      return 1;
    default:
      return NiDX92DBufferData::Recreate((IDirect3DDevice9 *)v2);
  }
  return result;
}
// A8C4A8: using guessed type struct NiInputMouse *g_pkMouse;
// A8CAFF: using guessed type bool GameFrameWork::ms_bGameFrameStart;
// A8CB04: using guessed type bool GameFrameWork::ms_bSpawnApps;

//----- (0045E600) --------------------------------------------------------
void __thiscall MainApp::ProcessCommandLine(MainApp *this)
{
  signed int v1; // eax@1
  char *v2; // esi@4
  char *v3; // edi@4
  char v4; // al@9
  char v5; // al@14
  char v6; // al@19
  char v7; // al@24
  MapInfo *v8; // eax@29
  char v9; // al@43
  MainApp *v10; // [sp+0h] [bp-18h]@1
  signed int i; // [sp+4h] [bp-14h]@1
  Name3 kMapName; // [sp+8h] [bp-10h]@29

  v1 = 1;
  v10 = this;
  i = 1;
  if ( __argc > 1 )
  {
    while ( 1 )
    {
      v2 = __argv[v1];
      v3 = __argv[v1 + 1];
      if ( !v2 || !*v2 )
        return;
      if ( !strcmp(__argv[v1], "-c") )
      {
        if ( v3 )
        {
          if ( *v3 )
          {
            v4 = CharClass::GetClassIDByEngName(v3);
            User::SetMainCharClass(&g_kUser, v4);
          }
        }
        i += 2;
      }
      else if ( !strcmp(v2, "-g") )
      {
        if ( v3 && *v3 )
        {
          v5 = atoi(v3);
          User::SetMainCharGender(&g_kUser, v5);
        }
        i += 2;
      }
      else if ( !strcmp(v2, "-h") )
      {
        if ( v3 && *v3 )
        {
          v6 = atoi(v3);
          User::SetMainCharHairType(&g_kUser, v6);
        }
        i += 2;
      }
      else if ( !strcmp(v2, "-face") )
      {
        if ( v3 && *v3 )
        {
          v7 = atoi(v3);
          User::SetMainCharFaceType(&g_kUser, v7);
        }
        i += 2;
      }
      else if ( !strcmp(v2, "-m") )
      {
        if ( v3 )
        {
          if ( *v3 )
          {
            *(_QWORD *)&kMapName.n3_code[1] = 0i64;
            kMapName.n3_code[0] = 0;
            strncpy(kMapName.n3_name, v3, 0xCu);
            User::SetMainCharLoginMapName(&g_kUser, &kMapName);
            v8 = MapInfoTab::GetByMapName(&kMapName);
            if ( v8 )
              User::SetMainCharLoginMapInitPos(&g_kUser, v8->RegenX, v8->RegenY);
          }
        }
        i += 2;
      }
      else
      {
        if ( !strcmp(v2, "-t") )
          goto LABEL_35;
        if ( !strcmp(v2, "-n") )
        {
          v10->m_kStartFrameWorkID = GameFrameWorkID;
LABEL_35:
          ++i;
          goto LABEL_36;
        }
        if ( !strcmp(v2, "-s") )
        {
          SoundMgr::Enable(&g_kSoundMgr, 0);
          goto LABEL_35;
        }
        if ( !strcmp(v2, "-a") )
        {
          if ( v3 && *v3 )
          {
            v9 = atoi(v3);
            User::SetSelectedAvatarSlot(&g_kUser, v9);
          }
          i += 2;
        }
        else
        {
          if ( strcmp(v2, "-app") )
            goto LABEL_35;
          if ( v3 && *v3 )
            SetWindowTextA(v10->m_pkAppWindow->m_pWnd, v3);
          i += 2;
        }
      }
LABEL_36:
      if ( i >= __argc )
        return;
      v1 = i;
    }
  }
}

//----- (0045E9C0) --------------------------------------------------------
void __thiscall MainApp::~MainApp(MainApp *this)
{
  MainApp *v1; // esi@1

  v1 = this;
  this->vfptr = (NiApplicationVtbl *)&MainApp::`vftable';
  if ( ChangeDisplaySettingsA(0, 0) )
    ChangeDisplaySettingsA(&v1->m_SaveMode, 1u);
  UninitWebCtrl();
  if ( v1->m_ProgressBarTexName._Myres >= 0x10 )
    operator delete(v1->m_ProgressBarTexName._Bx._Ptr);
  v1->m_ProgressBarTexName._Myres = 15;
  v1->m_ProgressBarTexName._Mysize = 0;
  v1->m_ProgressBarTexName._Bx._Buf[0] = 0;
  if ( v1->m_SplashTexName._Myres >= 0x10 )
    operator delete(v1->m_SplashTexName._Bx._Ptr);
  v1->m_SplashTexName._Myres = 15;
  v1->m_SplashTexName._Mysize = 0;
  v1->m_SplashTexName._Bx._Buf[0] = 0;
  PgImeCtrl::~PgImeCtrl(&v1->m_kImeCtrl);
  NiApplication::~NiApplication((NiApplication *)&v1->vfptr);
}
// 97C35C: using guessed type int (__thiscall *MainApp::`vftable')(void *p, char);

//----- (0045EAA0) --------------------------------------------------------
char __thiscall MainApp::InitGameData(MainApp *this)
{
  MainApp *v1; // ebx@1
  char *v2; // eax@3
  char *v4; // eax@8
  char *v5; // eax@12
  char *v6; // eax@16
  char *v7; // eax@20
  char *v8; // eax@22
  char *v9; // eax@22
  char *v10; // eax@24
  char *v11; // eax@24
  char *v12; // eax@26
  char *v13; // eax@26
  char *v14; // eax@28
  char *v15; // eax@28
  char *v16; // eax@30
  char *v17; // eax@30
  char *v18; // eax@32
  char *v19; // eax@32
  char *v20; // eax@34
  char *v21; // eax@34
  char *v22; // eax@36
  char *v23; // eax@36
  char *v24; // eax@38
  char *v25; // eax@38
  char *v26; // eax@40
  char *v27; // eax@40
  char *v28; // eax@42
  char *v29; // eax@42
  char *v30; // eax@44
  char *v31; // eax@44
  char *v32; // eax@46
  char *v33; // eax@46
  char *v34; // eax@48
  char *v35; // eax@48
  char *v36; // eax@50
  char *v37; // eax@50
  char *v38; // eax@52
  char *v39; // eax@52
  char *v40; // eax@54
  char *v41; // eax@54
  char *v42; // eax@56
  char *v43; // eax@56
  char *v44; // eax@58
  char *v45; // eax@58
  char *v46; // eax@60
  char *v47; // eax@60
  char *v48; // eax@62
  char *v49; // eax@62
  char *v50; // eax@64
  char *v51; // eax@64
  char *v52; // eax@66
  char *v53; // eax@66
  char *v54; // eax@68
  char *v55; // eax@68
  char *v56; // eax@70
  char *v57; // eax@70
  char *v58; // eax@72
  char *v59; // eax@72
  char *v60; // eax@74
  char *v61; // eax@74
  char *v62; // eax@76
  char *v63; // eax@76
  char *v64; // eax@79
  char *v65; // eax@79
  const char *v66; // ecx@82
  const char *v67; // eax@85
  const char *v68; // ecx@89
  const char *v69; // eax@92
  char *v70; // eax@94
  char *v71; // eax@94
  char *v72; // eax@96
  char *v73; // eax@96
  char *v74; // eax@98
  char *v75; // eax@98
  char *v76; // eax@100
  char *v77; // eax@100
  char *v78; // eax@102
  char *v79; // eax@102
  char *v80; // eax@105
  char *v81; // eax@105
  char *v82; // eax@107
  char *v83; // eax@107
  char *v84; // eax@109
  char *v85; // eax@109
  char *v86; // eax@111
  char *v87; // eax@111
  char *v88; // eax@113
  char *v89; // eax@113
  char *v90; // eax@115
  const char *v91; // eax@115
  char *v92; // eax@117
  char *v93; // eax@117
  char *v94; // eax@119
  char *v95; // eax@119
  char *v96; // eax@121
  char *v97; // eax@121
  char *v98; // eax@123
  char *v99; // eax@123
  char *v100; // eax@125
  char *v101; // eax@125
  char *v102; // eax@128
  char *v103; // eax@128
  char *v104; // eax@130
  char *v105; // eax@130
  const char *v106; // ecx@133
  const char *v107; // eax@136
  char *v108; // eax@138
  char *v109; // eax@138
  char *v110; // eax@140
  char *v111; // eax@140
  char *v112; // eax@142
  char *v113; // eax@142
  char *v114; // eax@144
  char *v115; // eax@144
  char *v116; // eax@146
  const char *v117; // eax@146
  char *v118; // eax@150
  char *v119; // eax@150
  char *v120; // eax@152
  char *v121; // eax@152
  char *v122; // eax@154
  char *v123; // eax@154
  char *v124; // eax@156
  char *v125; // eax@156
  char *v126; // eax@158
  char *v127; // eax@158
  char *v128; // eax@160
  char *v129; // eax@160
  char *v130; // eax@162
  char *v131; // eax@162
  char *v132; // eax@164
  char *v133; // eax@164
  char *v134; // eax@166
  char *v135; // eax@166
  char *v136; // eax@168
  char *v137; // eax@168
  char *v138; // eax@170
  char *v139; // eax@170
  char *v140; // eax@172
  char *v141; // eax@172
  char *v142; // eax@174
  char *v143; // eax@174
  char *v144; // eax@176
  char *v145; // eax@176
  char *v146; // eax@178
  char *v147; // eax@178
  char *v148; // eax@180
  char *v149; // eax@180
  char *v150; // eax@182
  char *v151; // eax@182
  char *v152; // eax@184
  char *v153; // eax@184
  char *v154; // eax@186
  char *v155; // eax@186
  char *v156; // eax@188
  char *v157; // eax@188
  char *v158; // eax@190
  char *v159; // eax@190
  char *v160; // eax@192
  char *v161; // eax@192
  char *v162; // eax@194
  char *v163; // eax@194
  char *v164; // eax@196
  char *v165; // eax@196
  char *v166; // eax@198
  char *v167; // eax@198
  char *v168; // eax@200
  char *v169; // eax@200
  char *v170; // eax@202
  char *v171; // eax@202
  char *v172; // eax@204
  char *v173; // eax@204
  char *v174; // eax@206
  char *v175; // eax@206
  char *v176; // eax@208
  char *v177; // eax@208
  char *v178; // eax@210
  char *v179; // eax@210
  char *v180; // eax@212
  char *v181; // eax@212
  char *v182; // eax@214
  char *v183; // eax@214
  char *v184; // eax@216
  char *v185; // eax@216
  char *v186; // eax@218
  char *v187; // eax@218
  char *v188; // eax@220
  char *v189; // eax@220
  char *v190; // eax@222
  char *v191; // eax@222
  char *v192; // eax@224
  char *v193; // eax@224
  char *v194; // eax@226
  char *v195; // eax@226
  char *v196; // eax@228
  char *v197; // eax@228
  char *v198; // eax@230
  char *v199; // eax@230
  char *v200; // eax@232
  char *v201; // eax@232
  char *v202; // eax@234
  char *v203; // eax@234
  char *v204; // eax@236
  char *v205; // eax@236
  char *v206; // eax@238
  char *v207; // eax@238
  char *v208; // eax@240
  const char *v209; // eax@240
  char *v210; // eax@242
  char *v211; // eax@242
  char *v212; // eax@244
  char *v213; // eax@244
  char *v214; // eax@246
  char *v215; // eax@246
  char *v216; // eax@248
  char *v217; // eax@248
  char *v218; // eax@250
  char *v219; // eax@250
  char *v220; // eax@252
  char *v221; // eax@252
  char *v222; // eax@254
  char *v223; // eax@254
  char *v224; // eax@256
  char *v225; // eax@256
  char *v226; // eax@258
  char *v227; // eax@258
  char *v228; // eax@260
  char *v229; // eax@260
  char *v230; // eax@262
  char *v231; // eax@262
  char *v232; // eax@264
  char *v233; // eax@264
  char *v234; // eax@266
  char *v235; // eax@266

  v1 = this;
  if ( !Folder::m_bInit )
    Folder::Init();
  v2 = Folder::Merge(&Folder::m_acSystem, "ClassName.shn");
  if ( !ITableBase<ClassName,CharClass>::Load(v2) )
  {
    MessageBoxA(0, "ClassName.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acSystem, "RaceNameInfo.shn");
  if ( !ITableBase<RaceName,CharRace>::Load(v4) )
  {
    MessageBoxA(0, "RaceNameInfo.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acSystem, "MobInfo.shn");
  if ( !ITableBase<MobInfo,MobInfoTab>::Load(v5) )
  {
    MessageBoxA(0, "MobInfo.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = Folder::Merge(&Folder::m_acSystem, "MobViewInfo.shn");
  if ( !ITableBase<MobViewInfo,MobViewInfoTab>::Load(v6) )
  {
    MessageBoxA(0, "MobViewInfo.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  if ( !Folder::m_bInit )
    Folder::Init();
  v7 = Folder::Merge(&Folder::m_acSystem, "NPCViewInfo.shn");
  if ( !ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::Load(v7) )
  {
    MessageBoxA(0, "NPCViewInfo.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v8 = Folder::System();
  v9 = Folder::Merge(v8, "Riding.shn");
  if ( !ITableBase<RIDING,RidePetTable>::Load(v9) )
  {
    MessageBoxA(0, "Riding.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v10 = Folder::System();
  v11 = Folder::Merge(v10, "MoverMain.shn");
  if ( !ITableBase<MoverMain,MoverMainTab>::Load(v11) )
  {
    MessageBoxA(0, "MoverMain.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v12 = Folder::System();
  v13 = Folder::Merge(v12, "MoverUseSkill.shn");
  if ( !ITableBase<MoverUseSkill,MoverUseSkillTab>::Load(v13) )
  {
    MessageBoxA(0, "MoverUseSkill.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v14 = Folder::System();
  v15 = Folder::Merge(v14, "MoverHG.shn");
  if ( !ITableBase<MoverHG,MoverHGTab>::Load(v15) )
  {
    MessageBoxA(0, "MoverHG.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v16 = Folder::System();
  v17 = Folder::Merge(v16, "MoverView.shn");
  if ( !ITableBase<MoverView,MoverViewTab>::Load(v17) )
  {
    MessageBoxA(0, "MoverView.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v18 = Folder::System();
  v19 = Folder::Merge(v18, "MoverSlotView.shn");
  if ( !ITableBase<MoverSlotView,MoverSlotViewTab>::Load(v19) )
  {
    MessageBoxA(0, "MoverSlotView.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v20 = Folder::System();
  v21 = Folder::Merge(v20, "MoverSlotCharAni.shn");
  if ( !ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::Load(v21) )
  {
    MessageBoxA(0, "MoverSlotCharAni.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v22 = Folder::System();
  v23 = Folder::Merge(v22, "MoverAbility.shn");
  if ( !ITableBase<MoverAbility,MoverAbilityTab>::Load(v23) )
  {
    MessageBoxA(0, "MoverAbility.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v24 = Folder::System();
  v25 = Folder::Merge(v24, "MoverItem.shn");
  if ( !ITableBase<MoverItem,MoverItemTab>::Load(v25) )
  {
    MessageBoxA(0, "MoverItem.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v26 = Folder::System();
  v27 = Folder::Merge(v26, "PupMain.shn");
  if ( !ITableBase<PupMain,PetMainTab>::Load(v27) )
  {
    MessageBoxA(0, "PupMain.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v28 = Folder::System();
  v29 = Folder::Merge(v28, "PupView.shn");
  if ( !ITableBase<PupView,PetViewTab>::Load(v29) )
  {
    MessageBoxA(0, "PupView.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v30 = Folder::System();
  v31 = Folder::Merge(v30, "MoverUpgradeEffect.shn");
  if ( !ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::Load(v31) )
  {
    MessageBoxA(0, "MoverUpgradeEffect.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v32 = Folder::System();
  v33 = Folder::Merge(v32, "MapInfo.shn");
  if ( !ITableBase<MapInfo,MapInfoTab>::Load(v33) )
  {
    MessageBoxA(0, "MapInfo.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v34 = Folder::System();
  v35 = Folder::Merge(v34, "MapViewInfo.shn");
  if ( !ITableBase<MapViewInfo,MapViewInfoTab>::Load(v35) )
  {
    MessageBoxA(0, "MapViewInfo.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v36 = Folder::System();
  v37 = Folder::Merge(v36, "MobCoordinate.shn");
  if ( !ITableBase<MobCoordinate,MobCoordinateTab>::Load(v37) )
  {
    MessageBoxA(0, "MobCoordinate.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v38 = Folder::System();
  v39 = Folder::Merge(v38, "ItemInfo.shn");
  if ( !ITableBase<ItemInfo,ItemInfoTab>::Load(v39) )
  {
    MessageBoxA(0, "ItemInfo.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  ItemInfoTab::BuildItemInfoMapByInxName();
  ItemInfoTab::GenerateCRCSum();
  v40 = Folder::System();
  v41 = Folder::Merge(v40, "ItemViewInfo.shn");
  if ( !ITableBase<ItemViewInfo,ItemViewInfoTab>::Load(v41) )
  {
    MessageBoxA(0, "ItemViewInfo.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v42 = Folder::System();
  v43 = Folder::Merge(v42, "ItemViewEquipTypeInfo.shn");
  if ( !ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::Load(v43) )
  {
    MessageBoxA(0, "ItemViewEquipTypeInfo.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v44 = Folder::System();
  v45 = Folder::Merge(v44, "ItemViewDummy.shn");
  if ( !ItemViewDummyTab::Load(v45) )
  {
    MessageBoxA(0, "ItemViewDummy.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v46 = Folder::System();
  v47 = Folder::Merge(v46, "ActiveSkillGroup.shn");
  if ( !ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::Load(v47) )
  {
    MessageBoxA(0, "ActiveSkillGroup.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v48 = Folder::System();
  v49 = Folder::Merge(v48, "ItemActionCondition.shn");
  if ( !ITableBase<ItemActionCondition,ItemActionConditionTab>::Load(v49) )
  {
    MessageBoxA(0, "ItemActionCondition.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v50 = Folder::System();
  v51 = Folder::Merge(v50, "ActionEffectItem.shn");
  if ( !ITableBase<ActionEffectItem,ActionEffectItemTab>::Load(v51) )
  {
    MessageBoxA(0, "ActionEffectItem.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v52 = Folder::System();
  v53 = Folder::Merge(v52, "ItemActionEffect.shn");
  if ( !ITableBase<ItemActionEffect,ItemActionEffectTab>::Load(v53) )
  {
    MessageBoxA(0, "ItemActionEffect.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v54 = Folder::System();
  v55 = Folder::Merge(v54, "SetEffect.shn");
  if ( !ITableBase<SetEffect,SetEffectTab>::Load(v55) )
  {
    MessageBoxA(0, "SetEffect.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v56 = Folder::System();
  v57 = Folder::Merge(v56, "ItemActionEffectDesc.shn");
  if ( !ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::Load(v57) )
  {
    MessageBoxA(0, "ItemActionEffectDesc.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v58 = Folder::System();
  v59 = Folder::Merge(v58, "SetItemName.shn");
  if ( !ITableBase<SetItemName,SetItemNameTab>::Load(v59) )
  {
    MessageBoxA(0, "SetItemName.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v60 = Folder::System();
  v61 = Folder::Merge(v60, "ItemAction.shn");
  if ( !ITableBase<ItemAction,ItemActionTab>::Load(v61) )
  {
    MessageBoxA(0, "ItemAction.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v62 = Folder::System();
  v63 = Folder::Merge(v62, "UpgradeInfo.shn");
  if ( !ITableBase<UpGradeInfo,UpGradeInfoTab>::Load(v63) )
  {
    MessageBoxA(0, "UpgradeInfo.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  if ( !Skill::Init() )
    return 0;
  v64 = Folder::System();
  v65 = Folder::Merge(v64, "ActionViewInfo.shn");
  if ( !ITableBase<ActionViewInfo,ActionViewTable>::Load(v65) )
  {
    MessageBoxA(0, "ActionViewInfo.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  if ( v1->m_ProgressBarTexName._Myres < 0x10 )
    v66 = v1->m_ProgressBarTexName._Bx._Buf;
  else
    v66 = v1->m_ProgressBarTexName._Bx._Ptr;
  if ( v1->m_SplashTexName._Myres < 0x10 )
    v67 = v1->m_SplashTexName._Bx._Buf;
  else
    v67 = v1->m_SplashTexName._Bx._Ptr;
  MainApp::DisplaySplash(v1, v67, v66, 40);
  if ( !ActionInfoTable::Init() )
    return 0;
  if ( v1->m_ProgressBarTexName._Myres < 0x10 )
    v68 = v1->m_ProgressBarTexName._Bx._Buf;
  else
    v68 = v1->m_ProgressBarTexName._Bx._Ptr;
  if ( v1->m_SplashTexName._Myres < 0x10 )
    v69 = v1->m_SplashTexName._Bx._Buf;
  else
    v69 = v1->m_SplashTexName._Bx._Ptr;
  MainApp::DisplaySplash(v1, v69, v68, 50);
  v70 = Folder::System();
  v71 = Folder::Merge(v70, "KingdomQuestDesc.shn");
  if ( !ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::Load(v71) )
  {
    MessageBoxA(0, "KingdomQuestDesc.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v72 = Folder::System();
  v73 = Folder::Merge(v72, "HairInfo.shn");
  if ( !ITableBase<HairInfo,HairInfoTab>::Load(v73) )
  {
    MessageBoxA(0, "HairInfo.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v74 = Folder::System();
  v75 = Folder::Merge(v74, "HairColorInfo.shn");
  if ( !ITableBase<HairColorInfo,HairColorInfoTab>::Load(v75) )
  {
    MessageBoxA(0, "HairColorInfo.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v76 = Folder::System();
  v77 = Folder::Merge(v76, "FaceInfo.shn");
  if ( !ITableBase<FaceInfo,FaceInfoTab>::Load(v77) )
  {
    MessageBoxA(0, "FaceInfo.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v78 = Folder::System();
  v79 = Folder::Merge(v78, "WeaponAttrib.shn");
  if ( !ITableBase<WeaponAttrib,WeaponAttribTab>::Load(v79) )
  {
    MessageBoxA(0, "WeaponAttrib.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  if ( !IconMgr::Init() )
    return 0;
  v80 = Folder::System();
  v81 = Folder::Merge(v80, "AbState.shn");
  if ( !ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::Load(v81) )
  {
    MessageBoxA(0, "AbState.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v82 = Folder::System();
  v83 = Folder::Merge(v82, "AbStateView.shn");
  if ( !ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::Load(v83) )
  {
    MessageBoxA(0, "AbStateView.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v84 = Folder::System();
  v85 = Folder::Merge(v84, "SubAbState.shn");
  if ( !ITableBase<SubAbStateInfo,SubAbStateInfoTab>::Load(v85) )
  {
    MessageBoxA(0, "SubAbState.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v86 = Folder::System();
  v87 = Folder::Merge(v86, "DamageSoundInfo.shn");
  if ( !ITableBase<DmgSndMapByArmorType,DmgSndTab>::Load(v87) )
  {
    MessageBoxA(0, "DamageSoundInfo.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v88 = Folder::System();
  v89 = Folder::Merge(v88, "WeaponTitleData.shn");
  if ( !WeaponTitleTab::Load(v89) )
  {
    MessageBoxA(0, "WeaponTitleData.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v90 = Folder::System();
  v91 = Folder::Merge(v90, "CharacterTitleData.shn");
  if ( !CCharacterTitleData::Read(&g_characterTitleData, v91, 0x998u, 0xACu) )
  {
    MessageBoxA(0, "CharacterTitleData.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v92 = Folder::System();
  v93 = Folder::Merge(v92, "Produce.shn");
  if ( !ITableBase<ProduceInfo,ProduceInfoTable>::Load(v93) )
  {
    MessageBoxA(0, "Produce.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  ProduceInfoTable::BuildMeterialMap();
  v94 = Folder::System();
  v95 = Folder::Merge(v94, "ProduceView.shn");
  if ( !ITableBase<ProduceViewInfo,ProduceViewInfoTable>::Load(v95) )
  {
    MessageBoxA(0, "ProduceView.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v96 = Folder::System();
  v97 = Folder::Merge(v96, "Gather.shn");
  if ( !ITableBase<GatherInfo,GatherInfoTable>::Load(v97) )
  {
    MessageBoxA(0, "Gather.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v98 = Folder::System();
  v99 = Folder::Merge(v98, "NpcDialogData.shn");
  if ( !ITableBase<NpcDialogData,NpcDialogDataTable>::Load(v99) )
  {
    MessageBoxA(0, "NpcDialogData.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v100 = Folder::System();
  v101 = Folder::Merge(v100, "GradeItemOption.shn");
  if ( !ITableBase<GradeItemOption,GradeItemOptionTab>::Load(v101) )
  {
    MessageBoxA(0, "GradeItemOption.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  if ( !ShortCutMgr::Init() )
    return 0;
  v102 = Folder::System();
  v103 = Folder::Merge(v102, "UpEffect.shn");
  if ( !ITableBase<UpEffectData,UpEffectTab>::Load(v103) )
  {
    MessageBoxA(0, "UpEffect.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v104 = Folder::System();
  v105 = Folder::Merge(v104, "ItemDismantle.shn");
  if ( !ITableBase<ItemDismantle,ItemDismantleTab>::Load(v105) )
  {
    MessageBoxA(0, "ItemDismantle.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  if ( v1->m_ProgressBarTexName._Myres < 0x10 )
    v106 = v1->m_ProgressBarTexName._Bx._Buf;
  else
    v106 = v1->m_ProgressBarTexName._Bx._Ptr;
  if ( v1->m_SplashTexName._Myres < 0x10 )
    v107 = v1->m_SplashTexName._Bx._Buf;
  else
    v107 = v1->m_SplashTexName._Bx._Ptr;
  MainApp::DisplaySplash(v1, v107, v106, 60);
  v108 = Folder::System();
  v109 = Folder::Merge(v108, "ColorInfo.shn");
  if ( !ITableBase<ColorInfoType,ColorInfoTable>::Load(v109) )
  {
    MessageBoxA(0, "ColorInfo.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v110 = Folder::System();
  v111 = Folder::Merge(v110, "MiniHouse.shn");
  if ( !ITableBase<MiniHouse,MiniHouseTable>::Load(v111) )
  {
    MessageBoxA(0, "MiniHouse.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v112 = Folder::System();
  v113 = Folder::Merge(v112, "ItemShopView.shn");
  if ( !ITableBase<ItemShopView,ItemShopViewTable>::Load(v113) )
  {
    MessageBoxA(0, "ItemShopView.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v114 = Folder::System();
  v115 = Folder::Merge(v114, "ChargedEffect.shn");
  if ( !ITableBase<ChargedItemEffect,ChargedEffectTable>::Load(v115) )
  {
    MessageBoxA(0, "ChargedEffect.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v116 = Folder::System();
  v117 = Folder::Merge(v116, "ItemMix.shn");
  if ( !ItemMixData::Read(&stru_A89C14, v117, 0x2Cu, 0x40u) )
  {
    MessageBoxA(0, "ItemMix.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  if ( !TextFilterTable::LoadSlanderFilter() )
  {
    MessageBoxA(0, "FilterSlander InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v118 = Folder::System();
  v119 = Folder::Merge(v118, "MiniHouseFurniture.shn");
  if ( !ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::Load(v119) )
  {
    MessageBoxA(0, "MiniHouseFurniture.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v120 = Folder::System();
  v121 = Folder::Merge(v120, "MiniHouseObjAni.shn");
  if ( !ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::Load(v121) )
  {
    MessageBoxA(0, "MiniHouseObjAni.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v122 = Folder::System();
  v123 = Folder::Merge(v122, "MiniHouseEndure.shn");
  if ( !ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::Load(v123) )
  {
    MessageBoxA(0, "MiniHouseEndure.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v124 = Folder::System();
  v125 = Folder::Merge(v124, "WorldMapAvatarInfo.shn");
  if ( !ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::Load(v125) )
  {
    MessageBoxA(0, "WorldMapAvatarInfo.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v126 = Folder::System();
  v127 = Folder::Merge(v126, "MiniHouseFurnitureObjEffect.shn");
  if ( !ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::Load(v127) )
  {
    MessageBoxA(0, "MiniHouseFurnitureObjEffect.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v128 = Folder::System();
  v129 = Folder::Merge(v128, "TownPortal.shn");
  if ( !ITableBase<TownPortal,TownPortalInfoTable>::Load(v129) )
  {
    MessageBoxA(0, "TownPortal.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v130 = Folder::System();
  v131 = Folder::Merge(v130, "EffectViewInfo.shn");
  if ( !ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::Load(v131) )
  {
    MessageBoxA(0, "EffectViewInfo.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v132 = Folder::System();
  v133 = Folder::Merge(v132, "GuildTournamentSkillDesc.shn");
  if ( !ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::Load(v133) )
  {
    MessageBoxA(0, "GuildTournamentStateDesc.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v134 = Folder::System();
  v135 = Folder::Merge(v134, "GuildTournamentSkill.shn");
  if ( !ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::Load(v135) )
  {
    MessageBoxA(0, "GuildTournamentState.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v136 = Folder::System();
  v137 = Folder::Merge(v136, "GuildTournamentRequire.shn");
  if ( !ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::Load(v137) )
  {
    MessageBoxA(0, "GuildTournamentRequire.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v138 = Folder::System();
  v139 = Folder::Merge(v138, "ActionEffectInfo.shn");
  if ( !ITableBase<ActionEffectInfo,ActionEffectInfoTab>::Load(v139) )
  {
    MessageBoxA(0, "ActionEffectInfo.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v140 = Folder::System();
  v141 = Folder::Merge(v140, "DiceDividind.shn");
  if ( !ITableBase<DICE_Dividind,DiceDividIndTab>::Load(v141) )
  {
    MessageBoxA(0, "DiceDividind.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v142 = Folder::System();
  v143 = Folder::Merge(v142, "MobRandomIdleAni.shn");
  if ( !ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::Load(v143) )
  {
    MessageBoxA(0, "MobRandomIdleAni.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v144 = Folder::System();
  v145 = Folder::Merge(v144, "GBHouse.shn");
  if ( !ITableBase<GBHouse,GBHouseTab>::Load(v145) )
  {
    MessageBoxA(0, "GBHouse.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v146 = Folder::System();
  v147 = Folder::Merge(v146, "GBDICEDividind.shn");
  if ( !ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::Load(v147) )
  {
    MessageBoxA(0, "GBDICEDividind.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v148 = Folder::System();
  v149 = Folder::Merge(v148, "CharacterTitleStateView.shn");
  if ( !ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::Load(v149) )
  {
    MessageBoxA(0, "CharacterTitleStateView.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v150 = Folder::System();
  v151 = Folder::Merge(v150, "MHEmotion.shn");
  if ( !ITableBase<MHEmotion,MiniHouseEmotionTab>::Load(v151) )
  {
    MessageBoxA(0, "MHEmotion.shn!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v152 = Folder::System();
  v153 = Folder::Merge(v152, "MobKillAnnounceText.shn");
  if ( !ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::Load(v153) )
  {
    MessageBoxA(0, "MobKillAnnounceText.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v154 = Folder::System();
  v155 = Folder::Merge(v154, "GTIView.shn");
  if ( !ITableBase<GTIView,GTIViewInfoTab>::Load(v155) )
  {
    MessageBoxA(0, "GTIView.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v156 = Folder::System();
  v157 = Folder::Merge(v156, "DamageEffect.shn");
  if ( !ITableBase<DamageEffect,DamageEffectTab>::Load(v157) )
  {
    MessageBoxA(0, "DamageEffect.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v158 = Folder::System();
  v159 = Folder::Merge(v158, "MapWayPoint.shn");
  if ( !ITableBase<MapWayPoint,MapWayPointTab>::Load(v159) )
  {
    MessageBoxA(0, "MapWayPoint.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v160 = Folder::System();
  v161 = Folder::Merge(v160, "MapLinkPoint.shn");
  if ( !ITableBase<MapLinkPoint,MapLinkPointTab>::Load(v161) )
  {
    MessageBoxA(0, "MapLinkPoint.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v162 = Folder::System();
  v163 = Folder::Merge(v162, "BasicInfoTitle.shn");
  if ( !ITableBase<BasicInfoTitle,BasicInfoTitleTab>::Load(v163) )
  {
    MessageBoxA(0, "BasicInfoTitle.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v164 = Folder::System();
  v165 = Folder::Merge(v164, "BasicInfoLink.shn");
  if ( !ITableBase<BasicInfoLink,BasicInfoLinkTab>::Load(v165) )
  {
    MessageBoxA(0, "BasicInfoLink.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v166 = Folder::System();
  v167 = Folder::Merge(v166, "BasicInfoTip.shn");
  if ( !ITableBase<BasicInfoTip,BasicInfoTipTab>::Load(v167) )
  {
    MessageBoxA(0, "BasicInfoTip.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v168 = Folder::System();
  v169 = Folder::Merge(v168, "BasicInfoTipCycle.shn");
  if ( !ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>::Load(v169) )
  {
    MessageBoxA(0, "BasicInfoTipCycle.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v170 = Folder::System();
  v171 = Folder::Merge(v170, "BasicInfoFind.shn");
  if ( !ITableBase<BasicInfoFind,BasicInfoFindTab>::Load(v171) )
  {
    MessageBoxA(0, "BasicInfoFind.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v172 = Folder::System();
  v173 = Folder::Merge(v172, "BasicInfoFindUI.shn");
  if ( !ITableBase<BasicInfoFindUI,BasicInfoFindUITab>::Load(v173) )
  {
    MessageBoxA(0, "BasicInfoFindUI.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v174 = Folder::System();
  v175 = Folder::Merge(v174, "BasicInfoFindWord.shn");
  if ( !ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::Load(v175) )
  {
    MessageBoxA(0, "BasicInfoFindWord.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v176 = Folder::System();
  v177 = Folder::Merge(v176, "BelongTypeInfo.shn");
  if ( !ITableBase<BelongTypeInfo,BelongTypeInfoTab>::Load(v177) )
  {
    MessageBoxA(0, "BelongTypeInfo.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v178 = Folder::System();
  v179 = Folder::Merge(v178, "ChargedIconItem.shn");
  if ( !ITableBase<ChargedIconItem,ChargedIconItemTab>::Load(v179) )
  {
    MessageBoxA(0, "ChargedIconItem.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v180 = Folder::System();
  v181 = Folder::Merge(v180, "ChargedMessageItem.shn");
  if ( !ITableBase<ChargedMessageItem,ChargedMsgItemTab>::Load(v181) )
  {
    MessageBoxA(0, "ChargedMessageItem.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v182 = Folder::System();
  v183 = Folder::Merge(v182, "ChargedDeletableBuff.shn");
  if ( !ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>::Load(v183) )
  {
    MessageBoxA(0, "ChargedDeletableBuff.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v184 = Folder::System();
  v185 = Folder::Merge(v184, "CollectCard.shn");
  if ( !ITableBase<CollectCard,CollectCardTab>::Load(v185) )
  {
    MessageBoxA(0, "CollectCard.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v186 = Folder::System();
  v187 = Folder::Merge(v186, "CollectCardView.shn");
  if ( !ITableBase<CollectCardView,CollectCardViewTab>::Load(v187) )
  {
    MessageBoxA(0, "CollectCardView.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v188 = Folder::System();
  v189 = Folder::Merge(v188, "CollectCardGroupDesc.shn");
  if ( !ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::Load(v189) )
  {
    MessageBoxA(0, "CollectCardGroupDesc.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v190 = Folder::System();
  v191 = Folder::Merge(v190, "CollectCardReward.shn");
  if ( !ITableBase<CollectCardReward,CollectCardRewardTab>::Load(v191) )
  {
    MessageBoxA(0, "CollectCardReward.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v192 = Folder::System();
  v193 = Folder::Merge(v192, "CollectCardTitle.shn");
  if ( !ITableBase<CollectCardTitle,CollectCardTitleTab>::Load(v193) )
  {
    MessageBoxA(0, "CollectCardTitle.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v194 = Folder::System();
  v195 = Folder::Merge(v194, "ScriptMsg.shn");
  if ( !ITableBase<ScriptMsg,ScriptMsgTab>::Load(v195) )
  {
    MessageBoxA(0, "ScriptMsg.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v196 = Folder::System();
  v197 = Folder::Merge(v196, "FaceCutMsg.shn");
  if ( !FaceCutMsgTab::Load(v197) )
  {
    MessageBoxA(0, "FaceCutMsg.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v198 = Folder::System();
  v199 = Folder::Merge(v198, "AttendReward.shn");
  if ( !ITableBase<AttendReward,AttendRewardTab>::Load(v199) )
  {
    MessageBoxA(0, "AttendReward.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v200 = Folder::System();
  v201 = Folder::Merge(v200, "KQVoteDesc.shn");
  if ( !ITableBase<KQVoteDesc,KQVoteDescTable>::Load(v201) )
  {
    MessageBoxA(0, "KQVoteDesc.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v202 = Folder::System();
  v203 = Folder::Merge(v202, "KQVoteMajorityRate.shn");
  if ( !ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::Load(v203) )
  {
    MessageBoxA(0, "KQVoteMajorityRate.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v204 = Folder::System();
  v205 = Folder::Merge(v204, "KQIsVote.shn");
  if ( !ITableBase<KQIsVote,KQIsVoteTable>::Load(v205) )
  {
    MessageBoxA(0, "KQIsVote.shn. InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v206 = Folder::System();
  v207 = Folder::Merge(v206, "KQTeam.shn");
  if ( !ITableBase<KQTeam,KQTeamTable>::Load(v207) )
  {
    MessageBoxA(0, "KQTeam.shn. InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v208 = Folder::System();
  v209 = Folder::Merge(v208, "SingleData.shn");
  if ( !CSingleDataMap::InitSingleDataArray(&g_kSingleDataMap, v209, 7u, 0x22u) )
  {
    MessageBoxA(0, "SingleData.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v210 = Folder::System();
  v211 = Folder::Merge(v210, "MobConditionView.shn");
  if ( !ITableBase<MobConditionView,MobConditionViewTab>::Load(v211) )
  {
    MessageBoxA(0, "MobConditionView.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v212 = Folder::System();
  v213 = Folder::Merge(v212, "MobNoFadeIn.shn");
  if ( !ITableBase<MobNoFadeIn,MobNoFadeInTab>::Load(v213) )
  {
    MessageBoxA(0, "MobNoFadeIn.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v214 = Folder::System();
  v215 = Folder::Merge(v214, "MarketSearchInfo.shn");
  if ( !ITableBase<MarketSearchInfo,MarketSearchInfoTab>::Load(v215) )
  {
    MessageBoxA(0, "MarketSearchInfo.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v216 = Folder::System();
  v217 = Folder::Merge(v216, "ChrCreateEquip.shn");
  if ( !ITableBase<ChrCreateEquip,ChrCreateEquipTab>::Load(v217) )
  {
    MessageBoxA(0, "ChrCreateEquip.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v218 = Folder::System();
  v219 = Folder::Merge(v218, "ItemMoney.shn");
  if ( !ITableBase<ItemMoney,ItemMoneyTab>::Load(v219) )
  {
    MessageBoxA(0, "ItemMoney.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v220 = Folder::System();
  v221 = Folder::Merge(v220, "ChatColor.shn");
  if ( !ITableBase<ChatColor,ChatColorTab>::Load(v221) )
  {
    MessageBoxA(0, "ChatColorTab.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v222 = Folder::System();
  v223 = Folder::Merge(v222, "TermExtendMatch.shn");
  if ( !ITableBase<TermExtendMatch,TermExtendMatchTable>::Load(v223) )
  {
    MessageBoxA(0, "TermExtendMatch.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v224 = Folder::System();
  v225 = Folder::Merge(v224, "TermExtendMatchGroupDesc.shn");
  if ( !ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>::Load(v225) )
  {
    MessageBoxA(0, "TermExtendMatchGroupDesc.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v226 = Folder::System();
  v227 = Folder::Merge(v226, "MinimonInfo.shn");
  if ( !ITableBase<MinimonInfo,MinimonInfoTable>::Load(v227) )
  {
    MessageBoxA(0, "MinimonInfo.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v228 = Folder::System();
  v229 = Folder::Merge(v228, "MinimonAutoUseItem.shn");
  if ( !ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>::Load(v229) )
  {
    MessageBoxA(0, "MinimonAutoUseItem.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v230 = Folder::System();
  v231 = Folder::Merge(v230, "UseClassTypeInfo.shn");
  if ( !ITableBase<UseClassTypeInfo,UseCalssTypeTable>::Load(v231) )
  {
    MessageBoxA(0, "UseClassTypeInfo.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v232 = Folder::System();
  v233 = Folder::Merge(v232, "ChrBasicEquip.shn");
  if ( !ITableBase<ChrBasicEquip,ChrBasicEquipTab>::Load(v233) )
  {
    MessageBoxA(0, "ChrBasicEquip.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  v234 = Folder::System();
  v235 = Folder::Merge(v234, "BRAccUpgradeInfo.shn");
  if ( !ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::Load(v235) )
  {
    MessageBoxA(0, "BRAccUpgradeInfo.shn InitError!!", "Application Initialize Error!", 0x10u);
    return 0;
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00460700) --------------------------------------------------------
void __thiscall Name3::Name3(Name3 *this, const char *str)
{
  *(_QWORD *)&this->n3_code[1] = 0i64;
  this->n3_code[0] = 0;
  strncpy((char *)this->n3_code, (char *)str, 0xCu);
}

//----- (00460730) --------------------------------------------------------
char __thiscall IIDTableBase<PassiveSkillInfo,PasSkillInfoTab,unsigned short>::DataProcess(IIDTableBase<SubAbStateInfo,SubAbStateInfoTab,unsigned short> *this)
{
  IIDTableBase<SubAbStateInfo,SubAbStateInfoTab,unsigned short> *v1; // esi@1
  unsigned int i; // edi@1
  CDataReader::HEAD *v3; // eax@2
  char *v4; // eax@4
  int v5; // eax@4
  char result; // al@8
  char *v7; // eax@11
  unsigned int j; // edi@11
  CDataReader::HEAD *v9; // eax@12
  char *v10; // eax@14
  unsigned __int16 iID; // ST1C_2@14
  int iMostLargeID; // [sp+10h] [bp-4h]@1

  v1 = this;
  iMostLargeID = -1;
  for ( i = 0; ; ++i )
  {
    v3 = v1->m_kDataReader.m_pHead;
    if ( !v3 || i >= v3->nNumOfRecord )
      break;
    v4 = CDataReader::GetRecord(&v1->m_kDataReader, i);
    v5 = (unsigned __int16)((int (__thiscall *)(_DWORD, _DWORD))v1->vfptr[1].BeforeTerminate)(v1, v4);
    if ( (unsigned __int16)v5 > iMostLargeID )
      iMostLargeID = v5;
  }
  if ( iMostLargeID >= 0 )
  {
    if ( v1->m_pkRecordIDMap )
      operator delete[](v1->m_pkRecordIDMap);
    v7 = (char *)operator new[](4 * (iMostLargeID + 1));
    v1->m_pkRecordIDMap = (SubAbStateInfo **)v7;
    memset(v7, 0, 4 * iMostLargeID + 4);
    for ( j = 0; ; ++j )
    {
      v9 = v1->m_kDataReader.m_pHead;
      if ( !v9 || j >= v9->nNumOfRecord )
        break;
      v10 = CDataReader::GetRecord(&v1->m_kDataReader, j);
      iID = ((int (__thiscall *)(_DWORD, _DWORD))v1->vfptr[1].BeforeTerminate)(v1, v10);
      v1->m_pkRecordIDMap[iID] = (SubAbStateInfo *)CDataReader::GetRecord(&v1->m_kDataReader, j);
    }
    v1->m_tMostLargeID = iMostLargeID;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00460840) --------------------------------------------------------
CharRace *__thiscall ITableBase<RaceName,CharRace>::`scalar deleting destructor'(CharRace *this, unsigned int a2)
{
  CharRace *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<RaceName,CharRace>Vtbl *)&ITableBase<RaceName,CharRace>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DCFC: using guessed type int (__cdecl *ITableBase<RaceName,CharRace>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004608C0) --------------------------------------------------------
ITableBase<MapInfo,MapInfoTab> *__thiscall ITableBase<MapInfo,MapInfoTab>::`scalar deleting destructor'(ITableBase<MapInfo,MapInfoTab> *this, unsigned int a2)
{
  ITableBase<MapInfo,MapInfoTab> *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MapInfo,MapInfoTab>Vtbl *)&ITableBase<MapInfo,MapInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DD0C: using guessed type int (__cdecl *ITableBase<MapInfo,MapInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00460940) --------------------------------------------------------
MapInfoTab *__thiscall MapInfoTab::`vector deleting destructor'(MapInfoTab *this, unsigned int a2)
{
  MapInfoTab *v2; // esi@1
  MapInfo **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pkRecordIDMap;
  this->vfptr = (ITableBase<MapInfo,MapInfoTab>Vtbl *)&IIDTableBase<MapInfo,MapInfoTab,unsigned short>::`vftable';
  operator delete[](v3);
  v2->vfptr = (ITableBase<MapInfo,MapInfoTab>Vtbl *)&ITableBase<MapInfo,MapInfoTab>::`vftable';
  CDataReader::ClearBF(&v2->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DD0C: using guessed type int (__cdecl *ITableBase<MapInfo,MapInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97DD1C: using guessed type int (__cdecl *IIDTableBase<MapInfo,MapInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004609D0) --------------------------------------------------------
ITableBase<MapViewInfo,MapViewInfoTab> *__thiscall ITableBase<MapViewInfo,MapViewInfoTab>::`vector deleting destructor'(ITableBase<MapViewInfo,MapViewInfoTab> *this, unsigned int a2)
{
  ITableBase<MapViewInfo,MapViewInfoTab> *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MapViewInfo,MapViewInfoTab>Vtbl *)&ITableBase<MapViewInfo,MapViewInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DD34: using guessed type int (__cdecl *ITableBase<MapViewInfo,MapViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00460A50) --------------------------------------------------------
ITableBase<UpGradeInfo,UpGradeInfoTab> *__thiscall ITableBase<UpGradeInfo,UpGradeInfoTab>::`scalar deleting destructor'(ITableBase<UpGradeInfo,UpGradeInfoTab> *this, unsigned int a2)
{
  ITableBase<UpGradeInfo,UpGradeInfoTab> *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<UpGradeInfo,UpGradeInfoTab>Vtbl *)&ITableBase<UpGradeInfo,UpGradeInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DD5C: using guessed type int (__cdecl *ITableBase<UpGradeInfo,UpGradeInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00460AD0) --------------------------------------------------------
UpGradeInfoTab *__thiscall IIDTableBase<UpGradeInfo,UpGradeInfoTab,unsigned short>::`scalar deleting destructor'(UpGradeInfoTab *this, unsigned int a2)
{
  UpGradeInfoTab *v2; // esi@1
  UpGradeInfo **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pkRecordIDMap;
  this->vfptr = (ITableBase<UpGradeInfo,UpGradeInfoTab>Vtbl *)&IIDTableBase<UpGradeInfo,UpGradeInfoTab,unsigned short>::`vftable';
  operator delete[](v3);
  v2->vfptr = (ITableBase<UpGradeInfo,UpGradeInfoTab>Vtbl *)&ITableBase<UpGradeInfo,UpGradeInfoTab>::`vftable';
  CDataReader::ClearBF(&v2->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DD5C: using guessed type int (__cdecl *ITableBase<UpGradeInfo,UpGradeInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97DD6C: using guessed type int (__cdecl *IIDTableBase<UpGradeInfo,UpGradeInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00460B60) --------------------------------------------------------
ITableBase<ActionViewInfo,ActionViewTable> *__thiscall ITableBase<ActionViewInfo,ActionViewTable>::`scalar deleting destructor'(ITableBase<ActionViewInfo,ActionViewTable> *this, unsigned int a2)
{
  ITableBase<ActionViewInfo,ActionViewTable> *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ActionViewInfo,ActionViewTable>Vtbl *)&ITableBase<ActionViewInfo,ActionViewTable>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DDA4: using guessed type int (__cdecl *ITableBase<ActionViewInfo,ActionViewTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00460BE0) --------------------------------------------------------
ActionViewTable *__thiscall ActionViewTable::`scalar deleting destructor'(ActionViewTable *this, unsigned int a2)
{
  ActionViewTable *v2; // esi@1
  ActionViewInfo **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pkRecordIDMap;
  this->vfptr = (ITableBase<ActionViewInfo,ActionViewTable>Vtbl *)&IIDTableBase<ActionViewInfo,ActionViewTable,unsigned short>::`vftable';
  operator delete[](v3);
  v2->vfptr = (ITableBase<ActionViewInfo,ActionViewTable>Vtbl *)&ITableBase<ActionViewInfo,ActionViewTable>::`vftable';
  CDataReader::ClearBF(&v2->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DDA4: using guessed type int (__cdecl *ITableBase<ActionViewInfo,ActionViewTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97DDB4: using guessed type int (__cdecl *IIDTableBase<ActionViewInfo,ActionViewTable,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00460C70) --------------------------------------------------------
ProduceInfoTable *__thiscall ITableBase<ProduceInfo,ProduceInfoTable>::`scalar deleting destructor'(ProduceInfoTable *this, unsigned int a2)
{
  ProduceInfoTable *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ProduceInfo,ProduceInfoTable>Vtbl *)&ITableBase<ProduceInfo,ProduceInfoTable>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DDCC: using guessed type int (__cdecl *ITableBase<ProduceInfo,ProduceInfoTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00460CF0) --------------------------------------------------------
ProduceViewInfoTable *__thiscall ProduceViewInfoTable::`vector deleting destructor'(ProduceViewInfoTable *this, unsigned int a2)
{
  ProduceViewInfoTable *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ProduceViewInfo,ProduceViewInfoTable>Vtbl *)&ITableBase<ProduceViewInfo,ProduceViewInfoTable>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DDFC: using guessed type int (__cdecl *ITableBase<ProduceViewInfo,ProduceViewInfoTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00460D70) --------------------------------------------------------
NpcDialogDataTable *__thiscall NpcDialogDataTable::`scalar deleting destructor'(NpcDialogDataTable *this, unsigned int a2)
{
  NpcDialogDataTable *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<NpcDialogData,NpcDialogDataTable>Vtbl *)&ITableBase<NpcDialogData,NpcDialogDataTable>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DE0C: using guessed type int (__cdecl *ITableBase<NpcDialogData,NpcDialogDataTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00460DF0) --------------------------------------------------------
GradeItemOptionTab *__thiscall GradeItemOptionTab::`scalar deleting destructor'(GradeItemOptionTab *this, unsigned int a2)
{
  GradeItemOptionTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<GradeItemOption,GradeItemOptionTab>Vtbl *)&ITableBase<GradeItemOption,GradeItemOptionTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DE1C: using guessed type int (__cdecl *ITableBase<GradeItemOption,GradeItemOptionTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00460E70) --------------------------------------------------------
MiniHouseTable *__thiscall ITableBase<MiniHouse,MiniHouseTable>::`scalar deleting destructor'(MiniHouseTable *this, unsigned int a2)
{
  MiniHouseTable *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MiniHouse,MiniHouseTable>Vtbl *)&ITableBase<MiniHouse,MiniHouseTable>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DE2C: using guessed type int (__cdecl *ITableBase<MiniHouse,MiniHouseTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00460EF0) --------------------------------------------------------
ItemShopViewTable *__thiscall ItemShopViewTable::`vector deleting destructor'(ItemShopViewTable *this, unsigned int a2)
{
  ItemShopViewTable *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ItemShopView,ItemShopViewTable>Vtbl *)&ITableBase<ItemShopView,ItemShopViewTable>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DE3C: using guessed type int (__cdecl *ITableBase<ItemShopView,ItemShopViewTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00460F70) --------------------------------------------------------
ITableBase<RIDING,RidePetTable> *__thiscall ITableBase<RIDING,RidePetTable>::`vector deleting destructor'(ITableBase<RIDING,RidePetTable> *this, unsigned int a2)
{
  ITableBase<RIDING,RidePetTable> *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<RIDING,RidePetTable>Vtbl *)&ITableBase<RIDING,RidePetTable>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DE4C: using guessed type int (__cdecl *ITableBase<RIDING,RidePetTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00460FF0) --------------------------------------------------------
WorldMapAvatarInfoTab *__thiscall WorldMapAvatarInfoTab::`vector deleting destructor'(WorldMapAvatarInfoTab *this, unsigned int a2)
{
  WorldMapAvatarInfoTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>Vtbl *)&ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DE84: using guessed type int (__cdecl *ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00461070) --------------------------------------------------------
ActionEffectItemTab *__thiscall ActionEffectItemTab::`scalar deleting destructor'(ActionEffectItemTab *this, unsigned int a2)
{
  ActionEffectItemTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ActionEffectItem,ActionEffectItemTab>Vtbl *)&ITableBase<ActionEffectItem,ActionEffectItemTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DEE4: using guessed type int (__cdecl *ITableBase<ActionEffectItem,ActionEffectItemTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004610F0) --------------------------------------------------------
ItemActionTab *__thiscall ITableBase<ItemAction,ItemActionTab>::`vector deleting destructor'(ItemActionTab *this, unsigned int a2)
{
  ItemActionTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ItemAction,ItemActionTab>Vtbl *)&ITableBase<ItemAction,ItemActionTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DEF4: using guessed type int (__cdecl *ITableBase<ItemAction,ItemActionTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00461170) --------------------------------------------------------
ItemActionEffectTab *__thiscall ItemActionEffectTab::`scalar deleting destructor'(ItemActionEffectTab *this, unsigned int a2)
{
  ItemActionEffectTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ItemActionEffect,ItemActionEffectTab>Vtbl *)&ITableBase<ItemActionEffect,ItemActionEffectTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DF04: using guessed type int (__cdecl *ITableBase<ItemActionEffect,ItemActionEffectTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004611F0) --------------------------------------------------------
ItemActionConditionTab *__thiscall ItemActionConditionTab::`scalar deleting destructor'(ItemActionConditionTab *this, unsigned int a2)
{
  ItemActionConditionTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ItemActionCondition,ItemActionConditionTab>Vtbl *)&ITableBase<ItemActionCondition,ItemActionConditionTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DF14: using guessed type int (__cdecl *ITableBase<ItemActionCondition,ItemActionConditionTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00461270) --------------------------------------------------------
GBHouseTab *__thiscall GBHouseTab::`scalar deleting destructor'(GBHouseTab *this, unsigned int a2)
{
  GBHouseTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<GBHouse,GBHouseTab>Vtbl *)&ITableBase<GBHouse,GBHouseTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DF74: using guessed type int (__cdecl *ITableBase<GBHouse,GBHouseTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004612F0) --------------------------------------------------------
CharacterTitleStateViewTab *__thiscall CharacterTitleStateViewTab::`vector deleting destructor'(CharacterTitleStateViewTab *this, unsigned int a2)
{
  CharacterTitleStateViewTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>Vtbl *)&ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DF94: using guessed type int (__cdecl *ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00461370) --------------------------------------------------------
ITableBase<MobCoordinate,MobCoordinateTab> *__thiscall ITableBase<MobCoordinate,MobCoordinateTab>::`vector deleting destructor'(ITableBase<MobCoordinate,MobCoordinateTab> *this, unsigned int a2)
{
  ITableBase<MobCoordinate,MobCoordinateTab> *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MobCoordinate,MobCoordinateTab>Vtbl *)&ITableBase<MobCoordinate,MobCoordinateTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DFA4: using guessed type int (__cdecl *ITableBase<MobCoordinate,MobCoordinateTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004613F0) --------------------------------------------------------
ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab> *__thiscall ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::`scalar deleting destructor'(ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab> *this, unsigned int a2)
{
  ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab> *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>Vtbl *)&ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DFCC: using guessed type int (__cdecl *ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00461470) --------------------------------------------------------
GTIViewInfoTab *__thiscall ITableBase<GTIView,GTIViewInfoTab>::`vector deleting destructor'(GTIViewInfoTab *this, unsigned int a2)
{
  GTIViewInfoTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<GTIView,GTIViewInfoTab>Vtbl *)&ITableBase<GTIView,GTIViewInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DFF4: using guessed type int (__cdecl *ITableBase<GTIView,GTIViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004614F0) --------------------------------------------------------
MapWayPointTab *__thiscall MapWayPointTab::`vector deleting destructor'(MapWayPointTab *this, unsigned int a2)
{
  MapWayPointTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MapWayPoint,MapWayPointTab>Vtbl *)&ITableBase<MapWayPoint,MapWayPointTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E024: using guessed type int (__cdecl *ITableBase<MapWayPoint,MapWayPointTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00461570) --------------------------------------------------------
MapLinkPointTab *__thiscall ITableBase<MapLinkPoint,MapLinkPointTab>::`vector deleting destructor'(MapLinkPointTab *this, unsigned int a2)
{
  MapLinkPointTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MapLinkPoint,MapLinkPointTab>Vtbl *)&ITableBase<MapLinkPoint,MapLinkPointTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E034: using guessed type int (__cdecl *ITableBase<MapLinkPoint,MapLinkPointTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004615F0) --------------------------------------------------------
BelongTypeInfoTab *__thiscall ITableBase<BelongTypeInfo,BelongTypeInfoTab>::`vector deleting destructor'(BelongTypeInfoTab *this, unsigned int a2)
{
  BelongTypeInfoTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<BelongTypeInfo,BelongTypeInfoTab>Vtbl *)&ITableBase<BelongTypeInfo,BelongTypeInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E044: using guessed type int (__cdecl *ITableBase<BelongTypeInfo,BelongTypeInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00461670) --------------------------------------------------------
ITableBase<ChargedIconItem,ChargedIconItemTab> *__thiscall ITableBase<ChargedIconItem,ChargedIconItemTab>::`scalar deleting destructor'(ITableBase<ChargedIconItem,ChargedIconItemTab> *this, unsigned int a2)
{
  ITableBase<ChargedIconItem,ChargedIconItemTab> *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ChargedIconItem,ChargedIconItemTab>Vtbl *)&ITableBase<ChargedIconItem,ChargedIconItemTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E054: using guessed type int (__cdecl *ITableBase<ChargedIconItem,ChargedIconItemTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004616F0) --------------------------------------------------------
ITableBase<ChargedMessageItem,ChargedMsgItemTab> *__thiscall ITableBase<ChargedMessageItem,ChargedMsgItemTab>::`vector deleting destructor'(ITableBase<ChargedMessageItem,ChargedMsgItemTab> *this, unsigned int a2)
{
  ITableBase<ChargedMessageItem,ChargedMsgItemTab> *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ChargedMessageItem,ChargedMsgItemTab>Vtbl *)&ITableBase<ChargedMessageItem,ChargedMsgItemTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E07C: using guessed type int (__cdecl *ITableBase<ChargedMessageItem,ChargedMsgItemTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00461770) --------------------------------------------------------
ChargedMsgItemTab *__thiscall IIDTableBase<ChargedMessageItem,ChargedMsgItemTab,unsigned short>::`scalar deleting destructor'(ChargedMsgItemTab *this, unsigned int a2)
{
  ChargedMsgItemTab *v2; // esi@1
  ChargedMessageItem **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pkRecordIDMap;
  this->vfptr = (ITableBase<ChargedMessageItem,ChargedMsgItemTab>Vtbl *)&IIDTableBase<ChargedMessageItem,ChargedMsgItemTab,unsigned short>::`vftable';
  operator delete[](v3);
  v2->vfptr = (ITableBase<ChargedMessageItem,ChargedMsgItemTab>Vtbl *)&ITableBase<ChargedMessageItem,ChargedMsgItemTab>::`vftable';
  CDataReader::ClearBF(&v2->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E07C: using guessed type int (__cdecl *ITableBase<ChargedMessageItem,ChargedMsgItemTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E08C: using guessed type int (__cdecl *IIDTableBase<ChargedMessageItem,ChargedMsgItemTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00461800) --------------------------------------------------------
BasicInfoTipTab *__thiscall ITableBase<BasicInfoTip,BasicInfoTipTab>::`scalar deleting destructor'(BasicInfoTipTab *this, unsigned int a2)
{
  BasicInfoTipTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<BasicInfoTip,BasicInfoTipTab>Vtbl *)&ITableBase<BasicInfoTip,BasicInfoTipTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E0D4: using guessed type int (__cdecl *ITableBase<BasicInfoTip,BasicInfoTipTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00461880) --------------------------------------------------------
BasicInfoTipCycleTab *__thiscall ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>::`vector deleting destructor'(BasicInfoTipCycleTab *this, unsigned int a2)
{
  BasicInfoTipCycleTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>Vtbl *)&ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E0E4: using guessed type int (__cdecl *ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00461900) --------------------------------------------------------
BasicInfoFindUITab *__thiscall BasicInfoFindUITab::`vector deleting destructor'(BasicInfoFindUITab *this, unsigned int a2)
{
  BasicInfoFindUITab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<BasicInfoFindUI,BasicInfoFindUITab>Vtbl *)&ITableBase<BasicInfoFindUI,BasicInfoFindUITab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E104: using guessed type int (__cdecl *ITableBase<BasicInfoFindUI,BasicInfoFindUITab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00461980) --------------------------------------------------------
CollectCardRewardTab *__thiscall ITableBase<CollectCardReward,CollectCardRewardTab>::`vector deleting destructor'(CollectCardRewardTab *this, unsigned int a2)
{
  CollectCardRewardTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<CollectCardReward,CollectCardRewardTab>Vtbl *)&ITableBase<CollectCardReward,CollectCardRewardTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E154: using guessed type int (__cdecl *ITableBase<CollectCardReward,CollectCardRewardTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00461A00) --------------------------------------------------------
ITableBase<AttendReward,AttendRewardTab> *__thiscall ITableBase<AttendReward,AttendRewardTab>::`vector deleting destructor'(ITableBase<AttendReward,AttendRewardTab> *this, unsigned int a2)
{
  ITableBase<AttendReward,AttendRewardTab> *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<AttendReward,AttendRewardTab>Vtbl *)&ITableBase<AttendReward,AttendRewardTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E174: using guessed type int (__cdecl *ITableBase<AttendReward,AttendRewardTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00461A80) --------------------------------------------------------
AttendRewardTab *__thiscall IIDTableBase<AttendReward,AttendRewardTab,unsigned short>::`scalar deleting destructor'(AttendRewardTab *this, unsigned int a2)
{
  AttendRewardTab *v2; // esi@1
  AttendReward **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pkRecordIDMap;
  this->vfptr = (ITableBase<AttendReward,AttendRewardTab>Vtbl *)&IIDTableBase<AttendReward,AttendRewardTab,unsigned short>::`vftable';
  operator delete[](v3);
  v2->vfptr = (ITableBase<AttendReward,AttendRewardTab>Vtbl *)&ITableBase<AttendReward,AttendRewardTab>::`vftable';
  CDataReader::ClearBF(&v2->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E174: using guessed type int (__cdecl *ITableBase<AttendReward,AttendRewardTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E184: using guessed type int (__cdecl *IIDTableBase<AttendReward,AttendRewardTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00461B10) --------------------------------------------------------
MoverMainTab *__thiscall MoverMainTab::`scalar deleting destructor'(MoverMainTab *this, unsigned int a2)
{
  MoverMainTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MoverMain,MoverMainTab>Vtbl *)&ITableBase<MoverMain,MoverMainTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E19C: using guessed type int (__cdecl *ITableBase<MoverMain,MoverMainTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00461B90) --------------------------------------------------------
MoverHGTab *__thiscall ITableBase<MoverHG,MoverHGTab>::`vector deleting destructor'(MoverHGTab *this, unsigned int a2)
{
  MoverHGTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MoverHG,MoverHGTab>Vtbl *)&ITableBase<MoverHG,MoverHGTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E1BC: using guessed type int (__cdecl *ITableBase<MoverHG,MoverHGTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00461C10) --------------------------------------------------------
MoverViewTab *__thiscall MoverViewTab::`vector deleting destructor'(MoverViewTab *this, unsigned int a2)
{
  MoverViewTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MoverView,MoverViewTab>Vtbl *)&ITableBase<MoverView,MoverViewTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E1CC: using guessed type int (__cdecl *ITableBase<MoverView,MoverViewTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00461C90) --------------------------------------------------------
MoverAbilityTab *__thiscall ITableBase<MoverAbility,MoverAbilityTab>::`scalar deleting destructor'(MoverAbilityTab *this, unsigned int a2)
{
  MoverAbilityTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MoverAbility,MoverAbilityTab>Vtbl *)&ITableBase<MoverAbility,MoverAbilityTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E1FC: using guessed type int (__cdecl *ITableBase<MoverAbility,MoverAbilityTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00461D10) --------------------------------------------------------
PetViewTab *__thiscall PetViewTab::`scalar deleting destructor'(PetViewTab *this, unsigned int a2)
{
  PetViewTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<PupView,PetViewTab>Vtbl *)&ITableBase<PupView,PetViewTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E22C: using guessed type int (__cdecl *ITableBase<PupView,PetViewTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00461D90) --------------------------------------------------------
KQVoteMajorityRateTable *__thiscall ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::`vector deleting destructor'(KQVoteMajorityRateTable *this, unsigned int a2)
{
  KQVoteMajorityRateTable *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>Vtbl *)&ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E24C: using guessed type int (__cdecl *ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00461E10) --------------------------------------------------------
MobConditionViewTab *__thiscall MobConditionViewTab::`vector deleting destructor'(MobConditionViewTab *this, unsigned int a2)
{
  MobConditionViewTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MobConditionView,MobConditionViewTab>Vtbl *)&ITableBase<MobConditionView,MobConditionViewTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E27C: using guessed type int (__cdecl *ITableBase<MobConditionView,MobConditionViewTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00461E90) --------------------------------------------------------
MarketSearchInfoTab *__thiscall MarketSearchInfoTab::`scalar deleting destructor'(MarketSearchInfoTab *this, unsigned int a2)
{
  MarketSearchInfoTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MarketSearchInfo,MarketSearchInfoTab>Vtbl *)&ITableBase<MarketSearchInfo,MarketSearchInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E29C: using guessed type int (__cdecl *ITableBase<MarketSearchInfo,MarketSearchInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00461F10) --------------------------------------------------------
TermExtendMatchGroupDescTable *__thiscall ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>::`scalar deleting destructor'(TermExtendMatchGroupDescTable *this, unsigned int a2)
{
  TermExtendMatchGroupDescTable *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>Vtbl *)&ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E2EC: using guessed type int (__cdecl *ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00461F90) --------------------------------------------------------
MinimonInfoTable *__thiscall MinimonInfoTable::`scalar deleting destructor'(MinimonInfoTable *this, unsigned int a2)
{
  MinimonInfoTable *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MinimonInfo,MinimonInfoTable>Vtbl *)&ITableBase<MinimonInfo,MinimonInfoTable>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E2FC: using guessed type int (__cdecl *ITableBase<MinimonInfo,MinimonInfoTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00462010) --------------------------------------------------------
MinimonAutoUseItemTable *__thiscall MinimonAutoUseItemTable::`scalar deleting destructor'(MinimonAutoUseItemTable *this, unsigned int a2)
{
  MinimonAutoUseItemTable *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>Vtbl *)&ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E30C: using guessed type int (__cdecl *ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00462090) --------------------------------------------------------
ChrBasicEquipTab *__thiscall ChrBasicEquipTab::`vector deleting destructor'(ChrBasicEquipTab *this, unsigned int a2)
{
  ChrBasicEquipTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ChrBasicEquip,ChrBasicEquipTab>Vtbl *)&ITableBase<ChrBasicEquip,ChrBasicEquipTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E33C: using guessed type int (__cdecl *ITableBase<ChrBasicEquip,ChrBasicEquipTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00462110) --------------------------------------------------------
ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab> *__thiscall ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::`vector deleting destructor'(ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab> *this, unsigned int a2)
{
  ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab> *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>Vtbl *)&ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E34C: using guessed type int (__cdecl *ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00462190) --------------------------------------------------------
bool __stdcall IIDTableBase<ActiveSkillViewInfo,ActSkillViewInfoTab,unsigned short>::IsValidID(unsigned __int16 ID)
{
  return ID != -1;
}

//----- (004621B0) --------------------------------------------------------
ColorInfoTable *__thiscall ITableBase<ColorInfoType,ColorInfoTable>::`scalar deleting destructor'(ColorInfoTable *this, unsigned int a2)
{
  ColorInfoTable *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ColorInfoType,ColorInfoTable>Vtbl *)&ITableBase<ColorInfoType,ColorInfoTable>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E374: using guessed type int (__cdecl *ITableBase<ColorInfoType,ColorInfoTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00462230) --------------------------------------------------------
ITableBase<ItemInfo,ItemInfoTab> *__thiscall ITableBase<ItemInfo,ItemInfoTab>::`vector deleting destructor'(ITableBase<ItemInfo,ItemInfoTab> *this, unsigned int a2)
{
  ITableBase<ItemInfo,ItemInfoTab> *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ItemInfo,ItemInfoTab>Vtbl *)&ITableBase<ItemInfo,ItemInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E384: using guessed type int (__cdecl *ITableBase<ItemInfo,ItemInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004622B0) --------------------------------------------------------
ItemInfoTab *__thiscall IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::`scalar deleting destructor'(ItemInfoTab *this, unsigned int a2)
{
  ItemInfoTab *v2; // esi@1
  ItemInfo **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pkRecordIDMap;
  this->vfptr = (ITableBase<ItemInfo,ItemInfoTab>Vtbl *)&IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::`vftable';
  operator delete[](v3);
  v2->vfptr = (ITableBase<ItemInfo,ItemInfoTab>Vtbl *)&ITableBase<ItemInfo,ItemInfoTab>::`vftable';
  CDataReader::ClearBF(&v2->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E384: using guessed type int (__cdecl *ITableBase<ItemInfo,ItemInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E394: using guessed type int (__cdecl *IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00462340) --------------------------------------------------------
ITableBase<ItemViewInfo,ItemViewInfoTab> *__thiscall ITableBase<ItemViewInfo,ItemViewInfoTab>::`scalar deleting destructor'(ITableBase<ItemViewInfo,ItemViewInfoTab> *this, unsigned int a2)
{
  ITableBase<ItemViewInfo,ItemViewInfoTab> *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ItemViewInfo,ItemViewInfoTab>Vtbl *)&ITableBase<ItemViewInfo,ItemViewInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E3AC: using guessed type int (__cdecl *ITableBase<ItemViewInfo,ItemViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004623C0) --------------------------------------------------------
ItemViewInfoTab *__thiscall ItemViewInfoTab::`vector deleting destructor'(ItemViewInfoTab *this, unsigned int a2)
{
  ItemViewInfoTab *v2; // esi@1
  ItemViewInfo **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pkRecordIDMap;
  this->vfptr = (ITableBase<ItemViewInfo,ItemViewInfoTab>Vtbl *)&IIDTableBase<ItemViewInfo,ItemViewInfoTab,unsigned short>::`vftable';
  operator delete[](v3);
  v2->vfptr = (ITableBase<ItemViewInfo,ItemViewInfoTab>Vtbl *)&ITableBase<ItemViewInfo,ItemViewInfoTab>::`vftable';
  CDataReader::ClearBF(&v2->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E3AC: using guessed type int (__cdecl *ITableBase<ItemViewInfo,ItemViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E3BC: using guessed type int (__cdecl *IIDTableBase<ItemViewInfo,ItemViewInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00462450) --------------------------------------------------------
ItemViewEquipTypeInfoTab *__thiscall ItemViewEquipTypeInfoTab::`scalar deleting destructor'(ItemViewEquipTypeInfoTab *this, unsigned int a2)
{
  ItemViewEquipTypeInfoTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>Vtbl *)&ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E3D4: using guessed type int (__cdecl *ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004624D0) --------------------------------------------------------
ItemMoneyTab *__thiscall ITableBase<ItemMoney,ItemMoneyTab>::`vector deleting destructor'(ItemMoneyTab *this, unsigned int a2)
{
  ItemMoneyTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ItemMoney,ItemMoneyTab>Vtbl *)&ITableBase<ItemMoney,ItemMoneyTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E3E4: using guessed type int (__cdecl *ITableBase<ItemMoney,ItemMoneyTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00462550) --------------------------------------------------------
CharClass *__thiscall ITableBase<ClassName,CharClass>::`vector deleting destructor'(CharClass *this, unsigned int a2)
{
  CharClass *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ClassName,CharClass>Vtbl *)&ITableBase<ClassName,CharClass>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E3F4: using guessed type int (__cdecl *ITableBase<ClassName,CharClass>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004625D0) --------------------------------------------------------
ActionEffectInfoTab *__thiscall ActionEffectInfoTab::`scalar deleting destructor'(ActionEffectInfoTab *this, unsigned int a2)
{
  ActionEffectInfoTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ActionEffectInfo,ActionEffectInfoTab>Vtbl *)&ITableBase<ActionEffectInfo,ActionEffectInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E404: using guessed type int (__cdecl *ITableBase<ActionEffectInfo,ActionEffectInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00462650) --------------------------------------------------------
HairInfoTab *__thiscall HairInfoTab::`vector deleting destructor'(HairInfoTab *this, unsigned int a2)
{
  HairInfoTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<HairInfo,HairInfoTab>Vtbl *)&ITableBase<HairInfo,HairInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E414: using guessed type int (__cdecl *ITableBase<HairInfo,HairInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004626D0) --------------------------------------------------------
HairColorInfoTab *__thiscall ITableBase<HairColorInfo,HairColorInfoTab>::`vector deleting destructor'(HairColorInfoTab *this, unsigned int a2)
{
  HairColorInfoTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<HairColorInfo,HairColorInfoTab>Vtbl *)&ITableBase<HairColorInfo,HairColorInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E424: using guessed type int (__cdecl *ITableBase<HairColorInfo,HairColorInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00462750) --------------------------------------------------------
ITableBase<MobInfo,MobInfoTab> *__thiscall ITableBase<MobInfo,MobInfoTab>::`vector deleting destructor'(ITableBase<MobInfo,MobInfoTab> *this, unsigned int a2)
{
  ITableBase<MobInfo,MobInfoTab> *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MobInfo,MobInfoTab>Vtbl *)&ITableBase<MobInfo,MobInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E434: using guessed type int (__cdecl *ITableBase<MobInfo,MobInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004627D0) --------------------------------------------------------
ITableBase<MobViewInfo,MobViewInfoTab> *__thiscall ITableBase<MobViewInfo,MobViewInfoTab>::`scalar deleting destructor'(ITableBase<MobViewInfo,MobViewInfoTab> *this, unsigned int a2)
{
  ITableBase<MobViewInfo,MobViewInfoTab> *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MobViewInfo,MobViewInfoTab>Vtbl *)&ITableBase<MobViewInfo,MobViewInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E45C: using guessed type int (__cdecl *ITableBase<MobViewInfo,MobViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00462850) --------------------------------------------------------
MobViewInfoTab *__thiscall MobViewInfoTab::`vector deleting destructor'(MobViewInfoTab *this, unsigned int a2)
{
  MobViewInfoTab *v2; // esi@1
  MobViewInfo **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pkRecordIDMap;
  this->vfptr = (ITableBase<MobViewInfo,MobViewInfoTab>Vtbl *)&IIDTableBase<MobViewInfo,MobViewInfoTab,unsigned short>::`vftable';
  operator delete[](v3);
  v2->vfptr = (ITableBase<MobViewInfo,MobViewInfoTab>Vtbl *)&ITableBase<MobViewInfo,MobViewInfoTab>::`vftable';
  CDataReader::ClearBF(&v2->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E45C: using guessed type int (__cdecl *ITableBase<MobViewInfo,MobViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E46C: using guessed type int (__cdecl *IIDTableBase<MobViewInfo,MobViewInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004628E0) --------------------------------------------------------
NPCViewInfoTab *__thiscall NPCViewInfoTab::`scalar deleting destructor'(NPCViewInfoTab *this, unsigned int a2)
{
  NPCViewInfoTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>Vtbl *)&ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E484: using guessed type int (__cdecl *ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00462960) --------------------------------------------------------
ShakeEffectViewInfoTab *__thiscall ShakeEffectViewInfoTab::`scalar deleting destructor'(ShakeEffectViewInfoTab *this, unsigned int a2)
{
  ShakeEffectViewInfoTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>Vtbl *)&ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E494: using guessed type int (__cdecl *ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004629E0) --------------------------------------------------------
MiniHouseFuritureInfoTab *__thiscall MiniHouseFuritureInfoTab::`vector deleting destructor'(MiniHouseFuritureInfoTab *this, unsigned int a2)
{
  MiniHouseFuritureInfoTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>Vtbl *)&ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E4D4: using guessed type int (__cdecl *ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00462A60) --------------------------------------------------------
MiniHouseEmotionTab *__thiscall MiniHouseEmotionTab::`vector deleting destructor'(MiniHouseEmotionTab *this, unsigned int a2)
{
  MiniHouseEmotionTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MHEmotion,MiniHouseEmotionTab>Vtbl *)&ITableBase<MHEmotion,MiniHouseEmotionTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E4E4: using guessed type int (__cdecl *ITableBase<MHEmotion,MiniHouseEmotionTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00462AE0) --------------------------------------------------------
ITableBase<AbnormalStateInfo,AbnormalStateInfoTab> *__thiscall ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::`vector deleting destructor'(ITableBase<AbnormalStateInfo,AbnormalStateInfoTab> *this, unsigned int a2)
{
  ITableBase<AbnormalStateInfo,AbnormalStateInfoTab> *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>Vtbl *)&ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E504: using guessed type int (__cdecl *ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00462B60) --------------------------------------------------------
ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab> *__thiscall ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::`vector deleting destructor'(ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab> *this, unsigned int a2)
{
  ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab> *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>Vtbl *)&ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E52C: using guessed type int (__cdecl *ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00462BE0) --------------------------------------------------------
AbnormalStateViewInfoTab *__thiscall AbnormalStateViewInfoTab::`scalar deleting destructor'(AbnormalStateViewInfoTab *this, unsigned int a2)
{
  AbnormalStateViewInfoTab *v2; // esi@1
  AbnormalStateViewInfo **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pkRecordIDMap;
  this->vfptr = (ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>Vtbl *)&IIDTableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab,unsigned short>::`vftable';
  operator delete[](v3);
  v2->vfptr = (ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>Vtbl *)&ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::`vftable';
  CDataReader::ClearBF(&v2->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E52C: using guessed type int (__cdecl *ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E53C: using guessed type int (__cdecl *IIDTableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00462C70) --------------------------------------------------------
ITableBase<SubAbStateInfo,SubAbStateInfoTab> *__thiscall ITableBase<SubAbStateInfo,SubAbStateInfoTab>::`vector deleting destructor'(ITableBase<SubAbStateInfo,SubAbStateInfoTab> *this, unsigned int a2)
{
  ITableBase<SubAbStateInfo,SubAbStateInfoTab> *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<SubAbStateInfo,SubAbStateInfoTab>Vtbl *)&ITableBase<SubAbStateInfo,SubAbStateInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E554: using guessed type int (__cdecl *ITableBase<SubAbStateInfo,SubAbStateInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00462CF0) --------------------------------------------------------
FaceCutMsgTab *__thiscall FaceCutMsgTab::`vector deleting destructor'(FaceCutMsgTab *this, unsigned int a2)
{
  FaceCutMsgTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<FaceCutMsg,FaceCutMsgTab>Vtbl *)&ITableBase<FaceCutMsg,FaceCutMsgTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E58C: using guessed type int (__cdecl *ITableBase<FaceCutMsg,FaceCutMsgTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00462D70) --------------------------------------------------------
void __thiscall std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::_Splice_same(std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > *this, std::_List_const_iterator<std::_List_val<ItemViewDummy *,std::allocator<ItemViewDummy *> > > _Where, std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > *_Right, std::_List_const_iterator<std::_List_val<ItemViewDummy *,std::allocator<ItemViewDummy *> > > _First, std::_List_const_iterator<std::_List_val<ItemViewDummy *,std::allocator<ItemViewDummy *> > > _Last, unsigned int _Count)
{
  unsigned int v6; // edx@2
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v7; // ecx@5

  if ( this != _Right )
  {
    v6 = this->_Mysize;
    if ( 1073741822 - v6 < _Count )
      std::_Xlength_error("list<T> too long");
    this->_Mysize = _Count + v6;
    _Right->_Mysize -= _Count;
  }
  _First._Ptr->_Prev->_Next = _Last._Ptr;
  _Last._Ptr->_Prev->_Next = _Where._Ptr;
  _Where._Ptr->_Prev->_Next = _First._Ptr;
  v7 = _Where._Ptr->_Prev;
  _Where._Ptr->_Prev = _Last._Ptr->_Prev;
  _Last._Ptr->_Prev = _First._Ptr->_Prev;
  _First._Ptr->_Prev = v7;
}

//----- (00462DF0) --------------------------------------------------------
char __cdecl CharClass::GetClassIDByEngName(char *pcEngName)
{
  unsigned int v1; // edi@1

  v1 = 0;
  while ( strcmp(
            CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), v1) + 5,
            pcEngName) )
  {
    if ( (signed int)++v1 >= 28 )
      return 0;
  }
  return *CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), v1);
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (00462E60) --------------------------------------------------------
void __thiscall std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>::_Splice_same(std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > *this, std::_List_const_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > > _Where, std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > *_Right, std::_List_const_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > > _First, std::_List_const_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > > _Last, unsigned int _Count)
{
  unsigned int v6; // edx@2
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *v7; // ecx@5

  if ( this != _Right )
  {
    v6 = this->_Mysize;
    if ( 107374181 - v6 < _Count )
      std::_Xlength_error("list<T> too long");
    this->_Mysize = _Count + v6;
    _Right->_Mysize -= _Count;
  }
  _First._Ptr->_Prev->_Next = _Last._Ptr;
  _Last._Ptr->_Prev->_Next = _Where._Ptr;
  _Where._Ptr->_Prev->_Next = _First._Ptr;
  v7 = _Where._Ptr->_Prev;
  _Where._Ptr->_Prev = _Last._Ptr->_Prev;
  _Last._Ptr->_Prev = _First._Ptr->_Prev;
  _First._Ptr->_Prev = v7;
}

//----- (00462EE0) --------------------------------------------------------
std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *__stdcall std::_List_val<char *,std::allocator<char *>>::_Buynode(std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *_Next, std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *_Prev, ItemViewDummy *const *_Val)
{
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *result; // eax@1
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v5; // edx@2
  std::exception pExceptionObject; // [sp+0h] [bp-Ch]@5

  result = (std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *)operator new(0xCu);
  if ( !result )
  {
    _Next = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Next);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v5 = _Prev;
  result->_Next = _Next;
  result->_Prev = v5;
  if ( result != (std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *)-8 )
    result->_Myval = *_Val;
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00462F40) --------------------------------------------------------
void __thiscall ColorInfoTable::ColorInfoTable(ColorInfoTable *this)
{
  ColorInfoTable *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ColorInfoType,ColorInfoTable>Vtbl *)&ITableBase<ColorInfoType,ColorInfoTable>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ColorInfoType,ColorInfoTable>::ITableBase<ColorInfoType,ColorInfoTable>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ColorInfoType,ColorInfoTable>::ITableBase<ColorInfoType,ColorInfoTable>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ColorInfoType_ColorInfoTable_::ITableBase_ColorInfoType_ColorInfoTable__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<ColorInfoType,ColorInfoTable>Vtbl *)&ColorInfoTable::`vftable';
}
// 97E374: using guessed type int (__cdecl *ITableBase<ColorInfoType,ColorInfoTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E5AC: using guessed type int (__cdecl *ColorInfoTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C2CC: using guessed type int `ITableBase<ColorInfoType,ColorInfoTable>::ITableBase<ColorInfoType,ColorInfoTable>'::`2'::`local static guard';

//----- (00462F80) --------------------------------------------------------
bool ColorInfoTable::DataProcess()
{
  int v1; // eax@1

  v1 = *(_DWORD *)(*(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable + 56);
  return v1 && *(_DWORD *)(v1 + 40) == 55;
}

//----- (00462FA0) --------------------------------------------------------
void __thiscall ItemViewEquipTypeInfoTab::ItemViewEquipTypeInfoTab(ItemViewEquipTypeInfoTab *this)
{
  ItemViewEquipTypeInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>Vtbl *)&ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ItemViewEquipTypeInfo_ItemViewEquipTypeInfoTab_::ITableBase_ItemViewEquipTypeInfo_ItemViewEquipTypeInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>Vtbl *)&ItemViewEquipTypeInfoTab::`vftable';
}
// 97E3D4: using guessed type int (__cdecl *ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E5BC: using guessed type int (__cdecl *ItemViewEquipTypeInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C2CC: using guessed type int `ITableBase<ColorInfoType,ColorInfoTable>::ITableBase<ColorInfoType,ColorInfoTable>'::`2'::`local static guard';
// A8C2D0: using guessed type int `ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>'::`2'::`local static guard';

//----- (00462FE0) --------------------------------------------------------
void __thiscall ItemMoneyTab::ItemMoneyTab(ItemMoneyTab *this)
{
  ItemMoneyTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ItemMoney,ItemMoneyTab>Vtbl *)&ITableBase<ItemMoney,ItemMoneyTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ItemMoney,ItemMoneyTab>::ITableBase<ItemMoney,ItemMoneyTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ItemMoney,ItemMoneyTab>::ITableBase<ItemMoney,ItemMoneyTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ItemMoney_ItemMoneyTab_::ITableBase_ItemMoney_ItemMoneyTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<ItemMoney,ItemMoneyTab>Vtbl *)&ItemMoneyTab::`vftable';
}
// 97E3E4: using guessed type int (__cdecl *ITableBase<ItemMoney,ItemMoneyTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E5CC: using guessed type int (__cdecl *ItemMoneyTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C2D0: using guessed type int `ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>'::`2'::`local static guard';
// A8C2D4: using guessed type int `ITableBase<ItemMoney,ItemMoneyTab>::ITableBase<ItemMoney,ItemMoneyTab>'::`2'::`local static guard';

//----- (00463020) --------------------------------------------------------
void __thiscall CharClass::CharClass(CharClass *this)
{
  CharClass *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ClassName,CharClass>Vtbl *)&ITableBase<ClassName,CharClass>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ClassName,CharClass>::ITableBase<ClassName,CharClass>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ClassName,CharClass>::ITableBase<ClassName,CharClass>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ClassName_CharClass_::ITableBase_ClassName_CharClass__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<ClassName,CharClass>Vtbl *)&CharClass::`vftable';
}
// 97E3F4: using guessed type int (__cdecl *ITableBase<ClassName,CharClass>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E5DC: using guessed type int (__cdecl *CharClass::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C2D4: using guessed type int `ITableBase<ItemMoney,ItemMoneyTab>::ITableBase<ItemMoney,ItemMoneyTab>'::`2'::`local static guard';
// A8C2D8: using guessed type int `ITableBase<ClassName,CharClass>::ITableBase<ClassName,CharClass>'::`2'::`local static guard';

//----- (00463060) --------------------------------------------------------
void __thiscall ActionEffectInfoTab::ActionEffectInfoTab(ActionEffectInfoTab *this)
{
  ActionEffectInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ActionEffectInfo,ActionEffectInfoTab>Vtbl *)&ITableBase<ActionEffectInfo,ActionEffectInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ActionEffectInfo,ActionEffectInfoTab>::ITableBase<ActionEffectInfo,ActionEffectInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ActionEffectInfo,ActionEffectInfoTab>::ITableBase<ActionEffectInfo,ActionEffectInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ActionEffectInfo_ActionEffectInfoTab_::ITableBase_ActionEffectInfo_ActionEffectInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<ActionEffectInfo,ActionEffectInfoTab>Vtbl *)&ActionEffectInfoTab::`vftable';
}
// 97E404: using guessed type int (__cdecl *ITableBase<ActionEffectInfo,ActionEffectInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E5EC: using guessed type int (__cdecl *ActionEffectInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C2D8: using guessed type int `ITableBase<ClassName,CharClass>::ITableBase<ClassName,CharClass>'::`2'::`local static guard';
// A8C2DC: using guessed type int `ITableBase<ActionEffectInfo,ActionEffectInfoTab>::ITableBase<ActionEffectInfo,ActionEffectInfoTab>'::`2'::`local static guard';

//----- (004630A0) --------------------------------------------------------
void __thiscall HairInfoTab::HairInfoTab(HairInfoTab *this)
{
  HairInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<HairInfo,HairInfoTab>Vtbl *)&ITableBase<HairInfo,HairInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<HairInfo,HairInfoTab>::ITableBase<HairInfo,HairInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<HairInfo,HairInfoTab>::ITableBase<HairInfo,HairInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_HairInfo_HairInfoTab_::ITableBase_HairInfo_HairInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<HairInfo,HairInfoTab>Vtbl *)&HairInfoTab::`vftable';
}
// 97E414: using guessed type int (__cdecl *ITableBase<HairInfo,HairInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E5FC: using guessed type int (__cdecl *HairInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C2DC: using guessed type int `ITableBase<ActionEffectInfo,ActionEffectInfoTab>::ITableBase<ActionEffectInfo,ActionEffectInfoTab>'::`2'::`local static guard';
// A8C2E0: using guessed type int `ITableBase<HairInfo,HairInfoTab>::ITableBase<HairInfo,HairInfoTab>'::`2'::`local static guard';

//----- (004630E0) --------------------------------------------------------
void __thiscall HairColorInfoTab::HairColorInfoTab(HairColorInfoTab *this)
{
  HairColorInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<HairColorInfo,HairColorInfoTab>Vtbl *)&ITableBase<HairColorInfo,HairColorInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<HairColorInfo,HairColorInfoTab>::ITableBase<HairColorInfo,HairColorInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<HairColorInfo,HairColorInfoTab>::ITableBase<HairColorInfo,HairColorInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_HairColorInfo_HairColorInfoTab_::ITableBase_HairColorInfo_HairColorInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<HairColorInfo,HairColorInfoTab>Vtbl *)&HairColorInfoTab::`vftable';
}
// 97E424: using guessed type int (__cdecl *ITableBase<HairColorInfo,HairColorInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E60C: using guessed type int (__cdecl *HairColorInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C2E0: using guessed type int `ITableBase<HairInfo,HairInfoTab>::ITableBase<HairInfo,HairInfoTab>'::`2'::`local static guard';
// A8C2E4: using guessed type int `ITableBase<HairColorInfo,HairColorInfoTab>::ITableBase<HairColorInfo,HairColorInfoTab>'::`2'::`local static guard';

//----- (00463120) --------------------------------------------------------
void __thiscall NPCViewInfoTab::NPCViewInfoTab(NPCViewInfoTab *this)
{
  NPCViewInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>Vtbl *)&ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_CharNPC_ViewInfo_NPCViewInfoTab_::ITableBase_CharNPC_ViewInfo_NPCViewInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>Vtbl *)&NPCViewInfoTab::`vftable';
}
// 97E484: using guessed type int (__cdecl *ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E61C: using guessed type int (__cdecl *NPCViewInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C2E4: using guessed type int `ITableBase<HairColorInfo,HairColorInfoTab>::ITableBase<HairColorInfo,HairColorInfoTab>'::`2'::`local static guard';
// A8C2E8: using guessed type int `ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>'::`2'::`local static guard';

//----- (00463160) --------------------------------------------------------
void __thiscall ShakeEffectViewInfoTab::ShakeEffectViewInfoTab(ShakeEffectViewInfoTab *this)
{
  ShakeEffectViewInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>Vtbl *)&ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_EffectViewInfo_ShakeEffectViewInfoTab_::ITableBase_EffectViewInfo_ShakeEffectViewInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>Vtbl *)&ShakeEffectViewInfoTab::`vftable';
}
// 97E494: using guessed type int (__cdecl *ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E62C: using guessed type int (__cdecl *ShakeEffectViewInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C2E8: using guessed type int `ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>'::`2'::`local static guard';
// A8C2EC: using guessed type int `ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>'::`2'::`local static guard';

//----- (004631A0) --------------------------------------------------------
void __thiscall MHFurnitureObjEffectTab::MHFurnitureObjEffectTab(MHFurnitureObjEffectTab *this)
{
  MHFurnitureObjEffectTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>Vtbl *)&ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MiniHouseFurnitureObjEffect_MHFurnitureObjEffectTab_::ITableBase_MiniHouseFurnitureObjEffect_MHFurnitureObjEffectTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>Vtbl *)&MHFurnitureObjEffectTab::`vftable';
}
// 97E4A4: using guessed type int (__cdecl *ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E63C: using guessed type int (__cdecl *MHFurnitureObjEffectTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C2EC: using guessed type int `ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>'::`2'::`local static guard';
// A8C2F0: using guessed type int `ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>'::`2'::`local static guard';

//----- (004631E0) --------------------------------------------------------
MHFurnitureObjEffectTab *__thiscall ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::`scalar deleting destructor'(MHFurnitureObjEffectTab *this, unsigned int a2)
{
  MHFurnitureObjEffectTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>Vtbl *)&ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E4A4: using guessed type int (__cdecl *ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00463260) --------------------------------------------------------
void __thiscall MiniHouseObjAniInfoTab::MiniHouseObjAniInfoTab(MiniHouseObjAniInfoTab *this)
{
  MiniHouseObjAniInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>Vtbl *)&ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MiniHouseObjAni_MiniHouseObjAniInfoTab_::ITableBase_MiniHouseObjAni_MiniHouseObjAniInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>Vtbl *)&MiniHouseObjAniInfoTab::`vftable';
}
// 97E4B4: using guessed type int (__cdecl *ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E64C: using guessed type int (__cdecl *MiniHouseObjAniInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C2F0: using guessed type int `ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>'::`2'::`local static guard';
// A8C2F4: using guessed type int `ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>'::`2'::`local static guard';

//----- (004632A0) --------------------------------------------------------
MiniHouseObjAniInfoTab *__thiscall ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::`vector deleting destructor'(MiniHouseObjAniInfoTab *this, unsigned int a2)
{
  MiniHouseObjAniInfoTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>Vtbl *)&ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E4B4: using guessed type int (__cdecl *ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00463320) --------------------------------------------------------
void __thiscall MiniHouseEndureInfoTable::MiniHouseEndureInfoTable(MiniHouseEndureInfoTable *this)
{
  MiniHouseEndureInfoTable *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>Vtbl *)&ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MiniHouseEndure_MiniHouseEndureInfoTable_::ITableBase_MiniHouseEndure_MiniHouseEndureInfoTable__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>Vtbl *)&MiniHouseEndureInfoTable::`vftable';
}
// 97E4C4: using guessed type int (__cdecl *ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E65C: using guessed type int (__cdecl *MiniHouseEndureInfoTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C2F4: using guessed type int `ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>'::`2'::`local static guard';
// A8C2F8: using guessed type int `ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>'::`2'::`local static guard';

//----- (00463360) --------------------------------------------------------
MiniHouseEndureInfoTable *__thiscall MiniHouseEndureInfoTable::`vector deleting destructor'(MiniHouseEndureInfoTable *this, unsigned int a2)
{
  MiniHouseEndureInfoTable *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>Vtbl *)&ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E4C4: using guessed type int (__cdecl *ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004633E0) --------------------------------------------------------
void __thiscall MiniHouseFuritureInfoTab::MiniHouseFuritureInfoTab(MiniHouseFuritureInfoTab *this)
{
  MiniHouseFuritureInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>Vtbl *)&ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MiniHouseFurniture_MiniHouseFuritureInfoTab_::ITableBase_MiniHouseFurniture_MiniHouseFuritureInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>Vtbl *)&MiniHouseFuritureInfoTab::`vftable';
}
// 97E4D4: using guessed type int (__cdecl *ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E66C: using guessed type int (__cdecl *MiniHouseFuritureInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C2F8: using guessed type int `ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>'::`2'::`local static guard';
// A8C2FC: using guessed type int `ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>'::`2'::`local static guard';

//----- (00463420) --------------------------------------------------------
void __thiscall MiniHouseEmotionTab::MiniHouseEmotionTab(MiniHouseEmotionTab *this)
{
  MiniHouseEmotionTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MHEmotion,MiniHouseEmotionTab>Vtbl *)&ITableBase<MHEmotion,MiniHouseEmotionTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MHEmotion,MiniHouseEmotionTab>::ITableBase<MHEmotion,MiniHouseEmotionTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MHEmotion,MiniHouseEmotionTab>::ITableBase<MHEmotion,MiniHouseEmotionTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MHEmotion_MiniHouseEmotionTab_::ITableBase_MHEmotion_MiniHouseEmotionTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<MHEmotion,MiniHouseEmotionTab>Vtbl *)&MiniHouseEmotionTab::`vftable';
}
// 97E4E4: using guessed type int (__cdecl *ITableBase<MHEmotion,MiniHouseEmotionTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E67C: using guessed type int (__cdecl *MiniHouseEmotionTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C2FC: using guessed type int `ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>'::`2'::`local static guard';
// A8C300: using guessed type int `ITableBase<MHEmotion,MiniHouseEmotionTab>::ITableBase<MHEmotion,MiniHouseEmotionTab>'::`2'::`local static guard';

//----- (00463460) --------------------------------------------------------
void __thiscall UpEffectTab::UpEffectTab(UpEffectTab *this)
{
  UpEffectTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<UpEffectData,UpEffectTab>Vtbl *)&ITableBase<UpEffectData,UpEffectTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<UpEffectData,UpEffectTab>::ITableBase<UpEffectData,UpEffectTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<UpEffectData,UpEffectTab>::ITableBase<UpEffectData,UpEffectTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_UpEffectData_UpEffectTab_::ITableBase_UpEffectData_UpEffectTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<UpEffectData,UpEffectTab>Vtbl *)&UpEffectTab::`vftable';
}
// 97E4F4: using guessed type int (__cdecl *ITableBase<UpEffectData,UpEffectTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E68C: using guessed type int (__cdecl *UpEffectTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C300: using guessed type int `ITableBase<MHEmotion,MiniHouseEmotionTab>::ITableBase<MHEmotion,MiniHouseEmotionTab>'::`2'::`local static guard';
// A8C304: using guessed type int `ITableBase<UpEffectData,UpEffectTab>::ITableBase<UpEffectData,UpEffectTab>'::`2'::`local static guard';

//----- (004634A0) --------------------------------------------------------
UpEffectTab *__thiscall UpEffectTab::`vector deleting destructor'(UpEffectTab *this, unsigned int a2)
{
  UpEffectTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<UpEffectData,UpEffectTab>Vtbl *)&ITableBase<UpEffectData,UpEffectTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E4F4: using guessed type int (__cdecl *ITableBase<UpEffectData,UpEffectTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00463520) --------------------------------------------------------
void __thiscall ScriptMsgTab::ScriptMsgTab(ScriptMsgTab *this)
{
  ScriptMsgTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ScriptMsg,ScriptMsgTab>Vtbl *)&ITableBase<ScriptMsg,ScriptMsgTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ScriptMsg,ScriptMsgTab>::ITableBase<ScriptMsg,ScriptMsgTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ScriptMsg,ScriptMsgTab>::ITableBase<ScriptMsg,ScriptMsgTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ScriptMsg_ScriptMsgTab_::ITableBase_ScriptMsg_ScriptMsgTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<ScriptMsg,ScriptMsgTab>Vtbl *)&ScriptMsgTab::`vftable';
}
// 97E57C: using guessed type int (__cdecl *ITableBase<ScriptMsg,ScriptMsgTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E69C: using guessed type int (__cdecl *ScriptMsgTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C304: using guessed type int `ITableBase<UpEffectData,UpEffectTab>::ITableBase<UpEffectData,UpEffectTab>'::`2'::`local static guard';
// A8C308: using guessed type int `ITableBase<ScriptMsg,ScriptMsgTab>::ITableBase<ScriptMsg,ScriptMsgTab>'::`2'::`local static guard';

//----- (00463560) --------------------------------------------------------
ScriptMsgTab *__thiscall ScriptMsgTab::`vector deleting destructor'(ScriptMsgTab *this, unsigned int a2)
{
  ScriptMsgTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ScriptMsg,ScriptMsgTab>Vtbl *)&ITableBase<ScriptMsg,ScriptMsgTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E57C: using guessed type int (__cdecl *ITableBase<ScriptMsg,ScriptMsgTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004635E0) --------------------------------------------------------
void __thiscall ChargedEffectTable::ChargedEffectTable(ChargedEffectTable *this)
{
  ChargedEffectTable *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ChargedItemEffect,ChargedEffectTable>Vtbl *)&ITableBase<ChargedItemEffect,ChargedEffectTable>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ChargedItemEffect,ChargedEffectTable>::ITableBase<ChargedItemEffect,ChargedEffectTable>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ChargedItemEffect,ChargedEffectTable>::ITableBase<ChargedItemEffect,ChargedEffectTable>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ChargedItemEffect_ChargedEffectTable_::ITableBase_ChargedItemEffect_ChargedEffectTable__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<ChargedItemEffect,ChargedEffectTable>Vtbl *)&ChargedEffectTable::`vftable';
}
// 97E59C: using guessed type int (__cdecl *ITableBase<ChargedItemEffect,ChargedEffectTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E6AC: using guessed type int (__cdecl *ChargedEffectTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C308: using guessed type int `ITableBase<ScriptMsg,ScriptMsgTab>::ITableBase<ScriptMsg,ScriptMsgTab>'::`2'::`local static guard';
// A8C30C: using guessed type int `ITableBase<ChargedItemEffect,ChargedEffectTable>::ITableBase<ChargedItemEffect,ChargedEffectTable>'::`2'::`local static guard';

//----- (00463620) --------------------------------------------------------
ChargedEffectTable *__thiscall ChargedEffectTable::`scalar deleting destructor'(ChargedEffectTable *this, unsigned int a2)
{
  ChargedEffectTable *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ChargedItemEffect,ChargedEffectTable>Vtbl *)&ITableBase<ChargedItemEffect,ChargedEffectTable>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E59C: using guessed type int (__cdecl *ITableBase<ChargedItemEffect,ChargedEffectTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004636A0) --------------------------------------------------------
void __thiscall CharRace::CharRace(CharRace *this)
{
  CharRace *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<RaceName,CharRace>Vtbl *)&ITableBase<RaceName,CharRace>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<RaceName,CharRace>::ITableBase<RaceName,CharRace>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<RaceName,CharRace>::ITableBase<RaceName,CharRace>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_RaceName_CharRace_::ITableBase_RaceName_CharRace__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<RaceName,CharRace>Vtbl *)&CharRace::`vftable';
}
// 97DCFC: using guessed type int (__cdecl *ITableBase<RaceName,CharRace>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E6BC: using guessed type int (__cdecl *CharRace::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C30C: using guessed type int `ITableBase<ChargedItemEffect,ChargedEffectTable>::ITableBase<ChargedItemEffect,ChargedEffectTable>'::`2'::`local static guard';
// A8C310: using guessed type int `ITableBase<RaceName,CharRace>::ITableBase<RaceName,CharRace>'::`2'::`local static guard';

//----- (004636E0) --------------------------------------------------------
void __thiscall FaceInfoTab::FaceInfoTab(FaceInfoTab *this)
{
  FaceInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<FaceInfo,FaceInfoTab>Vtbl *)&ITableBase<FaceInfo,FaceInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<FaceInfo,FaceInfoTab>::ITableBase<FaceInfo,FaceInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<FaceInfo,FaceInfoTab>::ITableBase<FaceInfo,FaceInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_FaceInfo_FaceInfoTab_::ITableBase_FaceInfo_FaceInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<FaceInfo,FaceInfoTab>Vtbl *)&FaceInfoTab::`vftable';
}
// 97DD84: using guessed type int (__cdecl *ITableBase<FaceInfo,FaceInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E6CC: using guessed type int (__cdecl *FaceInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C310: using guessed type int `ITableBase<RaceName,CharRace>::ITableBase<RaceName,CharRace>'::`2'::`local static guard';
// A8C314: using guessed type int `ITableBase<FaceInfo,FaceInfoTab>::ITableBase<FaceInfo,FaceInfoTab>'::`2'::`local static guard';

//----- (00463720) --------------------------------------------------------
FaceInfoTab *__thiscall FaceInfoTab::`scalar deleting destructor'(FaceInfoTab *this, unsigned int a2)
{
  FaceInfoTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<FaceInfo,FaceInfoTab>Vtbl *)&ITableBase<FaceInfo,FaceInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DD84: using guessed type int (__cdecl *ITableBase<FaceInfo,FaceInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004637A0) --------------------------------------------------------
void __thiscall DmgSndTab::DmgSndTab(DmgSndTab *this)
{
  DmgSndTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<DmgSndMapByArmorType,DmgSndTab>Vtbl *)&ITableBase<DmgSndMapByArmorType,DmgSndTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<DmgSndMapByArmorType,DmgSndTab>::ITableBase<DmgSndMapByArmorType,DmgSndTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<DmgSndMapByArmorType,DmgSndTab>::ITableBase<DmgSndMapByArmorType,DmgSndTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_DmgSndMapByArmorType_DmgSndTab_::ITableBase_DmgSndMapByArmorType_DmgSndTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<DmgSndMapByArmorType,DmgSndTab>Vtbl *)&DmgSndTab::`vftable';
}
// 97DD94: using guessed type int (__cdecl *ITableBase<DmgSndMapByArmorType,DmgSndTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E6DC: using guessed type int (__cdecl *DmgSndTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C314: using guessed type int `ITableBase<FaceInfo,FaceInfoTab>::ITableBase<FaceInfo,FaceInfoTab>'::`2'::`local static guard';
// A8C318: using guessed type int `ITableBase<DmgSndMapByArmorType,DmgSndTab>::ITableBase<DmgSndMapByArmorType,DmgSndTab>'::`2'::`local static guard';

//----- (004637E0) --------------------------------------------------------
DmgSndTab *__thiscall ITableBase<DmgSndMapByArmorType,DmgSndTab>::`scalar deleting destructor'(DmgSndTab *this, unsigned int a2)
{
  DmgSndTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<DmgSndMapByArmorType,DmgSndTab>Vtbl *)&ITableBase<DmgSndMapByArmorType,DmgSndTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DD94: using guessed type int (__cdecl *ITableBase<DmgSndMapByArmorType,DmgSndTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00463860) --------------------------------------------------------
void __thiscall ProduceInfoTable::ProduceInfoTable(ProduceInfoTable *this)
{
  ProduceInfoTable *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ProduceInfo,ProduceInfoTable>Vtbl *)&ITableBase<ProduceInfo,ProduceInfoTable>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ProduceInfo,ProduceInfoTable>::ITableBase<ProduceInfo,ProduceInfoTable>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ProduceInfo,ProduceInfoTable>::ITableBase<ProduceInfo,ProduceInfoTable>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ProduceInfo_ProduceInfoTable_::ITableBase_ProduceInfo_ProduceInfoTable__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<ProduceInfo,ProduceInfoTable>Vtbl *)&ProduceInfoTable::`vftable';
}
// 97DDCC: using guessed type int (__cdecl *ITableBase<ProduceInfo,ProduceInfoTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E6EC: using guessed type int (__cdecl *ProduceInfoTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C318: using guessed type int `ITableBase<DmgSndMapByArmorType,DmgSndTab>::ITableBase<DmgSndMapByArmorType,DmgSndTab>'::`2'::`local static guard';
// A8C31C: using guessed type int `ITableBase<ProduceInfo,ProduceInfoTable>::ITableBase<ProduceInfo,ProduceInfoTable>'::`2'::`local static guard';

//----- (004638A0) --------------------------------------------------------
void __thiscall GatherInfoTable::GatherInfoTable(GatherInfoTable *this)
{
  GatherInfoTable *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<GatherInfo,GatherInfoTable>Vtbl *)&ITableBase<GatherInfo,GatherInfoTable>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<GatherInfo,GatherInfoTable>::ITableBase<GatherInfo,GatherInfoTable>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<GatherInfo,GatherInfoTable>::ITableBase<GatherInfo,GatherInfoTable>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_GatherInfo_GatherInfoTable_::ITableBase_GatherInfo_GatherInfoTable__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<GatherInfo,GatherInfoTable>Vtbl *)&GatherInfoTable::`vftable';
}
// 97DDDC: using guessed type int (__cdecl *ITableBase<GatherInfo,GatherInfoTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E6FC: using guessed type int (__cdecl *GatherInfoTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C31C: using guessed type int `ITableBase<ProduceInfo,ProduceInfoTable>::ITableBase<ProduceInfo,ProduceInfoTable>'::`2'::`local static guard';
// A8C320: using guessed type int `ITableBase<GatherInfo,GatherInfoTable>::ITableBase<GatherInfo,GatherInfoTable>'::`2'::`local static guard';

//----- (004638E0) --------------------------------------------------------
GatherInfoTable *__thiscall GatherInfoTable::`vector deleting destructor'(GatherInfoTable *this, unsigned int a2)
{
  GatherInfoTable *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<GatherInfo,GatherInfoTable>Vtbl *)&ITableBase<GatherInfo,GatherInfoTable>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DDDC: using guessed type int (__cdecl *ITableBase<GatherInfo,GatherInfoTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00463960) --------------------------------------------------------
void __thiscall KQDescTable::KQDescTable(KQDescTable *this)
{
  KQDescTable *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<KINGDOM_QUEST_DESC,KQDescTable>Vtbl *)&ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::ITableBase<KINGDOM_QUEST_DESC,KQDescTable>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::ITableBase<KINGDOM_QUEST_DESC,KQDescTable>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_KINGDOM_QUEST_DESC_KQDescTable_::ITableBase_KINGDOM_QUEST_DESC_KQDescTable__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<KINGDOM_QUEST_DESC,KQDescTable>Vtbl *)&KQDescTable::`vftable';
}
// 97DDEC: using guessed type int (__cdecl *ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E70C: using guessed type int (__cdecl *KQDescTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C320: using guessed type int `ITableBase<GatherInfo,GatherInfoTable>::ITableBase<GatherInfo,GatherInfoTable>'::`2'::`local static guard';
// A8C324: using guessed type int `ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::ITableBase<KINGDOM_QUEST_DESC,KQDescTable>'::`2'::`local static guard';

//----- (004639A0) --------------------------------------------------------
KQDescTable *__thiscall ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::`scalar deleting destructor'(KQDescTable *this, unsigned int a2)
{
  KQDescTable *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<KINGDOM_QUEST_DESC,KQDescTable>Vtbl *)&ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DDEC: using guessed type int (__cdecl *ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00463A20) --------------------------------------------------------
void __thiscall ProduceViewInfoTable::ProduceViewInfoTable(ProduceViewInfoTable *this)
{
  ProduceViewInfoTable *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ProduceViewInfo,ProduceViewInfoTable>Vtbl *)&ITableBase<ProduceViewInfo,ProduceViewInfoTable>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ProduceViewInfo,ProduceViewInfoTable>::ITableBase<ProduceViewInfo,ProduceViewInfoTable>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ProduceViewInfo,ProduceViewInfoTable>::ITableBase<ProduceViewInfo,ProduceViewInfoTable>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ProduceViewInfo_ProduceViewInfoTable_::ITableBase_ProduceViewInfo_ProduceViewInfoTable__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<ProduceViewInfo,ProduceViewInfoTable>Vtbl *)&ProduceViewInfoTable::`vftable';
}
// 97DDFC: using guessed type int (__cdecl *ITableBase<ProduceViewInfo,ProduceViewInfoTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E71C: using guessed type int (__cdecl *ProduceViewInfoTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C324: using guessed type int `ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::ITableBase<KINGDOM_QUEST_DESC,KQDescTable>'::`2'::`local static guard';
// A8C328: using guessed type int `ITableBase<ProduceViewInfo,ProduceViewInfoTable>::ITableBase<ProduceViewInfo,ProduceViewInfoTable>'::`2'::`local static guard';

//----- (00463A60) --------------------------------------------------------
void __thiscall NpcDialogDataTable::NpcDialogDataTable(NpcDialogDataTable *this)
{
  NpcDialogDataTable *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<NpcDialogData,NpcDialogDataTable>Vtbl *)&ITableBase<NpcDialogData,NpcDialogDataTable>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<NpcDialogData,NpcDialogDataTable>::ITableBase<NpcDialogData,NpcDialogDataTable>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<NpcDialogData,NpcDialogDataTable>::ITableBase<NpcDialogData,NpcDialogDataTable>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_NpcDialogData_NpcDialogDataTable_::ITableBase_NpcDialogData_NpcDialogDataTable__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<NpcDialogData,NpcDialogDataTable>Vtbl *)&NpcDialogDataTable::`vftable';
}
// 97DE0C: using guessed type int (__cdecl *ITableBase<NpcDialogData,NpcDialogDataTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E72C: using guessed type int (__cdecl *NpcDialogDataTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C328: using guessed type int `ITableBase<ProduceViewInfo,ProduceViewInfoTable>::ITableBase<ProduceViewInfo,ProduceViewInfoTable>'::`2'::`local static guard';
// A8C32C: using guessed type int `ITableBase<NpcDialogData,NpcDialogDataTable>::ITableBase<NpcDialogData,NpcDialogDataTable>'::`2'::`local static guard';

//----- (00463AA0) --------------------------------------------------------
void __thiscall GradeItemOptionTab::GradeItemOptionTab(GradeItemOptionTab *this)
{
  GradeItemOptionTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<GradeItemOption,GradeItemOptionTab>Vtbl *)&ITableBase<GradeItemOption,GradeItemOptionTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<GradeItemOption,GradeItemOptionTab>::ITableBase<GradeItemOption,GradeItemOptionTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<GradeItemOption,GradeItemOptionTab>::ITableBase<GradeItemOption,GradeItemOptionTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_GradeItemOption_GradeItemOptionTab_::ITableBase_GradeItemOption_GradeItemOptionTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<GradeItemOption,GradeItemOptionTab>Vtbl *)&GradeItemOptionTab::`vftable';
}
// 97DE1C: using guessed type int (__cdecl *ITableBase<GradeItemOption,GradeItemOptionTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E73C: using guessed type int (__cdecl *GradeItemOptionTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C32C: using guessed type int `ITableBase<NpcDialogData,NpcDialogDataTable>::ITableBase<NpcDialogData,NpcDialogDataTable>'::`2'::`local static guard';
// A8C330: using guessed type int `ITableBase<GradeItemOption,GradeItemOptionTab>::ITableBase<GradeItemOption,GradeItemOptionTab>'::`2'::`local static guard';

//----- (00463AE0) --------------------------------------------------------
void __thiscall MiniHouseTable::MiniHouseTable(MiniHouseTable *this)
{
  MiniHouseTable *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MiniHouse,MiniHouseTable>Vtbl *)&ITableBase<MiniHouse,MiniHouseTable>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MiniHouse,MiniHouseTable>::ITableBase<MiniHouse,MiniHouseTable>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MiniHouse,MiniHouseTable>::ITableBase<MiniHouse,MiniHouseTable>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MiniHouse_MiniHouseTable_::ITableBase_MiniHouse_MiniHouseTable__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<MiniHouse,MiniHouseTable>Vtbl *)&MiniHouseTable::`vftable';
}
// 97DE2C: using guessed type int (__cdecl *ITableBase<MiniHouse,MiniHouseTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E74C: using guessed type int (__cdecl *MiniHouseTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C330: using guessed type int `ITableBase<GradeItemOption,GradeItemOptionTab>::ITableBase<GradeItemOption,GradeItemOptionTab>'::`2'::`local static guard';
// A8C334: using guessed type int `ITableBase<MiniHouse,MiniHouseTable>::ITableBase<MiniHouse,MiniHouseTable>'::`2'::`local static guard';

//----- (00463B20) --------------------------------------------------------
void __thiscall ItemShopViewTable::ItemShopViewTable(ItemShopViewTable *this)
{
  ItemShopViewTable *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ItemShopView,ItemShopViewTable>Vtbl *)&ITableBase<ItemShopView,ItemShopViewTable>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ItemShopView,ItemShopViewTable>::ITableBase<ItemShopView,ItemShopViewTable>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ItemShopView,ItemShopViewTable>::ITableBase<ItemShopView,ItemShopViewTable>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ItemShopView_ItemShopViewTable_::ITableBase_ItemShopView_ItemShopViewTable__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<ItemShopView,ItemShopViewTable>Vtbl *)&ItemShopViewTable::`vftable';
}
// 97DE3C: using guessed type int (__cdecl *ITableBase<ItemShopView,ItemShopViewTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E75C: using guessed type int (__cdecl *ItemShopViewTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C334: using guessed type int `ITableBase<MiniHouse,MiniHouseTable>::ITableBase<MiniHouse,MiniHouseTable>'::`2'::`local static guard';
// A8C338: using guessed type int `ITableBase<ItemShopView,ItemShopViewTable>::ITableBase<ItemShopView,ItemShopViewTable>'::`2'::`local static guard';

//----- (00463B60) --------------------------------------------------------
void __thiscall WeaponAttribTab::WeaponAttribTab(WeaponAttribTab *this)
{
  WeaponAttribTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<WeaponAttrib,WeaponAttribTab>Vtbl *)&ITableBase<WeaponAttrib,WeaponAttribTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<WeaponAttrib,WeaponAttribTab>::ITableBase<WeaponAttrib,WeaponAttribTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<WeaponAttrib,WeaponAttribTab>::ITableBase<WeaponAttrib,WeaponAttribTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_WeaponAttrib_WeaponAttribTab_::ITableBase_WeaponAttrib_WeaponAttribTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<WeaponAttrib,WeaponAttribTab>Vtbl *)&WeaponAttribTab::`vftable';
}
// 97DE74: using guessed type int (__cdecl *ITableBase<WeaponAttrib,WeaponAttribTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E76C: using guessed type int (__cdecl *WeaponAttribTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C338: using guessed type int `ITableBase<ItemShopView,ItemShopViewTable>::ITableBase<ItemShopView,ItemShopViewTable>'::`2'::`local static guard';
// A8C33C: using guessed type int `ITableBase<WeaponAttrib,WeaponAttribTab>::ITableBase<WeaponAttrib,WeaponAttribTab>'::`2'::`local static guard';

//----- (00463BA0) --------------------------------------------------------
WeaponAttribTab *__thiscall WeaponAttribTab::`vector deleting destructor'(WeaponAttribTab *this, unsigned int a2)
{
  WeaponAttribTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<WeaponAttrib,WeaponAttribTab>Vtbl *)&ITableBase<WeaponAttrib,WeaponAttribTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DE74: using guessed type int (__cdecl *ITableBase<WeaponAttrib,WeaponAttribTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00463C20) --------------------------------------------------------
void __thiscall WorldMapAvatarInfoTab::WorldMapAvatarInfoTab(WorldMapAvatarInfoTab *this)
{
  WorldMapAvatarInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>Vtbl *)&ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_WorldMapAvatarInfo_WorldMapAvatarInfoTab_::ITableBase_WorldMapAvatarInfo_WorldMapAvatarInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>Vtbl *)&WorldMapAvatarInfoTab::`vftable';
}
// 97DE84: using guessed type int (__cdecl *ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E77C: using guessed type int (__cdecl *WorldMapAvatarInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C33C: using guessed type int `ITableBase<WeaponAttrib,WeaponAttribTab>::ITableBase<WeaponAttrib,WeaponAttribTab>'::`2'::`local static guard';
// A8C340: using guessed type int `ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>'::`2'::`local static guard';

//----- (00463C60) --------------------------------------------------------
void __thiscall ItemDismantleTab::ItemDismantleTab(ItemDismantleTab *this)
{
  ItemDismantleTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ItemDismantle,ItemDismantleTab>Vtbl *)&ITableBase<ItemDismantle,ItemDismantleTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ItemDismantle,ItemDismantleTab>::ITableBase<ItemDismantle,ItemDismantleTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ItemDismantle,ItemDismantleTab>::ITableBase<ItemDismantle,ItemDismantleTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ItemDismantle_ItemDismantleTab_::ITableBase_ItemDismantle_ItemDismantleTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<ItemDismantle,ItemDismantleTab>Vtbl *)&ItemDismantleTab::`vftable';
}
// 97DE94: using guessed type int (__cdecl *ITableBase<ItemDismantle,ItemDismantleTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E78C: using guessed type int (__cdecl *ItemDismantleTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C340: using guessed type int `ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>'::`2'::`local static guard';
// A8C344: using guessed type int `ITableBase<ItemDismantle,ItemDismantleTab>::ITableBase<ItemDismantle,ItemDismantleTab>'::`2'::`local static guard';

//----- (00463CA0) --------------------------------------------------------
ItemDismantleTab *__thiscall ITableBase<ItemDismantle,ItemDismantleTab>::`vector deleting destructor'(ItemDismantleTab *this, unsigned int a2)
{
  ItemDismantleTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ItemDismantle,ItemDismantleTab>Vtbl *)&ITableBase<ItemDismantle,ItemDismantleTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DE94: using guessed type int (__cdecl *ITableBase<ItemDismantle,ItemDismantleTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00463D20) --------------------------------------------------------
void __thiscall TownPortalInfoTable::TownPortalInfoTable(TownPortalInfoTable *this)
{
  TownPortalInfoTable *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<TownPortal,TownPortalInfoTable>Vtbl *)&ITableBase<TownPortal,TownPortalInfoTable>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<TownPortal,TownPortalInfoTable>::ITableBase<TownPortal,TownPortalInfoTable>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<TownPortal,TownPortalInfoTable>::ITableBase<TownPortal,TownPortalInfoTable>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_TownPortal_TownPortalInfoTable_::ITableBase_TownPortal_TownPortalInfoTable__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<TownPortal,TownPortalInfoTable>Vtbl *)&TownPortalInfoTable::`vftable';
}
// 97DEA4: using guessed type int (__cdecl *ITableBase<TownPortal,TownPortalInfoTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E79C: using guessed type int (__cdecl *TownPortalInfoTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C344: using guessed type int `ITableBase<ItemDismantle,ItemDismantleTab>::ITableBase<ItemDismantle,ItemDismantleTab>'::`2'::`local static guard';
// A8C348: using guessed type int `ITableBase<TownPortal,TownPortalInfoTable>::ITableBase<TownPortal,TownPortalInfoTable>'::`2'::`local static guard';

//----- (00463D60) --------------------------------------------------------
TownPortalInfoTable *__thiscall TownPortalInfoTable::`scalar deleting destructor'(TownPortalInfoTable *this, unsigned int a2)
{
  TownPortalInfoTable *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<TownPortal,TownPortalInfoTable>Vtbl *)&ITableBase<TownPortal,TownPortalInfoTable>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DEA4: using guessed type int (__cdecl *ITableBase<TownPortal,TownPortalInfoTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00463DE0) --------------------------------------------------------
void __thiscall SetItemNameTab::SetItemNameTab(SetItemNameTab *this)
{
  SetItemNameTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<SetItemName,SetItemNameTab>Vtbl *)&ITableBase<SetItemName,SetItemNameTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<SetItemName,SetItemNameTab>::ITableBase<SetItemName,SetItemNameTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<SetItemName,SetItemNameTab>::ITableBase<SetItemName,SetItemNameTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_SetItemName_SetItemNameTab_::ITableBase_SetItemName_SetItemNameTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<SetItemName,SetItemNameTab>Vtbl *)&SetItemNameTab::`vftable';
}
// 97DEB4: using guessed type int (__cdecl *ITableBase<SetItemName,SetItemNameTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E7AC: using guessed type int (__cdecl *SetItemNameTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C348: using guessed type int `ITableBase<TownPortal,TownPortalInfoTable>::ITableBase<TownPortal,TownPortalInfoTable>'::`2'::`local static guard';
// A8C34C: using guessed type int `ITableBase<SetItemName,SetItemNameTab>::ITableBase<SetItemName,SetItemNameTab>'::`2'::`local static guard';

//----- (00463E20) --------------------------------------------------------
SetItemNameTab *__thiscall ITableBase<SetItemName,SetItemNameTab>::`scalar deleting destructor'(SetItemNameTab *this, unsigned int a2)
{
  SetItemNameTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<SetItemName,SetItemNameTab>Vtbl *)&ITableBase<SetItemName,SetItemNameTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DEB4: using guessed type int (__cdecl *ITableBase<SetItemName,SetItemNameTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00463EA0) --------------------------------------------------------
void __thiscall ItemActionEffectDescTab::ItemActionEffectDescTab(ItemActionEffectDescTab *this)
{
  ItemActionEffectDescTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>Vtbl *)&ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ItemActionEffectDesc_ItemActionEffectDescTab_::ITableBase_ItemActionEffectDesc_ItemActionEffectDescTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>Vtbl *)&ItemActionEffectDescTab::`vftable';
}
// 97DEC4: using guessed type int (__cdecl *ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E7BC: using guessed type int (__cdecl *ItemActionEffectDescTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C34C: using guessed type int `ITableBase<SetItemName,SetItemNameTab>::ITableBase<SetItemName,SetItemNameTab>'::`2'::`local static guard';
// A8C350: using guessed type int `ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>'::`2'::`local static guard';

//----- (00463EE0) --------------------------------------------------------
ItemActionEffectDescTab *__thiscall ItemActionEffectDescTab::`scalar deleting destructor'(ItemActionEffectDescTab *this, unsigned int a2)
{
  ItemActionEffectDescTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>Vtbl *)&ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DEC4: using guessed type int (__cdecl *ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00463F60) --------------------------------------------------------
void __thiscall SetEffectTab::SetEffectTab(SetEffectTab *this)
{
  SetEffectTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<SetEffect,SetEffectTab>Vtbl *)&ITableBase<SetEffect,SetEffectTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<SetEffect,SetEffectTab>::ITableBase<SetEffect,SetEffectTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<SetEffect,SetEffectTab>::ITableBase<SetEffect,SetEffectTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_SetEffect_SetEffectTab_::ITableBase_SetEffect_SetEffectTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<SetEffect,SetEffectTab>Vtbl *)&SetEffectTab::`vftable';
}
// 97DED4: using guessed type int (__cdecl *ITableBase<SetEffect,SetEffectTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E7CC: using guessed type int (__cdecl *SetEffectTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C350: using guessed type int `ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>'::`2'::`local static guard';
// A8C354: using guessed type int `ITableBase<SetEffect,SetEffectTab>::ITableBase<SetEffect,SetEffectTab>'::`2'::`local static guard';

//----- (00463FA0) --------------------------------------------------------
SetEffectTab *__thiscall ITableBase<SetEffect,SetEffectTab>::`vector deleting destructor'(SetEffectTab *this, unsigned int a2)
{
  SetEffectTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<SetEffect,SetEffectTab>Vtbl *)&ITableBase<SetEffect,SetEffectTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DED4: using guessed type int (__cdecl *ITableBase<SetEffect,SetEffectTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00464020) --------------------------------------------------------
void __thiscall ActionEffectItemTab::ActionEffectItemTab(ActionEffectItemTab *this)
{
  ActionEffectItemTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ActionEffectItem,ActionEffectItemTab>Vtbl *)&ITableBase<ActionEffectItem,ActionEffectItemTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ActionEffectItem,ActionEffectItemTab>::ITableBase<ActionEffectItem,ActionEffectItemTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ActionEffectItem,ActionEffectItemTab>::ITableBase<ActionEffectItem,ActionEffectItemTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ActionEffectItem_ActionEffectItemTab_::ITableBase_ActionEffectItem_ActionEffectItemTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<ActionEffectItem,ActionEffectItemTab>Vtbl *)&ActionEffectItemTab::`vftable';
}
// 97DEE4: using guessed type int (__cdecl *ITableBase<ActionEffectItem,ActionEffectItemTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E7DC: using guessed type int (__cdecl *ActionEffectItemTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C354: using guessed type int `ITableBase<SetEffect,SetEffectTab>::ITableBase<SetEffect,SetEffectTab>'::`2'::`local static guard';
// A8C358: using guessed type int `ITableBase<ActionEffectItem,ActionEffectItemTab>::ITableBase<ActionEffectItem,ActionEffectItemTab>'::`2'::`local static guard';

//----- (00464060) --------------------------------------------------------
void __thiscall ItemActionTab::ItemActionTab(ItemActionTab *this)
{
  ItemActionTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ItemAction,ItemActionTab>Vtbl *)&ITableBase<ItemAction,ItemActionTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ItemAction,ItemActionTab>::ITableBase<ItemAction,ItemActionTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ItemAction,ItemActionTab>::ITableBase<ItemAction,ItemActionTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ItemAction_ItemActionTab_::ITableBase_ItemAction_ItemActionTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<ItemAction,ItemActionTab>Vtbl *)&ItemActionTab::`vftable';
}
// 97DEF4: using guessed type int (__cdecl *ITableBase<ItemAction,ItemActionTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E7EC: using guessed type int (__cdecl *ItemActionTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C358: using guessed type int `ITableBase<ActionEffectItem,ActionEffectItemTab>::ITableBase<ActionEffectItem,ActionEffectItemTab>'::`2'::`local static guard';
// A8C35C: using guessed type int `ITableBase<ItemAction,ItemActionTab>::ITableBase<ItemAction,ItemActionTab>'::`2'::`local static guard';

//----- (004640A0) --------------------------------------------------------
void __thiscall ItemActionEffectTab::ItemActionEffectTab(ItemActionEffectTab *this)
{
  ItemActionEffectTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ItemActionEffect,ItemActionEffectTab>Vtbl *)&ITableBase<ItemActionEffect,ItemActionEffectTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ItemActionEffect,ItemActionEffectTab>::ITableBase<ItemActionEffect,ItemActionEffectTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ItemActionEffect,ItemActionEffectTab>::ITableBase<ItemActionEffect,ItemActionEffectTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ItemActionEffect_ItemActionEffectTab_::ITableBase_ItemActionEffect_ItemActionEffectTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<ItemActionEffect,ItemActionEffectTab>Vtbl *)&ItemActionEffectTab::`vftable';
}
// 97DF04: using guessed type int (__cdecl *ITableBase<ItemActionEffect,ItemActionEffectTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E7FC: using guessed type int (__cdecl *ItemActionEffectTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C35C: using guessed type int `ITableBase<ItemAction,ItemActionTab>::ITableBase<ItemAction,ItemActionTab>'::`2'::`local static guard';
// A8C360: using guessed type int `ITableBase<ItemActionEffect,ItemActionEffectTab>::ITableBase<ItemActionEffect,ItemActionEffectTab>'::`2'::`local static guard';

//----- (004640E0) --------------------------------------------------------
void __thiscall ItemActionConditionTab::ItemActionConditionTab(ItemActionConditionTab *this)
{
  ItemActionConditionTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ItemActionCondition,ItemActionConditionTab>Vtbl *)&ITableBase<ItemActionCondition,ItemActionConditionTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ItemActionCondition,ItemActionConditionTab>::ITableBase<ItemActionCondition,ItemActionConditionTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ItemActionCondition,ItemActionConditionTab>::ITableBase<ItemActionCondition,ItemActionConditionTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ItemActionCondition_ItemActionConditionTab_::ITableBase_ItemActionCondition_ItemActionConditionTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<ItemActionCondition,ItemActionConditionTab>Vtbl *)&ItemActionConditionTab::`vftable';
}
// 97DF14: using guessed type int (__cdecl *ITableBase<ItemActionCondition,ItemActionConditionTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E80C: using guessed type int (__cdecl *ItemActionConditionTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C360: using guessed type int `ITableBase<ItemActionEffect,ItemActionEffectTab>::ITableBase<ItemActionEffect,ItemActionEffectTab>'::`2'::`local static guard';
// A8C364: using guessed type int `ITableBase<ItemActionCondition,ItemActionConditionTab>::ITableBase<ItemActionCondition,ItemActionConditionTab>'::`2'::`local static guard';

//----- (00464120) --------------------------------------------------------
void __thiscall GuildTournamentStateDescTab::GuildTournamentStateDescTab(GuildTournamentStateDescTab *this)
{
  GuildTournamentStateDescTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>Vtbl *)&ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_GUILD_TOURNAMENT_SKILLDESC_GuildTournamentStateDescTab_::ITableBase_GUILD_TOURNAMENT_SKILLDESC_GuildTournamentStateDescTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>Vtbl *)&GuildTournamentStateDescTab::`vftable';
}
// 97DF24: using guessed type int (__cdecl *ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E81C: using guessed type int (__cdecl *GuildTournamentStateDescTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C364: using guessed type int `ITableBase<ItemActionCondition,ItemActionConditionTab>::ITableBase<ItemActionCondition,ItemActionConditionTab>'::`2'::`local static guard';
// A8C368: using guessed type int `ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>'::`2'::`local static guard';

//----- (00464160) --------------------------------------------------------
GuildTournamentStateDescTab *__thiscall GuildTournamentStateDescTab::`vector deleting destructor'(GuildTournamentStateDescTab *this, unsigned int a2)
{
  GuildTournamentStateDescTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>Vtbl *)&ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DF24: using guessed type int (__cdecl *ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004641E0) --------------------------------------------------------
void __thiscall GuildTournamentStateTab::GuildTournamentStateTab(GuildTournamentStateTab *this)
{
  GuildTournamentStateTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>Vtbl *)&ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_GUILD_TOURNAMENT_SKILL_GuildTournamentStateTab_::ITableBase_GUILD_TOURNAMENT_SKILL_GuildTournamentStateTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>Vtbl *)&GuildTournamentStateTab::`vftable';
}
// 97DF34: using guessed type int (__cdecl *ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E82C: using guessed type int (__cdecl *GuildTournamentStateTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C368: using guessed type int `ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>'::`2'::`local static guard';
// A8C36C: using guessed type int `ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>'::`2'::`local static guard';

//----- (00464220) --------------------------------------------------------
GuildTournamentStateTab *__thiscall GuildTournamentStateTab::`vector deleting destructor'(GuildTournamentStateTab *this, unsigned int a2)
{
  GuildTournamentStateTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>Vtbl *)&ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DF34: using guessed type int (__cdecl *ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004642A0) --------------------------------------------------------
void __thiscall GTRequireTab::GTRequireTab(GTRequireTab *this)
{
  GTRequireTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>Vtbl *)&ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_GUILD_TOURNAMENT_REQUIRE_GTRequireTab_::ITableBase_GUILD_TOURNAMENT_REQUIRE_GTRequireTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>Vtbl *)&GTRequireTab::`vftable';
}
// 97DF44: using guessed type int (__cdecl *ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E83C: using guessed type int (__cdecl *GTRequireTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C36C: using guessed type int `ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>'::`2'::`local static guard';
// A8C370: using guessed type int `ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>'::`2'::`local static guard';

//----- (004642E0) --------------------------------------------------------
GTRequireTab *__thiscall ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::`scalar deleting destructor'(GTRequireTab *this, unsigned int a2)
{
  GTRequireTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>Vtbl *)&ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DF44: using guessed type int (__cdecl *ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00464360) --------------------------------------------------------
void __thiscall DiceDividIndTab::DiceDividIndTab(DiceDividIndTab *this)
{
  DiceDividIndTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<DICE_Dividind,DiceDividIndTab>Vtbl *)&ITableBase<DICE_Dividind,DiceDividIndTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<DICE_Dividind,DiceDividIndTab>::ITableBase<DICE_Dividind,DiceDividIndTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<DICE_Dividind,DiceDividIndTab>::ITableBase<DICE_Dividind,DiceDividIndTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_DICE_Dividind_DiceDividIndTab_::ITableBase_DICE_Dividind_DiceDividIndTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<DICE_Dividind,DiceDividIndTab>Vtbl *)&DiceDividIndTab::`vftable';
}
// 97DF54: using guessed type int (__cdecl *ITableBase<DICE_Dividind,DiceDividIndTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E84C: using guessed type int (__cdecl *DiceDividIndTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C370: using guessed type int `ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>'::`2'::`local static guard';
// A8C374: using guessed type int `ITableBase<DICE_Dividind,DiceDividIndTab>::ITableBase<DICE_Dividind,DiceDividIndTab>'::`2'::`local static guard';

//----- (004643A0) --------------------------------------------------------
DiceDividIndTab *__thiscall DiceDividIndTab::`vector deleting destructor'(DiceDividIndTab *this, unsigned int a2)
{
  DiceDividIndTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<DICE_Dividind,DiceDividIndTab>Vtbl *)&ITableBase<DICE_Dividind,DiceDividIndTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DF54: using guessed type int (__cdecl *ITableBase<DICE_Dividind,DiceDividIndTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00464420) --------------------------------------------------------
void __thiscall GBDiceDividIndTab::GBDiceDividIndTab(GBDiceDividIndTab *this)
{
  GBDiceDividIndTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>Vtbl *)&ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_GB_DICE_Dividind_GBDiceDividIndTab_::ITableBase_GB_DICE_Dividind_GBDiceDividIndTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>Vtbl *)&GBDiceDividIndTab::`vftable';
}
// 97DF64: using guessed type int (__cdecl *ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E85C: using guessed type int (__cdecl *GBDiceDividIndTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C374: using guessed type int `ITableBase<DICE_Dividind,DiceDividIndTab>::ITableBase<DICE_Dividind,DiceDividIndTab>'::`2'::`local static guard';
// A8C378: using guessed type int `ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>'::`2'::`local static guard';

//----- (00464460) --------------------------------------------------------
GBDiceDividIndTab *__thiscall GBDiceDividIndTab::`scalar deleting destructor'(GBDiceDividIndTab *this, unsigned int a2)
{
  GBDiceDividIndTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>Vtbl *)&ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DF64: using guessed type int (__cdecl *ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004644E0) --------------------------------------------------------
void __thiscall GBHouseTab::GBHouseTab(GBHouseTab *this)
{
  GBHouseTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<GBHouse,GBHouseTab>Vtbl *)&ITableBase<GBHouse,GBHouseTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<GBHouse,GBHouseTab>::ITableBase<GBHouse,GBHouseTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<GBHouse,GBHouseTab>::ITableBase<GBHouse,GBHouseTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_GBHouse_GBHouseTab_::ITableBase_GBHouse_GBHouseTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<GBHouse,GBHouseTab>Vtbl *)&GBHouseTab::`vftable';
}
// 97DF74: using guessed type int (__cdecl *ITableBase<GBHouse,GBHouseTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E86C: using guessed type int (__cdecl *GBHouseTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C378: using guessed type int `ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>'::`2'::`local static guard';
// A8C37C: using guessed type int `ITableBase<GBHouse,GBHouseTab>::ITableBase<GBHouse,GBHouseTab>'::`2'::`local static guard';

//----- (00464520) --------------------------------------------------------
void __thiscall MobRandomIdleAniTab::MobRandomIdleAniTab(MobRandomIdleAniTab *this)
{
  MobRandomIdleAniTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>Vtbl *)&ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MobRandomIdleAni_MobRandomIdleAniTab_::ITableBase_MobRandomIdleAni_MobRandomIdleAniTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>Vtbl *)&MobRandomIdleAniTab::`vftable';
}
// 97DF84: using guessed type int (__cdecl *ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E87C: using guessed type int (__cdecl *MobRandomIdleAniTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C37C: using guessed type int `ITableBase<GBHouse,GBHouseTab>::ITableBase<GBHouse,GBHouseTab>'::`2'::`local static guard';
// A8C380: using guessed type int `ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>'::`2'::`local static guard';

//----- (00464560) --------------------------------------------------------
MobRandomIdleAniTab *__thiscall MobRandomIdleAniTab::`scalar deleting destructor'(MobRandomIdleAniTab *this, unsigned int a2)
{
  MobRandomIdleAniTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>Vtbl *)&ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DF84: using guessed type int (__cdecl *ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004645E0) --------------------------------------------------------
void __thiscall CharacterTitleStateViewTab::CharacterTitleStateViewTab(CharacterTitleStateViewTab *this)
{
  CharacterTitleStateViewTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>Vtbl *)&ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_CharacterTitleStateView_CharacterTitleStateViewTab_::ITableBase_CharacterTitleStateView_CharacterTitleStateViewTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>Vtbl *)&CharacterTitleStateViewTab::`vftable';
}
// 97DF94: using guessed type int (__cdecl *ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E88C: using guessed type int (__cdecl *CharacterTitleStateViewTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C380: using guessed type int `ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>'::`2'::`local static guard';
// A8C384: using guessed type int `ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>'::`2'::`local static guard';

//----- (00464620) --------------------------------------------------------
void __thiscall GTIViewInfoTab::GTIViewInfoTab(GTIViewInfoTab *this)
{
  GTIViewInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<GTIView,GTIViewInfoTab>Vtbl *)&ITableBase<GTIView,GTIViewInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<GTIView,GTIViewInfoTab>::ITableBase<GTIView,GTIViewInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<GTIView,GTIViewInfoTab>::ITableBase<GTIView,GTIViewInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_GTIView_GTIViewInfoTab_::ITableBase_GTIView_GTIViewInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<GTIView,GTIViewInfoTab>Vtbl *)&GTIViewInfoTab::`vftable';
}
// 97DFF4: using guessed type int (__cdecl *ITableBase<GTIView,GTIViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E89C: using guessed type int (__cdecl *GTIViewInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C384: using guessed type int `ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>'::`2'::`local static guard';
// A8C388: using guessed type int `ITableBase<GTIView,GTIViewInfoTab>::ITableBase<GTIView,GTIViewInfoTab>'::`2'::`local static guard';

//----- (00464660) --------------------------------------------------------
void __thiscall DamageEffectTab::DamageEffectTab(DamageEffectTab *this)
{
  DamageEffectTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<DamageEffect,DamageEffectTab>Vtbl *)&ITableBase<DamageEffect,DamageEffectTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<DamageEffect,DamageEffectTab>::ITableBase<DamageEffect,DamageEffectTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<DamageEffect,DamageEffectTab>::ITableBase<DamageEffect,DamageEffectTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_DamageEffect_DamageEffectTab_::ITableBase_DamageEffect_DamageEffectTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<DamageEffect,DamageEffectTab>Vtbl *)&DamageEffectTab::`vftable';
}
// 97E004: using guessed type int (__cdecl *ITableBase<DamageEffect,DamageEffectTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E8AC: using guessed type int (__cdecl *DamageEffectTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C388: using guessed type int `ITableBase<GTIView,GTIViewInfoTab>::ITableBase<GTIView,GTIViewInfoTab>'::`2'::`local static guard';
// A8C38C: using guessed type int `ITableBase<DamageEffect,DamageEffectTab>::ITableBase<DamageEffect,DamageEffectTab>'::`2'::`local static guard';

//----- (004646A0) --------------------------------------------------------
DamageEffectTab *__thiscall DamageEffectTab::`vector deleting destructor'(DamageEffectTab *this, unsigned int a2)
{
  DamageEffectTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<DamageEffect,DamageEffectTab>Vtbl *)&ITableBase<DamageEffect,DamageEffectTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E004: using guessed type int (__cdecl *ITableBase<DamageEffect,DamageEffectTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00464720) --------------------------------------------------------
void __thiscall ActiveSkillGroupTab::ActiveSkillGroupTab(ActiveSkillGroupTab *this)
{
  ActiveSkillGroupTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>Vtbl *)&ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ActiveSkillGroup_ActiveSkillGroupTab_::ITableBase_ActiveSkillGroup_ActiveSkillGroupTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>Vtbl *)&ActiveSkillGroupTab::`vftable';
}
// 97E014: using guessed type int (__cdecl *ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E8BC: using guessed type int (__cdecl *ActiveSkillGroupTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C38C: using guessed type int `ITableBase<DamageEffect,DamageEffectTab>::ITableBase<DamageEffect,DamageEffectTab>'::`2'::`local static guard';
// A8C390: using guessed type int `ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>'::`2'::`local static guard';

//----- (00464760) --------------------------------------------------------
ActiveSkillGroupTab *__thiscall ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::`scalar deleting destructor'(ActiveSkillGroupTab *this, unsigned int a2)
{
  ActiveSkillGroupTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>Vtbl *)&ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E014: using guessed type int (__cdecl *ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004647E0) --------------------------------------------------------
void __thiscall MapWayPointTab::MapWayPointTab(MapWayPointTab *this)
{
  MapWayPointTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MapWayPoint,MapWayPointTab>Vtbl *)&ITableBase<MapWayPoint,MapWayPointTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MapWayPoint,MapWayPointTab>::ITableBase<MapWayPoint,MapWayPointTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MapWayPoint,MapWayPointTab>::ITableBase<MapWayPoint,MapWayPointTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MapWayPoint_MapWayPointTab_::ITableBase_MapWayPoint_MapWayPointTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<MapWayPoint,MapWayPointTab>Vtbl *)&MapWayPointTab::`vftable';
}
// 97E024: using guessed type int (__cdecl *ITableBase<MapWayPoint,MapWayPointTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E8CC: using guessed type int (__cdecl *MapWayPointTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C390: using guessed type int `ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>'::`2'::`local static guard';
// A8C394: using guessed type int `ITableBase<MapWayPoint,MapWayPointTab>::ITableBase<MapWayPoint,MapWayPointTab>'::`2'::`local static guard';

//----- (00464820) --------------------------------------------------------
void __thiscall MapLinkPointTab::MapLinkPointTab(MapLinkPointTab *this)
{
  MapLinkPointTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MapLinkPoint,MapLinkPointTab>Vtbl *)&ITableBase<MapLinkPoint,MapLinkPointTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MapLinkPoint,MapLinkPointTab>::ITableBase<MapLinkPoint,MapLinkPointTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MapLinkPoint,MapLinkPointTab>::ITableBase<MapLinkPoint,MapLinkPointTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MapLinkPoint_MapLinkPointTab_::ITableBase_MapLinkPoint_MapLinkPointTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<MapLinkPoint,MapLinkPointTab>Vtbl *)&MapLinkPointTab::`vftable';
}
// 97E034: using guessed type int (__cdecl *ITableBase<MapLinkPoint,MapLinkPointTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E8DC: using guessed type int (__cdecl *MapLinkPointTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C394: using guessed type int `ITableBase<MapWayPoint,MapWayPointTab>::ITableBase<MapWayPoint,MapWayPointTab>'::`2'::`local static guard';
// A8C398: using guessed type int `ITableBase<MapLinkPoint,MapLinkPointTab>::ITableBase<MapLinkPoint,MapLinkPointTab>'::`2'::`local static guard';

//----- (00464860) --------------------------------------------------------
void __thiscall BelongTypeInfoTab::BelongTypeInfoTab(BelongTypeInfoTab *this)
{
  BelongTypeInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<BelongTypeInfo,BelongTypeInfoTab>Vtbl *)&ITableBase<BelongTypeInfo,BelongTypeInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<BelongTypeInfo,BelongTypeInfoTab>::ITableBase<BelongTypeInfo,BelongTypeInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<BelongTypeInfo,BelongTypeInfoTab>::ITableBase<BelongTypeInfo,BelongTypeInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_BelongTypeInfo_BelongTypeInfoTab_::ITableBase_BelongTypeInfo_BelongTypeInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<BelongTypeInfo,BelongTypeInfoTab>Vtbl *)&BelongTypeInfoTab::`vftable';
}
// 97E044: using guessed type int (__cdecl *ITableBase<BelongTypeInfo,BelongTypeInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E8EC: using guessed type int (__cdecl *BelongTypeInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C398: using guessed type int `ITableBase<MapLinkPoint,MapLinkPointTab>::ITableBase<MapLinkPoint,MapLinkPointTab>'::`2'::`local static guard';
// A8C39C: using guessed type int `ITableBase<BelongTypeInfo,BelongTypeInfoTab>::ITableBase<BelongTypeInfo,BelongTypeInfoTab>'::`2'::`local static guard';

//----- (004648A0) --------------------------------------------------------
void __thiscall ChargedDeletableBuffTab::ChargedDeletableBuffTab(ChargedDeletableBuffTab *this)
{
  ChargedDeletableBuffTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>Vtbl *)&ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>::ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>::ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ChargedDeletableBuff_ChargedDeletableBuffTab_::ITableBase_ChargedDeletableBuff_ChargedDeletableBuffTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>Vtbl *)&ChargedDeletableBuffTab::`vftable';
}
// 97E0A4: using guessed type int (__cdecl *ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E8FC: using guessed type int (__cdecl *ChargedDeletableBuffTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C39C: using guessed type int `ITableBase<BelongTypeInfo,BelongTypeInfoTab>::ITableBase<BelongTypeInfo,BelongTypeInfoTab>'::`2'::`local static guard';
// A8C3A0: using guessed type int `ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>::ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>'::`2'::`local static guard';

//----- (004648E0) --------------------------------------------------------
ChargedDeletableBuffTab *__thiscall ChargedDeletableBuffTab::`vector deleting destructor'(ChargedDeletableBuffTab *this, unsigned int a2)
{
  ChargedDeletableBuffTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>Vtbl *)&ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E0A4: using guessed type int (__cdecl *ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00464960) --------------------------------------------------------
void __thiscall BasicInfoTitleTab::BasicInfoTitleTab(BasicInfoTitleTab *this)
{
  BasicInfoTitleTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<BasicInfoTitle,BasicInfoTitleTab>Vtbl *)&ITableBase<BasicInfoTitle,BasicInfoTitleTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<BasicInfoTitle,BasicInfoTitleTab>::ITableBase<BasicInfoTitle,BasicInfoTitleTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<BasicInfoTitle,BasicInfoTitleTab>::ITableBase<BasicInfoTitle,BasicInfoTitleTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_BasicInfoTitle_BasicInfoTitleTab_::ITableBase_BasicInfoTitle_BasicInfoTitleTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<BasicInfoTitle,BasicInfoTitleTab>Vtbl *)&BasicInfoTitleTab::`vftable';
}
// 97E0B4: using guessed type int (__cdecl *ITableBase<BasicInfoTitle,BasicInfoTitleTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E90C: using guessed type int (__cdecl *BasicInfoTitleTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C3A0: using guessed type int `ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>::ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>'::`2'::`local static guard';
// A8C3A4: using guessed type int `ITableBase<BasicInfoTitle,BasicInfoTitleTab>::ITableBase<BasicInfoTitle,BasicInfoTitleTab>'::`2'::`local static guard';

//----- (004649A0) --------------------------------------------------------
BasicInfoTitleTab *__thiscall BasicInfoTitleTab::`vector deleting destructor'(BasicInfoTitleTab *this, unsigned int a2)
{
  BasicInfoTitleTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<BasicInfoTitle,BasicInfoTitleTab>Vtbl *)&ITableBase<BasicInfoTitle,BasicInfoTitleTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E0B4: using guessed type int (__cdecl *ITableBase<BasicInfoTitle,BasicInfoTitleTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00464A20) --------------------------------------------------------
void __thiscall BasicInfoLinkTab::BasicInfoLinkTab(BasicInfoLinkTab *this)
{
  BasicInfoLinkTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<BasicInfoLink,BasicInfoLinkTab>Vtbl *)&ITableBase<BasicInfoLink,BasicInfoLinkTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<BasicInfoLink,BasicInfoLinkTab>::ITableBase<BasicInfoLink,BasicInfoLinkTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<BasicInfoLink,BasicInfoLinkTab>::ITableBase<BasicInfoLink,BasicInfoLinkTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_BasicInfoLink_BasicInfoLinkTab_::ITableBase_BasicInfoLink_BasicInfoLinkTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<BasicInfoLink,BasicInfoLinkTab>Vtbl *)&BasicInfoLinkTab::`vftable';
}
// 97E0C4: using guessed type int (__cdecl *ITableBase<BasicInfoLink,BasicInfoLinkTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E91C: using guessed type int (__cdecl *BasicInfoLinkTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C3A4: using guessed type int `ITableBase<BasicInfoTitle,BasicInfoTitleTab>::ITableBase<BasicInfoTitle,BasicInfoTitleTab>'::`2'::`local static guard';
// A8C3A8: using guessed type int `ITableBase<BasicInfoLink,BasicInfoLinkTab>::ITableBase<BasicInfoLink,BasicInfoLinkTab>'::`2'::`local static guard';

//----- (00464A60) --------------------------------------------------------
BasicInfoLinkTab *__thiscall BasicInfoLinkTab::`vector deleting destructor'(BasicInfoLinkTab *this, unsigned int a2)
{
  BasicInfoLinkTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<BasicInfoLink,BasicInfoLinkTab>Vtbl *)&ITableBase<BasicInfoLink,BasicInfoLinkTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E0C4: using guessed type int (__cdecl *ITableBase<BasicInfoLink,BasicInfoLinkTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00464AE0) --------------------------------------------------------
void __thiscall BasicInfoTipTab::BasicInfoTipTab(BasicInfoTipTab *this)
{
  BasicInfoTipTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<BasicInfoTip,BasicInfoTipTab>Vtbl *)&ITableBase<BasicInfoTip,BasicInfoTipTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<BasicInfoTip,BasicInfoTipTab>::ITableBase<BasicInfoTip,BasicInfoTipTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<BasicInfoTip,BasicInfoTipTab>::ITableBase<BasicInfoTip,BasicInfoTipTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_BasicInfoTip_BasicInfoTipTab_::ITableBase_BasicInfoTip_BasicInfoTipTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<BasicInfoTip,BasicInfoTipTab>Vtbl *)&BasicInfoTipTab::`vftable';
}
// 97E0D4: using guessed type int (__cdecl *ITableBase<BasicInfoTip,BasicInfoTipTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E92C: using guessed type int (__cdecl *BasicInfoTipTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C3A8: using guessed type int `ITableBase<BasicInfoLink,BasicInfoLinkTab>::ITableBase<BasicInfoLink,BasicInfoLinkTab>'::`2'::`local static guard';
// A8C3AC: using guessed type int `ITableBase<BasicInfoTip,BasicInfoTipTab>::ITableBase<BasicInfoTip,BasicInfoTipTab>'::`2'::`local static guard';

//----- (00464B20) --------------------------------------------------------
void __thiscall BasicInfoTipCycleTab::BasicInfoTipCycleTab(BasicInfoTipCycleTab *this)
{
  BasicInfoTipCycleTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>Vtbl *)&ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>::ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>::ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_BasicInfoTipCycle_BasicInfoTipCycleTab_::ITableBase_BasicInfoTipCycle_BasicInfoTipCycleTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>Vtbl *)&BasicInfoTipCycleTab::`vftable';
}
// 97E0E4: using guessed type int (__cdecl *ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E93C: using guessed type int (__cdecl *BasicInfoTipCycleTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C3AC: using guessed type int `ITableBase<BasicInfoTip,BasicInfoTipTab>::ITableBase<BasicInfoTip,BasicInfoTipTab>'::`2'::`local static guard';
// A8C3B0: using guessed type int `ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>::ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>'::`2'::`local static guard';

//----- (00464B60) --------------------------------------------------------
void __thiscall BasicInfoFindTab::BasicInfoFindTab(BasicInfoFindTab *this)
{
  BasicInfoFindTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<BasicInfoFind,BasicInfoFindTab>Vtbl *)&ITableBase<BasicInfoFind,BasicInfoFindTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<BasicInfoFind,BasicInfoFindTab>::ITableBase<BasicInfoFind,BasicInfoFindTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<BasicInfoFind,BasicInfoFindTab>::ITableBase<BasicInfoFind,BasicInfoFindTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_BasicInfoFind_BasicInfoFindTab_::ITableBase_BasicInfoFind_BasicInfoFindTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<BasicInfoFind,BasicInfoFindTab>Vtbl *)&BasicInfoFindTab::`vftable';
}
// 97E0F4: using guessed type int (__cdecl *ITableBase<BasicInfoFind,BasicInfoFindTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E94C: using guessed type int (__cdecl *BasicInfoFindTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C3B0: using guessed type int `ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>::ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>'::`2'::`local static guard';
// A8C3B4: using guessed type int `ITableBase<BasicInfoFind,BasicInfoFindTab>::ITableBase<BasicInfoFind,BasicInfoFindTab>'::`2'::`local static guard';

//----- (00464BA0) --------------------------------------------------------
BasicInfoFindTab *__thiscall ITableBase<BasicInfoFind,BasicInfoFindTab>::`vector deleting destructor'(BasicInfoFindTab *this, unsigned int a2)
{
  BasicInfoFindTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<BasicInfoFind,BasicInfoFindTab>Vtbl *)&ITableBase<BasicInfoFind,BasicInfoFindTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E0F4: using guessed type int (__cdecl *ITableBase<BasicInfoFind,BasicInfoFindTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00464C20) --------------------------------------------------------
void __thiscall BasicInfoFindUITab::BasicInfoFindUITab(BasicInfoFindUITab *this)
{
  BasicInfoFindUITab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<BasicInfoFindUI,BasicInfoFindUITab>Vtbl *)&ITableBase<BasicInfoFindUI,BasicInfoFindUITab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<BasicInfoFindUI,BasicInfoFindUITab>::ITableBase<BasicInfoFindUI,BasicInfoFindUITab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<BasicInfoFindUI,BasicInfoFindUITab>::ITableBase<BasicInfoFindUI,BasicInfoFindUITab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_BasicInfoFindUI_BasicInfoFindUITab_::ITableBase_BasicInfoFindUI_BasicInfoFindUITab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<BasicInfoFindUI,BasicInfoFindUITab>Vtbl *)&BasicInfoFindUITab::`vftable';
}
// 97E104: using guessed type int (__cdecl *ITableBase<BasicInfoFindUI,BasicInfoFindUITab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E95C: using guessed type int (__cdecl *BasicInfoFindUITab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C3B4: using guessed type int `ITableBase<BasicInfoFind,BasicInfoFindTab>::ITableBase<BasicInfoFind,BasicInfoFindTab>'::`2'::`local static guard';
// A8C3B8: using guessed type int `ITableBase<BasicInfoFindUI,BasicInfoFindUITab>::ITableBase<BasicInfoFindUI,BasicInfoFindUITab>'::`2'::`local static guard';

//----- (00464C60) --------------------------------------------------------
void __thiscall BasicInfoFindWordTab::BasicInfoFindWordTab(BasicInfoFindWordTab *this)
{
  BasicInfoFindWordTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>Vtbl *)&ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_BasicInfoFindWord_BasicInfoFindWordTab_::ITableBase_BasicInfoFindWord_BasicInfoFindWordTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>Vtbl *)&BasicInfoFindWordTab::`vftable';
}
// 97E114: using guessed type int (__cdecl *ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E96C: using guessed type int (__cdecl *BasicInfoFindWordTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C3B8: using guessed type int `ITableBase<BasicInfoFindUI,BasicInfoFindUITab>::ITableBase<BasicInfoFindUI,BasicInfoFindUITab>'::`2'::`local static guard';
// A8C3BC: using guessed type int `ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>'::`2'::`local static guard';

//----- (00464CA0) --------------------------------------------------------
BasicInfoFindWordTab *__thiscall BasicInfoFindWordTab::`scalar deleting destructor'(BasicInfoFindWordTab *this, unsigned int a2)
{
  BasicInfoFindWordTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>Vtbl *)&ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E114: using guessed type int (__cdecl *ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00464D20) --------------------------------------------------------
void __thiscall CollectCardTab::CollectCardTab(CollectCardTab *this)
{
  CollectCardTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<CollectCard,CollectCardTab>Vtbl *)&ITableBase<CollectCard,CollectCardTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<CollectCard,CollectCardTab>::ITableBase<CollectCard,CollectCardTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<CollectCard,CollectCardTab>::ITableBase<CollectCard,CollectCardTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_CollectCard_CollectCardTab_::ITableBase_CollectCard_CollectCardTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<CollectCard,CollectCardTab>Vtbl *)&CollectCardTab::`vftable';
}
// 97E124: using guessed type int (__cdecl *ITableBase<CollectCard,CollectCardTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E97C: using guessed type int (__cdecl *CollectCardTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C3BC: using guessed type int `ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>'::`2'::`local static guard';
// A8C3C0: using guessed type int `ITableBase<CollectCard,CollectCardTab>::ITableBase<CollectCard,CollectCardTab>'::`2'::`local static guard';

//----- (00464D60) --------------------------------------------------------
CollectCardTab *__thiscall CollectCardTab::`scalar deleting destructor'(CollectCardTab *this, unsigned int a2)
{
  CollectCardTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<CollectCard,CollectCardTab>Vtbl *)&ITableBase<CollectCard,CollectCardTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E124: using guessed type int (__cdecl *ITableBase<CollectCard,CollectCardTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00464DE0) --------------------------------------------------------
void __thiscall CollectCardViewTab::CollectCardViewTab(CollectCardViewTab *this)
{
  CollectCardViewTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<CollectCardView,CollectCardViewTab>Vtbl *)&ITableBase<CollectCardView,CollectCardViewTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<CollectCardView,CollectCardViewTab>::ITableBase<CollectCardView,CollectCardViewTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<CollectCardView,CollectCardViewTab>::ITableBase<CollectCardView,CollectCardViewTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_CollectCardView_CollectCardViewTab_::ITableBase_CollectCardView_CollectCardViewTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<CollectCardView,CollectCardViewTab>Vtbl *)&CollectCardViewTab::`vftable';
}
// 97E134: using guessed type int (__cdecl *ITableBase<CollectCardView,CollectCardViewTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E98C: using guessed type int (__cdecl *CollectCardViewTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C3C0: using guessed type int `ITableBase<CollectCard,CollectCardTab>::ITableBase<CollectCard,CollectCardTab>'::`2'::`local static guard';
// A8C3C4: using guessed type int `ITableBase<CollectCardView,CollectCardViewTab>::ITableBase<CollectCardView,CollectCardViewTab>'::`2'::`local static guard';

//----- (00464E20) --------------------------------------------------------
CollectCardViewTab *__thiscall CollectCardViewTab::`scalar deleting destructor'(CollectCardViewTab *this, unsigned int a2)
{
  CollectCardViewTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<CollectCardView,CollectCardViewTab>Vtbl *)&ITableBase<CollectCardView,CollectCardViewTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E134: using guessed type int (__cdecl *ITableBase<CollectCardView,CollectCardViewTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00464EA0) --------------------------------------------------------
void __thiscall CollectCardGroupDescTab::CollectCardGroupDescTab(CollectCardGroupDescTab *this)
{
  CollectCardGroupDescTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>Vtbl *)&ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_CollectCardGroupDesc_CollectCardGroupDescTab_::ITableBase_CollectCardGroupDesc_CollectCardGroupDescTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>Vtbl *)&CollectCardGroupDescTab::`vftable';
}
// 97E144: using guessed type int (__cdecl *ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E99C: using guessed type int (__cdecl *CollectCardGroupDescTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C3C4: using guessed type int `ITableBase<CollectCardView,CollectCardViewTab>::ITableBase<CollectCardView,CollectCardViewTab>'::`2'::`local static guard';
// A8C3C8: using guessed type int `ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>'::`2'::`local static guard';

//----- (00464EE0) --------------------------------------------------------
CollectCardGroupDescTab *__thiscall CollectCardGroupDescTab::`scalar deleting destructor'(CollectCardGroupDescTab *this, unsigned int a2)
{
  CollectCardGroupDescTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>Vtbl *)&ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E144: using guessed type int (__cdecl *ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00464F60) --------------------------------------------------------
void __thiscall CollectCardRewardTab::CollectCardRewardTab(CollectCardRewardTab *this)
{
  CollectCardRewardTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<CollectCardReward,CollectCardRewardTab>Vtbl *)&ITableBase<CollectCardReward,CollectCardRewardTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<CollectCardReward,CollectCardRewardTab>::ITableBase<CollectCardReward,CollectCardRewardTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<CollectCardReward,CollectCardRewardTab>::ITableBase<CollectCardReward,CollectCardRewardTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_CollectCardReward_CollectCardRewardTab_::ITableBase_CollectCardReward_CollectCardRewardTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<CollectCardReward,CollectCardRewardTab>Vtbl *)&CollectCardRewardTab::`vftable';
}
// 97E154: using guessed type int (__cdecl *ITableBase<CollectCardReward,CollectCardRewardTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E9AC: using guessed type int (__cdecl *CollectCardRewardTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C3C8: using guessed type int `ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>'::`2'::`local static guard';
// A8C3CC: using guessed type int `ITableBase<CollectCardReward,CollectCardRewardTab>::ITableBase<CollectCardReward,CollectCardRewardTab>'::`2'::`local static guard';

//----- (00464FA0) --------------------------------------------------------
void __thiscall CollectCardTitleTab::CollectCardTitleTab(CollectCardTitleTab *this)
{
  CollectCardTitleTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<CollectCardTitle,CollectCardTitleTab>Vtbl *)&ITableBase<CollectCardTitle,CollectCardTitleTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<CollectCardTitle,CollectCardTitleTab>::ITableBase<CollectCardTitle,CollectCardTitleTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<CollectCardTitle,CollectCardTitleTab>::ITableBase<CollectCardTitle,CollectCardTitleTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_CollectCardTitle_CollectCardTitleTab_::ITableBase_CollectCardTitle_CollectCardTitleTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<CollectCardTitle,CollectCardTitleTab>Vtbl *)&CollectCardTitleTab::`vftable';
}
// 97E164: using guessed type int (__cdecl *ITableBase<CollectCardTitle,CollectCardTitleTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E9BC: using guessed type int (__cdecl *CollectCardTitleTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C3CC: using guessed type int `ITableBase<CollectCardReward,CollectCardRewardTab>::ITableBase<CollectCardReward,CollectCardRewardTab>'::`2'::`local static guard';
// A8C3D0: using guessed type int `ITableBase<CollectCardTitle,CollectCardTitleTab>::ITableBase<CollectCardTitle,CollectCardTitleTab>'::`2'::`local static guard';

//----- (00464FE0) --------------------------------------------------------
CollectCardTitleTab *__thiscall CollectCardTitleTab::`vector deleting destructor'(CollectCardTitleTab *this, unsigned int a2)
{
  CollectCardTitleTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<CollectCardTitle,CollectCardTitleTab>Vtbl *)&ITableBase<CollectCardTitle,CollectCardTitleTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E164: using guessed type int (__cdecl *ITableBase<CollectCardTitle,CollectCardTitleTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00465060) --------------------------------------------------------
void __thiscall MoverMainTab::MoverMainTab(MoverMainTab *this)
{
  MoverMainTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MoverMain,MoverMainTab>Vtbl *)&ITableBase<MoverMain,MoverMainTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MoverMain,MoverMainTab>::ITableBase<MoverMain,MoverMainTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MoverMain,MoverMainTab>::ITableBase<MoverMain,MoverMainTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MoverMain_MoverMainTab_::ITableBase_MoverMain_MoverMainTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<MoverMain,MoverMainTab>Vtbl *)&MoverMainTab::`vftable';
}
// 97E19C: using guessed type int (__cdecl *ITableBase<MoverMain,MoverMainTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E9CC: using guessed type int (__cdecl *MoverMainTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C3D0: using guessed type int `ITableBase<CollectCardTitle,CollectCardTitleTab>::ITableBase<CollectCardTitle,CollectCardTitleTab>'::`2'::`local static guard';
// A8C3D4: using guessed type int `ITableBase<MoverMain,MoverMainTab>::ITableBase<MoverMain,MoverMainTab>'::`2'::`local static guard';

//----- (004650A0) --------------------------------------------------------
void __thiscall MoverUseSkillTab::MoverUseSkillTab(MoverUseSkillTab *this)
{
  MoverUseSkillTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MoverUseSkill,MoverUseSkillTab>Vtbl *)&ITableBase<MoverUseSkill,MoverUseSkillTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MoverUseSkill,MoverUseSkillTab>::ITableBase<MoverUseSkill,MoverUseSkillTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MoverUseSkill,MoverUseSkillTab>::ITableBase<MoverUseSkill,MoverUseSkillTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MoverUseSkill_MoverUseSkillTab_::ITableBase_MoverUseSkill_MoverUseSkillTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<MoverUseSkill,MoverUseSkillTab>Vtbl *)&MoverUseSkillTab::`vftable';
}
// 97E1AC: using guessed type int (__cdecl *ITableBase<MoverUseSkill,MoverUseSkillTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E9DC: using guessed type int (__cdecl *MoverUseSkillTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C3D4: using guessed type int `ITableBase<MoverMain,MoverMainTab>::ITableBase<MoverMain,MoverMainTab>'::`2'::`local static guard';
// A8C3D8: using guessed type int `ITableBase<MoverUseSkill,MoverUseSkillTab>::ITableBase<MoverUseSkill,MoverUseSkillTab>'::`2'::`local static guard';

//----- (004650E0) --------------------------------------------------------
MoverUseSkillTab *__thiscall ITableBase<MoverUseSkill,MoverUseSkillTab>::`vector deleting destructor'(MoverUseSkillTab *this, unsigned int a2)
{
  MoverUseSkillTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MoverUseSkill,MoverUseSkillTab>Vtbl *)&ITableBase<MoverUseSkill,MoverUseSkillTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E1AC: using guessed type int (__cdecl *ITableBase<MoverUseSkill,MoverUseSkillTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00465160) --------------------------------------------------------
void __thiscall MoverHGTab::MoverHGTab(MoverHGTab *this)
{
  MoverHGTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MoverHG,MoverHGTab>Vtbl *)&ITableBase<MoverHG,MoverHGTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MoverHG,MoverHGTab>::ITableBase<MoverHG,MoverHGTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MoverHG,MoverHGTab>::ITableBase<MoverHG,MoverHGTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MoverHG_MoverHGTab_::ITableBase_MoverHG_MoverHGTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<MoverHG,MoverHGTab>Vtbl *)&MoverHGTab::`vftable';
}
// 97E1BC: using guessed type int (__cdecl *ITableBase<MoverHG,MoverHGTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E9EC: using guessed type int (__cdecl *MoverHGTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C3D8: using guessed type int `ITableBase<MoverUseSkill,MoverUseSkillTab>::ITableBase<MoverUseSkill,MoverUseSkillTab>'::`2'::`local static guard';
// A8C3DC: using guessed type int `ITableBase<MoverHG,MoverHGTab>::ITableBase<MoverHG,MoverHGTab>'::`2'::`local static guard';

//----- (004651A0) --------------------------------------------------------
void __thiscall MoverViewTab::MoverViewTab(MoverViewTab *this)
{
  MoverViewTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MoverView,MoverViewTab>Vtbl *)&ITableBase<MoverView,MoverViewTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MoverView,MoverViewTab>::ITableBase<MoverView,MoverViewTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MoverView,MoverViewTab>::ITableBase<MoverView,MoverViewTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MoverView_MoverViewTab_::ITableBase_MoverView_MoverViewTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<MoverView,MoverViewTab>Vtbl *)&MoverViewTab::`vftable';
}
// 97E1CC: using guessed type int (__cdecl *ITableBase<MoverView,MoverViewTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E9FC: using guessed type int (__cdecl *MoverViewTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C3DC: using guessed type int `ITableBase<MoverHG,MoverHGTab>::ITableBase<MoverHG,MoverHGTab>'::`2'::`local static guard';
// A8C3E0: using guessed type int `ITableBase<MoverView,MoverViewTab>::ITableBase<MoverView,MoverViewTab>'::`2'::`local static guard';

//----- (004651E0) --------------------------------------------------------
void __thiscall MoverSlotViewTab::MoverSlotViewTab(MoverSlotViewTab *this)
{
  MoverSlotViewTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MoverSlotView,MoverSlotViewTab>Vtbl *)&ITableBase<MoverSlotView,MoverSlotViewTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MoverSlotView,MoverSlotViewTab>::ITableBase<MoverSlotView,MoverSlotViewTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MoverSlotView,MoverSlotViewTab>::ITableBase<MoverSlotView,MoverSlotViewTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MoverSlotView_MoverSlotViewTab_::ITableBase_MoverSlotView_MoverSlotViewTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<MoverSlotView,MoverSlotViewTab>Vtbl *)&MoverSlotViewTab::`vftable';
}
// 97E1DC: using guessed type int (__cdecl *ITableBase<MoverSlotView,MoverSlotViewTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EA0C: using guessed type int (__cdecl *MoverSlotViewTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C3E0: using guessed type int `ITableBase<MoverView,MoverViewTab>::ITableBase<MoverView,MoverViewTab>'::`2'::`local static guard';
// A8C3E4: using guessed type int `ITableBase<MoverSlotView,MoverSlotViewTab>::ITableBase<MoverSlotView,MoverSlotViewTab>'::`2'::`local static guard';

//----- (00465220) --------------------------------------------------------
MoverSlotViewTab *__thiscall MoverSlotViewTab::`vector deleting destructor'(MoverSlotViewTab *this, unsigned int a2)
{
  MoverSlotViewTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MoverSlotView,MoverSlotViewTab>Vtbl *)&ITableBase<MoverSlotView,MoverSlotViewTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E1DC: using guessed type int (__cdecl *ITableBase<MoverSlotView,MoverSlotViewTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004652A0) --------------------------------------------------------
void __thiscall MoverSlotCharAniTab::MoverSlotCharAniTab(MoverSlotCharAniTab *this)
{
  MoverSlotCharAniTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>Vtbl *)&ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MoverSlotCharAni_MoverSlotCharAniTab_::ITableBase_MoverSlotCharAni_MoverSlotCharAniTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>Vtbl *)&MoverSlotCharAniTab::`vftable';
}
// 97E1EC: using guessed type int (__cdecl *ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EA1C: using guessed type int (__cdecl *MoverSlotCharAniTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C3E4: using guessed type int `ITableBase<MoverSlotView,MoverSlotViewTab>::ITableBase<MoverSlotView,MoverSlotViewTab>'::`2'::`local static guard';
// A8C3E8: using guessed type int `ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>'::`2'::`local static guard';

//----- (004652E0) --------------------------------------------------------
MoverSlotCharAniTab *__thiscall ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::`vector deleting destructor'(MoverSlotCharAniTab *this, unsigned int a2)
{
  MoverSlotCharAniTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>Vtbl *)&ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E1EC: using guessed type int (__cdecl *ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00465360) --------------------------------------------------------
void __thiscall MoverAbilityTab::MoverAbilityTab(MoverAbilityTab *this)
{
  MoverAbilityTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MoverAbility,MoverAbilityTab>Vtbl *)&ITableBase<MoverAbility,MoverAbilityTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MoverAbility,MoverAbilityTab>::ITableBase<MoverAbility,MoverAbilityTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MoverAbility,MoverAbilityTab>::ITableBase<MoverAbility,MoverAbilityTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MoverAbility_MoverAbilityTab_::ITableBase_MoverAbility_MoverAbilityTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<MoverAbility,MoverAbilityTab>Vtbl *)&MoverAbilityTab::`vftable';
}
// 97E1FC: using guessed type int (__cdecl *ITableBase<MoverAbility,MoverAbilityTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EA2C: using guessed type int (__cdecl *MoverAbilityTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C3E8: using guessed type int `ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>'::`2'::`local static guard';
// A8C3EC: using guessed type int `ITableBase<MoverAbility,MoverAbilityTab>::ITableBase<MoverAbility,MoverAbilityTab>'::`2'::`local static guard';

//----- (004653A0) --------------------------------------------------------
void __thiscall MoverItemTab::MoverItemTab(MoverItemTab *this)
{
  MoverItemTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MoverItem,MoverItemTab>Vtbl *)&ITableBase<MoverItem,MoverItemTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MoverItem,MoverItemTab>::ITableBase<MoverItem,MoverItemTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MoverItem,MoverItemTab>::ITableBase<MoverItem,MoverItemTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MoverItem_MoverItemTab_::ITableBase_MoverItem_MoverItemTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<MoverItem,MoverItemTab>Vtbl *)&MoverItemTab::`vftable';
}
// 97E20C: using guessed type int (__cdecl *ITableBase<MoverItem,MoverItemTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EA3C: using guessed type int (__cdecl *MoverItemTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C3EC: using guessed type int `ITableBase<MoverAbility,MoverAbilityTab>::ITableBase<MoverAbility,MoverAbilityTab>'::`2'::`local static guard';
// A8C3F0: using guessed type int `ITableBase<MoverItem,MoverItemTab>::ITableBase<MoverItem,MoverItemTab>'::`2'::`local static guard';

//----- (004653E0) --------------------------------------------------------
MoverItemTab *__thiscall ITableBase<MoverItem,MoverItemTab>::`vector deleting destructor'(MoverItemTab *this, unsigned int a2)
{
  MoverItemTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MoverItem,MoverItemTab>Vtbl *)&ITableBase<MoverItem,MoverItemTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E20C: using guessed type int (__cdecl *ITableBase<MoverItem,MoverItemTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00465460) --------------------------------------------------------
void __thiscall PetMainTab::PetMainTab(PetMainTab *this)
{
  PetMainTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<PupMain,PetMainTab>Vtbl *)&ITableBase<PupMain,PetMainTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<PupMain,PetMainTab>::ITableBase<PupMain,PetMainTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<PupMain,PetMainTab>::ITableBase<PupMain,PetMainTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_PupMain_PetMainTab_::ITableBase_PupMain_PetMainTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<PupMain,PetMainTab>Vtbl *)&PetMainTab::`vftable';
}
// 97E21C: using guessed type int (__cdecl *ITableBase<PupMain,PetMainTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EA4C: using guessed type int (__cdecl *PetMainTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C3F0: using guessed type int `ITableBase<MoverItem,MoverItemTab>::ITableBase<MoverItem,MoverItemTab>'::`2'::`local static guard';
// A8C3F4: using guessed type int `ITableBase<PupMain,PetMainTab>::ITableBase<PupMain,PetMainTab>'::`2'::`local static guard';

//----- (004654A0) --------------------------------------------------------
PetMainTab *__thiscall ITableBase<PupMain,PetMainTab>::`vector deleting destructor'(PetMainTab *this, unsigned int a2)
{
  PetMainTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<PupMain,PetMainTab>Vtbl *)&ITableBase<PupMain,PetMainTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E21C: using guessed type int (__cdecl *ITableBase<PupMain,PetMainTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00465520) --------------------------------------------------------
void __thiscall PetViewTab::PetViewTab(PetViewTab *this)
{
  PetViewTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<PupView,PetViewTab>Vtbl *)&ITableBase<PupView,PetViewTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<PupView,PetViewTab>::ITableBase<PupView,PetViewTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<PupView,PetViewTab>::ITableBase<PupView,PetViewTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_PupView_PetViewTab_::ITableBase_PupView_PetViewTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<PupView,PetViewTab>Vtbl *)&PetViewTab::`vftable';
}
// 97E22C: using guessed type int (__cdecl *ITableBase<PupView,PetViewTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EA5C: using guessed type int (__cdecl *PetViewTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C3F4: using guessed type int `ITableBase<PupMain,PetMainTab>::ITableBase<PupMain,PetMainTab>'::`2'::`local static guard';
// A8C3F8: using guessed type int `ITableBase<PupView,PetViewTab>::ITableBase<PupView,PetViewTab>'::`2'::`local static guard';

//----- (00465560) --------------------------------------------------------
void __thiscall KQVoteDescTable::KQVoteDescTable(KQVoteDescTable *this)
{
  KQVoteDescTable *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<KQVoteDesc,KQVoteDescTable>Vtbl *)&ITableBase<KQVoteDesc,KQVoteDescTable>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<KQVoteDesc,KQVoteDescTable>::ITableBase<KQVoteDesc,KQVoteDescTable>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<KQVoteDesc,KQVoteDescTable>::ITableBase<KQVoteDesc,KQVoteDescTable>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_KQVoteDesc_KQVoteDescTable_::ITableBase_KQVoteDesc_KQVoteDescTable__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<KQVoteDesc,KQVoteDescTable>Vtbl *)&KQVoteDescTable::`vftable';
}
// 97E23C: using guessed type int (__cdecl *ITableBase<KQVoteDesc,KQVoteDescTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EA6C: using guessed type int (__cdecl *KQVoteDescTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C3F8: using guessed type int `ITableBase<PupView,PetViewTab>::ITableBase<PupView,PetViewTab>'::`2'::`local static guard';
// A8C3FC: using guessed type int `ITableBase<KQVoteDesc,KQVoteDescTable>::ITableBase<KQVoteDesc,KQVoteDescTable>'::`2'::`local static guard';

//----- (004655A0) --------------------------------------------------------
KQVoteDescTable *__thiscall KQVoteDescTable::`scalar deleting destructor'(KQVoteDescTable *this, unsigned int a2)
{
  KQVoteDescTable *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<KQVoteDesc,KQVoteDescTable>Vtbl *)&ITableBase<KQVoteDesc,KQVoteDescTable>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E23C: using guessed type int (__cdecl *ITableBase<KQVoteDesc,KQVoteDescTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00465620) --------------------------------------------------------
void __thiscall KQVoteMajorityRateTable::KQVoteMajorityRateTable(KQVoteMajorityRateTable *this)
{
  KQVoteMajorityRateTable *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>Vtbl *)&ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_KQVoteMajorityRate_KQVoteMajorityRateTable_::ITableBase_KQVoteMajorityRate_KQVoteMajorityRateTable__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>Vtbl *)&KQVoteMajorityRateTable::`vftable';
}
// 97E24C: using guessed type int (__cdecl *ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EA7C: using guessed type int (__cdecl *KQVoteMajorityRateTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C3FC: using guessed type int `ITableBase<KQVoteDesc,KQVoteDescTable>::ITableBase<KQVoteDesc,KQVoteDescTable>'::`2'::`local static guard';
// A8C400: using guessed type int `ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>'::`2'::`local static guard';

//----- (00465660) --------------------------------------------------------
void __thiscall KQIsVoteTable::KQIsVoteTable(KQIsVoteTable *this)
{
  KQIsVoteTable *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<KQIsVote,KQIsVoteTable>Vtbl *)&ITableBase<KQIsVote,KQIsVoteTable>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<KQIsVote,KQIsVoteTable>::ITableBase<KQIsVote,KQIsVoteTable>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<KQIsVote,KQIsVoteTable>::ITableBase<KQIsVote,KQIsVoteTable>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_KQIsVote_KQIsVoteTable_::ITableBase_KQIsVote_KQIsVoteTable__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<KQIsVote,KQIsVoteTable>Vtbl *)&KQIsVoteTable::`vftable';
}
// 97E25C: using guessed type int (__cdecl *ITableBase<KQIsVote,KQIsVoteTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EA8C: using guessed type int (__cdecl *KQIsVoteTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C400: using guessed type int `ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>'::`2'::`local static guard';
// A8C404: using guessed type int `ITableBase<KQIsVote,KQIsVoteTable>::ITableBase<KQIsVote,KQIsVoteTable>'::`2'::`local static guard';

//----- (004656A0) --------------------------------------------------------
KQIsVoteTable *__thiscall ITableBase<KQIsVote,KQIsVoteTable>::`scalar deleting destructor'(KQIsVoteTable *this, unsigned int a2)
{
  KQIsVoteTable *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<KQIsVote,KQIsVoteTable>Vtbl *)&ITableBase<KQIsVote,KQIsVoteTable>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E25C: using guessed type int (__cdecl *ITableBase<KQIsVote,KQIsVoteTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00465720) --------------------------------------------------------
void __thiscall KQTeamTable::KQTeamTable(KQTeamTable *this)
{
  KQTeamTable *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<KQTeam,KQTeamTable>Vtbl *)&ITableBase<KQTeam,KQTeamTable>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<KQTeam,KQTeamTable>::ITableBase<KQTeam,KQTeamTable>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<KQTeam,KQTeamTable>::ITableBase<KQTeam,KQTeamTable>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_KQTeam_KQTeamTable_::ITableBase_KQTeam_KQTeamTable__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<KQTeam,KQTeamTable>Vtbl *)&KQTeamTable::`vftable';
}
// 97E26C: using guessed type int (__cdecl *ITableBase<KQTeam,KQTeamTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EA9C: using guessed type int (__cdecl *KQTeamTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C404: using guessed type int `ITableBase<KQIsVote,KQIsVoteTable>::ITableBase<KQIsVote,KQIsVoteTable>'::`2'::`local static guard';
// A8C408: using guessed type int `ITableBase<KQTeam,KQTeamTable>::ITableBase<KQTeam,KQTeamTable>'::`2'::`local static guard';

//----- (00465760) --------------------------------------------------------
KQTeamTable *__thiscall KQTeamTable::`scalar deleting destructor'(KQTeamTable *this, unsigned int a2)
{
  KQTeamTable *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<KQTeam,KQTeamTable>Vtbl *)&ITableBase<KQTeam,KQTeamTable>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E26C: using guessed type int (__cdecl *ITableBase<KQTeam,KQTeamTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004657E0) --------------------------------------------------------
void __thiscall MobConditionViewTab::MobConditionViewTab(MobConditionViewTab *this)
{
  MobConditionViewTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MobConditionView,MobConditionViewTab>Vtbl *)&ITableBase<MobConditionView,MobConditionViewTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MobConditionView,MobConditionViewTab>::ITableBase<MobConditionView,MobConditionViewTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MobConditionView,MobConditionViewTab>::ITableBase<MobConditionView,MobConditionViewTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MobConditionView_MobConditionViewTab_::ITableBase_MobConditionView_MobConditionViewTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<MobConditionView,MobConditionViewTab>Vtbl *)&MobConditionViewTab::`vftable';
}
// 97E27C: using guessed type int (__cdecl *ITableBase<MobConditionView,MobConditionViewTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EAAC: using guessed type int (__cdecl *MobConditionViewTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C408: using guessed type int `ITableBase<KQTeam,KQTeamTable>::ITableBase<KQTeam,KQTeamTable>'::`2'::`local static guard';
// A8C40C: using guessed type int `ITableBase<MobConditionView,MobConditionViewTab>::ITableBase<MobConditionView,MobConditionViewTab>'::`2'::`local static guard';

//----- (00465820) --------------------------------------------------------
void __thiscall MobNoFadeInTab::MobNoFadeInTab(MobNoFadeInTab *this)
{
  MobNoFadeInTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MobNoFadeIn,MobNoFadeInTab>Vtbl *)&ITableBase<MobNoFadeIn,MobNoFadeInTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MobNoFadeIn,MobNoFadeInTab>::ITableBase<MobNoFadeIn,MobNoFadeInTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MobNoFadeIn,MobNoFadeInTab>::ITableBase<MobNoFadeIn,MobNoFadeInTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MobNoFadeIn_MobNoFadeInTab_::ITableBase_MobNoFadeIn_MobNoFadeInTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<MobNoFadeIn,MobNoFadeInTab>Vtbl *)&MobNoFadeInTab::`vftable';
}
// 97E28C: using guessed type int (__cdecl *ITableBase<MobNoFadeIn,MobNoFadeInTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EABC: using guessed type int (__cdecl *MobNoFadeInTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C40C: using guessed type int `ITableBase<MobConditionView,MobConditionViewTab>::ITableBase<MobConditionView,MobConditionViewTab>'::`2'::`local static guard';
// A8C410: using guessed type int `ITableBase<MobNoFadeIn,MobNoFadeInTab>::ITableBase<MobNoFadeIn,MobNoFadeInTab>'::`2'::`local static guard';

//----- (00465860) --------------------------------------------------------
MobNoFadeInTab *__thiscall ITableBase<MobNoFadeIn,MobNoFadeInTab>::`vector deleting destructor'(MobNoFadeInTab *this, unsigned int a2)
{
  MobNoFadeInTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MobNoFadeIn,MobNoFadeInTab>Vtbl *)&ITableBase<MobNoFadeIn,MobNoFadeInTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E28C: using guessed type int (__cdecl *ITableBase<MobNoFadeIn,MobNoFadeInTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004658E0) --------------------------------------------------------
void __thiscall MarketSearchInfoTab::MarketSearchInfoTab(MarketSearchInfoTab *this)
{
  MarketSearchInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MarketSearchInfo,MarketSearchInfoTab>Vtbl *)&ITableBase<MarketSearchInfo,MarketSearchInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MarketSearchInfo,MarketSearchInfoTab>::ITableBase<MarketSearchInfo,MarketSearchInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MarketSearchInfo,MarketSearchInfoTab>::ITableBase<MarketSearchInfo,MarketSearchInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MarketSearchInfo_MarketSearchInfoTab_::ITableBase_MarketSearchInfo_MarketSearchInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<MarketSearchInfo,MarketSearchInfoTab>Vtbl *)&MarketSearchInfoTab::`vftable';
}
// 97E29C: using guessed type int (__cdecl *ITableBase<MarketSearchInfo,MarketSearchInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EACC: using guessed type int (__cdecl *MarketSearchInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C410: using guessed type int `ITableBase<MobNoFadeIn,MobNoFadeInTab>::ITableBase<MobNoFadeIn,MobNoFadeInTab>'::`2'::`local static guard';
// A8C414: using guessed type int `ITableBase<MarketSearchInfo,MarketSearchInfoTab>::ITableBase<MarketSearchInfo,MarketSearchInfoTab>'::`2'::`local static guard';

//----- (00465920) --------------------------------------------------------
void __thiscall ChrCreateEquipTab::ChrCreateEquipTab(ChrCreateEquipTab *this)
{
  ChrCreateEquipTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ChrCreateEquip,ChrCreateEquipTab>Vtbl *)&ITableBase<ChrCreateEquip,ChrCreateEquipTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ChrCreateEquip,ChrCreateEquipTab>::ITableBase<ChrCreateEquip,ChrCreateEquipTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ChrCreateEquip,ChrCreateEquipTab>::ITableBase<ChrCreateEquip,ChrCreateEquipTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ChrCreateEquip_ChrCreateEquipTab_::ITableBase_ChrCreateEquip_ChrCreateEquipTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<ChrCreateEquip,ChrCreateEquipTab>Vtbl *)&ChrCreateEquipTab::`vftable';
}
// 97E2AC: using guessed type int (__cdecl *ITableBase<ChrCreateEquip,ChrCreateEquipTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EADC: using guessed type int (__cdecl *ChrCreateEquipTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C414: using guessed type int `ITableBase<MarketSearchInfo,MarketSearchInfoTab>::ITableBase<MarketSearchInfo,MarketSearchInfoTab>'::`2'::`local static guard';
// A8C418: using guessed type int `ITableBase<ChrCreateEquip,ChrCreateEquipTab>::ITableBase<ChrCreateEquip,ChrCreateEquipTab>'::`2'::`local static guard';

//----- (00465960) --------------------------------------------------------
ChrCreateEquipTab *__thiscall ChrCreateEquipTab::`scalar deleting destructor'(ChrCreateEquipTab *this, unsigned int a2)
{
  ChrCreateEquipTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ChrCreateEquip,ChrCreateEquipTab>Vtbl *)&ITableBase<ChrCreateEquip,ChrCreateEquipTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E2AC: using guessed type int (__cdecl *ITableBase<ChrCreateEquip,ChrCreateEquipTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (004659E0) --------------------------------------------------------
void __thiscall MoverUpgradeEffectTab::MoverUpgradeEffectTab(MoverUpgradeEffectTab *this)
{
  MoverUpgradeEffectTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>Vtbl *)&ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MoverUpgradeEffect_MoverUpgradeEffectTab_::ITableBase_MoverUpgradeEffect_MoverUpgradeEffectTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>Vtbl *)&MoverUpgradeEffectTab::`vftable';
}
// 97E2BC: using guessed type int (__cdecl *ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EAEC: using guessed type int (__cdecl *MoverUpgradeEffectTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C418: using guessed type int `ITableBase<ChrCreateEquip,ChrCreateEquipTab>::ITableBase<ChrCreateEquip,ChrCreateEquipTab>'::`2'::`local static guard';
// A8C41C: using guessed type int `ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>'::`2'::`local static guard';

//----- (00465A20) --------------------------------------------------------
MoverUpgradeEffectTab *__thiscall MoverUpgradeEffectTab::`scalar deleting destructor'(MoverUpgradeEffectTab *this, unsigned int a2)
{
  MoverUpgradeEffectTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>Vtbl *)&ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E2BC: using guessed type int (__cdecl *ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00465AA0) --------------------------------------------------------
void __thiscall ChatColorTab::ChatColorTab(ChatColorTab *this)
{
  ChatColorTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ChatColor,ChatColorTab>Vtbl *)&ITableBase<ChatColor,ChatColorTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ChatColor,ChatColorTab>::ITableBase<ChatColor,ChatColorTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ChatColor,ChatColorTab>::ITableBase<ChatColor,ChatColorTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ChatColor_ChatColorTab_::ITableBase_ChatColor_ChatColorTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<ChatColor,ChatColorTab>Vtbl *)&ChatColorTab::`vftable';
}
// 97E2CC: using guessed type int (__cdecl *ITableBase<ChatColor,ChatColorTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EAFC: using guessed type int (__cdecl *ChatColorTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C41C: using guessed type int `ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>'::`2'::`local static guard';
// A8C420: using guessed type int `ITableBase<ChatColor,ChatColorTab>::ITableBase<ChatColor,ChatColorTab>'::`2'::`local static guard';

//----- (00465AE0) --------------------------------------------------------
ChatColorTab *__thiscall ChatColorTab::`scalar deleting destructor'(ChatColorTab *this, unsigned int a2)
{
  ChatColorTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ChatColor,ChatColorTab>Vtbl *)&ITableBase<ChatColor,ChatColorTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E2CC: using guessed type int (__cdecl *ITableBase<ChatColor,ChatColorTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00465B60) --------------------------------------------------------
void __thiscall TermExtendMatchTable::TermExtendMatchTable(TermExtendMatchTable *this)
{
  TermExtendMatchTable *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<TermExtendMatch,TermExtendMatchTable>Vtbl *)&ITableBase<TermExtendMatch,TermExtendMatchTable>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<TermExtendMatch,TermExtendMatchTable>::ITableBase<TermExtendMatch,TermExtendMatchTable>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<TermExtendMatch,TermExtendMatchTable>::ITableBase<TermExtendMatch,TermExtendMatchTable>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_TermExtendMatch_TermExtendMatchTable_::ITableBase_TermExtendMatch_TermExtendMatchTable__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<TermExtendMatch,TermExtendMatchTable>Vtbl *)&TermExtendMatchTable::`vftable';
}
// 97E2DC: using guessed type int (__cdecl *ITableBase<TermExtendMatch,TermExtendMatchTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EB0C: using guessed type int (__cdecl *TermExtendMatchTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C420: using guessed type int `ITableBase<ChatColor,ChatColorTab>::ITableBase<ChatColor,ChatColorTab>'::`2'::`local static guard';
// A8C424: using guessed type int `ITableBase<TermExtendMatch,TermExtendMatchTable>::ITableBase<TermExtendMatch,TermExtendMatchTable>'::`2'::`local static guard';

//----- (00465BA0) --------------------------------------------------------
TermExtendMatchTable *__thiscall ITableBase<TermExtendMatch,TermExtendMatchTable>::`scalar deleting destructor'(TermExtendMatchTable *this, unsigned int a2)
{
  TermExtendMatchTable *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<TermExtendMatch,TermExtendMatchTable>Vtbl *)&ITableBase<TermExtendMatch,TermExtendMatchTable>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E2DC: using guessed type int (__cdecl *ITableBase<TermExtendMatch,TermExtendMatchTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00465C20) --------------------------------------------------------
void __thiscall TermExtendMatchGroupDescTable::TermExtendMatchGroupDescTable(TermExtendMatchGroupDescTable *this)
{
  TermExtendMatchGroupDescTable *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>Vtbl *)&ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>::ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>::ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_TermExtendMatchGroupDesc_TermExtendMatchGroupDescTable_::ITableBase_TermExtendMatchGroupDesc_TermExtendMatchGroupDescTable__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>Vtbl *)&TermExtendMatchGroupDescTable::`vftable';
}
// 97E2EC: using guessed type int (__cdecl *ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EB1C: using guessed type int (__cdecl *TermExtendMatchGroupDescTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C424: using guessed type int `ITableBase<TermExtendMatch,TermExtendMatchTable>::ITableBase<TermExtendMatch,TermExtendMatchTable>'::`2'::`local static guard';
// A8C428: using guessed type int `ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>::ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>'::`2'::`local static guard';

//----- (00465C60) --------------------------------------------------------
void __thiscall MinimonInfoTable::MinimonInfoTable(MinimonInfoTable *this)
{
  MinimonInfoTable *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MinimonInfo,MinimonInfoTable>Vtbl *)&ITableBase<MinimonInfo,MinimonInfoTable>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MinimonInfo,MinimonInfoTable>::ITableBase<MinimonInfo,MinimonInfoTable>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MinimonInfo,MinimonInfoTable>::ITableBase<MinimonInfo,MinimonInfoTable>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MinimonInfo_MinimonInfoTable_::ITableBase_MinimonInfo_MinimonInfoTable__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<MinimonInfo,MinimonInfoTable>Vtbl *)&MinimonInfoTable::`vftable';
}
// 97E2FC: using guessed type int (__cdecl *ITableBase<MinimonInfo,MinimonInfoTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EB2C: using guessed type int (__cdecl *MinimonInfoTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C428: using guessed type int `ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>::ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>'::`2'::`local static guard';
// A8C42C: using guessed type int `ITableBase<MinimonInfo,MinimonInfoTable>::ITableBase<MinimonInfo,MinimonInfoTable>'::`2'::`local static guard';

//----- (00465CA0) --------------------------------------------------------
void __thiscall MinimonAutoUseItemTable::MinimonAutoUseItemTable(MinimonAutoUseItemTable *this)
{
  MinimonAutoUseItemTable *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>Vtbl *)&ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>::ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>::ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MinimonAutoUseItem_MinimonAutoUseItemTable_::ITableBase_MinimonAutoUseItem_MinimonAutoUseItemTable__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>Vtbl *)&MinimonAutoUseItemTable::`vftable';
}
// 97E30C: using guessed type int (__cdecl *ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EB3C: using guessed type int (__cdecl *MinimonAutoUseItemTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C42C: using guessed type int `ITableBase<MinimonInfo,MinimonInfoTable>::ITableBase<MinimonInfo,MinimonInfoTable>'::`2'::`local static guard';
// A8C430: using guessed type int `ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>::ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>'::`2'::`local static guard';

//----- (00465CE0) --------------------------------------------------------
void __thiscall ItemViewDummyTab::ItemViewDummyTab(ItemViewDummyTab *this)
{
  ItemViewDummyTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ItemViewDummy,ItemViewDummyTab>Vtbl *)&ITableBase<ItemViewDummy,ItemViewDummyTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ItemViewDummy,ItemViewDummyTab>::ITableBase<ItemViewDummy,ItemViewDummyTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ItemViewDummy,ItemViewDummyTab>::ITableBase<ItemViewDummy,ItemViewDummyTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ItemViewDummy_ItemViewDummyTab_::ITableBase_ItemViewDummy_ItemViewDummyTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<ItemViewDummy,ItemViewDummyTab>Vtbl *)&ItemViewDummyTab::`vftable';
}
// 97E31C: using guessed type int (__cdecl *ITableBase<ItemViewDummy,ItemViewDummyTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EB4C: using guessed type int (__cdecl *ItemViewDummyTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C430: using guessed type int `ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>::ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>'::`2'::`local static guard';
// A8C434: using guessed type int `ITableBase<ItemViewDummy,ItemViewDummyTab>::ITableBase<ItemViewDummy,ItemViewDummyTab>'::`2'::`local static guard';

//----- (00465D20) --------------------------------------------------------
ItemViewDummyTab *__thiscall ITableBase<ItemViewDummy,ItemViewDummyTab>::`vector deleting destructor'(ItemViewDummyTab *this, unsigned int a2)
{
  ItemViewDummyTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ItemViewDummy,ItemViewDummyTab>Vtbl *)&ITableBase<ItemViewDummy,ItemViewDummyTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E31C: using guessed type int (__cdecl *ITableBase<ItemViewDummy,ItemViewDummyTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00465DA0) --------------------------------------------------------
void __thiscall UseCalssTypeTable::UseCalssTypeTable(UseCalssTypeTable *this)
{
  UseCalssTypeTable *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<UseClassTypeInfo,UseCalssTypeTable>Vtbl *)&ITableBase<UseClassTypeInfo,UseCalssTypeTable>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<UseClassTypeInfo,UseCalssTypeTable>::ITableBase<UseClassTypeInfo,UseCalssTypeTable>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<UseClassTypeInfo,UseCalssTypeTable>::ITableBase<UseClassTypeInfo,UseCalssTypeTable>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_UseClassTypeInfo_UseCalssTypeTable_::ITableBase_UseClassTypeInfo_UseCalssTypeTable__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<UseClassTypeInfo,UseCalssTypeTable>Vtbl *)&UseCalssTypeTable::`vftable';
}
// 97E32C: using guessed type int (__cdecl *ITableBase<UseClassTypeInfo,UseCalssTypeTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EB5C: using guessed type int (__cdecl *UseCalssTypeTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C438: using guessed type int `ITableBase<UseClassTypeInfo,UseCalssTypeTable>::ITableBase<UseClassTypeInfo,UseCalssTypeTable>'::`2'::`local static guard';

//----- (00465DE0) --------------------------------------------------------
UseCalssTypeTable *__thiscall ITableBase<UseClassTypeInfo,UseCalssTypeTable>::`scalar deleting destructor'(UseCalssTypeTable *this, unsigned int a2)
{
  UseCalssTypeTable *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<UseClassTypeInfo,UseCalssTypeTable>Vtbl *)&ITableBase<UseClassTypeInfo,UseCalssTypeTable>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E32C: using guessed type int (__cdecl *ITableBase<UseClassTypeInfo,UseCalssTypeTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (00465E60) --------------------------------------------------------
void __thiscall ChrBasicEquipTab::ChrBasicEquipTab(ChrBasicEquipTab *this)
{
  ChrBasicEquipTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ChrBasicEquip,ChrBasicEquipTab>Vtbl *)&ITableBase<ChrBasicEquip,ChrBasicEquipTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ChrBasicEquip,ChrBasicEquipTab>::ITableBase<ChrBasicEquip,ChrBasicEquipTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ChrBasicEquip,ChrBasicEquipTab>::ITableBase<ChrBasicEquip,ChrBasicEquipTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ChrBasicEquip_ChrBasicEquipTab_::ITableBase_ChrBasicEquip_ChrBasicEquipTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<ChrBasicEquip,ChrBasicEquipTab>Vtbl *)&ChrBasicEquipTab::`vftable';
}
// 97E33C: using guessed type int (__cdecl *ITableBase<ChrBasicEquip,ChrBasicEquipTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EB6C: using guessed type int (__cdecl *ChrBasicEquipTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C438: using guessed type int `ITableBase<UseClassTypeInfo,UseCalssTypeTable>::ITableBase<UseClassTypeInfo,UseCalssTypeTable>'::`2'::`local static guard';
// A8C43C: using guessed type int `ITableBase<ChrBasicEquip,ChrBasicEquipTab>::ITableBase<ChrBasicEquip,ChrBasicEquipTab>'::`2'::`local static guard';

//----- (00465EA0) --------------------------------------------------------
std::_List_iterator<std::_List_val<float,std::allocator<float> > > *__thiscall std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::erase(std::list<float,std::allocator<float> > *this, std::_List_iterator<std::_List_val<float,std::allocator<float> > > *result, std::_List_const_iterator<std::_List_val<float,std::allocator<float> > > _Where)
{
  std::_List_nod<float,std::allocator<float> >::_Node *v3; // eax@1
  std::list<float,std::allocator<float> > *v4; // esi@1
  std::_List_nod<float,std::allocator<float> >::_Node *v5; // ecx@1
  std::_List_iterator<std::_List_val<float,std::allocator<float> > > *v6; // eax@3
  std::_List_nod<float,std::allocator<float> >::_Node *_Wherea; // [sp+10h] [bp+Ch]@1

  v3 = _Where._Ptr;
  v4 = this;
  v5 = _Where._Ptr->_Next;
  _Wherea = _Where._Ptr->_Next;
  if ( v3 != v4->_Myhead )
  {
    v3->_Prev->_Next = v3->_Next;
    v3->_Next->_Prev = v3->_Prev;
    operator delete(v3);
    v5 = _Wherea;
    --v4->_Mysize;
  }
  v6 = result;
  result->_Ptr = v5;
  return v6;
}

//----- (00465EE0) --------------------------------------------------------
void __thiscall FaceCutMsgTab::FaceCutMsgTab(FaceCutMsgTab *this)
{
  FaceCutMsgTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<FaceCutMsg,FaceCutMsgTab>Vtbl *)&ITableBase<FaceCutMsg,FaceCutMsgTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<FaceCutMsg,FaceCutMsgTab>::ITableBase<FaceCutMsg,FaceCutMsgTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<FaceCutMsg,FaceCutMsgTab>::ITableBase<FaceCutMsg,FaceCutMsgTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_FaceCutMsg_FaceCutMsgTab_::ITableBase_FaceCutMsg_FaceCutMsgTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<FaceCutMsg,FaceCutMsgTab>Vtbl *)&FaceCutMsgTab::`vftable';
}
// 97E58C: using guessed type int (__cdecl *ITableBase<FaceCutMsg,FaceCutMsgTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EB7C: using guessed type int (__cdecl *FaceCutMsgTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C484: using guessed type int `ITableBase<SubAbStateInfo,SubAbStateInfoTab>::ITableBase<SubAbStateInfo,SubAbStateInfoTab>'::`2'::`local static guard';
// A8C488: using guessed type int `ITableBase<FaceCutMsg,FaceCutMsgTab>::ITableBase<FaceCutMsg,FaceCutMsgTab>'::`2'::`local static guard';

//----- (00465F20) --------------------------------------------------------
bool __cdecl ITableBase<ColorInfoType,ColorInfoTable>::Load(char *acFn)
{
  int v1; // eax@1
  ColorInfoTable *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = *(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable;
  if ( !*(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable )
  {
    v2 = (ColorInfoTable *)operator new(0xC4u);
    if ( v2 )
      ColorInfoTable::ColorInfoTable(v2);
    else
      v1 = 0;
    *(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(*(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(*(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable + 56)) != 0
    && *v3 == 22 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(*(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(**(_DWORD **)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00466000) --------------------------------------------------------
bool __cdecl ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  ItemViewEquipTypeInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::ms_pkTable;
  if ( !ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::ms_pkTable )
  {
    v2 = (ItemViewEquipTypeInfoTab *)operator new(0xC4u);
    if ( v2 )
      ItemViewEquipTypeInfoTab::ItemViewEquipTypeInfoTab(v2);
    else
      v1 = 0;
    ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read(
         (CDataReader *)(ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::ms_pkTable + 4),
         acFn)
    && (v3 = *(_DWORD **)(ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 1082 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C13C: using guessed type int ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::ms_pkTable;

//----- (004660E0) --------------------------------------------------------
bool __cdecl ITableBase<ItemMoney,ItemMoneyTab>::Load(char *acFn)
{
  int v1; // eax@1
  ItemMoneyTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ItemMoney,ItemMoneyTab>::ms_pkTable;
  if ( !ITableBase<ItemMoney,ItemMoneyTab>::ms_pkTable )
  {
    v2 = (ItemMoneyTab *)operator new(0xC4u);
    if ( v2 )
      ItemMoneyTab::ItemMoneyTab(v2);
    else
      v1 = 0;
    ITableBase<ItemMoney,ItemMoneyTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<ItemMoney,ItemMoneyTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<ItemMoney,ItemMoneyTab>::ms_pkTable + 56)) != 0
    && *v3 == 55 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ItemMoney,ItemMoneyTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ItemMoney,ItemMoneyTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C140: using guessed type int ITableBase<ItemMoney,ItemMoneyTab>::ms_pkTable;

//----- (004661C0) --------------------------------------------------------
bool __cdecl ITableBase<ClassName,CharClass>::Load(char *acFn)
{
  int v1; // eax@1
  CharClass *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ClassName,CharClass>::ms_pkTable;
  if ( !ITableBase<ClassName,CharClass>::ms_pkTable )
  {
    v2 = (CharClass *)operator new(0xC4u);
    if ( v2 )
      CharClass::CharClass(v2);
    else
      v1 = 0;
    ITableBase<ClassName,CharClass>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<ClassName,CharClass>::ms_pkTable + 56)) != 0
    && *v3 == 196 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ClassName,CharClass>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ClassName,CharClass>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (004662A0) --------------------------------------------------------
bool __cdecl ITableBase<ActionEffectInfo,ActionEffectInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  ActionEffectInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ActionEffectInfo,ActionEffectInfoTab>::ms_pkTable;
  if ( !ITableBase<ActionEffectInfo,ActionEffectInfoTab>::ms_pkTable )
  {
    v2 = (ActionEffectInfoTab *)operator new(0xC4u);
    if ( v2 )
      ActionEffectInfoTab::ActionEffectInfoTab(v2);
    else
      v1 = 0;
    ITableBase<ActionEffectInfo,ActionEffectInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<ActionEffectInfo,ActionEffectInfoTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<ActionEffectInfo,ActionEffectInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 391 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ActionEffectInfo,ActionEffectInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ActionEffectInfo,ActionEffectInfoTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C144: using guessed type int ITableBase<ActionEffectInfo,ActionEffectInfoTab>::ms_pkTable;

//----- (00466380) --------------------------------------------------------
bool __cdecl ITableBase<HairInfo,HairInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  HairInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<HairInfo,HairInfoTab>::ms_pkTable;
  if ( !ITableBase<HairInfo,HairInfoTab>::ms_pkTable )
  {
    v2 = (HairInfoTab *)operator new(0xC4u);
    if ( v2 )
      HairInfoTab::HairInfoTab(v2);
    else
      v1 = 0;
    ITableBase<HairInfo,HairInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 14925 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A88694: using guessed type int ITableBase<HairInfo,HairInfoTab>::ms_pkTable;

//----- (00466460) --------------------------------------------------------
bool __cdecl ITableBase<HairColorInfo,HairColorInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  HairColorInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable;
  if ( !ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable )
  {
    v2 = (HairColorInfoTab *)operator new(0xC4u);
    if ( v2 )
      HairColorInfoTab::HairColorInfoTab(v2);
    else
      v1 = 0;
    ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 197 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A886A0: using guessed type int ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable;

//----- (00466540) --------------------------------------------------------
bool __cdecl ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  NPCViewInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::ms_pkTable;
  if ( !ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::ms_pkTable )
  {
    v2 = (NPCViewInfoTab *)operator new(0xC4u);
    if ( v2 )
      NPCViewInfoTab::NPCViewInfoTab(v2);
    else
      v1 = 0;
    ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 15448 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C148: using guessed type int ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::ms_pkTable;

//----- (00466620) --------------------------------------------------------
bool __cdecl ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  ShakeEffectViewInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::ms_pkTable;
  if ( !ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::ms_pkTable )
  {
    v2 = (ShakeEffectViewInfoTab *)operator new(0xC4u);
    if ( v2 )
      ShakeEffectViewInfoTab::ShakeEffectViewInfoTab(v2);
    else
      v1 = 0;
    ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 117 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A89D2C: using guessed type int ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::ms_pkTable;

//----- (00466700) --------------------------------------------------------
bool __cdecl ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::Load(char *acFn)
{
  int v1; // eax@1
  MHFurnitureObjEffectTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::ms_pkTable;
  if ( !ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::ms_pkTable )
  {
    v2 = (MHFurnitureObjEffectTab *)operator new(0xC4u);
    if ( v2 )
      MHFurnitureObjEffectTab::MHFurnitureObjEffectTab(v2);
    else
      v1 = 0;
    ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read(
         (CDataReader *)(ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::ms_pkTable + 4),
         acFn)
    && (v3 = *(_DWORD **)(ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::ms_pkTable + 56)) != 0
    && *v3 == 4627 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C14C: using guessed type int ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::ms_pkTable;

//----- (004667E0) --------------------------------------------------------
bool __cdecl ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  MiniHouseObjAniInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::ms_pkTable;
  if ( !ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::ms_pkTable )
  {
    v2 = (MiniHouseObjAniInfoTab *)operator new(0xC4u);
    if ( v2 )
      MiniHouseObjAniInfoTab::MiniHouseObjAniInfoTab(v2);
    else
      v1 = 0;
    ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 625 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C150: using guessed type int ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::ms_pkTable;

//----- (004668C0) --------------------------------------------------------
bool __cdecl ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::Load(char *acFn)
{
  int v1; // eax@1
  MiniHouseEndureInfoTable *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::ms_pkTable;
  if ( !ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::ms_pkTable )
  {
    v2 = (MiniHouseEndureInfoTable *)operator new(0xC4u);
    if ( v2 )
      MiniHouseEndureInfoTable::MiniHouseEndureInfoTable(v2);
    else
      v1 = 0;
    ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::ms_pkTable + 56)) != 0
    && *v3 == 251 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C154: using guessed type int ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::ms_pkTable;

//----- (004669A0) --------------------------------------------------------
bool __cdecl ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  MiniHouseFuritureInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::ms_pkTable;
  if ( !ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::ms_pkTable )
  {
    v2 = (MiniHouseFuritureInfoTab *)operator new(0xC4u);
    if ( v2 )
      MiniHouseFuritureInfoTab::MiniHouseFuritureInfoTab(v2);
    else
      v1 = 0;
    ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 1017 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C158: using guessed type int ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::ms_pkTable;

//----- (00466A80) --------------------------------------------------------
bool __cdecl ITableBase<MHEmotion,MiniHouseEmotionTab>::Load(char *acFn)
{
  int v1; // eax@1
  MiniHouseEmotionTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MHEmotion,MiniHouseEmotionTab>::ms_pkTable;
  if ( !ITableBase<MHEmotion,MiniHouseEmotionTab>::ms_pkTable )
  {
    v2 = (MiniHouseEmotionTab *)operator new(0xC4u);
    if ( v2 )
      MiniHouseEmotionTab::MiniHouseEmotionTab(v2);
    else
      v1 = 0;
    ITableBase<MHEmotion,MiniHouseEmotionTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MHEmotion,MiniHouseEmotionTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MHEmotion,MiniHouseEmotionTab>::ms_pkTable + 56)) != 0
    && *v3 == 483 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MHEmotion,MiniHouseEmotionTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MHEmotion,MiniHouseEmotionTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C15C: using guessed type int ITableBase<MHEmotion,MiniHouseEmotionTab>::ms_pkTable;

//----- (00466B60) --------------------------------------------------------
bool __cdecl ITableBase<UpEffectData,UpEffectTab>::Load(char *acFn)
{
  int v1; // eax@1
  UpEffectTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<UpEffectData,UpEffectTab>::ms_pkTable;
  if ( !ITableBase<UpEffectData,UpEffectTab>::ms_pkTable )
  {
    v2 = (UpEffectTab *)operator new(0xC4u);
    if ( v2 )
      UpEffectTab::UpEffectTab(v2);
    else
      v1 = 0;
    ITableBase<UpEffectData,UpEffectTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<UpEffectData,UpEffectTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<UpEffectData,UpEffectTab>::ms_pkTable + 56)) != 0
    && *v3 == 14887 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<UpEffectData,UpEffectTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<UpEffectData,UpEffectTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C160: using guessed type int ITableBase<UpEffectData,UpEffectTab>::ms_pkTable;

//----- (00466C40) --------------------------------------------------------
bool __cdecl ITableBase<ScriptMsg,ScriptMsgTab>::Load(char *acFn)
{
  int v1; // eax@1
  ScriptMsgTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ScriptMsg,ScriptMsgTab>::ms_pkTable;
  if ( !ITableBase<ScriptMsg,ScriptMsgTab>::ms_pkTable )
  {
    v2 = (ScriptMsgTab *)operator new(0xC4u);
    if ( v2 )
      ScriptMsgTab::ScriptMsgTab(v2);
    else
      v1 = 0;
    ITableBase<ScriptMsg,ScriptMsgTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<ScriptMsg,ScriptMsgTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<ScriptMsg,ScriptMsgTab>::ms_pkTable + 56)) != 0
    && *v3 == 1273 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ScriptMsg,ScriptMsgTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ScriptMsg,ScriptMsgTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A89C90: using guessed type int ITableBase<ScriptMsg,ScriptMsgTab>::ms_pkTable;

//----- (00466D20) --------------------------------------------------------
bool __cdecl ITableBase<ChargedItemEffect,ChargedEffectTable>::Load(char *acFn)
{
  int v1; // eax@1
  ChargedEffectTable *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ChargedItemEffect,ChargedEffectTable>::ms_pkTable;
  if ( !ITableBase<ChargedItemEffect,ChargedEffectTable>::ms_pkTable )
  {
    v2 = (ChargedEffectTable *)operator new(0xC4u);
    if ( v2 )
      ChargedEffectTable::ChargedEffectTable(v2);
    else
      v1 = 0;
    ITableBase<ChargedItemEffect,ChargedEffectTable>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<ChargedItemEffect,ChargedEffectTable>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<ChargedItemEffect,ChargedEffectTable>::ms_pkTable + 56)) != 0
    && *v3 == 141 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ChargedItemEffect,ChargedEffectTable>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ChargedItemEffect,ChargedEffectTable>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A886E0: using guessed type int ITableBase<ChargedItemEffect,ChargedEffectTable>::ms_pkTable;

//----- (00466E00) --------------------------------------------------------
bool __cdecl ITableBase<RaceName,CharRace>::Load(char *acFn)
{
  int v1; // eax@1
  CharRace *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<RaceName,CharRace>::ms_pkTable;
  if ( !ITableBase<RaceName,CharRace>::ms_pkTable )
  {
    v2 = (CharRace *)operator new(0xC4u);
    if ( v2 )
      CharRace::CharRace(v2);
    else
      v1 = 0;
    ITableBase<RaceName,CharRace>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<RaceName,CharRace>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<RaceName,CharRace>::ms_pkTable + 56)) != 0
    && *v3 == 148 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<RaceName,CharRace>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<RaceName,CharRace>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C164: using guessed type int ITableBase<RaceName,CharRace>::ms_pkTable;

//----- (00466EE0) --------------------------------------------------------
bool __cdecl ITableBase<FaceInfo,FaceInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  FaceInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable;
  if ( !ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable )
  {
    v2 = (FaceInfoTab *)operator new(0xC4u);
    if ( v2 )
      FaceInfoTab::FaceInfoTab(v2);
    else
      v1 = 0;
    ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 1119 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8869C: using guessed type int ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable;

//----- (00466FC0) --------------------------------------------------------
bool __cdecl ITableBase<DmgSndMapByArmorType,DmgSndTab>::Load(char *acFn)
{
  int v1; // eax@1
  DmgSndTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<DmgSndMapByArmorType,DmgSndTab>::ms_pkTable;
  if ( !ITableBase<DmgSndMapByArmorType,DmgSndTab>::ms_pkTable )
  {
    v2 = (DmgSndTab *)operator new(0xC4u);
    if ( v2 )
      DmgSndTab::DmgSndTab(v2);
    else
      v1 = 0;
    ITableBase<DmgSndMapByArmorType,DmgSndTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<DmgSndMapByArmorType,DmgSndTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<DmgSndMapByArmorType,DmgSndTab>::ms_pkTable + 56)) != 0
    && *v3 == 3829 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<DmgSndMapByArmorType,DmgSndTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<DmgSndMapByArmorType,DmgSndTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C168: using guessed type int ITableBase<DmgSndMapByArmorType,DmgSndTab>::ms_pkTable;

//----- (004670A0) --------------------------------------------------------
bool __cdecl ITableBase<ProduceInfo,ProduceInfoTable>::Load(char *acFn)
{
  int v1; // eax@1
  ProduceInfoTable *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable;
  if ( !ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable )
  {
    v2 = (ProduceInfoTable *)operator new(0xC4u);
    if ( v2 )
      ProduceInfoTable::ProduceInfoTable(v2);
    else
      v1 = 0;
    ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable + 56)) != 0
    && *v3 == 6309 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C16C: using guessed type int ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable;

//----- (00467180) --------------------------------------------------------
bool __cdecl ITableBase<GatherInfo,GatherInfoTable>::Load(char *acFn)
{
  int v1; // eax@1
  GatherInfoTable *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<GatherInfo,GatherInfoTable>::ms_pkTable;
  if ( !ITableBase<GatherInfo,GatherInfoTable>::ms_pkTable )
  {
    v2 = (GatherInfoTable *)operator new(0xC4u);
    if ( v2 )
      GatherInfoTable::GatherInfoTable(v2);
    else
      v1 = 0;
    ITableBase<GatherInfo,GatherInfoTable>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<GatherInfo,GatherInfoTable>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<GatherInfo,GatherInfoTable>::ms_pkTable + 56)) != 0
    && *v3 == 959 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<GatherInfo,GatherInfoTable>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<GatherInfo,GatherInfoTable>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C170: using guessed type int ITableBase<GatherInfo,GatherInfoTable>::ms_pkTable;

//----- (00467260) --------------------------------------------------------
bool __cdecl ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::Load(char *acFn)
{
  int v1; // eax@1
  KQDescTable *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::ms_pkTable;
  if ( !ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::ms_pkTable )
  {
    v2 = (KQDescTable *)operator new(0xC4u);
    if ( v2 )
      KQDescTable::KQDescTable(v2);
    else
      v1 = 0;
    ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::ms_pkTable + 56)) != 0
    && *v3 == 68 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C174: using guessed type int ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::ms_pkTable;

//----- (00467340) --------------------------------------------------------
bool __cdecl ITableBase<ProduceViewInfo,ProduceViewInfoTable>::Load(char *acFn)
{
  int v1; // eax@1
  ProduceViewInfoTable *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ProduceViewInfo,ProduceViewInfoTable>::ms_pkTable;
  if ( !ITableBase<ProduceViewInfo,ProduceViewInfoTable>::ms_pkTable )
  {
    v2 = (ProduceViewInfoTable *)operator new(0xC4u);
    if ( v2 )
      ProduceViewInfoTable::ProduceViewInfoTable(v2);
    else
      v1 = 0;
    ITableBase<ProduceViewInfo,ProduceViewInfoTable>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<ProduceViewInfo,ProduceViewInfoTable>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<ProduceViewInfo,ProduceViewInfoTable>::ms_pkTable + 56)) != 0
    && *v3 == 1014 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ProduceViewInfo,ProduceViewInfoTable>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ProduceViewInfo,ProduceViewInfoTable>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C178: using guessed type int ITableBase<ProduceViewInfo,ProduceViewInfoTable>::ms_pkTable;

//----- (00467420) --------------------------------------------------------
bool __cdecl ITableBase<NpcDialogData,NpcDialogDataTable>::Load(char *acFn)
{
  int v1; // eax@1
  NpcDialogDataTable *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<NpcDialogData,NpcDialogDataTable>::ms_pkTable;
  if ( !ITableBase<NpcDialogData,NpcDialogDataTable>::ms_pkTable )
  {
    v2 = (NpcDialogDataTable *)operator new(0xC4u);
    if ( v2 )
      NpcDialogDataTable::NpcDialogDataTable(v2);
    else
      v1 = 0;
    ITableBase<NpcDialogData,NpcDialogDataTable>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<NpcDialogData,NpcDialogDataTable>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<NpcDialogData,NpcDialogDataTable>::ms_pkTable + 56)) != 0
    && *v3 == 101 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<NpcDialogData,NpcDialogDataTable>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<NpcDialogData,NpcDialogDataTable>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C17C: using guessed type int ITableBase<NpcDialogData,NpcDialogDataTable>::ms_pkTable;

//----- (00467500) --------------------------------------------------------
bool __cdecl ITableBase<GradeItemOption,GradeItemOptionTab>::Load(char *acFn)
{
  int v1; // eax@1
  GradeItemOptionTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<GradeItemOption,GradeItemOptionTab>::ms_pkTable;
  if ( !ITableBase<GradeItemOption,GradeItemOptionTab>::ms_pkTable )
  {
    v2 = (GradeItemOptionTab *)operator new(0xC4u);
    if ( v2 )
      GradeItemOptionTab::GradeItemOptionTab(v2);
    else
      v1 = 0;
    ITableBase<GradeItemOption,GradeItemOptionTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<GradeItemOption,GradeItemOptionTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<GradeItemOption,GradeItemOptionTab>::ms_pkTable + 56)) != 0
    && *v3 == 616 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<GradeItemOption,GradeItemOptionTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<GradeItemOption,GradeItemOptionTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C180: using guessed type int ITableBase<GradeItemOption,GradeItemOptionTab>::ms_pkTable;

//----- (004675E0) --------------------------------------------------------
bool __cdecl ITableBase<MiniHouse,MiniHouseTable>::Load(char *acFn)
{
  int v1; // eax@1
  MiniHouseTable *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MiniHouse,MiniHouseTable>::ms_pkTable;
  if ( !ITableBase<MiniHouse,MiniHouseTable>::ms_pkTable )
  {
    v2 = (MiniHouseTable *)operator new(0xC4u);
    if ( v2 )
      MiniHouseTable::MiniHouseTable(v2);
    else
      v1 = 0;
    ITableBase<MiniHouse,MiniHouseTable>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MiniHouse,MiniHouseTable>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MiniHouse,MiniHouseTable>::ms_pkTable + 56)) != 0
    && *v3 == 488 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MiniHouse,MiniHouseTable>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MiniHouse,MiniHouseTable>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C184: using guessed type int ITableBase<MiniHouse,MiniHouseTable>::ms_pkTable;

//----- (004676C0) --------------------------------------------------------
bool __cdecl ITableBase<ItemShopView,ItemShopViewTable>::Load(char *acFn)
{
  int v1; // eax@1
  ItemShopViewTable *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ItemShopView,ItemShopViewTable>::ms_pkTable;
  if ( !ITableBase<ItemShopView,ItemShopViewTable>::ms_pkTable )
  {
    v2 = (ItemShopViewTable *)operator new(0xC4u);
    if ( v2 )
      ItemShopViewTable::ItemShopViewTable(v2);
    else
      v1 = 0;
    ITableBase<ItemShopView,ItemShopViewTable>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<ItemShopView,ItemShopViewTable>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<ItemShopView,ItemShopViewTable>::ms_pkTable + 56)) != 0
    && *v3 == 4146 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ItemShopView,ItemShopViewTable>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ItemShopView,ItemShopViewTable>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C188: using guessed type int ITableBase<ItemShopView,ItemShopViewTable>::ms_pkTable;

//----- (004677A0) --------------------------------------------------------
bool __cdecl ITableBase<WeaponAttrib,WeaponAttribTab>::Load(char *acFn)
{
  int v1; // eax@1
  WeaponAttribTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<WeaponAttrib,WeaponAttribTab>::ms_pkTable;
  if ( !ITableBase<WeaponAttrib,WeaponAttribTab>::ms_pkTable )
  {
    v2 = (WeaponAttribTab *)operator new(0xC4u);
    if ( v2 )
      WeaponAttribTab::WeaponAttribTab(v2);
    else
      v1 = 0;
    ITableBase<WeaponAttrib,WeaponAttribTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<WeaponAttrib,WeaponAttribTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<WeaponAttrib,WeaponAttribTab>::ms_pkTable + 56)) != 0
    && *v3 == 308 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<WeaponAttrib,WeaponAttribTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<WeaponAttrib,WeaponAttribTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C18C: using guessed type int ITableBase<WeaponAttrib,WeaponAttribTab>::ms_pkTable;

//----- (00467880) --------------------------------------------------------
bool __cdecl ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  WorldMapAvatarInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::ms_pkTable;
  if ( !ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::ms_pkTable )
  {
    v2 = (WorldMapAvatarInfoTab *)operator new(0xC4u);
    if ( v2 )
      WorldMapAvatarInfoTab::WorldMapAvatarInfoTab(v2);
    else
      v1 = 0;
    ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 37 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C190: using guessed type int ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::ms_pkTable;

//----- (00467960) --------------------------------------------------------
bool __cdecl ITableBase<ItemDismantle,ItemDismantleTab>::Load(char *acFn)
{
  int v1; // eax@1
  ItemDismantleTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ItemDismantle,ItemDismantleTab>::ms_pkTable;
  if ( !ITableBase<ItemDismantle,ItemDismantleTab>::ms_pkTable )
  {
    v2 = (ItemDismantleTab *)operator new(0xC4u);
    if ( v2 )
      ItemDismantleTab::ItemDismantleTab(v2);
    else
      v1 = 0;
    ITableBase<ItemDismantle,ItemDismantleTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<ItemDismantle,ItemDismantleTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<ItemDismantle,ItemDismantleTab>::ms_pkTable + 56)) != 0
    && *v3 == 9530 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ItemDismantle,ItemDismantleTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ItemDismantle,ItemDismantleTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C194: using guessed type int ITableBase<ItemDismantle,ItemDismantleTab>::ms_pkTable;

//----- (00467A40) --------------------------------------------------------
bool __cdecl ITableBase<TownPortal,TownPortalInfoTable>::Load(char *acFn)
{
  int v1; // eax@1
  TownPortalInfoTable *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable;
  if ( !ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable )
  {
    v2 = (TownPortalInfoTable *)operator new(0xC4u);
    if ( v2 )
      TownPortalInfoTable::TownPortalInfoTable(v2);
    else
      v1 = 0;
    ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable + 56)) != 0
    && *v3 == 213 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C198: using guessed type int ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable;

//----- (00467B20) --------------------------------------------------------
bool __cdecl ITableBase<SetItemName,SetItemNameTab>::Load(char *acFn)
{
  int v1; // eax@1
  SetItemNameTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<SetItemName,SetItemNameTab>::ms_pkTable;
  if ( !ITableBase<SetItemName,SetItemNameTab>::ms_pkTable )
  {
    v2 = (SetItemNameTab *)operator new(0xC4u);
    if ( v2 )
      SetItemNameTab::SetItemNameTab(v2);
    else
      v1 = 0;
    ITableBase<SetItemName,SetItemNameTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<SetItemName,SetItemNameTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<SetItemName,SetItemNameTab>::ms_pkTable + 56)) != 0
    && *v3 == 76 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<SetItemName,SetItemNameTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<SetItemName,SetItemNameTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C19C: using guessed type int ITableBase<SetItemName,SetItemNameTab>::ms_pkTable;

//----- (00467C00) --------------------------------------------------------
bool __cdecl ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::Load(char *acFn)
{
  int v1; // eax@1
  ItemActionEffectDescTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::ms_pkTable;
  if ( !ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::ms_pkTable )
  {
    v2 = (ItemActionEffectDescTab *)operator new(0xC4u);
    if ( v2 )
      ItemActionEffectDescTab::ItemActionEffectDescTab(v2);
    else
      v1 = 0;
    ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read(
         (CDataReader *)(ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::ms_pkTable + 4),
         acFn)
    && (v3 = *(_DWORD **)(ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::ms_pkTable + 56)) != 0
    && *v3 == 538 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C1A0: using guessed type int ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::ms_pkTable;

//----- (00467CE0) --------------------------------------------------------
bool __cdecl ITableBase<SetEffect,SetEffectTab>::Load(char *acFn)
{
  int v1; // eax@1
  SetEffectTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<SetEffect,SetEffectTab>::ms_pkTable;
  if ( !ITableBase<SetEffect,SetEffectTab>::ms_pkTable )
  {
    v2 = (SetEffectTab *)operator new(0xC4u);
    if ( v2 )
      SetEffectTab::SetEffectTab(v2);
    else
      v1 = 0;
    ITableBase<SetEffect,SetEffectTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<SetEffect,SetEffectTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<SetEffect,SetEffectTab>::ms_pkTable + 56)) != 0
    && *v3 == 16 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<SetEffect,SetEffectTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<SetEffect,SetEffectTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C1A4: using guessed type int ITableBase<SetEffect,SetEffectTab>::ms_pkTable;

//----- (00467DC0) --------------------------------------------------------
bool __cdecl ITableBase<ActionEffectItem,ActionEffectItemTab>::Load(char *acFn)
{
  int v1; // eax@1
  ActionEffectItemTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ActionEffectItem,ActionEffectItemTab>::ms_pkTable;
  if ( !ITableBase<ActionEffectItem,ActionEffectItemTab>::ms_pkTable )
  {
    v2 = (ActionEffectItemTab *)operator new(0xC4u);
    if ( v2 )
      ActionEffectItemTab::ActionEffectItemTab(v2);
    else
      v1 = 0;
    ITableBase<ActionEffectItem,ActionEffectItemTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<ActionEffectItem,ActionEffectItemTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<ActionEffectItem,ActionEffectItemTab>::ms_pkTable + 56)) != 0
    && *v3 == 14 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ActionEffectItem,ActionEffectItemTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ActionEffectItem,ActionEffectItemTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C1A8: using guessed type int ITableBase<ActionEffectItem,ActionEffectItemTab>::ms_pkTable;

//----- (00467EA0) --------------------------------------------------------
bool __cdecl ITableBase<ItemAction,ItemActionTab>::Load(char *acFn)
{
  int v1; // eax@1
  ItemActionTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ItemAction,ItemActionTab>::ms_pkTable;
  if ( !ITableBase<ItemAction,ItemActionTab>::ms_pkTable )
  {
    v2 = (ItemActionTab *)operator new(0xC4u);
    if ( v2 )
      ItemActionTab::ItemActionTab(v2);
    else
      v1 = 0;
    ITableBase<ItemAction,ItemActionTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<ItemAction,ItemActionTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<ItemAction,ItemActionTab>::ms_pkTable + 56)) != 0
    && *v3 == 64 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ItemAction,ItemActionTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ItemAction,ItemActionTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C1AC: using guessed type int ITableBase<ItemAction,ItemActionTab>::ms_pkTable;

//----- (00467F80) --------------------------------------------------------
bool __cdecl ITableBase<ItemActionEffect,ItemActionEffectTab>::Load(char *acFn)
{
  int v1; // eax@1
  ItemActionEffectTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ItemActionEffect,ItemActionEffectTab>::ms_pkTable;
  if ( !ITableBase<ItemActionEffect,ItemActionEffectTab>::ms_pkTable )
  {
    v2 = (ItemActionEffectTab *)operator new(0xC4u);
    if ( v2 )
      ItemActionEffectTab::ItemActionEffectTab(v2);
    else
      v1 = 0;
    ITableBase<ItemActionEffect,ItemActionEffectTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<ItemActionEffect,ItemActionEffectTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<ItemActionEffect,ItemActionEffectTab>::ms_pkTable + 56)) != 0
    && *v3 == 154 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ItemActionEffect,ItemActionEffectTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ItemActionEffect,ItemActionEffectTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C1B0: using guessed type int ITableBase<ItemActionEffect,ItemActionEffectTab>::ms_pkTable;

//----- (00468060) --------------------------------------------------------
bool __cdecl ITableBase<ItemActionCondition,ItemActionConditionTab>::Load(char *acFn)
{
  int v1; // eax@1
  ItemActionConditionTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ItemActionCondition,ItemActionConditionTab>::ms_pkTable;
  if ( !ITableBase<ItemActionCondition,ItemActionConditionTab>::ms_pkTable )
  {
    v2 = (ItemActionConditionTab *)operator new(0xC4u);
    if ( v2 )
      ItemActionConditionTab::ItemActionConditionTab(v2);
    else
      v1 = 0;
    ITableBase<ItemActionCondition,ItemActionConditionTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<ItemActionCondition,ItemActionConditionTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<ItemActionCondition,ItemActionConditionTab>::ms_pkTable + 56)) != 0
    && *v3 == 279 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ItemActionCondition,ItemActionConditionTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ItemActionCondition,ItemActionConditionTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C1B4: using guessed type int ITableBase<ItemActionCondition,ItemActionConditionTab>::ms_pkTable;

//----- (00468140) --------------------------------------------------------
bool __cdecl ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::Load(char *acFn)
{
  int v1; // eax@1
  GuildTournamentStateDescTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::ms_pkTable;
  if ( !ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::ms_pkTable )
  {
    v2 = (GuildTournamentStateDescTab *)operator new(0xC4u);
    if ( v2 )
      GuildTournamentStateDescTab::GuildTournamentStateDescTab(v2);
    else
      v1 = 0;
    ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read(
         (CDataReader *)(ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::ms_pkTable + 4),
         acFn)
    && (v3 = *(_DWORD **)(ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::ms_pkTable + 56)) != 0
    && *v3 == 691 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C1B8: using guessed type int ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::ms_pkTable;

//----- (00468220) --------------------------------------------------------
bool __cdecl ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::Load(char *acFn)
{
  int v1; // eax@1
  GuildTournamentStateTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ms_pkTable;
  if ( !ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ms_pkTable )
  {
    v2 = (GuildTournamentStateTab *)operator new(0xC4u);
    if ( v2 )
      GuildTournamentStateTab::GuildTournamentStateTab(v2);
    else
      v1 = 0;
    ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read(
         (CDataReader *)(ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ms_pkTable + 4),
         acFn)
    && (v3 = *(_DWORD **)(ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ms_pkTable + 56)) != 0
    && *v3 == 251 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C1BC: using guessed type int ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ms_pkTable;

//----- (00468300) --------------------------------------------------------
bool __cdecl ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::Load(char *acFn)
{
  int v1; // eax@1
  GTRequireTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::ms_pkTable;
  if ( !ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::ms_pkTable )
  {
    v2 = (GTRequireTab *)operator new(0xC4u);
    if ( v2 )
      GTRequireTab::GTRequireTab(v2);
    else
      v1 = 0;
    ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::ms_pkTable + 56)) != 0
    && *v3 == 24 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C1C0: using guessed type int ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::ms_pkTable;

//----- (004683E0) --------------------------------------------------------
bool __cdecl ITableBase<DICE_Dividind,DiceDividIndTab>::Load(char *acFn)
{
  int v1; // eax@1
  DiceDividIndTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<DICE_Dividind,DiceDividIndTab>::ms_pkTable;
  if ( !ITableBase<DICE_Dividind,DiceDividIndTab>::ms_pkTable )
  {
    v2 = (DiceDividIndTab *)operator new(0xC4u);
    if ( v2 )
      DiceDividIndTab::DiceDividIndTab(v2);
    else
      v1 = 0;
    ITableBase<DICE_Dividind,DiceDividIndTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<DICE_Dividind,DiceDividIndTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<DICE_Dividind,DiceDividIndTab>::ms_pkTable + 56)) != 0
    && *v3 == 2686 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<DICE_Dividind,DiceDividIndTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<DICE_Dividind,DiceDividIndTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C1C4: using guessed type int ITableBase<DICE_Dividind,DiceDividIndTab>::ms_pkTable;

//----- (004684C0) --------------------------------------------------------
bool __cdecl ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::Load(char *acFn)
{
  int v1; // eax@1
  GBDiceDividIndTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::ms_pkTable;
  if ( !ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::ms_pkTable )
  {
    v2 = (GBDiceDividIndTab *)operator new(0xC4u);
    if ( v2 )
      GBDiceDividIndTab::GBDiceDividIndTab(v2);
    else
      v1 = 0;
    ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::ms_pkTable + 56)) != 0
    && *v3 == 2686 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C1C8: using guessed type int ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::ms_pkTable;

//----- (004685A0) --------------------------------------------------------
bool __cdecl ITableBase<GBHouse,GBHouseTab>::Load(char *acFn)
{
  int v1; // eax@1
  GBHouseTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<GBHouse,GBHouseTab>::ms_pkTable;
  if ( !ITableBase<GBHouse,GBHouseTab>::ms_pkTable )
  {
    v2 = (GBHouseTab *)operator new(0xC4u);
    if ( v2 )
      GBHouseTab::GBHouseTab(v2);
    else
      v1 = 0;
    ITableBase<GBHouse,GBHouseTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<GBHouse,GBHouseTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<GBHouse,GBHouseTab>::ms_pkTable + 56)) != 0
    && *v3 == 40 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<GBHouse,GBHouseTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<GBHouse,GBHouseTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C1CC: using guessed type int ITableBase<GBHouse,GBHouseTab>::ms_pkTable;

//----- (00468680) --------------------------------------------------------
bool __cdecl ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::Load(char *acFn)
{
  int v1; // eax@1
  MobRandomIdleAniTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::ms_pkTable;
  if ( !ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::ms_pkTable )
  {
    v2 = (MobRandomIdleAniTab *)operator new(0xC4u);
    if ( v2 )
      MobRandomIdleAniTab::MobRandomIdleAniTab(v2);
    else
      v1 = 0;
    ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::ms_pkTable + 56)) != 0
    && *v3 == 10 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C1D0: using guessed type int ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::ms_pkTable;

//----- (00468760) --------------------------------------------------------
bool __cdecl ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::Load(char *acFn)
{
  int v1; // eax@1
  CharacterTitleStateViewTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::ms_pkTable;
  if ( !ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::ms_pkTable )
  {
    v2 = (CharacterTitleStateViewTab *)operator new(0xC4u);
    if ( v2 )
      CharacterTitleStateViewTab::CharacterTitleStateViewTab(v2);
    else
      v1 = 0;
    ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read(
         (CDataReader *)(ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::ms_pkTable + 4),
         acFn)
    && (v3 = *(_DWORD **)(ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::ms_pkTable + 56)) != 0
    && *v3 == 538 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C1D4: using guessed type int ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::ms_pkTable;

//----- (00468840) --------------------------------------------------------
bool __cdecl ITableBase<GTIView,GTIViewInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  GTIViewInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<GTIView,GTIViewInfoTab>::ms_pkTable;
  if ( !ITableBase<GTIView,GTIViewInfoTab>::ms_pkTable )
  {
    v2 = (GTIViewInfoTab *)operator new(0xC4u);
    if ( v2 )
      GTIViewInfoTab::GTIViewInfoTab(v2);
    else
      v1 = 0;
    ITableBase<GTIView,GTIViewInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<GTIView,GTIViewInfoTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<GTIView,GTIViewInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 140 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<GTIView,GTIViewInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<GTIView,GTIViewInfoTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C1D8: using guessed type int ITableBase<GTIView,GTIViewInfoTab>::ms_pkTable;

//----- (00468920) --------------------------------------------------------
bool __cdecl ITableBase<DamageEffect,DamageEffectTab>::Load(char *acFn)
{
  int v1; // eax@1
  DamageEffectTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<DamageEffect,DamageEffectTab>::ms_pkTable;
  if ( !ITableBase<DamageEffect,DamageEffectTab>::ms_pkTable )
  {
    v2 = (DamageEffectTab *)operator new(0xC4u);
    if ( v2 )
      DamageEffectTab::DamageEffectTab(v2);
    else
      v1 = 0;
    ITableBase<DamageEffect,DamageEffectTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<DamageEffect,DamageEffectTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<DamageEffect,DamageEffectTab>::ms_pkTable + 56)) != 0
    && *v3 == 134 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<DamageEffect,DamageEffectTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<DamageEffect,DamageEffectTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C1DC: using guessed type int ITableBase<DamageEffect,DamageEffectTab>::ms_pkTable;

//----- (00468A00) --------------------------------------------------------
bool __cdecl ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::Load(char *acFn)
{
  int v1; // eax@1
  ActiveSkillGroupTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::ms_pkTable;
  if ( !ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::ms_pkTable )
  {
    v2 = (ActiveSkillGroupTab *)operator new(0xC4u);
    if ( v2 )
      ActiveSkillGroupTab::ActiveSkillGroupTab(v2);
    else
      v1 = 0;
    ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::ms_pkTable + 56)) != 0
    && *v3 == 18 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C1E0: using guessed type int ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::ms_pkTable;

//----- (00468AE0) --------------------------------------------------------
bool __cdecl ITableBase<MapWayPoint,MapWayPointTab>::Load(char *acFn)
{
  int v1; // eax@1
  MapWayPointTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MapWayPoint,MapWayPointTab>::ms_pkTable;
  if ( !ITableBase<MapWayPoint,MapWayPointTab>::ms_pkTable )
  {
    v2 = (MapWayPointTab *)operator new(0xC4u);
    if ( v2 )
      MapWayPointTab::MapWayPointTab(v2);
    else
      v1 = 0;
    ITableBase<MapWayPoint,MapWayPointTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MapWayPoint,MapWayPointTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MapWayPoint,MapWayPointTab>::ms_pkTable + 56)) != 0
    && *v3 == 37 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MapWayPoint,MapWayPointTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MapWayPoint,MapWayPointTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C1E4: using guessed type int ITableBase<MapWayPoint,MapWayPointTab>::ms_pkTable;

//----- (00468BC0) --------------------------------------------------------
bool __cdecl ITableBase<MapLinkPoint,MapLinkPointTab>::Load(char *acFn)
{
  int v1; // eax@1
  MapLinkPointTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MapLinkPoint,MapLinkPointTab>::ms_pkTable;
  if ( !ITableBase<MapLinkPoint,MapLinkPointTab>::ms_pkTable )
  {
    v2 = (MapLinkPointTab *)operator new(0xC4u);
    if ( v2 )
      MapLinkPointTab::MapLinkPointTab(v2);
    else
      v1 = 0;
    ITableBase<MapLinkPoint,MapLinkPointTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MapLinkPoint,MapLinkPointTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MapLinkPoint,MapLinkPointTab>::ms_pkTable + 56)) != 0
    && *v3 == 43 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MapLinkPoint,MapLinkPointTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MapLinkPoint,MapLinkPointTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C1E8: using guessed type int ITableBase<MapLinkPoint,MapLinkPointTab>::ms_pkTable;

//----- (00468CA0) --------------------------------------------------------
bool __cdecl ITableBase<BelongTypeInfo,BelongTypeInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  BelongTypeInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<BelongTypeInfo,BelongTypeInfoTab>::ms_pkTable;
  if ( !ITableBase<BelongTypeInfo,BelongTypeInfoTab>::ms_pkTable )
  {
    v2 = (BelongTypeInfoTab *)operator new(0xC4u);
    if ( v2 )
      BelongTypeInfoTab::BelongTypeInfoTab(v2);
    else
      v1 = 0;
    ITableBase<BelongTypeInfo,BelongTypeInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<BelongTypeInfo,BelongTypeInfoTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<BelongTypeInfo,BelongTypeInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 70 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<BelongTypeInfo,BelongTypeInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<BelongTypeInfo,BelongTypeInfoTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C1EC: using guessed type int ITableBase<BelongTypeInfo,BelongTypeInfoTab>::ms_pkTable;

//----- (00468D80) --------------------------------------------------------
bool __cdecl ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>::Load(char *acFn)
{
  int v1; // eax@1
  ChargedDeletableBuffTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>::ms_pkTable;
  if ( !ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>::ms_pkTable )
  {
    v2 = (ChargedDeletableBuffTab *)operator new(0xC4u);
    if ( v2 )
      ChargedDeletableBuffTab::ChargedDeletableBuffTab(v2);
    else
      v1 = 0;
    ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read(
         (CDataReader *)(ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>::ms_pkTable + 4),
         acFn)
    && (v3 = *(_DWORD **)(ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>::ms_pkTable + 56)) != 0
    && *v3 == 1 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C1F0: using guessed type int ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>::ms_pkTable;

//----- (00468E60) --------------------------------------------------------
bool __cdecl ITableBase<BasicInfoTitle,BasicInfoTitleTab>::Load(char *acFn)
{
  int v1; // eax@1
  BasicInfoTitleTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<BasicInfoTitle,BasicInfoTitleTab>::ms_pkTable;
  if ( !ITableBase<BasicInfoTitle,BasicInfoTitleTab>::ms_pkTable )
  {
    v2 = (BasicInfoTitleTab *)operator new(0xC4u);
    if ( v2 )
      BasicInfoTitleTab::BasicInfoTitleTab(v2);
    else
      v1 = 0;
    ITableBase<BasicInfoTitle,BasicInfoTitleTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<BasicInfoTitle,BasicInfoTitleTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<BasicInfoTitle,BasicInfoTitleTab>::ms_pkTable + 56)) != 0
    && *v3 == 268 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<BasicInfoTitle,BasicInfoTitleTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<BasicInfoTitle,BasicInfoTitleTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C1F4: using guessed type int ITableBase<BasicInfoTitle,BasicInfoTitleTab>::ms_pkTable;

//----- (00468F40) --------------------------------------------------------
bool __cdecl ITableBase<BasicInfoLink,BasicInfoLinkTab>::Load(char *acFn)
{
  int v1; // eax@1
  BasicInfoLinkTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable;
  if ( !ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable )
  {
    v2 = (BasicInfoLinkTab *)operator new(0xC4u);
    if ( v2 )
      BasicInfoLinkTab::BasicInfoLinkTab(v2);
    else
      v1 = 0;
    ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable + 56)) != 0
    && *v3 == 2260 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C1F8: using guessed type int ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable;

//----- (00469020) --------------------------------------------------------
bool __cdecl ITableBase<BasicInfoTip,BasicInfoTipTab>::Load(char *acFn)
{
  int v1; // eax@1
  BasicInfoTipTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<BasicInfoTip,BasicInfoTipTab>::ms_pkTable;
  if ( !ITableBase<BasicInfoTip,BasicInfoTipTab>::ms_pkTable )
  {
    v2 = (BasicInfoTipTab *)operator new(0xC4u);
    if ( v2 )
      BasicInfoTipTab::BasicInfoTipTab(v2);
    else
      v1 = 0;
    ITableBase<BasicInfoTip,BasicInfoTipTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<BasicInfoTip,BasicInfoTipTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<BasicInfoTip,BasicInfoTipTab>::ms_pkTable + 56)) != 0
    && *v3 == 285 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<BasicInfoTip,BasicInfoTipTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<BasicInfoTip,BasicInfoTipTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C1FC: using guessed type int ITableBase<BasicInfoTip,BasicInfoTipTab>::ms_pkTable;

//----- (00469100) --------------------------------------------------------
bool __cdecl ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>::Load(char *acFn)
{
  int v1; // eax@1
  BasicInfoTipCycleTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>::ms_pkTable;
  if ( !ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>::ms_pkTable )
  {
    v2 = (BasicInfoTipCycleTab *)operator new(0xC4u);
    if ( v2 )
      BasicInfoTipCycleTab::BasicInfoTipCycleTab(v2);
    else
      v1 = 0;
    ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>::ms_pkTable + 56)) != 0
    && *v3 == 1 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C200: using guessed type int ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>::ms_pkTable;

//----- (004691E0) --------------------------------------------------------
bool __cdecl ITableBase<BasicInfoFind,BasicInfoFindTab>::Load(char *acFn)
{
  int v1; // eax@1
  BasicInfoFindTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<BasicInfoFind,BasicInfoFindTab>::ms_pkTable;
  if ( !ITableBase<BasicInfoFind,BasicInfoFindTab>::ms_pkTable )
  {
    v2 = (BasicInfoFindTab *)operator new(0xC4u);
    if ( v2 )
      BasicInfoFindTab::BasicInfoFindTab(v2);
    else
      v1 = 0;
    ITableBase<BasicInfoFind,BasicInfoFindTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<BasicInfoFind,BasicInfoFindTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<BasicInfoFind,BasicInfoFindTab>::ms_pkTable + 56)) != 0
    && *v3 == 18 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<BasicInfoFind,BasicInfoFindTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<BasicInfoFind,BasicInfoFindTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C204: using guessed type int ITableBase<BasicInfoFind,BasicInfoFindTab>::ms_pkTable;

//----- (004692C0) --------------------------------------------------------
bool __cdecl ITableBase<BasicInfoFindUI,BasicInfoFindUITab>::Load(char *acFn)
{
  int v1; // eax@1
  BasicInfoFindUITab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<BasicInfoFindUI,BasicInfoFindUITab>::ms_pkTable;
  if ( !ITableBase<BasicInfoFindUI,BasicInfoFindUITab>::ms_pkTable )
  {
    v2 = (BasicInfoFindUITab *)operator new(0xC4u);
    if ( v2 )
      BasicInfoFindUITab::BasicInfoFindUITab(v2);
    else
      v1 = 0;
    ITableBase<BasicInfoFindUI,BasicInfoFindUITab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<BasicInfoFindUI,BasicInfoFindUITab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<BasicInfoFindUI,BasicInfoFindUITab>::ms_pkTable + 56)) != 0
    && *v3 == 51 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<BasicInfoFindUI,BasicInfoFindUITab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<BasicInfoFindUI,BasicInfoFindUITab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C208: using guessed type int ITableBase<BasicInfoFindUI,BasicInfoFindUITab>::ms_pkTable;

//----- (004693A0) --------------------------------------------------------
bool __cdecl ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::Load(char *acFn)
{
  int v1; // eax@1
  BasicInfoFindWordTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::ms_pkTable;
  if ( !ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::ms_pkTable )
  {
    v2 = (BasicInfoFindWordTab *)operator new(0xC4u);
    if ( v2 )
      BasicInfoFindWordTab::BasicInfoFindWordTab(v2);
    else
      v1 = 0;
    ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::ms_pkTable + 56)) != 0
    && *v3 == 76 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C20C: using guessed type int ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::ms_pkTable;

//----- (00469480) --------------------------------------------------------
bool __cdecl ITableBase<CollectCard,CollectCardTab>::Load(char *acFn)
{
  int v1; // eax@1
  CollectCardTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<CollectCard,CollectCardTab>::ms_pkTable;
  if ( !ITableBase<CollectCard,CollectCardTab>::ms_pkTable )
  {
    v2 = (CollectCardTab *)operator new(0xC4u);
    if ( v2 )
      CollectCardTab::CollectCardTab(v2);
    else
      v1 = 0;
    ITableBase<CollectCard,CollectCardTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<CollectCard,CollectCardTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<CollectCard,CollectCardTab>::ms_pkTable + 56)) != 0
    && *v3 == 126 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<CollectCard,CollectCardTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<CollectCard,CollectCardTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C210: using guessed type int ITableBase<CollectCard,CollectCardTab>::ms_pkTable;

//----- (00469560) --------------------------------------------------------
bool __cdecl ITableBase<CollectCardView,CollectCardViewTab>::Load(char *acFn)
{
  int v1; // eax@1
  CollectCardViewTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<CollectCardView,CollectCardViewTab>::ms_pkTable;
  if ( !ITableBase<CollectCardView,CollectCardViewTab>::ms_pkTable )
  {
    v2 = (CollectCardViewTab *)operator new(0xC4u);
    if ( v2 )
      CollectCardViewTab::CollectCardViewTab(v2);
    else
      v1 = 0;
    ITableBase<CollectCardView,CollectCardViewTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<CollectCardView,CollectCardViewTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<CollectCardView,CollectCardViewTab>::ms_pkTable + 56)) != 0
    && *v3 == 1177 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<CollectCardView,CollectCardViewTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<CollectCardView,CollectCardViewTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C214: using guessed type int ITableBase<CollectCardView,CollectCardViewTab>::ms_pkTable;

//----- (00469640) --------------------------------------------------------
bool __cdecl ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::Load(char *acFn)
{
  int v1; // eax@1
  CollectCardGroupDescTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::ms_pkTable;
  if ( !ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::ms_pkTable )
  {
    v2 = (CollectCardGroupDescTab *)operator new(0xC4u);
    if ( v2 )
      CollectCardGroupDescTab::CollectCardGroupDescTab(v2);
    else
      v1 = 0;
    ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read(
         (CDataReader *)(ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::ms_pkTable + 4),
         acFn)
    && (v3 = *(_DWORD **)(ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::ms_pkTable + 56)) != 0
    && *v3 == 76 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C218: using guessed type int ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::ms_pkTable;

//----- (00469720) --------------------------------------------------------
bool __cdecl ITableBase<CollectCardReward,CollectCardRewardTab>::Load(char *acFn)
{
  int v1; // eax@1
  CollectCardRewardTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<CollectCardReward,CollectCardRewardTab>::ms_pkTable;
  if ( !ITableBase<CollectCardReward,CollectCardRewardTab>::ms_pkTable )
  {
    v2 = (CollectCardRewardTab *)operator new(0xC4u);
    if ( v2 )
      CollectCardRewardTab::CollectCardRewardTab(v2);
    else
      v1 = 0;
    ITableBase<CollectCardReward,CollectCardRewardTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<CollectCardReward,CollectCardRewardTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<CollectCardReward,CollectCardRewardTab>::ms_pkTable + 56)) != 0
    && *v3 == 273 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<CollectCardReward,CollectCardRewardTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<CollectCardReward,CollectCardRewardTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C21C: using guessed type int ITableBase<CollectCardReward,CollectCardRewardTab>::ms_pkTable;

//----- (00469800) --------------------------------------------------------
bool __cdecl ITableBase<CollectCardTitle,CollectCardTitleTab>::Load(char *acFn)
{
  int v1; // eax@1
  CollectCardTitleTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<CollectCardTitle,CollectCardTitleTab>::ms_pkTable;
  if ( !ITableBase<CollectCardTitle,CollectCardTitleTab>::ms_pkTable )
  {
    v2 = (CollectCardTitleTab *)operator new(0xC4u);
    if ( v2 )
      CollectCardTitleTab::CollectCardTitleTab(v2);
    else
      v1 = 0;
    ITableBase<CollectCardTitle,CollectCardTitleTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<CollectCardTitle,CollectCardTitleTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<CollectCardTitle,CollectCardTitleTab>::ms_pkTable + 56)) != 0
    && *v3 == 44 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<CollectCardTitle,CollectCardTitleTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<CollectCardTitle,CollectCardTitleTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C220: using guessed type int ITableBase<CollectCardTitle,CollectCardTitleTab>::ms_pkTable;

//----- (004698E0) --------------------------------------------------------
bool __cdecl ITableBase<MoverMain,MoverMainTab>::Load(char *acFn)
{
  int v1; // eax@1
  MoverMainTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MoverMain,MoverMainTab>::ms_pkTable;
  if ( !ITableBase<MoverMain,MoverMainTab>::ms_pkTable )
  {
    v2 = (MoverMainTab *)operator new(0xC4u);
    if ( v2 )
      MoverMainTab::MoverMainTab(v2);
    else
      v1 = 0;
    ITableBase<MoverMain,MoverMainTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MoverMain,MoverMainTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MoverMain,MoverMainTab>::ms_pkTable + 56)) != 0
    && *v3 == 186 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MoverMain,MoverMainTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MoverMain,MoverMainTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A89D24: using guessed type int ITableBase<MoverMain,MoverMainTab>::ms_pkTable;

//----- (004699C0) --------------------------------------------------------
bool __cdecl ITableBase<MoverUseSkill,MoverUseSkillTab>::Load(char *acFn)
{
  int v1; // eax@1
  MoverUseSkillTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MoverUseSkill,MoverUseSkillTab>::ms_pkTable;
  if ( !ITableBase<MoverUseSkill,MoverUseSkillTab>::ms_pkTable )
  {
    v2 = (MoverUseSkillTab *)operator new(0xC4u);
    if ( v2 )
      MoverUseSkillTab::MoverUseSkillTab(v2);
    else
      v1 = 0;
    ITableBase<MoverUseSkill,MoverUseSkillTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MoverUseSkill,MoverUseSkillTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MoverUseSkill,MoverUseSkillTab>::ms_pkTable + 56)) != 0
    && *v3 == 44 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MoverUseSkill,MoverUseSkillTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MoverUseSkill,MoverUseSkillTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C224: using guessed type int ITableBase<MoverUseSkill,MoverUseSkillTab>::ms_pkTable;

//----- (00469AA0) --------------------------------------------------------
bool __cdecl ITableBase<MoverHG,MoverHGTab>::Load(char *acFn)
{
  int v1; // eax@1
  MoverHGTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MoverHG,MoverHGTab>::ms_pkTable;
  if ( !ITableBase<MoverHG,MoverHGTab>::ms_pkTable )
  {
    v2 = (MoverHGTab *)operator new(0xC4u);
    if ( v2 )
      MoverHGTab::MoverHGTab(v2);
    else
      v1 = 0;
    ITableBase<MoverHG,MoverHGTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MoverHG,MoverHGTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MoverHG,MoverHGTab>::ms_pkTable + 56)) != 0
    && *v3 == 149 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MoverHG,MoverHGTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MoverHG,MoverHGTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A89D28: using guessed type int ITableBase<MoverHG,MoverHGTab>::ms_pkTable;

//----- (00469B80) --------------------------------------------------------
bool __cdecl ITableBase<MoverView,MoverViewTab>::Load(char *acFn)
{
  int v1; // eax@1
  MoverViewTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MoverView,MoverViewTab>::ms_pkTable;
  if ( !ITableBase<MoverView,MoverViewTab>::ms_pkTable )
  {
    v2 = (MoverViewTab *)operator new(0xC4u);
    if ( v2 )
      MoverViewTab::MoverViewTab(v2);
    else
      v1 = 0;
    ITableBase<MoverView,MoverViewTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MoverView,MoverViewTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MoverView,MoverViewTab>::ms_pkTable + 56)) != 0
    && *v3 == 1072 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MoverView,MoverViewTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MoverView,MoverViewTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C228: using guessed type int ITableBase<MoverView,MoverViewTab>::ms_pkTable;

//----- (00469C60) --------------------------------------------------------
bool __cdecl ITableBase<MoverSlotView,MoverSlotViewTab>::Load(char *acFn)
{
  int v1; // eax@1
  MoverSlotViewTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MoverSlotView,MoverSlotViewTab>::ms_pkTable;
  if ( !ITableBase<MoverSlotView,MoverSlotViewTab>::ms_pkTable )
  {
    v2 = (MoverSlotViewTab *)operator new(0xC4u);
    if ( v2 )
      MoverSlotViewTab::MoverSlotViewTab(v2);
    else
      v1 = 0;
    ITableBase<MoverSlotView,MoverSlotViewTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MoverSlotView,MoverSlotViewTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MoverSlotView,MoverSlotViewTab>::ms_pkTable + 56)) != 0
    && *v3 == 12 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MoverSlotView,MoverSlotViewTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MoverSlotView,MoverSlotViewTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C22C: using guessed type int ITableBase<MoverSlotView,MoverSlotViewTab>::ms_pkTable;

//----- (00469D40) --------------------------------------------------------
bool __cdecl ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::Load(char *acFn)
{
  int v1; // eax@1
  MoverSlotCharAniTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::ms_pkTable;
  if ( !ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::ms_pkTable )
  {
    v2 = (MoverSlotCharAniTab *)operator new(0xC4u);
    if ( v2 )
      MoverSlotCharAniTab::MoverSlotCharAniTab(v2);
    else
      v1 = 0;
    ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::ms_pkTable + 56)) != 0
    && *v3 == 96 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C230: using guessed type int ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::ms_pkTable;

//----- (00469E20) --------------------------------------------------------
bool __cdecl ITableBase<MoverAbility,MoverAbilityTab>::Load(char *acFn)
{
  int v1; // eax@1
  MoverAbilityTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MoverAbility,MoverAbilityTab>::ms_pkTable;
  if ( !ITableBase<MoverAbility,MoverAbilityTab>::ms_pkTable )
  {
    v2 = (MoverAbilityTab *)operator new(0xC4u);
    if ( v2 )
      MoverAbilityTab::MoverAbilityTab(v2);
    else
      v1 = 0;
    ITableBase<MoverAbility,MoverAbilityTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MoverAbility,MoverAbilityTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MoverAbility,MoverAbilityTab>::ms_pkTable + 56)) != 0
    && *v3 == 904 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MoverAbility,MoverAbilityTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MoverAbility,MoverAbilityTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C234: using guessed type int ITableBase<MoverAbility,MoverAbilityTab>::ms_pkTable;

//----- (00469F00) --------------------------------------------------------
bool __cdecl ITableBase<MoverItem,MoverItemTab>::Load(char *acFn)
{
  int v1; // eax@1
  MoverItemTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MoverItem,MoverItemTab>::ms_pkTable;
  if ( !ITableBase<MoverItem,MoverItemTab>::ms_pkTable )
  {
    v2 = (MoverItemTab *)operator new(0xC4u);
    if ( v2 )
      MoverItemTab::MoverItemTab(v2);
    else
      v1 = 0;
    ITableBase<MoverItem,MoverItemTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MoverItem,MoverItemTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MoverItem,MoverItemTab>::ms_pkTable + 56)) != 0
    && *v3 == 44 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MoverItem,MoverItemTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MoverItem,MoverItemTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C238: using guessed type int ITableBase<MoverItem,MoverItemTab>::ms_pkTable;

//----- (00469FE0) --------------------------------------------------------
bool __cdecl ITableBase<PupMain,PetMainTab>::Load(char *acFn)
{
  int v1; // eax@1
  PetMainTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<PupMain,PetMainTab>::ms_pkTable;
  if ( !ITableBase<PupMain,PetMainTab>::ms_pkTable )
  {
    v2 = (PetMainTab *)operator new(0xC4u);
    if ( v2 )
      PetMainTab::PetMainTab(v2);
    else
      v1 = 0;
    ITableBase<PupMain,PetMainTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<PupMain,PetMainTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<PupMain,PetMainTab>::ms_pkTable + 56)) != 0
    && *v3 == 145 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<PupMain,PetMainTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<PupMain,PetMainTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A89D30: using guessed type int ITableBase<PupMain,PetMainTab>::ms_pkTable;

//----- (0046A0C0) --------------------------------------------------------
bool __cdecl ITableBase<PupView,PetViewTab>::Load(char *acFn)
{
  int v1; // eax@1
  PetViewTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<PupView,PetViewTab>::ms_pkTable;
  if ( !ITableBase<PupView,PetViewTab>::ms_pkTable )
  {
    v2 = (PetViewTab *)operator new(0xC4u);
    if ( v2 )
      PetViewTab::PetViewTab(v2);
    else
      v1 = 0;
    ITableBase<PupView,PetViewTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<PupView,PetViewTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<PupView,PetViewTab>::ms_pkTable + 56)) != 0
    && *v3 == 277 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<PupView,PetViewTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<PupView,PetViewTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A89D34: using guessed type int ITableBase<PupView,PetViewTab>::ms_pkTable;

//----- (0046A1A0) --------------------------------------------------------
bool __cdecl ITableBase<KQVoteDesc,KQVoteDescTable>::Load(char *acFn)
{
  int v1; // eax@1
  KQVoteDescTable *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<KQVoteDesc,KQVoteDescTable>::ms_pkTable;
  if ( !ITableBase<KQVoteDesc,KQVoteDescTable>::ms_pkTable )
  {
    v2 = (KQVoteDescTable *)operator new(0xC4u);
    if ( v2 )
      KQVoteDescTable::KQVoteDescTable(v2);
    else
      v1 = 0;
    ITableBase<KQVoteDesc,KQVoteDescTable>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<KQVoteDesc,KQVoteDescTable>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<KQVoteDesc,KQVoteDescTable>::ms_pkTable + 56)) != 0
    && *v3 == 609 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<KQVoteDesc,KQVoteDescTable>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<KQVoteDesc,KQVoteDescTable>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C23C: using guessed type int ITableBase<KQVoteDesc,KQVoteDescTable>::ms_pkTable;

//----- (0046A280) --------------------------------------------------------
bool __cdecl ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::Load(char *acFn)
{
  int v1; // eax@1
  KQVoteMajorityRateTable *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::ms_pkTable;
  if ( !ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::ms_pkTable )
  {
    v2 = (KQVoteMajorityRateTable *)operator new(0xC4u);
    if ( v2 )
      KQVoteMajorityRateTable::KQVoteMajorityRateTable(v2);
    else
      v1 = 0;
    ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::ms_pkTable + 56)) != 0
    && *v3 == 1 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C240: using guessed type int ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::ms_pkTable;

//----- (0046A360) --------------------------------------------------------
bool __cdecl ITableBase<KQIsVote,KQIsVoteTable>::Load(char *acFn)
{
  int v1; // eax@1
  KQIsVoteTable *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<KQIsVote,KQIsVoteTable>::ms_pkTable;
  if ( !ITableBase<KQIsVote,KQIsVoteTable>::ms_pkTable )
  {
    v2 = (KQIsVoteTable *)operator new(0xC4u);
    if ( v2 )
      KQIsVoteTable::KQIsVoteTable(v2);
    else
      v1 = 0;
    ITableBase<KQIsVote,KQIsVoteTable>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<KQIsVote,KQIsVoteTable>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<KQIsVote,KQIsVoteTable>::ms_pkTable + 56)) != 0
    && *v3 == 5 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<KQIsVote,KQIsVoteTable>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<KQIsVote,KQIsVoteTable>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C244: using guessed type int ITableBase<KQIsVote,KQIsVoteTable>::ms_pkTable;

//----- (0046A440) --------------------------------------------------------
bool __cdecl ITableBase<KQTeam,KQTeamTable>::Load(char *acFn)
{
  int v1; // eax@1
  KQTeamTable *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<KQTeam,KQTeamTable>::ms_pkTable;
  if ( !ITableBase<KQTeam,KQTeamTable>::ms_pkTable )
  {
    v2 = (KQTeamTable *)operator new(0xC4u);
    if ( v2 )
      KQTeamTable::KQTeamTable(v2);
    else
      v1 = 0;
    ITableBase<KQTeam,KQTeamTable>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<KQTeam,KQTeamTable>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<KQTeam,KQTeamTable>::ms_pkTable + 56)) != 0
    && *v3 == 241 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<KQTeam,KQTeamTable>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<KQTeam,KQTeamTable>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C248: using guessed type int ITableBase<KQTeam,KQTeamTable>::ms_pkTable;

//----- (0046A520) --------------------------------------------------------
bool __cdecl ITableBase<MobConditionView,MobConditionViewTab>::Load(char *acFn)
{
  int v1; // eax@1
  MobConditionViewTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MobConditionView,MobConditionViewTab>::ms_pkTable;
  if ( !ITableBase<MobConditionView,MobConditionViewTab>::ms_pkTable )
  {
    v2 = (MobConditionViewTab *)operator new(0xC4u);
    if ( v2 )
      MobConditionViewTab::MobConditionViewTab(v2);
    else
      v1 = 0;
    ITableBase<MobConditionView,MobConditionViewTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MobConditionView,MobConditionViewTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MobConditionView,MobConditionViewTab>::ms_pkTable + 56)) != 0
    && *v3 == 50 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MobConditionView,MobConditionViewTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MobConditionView,MobConditionViewTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C24C: using guessed type int ITableBase<MobConditionView,MobConditionViewTab>::ms_pkTable;

//----- (0046A600) --------------------------------------------------------
bool __cdecl ITableBase<MobNoFadeIn,MobNoFadeInTab>::Load(char *acFn)
{
  int v1; // eax@1
  MobNoFadeInTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MobNoFadeIn,MobNoFadeInTab>::ms_pkTable;
  if ( !ITableBase<MobNoFadeIn,MobNoFadeInTab>::ms_pkTable )
  {
    v2 = (MobNoFadeInTab *)operator new(0xC4u);
    if ( v2 )
      MobNoFadeInTab::MobNoFadeInTab(v2);
    else
      v1 = 0;
    ITableBase<MobNoFadeIn,MobNoFadeInTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MobNoFadeIn,MobNoFadeInTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MobNoFadeIn,MobNoFadeInTab>::ms_pkTable + 56)) != 0
    && *v3 == 1 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MobNoFadeIn,MobNoFadeInTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MobNoFadeIn,MobNoFadeInTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C250: using guessed type int ITableBase<MobNoFadeIn,MobNoFadeInTab>::ms_pkTable;

//----- (0046A6E0) --------------------------------------------------------
bool __cdecl ITableBase<MarketSearchInfo,MarketSearchInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  MarketSearchInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MarketSearchInfo,MarketSearchInfoTab>::ms_pkTable;
  if ( !ITableBase<MarketSearchInfo,MarketSearchInfoTab>::ms_pkTable )
  {
    v2 = (MarketSearchInfoTab *)operator new(0xC4u);
    if ( v2 )
      MarketSearchInfoTab::MarketSearchInfoTab(v2);
    else
      v1 = 0;
    ITableBase<MarketSearchInfo,MarketSearchInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MarketSearchInfo,MarketSearchInfoTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MarketSearchInfo,MarketSearchInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 18 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MarketSearchInfo,MarketSearchInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MarketSearchInfo,MarketSearchInfoTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C254: using guessed type int ITableBase<MarketSearchInfo,MarketSearchInfoTab>::ms_pkTable;

//----- (0046A7C0) --------------------------------------------------------
bool __cdecl ITableBase<ChrCreateEquip,ChrCreateEquipTab>::Load(char *acFn)
{
  int v1; // eax@1
  ChrCreateEquipTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ChrCreateEquip,ChrCreateEquipTab>::ms_pkTable;
  if ( !ITableBase<ChrCreateEquip,ChrCreateEquipTab>::ms_pkTable )
  {
    v2 = (ChrCreateEquipTab *)operator new(0xC4u);
    if ( v2 )
      ChrCreateEquipTab::ChrCreateEquipTab(v2);
    else
      v1 = 0;
    ITableBase<ChrCreateEquip,ChrCreateEquipTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<ChrCreateEquip,ChrCreateEquipTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<ChrCreateEquip,ChrCreateEquipTab>::ms_pkTable + 56)) != 0
    && *v3 == 1145 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ChrCreateEquip,ChrCreateEquipTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ChrCreateEquip,ChrCreateEquipTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A88698: using guessed type int ITableBase<ChrCreateEquip,ChrCreateEquipTab>::ms_pkTable;

//----- (0046A8A0) --------------------------------------------------------
bool __cdecl ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::Load(char *acFn)
{
  int v1; // eax@1
  MoverUpgradeEffectTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::ms_pkTable;
  if ( !ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::ms_pkTable )
  {
    v2 = (MoverUpgradeEffectTab *)operator new(0xC4u);
    if ( v2 )
      MoverUpgradeEffectTab::MoverUpgradeEffectTab(v2);
    else
      v1 = 0;
    ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::ms_pkTable + 56)) != 0
    && *v3 == 541 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C258: using guessed type int ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::ms_pkTable;

//----- (0046A980) --------------------------------------------------------
bool __cdecl ITableBase<ChatColor,ChatColorTab>::Load(char *acFn)
{
  int v1; // eax@1
  ChatColorTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ChatColor,ChatColorTab>::ms_pkTable;
  if ( !ITableBase<ChatColor,ChatColorTab>::ms_pkTable )
  {
    v2 = (ChatColorTab *)operator new(0xC4u);
    if ( v2 )
      ChatColorTab::ChatColorTab(v2);
    else
      v1 = 0;
    ITableBase<ChatColor,ChatColorTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<ChatColor,ChatColorTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<ChatColor,ChatColorTab>::ms_pkTable + 56)) != 0
    && *v3 == 22 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ChatColor,ChatColorTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ChatColor,ChatColorTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A886DC: using guessed type int ITableBase<ChatColor,ChatColorTab>::ms_pkTable;

//----- (0046AA60) --------------------------------------------------------
bool __cdecl ITableBase<TermExtendMatch,TermExtendMatchTable>::Load(char *acFn)
{
  int v1; // eax@1
  TermExtendMatchTable *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<TermExtendMatch,TermExtendMatchTable>::ms_pkTable;
  if ( !ITableBase<TermExtendMatch,TermExtendMatchTable>::ms_pkTable )
  {
    v2 = (TermExtendMatchTable *)operator new(0xC4u);
    if ( v2 )
      TermExtendMatchTable::TermExtendMatchTable(v2);
    else
      v1 = 0;
    ITableBase<TermExtendMatch,TermExtendMatchTable>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<TermExtendMatch,TermExtendMatchTable>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<TermExtendMatch,TermExtendMatchTable>::ms_pkTable + 56)) != 0
    && *v3 == 44 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<TermExtendMatch,TermExtendMatchTable>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<TermExtendMatch,TermExtendMatchTable>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A89D4C: using guessed type int ITableBase<TermExtendMatch,TermExtendMatchTable>::ms_pkTable;

//----- (0046AB40) --------------------------------------------------------
bool __cdecl ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>::Load(char *acFn)
{
  int v1; // eax@1
  TermExtendMatchGroupDescTable *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>::ms_pkTable;
  if ( !ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>::ms_pkTable )
  {
    v2 = (TermExtendMatchGroupDescTable *)operator new(0xC4u);
    if ( v2 )
      TermExtendMatchGroupDescTable::TermExtendMatchGroupDescTable(v2);
    else
      v1 = 0;
    ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read(
         (CDataReader *)(ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>::ms_pkTable + 4),
         acFn)
    && (v3 = *(_DWORD **)(ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>::ms_pkTable + 56)) != 0
    && *v3 == 140 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A89D50: using guessed type int ITableBase<TermExtendMatchGroupDesc,TermExtendMatchGroupDescTable>::ms_pkTable;

//----- (0046AC20) --------------------------------------------------------
bool __cdecl ITableBase<MinimonInfo,MinimonInfoTable>::Load(char *acFn)
{
  int v1; // eax@1
  MinimonInfoTable *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MinimonInfo,MinimonInfoTable>::ms_pkTable;
  if ( !ITableBase<MinimonInfo,MinimonInfoTable>::ms_pkTable )
  {
    v2 = (MinimonInfoTable *)operator new(0xC4u);
    if ( v2 )
      MinimonInfoTable::MinimonInfoTable(v2);
    else
      v1 = 0;
    ITableBase<MinimonInfo,MinimonInfoTable>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MinimonInfo,MinimonInfoTable>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MinimonInfo,MinimonInfoTable>::ms_pkTable + 56)) != 0
    && *v3 == 51 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MinimonInfo,MinimonInfoTable>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MinimonInfo,MinimonInfoTable>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C25C: using guessed type int ITableBase<MinimonInfo,MinimonInfoTable>::ms_pkTable;

//----- (0046AD00) --------------------------------------------------------
bool __cdecl ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>::Load(char *acFn)
{
  int v1; // eax@1
  MinimonAutoUseItemTable *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>::ms_pkTable;
  if ( !ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>::ms_pkTable )
  {
    v2 = (MinimonAutoUseItemTable *)operator new(0xC4u);
    if ( v2 )
      MinimonAutoUseItemTable::MinimonAutoUseItemTable(v2);
    else
      v1 = 0;
    ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>::ms_pkTable + 56)) != 0
    && *v3 == 44 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A89D20: using guessed type int ITableBase<MinimonAutoUseItem,MinimonAutoUseItemTable>::ms_pkTable;

//----- (0046ADE0) --------------------------------------------------------
bool __cdecl ITableBase<ItemViewDummy,ItemViewDummyTab>::Load(char *acFn)
{
  int v1; // eax@1
  ItemViewDummyTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ItemViewDummy,ItemViewDummyTab>::ms_pkTable;
  if ( !ITableBase<ItemViewDummy,ItemViewDummyTab>::ms_pkTable )
  {
    v2 = (ItemViewDummyTab *)operator new(0xC4u);
    if ( v2 )
      ItemViewDummyTab::ItemViewDummyTab(v2);
    else
      v1 = 0;
    ITableBase<ItemViewDummy,ItemViewDummyTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<ItemViewDummy,ItemViewDummyTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<ItemViewDummy,ItemViewDummyTab>::ms_pkTable + 56)) != 0
    && *v3 == 334 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ItemViewDummy,ItemViewDummyTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ItemViewDummy,ItemViewDummyTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C260: using guessed type int ITableBase<ItemViewDummy,ItemViewDummyTab>::ms_pkTable;

//----- (0046AEC0) --------------------------------------------------------
bool __cdecl ITableBase<UseClassTypeInfo,UseCalssTypeTable>::Load(char *acFn)
{
  int v1; // eax@1
  UseCalssTypeTable *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<UseClassTypeInfo,UseCalssTypeTable>::ms_pkTable;
  if ( !ITableBase<UseClassTypeInfo,UseCalssTypeTable>::ms_pkTable )
  {
    v2 = (UseCalssTypeTable *)operator new(0xC4u);
    if ( v2 )
      UseCalssTypeTable::UseCalssTypeTable(v2);
    else
      v1 = 0;
    ITableBase<UseClassTypeInfo,UseCalssTypeTable>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<UseClassTypeInfo,UseCalssTypeTable>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<UseClassTypeInfo,UseCalssTypeTable>::ms_pkTable + 56)) != 0
    && *v3 == 1162 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<UseClassTypeInfo,UseCalssTypeTable>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<UseClassTypeInfo,UseCalssTypeTable>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C264: using guessed type int ITableBase<UseClassTypeInfo,UseCalssTypeTable>::ms_pkTable;

//----- (0046AFA0) --------------------------------------------------------
bool __cdecl ITableBase<ChrBasicEquip,ChrBasicEquipTab>::Load(char *acFn)
{
  int v1; // eax@1
  ChrBasicEquipTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ChrBasicEquip,ChrBasicEquipTab>::ms_pkTable;
  if ( !ITableBase<ChrBasicEquip,ChrBasicEquipTab>::ms_pkTable )
  {
    v2 = (ChrBasicEquipTab *)operator new(0xC4u);
    if ( v2 )
      ChrBasicEquipTab::ChrBasicEquipTab(v2);
    else
      v1 = 0;
    ITableBase<ChrBasicEquip,ChrBasicEquipTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<ChrBasicEquip,ChrBasicEquipTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<ChrBasicEquip,ChrBasicEquipTab>::ms_pkTable + 56)) != 0
    && *v3 == 12 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ChrBasicEquip,ChrBasicEquipTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ChrBasicEquip,ChrBasicEquipTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C268: using guessed type int ITableBase<ChrBasicEquip,ChrBasicEquipTab>::ms_pkTable;

//----- (0046B080) --------------------------------------------------------
void __thiscall ItemInfoTab::ItemInfoTab(ItemInfoTab *this)
{
  ItemInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ItemInfo,ItemInfoTab>Vtbl *)&ITableBase<ItemInfo,ItemInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ItemInfo,ItemInfoTab>::ITableBase<ItemInfo,ItemInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ItemInfo,ItemInfoTab>::ITableBase<ItemInfo,ItemInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ItemInfo_ItemInfoTab_::ITableBase_ItemInfo_ItemInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->m_pkRecordIDMap = 0;
  v1->m_tMostLargeID = 0;
  v1->vfptr = (ITableBase<ItemInfo,ItemInfoTab>Vtbl *)&ItemInfoTab::`vftable';
}
// 97E384: using guessed type int (__cdecl *ITableBase<ItemInfo,ItemInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EB8C: using guessed type int (__cdecl *ItemInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C470: using guessed type int `ITableBase<ItemInfo,ItemInfoTab>::ITableBase<ItemInfo,ItemInfoTab>'::`2'::`local static guard';

//----- (0046B0D0) --------------------------------------------------------
void __thiscall ItemViewInfoTab::ItemViewInfoTab(ItemViewInfoTab *this)
{
  ItemViewInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ItemViewInfo,ItemViewInfoTab>Vtbl *)&ITableBase<ItemViewInfo,ItemViewInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ItemViewInfo,ItemViewInfoTab>::ITableBase<ItemViewInfo,ItemViewInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ItemViewInfo,ItemViewInfoTab>::ITableBase<ItemViewInfo,ItemViewInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ItemViewInfo_ItemViewInfoTab_::ITableBase_ItemViewInfo_ItemViewInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->m_pkRecordIDMap = 0;
  v1->m_tMostLargeID = 0;
  v1->vfptr = (ITableBase<ItemViewInfo,ItemViewInfoTab>Vtbl *)&ItemViewInfoTab::`vftable';
}
// 97E3AC: using guessed type int (__cdecl *ITableBase<ItemViewInfo,ItemViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EBA4: using guessed type int (__cdecl *ItemViewInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C470: using guessed type int `ITableBase<ItemInfo,ItemInfoTab>::ITableBase<ItemInfo,ItemInfoTab>'::`2'::`local static guard';
// A8C474: using guessed type int `ITableBase<ItemViewInfo,ItemViewInfoTab>::ITableBase<ItemViewInfo,ItemViewInfoTab>'::`2'::`local static guard';

//----- (0046B120) --------------------------------------------------------
void __thiscall MobInfoTab::MobInfoTab(MobInfoTab *this)
{
  MobInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MobInfo,MobInfoTab>Vtbl *)&ITableBase<MobInfo,MobInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MobInfo,MobInfoTab>::ITableBase<MobInfo,MobInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MobInfo,MobInfoTab>::ITableBase<MobInfo,MobInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MobInfo_MobInfoTab_::ITableBase_MobInfo_MobInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->m_pkRecordIDMap = 0;
  v1->m_tMostLargeID = 0;
  v1->vfptr = (ITableBase<MobInfo,MobInfoTab>Vtbl *)&MobInfoTab::`vftable';
}
// 97E434: using guessed type int (__cdecl *ITableBase<MobInfo,MobInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EBBC: using guessed type int (__cdecl *MobInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C43C: using guessed type int `ITableBase<ChrBasicEquip,ChrBasicEquipTab>::ITableBase<ChrBasicEquip,ChrBasicEquipTab>'::`2'::`local static guard';
// A8C440: using guessed type int `ITableBase<MobInfo,MobInfoTab>::ITableBase<MobInfo,MobInfoTab>'::`2'::`local static guard';

//----- (0046B170) --------------------------------------------------------
MobInfoTab *__thiscall IIDTableBase<MobInfo,MobInfoTab,unsigned short>::`vector deleting destructor'(MobInfoTab *this, unsigned int a2)
{
  MobInfoTab *v2; // esi@1
  MobInfo **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pkRecordIDMap;
  this->vfptr = (ITableBase<MobInfo,MobInfoTab>Vtbl *)&IIDTableBase<MobInfo,MobInfoTab,unsigned short>::`vftable';
  operator delete[](v3);
  v2->vfptr = (ITableBase<MobInfo,MobInfoTab>Vtbl *)&ITableBase<MobInfo,MobInfoTab>::`vftable';
  CDataReader::ClearBF(&v2->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E434: using guessed type int (__cdecl *ITableBase<MobInfo,MobInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E444: using guessed type int (__cdecl *IIDTableBase<MobInfo,MobInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (0046B200) --------------------------------------------------------
void __thiscall MobViewInfoTab::MobViewInfoTab(MobViewInfoTab *this)
{
  MobViewInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MobViewInfo,MobViewInfoTab>Vtbl *)&ITableBase<MobViewInfo,MobViewInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MobViewInfo,MobViewInfoTab>::ITableBase<MobViewInfo,MobViewInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MobViewInfo,MobViewInfoTab>::ITableBase<MobViewInfo,MobViewInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MobViewInfo_MobViewInfoTab_::ITableBase_MobViewInfo_MobViewInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->m_pkRecordIDMap = 0;
  v1->m_tMostLargeID = 0;
  v1->vfptr = (ITableBase<MobViewInfo,MobViewInfoTab>Vtbl *)&MobViewInfoTab::`vftable';
}
// 97E45C: using guessed type int (__cdecl *ITableBase<MobViewInfo,MobViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EBD4: using guessed type int (__cdecl *MobViewInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C474: using guessed type int `ITableBase<ItemViewInfo,ItemViewInfoTab>::ITableBase<ItemViewInfo,ItemViewInfoTab>'::`2'::`local static guard';
// A8C478: using guessed type int `ITableBase<MobViewInfo,MobViewInfoTab>::ITableBase<MobViewInfo,MobViewInfoTab>'::`2'::`local static guard';

//----- (0046B250) --------------------------------------------------------
void __thiscall AbnormalStateInfoTab::AbnormalStateInfoTab(AbnormalStateInfoTab *this)
{
  AbnormalStateInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>Vtbl *)&ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_AbnormalStateInfo_AbnormalStateInfoTab_::ITableBase_AbnormalStateInfo_AbnormalStateInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->m_pkRecordIDMap = 0;
  v1->m_tMostLargeID = 0;
  v1->vfptr = (ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>Vtbl *)&AbnormalStateInfoTab::`vftable';
}
// 97E504: using guessed type int (__cdecl *ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EBEC: using guessed type int (__cdecl *AbnormalStateInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C478: using guessed type int `ITableBase<MobViewInfo,MobViewInfoTab>::ITableBase<MobViewInfo,MobViewInfoTab>'::`2'::`local static guard';
// A8C47C: using guessed type int `ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>'::`2'::`local static guard';

//----- (0046B2A0) --------------------------------------------------------
AbnormalStateInfoTab *__thiscall AbnormalStateInfoTab::`vector deleting destructor'(AbnormalStateInfoTab *this, unsigned int a2)
{
  AbnormalStateInfoTab *v2; // esi@1
  AbnormalStateInfo **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pkRecordIDMap;
  this->vfptr = (ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>Vtbl *)&IIDTableBase<AbnormalStateInfo,AbnormalStateInfoTab,unsigned short>::`vftable';
  operator delete[](v3);
  v2->vfptr = (ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>Vtbl *)&ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::`vftable';
  CDataReader::ClearBF(&v2->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E504: using guessed type int (__cdecl *ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E514: using guessed type int (__cdecl *IIDTableBase<AbnormalStateInfo,AbnormalStateInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (0046B330) --------------------------------------------------------
void __thiscall AbnormalStateViewInfoTab::AbnormalStateViewInfoTab(AbnormalStateViewInfoTab *this)
{
  AbnormalStateViewInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>Vtbl *)&ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_AbnormalStateViewInfo_AbnormalStateViewInfoTab_::ITableBase_AbnormalStateViewInfo_AbnormalStateViewInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->m_pkRecordIDMap = 0;
  v1->m_tMostLargeID = 0;
  v1->vfptr = (ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>Vtbl *)&AbnormalStateViewInfoTab::`vftable';
}
// 97E52C: using guessed type int (__cdecl *ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EC04: using guessed type int (__cdecl *AbnormalStateViewInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C47C: using guessed type int `ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>'::`2'::`local static guard';
// A8C480: using guessed type int `ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>'::`2'::`local static guard';

//----- (0046B380) --------------------------------------------------------
unsigned __int16 __stdcall PasSkillViewInfoTab::GetID(BRAccUpgradeInfo *pkRecord)
{
  return pkRecord->ID;
}

//----- (0046B390) --------------------------------------------------------
void __thiscall SubAbStateInfoTab::SubAbStateInfoTab(SubAbStateInfoTab *this)
{
  SubAbStateInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<SubAbStateInfo,SubAbStateInfoTab>Vtbl *)&ITableBase<SubAbStateInfo,SubAbStateInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<SubAbStateInfo,SubAbStateInfoTab>::ITableBase<SubAbStateInfo,SubAbStateInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<SubAbStateInfo,SubAbStateInfoTab>::ITableBase<SubAbStateInfo,SubAbStateInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_SubAbStateInfo_SubAbStateInfoTab_::ITableBase_SubAbStateInfo_SubAbStateInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->m_pkRecordIDMap = 0;
  v1->m_tMostLargeID = 0;
  v1->vfptr = (ITableBase<SubAbStateInfo,SubAbStateInfoTab>Vtbl *)&SubAbStateInfoTab::`vftable';
}
// 97E554: using guessed type int (__cdecl *ITableBase<SubAbStateInfo,SubAbStateInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EC1C: using guessed type int (__cdecl *SubAbStateInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C480: using guessed type int `ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>'::`2'::`local static guard';
// A8C484: using guessed type int `ITableBase<SubAbStateInfo,SubAbStateInfoTab>::ITableBase<SubAbStateInfo,SubAbStateInfoTab>'::`2'::`local static guard';

//----- (0046B3E0) --------------------------------------------------------
SubAbStateInfoTab *__thiscall SubAbStateInfoTab::`vector deleting destructor'(SubAbStateInfoTab *this, unsigned int a2)
{
  SubAbStateInfoTab *v2; // esi@1
  SubAbStateInfo **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pkRecordIDMap;
  this->vfptr = (ITableBase<SubAbStateInfo,SubAbStateInfoTab>Vtbl *)&IIDTableBase<SubAbStateInfo,SubAbStateInfoTab,unsigned short>::`vftable';
  operator delete[](v3);
  v2->vfptr = (ITableBase<SubAbStateInfo,SubAbStateInfoTab>Vtbl *)&ITableBase<SubAbStateInfo,SubAbStateInfoTab>::`vftable';
  CDataReader::ClearBF(&v2->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E554: using guessed type int (__cdecl *ITableBase<SubAbStateInfo,SubAbStateInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E564: using guessed type int (__cdecl *IIDTableBase<SubAbStateInfo,SubAbStateInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (0046B470) --------------------------------------------------------
void __thiscall MapInfoTab::MapInfoTab(MapInfoTab *this)
{
  MapInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MapInfo,MapInfoTab>Vtbl *)&ITableBase<MapInfo,MapInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MapInfo,MapInfoTab>::ITableBase<MapInfo,MapInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MapInfo,MapInfoTab>::ITableBase<MapInfo,MapInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MapInfo_MapInfoTab_::ITableBase_MapInfo_MapInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->m_pkRecordIDMap = 0;
  v1->m_tMostLargeID = 0;
  v1->vfptr = (ITableBase<MapInfo,MapInfoTab>Vtbl *)&MapInfoTab::`vftable';
}
// 97DD0C: using guessed type int (__cdecl *ITableBase<MapInfo,MapInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EC34: using guessed type int (__cdecl *MapInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C440: using guessed type int `ITableBase<MobInfo,MobInfoTab>::ITableBase<MobInfo,MobInfoTab>'::`2'::`local static guard';
// A8C444: using guessed type int `ITableBase<MapInfo,MapInfoTab>::ITableBase<MapInfo,MapInfoTab>'::`2'::`local static guard';

//----- (0046B4C0) --------------------------------------------------------
void __thiscall MapViewInfoTab::MapViewInfoTab(MapViewInfoTab *this)
{
  MapViewInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MapViewInfo,MapViewInfoTab>Vtbl *)&ITableBase<MapViewInfo,MapViewInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MapViewInfo,MapViewInfoTab>::ITableBase<MapViewInfo,MapViewInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MapViewInfo,MapViewInfoTab>::ITableBase<MapViewInfo,MapViewInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MapViewInfo_MapViewInfoTab_::ITableBase_MapViewInfo_MapViewInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->m_pkRecordIDMap = 0;
  v1->m_tMostLargeID = 0;
  v1->vfptr = (ITableBase<MapViewInfo,MapViewInfoTab>Vtbl *)&MapViewInfoTab::`vftable';
}
// 97DD34: using guessed type int (__cdecl *ITableBase<MapViewInfo,MapViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EC4C: using guessed type int (__cdecl *MapViewInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C444: using guessed type int `ITableBase<MapInfo,MapInfoTab>::ITableBase<MapInfo,MapInfoTab>'::`2'::`local static guard';
// A8C448: using guessed type int `ITableBase<MapViewInfo,MapViewInfoTab>::ITableBase<MapViewInfo,MapViewInfoTab>'::`2'::`local static guard';

//----- (0046B510) --------------------------------------------------------
MapViewInfoTab *__thiscall IIDTableBase<MapViewInfo,MapViewInfoTab,unsigned short>::`vector deleting destructor'(MapViewInfoTab *this, unsigned int a2)
{
  MapViewInfoTab *v2; // esi@1
  MapViewInfo **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pkRecordIDMap;
  this->vfptr = (ITableBase<MapViewInfo,MapViewInfoTab>Vtbl *)&IIDTableBase<MapViewInfo,MapViewInfoTab,unsigned short>::`vftable';
  operator delete[](v3);
  v2->vfptr = (ITableBase<MapViewInfo,MapViewInfoTab>Vtbl *)&ITableBase<MapViewInfo,MapViewInfoTab>::`vftable';
  CDataReader::ClearBF(&v2->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DD34: using guessed type int (__cdecl *ITableBase<MapViewInfo,MapViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97DD44: using guessed type int (__cdecl *IIDTableBase<MapViewInfo,MapViewInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (0046B5A0) --------------------------------------------------------
void __thiscall UpGradeInfoTab::UpGradeInfoTab(UpGradeInfoTab *this)
{
  UpGradeInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<UpGradeInfo,UpGradeInfoTab>Vtbl *)&ITableBase<UpGradeInfo,UpGradeInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<UpGradeInfo,UpGradeInfoTab>::ITableBase<UpGradeInfo,UpGradeInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<UpGradeInfo,UpGradeInfoTab>::ITableBase<UpGradeInfo,UpGradeInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_UpGradeInfo_UpGradeInfoTab_::ITableBase_UpGradeInfo_UpGradeInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->m_pkRecordIDMap = 0;
  v1->m_tMostLargeID = 0;
  v1->vfptr = (ITableBase<UpGradeInfo,UpGradeInfoTab>Vtbl *)&UpGradeInfoTab::`vftable';
}
// 97DD5C: using guessed type int (__cdecl *ITableBase<UpGradeInfo,UpGradeInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EC64: using guessed type int (__cdecl *UpGradeInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C448: using guessed type int `ITableBase<MapViewInfo,MapViewInfoTab>::ITableBase<MapViewInfo,MapViewInfoTab>'::`2'::`local static guard';
// A8C44C: using guessed type int `ITableBase<UpGradeInfo,UpGradeInfoTab>::ITableBase<UpGradeInfo,UpGradeInfoTab>'::`2'::`local static guard';

//----- (0046B5F0) --------------------------------------------------------
void __thiscall ActionViewTable::ActionViewTable(ActionViewTable *this)
{
  ActionViewTable *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ActionViewInfo,ActionViewTable>Vtbl *)&ITableBase<ActionViewInfo,ActionViewTable>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ActionViewInfo,ActionViewTable>::ITableBase<ActionViewInfo,ActionViewTable>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ActionViewInfo,ActionViewTable>::ITableBase<ActionViewInfo,ActionViewTable>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ActionViewInfo_ActionViewTable_::ITableBase_ActionViewInfo_ActionViewTable__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->m_pkRecordIDMap = 0;
  v1->m_tMostLargeID = 0;
  v1->vfptr = (ITableBase<ActionViewInfo,ActionViewTable>Vtbl *)&ActionViewTable::`vftable';
}
// 97DDA4: using guessed type int (__cdecl *ITableBase<ActionViewInfo,ActionViewTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EC7C: using guessed type int (__cdecl *ActionViewTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C44C: using guessed type int `ITableBase<UpGradeInfo,UpGradeInfoTab>::ITableBase<UpGradeInfo,UpGradeInfoTab>'::`2'::`local static guard';
// A8C450: using guessed type int `ITableBase<ActionViewInfo,ActionViewTable>::ITableBase<ActionViewInfo,ActionViewTable>'::`2'::`local static guard';

//----- (0046B640) --------------------------------------------------------
void __thiscall RidePetTable::RidePetTable(RidePetTable *this)
{
  RidePetTable *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<RIDING,RidePetTable>Vtbl *)&ITableBase<RIDING,RidePetTable>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<RIDING,RidePetTable>::ITableBase<RIDING,RidePetTable>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<RIDING,RidePetTable>::ITableBase<RIDING,RidePetTable>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_RIDING_RidePetTable_::ITableBase_RIDING_RidePetTable__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->m_pkRecordIDMap = 0;
  v1->m_tMostLargeID = 0;
  v1->vfptr = (ITableBase<RIDING,RidePetTable>Vtbl *)&RidePetTable::`vftable';
}
// 97DE4C: using guessed type int (__cdecl *ITableBase<RIDING,RidePetTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97EC94: using guessed type int (__cdecl *RidePetTable::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C450: using guessed type int `ITableBase<ActionViewInfo,ActionViewTable>::ITableBase<ActionViewInfo,ActionViewTable>'::`2'::`local static guard';
// A8C454: using guessed type int `ITableBase<RIDING,RidePetTable>::ITableBase<RIDING,RidePetTable>'::`2'::`local static guard';

//----- (0046B690) --------------------------------------------------------
RidePetTable *__thiscall RidePetTable::`vector deleting destructor'(RidePetTable *this, unsigned int a2)
{
  RidePetTable *v2; // esi@1
  RIDING **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pkRecordIDMap;
  this->vfptr = (ITableBase<RIDING,RidePetTable>Vtbl *)&IIDTableBase<RIDING,RidePetTable,unsigned short>::`vftable';
  operator delete[](v3);
  v2->vfptr = (ITableBase<RIDING,RidePetTable>Vtbl *)&ITableBase<RIDING,RidePetTable>::`vftable';
  CDataReader::ClearBF(&v2->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DE4C: using guessed type int (__cdecl *ITableBase<RIDING,RidePetTable>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97DE5C: using guessed type int (__cdecl *IIDTableBase<RIDING,RidePetTable,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (0046B720) --------------------------------------------------------
void __thiscall MobCoordinateTab::MobCoordinateTab(MobCoordinateTab *this)
{
  MobCoordinateTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MobCoordinate,MobCoordinateTab>Vtbl *)&ITableBase<MobCoordinate,MobCoordinateTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MobCoordinate,MobCoordinateTab>::ITableBase<MobCoordinate,MobCoordinateTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MobCoordinate,MobCoordinateTab>::ITableBase<MobCoordinate,MobCoordinateTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MobCoordinate_MobCoordinateTab_::ITableBase_MobCoordinate_MobCoordinateTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->m_pkRecordIDMap = 0;
  v1->m_tMostLargeID = 0;
  v1->vfptr = (ITableBase<MobCoordinate,MobCoordinateTab>Vtbl *)&MobCoordinateTab::`vftable';
}
// 97DFA4: using guessed type int (__cdecl *ITableBase<MobCoordinate,MobCoordinateTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97ECAC: using guessed type int (__cdecl *MobCoordinateTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C454: using guessed type int `ITableBase<RIDING,RidePetTable>::ITableBase<RIDING,RidePetTable>'::`2'::`local static guard';
// A8C458: using guessed type int `ITableBase<MobCoordinate,MobCoordinateTab>::ITableBase<MobCoordinate,MobCoordinateTab>'::`2'::`local static guard';

//----- (0046B770) --------------------------------------------------------
MobCoordinateTab *__thiscall MobCoordinateTab::`vector deleting destructor'(MobCoordinateTab *this, unsigned int a2)
{
  MobCoordinateTab *v2; // esi@1
  MobCoordinate **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pkRecordIDMap;
  this->vfptr = (ITableBase<MobCoordinate,MobCoordinateTab>Vtbl *)&IIDTableBase<MobCoordinate,MobCoordinateTab,unsigned short>::`vftable';
  operator delete[](v3);
  v2->vfptr = (ITableBase<MobCoordinate,MobCoordinateTab>Vtbl *)&ITableBase<MobCoordinate,MobCoordinateTab>::`vftable';
  CDataReader::ClearBF(&v2->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DFA4: using guessed type int (__cdecl *ITableBase<MobCoordinate,MobCoordinateTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97DFB4: using guessed type int (__cdecl *IIDTableBase<MobCoordinate,MobCoordinateTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (0046B800) --------------------------------------------------------
void __thiscall MobKillAnnounceTextTab::MobKillAnnounceTextTab(MobKillAnnounceTextTab *this)
{
  MobKillAnnounceTextTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>Vtbl *)&ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MobKillAnnounceText_MobKillAnnounceTextTab_::ITableBase_MobKillAnnounceText_MobKillAnnounceTextTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->m_pkRecordIDMap = 0;
  v1->m_tMostLargeID = 0;
  v1->vfptr = (ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>Vtbl *)&MobKillAnnounceTextTab::`vftable';
}
// 97DFCC: using guessed type int (__cdecl *ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97ECC4: using guessed type int (__cdecl *MobKillAnnounceTextTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C458: using guessed type int `ITableBase<MobCoordinate,MobCoordinateTab>::ITableBase<MobCoordinate,MobCoordinateTab>'::`2'::`local static guard';
// A8C45C: using guessed type int `ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>'::`2'::`local static guard';

//----- (0046B850) --------------------------------------------------------
MobKillAnnounceTextTab *__thiscall IIDTableBase<MobKillAnnounceText,MobKillAnnounceTextTab,unsigned short>::`scalar deleting destructor'(MobKillAnnounceTextTab *this, unsigned int a2)
{
  MobKillAnnounceTextTab *v2; // esi@1
  MobKillAnnounceText **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pkRecordIDMap;
  this->vfptr = (ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>Vtbl *)&IIDTableBase<MobKillAnnounceText,MobKillAnnounceTextTab,unsigned short>::`vftable';
  operator delete[](v3);
  v2->vfptr = (ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>Vtbl *)&ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::`vftable';
  CDataReader::ClearBF(&v2->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97DFCC: using guessed type int (__cdecl *ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97DFDC: using guessed type int (__cdecl *IIDTableBase<MobKillAnnounceText,MobKillAnnounceTextTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (0046B8E0) --------------------------------------------------------
void __thiscall ChargedIconItemTab::ChargedIconItemTab(ChargedIconItemTab *this)
{
  ChargedIconItemTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ChargedIconItem,ChargedIconItemTab>Vtbl *)&ITableBase<ChargedIconItem,ChargedIconItemTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ChargedIconItem,ChargedIconItemTab>::ITableBase<ChargedIconItem,ChargedIconItemTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ChargedIconItem,ChargedIconItemTab>::ITableBase<ChargedIconItem,ChargedIconItemTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ChargedIconItem_ChargedIconItemTab_::ITableBase_ChargedIconItem_ChargedIconItemTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->m_pkRecordIDMap = 0;
  v1->m_tMostLargeID = 0;
  v1->vfptr = (ITableBase<ChargedIconItem,ChargedIconItemTab>Vtbl *)&ChargedIconItemTab::`vftable';
}
// 97E054: using guessed type int (__cdecl *ITableBase<ChargedIconItem,ChargedIconItemTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97ECDC: using guessed type int (__cdecl *ChargedIconItemTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C45C: using guessed type int `ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>'::`2'::`local static guard';
// A8C460: using guessed type int `ITableBase<ChargedIconItem,ChargedIconItemTab>::ITableBase<ChargedIconItem,ChargedIconItemTab>'::`2'::`local static guard';

//----- (0046B930) --------------------------------------------------------
ChargedIconItemTab *__thiscall IIDTableBase<ChargedIconItem,ChargedIconItemTab,unsigned short>::`scalar deleting destructor'(ChargedIconItemTab *this, unsigned int a2)
{
  ChargedIconItemTab *v2; // esi@1
  ChargedIconItem **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pkRecordIDMap;
  this->vfptr = (ITableBase<ChargedIconItem,ChargedIconItemTab>Vtbl *)&IIDTableBase<ChargedIconItem,ChargedIconItemTab,unsigned short>::`vftable';
  operator delete[](v3);
  v2->vfptr = (ITableBase<ChargedIconItem,ChargedIconItemTab>Vtbl *)&ITableBase<ChargedIconItem,ChargedIconItemTab>::`vftable';
  CDataReader::ClearBF(&v2->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E054: using guessed type int (__cdecl *ITableBase<ChargedIconItem,ChargedIconItemTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E064: using guessed type int (__cdecl *IIDTableBase<ChargedIconItem,ChargedIconItemTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (0046B9C0) --------------------------------------------------------
void __thiscall ChargedMsgItemTab::ChargedMsgItemTab(ChargedMsgItemTab *this)
{
  ChargedMsgItemTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ChargedMessageItem,ChargedMsgItemTab>Vtbl *)&ITableBase<ChargedMessageItem,ChargedMsgItemTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ChargedMessageItem,ChargedMsgItemTab>::ITableBase<ChargedMessageItem,ChargedMsgItemTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ChargedMessageItem,ChargedMsgItemTab>::ITableBase<ChargedMessageItem,ChargedMsgItemTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ChargedMessageItem_ChargedMsgItemTab_::ITableBase_ChargedMessageItem_ChargedMsgItemTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->m_pkRecordIDMap = 0;
  v1->m_tMostLargeID = 0;
  v1->vfptr = (ITableBase<ChargedMessageItem,ChargedMsgItemTab>Vtbl *)&ChargedMsgItemTab::`vftable';
}
// 97E07C: using guessed type int (__cdecl *ITableBase<ChargedMessageItem,ChargedMsgItemTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97ECF4: using guessed type int (__cdecl *ChargedMsgItemTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C460: using guessed type int `ITableBase<ChargedIconItem,ChargedIconItemTab>::ITableBase<ChargedIconItem,ChargedIconItemTab>'::`2'::`local static guard';
// A8C464: using guessed type int `ITableBase<ChargedMessageItem,ChargedMsgItemTab>::ITableBase<ChargedMessageItem,ChargedMsgItemTab>'::`2'::`local static guard';

//----- (0046BA10) --------------------------------------------------------
void __thiscall AttendRewardTab::AttendRewardTab(AttendRewardTab *this)
{
  AttendRewardTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<AttendReward,AttendRewardTab>Vtbl *)&ITableBase<AttendReward,AttendRewardTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<AttendReward,AttendRewardTab>::ITableBase<AttendReward,AttendRewardTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<AttendReward,AttendRewardTab>::ITableBase<AttendReward,AttendRewardTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_AttendReward_AttendRewardTab_::ITableBase_AttendReward_AttendRewardTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->m_pkRecordIDMap = 0;
  v1->m_tMostLargeID = 0;
  v1->vfptr = (ITableBase<AttendReward,AttendRewardTab>Vtbl *)&AttendRewardTab::`vftable';
}
// 97E174: using guessed type int (__cdecl *ITableBase<AttendReward,AttendRewardTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97ED0C: using guessed type int (__cdecl *AttendRewardTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C464: using guessed type int `ITableBase<ChargedMessageItem,ChargedMsgItemTab>::ITableBase<ChargedMessageItem,ChargedMsgItemTab>'::`2'::`local static guard';
// A8C468: using guessed type int `ITableBase<AttendReward,AttendRewardTab>::ITableBase<AttendReward,AttendRewardTab>'::`2'::`local static guard';

//----- (0046BA60) --------------------------------------------------------
int __stdcall ActionViewTable::GetID(AttendReward *pkRecord)
{
  return pkRecord->AR_ID;
}

//----- (0046BA70) --------------------------------------------------------
void __thiscall BRAccUpgradeInfoTab::BRAccUpgradeInfoTab(BRAccUpgradeInfoTab *this)
{
  BRAccUpgradeInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>Vtbl *)&ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_BRAccUpgradeInfo_BRAccUpgradeInfoTab_::ITableBase_BRAccUpgradeInfo_BRAccUpgradeInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->m_pkRecordIDMap = 0;
  v1->m_tMostLargeID = 0;
  v1->vfptr = (ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>Vtbl *)&BRAccUpgradeInfoTab::`vftable';
}
// 97E34C: using guessed type int (__cdecl *ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97ED24: using guessed type int (__cdecl *BRAccUpgradeInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// A8C468: using guessed type int `ITableBase<AttendReward,AttendRewardTab>::ITableBase<AttendReward,AttendRewardTab>'::`2'::`local static guard';
// A8C46C: using guessed type int `ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>'::`2'::`local static guard';

//----- (0046BAC0) --------------------------------------------------------
BRAccUpgradeInfoTab *__thiscall BRAccUpgradeInfoTab::`scalar deleting destructor'(BRAccUpgradeInfoTab *this, unsigned int a2)
{
  BRAccUpgradeInfoTab *v2; // esi@1
  BRAccUpgradeInfo **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pkRecordIDMap;
  this->vfptr = (ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>Vtbl *)&IIDTableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab,unsigned short>::`vftable';
  operator delete[](v3);
  v2->vfptr = (ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>Vtbl *)&ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::`vftable';
  CDataReader::ClearBF(&v2->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97E34C: using guessed type int (__cdecl *ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 97E35C: using guessed type int (__cdecl *IIDTableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (0046BB50) --------------------------------------------------------
void __thiscall std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::_Insert<std::_List_const_iterator<std::_List_val<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>(std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > *this, std::_List_const_iterator<std::_List_val<ItemViewDummy *,std::allocator<ItemViewDummy *> > > _Where, std::_List_const_iterator<std::_List_val<ItemViewDummy *,std::allocator<ItemViewDummy *> > > _First, std::_List_const_iterator<std::_List_val<ItemViewDummy *,std::allocator<ItemViewDummy *> > > _Last, std::forward_iterator_tag __formal)
{
  std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > *v5; // edi@1
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v6; // eax@1
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v7; // eax@3
  unsigned int v8; // ecx@3
  int v9; // [sp+0h] [bp-28h]@1
  std::_List_iterator<std::_List_val<float,std::allocator<float> > > result; // [sp+10h] [bp-18h]@1
  std::_List_const_iterator<std::_List_val<ItemViewDummy *,std::allocator<ItemViewDummy *> > > _Next; // [sp+14h] [bp-14h]@1
  int *v12; // [sp+18h] [bp-10h]@1
  int v13; // [sp+24h] [bp-4h]@1

  v12 = &v9;
  v5 = this;
  result._Ptr = (std::_List_nod<float,std::allocator<float> >::_Node *)this;
  v6 = _First._Ptr;
  _Next._Ptr = _First._Ptr;
  v13 = 0;
  while ( v6 != _Last._Ptr )
  {
    v7 = std::_List_val<char *,std::allocator<char *>>::_Buynode(_Where._Ptr, _Where._Ptr->_Prev, &v6->_Myval);
    v8 = v5->_Mysize;
    if ( 1073741822 - v8 < 1 )
      std::_Xlength_error("list<T> too long");
    v5->_Mysize = v8 + 1;
    _Where._Ptr->_Prev = v7;
    v7->_Prev->_Next = v7;
    v6 = _First._Ptr->_Next;
    _First._Ptr = _First._Ptr->_Next;
  }
}

//----- (0046BC20) --------------------------------------------------------
bool __cdecl ITableBase<FaceCutMsg,FaceCutMsgTab>::Load(char *acFn)
{
  int v1; // eax@1
  FaceCutMsgTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<FaceCutMsg,FaceCutMsgTab>::ms_pkTable;
  if ( !ITableBase<FaceCutMsg,FaceCutMsgTab>::ms_pkTable )
  {
    v2 = (FaceCutMsgTab *)operator new(0xC4u);
    if ( v2 )
      FaceCutMsgTab::FaceCutMsgTab(v2);
    else
      v1 = 0;
    ITableBase<FaceCutMsg,FaceCutMsgTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<FaceCutMsg,FaceCutMsgTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<FaceCutMsg,FaceCutMsgTab>::ms_pkTable + 56)) != 0
    && *v3 == 51 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<FaceCutMsg,FaceCutMsgTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<FaceCutMsg,FaceCutMsgTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A89D40: using guessed type int ITableBase<FaceCutMsg,FaceCutMsgTab>::ms_pkTable;

//----- (0046BD00) --------------------------------------------------------
void __thiscall std::_Pair_base<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>::~_Pair_base<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>(std::_Pair_base<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > *this)
{
  std::_Pair_base<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > *v1; // esi@1
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v2; // ecx@1
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v3; // eax@1
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v4; // edi@2

  v1 = this;
  v2 = this->second._Myhead;
  v3 = v2->_Next;
  v2->_Next = v2;
  v1->second._Myhead->_Prev = v1->second._Myhead;
  v1->second._Mysize = 0;
  if ( v3 != v1->second._Myhead )
  {
    do
    {
      v4 = v3->_Next;
      operator delete(v3);
      v3 = v4;
    }
    while ( v4 != v1->second._Myhead );
  }
  operator delete(v1->second._Myhead);
  if ( v1->first._Myres >= 0x10 )
    operator delete(v1->first._Bx._Ptr);
  v1->first._Myres = 15;
  v1->first._Mysize = 0;
  v1->first._Bx._Buf[0] = 0;
}

//----- (0046BD70) --------------------------------------------------------
bool __cdecl ITableBase<ItemInfo,ItemInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  ItemInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  if ( !ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable )
  {
    v2 = (ItemInfoTab *)operator new(0xCCu);
    if ( v2 )
      ItemInfoTab::ItemInfoTab(v2);
    else
      v1 = 0;
    ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 19303 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0046BE50) --------------------------------------------------------
bool __cdecl ITableBase<ItemViewInfo,ItemViewInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  ItemViewInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;
  if ( !ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable )
  {
    v2 = (ItemViewInfoTab *)operator new(0xCCu);
    if ( v2 )
      ItemViewInfoTab::ItemViewInfoTab(v2);
    else
      v1 = 0;
    ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 14454 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C298: using guessed type int ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;

//----- (0046BF30) --------------------------------------------------------
bool __cdecl ITableBase<MobInfo,MobInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  MobInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
  if ( !ITableBase<MobInfo,MobInfoTab>::ms_pkTable )
  {
    v2 = (MobInfoTab *)operator new(0xCCu);
    if ( v2 )
      MobInfoTab::MobInfoTab(v2);
    else
      v1 = 0;
    ITableBase<MobInfo,MobInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 1193 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;

//----- (0046C010) --------------------------------------------------------
bool __cdecl ITableBase<MobViewInfo,MobViewInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  MobViewInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MobViewInfo,MobViewInfoTab>::ms_pkTable;
  if ( !ITableBase<MobViewInfo,MobViewInfoTab>::ms_pkTable )
  {
    v2 = (MobViewInfoTab *)operator new(0xCCu);
    if ( v2 )
      MobViewInfoTab::MobViewInfoTab(v2);
    else
      v1 = 0;
    ITableBase<MobViewInfo,MobViewInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MobViewInfo,MobViewInfoTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MobViewInfo,MobViewInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 3601 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MobViewInfo,MobViewInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MobViewInfo,MobViewInfoTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C29C: using guessed type int ITableBase<MobViewInfo,MobViewInfoTab>::ms_pkTable;

//----- (0046C0F0) --------------------------------------------------------
bool __cdecl ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  AbnormalStateInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
  if ( !ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable )
  {
    v2 = (AbnormalStateInfoTab *)operator new(0xCCu);
    if ( v2 )
      AbnormalStateInfoTab::AbnormalStateInfoTab(v2);
    else
      v1 = 0;
    ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 4042 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C2A0: using guessed type int ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;

//----- (0046C1D0) --------------------------------------------------------
bool __cdecl ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  AbnormalStateViewInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;
  if ( !ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable )
  {
    v2 = (AbnormalStateViewInfoTab *)operator new(0xCCu);
    if ( v2 )
      AbnormalStateViewInfoTab::AbnormalStateViewInfoTab(v2);
    else
      v1 = 0;
    ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read(
         (CDataReader *)(ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable + 4),
         acFn)
    && (v3 = *(_DWORD **)(ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 5642 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C2A4: using guessed type int ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;

//----- (0046C2B0) --------------------------------------------------------
bool __cdecl ITableBase<SubAbStateInfo,SubAbStateInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  SubAbStateInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<SubAbStateInfo,SubAbStateInfoTab>::ms_pkTable;
  if ( !ITableBase<SubAbStateInfo,SubAbStateInfoTab>::ms_pkTable )
  {
    v2 = (SubAbStateInfoTab *)operator new(0xCCu);
    if ( v2 )
      SubAbStateInfoTab::SubAbStateInfoTab(v2);
    else
      v1 = 0;
    ITableBase<SubAbStateInfo,SubAbStateInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<SubAbStateInfo,SubAbStateInfoTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<SubAbStateInfo,SubAbStateInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 1068 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<SubAbStateInfo,SubAbStateInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<SubAbStateInfo,SubAbStateInfoTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C2A8: using guessed type int ITableBase<SubAbStateInfo,SubAbStateInfoTab>::ms_pkTable;

//----- (0046C390) --------------------------------------------------------
bool __cdecl ITableBase<MapInfo,MapInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  MapInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MapInfo,MapInfoTab>::ms_pkTable;
  if ( !ITableBase<MapInfo,MapInfoTab>::ms_pkTable )
  {
    v2 = (MapInfoTab *)operator new(0xCCu);
    if ( v2 )
      MapInfoTab::MapInfoTab(v2);
    else
      v1 = 0;
    ITableBase<MapInfo,MapInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MapInfo,MapInfoTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MapInfo,MapInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 504 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MapInfo,MapInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MapInfo,MapInfoTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A89D38: using guessed type int ITableBase<MapInfo,MapInfoTab>::ms_pkTable;

//----- (0046C470) --------------------------------------------------------
bool __cdecl ITableBase<MapViewInfo,MapViewInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  MapViewInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable;
  if ( !ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable )
  {
    v2 = (MapViewInfoTab *)operator new(0xCCu);
    if ( v2 )
      MapViewInfoTab::MapViewInfoTab(v2);
    else
      v1 = 0;
    ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 3107 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C270: using guessed type int ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable;

//----- (0046C550) --------------------------------------------------------
bool __cdecl ITableBase<UpGradeInfo,UpGradeInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  UpGradeInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<UpGradeInfo,UpGradeInfoTab>::ms_pkTable;
  if ( !ITableBase<UpGradeInfo,UpGradeInfoTab>::ms_pkTable )
  {
    v2 = (UpGradeInfoTab *)operator new(0xCCu);
    if ( v2 )
      UpGradeInfoTab::UpGradeInfoTab(v2);
    else
      v1 = 0;
    ITableBase<UpGradeInfo,UpGradeInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<UpGradeInfo,UpGradeInfoTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<UpGradeInfo,UpGradeInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 2603 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<UpGradeInfo,UpGradeInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<UpGradeInfo,UpGradeInfoTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C274: using guessed type int ITableBase<UpGradeInfo,UpGradeInfoTab>::ms_pkTable;

//----- (0046C630) --------------------------------------------------------
bool __cdecl ITableBase<ActionViewInfo,ActionViewTable>::Load(char *acFn)
{
  int v1; // eax@1
  ActionViewTable *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;
  if ( !ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable )
  {
    v2 = (ActionViewTable *)operator new(0xCCu);
    if ( v2 )
      ActionViewTable::ActionViewTable(v2);
    else
      v1 = 0;
    ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable + 56)) != 0
    && *v3 == 587 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;

//----- (0046C710) --------------------------------------------------------
bool __cdecl ITableBase<RIDING,RidePetTable>::Load(char *acFn)
{
  int v1; // eax@1
  RidePetTable *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<RIDING,RidePetTable>::ms_pkTable;
  if ( !ITableBase<RIDING,RidePetTable>::ms_pkTable )
  {
    v2 = (RidePetTable *)operator new(0xCCu);
    if ( v2 )
      RidePetTable::RidePetTable(v2);
    else
      v1 = 0;
    ITableBase<RIDING,RidePetTable>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<RIDING,RidePetTable>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<RIDING,RidePetTable>::ms_pkTable + 56)) != 0
    && *v3 == 5585 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<RIDING,RidePetTable>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<RIDING,RidePetTable>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C278: using guessed type int ITableBase<RIDING,RidePetTable>::ms_pkTable;

//----- (0046C7F0) --------------------------------------------------------
bool __cdecl ITableBase<MobCoordinate,MobCoordinateTab>::Load(char *acFn)
{
  int v1; // eax@1
  MobCoordinateTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable;
  if ( !ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable )
  {
    v2 = (MobCoordinateTab *)operator new(0xCCu);
    if ( v2 )
      MobCoordinateTab::MobCoordinateTab(v2);
    else
      v1 = 0;
    ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable + 56)) != 0
    && *v3 == 257 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C27C: using guessed type int ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable;

//----- (0046C8D0) --------------------------------------------------------
bool __cdecl ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::Load(char *acFn)
{
  int v1; // eax@1
  MobKillAnnounceTextTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::ms_pkTable;
  if ( !ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::ms_pkTable )
  {
    v2 = (MobKillAnnounceTextTab *)operator new(0xCCu);
    if ( v2 )
      MobKillAnnounceTextTab::MobKillAnnounceTextTab(v2);
    else
      v1 = 0;
    ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::ms_pkTable + 56)) != 0
    && *v3 == 140 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C280: using guessed type int ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::ms_pkTable;

//----- (0046C9B0) --------------------------------------------------------
bool __cdecl ITableBase<ChargedIconItem,ChargedIconItemTab>::Load(char *acFn)
{
  int v1; // eax@1
  ChargedIconItemTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ChargedIconItem,ChargedIconItemTab>::ms_pkTable;
  if ( !ITableBase<ChargedIconItem,ChargedIconItemTab>::ms_pkTable )
  {
    v2 = (ChargedIconItemTab *)operator new(0xCCu);
    if ( v2 )
      ChargedIconItemTab::ChargedIconItemTab(v2);
    else
      v1 = 0;
    ITableBase<ChargedIconItem,ChargedIconItemTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<ChargedIconItem,ChargedIconItemTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<ChargedIconItem,ChargedIconItemTab>::ms_pkTable + 56)) != 0
    && *v3 == 741 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ChargedIconItem,ChargedIconItemTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ChargedIconItem,ChargedIconItemTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C284: using guessed type int ITableBase<ChargedIconItem,ChargedIconItemTab>::ms_pkTable;

//----- (0046CA90) --------------------------------------------------------
bool __cdecl ITableBase<ChargedMessageItem,ChargedMsgItemTab>::Load(char *acFn)
{
  int v1; // eax@1
  ChargedMsgItemTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ChargedMessageItem,ChargedMsgItemTab>::ms_pkTable;
  if ( !ITableBase<ChargedMessageItem,ChargedMsgItemTab>::ms_pkTable )
  {
    v2 = (ChargedMsgItemTab *)operator new(0xCCu);
    if ( v2 )
      ChargedMsgItemTab::ChargedMsgItemTab(v2);
    else
      v1 = 0;
    ITableBase<ChargedMessageItem,ChargedMsgItemTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<ChargedMessageItem,ChargedMsgItemTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<ChargedMessageItem,ChargedMsgItemTab>::ms_pkTable + 56)) != 0
    && *v3 == 44 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ChargedMessageItem,ChargedMsgItemTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ChargedMessageItem,ChargedMsgItemTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C288: using guessed type int ITableBase<ChargedMessageItem,ChargedMsgItemTab>::ms_pkTable;

//----- (0046CB70) --------------------------------------------------------
bool __cdecl ITableBase<AttendReward,AttendRewardTab>::Load(char *acFn)
{
  int v1; // eax@1
  AttendRewardTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<AttendReward,AttendRewardTab>::ms_pkTable;
  if ( !ITableBase<AttendReward,AttendRewardTab>::ms_pkTable )
  {
    v2 = (AttendRewardTab *)operator new(0xCCu);
    if ( v2 )
      AttendRewardTab::AttendRewardTab(v2);
    else
      v1 = 0;
    ITableBase<AttendReward,AttendRewardTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<AttendReward,AttendRewardTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<AttendReward,AttendRewardTab>::ms_pkTable + 56)) != 0
    && *v3 == 152 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<AttendReward,AttendRewardTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<AttendReward,AttendRewardTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C28C: using guessed type int ITableBase<AttendReward,AttendRewardTab>::ms_pkTable;

//----- (0046CC50) --------------------------------------------------------
bool __cdecl ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  BRAccUpgradeInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::ms_pkTable;
  if ( !ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::ms_pkTable )
  {
    v2 = (BRAccUpgradeInfoTab *)operator new(0xCCu);
    if ( v2 )
      BRAccUpgradeInfoTab::BRAccUpgradeInfoTab(v2);
    else
      v1 = 0;
    ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 6860 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C290: using guessed type int ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::ms_pkTable;

//----- (0046CD40) --------------------------------------------------------
void __thiscall std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>(std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > *this, std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > *_Right)
{
  std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > *v2; // esi@1
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v3; // eax@1
  std::_List_const_iterator<std::_List_val<ItemViewDummy *,std::allocator<ItemViewDummy *> > > v4; // ecx@2
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v5; // eax@2
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v6; // edx@2
  int v7; // [sp+0h] [bp-34h]@1
  std::exception pExceptionObject; // [sp+10h] [bp-24h]@3
  char *_What; // [sp+1Ch] [bp-18h]@3
  std::list<float,std::allocator<float> > *v10; // [sp+20h] [bp-14h]@1
  int *v11; // [sp+24h] [bp-10h]@1
  int v12; // [sp+30h] [bp-4h]@2

  v11 = &v7;
  v2 = this;
  v10 = (std::list<float,std::allocator<float> > *)this;
  this->_Mysize = 0;
  v3 = (std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *)operator new(0xCu);
  if ( !v3 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v2->_Myhead = v3;
  v3->_Next = v3;
  v2->_Myhead->_Prev = v2->_Myhead;
  v4._Ptr = v2->_Myhead->_Next;
  v5 = _Right->_Myhead;
  v6 = _Right->_Myhead->_Next;
  v12 = 0;
  LOBYTE(v12) = 1;
  std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::_Insert<std::_List_const_iterator<std::_List_val<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>(
    v2,
    v4,
    (std::_List_const_iterator<std::_List_val<ItemViewDummy *,std::allocator<ItemViewDummy *> > >)v6,
    (std::_List_const_iterator<std::_List_val<ItemViewDummy *,std::allocator<ItemViewDummy *> > >)v5,
    (std::forward_iterator_tag)_Right);
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0046CE00) --------------------------------------------------------
void __thiscall std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::_Assign_rv(std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > *this, std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > *_Right)
{
  std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > *v2; // esi@1
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v3; // eax@2
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v4; // edi@3

  v2 = this;
  if ( this != _Right )
  {
    v3 = this->_Myhead->_Next;
    this->_Myhead->_Next = this->_Myhead;
    this->_Myhead->_Prev = this->_Myhead;
    this->_Mysize = 0;
    if ( v3 != this->_Myhead )
    {
      do
      {
        v4 = v3->_Next;
        operator delete(v3);
        v3 = v4;
      }
      while ( v4 != v2->_Myhead );
    }
    if ( _Right->_Mysize )
      std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::_Splice_same(
        v2,
        (std::_List_const_iterator<std::_List_val<ItemViewDummy *,std::allocator<ItemViewDummy *> > >)v2->_Myhead->_Next,
        _Right,
        (std::_List_const_iterator<std::_List_val<ItemViewDummy *,std::allocator<ItemViewDummy *> > >)_Right->_Myhead->_Next,
        (std::_List_const_iterator<std::_List_val<ItemViewDummy *,std::allocator<ItemViewDummy *> > >)_Right->_Myhead,
        _Right->_Mysize);
  }
}

//----- (0046CE60) --------------------------------------------------------
char __cdecl FaceCutMsgTab::Load(char *pcFn)
{
  int v1; // eax@2
  unsigned int v2; // edi@3
  unsigned int v3; // esi@5
  char *v4; // eax@6
  char result; // al@10

  if ( ITableBase<FaceCutMsg,FaceCutMsgTab>::Load(pcFn) )
  {
    v1 = *(_DWORD *)(ITableBase<ScriptMsg,ScriptMsgTab>::ms_pkTable + 56);
    if ( v1 )
      v2 = *(_DWORD *)(v1 + 40);
    else
      v2 = 0;
    v3 = 0;
    if ( v2 )
    {
      while ( 1 )
      {
        v4 = CDataReader::GetRecord((CDataReader *)(ITableBase<ScriptMsg,ScriptMsgTab>::ms_pkTable + 4), v3);
        if ( v4 )
        {
          if ( *(_DWORD *)(v4 + 546) == 4 && !FaceCutMsgTab::GetByScripMsgInx(v4 + 2) )
            break;
        }
        if ( ++v3 >= v2 )
          goto LABEL_10;
      }
      result = 0;
    }
    else
    {
LABEL_10:
      result = 1;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A89C90: using guessed type int ITableBase<ScriptMsg,ScriptMsgTab>::ms_pkTable;

//----- (0046CEE0) --------------------------------------------------------
std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > *__cdecl std::make_pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>> &>(std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > *result, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Val1, std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > *_Val2)
{
  result->first._Myres = 15;
  result->first._Mysize = 0;
  result->first._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&result->first, _Val1);
  std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>(
    &result->second,
    _Val2);
  return result;
}

//----- (0046CF50) --------------------------------------------------------
void __thiscall std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>(std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > *this, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > *_Right)
{
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > *v2; // esi@1
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > *v3; // ebx@1
  int v4; // edi@1
  _DWORD *v5; // eax@1
  std::exception pExceptionObject; // [sp+10h] [bp-20h]@3
  int v7; // [sp+1Ch] [bp-14h]@1
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > *v8; // [sp+20h] [bp-10h]@1
  int v9; // [sp+2Ch] [bp-4h]@1

  v2 = this;
  v8 = this;
  v3 = _Right;
  this->first._Myres = 15;
  this->first._Mysize = 0;
  this->first._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&this->first, &v3->first);
  v9 = 0;
  v4 = (int)&v2->second;
  v7 = v4;
  *(_DWORD *)(v4 + 4) = 0;
  v5 = operator new(0xCu);
  if ( !v5 )
  {
    _Right = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Right);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  *(_DWORD *)v4 = v5;
  *v5 = v5;
  *(_DWORD *)(*(_DWORD *)v4 + 4) = *(_DWORD *)v4;
  LOBYTE(v9) = 1;
  std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::_Assign_rv(&v2->second, &v3->second);
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0046D010) --------------------------------------------------------
void __thiscall std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>,0>>::_Check_size(std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> >,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > >,0> > *this)
{
  std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> >,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > >,0> > *v1; // ebx@1
  double v2; // st7@1
  unsigned int v3; // esi@1
  signed int v4; // eax@2
  std::vector<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,std::allocator<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > > > *v5; // ecx@5
  std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > > *v6; // edi@5
  std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > > v9; // ST08_4@9
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > _Val; // [sp+8h] [bp-4h]@1

  v1 = this;
  v2 = this->_Max_bucket_size;
  v3 = this->_Maxidx;
  *(float *)&_Val._Ptr = (double)this->_List._Mysize / (double)v3;
  if ( *(float *)&_Val._Ptr > v2 )
  {
    v4 = 0;
    do
    {
      if ( v3 >= 0x1FFFFFFF )
        break;
      ++v4;
      v3 *= 2;
    }
    while ( v4 < 3 );
    v5 = (std::vector<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,std::allocator<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > > > *)&this->_Vec;
    v6 = v1->_Vec._Myfirst;
    _Val._Ptr = (std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *)v1->_List._Myhead;
    if ( v6 != v1->_Vec._Mylast )
    {
      v5 = (std::vector<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,std::allocator<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > > > *)&v1->_Vec;
      v1->_Vec._Mylast = v6;
    }
    std::vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>::_Insert_n(
      v5,
      (std::_Vector_const_iterator<std::_Vector_val<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,std::allocator<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > > > >)v5->_Myfirst,
      2 * v3,
      &_Val);
    v1->_Mask = v3 - 1;
    v9._Ptr = v1->_List._Myhead;
    v1->_Maxidx = v3;
    std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>,0>>::_Reinsert(
      v1,
      v9);
  }
}

//----- (0046D0C0) --------------------------------------------------------
std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > > *__thiscall std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>::erase(std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > *this, std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > > *result, std::_List_const_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > > _Where)
{
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *v3; // esi@1
  std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > *v4; // edi@1
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *v5; // ecx@1
  std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > > *v6; // eax@3
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *_Wherea; // [sp+14h] [bp+Ch]@1

  v3 = _Where._Ptr;
  v4 = this;
  v5 = _Where._Ptr->_Next;
  _Wherea = _Where._Ptr->_Next;
  if ( v3 != v4->_Myhead )
  {
    v3->_Prev->_Next = v3->_Next;
    v3->_Next->_Prev = v3->_Prev;
    std::_Pair_base<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>::~_Pair_base<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>((std::_Pair_base<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > *)&v3->_Myval.first);
    operator delete(v3);
    v5 = _Wherea;
    --v4->_Mysize;
  }
  v6 = result;
  result->_Ptr = v5;
  return v6;
}

//----- (0046D110) --------------------------------------------------------
std::pair<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > >,bool> *__thiscall std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>,0>>::_Insert(std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> >,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > >,0> > *this, std::pair<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > >,bool> *result, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > *_Val, std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > > _Plist)
{
  std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> >,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > >,0> > *v4; // ebx@1
  unsigned int v5; // esi@1
  int v6; // eax@1
  int v7; // edi@1
  std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > > *v8; // edx@3
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *v9; // ecx@3
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *v10; // esi@3
  int v11; // eax@3
  std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > *v12; // edx@3
  unsigned int v13; // ebx@5
  unsigned int v14; // edi@6
  const char *v15; // eax@6
  unsigned int v16; // edx@8
  const char *v17; // ecx@10
  int v18; // eax@12
  bool v19; // sf@12
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *v20; // ecx@18
  std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > > *v21; // eax@20
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *v22; // edx@20
  int v23; // eax@20
  const char *v24; // eax@23
  std::pair<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > >,bool> *v25; // eax@27
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *v26; // edx@30
  int v27; // eax@31
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *v28; // [sp+Ch] [bp-14h]@3
  unsigned int v29; // [sp+10h] [bp-10h]@5
  std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > *v30; // [sp+14h] [bp-Ch]@3
  std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> >,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > >,0> > *v31; // [sp+18h] [bp-8h]@1
  int v32; // [sp+1Ch] [bp-4h]@1

  v4 = this;
  v5 = this->_Mask;
  v31 = this;
  v6 = stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::operator()(&_Val->first);
  v7 = v5 & v6;
  v32 = v5 & v6;
  if ( v4->_Maxidx <= (v5 & v6) )
  {
    v7 += -1 - (v5 >> 1);
    v32 = v7;
  }
  v8 = v4->_Vec._Myfirst;
  v9 = v8[2 * v7]._Ptr;
  v10 = v4->_List._Myhead;
  v11 = (int)&v8[2 * v7];
  v12 = &v4->_List;
  v28 = v9;
  v30 = &v4->_List;
  if ( v10 == v9
    || (v10 = **(std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node ***)(v11 + 4),
        v10 == v9) )
  {
LABEL_18:
    v20 = _Plist._Ptr;
    if ( v10 != _Plist._Ptr->_Next )
    {
      std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>::_Splice_same(
        v12,
        (std::_List_const_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > >)v10,
        v12,
        (std::_List_const_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > >)_Plist._Ptr,
        (std::_List_const_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > >)_Plist._Ptr->_Next,
        1u);
      v20 = _Plist._Ptr;
    }
    v21 = v4->_Vec._Myfirst;
    v22 = v21[2 * v7]._Ptr;
    v23 = (int)&v21[2 * v7];
    if ( v22 == v30->_Myhead )
    {
      *(_DWORD *)v23 = v20;
      v31->_Vec._Myfirst[2 * v32 + 1]._Ptr = v20;
    }
    else if ( v22 == v10 )
    {
      *(_DWORD *)v23 = v20;
    }
    else
    {
      v26 = **(std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node ***)(v23 + 4);
      *(_DWORD *)(v23 + 4) = v26;
      if ( v26 != v20 )
      {
        v27 = (int)&v31->_Vec._Myfirst[2 * v32 + 1];
        *(_DWORD *)v27 = *(_DWORD *)(*(_DWORD *)v27 + 4);
      }
    }
    std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>,0>>::_Check_size(v31);
    v25 = result;
    result->first = _Plist;
    result->second = 1;
    return v25;
  }
  v13 = _Val->first._Mysize;
  v29 = _Val->first._Myres;
  while ( 1 )
  {
    v10 = v10->_Prev;
    v14 = v10->_Myval.first._Mysize;
    v15 = v10->_Myval.first._Bx._Buf;
    if ( v10->_Myval.first._Myres >= 0x10 )
      v15 = *(const char **)v15;
    v16 = v13;
    if ( v13 >= v14 )
      v16 = v10->_Myval.first._Mysize;
    v17 = (const char *)_Val;
    if ( v29 >= 0x10 )
      v17 = _Val->first._Bx._Ptr;
    v18 = std::char_traits<char>::compare(v17, v15, v16);
    v19 = v18 < 0;
    if ( v18 )
      break;
    if ( v13 >= v14 )
    {
      LOBYTE(v18) = v13 != v14;
      v19 = v18 < 0;
      break;
    }
LABEL_16:
    if ( v10 == v28 )
      goto LABEL_17;
  }
  if ( v19 )
    goto LABEL_16;
  if ( v29 < 0x10 )
    v24 = (const char *)_Val;
  else
    v24 = _Val->first._Bx._Ptr;
  if ( std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
         &v10->_Myval.first,
         0,
         v10->_Myval.first._Mysize,
         v24,
         v13) < 0 )
  {
    v10 = v10->_Next;
LABEL_17:
    v4 = v31;
    v7 = v32;
    v12 = v30;
    goto LABEL_18;
  }
  std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>::erase(
    v30,
    (std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > > *)&_Val,
    (std::_List_const_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > >)_Plist._Ptr);
  v25 = result;
  result->first._Ptr = v10;
  result->second = 0;
  return v25;
}

//----- (0046D290) --------------------------------------------------------
void __thiscall std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>,0>>::_Reinsert(std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> >,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > >,0> > *this, std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > > _Last)
{
  std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> >,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > >,0> > *v2; // esi@1
  std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > > v3; // ST08_4@3
  bool v4; // bl@3
  std::pair<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > >,bool> result; // [sp+4h] [bp-8h]@3
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *_Lasta; // [sp+14h] [bp+8h]@2

  v2 = this;
  if ( this->_List._Myhead->_Next != _Last._Ptr )
  {
    _Lasta = _Last._Ptr->_Prev;
    do
    {
      v3._Ptr = v2->_List._Myhead->_Next;
      v4 = v3._Ptr == _Lasta;
      std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>,0>>::_Insert(
        v2,
        &result,
        &v3._Ptr->_Myval,
        v3);
    }
    while ( !v4 );
  }
}

//----- (0046D2E0) --------------------------------------------------------
std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *__stdcall std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>(std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *_Next, std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *_Prev, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > *_Val)
{
  void *v4; // esi@1
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *v5; // eax@2
  int v7; // [sp+0h] [bp-30h]@1
  std::exception pExceptionObject; // [sp+10h] [bp-20h]@5
  void *p; // [sp+1Ch] [bp-14h]@1
  int *v10; // [sp+20h] [bp-10h]@1
  int v11; // [sp+2Ch] [bp-4h]@2

  v10 = &v7;
  v4 = operator new(0x30u);
  p = v4;
  if ( !v4 )
  {
    _Next = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Next);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v5 = _Next;
  *((_DWORD *)v4 + 1) = _Prev;
  v11 = 0;
  *(_DWORD *)v4 = v5;
  _Next = (std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *)((char *)v4 + 8);
  _Prev = (std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *)((char *)v4 + 8);
  LOBYTE(v11) = 1;
  if ( v4 != (void *)-8 )
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>(
      (std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > *)((char *)v4 + 8),
      _Val);
  return (std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *)v4;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0046D3A0) --------------------------------------------------------
std::pair<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > >,bool> *__thiscall std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>,0>>::insert<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>(std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> >,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > >,0> > *this, std::pair<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > >,bool> *result, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > *_Val)
{
  std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> >,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > >,0> > *v3; // ebx@1
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *v4; // eax@1
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *v5; // edi@1
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > >::_Node *v6; // eax@1
  unsigned int v7; // ecx@1

  v3 = this;
  v4 = this->_List._Myhead;
  v5 = v4->_Next;
  v6 = std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>(
         v4->_Next,
         v4->_Next->_Prev,
         _Val);
  v7 = v3->_List._Mysize;
  if ( 107374181 - v7 < 1 )
    std::_Xlength_error("list<T> too long");
  v3->_List._Mysize = v7 + 1;
  v5->_Prev = v6;
  v6->_Prev->_Next = v6;
  std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>,0>>::_Insert(
    v3,
    result,
    &v3->_List._Myhead->_Next->_Myval,
    (std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > >)v3->_List._Myhead->_Next);
  return result;
}

//----- (0046D410) --------------------------------------------------------
char __cdecl ItemViewDummyTab::Load(char *pcFn)
{
  int v1; // eax@2
  unsigned int v2; // eax@5
  ItemViewDummy *v3; // eax@6
  const char *v4; // edi@6
  char v5; // al@7
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v6; // eax@12
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v7; // esi@12
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v8; // eax@13
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > *v9; // eax@13
  ItemInfo *v10; // edi@16
  char *v11; // esi@16
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v12; // eax@16
  int v13; // ecx@16
  char v14; // al@19
  std::pair<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > > > >,bool> v15; // [sp+10h] [bp-A4h]@13
  std::exception pExceptionObject; // [sp+18h] [bp-9Ch]@20
  std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > dummys; // [sp+24h] [bp-90h]@12
  std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > result; // [sp+30h] [bp-84h]@9
  char *_What; // [sp+34h] [bp-80h]@20
  ItemViewDummy *dummy; // [sp+38h] [bp-7Ch]@6
  unsigned int i; // [sp+3Ch] [bp-78h]@5
  unsigned int v22; // [sp+40h] [bp-74h]@3
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > v23; // [sp+44h] [bp-70h]@13
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Keyval; // [sp+6Ch] [bp-48h]@9
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val1; // [sp+88h] [bp-2Ch]@13
  int v26; // [sp+B0h] [bp-4h]@9

  if ( ITableBase<ItemViewDummy,ItemViewDummyTab>::Load(pcFn) )
  {
    v1 = *(_DWORD *)(ITableBase<ItemViewDummy,ItemViewDummyTab>::ms_pkTable + 56);
    if ( v1 )
      v22 = *(_DWORD *)(v1 + 40);
    else
      v22 = 0;
    v2 = 0;
    for ( i = 0; v2 < v22; i = v2 )
    {
      v3 = (ItemViewDummy *)CDataReader::GetRecord(
                              (CDataReader *)(ITableBase<ItemViewDummy,ItemViewDummyTab>::ms_pkTable + 4),
                              v2);
      v4 = (const char *)v3;
      dummy = v3;
      if ( v3 )
      {
        v5 = v3->IsMale;
        if ( v5 && v5 != 1 )
          goto $LN276;
        _Keyval._Myres = 15;
        _Keyval._Mysize = 0;
        _Keyval._Bx._Buf[0] = 0;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Keyval, v4, strlen(v4));
        v26 = 0;
        std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ActiveSkillInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>>,0>>::lower_bound(
          &ItemViewDummyTab::m_DummyMap,
          &result,
          &_Keyval);
        v26 = -1;
        if ( _Keyval._Myres >= 0x10 )
          operator delete(_Keyval._Bx._Ptr);
        _Keyval._Myres = 15;
        _Keyval._Mysize = 0;
        _Keyval._Bx._Buf[0] = 0;
        if ( result._Ptr == (std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *)stru_A89C68._Myhead )
        {
          dummys._Mysize = 0;
          v6 = (std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *)operator new(0xCu);
          v7 = v6;
          if ( !v6 )
          {
            _What = 0;
            std::exception::exception(&pExceptionObject, (const char *const *)&_What);
            pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
            _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
          }
          v6->_Next = v6;
          dummys._Myhead = v6;
          v6->_Prev = v6;
          v26 = 1;
          v8 = std::_List_val<char *,std::allocator<char *>>::_Buynode(v6, v6, &dummy);
          v7->_Prev = v8;
          v8->_Prev->_Next = v8;
          dummys._Mysize = 1;
          _Val1._Myres = 15;
          _Val1._Mysize = 0;
          _Val1._Bx._Buf[0] = 0;
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val1, v4, strlen(v4));
          LOBYTE(v26) = 2;
          v9 = std::make_pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>> &>(
                 &v23,
                 &_Val1,
                 &dummys);
          LOBYTE(v26) = 3;
          std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>,0>>::insert<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>(
            (std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> >,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > >,0> > *)&ItemViewDummyTab::m_DummyMap,
            &v15,
            v9);
          std::_Pair_base<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>::~_Pair_base<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>((std::_Pair_base<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > > *)&v23);
          if ( _Val1._Myres >= 0x10 )
            operator delete(_Val1._Bx._Ptr);
          _Val1._Myres = 15;
          _Val1._Mysize = 0;
          _Val1._Bx._Buf[0] = 0;
          v26 = -1;
          std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~list<ItemViewDummy *,std::allocator<ItemViewDummy *>>((std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)&dummys);
        }
        else
        {
          v10 = result._Ptr->_Myval.second;
          v11 = (char *)&result._Ptr->_Myval.second;
          v12 = std::_List_val<char *,std::allocator<char *>>::_Buynode(
                  (std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *)result._Ptr->_Myval.second,
                  *(std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node **)&v10->InxName[2],
                  &dummy);
          v13 = *((_DWORD *)v11 + 1);
          if ( (unsigned int)(1073741822 - v13) < 1 )
            std::_Xlength_error("list<T> too long");
          *((_DWORD *)v11 + 1) = v13 + 1;
          *(_DWORD *)&v10->InxName[2] = v12;
          v12->_Prev->_Next = v12;
        }
      }
      v2 = i + 1;
    }
    v14 = 1;
  }
  else
  {
$LN276:
    v14 = 0;
  }
  return v14;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// A8C260: using guessed type int ITableBase<ItemViewDummy,ItemViewDummyTab>::ms_pkTable;

//----- (0046D6A0) --------------------------------------------------------
void __thiscall PgFrameMgr::RegisterAllFrameWork(PgFrameMgr *this)
{
  PgFrameMgr *v1; // esi@1
  AccountFrameWork *v2; // eax@1
  PgFrameWork *v3; // eax@2
  LoginWorldNetFrameWork *v4; // eax@4
  PgFrameWork *v5; // eax@5
  ZoneLoginNetFrameWork *v6; // eax@7
  PgFrameWork *v7; // eax@8
  CharSelectFrameWork *v8; // eax@10
  PgFrameWork *v9; // eax@11
  CharCreateFrameWork *v10; // eax@13
  PgFrameWork *v11; // eax@14
  LoadingFrameWork *v12; // eax@16
  PgFrameWork *v13; // eax@17
  GameFrameWork *v14; // eax@19
  PgFrameWork *v15; // eax@20
  LinkFrameWork *v16; // eax@22
  PgFrameWork *v17; // eax@23
  CHairShopFrameWork *v18; // eax@25
  PgFrameWork *v19; // eax@26

  v1 = this;
  v2 = (AccountFrameWork *)operator new(0x23Cu);
  if ( v2 )
    AccountFrameWork::AccountFrameWork(v2);
  else
    v3 = 0;
  AccountFrameWorkID = PgFrameMgr::RegisterFrameWork(v1, v3);
  v4 = (LoginWorldNetFrameWork *)operator new(0x28u);
  if ( v4 )
    LoginWorldNetFrameWork::LoginWorldNetFrameWork(v4);
  else
    v5 = 0;
  LoginWorldNetFrameWorkID = PgFrameMgr::RegisterFrameWork(v1, v5);
  v6 = (ZoneLoginNetFrameWork *)operator new(0x3Cu);
  if ( v6 )
    ZoneLoginNetFrameWork::ZoneLoginNetFrameWork(v6);
  else
    v7 = 0;
  ZoneLoginNetFrameWorkID = PgFrameMgr::RegisterFrameWork(v1, v7);
  v8 = (CharSelectFrameWork *)operator new(0x16Cu);
  if ( v8 )
    CharSelectFrameWork::CharSelectFrameWork(v8);
  else
    v9 = 0;
  CharSelectFrameWorkID = PgFrameMgr::RegisterFrameWork(v1, v9);
  v10 = (CharCreateFrameWork *)operator new(0xD4u);
  if ( v10 )
    CharCreateFrameWork::CharCreateFrameWork(v10);
  else
    v11 = 0;
  CharCreateFrameWorkID = PgFrameMgr::RegisterFrameWork(v1, v11);
  v12 = (LoadingFrameWork *)operator new(0x3Cu);
  if ( v12 )
    LoadingFrameWork::LoadingFrameWork(v12);
  else
    v13 = 0;
  LoadingFrameWorkID = PgFrameMgr::RegisterFrameWork(v1, v13);
  v14 = (GameFrameWork *)operator new(0x1438u);
  if ( v14 )
    GameFrameWork::GameFrameWork(v14);
  else
    v15 = 0;
  GameFrameWorkID = PgFrameMgr::RegisterFrameWork(v1, v15);
  v16 = (LinkFrameWork *)operator new(0x6Cu);
  if ( v16 )
    LinkFrameWork::LinkFrameWork(v16);
  else
    v17 = 0;
  LinkFrameWorkID = PgFrameMgr::RegisterFrameWork(v1, v17);
  v18 = (CHairShopFrameWork *)operator new(0xC0u);
  if ( v18 )
    CHairShopFrameWork::CHairShopFrameWork(v18);
  else
    v19 = 0;
  CHairShopFrameWorkID = PgFrameMgr::RegisterFrameWork(v1, v19);
}

//----- (0046D8C0) --------------------------------------------------------
void __thiscall NiActionData::~NiActionData(NiActionData *this)
{
  this->vfptr = (NiActionDataVtbl *)&NiActionData::`vftable';
}
// 97EE28: using guessed type int (__thiscall *NiActionData::`vftable')(void *p, char);

//----- (0046D8D0) --------------------------------------------------------
NiPointer<NiAlphaProperty> *__thiscall NiPointer<NiAVObject>::`vector deleting destructor'(NiPointer<NiAlphaProperty> *this, unsigned int a2)
{
  NiPointer<NiAlphaProperty> *v2; // edi@1
  NiPointer<NiAlphaProperty> *result; // eax@4
  NiAlphaProperty *v4; // esi@5

  v2 = this;
  if ( a2 & 2 )
  {
    `eh vector destructor iterator'(
      this,
      4u,
      (int)this[-1].m_pObject,
      (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
    if ( a2 & 1 )
      operator delete[](&v2[-1]);
    result = v2 - 1;
  }
  else
  {
    v4 = this->m_pObject;
    if ( this->m_pObject && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    if ( a2 & 1 )
      operator delete(v2);
    result = v2;
  }
  return result;
}

//----- (0046D950) --------------------------------------------------------
void *__thiscall NiActionData::`vector deleting destructor'(NiActionData *this, unsigned int a2)
{
  NiActionData *v2; // esi@1
  void *result; // eax@4

  v2 = this;
  if ( a2 & 2 )
  {
    `eh vector destructor iterator'(
      this,
      0x1Cu,
      this[-1].m_uiSequence,
      (void (__thiscall *)(void *))NiActionData::~NiActionData);
    if ( a2 & 1 )
      operator delete[](&v2[-1].m_uiSequence);
    result = &v2[-1].m_uiSequence;
  }
  else
  {
    this->vfptr = (NiActionDataVtbl *)&NiActionData::`vftable';
    if ( a2 & 1 )
      operator delete(this);
    result = v2;
  }
  return result;
}
// 97EE28: using guessed type int (__thiscall *NiActionData::`vftable')(void *p, char);

//----- (0046D9B0) --------------------------------------------------------
boost::singleton_pool<boost::fast_pool_allocator_tag,28,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>::pool_type *__cdecl boost::details::pool::singleton_default<boost::singleton_pool<boost::fast_pool_allocator_tag,28,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>::pool_type>::instance()
{
  if ( !(`boost::details::pool::singleton_default<boost::singleton_pool<boost::fast_pool_allocator_tag,28,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>::pool_type>::instance'::`2'::`local static guard' & 1) )
  {
    `boost::details::pool::singleton_default<boost::singleton_pool<boost::fast_pool_allocator_tag,28,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>::pool_type>::instance'::`2'::`local static guard' |= 1u;
    InitializeCriticalSection(&`boost::details::pool::singleton_default<boost::singleton_pool<boost::fast_pool_allocator_tag,28,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>::pool_type>::instance'::`2'::obj.mtx);
    `boost::details::pool::singleton_default<boost::singleton_pool<boost::fast_pool_allocator_tag,28,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>::pool_type>::instance'::`2'::obj.p.first = 0;
    `boost::details::pool::singleton_default<boost::singleton_pool<boost::fast_pool_allocator_tag,28,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>::pool_type>::instance'::`2'::obj.p.list.ptr = 0;
    `boost::details::pool::singleton_default<boost::singleton_pool<boost::fast_pool_allocator_tag,28,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>::pool_type>::instance'::`2'::obj.p.list.sz = 0;
    `boost::details::pool::singleton_default<boost::singleton_pool<boost::fast_pool_allocator_tag,28,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>::pool_type>::instance'::`2'::obj.p.requested_size = 28;
    `boost::details::pool::singleton_default<boost::singleton_pool<boost::fast_pool_allocator_tag,28,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>::pool_type>::instance'::`2'::obj.p.next_size = 32;
    atexit(`boost::details::pool::singleton_default<boost::singleton_pool<boost::fast_pool_allocator_tag,28,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>::pool_type>::instance'::`2'::`dynamic atexit destructor for 'obj'');
  }
  return &`boost::details::pool::singleton_default<boost::singleton_pool<boost::fast_pool_allocator_tag,28,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>::pool_type>::instance'::`2'::obj;
}
// A8C560: using guessed type int `boost::details::pool::singleton_default<boost::singleton_pool<boost::fast_pool_allocator_tag,28,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>::pool_type>::instance'::`2'::`local static guard';

//----- (0046DA10) --------------------------------------------------------
void __thiscall AccountFrameWork::TerminateWindow(AccountFrameWork *this)
{
  AccountFrameWork *v1; // esi@1

  v1 = this;
  if ( this->m_pkBack )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkBack->vfptr);
    v1->m_pkBack = 0;
  }
  if ( v1->m_pkAge12 )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkAge12->vfptr);
    v1->m_pkAge12 = 0;
  }
  if ( v1->m_aragon )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_aragon->vfptr);
    v1->m_aragon = 0;
  }
  if ( v1->m_pkPublisherWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkPublisherWin->vfptr);
    v1->m_pkPublisherWin = 0;
  }
  if ( v1->m_pkAccountWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkAccountWin->vfptr);
    v1->m_pkAccountWin = 0;
  }
  if ( v1->m_pkWorldSelectWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkWorldSelectWin->vfptr);
    v1->m_pkWorldSelectWin = 0;
  }
  if ( v1->m_pkSpawnAppsWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkSpawnAppsWin->vfptr);
    v1->m_pkSpawnAppsWin = 0;
  }
  if ( v1->m_pkSignUpWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkSignUpWin->vfptr);
    v1->m_pkSignUpWin = 0;
  }
  MenuTexMgr::Remove(3u);
}

//----- (0046DAD0) --------------------------------------------------------
char __thiscall AccountFrameWork::ReceiveWinProc(AccountFrameWork *this)
{
  AccountFrameWork *v1; // edi@1
  NiTListItem<PgWin *> *i; // esi@2
  NiTListItem<PgWin *> **v3; // esi@4
  NiTListItem<PgWin *> *v4; // ST00_4@5

  v1 = this;
  if ( this->m_ReceiveWinList.m_kAllocator.m_uiCount )
  {
    for ( i = this->m_ReceiveWinList.m_pkHead; i; i = i->m_pkNext )
      PgWinMgr::SetTopWin(&Pgg_kWinMgr, i->m_element);
  }
  v3 = &v1->m_ReceiveWinList.m_pkHead->m_pkNext;
  while ( v3 )
  {
    v4 = (NiTListItem<PgWin *> *)v3;
    v3 = (NiTListItem<PgWin *> **)*v3;
    v1->m_ReceiveWinList.vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *> *)&v1->m_ReceiveWinList,
      v4);
  }
  v1->m_ReceiveWinList.m_kAllocator.m_uiCount = 0;
  v1->m_ReceiveWinList.m_pkHead = 0;
  v1->m_ReceiveWinList.m_pkTail = 0;
  return 1;
}

//----- (0046DB30) --------------------------------------------------------
void __thiscall AccountFrameWork::TerminateNet(AccountFrameWork *this)
{
  AccountFrameWork *v1; // edi@1
  Net *v2; // esi@1
  Net *v3; // esi@6

  v1 = this;
  this->m_bDuringWorldSelect = 0;
  v2 = this->m_spLoginNet.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spLoginNet.m_pObject = 0;
  }
  v3 = v1->m_spWorldMgrNet.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
    {
      if ( v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
    v1->m_spWorldMgrNet.m_pObject = 0;
  }
}

//----- (0046DBA0) --------------------------------------------------------
char __thiscall AccountFrameWork::InitKeyMap(AccountFrameWork *this)
{
  AccountFrameWork *v1; // ebx@1
  KeyMap *v2; // edi@1
  KeyMap *v3; // eax@2
  KeyMap *v4; // eax@3
  KeyMap *v5; // esi@4

  v1 = this;
  v2 = 0;
  if ( !this->m_spKeyMap.m_pObject )
  {
    v3 = (KeyMap *)operator new(0x20u);
    if ( v3 )
    {
      KeyMap::KeyMap(v3);
      v2 = v4;
    }
    v5 = v1->m_spKeyMap.m_pObject;
    if ( v5 != v2 )
    {
      if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      v1->m_spKeyMap.m_pObject = v2;
      if ( v2 )
        InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
    }
    v1->m_spKeyMap.m_pObject->m_pkFrameWork = (PgFrameWork *)v1;
  }
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x13u, KEY_F5, WAS_RELEASED, 0, 0);
  return 1;
}

//----- (0046DC60) --------------------------------------------------------
void __thiscall AccountFrameWork::TerminateKeyMap(AccountFrameWork *this)
{
  AccountFrameWork *v1; // edi@1
  KeyMap *v2; // esi@1

  v1 = this;
  v2 = this->m_spKeyMap.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
    v1->m_spKeyMap.m_pObject = 0;
  }
}

//----- (0046DCA0) --------------------------------------------------------
void __thiscall AccountFrameWork::TerminateBackgroundScene(AccountFrameWork *this)
{
  AccountFrameWork *v1; // edi@1
  NiNode *v2; // esi@1
  NiCamera *v3; // esi@6
  NiSortAdjustNode *v4; // esi@11

  v1 = this;
  v2 = this->m_spShadowScene.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spShadowScene.m_pObject = 0;
  }
  v3 = v1->m_spCamera.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spCamera.m_pObject = 0;
  }
  v4 = v1->m_spBackgroundScene.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
    {
      if ( v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
    v1->m_spBackgroundScene.m_pObject = 0;
  }
}

//----- (0046DD40) --------------------------------------------------------
char __thiscall AccountFrameWork::InitWindow(AccountFrameWork *this)
{
  AccountFrameWork *v1; // esi@1
  NiImageConverter *v2; // eax@3
  NiPixelData *v3; // eax@3
  NiSourceTexture *v4; // edi@4
  void *(__thiscall *v5)(NiRefObject *, unsigned int); // edx@8
  unsigned int v6; // ST5C_4@8
  unsigned int v7; // eax@8
  PgWinSpr *v8; // eax@8
  NiImageConverter *v9; // eax@10
  NiPixelData *v10; // eax@10
  NiSourceTexture *v11; // ebx@10
  unsigned int v12; // ST5C_4@17
  unsigned int v13; // eax@17
  NiSourceTexture *v14; // ebx@17
  PgWinSpr *v15; // eax@17
  NiImageConverter *v16; // eax@19
  NiPixelData *v17; // eax@19
  unsigned int v18; // ST5C_4@26
  unsigned int v19; // eax@26
  NiSourceTexture *v20; // ebx@26
  PgWinSpr *v21; // eax@26
  NiImageConverter *v22; // eax@28
  NiPixelData *v23; // eax@28
  unsigned int v24; // ST5C_4@35
  unsigned int v25; // eax@35
  PgWinSpr *v26; // eax@35
  WorldSelectWin *v27; // eax@35
  SignUpWin *v28; // eax@38
  int v30; // eax@46
  unsigned __int64 *v31; // eax@46
  const char *v32; // eax@46
  NiUnsharedGeometryGroup *v33; // eax@48
  NiTexture::FormatPrefs kPrefs; // [sp+80h] [bp-12Ch]@5
  NiPointer<NiSourceTexture> spTexture; // [sp+8Ch] [bp-120h]@6
  NiTexture::FormatPrefs v36; // [sp+90h] [bp-11Ch]@11
  char acPathName[256]; // [sp+9Ch] [bp-110h]@3
  int v38; // [sp+1A8h] [bp-4h]@8

  v1 = this;
  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acPathName, "%sAccount\\%s.tga", &Folder::m_acMenu, "darkround");
  v2 = NiImageConverter::GetImageConverter();
  v3 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v2->vfptr[2].__vecDelDtor)(
                        v2,
                        acPathName,
                        0);
  if ( v3 )
  {
    kPrefs.m_ePixelLayout = 6;
    kPrefs.m_eAlphaFmt = 3;
    kPrefs.m_eMipMapped = 0;
    v4 = NiSourceTexture::Create(v3, &kPrefs);
  }
  else
  {
    v4 = 0;
  }
  spTexture.m_pObject = v4;
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v5 = v4->vfptr[16].__vecDelDtor;
  v38 = 0;
  v6 = ((int (__thiscall *)(NiSourceTexture *))v5)(v4);
  v7 = ((int (__thiscall *)(NiSourceTexture *))v4->vfptr[15].__vecDelDtor)(v4);
  v8 = PgWinSpr::CreateWin(0, 0, v4, 0, 0, 0, v7, v6, 0, 0, 0);
  v1->m_pkBack = v8;
  v8->vfptr[117].__vecDelDtor((NiRefObject *)v8, PgWin::ms_uiScreenWidth);
  ((void (__stdcall *)(unsigned int))v1->m_pkBack->vfptr[118].__vecDelDtor)(PgWin::ms_uiScreenHeight);
  ((void (__stdcall *)(_DWORD))v1->m_pkBack->vfptr[60].__vecDelDtor)(0);
  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acPathName, "%sAccount\\%s.tga", &Folder::m_acMenu, "age12");
  v9 = NiImageConverter::GetImageConverter();
  v10 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v9->vfptr[2].__vecDelDtor)(
                         v9,
                         acPathName,
                         0);
  v11 = 0;
  if ( v10 )
  {
    v36.m_ePixelLayout = 6;
    v36.m_eAlphaFmt = 3;
    v36.m_eMipMapped = 0;
    v11 = NiSourceTexture::Create(v10, &v36);
  }
  if ( v4 != v11 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v4 = v11;
    spTexture.m_pObject = v11;
    if ( v11 )
      InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
  }
  v12 = ((int (__thiscall *)(NiSourceTexture *))v4->vfptr[16].__vecDelDtor)(v4);
  v13 = ((int (__thiscall *)(NiSourceTexture *))v4->vfptr[15].__vecDelDtor)(v4);
  v14 = 0;
  v15 = PgWinSpr::CreateWin(0, 0, v4, 0, 0, 0, v13, v12, 0, 0, 0);
  v1->m_pkAge12 = v15;
  v15->vfptr[60].__vecDelDtor((NiRefObject *)v15, 0);
  ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v1->m_pkAge12->vfptr[59].__vecDelDtor)(
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.89999998,
    0.1);
  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acPathName, "%sAccount\\%s.tga", &Folder::m_acMenu, "aragon");
  v16 = NiImageConverter::GetImageConverter();
  v17 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v16->vfptr[2].__vecDelDtor)(
                         v16,
                         acPathName,
                         0);
  if ( v17 )
  {
    v36.m_ePixelLayout = 6;
    v36.m_eAlphaFmt = 3;
    v36.m_eMipMapped = 0;
    v14 = NiSourceTexture::Create(v17, &v36);
  }
  if ( v4 != v14 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v4 = v14;
    spTexture.m_pObject = v14;
    if ( v14 )
      InterlockedIncrement((volatile LONG *)&v14->m_uiRefCount);
  }
  v18 = ((int (__thiscall *)(NiSourceTexture *))v4->vfptr[16].__vecDelDtor)(v4);
  v19 = ((int (__thiscall *)(_DWORD))v4->vfptr[15].__vecDelDtor)(v4);
  v20 = 0;
  v21 = PgWinSpr::CreateWin(0, 0, v4, 0, 0, 0, v19, v18, 0, 0, 0);
  v1->m_aragon = v21;
  v21->vfptr[60].__vecDelDtor((NiRefObject *)v21, 0);
  ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v1->m_aragon->vfptr[59].__vecDelDtor)(
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    1.0,
    1.0);
  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acPathName, "%sAccount\\%s.tga", &Folder::m_acMenu, "publisher");
  v22 = NiImageConverter::GetImageConverter();
  v23 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v22->vfptr[2].__vecDelDtor)(
                         v22,
                         acPathName,
                         0);
  if ( v23 )
  {
    v36.m_ePixelLayout = 6;
    v36.m_eAlphaFmt = 3;
    v36.m_eMipMapped = 0;
    v20 = NiSourceTexture::Create(v23, &v36);
  }
  if ( v4 != v20 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v4 = v20;
    spTexture.m_pObject = v20;
    if ( v20 )
      InterlockedIncrement((volatile LONG *)&v20->m_uiRefCount);
  }
  v24 = ((int (__thiscall *)(_DWORD))v4->vfptr[16].__vecDelDtor)(v4);
  v25 = ((int (__thiscall *)(_DWORD))v4->vfptr[15].__vecDelDtor)(v4);
  v26 = PgWinSpr::CreateWin(0, 0, v4, 0, 0, 0, v25, v24, 0, 0, 0);
  v1->m_pkPublisherWin = v26;
  v26->vfptr[60].__vecDelDtor((NiRefObject *)v26, 0);
  ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v1->m_pkPublisherWin->vfptr[59].__vecDelDtor)(
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.0,
    1.0);
  LOBYTE(v38) = 1;
  v1->m_pkAccountWin = AccountWin::CreateWin((PgFrameWork *)&v1->vfptr);
  v27 = WorldSelectWin::CreateWin((PgFrameWork *)&v1->vfptr);
  v1->m_pkWorldSelectWin = v27;
  if ( v27 )
    WorldSelectWin::InitWorldSelectExitWin(v27, (PgFrameWork *)&v1->vfptr);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkBack->vfptr);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkAge12->vfptr);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_aragon->vfptr);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkPublisherWin->vfptr);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkAccountWin->vfptr);
  v1->m_pkSpawnAppsWin = 0;
  v1->m_pkSignUpWin = 0;
  if ( GameFrameWork::ms_bSpawnApps == 1 )
  {
    v1->m_pkSpawnAppsWin = SpawnAppsWin::CreateWin((PgFrameWork *)&v1->vfptr);
    v28 = SignUpWin::CreateWin((PgFrameWork *)&v1->vfptr);
    v1->m_pkSignUpWin = v28;
    if ( v28 )
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v28->vfptr);
  }
  if ( v1->m_pkAccountWin )
  {
    if ( SteamConfig::IsRunning() )
    {
      if ( !_SteamUser() )
      {
        v38 = -1;
        if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
        return 0;
      }
      v30 = _SteamUser();
      v31 = (unsigned __int64 *)(*(int (__thiscall **)(int, NiTexture::FormatPrefs::AlphaFormat *))(*(_DWORD *)v30 + 8))(
                                  v30,
                                  &v36.m_eAlphaFmt);
      v32 = SteamConfig::GetURL(*v31);
    }
    else
    {
      v32 = (const char *)TextData3::Get(0x2641359Du);
    }
    AccountWin::SetRegisterURL(v1->m_pkAccountWin, v32);
    v33 = TextData3::Get(0x29418899u);
    AccountWin::SetForgotPassword(v1->m_pkAccountWin, (const char *)v33);
  }
  v38 = -1;
  if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  return 1;
}
// 96D684: using guessed type int _SteamUser(void);
// A8975C: using guessed type bool Folder::m_bInit;
// A8CB04: using guessed type bool GameFrameWork::ms_bSpawnApps;

//----- (0046E300) --------------------------------------------------------
char __thiscall AccountFrameWork::ReceiveWinCheck(AccountFrameWork *this)
{
  int v1; // edi@2
  char *v2; // esi@3
  int v3; // eax@4
  int *v4; // ecx@4
  char result; // al@8

  if ( unk_B64838 )
  {
    v1 = unk_B64830;
    if ( unk_B64830 )
    {
      v2 = (char *)&this->m_ReceiveWinList;
      do
      {
        v3 = (*(int (__thiscall **)(char *))(*(_DWORD *)v2 + 4))(v2);
        *(_DWORD *)(v3 + 8) = *(_DWORD *)(v1 + 8);
        *(_DWORD *)v3 = 0;
        *(_DWORD *)(v3 + 4) = *((_DWORD *)v2 + 2);
        v4 = (int *)*((_DWORD *)v2 + 2);
        if ( v4 )
          *v4 = v3;
        else
          *((_DWORD *)v2 + 1) = v3;
        ++*((_DWORD *)v2 + 3);
        *((_DWORD *)v2 + 2) = v3;
        v1 = *(_DWORD *)v1;
      }
      while ( v1 );
      result = 1;
    }
    else
    {
      result = 1;
    }
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (0046E360) --------------------------------------------------------
char __thiscall AccountFrameWork::InitNet(AccountFrameWork *this)
{
  AccountFrameWork *v1; // esi@1
  Net *v2; // edi@1
  Net *v3; // ebx@1
  PgNet *v4; // ecx@8
  Net *v5; // ebx@10
  Net *v6; // edi@10
  char acAddr[17]; // [sp+Ch] [bp-18h]@9

  v1 = this;
  v2 = this->m_spLoginNet.m_pObject;
  v3 = g_kNetMgr.m_spLogin.m_pObject;
  if ( v2 != g_kNetMgr.m_spLogin.m_pObject )
  {
    if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spLoginNet.m_pObject = v3;
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
  v4 = (PgNet *)&v1->m_spLoginNet.m_pObject->vfptr;
  if ( v4 )
  {
    *(_DWORD *)acAddr = g_kServer.m_kLoginAddr.m_kAddr.n4_code[0];
    *(_QWORD *)&acAddr[4] = *(_QWORD *)&g_kServer.m_kLoginAddr.m_kAddr.n4_code[1];
    *(_DWORD *)&acAddr[12] = g_kServer.m_kLoginAddr.m_kAddr.n4_code[3];
    acAddr[16] = 0;
    PgNet::SetAddress(v4, acAddr);
    PgNet::SetPortA((PgNet *)&v1->m_spLoginNet.m_pObject->vfptr, g_kServer.m_kLoginAddr.m_iPort);
  }
  v5 = g_kNetMgr.m_spWorldMgr.m_pObject;
  v6 = v1->m_spWorldMgrNet.m_pObject;
  if ( v6 != g_kNetMgr.m_spWorldMgr.m_pObject )
  {
    if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v1->m_spWorldMgrNet.m_pObject = v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  }
  v1->m_bDuringWorldSelect = 0;
  return 1;
}

//----- (0046E450) --------------------------------------------------------
char __thiscall AccountFrameWork::InitShadow(AccountFrameWork *this)
{
  AccountFrameWork *v1; // esi@1
  NiNode *v2; // ecx@1
  NiTListItem<NiPointer<Shadow> > **v3; // edi@1
  NiTListItem<NiPointer<Shadow> > *v4; // ST30_4@2
  Shadow *v5; // eax@4
  Shadow *v6; // edi@4
  Shadow *v7; // eax@5
  NiNode *v8; // eax@11
  unsigned int v9; // ebx@11
  unsigned int v10; // eax@12
  unsigned int v11; // edi@14
  NiNode *v12; // edi@20
  float v13; // ecx@20
  int v15; // [sp+34h] [bp-34h]@0
  int v16; // [sp+38h] [bp-30h]@0
  int v17; // [sp+3Ch] [bp-2Ch]@0
  int v18; // [sp+40h] [bp-28h]@0
  NiPoint3 kDefaultDirectionalLightDir; // [sp+44h] [bp-24h]@1
  float fTime; // [sp+50h] [bp-18h]@4
  NiPointer<Shadow> spShadow; // [sp+54h] [bp-14h]@6
  unsigned int i; // [sp+58h] [bp-10h]@3
  int v23; // [sp+64h] [bp-4h]@4

  v1 = this;
  v2 = this->m_spShadowScene.m_pObject;
  kDefaultDirectionalLightDir.x = 51.0;
  v1->m_nMaxShadowObject = 3;
  kDefaultDirectionalLightDir.y = 1.0;
  kDefaultDirectionalLightDir.z = 15.0;
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v2->m_kChildren);
  v3 = &v1->m_kShadowList.m_pkHead->m_pkNext;
  while ( v3 )
  {
    v4 = (NiTListItem<NiPointer<Shadow> > *)v3;
    v3 = (NiTListItem<NiPointer<Shadow> > **)*v3;
    v1->m_kShadowList.vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> > *)&v1->m_kShadowList,
      v4);
  }
  v1->m_kShadowList.m_kAllocator.m_uiCount = 0;
  v1->m_kShadowList.m_pkHead = 0;
  v1->m_kShadowList.m_pkTail = 0;
  for ( i = 0; i < v1->m_nMaxShadowObject; ++i )
  {
    *(float *)&v5 = COERCE_FLOAT(operator new(0x84u));
    fTime = *(float *)&v5;
    v6 = 0;
    v23 = 0;
    if ( *(float *)&v5 != 0.0 )
    {
      Shadow::Shadow(v5, &kDefaultDirectionalLightDir, 0, 0, 5u);
      v6 = v7;
    }
    spShadow.m_pObject = v6;
    if ( v6 )
      InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
    v23 = 1;
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *)&v1->m_kShadowList,
      (NiPointer<NiDX92DBufferData> *)&spShadow);
    ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spShadowScene.m_pObject->vfptr[29].__vecDelDtor)(
      v6->m_spNode.m_pObject,
      0);
    v23 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  }
  *(float *)&v8 = COERCE_FLOAT(operator new(0xE8u));
  fTime = *(float *)&v8;
  v9 = 0;
  v23 = 2;
  if ( *(float *)&v8 == 0.0 )
  {
    i = 0;
  }
  else
  {
    NiNode::NiNode(v8, 0);
    i = v10;
  }
  v23 = -1;
  NiObjectNET::SetName((NiObjectNET *)i, "ShadowNode");
  v11 = v1->m_vecBGObjectNode._Mylast - v1->m_vecBGObjectNode._Myfirst;
  if ( v11 )
  {
    do
    {
      ((void (__stdcall *)(NiPointer<Shadow> *, NiNode *))v1->m_spBackgroundScene.m_pObject->vfptr[30].__vecDelDtor)(
        &spShadow,
        v1->m_vecBGObjectNode._Myfirst[v9]);
      if ( *(float *)&spShadow.m_pObject != 0.0 )
      {
        fTime = *(float *)&spShadow.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&spShadow.m_pObject->m_uiRefCount) && fTime != 0.0 )
          (**(void (__stdcall ***)(_DWORD))LODWORD(fTime))(1);
      }
      (*(void (__stdcall **)(NiNode *, _DWORD))(*(_DWORD *)i + 116))(v1->m_vecBGObjectNode._Myfirst[v9++], 0);
    }
    while ( v9 < v11 );
  }
  v12 = (NiNode *)i;
  ((void (__stdcall *)(unsigned int, _DWORD, int, int, int, int, _DWORD, _DWORD, _DWORD, _DWORD, Shadow *))v1->m_spBackgroundScene.m_pObject->vfptr[29].__vecDelDtor)(
    i,
    0,
    v15,
    v16,
    v17,
    v18,
    LODWORD(kDefaultDirectionalLightDir.x),
    LODWORD(kDefaultDirectionalLightDir.y),
    LODWORD(kDefaultDirectionalLightDir.z),
    LODWORD(fTime),
    spShadow.m_pObject);
  spShadow.m_pObject = (Shadow *)1;
  fTime = v13;
  NiAVObject::Update((NiAVObject *)&v1->m_spBackgroundScene.m_pObject->vfptr, 0.0, 1);
  NiAVObject::UpdateProperties((NiAVObject *)&v1->m_spBackgroundScene.m_pObject->vfptr);
  NiAVObject::UpdateEffects((NiAVObject *)&v1->m_spBackgroundScene.m_pObject->vfptr);
  AccountFrameWork::ApplyTerrain(v1, v12);
  return 1;
}

//----- (0046E6B0) --------------------------------------------------------
char __thiscall AccountFrameWork::InitBackgroundScene(AccountFrameWork *this)
{
  AccountFrameWork *v1; // edi@1
  NiSortAdjustNode *v2; // eax@1
  NiSortAdjustNode *v3; // ebx@1
  NiSortAdjustNode *v4; // eax@2
  NiSortAdjustNode *v5; // esi@3
  NiNode *v6; // esi@10
  NiNode *v7; // eax@15
  NiNode *v8; // eax@16
  NiNode *v9; // ebx@16
  NiNode *v10; // esi@18
  NiObjectNET *v11; // ebx@25
  NiObjectNET *v12; // eax@25
  NiObjectNET *v13; // esi@25
  NiNode *v14; // esi@27
  NiObjectNET *v15; // eax@29
  int v16; // esi@29
  NiObjectNET *v17; // eax@36
  NiObjectNET *v18; // esi@36
  const char *v19; // eax@43
  NiNode *v20; // esi@43
  void (__thiscall ***v21)(_DWORD, _DWORD); // esi@44
  char result; // al@48
  char *v23; // eax@49
  char *v24; // ecx@57
  int v25; // eax@65
  unsigned int v26; // eax@67
  int v27; // esi@69
  NiRTTI *v28; // eax@70
  unsigned int v29; // ecx@75
  NiTextKey *v30; // esi@75
  unsigned int v31; // esi@77
  NiTextKey *v32; // ecx@78
  unsigned int v33; // edx@78
  int v34; // eax@78
  unsigned int v35; // edx@80
  NiTextKey *v36; // ecx@81
  float *v37; // eax@81
  double v38; // st7@82
  int v39; // eax@85
  int v40; // eax@89
  NiAVObject *v41; // eax@92
  void (__thiscall ***v42)(_DWORD, _DWORD); // esi@93
  NiCamera *v43; // esi@98
  NiTextKey *v44; // eax@103
  void (__thiscall ***v45)(_DWORD, _DWORD); // esi@105
  NiNode *pkNode; // [sp+70h] [bp-28h]@43
  unsigned int uiExtraDataSize; // [sp+74h] [bp-24h]@68
  NiCamera *pkCamera; // [sp+7Ch] [bp-1Ch]@92
  NiTextKey *pkTextKey; // [sp+80h] [bp-18h]@27
  int v50; // [sp+84h] [bp-14h]@30
  unsigned int uiNumKeys; // [sp+88h] [bp-10h]@34
  int v52; // [sp+94h] [bp-4h]@1

  v1 = this;
  v2 = (NiSortAdjustNode *)operator new(0xECu);
  v3 = 0;
  v52 = 0;
  if ( v2 )
  {
    NiSortAdjustNode::NiSortAdjustNode(v2);
    v3 = v4;
  }
  v5 = v1->m_spBackgroundScene.m_pObject;
  v52 = -1;
  if ( v5 != v3 )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spBackgroundScene.m_pObject = v3;
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
  v1->m_spBackgroundScene.m_pObject->m_eSortingMode = 0;
  v6 = v1->m_spShadowScene.m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v1->m_spShadowScene.m_pObject = 0;
  }
  v7 = (NiNode *)operator new(0xE8u);
  v52 = 1;
  if ( v7 )
  {
    NiNode::NiNode(v7, 0);
    v9 = v8;
  }
  else
  {
    v9 = 0;
  }
  v10 = v1->m_spShadowScene.m_pObject;
  v52 = -1;
  if ( v10 != v9 )
  {
    if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    v1->m_spShadowScene.m_pObject = v9;
    if ( v9 )
      InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  }
  v11 = 0;
  v52 = 2;
  v12 = (NiObjectNET *)operator new(0x20u);
  v13 = v12;
  LOBYTE(v52) = 3;
  if ( v12 )
  {
    NiObjectNET::NiObjectNET(v12);
    BYTE2(v13[1].vfptr) = 0;
    v13->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
    LOWORD(v13[1].vfptr) = 236;
    v11 = v13;
    InterlockedIncrement((volatile LONG *)&v13->m_uiRefCount);
  }
  LOWORD(v11[1].vfptr) |= 1u;
  LOWORD(v11[1].vfptr) |= 0x200u;
  LOWORD(v11[1].vfptr) = (unsigned int)v11[1].vfptr & 0xF3FF | 0x1000;
  BYTE2(v11[1].vfptr) = 8;
  LOWORD(v11[1].vfptr) = ((unsigned int)v11[1].vfptr & 0xFE5F | 0x40) & 0xFFE3 | 2;
  v14 = v1->m_spShadowScene.m_pObject;
  pkTextKey = (NiTextKey *)v11;
  InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
  LOBYTE(v52) = 4;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v14->m_kPropertyList,
    (NiPointer<NiRoom> *)&pkTextKey);
  LOBYTE(v52) = 2;
  if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) )
    v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
  v15 = (NiObjectNET *)operator new(0x28u);
  v16 = (int)v15;
  LOBYTE(v52) = 5;
  if ( v15 )
  {
    NiObjectNET::NiObjectNET(v15);
    *(_DWORD *)v16 = &NiVertexColorProperty::`vftable';
    *(_WORD *)(v16 + 28) = 0;
    *(_DWORD *)(v16 + 32) = 0;
    *(_DWORD *)(v16 + 36) = 1;
    v50 = v16;
  }
  else
  {
    v16 = 0;
    v50 = 0;
  }
  if ( v16 )
    InterlockedIncrement((volatile LONG *)(v16 + 4));
  *(_DWORD *)(v16 + 32) = 1;
  *(_DWORD *)(v16 + 36) = 1;
  uiNumKeys = (unsigned int)v1->m_spShadowScene.m_pObject;
  pkTextKey = (NiTextKey *)v16;
  InterlockedIncrement((volatile LONG *)(v16 + 4));
  LOBYTE(v52) = 7;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(uiNumKeys + 156),
    (NiPointer<NiRoom> *)&pkTextKey);
  LOBYTE(v52) = 6;
  if ( !InterlockedDecrement((volatile LONG *)(v16 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v16)(v16, 1);
  v17 = (NiObjectNET *)operator new(0x30u);
  v18 = v17;
  LOBYTE(v52) = 8;
  if ( v17 )
  {
    NiObjectNET::NiObjectNET(v17);
    v18->vfptr = (NiRefObjectVtbl *)&NiFogProperty::`vftable';
    *(float *)&v18[1].m_pcName = 0.0;
    *(float *)&v18[1].m_spControllers.m_pObject = 0.0;
    *(float *)&v18[1].m_ppkExtra = 0.0;
    LOWORD(v18[1].vfptr) = 0;
    *(float *)&v18[1].m_uiRefCount = 1.0;
    *(const struct NiColor *)&v18[1].m_pcName = NiColor::BLACK;
  }
  else
  {
    v18 = 0;
  }
  LOWORD(v18[1].vfptr) &= 0xFFFEu;
  uiNumKeys = (unsigned int)v1->m_spShadowScene.m_pObject;
  pkTextKey = (NiTextKey *)v18;
  InterlockedIncrement((volatile LONG *)&v18->m_uiRefCount);
  LOBYTE(v52) = 9;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(uiNumKeys + 156),
    (NiPointer<NiRoom> *)&pkTextKey);
  LOBYTE(v52) = 6;
  if ( !InterlockedDecrement((volatile LONG *)&v18->m_uiRefCount) )
    v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
  if ( !Folder::m_bInit )
    Folder::Init();
  v19 = Folder::Merge(&Folder::m_acMenu, "\\Account\\LoginBackground.nif");
  v20 = PgUtil::LoadNifFile(v19, 0);
  pkNode = v20;
  if ( v20 )
  {
    ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spBackgroundScene.m_pObject->vfptr[29].__vecDelDtor)(v20, 0);
    v23 = (char *)v1->m_vecShadowObject._Mylast;
    pkTextKey = (NiTextKey *)v1->m_vecShadowObject._Myfirst;
    if ( (char *)pkTextKey != v23 )
    {
      uiNumKeys = 0;
      memmove((char *)pkTextKey, v23, 0);
      v1->m_vecShadowObject._Mylast = (NiNode **)((char *)pkTextKey + uiNumKeys);
    }
    uiNumKeys = (int)v20->vfptr[18].__vecDelDtor((NiRefObject *)v20, (unsigned int)"dragon");
    if ( uiNumKeys )
      std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
        (std::vector<unsigned long,std::allocator<unsigned long> > *)&v1->m_vecShadowObject,
        &uiNumKeys);
    uiNumKeys = (int)v20->vfptr[18].__vecDelDtor((NiRefObject *)v20, (unsigned int)&off_97EFF8);
    if ( uiNumKeys )
      std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
        (std::vector<unsigned long,std::allocator<unsigned long> > *)&v1->m_vecShadowObject,
        &uiNumKeys);
    uiNumKeys = (int)v20->vfptr[18].__vecDelDtor((NiRefObject *)v20, (unsigned int)"Sphere01");
    if ( uiNumKeys )
      std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
        (std::vector<unsigned long,std::allocator<unsigned long> > *)&v1->m_vecShadowObject,
        &uiNumKeys);
    v24 = (char *)v1->m_vecBGObjectNode._Mylast;
    pkTextKey = (NiTextKey *)v1->m_vecBGObjectNode._Myfirst;
    if ( (char *)pkTextKey != v24 )
    {
      uiNumKeys = 0;
      memmove((char *)pkTextKey, v24, 0);
      v1->m_vecBGObjectNode._Mylast = (NiNode **)((char *)pkTextKey + uiNumKeys);
    }
    uiNumKeys = (int)v20->vfptr[18].__vecDelDtor((NiRefObject *)v20, (unsigned int)"Object05");
    if ( uiNumKeys )
      std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
        (std::vector<unsigned long,std::allocator<unsigned long> > *)&v1->m_vecBGObjectNode,
        &uiNumKeys);
    uiNumKeys = (int)v20->vfptr[18].__vecDelDtor((NiRefObject *)v20, (unsigned int)"Object049");
    if ( uiNumKeys )
      std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
        (std::vector<unsigned long,std::allocator<unsigned long> > *)&v1->m_vecBGObjectNode,
        &uiNumKeys);
    uiNumKeys = (int)v20->vfptr[18].__vecDelDtor((NiRefObject *)v20, (unsigned int)"Object04");
    if ( uiNumKeys )
      std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
        (std::vector<unsigned long,std::allocator<unsigned long> > *)&v1->m_vecBGObjectNode,
        &uiNumKeys);
    ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spBackgroundScene.m_pObject->vfptr[29].__vecDelDtor)(
      v1->m_spShadowScene.m_pObject,
      0);
    v25 = (int)v20->vfptr[18].__vecDelDtor((NiRefObject *)v20, (unsigned int)"LOGIN_BG_1_C");
    if ( v25 )
      v1->m_pkTimeController = *(NiTimeController **)(v25 + 12);
    v26 = (int)v20->vfptr[18].__vecDelDtor((NiRefObject *)v20, (unsigned int)"Note");
    uiNumKeys = v26;
    if ( v26 )
    {
      uiExtraDataSize = *(_DWORD *)(v26 + 20);
      pkTextKey = 0;
      if ( uiExtraDataSize )
      {
        while ( 1 )
        {
          v27 = *(_DWORD *)(*(_DWORD *)(uiNumKeys + 16) + 4 * (_DWORD)pkTextKey);
          if ( v27 )
          {
            v28 = (NiRTTI *)(*(int (__thiscall **)(int))(*(_DWORD *)v27 + 4))(v27);
            if ( v28 )
              break;
          }
LABEL_73:
          pkTextKey = (NiTextKey *)((char *)pkTextKey + 1);
          if ( (unsigned int)pkTextKey >= uiExtraDataSize )
            goto LABEL_83;
        }
        while ( v28 != &NiTextKeyExtraData::m_RTTI )
        {
          v28 = v28->m_pkBaseRTTI;
          if ( !v28 )
            goto LABEL_73;
        }
        v29 = *(_DWORD *)(v27 + 12);
        v30 = *(NiTextKey **)(v27 + 16);
        uiNumKeys = v29;
        pkTextKey = v30;
        if ( v30 && v29 < 3 )
        {
          v31 = 0;
          if ( (signed int)v29 >= 4 )
          {
            v32 = pkTextKey + 2;
            v33 = ((uiNumKeys - 4) >> 2) + 1;
            v34 = (int)&v1->m_fBGMStartTime[1];
            v31 = 4 * v33;
            do
            {
              v34 += 16;
              *(float *)(v34 - 20) = v32[-2].m_fTime;
              v32 += 4;
              --v33;
              *(float *)(v34 - 16) = v32[-5].m_fTime;
              *(float *)(v34 - 12) = v32[-4].m_fTime;
              *(float *)(v34 - 8) = v32[-3].m_fTime;
            }
            while ( v33 );
          }
          v35 = uiNumKeys;
          if ( v31 < uiNumKeys )
          {
            v36 = pkTextKey;
            v37 = &v1->m_fBGMStartTime[v31];
            do
            {
              v38 = v36[v31++].m_fTime;
              *v37 = v38;
              ++v37;
            }
            while ( v31 < v35 );
          }
        }
      }
    }
LABEL_83:
    if ( AccountFrameWork::ms_bSecondStart == 1 )
    {
      LODWORD(v1->m_fBGMStartTime[0]) = 0;
      LODWORD(v1->m_fBGMStartTime[1]) = 0;
    }
    v39 = (int)pkNode->vfptr[18].__vecDelDtor((NiRefObject *)pkNode, (unsigned int)"logo02");
    v1->m_pkAniLogo = (NiNode *)v39;
    if ( v39 )
    {
      if ( AccountFrameWork::ms_bSecondStart )
        *(_WORD *)(v39 + 28) |= 1u;
      else
        *(_WORD *)(v39 + 28) &= 0xFFFEu;
    }
    v40 = (int)pkNode->vfptr[18].__vecDelDtor((NiRefObject *)pkNode, (unsigned int)"logo01");
    v1->m_pkStaticLogo = (NiNode *)v40;
    if ( AccountFrameWork::ms_bSecondStart )
      *(_WORD *)(v40 + 28) &= 0xFFFEu;
    else
      *(_WORD *)(v40 + 28) |= 1u;
    v41 = (NiAVObject *)&v1->m_spBackgroundScene.m_pObject->vfptr;
    pkCamera = 0;
    if ( PgUtil::CatchCamera(v41, &pkCamera) )
    {
      v43 = v1->m_spCamera.m_pObject;
      pkTextKey = (NiTextKey *)pkCamera;
      if ( v43 != pkCamera )
      {
        if ( v43 && !InterlockedDecrement((volatile LONG *)&v43->m_uiRefCount) && v43 )
          v43->vfptr->__vecDelDtor((NiRefObject *)v43, 1u);
        v44 = pkTextKey;
        v1->m_spCamera.m_pObject = (NiCamera *)pkTextKey;
        if ( v44 )
          InterlockedIncrement((volatile LONG *)&v44->m_pText);
      }
      NiAVObject::UpdateProperties((NiAVObject *)&v1->m_spBackgroundScene.m_pObject->vfptr);
      NiAVObject::UpdateEffects((NiAVObject *)&v1->m_spBackgroundScene.m_pObject->vfptr);
      NiAVObject::Update((NiAVObject *)&v1->m_spBackgroundScene.m_pObject->vfptr, 0.0, 1);
      v45 = (void (__thiscall ***)(_DWORD, _DWORD))v50;
      LOBYTE(v52) = 2;
      if ( !InterlockedDecrement((volatile LONG *)(v50 + 4)) )
        (**v45)(v45, 1);
      v52 = -1;
      if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) )
        v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
      result = 1;
    }
    else
    {
      v42 = (void (__thiscall ***)(_DWORD, _DWORD))v50;
      LOBYTE(v52) = 2;
      if ( !InterlockedDecrement((volatile LONG *)(v50 + 4)) )
        (**v42)(v42, 1);
      v52 = -1;
      if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) )
        v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
      result = 0;
    }
  }
  else
  {
    v21 = (void (__thiscall ***)(_DWORD, _DWORD))v50;
    LOBYTE(v52) = 2;
    if ( !InterlockedDecrement((volatile LONG *)(v50 + 4)) )
      (**v21)(v21, 1);
    v52 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    result = 0;
  }
  return result;
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);
// 9704EC: using guessed type int (__thiscall *NiFogProperty::`vftable')(void *p, char);
// 97EFF8: using guessed type void *off_97EFF8;
// A8975C: using guessed type bool Folder::m_bInit;
// A8C5DC: using guessed type bool AccountFrameWork::ms_bSecondStart;
// B6243C: using guessed type const struct NiColor NiColor::BLACK;

//----- (0046EED0) --------------------------------------------------------
void __thiscall AccountFrameWork::ReleaseShadow(AccountFrameWork *this)
{
  AccountFrameWork *v1; // esi@1
  char *v2; // ecx@1
  char *v3; // edi@1
  char *v4; // ecx@3
  char *v5; // edi@3
  int v6; // edi@5
  NiTListItem<NiPointer<Shadow> > **v7; // esi@5
  NiTListItem<NiPointer<Shadow> > **v8; // ST08_4@6

  v1 = this;
  v2 = (char *)this->m_vecBGObjectNode._Mylast;
  v3 = (char *)v1->m_vecBGObjectNode._Myfirst;
  if ( v3 != v2 )
  {
    memmove(v3, v2, 0);
    v1->m_vecBGObjectNode._Mylast = (NiNode **)v3;
  }
  v4 = (char *)v1->m_vecShadowObject._Mylast;
  v5 = (char *)v1->m_vecShadowObject._Myfirst;
  if ( v5 != v4 )
  {
    memmove(v5, v4, 0);
    v1->m_vecShadowObject._Mylast = (NiNode **)v5;
  }
  v6 = (int)&v1->m_kShadowList;
  v7 = &v1->m_kShadowList.m_pkHead->m_pkNext;
  while ( v7 )
  {
    v8 = v7;
    v7 = (NiTListItem<NiPointer<Shadow> > **)*v7;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v6 + 8))(v6, v8);
  }
  *(_DWORD *)(v6 + 12) = 0;
  *(_DWORD *)(v6 + 4) = 0;
  *(_DWORD *)(v6 + 8) = 0;
}

//----- (0046EF70) --------------------------------------------------------
char __thiscall AccountFrameWork::Init(AccountFrameWork *this, PgMsg::Frame *ptFrameMsg)
{
  AccountFrameWork *v2; // esi@1
  char result; // al@2
  NiAudioSystem *v4; // eax@9
  int v5; // eax@9
  char *v6; // eax@10
  float destVol; // ST28_4@16
  float v8; // ST28_4@16
  NiAudioSystem *v9; // eax@16
  PgFrameWork *v10; // edi@17
  char *v11; // eax@23
  const char *v12; // ST18_4@23
  CDataDocument *v13; // eax@23
  NiSourceTexture *v14; // eax@23
  char acFileName[256]; // [sp+2Ch] [bp-104h]@10

  v2 = this;
  this->m_pkAccountAnotherBGM = 0;
  this->m_pkTimeController = 0;
  *(_WORD *)&this->m_bStartBGM[0] = 0;
  LODWORD(this->m_fBGMStartTime[0]) = 0;
  LODWORD(this->m_fBGMStartTime[1]) = 0;
  this->m_fFrameStartTime = 0.0;
  this->m_pkStaticLogo = 0;
  this->m_pkAniLogo = 0;
  if ( AccountFrameWork::ReceiveWinCheck(this)
    && AccountFrameWork::InitWindow(v2)
    && AccountFrameWork::ReceiveWinProc(v2)
    && AccountFrameWork::InitNet(v2)
    && AccountFrameWork::InitKeyMap(v2)
    && AccountFrameWork::InitBackgroundScene(v2)
    && AccountFrameWork::InitShadow(v2) )
  {
    v4 = NiAudioSystem::GetAudioSystem();
    v5 = (int)v4->vfptr[17].__vecDelDtor((NiRefObject *)v4, 1u);
    v2->m_pkAccountAnotherBGM = (NiAudioSource *)v5;
    if ( v5 )
    {
      v6 = Folder::Sound();
      sprintf(acFileName, "%s%s", v6, "EFX_Total_master.mp3");
      ((void (__stdcall *)(char *))v2->m_pkAccountAnotherBGM->vfptr[34].__vecDelDtor)(acFileName);
      ((void (__stdcall *)(signed int))v2->m_pkAccountAnotherBGM->vfptr[32].__vecDelDtor)(1);
      if ( (unsigned __int8)((int (*)(void))v2->m_pkAccountAnotherBGM->vfptr[37].__vecDelDtor)() )
      {
        ((void (__stdcall *)(signed int))v2->m_pkAccountAnotherBGM->vfptr[52].__vecDelDtor)(1);
        if ( !AccountFrameWork::ms_bSecondStart )
          ((void (*)(void))v2->m_pkAccountAnotherBGM->vfptr[54].__vecDelDtor)();
        if ( g_kSoundMgr.m_pkBGMGroup )
        {
          SoundGroup::StopAllSoundWholeGroup();
          ((void (*)(void))g_kSoundMgr.m_pkBGMGroup->vfptr->StopAllSound)();
          SoundMgr::StopBGM(&g_kSoundMgr);
          SoundMgr::PlayBGM(&g_kSoundMgr, "LoginBackground.mp3");
        }
        destVol = g_kSoundMgr.m_pkBGMGroup->m_fGain;
        v8 = SoundGroup::GetMasterGain() * destVol;
        ((void (__stdcall *)(_DWORD))v2->m_pkAccountAnotherBGM->vfptr[47].__vecDelDtor)(LODWORD(v8));
        ((void (__stdcall *)(_DWORD))v2->m_pkAccountAnotherBGM->vfptr[63].__vecDelDtor)(0.0);
        v9 = NiAudioSystem::GetAudioSystem();
        ((void (__thiscall *)(NiAudioSystem *, _DWORD, signed int))v9->vfptr[22].__vecDelDtor)(v9, 0.0, 1);
      }
      else
      {
        v2->m_pkAccountAnotherBGM = 0;
      }
    }
    AccountFrameWork::ms_bSecondStart = 1;
    v2->m_bInit = 1;
    v10 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( g_kServer.m_bCP )
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkAccountWin->vfptr);
      if ( !g_kServer.m_bTestServer )
        PgNet::SetAddress((PgNet *)&v2->m_spLoginNet.m_pObject->vfptr, "50.23.79.98");
    }
    if ( v10 )
    {
      if ( LOBYTE(v10[64].m_kMsgQ.m_uiAlloced) )
        ((void (*)(void))v2->m_spLoginNet.m_pObject->vfptr[2].__vecDelDtor)();
    }
    v11 = Folder::Menu();
    v12 = Folder::Merge(v11, "\\Account\\Account.conf");
    v13 = CDataDocument::Instance();
    CDataDocument::Load(v13, v12);
    v2->m_pkPopupMenuWin = 0;
    v14 = MenuTexMgr::GetTexture(1u);
    v2->m_pkPopupMenuWin = PopupMenuWin::CreateWin(v14, 5u, 5u, (PgFrameWork *)&v2->vfptr);
    AccountFrameWork::SetResList(v2);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C5DC: using guessed type bool AccountFrameWork::ms_bSecondStart;

//----- (0046F230) --------------------------------------------------------
void __thiscall AccountFrameWork::Terminate(AccountFrameWork *this)
{
  AccountFrameWork *v1; // esi@1
  NiAudioSource *v2; // ecx@1
  NiAudioSource *v3; // ecx@2
  NiTimeController *v4; // ecx@5
  KeyMap *v5; // edi@7

  v1 = this;
  v2 = this->m_pkAccountAnotherBGM;
  if ( v2 )
  {
    ((void (*)(void))v2->vfptr[55].__vecDelDtor)();
    NiObjectNET::RemoveAllControllers((NiObjectNET *)&v1->m_pkAccountAnotherBGM->vfptr);
    NiObjectNET::RemoveAllExtraData((NiObjectNET *)&v1->m_pkAccountAnotherBGM->vfptr);
    v3 = v1->m_pkAccountAnotherBGM;
    if ( v3 )
      ((void (__stdcall *)(_DWORD))v3->vfptr->__vecDelDtor)(1);
    v1->m_pkAccountAnotherBGM = 0;
  }
  v4 = v1->m_pkTimeController;
  if ( v4 )
  {
    ((void (*)(void))v4->vfptr[16].__vecDelDtor)();
    v1->m_pkTimeController = 0;
  }
  AccountFrameWork::ReleaseShadow(v1);
  AccountFrameWork::TerminateBackgroundScene(v1);
  v5 = v1->m_spKeyMap.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spKeyMap.m_pObject = 0;
  }
  AccountFrameWork::TerminateWindow(v1);
  AccountFrameWork::TerminateNet(v1);
  v1->m_bInit = 0;
  v1->m_BackFrameID = 0;
}

//----- (0046F2E0) --------------------------------------------------------
NiSourceTexture *__cdecl PgUtil::LoadSourceTexture(const char *pcFileName)
{
  NiSourceTexture *result; // eax@2
  NiImageConverter *v2; // eax@3
  NiPixelData *v3; // eax@3
  NiTexture::FormatPrefs kPrefs; // [sp+4h] [bp-Ch]@4

  if ( pcFileName
    && (v2 = NiImageConverter::GetImageConverter(),
        (v3 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, const char *, _DWORD))v2->vfptr[2].__vecDelDtor)(
                               v2,
                               pcFileName,
                               0)) != 0) )
  {
    kPrefs.m_ePixelLayout = 6;
    kPrefs.m_eAlphaFmt = 3;
    kPrefs.m_eMipMapped = 0;
    result = NiSourceTexture::Create(v3, &kPrefs);
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0046F340) --------------------------------------------------------
char *__cdecl Folder::Sound()
{
  if ( !Folder::m_bInit )
    Folder::Init();
  return &Folder::m_acSound;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0046F360) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *>::RemoveAll(NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *> *this)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *> *v1; // edi@1
  NiTListItem<NSFParsedShader *> *v2; // esi@1
  NiTListItem<NSFParsedShader *> *v3; // ST00_4@2

  v1 = this;
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem(v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
}

//----- (0046F3A0) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>::AddNodeTail(NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *> *this, NiTListItem<PgWin *> *pkNode)
{
  NiTListItem<PgWin *> *v2; // edx@1

  pkNode->m_pkNext = 0;
  pkNode->m_pkPrev = this->m_pkTail;
  v2 = this->m_pkTail;
  if ( v2 )
  {
    v2->m_pkNext = pkNode;
    ++this->m_kAllocator.m_uiCount;
    this->m_pkTail = pkNode;
  }
  else
  {
    ++this->m_kAllocator.m_uiCount;
    this->m_pkHead = pkNode;
    this->m_pkTail = pkNode;
  }
}

//----- (0046F3F0) --------------------------------------------------------
int __stdcall AccountFrameWork::On_NC_USER_CONNECTCUT_CMD(int iRevBytes, void *pvData)
{
  int result; // eax@1

  result = iRevBytes;
  if ( *(_WORD *)pvData == 1667 )
    g_kServer.m_bDoubleConnected = 1;
  return result;
}

//----- (0046F410) --------------------------------------------------------
int __thiscall AccountFrameWork::On_NC_USER_WORLD_STATUS_ACK(AccountFrameWork *this, int iRevBytes, void *pvData)
{
  AccountFrameWork *v3; // esi@1

  v3 = this;
  Server::SetWorldMgrAddr(&g_kServer, (PROTO_NC_USER_LOGIN_ACK *)pvData);
  if ( (unsigned __int8)((int (*)(void))v3->m_pkWorldSelectWin->vfptr[65].__vecDelDtor)() )
    WorldSelectWin::UpdateServerList(v3->m_pkWorldSelectWin);
  return iRevBytes;
}

//----- (0046F450) --------------------------------------------------------
int __stdcall AccountFrameWork::On_NC_USER_XTRAP_ACK(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0046F460) --------------------------------------------------------
void __thiscall AccountFrameWork::NcUserLoginCpReq(AccountFrameWork *this, char *acCpKey)
{
  AccountFrameWork *v2; // edi@1
  Net *v3; // ecx@1
  unsigned int v4; // eax@1
  PgNet *v5; // ecx@1
  int v6; // esi@1
  PROTO_NC_USER_LOGIN_NETMARBLE_REQ kProto; // [sp+Ch] [bp-8h]@1
  NETCOMMAND netcmd; // [sp+10h] [bp-4h]@1

  v2 = this;
  v3 = this->m_spLoginNet.m_pObject;
  netcmd.protocol = 3101;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = strlen(acCpKey);
  v5 = (PgNet *)&v2->m_spLoginNet.m_pObject->vfptr;
  v6 = v4 + 1;
  kProto.CPCookieLength = v4 + 1;
  PgNet::AddNetMsg(v5, &kProto, 2);
  PgNet::SendNetMsg((PgNet *)&v2->m_spLoginNet.m_pObject->vfptr, acCpKey, v6);
}

//----- (0046F4D0) --------------------------------------------------------
void __thiscall AccountFrameWork::NcUserXtrapReq(AccountFrameWork *this, char *acXTrapKey)
{
  AccountFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  unsigned int v4; // eax@1
  PgNet *v5; // ecx@1
  int v6; // ebx@1
  NETCOMMAND netcmd; // [sp+Ch] [bp-8h]@1
  PROTO_NC_USER_XTRAP_REQ kProto; // [sp+13h] [bp-1h]@1

  v2 = this;
  v3 = this->m_spLoginNet.m_pObject;
  netcmd.protocol = 3076;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = strlen(acXTrapKey);
  v5 = (PgNet *)&v2->m_spLoginNet.m_pObject->vfptr;
  v6 = v4 + 1;
  kProto.XTrapClientKeyLength = v4 + 1;
  PgNet::AddNetMsg(v5, &kProto, 1);
  PgNet::SendNetMsg((PgNet *)&v2->m_spLoginNet.m_pObject->vfptr, acXTrapKey, v6);
}

//----- (0046F530) --------------------------------------------------------
void __thiscall AccountFrameWork::NcUserWorldSelectReq(AccountFrameWork *this, unsigned int uiIndex)
{
  AccountFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@2
  int v5; // esi@2
  int v6; // eax@2
  NETCOMMAND netcmd; // [sp+4h] [bp-8Ch]@2
  PROTO_NC_USER_WORLDSELECT_REQ kProto; // [sp+Bh] [bp-85h]@2
  char kServerName[128]; // [sp+Ch] [bp-84h]@2

  v2 = this;
  v3 = this->m_spLoginNet.m_pObject;
  if ( v3 )
  {
    netcmd.protocol = 3083;
    PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
    v4 = (PgNet *)&v2->m_spLoginNet.m_pObject->vfptr;
    kProto.worldno = uiIndex;
    PgNet::SendNetMsg(v4, &kProto, 1);
    Server::GetWorldName(&g_kServer, uiIndex, g_kUserLoginLogForXTrap);
    Server::GetWorldName(&g_kServer, uiIndex, g_kServer.kServerName);
    Server::GetWorldName(&g_kServer, uiIndex, kServerName);
    v5 = BT_OpenLogFile("ConnectWorldInfo.txt", 2);
    BT_SetLogFlags(v5, 2);
    v6 = BT_GetLogFileName(v5);
    BT_AddLogFile(v6);
    BT_ClearLog(v5);
    _BT_AppLogEntryF(v5, 4, "WorldName [ %s ]", kServerName);
    BT_CloseLogFile(v5);
  }
}
// 96D014: using guessed type _DWORD __stdcall BT_CloseLogFile(_DWORD);
// 96D018: using guessed type int _BT_AppLogEntryF(_DWORD, _DWORD, const char *, ...);
// 96D01C: using guessed type _DWORD __stdcall BT_ClearLog(_DWORD);
// 96D020: using guessed type _DWORD __stdcall BT_AddLogFile(_DWORD);
// 96D024: using guessed type _DWORD __stdcall BT_GetLogFileName(_DWORD);
// 96D028: using guessed type _DWORD __stdcall BT_SetLogFlags(_DWORD, _DWORD);
// 96D02C: using guessed type _DWORD __stdcall BT_OpenLogFile(_DWORD, _DWORD);

//----- (0046F620) --------------------------------------------------------
void __thiscall AccountFrameWork::NcUserWorldStatusReq(AccountFrameWork *this)
{
  Net *v1; // ecx@1
  AccountFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  v1 = this->m_spLoginNet.m_pObject;
  if ( v1 )
  {
    LOWORD(netcmd) = 3099;
    PgNet::SendNetMsg((PgNet *)&v1->vfptr, &netcmd, 2);
  }
}

//----- (0046F650) --------------------------------------------------------
int __thiscall AccountFrameWork::On_NC_USER_LOGIN_ACK(AccountFrameWork *this, int iRevBytes, void *pvData)
{
  AccountFrameWork *v3; // esi@1
  PgWin *v4; // esi@4

  v3 = this;
  Server::SetWorldMgrAddr(&g_kServer, (PROTO_NC_USER_LOGIN_ACK *)pvData);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkAccountWin->vfptr);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkWorldSelectWin->vfptr);
  if ( v3->m_pkSignUpWin )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkSignUpWin->vfptr);
  if ( GameFrameWork::ms_bFirstRun == 1 )
  {
    v4 = (PgWin *)&v3->m_pkSpawnAppsWin->vfptr;
    if ( v4 )
      PgWinMgr::ShowWin(&Pgg_kWinMgr, v4);
    GameFrameWork::ms_bFirstRun = 0;
  }
  return iRevBytes;
}
// A8CB05: using guessed type bool GameFrameWork::ms_bFirstRun;

//----- (0046F6C0) --------------------------------------------------------
int __thiscall AccountFrameWork::On_NC_USER_LOGINFAIL_ACK(AccountFrameWork *this, int iRevBytes, void *pvData)
{
  AccountFrameWork *v3; // esi@1
  char *v4; // eax@1
  MsgBox *v5; // ecx@1
  PgMsg::Frame kCancelMsg; // [sp+4h] [bp-2Ch]@2
  PgMsg::Frame kMsg; // [sp+18h] [bp-18h]@2

  v3 = this;
  v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
  v5 = MsgBox::Modal(MSGBOX_OK, v4);
  if ( g_kServer.m_bCP )
  {
    kMsg.m_uiFrameMsg = 14;
    kCancelMsg.m_uiFrameMsg = 14;
    MsgBox::SetFrameWorkMsgOnClose(v5, (PgFrameWork *)&v3->vfptr, &kMsg, &kCancelMsg);
  }
  else
  {
    kMsg.m_uiFrameMsg = 20;
    MsgBox::SetFrameWorkMsgOnClose(v5, (PgFrameWork *)&v3->vfptr, &kMsg, 0);
  }
  PgNet::Close((PgNet *)&v3->m_spLoginNet.m_pObject->vfptr);
  return iRevBytes;
}

//----- (0046F740) --------------------------------------------------------
int __thiscall AccountFrameWork::On_NC_USER_CLIENT_WRONGVERSION_CHECK_ACK(AccountFrameWork *this, int iRevBytes, void *pvData)
{
  AccountFrameWork *v3; // esi@1
  char *v4; // eax@1
  MsgBox *v5; // eax@1
  PgMsg::Frame kMsg; // [sp+4h] [bp-18h]@1

  v3 = this;
  v4 = (char *)TextData::Get(0x3E413758u);
  v5 = MsgBox::Modal(MSGBOX_OK, v4);
  kMsg.m_uiFrameMsg = 18;
  MsgBox::SetFrameWorkMsgOnClose(v5, (PgFrameWork *)&v3->vfptr, &kMsg, 0);
  return iRevBytes;
}

//----- (0046F7A0) --------------------------------------------------------
int __thiscall AccountFrameWork::On_NC_USER_WORLDSELECT_ACK(AccountFrameWork *this, int iRevBytes, void *pvData)
{
  AccountFrameWork *v3; // edi@1
  char v4; // bl@1
  char *v5; // eax@1
  MsgBox *v6; // eax@10
  int v7; // eax@12
  int v8; // edx@12
  int v9; // eax@12
  PgNet *v10; // ecx@12
  PgMsg::Frame kOkMsg; // [sp+Ch] [bp-40h]@11
  PgMsg::Frame kCancelMsg; // [sp+20h] [bp-2Ch]@11
  char acAddr[17]; // [sp+34h] [bp-18h]@12

  v3 = this;
  v4 = 0;
  v5 = 0;
  switch ( *(_BYTE *)pvData )
  {
    case 0:
      v5 = (char *)TextData::Get(0x283D4D3Au);
      break;
    case 1:
      v5 = (char *)TextData::Get(0x29878F92u);
      break;
    case 2:
      v5 = (char *)TextData::Get(0xF04A3156);
      break;
    case 3:
      v5 = (char *)TextData::Get(0x687C9E69u);
      break;
    case 4:
      v5 = (char *)TextData::Get(0xE2E3F21A);
      break;
    case 5:
      v5 = (char *)TextData::Get(0x3382D26u);
      break;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      v4 = 1;
      break;
    default:
      break;
  }
  v3->m_bDuringWorldSelect = 0;
  if ( v4 )
  {
    v7 = *(_DWORD *)((char *)pvData + 1);
    v8 = *(_DWORD *)((char *)pvData + 9);
    *(_DWORD *)&acAddr[4] = *(_DWORD *)((char *)pvData + 5);
    *(_DWORD *)acAddr = v7;
    v9 = *(_DWORD *)((char *)pvData + 13);
    v10 = (PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr;
    *(_DWORD *)&acAddr[8] = v8;
    *(_DWORD *)&acAddr[12] = v9;
    acAddr[16] = 0;
    PgNet::SetAddress(v10, acAddr);
    PgNet::SetPortA((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, *(_WORD *)((char *)pvData + 17));
    User::SetValidata_new(&g_kUser, (unsigned __int16 *)((char *)pvData + 19));
    OutputDebugStringA("server_ack\n");
    PgNet::Close((PgNet *)&v3->m_spLoginNet.m_pObject->vfptr);
    PgNet::Close((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr);
    PgFrameWork::PostFrameMsgStart(LoginWorldNetFrameWorkID, 0);
  }
  else
  {
    v6 = MsgBox::Modal(MSGBOX_OK, v5);
    if ( g_kServer.m_bCP )
    {
      kOkMsg.m_uiFrameMsg = 14;
      kCancelMsg.m_uiFrameMsg = 14;
      MsgBox::SetFrameWorkMsgOnClose(v6, (PgFrameWork *)&v3->vfptr, &kOkMsg, &kCancelMsg);
    }
  }
  return iRevBytes;
}

//----- (0046F920) --------------------------------------------------------
void __thiscall AccountFrameWork::NcUserLoginReq(AccountFrameWork *this, char byLoginType)
{
  AccountFrameWork *v2; // edi@1
  PgFrameWork *v3; // eax@2
  PgFrameWork *v4; // esi@2
  unsigned int v5; // edx@4
  int v6; // eax@4
  unsigned int v7; // ecx@4
  unsigned int v8; // edx@4
  unsigned int v9; // eax@4
  unsigned int v10; // ecx@4
  unsigned int v11; // eax@4
  PgNet *v12; // ecx@4
  PgNet *v13; // ecx@5
  char *v14; // eax@6
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v15; // eax@8
  char *v16; // eax@10
  char *v17; // eax@12
  char *v18; // eax@18
  char *v19; // esi@18
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v20; // eax@19
  PgNet *v21; // ecx@21
  __int16 v22; // [sp+10h] [bp-51C0h]@5
  __int16 pdata; // [sp+14h] [bp-51BCh]@4
  char dst; // [sp+18h] [bp-51B8h]@5
  char dest; // [sp+11Ch] [bp-50B4h]@14
  int v26; // [sp+140h] [bp-5090h]@21
  int v27; // [sp+144h] [bp-508Ch]@21
  int v28; // [sp+148h] [bp-5088h]@21
  int v29; // [sp+14Ch] [bp-5084h]@21
  int v30; // [sp+150h] [bp-5080h]@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v31; // [sp+154h] [bp-507Ch]@6
  int v32; // [sp+170h] [bp-5060h]@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+174h] [bp-505Ch]@4
  char v34[4]; // [sp+190h] [bp-5040h]@21
  int v35; // [sp+194h] [bp-503Ch]@21
  int v36; // [sp+198h] [bp-5038h]@21
  int v37; // [sp+19Ch] [bp-5034h]@21
  int v38; // [sp+1A0h] [bp-5030h]@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v39; // [sp+1A4h] [bp-502Ch]@6
  char string; // [sp+1C0h] [bp-5010h]@18
  int v41; // [sp+51CCh] [bp-4h]@6

  v2 = this;
  if ( this->m_spLoginNet.m_pObject )
  {
    v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v4 = v3;
    if ( v3 && LOBYTE(v3[64].m_kMsgQ.m_uiAlloced) )
    {
      pdata = 3127;
      PgNet::AddNetMsg((PgNet *)&v2->m_spLoginNet.m_pObject->vfptr, &pdata, 2);
      v5 = v2->m_OTP.n8_code[2];
      v6 = v2->m_OTP.n8_code[0];
      result._Bx._Ptr = (char *)v2->m_OTP.n8_code[1];
      v7 = v2->m_OTP.n8_code[4];
      *(_DWORD *)&result._Bx._Alias[4] = v5;
      v8 = v2->m_OTP.n8_code[5];
      v32 = v6;
      v9 = v2->m_OTP.n8_code[3];
      *(_DWORD *)&result._Bx._Alias[12] = v7;
      v10 = v2->m_OTP.n8_code[7];
      result._Mysize = v8;
      *(_DWORD *)&result._Bx._Alias[8] = v9;
      v11 = v2->m_OTP.n8_code[6];
      *(_DWORD *)&result._Alval.0 = v10;
      v12 = (PgNet *)&v2->m_spLoginNet.m_pObject->vfptr;
      result._Myres = v11;
      PgNet::SendNetMsg(v12, &v32, 32);
      LOBYTE(v4[64].m_kMsgQ.m_uiAlloced) = 0;
    }
    else
    {
      v13 = (PgNet *)&v2->m_spLoginNet.m_pObject->vfptr;
      v22 = 3162;
      PgNet::AddNetMsg(v13, &v22, 2);
      memset(&dst, 0, 0x13Cu);
      if ( g_kServer.m_bCP )
      {
        memcpy(&string, g_kServer.m_szCPKey, 0x5000u);
        v18 = strtok(&string, ";");
        strncpy(&dst, v18, strlen(v18));
        v19 = strtok(0, ",");
        strncpy(&dest, v19, strlen(v19));
      }
      else
      {
        v31._Myres = 15;
        v31._Mysize = 0;
        v31._Bx._Buf[0] = 0;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &v31,
          g_kUser.m_acUserID,
          strlen(g_kUser.m_acUserID));
        v41 = 0;
        v39._Myres = 15;
        v39._Mysize = 0;
        v39._Bx._Buf[0] = 0;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &v39,
          unk_A97191,
          strlen(unk_A97191));
        v14 = v39._Bx._Ptr;
        LOBYTE(v41) = 1;
        if ( v39._Myres < 0x10 )
          v14 = (char *)&v39;
        v15 = CMD5Checksum::GetMD5(&result, v14, v39._Mysize);
        LOBYTE(v41) = 2;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v39, v15);
        if ( result._Myres >= 0x10 )
          operator delete(result._Bx._Ptr);
        v16 = v31._Bx._Ptr;
        if ( v31._Myres < 0x10 )
          v16 = (char *)&v31;
        strncpy(&dst, v16, v31._Mysize);
        v17 = v39._Bx._Ptr;
        if ( v39._Myres < 0x10 )
          v17 = (char *)&v39;
        strncpy(&dest, v17, v39._Mysize);
        if ( v39._Myres >= 0x10 )
          operator delete(v39._Bx._Ptr);
        v39._Myres = 15;
        v39._Mysize = 0;
        v39._Bx._Buf[0] = 0;
        v41 = -1;
        if ( v31._Myres >= 0x10 )
          operator delete(v31._Bx._Ptr);
      }
      v20 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)GameFrameWork::ms_strLauncher._Bx._Ptr;
      if ( GameFrameWork::ms_strLauncher._Myres < 0x10 )
        v20 = &GameFrameWork::ms_strLauncher;
      v38 = 0;
      v37 = 0;
      v36 = 0;
      v35 = 0;
      *(_DWORD *)v34 = 0;
      strncpy(v34, v20->_Bx._Buf, 0x14u);
      v26 = *(_DWORD *)v34;
      v28 = v36;
      v27 = v35;
      v29 = v37;
      v21 = (PgNet *)&v2->m_spLoginNet.m_pObject->vfptr;
      v30 = v38;
      PgNet::SendNetMsg(v21, &dst, 316);
    }
  }
}

//----- (0046FCF0) --------------------------------------------------------
int __thiscall AccountFrameWork::On_NC_USER_CLIENT_RIGHTVERSION_CHECK_ACK(AccountFrameWork *this, int iRevBytes, void *pvData)
{
  AccountFrameWork *v3; // esi@1
  PgNet *v4; // ecx@1
  PgNet *v5; // ecx@1
  __int16 pdata; // [sp+4h] [bp-8h]@1
  char v8; // [sp+Bh] [bp-1h]@1

  v3 = this;
  AccountFrameWork::NcUserLoginReq(this, 0);
  v4 = (PgNet *)&v3->m_spLoginNet.m_pObject->vfptr;
  pdata = 3076;
  PgNet::AddNetMsg(v4, &pdata, 2);
  v5 = (PgNet *)&v3->m_spLoginNet.m_pObject->vfptr;
  v8 = 29;
  PgNet::AddNetMsg(v5, &v8, 1);
  PgNet::SendNetMsg((PgNet *)&v3->m_spLoginNet.m_pObject->vfptr, "33B543B0CA6E7C41E5D1D0651307", 29);
  return iRevBytes;
}

//----- (0046FD50) --------------------------------------------------------
void __thiscall AccountFrameWork::NcUserVersionReq(AccountFrameWork *this)
{
  AccountFrameWork *v1; // esi@1
  Net *v2; // ecx@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // eax@2
  char *v4; // edx@4
  char v5; // cl@5
  NETCOMMAND netcmd; // [sp+4h] [bp-64h]@2
  PROTO_NC_USER_CLIENT_VERSION_CHECK_REQ kProto; // [sp+8h] [bp-60h]@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+48h] [bp-20h]@2

  v1 = this;
  v2 = this->m_spLoginNet.m_pObject;
  if ( v2 )
  {
    netcmd.protocol = 3173;
    PgNet::AddNetMsg((PgNet *)&v2->vfptr, &netcmd, 2);
    v3 = ClientVersionKeyInfo::getVersionKey(&result);
    if ( v3->_Myres >= 0x10 )
      v3 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v3->_Bx._Ptr;
    v4 = (char *)((char *)&kProto - (char *)v3);
    do
    {
      v5 = v3->_Bx._Buf[0];
      v3->_Bx._Buf[(_DWORD)v4] = v3->_Bx._Buf[0];
      v3 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)v3 + 1);
    }
    while ( v5 );
    if ( result._Myres >= 0x10 )
      operator delete(result._Bx._Ptr);
    PgNet::SendNetMsg((PgNet *)&v1->m_spLoginNet.m_pObject->vfptr, &kProto, 64);
  }
}

//----- (0046FDD0) --------------------------------------------------------
int __thiscall AccountFrameWork::On_NC_MISC_SEED_ACK(AccountFrameWork *this, int iRevBytes, void *pvData)
{
  AccountFrameWork *v3; // esi@1

  v3 = this;
  ((void (__stdcall *)(_DWORD))this->m_spLoginNet.m_pObject->vfptr[3].__vecDelDtor)(*(_WORD *)pvData);
  AccountFrameWork::NcUserVersionReq(v3);
  return iRevBytes;
}

//----- (0046FE00) --------------------------------------------------------
int __thiscall AccountFrameWork::ProcessNetMsg(AccountFrameWork *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  AccountFrameWork *v5; // esi@1
  int result; // eax@1

  v5 = this;
  result = 0;
  if ( iDepart == 2 )
  {
    if ( iCommand == 7 )
    {
      ((void (__stdcall *)(_DWORD))this->m_spLoginNet.m_pObject->vfptr[3].__vecDelDtor)(*(_WORD *)pvData);
      AccountFrameWork::NcUserVersionReq(v5);
$LN36_2:
      result = iRevBytes;
    }
  }
  else if ( iDepart == 3 )
  {
    switch ( iCommand )
    {
      case 23:
        result = AccountFrameWork::On_NC_USER_CONNECTCUT_CMD(iRevBytes, pvData);
        break;
      case 102:
        result = AccountFrameWork::On_NC_USER_CLIENT_WRONGVERSION_CHECK_ACK(this, iRevBytes, pvData);
        break;
      case 103:
        result = AccountFrameWork::On_NC_USER_CLIENT_RIGHTVERSION_CHECK_ACK(this, iRevBytes, pvData);
        break;
      case 10:
        result = AccountFrameWork::On_NC_USER_LOGIN_ACK(this, iRevBytes, pvData);
        break;
      case 9:
        result = AccountFrameWork::On_NC_USER_LOGINFAIL_ACK(this, iRevBytes, pvData);
        break;
      case 12:
        result = AccountFrameWork::On_NC_USER_WORLDSELECT_ACK(this, iRevBytes, pvData);
        break;
      case 28:
        result = AccountFrameWork::On_NC_USER_WORLD_STATUS_ACK(this, iRevBytes, pvData);
        break;
      case 5:
        goto $LN36_2;
      default:
        return result;
    }
  }
  else if ( iDepart == 8 && iCommand == 17 )
  {
    result = iRevBytes;
  }
  return result;
}

//----- (0046FFD0) --------------------------------------------------------
std::locale::facet *__thiscall std::locale::facet::_Decref(std::locale::facet *this)
{
  std::locale::facet *v1; // edi@1
  unsigned int v2; // eax@1
  unsigned int v3; // esi@4
  std::_Lockit _Lock; // [sp+8h] [bp-4h]@1

  v1 = this;
  std::_Lockit::_Lockit(&_Lock, 0);
  v2 = v1->_Refs;
  if ( v2 && v2 < 0xFFFFFFFF )
    v1->_Refs = v2 - 1;
  v3 = v1->_Refs == 0 ? (unsigned int)v1 : 0;
  std::_Lockit::~_Lockit(&_Lock);
  return (std::locale::facet *)v3;
}

//----- (00470010) --------------------------------------------------------
void __thiscall std::locale::facet::~facet(std::locale::facet *this)
{
  this->vfptr = (std::locale::facetVtbl *)&std::locale::facet::`vftable';
}
// 97F0D8: using guessed type int (__thiscall *std::locale::facet::`vftable')(void *p, char);

//----- (00470020) --------------------------------------------------------
void __thiscall std::locale::~locale(std::locale *this)
{
  std::locale::_Locimp *v1; // edi@1
  unsigned int v2; // eax@2
  int v3; // esi@5
  void (__thiscall ***v4)(_DWORD, _DWORD); // esi@5
  std::_Lockit v5; // [sp+4h] [bp-4h]@2

  v1 = this->_Ptr;
  if ( this->_Ptr )
  {
    std::_Lockit::_Lockit(&v5, 0);
    v2 = v1->_Refs;
    if ( v2 && v2 < 0xFFFFFFFF )
      v1->_Refs = v2 - 1;
    v3 = -(v1->_Refs == 0);
    std::_Lockit::~_Lockit(&v5);
    v4 = (void (__thiscall ***)(_DWORD, _DWORD))((unsigned int)v1 & v3);
    if ( v4 )
      (**v4)(v4, 1);
  }
}

//----- (00470070) --------------------------------------------------------
std::locale *__thiscall std::ios_base::getloc(std::ios_base *this, std::locale *result)
{
  std::locale::_Locimp *v2; // esi@1
  std::locale *v3; // edi@1
  unsigned int v4; // eax@1

  v2 = this->_Ploc->_Ptr;
  v3 = result;
  result->_Ptr = v2;
  std::_Lockit::_Lockit((std::_Lockit *)&result, 0);
  v4 = v2->_Refs;
  if ( v4 < 0xFFFFFFFF )
    v2->_Refs = v4 + 1;
  std::_Lockit::~_Lockit((std::_Lockit *)&result);
  return v3;
}

//----- (004700B0) --------------------------------------------------------
std::basic_ios<char,std::char_traits<char> > *__thiscall std::basic_ios<char,std::char_traits<char>>::`scalar deleting destructor'(std::basic_ios<char,std::char_traits<char> > *this, unsigned int a2)
{
  std::basic_ios<char,std::char_traits<char> > *v2; // esi@1

  v2 = this;
  this->vfptr = (std::ios_baseVtbl *)&std::ios_base::`vftable';
  std::ios_base::_Ios_base_dtor((std::ios_base *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97F0E0: using guessed type int (__thiscall *std::ios_base::`vftable')(void *p, char);

//----- (004700E0) --------------------------------------------------------
void __thiscall Name8::Name8(Name8 *this)
{
  *(_QWORD *)&this->n8_code[6] = 0i64;
  *(_QWORD *)&this->n8_code[4] = 0i64;
  *(_QWORD *)&this->n8_code[2] = 0i64;
  *(_QWORD *)&this->n8_code[0] = 0i64;
}

//----- (00470100) --------------------------------------------------------
void __thiscall std::basic_ios<char,std::char_traits<char>>::~basic_ios<char,std::char_traits<char>>(std::basic_ios<char,std::char_traits<char> > *this)
{
  this->vfptr = (std::ios_baseVtbl *)&std::ios_base::`vftable';
  std::ios_base::_Ios_base_dtor((std::ios_base *)&this->vfptr);
}
// 97F0E0: using guessed type int (__thiscall *std::ios_base::`vftable')(void *p, char);

//----- (00470110) --------------------------------------------------------
void __thiscall std::basic_istream<char,std::char_traits<char>>::~basic_istream<char,std::char_traits<char>>(std::basic_istream<char,std::char_traits<char> > *this)
{
  *(_DWORD *)&this->gap0[*(_DWORD *)(*(_DWORD *)&this[-1].gap10[56] + 4) - 16] = &std::basic_istream<char,std::char_traits<char>>::`vftable';
}
// 97F0E8: using guessed type int (__stdcall *std::basic_istream<char,std::char_traits<char>>::`vftable')(char);

//----- (00470120) --------------------------------------------------------
void __thiscall std::basic_ostream<char,std::char_traits<char>>::_Sentry_base::~_Sentry_base(std::basic_istream<char,std::char_traits<char> >::sentry *this)
{
  int v1; // eax@1

  v1 = *(_DWORD *)&this->_Myistr->gap10[*(_DWORD *)(*(_DWORD *)&this->_Myistr->gap0[0] + 4) + 40];
  if ( v1 )
    (*(void (__thiscall **)(int))(*(_DWORD *)v1 + 8))(v1);
}

//----- (00470140) --------------------------------------------------------
__int64 __thiscall std::basic_streambuf<char,std::char_traits<char>>::_Gnavail(std::basic_streambuf<char,std::char_traits<char> > *this)
{
  __int64 result; // rax@2

  if ( *this->_IGnext )
    result = *this->_IGcount;
  else
    result = 0i64;
  return result;
}

//----- (00470160) --------------------------------------------------------
char __thiscall Server::GetWorldName(Server *this, char ucIndex, char *pcWorldName)
{
  signed int v3; // esi@1
  signed int v4; // eax@1
  FiestaServerList::ServerInfo *v5; // edi@2
  char *v6; // ecx@2
  int v7; // eax@6
  unsigned int v8; // ecx@6
  int v9; // eax@6
  int v10; // ecx@6
  char acName[17]; // [sp+4h] [bp-18h]@6

  v3 = this->m_kFiestaServerList.m_uiTotalWorld;
  v4 = 0;
  if ( v3 > 0 )
  {
    v5 = this->m_kFiestaServerList.pkServerInfo;
    v6 = &v5->kWorldNo;
    while ( *v6 != ucIndex )
    {
      ++v4;
      v6 += 18;
      if ( v4 >= v3 )
        return 1;
    }
    v7 = 9 * v4;
    v8 = v5[2 * v7 / 0x12u].kWorldName.n4_code[0];
    v9 = (int)&v5[2 * v7 / 0x12u];
    *(_DWORD *)acName = v8;
    *(_DWORD *)&acName[4] = *(_DWORD *)(v9 + 4);
    v10 = *(_DWORD *)(v9 + 8);
    *(_DWORD *)&acName[12] = *(_DWORD *)(v9 + 12);
    *(_DWORD *)&acName[8] = v10;
    acName[16] = 0;
    strcpy(pcWorldName, acName);
  }
  return 1;
}

//----- (00470220) --------------------------------------------------------
std::locale *__thiscall std::basic_streambuf<char,std::char_traits<char>>::getloc(std::basic_streambuf<char,std::char_traits<char> > *this, std::locale *result)
{
  std::locale::_Locimp *v2; // esi@1
  std::locale *v3; // edi@1
  unsigned int v4; // eax@1

  v2 = this->_Plocale->_Ptr;
  v3 = result;
  result->_Ptr = v2;
  std::_Lockit::_Lockit((std::_Lockit *)&result, 0);
  v4 = v2->_Refs;
  if ( v4 < 0xFFFFFFFF )
    v2->_Refs = v4 + 1;
  std::_Lockit::~_Lockit((std::_Lockit *)&result);
  return v3;
}

//----- (00470260) --------------------------------------------------------
void __thiscall std::basic_streambuf<char,std::char_traits<char>>::_Init(std::basic_streambuf<char,std::char_traits<char> > *this)
{
  this->_IGnext = &this->_Gnext;
  this->_IPnext = &this->_Pnext;
  this->_IGfirst = &this->_Gfirst;
  this->_IGcount = &this->_Gcount;
  this->_IPfirst = &this->_Pfirst;
  this->_IPcount = &this->_Pcount;
  this->_Pfirst = 0;
  *this->_IPnext = 0;
  *this->_IPcount = 0;
  *this->_IGfirst = 0;
  *this->_IGnext = 0;
  *this->_IGcount = 0;
}

//----- (004702C0) --------------------------------------------------------
int __stdcall std::codecvt<char,char,int>::do_out(int *__formal, const char *_First1, const char *a4, const char **_Mid1, char *_First2, char *a7, char **_Mid2)
{
  *_Mid1 = _First1;
  *_Mid2 = _First2;
  return 3;
}

//----- (004702E0) --------------------------------------------------------
int __stdcall std::codecvt<char,char,int>::do_unshift(int *__formal, char *_First2, char *a4, char **_Mid2)
{
  *_Mid2 = _First2;
  return 3;
}

//----- (00470300) --------------------------------------------------------
unsigned int __stdcall std::codecvt<char,char,int>::do_length(const int *__formal, const char *_First1, const char *_Last1, unsigned int _Count)
{
  unsigned int result; // eax@1

  result = _Last1 - _First1;
  if ( _Count < _Last1 - _First1 )
    result = _Count;
  return result;
}

//----- (00470320) --------------------------------------------------------
std::codecvt<char,char,int> *__thiscall std::codecvt<char,char,int>::`vector deleting destructor'(std::codecvt<char,char,int> *this, unsigned int a2)
{
  std::codecvt<char,char,int> *v2; // esi@1

  v2 = this;
  this->vfptr = (std::locale::facetVtbl *)&std::locale::facet::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 97F0D8: using guessed type int (__thiscall *std::locale::facet::`vftable')(void *p, char);

//----- (00470350) --------------------------------------------------------
int __thiscall std::ctype<char>::do_tolower(std::ctype<char> *this, char _Ch)
{
  return _Tolower((unsigned __int8)_Ch, &this->_Ctype);
}

//----- (00470370) --------------------------------------------------------
char *__thiscall std::ctype<char>::do_tolower(std::ctype<char> *this, char *_First, const char *_Last)
{
  char *v3; // esi@1
  _Ctypevec *v4; // edi@2

  v3 = _First;
  if ( _First != _Last )
  {
    v4 = &this->_Ctype;
    do
    {
      *v3 = _Tolower((unsigned __int8)*v3, v4);
      ++v3;
    }
    while ( v3 != _Last );
  }
  return v3;
}

//----- (004703A0) --------------------------------------------------------
int __thiscall std::ctype<char>::do_toupper(std::ctype<char> *this, char _Ch)
{
  return _Toupper((unsigned __int8)_Ch, &this->_Ctype);
}

//----- (004703C0) --------------------------------------------------------
char *__thiscall std::ctype<char>::do_toupper(std::ctype<char> *this, char *_First, const char *_Last)
{
  char *v3; // esi@1
  _Ctypevec *v4; // edi@2

  v3 = _First;
  if ( _First != _Last )
  {
    v4 = &this->_Ctype;
    do
    {
      *v3 = _Toupper((unsigned __int8)*v3, v4);
      ++v3;
    }
    while ( v3 != _Last );
  }
  return v3;
}

//----- (00470400) --------------------------------------------------------
const char *__stdcall std::ctype<char>::do_widen(const char *_First, const char *_Last, char *_Dest)
{
  memcpy(_Dest, (char *)_First, _Last - _First);
  return _Last;
}

//----- (00470440) --------------------------------------------------------
const char *__stdcall std::ctype<char>::do_narrow(const char *_First, const char *_Last, char __formal, char *_Dest)
{
  memcpy(_Dest, (char *)_First, _Last - _First);
  return _Last;
}

//----- (00470470) --------------------------------------------------------
std::ctype<char> *__thiscall std::ctype<char>::`vector deleting destructor'(std::ctype<char> *this, unsigned int a2)
{
  std::ctype<char> *v2; // esi@1
  int v3; // eax@1

  v2 = this;
  v3 = this->_Ctype._Delfl;
  this->vfptr = (std::locale::facetVtbl *)&std::ctype<char>::`vftable';
  if ( v3 <= 0 )
  {
    if ( v3 < 0 )
      operator delete[]((void *)this->_Ctype._Table);
  }
  else
  {
    free((void *)this->_Ctype._Table);
  }
  v2->vfptr = (std::locale::facetVtbl *)&std::locale::facet::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97F0D8: using guessed type int (__thiscall *std::locale::facet::`vftable')(void *p, char);
// 97F11C: using guessed type int (__thiscall *std::ctype<char>::`vftable')(void *p, char);

//----- (004704C0) --------------------------------------------------------
void __thiscall std::ios_base::clear(std::ios_base *this, int _State, bool _Reraise)
{
  int v3; // eax@1
  int v4; // ecx@1
  std::_Iostream_error_category *v5; // edi@5
  std::_Iostream_error_category *v6; // edi@8
  std::_Iostream_error_category *v7; // edi@10
  std::exception pExceptionObject; // [sp+0h] [bp-14h]@5
  int v9; // [sp+Ch] [bp-8h]@6
  std::_Iostream_error_category *v10; // [sp+10h] [bp-4h]@6

  v3 = _State & 0x17;
  this->_Mystate = v3;
  v4 = v3 & this->_Except;
  if ( v4 )
  {
    if ( _Reraise )
      _CxxThrowException(0, 0);
    if ( v4 & 4 )
    {
      v5 = std::iostream_category();
      *(_DWORD *)&_Reraise = "ios_base::badbit set";
      std::exception::exception(&pExceptionObject, (const char *const *)&_Reraise);
      v9 = 1;
      v10 = v5;
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::ios_base::failure::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI4_AVfailure_ios_base_std__);
    }
    if ( v4 & 2 )
    {
      v6 = std::iostream_category();
      *(_DWORD *)&_Reraise = "ios_base::failbit set";
      std::exception::exception(&pExceptionObject, (const char *const *)&_Reraise);
      v9 = 1;
      v10 = v6;
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::ios_base::failure::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI4_AVfailure_ios_base_std__);
    }
    v7 = std::iostream_category();
    *(_DWORD *)&_Reraise = "ios_base::eofbit set";
    std::exception::exception(&pExceptionObject, (const char *const *)&_Reraise);
    v9 = 1;
    v10 = v7;
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::ios_base::failure::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI4_AVfailure_ios_base_std__);
  }
}
// 97F150: using guessed type int (__thiscall *std::ios_base::failure::`vftable')(void *p, char);

//----- (004705A0) --------------------------------------------------------
void __thiscall std::runtime_error::runtime_error(std::runtime_error *this, std::runtime_error *__that)
{
  std::runtime_error *v2; // esi@1

  v2 = this;
  std::exception::exception((std::exception *)&this->vfptr, (std::exception *)&__that->vfptr);
  v2->vfptr = (std::exceptionVtbl *)&std::runtime_error::`vftable';
}
// 97F0CC: using guessed type int (__thiscall *std::runtime_error::`vftable')(void *p, char);

//----- (004705C0) --------------------------------------------------------
void __thiscall std::system_error::system_error(std::system_error *this, std::system_error *__that)
{
  std::system_error *v2; // esi@1

  v2 = this;
  std::exception::exception((std::exception *)&this->vfptr, (std::exception *)&__that->vfptr);
  v2->vfptr = (std::exceptionVtbl *)&std::system_error::`vftable';
  v2->_Mycode._Myval = __that->_Mycode._Myval;
  v2->_Mycode._Mycat = __that->_Mycode._Mycat;
}
// 97F144: using guessed type int (__thiscall *std::system_error::`vftable')(void *p, char);

//----- (004705F0) --------------------------------------------------------
void __thiscall std::ios_base::_Init(std::ios_base *this)
{
  std::ios_base *v1; // esi@1
  std::locale *v2; // ebx@1
  unsigned int v3; // eax@2
  std::_Lockit v4; // [sp+Ch] [bp-8h]@2
  std::locale::_Locimp *v5; // [sp+10h] [bp-4h]@2

  v1 = this;
  this->_Ploc = 0;
  this->_Stdstr = 0;
  this->_Except = 0;
  this->_Fmtfl = 513;
  this->_Prec = 6i64;
  this->_Wide = 0i64;
  this->_Arr = 0;
  this->_Calls = 0;
  std::ios_base::clear(this, 0, 0);
  v2 = (std::locale *)operator new(4u);
  if ( v2 )
  {
    v2->_Ptr = std::locale::_Init();
    v5 = std::locale::_Getgloballocale();
    std::_Lockit::_Lockit(&v4, 0);
    v3 = v5->_Refs;
    if ( v3 < 0xFFFFFFFF )
      v5->_Refs = v3 + 1;
    std::_Lockit::~_Lockit(&v4);
    v1->_Ploc = v2;
  }
  else
  {
    v1->_Ploc = 0;
  }
}

//----- (00470680) --------------------------------------------------------
std::ios_base::failure *__thiscall std::system_error::`vector deleting destructor'(std::ios_base::failure *this, unsigned int a2)
{
  std::ios_base::failure *v2; // esi@1

  v2 = this;
  std::exception::~exception((std::bad_cast *)this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (004706B0) --------------------------------------------------------
void __thiscall std::ios_base::failure::failure(std::ios_base::failure *this, std::ios_base::failure *__that)
{
  std::ios_base::failure *v2; // esi@1

  v2 = this;
  std::exception::exception((std::exception *)&this->vfptr, (std::exception *)&__that->vfptr);
  v2->vfptr = (std::exceptionVtbl *)&std::system_error::`vftable';
  v2->_Mycode._Myval = __that->_Mycode._Myval;
  v2->_Mycode._Mycat = __that->_Mycode._Mycat;
  v2->vfptr = (std::exceptionVtbl *)&std::ios_base::failure::`vftable';
}
// 97F144: using guessed type int (__thiscall *std::system_error::`vftable')(void *p, char);
// 97F150: using guessed type int (__thiscall *std::ios_base::failure::`vftable')(void *p, char);

//----- (004706E0) --------------------------------------------------------
void __thiscall std::_Yarn<char>::~_Yarn<char>(std::_Yarn<char> *this)
{
  std::_Yarn<char> *v1; // esi@1

  v1 = this;
  if ( this->_Myptr )
    free(this->_Myptr);
  v1->_Myptr = 0;
}

//----- (00470700) --------------------------------------------------------
void __thiscall std::basic_streambuf<char,std::char_traits<char>>::~basic_streambuf<char,std::char_traits<char>>(std::basic_streambuf<char,std::char_traits<char> > *this)
{
  std::basic_streambuf<char,std::char_traits<char> > *v1; // esi@1
  std::locale *v2; // ebx@1
  std::locale::_Locimp *v3; // edi@2
  unsigned int v4; // eax@3
  int v5; // esi@6
  void (__thiscall ***v6)(_DWORD, _DWORD); // esi@6
  std::_Lockit v7; // [sp+8h] [bp-8h]@3
  std::basic_streambuf<char,std::char_traits<char> > *v8; // [sp+Ch] [bp-4h]@1

  v1 = this;
  v2 = this->_Plocale;
  v8 = this;
  this->vfptr = (std::basic_streambuf<char,std::char_traits<char> >Vtbl *)&std::basic_streambuf<char,std::char_traits<char>>::`vftable';
  if ( v2 )
  {
    v3 = v2->_Ptr;
    if ( v2->_Ptr )
    {
      std::_Lockit::_Lockit(&v7, 0);
      v4 = v3->_Refs;
      if ( v4 && v4 < 0xFFFFFFFF )
        v3->_Refs = v4 - 1;
      v5 = -(v3->_Refs == 0);
      std::_Lockit::~_Lockit(&v7);
      v6 = (void (__thiscall ***)(_DWORD, _DWORD))((unsigned int)v3 & v5);
      if ( v6 )
        (**v6)(v6, 1);
      v1 = v8;
    }
    operator delete(v2);
  }
  std::_Mutex::~_Mutex(&v1->_Mylock);
}
// 97F1A4: using guessed type int (__thiscall *std::basic_streambuf<char,std::char_traits<char>>::`vftable')(void *p, char);

//----- (00470780) --------------------------------------------------------
void __thiscall std::basic_streambuf<char,std::char_traits<char>>::_Lock(std::basic_streambuf<char,std::char_traits<char> > *this)
{
  std::_Mutex::_Lock(&this->_Mylock);
}

//----- (00470790) --------------------------------------------------------
void __thiscall std::basic_streambuf<char,std::char_traits<char>>::_Unlock(std::basic_streambuf<char,std::char_traits<char> > *this)
{
  std::_Mutex::_Unlock(&this->_Mylock);
}

//----- (004707A0) --------------------------------------------------------
int __stdcall std::basic_streambuf<char,std::char_traits<char>>::overflow(int __formal)
{
  return -1;
}

//----- (004707B0) --------------------------------------------------------
__int64 std::basic_streambuf<char,std::char_traits<char>>::showmanyc()
{
  return 0i64;
}

//----- (004707C0) --------------------------------------------------------
std::basic_streambuf<char,std::char_traits<char> > *__thiscall std::basic_streambuf<char,std::char_traits<char>>::setbuf(std::basic_streambuf<char,std::char_traits<char> > *this, char *__formal, __int64 __formala)
{
  return this;
}

//----- (004707D0) --------------------------------------------------------
__int64 __thiscall std::basic_streambuf<char,std::char_traits<char>>::_Pnavail(std::basic_streambuf<char,std::char_traits<char> > *this)
{
  __int64 result; // rax@2

  if ( *this->_IPnext )
    result = *this->_IPcount;
  else
    result = 0i64;
  return result;
}

//----- (004707F0) --------------------------------------------------------
int __thiscall std::basic_streambuf<char,std::char_traits<char>>::uflow(std::basic_streambuf<char,std::char_traits<char> > *this)
{
  std::basic_streambuf<char,std::char_traits<char> > *v1; // esi@1
  int result; // eax@1
  char **v3; // eax@2
  char *v4; // ecx@2

  v1 = this;
  result = ((int (*)(void))this->vfptr->underflow)();
  if ( result != -1 )
  {
    --*v1->_IGcount;
    v3 = v1->_IGnext;
    v4 = (*v3)++;
    result = (unsigned __int8)*v4;
  }
  return result;
}

//----- (00470820) --------------------------------------------------------
__int64 __thiscall std::basic_streambuf<char,std::char_traits<char>>::xsgetn(std::basic_streambuf<char,std::char_traits<char> > *this, char *_Ptr, __int64 _Count)
{
  std::basic_streambuf<char,std::char_traits<char> > *v3; // ebx@1
  __int64 v4; // rax@2
  unsigned int v5; // edi@2
  unsigned int v6; // esi@2
  int v7; // eax@8
  __int64 _Copied; // [sp+4h] [bp-8h]@1

  v3 = this;
  _Copied = 0i64;
  if ( _Count > 0 )
  {
    do
    {
      v4 = std::basic_streambuf<char,std::char_traits<char>>::_Gnavail(v3);
      v5 = HIDWORD(v4);
      v6 = v4;
      if ( SHIDWORD(v4) >= 0 && (SHIDWORD(v4) > 0 || (_DWORD)v4) )
      {
        if ( _Count < v4 )
        {
          v5 = HIDWORD(_Count);
          v6 = _Count;
        }
        memcpy(_Ptr, *v3->_IGnext, v6);
        _Ptr += v6;
        _Copied += __PAIR__(v5, v6);
        _Count -= __PAIR__(v5, v6);
        *v3->_IGcount -= v6;
        *v3->_IGnext += v6;
      }
      else
      {
        v7 = v3->vfptr->uflow(v3);
        if ( v7 == -1 )
          return _Copied;
        ++_Copied;
        *_Ptr++ = v7;
        --_Count;
      }
    }
    while ( SHIDWORD(_Count) > 0 || SHIDWORD(_Count) >= 0 && (_DWORD)_Count );
  }
  return _Copied;
}

//----- (004708F0) --------------------------------------------------------
__int64 __thiscall std::basic_streambuf<char,std::char_traits<char>>::xsputn(std::basic_streambuf<char,std::char_traits<char> > *this, const char *_Ptr, __int64 _Count)
{
  std::basic_streambuf<char,std::char_traits<char> > *v3; // ebx@1
  __int64 v4; // rax@2
  unsigned int v5; // edi@2
  unsigned int v6; // esi@2
  __int64 _Copied; // [sp+4h] [bp-8h]@1

  v3 = this;
  _Copied = 0i64;
  if ( _Count > 0 )
  {
    do
    {
      v4 = std::basic_streambuf<char,std::char_traits<char>>::_Pnavail(v3);
      v5 = HIDWORD(v4);
      v6 = v4;
      if ( SHIDWORD(v4) >= 0 && (SHIDWORD(v4) > 0 || (_DWORD)v4) )
      {
        if ( _Count < v4 )
        {
          v5 = HIDWORD(_Count);
          v6 = _Count;
        }
        memcpy(*v3->_IPnext, (char *)_Ptr, v6);
        _Ptr += v6;
        _Copied += __PAIR__(v5, v6);
        _Count -= __PAIR__(v5, v6);
        *v3->_IPcount -= v6;
        *v3->_IPnext += v6;
      }
      else
      {
        if ( v3->vfptr->overflow(v3, *_Ptr) == -1 )
          return _Copied;
        ++_Ptr;
        ++_Copied;
        --_Count;
      }
    }
    while ( SHIDWORD(_Count) > 0 || SHIDWORD(_Count) >= 0 && (_DWORD)_Count );
  }
  return _Copied;
}

//----- (004709C0) --------------------------------------------------------
std::fpos<int> *__stdcall std::basic_streambuf<char,std::char_traits<char>>::seekoff(std::fpos<int> *result, __int64 __formal, int a4, int a5)
{
  std::fpos<int> *v5; // eax@1

  v5 = result;
  LODWORD(result->_Myoff) = std::_BADOFF;
  HIDWORD(result->_Myoff) = -1;
  result->_Fpos = 0i64;
  result->_Mystate = 0;
  return v5;
}
// 9D56D8: using guessed type const __int64 std::_BADOFF;

//----- (004709F0) --------------------------------------------------------
std::fpos<int> *__stdcall std::basic_streambuf<char,std::char_traits<char>>::seekpos(std::fpos<int> *result, std::fpos<int> __formal, int a4)
{
  std::fpos<int> *v4; // eax@1

  v4 = result;
  LODWORD(result->_Myoff) = std::_BADOFF;
  HIDWORD(result->_Myoff) = -1;
  result->_Fpos = 0i64;
  result->_Mystate = 0;
  return v4;
}
// 9D56D8: using guessed type const __int64 std::_BADOFF;

//----- (00470A20) --------------------------------------------------------
char *__thiscall std::basic_istream<char,std::char_traits<char>>::`vector deleting destructor'(std::basic_istream<char,std::char_traits<char> > *this, unsigned int a2)
{
  char *v2; // esi@1

  v2 = &this[-1].gap10[56];
  *(_DWORD *)&this->gap0[*(_DWORD *)(*(_DWORD *)&this[-1].gap10[56] + 4) - 16] = &std::basic_istream<char,std::char_traits<char>>::`vftable';
  *(_DWORD *)&this->gap0[0] = &std::ios_base::`vftable';
  std::ios_base::_Ios_base_dtor((std::ios_base *)this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97F0E0: using guessed type int (__thiscall *std::ios_base::`vftable')(void *p, char);
// 97F0E8: using guessed type int (__stdcall *std::basic_istream<char,std::char_traits<char>>::`vftable')(char);

//----- (00470A60) --------------------------------------------------------
std::basic_streambuf<char,std::char_traits<char> > *__thiscall std::basic_streambuf<char,std::char_traits<char>>::`vector deleting destructor'(std::basic_streambuf<char,std::char_traits<char> > *this, unsigned int a2)
{
  std::basic_streambuf<char,std::char_traits<char> > *v2; // esi@1

  v2 = this;
  std::basic_streambuf<char,std::char_traits<char>>::~basic_streambuf<char,std::char_traits<char>>(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00470A90) --------------------------------------------------------
void __thiscall std::basic_filebuf<char,std::char_traits<char>>::_Init(std::basic_filebuf<char,std::char_traits<char> > *this, _iobuf *_File, std::basic_filebuf<char,std::char_traits<char> >::_Initfl _Which)
{
  this->_IGfirst = &this->_Gfirst;
  this->_IGnext = &this->_Gnext;
  this->_IPnext = &this->_Pnext;
  this->_Closef = _Which == 1;
  this->_IGcount = &this->_Gcount;
  this->_Wrotesome = 0;
  this->_IPfirst = &this->_Pfirst;
  this->_IPcount = &this->_Pcount;
  this->_Pfirst = 0;
  *this->_IPnext = 0;
  *this->_IPcount = 0;
  *this->_IGfirst = 0;
  *this->_IGnext = 0;
  *this->_IGcount = 0;
  if ( _File )
  {
    this->_IGfirst = &_File->_base;
    this->_IPfirst = &_File->_base;
    this->_IGnext = (char **)_File;
    this->_IPnext = (char **)_File;
    this->_IGcount = &_File->_cnt;
    this->_IPcount = &_File->_cnt;
  }
  this->_Myfile = _File;
  this->_State = `std::basic_filebuf<char,std::char_traits<char>>::_Init'::`2'::_Stinit;
  this->_Pcvt = 0;
}

//----- (00470B30) --------------------------------------------------------
void __thiscall std::basic_streambuf<char,std::char_traits<char>>::basic_streambuf<char,std::char_traits<char>>(std::basic_streambuf<char,std::char_traits<char> > *this)
{
  std::basic_streambuf<char,std::char_traits<char> > *v1; // esi@1
  std::locale *v2; // edi@1
  std::locale::_Locimp *v3; // ebx@2
  unsigned int v4; // eax@2
  std::_Lockit v5; // [sp+14h] [bp-10h]@2
  int v6; // [sp+20h] [bp-4h]@1

  v1 = this;
  this->vfptr = (std::basic_streambuf<char,std::char_traits<char> >Vtbl *)&std::basic_streambuf<char,std::char_traits<char>>::`vftable';
  std::_Mutex::_Mutex(&this->_Mylock);
  v6 = 0;
  v2 = (std::locale *)operator new(4u);
  if ( v2 )
  {
    v2->_Ptr = std::locale::_Init();
    v3 = std::locale::_Getgloballocale();
    std::_Lockit::_Lockit(&v5, 0);
    v4 = v3->_Refs;
    if ( v4 < 0xFFFFFFFF )
      v3->_Refs = v4 + 1;
    std::_Lockit::~_Lockit(&v5);
  }
  else
  {
    v2 = 0;
  }
  v1->_IGfirst = &v1->_Gfirst;
  v1->_IGnext = &v1->_Gnext;
  v1->_IPnext = &v1->_Pnext;
  v1->_Plocale = v2;
  v1->_IPfirst = &v1->_Pfirst;
  v1->_IGcount = &v1->_Gcount;
  v1->_IPcount = &v1->_Pcount;
  v1->_Pfirst = 0;
  *v1->_IPnext = 0;
  *v1->_IPcount = 0;
  *v1->_IGfirst = 0;
  *v1->_IGnext = 0;
  *v1->_IGcount = 0;
}
// 97F1A4: using guessed type int (__thiscall *std::basic_streambuf<char,std::char_traits<char>>::`vftable')(void *p, char);

//----- (00470C20) --------------------------------------------------------
void __thiscall std::_Locinfo::_Locinfo(std::_Locinfo *this, const char *_Pch)
{
  std::_Locinfo *v2; // esi@1
  std::exception pExceptionObject; // [sp+Ch] [bp-1Ch]@2
  std::_Locinfo *v4; // [sp+18h] [bp-10h]@1
  int v5; // [sp+24h] [bp-4h]@1

  v2 = this;
  v4 = this;
  std::_Lockit::_Lockit(&this->_Lock, 0);
  v5 = 0;
  v2->_Days._Myptr = 0;
  v2->_Days._Nul = 0;
  v2->_Months._Myptr = 0;
  v2->_Months._Nul = 0;
  v2->_Oldlocname._Myptr = 0;
  v2->_Oldlocname._Nul = 0;
  v2->_Newlocname._Myptr = 0;
  v2->_Newlocname._Nul = 0;
  LOBYTE(v5) = 4;
  if ( !_Pch )
  {
    _Pch = "bad locale name";
    std::exception::exception(&pExceptionObject, &_Pch);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::runtime_error::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVruntime_error_std__);
  }
  std::_Locinfo::_Locinfo_ctor(v2, _Pch);
}
// 97F0CC: using guessed type int (__thiscall *std::runtime_error::`vftable')(void *p, char);

//----- (00470CD0) --------------------------------------------------------
void __thiscall std::_Locinfo::~_Locinfo(std::_Locinfo *this)
{
  std::_Locinfo *v1; // esi@1

  v1 = this;
  std::_Locinfo::_Locinfo_dtor(this);
  if ( v1->_Newlocname._Myptr )
    free(v1->_Newlocname._Myptr);
  v1->_Newlocname._Myptr = 0;
  if ( v1->_Oldlocname._Myptr )
    free(v1->_Oldlocname._Myptr);
  v1->_Oldlocname._Myptr = 0;
  if ( v1->_Months._Myptr )
    free(v1->_Months._Myptr);
  v1->_Months._Myptr = 0;
  if ( v1->_Days._Myptr )
    free(v1->_Days._Myptr);
  v1->_Days._Myptr = 0;
  std::_Lockit::~_Lockit(&v1->_Lock);
}

//----- (00470D80) --------------------------------------------------------
signed int __cdecl std::ctype<char>::_Getcat(std::locale::facet **_Ppf, std::locale *_Ploc)
{
  char v2; // bl@1
  std::locale::facet *v3; // esi@3
  char *v4; // eax@5
  _Ctypevec *v5; // eax@7
  std::_Locinfo v7; // [sp+Ch] [bp-44h]@7
  _Ctypevec result; // [sp+30h] [bp-20h]@7
  std::locale::facet *v9; // [sp+40h] [bp-10h]@1
  int v10; // [sp+4Ch] [bp-4h]@3

  v2 = 0;
  v9 = 0;
  if ( _Ppf && !*_Ppf )
  {
    v3 = (std::locale::facet *)operator new(0x18u);
    v9 = v3;
    v10 = 0;
    if ( v3 )
    {
      if ( _Ploc->_Ptr->_Name._Myptr )
        v4 = _Ploc->_Ptr->_Name._Myptr;
      else
        v4 = &_Ploc->_Ptr->_Name._Nul;
      std::_Locinfo::_Locinfo(&v7, v4);
      v2 = 1;
      v3->_Refs = 0;
      v3->vfptr = (std::locale::facetVtbl *)&std::ctype<char>::`vftable';
      v5 = _Getctype(&result);
      v3[1].vfptr = (std::locale::facetVtbl *)v5->_Hand;
      v3[1]._Refs = v5->_Page;
      v3[2].vfptr = (std::locale::facetVtbl *)v5->_Table;
      v3[2]._Refs = v5->_Delfl;
    }
    else
    {
      v3 = 0;
    }
    v10 = -1;
    *_Ppf = v3;
    if ( v2 & 1 )
      std::_Locinfo::~_Locinfo(&v7);
  }
  return 2;
}
// 97F11C: using guessed type int (__thiscall *std::ctype<char>::`vftable')(void *p, char);

//----- (00470E60) --------------------------------------------------------
int __thiscall std::basic_streambuf<char,std::char_traits<char>>::snextc(std::basic_streambuf<char,std::char_traits<char> > *this)
{
  std::basic_streambuf<char,std::char_traits<char> > *v1; // esi@1
  char *v2; // eax@1
  char **v3; // esi@3
  int v4; // eax@3
  int result; // eax@3
  int *v6; // edx@5
  char **v7; // eax@6
  char *v8; // ecx@6
  char **v9; // eax@9

  v1 = this;
  v2 = *this->_IGnext;
  if ( !v2 )
    goto LABEL_15;
  if ( *this->_IGcount > 1 )
  {
    --*this->_IGcount;
    v3 = this->_IGnext;
    v4 = (int)(*v3 + 1);
    *v3 = (char *)v4;
    return *(_BYTE *)v4;
  }
  if ( v2 && (v6 = this->_IGcount, *v6 > 0) )
  {
    --*v6;
    v7 = this->_IGnext;
    v8 = (*v7)++;
    result = (unsigned __int8)*v8;
  }
  else
  {
LABEL_15:
    result = this->vfptr->uflow(this);
  }
  if ( result != -1 )
  {
    v9 = v1->_IGnext;
    if ( *v9 && *v1->_IGcount > 0 )
      result = (unsigned __int8)**v9;
    else
      result = v1->vfptr->underflow(v1);
  }
  return result;
}

//----- (00470EE0) --------------------------------------------------------
std::locale::facet *__cdecl std::use_facet<std::ctype<char>>(std::locale *_Loc)
{
  int v1; // ebx@1
  std::locale *v2; // edi@5
  unsigned int v3; // esi@5
  std::locale::_Locimp *v4; // eax@5
  std::locale::facet *v5; // ecx@6
  std::locale::_Locimp *v6; // eax@8
  std::locale::facet *v7; // esi@9
  unsigned int v8; // eax@18
  std::bad_cast pExceptionObject; // [sp+10h] [bp-24h]@16
  std::_Lockit _Lock; // [sp+1Ch] [bp-18h]@1
  std::_Lockit v12; // [sp+20h] [bp-14h]@2
  std::locale::facet *_Psave; // [sp+24h] [bp-10h]@1
  int v14; // [sp+30h] [bp-4h]@1

  std::_Lockit::_Lockit(&_Lock, 0);
  v1 = std::_Facetptr<std::ctype<char>>::_Psave;
  v14 = 0;
  _Psave = (std::locale::facet *)std::_Facetptr<std::ctype<char>>::_Psave;
  if ( !std::ctype<char>::id )
  {
    std::_Lockit::_Lockit(&v12, 0);
    if ( !std::ctype<char>::id )
      std::ctype<char>::id = ++std::locale::id::_Id_cnt;
    std::_Lockit::~_Lockit(&v12);
  }
  v2 = _Loc;
  v3 = std::ctype<char>::id;
  v4 = _Loc->_Ptr;
  if ( std::ctype<char>::id >= _Loc->_Ptr->_Facetcount )
  {
    v5 = 0;
  }
  else
  {
    v5 = v4->_Facetvec[std::ctype<char>::id];
    if ( v5 )
    {
LABEL_11:
      v7 = v5;
LABEL_12:
      if ( v7 )
        goto LABEL_21;
      goto LABEL_13;
    }
  }
  if ( !v4->_Xparent )
    goto LABEL_11;
  v6 = std::locale::_Getgloballocale();
  if ( v3 < v6->_Facetcount )
  {
    v7 = v6->_Facetvec[v3];
    goto LABEL_12;
  }
LABEL_13:
  if ( v1 )
  {
    v7 = (std::locale::facet *)v1;
  }
  else
  {
    if ( std::ctype<char>::_Getcat(&_Psave, v2) == -1 )
    {
      std::bad_cast::bad_cast(&pExceptionObject, "bad cast");
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_cast_std__);
    }
    v7 = _Psave;
    std::_Facetptr<std::ctype<char>>::_Psave = (int)_Psave;
    std::_Lockit::_Lockit((std::_Lockit *)&_Loc, 0);
    v8 = v7->_Refs;
    if ( v8 < 0xFFFFFFFF )
      v7->_Refs = v8 + 1;
    std::_Lockit::~_Lockit((std::_Lockit *)&_Loc);
    std::locale::facet::_Facet_Register(v7);
  }
LABEL_21:
  v14 = -1;
  std::_Lockit::~_Lockit(&_Lock);
  return v7;
}
// A8C5D0: using guessed type int std::_Facetptr<std::ctype<char>>::_Psave;
// B607F0: using guessed type int std::locale::id::_Id_cnt;
// B607F4: using guessed type int std::ctype<char>::id;

//----- (00471020) --------------------------------------------------------
std::basic_istream<char,std::char_traits<char> > *__thiscall std::basic_istream<char,std::char_traits<char>>::seekg(std::basic_istream<char,std::char_traits<char> > *this, __int64 _Off, int _Way)
{
  std::basic_istream<char,std::char_traits<char> > *v3; // esi@1
  int v4; // ecx@1
  int v5; // ecx@3
  int v6; // eax@3
  std::ios_base *v7; // ecx@3
  int v8; // eax@3
  __int64 v10; // [sp+4h] [bp-18h]@2
  int v11; // [sp+Ch] [bp-10h]@2

  v3 = this;
  v4 = *(_DWORD *)(*(_DWORD *)&this->gap0[0] + 4);
  if ( !(*((_BYTE *)&v3->_Chcount + v4 + 4) & 6) )
  {
    (*(void (__stdcall **)(__int64 *, _DWORD, _DWORD, int, signed int))(**(_DWORD **)&v3->gap10[v4 + 40] + 40))(
      &v10,
      _Off,
      HIDWORD(_Off),
      _Way,
      1);
    if ( v10 + v11 == __PAIR__(-1, (unsigned int)std::_BADOFF) )
    {
      v5 = *(_DWORD *)(*(_DWORD *)&v3->gap0[0] + 4);
      v6 = *(_DWORD *)((char *)&v3->_Chcount + v5 + 4);
      v7 = (std::ios_base *)((char *)v3 + v5);
      v8 = v6 | 2;
      if ( !v7[1].vfptr )
        v8 |= 4u;
      std::ios_base::clear(v7, v8, 0);
    }
  }
  return v3;
}
// 9D56D8: using guessed type const __int64 std::_BADOFF;

//----- (004710A0) --------------------------------------------------------
void __thiscall std::basic_filebuf<char,std::char_traits<char>>::_Lock(std::basic_filebuf<char,std::char_traits<char> > *this)
{
  if ( this->_Myfile )
    _lock_file(this->_Myfile);
}

//----- (004710B0) --------------------------------------------------------
void __thiscall std::basic_filebuf<char,std::char_traits<char>>::_Unlock(std::basic_filebuf<char,std::char_traits<char> > *this)
{
  if ( this->_Myfile )
    _unlock_file(this->_Myfile);
}

//----- (004710C0) --------------------------------------------------------
bool __cdecl std::_Fputc<char>(char _Byte, _iobuf *_File)
{
  return fputc(_Byte, _File) != -1;
}

//----- (004710E0) --------------------------------------------------------
int __thiscall std::basic_filebuf<char,std::char_traits<char>>::underflow(std::basic_filebuf<char,std::char_traits<char> > *this)
{
  std::basic_filebuf<char,std::char_traits<char> > *v1; // esi@1
  char *v2; // ecx@1
  int result; // eax@3
  int v4; // edi@4

  v1 = this;
  v2 = *this->_IGnext;
  if ( v2 && v2 < &v2[*v1->_IGcount] )
  {
    result = (unsigned __int8)*v2;
  }
  else
  {
    result = v1->vfptr->uflow((std::basic_streambuf<char,std::char_traits<char> > *)v1);
    v4 = result;
    if ( result != -1 )
    {
      v1->vfptr->pbackfail((std::basic_streambuf<char,std::char_traits<char> > *)v1, result);
      result = v4;
    }
  }
  return result;
}

//----- (00471130) --------------------------------------------------------
int __thiscall std::basic_filebuf<char,std::char_traits<char>>::sync(std::basic_filebuf<char,std::char_traits<char> > *this)
{
  std::basic_filebuf<char,std::char_traits<char> > *v1; // esi@1
  int result; // eax@4

  v1 = this;
  if ( this->_Myfile && ((int (__stdcall *)(signed int))this->vfptr->overflow)(-1) != -1 && fflush(v1->_Myfile) < 0 )
    result = -1;
  else
    result = 0;
  return result;
}

//----- (004711A0) --------------------------------------------------------
int __thiscall std::basic_filebuf<char,std::char_traits<char>>::pbackfail(std::basic_filebuf<char,std::char_traits<char> > *this, int _Meta)
{
  std::basic_filebuf<char,std::char_traits<char> > *v2; // esi@1
  char *v3; // eax@1

  v2 = this;
  v3 = *this->_IGnext;
  if ( v3 && *this->_IGfirst < v3 && (_Meta == -1 || (unsigned __int8)*(v3 - 1) == _Meta) )
  {
    ++*this->_IGcount;
    --*this->_IGnext;
    return _Meta != -1 ? _Meta : 0;
  }
  if ( this->_Myfile && _Meta != -1 )
  {
    if ( !this->_Pcvt && ungetc((unsigned __int8)_Meta, this->_Myfile) != -1 )
      return _Meta;
    if ( (char *)*(std::basic_filebuf<char,std::char_traits<char> > **)v2->_IGnext != &v2->_Mychar )
    {
      v2->_Mychar = _Meta;
      std::basic_filebuf<char,std::char_traits<char>>::_Set_back(v2);
      return _Meta;
    }
  }
  return -1;
}

//----- (00471230) --------------------------------------------------------
std::basic_filebuf<char,std::char_traits<char> > *__thiscall std::basic_filebuf<char,std::char_traits<char>>::setbuf(std::basic_filebuf<char,std::char_traits<char> > *this, char *_Buffer, __int64 _Count)
{
  std::basic_filebuf<char,std::char_traits<char> > *v3; // edi@1
  _iobuf *v4; // ecx@1
  int v5; // eax@4
  std::basic_filebuf<char,std::char_traits<char> > *result; // eax@7

  v3 = this;
  v4 = this->_Myfile;
  if ( !v4 || (_Buffer || _Count ? (v5 = 0) : (v5 = 4), setvbuf(v4, _Buffer, v5, _Count)) )
  {
    result = 0;
  }
  else
  {
    std::basic_filebuf<char,std::char_traits<char>>::_Init(v3, v3->_Myfile, _Openfl);
    result = v3;
  }
  return result;
}

//----- (00471290) --------------------------------------------------------
int __thiscall std::basic_ios<char,std::char_traits<char>>::widen(std::basic_ios<char,std::char_traits<char> > *this, int _Byte)
{
  std::locale *v2; // eax@1
  std::locale::facet *v3; // eax@1
  std::locale::_Locimp *v4; // edi@1
  std::locale::facet *v5; // ebx@1
  unsigned int v6; // eax@2
  int v7; // esi@5
  void (__thiscall ***v8)(_DWORD, _DWORD); // esi@5
  std::_Lockit v10; // [sp+10h] [bp-14h]@2
  std::locale result; // [sp+14h] [bp-10h]@1
  int v12; // [sp+20h] [bp-4h]@1

  v2 = std::ios_base::getloc((std::ios_base *)&this->vfptr, &result);
  v12 = 0;
  v3 = std::use_facet<std::ctype<char>>(v2);
  v4 = result._Ptr;
  v5 = v3;
  v12 = -1;
  if ( result._Ptr )
  {
    std::_Lockit::_Lockit(&v10, 0);
    v6 = v4->_Refs;
    if ( v6 && v6 < 0xFFFFFFFF )
      v4->_Refs = v6 - 1;
    v7 = -(v4->_Refs == 0);
    std::_Lockit::~_Lockit(&v10);
    v8 = (void (__thiscall ***)(_DWORD, _DWORD))((unsigned int)v4 & v7);
    if ( v8 )
      (**v8)(v8, 1);
  }
  return ((int (__cdecl *)(int))v5->vfptr[6].__vecDelDtor)(_Byte);
}

//----- (00471340) --------------------------------------------------------
signed int __cdecl std::codecvt<char,char,int>::_Getcat(std::locale::facet **_Ppf, std::locale *_Ploc)
{
  char v2; // bl@1
  std::locale::facet *v3; // esi@3
  char *v4; // eax@5
  std::_Locinfo v6; // [sp+Ch] [bp-34h]@7
  std::locale::facet *v7; // [sp+30h] [bp-10h]@1
  int v8; // [sp+3Ch] [bp-4h]@3

  v2 = 0;
  v7 = 0;
  if ( _Ppf && !*_Ppf )
  {
    v3 = (std::locale::facet *)operator new(8u);
    v7 = v3;
    v8 = 0;
    if ( v3 )
    {
      if ( _Ploc->_Ptr->_Name._Myptr )
        v4 = _Ploc->_Ptr->_Name._Myptr;
      else
        v4 = &_Ploc->_Ptr->_Name._Nul;
      std::_Locinfo::_Locinfo(&v6, v4);
      v2 = 1;
      v3->_Refs = 0;
      v3->vfptr = (std::locale::facetVtbl *)&std::codecvt<char,char,int>::`vftable';
    }
    else
    {
      v3 = 0;
    }
    v8 = -1;
    *_Ppf = v3;
    if ( v2 & 1 )
      std::_Locinfo::~_Locinfo(&v6);
  }
  return 2;
}
// 97F0F8: using guessed type int (__thiscall *std::codecvt<char,char,int>::`vftable')(void *p, char);

//----- (004713F0) --------------------------------------------------------
std::basic_ostream<char,std::char_traits<char> > *__thiscall std::basic_ostream<char,std::char_traits<char>>::flush(std::basic_ostream<char,std::char_traits<char> > *this)
{
  std::basic_ostream<char,std::char_traits<char> > *v1; // esi@1
  int v2; // eax@1
  signed int v3; // edi@1
  std::ios_base *v4; // ecx@4
  int v5; // eax@5

  v1 = this;
  v2 = *(_DWORD *)(*(_DWORD *)&this->gap0[0] + 4);
  v3 = 0;
  if ( !(this->gap0[v2 + 12] & 6)
    && (*(int (__thiscall **)(_DWORD))(**(_DWORD **)&this->gap0[v2 + 56] + 52))(*(_DWORD *)&this->gap0[v2 + 56]) == -1 )
  {
    v3 = 4;
  }
  v4 = (std::ios_base *)((char *)v1 + *(_DWORD *)(*(_DWORD *)&v1->gap0[0] + 4));
  if ( v3 )
  {
    v5 = v3 | v4->_Mystate;
    if ( !v4[1].vfptr )
      v5 |= 4u;
    std::ios_base::clear(v4, v5, 0);
  }
  return v1;
}

//----- (00471440) --------------------------------------------------------
char __thiscall std::basic_istream<char,std::char_traits<char>>::_Ipfx(std::basic_istream<char,std::char_traits<char> > *this, bool _Noskip)
{
  std::basic_istream<char,std::char_traits<char> > *v2; // esi@1
  int v3; // ecx@1
  int v4; // eax@1
  int v5; // ecx@1
  std::basic_ostream<char,std::char_traits<char> > *v6; // ecx@2
  int v7; // edx@5
  std::locale *v8; // eax@6
  std::locale::facet *v9; // edi@6
  int v10; // ecx@6
  _DWORD *v11; // eax@6
  bool v12; // zf@6
  int v13; // eax@8
  int v14; // ecx@11
  int v15; // eax@11
  std::ios_base *v16; // ecx@11
  int v17; // eax@11
  char result; // al@17
  int v19; // eax@19
  int v20; // [sp+0h] [bp-24h]@1
  std::basic_istream<char,std::char_traits<char> > *v21; // [sp+10h] [bp-14h]@1
  int *v22; // [sp+14h] [bp-10h]@1
  int v23; // [sp+20h] [bp-4h]@6

  v22 = &v20;
  v2 = this;
  v21 = this;
  v3 = *(_DWORD *)(*(_DWORD *)&this->gap0[0] + 4);
  v4 = *(_DWORD *)((char *)&v21->_Chcount + v3 + 4);
  v5 = (int)v21 + v3;
  if ( v4 )
    goto LABEL_24;
  v6 = *(std::basic_ostream<char,std::char_traits<char> > **)(v5 + 60);
  if ( v6 )
    std::basic_ostream<char,std::char_traits<char>>::flush(v6);
  if ( !_Noskip )
  {
    v7 = *(_DWORD *)(*(_DWORD *)&v2->gap0[0] + 4);
    if ( *(_DWORD *)&v2->gap10[v7 + 4] & 1 )
    {
      v8 = std::ios_base::getloc((std::ios_base *)((char *)v2 + v7), (std::locale *)&_Noskip);
      v23 = 0;
      v9 = std::use_facet<std::ctype<char>>(v8);
      std::locale::~locale((std::locale *)&_Noskip);
      v10 = *(_DWORD *)&v2->gap10[*(_DWORD *)(*(_DWORD *)&v2->gap0[0] + 4) + 40];
      v11 = *(_DWORD **)(v10 + 32);
      v12 = *v11 == 0;
      v23 = 1;
      if ( v12 || **(_DWORD **)(v10 + 48) <= 0 )
        v13 = (*(int (**)(void))(*(_DWORD *)v10 + 24))();
      else
        v13 = *(_BYTE *)*v11;
      while ( v13 != -1 )
      {
        if ( !(*((_BYTE *)&v9[2].vfptr->__vecDelDtor + 2 * (unsigned __int8)v13) & 0x48) )
          goto LABEL_15;
        v13 = std::basic_streambuf<char,std::char_traits<char>>::snextc(*(std::basic_streambuf<char,std::char_traits<char> > **)&v2->gap10[*(_DWORD *)(*(_DWORD *)&v2->gap0[0] + 4) + 40]);
      }
      v14 = *(_DWORD *)(*(_DWORD *)&v2->gap0[0] + 4);
      v15 = *(_DWORD *)((char *)&v2->_Chcount + v14 + 4);
      v16 = (std::ios_base *)((char *)v2 + v14);
      v17 = v15 | 1;
      if ( !v16[1].vfptr )
        v17 |= 4u;
      std::ios_base::clear(v16, v17, 0);
LABEL_15:
      v23 = -1;
    }
  }
  v5 = (int)v2 + *(_DWORD *)(*(_DWORD *)&v2->gap0[0] + 4);
  if ( *(_DWORD *)(v5 + 12) )
  {
LABEL_24:
    v19 = *(_DWORD *)(v5 + 12) | 2;
    if ( !*(_DWORD *)(v5 + 56) )
      v19 = *(_DWORD *)(v5 + 12) | 6;
    std::ios_base::clear((std::ios_base *)v5, v19, 0);
    result = 0;
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (004715E0) --------------------------------------------------------
std::locale::facet *__cdecl std::use_facet<std::codecvt<char,char,int>>(std::locale *_Loc)
{
  int v1; // ebx@1
  std::locale *v2; // edi@5
  unsigned int v3; // esi@5
  std::locale::_Locimp *v4; // eax@5
  std::locale::facet *v5; // ecx@6
  std::locale::_Locimp *v6; // eax@8
  std::locale::facet *v7; // esi@9
  unsigned int v8; // eax@18
  std::bad_cast pExceptionObject; // [sp+10h] [bp-24h]@16
  std::_Lockit _Lock; // [sp+1Ch] [bp-18h]@1
  std::_Lockit v12; // [sp+20h] [bp-14h]@2
  std::locale::facet *_Psave; // [sp+24h] [bp-10h]@1
  int v14; // [sp+30h] [bp-4h]@1

  std::_Lockit::_Lockit(&_Lock, 0);
  v1 = std::_Facetptr<std::codecvt<char,char,int>>::_Psave;
  v14 = 0;
  _Psave = (std::locale::facet *)std::_Facetptr<std::codecvt<char,char,int>>::_Psave;
  if ( !std::codecvt<char,char,int>::id )
  {
    std::_Lockit::_Lockit(&v12, 0);
    if ( !std::codecvt<char,char,int>::id )
      std::codecvt<char,char,int>::id = ++std::locale::id::_Id_cnt;
    std::_Lockit::~_Lockit(&v12);
  }
  v2 = _Loc;
  v3 = std::codecvt<char,char,int>::id;
  v4 = _Loc->_Ptr;
  if ( std::codecvt<char,char,int>::id >= _Loc->_Ptr->_Facetcount )
  {
    v5 = 0;
  }
  else
  {
    v5 = v4->_Facetvec[std::codecvt<char,char,int>::id];
    if ( v5 )
    {
LABEL_11:
      v7 = v5;
LABEL_12:
      if ( v7 )
        goto LABEL_21;
      goto LABEL_13;
    }
  }
  if ( !v4->_Xparent )
    goto LABEL_11;
  v6 = std::locale::_Getgloballocale();
  if ( v3 < v6->_Facetcount )
  {
    v7 = v6->_Facetvec[v3];
    goto LABEL_12;
  }
LABEL_13:
  if ( v1 )
  {
    v7 = (std::locale::facet *)v1;
  }
  else
  {
    if ( std::codecvt<char,char,int>::_Getcat(&_Psave, v2) == -1 )
    {
      std::bad_cast::bad_cast(&pExceptionObject, "bad cast");
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_cast_std__);
    }
    v7 = _Psave;
    std::_Facetptr<std::codecvt<char,char,int>>::_Psave = (int)_Psave;
    std::_Lockit::_Lockit((std::_Lockit *)&_Loc, 0);
    v8 = v7->_Refs;
    if ( v8 < 0xFFFFFFFF )
      v7->_Refs = v8 + 1;
    std::_Lockit::~_Lockit((std::_Lockit *)&_Loc);
    std::locale::facet::_Facet_Register(v7);
  }
LABEL_21:
  v14 = -1;
  std::_Lockit::~_Lockit(&_Lock);
  return v7;
}
// A8C5D4: using guessed type int std::_Facetptr<std::codecvt<char,char,int>>::_Psave;
// A8C5D8: using guessed type int std::codecvt<char,char,int>::id;
// B607F0: using guessed type int std::locale::id::_Id_cnt;

//----- (00471720) --------------------------------------------------------
std::basic_istream<char,std::char_traits<char> > *__thiscall std::basic_istream<char,std::char_traits<char>>::read(std::basic_istream<char,std::char_traits<char> > *this, char *_Str, __int64 _Count)
{
  std::basic_istream<char,std::char_traits<char> > *v3; // esi@1
  int v4; // ecx@1
  int (__stdcall *v5)(char *, _DWORD, _DWORD); // eax@4
  __int64 v6; // rax@4
  unsigned __int8 v7; // cf@4
  std::ios_base *v8; // ecx@7
  int v9; // eax@8
  int v10; // ecx@11
  int v12; // [sp+0h] [bp-30h]@1
  std::basic_istream<char,std::char_traits<char> >::sentry _Ok; // [sp+10h] [bp-20h]@1
  int _State; // [sp+18h] [bp-18h]@1
  std::basic_istream<char,std::char_traits<char> > *v15; // [sp+1Ch] [bp-14h]@1
  int *v16; // [sp+20h] [bp-10h]@1
  int v17; // [sp+2Ch] [bp-4h]@3

  v16 = &v12;
  v3 = this;
  v15 = this;
  this->_Chcount = 0i64;
  v4 = *(_DWORD *)&this->gap10[*(_DWORD *)(*(_DWORD *)&this->gap0[0] + 4) + 40];
  _State = 0;
  _Ok._Myistr = v3;
  if ( v4 )
    (*(void (**)(void))(*(_DWORD *)v4 + 4))();
  v17 = 0;
  _Ok._Ok = std::basic_istream<char,std::char_traits<char>>::_Ipfx(v3, 1);
  v17 = 1;
  if ( _Ok._Ok )
  {
    v5 = *(int (__stdcall **)(char *, _DWORD, _DWORD))(**(_DWORD **)&v3->gap10[*(_DWORD *)(*(_DWORD *)&v3->gap0[0] + 4)
                                                                             + 40]
                                                     + 32);
    LOBYTE(v17) = 2;
    LODWORD(v6) = v5(_Str, _Count, HIDWORD(_Count));
    v7 = __CFADD__((_DWORD)v6, v3->_Chcount);
    LODWORD(v3->_Chcount) += v6;
    HIDWORD(v3->_Chcount) += HIDWORD(v6) + v7;
    if ( v6 != _Count )
      _State = 3;
    v17 = 1;
  }
  v8 = (std::ios_base *)((char *)v3 + *(_DWORD *)(*(_DWORD *)&v3->gap0[0] + 4));
  if ( _State )
  {
    v9 = _State | v8->_Mystate;
    if ( !v8[1].vfptr )
      v9 |= 4u;
    std::ios_base::clear(v8, v9, 0);
  }
  v10 = *(_DWORD *)&v3->gap10[*(_DWORD *)(*(_DWORD *)&v3->gap0[0] + 4) + 40];
  v17 = -1;
  if ( v10 )
    (*(void (**)(void))(*(_DWORD *)v10 + 8))();
  return v3;
}

//----- (00471870) --------------------------------------------------------
int __thiscall std::basic_filebuf<char,std::char_traits<char>>::uflow(std::basic_filebuf<char,std::char_traits<char> > *this)
{
  std::basic_filebuf<char,std::char_traits<char> > *v1; // esi@1
  char **v2; // esi@3
  char *v3; // eax@3
  int result; // eax@3
  char **v5; // ecx@5
  char *v6; // eax@6
  int i; // eax@10
  void *v8; // eax@11
  char *v9; // edx@11
  int v10; // eax@13
  const void *v11; // eax@17
  int v12; // esi@19
  _BYTE *v13; // eax@21
  _BYTE *v14; // edi@28
  signed int v15; // edi@30
  int v16; // ecx@31
  int v17; // esi@32
  char *_Dest; // [sp+10h] [bp-38h]@13
  const char *_Src; // [sp+14h] [bp-34h]@13
  char _Ch; // [sp+1Bh] [bp-2Dh]@13
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Str; // [sp+1Ch] [bp-2Ch]@10
  int v22; // [sp+44h] [bp-4h]@10

  v1 = this;
  if ( *this->_IGnext && *this->_IGnext < &(*this->_IGnext)[*this->_IGcount] )
  {
    --*this->_IGcount;
    v2 = this->_IGnext;
    v3 = (*v2)++;
    return (unsigned __int8)*v3;
  }
  if ( this->_Myfile )
  {
    v5 = this->_IGfirst;
    if ( *v5 == &v1->_Mychar )
    {
      v6 = v1->_Set_egptr;
      *v5 = v1->_Set_eback;
      *v1->_IGnext = v6;
      *v1->_IGcount = 0;
    }
    if ( v1->_Pcvt )
    {
      _Str._Myres = 15;
      _Str._Mysize = 0;
      _Str._Bx._Buf[0] = 0;
      v22 = 0;
      for ( i = getc(v1->_Myfile); i != -1; i = getc(v1->_Myfile) )
      {
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&_Str, 1u, i);
        v8 = _Str._Bx._Ptr;
        v9 = _Str._Bx._Ptr;
        if ( _Str._Myres < 0x10 )
        {
          v9 = (char *)&_Str;
          v8 = &_Str;
        }
        v10 = ((int (__stdcall *)(int *, void *, char *, const char **, char *, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *, char **))v1->_Pcvt->vfptr[4].__vecDelDtor)(
                &v1->_State,
                v8,
                &v9[_Str._Mysize],
                &_Src,
                &_Ch,
                &_Str,
                &_Dest);
        if ( v10 < 0 )
          break;
        if ( v10 <= 1 )
        {
          if ( _Dest != &_Ch )
          {
            v14 = _Str._Bx._Ptr;
            if ( _Str._Myres < 0x10 )
              v14 = &_Str;
            v15 = _Str._Mysize + v14 - _Src;
            while ( v15 > 0 )
            {
              v16 = _Src[v15-- - 1];
              ungetc(v16, v1->_Myfile);
            }
            v17 = (unsigned __int8)_Ch;
            std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Str);
            return v17;
          }
          v13 = _Str._Bx._Ptr;
          if ( _Str._Myres < 0x10 )
            v13 = &_Str;
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::erase(&_Str, 0, _Src - v13);
        }
        else
        {
          if ( v10 != 3 )
            break;
          if ( _Str._Mysize >= 1 )
          {
            v11 = _Str._Bx._Ptr;
            if ( _Str._Myres < 0x10 )
              v11 = &_Str;
            memcpy_s(&_Ch, 1u, v11, 1u);
            v12 = (unsigned __int8)_Ch;
            std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Str);
            return v12;
          }
        }
      }
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Str);
    }
    else
    {
      result = getc(v1->_Myfile);
      if ( result != -1 )
        return (unsigned __int8)result;
    }
  }
  return -1;
}

//----- (00471A60) --------------------------------------------------------
void __thiscall std::basic_filebuf<char,std::char_traits<char>>::imbue(std::basic_filebuf<char,std::char_traits<char> > *this, std::locale *_Loc)
{
  std::basic_filebuf<char,std::char_traits<char> > *v2; // edi@1
  std::locale::facet *v3; // esi@1

  v2 = this;
  v3 = std::use_facet<std::codecvt<char,char,int>>(_Loc);
  if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v3->vfptr[1].__vecDelDtor)(v3) )
  {
    v2->_Pcvt = 0;
  }
  else
  {
    v2->_Pcvt = (std::codecvt<char,char,int> *)v3;
    std::basic_streambuf<char,std::char_traits<char>>::_Init((std::basic_streambuf<char,std::char_traits<char> > *)&v2->vfptr);
  }
}

//----- (00471AA0) --------------------------------------------------------
std::basic_filebuf<char,std::char_traits<char> > *__thiscall std::basic_filebuf<char,std::char_traits<char>>::open(std::basic_filebuf<char,std::char_traits<char> > *this, const wchar_t *_Filename, int _Mode, int _Prot)
{
  std::basic_filebuf<char,std::char_traits<char> > *v4; // esi@1
  _iobuf *v5; // eax@2
  std::locale *v6; // eax@3
  std::locale::facet *v7; // edi@3
  std::basic_filebuf<char,std::char_traits<char> > *result; // eax@4

  v4 = this;
  if ( this->_Myfile || (v5 = std::_Fiopen(_Filename, _Mode, _Prot)) == 0 )
  {
    result = 0;
  }
  else
  {
    std::basic_filebuf<char,std::char_traits<char>>::_Init(v4, v5, _Openfl);
    v6 = std::basic_streambuf<char,std::char_traits<char>>::getloc(
           (std::basic_streambuf<char,std::char_traits<char> > *)&v4->vfptr,
           (std::locale *)&_Prot);
    v7 = std::use_facet<std::codecvt<char,char,int>>(v6);
    if ( (unsigned __int8)((int (__thiscall *)(std::locale::facet *))v7->vfptr[1].__vecDelDtor)(v7) )
    {
      v4->_Pcvt = 0;
      std::locale::~locale((std::locale *)&_Prot);
      result = v4;
    }
    else
    {
      v4->_Pcvt = (std::codecvt<char,char,int> *)v7;
      std::basic_streambuf<char,std::char_traits<char>>::_Init((std::basic_streambuf<char,std::char_traits<char> > *)&v4->vfptr);
      std::locale::~locale((std::locale *)&_Prot);
      result = v4;
    }
  }
  return result;
}

//----- (00471B80) --------------------------------------------------------
char __thiscall std::basic_filebuf<char,std::char_traits<char>>::_Endwrite(std::basic_filebuf<char,std::char_traits<char> > *this)
{
  std::basic_filebuf<char,std::char_traits<char> > *v1; // edi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v2; // eax@5
  unsigned int v3; // ebx@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v4; // edx@6
  int v5; // eax@8
  int v6; // eax@9
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *v7; // ecx@10
  char *v8; // ecx@13
  char *v9; // esi@15
  char *_Dest; // [sp+10h] [bp-30h]@8
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Str; // [sp+14h] [bp-2Ch]@4
  int v13; // [sp+3Ch] [bp-4h]@4

  v1 = this;
  if ( !this->_Pcvt || !this->_Wrotesome )
    return 1;
  if ( ((int (__stdcall *)(signed int))this->vfptr->overflow)(-1) == -1 )
    return 0;
  _Str._Myres = 15;
  *(_QWORD *)&_Str._Bx._Buf[0] = 0i64;
  _Str._Mysize = 8;
  _Str._Bx._Buf[8] = 0;
  v13 = 0;
LABEL_5:
  v2 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)_Str._Bx._Ptr;
  v3 = _Str._Myres;
  while ( 1 )
  {
    v4 = v2;
    if ( v3 < 0x10 )
    {
      v4 = &_Str;
      v2 = &_Str;
    }
    v5 = ((int (__stdcall *)(int *, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *, char *, char **))v1->_Pcvt->vfptr[6].__vecDelDtor)(
           &v1->_State,
           v2,
           (char *)v4 + _Str._Mysize,
           &_Dest);
    if ( v5 )
      break;
    v1->_Wrotesome = 0;
LABEL_13:
    v3 = _Str._Myres;
    v2 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)_Str._Bx._Ptr;
    v8 = _Str._Bx._Ptr;
    if ( _Str._Myres < 0x10 )
      v8 = (char *)&_Str;
    v9 = (char *)(_Dest - v8);
    if ( _Dest != v8 )
    {
      if ( _Str._Myres < 0x10 )
        v2 = &_Str;
      if ( v9 != (char *)fwrite(v2, 1u, (unsigned int)v9, v1->_Myfile) )
      {
        v7 = (std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Str;
        goto LABEL_24;
      }
      v3 = _Str._Myres;
      v2 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)_Str._Bx._Ptr;
    }
    if ( !v1->_Wrotesome )
    {
      v7 = (std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Str;
      goto LABEL_27;
    }
    if ( !v9 )
    {
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&_Str, 8u, 0);
      goto LABEL_5;
    }
  }
  v6 = v5 - 1;
  if ( !v6 )
    goto LABEL_13;
  v7 = (std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Str;
  if ( v6 != 2 )
  {
LABEL_24:
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>(v7);
    return 0;
  }
LABEL_27:
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>(v7);
  return 1;
}

//----- (00471CC0) --------------------------------------------------------
int __thiscall std::basic_filebuf<char,std::char_traits<char>>::overflow(std::basic_filebuf<char,std::char_traits<char> > *this, int _Meta)
{
  int result; // eax@1
  std::basic_filebuf<char,std::char_traits<char> > *v3; // esi@1
  char *v4; // edx@2
  int *v5; // ecx@3
  char **v6; // esi@4
  char *v7; // eax@4
  char **v8; // edx@6
  char *v9; // ecx@7
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v10; // eax@12
  unsigned int v11; // ebx@12
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v12; // edx@13
  int v13; // eax@15
  char *v14; // ecx@17
  char *v15; // edi@19
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *v16; // ecx@26
  const char *_Src; // [sp+10h] [bp-38h]@15
  char *_Dest; // [sp+14h] [bp-34h]@15
  int _Ch; // [sp+18h] [bp-30h]@11
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Str; // [sp+1Ch] [bp-2Ch]@11
  int v21; // [sp+44h] [bp-4h]@11

  result = 0;
  v3 = this;
  if ( _Meta != -1 )
  {
    v4 = *this->_IPnext;
    if ( v4 )
    {
      v5 = this->_IPcount;
      if ( v4 < &v4[*v5] )
      {
        --*v5;
        v6 = v3->_IPnext;
        v7 = (*v6)++;
        *v7 = _Meta;
        return _Meta;
      }
    }
    if ( !v3->_Myfile )
      return -1;
    v8 = v3->_IGfirst;
    if ( *v8 == &v3->_Mychar )
    {
      v9 = v3->_Set_egptr;
      *v8 = v3->_Set_eback;
      *v3->_IGnext = v9;
      *v3->_IGcount = 0;
    }
    if ( !v3->_Pcvt )
    {
      if ( fputc((char)_Meta, v3->_Myfile) != -1 )
        return _Meta;
      return -1;
    }
    LOBYTE(_Ch) = _Meta;
    _Str._Myres = 15;
    *(_QWORD *)&_Str._Bx._Buf[0] = 0i64;
    _Str._Mysize = 8;
    _Str._Bx._Buf[8] = 0;
    v21 = 0;
LABEL_12:
    v10 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)_Str._Bx._Ptr;
    v11 = _Str._Myres;
    while ( 1 )
    {
      v12 = v10;
      if ( v11 < 0x10 )
      {
        v12 = &_Str;
        v10 = &_Str;
      }
      v13 = ((int (__stdcall *)(int *, int *, char *, const char **, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *, char *, char **))v3->_Pcvt->vfptr[5].__vecDelDtor)(
              &v3->_State,
              &_Ch,
              (char *)&_Ch + 1,
              &_Src,
              v10,
              (char *)v12 + _Str._Mysize,
              &_Dest);
      if ( v13 < 0 )
        goto LABEL_33;
      if ( v13 > 1 )
        break;
      v11 = _Str._Myres;
      v10 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)_Str._Bx._Ptr;
      v14 = _Str._Bx._Ptr;
      if ( _Str._Myres < 0x10 )
        v14 = (char *)&_Str;
      v15 = (char *)(_Dest - v14);
      if ( _Dest != v14 )
      {
        if ( _Str._Myres < 0x10 )
          v10 = &_Str;
        if ( v15 != (char *)fwrite(v10, 1u, (unsigned int)v15, v3->_Myfile) )
          goto LABEL_33;
        v11 = _Str._Myres;
        v10 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)_Str._Bx._Ptr;
      }
      v3->_Wrotesome = 1;
      if ( (int *)_Src != &_Ch )
      {
        std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Str);
        return _Meta;
      }
      if ( !v15 )
      {
        v16 = (std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Str;
        if ( _Str._Mysize < 0x20 )
        {
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&_Str, 8u, 0);
          goto LABEL_12;
        }
        goto LABEL_34;
      }
    }
    if ( v13 != 3 )
    {
LABEL_33:
      v16 = (std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Str;
LABEL_34:
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>(v16);
      return -1;
    }
    if ( std::_Fputc<char>(_Ch, v3->_Myfile) )
    {
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Str);
      result = _Meta;
    }
    else
    {
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Str);
      result = -1;
    }
  }
  return result;
}

//----- (00471EB0) --------------------------------------------------------
std::fpos<int> *__thiscall std::basic_filebuf<char,std::char_traits<char>>::seekoff(std::basic_filebuf<char,std::char_traits<char> > *this, std::fpos<int> *result, __int64 _Off, int _Way, int __formal)
{
  std::basic_filebuf<char,std::char_traits<char> > *v5; // esi@1
  unsigned int v6; // ebx@4
  unsigned int v7; // edi@4
  char **v8; // ecx@12
  char *v9; // eax@13
  std::fpos<int> *v10; // eax@14
  int v11; // edx@14
  int v12; // ecx@14

  v5 = this;
  if ( (char *)*(std::basic_filebuf<char,std::char_traits<char> > **)this->_IGnext != &this->_Mychar
    || _Way != 1
    || this->_Pcvt )
  {
    v7 = HIDWORD(_Off);
    v6 = _Off;
  }
  else
  {
    v7 = (unsigned __int64)(_Off - 1) >> 32;
    v6 = _Off - 1;
  }
  if ( !this->_Myfile
    || !std::basic_filebuf<char,std::char_traits<char>>::_Endwrite(this)
    || (v7 | v6 || _Way != 1) && _fseeki64(v5->_Myfile, __PAIR__(v7, v6), _Way)
    || fgetpos(v5->_Myfile, &_Off) )
  {
    v10 = result;
    HIDWORD(result->_Myoff) = -1;
    LODWORD(result->_Myoff) = std::_BADOFF;
    result->_Fpos = 0i64;
    result->_Mystate = 0;
  }
  else
  {
    v8 = v5->_IGfirst;
    if ( *v8 == &v5->_Mychar )
    {
      v9 = v5->_Set_egptr;
      *v8 = v5->_Set_eback;
      *v5->_IGnext = v9;
      *v5->_IGcount = 0;
    }
    v10 = result;
    v11 = HIDWORD(_Off);
    LODWORD(result->_Fpos) = _Off;
    v12 = v5->_State;
    result->_Myoff = 0i64;
    HIDWORD(result->_Fpos) = v11;
    result->_Mystate = v12;
  }
  return v10;
}
// 9D56D8: using guessed type const __int64 std::_BADOFF;

//----- (00471FA0) --------------------------------------------------------
std::fpos<int> *__thiscall std::basic_filebuf<char,std::char_traits<char>>::seekpos(std::basic_filebuf<char,std::char_traits<char> > *this, std::fpos<int> *result, std::fpos<int> _Pos, int __formal)
{
  std::basic_filebuf<char,std::char_traits<char> > *v4; // esi@1
  std::fpos<int> *v5; // eax@7
  int v6; // edx@7
  int v7; // ecx@7
  __int64 _Fileposition; // [sp+Ch] [bp-8h]@1

  v4 = this;
  _Fileposition = _Pos._Fpos;
  if ( !this->_Myfile
    || !std::basic_filebuf<char,std::char_traits<char>>::_Endwrite(this)
    || fsetpos(v4->_Myfile, &_Fileposition)
    || _Pos._Myoff && _fseeki64(v4->_Myfile, _Pos._Myoff, 1)
    || fgetpos(v4->_Myfile, &_Fileposition) )
  {
    v5 = result;
    LODWORD(result->_Myoff) = std::_BADOFF;
    HIDWORD(result->_Myoff) = -1;
    result->_Fpos = 0i64;
    result->_Mystate = 0;
  }
  else
  {
    v4->_State = _Pos._Mystate;
    std::basic_filebuf<char,std::char_traits<char>>::_Reset_back(v4);
    v5 = result;
    v6 = HIDWORD(_Fileposition);
    LODWORD(result->_Fpos) = _Fileposition;
    v7 = v4->_State;
    result->_Myoff = 0i64;
    HIDWORD(result->_Fpos) = v6;
    result->_Mystate = v7;
  }
  return v5;
}
// 9D56D8: using guessed type const __int64 std::_BADOFF;

//----- (00472080) --------------------------------------------------------
std::basic_filebuf<char,std::char_traits<char> > *__thiscall std::basic_filebuf<char,std::char_traits<char>>::close(std::basic_filebuf<char,std::char_traits<char> > *this)
{
  std::basic_filebuf<char,std::char_traits<char> > *v1; // esi@1
  std::basic_filebuf<char,std::char_traits<char> > *v2; // edi@1
  int v3; // ecx@6
  std::basic_filebuf<char,std::char_traits<char> > *result; // eax@6

  v1 = this;
  v2 = this;
  if ( !this->_Myfile )
    goto LABEL_9;
  if ( !std::basic_filebuf<char,std::char_traits<char>>::_Endwrite(this) )
    v2 = 0;
  if ( fclose(v1->_Myfile) )
LABEL_9:
    v2 = 0;
  v1->_IGfirst = &v1->_Gfirst;
  v1->_Closef = 0;
  v1->_Wrotesome = 0;
  v1->_IGnext = &v1->_Gnext;
  v1->_IPnext = &v1->_Pnext;
  v1->_IPfirst = &v1->_Pfirst;
  v1->_IGcount = &v1->_Gcount;
  v1->_IPcount = &v1->_Pcount;
  v1->_Pfirst = 0;
  *v1->_IPnext = 0;
  *v1->_IPcount = 0;
  *v1->_IGfirst = 0;
  *v1->_IGnext = 0;
  *v1->_IGcount = 0;
  v1->_Myfile = 0;
  v3 = `std::basic_filebuf<char,std::char_traits<char>>::_Init'::`2'::_Stinit;
  result = v2;
  v1->_Pcvt = 0;
  v1->_State = v3;
  return result;
}

//----- (00472110) --------------------------------------------------------
std::basic_filebuf<char,std::char_traits<char> > *__thiscall std::basic_filebuf<char,std::char_traits<char>>::`scalar deleting destructor'(std::basic_filebuf<char,std::char_traits<char> > *this, unsigned int a2)
{
  std::basic_filebuf<char,std::char_traits<char> > *v2; // esi@1
  char **v3; // ecx@2
  char *v4; // eax@3

  v2 = this;
  this->vfptr = (std::basic_streambuf<char,std::char_traits<char> >Vtbl *)&std::basic_filebuf<char,std::char_traits<char>>::`vftable';
  if ( this->_Myfile )
  {
    v3 = this->_IGfirst;
    if ( *v3 == &v2->_Mychar )
    {
      v4 = v2->_Set_egptr;
      *v3 = v2->_Set_eback;
      *v2->_IGnext = v4;
      *v2->_IGcount = 0;
    }
  }
  if ( v2->_Closef )
    std::basic_filebuf<char,std::char_traits<char>>::close(v2);
  std::basic_streambuf<char,std::char_traits<char>>::~basic_streambuf<char,std::char_traits<char>>((std::basic_streambuf<char,std::char_traits<char> > *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97F204: using guessed type int (__thiscall *std::basic_filebuf<char,std::char_traits<char>>::`vftable')(void *p, char);

//----- (004721B0) --------------------------------------------------------
void __thiscall std::basic_ifstream<char,std::char_traits<char>>::basic_ifstream<char,std::char_traits<char>>(std::basic_ifstream<char,std::char_traits<char> > *this, int a2)
{
  std::basic_ifstream<char,std::char_traits<char> > *v2; // ebx@1
  std::basic_ios<char,std::char_traits<char> > *v3; // edi@3
  char v4; // al@3
  bool v5; // zf@3

  v2 = this;
  if ( a2 )
  {
    *(_DWORD *)&this->gap0[0] = &std::basic_ifstream<char,std::char_traits<char>>::`vbtable';
    *(_DWORD *)&this->gap68[0] = &std::basic_ios<char,std::char_traits<char>>::`vftable';
  }
  *(_DWORD *)&this->gap0[*(_DWORD *)(*(_DWORD *)&this->gap0[0] + 4)] = &std::basic_istream<char,std::char_traits<char>>::`vftable';
  this->_Chcount = 0i64;
  v3 = (std::basic_ios<char,std::char_traits<char> > *)((char *)this + *(_DWORD *)(*(_DWORD *)&this->gap0[0] + 4));
  std::ios_base::_Init((std::ios_base *)((char *)this + *(_DWORD *)(*(_DWORD *)&this->gap0[0] + 4)));
  v3->_Mystrbuf = (std::basic_streambuf<char,std::char_traits<char> > *)v2->gap10;
  v3->_Tiestr = 0;
  v4 = std::basic_ios<char,std::char_traits<char>>::widen(v3, 32);
  v5 = v3->_Mystrbuf == 0;
  v3->_Fillch = v4;
  if ( v5 )
    std::ios_base::clear((std::ios_base *)&v3->vfptr, v3->_Mystate | 4, 0);
  *(_DWORD *)&v2->gap0[*(_DWORD *)(*(_DWORD *)&v2->gap0[0] + 4)] = &std::basic_ifstream<char,std::char_traits<char>>::`vftable';
  std::basic_streambuf<char,std::char_traits<char>>::basic_streambuf<char,std::char_traits<char>>((std::basic_streambuf<char,std::char_traits<char> > *)v2->gap10);
  *(_DWORD *)&v2->gap10[32] = (char *)v2 + 40;
  *(_DWORD *)&v2->gap10[0] = &std::basic_filebuf<char,std::char_traits<char>>::`vftable';
  v2->_Filebuffer[8] = 0;
  v2->_Filebuffer[1] = 0;
  *(_DWORD *)&v2->gap10[16] = (char *)v2 + 24;
  *(_DWORD *)&v2->gap10[36] = (char *)v2 + 44;
  *(_DWORD *)&v2->gap10[48] = (char *)v2 + 56;
  *(_DWORD *)&v2->gap10[20] = (char *)v2 + 28;
  *(_DWORD *)&v2->gap10[52] = (char *)v2 + 60;
  *(_DWORD *)&v2->gap10[12] = 0;
  **(_DWORD **)&v2->gap10[36] = 0;
  **(_DWORD **)&v2->gap10[52] = 0;
  **(_DWORD **)&v2->gap10[16] = 0;
  **(_DWORD **)&v2->gap10[32] = 0;
  **(_DWORD **)&v2->gap10[48] = 0;
  *(_DWORD *)&v2->_Filebuffer[12] = 0;
  *(_DWORD *)&v2->_Filebuffer[4] = `std::basic_filebuf<char,std::char_traits<char>>::_Init'::`2'::_Stinit;
  *(_DWORD *)&v2->gap10[68] = 0;
}
// 97F0E8: using guessed type int (__stdcall *std::basic_istream<char,std::char_traits<char>>::`vftable')(char);
// 97F0F0: using guessed type int (__thiscall *std::basic_ios<char,std::char_traits<char>>::`vftable')(void *p, char);
// 97F204: using guessed type int (__thiscall *std::basic_filebuf<char,std::char_traits<char>>::`vftable')(void *p, char);
// 97F244: using guessed type int (__stdcall *std::basic_ifstream<char,std::char_traits<char>>::`vftable')(char);

//----- (004722E0) --------------------------------------------------------
void __thiscall std::basic_ifstream<char,std::char_traits<char>>::~basic_ifstream<char,std::char_traits<char>>(std::basic_ifstream<char,std::char_traits<char> > *this)
{
  std::basic_filebuf<char,std::char_traits<char> > *v1; // esi@1
  char **v2; // ecx@2
  char *v3; // eax@3

  *(_DWORD *)&this->gap0[*(_DWORD *)(*(_DWORD *)&this[-1].gap10[56] + 4) - 104] = &std::basic_ifstream<char,std::char_traits<char>>::`vftable';
  v1 = (std::basic_filebuf<char,std::char_traits<char> > *)this[-1]._Filebuffer;
  *(_DWORD *)&this[-1]._Filebuffer[0] = &std::basic_filebuf<char,std::char_traits<char>>::`vftable';
  if ( *(_DWORD *)&this[-1].gap68[68] )
  {
    v2 = v1->_IGfirst;
    if ( *v2 == &v1->_Mychar )
    {
      v3 = v1->_Set_egptr;
      *v2 = v1->_Set_eback;
      *v1->_IGnext = v3;
      *v1->_IGcount = 0;
    }
  }
  if ( v1->_Closef )
    std::basic_filebuf<char,std::char_traits<char>>::close(v1);
  std::basic_streambuf<char,std::char_traits<char>>::~basic_streambuf<char,std::char_traits<char>>((std::basic_streambuf<char,std::char_traits<char> > *)&v1->vfptr);
  *(_DWORD *)((char *)v1 + *(_DWORD *)(*(_DWORD *)&v1[-1]._Mychar + 4) - 16) = &std::basic_istream<char,std::char_traits<char>>::`vftable';
}
// 97F0E8: using guessed type int (__stdcall *std::basic_istream<char,std::char_traits<char>>::`vftable')(char);
// 97F204: using guessed type int (__thiscall *std::basic_filebuf<char,std::char_traits<char>>::`vftable')(void *p, char);
// 97F244: using guessed type int (__stdcall *std::basic_ifstream<char,std::char_traits<char>>::`vftable')(char);

//----- (00472390) --------------------------------------------------------
void __thiscall std::basic_ifstream<char,std::char_traits<char>>::`vbase destructor(std::basic_ifstream<char,std::char_traits<char> > *this)
{
  std::ios_base *v1; // esi@1

  v1 = (std::ios_base *)this->gap68;
  std::basic_ifstream<char,std::char_traits<char>>::~basic_ifstream<char,std::char_traits<char>>((std::basic_ifstream<char,std::char_traits<char> > *)((char *)this + 104));
  v1->vfptr = (std::ios_baseVtbl *)&std::ios_base::`vftable';
  std::ios_base::_Ios_base_dtor(v1);
}
// 97F0E0: using guessed type int (__thiscall *std::ios_base::`vftable')(void *p, char);

//----- (004723B0) --------------------------------------------------------
char *__thiscall std::basic_ifstream<char,std::char_traits<char>>::`vector deleting destructor'(std::basic_ifstream<char,std::char_traits<char> > *this, unsigned int a2)
{
  char *v2; // edi@1
  std::ios_base *v3; // esi@1

  v2 = &this[-1].gap10[56];
  v3 = (std::ios_base *)this;
  std::basic_ifstream<char,std::char_traits<char>>::~basic_ifstream<char,std::char_traits<char>>(this);
  v3->vfptr = (std::ios_baseVtbl *)&std::ios_base::`vftable';
  std::ios_base::_Ios_base_dtor(v3);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97F0E0: using guessed type int (__thiscall *std::ios_base::`vftable')(void *p, char);

//----- (004723F0) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__cdecl ClientVersionKeyInfo::getVersionKey(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result)
{
  HMODULE v1; // eax@1
  int v2; // ecx@2
  int v3; // eax@2
  char *v4; // ecx@2
  signed int v5; // eax@2
  int v6; // ecx@4
  int v7; // eax@4
  int v8; // eax@5
  int v9; // ecx@6
  int v10; // eax@6
  int v11; // esi@8
  char *v12; // edi@8
  int v13; // ecx@9
  int v14; // eax@9
  std::ios_base *v15; // ecx@9
  int v16; // eax@9
  unsigned int v17; // ST10_4@12
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v18; // esi@12
  std::basic_ifstream<char,std::char_traits<char> > mFile; // [sp+10h] [bp-2E8h]@1
  int v21; // [sp+C0h] [bp-238h]@6
  int v22; // [sp+C4h] [bp-234h]@7
  int v23; // [sp+C8h] [bp-230h]@6
  int v24; // [sp+CCh] [bp-22Ch]@7
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v25; // [sp+D8h] [bp-220h]@1
  int v26; // [sp+DCh] [bp-21Ch]@1
  wchar_t mFileName[260]; // [sp+E0h] [bp-218h]@1
  int v28; // [sp+2F4h] [bp-4h]@1

  v28 = 0;
  v25 = result;
  v26 = 0;
  std::basic_ifstream<char,std::char_traits<char>>::basic_ifstream<char,std::char_traits<char>>(&mFile, 1);
  v28 = 1;
  v1 = GetModuleHandleW(0);
  GetModuleFileNameW(v1, mFileName, 0x104u);
  if ( std::basic_filebuf<char,std::char_traits<char>>::open(
         (std::basic_filebuf<char,std::char_traits<char> > *)mFile.gap10,
         mFileName,
         33,
         64) )
  {
    v6 = *(_DWORD *)(*(_DWORD *)&mFile.gap0[0] + 4);
    v7 = *(_DWORD *)&mFile.gap10[v6 + 40];
    v4 = &mFile.gap0[v6];
    v5 = v7 != 0 ? 0 : 4;
  }
  else
  {
    v2 = *(_DWORD *)(*(_DWORD *)&mFile.gap0[0] + 4);
    v3 = *(_DWORD *)((char *)&mFile._Chcount + v2 + 4);
    v4 = &mFile.gap0[v2];
    v5 = v3 | 2;
    if ( !*((_DWORD *)v4 + 14) )
      v5 |= 4u;
  }
  std::ios_base::clear((std::ios_base *)v4, v5, 0);
  std::basic_istream<char,std::char_traits<char>>::seekg(
    (std::basic_istream<char,std::char_traits<char> > *)mFile.gap0,
    0i64,
    2);
  v8 = *(_DWORD *)(*(_DWORD *)&mFile.gap0[0] + 4);
  if ( *((_BYTE *)&mFile._Chcount + v8 + 4) & 6 )
  {
    v10 = std::_BADOFF;
    v22 = -1;
    v9 = 0;
    v24 = 0;
  }
  else
  {
    (*(void (__stdcall **)(int *, _DWORD, _DWORD, signed int, signed int))(**(_DWORD **)&mFile.gap10[v8 + 40] + 40))(
      &v21,
      0,
      0,
      1,
      1);
    v9 = v23;
    v10 = v21;
  }
  v11 = v10 + v9;
  std::basic_istream<char,std::char_traits<char>>::seekg(
    (std::basic_istream<char,std::char_traits<char> > *)mFile.gap0,
    0i64,
    0);
  v12 = (char *)operator new[](v11);
  std::basic_istream<char,std::char_traits<char>>::read(
    (std::basic_istream<char,std::char_traits<char> > *)mFile.gap0,
    v12,
    v11);
  if ( !std::basic_filebuf<char,std::char_traits<char>>::close((std::basic_filebuf<char,std::char_traits<char> > *)mFile.gap10) )
  {
    v13 = *(_DWORD *)(*(_DWORD *)&mFile.gap0[0] + 4);
    v14 = *(_DWORD *)((char *)&mFile._Chcount + v13 + 4);
    v15 = (std::ios_base *)((char *)&mFile + v13);
    v16 = v14 | 2;
    if ( !v15[1].vfptr )
      v16 |= 4u;
    std::ios_base::clear(v15, v16, 0);
  }
  v17 = v11;
  v18 = v25;
  CMD5Checksum::GetMD5(v25, v12, v17);
  v26 = 1;
  operator delete[](v12);
  LOBYTE(v28) = 0;
  std::basic_ifstream<char,std::char_traits<char>>::~basic_ifstream<char,std::char_traits<char>>((std::basic_ifstream<char,std::char_traits<char> > *)((char *)&mFile + 104));
  *(_DWORD *)&mFile.gap68[0] = &std::ios_base::`vftable';
  std::ios_base::_Ios_base_dtor((std::ios_base *)mFile.gap68);
  return v18;
}
// 97F0E0: using guessed type int (__thiscall *std::ios_base::`vftable')(void *p, char);
// 9D56D8: using guessed type const __int64 std::_BADOFF;

//----- (00472600) --------------------------------------------------------
void __thiscall AccountFrameWork::OnLoginWorldComplete(AccountFrameWork *this)
{
  PgFrameWork::PostFrameMsgChange((PgFrameWork *)&this->vfptr, CharSelectFrameWorkID, 0);
}

//----- (00472610) --------------------------------------------------------
void AccountFrameWork::OnCharLoginComplete()
{
  PgFrameWork::PostFrameMsgStart(ZoneLoginNetFrameWorkID, 0);
}

//----- (00472620) --------------------------------------------------------
void __thiscall AccountFrameWork::OnZoneLoginComplete(AccountFrameWork *this)
{
  PgFrameWork::PostFrameMsgChange((PgFrameWork *)&this->vfptr, LoadingFrameWorkID, 0);
}

//----- (00472630) --------------------------------------------------------
void AccountFrameWork::OnWrongVersionMsgClose()
{
  NetMgr::SendUserLogOutMsg2AllServer(&g_kNetMgr);
  PgFrameMgr::PostQuitMsg(&Pgg_kFrameMgr, 0);
}

//----- (00472660) --------------------------------------------------------
void AccountFrameWork::Exit()
{
  PgFrameMgr::PostQuitMsg(&Pgg_kFrameMgr, 0);
}

//----- (00472670) --------------------------------------------------------
void __thiscall AccountFrameWork::WorldSelectOk(AccountFrameWork *this)
{
  AccountFrameWork *v1; // esi@1
  signed int v2; // eax@1

  v1 = this;
  v2 = WorldSelectWin::GetSelectedWorldNum(this->m_pkWorldSelectWin);
  if ( v2 >= 0 && !v1->m_bDuringWorldSelect )
  {
    AccountFrameWork::NcUserWorldSelectReq(v1, v2);
    v1->m_bDuringWorldSelect = 1;
  }
}

//----- (004726A0) --------------------------------------------------------
void __thiscall AccountFrameWork::SetResList(AccountFrameWork *this)
{
  this->m_ResList[1].m_uiResWidth = 1024;
  this->m_ResList[1].m_uiResHeight = 768;
  this->m_ResList[2].m_uiResHeight = 768;
  this->m_ResList[4].m_uiResHeight = 1024;
  this->m_ResList[2].m_uiResWidth = 1280;
  this->m_ResList[3].m_uiResWidth = 1280;
  this->m_ResList[4].m_uiResWidth = 1280;
  this->m_ResList[6].m_uiResWidth = 1600;
  this->m_ResList[6].m_uiResHeight = 1200;
  this->m_ResList[7].m_uiResWidth = 1600;
  this->m_ResList[9].m_uiResHeight = 1200;
  this->m_ResList[11].m_uiResWidth = 1280;
  this->m_ResList[0].m_uiResWidth = 800;
  this->m_ResList[0].m_uiResHeight = 600;
  this->m_ResList[0].m_bCheckAdd = 0;
  this->m_ResList[0].m_eAspect = 0;
  this->m_ResList[1].m_bCheckAdd = 0;
  this->m_ResList[1].m_eAspect = 0;
  this->m_ResList[2].m_bCheckAdd = 0;
  this->m_ResList[2].m_eAspect = 1;
  this->m_ResList[3].m_uiResHeight = 960;
  this->m_ResList[3].m_bCheckAdd = 0;
  this->m_ResList[3].m_eAspect = 0;
  this->m_ResList[4].m_bCheckAdd = 0;
  this->m_ResList[4].m_eAspect = 2;
  this->m_ResList[5].m_uiResWidth = 1400;
  this->m_ResList[5].m_uiResHeight = 1050;
  this->m_ResList[5].m_bCheckAdd = 0;
  this->m_ResList[5].m_eAspect = 0;
  this->m_ResList[6].m_bCheckAdd = 0;
  this->m_ResList[6].m_eAspect = 0;
  this->m_ResList[7].m_uiResHeight = 900;
  this->m_ResList[7].m_bCheckAdd = 0;
  this->m_ResList[7].m_eAspect = 4;
  this->m_ResList[8].m_uiResWidth = 1920;
  this->m_ResList[8].m_uiResHeight = 1400;
  this->m_ResList[8].m_bCheckAdd = 0;
  this->m_ResList[8].m_eAspect = 4;
  this->m_ResList[9].m_uiResWidth = 1920;
  this->m_ResList[9].m_bCheckAdd = 0;
  this->m_ResList[9].m_eAspect = 3;
  this->m_ResList[10].m_uiResWidth = 1680;
  this->m_ResList[10].m_uiResHeight = 1050;
  this->m_ResList[10].m_bCheckAdd = 0;
  this->m_ResList[10].m_eAspect = 3;
  this->m_ResList[11].m_uiResHeight = 800;
  this->m_ResList[11].m_bCheckAdd = 0;
  this->m_ResList[11].m_eAspect = 3;
  this->m_ResList[12].m_uiResWidth = 1600;
  this->m_ResList[12].m_uiResHeight = 900;
  this->m_ResList[12].m_bCheckAdd = 0;
  this->m_ResList[12].m_eAspect = 4;
  this->m_ResList[13].m_uiResWidth = 1440;
  this->m_ResList[13].m_uiResHeight = 900;
  this->m_ResList[13].m_bCheckAdd = 0;
  this->m_ResList[13].m_eAspect = 3;
  this->m_ResList[14].m_uiResWidth = 1920;
  this->m_ResList[14].m_uiResHeight = 1080;
  this->m_ResList[14].m_bCheckAdd = 0;
  this->m_ResList[14].m_eAspect = 4;
  this->m_ResList[15].m_uiResWidth = 2560;
  this->m_ResList[15].m_uiResHeight = 1440;
  this->m_ResList[15].m_bCheckAdd = 0;
  this->m_ResList[15].m_eAspect = 4;
  this->m_ResList[16].m_uiResWidth = 3840;
  this->m_ResList[16].m_uiResHeight = 2160;
  this->m_ResList[16].m_bCheckAdd = 0;
  this->m_ResList[16].m_eAspect = 4;
  this->m_ResList[17].m_uiResWidth = 1366;
  this->m_ResList[17].m_uiResHeight = 768;
  this->m_ResList[18].m_uiResHeight = 1440;
  this->m_ResList[17].m_bCheckAdd = 0;
  this->m_ResList[17].m_eAspect = 4;
  this->m_ResList[18].m_uiResWidth = 3440;
  this->m_ResList[18].m_bCheckAdd = 0;
  this->m_ResList[18].m_eAspect = 4;
}

//----- (00472900) --------------------------------------------------------
void __thiscall AccountFrameWork::SetResListDefault(AccountFrameWork *this)
{
  char *v1; // eax@1
  signed int v2; // ecx@1

  v1 = (char *)&this->m_ResList[0].m_bCheckAdd;
  v2 = 21;
  do
  {
    *v1 = 0;
    v1 += 16;
    --v2;
  }
  while ( v2 );
}

//----- (00472920) --------------------------------------------------------
void __thiscall AccountFrameWork::Draw(AccountFrameWork *this)
{
  AccountFrameWork *v1; // esi@1
  CPostProcessEffectManager *v2; // eax@2
  CPostProcessEffectManager *v3; // eax@2
  NiVisibleArray m_kVisible; // [sp+Ch] [bp-B0h]@2
  NiCullingProcess m_kCuller; // [sp+1Ch] [bp-A0h]@2
  int v6; // [sp+B8h] [bp-4h]@2

  v1 = this;
  if ( this->m_spCamera.m_pObject )
  {
    m_kVisible.m_ppkArray = 0;
    m_kVisible.m_uiCurrentSize = 0;
    m_kVisible.m_uiAllocatedSize = 0;
    m_kVisible.m_uiGrowBy = 1024;
    NiVisibleArray::SetAllocatedSize(&m_kVisible, 0x400u);
    v6 = 0;
    NiCullingProcess::NiCullingProcess(&m_kCuller, &m_kVisible);
    LOBYTE(v6) = 1;
    v2 = CPostProcessEffectManager::GetInstance();
    CPostProcessEffectManager::OnRenderSceneStart(v2);
    NiDrawScene(v1->m_spCamera.m_pObject, (NiAVObject *)&v1->m_spBackgroundScene.m_pObject->vfptr, &m_kCuller, 0);
    v3 = CPostProcessEffectManager::GetInstance();
    CPostProcessEffectManager::OnRenderSceneEnd(v3);
    PgWinMgr::Draw(&Pgg_kWinMgr, NiRenderer::ms_pkRenderer);
    LOBYTE(v6) = 0;
    NiCullingProcess::~NiCullingProcess(&m_kCuller);
    operator delete(m_kVisible.m_ppkArray);
  }
}

//----- (00472A30) --------------------------------------------------------
void __thiscall AccountFrameWork::ProcessInput(AccountFrameWork *this)
{
  KeyMap::Process(this->m_spKeyMap.m_pObject);
}

//----- (00472A40) --------------------------------------------------------
void __usercall AccountFrameWork::OpenResolutionPopup(AccountFrameWork *this@<ecx>, unsigned int a2@<edi>)
{
  AccountFrameWork *v2; // ebx@1
  NiDX9SystemDesc *v3; // eax@1
  bool v4; // zf@1
  NiDX9AdapterDesc *v5; // eax@2
  unsigned int v6; // edx@4
  int v7; // esi@4
  unsigned int v8; // edx@5
  NiDX9AdapterDesc::ModeDesc *v9; // eax@7
  unsigned int v10; // ecx@8
  unsigned int v11; // eax@9
  PopupMenu *v12; // eax@12
  bool *v13; // eax@15
  signed int v14; // ecx@15
  unsigned int v15; // ebx@19
  NiDX9AdapterDesc::ModeDesc *v16; // eax@20
  unsigned int v17; // eax@22
  unsigned int v18; // ecx@22
  PopupMenu *v19; // eax@27
  bool *v20; // eax@30
  signed int v21; // ecx@30
  PopupMenu *v22; // eax@33
  unsigned int systemScreenHeight; // [sp+Ch] [bp-14h]@4
  unsigned int systemScreenWidth; // [sp+10h] [bp-10h]@4
  AccountFrameWork *FullResNum; // [sp+14h] [bp-Ch]@1
  unsigned int FullResNuma; // [sp+14h] [bp-Ch]@5
  unsigned int WinResNum; // [sp+18h] [bp-8h]@18
  unsigned int uiModeCount; // [sp+1Ch] [bp-4h]@4

  v2 = this;
  FullResNum = this;
  PgWinMgr::DoModal(&Pgg_kWinMgr, (PgWin *)&this->m_pkPopupMenuWin->vfptr, 0, 0, 0);
  PopupMenuWin::Clear(v2->m_pkPopupMenuWin);
  v3 = NiDX9Renderer::GetSystemDesc();
  v4 = v3->m_kAdapterList.m_uiSize == 0;
  ms_pkInfo_0 = v3;
  if ( v4 )
    v5 = 0;
  else
    v5 = *v3->m_kAdapterList.m_pBase;
  v6 = v5->m_kModeList.m_uiSize;
  ms_pkAdapter_0 = v5;
  uiModeCount = v6;
  systemScreenWidth = GetSystemMetrics(0);
  systemScreenHeight = GetSystemMetrics(1);
  v7 = (int)v2->m_ResList;
  if ( MachineOpt::ms_kGraphicOption.bWindowFullMode )
  {
    v8 = 0;
    FullResNuma = 0;
    do
    {
      a2 = 0;
      if ( uiModeCount )
      {
        do
        {
          v9 = ms_pkAdapter_0->m_kModeList.m_pBase[a2];
          if ( !*(_BYTE *)(v7 + 8) )
          {
            v10 = v9->m_uiWidth;
            if ( v9->m_uiWidth == *(_DWORD *)v7 )
            {
              v11 = v9->m_uiHeight;
              if ( v11 == *(_DWORD *)(v7 + 4) && (v10 != 800 || v11 != 600) )
              {
                v12 = (PopupMenu *)PopupMenuTemplate::AccountFrameGetResolutionMenu(v8);
                PopupMenuWin::AddMenu(v2->m_pkPopupMenuWin, a2, v12);
                v8 = FullResNuma;
                *(_BYTE *)(v7 + 8) = 1;
              }
            }
          }
          ++a2;
        }
        while ( a2 < uiModeCount );
      }
      ++v8;
      v7 += 16;
      FullResNuma = v8;
    }
    while ( v8 < 0x15 );
    v13 = &v2->m_ResList[0].m_bCheckAdd;
    v14 = 21;
    do
    {
      *v13 = 0;
      v13 += 16;
      --v14;
    }
    while ( v14 );
  }
  else
  {
    WinResNum = 0;
    do
    {
      v15 = 0;
      if ( uiModeCount )
      {
        do
        {
          v16 = ms_pkAdapter_0->m_kModeList.m_pBase[v15];
          if ( !*(_BYTE *)(v7 + 8) )
          {
            a2 = v16->m_uiWidth;
            if ( v16->m_uiWidth == *(_DWORD *)v7 )
            {
              v17 = v16->m_uiHeight;
              v18 = *(_DWORD *)(v7 + 4);
              if ( v17 == v18
                && systemScreenWidth >= *(_DWORD *)v7
                && systemScreenHeight >= v18
                && (a2 != 800 || v17 != 600) )
              {
                v19 = (PopupMenu *)PopupMenuTemplate::AccountFrameGetResolutionMenu(WinResNum);
                PopupMenuWin::AddMenu(FullResNum->m_pkPopupMenuWin, a2, v19);
                *(_BYTE *)(v7 + 8) = 1;
              }
            }
          }
          ++v15;
        }
        while ( v15 < uiModeCount );
      }
      v7 += 16;
      ++WinResNum;
    }
    while ( WinResNum < 0x15 );
    v20 = &FullResNum->m_ResList[0].m_bCheckAdd;
    v21 = 21;
    do
    {
      *v20 = 0;
      v20 += 16;
      --v21;
    }
    while ( v21 );
    v2 = FullResNum;
  }
  v22 = PopupMenuTemplate::GetCancelMenu();
  PopupMenuWin::AddMenu(v2->m_pkPopupMenuWin, a2, v22);
  PopupMenuWin::FinishMenu(v2->m_pkPopupMenuWin, 0);
  ((void (__stdcall *)(_DWORD, _DWORD))v2->m_pkPopupMenuWin->vfptr[77].__vecDelDtor)(PgWin::ms_iMsX, PgWin::ms_iMsY);
  PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v2->m_pkPopupMenuWin->vfptr);
}

//----- (00472C50) --------------------------------------------------------
void __thiscall AccountFrameWork::SetOptionResolution(AccountFrameWork *this, unsigned int uiWidth, unsigned int uiHeight)
{
  WorldSelectWin *v3; // eax@1
  WorldSelectOptionSetWin *v4; // esi@2
  char temp[256]; // [sp+4h] [bp-104h]@3

  MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = uiWidth;
  MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = uiHeight;
  v3 = this->m_pkWorldSelectWin;
  if ( v3 )
  {
    v4 = v3->m_pkWorldSelectOptionSetWin;
    if ( v4 )
    {
      sprintf(temp, "%i x %i", uiWidth, uiHeight);
      WorldSelectOptionSetWin::SetResolutionText(v4, temp);
    }
  }
}

//----- (00472CC0) --------------------------------------------------------
void __thiscall AccountFrameWork::ChangeResolution(AccountFrameWork *this)
{
  AccountFrameWork *v1; // esi@1
  double v2; // st7@5
  float v3; // ST2C_4@8
  WorldSelectWin *v4; // ecx@9

  v1 = this;
  if ( this->m_pkBack )
  {
    ((void (__stdcall *)(unsigned int))this->m_pkBack->vfptr[117].__vecDelDtor)(PgWin::ms_uiScreenWidth);
    ((void (__stdcall *)(unsigned int))v1->m_pkBack->vfptr[118].__vecDelDtor)(PgWin::ms_uiScreenHeight);
  }
  if ( v1->m_pkAge12 )
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v1->m_pkAge12->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.89999998,
      0.1);
  v2 = 1.0;
  if ( v1->m_aragon )
  {
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v1->m_aragon->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      1.0,
      1.0);
    v2 = 1.0;
  }
  if ( v1->m_pkPublisherWin )
  {
    v3 = v2;
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v1->m_pkPublisherWin->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.0,
      LODWORD(v3));
  }
  v4 = v1->m_pkWorldSelectWin;
  if ( v4 )
    WorldSelectWin::UpdateWinPos(v4);
}

//----- (00472DA0) --------------------------------------------------------
void __thiscall AccountFrameWork::OnWorldMgrConnectFail(AccountFrameWork *this)
{
  AccountFrameWork *v1; // esi@1
  char *v2; // eax@1

  v1 = this;
  v2 = (char *)TextData::Get(0x40526158u);
  MsgBox::Modal(MSGBOX_OK, v2);
  AccountWin::ActiveInput(v1->m_pkAccountWin);
}

//----- (00472DD0) --------------------------------------------------------
void __thiscall AccountFrameWork::OnLoginWorldFail(AccountFrameWork *this, unsigned int uiwParam)
{
  AccountFrameWork *v2; // esi@1
  NiUnsharedGeometryGroup *v3; // eax@1
  char *v4; // eax@1

  v2 = this;
  v3 = TextData::Get(0x1A1F264Bu);
  v4 = fs("%s error_code: %o", v3, (unsigned __int16)uiwParam);
  MsgBox::Modal(MSGBOX_OK, v4);
  AccountWin::ActiveInput(v2->m_pkAccountWin);
}

//----- (00472E10) --------------------------------------------------------
void __thiscall AccountFrameWork::OnCharLoginFail(AccountFrameWork *this, unsigned int uiwParam)
{
  AccountFrameWork *v2; // esi@1
  char *v3; // eax@1

  v2 = this;
  v3 = (char *)TextData::Get(0x1A1F264Bu);
  MsgBox::Modal(MSGBOX_OK, v3);
  AccountWin::ActiveInput(v2->m_pkAccountWin);
}

//----- (00472E40) --------------------------------------------------------
void __thiscall AccountFrameWork::OnZoneServerConnectFail(AccountFrameWork *this)
{
  AccountFrameWork *v1; // esi@1
  char *v2; // eax@1

  v1 = this;
  v2 = (char *)TextData::Get(0x414F1857u);
  MsgBox::Modal(MSGBOX_OK, v2);
  AccountWin::ActiveInput(v1->m_pkAccountWin);
}

//----- (00472E70) --------------------------------------------------------
void __thiscall AccountFrameWork::OnZoneLoginFail(AccountFrameWork *this, unsigned int uiwParam)
{
  AccountFrameWork *v2; // esi@1
  char *v3; // eax@1

  v2 = this;
  v3 = (char *)TextData::Get(0xD11E2748);
  MsgBox::Modal(MSGBOX_OK, v3);
  AccountWin::ActiveInput(v2->m_pkAccountWin);
}

//----- (00472EA0) --------------------------------------------------------
void __thiscall AccountFrameWork::OnInitializeState(AccountFrameWork *this)
{
  AccountFrameWork *v1; // esi@1

  v1 = this;
  this->m_bDuringWorldSelect = 0;
  if ( g_kServer.m_bCP )
  {
    PgNet::Close((PgNet *)&g_kNetMgr.m_spLogin.m_pObject->vfptr);
    PgNet::Close((PgNet *)&g_kNetMgr.m_spWorldMgr.m_pObject->vfptr);
    PgFrameMgr::PostQuitMsg(&Pgg_kFrameMgr, 0);
    NetMgr::SendUserLogOutMsg2AllServer(&g_kNetMgr);
  }
  else
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkWorldSelectWin->vfptr);
    AccountWin::ActiveInput(v1->m_pkAccountWin);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkAccountWin->vfptr);
  }
}

//----- (00472F10) --------------------------------------------------------
void __thiscall AccountFrameWork::TryUserLogin(AccountFrameWork *this, char *pcID, char *pcPasswd)
{
  AccountFrameWork *v3; // esi@1
  char *v4; // eax@2
  MsgBox *v5; // eax@2
  PgMsg::Frame kOkMsg; // [sp+8h] [bp-2Ch]@3
  PgMsg::Frame kCancelMsg; // [sp+1Ch] [bp-18h]@3

  v3 = this;
  strncpy(g_kUser.m_acUserID, pcID, 0x100u);
  unk_A97190 = 0;
  strncpy(unk_A97191, pcPasswd, 0x10u);
  unk_A971A1 = 0;
  AccountWin::DeactiveInput(v3->m_pkAccountWin);
  if ( !(unsigned __int8)((int (*)(void))v3->m_spLoginNet.m_pObject->vfptr[2].__vecDelDtor)() )
  {
    v4 = (char *)TextData::Get(0xC50DD512);
    v5 = MsgBox::Modal(MSGBOX_OK, v4);
    if ( g_kServer.m_bCP )
    {
      kOkMsg.m_uiFrameMsg = 14;
      kCancelMsg.m_uiFrameMsg = 14;
      MsgBox::SetFrameWorkMsgOnClose(v5, (PgFrameWork *)&v3->vfptr, &kOkMsg, &kCancelMsg);
    }
    else
    {
      AccountWin::ActiveInput(v3->m_pkAccountWin);
    }
  }
}

//----- (00472FE0) --------------------------------------------------------
void __thiscall AccountFrameWork::WorldSelectCancel(AccountFrameWork *this)
{
  AccountFrameWork *v1; // esi@1
  WorldSelectWin *v2; // ST00_4@3
  PgWin *v3; // esi@3

  v1 = this;
  if ( g_kServer.m_bCP )
  {
    PgNet::Close((PgNet *)&g_kNetMgr.m_spLogin.m_pObject->vfptr);
    PgNet::Close((PgNet *)&g_kNetMgr.m_spWorldMgr.m_pObject->vfptr);
    PgFrameMgr::PostQuitMsg(&Pgg_kFrameMgr, 0);
    NetMgr::SendUserLogOutMsg2AllServer(&g_kNetMgr);
  }
  else
  {
    v2 = this->m_pkWorldSelectWin;
    this->m_bDuringWorldSelect = 0;
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
    AccountWin::ActiveInput(v1->m_pkAccountWin);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkAccountWin->vfptr);
    NetMgr::SendUserLogOutMsg2AllServer(&g_kNetMgr);
    v3 = (PgWin *)&v1->m_pkSignUpWin->vfptr;
    if ( v3 )
      PgWinMgr::ShowWin(&Pgg_kWinMgr, v3);
  }
}

//----- (00473070) --------------------------------------------------------
void __thiscall AccountFrameWork::RenderShadow(AccountFrameWork *this)
{
  AccountFrameWork *v1; // eax@1
  NsPgToonExtraData *v2; // ecx@1
  bool v3; // dl@1
  NiTListItem<NiPointer<Shadow> > *v4; // esi@1
  unsigned int v5; // edi@2
  Shadow *v6; // ebx@3
  NiNode **v7; // edx@4
  NiNode *v8; // eax@5
  float bound_4; // ST18_4@5
  float v10; // ecx@5
  float bound_12; // ST20_4@5
  Shadow *v12; // edx@8
  NiPoint3 kCharPos; // [sp+14h] [bp-18h]@5
  NsPgToonExtraData *pkToonExtraData; // [sp+20h] [bp-Ch]@1
  AccountFrameWork *v15; // [sp+24h] [bp-8h]@1
  bool bOldToonFlag; // [sp+2Bh] [bp-1h]@1

  v1 = this;
  v2 = Engine3D::ms_spToonExtraData;
  v3 = Engine3D::ms_spToonExtraData->m_bOn;
  Engine3D::ms_spToonExtraData->m_bOn = 0;
  v4 = v1->m_kShadowList.m_pkHead;
  v15 = v1;
  pkToonExtraData = v2;
  bOldToonFlag = v3;
  if ( v4 )
  {
    v5 = 0;
    if ( v1->m_nMaxShadowObject )
    {
      do
      {
        v6 = v4->m_element.m_pObject;
        v4 = v4->m_pkNext;
        if ( v6 )
        {
          v7 = v1->m_vecShadowObject._Myfirst;
          if ( v1->m_vecShadowObject._Mylast - v7 >= v5 )
            break;
          v8 = v7[v5];
          bound_4 = v8->m_kWorldBound.m_kCenter.y;
          v10 = v8->m_kWorldBound.m_kCenter.z;
          bound_12 = v8->m_kWorldBound.m_fRadius;
          kCharPos.x = v8->m_kWorldBound.m_kCenter.x;
          kCharPos.z = v10;
          kCharPos.y = bound_4;
          Shadow::Render(v6, v7[v5], &kCharPos);
          v6->m_spNode.m_pObject->m_uFlags &= 0xFFFEu;
          v1 = v15;
          v2 = pkToonExtraData;
        }
        ++v5;
      }
      while ( v5 < v1->m_nMaxShadowObject );
    }
    while ( v4 )
    {
      v12 = v4->m_element.m_pObject;
      v4 = v4->m_pkNext;
      v12->m_spNode.m_pObject->m_uFlags |= 1u;
    }
    v2->m_bOn = bOldToonFlag;
  }
}

//----- (00473150) --------------------------------------------------------
void __thiscall AccountFrameWork::SetOptionResolution(AccountFrameWork *this, unsigned int uiParam)
{
  AccountFrameWork *v2; // edx@1
  unsigned int v3; // eax@2
  unsigned int v4; // ecx@2
  WorldSelectWin *v5; // edx@21
  WorldSelectOptionSetWin *v6; // esi@22
  char string; // [sp+0h] [bp-104h]@23

  v2 = this;
  AccountFrameWork::ms_bWindowSizeChanged = 1;
  switch ( uiParam )
  {
    case 0u:
      v3 = 800;
      v4 = 600;
      break;
    case 2u:
      v3 = 1280;
      goto LABEL_20;
    case 3u:
      v3 = 1280;
      v4 = 960;
      break;
    case 4u:
      v3 = 1280;
      v4 = 1024;
      break;
    case 5u:
      v3 = 1400;
      v4 = 1050;
      break;
    case 6u:
      v3 = 1600;
      v4 = 1200;
      break;
    case 7u:
    case 0xCu:
      v3 = 1600;
      v4 = 900;
      break;
    case 8u:
      v3 = 1920;
      v4 = 1440;
      break;
    case 9u:
      v3 = 1920;
      v4 = 1200;
      break;
    case 0xAu:
      v3 = 1680;
      v4 = 1050;
      break;
    case 0xBu:
      v3 = 1280;
      v4 = 800;
      break;
    case 0xDu:
      v3 = 1440;
      v4 = 900;
      break;
    case 0xEu:
      v3 = 1920;
      v4 = 1080;
      break;
    case 0xFu:
      v3 = 2560;
      v4 = 1440;
      break;
    case 0x10u:
      v3 = 3840;
      v4 = 2160;
      break;
    case 0x11u:
      v3 = 1366;
      goto LABEL_20;
    case 0x12u:
      v3 = 3440;
      v4 = 1440;
      break;
    default:
      v3 = 1024;
LABEL_20:
      v4 = 768;
      break;
  }
  MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = v3;
  MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = v4;
  v5 = v2->m_pkWorldSelectWin;
  if ( v5 )
  {
    v6 = v5->m_pkWorldSelectOptionSetWin;
    if ( v6 )
    {
      sprintf(&string, "%i x %i", v3, v4);
      WorldSelectOptionSetWin::SetResolutionText(v6, &string);
    }
  }
}
// A8C5C8: using guessed type bool AccountFrameWork::ms_bWindowSizeChanged;

//----- (00473300) --------------------------------------------------------
void __thiscall AccountFrameWork::Update(AccountFrameWork *this, float fCurTime)
{
  AccountFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  NiNode *v4; // ecx@9
  float fDeltaTime; // ST1C_4@11
  PgNet *v6; // ecx@13
  NiAVObject *v7; // ecx@15
  float v8; // ST20_4@16
  Net *v9; // eax@17
  char *v10; // eax@20
  MsgBox *v11; // eax@20
  char *v12; // eax@21
  Net *v13; // eax@23
  char *v14; // eax@26
  MsgBox *v15; // eax@26
  char *v16; // eax@27
  WorldSelectWin *v17; // ecx@29
  SteamCallback *v18; // ecx@35
  SteamCallback *v19; // eax@36
  struct SteamCallback *v20; // eax@37
  PgMsg::Frame kMsg; // [sp+24h] [bp-38h]@22
  PgMsg::Frame pkFrameMsg; // [sp+38h] [bp-24h]@28
  int v23; // [sp+58h] [bp-4h]@36

  v2 = this;
  v3 = this->m_spLoginNet.m_pObject;
  if ( v3 )
    ((void (__stdcall *)(AccountFrameWork *, signed int))v3->vfptr[4].__vecDelDtor)(v2, 100);
  PgFrameWork::ProcessAllMsg((PgFrameWork *)&v2->vfptr);
  PgWinMgr::ProcessInput(&Pgg_kWinMgr, 1);
  PgWinMgr::DispatchMessageA(&Pgg_kWinMgr);
  PgWinMgr::UpdateWin(&Pgg_kWinMgr, fCurTime);
  KeyMap::Process(v2->m_spKeyMap.m_pObject);
  AccountFrameWork::RenderShadow(v2);
  if ( 0.0 == v2->m_fFrameStartTime )
    v2->m_fFrameStartTime = fCurTime;
  if ( v2->m_pkTimeController )
  {
    if ( g_kSoundMgr.m_pkBGMGroup && !SoundGroupBgm::IsBGMPlaying(g_kSoundMgr.m_pkBGMGroup) )
      SoundMgr::PlayBGM(&g_kSoundMgr, "LoginBackground.mp3");
    v4 = v2->m_pkAniLogo;
    if ( v4 )
    {
      if ( !(v4->m_uFlags & 1) )
      {
        fDeltaTime = fCurTime - v2->m_fFrameStartTime;
        if ( v2->m_pkTimeController->m_fHiKeyTime <= (double)fDeltaTime )
        {
          v4->m_uFlags |= 1u;
          v2->m_pkStaticLogo->m_uFlags &= 0xFFFEu;
        }
      }
    }
  }
  v6 = (PgNet *)&v2->m_spLoginNet.m_pObject->vfptr;
  if ( v6 )
    PgNet::Flush(v6);
  v7 = (NiAVObject *)&v2->m_spBackgroundScene.m_pObject->vfptr;
  if ( v7 )
  {
    v8 = fCurTime - v2->m_fFrameStartTime;
    NiAVObject::Update(v7, v8, 1);
  }
  v9 = v2->m_spLoginNet.m_pObject;
  if ( v9 && v9->m_bCut )
  {
    NetMgr::SendUserLogOutMsg2AllServer(&g_kNetMgr);
    if ( g_kServer.m_bDoubleConnected == 1 )
    {
      v10 = (char *)TextData::Get(0x16526A50u);
      v11 = MsgBox::Modal(MSGBOX_OK, v10);
      g_kServer.m_bDoubleConnected = 0;
    }
    else
    {
      v12 = (char *)TextData::Get(0xD009162F);
      v11 = MsgBox::Modal(MSGBOX_OK, v12);
    }
    kMsg.m_uiFrameMsg = 20;
    MsgBox::SetFrameWorkMsgOnClose(v11, (PgFrameWork *)&v2->vfptr, &kMsg, 0);
  }
  v13 = v2->m_spWorldMgrNet.m_pObject;
  if ( v13 && v13->m_bCut )
  {
    NetMgr::SendUserLogOutMsg2AllServer(&g_kNetMgr);
    if ( g_kServer.m_bDoubleConnected == 1 )
    {
      v14 = (char *)TextData::Get(0x16526A50u);
      v15 = MsgBox::Modal(MSGBOX_OK, v14);
      g_kServer.m_bDoubleConnected = 0;
    }
    else
    {
      v16 = (char *)TextData::Get(0xD3141630);
      v15 = MsgBox::Modal(MSGBOX_OK, v16);
    }
    pkFrameMsg.m_uiFrameMsg = 20;
    MsgBox::SetFrameWorkMsgOnClose(v15, (PgFrameWork *)&v2->vfptr, &pkFrameMsg, 0);
  }
  v17 = v2->m_pkWorldSelectWin;
  if ( v17 && (unsigned __int8)((int (*)(void))v17->vfptr[65].__vecDelDtor)() )
  {
    if ( !(_S3_1 & 1) )
    {
      _S3_1 |= 1u;
      dwPrevTime = timeGetTime();
    }
    if ( timeGetTime() > dwPrevTime + 10000 )
    {
      AccountFrameWork::NcUserWorldStatusReq(v2);
      dwPrevTime = timeGetTime();
    }
  }
  SoundMgr::Update(&g_kSoundMgr, fCurTime, 0);
  v18 = SteamCallback::This;
  if ( !SteamCallback::This )
  {
    v19 = (SteamCallback *)operator new(0x2Cu);
    v23 = 0;
    if ( v19 )
      SteamCallback::SteamCallback(v19);
    else
      v20 = 0;
    v18 = v20;
    v23 = -1;
    SteamCallback::This = v20;
  }
  SteamCallback::Update(v18);
}
// A89D44: using guessed type struct SteamCallback *SteamCallback::This;

//----- (004735D0) --------------------------------------------------------
void __userpurge AccountFrameWork::ProcessMsg(AccountFrameWork *this@<ecx>, unsigned int a2@<edi>, unsigned int uiMsg, unsigned int uiwParam, unsigned int uilParam)
{
  WorldSelectWin *v5; // ecx@16
  WorldSelectOptionSetWin *v6; // esi@17
  WorldSelectWin *v7; // ecx@19
  WorldSelectOptionSetWin *v8; // esi@20
  WorldSelectWin *v9; // ecx@22
  WorldSelectOptionSetWin *v10; // esi@23
  WorldSelectWin *v11; // ecx@25
  WorldSelectOptionSetWin *v12; // esi@26
  WorldSelectWin *v13; // ecx@28
  WorldSelectWin *v14; // ecx@31
  WorldSelectOptionSetWin *v15; // esi@32
  WorldSelectWin *v16; // ecx@34
  WorldSelectOptionSetWin *v17; // esi@35
  WorldSelectWin *v18; // ecx@37
  WorldSelectWin *v19; // ecx@40
  WorldSelectOptionSetWin *v20; // esi@41
  WorldSelectWin *v21; // ecx@43
  WorldSelectOptionSetWin *v22; // esi@44
  WorldSelectWin *v23; // ecx@46
  WorldSelectOptionSetWin *v24; // esi@47
  WorldSelectWin *v25; // ecx@49
  WorldSelectOptionSetWin *v26; // esi@50
  WorldSelectWin *v27; // ecx@52
  WorldSelectOptionSetWin *v28; // esi@53
  WorldSelectWin *v29; // ecx@55
  WorldSelectWin *v30; // ecx@60
  WorldSelectOptionSetWin *v31; // esi@61
  WorldSelectWin *v32; // ecx@63
  WorldSelectOptionSetWin *v33; // esi@64
  WorldSelectWin *v34; // ecx@66
  WorldSelectOptionSetWin *v35; // esi@67
  WorldSelectWin *v36; // ecx@69
  WorldSelectOptionSetWin *v37; // esi@70
  signed int v38; // [sp-8h] [bp-10Ch]@39
  char string; // [sp+0h] [bp-104h]@18

  switch ( uiMsg )
  {
    case 9u:
      AccountFrameWork::OnWorldMgrConnectFail(this);
      break;
    case 0xAu:
      PgFrameWork::PostFrameMsgChange((PgFrameWork *)&this->vfptr, CharSelectFrameWorkID, 0);
      break;
    case 0xBu:
      AccountFrameWork::OnLoginWorldFail(this, uiwParam);
      break;
    case 0xCu:
      PgFrameWork::PostFrameMsgStart(ZoneLoginNetFrameWorkID, 0);
      break;
    case 0xDu:
      AccountFrameWork::OnCharLoginFail(this, uiwParam);
      break;
    case 0xFu:
      AccountFrameWork::OnZoneServerConnectFail(this);
      break;
    case 0x10u:
      PgFrameWork::PostFrameMsgChange((PgFrameWork *)&this->vfptr, LoadingFrameWorkID, 0);
      break;
    case 0x11u:
      AccountFrameWork::OnZoneLoginFail(this, uiwParam);
      break;
    case 0x12u:
      AccountFrameWork::OnWrongVersionMsgClose();
      break;
    case 0x13u:
      AccountFrameWork::NcUserWorldStatusReq(this);
      break;
    case 0x14u:
      AccountFrameWork::OnInitializeState(this);
      break;
    case 0xEu:
      PgFrameMgr::PostQuitMsg(&Pgg_kFrameMgr, 0);
      break;
    case 0x15u:
      AccountFrameWork::OpenResolutionPopup(this, a2);
      break;
    case 0x16u:
      AccountFrameWork::SetOptionResolution(this, 0);
      break;
    case 0x17u:
      AccountFrameWork::ms_bWindowSizeChanged = 1;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = 1024;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = 768;
      v5 = this->m_pkWorldSelectWin;
      if ( v5 )
      {
        v6 = v5->m_pkWorldSelectOptionSetWin;
        if ( v6 )
        {
          sprintf(&string, "%i x %i", 1024, 768);
          WorldSelectOptionSetWin::SetResolutionText(v6, &string);
        }
      }
      break;
    case 0x18u:
      AccountFrameWork::ms_bWindowSizeChanged = 1;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = 1280;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = 768;
      v7 = this->m_pkWorldSelectWin;
      if ( v7 )
      {
        v8 = v7->m_pkWorldSelectOptionSetWin;
        if ( v8 )
        {
          sprintf(&string, "%i x %i", 1280, 768);
          goto LABEL_59;
        }
      }
      break;
    case 0x19u:
      AccountFrameWork::ms_bWindowSizeChanged = 1;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = 1280;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = 960;
      v9 = this->m_pkWorldSelectWin;
      if ( v9 )
      {
        v10 = v9->m_pkWorldSelectOptionSetWin;
        if ( v10 )
        {
          sprintf(&string, "%i x %i", 1280, 960);
          WorldSelectOptionSetWin::SetResolutionText(v10, &string);
        }
      }
      break;
    case 0x1Au:
      AccountFrameWork::ms_bWindowSizeChanged = 1;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = 1280;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = 1024;
      v11 = this->m_pkWorldSelectWin;
      if ( v11 )
      {
        v12 = v11->m_pkWorldSelectOptionSetWin;
        if ( v12 )
        {
          sprintf(&string, "%i x %i", 1280, 1024);
          WorldSelectOptionSetWin::SetResolutionText(v12, &string);
        }
      }
      break;
    case 0x1Bu:
      AccountFrameWork::ms_bWindowSizeChanged = 1;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = 1400;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = 1050;
      v13 = this->m_pkWorldSelectWin;
      if ( v13 )
      {
        v8 = v13->m_pkWorldSelectOptionSetWin;
        if ( v8 )
        {
          sprintf(&string, "%i x %i", 1400, 1050);
          goto LABEL_59;
        }
      }
      break;
    case 0x1Cu:
      AccountFrameWork::ms_bWindowSizeChanged = 1;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = 1600;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = 1200;
      v14 = this->m_pkWorldSelectWin;
      if ( v14 )
      {
        v15 = v14->m_pkWorldSelectOptionSetWin;
        if ( v15 )
        {
          sprintf(&string, "%i x %i", 1600, 1200);
          WorldSelectOptionSetWin::SetResolutionText(v15, &string);
        }
      }
      break;
    case 0x1Du:
      AccountFrameWork::ms_bWindowSizeChanged = 1;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = 1600;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = 900;
      v16 = this->m_pkWorldSelectWin;
      if ( v16 )
      {
        v17 = v16->m_pkWorldSelectOptionSetWin;
        if ( v17 )
        {
          sprintf(&string, "%i x %i", 1600, 900);
          WorldSelectOptionSetWin::SetResolutionText(v17, &string);
        }
      }
      break;
    case 0x1Eu:
      AccountFrameWork::ms_bWindowSizeChanged = 1;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = 1920;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = 1440;
      v18 = this->m_pkWorldSelectWin;
      if ( v18 )
      {
        v8 = v18->m_pkWorldSelectOptionSetWin;
        if ( v8 )
        {
          v38 = 1440;
          goto LABEL_58;
        }
      }
      break;
    case 0x1Fu:
      AccountFrameWork::ms_bWindowSizeChanged = 1;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = 1920;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = 1200;
      v19 = this->m_pkWorldSelectWin;
      if ( v19 )
      {
        v20 = v19->m_pkWorldSelectOptionSetWin;
        if ( v20 )
        {
          sprintf(&string, "%i x %i", 1920, 1200);
          WorldSelectOptionSetWin::SetResolutionText(v20, &string);
        }
      }
      break;
    case 0x20u:
      AccountFrameWork::ms_bWindowSizeChanged = 1;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = 1680;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = 1050;
      v21 = this->m_pkWorldSelectWin;
      if ( v21 )
      {
        v22 = v21->m_pkWorldSelectOptionSetWin;
        if ( v22 )
        {
          sprintf(&string, "%i x %i", 1680, 1050);
          WorldSelectOptionSetWin::SetResolutionText(v22, &string);
        }
      }
      break;
    case 0x21u:
      AccountFrameWork::ms_bWindowSizeChanged = 1;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = 1280;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = 800;
      v23 = this->m_pkWorldSelectWin;
      if ( v23 )
      {
        v24 = v23->m_pkWorldSelectOptionSetWin;
        if ( v24 )
        {
          sprintf(&string, "%i x %i", 1280, 800);
          WorldSelectOptionSetWin::SetResolutionText(v24, &string);
        }
      }
      break;
    case 0x22u:
      AccountFrameWork::ms_bWindowSizeChanged = 1;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = 1600;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = 900;
      v25 = this->m_pkWorldSelectWin;
      if ( v25 )
      {
        v26 = v25->m_pkWorldSelectOptionSetWin;
        if ( v26 )
        {
          sprintf(&string, "%i x %i", 1600, 900);
          WorldSelectOptionSetWin::SetResolutionText(v26, &string);
        }
      }
      break;
    case 0x23u:
      AccountFrameWork::ms_bWindowSizeChanged = 1;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = 1440;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = 900;
      v27 = this->m_pkWorldSelectWin;
      if ( v27 )
      {
        v28 = v27->m_pkWorldSelectOptionSetWin;
        if ( v28 )
        {
          sprintf(&string, "%i x %i", 1440, 900);
          WorldSelectOptionSetWin::SetResolutionText(v28, &string);
        }
      }
      break;
    case 0x24u:
      AccountFrameWork::ms_bWindowSizeChanged = 1;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = 1920;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = 1080;
      v29 = this->m_pkWorldSelectWin;
      if ( v29 )
      {
        v8 = v29->m_pkWorldSelectOptionSetWin;
        if ( v8 )
        {
          v38 = 1080;
LABEL_58:
          sprintf(&string, "%i x %i", 1920, v38);
LABEL_59:
          WorldSelectOptionSetWin::SetResolutionText(v8, &string);
        }
      }
      break;
    case 0x25u:
      AccountFrameWork::ms_bWindowSizeChanged = 1;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = 2560;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = 1440;
      v30 = this->m_pkWorldSelectWin;
      if ( v30 )
      {
        v31 = v30->m_pkWorldSelectOptionSetWin;
        if ( v31 )
        {
          sprintf(&string, "%i x %i", 2560, 1440);
          WorldSelectOptionSetWin::SetResolutionText(v31, &string);
        }
      }
      break;
    case 0x26u:
      AccountFrameWork::ms_bWindowSizeChanged = 1;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = 3840;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = 2160;
      v32 = this->m_pkWorldSelectWin;
      if ( v32 )
      {
        v33 = v32->m_pkWorldSelectOptionSetWin;
        if ( v33 )
        {
          sprintf(&string, "%i x %i", 3840, 2160);
          WorldSelectOptionSetWin::SetResolutionText(v33, &string);
        }
      }
      break;
    case 0x27u:
      AccountFrameWork::ms_bWindowSizeChanged = 1;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = 1366;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = 768;
      v34 = this->m_pkWorldSelectWin;
      if ( v34 )
      {
        v35 = v34->m_pkWorldSelectOptionSetWin;
        if ( v35 )
        {
          sprintf(&string, "%i x %i", 1366, 768);
          WorldSelectOptionSetWin::SetResolutionText(v35, &string);
        }
      }
      break;
    case 0x28u:
      AccountFrameWork::ms_bWindowSizeChanged = 1;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = 3440;
      MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = 1440;
      v36 = this->m_pkWorldSelectWin;
      if ( v36 )
      {
        v37 = v36->m_pkWorldSelectOptionSetWin;
        if ( v37 )
        {
          sprintf(&string, "%i x %i", 3440, 1440);
          WorldSelectOptionSetWin::SetResolutionText(v37, &string);
        }
      }
      break;
    case 0x29u:
      AccountFrameWork::SetOptionResolution(this, 0x13u);
      break;
    default:
      return;
  }
}
// A8C5C8: using guessed type bool AccountFrameWork::ms_bWindowSizeChanged;

//----- (00473F50) --------------------------------------------------------
void __thiscall AccountFrameWork::ApplyTerrain(AccountFrameWork *this, NiNode *pkGroundNode)
{
  NiTListItem<NiPointer<Shadow> > *v2; // ebx@1
  Shadow *v3; // esi@2
  NiNode *v4; // eax@2
  NiNode *v5; // edi@2
  NiCollisionGroup *v6; // ecx@9
  NiNode *v7; // eax@15
  float bound_4; // ST20_4@15
  float bound; // ST1C_4@15
  float bound_8; // ST24_4@15
  AccountFrameWork *v11; // [sp+28h] [bp-Ch]@1
  NiAVObject *pkObject; // [sp+2Ch] [bp-8h]@2
  unsigned int i; // [sp+30h] [bp-4h]@1

  v2 = this->m_kShadowList.m_pkHead;
  v11 = this;
  for ( i = 0; v2; ++i )
  {
    v3 = v2->m_element.m_pObject;
    v4 = v3->m_kDecal.m_spObTerrain.m_pObject;
    v2 = v2->m_pkNext;
    v5 = v4;
    pkObject = (NiAVObject *)&v3->m_kDecal.m_spObTerrain.m_pObject->vfptr;
    if ( v4 != pkGroundNode )
    {
      if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      v3->m_kDecal.m_spObTerrain.m_pObject = pkGroundNode;
      if ( pkGroundNode )
        InterlockedIncrement((volatile LONG *)&pkGroundNode->m_uiRefCount);
    }
    v6 = v3->m_kDecal.m_pkCollisionGroup;
    if ( v6 )
    {
      if ( pkObject )
        NiCollisionGroup::RemoveCollidee(v6, pkObject);
      if ( pkGroundNode )
        NiCollisionGroup::AddCollidee(
          v3->m_kDecal.m_pkCollisionGroup,
          (NiAVObject *)&v3->m_kDecal.m_spObTerrain.m_pObject->vfptr,
          0,
          -1,
          1);
    }
    if ( v11->m_vecShadowObject._Mylast - v11->m_vecShadowObject._Myfirst <= i )
      break;
    v7 = v11->m_vecShadowObject._Myfirst[i];
    bound_4 = v7->m_kWorldBound.m_kCenter.y;
    bound = v7->m_kWorldBound.m_kCenter.x;
    bound_8 = v7->m_kWorldBound.m_kCenter.z;
    if ( v7->m_kWorldBound.m_fRadius > 100.0 )
      NsDecal::SetDecalSize(&v3->m_kDecal, 1200.0, 1200.0);
  }
}

//----- (00474060) --------------------------------------------------------
void __thiscall AccountFrameWork::AccountFrameWork(AccountFrameWork *this)
{
  AccountFrameWork *v1; // esi@1

  v1 = this;
  this->m_pkMsgHooker = 0;
  this->m_uiMessageNum = 0;
  this->vfptr = (IDirectMessengerVtbl *)&PgFrameWork::`vftable';
  this->m_kMsgQ.m_pBase = (PgMsg::Frame *)operator new[](0x14u);
  v1->m_kMsgQ.m_uiTail = 0;
  v1->m_kMsgQ.m_uiAlloced = 1;
  v1->m_kMsgQ.m_uiHead = -1;
  v1->m_BackFrameID = 0;
  v1->m_bInit = 0;
  v1->vfptr = (IDirectMessengerVtbl *)&AccountFrameWork::`vftable';
  v1->m_ReceiveWinList.m_kAllocator.m_uiCount = 0;
  v1->m_ReceiveWinList.m_pkHead = 0;
  v1->m_ReceiveWinList.m_pkTail = 0;
  v1->m_ReceiveWinList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>Vtbl *)&PgTList<PgWin *>::`vftable';
  v1->m_spKeyMap.m_pObject = 0;
  v1->m_spLoginNet.m_pObject = 0;
  v1->m_spWorldMgrNet.m_pObject = 0;
  v1->m_spBackgroundScene.m_pObject = 0;
  v1->m_spCamera.m_pObject = 0;
  v1->m_spShadowScene.m_pObject = 0;
  v1->m_kShadowList.m_kAllocator.m_uiCount = 0;
  v1->m_kShadowList.m_pkHead = 0;
  v1->m_kShadowList.m_pkTail = 0;
  v1->m_kShadowList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> >Vtbl *)&PgTList<NiPointer<Shadow>>::`vftable';
  v1->m_vecBGObjectNode._Myfirst = 0;
  v1->m_vecBGObjectNode._Mylast = 0;
  v1->m_vecBGObjectNode._Myend = 0;
  v1->m_vecShadowObject._Myfirst = 0;
  v1->m_vecShadowObject._Mylast = 0;
  v1->m_vecShadowObject._Myend = 0;
  v1->m_pkBack = 0;
  v1->m_pkAge12 = 0;
  v1->m_aragon = 0;
  v1->m_pkAccountWin = 0;
  v1->m_pkWorldSelectWin = 0;
  v1->m_bDuringWorldSelect = 0;
  v1->m_bFirstRun = 1;
  v1->m_OTP.n8_code[0] = 0;
  v1->m_OTP.n8_code[1] = 0;
  v1->m_OTP.n8_code[2] = 0;
  v1->m_OTP.n8_code[3] = 0;
  v1->m_OTP.n8_code[4] = 0;
  v1->m_OTP.n8_code[5] = 0;
  v1->m_OTP.n8_code[6] = 0;
  v1->m_OTP.n8_code[7] = 0;
}
// 970534: using guessed type void (__thiscall *PgFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97057C: using guessed type int (__thiscall *PgTList<NiPointer<Shadow>>::`vftable')(void *p, char);
// 97F2C8: using guessed type int (__thiscall *PgTList<PgWin *>::`vftable')(void *p, char);
// 97F2DC: using guessed type void (__thiscall *AccountFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);

//----- (00474160) --------------------------------------------------------
void __thiscall AccountFrameWork::~AccountFrameWork(AccountFrameWork *this)
{
  AccountFrameWork *v1; // edi@1
  int v2; // esi@5
  NiTListItem<NiPointer<Shadow> > **v3; // ebx@5
  NiTListItem<NiPointer<Shadow> > **v4; // ST00_4@6
  NiNode *v5; // esi@7
  NiCamera *v6; // esi@11
  NiSortAdjustNode *v7; // esi@15
  Net *v8; // esi@19
  Net *v9; // esi@23
  KeyMap *v10; // esi@27
  int v11; // ebx@31
  NiTListItem<PgWin *> **v12; // esi@31
  NiTListItem<PgWin *> **v13; // ST00_4@32
  PgMsg::Frame *v14; // ST00_4@33

  v1 = this;
  this->vfptr = (IDirectMessengerVtbl *)&AccountFrameWork::`vftable';
  this->m_bDuringWorldSelect = 0;
  if ( this->m_vecShadowObject._Myfirst )
    operator delete(this->m_vecShadowObject._Myfirst);
  v1->m_vecShadowObject._Myfirst = 0;
  v1->m_vecShadowObject._Mylast = 0;
  v1->m_vecShadowObject._Myend = 0;
  if ( v1->m_vecBGObjectNode._Myfirst )
    operator delete(v1->m_vecBGObjectNode._Myfirst);
  v1->m_vecBGObjectNode._Myfirst = 0;
  v1->m_vecBGObjectNode._Mylast = 0;
  v1->m_vecBGObjectNode._Myend = 0;
  v2 = (int)&v1->m_kShadowList;
  v1->m_kShadowList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> >Vtbl *)&PgTList<NiPointer<Shadow>>::`vftable';
  v3 = &v1->m_kShadowList.m_pkHead->m_pkNext;
  while ( v3 )
  {
    v4 = v3;
    v3 = (NiTListItem<NiPointer<Shadow> > **)*v3;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v2 + 8))(&v1->m_kShadowList, v4);
  }
  v1->m_kShadowList.m_kAllocator.m_uiCount = 0;
  v1->m_kShadowList.m_pkHead = 0;
  v1->m_kShadowList.m_pkTail = 0;
  *(_DWORD *)v2 = &NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable';
  v5 = v1->m_spShadowScene.m_pObject;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  v6 = v1->m_spCamera.m_pObject;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  v7 = v1->m_spBackgroundScene.m_pObject;
  if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  v8 = v1->m_spWorldMgrNet.m_pObject;
  if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
    v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
  v9 = v1->m_spLoginNet.m_pObject;
  if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
    v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
  v10 = v1->m_spKeyMap.m_pObject;
  if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
    v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
  v11 = (int)&v1->m_ReceiveWinList;
  v1->m_ReceiveWinList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>Vtbl *)&PgTList<PgWin *>::`vftable';
  v12 = &v1->m_ReceiveWinList.m_pkHead->m_pkNext;
  while ( v12 )
  {
    v13 = v12;
    v12 = (NiTListItem<PgWin *> **)*v12;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v11 + 8))(&v1->m_ReceiveWinList, v13);
  }
  v1->m_ReceiveWinList.m_kAllocator.m_uiCount = 0;
  v1->m_ReceiveWinList.m_pkHead = 0;
  v1->m_ReceiveWinList.m_pkTail = 0;
  *(_DWORD *)v11 = &NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`vftable';
  v14 = v1->m_kMsgQ.m_pBase;
  v1->vfptr = (IDirectMessengerVtbl *)&PgFrameWork::`vftable';
  operator delete[](v14);
}
// 9703D4: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable')(void *p, char);
// 970534: using guessed type void (__thiscall *PgFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97057C: using guessed type int (__thiscall *PgTList<NiPointer<Shadow>>::`vftable')(void *p, char);
// 97F298: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`vftable')(void *p, char);
// 97F2C8: using guessed type int (__thiscall *PgTList<PgWin *>::`vftable')(void *p, char);
// 97F2DC: using guessed type void (__thiscall *AccountFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);

//----- (00474370) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>::~NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>(NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`vftable';
}
// 97F298: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`vftable')(void *p, char);

//----- (00474380) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 97F298: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`vftable')(void *p, char);

//----- (004743B0) --------------------------------------------------------
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWin *>::NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWin *>(NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWin *> *this)
{
  this->m_kAllocator.m_uiCount = 0;
  this->m_pkHead = 0;
  this->m_pkTail = 0;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`vftable';
}
// 97F2A8: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`vftable')(void *p, char);

//----- (004743D0) --------------------------------------------------------
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWin *>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWin *>(NiTPointerList<PgWin *> *this)
{
  NiTPointerList<PgWin *> *v1; // edi@1
  NiTListItem<PgWin *> *v2; // esi@1
  NiTListItem<PgWin *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`vftable';
}
// 97F298: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`vftable')(void *p, char);
// 97F2A8: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`vftable')(void *p, char);

//----- (00474450) --------------------------------------------------------
void __thiscall NiTPointerList<PgWin *>::NiTPointerList<PgWin *>(NiTPointerList<PgWin *> *this)
{
  this->m_kAllocator.m_uiCount = 0;
  this->m_pkHead = 0;
  this->m_pkTail = 0;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>Vtbl *)&NiTPointerList<PgWin *>::`vftable';
}
// 97F2B8: using guessed type int (__thiscall *NiTPointerList<PgWin *>::`vftable')(void *p, char);

//----- (00474470) --------------------------------------------------------
NiTPointerList<PgWin *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`vector deleting destructor'(NiTPointerList<PgWin *> *this, unsigned int a2)
{
  NiTPointerList<PgWin *> *v2; // edi@1
  NiTListItem<PgWin *> *v3; // esi@1
  NiTListItem<PgWin *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97F298: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`vftable')(void *p, char);
// 97F2A8: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`vftable')(void *p, char);

//----- (00474500) --------------------------------------------------------
void __thiscall PgTList<PgWin *>::~PgTList<PgWin *>(PgTList<PgWin *> *this)
{
  PgTList<PgWin *> *v1; // edi@1
  NiTListItem<PgWin *> *v2; // esi@1
  NiTListItem<PgWin *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>Vtbl *)&PgTList<PgWin *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`vftable';
}
// 97F298: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`vftable')(void *p, char);
// 97F2C8: using guessed type int (__thiscall *PgTList<PgWin *>::`vftable')(void *p, char);

//----- (00474580) --------------------------------------------------------
PgTList<PgWin *> *__thiscall PgTList<PgWin *>::`vector deleting destructor'(PgTList<PgWin *> *this, unsigned int a2)
{
  PgTList<PgWin *> *v2; // edi@1
  NiTListItem<PgWin *> *v3; // esi@1
  NiTListItem<PgWin *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>Vtbl *)&PgTList<PgWin *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97F298: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>::`vftable')(void *p, char);
// 97F2C8: using guessed type int (__thiscall *PgTList<PgWin *>::`vftable')(void *p, char);

//----- (00474610) --------------------------------------------------------
NiRTTI *AccountFrameWork::GetRTTI()
{
  return &AccountFrameWork::m_RTTI;
}

//----- (00474620) --------------------------------------------------------
const char *AccountFrameWork::GetFrameWorkName()
{
  return AccountFrameWork::m_RTTI.m_pcName;
}

//----- (00474630) --------------------------------------------------------
AccountFrameWork *__thiscall AccountFrameWork::`scalar deleting destructor'(AccountFrameWork *this, unsigned int a2)
{
  AccountFrameWork *v2; // esi@1

  v2 = this;
  AccountFrameWork::~AccountFrameWork(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00474670) --------------------------------------------------------
int __thiscall LoginWorldNetFrameWork::On_NC_USER_LOGINWORLDFAIL_ACK(LoginWorldNetFrameWork *this, int iRevBytes, void *pvData)
{
  unsigned int v3; // eax@1
  LoginWorldNetFrameWork *v4; // esi@1
  PgMsg::Frame kMsg; // [sp+4h] [bp-18h]@1

  v3 = *(_WORD *)pvData;
  v4 = this;
  kMsg.m_uiFrameMsg = 11;
  kMsg.m_uiFrameWParam = v3;
  PgFrameWork::PostMsgToFrameWork(AccountFrameWorkID, &kMsg);
  PgFrameWork::PostFrameMsgTerminate((PgFrameWork *)&v4->vfptr);
  return iRevBytes;
}

//----- (004746C0) --------------------------------------------------------
void __thiscall LoginWorldNetFrameWork::Terminate(LoginWorldNetFrameWork *this)
{
  this->m_bInit = 0;
  this->m_BackFrameID = 0;
}

//----- (004746D0) --------------------------------------------------------
void __thiscall LoginWorldNetFrameWork::Update(LoginWorldNetFrameWork *this, float fCurTime)
{
  LoginWorldNetFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@3
  Net *v5; // eax@5

  v2 = this;
  v3 = this->m_spWorldMgrNet.m_pObject;
  if ( v3 )
    ((void (__stdcall *)(_DWORD, _DWORD))v3->vfptr[4].__vecDelDtor)(v2, 100);
  PgFrameWork::ProcessAllMsg((PgFrameWork *)&v2->vfptr);
  v4 = (PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr;
  if ( v4 )
    PgNet::Flush(v4);
  v5 = v2->m_spWorldMgrNet.m_pObject;
  if ( v5 )
  {
    if ( v5->m_bCut )
      PgFrameWork::PostFrameMsgTerminate((PgFrameWork *)&v2->vfptr);
  }
}

//----- (00474710) --------------------------------------------------------
void __thiscall LoginWorldNetFrameWork::OnConnectWorldMgr(LoginWorldNetFrameWork *this)
{
  LoginWorldNetFrameWork *v1; // esi@1
  PgMsg::Frame kMsg; // [sp+4h] [bp-18h]@2

  v1 = this;
  if ( !(unsigned __int8)((int (*)(void))this->m_spWorldMgrNet.m_pObject->vfptr[2].__vecDelDtor)() )
  {
    kMsg.m_uiFrameMsg = 9;
    PgFrameWork::PostMsgToFrameWork(AccountFrameWorkID, &kMsg);
    PgFrameWork::PostFrameMsgTerminate((PgFrameWork *)&v1->vfptr);
  }
}

//----- (00474760) --------------------------------------------------------
int __thiscall LoginWorldNetFrameWork::On_NC_USER_LOGINWORLD_ACK(LoginWorldNetFrameWork *this, int iRevBytes, void *pvData)
{
  LoginWorldNetFrameWork *v3; // esi@1
  PgMsg::Frame kMsg; // [sp+4h] [bp-18h]@1

  v3 = this;
  g_kServer.m_kWorldMgrHandle = *(_WORD *)pvData;
  User::SetAvatarInfo(&g_kUser, (PROTO_AVATARINFORMATION *)((char *)pvData + 3), *((_BYTE *)pvData + 2));
  kMsg.m_uiFrameMsg = 10;
  PgFrameWork::PostMsgToFrameWork(AccountFrameWorkID, &kMsg);
  PgFrameWork::PostFrameMsgTerminate((PgFrameWork *)&v3->vfptr);
  Net::NcMiscGameTimeReq(v3->m_spWorldMgrNet.m_pObject);
  return iRevBytes;
}

//----- (004747D0) --------------------------------------------------------
void __thiscall LoginWorldNetFrameWork::LoginWorldNetFrameWork(LoginWorldNetFrameWork *this)
{
  LoginWorldNetFrameWork *v1; // esi@1

  v1 = this;
  this->m_pkMsgHooker = 0;
  this->m_uiMessageNum = 0;
  this->vfptr = (IDirectMessengerVtbl *)&PgFrameWork::`vftable';
  this->m_kMsgQ.m_pBase = (PgMsg::Frame *)operator new[](0x14u);
  v1->m_kMsgQ.m_uiTail = 0;
  v1->m_kMsgQ.m_uiAlloced = 1;
  v1->m_kMsgQ.m_uiHead = -1;
  v1->m_BackFrameID = 0;
  v1->m_bInit = 0;
  v1->vfptr = (IDirectMessengerVtbl *)&LoginWorldNetFrameWork::`vftable';
  v1->m_spWorldMgrNet.m_pObject = 0;
}
// 970534: using guessed type void (__thiscall *PgFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97F33C: using guessed type void (__thiscall *LoginWorldNetFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);

//----- (00474830) --------------------------------------------------------
void __thiscall LoginWorldNetFrameWork::~LoginWorldNetFrameWork(LoginWorldNetFrameWork *this)
{
  LoginWorldNetFrameWork *v1; // edi@1
  Net *v2; // esi@1
  Net *v3; // esi@6
  PgMsg::Frame *v4; // ST00_4@10

  v1 = this;
  this->vfptr = (IDirectMessengerVtbl *)&LoginWorldNetFrameWork::`vftable';
  v2 = this->m_spWorldMgrNet.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spWorldMgrNet.m_pObject = 0;
  }
  v3 = v1->m_spWorldMgrNet.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v4 = v1->m_kMsgQ.m_pBase;
  v1->vfptr = (IDirectMessengerVtbl *)&PgFrameWork::`vftable';
  operator delete[](v4);
}
// 970534: using guessed type void (__thiscall *PgFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97F33C: using guessed type void (__thiscall *LoginWorldNetFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);

//----- (004748E0) --------------------------------------------------------
char __thiscall LoginWorldNetFrameWork::Init(LoginWorldNetFrameWork *this, PgMsg::Frame *ptFrameMsg)
{
  LoginWorldNetFrameWork *v2; // edi@1
  Net *v3; // esi@1
  Net *v4; // ebx@1
  PgMsg::Frame kMsg; // [sp+Ch] [bp-18h]@8

  v2 = this;
  v3 = this->m_spWorldMgrNet.m_pObject;
  v4 = g_kNetMgr.m_spWorldMgr.m_pObject;
  if ( v3 != g_kNetMgr.m_spWorldMgr.m_pObject )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spWorldMgrNet.m_pObject = v4;
    if ( v4 )
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  }
  kMsg.m_uiFrameMsg = 9;
  PgFrameWork::PostMsgToMe((PgFrameWork *)&v2->vfptr, &kMsg);
  v2->m_bInit = 1;
  return 1;
}

//----- (00474960) --------------------------------------------------------
void __thiscall LoginWorldNetFrameWork::ProcessMsg(LoginWorldNetFrameWork *this, unsigned int uiMsg, unsigned int uiwParam, unsigned int uilParam)
{
  LoginWorldNetFrameWork *v4; // esi@1
  PgMsg::Frame pkFrameMsg; // [sp+4h] [bp-18h]@3

  v4 = this;
  if ( uiMsg == 9 && !(unsigned __int8)((int (*)(void))this->m_spWorldMgrNet.m_pObject->vfptr[2].__vecDelDtor)() )
  {
    pkFrameMsg.m_uiFrameMsg = 9;
    PgFrameWork::PostMsgToFrameWork(AccountFrameWorkID, &pkFrameMsg);
    PgFrameWork::PostFrameMsgTerminate((PgFrameWork *)&v4->vfptr);
  }
}

//----- (004749C0) --------------------------------------------------------
void __thiscall LoginWorldNetFrameWork::NcUserLoginWorldReq(LoginWorldNetFrameWork *this)
{
  LoginWorldNetFrameWork *v1; // ebx@1
  Net *v2; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-148h]@2
  PROTO_NC_USER_LOGINWORLD_REQ kProto; // [sp+8h] [bp-144h]@2

  v1 = this;
  v2 = this->m_spWorldMgrNet.m_pObject;
  if ( v2 )
  {
    netcmd.protocol = 3087;
    PgNet::AddNetMsg((PgNet *)&v2->vfptr, &netcmd, 2);
    memset(kProto.user.n256_name, 0, 0x140u);
    Name256Byte::operator=(&kProto.user, g_kUser.m_acUserID);
    qmemcpy(kProto.validate_new, User::GetValidate_new(&g_kUser), sizeof(kProto.validate_new));
    PgNet::SendNetMsg((PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 320);
  }
}

//----- (00474A60) --------------------------------------------------------
int __thiscall LoginWorldNetFrameWork::On_NC_MISC_SEED_ACK(LoginWorldNetFrameWork *this, int iRevBytes, void *pvData)
{
  LoginWorldNetFrameWork *v3; // esi@1

  v3 = this;
  ((void (__stdcall *)(_DWORD))this->m_spWorldMgrNet.m_pObject->vfptr[3].__vecDelDtor)(*(_WORD *)pvData);
  LoginWorldNetFrameWork::NcUserLoginWorldReq(v3);
  return iRevBytes;
}

//----- (00474A90) --------------------------------------------------------
int __thiscall LoginWorldNetFrameWork::ProcessNetMsg(LoginWorldNetFrameWork *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  LoginWorldNetFrameWork *v5; // esi@1
  int result; // eax@1
  unsigned int v7; // eax@8
  PgMsg::Frame pkFrameMsg; // [sp+4h] [bp-18h]@8

  v5 = this;
  result = 0;
  if ( iDepart == 2 )
  {
    if ( iCommand == 7 )
    {
      ((void (__stdcall *)(_DWORD))this->m_spWorldMgrNet.m_pObject->vfptr[3].__vecDelDtor)(*(_WORD *)pvData);
      LoginWorldNetFrameWork::NcUserLoginWorldReq(v5);
      result = iRevBytes;
    }
  }
  else if ( iDepart == 3 )
  {
    if ( iCommand == 20 )
    {
      result = LoginWorldNetFrameWork::On_NC_USER_LOGINWORLD_ACK(this, iRevBytes, pvData);
    }
    else if ( iCommand == 21 )
    {
      v7 = *(_WORD *)pvData;
      pkFrameMsg.m_uiFrameMsg = 11;
      pkFrameMsg.m_uiFrameWParam = v7;
      PgFrameWork::PostMsgToFrameWork(AccountFrameWorkID, &pkFrameMsg);
      PgFrameWork::PostFrameMsgTerminate((PgFrameWork *)&v5->vfptr);
      result = iRevBytes;
    }
  }
  else if ( iDepart == 8 && iCommand == 17 )
  {
    result = iRevBytes;
  }
  return result;
}

//----- (00474B70) --------------------------------------------------------
void __thiscall Name256Byte::operator=(Name256Byte *this, const char *nm)
{
  this->n256_code[31] = 0i64;
  this->n256_code[30] = 0i64;
  this->n256_code[29] = 0i64;
  this->n256_code[28] = 0i64;
  this->n256_code[27] = 0i64;
  this->n256_code[26] = 0i64;
  this->n256_code[25] = 0i64;
  this->n256_code[24] = 0i64;
  this->n256_code[23] = 0i64;
  this->n256_code[22] = 0i64;
  this->n256_code[21] = 0i64;
  this->n256_code[20] = 0i64;
  this->n256_code[19] = 0i64;
  this->n256_code[18] = 0i64;
  this->n256_code[17] = 0i64;
  this->n256_code[16] = 0i64;
  this->n256_code[15] = 0i64;
  this->n256_code[14] = 0i64;
  this->n256_code[13] = 0i64;
  this->n256_code[12] = 0i64;
  this->n256_code[11] = 0i64;
  this->n256_code[10] = 0i64;
  this->n256_code[9] = 0i64;
  this->n256_code[8] = 0i64;
  this->n256_code[7] = 0i64;
  this->n256_code[6] = 0i64;
  this->n256_code[5] = 0i64;
  this->n256_code[4] = 0i64;
  this->n256_code[3] = 0i64;
  this->n256_code[2] = 0i64;
  this->n256_code[1] = 0i64;
  this->n256_code[0] = 0i64;
  strncpy(this->n256_name, (char *)nm, 0x100u);
}

//----- (00474CB0) --------------------------------------------------------
NiRTTI *LoginWorldNetFrameWork::GetRTTI()
{
  return &LoginWorldNetFrameWork::m_RTTI;
}

//----- (00474CC0) --------------------------------------------------------
int __thiscall CharCreateFrameWork::GetID(CharCreateFrameWork *this)
{
  return ((int (*)(void))this->vfptr[1].SetMsgHooker)();
}

//----- (00474CD0) --------------------------------------------------------
const char *LoginWorldNetFrameWork::GetFrameWorkName()
{
  return LoginWorldNetFrameWork::m_RTTI.m_pcName;
}

//----- (00474CE0) --------------------------------------------------------
LoginWorldNetFrameWork *__thiscall LoginWorldNetFrameWork::`scalar deleting destructor'(LoginWorldNetFrameWork *this, unsigned int a2)
{
  LoginWorldNetFrameWork *v2; // esi@1

  v2 = this;
  LoginWorldNetFrameWork::~LoginWorldNetFrameWork(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00474D10) --------------------------------------------------------
void __thiscall SignUpWin::SignUpWin(SignUpWin *this)
{
  SignUpWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&SignUpWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&SignUpWin::`vftable'{for `IDirectMessenger'};
  memset(v1->acSignUpUrl, 0, 0x200u);
}
// 97F474: using guessed type void (__thiscall *SignUpWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97F494: using guessed type int (__thiscall *SignUpWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00474D50) --------------------------------------------------------
void __thiscall SignUpWin::~SignUpWin(SignUpWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&SignUpWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SignUpWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 97F474: using guessed type void (__thiscall *SignUpWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97F494: using guessed type int (__thiscall *SignUpWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00474D80) --------------------------------------------------------
void __thiscall SignUpWin::GotoSignUpPage(SignUpWin *this)
{
  ShellExecuteA(0, "open", this->acSignUpUrl, 0, 0, 5);
}

//----- (00474DA0) --------------------------------------------------------
void __thiscall SpawnAppsWin::SpawnAppsWin(SpawnAppsWin *this)
{
  SpawnAppsWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&SpawnAppsWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&SpawnAppsWin::`vftable'{for `IDirectMessenger'};
  memset(v1->m_acWebUrl, 0, 0x200u);
}
// 97F6B8: using guessed type void (__thiscall *SpawnAppsWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97F6D4: using guessed type int (__thiscall *SpawnAppsWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00474DE0) --------------------------------------------------------
void __thiscall SpawnAppsWin::~SpawnAppsWin(SpawnAppsWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&SpawnAppsWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SpawnAppsWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 97F6B8: using guessed type void (__thiscall *SpawnAppsWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97F6D4: using guessed type int (__thiscall *SpawnAppsWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00474E00) --------------------------------------------------------
void __thiscall SpawnAppsWin::OnClose(SpawnAppsWin *this)
{
  DestroyWindow(this->m_hWebWindow);
}

//----- (00474E10) --------------------------------------------------------
void __thiscall SpawnAppsWin::CloseWin(SpawnAppsWin *this)
{
  SpawnAppsWin *v1; // esi@1

  v1 = this;
  DestroyWindow(this->m_hWebWindow);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}

//----- (00474E30) --------------------------------------------------------
void __thiscall SpawnAppsWin::ReGenPos(SpawnAppsWin *this)
{
  SpawnAppsWin *v1; // esi@1
  int v2; // eax@1
  unsigned int v3; // ecx@1

  v1 = this;
  this->m_uiWebXPos = this->m_uiPlaneWebXPos + ((int (*)(void))this->vfptr[41].__vecDelDtor)();
  v2 = ((int (__thiscall *)(_DWORD))v1->vfptr[42].__vecDelDtor)(v1);
  v3 = v1->m_uiPlaneWebHeight;
  v1->m_uiWebYPos = v1->m_uiPlaneWebYPos + v2;
  v1->m_uiWebWidth = v1->m_uiPlaneWebWidth;
  v1->m_uiWebHeight = v3;
}

//----- (00474E80) --------------------------------------------------------
void __thiscall SpawnAppsWin::UpdateWebPos(SpawnAppsWin *this)
{
  SpawnAppsWin *v1; // esi@1
  int v2; // eax@2
  NiRefObjectVtbl *v3; // edx@2
  int v4; // eax@2
  unsigned int v5; // ecx@2
  unsigned int v6; // edx@2
  tagRECT rect; // [sp+4h] [bp-14h]@2

  v1 = this;
  if ( IsWindow(this->m_hWebWindow) )
  {
    v2 = ((int (__thiscall *)(_DWORD))v1->vfptr[41].__vecDelDtor)(v1);
    v3 = v1->vfptr;
    v1->m_uiWebXPos = v1->m_uiPlaneWebXPos + v2;
    v4 = ((int (__thiscall *)(_DWORD))v3[42].__vecDelDtor)(v1);
    v5 = v1->m_uiPlaneWebWidth;
    v6 = v1->m_uiPlaneWebHeight;
    v1->m_uiWebYPos = v1->m_uiPlaneWebYPos + v4;
    v1->m_uiWebWidth = v5;
    v1->m_uiWebHeight = v6;
    GetWindowRect(g_hMainWnd, &rect);
    MoveWindow(
      v1->m_hWebWindow,
      rect.left + v1->m_uiWebXPos,
      rect.top + v1->m_uiWebYPos,
      v1->m_uiWebWidth,
      v1->m_uiWebHeight,
      1);
  }
}

//----- (00474F50) --------------------------------------------------------
void __thiscall SignUpWin::OnCommand(SignUpWin *this, unsigned int wParam, int lParam)
{
  if ( !wParam )
    ShellExecuteA(0, "open", this->acSignUpUrl, 0, 0, 5);
}

//----- (00474F80) --------------------------------------------------------
void __thiscall SignUpWin::LoadUrl(SignUpWin *this)
{
  SignUpWin *v1; // edi@1
  ItemMallInfo *v2; // eax@3
  ItemMallInfo *v3; // eax@4
  ItemMallInfo *v4; // esi@4
  tagItemMallFileData *v5; // eax@8
  char *v6; // eax@9
  int v7; // edx@9
  char v8; // cl@10
  char acPathName[260]; // [sp+10h] [bp-114h]@1
  int v10; // [sp+120h] [bp-4h]@3

  v1 = this;
  memset(acPathName, 0, 0x104u);
  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acPathName, "%sSpawnApps.hb", &Folder::m_acSystem);
  v2 = (ItemMallInfo *)operator new(0x2224u);
  v10 = 0;
  if ( v2 )
  {
    ItemMallInfo::ItemMallInfo(v2);
    v4 = v3;
  }
  else
  {
    v4 = 0;
  }
  v10 = -1;
  if ( v4 )
  {
    ItemMallInfo::LoadFromFile(v4, acPathName);
    if ( ItemMallInfo::GetTotalURLNum(v4, 1) != -1 )
    {
      v5 = ItemMallInfo::GetData(v4, 1, 0);
      if ( v5 )
      {
        v6 = v5->Path;
        v7 = v1->acSignUpUrl - v6;
        do
        {
          v8 = *v6;
          v6[v7] = *v6;
          ++v6;
        }
        while ( v8 );
      }
      ItemMallInfo::~ItemMallInfo(v4);
      operator delete(v4);
    }
  }
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00475090) --------------------------------------------------------
void __thiscall SpawnAppsWin::OnCommand(SpawnAppsWin *this, unsigned int wParam, int lParam)
{
  SpawnAppsWin *v3; // esi@1

  v3 = this;
  if ( wParam == 1 )
  {
    DestroyWindow(this->m_hWebWindow);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
  }
}

//----- (004750C0) --------------------------------------------------------
char __thiscall SpawnAppsWin::LoadURL(SpawnAppsWin *this)
{
  SpawnAppsWin *v1; // edi@1
  ItemMallInfo *v2; // eax@3
  ItemMallInfo *v3; // eax@4
  ItemMallInfo *v4; // esi@4
  char result; // al@7
  tagItemMallFileData *v6; // eax@9
  char *v7; // eax@10
  int v8; // edx@10
  char v9; // cl@11
  char acPathName[260]; // [sp+10h] [bp-114h]@1
  int v11; // [sp+120h] [bp-4h]@3

  v1 = this;
  memset(acPathName, 0, 0x104u);
  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acPathName, "%sSpawnApps.hb", &Folder::m_acSystem);
  v2 = (ItemMallInfo *)operator new(0x2224u);
  v11 = 0;
  if ( v2 )
  {
    ItemMallInfo::ItemMallInfo(v2);
    v4 = v3;
  }
  else
  {
    v4 = 0;
  }
  v11 = -1;
  if ( v4 && (ItemMallInfo::LoadFromFile(v4, acPathName), ItemMallInfo::GetTotalURLNum(v4, 1) != -1) )
  {
    v6 = ItemMallInfo::GetData(v4, 1, 1);
    if ( v6 )
    {
      v7 = v6->Path;
      v8 = v1->m_acWebUrl - v7;
      do
      {
        v9 = *v7;
        v7[v8] = *v7;
        ++v7;
      }
      while ( v9 );
    }
    ItemMallInfo::~ItemMallInfo(v4);
    operator delete(v4);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004751E0) --------------------------------------------------------
void __thiscall SpawnAppsWin::UpdateMeWin(SpawnAppsWin *this, float fCurTime)
{
  SpawnAppsWin::UpdateWebPos(this);
}

//----- (004751F0) --------------------------------------------------------
char __thiscall SignUpWin::Create(SignUpWin *this, PgFrameWork *pkFrameWork)
{
  SignUpWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiSourceTexture *v5; // eax@4
  NiSourceTexture *v6; // edi@4
  PgSprData *v7; // eax@4
  NiNode *v8; // esi@5
  PgSprData *v10; // edi@10
  NiNode *v11; // esi@11
  int uiLeft; // [sp+14h] [bp-18h]@4
  int uiTop; // [sp+18h] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+1Ch] [bp-10h]@1
  int v15; // [sp+28h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v15 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "\\Account\\SpawnAppsButton.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = MenuTexMgr::GetTexture(0x1Au);
  v6 = v5;
  v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v5);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v7, 0, pkFrameWork, "SignUpWin", 0) )
  {
    v8 = spNode.m_pObject;
    v15 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v8 )
        v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    }
    return 0;
  }
  v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "RegisterNor", &uiLeft, &uiTop, v6);
  PgSprData::Add(v10, (NiAVObject *)&spNode.m_pObject->vfptr, "RegisterClick");
  PgSprData::Add(v10, (NiAVObject *)&spNode.m_pObject->vfptr, "RegisterOver");
  PgWinBut::CreateWin(uiLeft, uiTop, v10, (PgWin *)&v2->vfptr, 0, 0, 0);
  ((void (__thiscall *)(SignUpWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.80000001,
    0.69999999);
  SignUpWin::LoadUrl(v2);
  v15 = -1;
  if ( spNode.m_pObject )
  {
    v11 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v11 )
        v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004753B0) --------------------------------------------------------
char __thiscall SpawnAppsWin::Create(SpawnAppsWin *this, PgFrameWork *pkFrameWork)
{
  SpawnAppsWin *v2; // esi@1
  NiTexturePalette *v3; // ebx@1
  const char *v4; // eax@3
  NiSourceTexture *v5; // eax@4
  NiSourceTexture *v6; // ebx@4
  PgSprData *v7; // eax@4
  NiNode *v8; // esi@5
  char result; // al@9
  PgFont *v10; // eax@11
  PgWinText *v11; // edi@11
  NiUnsharedGeometryGroup *v12; // eax@11
  PgSprData *v13; // edi@13
  unsigned int uiWidth; // [sp+28h] [bp-20h]@10
  unsigned int uiHeight; // [sp+2Ch] [bp-1Ch]@10
  int uiLeft; // [sp+30h] [bp-18h]@4
  int uiTop; // [sp+34h] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+38h] [bp-10h]@1
  int v19; // [sp+44h] [bp-4h]@1
  PgFrameWork *pkFrameWorka; // [sp+50h] [bp+8h]@11

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v19 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "\\Account\\SpawnAppsNotice.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = MenuTexMgr::GetTexture(0x1Au);
  v6 = v5;
  v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v5);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v7, 0, pkFrameWork, "SpawnAppsWin", 0)
    || !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Title", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v8 = spNode.m_pObject;
    v19 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v8 )
        v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    }
    return 0;
  }
  v10 = Font::Get(0);
  v11 = PgWinText::CreateWin(uiLeft, uiTop, uiWidth, uiHeight, v10, (PgWin *)&v2->vfptr, 0, 0);
  v11->vfptr[122].__vecDelDtor((NiRefObject *)v11, 1u);
  v11->vfptr[117].__vecDelDtor((NiRefObject *)v11, (unsigned int)&Color::m_kDxWinTitleColor);
  pkFrameWorka = (PgFrameWork *)v11->vfptr;
  v12 = TextData2::Get(0x96E3C2EC);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkFrameWorka[13].m_pkMsgHooker)(v11, v12);
  v11->vfptr[60].__vecDelDtor((NiRefObject *)v11, 0);
  if ( PgUtil::GetTriShapeRect(
         (NiAVObject *)&spNode.m_pObject->vfptr,
         "WebPage",
         &v2->m_uiPlaneWebXPos,
         &v2->m_uiPlaneWebYPos,
         &v2->m_uiPlaneWebWidth,
         &v2->m_uiPlaneWebHeight) )
  {
    PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "WebPage", &uiLeft, &uiTop, v6);
    v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, v6);
    PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
    PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
    PgWinBut::CreateWin(uiLeft, uiTop, v13, (PgWin *)&v2->vfptr, 1u, 0, 0);
    ((void (__thiscall *)(SpawnAppsWin *))v2->vfptr[59].__vecDelDtor)(v2);
    v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
    SpawnAppsWin::LoadURL(v2);
    SpawnAppsWin::ReGenPos(v2);
    v19 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    result = 1;
  }
  else
  {
    v19 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00475660) --------------------------------------------------------
void __thiscall SpawnAppsWin::OnShowWin(SpawnAppsWin *this)
{
  unsigned int v1; // ebx@1
  SpawnAppsWin *v2; // esi@1
  int v3; // edi@1
  char *v4; // eax@1
  char v5; // cl@2
  int v6; // eax@3
  HWND v7; // edi@3
  void *(__thiscall *v8)(NiRefObject *, unsigned int); // edx@3
  unsigned int v9; // ecx@3
  int v10; // [sp-14h] [bp-238h]@3
  HWND v11; // [sp-10h] [bp-234h]@3
  int v12; // [sp-Ch] [bp-230h]@3
  HINSTANCE v13; // [sp-8h] [bp-22Ch]@3
  NiRect<int> *v14; // [sp-4h] [bp-228h]@1
  NiRect<int> kRect; // [sp+Ch] [bp-218h]@3
  unsigned int uiPosY; // [sp+1Ch] [bp-208h]@3
  char acWebString[512]; // [sp+20h] [bp-204h]@1

  v1 = 0;
  v14 = (NiRect<int> *)511;
  v2 = this;
  v3 = this->m_uiWebXPos;
  acWebString[0] = 0;
  memset(&acWebString[1], 0, 0x1FFu);
  v4 = v2->m_acWebUrl;
  do
  {
    v5 = *v4;
    v4[acWebString - v2->m_acWebUrl] = *v4;
    ++v4;
  }
  while ( v5 );
  v6 = v2->m_uiWebHeight;
  v14 = 0;
  v13 = g_hMainInstance;
  v12 = 0;
  v11 = g_hMainWnd;
  v10 = v6;
  v7 = CreateWindowExA(
         0,
         "WebCtrl32",
         acWebString,
         0x90000000,
         v3,
         v2->m_uiWebYPos,
         v2->m_uiWebWidth,
         v6,
         g_hMainWnd,
         0,
         g_hMainInstance,
         0);
  ShowWindow(v7, 5);
  v8 = v2->vfptr[52].__vecDelDtor;
  v14 = &kRect;
  v2->m_hWebWindow = v7;
  kRect.m_left = 0;
  kRect.m_right = 0;
  kRect.m_top = 0;
  kRect.m_bottom = 0;
  v8((NiRefObject *)&v2->vfptr, (unsigned int)v14);
  v9 = kRect.m_bottom - kRect.m_top;
  uiPosY = 0;
  if ( PgWin::ms_uiScreenWidth >= kRect.m_right - kRect.m_left && PgWin::ms_uiScreenHeight >= v9 )
  {
    v1 = (PgWin::ms_uiScreenWidth - (kRect.m_right - kRect.m_left)) >> 1;
    uiPosY = (PgWin::ms_uiScreenHeight - v9) >> 1;
  }
  v2->vfptr[43].__vecDelDtor((NiRefObject *)v2, v1);
  v2->vfptr[44].__vecDelDtor((NiRefObject *)v2, uiPosY);
}

//----- (004757B0) --------------------------------------------------------
SignUpWin *__cdecl SignUpWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  SignUpWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x358u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&SignUpWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&SignUpWin::`vftable'{for `IDirectMessenger'};
    memset((char *)&v2[1].m_kLocal.m_Rotate.m_pEntry[0][1], 0, 0x200u);
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (SignUpWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 97F474: using guessed type void (__thiscall *SignUpWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97F494: using guessed type int (__thiscall *SignUpWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00475910) --------------------------------------------------------
SpawnAppsWin *__cdecl SpawnAppsWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  SpawnAppsWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x37Cu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&SpawnAppsWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&SpawnAppsWin::`vftable'{for `IDirectMessenger'};
    memset((char *)&v2[1].m_kLocal.m_Rotate.m_pEntry[0][2], 0, 0x200u);
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (SpawnAppsWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 97F6B8: using guessed type void (__thiscall *SpawnAppsWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97F6D4: using guessed type int (__thiscall *SpawnAppsWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00475A70) --------------------------------------------------------
SignUpWin *__thiscall SignUpWin::`scalar deleting destructor'(SignUpWin *this, unsigned int a2)
{
  SignUpWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&SignUpWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SignUpWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97F474: using guessed type void (__thiscall *SignUpWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97F494: using guessed type int (__thiscall *SignUpWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00475AB0) --------------------------------------------------------
SpawnAppsWin *__thiscall SpawnAppsWin::`scalar deleting destructor'(SpawnAppsWin *this, unsigned int a2)
{
  SpawnAppsWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&SpawnAppsWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SpawnAppsWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97F6B8: using guessed type void (__thiscall *SpawnAppsWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97F6D4: using guessed type int (__thiscall *SpawnAppsWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00475AF0) --------------------------------------------------------
char __thiscall AccountWin::CheckID(AccountWin *this, char *pcID)
{
  char result; // al@1

  result = 1;
  this->m_uiCheckResult = 1;
  if ( *pcID )
    this->m_uiCheckResult = 0;
  else
    result = 0;
  return result;
}

//----- (00475B20) --------------------------------------------------------
char __thiscall AccountWin::CheckPasswd(AccountWin *this, char *pcPasswd)
{
  char result; // al@2

  this->m_uiCheckResult = 2;
  if ( *pcPasswd )
  {
    this->m_uiCheckResult = 0;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00475B50) --------------------------------------------------------
void __thiscall AccountWin::OnRegister(AccountWin *this)
{
  const char *v1; // edx@1
  char *v2; // eax@1
  char *v3; // esi@1
  char v4; // cl@2

  v1 = this->m_acRegURL;
  v2 = this->m_acRegURL;
  v3 = &this->m_acRegURL[1];
  do
    v4 = *v2++;
  while ( v4 );
  if ( v2 != v3 )
    ShellExecuteA(0, "open", v1, 0, 0, 5);
}

//----- (00475B90) --------------------------------------------------------
void __thiscall AccountWin::OnForgotPassword(AccountWin *this)
{
  const char *v1; // edx@1
  char *v2; // eax@1
  char *v3; // esi@1
  char v4; // cl@2

  v1 = this->m_acPasswordURL;
  v2 = this->m_acPasswordURL;
  v3 = &this->m_acPasswordURL[1];
  do
    v4 = *v2++;
  while ( v4 );
  if ( v2 != v3 )
    ShellExecuteA(0, "open", v1, 0, 0, 5);
}

//----- (00475BD0) --------------------------------------------------------
void __thiscall AccountWin::SetRegisterURL(AccountWin *this, const char *pcURL)
{
  AccountWin *v2; // edi@1

  v2 = this;
  if ( pcURL )
  {
    if ( *pcURL )
    {
      memset(this->m_acRegURL, 0, 0x400u);
      strncpy(v2->m_acRegURL, (char *)pcURL, 0x400u);
      v2->m_acRegURL[1023] = 0;
    }
  }
}

//----- (00475C20) --------------------------------------------------------
void __thiscall AccountWin::SetForgotPassword(AccountWin *this, const char *pcURL)
{
  AccountWin *v2; // edi@1

  v2 = this;
  if ( pcURL )
  {
    if ( *pcURL )
    {
      memset(this->m_acPasswordURL, 0, 0x400u);
      strncpy(v2->m_acPasswordURL, (char *)pcURL, 0x400u);
      v2->m_acPasswordURL[1023] = 0;
    }
  }
}

//----- (00475C70) --------------------------------------------------------
void __thiscall AccountWin::SetEditFocus(AccountWin *this, unsigned int uiFocus)
{
  AccountWin *v2; // esi@1
  EditWin *v3; // ecx@1

  v2 = this;
  v3 = this->m_spIDEdit.m_pObject;
  if ( v3 )
  {
    v2->m_uiCurFoscus = uiFocus;
    if ( uiFocus )
    {
      if ( uiFocus != 1 )
      {
        if ( uiFocus != 2 )
          return;
        v3 = v2->m_spPasswdEdit.m_pObject;
      }
      ((void (*)(void))v3->vfptr[120].__vecDelDtor)();
    }
    else
    {
      ((void (__stdcall *)(_DWORD))v3->vfptr[121].__vecDelDtor)(1);
      ((void (__stdcall *)(_DWORD))v2->m_spPasswdEdit.m_pObject->vfptr[121].__vecDelDtor)(1);
    }
  }
}

//----- (00475CD0) --------------------------------------------------------
void __thiscall AccountWin::OnCmdExit(AccountWin *this)
{
  PgFrameWork *v1; // ecx@1

  v1 = this->m_pkFrameWork;
  AccountFrameWork::Exit();
}

//----- (00475CE0) --------------------------------------------------------
char __thiscall AccountWin::ChekcIDPasswd(AccountWin *this)
{
  AccountWin *v1; // esi@1
  _BYTE *v2; // edi@1
  _BYTE *v3; // eax@1
  char result; // al@3

  v1 = this;
  v2 = (_BYTE *)((int (*)(void))this->m_spIDEdit.m_pObject->vfptr[113].__vecDelDtor)();
  v3 = (_BYTE *)((int (*)(void))v1->m_spPasswdEdit.m_pObject->vfptr[113].__vecDelDtor)();
  v1->m_uiCheckResult = 1;
  if ( *v2 && (v1->m_uiCheckResult = 0, v1->m_uiCheckResult = 2, *v3) )
  {
    v1->m_uiCheckResult = 0;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00475D40) --------------------------------------------------------
void __thiscall AccountWin::ActiveInput(AccountWin *this)
{
  AccountWin *v1; // esi@1
  EditWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_spIDEdit.m_pObject;
  if ( v2 )
  {
    v1->m_uiCurFoscus = 1;
    ((void (*)(void))v2->vfptr[120].__vecDelDtor)();
  }
  v1->vfptr[63].__vecDelDtor((NiRefObject *)v1, 1u);
  ((void (__stdcall *)(_DWORD))v1->m_spPasswdEdit.m_pObject->vfptr[115].__vecDelDtor)(&unk_97F915);
}

//----- (00475D90) --------------------------------------------------------
void __thiscall AccountWin::DeactiveInput(AccountWin *this)
{
  AccountWin *v1; // esi@1
  EditWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_spIDEdit.m_pObject;
  if ( v2 )
  {
    v1->m_uiCurFoscus = 0;
    ((void (__stdcall *)(_DWORD))v2->vfptr[121].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v1->m_spPasswdEdit.m_pObject->vfptr[121].__vecDelDtor)(1);
  }
  v1->vfptr[63].__vecDelDtor((NiRefObject *)v1, 0);
}

//----- (00475DE0) --------------------------------------------------------
char __thiscall AccountWin::OnModalWinClose(AccountWin *this, PgWin *pkModalWin)
{
  AccountWin *v2; // esi@1
  EditWin *v3; // ecx@4

  v2 = this;
  if ( this->m_uiCheckResult == 1 )
    goto LABEL_12;
  if ( this->m_uiCheckResult == 2 )
  {
    if ( !this->m_spIDEdit.m_pObject )
      goto LABEL_7;
    v3 = this->m_spPasswdEdit.m_pObject;
    v2->m_uiCurFoscus = 2;
    goto LABEL_6;
  }
  if ( this->m_uiCheckResult == 3 )
  {
LABEL_12:
    v3 = this->m_spIDEdit.m_pObject;
    if ( v3 )
    {
      v2->m_uiCurFoscus = 1;
LABEL_6:
      ((void (*)(void))v3->vfptr[120].__vecDelDtor)();
      goto LABEL_7;
    }
  }
LABEL_7:
  v2->m_uiCheckResult = 0;
  return 1;
}

//----- (00475E40) --------------------------------------------------------
void __thiscall AccountWin::AccountWin(AccountWin *this)
{
  AccountWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&AccountWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&AccountWin::`vftable'{for `IDirectMessenger'};
  v1->m_spIDEdit.m_pObject = 0;
  v1->m_spPasswdEdit.m_pObject = 0;
  v1->m_uiCurFoscus = 0;
  v1->m_bRun = 0;
}
// 97F9F4: using guessed type void (__thiscall *AccountWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97FA14: using guessed type int (__thiscall *AccountWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00475E80) --------------------------------------------------------
void __thiscall AccountWin::~AccountWin(AccountWin *this)
{
  AccountWin *v1; // esi@1
  EditWin *v2; // edi@1
  EditWin *v3; // edi@6
  EditWin *v4; // edi@11
  EditWin *v5; // edi@15

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&AccountWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&AccountWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spIDEdit.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spIDEdit.m_pObject = 0;
  }
  v3 = v1->m_spPasswdEdit.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spPasswdEdit.m_pObject = 0;
  }
  v4 = v1->m_spPasswdEdit.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v5 = v1->m_spIDEdit.m_pObject;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 97F9F4: using guessed type void (__thiscall *AccountWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97FA14: using guessed type int (__thiscall *AccountWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00475FA0) --------------------------------------------------------
void __thiscall AccountWin::OnShowWin(AccountWin *this)
{
  AccountWin *v1; // esi@1
  EditWin *v2; // ecx@1

  v1 = this;
  PgWin::OnShowWin((PgWin *)&this->vfptr);
  v2 = v1->m_spIDEdit.m_pObject;
  if ( v2 )
  {
    v1->m_uiCurFoscus = 1;
    ((void (*)(void))v2->vfptr[120].__vecDelDtor)();
  }
}

//----- (00475FD0) --------------------------------------------------------
void __thiscall AccountWin::OnClose(AccountWin *this)
{
  AccountWin *v1; // esi@1
  EditWin *v2; // ecx@1

  v1 = this;
  PgWin::OnClose((PgWin *)&this->vfptr);
  v2 = v1->m_spIDEdit.m_pObject;
  if ( v2 )
  {
    v1->m_uiCurFoscus = 0;
    ((void (__stdcall *)(_DWORD))v2->vfptr[121].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v1->m_spPasswdEdit.m_pObject->vfptr[121].__vecDelDtor)(1);
  }
}

//----- (00476010) --------------------------------------------------------
char __thiscall AccountWin::CreateKoreaAccountWin(AccountWin *this, PgFrameWork *pkFrameWork)
{
  AccountWin *v2; // esi@1
  NiSourceTexture *v3; // ebx@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // edi@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  unsigned int v10; // eax@15
  NiRefObjectVtbl *v11; // edx@15
  PgSprData *v12; // edi@15
  PgSprData *v13; // edi@15
  EditWin *v14; // eax@16
  EditWin *v15; // eax@17
  EditWin *v16; // ecx@17
  PgSprData *v17; // edi@19
  PgSprData *v18; // edi@19
  NiNode *v19; // esi@20
  unsigned int uiWidth; // [sp+10h] [bp-20h]@15
  unsigned int uiHeight; // [sp+14h] [bp-1Ch]@15
  int uiLeft; // [sp+18h] [bp-18h]@11
  int uiTop; // [sp+1Ch] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+20h] [bp-10h]@1
  int v25; // [sp+2Ch] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v25 = 0;
  v3 = MenuTexMgr::GetTexture(3u);
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v25 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "\\Account\\LoginInputPanel.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "InputPanel", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "AccountWin", 0) )
  {
    v4 = spNode.m_pObject;
    v25 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
    goto LABEL_5;
  }
  v10 = ((int (__thiscall *)(AccountWin *))v2->vfptr[36].__vecDelDtor)(v2);
  v11 = v2->vfptr;
  uiWidth = v10;
  uiHeight = ((int (__thiscall *)(AccountWin *))v11[37].__vecDelDtor)(v2);
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Login", &uiLeft, &uiTop, v3);
  PgSprData::Add(v12, (NiAVObject *)&spNode.m_pObject->vfptr, "LoginClick");
  PgSprData::Add(v12, (NiAVObject *)&spNode.m_pObject->vfptr, "LoginOver");
  PgWinBut::CreateWin(uiLeft, uiTop, v12, (PgWin *)&v2->vfptr, 0, 0, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Quit", &uiLeft, &uiTop, v3);
  PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "QuitClick");
  PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "QuitOver");
  PgWinBut::CreateWin(uiLeft, uiTop, v13, (PgWin *)&v2->vfptr, 1u, 0, 0);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "ID", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v14 = EditWin::CreateWin(uiLeft + 2, uiTop + 4, uiWidth, uiHeight, (PgWin *)&v2->vfptr, NORMAL, 0x100u, 3u, 0, 0, 1);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spIDEdit, (NiD3DDefaultShader *)v14);
  }
  PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Password", &uiLeft, &uiTop, &uiWidth, &uiHeight);
  v15 = EditWin::CreateWin(uiLeft + 2, uiTop + 4, uiWidth, uiHeight, (PgWin *)&v2->vfptr, PASSWD, 0x10u, 3u, 0, 0, 1);
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spPasswdEdit, (NiD3DDefaultShader *)v15);
  v16 = v2->m_spIDEdit.m_pObject;
  if ( v16 )
    ((void (*)(void))v16->vfptr[120].__vecDelDtor)();
  EditWin::SetImeStatus(v2->m_spIDEdit.m_pObject, IS_ENGLISH);
  EditWin::SetImeStatus(v2->m_spPasswdEdit.m_pObject, IS_ENGLISH);
  v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "RegisterNomal", &uiLeft, &uiTop, 0);
  PgSprData::Add(v17, (NiAVObject *)&spNode.m_pObject->vfptr, "RegisterClick");
  PgSprData::Add(v17, (NiAVObject *)&spNode.m_pObject->vfptr, "RegisterOver");
  PgWinBut::CreateWin(uiLeft, uiTop, v17, (PgWin *)&v2->vfptr, 3u, 0, 0);
  v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ForgotPWNomal", &uiLeft, &uiTop, 0);
  PgSprData::Add(v18, (NiAVObject *)&spNode.m_pObject->vfptr, "ForgotPWClick");
  PgSprData::Add(v18, (NiAVObject *)&spNode.m_pObject->vfptr, "ForgotPWOver");
  PgWinBut::CreateWin(uiLeft, uiTop, v18, (PgWin *)&v2->vfptr, 4u, 0, 0);
  v25 = -1;
  if ( spNode.m_pObject )
  {
    v19 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v19 )
        v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004763C0) --------------------------------------------------------
void __thiscall AccountWin::DisplayCheckMsg(AccountWin *this)
{
  AccountWin *v1; // esi@1
  char *v2; // eax@3
  MsgBox *v3; // eax@5
  EditWin *v4; // ecx@7

  v1 = this;
  if ( this->m_uiCheckResult == 1 )
  {
    v2 = (char *)TextData::Get(0x9EF1E105);
  }
  else
  {
    if ( this->m_uiCheckResult != 2 )
      goto LABEL_7;
    v2 = (char *)TextData::Get(0xF1323F58);
  }
  v3 = MsgBox::Modal(MSGBOX_OK, v2);
  if ( v3 )
    MsgBox::SetWindowMsgOnClose(v3, (PgWin *)&v1->vfptr, 5u, 2u, 0, 0, 0, 0);
LABEL_7:
  v4 = v1->m_spIDEdit.m_pObject;
  if ( v4 )
  {
    v1->m_uiCurFoscus = 0;
    ((void (__stdcall *)(_DWORD))v4->vfptr[121].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v1->m_spPasswdEdit.m_pObject->vfptr[121].__vecDelDtor)(1);
  }
}

//----- (00476440) --------------------------------------------------------
char __thiscall AccountWin::Create(AccountWin *this, PgFrameWork *pkFrameWork)
{
  AccountWin *v2; // esi@1
  void *(__thiscall *v3)(NiRefObject *, unsigned int); // edx@1
  NiRect<int> kRect; // [sp+1Ch] [bp-14h]@1
  int iX; // [sp+2Ch] [bp-4h]@1

  v2 = this;
  AccountWin::CreateKoreaAccountWin(this, pkFrameWork);
  v3 = v2->vfptr[46].__vecDelDtor;
  kRect.m_left = 0;
  kRect.m_right = 0;
  kRect.m_top = 0;
  kRect.m_bottom = 0;
  v3((NiRefObject *)&v2->vfptr, (unsigned int)&kRect);
  PgScreenXY::GetBoxClipLeftTop(
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    kRect.m_right - kRect.m_left + 1,
    kRect.m_bottom - kRect.m_top + 1,
    0.83600003,
    0.75,
    &iX,
    (int *)&pkFrameWork);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v2->vfptr[77].__vecDelDtor)(v2, iX, pkFrameWork);
  v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
  return 1;
}

//----- (004764E0) --------------------------------------------------------
void __thiscall AccountWin::OnCmdOk(AccountWin *this, bool bCheck)
{
  AccountWin *v2; // esi@1
  char *v3; // edi@4
  char *v4; // eax@4

  v2 = this;
  if ( !bCheck || AccountWin::ChekcIDPasswd(this) )
  {
    v3 = (char *)((int (*)(void))v2->m_spPasswdEdit.m_pObject->vfptr[113].__vecDelDtor)();
    v4 = (char *)((int (*)(void))v2->m_spIDEdit.m_pObject->vfptr[113].__vecDelDtor)();
    AccountFrameWork::TryUserLogin((AccountFrameWork *)v2->m_pkFrameWork, v4, v3);
  }
  else
  {
    AccountWin::DisplayCheckMsg(v2);
  }
}

//----- (00476540) --------------------------------------------------------
void __thiscall AccountWin::OnEditEnd(AccountWin *this, unsigned int wParam, int lParam)
{
  AccountWin *v3; // esi@1
  EditWin *v4; // ecx@5
  char *v5; // edi@7
  char *v6; // eax@7
  EditWin *v7; // ecx@9

  v3 = this;
  if ( this->m_uiCurFoscus == 1 )
  {
    if ( this->m_spIDEdit.m_pObject )
    {
      v7 = this->m_spPasswdEdit.m_pObject;
      v3->m_uiCurFoscus = 2;
      ((void (*)(void))v7->vfptr[120].__vecDelDtor)();
    }
  }
  else if ( this->m_uiCurFoscus == 2 )
  {
    if ( wParam == 1 && AccountWin::ChekcIDPasswd(this) )
    {
      v5 = (char *)((int (*)(void))v3->m_spPasswdEdit.m_pObject->vfptr[113].__vecDelDtor)();
      v6 = (char *)((int (*)(void))v3->m_spIDEdit.m_pObject->vfptr[113].__vecDelDtor)();
      AccountFrameWork::TryUserLogin((AccountFrameWork *)v3->m_pkFrameWork, v6, v5);
    }
    else
    {
      v4 = v3->m_spIDEdit.m_pObject;
      if ( v4 )
      {
        v3->m_uiCurFoscus = 1;
        ((void (*)(void))v4->vfptr[120].__vecDelDtor)();
      }
    }
  }
}

//----- (004765F0) --------------------------------------------------------
void __thiscall AccountWin::UpdateMeWin(AccountWin *this, float fCurTime)
{
  AccountWin *v2; // esi@1
  EditWin *v3; // ecx@3
  EditWin *v4; // ecx@6
  char *v5; // edi@6
  char *v6; // eax@6

  v2 = this;
  EditWin::SetImeStatus(this->m_spIDEdit.m_pObject, IS_ENGLISH);
  EditWin::SetImeStatus(v2->m_spPasswdEdit.m_pObject, IS_ENGLISH);
  if ( (unsigned __int8)((int (*)(void))v2->m_spPasswdEdit.m_pObject->vfptr[122].__vecDelDtor)()
    && v2->m_spIDEdit.m_pObject )
  {
    v3 = v2->m_spPasswdEdit.m_pObject;
    v2->m_uiCurFoscus = 2;
    ((void (*)(void))v3->vfptr[120].__vecDelDtor)();
  }
  if ( !v2->m_bRun )
  {
    if ( g_kServer.m_bCP )
    {
      v4 = v2->m_spPasswdEdit.m_pObject;
      v2->m_bRun = 1;
      v5 = (char *)((int (*)(void))v4->vfptr[113].__vecDelDtor)();
      v6 = (char *)((int (*)(void))v2->m_spIDEdit.m_pObject->vfptr[113].__vecDelDtor)();
      AccountFrameWork::TryUserLogin((AccountFrameWork *)v2->m_pkFrameWork, v6, v5);
      v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 0);
    }
  }
}

//----- (004766A0) --------------------------------------------------------
void __thiscall AccountWin::OnCommand(AccountWin *this, unsigned int wParam, int lParam)
{
  AccountWin *v3; // esi@1
  char *v4; // edi@4
  char *v5; // eax@4
  PgFrameWork *v6; // ecx@5

  v3 = this;
  PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  switch ( wParam )
  {
    case 0u:
      if ( AccountWin::ChekcIDPasswd(v3) )
      {
        v4 = (char *)((int (*)(void))v3->m_spPasswdEdit.m_pObject->vfptr[113].__vecDelDtor)();
        v5 = (char *)((int (*)(void))v3->m_spIDEdit.m_pObject->vfptr[113].__vecDelDtor)();
        AccountFrameWork::TryUserLogin((AccountFrameWork *)v3->m_pkFrameWork, v5, v4);
      }
      else
      {
        AccountWin::DisplayCheckMsg(v3);
      }
      break;
    case 1u:
      v6 = v3->m_pkFrameWork;
      AccountFrameWork::Exit();
      break;
    case 2u:
      v3->vfptr[136].__vecDelDtor((NiRefObject *)v3, 0);
      break;
    case 3u:
      AccountWin::OnRegister(v3);
      break;
    case 4u:
      AccountWin::OnForgotPassword(v3);
      break;
    default:
      return;
  }
}

//----- (00476770) --------------------------------------------------------
AccountWin *__cdecl AccountWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  AccountWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x96Cu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&AccountWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&AccountWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][1]) = 0;
    LOBYTE(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (AccountWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 97F9F4: using guessed type void (__thiscall *AccountWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97FA14: using guessed type int (__thiscall *AccountWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004768D0) --------------------------------------------------------
AccountWin *__thiscall AccountWin::`scalar deleting destructor'(AccountWin *this, unsigned int a2)
{
  AccountWin *v2; // esi@1

  v2 = this;
  AccountWin::~AccountWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00476900) --------------------------------------------------------
int __thiscall WorldSelectWin::GetSelectedWorldNum(WorldSelectWin *this)
{
  return this->m_iSelectServer;
}

//----- (00476910) --------------------------------------------------------
void __thiscall WorldSelectWin::InitServerListCtrlData(WorldSelectWin *this)
{
  this->m_uiSelectedServerIndex = -1;
  this->m_uiDisableIndex = -1;
  this->m_uiClickServerIndex = -1;
  this->m_bDoubleClick = 0;
  this->m_bJoin = 0;
}

//----- (00476940) --------------------------------------------------------
int __stdcall WorldSelectWin::FindIndex(int WorldNo)
{
  return -1;
}

//----- (00476950) --------------------------------------------------------
void __thiscall WorldSelectWin::OnClose(WorldSelectWin *this)
{
  WorldSelectWin *v1; // esi@1

  v1 = this;
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkWorldSelectExitWin->vfptr);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkWorldSelectOptionWin->vfptr);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkWorldSelectOptionSetWin->vfptr);
}

//----- (00476990) --------------------------------------------------------
void __thiscall WorldSelectExitWin::WorldSelectExitWin(WorldSelectExitWin *this)
{
  WorldSelectExitWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&WorldSelectExitWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&WorldSelectExitWin::`vftable'{for `IDirectMessenger'};
}
// 97FE80: using guessed type void (__thiscall *WorldSelectExitWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97FE9C: using guessed type int (__thiscall *WorldSelectExitWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004769B0) --------------------------------------------------------
void __thiscall WorldSelectExitWin::~WorldSelectExitWin(WorldSelectExitWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&WorldSelectExitWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&WorldSelectExitWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 97FE80: using guessed type void (__thiscall *WorldSelectExitWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97FE9C: using guessed type int (__thiscall *WorldSelectExitWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004769D0) --------------------------------------------------------
void __thiscall WorldSelectOptionWin::WorldSelectOptionWin(WorldSelectOptionWin *this)
{
  WorldSelectOptionWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&WorldSelectOptionWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&WorldSelectOptionWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkWorldSelectOptionSetWin = 0;
}
// 9800C0: using guessed type void (__thiscall *WorldSelectOptionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9800DC: using guessed type int (__thiscall *WorldSelectOptionWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00476A00) --------------------------------------------------------
void __thiscall WorldSelectOptionWin::~WorldSelectOptionWin(WorldSelectOptionWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&WorldSelectOptionWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&WorldSelectOptionWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9800C0: using guessed type void (__thiscall *WorldSelectOptionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9800DC: using guessed type int (__thiscall *WorldSelectOptionWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00476A20) --------------------------------------------------------
void __thiscall WorldSelectOptionWin::OnCommand(WorldSelectOptionWin *this, unsigned int wParam, int lParam)
{
  WorldSelectOptionWin *v3; // esi@1

  v3 = this;
  if ( !wParam )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkWorldSelectOptionSetWin->vfptr[65].__vecDelDtor)() )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkWorldSelectOptionSetWin->vfptr);
    else
      PgWinMgr::DoModal(&Pgg_kWinMgr, (PgWin *)&v3->m_pkWorldSelectOptionSetWin->vfptr, 0, 0, 0);
  }
}

//----- (00476A80) --------------------------------------------------------
void __thiscall WorldSelectOptionSetWin::WorldSelectOptionSetWin(WorldSelectOptionSetWin *this)
{
  WorldSelectOptionSetWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&WorldSelectOptionSetWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&WorldSelectOptionSetWin::`vftable'{for `IDirectMessenger'};
  MachineOpt::GraphicOption::GraphicOption(&v1->m_kOpenGraphicOption);
  v1->m_pkWinModeBtn = 0;
  v1->m_pkResolutionTextWin = 0;
  v1->m_bChangeOption = 0;
}
// 980300: using guessed type void (__thiscall *WorldSelectOptionSetWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98031C: using guessed type int (__thiscall *WorldSelectOptionSetWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00476B00) --------------------------------------------------------
void __thiscall WorldSelectOptionSetWin::~WorldSelectOptionSetWin(WorldSelectOptionSetWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&WorldSelectOptionSetWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&WorldSelectOptionSetWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 980300: using guessed type void (__thiscall *WorldSelectOptionSetWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98031C: using guessed type int (__thiscall *WorldSelectOptionSetWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00476B20) --------------------------------------------------------
void __thiscall WorldSelectOptionSetWin::SetResolutionText(WorldSelectOptionSetWin *this, char *pcResolutionText)
{
  if ( pcResolutionText )
  {
    if ( this->m_pkResolutionTextWin )
      ((void (__stdcall *)(_DWORD))this->m_pkResolutionTextWin->vfptr[118].__vecDelDtor)(pcResolutionText);
  }
}

//----- (00476B50) --------------------------------------------------------
void __thiscall WorldSelectWin::UpdateServerList(WorldSelectWin *this)
{
  char *v1; // edi@1
  char *v2; // esi@2
  signed int v3; // ebx@2
  int *v4; // eax@5
  int v5; // edi@7
  bool v6; // zf@13
  WorldSelectWin *v7; // [sp+Ch] [bp-10h]@1
  signed int v8; // [sp+10h] [bp-Ch]@1
  unsigned int v9; // [sp+14h] [bp-8h]@1
  unsigned int v10; // [sp+18h] [bp-4h]@1

  v9 = 8 * this->m_uiPageNum;
  v7 = this;
  v10 = 8 * this->m_uiPageNum;
  v1 = (char *)this->m_pkServerStateSprWin;
  v8 = 8;
  do
  {
    v2 = v1;
    v3 = 5;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 256))(0);
      v2 += 4;
      --v3;
    }
    while ( v3 );
    if ( v9 < g_kServer.m_kFiestaServerList.m_uiTotalWorld )
    {
      v4 = v7->m_vecServerOrder._Myfirst;
      if ( (signed int)v9 >= v7->m_vecServerOrder._Mylast - v4 )
      {
$LN9_13:
        v5 = *((_DWORD *)v1 + 4);
LABEL_12:
        (*(void (__thiscall **)(int, signed int))(*(_DWORD *)v5 + 256))(v5, 1);
      }
      else
      {
        switch ( g_kServer.m_kFiestaServerList.pkServerInfo[v4[v10]].kWorldState )
        {
          case 1:
            v5 = *((_DWORD *)v1 + 3);
            goto LABEL_12;
          case 6:
          case 7:
          case 8:
            v5 = *(_DWORD *)v1;
            goto LABEL_12;
          case 9:
            v5 = *((_DWORD *)v1 + 2);
            goto LABEL_12;
          case 5:
          case 0xA:
            v5 = *((_DWORD *)v1 + 1);
            goto LABEL_12;
          case 0:
          case 2:
          case 3:
          case 4:
            goto $LN9_13;
          default:
            break;
        }
      }
    }
    ++v10;
    v6 = v8-- == 1;
    ++v9;
    v1 = v2;
  }
  while ( !v6 );
}

//----- (00476C50) --------------------------------------------------------
void __thiscall WorldSelectWin::OnCmdExit(WorldSelectWin *this)
{
  AccountFrameWork::WorldSelectCancel((AccountFrameWork *)this->m_pkFrameWork);
}

//----- (00476C60) --------------------------------------------------------
void __thiscall WorldSelectWin::SaveLastConnectWorldInfo(WorldSelectWin *this)
{
  WorldSelectWin *v1; // edi@1
  const char *v2; // eax@3
  _iobuf *v3; // eax@3
  _iobuf *v4; // esi@3

  v1 = this;
  if ( !Folder::m_bInit )
    Folder::Init();
  v2 = fs("%s\\WCInfo.hsb", &Folder::m_acSystem);
  v3 = fopen(v2, off_97FD54);
  v4 = v3;
  if ( v3 )
  {
    fwrite(&v1->m_uiSelectedServerIndex, 4u, 1u, v3);
    fwrite(&v1->m_uiPageNum, 4u, 1u, v4);
    fclose(v4);
  }
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00476CD0) --------------------------------------------------------
char __thiscall WorldSelectWin::LoadLastConnectWorldInfo(WorldSelectWin *this)
{
  WorldSelectWin *v1; // edi@1
  const char *v2; // eax@3
  _iobuf *v3; // eax@3
  _iobuf *v4; // esi@3
  char result; // al@4

  v1 = this;
  if ( !Folder::m_bInit )
    Folder::Init();
  v2 = fs("%s\\WCInfo.hsb", &Folder::m_acSystem);
  v3 = fopen(v2, "rb");
  v4 = v3;
  if ( v3 )
  {
    fread(&v1->m_uiSelectedServerIndex, 4u, 1u, v3);
    fread(&v1->m_uiPageNum, 4u, 1u, v4);
    fclose(v4);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00476D40) --------------------------------------------------------
void __thiscall WorldSelectWin::UpdateWinPos(WorldSelectWin *this)
{
  WorldSelectWin *v1; // esi@1
  WorldSelectOptionSetWin *v2; // ecx@1
  WorldSelectOptionWin *v3; // edi@1
  NiRefObjectVtbl *v4; // ST34_4@1
  int v5; // ebx@1

  v1 = this;
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))this->vfptr[59].__vecDelDtor)(
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.52999997,
    0.60000002);
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v1->m_pkWorldSelectExitWin->vfptr[59].__vecDelDtor)(
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.94999999,
    0.059999999);
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v1->m_pkWorldSelectOptionWin->vfptr[59].__vecDelDtor)(
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.94999999,
    0.15000001);
  v2 = v1->m_pkWorldSelectOptionSetWin;
  v3 = v1->m_pkWorldSelectOptionWin;
  v4 = v2->vfptr;
  v5 = ((int (__stdcall *)(_DWORD))v2->vfptr[36].__vecDelDtor)((signed int)v3->m_kLocal.m_Translate.y);
  v4[77].__vecDelDtor((NiRefObject *)v1->m_pkWorldSelectOptionSetWin, (signed int)v3->m_kLocal.m_Translate.x - v5);
}

//----- (00476E30) --------------------------------------------------------
void __thiscall WorldSelectExitWin::OnExit(WorldSelectExitWin *this)
{
  AccountFrameWork::WorldSelectCancel((AccountFrameWork *)this->m_pkFrameWork);
}

//----- (00476E40) --------------------------------------------------------
char __thiscall WorldSelectOptionWin::Create(WorldSelectOptionWin *this, PgFrameWork *pkFrameWork)
{
  WorldSelectOptionWin *v2; // esi@1
  const char *v3; // eax@3
  PgSprData *v4; // eax@4
  NiNode *v5; // esi@5
  NiNode *v7; // esi@10
  UIUtil ui; // [sp+10h] [bp-2Ch]@10
  int iLeft; // [sp+24h] [bp-18h]@4
  int iTop; // [sp+28h] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+2Ch] [bp-10h]@1
  int v12; // [sp+38h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v12 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v3 = Folder::Merge(&Folder::m_acMenu, "Account\\Option.nif");
  PgUtil::LoadNodeNifFile(v3, &spNode, 0);
  if ( !spNode.m_pObject )
    return 0;
  v4 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iLeft, &iTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v4, 0, pkFrameWork, "Option", 0) )
  {
    v5 = spNode.m_pObject;
    v12 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
    return 0;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v12) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, 0, 0);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  UIUtil::CreateButton(&ui, 0, "Option", 0, 3);
  ((void (__thiscall *)(WorldSelectOptionWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.94999999,
    0.15000001);
  LOBYTE(v12) = 0;
  UIUtil::~UIUtil(&ui);
  v7 = spNode.m_pObject;
  v12 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00476FE0) --------------------------------------------------------
void __thiscall WorldSelectOptionSetWin::OnClose(WorldSelectOptionSetWin *this)
{
  unsigned int v1; // edx@2

  if ( !this->m_bChangeOption )
  {
    MachineOpt::ms_kGraphicOption.bWindowFullMode = this->m_kOpenGraphicOption.bWindowFullMode;
    v1 = this->m_kOpenGraphicOption.ui_DisplayResolutionHeight;
    MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = this->m_kOpenGraphicOption.ui_DisplayResolutionWidth;
    MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = v1;
    this->m_pkWinModeBtn->m_bCheck = MachineOpt::ms_kGraphicOption.bWindowFullMode == 0;
    AccountFrameWork::ms_bWindowSizeChanged = 1;
  }
  this->m_bChangeOption = 0;
}
// A8C5C8: using guessed type bool AccountFrameWork::ms_bWindowSizeChanged;

//----- (00477030) --------------------------------------------------------
void __thiscall WorldSelectOptionSetWin::ProcessMeInput(WorldSelectOptionSetWin *this, bool *bHit)
{
  WorldSelectOptionSetWin *v2; // esi@1

  v2 = this;
  if ( dword_B6479C >= 1
    && !(unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD))this->vfptr[83].__vecDelDtor)(
                           PgWin::ms_iMsX,
                           PgWin::ms_iMsY) )
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
  }
}
// B6479C: using guessed type int dword_B6479C;

//----- (00477070) --------------------------------------------------------
void __thiscall WorldSelectOptionSetWin::ReadOption(WorldSelectOptionSetWin *this)
{
  qmemcpy(&this->m_kOpenGraphicOption, &MachineOpt::ms_kGraphicOption, sizeof(this->m_kOpenGraphicOption));
}

//----- (00477090) --------------------------------------------------------
void __thiscall WorldSelectOptionSetWin::OpenResolutionPopup(WorldSelectOptionSetWin *this)
{
  PgFrameWork::AddMsg(this->m_pkFrameWork, 0x15u, 0, 0);
}

//----- (004770B0) --------------------------------------------------------
char __thiscall WorldSelectWin::Create(WorldSelectWin *this, PgFrameWork *pkFrameWork)
{
  WorldSelectWin *v2; // ebx@1
  NiSourceTexture *v3; // esi@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  char result; // al@7
  NiSourceTexture *v7; // eax@8
  NiSourceTexture *v8; // edi@8
  const char *v9; // eax@14
  PgSprData *v10; // eax@15
  PgSprData *v11; // eax@17
  PgWinSpr *v12; // eax@17
  PgSprData *v13; // esi@17
  signed int v14; // esi@17
  PgSprData *v15; // edi@19
  IDirectMessengerVtbl *v16; // eax@19
  PgFrameWork *v17; // edi@19
  int v18; // edi@20
  signed int v19; // esi@21
  PgSprData *v20; // eax@22
  PgWinSpr *v21; // eax@22
  NiNode *v22; // esi@28
  char *pchNodeName[5]; // [sp+24h] [bp-E8h]@20
  NiSourceTexture *pkTexture_SvList; // [sp+38h] [bp-D4h]@8
  NiSourceTexture *pkTexture; // [sp+3Ch] [bp-D0h]@1
  int iOffX; // [sp+40h] [bp-CCh]@17
  int iOffY; // [sp+44h] [bp-C8h]@17
  NiTexturePalette *pTexturePalette; // [sp+48h] [bp-C4h]@12
  PgFrameWork *v29; // [sp+4Ch] [bp-C0h]@1
  int uiTop; // [sp+50h] [bp-BCh]@15
  int uiLeft; // [sp+54h] [bp-B8h]@15
  NiPointer<NiNode> spNode; // [sp+58h] [bp-B4h]@1
  char temp[32]; // [sp+5Ch] [bp-B0h]@22
  char acNodeName[128]; // [sp+7Ch] [bp-90h]@19
  int v35; // [sp+108h] [bp-4h]@1

  v2 = this;
  v29 = pkFrameWork;
  spNode.m_pObject = 0;
  v35 = 0;
  v3 = MenuTexMgr::GetTexture(0x10u);
  pkTexture = v3;
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v35 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v7 = MenuTexMgr::GetTexture(0x11u);
  v8 = v7;
  pkTexture_SvList = v7;
  if ( !v7 )
  {
    v4 = spNode.m_pObject;
    v35 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
    goto LABEL_5;
  }
  v2->m_uiListTexWidth = ((int (__thiscall *)(NiSourceTexture *))v7->vfptr[15].__vecDelDtor)(v7);
  v2->m_uiListTexHeight = ((int (__thiscall *)(NiSourceTexture *))v8->vfptr[16].__vecDelDtor)(v8);
  pTexturePalette = ::pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v9 = Folder::Merge(&Folder::m_acMenu, "\\Account\\LoginServerList.nif");
  PgUtil::LoadNodeNifFile(v9, &spNode, pTexturePalette);
  if ( !spNode.m_pObject )
    return 0;
  v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v10, 0, v29, "WorldSelectWin", 0) )
  {
    iOffX = uiLeft;
    iOffY = uiTop;
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, v3);
    v12 = PgWinSpr::CreateWin(uiLeft - iOffX, uiTop - iOffY, v11, (PgWin *)&v2->vfptr, 0, 0);
    v12->vfptr[60].__vecDelDtor((NiRefObject *)v12, 0);
    v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SelectNor", &uiLeft, &uiTop, v3);
    PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "SelectClick");
    PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "SelectOver");
    PgWinBut::CreateWin(uiLeft - iOffX, uiTop - iOffY, v13, (PgWin *)&v2->vfptr, 0, 0, 0);
    v14 = 1;
    v29 = (PgFrameWork *)v2->m_pkServerButton;
    pTexturePalette = (NiTexturePalette *)8;
    while ( 1 )
    {
      memset(acNodeName, 0, 0x80u);
      sprintf(acNodeName, "ServerNameNor_%.2d", v14);
      v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acNodeName, &uiLeft, &uiTop, v8);
      memset(acNodeName, 0, 0x80u);
      sprintf(acNodeName, "ServerNameClick_%.2d", v14);
      PgSprData::Add(v15, (NiAVObject *)&spNode.m_pObject->vfptr, acNodeName);
      memset(acNodeName, 0, 0x80u);
      sprintf(acNodeName, "ServerNameOver_%.2d", v14);
      PgSprData::Add(v15, (NiAVObject *)&spNode.m_pObject->vfptr, acNodeName);
      v16 = (IDirectMessengerVtbl *)PgWinBut::CreateWin(
                                      uiLeft - iOffX,
                                      uiTop - iOffY,
                                      v15,
                                      (PgWin *)&v2->vfptr,
                                      ++v14,
                                      0,
                                      0);
      v17 = v29;
      v29->vfptr = v16;
      (*((void (__thiscall **)(_DWORD, _DWORD))v16->SetMsgHooker + 64))(v16, 0);
      v5 = pTexturePalette == (NiTexturePalette *)1;
      pTexturePalette = (NiTexturePalette *)((char *)pTexturePalette - 1);
      v29 = (PgFrameWork *)((char *)v17 + 4);
      if ( v5 )
        break;
      v8 = pkTexture_SvList;
    }
    pchNodeName[0] = "ServerConGood_";
    pchNodeName[1] = "ServerConBusy_";
    pchNodeName[2] = "ServerConNormal_";
    pchNodeName[3] = "ServerConCheck_";
    pchNodeName[4] = "ServerConClosed_";
    v18 = 0;
    v29 = (PgFrameWork *)105;
    do
    {
      v19 = 0;
      do
      {
        sprintf(temp, "%s%.2d", pchNodeName[v19], v18 + 1);
        v20 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, temp, &uiLeft, &uiTop, pkTexture);
        v21 = PgWinSpr::CreateWin(uiLeft - iOffX, uiTop - iOffY, v20, (PgWin *)&v2->vfptr, 0, 0);
        if ( v21 )
        {
          (&v2->vfptr)[(_DWORD)v29 + v19] = (NiRefObjectVtbl *)v21;
          v21->vfptr[64].__vecDelDtor((NiRefObject *)v21, 0);
        }
        ++v19;
      }
      while ( v19 < 5 );
      ++v18;
      v29 = (PgFrameWork *)((char *)v29 + 5);
    }
    while ( (signed int)v29 < 145 );
    ((void (__thiscall *)(WorldSelectWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.52999997,
      0.60000002);
    if ( WorldSelectWin::LoadLastConnectWorldInfo(v2) )
      v2->m_bLoadSuccess = 1;
    v22 = spNode.m_pObject;
    v35 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v22 )
      v22->vfptr->__vecDelDtor((NiRefObject *)v22, 1u);
    result = 1;
  }
  else
  {
    v35 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004775E0) --------------------------------------------------------
void __thiscall WorldSelectWin::OnCmdOk(WorldSelectWin *this, bool bCheck)
{
  WorldSelectWin *v2; // esi@1

  v2 = this;
  AccountFrameWork::WorldSelectOk((AccountFrameWork *)this->m_pkFrameWork);
  WorldSelectWin::SaveLastConnectWorldInfo(v2);
  v2->m_uiClickServerIndex = -1;
  v2->m_bDoubleClick = 0;
  v2->m_bJoin = 0;
}

//----- (00477620) --------------------------------------------------------
void __thiscall WorldSelectWin::UpdateServerBtnState(WorldSelectWin *this, unsigned int nSelectedSlot)
{
  WorldSelectWin *v2; // esi@1
  char *v3; // edi@1
  signed int v4; // ebx@1
  unsigned int v5; // eax@4
  int *v6; // ebx@5
  signed int v7; // eax@6
  char *v8; // [sp+Ch] [bp-4h]@1

  v2 = this;
  v3 = (char *)this->m_pkServerButton;
  v8 = (char *)this->m_pkServerButton;
  v4 = 8;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 532))(0);
    v3 += 4;
    --v4;
  }
  while ( v4 );
  if ( nSelectedSlot < 8 )
  {
    v5 = 8 * v2->m_uiPageNum;
    if ( v5 + nSelectedSlot >= g_kServer.m_kFiestaServerList.m_uiTotalWorld
      || (v6 = v2->m_vecServerOrder._Myfirst, v6 == v2->m_vecServerOrder._Mylast) )
    {
      if ( v5 >= v2->m_vecServerOrder._Mylast - v2->m_vecServerOrder._Myfirst )
        v2->m_iSelectServer = g_kServer.m_kFiestaServerList.pkServerInfo[*v2->m_vecServerOrder._Myfirst].kWorldNo;
      else
        v2->m_iSelectServer = g_kServer.m_kFiestaServerList.pkServerInfo[v2->m_vecServerOrder._Myfirst[8 * v2->m_uiPageNum]].kWorldNo;
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v8 + 532))(1);
    }
    else
    {
      v7 = v6[v5 + nSelectedSlot];
      if ( v7 < (signed int)g_kServer.m_kFiestaServerList.m_uiTotalWorld && v7 >= 0 )
        v2->m_iSelectServer = g_kServer.m_kFiestaServerList.pkServerInfo[v7].kWorldNo;
      ((void (__stdcall *)(_DWORD))v2->m_pkServerButton[nSelectedSlot]->vfptr[133].__vecDelDtor)(1);
      if ( v2->m_bJoin )
      {
        AccountFrameWork::WorldSelectOk((AccountFrameWork *)v2->m_pkFrameWork);
        WorldSelectWin::SaveLastConnectWorldInfo(v2);
        v2->m_uiClickServerIndex = -1;
        v2->m_bDoubleClick = 0;
        v2->m_bJoin = 0;
      }
    }
  }
}

//----- (00477770) --------------------------------------------------------
void __stdcall WorldSelectWin::MakeEmptyServerName(PgWinBut *pkBtn)
{
  PgSpr *v2; // eax@2
  PgSprData *v3; // eax@3
  NiScreenElementsData *v4; // esi@5
  PgSpr *v5; // eax@6
  PgSprData *v6; // eax@7
  NiScreenElementsData *v7; // esi@9
  PgSpr *v8; // eax@10
  PgSprData *v9; // eax@11
  NiScreenElementsData *v10; // esi@13
  NiPoint2 kValue; // [sp+4h] [bp-8h]@6

  if ( pkBtn )
  {
    v2 = pkBtn->m_spSpr.m_pObject;
    v3 = v2 ? v2->m_spSprData.m_pObject : 0;
    v4 = v3->m_akGeomData.m_pBase->m_pObject;
    if ( v4 )
    {
      kValue.x = 0.0;
      kValue.y = 0.0;
      NiScreenElementsData::SetTexture(v4, 0, 0, 0, &kValue);
      kValue.x = 0.0;
      kValue.y = 0.0;
      NiScreenElementsData::SetTexture(v4, 0, 1, 0, &kValue);
      kValue.x = 0.0;
      kValue.y = 0.0;
      NiScreenElementsData::SetTexture(v4, 0, 2, 0, &kValue);
      kValue.x = 0.0;
      kValue.y = 0.0;
      NiScreenElementsData::SetTexture(v4, 0, 3, 0, &kValue);
      v5 = pkBtn->m_spSpr.m_pObject;
      v6 = v5 ? v5->m_spSprData.m_pObject : 0;
      v7 = v6->m_akGeomData.m_pBase[2].m_pObject;
      if ( v7 )
      {
        kValue.x = 0.0;
        kValue.y = 0.0;
        NiScreenElementsData::SetTexture(v7, 0, 0, 0, &kValue);
        kValue.x = 0.0;
        kValue.y = 0.0;
        NiScreenElementsData::SetTexture(v7, 0, 1, 0, &kValue);
        kValue.x = 0.0;
        kValue.y = 0.0;
        NiScreenElementsData::SetTexture(v7, 0, 2, 0, &kValue);
        kValue.x = 0.0;
        kValue.y = 0.0;
        NiScreenElementsData::SetTexture(v7, 0, 3, 0, &kValue);
        v8 = pkBtn->m_spSpr.m_pObject;
        if ( v8 )
          v9 = v8->m_spSprData.m_pObject;
        else
          v9 = 0;
        v10 = v9->m_akGeomData.m_pBase[1].m_pObject;
        if ( v10 )
        {
          kValue.x = 0.0;
          kValue.y = 0.0;
          NiScreenElementsData::SetTexture(v10, 0, 0, 0, &kValue);
          kValue.x = 0.0;
          kValue.y = 0.0;
          NiScreenElementsData::SetTexture(v10, 0, 1, 0, &kValue);
          kValue.x = 0.0;
          kValue.y = 0.0;
          NiScreenElementsData::SetTexture(v10, 0, 2, 0, &kValue);
          kValue.x = 0.0;
          kValue.y = 0.0;
          NiScreenElementsData::SetTexture(v10, 0, 3, 0, &kValue);
        }
      }
    }
  }
}

//----- (00477910) --------------------------------------------------------
char __thiscall WorldSelectExitWin::Create(WorldSelectExitWin *this, PgFrameWork *pkFrameWork)
{
  WorldSelectExitWin *v2; // edi@1
  NiSourceTexture *v3; // esi@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // ebx@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  int v10; // ebx@15
  PgSprData *v11; // esi@15
  NiNode *v12; // esi@16
  int uiLeft; // [sp+18h] [bp-18h]@11
  int uiTop; // [sp+1Ch] [bp-14h]@11
  NiPointer<NiNode> spNodeExit; // [sp+20h] [bp-10h]@1
  int v16; // [sp+2Ch] [bp-4h]@1
  int iOffY; // [sp+38h] [bp+8h]@15

  v2 = this;
  spNodeExit.m_pObject = 0;
  v16 = 0;
  v3 = MenuTexMgr::GetTexture(0x10u);
  if ( !v3 )
  {
    v4 = spNodeExit.m_pObject;
    v16 = -1;
    if ( !spNodeExit.m_pObject || InterlockedDecrement((volatile LONG *)&spNodeExit.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNodeExit.m_pObject == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "\\Account\\Exit.nif");
  PgUtil::LoadNodeNifFile(v8, &spNodeExit, v7);
  if ( !spNodeExit.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNodeExit.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "WorldSelectExitWin", 0) )
  {
    v4 = spNodeExit.m_pObject;
    v16 = -1;
    if ( !spNodeExit.m_pObject || InterlockedDecrement((volatile LONG *)&spNodeExit.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
    goto LABEL_5;
  }
  v10 = uiLeft;
  iOffY = uiTop;
  v11 = PgSprData::Create((NiAVObject *)&spNodeExit.m_pObject->vfptr, "CancelNor", &uiLeft, &uiTop, v3);
  PgSprData::Add(v11, (NiAVObject *)&spNodeExit.m_pObject->vfptr, "CancelClick");
  PgSprData::Add(v11, (NiAVObject *)&spNodeExit.m_pObject->vfptr, "CancelOver");
  PgWinBut::CreateWin(uiLeft - v10, uiTop - iOffY, v11, (PgWin *)&v2->vfptr, 0, 0, 0);
  ((void (__thiscall *)(WorldSelectExitWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.94999999,
    0.059999999);
  v16 = -1;
  if ( spNodeExit.m_pObject )
  {
    v12 = spNodeExit.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNodeExit.m_pObject->m_uiRefCount) )
    {
      if ( v12 )
        v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00477B00) --------------------------------------------------------
void __thiscall WorldSelectExitWin::OnCommand(WorldSelectExitWin *this, unsigned int wParam, int lParam)
{
  if ( !wParam )
    AccountFrameWork::WorldSelectCancel((AccountFrameWork *)this->m_pkFrameWork);
}

//----- (00477B20) --------------------------------------------------------
char __thiscall WorldSelectOptionSetWin::Create(WorldSelectOptionSetWin *this, PgFrameWork *pkFrameWork)
{
  WorldSelectOptionSetWin *v2; // edi@1
  const char *v3; // eax@3
  PgSprData *v4; // eax@4
  NiNode *v5; // esi@5
  NiSourceTexture *v7; // eax@10
  PgSprData *v8; // eax@11
  PgWinBut *v9; // esi@13
  D3DXCOLOR v10; // ST1C_16@13
  char *v11; // ST10_4@13
  int v12; // ST0C_4@13
  int v13; // eax@13
  PgWinBut *v14; // esi@13
  D3DXCOLOR v15; // ST1C_16@13
  int v16; // ST0C_4@13
  int v17; // eax@13
  ColumnBut *v18; // eax@13
  D3DXCOLOR v19; // ST18_16@13
  char *v20; // eax@13
  NiNode *v21; // esi@14
  UIUtil ui; // [sp+Ch] [bp-2Ch]@13
  int iLeft; // [sp+20h] [bp-18h]@4
  int iTop; // [sp+24h] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+28h] [bp-10h]@1
  int v26; // [sp+34h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v26 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v3 = Folder::Merge(&Folder::m_acMenu, "Account\\OptionSet.nif");
  PgUtil::LoadNodeNifFile(v3, &spNode, 0);
  if ( !spNode.m_pObject )
    return 0;
  v4 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iLeft, &iTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v4, 0, pkFrameWork, "OptionSet", 0) )
  {
    v5 = spNode.m_pObject;
    v26 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
    return 0;
  }
  v7 = MenuTexMgr::GetTexture(0x13u);
  if ( v7 )
    v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, v7);
  else
    v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft, iTop, v8, (PgWin *)&v2->vfptr, 0, 0);
  UIUtil::UIUtil(&ui);
  LOBYTE(v26) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, 0, 0);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  UIUtil::CreateSpr(&ui, "Panel02", 0);
  v9 = UIUtil::CreateButton(&ui, 0, "Apply", 0, 3);
  *(_QWORD *)&v10.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v10.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v11 = (char *)TextData::Get(0x9FF9F4E6);
  v12 = ((int (__thiscall *)(PgWinBut *))v9->vfptr[37].__vecDelDtor)(v9);
  v13 = ((int (__thiscall *)(PgWinBut *))v9->vfptr[36].__vecDelDtor)(v9);
  UIUtil::CreateTextNoTag(&ui, 0, 0, v13, v12, v11, (PgWin *)&v9->vfptr, 0, v10, 5u, 0, 0);
  UIUtil::CreateButton(&ui, 1u, off_97FE4C, 0, 3);
  v14 = UIUtil::CreateButton(&ui, 2u, "Resolution", 0, 3);
  *(_QWORD *)&v15.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v15.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v16 = ((int (__thiscall *)(PgWinBut *))v14->vfptr[37].__vecDelDtor)(v14);
  v17 = ((int (__thiscall *)(PgWinBut *))v14->vfptr[36].__vecDelDtor)(v14);
  v2->m_pkResolutionTextWin = (PgWinText *)UIUtil::CreateTextNoTag(
                                             &ui,
                                             0,
                                             0,
                                             v17,
                                             v16,
                                             "-",
                                             (PgWin *)&v14->vfptr,
                                             0,
                                             v15,
                                             5u,
                                             0,
                                             0);
  v18 = UIUtil::CreateCheckButton(&ui, 3u, "WinMode", 0, 2);
  v2->m_pkWinModeBtn = v18;
  v18->m_bCheck = MachineOpt::ms_kGraphicOption.bWindowFullMode == 0;
  *(_QWORD *)&v19.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v19.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v20 = (char *)TextData::Get(0x3354398Du);
  UIUtil::CreateTextEx(&ui, "WinModeText", v20, 0, v19, 5u, 0, 0, 0);
  LOBYTE(v26) = 0;
  UIUtil::~UIUtil(&ui);
  v26 = -1;
  if ( spNode.m_pObject )
  {
    v21 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v21 )
        v21->vfptr->__vecDelDtor((NiRefObject *)v21, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00477E50) --------------------------------------------------------
void __thiscall WorldSelectOptionSetWin::OnCommand(WorldSelectOptionSetWin *this, unsigned int wParam, int lParam)
{
  bool v3; // zf@2

  switch ( wParam )
  {
    case 3u:
      this->m_pkWinModeBtn->m_bCheck = this->m_pkWinModeBtn->m_bCheck == 0;
      v3 = this->m_pkWinModeBtn->m_bCheck == 0;
      AccountFrameWork::ms_bWindowSizeChanged = 1;
      MachineOpt::ms_kGraphicOption.bWindowFullMode = v3;
      break;
    case 2u:
      PgFrameWork::AddMsg(this->m_pkFrameWork, 0x15u, 0, 0);
      break;
    case 0u:
      this->m_bChangeOption = 1;
      goto $LN1_20;
    case 1u:
$LN1_20:
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
      break;
    default:
      return;
  }
}
// A8C5C8: using guessed type bool AccountFrameWork::ms_bWindowSizeChanged;

//----- (00477EE0) --------------------------------------------------------
void __thiscall WorldSelectOptionSetWin::OnShowWin(WorldSelectOptionSetWin *this)
{
  WorldSelectOptionSetWin *v1; // ebx@1
  char temp[256]; // [sp+Ch] [bp-104h]@1

  v1 = this;
  qmemcpy(&this->m_kOpenGraphicOption, &MachineOpt::ms_kGraphicOption, sizeof(this->m_kOpenGraphicOption));
  sprintf(
    temp,
    "%i x %i",
    v1->m_kOpenGraphicOption.ui_DisplayResolutionWidth,
    v1->m_kOpenGraphicOption.ui_DisplayResolutionHeight);
  ((void (__stdcall *)(_DWORD))v1->m_pkResolutionTextWin->vfptr[118].__vecDelDtor)(temp);
}

//----- (00477F60) --------------------------------------------------------
void __thiscall WorldSelectWin::OnCommand(WorldSelectWin *this, unsigned int wParam, int lParam)
{
  WorldSelectWin *v3; // esi@1
  bool v4; // al@4

  v3 = this;
  switch ( wParam )
  {
    case 0u:
      AccountFrameWork::WorldSelectOk((AccountFrameWork *)this->m_pkFrameWork);
      WorldSelectWin::SaveLastConnectWorldInfo(v3);
      v3->m_uiClickServerIndex = -1;
      v3->m_bDoubleClick = 0;
      v3->m_bJoin = 0;
      break;
    case 1u:
      AccountFrameWork::WorldSelectCancel((AccountFrameWork *)this->m_pkFrameWork);
      break;
    case 2u:
    case 3u:
    case 4u:
    case 5u:
    case 6u:
    case 7u:
    case 8u:
    case 9u:
      v4 = this->m_bDoubleClick;
      if ( !v4 )
        goto LABEL_12;
      if ( this->m_uiClickServerIndex == wParam )
        this->m_bJoin = 1;
      if ( !v4 )
      {
LABEL_12:
        CNSTimer_Interval::ReSet(&this->m_kTimerInterval, Timer::ms_fCurTime);
        v3->m_kTimerInterval.m_fCheckTime = 0.5;
        v3->m_bDoubleClick = 1;
        v3->m_uiClickServerIndex = wParam;
      }
      WorldSelectWin::UpdateServerBtnState(v3, wParam - 2);
      v3->m_uiSelectedServerIndex = wParam - 2;
      break;
    default:
      return;
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00478040) --------------------------------------------------------
void __thiscall WorldSelectWin::UpdateMeWin(WorldSelectWin *this, float fCurTime)
{
  WorldSelectWin *v2; // esi@1
  char v3; // cl@4
  int v4; // eax@20
  unsigned int v5; // eax@24
  int v6; // eax@25
  unsigned int v7; // eax@27

  v2 = this;
  if ( !(this->m_uFlags & 1) && CNSTimer_Interval::IsRun_GetCount(&this->m_kTimerInterval, fCurTime) )
  {
    v2->m_bDoubleClick = 0;
    v2->m_uiClickServerIndex = -1;
  }
  v3 = g_pkKeyboard->m_aucKeystate[15];
  if ( !(v3 & 2) && g_pkKeyboard->m_aucKeystateLastUpdate[15] & 2
    || !(g_pkKeyboard->m_aucKeystate[9] & 1) && g_pkKeyboard->m_aucKeystateLastUpdate[9] & 1 )
  {
    v6 = v2->m_uiSelectedServerIndex;
    if ( v6 == -1 )
      goto LABEL_21;
    if ( v6 )
    {
      v7 = v6 - 1;
      v2->m_uiSelectedServerIndex = v7;
      WorldSelectWin::UpdateServerBtnState(v2, v7);
    }
  }
  else
  {
    if ( (v3 & 0x40 || !(g_pkKeyboard->m_aucKeystateLastUpdate[15] & 0x40))
      && (g_pkKeyboard->m_aucKeystate[10] & 1 || !(g_pkKeyboard->m_aucKeystateLastUpdate[10] & 1)) )
    {
      if ( g_pkKeyboard->m_aucKeystate[0] & 2 || !(g_pkKeyboard->m_aucKeystateLastUpdate[0] & 2) )
      {
        if ( !(g_pkKeyboard->m_aucKeystate[3] & 0x10) && g_pkKeyboard->m_aucKeystateLastUpdate[3] & 0x10
          || !(g_pkKeyboard->m_aucKeystate[13] & 4) && g_pkKeyboard->m_aucKeystateLastUpdate[13] & 4 )
        {
          WorldSelectWin::OnCmdOk(v2, 1);
        }
      }
      else
      {
        WorldSelectWin::InitServerListCtrlData(v2);
        AccountFrameWork::WorldSelectCancel((AccountFrameWork *)v2->m_pkFrameWork);
      }
      return;
    }
    v4 = v2->m_uiSelectedServerIndex;
    if ( v4 == -1 )
    {
LABEL_21:
      v2->m_uiSelectedServerIndex = 0;
      WorldSelectWin::UpdateServerBtnState(v2, 0);
      return;
    }
    if ( v4 != 7 && v4 != v2->m_uiDisableIndex )
    {
      v5 = v4 + 1;
      v2->m_uiSelectedServerIndex = v5;
      WorldSelectWin::UpdateServerBtnState(v2, v5);
    }
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (00478170) --------------------------------------------------------
void __thiscall WorldSelectWin::~WorldSelectWin(WorldSelectWin *this)
{
  WorldSelectWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&WorldSelectWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&WorldSelectWin::`vftable'{for `IDirectMessenger'};
  this->m_uiSelectedServerIndex = -1;
  this->m_uiDisableIndex = -1;
  this->m_uiClickServerIndex = -1;
  *(_WORD *)&this->m_bDoubleClick = 0;
  this->m_bJoin = 0;
  if ( this->m_vecServerOrder._Myfirst )
    operator delete(this->m_vecServerOrder._Myfirst);
  v1->m_vecServerOrder._Myfirst = 0;
  v1->m_vecServerOrder._Mylast = 0;
  v1->m_vecServerOrder._Myend = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 980550: using guessed type void (__thiscall *WorldSelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98056C: using guessed type int (__thiscall *WorldSelectWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004781E0) --------------------------------------------------------
void __thiscall WorldSelectWin::LoadServerListOrder(WorldSelectWin *this)
{
  WorldSelectWin *v1; // ebx@1
  const char *v2; // eax@3
  _iobuf *v3; // eax@3
  _iobuf *v4; // esi@3
  int v5; // edi@3
  int PageNum; // [sp+Ch] [bp-8h]@4
  int MaxNum; // [sp+10h] [bp-4h]@4

  v1 = this;
  if ( !Folder::m_bInit )
    Folder::Init();
  v2 = fs("%s\\SOrder.sdf", &Folder::m_acSystem);
  v3 = fopen(v2, "rb");
  v4 = v3;
  v5 = 0;
  if ( v3 )
  {
    MaxNum = 0;
    PageNum = 0;
    fread(&MaxNum, 4u, 1u, v3);
    if ( MaxNum > 0 )
    {
      do
      {
        if ( feof(v4) )
          break;
        fread(&PageNum, 4u, 1u, v4);
        std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
          (std::vector<unsigned long,std::allocator<unsigned long> > *)&v1->m_vecServerOrder,
          (const unsigned int *)&PageNum);
        ++v5;
      }
      while ( v5 < MaxNum );
    }
    fclose(v4);
  }
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00478290) --------------------------------------------------------
void __thiscall WorldSelectWin::MakeServerListOrder(WorldSelectWin *this)
{
  std::vector<NiTimeController *,std::allocator<NiTimeController *> > *v1; // esi@1
  signed int v2; // edi@1
  signed int v3; // ebx@2
  unsigned int v4; // eax@3
  int v5; // edi@5
  NiTimeController **v6; // eax@7
  NiTimeController **v7; // eax@12
  int ServerListCount; // [sp+8h] [bp-8h]@1
  int i; // [sp+Ch] [bp-4h]@2

  v1 = (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&this->m_vecServerOrder;
  v2 = g_kServer.m_kFiestaServerList.m_uiTotalWorld;
  ServerListCount = g_kServer.m_kFiestaServerList.m_uiTotalWorld;
  if ( this->m_vecServerOrder._Myfirst == this->m_vecServerOrder._Mylast )
  {
    v3 = 0;
    i = 0;
    if ( (g_kServer.m_kFiestaServerList.m_uiTotalWorld & 0x80000000) == 0 )
    {
      do
      {
        v4 = (unsigned int)v1->_Mylast;
        if ( (unsigned int)&i >= v4 || v1->_Myfirst > (NiTimeController **)&i )
        {
          if ( (NiTimeController **)v4 == v1->_Myend )
            std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(v1, 1u);
          v7 = v1->_Mylast;
          if ( v7 )
            *v7 = (NiTimeController *)v3;
        }
        else
        {
          v5 = ((char *)&i - (char *)v1->_Myfirst) >> 2;
          if ( (NiTimeController **)v4 == v1->_Myend )
            std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(v1, 1u);
          v6 = v1->_Mylast;
          if ( v6 )
            *v6 = v1->_Myfirst[v5];
          v2 = ServerListCount;
        }
        ++v1->_Mylast;
        i = ++v3;
      }
      while ( v3 <= v2 );
    }
  }
}

//----- (00478330) --------------------------------------------------------
WorldSelectExitWin *__cdecl WorldSelectExitWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  WorldSelectExitWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x158u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&WorldSelectExitWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&WorldSelectExitWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (WorldSelectExitWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 97FE80: using guessed type void (__thiscall *WorldSelectExitWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97FE9C: using guessed type int (__thiscall *WorldSelectExitWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00478470) --------------------------------------------------------
WorldSelectOptionWin *__cdecl WorldSelectOptionWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  WorldSelectOptionWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x15Cu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&WorldSelectOptionWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&WorldSelectOptionWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (WorldSelectOptionWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9800C0: using guessed type void (__thiscall *WorldSelectOptionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9800DC: using guessed type int (__thiscall *WorldSelectOptionWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004785B0) --------------------------------------------------------
WorldSelectOptionSetWin *__cdecl WorldSelectOptionSetWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  WorldSelectOptionSetWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1A0u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    LOBYTE(v6) = 1;
    v2->vfptr = (NiRefObjectVtbl *)&WorldSelectOptionSetWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&WorldSelectOptionSetWin::`vftable'{for `IDirectMessenger'};
    MachineOpt::GraphicOption::GraphicOption((MachineOpt::GraphicOption *)&v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]);
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kWorld.m_Rotate.m_pEntry[1][2]) = 0;
    BYTE1(v2[1].m_kWorld.m_Rotate.m_pEntry[1][1]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (WorldSelectOptionSetWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 980300: using guessed type void (__thiscall *WorldSelectOptionSetWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98031C: using guessed type int (__thiscall *WorldSelectOptionSetWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00478710) --------------------------------------------------------
void __thiscall WorldSelectWin::WorldSelectWin(WorldSelectWin *this)
{
  WorldSelectWin *v1; // esi@1
  char *v2; // eax@1
  char *v3; // ebx@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&WorldSelectWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&WorldSelectWin::`vftable'{for `IDirectMessenger'};
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kTimerInterval);
  v1->m_vecServerOrder._Myfirst = 0;
  v1->m_vecServerOrder._Mylast = 0;
  v1->m_vecServerOrder._Myend = 0;
  v1->m_fBtClickDelayTime = 0.0;
  v1->m_uiListTexHeight = 0;
  v1->m_uiListTexWidth = 0;
  v1->m_uiSelectedServerIndex = -1;
  v1->m_uiDisableIndex = -1;
  v1->m_uiClickServerIndex = -1;
  *(_WORD *)&v1->m_bDoubleClick = 0;
  v1->m_bJoin = 0;
  std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
    (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&v1->m_vecServerOrder,
    0x1Eu);
  v2 = (char *)v1->m_vecServerOrder._Mylast;
  v3 = (char *)v1->m_vecServerOrder._Myfirst;
  if ( v3 != v2 )
  {
    memmove(v3, v2, 0);
    v1->m_vecServerOrder._Mylast = (int *)v3;
  }
  WorldSelectWin::LoadServerListOrder(v1);
}
// 980550: using guessed type void (__thiscall *WorldSelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98056C: using guessed type int (__thiscall *WorldSelectWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00478810) --------------------------------------------------------
WorldSelectWin *__cdecl WorldSelectWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  WorldSelectWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x298u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    WorldSelectWin::WorldSelectWin((WorldSelectWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (WorldSelectWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00478940) --------------------------------------------------------
void __thiscall WorldSelectWin::UpdatePageState(WorldSelectWin *this)
{
  WorldSelectWin *v1; // ebx@1
  char *v2; // esi@1
  signed int v3; // edi@1
  double v4; // st7@5
  unsigned int v5; // ecx@5
  signed int v6; // eax@5
  double v7; // st6@5
  double v8; // st5@5
  signed int v9; // esi@7
  PgWinBut **v10; // edi@7
  int *v11; // edx@9
  int *v12; // eax@9
  signed int v13; // eax@11
  PgWinBut *v14; // esi@15
  int v15; // eax@15
  PgSpr *v16; // eax@15
  PgSprData *v17; // eax@16
  NiScreenElementsData *v18; // edi@18
  PgSpr *v19; // eax@18
  PgSprData *v20; // eax@19
  NiScreenElementsData *v21; // edi@21
  PgSpr *v22; // esi@21
  PgSprData *v23; // esi@22
  NiScreenElementsData *v24; // esi@24
  NiPoint2 v25; // [sp+Ch] [bp-A0h]@24
  NiPoint2 kValue; // [sp+14h] [bp-98h]@18
  NiPoint2 v27; // [sp+1Ch] [bp-90h]@24
  NiPoint2 v28; // [sp+24h] [bp-88h]@21
  NiPoint2 v29; // [sp+2Ch] [bp-80h]@24
  NiPoint2 v30; // [sp+34h] [bp-78h]@18
  NiPoint2 v31; // [sp+3Ch] [bp-70h]@24
  NiPoint2 v32; // [sp+44h] [bp-68h]@21
  double v33; // [sp+4Ch] [bp-60h]@15
  NiPoint2 v34; // [sp+54h] [bp-58h]@18
  NiPoint2 v35; // [sp+5Ch] [bp-50h]@21
  NiPoint2 v36; // [sp+64h] [bp-48h]@21
  NiPoint2 v37; // [sp+6Ch] [bp-40h]@18
  unsigned int nCurrStartServerIdx; // [sp+74h] [bp-38h]@5
  const float cDefalutX; // [sp+78h] [bp-34h]@7
  const float cHeightGapInTex; // [sp+7Ch] [bp-30h]@7
  const float cWidthGapInTex; // [sp+80h] [bp-2Ch]@5
  const float cWidthInTex; // [sp+84h] [bp-28h]@5
  int i; // [sp+88h] [bp-24h]@7
  const float cDefalutY; // [sp+8Ch] [bp-20h]@7
  const float cHeightInTex; // [sp+90h] [bp-1Ch]@7
  unsigned int v46; // [sp+94h] [bp-18h]@7
  float fx; // [sp+98h] [bp-14h]@15
  float v48; // [sp+9Ch] [bp-10h]@15
  PgWinBut **v49; // [sp+A0h] [bp-Ch]@5
  float v50; // [sp+A4h] [bp-8h]@15
  float fy; // [sp+A8h] [bp-4h]@15

  v1 = this;
  this->m_uiDisableIndex = -1;
  v2 = (char *)this->m_pkServerButton;
  v3 = 8;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 532))(0);
    v2 += 4;
    --v3;
  }
  while ( v3 );
  if ( v1->m_vecServerOrder._Myfirst == v1->m_vecServerOrder._Mylast )
    WorldSelectWin::MakeServerListOrder(v1);
  v4 = (double)v1->m_uiListTexWidth;
  v5 = 8 * v1->m_uiPageNum;
  nCurrStartServerIdx = 8 * v1->m_uiPageNum;
  *(float *)&v49 = v4;
  v6 = v1->m_uiListTexHeight;
  cWidthInTex = 268.0 / *(float *)&v49;
  *(float *)&v49 = 2.0 / *(float *)&v49;
  v7 = *(float *)&v49;
  cWidthGapInTex = *(float *)&v49;
  v8 = (double)(signed int)v1->m_uiListTexHeight;
  if ( v6 < 0 )
    v8 = v8 + 4294967300.0;
  *(float *)&v49 = v8;
  v9 = 0;
  v10 = v1->m_pkServerButton;
  i = 0;
  v46 = 4 * v5;
  cHeightInTex = 32.0 / *(float *)&v49;
  *(float *)&v49 = 2.0 / *(float *)&v49;
  cHeightGapInTex = *(float *)&v49;
  cDefalutY = *(float *)&v49;
  v49 = v1->m_pkServerButton;
  cDefalutX = v7;
  while ( 1 )
  {
    v11 = v1->m_vecServerOrder._Myfirst;
    v12 = v1->m_vecServerOrder._Mylast;
    if ( v11 == v12 )
      break;
    if ( v9 + v5 > v12 - v11 - 1
      || (v13 = v11[v46 / 4], v13 >= (signed int)g_kServer.m_kFiestaServerList.m_uiTotalWorld)
      || v13 < 0 )
    {
      WorldSelectWin::MakeEmptyServerName(*v10);
    }
    else
    {
      if ( v1->m_uiDisableIndex < v9 )
        v1->m_uiDisableIndex = v9;
      v14 = *v10;
      (*v10)->vfptr[64].__vecDelDtor((NiRefObject *)*v10, 1u);
      v15 = v1->m_vecServerOrder._Myfirst[v46 / 4] / 3;
      LODWORD(v48) = v1->m_vecServerOrder._Myfirst[v46 / 4] % 3;
      v50 = *(float *)&v15;
      v16 = v14->m_spSpr.m_pObject;
      fx = (cWidthGapInTex + cWidthInTex) * (double)SLODWORD(v48) + cDefalutX;
      v33 = cHeightGapInTex + cHeightInTex;
      fy = v33 * ((double)SLODWORD(v50) * 3.0) + cDefalutY;
      if ( v16 )
        v17 = v16->m_spSprData.m_pObject;
      else
        v17 = 0;
      v18 = v17->m_akGeomData.m_pBase->m_pObject;
      kValue.x = fx;
      kValue.y = fy;
      NiScreenElementsData::SetTexture(v18, 0, 0, 0, &kValue);
      v30.x = fx;
      v50 = fy + cHeightInTex;
      v30.y = v50;
      NiScreenElementsData::SetTexture(v18, 0, 1, 0, &v30);
      v48 = fx + cWidthInTex;
      v34.x = v48;
      v34.y = v50;
      NiScreenElementsData::SetTexture(v18, 0, 2, 0, &v34);
      v37.x = v48;
      v37.y = fy;
      NiScreenElementsData::SetTexture(v18, 0, 3, 0, &v37);
      v19 = v14->m_spSpr.m_pObject;
      fy = fy + v33;
      if ( v19 )
        v20 = v19->m_spSprData.m_pObject;
      else
        v20 = 0;
      v21 = v20->m_akGeomData.m_pBase[2].m_pObject;
      v32.x = fx;
      v32.y = fy;
      NiScreenElementsData::SetTexture(v21, 0, 0, 0, &v32);
      v28.x = fx;
      v50 = fy + cHeightInTex;
      v28.y = v50;
      NiScreenElementsData::SetTexture(v21, 0, 1, 0, &v28);
      v36.x = v48;
      v36.y = v50;
      NiScreenElementsData::SetTexture(v21, 0, 2, 0, &v36);
      v35.x = v48;
      v35.y = fy;
      NiScreenElementsData::SetTexture(v21, 0, 3, 0, &v35);
      v22 = v14->m_spSpr.m_pObject;
      fy = fy + v33;
      if ( v22 )
        v23 = v22->m_spSprData.m_pObject;
      else
        v23 = 0;
      v24 = v23->m_akGeomData.m_pBase[1].m_pObject;
      v31.x = fx;
      v31.y = fy;
      NiScreenElementsData::SetTexture(v24, 0, 0, 0, &v31);
      v29.x = fx;
      v50 = fy + cHeightInTex;
      v29.y = v50;
      NiScreenElementsData::SetTexture(v24, 0, 1, 0, &v29);
      v27.x = v48;
      v27.y = v50;
      NiScreenElementsData::SetTexture(v24, 0, 2, 0, &v27);
      v25.x = v48;
      v25.y = fy;
      NiScreenElementsData::SetTexture(v24, 0, 3, 0, &v25);
      v10 = v49;
      v9 = i;
    }
    v46 += 4;
    ++v9;
    ++v10;
    i = v9;
    v49 = v10;
    if ( v9 >= 8 )
    {
      WorldSelectWin::UpdateServerList(v1);
      return;
    }
    v5 = nCurrStartServerIdx;
  }
}

//----- (00478D10) --------------------------------------------------------
void __thiscall WorldSelectWin::InitWorldSelectExitWin(WorldSelectWin *this, PgFrameWork *pkFrameWork)
{
  WorldSelectWin *v2; // esi@1
  WorldSelectOptionSetWin *v3; // eax@1
  WorldSelectOptionWin *v4; // ebx@1
  NiRefObjectVtbl *v5; // edi@1
  PgFrameWork *pkFrameWorka; // [sp+14h] [bp+8h]@1

  v2 = this;
  this->m_pkWorldSelectExitWin = WorldSelectExitWin::CreateWin(pkFrameWork);
  v2->m_pkWorldSelectOptionWin = WorldSelectOptionWin::CreateWin(pkFrameWork);
  v3 = WorldSelectOptionSetWin::CreateWin(pkFrameWork);
  v4 = v2->m_pkWorldSelectOptionWin;
  v2->m_pkWorldSelectOptionSetWin = v3;
  v5 = v3->vfptr;
  pkFrameWorka = (PgFrameWork *)v3->vfptr[36].__vecDelDtor((NiRefObject *)v3, (signed int)v4->m_kLocal.m_Translate.y);
  v5[77].__vecDelDtor(
    (NiRefObject *)v2->m_pkWorldSelectOptionSetWin,
    (signed int)v4->m_kLocal.m_Translate.x - (_DWORD)pkFrameWorka);
  v2->m_pkWorldSelectOptionWin->m_pkWorldSelectOptionSetWin = v2->m_pkWorldSelectOptionSetWin;
}

//----- (00478DA0) --------------------------------------------------------
void __thiscall WorldSelectWin::OnShowWin(WorldSelectWin *this)
{
  WorldSelectWin *v1; // esi@1
  bool v2; // zf@1

  v1 = this;
  PgWin::OnShowWin((PgWin *)&this->vfptr);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkWorldSelectExitWin->vfptr);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkWorldSelectOptionWin->vfptr);
  WorldSelectWin::MakeServerListOrder(v1);
  v2 = v1->m_bLoadSuccess == 0;
  v1->m_uiPageNum = 0;
  v1->m_iSelectServer = -1;
  if ( v2 )
  {
    v1->m_uiSelectedServerIndex = -1;
    v1->m_uiDisableIndex = -1;
    v1->m_uiClickServerIndex = -1;
    v1->m_bDoubleClick = 0;
    v1->m_bJoin = 0;
  }
  WorldSelectWin::UpdatePageState(v1);
  if ( v1->m_bLoadSuccess )
    WorldSelectWin::UpdateServerBtnState(v1, v1->m_uiSelectedServerIndex);
}

//----- (00478E30) --------------------------------------------------------
bool __thiscall NiInputKeyboard::KeyWasReleased(NiInputKeyboard *this, NiInputKeyboard::KeyCode eKey)
{
  bool result; // al@2

  if ( eKey )
    result = !(((unsigned __int8)this->m_aucKeystate[(signed int)eKey >> 3] >> (eKey & 7)) & 1)
          && ((unsigned __int8)this->m_aucKeystateLastUpdate[(signed int)eKey >> 3] >> (eKey & 7)) & 1;
  else
    result = 0;
  return result;
}

//----- (00478E70) --------------------------------------------------------
WorldSelectExitWin *__thiscall WorldSelectExitWin::`scalar deleting destructor'(WorldSelectExitWin *this, unsigned int a2)
{
  WorldSelectExitWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&WorldSelectExitWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&WorldSelectExitWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97FE80: using guessed type void (__thiscall *WorldSelectExitWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97FE9C: using guessed type int (__thiscall *WorldSelectExitWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00478EB0) --------------------------------------------------------
WorldSelectOptionWin *__thiscall WorldSelectOptionWin::`vector deleting destructor'(WorldSelectOptionWin *this, unsigned int a2)
{
  WorldSelectOptionWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&WorldSelectOptionWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&WorldSelectOptionWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9800C0: using guessed type void (__thiscall *WorldSelectOptionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9800DC: using guessed type int (__thiscall *WorldSelectOptionWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00478EF0) --------------------------------------------------------
WorldSelectOptionSetWin *__thiscall WorldSelectOptionSetWin::`scalar deleting destructor'(WorldSelectOptionSetWin *this, unsigned int a2)
{
  WorldSelectOptionSetWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&WorldSelectOptionSetWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&WorldSelectOptionSetWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 980300: using guessed type void (__thiscall *WorldSelectOptionSetWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98031C: using guessed type int (__thiscall *WorldSelectOptionSetWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00478F30) --------------------------------------------------------
WorldSelectWin *__thiscall WorldSelectWin::`vector deleting destructor'(WorldSelectWin *this, unsigned int a2)
{
  WorldSelectWin *v2; // esi@1

  v2 = this;
  WorldSelectWin::~WorldSelectWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00478F60) --------------------------------------------------------
int __stdcall CharSelectFrameWork::On_NC_USER_CONNECTCUT_CMD(int iRevBytes, void *pvData)
{
  int result; // eax@1

  result = iRevBytes;
  if ( *(_WORD *)pvData == 1667 )
    g_kServer.m_bDoubleConnected = 1;
  return result;
}

//----- (00478F80) --------------------------------------------------------
int __stdcall CharSelectFrameWork::On_NC_PRISON_GET_ACK(int iRevBytes, void *pvData)
{
  CharSelectFrameWork::ms_bStateIsPrison = 0;
  CharSelectFrameWork::ms_dPrisonTimeMinute = 0;
  CharSelectFrameWork::ms_bGetPrisonInfo = 1;
  if ( *(_WORD *)pvData == 3504 )
  {
    CharSelectFrameWork::ms_bStateIsPrison = 1;
    CharSelectFrameWork::ms_dPrisonTimeMinute = *((_WORD *)pvData + 1);
  }
  return iRevBytes;
}
// A886D4: using guessed type bool CharSelectFrameWork::ms_bGetPrisonInfo;
// A886D5: using guessed type bool CharSelectFrameWork::ms_bStateIsPrison;
// A886D8: using guessed type unsigned __int32 CharSelectFrameWork::ms_dPrisonTimeMinute;

//----- (00478FD0) --------------------------------------------------------
int __stdcall CharSelectFrameWork::On_NC_EVENT_FRIEND_GETCOUNT_ACK(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (00478FE0) --------------------------------------------------------
int __stdcall CharSelectFrameWork::On_NC_CHARGED_BOOTHSLOTSIZE_CMD(int iRevBytes, void *pvData)
{
  if ( *(_BYTE *)pvData <= 0x14u )
    PrivateStoreWin::ms_byBoothSize = *(_BYTE *)pvData;
  return iRevBytes;
}
// A71184: using guessed type unsigned __int8 PrivateStoreWin::ms_byBoothSize;

//----- (00479000) --------------------------------------------------------
int __stdcall CharSelectFrameWork::On_NC_CHAR_OPTION_IMPROVE_GET_GAMEOPTION_CMD(int iRevBytes, void *pvData)
{
  MachineOpt::SetGameOpt((PROTO_NC_CHAR_OPTION_IMPROVE_GET_GAMEOPTION_CMD *)pvData);
  CharSelectFrameWork::ms_bLoadGameSystemOptionSuccess = 1;
  CharSelectFrameWork::m_bLoadGameSystemOption = 1;
  return iRevBytes;
}
// A886CE: using guessed type bool CharSelectFrameWork::m_bLoadGameSystemOption;
// A886D2: using guessed type bool CharSelectFrameWork::ms_bLoadGameSystemOptionSuccess;

//----- (00479030) --------------------------------------------------------
int __stdcall CharSelectFrameWork::On_NC_CHAR_OPTION_IMPROVE_GET_KEYMAP_CMD(int iRevBytes, void *pvData)
{
  int result; // eax@1

  MachineOpt::SetKeyMap((PROTO_NC_CHAR_OPTION_IMPROVE_GET_KEYMAP_CMD *)pvData);
  result = iRevBytes;
  CharSelectFrameWork::m_bLoadNewKeyMapOption = 1;
  return result;
}
// A886CD: using guessed type bool CharSelectFrameWork::m_bLoadNewKeyMapOption;

//----- (00479050) --------------------------------------------------------
int __stdcall CharSelectFrameWork::On_NC_CHAR_OPTION_IMPROVE_GET_SHORTCUTDATA_CMD(int iRevBytes, void *pvData)
{
  signed int v3; // esi@1
  SHORT_CUT_DATA *v4; // edi@2

  CharSelectFrameWork::m_bLoadShortCutDataOption = 1;
  ShortCutMgr::Clear(&g_kShortCutMgr);
  OptionManager::Clear(&GameFrameWork::m_kOptionManager);
  OptionManager::Register(&GameFrameWork::m_kOptionManager, (IOptionBase *)&g_kShortCutMgr.vfptr);
  CharSelectFrameWork::ms_bNewCharCreat = 0;
  CharSelectFrameWork::ms_bShortCutDataLoaded = 1;
  v3 = 0;
  if ( *(_WORD *)pvData > 0u )
  {
    v4 = (SHORT_CUT_DATA *)((char *)pvData + 2);
    do
    {
      ShortCutMgr::LoadFromPacket(&g_kShortCutMgr, v4);
      ++v3;
      ++v4;
    }
    while ( v3 < *(_WORD *)pvData );
  }
  return iRevBytes;
}
// A886C1: using guessed type bool CharSelectFrameWork::m_bLoadShortCutDataOption;
// A886D3: using guessed type bool CharSelectFrameWork::ms_bNewCharCreat;
// A8C600: using guessed type bool CharSelectFrameWork::ms_bShortCutDataLoaded;

//----- (004790C0) --------------------------------------------------------
void __thiscall CharSelectFrameWork::NcAvatarEraseReq(CharSelectFrameWork *this)
{
  CharSelectFrameWork *v1; // esi@1
  Net *v2; // ecx@2
  GameFrameWork *v3; // eax@3
  PgNet *v4; // ecx@5
  NETCOMMAND netcmd; // [sp+4h] [bp-Ch]@5
  NETCOMMAND netcmd1; // [sp+8h] [bp-8h]@3
  PROTO_NC_AVATAR_ERASE_REQ kProto; // [sp+Fh] [bp-1h]@5

  v1 = this;
  if ( this->m_iEraseSlot != -1 )
  {
    v2 = this->m_spWorldMgrNet.m_pObject;
    if ( v2 )
    {
      netcmd1.protocol = 14346;
      PgNet::SendNetMsg((PgNet *)&v2->vfptr, &netcmd1, 2);
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v3 )
        GameFrameWork::NcRaidLeaveReq(v3);
      netcmd.protocol = 5127;
      PgNet::AddNetMsg((PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr, &netcmd, 2);
      v4 = (PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr;
      kProto.slot = v1->m_iEraseSlot;
      PgNet::SendNetMsg(v4, &kProto, 1);
    }
  }
}

//----- (00479150) --------------------------------------------------------
void __thiscall CharSelectFrameWork::NcCharLoginReq(CharSelectFrameWork *this)
{
  CharSelectFrameWork *v1; // esi@1
  Net *v2; // ecx@1
  char v3; // al@2
  PgNet *v4; // ecx@2
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@2
  PROTO_NC_CHAR_LOGIN_REQ kProto; // [sp+Bh] [bp-1h]@2

  v1 = this;
  v2 = this->m_spWorldMgrNet.m_pObject;
  if ( v2 )
  {
    netcmd.protocol = 4097;
    PgNet::AddNetMsg((PgNet *)&v2->vfptr, &netcmd, 2);
    v3 = User::GetSelectedAvatarSlot(&g_kUser);
    v4 = (PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr;
    kProto.slot = v3;
    PgNet::SendNetMsg(v4, &kProto, 1);
  }
}

//----- (004791A0) --------------------------------------------------------
int __thiscall CharSelectFrameWork::On_NC_CHAR_LOGIN_ACK(CharSelectFrameWork *this, int iRevBytes, void *pvData)
{
  CharSelectFrameWork *v3; // esi@1
  int v4; // ecx@1
  unsigned int v5; // eax@1

  v3 = this;
  v4 = *((_WORD *)pvData + 8);
  *(_QWORD *)&g_kServer.m_kZoneAddr.m_kAddr.n4_name[0] = *(_QWORD *)pvData;
  g_kServer.m_kZoneAddr.m_kAddr.n4_code[2] = *((_DWORD *)pvData + 2);
  v5 = *((_DWORD *)pvData + 3);
  g_kServer.m_kZoneAddr.m_iPort = v4;
  g_kServer.m_kZoneAddr.m_kAddr.n4_code[3] = v5;
  PgFrameWork::PostFrameMsgStart(ZoneLoginNetFrameWorkID, 0);
  CharSelectMenuWin::ChangeTextColor(v3->m_pkCharSelectMenuWin, 0);
  return iRevBytes;
}

//----- (00479200) --------------------------------------------------------
char __stdcall CharSelectFrameWork::OnLoadShortCutDataOption(PROTO_NC_CHAR_OPTION_GET_SHORTCUTDATA_ACK *pkAck)
{
  SpStream kStream; // [sp+Ch] [bp-1Ch]@2
  int v4; // [sp+24h] [bp-4h]@2

  CharSelectFrameWork::m_bLoadShortCutDataOption = 1;
  ShortCutMgr::Clear(&g_kShortCutMgr);
  OptionManager::Clear(&GameFrameWork::m_kOptionManager);
  OptionManager::Register(&GameFrameWork::m_kOptionManager, (IOptionBase *)&g_kShortCutMgr.vfptr);
  CharSelectFrameWork::ms_bNewCharCreat = 0;
  CharSelectFrameWork::ms_bShortCutDataLoaded = 0;
  if ( pkAck->bSuccess )
  {
    CharSelectFrameWork::ms_bShortCutDataLoaded = 1;
    kStream.m_abyData = (char *)operator new[](0x400u);
    kStream.m_uiMaxSize = 1024;
    kStream.m_uiHeadIndex = 0;
    kStream.m_uiTailIndex = 0;
    v4 = 0;
    SpStream::PushMem(&kStream, &pkAck->Data, 0x400u);
    if ( ShortCutMgr::LoadOption(&kStream) )
    {
      ShortCutMgr::CheckContents(&g_kShortCutMgr);
      operator delete[](kStream.m_abyData);
      return 1;
    }
    CharSelectFrameWork::ms_bShortCutDataLoaded = 0;
    operator delete[](kStream.m_abyData);
  }
  else
  {
    CharSelectFrameWork::ms_bShortCutDataLoaded = 0;
    if ( User::Lv(&g_kUser) <= 5 )
      CharSelectFrameWork::ms_bNewCharCreat = 1;
  }
  return 0;
}
// A886C1: using guessed type bool CharSelectFrameWork::m_bLoadShortCutDataOption;
// A886D3: using guessed type bool CharSelectFrameWork::ms_bNewCharCreat;
// A8C600: using guessed type bool CharSelectFrameWork::ms_bShortCutDataLoaded;

//----- (00479330) --------------------------------------------------------
char __stdcall CharSelectFrameWork::OnLoadShortCutSizeOption(PROTO_NC_CHAR_OPTION_GET_SHORTCUTSIZE_ACK *pkAck)
{
  char result; // al@1
  unsigned int v3; // ecx@2
  __int16 kVersion_4; // [sp+4h] [bp-4h]@2

  result = 1;
  CharSelectFrameWork::m_bLoadShortCutSizeOption = 1;
  if ( pkAck->bSuccess )
  {
    v3 = *(_DWORD *)&pkAck->Data.Data[0];
    kVersion_4 = *(_WORD *)&pkAck->Data.Data[4];
    if ( (_WORD)v3 == MachineOpt::ms_shortCutSizeOptionData.m_kVersion.year
      && (unsigned __int8)(v3 >> 16) == MachineOpt::ms_shortCutSizeOptionData.m_kVersion.month
      && BYTE3(v3) == MachineOpt::ms_shortCutSizeOptionData.m_kVersion.date
      && (_BYTE)kVersion_4 == (_BYTE)word_B4FF9C )
    {
      qmemcpy(&MachineOpt::ms_shortCutSizeOptionData, &pkAck->Data, sizeof(MachineOpt::ms_shortCutSizeOptionData));
      ShortCutWin::m_uiShortcutSubWinIndex = *(_DWORD *)&word_B4FF9C >> 24;
      CharSelectFrameWork::ms_bLoadShortCutSizeOptionSuccess = 1;
    }
    else
    {
      CharSelectFrameWork::ms_bLoadShortCutSizeOptionSuccess = 0;
      result = 0;
    }
  }
  else
  {
    CharSelectFrameWork::ms_bLoadShortCutSizeOptionSuccess = 0;
    result = 0;
  }
  return result;
}
// A886C2: using guessed type bool CharSelectFrameWork::m_bLoadShortCutSizeOption;
// A886D0: using guessed type bool CharSelectFrameWork::ms_bLoadShortCutSizeOptionSuccess;
// A8E0A0: using guessed type unsigned int ShortCutWin::m_uiShortcutSubWinIndex;
// B4FF98: using guessed type struct MachineOpt::StShortCutSizeOption MachineOpt::ms_shortCutSizeOptionData;
// B4FF9C: using guessed type __int16 word_B4FF9C;

//----- (004793E0) --------------------------------------------------------
char __stdcall CharSelectFrameWork::OnLoadWindowPosOption(PROTO_NC_CHAR_OPTION_GET_WINDOWPOS_ACK *pkAck)
{
  char result; // al@1
  unsigned int v3; // ecx@2

  result = 1;
  CharSelectFrameWork::m_bLoadWindowsPosOption = 1;
  if ( pkAck->bSuccess )
  {
    v3 = *(_DWORD *)&pkAck->Data.Data[0];
    if ( (_WORD)v3 == MachineOpt::m_stSaveWinPosOption.m_kVersion.year
      && (unsigned __int8)(v3 >> 16) == MachineOpt::m_stSaveWinPosOption.m_kVersion.month
      && BYTE3(v3) == MachineOpt::m_stSaveWinPosOption.m_kVersion.date
      && (unsigned __int8)*(_WORD *)&pkAck->Data.Data[4] == (_BYTE)word_A76964 )
    {
      qmemcpy(&MachineOpt::m_stSaveWinPosOption, &pkAck->Data, sizeof(MachineOpt::m_stSaveWinPosOption));
      CharSelectFrameWork::ms_bLoadWindowsPosOptionSuccess = 1;
    }
    else
    {
      CharSelectFrameWork::ms_bLoadWindowsPosOptionSuccess = 0;
      result = 0;
    }
  }
  else
  {
    CharSelectFrameWork::ms_bLoadWindowsPosOptionSuccess = 0;
    result = 0;
  }
  return result;
}
// A76960: using guessed type struct MachineOpt::StSaveWinPosOption MachineOpt::m_stSaveWinPosOption;
// A76964: using guessed type __int16 word_A76964;
// A886C3: using guessed type bool CharSelectFrameWork::m_bLoadWindowsPosOption;
// A886D1: using guessed type bool CharSelectFrameWork::ms_bLoadWindowsPosOptionSuccess;

//----- (00479480) --------------------------------------------------------
char __stdcall CharSelectFrameWork::OnLoadKeyMappingOption(PROTO_NC_CHAR_OPTION_GET_KEYMAPPING_ACK *pkAck)
{
  char result; // al@2
  unsigned int v3; // eax@4
  __int16 kVersion_4; // [sp+8h] [bp-4h]@4

  MachineOpt::MakeDefaultKey();
  if ( CharSelectFrameWork::m_bLoadNewKeyMapOption == 1 )
  {
    result = 1;
  }
  else
  {
    CharSelectFrameWork::m_bLoadKeyMappingOption = 1;
    if ( pkAck->bSuccess )
    {
      v3 = *(_DWORD *)&pkAck->Data.Data[0];
      kVersion_4 = *(_WORD *)&pkAck->Data.Data[4];
      if ( (_WORD)v3 == MachineOpt::m_keyMappingBuff.m_kVersion.year
        && (unsigned __int8)(v3 >> 16) == MachineOpt::m_keyMappingBuff.m_kVersion.month
        && BYTE3(v3) == MachineOpt::m_keyMappingBuff.m_kVersion.date
        && (_BYTE)kVersion_4 == (_BYTE)word_A76A6C )
      {
        qmemcpy(&MachineOpt::m_keyMappingBuff, &pkAck->Data, sizeof(MachineOpt::m_keyMappingBuff));
        CharSelectFrameWork::ms_bLoadKeyMappingOptionSuccess = 1;
        if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
        {
          GameFrameWork::SaveAllKeyOpt();
          CharSelectFrameWork::ms_bLoadGameSystemOptionSuccess = 1;
        }
        result = 1;
      }
      else
      {
        CharSelectFrameWork::ms_bLoadKeyMappingOptionSuccess = 0;
        result = 0;
      }
    }
    else
    {
      CharSelectFrameWork::ms_bLoadKeyMappingOptionSuccess = 0;
      result = 0;
    }
  }
  return result;
}
// A76A68: using guessed type struct MachineOpt::StKeyMappingBuffer MachineOpt::m_keyMappingBuff;
// A76A6C: using guessed type __int16 word_A76A6C;
// A886CC: using guessed type bool CharSelectFrameWork::m_bLoadKeyMappingOption;
// A886CD: using guessed type bool CharSelectFrameWork::m_bLoadNewKeyMapOption;
// A886CF: using guessed type bool CharSelectFrameWork::ms_bLoadKeyMappingOptionSuccess;
// A886D2: using guessed type bool CharSelectFrameWork::ms_bLoadGameSystemOptionSuccess;

//----- (00479560) --------------------------------------------------------
char __stdcall CharSelectFrameWork::OnLoadGameOption(PROTO_NC_CHAR_OPTION_GET_GAME_ACK *pkAck)
{
  unsigned int v2; // eax@2
  char result; // al@6
  __int16 kVersion_4; // [sp+4h] [bp-4h]@2

  CharSelectFrameWork::m_bLoadGameSystemOption = 1;
  if ( pkAck->bSuccess )
  {
    v2 = *(_DWORD *)&pkAck->Data.Data[0];
    kVersion_4 = *(_WORD *)&pkAck->Data.Data[4];
    if ( (_WORD)v2 == MachineOpt::ms_kGameOption.m_kVersion.year
      && (unsigned __int8)(v2 >> 16) == byte_B4FF62
      && BYTE3(v2) == byte_B4FF63
      && (_BYTE)kVersion_4 == byte_B4FF64 )
    {
      qmemcpy(&MachineOpt::ms_kGameOption, &pkAck->Data, sizeof(MachineOpt::ms_kGameOption));
      CharSelectFrameWork::ms_bLoadGameSystemOptionSuccess = 1;
      if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
        GameFrameWork::OnSaveServerGameOption();
      result = 1;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A886CE: using guessed type bool CharSelectFrameWork::m_bLoadGameSystemOption;
// A886D2: using guessed type bool CharSelectFrameWork::ms_bLoadGameSystemOptionSuccess;
// B4FF60: using guessed type struct MachineOpt::GameOption MachineOpt::ms_kGameOption;
// B4FF62: using guessed type char byte_B4FF62;
// B4FF63: using guessed type char byte_B4FF63;
// B4FF64: using guessed type char byte_B4FF64;

//----- (00479610) --------------------------------------------------------
int __stdcall CharSelectFrameWork::On_NC_CHAR_OPTION_GET_SHORTCUTDATA_ACK(int iRevBytes, void *pvData)
{
  CharSelectFrameWork::OnLoadShortCutDataOption((PROTO_NC_CHAR_OPTION_GET_SHORTCUTDATA_ACK *)pvData);
  return iRevBytes;
}

//----- (00479630) --------------------------------------------------------
int __stdcall CharSelectFrameWork::On_NC_CHAR_OPTION_GET_SHORTCUTSIZE_ACK(int iRevBytes, void *pvData)
{
  CharSelectFrameWork::OnLoadShortCutSizeOption((PROTO_NC_CHAR_OPTION_GET_SHORTCUTSIZE_ACK *)pvData);
  return iRevBytes;
}

//----- (00479650) --------------------------------------------------------
int __stdcall CharSelectFrameWork::On_NC_CHAR_OPTION_GET_WINDOWPOS_ACK(int iRevBytes, void *pvData)
{
  CharSelectFrameWork::OnLoadWindowPosOption((PROTO_NC_CHAR_OPTION_GET_WINDOWPOS_ACK *)pvData);
  return iRevBytes;
}

//----- (00479670) --------------------------------------------------------
int __stdcall CharSelectFrameWork::On_NC_CHAR_OPTION_GET_KEYMAPPING_ACK(int iRevBytes, void *pvData)
{
  CharSelectFrameWork::OnLoadKeyMappingOption((PROTO_NC_CHAR_OPTION_GET_KEYMAPPING_ACK *)pvData);
  return iRevBytes;
}

//----- (00479690) --------------------------------------------------------
int __stdcall CharSelectFrameWork::On_NC_CHAR_OPTION_GET_GAME_ACK(int iRevBytes, void *pvData)
{
  CharSelectFrameWork::OnLoadGameOption((PROTO_NC_CHAR_OPTION_GET_GAME_ACK *)pvData);
  return iRevBytes;
}

//----- (004796B0) --------------------------------------------------------
int __thiscall CharSelectFrameWork::On_NC_USER_WILL_WORLD_SELECT_ACK(CharSelectFrameWork *this, int iRevBytes, void *pvData)
{
  CharSelectFrameWork *v3; // ebx@1
  PgFrameWork *v4; // eax@2
  int v5; // edx@3
  int v6; // ecx@3
  int v7; // edx@3
  int v8; // ecx@3
  int v9; // edx@3
  int v10; // ecx@3
  int v11; // edx@3
  PgFrameWork *v12; // eax@3
  int v14; // [sp+8h] [bp-20h]@3
  int v15; // [sp+Ch] [bp-1Ch]@3
  int v16; // [sp+10h] [bp-18h]@3
  int v17; // [sp+14h] [bp-14h]@3
  int v18; // [sp+18h] [bp-10h]@3
  int v19; // [sp+1Ch] [bp-Ch]@3
  int v20; // [sp+20h] [bp-8h]@3
  int v21; // [sp+24h] [bp-4h]@3

  v3 = this;
  if ( *(_WORD *)pvData == 7768 )
  {
    v4 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, AccountFrameWorkID);
    if ( v4 )
    {
      qmemcpy(&v14, (char *)pvData + 2, 0x20u);
      v5 = v14;
      *(_DWORD *)&v4[2].m_bInit = v15;
      v6 = v17;
      v4[2].m_BackFrameID = (void *)v5;
      v7 = v16;
      v4[3].m_pkMsgHooker = (IDirectMessenger *)v6;
      v8 = v19;
      v4[3].vfptr = (IDirectMessengerVtbl *)v7;
      v9 = v18;
      v4[3].m_kMsgQ.m_pBase = (PgMsg::Frame *)v8;
      v10 = v21;
      v4[3].m_uiMessageNum = v9;
      v11 = v20;
      v4[3].m_kMsgQ.m_uiHead = v10;
      v4[3].m_kMsgQ.m_uiAlloced = v11;
      CharSelectFrameWork::SelectCancel(v3);
      v12 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v12 )
      {
        LOBYTE(v12[64].m_kMsgQ.m_uiAlloced) = 1;
        return iRevBytes;
      }
    }
  }
  else
  {
    CharSelectFrameWork::SelectCancel(this);
  }
  return iRevBytes;
}

//----- (00479760) --------------------------------------------------------
int __stdcall CharSelectFrameWork::On_NC_CHAR_TUTORIAL_DOING_CMD(int iRevBytes, void *pvData)
{
  LuaScriptMgr *v3; // ecx@1
  LuaScriptMgr *v4; // eax@2
  int v5; // eax@3
  Tutorial *v6; // eax@6
  Tutorial *v7; // eax@7

  v3 = (LuaScriptMgr *)Singleton<LuaScriptMgr>::m_pInstance;
  if ( !Singleton<LuaScriptMgr>::m_pInstance )
  {
    v4 = (LuaScriptMgr *)operator new(0x14u);
    if ( v4 )
      LuaScriptMgr::LuaScriptMgr(v4);
    else
      v5 = 0;
    v3 = (LuaScriptMgr *)v5;
    Singleton<LuaScriptMgr>::m_pInstance = v5;
  }
  LuaScriptMgr::CreateLuaScript(v3, 0);
  v6 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v7 = (Tutorial *)operator new(0xB4u);
    if ( v7 )
      Tutorial::Tutorial(v7);
    else
      v6 = 0;
    Singleton<Tutorial>::m_pInstance = v6;
  }
  v6->m_bEnable = 1;
  return iRevBytes;
}
// A89C94: using guessed type int Singleton<LuaScriptMgr>::m_pInstance;

//----- (00479820) --------------------------------------------------------
void __thiscall CharSelectFrameWork::NcCharTutorialPopupAck(CharSelectFrameWork *this, bool bIsSkip)
{
  CharSelectFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  PROTO_NC_CHAR_TUTORIAL_POPUP_ACK kProto; // [sp+Bh] [bp-1h]@1

  v2 = this;
  v3 = this->m_spWorldMgrNet.m_pObject;
  netcmd.protocol = 4369;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = (PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr;
  kProto.bIsSkip = bIsSkip;
  PgNet::SendNetMsg(v4, &kProto, 1);
}

//----- (00479870) --------------------------------------------------------
int __thiscall CharSelectFrameWork::On_NC_AVATAR_ERASEFAIL_ACK(CharSelectFrameWork *this, int iRevBytes, void *pvData)
{
  CharSelectFrameWork *v3; // esi@1
  char *v4; // eax@2
  CharSelectMenuWin *v5; // ecx@4

  v3 = this;
  if ( *(_WORD *)pvData == 199 )
    v4 = (char *)TextData::Get(0x867B86D0);
  else
    v4 = (char *)TextData::Get(0x402F9560u);
  MsgBox::Modal(MSGBOX_OK, v4);
  v5 = v3->m_pkCharSelectMenuWin;
  v3->m_iEraseSlot = -1;
  ((void (__stdcall *)(signed int))v5->vfptr[63].__vecDelDtor)(1);
  return iRevBytes;
}

//----- (004798D0) --------------------------------------------------------
int __thiscall CharSelectFrameWork::On_NC_AVATAR_ERASESUCC_ACK(CharSelectFrameWork *this, int iRevBytes, void *pvData)
{
  char *v3; // edi@1
  CharSelectFrameWork *v4; // esi@1
  void *v5; // ebx@2
  CharSelectMenuWin *v6; // ecx@5
  char v7; // al@5

  v3 = (char *)pvData;
  v4 = this;
  User::MarkAsErased(&g_kUser, *(_BYTE *)pvData);
  User::DeleteAvatar(&g_kUser, *v3);
  ((void (__stdcall *)(void **, NiNode *))v4->m_aspAvatarPos[(unsigned __int8)*v3].m_pObject->vfptr[30].__vecDelDtor)(
    &pvData,
    v4->m_apkAvatar[(unsigned __int8)*v3]->m_spScene.m_pObject);
  if ( pvData )
  {
    v5 = pvData;
    if ( !InterlockedDecrement((volatile LONG *)pvData + 1) )
    {
      if ( v5 )
        (**(void (__thiscall ***)(void *, signed int))v5)(v5, 1);
    }
  }
  CharMgr::DeleteAvatar(&g_kCharMgr, (Char *)&v4->m_apkAvatar[(unsigned __int8)*v3]->vfptr);
  v4->m_apkAvatar[(unsigned __int8)*v3] = 0;
  v6 = v4->m_pkCharSelectMenuWin;
  v4->m_iEraseSlot = -1;
  ((void (__stdcall *)(signed int))v6->vfptr[63].__vecDelDtor)(1);
  v7 = 0;
  if ( v4->m_apkAvatar[0] )
    v7 = 1;
  if ( v4->m_apkAvatar[1] )
    v7 = 1;
  if ( v4->m_apkAvatar[2] )
    v7 = 1;
  if ( v4->m_apkAvatar[3] )
    v7 = 1;
  if ( v4->m_apkAvatar[4] )
    v7 = 1;
  if ( !v4->m_apkAvatar[5] && !v7 )
    CharSelectMenuWin::DisplayNoCharMsg(v4->m_pkCharSelectMenuWin);
  if ( (unsigned __int8)((int (*)(void))v4->m_pkChangeNameWin->vfptr[65].__vecDelDtor)() == 1 )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkChangeNameWin->vfptr);
  CharSelectMenuWin::ChangeTextColor(v4->m_pkCharSelectMenuWin, 0);
  return iRevBytes;
}

//----- (00479A10) --------------------------------------------------------
int __thiscall CharSelectFrameWork::On_NC_CHAR_LOGINFAIL_ACK(CharSelectFrameWork *this, int iRevBytes, void *pvData)
{
  signed int v3; // eax@1
  CharSelectFrameWork *v4; // edi@1
  NiUnsharedGeometryGroup *v5; // eax@4
  char *v6; // esi@9
  MsgBox *v7; // eax@12
  PgMsg::Frame kMsg; // [sp+8h] [bp-18h]@12

  v3 = *(_WORD *)pvData;
  v4 = this;
  if ( v3 > 1410 )
  {
    switch ( v3 )
    {
      case 1411:
        v5 = TextData::Get(0x36996552u);
        break;
      case 1412:
        v5 = TextData::Get(0x3C92CBA8u);
        break;
      case 1413:
        v5 = TextData::Get(0x209DBCA0u);
        break;
      case 1414:
        v5 = TextData::Get(0x3D956D55u);
        break;
      case 1415:
        v5 = TextData::Get(0x439C695Fu);
        break;
      case 1416:
        v5 = TextData::Get(0x2B9C7959u);
        break;
      case 1417:
        v5 = TextData::Get(0x328E6DA0u);
        break;
      case 1418:
        v5 = TextData::Get(0x4099779Bu);
        break;
      case 1419:
        v5 = TextData::Get(0x29956D5Fu);
        break;
      case 1420:
        v5 = TextData::Get(0x289566A4u);
        break;
      case 1421:
        v5 = TextData::Get(0xEE49784F);
        break;
      case 1422:
        v5 = TextData::Get(0x2097695Cu);
        break;
      case 1423:
        v5 = TextData::Get(0x32A069A1u);
        break;
      case 1424:
        v5 = TextData::Get(0x5706D45u);
        break;
      case 1425:
        v5 = TextData::Get(0xE796695E);
        break;
      case 1426:
        v5 = TextData::Get(0x7EE9AEA6u);
        break;
      case 1427:
        v5 = TextData::Get(0x37957853u);
        break;
      case 1428:
        v5 = TextData::Get(0x398A715Bu);
        break;
      case 1429:
        v5 = TextData::Get(0xB24FEB22);
        break;
      default:
        goto $LN3_36;
    }
  }
  else if ( v3 == 1410 )
  {
    v5 = TextData::Get(0xE08E774B);
  }
  else
  {
    switch ( v3 )
    {
      case 321:
        v5 = TextData::Get(0xE452836u);
        goto LABEL_9;
      case 322:
      case 323:
        v5 = TextData::Get(0x325B828Fu);
        goto LABEL_9;
      case 324:
        v5 = TextData::Get(0x2B4E8FA1u);
        goto LABEL_9;
      case 328:
        TextData2::Get(0x719584DDu);
        break;
      default:
        break;
    }
$LN3_36:
    v5 = TextData::Get(0x807B787E);
  }
LABEL_9:
  v6 = (char *)v5;
  if ( v5 )
  {
    if ( v4->m_spkMsgBox.m_pObject )
      PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v4->m_spkMsgBox.m_pObject->vfptr);
    v7 = MsgBox::Modal(MSGBOX_OK, v6);
    kMsg.m_uiFrameMsg = 14;
    MsgBox::SetFrameWorkMsgOnClose(v7, (PgFrameWork *)&v4->vfptr, &kMsg, 0);
  }
  return iRevBytes;
}

//----- (00479C10) --------------------------------------------------------
void __thiscall CharSelectFrameWork::On_NC_AVATAR_RENAME_REQ(CharSelectFrameWork *this, Name5 newName)
{
  CharSelectFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@2
  NETCOMMAND netcmd; // [sp+8h] [bp-20h]@2
  PROTO_NC_AVATAR_RENAME_REQ kProto; // [sp+Ch] [bp-1Ch]@2

  v2 = this;
  v3 = this->m_spWorldMgrNet.m_pObject;
  if ( v3 )
  {
    netcmd.protocol = 5135;
    PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
    *(_QWORD *)&kProto.NewName.n5_code[3] = 0i64;
    *(_QWORD *)&kProto.NewName.n5_code[1] = 0i64;
    kProto.NewName.n5_code[0] = 0;
    kProto.SlotNo = User::GetSelectedAvatarSlot(&g_kUser);
    kProto.NewName.n5_code[2] = newName.n5_code[2];
    *(_QWORD *)&kProto.NewName.n5_name[0] = *(_QWORD *)&newName.n5_name[0];
    v4 = (PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr;
    *(_QWORD *)&kProto.NewName.n5_code[3] = *(_QWORD *)&newName.n5_code[3];
    PgNet::SendNetMsg(v4, &kProto, 21);
  }
}

//----- (00479CB0) --------------------------------------------------------
int __thiscall CharSelectFrameWork::On_NC_AVATAR_RENAME_ACK(CharSelectFrameWork *this, int iRevBytes, void *pvData)
{
  __int16 v3; // ax@1
  CharSelectFrameWork *v4; // ebx@1
  PROTO_AVATARINFORMATION *v5; // eax@2
  PROTO_AVATARINFORMATION *v6; // esi@2
  CharSelectMenuWin *v7; // edi@3
  PgWin *v8; // ebx@5
  char *v10; // eax@8

  v3 = *(_WORD *)((char *)pvData + 21);
  v4 = this;
  if ( v3 == 208 )
  {
    v5 = User::GetAvatarInfoBySlot(&g_kUser, *(_BYTE *)pvData);
    v6 = v5;
    if ( v5 )
    {
      v5->name.n5_code[0] = *(_DWORD *)((char *)pvData + 1);
      v5->name.n5_code[1] = *(_DWORD *)((char *)pvData + 5);
      v5->name.n5_code[2] = *(_DWORD *)((char *)pvData + 9);
      v5->name.n5_code[3] = *(_DWORD *)((char *)pvData + 13);
      v5->name.n5_code[4] = *(_DWORD *)((char *)pvData + 17);
      v7 = v4->m_pkCharSelectMenuWin;
      if ( v7 )
      {
        ((void (__stdcall *)(signed int))v7->m_pkOkBut->vfptr[60].__vecDelDtor)(1);
        ((void (__stdcall *)(signed int))v7->m_pkDelCharBtn->vfptr[60].__vecDelDtor)(1);
        CharSelectMenuWin::SetMenuTextInfo(v4->m_pkCharSelectMenuWin, v6);
      }
      v8 = (PgWin *)&v4->m_pkChangeNameWin->vfptr;
      if ( v8 )
      {
        PgWinMgr::CloseWin(&Pgg_kWinMgr, v8);
        return iRevBytes;
      }
    }
  }
  else if ( v3 == 209 )
  {
    v10 = (char *)TextData::Get(0x3095528Au);
    MsgBox::Modeless(MSGBOX_OK, v10);
  }
  return iRevBytes;
}

//----- (00479D80) --------------------------------------------------------
void __thiscall CharSelectFrameWork::NcUserConnectChangeCharIDReq(CharSelectFrameWork *this, Name5 CharName)
{
  CharSelectFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@2
  NETCOMMAND netcmd; // [sp+8h] [bp-20h]@2
  PROTO_NC_USER_CONNECTION_CHANGE_CHAR_ID_REQ kProto; // [sp+Ch] [bp-1Ch]@2

  v2 = this;
  v3 = this->m_spWorldMgrNet.m_pObject;
  if ( v3 )
  {
    netcmd.protocol = -19447;
    PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
    *(_QWORD *)&kProto.sNewID.n5_code[3] = 0i64;
    *(_QWORD *)&kProto.sNewID.n5_code[1] = 0i64;
    kProto.sNewID.n5_code[0] = 0;
    kProto.nSlotNo = User::GetSelectedAvatarSlot(&g_kUser);
    kProto.sNewID.n5_code[2] = CharName.n5_code[2];
    *(_QWORD *)&kProto.sNewID.n5_name[0] = *(_QWORD *)&CharName.n5_name[0];
    v4 = (PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr;
    *(_QWORD *)&kProto.sNewID.n5_code[3] = *(_QWORD *)&CharName.n5_code[3];
    PgNet::SendNetMsg(v4, &kProto, 21);
  }
}

//----- (00479E20) --------------------------------------------------------
int __thiscall CharSelectFrameWork::On_NC_USER_CONNECTION_CHANGE_CHAR_ID_ACK(CharSelectFrameWork *this, int iRevBytes, void *pvData)
{
  CharSelectFrameWork *v3; // edi@1
  PROTO_AVATARINFORMATION *v4; // eax@1
  int v5; // ST0C_4@5
  char *v6; // eax@5
  char *v7; // eax@5
  char *v8; // eax@6
  CharSelectMenuWin *v9; // ecx@8
  CharSelectMenuWin *v10; // esi@10

  v3 = this;
  v4 = User::GetAvatarInfoBySlot(&g_kUser, *((_BYTE *)pvData + 2));
  if ( v4 )
  {
    if ( *(_WORD *)pvData == 8384 )
    {
      v4->name.n5_code[0] = *(_DWORD *)((char *)pvData + 3);
      v4->name.n5_code[1] = *(_DWORD *)((char *)pvData + 7);
      v4->name.n5_code[2] = *(_DWORD *)((char *)pvData + 11);
      v4->name.n5_code[3] = *(_DWORD *)((char *)pvData + 15);
      v4->name.n5_code[4] = *(_DWORD *)((char *)pvData + 19);
      *(_WORD *)&v4->CharIDChangeData.bNeedChangeID = 0;
      v9 = v3->m_pkCharSelectMenuWin;
      if ( v9 )
        CharSelectMenuWin::SetMenuTextInfo(v9, v4);
      v10 = v3->m_pkCharSelectMenuWin;
      ((void (__stdcall *)(signed int))v10->m_pkOkBut->vfptr[60].__vecDelDtor)(1);
      ((void (__stdcall *)(signed int))v10->m_pkDelCharBtn->vfptr[60].__vecDelDtor)(1);
      v8 = (char *)TextData2::Get(0xD6E60B0F);
    }
    else if ( *(_WORD *)pvData == 8391 )
    {
      v8 = (char *)TextData2::Get(0xA25201Du);
    }
    else
    {
      if ( *(_WORD *)pvData != 8401 )
      {
        v5 = *(_WORD *)pvData;
        v6 = (char *)TextData2::Get(0xA7D8C2F0);
        v7 = fs(v6, v5);
        MsgBox::Modal(MSGBOX_OK, v7);
LABEL_12:
        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkChangeNameWin->vfptr);
        return iRevBytes;
      }
      v8 = (char *)TextData::Get(0xA9BFDEC5);
    }
    MsgBox::Modal(MSGBOX_OK, v8);
    goto LABEL_12;
  }
  return iRevBytes;
}

//----- (00479F20) --------------------------------------------------------
int __thiscall CharSelectFrameWork::On_NC_CHAR_TUTORIAL_POPUP_REQ(CharSelectFrameWork *this, int iRevBytes, void *pvData)
{
  CharSelectFrameWork *v3; // esi@1
  char *v4; // eax@1
  MsgBox *v5; // eax@1
  PgMsg::Frame kOkMsg; // [sp+4h] [bp-2Ch]@1
  PgMsg::Frame kCancelMsg; // [sp+18h] [bp-18h]@1

  v3 = this;
  v4 = (char *)TextData3::Get(0x1E498394u);
  v5 = MsgBox::Modal(MSGBOX_OKCANCEL, v4);
  kOkMsg.m_uiFrameMsg = 21;
  kCancelMsg.m_uiFrameMsg = 21;
  kOkMsg.m_uiFrameWParam = 0;
  kCancelMsg.m_uiFrameWParam = 1;
  MsgBox::SetFrameWorkMsgOnClose(v5, (PgFrameWork *)&v3->vfptr, &kOkMsg, &kCancelMsg);
  return iRevBytes;
}

//----- (00479F90) --------------------------------------------------------
int __thiscall CharSelectFrameWork::ProcessNetMsg(CharSelectFrameWork *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  int result; // eax@1

  result = 0;
  switch ( iDepart )
  {
    case 45:
      if ( iCommand == 12 )
        result = CharSelectFrameWork::On_NC_USER_CONNECTION_CHANGE_CHAR_ID_ACK(this, iRevBytes, pvData);
      break;
    case 8:
      if ( iCommand == 17 )
        result = iRevBytes;
      break;
    case 4:
      if ( iCommand > 272 )
      {
        if ( iCommand == 285 )
          result = CharSelectFrameWork::On_NC_CHAR_TUTORIAL_DOING_CMD(iRevBytes, pvData);
      }
      else
      {
        switch ( iCommand )
        {
          case 272:
            result = CharSelectFrameWork::On_NC_CHAR_TUTORIAL_POPUP_REQ(this, iRevBytes, pvData);
            break;
          case 2:
            result = CharSelectFrameWork::On_NC_CHAR_LOGINFAIL_ACK(this, iRevBytes, pvData);
            break;
          case 3:
            result = CharSelectFrameWork::On_NC_CHAR_LOGIN_ACK(this, iRevBytes, pvData);
            break;
        }
      }
      break;
    case 5:
      switch ( iCommand )
      {
        case 10:
          result = CharSelectFrameWork::On_NC_AVATAR_ERASEFAIL_ACK(this, iRevBytes, pvData);
          break;
        case 12:
          result = CharSelectFrameWork::On_NC_AVATAR_ERASESUCC_ACK(this, iRevBytes, pvData);
          break;
        case 16:
          result = CharSelectFrameWork::On_NC_AVATAR_RENAME_ACK(this, iRevBytes, pvData);
          break;
      }
      break;
    case 3:
      if ( iCommand == 23 )
      {
        result = CharSelectFrameWork::On_NC_USER_CONNECTCUT_CMD(iRevBytes, pvData);
      }
      else if ( iCommand == 52 )
      {
        result = CharSelectFrameWork::On_NC_USER_WILL_WORLD_SELECT_ACK(this, iRevBytes, pvData);
      }
      break;
    case 28:
      switch ( iCommand )
      {
        case 50:
          result = CharSelectFrameWork::On_NC_CHAR_OPTION_IMPROVE_GET_SHORTCUTDATA_CMD(iRevBytes, pvData);
          break;
        case 51:
          result = CharSelectFrameWork::On_NC_CHAR_OPTION_IMPROVE_GET_KEYMAP_CMD(iRevBytes, pvData);
          break;
        case 52:
          result = CharSelectFrameWork::On_NC_CHAR_OPTION_IMPROVE_GET_GAMEOPTION_CMD(iRevBytes, pvData);
          break;
        case 3:
          CharSelectFrameWork::OnLoadShortCutDataOption((PROTO_NC_CHAR_OPTION_GET_SHORTCUTDATA_ACK *)pvData);
          result = iRevBytes;
          break;
        case 5:
          CharSelectFrameWork::OnLoadShortCutSizeOption((PROTO_NC_CHAR_OPTION_GET_SHORTCUTSIZE_ACK *)pvData);
          result = iRevBytes;
          break;
        case 13:
          CharSelectFrameWork::OnLoadWindowPosOption((PROTO_NC_CHAR_OPTION_GET_WINDOWPOS_ACK *)pvData);
          result = iRevBytes;
          break;
        case 15:
          CharSelectFrameWork::OnLoadKeyMappingOption((PROTO_NC_CHAR_OPTION_GET_KEYMAPPING_ACK *)pvData);
          result = iRevBytes;
          break;
        case 11:
          CharSelectFrameWork::OnLoadGameOption((PROTO_NC_CHAR_OPTION_GET_GAME_ACK *)pvData);
          result = iRevBytes;
          break;
        case 7:
        case 9:
          goto $LN85_7;
        default:
          return result;
      }
      break;
    case 22:
      if ( iCommand == 11 )
      {
        CharSelectFrameWork::OnLoadGameOption((PROTO_NC_CHAR_OPTION_GET_GAME_ACK *)pvData);
        result = iRevBytes;
      }
      break;
    case 31:
      if ( iCommand == 7 )
        result = CharSelectFrameWork::On_NC_PRISON_GET_ACK(iRevBytes, pvData);
      break;
    case 36:
      if ( iCommand == 16 )
      {
        if ( *(_BYTE *)pvData <= 0x14u )
          PrivateStoreWin::ms_byBoothSize = *(_BYTE *)pvData;
$LN85_7:
        result = iRevBytes;
      }
      break;
    default:
      return result;
  }
  return result;
}
// A71184: using guessed type unsigned __int8 PrivateStoreWin::ms_byBoothSize;

//----- (0047A260) --------------------------------------------------------
void __thiscall SpStream::~SpStream(NiTSet<CPostProcessEffect *> *this)
{
  operator delete[](this->m_pBase);
}

//----- (0047A280) --------------------------------------------------------
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_QUEST_DOING_CMD(int iRevBytes, void *pvData)
{
  CClientQuest *v3; // eax@1

  v3 = QuestDataMgr::GetQuest();
  CQuest::Recv_NC_CHAR_QUEST_DOING_CMD_ACK((CQuest *)&v3->vfptr, (PROTO_NC_CHAR_QUEST_DOING_CMD *)pvData);
  return iRevBytes;
}

//----- (0047A2A0) --------------------------------------------------------
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_QUEST_DONE_CMD(int iRevBytes, void *pvData)
{
  CClientQuest *v3; // eax@1

  v3 = QuestDataMgr::GetQuest();
  CQuest::Recv_NC_CHAR_QUEST_DONE_CMD_ACK((CQuest *)&v3->vfptr, (PROTO_NC_CHAR_QUEST_DONE_CMD *)pvData);
  return iRevBytes;
}

//----- (0047A2C0) --------------------------------------------------------
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_QUEST_READ_CMD(int iRevBytes, void *pvData)
{
  CClientQuest *v3; // eax@1

  v3 = QuestDataMgr::GetQuest();
  CQuest::Recv_NC_CHAR_QUEST_READ_CMD_ACK((CQuest *)&v3->vfptr, (PROTO_NC_CHAR_QUEST_READ_CMD *)pvData);
  return iRevBytes;
}

//----- (0047A2E0) --------------------------------------------------------
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_QUEST_REPEAT_CMD(int iRevBytes, void *pvData)
{
  CClientQuest *v3; // eax@1

  v3 = QuestDataMgr::GetQuest();
  CQuest::Recv_NC_CHAR_QUEST_REPEAT_CMD_ACK((CQuest *)&v3->vfptr, (PROTO_NC_CHAR_QUEST_REPEAT_CMD *)pvData);
  return iRevBytes;
}

//----- (0047A300) --------------------------------------------------------
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_ABSTATE_CMD(int iRevBytes, void *pvData)
{
  User::InitABState(&g_kUser, (PROTO_NC_CHAR_ABSTATE_CMD *)pvData);
  return iRevBytes;
}

//----- (0047A320) --------------------------------------------------------
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_SKILL_CMD(int iRevBytes, void *pvData)
{
  Skill::InitSkill((PROTO_NC_CHAR_CLIENT_SKILL_CMD *)pvData);
  return iRevBytes;
}

//----- (0047A340) --------------------------------------------------------
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_PASSIVE_CMD(int iRevBytes, void *pvData)
{
  Skill::InitPassiveSkill((PROTO_NC_CHAR_SKILL_PASSIVE_CMD *)pvData);
  return iRevBytes;
}

//----- (0047A360) --------------------------------------------------------
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_CHARTITLE_CMD(int iRevBytes, void *pvData)
{
  MainChar::InitCharactorTitle((MainChar *)g_pkMainChar, (PROTO_NC_CHAR_CLIENT_CHARTITLE_CMD *)pvData);
  return iRevBytes;
}

//----- (0047A380) --------------------------------------------------------
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_ITEM_CMD(int iRevBytes, void *pvData)
{
  Inventory::InitData(&g_kInventory, (PROTO_NC_CHAR_CLIENT_ITEM_CMD *)pvData, (char *)pvData);
  ShortCutMgr::InitShortCutFromInventory(&g_kShortCutMgr);
  return iRevBytes;
}

//----- (0047A3B0) --------------------------------------------------------
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_GAME_CMD(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0047A3C0) --------------------------------------------------------
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_CHARGEDBUFF_CMD(int iRevBytes, void *pvData)
{
  signed int v3; // edi@1
  PROTO_CHARGEDBUFF_INFO *v4; // esi@2

  ChargedItemList::Clear();
  v3 = 0;
  if ( *(_WORD *)pvData > 0u )
  {
    v4 = (PROTO_CHARGEDBUFF_INFO *)((char *)pvData + 2);
    do
    {
      ChargedItemList::AddUsingItem(v4);
      ++v3;
      ++v4;
    }
    while ( v3 < *(_WORD *)pvData );
  }
  return iRevBytes;
}

//----- (0047A400) --------------------------------------------------------
int __stdcall ZoneLoginNetFrameWork::On_NC_CHARGED_BOOTHSLOTSIZE_CMD(int iRevBytes, void *pvData)
{
  if ( *(_BYTE *)pvData <= 0x14u )
    PrivateStoreWin::ms_byBoothSize = *(_BYTE *)pvData;
  return iRevBytes;
}
// A71184: using guessed type unsigned __int8 PrivateStoreWin::ms_byBoothSize;

//----- (0047A420) --------------------------------------------------------
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_COININFO_CMD(int iRevBytes, void *pvData)
{
  User::SetCoin(&g_kUser, *(_QWORD *)pvData);
  User::SetExchangeableCoin(&g_kUser, *((_QWORD *)pvData + 1));
  return iRevBytes;
}

//----- (0047A460) --------------------------------------------------------
int __stdcall ZoneLoginNetFrameWork::On_NC_QUEST_RESET_TIME_CLIENT_CMD(int iRevBytes, void *pvData)
{
  CClientQuest *v3; // eax@1

  v3 = QuestDataMgr::GetQuest();
  CClientQuest::SetQuestResetTime(v3, (PROTO_NC_QUEST_RESET_TIME_CMD *)pvData);
  return iRevBytes;
}

//----- (0047A480) --------------------------------------------------------
void __thiscall ZoneLoginNetFrameWork::Terminate(ZoneLoginNetFrameWork *this)
{
  ZoneLoginNetFrameWork *v1; // esi@1
  Net *v2; // edi@1

  v1 = this;
  v2 = this->m_spZoneNet.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spZoneNet.m_pObject = 0;
  }
  v1->m_BackFrameID = 0;
  v1->m_bInit = 0;
}

//----- (0047A4C0) --------------------------------------------------------
void __thiscall ZoneLoginNetFrameWork::Update(ZoneLoginNetFrameWork *this, float fCurTime)
{
  ZoneLoginNetFrameWork *v2; // esi@1
  bool v3; // al@3
  Net *v4; // ecx@12
  PgNet *v5; // ecx@14

  v2 = this;
  v3 = CharSelectFrameWork::m_bLoadKeyMappingOption || CharSelectFrameWork::m_bLoadNewKeyMapOption;
  if ( CharSelectFrameWork::m_bLoadShortCutDataOption
    && CharSelectFrameWork::m_bLoadShortCutSizeOption
    && CharSelectFrameWork::m_bLoadWindowsPosOption
    && v3
    && CharSelectFrameWork::m_bLoadGameSystemOption
    && CharSelectFrameWork::ms_bGetPrisonInfo )
  {
    CharSelectFrameWork::m_bLoadShortCutDataOption = 0;
    CharSelectFrameWork::m_bLoadShortCutSizeOption = 0;
    CharSelectFrameWork::m_bLoadWindowsPosOption = 0;
    CharSelectFrameWork::m_bLoadKeyMappingOption = 0;
    CharSelectFrameWork::m_bLoadNewKeyMapOption = 0;
    CharSelectFrameWork::m_bLoadGameSystemOption = 0;
    CharSelectFrameWork::ms_bGetPrisonInfo = 0;
    PgFrameWork::PostMsgToFrameWork(CharSelectFrameWorkID, &this->m_kMapLoginMsg);
    PgFrameWork::PostFrameMsgTerminate((PgFrameWork *)&v2->vfptr);
    PgNet::StopDispatchMsg((PgNet *)&v2->m_spZoneNet.m_pObject->vfptr);
  }
  else
  {
    v4 = this->m_spZoneNet.m_pObject;
    if ( v4 )
      ((void (__stdcall *)(_DWORD, _DWORD))v4->vfptr[4].__vecDelDtor)(v2, 100);
    PgFrameWork::ProcessAllMsg((PgFrameWork *)&v2->vfptr);
    v5 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
    if ( v5 )
      PgNet::Flush(v5);
  }
}
// A886C1: using guessed type bool CharSelectFrameWork::m_bLoadShortCutDataOption;
// A886C2: using guessed type bool CharSelectFrameWork::m_bLoadShortCutSizeOption;
// A886C3: using guessed type bool CharSelectFrameWork::m_bLoadWindowsPosOption;
// A886CC: using guessed type bool CharSelectFrameWork::m_bLoadKeyMappingOption;
// A886CD: using guessed type bool CharSelectFrameWork::m_bLoadNewKeyMapOption;
// A886CE: using guessed type bool CharSelectFrameWork::m_bLoadGameSystemOption;
// A886D4: using guessed type bool CharSelectFrameWork::ms_bGetPrisonInfo;

//----- (0047A590) --------------------------------------------------------
void __thiscall ZoneLoginNetFrameWork::OnTryConnectToZone(ZoneLoginNetFrameWork *this)
{
  ZoneLoginNetFrameWork *v1; // esi@1
  PgMsg::Frame kMsg; // [sp+4h] [bp-18h]@2

  v1 = this;
  if ( !(unsigned __int8)((int (*)(void))this->m_spZoneNet.m_pObject->vfptr[2].__vecDelDtor)() )
  {
    kMsg.m_uiFrameMsg = 11;
    PgFrameWork::PostMsgToFrameWork(CharSelectFrameWorkID, &kMsg);
    PgFrameWork::PostFrameMsgTerminate((PgFrameWork *)&v1->vfptr);
  }
}

//----- (0047A5E0) --------------------------------------------------------
void __thiscall ZoneLoginNetFrameWork::NcMapLoginCompleteCmd(ZoneLoginNetFrameWork *this)
{
  Net *v1; // ecx@1
  PgFrameWork *v2; // eax@2
  ZoneLoginNetFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  v1 = this->m_spZoneNet.m_pObject;
  if ( v1 )
  {
    LOWORD(netcmd) = 6147;
    PgNet::SendNetMsg((PgNet *)&v1->vfptr, &netcmd, 2);
    v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v2 )
      LOBYTE(v2[141].m_kMsgQ.m_pBase) = 1;
  }
}

//----- (0047A620) --------------------------------------------------------
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_BASE_CMD(int iRevBytes, void *pvData)
{
  int v3; // eax@1
  int v4; // ecx@1
  int v5; // edx@1
  int v6; // eax@1
  int v7; // eax@1
  char v8; // cl@2
  int result; // eax@3
  char acCharName[257]; // [sp+4h] [bp-108h]@1

  Skill::SetEmpowerResetable(*((_BYTE *)pvData + 101) & 1);
  User::SetMainCharBaseData(&g_kUser, (PROTO_NC_CHAR_BASE_CMD *)pvData);
  v3 = *((_DWORD *)pvData + 2);
  v4 = *((_DWORD *)pvData + 3);
  *(_DWORD *)acCharName = *((_DWORD *)pvData + 1);
  v5 = *((_DWORD *)pvData + 4);
  *(_DWORD *)&acCharName[4] = v3;
  v6 = *((_DWORD *)pvData + 5);
  *(_DWORD *)&acCharName[12] = v5;
  *(_DWORD *)&acCharName[16] = v6;
  *(_DWORD *)&acCharName[8] = v4;
  acCharName[20] = 0;
  acCharName[256] = 0;
  v7 = 0;
  do
  {
    v8 = acCharName[v7];
    byte_B26420[v7++] = v8;
  }
  while ( v8 );
  result = iRevBytes;
  dword_B26460 = *((_BYTE *)pvData + 25);
  return result;
}
// B26460: using guessed type int dword_B26460;

//----- (0047A6C0) --------------------------------------------------------
void __thiscall ZoneLoginNetFrameWork::ZoneLoginNetFrameWork(ZoneLoginNetFrameWork *this)
{
  ZoneLoginNetFrameWork *v1; // esi@1

  v1 = this;
  this->m_pkMsgHooker = 0;
  this->m_uiMessageNum = 0;
  this->vfptr = (IDirectMessengerVtbl *)&PgFrameWork::`vftable';
  this->m_kMsgQ.m_pBase = (PgMsg::Frame *)operator new[](0x14u);
  v1->m_kMsgQ.m_uiTail = 0;
  v1->m_kMsgQ.m_uiAlloced = 1;
  v1->m_kMsgQ.m_uiHead = -1;
  v1->m_BackFrameID = 0;
  v1->m_bInit = 0;
  v1->vfptr = (IDirectMessengerVtbl *)&ZoneLoginNetFrameWork::`vftable';
  v1->m_spZoneNet.m_pObject = 0;
}
// 970534: using guessed type void (__thiscall *PgFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 980814: using guessed type void (__thiscall *ZoneLoginNetFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);

//----- (0047A720) --------------------------------------------------------
void __thiscall ZoneLoginNetFrameWork::~ZoneLoginNetFrameWork(ZoneLoginNetFrameWork *this)
{
  ZoneLoginNetFrameWork *v1; // edi@1
  Net *v2; // esi@1
  Net *v3; // esi@6
  PgMsg::Frame *v4; // ST00_4@10

  v1 = this;
  this->vfptr = (IDirectMessengerVtbl *)&ZoneLoginNetFrameWork::`vftable';
  v2 = this->m_spZoneNet.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spZoneNet.m_pObject = 0;
  }
  v3 = v1->m_spZoneNet.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v4 = v1->m_kMsgQ.m_pBase;
  v1->vfptr = (IDirectMessengerVtbl *)&PgFrameWork::`vftable';
  operator delete[](v4);
}
// 970534: using guessed type void (__thiscall *PgFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 980814: using guessed type void (__thiscall *ZoneLoginNetFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);

//----- (0047A7D0) --------------------------------------------------------
char __thiscall ZoneLoginNetFrameWork::Init(ZoneLoginNetFrameWork *this, PgMsg::Frame *ptFrameMsg)
{
  ZoneLoginNetFrameWork *v2; // esi@1
  Net *v3; // ebx@1
  Net *v4; // edi@1
  CClientQuest *v5; // esi@8
  PgMsg::Frame kMsg; // [sp+Ch] [bp-2Ch]@8
  char acstr[17]; // [sp+20h] [bp-18h]@1

  v2 = this;
  v3 = g_kNetMgr.m_spZone[g_kNetMgr.m_iNowConnectedZone].m_pObject;
  v4 = this->m_spZoneNet.m_pObject;
  *(_QWORD *)acstr = *(_QWORD *)&g_kServer.m_kZoneAddr.m_kAddr.n4_name[0];
  *(_QWORD *)&acstr[8] = *(_QWORD *)&g_kServer.m_kZoneAddr.m_kAddr.n4_code[2];
  acstr[16] = 0;
  if ( v4 != v3 )
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v2->m_spZoneNet.m_pObject = v3;
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
  PgNet::SetAddress((PgNet *)&v2->m_spZoneNet.m_pObject->vfptr, acstr);
  PgNet::SetPortA((PgNet *)&v2->m_spZoneNet.m_pObject->vfptr, g_kServer.m_kZoneAddr.m_iPort);
  kMsg.m_uiFrameMsg = 9;
  PgFrameWork::PostMsgToMe((PgFrameWork *)&v2->vfptr, &kMsg);
  v2->m_bInit = 1;
  v5 = QuestDataMgr::GetQuest();
  CQuest::ClearQuest((CQuest *)&v5->vfptr);
  v5->vfptr->QuestPlayer_TimeProcess((CQuest *)v5);
  return 1;
}

//----- (0047A8B0) --------------------------------------------------------
void __thiscall ZoneLoginNetFrameWork::ProcessMsg(ZoneLoginNetFrameWork *this, unsigned int uiMsg, unsigned int uiwParam, unsigned int uilParam)
{
  ZoneLoginNetFrameWork *v4; // esi@1
  PgMsg::Frame pkFrameMsg; // [sp+4h] [bp-18h]@3

  v4 = this;
  if ( uiMsg == 9 && !(unsigned __int8)((int (*)(void))this->m_spZoneNet.m_pObject->vfptr[2].__vecDelDtor)() )
  {
    pkFrameMsg.m_uiFrameMsg = 11;
    PgFrameWork::PostMsgToFrameWork(CharSelectFrameWorkID, &pkFrameMsg);
    PgFrameWork::PostFrameMsgTerminate((PgFrameWork *)&v4->vfptr);
  }
}

//----- (0047A910) --------------------------------------------------------
int __thiscall ZoneLoginNetFrameWork::On_NC_MAP_LOGINFAIL_ACK(ZoneLoginNetFrameWork *this, int iRevBytes, void *pvData)
{
  ZoneLoginNetFrameWork *v3; // esi@1
  unsigned int v4; // ecx@1
  char *v5; // eax@2
  MsgBox *v6; // eax@2
  PgMsg::Frame kMsg; // [sp+4h] [bp-18h]@1

  v3 = this;
  v4 = *(_WORD *)pvData;
  kMsg.m_uiFrameMsg = 13;
  kMsg.m_uiFrameWParam = v4;
  if ( v4 == 327 )
  {
    CShnDataFileCheckSum::GetDataFileName(&ShnDataFile, (SHN_DATA_FILE_INDEX)*((_BYTE *)pvData + 2));
    kMsg.m_uiFrameMsg = 12;
    v5 = (char *)TextData::Get(0x8899DAD5);
    v6 = MsgBox::Modal(MSGBOX_OK, v5);
    PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)&v6->vfptr);
  }
  PgFrameWork::PostMsgToFrameWork(CharSelectFrameWorkID, &kMsg);
  PgFrameWork::PostFrameMsgTerminate((PgFrameWork *)&v3->vfptr);
  return iRevBytes;
}

//----- (0047A9A0) --------------------------------------------------------
int __thiscall ZoneLoginNetFrameWork::On_NC_MAP_LOGIN_ACK(ZoneLoginNetFrameWork *this, int iRevBytes, void *pvData)
{
  ZoneLoginNetFrameWork *v3; // esi@1
  int result; // eax@1

  v3 = this;
  User::SetMainCharMapLoginData(&g_kUser, (PROTO_NC_CHAR_MAPLOGIN_ACK *)pvData);
  LOWORD(pvData) = 28676;
  PgNet::SendNetMsg((PgNet *)&g_kNetMgr.m_spWorldMgr.m_pObject->vfptr, &pvData, 2);
  LOWORD(pvData) = 28684;
  PgNet::SendNetMsg((PgNet *)&g_kNetMgr.m_spWorldMgr.m_pObject->vfptr, &pvData, 2);
  LOWORD(pvData) = 31750;
  PgNet::SendNetMsg((PgNet *)&g_kNetMgr.m_spWorldMgr.m_pObject->vfptr, &pvData, 2);
  result = iRevBytes;
  v3->m_kMapLoginMsg.m_uiFrameMsg = 15;
  return result;
}

//----- (0047AA20) --------------------------------------------------------
void __thiscall ZoneLoginNetFrameWork::NcMapLoginReq(ZoneLoginNetFrameWork *this)
{
  ZoneLoginNetFrameWork *v1; // ebx@1
  Net *v2; // ecx@1
  SHN_DATA_FILE_INDEX v3; // edi@1
  PROTO_AVATARINFORMATION *v4; // eax@2
  char *v5; // esi@2
  Name8 *v6; // eax@3
  NETCOMMAND netcmd; // [sp+10h] [bp-66Ch]@2
  PROTO_NC_MAP_LOGIN_REQ kProto; // [sp+14h] [bp-668h]@2
  int v9; // [sp+678h] [bp-4h]@2

  v1 = this;
  v2 = this->m_spZoneNet.m_pObject;
  v3 = 0;
  if ( v2 )
  {
    netcmd.protocol = 6145;
    PgNet::AddNetMsg((PgNet *)&v2->vfptr, &netcmd, 2);
    *(_QWORD *)&kProto.chardata.charid.n5_code[3] = 0i64;
    *(_QWORD *)&kProto.chardata.charid.n5_code[1] = 0i64;
    kProto.chardata.charid.n5_code[0] = 0;
    `eh vector constructor iterator'(
      kProto.checksum,
      0x20u,
      50,
      (void (__thiscall *)(void *))Name8::Name8,
      (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
    kProto.chardata.wldmanhandle = g_kServer.m_kWorldMgrHandle;
    v9 = 0;
    v4 = User::GetSelectedAvatarInfo(&g_kUser);
    *(_QWORD *)&kProto.chardata.charid.n5_name[0] = *(_QWORD *)&v4->name.n5_name[0];
    *(_QWORD *)&kProto.chardata.charid.n5_code[2] = *(_QWORD *)&v4->name.n5_code[2];
    kProto.chardata.charid.n5_code[4] = v4->name.n5_code[4];
    v5 = &kProto.checksum[0].n8_name[8];
    do
    {
      v6 = CShnDataFileCheckSum::GetDataFileCheckSum(&ShnDataFile, v3);
      *((_DWORD *)v5 - 2) = v6->n8_code[0];
      *((_DWORD *)v5 - 1) = v6->n8_code[1];
      *(_DWORD *)v5 = v6->n8_code[2];
      *((_DWORD *)v5 + 1) = v6->n8_code[3];
      *((_DWORD *)v5 + 2) = v6->n8_code[4];
      *((_DWORD *)v5 + 3) = v6->n8_code[5];
      *((_DWORD *)v5 + 4) = v6->n8_code[6];
      *((_DWORD *)v5 + 5) = v6->n8_code[7];
      ++v3;
      v5 += 32;
    }
    while ( (signed int)v3 < 50 );
    PgNet::SendNetMsg((PgNet *)&v1->m_spZoneNet.m_pObject->vfptr, &kProto, 1622);
    v9 = -1;
    `eh vector destructor iterator'(
      kProto.checksum,
      0x20u,
      50,
      (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
  }
}

//----- (0047AB90) --------------------------------------------------------
int __thiscall ZoneLoginNetFrameWork::On_NC_MISC_SEED_ACK(ZoneLoginNetFrameWork *this, int iRevBytes, void *pvData)
{
  ZoneLoginNetFrameWork *v3; // esi@1

  v3 = this;
  ((void (__stdcall *)(_DWORD))this->m_spZoneNet.m_pObject->vfptr[3].__vecDelDtor)(*(_WORD *)pvData);
  ZoneLoginNetFrameWork::NcMapLoginReq(v3);
  return iRevBytes;
}

//----- (0047ABC0) --------------------------------------------------------
int __stdcall ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_SHAPE_CMD(int iRevBytes, void *pvData)
{
  char *v3; // eax@1
  NiUnsharedGeometryGroup *v4; // eax@2
  char *v5; // edx@4
  char v6; // cl@5
  PROTO_NC_CHAR_BASE_CMD *v7; // eax@6
  PROTO_NC_CHAR_BASE_CMD *v8; // edi@6
  int v9; // esi@6
  int v10; // eax@6
  char *v11; // eax@6
  NiUnsharedGeometryGroup *v12; // eax@7
  char acCharName[257]; // [sp+10h] [bp-108h]@6

  User::SetMainCharShapeData(&g_kUser, (PROTO_AVATAR_SHAPE_INFO *)pvData);
  v3 = CDataReader::GetRecord(
         (CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4),
         (*(_BYTE *)pvData >> 2) & 0x1F);
  if ( v3 )
    v4 = (NiUnsharedGeometryGroup *)(v3 + 21);
  else
    v4 = &unk_96F8EB;
  v5 = (char *)(&unk_B26440 - (_UNKNOWN *)v4);
  do
  {
    v6 = (char)v4->vfptr;
    *((_BYTE *)&v4->vfptr + (_DWORD)v5) = v4->vfptr;
    v4 = (NiUnsharedGeometryGroup *)((char *)v4 + 1);
  }
  while ( v6 );
  v7 = User::GetMainCharBaseData(&g_kUser);
  v8 = v7;
  *(_DWORD *)acCharName = v7->charid.n5_code[0];
  *(_DWORD *)&acCharName[4] = v7->charid.n5_code[1];
  *(_DWORD *)&acCharName[8] = v7->charid.n5_code[2];
  *(_DWORD *)&acCharName[12] = v7->charid.n5_code[3];
  *(_DWORD *)&acCharName[16] = v7->charid.n5_code[4];
  acCharName[20] = 0;
  acCharName[256] = 0;
  v9 = BT_OpenLogFile("UserInfo.txt", 2);
  BT_SetLogFlags(v9, 2);
  v10 = BT_GetLogFileName(v9);
  BT_AddLogFile(v10);
  BT_ClearLog(v9);
  _BT_AppLogEntryF(v9, 4, "UserAccount [ %s ]", &g_kUser);
  _BT_AppLogEntryF(v9, 4, "CharID [ %d ]", v8->chrregnum);
  _BT_AppLogEntryF(v9, 4, "CharName [ %s ]", acCharName);
  v11 = CDataReader::GetRecord(
          (CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4),
          (*(_BYTE *)pvData >> 2) & 0x1F);
  if ( v11 )
    v12 = (NiUnsharedGeometryGroup *)(v11 + 21);
  else
    v12 = &unk_96F8EB;
  _BT_AppLogEntryF(v9, 4, "CharClass [ %s ]", v12);
  BT_CloseLogFile(v9);
  return iRevBytes;
}
// 96D014: using guessed type _DWORD __stdcall BT_CloseLogFile(_DWORD);
// 96D018: using guessed type int _BT_AppLogEntryF(_DWORD, _DWORD, const char *, ...);
// 96D01C: using guessed type _DWORD __stdcall BT_ClearLog(_DWORD);
// 96D020: using guessed type _DWORD __stdcall BT_AddLogFile(_DWORD);
// 96D024: using guessed type _DWORD __stdcall BT_GetLogFileName(_DWORD);
// 96D028: using guessed type _DWORD __stdcall BT_SetLogFlags(_DWORD, _DWORD);
// 96D02C: using guessed type _DWORD __stdcall BT_OpenLogFile(_DWORD, _DWORD);
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (0047AD30) --------------------------------------------------------
int __thiscall ZoneLoginNetFrameWork::ProcessNetMsg(ZoneLoginNetFrameWork *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  ZoneLoginNetFrameWork *v5; // esi@1
  int result; // eax@1
  CClientQuest *v7; // eax@9
  CClientQuest *v8; // eax@10
  CClientQuest *v9; // eax@11
  CClientQuest *v10; // eax@12
  CClientQuest *v11; // eax@28

  v5 = this;
  result = 0;
  switch ( iDepart )
  {
    case 8:
      if ( iCommand == 17 )
        result = iRevBytes;
      break;
    case 2:
      if ( iCommand == 7 )
      {
        ((void (__stdcall *)(_DWORD))this->m_spZoneNet.m_pObject->vfptr[3].__vecDelDtor)(*(_WORD *)pvData);
        ZoneLoginNetFrameWork::NcMapLoginReq(v5);
        result = iRevBytes;
      }
      break;
    case 4:
      switch ( iCommand )
      {
        case 56:
          result = ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_BASE_CMD(iRevBytes, pvData);
          break;
        case 57:
          result = ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_SHAPE_CMD(iRevBytes, pvData);
          break;
        case 58:
          v7 = QuestDataMgr::GetQuest();
          CQuest::Recv_NC_CHAR_QUEST_DOING_CMD_ACK((CQuest *)&v7->vfptr, (PROTO_NC_CHAR_QUEST_DOING_CMD *)pvData);
          result = iRevBytes;
          break;
        case 59:
          v8 = QuestDataMgr::GetQuest();
          CQuest::Recv_NC_CHAR_QUEST_DONE_CMD_ACK((CQuest *)&v8->vfptr, (PROTO_NC_CHAR_QUEST_DONE_CMD *)pvData);
          result = iRevBytes;
          break;
        case 206:
          v9 = QuestDataMgr::GetQuest();
          CQuest::Recv_NC_CHAR_QUEST_READ_CMD_ACK((CQuest *)&v9->vfptr, (PROTO_NC_CHAR_QUEST_READ_CMD *)pvData);
          result = iRevBytes;
          break;
        case 215:
          v10 = QuestDataMgr::GetQuest();
          CQuest::Recv_NC_CHAR_QUEST_REPEAT_CMD_ACK((CQuest *)&v10->vfptr, (PROTO_NC_CHAR_QUEST_REPEAT_CMD *)pvData);
          result = iRevBytes;
          break;
        case 60:
          User::InitABState(&g_kUser, (PROTO_NC_CHAR_ABSTATE_CMD *)pvData);
          result = iRevBytes;
          break;
        case 61:
          Skill::InitSkill((PROTO_NC_CHAR_CLIENT_SKILL_CMD *)pvData);
          result = iRevBytes;
          break;
        case 71:
          result = ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_ITEM_CMD(iRevBytes, pvData);
          break;
        case 73:
          MainChar::InitCharactorTitle((MainChar *)g_pkMainChar, (PROTO_NC_CHAR_CLIENT_CHARTITLE_CMD *)pvData);
          result = iRevBytes;
          break;
        case 62:
          Skill::InitPassiveSkill((PROTO_NC_CHAR_SKILL_PASSIVE_CMD *)pvData);
          result = iRevBytes;
          break;
        case 74:
          result = ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_CHARGEDBUFF_CMD(iRevBytes, pvData);
          break;
        case 222:
          result = ZoneLoginNetFrameWork::On_NC_CHAR_CLIENT_COININFO_CMD(iRevBytes, pvData);
          break;
        case 72:
          goto $LN81_5;
        default:
          return result;
      }
      break;
    case 6:
      if ( iCommand == 2 )
      {
        result = ZoneLoginNetFrameWork::On_NC_MAP_LOGIN_ACK(this, iRevBytes, pvData);
      }
      else if ( iCommand == 4 )
      {
        result = ZoneLoginNetFrameWork::On_NC_MAP_LOGINFAIL_ACK(this, iRevBytes, pvData);
      }
      break;
    case 36:
      if ( iCommand == 16 )
      {
        if ( *(_BYTE *)pvData > 0x14u )
          goto $LN81_5;
        PrivateStoreWin::ms_byBoothSize = *(_BYTE *)pvData;
        result = iRevBytes;
      }
      break;
    case 17:
      if ( iCommand == 30 )
      {
        v11 = QuestDataMgr::GetQuest();
        CClientQuest::SetQuestResetTime(v11, (PROTO_NC_QUEST_RESET_TIME_CMD *)pvData);
$LN81_5:
        result = iRevBytes;
      }
      break;
    default:
      return result;
  }
  return result;
}
// A71184: using guessed type unsigned __int8 PrivateStoreWin::ms_byBoothSize;

//----- (0047B060) --------------------------------------------------------
NiRTTI *ZoneLoginNetFrameWork::GetRTTI()
{
  return &ZoneLoginNetFrameWork::m_RTTI;
}

//----- (0047B070) --------------------------------------------------------
const char *ZoneLoginNetFrameWork::GetFrameWorkName()
{
  return ZoneLoginNetFrameWork::m_RTTI.m_pcName;
}

//----- (0047B080) --------------------------------------------------------
void __thiscall PROTO_NC_MAP_LOGIN_REQ::~PROTO_NC_MAP_LOGIN_REQ(PROTO_NC_MAP_LOGIN_REQ *this)
{
  `eh vector destructor iterator'(
    this->checksum,
    0x20u,
    50,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
}

//----- (0047B0A0) --------------------------------------------------------
ZoneLoginNetFrameWork *__thiscall ZoneLoginNetFrameWork::`scalar deleting destructor'(ZoneLoginNetFrameWork *this, unsigned int a2)
{
  ZoneLoginNetFrameWork *v2; // esi@1

  v2 = this;
  ZoneLoginNetFrameWork::~ZoneLoginNetFrameWork(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0047B0D0) --------------------------------------------------------
void __thiscall CharSelectInfoWin::CharSelectInfoWin(CharSelectInfoWin *this)
{
  CharSelectInfoWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&CharSelectInfoWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CharSelectInfoWin::`vftable'{for `IDirectMessenger'};
}
// 9808D4: using guessed type void (__thiscall *CharSelectInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9808F4: using guessed type int (__thiscall *CharSelectInfoWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0047B0F0) --------------------------------------------------------
void __thiscall CharSelectInfoWin::~CharSelectInfoWin(CharSelectInfoWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&CharSelectInfoWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CharSelectInfoWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9808D4: using guessed type void (__thiscall *CharSelectInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9808F4: using guessed type int (__thiscall *CharSelectInfoWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0047B110) --------------------------------------------------------
char __thiscall CharSelectInfoWin::Create(CharSelectInfoWin *this, PgFrameWork *pkFrameWork)
{
  CharSelectInfoWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // ebx@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  PgFont *v10; // eax@17
  PgWinText *v11; // eax@17
  PgFont *v12; // eax@17
  PgWinText *v13; // edi@17
  NiRefObjectVtbl *v14; // ebx@17
  NiUnsharedGeometryGroup *v15; // eax@17
  PgFont *v16; // eax@18
  PgWinText *v17; // eax@18
  PgFont *v18; // eax@18
  PgWinText *v19; // edi@18
  NiRefObjectVtbl *v20; // ebx@18
  NiUnsharedGeometryGroup *v21; // eax@18
  PgFont *v22; // eax@19
  PgWinText *v23; // eax@19
  PgFont *v24; // eax@19
  PgWinText *v25; // edi@19
  NiRefObjectVtbl *v26; // ebx@19
  NiUnsharedGeometryGroup *v27; // eax@19
  PgFont *v28; // eax@20
  PgWinText *v29; // eax@20
  PgFont *v30; // eax@20
  PgWinText *v31; // eax@20
  PgWinText *v32; // edi@20
  NiRefObjectVtbl *v33; // ebx@20
  PgSprData *v34; // eax@20
  PgFont *v35; // eax@20
  PgFont *v36; // eax@20
  PgWinText *v37; // eax@20
  PgWinText *v38; // edi@20
  NiRefObjectVtbl *v39; // ebx@20
  PgSprData *v40; // eax@20
  PgFont *v41; // eax@20
  PgFont *v42; // eax@20
  PgWinText *v43; // eax@20
  PgWinText *v44; // edi@20
  NiRefObjectVtbl *v45; // ebx@20
  NiUnsharedGeometryGroup *v46; // eax@20
  NiSourceTexture *pkTexture; // [sp+10h] [bp-24h]@1
  NiPointer<NiNode> spNode; // [sp+14h] [bp-20h]@1
  unsigned int uiWidth; // [sp+18h] [bp-1Ch]@15
  unsigned int uiHeight; // [sp+1Ch] [bp-18h]@15
  int uiLeft; // [sp+20h] [bp-14h]@11
  int uiTop; // [sp+24h] [bp-10h]@11
  int v53; // [sp+30h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v53 = 0;
  v3 = MenuTexMgr::GetTexture(5u);
  pkTexture = v3;
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v53 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
    goto LABEL_5;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "\\CharSelect\\SelectCharCharInfo.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CharInfoPanel", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 32, 47, v9, 0, pkFrameWork, "CharSelectInfoWin", 0) )
  {
    v4 = spNode.m_pObject;
    v53 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Name", &uiLeft, &uiTop, &uiWidth, &uiHeight)
    || (v10 = Font::Get(0),
        v11 = PgWinText::CreateWin(uiLeft, uiTop + 2, uiWidth, uiHeight, v10, (PgWin *)&v2->vfptr, 0, 0),
        v2->m_pkNameTextWin = v11,
        v11->vfptr[122].__vecDelDtor((NiRefObject *)v11, 1u),
        v12 = Font::Get(0),
        v13 = PgWinText::CreateWin(uiLeft - 42, uiTop + 1, uiWidth, uiHeight, v12, (PgWin *)&v2->vfptr, 0, 0),
        v14 = v13->vfptr,
        v15 = TextData::Get(0x4EA49695u),
        v14[118].__vecDelDtor((NiRefObject *)v13, (unsigned int)v15),
        v13->vfptr[117].__vecDelDtor((NiRefObject *)v13, (unsigned int)&Color::m_kDxMenuColor),
        !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Level", &uiLeft, &uiTop, &uiWidth, &uiHeight))
    || (v16 = Font::Get(0),
        v17 = PgWinText::CreateWin(uiLeft, uiTop + 2, uiWidth, uiHeight, v16, (PgWin *)&v2->vfptr, 0, 0),
        v2->m_pkLevelTextWin = v17,
        v17->vfptr[122].__vecDelDtor((NiRefObject *)v17, 1u),
        v18 = Font::Get(0),
        v19 = PgWinText::CreateWin(uiLeft - 42, uiTop + 1, uiWidth, uiHeight, v18, (PgWin *)&v2->vfptr, 0, 0),
        v20 = v19->vfptr,
        v21 = TextData::Get(0x98A49F99),
        v20[118].__vecDelDtor((NiRefObject *)v19, (unsigned int)v21),
        v19->vfptr[117].__vecDelDtor((NiRefObject *)v19, (unsigned int)&Color::m_kDxMenuColor),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           off_9808AC,
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v22 = Font::Get(0),
        v23 = PgWinText::CreateWin(uiLeft, uiTop + 2, uiWidth, uiHeight, v22, (PgWin *)&v2->vfptr, 0, 0),
        v2->m_pkClassTextWin = v23,
        v23->vfptr[122].__vecDelDtor((NiRefObject *)v23, 1u),
        v24 = Font::Get(0),
        v25 = PgWinText::CreateWin(uiLeft - 42, uiTop + 1, uiWidth, uiHeight, v24, (PgWin *)&v2->vfptr, 0, 0),
        v26 = v25->vfptr,
        v27 = TextData::Get(0x96B28AA0),
        v26[118].__vecDelDtor((NiRefObject *)v25, (unsigned int)v27),
        v25->vfptr[117].__vecDelDtor((NiRefObject *)v25, (unsigned int)&Color::m_kDxMenuColor),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Position",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight)) )
  {
    v53 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  v28 = Font::Get(0);
  v29 = PgWinText::CreateWin(uiLeft, uiTop + 2, uiWidth, uiHeight, v28, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkPositionTextWin = v29;
  ((void (__thiscall *)(PgWinText *))v29->vfptr[122].__vecDelDtor)(v29);
  v30 = Font::Get(0);
  v31 = PgWinText::CreateWin(uiLeft - 42, uiTop + 1, uiWidth, uiHeight, v30, (PgWin *)&v2->vfptr, 0, 0);
  v32 = v31;
  v33 = v31->vfptr;
  TextData::Get(0xA4F6EBEC);
  ((void (__thiscall *)(PgWinText *))v33[118].__vecDelDtor)(v32);
  ((void (__thiscall *)(PgWinText *))v32->vfptr[117].__vecDelDtor)(v32);
  v34 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HpDark", &uiLeft, &uiTop, pkTexture);
  PgWinSpr::CreateWin(uiLeft, uiTop, v34, (PgWin *)&v2->vfptr, 0, 0);
  v35 = Font::Get(0);
  v2->m_pkHPTextWin = PgWinText::CreateWin(uiLeft, uiTop + 1, uiWidth, uiHeight, v35, (PgWin *)&v2->vfptr, 0, 0);
  v36 = Font::Get(0);
  v37 = PgWinText::CreateWin(uiLeft - 42, uiTop + 1, uiWidth, uiHeight, v36, (PgWin *)&v2->vfptr, 0, 0);
  v38 = v37;
  v39 = v37->vfptr;
  TextData::Get(0x485F49A4u);
  ((void (__thiscall *)(PgWinText *))v39[118].__vecDelDtor)(v38);
  v38->vfptr[117].__vecDelDtor((NiRefObject *)v38, (unsigned int)&Color::m_kDxMenuColor);
  v40 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SpDark", &uiLeft, &uiTop, pkTexture);
  PgWinSpr::CreateWin(uiLeft, uiTop, v40, (PgWin *)&v2->vfptr, 0, 0);
  v41 = Font::Get(0);
  v2->m_pkSPTextWin = PgWinText::CreateWin(uiLeft, uiTop + 1, uiWidth, uiHeight, v41, (PgWin *)&v2->vfptr, 0, 0);
  v42 = Font::Get(0);
  v43 = PgWinText::CreateWin(uiLeft - 42, uiTop + 1, uiWidth, uiHeight, v42, (PgWin *)&v2->vfptr, 0, 0);
  v44 = v43;
  v45 = v43->vfptr;
  v46 = TextData::Get(0x535F49A4u);
  v45[118].__vecDelDtor((NiRefObject *)v44, (unsigned int)v46);
  v44->vfptr[117].__vecDelDtor((NiRefObject *)v44, (unsigned int)&Color::m_kDxMenuColor);
  v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
  v53 = -1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0047B6E0) --------------------------------------------------------
void __thiscall CharSelectInfoWin::SetAvatarInfo(CharSelectInfoWin *this, PROTO_AVATARINFORMATION *pkInfo)
{
  CharSelectInfoWin *v2; // esi@1
  unsigned int v3; // edx@3
  unsigned int v4; // eax@3
  unsigned int v5; // ecx@3
  unsigned int v6; // edx@3
  PgWinText *v7; // ecx@3
  char *v8; // eax@3
  NiUnsharedGeometryGroup *v9; // eax@4
  MapInfo *v10; // eax@6
  char acStr[64]; // [sp+8h] [bp-C4h]@3
  char Name[128]; // [sp+48h] [bp-84h]@3

  v2 = this;
  if ( pkInfo )
  {
    memset(&Name[1], 0, 0x7Fu);
    v3 = pkInfo->name.n5_code[1];
    v4 = pkInfo->name.n5_code[2];
    *(_DWORD *)Name = pkInfo->name.n5_code[0];
    v5 = pkInfo->name.n5_code[3];
    *(_DWORD *)&Name[4] = v3;
    v6 = pkInfo->name.n5_code[4];
    *(_DWORD *)&Name[12] = v5;
    v7 = v2->m_pkNameTextWin;
    *(_DWORD *)&Name[8] = v4;
    *(_DWORD *)&Name[16] = v6;
    Name[20] = 0;
    ((void (__stdcall *)(_DWORD))v7->vfptr[118].__vecDelDtor)(Name);
    sprintf(acStr, "%d", pkInfo->level);
    ((void (__stdcall *)(_DWORD))v2->m_pkLevelTextWin->vfptr[118].__vecDelDtor)(acStr);
    v8 = CDataReader::GetRecord(
           (CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4),
           (*(_BYTE *)&pkInfo->shape >> 2) & 0x1F);
    if ( v8 )
      v9 = (NiUnsharedGeometryGroup *)(v8 + 21);
    else
      v9 = &unk_96F8EB;
    ((void (__stdcall *)(_DWORD))v2->m_pkClassTextWin->vfptr[118].__vecDelDtor)(v9);
    v10 = MapInfoTab::GetByMapName(&pkInfo->loginmap);
    if ( v10 )
      ((void (__stdcall *)(_DWORD))v2->m_pkPositionTextWin->vfptr[118].__vecDelDtor)(v10->Name);
    ((void (__stdcall *)(_DWORD))v2->m_pkHPTextWin->vfptr[118].__vecDelDtor)(&unk_9808A3);
    ((void (__stdcall *)(_DWORD))v2->m_pkSPTextWin->vfptr[118].__vecDelDtor)(&unk_9808AA);
  }
  else
  {
    ((void (__stdcall *)(_DWORD))this->m_pkNameTextWin->vfptr[118].__vecDelDtor)(&unk_980877);
    ((void (__stdcall *)(_DWORD))v2->m_pkLevelTextWin->vfptr[118].__vecDelDtor)(&unk_980886);
    ((void (__stdcall *)(_DWORD))v2->m_pkClassTextWin->vfptr[118].__vecDelDtor)(&unk_980887);
    ((void (__stdcall *)(_DWORD))v2->m_pkPositionTextWin->vfptr[118].__vecDelDtor)(&unk_98089A);
    ((void (__stdcall *)(_DWORD))v2->m_pkHPTextWin->vfptr[118].__vecDelDtor)(&unk_98089B);
    ((void (__stdcall *)(_DWORD))v2->m_pkSPTextWin->vfptr[118].__vecDelDtor)(&unk_9808A1);
  }
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (0047B8B0) --------------------------------------------------------
CharSelectInfoWin *__cdecl CharSelectInfoWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  CharSelectInfoWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x170u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&CharSelectInfoWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&CharSelectInfoWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (CharSelectInfoWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9808D4: using guessed type void (__thiscall *CharSelectInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9808F4: using guessed type int (__thiscall *CharSelectInfoWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0047B9F0) --------------------------------------------------------
CharSelectInfoWin *__thiscall CharSelectInfoWin::`scalar deleting destructor'(CharSelectInfoWin *this, unsigned int a2)
{
  CharSelectInfoWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&CharSelectInfoWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CharSelectInfoWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9808D4: using guessed type void (__thiscall *CharSelectInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9808F4: using guessed type int (__thiscall *CharSelectInfoWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0047BA30) --------------------------------------------------------
void __thiscall CharSelectMenuWin::CharSelectMenuWin(CharSelectMenuWin *this)
{
  CharSelectMenuWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->pkCancelBut = 0;
  v1->m_pkCreateText = 0;
  v1->m_pkEnterText = 0;
  v1->vfptr = (NiRefObjectVtbl *)&CharSelectMenuWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CharSelectMenuWin::`vftable'{for `IDirectMessenger'};
}
// 980C14: using guessed type void (__thiscall *CharSelectMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 980C34: using guessed type int (__thiscall *CharSelectMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0047BA60) --------------------------------------------------------
void __thiscall CharSelectMenuWin::~CharSelectMenuWin(CharSelectMenuWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&CharSelectMenuWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CharSelectMenuWin::`vftable'{for `IDirectMessenger'};
  this->pkCancelBut = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 980C14: using guessed type void (__thiscall *CharSelectMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 980C34: using guessed type int (__thiscall *CharSelectMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0047BA80) --------------------------------------------------------
void CharSelectMenuWin::OnCmdCancel()
{
  PgFrameWork *v1; // eax@1

  v1 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, AccountFrameWorkID);
  if ( v1 )
  {
    v1[2].m_BackFrameID = 0;
    *(_DWORD *)&v1[2].m_bInit = 0;
    v1[3].vfptr = 0;
    v1[3].m_pkMsgHooker = 0;
    v1[3].m_uiMessageNum = 0;
    v1[3].m_kMsgQ.m_pBase = 0;
    v1[3].m_kMsgQ.m_uiAlloced = 0;
    v1[3].m_kMsgQ.m_uiHead = 0;
  }
  NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 3u, 0x33u, 0, 0);
}

//----- (0047BAD0) --------------------------------------------------------
void __thiscall CharSelectMenuWin::OnCmdCreateChar(CharSelectMenuWin *this)
{
  CharSelectFrameWork::CreateAvatar((CharSelectFrameWork *)this->m_pkFrameWork);
}

//----- (0047BAE0) --------------------------------------------------------
void __thiscall CharSelectMenuWin::OnCmdDeleteChar(CharSelectMenuWin *this)
{
  CharSelectFrameWork::DeleteAvatar((CharSelectFrameWork *)this->m_pkFrameWork);
}

//----- (0047BAF0) --------------------------------------------------------
void __thiscall CharSelectMenuWin::OnCmdOk(CharSelectMenuWin *this)
{
  CharSelectFrameWork::SelectOk((CharSelectFrameWork *)this->m_pkFrameWork);
}

//----- (0047BB00) --------------------------------------------------------
void __stdcall CharSelectMenuWin::UpdateMeWin(float fCurTime)
{
  PgFrameWork *v2; // eax@3

  if ( g_pkKeyboard->m_aucKeystate[0] & 2 && !(g_pkKeyboard->m_aucKeystateLastUpdate[0] & 2) )
  {
    v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, AccountFrameWorkID);
    if ( v2 )
    {
      v2[2].m_BackFrameID = 0;
      *(_DWORD *)&v2[2].m_bInit = 0;
      v2[3].vfptr = 0;
      v2[3].m_pkMsgHooker = 0;
      v2[3].m_uiMessageNum = 0;
      v2[3].m_kMsgQ.m_pBase = 0;
      v2[3].m_kMsgQ.m_uiAlloced = 0;
      v2[3].m_kMsgQ.m_uiHead = 0;
    }
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 3u, 0x33u, 0, 0);
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (0047BB60) --------------------------------------------------------
void __thiscall CharSelectMenuWin::ChangeTextColor(CharSelectMenuWin *this, bool bChange)
{
  CharSelectMenuWin *v2; // esi@1
  NiRefObjectVtbl *v3; // edi@3
  D3DXCOLOR *v4; // eax@3
  NiRefObjectVtbl *v5; // edi@9
  D3DXCOLOR *v6; // eax@9
  D3DXCOLOR result; // [sp+8h] [bp-10h]@3

  v2 = this;
  if ( bChange )
  {
    if ( this->m_pkEnterText )
    {
      v3 = this->m_pkEnterText->vfptr;
      v4 = Color::GetDxColor(&result, 55, -1, 0, -1);
      v3[117].__vecDelDtor((NiRefObject *)v2->m_pkEnterText, (unsigned int)v4);
    }
    if ( v2->m_pkCreateText )
      ((void (__stdcall *)(_DWORD))v2->m_pkCreateText->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  }
  else
  {
    if ( this->m_pkEnterText )
      ((void (__stdcall *)(_DWORD))this->m_pkEnterText->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
    if ( v2->m_pkCreateText )
    {
      v5 = v2->m_pkCreateText->vfptr;
      v6 = Color::GetDxColor(&result, 55, -1, 0, -1);
      v5[117].__vecDelDtor((NiRefObject *)v2->m_pkCreateText, (unsigned int)v6);
    }
  }
}

//----- (0047BC30) --------------------------------------------------------
char __thiscall CharSelectMenuWin::Create(CharSelectMenuWin *this, PgFrameWork *pkFrameWork)
{
  CharSelectMenuWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  int v8; // edi@10
  int v9; // ebx@10
  PgSprData *v10; // eax@10
  PgWinSpr *v11; // eax@10
  PgWinSpr *v12; // edi@10
  PgWin *v13; // ST5C_4@10
  PgFont *v14; // ST58_4@10
  unsigned int v15; // ST54_4@10
  unsigned int v16; // eax@10
  PgWinText *v17; // eax@10
  PgTextGeometry *v18; // eax@10
  NiRefObjectVtbl *v19; // edi@12
  NiUnsharedGeometryGroup *v20; // eax@12
  NiRefObjectVtbl *v21; // edi@12
  PgFont *v22; // eax@12
  PgSprData *v23; // edi@12
  PgWinBut *v24; // ST5C_4@12
  PgFont *v25; // ST58_4@12
  unsigned int v26; // ST54_4@12
  unsigned int v27; // eax@12
  PgWinText *v28; // eax@12
  NiRefObjectVtbl *v29; // edi@12
  PgFont *v30; // eax@12
  NiRefObjectVtbl *v31; // edi@12
  NiUnsharedGeometryGroup *v32; // eax@12
  NiRefObjectVtbl *v33; // edi@12
  D3DXCOLOR *v34; // eax@12
  PgSprData *v35; // edi@12
  PgWinBut *v36; // ST5C_4@12
  PgWinBut *v37; // edi@12
  PgFont *v38; // ST58_4@12
  unsigned int v39; // ST54_4@12
  unsigned int v40; // eax@12
  PgWinText *v41; // edi@12
  D3DXCOLOR *v42; // eax@12
  PgFont *v43; // eax@12
  NiUnsharedGeometryGroup *v44; // eax@12
  PgSprData *v45; // edi@12
  PgWinBut *v46; // ST5C_4@12
  PgWinBut *v47; // edi@12
  PgFont *v48; // ST58_4@12
  unsigned int v49; // ST54_4@12
  unsigned int v50; // eax@12
  PgWinText *v51; // eax@12
  NiRefObjectVtbl *v52; // edi@12
  D3DXCOLOR *v53; // eax@12
  NiRefObjectVtbl *v54; // edi@12
  PgFont *v55; // eax@12
  NiRefObjectVtbl *v56; // edi@12
  NiUnsharedGeometryGroup *v57; // eax@12
  PgSprData *v58; // edi@12
  PgWinBut *v59; // ST5C_4@12
  PgWinBut *v60; // edi@12
  PgFont *v61; // ST58_4@12
  unsigned int v62; // ST54_4@12
  unsigned int v63; // eax@12
  PgWinText *v64; // edi@12
  NiRefObjectVtbl *v65; // ebx@12
  D3DXCOLOR *v66; // eax@12
  NiRefObjectVtbl *v67; // ebx@12
  PgFont *v68; // eax@12
  NiRefObjectVtbl *v69; // ebx@12
  NiUnsharedGeometryGroup *v70; // eax@12
  NiNode *v71; // esi@13
  D3DXCOLOR result; // [sp+78h] [bp-2Ch]@12
  NiRefObjectVtbl *v73; // [sp+88h] [bp-1Ch]@12
  int uiLeft; // [sp+8Ch] [bp-18h]@4
  int uiTop; // [sp+90h] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+94h] [bp-10h]@1
  int v77; // [sp+A0h] [bp-4h]@1
  int iOffY; // [sp+ACh] [bp+8h]@10

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v77 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "\\CharSelect\\SelectPanel.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane01", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "CharSelectMenuWin", 0) )
  {
    v6 = spNode.m_pObject;
    v77 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = uiTop;
  v9 = uiLeft;
  iOffY = uiTop;
  v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextPanel", &uiLeft, &uiTop, 0);
  v11 = PgWinSpr::CreateWin(uiLeft - v9, uiTop - v8, v10, (PgWin *)&v2->vfptr, 0, 0);
  v12 = v11;
  v13 = (PgWin *)v11;
  v14 = Font::Get(0);
  v15 = ((int (__thiscall *)(PgWinSpr *))v12->vfptr[37].__vecDelDtor)(v12);
  v16 = ((int (__thiscall *)(PgWinSpr *))v12->vfptr[36].__vecDelDtor)(v12);
  v17 = PgWinText::CreateWin(0, 2, v16, v15, v14, v13, 0, 0);
  v2->m_pkSelectMenuTextWin = v17;
  v17->vfptr[122].__vecDelDtor((NiRefObject *)v17, 0);
  v18 = v2->m_pkSelectMenuTextWin->m_spTextGeom.m_pObject;
  if ( v18 )
    v18->m_bTextCmdOn = 1;
  v19 = v2->m_pkSelectMenuTextWin->vfptr;
  v20 = TextData::Get(0x5EFDC1BFu);
  v19[118].__vecDelDtor((NiRefObject *)v2->m_pkSelectMenuTextWin, (unsigned int)v20);
  ((void (__stdcall *)(_DWORD))v2->m_pkSelectMenuTextWin->vfptr[60].__vecDelDtor)(0);
  SpScreenText::SetVerticalGap((SpScreenText *)&v2->m_pkSelectMenuTextWin->m_spTextGeom.m_pObject->vfptr, 6);
  v21 = v2->m_pkSelectMenuTextWin->vfptr;
  v22 = Font::Get(MENU);
  v21[113].__vecDelDtor((NiRefObject *)v2->m_pkSelectMenuTextWin, (unsigned int)v22);
  v23 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CreatCharNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v23, (NiAVObject *)&spNode.m_pObject->vfptr, "CreatCharClick");
  PgSprData::Add(v23, (NiAVObject *)&spNode.m_pObject->vfptr, "CreatCharOver");
  v24 = PgWinBut::CreateWin(uiLeft - v9, uiTop - iOffY, v23, (PgWin *)&v2->vfptr, 0, 0, 0);
  v24->m_bEnableClickSound = 0;
  v25 = Font::Get(0);
  v26 = ((int (__thiscall *)(PgWinBut *))v24->vfptr[37].__vecDelDtor)(v24);
  v27 = ((int (__thiscall *)(PgWinBut *))v24->vfptr[36].__vecDelDtor)(v24);
  v28 = PgWinText::CreateWin(0, 2, v27, v26, v25, (PgWin *)&v24->vfptr, 0, 0);
  v2->m_pkCreateText = v28;
  v28->vfptr[122].__vecDelDtor((NiRefObject *)v28, 5u);
  v29 = v2->m_pkCreateText->vfptr;
  v30 = Font::Get(MENU);
  v29[113].__vecDelDtor((NiRefObject *)v2->m_pkCreateText, (unsigned int)v30);
  v31 = v2->m_pkCreateText->vfptr;
  v32 = TextData::Get(0xDFE33F2C);
  v31[118].__vecDelDtor((NiRefObject *)v2->m_pkCreateText, (unsigned int)v32);
  v33 = v2->m_pkCreateText->vfptr;
  v34 = Color::GetDxColor(&result, 55, -1, 0, -1);
  v33[117].__vecDelDtor((NiRefObject *)v2->m_pkCreateText, (unsigned int)v34);
  ((void (__stdcall *)(_DWORD))v2->m_pkCreateText->vfptr[60].__vecDelDtor)(0);
  SpScreenText::SetShadowOffset((SpScreenText *)&v2->m_pkCreateText->m_spTextGeom.m_pObject->vfptr, 1u);
  v35 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "DelCharNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v35, (NiAVObject *)&spNode.m_pObject->vfptr, "DelCharClick");
  PgSprData::Add(v35, (NiAVObject *)&spNode.m_pObject->vfptr, "DelCharOver");
  v36 = PgWinBut::CreateWin(uiLeft - v9, uiTop - iOffY, v35, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v2->m_pkDelCharBtn = v36;
  v37 = v36;
  v38 = Font::Get(0);
  v39 = ((int (__thiscall *)(PgWinBut *))v37->vfptr[37].__vecDelDtor)(v37);
  v40 = ((int (__thiscall *)(PgWinBut *))v37->vfptr[36].__vecDelDtor)(v37);
  v41 = PgWinText::CreateWin(0, 2, v40, v39, v38, (PgWin *)&v36->vfptr, 0, 0);
  v41->vfptr[122].__vecDelDtor((NiRefObject *)v41, 5u);
  v73 = v41->vfptr;
  v42 = Color::GetDxColor(&result, 55, -1, 0, -1);
  v73[117].__vecDelDtor((NiRefObject *)v41, (unsigned int)v42);
  v73 = v41->vfptr;
  v43 = Font::Get(MENU);
  v73[113].__vecDelDtor((NiRefObject *)v41, (unsigned int)v43);
  v73 = v41->vfptr;
  v44 = TextData::Get(0xE0E7461F);
  v73[118].__vecDelDtor((NiRefObject *)v41, (unsigned int)v44);
  v41->vfptr[60].__vecDelDtor((NiRefObject *)v41, 0);
  SpScreenText::SetShadowOffset((SpScreenText *)&v41->m_spTextGeom.m_pObject->vfptr, 1u);
  v45 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "StartNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v45, (NiAVObject *)&spNode.m_pObject->vfptr, "StartClick");
  PgSprData::Add(v45, (NiAVObject *)&spNode.m_pObject->vfptr, "StartOver");
  v46 = PgWinBut::CreateWin(uiLeft - v9, uiTop - iOffY, v45, (PgWin *)&v2->vfptr, 2u, 0, 0);
  v2->m_pkOkBut = v46;
  v47 = v46;
  v48 = Font::Get(0);
  v49 = ((int (__thiscall *)(PgWinBut *))v47->vfptr[37].__vecDelDtor)(v47);
  v50 = ((int (__thiscall *)(PgWinBut *))v47->vfptr[36].__vecDelDtor)(v47);
  v51 = PgWinText::CreateWin(0, 2, v50, v49, v48, (PgWin *)&v46->vfptr, 0, 0);
  v2->m_pkEnterText = v51;
  v51->vfptr[122].__vecDelDtor((NiRefObject *)v51, 5u);
  v52 = v2->m_pkEnterText->vfptr;
  v53 = Color::GetDxColor(&result, 55, -1, 0, -1);
  v52[117].__vecDelDtor((NiRefObject *)v2->m_pkEnterText, (unsigned int)v53);
  v54 = v2->m_pkEnterText->vfptr;
  v55 = Font::Get(MENU);
  v54[113].__vecDelDtor((NiRefObject *)v2->m_pkEnterText, (unsigned int)v55);
  v56 = v2->m_pkEnterText->vfptr;
  v57 = TextData::Get(0x88ADEBE6);
  v56[118].__vecDelDtor((NiRefObject *)v2->m_pkEnterText, (unsigned int)v57);
  ((void (__stdcall *)(_DWORD))v2->m_pkEnterText->vfptr[60].__vecDelDtor)(0);
  SpScreenText::SetShadowOffset((SpScreenText *)&v2->m_pkEnterText->m_spTextGeom.m_pObject->vfptr, 1u);
  v58 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PrePageNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v58, (NiAVObject *)&spNode.m_pObject->vfptr, "PrePageClick");
  PgSprData::Add(v58, (NiAVObject *)&spNode.m_pObject->vfptr, "PrePageOver");
  v59 = PgWinBut::CreateWin(uiLeft - v9, uiTop - iOffY, v58, (PgWin *)&v2->vfptr, 3u, 0, 0);
  v2->pkCancelBut = v59;
  v60 = v59;
  v61 = Font::Get(0);
  v62 = ((int (__thiscall *)(PgWinBut *))v60->vfptr[37].__vecDelDtor)(v60);
  v63 = ((int (__thiscall *)(PgWinBut *))v60->vfptr[36].__vecDelDtor)(v60);
  v64 = PgWinText::CreateWin(0, 2, v63, v62, v61, (PgWin *)&v59->vfptr, 0, 0);
  v64->vfptr[122].__vecDelDtor((NiRefObject *)v64, 5u);
  v65 = v64->vfptr;
  v66 = Color::GetDxColor(&result, 55, -1, 0, -1);
  v65[117].__vecDelDtor((NiRefObject *)v64, (unsigned int)v66);
  v67 = v64->vfptr;
  v68 = Font::Get(MENU);
  v67[113].__vecDelDtor((NiRefObject *)v64, (unsigned int)v68);
  v69 = v64->vfptr;
  v70 = TextData::Get(0xE803E037);
  v69[118].__vecDelDtor((NiRefObject *)v64, (unsigned int)v70);
  v64->vfptr[60].__vecDelDtor((NiRefObject *)v64, 0);
  SpScreenText::SetShadowOffset((SpScreenText *)&v64->m_spTextGeom.m_pObject->vfptr, 1u);
  ((void (__thiscall *)(CharSelectMenuWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    1.0);
  v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
  v77 = -1;
  if ( spNode.m_pObject )
  {
    v71 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v71 )
        v71->vfptr->__vecDelDtor((NiRefObject *)v71, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0047C370) --------------------------------------------------------
void __thiscall CharSelectMenuWin::EnableChildWinLogin(CharSelectMenuWin *this, int b)
{
  CharSelectMenuWin *v2; // esi@1

  v2 = this;
  PgWin::EnableChildWin((PgWin *)&this->vfptr, b);
  if ( v2->pkCancelBut )
  {
    ((void (__stdcall *)(_DWORD))v2->pkCancelBut->vfptr[60].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v2->pkCancelBut->vfptr[62].__vecDelDtor)(1);
  }
}

//----- (0047C3C0) --------------------------------------------------------
void __thiscall CharSelectMenuWin::OnCommand(CharSelectMenuWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0u:
      CharSelectFrameWork::CreateAvatar((CharSelectFrameWork *)this->m_pkFrameWork);
      break;
    case 1u:
      CharSelectFrameWork::DeleteAvatar((CharSelectFrameWork *)this->m_pkFrameWork);
      break;
    case 2u:
      CharSelectFrameWork::SelectOk((CharSelectFrameWork *)this->m_pkFrameWork);
      break;
    case 3u:
      CharSelectMenuWin::OnCmdCancel();
      break;
    default:
      return;
  }
}

//----- (0047C420) --------------------------------------------------------
void __thiscall CharSelectMenuWin::DisplayNoCharMsg(CharSelectMenuWin *this)
{
  CharSelectMenuWin *v1; // esi@1
  NiRefObjectVtbl *v2; // edi@1
  NiUnsharedGeometryGroup *v3; // eax@1

  v1 = this;
  v2 = this->m_pkSelectMenuTextWin->vfptr;
  v3 = TextData::Get(0xE9EECF07);
  v2[118].__vecDelDtor((NiRefObject *)v1->m_pkSelectMenuTextWin, (unsigned int)v3);
}

//----- (0047C450) --------------------------------------------------------
void __thiscall CharSelectMenuWin::SetMenuTextInfo(CharSelectMenuWin *this, PROTO_AVATARINFORMATION *pkInfo)
{
  unsigned int v2; // ecx@3
  unsigned int v3; // edx@3
  unsigned int v4; // ebx@3
  unsigned int v5; // ecx@3
  unsigned int v6; // edx@3
  MapInfo *v7; // eax@4
  MapInfo *v8; // ebx@6
  unsigned int v9; // ecx@7
  unsigned int v10; // edx@7
  NiUnsharedGeometryGroup *v11; // eax@8
  char *v12; // eax@9
  NiUnsharedGeometryGroup *v13; // eax@10
  NiUnsharedGeometryGroup *v14; // ST10_4@12
  int v15; // ST0C_4@12
  NiUnsharedGeometryGroup *v16; // eax@12
  CharSelectMenuWin *v17; // [sp+4h] [bp-47Ch]@1
  char dest[4]; // [sp+8h] [bp-478h]@4
  int v19; // [sp+Ch] [bp-474h]@4
  int v20; // [sp+10h] [bp-470h]@4
  char msg[1024]; // [sp+14h] [bp-46Ch]@7
  char acMapName[64]; // [sp+414h] [bp-6Ch]@3
  char acCharName[21]; // [sp+454h] [bp-2Ch]@3
  char acName[13]; // [sp+46Ch] [bp-14h]@3

  v17 = this;
  if ( pkInfo && this->m_pkSelectMenuTextWin )
  {
    v2 = pkInfo->name.n5_code[1];
    v3 = pkInfo->name.n5_code[2];
    v4 = pkInfo->loginmap.n3_code[0];
    *(_DWORD *)acCharName = pkInfo->name.n5_code[0];
    *(_DWORD *)&acCharName[12] = pkInfo->name.n5_code[3];
    *(_DWORD *)&acCharName[4] = v2;
    v5 = pkInfo->name.n5_code[4];
    *(_DWORD *)&acCharName[8] = v3;
    v6 = pkInfo->loginmap.n3_code[2];
    *(_DWORD *)&acCharName[16] = v5;
    acCharName[20] = 0;
    *(_DWORD *)&acName[8] = v6;
    acName[12] = 0;
    memset(acMapName, 0, 0x40u);
    *(_DWORD *)&acMapName[4] = pkInfo->loginmap.n3_code[1];
    *(_DWORD *)acMapName = v4;
    if ( !strcmp("GuildT04", acMapName) )
    {
      v20 = 0;
      v19 = 0;
      *(_DWORD *)dest = 0;
      strncpy(dest, acMapName, 0xCu);
      v7 = MapInfoTab::GetByMapName((Name3 *)dest);
    }
    else
    {
      v7 = MapInfoTab::GetByMapName(&pkInfo->loginmap);
    }
    v8 = v7;
    if ( v7 )
    {
      msg[0] = 0;
      memset(&msg[1], 0, 0x3FFu);
      v9 = pkInfo->loginmap.n3_code[2];
      v10 = pkInfo->loginmap.n3_code[0];
      *(_DWORD *)&acName[4] = pkInfo->loginmap.n3_code[1];
      *(_DWORD *)&acName[8] = v9;
      *(_DWORD *)acName = v10;
      acName[12] = 0;
      if ( !strcmp(acName, "EldPri") )
      {
        v11 = TextData::Get(0x3051484Au);
        sprintf(msg, (const char *)v11, acCharName, v8->Name);
      }
      else
      {
        v12 = CDataReader::GetRecord(
                (CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4),
                (*(_BYTE *)&pkInfo->shape >> 2) & 0x1F);
        if ( v12 )
          v13 = (NiUnsharedGeometryGroup *)(v12 + 21);
        else
          v13 = &unk_96F8EB;
        v14 = v13;
        v15 = pkInfo->level;
        v16 = TextData::Get(0x4A8F8F6Eu);
        sprintf(msg, (const char *)v16, acCharName, v15, v14, v8->Name);
      }
      if ( v17->m_pkSelectMenuTextWin )
        ((void (__stdcall *)(char *))v17->m_pkSelectMenuTextWin->vfptr[118].__vecDelDtor)(msg);
    }
  }
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (0047C670) --------------------------------------------------------
CharSelectMenuWin *__cdecl CharSelectMenuWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  CharSelectMenuWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x170u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&CharSelectMenuWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&CharSelectMenuWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[2][0]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[136].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (CharSelectMenuWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 980C14: using guessed type void (__thiscall *CharSelectMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 980C34: using guessed type int (__thiscall *CharSelectMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0047C7C0) --------------------------------------------------------
bool __thiscall NiInputKeyboard::KeyWasPressed(NiInputKeyboard *this, NiInputKeyboard::KeyCode eKey)
{
  bool result; // al@2

  if ( eKey )
    result = ((unsigned __int8)this->m_aucKeystate[(signed int)eKey >> 3] >> (eKey & 7)) & 1
          && !(((unsigned __int8)this->m_aucKeystateLastUpdate[(signed int)eKey >> 3] >> (eKey & 7)) & 1);
  else
    result = 0;
  return result;
}

//----- (0047C800) --------------------------------------------------------
CharSelectMenuWin *__thiscall CharSelectMenuWin::`scalar deleting destructor'(CharSelectMenuWin *this, unsigned int a2)
{
  CharSelectMenuWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&CharSelectMenuWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CharSelectMenuWin::`vftable'{for `IDirectMessenger'};
  this->pkCancelBut = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 980C14: using guessed type void (__thiscall *CharSelectMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 980C34: using guessed type int (__thiscall *CharSelectMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0047C840) --------------------------------------------------------
void __thiscall EventFriendCountWin::EventFriendCountWin(EventFriendCountWin *this)
{
  EventFriendCountWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&EventFriendCountWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&EventFriendCountWin::`vftable'{for `IDirectMessenger'};
}
// 980EB0: using guessed type void (__thiscall *EventFriendCountWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 980ECC: using guessed type int (__thiscall *EventFriendCountWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0047C860) --------------------------------------------------------
void __thiscall EventFriendCountWin::~EventFriendCountWin(EventFriendCountWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&EventFriendCountWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&EventFriendCountWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 980EB0: using guessed type void (__thiscall *EventFriendCountWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 980ECC: using guessed type int (__thiscall *EventFriendCountWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0047C880) --------------------------------------------------------
void __thiscall EventFriendCountWin::SetCountText(EventFriendCountWin *this, unsigned __int16 dNum)
{
  EventFriendCountWin *v2; // esi@1
  NiUnsharedGeometryGroup *v3; // eax@1
  char pcResultText[1024]; // [sp+4h] [bp-404h]@1

  v2 = this;
  v3 = TextData::Get(0xE2E5D02C);
  sprintf(pcResultText, (const char *)v3, dNum);
  ((void (__stdcall *)(_DWORD))v2->m_pkCountTextWin->vfptr[118].__vecDelDtor)(pcResultText);
}

//----- (0047C8E0) --------------------------------------------------------
char __thiscall EventFriendCountWin::Create(EventFriendCountWin *this, PgFrameWork *pkFrameWork)
{
  EventFriendCountWin *v2; // esi@1
  NiTexturePalette *v3; // ebx@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  NiSourceTexture *v8; // eax@10
  PgSprData *v9; // eax@11
  PgWinSpr *v10; // eax@13
  PgFont *v11; // ST10_4@15
  unsigned int v12; // ST0C_4@15
  unsigned int v13; // eax@15
  PgWinText *v14; // eax@15
  NiRefObjectVtbl *v15; // edi@15
  D3DXCOLOR *v16; // eax@15
  NiRefObjectVtbl *v17; // edi@15
  PgFont *v18; // eax@15
  NiUnsharedGeometryGroup *v19; // eax@15
  NiNode *v20; // esi@16
  D3DXCOLOR result; // [sp+30h] [bp-42Ch]@15
  int uiTop; // [sp+40h] [bp-41Ch]@4
  int uiLeft; // [sp+44h] [bp-418h]@4
  NiPointer<NiNode> spNode; // [sp+48h] [bp-414h]@1
  char string; // [sp+4Ch] [bp-410h]@15
  int v26; // [sp+458h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v26 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "\\Game\\MessageWin02.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "EventFriendCountWin", 0) )
  {
    v6 = spNode.m_pObject;
    v26 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = MenuTexMgr::GetTexture(0x13u);
  if ( v8 )
    v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v8);
  else
    v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  v10 = PgWinSpr::CreateWin(uiLeft, uiTop, v9, (PgWin *)&v2->vfptr, 0, 0);
  if ( v10 )
    v10->vfptr[60].__vecDelDtor((NiRefObject *)v10, 0);
  v11 = Font::Get(0);
  v12 = ((int (__thiscall *)(EventFriendCountWin *))v2->vfptr[37].__vecDelDtor)(v2);
  v13 = ((int (__thiscall *)(EventFriendCountWin *))v2->vfptr[36].__vecDelDtor)(v2);
  v14 = PgWinText::CreateWin(0, 0, v13, v12, v11, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkCountTextWin = v14;
  v14->vfptr[122].__vecDelDtor((NiRefObject *)v14, 5u);
  v15 = v2->m_pkCountTextWin->vfptr;
  v16 = Color::GetDxColor(&result, 55, -1, 0, -1);
  v15[117].__vecDelDtor((NiRefObject *)v2->m_pkCountTextWin, (unsigned int)v16);
  v17 = v2->m_pkCountTextWin->vfptr;
  v18 = Font::Get(MENU);
  v17[113].__vecDelDtor((NiRefObject *)v2->m_pkCountTextWin, (unsigned int)v18);
  ((void (__stdcall *)(const char *))v2->m_pkCountTextWin->vfptr[118].__vecDelDtor)("EventFriendWin");
  ((void (__stdcall *)(_DWORD))v2->m_pkCountTextWin->vfptr[60].__vecDelDtor)(0);
  SpScreenText::SetShadowOffset((SpScreenText *)&v2->m_pkCountTextWin->m_spTextGeom.m_pObject->vfptr, 1u);
  ((void (__thiscall *)(EventFriendCountWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.079999998,
    0.050000001);
  v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
  v19 = TextData::Get(0xE2E5D02C);
  sprintf(&string, (const char *)v19, 0);
  ((void (__stdcall *)(char *))v2->m_pkCountTextWin->vfptr[118].__vecDelDtor)(&string);
  v26 = -1;
  if ( spNode.m_pObject )
  {
    v20 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v20 )
        v20->vfptr->__vecDelDtor((NiRefObject *)v20, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0047CBD0) --------------------------------------------------------
EventFriendCountWin *__cdecl EventFriendCountWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  EventFriendCountWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x160u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&EventFriendCountWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&EventFriendCountWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (EventFriendCountWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 980EB0: using guessed type void (__thiscall *EventFriendCountWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 980ECC: using guessed type int (__thiscall *EventFriendCountWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0047CD10) --------------------------------------------------------
EventFriendCountWin *__thiscall EventFriendCountWin::`scalar deleting destructor'(EventFriendCountWin *this, unsigned int a2)
{
  EventFriendCountWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&EventFriendCountWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&EventFriendCountWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 980EB0: using guessed type void (__thiscall *EventFriendCountWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 980ECC: using guessed type int (__thiscall *EventFriendCountWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0047CD50) --------------------------------------------------------
bool __usercall IsSpecialChar_1@<al>(char c1@<bl>, char c2)
{
  int v2; // eax@2
  bool result; // al@4

  result = 0;
  if ( IsDBCSLeadByte(c1) )
  {
    v2 = 94 * (unsigned __int8)c1 + (unsigned __int8)c2 - 16705;
    if ( v2 < 0 || v2 >= 2350 )
      result = 1;
  }
  return result;
}

//----- (0047CD90) --------------------------------------------------------
char __usercall IsSpecialCharInStr_1@<al>(char *pstr@<eax>)
{
  char *v1; // esi@1
  char v3; // al@3
  char v4; // bl@5
  BYTE c1; // [sp+4h] [bp-4h]@4

  v1 = pstr;
  if ( !pstr )
    return 0;
  v3 = *pstr;
  if ( !v3 )
    return 0;
  while ( 1 )
  {
    c1 = v3;
    if ( !IsDBCSLeadByte(v3) )
    {
      ++v1;
      goto LABEL_9;
    }
    v4 = v1[1];
    if ( IsDBCSLeadByte(c1) )
    {
      if ( 94 * (unsigned __int8)c1 + (unsigned int)(unsigned __int8)v4 - 16705 > 0x92D )
        return 1;
    }
    v1 += 2;
LABEL_9:
    v3 = *v1;
    if ( !*v1 )
      return 0;
  }
}

//----- (0047CE10) --------------------------------------------------------
char __thiscall IsSpecialCharInStr2_1(char *pstr)
{
  char *v1; // esi@1
  signed int v2; // kr00_4@1
  int v3; // esi@1
  char v4; // al@4
  char temp[128]; // [sp+Ch] [bp-84h]@1

  v1 = pstr;
  memset(temp, 0, 0x64u);
  strncpy(temp, v1, 0x5Au);
  v2 = strlen(temp);
  v3 = 0;
  if ( v2 <= 0 )
    return 0;
  while ( IsDBCSLeadByte(temp[v3]) )
  {
    ++v3;
LABEL_32:
    if ( ++v3 >= v2 )
      return 0;
  }
  v4 = temp[v3];
  if ( v4 != 32
    && v4 != 39
    && v4 != 92
    && v4 != 47
    && v4 != 58
    && v4 != 42
    && v4 != 63
    && v4 != 60
    && v4 != 62
    && v4 != 124
    && v4 != 126
    && v4 != 33
    && v4 != 64
    && v4 != 37
    && v4 != 38
    && v4 != 59
    && v4 != 46
    && v4 != 44
    && v4 != 34
    && v4 != 96
    && v4 != 40
    && v4 != 41
    && v4 != 43
    && v4 != 45
    && v4 != 35
    && v4 != 36
    && v4 != 91
    && v4 != 93 )
  {
    goto LABEL_32;
  }
  return 1;
}

//----- (0047CF40) --------------------------------------------------------
char __usercall IsPeculiarStr_1@<al>(char *pcName@<esi>)
{
  unsigned int v1; // edx@1
  char v2; // bl@1
  unsigned int v3; // ecx@1
  char v4; // al@2
  char result; // al@12

  v1 = strlen(pcName);
  v2 = 0;
  v3 = 0;
  if ( !v1 )
    goto LABEL_16;
  do
  {
    v4 = pcName[v3];
    if ( (v4 < 65 || v4 > 90) && (v4 < 97 || v4 > 122) && (v4 < 48 || v4 > 57) && v4 != 95 )
      v2 = 1;
    ++v3;
  }
  while ( v3 < v1 );
  if ( v2 )
    result = 1;
  else
LABEL_16:
    result = 0;
  return result;
}

//----- (0047CFA0) --------------------------------------------------------
void __thiscall GameFrameWork::AddGMUserChat(GameFrameWork *this, char *pcText)
{
  ChatDisplayWin2::AddGMNormalChat(this->m_pkChatDisplayWin, pcText);
}

//----- (0047CFB0) --------------------------------------------------------
void __thiscall GameFrameWork::AddGMOtherUserChat(GameFrameWork *this, char *pcText)
{
  ChatDisplayWin2::AddGMOtherNormalChat(this->m_pkChatDisplayWin, pcText);
}

//----- (0047CFC0) --------------------------------------------------------
void __userpurge GameFrameWork::AddAnnounceMsg(GameFrameWork *this@<ecx>, int a2@<edi>, int a3@<esi>, char *pxText, D3DXCOLOR TextColor)
{
  AnnounceWin::AddText(this->m_pkAnnounceWin, a2, a3, pxText, &TextColor, 0, 0.0);
}

//----- (0047CFF0) --------------------------------------------------------
void __thiscall GameFrameWork::AddSysMsg(GameFrameWork *this, const char *pcText)
{
  GameFrameWork *v2; // esi@1
  ChatDisplayWin *v3; // ecx@3

  v2 = this;
  if ( this->m_pkChatDisplayWin )
    ChatDisplayWin2::AddSystemChat(pcText);
  v3 = (ChatDisplayWin *)&v2->m_pkSysMsgDisplayWin->vfptr;
  if ( v3 )
    ChatDisplayWin::AddSystemChat(v3, pcText);
}

//----- (0047D020) --------------------------------------------------------
void __thiscall GameFrameWork::AddBattleMsg(GameFrameWork *this, char *pcText)
{
  SysMsgDisplayWin *v2; // ecx@1

  v2 = this->m_pkSysMsgDisplayWin;
  if ( v2 )
    ChatDisplayWin::AddBattleChat((ChatDisplayWin *)&v2->vfptr, pcText);
}

//----- (0047D040) --------------------------------------------------------
void GameFrameWork::VaAddSysMsg(GameFrameWork *this, char *pcFormat, ...)
{
  SysMsgDisplayWin *v2; // ecx@3
  char str[256]; // [sp+4h] [bp-104h]@1
  va_list va; // [sp+118h] [bp+10h]@1

  va_start(va, pcFormat);
  vsprintf(str, pcFormat, va);
  if ( this->m_pkChatDisplayWin )
    ChatDisplayWin2::AddSystemChat(str);
  v2 = this->m_pkSysMsgDisplayWin;
  if ( v2 )
    ChatDisplayWin::AddSystemChat((ChatDisplayWin *)&v2->vfptr, str);
}

//----- (0047D0B0) --------------------------------------------------------
void __thiscall GameFrameWork::AddAuthorMsg(GameFrameWork *this, char *pcText)
{
  GameFrameWork *v2; // esi@1

  v2 = this;
  ChatDisplayWin2::AddAuthorChat(this->m_pkChatDisplayWin, pcText);
  ChatDisplayWin::AddAuthorChat((ChatDisplayWin *)&v2->m_pkSysMsgDisplayWin->vfptr, pcText);
}

//----- (0047D0E0) --------------------------------------------------------
char __usercall IsChatCommandPrefix@<al>(char *pcText@<esi>, int *iPrefixLen)
{
  char result; // al@3

  if ( IsDBCSLeadByte(*pcText) || *pcText != 47 )
  {
    result = 0;
  }
  else
  {
    *iPrefixLen = 1;
    result = 1;
  }
  return result;
}

//----- (0047D110) --------------------------------------------------------
void __usercall StrCopyToSpace(char *pcDest@<ecx>, char *pcSrc@<eax>, int *iCount@<ebx>)
{
  char *v3; // edi@1
  char *v4; // esi@1
  char v5; // al@3

  v3 = pcDest;
  v4 = pcSrc;
  *iCount = 0;
  if ( pcDest )
  {
    if ( pcSrc )
    {
      v5 = *pcSrc;
      if ( v5 )
      {
        if ( v5 != 32 )
        {
          do
          {
            if ( !v5 )
              break;
            if ( IsDBCSLeadByte(v5) )
            {
              *v3 = *v4;
              v3[1] = v4[1];
              v3 += 2;
              v4 += 2;
              *iCount += 2;
            }
            else
            {
              *v3++ = *v4++;
              ++*iCount;
            }
            v5 = *v4;
          }
          while ( *v4 != 32 );
        }
      }
    }
  }
}

//----- (0047D170) --------------------------------------------------------
char __fastcall IsAllSpace(char *pcSrc)
{
  char v1; // al@2

  if ( pcSrc )
  {
    v1 = *pcSrc;
    if ( *pcSrc )
    {
      while ( v1 == 32 )
      {
        v1 = (pcSrc++)[1];
        if ( !v1 )
          return 1;
      }
    }
  }
  return 0;
}

//----- (0047D1A0) --------------------------------------------------------
char __cdecl GetShisperNameStrLen(char *pcText)
{
  int *iCount; // ecx@0
  char *v2; // eax@1
  int *v3; // ebx@1
  char result; // al@5
  char acName[256]; // [sp+4h] [bp-104h]@5

  v2 = pcText;
  v3 = iCount;
  if ( pcText && *pcText )
  {
    if ( *pcText == 32 )
    {
      do
        ++v2;
      while ( *v2 == 32 );
    }
    *iCount = 0;
    StrCopyToSpace(acName, v2, iCount);
    ++*v3;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0047D210) --------------------------------------------------------
char __thiscall IsValidShisperChat(char *pcText)
{
  char *v1; // esi@1
  char result; // al@8
  int iCount; // [sp+4h] [bp-108h]@6
  char acName[256]; // [sp+8h] [bp-104h]@6

  v1 = pcText;
  if ( !pcText || !*pcText )
    goto LABEL_12;
  if ( *pcText == 32 )
  {
    do
      ++v1;
    while ( *v1 == 32 );
  }
  if ( *v1 && (iCount = 0, StrCopyToSpace(acName, v1, &iCount), iCount) && v1[iCount] )
    result = 1;
  else
LABEL_12:
    result = 0;
  return result;
}

//----- (0047D290) --------------------------------------------------------
char __usercall IsShisperChat@<al>(char *pcText@<esi>, int *iTextLen)
{
  char result; // al@2

  if ( pcText && (!strncmp(pcText, "w ", 2u) || !strncmp(pcText, "W ", 2u)) )
  {
    *iTextLen = 2;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0047D2D0) --------------------------------------------------------
char __usercall IsVote@<al>(char *pcText@<esi>, int *iTextLen)
{
  char result; // al@2

  if ( pcText && (!strncmp(pcText, "v ", 2u) || !strncmp(pcText, "V ", 2u)) )
  {
    *iTextLen = 2;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0047D310) --------------------------------------------------------
void __stdcall GameFrameWork::GetNameInStr(char *pcReturnID, char *pcInputStr)
{
  char v3; // ST0C_1@1
  char *v4; // esi@6
  int iCount; // [sp+4h] [bp-4h]@1

  v3 = *pcInputStr;
  iCount = 0;
  if ( !IsDBCSLeadByte(v3) && *pcInputStr == 47 )
  {
    if ( pcInputStr != (char *)-1 && (!strncmp(pcInputStr + 1, "w ", 2u) || !strncmp(pcInputStr + 1, "W ", 2u)) )
    {
      v4 = pcInputStr + 2;
    }
    else
    {
      if ( strncmp(pcInputStr + 1, "friendship", 0xAu) )
        return;
      v4 = pcInputStr + 11;
    }
    if ( *v4 )
    {
      for ( ; *v4 == 32; ++v4 )
        ;
      StrCopyToSpace(pcReturnID, v4, &iCount);
      if ( iCount )
      {
        if ( (unsigned int)iCount <= 0x14 )
          pcReturnID[iCount] = 0;
      }
    }
  }
}

//----- (0047D3C0) --------------------------------------------------------
void __stdcall GameFrameWork::FilteringWithoutID(char *pcText, char *pcCharID)
{
  char *v3; // esi@1
  unsigned int v4; // ebx@3
  int v5; // esi@4
  ProcessingString *v6; // eax@9
  const char *last; // [sp+Ch] [bp-10Ch]@1
  int iAllStrLen; // [sp+10h] [bp-108h]@1
  char acCharName[256]; // [sp+14h] [bp-104h]@1

  v3 = pcCharID;
  last = pcCharID;
  memset(acCharName, 0, 0x100u);
  iAllStrLen = strlen(pcText);
  if ( !pcCharID )
  {
    GameFrameWork::GetNameInStr(acCharName, pcText);
    last = acCharName;
    v3 = acCharName;
  }
  v4 = strlen(v3);
  if ( v4 )
  {
    v5 = 0;
    if ( (signed int)(v4 + iAllStrLen) > 0 )
    {
      while ( strncmp(&pcText[v5], last, v4) )
      {
        if ( ++v5 >= (signed int)(v4 + iAllStrLen) )
          goto LABEL_9;
      }
      iAllStrLen = v4 + v5;
    }
LABEL_9:
    v6 = TextFilterTable::FilterSlander(&pcText[iAllStrLen]);
    pcText[iAllStrLen] = 0;
    sprintf(pcText, "%s %s", pcText, v6);
  }
}

//----- (0047D4C0) --------------------------------------------------------
char __usercall IsPartyChat@<al>(char *pcText@<esi>, int *iTextLen)
{
  char result; // al@3

  if ( !strncmp(pcText, "p ", 2u) || !strncmp(pcText, "P ", 2u) )
  {
    *iTextLen = 2;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0047D500) --------------------------------------------------------
char __usercall IsGuildChat@<al>(char *pcText@<esi>, int *iTextLen)
{
  char result; // al@3

  if ( !strncmp(pcText, "g ", 2u) || !strncmp(pcText, "G ", 2u) )
  {
    *iTextLen = 2;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0047D540) --------------------------------------------------------
char __usercall IsGuildAcademyChat@<al>(char *pcText@<esi>, int *iTextLen)
{
  char result; // al@3

  if ( !strncmp(pcText, "a ", 2u) || !strncmp(pcText, "A ", 2u) )
  {
    *iTextLen = 2;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0047D580) --------------------------------------------------------
char __usercall IsRaidChat@<al>(char *pcText@<esi>, int *iTextLen)
{
  char result; // al@3

  if ( !strncmp(pcText, "f ", 2u) || !strncmp(pcText, "F ", 2u) )
  {
    *iTextLen = 2;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0047D5C0) --------------------------------------------------------
char __usercall isreplyWhisperChat@<al>(char *pcText@<esi>, int *iTextLen@<edi>)
{
  char result; // al@4

  if ( !strncmp(pcText, "r ", 2u) || !strncmp(pcText, "R ", 2u) )
  {
    *iTextLen = 2;
    result = 1;
  }
  else if ( !strncmp(pcText, "¤¡ ", 3u) )
  {
    *iTextLen = 3;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0047D620) --------------------------------------------------------
char __usercall IsShoutChat@<al>(char *pcText@<esi>, int *iTextLen)
{
  char result; // al@3

  if ( !strncmp(pcText, "s ", 2u) || !strncmp(pcText, "S ", 2u) )
  {
    *iTextLen = 2;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0047D660) --------------------------------------------------------
char __usercall IsNormalChat@<al>(char *pcText@<esi>, int *iTextLen)
{
  char result; // al@3

  if ( !strncmp(pcText, "n", 2u) || !strncmp(pcText, "N", 2u) )
  {
    *iTextLen = 2;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0047D6A0) --------------------------------------------------------
bool __stdcall GameFrameWork::DecodingClientOnlyChat(char *pcText)
{
  return 0;
}

//----- (0047D6B0) --------------------------------------------------------
bool __stdcall GameFrameWork::DecodingDebugChat(char *pcText)
{
  return 0;
}

//----- (0047D6C0) --------------------------------------------------------
void __thiscall GameFrameWork::AddSChatItemLink(GameFrameWork *this, int eType, SHINE_ITEM_STRUCT *pItem)
{
  ChatDisplayWin2::AddChatBoardFlexIItemLink(this->m_pkChatDisplayWin, (ChatBoardFlex::Type)eType, pItem);
}

//----- (0047D6D0) --------------------------------------------------------
void __thiscall ChatCommandList::InitPos(ChatCommandList *this)
{
  this->m_nCurChatComNum = this->m_VectorChatCommand._Mylast - this->m_VectorChatCommand._Myfirst;
}

//----- (0047D6F0) --------------------------------------------------------
void __thiscall GameFrameWork::AddUserChat(GameFrameWork *this, char *pcText, char kChatID)
{
  GameFrameWork *v3; // esi@1

  v3 = this;
  if ( g_pkMainChar->m_kAbStateProperty.iCantChatStateCount <= 0 )
  {
    ChatDisplayWin2::AddNormalChat(this->m_pkChatDisplayWin, pcText, kChatID);
    ChatDisplayWin::AddNormalChat((ChatDisplayWin *)&v3->m_pkSysMsgDisplayWin->vfptr, pcText, kChatID);
  }
}

//----- (0047D730) --------------------------------------------------------
void __thiscall GameFrameWork::AddOtherUserChat(GameFrameWork *this, char *pcText, char kChatID)
{
  GameFrameWork *v3; // esi@1

  v3 = this;
  if ( g_pkMainChar->m_kAbStateProperty.iCantChatStateCount <= 0 )
  {
    ChatDisplayWin2::AddOtherNormalChat(this->m_pkChatDisplayWin, pcText, kChatID);
    ChatDisplayWin::AddOtherNormalChat((ChatDisplayWin *)&v3->m_pkSysMsgDisplayWin->vfptr, pcText, kChatID);
  }
}

//----- (0047D770) --------------------------------------------------------
void __thiscall GameFrameWork::AddUserChat(GameFrameWork *this, char *pcText)
{
  GameFrameWork *v2; // esi@1

  v2 = this;
  if ( g_pkMainChar->m_kAbStateProperty.iCantChatStateCount <= 0 )
  {
    ChatDisplayWin2::AddNormalChat(this->m_pkChatDisplayWin, pcText);
    ChatDisplayWin::AddNormalChat((ChatDisplayWin *)&v2->m_pkSysMsgDisplayWin->vfptr, pcText);
  }
}

//----- (0047D7B0) --------------------------------------------------------
void __thiscall GameFrameWork::AddOtherUserChat(GameFrameWork *this, char *pcText)
{
  GameFrameWork *v2; // esi@1

  v2 = this;
  if ( g_pkMainChar->m_kAbStateProperty.iCantChatStateCount <= 0 )
  {
    ChatDisplayWin2::AddOtherNormalChat(this->m_pkChatDisplayWin, pcText);
    ChatDisplayWin::AddOtherNormalChat((ChatDisplayWin *)&v2->m_pkSysMsgDisplayWin->vfptr, pcText);
  }
}

//----- (0047D7F0) --------------------------------------------------------
void __thiscall GameFrameWork::AddPartyChat(GameFrameWork *this, Name5 kCharID, char *pcText)
{
  GameFrameWork *v3; // esi@1
  char *v4; // eax@2
  char *v5; // eax@2
  char acName[21]; // [sp+8h] [bp-1Ch]@1

  v3 = this;
  *(Name5 *)acName = kCharID;
  acName[20] = 0;
  if ( g_pkMainChar->m_kAbStateProperty.iCantChatStateCount <= 0 )
  {
    v4 = fs("[%s] : %s", acName, pcText);
    ChatDisplayWin2::AddPartyChat(v3->m_pkChatDisplayWin, v4);
    v5 = fs("[%s] : %s", acName, pcText);
    ChatDisplayWin::AddPartyChat((ChatDisplayWin *)&v3->m_pkSysMsgDisplayWin->vfptr, v5);
  }
}

//----- (0047D890) --------------------------------------------------------
void __thiscall GameFrameWork::AddRaidChat(GameFrameWork *this, Name5 kCharID, char *pcText)
{
  GameFrameWork *v3; // esi@1
  char *v4; // eax@2
  char acName[21]; // [sp+4h] [bp-1Ch]@1

  v3 = this;
  *(Name5 *)acName = kCharID;
  acName[20] = 0;
  if ( g_pkMainChar->m_kAbStateProperty.iCantChatStateCount <= 0 )
  {
    v4 = fs("[%s] : %s", acName, pcText);
    ChatDisplayWin2::AddRaidChat(v3->m_pkChatDisplayWin, v4);
  }
}

//----- (0047D910) --------------------------------------------------------
void __thiscall GameFrameWork::AddOtherRaidChat(GameFrameWork *this, Name5 kCharID, char *pcText)
{
  GameFrameWork *v3; // esi@1
  char *v4; // eax@2
  char acName[21]; // [sp+4h] [bp-1Ch]@1

  v3 = this;
  *(Name5 *)acName = kCharID;
  acName[20] = 0;
  if ( g_pkMainChar->m_kAbStateProperty.iCantChatStateCount <= 0 )
  {
    v4 = fs("{color,#FFFF00,[%s]} : %s", acName, pcText);
    ChatDisplayWin2::AddOtherRaidChat(v3->m_pkChatDisplayWin, v4);
  }
}

//----- (0047D990) --------------------------------------------------------
void __thiscall GameFrameWork::AddGuildChat(GameFrameWork *this, Name5 kCharID, char *pcText)
{
  GameFrameWork *v3; // esi@1
  char *v4; // eax@2
  char *v5; // eax@2
  char acName[21]; // [sp+8h] [bp-1Ch]@1

  v3 = this;
  *(Name5 *)acName = kCharID;
  acName[20] = 0;
  if ( g_pkMainChar->m_kAbStateProperty.iCantChatStateCount <= 0 )
  {
    v4 = fs("[%s] : %s", acName, pcText);
    ChatDisplayWin2::AddGuildChat(v3->m_pkChatDisplayWin, v4);
    v5 = fs("[%s] : %s", acName, pcText);
    ChatDisplayWin::AddGuildChat((ChatDisplayWin *)&v3->m_pkSysMsgDisplayWin->vfptr, v5);
  }
}

//----- (0047DA30) --------------------------------------------------------
void __thiscall GameFrameWork::AddOtherPartyChat(GameFrameWork *this, Name5 kCharID, char *pcText)
{
  GameFrameWork *v3; // esi@1
  char *v4; // eax@2
  char *v5; // eax@2
  char acName[21]; // [sp+8h] [bp-1Ch]@1

  v3 = this;
  *(Name5 *)acName = kCharID;
  acName[20] = 0;
  if ( g_pkMainChar->m_kAbStateProperty.iCantChatStateCount <= 0 )
  {
    v4 = fs("{color,#FFFF00,[%s]} : %s", acName, pcText);
    ChatDisplayWin2::AddOtherPartyChat(v3->m_pkChatDisplayWin, v4);
    v5 = fs("{color,#FFFF00,[%s]} : %s", acName, pcText);
    ChatDisplayWin::AddPartyChat((ChatDisplayWin *)&v3->m_pkSysMsgDisplayWin->vfptr, v5);
  }
}

//----- (0047DAD0) --------------------------------------------------------
void __thiscall GameFrameWork::AddOtherGuildChat(GameFrameWork *this, Name5 kCharID, char *pcText)
{
  GameFrameWork *v3; // esi@1
  char *v4; // eax@2
  char *v5; // eax@2
  char acName[21]; // [sp+8h] [bp-1Ch]@1

  v3 = this;
  *(Name5 *)acName = kCharID;
  acName[20] = 0;
  if ( g_pkMainChar->m_kAbStateProperty.iCantChatStateCount <= 0 )
  {
    v4 = fs("{color,#FFFF00,[%s]} : %s", acName, pcText);
    ChatDisplayWin2::AddOtherGuildChat(v3->m_pkChatDisplayWin, v4);
    v5 = fs("{color,#FFFF00,[%s]} : %s", acName, pcText);
    ChatDisplayWin::AddGuildChat((ChatDisplayWin *)&v3->m_pkSysMsgDisplayWin->vfptr, v5);
  }
}

//----- (0047DB70) --------------------------------------------------------
void __thiscall GameFrameWork::AddGuildAcademyChat(GameFrameWork *this, Name5 kCharID, char *pcText)
{
  GameFrameWork *v3; // esi@1
  char *v4; // eax@2
  char acName[21]; // [sp+4h] [bp-1Ch]@1

  v3 = this;
  *(Name5 *)acName = kCharID;
  acName[20] = 0;
  if ( g_pkMainChar->m_kAbStateProperty.iCantChatStateCount <= 0 )
  {
    v4 = fs("[%s] : %s", acName, pcText);
    ChatDisplayWin2::AddGuildAcademyChat(v3->m_pkChatDisplayWin, v4);
  }
}

//----- (0047DBF0) --------------------------------------------------------
void __thiscall GameFrameWork::AddOtherGuildAcademyChat(GameFrameWork *this, Name5 kCharID, char *pcText)
{
  GameFrameWork *v3; // esi@1
  char *v4; // eax@2
  char acName[21]; // [sp+4h] [bp-1Ch]@1

  v3 = this;
  *(Name5 *)acName = kCharID;
  acName[20] = 0;
  if ( g_pkMainChar->m_kAbStateProperty.iCantChatStateCount <= 0 )
  {
    v4 = fs("{color,#FFFF00,[%s]} : %s", acName, pcText);
    ChatDisplayWin2::AddOtherGuildAcademyChat(v3->m_pkChatDisplayWin, v4);
  }
}

//----- (0047DC70) --------------------------------------------------------
void __thiscall GameFrameWork::AddWhisperChat(GameFrameWork *this, Name5 kCharID, char *pcText)
{
  GameFrameWork *v3; // ebx@1
  char *v4; // eax@3
  char *v5; // eax@3
  char acName[21]; // [sp+8h] [bp-1Ch]@2

  v3 = this;
  if ( !byte_B4FF70 )
  {
    *(Name5 *)acName = kCharID;
    acName[20] = 0;
    GameFrameWork::m_kWhisperCharID = kCharID;
    if ( g_pkMainChar->m_kAbStateProperty.iCantChatStateCount <= 0 )
    {
      v4 = fs("{color,#FFFF00,[From %s]} : %s", acName, pcText);
      ChatDisplayWin2::AddWhisperChat(v3->m_pkChatDisplayWin, v4);
      v5 = fs("{color,#FFFF00,[From %s]} : %s", acName, pcText);
      ChatDisplayWin::AddWhisperChat((ChatDisplayWin *)&v3->m_pkSysMsgDisplayWin->vfptr, v5);
    }
  }
}
// B4FF70: using guessed type char byte_B4FF70;

//----- (0047DD40) --------------------------------------------------------
void __thiscall GameFrameWork::AddWhisperChat_To(GameFrameWork *this, Name5 kCharID, char *pcText)
{
  GameFrameWork *v3; // ebx@1
  char *v4; // eax@3
  char *v5; // eax@3
  char acName[21]; // [sp+8h] [bp-1Ch]@2

  v3 = this;
  if ( !byte_B4FF70 )
  {
    *(Name5 *)acName = kCharID;
    acName[20] = 0;
    GameFrameWork::m_kWhisperCharID = kCharID;
    if ( g_pkMainChar->m_kAbStateProperty.iCantChatStateCount <= 0 )
    {
      v4 = fs("[To %s] : %s", acName, pcText);
      ChatDisplayWin2::AddWhisperChat(v3->m_pkChatDisplayWin, v4);
      v5 = fs("[To %s] : %s", acName, pcText);
      ChatDisplayWin::AddWhisperChat((ChatDisplayWin *)&v3->m_pkSysMsgDisplayWin->vfptr, v5);
    }
  }
}
// B4FF70: using guessed type char byte_B4FF70;

//----- (0047DE10) --------------------------------------------------------
void __thiscall GameFrameWork::AddShoutChat(GameFrameWork *this, Name5 kCharID, char *pcText)
{
  GameFrameWork *v3; // esi@1
  char *v4; // eax@3
  char *v5; // eax@4
  char *v6; // eax@3
  char acName[21]; // [sp+8h] [bp-1Ch]@1

  v3 = this;
  *(Name5 *)acName = kCharID;
  acName[20] = 0;
  if ( g_pkMainChar->m_kAbStateProperty.iCantChatStateCount <= 0 )
  {
    if ( !strcmp(acName, (const char *)((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)()) )
    {
      v4 = fs("[%s] : %s", acName, pcText);
      ChatDisplayWin2::AddShoutChat(v3->m_pkChatDisplayWin, v4);
      v6 = fs("[%s] : %s", acName, pcText);
    }
    else
    {
      v5 = fs("{color,#FFFF00,[%s]} : %s", acName, pcText);
      ChatDisplayWin2::AddShoutChat(v3->m_pkChatDisplayWin, v5);
      v6 = fs("{color,#FFFF00,[%s]} : %s", acName, pcText);
    }
    ChatDisplayWin::AddShoutChat((ChatDisplayWin *)&v3->m_pkSysMsgDisplayWin->vfptr, v6);
  }
}

//----- (0047DF10) --------------------------------------------------------
void __thiscall GameFrameWork::AddGMWhisperChat(GameFrameWork *this, Name5 kCharID, char *pcText)
{
  GameFrameWork *v3; // esi@1
  char *v4; // eax@2
  char *v5; // eax@2
  char acName[21]; // [sp+8h] [bp-1Ch]@2

  v3 = this;
  if ( !byte_B4FF70 )
  {
    *(Name5 *)acName = kCharID;
    GameFrameWork::m_kWhisperCharID = kCharID;
    acName[20] = 0;
    v4 = fs("[From %s] : %s", acName, pcText);
    ChatDisplayWin2::AddGMWhisperChat(v3->m_pkChatDisplayWin, v4);
    v5 = fs("[From %s] : %s", acName, pcText);
    ChatDisplayWin::AddGMWhisperChat((ChatDisplayWin *)&v3->m_pkSysMsgDisplayWin->vfptr, v5);
  }
}
// B4FF70: using guessed type char byte_B4FF70;

//----- (0047DFD0) --------------------------------------------------------
void __thiscall GameFrameWork::AddGMWhisperChat_To(GameFrameWork *this, Name5 kCharID, char *pcText)
{
  GameFrameWork *v3; // ebx@1
  char *v4; // eax@2
  char acName[21]; // [sp+8h] [bp-1Ch]@2

  v3 = this;
  if ( !byte_B4FF70 )
  {
    *(_QWORD *)&acName[8] = *(_QWORD *)&kCharID.n5_code[2];
    *(_QWORD *)&GameFrameWork::m_kWhisperCharID.n5_code[2] = *(_QWORD *)&kCharID.n5_code[2];
    *(_QWORD *)acName = *(_QWORD *)&kCharID.n5_name[0];
    *(_DWORD *)&acName[16] = kCharID.n5_code[4];
    acName[20] = 0;
    *(_QWORD *)&GameFrameWork::m_kWhisperCharID.n5_name[0] = *(_QWORD *)&kCharID.n5_name[0];
    GameFrameWork::m_kWhisperCharID.n5_code[4] = kCharID.n5_code[4];
    v4 = fs("[To %s] : %s", acName, pcText);
    ChatDisplayWin2::AddGMWhisperChat(v3->m_pkChatDisplayWin, v4);
  }
}
// B4FF70: using guessed type char byte_B4FF70;

//----- (0047E070) --------------------------------------------------------
void __thiscall GameFrameWork::AddGMShoutChat(GameFrameWork *this, Name5 kCharID, char *pcText)
{
  GameFrameWork *v3; // esi@1
  char *v4; // eax@1
  char acName[21]; // [sp+4h] [bp-1Ch]@1

  v3 = this;
  *(Name5 *)acName = kCharID;
  acName[20] = 0;
  v4 = fs("{color,#FFFF00,[%s]} : %s", acName, pcText);
  ChatDisplayWin2::AddGMShoutChat(v3->m_pkChatDisplayWin, v4);
}

//----- (0047E0E0) --------------------------------------------------------
void __thiscall GameFrameWork::SetSaveChatComList(GameFrameWork *this, bool bSave)
{
  this->m_kChatComList.m_bIsSaveCommand = bSave;
}

//----- (0047E0F0) --------------------------------------------------------
char *__thiscall ChatCommandList::GetUpCommand(ChatCommandList *this)
{
  bool v1; // sf@1
  int v2; // esi@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // edi@3
  char *result; // eax@4

  v1 = this->m_nCurChatComNum-- - 1 < 0;
  if ( v1 )
    this->m_nCurChatComNum = 0;
  v2 = this->m_nCurChatComNum;
  v3 = this->m_VectorChatCommand._Myfirst;
  if ( v2 >= this->m_VectorChatCommand._Mylast - this->m_VectorChatCommand._Myfirst )
  {
    result = 0;
  }
  else
  {
    result = v3[v2]._Bx._Buf;
    if ( v3[v2]._Myres >= 0x10 )
      result = *(char **)result;
  }
  return result;
}

//----- (0047E140) --------------------------------------------------------
char *__thiscall ChatCommandList::GetDownCommand(ChatCommandList *this)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v1; // edi@1
  signed int v2; // esi@1
  int v3; // ecx@3
  char *result; // eax@4

  ++this->m_nCurChatComNum;
  v1 = this->m_VectorChatCommand._Myfirst;
  v2 = (char *)this->m_VectorChatCommand._Mylast - (char *)this->m_VectorChatCommand._Myfirst;
  if ( this->m_nCurChatComNum >= v2 / 28 )
    this->m_nCurChatComNum = v2 / 28 - 1;
  v3 = this->m_nCurChatComNum;
  if ( v3 <= -1 )
  {
    result = 0;
  }
  else
  {
    result = v1[v3]._Bx._Buf;
    if ( v1[v3]._Myres >= 0x10 )
      result = *(char **)result;
  }
  return result;
}

//----- (0047E190) --------------------------------------------------------
void __thiscall GameFrameWork::UpdateCheckTab(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  ChatDisplayWin2 *v2; // ecx@1
  char *v3; // eax@4
  int v4; // eax@4
  NiUnsharedGeometryGroup *v5; // eax@5

  v1 = this;
  v2 = this->m_pkChatDisplayWin;
  if ( v2
    && (unsigned __int8)ChatDisplayWin2::IsDuringEdit(v2)
    && !ChatDisplayWin2::IsItemLinkInfo(v1->m_pkChatDisplayWin) )
  {
    v3 = ChatDisplayWin2::GetCurrentChatText(v1->m_pkChatDisplayWin);
    strchr(v3, 9);
    if ( v4 )
    {
      ChatDisplayWin2::ChatStart(v1->m_pkChatDisplayWin, &byte_9810FE);
      v5 = TextData3::Get(0xE45192Du);
      GameFrameWork::AddSysMsg(v1, (const char *)v5);
    }
  }
}

//----- (0047E200) --------------------------------------------------------
bool __usercall IsChatCommand@<al>(unsigned int eTextID@<eax>, char *pcChatText, int *iTextLen)
{
  NiUnsharedGeometryGroup *v3; // eax@1
  bool result; // al@2
  unsigned int v5; // kr00_4@3

  v3 = TextData::Get(eTextID);
  if ( v3 )
  {
    v5 = strlen((const char *)v3);
    *iTextLen = v5;
    result = strncmp(pcChatText, (const char *)v3, v5) == 0;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0047E250) --------------------------------------------------------
char __thiscall GameFrameWork::SetPrisonInfo(GameFrameWork *this, char *pcText, bool bAdd)
{
  NiUnsharedGeometryGroup *v3; // eax@2
  int v4; // edx@2
  char v5; // cl@3
  char v6; // cl@6
  char *i; // esi@7
  char v8; // al@9
  int v9; // ecx@9
  char *v10; // edx@10
  char v11; // al@15
  int v12; // ecx@15
  char *v13; // edx@16
  int v14; // eax@19
  unsigned __int16 v15; // di@19
  char *v16; // eax@21
  char v18; // al@27
  int v19; // ecx@27
  char *v20; // edx@28
  char *v21; // eax@31
  char v22; // cl@32
  char *v23; // eax@36
  char v24; // cl@37
  int v25; // eax@40
  _BYTE v26[20]; // [sp-20h] [bp-44Ch]@40
  GameFrameWork *v27; // [sp+10h] [bp-41Ch]@1
  Name5 v28; // [sp+14h] [bp-418h]@40
  char time[255]; // [sp+28h] [bp-404h]@15
  char charID[255]; // [sp+128h] [bp-304h]@9
  char sRemark[255]; // [sp+228h] [bp-204h]@36
  char sReason[255]; // [sp+328h] [bp-104h]@27

  v27 = this;
  if ( bAdd )
  {
    v3 = TextData::Get(0xA18DC7BF);
    v4 = (int)&v3->vfptr + 1;
    do
    {
      v5 = (char)v3->vfptr;
      v3 = (NiUnsharedGeometryGroup *)((char *)v3 + 1);
    }
    while ( v5 );
  }
  else
  {
    v3 = TextData::Get(0x34350B0Eu);
    v4 = (int)&v3->vfptr + 1;
    do
    {
      v6 = (char)v3->vfptr;
      v3 = (NiUnsharedGeometryGroup *)((char *)v3 + 1);
    }
    while ( v6 );
  }
  for ( i = &pcText[(_DWORD)v3 - v4]; *i == 32; ++i )
    ;
  charID[0] = 0;
  memset(&charID[1], 0, 0xFEu);
  v8 = *i;
  v9 = 0;
  if ( *i != 32 )
  {
    v10 = (char *)(charID - i);
    while ( v8 )
    {
      i[(_DWORD)v10] = v8;
      v8 = (i++)[1];
      ++v9;
      if ( v8 == 32 )
        goto LABEL_13;
    }
    v16 = (char *)TextData::Get(0xE61D1911);
    goto LABEL_23;
  }
LABEL_13:
  for ( charID[v9] = 0; *i == 32; ++i )
    ;
  time[0] = 0;
  memset(&time[1], 0, 0xFEu);
  v11 = *i;
  v12 = 0;
  if ( *i != 32 )
  {
    v13 = (char *)(time - i);
    while ( v11 )
    {
      i[(_DWORD)v13] = v11;
      v11 = (i++)[1];
      ++v12;
      if ( v11 == 32 )
        goto LABEL_19;
    }
    v16 = (char *)TextData::Get(0xE61E1911);
    goto LABEL_23;
  }
LABEL_19:
  time[v12] = 0;
  v14 = atoi(time);
  v15 = v14;
  if ( bAdd && !v14 )
  {
    v16 = (char *)TextData::Get(0xE61F1911);
LABEL_23:
    MsgBox::Modeless(MSGBOX_OK, v16);
    return 0;
  }
  sprintf(time, "%i", v14);
  for ( ; *i == 32; ++i )
    ;
  sReason[0] = 0;
  memset(&sReason[1], 0, 0xFEu);
  v18 = *i;
  v19 = 0;
  if ( *i != 32 )
  {
    v20 = (char *)(sReason - i);
    while ( v18 )
    {
      i[(_DWORD)v20] = v18;
      v18 = (i++)[1];
      ++v19;
      if ( v18 == 32 )
        goto LABEL_31;
    }
    v16 = (char *)TextData::Get(0xE6201911);
    goto LABEL_23;
  }
LABEL_31:
  v21 = sReason;
  sReason[v19] = 0;
  do
    v22 = *v21++;
  while ( v22 );
  if ( v21 == &sReason[1] )
  {
    v16 = (char *)TextData::Get(0xE6211911);
    goto LABEL_23;
  }
  sRemark[0] = 0;
  memset(&sRemark[1], 0, 0xFEu);
  sprintf(sRemark, "%s", i);
  v23 = sRemark;
  do
    v24 = *v23++;
  while ( v24 );
  if ( v23 == &sRemark[1] )
  {
    v16 = (char *)TextData::Get(0xE6221911);
    goto LABEL_23;
  }
  Name5::Name5(&v28, charID);
  *(_QWORD *)v26 = *(_QWORD *)v25;
  *(_QWORD *)&v26[8] = *(_QWORD *)(v25 + 8);
  *(_DWORD *)&v26[16] = *(_DWORD *)(v25 + 16);
  if ( bAdd )
    GameFrameWork::NcPrisonAddGMReq(v27, *(Name5 *)v26, v15, sReason, sRemark);
  else
    GameFrameWork::NcPrisonAlterGMReq(v27, *(Name5 *)v26, v15, sReason, sRemark);
  return 1;
}

//----- (0047E4F0) --------------------------------------------------------
char *__thiscall GameFrameWork::SmartWhisper::GetLast(GameFrameWork::SmartWhisper *this)
{
  char *result; // eax@1

  result = (char *)this->m_kRecentWhisperList._Mysize;
  if ( result )
  {
    this->m_uiCurrentPos = (unsigned int)(result - 1);
    result = this->m_kRecentWhisperList._Myhead->_Prev->_Myval._Bx._Buf;
    if ( this->m_kRecentWhisperList._Myhead->_Prev->_Myval._Myres >= 0x10 )
      result = *(char **)result;
  }
  return result;
}

//----- (0047E510) --------------------------------------------------------
char *__thiscall GameFrameWork::SmartWhisper::GetPrev(GameFrameWork::SmartWhisper *this)
{
  char *result; // eax@2
  unsigned int v2; // eax@3
  unsigned int v3; // edx@5
  std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *i; // eax@5
  int v5; // eax@7

  if ( this->m_kRecentWhisperList._Mysize )
  {
    v2 = this->m_uiCurrentPos;
    if ( v2 )
      this->m_uiCurrentPos = v2 - 1;
    v3 = this->m_uiCurrentPos;
    for ( i = this->m_kRecentWhisperList._Myhead->_Next; v3; i = i->_Next )
      --v3;
    v5 = (int)&i->_Myval;
    if ( *(_DWORD *)(v5 + 20) >= 0x10u )
      v5 = *(_DWORD *)v5;
    result = fs("%s", v5);
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0047E550) --------------------------------------------------------
char *__thiscall GameFrameWork::SmartWhisper::GetNext(GameFrameWork::SmartWhisper *this)
{
  unsigned int v1; // edx@1
  char *result; // eax@2
  unsigned int v3; // eax@3
  unsigned int v4; // edx@5
  std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *i; // eax@5
  int v6; // eax@7

  v1 = this->m_kRecentWhisperList._Mysize;
  if ( v1 )
  {
    v3 = this->m_uiCurrentPos + 1;
    if ( v3 < v1 )
      this->m_uiCurrentPos = v3;
    v4 = this->m_uiCurrentPos;
    for ( i = this->m_kRecentWhisperList._Myhead->_Next; v4; i = i->_Next )
      --v4;
    v6 = (int)&i->_Myval;
    if ( *(_DWORD *)(v6 + 20) >= 0x10u )
      v6 = *(_DWORD *)v6;
    result = fs("%s", v6);
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0047E590) --------------------------------------------------------
void __thiscall GameFrameWork::UpdateSmartReply(GameFrameWork *this)
{
  GameFrameWork *v1; // edi@1
  const char *v2; // esi@2
  unsigned int v3; // eax@4
  char **v4; // eax@5
  const char *v5; // eax@8

  v1 = this;
  if ( (unsigned __int8)ChatDisplayWin2::IsDuringEdit(this->m_pkChatDisplayWin) )
  {
    v2 = ChatDisplayWin2::GetCurrentChatText(v1->m_pkChatDisplayWin);
    if ( !_strcmpi(v2, "/r ") || !strcmp(v2, "/¤¡ ") )
    {
      v3 = v1->m_kSmartWhisper.m_kRecentWhisperList._Mysize;
      if ( v3 )
      {
        v1->m_kSmartWhisper.m_uiCurrentPos = v3 - 1;
        v4 = &v1->m_kSmartWhisper.m_kRecentWhisperList._Myhead->_Prev->_Myval._Bx._Ptr;
        if ( v1->m_kSmartWhisper.m_kRecentWhisperList._Myhead->_Prev->_Myval._Myres >= 0x10 )
          v4 = (char **)*v4;
        if ( v4 )
        {
          v5 = fs("/w %s ", v4);
          ChatDisplayWin2::ChatStart(v1->m_pkChatDisplayWin, v5);
        }
      }
    }
  }
}

//----- (0047E640) --------------------------------------------------------
void __thiscall GameFrameWork::UpdateSmartWhisper(GameFrameWork *this)
{
  GameFrameWork *v1; // ebx@1
  GameFrameWork::SmartWhisper::State v2; // eax@6
  const char *v3; // esi@7
  unsigned int v4; // eax@9
  char **v5; // eax@10
  const char *v6; // eax@13
  struct NiInputKeyboard *v7; // ecx@16
  char v8; // al@16
  char *v9; // ST08_4@18
  char *v10; // ST08_4@21
  const char *v11; // eax@18
  int v12; // eax@26

  v1 = this;
  if ( !(unsigned __int8)ChatDisplayWin2::IsDuringEdit(this->m_pkChatDisplayWin) )
  {
    v1->m_kSmartWhisper.m_eState = 0;
    return;
  }
  if ( v1->m_kSmartWhisper.m_eState == 2 && !strlen(ChatDisplayWin2::GetCurrentChatText(v1->m_pkChatDisplayWin)) )
    v1->m_kSmartWhisper.m_eState = 0;
  v2 = v1->m_kSmartWhisper.m_eState;
  if ( v2 == SWS_NORMAL )
  {
    v3 = ChatDisplayWin2::GetCurrentChatText(v1->m_pkChatDisplayWin);
    if ( !_strcmpi(v3, "/w ") || !strcmp(v3, "/¤¸ ") )
    {
      v4 = v1->m_kSmartWhisper.m_kRecentWhisperList._Mysize;
      if ( v4 )
      {
        v1->m_kSmartWhisper.m_uiCurrentPos = v4 - 1;
        v5 = &v1->m_kSmartWhisper.m_kRecentWhisperList._Myhead->_Prev->_Myval._Bx._Ptr;
        if ( v1->m_kSmartWhisper.m_kRecentWhisperList._Myhead->_Prev->_Myval._Myres >= 0x10 )
          v5 = (char **)*v5;
        if ( v5 )
        {
          v6 = fs("/w %s ", v5);
          ChatDisplayWin2::ChatStart(v1->m_pkChatDisplayWin, v6);
          v1->m_kSmartWhisper.m_eState = 1;
        }
      }
    }
    return;
  }
  if ( v2 != 1 )
    return;
  v7 = g_pkKeyboard;
  v8 = g_pkKeyboard->m_aucKeystate[15];
  if ( v8 & 2 && !(g_pkKeyboard->m_aucKeystateLastUpdate[15] & 2) )
  {
    v9 = GameFrameWork::SmartWhisper::GetPrev(&v1->m_kSmartWhisper);
    v11 = fs("/w %s ", v9);
LABEL_22:
    ChatDisplayWin2::ChatStart(v1->m_pkChatDisplayWin, v11);
    v7 = g_pkKeyboard;
    goto LABEL_23;
  }
  if ( v8 & 0x40 && !(g_pkKeyboard->m_aucKeystateLastUpdate[15] & 0x40) )
  {
    v10 = GameFrameWork::SmartWhisper::GetNext(&v1->m_kSmartWhisper);
    v11 = fs("/w %s ", v10);
    goto LABEL_22;
  }
LABEL_23:
  if ( v7->m_aucKeystate[1] & 0x40 && !(v7->m_aucKeystateLastUpdate[1] & 0x40) )
  {
    ChatDisplayWin2::ChatStart(v1->m_pkChatDisplayWin, "/w ");
    v1->m_kSmartWhisper.m_eState = 2;
    v7 = g_pkKeyboard;
  }
  v12 = 0;
  while ( !v7->m_aucKeystate[v12] )
  {
    if ( (unsigned int)++v12 >= 0x20 )
      return;
  }
  if ( !(v7->m_aucKeystate[15] & 0x42) && !(v7->m_aucKeystate[1] & 0x40) )
    v1->m_kSmartWhisper.m_eState = 2;
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (0047E810) --------------------------------------------------------
char __thiscall GameFrameWork::DecodingAuthorChat(GameFrameWork *this, char *pcText)
{
  char *v2; // esi@1
  GameFrameWork *v3; // ebx@1
  NiUnsharedGeometryGroup *v4; // eax@1
  unsigned int v5; // edi@2
  BYTE v6; // al@4
  char *v7; // esi@4
  char *i; // esi@17
  char v10; // al@22
  BYTE v11; // al@32
  BYTE v12; // al@45
  BYTE v13; // al@55
  BYTE v14; // al@65
  char *j; // esi@78
  NiUnsharedGeometryGroup *v16; // eax@111
  NiUnsharedGeometryGroup *v17; // eax@114
  PgWin *v18; // eax@121
  int v19; // eax@133
  float v20; // esi@136
  int v21; // edi@136
  BYTE v22; // al@136
  int v23; // eax@144
  ScenarioMgr *v24; // eax@150
  Name3 *v25; // eax@159
  unsigned int v26; // edx@159
  unsigned int v27; // ecx@159
  unsigned int v28; // edx@159
  const char *v29; // eax@160
  Name3 *v30; // eax@163
  unsigned int v31; // ecx@163
  unsigned int v32; // edx@163
  unsigned int v33; // eax@163
  char *v34; // eax@190
  const char *v35; // eax@190
  NiNode *v36; // eax@190
  NiNode *v37; // eax@190
  NiNode *v38; // esi@190
  NiPoint3 *v39; // eax@191
  float v40; // ecx@191
  float v41; // edx@191
  float v42; // eax@191
  unsigned int v43; // eax@194
  unsigned int v44; // ecx@194
  const char *v45; // esi@201
  int v46; // esi@201
  unsigned __int16 v47; // ax@201
  const char *v48; // eax@204
  const char *v49; // eax@207
  const char *v50; // eax@210
  char *v51; // [sp-4h] [bp-64h]@159
  char *v52; // [sp+0h] [bp-60h]@159
  signed __int64 v53; // [sp+4h] [bp-5Ch]@80
  int v54; // [sp+Ch] [bp-54h]@80
  float fX; // [sp+10h] [bp-50h]@80
  float fY[2]; // [sp+14h] [bp-4Ch]@80
  NiPoint3 kDir; // [sp+28h] [bp-38h]@159
  NiPoint3 kPos; // [sp+34h] [bp-2Ch]@32
  float fMax; // [sp+40h] [bp-20h]@204
  float fMin; // [sp+44h] [bp-1Ch]@80
  float fVal; // [sp+48h] [bp-18h]@95
  char acMapName[13]; // [sp+4Ch] [bp-14h]@159

  v2 = pcText;
  v3 = this;
  v4 = TextData::Get(0x9798BBB1);
  if ( v4 )
  {
    v5 = strlen((const char *)v4);
    if ( !strncmp(pcText, (const char *)v4, v5) && v3->m_iAdminLevel >= 100 )
    {
      v6 = pcText[v5];
      v7 = &pcText[v5];
      if ( v6 == 32 )
        goto LABEL_214;
      while ( v6 )
      {
        if ( IsDBCSLeadByte(v6) && v7[1] )
          v7 += 2;
        else
          ++v7;
        v6 = *v7;
        if ( *v7 == 32 )
          goto LABEL_13;
      }
      if ( *v7 == 32 )
      {
LABEL_214:
        do
LABEL_13:
          ++v7;
        while ( *v7 == 32 );
      }
      GameFrameWork::NcActNoticeCmd(v3, v7);
      return 1;
    }
  }
  if ( !strncmp(pcText, "note", 4u) && v3->m_iAdminLevel >= 100 )
  {
    for ( i = pcText + 4; *i == 32; ++i )
      ;
    GameFrameWork::NcActNoticeCmd(v3, i);
    return 1;
  }
  if ( !strncmp(pcText, "goto", 4u) && v3->m_iAdminLevel >= 100 )
  {
    v10 = *pcText;
    if ( *pcText == 32 )
      goto LABEL_215;
    while ( v10 )
    {
      if ( IsDBCSLeadByte(v10) && v2[1] )
        v2 += 2;
      else
        ++v2;
      v10 = *v2;
      if ( *v2 == 32 )
        goto LABEL_31;
    }
    if ( *v2 == 32 )
    {
LABEL_215:
      do
LABEL_31:
        ++v2;
      while ( *v2 == 32 );
    }
    kPos.x = atof(v2);
    v11 = *v2;
    if ( *v2 == 32 )
      goto LABEL_216;
    while ( v11 )
    {
      if ( IsDBCSLeadByte(v11) && v2[1] )
        v2 += 2;
      else
        ++v2;
      v11 = *v2;
      if ( *v2 == 32 )
        goto LABEL_41;
    }
    if ( *v2 == 32 )
    {
LABEL_216:
      do
LABEL_41:
        ++v2;
      while ( *v2 == 32 );
    }
    kPos.y = atof(v2);
    World::GetAdvGroundPos(&g_kWorld, kPos.x, kPos.y, &kPos);
    GameFrameWork::OnPickGround(v3, &kPos, 1);
  }
  if ( strncmp(v2, "amblight", 8u) || v3->m_iAdminLevel < 100 )
  {
    if ( !strncmp(v2, "fdel", 4u) && v3->m_iAdminLevel >= 100 )
    {
      for ( j = v2 + 4; *j == 32; ++j )
        ;
      fMin = COERCE_FLOAT((signed __int64 *)((char *)&v53 + 4));
      v53 = 20i64;
      LODWORD(fY[1]) = 0;
      LODWORD(fY[0]) = 0;
      fX = 0.0;
      v54 = 0;
      strncpy((char *)&v53 + 4, j, 0x14u);
      GameFrameWork::NcFriendDelReq(v3, *(Name5 *)((char *)&v53 + 4));
      return 1;
    }
    if ( !strncmp(v2, "action", 6u) && v3->m_iAdminLevel >= 100 )
    {
      GameFrameWork::OpenActionWin(v3);
      return 1;
    }
    if ( !strncmp(v2, "go", 2u) && v3->m_iAdminLevel >= 100 )
    {
      GameFrameWork::OpenGraphicOptionWin(v3);
      return 1;
    }
    if ( !strncmp(v2, "showchr", 7u) && v3->m_iAdminLevel >= 50 )
    {
      g_pkMainChar->m_spScene.m_pObject->m_uFlags &= 0xFFFEu;
      return 1;
    }
    if ( !strncmp(v2, "hidechr", 7u) && v3->m_iAdminLevel >= 50 )
    {
      g_pkMainChar->m_spScene.m_pObject->m_uFlags |= 1u;
      return 1;
    }
    if ( !strncmp(v2, "zoomrate", 8u) && v3->m_iAdminLevel >= 50 )
    {
      LODWORD(fVal) = v2 + 8;
      WhileSpace((char **)&fVal);
      fMin = atof((const char *)LODWORD(fVal));
      World::SetCameraZoomRatePerTick(&g_kWorld, fMin);
      return 1;
    }
    if ( !strncmp(v2, "killme", 6u) && v3->m_iAdminLevel >= 100 )
      terminate();
    if ( !strncmp(v2, "zoommin", 7u) && v3->m_iAdminLevel >= 50 )
    {
      LODWORD(fVal) = v2 + 7;
      WhileSpace((char **)&fVal);
      fMin = atof((const char *)LODWORD(fVal));
      World::SetCameraZoomMin(&g_kWorld, fMin);
      return 1;
    }
    if ( !strncmp(v2, "zoommax", 7u) && v3->m_iAdminLevel >= 50 )
    {
      LODWORD(fVal) = v2 + 7;
      WhileSpace((char **)&fVal);
      fMin = atof((const char *)LODWORD(fVal));
      World::SetCameraZoomMax(&g_kWorld, fMin);
      return 1;
    }
    if ( !strncmp(v2, off_981550, 3u) && v3->m_iAdminLevel >= 50 )
    {
      v3->m_bTextEffMgr = 1;
      return 1;
    }
    if ( !strncmp(v2, "toff", 4u) && v3->m_iAdminLevel >= 50 )
    {
      v3->m_bTextEffMgr = 0;
      return 1;
    }
    LODWORD(fY[1]) = strlen((const char *)TextData::Get(0x34350B0Eu));
    v16 = TextData::Get(0x34350B0Eu);
    if ( !strncmp(v2, (const char *)v16, LODWORD(fY[1])) && v3->m_iAdminLevel >= 100 )
      return GameFrameWork::SetPrisonInfo(v3, v2, 0);
    LODWORD(fY[1]) = strlen((const char *)TextData::Get(0xA18DC7BF));
    v17 = TextData::Get(0xA18DC7BF);
    if ( !strncmp(v2, (const char *)v17, LODWORD(fY[1])) && v3->m_iAdminLevel >= 100 )
      return GameFrameWork::SetPrisonInfo(v3, v2, 1);
    if ( !strncmp(v2, "GM", 2u) && v3->m_iAdminLevel >= 20 )
    {
      if ( v3->m_pkGMCommandWin )
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkGMCommandWin->vfptr);
      v18 = (PgWin *)&v3->m_pkGMPrisonWin->vfptr;
    }
    else
    {
      if ( strncmp(v2, "ShopWin", 7u) || v3->m_iAdminLevel < 100 )
      {
        if ( !strcmp(v2, "SendDT") && v3->m_iAdminLevel >= 100 )
        {
          GameFrameWork::Send_NC_MISC_PINGTEST_CLIENT_ZONE_DB(v3);
          return 1;
        }
        if ( !strncmp(v2, "timetest", 8u) && v3->m_iAdminLevel >= 100 )
        {
          LODWORD(fVal) = v2 + 8;
          WhileSpace((char **)&fVal);
          v19 = atoi((const char *)LODWORD(fVal));
          Server::SetTimeTest(&g_kServer, v19 != 0);
          return 1;
        }
        if ( !strncmp(v2, "time", 4u) && v3->m_iAdminLevel >= 100 )
        {
          LODWORD(fVal) = v2 + 4;
          WhileSpace((char **)&fVal);
          v20 = fVal;
          v21 = atoi((const char *)LODWORD(fVal));
          v22 = *(_BYTE *)LODWORD(v20);
          if ( *(_BYTE *)LODWORD(v20) != 32 )
          {
            do
            {
              if ( !v22 )
                break;
              if ( IsDBCSLeadByte(v22) && *(_BYTE *)(LODWORD(v20) + 1) )
                LODWORD(v20) += 2;
              else
                ++LODWORD(v20);
              v22 = *(_BYTE *)LODWORD(v20);
            }
            while ( *(_BYTE *)LODWORD(v20) != 32 );
            fVal = v20;
          }
          WhileSpace((char **)&fVal);
          v23 = atoi((const char *)LODWORD(fVal));
          Server::SetCurrentTime(&g_kServer, v21, v23);
          return 1;
        }
        if ( !strncmp(v2, "onedaytime", 0xAu) && v3->m_iAdminLevel >= 100 )
        {
          LODWORD(fVal) = v2 + 10;
          WhileSpace((char **)&fVal);
          fMin = atof((const char *)LODWORD(fVal));
          Server::SetOneDayTime(&g_kServer, fMin);
          return 1;
        }
        if ( !strcmp(v2, "run15") && v3->m_iAdminLevel >= 100 )
        {
          v24 = ScenarioMgr::GetScenarioMgr();
          ScenarioMgr::RunScenario(v24, 0xFu, 0, 0);
          return 1;
        }
        if ( !strcmp(v2, "effecton") && v3->m_iAdminLevel >= 50 )
        {
          EffectMgr::s_bEnableEffect = 1;
          return 1;
        }
        if ( !strcmp(v2, "effectoff") && v3->m_iAdminLevel >= 50 )
        {
          EffectMgr::s_bEnableEffect = 0;
          return 1;
        }
        if ( !strncmp(v2, "getdir", 6u) && v3->m_iAdminLevel >= 100 )
        {
          ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[6].~AbStateInfectee)(&kPos);
          v25 = World::GetMapName(&g_kWorld, (Name3 *)&kDir);
          v26 = v25->n3_code[0];
          *(double *)fY = kPos.z;
          *(_DWORD *)acMapName = v26;
          v27 = v25->n3_code[1];
          *(double *)&v54 = kPos.y;
          *(_DWORD *)&acMapName[4] = v27;
          v28 = v25->n3_code[2];
          *(double *)&v53 = kPos.x;
          v52 = acMapName;
          *(_DWORD *)&acMapName[8] = v28;
          v51 = "%s %f  %f %f";
        }
        else
        {
          if ( strncmp(v2, "getpos", 6u) || v3->m_iAdminLevel < 100 )
          {
            if ( !strncmp(v2, "fogon", 5u) && v3->m_iAdminLevel >= 50 )
            {
              World::EnableFog(&g_kWorld, 1);
              return 1;
            }
            if ( !strncmp(v2, "fogoff", 6u) && v3->m_iAdminLevel >= 50 )
            {
              World::EnableFog(&g_kWorld, 0);
              return 1;
            }
            if ( !strncmp(v2, "dlighton", 8u) && v3->m_iAdminLevel >= 50 )
            {
              *(_BYTE *)(unk_B25034 + 176) = 1;
              return 1;
            }
            if ( !strncmp(v2, "dlightoff", 9u) && v3->m_iAdminLevel >= 50 )
            {
              *(_BYTE *)(unk_B25034 + 176) = 0;
              return 1;
            }
            if ( !strncmp(v2, "BeautyShop", 0xAu) && v3->m_iAdminLevel >= 100 )
            {
              GameFrameWork::OnGoBeautyShop(v3);
              return 1;
            }
            if ( !strncmp(v2, "showHP", 6u) && v3->m_iAdminLevel >= 50 )
            {
              v3->m_pkTargetWin->m_bShowMobHP = 1;
              return 1;
            }
            if ( !strncmp(v2, "hideHP", 6u) && v3->m_iAdminLevel >= 50 )
            {
              v3->m_pkTargetWin->m_bShowMobHP = 0;
              return 1;
            }
            if ( !strncmp(v2, "OpenKQ", 6u) && v3->m_iAdminLevel >= 100 )
            {
              v18 = (PgWin *)&v3->m_pkKingDomQuest->vfptr;
              goto LABEL_123;
            }
            if ( !strncmp(v2, "Decal", 5u) && v3->m_iAdminLevel >= 100 )
            {
              v34 = Folder::Effect();
              v35 = Folder::Merge(v34, "MineArea100.nif");
              v36 = (NiNode *)Ns_LoadNifFile(v35, 0);
              v37 = DecalMgr::AddDecal(&stru_B26354, v36);
              v38 = v37;
              if ( v37 )
              {
                CharDecal::SetRadius((CharDecal *)v37, 300.0);
                fMin = -(Timer::ms_fCurTime + 1.0);
                CharDecal::SetLifeTime((CharDecal *)v38, fMin);
                v39 = Char::GetHeightPos(g_pkMainChar, (int)v3, &kDir);
                v40 = v39->x;
                v41 = v39->y;
                v42 = v39->z;
                *(float *)&v38->m_kPropertyList.vfptr = v40;
                *(float *)&v38->m_kPropertyList.m_pkHead = v41;
                *(float *)&v38->m_kPropertyList.m_pkTail = v42;
              }
            }
            else if ( !strncmp(v2, "rideon", 6u) && v3->m_iAdminLevel >= 100 )
            {
              LODWORD(fVal) = v2 + 6;
              WhileSpace((char **)&fVal);
              v43 = atoi((const char *)LODWORD(fVal));
              v44 = g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1];
              if ( v44 )
                GameFrameWork::NcMoverRideOnReq(v3, *(_WORD *)(v44 + 2900), v43);
            }
            else if ( !strncmp(v2, "rideoff", 7u) && v3->m_iAdminLevel >= 100 )
            {
              GameFrameWork::NcMoverRideOffReq(v3);
            }
            else if ( !strncmp(v2, "sound", 5u) && v3->m_iAdminLevel >= 100 )
            {
              LODWORD(fVal) = v2 + 5;
              WhileSpace((char **)&fVal);
              ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[6].SetAbStateProperty)(&kPos);
              v45 = (const char *)LODWORD(fVal);
              SoundMgr::CreateSound(&g_kSoundMgr, (char *)LODWORD(fVal), &kPos);
              ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[6].SetAbStateProperty)(&kPos);
              ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[6].~AbStateInfectee)(&kDir);
              v46 = (unsigned __int16)atoi(v45);
              v47 = rand();
              CharMgr::AddMob(&g_kCharMgr, v46, v47, &kPos, &kDir, 0, 0);
            }
            else if ( !strncmp(v2, "sndmin", 6u) && v3->m_iAdminLevel >= 100 )
            {
              LODWORD(fVal) = v2 + 6;
              WhileSpace((char **)&fVal);
              fVal = atof((const char *)LODWORD(fVal));
              SoundGroup::SetMinDistance((SoundGroup *)&g_kSoundMgr.m_pkEffectGroup->vfptr, fVal);
              fMax = 0.0;
              fMin = 0.0;
              SoundGroup::GetSoundMinMax((SoundGroup *)&g_kSoundMgr.m_pkEffectGroup->vfptr, &fMin, &fMax);
              v48 = fs("min[ %f ], max [ %f ]", fMin, fMax);
              GameFrameWork::AddSysMsg(v3, v48);
            }
            else if ( !strncmp(v2, "sndmax", 6u) && v3->m_iAdminLevel >= 100 )
            {
              LODWORD(fVal) = v2 + 6;
              WhileSpace((char **)&fVal);
              fVal = atof((const char *)LODWORD(fVal));
              SoundGroup::SetMaxDistance((SoundGroup *)&g_kSoundMgr.m_pkEffectGroup->vfptr, fVal);
              fMin = 0.0;
              fMax = 0.0;
              SoundGroup::GetSoundMinMax((SoundGroup *)&g_kSoundMgr.m_pkEffectGroup->vfptr, &fMax, &fMin);
              v49 = fs("min[ %f ], max [ %f ]", fMax, fMin);
              GameFrameWork::AddSysMsg(v3, v49);
            }
            else
            {
              if ( strncmp(v2, "sndinfo", 0xAu) || v3->m_iAdminLevel < 100 )
                return 0;
              fMin = 0.0;
              fMax = 0.0;
              SoundGroup::GetSoundMinMax((SoundGroup *)&g_kSoundMgr.m_pkEffectGroup->vfptr, &fMax, &fMin);
              v50 = fs("min[ %f ], max [ %f ]", fMax, fMin);
              GameFrameWork::AddSysMsg(v3, v50);
            }
            return 1;
          }
          ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[6].SetAbStateProperty)(&kPos);
          v30 = World::GetMapName(&g_kWorld, (Name3 *)&kDir);
          v31 = v30->n3_code[0];
          *(double *)fY = kPos.z;
          *(_DWORD *)acMapName = v31;
          v32 = v30->n3_code[1];
          *(double *)&v54 = kPos.y;
          *(_DWORD *)&acMapName[4] = v32;
          v33 = v30->n3_code[2];
          *(double *)&v53 = kPos.x;
          v52 = acMapName;
          *(_DWORD *)&acMapName[8] = v33;
          v51 = "%s %f  %f %f";
        }
        acMapName[12] = 0;
        v29 = fs(v51, v52, v53, v54, fX, fY[0], fY[1]);
        GameFrameWork::AddSysMsg(v3, v29);
        return 1;
      }
      v18 = (PgWin *)&v3->m_pkShopWin->vfptr;
    }
    if ( v18 )
    {
LABEL_123:
      PgWinMgr::ShowWin(&Pgg_kWinMgr, v18);
      return 1;
    }
    return 1;
  }
  kPos.x = 0.0;
  kPos.y = 0.0;
  kPos.z = 0.0;
  v12 = *v2;
  if ( *v2 == 32 )
    goto LABEL_217;
  while ( v12 )
  {
    if ( IsDBCSLeadByte(v12) && v2[1] )
      v2 += 2;
    else
      ++v2;
    v12 = *v2;
    if ( *v2 == 32 )
      goto LABEL_54;
  }
  if ( *v2 == 32 )
  {
LABEL_217:
    do
LABEL_54:
      ++v2;
    while ( *v2 == 32 );
  }
  kPos.x = atof(v2);
  v13 = *v2;
  if ( *v2 == 32 )
    goto LABEL_218;
  while ( v13 )
  {
    if ( IsDBCSLeadByte(v13) && v2[1] )
      v2 += 2;
    else
      ++v2;
    v13 = *v2;
    if ( *v2 == 32 )
      goto LABEL_64;
  }
  if ( *v2 == 32 )
  {
LABEL_218:
    do
LABEL_64:
      ++v2;
    while ( *v2 == 32 );
  }
  kPos.y = atof(v2);
  v14 = *v2;
  if ( *v2 == 32 )
    goto LABEL_219;
  while ( v14 )
  {
    if ( IsDBCSLeadByte(v14) && v2[1] )
      v2 += 2;
    else
      ++v2;
    v14 = *v2;
    if ( *v2 == 32 )
      goto LABEL_74;
  }
  if ( *v2 == 32 )
  {
LABEL_219:
    do
LABEL_74:
      ++v2;
    while ( *v2 == 32 );
  }
  kPos.z = atof(v2);
  World::SetAmbientLightAmbientColor(&g_kWorld, (NiColor *)&kPos);
  return 1;
}
// A75AFB: using guessed type bool EffectMgr::s_bEnableEffect;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0047F780) --------------------------------------------------------
void __thiscall ChatCommandList::ChatCommandList(ChatCommandList *this)
{
  this->m_VectorChatCommand._Myfirst = 0;
  this->m_VectorChatCommand._Mylast = 0;
  this->m_VectorChatCommand._Myend = 0;
  this->m_nCurChatComNum = 0;
  this->m_bIsSaveCommand = 1;
}

//----- (0047F7A0) --------------------------------------------------------
void __thiscall ChatCommandList::~ChatCommandList(ChatCommandList *this)
{
  ChatCommandList *v1; // esi@1

  v1 = this;
  if ( this->m_VectorChatCommand._Myfirst )
  {
    std::_Destroy_range<std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>(
      this->m_VectorChatCommand._Myfirst,
      this->m_VectorChatCommand._Mylast);
    operator delete(v1->m_VectorChatCommand._Myfirst);
  }
  v1->m_VectorChatCommand._Myfirst = 0;
  v1->m_VectorChatCommand._Mylast = 0;
  v1->m_VectorChatCommand._Myend = 0;
}

//----- (0047F7F0) --------------------------------------------------------
void __thiscall ChatCommandList::Clear(ChatCommandList *this)
{
  ChatCommandList *v1; // esi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v2; // eax@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // ecx@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v4; // edi@2

  v1 = this;
  v2 = this->m_VectorChatCommand._Mylast;
  v3 = this->m_VectorChatCommand._Myfirst;
  if ( v3 != v2 )
  {
    v4 = std::_Move<std::basic_string<char,std::char_traits<char>,std::allocator<char>> *,std::basic_string<char,std::char_traits<char>,std::allocator<char>> *>(
           v2,
           v2,
           v3);
    std::_Destroy_range<std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>(
      v4,
      v1->m_VectorChatCommand._Mylast);
    v1->m_VectorChatCommand._Mylast = v4;
  }
}

//----- (0047F830) --------------------------------------------------------
void __thiscall ChatCommandList::AddText(ChatCommandList *this, const char *pText)
{
  ChatCommandList *v2; // ebx@1
  signed int v3; // eax@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+10h] [bp-2Ch]@5
  int v5; // [sp+38h] [bp-4h]@5

  v2 = this;
  if ( this->m_bIsSaveCommand )
  {
    v3 = this->m_VectorChatCommand._Mylast - this->m_VectorChatCommand._Myfirst;
    if ( !v3
      || std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
           &this->m_VectorChatCommand._Myfirst[v3 - 1],
           0,
           *(&this->m_VectorChatCommand._Myfirst[v3]._Mysize - 7),
           pText,
           strlen(pText)) )
    {
      _Val._Myres = 15;
      _Val._Mysize = 0;
      _Val._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, pText, strlen(pText));
      v5 = 0;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        &v2->m_VectorChatCommand,
        &_Val);
      if ( _Val._Myres >= 0x10 )
        operator delete(_Val._Bx._Ptr);
    }
  }
  else
  {
    this->m_bIsSaveCommand = 1;
  }
}

//----- (0047F930) --------------------------------------------------------
void __thiscall GameFrameWork::SmartWhisper::MarkAsRecentlyUsed(GameFrameWork::SmartWhisper *this, char *pcWhisperID)
{
  std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *v2; // eax@1
  std::_List_const_iterator<std::_List_val<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > > *v3; // ebx@1
  char *v4; // esi@1
  std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *v5; // edi@1
  unsigned int v6; // esi@2
  const char *v7; // eax@2
  unsigned int v8; // edx@4
  const char *v9; // ecx@6
  int v10; // eax@8
  bool v11; // zf@8
  signed int v12; // eax@10
  std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *v13; // esi@17
  std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *v14; // ST0C_4@17
  std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *v15; // ST08_4@17
  std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *v16; // eax@17
  unsigned int v17; // ecx@17
  void **v18; // eax@19
  std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *v19; // esi@25
  GameFrameWork::SmartWhisper *v20; // [sp+10h] [bp-54h]@1
  bool v21; // [sp+1Bh] [bp-49h]@13
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+1Ch] [bp-48h]@17
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v23; // [sp+38h] [bp-2Ch]@2
  int v24; // [sp+60h] [bp-4h]@13

  v2 = this->m_kRecentWhisperList._Myhead;
  v3 = (std::_List_const_iterator<std::_List_val<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > > *)v2->_Next;
  v4 = pcWhisperID;
  v5 = &this->m_kRecentWhisperList;
  v20 = this;
  if ( v2->_Next == v2 )
  {
LABEL_17:
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, v4, strlen(v4));
    v13 = v5->_Myhead;
    v14 = v5->_Myhead->_Prev;
    v15 = v5->_Myhead;
    v24 = 1;
    v16 = std::_List_val<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::_Buynode<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>(
            v15,
            v14,
            &_Val);
    v17 = v5->_Mysize;
    if ( 153391688 - v17 < 1 )
      std::_Xlength_error("list<T> too long");
    v5->_Mysize = v17 + 1;
    v13->_Prev = v16;
    v16->_Prev->_Next = v16;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    while ( v20->m_kRecentWhisperList._Mysize >= 0x64 )
    {
      v19 = v5->_Myhead->_Next;
      if ( v19 != v5->_Myhead )
      {
        v19->_Prev->_Next = v19->_Next;
        v19->_Next->_Prev = v19->_Prev;
        if ( v19->_Myval._Myres >= 0x10 )
          operator delete(v19->_Myval._Bx._Ptr);
        v19->_Myval._Myres = 15;
        v19->_Myval._Mysize = 0;
        v19->_Myval._Bx._Buf[0] = 0;
        operator delete(v19);
        --v5->_Mysize;
      }
    }
  }
  else
  {
    while ( 1 )
    {
      v23._Myres = 15;
      v23._Mysize = 0;
      v23._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v23, v4, strlen(v4));
      v6 = (unsigned int)v3[6]._Ptr;
      v7 = (const char *)&v3[2];
      if ( v3[7]._Ptr >= (std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *)0x10 )
        v7 = *(const char **)v7;
      v8 = v23._Mysize;
      if ( v23._Mysize >= v6 )
        v8 = (unsigned int)v3[6]._Ptr;
      v9 = v23._Bx._Ptr;
      if ( v23._Myres < 0x10 )
        v9 = (const char *)&v23;
      v10 = std::char_traits<char>::compare(v9, v7, v8);
      v11 = v10 == 0;
      if ( !v10 )
      {
        if ( v23._Mysize >= v6 )
          v12 = v23._Mysize != v6;
        else
          v12 = -1;
        v11 = v12 == 0;
      }
      v21 = v11;
      v24 = -1;
      if ( v23._Myres >= 0x10 )
        operator delete(v23._Bx._Ptr);
      if ( v21 )
        break;
      v3 = (std::_List_const_iterator<std::_List_val<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > > *)v3->_Ptr;
      v4 = pcWhisperID;
      if ( v3 == (std::_List_const_iterator<std::_List_val<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > > *)v5->_Myhead )
        goto LABEL_17;
    }
    v18 = (void **)&v5->_Myhead->_Next;
    if ( (std::_List_const_iterator<std::_List_val<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > > *)v5->_Myhead != v3
      && v18 != (void **)v3->_Ptr )
    {
      std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::_Splice_same(
        v5,
        (std::_List_const_iterator<std::_List_val<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > >)v18,
        v5,
        (std::_List_const_iterator<std::_List_val<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > >)v3,
        (std::_List_const_iterator<std::_List_val<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > >)v3->_Ptr,
        1u);
    }
  }
}

//----- (0047FB40) --------------------------------------------------------
bool __thiscall GameFrameWork::DecodingCmdChat(GameFrameWork *this, char *pcText)
{
  char *v2; // esi@1
  NiUnsharedGeometryGroup *v3; // eax@1
  int v4; // edi@2
  BYTE v5; // al@3
  char *v6; // esi@3
  NiUnsharedGeometryGroup *v7; // eax@17
  bool result; // al@18
  BYTE v9; // al@23
  char *v10; // eax@74
  const char *v11; // eax@74
  const char *v12; // esi@74
  SysMsgDisplayWin *v13; // ecx@76
  char *v14; // esi@80
  BYTE i; // al@80
  char *v16; // esi@91
  BYTE v17; // al@91
  int v18; // eax@100
  int v19; // edx@100
  float v20; // eax@100
  char *v21; // esi@103
  BYTE v22; // al@103
  char *v23; // esi@113
  BYTE v24; // al@113
  char *v25; // edi@146
  int v26; // esi@146
  char *v27; // edi@148
  bool v28; // zf@148
  GameFrameWork *v29; // esi@150
  NiUnsharedGeometryGroup *v30; // eax@151
  unsigned int v31; // kr00_4@154
  GameFrameWork *v32; // esi@157
  NiUnsharedGeometryGroup *v33; // eax@158
  BYTE v34; // al@160
  char *v35; // esi@160
  Char *v36; // eax@181
  const char *v37; // eax@186
  GameFrameWork *v38; // esi@190
  BYTE v39; // al@201
  char *v40; // esi@201
  char *v41; // esi@210
  GameFrameWork *v42; // edi@215
  char *v43; // eax@216
  GameFrameWork *v44; // edi@218
  BYTE v45; // al@219
  Name5 *v46; // eax@227
  KingdomQuestWin *v47; // ecx@227
  unsigned int v48; // eax@227
  char *v49; // esi@228
  char *v50; // eax@231
  BYTE v51; // al@235
  char *v52; // esi@235
  Name5 *v53; // eax@243
  KingdomQuestWin *v54; // ecx@243
  unsigned int v55; // eax@243
  __int64 v56; // [sp-10h] [bp-188h]@19
  __int64 v57; // [sp-8h] [bp-180h]@19
  float _fTime; // [sp+0h] [bp-178h]@16
  int iCount; // [sp+14h] [bp-164h]@2
  GameFrameWork *v60; // [sp+18h] [bp-160h]@1
  char *str; // [sp+1Ch] [bp-15Ch]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strChat; // [sp+20h] [bp-158h]@186
  Name5 kCharID; // [sp+3Ch] [bp-13Ch]@19
  char acName[256]; // [sp+50h] [bp-128h]@146
  char acMainCharID[21]; // [sp+150h] [bp-28h]@154
  int v66; // [sp+174h] [bp-4h]@186

  v2 = pcText;
  v60 = this;
  str = pcText;
  v3 = TextData::Get(0x43706657u);
  if ( v3 )
  {
    v4 = strlen((const char *)v3);
    iCount = v4;
    if ( !strncmp(pcText, (const char *)v3, v4) )
    {
      v5 = pcText[v4];
      v6 = &pcText[v4];
      if ( v5 == 32 )
        goto LABEL_251;
      while ( v5 )
      {
        if ( IsDBCSLeadByte(v5) && v6[1] )
          v6 += 2;
        else
          ++v6;
        v5 = *v6;
        if ( *v6 == 32 )
          goto LABEL_12;
      }
      if ( *v6 == 32 )
      {
LABEL_251:
        do
LABEL_12:
          ++v6;
        while ( *v6 == 32 );
      }
      if ( !g_kRaidinfo.m_bIsMeRaidSubLeader && !g_kRaidinfo.m_bIsMeRaidLeader )
      {
        if ( RaidInfo::IsMeRaidMember(&g_kRaidinfo) )
        {
          _fTime = 1.9983894e-36;
LABEL_17:
          v7 = TextData2::Get(LODWORD(_fTime));
          GameFrameWork::AddSysMsg(v60, (const char *)v7);
          return 1;
        }
        goto LABEL_33;
      }
      *(_QWORD *)&kCharID.n5_code[3] = 0i64;
      *(_QWORD *)&kCharID.n5_code[1] = 0i64;
      *(_QWORD *)&kCharID.n5_name[0] = 0i64;
      strncpy(kCharID.n5_name, v6, 0x14u);
      v56 = *(_QWORD *)&kCharID.n5_name[0];
      v57 = *(_QWORD *)&kCharID.n5_code[2];
      _fTime = *(float *)&kCharID.n5_code[4];
      GameFrameWork::NcRaidInvitationReq(v60, *(Name5 *)&v56);
      return 1;
    }
  }
  else
  {
    v4 = iCount;
  }
  if ( !strncmp(pcText, "contract", 8u) )
  {
    v9 = pcText[v4];
    v6 = &pcText[v4];
    if ( v9 == 32 )
      goto LABEL_252;
    while ( v9 )
    {
      if ( IsDBCSLeadByte(v9) && v6[1] )
        v6 += 2;
      else
        ++v6;
      v9 = *v6;
      if ( *v6 == 32 )
        goto LABEL_32;
    }
    if ( *v6 == 32 )
    {
LABEL_252:
      do
LABEL_32:
        ++v6;
      while ( *v6 == 32 );
    }
LABEL_33:
    GameFrameWork::NcPartyJoinReq(v60, v6);
    return 1;
  }
  if ( !strncmp(pcText, "server", 6u) )
  {
    if ( !strcmp("GFT-GRM0", g_kServer.kServerName) )
    {
      _fTime = 3.1765652e-20;
    }
    else if ( !strcmp("GFT-GRM1", g_kServer.kServerName) )
    {
      _fTime = 1.2706261e-19;
    }
    else if ( !strcmp("GFT-ENG0", g_kServer.kServerName) )
    {
      _fTime = 5.0825043e-19;
    }
    else if ( !strcmp("GFT-GRM2", g_kServer.kServerName) )
    {
      _fTime = 2.0330017e-18;
    }
    else if ( !strcmp("GFT-GRM3", g_kServer.kServerName) )
    {
      _fTime = 8.1320068e-18;
    }
    else if ( !strcmp("GFT-GRM4", g_kServer.kServerName) )
    {
      _fTime = 3.2528027e-17;
    }
    else if ( !strcmp("GFT-FRA0", g_kServer.kServerName) )
    {
      _fTime = 1.3011211e-16;
    }
    else if ( !strcmp("GFT-GRM5", g_kServer.kServerName) )
    {
      _fTime = 5.2044844e-16;
    }
    else if ( !strcmp("GFT-SPA0", g_kServer.kServerName) )
    {
      _fTime = 2.0817937e-15;
    }
    else if ( !strcmp("GFT-FRA1", g_kServer.kServerName) )
    {
      _fTime = 8.327175e-15;
    }
    else if ( !strcmp("GFT-GRM6", g_kServer.kServerName) )
    {
      _fTime = 3.197741e-20;
    }
    else if ( !strcmp("GFT-ITA0", g_kServer.kServerName) )
    {
      _fTime = 1.2790964e-19;
    }
    else if ( !strcmp("GFT-ENG1", g_kServer.kServerName) )
    {
      _fTime = 5.1163856e-19;
    }
    else if ( !strcmp("GFT-GRM7", g_kServer.kServerName) )
    {
      _fTime = 2.0465542e-18;
    }
    else if ( !strcmp("GFT-FRA2", g_kServer.kServerName) )
    {
      _fTime = 8.1862169e-18;
    }
    else if ( !strcmp("ENID", g_kServer.kServerName) )
    {
      _fTime = 2.0330017e-18;
    }
    else if ( !strcmp("PAGEL", g_kServer.kServerName) )
    {
      _fTime = 1.2706261e-19;
    }
    else if ( !strcmp("ISYA", g_kServer.kServerName) )
    {
      _fTime = 3.1765652e-20;
    }
    else if ( !strcmp("JENIRA", g_kServer.kServerName) )
    {
      _fTime = 5.0825043e-19;
    }
    else
    {
      _fTime = -8.384477e-34;
    }
    _fTime = COERCE_FLOAT(TextData::Get(LODWORD(_fTime)));
    v10 = (char *)TextData::Get(0x472BFFA5u);
    v11 = fs(v10, _fTime);
    v12 = v11;
    if ( v60->m_pkChatDisplayWin )
      ChatDisplayWin2::AddSystemChat(v11);
    v13 = v60->m_pkSysMsgDisplayWin;
    if ( v13 )
      ChatDisplayWin::AddSystemChat((ChatDisplayWin *)&v13->vfptr, v12);
    return 1;
  }
  if ( IsChatCommand(0xE7271D0A, pcText, &iCount) )
  {
    v14 = &pcText[iCount];
    for ( i = pcText[iCount]; *v14 != 32; i = *v14 )
    {
      if ( !i )
        break;
      if ( IsDBCSLeadByte(i) && v14[1] )
        v14 += 2;
      else
        ++v14;
    }
    if ( RaidInfo::IsMeRaidMember(&g_kRaidinfo) )
    {
      GameFrameWork::NcRaidLeaveReq(v60);
      result = 1;
    }
    else
    {
      GameFrameWork::NcPartyLeaveReq(v60);
      result = 1;
    }
    return result;
  }
  if ( IsChatCommand(0x31301252u, pcText, &iCount) )
  {
    v16 = &pcText[iCount];
    v17 = pcText[iCount];
    str = &pcText[iCount];
    if ( v17 != 32 )
    {
      do
      {
        if ( !v17 )
          break;
        if ( IsDBCSLeadByte(v17) && v16[1] )
          v16 += 2;
        else
          ++v16;
        v17 = *v16;
      }
      while ( *v16 != 32 );
      str = v16;
    }
    WhileSpace(&str);
    if ( g_kRaidinfo.m_bIsMeRaidLeader )
    {
      Name5::Name5(&kCharID, str);
      v56 = *(_QWORD *)v18;
      LODWORD(v57) = *(_DWORD *)(v18 + 8);
      v19 = *(_DWORD *)(v18 + 12);
      v20 = *(float *)(v18 + 16);
      HIDWORD(v57) = v19;
      _fTime = v20;
      GameFrameWork::NcRaidVanishReq(v60, *(Name5 *)&v56);
      result = 1;
    }
    else
    {
      GameFrameWork::NcPartyKickOffReq(v60, str);
      result = 1;
    }
    return result;
  }
  if ( IsChatCommand(0x8373A89C, pcText, &iCount) )
  {
    v21 = &pcText[iCount];
    v22 = pcText[iCount];
    str = &pcText[iCount];
    if ( v22 != 32 )
    {
      do
      {
        if ( !v22 )
          break;
        if ( IsDBCSLeadByte(v22) && v21[1] )
          v21 += 2;
        else
          ++v21;
        v22 = *v21;
      }
      while ( *v21 != 32 );
      str = v21;
    }
    WhileSpace(&str);
    GameFrameWork::NcPartyChangeMasterReq(v60, str);
    return 1;
  }
  if ( IsChatCommand(0xFAF72626, pcText, &iCount) )
  {
    v23 = &pcText[iCount];
    v24 = pcText[iCount];
    str = &pcText[iCount];
    if ( v24 != 32 )
    {
      do
      {
        if ( !v24 )
          break;
        if ( IsDBCSLeadByte(v24) && v23[1] )
          v23 += 2;
        else
          ++v23;
        v24 = *v23;
      }
      while ( *v23 != 32 );
      str = v23;
    }
    WhileSpace(&str);
    GameFrameWork::NcRaidWarningReq(v60, str);
    return 1;
  }
  if ( IsChatCommand(0xD724FF12, pcText, &iCount) )
  {
    if ( RaidInfo::IsMeRaidMember(&g_kRaidinfo) && !g_kRaidinfo.m_bIsMeRaidLeader )
    {
      _fTime = 0.0000000028531379;
      goto LABEL_17;
    }
    if ( !g_kParty.m_uiTotalMember )
      return 1;
    GameFrameWork::NcRaidMakeReq(v60);
    return 1;
  }
  if ( !IsPartyChat(pcText, &iCount) )
  {
    if ( IsGuildChat(pcText, &iCount) )
    {
      str = &pcText[iCount];
      if ( !pcText[iCount] )
        return 1;
      WhileSpace(&str);
      if ( !*str )
        return 1;
      GameFrameWork::NcGuildChatReq(v60, str);
      return 1;
    }
    if ( IsGuildAcademyChat(pcText, &iCount) )
    {
      str = &pcText[iCount];
      if ( !pcText[iCount] )
        return 1;
      WhileSpace(&str);
      if ( !*str )
        return 1;
      GameFrameWork::NcGuildAcademyChatReq(v60, str);
      return 1;
    }
    if ( IsRaidChat(pcText, &iCount) )
    {
      str = &pcText[iCount];
      if ( !pcText[iCount] )
        return 1;
      WhileSpace(&str);
      if ( !*str )
        return 1;
      GameFrameWork::NcRaidChatReq(v60, str);
      return 1;
    }
    if ( IsShisperChat(pcText, &iCount) )
    {
      str = &pcText[iCount];
      if ( !pcText[iCount] )
        return 1;
      WhileSpace(&str);
      v25 = str;
      iCount = 0;
      StrCopyToSpace(acName, str, &iCount);
      v26 = iCount;
      if ( iCount && (unsigned int)iCount <= 0x14 )
      {
        _fTime = COERCE_FLOAT(acName);
        acName[iCount] = 0;
        Name5::Name5(&kCharID, (const char *)LODWORD(_fTime));
        v27 = &v25[v26];
        v28 = *v27 == 0;
        str = v27;
        if ( v28 )
          return 1;
        WhileSpace(&str);
        if ( !*str )
          return 1;
        v29 = v60;
        GameFrameWork::NcActWhisperReq(v60, kCharID, str);
        GameFrameWork::SmartWhisper::MarkAsRecentlyUsed(&v29->m_kSmartWhisper, acName);
        result = 1;
      }
      else
      {
        v30 = TextData::Get(0xBAD72752);
        GameFrameWork::AddSysMsg(v60, (const char *)v30);
        result = 1;
      }
      return result;
    }
    if ( isreplyWhisperChat(pcText, &iCount) )
    {
      str = &pcText[iCount];
      if ( !pcText[iCount] )
        return 1;
      WhileSpace(&str);
      Name5::n_string(&GameFrameWork::m_kWhisperCharID, acMainCharID);
      acMainCharID[20] = 0;
      v31 = strlen(acMainCharID);
      if ( v31 && v31 <= 0x14 )
      {
        Name5::Name5(&kCharID, acMainCharID);
        if ( !*str )
          return 1;
        v32 = v60;
        GameFrameWork::NcActWhisperReq(v60, kCharID, str);
        GameFrameWork::SmartWhisper::MarkAsRecentlyUsed(&v32->m_kSmartWhisper, acMainCharID);
        result = 1;
      }
      else
      {
        v33 = TextData::Get(0x48706B65u);
        GameFrameWork::AddSysMsg(v60, (const char *)v33);
        result = 1;
      }
      return result;
    }
    if ( !strncmp(pcText, "friendship", 0xAu) )
    {
      v34 = pcText[10];
      v35 = pcText + 10;
      str = pcText + 10;
      if ( !v34 )
        return 1;
      if ( v34 != 32 )
      {
        do
        {
          if ( !v34 )
            break;
          if ( IsDBCSLeadByte(v34) && v35[1] )
            v35 += 2;
          else
            ++v35;
          v34 = *v35;
        }
        while ( *v35 != 32 );
        str = v35;
      }
      WhileSpace(&str);
      if ( !*str )
        return 1;
      iCount = (int)&v56;
      Name5::Name5((Name5 *)&v56, str);
      GameFrameWork::NcFriendSetReq(v60, *(Name5 *)&v56);
      return 1;
    }
    if ( IsShoutChat(pcText, &iCount) )
    {
      str = &pcText[iCount];
      if ( !pcText[iCount] )
        return 1;
      WhileSpace(&str);
      if ( !*str )
        return 1;
      GameFrameWork::NcActShoutCmd(v60, str);
      return 1;
    }
    if ( !strncmp(pcText, "attack", 6u) )
    {
      GameFrameWork::OnDoublePickChar(
        v60,
        (Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1]);
      return 1;
    }
    if ( !strncmp(pcText, "looting", 7u) )
    {
      GameFrameWork::GetDropItemByArea(v60, 0);
      return 1;
    }
    if ( strncmp(pcText, "pm", 2u) )
    {
      if ( !strncmp(pcText, "trade", 5u) )
      {
        v36 = CharMgr::GetChar(&g_kCharMgr, pcText + 6);
        if ( !v36 || !v36->m_bUserCharacter )
          return 1;
        GameFrameWork::OnPopupProposeTrade(v60, v36);
        return 1;
      }
      if ( !strncmp(pcText, "whisper", 7u) )
      {
        if ( pcText[7] != 32 )
          return 1;
        strChat._Myres = 15;
        strChat._Mysize = 0;
        strChat._Bx._Buf[0] = 0;
        v66 = 0;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strChat, "/w ", 3u);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strChat, pcText + 8);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strChat, " ", 1u);
        v37 = strChat._Bx._Ptr;
        if ( strChat._Myres < 0x10 )
          v37 = (const char *)&strChat;
        GameFrameWork::OnOpenChatEditWin(v60, v37);
        std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&strChat);
        return 1;
      }
      if ( !strncmp(pcText, "stick", 5u) )
      {
        v38 = v60;
        CNSTimer_Interval::ReSet(&v60->m_kStickTimer, Timer::ms_fCurTime);
        v38->m_kStickTimer.m_fCheckTime = 1.0;
        GameFrameWork::Stick(
          v38,
          (Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1],
          1);
        return 1;
      }
      if ( !strncmp(pcText, "assist", 6u) )
      {
        GameFrameWork::CurTargetAssist(v60);
        return 1;
      }
      if ( !strncmp(pcText, "autorun", 7u) )
      {
        GameFrameWork::AutoRun(v60);
        return 1;
      }
      if ( IsNormalChat(pcText, &iCount) )
        return 1;
      if ( !strncmp(pcText, "HPSton", 6u) )
      {
        GameFrameWork::OnHPSoulStoneUse_Key(v60);
        return 1;
      }
      if ( !strncmp(pcText, "SPSton", 6u) )
      {
        GameFrameWork::OnSPSoulStoneUse_Key(v60);
        return 1;
      }
      if ( !strncmp(pcText, "Ignore", 6u) )
      {
        v39 = pcText[6];
        v40 = pcText + 6;
        str = pcText + 6;
        if ( !v39 )
          return 1;
        if ( v39 != 32 )
        {
          do
          {
            if ( !v39 )
              break;
            if ( IsDBCSLeadByte(v39) && v40[1] )
              v40 += 2;
            else
              ++v40;
            v39 = *v40;
          }
          while ( *v40 != 32 );
          str = v40;
        }
        WhileSpace(&str);
        v41 = str;
        if ( !*str
          || IsSpecialCharInStr_1(str)
          || IsSpecialCharInStr2_1(v41)
          || TextFilterTable::IsBadName(v41)
          || IsPeculiarStr_1(v41) )
        {
          return 1;
        }
        Name5::Name5(&kCharID, v41);
        v42 = v60;
        v56 = *(_QWORD *)&kCharID.n5_name[0];
        v57 = *(_QWORD *)&kCharID.n5_code[2];
        _fTime = *(float *)&kCharID.n5_code[4];
        if ( ChatBlockListWin::IsRestrictID(v60->m_pkChatBlockListWin, *(Name5 *)&v56) )
          return 1;
        v56 = *(_QWORD *)&kCharID.n5_name[0];
        v57 = *(_QWORD *)&kCharID.n5_code[2];
        _fTime = *(float *)&kCharID.n5_code[4];
        GameFrameWork::NcChatRestrictAddReq(v42, *(Name5 *)&v56);
        v43 = (char *)TextData::Get(0x3E738588u);
        GameFrameWork::VaAddSysMsg(v42, v43, v41);
        return 1;
      }
      if ( IsVote(pcText, &iCount) )
      {
        v44 = v60;
        if ( v60->m_eFieldMapType != 1 )
          return 1;
        v45 = *pcText;
        if ( *pcText != 32 )
        {
          do
          {
            if ( !v45 )
              break;
            if ( IsDBCSLeadByte(v45) && v2[1] )
              v2 += 2;
            else
              ++v2;
            v45 = *v2;
          }
          while ( *v2 != 32 );
          v44 = v60;
          str = v2;
        }
        WhileSpace(&str);
        v46 = User::GetMainCharID(&g_kUser);
        Name5::n_string(v46, acMainCharID);
        v47 = v44->m_pkKingDomQuest;
        acMainCharID[20] = 0;
        v48 = KingdomQuestWin::GetJoinQuestHandle(v47);
        if ( GameFrameWork::IsVotePossible(v44, v48) )
        {
          v49 = str;
          if ( strcmp(str, (const char *)&unk_9810FF) )
          {
            if ( strcmp(str, acMainCharID) && KingdomQuestPlayerList::IsPlayerName(v44->m_pkKQPlayerList, str) )
            {
              v50 = acMainCharID;
LABEL_232:
              VoteWin::SetProposerText(v44->m_pkVoteWin, v50);
              VoteWin::SetTargetText(v44->m_pkVoteWin, v49);
              GameFrameWork::NcKqVoteStartCheckReq(v44);
              return 1;
            }
          }
        }
      }
      else if ( !strncmp(pcText, "vote", 4u) )
      {
        v44 = v60;
        if ( v60->m_eFieldMapType != 1 )
          return 1;
        v51 = pcText[4];
        v52 = pcText + 4;
        str = pcText + 4;
        if ( v51 != 32 )
        {
          do
          {
            if ( !v51 )
              break;
            if ( IsDBCSLeadByte(v51) && v52[1] )
              v52 += 2;
            else
              ++v52;
            v51 = *v52;
          }
          while ( *v52 != 32 );
          v44 = v60;
          str = v52;
        }
        WhileSpace(&str);
        v53 = User::GetMainCharID(&g_kUser);
        Name5::n_string(v53, &strChat._Bx._Buf[4]);
        v54 = v44->m_pkKingDomQuest;
        strChat._Alval.0 = 0;
        v55 = KingdomQuestWin::GetJoinQuestHandle(v54);
        if ( GameFrameWork::IsVotePossible(v44, v55) )
        {
          v49 = str;
          if ( strcmp(str, (const char *)&unk_98110A) )
          {
            if ( strcmp(str, &strChat._Bx._Buf[4]) && KingdomQuestPlayerList::IsPlayerName(v44->m_pkKQPlayerList, str) )
            {
              v50 = &strChat._Bx._Buf[4];
              goto LABEL_232;
            }
          }
        }
      }
    }
    return 0;
  }
  str = &pcText[iCount];
  if ( !pcText[iCount] )
    return 1;
  WhileSpace(&str);
  if ( !*str )
    return 1;
  GameFrameWork::NcActPartyChatReq(v60, str);
  return 1;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00480FD0) --------------------------------------------------------
void __thiscall GameFrameWork::DecodingChat(GameFrameWork *this, char *pcText, char *pcDefaultCmd, char *pcCharID)
{
  char *v4; // esi@1
  bool v5; // zf@1
  GameFrameWork *v6; // edi@1
  char v7; // al@2
  unsigned int v8; // eax@6
  char *i; // ecx@6
  ChatDisplayWin2 *v10; // ecx@10
  int v11; // edi@12
  ProcessingString *v12; // eax@14
  char v13; // al@16
  _BYTE *v14; // esi@16
  int v15; // edi@16
  char j; // al@20
  ProcessingString *v17; // eax@28
  void *v18; // ebx@30
  char *v19; // eax@35
  bool v20; // al@36
  char *v21; // esi@52
  char *v22; // eax@53
  GameFrameWork *v23; // esi@53
  char *v24; // eax@54
  int iPrefixLen; // [sp+10h] [bp-214h]@32
  GameFrameWork *v26; // [sp+14h] [bp-210h]@1
  char *pcTemp; // [sp+18h] [bp-20Ch]@40
  bool bReturn; // [sp+1Eh] [bp-206h]@32
  bool b; // [sp+1Fh] [bp-205h]@34
  char pFilterText[256]; // [sp+20h] [bp-204h]@12
  char pTemp[256]; // [sp+120h] [bp-104h]@12

  v4 = pcText;
  v5 = *pcText == 47;
  v6 = this;
  v26 = this;
  if ( v5 )
  {
    v7 = pcText[1];
    if ( v7 == 119 || v7 == 87 )
    {
      memset(this->m_acMessage, 0, 0x400u);
      memcpy(v6->m_acMessage, pcText, strlen(pcText));
      v6->m_bWhisper = 1;
    }
  }
  if ( *pcText )
  {
    v8 = strlen(pcText);
    for ( i = &pcText[v8 - 1]; v8; --v8 )
    {
      if ( *i != 32 )
        break;
      *i-- = 0;
    }
    if ( *pcText )
    {
      v10 = v6->m_pkChatDisplayWin;
      if ( v10 && ChatDisplayWin2::IsItemLinkInfo(v10) )
      {
        v11 = 0;
        memset(pFilterText, 0, 0x100u);
        memset(pTemp, 0, 0x100u);
        if ( *pcText )
        {
          do
          {
            if ( !strncmp(v4, "{color,", 7u) )
            {
              v12 = TextFilterTable::FilterSlander(pTemp);
              if ( v12 )
              {
                strncat(pFilterText, v12->m_acSource, strlen(v12->m_acSource));
                memset(pTemp, 0, 0x100u);
                v11 = 0;
              }
              strncat(pTemp, "{color,", 7u);
              v13 = v4[7];
              v14 = v4 + 7;
              v15 = v11 + 7;
              if ( v13 )
              {
                while ( v13 != 44 )
                {
                  ++v14;
                  pTemp[v15] = v13;
                  v13 = *v14;
                  ++v15;
                  if ( !*v14 )
                    goto LABEL_23;
                }
                for ( j = *v14; *v14; ++v15 )
                {
                  if ( j == 125 )
                    break;
                  ++v14;
                  pTemp[v15] = j;
                  j = *v14;
                }
              }
LABEL_23:
              pTemp[v15] = *v14;
              v4 = v14 + 1;
              strncat(pFilterText, pTemp, strlen(pTemp));
              memset(pTemp, 0, 0x100u);
              v11 = 0;
            }
            else if ( IsDBCSLeadByte(*v4) )
            {
              strncat(pTemp, v4, 2u);
              v4 += 2;
              v11 += 2;
            }
            else
            {
              pTemp[v11++] = *v4++;
            }
          }
          while ( *v4 );
        }
        v17 = TextFilterTable::FilterSlander(pTemp);
        if ( v17 )
          strncat(pFilterText, v17->m_acSource, strlen(v17->m_acSource));
        v6 = v26;
        v18 = pFilterText;
      }
      else
      {
        v18 = TextFilterTable::FilterSlander(pcText);
      }
      LOBYTE(iPrefixLen) = *(_BYTE *)v18;
      bReturn = 0;
      if ( IsDBCSLeadByte(iPrefixLen) || *(_BYTE *)v18 != 47 )
      {
        switch ( (char)iPrefixLen )
        {
          case 37:
          case 38:
          case 42:
            break;
          case 36:
            if ( !v6->m_bEnableAdmin )
              break;
            b = GameFrameWork::DecodingAuthorChat(v6, (char *)v18 + 1);
            v20 = bReturn;
            goto LABEL_37;
          default:
            TextFilterTable::FilterEmotion((char *)v18);
            break;
        }
$LN84_4:
        if ( !pcDefaultCmd )
        {
          if ( *(_BYTE *)v18 && !IsAllSpace((char *)v18) )
          {
            ChatCommandList::AddText(&v6->m_kChatComList, (const char *)v18);
            ChatCommandList::InitPos(&v6->m_kChatComList);
          }
LABEL_59:
          GameFrameWork::NcActChatReq(v6, (char *)v18);
          return;
        }
        if ( IsShisperChat(pcDefaultCmd + 1, (int *)&pcTemp) && IsValidShisperChat((char *)v18) )
        {
          if ( !GetShisperNameStrLen((char *)v18) )
            goto LABEL_52;
          ChatCommandList::AddText(&v6->m_kChatComList, &pcTemp[(_DWORD)v18]);
        }
        else
        {
          if ( !*(_BYTE *)v18 || IsAllSpace((char *)v18) )
          {
LABEL_52:
            pcTemp = strcpy(fs(0), pcDefaultCmd);
            v21 = strcat(pcTemp, (const char *)v18);
            if ( IsChatCommandPrefix(pcTemp, &iPrefixLen) )
            {
              v22 = &v21[iPrefixLen];
              v23 = v26;
              if ( GameFrameWork::DecodingCmdChat(v26, v22) )
                return;
              v24 = (char *)TextData::Get(0x28597396u);
              GameFrameWork::VaAddSysMsg(v23, v24);
              v6 = v23;
            }
            else
            {
              v6 = v26;
            }
            goto LABEL_59;
          }
          ChatCommandList::AddText(&v6->m_kChatComList, (const char *)v18);
        }
        ChatCommandList::InitPos(&v6->m_kChatComList);
        goto LABEL_52;
      }
      iPrefixLen = 1;
      b = GameFrameWork::DecodingCmdChat(v6, (char *)v18 + 1);
      if ( !b )
      {
        v19 = (char *)TextData::Get(0x28597396u);
        GameFrameWork::VaAddSysMsg(v6, v19);
      }
      v20 = 1;
LABEL_37:
      if ( b != 1 && v20 != 1 )
        goto $LN84_4;
    }
  }
}

//----- (004814A0) --------------------------------------------------------
void __cdecl WhileSpace(char **pcText)
{
  for ( ; **pcText == 32; ++*pcText )
    ;
}

//----- (004814C0) --------------------------------------------------------
void __thiscall Server::SetOneDayTime(Server *this, float fOneDayTime)
{
  Server *v2; // esi@1
  float fCurTime; // ST08_4@1

  v2 = this;
  this->m_fOldGameTimeWhenSet = this->m_fGameTimeWhenSet;
  this->m_fOldAppTimeWhenSet = this->m_fAppTimeWhenSet;
  this->m_fOldOneDayTime = Server::ONE_DAY_TIME;
  fCurTime = Server::GetGameTime(this, Timer::ms_fCurTime);
  Server::ONE_DAY_TIME = fOneDayTime;
  v2->m_fGameTimeWhenSet = fCurTime;
  v2->m_fAppTimeWhenSet = Timer::ms_fCurTime;
}
// A754F0: using guessed type float Server::ONE_DAY_TIME;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00481530) --------------------------------------------------------
void __thiscall Server::SetTimeTest(Server *this, bool bTest)
{
  Server *v2; // esi@1
  float fOldTime; // ST0C_4@1

  v2 = this;
  fOldTime = Server::GetGameTime(this, Timer::ms_fCurTime);
  Server::ms_bTimeTest = bTest;
  v2->m_fOffSetTime = 0.0;
  v2->m_fOffSetTime = fOldTime - Server::GetGameTime(v2, Timer::ms_fCurTime);
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// B26464: using guessed type bool Server::ms_bTimeTest;

//----- (00481590) --------------------------------------------------------
void __thiscall Server::SetCurrentTime(Server *this, int nHour, int nMinute)
{
  Server *v3; // esi@1
  float v4; // ST0C_4@1

  v3 = this;
  v4 = Server::GetGameTime(this, Timer::ms_fCurTime);
  Server::ms_bTimeTest = 1;
  v3->m_fOffSetTime = 0.0;
  v3->m_fOffSetTime = v4 - Server::GetGameTime(v3, Timer::ms_fCurTime);
  Server::ms_fCurTime = (double)(60 * (nMinute + 60 * nHour)) * (Server::ONE_DAY_TIME / 86400.0);
}
// A754F0: using guessed type float Server::ONE_DAY_TIME;
// A8B97C: using guessed type float Timer::ms_fCurTime;
// B26464: using guessed type bool Server::ms_bTimeTest;
// B26468: using guessed type float Server::ms_fCurTime;

//----- (00481620) --------------------------------------------------------
void __thiscall TutorialMgr::TutorialMgr(TutorialMgr *this)
{
  this->m_kWaitEvent_On_NC_SKILL_SKILL_LEARNSUC_CMD.kID = 0;
  this->m_kWaitEvent_On_NC_SKILL_SKILL_LEARNSUC_CMD.bOn = 0;
  this->m_kWaitEvent_On_NC_WT_LICENSE_ACK.bOn = 0;
  this->m_kWaitEvent_On_NC_WT_LICENSE_ACK.kID = 0;
  this->m_kWaitEvent_OnShortCutSkill.bOn = 0;
  this->m_kWaitEvent_OnShortCutSkill.kID = 0;
  this->m_kWaitEvent_On_NC_ITEM_UPGRADE_ACK.kID = 0;
  this->m_kWaitEvent_On_NC_ITEM_UPGRADE_ACK.bOn = 0;
  this->m_kWaitEvent_OpenItemUpgradeWin.kID = 0;
  this->m_kWaitEvent_OpenItemUpgradeWin.bOn = 0;
  this->m_kWaitEvent_OnSPSoulStoneUse_Key.kID = 0;
  this->m_kWaitEvent_OnSPSoulStoneUse_Key.bOn = 0;
  this->m_kWaitEvent_OnHPSoulStoneUse_Key.kID = 0;
  this->m_kWaitEvent_OnHPSoulStoneUse_Key.bOn = 0;
  this->m_kWaitEvent_On_NC_ITEM_EQUIP_ACK.kID = 0;
  this->m_kWaitEvent_On_NC_ITEM_EQUIP_ACK.bOn = 0;
  this->m_kWaitEvent_OpenInventoryWin.kID = 0;
  this->m_kWaitEvent_OpenInventoryWin.bOn = 0;
  this->m_kWaitEvent_OpenWeaponTitleWin.kID = 0;
  this->m_kWaitEvent_OpenWeaponTitleWin.bOn = 0;
  memset(TutorialMgr::m_arrPass, 0, 0x64u);
}

//----- (00481690) --------------------------------------------------------
TutorialMgr *__cdecl TutorialMgr::GetTutorialMgr()
{
  if ( !(`TutorialMgr::GetTutorialMgr'::`2'::`local static guard' & 1) )
  {
    `TutorialMgr::GetTutorialMgr'::`2'::`local static guard' |= 1u;
    TutorialMgr::TutorialMgr(&`TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr);
    atexit(`TutorialMgr::GetTutorialMgr'::`2'::`dynamic atexit destructor for 'kTutorialMgr'');
  }
  return &`TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr;
}
// A8C638: using guessed type int `TutorialMgr::GetTutorialMgr'::`2'::`local static guard';

//----- (004816C0) --------------------------------------------------------
bool __thiscall ChatBlockListWin::IsRestrictID(ChatBlockListWin *this, Name5 kCharID)
{
  return CChatRestrict::Get(&this->m_RestrictList, &kCharID) != 0;
}

//----- (004816E0) --------------------------------------------------------
void __thiscall std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::_Splice_same(std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *this, std::_List_const_iterator<std::_List_val<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > > _Where, std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *_Right, std::_List_const_iterator<std::_List_val<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > > _First, std::_List_const_iterator<std::_List_val<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > > _Last, unsigned int _Count)
{
  unsigned int v6; // edx@2
  std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *v7; // ecx@5

  if ( this != _Right )
  {
    v6 = this->_Mysize;
    if ( 153391688 - v6 < _Count )
      std::_Xlength_error("list<T> too long");
    this->_Mysize = _Count + v6;
    _Right->_Mysize -= _Count;
  }
  _First._Ptr->_Prev->_Next = _Last._Ptr;
  _Last._Ptr->_Prev->_Next = _Where._Ptr;
  _Where._Ptr->_Prev->_Next = _First._Ptr;
  v7 = _Where._Ptr->_Prev;
  _Where._Ptr->_Prev = _Last._Ptr->_Prev;
  _Last._Ptr->_Prev = _First._Ptr->_Prev;
  _First._Ptr->_Prev = v7;
}

//----- (00481760) --------------------------------------------------------
ScenarioMgr *__cdecl ScenarioMgr::GetScenarioMgr()
{
  std::_List_nod<Scenario *,std::allocator<Scenario *> >::_Node *v0; // eax@4
  std::exception pExceptionObject; // [sp+4h] [bp-1Ch]@7
  char *_What; // [sp+10h] [bp-10h]@7
  int v4; // [sp+1Ch] [bp-4h]@2

  if ( !(`ScenarioMgr::GetScenarioMgr'::`2'::`local static guard' & 1) )
  {
    `ScenarioMgr::GetScenarioMgr'::`2'::`local static guard' |= 1u;
    v4 = 0;
    if ( !(`TutorialMgr::GetTutorialMgr'::`2'::`local static guard' & 1) )
    {
      `TutorialMgr::GetTutorialMgr'::`2'::`local static guard' |= 1u;
      TutorialMgr::TutorialMgr(&`TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr);
      atexit(`TutorialMgr::GetTutorialMgr'::`2'::`dynamic atexit destructor for 'kTutorialMgr'');
    }
    `ScenarioMgr::GetScenarioMgr'::`2'::kScenarioMgr.m_listScenatio._Mysize = 0;
    v0 = (std::_List_nod<Scenario *,std::allocator<Scenario *> >::_Node *)operator new(0xCu);
    if ( !v0 )
    {
      _What = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&_What);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
    `ScenarioMgr::GetScenarioMgr'::`2'::kScenarioMgr.m_listScenatio._Myhead = v0;
    v0->_Next = v0;
    `ScenarioMgr::GetScenarioMgr'::`2'::kScenarioMgr.m_listScenatio._Myhead->_Prev = `ScenarioMgr::GetScenarioMgr'::`2'::kScenarioMgr.m_listScenatio._Myhead;
    `ScenarioMgr::GetScenarioMgr'::`2'::kScenarioMgr.m_pTutorialMgr = &`TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr;
    atexit(`ScenarioMgr::GetScenarioMgr'::`2'::`dynamic atexit destructor for 'kScenarioMgr'');
  }
  return &`ScenarioMgr::GetScenarioMgr'::`2'::kScenarioMgr;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// A8C638: using guessed type int `TutorialMgr::GetTutorialMgr'::`2'::`local static guard';
// A8C64C: using guessed type int `ScenarioMgr::GetScenarioMgr'::`2'::`local static guard';

//----- (00481840) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__cdecl std::_Move<std::basic_string<char,std::char_traits<char>,std::allocator<char>> *,std::basic_string<char,std::char_traits<char>,std::allocator<char>> *>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_First, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Last, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Dest)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // esi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v4; // edi@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result; // eax@11

  v3 = _First;
  if ( _First == _Last )
  {
    result = _Dest;
  }
  else
  {
    v4 = _Dest;
    do
    {
      if ( v4 != v3 )
      {
        if ( v4->_Myres >= 0x10 )
          operator delete(v4->_Bx._Ptr);
        v4->_Myres = 15;
        v4->_Mysize = 0;
        v4->_Bx._Buf[0] = 0;
        if ( v3->_Myres >= 0x10 )
        {
          v4->_Bx._Ptr = v3->_Bx._Ptr;
          v3->_Bx._Ptr = 0;
        }
        else
        {
          memmove(v4->_Bx._Buf, v3->_Bx._Buf, v3->_Mysize + 1);
        }
        v4->_Mysize = v3->_Mysize;
        v4->_Myres = v3->_Myres;
        v3->_Myres = 15;
        v3->_Mysize = 0;
        v3->_Bx._Buf[0] = 0;
      }
      ++v3;
      ++v4;
    }
    while ( v3 != _Last );
    result = v4;
  }
  return result;
}

//----- (004818D0) --------------------------------------------------------
std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *__stdcall std::_List_val<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::_Buynode<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>(std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *_Next, std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *_Prev, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Val)
{
  void *v4; // esi@1
  std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *v5; // edx@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v6; // ecx@2
  int v8; // [sp+0h] [bp-30h]@1
  std::exception pExceptionObject; // [sp+10h] [bp-20h]@5
  void *p; // [sp+1Ch] [bp-14h]@1
  int *v11; // [sp+20h] [bp-10h]@1
  int v12; // [sp+2Ch] [bp-4h]@2

  v11 = &v8;
  v4 = operator new(0x24u);
  p = v4;
  if ( !v4 )
  {
    _Next = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Next);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v5 = _Prev;
  *(_DWORD *)v4 = _Next;
  v6 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)v4 + 8);
  v12 = 0;
  *((_DWORD *)v4 + 1) = v5;
  _Next = (std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *)((char *)v4 + 8);
  _Prev = (std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *)((char *)v4 + 8);
  LOBYTE(v12) = 1;
  if ( v4 != (void *)-8 )
  {
    *((_DWORD *)v4 + 6) = 0;
    *((_DWORD *)v4 + 7) = 15;
    v6->_Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(v6, _Val);
  }
  return (std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *)v4;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (004819A0) --------------------------------------------------------
void GameFrameWork::OnF7()
{
  Char::FadeInfoReset(g_pkMainChar);
}

//----- (004819B0) --------------------------------------------------------
void GameFrameWork::OnF8()
{
  Char::StartFadeIn(g_pkMainChar);
}

//----- (004819C0) --------------------------------------------------------
void GameFrameWork::OnF9()
{
  Char::StartFadeOut(g_pkMainChar);
}

//----- (00481A00) --------------------------------------------------------
signed int __cdecl GatherInfoTable::MapMobTypeToGatherType(MobType eType)
{
  signed int result; // eax@2

  switch ( eType )
  {
    case 9:
    case 21:
      result = 0;
      break;
    case 10:
      result = 2;
      break;
    default:
      result = 1;
      break;
  }
  return result;
}

//----- (00481A50) --------------------------------------------------------
void __thiscall GatheringTask::OnStart(GatheringTask *this)
{
  GatheringTask *v1; // esi@1
  GatheringWin *v2; // eax@1

  v1 = this;
  v2 = GatheringWin::CreateWin(0);
  v1->m_pkGatheringWin = v2;
  ((void (__stdcall *)(_DWORD))v2->vfptr->SetMsgHooker)(&v1->vfptr);
  ((void (__stdcall *)(_DWORD))v1->m_pkGatheringWin->vfptr[64].__vecDelDtor)(0);
  PgWin::EnableOpenCloseSound((PgWin *)&v1->m_pkGatheringWin->vfptr, 0);
  v1->m_eState = 0;
}

//----- (00481AA0) --------------------------------------------------------
void __cdecl HSDebug_Log(char *pPath)
{
  _iobuf *v1; // esi@1
  tm *v2; // eax@2
  const char *v3; // eax@4
  __int64 ltime; // [sp+4h] [bp-2Ch]@2
  char acDateTime[32]; // [sp+Ch] [bp-24h]@3

  v1 = fopen(pPath, "a");
  if ( v1 )
  {
    _time64(&ltime);
    v2 = _localtime64(&ltime);
    if ( v2 )
      strftime(acDateTime, 0x1Fu, "%m-%d %H:%M :%S", v2);
    v3 = fs("Time : %s\n", acDateTime);
    fprintf(v1, v3);
    fclose(v1);
  }
}

//----- (00481B30) --------------------------------------------------------
void __thiscall GameFrameWork::ApplyShortCutSizeData(GameFrameWork *this)
{
  signed int v1; // eax@1
  signed int v2; // edi@1
  GameFrameWork *v3; // esi@1
  ShortCutWin *v4; // ebx@4
  unsigned int v5; // edx@4
  PgWin **v6; // edi@13
  int v7; // ebx@13
  ShortCutWin **v8; // esi@15
  signed int v9; // edi@15

  v1 = (unsigned __int8)byte_B4FF9F;
  v2 = 0;
  v3 = this;
  ShortCutWin::m_uiShortcutSubWinIndex = (unsigned __int8)byte_B4FF9F;
  if ( unk_B4FF9E )
  {
    do
    {
      if ( v2 )
      {
        if ( byte_B4FFA2[3 * v2] )
        {
          PgWinMgr::CloseWin(&Pgg_kWinMgr, *((PgWin **)&v3->m_pkShortCutWin + v2));
          PgWinMgr::ShowWin(&Pgg_kWinMgr, *((PgWin **)&v3->m_pkShortCutWinV + v2));
          v4 = (ShortCutWin *)*((_DWORD *)&v3->m_pkShortCutWinV + v2);
        }
        else
        {
          PgWinMgr::CloseWin(&Pgg_kWinMgr, *((PgWin **)&v3->m_pkShortCutWinV + v2));
          PgWinMgr::ShowWin(&Pgg_kWinMgr, *((PgWin **)&v3->m_pkShortCutWin + v2));
          v4 = (ShortCutWin *)*((_DWORD *)&v3->m_pkShortCutWin + v2);
        }
        v5 = (unsigned __int8)byte_B4FFA1[3 * v2];
      }
      else if ( byte_B4FFA2[0] )
      {
        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkShortCutWin->vfptr);
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkShortCutWinV->vfptr);
        v4 = v3->m_pkShortCutWinV;
        v5 = (unsigned __int8)byte_B4FFA1[0];
      }
      else
      {
        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkShortCutWinV->vfptr);
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkShortCutWin->vfptr);
        v4 = v3->m_pkShortCutWin;
        v5 = (unsigned __int8)byte_B4FFA1[0];
      }
      v4->m_uiCurPage = v5;
      ShortCutWin::ResetIconWin(v4);
      ShortCutWin::SetPageTextWin(v4);
      ++v2;
    }
    while ( v2 < unk_B4FF9E );
    v1 = ShortCutWin::m_uiShortcutSubWinIndex;
  }
  if ( v1 < 4 )
  {
    v6 = (PgWin **)&v3->m_pkShortCutSubWinV[v1];
    v7 = 4 - v1;
    do
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, *(v6 - 5));
      PgWinMgr::CloseWin(&Pgg_kWinMgr, *v6);
      ++v6;
      --v7;
    }
    while ( v7 );
  }
  ShortCutWin::SizeBtnPosToStatus(v3->m_pkShortCutWin);
  ShortCutWin::ReflashShortCutWin(v3->m_pkShortCutWin);
  ShortCutWin::SizeBtnPosToStatus(v3->m_pkShortCutWinV);
  ShortCutWin::ReflashShortCutWin(v3->m_pkShortCutWinV);
  v8 = v3->m_pkShortCutSubWinV;
  v9 = 4;
  do
  {
    ShortCutWin::SizeBtnPosToStatus(*(v8 - 5));
    ShortCutWin::ReflashShortCutWin(*(v8 - 5));
    ShortCutWin::SizeBtnPosToStatus(*v8);
    ShortCutWin::ReflashShortCutWin(*v8);
    ++v8;
    --v9;
  }
  while ( v9 );
}
// A8E0A0: using guessed type unsigned int ShortCutWin::m_uiShortcutSubWinIndex;
// B4FF9F: using guessed type char byte_B4FF9F;

//----- (00481CE0) --------------------------------------------------------
void __thiscall GameFrameWork::ApplyKeyMappingData(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  KeyRemappingWin *v2; // ecx@4
  ShortCutWin **v3; // edi@5
  signed int v4; // ebx@5

  v1 = this;
  if ( CharSelectFrameWork::m_bLoadNewKeyMapOption )
  {
    KeyRemappingWin::SetSyncFromOpt(this->m_pkKeyRemappingWin, 1);
  }
  else if ( CharSelectFrameWork::ms_bLoadKeyMappingOptionSuccess )
  {
    v2 = this->m_pkKeyRemappingWin;
    KeyRemappingWin::SaveDefalultKeyRemapping(0);
    KeyRemappingWin::LoadDefalultKeyRemapping(v1->m_pkKeyRemappingWin, 0);
    KeyRemappingWin::ReflashContents(v1->m_pkKeyRemappingWin);
  }
  v3 = v1->m_pkShortCutSubWinV;
  v4 = 4;
  do
  {
    ShortCutWin::ReflashHotKey(v1->m_pkShortCutWin);
    ShortCutWin::ReflashHotKey(v1->m_pkShortCutWinV);
    ShortCutWin::ReflashHotKey(*(v3 - 5));
    ShortCutWin::ReflashHotKey(*v3);
    ++v3;
    --v4;
  }
  while ( v4 );
}
// A886CD: using guessed type bool CharSelectFrameWork::m_bLoadNewKeyMapOption;
// A886CF: using guessed type bool CharSelectFrameWork::ms_bLoadKeyMappingOptionSuccess;

//----- (00481D70) --------------------------------------------------------
void __thiscall GameFrameWork::RegistereWinPostion(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  PgWin **v2; // edi@73
  signed int v3; // ebx@73
  PgWin *v4; // esi@81

  v1 = this;
  if ( this->m_pkStatusWin )
    MachineOpt::RegistereWinPostion((PgWin *)&this->m_pkStatusWin->vfptr);
  if ( v1->m_pkTargetWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkTargetWin->vfptr);
  if ( v1->m_pkChatDisplayWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkChatDisplayWin->vfptr);
  if ( v1->m_pkSysMsgDisplayWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkSysMsgDisplayWin->vfptr);
  if ( v1->m_pkCharInfoWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkCharInfoWin->vfptr);
  if ( v1->m_pkInventoryWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkInventoryWin->vfptr);
  if ( v1->m_pkSkillWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkSkillWin->vfptr);
  if ( v1->m_pkSystemWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkSystemWin->vfptr);
  if ( v1->m_pkMiniHouseMenuWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkMiniHouseMenuWin->vfptr);
  if ( v1->m_pkPrivateStoreWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkPrivateStoreWin->vfptr);
  if ( v1->m_pkDivideWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkDivideWin->vfptr);
  if ( v1->m_pkMoneyWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkMoneyWin->vfptr);
  if ( v1->m_pkMainCharSpeechBubbleWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkMainCharSpeechBubbleWin->vfptr);
  if ( v1->m_pkKQuestTimeWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkKQuestTimeWin->vfptr);
  if ( v1->m_pkIDTimeWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkIDTimeWin->vfptr);
  if ( v1->m_pkKingDomQuest )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkKingDomQuest->vfptr);
  if ( v1->m_pkActionWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkActionWin->vfptr);
  if ( v1->m_pkQuestWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkQuestWin->vfptr);
  if ( v1->m_pkPuzzleTimeWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkPuzzleTimeWin->vfptr);
  if ( v1->m_pkOptionWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkOptionWin->vfptr);
  if ( v1->m_pkCalculatorWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkCalculatorWin->vfptr);
  if ( v1->m_pkItemShopWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkItemShopWin->vfptr);
  if ( v1->m_pkUserTradeWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkUserTradeWin->vfptr);
  if ( v1->m_pkNPCSkillWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkNPCSkillWin->vfptr);
  if ( v1->m_pkNPCSoulWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkNPCSoulWin->vfptr);
  if ( v1->m_pkStorageWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkStorageWin->vfptr);
  if ( v1->m_pkEnchantGemWin1 )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkEnchantGemWin1->vfptr);
  if ( v1->m_pkEnchantGemWin2 )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkEnchantGemWin2->vfptr);
  if ( v1->m_pkEnchantGemWin3 )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkEnchantGemWin3->vfptr);
  if ( v1->m_pkWeaponTitleWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkWeaponTitleWin->vfptr);
  if ( v1->m_pkItemShopWin2 )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkItemShopWin2->vfptr);
  if ( v1->m_pkMiniMapWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkMiniMapWin->vfptr);
  if ( v1->m_pkMainMenuWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkMainMenuWin->vfptr);
  if ( v1->m_pkShortCutWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkShortCutWin->vfptr);
  if ( v1->m_pkShortCutWinV )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkShortCutWinV->vfptr);
  if ( v1->m_pkKQPKRealTimeRankWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkKQPKRealTimeRankWin->vfptr);
  v2 = (PgWin **)v1->m_pkShortCutSubWinV;
  v3 = 4;
  do
  {
    if ( *(v2 - 5) )
      MachineOpt::RegistereWinPostion(*(v2 - 5));
    if ( *v2 )
      MachineOpt::RegistereWinPostion(*v2);
    ++v2;
    --v3;
  }
  while ( v3 );
  if ( v1->m_pkServerTimeWin )
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkServerTimeWin->vfptr);
  v4 = (PgWin *)&v1->m_pkTOTWin->vfptr;
  if ( v4 )
    MachineOpt::RegistereWinPostion(v4);
}

//----- (00482090) --------------------------------------------------------
PgWin *__thiscall GameFrameWork::GetWinPosByOption(GameFrameWork *this, unsigned int index)
{
  PgWin *result; // eax@1

  result = 0;
  switch ( index )
  {
    case 0u:
      result = (PgWin *)&this->m_pkStatusWin->vfptr;
      break;
    case 1u:
      result = (PgWin *)&this->m_pkTargetWin->vfptr;
      break;
    case 2u:
      result = (PgWin *)&this->m_pkShortCutWin->vfptr;
      break;
    case 3u:
      result = (PgWin *)&this->m_pkShortCutWinV->vfptr;
      break;
    case 4u:
      result = (PgWin *)&this->m_pkShortCutSubWin[0]->vfptr;
      break;
    case 5u:
      result = (PgWin *)&this->m_pkShortCutSubWin[1]->vfptr;
      break;
    case 6u:
      result = (PgWin *)&this->m_pkShortCutSubWin[2]->vfptr;
      break;
    case 7u:
      result = (PgWin *)&this->m_pkShortCutSubWin[3]->vfptr;
      break;
    case 8u:
      result = (PgWin *)&this->m_pkShortCutSubWinV[0]->vfptr;
      break;
    case 9u:
      result = (PgWin *)&this->m_pkShortCutSubWinV[1]->vfptr;
      break;
    case 0xAu:
      result = (PgWin *)&this->m_pkShortCutSubWinV[2]->vfptr;
      break;
    case 0xBu:
      result = (PgWin *)&this->m_pkShortCutSubWinV[3]->vfptr;
      break;
    case 0xCu:
      result = (PgWin *)&this->m_pkItemUpgradeWin->vfptr;
      break;
    case 0xDu:
      result = (PgWin *)&this->m_pkMoverUpgradeWin->vfptr;
      break;
    case 0xEu:
      result = (PgWin *)&this->m_pkFriendWin->vfptr;
      break;
    case 0xFu:
      result = (PgWin *)&this->m_pkFriendAddWin->vfptr;
      break;
    case 0x10u:
      result = (PgWin *)&this->m_pkActionWin->vfptr;
      break;
    case 0x11u:
      result = (PgWin *)&this->m_pkKingDomQuest->vfptr;
      break;
    case 0x12u:
      result = (PgWin *)&this->m_pkOptionWin->vfptr;
      break;
    case 0x13u:
      result = (PgWin *)&this->m_pkCharInfoWin->vfptr;
      break;
    case 0x14u:
      result = (PgWin *)&this->m_pkInventoryWin->vfptr;
      break;
    case 0x15u:
      result = (PgWin *)&this->m_pkSkillWin->vfptr;
      break;
    case 0x16u:
      result = (PgWin *)&this->m_pkMiniMapWin->vfptr;
      break;
    case 0x17u:
      result = (PgWin *)&this->m_pkChatDisplayWin->vfptr;
      break;
    case 0x18u:
      result = (PgWin *)&this->m_pkSysMsgDisplayWin->vfptr;
      break;
    case 0x19u:
      result = (PgWin *)&this->m_pkServerTimeWin->vfptr;
      break;
    case 0x1Au:
      result = (PgWin *)&this->m_pkTOTWin->vfptr;
      break;
    case 0x1Bu:
      result = (PgWin *)&this->m_pkItemMixWin->vfptr;
      break;
    default:
      return result;
  }
  return result;
}

//----- (00482230) --------------------------------------------------------
void __thiscall GameFrameWork::SetRewardWinQuestID(GameFrameWork *this, unsigned __int16 hQuestID)
{
  RewardWin *v2; // ecx@1

  v2 = this->m_pkRewardWin;
  if ( v2 )
    RewardWin::UpdateReward(v2, hQuestID);
}

//----- (00482250) --------------------------------------------------------
void __thiscall GameFrameWork::ApplyWindowPosData(GameFrameWork *this)
{
  unsigned int v1; // ebx@1
  GameFrameWork *v2; // edi@1
  ShortCutWin *v3; // esi@3
  unsigned int v4; // eax@33
  unsigned int v5; // ecx@33
  signed int v6; // ST0C_4@39
  signed int v7; // ST08_4@39
  unsigned int i; // [sp+10h] [bp-4h]@1

  v1 = 0;
  v2 = this;
  i = 0;
  if ( dword_A76966 )
  {
    while ( 1 )
    {
      switch ( v1 )
      {
        case 0u:
          v3 = (ShortCutWin *)v2->m_pkStatusWin;
          goto LABEL_31;
        case 1u:
          v3 = (ShortCutWin *)v2->m_pkTargetWin;
          goto LABEL_31;
        case 2u:
          v3 = v2->m_pkShortCutWin;
          goto LABEL_31;
        case 3u:
          v3 = v2->m_pkShortCutWinV;
          goto LABEL_31;
        case 4u:
          v3 = v2->m_pkShortCutSubWin[0];
          goto LABEL_31;
        case 5u:
          v3 = v2->m_pkShortCutSubWin[1];
          goto LABEL_31;
        case 6u:
          v3 = v2->m_pkShortCutSubWin[2];
          goto LABEL_31;
        case 7u:
          v3 = v2->m_pkShortCutSubWin[3];
          goto LABEL_31;
        case 8u:
          v3 = v2->m_pkShortCutSubWinV[0];
          goto LABEL_31;
        case 9u:
          v3 = v2->m_pkShortCutSubWinV[1];
          goto LABEL_31;
        case 0xAu:
          v3 = v2->m_pkShortCutSubWinV[2];
          goto LABEL_31;
        case 0xBu:
          v3 = v2->m_pkShortCutSubWinV[3];
          goto LABEL_31;
        case 0xCu:
          v3 = (ShortCutWin *)v2->m_pkItemUpgradeWin;
          goto LABEL_31;
        case 0xDu:
          v3 = (ShortCutWin *)v2->m_pkMoverUpgradeWin;
          goto LABEL_31;
        case 0xEu:
          v3 = (ShortCutWin *)v2->m_pkFriendWin;
          goto LABEL_31;
        case 0xFu:
          v3 = (ShortCutWin *)v2->m_pkFriendAddWin;
          goto LABEL_31;
        case 0x10u:
          v3 = (ShortCutWin *)v2->m_pkActionWin;
          goto LABEL_31;
        case 0x11u:
          v3 = (ShortCutWin *)v2->m_pkKingDomQuest;
          goto LABEL_31;
        case 0x12u:
          v3 = (ShortCutWin *)v2->m_pkOptionWin;
          goto LABEL_31;
        case 0x13u:
          v3 = (ShortCutWin *)v2->m_pkCharInfoWin;
          goto LABEL_31;
        case 0x14u:
          v3 = (ShortCutWin *)v2->m_pkInventoryWin;
          goto LABEL_31;
        case 0x15u:
          v3 = (ShortCutWin *)v2->m_pkSkillWin;
          goto LABEL_31;
        case 0x16u:
          v3 = (ShortCutWin *)v2->m_pkMiniMapWin;
          goto LABEL_31;
        case 0x17u:
          v3 = (ShortCutWin *)v2->m_pkChatDisplayWin;
          goto LABEL_31;
        case 0x18u:
          v3 = (ShortCutWin *)v2->m_pkSysMsgDisplayWin;
          goto LABEL_31;
        case 0x19u:
          v3 = (ShortCutWin *)v2->m_pkServerTimeWin;
          goto LABEL_31;
        case 0x1Au:
          v3 = (ShortCutWin *)v2->m_pkTOTWin;
          goto LABEL_31;
        case 0x1Bu:
          v3 = (ShortCutWin *)v2->m_pkItemMixWin;
LABEL_31:
          if ( !v3 )
            goto LABEL_40;
          if ( v3 == (ShortCutWin *)v2->m_pkChatDisplayWin )
          {
            v4 = ruiWidth;
            v5 = ruiHeight;
          }
          else
          {
            if ( v3 != (ShortCutWin *)v2->m_pkSysMsgDisplayWin )
              goto LABEL_39;
            v4 = dword_A76A4E;
            v5 = dword_A76A56;
          }
          if ( !v4 && !v5 )
            return;
          ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v3->vfptr[135].__vecDelDtor)(v3, v4, v5);
LABEL_39:
          v6 = (signed int)(flt_A7696E[2 * v1] * (double)PgWin::ms_uiScreenHeight);
          v7 = (signed int)(flt_A7696A[2 * i] * (double)PgWin::ms_uiScreenWidth);
          ((void (__thiscall *)(_DWORD))v3->vfptr[77].__vecDelDtor)(v3);
          v1 = i;
LABEL_40:
          i = ++v1;
          if ( v1 >= dword_A76966 )
            return;
          break;
        default:
          goto LABEL_40;
      }
    }
  }
}
// 482250: could not find valid save-restore pair for esi
// A76966: using guessed type int dword_A76966;
// A7696A: using guessed type float flt_A7696A[];
// A7696E: using guessed type float flt_A7696E[];

//----- (004824B0) --------------------------------------------------------
void __thiscall GameFrameWork::TerminateNet(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Net *v2; // ecx@1
  Net *v3; // edi@2
  PgNet *v4; // ecx@7
  Net *v5; // edi@9

  v1 = this;
  v2 = this->m_spZoneNet.m_pObject;
  if ( v2 )
  {
    PgNet::Close((PgNet *)&v2->vfptr);
    v3 = v1->m_spZoneNet.m_pObject;
    if ( v3 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      v1->m_spZoneNet.m_pObject = 0;
    }
  }
  v4 = (PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr;
  if ( v4 )
  {
    if ( !v1->m_bBackCharSelect )
    {
      PgNet::Close(v4);
      v5 = v1->m_spWorldMgrNet.m_pObject;
      if ( v5 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
        {
          if ( v5 )
            v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
        }
        v1->m_spWorldMgrNet.m_pObject = 0;
      }
    }
  }
}

//----- (00482540) --------------------------------------------------------
char __thiscall GameFrameWork::InitInput(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  KeyMap *v2; // ebx@1
  KeyMap *v3; // eax@2
  KeyMap *v4; // eax@3
  KeyMap *v5; // edi@4

  v1 = this;
  v2 = 0;
  if ( !this->m_spKeyMap.m_pObject )
  {
    v3 = (KeyMap *)operator new(0x20u);
    if ( v3 )
    {
      KeyMap::KeyMap(v3);
      v2 = v4;
    }
    v5 = v1->m_spKeyMap.m_pObject;
    if ( v5 != v2 )
    {
      if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      v1->m_spKeyMap.m_pObject = v2;
      if ( v2 )
        InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
    }
    v1->m_spKeyMap.m_pObject->m_pkFrameWork = (PgFrameWork *)v1;
  }
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0xBu, KEY_RETURN, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0xF4u, KEY_SLASH, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x1Du, KEY_ESCAPE, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x1Eu, KEY_F1, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x1Fu, KEY_F2, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x20u, KEY_F3, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x21u, KEY_F4, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x22u, KEY_F5, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x23u, KEY_F6, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0xCBu, KEY_F9, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x2Cu, KEY_TAB, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x2Du, KEY_1, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x2Eu, KEY_2, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x2Fu, KEY_3, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x30u, KEY_4, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x31u, KEY_5, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x32u, KEY_6, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x33u, KEY_7, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x34u, KEY_8, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x35u, KEY_9, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x36u, KEY_0, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x37u, KEY_MINUS, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x38u, KEY_EQUALS, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x39u, KEY_1, 0, 0x40u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x3Au, KEY_2, 0, 0x40u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x3Bu, KEY_3, 0, 0x40u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x3Cu, KEY_4, 0, 0x40u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x3Du, KEY_5, 0, 0x40u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x3Eu, KEY_6, 0, 0x40u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x3Fu, KEY_7, 0, 0x40u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x40u, KEY_8, 0, 0x40u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x41u, KEY_9, 0, 0x40u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x42u, KEY_0, 0, 0x40u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x43u, KEY_MINUS, 0, 0x40u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x44u, KEY_EQUALS, 0, 0x40u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x45u, KEY_1, 0, 1u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x46u, KEY_2, 0, 1u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x47u, KEY_3, 0, 1u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x48u, KEY_4, 0, 1u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x49u, KEY_5, 0, 1u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x4Au, KEY_6, 0, 1u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x4Bu, KEY_7, 0, 1u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x4Cu, KEY_8, 0, 1u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x4Du, KEY_9, 0, 1u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x4Eu, KEY_0, 0, 1u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x4Fu, KEY_MINUS, 0, 1u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x50u, KEY_EQUALS, 0, 1u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x51u, KEY_1, 0, 4u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x52u, KEY_2, 0, 4u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x53u, KEY_3, 0, 4u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x54u, KEY_4, 0, 4u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x55u, KEY_5, 0, 4u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x56u, KEY_6, 0, 4u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x57u, KEY_7, 0, 4u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x58u, KEY_8, 0, 4u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x59u, KEY_9, 0, 4u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x5Au, KEY_0, 0, 4u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x5Bu, KEY_MINUS, 0, 4u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x5Cu, KEY_EQUALS, 0, 4u, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x67u, KEY_Z, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x68u, KEY_E, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x69u, KEY_Q, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x6Au, KEY_C, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x6Bu, KEY_I, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x6Cu, KEY_K, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x6Du, KEY_V, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x6Eu, KEY_F, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x6Fu, KEY_M, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0xA2u, KEY_H, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0xACu, KEY_B, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0xADu, KEY_HOME, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x10u, KEY_L, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x70u, KEY_P, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x14u, KEY_X, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0xC0u, KEY_END, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0x14u, KEY_X, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0xF5u, KEY_G, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0xF5u, KEY_O, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0xF5u, KEY_T, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0xF5u, KEY_R, WAS_RELEASED, 0, 0);
  KeyMap::Add(v1->m_spKeyMap.m_pObject, 0xF5u, KEY_Z, WAS_RELEASED, 0, 0);
  return 1;
}

//----- (00482CC0) --------------------------------------------------------
void __thiscall GameFrameWork::TerminateInput(GameFrameWork *this)
{
  GameFrameWork *v1; // edi@1
  KeyMap *v2; // esi@1

  v1 = this;
  v2 = this->m_spKeyMap.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
    v1->m_spKeyMap.m_pObject = 0;
  }
}

//----- (00482D00) --------------------------------------------------------
void GameFrameWork::TerminateWorld()
{
  if ( g_kSoundMgr.m_pkBGMGroup )
  {
    SoundGroupBgm::SetFadeDurationTime(g_kSoundMgr.m_pkBGMGroup, 0.0);
    SoundMgr::StopBGM(&g_kSoundMgr);
  }
  SoundMgr::StopAllSound(&g_kSoundMgr);
}

//----- (00482D30) --------------------------------------------------------
void __usercall GameFrameWork::TerminateCharacter(GameFrameWork *this@<ecx>, int a2@<edi>)
{
  GameFrameWork *v2; // esi@1

  v2 = this;
  Skill::ClearLearnSkill();
  Skill::ClearLearnPassiveSkill();
  if ( g_pkMainChar )
  {
    if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[20].Deaffect)() == 1 )
      Char::Shape_UnMetamorphosis(g_pkMainChar, 0);
    if ( g_pkMainChar && g_pkMainChar->m_kCharShape.m_bAutoPickItem )
      Char::SetItemAutoPickState(g_pkMainChar, a2, 0);
  }
  CharMgr::RemoveAllWithoutMainChar(&g_kCharMgr);
  if ( g_pkMainChar )
    MainChar::ResetOnLink((MainChar *)g_pkMainChar);
  if ( v2->m_pkNpcDlgWin )
  {
    GameFrameWork::NcActEndOfTrade(v2);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkNpcDlgWin->vfptr);
  }
  v2->m_kSkillCasting.eState = 0;
}

//----- (00482DD0) --------------------------------------------------------
void __thiscall GameFrameWork::InitNewCharCreate(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Tutorial *v2; // eax@1
  Tutorial *v3; // eax@2
  QuestNewsWin *v4; // ecx@8
  CQuestWin2 *v5; // ecx@12

  v1 = this;
  v2 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v3 = (Tutorial *)operator new(0xB4u);
    if ( v3 )
      Tutorial::Tutorial(v3);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  if ( !v2->m_bEnable && CharSelectFrameWork::ms_bNewCharCreat )
  {
    v4 = v1->m_pkQuestNewsWin;
    if ( v4 )
    {
      if ( QuestNewsWin::QuestPlayer_LevelChange(v4, 1) )
        EffectMgr::CreatePigeonEffect(&g_kEffectMgr, g_pkMainChar, Timer::ms_fCurTime);
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkQuestNewsWin->vfptr);
    }
    v5 = v1->m_pkQuestWin;
    if ( v5 )
      CQuestWin2::LevelChange(v5, 1);
    NpcDialogWin::OpenNpcQuestDialog(v1->m_pkNpcDlgWin, 111, 0x6Eu, 0xFFFFu, 0, 1);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkNpcDlgWin->vfptr);
  }
}
// A886D3: using guessed type bool CharSelectFrameWork::ms_bNewCharCreat;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00482ED0) --------------------------------------------------------
void __thiscall GameFrameWork::TerminateSystem(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  NiCollisionGroup *v2; // esi@1

  v1 = this;
  NiCollisionGroup::RemoveAll(this->m_pkCollisionGroup);
  v2 = v1->m_pkCollisionGroup;
  if ( v2 )
  {
    NiCollisionGroup::~NiCollisionGroup(v2);
    operator delete(v2);
  }
}

//----- (00482F00) --------------------------------------------------------
void __thiscall GameFrameWork::OnSaveServerShortCutSizeOption(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Net *v2; // ecx@1
  PgNet *v3; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-20h]@1
  PROTO_NC_CHAR_OPTION_SET_SHORTCUTSIZE_CMD kCmdShortCutSize; // [sp+8h] [bp-1Ch]@1

  v1 = this;
  v2 = this->m_spWorldMgrNet.m_pObject;
  netcmd.protocol = 28689;
  PgNet::AddNetMsg((PgNet *)&v2->vfptr, &netcmd, 2);
  byte_B4FF9F = ShortCutWin::m_uiShortcutSubWinIndex;
  unk_B4FF9E = 5;
  *(_DWORD *)&kCmdShortCutSize.Data.Data[0] = *(_DWORD *)&MachineOpt::ms_shortCutSizeOptionData.m_kVersion.year;
  *(_DWORD *)&kCmdShortCutSize.Data.Data[4] = *(_DWORD *)&word_B4FF9C;
  *(_DWORD *)&kCmdShortCutSize.Data.Data[12] = unk_B4FFA4;
  *(_DWORD *)&kCmdShortCutSize.Data.Data[8] = *(_DWORD *)byte_B4FFA0;
  *(_DWORD *)&kCmdShortCutSize.Data.Data[16] = dword_B4FFA8;
  v3 = (PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr;
  *(_DWORD *)&kCmdShortCutSize.Data.Data[20] = dword_B4FFAC;
  PgNet::SendNetMsg(v3, &kCmdShortCutSize, 24);
  PgNet::Flush((PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr);
}
// A8E0A0: using guessed type unsigned int ShortCutWin::m_uiShortcutSubWinIndex;
// B4FF98: using guessed type struct MachineOpt::StShortCutSizeOption MachineOpt::ms_shortCutSizeOptionData;
// B4FF9C: using guessed type __int16 word_B4FF9C;
// B4FF9F: using guessed type char byte_B4FF9F;
// B4FFA8: using guessed type int dword_B4FFA8;
// B4FFAC: using guessed type int dword_B4FFAC;

//----- (00482FA0) --------------------------------------------------------
void __thiscall GameFrameWork::OnSaveServerWindowPosOption(GameFrameWork *this)
{
  GameFrameWork *v1; // ebx@1
  Net *v2; // ecx@3
  unsigned int v3; // edi@3
  ChatDisplayWin2 *v4; // esi@4
  unsigned int v5; // ebx@5
  signed int v6; // eax@5
  double v7; // st6@5
  unsigned int v8; // ebx@5
  float fXPosRate; // ST18_4@5
  double v10; // st7@5
  int v11; // eax@5
  PgNet *v12; // ecx@10
  NETCOMMAND netcmd; // [sp+10h] [bp-198h]@3
  GameFrameWork *v14; // [sp+14h] [bp-194h]@1
  float fYPosRate; // [sp+18h] [bp-190h]@5
  PROTO_NC_CHAR_OPTION_SET_WINDOWPOS_CMD kCmd; // [sp+1Ch] [bp-18Ch]@3

  v1 = this;
  v14 = this;
  if ( dword_A76966 != 28 )
    dword_A76966 = 28;
  v2 = this->m_spWorldMgrNet.m_pObject;
  netcmd.protocol = 28693;
  PgNet::AddNetMsg((PgNet *)&v2->vfptr, &netcmd, 2);
  memset(kCmd.Data.Data, 0, 0x188u);
  v3 = 0;
  if ( dword_A76966 )
  {
    do
    {
      v4 = (ChatDisplayWin2 *)GameFrameWork::GetWinPosByOption(v1, v3);
      if ( v4 )
      {
        v5 = PgWin::ms_uiScreenWidth;
        v6 = ((int (__thiscall *)(ChatDisplayWin2 *))v4->vfptr[41].__vecDelDtor)(v4);
        fYPosRate = *(float *)&v6;
        v7 = (double)v5;
        v8 = PgWin::ms_uiScreenHeight;
        fXPosRate = (double)v6 / v7;
        v10 = (double)((int (__thiscall *)(ChatDisplayWin2 *))v4->vfptr[42].__vecDelDtor)(v4);
        v11 = (int)v14;
        fYPosRate = v10 / (double)v8;
        flt_A7696A[2 * v3] = fXPosRate;
        flt_A7696E[2 * v3] = fYPosRate;
        if ( v4 == *(ChatDisplayWin2 **)(v11 + 700) )
        {
          ChatDisplayWin2::GetSize(v4, &ruiWidth, &ruiHeight);
        }
        else if ( v4 == *(ChatDisplayWin2 **)(v11 + 704) )
        {
          ChatDisplayWin::GetSize((ChatDisplayWin *)v4, &dword_A76A4E, &dword_A76A56);
        }
      }
      v1 = v14;
      ++v3;
    }
    while ( v3 < dword_A76966 );
  }
  qmemcpy(&kCmd, &MachineOpt::m_stSaveWinPosOption, 0x100u);
  v12 = (PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr;
  *(_WORD *)&kCmd.Data.Data[256] = HIWORD(MachineOpt::m_stSaveWinPosOption.ui_DisplayResolutionHeight);
  PgNet::SendNetMsg(v12, &kCmd, 392);
  PgNet::Flush((PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr);
}
// A76960: using guessed type struct MachineOpt::StSaveWinPosOption MachineOpt::m_stSaveWinPosOption;
// A76966: using guessed type int dword_A76966;
// A7696A: using guessed type float flt_A7696A[];
// A7696E: using guessed type float flt_A7696E[];

//----- (00483150) --------------------------------------------------------
void __thiscall GameFrameWork::OnSaveServerKeyRemappingOption(GameFrameWork *this)
{
  GameFrameWork *v1; // ebx@1
  Net *v2; // ecx@1
  NETCOMMAND netcmd; // [sp+Ch] [bp-13Ch]@1
  PROTO_NC_CHAR_OPTION_SET_KEYMAPPING_CMD kCmd; // [sp+10h] [bp-138h]@1

  v1 = this;
  v2 = this->m_spWorldMgrNet.m_pObject;
  netcmd.protocol = 28694;
  PgNet::AddNetMsg((PgNet *)&v2->vfptr, &netcmd, 2);
  memset(kCmd.Data.Data, 0, 0x134u);
  qmemcpy(&kCmd, &MachineOpt::m_keyMappingBuff, 0xF4u);
  PgNet::SendNetMsg((PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr, &kCmd, 308);
  PgNet::Flush((PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr);
}
// A76A68: using guessed type struct MachineOpt::StKeyMappingBuffer MachineOpt::m_keyMappingBuff;

//----- (004831F0) --------------------------------------------------------
void GameFrameWork::OnSaveServerGameOption()
{
  char v1; // bl@1
  signed int v2; // edx@1
  char *v3; // eax@1
  char v4; // cl@3
  char DummyMem[1024]; // [sp+8h] [bp-404h]@1

  memset(&DummyMem[1], 0, 0x3FFu);
  v1 = byte_B4FF68;
  strcpy(DummyMem, "\x1C");
  v2 = 0;
  v3 = &DummyMem[4];
  do
  {
    *((_WORD *)v3 - 1) = v2;
    switch ( (unsigned __int16)v2 )
    {
      case 0u:
        v4 = byte_B4FF66;
        goto LABEL_25;
      case 1u:
        v4 = byte_B4FF67;
        goto LABEL_25;
      case 2u:
      case 0x15u:
        *v3 = v1;
        break;
      case 3u:
        v4 = byte_B4FF69;
        goto LABEL_25;
      case 4u:
        v4 = byte_B4FF6A;
        goto LABEL_25;
      case 5u:
        v4 = byte_B4FF6B;
        goto LABEL_25;
      case 6u:
        v4 = byte_B4FF6C;
        goto LABEL_25;
      case 7u:
        v4 = byte_B4FF6D;
        goto LABEL_25;
      case 8u:
        v4 = byte_B4FF6E;
        goto LABEL_25;
      case 9u:
        v4 = byte_B4FF93;
        goto LABEL_25;
      case 0xAu:
        v4 = byte_B4FF94;
        goto LABEL_25;
      case 0xBu:
        v4 = byte_B4FF95;
        goto LABEL_25;
      case 0xCu:
        v4 = byte_B4FF70;
        goto LABEL_25;
      case 0xDu:
        v4 = byte_B4FF71;
        goto LABEL_25;
      case 0xEu:
        v4 = byte_B4FF72;
        goto LABEL_25;
      case 0xFu:
        v4 = byte_B4FF73;
        goto LABEL_25;
      case 0x10u:
        v4 = byte_B4FF74;
        goto LABEL_25;
      case 0x11u:
        v4 = byte_B4FF75;
        goto LABEL_25;
      case 0x13u:
        v4 = byte_B4FF8E;
        goto LABEL_25;
      case 0x14u:
        v4 = byte_B4FF8F;
        goto LABEL_25;
      case 0x16u:
        v4 = byte_B4FF90;
        goto LABEL_25;
      case 0x1Bu:
        v4 = byte_B4FF96;
LABEL_25:
        *v3 = v4;
        break;
      default:
        break;
    }
    ++v2;
    v3 += 3;
  }
  while ( v2 < *(unsigned __int16 *)DummyMem );
  NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Cu, 0x3Bu, DummyMem, 3 * *(unsigned __int16 *)DummyMem + 2);
}
// B4FF66: using guessed type char byte_B4FF66;
// B4FF67: using guessed type char byte_B4FF67;
// B4FF68: using guessed type char byte_B4FF68;
// B4FF69: using guessed type char byte_B4FF69;
// B4FF6A: using guessed type char byte_B4FF6A;
// B4FF6B: using guessed type char byte_B4FF6B;
// B4FF6C: using guessed type char byte_B4FF6C;
// B4FF6D: using guessed type char byte_B4FF6D;
// B4FF6E: using guessed type char byte_B4FF6E;
// B4FF70: using guessed type char byte_B4FF70;
// B4FF71: using guessed type char byte_B4FF71;
// B4FF72: using guessed type char byte_B4FF72;
// B4FF73: using guessed type char byte_B4FF73;
// B4FF74: using guessed type char byte_B4FF74;
// B4FF75: using guessed type char byte_B4FF75;
// B4FF8E: using guessed type char byte_B4FF8E;
// B4FF8F: using guessed type char byte_B4FF8F;
// B4FF90: using guessed type char byte_B4FF90;
// B4FF93: using guessed type char byte_B4FF93;
// B4FF94: using guessed type char byte_B4FF94;
// B4FF95: using guessed type char byte_B4FF95;
// B4FF96: using guessed type char byte_B4FF96;

//----- (004833C0) --------------------------------------------------------
GatherInfo *__stdcall GatheringTask::FindGatherInfo(GatherType eType, int nItemID)
{
  int v3; // esi@1
  int v4; // esi@2
  int v5; // eax@3
  int v6; // edx@6
  unsigned int v7; // edi@10
  GatherInfo *result; // eax@11
  bool v9; // zf@15

  v3 = 0;
  if ( (_WORD)nItemID != -1 )
  {
    v4 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            nItemID) )
    {
      if ( (unsigned __int16)nItemID <= *(_WORD *)(v4 + 200) )
      {
        v6 = *(_DWORD *)(v4 + 196);
        if ( *(_DWORD *)(v6 + 4 * (unsigned __int16)nItemID) )
          v5 = *(_DWORD *)(v6 + 4 * (unsigned __int16)nItemID);
        else
          v5 = 0;
      }
      else
      {
        v5 = 0;
      }
    }
    else
    {
      v5 = 0;
    }
    v3 = v5;
  }
  v7 = 0;
  if ( ITableBase<GatherInfo,GatherInfoTable>::GetTotal() )
  {
    while ( 1 )
    {
      result = (GatherInfo *)CDataReader::GetRecord(
                               (CDataReader *)(ITableBase<GatherInfo,GatherInfoTable>::ms_pkTable + 4),
                               v7);
      if ( result && result->Type == eType )
      {
        if ( v3 )
        {
          v9 = strcmp(result->NeededTool0, (const char *)(v3 + 2)) == 0;
        }
        else
        {
          if ( eType == GT_HERBING )
            return result;
          v9 = eType == 2;
        }
        if ( v9 )
          break;
      }
      if ( ++v7 >= ITableBase<GatherInfo,GatherInfoTable>::GetTotal() )
        return 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C170: using guessed type int ITableBase<GatherInfo,GatherInfoTable>::ms_pkTable;
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (004834A0) --------------------------------------------------------
char __thiscall GameFrameWork::InitNet(GameFrameWork *this)
{
  Net *v1; // ebx@1
  GameFrameWork *v2; // edi@1
  Net *v3; // esi@1
  char result; // al@9
  Net *v5; // esi@10
  Net *v6; // ebx@10

  v1 = g_kNetMgr.m_spZone[g_kNetMgr.m_iNowConnectedZone].m_pObject;
  v2 = this;
  v3 = this->m_spZoneNet.m_pObject;
  if ( v3 != v1 )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spZoneNet.m_pObject = v1;
    if ( v1 )
      InterlockedIncrement((volatile LONG *)&v1->m_uiRefCount);
  }
  if ( !v2->m_spZoneNet.m_pObject )
    goto LABEL_21;
  v5 = v2->m_spWorldMgrNet.m_pObject;
  v6 = g_kNetMgr.m_spWorldMgr.m_pObject;
  if ( v5 != g_kNetMgr.m_spWorldMgr.m_pObject )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v2->m_spWorldMgrNet.m_pObject = v6;
    if ( v6 )
      InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  }
  if ( v2->m_spWorldMgrNet.m_pObject )
  {
    PgNet::ContinueDispatchMsg((PgNet *)&v2->m_spZoneNet.m_pObject->vfptr);
    result = 1;
  }
  else
  {
LABEL_21:
    result = 0;
  }
  return result;
}

//----- (00483560) --------------------------------------------------------
void __usercall GameFrameWork::ChangeWinDefaultPos(GameFrameWork *this@<ecx>, signed int a2@<esi>)
{
  GameFrameWork *v2; // edi@1
  MiniMapWin *v3; // eax@9
  FullMapWin *v4; // eax@10
  PgWin *v5; // ecx@12
  ShortCutWin *v6; // ecx@19
  NiRefObjectVtbl *v7; // esi@19
  int v8; // eax@19
  float *v9; // esi@20
  int v10; // eax@22
  float v11; // ecx@22
  int v12; // ebx@22
  int (*v13)(void); // edx@22
  int v14; // eax@22
  int v15; // eax@22
  int v16; // ebx@24
  int v17; // eax@24
  int v18; // eax@24
  int v19; // edx@24
  int v20; // ebx@24
  int v21; // eax@24
  FullMapWin *v22; // ecx@26
  ChatDisplayWin2 *v23; // ecx@28
  double v24; // st7@29
  unsigned int v25; // esi@29
  void (__thiscall *v26)(unsigned int, int *, signed int); // edx@29
  ChatDisplayWin *v27; // ecx@30
  double v28; // st7@31
  int v29; // esi@31
  void (__thiscall *v30)(int, int *, signed int); // edx@31
  StatusBuffWin *v31; // ecx@44
  int v32; // esi@45
  void (__thiscall *v33)(int, int *, signed int); // edx@45
  StatusBuffWin *v34; // ecx@46
  int v35; // esi@47
  void (__thiscall *v36)(int, int *, signed int); // edx@47
  StatusBuffWin *v37; // ecx@48
  int v38; // esi@49
  void (__thiscall *v39)(int, int *, signed int); // edx@49
  GTIFlagWin *v40; // eax@53
  GTIFlagWin *v41; // eax@55
  signed int fYPosRate; // [sp+210h] [bp-34h]@18
  int v43; // [sp+21Ch] [bp-28h]@29
  int v44; // [sp+220h] [bp-24h]@29
  int v45; // [sp+224h] [bp-20h]@29
  int v46; // [sp+228h] [bp-1Ch]@29
  unsigned int uiWidth; // [sp+22Ch] [bp-18h]@29
  unsigned int ruiHeight; // [sp+230h] [bp-14h]@29
  unsigned int uiHeight; // [sp+234h] [bp-10h]@22
  float uiHeightRate; // [sp+238h] [bp-Ch]@22
  float HeightRate; // [sp+23Ch] [bp-8h]@20
  unsigned int v52; // [sp+240h] [bp-4h]@20

  v2 = this;
  if ( this->m_pkCharInfoWin )
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))this->m_pkCharInfoWin->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.0,
      0.5);
  if ( v2->m_pkMiniHouseMenuWin )
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v2->m_pkMiniHouseMenuWin->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
  if ( v2->m_pkCurrentCommunityWin )
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v2->m_pkCurrentCommunityWin->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
  if ( v2->m_pkPrivateStoreWin )
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v2->m_pkPrivateStoreWin->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
  v3 = v2->m_pkMiniMapWin;
  if ( v3 )
  {
    v4 = v3->m_pkFullMapWin;
    if ( v4 )
      ((void (__thiscall *)(FullMapWin *, unsigned int, unsigned int, _DWORD, _DWORD))v4->vfptr[59].__vecDelDtor)(
        v4,
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        0.5,
        0.5);
  }
  v5 = (PgWin *)&v2->m_pkStatusWin->vfptr;
  if ( v5 )
    PgWin::InitPosLeftTop(v5, PgWin::ms_uiScreenWidth, PgWin::ms_uiScreenHeight, 0.0, 0.0);
  if ( v2->m_pkMiniMapWin )
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v2->m_pkMiniMapWin->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      1.0,
      0.0);
  if ( v2->m_pkShortCutWin )
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v2->m_pkShortCutWin->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.0,
      1.0);
  fYPosRate = a2;
  if ( v2->m_pkShortCutWinV )
  {
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v2->m_pkShortCutWinV->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      1.0,
      0.0);
    v6 = v2->m_pkShortCutWinV;
    v7 = v6->vfptr;
    v8 = ((int (__stdcall *)(signed int))v6->vfptr[41].__vecDelDtor)(160);
    v7[77].__vecDelDtor((NiRefObject *)v2->m_pkShortCutWinV, v8);
  }
  v52 = 1;
  v9 = (float *)v2->m_pkShortCutSubWinV;
  LODWORD(HeightRate) = 4;
  do
  {
    if ( *((_DWORD *)v9 - 5) )
    {
      (*(void (__stdcall **)(unsigned int, unsigned int, _DWORD, _DWORD))(**((_DWORD **)v9 - 5) + 236))(
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        0.0,
        1.0);
      v10 = (*(int (**)(void))(**((_DWORD **)v9 - 5) + 148))();
      v11 = *(v9 - 5);
      v12 = v52 * v10;
      uiHeight = *(_DWORD *)LODWORD(v11) + 308;
      v13 = *(int (**)(void))(*(_DWORD *)LODWORD(v11) + 168);
      uiHeightRate = v11;
      v14 = v13();
      v15 = (*(int (__stdcall **)(int))(*(_DWORD *)LODWORD(uiHeightRate) + 164))(v14 - v12);
      (*(void (__thiscall **)(_DWORD, int))uiHeight)(*((_DWORD *)v9 - 5), v15);
    }
    if ( *(_DWORD *)v9 )
    {
      (*(void (__stdcall **)(unsigned int, unsigned int, _DWORD, _DWORD))(**(_DWORD **)v9 + 236))(
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        1.0,
        0.0);
      v16 = **(_DWORD **)v9;
      v17 = (*(int (__stdcall **)(signed int))(**(_DWORD **)v9 + 164))(160);
      (*(void (__thiscall **)(_DWORD, int))(v16 + 308))(*(_DWORD *)v9, v17);
      v18 = (*(int (**)(void))(**(_DWORD **)v9 + 144))();
      v19 = **(_DWORD **)v9;
      v20 = v52 * v18;
      uiHeight = **(_DWORD **)v9 + 308;
      v21 = (*(int (__stdcall **)(signed int))(v19 + 164))(160);
      (*(void (__thiscall **)(_DWORD, int))uiHeight)(*(_DWORD *)v9, v21 - v20);
    }
    ++v52;
    ++v9;
    --LODWORD(HeightRate);
  }
  while ( HeightRate != 0.0 );
  v22 = v2->m_pkMiniMapWin->m_pkFullMapWin;
  if ( v22 )
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v22->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
  v23 = v2->m_pkChatDisplayWin;
  if ( v23 )
  {
    ChatDisplayWin2::GetSize(v23, &uiWidth, &uiHeight);
    ruiHeight = PgWin::ms_uiScreenHeight - uiHeight - 100;
    v24 = (double)ruiHeight;
    ruiHeight = PgWin::ms_uiScreenHeight;
    v25 = (unsigned int)v2->m_pkChatDisplayWin;
    v26 = *(void (__thiscall **)(unsigned int, int *, signed int))(*(_DWORD *)v25 + 208);
    uiHeightRate = *(float *)&PgWin::ms_uiScreenHeight;
    v52 = PgWin::ms_uiScreenWidth;
    ruiHeight = v25;
    v43 = 0;
    v44 = 0;
    v45 = 0;
    v46 = 0;
    HeightRate = v24 / (double)PgWin::ms_uiScreenHeight;
    v26(v25, &v43, fYPosRate);
    fYPosRate = (signed int)((double)v52 * 0.0 - (double)v43);
    (*(void (__thiscall **)(unsigned int))(*(_DWORD *)v25 + 308))(ruiHeight);
  }
  v27 = (ChatDisplayWin *)&v2->m_pkSysMsgDisplayWin->vfptr;
  if ( v27 )
  {
    ChatDisplayWin::GetSize(v27, &uiWidth, &ruiHeight);
    uiHeight = PgWin::ms_uiScreenHeight - ruiHeight - 100;
    v28 = (double)uiHeight;
    uiHeight = PgWin::ms_uiScreenHeight;
    v29 = (int)v2->m_pkSysMsgDisplayWin;
    v30 = *(void (__thiscall **)(int, int *, signed int))(*(_DWORD *)v29 + 208);
    uiHeight = PgWin::ms_uiScreenHeight;
    HeightRate = *(float *)&PgWin::ms_uiScreenWidth;
    v52 = v29;
    v43 = 0;
    v44 = 0;
    v45 = 0;
    v46 = 0;
    uiHeightRate = v28 / (double)PgWin::ms_uiScreenHeight;
    v30(v29, &v43, fYPosRate);
    fYPosRate = (signed int)((double)LODWORD(HeightRate) - (double)v44);
    (*(void (__thiscall **)(unsigned int))(*(_DWORD *)v29 + 308))(v52);
    ChatDisplayWin::SetDefaultSize((ChatDisplayWin *)&v2->m_pkSysMsgDisplayWin->vfptr);
  }
  if ( v2->m_pkTOTWin )
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v2->m_pkTOTWin->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.56999999,
      0.2);
  if ( v2->m_pkTargetWin )
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v2->m_pkTargetWin->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.52999997,
      0.0);
  if ( v2->m_pkInventoryWin )
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v2->m_pkInventoryWin->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.75,
      0.5);
  if ( v2->m_pkActionWin )
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v2->m_pkActionWin->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.75,
      0.5);
  if ( v2->m_pkSkillWin )
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v2->m_pkSkillWin->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.75,
      0.5);
  if ( v2->m_pkQuestWin )
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v2->m_pkQuestWin->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.75,
      0.5);
  MachineOpt::UserLoginOption::SetDefault(&MachineOpt::ms_kUserLoginOption);
  v31 = v2->m_pkStatusBuffWin;
  if ( v31 )
  {
    StatusBuffWin::SetFrameBoxSize(v31, 0xC8u, 0x14u);
    StatusBuffWin::AlignBuf(v2->m_pkStatusBuffWin, 10, 1);
    v32 = (int)v2->m_pkStatusBuffWin;
    HeightRate = MachineOpt::ms_kUserLoginOption.BufXPos;
    uiHeight = LODWORD(MachineOpt::ms_kUserLoginOption.BufYPos);
    v33 = *(void (__thiscall **)(int, int *, signed int))(*(_DWORD *)v32 + 208);
    uiHeightRate = *(float *)&PgWin::ms_uiScreenWidth;
    ruiHeight = PgWin::ms_uiScreenHeight;
    v52 = v32;
    v43 = 0;
    v44 = 0;
    v45 = 0;
    v46 = 0;
    v33(v32, &v43, fYPosRate);
    fYPosRate = (signed int)((double)LODWORD(uiHeightRate) * HeightRate - (double)v43);
    (*(void (__thiscall **)(unsigned int))(*(_DWORD *)v32 + 308))(v52);
  }
  v34 = v2->m_pkStatusDBuffWin;
  if ( v34 )
  {
    StatusBuffWin::SetFrameBoxSize(v34, 0xC8u, 0x14u);
    StatusBuffWin::AlignBuf(v2->m_pkStatusDBuffWin, 10, 1);
    v35 = (int)v2->m_pkStatusDBuffWin;
    HeightRate = MachineOpt::ms_kUserLoginOption.DBufXPos;
    uiHeight = LODWORD(MachineOpt::ms_kUserLoginOption.DBufYPos);
    v36 = *(void (__thiscall **)(int, int *, signed int))(*(_DWORD *)v35 + 208);
    uiHeightRate = *(float *)&PgWin::ms_uiScreenWidth;
    ruiHeight = PgWin::ms_uiScreenHeight;
    v52 = v35;
    v43 = 0;
    v44 = 0;
    v45 = 0;
    v46 = 0;
    v36(v35, &v43, fYPosRate);
    fYPosRate = (signed int)((double)LODWORD(uiHeightRate) * HeightRate - (double)v43);
    (*(void (__thiscall **)(unsigned int))(*(_DWORD *)v35 + 308))(v52);
  }
  v37 = v2->m_pkStatusChargedBuffWin;
  if ( v37 )
  {
    StatusBuffWin::SetFrameBoxSize(v37, 0xC8u, 0x14u);
    StatusBuffWin::AlignBuf(v2->m_pkStatusChargedBuffWin, 10, 1);
    v38 = (int)v2->m_pkStatusChargedBuffWin;
    HeightRate = MachineOpt::ms_kUserLoginOption.DBufXPos;
    v39 = *(void (__thiscall **)(int, int *, signed int))(*(_DWORD *)v38 + 208);
    uiHeightRate = *(float *)&PgWin::ms_uiScreenWidth;
    *(float *)&uiHeight = MachineOpt::ms_kUserLoginOption.DBufYPos + 0.02800000086426735;
    ruiHeight = PgWin::ms_uiScreenHeight;
    v52 = v38;
    v43 = 0;
    v44 = 0;
    v45 = 0;
    v46 = 0;
    v39(v38, &v43, fYPosRate);
    (*(void (__thiscall **)(unsigned int))(*(_DWORD *)v38 + 308))(v52);
  }
  if ( v2->m_pkMHMinimizeWin )
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v2->m_pkMHMinimizeWin->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.89999998,
      0.30000001);
  if ( GuildTask::GetGTIMyFlagWin() )
  {
    v40 = GuildTask::GetGTIMyFlagWin();
    ((void (__thiscall *)(GTIFlagWin *, unsigned int, unsigned int, _DWORD, _DWORD))v40->vfptr[59].__vecDelDtor)(
      v40,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.57999998,
      0.15000001);
  }
  if ( GuildTask::GetGTIEnemyFlagWin() )
  {
    v41 = GuildTask::GetGTIEnemyFlagWin();
    ((void (__thiscall *)(GTIFlagWin *, unsigned int, unsigned int, _DWORD, _DWORD))v41->vfptr[59].__vecDelDtor)(
      v41,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.69999999,
      0.15000001);
  }
  if ( v2->m_pkServerTimeWin )
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v2->m_pkServerTimeWin->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.0,
      0.64999998);
  if ( v2->m_pkCastingProgressBar )
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v2->m_pkCastingProgressBar->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.80000001);
  if ( v2->m_pkMarketSearchWin )
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v2->m_pkMarketSearchWin->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
  if ( v2->m_pkMoverUpgradeWin )
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v2->m_pkMoverUpgradeWin->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.30000001,
      0.5);
  if ( v2->m_pkRandomOptionWin )
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v2->m_pkRandomOptionWin->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.30000001,
      0.5);
  if ( v2->m_pkTermExtendWin )
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v2->m_pkTermExtendWin->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.30000001,
      0.5);
  if ( v2->m_pkMinimonAutoItemUseWin )
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v2->m_pkMinimonAutoItemUseWin->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.30000001,
      0.5);
  if ( v2->m_pkItemMixWin )
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v2->m_pkItemMixWin->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.30000001,
      0.5);
}
// 483560: could not find valid save-restore pair for esi

//----- (00484070) --------------------------------------------------------
void __thiscall GameFrameWork::SetWindowsPosOption(GameFrameWork *this)
{
  GameFrameWork *v1; // edi@1
  PgWin *v2; // ecx@3
  PgWin **v3; // esi@4
  signed int v4; // ebx@4
  ChatDisplayWin2 *v5; // ecx@10
  double v6; // st7@11
  PgWin *v7; // ecx@11
  ChatDisplayWin *v8; // ecx@12
  double v9; // st7@13
  PgWin *v10; // ecx@13
  ShortCutWin *v11; // ecx@17
  NiRefObjectVtbl *v12; // esi@17
  int v13; // eax@17
  ShortCutWin **v14; // esi@18
  int v15; // eax@20
  unsigned int v16; // ecx@20
  int v17; // ebx@20
  int (*v18)(void); // edx@20
  int v19; // eax@20
  int v20; // eax@20
  NiRefObjectVtbl *v21; // ebx@22
  int v22; // eax@22
  int v23; // eax@22
  NiRefObjectVtbl *v24; // edx@22
  int v25; // ebx@22
  int v26; // eax@22
  double v27; // st7@30
  float fYPosRate; // ST19C_4@33
  float fXPosRate; // ST198_4@35
  float v30; // ST198_4@37
  float v31; // ST19C_4@39
  float v32; // ST198_4@39
  float v33; // ST198_4@41
  float v34; // ST198_4@43
  float v35; // ST19C_4@47
  float v36; // ST198_4@47
  float v37; // ST19C_4@49
  float v38; // ST198_4@49
  float v39; // ST198_4@51
  PgWin *v40; // ecx@52
  PgWin *v41; // ecx@54
  float v42; // ST19C_4@57
  float v43; // ST198_4@57
  float v44; // ST19C_4@59
  float v45; // ST198_4@59
  float v46; // ST19C_4@61
  float v47; // ST198_4@61
  float v48; // ST198_4@63
  float v49; // ST19C_4@67
  PgWin **v50; // esi@68
  signed int v51; // ebx@68
  unsigned int uiWidth; // [sp+1ACh] [bp-10h]@11
  unsigned int v53; // [sp+1B0h] [bp-Ch]@11
  unsigned int uiHeight; // [sp+1B4h] [bp-8h]@11
  float v55; // [sp+1B8h] [bp-4h]@11

  v1 = this;
  if ( this->m_pkMainMenuWin )
    ((void (__stdcall *)(unsigned int, unsigned int))this->m_pkMainMenuWin->vfptr[77].__vecDelDtor)(
      PgWin::ms_uiScreenWidth - 44,
      PgWin::ms_uiScreenHeight - 40);
  MachineOpt::SetWinPostion((PgWin *)&v1->m_pkTargetWin->vfptr);
  MachineOpt::SetWinPostion((PgWin *)&v1->m_pkItemUpgradeWin->vfptr);
  MachineOpt::SetWinPostion((PgWin *)&v1->m_pkMoverUpgradeWin->vfptr);
  MachineOpt::SetWinPostion((PgWin *)&v1->m_pkFriendWin->vfptr);
  MachineOpt::SetWinPostion((PgWin *)&v1->m_pkFriendAddWin->vfptr);
  MachineOpt::SetWinPostion((PgWin *)&v1->m_pkActionWin->vfptr);
  MachineOpt::SetWinPostion((PgWin *)&v1->m_pkKingDomQuest->vfptr);
  MachineOpt::SetWinPostion((PgWin *)&v1->m_pkOptionWin->vfptr);
  MachineOpt::SetWinPostion((PgWin *)&v1->m_pkCharInfoWin->vfptr);
  MachineOpt::SetWinPostion((PgWin *)&v1->m_pkInventoryWin->vfptr);
  MachineOpt::SetWinPostion((PgWin *)&v1->m_pkSkillWin->vfptr);
  MachineOpt::SetWinPostion((PgWin *)&v1->m_pkMiniMapWin->vfptr);
  MachineOpt::SetWinPostion((PgWin *)&v1->m_pkSysMsgDisplayWin->vfptr);
  MachineOpt::SetWinPostion((PgWin *)&v1->m_pkServerTimeWin->vfptr);
  MachineOpt::SetWinPostion((PgWin *)&v1->m_pkItemMixWin->vfptr);
  v2 = (PgWin *)&v1->m_pkStatusWin->vfptr;
  if ( GameFrameWork::ms_uiFirstCreateDevice )
  {
    if ( GameFrameWork::ms_bRendererRecreated )
    {
      if ( v2 )
        PgWin::InitPosLeftTop(v2, PgWin::ms_uiScreenWidth, PgWin::ms_uiScreenHeight, 0.0, 0.0);
      v5 = v1->m_pkChatDisplayWin;
      if ( v5 )
      {
        ChatDisplayWin2::GetSize(v5, &uiWidth, &uiHeight);
        v53 = PgWin::ms_uiScreenHeight - uiHeight - 100;
        v6 = (double)v53;
        v53 = PgWin::ms_uiScreenHeight;
        v7 = (PgWin *)&v1->m_pkChatDisplayWin->vfptr;
        v55 = v6 / (double)PgWin::ms_uiScreenHeight;
        PgWin::InitPosLeftTop(v7, PgWin::ms_uiScreenWidth, PgWin::ms_uiScreenHeight, 0.0, v55);
      }
      v8 = (ChatDisplayWin *)&v1->m_pkSysMsgDisplayWin->vfptr;
      if ( v8 )
      {
        ChatDisplayWin::GetSize(v8, &uiWidth, &uiHeight);
        v53 = PgWin::ms_uiScreenHeight - uiHeight - 100;
        v9 = (double)v53;
        v53 = PgWin::ms_uiScreenHeight;
        v10 = (PgWin *)&v1->m_pkSysMsgDisplayWin->vfptr;
        v55 = v9 / (double)PgWin::ms_uiScreenHeight;
        PgWin::InitPosRightTop(v10, PgWin::ms_uiScreenWidth, PgWin::ms_uiScreenHeight, 1.0, v55);
      }
      if ( v1->m_pkShortCutWin )
        ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v1->m_pkShortCutWin->vfptr[59].__vecDelDtor)(
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          0.0,
          1.0);
      if ( v1->m_pkShortCutWinV )
      {
        ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v1->m_pkShortCutWinV->vfptr[59].__vecDelDtor)(
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          1.0,
          0.0);
        v11 = v1->m_pkShortCutWinV;
        v12 = v11->vfptr;
        v13 = ((int (__stdcall *)(signed int))v11->vfptr[41].__vecDelDtor)(160);
        v12[77].__vecDelDtor((NiRefObject *)v1->m_pkShortCutWinV, v13);
      }
      LODWORD(v55) = 1;
      v14 = v1->m_pkShortCutSubWinV;
      uiHeight = 4;
      do
      {
        if ( *(v14 - 5) )
        {
          ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))(*(v14 - 5))->vfptr[59].__vecDelDtor)(
            PgWin::ms_uiScreenWidth,
            PgWin::ms_uiScreenHeight,
            0.0,
            1.0);
          v15 = ((int (*)(void))(*(v14 - 5))->vfptr[37].__vecDelDtor)();
          v16 = (unsigned int)*(v14 - 5);
          v17 = LODWORD(v55) * v15;
          uiWidth = *(_DWORD *)v16 + 308;
          v18 = *(int (**)(void))(*(_DWORD *)v16 + 168);
          v53 = v16;
          v19 = v18();
          v20 = (*(int (__stdcall **)(int))(*(_DWORD *)v53 + 164))(v19 - v17);
          (*(void (__thiscall **)(_DWORD, int))uiWidth)(*(v14 - 5), v20);
        }
        if ( *v14 )
        {
          ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))(*v14)->vfptr[59].__vecDelDtor)(
            PgWin::ms_uiScreenWidth,
            PgWin::ms_uiScreenHeight,
            1.0,
            0.0);
          v21 = (*v14)->vfptr;
          v22 = ((int (__stdcall *)(signed int))(*v14)->vfptr[41].__vecDelDtor)(160);
          v21[77].__vecDelDtor((NiRefObject *)*v14, v22);
          v23 = ((int (*)(void))(*v14)->vfptr[36].__vecDelDtor)();
          v24 = (*v14)->vfptr;
          v25 = LODWORD(v55) * v23;
          uiWidth = (unsigned int)&(*v14)->vfptr[77];
          v26 = ((int (__stdcall *)(signed int))v24[41].__vecDelDtor)(160);
          (*(void (__thiscall **)(ShortCutWin *, int))uiWidth)(*v14, v26 - v25);
        }
        ++LODWORD(v55);
        ++v14;
        --uiHeight;
      }
      while ( uiHeight );
      if ( v1->m_pkMysteryVaultWin )
        ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v1->m_pkMysteryVaultWin->vfptr[59].__vecDelDtor)(
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          0.95300001,
          0.66000003);
      if ( v1->m_pkQuestNewsWin )
        ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v1->m_pkQuestNewsWin->vfptr[59].__vecDelDtor)(
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          0.69999999,
          0.1);
      if ( v1->m_pkQuestFinishWin )
        ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v1->m_pkQuestFinishWin->vfptr[59].__vecDelDtor)(
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          1.0,
          0.60000002);
      v27 = 0.5;
      if ( v1->m_pkMapLinkGateWin )
      {
        ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v1->m_pkMapLinkGateWin->vfptr[59].__vecDelDtor)(
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          0.5,
          0.5);
        v27 = 0.5;
      }
      if ( v1->m_pkMoveBtnWin )
      {
        fYPosRate = v27;
        ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v1->m_pkMoveBtnWin->vfptr[59].__vecDelDtor)(
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          0.63999999,
          LODWORD(fYPosRate));
        v27 = 0.5;
      }
      if ( v1->m_pkGuildWarInformWin )
      {
        fXPosRate = v27;
        ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v1->m_pkGuildWarInformWin->vfptr[59].__vecDelDtor)(
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          LODWORD(fXPosRate),
          0.2);
        v27 = 0.5;
      }
      if ( v1->m_pkGTInformWin )
      {
        v30 = v27;
        ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v1->m_pkGTInformWin->vfptr[59].__vecDelDtor)(
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          LODWORD(v30),
          0.2);
        v27 = 0.5;
      }
      if ( v1->m_pkExpeditionWarnigMsgWin )
      {
        v31 = v27;
        v32 = v27;
        ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v1->m_pkExpeditionWarnigMsgWin->vfptr[59].__vecDelDtor)(
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          LODWORD(v32),
          LODWORD(v31));
        v27 = 0.5;
      }
      if ( v1->m_pkAnnounceWin )
      {
        v33 = v27;
        ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, signed int))v1->m_pkAnnounceWin->vfptr[57].__vecDelDtor)(
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          LODWORD(v33),
          150);
        v27 = 0.5;
      }
      if ( v1->m_pkRemainAnnounceWin )
      {
        v34 = v27;
        ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v1->m_pkRemainAnnounceWin->vfptr[59].__vecDelDtor)(
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          LODWORD(v34),
          0.13);
        v27 = 0.5;
      }
      if ( v1->m_pkAttendIconWin )
      {
        ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v1->m_pkAttendIconWin->vfptr[59].__vecDelDtor)(
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          0.51999998,
          0.89999998);
        v27 = 0.5;
      }
      if ( v1->m_pkAttendCheckWin )
      {
        v35 = v27;
        v36 = v27;
        ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v1->m_pkAttendCheckWin->vfptr[59].__vecDelDtor)(
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          LODWORD(v36),
          LODWORD(v35));
        v27 = 0.5;
      }
      if ( v1->m_pkAttendRewardWin )
      {
        v37 = v27;
        v38 = v27;
        ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v1->m_pkAttendRewardWin->vfptr[59].__vecDelDtor)(
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          LODWORD(v38),
          LODWORD(v37));
        v27 = 0.5;
      }
      if ( v1->m_pkWelcomeMsgWin )
      {
        v39 = v27;
        ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v1->m_pkWelcomeMsgWin->vfptr[59].__vecDelDtor)(
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          LODWORD(v39),
          0.2);
        v27 = 0.5;
      }
      v40 = (PgWin *)&v1->m_pkGambleWin->vfptr;
      if ( v40 )
      {
        PgWin::InitPosRightTop(v40, PgWin::ms_uiScreenWidth, PgWin::ms_uiScreenHeight, 1.0, 0.30000001);
        v27 = 0.5;
      }
      v41 = (PgWin *)&v1->m_pkGambleMiniWin->vfptr;
      if ( v41 )
      {
        PgWin::InitPosRightTop(v41, PgWin::ms_uiScreenWidth, PgWin::ms_uiScreenHeight, 0.98000002, 0.30000001);
        v27 = 0.5;
      }
      if ( v1->m_pkGambleDiceGameWin )
      {
        v42 = v27;
        v43 = v27;
        ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v1->m_pkGambleDiceGameWin->vfptr[59].__vecDelDtor)(
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          LODWORD(v43),
          LODWORD(v42));
        v27 = 0.5;
      }
      if ( v1->m_pkDiceGameWin )
      {
        v44 = v27;
        v45 = v27;
        ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v1->m_pkDiceGameWin->vfptr[59].__vecDelDtor)(
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          LODWORD(v45),
          LODWORD(v44));
        v27 = 0.5;
      }
      if ( v1->m_pkSlotMachineWin )
      {
        v46 = v27;
        v47 = v27;
        ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v1->m_pkSlotMachineWin->vfptr[59].__vecDelDtor)(
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          LODWORD(v47),
          LODWORD(v46));
        v27 = 0.5;
      }
      if ( v1->m_pkAutoRunMsgWin )
      {
        v48 = v27;
        ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v1->m_pkAutoRunMsgWin->vfptr[59].__vecDelDtor)(
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          LODWORD(v48),
          0.60000002);
        v27 = 0.5;
      }
      if ( v1->m_pkPlayGuideMinWin )
      {
        ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v1->m_pkPlayGuideMinWin->vfptr[59].__vecDelDtor)(
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          0.89999998,
          0.66000003);
        v27 = 0.5;
      }
      if ( v1->m_pkPlayGuideWin )
      {
        v49 = v27;
        ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v1->m_pkPlayGuideWin->vfptr[59].__vecDelDtor)(
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          1.0,
          LODWORD(v49));
      }
    }
    else
    {
      MachineOpt::SetWinPostion((PgWin *)&v1->m_pkStatusWin->vfptr);
      MachineOpt::SetWinPostion((PgWin *)&v1->m_pkShortCutWin->vfptr);
      MachineOpt::SetWinPostion((PgWin *)&v1->m_pkShortCutWinV->vfptr);
      v50 = (PgWin **)v1->m_pkShortCutSubWinV;
      v51 = 4;
      do
      {
        MachineOpt::SetWinPostion(*(v50 - 5));
        MachineOpt::SetWinPostion(*v50);
        ++v50;
        --v51;
      }
      while ( v51 );
      MachineOpt::SetWinPostion((PgWin *)&v1->m_pkChatDisplayWin->vfptr);
    }
    MachineOpt::SetWinPostion((PgWin *)&v1->m_pkTOTWin->vfptr);
  }
  else
  {
    MachineOpt::SetWinPostion((PgWin *)&v1->m_pkStatusWin->vfptr);
    MachineOpt::SetWinPostion((PgWin *)&v1->m_pkShortCutWin->vfptr);
    MachineOpt::SetWinPostion((PgWin *)&v1->m_pkShortCutWinV->vfptr);
    v3 = (PgWin **)v1->m_pkShortCutSubWinV;
    v4 = 4;
    do
    {
      MachineOpt::SetWinPostion(*(v3 - 5));
      MachineOpt::SetWinPostion(*v3);
      ++v3;
      --v4;
    }
    while ( v4 );
    MachineOpt::SetWinPostion((PgWin *)&v1->m_pkChatDisplayWin->vfptr);
  }
}
// A8CAFC: using guessed type bool GameFrameWork::ms_bRendererRecreated;
// A8CB00: using guessed type unsigned int GameFrameWork::ms_uiFirstCreateDevice;

//----- (00484A10) --------------------------------------------------------
char GameFrameWork::InitWorld()
{
  PROTO_NC_CHAR_BASE_CMD::LoginLocation *v1; // esi@1
  Name3 *v2; // eax@1
  PROTO_NC_CHAR_BASE_CMD::LoginLocation *v3; // eax@4
  PROTO_NC_CHAR_BASE_CMD::LoginLocation *v4; // eax@4
  MapInfo *v5; // eax@4
  PROTO_NC_CHAR_BASE_CMD::LoginLocation *v6; // eax@6
  MapViewInfo *v7; // eax@6
  MapViewInfo *v8; // esi@6
  float fMax; // ST00_4@11
  SoundGroupAmbient *v11; // esi@13
  PROTO_NC_CHAR_BASE_CMD::LoginLocation *v12; // eax@13
  char acMapName[13]; // [sp+Ch] [bp-14h]@1

  v1 = User::GetMainCharLoginMapName(&g_kUser);
  v2 = World::GetMapName(&g_kWorld, (Name3 *)acMapName);
  if ( v2->n3_code[0] == v1->currentmap.n3_code[0]
    && v2->n3_code[1] == v1->currentmap.n3_code[1]
    && v2->n3_code[2] == v1->currentmap.n3_code[2] )
  {
    World::LoadMap(&g_kWorld, 1);
    World::RemoveAllChar(&g_kWorld);
  }
  else
  {
    v3 = User::GetMainCharLoginMapName(&g_kUser);
    unk_B25064 = v3->currentmap.n3_code[0];
    unk_B25068 = v3->currentmap.n3_code[1];
    unk_B2506C = v3->currentmap.n3_code[2];
    v4 = User::GetMainCharLoginMapName(&g_kUser);
    v5 = MapInfoTab::GetByMapName(&v4->currentmap);
    if ( v5 )
      g_pkMainChar[1].m_uiSkillActStep = v5->Sight;
    unk_B25074 = v5->KingdomMap;
    World::LoadMap(&g_kWorld, 0);
    v6 = User::GetMainCharLoginMapName(&g_kUser);
    v7 = MapViewInfoTab::GetByMapName(&v6->currentmap);
    v8 = v7;
    if ( !v7 )
    {
      User::GetMainCharLoginMapName(&g_kUser);
      return 0;
    }
    if ( v7->MinimapView )
      World::LoadMiniMap(&g_kWorld);
    else
      World::LoadEmptyMiniMap(&g_kWorld);
    fMax = (double)v8->ZoomMax;
    World::SetCameraZoomMax(&g_kWorld, fMax);
  }
  v11 = g_kSoundMgr.m_pkAmbientGroup;
  v12 = User::GetMainCharLoginMapName(&g_kUser);
  *(_DWORD *)acMapName = v12->currentmap.n3_code[0];
  *(_DWORD *)&acMapName[4] = v12->currentmap.n3_code[1];
  *(_DWORD *)&acMapName[8] = v12->currentmap.n3_code[2];
  acMapName[12] = 0;
  if ( v11 )
    SoundGroupAmbient::LoadAreaTable(v11, acMapName);
  return 1;
}

//----- (00484B80) --------------------------------------------------------
char __thiscall GameFrameWork::InitCharacter(GameFrameWork *this)
{
  PROTO_NC_CHAR_MAPLOGIN_ACK *v1; // eax@1
  char result; // al@1
  Char *v3; // ebx@2
  signed int v4; // esi@2
  bool v5; // cf@2
  Char *v6; // esi@7
  char v7; // bl@7
  bool (__thiscall *v8)(AbStateInfectee *, ABSTATEINDEX, float, bool); // eax@7
  Tutorial *v9; // eax@10
  Tutorial *v10; // eax@11
  GameFrameWork *v11; // [sp+Ch] [bp-10h]@1

  v11 = this;
  v1 = User::GetMainCharMapLoginData(&g_kUser);
  result = MainChar::Init((MainChar *)g_pkMainChar, v1);
  if ( result )
  {
    World::AttachChar(&g_kWorld, g_pkMainChar);
    v3 = g_pkMainChar;
    v4 = 0;
    v5 = 1;
    do
    {
      if ( v5 && g_kInventory.m_aspEquip[v4].m_pObject )
        CharShape::Equip(&v3->m_kCharShape, (int)v3, g_kInventory.m_aspEquip[v4].m_pObject);
      v5 = (unsigned int)++v4 < 0x1E;
    }
    while ( v4 < 30 );
    v6 = g_pkMainChar;
    v7 = ((int (*)(void))g_pkMainChar->vfptr[1].AddAbStateByAbstateIndex)();
    v8 = v6->vfptr[1].AddAbStateByAbstateIndex;
    v6->m_byMode = 1;
    v6->m_eStandMode = 0;
    if ( v7 != (unsigned __int8)((int (__thiscall *)(Char *))v8)(v6) )
      v6->m_bIsChangeCampMode = 1;
    ((void (*)(void))g_pkMainChar->vfptr[10].DeleteAbStateByAbstateIndex)();
    ((void (__stdcall *)(signed int))g_pkMainChar->vfptr[7].Deaffect)(1);
    Party::Clear(&g_kParty);
    RaidInfo::ClearRaidInfo(&g_kRaidinfo);
    StatusWin::ApplyCharInfo(v11->m_pkStatusWin);
    User::Lv(&g_kUser);
    if ( !Singleton<Tutorial>::m_pInstance )
    {
      v9 = (Tutorial *)operator new(0xB4u);
      if ( v9 )
        Tutorial::Tutorial(v9);
      else
        v10 = 0;
      Singleton<Tutorial>::m_pInstance = v10;
    }
    result = 1;
  }
  return result;
}

//----- (00484CE0) --------------------------------------------------------
char __thiscall GameFrameWork::InitSystem(GameFrameWork *this)
{
  GameFrameWork *v1; // edi@1
  NiCollisionGroup *v2; // eax@1
  int v3; // ebx@1
  NiCollisionGroup *v4; // eax@2
  int v5; // eax@4
  NiAVObject *v6; // esi@4
  int v7; // eax@7

  v1 = this;
  v2 = (NiCollisionGroup *)operator new(0x30u);
  v3 = 0;
  if ( v2 )
    NiCollisionGroup::NiCollisionGroup(v2);
  else
    v4 = 0;
  v1->m_pkCollisionGroup = v4;
  v5 = ((int (*)(void))g_pkMainChar->vfptr[21].Deaffect)();
  v6 = (NiAVObject *)v5;
  if ( v5 )
  {
    if ( *(_DWORD *)(v5 + 188) > 0u )
      v3 = **(_DWORD **)(v5 + 180);
    NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)(v3 + 176));
    v7 = *(_DWORD *)(v3 + 172);
    *(_DWORD *)(v7 + 56) = GameFrameWork::CollisionCallback;
    *(_DWORD *)(v7 + 60) = (char *)v1 + 2340;
    NiCollisionGroup::AddCollider(v1->m_pkCollisionGroup, v6, 0, -1, 1);
  }
  NiCollisionGroup::AddCollidee(v1->m_pkCollisionGroup, pkObject, 0, -1, 1);
  return 1;
}

//----- (00484DC0) --------------------------------------------------------
void __thiscall GameFrameWork::TerminateWindow(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  PgWin **v2; // ebx@37
  PgWin *v3; // ST00_4@100
  PgWin *v4; // eax@215
  PgWin **v5; // ebx@271
  NiTListItem<PgWin *> **v6; // ebx@289
  NiTListItem<PgWin *> *v7; // ST00_4@290
  PgWin **v8; // ebx@311
  unsigned int v9; // ebx@315
  CollectWin *v10; // edx@316
  signed int v11; // [sp+8h] [bp-4h]@37
  signed int v12; // [sp+8h] [bp-4h]@271
  signed int v13; // [sp+8h] [bp-4h]@311

  v1 = this;
  std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,unsigned short>>,0>>::clear((std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&this->m_setEscapeHide);
  PgWinMgr::CloseAllWin(&Pgg_kWinMgr);
  IconWin::ClearRegisteredCoolTime();
  if ( v1->m_pkEventFriendWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkEventFriendWin->vfptr);
    v1->m_pkEventFriendWin = 0;
  }
  if ( v1->m_pkMainCharHPBarWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMainCharHPBarWin->vfptr);
    v1->m_pkMainCharHPBarWin = 0;
  }
  if ( v1->m_pkTargetCharHPBarWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkTargetCharHPBarWin->vfptr);
    v1->m_pkTargetCharHPBarWin = 0;
  }
  if ( g_pkToolTipWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, g_pkToolTipWin);
    g_pkToolTipWin = 0;
  }
  if ( g_pkItemInfoWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&g_pkItemInfoWin->vfptr);
    g_pkItemInfoWin = 0;
  }
  if ( g_pkSkillInfoWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, g_pkSkillInfoWin);
    g_pkSkillInfoWin = 0;
  }
  if ( g_pkSoulStoneInfoWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, g_pkSoulStoneInfoWin);
    g_pkSoulStoneInfoWin = 0;
  }
  if ( v1->m_pkStatusWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkStatusWin->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkStatusWin->vfptr);
    v1->m_pkStatusWin = 0;
  }
  if ( v1->m_pkRidePetWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkRidePetWin->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkRidePetWin->vfptr);
    v1->m_pkRidePetWin = 0;
  }
  if ( v1->m_pkGuildWarStateWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkGuildWarStateWin->vfptr);
    v1->m_pkGuildWarStateWin = 0;
  }
  if ( v1->m_pkItemUpgradeWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkItemUpgradeWin->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkItemUpgradeWin->vfptr);
    v1->m_pkItemUpgradeWin = 0;
  }
  if ( v1->m_pkMoverUpgradeWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkMoverUpgradeWin->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMoverUpgradeWin->vfptr);
    v1->m_pkMoverUpgradeWin = 0;
  }
  if ( v1->m_pkItemMixWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkItemMixWin->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkItemMixWin->vfptr);
    v1->m_pkItemMixWin = 0;
  }
  if ( v1->m_pkItemLinkInfoWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkItemLinkInfoWin->vfptr);
    v1->m_pkItemLinkInfoWin = 0;
  }
  if ( v1->m_pkTargetWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkTargetWin->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkTargetWin->vfptr);
    v1->m_pkTargetWin = 0;
  }
  if ( v1->m_pkMiniMapWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMiniMapWin->vfptr);
    v1->m_pkMiniMapWin = 0;
  }
  if ( v1->m_pkShortCutWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkShortCutWin->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkShortCutWin->vfptr);
    v1->m_pkShortCutWin = 0;
  }
  if ( v1->m_pkShortCutWinV )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkShortCutWinV->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkShortCutWinV->vfptr);
    v1->m_pkShortCutWinV = 0;
  }
  v2 = (PgWin **)v1->m_pkShortCutSubWinV;
  v11 = 4;
  do
  {
    if ( *(v2 - 5) )
    {
      MachineOpt::RegistereWinPostion(*(v2 - 5));
      PgWinMgr::DestroyWin(&Pgg_kWinMgr, *(v2 - 5));
      *(v2 - 5) = 0;
    }
    if ( *v2 )
    {
      MachineOpt::RegistereWinPostion(*v2);
      PgWinMgr::DestroyWin(&Pgg_kWinMgr, *v2);
      *v2 = 0;
    }
    ++v2;
    --v11;
  }
  while ( v11 );
  if ( v1->m_pkMainMenuWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMainMenuWin->vfptr);
    v1->m_pkMainMenuWin = 0;
  }
  if ( v1->m_pkChatDisplayWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkChatDisplayWin->vfptr);
    v1->m_pkChatDisplayWin = 0;
  }
  if ( v1->m_pkSysMsgDisplayWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkSysMsgDisplayWin->vfptr);
    v1->m_pkSysMsgDisplayWin = 0;
  }
  if ( v1->m_pkCharInfoWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkCharInfoWin->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkCharInfoWin->vfptr);
    v1->m_pkCharInfoWin = 0;
  }
  if ( v1->m_pkStatusBuffWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkStatusBuffWin->vfptr);
    v1->m_pkStatusBuffWin = 0;
  }
  if ( v1->m_pkStatusDBuffWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkStatusDBuffWin->vfptr);
    v1->m_pkStatusDBuffWin = 0;
  }
  if ( v1->m_pkStatusChargedBuffWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkStatusChargedBuffWin->vfptr);
    v1->m_pkStatusChargedBuffWin = 0;
  }
  if ( v1->m_pkPrivateStoreWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkPrivateStoreWin->vfptr);
    v1->m_pkPrivateStoreWin = 0;
  }
  if ( v1->m_pkInventoryWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkInventoryWin->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkInventoryWin->vfptr);
    v1->m_pkInventoryWin = 0;
  }
  if ( v1->m_pkMiniHouseInventoryWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkMiniHouseInventoryWin->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMiniHouseInventoryWin->vfptr);
    v1->m_pkMiniHouseInventoryWin = 0;
  }
  if ( v1->m_pkSkillWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkSkillWin->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkSkillWin->vfptr);
    v1->m_pkSkillWin = 0;
  }
  if ( v1->m_pkActionWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkActionWin->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkActionWin->vfptr);
    v1->m_pkActionWin = 0;
  }
  if ( v1->m_pkKingDomQuest )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkKingDomQuest->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkKingDomQuest->vfptr);
    v1->m_pkKingDomQuest = 0;
  }
  if ( v1->m_pkQuestWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkQuestWin->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkQuestWin->vfptr);
    v1->m_pkQuestWin = 0;
    v1->m_pkRewardWin = 0;
  }
  if ( v1->m_pkQuestFinishWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkQuestFinishWin->vfptr);
    v1->m_pkQuestFinishWin = 0;
  }
  if ( v1->m_pkShopWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkShopWin->vfptr);
    v1->m_pkShopWin = 0;
  }
  if ( v1->m_pkRoarWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkRoarWin->vfptr);
    v1->m_pkRoarWin = 0;
  }
  if ( v1->m_pkCalculatorWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkCalculatorWin->vfptr);
    v1->m_pkCalculatorWin = 0;
  }
  if ( v1->m_pkKeyRemappingWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkKeyRemappingWin->vfptr);
    v1->m_pkKeyRemappingWin = 0;
  }
  if ( v1->m_pkHelpWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkHelpWin->vfptr);
    v1->m_pkHelpWin = 0;
  }
  if ( v1->m_pkQuestNewsWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkQuestNewsWin->vfptr);
    v1->m_pkQuestNewsWin = 0;
  }
  if ( v1->m_pkForumWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkForumWin->vfptr);
    v1->m_pkForumWin = 0;
  }
  if ( v1->m_pkOptionSoundWin )
    v1->m_pkOptionSoundWin = 0;
  if ( v1->m_pkOptionGraphicWin )
    v1->m_pkOptionGraphicWin = 0;
  if ( v1->m_pkOptionSystemWin )
    v1->m_pkOptionSystemWin = 0;
  if ( v1->m_pkOptionWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkOptionWin->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkOptionWin->vfptr);
    v1->m_pkOptionWin = 0;
  }
  if ( v1->m_pkPMWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkPMWin->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkPMWin->vfptr);
    v1->m_pkPMWin = 0;
  }
  if ( v1->m_pkWeddingInfoWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkWeddingInfoWin->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkWeddingInfoWin->vfptr);
    v1->m_pkWeddingInfoWin = 0;
  }
  if ( v1->m_pkHolyPromiseWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkHolyPromiseWin->vfptr);
    HolyPromiseWin::Terminate(v1->m_pkHolyPromiseWin);
    v3 = (PgWin *)&v1->m_pkHolyPromiseWin->vfptr;
    v1->m_uiInsertNum = 0;
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, v3);
    v1->m_pkHolyPromiseWin = 0;
  }
  if ( v1->m_pkHolyPromiseAddWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkHolyPromiseAddWin->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkHolyPromiseAddWin->vfptr);
    v1->m_pkHolyPromiseAddWin = 0;
  }
  if ( v1->m_pkFriendWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkFriendWin->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkFriendWin->vfptr);
    v1->m_pkFriendWin = 0;
  }
  if ( v1->m_pkFriendAddWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkFriendAddWin->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkFriendAddWin->vfptr);
    v1->m_pkFriendAddWin = 0;
  }
  if ( v1->m_pkGuildWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkGuildWin->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkGuildWin->vfptr);
    v1->m_pkGuildWin = 0;
  }
  if ( v1->m_pkGuildAcademyWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkGuildAcademyWin->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkGuildAcademyWin->vfptr);
    v1->m_pkGuildAcademyWin = 0;
  }
  if ( v1->m_pkPopupMenuWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkPopupMenuWin->vfptr);
    v1->m_pkPopupMenuWin = 0;
  }
  if ( v1->m_pkDesktopWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkDesktopWin->vfptr);
    v1->m_pkDesktopWin = 0;
  }
  if ( v1->m_pkWaitingForLogoutWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkWaitingForLogoutWin->vfptr);
    v1->m_pkWaitingForLogoutWin = 0;
  }
  if ( v1->m_pkMiniHouseMenuWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkMiniHouseMenuWin->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMiniHouseMenuWin->vfptr);
    v1->m_pkMiniHouseMenuWin = 0;
  }
  if ( v1->m_pkSystemWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkSystemWin->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkSystemWin->vfptr);
    v1->m_pkSystemWin = 0;
  }
  if ( v1->m_pkDivideWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkDivideWin->vfptr);
    v1->m_pkDivideWin = 0;
  }
  if ( v1->m_pkInputTextWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkInputTextWin->vfptr);
    v1->m_pkInputTextWin = 0;
  }
  if ( v1->m_pkMoneyWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMoneyWin->vfptr);
    v1->m_pkMoneyWin = 0;
  }
  if ( v1->m_pkHolyRewardMoneyWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkHolyRewardMoneyWin->vfptr);
    v1->m_pkHolyRewardMoneyWin = 0;
  }
  if ( v1->m_pkDiceRewardMoneyWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkDiceRewardMoneyWin->vfptr);
    v1->m_pkDiceRewardMoneyWin = 0;
  }
  if ( v1->m_pkDiceExpectMoneyWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkDiceExpectMoneyWin->vfptr);
    v1->m_pkDiceExpectMoneyWin = 0;
  }
  if ( v1->m_pkDiceGameWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkDiceGameWin->vfptr);
    v1->m_pkDiceGameWin = 0;
  }
  if ( v1->m_pkDiceGameMinimizeWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkDiceGameMinimizeWin->vfptr);
    v1->m_pkDiceGameMinimizeWin = 0;
  }
  if ( v1->m_pkDiceGameHelpWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkDiceGameHelpWin->vfptr);
    v1->m_pkDiceGameHelpWin = 0;
  }
  if ( v1->m_pkDiceExpectMoneyWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkDiceGameRankWin->vfptr);
    v1->m_pkDiceGameRankWin = 0;
    if ( v1->m_pkDiceExpectMoneyWin )
    {
      PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkDiceGameRateSheetWin->vfptr);
      v1->m_pkDiceGameRateSheetWin = 0;
      if ( v1->m_pkDiceExpectMoneyWin )
      {
        PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkDiceGameNpcDlgWin->vfptr);
        v1->m_pkDiceGameNpcDlgWin = 0;
      }
    }
  }
  if ( v1->m_pkGambleWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkGambleWin->vfptr);
    v1->m_pkGambleWin = 0;
  }
  if ( v1->m_pkGambleMiniWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkGambleMiniWin->vfptr);
    v1->m_pkGambleMiniWin = 0;
  }
  if ( v1->m_pkCoinExchangeWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkCoinExchangeWin->vfptr);
    v1->m_pkCoinExchangeWin = 0;
  }
  if ( v1->m_pkGambleHouseCardWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkGambleHouseCardWin->vfptr);
    v1->m_pkGambleHouseCardWin = 0;
  }
  if ( v1->m_pkGambleDiceGameWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkGambleDiceGameWin->vfptr);
    v1->m_pkGambleDiceGameWin = 0;
  }
  if ( v1->m_pkSlotMachineWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkSlotMachineWin->vfptr);
    v1->m_pkSlotMachineWin = 0;
  }
  if ( v1->m_pkGBSlotHelpWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkGBSlotHelpWin->vfptr);
    v1->m_pkGBSlotHelpWin = 0;
  }
  if ( v1->m_pkGBSlotRankWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkGBSlotRankWin->vfptr);
    v1->m_pkGBSlotRankWin = 0;
  }
  if ( v1->m_pkMiniSlotMachineWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMiniSlotMachineWin->vfptr);
    v1->m_pkMiniSlotMachineWin = 0;
  }
  if ( v1->m_pkItemMallMenuWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkItemMallMenuWin->vfptr);
    v1->m_pkItemMallMenuWin = 0;
  }
  PartyWinInterface::Destory(v1->m_pkPartyWinInterface);
  if ( v1->m_pkItemShopWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkItemShopWin->vfptr);
    v1->m_pkItemShopWin = 0;
  }
  if ( v1->m_pkUserTradeWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkUserTradeWin->vfptr);
    v1->m_pkUserTradeWin = 0;
  }
  if ( v1->m_pkNPCSkillWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkNPCSkillWin->vfptr);
    v1->m_pkNPCSkillWin = 0;
  }
  if ( v1->m_pkNPCSoulWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkNPCSoulWin->vfptr);
    v1->m_pkNPCSoulWin = 0;
  }
  if ( v1->m_pkNpcDlgWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkNpcDlgWin->vfptr);
    v1->m_pkNpcDlgWin = 0;
  }
  if ( v1->m_pkEnchantGemWin1 )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkEnchantGemWin1->vfptr);
    v1->m_pkEnchantGemWin1 = 0;
  }
  if ( v1->m_pkEnchantGemWin2 )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkEnchantGemWin2->vfptr);
    v1->m_pkEnchantGemWin2 = 0;
  }
  if ( v1->m_pkEnchantGemWin3 )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkEnchantGemWin3->vfptr);
    v1->m_pkEnchantGemWin3 = 0;
  }
  if ( v1->m_pkEnchantGemDeleteWin1 )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkEnchantGemDeleteWin1->vfptr);
    v1->m_pkEnchantGemDeleteWin1 = 0;
  }
  if ( v1->m_pkEnchantGemDeleteWin2 )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkEnchantGemDeleteWin2->vfptr);
    v1->m_pkEnchantGemDeleteWin2 = 0;
  }
  if ( v1->m_pkEnchantGemDeleteWin3 )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkEnchantGemDeleteWin3->vfptr);
    v1->m_pkEnchantGemDeleteWin3 = 0;
  }
  if ( v1->m_pkEnchantGemToolTipWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkEnchantGemToolTipWin->vfptr);
    v1->m_pkEnchantGemToolTipWin = 0;
  }
  if ( v1->m_pkWeaponTitleWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkWeaponTitleWin->vfptr);
    v1->m_pkWeaponTitleWin = 0;
  }
  if ( v1->m_pkWeaponTitleDeleteWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkWeaponTitleDeleteWin->vfptr);
    v1->m_pkWeaponTitleDeleteWin = 0;
  }
  if ( v1->m_pkFriendCallWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkFriendCallWin->vfptr);
    v1->m_pkFriendCallWin = 0;
  }
  if ( v1->m_pkChargedItemListWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkChargedItemListWin->vfptr);
    v1->m_pkChargedItemListWin = 0;
  }
  if ( v1->m_pkItemShopWin2 )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkItemShopWin2->vfptr);
    v1->m_pkItemShopWin2 = 0;
  }
  if ( v1->m_pkServerMenuWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkServerMenuWin->vfptr);
    v1->m_pkServerMenuWin = 0;
  }
  if ( v1->m_pkReviveMenuWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkReviveMenuWin->vfptr);
    v1->m_pkReviveMenuWin = 0;
  }
  if ( v1->m_pkRebirthMenuWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkRebirthMenuWin->vfptr);
    v1->m_pkRebirthMenuWin = 0;
  }
  if ( v1->m_pkStorageWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkStorageWin->vfptr);
    v1->m_pkStorageWin = 0;
  }
  if ( v1->m_pkCastingProgressBar )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkCastingProgressBar->vfptr);
    v1->m_pkCastingProgressBar = 0;
  }
  if ( v1->m_pkAnnounceWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkAnnounceWin->vfptr);
    v1->m_pkAnnounceWin = 0;
  }
  if ( v1->m_pkRemainAnnounceWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkRemainAnnounceWin->vfptr);
    v1->m_pkRemainAnnounceWin = 0;
  }
  if ( v1->m_pkGuildWarInformWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkGuildWarInformWin->vfptr);
    v1->m_pkGuildWarInformWin = 0;
  }
  if ( v1->m_pkPkKqRankingWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkPkKqRankingWin->vfptr);
    v1->m_pkPkKqRankingWin = 0;
  }
  v4 = ms_pkTestWin;
  if ( ms_pkTestWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, ms_pkTestWin);
    v4 = 0;
    ms_pkTestWin = 0;
  }
  if ( ms_pkTestWin2 )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, v4);
    ms_pkTestWin2 = 0;
  }
  if ( v1->m_pkMainCharSpeechBubbleWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMainCharSpeechBubbleWin->vfptr);
    v1->m_pkMainCharSpeechBubbleWin = 0;
  }
  if ( v1->m_pkKQuestTimeWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkKQuestTimeWin->vfptr);
    v1->m_pkKQuestTimeWin = 0;
  }
  if ( v1->m_pkIDTimeWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkIDTimeWin->vfptr);
    v1->m_pkIDTimeWin = 0;
  }
  if ( v1->m_pkKQPKRealTimeRankWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkKQPKRealTimeRankWin->vfptr);
    v1->m_pkKQPKRealTimeRankWin = 0;
  }
  if ( v1->m_pkPrisonTimeWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkPrisonTimeWin->vfptr);
    v1->m_pkPrisonTimeWin = 0;
  }
  if ( v1->m_pkReportWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkReportWin->vfptr);
    v1->m_pkReportWin = 0;
  }
  if ( v1->m_pkGMPrisonWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkGMPrisonWin->vfptr);
    v1->m_pkGMPrisonWin = 0;
  }
  if ( v1->m_pkGMCommandWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkGMCommandWin->vfptr);
    v1->m_pkGMCommandWin = 0;
  }
  if ( v1->m_pkChatBlockListWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkChatBlockListWin->vfptr);
    v1->m_pkChatBlockListWin = 0;
  }
  if ( v1->m_pkWingStoneWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkWingStoneWin->vfptr);
    v1->m_pkWingStoneWin = 0;
  }
  if ( v1->m_pkWingStoneMapWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkWingStoneMapWin->vfptr);
    v1->m_pkWingStoneMapWin = 0;
  }
  MiniHouseIndoor::ClearUI(&g_kWorld.m_MiniHouseIndoorMode);
  if ( v1->m_pkMHInputPassWordWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMHInputPassWordWin->vfptr);
    v1->m_pkMHInputPassWordWin = 0;
    OutputDebugStringA("Clear m_pkMHInputPassWordWin\n");
  }
  if ( v1->m_pkMHAnnounceWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMHAnnounceWin->vfptr);
    v1->m_pkMHAnnounceWin = 0;
    OutputDebugStringA("Clear m_pkMHAnnounceWin\n");
  }
  if ( v1->m_pkMHEmotionWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMHEmotionWin->vfptr);
    v1->m_pkMHMouseControlWin = 0;
    OutputDebugStringA("Clear m_pkMHJoinWin\n");
  }
  if ( v1->m_pkMHMouseControlWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMHMouseControlWin->vfptr);
    v1->m_pkMHMouseControlWin = 0;
    OutputDebugStringA("Clear m_pkMHJoinWin\n");
  }
  if ( v1->m_pkMHJoinWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMHJoinWin->vfptr);
    v1->m_pkMHJoinWin = 0;
    OutputDebugStringA("Clear m_pkMHJoinWin\n");
  }
  if ( v1->m_pkMHInfoWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMHInfoWin->vfptr);
    v1->m_pkMHInfoWin = 0;
    OutputDebugStringA("Clear m_pkMHInfoWin\n");
  }
  if ( v1->m_pkMHSettingWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMHSettingWin->vfptr);
    v1->m_pkMHSettingWin = 0;
    OutputDebugStringA("Clear m_pkMHSettingWin\n");
  }
  if ( v1->m_pkMHPortalListWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMHPortalListWin->vfptr);
    v1->m_pkMHPortalListWin = 0;
    OutputDebugStringA("Clear m_pkMHPortalListWin\n");
  }
  if ( v1->m_pkMHGuestBookWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMHGuestBookWin->vfptr);
    v1->m_pkMHGuestBookWin = 0;
    OutputDebugStringA("Clear m_pkMHGuestBookWin\n");
  }
  if ( v1->m_pkMHEditRoomWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMHEditRoomWin->vfptr);
    v1->m_pkMHEditRoomWin = 0;
    OutputDebugStringA("Clear m_pkMHEditRoomWin\n");
  }
  if ( v1->m_pkMHMinimizeWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMHMinimizeWin->vfptr);
    v1->m_pkMHMinimizeWin = 0;
    OutputDebugStringA("Clear m_pkMHMinimizeWin\n");
  }
  if ( v1->m_pkMHRepairWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMHRepairWin->vfptr);
    v1->m_pkMHRepairWin = 0;
    OutputDebugStringA("Clear m_pkMHItemInventoryWin\n");
  }
  PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMakeKarisWin->vfptr);
  v1->m_pkMakeKarisWin = 0;
  if ( v1->m_pkItemRepairWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkItemRepairWin->vfptr);
    v1->m_pkItemRepairWin = 0;
  }
  if ( v1->m_pkMoveBtnWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMoveBtnWin->vfptr);
    v1->m_pkMoveBtnWin = 0;
  }
  if ( v1->m_pkAutoRunMsgWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkAutoRunMsgWin->vfptr);
    v1->m_pkAutoRunMsgWin = 0;
  }
  v5 = (PgWin **)v1->m_pkExpeditionPartyWin;
  v12 = 4;
  do
  {
    if ( *v5 )
    {
      PgWinMgr::DestroyWin(&Pgg_kWinMgr, *v5);
      *v5 = 0;
    }
    ++v5;
    --v12;
  }
  while ( v12 );
  if ( v1->m_pkExpeditionWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkExpeditionWin->vfptr);
    v1->m_pkExpeditionWin = 0;
  }
  if ( v1->m_pkExpeditionMemberAddWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkExpeditionMemberAddWin->vfptr);
    v1->m_pkExpeditionMemberAddWin = 0;
  }
  if ( v1->m_pkExpeditionWarnigMsgWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkExpeditionWarnigMsgWin->vfptr);
    v1->m_pkExpeditionWarnigMsgWin = 0;
  }
  if ( v1->m_pkMysteryVaultWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMysteryVaultWin->vfptr);
    v1->m_pkMysteryVaultWin = 0;
  }
  if ( v1->m_pkMapLinkGateWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMapLinkGateWin->vfptr);
    v1->m_pkMapLinkGateWin = 0;
  }
  if ( v1->m_pkTOTWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkTOTWin->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkTOTWin->vfptr);
    v1->m_pkTOTWin = 0;
  }
  if ( v1->m_pkGTInformWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkGTInformWin->vfptr);
    v1->m_pkGTInformWin = 0;
  }
  PopupMenuTemplate::Terminate();
  v6 = &v1->m_kAutoCloseWinList.m_pkHead->m_pkNext;
  while ( v6 )
  {
    v7 = (NiTListItem<PgWin *> *)v6;
    v6 = (NiTListItem<PgWin *> **)*v6;
    v1->m_kAutoCloseWinList.vfptr->DeleteItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)&v1->m_kAutoCloseWinList, v7);
  }
  v1->m_kAutoCloseWinList.m_kAllocator.m_uiCount = 0;
  v1->m_kAutoCloseWinList.m_pkHead = 0;
  v1->m_kAutoCloseWinList.m_pkTail = 0;
  if ( v1->m_pkRollingDiceMsgWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkRollingDiceMsgWin->vfptr);
    v1->m_pkRollingDiceMsgWin = 0;
  }
  if ( v1->m_pkRollingDiceWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkRollingDiceWin->vfptr);
    v1->m_pkRollingDiceWin = 0;
  }
  if ( v1->m_pkPartyLootSetupWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkPartyLootSetupWin->vfptr);
    v1->m_pkPartyLootSetupWin = 0;
  }
  if ( v1->m_pkGateChannelWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkGateChannelWin->vfptr);
    v1->m_pkGateChannelWin = 0;
  }
  if ( v1->m_pkQuestStartItemWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkQuestStartItemWin->vfptr);
    v1->m_pkQuestStartItemWin = 0;
  }
  if ( v1->m_pkPlayGuideMinWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkPlayGuideMinWin->vfptr);
    v1->m_pkPlayGuideMinWin = 0;
  }
  if ( v1->m_pkPlayGuideWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkPlayGuideWin->vfptr);
    v1->m_pkPlayGuideWin = 0;
  }
  if ( v1->m_pkBasicInfoTipWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkBasicInfoTipWin->vfptr);
    v1->m_pkBasicInfoTipWin = 0;
  }
  if ( v1->m_pkServerTimeWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkServerTimeWin->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkServerTimeWin->vfptr);
    v1->m_pkServerTimeWin = 0;
  }
  if ( v1->m_pkWelcomeMsgWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkWelcomeMsgWin->vfptr);
    v1->m_pkWelcomeMsgWin = 0;
  }
  v8 = (PgWin **)v1->m_pkCollectCardWin;
  v13 = 4;
  do
  {
    if ( *v8 )
      PgWinMgr::DestroyWin(&Pgg_kWinMgr, *v8);
    ++v8;
    --v13;
  }
  while ( v13 );
  v9 = 105;
  do
  {
    v10 = v1->m_pkCollectWin;
    if ( (&v10->vfptr)[v9] )
      PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)(&v10->vfptr)[v9]);
    ++v9;
  }
  while ( v9 < 107 );
  if ( v1->m_pkCollectWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkCollectWin->vfptr);
    v1->m_pkCollectWin = 0;
  }
  if ( v1->m_pkCollectPeepingWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkCollectPeepingWin->vfptr);
    v1->m_pkCollectPeepingWin = 0;
  }
  if ( v1->m_pkAttendIconWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkAttendIconWin->vfptr);
    v1->m_pkAttendIconWin = 0;
  }
  if ( v1->m_pkAttendRewardWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkAttendRewardWin->vfptr);
    v1->m_pkAttendRewardWin = 0;
  }
  if ( v1->m_pkAttendCheckWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkAttendCheckWin->vfptr);
    v1->m_pkAttendCheckWin = 0;
  }
  if ( v1->m_pkFeedMoverWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkFeedMoverWin->vfptr);
    v1->m_pkFeedMoverWin = 0;
  }
  if ( v1->m_pkPetNameEditWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkPetNameEditWin->vfptr);
    v1->m_pkPetNameEditWin = 0;
  }
  if ( v1->m_pkEventRankWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkEventRankWin->vfptr);
    v1->m_pkEventRankWin = 0;
  }
  if ( v1->m_pkEventTimeWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkEventTimeWin->vfptr);
    v1->m_pkEventTimeWin = 0;
  }
  if ( v1->m_pkVoteWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkVoteWin->vfptr);
    v1->m_pkVoteWin = 0;
  }
  if ( v1->m_pkIndunLevelSelectWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkIndunLevelSelectWin->vfptr);
    v1->m_pkIndunLevelSelectWin = 0;
  }
  if ( v1->m_pkIndunLevelMsgWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkIndunLevelMsgWin->vfptr);
    v1->m_pkIndunLevelMsgWin = 0;
  }
  if ( v1->m_pkKQScoreWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkKQScoreWin->vfptr);
    v1->m_pkKQScoreWin = 0;
  }
  if ( v1->m_pkMarketSearchWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMarketSearchWin->vfptr);
    v1->m_pkMarketSearchWin = 0;
  }
  if ( v1->m_pkPuzzleTimeWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkPuzzleTimeWin->vfptr);
    v1->m_pkPuzzleTimeWin = 0;
  }
  if ( v1->m_pkRandomOptionWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkRandomOptionWin->vfptr);
    v1->m_pkRandomOptionWin = 0;
  }
  if ( v1->m_pkTermExtendWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkTermExtendWin->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkTermExtendWin->vfptr);
    v1->m_pkTermExtendWin = 0;
  }
  if ( v1->m_pkMinimonAutoItemUseWin )
  {
    MachineOpt::RegistereWinPostion((PgWin *)&v1->m_pkMinimonAutoItemUseWin->vfptr);
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMinimonAutoItemUseWin->vfptr);
    v1->m_pkMinimonAutoItemUseWin = 0;
  }
  if ( v1->m_pkKDTeamScoreWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkKDTeamScoreWin->vfptr);
    v1->m_pkKDTeamScoreWin = 0;
  }
  if ( v1->m_pkGuildEmblemWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkGuildEmblemWin->vfptr);
    v1->m_pkGuildEmblemWin = 0;
  }
  if ( v1->m_pkIDRankingWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkIDRankingWin->vfptr);
    v1->m_pkIDRankingWin = 0;
  }
  if ( v1->m_pkPartyScoreWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkPartyScoreWin->vfptr);
    v1->m_pkPartyScoreWin = 0;
  }
}
// A8C650: using guessed type struct PgWin *ms_pkTestWin2;

//----- (00486360) --------------------------------------------------------
void __thiscall GameFrameWork::Terminate(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  NiCollisionGroup *v2; // edi@1
  KeyMap *v3; // edi@5
  NiNode *v4; // edi@10
  NiNode *v5; // edi@15
  NiNode *v6; // edi@20
  NiNode *v7; // edi@25
  QuestHelperMgr *v8; // eax@30
  EffectMsg *v9; // edi@30
  LuaScriptMgr *v10; // ecx@32
  LuaScriptMgr *v11; // eax@33
  int v12; // eax@34
  Tutorial *v13; // ecx@37
  Tutorial *v14; // eax@38
  Tutorial *v15; // eax@39
  TextScreenEffect *v16; // ecx@42
  TextScreenEffect *v17; // eax@43
  TextScreenEffect *v18; // eax@44

  v1 = this;
  PgExternalLib::EnableOpenSound(0);
  PgExternalLib::EnableCloseSound(0);
  MachineOpt::Save();
  ICharDeadEvent::TerminateAll();
  ITimer::ClearTimer();
  GuildTask::Terminate();
  WeddingTask::Terminate();
  GuildListTask::Terminate();
  MHDiceGameTask::Terminate();
  GuildAcademyTask::Terminate();
  GuildAcademySelectTask::Terminate();
  ItemRepairTask::Terminate();
  ITask::FinishTaskAll();
  GameFrameWork::TerminateWindow(v1);
  EffectMgr::RemoveAll(&g_kEffectMgr);
  NiCollisionGroup::RemoveAll(v1->m_pkCollisionGroup);
  v2 = v1->m_pkCollisionGroup;
  if ( v2 )
  {
    NiCollisionGroup::~NiCollisionGroup(v1->m_pkCollisionGroup);
    operator delete(v2);
  }
  GameFrameWork::TerminateCharacter(v1, (int)v2);
  if ( g_kSoundMgr.m_pkBGMGroup )
  {
    SoundGroupBgm::SetFadeDurationTime(g_kSoundMgr.m_pkBGMGroup, 0.0);
    SoundMgr::StopBGM(&g_kSoundMgr);
  }
  SoundMgr::StopAllSound(&g_kSoundMgr);
  v3 = v1->m_spKeyMap.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spKeyMap.m_pObject = 0;
  }
  GameFrameWork::TerminateNet(v1);
  Cursor::SetCursor(0);
  PortraitTextureBuffer::Terminate();
  v4 = v1->m_pEffect1.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_pEffect1.m_pObject = 0;
  }
  v5 = v1->m_pEffect2.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_pEffect2.m_pObject = 0;
  }
  v6 = v1->m_pOXEffectO.m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v1->m_pOXEffectO.m_pObject = 0;
  }
  v7 = v1->m_pOXEffectX.m_pObject;
  if ( v7 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v1->m_pOXEffectX.m_pObject = 0;
  }
  CGuildMonster::GetInstance();
  CGuildMonster::ReleaseInstance();
  v8 = QuestHelperMgr::GetInstance();
  QuestHelperMgr::Terminate(v8);
  QuestHelperMgr::GetInstance();
  QuestHelperMgr::ReleaseInstance();
  v9 = v1->m_pkEffectMsg;
  v1->m_bWelcomeMsg = 1;
  if ( v9 )
  {
    EffectMsg::~EffectMsg(v9);
    operator delete(v9);
    v1->m_pkEffectMsg = 0;
  }
  v10 = (LuaScriptMgr *)Singleton<LuaScriptMgr>::m_pInstance;
  if ( !Singleton<LuaScriptMgr>::m_pInstance )
  {
    v11 = (LuaScriptMgr *)operator new(0x14u);
    if ( v11 )
      LuaScriptMgr::LuaScriptMgr(v11);
    else
      v12 = 0;
    v10 = (LuaScriptMgr *)v12;
    Singleton<LuaScriptMgr>::m_pInstance = v12;
  }
  LuaScriptMgr::Terminate(v10);
  v13 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v14 = (Tutorial *)operator new(0xB4u);
    if ( v14 )
      Tutorial::Tutorial(v14);
    else
      v15 = 0;
    v13 = v15;
    Singleton<Tutorial>::m_pInstance = v15;
  }
  Tutorial::Terminate(v13);
  v16 = Singleton<TextScreenEffect>::m_pInstance;
  if ( !Singleton<TextScreenEffect>::m_pInstance )
  {
    v17 = (TextScreenEffect *)operator new(0x28u);
    if ( v17 )
      TextScreenEffect::TextScreenEffect(v17);
    else
      v18 = 0;
    v16 = v18;
    Singleton<TextScreenEffect>::m_pInstance = v18;
  }
  TextScreenEffect::Terminate(v16);
  v1->m_bInit = 0;
  v1->m_BackFrameID = 0;
}
// A89C94: using guessed type int Singleton<LuaScriptMgr>::m_pInstance;

//----- (00486650) --------------------------------------------------------
char __usercall GameFrameWork::InitWindow@<al>(GameFrameWork *this@<ecx>, int a2@<ebx>)
{
  GameFrameWork *v2; // esi@1
  MainCharHPBarWin *v3; // eax@1
  MainCharHPBarWin *v4; // eax@1
  NiSourceTexture *v5; // eax@2
  NiSourceTexture *v6; // eax@4
  NiSourceTexture *v7; // eax@6
  NiSourceTexture *v8; // eax@8
  PkRealTiemRankWin *v9; // eax@9
  StatusWin *v10; // eax@9
  unsigned int v11; // edi@9
  unsigned int v12; // eax@9
  PgWinBar *v13; // ecx@9
  unsigned int v14; // edi@9
  unsigned int v15; // eax@9
  PgWinBar *v16; // ecx@9
  unsigned int v17; // edi@9
  unsigned int v18; // eax@9
  PgWinBar *v19; // ecx@9
  ItemUpgradeWin *v20; // eax@9
  NiSourceTexture *v21; // eax@9
  ItemInfoWin *v22; // eax@9
  char result; // al@9
  TargetWin *v24; // eax@10
  MiniMapWin *v25; // eax@10
  ShortCutWin *v26; // eax@10
  int v27; // edi@10
  NiObjectNET **v28; // ebx@10
  MainMenuWin *v29; // eax@12
  signed int v30; // edi@12
  SysMsgDisplayWin *v31; // eax@14
  EnchantGemToolTipWin *v32; // eax@14
  StatusBuffWin *v33; // eax@14
  StatusBuffWin *v34; // eax@14
  StatusBuffWin *v35; // eax@14
  MiniHouseInventoryWin *v36; // eax@14
  InventoryWin *v37; // ecx@14
  IDTimeWin *v38; // eax@14
  PartyWinInterface *v39; // ecx@14
  OptionGraphicWin *v40; // eax@14
  OptionBaseWin *v41; // ecx@14
  OptionSystemWin *v42; // eax@14
  OptionBaseWin *v43; // edx@14
  OptionSoundWin *v44; // eax@14
  OptionBaseWin *v45; // ecx@14
  RewardWin *v46; // eax@14
  CQuestWin2 *v47; // ecx@15
  NiSourceTexture *v48; // eax@17
  DesktopWin *v49; // eax@17
  CastingProgressWin *v50; // eax@17
  AnnounceWin *v51; // eax@17
  GuildWarInformWin *v52; // eax@17
  AnnounceWin *v53; // eax@17
  QuestFinishWin *v54; // eax@19
  char *v55; // ecx@21
  int *v56; // edx@21
  unsigned int v57; // eax@21
  int v58; // edi@22
  int v59; // eax@23
  unsigned int v60; // ecx@27
  unsigned int v61; // ecx@29
  int v62; // edx@34
  signed int v63; // edi@38
  unsigned int v64; // eax@38
  char *v65; // eax@40
  BasicInfoTipWin *v66; // eax@42
  ExpeditionPartyWin **v67; // ebx@44
  MsgBox *v68; // edi@48
  mhInputPassWordWin *v69; // eax@53
  mhRepairObjWin *v70; // eax@56
  mhInfoWin *v71; // ecx@59
  PrisonTimeWin *v72; // ecx@63
  MapLinkGateWin *v73; // edi@65
  int v74; // ebx@65
  int v75; // eax@65
  _DWORD *v76; // ecx@65
  MakeKarisWin *v77; // edi@68
  int v78; // eax@68
  _DWORD *v79; // ecx@68
  TargetOfTheTargetWin *v80; // eax@71
  NiTListItem<PgWin *> *v81; // eax@72
  StatusWin *v82; // STE4_4@73
  int v83; // eax@73
  _DWORD *v84; // ecx@73
  MiniMapWin *v85; // STE4_4@76
  int v86; // eax@76
  _DWORD *v87; // ecx@76
  ChatDisplayWin2 *v88; // STE4_4@79
  int v89; // eax@79
  _DWORD *v90; // ecx@79
  TargetWin *v91; // STE4_4@82
  int v92; // eax@82
  _DWORD *v93; // ecx@82
  ShortCutWin *v94; // STE4_4@85
  int v95; // eax@85
  _DWORD *v96; // ecx@85
  MainMenuWin *v97; // STE4_4@88
  int v98; // eax@88
  _DWORD *v99; // ecx@88
  TargetOfTheTargetWin *v100; // STE4_4@91
  int v101; // eax@91
  _DWORD *v102; // ecx@91
  GTInformWin *v103; // STE4_4@94
  int v104; // eax@94
  _DWORD *v105; // ecx@94
  MysteryVaultWin *v106; // STE4_4@97
  int v107; // eax@97
  _DWORD *v108; // ecx@97
  PlayGuideMinWin *v109; // STE4_4@100
  int v110; // eax@100
  _DWORD *v111; // ecx@100
  ShortCutWin *v112; // STE4_4@103
  int v113; // eax@103
  _DWORD *v114; // ecx@103
  ShortCutWin *v115; // STE4_4@106
  int v116; // eax@106
  _DWORD *v117; // ecx@106
  QuestNewsWin *v118; // STE4_4@109
  int v119; // eax@109
  _DWORD *v120; // ecx@109
  ShortCutWin *v121; // STE8_4@113
  int v122; // eax@113
  _DWORD *v123; // ecx@113
  ShortCutWin *v124; // STE8_4@118
  int v125; // eax@118
  _DWORD *v126; // ecx@118
  SysMsgDisplayWin *v127; // STE8_4@122
  int v128; // eax@122
  _DWORD *v129; // ecx@122
  StatusBuffWin *v130; // STE8_4@125
  int v131; // eax@125
  _DWORD *v132; // ecx@125
  StatusBuffWin *v133; // STE8_4@128
  int v134; // eax@128
  _DWORD *v135; // ecx@128
  StatusBuffWin *v136; // STE8_4@131
  int v137; // eax@131
  _DWORD *v138; // ecx@131
  ServerTimeWin *v139; // eax@134
  ServerTimeWin *v140; // STE8_4@134
  int v141; // eax@134
  _DWORD *v142; // ecx@134
  AttendIconWin *v143; // eax@137
  AttendIconWin *v144; // STE8_4@137
  int v145; // eax@137
  _DWORD *v146; // ecx@137
  AnnounceWin *v147; // eax@140
  PgFont *v148; // eax@140
  bool v149; // zf@141
  AttendIconWin *v150; // eax@142
  KDTeamScoreWin *v151; // eax@144
  NiTListItem<PgWin *> **v152; // eax@147
  ClassChangeWin *v153; // STE8_4@148
  int v154; // eax@148
  _DWORD *v155; // ecx@148
  ItemUpgradeWin *v156; // STE8_4@151
  int v157; // eax@151
  _DWORD *v158; // ecx@151
  MoverUpgradeWin *v159; // STE8_4@154
  int v160; // eax@154
  _DWORD *v161; // ecx@154
  ItemMixWin *v162; // STE8_4@157
  int v163; // eax@157
  _DWORD *v164; // ecx@157
  ItemShopWin *v165; // STE8_4@160
  int v166; // eax@160
  _DWORD *v167; // ecx@160
  NPCSkillWin *v168; // STE8_4@163
  int v169; // eax@163
  _DWORD *v170; // ecx@163
  NPCSoulWin *v171; // STE8_4@166
  int v172; // eax@166
  _DWORD *v173; // ecx@166
  StorageWin *v174; // STE8_4@169
  int v175; // eax@169
  _DWORD *v176; // ecx@169
  NPCItemWin *v177; // STE8_4@172
  int v178; // eax@172
  _DWORD *v179; // ecx@172
  RandomOptionWin *v180; // STE8_4@175
  int v181; // eax@175
  _DWORD *v182; // ecx@175
  ItemUpgradeMsgWin *v183; // STE8_4@178
  int v184; // eax@178
  _DWORD *v185; // ecx@178
  MapLinkGateWin *v186; // STE8_4@181
  int v187; // eax@181
  _DWORD *v188; // ecx@181
  MinimonAutoItemUseWin *v189; // STE8_4@184
  int v190; // eax@184
  _DWORD *v191; // ecx@184
  NpcDialogWin *v192; // STE8_4@187
  int v193; // eax@187
  _DWORD *v194; // ecx@187
  IDRankingWin *v195; // STE8_4@190
  int v196; // eax@190
  _DWORD *v197; // ecx@190
  EventRankWin *v198; // STE8_4@193
  int v199; // eax@193
  _DWORD *v200; // ecx@193
  EventRankWin *v201; // edi@196
  int v202; // eax@196
  _DWORD *v203; // ecx@196
  TermExtendWin *v204; // edi@199
  int v205; // eax@199
  _DWORD *v206; // ecx@199
  MinimonAutoItemUseWin *v207; // esi@202
  int v208; // eax@202
  int *v209; // ecx@202
  float fCycle; // [sp+E0h] [bp-110h]@40
  NiTListItem<PgWin *> **fCyclea; // [sp+E0h] [bp-110h]@71
  ShortCutWin **fCycleb; // [sp+E0h] [bp-110h]@112
  ShortCutWin **fCyclec; // [sp+E0h] [bp-110h]@117
  float fCycled; // [sp+E0h] [bp-110h]@140
  NiTListItem<PgWin *> **fCyclee; // [sp+E0h] [bp-110h]@146
  signed int v216; // [sp+E4h] [bp-10Ch]@112
  signed int v217; // [sp+E4h] [bp-10Ch]@117
  CollectCardWin **v218; // [sp+E4h] [bp-10Ch]@140
  char shortCutSubWinName[255]; // [sp+ECh] [bp-104h]@11

  v2 = this;
  memset(this->m_chatLog, 0, 0x800u);
  v3 = MainCharHPBarWin::CreateWin();
  v2->m_pkMainCharHPBarWin = v3;
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
  v4 = MainCharHPBarWin::CreateWin();
  v2->m_pkTargetCharHPBarWin = v4;
  v4->m_bIsMainCharHPBarWin = 0;
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkTargetCharHPBarWin->vfptr);
  if ( !g_pkToolTipWin )
  {
    v5 = MenuTexMgr::GetTexture(1u);
    g_pkToolTipWin = (PgWin *)ToolTipWin::CreateWin(v5, 7u, 7u);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, g_pkToolTipWin);
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[60].__vecDelDtor)(0);
  }
  if ( !g_pkItemInfoWin )
  {
    v6 = MenuTexMgr::GetTexture(1u);
    g_pkItemInfoWin = ItemInfoWin::CreateWin(v6, 7u, 7u);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&g_pkItemInfoWin->vfptr);
    ((void (__stdcall *)(_DWORD))g_pkItemInfoWin->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))g_pkItemInfoWin->vfptr[60].__vecDelDtor)(0);
  }
  if ( !g_pkSkillInfoWin )
  {
    v7 = MenuTexMgr::GetTexture(1u);
    g_pkSkillInfoWin = (PgWin *)SkillInfoWin::CreateWin(v7, 7u, 7u);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, g_pkSkillInfoWin);
    ((void (__stdcall *)(_DWORD))g_pkSkillInfoWin->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))g_pkSkillInfoWin->vfptr[60].__vecDelDtor)(0);
  }
  if ( !g_pkSoulStoneInfoWin )
  {
    v8 = MenuTexMgr::GetTexture(1u);
    g_pkSoulStoneInfoWin = (PgWin *)SoulStoneInfoWin::CreateWin(v8, 7u, 7u);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, g_pkSoulStoneInfoWin);
    ((void (__stdcall *)(_DWORD))g_pkSoulStoneInfoWin->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))g_pkSoulStoneInfoWin->vfptr[60].__vecDelDtor)(0);
  }
  v9 = PkRealTiemRankWin::CreateWin((PgFrameWork *)&v2->vfptr);
  v2->m_pkKQPKRealTimeRankWin = v9;
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v9->vfptr);
  ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v2->m_pkKQPKRealTimeRankWin->vfptr[59].__vecDelDtor)(
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.89999998,
    0.5);
  ((void (__stdcall *)(_DWORD))v2->m_pkKQPKRealTimeRankWin->vfptr[64].__vecDelDtor)(0);
  v10 = StatusWin::CreateWin((PgFrameWork *)&v2->vfptr);
  v2->m_pkStatusWin = v10;
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v10->vfptr);
  v11 = ((int (*)(void))g_pkMainChar->vfptr[2].~AbStateInfectee)();
  v12 = ((int (*)(void))g_pkMainChar->vfptr[3].Deaffect)();
  v13 = v2->m_pkStatusWin->m_pkHPGauge_kr;
  v13->m_fCurValue = (double)v11;
  v13->m_fMaxValue = (double)v12;
  PgWinBar::OnChangeValue(v13);
  v14 = ((int (*)(void))g_pkMainChar->vfptr[3].SetAbStateProperty)();
  v15 = ((int (*)(void))g_pkMainChar->vfptr[3].IsVisible)();
  v16 = v2->m_pkStatusWin->m_pkSPGauge_kr;
  v16->m_fCurValue = (double)v14;
  v16->m_fMaxValue = (double)v15;
  PgWinBar::OnChangeValue(v16);
  ((void (__stdcall *)(signed int))v2->m_pkStatusWin->vfptr[130].__vecDelDtor)(1);
  ((void (__stdcall *)(signed int))v2->m_pkStatusWin->vfptr[60].__vecDelDtor)(1);
  v17 = ((int (*)(void))g_pkMainChar->vfptr[3].GetAbstateColor)();
  v18 = ((int (*)(void))g_pkMainChar->vfptr[3].~AbStateInfectee)();
  v19 = v2->m_pkStatusWin->m_pkLPGauge_kr;
  v19->m_fCurValue = (double)v17;
  v19->m_fMaxValue = (double)v18;
  PgWinBar::OnChangeValue(v19);
  v20 = ItemUpgradeWin::CreateWin((PgFrameWork *)&v2->vfptr);
  v2->m_pkItemUpgradeWin = v20;
  v2->m_pkItemUpgradeMsgWin = v20->m_pkItemUpgradeMsgWin;
  v2->m_pkMoverUpgradeWin = MoverUpgradeWin::CreateWin((PgFrameWork *)&v2->vfptr);
  v2->m_pkItemMixWin = ItemMixWin::CreateWin((PgFrameWork *)&v2->vfptr);
  v21 = MenuTexMgr::GetTexture(1u);
  v22 = ItemInfoWin::CreateWin(v21, 7u, 7u);
  v2->m_pkItemLinkInfoWin = v22;
  result = ItemInfoWin::CreateCloseButton(v22);
  if ( result )
  {
    v24 = TargetWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkTargetWin = v24;
    ((void (__thiscall *)(TargetWin *, signed int, int))v24->vfptr[130].__vecDelDtor)(v24, 1, a2);
    ((void (__stdcall *)(signed int))v2->m_pkTargetWin->vfptr[60].__vecDelDtor)(1);
    v25 = MiniMapWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkMiniMapWin = v25;
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v25->vfptr);
    ((void (__stdcall *)(signed int))v2->m_pkMiniMapWin->vfptr[130].__vecDelDtor)(1);
    ((void (__stdcall *)(signed int))v2->m_pkMiniMapWin->vfptr[60].__vecDelDtor)(1);
    v26 = ShortCutWin::CreateWin((PgFrameWork *)&v2->vfptr, 0);
    v2->m_pkShortCutWin = v26;
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v26->vfptr);
    v2->m_pkShortCutWinV = ShortCutWin::CreateWin((PgFrameWork *)&v2->vfptr, 1);
    v27 = 0;
    v28 = (NiObjectNET **)v2->m_pkShortCutSubWinV;
    do
    {
      *(v28 - 5) = (NiObjectNET *)ShortCutWin::CreateSubWin((PgFrameWork *)&v2->vfptr, 0, v27);
      sprintf(shortCutSubWinName, "ShortCutSubWin%i", v27);
      NiObjectNET::SetName(*(v28 - 5), shortCutSubWinName);
      *v28 = (NiObjectNET *)ShortCutWin::CreateSubWin((PgFrameWork *)&v2->vfptr, 1, v27);
      sprintf(shortCutSubWinName, "ShortCutSubWinV%i", v27);
      NiObjectNET::SetName(*v28, shortCutSubWinName);
      v2->m_bLastShortCutSubWinDirV[v27++] = 0;
      ++v28;
    }
    while ( v27 < 4 );
    GameFrameWork::NowLoadingText(10);
    v29 = MainMenuWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkMainMenuWin = v29;
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v29->vfptr);
    v2->m_pkChatDisplayWin = ChatDisplayWin2::CreateWin((PgFrameWork *)&v2->vfptr);
    v30 = 0;
    do
    {
      ChatDisplayWin2::SetOption(v2->m_pkChatDisplayWin, dword_B4FF76[v30] & 0xFFFFFF7F, v30);
      ++v30;
    }
    while ( v30 < 5 );
    ((void (__stdcall *)(signed int, signed int))v2->m_pkChatDisplayWin->vfptr[95].__vecDelDtor)(27, 1);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkChatDisplayWin->vfptr);
    v31 = SysMsgDisplayWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkSysMsgDisplayWin = v31;
    ChatDisplayWin::SetOption((ChatDisplayWin *)&v31->vfptr, dword_B4FF8A | 0x80);
    ((void (__stdcall *)(signed int, signed int))v2->m_pkSysMsgDisplayWin->vfptr[95].__vecDelDtor)(19, 1);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkSysMsgDisplayWin->vfptr);
    v2->m_pkCharInfoWin = CharInfoWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkInventoryWin = InventoryWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkEnchantGemWin1 = EnchantGemWin::CreateWin((PgFrameWork *)&v2->vfptr, 1u);
    v2->m_pkEnchantGemWin2 = EnchantGemWin::CreateWin((PgFrameWork *)&v2->vfptr, 2u);
    v2->m_pkEnchantGemWin3 = EnchantGemWin::CreateWin((PgFrameWork *)&v2->vfptr, 3u);
    v2->m_pkEnchantGemDeleteWin1 = EnchantGemDeleteWin::CreateWin((PgFrameWork *)&v2->vfptr, 1u);
    v2->m_pkEnchantGemDeleteWin2 = EnchantGemDeleteWin::CreateWin((PgFrameWork *)&v2->vfptr, 2u);
    v2->m_pkEnchantGemDeleteWin3 = EnchantGemDeleteWin::CreateWin((PgFrameWork *)&v2->vfptr, 3u);
    v32 = EnchantGemToolTipWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkEnchantGemToolTipWin = v32;
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v32->vfptr);
    ((void (__stdcall *)(_DWORD))v2->m_pkEnchantGemToolTipWin->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkEnchantGemToolTipWin->vfptr[60].__vecDelDtor)(0);
    v2->m_pkWeaponTitleWin = WeaponTitleWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkWeaponTitleDeleteWin = WeaponTitleDeleteWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v33 = StatusBuffWin::CreateWin((PgFrameWork *)&v2->vfptr, 0);
    v2->m_pkStatusBuffWin = v33;
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v33->vfptr);
    v34 = StatusBuffWin::CreateWin((PgFrameWork *)&v2->vfptr, DBUFF_UI);
    v2->m_pkStatusDBuffWin = v34;
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v34->vfptr);
    v35 = StatusBuffWin::CreateWin((PgFrameWork *)&v2->vfptr, CHARGEDBUFF_UI);
    v2->m_pkStatusChargedBuffWin = v35;
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v35->vfptr);
    GameFrameWork::NowLoadingText(30);
    v36 = MiniHouseInventoryWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v37 = v2->m_pkInventoryWin;
    v2->m_pkMiniHouseInventoryWin = v36;
    InventoryWin::UpdateInventory(v37);
    v2->m_pkSkillWin = SkillWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkSystemWin = SystemWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkMiniHouseMenuWin = MiniHouseMenuWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkPrivateStoreWin = PrivateStoreWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkDivideWin = DivideWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkInputTextWin = InputTextWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkMoneyWin = MoneyWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkHolyRewardMoneyWin = HolyRewardMoneyWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkDiceRewardMoneyWin = MHDiceRewardMoneyWin::CreateWin((PgFrameWork *)&v2->vfptr, 1);
    v2->m_pkDiceExpectMoneyWin = MHDiceRewardMoneyWin::CreateWin((PgFrameWork *)&v2->vfptr, 0);
    v2->m_pkDiceGameWin = MiniHouseDiceGameWin::CreateWin(0);
    v2->m_pkDiceGameMinimizeWin = mhMinimizeDiceGameWin::CreateWin(0);
    v2->m_pkDiceGameHelpWin = mhDiceHelpWin::CreateWin(0);
    v2->m_pkDiceGameRankWin = mhDiceRankWin::CreateWin(0);
    v2->m_pkDiceGameRateSheetWin = mhDiceRateSheetWin::CreateWin(0);
    v2->m_pkDiceGameNpcDlgWin = NpcDialogWin::CreateWin(0, "DiceGameNpcDlgWin", 0);
    v2->m_pkGambleMiniWin = GambleMiniWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkGambleWin = GambleWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkCoinExchangeWin = CoinExchangeWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkGambleHouseCardWin = GambleHouseCardWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkGambleDiceGameWin = GambleDiceGameWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkSlotMachineWin = SlotMachineWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkGBSlotHelpWin = GBSlotHelpWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkGBSlotRankWin = GBSlotRankWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkMiniSlotMachineWin = MiniSlotMachineWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkMainCharSpeechBubbleWin = SpeechBubbleWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkKQuestTimeWin = KQuestTimeWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v38 = IDTimeWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v39 = v2->m_pkPartyWinInterface;
    v2->m_pkIDTimeWin = v38;
    PartyWinInterface::Create(v39, (PgFrameWork *)&v2->vfptr);
    CNSTimer_Interval::ReSet(&v2->m_kPartyUpdateTime, Timer::ms_fCurTime);
    v2->m_kPartyUpdateTime.m_fCheckTime = 5.0;
    v2->m_pkActionWin = ActionWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkKingDomQuest = KingdomQuestWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkQuestWin = CQuestWin2::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkFriendWin = FriendWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkGuildWin = GuildWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkPMWin = CPartyMatchWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkWeddingInfoWin = WeddingInfoWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkHolyPromiseWin = HolyPromiseWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkHolyPromiseAddWin = HolyPromiseAddWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkGuildAcademyWin = GuildAcademyWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkChatBlockListWin = ChatBlockListWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkCurrentCommunityWin = 0;
    v2->m_pkFriendAddWin = FriendAddWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkOptionWin = OptionBaseWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v40 = OptionGraphicWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v41 = v2->m_pkOptionWin;
    v2->m_pkOptionGraphicWin = v40;
    v40->m_pkOptionBaseWin = v41;
    v42 = OptionSystemWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v43 = v2->m_pkOptionWin;
    v2->m_pkOptionSystemWin = v42;
    v42->m_pkOptionBaseWin = v43;
    v44 = OptionSoundWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v45 = v2->m_pkOptionWin;
    v2->m_pkOptionSoundWin = v44;
    v44->m_pkOptionBaseWin = v45;
    GameFrameWork::NowLoadingText(40);
    v2->m_pkCalculatorWin = CalculatorWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkItemShopWin = ItemShopWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkUserTradeWin = UserTradeWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkNPCSkillWin = NPCSkillWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkNPCSoulWin = NPCSoulWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkFriendCallWin = FriendCallWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkChargedItemListWin = ChargedItemListWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkItemShopWin2 = NPCItemWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkServerMenuWin = ServerMenuWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkReviveMenuWin = ReviveMenuWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkRebirthMenuWin = RebirthMenuWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkNpcDlgWin = NpcDialogWin::CreateWin((PgFrameWork *)&v2->vfptr, "NPCDialogWin", 1);
    v2->m_pkStorageWin = StorageWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v46 = RewardWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkRewardWin = v46;
    if ( v46 )
    {
      v47 = v2->m_pkQuestWin;
      if ( v47 )
        CQuestWin2::SetRewardWin(v47, v46);
    }
    v2->m_pkRidePetWin = RidePetWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkGuildWarStateWin = GuildWarStateWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkItemMallMenuWin = ItemMallMenuWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v48 = MenuTexMgr::GetTexture(1u);
    v2->m_pkPopupMenuWin = PopupMenuWin::CreateWin(v48, 5u, 5u, (PgFrameWork *)&v2->vfptr);
    v49 = DesktopWin::CreateWin(0x800u, 0x600u, (PgFrameWork *)&v2->vfptr);
    v2->m_pkDesktopWin = v49;
    PgWinMgr::ShowWinAtAbsoluteFar(&Pgg_kWinMgr, (PgWin *)&v49->vfptr);
    v50 = CastingProgressWin::CreateWin((PgFrameWork *)&v2->vfptr, 0);
    v2->m_pkCastingProgressBar = v50;
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v50->vfptr);
    v51 = AnnounceWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkAnnounceWin = v51;
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v51->vfptr);
    v52 = GuildWarInformWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkGuildWarInformWin = v52;
    PgWinMgr::ShowWinAtAbsoluteNear(&Pgg_kWinMgr, (PgWin *)&v52->vfptr);
    v53 = AnnounceWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkRemainAnnounceWin = v53;
    if ( v53 )
    {
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v53->vfptr);
      ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v2->m_pkRemainAnnounceWin->vfptr[59].__vecDelDtor)(
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        0.5,
        0.13);
    }
    GameFrameWork::NowLoadingText(50);
    v2->m_pkWaitingForLogoutWin = WaitingForLogoutWin::CreateWin(0x800u, 0x600u, (PgFrameWork *)&v2->vfptr);
    v2->m_pkHelpWin = HelpWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkPkKqRankingWin = PkKqRankingWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkShopWin = ShopWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkKeyRemappingWin = KeyRemappingWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkForumWin = ForumWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkQuestNewsWin = QuestNewsWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v54 = QuestFinishWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkQuestFinishWin = v54;
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v54->vfptr);
    v2->m_pkRoarWin = RoarWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkWingStoneWin = WingStoneWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkWingStoneMapWin = WingStoneMapWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkAutoRunMsgWin = GTInformWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkPlayGuideMinWin = PlayGuideMinWin::CreateWin((PgFrameWork *)&v2->vfptr);
    if ( byte_B4FF95 )
      GameFrameWork::OpenPlayGuideMinWin(v2);
    v2->m_pkPlayGuideWin = PlayGuideWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v55 = (char *)v2->m_kGuideViewList._Mylast;
    v56 = v2->m_kGuideViewList._Myfirst;
    v57 = v2->m_kGuideViewList._Mylast - v56;
    if ( v57 <= 0xC5 )
    {
      if ( v57 >= 0xC5 )
        goto LABEL_38;
      if ( 0x3FFFFFFF - (197 - v57) < v57 )
        std::_Xlength_error("vector<T> too long");
      v60 = v2->m_kGuideViewList._Myend - v56;
      if ( v60 < 0xC5 )
      {
        if ( 0x3FFFFFFF - (v60 >> 1) >= v60 )
          v61 = (v60 >> 1) + v60;
        else
          v61 = 0;
        if ( v61 < 0xC5 )
          v61 = 197;
        std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
          (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&v2->m_kGuideViewList,
          v61);
      }
      v62 = v2->m_kGuideViewList._Mylast - v2->m_kGuideViewList._Myfirst;
      if ( 197 != v62 )
        memset(v2->m_kGuideViewList._Mylast, 0, 4 * (197 - v62));
      v59 = (int)&v2->m_kGuideViewList._Mylast[197 - (v2->m_kGuideViewList._Mylast - v2->m_kGuideViewList._Myfirst)];
    }
    else
    {
      v58 = (int)(v56 + 197);
      if ( (char *)(v56 + 197) == v55 )
        goto LABEL_38;
      memmove((char *)v56 + 788, v55, 0);
      v59 = v58;
    }
    v2->m_kGuideViewList._Mylast = (int *)v59;
LABEL_38:
    v63 = 0;
    v64 = 0;
    do
    {
      v2->m_kGuideViewList._Myfirst[v64] = -1;
      ++v64;
    }
    while ( v64 < 197 );
    v2->m_uiGuideViewKillCount = 0;
    v2->m_bGuideViewList = 0;
    fCycle = 0.0;
    v65 = CDataReader::GetRecord((CDataReader *)(ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>::ms_pkTable + 4), 0);
    if ( v65 )
      fCycle = (double)*(unsigned int *)v65 / 1000.0;
    v66 = BasicInfoTipWin::CreateWin((PgFrameWork *)&v2->vfptr, fCycle);
    v2->m_pkBasicInfoTipWin = v66;
    if ( byte_B4FF94 )
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v66->vfptr);
    v67 = v2->m_pkExpeditionPartyWin;
    do
    {
      if ( !*v67 )
        *v67 = ExpeditionPartyWin::CreateWin((PgFrameWork *)&v2->vfptr, v63);
      ++v63;
      ++v67;
    }
    while ( v63 < 4 );
    v2->m_pkExpeditionWin = ExpeditionWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkExpeditionMemberAddWin = ExpeditionMemberAddWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkExpeditionWarnigMsgWin = GTInformWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v68 = v2->m_pkRaidReplyWin.m_pObject;
    if ( v68 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v68->m_uiRefCount) && v68 )
        v68->vfptr->__vecDelDtor((NiRefObject *)v68, 1u);
      v2->m_pkRaidReplyWin.m_pObject = 0;
    }
    v2->m_pkMysteryVaultWin = MysteryVaultWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkMapLinkGateWin = MapLinkGateWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkMHAnnounceWin = AnnounceWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v69 = mhInputPassWordWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkMHInputPassWordWin = v69;
    if ( !v69 && NiMessageBox::ms_pfnMessageBox )
      NiMessageBox::ms_pfnMessageBox("m_pkMHInputPassWordWin Error", &byte_9816CB, 0);
    v70 = mhRepairObjWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkMHRepairWin = v70;
    if ( !v70 && NiMessageBox::ms_pfnMessageBox )
      NiMessageBox::ms_pfnMessageBox("Reairwin Error", byte_9816CE, 0);
    v2->m_pkMHEmotionWin = mhEmotionWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkMHMinimizeWin = mhMinimizeWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkMHInfoWin = mhInfoWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkMHPortalListWin = mhPortalListWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkMHGuestBookWin = mhGuestBookWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkMHEditRoomWin = mhEditRoomWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkMHSettingWin = mhSettingWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkMHJoinWin = mhJoinWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkMHMouseControlWin = mhMouseControlWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v71 = v2->m_pkMHInfoWin;
    v2->m_pkMHCurrentWin = (PgWin *)v71;
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v71->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      1.0,
      0.43000001);
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v2->m_pkMHAnnounceWin->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.80000001);
    v2->m_pkMakeKarisWin = MakeKarisWin::CreateWin((PgFrameWork *)&v2->vfptr);
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v2->m_pkAutoRunMsgWin->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.60000002);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkAutoRunMsgWin->vfptr);
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v2->m_pkExpeditionWarnigMsgWin->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkExpeditionWarnigMsgWin->vfptr);
    v2->m_pkItemRepairWin = ItemRepairWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkMoveBtnWin = MoveModeWin::CreateWin((PgFrameWork *)&v2->vfptr);
    if ( !((int (*)(void))g_pkMainChar->vfptr[7].Affect)() && User::Lv(&g_kUser) <= 0x14 )
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkMoveBtnWin->vfptr);
    v2->m_pkPrisonTimeWin = PrisonTimeWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkReportWin = ReportWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkGMPrisonWin = GMPrisonWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkKQJoinReplyWin = 0;
    if ( CharSelectFrameWork::ms_bStateIsPrison )
    {
      v72 = v2->m_pkPrisonTimeWin;
      if ( v72 )
        PrisonTimeWin::ResetTime(v72, 60 * CharSelectFrameWork::ms_dPrisonTimeMinute);
    }
    v73 = v2->m_pkMapLinkGateWin;
    v74 = (int)&v2->m_kAutoCloseWinList;
    v75 = (int)v2->m_kAutoCloseWinList.vfptr->NewItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)&v2->m_kAutoCloseWinList);
    *(_DWORD *)(v75 + 8) = v73;
    *(_DWORD *)v75 = 0;
    *(_DWORD *)(v75 + 4) = v2->m_kAutoCloseWinList.m_pkTail;
    v76 = &v2->m_kAutoCloseWinList.m_pkTail->m_pkNext;
    if ( v76 )
      *v76 = v75;
    else
      v2->m_kAutoCloseWinList.m_pkHead = (NiTListItem<PgWin *> *)v75;
    ++v2->m_kAutoCloseWinList.m_kAllocator.m_uiCount;
    v2->m_kAutoCloseWinList.m_pkTail = (NiTListItem<PgWin *> *)v75;
    v77 = v2->m_pkMakeKarisWin;
    v78 = (*(int (__thiscall **)(NiTList<PgWin *> *))(*(_DWORD *)v74 + 4))(&v2->m_kAutoCloseWinList);
    *(_DWORD *)(v78 + 8) = v77;
    *(_DWORD *)v78 = 0;
    *(_DWORD *)(v78 + 4) = v2->m_kAutoCloseWinList.m_pkTail;
    v79 = &v2->m_kAutoCloseWinList.m_pkTail->m_pkNext;
    if ( v79 )
      *v79 = v78;
    else
      v2->m_kAutoCloseWinList.m_pkHead = (NiTListItem<PgWin *> *)v78;
    ++v2->m_kAutoCloseWinList.m_kAllocator.m_uiCount;
    v2->m_kAutoCloseWinList.m_pkTail = (NiTListItem<PgWin *> *)v78;
    v80 = TargetOfTheTargetWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkTOTWin = v80;
    ((void (__thiscall *)(TargetOfTheTargetWin *, unsigned int, unsigned int, _DWORD, _DWORD))v80->vfptr[59].__vecDelDtor)(
      v80,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.56999999,
      0.2);
    v2->m_pkGTInformWin = GTInformWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkRollingDiceMsgWin = RollingDiceMsgWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkRollingDiceWin = RollingDiceWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkPartyLootSetupWin = PartyLootSetupWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkGateChannelWin = GateChannelWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkQuestStartItemWin = QuestStartItemWin::CreateWin((PgFrameWork *)&v2->vfptr);
    fCyclea = &v2->m_kCanHideWinList.m_pkHead->m_pkNext;
    while ( fCyclea )
    {
      v81 = (NiTListItem<PgWin *> *)fCyclea;
      fCyclea = (NiTListItem<PgWin *> **)*fCyclea;
      v2->m_kCanHideWinList.vfptr->DeleteItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)&v2->m_kCanHideWinList, v81);
    }
    v2->m_kCanHideWinList.m_kAllocator.m_uiCount = 0;
    v2->m_kCanHideWinList.m_pkHead = 0;
    v2->m_kCanHideWinList.m_pkTail = 0;
    v82 = v2->m_pkStatusWin;
    v83 = (int)v2->m_kCanHideWinList.vfptr->NewItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)&v2->m_kCanHideWinList);
    *(_DWORD *)(v83 + 8) = v82;
    *(_DWORD *)v83 = 0;
    *(_DWORD *)(v83 + 4) = v2->m_kCanHideWinList.m_pkTail;
    v84 = &v2->m_kCanHideWinList.m_pkTail->m_pkNext;
    if ( v84 )
      *v84 = v83;
    else
      v2->m_kCanHideWinList.m_pkHead = (NiTListItem<PgWin *> *)v83;
    ++v2->m_kCanHideWinList.m_kAllocator.m_uiCount;
    v2->m_kCanHideWinList.m_pkTail = (NiTListItem<PgWin *> *)v83;
    v85 = v2->m_pkMiniMapWin;
    v86 = (int)v2->m_kCanHideWinList.vfptr->NewItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)&v2->m_kCanHideWinList);
    *(_DWORD *)(v86 + 8) = v85;
    *(_DWORD *)v86 = 0;
    *(_DWORD *)(v86 + 4) = v2->m_kCanHideWinList.m_pkTail;
    v87 = &v2->m_kCanHideWinList.m_pkTail->m_pkNext;
    if ( v87 )
      *v87 = v86;
    else
      v2->m_kCanHideWinList.m_pkHead = (NiTListItem<PgWin *> *)v86;
    ++v2->m_kCanHideWinList.m_kAllocator.m_uiCount;
    v2->m_kCanHideWinList.m_pkTail = (NiTListItem<PgWin *> *)v86;
    v88 = v2->m_pkChatDisplayWin;
    v89 = (int)v2->m_kCanHideWinList.vfptr->NewItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)&v2->m_kCanHideWinList);
    *(_DWORD *)(v89 + 8) = v88;
    *(_DWORD *)v89 = 0;
    *(_DWORD *)(v89 + 4) = v2->m_kCanHideWinList.m_pkTail;
    v90 = &v2->m_kCanHideWinList.m_pkTail->m_pkNext;
    if ( v90 )
      *v90 = v89;
    else
      v2->m_kCanHideWinList.m_pkHead = (NiTListItem<PgWin *> *)v89;
    ++v2->m_kCanHideWinList.m_kAllocator.m_uiCount;
    v2->m_kCanHideWinList.m_pkTail = (NiTListItem<PgWin *> *)v89;
    v91 = v2->m_pkTargetWin;
    v92 = (int)v2->m_kCanHideWinList.vfptr->NewItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)&v2->m_kCanHideWinList);
    *(_DWORD *)(v92 + 8) = v91;
    *(_DWORD *)v92 = 0;
    *(_DWORD *)(v92 + 4) = v2->m_kCanHideWinList.m_pkTail;
    v93 = &v2->m_kCanHideWinList.m_pkTail->m_pkNext;
    if ( v93 )
      *v93 = v92;
    else
      v2->m_kCanHideWinList.m_pkHead = (NiTListItem<PgWin *> *)v92;
    ++v2->m_kCanHideWinList.m_kAllocator.m_uiCount;
    v2->m_kCanHideWinList.m_pkTail = (NiTListItem<PgWin *> *)v92;
    v94 = v2->m_pkShortCutWin;
    v95 = (int)v2->m_kCanHideWinList.vfptr->NewItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)&v2->m_kCanHideWinList);
    *(_DWORD *)(v95 + 8) = v94;
    *(_DWORD *)v95 = 0;
    *(_DWORD *)(v95 + 4) = v2->m_kCanHideWinList.m_pkTail;
    v96 = &v2->m_kCanHideWinList.m_pkTail->m_pkNext;
    if ( v96 )
      *v96 = v95;
    else
      v2->m_kCanHideWinList.m_pkHead = (NiTListItem<PgWin *> *)v95;
    ++v2->m_kCanHideWinList.m_kAllocator.m_uiCount;
    v2->m_kCanHideWinList.m_pkTail = (NiTListItem<PgWin *> *)v95;
    v97 = v2->m_pkMainMenuWin;
    v98 = (int)v2->m_kCanHideWinList.vfptr->NewItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)&v2->m_kCanHideWinList);
    *(_DWORD *)(v98 + 8) = v97;
    *(_DWORD *)v98 = 0;
    *(_DWORD *)(v98 + 4) = v2->m_kCanHideWinList.m_pkTail;
    v99 = &v2->m_kCanHideWinList.m_pkTail->m_pkNext;
    if ( v99 )
      *v99 = v98;
    else
      v2->m_kCanHideWinList.m_pkHead = (NiTListItem<PgWin *> *)v98;
    ++v2->m_kCanHideWinList.m_kAllocator.m_uiCount;
    v2->m_kCanHideWinList.m_pkTail = (NiTListItem<PgWin *> *)v98;
    v100 = v2->m_pkTOTWin;
    v101 = (int)v2->m_kCanHideWinList.vfptr->NewItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)&v2->m_kCanHideWinList);
    *(_DWORD *)(v101 + 8) = v100;
    *(_DWORD *)v101 = 0;
    *(_DWORD *)(v101 + 4) = v2->m_kCanHideWinList.m_pkTail;
    v102 = &v2->m_kCanHideWinList.m_pkTail->m_pkNext;
    if ( v102 )
      *v102 = v101;
    else
      v2->m_kCanHideWinList.m_pkHead = (NiTListItem<PgWin *> *)v101;
    ++v2->m_kCanHideWinList.m_kAllocator.m_uiCount;
    v2->m_kCanHideWinList.m_pkTail = (NiTListItem<PgWin *> *)v101;
    v103 = v2->m_pkGTInformWin;
    v104 = (int)v2->m_kCanHideWinList.vfptr->NewItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)&v2->m_kCanHideWinList);
    *(_DWORD *)(v104 + 8) = v103;
    *(_DWORD *)v104 = 0;
    *(_DWORD *)(v104 + 4) = v2->m_kCanHideWinList.m_pkTail;
    v105 = &v2->m_kCanHideWinList.m_pkTail->m_pkNext;
    if ( v105 )
      *v105 = v104;
    else
      v2->m_kCanHideWinList.m_pkHead = (NiTListItem<PgWin *> *)v104;
    ++v2->m_kCanHideWinList.m_kAllocator.m_uiCount;
    v2->m_kCanHideWinList.m_pkTail = (NiTListItem<PgWin *> *)v104;
    v106 = v2->m_pkMysteryVaultWin;
    v107 = (int)v2->m_kCanHideWinList.vfptr->NewItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)&v2->m_kCanHideWinList);
    *(_DWORD *)(v107 + 8) = v106;
    *(_DWORD *)v107 = 0;
    *(_DWORD *)(v107 + 4) = v2->m_kCanHideWinList.m_pkTail;
    v108 = &v2->m_kCanHideWinList.m_pkTail->m_pkNext;
    if ( v108 )
      *v108 = v107;
    else
      v2->m_kCanHideWinList.m_pkHead = (NiTListItem<PgWin *> *)v107;
    ++v2->m_kCanHideWinList.m_kAllocator.m_uiCount;
    v2->m_kCanHideWinList.m_pkTail = (NiTListItem<PgWin *> *)v107;
    v109 = v2->m_pkPlayGuideMinWin;
    v110 = (int)v2->m_kCanHideWinList.vfptr->NewItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)&v2->m_kCanHideWinList);
    *(_DWORD *)(v110 + 8) = v109;
    *(_DWORD *)v110 = 0;
    *(_DWORD *)(v110 + 4) = v2->m_kCanHideWinList.m_pkTail;
    v111 = &v2->m_kCanHideWinList.m_pkTail->m_pkNext;
    if ( v111 )
      *v111 = v110;
    else
      v2->m_kCanHideWinList.m_pkHead = (NiTListItem<PgWin *> *)v110;
    ++v2->m_kCanHideWinList.m_kAllocator.m_uiCount;
    v2->m_kCanHideWinList.m_pkTail = (NiTListItem<PgWin *> *)v110;
    v112 = v2->m_pkShortCutWin;
    v113 = (int)v2->m_kCanHideWinList.vfptr->NewItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)&v2->m_kCanHideWinList);
    *(_DWORD *)(v113 + 8) = v112;
    *(_DWORD *)v113 = 0;
    *(_DWORD *)(v113 + 4) = v2->m_kCanHideWinList.m_pkTail;
    v114 = &v2->m_kCanHideWinList.m_pkTail->m_pkNext;
    if ( v114 )
      *v114 = v113;
    else
      v2->m_kCanHideWinList.m_pkHead = (NiTListItem<PgWin *> *)v113;
    ++v2->m_kCanHideWinList.m_kAllocator.m_uiCount;
    v2->m_kCanHideWinList.m_pkTail = (NiTListItem<PgWin *> *)v113;
    v115 = v2->m_pkShortCutWinV;
    v116 = (int)v2->m_kCanHideWinList.vfptr->NewItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)&v2->m_kCanHideWinList);
    *(_DWORD *)(v116 + 8) = v115;
    *(_DWORD *)v116 = 0;
    *(_DWORD *)(v116 + 4) = v2->m_kCanHideWinList.m_pkTail;
    v117 = &v2->m_kCanHideWinList.m_pkTail->m_pkNext;
    if ( v117 )
      *v117 = v116;
    else
      v2->m_kCanHideWinList.m_pkHead = (NiTListItem<PgWin *> *)v116;
    ++v2->m_kCanHideWinList.m_kAllocator.m_uiCount;
    v2->m_kCanHideWinList.m_pkTail = (NiTListItem<PgWin *> *)v116;
    v118 = v2->m_pkQuestNewsWin;
    v119 = (int)v2->m_kCanHideWinList.vfptr->NewItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)&v2->m_kCanHideWinList);
    *(_DWORD *)(v119 + 8) = v118;
    *(_DWORD *)v119 = 0;
    *(_DWORD *)(v119 + 4) = v2->m_kCanHideWinList.m_pkTail;
    v120 = &v2->m_kCanHideWinList.m_pkTail->m_pkNext;
    if ( v120 )
      *v120 = v119;
    else
      v2->m_kCanHideWinList.m_pkHead = (NiTListItem<PgWin *> *)v119;
    ++v2->m_kCanHideWinList.m_kAllocator.m_uiCount;
    v2->m_kCanHideWinList.m_pkTail = (NiTListItem<PgWin *> *)v119;
    fCycleb = v2->m_pkShortCutSubWin;
    v216 = 4;
    do
    {
      v121 = *fCycleb;
      v122 = (int)v2->m_kCanHideWinList.vfptr->NewItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)&v2->m_kCanHideWinList);
      *(_DWORD *)(v122 + 8) = v121;
      *(_DWORD *)v122 = 0;
      *(_DWORD *)(v122 + 4) = v2->m_kCanHideWinList.m_pkTail;
      v123 = &v2->m_kCanHideWinList.m_pkTail->m_pkNext;
      if ( v123 )
        *v123 = v122;
      else
        v2->m_kCanHideWinList.m_pkHead = (NiTListItem<PgWin *> *)v122;
      v2->m_kCanHideWinList.m_pkTail = (NiTListItem<PgWin *> *)v122;
      ++v2->m_kCanHideWinList.m_kAllocator.m_uiCount;
      ++fCycleb;
      --v216;
    }
    while ( v216 );
    fCyclec = v2->m_pkShortCutSubWinV;
    v217 = 4;
    do
    {
      v124 = *fCyclec;
      v125 = (int)v2->m_kCanHideWinList.vfptr->NewItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)&v2->m_kCanHideWinList);
      *(_DWORD *)(v125 + 8) = v124;
      *(_DWORD *)v125 = 0;
      *(_DWORD *)(v125 + 4) = v2->m_kCanHideWinList.m_pkTail;
      v126 = &v2->m_kCanHideWinList.m_pkTail->m_pkNext;
      if ( v126 )
        *v126 = v125;
      else
        v2->m_kCanHideWinList.m_pkHead = (NiTListItem<PgWin *> *)v125;
      ++fCyclec;
      v2->m_kCanHideWinList.m_pkTail = (NiTListItem<PgWin *> *)v125;
      ++v2->m_kCanHideWinList.m_kAllocator.m_uiCount;
      --v217;
    }
    while ( v217 );
    v127 = v2->m_pkSysMsgDisplayWin;
    v128 = (int)v2->m_kCanHideWinList.vfptr->NewItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)&v2->m_kCanHideWinList);
    *(_DWORD *)(v128 + 8) = v127;
    *(_DWORD *)v128 = 0;
    *(_DWORD *)(v128 + 4) = v2->m_kCanHideWinList.m_pkTail;
    v129 = &v2->m_kCanHideWinList.m_pkTail->m_pkNext;
    if ( v129 )
      *v129 = v128;
    else
      v2->m_kCanHideWinList.m_pkHead = (NiTListItem<PgWin *> *)v128;
    ++v2->m_kCanHideWinList.m_kAllocator.m_uiCount;
    v2->m_kCanHideWinList.m_pkTail = (NiTListItem<PgWin *> *)v128;
    v130 = v2->m_pkStatusBuffWin;
    v131 = (int)v2->m_kCanHideWinList.vfptr->NewItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)&v2->m_kCanHideWinList);
    *(_DWORD *)(v131 + 8) = v130;
    *(_DWORD *)v131 = 0;
    *(_DWORD *)(v131 + 4) = v2->m_kCanHideWinList.m_pkTail;
    v132 = &v2->m_kCanHideWinList.m_pkTail->m_pkNext;
    if ( v132 )
      *v132 = v131;
    else
      v2->m_kCanHideWinList.m_pkHead = (NiTListItem<PgWin *> *)v131;
    ++v2->m_kCanHideWinList.m_kAllocator.m_uiCount;
    v2->m_kCanHideWinList.m_pkTail = (NiTListItem<PgWin *> *)v131;
    v133 = v2->m_pkStatusDBuffWin;
    v134 = (int)v2->m_kCanHideWinList.vfptr->NewItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)&v2->m_kCanHideWinList);
    *(_DWORD *)(v134 + 8) = v133;
    *(_DWORD *)v134 = 0;
    *(_DWORD *)(v134 + 4) = v2->m_kCanHideWinList.m_pkTail;
    v135 = &v2->m_kCanHideWinList.m_pkTail->m_pkNext;
    if ( v135 )
      *v135 = v134;
    else
      v2->m_kCanHideWinList.m_pkHead = (NiTListItem<PgWin *> *)v134;
    ++v2->m_kCanHideWinList.m_kAllocator.m_uiCount;
    v2->m_kCanHideWinList.m_pkTail = (NiTListItem<PgWin *> *)v134;
    v136 = v2->m_pkStatusChargedBuffWin;
    v137 = (int)v2->m_kCanHideWinList.vfptr->NewItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)&v2->m_kCanHideWinList);
    *(_DWORD *)(v137 + 8) = v136;
    *(_DWORD *)v137 = 0;
    *(_DWORD *)(v137 + 4) = v2->m_kCanHideWinList.m_pkTail;
    v138 = &v2->m_kCanHideWinList.m_pkTail->m_pkNext;
    if ( v138 )
      *v138 = v137;
    else
      v2->m_kCanHideWinList.m_pkHead = (NiTListItem<PgWin *> *)v137;
    ++v2->m_kCanHideWinList.m_kAllocator.m_uiCount;
    v2->m_kCanHideWinList.m_pkTail = (NiTListItem<PgWin *> *)v137;
    v139 = ServerTimeWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkServerTimeWin = v139;
    ServerTimeWin::EnableServerTime(v139, 1);
    v140 = v2->m_pkServerTimeWin;
    v141 = (int)v2->m_kCanHideWinList.vfptr->NewItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)&v2->m_kCanHideWinList);
    *(_DWORD *)(v141 + 8) = v140;
    *(_DWORD *)v141 = 0;
    *(_DWORD *)(v141 + 4) = v2->m_kCanHideWinList.m_pkTail;
    v142 = &v2->m_kCanHideWinList.m_pkTail->m_pkNext;
    if ( v142 )
      *v142 = v141;
    else
      v2->m_kCanHideWinList.m_pkHead = (NiTListItem<PgWin *> *)v141;
    ++v2->m_kCanHideWinList.m_kAllocator.m_uiCount;
    v2->m_kCanHideWinList.m_pkTail = (NiTListItem<PgWin *> *)v141;
    v143 = AttendIconWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v144 = v143;
    v2->m_pkAttendIconWin = v143;
    v145 = (int)v2->m_kCanHideWinList.vfptr->NewItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)&v2->m_kCanHideWinList);
    *(_DWORD *)(v145 + 8) = v144;
    *(_DWORD *)v145 = 0;
    *(_DWORD *)(v145 + 4) = v2->m_kCanHideWinList.m_pkTail;
    v146 = &v2->m_kCanHideWinList.m_pkTail->m_pkNext;
    if ( v146 )
      *v146 = v145;
    else
      v2->m_kCanHideWinList.m_pkHead = (NiTListItem<PgWin *> *)v145;
    ++v2->m_kCanHideWinList.m_kAllocator.m_uiCount;
    v2->m_kCanHideWinList.m_pkTail = (NiTListItem<PgWin *> *)v145;
    v147 = AnnounceWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkWelcomeMsgWin = v147;
    NiObjectNET::SetName((NiObjectNET *)&v147->vfptr, "WelcomeMsgWin");
    v148 = Font::Get(LARGEBOLD);
    AnnounceWin::SetFont(v2->m_pkWelcomeMsgWin, v148);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkWelcomeMsgWin->vfptr);
    ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v2->m_pkWelcomeMsgWin->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.30000001);
    v2->m_pkCollectWin = CollectWin::CreateWin((PgFrameWork *)&v2->vfptr, 0);
    v2->m_pkCollectPeepingWin = CollectWin::CreateWin((PgFrameWork *)&v2->vfptr, 1);
    v218 = v2->m_pkCollectCardWin;
    LODWORD(fCycled) = 4;
    do
    {
      *v218 = CollectCardWin::CreateWin((PgFrameWork *)&v2->vfptr);
      v149 = LODWORD(fCycled)-- == 1;
      ++v218;
    }
    while ( !v149 );
    v2->m_pkAttendRewardWin = AttendRewardWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkAttendCheckWin = AttendCheckWin::CreateWin((PgFrameWork *)&v2->vfptr);
    GameFrameWork::OnOpenAttendIconWin(v2);
    v150 = v2->m_pkAttendIconWin;
    if ( v150 )
    {
      v150->m_uFlags |= 1u;
      v150->m_bEvtState = 0;
    }
    v2->m_pkFeedMoverWin = FeedMoverWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkPetNameEditWin = PetNameEditWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkEventRankWin = EventRankWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkEventTimeWin = EventTimeWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkVoteWin = VoteWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkKQPlayerList = v2->m_pkKingDomQuest->m_pkKingdomQuestPlayerList;
    v2->m_pkKQTeamList = v2->m_pkKingDomQuest->m_pkKingdomQuestTeamList;
    v2->m_pkIndunLevelSelectWin = IndunLevelSelectWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkIndunLevelMsgWin = IndunLevelMsgWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkKQScoreWin = KQScoreWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v151 = KDTeamScoreWin::CreateWin((PgFrameWork *)&v2->vfptr);
    v2->m_pkKDTeamScoreWin = v151;
    if ( v151 )
    {
      v2->m_pkMarketSearchWin = MarketSearchWin::CreateWin((PgFrameWork *)&v2->vfptr);
      v2->m_pkPuzzleTimeWin = PuzzleTimeWin::CreateWin((PgFrameWork *)&v2->vfptr);
      v2->m_pkRandomOptionWin = RandomOptionWin::CreateWin((PgFrameWork *)&v2->vfptr);
      v2->m_pkChatColorSpinWin = ChatColorSpinWin::CreateWin((PgFrameWork *)&v2->vfptr);
      v2->m_pkTermExtendWin = TermExtendWin::CreateWin((PgFrameWork *)&v2->vfptr);
      v2->m_pkMinimonAutoItemUseWin = MinimonAutoItemUseWin::CreateWin((PgFrameWork *)&v2->vfptr);
      v2->m_pkClassChangeWin = ClassChangeWin::CreateWin((PgFrameWork *)&v2->vfptr);
      v2->m_pkGuildEmblemWin = GuildEmblemWin::CreateWin((PgFrameWork *)&v2->vfptr);
      v2->m_pkIDRankingWin = IDRankingWin::CreateWin((PgFrameWork *)&v2->vfptr);
      v2->m_pkPartyScoreWin = PartyScoreWin::CreateWin((PgFrameWork *)&v2->vfptr);
      GameFrameWork::SetWindowsPosOption(v2);
      fCyclee = &v2->m_kAutoCloseWinList.m_pkHead->m_pkNext;
      while ( fCyclee )
      {
        v152 = fCyclee;
        fCyclee = (NiTListItem<PgWin *> **)*fCyclee;
        (*(void (__thiscall **)(NiTList<PgWin *> *, NiTListItem<PgWin *> **))(*(_DWORD *)v74 + 8))(
          &v2->m_kAutoCloseWinList,
          v152);
      }
      v2->m_kAutoCloseWinList.m_kAllocator.m_uiCount = 0;
      v2->m_kAutoCloseWinList.m_pkHead = 0;
      v2->m_kAutoCloseWinList.m_pkTail = 0;
      v153 = v2->m_pkClassChangeWin;
      v154 = (*(int (__thiscall **)(NiTList<PgWin *> *))(*(_DWORD *)v74 + 4))(&v2->m_kAutoCloseWinList);
      *(_DWORD *)(v154 + 8) = v153;
      *(_DWORD *)v154 = 0;
      *(_DWORD *)(v154 + 4) = v2->m_kAutoCloseWinList.m_pkTail;
      v155 = &v2->m_kAutoCloseWinList.m_pkTail->m_pkNext;
      if ( v155 )
        *v155 = v154;
      else
        v2->m_kAutoCloseWinList.m_pkHead = (NiTListItem<PgWin *> *)v154;
      ++v2->m_kAutoCloseWinList.m_kAllocator.m_uiCount;
      v2->m_kAutoCloseWinList.m_pkTail = (NiTListItem<PgWin *> *)v154;
      v156 = v2->m_pkItemUpgradeWin;
      v157 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v74 + 4))(&v2->m_kAutoCloseWinList);
      *(_DWORD *)(v157 + 8) = v156;
      *(_DWORD *)v157 = 0;
      *(_DWORD *)(v157 + 4) = v2->m_kAutoCloseWinList.m_pkTail;
      v158 = &v2->m_kAutoCloseWinList.m_pkTail->m_pkNext;
      if ( v158 )
        *v158 = v157;
      else
        v2->m_kAutoCloseWinList.m_pkHead = (NiTListItem<PgWin *> *)v157;
      ++v2->m_kAutoCloseWinList.m_kAllocator.m_uiCount;
      v2->m_kAutoCloseWinList.m_pkTail = (NiTListItem<PgWin *> *)v157;
      v159 = v2->m_pkMoverUpgradeWin;
      v160 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v74 + 4))(&v2->m_kAutoCloseWinList);
      *(_DWORD *)(v160 + 8) = v159;
      *(_DWORD *)v160 = 0;
      *(_DWORD *)(v160 + 4) = v2->m_kAutoCloseWinList.m_pkTail;
      v161 = &v2->m_kAutoCloseWinList.m_pkTail->m_pkNext;
      if ( v161 )
        *v161 = v160;
      else
        v2->m_kAutoCloseWinList.m_pkHead = (NiTListItem<PgWin *> *)v160;
      ++v2->m_kAutoCloseWinList.m_kAllocator.m_uiCount;
      v2->m_kAutoCloseWinList.m_pkTail = (NiTListItem<PgWin *> *)v160;
      v162 = v2->m_pkItemMixWin;
      v163 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v74 + 4))(&v2->m_kAutoCloseWinList);
      *(_DWORD *)(v163 + 8) = v162;
      *(_DWORD *)v163 = 0;
      *(_DWORD *)(v163 + 4) = v2->m_kAutoCloseWinList.m_pkTail;
      v164 = &v2->m_kAutoCloseWinList.m_pkTail->m_pkNext;
      if ( v164 )
        *v164 = v163;
      else
        v2->m_kAutoCloseWinList.m_pkHead = (NiTListItem<PgWin *> *)v163;
      ++v2->m_kAutoCloseWinList.m_kAllocator.m_uiCount;
      v2->m_kAutoCloseWinList.m_pkTail = (NiTListItem<PgWin *> *)v163;
      v165 = v2->m_pkItemShopWin;
      v166 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v74 + 4))(&v2->m_kAutoCloseWinList);
      *(_DWORD *)(v166 + 8) = v165;
      *(_DWORD *)v166 = 0;
      *(_DWORD *)(v166 + 4) = v2->m_kAutoCloseWinList.m_pkTail;
      v167 = &v2->m_kAutoCloseWinList.m_pkTail->m_pkNext;
      if ( v167 )
        *v167 = v166;
      else
        v2->m_kAutoCloseWinList.m_pkHead = (NiTListItem<PgWin *> *)v166;
      ++v2->m_kAutoCloseWinList.m_kAllocator.m_uiCount;
      v2->m_kAutoCloseWinList.m_pkTail = (NiTListItem<PgWin *> *)v166;
      v168 = v2->m_pkNPCSkillWin;
      v169 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v74 + 4))(&v2->m_kAutoCloseWinList);
      *(_DWORD *)(v169 + 8) = v168;
      *(_DWORD *)v169 = 0;
      *(_DWORD *)(v169 + 4) = v2->m_kAutoCloseWinList.m_pkTail;
      v170 = &v2->m_kAutoCloseWinList.m_pkTail->m_pkNext;
      if ( v170 )
        *v170 = v169;
      else
        v2->m_kAutoCloseWinList.m_pkHead = (NiTListItem<PgWin *> *)v169;
      ++v2->m_kAutoCloseWinList.m_kAllocator.m_uiCount;
      v2->m_kAutoCloseWinList.m_pkTail = (NiTListItem<PgWin *> *)v169;
      v171 = v2->m_pkNPCSoulWin;
      v172 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v74 + 4))(&v2->m_kAutoCloseWinList);
      *(_DWORD *)(v172 + 8) = v171;
      *(_DWORD *)v172 = 0;
      *(_DWORD *)(v172 + 4) = v2->m_kAutoCloseWinList.m_pkTail;
      v173 = &v2->m_kAutoCloseWinList.m_pkTail->m_pkNext;
      if ( v173 )
        *v173 = v172;
      else
        v2->m_kAutoCloseWinList.m_pkHead = (NiTListItem<PgWin *> *)v172;
      ++v2->m_kAutoCloseWinList.m_kAllocator.m_uiCount;
      v2->m_kAutoCloseWinList.m_pkTail = (NiTListItem<PgWin *> *)v172;
      v174 = v2->m_pkStorageWin;
      v175 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v74 + 4))(&v2->m_kAutoCloseWinList);
      *(_DWORD *)(v175 + 8) = v174;
      *(_DWORD *)v175 = 0;
      *(_DWORD *)(v175 + 4) = v2->m_kAutoCloseWinList.m_pkTail;
      v176 = &v2->m_kAutoCloseWinList.m_pkTail->m_pkNext;
      if ( v176 )
        *v176 = v175;
      else
        v2->m_kAutoCloseWinList.m_pkHead = (NiTListItem<PgWin *> *)v175;
      ++v2->m_kAutoCloseWinList.m_kAllocator.m_uiCount;
      v2->m_kAutoCloseWinList.m_pkTail = (NiTListItem<PgWin *> *)v175;
      v177 = v2->m_pkItemShopWin2;
      v178 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v74 + 4))(&v2->m_kAutoCloseWinList);
      *(_DWORD *)(v178 + 8) = v177;
      *(_DWORD *)v178 = 0;
      *(_DWORD *)(v178 + 4) = v2->m_kAutoCloseWinList.m_pkTail;
      v179 = &v2->m_kAutoCloseWinList.m_pkTail->m_pkNext;
      if ( v179 )
        *v179 = v178;
      else
        v2->m_kAutoCloseWinList.m_pkHead = (NiTListItem<PgWin *> *)v178;
      ++v2->m_kAutoCloseWinList.m_kAllocator.m_uiCount;
      v2->m_kAutoCloseWinList.m_pkTail = (NiTListItem<PgWin *> *)v178;
      v180 = v2->m_pkRandomOptionWin;
      v181 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v74 + 4))(&v2->m_kAutoCloseWinList);
      *(_DWORD *)(v181 + 8) = v180;
      *(_DWORD *)v181 = 0;
      *(_DWORD *)(v181 + 4) = v2->m_kAutoCloseWinList.m_pkTail;
      v182 = &v2->m_kAutoCloseWinList.m_pkTail->m_pkNext;
      if ( v182 )
        *v182 = v181;
      else
        v2->m_kAutoCloseWinList.m_pkHead = (NiTListItem<PgWin *> *)v181;
      ++v2->m_kAutoCloseWinList.m_kAllocator.m_uiCount;
      v2->m_kAutoCloseWinList.m_pkTail = (NiTListItem<PgWin *> *)v181;
      v183 = v2->m_pkItemUpgradeMsgWin;
      v184 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v74 + 4))(&v2->m_kAutoCloseWinList);
      *(_DWORD *)(v184 + 8) = v183;
      *(_DWORD *)v184 = 0;
      *(_DWORD *)(v184 + 4) = v2->m_kAutoCloseWinList.m_pkTail;
      v185 = &v2->m_kAutoCloseWinList.m_pkTail->m_pkNext;
      if ( v185 )
        *v185 = v184;
      else
        v2->m_kAutoCloseWinList.m_pkHead = (NiTListItem<PgWin *> *)v184;
      ++v2->m_kAutoCloseWinList.m_kAllocator.m_uiCount;
      v2->m_kAutoCloseWinList.m_pkTail = (NiTListItem<PgWin *> *)v184;
      v186 = v2->m_pkMapLinkGateWin;
      v187 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v74 + 4))(&v2->m_kAutoCloseWinList);
      *(_DWORD *)(v187 + 8) = v186;
      *(_DWORD *)v187 = 0;
      *(_DWORD *)(v187 + 4) = v2->m_kAutoCloseWinList.m_pkTail;
      v188 = &v2->m_kAutoCloseWinList.m_pkTail->m_pkNext;
      if ( v188 )
        *v188 = v187;
      else
        v2->m_kAutoCloseWinList.m_pkHead = (NiTListItem<PgWin *> *)v187;
      ++v2->m_kAutoCloseWinList.m_kAllocator.m_uiCount;
      v2->m_kAutoCloseWinList.m_pkTail = (NiTListItem<PgWin *> *)v187;
      v189 = v2->m_pkMinimonAutoItemUseWin;
      v190 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v74 + 4))(&v2->m_kAutoCloseWinList);
      *(_DWORD *)(v190 + 8) = v189;
      *(_DWORD *)v190 = 0;
      *(_DWORD *)(v190 + 4) = v2->m_kAutoCloseWinList.m_pkTail;
      v191 = &v2->m_kAutoCloseWinList.m_pkTail->m_pkNext;
      if ( v191 )
        *v191 = v190;
      else
        v2->m_kAutoCloseWinList.m_pkHead = (NiTListItem<PgWin *> *)v190;
      ++v2->m_kAutoCloseWinList.m_kAllocator.m_uiCount;
      v2->m_kAutoCloseWinList.m_pkTail = (NiTListItem<PgWin *> *)v190;
      v192 = v2->m_pkNpcDlgWin;
      v193 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v74 + 4))(&v2->m_kAutoCloseWinList);
      *(_DWORD *)(v193 + 8) = v192;
      *(_DWORD *)v193 = 0;
      *(_DWORD *)(v193 + 4) = v2->m_kAutoCloseWinList.m_pkTail;
      v194 = &v2->m_kAutoCloseWinList.m_pkTail->m_pkNext;
      if ( v194 )
        *v194 = v193;
      else
        v2->m_kAutoCloseWinList.m_pkHead = (NiTListItem<PgWin *> *)v193;
      ++v2->m_kAutoCloseWinList.m_kAllocator.m_uiCount;
      v2->m_kAutoCloseWinList.m_pkTail = (NiTListItem<PgWin *> *)v193;
      v195 = v2->m_pkIDRankingWin;
      v196 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v74 + 4))(&v2->m_kAutoCloseWinList);
      *(_DWORD *)(v196 + 8) = v195;
      *(_DWORD *)v196 = 0;
      *(_DWORD *)(v196 + 4) = v2->m_kAutoCloseWinList.m_pkTail;
      v197 = &v2->m_kAutoCloseWinList.m_pkTail->m_pkNext;
      if ( v197 )
        *v197 = v196;
      else
        v2->m_kAutoCloseWinList.m_pkHead = (NiTListItem<PgWin *> *)v196;
      ++v2->m_kAutoCloseWinList.m_kAllocator.m_uiCount;
      v2->m_kAutoCloseWinList.m_pkTail = (NiTListItem<PgWin *> *)v196;
      v198 = v2->m_pkEventRankWin;
      v199 = (int)v2->m_kCanHideWinList.vfptr->NewItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)&v2->m_kCanHideWinList);
      *(_DWORD *)(v199 + 8) = v198;
      *(_DWORD *)v199 = 0;
      *(_DWORD *)(v199 + 4) = v2->m_kCanHideWinList.m_pkTail;
      v200 = &v2->m_kCanHideWinList.m_pkTail->m_pkNext;
      if ( v200 )
        *v200 = v199;
      else
        v2->m_kCanHideWinList.m_pkHead = (NiTListItem<PgWin *> *)v199;
      ++v2->m_kCanHideWinList.m_kAllocator.m_uiCount;
      v2->m_kCanHideWinList.m_pkTail = (NiTListItem<PgWin *> *)v199;
      v201 = v2->m_pkEventRankWin;
      v202 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v74 + 4))(&v2->m_kAutoCloseWinList);
      *(_DWORD *)(v202 + 8) = v201;
      *(_DWORD *)v202 = 0;
      *(_DWORD *)(v202 + 4) = v2->m_kAutoCloseWinList.m_pkTail;
      v203 = &v2->m_kAutoCloseWinList.m_pkTail->m_pkNext;
      if ( v203 )
        *v203 = v202;
      else
        v2->m_kAutoCloseWinList.m_pkHead = (NiTListItem<PgWin *> *)v202;
      ++v2->m_kAutoCloseWinList.m_kAllocator.m_uiCount;
      v2->m_kAutoCloseWinList.m_pkTail = (NiTListItem<PgWin *> *)v202;
      v204 = v2->m_pkTermExtendWin;
      v205 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v74 + 4))(&v2->m_kAutoCloseWinList);
      *(_DWORD *)(v205 + 8) = v204;
      *(_DWORD *)v205 = 0;
      *(_DWORD *)(v205 + 4) = v2->m_kAutoCloseWinList.m_pkTail;
      v206 = &v2->m_kAutoCloseWinList.m_pkTail->m_pkNext;
      if ( v206 )
        *v206 = v205;
      else
        v2->m_kAutoCloseWinList.m_pkHead = (NiTListItem<PgWin *> *)v205;
      v2->m_kAutoCloseWinList.m_pkTail = (NiTListItem<PgWin *> *)v205;
      ++v2->m_kAutoCloseWinList.m_kAllocator.m_uiCount;
      v207 = v2->m_pkMinimonAutoItemUseWin;
      v208 = (*(int (__thiscall **)(int))(*(_DWORD *)v74 + 4))(v74);
      *(_DWORD *)(v208 + 8) = v207;
      *(_DWORD *)v208 = 0;
      *(_DWORD *)(v208 + 4) = *(_DWORD *)(v74 + 8);
      v209 = *(int **)(v74 + 8);
      if ( v209 )
        *v209 = v208;
      else
        *(_DWORD *)(v74 + 4) = v208;
      ++*(_DWORD *)(v74 + 12);
      *(_DWORD *)(v74 + 8) = v208;
      result = 1;
    }
    else
    {
      result = 0;
    }
  }
  return result;
}
// 486650: could not find valid save-restore pair for ebx
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A886D5: using guessed type bool CharSelectFrameWork::ms_bStateIsPrison;
// A886D8: using guessed type unsigned __int32 CharSelectFrameWork::ms_dPrisonTimeMinute;
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8C200: using guessed type int ITableBase<BasicInfoTipCycle,BasicInfoTipCycleTab>::ms_pkTable;
// B4FF76: using guessed type int dword_B4FF76[];
// B4FF8A: using guessed type int dword_B4FF8A;
// B4FF94: using guessed type char byte_B4FF94;
// B4FF95: using guessed type char byte_B4FF95;

//----- (004886E0) --------------------------------------------------------
char __userpurge GameFrameWork::Init@<al>(GameFrameWork *this@<ecx>, int a2@<ebx>, signed int a3@<esi>, PgMsg::Frame *ptFrameMsg)
{
  GameFrameWork *v4; // edi@1
  QuestHelperMgr *v5; // eax@3
  ShortCutWin *v6; // ecx@3
  int v8; // ecx@10
  char *v9; // eax@10
  ShortCutWin **v10; // esi@18
  signed int v11; // ebx@18
  PgNet *v12; // ecx@23
  const char *v13; // eax@26
  NiObjectNET *v14; // eax@26
  NiNode *v15; // esi@26
  NiNode *v16; // ebx@26
  const char *v17; // eax@35
  NiObjectNET *v18; // eax@35
  NiNode *v19; // esi@35
  NiNode *v20; // ebx@35
  const char *v21; // eax@44
  NiObjectNET *v22; // eax@44
  NiNode *v23; // esi@44
  NiNode *v24; // ebx@44
  const char *v25; // eax@53
  NiObjectNET *v26; // eax@53
  NiNode *v27; // esi@53
  NiNode *v28; // ebx@53
  ITask *v29; // eax@60
  ITask *v30; // esi@60
  void (__thiscall *v31)(IDirectMessenger *, IDirectMessenger *); // eax@63
  ITask *v32; // eax@63
  ITask *v33; // esi@63
  void (__thiscall *v34)(IDirectMessenger *, IDirectMessenger *); // eax@66
  MapNavigator *v35; // ecx@66
  void (__thiscall ***v36)(_DWORD, _DWORD); // esi@67
  QuestFinishWin *v37; // ecx@70
  int v38; // esi@72
  signed int v39; // ebx@72
  std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *v40; // esi@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v41; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v42; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v43; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v44; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v45; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v46; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v47; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v48; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v49; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v50; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v51; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v52; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v53; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v54; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v55; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v56; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v57; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v58; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v59; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v60; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v61; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v62; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v63; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v64; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v65; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v66; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v67; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v68; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v69; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v70; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v71; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v72; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v73; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v74; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v75; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v76; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v77; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v78; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v79; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v80; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v81; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v82; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v83; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v84; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v85; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v86; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v87; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v88; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v89; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v90; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v91; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v92; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v93; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v94; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v95; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v96; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v97; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v98; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v99; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v100; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v101; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v102; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v103; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v104; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v105; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v106; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v107; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v108; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v109; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v110; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v111; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v112; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v113; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v114; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v115; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v116; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v117; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v118; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v119; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v120; // eax@74
  CBlindEffect *v121; // eax@74
  int v122; // eax@75
  CBlindEffect *v123; // ebx@77
  int v124; // eax@82
  CameraEffect *v125; // eax@84
  int v126; // eax@85
  CameraEffect *v127; // ebx@87
  int v128; // eax@92
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v129; // eax@94
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v130; // eax@94
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v131; // eax@94
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v132; // eax@94
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v133; // eax@94
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v134; // eax@94
  unsigned int *v135; // ebx@94
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v136; // eax@95
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v137; // eax@96
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v138; // eax@96
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v139; // eax@96
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v140; // eax@96
  EffectMsg *v141; // eax@96
  EffectMsg *v142; // eax@97
  Tutorial *v143; // ecx@99
  Tutorial *v144; // eax@100
  Tutorial *v145; // eax@101
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v146; // eax@104
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v147; // eax@104
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v148; // eax@104
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v149; // eax@104
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v150; // eax@104
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v151; // eax@104
  FriendWin *v152; // eax@104
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v153; // eax@106
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v154; // eax@106
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v155; // eax@106
  NETCOMMAND netcmd; // [sp+30h] [bp-38h]@23
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >,bool> v157; // [sp+34h] [bp-34h]@95
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >,bool> result; // [sp+3Ch] [bp-2Ch]@60
  PgMsg::Frame kMsg; // [sp+44h] [bp-24h]@24
  int v160; // [sp+64h] [bp-4h]@60

  v4 = this;
  if ( !(`TutorialMgr::GetTutorialMgr'::`2'::`local static guard' & 1) )
  {
    `TutorialMgr::GetTutorialMgr'::`2'::`local static guard' |= 1u;
    TutorialMgr::TutorialMgr(&`TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr);
    atexit(`TutorialMgr::GetTutorialMgr'::`2'::`dynamic atexit destructor for 'kTutorialMgr'');
  }
  `TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr.m_pkFrameWork = (PgFrameWork *)v4;
  QuestDataMgr::GetQuest()->m_pkFrameWork = (PgFrameWork *)v4;
  v5 = QuestHelperMgr::GetInstance();
  QuestHelperMgr::Init(v5);
  GameFrameWork::NowLoadingText(0);
  v6 = v4->m_pkShortCutWin;
  if ( v6 )
    ShortCutWin::ResetIconWin(v6);
  if ( !GameFrameWork::InitNet(v4) || !GameFrameWork::InitInput(v4) || !GameFrameWork::InitWindow(v4, a2) )
    return 0;
  if ( !CharSelectFrameWork::ms_bLoadShortCutSizeOptionSuccess )
  {
    unk_B4FF9E = 5;
    v8 = 0;
    v9 = byte_B4FFA1;
    do
    {
      *v9 = v8;
      *(v9 - 1) = 12;
      v9[1] = 0;
      v9 += 3;
      ++v8;
    }
    while ( (signed int)v9 < (signed int)&MachineOpt::ms_kUserLoginOption );
  }
  GameFrameWork::ApplyShortCutSizeData(v4);
  ScreenBDMgr::InitCharBD(&g_kScrnBDMgr, byte_B4FF93);
  GameFrameWork::NowLoadingText(60);
  if ( !CharSelectFrameWork::ms_bLoadWindowsPosOptionSuccess
    || byte_B4FF6F
    || MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth != dword_A76A5A
    && MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight != dword_A76A5E )
  {
    GameFrameWork::ChangeWinDefaultPos(v4, a3);
  }
  else
  {
    GameFrameWork::ApplyWindowPosData(v4);
  }
  GameFrameWork::ApplyKeyMappingData(v4);
  ShortCutMgr::CheckContents(&g_kShortCutMgr);
  ShortCutWin::ReflashShortCutWin(v4->m_pkShortCutWin);
  ShortCutWin::ReflashShortCutWin(v4->m_pkShortCutWinV);
  v10 = v4->m_pkShortCutSubWinV;
  v11 = 4;
  do
  {
    ShortCutWin::ReflashShortCutWin(*(v10 - 5));
    ShortCutWin::ReflashShortCutWin(*v10);
    ++v10;
    --v11;
  }
  while ( v11 );
  CNSTimer_Interval::ReSet(&v4->m_kTimerInterval, Timer::ms_fCurTime);
  v4->m_kTimerInterval.m_fCheckTime = 5.0;
  GameFrameWork::NowLoadingText(70);
  if ( !GameFrameWork::InitWorld() )
    return 0;
  CharResMgr::PreLoadCharRes(&g_kCharResMgr);
  GameFrameWork::NowLoadingText(95);
  if ( !GameFrameWork::InitSystem(v4) )
    return 0;
  if ( GameFrameWork::InitCharacter(v4) )
  {
    GameFrameWork::NowLoadingText(100);
    MachineOpt::SetGraphicOption(&MachineOpt::ms_kGraphicOption);
    kMsg.m_uiFrameMsg = 9;
    PgFrameWork::PostMsgToMe((PgFrameWork *)&v4->vfptr, &kMsg);
    if ( !Folder::m_bInit )
      Folder::Init();
    v13 = Folder::Merge(&Folder::m_acEffect, "KQuestSucc.nif");
    v14 = Ns_LoadNifFile(v13, 0);
    v15 = v4->m_pEffect1.m_pObject;
    v16 = (NiNode *)v14;
    if ( (NiObjectNET *)v15 != v14 )
    {
      if ( v15 && !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) && v15 )
        v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
      v4->m_pEffect1.m_pObject = v16;
      if ( v16 )
        InterlockedIncrement((volatile LONG *)&v16->m_uiRefCount);
    }
    if ( !Folder::m_bInit )
      Folder::Init();
    v17 = Folder::Merge(&Folder::m_acEffect, "KQuestFail.nif");
    v18 = Ns_LoadNifFile(v17, 0);
    v19 = v4->m_pEffect2.m_pObject;
    v20 = (NiNode *)v18;
    if ( (NiObjectNET *)v19 != v18 )
    {
      if ( v19 && !InterlockedDecrement((volatile LONG *)&v19->m_uiRefCount) && v19 )
        v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
      v4->m_pEffect2.m_pObject = v20;
      if ( v20 )
        InterlockedIncrement((volatile LONG *)&v20->m_uiRefCount);
    }
    if ( !Folder::m_bInit )
      Folder::Init();
    v21 = Folder::Merge(&Folder::m_acEffect, "OX_O.nif");
    v22 = Ns_LoadNifFile(v21, 0);
    v23 = v4->m_pOXEffectO.m_pObject;
    v24 = (NiNode *)v22;
    if ( (NiObjectNET *)v23 != v22 )
    {
      if ( v23 && !InterlockedDecrement((volatile LONG *)&v23->m_uiRefCount) && v23 )
        v23->vfptr->__vecDelDtor((NiRefObject *)v23, 1u);
      v4->m_pOXEffectO.m_pObject = v24;
      if ( v24 )
        InterlockedIncrement((volatile LONG *)&v24->m_uiRefCount);
    }
    if ( !Folder::m_bInit )
      Folder::Init();
    v25 = Folder::Merge(&Folder::m_acEffect, "OX_X.nif");
    v26 = Ns_LoadNifFile(v25, 0);
    v27 = v4->m_pOXEffectX.m_pObject;
    v28 = (NiNode *)v26;
    if ( (NiObjectNET *)v27 != v26 )
    {
      if ( v27 && !InterlockedDecrement((volatile LONG *)&v27->m_uiRefCount) && v27 )
        v27->vfptr->__vecDelDtor((NiRefObject *)v27, 1u);
      v4->m_pOXEffectX.m_pObject = v28;
      if ( v28 )
        InterlockedIncrement((volatile LONG *)&v28->m_uiRefCount);
    }
    v4->m_bInit = 1;
    SetFocus(g_hMainWnd);
    dword_A6F1D0 = (int)v4;
    Skill::ApplyCoolTimeToInterface();
    v29 = (ITask *)operator new(0x48u);
    v30 = v29;
    *(_DWORD *)&result.second = v29;
    v160 = 0;
    if ( v29 )
    {
      ITask::ITask(v29, 0);
      v30->vfptr = (NiRefObjectVtbl *)&GatheringTask::`vftable'{for `NiRefObject'};
      v30->vfptr = (IDirectMessengerVtbl *)&GatheringTask::`vftable'{for `IDirectMessenger'};
    }
    else
    {
      v30 = 0;
    }
    v31 = v30->vfptr->SetMsgHooker;
    v160 = -1;
    v31((IDirectMessenger *)&v30->vfptr, (IDirectMessenger *)&v4->vfptr);
    v32 = (ITask *)operator new(0x4Cu);
    v33 = v32;
    *(_DWORD *)&result.second = v32;
    v160 = 1;
    if ( v32 )
    {
      ITask::ITask(v32, 0);
      v33->vfptr = (NiRefObjectVtbl *)&ProductTask::`vftable'{for `NiRefObject'};
      v33->vfptr = (IDirectMessengerVtbl *)&ProductTask::`vftable'{for `IDirectMessenger'};
    }
    else
    {
      v33 = 0;
    }
    v34 = v33->vfptr->SetMsgHooker;
    v160 = -1;
    v34((IDirectMessenger *)&v33->vfptr, (IDirectMessenger *)&v4->vfptr);
    GuildTask::Create((IDirectMessenger *)&v4->vfptr);
    WeddingTask::Create((IDirectMessenger *)&v4->vfptr);
    GuildListTask::Create((IDirectMessenger *)&v4->vfptr);
    MapNavigator::Create();
    v35 = MapNavigator::GetMapNavigator((NiPointer<MapNavigator> *)&result.second)->m_pObject;
    v160 = 2;
    MapNavigator::Init(v35);
    v160 = -1;
    if ( *(_DWORD *)&result.second )
    {
      v36 = *(void (__thiscall ****)(_DWORD, _DWORD))&result.second;
      if ( !InterlockedDecrement((volatile LONG *)(*(_DWORD *)&result.second + 4)) )
      {
        if ( v36 )
          (**v36)(v36, 1);
      }
    }
    MHDiceGameTask::Create((IDirectMessenger *)&v4->vfptr);
    v37 = v4->m_pkQuestFinishWin;
    if ( v37 )
      QuestFinishWin::UpdateQuest(v37);
    GameFrameWork::InitNewCharCreate(v4);
    GuildAcademyTask::Create((IDirectMessenger *)&v4->vfptr);
    GuildAcademySelectTask::Create((IDirectMessenger *)&v4->vfptr);
    ItemRepairTask::Create((IDirectMessenger *)&v4->vfptr);
    v38 = (int)&v4->m_CharList[0].n5_code[3];
    v39 = 6;
    do
    {
      *(_DWORD *)(v38 + 4) = 0;
      *(_DWORD *)v38 = 0;
      *(_DWORD *)(v38 - 4) = 0;
      *(_DWORD *)(v38 - 8) = 0;
      *(_DWORD *)(v38 - 12) = 0;
      strncpy((char *)(v38 - 12), &source, 0x14u);
      v38 += 20;
      --v39;
    }
    while ( v39 );
    PgExternalLib::EnableOpenSound(1);
    PgExternalLib::EnableCloseSound(1);
    v40 = (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide;
    v4->m_bBackCharSelect = 0;
    std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,unsigned short>>,0>>::clear((std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide);
    v41 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkInventoryWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v41,
      0);
    v42 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkSkillWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v42,
      0);
    v43 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkSystemWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v43,
      0);
    v44 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkActionWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v44,
      0);
    v45 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkQuestWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v45,
      0);
    v46 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkOptionSystemWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v46,
      0);
    v47 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkNPCSkillWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v47,
      0);
    v48 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkItemShopWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v48,
      0);
    v49 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkNPCSoulWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v49,
      0);
    v50 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkStorageWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v50,
      0);
    v51 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkEnchantGemWin1);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v51,
      0);
    v52 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkEnchantGemWin2);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v52,
      0);
    v53 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkEnchantGemWin3);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v53,
      0);
    v54 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkEnchantGemDeleteWin1);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v54,
      0);
    v55 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkEnchantGemDeleteWin2);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v55,
      0);
    v56 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkEnchantGemDeleteWin3);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v56,
      0);
    v57 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkWeaponTitleWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v57,
      0);
    v58 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkWeaponTitleDeleteWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v58,
      0);
    v59 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkItemShopWin2);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v59,
      0);
    v60 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkKingDomQuest);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v60,
      0);
    v61 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkMiniHouseMenuWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v61,
      0);
    v62 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkPrivateStoreWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v62,
      0);
    v63 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkCharInfoWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v63,
      0);
    v64 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkOptionWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v64,
      0);
    v65 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkFriendWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v65,
      0);
    v66 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkGuildWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v66,
      0);
    *(_DWORD *)&result.second = v4->m_pkGuildWin->m_pkNoticeEditor;
    v67 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v67,
      0);
    v68 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkPMWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v68,
      0);
    v69 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkWeddingInfoWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v69,
      0);
    v70 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkHolyPromiseWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v70,
      0);
    *(_DWORD *)&result.second = v4->m_pkKeyRemappingWin;
    v71 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v71,
      0);
    *(_DWORD *)&result.second = v4->m_pkMiniMapWin->m_pkFullMapWin;
    v72 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v72,
      0);
    *(_DWORD *)&result.second = MiniMapWin::GetWorldMap(v4->m_pkMiniMapWin);
    v73 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v73,
      0);
    v74 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkItemUpgradeWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v74,
      0);
    v75 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkItemUpgradeMsgWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v75,
      0);
    v76 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkMoverUpgradeWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v76,
      0);
    v77 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkItemMixWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v77,
      0);
    v78 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkItemLinkInfoWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v78,
      0);
    v79 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkHelpWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v79,
      0);
    v80 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkItemMallMenuWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v80,
      0);
    v81 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkChargedItemListWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v81,
      0);
    v82 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkWingStoneWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v82,
      0);
    v83 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkWingStoneMapWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v83,
      0);
    ITask::UpdateTaskAll(0.0);
    *(_DWORD *)&result.second = GuildTask::GetGuildNpcMenuWin();
    v84 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v84,
      0);
    *(_DWORD *)&result.second = GuildTask::GetGuildMasterMenuWin();
    v85 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v85,
      0);
    *(_DWORD *)&result.second = ProductTask::ms_pkProductionWin;
    v86 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v86,
      0);
    v87 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkGuildAcademyWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v87,
      0);
    *(_DWORD *)&result.second = v4->m_pkGuildAcademyWin->m_pkNoticeEditor;
    v88 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v88,
      0);
    *(_DWORD *)&result.second = GuildAcademyTask::GetGuildAcademyMenuWin();
    v89 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v89,
      0);
    *(_DWORD *)&result.second = GuildAcademyTask::GetGuildAcademyStorageWin();
    v90 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v90,
      0);
    *(_DWORD *)&result.second = GuildAcademyTask::GetGuildAcademyRankingWin();
    v91 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v91,
      0);
    *(_DWORD *)&result.second = GuildAcademyTask::GetGuildAcademyHallOfFameWin();
    v92 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v92,
      0);
    *(_DWORD *)&result.second = GuildAcademyTask::GetGuildAcademyMoneyRewardWin();
    v93 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v93,
      0);
    *(_DWORD *)&result.second = GuildAcademyTask::GetGuildAcademyItemRewardWin();
    v94 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v94,
      0);
    *(_DWORD *)&result.second = GuildAcademySelectTask::GetGuildAcademySelectWin();
    v95 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v95,
      0);
    *(_DWORD *)&result.second = v4->m_pkChatBlockListWin;
    v96 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v96,
      0);
    v97 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkExpeditionWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v97,
      0);
    v98 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkMapLinkGateWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v98,
      0);
    v99 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
            (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
            (unsigned int *)&v4->m_pkGuildWarStateWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v99,
      0);
    *(_DWORD *)&result.second = CharInfoWin::GetFreeStatView(v4->m_pkCharInfoWin);
    v100 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v100,
      0);
    *(_DWORD *)&result.second = SkillWin::GetProductSkillSelectWin(v4->m_pkSkillWin);
    v101 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v101,
      0);
    *(_DWORD *)&result.second = GuildListTask::GetGuildListWin();
    v102 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v102,
      0);
    *(_DWORD *)&result.second = GuildTask::GetGuildTournamnetBaseWin()->m_pkGTRequestListWin;
    v103 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v103,
      0);
    v104 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&v4->m_pkNpcDlgWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v104,
      0);
    v105 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&v4->m_pkServerMenuWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v105,
      0);
    v106 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&v4->m_pkReportWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v106,
      0);
    v107 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&v4->m_pkShopWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v107,
      0);
    v108 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&v4->m_pkMiniHouseInventoryWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v108,
      0);
    v109 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&v4->m_pkForumWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v109,
      0);
    *(_DWORD *)&result.second = GuildTask::GetGuildMenu();
    v110 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v110,
      0);
    *(_DWORD *)&result.second = GuildTask::GetGTTSkillWin();
    v111 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v111,
      0);
    *(_DWORD *)&result.second = GuildTask::GetGuildSelectWin();
    v112 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v112,
      0);
    v113 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&v4->m_pkMakeKarisWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v113,
      0);
    v114 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&v4->m_pkMHJoinWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v114,
      0);
    v4->m_bEscapeKeyPriority = 1;
    *(_DWORD *)&result.second = GuildTask::GetGuildTournamnetBaseWin();
    v115 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v115,
      0);
    *(_DWORD *)&result.second = GuildTask::GetGuildTournamentScheduleWin();
    v116 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v116,
      0);
    *(_DWORD *)&result.second = GuildTask::GetGuildTournamentStorageWin();
    v117 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v117,
      0);
    *(_DWORD *)&result.second = v4->m_pkActionWin->m_pkPremiumActionWin;
    v118 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v118,
      0);
    *(_DWORD *)&result.second = v4->m_pkQuestWin->m_pkEpicQuestWin;
    v119 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v119,
      0);
    *(_DWORD *)&result.second = v4->m_pkNpcDlgWin->m_pkNpcDlgWin->m_pkDlgQuestListWin;
    v120 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&result.second);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v120,
      0);
    MachineOpt::SetGlowEffect(MachineOpt::ms_kGraphicOption.bGlowEnable);
    v121 = (CBlindEffect *)operator new(0x28u);
    *(_DWORD *)&result.second = v121;
    v160 = 3;
    if ( v121 )
    {
      CBlindEffect::CBlindEffect(v121);
      *(_DWORD *)&result.second = v122;
    }
    else
    {
      *(_DWORD *)&result.second = 0;
    }
    v123 = v4->m_spBlindEffect.m_pObject;
    v160 = -1;
    if ( v123 != *(CBlindEffect **)&result.second )
    {
      if ( v123 && !InterlockedDecrement((volatile LONG *)&v123->m_uiRefCount) && v123 )
        v123->vfptr->__vecDelDtor((NiRefObject *)v123, 1u);
      v124 = *(_DWORD *)&result.second;
      v4->m_spBlindEffect.m_pObject = *(CBlindEffect **)&result.second;
      if ( v124 )
        InterlockedIncrement((volatile LONG *)(v124 + 4));
    }
    v125 = (CameraEffect *)operator new(0x5Cu);
    *(_DWORD *)&result.second = v125;
    v160 = 4;
    if ( v125 )
    {
      CameraEffect::CameraEffect(v125);
      *(_DWORD *)&result.second = v126;
    }
    else
    {
      *(_DWORD *)&result.second = 0;
    }
    v127 = v4->m_spCamEffect.m_pObject;
    v160 = -1;
    if ( v127 != *(CameraEffect **)&result.second )
    {
      if ( v127 && !InterlockedDecrement((volatile LONG *)&v127->m_uiRefCount) && v127 )
        v127->vfptr->__vecDelDtor((NiRefObject *)v127, 1u);
      v128 = *(_DWORD *)&result.second;
      v4->m_spCamEffect.m_pObject = *(CameraEffect **)&result.second;
      if ( v128 )
        InterlockedIncrement((volatile LONG *)(v128 + 4));
    }
    v129 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&v4->m_pkPartyLootSetupWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v129,
      0);
    v130 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&v4->m_pkGateChannelWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v130,
      0);
    v131 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&v4->m_pkQuestStartItemWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v131,
      0);
    v132 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&v4->m_pkPlayGuideWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v132,
      0);
    v133 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&v4->m_pkCollectWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v133,
      0);
    v134 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&v4->m_pkCollectPeepingWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &result,
      v134,
      0);
    v135 = (unsigned int *)v4->m_pkCollectCardWin;
    *(_DWORD *)&result.second = 4;
    do
    {
      v136 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
               (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
               v135);
      std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
        (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
        &v157,
        v136,
        0);
      ++v135;
      --*(_DWORD *)&result.second;
    }
    while ( *(_DWORD *)&result.second );
    v137 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&v4->m_pkAttendCheckWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &v157,
      v137,
      0);
    v138 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&v4->m_pkAttendRewardWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &v157,
      v138,
      0);
    v139 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&v4->m_pkMarketSearchWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &v157,
      v139,
      0);
    v140 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&v4->m_pkRandomOptionWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &v157,
      v140,
      0);
    v141 = (EffectMsg *)operator new(0x1E0u);
    *(_DWORD *)&result.second = v141;
    v160 = 5;
    if ( v141 )
      EffectMsg::EffectMsg(v141);
    else
      v142 = 0;
    v160 = -1;
    v4->m_pkEffectMsg = v142;
    EffectMsg::Load(v142);
    v143 = Singleton<Tutorial>::m_pInstance;
    if ( !Singleton<Tutorial>::m_pInstance )
    {
      v144 = (Tutorial *)operator new(0xB4u);
      *(_DWORD *)&result.second = v144;
      v160 = 6;
      if ( v144 )
        Tutorial::Tutorial(v144);
      else
        v145 = 0;
      v143 = v145;
      v160 = -1;
      Singleton<Tutorial>::m_pInstance = v145;
    }
    Tutorial::Init(v143, (PgFrameWork *)&v4->vfptr);
    v146 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&v4->m_pkChatColorSpinWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &v157,
      v146,
      0);
    v147 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&v4->m_pkEventRankWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &v157,
      v147,
      0);
    v148 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&v4->m_pkTermExtendWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &v157,
      v148,
      0);
    v149 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&v4->m_pkMinimonAutoItemUseWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &v157,
      v149,
      0);
    v150 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&v4->m_pkClassChangeWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &v157,
      v150,
      0);
    v151 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
             (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
             (unsigned int *)&v4->m_pkGuildEmblemWin);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
      &v157,
      v151,
      0);
    v152 = v4->m_pkFriendWin;
    if ( v152 )
    {
      *(_DWORD *)&result.second = v152->m_pkFriendPointTipMsg;
      if ( *(_DWORD *)&result.second )
      {
        v153 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
                 (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
                 (unsigned int *)&result.second);
        std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
          (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
          &v157,
          v153,
          0);
        v154 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
                 (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
                 (unsigned int *)&v4->m_pkIDRankingWin);
        std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
          (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setEscapeHide,
          &v157,
          v154,
          0);
        v155 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
                 v40,
                 (unsigned int *)&v4->m_pkPartyScoreWin);
        std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
          (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)v40,
          &v157,
          v155,
          0);
        return 1;
      }
    }
    return 0;
  }
  v12 = (PgNet *)&v4->m_spWorldMgrNet.m_pObject->vfptr;
  netcmd.protocol = 28767;
  PgNet::SendNetMsg(v12, &netcmd, 2);
  PgNet::Flush((PgNet *)&v4->m_spWorldMgrNet.m_pObject->vfptr);
  return 1;
}
// 98195C: using guessed type void (__thiscall *GatheringTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 981978: using guessed type int (__thiscall *GatheringTask::`vftable'{for `NiRefObject'})(void *p, char);
// 981990: using guessed type void (__thiscall *ProductTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9819AC: using guessed type int (__thiscall *ProductTask::`vftable'{for `NiRefObject'})(void *p, char);
// A6F1D0: using guessed type int dword_A6F1D0;
// A76A5A: using guessed type int dword_A76A5A;
// A76A5E: using guessed type int dword_A76A5E;
// A886D0: using guessed type bool CharSelectFrameWork::ms_bLoadShortCutSizeOptionSuccess;
// A886D1: using guessed type bool CharSelectFrameWork::ms_bLoadWindowsPosOptionSuccess;
// A8975C: using guessed type bool Folder::m_bInit;
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8C638: using guessed type int `TutorialMgr::GetTutorialMgr'::`2'::`local static guard';
// B4FF6F: using guessed type char byte_B4FF6F;
// B4FF93: using guessed type char byte_B4FF93;

//----- (004899F0) --------------------------------------------------------
bool __thiscall GatheringTask::OnProcessNetMsg(GatheringTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  GatheringTask *v5; // edi@1
  GatheringWin *v6; // ecx@4
  bool result; // al@5
  Char *v8; // eax@6
  MobInfo *v9; // eax@7
  signed int v10; // eax@8
  GatherInfo *v11; // eax@8
  GatherInfo *v12; // esi@8
  signed int v13; // ebx@10
  char v14; // cl@12
  int v15; // eax@12
  void *v16; // esi@18
  Char *v17; // eax@18
  Char *v18; // ebx@18
  MobInfo *v19; // eax@20
  signed int v20; // eax@21
  GatherInfo *v21; // eax@21
  ItemInfo *v22; // eax@22
  Char *v23; // esi@24
  Char *v24; // eax@29
  Char *v25; // edi@32
  Char *v26; // eax@32
  Char *pkTarget; // [sp+14h] [bp+8h]@6
  Char *pkCaster; // [sp+20h] [bp+14h]@9
  Char *pkCastera; // [sp+20h] [bp+14h]@18

  v5 = this;
  if ( iDepart == 8 )
  {
    switch ( iCommand )
    {
      case 46:
        if ( *((_WORD *)pvData + 2) != 2817 )
        {
          v6 = this->m_pkGatheringWin;
          v5->m_eState = 0;
          GatheringWin::GatheringFail(v6);
          Char::StopGathering(g_pkMainChar);
          return 1;
        }
        v8 = CharMgr::GetChar(&g_kCharMgr, *((_WORD *)pvData + 1));
        pkTarget = v8;
        if ( !v8 )
          return 1;
        v9 = IIDTableBase<MobInfo,MobInfoTab,unsigned short>::GetByID(v8->m_kCharShape.m_kMobID);
        if ( !v9 )
          return 1;
        v10 = GatherInfoTable::MapMobTypeToGatherType(v9->Type);
        v11 = GatheringTask::FindGatherInfo((GatherType)v10, *(_WORD *)pvData);
        v12 = v11;
        if ( !v11 )
          return 1;
        pkCaster = (Char *)ItemInfoTab::GetByInxName(v11->EqipItemView);
        if ( !pkCaster )
          return 1;
        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v5->m_pkGatheringWin->vfptr);
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v5->m_pkGatheringWin->vfptr);
        v13 = v12->AniNumber;
        if ( ChargedItemList::IsEffecting(EE_FASTMINING) )
          v13 /= 2;
        v14 = v12->NeededTool0[0];
        v15 = 3;
        if ( v14 == 65 )
        {
          v15 = 5;
        }
        else if ( v14 == 67 || v14 == 77 )
        {
          v15 = 4;
        }
        GatheringWin::StartGathering(v5->m_pkGatheringWin, 0x3E8u, v13, v15);
        Char::ActGathering(g_pkMainChar, pkTarget, LOWORD(pkCaster->vfptr));
        v5->m_eState = 2;
        result = 1;
        break;
      case 47:
        v16 = pvData;
        pkCastera = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
        v17 = CharMgr::GetChar(&g_kCharMgr, *((_WORD *)v16 + 1));
        v18 = v17;
        if ( !pkCastera )
          return 1;
        if ( !v17 )
          return 1;
        v19 = IIDTableBase<MobInfo,MobInfoTab,unsigned short>::GetByID(v17->m_kCharShape.m_kMobID);
        if ( !v19 )
          return 1;
        v20 = GatherInfoTable::MapMobTypeToGatherType(v19->Type);
        v21 = GatheringTask::FindGatherInfo((GatherType)v20, *((_WORD *)v16 + 2));
        if ( !v21 )
          return 1;
        v22 = ItemInfoTab::GetByInxName(v21->EqipItemView);
        if ( !v22 )
          return 1;
        Char::ActGathering(pkCastera, v18, v22->ID);
        return 1;
      case 49:
        v23 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
        CharMgr::GetChar(&g_kCharMgr, *((_WORD *)pvData + 1));
        if ( !v23 )
          return 1;
        Char::StopGathering(v23);
        if ( v23 == g_pkMainChar )
          GatheringWin::GatheringFail(v5->m_pkGatheringWin);
        return 1;
      case 51:
        if ( *(_WORD *)pvData == 2817 )
        {
          v24 = CharMgr::GetChar(&g_kCharMgr, *((_WORD *)pvData + 1));
          if ( v24 )
            Char::ActResourceDisappearing(v24);
        }
        GatheringWin::GatheringSuccess(v5->m_pkGatheringWin);
        Char::StopGathering(g_pkMainChar);
        v5->m_eState = 0;
        return 1;
      case 52:
        v25 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
        v26 = CharMgr::GetChar(&g_kCharMgr, *((_WORD *)pvData + 1));
        if ( v26 )
          Char::ActResourceDisappearing(v26);
        if ( !v25 )
          return 1;
        Char::StopGathering(v25);
        return 1;
      default:
        goto LABEL_36;
    }
  }
  else
  {
LABEL_36:
    result = 0;
  }
  return result;
}

//----- (00489CE0) --------------------------------------------------------
GatherInfo *__stdcall GatheringTask::FindGatherInfo(GatherType eType, int *bIsItemUsable)
{
  unsigned int v3; // ebx@1
  char *v4; // eax@2
  char *v5; // edi@2
  char *v6; // eax@5
  char v7; // cl@6
  char *v8; // eax@8
  char v9; // cl@9
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v10; // eax@10
  unsigned int v11; // edi@13
  Item *v12; // eax@14
  ItemInfo *v13; // eax@15
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned int> >,0> >::_Node *v14; // eax@16
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned int> >,0> >::_Node *v15; // ebx@16
  unsigned int v16; // esi@17
  int v17; // eax@17
  unsigned int v18; // edi@19
  unsigned int v19; // edx@19
  const char *v20; // ecx@21
  int v21; // eax@23
  bool v22; // sf@23
  signed int v23; // eax@25
  char *v25; // eax@30
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned int> >,0> >::_Node *v26; // esi@32
  char *v27; // esi@40
  signed int v28; // edi@40
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > >,bool> result; // [sp+10h] [bp-80h]@10
  unsigned int dwValue; // [sp+18h] [bp-78h]@13
  int *v31; // [sp+1Ch] [bp-74h]@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned int> >,0> >::_Node *v32; // [sp+20h] [bp-70h]@16
  unsigned int uiUsing; // [sp+24h] [bp-6Ch]@13
  GatherInfo *pkGatherInfo; // [sp+28h] [bp-68h]@1
  unsigned int i; // [sp+2Ch] [bp-64h]@13
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Keyval; // [sp+30h] [bp-60h]@8
  unsigned int v37; // [sp+4Ch] [bp-44h]@10
  std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned int> > > mapTool[3]; // [sp+50h] [bp-40h]@1
  int v39; // [sp+8Ch] [bp-4h]@1

  v31 = bIsItemUsable;
  *bIsItemUsable = 1;
  v3 = 0;
  pkGatherInfo = 0;
  `eh vector constructor iterator'(
    mapTool,
    0x10u,
    3,
    (void (__thiscall *)(void *))std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>>::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>>,
    (void (__thiscall *)(void *))std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>>::~map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>>);
  v39 = 0;
  if ( ITableBase<GatherInfo,GatherInfoTable>::GetTotal() )
  {
    do
    {
      v4 = CDataReader::GetRecord((CDataReader *)(ITableBase<GatherInfo,GatherInfoTable>::ms_pkTable + 4), v3);
      v5 = v4;
      if ( v4 && *(_DWORD *)(v4 + 34) == eType )
      {
        if ( !strcmp(v4 + 38, (const char *)&unk_9816C8) )
        {
          v39 = -1;
          `eh vector destructor iterator'(
            mapTool,
            0x10u,
            3,
            (void (__thiscall *)(void *))std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>>::~map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>>);
          return (GatherInfo *)v5;
        }
        v6 = v5 + 38;
        do
          v7 = *v6++;
        while ( v7 );
        if ( v6 != v5 + 39 )
        {
          v8 = v5 + 38;
          _Keyval._Myres = 15;
          _Keyval._Mysize = 0;
          _Keyval._Bx._Buf[0] = 0;
          do
            v9 = *v8++;
          while ( v9 );
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Keyval, v5 + 38, v8 - (v5 + 39));
          v37 = v3;
          LOBYTE(v39) = 1;
          v10 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>((std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned int> >,0> > *)mapTool, (std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned int> *)&_Keyval);
          std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::_Linsert(
            (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > *)mapTool,
            &result,
            v10,
            0);
          LOBYTE(v39) = 0;
          if ( _Keyval._Myres >= 0x10 )
            operator delete(_Keyval._Bx._Ptr);
        }
      }
      ++v3;
    }
    while ( v3 < ITableBase<GatherInfo,GatherInfoTable>::GetTotal() );
  }
  ChargedItemList::GetTotalEffectingValue(EE_MOREINVENTORY, &dwValue);
  v11 = 0;
  uiUsing = 8 * (3 * dwValue + 6);
  i = 0;
  while ( 1 )
  {
    v12 = g_kInventory.m_aspInv[v11].m_pObject;
    if ( v12 )
    {
      v13 = v12->m_pkInfo;
      if ( v13 )
      {
        *(_DWORD *)&_Keyval._Alval.0 = 15;
        _Keyval._Myres = 0;
        _Keyval._Bx._Buf[4] = 0;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)&_Keyval + 4),
          v13->InxName,
          strlen(v13->InxName));
        LOBYTE(v39) = 2;
        v14 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned int> >,0> >::_Node *)std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::_Lbound((std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > *)mapTool, (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)&_Keyval + 4));
        v15 = mapTool[0]._Myhead;
        v32 = v14;
        if ( v14 == mapTool[0]._Myhead )
          goto LABEL_45;
        v16 = v14->_Myval.first._Mysize;
        v17 = (int)&v14->_Myval;
        if ( *(_DWORD *)(v17 + 20) >= 0x10u )
          v17 = *(_DWORD *)v17;
        v18 = _Keyval._Myres;
        v19 = _Keyval._Myres;
        if ( _Keyval._Myres >= v16 )
          v19 = v16;
        v20 = *(const char **)&_Keyval._Bx._Alias[4];
        if ( *(_DWORD *)&_Keyval._Alval.0 < 0x10u )
          v20 = &_Keyval._Bx._Buf[4];
        v21 = std::char_traits<char>::compare(v20, (const char *)v17, v19);
        v22 = v21 < 0;
        if ( !v21 )
        {
          if ( v18 >= v16 )
            v23 = v18 != v16;
          else
            v23 = -1;
          v22 = v23 < 0;
        }
        v11 = i;
        if ( v22 )
        {
LABEL_45:
          *(_DWORD *)&result.second = v15;
          v25 = (char *)&result.second;
        }
        else
        {
          v25 = (char *)&v32;
        }
        v26 = *(std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned int> >,0> >::_Node **)v25;
        LOBYTE(v39) = 0;
        if ( *(_DWORD *)&_Keyval._Alval.0 >= 0x10u )
        {
          operator delete(*(void **)&_Keyval._Bx._Alias[4]);
          v15 = mapTool[0]._Myhead;
        }
        *(_DWORD *)&_Keyval._Alval.0 = 15;
        _Keyval._Myres = 0;
        _Keyval._Bx._Buf[4] = 0;
        if ( v26 != v15 )
          break;
      }
    }
    i = ++v11;
    if ( v11 >= 0xC0 )
      goto LABEL_40;
  }
  if ( v11 >= uiUsing )
    *v31 = 0;
  pkGatherInfo = (GatherInfo *)CDataReader::GetRecord(
                                 (CDataReader *)(ITableBase<GatherInfo,GatherInfoTable>::ms_pkTable + 4),
                                 v26->_Myval.second);
LABEL_40:
  v27 = (char *)&mapTool[0]._Myhead;
  v28 = 3;
  do
  {
    std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::_Erase(
      (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > *)(v27 - 4),
      *(std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node **)(*(_DWORD *)v27 + 4));
    *(_DWORD *)(*(_DWORD *)v27 + 4) = *(_DWORD *)v27;
    **(_DWORD **)v27 = *(_DWORD *)v27;
    *(_DWORD *)(*(_DWORD *)v27 + 8) = *(_DWORD *)v27;
    *((_DWORD *)v27 + 1) = 0;
    v27 += 16;
    --v28;
  }
  while ( v28 );
  v39 = -1;
  `eh vector destructor iterator'(
    mapTool,
    0x10u,
    3,
    (void (__thiscall *)(void *))std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>>::~map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>>);
  return pkGatherInfo;
}
// A8C170: using guessed type int ITableBase<GatherInfo,GatherInfoTable>::ms_pkTable;

//----- (0048A000) --------------------------------------------------------
void __thiscall GatheringTask::DirectMessage(GatheringTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  GatheringTask *v4; // esi@1
  void *v5; // ebx@11
  MobInfo *v6; // eax@12
  signed int v7; // eax@12
  GatherType v8; // edi@12
  int v9; // eax@12
  NiUnsharedGeometryGroup *v10; // eax@16
  NiUnsharedGeometryGroup *v11; // edi@21

  v4 = this;
  if ( iMsgTag == 30 )
  {
    if ( !this->m_kSerialTaskList.m_pkTail )
    {
      v5 = pvBody;
      if ( !Char::IsBrokenResource(*(Char **)pvBody) )
      {
        v6 = IIDTableBase<MobInfo,MobInfoTab,unsigned short>::GetByID(*(_WORD *)(*(_DWORD *)v5 + 946));
        v7 = GatherInfoTable::MapMobTypeToGatherType(v6->Type);
        v8 = v7;
        v9 = (unsigned __int16)GatherInfoTable::GetSkillIDByType((GatherType)v7);
        if ( (_WORD)v9 != -1 )
        {
          if ( !Skill::IsLearnProdSkill(v9) || (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[15].Deaffect)() )
          {
            v10 = TextData::Get(0x6C92597Bu);
          }
          else if ( GatheringTask::FindGatherInfo(v8, &iMsgTag) )
          {
            if ( iMsgTag )
            {
              LOWORD(pvBody) = *(_WORD *)(*(_DWORD *)v5 + 552);
              NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 8u, 0x2Du, &pvBody, 2);
              v4->m_kSerialTaskList.m_pkTail = (NiTListItem<NiPointer<ITask> > *)1;
              return;
            }
            v10 = TextData::Get(0xBFF72827);
          }
          else
          {
            v10 = TextData::Get(0xFF3B7E8D);
          }
          v11 = v10;
          if ( v4->m_uiRefCount )
          {
            (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, GatheringTask *))(*(_DWORD *)v4->m_uiRefCount
                                                                                          + 4))(
              25,
              v10,
              v4);
            if ( v4->m_uiRefCount )
              (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, GatheringTask *))(*(_DWORD *)v4->m_uiRefCount
                                                                                            + 20))(
                25,
                v11,
                v4);
          }
          ((void (__thiscall *)(GatheringTask *, signed int, NiUnsharedGeometryGroup *, GatheringTask *))v4->vfptr[5].__vecDelDtor)(
            v4,
            25,
            v11,
            v4);
        }
      }
    }
  }
  else if ( iMsgTag == 31 )
  {
    if ( this->m_kSerialTaskList.m_pkTail == (NiTListItem<NiPointer<ITask> > *)2 )
    {
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 8u, 0x32u, 0, 0);
      v4->m_kSerialTaskList.m_pkTail = (NiTListItem<NiPointer<ITask> > *)3;
    }
  }
  else if ( iMsgTag == 32 && this->m_kSerialTaskList.m_pkTail == (NiTListItem<NiPointer<ITask> > *)2 )
  {
    if ( !pvBody )
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 8u, 0x30u, 0, 0);
    GatheringWin::GatheringFail((GatheringWin *)v4->m_kSerialTaskList.m_kAllocator.m_uiCount);
    Char::StopGathering(g_pkMainChar);
    v4->m_kSerialTaskList.m_pkTail = 0;
  }
}

//----- (0048A1A0) --------------------------------------------------------
MobInfo *__cdecl IIDTableBase<MobInfo,MobInfoTab,unsigned short>::GetByID(int uiId)
{
  int v1; // esi@1
  MobInfo *result; // eax@2
  int v3; // ecx@4

  v1 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 16))(
                          ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                          uiId)
    && (unsigned __int16)uiId <= *(_WORD *)(v1 + 200)
    && (v3 = *(_DWORD *)(v1 + 196), *(_DWORD *)(v3 + 4 * (unsigned __int16)uiId)) )
  {
    result = *(MobInfo **)(v3 + 4 * (unsigned __int16)uiId);
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;

//----- (0048A1F0) --------------------------------------------------------
void __cdecl MachineOpt::SetViewTerrainLength(float fLength)
{
  MachineOpt::ms_kGraphicOption.fViewTerrainLength = fLength;
  if ( !unk_A99569 )
    unk_B24FB4 = fLength * MachineOpt::ms_kGraphicOption.fViewTerrainRate;
}

//----- (0048A220) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::~NiTListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>(NiTListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> > *this)
{
  this->vfptr = (NiTListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> >Vtbl *)&NiTListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::`vftable';
}
// 9818F8: using guessed type int (__thiscall *NiTListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::`vftable')(void *p, char);

//----- (0048A230) --------------------------------------------------------
NiTListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> > *__thiscall NiTListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::`scalar deleting destructor'(NiTListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> > *this, unsigned int a2)
{
  NiTListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> > *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> >Vtbl *)&NiTListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9818F8: using guessed type int (__thiscall *NiTListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::`vftable')(void *p, char);

//----- (0048A260) --------------------------------------------------------
NiPointer<MapNavigator> *__cdecl MapNavigator::GetMapNavigator(NiPointer<MapNavigator> *result)
{
  int v1; // eax@1

  v1 = MapNavigator::ms_spMapNavigatorTask;
  result->m_pObject = (MapNavigator *)MapNavigator::ms_spMapNavigatorTask;
  if ( v1 )
    InterlockedIncrement((volatile LONG *)(v1 + 4));
  return result;
}
// A8F460: using guessed type int MapNavigator::ms_spMapNavigatorTask;

//----- (0048A290) --------------------------------------------------------
NiAVObject *__thiscall NiNode::GetAt(NiNode *this, unsigned int i)
{
  NiAVObject *result; // eax@2

  if ( this->m_kChildren.m_uiSize > i )
    result = this->m_kChildren.m_pBase[i].m_pObject;
  else
    result = 0;
  return result;
}

//----- (0048A2C0) --------------------------------------------------------
void ShineLogDisplay::Log(ShineLogDisplay *this, char *pcStr, ...)
{
  va_list va; // [sp+14h] [bp+10h]@1

  va_start(va, pcStr);
  if ( this->m_pkFrameWork )
  {
    vsprintf(`ShineLogDisplay::Log'::`5'::acTempStr, pcStr, va);
    GameFrameWork::AddSysMsg(this->m_pkFrameWork, `ShineLogDisplay::Log'::`5'::acTempStr);
  }
}

//----- (0048A300) --------------------------------------------------------
unsigned int __cdecl ITableBase<MapViewInfo,MapViewInfoTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C270Left, &uiTop, 0);
  vnt ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable;

//----- (0048A320) --------------------------------------------------------
unsigned int __cdecl ITableBase<GatherInfo,GatherInfoTable>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<GatherInfo,GatherInfoTable>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C170: using guessed type int ITableBase<GatherInfo,GatherInfoTable>::ms_pkTable;

//----- (0048A340) --------------------------------------------------------
void __thiscall PgWin::InitPosLeftTop(PgWin *this, unsigned int uiScreenWidth, unsigned int uiScreenHeight, float fXPosRate, float fYPosRate)
{
  PgWin *v5; // esi@1
  NiRect<int> kRect; // [sp+8h] [bp-10h]@1

  v5 = this;
  kRect.m_left = 0;
  kRect.m_right = 0;
  kRect.m_top = 0;
  kRect.m_bottom = 0;
  ((void (__stdcall *)(_DWORD))this->vfptr[52].__vecDelDtor)(&kRect);
  v5->vfptr[77].__vecDelDtor((NiRefObject *)v5, (signed int)((double)uiScreenWidth * fXPosRate - (double)kRect.m_left));
}

//----- (0048A3C0) --------------------------------------------------------
void __thiscall PgWin::InitPosRightTop(PgWin *this, unsigned int uiScreenWidth, unsigned int uiScreenHeight, float fXPosRate, float fYPosRate)
{
  PgWin *v5; // esi@1
  NiRect<int> kRect; // [sp+8h] [bp-10h]@1

  v5 = this;
  kRect.m_left = 0;
  kRect.m_right = 0;
  kRect.m_top = 0;
  kRect.m_bottom = 0;
  ((void (__stdcall *)(_DWORD))this->vfptr[52].__vecDelDtor)(&kRect);
  v5->vfptr[77].__vecDelDtor((NiRefObject *)v5, (signed int)((double)uiScreenWidth * fXPosRate - (double)kRect.m_right));
}

//----- (0048A440) --------------------------------------------------------
void __thiscall PgWinBar::OnChangeValue(PgWinBar *this)
{
  PgWinBar::BarGrowType v1; // edx@1
  unsigned int v2; // esi@5
  unsigned int v3; // eax@9
  unsigned int v4; // [sp+8h] [bp-8h]@0
  int bReverse; // [sp+Ch] [bp-4h]@0

  v1 = this->m_eType;
  if ( v1 && v1 != 2 )
  {
    if ( v1 != 1 && v1 != 3 )
      v2 = v4;
    else
      v2 = this->m_spSpr.m_pObject->m_spSprData.m_pObject->m_akHitTester.m_pBase->m_pObject->m_uiHeight;
  }
  else
  {
    v2 = this->m_spSpr.m_pObject->m_spSprData.m_pObject->m_akHitTester.m_pBase->m_pObject->m_uiWidth;
  }
  if ( 0.0 == this->m_fMaxValue )
  {
    v3 = 0;
  }
  else
  {
    v3 = (signed __int64)(this->m_fCurValue / this->m_fMaxValue * (double)v2);
    if ( v3 > v2 )
      v3 = v2;
  }
  if ( v1 == BGT_LEFT || (LOBYTE(bReverse) = 0, v1 == 1) )
    LOBYTE(bReverse) = 1;
  if ( v1 && v1 != 2 )
  {
    if ( v1 == 3 || v1 == 1 )
      ((void (__stdcall *)(unsigned int, int))this->vfptr[122].__vecDelDtor)(v3, bReverse);
  }
  else
  {
    ((void (__stdcall *)(unsigned int, int))this->vfptr[121].__vecDelDtor)(v3, bReverse);
  }
}

//----- (0048A530) --------------------------------------------------------
ItemInfo *__cdecl IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(int kItemID)
{
  int v1; // esi@1
  ItemInfo *result; // eax@2
  int v3; // ecx@4

  v1 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                          ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                          kItemID)
    && (unsigned __int16)kItemID <= *(_WORD *)(v1 + 200)
    && (v3 = *(_DWORD *)(v1 + 196), *(_DWORD *)(v3 + 4 * (unsigned __int16)kItemID)) )
  {
    result = *(ItemInfo **)(v3 + 4 * (unsigned __int16)kItemID);
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0048A580) --------------------------------------------------------
void __cdecl MachineOpt::SetGraphicOption(MachineOpt::GraphicOption *kGraphicOption)
{
  qmemcpy(&MachineOpt::ms_kGraphicOption, kGraphicOption, sizeof(MachineOpt::ms_kGraphicOption));
  MachineOpt::SetCurGama(MachineOpt::ms_kGraphicOption.fCurGama);
  if ( !unk_A99569 )
    unk_B24FB4 = MachineOpt::ms_kGraphicOption.fViewTerrainRate * MachineOpt::ms_kGraphicOption.fViewTerrainLength;
  pkWorldCamera->m_fLODAdjust = MachineOpt::ms_kGraphicOption.fLODAdjust;
  unk_B25048 = MachineOpt::ms_kGraphicOption.nCharShadowLevel;
  MachineOpt::SetViewOutLine(MachineOpt::ms_kGraphicOption.bViewOutLine);
  dword_A76A5A = MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth;
  dword_A76A5E = MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight;
}
// A76A5A: using guessed type int dword_A76A5A;
// A76A5E: using guessed type int dword_A76A5E;

//----- (0048A610) --------------------------------------------------------
NiTPointerListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> > *__thiscall NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::`scalar deleting destructor'(NiTPointerListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> > *this, unsigned int a2)
{
  NiTPointerListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> > *v2; // edi@1
  NiTListItem<NiPointer<ITask> > *v3; // esi@1
  NiTListItem<NiPointer<ITask> > *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> >Vtbl *)&NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> > *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> >Vtbl *)&NiTListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9818F8: using guessed type int (__thiscall *NiTListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::`vftable')(void *p, char);
// 981910: using guessed type int (__thiscall *NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::`vftable')(void *p, char);

//----- (0048A6A0) --------------------------------------------------------
MapViewInfo *__cdecl MapViewInfoTab::GetByMapName(Name3 *kMapName)
{
  unsigned int v1; // edi@1
  char *v2; // eax@2
  MapViewInfo *result; // eax@6

  v1 = 0;
  if ( ITableBase<MapViewInfo,MapViewInfoTab>::GetTotal() )
  {
    while ( 1 )
    {
      v2 = CDataReader::GetRecord((CDataReader *)(ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable + 4), v1);
      if ( *(_DWORD *)(v2 + 2) == kMapName->n3_code[0]
        && *(_DWORD *)(v2 + 6) == kMapName->n3_code[1]
        && *(_DWORD *)(v2 + 10) == kMapName->n3_code[2] )
      {
        break;
      }
      if ( ++v1 >= ITableBase<MapViewInfo,MapViewInfoTab>::GetTotal() )
        goto LABEL_6;
    }
    result = (MapViewInfo *)CDataReader::GetRecord(
                              (CDataReader *)(ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable + 4),
                              v1);
  }
  else
  {
LABEL_6:
    result = 0;
  }
  return result;
}
// A8C270: using guessed type int ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable;

//----- (0048A700) --------------------------------------------------------
signed __int16 __cdecl GatherInfoTable::GetSkillIDByType(GatherType eType)
{
  unsigned int v1; // esi@1
  char *v2; // eax@2
  signed __int16 result; // ax@4

  v1 = 0;
  if ( ITableBase<GatherInfo,GatherInfoTable>::GetTotal() )
  {
    while ( 1 )
    {
      v2 = CDataReader::GetRecord((CDataReader *)(ITableBase<GatherInfo,GatherInfoTable>::ms_pkTable + 4), v1);
      if ( *(_DWORD *)(v2 + 34) == eType )
        break;
      if ( ++v1 >= ITableBase<GatherInfo,GatherInfoTable>::GetTotal() )
        goto LABEL_4;
    }
    result = *(_WORD *)v2;
  }
  else
  {
LABEL_4:
    result = -1;
  }
  return result;
}
// A8C170: using guessed type int ITableBase<GatherInfo,GatherInfoTable>::ms_pkTable;

//----- (0048A750) --------------------------------------------------------
void __thiscall NiTList<NiPointer<ITask>>::~NiTList<NiPointer<ITask>>(NiTList<NiPointer<ITask> > *this)
{
  NiTList<NiPointer<ITask> > *v1; // edi@1
  NiTListItem<NiPointer<ITask> > *v2; // esi@1
  NiTListItem<NiPointer<ITask> > *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> >Vtbl *)&NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> > *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> >Vtbl *)&NiTListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::`vftable';
}
// 9818F8: using guessed type int (__thiscall *NiTListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::`vftable')(void *p, char);
// 981910: using guessed type int (__thiscall *NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::`vftable')(void *p, char);

//----- (0048A7D0) --------------------------------------------------------
void __thiscall ITask::~ITask(ITask *this)
{
  char *v1; // esi@1
  NiTListItem<NiPointer<ITask> > *v2; // edi@1
  NiTListItem<NiPointer<ITask> > *v3; // ST00_4@2
  char *v4; // esi@4
  NiTListItem<NiPointer<ITask> > *v5; // edi@4
  NiTListItem<NiPointer<ITask> > *v6; // ST00_4@5
  ITask *v7; // [sp+14h] [bp-10h]@1

  v7 = this;
  v1 = (char *)&this->m_kSerialTaskList;
  this->m_kSerialTaskList.vfptr = (NiTListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> >Vtbl *)&NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::`vftable';
  v2 = this->m_kSerialTaskList.m_pkHead;
  if ( v2 )
  {
    do
    {
      v3 = v2;
      v2 = v2->m_pkNext;
      (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v1 + 8))(v1, v3);
    }
    while ( v2 );
    this = v7;
  }
  *((_DWORD *)v1 + 3) = 0;
  *((_DWORD *)v1 + 1) = 0;
  *((_DWORD *)v1 + 2) = 0;
  *(_DWORD *)v1 = &NiTListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::`vftable';
  v4 = (char *)&this->m_kChildTaskList;
  this->m_kChildTaskList.vfptr = (NiTListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> >Vtbl *)&NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::`vftable';
  v5 = this->m_kChildTaskList.m_pkHead;
  if ( v5 )
  {
    do
    {
      v6 = v5;
      v5 = v5->m_pkNext;
      (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v4 + 8))(v4, v6);
    }
    while ( v5 );
    this = v7;
  }
  *((_DWORD *)v4 + 3) = 0;
  *((_DWORD *)v4 + 1) = 0;
  *((_DWORD *)v4 + 2) = 0;
  *(_DWORD *)v4 = &NiTListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::`vftable';
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9818F8: using guessed type int (__thiscall *NiTListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::`vftable')(void *p, char);
// 981910: using guessed type int (__thiscall *NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::`vftable')(void *p, char);

//----- (0048A8A0) --------------------------------------------------------
void __thiscall ProductTask::OnStart(ProductTask *this)
{
  ProductTask *v1; // esi@1
  ProductionWin *v2; // eax@1
  CastingProgressWin *v3; // eax@1

  v1 = this;
  v2 = ProductionWin::CreateWin(0);
  v1->m_pkProductionWin = v2;
  ((void (__stdcall *)(_DWORD))v2->vfptr->SetMsgHooker)(&v1->vfptr);
  v3 = CastingProgressWin::CreateWin(0, 1);
  v1->m_pkCastingWin = v3;
  ((void (__stdcall *)(_DWORD))v3->vfptr->SetMsgHooker)(&v1->vfptr);
  PgWin::EnableOpenCloseSound((PgWin *)&v1->m_pkCastingWin->vfptr, 0);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkCastingWin->vfptr);
  ((void (__stdcall *)(_DWORD))v1->m_pkCastingWin->vfptr[64].__vecDelDtor)(0);
  ProductTask::ms_pkProductionWin = v1->m_pkProductionWin;
}

//----- (0048A910) --------------------------------------------------------
ActiveSkillInfo *__cdecl IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::GetByID(int uiId)
{
  int v1; // esi@1
  ActiveSkillInfo *result; // eax@2
  int v3; // ecx@4

  v1 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                          uiId)
    && (unsigned __int16)uiId <= *(_WORD *)(v1 + 200)
    && (v3 = *(_DWORD *)(v1 + 196), *(_DWORD *)(v3 + 4 * (unsigned __int16)uiId)) )
  {
    result = *(ActiveSkillInfo **)(v3 + 4 * (unsigned __int16)uiId);
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (0048A960) --------------------------------------------------------
void __thiscall ProductTask::DirectMessage(ProductTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  ProductTask *v4; // ebx@1
  _WORD *v5; // esi@5
  int v6; // edi@5
  int v7; // esi@5
  int v8; // esi@6
  int v9; // edx@9

  v4 = this;
  switch ( iMsgTag )
  {
    case 33:
      ProductionWin::OpenDialog((ProductionWin *)this->m_kSerialTaskList.m_kAllocator.m_uiCount, *(_WORD *)pvBody);
      break;
    case 34:
      v5 = pvBody;
      LOWORD(pvBody) = *(_WORD *)pvBody;
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 8u, 0x35u, &pvBody, 2);
      v6 = *v5;
      v7 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                              v6) )
      {
        if ( (unsigned __int16)v6 <= *(_WORD *)(v7 + 200) )
        {
          v9 = *(_DWORD *)(v7 + 196);
          if ( *(_DWORD *)(v9 + 4 * v6) )
            v8 = *(_DWORD *)(v9 + 4 * v6);
          else
            v8 = 0;
        }
        else
        {
          v8 = 0;
        }
      }
      else
      {
        v8 = 0;
      }
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)v4->m_eState);
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)v4->m_eState);
      if ( v8 )
        CastingProgressWin::StartCasting((CastingProgressWin *)v4->m_eState, *(_DWORD *)(v8 + 203), 0);
      Char::ActProducing(g_pkMainChar);
      break;
    case 35:
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 8u, 0x39u, 0, 0);
      ((void (*)(void))g_pkMainChar->vfptr[10].DeleteAbStateByAbstateIndex)();
      CastingProgressWin::CastingFail((CastingProgressWin *)v4->m_eState);
      ProductionWin::ProduceStop((ProductionWin *)v4->m_kSerialTaskList.m_kAllocator.m_uiCount);
      break;
  }
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (0048AA70) --------------------------------------------------------
bool __thiscall ProductTask::OnProcessNetMsg(ProductTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  ProductTask *v5; // edi@1
  Skill::LearnProdSkillInfo *v6; // eax@4
  bool result; // al@5
  char *v8; // esi@7
  NiUnsharedGeometryGroup *v9; // ebx@7
  Char *v10; // eax@12
  Char *v11; // eax@15
  char *v12; // esi@19
  NiUnsharedGeometryGroup *v13; // ebx@19
  int v14; // esi@22
  int v15; // eax@22
  int v16; // edx@22
  _BYTE v17[12]; // ST0C_12@22
  ProductionWin *v18; // ecx@22
  int v19; // esi@26
  int v20; // eax@26
  int v21; // edx@26
  int *v22; // ecx@26
  int v23; // edx@26
  _BYTE v24[12]; // ST0C_12@27
  Char *v25; // esi@29
  int v26; // edi@30
  int v27; // edx@30
  int v28; // [sp+18h] [bp-20h]@22
  int v29; // [sp+1Ch] [bp-1Ch]@22
  int v30; // [sp+20h] [bp-18h]@22
  float fTime; // [sp+24h] [bp-14h]@22
  float fScale; // [sp+28h] [bp-10h]@22

  v5 = this;
  if ( iDepart == 8 )
  {
    switch ( iCommand )
    {
      case 54:
        v8 = (char *)&this->vfptr;
        v9 = TextData::Get(0xB312958u);
        if ( v5->m_pkMsgHooker )
        {
          ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v5->m_pkMsgHooker->vfptr->SendDirectMessage)(
            25,
            v9,
            &v5->vfptr);
          if ( v5->m_pkMsgHooker )
            ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v5->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
              25,
              v9,
              &v5->vfptr);
        }
        (*(void (__thiscall **)(IDirectMessengerVtbl **, signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))(*(_DWORD *)v8 + 20))(
          &v5->vfptr,
          25,
          v9,
          &v5->vfptr);
        ((void (*)(void))g_pkMainChar->vfptr[10].DeleteAbStateByAbstateIndex)();
        CastingProgressWin::CastingFail(v5->m_pkCastingWin);
        ProductionWin::ProduceStop(v5->m_pkProductionWin);
        goto $LN16_8;
      case 55:
        goto $LN16_8;
      case 56:
        v10 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
        if ( v10 )
          Char::ActProducing(v10);
        return 1;
      case 58:
        v11 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
        if ( v11 )
          ((void (__thiscall *)(Char *))v11->vfptr[10].DeleteAbStateByAbstateIndex)(v11);
        return 1;
      case 59:
        if ( *((_WORD *)pvData + 1) != 2817 )
        {
          v12 = (char *)&this->vfptr;
          v13 = TextData::Get(0xCEF24328);
          if ( v5->m_pkMsgHooker )
          {
            ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v5->m_pkMsgHooker->vfptr->SendDirectMessage)(
              25,
              v13,
              &v5->vfptr);
            if ( v5->m_pkMsgHooker )
              ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v5->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                25,
                v13,
                &v5->vfptr);
          }
          (*(void (__thiscall **)(IDirectMessengerVtbl **, signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))(*(_DWORD *)v12 + 20))(
            &v5->vfptr,
            25,
            v13,
            &v5->vfptr);
          CastingProgressWin::CastingFail(v5->m_pkCastingWin);
          ((void (*)(void))g_pkMainChar->vfptr[10].DeleteAbStateByAbstateIndex)();
          v14 = ((int (*)(void))g_pkMainChar->vfptr[6].DeleteAbStateByAbstateIndex)();
          v15 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
          v16 = *(_DWORD *)v14;
          fScale = 1.0;
          fTime = Timer::ms_fCurTime;
          v28 = v16;
          v29 = *(_DWORD *)(v14 + 4);
          v30 = *(_DWORD *)(v14 + 8);
          *(_DWORD *)v17 = *(_DWORD *)v15;
          *(_QWORD *)&v17[4] = *(_QWORD *)(v15 + 4);
          EffectMgr::CreateEffect(
            &g_kEffectMgr,
            "PrdctFail",
            *(NiPoint3 *)v17,
            *(NiPoint3 *)&v28,
            Timer::ms_fCurTime,
            1.0);
          v18 = v5->m_pkProductionWin;
          if ( v18 )
          {
            ProductionWin::ProduceStop(v18);
            result = 1;
          }
          else
          {
$LN16_8:
            result = 1;
          }
          return result;
        }
        CastingProgressWin::CastingSuccess(this->m_pkCastingWin);
        ProductionWin::RefreshProductSkillList(v5->m_pkProductionWin);
        if ( !ProductionWin::ProduceComplete(v5->m_pkProductionWin) )
          ((void (*)(void))g_pkMainChar->vfptr[10].DeleteAbStateByAbstateIndex)();
        v19 = ((int (*)(void))g_pkMainChar->vfptr[6].DeleteAbStateByAbstateIndex)();
        v20 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
        v21 = *(_DWORD *)v19;
        fScale = 1.0;
        v22 = &v28;
        fTime = Timer::ms_fCurTime;
        v28 = v21;
        v29 = *(_DWORD *)(v19 + 4);
        v23 = *(_DWORD *)(v19 + 8);
LABEL_27:
        v22[2] = v23;
        *(_DWORD *)v24 = *(_DWORD *)v20;
        *(_QWORD *)&v24[4] = *(_QWORD *)(v20 + 4);
        EffectMgr::CreateEffect(&g_kEffectMgr, "PrdctSucc", *(NiPoint3 *)v24, *(NiPoint3 *)&v28, fTime, fScale);
        break;
      case 60:
        v25 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
        if ( !v25 )
          return 1;
        ((void (__thiscall *)(Char *))v25->vfptr[10].DeleteAbStateByAbstateIndex)(v25);
        v26 = ((int (__thiscall *)(Char *))v25->vfptr[6].DeleteAbStateByAbstateIndex)(v25);
        v20 = ((int (__thiscall *)(Char *))v25->vfptr[6].Deaffect)(v25);
        v27 = *(_DWORD *)v26;
        fScale = 1.0;
        v22 = &v28;
        fTime = Timer::ms_fCurTime;
        v28 = v27;
        v29 = *(_DWORD *)(v26 + 4);
        v23 = *(_DWORD *)(v26 + 8);
        goto LABEL_27;
      default:
        return 0;
    }
    return 1;
  }
  if ( iDepart == 18 && iCommand == 29 )
  {
    v6 = Skill::GetLearnProductSkill(*(_WORD *)pvData);
    if ( v6 )
    {
      v6->kSkillExp = *(_DWORD *)((char *)pvData + 2);
      return 1;
    }
    return 1;
  }
  return 0;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0048ADB0) --------------------------------------------------------
std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >,bool> *__thiscall std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *this, std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >,bool> *result, std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *_Node, bool _Leftish)
{
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v4; // edx@1
  std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *v5; // ebx@1
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v6; // ecx@1
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v7; // eax@1
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v8; // esi@1
  bool v9; // cl@1
  unsigned int v10; // edi@2
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v11; // edi@10
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v12; // edx@12
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >,bool> *v13; // eax@12
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v14; // ecx@15
  bool _Addleft; // [sp+Ch] [bp-4h]@1

  v4 = _Node;
  v5 = this;
  v6 = this->_Myhead;
  v7 = v6->_Parent;
  v8 = v6;
  v9 = 1;
  _Addleft = 1;
  if ( !v7->_Isnil )
  {
    v10 = _Node->_Myval;
    do
    {
      v8 = v7;
      if ( _Leftish )
        v9 = v7->_Myval >= v10;
      else
        v9 = v10 < v7->_Myval;
      _Addleft = v9;
      if ( v9 )
        v7 = v7->_Left;
      else
        v7 = v7->_Right;
    }
    while ( !v7->_Isnil );
  }
  v11 = v8;
  *(_DWORD *)&_Leftish = v8;
  if ( v9 )
  {
    if ( v8 == v5->_Myhead->_Left )
    {
      v12 = std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0>>::_Insert(
              v5,
              (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *)&_Leftish,
              1,
              v8,
              _Node)->_Ptr;
      v13 = result;
      result->first._Ptr = v12;
      result->second = 1;
      return v13;
    }
    std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<Effect *,std::less<Effect *>,std::allocator<Effect *>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >,std::_Iterator_base0> *)&_Leftish);
    v11 = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)_Leftish;
    v4 = _Node;
  }
  if ( v11->_Myval >= v4->_Myval )
  {
    operator delete(v4);
    v13 = result;
    result->first._Ptr = v11;
    result->second = 0;
  }
  else
  {
    v14 = std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0>>::_Insert(
            v5,
            (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *)&_Leftish,
            _Addleft,
            v8,
            v4)->_Ptr;
    v13 = result;
    result->first._Ptr = v14;
    result->second = 1;
  }
  return v13;
}

//----- (0048AE90) --------------------------------------------------------
std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *__thiscall std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *this, unsigned int *_Val)
{
  std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *v2; // esi@1
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *result; // eax@1
  std::exception pExceptionObject; // [sp+4h] [bp-Ch]@5

  v2 = this;
  result = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)operator new(0x14u);
  if ( !result )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  result->_Left = v2->_Myhead;
  result->_Parent = v2->_Myhead;
  result->_Right = v2->_Myhead;
  *(_WORD *)&result->_Color = 0;
  if ( result != (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)-12 )
    result->_Myval = *_Val;
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0048AF00) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::_Erase(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > *this, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *_Rootnode)
{
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *v2; // esi@1
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *i; // edi@1

  v2 = _Rootnode;
  v3 = this;
  for ( i = _Rootnode; !i->_Isnil; v2 = i )
  {
    std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::_Erase(
      v3,
      i->_Right);
    i = i->_Left;
    if ( v2->_Myval.first._Myres >= 0x10 )
      operator delete(v2->_Myval.first._Bx._Ptr);
    v2->_Myval.first._Myres = 15;
    v2->_Myval.first._Mysize = 0;
    v2->_Myval.first._Bx._Buf[0] = 0;
    operator delete(v2);
  }
}

//----- (0048AF60) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,CAbstractProperty *>>,0>>::erase(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > _Where)
{
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v4; // edi@4
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *v5; // eax@7
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v6; // esi@8
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > *v7; // ecx@10
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *v8; // eax@10
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v9; // eax@17
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *v10; // ecx@20
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *v11; // ecx@29
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *v12; // ecx@31
  char v13; // cl@34
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *v14; // eax@35
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *v15; // ecx@36
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v16; // eax@38
  unsigned int v17; // eax@61
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > *v18; // eax@63
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *_Erasednode; // [sp+10h] [bp-8h]@3
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > *v20; // [sp+14h] [bp-4h]@1

  v3 = _Where._Ptr;
  v20 = this;
  if ( _Where._Ptr->_Isnil )
    std::_Xout_of_range("invalid map/set<T> iterator");
  _Erasednode = _Where._Ptr;
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiAmbientLight>>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >,std::_Iterator_base0> *)&_Where);
  if ( v3->_Left->_Isnil )
  {
    v4 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v3->_Right;
LABEL_8:
    v6 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v3->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v7 = v20;
    v8 = v20->_Myhead;
    if ( v8->_Parent == v3 )
    {
      v8->_Parent = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *)v4;
    }
    else if ( (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *)v6->_Left == v3 )
    {
      v6->_Left = v4;
    }
    else
    {
      v6->_Right = v4;
    }
    if ( v20->_Myhead->_Left == v3 )
    {
      if ( v4->_Isnil )
      {
        v9 = v6;
      }
      else
      {
        v9 = std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiAmbientLight>>>,0>>::_Min(v4);
        v7 = v20;
      }
      v7->_Myhead->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *)v9;
    }
    v10 = v7->_Myhead;
    if ( v10->_Right == v3 )
    {
      if ( v4->_Isnil )
        v10->_Right = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *)v6;
      else
        v10->_Right = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::_Max(v4);
    }
    goto LABEL_35;
  }
  if ( v3->_Right->_Isnil )
  {
    v4 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v3->_Left;
    goto LABEL_8;
  }
  v5 = _Where._Ptr;
  v4 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)_Where._Ptr->_Right;
  if ( _Where._Ptr == v3 )
    goto LABEL_8;
  v3->_Left->_Parent = _Where._Ptr;
  v5->_Left = v3->_Left;
  if ( v5 == v3->_Right )
  {
    v6 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v5;
  }
  else
  {
    v6 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v5->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v6->_Left = v4;
    v5->_Right = v3->_Right;
    v3->_Right->_Parent = v5;
  }
  v11 = v20->_Myhead;
  if ( v11->_Parent == v3 )
  {
    v11->_Parent = v5;
  }
  else
  {
    v12 = v3->_Parent;
    if ( v12->_Left == v3 )
      v12->_Left = v5;
    else
      v12->_Right = v5;
  }
  v5->_Parent = v3->_Parent;
  v13 = v5->_Color;
  v5->_Color = v3->_Color;
  v3->_Color = v13;
LABEL_35:
  v14 = _Erasednode;
  if ( _Erasednode->_Color == 1 )
  {
    v15 = (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *)v20;
    if ( v4 != (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v20->_Myhead->_Parent )
    {
      do
      {
        if ( v4->_Color != 1 )
          break;
        v16 = v6->_Left;
        if ( v4 == v6->_Left )
        {
          v16 = v6->_Right;
          if ( !v16->_Color )
          {
            v16->_Color = 1;
            v6->_Color = 0;
            std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::_Lrotate(
              v15,
              v6);
            v16 = v6->_Right;
            v15 = (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *)v20;
          }
          if ( v16->_Isnil )
            goto LABEL_53;
          if ( v16->_Left->_Color != 1 || v16->_Right->_Color != 1 )
          {
            if ( v16->_Right->_Color == 1 )
            {
              v16->_Left->_Color = 1;
              v16->_Color = 0;
              std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>,0>>::_Rrotate(
                v15,
                v16);
              v16 = v6->_Right;
              v15 = (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *)v20;
            }
            v16->_Color = v6->_Color;
            v6->_Color = 1;
            v16->_Right->_Color = 1;
            std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::_Lrotate(
              v15,
              v6);
            break;
          }
        }
        else
        {
          if ( !v16->_Color )
          {
            v16->_Color = 1;
            v6->_Color = 0;
            std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>,0>>::_Rrotate(
              v15,
              v6);
            v16 = v6->_Left;
            v15 = (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *)v20;
          }
          if ( v16->_Isnil )
            goto LABEL_53;
          if ( v16->_Right->_Color != 1 || v16->_Left->_Color != 1 )
          {
            if ( v16->_Left->_Color == 1 )
            {
              v16->_Right->_Color = 1;
              v16->_Color = 0;
              std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::_Lrotate(
                v15,
                v16);
              v16 = v6->_Left;
              v15 = (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *)v20;
            }
            v16->_Color = v6->_Color;
            v6->_Color = 1;
            v16->_Left->_Color = 1;
            std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>,0>>::_Rrotate(
              v15,
              v6);
            break;
          }
        }
        v16->_Color = 0;
LABEL_53:
        v4 = v6;
        v6 = v6->_Parent;
      }
      while ( v4 != v15->_Myhead->_Parent );
    }
    v14 = _Erasednode;
    v4->_Color = 1;
  }
  if ( v14->_Myval.first._Myres >= 0x10 )
    operator delete(v14->_Myval.first._Bx._Ptr);
  _Erasednode->_Myval.first._Myres = 15;
  _Erasednode->_Myval.first._Mysize = 0;
  _Erasednode->_Myval.first._Bx._Buf[0] = 0;
  operator delete(_Erasednode);
  v17 = v20->_Mysize;
  if ( v17 )
    v20->_Mysize = v17 - 1;
  v18 = result;
  result->_Ptr = _Where._Ptr;
  return v18;
}

//----- (0048B1E0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::erase(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > _Last)
{
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *v6; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node **v7; // ecx@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > *v8; // eax@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > v9; // edx@5
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *v10; // eax@6
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *v11; // ecx@7
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *j; // eax@7
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *i; // eax@10
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > v14; // [sp+4h] [bp-4h]@14

  v4 = this;
  v5 = this->_Myhead;
  v6 = _First._Ptr;
  if ( _First._Ptr != v5->_Left || _Last._Ptr != v5 )
  {
    for ( ; _First._Ptr != _Last._Ptr; v6 = _First._Ptr )
    {
      v9._Ptr = v6;
      if ( !v6->_Isnil )
      {
        v10 = v6->_Right;
        if ( v10->_Isnil )
        {
          for ( i = v6->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v6 != i->_Right )
              break;
            v6 = i;
          }
          _First._Ptr = i;
        }
        else
        {
          v11 = v6->_Right;
          for ( j = v10->_Left; !j->_Isnil; j = j->_Left )
            v11 = j;
          _First._Ptr = v11;
        }
      }
      std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,CAbstractProperty *>>,0>>::erase(
        v4,
        &v14,
        v9);
    }
    v8 = result;
    result->_Ptr = v6;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::_Erase(
      v4,
      v5->_Parent);
    v4->_Myhead->_Parent = v4->_Myhead;
    v4->_Myhead->_Left = v4->_Myhead;
    v4->_Myhead->_Right = v4->_Myhead;
    v7 = &v4->_Myhead->_Left;
    v8 = result;
    v4->_Mysize = 0;
    result->_Ptr = *v7;
  }
  return v8;
}

//----- (0048B2A0) --------------------------------------------------------
void __thiscall std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>>::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>>(CSingleDataMap *this)
{
  CSingleDataMap *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *v2; // eax@1
  std::exception pExceptionObject; // [sp+4h] [bp-10h]@3
  char *_What; // [sp+10h] [bp-4h]@3

  v1 = this;
  this->m_SingleData._Mysize = 0;
  v2 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *)operator new(0x30u);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_SingleData._Myhead = v2;
  v2->_Left = v2;
  v1->m_SingleData._Myhead->_Parent = v1->m_SingleData._Myhead;
  v1->m_SingleData._Myhead->_Right = v1->m_SingleData._Myhead;
  v1->m_SingleData._Myhead->_Color = 1;
  v1->m_SingleData._Myhead->_Isnil = 1;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0048B310) --------------------------------------------------------
BOOL __thiscall NiPoint3::operator==(NiPoint3 *this, NiPoint3 *pt)
{
  return pt->x == this->x && pt->y == this->y && pt->z == this->z;
}

//----- (0048B350) --------------------------------------------------------
void __usercall GameFrameWork::AddPopupMenu_Metamorphosis(GameFrameWork *this@<ecx>, int a2@<edi>)
{
  GameFrameWork *v2; // esi@1
  PopupMenu *v3; // eax@2

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[20].Deaffect)() )
  {
    v3 = PopupMenuTemplate::GetMainCharUnMetamorphosis();
    PopupMenuWin::AddMenu(v2->m_pkPopupMenuWin, a2, v3);
  }
}

//----- (0048B380) --------------------------------------------------------
void __usercall GameFrameWork::AddPopupMenu_CharName(GameFrameWork *this@<ecx>, int a2@<edi>)
{
  GameFrameWork *v2; // esi@1
  PopupMenu *v3; // eax@3

  v2 = this;
  if ( this->m_bTargetIsMainChar != 1 )
  {
    if ( this->m_pkTarget )
    {
      v3 = PopupMenuTemplate::GetTargetCharName((unsigned int)this->m_pcName);
      PopupMenuWin::AddMenu(v2->m_pkPopupMenuWin, a2, v3);
    }
  }
}

//----- (0048B3C0) --------------------------------------------------------
void __usercall GameFrameWork::AddPopupMenu_Whisper(GameFrameWork *this@<ecx>, int a2@<edi>)
{
  GameFrameWork *v2; // esi@1
  PopupMenu *v3; // eax@2

  v2 = this;
  if ( this->m_bTargetIsMainChar != 1 )
  {
    v3 = PopupMenuTemplate::GetChatWhisperMenu((unsigned int)this->m_pcName);
    PopupMenuWin::AddMenu(v2->m_pkPopupMenuWin, a2, v3);
  }
}

//----- (0048B3F0) --------------------------------------------------------
void __usercall GameFrameWork::AddPopupMenu_PartyBuff(GameFrameWork *this@<ecx>, int a2@<edi>)
{
  GameFrameWork *v2; // esi@1
  PopupMenu *v3; // eax@4

  v2 = this;
  if ( this->m_bTargetIsPartyMember || this->m_bTargetIsRaidMember && this->m_bTargetIsMainChar != 1 )
  {
    v3 = PopupMenuTemplate::GetPartyBuffMenu((unsigned int)this->m_pcName);
    PopupMenuWin::AddMenu(v2->m_pkPopupMenuWin, a2, v3);
  }
}

//----- (0048B430) --------------------------------------------------------
void __thiscall GameFrameWork::AddPopupMenu_Follow(GameFrameWork *this)
{
  GameFrameWork *v1; // edi@1
  int v2; // esi@3
  int v3; // eax@3
  float v4; // ST08_4@3
  float v5; // ST0C_4@3
  float v6; // ST10_4@3
  float v7; // ST14_4@3
  float v8; // ST14_4@3
  PopupMenu *v9; // eax@4

  v1 = this;
  if ( this->m_bTargetIsMainChar != 1 && this->m_pkTarget )
  {
    v2 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
    v3 = ((int (*)(void))v1->m_pkTarget->vfptr[6].Deaffect)();
    v4 = *(float *)v3 - *(float *)v2;
    v5 = *(float *)(v3 + 4) - *(float *)(v2 + 4);
    v6 = *(float *)(v3 + 8) - *(float *)(v2 + 8);
    v7 = v4 * v4 + v5 * v5 + v6 * v6;
    v8 = sqrt(v7);
    if ( v8 <= 200.0 )
    {
      v9 = PopupMenuTemplate::GetFollowCharMenu((unsigned int)v1->m_pcName);
      PopupMenuWin::AddMenu(v1->m_pkPopupMenuWin, (int)v1, v9);
    }
  }
}

//----- (0048B4F0) --------------------------------------------------------
void __usercall GameFrameWork::AddPopupMenu_Vote(GameFrameWork *this@<ecx>, int a2@<edi>)
{
  GameFrameWork *v2; // esi@1
  unsigned int v3; // eax@3
  PopupMenu *v4; // eax@4

  v2 = this;
  if ( this->m_bTargetIsMainChar != 1 && this->m_eFieldMapType == 1 )
  {
    v3 = KingdomQuestWin::GetJoinQuestHandle(this->m_pkKingDomQuest);
    if ( GameFrameWork::IsVotePossible(v2, v3) )
    {
      v4 = (PopupMenu *)PopupMenuTemplate::GetVoteMenu((unsigned int)v2->m_pcName);
      PopupMenuWin::AddMenu(v2->m_pkPopupMenuWin, a2, v4);
    }
  }
}

//----- (0048B540) --------------------------------------------------------
void __usercall GameFrameWork::AddPopupMenu_Cancel(GameFrameWork *this@<ecx>, int a2@<edi>)
{
  GameFrameWork *v2; // esi@1
  PopupMenu *v3; // eax@1

  v2 = this;
  v3 = PopupMenuTemplate::GetCancelMenu();
  PopupMenuWin::AddMenu(v2->m_pkPopupMenuWin, a2, v3);
}

//----- (0048B560) --------------------------------------------------------
void __thiscall GameFrameWork::SetResListDefault(GameFrameWork *this)
{
  char *v1; // eax@1
  signed int v2; // ecx@1

  v1 = (char *)&this->m_ResList[0].m_bCheckAdd;
  v2 = 21;
  do
  {
    *v1 = 0;
    v1 += 16;
    --v2;
  }
  while ( v2 );
}

//----- (0048B580) --------------------------------------------------------
KeyMap *__thiscall GameFrameWork::GetKeyMap(GameFrameWork *this)
{
  return this->m_spKeyMap.m_pObject;
}

//----- (0048B590) --------------------------------------------------------
void __thiscall GameFrameWork::SetPopupInfo(GameFrameWork *this, char *pcName)
{
  char *v2; // edi@1
  GameFrameWork *v3; // esi@1
  Char *v4; // eax@2
  PartyMemberInfo *v5; // eax@2
  bool v6; // cl@4
  RaidMemberInfo *v7; // eax@6
  Name5 v8; // [sp-14h] [bp-24h]@2
  int v9; // [sp-10h] [bp-20h]@2
  int v10; // [sp-Ch] [bp-1Ch]@2
  int v11; // [sp-8h] [bp-18h]@2
  int v12; // [sp-4h] [bp-14h]@2
  Name5 *v13; // [sp+Ch] [bp-4h]@2
  Char *pkTarget; // [sp+18h] [bp+8h]@2

  v2 = pcName;
  v3 = this;
  if ( pcName )
  {
    v4 = CharMgr::GetUserChar(&g_kCharMgr, pcName);
    v3->m_pkTarget = v4;
    pkTarget = v4;
    v13 = &v8;
    v12 = 0;
    v11 = 0;
    v10 = 0;
    v9 = 0;
    v8.n5_code[0] = 0;
    strncpy(v8.n5_name, v2, 0x14u);
    v5 = Party::GetMemberInfo(&g_kParty, v8);
    v3->m_pkPartyInfo = v5;
    v6 = pkTarget && g_pkMainChar == pkTarget;
    v3->m_bTargetIsPartyMember = v5 != 0;
    v3->m_bTargetIsMainChar = v6;
    v12 = 0;
    v11 = 0;
    v10 = 0;
    v9 = 0;
    v8.n5_code[0] = 0;
    strncpy(v8.n5_name, v2, 0x14u);
    v7 = RaidInfo::GetRaidMemberInfo(&g_kRaidinfo, v8);
    v3->m_pkRaidInfo = v7;
    v3->m_bTargetIsRaidMember = v7 != 0;
    v3->m_pcName = v2;
  }
}

//----- (0048B660) --------------------------------------------------------
void __usercall GameFrameWork::AddPopupMenu_Collection(GameFrameWork *this@<ecx>, MHDiceGameTask *a2@<edi>)
{
  GameFrameWork *v2; // esi@1
  MHDiceGameTask *v3; // ecx@1
  bool v4; // bl@1
  PopupMenu *v5; // eax@8
  NiPointer<MHDiceGameTask> result; // [sp+10h] [bp-10h]@1
  int v7; // [sp+1Ch] [bp-4h]@1

  v2 = this;
  v3 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  v7 = 0;
  v4 = MHDiceGameTask::IsDicegamePlaying(v3) == 1;
  v7 = -1;
  if ( result.m_pObject )
  {
    a2 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( a2 )
        a2->vfptr->__vecDelDtor((NiRefObject *)a2, 1u);
    }
  }
  if ( !v4 && v2->m_bTargetIsMainChar != 1 )
  {
    if ( v2->m_pkTarget )
    {
      v5 = (PopupMenu *)PopupMenuTemplate::GetCollectOpenMenu((unsigned int)v2->m_pcName);
      PopupMenuWin::AddMenu(v2->m_pkPopupMenuWin, (int)a2, v5);
    }
  }
}

//----- (0048B720) --------------------------------------------------------
void __usercall GameFrameWork::AddPopupMenu_Trade(GameFrameWork *this@<ecx>, MHDiceGameTask *a2@<edi>)
{
  GameFrameWork *v2; // esi@1
  MHDiceGameTask *v3; // ecx@1
  bool v4; // bl@1
  PopupMenu *v5; // eax@8
  NiPointer<MHDiceGameTask> result; // [sp+10h] [bp-10h]@1
  int v7; // [sp+1Ch] [bp-4h]@1

  v2 = this;
  v3 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  v7 = 0;
  v4 = MHDiceGameTask::IsDicegamePlaying(v3) == 1;
  v7 = -1;
  if ( result.m_pObject )
  {
    a2 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( a2 )
        a2->vfptr->__vecDelDtor((NiRefObject *)a2, 1u);
    }
  }
  if ( !v4 && v2->m_bTargetIsMainChar != 1 )
  {
    if ( v2->m_pkTarget )
    {
      v5 = (PopupMenu *)PopupMenuTemplate::GetProposeTradeMenu((unsigned int)v2->m_pkTarget);
      PopupMenuWin::AddMenu(v2->m_pkPopupMenuWin, (int)a2, v5);
    }
  }
}

//----- (0048B7E0) --------------------------------------------------------
void __usercall GameFrameWork::AddPopupMenu_InviteGuild(GameFrameWork *this@<ecx>, MHDiceGameTask *a2@<edi>)
{
  GameFrameWork *v2; // esi@1
  MHDiceGameTask *v3; // ecx@1
  bool v4; // bl@1
  CClientGuild *v5; // eax@8
  PopupMenu *v6; // eax@9
  NiPointer<MHDiceGameTask> result; // [sp+10h] [bp-10h]@1
  int v8; // [sp+1Ch] [bp-4h]@1

  v2 = this;
  v3 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  v8 = 0;
  v4 = MHDiceGameTask::IsDicegamePlaying(v3) == 1;
  v8 = -1;
  if ( result.m_pObject )
  {
    a2 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( a2 )
        a2->vfptr->__vecDelDtor((NiRefObject *)a2, 1u);
    }
  }
  if ( !v4 && v2->m_bTargetIsMainChar != 1 && v2->m_pkTarget )
  {
    v5 = GuildTask::GetGuild();
    if ( CClientGuild::CanIInvite(v5) )
    {
      v6 = PopupMenuTemplate::GetInviteGuildMenu((unsigned int)v2->m_pcName);
      PopupMenuWin::AddMenu(v2->m_pkPopupMenuWin, (int)a2, v6);
    }
  }
}

//----- (0048B8B0) --------------------------------------------------------
void __usercall GameFrameWork::AddPopupMenu_InviteParty(GameFrameWork *this@<ecx>, MHDiceGameTask *a2@<edi>)
{
  GameFrameWork *v2; // esi@1
  MHDiceGameTask *v3; // ecx@1
  bool v4; // bl@1
  PopupMenu *v5; // eax@9
  NiPointer<MHDiceGameTask> result; // [sp+10h] [bp-10h]@1
  int v7; // [sp+1Ch] [bp-4h]@1

  v2 = this;
  v3 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  v7 = 0;
  v4 = MHDiceGameTask::IsDicegamePlaying(v3) == 1;
  v7 = -1;
  if ( result.m_pObject )
  {
    a2 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( a2 )
        a2->vfptr->__vecDelDtor((NiRefObject *)a2, 1u);
    }
  }
  if ( !v4
    && RaidInfo::IsMeRaidMember(&g_kRaidinfo) != 1
    && v2->m_bTargetIsPartyMember != 1
    && v2->m_bTargetIsMainChar != 1 )
  {
    v5 = (PopupMenu *)PopupMenuTemplate::GetInvitePartyMenu((unsigned int)v2->m_pcName);
    PopupMenuWin::AddMenu(v2->m_pkPopupMenuWin, (int)a2, v5);
  }
}

//----- (0048B980) --------------------------------------------------------
void __usercall GameFrameWork::AddPopupMenu_InviteFriend(GameFrameWork *this@<ecx>, MHDiceGameTask *a2@<edi>)
{
  GameFrameWork *v2; // esi@1
  MHDiceGameTask *v3; // ecx@1
  char *v4; // ST04_4@9
  PopupMenu *v5; // eax@10
  NiPointer<MHDiceGameTask> result; // [sp+10h] [bp-2Ch]@1
  bool v7; // [sp+17h] [bp-25h]@1
  char dest[4]; // [sp+18h] [bp-24h]@9
  int v9; // [sp+1Ch] [bp-20h]@9
  int v10; // [sp+20h] [bp-1Ch]@9
  int v11; // [sp+24h] [bp-18h]@9
  int v12; // [sp+28h] [bp-14h]@9
  int v13; // [sp+38h] [bp-4h]@1

  v2 = this;
  v3 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  v13 = 0;
  v7 = MHDiceGameTask::IsDicegamePlaying(v3) == 1;
  v13 = -1;
  if ( result.m_pObject )
  {
    a2 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( a2 )
        a2->vfptr->__vecDelDtor((NiRefObject *)a2, 1u);
    }
  }
  if ( !v7 && RaidInfo::IsMeRaidMember(&g_kRaidinfo) != 1 && v2->m_bTargetIsMainChar != 1 && v2->m_pkTarget )
  {
    v4 = v2->m_pcName;
    v12 = 0;
    v11 = 0;
    v10 = 0;
    v9 = 0;
    *(_DWORD *)dest = 0;
    strncpy(dest, v4, 0x14u);
    if ( GameFrameWork::IsFriend(v2, (Name5 *)dest) != 1 )
    {
      v5 = (PopupMenu *)PopupMenuTemplate::GetInviteFriendMenu((unsigned int)v2->m_pcName);
      PopupMenuWin::AddMenu(v2->m_pkPopupMenuWin, (int)a2, v5);
    }
  }
}

//----- (0048BA90) --------------------------------------------------------
void __usercall GameFrameWork::AddPopupMenu_Party(GameFrameWork *this@<ecx>, MHDiceGameTask *a2@<edi>)
{
  GameFrameWork *v2; // esi@1
  MHDiceGameTask *v3; // ecx@1
  bool v4; // bl@1
  PopupMenu *v5; // eax@10
  PopupMenu *v6; // eax@11
  PopupMenu *v7; // eax@15
  PopupMenu *v8; // eax@15
  NiPointer<MHDiceGameTask> result; // [sp+10h] [bp-10h]@1
  int v10; // [sp+1Ch] [bp-4h]@1

  v2 = this;
  v3 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  v10 = 0;
  v4 = MHDiceGameTask::IsDicegamePlaying(v3) == 1;
  v10 = -1;
  if ( result.m_pObject )
  {
    a2 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( a2 )
        a2->vfptr->__vecDelDtor((NiRefObject *)a2, 1u);
    }
  }
  if ( !v4 && RaidInfo::IsMeRaidMember(&g_kRaidinfo) != 1 )
  {
    if ( (unsigned __int8)Party::IsMePartyMaster(&g_kParty) == 1
      && v2->m_bTargetIsPartyMember == 1
      && !v2->m_bTargetIsMainChar )
    {
      v5 = (PopupMenu *)PopupMenuTemplate::GetFirePartyMemberMenu((unsigned int)v2->m_pcName);
      PopupMenuWin::AddMenu(v2->m_pkPopupMenuWin, (int)a2, v5);
      if ( v2->m_pkPartyInfo->m_ucStatus == 1 )
      {
        v6 = (PopupMenu *)PopupMenuTemplate::GetDelegatePartyChiefMenu((unsigned int)v2->m_pcName);
        PopupMenuWin::AddMenu(v2->m_pkPopupMenuWin, (int)a2, v6);
      }
    }
    if ( g_kParty.m_uiTotalMember && !v2->m_bTargetIsRaidMember && v2->m_bTargetIsMainChar == 1 )
    {
      v7 = PopupMenuTemplate::GetQuitPartyMenu();
      PopupMenuWin::AddMenu(v2->m_pkPopupMenuWin, (int)a2, v7);
      v8 = PopupMenuTemplate::GetPartyLootSetupMenu();
      PopupMenuWin::AddMenu(v2->m_pkPopupMenuWin, (int)a2, v8);
    }
  }
}

//----- (0048BBD0) --------------------------------------------------------
void __usercall GameFrameWork::AddPopupMenu_Raid(GameFrameWork *this@<ecx>, MHDiceGameTask *a2@<edi>)
{
  GameFrameWork *v2; // esi@1
  MHDiceGameTask *v3; // ecx@1
  bool v4; // bl@1
  PopupMenu *v5; // eax@10
  PopupMenu *v6; // eax@12
  RaidMemberInfo *v7; // eax@15
  _BYTE v8[20]; // ST00_20@15
  PopupMenu *v9; // eax@17
  PopupMenu *v10; // eax@19
  PopupMenu *v11; // eax@19
  RaidMemberInfo *v12; // eax@19
  _BYTE v13[20]; // ST00_20@19
  NiPointer<MHDiceGameTask> result; // [sp+10h] [bp-10h]@1
  int v15; // [sp+1Ch] [bp-4h]@1

  v2 = this;
  v3 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  v15 = 0;
  v4 = MHDiceGameTask::IsDicegamePlaying(v3) == 1;
  v15 = -1;
  if ( result.m_pObject )
  {
    a2 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( a2 )
        a2->vfptr->__vecDelDtor((NiRefObject *)a2, 1u);
    }
  }
  if ( !v4 && RaidInfo::IsMeRaidMember(&g_kRaidinfo) )
  {
    if ( v2->m_bTargetIsRaidMember )
    {
      if ( v2->m_bTargetIsMainChar == 1 )
        v6 = (PopupMenu *)PopupMenuTemplate::GetRaidMemberLeaveMenu((unsigned int)v2->m_pcName);
      else
        v6 = (PopupMenu *)PopupMenuTemplate::GetRaidMemberSelectMenu((unsigned int)v2->m_pcName);
      PopupMenuWin::AddMenu(v2->m_pkPopupMenuWin, (int)a2, v6);
      if ( g_kRaidinfo.m_bIsMeRaidLeader )
      {
        v7 = v2->m_pkRaidInfo;
        *(_DWORD *)v8 = v7->m_kCharID.n5_code[0];
        *(_QWORD *)&v8[4] = *(_QWORD *)&v7->m_kCharID.n5_code[1];
        *(_QWORD *)&v8[12] = *(_QWORD *)&v7->m_kCharID.n5_code[3];
        if ( !RaidInfo::IsLooter(&g_kRaidinfo, *(Name5 *)v8) && g_kRaidinfo.m_eLootType == 2 )
        {
          v9 = (PopupMenu *)PopupMenuTemplate::GetChangeRaidLooterMenu((unsigned int)v2->m_pcName);
          PopupMenuWin::AddMenu(v2->m_pkPopupMenuWin, (int)a2, v9);
        }
        if ( !v2->m_bTargetIsMainChar )
        {
          v10 = (PopupMenu *)PopupMenuTemplate::GetRaidMemberVanishMenu((unsigned int)v2->m_pcName);
          PopupMenuWin::AddMenu(v2->m_pkPopupMenuWin, (int)a2, v10);
          v11 = (PopupMenu *)PopupMenuTemplate::GetChangeRaidLeaderMenu((unsigned int)v2->m_pcName);
          PopupMenuWin::AddMenu(v2->m_pkPopupMenuWin, (int)a2, v11);
          v12 = v2->m_pkRaidInfo;
          *(_DWORD *)v13 = v12->m_kCharID.n5_code[0];
          *(_QWORD *)&v13[4] = *(_QWORD *)&v12->m_kCharID.n5_code[1];
          *(_QWORD *)&v13[12] = *(_QWORD *)&v12->m_kCharID.n5_code[3];
          if ( RaidInfo::IsSubLeader(&g_kRaidinfo, *(Name5 *)v13) )
            v5 = (PopupMenu *)PopupMenuTemplate::GetDownRaidSubLeaderMenu((unsigned int)v2->m_pcName);
          else
            v5 = (PopupMenu *)PopupMenuTemplate::GetUpRaidSubLeaderMenu((unsigned int)v2->m_pcName);
          goto LABEL_22;
        }
      }
    }
    else if ( g_kRaidinfo.m_bIsMeRaidLeader || g_kRaidinfo.m_bIsMeRaidSubLeader )
    {
      v5 = (PopupMenu *)PopupMenuTemplate::GetRaidMemberInviteMenu((unsigned int)v2->m_pcName);
LABEL_22:
      PopupMenuWin::AddMenu(v2->m_pkPopupMenuWin, (int)a2, v5);
      return;
    }
  }
}

//----- (0048BDE0) --------------------------------------------------------
void __thiscall GameFrameWork::AddPopupMenu_InviteHolyPromise(GameFrameWork *this)
{
  GameFrameWork *v1; // edi@1
  MHDiceGameTask *v2; // ecx@1
  bool v3; // bl@1
  MHDiceGameTask *v4; // esi@2
  PopupMenu *v5; // eax@7
  NiPointer<MHDiceGameTask> result; // [sp+10h] [bp-10h]@1
  int v7; // [sp+1Ch] [bp-4h]@1

  v1 = this;
  v2 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  v7 = 0;
  v3 = MHDiceGameTask::IsDicegamePlaying(v2) == 1;
  v7 = -1;
  if ( result.m_pObject )
  {
    v4 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
  }
  if ( !v3 && v1->m_bTargetIsMainChar != 1 )
  {
    v5 = PopupMenuTemplate::GetInviteHighHolyPromise((unsigned int)v1->m_pcName);
    PopupMenuWin::AddMenu(v1->m_pkPopupMenuWin, (int)v1, v5);
  }
}

//----- (0048BE90) --------------------------------------------------------
void __thiscall GameFrameWork::AddPopupMenu_RideOn(GameFrameWork *this)
{
  GameFrameWork *v1; // edi@1
  int v2; // esi@5
  int v3; // eax@5
  float v4; // ST08_4@5
  float v5; // ST0C_4@5
  float v6; // ST10_4@5
  float v7; // ST14_4@5
  float v8; // ST14_4@5
  Mover *v9; // ecx@6
  PopupMenu *v10; // eax@10

  v1 = this;
  if ( this->m_bTargetIsMainChar != 1
    && this->m_pkTarget
    && (this->m_bTargetIsPartyMember || this->m_bTargetIsRaidMember) )
  {
    v2 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
    v3 = ((int (*)(void))v1->m_pkTarget->vfptr[6].Deaffect)();
    v4 = *(float *)v3 - *(float *)v2;
    v5 = *(float *)(v3 + 4) - *(float *)(v2 + 4);
    v6 = *(float *)(v3 + 8) - *(float *)(v2 + 8);
    v7 = v5 * v5 + v4 * v4 + v6 * v6;
    v8 = sqrt(v7);
    if ( v8 <= 300.0 )
    {
      v9 = v1->m_pkTarget->m_pkMover;
      if ( v9 )
      {
        if ( Mover::IsEmptySlot(v9)
          && (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[15].Deaffect)() != 1
          && !g_pkMainChar->m_pkMover )
        {
          v10 = (PopupMenu *)PopupMenuTemplate::GetRideOnMenu((unsigned int)v1->m_pcName);
          PopupMenuWin::AddMenu(v1->m_pkPopupMenuWin, (int)v1, v10);
        }
      }
    }
  }
}

//----- (0048BFA0) --------------------------------------------------------
void __thiscall GameFrameWork::OpenResolutionPopup(GameFrameWork *this)
{
  unsigned int v1; // edi@1
  NiDX9SystemDesc *v2; // eax@1
  unsigned int v3; // ebx@1
  NiDX9AdapterDesc *v4; // eax@2
  unsigned int v5; // ecx@4
  _BYTE *v6; // esi@4
  NiDX9AdapterDesc::ModeDesc *v7; // eax@6
  unsigned int v8; // ecx@7
  unsigned int v9; // eax@8
  PopupMenu *v10; // eax@11
  bool *v11; // eax@14
  signed int v12; // ecx@14
  unsigned int v13; // ebx@18
  NiDX9AdapterDesc::ModeDesc *v14; // eax@19
  unsigned int v15; // edx@20
  unsigned int v16; // eax@21
  unsigned int v17; // ecx@21
  PopupMenu *v18; // eax@26
  bool *v19; // eax@29
  signed int v20; // ecx@29
  PopupMenu *v21; // eax@31
  unsigned int systemScreenHeight; // [sp+Ch] [bp-14h]@4
  unsigned int systemScreenWidth; // [sp+10h] [bp-10h]@4
  unsigned int WinResNum; // [sp+14h] [bp-Ch]@17
  unsigned int uiModeCount; // [sp+18h] [bp-8h]@4
  GameFrameWork *v26; // [sp+1Ch] [bp-4h]@1

  v1 = (unsigned int)this;
  v26 = this;
  PopupMenuWin::Clear(this->m_pkPopupMenuWin);
  v2 = NiDX9Renderer::GetSystemDesc();
  v3 = 0;
  ms_pkInfo_1 = v2;
  if ( v2->m_kAdapterList.m_uiSize )
    v4 = *v2->m_kAdapterList.m_pBase;
  else
    v4 = 0;
  v5 = v4->m_kModeList.m_uiSize;
  ms_pkAdapter_1 = v4;
  uiModeCount = v5;
  systemScreenWidth = GetSystemMetrics(0);
  systemScreenHeight = GetSystemMetrics(1);
  v6 = (_BYTE *)(v1 + 164);
  if ( MachineOpt::ms_kGraphicOption.bWindowFullMode )
  {
    do
    {
      v1 = 0;
      if ( uiModeCount )
      {
        do
        {
          v7 = ms_pkAdapter_1->m_kModeList.m_pBase[v1];
          if ( !*v6 )
          {
            v8 = v7->m_uiWidth;
            if ( v7->m_uiWidth == *((_DWORD *)v6 - 2) )
            {
              v9 = v7->m_uiHeight;
              if ( v9 == *((_DWORD *)v6 - 1) && (v8 != 800 || v9 != 600) )
              {
                v10 = (PopupMenu *)PopupMenuTemplate::GetResolutionMenu(v3);
                PopupMenuWin::AddMenu(v26->m_pkPopupMenuWin, v1, v10);
                *v6 = 1;
              }
            }
          }
          ++v1;
        }
        while ( v1 < uiModeCount );
      }
      ++v3;
      v6 += 16;
    }
    while ( v3 < 0x15 );
    v11 = &v26->m_ResList[0].m_bCheckAdd;
    v12 = 21;
    do
    {
      *v11 = 0;
      v11 += 16;
      --v12;
    }
    while ( v12 );
  }
  else
  {
    WinResNum = 0;
    do
    {
      v13 = 0;
      if ( uiModeCount )
      {
        do
        {
          v14 = ms_pkAdapter_1->m_kModeList.m_pBase[v13];
          if ( !*v6 )
          {
            v1 = v14->m_uiWidth;
            v15 = *((_DWORD *)v6 - 2);
            if ( v14->m_uiWidth == v15 )
            {
              v16 = v14->m_uiHeight;
              v17 = *((_DWORD *)v6 - 1);
              if ( v16 == v17 && systemScreenWidth >= v15 && systemScreenHeight >= v17 && (v1 != 800 || v16 != 600) )
              {
                v18 = (PopupMenu *)PopupMenuTemplate::GetResolutionMenu(WinResNum);
                PopupMenuWin::AddMenu(v26->m_pkPopupMenuWin, v1, v18);
                *v6 = 1;
              }
            }
          }
          ++v13;
        }
        while ( v13 < uiModeCount );
      }
      v6 += 16;
      ++WinResNum;
    }
    while ( WinResNum < 0x15 );
    v19 = &v26->m_ResList[0].m_bCheckAdd;
    v20 = 21;
    do
    {
      *v19 = 0;
      v19 += 16;
      --v20;
    }
    while ( v20 );
  }
  v21 = PopupMenuTemplate::GetCancelMenu();
  PopupMenuWin::AddMenu(v26->m_pkPopupMenuWin, v1, v21);
  PopupMenuWin::FinishMenu(v26->m_pkPopupMenuWin, 0);
  ((void (__stdcall *)(unsigned int, int))v26->m_pkPopupMenuWin->vfptr[77].__vecDelDtor)(PgWin::ms_iMsX, PgWin::ms_iMsY);
  PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v26->m_pkPopupMenuWin->vfptr);
}

//----- (0048C190) --------------------------------------------------------
bool GameFrameWork::IsCapableKeyControl()
{
  return !g_pkMainChar->m_kAbStateProperty.iUnMovableCount
      && g_pkMainChar->m_kAbStateProperty.iFearCount <= 0
      && g_pkMainChar->m_kAbStateProperty.iKarenCaptivateStateCount <= 0
      && !(unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[10].Affect)();
}

//----- (0048C1C0) --------------------------------------------------------
char GameFrameWork::UpdateCursorState()
{
  int v1; // eax@1
  CursorState *v2; // eax@2
  char result; // al@7

  v1 = Singleton<CursorState>::m_pInstance;
  if ( !Singleton<CursorState>::m_pInstance )
  {
    v2 = (CursorState *)operator new(8u);
    if ( v2 )
      CursorState::CursorState(v2);
    else
      v1 = 0;
    Singleton<CursorState>::m_pInstance = v1;
  }
  if ( *(_DWORD *)(v1 + 4) == 1 )
  {
    Cursor::SetCursor((Cursor::Type)15);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8BAE8: using guessed type int Singleton<CursorState>::m_pInstance;

//----- (0048C250) --------------------------------------------------------
int __cdecl GameFrameWork::CollisionCallback(NiCollisionGroup::Intersect *kIntersect)
{
  NiRefObjectVtbl *v1; // esi@1
  NiRefObjectVtbl *v2; // edi@1
  int result; // eax@1
  double v4; // st7@3
  double v5; // st6@3
  signed int v6; // eax@5
  signed int v7; // ecx@5
  signed int v8; // edx@5
  double v9; // st7@10
  int v10; // eax@10
  int v11; // ecx@10
  double v12; // st6@10
  float v13; // ST08_4@10
  double v14; // st6@10
  float v15; // ST0C_4@10
  double v16; // st7@10
  NiPoint3 pos3AxisTwo; // [sp+14h] [bp-20h]@10
  NiPoint3 pos3AxisOne; // [sp+20h] [bp-14h]@10
  float f1; // [sp+2Ch] [bp-8h]@3
  float f0; // [sp+30h] [bp-4h]@3
  int nSigna; // [sp+3Ch] [bp+8h]@3
  int nSignb; // [sp+3Ch] [bp+8h]@3
  int nSign; // [sp+3Ch] [bp+8h]@3
  int nSignc; // [sp+3Ch] [bp+8h]@10

  v1 = kIntersect->pkObj0->m_spCollisionObject.m_pObject[5].vfptr;
  v2 = kIntersect->pkObj1->m_spCollisionObject.m_pObject[4].vfptr;
  result = (*((int (__thiscall **)(_DWORD))v2->__vecDelDtor + 3))(kIntersect->pkObj1->m_spCollisionObject.m_pObject[4].vfptr);
  if ( result == 1 )
  {
    if ( (char *)++v1->__vecDelDtor > (char *)1 )
      return result;
    v1[1].__vecDelDtor = (void *(__thiscall *)(NiRefObject *, unsigned int))v2;
    *(float *)&nSigna = fabs(*(float *)&v2[6].__vecDelDtor);
    f0 = *(float *)&nSigna;
    *(float *)&nSignb = fabs(*(float *)&v2[9].__vecDelDtor);
    f1 = *(float *)&nSignb;
    *(float *)&nSign = fabs(*(float *)&v2[12].__vecDelDtor);
    v4 = f0;
    v5 = f1;
    if ( f1 >= (double)f0 )
    {
      if ( *(float *)&nSign >= v5 )
      {
        nSign = (signed int)(*(float *)&v2[12].__vecDelDtor / *(float *)&nSign);
        v6 = 0;
        v7 = 1;
        v8 = 2;
      }
      else
      {
        nSign = (signed int)(*(float *)&v2[9].__vecDelDtor / v5);
        v6 = 2;
        v7 = 0;
        v8 = 1;
      }
    }
    else if ( *(float *)&nSign >= v4 )
    {
      v6 = nSign;
      v7 = nSign;
      v8 = nSign;
    }
    else
    {
      nSign = (signed int)(*(float *)&v2[6].__vecDelDtor / v4);
      v6 = 1;
      v7 = 2;
      v8 = 0;
    }
    v1[11].__vecDelDtor = (void *(__thiscall *)(NiRefObject *, unsigned int))v6;
    v1[13].__vecDelDtor = (void *(__thiscall *)(NiRefObject *, unsigned int))v8;
    v1[12].__vecDelDtor = (void *(__thiscall *)(NiRefObject *, unsigned int))v7;
    *(float *)&nSignc = (double)nSign;
    v9 = *(float *)&v2[3 * v6 + 4].__vecDelDtor;
    v10 = (int)&v2[3 * v6 + 4];
    v11 = 3 * v7;
    pos3AxisTwo.x = v9 * *(float *)&nSignc;
    pos3AxisTwo.y = *(float *)(v10 + 4) * *(float *)&nSignc;
    v12 = *(float *)(v10 + 8);
    pos3AxisOne = pos3AxisTwo;
    pos3AxisTwo.z = v12 * *(float *)&nSignc;
    v13 = *(float *)&v2[v11 + 4].__vecDelDtor * *(float *)&nSignc;
    v14 = *(float *)&v2[v11 + 5].__vecDelDtor;
    pos3AxisTwo.x = v13;
    v15 = v14 * *(float *)&nSignc;
    v16 = *(float *)&nSignc * *(float *)&v2[v11 + 6].__vecDelDtor;
    pos3AxisTwo.y = v15;
    pos3AxisTwo.z = 0.0;
    pos3AxisOne.z = 0.0;
    NiPoint3::Unitize(&pos3AxisOne);
    NiPoint3::Unitize(&pos3AxisTwo);
    *(NiPoint3 *)&v1[2].__vecDelDtor = pos3AxisOne;
    *(NiPoint3 *)&v1[5].__vecDelDtor = pos3AxisTwo;
    *(float *)&v1[8].__vecDelDtor = 0.0;
    *(float *)&v1[9].__vecDelDtor = 0.0;
    *(float *)&v1[10].__vecDelDtor = 1.0;
  }
  return 0;
}

//----- (0048C410) --------------------------------------------------------
void __thiscall GameFrameWork::OnPickGround(GameFrameWork *this, NiPoint3 *kGroundPos, bool bViewPoint)
{
  GameFrameWork *v3; // ebx@1
  NiPoint3 *v4; // edi@7
  NiUnsharedGeometryGroup *v5; // eax@8
  NiUnsharedGeometryGroup *v6; // eax@14
  NiUnsharedGeometryGroup *v7; // eax@16
  MapNavigator *v8; // esi@17
  GTInformWin *v9; // esi@19
  D3DXCOLOR *v10; // eax@20
  D3DXCOLOR v11; // ST04_16@20
  char *v12; // eax@20
  _BYTE v13[12]; // ST10_12@22
  D3DXCOLOR result; // [sp+14h] [bp-10h]@20

  v3 = this;
  if ( unk_A8E19E )
  {
    unk_A8E19E = 0;
    return;
  }
  if ( !(unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[1].AddAbStateByAbstateIndex)() )
  {
    if ( g_pkMainChar->m_pkMover )
    {
      if ( g_pkMainChar->m_uiMoverSlot )
      {
        GameFrameWork::sRideOffValue::SetMove(&v3->m_kRideOffValue, kGroundPos, bViewPoint);
        GameFrameWork::NcMoverRideOffReq(v3);
        return;
      }
      if ( !Char::IsMoverMovable(g_pkMainChar) )
        return;
    }
    v4 = kGroundPos;
    if ( World::IsBlock(&g_kWorld, kGroundPos->x, kGroundPos->y) == 1 )
    {
      v5 = TextData::Get(0x2D517FA1u);
      GameFrameWork::AddSysMsg(v3, (const char *)v5);
    }
    else if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[1].Deaffect)() )
    {
      if ( g_pkMainChar->m_kAbStateProperty.iUnMovableCount )
      {
        if ( AbStateInfectee::IsInList((AbStateInfectee *)&g_pkMainChar->vfptr, STA_CANNOTCHANGETARGET) == 1 )
        {
          if ( MainChar::GetIsNotTargetChangeAndNotMoveMsg((MainChar *)g_pkMainChar) )
          {
            v6 = TextData2::Get(0xB62B2F22);
            GameFrameWork::AddSysMsg(v3, (const char *)v6);
            MainChar::SetIsNotTargetChangeAndNotMoveMsg((MainChar *)g_pkMainChar, 0);
          }
        }
        else if ( !v3->m_bPlayPuzzle )
        {
          v7 = TextData2::Get(0x26598D91u);
          GameFrameWork::AddSysMsg(v3, (const char *)v7);
        }
      }
      else
      {
        v8 = MapNavigator::GetMapNavigator((NiPointer<MapNavigator> *)&kGroundPos)->m_pObject;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&kGroundPos);
        if ( v8 )
        {
          if ( v8->m_bIsWorking )
          {
            v8->m_bIsWorking = 0;
            v9 = v3->m_pkAutoRunMsgWin;
            if ( v9 )
            {
              GTInformWin::Clear(v3->m_pkAutoRunMsgWin);
              v10 = Color::GetDxColor(&result, -1, -112, 0, -1);
              *(_QWORD *)&v11.r = *(_QWORD *)&v10->r;
              *(_QWORD *)&v11.b = *(_QWORD *)&v10->b;
              v12 = (char *)TextData2::Get(0x3C517589u);
              GTInformWin::AddText(v9, v12, v11, 0, 3.0);
            }
          }
        }
        if ( bViewPoint )
        {
          *(float *)v13 = v4->x;
          *(_QWORD *)&v13[4] = *(_QWORD *)&v4->y;
          World::ShowMoveTargetPoint(&g_kWorld, *(NiPoint3 *)v13);
        }
        else
        {
          dword_B25060->m_uFlags |= 1u;
        }
        g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[7].dwEffectIndex[0] = 0;
        MainChar::SetStartReserveAct((MainChar *)g_pkMainChar, RESERVEACT_PICKGROUND);
        MainChar::SetRevserveMovePos((MainChar *)g_pkMainChar, v4);
        MainChar::StartMoveTarget((MainChar *)g_pkMainChar);
      }
    }
  }
}

//----- (0048C670) --------------------------------------------------------
char __thiscall GameFrameWork::OnOnePickChar(GameFrameWork *this, Char *pkChar)
{
  GameFrameWork *v2; // edi@1
  char v4; // al@5
  signed int v5; // ST04_4@14
  MobInfo *v6; // eax@17
  BasicInfoLinkType v7; // eax@18

  v2 = this;
  if ( !pkChar )
  {
    GameFrameWork::CancelCharSelect();
    return 0;
  }
  if ( !GameFrameWork::TargetCharReq(this, pkChar) )
    return 0;
  v4 = g_pkMainChar->m_byMode;
  if ( v4 == 4 || v4 == 5 )
    return 0;
  if ( (unsigned __int8)((int (__thiscall *)(_DWORD))pkChar->vfptr[1].Affect)(pkChar) && Char::IsNPC(pkChar) )
    MainChar::SetReserveAct((MainChar *)g_pkMainChar, RESERVEACT_PICKCHAR);
  if ( (unsigned __int8)((int (__thiscall *)(_DWORD))pkChar->vfptr[1].AddAbStateByAbstateIndex)(pkChar) )
    MainChar::SetReserveAct((MainChar *)g_pkMainChar, RESERVEACT_PICKCHAR);
  if ( (unsigned __int8)((int (__thiscall *)(_DWORD))pkChar->vfptr[1].Affect)(pkChar) )
  {
    if ( Char::IsNPC(pkChar) )
    {
      v5 = Char::IsLinkGate(pkChar) != 0 ? 120 : 3;
      GameFrameWork::OpenPlayGuideWin(v2, (BasicInfoLinkType)v5);
    }
    else if ( Char::IsResource(pkChar) )
    {
      GameFrameWork::OpenPlayGuideWin(v2, BIL_PRODUCTION_3);
    }
  }
  v6 = Char::GetMobInfo(pkChar);
  if ( v6 )
  {
    v7 = BasicInfoLinkTab::GetbyCType(BIL_C_MOB_CLICK, v6->InxName);
    if ( v7 )
      GameFrameWork::OpenPlayGuideWin(v2, v7);
  }
  return 1;
}

//----- (0048C760) --------------------------------------------------------
void __thiscall GameFrameWork::OnDoublePickChar(GameFrameWork *this, Char *pkChar)
{
  GameFrameWork *v2; // edi@1
  Char *v3; // esi@4
  MainChar *v4; // ecx@10
  int v5; // eax@13
  MainChar *v6; // ecx@13
  MapNavigator *v7; // esi@23
  GTInformWin *v8; // esi@25
  D3DXCOLOR *v9; // eax@26
  D3DXCOLOR v10; // ST04_16@26
  char *v11; // eax@26
  D3DXCOLOR result; // [sp+10h] [bp-10h]@26

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[15].Deaffect)() )
  {
    GameFrameWork::OnOnePickChar(v2, pkChar);
  }
  else if ( g_pkMainChar->m_byMode != 4 )
  {
    v3 = pkChar;
    if ( pkChar )
    {
      if ( !(unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[1].AddAbStateByAbstateIndex)()
        && Char::IsMoverMovable(g_pkMainChar)
        && !(unsigned __int8)((int (*)(void))v2->m_pkPrivateStoreWin->vfptr[65].__vecDelDtor)() )
      {
        if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v3->vfptr[1].AddAbStateByAbstateIndex)(v3)
          && v3->m_byMode == 5 )
        {
          v4 = (MainChar *)g_pkMainChar;
          if ( g_pkMainChar->m_byMode == 2 )
          {
            Char::SetMode(g_pkMainChar, 1);
            GameFrameWork::NcActChangeModeReq(v2, 1);
            v4 = (MainChar *)g_pkMainChar;
          }
          MainChar::SetReserveAct(v4, RESERVEACT_PICKCHAR);
          BYTE2(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[7].dwEffectIndex[1]) = 0;
        }
        else
        {
          v5 = MainChar::GetTargetType((MainChar *)g_pkMainChar, v3);
          v6 = (MainChar *)g_pkMainChar;
          if ( v5 == 3
            || g_pkMainChar->m_kAbStateProperty.iKarenCaptivateStateCount <= 0
            && v3->m_kAbStateProperty.iKarenCaptivateStateCount > 0 )
          {
            if ( g_pkMainChar->m_byMode == 1 )
            {
              Char::SetMode(g_pkMainChar, 2);
              GameFrameWork::NcActChangeModeReq(v2, 2);
              v6 = (MainChar *)g_pkMainChar;
            }
            MainChar::SetReserveAct(v6, RESERVEACT_PICKCHAR);
            BYTE2(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[7].dwEffectIndex[1]) = 0;
          }
          else if ( Char::IsNPC(v3) == 1 )
          {
            MainChar::SetReserveAct((MainChar *)g_pkMainChar, RESERVEACT_PICKCHAR);
            BYTE2(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[7].dwEffectIndex[1]) = 0;
          }
          if ( v2->m_pkStickChar )
            GameFrameWork::Stick(v2, 0, 0);
          v7 = MapNavigator::GetMapNavigator((NiPointer<MapNavigator> *)&pkChar)->m_pObject;
          NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkChar);
          if ( v7 )
          {
            if ( v7->m_bIsWorking )
            {
              v7->m_bIsWorking = 0;
              v8 = v2->m_pkAutoRunMsgWin;
              if ( v8 )
              {
                GTInformWin::Clear(v2->m_pkAutoRunMsgWin);
                v9 = Color::GetDxColor(&result, -1, -112, 0, -1);
                *(_QWORD *)&v10.r = *(_QWORD *)&v9->r;
                *(_QWORD *)&v10.b = *(_QWORD *)&v9->b;
                v11 = (char *)TextData2::Get(0x3C517589u);
                GTInformWin::AddText(v8, v11, v10, 0, 3.0);
              }
            }
          }
        }
      }
    }
  }
}

//----- (0048C960) --------------------------------------------------------
void __thiscall GameFrameWork::OnPickDropItem(GameFrameWork *this, DropItem *pkDropItem)
{
  GameFrameWork *v2; // ebx@1
  NiUnsharedGeometryGroup *v3; // eax@2
  int v4; // eax@5
  ItemInfo *v5; // eax@6
  NiUnsharedGeometryGroup *v6; // eax@10
  ItemInfo *v7; // eax@11
  int v8; // edi@11

  v2 = this;
  if ( CharShape::IsSpactralGlowEnable(&g_pkMainChar->m_kCharShape) )
  {
    v3 = TextData2::Get(0x72B4E9C5u);
    GameFrameWork::AddSysMsg(v2, (const char *)v3);
    return;
  }
  if ( InventoryWin::ms_bGetDropItemActionReady && pkDropItem )
  {
    v4 = pkDropItem->m_kItemID;
    if ( (_WORD)v4 == 1302 )
      goto LABEL_20;
    v5 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(v4);
    if ( !v5 )
      return;
    if ( (v5->MaxLot != 1 || Inventory::GetTotalInv(&g_kInventory) < 192)
      && Inventory::IsReaminSlot(&g_kInventory, pkDropItem->m_kItemID) )
    {
LABEL_20:
      v7 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(pkDropItem->m_kItemID);
      v8 = (int)v7;
      if ( v7
        && CItemAuthorityBase::IA_IsDataAccBelonged(&g_kItemAuthority, v7->BT_Inx)
        && !CItemAuthorityBase::IA_IsDataPutOnBelonged(&g_kItemAuthority, *(E_BelongType *)(v8 + 274))
        && *(_DWORD *)(v8 + 98) != 3
        && (RollingDiceMsgWin::SetItemInfo(v2->m_pkRollingDiceMsgWin, v8, pkDropItem->m_kItemID, pkDropItem->m_kHandle),
            v2->m_pkRollingDiceMsgWin) )
      {
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkRollingDiceMsgWin->vfptr);
      }
      else
      {
        GameFrameWork::NcItemPickReq(v2, pkDropItem->m_kHandle);
      }
    }
    else
    {
      v6 = TextData::Get(0xF4F9E3F0);
      GameFrameWork::AddSysMsg(v2, (const char *)v6);
    }
  }
}
// A70797: using guessed type bool InventoryWin::ms_bGetDropItemActionReady;

//----- (0048CAA0) --------------------------------------------------------
void __userpurge GameFrameWork::OpenCharPopupMenu(GameFrameWork *this@<ecx>, MHDiceGameTask *a2@<edi>, char *pcName)
{
  GameFrameWork *v3; // esi@1
  PopupMenu *v4; // eax@2
  PopupMenu *v5; // eax@5
  PopupMenu *v6; // eax@7
  PopupMenu *v7; // eax@11
  unsigned int v8; // eax@14
  PopupMenu *v9; // eax@15
  PopupMenuWin *v10; // ecx@16
  PopupMenu *v11; // eax@18

  v3 = this;
  PopupMenuWin::Clear(this->m_pkPopupMenuWin);
  GameFrameWork::SetPopupInfo(v3, pcName);
  if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[20].Deaffect)() )
  {
    v4 = PopupMenuTemplate::GetMainCharUnMetamorphosis();
    PopupMenuWin::AddMenu(v3->m_pkPopupMenuWin, (int)a2, v4);
  }
  if ( v3->m_bTargetIsMainChar != 1 && v3->m_pkTarget )
  {
    v5 = PopupMenuTemplate::GetTargetCharName((unsigned int)v3->m_pcName);
    PopupMenuWin::AddMenu(v3->m_pkPopupMenuWin, (int)a2, v5);
  }
  GameFrameWork::AddPopupMenu_Collection(v3, a2);
  GameFrameWork::AddPopupMenu_Trade(v3, a2);
  GameFrameWork::AddPopupMenu_InviteGuild(v3, a2);
  GameFrameWork::AddPopupMenu_InviteParty(v3, a2);
  GameFrameWork::AddPopupMenu_Party(v3, a2);
  GameFrameWork::AddPopupMenu_Raid(v3, a2);
  if ( v3->m_bTargetIsMainChar != 1 )
  {
    v6 = PopupMenuTemplate::GetChatWhisperMenu((unsigned int)v3->m_pcName);
    PopupMenuWin::AddMenu(v3->m_pkPopupMenuWin, (int)a2, v6);
  }
  if ( v3->m_bTargetIsPartyMember || v3->m_bTargetIsRaidMember && v3->m_bTargetIsMainChar != 1 )
  {
    v7 = PopupMenuTemplate::GetPartyBuffMenu((unsigned int)v3->m_pcName);
    PopupMenuWin::AddMenu(v3->m_pkPopupMenuWin, (int)a2, v7);
  }
  GameFrameWork::AddPopupMenu_Follow(v3);
  GameFrameWork::AddPopupMenu_InviteHolyPromise(v3);
  GameFrameWork::AddPopupMenu_RideOn(v3);
  if ( v3->m_bTargetIsMainChar != 1 && v3->m_eFieldMapType == 1 )
  {
    v8 = KingdomQuestWin::GetJoinQuestHandle(v3->m_pkKingDomQuest);
    if ( GameFrameWork::IsVotePossible(v3, v8) )
    {
      v9 = (PopupMenu *)PopupMenuTemplate::GetVoteMenu((unsigned int)v3->m_pcName);
      PopupMenuWin::AddMenu(v3->m_pkPopupMenuWin, (int)a2, v9);
    }
  }
  GameFrameWork::AddPopupMenu_InviteFriend(v3, a2);
  v10 = v3->m_pkPopupMenuWin;
  if ( v10->m_dwMenuCount )
  {
    v11 = PopupMenuTemplate::GetCancelMenu();
    PopupMenuWin::AddMenu(v3->m_pkPopupMenuWin, (int)a2, v11);
    PopupMenuWin::FinishMenu(v3->m_pkPopupMenuWin, 0);
    ((void (__stdcall *)(_DWORD, _DWORD))v3->m_pkPopupMenuWin->vfptr[77].__vecDelDtor)(PgWin::ms_iMsX, PgWin::ms_iMsY);
    PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v3->m_pkPopupMenuWin->vfptr);
  }
  else
  {
    PopupMenuWin::Clear(v10);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkPopupMenuWin->vfptr);
  }
}

//----- (0048CC80) --------------------------------------------------------
void __userpurge GameFrameWork::OpenRaidMemberPopupMenu(GameFrameWork *this@<ecx>, MHDiceGameTask *a2@<edi>, char *pcName)
{
  GameFrameWork *v3; // esi@1
  PopupMenu *v4; // eax@2
  PopupMenu *v5; // eax@6
  PopupMenuWin *v6; // ecx@7
  PopupMenu *v7; // eax@9

  v3 = this;
  PopupMenuWin::Clear(this->m_pkPopupMenuWin);
  GameFrameWork::SetPopupInfo(v3, pcName);
  GameFrameWork::AddPopupMenu_Raid(v3, a2);
  if ( v3->m_bTargetIsMainChar != 1 )
  {
    v4 = PopupMenuTemplate::GetChatWhisperMenu((unsigned int)v3->m_pcName);
    PopupMenuWin::AddMenu(v3->m_pkPopupMenuWin, (int)a2, v4);
  }
  if ( v3->m_bTargetIsPartyMember || v3->m_bTargetIsRaidMember && v3->m_bTargetIsMainChar != 1 )
  {
    v5 = PopupMenuTemplate::GetPartyBuffMenu((unsigned int)v3->m_pcName);
    PopupMenuWin::AddMenu(v3->m_pkPopupMenuWin, (int)a2, v5);
  }
  v6 = v3->m_pkPopupMenuWin;
  if ( v6->m_dwMenuCount )
  {
    v7 = PopupMenuTemplate::GetCancelMenu();
    PopupMenuWin::AddMenu(v3->m_pkPopupMenuWin, (int)a2, v7);
    PopupMenuWin::FinishMenu(v3->m_pkPopupMenuWin, 0);
    ((void (__stdcall *)(_DWORD, _DWORD))v3->m_pkPopupMenuWin->vfptr[77].__vecDelDtor)(PgWin::ms_iMsX, PgWin::ms_iMsY);
    PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v3->m_pkPopupMenuWin->vfptr);
  }
  else
  {
    PopupMenuWin::Clear(v6);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkPopupMenuWin->vfptr);
  }
}

//----- (0048CD80) --------------------------------------------------------
void __userpurge GameFrameWork::OpenKQTeamPopupMenu(GameFrameWork *this@<ecx>, MHDiceGameTask *a2@<edi>, char *pcName)
{
  GameFrameWork *v3; // esi@1
  PopupMenu *v4; // eax@2
  PopupMenu *v5; // eax@5
  PopupMenu *v6; // eax@7
  unsigned int v7; // eax@10
  PopupMenu *v8; // eax@11
  PopupMenuWin *v9; // ecx@12
  PopupMenu *v10; // eax@14

  v3 = this;
  PopupMenuWin::Clear(this->m_pkPopupMenuWin);
  GameFrameWork::SetPopupInfo(v3, pcName);
  if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[20].Deaffect)() )
  {
    v4 = PopupMenuTemplate::GetMainCharUnMetamorphosis();
    PopupMenuWin::AddMenu(v3->m_pkPopupMenuWin, (int)a2, v4);
  }
  if ( v3->m_bTargetIsMainChar != 1 && v3->m_pkTarget )
  {
    v5 = PopupMenuTemplate::GetTargetCharName((unsigned int)v3->m_pcName);
    PopupMenuWin::AddMenu(v3->m_pkPopupMenuWin, (int)a2, v5);
  }
  GameFrameWork::AddPopupMenu_Collection(v3, a2);
  GameFrameWork::AddPopupMenu_Trade(v3, a2);
  GameFrameWork::AddPopupMenu_InviteGuild(v3, a2);
  if ( v3->m_bTargetIsMainChar != 1 )
  {
    v6 = PopupMenuTemplate::GetChatWhisperMenu((unsigned int)v3->m_pcName);
    PopupMenuWin::AddMenu(v3->m_pkPopupMenuWin, (int)a2, v6);
  }
  GameFrameWork::AddPopupMenu_Follow(v3);
  GameFrameWork::AddPopupMenu_InviteHolyPromise(v3);
  GameFrameWork::AddPopupMenu_RideOn(v3);
  if ( v3->m_bTargetIsMainChar != 1 && v3->m_eFieldMapType == 1 )
  {
    v7 = KingdomQuestWin::GetJoinQuestHandle(v3->m_pkKingDomQuest);
    if ( GameFrameWork::IsVotePossible(v3, v7) )
    {
      v8 = (PopupMenu *)PopupMenuTemplate::GetVoteMenu((unsigned int)v3->m_pcName);
      PopupMenuWin::AddMenu(v3->m_pkPopupMenuWin, (int)a2, v8);
    }
  }
  GameFrameWork::AddPopupMenu_InviteFriend(v3, a2);
  v9 = v3->m_pkPopupMenuWin;
  if ( v9->m_dwMenuCount )
  {
    v10 = PopupMenuTemplate::GetCancelMenu();
    PopupMenuWin::AddMenu(v3->m_pkPopupMenuWin, (int)a2, v10);
    PopupMenuWin::FinishMenu(v3->m_pkPopupMenuWin, 0);
    ((void (__stdcall *)(_DWORD, _DWORD))v3->m_pkPopupMenuWin->vfptr[77].__vecDelDtor)(PgWin::ms_iMsX, PgWin::ms_iMsY);
    PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v3->m_pkPopupMenuWin->vfptr);
  }
  else
  {
    PopupMenuWin::Clear(v9);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkPopupMenuWin->vfptr);
  }
}

//----- (0048CF10) --------------------------------------------------------
char __stdcall GameFrameWork::TranslatePickedMHObj(NiPoint3 *kGroundPos)
{
  NiPoint3 *v2; // esi@1
  int v3; // eax@6
  mhObject *v5; // edi@8
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v6; // ecx@9
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v7; // eax@11
  bool v8; // zf@14
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v9; // ecx@15
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v10; // eax@17
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v11; // ecx@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v12; // eax@23
  __int16 v13; // ax@26
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v14; // ecx@29
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v15; // eax@31
  float v16; // ecx@35
  float v17; // edx@35
  int v18; // eax@35
  float v19; // esi@35
  char kGroundPos_2; // [sp+1Eh] [bp+Ah]@14
  char kGroundPos_2a; // [sp+1Eh] [bp+Ah]@20

  v2 = kGroundPos;
  if ( kGroundPos->x == *(float *)(unk_A9944C + 88)
    && kGroundPos->y == *(float *)(unk_A9944C + 92)
    && kGroundPos->z == *(float *)(unk_A9944C + 96) )
  {
    return 1;
  }
  if ( nowState != 3 )
  {
    if ( nowState != 5 || stru_A9941C._Mysize <= 5 )
      return 1;
    v14 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)mhRoomFloorName_0._Bx._Ptr;
    if ( mhRoomFloorName_0._Myres < 0x10 )
      v14 = &mhRoomFloorName_0;
    v15 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)stru_A9941C._Bx._Ptr;
    if ( stru_A9941C._Myres < 0x10 )
      v15 = &stru_A9941C;
    v8 = _mbsnbcmp(v15->_Bx._Buf, v14->_Bx._Buf, mhRoomFloorName_0._Mysize) == 0;
    goto LABEL_34;
  }
  if ( stru_A9941C._Mysize > 5 )
  {
    v3 = MiniHouseIndoor::GetPickedObjID(&g_kWorld.m_MiniHouseIndoorMode);
    if ( v3 == -1 )
      return 0;
    v5 = mhObjectManager::GetObjectA(&stru_A993C8, v3);
    if ( !v5 )
      return 0;
    v6 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)mhRoomFloorName_0._Bx._Ptr;
    if ( mhRoomFloorName_0._Myres < 0x10 )
      v6 = &mhRoomFloorName_0;
    v7 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)stru_A9941C._Bx._Ptr;
    if ( stru_A9941C._Myres < 0x10 )
      v7 = &stru_A9941C;
    if ( _mbsnbcmp(v7->_Bx._Buf, v6->_Bx._Buf, mhRoomFloorName_0._Mysize) )
    {
      v9 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)mhRoomWallName_0._Bx._Ptr;
      if ( mhRoomWallName_0._Myres < 0x10 )
        v9 = &mhRoomWallName_0;
      v10 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)stru_A9941C._Bx._Ptr;
      if ( stru_A9941C._Myres < 0x10 )
        v10 = &stru_A9941C;
      if ( _mbsnbcmp(v10->_Bx._Buf, v9->_Bx._Buf, mhRoomWallName_0._Mysize) )
      {
        v11 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)mhRoomRoofName_0._Bx._Ptr;
        if ( mhRoomRoofName_0._Myres < 0x10 )
          v11 = &mhRoomRoofName_0;
        v12 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)stru_A9941C._Bx._Ptr;
        if ( stru_A9941C._Myres < 0x10 )
          v12 = &stru_A9941C;
        if ( _mbsnbcmp(v12->_Bx._Buf, v11->_Bx._Buf, mhRoomRoofName_0._Mysize) )
          return 1;
        v13 = *(_WORD *)&v5->m_BindType.m_byBindType[0];
        v8 = v5->m_BindType.m_byBindType[2] == 1;
      }
      else
      {
        kGroundPos_2a = v5->m_BindType.m_byBindType[2];
        v8 = (unsigned __int8)*(_WORD *)&v5->m_BindType.m_byBindType[0] == 1;
      }
    }
    else
    {
      v8 = *(_WORD *)&v5->m_BindType.m_byBindType[0] >> 8 == 1;
      kGroundPos_2 = v5->m_BindType.m_byBindType[2];
    }
LABEL_34:
    if ( v8 )
    {
      v16 = v2->x;
      v17 = v2->y;
      v18 = unk_A9944C;
      v19 = v2->z;
      *(float *)(unk_A9944C + 88) = v16;
      *(float *)(v18 + 92) = v17;
      *(float *)(v18 + 96) = v19;
    }
  }
  return 1;
}

//----- (0048D110) --------------------------------------------------------
void __thiscall GameFrameWork::OnPickChar(GameFrameWork *this, Char *pkChar)
{
  Char *v2; // esi@1
  GameFrameWork *v3; // ebx@1
  Name3 *v4; // eax@8
  MobInfo *v5; // edi@9
  char v6; // cl@13
  Char *v7; // esi@15
  NiPoint3 kDirToMainChar; // [sp+8h] [bp-Ch]@8

  v2 = pkChar;
  v3 = this;
  if ( pkChar
    && pkChar != g_pkMainChar
    && !PrivateStoreWin::ms_bPrivateStoreWin
    && !AbStateInfectee::FindAbstateInstBySubAbstateType((AbStateInfectee *)&g_pkMainChar->vfptr, SUBAB_BLIND) )
  {
    MainChar::SetStartReserveAct((MainChar *)g_pkMainChar, 0);
    if ( (Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1] == v2 )
      GameFrameWork::OnDoublePickChar(v3, v2);
    else
      GameFrameWork::OnOnePickChar(v3, v2);
    v4 = World::GetMapName(&g_kWorld, (Name3 *)&kDirToMainChar);
    if ( MapInfoTab::GetByMapName(v4) )
    {
      v5 = IIDTableBase<MobInfo,MobInfoTab,unsigned short>::GetByID(v2->m_kCharShape.m_kMobID);
      if ( v5 )
      {
        if ( Char::IsNPC(v2) && v5->Type == 15 )
        {
          LOWORD(pkChar) = v2->m_kHandle;
          NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x1Du, 0xCAu, &pkChar, 2);
        }
      }
    }
    v6 = g_pkMainChar->m_byMode;
    if ( v6 != 4 && v6 != 5 )
    {
      v7 = (Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1];
      if ( v7 )
      {
        Char::GetDirToChar(v7, &kDirToMainChar, g_pkMainChar);
        if ( v7->m_byMode == 5 && NiPoint3::Length(&kDirToMainChar) < 150.0 )
          GameFrameWork::NcBoothEntryReq(v3, v7->m_kHandle);
      }
    }
  }
}
// A8D482: using guessed type bool PrivateStoreWin::ms_bPrivateStoreWin;

//----- (0048D240) --------------------------------------------------------
void __thiscall GameFrameWork::OnPickCharWithRBut(GameFrameWork *this, Char *pkChar)
{
  GameFrameWork *v2; // edi@1
  char *v3; // eax@9

  v2 = this;
  if ( pkChar && pkChar != g_pkMainChar )
  {
    if ( (Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1] != pkChar )
    {
      if ( !GameFrameWork::TargetCharReq(this, pkChar) )
        return;
      if ( Char::IsNPC(pkChar) )
        MainChar::SetReserveAct((MainChar *)g_pkMainChar, RESERVEACT_PICKCHAR);
    }
    if ( pkChar->m_bUserCharacter )
    {
      if ( unk_A9943C <= 1 )
      {
        v3 = (char *)((int (__thiscall *)(_DWORD))pkChar->vfptr[2].DeleteAbStateByAbstateIndex)(pkChar);
        GameFrameWork::OpenCharPopupMenu(v2, (MHDiceGameTask *)v2, v3);
      }
    }
  }
}

//----- (0048D2B0) --------------------------------------------------------
char __thiscall GameFrameWork::ProcessMHInput(GameFrameWork *this, World::PickEnum ePick, NiPoint3 *kOrigin, NiPoint3 *kDir, Char **pkChar, NiPoint3 *kGroundPos, DropItem **pkDropItem)
{
  GameFrameWork *v7; // esi@1
  mhMouseControlWin *v8; // ecx@2
  unsigned int v9; // eax@2
  mhMouseControlWin *v10; // ecx@2
  unsigned int v11; // eax@2
  signed int v12; // eax@3
  World::PickEnum v13; // ebx@3
  char *v14; // eax@7
  MsgBox *v15; // eax@7
  char v17; // al@14
  _BYTE v18[12]; // ST08_12@17
  tagPOINT kPoint; // [sp+Ch] [bp-30h]@2
  Char **v20; // [sp+14h] [bp-28h]@1
  NiRefObjectVtbl *v21; // [sp+18h] [bp-24h]@2
  tagPOINT NewMousePos; // [sp+1Ch] [bp-20h]@1
  PgMsg::Frame kOkMsg; // [sp+24h] [bp-18h]@7

  v20 = pkChar;
  v7 = this;
  NewMousePos.y = (int)kDir;
  if ( (signed int)nowState >= 1 )
  {
    GetCursorPos(&kPoint);
    v8 = v7->m_pkMHMouseControlWin;
    v21 = v7->m_pkMHMouseControlWin->vfptr;
    v9 = mhMouseControlWin::GetCenterX(v8);
    v21[43].__vecDelDtor((NiRefObject *)v7->m_pkMHMouseControlWin, kPoint.x - v9);
    v10 = v7->m_pkMHMouseControlWin;
    v21 = v10->vfptr;
    v11 = mhMouseControlWin::GetCenterY(v10);
    v21[44].__vecDelDtor((NiRefObject *)v7->m_pkMHMouseControlWin, kPoint.y - v11);
    if ( dword_B64790 < 1 )
    {
      v13 = ePick;
      goto LABEL_12;
    }
    v12 = World::PickSomethingProcess(&g_kWorld, kOrigin, (NiPoint3 *)NewMousePos.y, v20, kGroundPos);
    v13 = v12;
    if ( v12 >= 6 )
    {
      if ( v12 <= 7 )
      {
        mhMouseControlWin::SetCtrlDown(v7->m_pkMHMouseControlWin, 0);
      }
      else if ( v12 == 9 )
      {
        if ( !unk_B6484C )
        {
          v14 = (char *)TextData2::Get(0x3E3F4992u);
          v15 = MsgBox::Modal(MSGBOX_OKCANCEL, v14);
          kOkMsg.m_uiFrameMsg = 227;
          kOkMsg.m_uiFramelParam = 0;
          MsgBox::SetFrameWorkMsgOnClose(v15, (PgFrameWork *)&v7->vfptr, &kOkMsg, 0);
        }
        goto LABEL_12;
      }
    }
    if ( v13 == 7 )
      return 1;
LABEL_12:
    if ( !unk_A9944C || v13 == 5 )
      return 0;
    v17 = ((unsigned __int8)g_pkKeyboard->m_aucKeystate[3] >> 5) & 1;
    if ( v17 && !(g_pkKeyboard->m_aucKeystateLastUpdate[3] & 0x20) && !(g_pkKeyboard->m_aucKeystate[7] & 1) )
    {
      GetCursorPos(&NewMousePos);
      *(_QWORD *)v18 = *(_QWORD *)&kGroundPos->x;
      *(float *)&v18[8] = kGroundPos->z;
      MiniHouseIndoor::SetMouseDownStartPos(&g_kWorld.m_MiniHouseIndoorMode, NewMousePos, *(NiPoint3 *)v18, 0);
      mhMouseControlWin::SetCtrlDown(v7->m_pkMHMouseControlWin, 1);
      return 0;
    }
    if ( !v17 )
      goto LABEL_32;
    if ( !(g_pkKeyboard->m_aucKeystate[7] & 1) )
    {
      GetCursorPos(&NewMousePos);
      MiniHouseIndoor::PickedObjRotate(&g_kWorld.m_MiniHouseIndoorMode, NewMousePos, 0);
      return 0;
    }
    if ( !v17 )
    {
LABEL_32:
      if ( g_pkKeyboard->m_aucKeystateLastUpdate[3] & 0x20 )
      {
        SetCursorPos(dword_A99458, dword_A9945C);
        mhMouseControlWin::SetCtrlDown(v7->m_pkMHMouseControlWin, 0);
        return 0;
      }
    }
    GameFrameWork::TranslatePickedMHObj(kGroundPos);
    return 0;
  }
  if ( nowState == MH_STATE_NO
    || dword_B64790 < 1
    || World::PickMHObj(&g_kWorld, nowState, kOrigin, kDir, kGroundPos, 0) != 8 )
  {
    return 0;
  }
  return 1;
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;
// B64790: using guessed type int dword_B64790;

//----- (0048D4F0) --------------------------------------------------------
void __thiscall GameFrameWork::SetMHRClickMenu(GameFrameWork *this, mhObject *pPickedObj)
{
  mhObject *v2; // ebx@2
  int v3; // esi@3
  int v4; // edi@3
  int v5; // edi@4
  _DWORD *v6; // eax@7
  MiniHouseFurniture *v7; // eax@10
  MiniHouseObjAni *v8; // eax@12
  MiniHouseObjAni *v9; // esi@12
  signed int v10; // eax@14
  unsigned __int16 v11; // cx@16
  GameFrameWork *v12; // [sp+0h] [bp-4h]@1
  MiniHouseFurniture *pFurInfo; // [sp+Ch] [bp+8h]@10

  v12 = this;
  if ( (signed int)nowState <= 1 )
  {
    v2 = pPickedObj;
    if ( pPickedObj )
    {
      v3 = pPickedObj->m_iResGUID;
      v4 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              pPickedObj->m_iResGUID) )
      {
        if ( (unsigned __int16)v3 <= *(_WORD *)(v4 + 200) )
        {
          v6 = (_DWORD *)(*(_DWORD *)(v4 + 196) + 4 * (unsigned __int16)v3);
          v5 = *v6 ? *v6 : 0;
        }
        else
        {
          v5 = 0;
        }
      }
      else
      {
        v5 = 0;
      }
      v7 = MiniHouseFuritureInfoTab::GetObjByName((char *)(v5 + 2));
      pFurInfo = v7;
      if ( v5 )
      {
        if ( word_A99532 == v2->m_iGUID )
        {
          v8 = MiniHouseObjAniInfoTab::GetObjInfobyAniGroup(v2->m_iResGUID, 0x7530u, 0);
          v9 = v8;
          if ( !v8 )
            goto LABEL_22;
          if ( v8->AniGroupIDMaxNum > 1u )
          {
            v10 = rand();
            v9 = ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::GetByIndex(v10 % v9->AniGroupIDMaxNum + v9->Handle);
          }
          if ( v9 )
          {
            v11 = v2->m_iGUID;
            unk_A99534 = v9->Handle;
            word_A99532 = v11;
            if ( pFurInfo )
              GameFrameWork::OnOpenMHPopUpMenuObjAction(
                v12,
                (int)v2,
                v5 + 34,
                (char *)(v5 + 34),
                v2,
                pFurInfo->Grip != 0,
                1);
          }
          else
          {
LABEL_22:
            GameFrameWork::OnOpenMHPopUpMenuObjAction(
              v12,
              (int)v2,
              v5 + 34,
              (char *)(v5 + 34),
              v2,
              pFurInfo->Grip != 0,
              0);
          }
        }
        else
        {
          GameFrameWork::OnOpenMHPopUpMenuObjAction(v12, (int)v2, v5 + 34, (char *)(v5 + 34), v2, v7->Grip != 0, 0);
        }
      }
    }
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0048D620) --------------------------------------------------------
void __thiscall GameFrameWork::OnPickMiniHouse(GameFrameWork *this, unsigned __int16 hMinihouse)
{
  GameFrameWork *v2; // edi@1
  stMINIHOUSEINFO *v3; // eax@3
  unsigned int v4; // edx@4
  unsigned int v5; // edx@4
  unsigned int v6; // eax@4
  char *v7; // eax@4
  MsgBox *v8; // eax@4
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > > result; // [sp+8h] [bp-4Ch]@2
  unsigned __int16 _Keyval[2]; // [sp+Ch] [bp-48h]@2
  PgMsg::Frame kCancelMsg; // [sp+10h] [bp-44h]@5
  PgMsg::Frame kOkMsg; // [sp+24h] [bp-30h]@5
  char acName[21]; // [sp+38h] [bp-1Ch]@4

  v2 = this;
  if ( !unk_B6484C )
  {
    *(_DWORD *)_Keyval = hMinihouse;
    std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,long>>,0>>::find(
      &g_kMiniHouseMgr,
      &result,
      _Keyval);
    if ( result._Ptr != (std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *)stru_B5C138._Ptr )
    {
      v3 = result._Ptr->_Myval.second;
      if ( v3 )
      {
        v4 = v3->charid.n5_code[1];
        *(_DWORD *)acName = v3->charid.n5_code[0];
        *(_DWORD *)&acName[8] = v3->charid.n5_code[2];
        *(_DWORD *)&acName[4] = v4;
        v5 = v3->charid.n5_code[3];
        v6 = v3->charid.n5_code[4];
        *(_DWORD *)&acName[12] = v5;
        *(_DWORD *)&acName[16] = v6;
        acName[20] = 0;
        v7 = (char *)TextData2::Get(0x7E97E3DFu);
        v8 = MsgBox::Modal(MSGBOX_OKCANCEL, v7, acName);
        if ( v8 )
        {
          kOkMsg.m_uiFrameWParam = hMinihouse;
          kOkMsg.m_uiFrameMsg = 242;
          kCancelMsg.m_uiFrameMsg = 243;
          MsgBox::SetFrameWorkMsgOnClose(v8, (PgFrameWork *)&v2->vfptr, &kOkMsg, &kCancelMsg);
        }
      }
    }
  }
}

//----- (0048D6F0) --------------------------------------------------------
void __thiscall GameFrameWork::ProcessInput(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  InventoryWin *v2; // esi@13
  InventoryWin *v3; // edi@16
  RandomOptCountRecoverWin *v4; // ecx@21
  char v5; // bl@21
  char v6; // al@29
  signed int v7; // eax@35
  Char *v8; // eax@38
  Char *v9; // edi@38
  stMINIHOUSEINFO *v10; // eax@44
  ExpeditionWin *v11; // ecx@47
  int v12; // eax@51
  int v13; // edx@51
  double v14; // st7@51
  int v15; // eax@51
  KeyboardMoveProcess *v16; // ecx@54
  MapNavigator *v17; // edi@56
  GTInformWin *v18; // edi@58
  D3DXCOLOR *v19; // eax@59
  D3DXCOLOR v20; // ST08_16@59
  char *v21; // eax@59
  char v22; // cl@62
  ChatDisplayWin2 *v23; // ecx@64
  char *v24; // eax@65
  ChatDisplayWin2 *v25; // ecx@68
  char *v26; // eax@69
  NiNode *v27; // eax@75
  NiNode *v28; // eax@76
  mhObject *v29; // eax@76
  mhObject *v30; // ebx@76
  MiniHouseObjAni *v31; // eax@77
  MiniHouseObjAni *v32; // edi@77
  signed int v33; // eax@79
  unsigned __int16 v34; // ax@81
  signed __int16 v35; // cx@85
  NiNode *v36; // eax@95
  NiNode *v37; // eax@96
  mhObject *v38; // eax@96
  _BYTE v39[12]; // ST0C_12@105
  _BYTE v40[12]; // ST00_12@105
  signed int v41; // edi@108
  GuildListWin *v42; // eax@112
  GuildListWin *v43; // eax@113
  GuildTournamentBaseWin *v44; // eax@115
  GuildTournamentBaseWin *v45; // eax@116
  ExpeditionWin *v46; // ecx@121
  MobType v47; // eax@130
  QuestHelperMgr *v48; // edi@134
  NiPoint3 *v49; // eax@137
  _BYTE v50[12]; // ST14_12@137
  ChatDisplayWin2 *v51; // ecx@145
  char v52; // bl@145
  int v53; // eax@146
  StatusBuffWin *v54; // ecx@151
  int v55; // eax@152
  StatusBuffWin *v56; // ecx@157
  int v57; // eax@158
  StatusBuffWin *v58; // ecx@163
  int v59; // eax@164
  ExpeditionWin *v60; // ecx@170
  ChatDisplayWin *v61; // ecx@173
  int v62; // eax@174
  ItemInfo *v63; // edi@190
  Item *v64; // ecx@193
  int v65; // edi@195
  int v66; // edi@195
  int v67; // eax@195
  D3DXCOLOR result; // [sp+10h] [bp-34h]@12
  NiPoint3 kGroundPos; // [sp+20h] [bp-24h]@35
  float v70; // [sp+2Ch] [bp-18h]@51
  tagPOINT Point; // [sp+30h] [bp-14h]@12
  DropItem *pkDropItem; // [sp+38h] [bp-Ch]@12
  int hMiniHouseHandle; // [sp+3Ch] [bp-8h]@33
  Char *pkChar; // [sp+40h] [bp-4h]@12

  v1 = this;
  if ( unk_B2534C == 1 )
  {
    Cursor::SetCursor((Cursor::Type)12);
    if ( g_pkKeyboard->m_aucKeystate[0] & 2 )
    {
      if ( !(unsigned __int8)ChatDisplayWin2::IsDuringEdit(v1->m_pkChatDisplayWin) )
        unk_B2534C = 2;
    }
    return;
  }
  if ( unk_B25350 == 1 )
  {
    Cursor::SetCursor((Cursor::Type)13);
    if ( InventoryWin::ms_uiMode != 7 )
      InventoryWin::OnCreateNewSocket(v1->m_pkInventoryWin, 0);
    if ( !(g_pkKeyboard->m_aucKeystate[0] & 2) || (unsigned __int8)ChatDisplayWin2::IsDuringEdit(v1->m_pkChatDisplayWin) )
    {
      if ( dword_B64790 >= 1
        && World::Pick(
             &g_kWorld,
             &v1->m_kCameraRayOrigin,
             &v1->m_kCameraRayDir,
             (Char **)&Point.y,
             (NiPoint3 *)&result.g,
             &pkDropItem,
             (unsigned __int16 *)&pkChar) == 2 )
      {
        v2 = v1->m_pkInventoryWin;
        if ( v2 )
          InventoryWin::OnCreateNewSocket(v2, 0);
      }
    }
    else
    {
      unk_B25350 = 2;
    }
    return;
  }
  if ( unk_B25354 == 1 )
  {
    Cursor::SetCursor((Cursor::Type)14);
    v3 = v1->m_pkInventoryWin;
    if ( InventoryWin::ms_uiMode != 9 )
      InventoryWin::OnResetRecoverCountState(v1->m_pkInventoryWin);
    if ( !(g_pkKeyboard->m_aucKeystate[0] & 2) || (unsigned __int8)ChatDisplayWin2::IsDuringEdit(v1->m_pkChatDisplayWin) )
    {
      v4 = v3->m_pkRandomOptCountRecoverWin;
      v5 = 1;
      if ( v4 && (unsigned __int8)((int (*)(void))v4->vfptr[65].__vecDelDtor)() == 1 )
        v5 = 0;
      if ( dword_B64790 >= 1
        && v5
        && World::Pick(
             &g_kWorld,
             &v1->m_kCameraRayOrigin,
             &v1->m_kCameraRayDir,
             (Char **)&pkDropItem,
             (NiPoint3 *)&result.g,
             (DropItem **)&Point.y,
             (unsigned __int16 *)&pkChar) == 2 )
      {
        InventoryWin::OnResetRecoverCountState(v3);
      }
    }
    else
    {
      unk_B25354 = 2;
    }
    return;
  }
  KeyMap::Process(this->m_spKeyMap.m_pObject);
  Singleton<CursorState>::getInstance();
  if ( GameFrameWork::UpdateCursorState() != 1 )
  {
    v6 = g_pkKeyboard->m_aucKeystate[15];
    if ( v6 >= 0 )
    {
      if ( v6 & 4 )
        World::AddCameraZoom(&g_kWorld, 70);
    }
    else
    {
      World::AddCameraZoom(&g_kWorld, -70);
    }
    GameFrameWork::UpdateCheckTab(v1);
    GameFrameWork::UpdateSmartWhisper(v1);
    GameFrameWork::UpdateSmartReply(v1);
    NiCamera::WindowPointToRay(
      pkWorldCamera,
      PgWin::ms_iMsX,
      PgWin::ms_iMsY,
      &v1->m_kCameraRayOrigin,
      &v1->m_kCameraRayDir);
    hMiniHouseHandle = 0xFFFF;
    if ( nowState == MH_STATE_NO
      || !dword_A99408
      || (v7 = World::Pick(
                 &g_kWorld,
                 &v1->m_kCameraRayOrigin,
                 &v1->m_kCameraRayDir,
                 (Char **)&pkDropItem,
                 &kGroundPos,
                 (DropItem **)&pkChar,
                 (unsigned __int16 *)&hMiniHouseHandle),
          GameFrameWork::ProcessMHInput(
            v1,
            (World::PickEnum)v7,
            &v1->m_kCameraRayOrigin,
            &v1->m_kCameraRayDir,
            (Char **)&pkDropItem,
            &kGroundPos,
            (DropItem **)&pkChar) != 1) )
    {
      if ( dword_B64790 >= 1 )
      {
        if ( g_ClickedPrivateStoreBD )
        {
          v8 = CharMgr::GetChar(&g_kCharMgr, g_ClickedPrivateStoreBD->m_kCharHandle);
          v9 = v8;
          if ( v8 && v8->m_byMode == 5 )
          {
            ((void (__thiscall *)(Char *))v8->vfptr[2].DeleteAbStateByAbstateIndex)(v8);
            GameFrameWork::OnPickChar(v1, v9);
            goto LABEL_41;
          }
        }
        else if ( g_ClickedMiniHouseBD )
        {
          v10 = CGuildMonster::GetGuildEumFromMob(
                  (CMiniHouseMgr *)&g_kMiniHouseMgr,
                  g_ClickedMiniHouseBD->m_kCharHandle);
          if ( v10 )
          {
            GameFrameWork::OnPickMiniHouse(v1, v10->handle);
LABEL_41:
            if ( dword_B64790 )
              --dword_B64790;
            return;
          }
        }
        if ( dword_B64790 >= 1 )
        {
          v11 = v1->m_pkExpeditionWin;
          if ( v11 )
          {
            if ( (ExpeditionWin *)unk_B64884 != v11 && v11->m_bIsSelecteSlot )
              ExpeditionWin::ClickReset(v11);
          }
        }
      }
      v12 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
      v1->m_kCharMover.m_pos3CurPos.x = *(float *)v12;
      v1->m_kCharMover.m_pos3CurPos.y = *(float *)(v12 + 4);
      v1->m_kCharMover.m_pos3CurPos.z = *(float *)(v12 + 8);
      v70 = pkWorldCamera->m_kWorld.m_Rotate.m_pEntry[0][0];
      *(float *)&Point.x = pkWorldCamera->m_kWorld.m_Rotate.m_pEntry[1][0];
      v13 = Point.x;
      v14 = pkWorldCamera->m_kWorld.m_Rotate.m_pEntry[2][0];
      v1->m_kCharMover.m_pos3CameraDir.x = v70;
      *(float *)&Point.y = v14;
      v15 = Point.y;
      LODWORD(v1->m_kCharMover.m_pos3CameraDir.y) = v13;
      LODWORD(v1->m_kCharMover.m_pos3CameraDir.z) = v15;
      if ( dword_B647A8 >= 1 && dword_B64784 >= 1 && GameFrameWork::IsCapableKeyControl() == 1 )
      {
        v16 = &v1->m_kCharMover;
        v16->m_bKeyDown = 1;
        v16->m_bDownFront = 1;
        if ( v1->m_kCharMover.m_bAutoRun )
          KeyboardMoveProcess::SetAutoRun(v16, 0);
        v17 = MapNavigator::GetMapNavigator((NiPointer<MapNavigator> *)&pkDropItem)->m_pObject;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkDropItem);
        if ( v17 )
        {
          if ( v17->m_bIsWorking )
          {
            v17->m_bIsWorking = 0;
            v18 = v1->m_pkAutoRunMsgWin;
            if ( v18 )
            {
              GTInformWin::Clear(v1->m_pkAutoRunMsgWin);
              v19 = Color::GetDxColor(&result, -1, -112, 0, -1);
              *(_QWORD *)&v20.r = *(_QWORD *)&v19->r;
              *(_QWORD *)&v20.b = *(_QWORD *)&v19->b;
              v21 = (char *)TextData2::Get(0x3C517589u);
              GTInformWin::AddText(v18, v21, v20, 0, 3.0);
            }
          }
        }
      }
      if ( (unsigned __int8)ChatDisplayWin2::IsDuringEdit(v1->m_pkChatDisplayWin)
        && v1->m_kSmartWhisper.m_eState == SWS_NORMAL )
      {
        v22 = g_pkKeyboard->m_aucKeystate[15];
        if ( v22 & 2 || !(g_pkKeyboard->m_aucKeystateLastUpdate[15] & 2) )
        {
          if ( v22 & 0x40 || !(g_pkKeyboard->m_aucKeystateLastUpdate[15] & 0x40) )
          {
            if ( !(g_pkKeyboard->m_aucKeystate[1] & 0x80) && g_pkKeyboard->m_aucKeystateLastUpdate[1] & 0x80 )
              ChatDisplayWin2::SetWhisperEditFocus(v1->m_pkChatDisplayWin);
          }
          else
          {
            v25 = v1->m_pkChatDisplayWin;
            if ( !ChatDisplayWin2::IsOnCandList() )
            {
              v26 = ChatCommandList::GetDownCommand(&v1->m_kChatComList);
              ChatDisplayWin2::ChatStart(v1->m_pkChatDisplayWin, v26);
            }
          }
        }
        else
        {
          v23 = v1->m_pkChatDisplayWin;
          if ( !ChatDisplayWin2::IsOnCandList() )
          {
            v24 = ChatCommandList::GetUpCommand(&v1->m_kChatComList);
            ChatDisplayWin2::ChatStart(v1->m_pkChatDisplayWin, v24);
          }
        }
      }
      if ( PgWin::ms_kbRbutPressed.m_iBool < 1 )
        goto LABEL_88;
      dword_A8CA70 = 1;
      GetCursorPos(&Point);
      dword_A8CA6C = Point.x;
      dword_A8CA68 = Point.y;
      Cursor::Show(0);
      if ( (signed int)nowState > 1 )
        goto LABEL_88;
      v27 = (NiNode *)World::GetCandidatePickObj(&g_kWorld, &v1->m_kCameraRayOrigin, &v1->m_kCameraRayDir, &kGroundPos);
      if ( v27 )
      {
        v28 = mhObjectManager::FindRootNode(v27);
        v29 = mhObjectManager::GetObjectA(&stru_A993C8, v28);
        v30 = v29;
        if ( v29 )
        {
          v31 = MiniHouseObjAniInfoTab::GetObjInfobyAniGroup(v29->m_iResGUID, 0x7530u, 0);
          v32 = v31;
          if ( v31 )
          {
            if ( v31->AniGroupIDMaxNum > 1u )
            {
              v33 = rand();
              v32 = ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::GetByIndex(v33 % v32->AniGroupIDMaxNum + v32->Handle);
            }
            if ( v32 )
            {
              v34 = v32->Handle;
              word_A99532 = v30->m_iGUID;
              unk_A99534 = v34;
            }
          }
          if ( unk_A99564 == -1 )
            unk_A99564 = v30->m_iGUID;
          goto LABEL_88;
        }
        *(_DWORD *)&word_A99532 = -1;
        if ( unk_A99564 != -1 )
        {
LABEL_88:
          if ( dword_A8CA70 )
          {
            World::AddCameraRotate(&g_kWorld, PgWin::ms_iMsDeltaX, PgWin::ms_iMsDeltaY);
            if ( PgWin::ms_iMsDeltaX || PgWin::ms_iMsDeltaY )
              byte_A8CA64 = 1;
            SetCursorPos(dword_A8CA6C, dword_A8CA68);
            if ( dword_A8CA70 )
            {
              if ( !g_pkMouse->m_akButtons[1].m_bPressed )
              {
                dword_A8CA70 = 0;
                Cursor::Show(1);
                if ( (signed int)nowState <= 1 )
                {
                  v36 = (NiNode *)World::GetCandidatePickObj(
                                    &g_kWorld,
                                    &v1->m_kCameraRayOrigin,
                                    &v1->m_kCameraRayDir,
                                    &kGroundPos);
                  if ( v36 )
                  {
                    v37 = mhObjectManager::FindRootNode(v36);
                    v38 = mhObjectManager::GetObjectA(&stru_A993C8, v37);
                    if ( v38 )
                    {
                      if ( unk_A99564 == LOWORD(v38->m_iGUID) )
                        GameFrameWork::SetMHRClickMenu(v1, v38);
                    }
                  }
                  unk_A99564 = -1;
                }
              }
            }
          }
          if ( PgWin::ms_iMsDeltaZ && !unk_B6488C && !v1->m_bUIScroll )
            World::AddCameraZoom(&g_kWorld, PgWin::ms_iMsDeltaZ);
          g_pkMouseOverDropItem = 0;
          if ( v1->m_kSkillCasting.eState == 1 )
          {
            Cursor::SetCursor((Cursor::Type)5);
            *(float *)v39 = v1->m_kCameraRayDir.x;
            *(_QWORD *)&v39[4] = *(_QWORD *)&v1->m_kCameraRayDir.y;
            *(float *)v40 = v1->m_kCameraRayOrigin.x;
            *(_QWORD *)&v40[4] = *(_QWORD *)&v1->m_kCameraRayOrigin.y;
            World::GetAdvGroundPos(
              &g_kWorld,
              *(NiPoint3 *)v40,
              *(NiPoint3 *)v39,
              (NiPoint3 *)&result.g,
              (float *)&Point.y);
            World::SetMagicCirclePos(&g_kWorld, (NiPoint3 *)&result.g);
            World::SetMagicCircleEnable(&g_kWorld, 1);
          }
          else
          {
            World::SetMagicCircleEnable(&g_kWorld, 0);
            g_pkMouseOvereMob = 0;
            if ( unk_B64884 || PgWin::ms_pkCapture )
            {
              v41 = 0;
            }
            else
            {
              v41 = World::PickWithoutGround(
                      &g_kWorld,
                      &v1->m_kCameraRayOrigin,
                      &v1->m_kCameraRayDir,
                      &pkChar,
                      &pkDropItem,
                      (unsigned __int16 *)&hMiniHouseHandle);
              if ( g_pkMouse->m_akButtons[0].m_bPressed )
              {
                if ( (unsigned __int8)ChatDisplayWin2::IsDuringEdit(v1->m_pkChatDisplayWin) == 1 )
                  ChatDisplayWin2::ShowChatEditBox(v1->m_pkChatDisplayWin, 0);
                if ( GuildListTask::GetGuildListWin() )
                {
                  v42 = GuildListTask::GetGuildListWin();
                  if ( (unsigned __int8)((int (*)(void))v42->m_spEdit.m_pObject->vfptr[122].__vecDelDtor)() == 1 )
                  {
                    v43 = GuildListTask::GetGuildListWin();
                    GuildListWin::EditKillForus(v43);
                  }
                }
                if ( GuildTask::GetGuildTournamnetBaseWin() )
                {
                  v44 = GuildTask::GetGuildTournamnetBaseWin();
                  if ( (unsigned __int8)((int (*)(void))v44->m_pkGTRequestListWin->m_spEdit.m_pObject->vfptr[122].__vecDelDtor)() == 1 )
                  {
                    v45 = GuildTask::GetGuildTournamnetBaseWin();
                    GTRequestListWin::EditKillForus(v45->m_pkGTRequestListWin);
                  }
                }
                PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMHEmotionWin->vfptr);
              }
            }
            switch ( v41 )
            {
              case 1:
                g_pkMouseOvereMob = pkChar;
                if ( dword_B64790 >= 1 )
                {
                  v46 = v1->m_pkExpeditionWin;
                  if ( v46 )
                    ExpeditionWin::ClickReset(v46);
                }
                if ( Char::IsResource(pkChar) )
                {
                  switch ( MainChar::GetObjType(pkChar) )
                  {
                    case 4:
                    case 6:
                    case 7:
                      Cursor::SetCursor((Cursor::Type)7);
                      break;
                    case 5:
                    case 8:
                      Cursor::SetCursor((Cursor::Type)8);
                      break;
                    default:
                      goto LABEL_183;
                  }
                }
                else if ( Char::IsNPC(pkChar) )
                {
                  if ( !Char::IsLinkGate(pkChar) )
                  {
                    if ( !(unsigned __int8)((int (*)(void))pkChar->vfptr[1].Affect)()
                      || (v47 = IIDTableBase<MobInfo,MobInfoTab,unsigned short>::GetByID(pkChar->m_kCharShape.m_kMobID)->Type,
                          v47 != 24)
                      && v47 != 29 )
                    {
                      Cursor::SetCursor((Cursor::Type)6);
                    }
                  }
                }
                else if ( MainChar::GetTargetType((MainChar *)g_pkMainChar, pkChar) == 3 )
                {
                  v48 = QuestHelperMgr::GetInstance();
                  if ( v48 )
                  {
                    if ( (unsigned __int8)((int (*)(void))pkChar->vfptr[1].Affect)() )
                    {
                      QuestHelperMgr::AddConditionToolTip(v48, pkChar);
                      if ( strlen(QuestHelperMgr::GetConditionText(v48)) )
                      {
                        v49 = Char::GetHeightPos(pkChar, 0, (NiPoint3 *)&result.g);
                        *(float *)v50 = v49->x;
                        *(_QWORD *)&v50[4] = *(_QWORD *)&v49->y;
                        QuestHelperMgr::MoveConditionToolTip(v48, (int)v48, (int)v1, *(NiPoint3 *)v50);
                        ((void (*)(void))g_pkToolTipWin->vfptr[138].__vecDelDtor)();
                      }
                    }
                  }
                  Cursor::SetCursor((Cursor::Type)1);
                }
                break;
              case 3:
                if ( g_pkMouse->m_akButtons[0].m_bPressed )
                {
                  Cursor::SetCursor((Cursor::Type)3);
                }
                else
                {
                  Cursor::SetCursor((Cursor::Type)2);
                  g_pkMouseOverDropItem = pkDropItem;
                }
                break;
              case 0:
              case 4:
                if ( nowState == 2 && !(unsigned __int8)((int (*)(void))v1->m_pkMHRepairWin->vfptr[65].__vecDelDtor)() )
                {
                  Cursor::SetCursor((Cursor::Type)11);
                  return;
                }
                v51 = v1->m_pkChatDisplayWin;
                v52 = 0;
                if ( !v51 )
                  goto LABEL_151;
                v53 = (unsigned __int8)ChatDisplayWin2::GetCursorStateOnPanel(v51) - 1;
                if ( v53 )
                {
                  if ( v53 != 1 )
                    goto LABEL_151;
                  Cursor::SetCursor((Cursor::Type)3);
                }
                else
                {
                  Cursor::SetCursor((Cursor::Type)2);
                }
                v52 = 1;
LABEL_151:
                v54 = v1->m_pkStatusBuffWin;
                if ( !v54 )
                  goto LABEL_157;
                v55 = (unsigned __int8)StatusBuffWin::GetCursorStateOnPanel(v54) - 1;
                if ( v55 )
                {
                  if ( v55 != 1 )
                    goto LABEL_157;
                  Cursor::SetCursor((Cursor::Type)3);
                }
                else
                {
                  Cursor::SetCursor((Cursor::Type)2);
                }
                v52 = 1;
LABEL_157:
                v56 = v1->m_pkStatusDBuffWin;
                if ( !v56 )
                  goto LABEL_163;
                v57 = (unsigned __int8)StatusBuffWin::GetCursorStateOnPanel(v56) - 1;
                if ( v57 )
                {
                  if ( v57 != 1 )
                    goto LABEL_163;
                  Cursor::SetCursor((Cursor::Type)3);
                }
                else
                {
                  Cursor::SetCursor((Cursor::Type)2);
                }
                v52 = 1;
LABEL_163:
                v58 = v1->m_pkStatusChargedBuffWin;
                if ( !v58 )
                  goto LABEL_169;
                v59 = (unsigned __int8)StatusBuffWin::GetCursorStateOnPanel(v58) - 1;
                if ( v59 )
                {
                  if ( v59 != 1 )
                    goto LABEL_169;
                  Cursor::SetCursor((Cursor::Type)3);
                }
                else
                {
                  Cursor::SetCursor((Cursor::Type)2);
                }
                v52 = 1;
LABEL_169:
                if ( dword_B64790 >= 1 )
                {
                  v60 = v1->m_pkExpeditionWin;
                  if ( v60 )
                    ExpeditionWin::ClickReset(v60);
                }
                if ( v52 )
                  break;
                v61 = (ChatDisplayWin *)&v1->m_pkSysMsgDisplayWin->vfptr;
                if ( !v61 )
                  goto LABEL_178;
                v62 = (unsigned __int8)ChatDisplayWin::GetCursorStateOnPanel(v61) - 1;
                if ( v62 )
                {
                  if ( v62 == 1 )
                  {
                    Cursor::SetCursor((Cursor::Type)3);
                  }
                  else
                  {
LABEL_178:
                    if ( !PgWin::ms_bCursorSetted )
                    {
                      if ( nowState != 2
                        || (unsigned __int8)((int (*)(void))v1->m_pkMHRepairWin->vfptr[65].__vecDelDtor)() )
                      {
                        Cursor::SetCursor(0);
                      }
                      else
                      {
                        Cursor::SetCursor((Cursor::Type)11);
                      }
                    }
                  }
                }
                else
                {
                  Cursor::SetCursor((Cursor::Type)2);
                }
                break;
              default:
                break;
            }
          }
LABEL_183:
          if ( PgWin::ms_kbRbutReleased.m_iBool >= 1 )
          {
            if ( !byte_A8CA64 )
            {
              pkDropItem = (DropItem *)0xFFFF;
              if ( World::Pick(
                     &g_kWorld,
                     &v1->m_kCameraRayOrigin,
                     &v1->m_kCameraRayDir,
                     &pkChar,
                     (NiPoint3 *)&result.g,
                     (DropItem **)&Point.y,
                     (unsigned __int16 *)&pkDropItem) == 1 )
              {
                GameFrameWork::OnPickCharWithRBut(v1, pkChar);
                if ( PgWin::ms_kbRbutReleased.m_iBool )
                  --PgWin::ms_kbRbutReleased.m_iBool;
              }
            }
            byte_A8CA64 = 0;
          }
          if ( g_pkKeyboard->m_aucKeystate[3] & 0x20
            && (v63 = g_pkItemInfoWin->m_pkItemInfo,
                (unsigned __int8)((int (*)(void))g_pkItemInfoWin->vfptr[65].__vecDelDtor)())
            && v63
            && g_pkItemInfoWin->m_pkItemInfo->Type == ITEMTYPE_EQU
            && (v64 = g_pkItemInfoWin->m_pkItem) != 0
            && (unsigned __int8)((int (*)(void))v64->vfptr[1].__vecDelDtor)() == 5 )
          {
            v65 = ((int (*)(void))g_pkItemInfoWin->vfptr[41].__vecDelDtor)();
            v66 = ((int (*)(void))g_pkItemInfoWin->vfptr[36].__vecDelDtor)() + v65;
            v67 = ((int (*)(void))g_pkItemInfoWin->vfptr[42].__vecDelDtor)();
            ((void (__stdcall *)(int, int))v1->m_pkEnchantGemToolTipWin->vfptr[77].__vecDelDtor)(v66, v67);
            ((void (*)(void))v1->m_pkEnchantGemToolTipWin->vfptr[67].__vecDelDtor)();
            GameFrameWork::OnOpenEnchantGemToolTip(v1, g_pkItemInfoWin->m_pkItem);
          }
          else
          {
            GameFrameWork::OnCloseEnchantGemToolTip(v1);
          }
          return;
        }
        v35 = ::v4;
      }
      else
      {
        *(_DWORD *)&word_A99532 = -1;
        v35 = -1;
      }
      unk_A99564 = v35;
      goto LABEL_88;
    }
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;
// A8C4A8: using guessed type struct NiInputMouse *g_pkMouse;
// A8CA64: using guessed type char byte_A8CA64;
// A8CA70: using guessed type int dword_A8CA70;
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;
// A96840: using guessed type struct NameBD *g_ClickedMiniHouseBD;
// A96A50: using guessed type struct Char *g_pkMouseOvereMob;
// A98118: using guessed type struct DropItem *g_pkMouseOverDropItem;
// B64770: using guessed type bool PgWin::ms_bCursorSetted;
// B64784: using guessed type int dword_B64784;
// B64790: using guessed type int dword_B64790;
// B647A8: using guessed type int dword_B647A8;

//----- (0048E3E0) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenMHPopupMenuWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  mhInfoWin *v2; // edi@1
  unsigned int v3; // eax@1
  char *v4; // eax@1
  mhInfoWin *v5; // eax@1
  int v6; // eax@2
  char *v7; // ecx@5
  int v8; // edi@5
  char v9; // dl@6
  PopupMenuText *v10; // eax@13
  PopupMenu *v11; // eax@13
  char v12; // [sp+17h] [bp-2Dh]@8
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v13; // [sp+18h] [bp-2Ch]@1
  int v14; // [sp+40h] [bp-4h]@1

  v1 = this;
  PopupMenuWin::Clear(this->m_pkPopupMenuWin);
  v2 = v1->m_pkMHInfoWin;
  v3 = SlideListWin::GetCurSelIndex(v2->m_GuestNameList);
  v4 = SlideListWin::GetText(v2->m_GuestNameList, v3, 0);
  v13._Myres = 15;
  v13._Mysize = 0;
  v13._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v13, v4, strlen(v4));
  v5 = v1->m_pkMHInfoWin;
  v14 = 0;
  if ( v5->m_FullRoomMakerName._Mysize )
  {
    v6 = (int)&v5->m_FullRoomMakerName;
    if ( *(_DWORD *)(v6 + 20) >= 0x10u )
      v6 = *(_DWORD *)v6;
  }
  else
  {
    v6 = ((int (__thiscall *)(PgWinText *))v5->m_pkTextFieldWin[0]->vfptr[121].__vecDelDtor)(v5->m_pkTextFieldWin[0]);
  }
  v7 = (char *)v6;
  v8 = v6 + 1;
  do
    v9 = *v7++;
  while ( v9 );
  if ( !std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
          &v13,
          0,
          v13._Mysize,
          (const char *)v6,
          (unsigned int)&v7[-v8])
    || (v12 = 1, unk_A9943C != 2) )
  {
    v12 = 0;
  }
  v14 = -1;
  if ( v13._Myres >= 0x10 )
    operator delete(v13._Bx._Ptr);
  v13._Myres = 15;
  v13._Mysize = 0;
  v13._Bx._Buf[0] = 0;
  if ( v12 )
  {
    v10 = PopupMenuTemplate::GetmhUI_GuestListKickGuestMenu();
    PopupMenuWin::AddMenu(v1->m_pkPopupMenuWin, v8, (PopupMenu *)&v10->vfptr);
    v11 = PopupMenuTemplate::GetCancelMenu();
    PopupMenuWin::AddMenu(v1->m_pkPopupMenuWin, v8, v11);
    PopupMenuWin::FinishMenu(v1->m_pkPopupMenuWin, 0);
    ((void (__stdcall *)(unsigned int, int))v1->m_pkPopupMenuWin->vfptr[77].__vecDelDtor)(
      PgWin::ms_iMsX,
      PgWin::ms_iMsY);
    PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v1->m_pkPopupMenuWin->vfptr);
  }
}

//----- (0048E580) --------------------------------------------------------
void __thiscall GameFrameWork::OpenWingStonePlacePopup(GameFrameWork *this)
{
  GameFrameWork *v1; // ebx@1
  ItemInfo *v2; // eax@1
  Item *v3; // eax@1
  int v4; // edi@3
  unsigned __int16 v5; // si@6
  int v6; // ebx@7
  char *v7; // eax@8
  PopupMenu *v8; // eax@8
  PopupMenuWin *v9; // ecx@8
  char *v10; // eax@9
  char *v11; // ST04_4@9
  int v12; // ebx@10
  int v13; // esi@10
  int v14; // eax@11
  int v15; // ecx@14
  char *v16; // eax@17
  char *v17; // edx@17
  char v18; // cl@18
  char *v19; // eax@19
  char *v20; // edx@19
  char v21; // cl@20
  unsigned int v22; // eax@21
  char *v23; // edi@21
  char v24; // cl@22
  char *v25; // edi@23
  unsigned __int16 v26; // ST08_2@23
  int v27; // ecx@23
  PopupMenuWin *v28; // ecx@27
  int v29; // [sp-10h] [bp-CCh]@7
  int i; // [sp+4h] [bp-B8h]@3
  GameFrameWork *v31; // [sp+8h] [bp-B4h]@1
  unsigned __int16 *v32; // [sp+Ch] [bp-B0h]@4
  SHINE_ITEM_STRUCT pkShineItemStruct; // [sp+10h] [bp-ACh]@2
  char acText[32]; // [sp+78h] [bp-44h]@17
  char acText2[32]; // [sp+98h] [bp-24h]@19

  v1 = this;
  v31 = this;
  PopupMenuWin::Clear(this->m_pkPopupMenuWin);
  v2 = ItemInfoTab::GetByInxName("GoddessWing");
  v3 = Inventory::GetItemByID(&g_kInventory, v2->ID);
  if ( v3 )
  {
    qmemcpy(&pkShineItemStruct, &v3->m_kStruct, sizeof(pkShineItemStruct));
    if ( (unsigned __int8)(*(_DWORD *)&pkShineItemStruct.itemid >> 16) )
    {
      v4 = 0;
      i = 0;
      if ( (unsigned __int8)(*(_DWORD *)&pkShineItemStruct.itemid >> 16) )
      {
        v32 = &pkShineItemStruct.itemattr.furniture.furnicherID;
        while ( 1 )
        {
          v5 = *v32;
          if ( *v32 == -1 )
          {
            v6 = v4 + 1;
            v29 = v4 + 1;
            if ( !TextData::Get(0x9BEBE5D9) )
            {
              v7 = fs(" %d. Empty Space", v29);
              v8 = (PopupMenu *)PopupMenuTemplate::GetWingStonePositionList(v4, v7, v5);
              v9 = v31->m_pkPopupMenuWin;
              goto LABEL_25;
            }
            v10 = (char *)TextData::Get(0x4E3E2E25u);
            v11 = fs(v10, v29);
            v8 = (PopupMenu *)PopupMenuTemplate::GetWingStonePositionList(v4, v11, v5);
          }
          else
          {
            v12 = *v32;
            v13 = ITableBase<MapInfo,MapInfoTab>::ms_pkTable;
            if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MapInfo,MapInfoTab>::ms_pkTable
                                                                  + 16))(
                                    ITableBase<MapInfo,MapInfoTab>::ms_pkTable,
                                    v12) )
            {
              if ( (unsigned __int16)v12 <= *(_WORD *)(v13 + 200) )
              {
                v15 = *(_DWORD *)(v13 + 196);
                if ( *(_DWORD *)(v15 + 4 * v12) )
                  v14 = *(_DWORD *)(v15 + 4 * v12);
                else
                  v14 = 0;
              }
              else
              {
                v14 = 0;
              }
            }
            else
            {
              v14 = 0;
            }
            v16 = (char *)(v14 + 14);
            v17 = (char *)(acText - v16);
            do
            {
              v18 = *v16;
              v16[(_DWORD)v17] = *v16;
              ++v16;
            }
            while ( v18 );
            v6 = v4 + 1;
            v19 = fs(" %d. ", v4 + 1);
            v20 = (char *)(acText2 - v19);
            do
            {
              v21 = *v19;
              v19[(_DWORD)v20] = *v19;
              ++v19;
            }
            while ( v21 );
            v22 = strlen(acText) + 1;
            v23 = &acText[31];
            do
              v24 = (v23++)[1];
            while ( v24 );
            qmemcpy(v23, acText, 4 * (v22 >> 2));
            v25 = &v23[4 * (v22 >> 2)];
            v26 = *v32;
            v27 = v22 & 3;
            qmemcpy(v25, &acText[4 * (v22 >> 2)], v27);
            v4 = (int)&v25[v27];
            v8 = (PopupMenu *)PopupMenuTemplate::GetWingStonePositionList(i, acText2, v26);
          }
          v9 = v31->m_pkPopupMenuWin;
LABEL_25:
          PopupMenuWin::AddMenu(v9, v4, v8);
          v32 += 5;
          i = v6;
          if ( v6 >= (unsigned __int8)pkShineItemStruct.itemattr.blot.lot )
          {
            v1 = v31;
            break;
          }
          v4 = v6;
        }
      }
    }
    v28 = v1->m_pkPopupMenuWin;
    if ( v28->m_dwMenuCount )
    {
      PopupMenuWin::FinishMenu(v28, 0);
      ((void (__stdcall *)(unsigned int, int))v1->m_pkPopupMenuWin->vfptr[77].__vecDelDtor)(
        PgWin::ms_iMsX,
        PgWin::ms_iMsY);
      PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v1->m_pkPopupMenuWin->vfptr);
    }
    else
    {
      PopupMenuWin::Clear(v28);
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkPopupMenuWin->vfptr);
    }
  }
}
// A89D38: using guessed type int ITableBase<MapInfo,MapInfoTab>::ms_pkTable;

//----- (0048E7F0) --------------------------------------------------------
void __cdecl Singleton<CursorState>::getInstance()
{
  CursorState *v0; // eax@2
  int v1; // eax@3

  if ( !Singleton<CursorState>::m_pInstance )
  {
    v0 = (CursorState *)operator new(8u);
    if ( v0 )
    {
      CursorState::CursorState(v0);
      Singleton<CursorState>::m_pInstance = v1;
    }
    else
    {
      Singleton<CursorState>::m_pInstance = 0;
    }
  }
}
// A8BAE8: using guessed type int Singleton<CursorState>::m_pInstance;

//----- (0048E870) --------------------------------------------------------
MapInfo *__cdecl IIDTableBase<MapInfo,MapInfoTab,unsigned short>::GetByID(int uiId)
{
  int v1; // esi@1
  MapInfo *result; // eax@2
  int v3; // ecx@4

  v1 = ITableBase<MapInfo,MapInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MapInfo,MapInfoTab>::ms_pkTable + 16))(
                          ITableBase<MapInfo,MapInfoTab>::ms_pkTable,
                          uiId)
    && (unsigned __int16)uiId <= *(_WORD *)(v1 + 200)
    && (v3 = *(_DWORD *)(v1 + 196), *(_DWORD *)(v3 + 4 * (unsigned __int16)uiId)) )
  {
    result = *(MapInfo **)(v3 + 4 * (unsigned __int16)uiId);
  }
  else
  {
    result = 0;
  }
  return result;
}
// A89D38: using guessed type int ITableBase<MapInfo,MapInfoTab>::ms_pkTable;

//----- (0048E8C0) --------------------------------------------------------
NiPoint3 *__thiscall NiCamera::GetWorldDirection(NiCamera *this, NiPoint3 *result)
{
  NiPoint3 *v2; // eax@1

  v2 = result;
  result->x = this->m_kWorld.m_Rotate.m_pEntry[0][0];
  result->y = this->m_kWorld.m_Rotate.m_pEntry[1][0];
  result->z = this->m_kWorld.m_Rotate.m_pEntry[2][0];
  return v2;
}

//----- (0048E8E0) --------------------------------------------------------
NiPoint3 *__thiscall Char::GetDirToChar(Char *this, NiPoint3 *result, Char *pkChar)
{
  Char *v3; // esi@1
  NiPoint3 *v4; // eax@2
  float v5; // edx@2
  float v6; // ecx@2
  float v7; // edx@4
  float v8; // ecx@4
  float v9; // ecx@5
  float v10; // edx@5
  NiPoint3 kMyPos; // [sp+8h] [bp-30h]@3
  NiPoint3 kToPos; // [sp+14h] [bp-24h]@3
  NiPoint3 kMyDir; // [sp+20h] [bp-18h]@1
  float v14; // [sp+2Ch] [bp-Ch]@3
  float v15; // [sp+30h] [bp-8h]@3
  float v16; // [sp+34h] [bp-4h]@3
  Char *pkChara; // [sp+44h] [bp+Ch]@3
  Char *pkCharb; // [sp+44h] [bp+Ch]@3

  v3 = this;
  ((void (__stdcall *)(NiPoint3 *))this->vfptr[6].~AbStateInfectee)(&kMyDir);
  if ( pkChar )
  {
    ((void (__thiscall *)(Char *, NiPoint3 *))v3->vfptr[6].SetAbStateProperty)(v3, &kMyPos);
    ((void (__thiscall *)(Char *, NiPoint3 *))pkChar->vfptr[6].SetAbStateProperty)(pkChar, &kToPos);
    v14 = kToPos.x - kMyPos.x;
    v15 = kToPos.y - kMyPos.y;
    v16 = kToPos.z - kMyPos.z;
    *(float *)&pkChara = v15 * v15 + v14 * v14 + v16 * v16;
    *(float *)&pkCharb = sqrt(*(float *)&pkChara);
    v4 = result;
    if ( *(float *)&pkCharb >= 1.0 )
    {
      v9 = v15;
      result->x = v14;
      v10 = v16;
      result->y = v9;
      result->z = v10;
    }
    else
    {
      v7 = kMyDir.y;
      result->x = kMyDir.x;
      v8 = kMyDir.z;
      result->y = v7;
      result->z = v8;
    }
  }
  else
  {
    v4 = result;
    v5 = kMyDir.y;
    result->x = kMyDir.x;
    v6 = kMyDir.z;
    result->y = v5;
    result->z = v6;
  }
  return v4;
}

//----- (0048E9D0) --------------------------------------------------------
void __thiscall GameFrameWork::sRideOffValue::SetMove(GameFrameWork::sRideOffValue *this, NiPoint3 *kGroundPos, bool bViewPoint)
{
  this->m_kSkillID = -1;
  this->m_pkTarget = 0;
  this->m_kPoint.x = 0;
  this->m_kPoint.y = 0;
  this->m_kGroundPos = NiPoint3::ZERO;
  this->m_bViewPoint = 0;
  this->m_kGroundPos = *kGroundPos;
  this->m_bViewPoint = bViewPoint;
}

//----- (0048EA30) --------------------------------------------------------
void __thiscall mhMouseControlWin::SetCtrlDown(mhMouseControlWin *this, int b)
{
  mhMouseControlWin *v2; // esi@1

  v2 = this;
  this->m_bCtrlDown = b;
  mhMouseControlWin::ShowBtn(this, b, AllLeft, b);
  mhMouseControlWin::ShowBtn(v2, b, AllRight, b);
  mhMouseControlWin::ShowBtn(v2, b, CtrlNormal, 1);
}

//----- (0048EA70) --------------------------------------------------------
void __thiscall GTRequestListWin::EditKillForus(GTRequestListWin *this)
{
  ((void (__stdcall *)(_DWORD))this->m_spEdit.m_pObject->vfptr[121].__vecDelDtor)(1);
}

//----- (0048EA90) --------------------------------------------------------
void __thiscall ChatDisplayWin2::ShowChatEditBox(ChatDisplayWin2 *this, bool b)
{
  ChatDisplayWin2 *v2; // esi@1
  void *(__thiscall *v3)(NiRefObject *, unsigned int); // edx@1

  v2 = this;
  v3 = this->m_pkChatEditBox->vfptr[64].__vecDelDtor;
  if ( b )
  {
    ((void (__stdcall *)(_DWORD))v3)(1);
    ((void (__stdcall *)(_DWORD))v2->m_pkChatEngMode->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v2->m_pkChatKorMode->vfptr[64].__vecDelDtor)(1);
    ((void (*)(void))v2->m_spEdit.m_pObject->vfptr[120].__vecDelDtor)();
  }
  else
  {
    ((void (__stdcall *)(_DWORD))v3)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkChatEngMode->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkChatKorMode->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_spEdit.m_pObject->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_spEdit.m_pObject->vfptr[121].__vecDelDtor)(0);
  }
}

//----- (0048EB40) --------------------------------------------------------
void __thiscall GuildListWin::EditKillForus(GuildListWin *this)
{
  ((void (__stdcall *)(_DWORD))this->m_spEdit.m_pObject->vfptr[121].__vecDelDtor)(1);
}

//----- (0048EB60) --------------------------------------------------------
char __thiscall StatusBuffWin::GetCursorStateOnPanel(StatusBuffWin *this)
{
  FrameBoxWin *v2; // ecx@3
  char v3; // bl@3

  if ( !this->IsShowBuf )
    return 0;
  v2 = this->m_pkFrameBox.m_pObject;
  v3 = 0;
  if ( v2 )
  {
    if ( v2->m_bIsDuringSizeDrag )
      return 2;
    if ( (unsigned __int8)FrameBoxWin::SizeDragHitTest(v2) )
      v3 = 1;
  }
  return v3;
}

//----- (0048EBA0) --------------------------------------------------------
NiPointer<MHDiceGameTask> *__cdecl MHDiceGameTask::GetDiceGameTask(NiPointer<MHDiceGameTask> *result)
{
  int v1; // eax@1

  v1 = MHDiceGameTask::ms_spMHDiceGameTask;
  result->m_pObject = (MHDiceGameTask *)MHDiceGameTask::ms_spMHDiceGameTask;
  if ( v1 )
    InterlockedIncrement((volatile LONG *)(v1 + 4));
  return result;
}
// B5BDC4: using guessed type int MHDiceGameTask::ms_spMHDiceGameTask;

//----- (0048EBD0) --------------------------------------------------------
void __thiscall World::SetMoveTargetPointPos(World *this, NiPoint3 kPos)
{
  World *v2; // esi@1

  v2 = this;
  if ( this->m_spMoveTargetPointNode.m_pObject )
  {
    World::GetAdvGroundPos(this, kPos.x, kPos.y, &kPos);
    v2->m_spMoveTargetPointNode.m_pObject->m_kLocal.m_Translate = kPos;
    NiAVObject::Update((NiAVObject *)&v2->m_spMoveTargetPointNode.m_pObject->vfptr, 0.0, 1);
  }
}

//----- (0048EC30) --------------------------------------------------------
void __thiscall World::ShowMoveTargetPoint(World *this, NiPoint3 kPos)
{
  World *v2; // esi@1
  NiNode *v3; // eax@1
  NiPoint3 kTargetPos; // [sp+10h] [bp-Ch]@1

  v2 = this;
  v3 = this->m_spMoveTargetPointNode.m_pObject;
  v3->m_uFlags &= 0xFFFEu;
  kTargetPos = kPos;
  if ( v3 )
  {
    World::GetAdvGroundPos(this, kPos.x, kPos.y, &kTargetPos);
    v2->m_spMoveTargetPointNode.m_pObject->m_kLocal.m_Translate = kTargetPos;
    NiAVObject::Update((NiAVObject *)&v2->m_spMoveTargetPointNode.m_pObject->vfptr, 0.0, 1);
  }
}

//----- (0048ECB0) --------------------------------------------------------
MiniHouseObjAni *__cdecl ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::GetByIndex(unsigned int uiIndex)
{
  return (MiniHouseObjAni *)CDataReader::GetRecord(
                              (CDataReader *)(ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::ms_pkTable + 4),
                              uiIndex);
}
// A8C150: using guessed type int ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::ms_pkTable;

//----- (0048ECD0) --------------------------------------------------------
BasicInfoLinkType __cdecl BasicInfoLinkTab::GetbyCType(BIL_C_Type eType, char *pkCValue)
{
  BasicInfoLinkType result; // eax@2
  int v3; // eax@3
  unsigned int v4; // edi@4
  unsigned int v5; // esi@6
  char *v6; // eax@7

  if ( pkCValue )
  {
    v3 = *(_DWORD *)(ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable + 56);
    if ( v3 )
      v4 = *(_DWORD *)(v3 + 40);
    else
      v4 = 0;
    v5 = 0;
    if ( v4 )
    {
      while ( 1 )
      {
        v6 = CDataReader::GetRecord((CDataReader *)(ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable + 4), v5);
        if ( v6 )
        {
          if ( *((_DWORD *)v6 + 2) == eType && !strcmp(v6 + 12, pkCValue) )
            break;
        }
        if ( ++v5 >= v4 )
          goto LABEL_11;
      }
      result = *((_DWORD *)v6 + 1);
    }
    else
    {
LABEL_11:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C1F8: using guessed type int ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable;

//----- (0048ED60) --------------------------------------------------------
MiniHouseObjAni *__cdecl MiniHouseObjAniInfoTab::GetObjInfobyAniGroup(unsigned __int16 ItemID, unsigned int uiAniGroupID, unsigned int uiGroupIndex)
{
  int v3; // eax@1
  unsigned int v4; // edi@2
  int v5; // ebx@4
  unsigned int v6; // esi@4
  char *v7; // eax@5

  v3 = *(_DWORD *)(ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::ms_pkTable + 56);
  if ( v3 )
    v4 = *(_DWORD *)(v3 + 40);
  else
    v4 = 0;
  v5 = 0;
  v6 = 0;
  if ( !v4 )
    return 0;
  while ( 1 )
  {
    v7 = CDataReader::GetRecord((CDataReader *)(ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::ms_pkTable + 4), v6);
    if ( *((_WORD *)v7 + 1) != ItemID || *(_WORD *)(v7 + 5) != uiAniGroupID )
      goto LABEL_9;
    if ( v5 == uiGroupIndex )
      return (MiniHouseObjAni *)CDataReader::GetRecord(
                                  (CDataReader *)(ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::ms_pkTable + 4),
                                  v6);
    ++v5;
LABEL_9:
    if ( ++v6 >= v4 )
      return 0;
  }
}
// A8C150: using guessed type int ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::ms_pkTable;

//----- (0048EDD0) --------------------------------------------------------
MiniHouseFurniture *__cdecl MiniHouseFuritureInfoTab::GetObjByName(char *acName)
{
  int v1; // eax@1
  unsigned int v2; // edi@2
  unsigned int v3; // esi@4
  char *v4; // eax@5
  MiniHouseFurniture *result; // eax@7

  v1 = *(_DWORD *)(ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::ms_pkTable + 56);
  if ( v1 )
    v2 = *(_DWORD *)(v1 + 40);
  else
    v2 = 0;
  v3 = 0;
  if ( v2 )
  {
    while ( 1 )
    {
      v4 = CDataReader::GetRecord(
             (CDataReader *)(ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::ms_pkTable + 4),
             v3);
      if ( !_mbscmp(v4 + 2, acName) )
        break;
      if ( ++v3 >= v2 )
        goto LABEL_7;
    }
    result = (MiniHouseFurniture *)CDataReader::GetRecord(
                                     (CDataReader *)(ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::ms_pkTable
                                                   + 4),
                                     v3);
  }
  else
  {
LABEL_7:
    result = 0;
  }
  return result;
}
// A8C158: using guessed type int ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::ms_pkTable;

//----- (0048EE40) --------------------------------------------------------
BOOL __cdecl std::operator!=<char,std::char_traits<char>,std::allocator<char>>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Left, const char *_Right)
{
  return std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
           _Left,
           0,
           _Left->_Mysize,
           _Right,
           strlen(_Right)) != 0;
}

//----- (0048EE80) --------------------------------------------------------
stMINIHOUSEINFO *__thiscall CGuildMonster::GetGuildEumFromMob(CMiniHouseMgr *this, unsigned __int16 kHandle)
{
  CMiniHouseMgr *v2; // esi@1
  stMINIHOUSEINFO *result; // eax@2
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > > iter; // [sp+4h] [bp-4h]@1

  v2 = this;
  std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,long>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > *)&this->m_mapInfo.comp,
    &iter,
    &kHandle);
  if ( iter._Ptr == v2->m_mapInfo._Myhead )
    result = 0;
  else
    result = iter._Ptr->_Myval.second;
  return result;
}

//----- (0048EEB0) --------------------------------------------------------
void __thiscall PartyWinInterface::OpenPopMenuParty(PartyWinInterface *this, char *pcName)
{
  signed int v2; // ebx@3
  MiniPartyWin **v3; // edi@3
  signed int v4; // edi@8
  PartyWin **v5; // esi@8
  PartyWinInterface *v6; // [sp+0h] [bp-4h]@1

  v6 = this;
  if ( this->m_apkPartyWin[0] )
  {
    if ( this->isMiniPartyWinShow )
    {
      v2 = 0;
      v3 = this->m_apkMiniPartyWin;
      while ( strcmp(MiniPartyWin::GetMemberName(*v3), pcName) )
      {
        ++v2;
        ++v3;
        if ( v2 >= 4 )
          return;
      }
      v6->m_apkMiniPartyWin[v2]->m_bOpenPopUp = 1;
    }
    else
    {
      v4 = 0;
      v5 = this->m_apkPartyWin;
      while ( strcmp(PartyWin::GetMemberName(*v5), pcName) )
      {
        ++v4;
        ++v5;
        if ( v4 >= 4 )
          return;
      }
      v6->m_apkPartyWin[v4]->m_bOpenPopUp = 1;
    }
  }
}

//----- (0048EFB0) --------------------------------------------------------
void __thiscall GuildJoinReqTask::SetTargetID(GuildJoinReqTask *this, char *pcName)
{
  char *v2; // eax@1
  char *v3; // ecx@1
  int v4; // eax@1
  char v5; // dl@2

  v2 = this->m_acTargetID;
  *(_DWORD *)v2 = 0;
  *((_DWORD *)v2 + 1) = 0;
  *((_DWORD *)v2 + 2) = 0;
  *((_DWORD *)v2 + 3) = 0;
  v2[16] = 0;
  v3 = pcName;
  v4 = v2 - pcName;
  do
  {
    v5 = *v3;
    v3[v4] = *v3;
    ++v3;
  }
  while ( v5 );
}

//----- (0048EFF0) --------------------------------------------------------
void GameFrameWork::ClientSecurity()
{
  ItemInfoTab::CheckCRC();
  ActSkillInfoTab::CheckCRC();
  if ( GameFrameWork::_isCheating )
    terminate();
}
// A8CA74: using guessed type bool GameFrameWork::_isCheating;

//----- (0048F010) --------------------------------------------------------
void __thiscall GameFrameWork::KarisDivide_OK(GameFrameWork *this)
{
  MakeKarisWin::StartEffectt(this->m_pkMakeKarisWin);
}

//----- (0048F030) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenChargedItemListWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  if ( this->m_pkChargedItemListWin )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkChargedItemListWin->vfptr[65].__vecDelDtor)() )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkChargedItemListWin->vfptr);
    else
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkChargedItemListWin->vfptr);
  }
}

//----- (0048F080) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenChatEditWin(GameFrameWork *this, const char *szText)
{
  GameFrameWork *v2; // esi@1
  ChatDisplayWin2 *v3; // ecx@5

  v2 = this;
  if ( (PgWin *)this->m_pkPrivateStoreWin == PgWinMgr::GetTopWin(&Pgg_kWinMgr)
    || (PgWin *)v2->m_pkDivideWin != PgWinMgr::GetTopWin(&Pgg_kWinMgr)
    && (PgWin *)v2->m_pkMoneyWin != PgWinMgr::GetTopWin(&Pgg_kWinMgr)
    && (PgWin *)v2->m_pkHolyRewardMoneyWin != PgWinMgr::GetTopWin(&Pgg_kWinMgr) )
  {
    v3 = v2->m_pkChatDisplayWin;
    if ( v3 )
    {
      if ( !(unsigned __int8)ChatDisplayWin2::IsDuringEdit(v3) )
        ChatDisplayWin2::ChatStart(v2->m_pkChatDisplayWin, szText);
    }
  }
}

//----- (0048F100) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenSlashStartChat(GameFrameWork *this, const char *szText)
{
  GameFrameWork *v2; // esi@1
  ChatDisplayWin2 *v3; // ecx@5

  v2 = this;
  if ( (PgWin *)this->m_pkPrivateStoreWin == PgWinMgr::GetTopWin(&Pgg_kWinMgr)
    || (PgWin *)v2->m_pkDivideWin != PgWinMgr::GetTopWin(&Pgg_kWinMgr)
    && (PgWin *)v2->m_pkMoneyWin != PgWinMgr::GetTopWin(&Pgg_kWinMgr)
    && (PgWin *)v2->m_pkHolyRewardMoneyWin != PgWinMgr::GetTopWin(&Pgg_kWinMgr) )
  {
    v3 = v2->m_pkChatDisplayWin;
    if ( v3 )
    {
      if ( !(unsigned __int8)ChatDisplayWin2::IsDuringEdit(v3) )
        ChatDisplayWin2::ChatStart(v2->m_pkChatDisplayWin, szText);
    }
  }
}

//----- (0048F180) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenAutoWhisperChat(GameFrameWork *this, const char *szText)
{
  GameFrameWork *v2; // esi@1
  ChatDisplayWin2 *v3; // ecx@5

  v2 = this;
  if ( (PgWin *)this->m_pkPrivateStoreWin == PgWinMgr::GetTopWin(&Pgg_kWinMgr)
    || (PgWin *)v2->m_pkDivideWin != PgWinMgr::GetTopWin(&Pgg_kWinMgr)
    && (PgWin *)v2->m_pkMoneyWin != PgWinMgr::GetTopWin(&Pgg_kWinMgr)
    && (PgWin *)v2->m_pkHolyRewardMoneyWin != PgWinMgr::GetTopWin(&Pgg_kWinMgr) )
  {
    v3 = v2->m_pkChatDisplayWin;
    if ( v3 )
    {
      if ( !(unsigned __int8)ChatDisplayWin2::IsDuringEdit(v3) )
        ChatDisplayWin2::ChatStart(v2->m_pkChatDisplayWin, szText);
    }
  }
}

//----- (0048F200) --------------------------------------------------------
void __thiscall GameFrameWork::CloseCharInfoWin(GameFrameWork *this)
{
  if ( this->m_pkCharInfoWin )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkCharInfoWin->vfptr);
}

//----- (0048F220) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenKQuestTimeWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  if ( this->m_pkKQuestTimeWin )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkKQuestTimeWin->vfptr[65].__vecDelDtor)() )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkKQuestTimeWin->vfptr);
    else
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkKQuestTimeWin->vfptr);
  }
}

//----- (0048F270) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenShortCutSubWin(GameFrameWork *this)
{
  PgWin **v1; // esi@2
  unsigned int v2; // edi@2
  ShortCutWin *v3; // eax@12

  if ( ShortCutWin::m_uiShortcutSubWinIndex == 4 )
  {
    v1 = (PgWin **)this->m_pkShortCutSubWinV;
    v2 = ShortCutWin::m_uiShortcutSubWinIndex;
    do
    {
      if ( BYTE2((*(v1 - 5))[3].m_kBound.m_fRadius) )
        PgWinMgr::CloseWin(&Pgg_kWinMgr, *(v1 - 5));
      if ( BYTE2((*v1)[3].m_kBound.m_fRadius) )
        PgWinMgr::CloseWin(&Pgg_kWinMgr, *v1);
      ++v1;
      --v2;
    }
    while ( v2 );
    ShortCutWin::m_uiShortcutSubWinIndex = 0;
  }
  else if ( this->m_pkShortCutSubWin[ShortCutWin::m_uiShortcutSubWinIndex]
         && this->m_pkShortCutSubWinV[ShortCutWin::m_uiShortcutSubWinIndex] )
  {
    if ( this->m_bLastShortCutSubWinDirV[ShortCutWin::m_uiShortcutSubWinIndex] )
      v3 = this->m_pkShortCutSubWinV[ShortCutWin::m_uiShortcutSubWinIndex];
    else
      v3 = this->m_pkShortCutSubWin[ShortCutWin::m_uiShortcutSubWinIndex];
    if ( v3->m_bShowFlag )
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
      ++ShortCutWin::m_uiShortcutSubWinIndex;
    }
    else
    {
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
      ++ShortCutWin::m_uiShortcutSubWinIndex;
    }
  }
}
// A8E0A0: using guessed type unsigned int ShortCutWin::m_uiShortcutSubWinIndex;

//----- (0048F320) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenShortCutPanelTurn(GameFrameWork *this, ShortCutWin *targetWin, ShortCutWin *hideWin)
{
  signed int v3; // ebx@3

  if ( hideWin && targetWin )
  {
    byte_B4FFA2[0] = hideWin == this->m_pkShortCutWin;
    ShortCutWin::SizeBtnPosToStatus(targetWin);
    v3 = 1;
    if ( hideWin->m_bShowFlag )
    {
      v3 = hideWin->m_uiCurPage;
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&hideWin->vfptr);
    }
    if ( targetWin->m_bShowFlag )
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&targetWin->vfptr);
      ShortCutWin::ReflashShortCutWin(targetWin);
    }
    else
    {
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&targetWin->vfptr);
      targetWin->m_uiCurPage = v3;
      ShortCutWin::ResetIconWin(targetWin);
      ShortCutWin::SetPageTextWin(targetWin);
      ShortCutWin::ReflashHotKey(targetWin);
      ShortCutWin::ReflashShortCutWin(targetWin);
    }
  }
}

//----- (0048F3C0) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenShortCutSubPanelTurn(GameFrameWork *this, ShortCutWin *targetWin, ShortCutWin *hideWin)
{
  ShortCutWin *v3; // ebx@1
  int v4; // edi@3
  GameFrameWork *v5; // [sp+4h] [bp-4h]@1
  signed int pageNum; // [sp+14h] [bp+Ch]@6

  v3 = hideWin;
  v5 = this;
  if ( hideWin && targetWin )
  {
    v4 = targetWin->m_iSubTabLevel;
    byte_B4FFA5[3 * v4] = hideWin == this->m_pkShortCutSubWin[v4];
    ShortCutWin::SizeBtnPosToStatus(targetWin);
    pageNum = 1;
    if ( v3->m_bShowFlag )
    {
      pageNum = v3->m_uiCurPage;
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
    }
    if ( targetWin->m_bShowFlag )
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&targetWin->vfptr);
      ShortCutWin::ReflashShortCutWin(targetWin);
    }
    else
    {
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&targetWin->vfptr);
      v5->m_bLastShortCutSubWinDirV[v4] = targetWin->m_bVerticalMode;
      targetWin->m_uiCurPage = pageNum;
      ShortCutWin::ResetIconWin(targetWin);
      ShortCutWin::SetPageTextWin(targetWin);
      ShortCutWin::ReflashHotKey(targetWin);
      ShortCutWin::ReflashShortCutWin(targetWin);
    }
  }
}

//----- (0048F4A0) --------------------------------------------------------
void __thiscall GameFrameWork::OnReflashShortCutWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  ShortCutWin **v2; // esi@5
  signed int v3; // edi@5

  v1 = this;
  if ( (unsigned __int8)((int (*)(void))this->m_pkShortCutWin->vfptr[65].__vecDelDtor)() )
    ShortCutWin::ReflashShortCutWin(v1->m_pkShortCutWin);
  if ( (unsigned __int8)((int (*)(void))v1->m_pkShortCutWinV->vfptr[65].__vecDelDtor)() )
    ShortCutWin::ReflashShortCutWin(v1->m_pkShortCutWinV);
  v2 = v1->m_pkShortCutSubWinV;
  v3 = 4;
  do
  {
    if ( (unsigned __int8)((int (*)(void))(*(v2 - 5))->vfptr[65].__vecDelDtor)() )
      ShortCutWin::ReflashShortCutWin(*(v2 - 5));
    if ( (unsigned __int8)((int (*)(void))(*v2)->vfptr[65].__vecDelDtor)() )
      ShortCutWin::ReflashShortCutWin(*v2);
    ++v2;
    --v3;
  }
  while ( v3 );
}

//----- (0048F590) --------------------------------------------------------
void __thiscall GameFrameWork::OnCloseMHInputPassWordWin(GameFrameWork *this)
{
  if ( this->m_pkMHInputPassWordWin )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkMHInputPassWordWin->vfptr);
}

//----- (0048F5B0) --------------------------------------------------------
void __thiscall GameFrameWork::CloseNpcDlgWin(GameFrameWork *this)
{
  NpcDialogWin *v1; // ecx@1

  v1 = this->m_pkNpcDlgWin;
  if ( v1 )
    NpcDialogWin::CloseDialog(v1);
}

//----- (0048F5D0) --------------------------------------------------------
void __thiscall GameFrameWork::CloseMHInfoWin(GameFrameWork *this, bool bNoDefault)
{
  GameFrameWork *v2; // esi@1
  PgWin *v3; // eax@3

  v2 = this;
  if ( this->m_pkMHCurrentWin )
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, this->m_pkMHCurrentWin);
    v2->m_pkMHCurrentWin = 0;
    if ( !bNoDefault )
    {
      v3 = (PgWin *)&v2->m_pkMHInfoWin->vfptr;
      v2->m_pkMHCurrentWin = v3;
      PgWinMgr::ShowWin(&Pgg_kWinMgr, v3);
    }
  }
}

//----- (0048F620) --------------------------------------------------------
void __thiscall GameFrameWork::OpenReportWin(GameFrameWork *this)
{
  if ( this->m_pkReportWin )
    GameFrameWork::NcReportGetReq(this);
}

//----- (0048F630) --------------------------------------------------------
bool __thiscall GameFrameWork::OpenWingStoneMapWin(GameFrameWork *this)
{
  return PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkWingStoneMapWin->vfptr) != 0;
}

//----- (0048F650) --------------------------------------------------------
void __thiscall GameFrameWork::CloseWingStoneMapWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  if ( (unsigned __int8)((int (*)(void))this->m_pkWingStoneMapWin->vfptr[65].__vecDelDtor)() )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkWingStoneMapWin->vfptr);
}

//----- (0048F680) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenMiniPartyWin(GameFrameWork *this)
{
  PartyWinInterface::TogglePartyWin(this->m_pkPartyWinInterface);
}

//----- (0048F690) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenItemMallWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  if ( this->m_pkItemMallMenuWin )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkItemMallMenuWin->vfptr[65].__vecDelDtor)() )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkItemMallMenuWin->vfptr);
    else
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkItemMallMenuWin->vfptr);
  }
}

//----- (0048F6E0) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenSystemWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))this->m_pkSystemWin->vfptr[59].__vecDelDtor)(
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  if ( v1->m_pkSystemWin )
  {
    if ( (unsigned __int8)((int (*)(void))v1->m_pkSystemWin->vfptr[65].__vecDelDtor)() )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkSystemWin->vfptr);
    else
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkSystemWin->vfptr);
  }
}

//----- (0048F770) --------------------------------------------------------
void __usercall GameFrameWork::OnCharSelect(GameFrameWork *this@<ecx>, int a2@<ebx>, int a3@<edi>)
{
  GameFrameWork *v3; // esi@1

  v3 = this;
  Skill::ClearLearnSkill();
  Skill::ClearLearnPassiveSkill();
  GameFrameWork::OnSaveServerShortCutDataOption(v3);
  GameFrameWork::OnSaveServerShortCutSizeOption(v3);
  GameFrameWork::OnSaveServerWindowPosOption(v3);
  GameFrameWork::OnSaveServerKeyRemappingOption(v3);
  GameFrameWork::OnSaveServerGameOption();
  AbStateInfectee::ClearAbState((AbStateInfectee *)&g_pkMainChar->vfptr, 0);
  MachineOpt::SaveUserInfo(a2, a3);
  PgFrameWork::PostFrameMsgChange((PgFrameWork *)&v3->vfptr, CharSelectFrameWorkID, 0);
}

//----- (0048F7D0) --------------------------------------------------------
void __thiscall GameFrameWork::OnErrorGotoAccount(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  GameFrameWork::OnSaveServerShortCutDataOption(this);
  GameFrameWork::OnSaveServerShortCutSizeOption(v1);
  GameFrameWork::OnSaveServerWindowPosOption(v1);
  GameFrameWork::OnSaveServerKeyRemappingOption(v1);
  GameFrameWork::OnSaveServerGameOption();
  Skill::ClearLearnSkill();
  Skill::ClearLearnPassiveSkill();
  AbStateInfectee::ClearAbState((AbStateInfectee *)&g_pkMainChar->vfptr, 0);
  NetMgr::SendUserLogOutMsg2AllServer(&g_kNetMgr);
  PgFrameMgr::PostQuitMsg(&Pgg_kFrameMgr, 0);
}

//----- (0048F830) --------------------------------------------------------
void GameFrameWork::OnErrorGotoExit()
{
  NetMgr::SendUserLogOutMsg2AllServer(&g_kNetMgr);
  PgFrameMgr::PostQuitMsg(&Pgg_kFrameMgr, 0);
}

//----- (0048F880) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenDivideWin(GameFrameWork *this, PgWin *pkCallerWin, unsigned int uiMsg, unsigned int uiMax, char *pcText, unsigned int uiMode)
{
  this->m_pkDivideWin->m_eMode = uiMode;
  DivideWin::Open(this->m_pkDivideWin, pkCallerWin, uiMsg, uiMax, pcText);
}

//----- (0048F8C0) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenInputTextWin(GameFrameWork *this, PgWin *pkCallerWin, unsigned int uiMsg, char *pcText)
{
  InputTextWin::Open(this->m_pkInputTextWin, pkCallerWin, uiMsg, pcText);
}

//----- (0048F8D0) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenMoneyWin(GameFrameWork *this, PgWin *pkCallerWin, unsigned int uiOKMsg, unsigned int uiCancelMsg, char *pcText, char *pcText2)
{
  GameFrameWork *v6; // esi@1

  v6 = this;
  MoneyWin::Open(this->m_pkMoneyWin, pkCallerWin, uiOKMsg, uiCancelMsg, pcText);
  if ( pcText2 )
    MoneyWin::SetTitle2(v6->m_pkMoneyWin, pcText2);
}

//----- (0048F910) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenHolyRewardMoneyWin(GameFrameWork *this, unsigned int uiOKMsg, unsigned int uiCancelMsg, char *pcText1, char *pcText2)
{
  GameFrameWork *v5; // esi@1

  v5 = this;
  if ( !PgWin::IsVisible((PgWin *)&this->m_pkHolyRewardMoneyWin->vfptr) )
    HolyRewardMoneyWin::Open(v5->m_pkHolyRewardMoneyWin, uiOKMsg, uiCancelMsg, pcText1, pcText2);
}

//----- (0048F950) --------------------------------------------------------
void __thiscall GameFrameWork::CloseEnchantGemWin(GameFrameWork *this, bool bEnchantWin, bool bDelteteWin)
{
  GameFrameWork *v3; // esi@1

  v3 = this;
  if ( bEnchantWin )
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkEnchantGemWin1->vfptr);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkEnchantGemWin2->vfptr);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkEnchantGemWin3->vfptr);
  }
  if ( bDelteteWin )
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkEnchantGemDeleteWin1->vfptr);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkEnchantGemDeleteWin2->vfptr);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkEnchantGemDeleteWin3->vfptr);
  }
}

//----- (0048F9D0) --------------------------------------------------------
void __thiscall GameFrameWork::CloseWeapontitleWin(GameFrameWork *this)
{
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkWeaponTitleWin->vfptr);
}

//----- (0048F9F0) --------------------------------------------------------
void __thiscall GameFrameWork::OpenMiniHouseInventoryWin(GameFrameWork *this)
{
  if ( this->m_pkMiniHouseInventoryWin )
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkMiniHouseInventoryWin->vfptr);
}

//----- (0048FA10) --------------------------------------------------------
void __thiscall GameFrameWork::CloseInventoryWin(GameFrameWork *this)
{
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkInventoryWin->vfptr);
}

//----- (0048FA30) --------------------------------------------------------
void __thiscall GameFrameWork::OpenCalculatorWin(GameFrameWork *this, PgWin *pkCallerWin, unsigned int uiMsg, unsigned int uiMax, char *pcText)
{
  CalculatorWin::Open(this->m_pkCalculatorWin, pkCallerWin, uiMsg, uiMax, pcText);
}

//----- (0048FA40) --------------------------------------------------------
void __thiscall GameFrameWork::UnEquip(GameFrameWork *this, unsigned int uiEquipPos)
{
  InventoryWin::UnEquip(this->m_pkInventoryWin, uiEquipPos);
}

//----- (0048FA50) --------------------------------------------------------
void __thiscall GameFrameWork::OpenKDQuestWin(GameFrameWork *this, bool bJoin)
{
  GameFrameWork *v2; // esi@1

  v2 = this;
  if ( this->m_pkKingDomQuest )
  {
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkKingDomQuest->vfptr);
    KingdomQuestWin::CheckButtonEnableSetting(v2->m_pkKingDomQuest);
    GameFrameWork::NcKqListRefreshReq(v2);
  }
}

//----- (0048FA80) --------------------------------------------------------
void __thiscall GameFrameWork::OpenQuestWin(GameFrameWork *this, bool bSelectTab, int SelectIdx)
{
  GameFrameWork *v3; // esi@1
  CQuestWin2 *v4; // ecx@1

  v3 = this;
  v4 = this->m_pkQuestWin;
  if ( v4 )
  {
    if ( bSelectTab )
      CQuestWin2::SelectTab(v4, SelectIdx);
    else
      CQuestWin2::SelectTab(v4, 1);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkQuestWin->vfptr);
  }
}

//----- (0048FAC0) --------------------------------------------------------
void __thiscall GameFrameWork::CloseQuestWin(GameFrameWork *this)
{
  if ( this->m_pkQuestWin )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkQuestWin->vfptr);
}

//----- (0048FAE0) --------------------------------------------------------
void __thiscall GameFrameWork::OpenHelpWin(GameFrameWork *this)
{
  if ( this->m_pkHelpWin )
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkHelpWin->vfptr);
}

//----- (0048FB00) --------------------------------------------------------
void __thiscall GameFrameWork::CloseHelpWin(GameFrameWork *this)
{
  if ( this->m_pkHelpWin )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkHelpWin->vfptr);
}

//----- (0048FB20) --------------------------------------------------------
void __thiscall GameFrameWork::OpenHelpWin(GameFrameWork *this, BasicInfoLinkType Type)
{
  if ( this->m_pkHelpWin )
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkHelpWin->vfptr);
}

//----- (0048FB40) --------------------------------------------------------
void __thiscall GameFrameWork::OpenPlayGuideSearchList(GameFrameWork *this, char *acUIFile)
{
  PlayGuideWin *v2; // ecx@2

  if ( acUIFile )
  {
    v2 = this->m_pkPlayGuideWin;
    if ( v2 )
      PlayGuideWin::OpenPlayGuideSearchList(v2, acUIFile);
  }
}

//----- (0048FB80) --------------------------------------------------------
void __thiscall GameFrameWork::CloseWingStoneWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  WingStoneWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_pkWingStoneWin;
  if ( v2 )
  {
    WingStoneWin::CloseWingStoneWin(v2);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkWingStoneWin->vfptr);
  }
}

//----- (0048FBB0) --------------------------------------------------------
void __thiscall GameFrameWork::OpenForumWin(GameFrameWork *this)
{
  if ( this->m_pkForumWin )
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkForumWin->vfptr);
}

//----- (0048FBD0) --------------------------------------------------------
void __thiscall GameFrameWork::CloseForumWin(GameFrameWork *this)
{
  if ( this->m_pkForumWin )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkForumWin->vfptr);
}

//----- (0048FBF0) --------------------------------------------------------
void __thiscall GameFrameWork::OpenShopWin(GameFrameWork *this)
{
  if ( this->m_pkShopWin )
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkShopWin->vfptr);
}

//----- (0048FC10) --------------------------------------------------------
void __thiscall GameFrameWork::CloseShopWin(GameFrameWork *this)
{
  if ( this->m_pkShopWin )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkShopWin->vfptr);
}

//----- (0048FC30) --------------------------------------------------------
void __thiscall GameFrameWork::CloseKDQuestWin(GameFrameWork *this)
{
  if ( this->m_pkKingDomQuest )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkKingDomQuest->vfptr);
}

//----- (0048FC50) --------------------------------------------------------
void __thiscall GameFrameWork::OpenActionWin(GameFrameWork *this)
{
  if ( this->m_pkActionWin )
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkActionWin->vfptr);
}

//----- (0048FC70) --------------------------------------------------------
void __thiscall GameFrameWork::CloseActionWin(GameFrameWork *this)
{
  if ( this->m_pkActionWin )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkActionWin->vfptr);
}

//----- (0048FC90) --------------------------------------------------------
void __thiscall GameFrameWork::SetTopFriendAddWin(GameFrameWork *this)
{
  if ( this->m_pkFriendAddWin )
    PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkFriendAddWin->vfptr);
}

//----- (0048FCB0) --------------------------------------------------------
void __thiscall GameFrameWork::CloseFriendAddWin(GameFrameWork *this)
{
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkFriendAddWin->vfptr);
}

//----- (0048FCD0) --------------------------------------------------------
void __thiscall GameFrameWork::CloseChatBlockListWin(GameFrameWork *this)
{
  if ( this->m_pkChatBlockListWin )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkChatBlockListWin->vfptr);
}

//----- (0048FCF0) --------------------------------------------------------
void __thiscall GameFrameWork::UpdateChatBlockListWin(GameFrameWork *this)
{
  ChatBlockListWin *v1; // ecx@1

  v1 = this->m_pkChatBlockListWin;
  if ( v1 )
    ChatBlockListWin::UpdateViewList(v1);
}

//----- (0048FD00) --------------------------------------------------------
void __thiscall GameFrameWork::OpenRaidMemberAddWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  ExpeditionMemberAddWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_pkExpeditionMemberAddWin;
  if ( v2 )
  {
    if ( !PgWin::IsVisible((PgWin *)&v2->vfptr) )
    {
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v1->m_pkExpeditionMemberAddWin->vfptr[59].__vecDelDtor)(
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        0.5,
        0.5);
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkExpeditionMemberAddWin->vfptr);
    }
  }
}

//----- (0048FD60) --------------------------------------------------------
void __thiscall GameFrameWork::CloseRaidMemberAddWin(GameFrameWork *this)
{
  if ( this->m_pkExpeditionMemberAddWin )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkExpeditionMemberAddWin->vfptr);
}

//----- (0048FD80) --------------------------------------------------------
void __thiscall GameFrameWork::CloseMysteryVaultWin(GameFrameWork *this)
{
  if ( this->m_pkMysteryVaultWin )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkMysteryVaultWin->vfptr);
}

//----- (0048FDA0) --------------------------------------------------------
void __thiscall GameFrameWork::OpenMapLinkGateWin(GameFrameWork *this)
{
  if ( this->m_pkMapLinkGateWin )
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkMapLinkGateWin->vfptr);
}

//----- (0048FDC0) --------------------------------------------------------
void __thiscall GameFrameWork::CloseMapLinkGateWin(GameFrameWork *this)
{
  if ( this->m_pkMapLinkGateWin )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkMapLinkGateWin->vfptr);
}

//----- (0048FDE0) --------------------------------------------------------
void __thiscall GameFrameWork::CloseHolyPromiseAddWin(GameFrameWork *this)
{
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkHolyPromiseAddWin->vfptr);
}

//----- (0048FE00) --------------------------------------------------------
void __thiscall GameFrameWork::SetTopHolyPromiseAddWin(GameFrameWork *this)
{
  if ( this->m_pkHolyPromiseAddWin )
    PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkHolyPromiseAddWin->vfptr);
}

//----- (0048FE20) --------------------------------------------------------
void __thiscall GameFrameWork::ActivateRaidWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  ExpeditionWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_pkExpeditionWin;
  if ( v2 )
  {
    if ( PgWin::IsVisible((PgWin *)&v2->vfptr) )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkExpeditionWin->vfptr);
    else
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkExpeditionWin->vfptr);
  }
}

//----- (0048FE60) --------------------------------------------------------
void __thiscall GameFrameWork::CloseCommunityWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  PgWin *v2; // ecx@1
  NiRefObjectVtbl *v3; // edi@2
  int v4; // eax@2
  NiRefObjectVtbl *v5; // edi@2
  int v6; // eax@2

  v1 = this;
  v2 = this->m_pkCurrentCommunityWin;
  if ( v2 )
  {
    v3 = v1->m_pkFriendWin->vfptr;
    v4 = ((int (*)(void))v2->vfptr[41].__vecDelDtor)();
    v3[43].__vecDelDtor((NiRefObject *)v1->m_pkFriendWin, v4);
    v5 = v1->m_pkFriendWin->vfptr;
    v6 = ((int (*)(void))v1->m_pkCurrentCommunityWin->vfptr[42].__vecDelDtor)();
    v5[44].__vecDelDtor((NiRefObject *)v1->m_pkFriendWin, v6);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, v1->m_pkCurrentCommunityWin);
    v1->m_pkCurrentCommunityWin = 0;
  }
}

//----- (0048FEE0) --------------------------------------------------------
void __thiscall GameFrameWork::OnOptionWinApply(GameFrameWork *this, int nType)
{
  GameFrameWork *v2; // esi@1

  v2 = this;
  if ( nType )
  {
    if ( nType == 1 )
    {
      OptionGraphicWin::OnApply(this->m_pkOptionGraphicWin);
      v2->m_bDisplayApplyCheck = 1;
    }
    else if ( nType == 2 )
    {
      OptionSoundWin::OnApply(this->m_pkOptionSoundWin);
    }
  }
  else
  {
    OptionSystemWin::OnApply(this->m_pkOptionSystemWin);
  }
}

//----- (0048FF30) --------------------------------------------------------
void __thiscall GameFrameWork::OnOptionWinDefaultSetting(GameFrameWork *this, int nType)
{
  if ( nType )
  {
    if ( nType == 1 )
    {
      OptionGraphicWin::OnDefaultSetting(this->m_pkOptionGraphicWin);
    }
    else if ( nType == 2 )
    {
      OptionSoundWin::OnDefaultSetting(this->m_pkOptionSoundWin);
    }
  }
  else
  {
    OptionSystemWin::OnDefaultSetting(this->m_pkOptionSystemWin);
  }
}

//----- (0048FF70) --------------------------------------------------------
void __thiscall GameFrameWork::OpenGameOptionWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkOptionWin->vfptr);
  OptionSoundWin::CloseWin(v1->m_pkOptionSoundWin);
  OptionGraphicWin::CloseWin(v1->m_pkOptionGraphicWin);
  OptionSystemWin::OpenWin(v1->m_pkOptionSystemWin);
}

//----- (0048FFB0) --------------------------------------------------------
void __thiscall GameFrameWork::OpenGraphicOptionWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkOptionWin->vfptr);
  OptionSoundWin::CloseWin(v1->m_pkOptionSoundWin);
  OptionSystemWin::CloseWin(v1->m_pkOptionSystemWin);
  OptionGraphicWin::OpenWin(v1->m_pkOptionGraphicWin);
}

//----- (0048FFF0) --------------------------------------------------------
void __thiscall GameFrameWork::OpenSoundOptionWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkOptionWin->vfptr);
  OptionSystemWin::CloseWin(v1->m_pkOptionSystemWin);
  OptionGraphicWin::CloseWin(v1->m_pkOptionGraphicWin);
  OptionSoundWin::OpenWin(v1->m_pkOptionSoundWin);
}

//----- (00490030) --------------------------------------------------------
void __thiscall GameFrameWork::OpenKeyRemappingOptionWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  OptionSystemWin::CloseWin(this->m_pkOptionSystemWin);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkKeyRemappingWin->vfptr);
}

//----- (00490060) --------------------------------------------------------
void __thiscall GameFrameWork::CloseOptionWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  OptionGraphicWin::OnWinClose(this->m_pkOptionGraphicWin);
  OptionSystemWin::OnWinClose(v1->m_pkOptionSystemWin);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkOptionWin->vfptr);
}

//----- (004900A0) --------------------------------------------------------
void __thiscall GameFrameWork::NcQuestGiveUpReq(GameFrameWork *this, unsigned __int16 nQuestID)
{
  GameFrameWork::SendNetMsgZoneMgr(this, 0x11u, 7u, &nQuestID, 2);
}

//----- (004900C0) --------------------------------------------------------
void __thiscall GameFrameWork::NcQuestClientScenarioDoneReq(GameFrameWork *this, unsigned __int16 kID)
{
  GameFrameWork::SendNetMsgZoneMgr(this, 0x11u, 0xBu, &kID, 2);
}

//----- (004900E0) --------------------------------------------------------
void __thiscall GameFrameWork::NcMiscHideExceptMeCmd(GameFrameWork *this, bool bOn)
{
  if ( bOn )
  {
    GameFrameWork::SendNetMsgZoneMgr(this, 2u, 0x17u, 0, 0);
    CMiniHouseMgr::RemoveAll((CMiniHouseMgr *)&g_kMiniHouseMgr, 1);
  }
  else
  {
    GameFrameWork::SendNetMsgZoneMgr(this, 2u, 0x18u, 0, 0);
  }
}

//----- (00490120) --------------------------------------------------------
void __thiscall GameFrameWork::NcQuestScriptCmdAck(GameFrameWork *this, unsigned __int16 kID, char byScriptCmd, unsigned int dwResult)
{
  PROTO_NC_QUEST_SCRIPT_CMD_ACK kAck; // [sp+0h] [bp-8h]@1

  kAck.nQSC = byScriptCmd;
  kAck.nQuestID = kID;
  kAck.nResult = dwResult;
  GameFrameWork::SendNetMsgZoneMgr(this, 0x11u, 2u, &kAck, 7);
}

//----- (00490150) --------------------------------------------------------
void __thiscall GameFrameWork::SetWingStonePlaceList(GameFrameWork *this, unsigned int uiParam)
{
  WingStoneWin::ChoiceList(this->m_pkWingStoneWin, uiParam);
}

//----- (00490180) --------------------------------------------------------
void __thiscall GameFrameWork::OnCloseJoinWin(GameFrameWork *this)
{
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkMHJoinWin->vfptr);
}

//----- (004901A0) --------------------------------------------------------
void GameFrameWork::MHObjFocusCancel()
{
  MiniHouseIndoor::SetFocusObj(&g_kWorld.m_MiniHouseIndoorMode, 0, 1);
  MiniHouseIndoor::CancelPickObj(&g_kWorld.m_MiniHouseIndoorMode);
}

//----- (004901C0) --------------------------------------------------------
void GameFrameWork::MHObjUsePortal()
{
  char pProto; // [sp+1h] [bp-1h]@1

  pProto = 0;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x23u, 0x56u, &pProto, 1);
}

//----- (004901E0) --------------------------------------------------------
void __thiscall GameFrameWork::OnShowMakeKarisWin(GameFrameWork *this, bool bShow)
{
  GameFrameWork *v2; // esi@1

  v2 = this;
  if ( bShow == 1 )
  {
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkInventoryWin->vfptr);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkMakeKarisWin->vfptr);
  }
  else
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkMakeKarisWin->vfptr);
  }
}

//----- (00490230) --------------------------------------------------------
void __thiscall GameFrameWork::SetInvLockAllItems(GameFrameWork *this, bool b)
{
  InventoryWin *v2; // ecx@1

  v2 = this->m_pkInventoryWin;
  if ( v2 )
  {
    if ( b )
      InventoryWin::LockAllItem(v2);
    else
      InventoryWin::UnLockAllItem(v2);
  }
}

//----- (00490260) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenEnchantGemWin(GameFrameWork *this, SHINE_ITEM_STRUCT kStruct, void *pvBody, unsigned int UI_TYPE)
{
  GameFrameWork *v4; // ebx@1
  EnchantGemWin *v5; // eax@1
  void *v6; // esi@1
  PgWin *v7; // ebx@5
  SHINE_ITEM_STRUCT v8; // [sp+Ch] [bp-6Ch]@1

  v4 = this;
  v5 = this->m_pkEnchantGemWin1;
  qmemcpy(&v8, &kStruct, 0x64u);
  *((_WORD *)&v8.itemattr.Bracelet + 49) = *((_WORD *)&kStruct.itemattr.Bracelet + 49);
  *((_BYTE *)&v8.itemattr.Bracelet + 100) = *((_BYTE *)&kStruct.itemattr.Bracelet + 100);
  v6 = pvBody;
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v5->vfptr);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkEnchantGemWin2->vfptr);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkEnchantGemWin3->vfptr);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkEnchantGemDeleteWin1->vfptr);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkEnchantGemDeleteWin2->vfptr);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkEnchantGemDeleteWin3->vfptr);
  if ( UI_TYPE )
  {
    if ( UI_TYPE != 1 )
      return;
    if ( (unsigned __int8)v8.itemattr.weapon.maxSocketCount == (unsigned __int8)v8.itemattr.weapon.createdSocketCount )
    {
      v7 = (PgWin *)&v4->m_pkEnchantGemDeleteWin1->vfptr;
    }
    else if ( (unsigned __int8)v8.itemattr.weapon.maxSocketCount
            - (unsigned __int8)v8.itemattr.weapon.createdSocketCount == 1 )
    {
      v7 = (PgWin *)&v4->m_pkEnchantGemDeleteWin2->vfptr;
    }
    else
    {
      if ( (unsigned __int8)v8.itemattr.weapon.maxSocketCount - (unsigned __int8)v8.itemattr.weapon.createdSocketCount != 2 )
        return;
      v7 = (PgWin *)&v4->m_pkEnchantGemDeleteWin3->vfptr;
    }
  }
  else if ( (unsigned __int8)v8.itemattr.weapon.maxSocketCount == (unsigned __int8)v8.itemattr.weapon.createdSocketCount )
  {
    v7 = (PgWin *)&v4->m_pkEnchantGemWin1->vfptr;
  }
  else if ( (unsigned __int8)v8.itemattr.weapon.maxSocketCount - (unsigned __int8)v8.itemattr.weapon.createdSocketCount == 1 )
  {
    v7 = (PgWin *)&v4->m_pkEnchantGemWin2->vfptr;
  }
  else
  {
    if ( (unsigned __int8)v8.itemattr.weapon.maxSocketCount - (unsigned __int8)v8.itemattr.weapon.createdSocketCount != 2 )
      return;
    v7 = (PgWin *)&v4->m_pkEnchantGemWin3->vfptr;
  }
  if ( v7 )
  {
    PgWinMgr::ShowWin(&Pgg_kWinMgr, v7);
    EnchantGemWin::OnSetEnchantGem((EnchantGemWin *)v7, (int)v7, &v8, v6);
  }
}

//----- (00490380) --------------------------------------------------------
void __thiscall GameFrameWork::OnCloseEnchantGemToolTip(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  EnchantGemToolTipWin *v2; // ecx@2

  v1 = this;
  if ( (unsigned __int8)((int (*)(void))this->m_pkEnchantGemToolTipWin->vfptr[65].__vecDelDtor)() )
  {
    v2 = v1->m_pkEnchantGemToolTipWin;
    if ( v2->m_ItemID != -1 )
      EnchantGemToolTipWin::Clear(v2);
    ((void (__stdcall *)(_DWORD))v1->m_pkEnchantGemToolTipWin->vfptr[64].__vecDelDtor)(0);
  }
}

//----- (004903D0) --------------------------------------------------------
void __thiscall GameFrameWork::OpenQuestNewsWin(GameFrameWork *this)
{
  QuestNewsWin *v1; // ecx@1

  this->m_pkQuestNewsWin->m_ePigeonState = 2;
  v1 = this->m_pkQuestNewsWin;
  if ( v1 )
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}

//----- (00490400) --------------------------------------------------------
void __thiscall GameFrameWork::CloseQuestNewsWin(GameFrameWork *this)
{
  if ( this->m_pkQuestNewsWin )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkQuestNewsWin->vfptr);
}

//----- (00490420) --------------------------------------------------------
void __thiscall GameFrameWork::OpenPlayGuideMinWin(GameFrameWork *this)
{
  if ( this->m_pkPlayGuideMinWin )
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkPlayGuideMinWin->vfptr);
}

//----- (00490440) --------------------------------------------------------
void __thiscall GameFrameWork::ClosePlayGuideMinWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  if ( this->m_pkPlayGuideMinWin )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkPlayGuideMinWin->vfptr[65].__vecDelDtor)() == 1 )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkPlayGuideMinWin->vfptr);
  }
}

//----- (00490480) --------------------------------------------------------
void __thiscall GameFrameWork::OpenPlayGuideWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  if ( this->m_pkPlayGuideWin )
  {
    if ( !(unsigned __int8)((int (*)(void))this->m_pkPlayGuideWin->vfptr[65].__vecDelDtor)() )
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkPlayGuideWin->vfptr);
  }
}

//----- (004904C0) --------------------------------------------------------
void __thiscall GameFrameWork::ClosePlayGuideWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  if ( this->m_pkPlayGuideWin )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkPlayGuideWin->vfptr[65].__vecDelDtor)() == 1 )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkPlayGuideWin->vfptr);
  }
}

//----- (00490500) --------------------------------------------------------
void __thiscall GameFrameWork::RefreshHotKey(GameFrameWork *this)
{
  GameFrameWork *v1; // edi@1
  ShortCutWin **v2; // esi@1
  signed int v3; // ebx@1

  v1 = this;
  v2 = this->m_pkShortCutSubWinV;
  v3 = 4;
  do
  {
    ShortCutWin::ReflashHotKey(v1->m_pkShortCutWin);
    ShortCutWin::ReflashHotKey(v1->m_pkShortCutWinV);
    ShortCutWin::ReflashHotKey(*(v2 - 5));
    ShortCutWin::ReflashHotKey(*v2);
    ++v2;
    --v3;
  }
  while ( v3 );
}

//----- (00490540) --------------------------------------------------------
void __thiscall GameFrameWork::OpenCollectWin(GameFrameWork *this, bool bOpen)
{
  CollectWin *v2; // [sp-4h] [bp-4h]@2

  if ( this->m_pkCollectWin )
  {
    v2 = this->m_pkCollectWin;
    if ( bOpen )
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
    else
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
  }
}

//----- (00490570) --------------------------------------------------------
void __thiscall GameFrameWork::OpenCollectPeepingWin(GameFrameWork *this, bool bOpen)
{
  CollectWin *v2; // [sp-4h] [bp-4h]@2

  if ( this->m_pkCollectPeepingWin )
  {
    v2 = this->m_pkCollectPeepingWin;
    if ( bOpen )
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
    else
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
  }
}

//----- (004905A0) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenAttendIconWin(GameFrameWork *this)
{
  if ( this->m_pkAttendIconWin )
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkAttendIconWin->vfptr);
}

//----- (004905C0) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenAttendRewardWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  if ( this->m_pkAttendRewardWin )
  {
    ((void (*)(void))this->m_pkAttendRewardWin->vfptr[67].__vecDelDtor)();
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkAttendRewardWin->vfptr);
  }
}

//----- (004905F0) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenAttendCheckWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  int v2; // eax@4

  v1 = this;
  if ( this->m_pkAttendCheckWin )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkAttendCheckWin->vfptr[65].__vecDelDtor)() )
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkAttendCheckWin->vfptr);
    }
    else
    {
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkAttendCheckWin->vfptr);
      v2 = AttendCheckWin::GetMonthRewardIndex(v1->m_pkAttendCheckWin);
      if ( v2 != -1 )
        GameFrameWork::NcCharEventAttendRewardReq(v1, v2, 27);
    }
  }
}

//----- (00490650) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenReviveMenuWin(GameFrameWork *this, bool bShow)
{
  ReviveMenuWin *v2; // [sp-4h] [bp-4h]@2

  if ( this->m_pkReviveMenuWin )
  {
    v2 = this->m_pkReviveMenuWin;
    if ( bShow )
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
    else
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
  }
}

//----- (00490680) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenRebirthMenuWin(GameFrameWork *this, bool bShow)
{
  RebirthMenuWin *v2; // [sp-4h] [bp-4h]@2

  if ( this->m_pkRebirthMenuWin )
  {
    v2 = this->m_pkRebirthMenuWin;
    if ( bShow )
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
    else
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
  }
}

//----- (004906B0) --------------------------------------------------------
void __thiscall GameFrameWork::OpenKQScoreWin(GameFrameWork *this, bool b)
{
  GameFrameWork *v2; // esi@1
  KQScoreWin *v3; // ecx@2

  v2 = this;
  if ( this->m_pkKQScoreWin )
  {
    v3 = this->m_pkKQScoreWin;
    if ( b )
    {
      if ( !(unsigned __int8)((int (*)(void))v3->vfptr[65].__vecDelDtor)() )
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkKQScoreWin->vfptr);
    }
    else if ( (unsigned __int8)((int (*)(void))v3->vfptr[65].__vecDelDtor)() == 1 )
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkKQScoreWin->vfptr);
    }
  }
}

//----- (00490720) --------------------------------------------------------
void __thiscall GameFrameWork::SetInventoryNewMark(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  InventoryWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_pkInventoryWin;
  if ( v2 )
  {
    InventoryWin::SetStartNewMark(v2);
    InventoryWin::NcNewRewardAndChargedItem(v1->m_pkInventoryWin);
  }
}

//----- (00490740) --------------------------------------------------------
void __thiscall GameFrameWork::CloseClassChangeWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  GameFrameWork::NcActEndOfTrade(this);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkClassChangeWin->vfptr);
}

//----- (00490760) --------------------------------------------------------
void __thiscall GameFrameWork::OpenKDTeamScoreWin(GameFrameWork *this, bool bOpen)
{
  GameFrameWork *v2; // esi@1
  KDTeamScoreWin *v3; // ecx@2

  v2 = this;
  if ( this->m_pkKDTeamScoreWin )
  {
    v3 = this->m_pkKDTeamScoreWin;
    if ( bOpen )
    {
      if ( !(unsigned __int8)((int (*)(void))v3->vfptr[65].__vecDelDtor)() )
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkKDTeamScoreWin->vfptr);
    }
    else if ( (unsigned __int8)((int (*)(void))v3->vfptr[65].__vecDelDtor)() == 1 )
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkKDTeamScoreWin->vfptr);
    }
  }
}

//----- (004907D0) --------------------------------------------------------
void __thiscall GameFrameWork::GuildEmblemShowWin(GameFrameWork *this, bool bShow)
{
  GameFrameWork *v2; // esi@1
  GuildEmblemWin *v3; // ecx@2

  v2 = this;
  if ( this->m_pkGuildEmblemWin )
  {
    v3 = this->m_pkGuildEmblemWin;
    if ( bShow )
    {
      if ( !(unsigned __int8)((int (*)(void))v3->vfptr[65].__vecDelDtor)() )
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkGuildEmblemWin->vfptr);
    }
    else if ( (unsigned __int8)((int (*)(void))v3->vfptr[65].__vecDelDtor)() == 1 )
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkGuildEmblemWin->vfptr);
    }
  }
}

//----- (00490840) --------------------------------------------------------
void __thiscall GameFrameWork::PartyScoreShowWin(GameFrameWork *this, bool bShow)
{
  GameFrameWork *v2; // esi@1
  PartyScoreWin *v3; // ecx@2

  v2 = this;
  if ( this->m_pkPartyScoreWin )
  {
    v3 = this->m_pkPartyScoreWin;
    if ( bShow )
    {
      if ( !(unsigned __int8)((int (*)(void))v3->vfptr[65].__vecDelDtor)() )
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkPartyScoreWin->vfptr);
    }
    else if ( (unsigned __int8)((int (*)(void))v3->vfptr[65].__vecDelDtor)() == 1 )
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkPartyScoreWin->vfptr);
    }
  }
}

//----- (004908B0) --------------------------------------------------------
void __thiscall GameFrameWork::IDRankingShowWin(GameFrameWork *this, bool bShow)
{
  GameFrameWork *v2; // esi@1
  IDRankingWin *v3; // ecx@2

  v2 = this;
  if ( this->m_pkIDRankingWin )
  {
    v3 = this->m_pkIDRankingWin;
    if ( bShow )
    {
      if ( !(unsigned __int8)((int (*)(void))v3->vfptr[65].__vecDelDtor)() )
      {
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkIDRankingWin->vfptr);
        IDRankingWin::ShowTopPortrait(v2->m_pkIDRankingWin);
      }
    }
    else if ( (unsigned __int8)((int (*)(void))v3->vfptr[65].__vecDelDtor)() == 1 )
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkIDRankingWin->vfptr);
    }
  }
}

//----- (00490920) --------------------------------------------------------
void __thiscall GameFrameWork::ChatItemLink(GameFrameWork *this, char *pText, SHINE_ITEM_STRUCT *rItemStruct)
{
  if ( pText )
    ChatDisplayWin2::SetItemChatLink(this->m_pkChatDisplayWin, pText, rItemStruct);
}

//----- (00490940) --------------------------------------------------------
void __thiscall GameFrameWork::LinkItemShowWin(GameFrameWork *this, bool bShow)
{
  GameFrameWork *v2; // esi@1
  ItemInfoWin *v3; // ecx@2

  v2 = this;
  if ( this->m_pkItemLinkInfoWin )
  {
    v3 = this->m_pkItemLinkInfoWin;
    if ( bShow )
    {
      if ( !(unsigned __int8)((int (*)(void))v3->vfptr[65].__vecDelDtor)() )
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkItemLinkInfoWin->vfptr);
    }
    else if ( (unsigned __int8)((int (*)(void))v3->vfptr[65].__vecDelDtor)() == 1 )
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkItemLinkInfoWin->vfptr);
    }
  }
}

//----- (004909B0) --------------------------------------------------------
bool __thiscall GameFrameWork::IsItemInfoWin(GameFrameWork *this)
{
  bool result; // al@2

  if ( this->m_pkItemLinkInfoWin )
    result = ((int (*)(void))this->m_pkItemLinkInfoWin->vfptr[65].__vecDelDtor)();
  else
    result = 0;
  return result;
}

//----- (004909D0) --------------------------------------------------------
void __thiscall GameFrameWork::ClickLinkItemInfo(GameFrameWork *this, Item *pItem, int iX, int iY)
{
  GameFrameWork *v4; // esi@1
  int v5; // edi@2
  int v6; // eax@2
  unsigned int v7; // ecx@2
  int v8; // edi@2
  int v9; // ecx@2
  int v10; // edi@6
  ItemInfoWin *v11; // eax@6
  float v12; // ST0C_4@6
  float v13; // ST10_4@6

  v4 = this;
  if ( pItem )
  {
    ItemInfoWin::SetItemInfo(this->m_pkItemLinkInfoWin, pItem);
    ItemInfoWin::SetCloseButtonPos(v4->m_pkItemLinkInfoWin);
    v5 = ((int (*)(void))v4->m_pkItemLinkInfoWin->vfptr[36].__vecDelDtor)();
    v6 = ((int (*)(void))v4->m_pkItemLinkInfoWin->vfptr[37].__vecDelDtor)();
    v7 = PgWin::ms_uiScreenWidth - v5;
    v8 = iY;
    v9 = v7 - iX;
    if ( v9 < 0 )
      iX += v9;
    if ( ((PgWin::ms_uiScreenHeight - v6 - iY) & 0x80000000) != 0 )
      v8 = PgWin::ms_uiScreenHeight - v6;
    v10 = v8 - ((int (*)(void))v4->m_pkShortCutWin->vfptr[37].__vecDelDtor)();
    v11 = v4->m_pkItemLinkInfoWin;
    v12 = (double)iX;
    v11->m_kLocal.m_Translate.x = v12;
    v13 = (double)v10;
    v11->m_kLocal.m_Translate.y = v13;
    v11->m_kLocal.m_Translate.z = 0.0;
    ((void (*)(void))v4->m_pkItemLinkInfoWin->vfptr[66].__vecDelDtor)();
    if ( v4->m_pkItemLinkInfoWin )
    {
      if ( !(unsigned __int8)((int (*)(void))v4->m_pkItemLinkInfoWin->vfptr[65].__vecDelDtor)() )
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkItemLinkInfoWin->vfptr);
    }
  }
}

//----- (00490AD0) --------------------------------------------------------
bool __thiscall GameFrameWork::IsRoarShowWin(GameFrameWork *this)
{
  bool result; // al@2

  if ( this->m_pkRoarWin )
    result = ((int (*)(void))this->m_pkRoarWin->vfptr[65].__vecDelDtor)();
  else
    result = 0;
  return result;
}

//----- (00490AF0) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenPrivateStoreWinKey(GameFrameWork *this)
{
  if ( !EditWin::ms_pkCurEditWin )
    PgFrameWork::AddMsg((PgFrameWork *)&this->vfptr, 0xA3u, 0, 0);
}

//----- (00490B10) --------------------------------------------------------
void __thiscall GameFrameWork::SetOptionResolution(GameFrameWork *this, unsigned int uiWidth, unsigned int uiHeight)
{
  GameFrameWork::ms_uiDisResWidth = uiWidth;
  GameFrameWork::ms_uiDisResHeight = uiHeight;
  dword_A76A5A = uiWidth;
  dword_A76A5E = uiHeight;
  OptionGraphicWin::SetResoulution(this->m_pkOptionGraphicWin, uiWidth, uiHeight);
}
// A76A5A: using guessed type int dword_A76A5A;
// A76A5E: using guessed type int dword_A76A5E;

//----- (00490B40) --------------------------------------------------------
void __thiscall GameFrameWork::OpenCharInfoWin(GameFrameWork *this)
{
  Tutorial *v1; // eax@2
  Tutorial *v2; // eax@3

  if ( this->m_pkCharInfoWin )
  {
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkCharInfoWin->vfptr);
    v1 = Singleton<Tutorial>::m_pInstance;
    if ( !Singleton<Tutorial>::m_pInstance )
    {
      v2 = (Tutorial *)operator new(0xB4u);
      if ( v2 )
        Tutorial::Tutorial(v2);
      else
        v1 = 0;
      Singleton<Tutorial>::m_pInstance = v1;
    }
    v1->m_bOpenCharWin = 1;
  }
}

//----- (00490BC0) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenCharInfoWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  PgWin *v2; // esi@3

  v1 = this;
  if ( this->m_pkCharInfoWin )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkCharInfoWin->vfptr[65].__vecDelDtor)() )
    {
      v2 = (PgWin *)&v1->m_pkCharInfoWin->vfptr;
      if ( v2 )
        PgWinMgr::CloseWin(&Pgg_kWinMgr, v2);
    }
    else
    {
      GameFrameWork::OpenCharInfoWin(v1);
    }
  }
}

//----- (00490C00) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenMiniHouseInventoryWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  PgWin *v2; // esi@4

  v1 = this;
  if ( this->m_pkMiniHouseInventoryWin )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkMiniHouseInventoryWin->vfptr[65].__vecDelDtor)() )
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMiniHouseInventoryWin->vfptr);
    }
    else
    {
      v2 = (PgWin *)&v1->m_pkMiniHouseInventoryWin->vfptr;
      if ( v2 )
        PgWinMgr::ShowWin(&Pgg_kWinMgr, v2);
    }
  }
}

//----- (00490C50) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenSkillWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  int v2; // eax@4

  v1 = this;
  if ( this->m_pkSkillWin )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkSkillWin->vfptr[65].__vecDelDtor)() )
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkSkillWin->vfptr);
    }
    else
    {
      SkillWin::ResetContents(v1->m_pkSkillWin);
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkSkillWin->vfptr);
      Singleton<Tutorial>::getInstance();
      *(_BYTE *)(v2 + 7) = 1;
    }
  }
}

//----- (00490CB0) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenQuestWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  PgWin *v2; // esi@3
  CQuestWin2 *v3; // ecx@5

  v1 = this;
  if ( this->m_pkQuestWin )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkQuestWin->vfptr[65].__vecDelDtor)() )
    {
      v2 = (PgWin *)&v1->m_pkQuestWin->vfptr;
      if ( v2 )
        PgWinMgr::CloseWin(&Pgg_kWinMgr, v2);
    }
    else
    {
      v3 = v1->m_pkQuestWin;
      if ( v3 )
      {
        CQuestWin2::SelectTab(v3, 1);
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkQuestWin->vfptr);
      }
    }
  }
}

//----- (00490D10) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenHelpWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  if ( this->m_pkPlayGuideWin )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkPlayGuideWin->vfptr[65].__vecDelDtor)() )
    {
      if ( v1->m_pkPlayGuideWin )
      {
        if ( (unsigned __int8)((int (*)(void))v1->m_pkPlayGuideWin->vfptr[65].__vecDelDtor)() == 1 )
          PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkPlayGuideWin->vfptr);
      }
    }
    else
    {
      PlayGuideWin::Reset(v1->m_pkPlayGuideWin);
      if ( v1->m_pkPlayGuideWin && !(unsigned __int8)((int (*)(void))v1->m_pkPlayGuideWin->vfptr[65].__vecDelDtor)() )
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkPlayGuideWin->vfptr);
    }
  }
}

//----- (00490DA0) --------------------------------------------------------
void __thiscall GameFrameWork::OnDeleteMHItem(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  mhEditRoomWin *v2; // eax@1
  ItemIcon *v3; // ecx@2
  PgNet *v4; // ecx@3
  int v5; // eax@3
  float v6; // edx@3
  float v7; // ecx@3
  int kPos_8; // ST14_4@3
  NETCOMMAND netcmd; // [sp+10h] [bp-24h]@3
  __int64 v10; // [sp+14h] [bp-20h]@3
  unsigned __int16 v11; // [sp+1Eh] [bp-16h]@3
  PROTO_NC_ITEM_DROP_REQ kItemDropPacket; // [sp+20h] [bp-14h]@3

  v1 = this;
  v2 = this->m_pkMHEditRoomWin;
  if ( v2 )
  {
    v3 = (ItemIcon *)&v2->m_pkWorkTargetWin->vfptr;
    if ( v3 )
    {
      ItemIcon::GetItem(v3);
      v4 = (PgNet *)&v1->m_spZoneNet.m_pObject->vfptr;
      netcmd.protocol = 12295;
      PgNet::AddNetMsg(v4, &netcmd, 2);
      Sleep(1u);
      v5 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
      v6 = *(float *)(v5 + 4);
      v7 = *(float *)v5;
      kPos_8 = *(_DWORD *)(v5 + 8);
      HIDWORD(v10) = v11 | 0xC00;
      kItemDropPacket.slot.Inven = v1->m_pkMHEditRoomWin->m_kWorkTargetInven.Inven;
      kItemDropPacket.lot = 1;
      kItemDropPacket.loc.x = (signed __int64)v7;
      v10 = (signed __int64)v6;
      kItemDropPacket.loc.y = v10;
      PgNet::SendNetMsg((PgNet *)&v1->m_spZoneNet.m_pObject->vfptr, &kItemDropPacket, 14);
    }
  }
}

//----- (00490EA0) --------------------------------------------------------
void GameFrameWork::JoinDiceGameReq()
{
  MHDiceGameTask *v1; // ecx@1
  MHDiceGameTask *v2; // esi@2
  NiPointer<MHDiceGameTask> result; // [sp+8h] [bp-10h]@1
  int v4; // [sp+14h] [bp-4h]@1

  v1 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  v4 = 0;
  MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_JOIN_REQ(v1);
  v4 = -1;
  if ( result.m_pObject )
  {
    v2 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
  }
}

//----- (00490F20) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenDiceRewardWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  mhEditRoomWin *v2; // eax@2
  ItemIcon *v3; // ecx@3
  unsigned __int16 v4; // di@4
  Item *v5; // eax@4

  v1 = this;
  if ( this->m_pkDiceRewardMoneyWin )
  {
    v2 = this->m_pkMHEditRoomWin;
    if ( v2 )
    {
      v3 = (ItemIcon *)&v2->m_pkWorkTargetWin->vfptr;
      if ( v3 )
      {
        v4 = v2->m_kWorkTargetInven.Inven;
        v5 = ItemIcon::GetItem(v3);
        MHDiceRewardMoneyWin::SetAmout(v1->m_pkDiceRewardMoneyWin, v5->m_kStruct.itemattr.furniture.nRewardMoney);
        v1->m_pkDiceRewardMoneyWin->m_nInvenSlot.Inven = v4;
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkDiceRewardMoneyWin->vfptr);
      }
    }
  }
}

//----- (00490F90) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenDiceExpectWin(GameFrameWork *this)
{
  mhEditRoomWin *v1; // eax@2
  MHDiceGameTask *v2; // ecx@4
  MHDiceGameTask *v3; // esi@5
  NiPointer<MHDiceGameTask> result; // [sp+8h] [bp-14h]@4
  PROTO_NC_DICE_TAISAI_EXPECT_INCOME_MONEY_REQ data; // [sp+Ch] [bp-10h]@4
  int v6; // [sp+18h] [bp-4h]@4

  if ( this->m_pkDiceExpectMoneyWin )
  {
    v1 = this->m_pkMHEditRoomWin;
    if ( v1 )
    {
      if ( v1->m_pkWorkTargetWin )
      {
        data.nInvenSlot.Inven = v1->m_kWorkTargetInven.Inven;
        v2 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
        v6 = 0;
        MHDiceGameTask::Recv_NC_DICE_TAISAI_EXPECT_INCOME_MONEY_REQ(&data);
        v6 = -1;
        if ( result.m_pObject )
        {
          v3 = result.m_pObject;
          if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
          {
            if ( v3 )
              v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
          }
        }
      }
    }
  }
}

//----- (00491040) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenMiniPartyWinKey(GameFrameWork *this)
{
  if ( !EditWin::ms_pkCurEditWin )
    PartyWinInterface::TogglePartyWin(this->m_pkPartyWinInterface);
}

//----- (00491060) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenForumWin(GameFrameWork *this)
{
  if ( this->m_pkForumWin )
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkForumWin->vfptr);
}

//----- (00491080) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenItemShopWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  PgWin *v2; // esi@4

  v1 = this;
  if ( this->m_pkShopWin )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkShopWin->vfptr[65].__vecDelDtor)() )
    {
      ShopWin::OnWinClose(v1->m_pkShopWin);
    }
    else
    {
      v2 = (PgWin *)&v1->m_pkShopWin->vfptr;
      if ( v2 )
        PgWinMgr::ShowWin(&Pgg_kWinMgr, v2);
    }
  }
}

//----- (004910D0) --------------------------------------------------------
void __thiscall GameFrameWork::OnTab_Key(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  if ( g_pkMainChar->m_byMode == 1 )
  {
    Char::SetMode(g_pkMainChar, 2);
    GameFrameWork::NcActChangeModeReq(v1, 2);
  }
  else
  {
    Char::SetMode(g_pkMainChar, 1);
    GameFrameWork::NcActChangeModeReq(v1, 1);
  }
  if ( Char::CheckActState(g_pkMainChar, 100000) )
    ((void (*)(void))g_pkMainChar->vfptr[10].DeleteAbStateByAbstateIndex)();
}

//----- (00491130) --------------------------------------------------------
void __thiscall GameFrameWork::OnKeyDownMoveFront(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  if ( !EditWin::ms_pkCurEditWin && GameFrameWork::IsCapableKeyControl() )
  {
    v1->m_kCharMover.m_bKeyDown = 1;
    v1->m_kCharMover.m_bDownFront = 1;
  }
}

//----- (00491150) --------------------------------------------------------
void __thiscall GameFrameWork::OnKeyDownMoveBack(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  if ( !EditWin::ms_pkCurEditWin && GameFrameWork::IsCapableKeyControl() )
  {
    v1->m_kCharMover.m_bKeyDown = 1;
    v1->m_kCharMover.m_bDownBack = 1;
  }
}

//----- (00491170) --------------------------------------------------------
void __thiscall GameFrameWork::OnKeyDownMoveRight(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  if ( !EditWin::ms_pkCurEditWin && GameFrameWork::IsCapableKeyControl() )
  {
    v1->m_kCharMover.m_bKeyDown = 1;
    v1->m_kCharMover.m_bDownRight = 1;
  }
}

//----- (00491190) --------------------------------------------------------
void __thiscall GameFrameWork::OnKeyDownMoveLeft(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  if ( !EditWin::ms_pkCurEditWin && GameFrameWork::IsCapableKeyControl() )
  {
    v1->m_kCharMover.m_bKeyDown = 1;
    v1->m_kCharMover.m_bdownLeft = 1;
  }
}

//----- (004911B0) --------------------------------------------------------
void __thiscall GameFrameWork::OnKeyDownJump(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  if ( !EditWin::ms_pkCurEditWin && GameFrameWork::IsCapableKeyControl() )
    GameFrameWork::ActJump(v1);
}

//----- (004911D0) --------------------------------------------------------
void GameFrameWork::ChangeRun()
{
  Char *v1; // ecx@2
  Mover *v2; // eax@2

  if ( !((int (*)(void))g_pkMainChar->vfptr[7].Affect)() )
  {
    ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[7].Deaffect)(1);
    v1 = g_pkMainChar;
    v2 = g_pkMainChar->m_pkMover;
    if ( v2 && !g_pkMainChar->m_uiMoverSlot )
    {
      ((void (__thiscall *)(_DWORD, _DWORD))v2->vfptr[7].Deaffect)(g_pkMainChar->m_pkMover, 1);
      v1 = g_pkMainChar;
    }
    if ( !Char::CheckActState(v1, 100000) )
      ((void (*)(void))g_pkMainChar->vfptr[11].AddAbStateByAbstateIndex)();
  }
}

//----- (00491250) --------------------------------------------------------
void GameFrameWork::ChangeWalk()
{
  Char *v1; // ecx@1
  Mover *v2; // eax@1

  ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[7].Deaffect)(0);
  v1 = g_pkMainChar;
  v2 = g_pkMainChar->m_pkMover;
  if ( v2 && !g_pkMainChar->m_uiMoverSlot )
  {
    ((void (__thiscall *)(_DWORD, _DWORD))v2->vfptr[7].Deaffect)(g_pkMainChar->m_pkMover, 0);
    v1 = g_pkMainChar;
  }
  if ( !Char::CheckActState(v1, 100000) )
    ((void (*)(void))g_pkMainChar->vfptr[11].AddAbStateByAbstateIndex)();
}

//----- (004912B0) --------------------------------------------------------
void __thiscall GameFrameWork::OnHPSoulStoneUse_Key(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  StatusWin *v2; // ecx@4

  v1 = this;
  if ( !EditWin::ms_pkCurEditWin )
  {
    if ( !(`TutorialMgr::GetTutorialMgr'::`2'::`local static guard' & 1) )
    {
      `TutorialMgr::GetTutorialMgr'::`2'::`local static guard' |= 1u;
      TutorialMgr::TutorialMgr(&`TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr);
      atexit(`TutorialMgr::GetTutorialMgr'::`2'::`dynamic atexit destructor for 'kTutorialMgr'');
    }
    TutorialMgr::OnHPSoulStoneUse_Key(&`TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr);
    v2 = v1->m_pkStatusWin;
    if ( v2 )
      StatusWin::OnCmdHPSoul(v2);
  }
}
// A8C638: using guessed type int `TutorialMgr::GetTutorialMgr'::`2'::`local static guard';

//----- (00491310) --------------------------------------------------------
void __thiscall GameFrameWork::OnSPSoulStoneUse_Key(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  StatusWin *v2; // ecx@4

  v1 = this;
  if ( !EditWin::ms_pkCurEditWin )
  {
    if ( !(`TutorialMgr::GetTutorialMgr'::`2'::`local static guard' & 1) )
    {
      `TutorialMgr::GetTutorialMgr'::`2'::`local static guard' |= 1u;
      TutorialMgr::TutorialMgr(&`TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr);
      atexit(`TutorialMgr::GetTutorialMgr'::`2'::`dynamic atexit destructor for 'kTutorialMgr'');
    }
    TutorialMgr::OnSPSoulStoneUse_Key(&`TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr);
    v2 = v1->m_pkStatusWin;
    if ( v2 )
      StatusWin::OnCmdSPSoul(v2);
  }
}
// A8C638: using guessed type int `TutorialMgr::GetTutorialMgr'::`2'::`local static guard';

//----- (00491370) --------------------------------------------------------
void __thiscall GameFrameWork::OpenEnchantGemWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  if ( !(`TutorialMgr::GetTutorialMgr'::`2'::`local static guard' & 1) )
  {
    `TutorialMgr::GetTutorialMgr'::`2'::`local static guard' |= 1u;
    TutorialMgr::TutorialMgr(&`TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr);
    atexit(`TutorialMgr::GetTutorialMgr'::`2'::`dynamic atexit destructor for 'kTutorialMgr'');
  }
  TutorialMgr::OnOpenWeaponTitleWin(&`TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr);
  if ( !(unsigned __int8)((int (*)(void))v1->m_pkEnchantGemWin1->vfptr[65].__vecDelDtor)()
    && !(unsigned __int8)((int (*)(void))v1->m_pkEnchantGemWin2->vfptr[65].__vecDelDtor)()
    && !(unsigned __int8)((int (*)(void))v1->m_pkEnchantGemWin3->vfptr[65].__vecDelDtor)() )
  {
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkEnchantGemWin1->vfptr);
  }
}
// A8C638: using guessed type int `TutorialMgr::GetTutorialMgr'::`2'::`local static guard';

//----- (00491400) --------------------------------------------------------
void __thiscall GameFrameWork::OpenWeapontitleWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  if ( !(`TutorialMgr::GetTutorialMgr'::`2'::`local static guard' & 1) )
  {
    `TutorialMgr::GetTutorialMgr'::`2'::`local static guard' |= 1u;
    TutorialMgr::TutorialMgr(&`TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr);
    atexit(`TutorialMgr::GetTutorialMgr'::`2'::`dynamic atexit destructor for 'kTutorialMgr'');
  }
  TutorialMgr::OnOpenWeaponTitleWin(&`TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkWeaponTitleWin->vfptr);
}
// A8C638: using guessed type int `TutorialMgr::GetTutorialMgr'::`2'::`local static guard';

//----- (00491450) --------------------------------------------------------
void __thiscall GameFrameWork::OpenInventoryWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Tutorial *v2; // eax@3
  Tutorial *v3; // eax@4
  MainMenuWin *v4; // ecx@8

  v1 = this;
  if ( !(`TutorialMgr::GetTutorialMgr'::`2'::`local static guard' & 1) )
  {
    `TutorialMgr::GetTutorialMgr'::`2'::`local static guard' |= 1u;
    TutorialMgr::TutorialMgr(&`TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr);
    atexit(`TutorialMgr::GetTutorialMgr'::`2'::`dynamic atexit destructor for 'kTutorialMgr'');
  }
  TutorialMgr::OpenInventoryWin(&`TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkInventoryWin->vfptr);
  v2 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v3 = (Tutorial *)operator new(0xB4u);
    if ( v3 )
      Tutorial::Tutorial(v3);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  v2->m_bOpenInvenWin = 1;
  v4 = v1->m_pkMainMenuWin;
  if ( v4 )
    MainMenuWin::ShowNewMark(v4, 0);
}
// A8C638: using guessed type int `TutorialMgr::GetTutorialMgr'::`2'::`local static guard';

//----- (00491520) --------------------------------------------------------
void __thiscall GameFrameWork::CloseShopMenu(GameFrameWork *this, bool bSendEndOfTrade)
{
  GameFrameWork *v2; // esi@1

  v2 = this;
  if ( bSendEndOfTrade )
    GameFrameWork::NcActEndOfTrade(this);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkItemShopWin->vfptr);
  InventoryWin::ms_uiMode = 0;
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (00491560) --------------------------------------------------------
void __thiscall GameFrameWork::OpenSkillShopMenu(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  char v2; // al@5

  v1 = this;
  if ( !(unsigned __int8)((int (*)(void))this->m_pkInventoryWin->vfptr[65].__vecDelDtor)() )
    GameFrameWork::OpenInventoryWin(v1);
  if ( !(unsigned __int8)((int (*)(void))v1->m_pkNPCSkillWin->vfptr[65].__vecDelDtor)() )
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkNPCSkillWin->vfptr);
  v2 = User::GetMainCharClass(&g_kUser);
  NPCSkillWin::SelectClassPage(v1->m_pkNPCSkillWin, v2);
  InventoryWin::ms_uiMode = 1;
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (004915D0) --------------------------------------------------------
void __thiscall GameFrameWork::CloseSkillShopMenu(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  GameFrameWork::NcActEndOfTrade(this);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkNPCSkillWin->vfptr);
  InventoryWin::ms_uiMode = 0;
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (00491600) --------------------------------------------------------
void __thiscall GameFrameWork::OpenSoulStoneShopMenu(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  if ( !(unsigned __int8)((int (*)(void))this->m_pkInventoryWin->vfptr[65].__vecDelDtor)() )
    GameFrameWork::OpenInventoryWin(v1);
  if ( !(unsigned __int8)((int (*)(void))v1->m_pkNPCSoulWin->vfptr[65].__vecDelDtor)() )
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkNPCSoulWin->vfptr);
  InventoryWin::ms_uiMode = 1;
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (00491650) --------------------------------------------------------
void __thiscall GameFrameWork::CloseSoulStoneShopMenu(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  GameFrameWork::NcActEndOfTrade(this);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkNPCSoulWin->vfptr);
  InventoryWin::ms_uiMode = 0;
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (00491680) --------------------------------------------------------
void __thiscall GameFrameWork::OpenStorageMenu(GameFrameWork *this, char byTargetPage)
{
  GameFrameWork *v2; // esi@1

  v2 = this;
  StorageWin::RefreshPage(this->m_pkStorageWin, byTargetPage);
  if ( !(unsigned __int8)((int (*)(void))v2->m_pkInventoryWin->vfptr[65].__vecDelDtor)() )
    GameFrameWork::OpenInventoryWin(v2);
  if ( !(unsigned __int8)((int (*)(void))v2->m_pkStorageWin->vfptr[65].__vecDelDtor)() )
  {
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkStorageWin->vfptr);
    InventoryWin::ms_uiMode = 2;
  }
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (004916F0) --------------------------------------------------------
void __thiscall GameFrameWork::CloseStorageMenu(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  if ( this->m_eOpenType == ASOT_NPC )
    GameFrameWork::NcActEndOfTrade(this);
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x4Du, 0, 0);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkStorageWin->vfptr);
  InventoryWin::ms_uiMode = 0;
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (00491730) --------------------------------------------------------
void __thiscall GameFrameWork::CloseItemShopWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  GameFrameWork::NcActEndOfTrade(this);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkItemShopWin2->vfptr);
  NPCItemWin::TabShow(v1->m_pkItemShopWin2, 0, 0);
  NPCItemWin::TabShow(v1->m_pkItemShopWin2, TAPTYPE_ITEM, 0);
  InventoryWin::ms_uiMode = 0;
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (00491780) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenCharInfoWinKey(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  PgWin *v2; // esi@4

  v1 = this;
  if ( !EditWin::ms_pkCurEditWin && this->m_pkCharInfoWin )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkCharInfoWin->vfptr[65].__vecDelDtor)() )
    {
      v2 = (PgWin *)&v1->m_pkCharInfoWin->vfptr;
      if ( v2 )
        PgWinMgr::CloseWin(&Pgg_kWinMgr, v2);
    }
    else
    {
      GameFrameWork::OpenCharInfoWin(v1);
    }
  }
}

//----- (004917D0) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenSkillWinKey(GameFrameWork *this)
{
  if ( !EditWin::ms_pkCurEditWin )
    GameFrameWork::OnOpenSkillWin(this);
}

//----- (004917E0) --------------------------------------------------------
void __userpurge GameFrameWork::OpenQuestWin(GameFrameWork *this@<ecx>, int a2@<ebx>, int a3@<edi>, int iSelectID, int iSelectTab)
{
  GameFrameWork *v5; // esi@1
  CQuestWin2 *v6; // ecx@1
  Tutorial *v7; // eax@2
  Tutorial *v8; // eax@3
  int v9; // eax@8

  v5 = this;
  v6 = this->m_pkQuestWin;
  if ( v6 )
  {
    CQuestWin2::SelectTab(v6, iSelectTab);
    CQuestWin2::SetSelectedID(v5->m_pkQuestWin, a2, a3, iSelectID);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v5->m_pkQuestWin->vfptr);
    v7 = Singleton<Tutorial>::m_pInstance;
    if ( !Singleton<Tutorial>::m_pInstance )
    {
      v8 = (Tutorial *)operator new(0xB4u);
      if ( v8 )
        Tutorial::Tutorial(v8);
      else
        v7 = 0;
      Singleton<Tutorial>::m_pInstance = v7;
    }
    if ( v7->m_bEnable )
    {
      CQuestWin2::SelectTab(v5->m_pkQuestWin, 2);
      Singleton<Tutorial>::getInstance();
      *(_BYTE *)(v9 + 17) = 1;
    }
  }
}

//----- (004918B0) --------------------------------------------------------
void __thiscall GameFrameWork::OpenFriendAddWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  unsigned int v2; // ecx@2
  const char *v3; // eax@4

  v1 = this;
  if ( this->m_pkFriendAddWin )
  {
    v2 = g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1];
    if ( v2 )
    {
      if ( *(_BYTE *)(v2 + 2664) )
      {
        v3 = (const char *)(*(int (**)(void))(*(_DWORD *)v2 + 84))();
        FriendAddWin::SetTargetName(v1->m_pkFriendAddWin, v3);
      }
    }
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkFriendAddWin->vfptr);
  }
}

//----- (00491900) --------------------------------------------------------
void __thiscall GameFrameWork::OpenChatBlockListWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  ChatBlockListWin *v2; // ecx@1
  PgWin *v3; // esi@6

  v1 = this;
  v2 = this->m_pkChatBlockListWin;
  if ( v2 )
  {
    if ( PgWin::IsVisible((PgWin *)&v2->vfptr) )
    {
      v3 = (PgWin *)&v1->m_pkChatBlockListWin->vfptr;
      if ( v3 )
        PgWinMgr::CloseWin(&Pgg_kWinMgr, v3);
    }
    else
    {
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v1->m_pkChatBlockListWin->vfptr[59].__vecDelDtor)(
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        0.5,
        0.5);
      if ( !(unsigned __int8)((int (*)(void))v1->m_pkChatBlockListWin->vfptr[61].__vecDelDtor)() )
        ((void (__stdcall *)(_DWORD))v1->m_pkChatBlockListWin->vfptr[60].__vecDelDtor)(1);
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkChatBlockListWin->vfptr);
    }
  }
}

//----- (004919A0) --------------------------------------------------------
void __thiscall GameFrameWork::OpenMysteryVaultWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Tutorial *v2; // eax@1
  Tutorial *v3; // eax@2

  v1 = this;
  v2 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v3 = (Tutorial *)operator new(0xB4u);
    if ( v3 )
      Tutorial::Tutorial(v3);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  if ( !v2->m_bEnable )
  {
    if ( v1->m_pkMysteryVaultWin )
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMysteryVaultWin->vfptr);
  }
}

//----- (00491A30) --------------------------------------------------------
void __thiscall GameFrameWork::OpenHolyPromiseAddWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  unsigned int v2; // ecx@2
  const char *v3; // eax@4

  v1 = this;
  if ( this->m_pkHolyPromiseAddWin )
  {
    v2 = g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1];
    if ( v2 )
    {
      if ( *(_BYTE *)(v2 + 2664) )
      {
        v3 = (const char *)(*(int (**)(void))(*(_DWORD *)v2 + 84))();
        HolyPromiseAddWin::SetTargetName(v1->m_pkHolyPromiseAddWin, v3);
      }
    }
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkHolyPromiseAddWin->vfptr);
  }
}

//----- (00491A80) --------------------------------------------------------
void __thiscall GameFrameWork::OpenItemUpgradeWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkItemShopWin->vfptr);
  InventoryWin::ms_uiMode = 0;
  if ( !(`TutorialMgr::GetTutorialMgr'::`2'::`local static guard' & 1) )
  {
    `TutorialMgr::GetTutorialMgr'::`2'::`local static guard' |= 1u;
    TutorialMgr::TutorialMgr(&`TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr);
    atexit(`TutorialMgr::GetTutorialMgr'::`2'::`dynamic atexit destructor for 'kTutorialMgr'');
  }
  TutorialMgr::OpenItemUpgradeWin(&`TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr);
  ItemUpgradeWin::ResetAllData(v1->m_pkItemUpgradeWin);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkItemUpgradeWin->vfptr);
}
// A8C638: using guessed type int `TutorialMgr::GetTutorialMgr'::`2'::`local static guard';
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (00491AF0) --------------------------------------------------------
void __thiscall GameFrameWork::OpenMoverUpgradeWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkItemShopWin->vfptr);
  InventoryWin::ms_uiMode = 0;
  MoverUpgradeWin::ResetAllData(v1->m_pkMoverUpgradeWin);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMoverUpgradeWin->vfptr);
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (00491B30) --------------------------------------------------------
void __thiscall GameFrameWork::OnPartyJoinProposeAccept(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Name5 *v2; // eax@1
  _BYTE v3[20]; // ST00_20@1
  Name5 result; // [sp+4h] [bp-14h]@1

  v1 = this;
  v2 = Party::GetJoinProposeCharID(&g_kParty, &result);
  *(_DWORD *)v3 = v2->n5_code[0];
  *(_QWORD *)&v3[4] = *(_QWORD *)&v2->n5_code[1];
  *(_QWORD *)&v3[12] = *(_QWORD *)&v2->n5_code[3];
  GameFrameWork::NcPartyJoinProposeAllowAck(v1, *(Name5 *)v3);
  Party::ClearJoinProposeData(&g_kParty);
}

//----- (00491B80) --------------------------------------------------------
void __thiscall GameFrameWork::OnPartyJoinProposeReject(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Name5 *v2; // eax@1
  _BYTE v3[20]; // ST00_20@1
  Name5 result; // [sp+4h] [bp-14h]@1

  v1 = this;
  v2 = Party::GetJoinProposeCharID(&g_kParty, &result);
  *(_DWORD *)v3 = v2->n5_code[0];
  *(_QWORD *)&v3[4] = *(_QWORD *)&v2->n5_code[1];
  *(_QWORD *)&v3[12] = *(_QWORD *)&v2->n5_code[3];
  GameFrameWork::NcPartyJoinProposeRejectAck(v1, *(Name5 *)v3);
  Party::ClearJoinProposeData(&g_kParty);
}

//----- (00491BD0) --------------------------------------------------------
void __thiscall GameFrameWork::OnTradeProposeAskAccept(GameFrameWork *this)
{
  GameFrameWork *v1; // edi@1
  MsgBox *v2; // esi@1

  v1 = this;
  GameFrameWork::NcTradeProposeyesAck(this);
  v2 = v1->m_spUserTradeMsgBox.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
    v1->m_spUserTradeMsgBox.m_pObject = 0;
  }
}

//----- (00491C10) --------------------------------------------------------
void __thiscall GameFrameWork::OnTradeProposeAskReject(GameFrameWork *this)
{
  GameFrameWork *v1; // edi@1
  MsgBox *v2; // esi@1

  v1 = this;
  GameFrameWork::NcTradeProposeAskNoAck(this);
  v2 = v1->m_spUserTradeMsgBox.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
    v1->m_spUserTradeMsgBox.m_pObject = 0;
  }
}

//----- (00491C50) --------------------------------------------------------
void __thiscall GameFrameWork::OnFriendConfirmReqYes(GameFrameWork *this, unsigned int lParam)
{
  _BYTE v2[20]; // ST00_20@2

  if ( lParam )
  {
    *(_DWORD *)v2 = *(_DWORD *)lParam;
    *(_QWORD *)&v2[4] = *(_QWORD *)(lParam + 4);
    *(_QWORD *)&v2[12] = *(_QWORD *)(lParam + 12);
    GameFrameWork::NcFriendSetConfirmAck(this, *(Name5 *)v2, 1);
    operator delete((void *)lParam);
  }
}

//----- (00491CA0) --------------------------------------------------------
void __thiscall GameFrameWork::OnFriendConfirmReqNo(GameFrameWork *this, unsigned int lParam)
{
  _BYTE v2[20]; // ST00_20@2

  if ( lParam )
  {
    *(_DWORD *)v2 = *(_DWORD *)lParam;
    *(_QWORD *)&v2[4] = *(_QWORD *)(lParam + 4);
    *(_QWORD *)&v2[12] = *(_QWORD *)(lParam + 12);
    GameFrameWork::NcFriendSetConfirmAck(this, *(Name5 *)v2, 0);
    operator delete((void *)lParam);
  }
}

//----- (00491CF0) --------------------------------------------------------
void __thiscall GameFrameWork::OnFriendDeleteYse(GameFrameWork *this, unsigned int lParam)
{
  _BYTE v2[20]; // ST00_20@2

  if ( lParam )
  {
    *(_DWORD *)v2 = *(_DWORD *)lParam;
    *(_QWORD *)&v2[4] = *(_QWORD *)(lParam + 4);
    *(_QWORD *)&v2[12] = *(_QWORD *)(lParam + 12);
    GameFrameWork::NcFriendDelReq(this, *(Name5 *)v2);
    operator delete((void *)lParam);
  }
}

//----- (00491D30) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenItemMixWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkItemShopWin->vfptr);
  InventoryWin::ms_uiMode = 0;
  ItemMixWin::ResetAllData(v1->m_pkItemMixWin);
  ItemMixWin::ResetAddItemIcon(v1->m_pkItemMixWin);
  ItemMixWin::SetDisableMixButton(v1->m_pkItemMixWin, 1);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkItemMixWin->vfptr);
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (00491D90) --------------------------------------------------------
void __thiscall GameFrameWork::OnCloseItemMixWin(GameFrameWork *this, bool bSendEndofTrade)
{
  GameFrameWork *v2; // esi@1

  v2 = this;
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkItemMixWin->vfptr);
  InventoryWin::ms_uiMode = 0;
  if ( bSendEndofTrade )
    GameFrameWork::NcActEndOfTrade(v2);
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (00491DD0) --------------------------------------------------------
void __thiscall GameFrameWork::OnPopupProposeTrade(GameFrameWork *this, Char *pkTarget)
{
  GameFrameWork *v2; // esi@1

  v2 = this;
  if ( this->m_pkPopupMenuWin )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkPopupMenuWin->vfptr);
  if ( pkTarget )
    GameFrameWork::NcTradeProposeReq(v2, pkTarget->m_kHandle);
}

//----- (00491E10) --------------------------------------------------------
void __thiscall GameFrameWork::OnTimerTradeReject(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  MsgBox *v2; // eax@1
  MsgBox *v3; // edi@2

  v1 = this;
  v2 = this->m_spUserTradeMsgBox.m_pObject;
  if ( v2 )
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
    GameFrameWork::NcTradeProposeAskNoAck(v1);
    v3 = v1->m_spUserTradeMsgBox.m_pObject;
    if ( v3 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
      v1->m_spUserTradeMsgBox.m_pObject = 0;
    }
  }
}

//----- (00491E70) --------------------------------------------------------
void __thiscall GameFrameWork::OnSpace(GameFrameWork *this)
{
  if ( !EditWin::ms_pkCurEditWin )
    GameFrameWork::OnDoublePickChar(
      this,
      (Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1]);
}

//----- (00491E90) --------------------------------------------------------
char GameFrameWork::CancelCharSelect()
{
  char result; // al@2

  if ( g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1] )
  {
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 9u, 8u, 0, 0);
    MainChar::SetTargetChar((MainChar *)g_pkMainChar, 0);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00491ED0) --------------------------------------------------------
void __thiscall GameFrameWork::OnWhisperChatStart(GameFrameWork *this, const char *charName)
{
  GameFrameWork *v2; // esi@1
  _BYTE v3[20]; // ST00_20@1
  char dest[4]; // [sp+4h] [bp-18h]@1
  __int64 v5; // [sp+8h] [bp-14h]@1
  __int64 v6; // [sp+10h] [bp-Ch]@1

  v2 = this;
  v6 = 0i64;
  v5 = 0i64;
  *(_DWORD *)dest = 0;
  strncpy(dest, (char *)charName, 0x14u);
  *(_DWORD *)v3 = *(_DWORD *)dest;
  *(_QWORD *)&v3[4] = v5;
  *(_QWORD *)&v3[12] = v6;
  GameFrameWork::AddWhisperList(v2, *(Name5 *)v3);
  ChatDisplayWin2::OnWhisperTab(v2->m_pkChatDisplayWin, 1);
}

//----- (00491F50) --------------------------------------------------------
void __usercall GameFrameWork::MiniHouseIndoorModeOut(GameFrameWork *this@<ecx>, MHDiceGameTask *a2@<edi>)
{
  GameFrameWork *v2; // esi@1
  MHDiceGameTask *v3; // ecx@1
  bool v4; // bl@1
  MHDiceGameTask *v5; // ecx@6
  MHDiceGameTask *v6; // esi@7
  NiPointer<MHDiceGameTask> result; // [sp+10h] [bp-14h]@1
  NETCOMMAND netcmd; // [sp+14h] [bp-10h]@12
  int v9; // [sp+20h] [bp-4h]@1

  v2 = this;
  v3 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  v9 = 0;
  v4 = MHDiceGameTask::IsDicegamePlaying(v3);
  v9 = -1;
  if ( result.m_pObject )
  {
    a2 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( a2 )
        a2->vfptr->__vecDelDtor((NiRefObject *)a2, 1u);
    }
  }
  if ( v4 )
  {
    v5 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
    v9 = 1;
    v5->m_bOutReserveOnMiniHouse = 1;
    MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_LEAVE_REQ(v5, (int)a2);
    v9 = -1;
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          ((void (__cdecl *)(signed int))v6->vfptr->__vecDelDtor)(1);
      }
    }
  }
  else
  {
    if ( v2->m_pkMHCurrentWin )
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, v2->m_pkMHCurrentWin);
      v2->m_pkMHCurrentWin = 0;
    }
    netcmd.protocol = -29672;
    PgNet::SendNetMsg((PgNet *)&v2->m_spZoneNet.m_pObject->vfptr, &netcmd, 2);
    unk_A99590 = 0;
  }
}

//----- (00492080) --------------------------------------------------------
void __thiscall GameFrameWork::SendKickReq(GameFrameWork *this, unsigned __int16 KickedChar)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-4h]@1

  v2 = this;
  v3 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = -29678;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  PgNet::SendNetMsg((PgNet *)&v2->m_spZoneNet.m_pObject->vfptr, &KickedChar, 2);
}

//----- (004920D0) --------------------------------------------------------
void __userpurge GameFrameWork::OnOpenMHPopUpMenuObjAction(GameFrameWork *this@<ecx>, int a2@<ebx>, int a3@<edi>, char *pObjName, mhObject *pkObj, bool bCanHold, bool bCanAni)
{
  GameFrameWork *v7; // esi@1
  mhEmotionWin *v8; // ecx@2
  int v9; // ST08_4@2
  int v10; // ST04_4@2
  mhEmotionWin *v11; // ecx@2
  double v12; // ST18_8@2
  NiRefObjectVtbl *v13; // ebx@2
  mhEmotionWin *v14; // edi@2
  double v15; // ST10_8@2
  signed int v16; // ST08_4@2
  signed int v17; // ST04_4@2

  v7 = this;
  if ( pkObj )
  {
    v8 = this->m_pkMHEmotionWin;
    v9 = a2;
    v8->m_ObjID = pkObj->m_iGUID;
    v10 = a3;
    v8->m_bCanHold = bCanHold;
    v8->m_bCanAni = bCanAni;
    mhEmotionWin::UpdateInfo(v8);
    v11 = v7->m_pkMHEmotionWin;
    v12 = (double)PgWin::ms_iMsY;
    v13 = v11->vfptr;
    v14 = v7->m_pkMHEmotionWin;
    v15 = (double)(signed int)PgWin::ms_iMsX;
    v16 = (signed int)(v12
                     - (double)(unsigned int)((int (__stdcall *)(int, int))v11->vfptr[37].__vecDelDtor)(v10, v9) * 0.5);
    v17 = (signed int)(v15
                     - (double)(unsigned int)((int (__thiscall *)(mhEmotionWin *))v14->vfptr[36].__vecDelDtor)(v14)
                     * 0.5);
    ((void (__thiscall *)(mhEmotionWin *))v13[77].__vecDelDtor)(v7->m_pkMHEmotionWin);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v7->m_pkMHEmotionWin->vfptr);
  }
}
// 4920D0: could not find valid save-restore pair for ebx
// 4920D0: could not find valid save-restore pair for edi

//----- (004921B0) --------------------------------------------------------
void __thiscall GameFrameWork::MinimizeMHWins(GameFrameWork *this, unsigned int uiwParam)
{
  GameFrameWork *v2; // esi@1

  v2 = this;
  if ( uiwParam )
  {
    if ( uiwParam == 1 && PgWin::IsVisible(this->m_pkMHCurrentWin) == 1 )
    {
      if ( v2->m_pkMHCurrentWin )
        ((void (__stdcall *)(_DWORD))v2->m_pkMHCurrentWin->vfptr[64].__vecDelDtor)(0);
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkMHMinimizeWin->vfptr);
      v2->m_pkMHMinimizeWin->m_bAutoOnOff = 1;
    }
  }
  else
  {
    if ( this->m_pkMHCurrentWin )
      ((void (__stdcall *)(_DWORD))this->m_pkMHCurrentWin->vfptr[64].__vecDelDtor)(0);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkMHMinimizeWin->vfptr);
    v2->m_pkMHMinimizeWin->m_bAutoOnOff = 0;
  }
}

//----- (00492250) --------------------------------------------------------
void __thiscall GameFrameWork::NormalizeMHWins(GameFrameWork *this, unsigned int uiwParam)
{
  GameFrameWork *v2; // edi@1
  mhGuestBookWin *v3; // ecx@2
  PgWin *v4; // esi@5
  mhEditRoomWin *v5; // ecx@6
  PgWin *v6; // esi@11
  mhGuestBookWin *v7; // ecx@13
  PgWin *v8; // esi@14
  mhEditRoomWin *v9; // ecx@15

  v2 = this;
  if ( uiwParam )
  {
    if ( uiwParam == 1 && this->m_pkMHMinimizeWin->m_bAutoOnOff == 1 )
    {
      v6 = this->m_pkMHCurrentWin;
      if ( v6 )
      {
        if ( !strcmp(v6->m_pcName, "mhGuestBookWin") )
        {
          v7 = (mhGuestBookWin *)v2->m_pkMHCurrentWin;
          LOBYTE(v6[1].m_kLocal.m_Rotate.m_pEntry[2][0]) = 1;
          mhGuestBookWin::ReGenPos(v7);
        }
        v8 = v2->m_pkMHCurrentWin;
        if ( !strcmp(v8->m_pcName, "mhEditRoomWin") )
        {
          v9 = (mhEditRoomWin *)v2->m_pkMHCurrentWin;
          LOBYTE(v8[12].m_kEffectList.vfptr) = 1;
          mhEditRoomWin::ReGenPos(v9);
        }
        ((void (__stdcall *)(_DWORD))v2->m_pkMHCurrentWin->vfptr[64].__vecDelDtor)(1);
      }
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkMHMinimizeWin->vfptr);
      v2->m_pkMHMinimizeWin->m_bAutoOnOff = 0;
    }
  }
  else
  {
    v3 = (mhGuestBookWin *)this->m_pkMHCurrentWin;
    if ( v3 )
    {
      if ( !strcmp(v3->m_pcName, "mhGuestBookWin") )
      {
        v3->m_bOpen = 1;
        mhGuestBookWin::ReGenPos(v3);
      }
      v4 = v2->m_pkMHCurrentWin;
      if ( !strcmp(v4->m_pcName, "mhEditRoomWin") )
      {
        v5 = (mhEditRoomWin *)v2->m_pkMHCurrentWin;
        LOBYTE(v4[12].m_kEffectList.vfptr) = 1;
        mhEditRoomWin::ReGenPos(v5);
      }
      ((void (__stdcall *)(_DWORD))v2->m_pkMHCurrentWin->vfptr[64].__vecDelDtor)(1);
    }
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkMHMinimizeWin->vfptr);
  }
}

//----- (00492410) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenGuildTournamentStorage(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  GuildTournamentStorageWin *v2; // eax@3
  GuildTournamentStorageWin *v3; // eax@3

  v1 = this;
  InventoryWin::ms_uiMode = 4;
  if ( !(unsigned __int8)((int (*)(void))this->m_pkInventoryWin->vfptr[65].__vecDelDtor)() )
    GameFrameWork::OpenInventoryWin(v1);
  v2 = GuildTask::GetGuildTournamentStorageWin();
  GuildTournamentStorageWin::ResetContents(v2);
  v3 = GuildTask::GetGuildTournamentStorageWin();
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (00492460) --------------------------------------------------------
void GameFrameWork::OnCloseGTStorageWin()
{
  GuildTournamentStorageWin *v1; // eax@1

  v1 = GuildTask::GetGuildTournamentStorageWin();
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
  InventoryWin::ms_uiMode = 0;
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (00492480) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenGuildAcademyStorage(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  GuildAcademyStorageWin *v2; // eax@1
  GuildAcademyStorageWin *v3; // eax@4

  v1 = this;
  v2 = GuildAcademyTask::GetGuildAcademyStorageWin();
  if ( !(unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[65].__vecDelDtor)(v2) )
  {
    InventoryWin::ms_uiMode = 5;
    if ( !(unsigned __int8)((int (*)(void))v1->m_pkInventoryWin->vfptr[65].__vecDelDtor)() )
      GameFrameWork::OpenInventoryWin(v1);
    v3 = GuildAcademyTask::GetGuildAcademyStorageWin();
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
  }
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (004924D0) --------------------------------------------------------
void GameFrameWork::OnCloseGuildAcademyStorage()
{
  GuildAcademyStorageWin *v1; // eax@1

  v1 = GuildAcademyTask::GetGuildAcademyStorageWin();
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
  InventoryWin::ms_uiMode = 0;
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (004924F0) --------------------------------------------------------
void __thiscall GameFrameWork::OpenMHRepairWin(GameFrameWork *this, bool b, bool bRepairing)
{
  GameFrameWork *v3; // esi@1
  InventoryWin *v4; // ecx@1
  PgWin *v5; // eax@2

  v3 = this;
  v4 = this->m_pkInventoryWin;
  if ( v4 )
  {
    v5 = (PgWin *)&v3->m_pkMHRepairWin->vfptr;
    if ( v5 )
    {
      if ( b )
      {
        InventoryWin::LockAllItem(v4);
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkMHRepairWin->vfptr);
      }
      else
      {
        PgWinMgr::CloseWin(&Pgg_kWinMgr, v5);
        mhRepairObjWin::RepairEnd(v3->m_pkMHRepairWin);
        if ( !bRepairing && nowState == 2 )
        {
          MiniHouseIndoor::SetState(&g_kWorld.m_MiniHouseIndoorMode, MH_STATE_NORMAL);
          MiniHouseIndoor::SetRepairObjID(&g_kWorld.m_MiniHouseIndoorMode, 0xFFFFu);
          mhRepairObjWin::SetRepairObjID(v3->m_pkMHRepairWin, 0xFFFFu);
        }
        InventoryWin::UnLockAllItem(v3->m_pkInventoryWin);
      }
    }
  }
}

//----- (00492590) --------------------------------------------------------
void __thiscall GameFrameWork::SendMHRepairReq(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  mhRepairObjWin *v2; // eax@2
  PROTO_NC_ITEM_MH_FURNITURE_ENDURE_KIT_USE_REQ kProto; // [sp+4h] [bp-4h]@2

  v1 = this;
  if ( this->m_pkMHRepairWin )
  {
    v2 = this->m_pkMHRepairWin;
    kProto.nFurnitureHnd = v2->m_ID;
    kProto.nInvenSlot = v2->m_nInvenSlot;
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x33u, &kProto, 3);
    MiniHouseIndoor::SetState(&g_kWorld.m_MiniHouseIndoorMode, MH_STATE_NORMAL);
    if ( v1->m_pkInventoryWin )
    {
      if ( v1->m_pkMHRepairWin )
      {
        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMHRepairWin->vfptr);
        mhRepairObjWin::RepairEnd(v1->m_pkMHRepairWin);
        InventoryWin::UnLockAllItem(v1->m_pkInventoryWin);
      }
    }
  }
}

//----- (00492620) --------------------------------------------------------
void __thiscall GameFrameWork::OnMapLogInError(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  PgNet *v2; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  char pdata; // [sp+Bh] [bp-1h]@2

  v1 = this;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 6u, 0x1Cu, 0, 0);
  NetMgr::SendUserLogOutMsg2WorldMgrServerForCharSelect(&g_kNetMgr);
  v2 = (PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr;
  v1->m_bBackCharSelect = 1;
  netcmd.protocol = 3103;
  if ( v2 )
  {
    PgNet::AddNetMsg(v2, &netcmd, 2);
    PgNet::SendNetMsg((PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr, &pdata, 1);
  }
}

//----- (00492680) --------------------------------------------------------
void __thiscall GameFrameWork::SendAutoPickItemReq(GameFrameWork *this, bool bAutoPickItem)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  PROTO_NC_CHAR_CLIENT_AUTO_PICK_REQ kProto; // [sp+Bh] [bp-1h]@1

  v2 = this;
  v3 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 4284;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
  kProto.bEnable = bAutoPickItem;
  PgNet::SendNetMsg(v4, &kProto, 1);
}

//----- (004926D0) --------------------------------------------------------
void __thiscall GameFrameWork::CloseMinimonAutoUseWin(GameFrameWork *this)
{
  MinimonAutoItemUseWin *v1; // esi@1

  v1 = this->m_pkMinimonAutoItemUseWin;
  if ( v1 )
  {
    if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v1->vfptr[65].__vecDelDtor)(this->m_pkMinimonAutoItemUseWin) )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
  }
}

//----- (00492700) --------------------------------------------------------
int __thiscall GameFrameWork::GetSoulCount(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  TargetWin *v2; // ecx@2
  int result; // eax@3

  v1 = this;
  switch ( Char::GetClass(g_pkMainChar) )
  {
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      v2 = v1->m_pkTargetWin;
      if ( !v2 )
        goto $LN1_23;
      result = TargetWin::GetSouldCount(v2);
      break;
    default:
$LN1_23:
      result = 0;
      break;
  }
  return result;
}

//----- (00492760) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenEnchantGemToolTip(GameFrameWork *this, Item *pkItem)
{
  GameFrameWork *v2; // ebx@1
  EnchantGemToolTipWin *v3; // ecx@2
  unsigned __int16 v4; // si@2
  SHINE_ITEM_STRUCT kStruct; // [sp+4h] [bp-68h]@2

  v2 = this;
  EnchantGemToolTipWin::Clear(this->m_pkEnchantGemToolTipWin);
  if ( pkItem )
  {
    qmemcpy(&kStruct, &pkItem->m_kStruct, 0x64u);
    v3 = v2->m_pkEnchantGemToolTipWin;
    *((_WORD *)&kStruct.itemattr.Bracelet + 49) = *((_WORD *)&pkItem->m_kStruct.itemattr.Bracelet + 49);
    *((_BYTE *)&kStruct.itemattr.Bracelet + 100) = *((_BYTE *)&pkItem->m_kStruct.itemattr.Bracelet + 100);
    v4 = kStruct.itemid;
    if ( kStruct.itemid != v3->m_ItemID )
    {
      EnchantGemToolTipWin::SetEnchantGemDesc(v3, pkItem);
      v2->m_pkEnchantGemToolTipWin->m_ItemID = v4;
    }
  }
  ((void (__stdcall *)(_DWORD))v2->m_pkEnchantGemToolTipWin->vfptr[64].__vecDelDtor)(1);
}

//----- (004927D0) --------------------------------------------------------
void __thiscall GameFrameWork::OpenPlayGuideWin(GameFrameWork *this, BasicInfoLinkType eType)
{
  GameFrameWork *v2; // esi@1
  PlayGuideWin *v3; // ecx@4

  v2 = this;
  if ( byte_B4FF95 && this->m_kGuideViewList._Myfirst[eType] < 0 && this->m_bGuideViewList )
  {
    GameFrameWork::NcCharNewbieGuideViewSetCmd(eType);
    v2->m_kGuideViewList._Myfirst[eType] = eType;
    v3 = v2->m_pkPlayGuideWin;
    if ( v3 )
    {
      PlayGuideWin::SetInfo(v3, eType);
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkPlayGuideWin->vfptr);
    }
  }
}
// B4FF95: using guessed type char byte_B4FF95;

//----- (00492830) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenCollectWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  char v2; // al@2
  PgWin *v3; // esi@2
  bool v4; // al@2

  v1 = this;
  if ( this->m_pkCollectWin )
  {
    v2 = ((int (*)(void))this->m_pkCollectWin->vfptr[65].__vecDelDtor)();
    v3 = (PgWin *)&v1->m_pkCollectWin->vfptr;
    v4 = v2 == 0;
    if ( v3 )
    {
      if ( v4 )
        PgWinMgr::ShowWin(&Pgg_kWinMgr, v3);
      else
        PgWinMgr::CloseWin(&Pgg_kWinMgr, v3);
    }
  }
}

//----- (00492880) --------------------------------------------------------
bool __thiscall GameFrameWork::GetOpenPlayGuideCheck(GameFrameWork *this, BasicInfoLinkType eType)
{
  return byte_B4FF95 && this->m_kGuideViewList._Myfirst[eType] < 0 && this->m_bGuideViewList;
}
// B4FF95: using guessed type char byte_B4FF95;

//----- (004928B0) --------------------------------------------------------
void __thiscall GameFrameWork::OnSoloModeKey(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  NiUnsharedGeometryGroup *v2; // eax@5
  NiUnsharedGeometryGroup *v3; // eax@6
  NiUnsharedGeometryGroup *v4; // eax@8
  NiUnsharedGeometryGroup *v5; // eax@19
  NiUnsharedGeometryGroup *v6; // eax@20

  v1 = this;
  if ( !EditWin::ms_pkCurEditWin )
  {
    if ( unk_A96B31 )
    {
      if ( unk_A96B30 && CNSTimer_Interval::IsRun_GetCount(&stru_A96B34, Timer::ms_fCurTime) )
      {
        CNSTimer_Interval::ReSet(&stru_A96B34, Timer::ms_fCurTime);
        unk_A96B31 = 0;
        v2 = TextData::Get(0x4241667Au);
        GameFrameWork::AddSysMsg(v1, (const char *)v2);
        GameFrameWork::SendNetMsgZoneMgr(v1, 2u, 0x18u, 0, 0);
        return;
      }
      goto LABEL_6;
    }
    if ( unk_A96B30 )
    {
      if ( nowState
        || g_pkMainChar->m_pkMover && g_pkMainChar->m_uiMoverSlot
        || g_kParty.m_uiTotalMember
        || (unsigned __int8)((int (*)(void))this->m_pkPrivateStoreWin->vfptr[65].__vecDelDtor)()
        || (unsigned __int8)((int (*)(void))v1->m_pkUserTradeWin->vfptr[65].__vecDelDtor)()
        || PrivateStoreWin::ms_bPrivateStoreWin )
      {
        v6 = TextData::Get(0x304D8A79u);
        GameFrameWork::AddSysMsg(v1, (const char *)v6);
      }
      else if ( !v1->m_bPlayPuzzle )
      {
        if ( !unk_A96B30 || !CNSTimer_Interval::IsRun_GetCount(&stru_A96B34, Timer::ms_fCurTime) )
        {
LABEL_6:
          v3 = TextData::Get(0x533C1A49u);
          GameFrameWork::AddSysMsg(v1, (const char *)v3);
          return;
        }
        CNSTimer_Interval::ReSet(&stru_A96B34, Timer::ms_fCurTime);
        CharMgr::RemoveAllWithoutMainCharAndNPC(&g_kCharMgr);
        unk_A96B31 = 1;
        v5 = TextData::Get(0xFFF32441);
        GameFrameWork::AddSysMsg(v1, (const char *)v5);
        GameFrameWork::SendNetMsgZoneMgr(v1, 2u, 0x17u, 0, 0);
        CMiniHouseMgr::RemoveAll((CMiniHouseMgr *)&g_kMiniHouseMgr, 1);
      }
    }
    else
    {
      v4 = TextData2::Get(0x416E3648u);
      GameFrameWork::AddSysMsg(v1, (const char *)v4);
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8D482: using guessed type bool PrivateStoreWin::ms_bPrivateStoreWin;

//----- (00492A80) --------------------------------------------------------
void __usercall GameFrameWork::OnOpenRestHouseKey(GameFrameWork *this@<ecx>, double a2@<st0>)
{
  GameFrameWork *v2; // esi@1
  NiUnsharedGeometryGroup *v3; // eax@2
  NiUnsharedGeometryGroup *v4; // eax@6
  DWORD v5; // eax@9
  AbStateInfecteeVtbl *v6; // edx@9
  GameFrameWork::SkillCastState v7; // eax@10
  NiPoint3 *v8; // eax@13
  NiUnsharedGeometryGroup *v9; // eax@18
  char v10; // al@20
  NiUnsharedGeometryGroup *v11; // eax@22
  NiUnsharedGeometryGroup *v12; // eax@24
  NiUnsharedGeometryGroup *v13; // eax@27
  NiUnsharedGeometryGroup *v14; // eax@31

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[20].Deaffect)() )
  {
    v3 = TextData2::Get(0x3AB2967Cu);
    GameFrameWork::AddSysMsg(v2, (const char *)v3);
    return;
  }
  if ( (Char::IsEnableSpectral(g_pkMainChar) || !((int (*)(void))g_pkMainChar->vfptr->IsVisible)())
    && !AbStateInfectee::FindNomalAbstate((AbStateInfectee *)&g_pkMainChar->vfptr, STA_GTIHIDE) )
  {
    v4 = TextData2::Get(0x9FAA738F);
    GameFrameWork::AddSysMsg(v2, (const char *)v4);
    return;
  }
  if ( !EditWin::ms_pkCurEditWin && dwPrevTimeWhenHouseChanged + 2000 < timeGetTime() )
  {
    v5 = timeGetTime();
    v6 = g_pkMainChar->vfptr;
    dwPrevTimeWhenHouseChanged = v5;
    if ( (unsigned __int8)((int (*)(void))v6[1].Deaffect)() )
    {
      v7 = v2->m_kSkillCasting.eState;
      if ( v7 != 2 )
      {
        if ( v7 == 3 )
        {
          if ( Char::GetReserveSkillSmash(g_pkMainChar) )
            return;
          v8 = (NiPoint3 *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
          GameFrameWork::NcActStopReq(v2, v8);
          GameFrameWork::NcBatSkillbashCastabortReq(v2);
          Char::CancelSkillAction(g_pkMainChar, 1);
        }
        if ( !(unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[15].AddAbStateByAbstateIndex)()
          && !Char::IsActGathering(g_pkMainChar)
          && !Char::IsActProducing(g_pkMainChar) )
        {
          if ( JumpProcessor::IsJump(&g_pkMainChar->m_kJumpProcessor) )
          {
            v9 = TextData::Get(0xA6A1809E);
            GameFrameWork::AddSysMsg(v2, (const char *)v9);
          }
          else if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[7].GetAbstateColor)()
                 && (v10 = g_pkMainChar->m_byMode, v10 != 4)
                 && v10 != 5 )
          {
            v11 = TextData::Get(0x9BAA7AA1);
            GameFrameWork::AddSysMsg(v2, (const char *)v11);
          }
          else if ( (unsigned __int8)((int (*)(void))v2->m_pkPrivateStoreWin->vfptr[65].__vecDelDtor)() )
          {
            v12 = TextData::Get(0xAAA37ADE);
            GameFrameWork::AddSysMsg(v2, (const char *)v12);
          }
          else if ( g_pkMainChar->m_kAbStateProperty.iFearCount <= 0 )
          {
            if ( g_pkMainChar->m_kAbStateProperty.iKarenCaptivateStateCount <= 0
              && !GameFrameWork::IsPlayCardOpen(v2, a2) )
            {
              if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[15].Deaffect)() )
              {
                v14 = TextData3::Get(0xBDDEF0E7);
                GameFrameWork::AddSysMsg(v2, (const char *)v14);
              }
              else if ( g_pkMainChar->m_byMode == 4 )
              {
                GameFrameWork::NcActFoldTentCmd(v2);
              }
              else
              {
                ((void (__stdcall *)(signed int))g_pkMainChar->vfptr[7].AddAbStateByAbstateIndex)(1);
                Char::SetMode(g_pkMainChar, 4);
                GameFrameWork::OpenPlayGuideWin(v2, BIL_MINIHOUSE_1);
                GameFrameWork::NcActPitchtentCmd(v2);
              }
            }
          }
          else
          {
            v13 = TextData2::Get(0x786078BDu);
            GameFrameWork::AddSysMsg(v2, (const char *)v13);
          }
        }
      }
    }
  }
}
// A8B998: using guessed type unsigned int EditWin::ms_uiCaretBlinkTime;

//----- (00492D10) --------------------------------------------------------
void __thiscall GameFrameWork::SetOptionResolution(GameFrameWork *this, unsigned int uiParam)
{
  GameFrameWork *v2; // esi@1
  unsigned int v3; // eax@2
  unsigned int v4; // ecx@2

  v2 = this;
  GameFrameWork::ms_bWindowSizeChanged = 1;
  switch ( uiParam )
  {
    case 0u:
      v3 = 800;
      v4 = 600;
      break;
    case 2u:
      v3 = 1280;
      goto LABEL_21;
    case 3u:
      v3 = 1280;
      v4 = 960;
      break;
    case 4u:
      v3 = 1280;
      v4 = 1024;
      break;
    case 5u:
      v3 = 1400;
      v4 = 1050;
      break;
    case 6u:
      v3 = 1600;
      v4 = 1200;
      break;
    case 7u:
    case 0xCu:
      v3 = 1600;
      v4 = 900;
      break;
    case 8u:
      v3 = 1920;
      v4 = 1440;
      break;
    case 9u:
      v3 = 1920;
      v4 = 1200;
      break;
    case 0xAu:
      v3 = 1680;
      v4 = 1050;
      break;
    case 0xBu:
      v3 = 1280;
      v4 = 800;
      break;
    case 0xDu:
      v3 = 1440;
      v4 = 900;
      break;
    case 0xEu:
      v3 = 1920;
      v4 = 1080;
      break;
    case 0xFu:
      v3 = 2560;
      v4 = 1440;
      break;
    case 0x10u:
      v3 = 2560;
      v4 = 1600;
      break;
    case 0x11u:
      v3 = 3840;
      v4 = 2160;
      break;
    case 0x12u:
      v3 = 1366;
      goto LABEL_21;
    case 0x13u:
      v3 = 3440;
      v4 = 1440;
      break;
    default:
      v3 = 1024;
LABEL_21:
      v4 = 768;
      break;
  }
  GameFrameWork::ms_uiDisResWidth = v3;
  GameFrameWork::ms_uiDisResHeight = v4;
  dword_A76A5A = v3;
  dword_A76A5E = v4;
  OptionGraphicWin::SetResoulution(v2->m_pkOptionGraphicWin, v3, v4);
  GameFrameWork::RegistereWinPostion(v2);
}
// A76A5A: using guessed type int dword_A76A5A;
// A76A5E: using guessed type int dword_A76A5E;
// A8CAFD: using guessed type bool GameFrameWork::ms_bWindowSizeChanged;

//----- (00492EA0) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenInventoryWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  if ( this->m_pkInventoryWin )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkInventoryWin->vfptr[65].__vecDelDtor)() )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkInventoryWin->vfptr);
    else
      GameFrameWork::OpenInventoryWin(v1);
  }
}

//----- (00492EE0) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenActionWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  PlayGuideWin *v2; // ecx@8

  v1 = this;
  if ( this->m_pkActionWin )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkActionWin->vfptr[65].__vecDelDtor)() )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkActionWin->vfptr);
    else
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkActionWin->vfptr);
    if ( byte_B4FF95 && v1->m_kGuideViewList._Myfirst[116] < 0 && v1->m_bGuideViewList )
    {
      GameFrameWork::NcCharNewbieGuideViewSetCmd(116);
      v1->m_kGuideViewList._Myfirst[116] = 116;
      v2 = v1->m_pkPlayGuideWin;
      if ( v2 )
      {
        PlayGuideWin::SetInfo(v2, BIL_EMOTION_1);
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkPlayGuideWin->vfptr);
      }
    }
  }
}
// B4FF95: using guessed type char byte_B4FF95;

//----- (00492F90) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenMHConfigRoomInfoWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  NiUnsharedGeometryGroup *v2; // eax@2

  v1 = this;
  if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[20].Deaffect)() )
  {
    v2 = TextData2::Get(0xDCEC2C18);
    GameFrameWork::AddSysMsg(v1, (const char *)v2);
  }
  else if ( nowState == MH_STATE_NO )
  {
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMHJoinWin->vfptr);
  }
}

//----- (00492FE0) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenMHInputPassWordWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  mhInputPassWordWin *v2; // eax@1

  v1 = this;
  v2 = this->m_pkMHInputPassWordWin;
  if ( v2 )
  {
    ((void (*)(void))v2->m_spRoomPassWord.m_pObject->vfptr[117].__vecDelDtor)();
    if ( (unsigned __int8)((int (*)(void))v1->m_pkMHInputPassWordWin->vfptr[65].__vecDelDtor)() )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMHInputPassWordWin->vfptr);
    else
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMHInputPassWordWin->vfptr);
  }
}

//----- (00493040) --------------------------------------------------------
void __thiscall GameFrameWork::OnArrToInvMHItem(GameFrameWork *this)
{
  GameFrameWork *v1; // ebx@1
  mhEditRoomWin *v2; // eax@1
  ItemIcon *v3; // ecx@2
  Item *v4; // eax@3
  int v5; // esi@5
  mhObject *v6; // eax@6
  NiNode *v7; // eax@6
  NiUnsharedGeometryGroup *v8; // eax@9
  SHINE_ITEM_STRUCT kItemStruct; // [sp+18h] [bp-74h]@5
  char v10; // [sp+7Fh] [bp-Dh]@6
  NiPoint3 Pos; // [sp+80h] [bp-Ch]@5

  v1 = this;
  v2 = this->m_pkMHEditRoomWin;
  if ( v2 )
  {
    v3 = (ItemIcon *)&v2->m_pkWorkTargetWin->vfptr;
    if ( v3 )
    {
      v4 = ItemIcon::GetItem(v3);
      if ( v4 )
      {
        if ( (signed int)nowState < 1 )
        {
          v8 = TextData2::Get(0x99C1A5FE);
          GameFrameWork::AddSysMsg(v1, (const char *)v8);
        }
        else
        {
          qmemcpy(&kItemStruct, &v4->m_kStruct, sizeof(kItemStruct));
          MiniHouseIndoor::CancelPickObj(&g_kWorld.m_MiniHouseIndoorMode);
          PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMHMouseControlWin->vfptr);
          PgFrameWork::AddMsg((PgFrameWork *)&v1->vfptr, 0xE0u, 1u, 0);
          Pos.x = -100.0;
          v5 = kItemStruct.itemattr.furniture.furnicherID;
          Pos.y = -100.0;
          Pos.z = -100.0;
          if ( MiniHouseIndoor::AddObject(
                 &g_kWorld.m_MiniHouseIndoorMode,
                 kItemStruct.itemattr.furniture.furnicherID,
                 kItemStruct.itemid,
                 &Pos,
                 kItemStruct.itemattr.furniture.Direct,
                 0,
                 1) == 1 )
          {
            v6 = mhObjectManager::GetObjectA(&stru_A993C8, v5);
            v7 = ResElement::GetNiNode(v6->m_pkResource);
            MiniHouseIndoor::SetPickedObj(
              &g_kWorld.m_MiniHouseIndoorMode,
              (int)v1,
              (int)&v10,
              (NiAVObject *)&v7->vfptr,
              MH_STATE_EDIT_OBJ_PICKED,
              1);
          }
          else
          {
            MiniHouseIndoor::CancelPickObj(&g_kWorld.m_MiniHouseIndoorMode);
            PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMHMouseControlWin->vfptr);
          }
        }
      }
    }
  }
}

//----- (00493160) --------------------------------------------------------
void __userpurge GameFrameWork::ReArrangeMHObj(GameFrameWork *this@<ecx>, int a2@<ebx>, mhObject *pkObj)
{
  GameFrameWork *v3; // esi@1
  ResElement *v4; // eax@2
  NiActorManager *v5; // ecx@3
  NiAVObject *v6; // eax@4

  v3 = this;
  if ( pkObj )
  {
    MiniHouseIndoor::CancelPickObj(&g_kWorld.m_MiniHouseIndoorMode);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkMHMouseControlWin->vfptr);
    v4 = pkObj->m_pkResource;
    if ( v4->m_bIsCanAnimation && (v5 = v4->m_pActorMgr.m_pObject) != 0 )
      v6 = v5->m_spNIFRoot.m_pObject;
    else
      v6 = (NiAVObject *)&v4->m_pNiNode.m_pObject->vfptr;
    MiniHouseIndoor::SetPickedObj(&g_kWorld.m_MiniHouseIndoorMode, a2, (int)pkObj, v6, MH_STATE_EDIT_OBJ_PICKED, 0);
    PgFrameWork::AddMsg((PgFrameWork *)&v3->vfptr, 0xE0u, 1u, 0);
  }
}

//----- (004931D0) --------------------------------------------------------
void __thiscall GameFrameWork::SendDelMHObjReq(GameFrameWork *this, bool ClickInv)
{
  GameFrameWork *v2; // esi@1
  mhEditRoomWin *v3; // eax@1
  ItemIcon *v4; // ecx@4
  Item *v5; // eax@5
  NiUnsharedGeometryGroup *v6; // eax@9
  SHINE_ITEM_STRUCT kItemStruct; // [sp+4h] [bp-68h]@6

  v2 = this;
  v3 = this->m_pkMHEditRoomWin;
  if ( v3 )
  {
    if ( (signed int)nowState < 1 )
    {
      v6 = TextData2::Get(0x99C1A5FE);
      GameFrameWork::AddSysMsg(v2, (const char *)v6);
    }
    else if ( ClickInv == 1 )
    {
      v4 = (ItemIcon *)&v3->m_pkWorkTargetWin->vfptr;
      if ( v4 )
      {
        v5 = ItemIcon::GetItem(v4);
        if ( v5 )
        {
          qmemcpy(&kItemStruct, &v5->m_kStruct, sizeof(kItemStruct));
          mhGameMainConnectMgr::SendDelObjReq(kItemStruct.itemattr.furniture.furnicherID);
        }
      }
    }
    else if ( mhObj )
    {
      mhGameMainConnectMgr::SendDelObjReq(mhObj->m_iGUID);
    }
  }
}

//----- (00493270) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenMiniHouseMenuWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  char *v2; // eax@5

  v1 = this;
  if ( this->m_pkMiniHouseMenuWin )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkMiniHouseMenuWin->vfptr[65].__vecDelDtor)() )
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMiniHouseMenuWin->vfptr);
    }
    else
    {
      if ( (signed int)nowState <= 0 )
        v2 = (char *)TextData::Get(0xFAF63B39);
      else
        v2 = (char *)TextData2::Get(0xFA4A423F);
      MiniHouseMenuWin::SetMHJoinText(v1->m_pkMiniHouseMenuWin, v2);
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMiniHouseMenuWin->vfptr);
      GameFrameWork::OpenPlayGuideWin(v1, BIL_MINIHOUSE_1);
    }
  }
}

//----- (004932F0) --------------------------------------------------------
void __thiscall GameFrameWork::OnGoBeautyShop(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  NiPoint3 *v2; // eax@5
  NiPoint3 *v3; // eax@6
  PgNet *v4; // ecx@6
  NiUnsharedGeometryGroup *v5; // eax@8
  NETCOMMAND netcmd; // [sp+4h] [bp-4h]@7

  v1 = this;
  if ( (signed int)AttackSequenceManager::GetAttSeqCount((AttackSequenceManager *)&g_pkMainChar->vfptr) > 0 )
  {
    GameFrameWork::NcBatBashstopCmd(v1);
    AttackSequenceManager::HardStopAttack((AttackSequenceManager *)&g_pkMainChar->vfptr);
  }
  if ( v1->m_kSkillCasting.eState == 3 && !Char::GetReserveSkillSmash(g_pkMainChar) )
  {
    v2 = (NiPoint3 *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
    GameFrameWork::NcActStopReq(v1, v2);
    GameFrameWork::NcBatSkillbashCastabortReq(v1);
    Char::CancelSkillAction(g_pkMainChar, 1);
  }
  ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[7].AddAbStateByAbstateIndex)(1);
  ((void (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
  v3 = (NiPoint3 *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
  GameFrameWork::NcActStopReq(v1, v3);
  v4 = (PgNet *)&v1->m_spZoneNet.m_pObject->vfptr;
  if ( v4 )
  {
    netcmd.protocol = 3122;
    PgNet::AddNetMsg(v4, &netcmd, 2);
    NetMgr::SendUserLogOutMsg2WorldMgrServerForCharSelect(&g_kNetMgr);
    v1->m_bBackCharSelect = 1;
    Skill::ClearLearnSkill();
    Skill::ClearLearnPassiveSkill();
    GameFrameWork::OnSaveServerShortCutDataOption(v1);
    GameFrameWork::OnSaveServerShortCutSizeOption(v1);
    GameFrameWork::OnSaveServerWindowPosOption(v1);
    GameFrameWork::OnSaveServerKeyRemappingOption(v1);
    GameFrameWork::OnSaveServerGameOption();
    AbStateInfectee::ClearAbState((AbStateInfectee *)&g_pkMainChar->vfptr, 0);
    PgFrameWork::PostFrameMsgChange((PgFrameWork *)&v1->vfptr, CHairShopFrameWorkID, 0);
  }
  else
  {
    v5 = TextData::Get(0xCBCED23A);
    GameFrameWork::AddSysMsg(v1, (const char *)v5);
  }
}

//----- (00493440) --------------------------------------------------------
void __thiscall GameFrameWork::OnGoCharSelect(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  MHDiceGameTask *v2; // ecx@1
  bool v3; // bl@1
  MHDiceGameTask *v4; // edi@2
  bool v5; // bl@6
  MHDiceGameTask *v6; // edi@7
  NiUnsharedGeometryGroup *v7; // eax@11
  NiPoint3 *v8; // eax@16
  NiPoint3 *v9; // eax@17
  NiPointer<MHDiceGameTask> v10; // [sp+10h] [bp-14h]@6
  NiPointer<MHDiceGameTask> result; // [sp+14h] [bp-10h]@1
  int v12; // [sp+20h] [bp-4h]@1

  v1 = this;
  v2 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  v12 = 0;
  v3 = MHDiceGameTask::IsDicegamePlaying(v2);
  v12 = -1;
  if ( result.m_pObject )
  {
    v4 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
  }
  if ( v3 )
  {
    v5 = MHDiceGameTask::GetDiceGameTask(&v10)->m_pObject->m_eDiceGameMode != 4;
    if ( v10.m_pObject )
    {
      v6 = v10.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&v10.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    if ( v5 )
    {
      v7 = TextData2::Get(0x2D9F6D95u);
      GameFrameWork::AddSysMsg(v1, (const char *)v7);
    }
  }
  else
  {
    StatusWin::SetStoneAlarmEnable(v1->m_pkStatusWin, 0);
    if ( (signed int)AttackSequenceManager::GetAttSeqCount((AttackSequenceManager *)&g_pkMainChar->vfptr) > 0 )
    {
      GameFrameWork::NcBatBashstopCmd(v1);
      AttackSequenceManager::HardStopAttack((AttackSequenceManager *)&g_pkMainChar->vfptr);
    }
    if ( v1->m_kSkillCasting.eState == 3 && !Char::GetReserveSkillSmash(g_pkMainChar) )
    {
      v8 = (NiPoint3 *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
      GameFrameWork::NcActStopReq(v1, v8);
      GameFrameWork::NcBatSkillbashCastabortReq(v1);
      Char::CancelSkillAction(g_pkMainChar, 1);
    }
    ((void (__stdcall *)(signed int))g_pkMainChar->vfptr[7].AddAbStateByAbstateIndex)(1);
    ((void (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
    v9 = (NiPoint3 *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
    GameFrameWork::NcActStopReq(v1, v9);
    WaitingForLogoutWin::SetLogoutType(v1->m_pkWaitingForLogoutWin, LT_CHARSELECT);
    WaitingForLogoutWin::SetKeyMap(v1->m_pkWaitingForLogoutWin, v1->m_spKeyMap.m_pObject);
    PgWinMgr::ShowWinAtAbsoluteNear(&Pgg_kWinMgr, (PgWin *)&v1->m_pkWaitingForLogoutWin->vfptr);
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 4u, 0x71u, 0, 0);
  }
}

//----- (00493630) --------------------------------------------------------
void __usercall GameFrameWork::OnLogout(GameFrameWork *this@<ecx>, MHDiceGameTask *a2@<edi>)
{
  GameFrameWork *v2; // esi@1
  MHDiceGameTask *v3; // ecx@1
  bool v4; // bl@1
  bool v5; // bl@6
  MHDiceGameTask *v6; // edi@7
  NiUnsharedGeometryGroup *v7; // eax@11
  NiPoint3 *v8; // eax@16
  NiPoint3 *v9; // eax@17
  NiPointer<MHDiceGameTask> v10; // [sp+10h] [bp-14h]@6
  NiPointer<MHDiceGameTask> result; // [sp+14h] [bp-10h]@1
  int v12; // [sp+20h] [bp-4h]@1

  v2 = this;
  v3 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  v12 = 0;
  v4 = MHDiceGameTask::IsDicegamePlaying(v3);
  v12 = -1;
  if ( result.m_pObject )
  {
    a2 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( a2 )
        a2->vfptr->__vecDelDtor((NiRefObject *)a2, 1u);
    }
  }
  if ( v4 )
  {
    v5 = MHDiceGameTask::GetDiceGameTask(&v10)->m_pObject->m_eDiceGameMode != 4;
    if ( v10.m_pObject )
    {
      v6 = v10.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&v10.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    if ( v5 )
    {
      v7 = TextData2::Get(0x2D9F6D95u);
      GameFrameWork::AddSysMsg(v2, (const char *)v7);
    }
  }
  else
  {
    StatusWin::SetStoneAlarmEnable(v2->m_pkStatusWin, 0);
    if ( (signed int)AttackSequenceManager::GetAttSeqCount((AttackSequenceManager *)&g_pkMainChar->vfptr) > 0 )
    {
      GameFrameWork::NcBatBashstopCmd(v2);
      AttackSequenceManager::HardStopAttack((AttackSequenceManager *)&g_pkMainChar->vfptr);
    }
    if ( v2->m_kSkillCasting.eState == 3 && !Char::GetReserveSkillSmash(g_pkMainChar) )
    {
      v8 = (NiPoint3 *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
      GameFrameWork::NcActStopReq(v2, v8);
      GameFrameWork::NcBatSkillbashCastabortReq(v2);
      Char::CancelSkillAction(g_pkMainChar, 1);
    }
    ((void (__stdcall *)(signed int))g_pkMainChar->vfptr[7].AddAbStateByAbstateIndex)(1);
    ((void (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
    v9 = (NiPoint3 *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
    GameFrameWork::NcActStopReq(v2, v9);
    WaitingForLogoutWin::SetLogoutType(v2->m_pkWaitingForLogoutWin, 0);
    WaitingForLogoutWin::SetKeyMap(v2->m_pkWaitingForLogoutWin, v2->m_spKeyMap.m_pObject);
    PgWinMgr::ShowWinAtAbsoluteNear(&Pgg_kWinMgr, (PgWin *)&v2->m_pkWaitingForLogoutWin->vfptr);
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 4u, 0x71u, 0, 0);
    GameFrameWork::OnSaveServerShortCutDataOption(v2);
    GameFrameWork::OnSaveServerShortCutSizeOption(v2);
    GameFrameWork::OnSaveServerWindowPosOption(v2);
    GameFrameWork::OnSaveServerKeyRemappingOption(v2);
    GameFrameWork::OnSaveServerGameOption();
    MachineOpt::SaveUserInfo(v4, (int)a2);
  }
}

//----- (00493840) --------------------------------------------------------
void __usercall GameFrameWork::OnExit(GameFrameWork *this@<ecx>, MHDiceGameTask *a2@<edi>)
{
  GameFrameWork *v2; // esi@1
  MHDiceGameTask *v3; // ecx@1
  bool v4; // bl@1
  bool v5; // bl@6
  MHDiceGameTask *v6; // edi@7
  NiUnsharedGeometryGroup *v7; // eax@11
  NiPoint3 *v8; // eax@16
  NiPoint3 *v9; // eax@17
  NiPointer<MHDiceGameTask> v10; // [sp+10h] [bp-14h]@6
  NiPointer<MHDiceGameTask> result; // [sp+14h] [bp-10h]@1
  int v12; // [sp+20h] [bp-4h]@1

  v2 = this;
  v3 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  v12 = 0;
  v4 = MHDiceGameTask::IsDicegamePlaying(v3);
  v12 = -1;
  if ( result.m_pObject )
  {
    a2 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( a2 )
        a2->vfptr->__vecDelDtor((NiRefObject *)a2, 1u);
    }
  }
  if ( v4 )
  {
    v5 = MHDiceGameTask::GetDiceGameTask(&v10)->m_pObject->m_eDiceGameMode != 4;
    if ( v10.m_pObject )
    {
      v6 = v10.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&v10.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    if ( v5 )
    {
      v7 = TextData2::Get(0x2D9F6D95u);
      GameFrameWork::AddSysMsg(v2, (const char *)v7);
    }
  }
  else
  {
    StatusWin::SetStoneAlarmEnable(v2->m_pkStatusWin, 0);
    if ( (signed int)AttackSequenceManager::GetAttSeqCount((AttackSequenceManager *)&g_pkMainChar->vfptr) > 0 )
    {
      GameFrameWork::NcBatBashstopCmd(v2);
      AttackSequenceManager::HardStopAttack((AttackSequenceManager *)&g_pkMainChar->vfptr);
    }
    if ( v2->m_kSkillCasting.eState == 3 && !Char::GetReserveSkillSmash(g_pkMainChar) )
    {
      v8 = (NiPoint3 *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
      GameFrameWork::NcActStopReq(v2, v8);
      GameFrameWork::NcBatSkillbashCastabortReq(v2);
      Char::CancelSkillAction(g_pkMainChar, 1);
    }
    ((void (__stdcall *)(signed int))g_pkMainChar->vfptr[7].AddAbStateByAbstateIndex)(1);
    ((void (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
    v9 = (NiPoint3 *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
    GameFrameWork::NcActStopReq(v2, v9);
    WaitingForLogoutWin::SetLogoutType(v2->m_pkWaitingForLogoutWin, LT_EXIT);
    WaitingForLogoutWin::SetKeyMap(v2->m_pkWaitingForLogoutWin, v2->m_spKeyMap.m_pObject);
    PgWinMgr::ShowWinAtAbsoluteNear(&Pgg_kWinMgr, (PgWin *)&v2->m_pkWaitingForLogoutWin->vfptr);
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 4u, 0x71u, 0, 0);
    GameFrameWork::OnSaveServerShortCutDataOption(v2);
    GameFrameWork::OnSaveServerShortCutSizeOption(v2);
    GameFrameWork::OnSaveServerWindowPosOption(v2);
    GameFrameWork::OnSaveServerKeyRemappingOption(v2);
    GameFrameWork::OnSaveServerGameOption();
    MachineOpt::SaveUserInfo(v4, (int)a2);
  }
}

//----- (00493A50) --------------------------------------------------------
char __thiscall GameFrameWork::OnShortCutRClickItemUseMode(GameFrameWork *this, Item *pkItem, ShortCutItem *pkSenderShortCut, unsigned int uiUser)
{
  unsigned int v4; // edi@1
  GameFrameWork *v5; // esi@1
  unsigned int v7; // eax@4
  Item *v8; // ecx@5
  ActionEffectItem *v9; // eax@10
  InventoryWin *v10; // ecx@12
  NiUnsharedGeometryGroup *v11; // eax@14

  v4 = 0;
  v5 = this;
  if ( !pkItem || !pkItem->m_pkInfo )
    return 0;
  v7 = 0;
  while ( 1 )
  {
    v8 = g_kInventory.m_aspEquip[v7].m_pObject;
    if ( v8 )
    {
      if ( pkItem->m_kStruct.itemid == v8->m_kStruct.itemid )
        break;
    }
    if ( ++v7 >= 0x1E )
      goto LABEL_10;
  }
  v4 = v7;
LABEL_10:
  v9 = ActionEffectItemTab::GetByItemID(pkItem->m_kStruct.itemid);
  if ( v9 )
  {
    if ( Skill::IsSkillUsePossibleByItemActionID(v9->ItemActionID) )
    {
      v10 = v5->m_pkInventoryWin;
      if ( v10 )
      {
        InventoryWin::UseEquipedItem(v10, v4);
        return 1;
      }
    }
    else
    {
      v11 = TextData::Get(0x85F7D6D1);
      GameFrameWork::AddSysMsg(v5, (const char *)v11);
    }
  }
  return 1;
}

//----- (00493AF0) --------------------------------------------------------
void __thiscall GameFrameWork::OnShortCutRClickItemNormalMode(GameFrameWork *this, Item *pkItem, ShortCutItem *pkSenderShortCut, unsigned int uiUser)
{
  unsigned int v4; // eax@3
  Item *v5; // edx@4
  unsigned int v6; // eax@7
  Item *v7; // edx@8
  InventoryWin *v8; // ecx@13

  if ( pkItem && pkItem->m_pkInfo )
  {
    v4 = 0;
    do
    {
      v5 = g_kInventory.m_aspEquip[v4].m_pObject;
      if ( v5 && pkItem->m_kStruct.itemid == v5->m_kStruct.itemid )
      {
        InventoryWin::OnEquipRClick(this->m_pkInventoryWin, v4);
        return;
      }
      ++v4;
    }
    while ( v4 < 0x1E );
    v6 = 0;
    while ( 1 )
    {
      v7 = g_kInventory.m_aspInv[v6].m_pObject;
      if ( v7 )
      {
        if ( pkItem->m_kStruct.itemid == v7->m_kStruct.itemid )
          break;
      }
      if ( ++v6 >= 0xC0 )
        return;
    }
    v8 = this->m_pkInventoryWin;
    if ( v8 )
      InventoryWin::OnInvRClick(v8, v6, uiUser);
  }
}

//----- (00493B80) --------------------------------------------------------
void __thiscall GameFrameWork::OnShortCutRClickItemNormalMode(GameFrameWork *this, Item *pkItem, ShortCutInvPosItem *pkSenderShortCut, unsigned int uiUser)
{
  unsigned int v4; // eax@1
  InventoryWin *v5; // ecx@3

  v4 = pkSenderShortCut->m_uiInvPos;
  if ( v4 < 0xC0 && g_kInventory.m_aspInv[v4].m_pObject )
  {
    v5 = this->m_pkInventoryWin;
    if ( v5 )
      InventoryWin::OnInvRClick(v5, v4, uiUser);
  }
}

//----- (00493BC0) --------------------------------------------------------
void __stdcall GameFrameWork::ChangeMoveMode(int nMode)
{
  if ( nMode )
  {
    if ( nMode == 1 )
      GameFrameWork::ChangeWalk();
  }
  else
  {
    GameFrameWork::ChangeRun();
  }
}

//----- (00493BF0) --------------------------------------------------------
void __thiscall GameFrameWork::OnWalkOrRun_Key(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Mover *v2; // ecx@15
  Char *v3; // ecx@20
  Mover *v4; // eax@20
  Char *v5; // ecx@27
  Mover *v6; // eax@27
  NiUnsharedGeometryGroup *v7; // eax@33

  v1 = this;
  if ( ((int (*)(void))g_pkMainChar->vfptr[2].~AbStateInfectee)() > 0
    && !AttackSequenceManager::IsDuringAttackInServer((AttackSequenceManager *)&g_pkMainChar->vfptr)
    && (signed int)AttackSequenceManager::GetAttSeqCount((AttackSequenceManager *)&g_pkMainChar->vfptr) <= 0
    && !(unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[15].AddAbStateByAbstateIndex)()
    && !(unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[1].AddAbStateByAbstateIndex)()
    && !Char::IsActGathering(g_pkMainChar)
    && !Char::IsActProducing(g_pkMainChar)
    && Char::IsMoverMovable(g_pkMainChar)
    && !EditWin::ms_pkCurEditWin
    && ((int (*)(void))g_pkMainChar->vfptr[13].DeleteAbStateByAbstateIndex)() != 4
    && g_pkMainChar->m_kAbStateProperty.iFearCount <= 0
    && g_pkMainChar->m_kAbStateProperty.iKarenCaptivateStateCount <= 0 )
  {
    if ( !((int (*)(void))g_pkMainChar->vfptr[7].Affect)() )
    {
      if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[15].Deaffect)() )
      {
        v2 = g_pkMainChar->m_pkMover;
        if ( v2 )
        {
          if ( !Mover::IsFeed(v2) || v1->m_pkFeedMoverWin->m_uiHungryPoint )
            goto LABEL_20;
LABEL_25:
          if ( User::Lv(&g_kUser) <= 0x14 )
            PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMoveBtnWin->vfptr);
          return;
        }
        if ( v1->m_pkRidePetWin->m_nHungryPoint <= 0 )
          goto LABEL_25;
      }
LABEL_20:
      ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[7].Deaffect)(1);
      v3 = g_pkMainChar;
      v4 = g_pkMainChar->m_pkMover;
      if ( v4 && !g_pkMainChar->m_uiMoverSlot )
      {
        ((void (__thiscall *)(_DWORD, _DWORD))v4->vfptr[7].Deaffect)(g_pkMainChar->m_pkMover, 1);
        v3 = g_pkMainChar;
      }
      if ( !Char::CheckActState(v3, 100000) )
        GameFrameWork::UpdateMainCharOnRevActPickGround(v1, Timer::ms_fCurTime, 1);
      goto LABEL_25;
    }
    ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[7].Deaffect)(0);
    v5 = g_pkMainChar;
    v6 = g_pkMainChar->m_pkMover;
    if ( v6 && !g_pkMainChar->m_uiMoverSlot )
    {
      ((void (__thiscall *)(_DWORD, _DWORD))v6->vfptr[7].Deaffect)(g_pkMainChar->m_pkMover, 0);
      v5 = g_pkMainChar;
    }
    if ( !Char::CheckActState(v5, 100000) )
      GameFrameWork::UpdateMainCharOnRevActPickGround(v1, Timer::ms_fCurTime, 1);
    if ( User::Lv(&g_kUser) <= 0x14 )
    {
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMoveBtnWin->vfptr);
      v7 = TextData2::Get(0xACA48DFD);
      GameFrameWork::AddSysMsg(v1, (const char *)v7);
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00493E60) --------------------------------------------------------
void __thiscall GameFrameWork::OnNearMobSelect(GameFrameWork *this)
{
  GameFrameWork *v1; // edi@1
  Char *v2; // esi@2
  int v3; // eax@6
  int v4; // edx@6
  int v5; // ecx@6
  Char *v6; // ecx@12
  int v7; // eax@15
  int v8; // edx@15
  int v9; // ecx@15
  unsigned int v10; // esi@15
  Char *v11; // ecx@19

  v1 = this;
  if ( this->m_spBlindEffect.m_pObject->m_IsRunBlindEffect )
    return;
  v2 = (Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1];
  if ( !v2
    || Char::GetClass((Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1])
    || Char::IsNPC(v2)
    || v2->m_bWillDead )
  {
    v3 = unk_A99598;
    v4 = unk_A99594;
  }
  else
  {
    v3 = unk_A99598;
    v4 = unk_A99594;
    v5 = s_nSelNum;
    if ( s_nSelNum < (unk_A99598 - unk_A99594) >> 2 && s_nSelNum < 5 )
      goto LABEL_11;
  }
  v5 = 0;
  s_nSelNum = 0;
LABEL_11:
  if ( v5 < (v3 - v4) >> 2 )
    v6 = *(Char **)(v4 + 4 * v5);
  else
    v6 = 0;
  if ( CharMgr::GetChar(&g_kCharMgr, v6) )
  {
    v7 = unk_A99598;
    v8 = unk_A99594;
    v9 = s_nSelNum;
    v10 = (unk_A99598 - unk_A99594) >> 2;
    if ( s_nSelNum < v10 )
    {
      while ( 1 )
      {
        v11 = (Char *)(v9 < (v7 - v8) >> 2 ? *(_DWORD *)(v8 + 4 * v9) : 0);
        if ( GameFrameWork::OnOnePickChar(v1, v11) == 1 )
          break;
        v9 = s_nSelNum + 1;
        s_nSelNum = v9;
        if ( v9 >= v10 )
          return;
        v7 = unk_A99598;
        v8 = unk_A99594;
      }
      ++s_nSelNum;
    }
  }
}

//----- (00493F70) --------------------------------------------------------
void __usercall GameFrameWork::OnOpenPrivateStoreWinBuy(GameFrameWork *this@<ecx>, int a2@<edi>)
{
  GameFrameWork *v2; // esi@1
  NiRefObjectVtbl *v3; // edi@13
  int v4; // [sp+0h] [bp-4h]@0

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[20].Deaffect)() )
  {
    PrivateStoreWin::ms_bPrivateStoreWin = 0;
  }
  else
  {
    if ( (unsigned __int8)((int (__stdcall *)(int))v2->m_pkNPCSoulWin->vfptr[65].__vecDelDtor)(a2) )
    {
      GameFrameWork::NcActEndOfTrade(v2);
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkNPCSoulWin->vfptr);
      InventoryWin::ms_uiMode = 0;
    }
    if ( (unsigned __int8)((int (*)(void))v2->m_pkNPCSkillWin->vfptr[65].__vecDelDtor)() )
    {
      GameFrameWork::NcActEndOfTrade(v2);
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkNPCSkillWin->vfptr);
      InventoryWin::ms_uiMode = 0;
    }
    if ( (unsigned __int8)((int (*)(void))v2->m_pkItemShopWin->vfptr[65].__vecDelDtor)() )
    {
      GameFrameWork::NcActEndOfTrade(v2);
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkItemShopWin->vfptr);
      InventoryWin::ms_uiMode = 0;
    }
    if ( (unsigned __int8)((int (*)(void))v2->m_pkItemShopWin2->vfptr[65].__vecDelDtor)() )
      GameFrameWork::CloseItemShopWin(v2);
    if ( !(unsigned __int8)((int (*)(void))v2->m_pkInventoryWin->vfptr[65].__vecDelDtor)() )
      GameFrameWork::OpenInventoryWin(v2);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkPrivateStoreWin->vfptr);
    v3 = v2->m_pkPrivateStoreWin->vfptr;
    ((void (__stdcall *)(int))v2->m_pkPrivateStoreWin->vfptr[42].__vecDelDtor)(v4);
    ((void (__thiscall *)(PrivateStoreWin *))v3[77].__vecDelDtor)(v2->m_pkPrivateStoreWin);
    PrivateStoreWin::ClearItems(v2->m_pkPrivateStoreWin);
    PrivateStoreWin::SetPrivateStoreMode(v2->m_pkPrivateStoreWin, 3u);
  }
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;
// A8D482: using guessed type bool PrivateStoreWin::ms_bPrivateStoreWin;

//----- (004940B0) --------------------------------------------------------
void __usercall GameFrameWork::OnOpenPrivateStoreWinSell(GameFrameWork *this@<ecx>, int a2@<edi>)
{
  GameFrameWork *v2; // esi@1
  NiRefObjectVtbl *v3; // edi@13
  int v4; // [sp+0h] [bp-4h]@0

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[20].Deaffect)() )
  {
    PrivateStoreWin::ms_bPrivateStoreWin = 0;
  }
  else
  {
    if ( (unsigned __int8)((int (__stdcall *)(int))v2->m_pkNPCSoulWin->vfptr[65].__vecDelDtor)(a2) )
    {
      GameFrameWork::NcActEndOfTrade(v2);
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkNPCSoulWin->vfptr);
      InventoryWin::ms_uiMode = 0;
    }
    if ( (unsigned __int8)((int (*)(void))v2->m_pkNPCSkillWin->vfptr[65].__vecDelDtor)() )
    {
      GameFrameWork::NcActEndOfTrade(v2);
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkNPCSkillWin->vfptr);
      InventoryWin::ms_uiMode = 0;
    }
    if ( (unsigned __int8)((int (*)(void))v2->m_pkItemShopWin->vfptr[65].__vecDelDtor)() )
    {
      GameFrameWork::NcActEndOfTrade(v2);
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkItemShopWin->vfptr);
      InventoryWin::ms_uiMode = 0;
    }
    if ( (unsigned __int8)((int (*)(void))v2->m_pkItemShopWin2->vfptr[65].__vecDelDtor)() )
      GameFrameWork::CloseItemShopWin(v2);
    if ( !(unsigned __int8)((int (*)(void))v2->m_pkInventoryWin->vfptr[65].__vecDelDtor)() )
      GameFrameWork::OpenInventoryWin(v2);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkPrivateStoreWin->vfptr);
    v3 = v2->m_pkPrivateStoreWin->vfptr;
    ((void (__stdcall *)(int))v2->m_pkPrivateStoreWin->vfptr[42].__vecDelDtor)(v4);
    ((void (__thiscall *)(PrivateStoreWin *))v3[77].__vecDelDtor)(v2->m_pkPrivateStoreWin);
    PrivateStoreWin::ClearItems(v2->m_pkPrivateStoreWin);
    PrivateStoreWin::SetPrivateStoreMode(v2->m_pkPrivateStoreWin, 1u);
  }
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;
// A8D482: using guessed type bool PrivateStoreWin::ms_bPrivateStoreWin;

//----- (004941F0) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenPrivateStoreWinSearch(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  NiUnsharedGeometryGroup *v2; // eax@2
  NiUnsharedGeometryGroup *v3; // eax@4
  NiUnsharedGeometryGroup *v4; // eax@6

  v1 = this;
  if ( (unsigned __int8)((int (*)(void))this->m_pkMarketSearchWin->vfptr[65].__vecDelDtor)() )
  {
    v2 = TextData3::Get(0xAFA677E0);
    GameFrameWork::AddSysMsg(v1, (const char *)v2);
  }
  else if ( ((int (*)(void))g_pkMainChar->vfptr[2].~AbStateInfectee)() > 0 )
  {
    if ( (unsigned __int8)MarketSearchWin::DelayTimeCheck(v1->m_pkMarketSearchWin) )
    {
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMarketSearchWin->vfptr);
    }
    else
    {
      v4 = TextData3::Get(0xE40B203C);
      GameFrameWork::AddSysMsg(v1, (const char *)v4);
    }
  }
  else
  {
    v3 = TextData3::Get(0xFEFFE637);
    GameFrameWork::AddSysMsg(v1, (const char *)v3);
  }
}

//----- (00494280) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenInventoryWinKey(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  if ( !EditWin::ms_pkCurEditWin && this->m_pkInventoryWin )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkInventoryWin->vfptr[65].__vecDelDtor)() )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkInventoryWin->vfptr);
    else
      GameFrameWork::OpenInventoryWin(v1);
  }
}

//----- (004942D0) --------------------------------------------------------
void __thiscall GameFrameWork::OnPauseEmotion(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  signed int v2; // eax@5
  ActionViewInfo *v3; // eax@6
  signed int v4; // eax@8
  ActionViewInfo *v5; // eax@9

  v1 = this;
  if ( ((int (*)(void))g_pkMainChar->vfptr[13].DeleteAbStateByAbstateIndex)() != 4 && !EditWin::ms_pkCurEditWin )
  {
    if ( (unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD))g_pkMainChar->vfptr[14].IsVisible)(0, -1.0) )
    {
      ((void (*)(void))g_pkMainChar->vfptr[14].Affect)();
      if ( (float)-1.0 >= 0.0 )
      {
        v2 = ((int (*)(void))g_pkMainChar->vfptr[13].~AbStateInfectee)();
        if ( v2 >= 0 )
        {
          v3 = ActionViewTable::GetByEventCode(v2);
          if ( v3 )
            GameFrameWork::NcActEmoticonStopCmd(v1, v3->nIndex, (signed __int64)((float)-1.0 * 1000.0));
        }
      }
    }
    else
    {
      v4 = ((int (*)(void))g_pkMainChar->vfptr[13].~AbStateInfectee)();
      if ( v4 >= 0 )
      {
        v5 = ActionViewTable::GetByEventCode(v4);
        if ( v5 )
          GameFrameWork::NcActEmoticon_Cmd(v1, v5->nIndex);
      }
    }
  }
}

//----- (004943D0) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenActionWinKey(GameFrameWork *this)
{
  if ( !EditWin::ms_pkCurEditWin )
    GameFrameWork::OnOpenActionWin(this);
}

//----- (004943E0) --------------------------------------------------------
void __thiscall GameFrameWork::OpenCommunityWin(GameFrameWork *this, DirectUserMsgBody_CommunityTabChanged::TabEnum eTab)
{
  GameFrameWork *v2; // edi@1
  PgWin *v3; // esi@2
  CClientGuild *v4; // eax@3
  CClientGuild *v5; // eax@5
  CClientGuildAcademy *v6; // eax@9
  FriendWin *v7; // ecx@12
  NiRefObjectVtbl *v8; // ebx@12
  int v9; // eax@12
  NiRefObjectVtbl *v10; // ebx@12
  int v11; // eax@12

  v2 = this;
  this->m_iCommunityValue = eTab;
  switch ( eTab )
  {
    case 0:
      v3 = (PgWin *)&this->m_pkFriendWin->vfptr;
      goto LABEL_11;
    case 1:
      v3 = (PgWin *)&this->m_pkGuildWin->vfptr;
      NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 0xBEu, 0, 0);
      v4 = GuildTask::GetGuild();
      if ( (unsigned __int8)CClientGuild::AmIGuildMember(v4) )
        NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 0xC3u, 0, 0);
      NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 7u, 0, 0);
      NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 0x18u, 0, 0);
      v5 = GuildTask::GetGuild();
      CClientGuild::ReqHistoryList(v5);
      goto LABEL_11;
    case 2:
      v3 = (PgWin *)&this->m_pkPMWin->vfptr;
      goto LABEL_11;
    case 3:
      v3 = (PgWin *)&this->m_pkWeddingInfoWin->vfptr;
      goto LABEL_11;
    case 4:
      v3 = (PgWin *)&this->m_pkHolyPromiseWin->vfptr;
      goto LABEL_11;
    case 5:
      v6 = GuildAcademyTask::GetGuildAcademy();
      CClientGuildAcademy::ReqHistoryList(v6);
      NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 7u, 0, 0);
      v3 = (PgWin *)&v2->m_pkGuildAcademyWin->vfptr;
      if ( v3 )
      {
        GuildAcademyWin::InvalidateAcademy(v2->m_pkGuildAcademyWin);
LABEL_11:
        if ( v3 )
        {
          v7 = v2->m_pkFriendWin;
          v2->m_pkCurrentCommunityWin = v3;
          v8 = v3->vfptr;
          v9 = ((int (*)(void))v7->vfptr[41].__vecDelDtor)();
          v8[43].__vecDelDtor((NiRefObject *)v3, v9);
          v10 = v3->vfptr;
          v11 = ((int (*)(void))v2->m_pkFriendWin->vfptr[42].__vecDelDtor)();
          v10[44].__vecDelDtor((NiRefObject *)v3, v11);
          PgWinMgr::ShowWin(&Pgg_kWinMgr, v3);
          switch ( eTab )
          {
            case 1:
              GameFrameWork::OpenPlayGuideWin(v2, BIL_GUILD_1);
              break;
            case 3:
              GameFrameWork::OpenPlayGuideWin(v2, BIL_WEDDING_1);
              break;
            case 4:
              GameFrameWork::OpenPlayGuideWin(v2, BIL_HOLYPROMISE_1);
              break;
            case 5:
              GameFrameWork::OpenPlayGuideWin(v2, BIL_GUILD_3);
              break;
            default:
              return;
          }
        }
      }
      break;
    default:
      return;
  }
}

//----- (004945A0) --------------------------------------------------------
void __thiscall GameFrameWork::OpenRidePetWin(GameFrameWork *this, unsigned int uiPetID)
{
  GameFrameWork *v2; // esi@1
  RidePetWin *v3; // ecx@1
  RidePetWin *v4; // edi@3
  int v5; // eax@3
  _DWORD *v6; // ecx@3

  v2 = this;
  v3 = this->m_pkRidePetWin;
  if ( v3 )
    RidePetWin::SetPetID(v3, uiPetID);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkRidePetWin->vfptr);
  v4 = v2->m_pkRidePetWin;
  v5 = (int)v2->m_kCanHideWinList.vfptr->NewItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)&v2->m_kCanHideWinList);
  *(_DWORD *)(v5 + 8) = v4;
  *(_DWORD *)v5 = 0;
  *(_DWORD *)(v5 + 4) = v2->m_kCanHideWinList.m_pkTail;
  v6 = &v2->m_kCanHideWinList.m_pkTail->m_pkNext;
  if ( v6 )
  {
    *v6 = v5;
    ++v2->m_kCanHideWinList.m_kAllocator.m_uiCount;
    v2->m_kCanHideWinList.m_pkTail = (NiTListItem<PgWin *> *)v5;
  }
  else
  {
    ++v2->m_kCanHideWinList.m_kAllocator.m_uiCount;
    v2->m_kCanHideWinList.m_pkHead = (NiTListItem<PgWin *> *)v5;
    v2->m_kCanHideWinList.m_pkTail = (NiTListItem<PgWin *> *)v5;
  }
}

//----- (00494630) --------------------------------------------------------
void __thiscall GameFrameWork::CloseItemUpgradeWin(GameFrameWork *this, bool bSendEndofTrade)
{
  GameFrameWork *v2; // esi@1
  NiUnsharedGeometryGroup *v3; // eax@2

  v2 = this;
  if ( ItemUpgradeWin::IsUpgradingitem(this->m_pkItemUpgradeWin) == 1 )
  {
    v3 = TextData::Get(0xC7E4E718);
    GameFrameWork::AddSysMsg(v2, (const char *)v3);
  }
  else
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkItemUpgradeWin->vfptr);
    InventoryWin::ms_uiMode = 0;
    if ( bSendEndofTrade )
      GameFrameWork::NcActEndOfTrade(v2);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkItemUpgradeMsgWin->vfptr);
  }
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (004946A0) --------------------------------------------------------
void __thiscall GameFrameWork::CloseMoverUpgradeWin(GameFrameWork *this, bool bSendEndofTrade)
{
  GameFrameWork *v2; // esi@1
  MoverUpgradeWin *v3; // ecx@1
  NiUnsharedGeometryGroup *v4; // eax@3

  v2 = this;
  v3 = this->m_pkMoverUpgradeWin;
  if ( v3 && MoverUpgradeWin::IsUpgrading(v3) )
  {
    v4 = TextData3::Get(0x1D6C8675u);
    GameFrameWork::AddSysMsg(v2, (const char *)v4);
  }
  else
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkMoverUpgradeWin->vfptr);
    InventoryWin::ms_uiMode = 0;
    if ( bSendEndofTrade )
      GameFrameWork::NcActEndOfTrade(v2);
  }
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (00494700) --------------------------------------------------------
void __thiscall GameFrameWork::OnFriendDelete(GameFrameWork *this, Name5 kCharID)
{
  GameFrameWork *v2; // esi@1
  NiUnsharedGeometryGroup *v3; // eax@1
  MsgBox *v4; // edi@1
  _DWORD *v5; // eax@1
  PgMsg::Frame kOkMsg; // [sp+Ch] [bp-130h]@4
  char szMessage[256]; // [sp+20h] [bp-11Ch]@1
  char acName[21]; // [sp+120h] [bp-1Ch]@1

  v2 = this;
  *(Name5 *)acName = kCharID;
  acName[20] = 0;
  v3 = TextData::Get(0x947EDDBC);
  sprintf(szMessage, (const char *)v3, acName);
  v4 = MsgBox::Modeless(MSGBOX_OKCANCEL, szMessage);
  v5 = operator new(0x14u);
  if ( v5 )
  {
    v5[4] = 0;
    v5[3] = 0;
    v5[2] = 0;
    v5[1] = 0;
    *v5 = 0;
  }
  else
  {
    v5 = 0;
  }
  *(_QWORD *)v5 = *(_QWORD *)&kCharID.n5_name[0];
  *((_QWORD *)v5 + 1) = *(_QWORD *)&kCharID.n5_code[2];
  v5[4] = kCharID.n5_code[4];
  kOkMsg.m_uiFramelParam = (unsigned int)v5;
  kOkMsg.m_uiFrameMsg = 120;
  MsgBox::SetFrameWorkMsgOnClose(v4, (PgFrameWork *)&v2->vfptr, &kOkMsg, 0);
}

//----- (004947E0) --------------------------------------------------------
void __thiscall GameFrameWork::NcScenarioAreaEntryAck(GameFrameWork *this, const char *szAreaName)
{
  GameFrameWork *v2; // esi@1
  PROTO_NC_SCENARIO_AREAENTRY_ACK kAck; // [sp+4h] [bp-44h]@1
  Name8 areaindex; // [sp+24h] [bp-24h]@1

  v2 = this;
  *(_QWORD *)&areaindex.n8_code[6] = 0i64;
  *(_QWORD *)&areaindex.n8_code[4] = 0i64;
  *(_QWORD *)&areaindex.n8_code[2] = 0i64;
  *(_QWORD *)&areaindex.n8_name[0] = 0i64;
  strncpy(areaindex.n8_name, (char *)szAreaName, 0x20u);
  kAck.areaindex = areaindex;
  GameFrameWork::SendNetMsgZoneMgr(v2, 0x1Bu, 6u, &kAck, 32);
}

//----- (00494890) --------------------------------------------------------
void __thiscall GameFrameWork::NcScenarioAreaLeaveAck(GameFrameWork *this, const char *szAreaName)
{
  GameFrameWork *v2; // esi@1
  PROTO_NC_SCENARIO_AREALEAVE_ACK kAck; // [sp+4h] [bp-44h]@1
  Name8 areaindex; // [sp+24h] [bp-24h]@1

  v2 = this;
  *(_QWORD *)&areaindex.n8_code[6] = 0i64;
  *(_QWORD *)&areaindex.n8_code[4] = 0i64;
  *(_QWORD *)&areaindex.n8_code[2] = 0i64;
  *(_QWORD *)&areaindex.n8_name[0] = 0i64;
  strncpy(areaindex.n8_name, (char *)szAreaName, 0x20u);
  kAck.areaindex = areaindex;
  GameFrameWork::SendNetMsgZoneMgr(v2, 0x1Bu, 8u, &kAck, 32);
}

//----- (00494940) --------------------------------------------------------
char __thiscall GameFrameWork::TargetCharReq(GameFrameWork *this, Char *pkChar)
{
  Char *v2; // esi@1
  GameFrameWork *v3; // ebx@1
  Mover *v4; // edi@4
  NiUnsharedGeometryGroup *v6; // eax@13

  v2 = pkChar;
  v3 = this;
  if ( pkChar && pkChar->m_kHandle != -1 && MainChar::IsCharTargetableState((MainChar *)g_pkMainChar, pkChar) )
  {
    v4 = pkChar->m_pkMover;
    if ( (unsigned __int8)((int (__thiscall *)(_DWORD))pkChar->vfptr[20].AddAbStateByAbstateIndex)(pkChar) )
    {
      if ( !Mover::IsAbility((Mover *)pkChar) )
        v2 = Mover::GetSlotChar((Mover *)pkChar, 0);
    }
    else if ( v4 && Mover::IsAbility(v4) )
    {
      v2 = (Char *)v4;
    }
    if ( v2 )
    {
      MainChar::SetTargetChar((MainChar *)g_pkMainChar, v2);
      BYTE2(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[7].dwEffectIndex[1]) = 1;
      LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) = 0;
      GameFrameWork::NcBatTargettingReq(v3, v2->m_kHandle);
      return 1;
    }
  }
  else if ( MainChar::GetIsNotTargetChangeAndNotMoveMsg((MainChar *)g_pkMainChar) == 1 )
  {
    v6 = TextData2::Get(0xB62B2F22);
    GameFrameWork::AddSysMsg(v3, (const char *)v6);
    MainChar::SetIsNotTargetChangeAndNotMoveMsg((MainChar *)g_pkMainChar, 0);
  }
  return 0;
}

//----- (00494A40) --------------------------------------------------------
void __thiscall GameFrameWork::OnEquipChangeMiniMon(GameFrameWork *this, Item *pkItem)
{
  GameFrameWork *v2; // esi@1
  int v3; // ebx@1
  Char *v4; // edi@2
  int v5; // eax@6
  int v6; // esi@7
  int v7; // ebx@7
  int v8; // edx@11
  int v9; // esi@16
  int v10; // edi@16
  ItemInfo **v11; // eax@20
  MinimonInfo *v12; // eax@27
  int v13; // eax@28
  MinimonInfo *v14; // eax@33
  int v15; // eax@34
  char v16; // bl@36
  NiUnsharedGeometryGroup *v17; // eax@42
  ItemInfo *pkRightInfo; // [sp+8h] [bp-Ch]@6
  GameFrameWork *v19; // [sp+Ch] [bp-8h]@1
  bool bAutoUse; // [sp+13h] [bp-1h]@6
  char bAutoPick_3; // [sp+1Fh] [bp+Bh]@6

  v2 = this;
  v3 = 0;
  v19 = this;
  if ( this->m_pkInventoryWin )
  {
    v4 = g_pkMainChar;
    if ( !pkItem
      && g_pkMainChar->m_kCharShape.m_kEquip.Equ_Minimon == -1
      && g_pkMainChar->m_kCharShape.m_kEquip.Equ_MiniMon_R == -1 )
    {
      this->m_pkInventoryWin->m_bAutoPickEnable = 0;
      InventoryWin::OnAutoPickShow(this->m_pkInventoryWin);
      v2->m_pkInventoryWin->m_bAutoUseEnable = 0;
      InventoryWin::OnAutoUseShow(v2->m_pkInventoryWin);
      return;
    }
    v5 = g_pkMainChar->m_kCharShape.m_kEquip.Equ_Minimon;
    bAutoPick_3 = 0;
    bAutoUse = 0;
    pkRightInfo = 0;
    if ( (_WORD)v5 != -1 )
    {
      v6 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      v7 = g_pkMainChar->m_kCharShape.m_kEquip.Equ_Minimon;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v5) )
      {
        if ( (unsigned __int16)v7 <= *(_WORD *)(v6 + 200) )
        {
          v8 = *(_DWORD *)(v6 + 196);
          if ( *(_DWORD *)(v8 + 4 * v7) )
            v3 = *(_DWORD *)(v8 + 4 * v7);
          else
            v3 = 0;
        }
        else
        {
          v3 = 0;
        }
      }
      else
      {
        v3 = 0;
      }
      v2 = v19;
    }
    if ( v4->m_kCharShape.m_kEquip.Equ_MiniMon_R != -1 )
    {
      v9 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      v10 = v4->m_kCharShape.m_kEquip.Equ_MiniMon_R;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v10) )
      {
        if ( (unsigned __int16)v10 <= *(_WORD *)(v9 + 200) )
        {
          v11 = (ItemInfo **)(*(_DWORD *)(v9 + 196) + 4 * v10);
          if ( *v11 )
            pkRightInfo = *v11;
          else
            pkRightInfo = 0;
        }
        else
        {
          pkRightInfo = 0;
        }
      }
      else
      {
        pkRightInfo = 0;
      }
      v2 = v19;
    }
    if ( v3 )
    {
      v12 = MinimonInfoTable::GetMinimonInfoByIDX((char *)(v3 + 2));
      if ( v12 )
      {
        v13 = v12->MinimonRole - 1;
        if ( v13 )
        {
          if ( v13 == 1 )
            bAutoUse = 1;
        }
        else
        {
          bAutoPick_3 = 1;
        }
      }
      if ( !pkRightInfo )
        goto LABEL_38;
    }
    else if ( !pkRightInfo )
    {
      return;
    }
    v14 = MinimonInfoTable::GetMinimonInfoByIDX(pkRightInfo->InxName);
    if ( v14 )
    {
      v15 = v14->MinimonRole - 1;
      if ( !v15 )
      {
        v16 = bAutoUse;
        bAutoPick_3 = 1;
        goto LABEL_40;
      }
      if ( v15 == 1 )
      {
        v16 = 1;
        goto LABEL_39;
      }
    }
LABEL_38:
    v16 = bAutoUse;
LABEL_39:
    if ( !bAutoPick_3 )
    {
      if ( !v16 )
      {
        v17 = TextData2::Get(0xCCF8D9CC);
        GameFrameWork::AddSysMsg(v2, (const char *)v17);
      }
      goto LABEL_43;
    }
LABEL_40:
    PgFrameWork::AddMsg((PgFrameWork *)&v2->vfptr, 0xFDu, 1u, 0);
LABEL_43:
    v2->m_pkInventoryWin->m_bAutoPickEnable = bAutoPick_3;
    InventoryWin::OnAutoPickShow(v2->m_pkInventoryWin);
    v2->m_pkInventoryWin->m_bAutoUseEnable = v16;
    InventoryWin::OnAutoUseShow(v2->m_pkInventoryWin);
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (00494C50) --------------------------------------------------------
void __userpurge GameFrameWork::OpenCollectCardWin(GameFrameWork *this@<ecx>, double a2@<st0>, bool bOpen, unsigned int uiCardID, unsigned int uiStar, unsigned int uiSerial, int bBlind)
{
  GameFrameWork *v7; // ebx@1
  unsigned int v8; // edi@3
  CollectCardWin **v9; // ebx@3
  CollectCardWin *v10; // esi@4
  NiUnsharedGeometryGroup *v11; // eax@12
  CollectCardWin *v12; // esi@15
  CollectCardWin **v13; // edi@17
  signed int v14; // ebx@17
  CollectCardWin *v15; // esi@18
  unsigned int uiOpenIndex; // [sp+14h] [bp-Ch]@3
  GameFrameWork *v17; // [sp+18h] [bp-8h]@1
  unsigned int uiOpenCount; // [sp+1Ch] [bp-4h]@3
  bool bChange; // [sp+2Bh] [bp+Bh]@3

  v7 = this;
  v17 = this;
  if ( bOpen )
  {
    if ( !GameFrameWork::IsPlayCardOpen(this, a2) )
    {
      v8 = 0;
      uiOpenIndex = 0;
      uiOpenCount = 0;
      bChange = 0;
      v9 = v7->m_pkCollectCardWin;
      do
      {
        v10 = *v9;
        if ( *v9 )
        {
          if ( (unsigned __int8)CollectCardWin::IsSameCard(v10, uiCardID, uiSerial) )
          {
            v11 = TextData2::Get(0xB443281E);
            goto LABEL_14;
          }
          if ( (unsigned __int8)((int (__thiscall *)(CollectCardWin *))v10->vfptr[65].__vecDelDtor)(v10) )
          {
            ++uiOpenCount;
          }
          else if ( !bChange )
          {
            uiOpenIndex = v8;
            bChange = 1;
          }
        }
        ++v8;
        ++v9;
      }
      while ( v8 < 4 );
      if ( uiOpenCount >= 4 )
      {
        v11 = TextData2::Get(0xC6F2DFC5);
LABEL_14:
        GameFrameWork::AddSysMsg(v17, (const char *)v11);
        return;
      }
      v12 = v17->m_pkCollectCardWin[uiOpenIndex];
      if ( v12 )
      {
        CollectCardWin::SetInfo(v12, uiCardID, uiStar, uiSerial, bBlind);
        ((void (__thiscall *)(CollectCardWin *, unsigned int, unsigned int, _DWORD, _DWORD))v12->vfptr[59].__vecDelDtor)(
          v12,
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          0.5,
          0.5);
        PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)&v12->vfptr);
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v12->vfptr);
      }
    }
  }
  else
  {
    v13 = this->m_pkCollectCardWin;
    v14 = 4;
    do
    {
      v15 = *v13;
      if ( *v13 )
      {
        CollectCardWin::Reset(*v13);
        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v15->vfptr);
      }
      ++v13;
      --v14;
    }
    while ( v14 );
  }
}

//----- (00494DA0) --------------------------------------------------------
void __thiscall GameFrameWork::OpenFeedMoverWin(GameFrameWork *this, unsigned __int16 kMoverHandle, unsigned int uiLevel)
{
  GameFrameWork *v3; // esi@1
  Char *v4; // eax@3

  v3 = this;
  if ( this->m_pkFeedMoverWin && (unsigned __int8)((int (*)(void))this->m_pkFeedMoverWin->vfptr[65].__vecDelDtor)() != 1 )
  {
    v4 = CharMgr::GetChar(&g_kCharMgr, kMoverHandle);
    if ( v4 )
    {
      v3->m_pkFeedMoverWin->m_kMoverID = (unsigned int)v4[1].m_kAbStateList.m_pkTail;
      v3->m_pkFeedMoverWin->m_uiMoverLevel = uiLevel;
      FeedMoverWin::UpdateMover(v3->m_pkFeedMoverWin);
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkFeedMoverWin->vfptr);
      *(_DWORD *)&kMoverHandle = v3->m_pkFeedMoverWin;
      NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v3->m_kCanHideWinList,
        (NiD3DXEffectParameter *const *)&kMoverHandle);
    }
  }
}

//----- (00494E30) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenMiniHouseWinKey(GameFrameWork *this)
{
  if ( !EditWin::ms_pkCurEditWin )
    GameFrameWork::OnOpenMiniHouseMenuWin(this);
}

//----- (00494E40) --------------------------------------------------------
void GameFrameWork::SendmhObjActReq()
{
  mhObject *v1; // esi@1
  MiniHouseObjAni *v2; // eax@1

  v1 = mhObjectManager::GetObjectA(&stru_A993C8, unk_A99532);
  v2 = MiniHouseObjAniInfoTab::GetObjInfobyhnd(unk_A99534);
  if ( v1 )
  {
    if ( v2 )
      mhGameMainConnectMgr::SendObjActReq(dword_A99408, v2->Handle, v1->m_iGUID);
  }
}

//----- (00494E90) --------------------------------------------------------
void __userpurge GameFrameWork::OnOpenMHPopUpMenuInvObjWin(GameFrameWork *this@<ecx>, int a2@<ebx>, int a3@<edi>, bool bArranged, int SelItemID)
{
  GameFrameWork *v5; // esi@1
  mhEditRoomWin *v6; // eax@2
  int v7; // ST18_4@3
  int v8; // ST14_4@3
  int v9; // ebx@3
  int v10; // edi@3
  int v11; // eax@4
  int v12; // ecx@7
  MiniHouseFurniture *v13; // eax@10
  int v14; // edi@10
  char *v15; // eax@12
  PopupMenuText *v16; // eax@12
  char *v17; // eax@14
  PopupMenuText *v18; // eax@14
  PopupMenuText *v19; // eax@16
  PopupMenuText *v20; // eax@18
  ItemIcon *v21; // ecx@19
  Item *v22; // ebx@20
  Item *v23; // eax@21
  PopupMenuText *v24; // eax@21
  int v25; // ST18_4@23
  PopupMenuText *v26; // eax@24
  PopupMenu *v27; // eax@27

  v5 = this;
  PopupMenuWin::Clear(this->m_pkPopupMenuWin);
  if ( v5->m_pkPopupMenuWin )
  {
    v6 = v5->m_pkMHEditRoomWin;
    if ( v6 )
    {
      v7 = a2;
      v8 = a3;
      v9 = ItemIcon::GetItem((ItemIcon *)&v6->m_pkWorkTargetWin->vfptr)->m_kStruct.itemid;
      v10 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int, int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                                      + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v9,
                              v8,
                              v7) )
      {
        if ( (unsigned __int16)v9 <= *(_WORD *)(v10 + 200) )
        {
          v12 = *(_DWORD *)(v10 + 196);
          if ( *(_DWORD *)(v12 + 4 * v9) )
            v11 = *(_DWORD *)(v12 + 4 * v9);
          else
            v11 = 0;
        }
        else
        {
          v11 = 0;
        }
      }
      else
      {
        v11 = 0;
      }
      v13 = MiniHouseFuritureInfoTab::GetObjByName((char *)(v11 + 2));
      v14 = v13->GameType;
      if ( v14 || strcmp("MINIGAME", v13->InvenType) )
      {
        if ( v14 == 1 )
        {
          v17 = (char *)TextData2::Get(0x30807D88u);
          v18 = PopupMenuText::CreateWin(v17, 0xE7u, 0, 0, 0, 0, 0);
          PopupMenuWin::AddMenu(v5->m_pkPopupMenuWin, 1, (PopupMenu *)&v18->vfptr);
          if ( bArranged == 1 )
          {
            v16 = (PopupMenuText *)PopupMenuTemplate::GetmhUI_ReturnToInvMHItem(1);
          }
          else
          {
            v19 = PopupMenuTemplate::GetmhUI_ArrToInvMHItem();
            PopupMenuWin::AddMenu(v5->m_pkPopupMenuWin, 1, (PopupMenu *)&v19->vfptr);
            v16 = PopupMenuTemplate::GetmhUI_DeleteMHItem();
          }
        }
        else
        {
          if ( bArranged == 1 )
          {
            v20 = (PopupMenuText *)PopupMenuTemplate::GetmhUI_ReturnToInvMHItem(1);
          }
          else
          {
            v26 = PopupMenuTemplate::GetmhUI_ArrToInvMHItem();
            PopupMenuWin::AddMenu(v5->m_pkPopupMenuWin, v14, (PopupMenu *)&v26->vfptr);
            v20 = PopupMenuTemplate::GetmhUI_DeleteMHItem();
          }
          PopupMenuWin::AddMenu(v5->m_pkPopupMenuWin, v14, (PopupMenu *)&v20->vfptr);
          v21 = (ItemIcon *)&v5->m_pkMHEditRoomWin->m_pkWorkTargetWin->vfptr;
          if ( !v21 )
            goto LABEL_27;
          v22 = ItemIcon::GetItem(v21);
          if ( !v22 )
            goto LABEL_27;
          v23 = MiniHouseIndoor::GetEndureStep(v22, v5->m_pkMHRepairWin->m_tServerTime);
          v14 = (int)v23;
          v24 = PopupMenuTemplate::GetmhUI_Endure((int)v23);
          PopupMenuWin::AddMenu(v5->m_pkPopupMenuWin, v14, (PopupMenu *)&v24->vfptr);
          if ( v14 == 100000 || v14 == 200000 )
          {
            v16 = PopupMenuTemplate::GetmhUI_EndurePercentage(100);
          }
          else
          {
            v25 = MiniHouseIndoor::GetEndurePercentage(v22, v5->m_pkMHRepairWin->m_tServerTime);
            v16 = PopupMenuTemplate::GetmhUI_EndurePercentage(v25);
          }
        }
      }
      else
      {
        v15 = (char *)TextData2::Get(0x8E78C7CD);
        v16 = PopupMenuText::CreateWin(v15, 0xE6u, 0, 0, 0, 0, 0);
      }
      PopupMenuWin::AddMenu(v5->m_pkPopupMenuWin, v14, (PopupMenu *)&v16->vfptr);
LABEL_27:
      v27 = PopupMenuTemplate::GetCancelMenu();
      PopupMenuWin::AddMenu(v5->m_pkPopupMenuWin, v14, v27);
      PopupMenuWin::FinishMenu(v5->m_pkPopupMenuWin, 0);
      ((void (__cdecl *)(unsigned int, int))v5->m_pkPopupMenuWin->vfptr[77].__vecDelDtor)(
        PgWin::ms_iMsX,
        PgWin::ms_iMsY);
      PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v5->m_pkPopupMenuWin->vfptr);
      if ( unk_A994A4 != SelItemID )
        unk_A994A4 = SelItemID;
      return;
    }
  }
}
// 494E90: could not find valid save-restore pair for ebx
// 494E90: could not find valid save-restore pair for edi
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (00495110) --------------------------------------------------------
void __thiscall GameFrameWork::OpenMHInfoWin(GameFrameWork *this, DirectUserMsgBody_MHInfoTabChanged::TabEnum eTab)
{
  GameFrameWork *v2; // esi@1
  void *v3; // edi@2
  mhInfoWin *v4; // eax@7
  char *v5; // ebx@9
  int v6; // eax@12
  mhInfoWin *v7; // ecx@12
  int v8; // eax@13
  bool v9; // zf@13
  int v10; // ebx@13
  char *v11; // eax@14
  MHDiceGameTask *v12; // ecx@15
  bool v13; // bl@15
  char *v14; // eax@16
  MsgBox *v15; // eax@18
  PgWin *v16; // ecx@21
  _DWORD *v17; // ebx@21
  int v18; // eax@22
  void *v19; // ecx@22
  int v20; // eax@23
  _DWORD *v21; // ebx@24
  int v22; // eax@24
  ColumnBut *v23; // eax@24
  char *v24; // [sp-10h] [bp-4Ch]@12
  int v25; // [sp-Ch] [bp-48h]@12
  bool v26; // [sp-8h] [bp-44h]@12
  char *v27; // [sp-4h] [bp-40h]@12
  NiPointer<MHDiceGameTask> result; // [sp+10h] [bp-2Ch]@15
  bool bItemView[4]; // [sp+14h] [bp-28h]@12
  PgMsg::Frame kOkMsg; // [sp+18h] [bp-24h]@18
  int v31; // [sp+38h] [bp-4h]@15

  v2 = this;
  switch ( eTab )
  {
    case 0:
      v3 = this->m_pkMHInfoWin;
      this->m_pkCurrentTab = (ColumnBut *)**((_DWORD **)v3 + 117);
      goto LABEL_20;
    case 1:
      v3 = this->m_pkMHGuestBookWin;
      GameFrameWork::NcMiscWebKeyReq(this);
      goto LABEL_20;
    case 2:
      v3 = this->m_pkMHEditRoomWin;
      this->m_pkCurrentTab = *(ColumnBut **)(*((_DWORD *)v3 + 919) + 8);
      if ( unk_A9943C == 2 )
        goto LABEL_20;
      return;
    case 3:
      v3 = this->m_pkMHPortalListWin;
      this->m_pkCurrentTab = *(ColumnBut **)(*((_DWORD *)v3 + 96) + 12);
      goto LABEL_20;
    case 4:
      v3 = this->m_pkMHSettingWin;
      v4 = this->m_pkMHInfoWin;
      this->m_pkCurrentTab = *(ColumnBut **)(*((_DWORD *)v3 + 94) + 16);
      if ( unk_A9943C == 2 )
      {
        if ( v4->m_PassWord._Mysize )
        {
          v5 = v4->m_PassWord._Bx._Buf;
          if ( v4->m_PassWord._Myres >= 0x10 )
            v5 = *(char **)v5;
        }
        else
        {
          v5 = 0;
        }
        v6 = ((int (*)(void))v4->m_pkTextFieldWin[3]->vfptr[121].__vecDelDtor)();
        v7 = v2->m_pkMHInfoWin;
        v27 = (char *)v6;
        bItemView[0] = v7->m_bItemView;
        v26 = bItemView[0];
        v25 = v7->m_MaxPersonCount;
        v24 = v5;
      }
      else
      {
        v8 = ((int (*)(void))v4->m_pkTextFieldWin[3]->vfptr[121].__vecDelDtor)();
        v7 = v2->m_pkMHInfoWin;
        v9 = v7->m_PassWord._Mysize == 0;
        v10 = v7->m_MaxPersonCount;
        bItemView[0] = v7->m_bItemView;
        v27 = (char *)v8;
        v26 = bItemView[0];
        v25 = v10;
        v24 = (char *)((unsigned __int8)(v9 - 1) != 0 ? (unsigned int)"........" : 0);
      }
      v11 = mhInfoWin::GetTitle(v7);
      mhSettingWin::Refresh(v2->m_pkMHSettingWin, v11, v24, v25, v26, v27);
      goto LABEL_20;
    case 5:
      v12 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
      v31 = 0;
      v13 = MHDiceGameTask::IsDicegamePlaying(v12);
      v31 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&result);
      if ( v13 )
        v14 = (char *)TextData2::Get(0xCCF40DFD);
      else
        v14 = (char *)TextData2::Get(0xDEF8F1EA);
      v15 = MsgBox::Modeless(MSGBOX_OKCANCEL, v14);
      kOkMsg.m_uiFrameMsg = 206;
      kOkMsg.m_uiFramelParam = 0;
      MsgBox::SetFrameWorkMsgOnClose(v15, (PgFrameWork *)&v2->vfptr, &kOkMsg, 0);
      v2->m_pkCurrentTab->m_bCheck = 1;
      break;
    default:
      v3 = this->m_pkMHInfoWin;
LABEL_20:
      if ( v3 )
      {
        v16 = v2->m_pkMHCurrentWin;
        v17 = *(_DWORD **)v3;
        if ( v16 )
        {
          v18 = ((int (*)(void))v16->vfptr[41].__vecDelDtor)();
          ((void (__thiscall *)(void *, int))v17[43])(v3, v18);
          v19 = v2->m_pkMHCurrentWin;
        }
        else
        {
          v20 = ((int (*)(void))v2->m_pkMHInfoWin->vfptr[41].__vecDelDtor)();
          ((void (__thiscall *)(void *, int))v17[43])(v3, v20);
          v19 = v2->m_pkMHInfoWin;
        }
        v21 = *(_DWORD **)v3;
        v22 = (*(int (**)(void))(*(_DWORD *)v19 + 168))();
        ((void (__thiscall *)(void *, int))v21[44])(v3, v22);
        v23 = v2->m_pkCurrentTab;
        if ( v23 )
          v23->m_bCheck = 1;
        PgWinMgr::CloseWin(&Pgg_kWinMgr, v2->m_pkMHCurrentWin);
        v2->m_pkMHCurrentWin = (PgWin *)v3;
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)v3);
      }
      break;
  }
}

//----- (004953D0) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenFriendWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  PgWin *v2; // ecx@1
  FriendWin *v3; // ecx@6
  PgWin *v4; // edi@6
  NiRefObjectVtbl *v5; // ebx@7
  int v6; // eax@7
  NiRefObjectVtbl *v7; // ebx@7
  int v8; // eax@7

  v1 = this;
  v2 = this->m_pkCurrentCommunityWin;
  if ( v2 )
  {
    if ( (unsigned __int8)((int (*)(void))v2->vfptr[65].__vecDelDtor)() && !v1->m_iCommunityValue )
    {
      GameFrameWork::CloseCommunityWin(v1);
      v1->m_iCommunityValue = -1;
      return;
    }
    GameFrameWork::CloseCommunityWin(v1);
  }
  v3 = v1->m_pkFriendWin;
  v4 = (PgWin *)&v1->m_pkFriendWin->vfptr;
  v1->m_iCommunityValue = 0;
  if ( v4 )
  {
    v1->m_pkCurrentCommunityWin = v4;
    v5 = v4->vfptr;
    v6 = ((int (*)(void))v3->vfptr[41].__vecDelDtor)();
    v5[43].__vecDelDtor((NiRefObject *)v4, v6);
    v7 = v4->vfptr;
    v8 = ((int (*)(void))v1->m_pkFriendWin->vfptr[42].__vecDelDtor)();
    v7[44].__vecDelDtor((NiRefObject *)v4, v8);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, v4);
  }
}

//----- (00495470) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenGuildWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  PgWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_pkCurrentCommunityWin;
  if ( v2 )
  {
    if ( (unsigned __int8)((int (*)(void))v2->vfptr[65].__vecDelDtor)() && v1->m_iCommunityValue == 1 )
    {
      GameFrameWork::CloseCommunityWin(v1);
      v1->m_iCommunityValue = -1;
      return;
    }
    GameFrameWork::CloseCommunityWin(v1);
  }
  GameFrameWork::OpenCommunityWin(v1, TE_GUILD);
}

//----- (004954C0) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenHolyPromise(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  PgWin *v2; // ecx@1
  PgWin *v3; // edi@8
  FriendWin *v4; // ecx@9
  NiRefObjectVtbl *v5; // ebx@9
  int v6; // eax@9
  NiRefObjectVtbl *v7; // ebx@9
  int v8; // eax@9

  v1 = this;
  v2 = this->m_pkCurrentCommunityWin;
  if ( !v2 )
    goto LABEL_7;
  if ( !(unsigned __int8)((int (*)(void))v2->vfptr[65].__vecDelDtor)() )
  {
    GameFrameWork::CloseCommunityWin(v1);
LABEL_7:
    v1->m_iCommunityValue = 4;
    goto LABEL_8;
  }
  if ( v1->m_iCommunityValue == 4 )
  {
    GameFrameWork::CloseCommunityWin(v1);
    v1->m_iCommunityValue = -1;
    return;
  }
  GameFrameWork::CloseCommunityWin(v1);
  v1->m_iCommunityValue = 4;
LABEL_8:
  v3 = (PgWin *)&v1->m_pkHolyPromiseWin->vfptr;
  if ( v3 )
  {
    v4 = v1->m_pkFriendWin;
    v1->m_pkCurrentCommunityWin = v3;
    v5 = v3->vfptr;
    v6 = ((int (*)(void))v4->vfptr[41].__vecDelDtor)();
    v5[43].__vecDelDtor((NiRefObject *)v3, v6);
    v7 = v3->vfptr;
    v8 = ((int (*)(void))v1->m_pkFriendWin->vfptr[42].__vecDelDtor)();
    v7[44].__vecDelDtor((NiRefObject *)v3, v8);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, v3);
    GameFrameWork::OpenPlayGuideWin(v1, BIL_HOLYPROMISE_1);
  }
}

//----- (00495580) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenGuildAcademy(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  PgWin *v2; // ecx@1
  CClientGuildAcademy *v3; // eax@8
  PgWin *v4; // edi@8
  FriendWin *v5; // ecx@10
  NiRefObjectVtbl *v6; // ebx@10
  int v7; // eax@10
  NiRefObjectVtbl *v8; // ebx@10
  int v9; // eax@10

  v1 = this;
  v2 = this->m_pkCurrentCommunityWin;
  if ( !v2 )
    goto LABEL_7;
  if ( !(unsigned __int8)((int (*)(void))v2->vfptr[65].__vecDelDtor)() )
  {
    GameFrameWork::CloseCommunityWin(v1);
LABEL_7:
    v1->m_iCommunityValue = 5;
    goto LABEL_8;
  }
  if ( v1->m_iCommunityValue == 5 )
  {
    GameFrameWork::CloseCommunityWin(v1);
    v1->m_iCommunityValue = -1;
    return;
  }
  GameFrameWork::CloseCommunityWin(v1);
  v1->m_iCommunityValue = 5;
LABEL_8:
  v3 = GuildAcademyTask::GetGuildAcademy();
  CClientGuildAcademy::ReqHistoryList(v3);
  NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 7u, 0, 0);
  v4 = (PgWin *)&v1->m_pkGuildAcademyWin->vfptr;
  if ( v4 )
  {
    GuildAcademyWin::InvalidateAcademy(v1->m_pkGuildAcademyWin);
    if ( v4 )
    {
      v5 = v1->m_pkFriendWin;
      v1->m_pkCurrentCommunityWin = v4;
      v6 = v4->vfptr;
      v7 = ((int (*)(void))v5->vfptr[41].__vecDelDtor)();
      v6[43].__vecDelDtor((NiRefObject *)v4, v7);
      v8 = v4->vfptr;
      v9 = ((int (*)(void))v1->m_pkFriendWin->vfptr[42].__vecDelDtor)();
      v8[44].__vecDelDtor((NiRefObject *)v4, v9);
      PgWinMgr::ShowWin(&Pgg_kWinMgr, v4);
      GameFrameWork::OpenPlayGuideWin(v1, BIL_GUILD_3);
    }
  }
}

//----- (00495670) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenPartyMatching(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  PgWin *v2; // ecx@1
  PgWin *v3; // edi@8
  FriendWin *v4; // ecx@9
  NiRefObjectVtbl *v5; // ebx@9
  int v6; // eax@9
  NiRefObjectVtbl *v7; // ebx@9
  int v8; // eax@9

  v1 = this;
  v2 = this->m_pkCurrentCommunityWin;
  if ( !v2 )
    goto LABEL_7;
  if ( !(unsigned __int8)((int (*)(void))v2->vfptr[65].__vecDelDtor)() )
  {
    GameFrameWork::CloseCommunityWin(v1);
LABEL_7:
    v1->m_iCommunityValue = 2;
    goto LABEL_8;
  }
  if ( v1->m_iCommunityValue == 2 )
  {
    GameFrameWork::CloseCommunityWin(v1);
    v1->m_iCommunityValue = -1;
    return;
  }
  GameFrameWork::CloseCommunityWin(v1);
  v1->m_iCommunityValue = 2;
LABEL_8:
  v3 = (PgWin *)&v1->m_pkPMWin->vfptr;
  if ( v3 )
  {
    v4 = v1->m_pkFriendWin;
    v1->m_pkCurrentCommunityWin = v3;
    v5 = v3->vfptr;
    v6 = ((int (*)(void))v4->vfptr[41].__vecDelDtor)();
    v5[43].__vecDelDtor((NiRefObject *)v3, v6);
    v7 = v3->vfptr;
    v8 = ((int (*)(void))v1->m_pkFriendWin->vfptr[42].__vecDelDtor)();
    v7[44].__vecDelDtor((NiRefObject *)v3, v8);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, v3);
  }
}

//----- (00495730) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenWedding(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  PgWin *v2; // ecx@1
  PgWin *v3; // edi@8
  FriendWin *v4; // ecx@9
  NiRefObjectVtbl *v5; // ebx@9
  int v6; // eax@9
  NiRefObjectVtbl *v7; // ebx@9
  int v8; // eax@9

  v1 = this;
  v2 = this->m_pkCurrentCommunityWin;
  if ( !v2 )
    goto LABEL_7;
  if ( !(unsigned __int8)((int (*)(void))v2->vfptr[65].__vecDelDtor)() )
  {
    GameFrameWork::CloseCommunityWin(v1);
LABEL_7:
    v1->m_iCommunityValue = 3;
    goto LABEL_8;
  }
  if ( v1->m_iCommunityValue == 3 )
  {
    GameFrameWork::CloseCommunityWin(v1);
    v1->m_iCommunityValue = -1;
    return;
  }
  GameFrameWork::CloseCommunityWin(v1);
  v1->m_iCommunityValue = 3;
LABEL_8:
  v3 = (PgWin *)&v1->m_pkWeddingInfoWin->vfptr;
  if ( v3 )
  {
    v4 = v1->m_pkFriendWin;
    v1->m_pkCurrentCommunityWin = v3;
    v5 = v3->vfptr;
    v6 = ((int (*)(void))v4->vfptr[41].__vecDelDtor)();
    v5[43].__vecDelDtor((NiRefObject *)v3, v6);
    v7 = v3->vfptr;
    v8 = ((int (*)(void))v1->m_pkFriendWin->vfptr[42].__vecDelDtor)();
    v7[44].__vecDelDtor((NiRefObject *)v3, v8);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, v3);
    GameFrameWork::OpenPlayGuideWin(v1, BIL_WEDDING_1);
  }
}

//----- (004957F0) --------------------------------------------------------
void __thiscall GameFrameWork::OnShortCutSkillUse(GameFrameWork *this, unsigned int iIndex, unsigned int uiUser)
{
  GameFrameWork *v3; // ebx@1
  int v4; // esi@2
  __int16 v5; // si@4
  Char *v6; // eax@6
  ActionViewInfo *v7; // eax@8
  ActionType v8; // eax@9
  int v9; // eax@10
  unsigned __int16 v10; // ax@16
  Item *v11; // edi@17
  signed int v12; // eax@18
  bool v13; // cf@18
  Item *v14; // ecx@20
  ActionEffectItem *v15; // eax@25
  ItemActionEffectDesc *v16; // eax@26
  unsigned int v17; // eax@30
  Item *v18; // eax@31

  v3 = this;
  if ( iIndex < 0x64 )
  {
    v4 = (int)*(&ptr + iIndex);
    if ( v4 )
    {
      if ( (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v4 + 4))(v4) == 1 )
      {
        v5 = *(_WORD *)(v4 + 8);
        if ( v5 != -1 && v3->m_kSkillCasting.eState == SCS_IDLE )
        {
          MainChar::SetReserveAct((MainChar *)g_pkMainChar, RESERVEACT_SKILL);
          v6 = g_pkMainChar;
          LOWORD(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[9].dwEffectIndex[0]) = v5;
          v6[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[1] = 1;
        }
      }
      else if ( (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v4 + 4))(v4) == 2 )
      {
        v7 = IIDTableBase<ActionViewInfo,ActionViewTable,unsigned short>::GetByID(*(_DWORD *)(v4 + 8));
        if ( v7 )
        {
          v8 = v7->eActionType;
          if ( v8 )
          {
            v9 = v8 - 1;
            if ( v9 )
            {
              if ( v9 == 1 )
                PremiumActionWin::OnEmotionAction(v3->m_pkActionWin->m_pkPremiumActionWin, *(_DWORD *)(v4 + 16));
            }
            else
            {
              ActionWin::OnEmotionAction(v3->m_pkActionWin, *(_DWORD *)(v4 + 16));
            }
          }
          else
          {
            ActionWin::OnDefaultAction(v3->m_pkActionWin, *(_DWORD *)(v4 + 16));
          }
        }
      }
      else if ( (*(int (__thiscall **)(int))(*(_DWORD *)v4 + 4))(v4) == 4 )
      {
        v10 = *(_WORD *)(v4 + 12);
        if ( v10 != -1 )
        {
          v11 = Inventory::GetItemByID(&g_kInventory, v10);
          if ( v11 )
          {
            v12 = 0;
            v13 = 1;
            while ( 1 )
            {
              if ( v13 )
              {
                v14 = g_kInventory.m_aspEquip[v12].m_pObject;
                if ( v14 )
                {
                  if ( v11->m_kStruct.itemid == v14->m_kStruct.itemid )
                    break;
                }
              }
              v13 = (unsigned int)++v12 < 0x1E;
              if ( v12 >= 30 )
              {
                GameFrameWork::OnShortCutRClickItemNormalMode(v3, v11, (ShortCutItem *)v4, uiUser);
                return;
              }
            }
            v15 = ActionEffectItemTab::GetByItemID(v11->m_kStruct.itemid);
            if ( v15 )
            {
              v16 = ItemActionEffectDescTab::GetByItemActionID(v15->ItemActionID);
              if ( v16 )
              {
                if ( v16->UseItem )
                  GameFrameWork::OnShortCutRClickItemUseMode(v3, v11, (ShortCutItem *)v4, uiUser);
              }
            }
          }
        }
      }
      else if ( (*(int (__thiscall **)(int))(*(_DWORD *)v4 + 4))(v4) == 5 )
      {
        v17 = *(_DWORD *)(v4 + 8);
        if ( v17 < 0xC0 )
        {
          v18 = g_kInventory.m_aspInv[v17].m_pObject;
          if ( v18 )
          {
            if ( v18->m_kStruct.itemid != -1 )
              GameFrameWork::OnShortCutRClickItemNormalMode(v3, v18, (ShortCutInvPosItem *)v4, uiUser);
          }
        }
      }
    }
  }
}

//----- (004959D0) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenPrivateStoreWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  NiUnsharedGeometryGroup *v2; // eax@2
  NiUnsharedGeometryGroup *v3; // eax@4
  char *v4; // eax@9
  MsgBox *v5; // eax@9
  PgMsg::Frame kBuyMsg; // [sp+4h] [bp-54h]@9
  PgMsg::Frame kCloseMsg; // [sp+18h] [bp-40h]@9
  PgMsg::Frame kSellMsg; // [sp+2Ch] [bp-2Ch]@9
  PgMsg::Frame kSearchMsg; // [sp+40h] [bp-18h]@9

  v1 = this;
  if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[20].Deaffect)() )
  {
    v2 = TextData2::Get(0x3AB2967Cu);
    GameFrameWork::AddSysMsg(v1, (const char *)v2);
  }
  else
  {
    GameFrameWork::TargetCharReq(v1, g_pkMainChar);
    if ( unk_A96B31 )
    {
      v3 = TextData::Get(0x9B756275);
      GameFrameWork::AddSysMsg(v1, (const char *)v3);
    }
    else if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[1].Deaffect)() )
    {
      if ( (unsigned __int8)((int (*)(void))v1->m_pkPrivateStoreWin->vfptr[65].__vecDelDtor)() )
      {
        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkPrivateStoreWin->vfptr);
      }
      else if ( !PrivateStoreWin::ms_bPrivateStoreWin )
      {
        v4 = (char *)TextData::Get(0x42325082u);
        v5 = MsgBox::Modeless(MSGBOX_PRIVATESOTRE_BUY_SELL, v4);
        kBuyMsg.m_uiFrameMsg = 164;
        kSellMsg.m_uiFrameMsg = 165;
        kSearchMsg.m_uiFrameMsg = 166;
        kCloseMsg.m_uiFrameMsg = 167;
        MsgBox::SetFrameWorkMsgOnPrivateStore(
          v5,
          (PgFrameWork *)&v1->vfptr,
          &kBuyMsg,
          &kSellMsg,
          &kSearchMsg,
          &kCloseMsg);
        GameFrameWork::OpenPlayGuideWin(v1, BIL_MINIHOUSE_6);
        PrivateStoreWin::ms_bPrivateStoreWin = 1;
      }
    }
  }
}
// A8D482: using guessed type bool PrivateStoreWin::ms_bPrivateStoreWin;

//----- (00495B10) --------------------------------------------------------
void __thiscall GameFrameWork::OpenShopMenu(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  NiUnsharedGeometryGroup *v2; // eax@2
  MoverUpgradeWin *v3; // ecx@4
  NiUnsharedGeometryGroup *v4; // eax@6

  v1 = this;
  if ( ItemUpgradeWin::IsUpgradingitem(this->m_pkItemUpgradeWin) == 1 )
  {
    v2 = TextData::Get(0xC7E4E718);
    GameFrameWork::AddSysMsg(v1, (const char *)v2);
  }
  else
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkItemUpgradeWin->vfptr);
    InventoryWin::ms_uiMode = 0;
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkItemUpgradeMsgWin->vfptr);
  }
  v3 = v1->m_pkMoverUpgradeWin;
  if ( v3 && MoverUpgradeWin::IsUpgrading(v3) )
  {
    v4 = TextData3::Get(0x1D6C8675u);
    GameFrameWork::AddSysMsg(v1, (const char *)v4);
  }
  else
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMoverUpgradeWin->vfptr);
    InventoryWin::ms_uiMode = 0;
  }
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkItemMixWin->vfptr);
  InventoryWin::ms_uiMode = 0;
  if ( !(unsigned __int8)((int (*)(void))v1->m_pkInventoryWin->vfptr[65].__vecDelDtor)() )
    GameFrameWork::OpenInventoryWin(v1);
  InventoryWin::ms_uiMode = 1;
  if ( !(unsigned __int8)((int (*)(void))v1->m_pkItemShopWin->vfptr[65].__vecDelDtor)() )
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkItemShopWin->vfptr);
  ItemShopWin::ResetPage(v1->m_pkItemShopWin);
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (00495C20) --------------------------------------------------------
void __thiscall GameFrameWork::OpenItemShopWin(GameFrameWork *this, unsigned __int16 handle)
{
  Char *v2; // eax@1
  Char *v3; // edi@1
  int v4; // esi@1
  MobViewInfo *v5; // ebx@1
  int v6; // esi@2
  int v7; // ebx@2
  int v8; // edx@6
  GameFrameWork *v9; // edi@11
  GuildTournamentStorageWin *v10; // eax@13
  GameFrameWork *v11; // [sp+Ch] [bp-4h]@1

  v11 = this;
  v2 = CharMgr::GetChar(&g_kCharMgr, handle);
  v3 = v2;
  v4 = 0;
  v5 = 0;
  if ( !v2 )
    goto LABEL_14;
  v6 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
  v7 = v2->m_kCharShape.m_kMobID;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 16))(
                          ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                          v7) )
  {
    if ( (unsigned __int16)v7 <= *(_WORD *)(v6 + 200) )
    {
      v8 = *(_DWORD *)(v6 + 196);
      v4 = *(_DWORD *)(v8 + 4 * v7) ? *(_DWORD *)(v8 + 4 * v7) : 0;
    }
    else
    {
      v4 = 0;
    }
  }
  else
  {
    v4 = 0;
  }
  v5 = MobViewInfoTab::GetByID(v3->m_kCharShape.m_kMobID);
  if ( !v4 )
    goto LABEL_14;
  if ( *(_DWORD *)(v4 + 99) == 14 )
  {
    v10 = GuildTask::GetGuildTournamentStorageWin();
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v10->vfptr);
LABEL_14:
    v9 = v11;
    goto LABEL_15;
  }
  v9 = v11;
  if ( !(unsigned __int8)((int (*)(void))v11->m_pkInventoryWin->vfptr[65].__vecDelDtor)() )
    GameFrameWork::OpenInventoryWin(v11);
LABEL_15:
  if ( !(unsigned __int8)((int (*)(void))v9->m_pkItemShopWin2->vfptr[65].__vecDelDtor)() )
  {
    if ( v5 )
      NPCItemWin::ResetPage(v9->m_pkItemShopWin2, v5->MiniMapIcon);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v9->m_pkItemShopWin2->vfptr);
    if ( v4 )
    {
      if ( *(_DWORD *)(v4 + 99) != 14 )
        InventoryWin::ms_uiMode = 1;
    }
  }
}
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (00495D30) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenFriendWinKey(GameFrameWork *this)
{
  if ( !EditWin::ms_pkCurEditWin )
    GameFrameWork::OnOpenFriendWin(this);
}

//----- (00495D40) --------------------------------------------------------
void __thiscall GameFrameWork::ActivateCommunityWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  CPartyMatchWin *v2; // eax@1
  PgWin *v3; // edi@5
  FriendWin *v4; // ecx@6
  NiRefObjectVtbl *v5; // ebx@6
  int v6; // eax@6
  NiRefObjectVtbl *v7; // ebx@6
  int v8; // eax@6

  v1 = this;
  v2 = (CPartyMatchWin *)this->m_pkCurrentCommunityWin;
  if ( v2 )
  {
    if ( v2 == this->m_pkPMWin )
    {
      GameFrameWork::CloseCommunityWin(this);
      return;
    }
    GameFrameWork::CloseCommunityWin(this);
  }
  v3 = (PgWin *)&v1->m_pkPMWin->vfptr;
  v1->m_iCommunityValue = 2;
  if ( v3 )
  {
    v4 = v1->m_pkFriendWin;
    v1->m_pkCurrentCommunityWin = v3;
    v5 = v3->vfptr;
    v6 = ((int (*)(void))v4->vfptr[41].__vecDelDtor)();
    v5[43].__vecDelDtor((NiRefObject *)v3, v6);
    v7 = v3->vfptr;
    v8 = ((int (*)(void))v1->m_pkFriendWin->vfptr[42].__vecDelDtor)();
    v7[44].__vecDelDtor((NiRefObject *)v3, v8);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, v3);
  }
}

//----- (00495DD0) --------------------------------------------------------
void __thiscall GameFrameWork::CloseRidePetWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  NiTListItem<PgWin *> **v2; // eax@3
  RidePetWin *v3; // edi@3
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *v4; // ecx@3
  RidePetWin **v5; // edx@4
  NiTListItem<PgWin *> **v6; // esi@4
  void *kPos; // [sp+8h] [bp-4h]@7

  v1 = this;
  if ( !(unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[15].Deaffect)() )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkRidePetWin->vfptr);
  v2 = &v1->m_kCanHideWinList.m_pkHead->m_pkNext;
  v3 = v1->m_pkRidePetWin;
  v4 = (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&v1->m_kCanHideWinList;
  if ( v2 )
  {
    while ( 1 )
    {
      v5 = (RidePetWin **)(v2 + 2);
      v6 = v2;
      v2 = (NiTListItem<PgWin *> **)*v2;
      if ( v3 == *v5 )
        break;
      if ( !v2 )
        goto LABEL_6;
    }
  }
  else
  {
LABEL_6:
    v6 = 0;
  }
  kPos = v6;
  if ( v6 )
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(v4, &kPos);
}

//----- (00495E40) --------------------------------------------------------
void __thiscall GameFrameWork::OnF1(GameFrameWork *this)
{
  if ( (signed int)nowState < 1 )
    GameFrameWork::TargetCharReq(this, g_pkMainChar);
}

//----- (00495E60) --------------------------------------------------------
void __thiscall GameFrameWork::OnF2(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  PartyMemberInfo *v2; // eax@1
  _BYTE v3[20]; // ST00_20@2
  Char *v4; // eax@2

  v1 = this;
  v2 = Party::GetMemberInfo(&g_kParty, 0);
  if ( v2 )
  {
    *(_DWORD *)v3 = v2->m_kCharID.n5_code[0];
    *(_QWORD *)&v3[4] = *(_QWORD *)&v2->m_kCharID.n5_code[1];
    *(_QWORD *)&v3[12] = *(_QWORD *)&v2->m_kCharID.n5_code[3];
    v4 = CharMgr::GetChar(&g_kCharMgr, *(Name5 *)v3);
    if ( v4 )
      GameFrameWork::TargetCharReq(v1, v4);
  }
}

//----- (00495EB0) --------------------------------------------------------
void __thiscall GameFrameWork::OnF3(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  PartyMemberInfo *v2; // eax@1
  _BYTE v3[20]; // ST00_20@2
  Char *v4; // eax@2

  v1 = this;
  v2 = Party::GetMemberInfo(&g_kParty, 1u);
  if ( v2 )
  {
    *(_DWORD *)v3 = v2->m_kCharID.n5_code[0];
    *(_QWORD *)&v3[4] = *(_QWORD *)&v2->m_kCharID.n5_code[1];
    *(_QWORD *)&v3[12] = *(_QWORD *)&v2->m_kCharID.n5_code[3];
    v4 = CharMgr::GetChar(&g_kCharMgr, *(Name5 *)v3);
    if ( v4 )
      GameFrameWork::TargetCharReq(v1, v4);
  }
}

//----- (00495F00) --------------------------------------------------------
void __thiscall GameFrameWork::OnF4(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  PartyMemberInfo *v2; // eax@1
  _BYTE v3[20]; // ST00_20@2
  Char *v4; // eax@2

  v1 = this;
  v2 = Party::GetMemberInfo(&g_kParty, 2u);
  if ( v2 )
  {
    *(_DWORD *)v3 = v2->m_kCharID.n5_code[0];
    *(_QWORD *)&v3[4] = *(_QWORD *)&v2->m_kCharID.n5_code[1];
    *(_QWORD *)&v3[12] = *(_QWORD *)&v2->m_kCharID.n5_code[3];
    v4 = CharMgr::GetChar(&g_kCharMgr, *(Name5 *)v3);
    if ( v4 )
      GameFrameWork::TargetCharReq(v1, v4);
  }
}

//----- (00495F50) --------------------------------------------------------
void __thiscall GameFrameWork::OnF5(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  PartyMemberInfo *v2; // eax@1
  _BYTE v3[20]; // ST00_20@2
  Char *v4; // eax@2

  v1 = this;
  v2 = Party::GetMemberInfo(&g_kParty, 3u);
  if ( v2 )
  {
    *(_DWORD *)v3 = v2->m_kCharID.n5_code[0];
    *(_QWORD *)&v3[4] = *(_QWORD *)&v2->m_kCharID.n5_code[1];
    *(_QWORD *)&v3[12] = *(_QWORD *)&v2->m_kCharID.n5_code[3];
    v4 = CharMgr::GetChar(&g_kCharMgr, *(Name5 *)v3);
    if ( v4 )
      GameFrameWork::TargetCharReq(v1, v4);
  }
}

//----- (00495FA0) --------------------------------------------------------
void __thiscall GameFrameWork::OnF6(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  PartyMemberInfo *v2; // eax@1
  _BYTE v3[20]; // ST00_20@2
  Char *v4; // eax@2

  v1 = this;
  v2 = Party::GetMemberInfo(&g_kParty, 4u);
  if ( v2 )
  {
    *(_DWORD *)v3 = v2->m_kCharID.n5_code[0];
    *(_QWORD *)&v3[4] = *(_QWORD *)&v2->m_kCharID.n5_code[1];
    *(_QWORD *)&v3[12] = *(_QWORD *)&v2->m_kCharID.n5_code[3];
    v4 = CharMgr::GetChar(&g_kCharMgr, *(Name5 *)v3);
    if ( v4 )
      GameFrameWork::TargetCharReq(v1, v4);
  }
}

//----- (00495FF0) --------------------------------------------------------
void __thiscall GameFrameWork::MHWinInfoToSettingSync(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  mhInfoWin *v2; // eax@1
  int v3; // eax@2
  char *v4; // eax@5
  mhSettingWin *v5; // edi@7
  int v6; // eax@7
  char buf; // [sp+8h] [bp-4h]@7

  v1 = this;
  v2 = this->m_pkMHInfoWin;
  if ( v2->m_FullTitleName._Mysize )
  {
    v3 = (int)&v2->m_FullTitleName;
    if ( *(_DWORD *)(v3 + 20) >= 0x10u )
      v3 = *(_DWORD *)v3;
  }
  else
  {
    v3 = ((int (__thiscall *)(_DWORD))v2->m_pkTextFieldWin[1]->vfptr[121].__vecDelDtor)(v2->m_pkTextFieldWin[1]);
  }
  ((void (__stdcall *)(_DWORD))v1->m_pkMHSettingWin->m_spEdit[0].m_pObject->vfptr[115].__vecDelDtor)(v3);
  v4 = v1->m_pkMHInfoWin->m_PassWord._Bx._Buf;
  if ( v1->m_pkMHInfoWin->m_PassWord._Myres >= 0x10 )
    v4 = *(char **)v4;
  mhSettingWin::SetPassWord(v1->m_pkMHSettingWin, v4);
  v1->m_pkMHSettingWin->m_spCheckBox[1]->m_bCheck = v1->m_pkMHInfoWin->m_bItemView;
  v5 = v1->m_pkMHSettingWin;
  _itoa(v1->m_pkMHInfoWin->m_MaxPersonCount, &buf, 10);
  ((void (__stdcall *)(_DWORD))v5->m_spEdit[1].m_pObject->vfptr[115].__vecDelDtor)(&buf);
  v6 = ((int (*)(void))v1->m_pkMHInfoWin->m_pkTextFieldWin[3]->vfptr[121].__vecDelDtor)();
  ((void (__stdcall *)(_DWORD))v1->m_pkMHSettingWin->m_spEdit[3].m_pObject->vfptr[115].__vecDelDtor)(v6);
}

//----- (004960F0) --------------------------------------------------------
void __thiscall GameFrameWork::CloseFeedMoverWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  NiLight *element; // [sp+4h] [bp-4h]@3

  v1 = this;
  if ( this->m_pkFeedMoverWin )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkFeedMoverWin->vfptr[65].__vecDelDtor)() == 1 )
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkFeedMoverWin->vfptr);
      element = (NiLight *)v1->m_pkFeedMoverWin;
      NiTPointerListBase<DFALL<AttackSequence *>,AttackSequence *>::Remove(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *> *)&v1->m_kCanHideWinList,
        &element);
      ((void (__stdcall *)(_DWORD))v1->m_pkFeedMoverWin->vfptr[64].__vecDelDtor)(0);
    }
  }
}

//----- (00496160) --------------------------------------------------------
void __usercall GameFrameWork::OnGameStart(GameFrameWork *this@<ecx>, int a2@<edi>)
{
  GameFrameWork *v2; // esi@1
  StatusBuffWin *v3; // ecx@1
  FriendWin *v4; // ecx@3
  PartyWinInterface *v5; // ecx@7
  NiUnsharedGeometryGroup *v6; // eax@10
  MoverUpgradeWin *v7; // ecx@12
  NiUnsharedGeometryGroup *v8; // eax@14
  EnchantGemToolTipWin *v9; // ecx@21
  Item *v10; // eax@43
  ItemInfo *v11; // eax@45
  MinimonInfo *v12; // eax@46
  char *v13; // eax@50
  Name3 *v14; // eax@51
  MapViewInfo *v15; // edi@51
  NiSourceTexture *v16; // ebx@51
  TargetWin *v17; // ecx@53
  LuaScriptMgr *v18; // ecx@55
  LuaScriptMgr *v19; // eax@56
  int v20; // eax@57
  LuaScriptMgr *v21; // ecx@61
  LuaScriptMgr *v22; // eax@62
  int v23; // eax@63
  LuaScriptMgr *v24; // eax@67
  CClientGuildAcademy *v25; // eax@68
  Name3 result; // [sp+28h] [bp-20h]@51
  LuaScriptMgr *v27; // [sp+34h] [bp-14h]@56
  unsigned int dwDummy; // [sp+38h] [bp-10h]@37
  int v29; // [sp+44h] [bp-4h]@56

  v2 = this;
  MachineOpt::LoadUserInfo();
  PgWin::InitPosLeftTop(
    (PgWin *)&v2->m_pkStatusBuffWin->vfptr,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    MachineOpt::ms_kUserLoginOption.BufXPos,
    MachineOpt::ms_kUserLoginOption.BufYPos);
  StatusBuffWin::SetFrameBoxSize(
    v2->m_pkStatusBuffWin,
    MachineOpt::ms_kUserLoginOption.BufWidth,
    MachineOpt::ms_kUserLoginOption.BufHeight);
  StatusBuffWin::AlignBuf(
    v2->m_pkStatusBuffWin,
    MachineOpt::ms_kUserLoginOption.BufWidth / 20,
    MachineOpt::ms_kUserLoginOption.BufHeight / 20);
  PgWin::InitPosLeftTop(
    (PgWin *)&v2->m_pkStatusDBuffWin->vfptr,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    MachineOpt::ms_kUserLoginOption.DBufXPos,
    MachineOpt::ms_kUserLoginOption.DBufYPos);
  StatusBuffWin::SetFrameBoxSize(
    v2->m_pkStatusDBuffWin,
    MachineOpt::ms_kUserLoginOption.DBufWidth,
    MachineOpt::ms_kUserLoginOption.DBufHeight);
  StatusBuffWin::AlignBuf(
    v2->m_pkStatusDBuffWin,
    MachineOpt::ms_kUserLoginOption.DBufWidth / 20,
    MachineOpt::ms_kUserLoginOption.DBufHeight / 20);
  v3 = v2->m_pkStatusChargedBuffWin;
  if ( v3 )
  {
    StatusBuffWin::RemoveAllMsgItemFromMap(v3);
    StatusBuffWin::SetFrameBoxSize(
      v2->m_pkStatusChargedBuffWin,
      MachineOpt::ms_kUserLoginOption.ChargedBufWidth,
      MachineOpt::ms_kUserLoginOption.ChargedBufHeight);
    StatusBuffWin::AlignBuf(
      v2->m_pkStatusChargedBuffWin,
      MachineOpt::ms_kUserLoginOption.ChargedBufWidth / 20,
      MachineOpt::ms_kUserLoginOption.ChargedBufHeight / 20);
    PgWin::InitPosLeftTop(
      (PgWin *)&v2->m_pkStatusChargedBuffWin->vfptr,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      MachineOpt::ms_kUserLoginOption.ChargedBufXPos,
      MachineOpt::ms_kUserLoginOption.ChargedBufYPos);
  }
  FullMapWin::SetInvisibleWinAlpha(v2->m_pkMiniMapWin->m_pkFullMapWin, a2, MachineOpt::ms_kUserLoginOption.FullMapAlpha);
  v4 = v2->m_pkFriendWin;
  if ( v4->m_bAllow != MachineOpt::ms_kUserLoginOption.bFriendAddAllow )
    FriendWin::OnClickRejectBtn(v4);
  GameFrameWork::SendNetMsgWorldMgr(v2, 0x16u, 0x1Bu, 0, 0);
  GameFrameWork::NcMapLoginCompleteCmd(v2);
  v2->m_bEnableAdmin = 0;
  GameFrameWork::NcActChatReq(v2, "&adminlevel");
  if ( g_kParty.m_uiTotalMember )
    GameFrameWork::NcPartyMemberinforeqCmd(v2);
  v5 = v2->m_pkPartyWinInterface;
  if ( v5 )
    PartyWinInterface::Update(v5);
  KeyboardMoveProcess::Clear(&v2->m_kCharMover);
  GameFrameWork::CloseRidePetWin(v2);
  if ( ItemUpgradeWin::IsUpgradingitem(v2->m_pkItemUpgradeWin) == 1 )
  {
    v6 = TextData::Get(0xC7E4E718);
    GameFrameWork::AddSysMsg(v2, (const char *)v6);
  }
  else
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkItemUpgradeWin->vfptr);
    InventoryWin::ms_uiMode = 0;
    GameFrameWork::NcActEndOfTrade(v2);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkItemUpgradeMsgWin->vfptr);
  }
  v7 = v2->m_pkMoverUpgradeWin;
  if ( v7 && MoverUpgradeWin::IsUpgrading(v7) )
  {
    v8 = TextData3::Get(0x1D6C8675u);
    GameFrameWork::AddSysMsg(v2, (const char *)v8);
  }
  else
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkMoverUpgradeWin->vfptr);
    InventoryWin::ms_uiMode = 0;
    GameFrameWork::NcActEndOfTrade(v2);
  }
  if ( v2->m_pkKingDomQuest )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkKingDomQuest->vfptr);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkItemMixWin->vfptr);
  InventoryWin::ms_uiMode = 0;
  GameFrameWork::NcActEndOfTrade(v2);
  if ( g_pkItemInfoWin && (unsigned __int8)((int (*)(void))g_pkItemInfoWin->vfptr[65].__vecDelDtor)() )
    ((void (__stdcall *)(_DWORD))g_pkItemInfoWin->vfptr[64].__vecDelDtor)(0);
  v9 = v2->m_pkEnchantGemToolTipWin;
  if ( v9 && (unsigned __int8)((int (*)(void))v9->vfptr[65].__vecDelDtor)() )
    GameFrameWork::OnCloseEnchantGemToolTip(v2);
  ItemUseTask::InitCastingProgress();
  QuestPigeonEffect::ms_bGameStart = 1;
  GameFrameWork::ms_bGameFrameStart = 1;
  if ( !g_pkMainChar[1].m_bActionHit
    && (Char::GetClass(g_pkMainChar) == 4
     || Char::GetClass(g_pkMainChar) == 5
     || Char::GetClass(g_pkMainChar) == 9
     || Char::GetClass(g_pkMainChar) == 10
     || Char::GetClass(g_pkMainChar) == 14
     || Char::GetClass(g_pkMainChar) == 15
     || Char::GetClass(g_pkMainChar) == 19
     || Char::GetClass(g_pkMainChar) == 20
     || Char::GetClass(g_pkMainChar) == 24
     || Char::GetClass(g_pkMainChar) == 25
     || Char::GetClass(g_pkMainChar) == 27) )
  {
    if ( User::Lv(&g_kUser) < 0x78 )
      EffectMgr::CreateAttachEffect(
        &g_kEffectMgr,
        &dwDummy,
        "Aura100",
        g_pkMainChar,
        None,
        Timer::ms_fCurTime,
        1,
        1,
        0,
        1);
    else
      EffectMgr::CreateAttachEffect(
        &g_kEffectMgr,
        &dwDummy,
        "Aura120",
        g_pkMainChar,
        None,
        Timer::ms_fCurTime,
        1,
        1,
        0,
        1);
    g_pkMainChar[1].m_bActionHit = 1;
  }
  if ( v2->m_pkServerTimeWin )
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkServerTimeWin->vfptr);
  if ( v2->m_pkInventoryWin )
  {
    v10 = g_kInventory.m_aspEquip[25].m_pObject;
    if ( g_kInventory.m_aspEquip[25].m_pObject || (v10 = g_kInventory.m_aspEquip[28].m_pObject) != 0 )
    {
      v11 = v10->m_pkInfo;
      if ( v11 )
      {
        v12 = MinimonInfoTable::GetMinimonInfoByIDX(v11->InxName);
        a2 = (int)v12;
        if ( v12 )
        {
          v2->m_pkInventoryWin->m_bAutoPickEnable = v12->MinimonRole == 1;
          InventoryWin::SetAutoPickMinimon(v2->m_pkInventoryWin, v12->MinimonRole == 1);
          InventoryWin::OnAutoPickShow(v2->m_pkInventoryWin);
          v2->m_pkInventoryWin->m_bAutoUseEnable = *(_DWORD *)(a2 + 36) == 2;
          InventoryWin::OnAutoUseShow(v2->m_pkInventoryWin);
        }
      }
    }
  }
  if ( v2->m_bWelcomeMsg && v2->m_pkWelcomeMsgWin )
  {
    v13 = (char *)TextData2::Get(0xB8E6E207);
    AnnounceWin::AddText(v2->m_pkWelcomeMsgWin, a2, (int)v2, v13, &Color::m_kDxGreenColor, 1, 10.0);
    v2->m_bWelcomeMsg = 0;
  }
  v14 = World::GetMapName(&g_kWorld, &result);
  v15 = MapViewInfoTab::GetByMapName(v14);
  World::PlayBGM(&g_kWorld);
  v16 = World::GetMiniMapTexture(&g_kWorld);
  if ( v15 )
  {
    MiniMapWin::SetMapScale(v2->m_pkMiniMapWin, v15->MiniMapScale);
    MiniMapWin::SetMapViewRect(v2->m_pkMiniMapWin, v15->StartX, v15->StartY, v15->EndX, v15->EndY);
    MiniMapWin::SetMapZoomFlag(v2->m_pkMiniMapWin, v15->Enlargement != 0);
  }
  MiniMapWin::SetMapTexture(v2->m_pkMiniMapWin, v16);
  v17 = v2->m_pkTargetWin;
  if ( v17 )
    TargetWin::ReSetTOT(v17, MachineOpt::ms_kUserLoginOption.bTargetOfTerget);
  v18 = (LuaScriptMgr *)Singleton<LuaScriptMgr>::m_pInstance;
  if ( !Singleton<LuaScriptMgr>::m_pInstance )
  {
    v19 = (LuaScriptMgr *)operator new(0x14u);
    v27 = v19;
    v29 = 0;
    if ( v19 )
      LuaScriptMgr::LuaScriptMgr(v19);
    else
      v20 = 0;
    v18 = (LuaScriptMgr *)v20;
    v29 = -1;
    Singleton<LuaScriptMgr>::m_pInstance = v20;
  }
  if ( !LuaScriptMgr::GetLuaScript(v18, LUA_SCRIPT_TYPE_NEWBIE_IMPROVE) )
  {
    v21 = (LuaScriptMgr *)Singleton<LuaScriptMgr>::m_pInstance;
    if ( !Singleton<LuaScriptMgr>::m_pInstance )
    {
      v22 = (LuaScriptMgr *)operator new(0x14u);
      v27 = v22;
      v29 = 1;
      if ( v22 )
        LuaScriptMgr::LuaScriptMgr(v22);
      else
        v23 = 0;
      v21 = (LuaScriptMgr *)v23;
      v29 = -1;
      Singleton<LuaScriptMgr>::m_pInstance = v23;
    }
    if ( LuaScriptMgr::CreateLuaScript(v21, LUA_SCRIPT_TYPE_NEWBIE_IMPROVE) )
    {
      Singleton<LuaScriptMgr>::getInstance();
      LuaScriptMgr::GetLuaScript(v24, LUA_SCRIPT_TYPE_NEWBIE_IMPROVE);
    }
  }
  v25 = GuildAcademyTask::GetGuildAcademy();
  if ( (unsigned __int8)CClientGuildAcademy::AmIGuildAcademyMaster(v25) )
    GuildAcademyTask::CreateGuildacademyMasterEffect(g_pkMainChar);
  InventoryWin::SetEnableAutoArrange(v2->m_pkInventoryWin, (unsigned __int8)byte_B4FF96);
}
// A89C94: using guessed type int Singleton<LuaScriptMgr>::m_pInstance;
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8CAFF: using guessed type bool GameFrameWork::ms_bGameFrameStart;
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;
// A8EA80: using guessed type bool QuestPigeonEffect::ms_bGameStart;
// B4FF96: using guessed type char byte_B4FF96;

//----- (00496870) --------------------------------------------------------
void __thiscall GameFrameWork::OnCloseMHConfigRoomInfoWin(GameFrameWork *this)
{
  GameFrameWork *v1; // edi@1
  mhJoinWin *v2; // esi@1
  char buf; // [sp+8h] [bp-4h]@1

  v1 = this;
  v2 = this->m_pkMHJoinWin;
  ((void (__stdcall *)(_DWORD))v2->m_spEdit[0].m_pObject->vfptr[115].__vecDelDtor)(&unk_981A47);
  ((void (__stdcall *)(_DWORD))v2->m_spEdit[3].m_pObject->vfptr[115].__vecDelDtor)(&unk_981A32);
  v2->m_spCheckBox[1]->m_bCheck = 0;
  mhJoinWin::SetPassWord(v2, &pcPassWord);
  _itoa(2, &buf, 10);
  ((void (__stdcall *)(_DWORD))v2->m_spEdit[1].m_pObject->vfptr[115].__vecDelDtor)(&buf);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMHJoinWin->vfptr);
}

//----- (00496900) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenMHItemInvenWin(GameFrameWork *this)
{
  GameFrameWork::OpenMHInfoWin(this, TE_EDIT_ROOM);
}

//----- (00496910) --------------------------------------------------------
void __thiscall GameFrameWork::OnCloseMHItemInvenWin(GameFrameWork *this)
{
  GameFrameWork::OpenMHInfoWin(this, 0);
}

//----- (00496920) --------------------------------------------------------
void __thiscall GameFrameWork::SetPlayGuideSkipList(GameFrameWork *this)
{
  GameFrameWork *v1; // ebx@1
  NiTListItem<unsigned int> *v2; // esi@1
  int v3; // edi@2
  NiTListItem<unsigned int> *v4; // ST00_4@8
  PgTList<unsigned int> kSkipList; // [sp+10h] [bp-1Ch]@1
  int v6; // [sp+28h] [bp-4h]@1

  v1 = this;
  kSkipList.m_kAllocator.m_uiCount = 0;
  kSkipList.m_pkHead = 0;
  kSkipList.m_pkTail = 0;
  kSkipList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>Vtbl *)&PgTList<unsigned int>::`vftable';
  v6 = 0;
  BasicInfoLinkTab::GetSkipList(&kSkipList);
  v2 = kSkipList.m_pkHead;
  if ( kSkipList.m_pkHead )
  {
    do
    {
      v3 = v2->m_element;
      v2 = v2->m_pkNext;
      if ( v1->m_kGuideViewList._Myfirst[v3] < 0 && v1->m_bGuideViewList )
      {
        GameFrameWork::NcCharNewbieGuideViewSetCmd(v3);
        v1->m_kGuideViewList._Myfirst[v3] = v3;
      }
    }
    while ( v2 );
    v2 = kSkipList.m_pkHead;
  }
  kSkipList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>Vtbl *)&PgTList<unsigned int>::`vftable';
  v6 = 1;
  while ( v2 )
  {
    v4 = v2;
    v2 = v2->m_pkNext;
    kSkipList.vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int> *)&kSkipList, v4);
  }
}
// 981CDC: using guessed type int (__thiscall *PgTList<unsigned int>::`vftable')(void *p, char);

//----- (00496A00) --------------------------------------------------------
void __usercall GameFrameWork::OnEscape(GameFrameWork *this@<ecx>, double a2@<st0>)
{
  GameFrameWork *v2; // esi@1
  GameFrameWork::SkillCastState v3; // eax@9
  NiPoint3 *v4; // eax@11
  int v5; // esi@18
  MsgBox *v6; // edi@19
  const char *v7; // eax@19
  int v8; // edi@24
  PgWin *v9; // eax@25
  GuildNpcMenuWin *v10; // edi@30
  NpcDialogWin *v11; // ecx@31
  MoverUpgradeWin *v12; // eax@47
  ItemMixWin *v13; // eax@49
  GuildNpcMenuWin *v14; // ecx@51
  HelpWin *v15; // ecx@57
  GuildNpcMenuWin *v16; // eax@60
  GuildNpcMenuWin *v17; // ST08_4@60
  ServerMenuWin *v18; // ecx@68
  GTTSkillWin *v19; // eax@71
  GTTMiniSkillWin *v20; // eax@71
  RandomOptionWin *v21; // ecx@78
  int v22; // [sp+0h] [bp-34h]@0
  int v23; // [sp+4h] [bp-30h]@0
  int v24; // [sp+8h] [bp-2Ch]@0
  int v25; // [sp+Ch] [bp-28h]@0
  NiTList<PgWin *> kTempShowList; // [sp+10h] [bp-24h]@11
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0> > > result; // [sp+20h] [bp-14h]@11
  PgWin *pkSrcWin; // [sp+24h] [bp-10h]@25
  int v29; // [sp+30h] [bp-4h]@24

  v2 = this;
  if ( InventoryWin::ms_uiMode == 8 )
  {
    PgFrameWork::AddMsg((PgFrameWork *)&this->vfptr, 0x10Au, 0, 0);
    v2->m_bPickCancel = 0;
    return;
  }
  if ( unk_B2534C == 2 )
  {
    ItemRepairWin::CancelItemRepair(this->m_pkItemRepairWin);
    return;
  }
  if ( unk_B25350 == 2 )
  {
    InventoryWin::OnCreateNewSocket(this->m_pkInventoryWin, 0);
    return;
  }
  if ( unk_B25354 == 2 )
  {
    InventoryWin::OnResetRecoverCountState(this->m_pkInventoryWin);
    return;
  }
  v3 = this->m_kSkillCasting.eState;
  if ( v3 == 3 )
  {
    if ( !Char::GetReserveSkillSmash(g_pkMainChar) )
    {
      v4 = (NiPoint3 *)((int (__stdcall *)(int, int, int, int, NiTListBase<DFALL<PgWin *>,PgWin *>Vtbl *, NiTListItem<PgWin *> *, NiTListItem<PgWin *> *, unsigned int, std::_Tree_nod<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0> >::_Node *))g_pkMainChar->vfptr[6].Deaffect)(
                         v22,
                         v23,
                         v24,
                         v25,
                         kTempShowList.vfptr,
                         kTempShowList.m_pkHead,
                         kTempShowList.m_pkTail,
                         kTempShowList.m_kAllocator.m_uiCount,
                         result._Ptr);
      GameFrameWork::NcActStopReq(v2, v4);
      GameFrameWork::NcBatSkillbashCastabortReq(v2);
      Char::CancelSkillAction(g_pkMainChar, 1);
    }
    return;
  }
  if ( v3 == 1 )
  {
    this->m_kSkillCasting.eState = 0;
    return;
  }
  if ( unk_A9944C || mhObj )
  {
    GameFrameWork::MHObjFocusCancel();
    return;
  }
  if ( nowState == 2 && this->m_pkMHRepairWin )
  {
    GameFrameWork::OpenMHRepairWin(this, 0, 0);
    v5 = unk_B64830;
    while ( v5 )
    {
      v6 = *(MsgBox **)(v5 + 8);
      v7 = v6->m_pcName;
      v5 = *(_DWORD *)v5;
      if ( v7 && !strncmp(v7, "MsgBox", 6u) )
        MsgBox::CloseWithCancel(v6);
    }
    return;
  }
  kTempShowList.m_kAllocator.m_uiCount = 0;
  kTempShowList.m_pkHead = 0;
  kTempShowList.m_pkTail = 0;
  kTempShowList.vfptr = (NiTListBase<DFALL<PgWin *>,PgWin *>Vtbl *)&NiTList<PgWin *>::`vftable';
  v8 = unk_B64830;
  v29 = 0;
  if ( unk_B64830 )
  {
    do
    {
      v9 = *(PgWin **)(v8 + 8);
      v8 = *(_DWORD *)v8;
      pkSrcWin = v9;
      if ( std::_Tree<std::_Tset_traits<Effect *,std::less<Effect *>,std::allocator<Effect *>,0>>::find(
             (std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0> > *)&v2->m_setEscapeHide.comp,
             &result,
             &pkSrcWin)->_Ptr != v2->m_setEscapeHide._Myhead )
        NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&kTempShowList,
          (NiD3DXEffectParameter *const *)&pkSrcWin);
    }
    while ( v8 );
    if ( kTempShowList.m_kAllocator.m_uiCount > 0 )
    {
      if ( v2->m_bEscapeKeyPriority )
      {
        v10 = (GuildNpcMenuWin *)kTempShowList.m_pkTail->m_element;
        if ( v10 )
        {
          v11 = v2->m_pkNpcDlgWin;
          if ( (NpcDialogWin *)v10 == v11 )
          {
            NpcDialogWin::CloseDialog(v11);
            v29 = -1;
            NiTList<PgWin *>::~NiTList<PgWin *>(&kTempShowList);
            return;
          }
          if ( v10 == (GuildNpcMenuWin *)v2->m_pkItemShopWin )
          {
            GameFrameWork::NcActEndOfTrade(v2);
            PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkItemShopWin->vfptr);
            InventoryWin::ms_uiMode = 0;
            v29 = -1;
            NiTList<PgWin *>::~NiTList<PgWin *>(&kTempShowList);
            return;
          }
          if ( v10 == (GuildNpcMenuWin *)v2->m_pkItemShopWin2 )
          {
            GameFrameWork::CloseItemShopWin(v2);
            v29 = -1;
            NiTList<PgWin *>::~NiTList<PgWin *>(&kTempShowList);
            return;
          }
          if ( v10 == (GuildNpcMenuWin *)v2->m_pkKingDomQuest )
          {
            GameFrameWork::CloseKDQuestWin(v2);
            v29 = -1;
            NiTList<PgWin *>::~NiTList<PgWin *>(&kTempShowList);
            return;
          }
          if ( v10 == (GuildNpcMenuWin *)v2->m_pkNPCSkillWin )
          {
            GameFrameWork::CloseSkillShopMenu(v2);
            v29 = -1;
            NiTList<PgWin *>::~NiTList<PgWin *>(&kTempShowList);
            return;
          }
          if ( v10 != (GuildNpcMenuWin *)v2->m_pkExpeditionWin && v10 != (GuildNpcMenuWin *)v2->m_pkPartyLootSetupWin )
          {
            if ( v10 == (GuildNpcMenuWin *)v2->m_pkNPCSoulWin )
            {
              GameFrameWork::CloseSoulStoneShopMenu(v2);
              v29 = -1;
              NiTList<PgWin *>::~NiTList<PgWin *>(&kTempShowList);
              return;
            }
            if ( v10 == (GuildNpcMenuWin *)v2->m_pkItemUpgradeWin )
            {
              GameFrameWork::CloseItemUpgradeWin(v2, 1);
              v29 = -1;
              NiTList<PgWin *>::~NiTList<PgWin *>(&kTempShowList);
              return;
            }
            v12 = v2->m_pkMoverUpgradeWin;
            if ( (MoverUpgradeWin *)v10 == v12 )
            {
              v12->m_pkMsgBox = 0;
              GameFrameWork::CloseMoverUpgradeWin(v2, 1);
              v29 = -1;
              NiTList<PgWin *>::~NiTList<PgWin *>(&kTempShowList);
              return;
            }
            v13 = v2->m_pkItemMixWin;
            if ( (ItemMixWin *)v10 == v13 )
            {
              v13->m_pkMsgBox = 0;
              PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkItemMixWin->vfptr);
              InventoryWin::ms_uiMode = 0;
              GameFrameWork::NcActEndOfTrade(v2);
              v29 = -1;
              NiTList<PgWin *>::~NiTList<PgWin *>(&kTempShowList);
              return;
            }
            v14 = (GuildNpcMenuWin *)v2->m_pkItemLinkInfoWin;
            if ( v10 == v14 )
            {
              if ( v14 && (unsigned __int8)((int (*)(void))v14->vfptr[65].__vecDelDtor)() == 1 )
                PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkItemLinkInfoWin->vfptr);
              goto LABEL_83;
            }
            if ( v10 == (GuildNpcMenuWin *)v2->m_pkStorageWin )
            {
              GameFrameWork::CloseStorageMenu(v2);
              v29 = -1;
              NiTList<PgWin *>::~NiTList<PgWin *>(&kTempShowList);
              return;
            }
            v15 = v2->m_pkHelpWin;
            if ( (HelpWin *)v10 == v15 )
            {
              HelpWin::OnWinClose(v15);
              v29 = -1;
              NiTList<PgWin *>::~NiTList<PgWin *>(&kTempShowList);
              return;
            }
            if ( v10 == GuildTask::GetGuildNpcMenuWin() )
            {
              v16 = GuildTask::GetGuildNpcMenuWin();
              GuildNpcMenuWin::Close(v16);
              v17 = GuildTask::GetGuildNpcMenuWin();
              PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v17->vfptr);
LABEL_83:
              v29 = -1;
              NiTList<PgWin *>::~NiTList<PgWin *>(&kTempShowList);
              return;
            }
            if ( v10 == (GuildNpcMenuWin *)v2->m_pkWingStoneWin )
            {
              GameFrameWork::CloseWingStoneWin(v2);
              v29 = -1;
              NiTList<PgWin *>::~NiTList<PgWin *>(&kTempShowList);
              return;
            }
            if ( v10 != (GuildNpcMenuWin *)v2->m_pkWingStoneMapWin )
            {
              if ( v10 == (GuildNpcMenuWin *)v2->m_pkShopWin )
              {
                GameFrameWork::OnOpenItemShopWin(v2);
                v29 = -1;
                NiTList<PgWin *>::~NiTList<PgWin *>(&kTempShowList);
                return;
              }
              if ( v10 == (GuildNpcMenuWin *)v2->m_pkForumWin )
              {
                GameFrameWork::OnOpenForumWin(v2);
                v29 = -1;
                NiTList<PgWin *>::~NiTList<PgWin *>(&kTempShowList);
                return;
              }
              v18 = v2->m_pkServerMenuWin;
              if ( (ServerMenuWin *)v10 == v18 )
              {
                ServerMenuWin::OnBut2(v18);
                v29 = -1;
                NiTList<PgWin *>::~NiTList<PgWin *>(&kTempShowList);
                return;
              }
              if ( (GTTSkillWin *)v10 == GuildTask::GetGTTSkillWin() )
              {
                v19 = GuildTask::GetGTTSkillWin();
                PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v19->vfptr);
                v20 = GuildTask::GetGTTMiniSkillWin();
                PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v20->vfptr);
                v29 = -1;
                NiTList<PgWin *>::~NiTList<PgWin *>(&kTempShowList);
                return;
              }
              if ( v10 == (GuildNpcMenuWin *)v2->m_pkMHJoinWin )
              {
                GameFrameWork::OnCloseMHConfigRoomInfoWin(v2);
                v29 = -1;
                NiTList<PgWin *>::~NiTList<PgWin *>(&kTempShowList);
                return;
              }
              if ( v10 == (GuildNpcMenuWin *)v2->m_pkCollectCardWin[0]
                || v10 == (GuildNpcMenuWin *)v2->m_pkCollectCardWin[1]
                || v10 == (GuildNpcMenuWin *)v2->m_pkCollectCardWin[2]
                || v10 == (GuildNpcMenuWin *)v2->m_pkCollectCardWin[3] )
              {
                if ( GameFrameWork::IsPlayCardOpen(v2, a2) )
                  goto LABEL_83;
                CollectCardWin::Reset((CollectCardWin *)v10);
              }
              else
              {
                v21 = v2->m_pkRandomOptionWin;
                if ( (RandomOptionWin *)v10 == v21 )
                {
                  RandomOptionWin::OnCancel(v21);
                  v29 = -1;
                  NiTList<PgWin *>::~NiTList<PgWin *>(&kTempShowList);
                  return;
                }
              }
            }
          }
          PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v10->vfptr);
          goto LABEL_83;
        }
      }
    }
  }
  if ( !GameFrameWork::CancelCharSelect() && v2->m_bEscapeKeyPriority )
    GameFrameWork::OnOpenSystemWin(v2);
  v29 = -1;
  NiTList<PgWin *>::~NiTList<PgWin *>(&kTempShowList);
}
// 981CEC: using guessed type int (__thiscall *NiTList<PgWin *>::`vftable')(void *p, char);
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (00497140) --------------------------------------------------------
char __thiscall GameFrameWork::OpenPetDialog(GameFrameWork *this, unsigned __int16 kPetHandle, Name4 kPetName)
{
  void *v3; // esi@1
  Char *v4; // eax@1
  ScriptBtn *v5; // edi@4
  NiExtraData *v6; // eax@5
  NiExtraData *v7; // eax@6
  NiExtraData *v8; // eax@8
  NiExtraData *v9; // esi@8
  NiUnsharedGeometryGroup *v10; // eax@11
  NiExtraData *v11; // eax@11
  ScriptBtn *v12; // edi@13
  NiStringExtraData *v13; // eax@14
  NiExtraData *v14; // eax@15
  NiExtraData *v15; // eax@17
  NiExtraData *v16; // esi@17
  NiUnsharedGeometryGroup *v17; // eax@20
  NiD3DXEffectParameter *v18; // eax@20
  NpcDialogWin *v19; // ecx@22
  char *v20; // eax@22
  char result; // al@22
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v22; // [sp-2Ch] [bp-84h]@11
  int v23; // [sp-10h] [bp-68h]@11
  NiExtraData *v24; // [sp-Ch] [bp-64h]@11
  NiExtraData *v25; // [sp-8h] [bp-60h]@11
  NiExtraData *v26; // [sp-4h] [bp-5Ch]@11
  PupMain *pkPetMain; // [sp+10h] [bp-48h]@2
  NiTList<ScriptBtn *> kScriptBtnList; // [sp+14h] [bp-44h]@4
  _DWORD *v29; // [sp+24h] [bp-34h]@8
  _DWORD *v30; // [sp+28h] [bp-30h]@4
  NiD3DXEffectParameter *element; // [sp+2Ch] [bp-2Ch]@1
  NiExtraData *pkAction; // [sp+30h] [bp-28h]@5
  char acName[17]; // [sp+34h] [bp-24h]@22
  int v34; // [sp+54h] [bp-4h]@4

  v3 = this;
  element = (NiD3DXEffectParameter *)this;
  v4 = CharMgr::GetChar(&g_kCharMgr, kPetHandle);
  if ( v4 && (pkPetMain = PetMainTab::GetByPetID((unsigned int)v4[1].vfptr)) != 0 && *((_DWORD *)v3 + 242) )
  {
    kScriptBtnList.m_kAllocator.m_uiCount = 0;
    kScriptBtnList.m_pkHead = 0;
    kScriptBtnList.m_pkTail = 0;
    kScriptBtnList.vfptr = (NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *>Vtbl *)&NiTList<ScriptBtn *>::`vftable';
    v34 = 0;
    v5 = (ScriptBtn *)operator new(0x2Cu);
    v30 = v5;
    LOBYTE(v34) = 1;
    if ( v5 )
    {
      v6 = (NiExtraData *)operator new(0x10u);
      pkAction = v6;
      LOBYTE(v34) = 2;
      if ( v6 )
      {
        NiStringExtraData::NiStringExtraData((NiStringExtraData *)v6, "PetSetName");
        pkAction = v7;
      }
      else
      {
        pkAction = 0;
      }
      v8 = (NiExtraData *)operator new(0x10u);
      v9 = v8;
      v29 = v8;
      LOBYTE(v34) = 3;
      if ( v8 )
      {
        NiExtraData::NiExtraData(v8);
        v9->vfptr = (NiRefObjectVtbl *)&NiIntegerExtraData::`vftable';
        v9[1].vfptr = 0;
      }
      else
      {
        v9 = 0;
      }
      v26 = 0;
      v25 = pkAction;
      v24 = v9;
      v23 = 0;
      LOBYTE(v34) = 1;
      v10 = TextData3::Get(0x6EEAF3F3u);
      v29 = &v22;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &v22,
        (const char *)v10);
      ScriptBtn::ScriptBtn(v5, v22, v23, v24, v25, v26);
      v3 = element;
    }
    else
    {
      v11 = 0;
    }
    LOBYTE(v34) = 0;
    pkAction = v11;
    NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&kScriptBtnList,
      (NiD3DXEffectParameter *const *)&pkAction);
    v12 = (ScriptBtn *)operator new(0x2Cu);
    v29 = v12;
    LOBYTE(v34) = 4;
    if ( v12 )
    {
      v13 = (NiStringExtraData *)operator new(0x10u);
      v30 = v13;
      LOBYTE(v34) = 5;
      if ( v13 )
      {
        NiStringExtraData::NiStringExtraData(v13, "PetSetNameCancel");
        pkAction = v14;
      }
      else
      {
        pkAction = 0;
      }
      LOBYTE(v34) = 4;
      v15 = (NiExtraData *)operator new(0x10u);
      v16 = v15;
      v30 = v15;
      LOBYTE(v34) = 6;
      if ( v15 )
      {
        NiExtraData::NiExtraData(v15);
        v16->vfptr = (NiRefObjectVtbl *)&NiIntegerExtraData::`vftable';
        v16[1].vfptr = 0;
      }
      else
      {
        v16 = 0;
      }
      v26 = 0;
      v25 = pkAction;
      v24 = v16;
      v23 = 0;
      LOBYTE(v34) = 4;
      v17 = TextData3::Get(0xBC2C2C36);
      v30 = &v22;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &v22,
        (const char *)v17);
      ScriptBtn::ScriptBtn(v12, v22, v23, v24, v25, v26);
      v3 = element;
    }
    else
    {
      v18 = 0;
    }
    element = v18;
    LOBYTE(v34) = 0;
    NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&kScriptBtnList,
      &element);
    *(Name4 *)acName = kPetName;
    v19 = (NpcDialogWin *)*((_DWORD *)v3 + 242);
    acName[16] = 0;
    NpcDialogWin::CloseDialog(v19);
    v26 = (NiExtraData *)&kScriptBtnList;
    v25 = (NiExtraData *)acName;
    v20 = (char *)TextData3::Get(0x837B6C8E);
    v25 = (NiExtraData *)fs(v20, v25);
    v24 = (NiExtraData *)pkPetMain->PupIDX;
    NpcDialogWin::OpenNpcScriptDialog(
      *((NpcDialogWin **)v3 + 242),
      pkPetMain->PupIDX,
      (char *)v25,
      (NiTList<ScriptBtn *> *)v26);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, *((PgWin **)v3 + 242));
    v34 = -1;
    NiTList<ScriptBtn *>::~NiTList<ScriptBtn *>(&kScriptBtnList);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 981C24: using guessed type int (__thiscall *NiIntegerExtraData::`vftable')(void *p, char);
// 981CFC: using guessed type int (__thiscall *NiTList<ScriptBtn *>::`vftable')(void *p, char);

//----- (004973D0) --------------------------------------------------------
void __thiscall GameFrameWork::SendMHBuildingOrFixReq(GameFrameWork *this, unsigned int uiwParam)
{
  GameFrameWork *v2; // ebx@1
  char *v3; // eax@2
  ProcessingString *v4; // esi@2
  NiUnsharedGeometryGroup *v5; // eax@3
  char *v6; // eax@4
  ProcessingString *v7; // esi@4
  const char *v8; // eax@5
  char v9; // al@5
  mhJoinWin *v10; // ecx@5
  unsigned int v11; // eax@5
  NiRefObjectVtbl *v12; // edx@5
  char *v13; // eax@5
  NiRefObjectVtbl *v14; // edx@5
  char *v15; // eax@5
  unsigned int v16; // eax@5
  NiRefObjectVtbl *v17; // edx@5
  char *v18; // eax@5
  char *v19; // eax@5
  char v20; // cl@6
  NiUnsharedGeometryGroup *v21; // eax@8
  char *v22; // edx@8
  char v23; // cl@9
  const char *v24; // eax@12
  PgNet *v25; // ecx@13
  NiUnsharedGeometryGroup *v26; // eax@15
  int (*v27)(void); // eax@17
  const char *v28; // eax@17
  NiRefObjectVtbl *v29; // edx@17
  char *v30; // eax@17
  NiRefObjectVtbl *v31; // edx@17
  char *v32; // eax@17
  char *v33; // eax@17
  ProcessingString *v34; // esi@17
  PROTO_NC_MINIHOUSE_MODIFY_TITLE_REQ *v35; // eax@18
  char v36; // cl@19
  NiUnsharedGeometryGroup *v37; // eax@21
  char *v38; // edx@21
  char v39; // cl@22
  mhInfoWin *v40; // eax@23
  int v41; // eax@24
  const char *v42; // esi@28
  const char *v43; // esi@30
  const char *v44; // eax@30
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v45; // ecx@30
  PgNet *v46; // ecx@35
  int v47; // eax@38
  const char *v48; // esi@43
  mhInfoWin *v49; // eax@43
  char *v50; // eax@47
  int v51; // edx@47
  char v52; // cl@48
  bool v53; // zf@49
  const char *v54; // esi@51
  char *v55; // eax@53
  ProcessingString *v56; // esi@53
  NiRefObjectVtbl *v57; // edx@54
  char *v58; // eax@54
  PgNet *v59; // ecx@54
  unsigned int v60; // kr1C_4@54
  ColumnBut *v61; // edx@55
  char v62; // al@56
  PgNet *v63; // ecx@56
  PROTO_NC_MINIHOUSE_BUILDING_REQ v64; // [sp-88h] [bp-17Ch]@13
  void *v65; // [sp-8h] [bp-FCh]@13
  unsigned int v66; // [sp-4h] [bp-F8h]@5
  PROTO_NC_MINIHOUSE_MODIFY_ITEM_INFO_OPEN_REQ pkProto; // [sp+16h] [bp-DEh]@32
  PROTO_NC_MINIHOUSE_MODIFY_MAXENTERNUM_REQ kProtoMaxNum; // [sp+17h] [bp-DDh]@17
  NETCOMMAND netcmd; // [sp+18h] [bp-DCh]@1
  char temp[128]; // [sp+1Ch] [bp-D8h]@2
  char v71; // [sp+A0h] [bp-54h]@13
  PROTO_NC_MINIHOUSE_MODIFY_TITLE_REQ kProtoTitle; // [sp+A4h] [bp-50h]@17
  PROTO_NC_MINIHOUSE_MODIFY_PASSWORD_REQ kProtoPassWord; // [sp+BCh] [bp-38h]@17
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Right; // [sp+C8h] [bp-2Ch]@30
  int v75; // [sp+F0h] [bp-4h]@30

  netcmd.protocol = netcmd.protocol & 0x3FF | 0x8C00;
  v2 = this;
  if ( nowState )
  {
    if ( (signed int)nowState < 0 )
      return;
    qmemcpy(temp, &unk_A994AC, 0x84u);
    *(_DWORD *)&kProtoTitle.title[0] = 0;
    *(_DWORD *)&kProtoTitle.title[4] = 0;
    *(_DWORD *)&kProtoTitle.title[8] = 0;
    *(_DWORD *)&kProtoTitle.title[12] = 0;
    *(_DWORD *)&kProtoTitle.title[16] = 0;
    kProtoTitle.title[20] = 0;
    *(_DWORD *)&kProtoPassWord.password[0] = 0;
    *(_DWORD *)&kProtoPassWord.password[4] = 0;
    kProtoPassWord.password[8] = 0;
    v27 = (int (*)(void))this->m_pkMHSettingWin->m_spEdit[1].m_pObject->vfptr[113].__vecDelDtor;
    v71 = *((_BYTE *)&unk_A994AC + 132);
    v28 = (const char *)v27();
    kProtoMaxNum.maxvisiter = atoi(v28);
    v29 = v2->m_pkMHSettingWin->m_spEdit[0].m_pObject->vfptr;
    v66 = strlen((const char *)((int (*)(void))v2->m_pkMHSettingWin->m_spEdit[0].m_pObject->vfptr[113].__vecDelDtor)());
    v30 = (char *)((int (*)(void))v29[113].__vecDelDtor)();
    strncpy(kProtoTitle.title, v30, v66);
    v31 = v2->m_pkMHSettingWin->m_spEdit[2].m_pObject->vfptr;
    v66 = strlen((const char *)((int (*)(void))v2->m_pkMHSettingWin->m_spEdit[2].m_pObject->vfptr[113].__vecDelDtor)());
    v32 = (char *)((int (*)(void))v31[113].__vecDelDtor)();
    strncpy(kProtoPassWord.password, v32, v66);
    v33 = (char *)((int (*)(void))v2->m_pkMHSettingWin->m_spEdit[0].m_pObject->vfptr[113].__vecDelDtor)();
    v34 = TextFilterTable::FilterSlander(v33);
    if ( strcmp(
           (const char *)((int (*)(void))v2->m_pkMHSettingWin->m_spEdit[0].m_pObject->vfptr[113].__vecDelDtor)(),
           v34->m_acSource) )
    {
      goto LABEL_3;
    }
    v35 = &kProtoTitle;
    do
    {
      v36 = v35->title[0];
      v35 = (PROTO_NC_MINIHOUSE_MODIFY_TITLE_REQ *)((char *)v35 + 1);
    }
    while ( v36 );
    if ( (char *)v35 == &kProtoTitle.title[1] )
    {
      v37 = TextData2::Get(0xF54A3532);
      v38 = (char *)((char *)&kProtoTitle - (char *)v37);
      do
      {
        v39 = (char)v37->vfptr;
        v38[(_DWORD)v37] = (char)v37->vfptr;
        v37 = (NiUnsharedGeometryGroup *)((char *)v37 + 1);
      }
      while ( v39 );
    }
    v40 = v2->m_pkMHInfoWin;
    netcmd.protocol = netcmd.protocol & 0xFC2E | 0x2E;
    if ( v40->m_FullTitleName._Mysize )
    {
      v41 = (int)&v40->m_FullTitleName;
      if ( *(_DWORD *)(v41 + 20) >= 0x10u )
        v41 = *(_DWORD *)v41;
    }
    else
    {
      v41 = ((int (__thiscall *)(PgWinText *))v40->m_pkTextFieldWin[1]->vfptr[121].__vecDelDtor)(v40->m_pkTextFieldWin[1]);
    }
    if ( !v41
      || (v42 = (const char *)((int (*)(void))v2->m_pkMHSettingWin->m_spEdit[0].m_pObject->vfptr[113].__vecDelDtor)(),
          strcmp(mhInfoWin::GetTitle(v2->m_pkMHInfoWin), v42)) )
    {
      PgNet::AddNetMsg((PgNet *)&v2->m_spZoneNet.m_pObject->vfptr, &netcmd, 2);
      PgNet::SendNetMsg((PgNet *)&v2->m_spZoneNet.m_pObject->vfptr, &kProtoTitle, 21);
      Sleep(2u);
    }
    v43 = (const char *)((int (*)(void))v2->m_pkMHSettingWin->m_spEdit[2].m_pObject->vfptr[113].__vecDelDtor)();
    _Right._Myres = 15;
    _Right._Mysize = 0;
    _Right._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Right, v43, strlen(v43));
    v44 = _Right._Bx._Ptr;
    v45 = &v2->m_pkMHInfoWin->m_PassWord;
    v75 = 0;
    if ( _Right._Myres < 0x10 )
      v44 = (const char *)&_Right;
    pkProto.bItemInfoClose = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
                               v45,
                               0,
                               v45->_Mysize,
                               v44,
                               _Right._Mysize) != 0;
    v75 = -1;
    if ( _Right._Myres >= 0x10 )
      operator delete(_Right._Bx._Ptr);
    if ( pkProto.bItemInfoClose )
    {
      v46 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
      netcmd.protocol = netcmd.protocol & 0xFC2B | 0x2B;
      PgNet::AddNetMsg(v46, &netcmd, 2);
      PgNet::SendNetMsg((PgNet *)&v2->m_spZoneNet.m_pObject->vfptr, &kProtoPassWord, 9);
      Sleep(2u);
    }
    if ( kProtoMaxNum.maxvisiter == temp[0] )
    {
LABEL_43:
      v48 = (const char *)((int (*)(void))v2->m_pkMHSettingWin->m_spEdit[2].m_pObject->vfptr[113].__vecDelDtor)();
      _Right._Myres = 15;
      _Right._Mysize = 0;
      _Right._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Right, v48, strlen(v48));
      v49 = v2->m_pkMHInfoWin;
      v75 = 1;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v49->m_PassWord,
        &_Right,
        0,
        0xFFFFFFFF);
      v75 = -1;
      if ( _Right._Myres >= 0x10 )
        operator delete(_Right._Bx._Ptr);
      if ( ((int (*)(void))v2->m_pkMHInfoWin->m_pkTextFieldWin[3]->vfptr[121].__vecDelDtor)() )
      {
        if ( !((int (*)(void))v2->m_pkMHSettingWin->m_spEdit[3].m_pObject->vfptr[113].__vecDelDtor)() )
          goto LABEL_53;
        v54 = (const char *)((int (*)(void))v2->m_pkMHInfoWin->m_pkTextFieldWin[3]->vfptr[121].__vecDelDtor)();
        v53 = strcmp(
                (const char *)((int (*)(void))v2->m_pkMHSettingWin->m_spEdit[3].m_pObject->vfptr[113].__vecDelDtor)(),
                v54) == 0;
      }
      else
      {
        if ( !((int (*)(void))v2->m_pkMHSettingWin->m_spEdit[3].m_pObject->vfptr[113].__vecDelDtor)() )
          goto LABEL_55;
        v50 = (char *)((int (*)(void))v2->m_pkMHSettingWin->m_spEdit[3].m_pObject->vfptr[113].__vecDelDtor)();
        v51 = (int)(v50 + 1);
        do
          v52 = *v50++;
        while ( v52 );
        v53 = v50 == (char *)v51;
      }
      if ( v53 )
        goto LABEL_55;
LABEL_53:
      v55 = (char *)((int (*)(void))v2->m_pkMHSettingWin->m_spEdit[3].m_pObject->vfptr[113].__vecDelDtor)();
      v56 = TextFilterTable::FilterSlander(v55);
      if ( !strcmp(
              (const char *)((int (*)(void))v2->m_pkMHSettingWin->m_spEdit[3].m_pObject->vfptr[113].__vecDelDtor)(),
              v56->m_acSource) )
      {
        memset(&temp[4], 0, 0x80u);
        temp[4] = strlen((const char *)((int (*)(void))v2->m_pkMHSettingWin->m_spEdit[3].m_pObject->vfptr[113].__vecDelDtor)());
        v57 = v2->m_pkMHSettingWin->m_spEdit[3].m_pObject->vfptr;
        v66 = strlen((const char *)((int (*)(void))v2->m_pkMHSettingWin->m_spEdit[3].m_pObject->vfptr[113].__vecDelDtor)());
        v58 = (char *)((int (*)(void))v57[113].__vecDelDtor)();
        strncpy(&temp[5], v58, v66);
        v59 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
        netcmd.protocol = netcmd.protocol & 0xFC48 | 0x48;
        PgNet::AddNetMsg(v59, &netcmd, 2);
        v60 = strlen((const char *)((int (*)(void))v2->m_pkMHSettingWin->m_spEdit[3].m_pObject->vfptr[113].__vecDelDtor)());
        PgNet::SendNetMsg((PgNet *)&v2->m_spZoneNet.m_pObject->vfptr, &temp[4], v60 + 1);
        Sleep(2u);
LABEL_55:
        v61 = v2->m_pkMHSettingWin->m_spCheckBox[1];
        if ( v2->m_pkMHInfoWin->m_bItemView != v61->m_bCheck )
        {
          v62 = v61->m_bCheck;
          v66 = 2;
          netcmd.protocol = netcmd.protocol & 0xFC43 | 0x43;
          v63 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
          pkProto.bItemInfoClose = v62;
          PgNet::AddNetMsg(v63, &netcmd, 2);
          PgNet::SendNetMsg((PgNet *)&v2->m_spZoneNet.m_pObject->vfptr, &pkProto, 1);
          Sleep(2u);
        }
        return;
      }
LABEL_3:
      v5 = TextData::Get(0x24663F86u);
      GameFrameWork::AddSysMsg(v2, (const char *)v5);
      return;
    }
    netcmd.protocol = netcmd.protocol & 0xFC32 | 0x32;
    if ( (unsigned __int8)kProtoMaxNum.maxvisiter <= 0xFu )
    {
      if ( (unsigned __int8)kProtoMaxNum.maxvisiter >= 2u )
      {
LABEL_42:
        PgNet::AddNetMsg((PgNet *)&v2->m_spZoneNet.m_pObject->vfptr, &netcmd, 2);
        PgNet::SendNetMsg((PgNet *)&v2->m_spZoneNet.m_pObject->vfptr, &kProtoMaxNum, 1);
        Sleep(2u);
        goto LABEL_43;
      }
      v47 = v2->m_pkMHInfoWin->m_MaxPersonCount;
    }
    else
    {
      v47 = v2->m_pkMHInfoWin->m_MaxPersonCount;
    }
    kProtoMaxNum.maxvisiter = v47;
    goto LABEL_42;
  }
  netcmd.protocol = netcmd.protocol & 0xFC03 | 3;
  PgNet::AddNetMsg((PgNet *)&this->m_spZoneNet.m_pObject->vfptr, &netcmd, 2);
  *(_DWORD *)&temp[10] = 0;
  *(_DWORD *)&temp[14] = 0;
  *(_DWORD *)&temp[18] = 0;
  *(_DWORD *)&temp[22] = 0;
  *(_DWORD *)&temp[26] = 0;
  temp[30] = 0;
  *(_DWORD *)&temp[1] = 0;
  *(_DWORD *)&temp[5] = 0;
  temp[9] = 0;
  memset(&temp[32], 0, 0x65u);
  v3 = (char *)((int (*)(void))v2->m_pkMHJoinWin->m_spEdit[0].m_pObject->vfptr[113].__vecDelDtor)();
  v4 = TextFilterTable::FilterSlander(v3);
  if ( strcmp(
         (const char *)((int (*)(void))v2->m_pkMHJoinWin->m_spEdit[0].m_pObject->vfptr[113].__vecDelDtor)(),
         v4->m_acSource) )
  {
    goto LABEL_3;
  }
  v6 = (char *)((int (*)(void))v2->m_pkMHJoinWin->m_spEdit[3].m_pObject->vfptr[113].__vecDelDtor)();
  v7 = TextFilterTable::FilterSlander(v6);
  if ( strcmp(
         (const char *)((int (*)(void))v2->m_pkMHJoinWin->m_spEdit[3].m_pObject->vfptr[113].__vecDelDtor)(),
         v7->m_acSource) )
  {
    goto LABEL_3;
  }
  v8 = (const char *)((int (*)(void))v2->m_pkMHJoinWin->m_spEdit[1].m_pObject->vfptr[113].__vecDelDtor)();
  v9 = atoi(v8);
  v10 = v2->m_pkMHJoinWin;
  temp[0] = v9;
  v11 = strlen((const char *)((int (*)(void))v10->m_spEdit[0].m_pObject->vfptr[113].__vecDelDtor)());
  v12 = v2->m_pkMHJoinWin->m_spEdit[0].m_pObject->vfptr;
  v66 = v11;
  v13 = (char *)((int (*)(void))v12[113].__vecDelDtor)();
  strncpy(&temp[10], v13, v66);
  v14 = v2->m_pkMHJoinWin->m_spEdit[2].m_pObject->vfptr;
  v66 = strlen((const char *)((int (*)(void))v2->m_pkMHJoinWin->m_spEdit[2].m_pObject->vfptr[113].__vecDelDtor)());
  v15 = (char *)((int (*)(void))v14[113].__vecDelDtor)();
  strncpy(&temp[1], v15, v66);
  v16 = strlen((const char *)((int (*)(void))v2->m_pkMHJoinWin->m_spEdit[3].m_pObject->vfptr[113].__vecDelDtor)());
  v17 = v2->m_pkMHJoinWin->m_spEdit[3].m_pObject->vfptr;
  v66 = v16;
  v18 = (char *)((int (*)(void))v17[113].__vecDelDtor)();
  strncpy(&temp[32], v18, v66);
  v19 = &temp[10];
  do
    v20 = *v19++;
  while ( v20 );
  if ( v19 == &temp[11] )
  {
    v21 = TextData2::Get(0xF54A3532);
    v22 = (char *)(&temp[10] - (char *)v21);
    do
    {
      v23 = (char)v21->vfptr;
      v22[(_DWORD)v21] = (char)v21->vfptr;
      v21 = (NiUnsharedGeometryGroup *)((char *)v21 + 1);
    }
    while ( v23 );
    ((void (__stdcall *)(char *))v2->m_pkMHJoinWin->m_spEdit[0].m_pObject->vfptr[115].__vecDelDtor)(&temp[10]);
  }
  if ( !temp[0] )
  {
    mhJoinWin::SetMaxPerson(v2->m_pkMHJoinWin, 2);
    v24 = (const char *)((int (*)(void))v2->m_pkMHJoinWin->m_spEdit[1].m_pObject->vfptr[113].__vecDelDtor)();
    temp[0] = atoi(v24);
LABEL_13:
    temp[31] = v2->m_pkMHJoinWin->m_spCheckBox[1]->m_bCheck;
    qmemcpy(&v64, temp, 0x84u);
    LOBYTE(v66) = v71;
    MiniHouseIndoor::SetBuildingRoomInfo(&g_kWorld.m_MiniHouseIndoorMode, v64);
    v66 = 133;
    v65 = temp;
    PgNet::SendNetMsg((PgNet *)&v2->m_spZoneNet.m_pObject->vfptr, temp, 133);
    unk_A99590 = 1;
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkMHJoinWin->vfptr);
    v66 = 2;
    v65 = &netcmd;
    v25 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
    netcmd.protocol = netcmd.protocol & 0xFC03 | 3;
    PgNet::AddNetMsg(v25, &netcmd, 2);
    return;
  }
  if ( temp[0] <= 0xFu )
    goto LABEL_13;
  mhJoinWin::SetMaxPerson(v2->m_pkMHJoinWin, 15);
  temp[0] = mhJoinWin::GetMaxPerson(v2->m_pkMHJoinWin);
  v26 = TextData2::Get(0x5A8C7393u);
  GameFrameWork::AddSysMsg(v2, (const char *)v26);
}

//----- (00497EE0) --------------------------------------------------------
void __thiscall GameFrameWork::OpenCollectPopupWin(GameFrameWork *this, unsigned int uiCardID)
{
  GameFrameWork *v2; // ebx@1
  CollectWin *v3; // ecx@2
  int v4; // esi@2
  int v5; // edi@2
  int v6; // ebx@2
  std::vector<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo> > *v7; // ST10_4@2
  CollectWin::sRewardInfo *v8; // ecx@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v9; // ebx@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v10; // esi@6
  NiUnsharedGeometryGroup *v11; // eax@6
  bool v12; // zf@7
  int v13; // eax@8
  unsigned int v14; // edi@9
  unsigned int v15; // esi@11
  char *v16; // eax@12
  int v17; // ebx@15
  unsigned int v18; // esi@17
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v19; // edi@20
  CollectPopupWin *v20; // esi@22
  const char *v21; // eax@24
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v22; // edi@26
  NiUnsharedGeometryGroup *v23; // esi@26
  std::vector<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo> > kRewardInfos; // [sp+10h] [bp-80h]@2
  CollectWin::sRewardInfo *v25; // [sp+20h] [bp-70h]@3
  SoundIndex rkIndex; // [sp+24h] [bp-6Ch]@3
  GameFrameWork *v27; // [sp+2Ch] [bp-64h]@1
  unsigned int uiTextCount; // [sp+30h] [bp-60h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kText[2]; // [sp+34h] [bp-5Ch]@2
  unsigned int uiRegistCount[5]; // [sp+6Ch] [bp-24h]@2
  int v31; // [sp+8Ch] [bp-4h]@2

  v2 = this;
  v27 = this;
  if ( this->m_pkCollectWin )
  {
    `eh vector constructor iterator'(
      kText,
      0x1Cu,
      2,
      (void (__thiscall *)(void *))std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    v3 = v2->m_pkCollectWin;
    v31 = 0;
    uiTextCount = 0;
    v4 = CollectWin::GetRegistCountByGrade(v3, 0);
    v5 = CollectWin::GetRegistCountByGrade(v2->m_pkCollectWin, 1u);
    v6 = CollectWin::GetRegistCountByGrade(v2->m_pkCollectWin, 2u);
    uiRegistCount[4] = CollectWin::GetRegistCountByGrade(v27->m_pkCollectWin, 3u);
    v7 = &v27->m_pkCollectWin->m_kRewardInfos;
    uiRegistCount[0] = 4 * v4;
    uiRegistCount[1] = v4;
    uiRegistCount[2] = v5;
    uiRegistCount[3] = v6;
    std::vector<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo>>::vector<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo>>(
      &kRewardInfos,
      v7);
    v8 = kRewardInfos._Myfirst;
    LOBYTE(v31) = 1;
    if ( kRewardInfos._Mylast - kRewardInfos._Myfirst )
    {
      v9 = kText;
      v25 = kRewardInfos._Myfirst;
      rkIndex.m_acFilename = (char *)(kRewardInfos._Mylast - kRewardInfos._Myfirst);
      do
      {
        if ( v8->m_uiRewardGrade < 5 && uiRegistCount[v8->m_uiRewardGrade] == v8->m_uiCount )
        {
          ++uiTextCount;
          v10 = v9;
          ++v9;
          v11 = TextData2::Get(0xCB311722);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
            v10,
            (const char *)v11,
            strlen((const char *)v11));
          v8 = v25;
        }
        ++v8;
        v12 = rkIndex.m_acFilename-- == (char *)1;
        v25 = v8;
      }
      while ( !v12 );
    }
    v13 = *(_DWORD *)(ITableBase<CollectCard,CollectCardTab>::ms_pkTable + 56);
    if ( v13 )
      v14 = *(_DWORD *)(v13 + 40);
    else
      v14 = 0;
    v15 = 0;
    if ( !v14 )
      goto LABEL_15;
    while ( 1 )
    {
      v16 = CDataReader::GetRecord((CDataReader *)(ITableBase<CollectCard,CollectCardTab>::ms_pkTable + 4), v15);
      if ( v16 )
      {
        if ( *(_WORD *)v16 == (_WORD)uiCardID )
          break;
      }
      if ( ++v15 >= v14 )
        goto LABEL_15;
    }
    if ( CollectCardTitleTab::GetByItemInx(v16 + 2) )
    {
      v22 = &kText[uiTextCount];
      v17 = uiTextCount + 1;
      v23 = TextData2::Get(0xCB311722);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        v22,
        (const char *)v23,
        strlen((const char *)v23));
    }
    else
    {
LABEL_15:
      v17 = uiTextCount;
    }
    if ( v17 )
    {
      v18 = 105;
      do
      {
        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)(&v27->m_pkCollectWin->vfptr)[v18]);
        ++v18;
      }
      while ( v18 < 107 );
      if ( v17 )
      {
        v19 = kText;
        uiTextCount = 420;
        do
        {
          if ( v19->_Mysize )
          {
            v20 = *(CollectPopupWin **)((char *)&v27->m_pkCollectWin->vfptr + uiTextCount);
            if ( v20 )
            {
              if ( v19->_Myres < 0x10 )
                v21 = (const char *)v19;
              else
                v21 = v19->_Bx._Ptr;
              CollectPopupWin::SetText(v20, v17, (int)v19, v21);
              PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v20->vfptr);
              uiTextCount += 4;
            }
          }
          ++v19;
          --v17;
        }
        while ( v17 );
      }
      rkIndex.m_dwIndex = 49;
      rkIndex.m_acFilename = 0;
      SoundGroupStatic::PlaySoundA((SoundGroupStatic *)&g_kSoundMgr.m_pkInterfaceGroup->vfptr, &rkIndex, 0, 0);
    }
    if ( kRewardInfos._Myfirst )
      operator delete(kRewardInfos._Myfirst);
    v31 = -1;
    `eh vector destructor iterator'(
      kText,
      0x1Cu,
      2,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
  }
}
// A8C210: using guessed type int ITableBase<CollectCard,CollectCardTab>::ms_pkTable;

//----- (004981A0) --------------------------------------------------------
void __userpurge GameFrameWork::ProcessMsg(GameFrameWork *this@<ecx>, double a2@<st0>, unsigned int uiMsg, unsigned int uiwParam, unsigned int uilParam)
{
  GameFrameWork *v5; // esi@1
  ChargedItemListWin *v6; // ecx@46
  signed int v7; // ecx@146
  signed int v8; // eax@146
  signed int v9; // eax@151
  signed int v10; // ecx@152
  signed int v11; // eax@155
  signed int v12; // edx@155
  MainCharHPBarWin *v13; // ecx@175
  bool v14; // al@175
  MiniMapWin *v15; // ecx@176
  MiniMapWin *v16; // ecx@178
  mhInfoWin *v17; // eax@197
  int v18; // eax@198
  char *v19; // eax@203
  InventoryWin *v20; // ecx@221
  InventoryWin *v21; // ecx@224
  _BYTE v22[12]; // ST0C_12@228
  _BYTE v23[12]; // ST00_12@228
  char v24; // al@228
  mhInputPassWordWin *v25; // ecx@229
  stMINIHOUSEINFO *v26; // eax@229
  unsigned int v27; // edx@243
  __int64 v28; // kr00_8@243
  int v29; // ST18_4@243
  char *v30; // eax@243
  char *v31; // ST1C_4@243
  char *v32; // eax@243
  _BYTE v33[20]; // ST00_20@243
  _BYTE v34[20]; // ST0C_20@247
  CursorState *v35; // eax@253
  CollectCardWin **v36; // edi@257
  signed int v37; // ebx@257
  CollectCardWin *v38; // esi@258
  CollectCardWin **v39; // edi@262
  signed int v40; // ebx@262
  CollectCardWin *v41; // esi@263
  unsigned int v42; // [sp-8h] [bp-4Ch]@148
  unsigned int v43; // [sp-4h] [bp-48h]@147
  Name5 v44; // [sp+Ch] [bp-38h]@228
  ITEM_INVEN kInven; // [sp+24h] [bp-20h]@229
  char acstr[21]; // [sp+28h] [bp-1Ch]@243

  v5 = this;
  switch ( uiMsg )
  {
    case 9u:
      if ( !GameFrameWork::ms_uiFirstCreateDevice )
        GameFrameWork::ms_uiFirstCreateDevice = 1;
      GameFrameWork::OnGameStart(this, uilParam);
      GameFrameWork::SetInventoryNewMark(v5);
      return;
    case 0xAu:
      if ( !GameFrameWork::ms_uiFirstCreateDevice )
        GameFrameWork::ms_uiFirstCreateDevice = 1;
      GameFrameWork::OnGameStart(this, uilParam);
      return;
    case 0x10Fu:
      MakeKarisWin::StartEffectt(this->m_pkMakeKarisWin);
      return;
    case 0xBu:
      GameFrameWork::OnOpenChatEditWin(this, 0);
      return;
    case 0xF4u:
      GameFrameWork::OnOpenSlashStartChat(this, "/");
      return;
    case 0xCu:
      GameFrameWork::OnOpenCharInfoWin(this);
      return;
    case 0xDu:
      GameFrameWork::OnOpenInventoryWin(this);
      return;
    case 0xB8u:
      GameFrameWork::OnOpenMiniHouseInventoryWin(this);
      return;
    case 0x86u:
      GameFrameWork::OnOpenShortCutSubWin(this);
      return;
    case 0x87u:
      GameFrameWork::OnOpenShortCutPanelTurn(this, this->m_pkShortCutWinV, this->m_pkShortCutWin);
      return;
    case 0x88u:
      GameFrameWork::OnOpenShortCutPanelTurn(this, this->m_pkShortCutWin, this->m_pkShortCutWinV);
      return;
    case 0x89u:
      GameFrameWork::OnOpenShortCutSubPanelTurn(
        this,
        this->m_pkShortCutSubWinV[uiwParam],
        this->m_pkShortCutSubWin[uiwParam]);
      return;
    case 0x8Au:
      GameFrameWork::OnOpenShortCutSubPanelTurn(
        this,
        this->m_pkShortCutSubWin[uiwParam],
        this->m_pkShortCutSubWinV[uiwParam]);
      return;
    case 0x8Bu:
      GameFrameWork::OnReflashShortCutWin(this);
      return;
    case 0x10u:
      GameFrameWork::OnOpenQuestWin(this);
      return;
    case 0x11u:
      GameFrameWork::OnOpenHelpWin(this);
      return;
    case 0xF5u:
      GameFrameWork::OnOpenGuildWin(this);
      return;
    case 0xF6u:
      GameFrameWork::OnOpenHolyPromise(this);
      return;
    case 0xF7u:
      GameFrameWork::OnOpenGuildAcademy(this);
      return;
    case 0xF8u:
      GameFrameWork::OnOpenPartyMatching(this);
      return;
    case 0xF9u:
      GameFrameWork::OnOpenWedding(this);
      return;
    case 0x14u:
      GameFrameWork::OnOpenItemMallWin(this);
      return;
    case 0x15u:
      GameFrameWork::OnOpenForumWin(this);
      return;
    case 0x16u:
      GameFrameWork::OnOpenSystemWin(this);
      return;
    case 0x18u:
      GameFrameWork::OnLogout(this, (MHDiceGameTask *)uilParam);
      return;
    case 0x19u:
      GameFrameWork::OnGoCharSelect(this);
      return;
    case 0x1Au:
      GameFrameWork::OnExit(this, (MHDiceGameTask *)uilParam);
      return;
    case 0x1Du:
      GameFrameWork::OnEscape(this, a2);
      return;
    case 0x1Eu:
      GameFrameWork::OnF1(this);
      return;
    case 0x1Fu:
      GameFrameWork::OnF2(this);
      return;
    case 0x20u:
      GameFrameWork::OnF3(this);
      return;
    case 0x21u:
      GameFrameWork::OnF4(this);
      return;
    case 0x22u:
      GameFrameWork::OnF5(this);
      return;
    case 0x23u:
      GameFrameWork::OnF6(this);
      return;
    case 0x24u:
      GameFrameWork::OnF7();
      return;
    case 0x25u:
      GameFrameWork::OnF8();
      return;
    case 0x26u:
      GameFrameWork::OnF9();
      return;
    case 0x27u:
      GameFrameWork::OnF10(this);
      return;
    case 0x28u:
      GameFrameWork::OnF11(this);
      return;
    case 0x29u:
      GameFrameWork::OnF12(this);
      return;
    case 0x2Au:
      v6 = this->m_pkChargedItemListWin;
      if ( v6 )
      {
        if ( (unsigned __int8)((int (*)(void))v6->vfptr[65].__vecDelDtor)() )
          PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v5->m_pkChargedItemListWin->vfptr);
        else
          PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v5->m_pkChargedItemListWin->vfptr);
      }
      return;
    case 0x2Bu:
      GameFrameWork::OnSpace(this);
      return;
    case 0x2Cu:
      GameFrameWork::OnNearMobSelect(this);
      return;
    case 0x2Du:
      GameFrameWork::OnShortCutSkillUse(this, 0, 1u);
      return;
    case 0x2Eu:
      GameFrameWork::OnShortCutSkillUse(this, 1u, 1u);
      return;
    case 0x2Fu:
      GameFrameWork::OnShortCutSkillUse(this, 2u, 1u);
      return;
    case 0x30u:
      GameFrameWork::OnShortCutSkillUse(this, 3u, 1u);
      return;
    case 0x31u:
      GameFrameWork::OnShortCutSkillUse(this, 4u, 1u);
      return;
    case 0x32u:
      GameFrameWork::OnShortCutSkillUse(this, 5u, 1u);
      return;
    case 0x33u:
      GameFrameWork::OnShortCutSkillUse(this, 6u, 1u);
      return;
    case 0x34u:
      GameFrameWork::OnShortCutSkillUse(this, 7u, 1u);
      return;
    case 0x35u:
      GameFrameWork::OnShortCutSkillUse(this, 8u, 1u);
      return;
    case 0x36u:
      GameFrameWork::OnShortCutSkillUse(this, 9u, 1u);
      return;
    case 0x37u:
      GameFrameWork::OnShortCutSkillUse(this, 0xAu, 1u);
      return;
    case 0x38u:
      GameFrameWork::OnShortCutSkillUse(this, 0xBu, 1u);
      return;
    case 0x39u:
      GameFrameWork::OnShortCutSkillUse(this, 0x12u, 1u);
      return;
    case 0x3Au:
      GameFrameWork::OnShortCutSkillUse(this, 0x13u, 1u);
      return;
    case 0x3Bu:
      GameFrameWork::OnShortCutSkillUse(this, 0x14u, 1u);
      return;
    case 0x3Cu:
      GameFrameWork::OnShortCutSkillUse(this, 0x15u, 1u);
      return;
    case 0x3Du:
      GameFrameWork::OnShortCutSkillUse(this, 0x16u, 1u);
      return;
    case 0x3Eu:
      GameFrameWork::OnShortCutSkillUse(this, 0x17u, 1u);
      return;
    case 0x3Fu:
      GameFrameWork::OnShortCutSkillUse(this, 0x18u, 1u);
      return;
    case 0x40u:
      GameFrameWork::OnShortCutSkillUse(this, 0x19u, 1u);
      return;
    case 0x41u:
      GameFrameWork::OnShortCutSkillUse(this, 0x1Au, 1u);
      return;
    case 0x42u:
      GameFrameWork::OnShortCutSkillUse(this, 0x1Bu, 1u);
      return;
    case 0x43u:
      GameFrameWork::OnShortCutSkillUse(this, 0x1Cu, 1u);
      return;
    case 0x44u:
      GameFrameWork::OnShortCutSkillUse(this, 0x1Du, 1u);
      return;
    case 0x45u:
      GameFrameWork::OnShortCutSkillUse(this, 0x24u, 1u);
      return;
    case 0x46u:
      GameFrameWork::OnShortCutSkillUse(this, 0x25u, 1u);
      return;
    case 0x47u:
      GameFrameWork::OnShortCutSkillUse(this, 0x26u, 1u);
      return;
    case 0x48u:
      GameFrameWork::OnShortCutSkillUse(this, 0x27u, 1u);
      return;
    case 0x49u:
      GameFrameWork::OnShortCutSkillUse(this, 0x28u, 1u);
      return;
    case 0x4Au:
      GameFrameWork::OnShortCutSkillUse(this, 0x29u, 1u);
      return;
    case 0x4Bu:
      GameFrameWork::OnShortCutSkillUse(this, 0x2Au, 1u);
      return;
    case 0x4Cu:
      GameFrameWork::OnShortCutSkillUse(this, 0x2Bu, 1u);
      return;
    case 0x4Du:
      GameFrameWork::OnShortCutSkillUse(this, 0x2Cu, 1u);
      return;
    case 0x4Eu:
      GameFrameWork::OnShortCutSkillUse(this, 0x2Du, 1u);
      return;
    case 0x4Fu:
      GameFrameWork::OnShortCutSkillUse(this, 0x2Eu, 1u);
      return;
    case 0x50u:
      GameFrameWork::OnShortCutSkillUse(this, 0x2Fu, 1u);
      return;
    case 0x51u:
      GameFrameWork::OnShortCutSkillUse(this, 0x36u, 1u);
      return;
    case 0x52u:
      GameFrameWork::OnShortCutSkillUse(this, 0x37u, 1u);
      return;
    case 0x53u:
      GameFrameWork::OnShortCutSkillUse(this, 0x38u, 1u);
      return;
    case 0x54u:
      GameFrameWork::OnShortCutSkillUse(this, 0x39u, 1u);
      return;
    case 0x55u:
      GameFrameWork::OnShortCutSkillUse(this, 0x3Au, 1u);
      return;
    case 0x56u:
      GameFrameWork::OnShortCutSkillUse(this, 0x3Bu, 1u);
      return;
    case 0x57u:
      GameFrameWork::OnShortCutSkillUse(this, 0x3Cu, 1u);
      return;
    case 0x58u:
      GameFrameWork::OnShortCutSkillUse(this, 0x3Du, 1u);
      return;
    case 0x59u:
      GameFrameWork::OnShortCutSkillUse(this, 0x3Eu, 1u);
      return;
    case 0x5Au:
      GameFrameWork::OnShortCutSkillUse(this, 0x3Fu, 1u);
      return;
    case 0x5Bu:
      GameFrameWork::OnShortCutSkillUse(this, 0x40u, 1u);
      return;
    case 0x5Cu:
      GameFrameWork::OnShortCutSkillUse(this, 0x41u, 1u);
      return;
    case 0x5Du:
      GameFrameWork::OnShortCutSkillUse(this, uiwParam, uilParam);
      return;
    case 0x61u:
      GameFrameWork::OnTab_Key(this);
      return;
    case 0x62u:
      GameFrameWork::OnKeyDownMoveFront(this);
      return;
    case 0x63u:
      GameFrameWork::OnKeyDownMoveBack(this);
      return;
    case 0x64u:
      GameFrameWork::OnKeyDownMoveLeft(this);
      return;
    case 0x65u:
      GameFrameWork::OnKeyDownMoveRight(this);
      return;
    case 0x66u:
      GameFrameWork::OnKeyDownJump(this);
      return;
    case 0x67u:
      GameFrameWork::OnWalkOrRun_Key(this);
      return;
    case 0x68u:
      GameFrameWork::OnHPSoulStoneUse_Key(this);
      return;
    case 0x69u:
      GameFrameWork::OnSPSoulStoneUse_Key(this);
      return;
    case 0x1Bu:
      GameFrameWork::OnErrorGotoAccount(this);
      return;
    case 0x1Cu:
      GameFrameWork::OnErrorGotoExit();
      return;
    case 0x6Au:
      GameFrameWork::OnOpenCharInfoWinKey(this);
      return;
    case 0x6Bu:
      GameFrameWork::OnOpenInventoryWinKey(this);
      return;
    case 0x6Cu:
      if ( !EditWin::ms_pkCurEditWin )
        goto $LN247_0;
      return;
    case 0xEu:
$LN247_0:
      GameFrameWork::OnOpenSkillWin(this);
      return;
    case 0x6Du:
      if ( !EditWin::ms_pkCurEditWin )
        goto $LN240_0;
      return;
    case 0xFu:
$LN240_0:
      GameFrameWork::OnOpenActionWin(this);
      return;
    case 0x6Eu:
      if ( !EditWin::ms_pkCurEditWin )
        goto $LN237_0;
      return;
    case 0x12u:
$LN237_0:
      GameFrameWork::OnOpenFriendWin(this);
      return;
    case 0x6Fu:
      GameFrameWork::OnOpenMiniPartyWinKey(this);
      return;
    case 0x70u:
      GameFrameWork::OnPauseEmotion(this);
      return;
    case 0xA2u:
      if ( !EditWin::ms_pkCurEditWin )
        goto $LN231_0;
      return;
    case 0x13u:
$LN231_0:
      GameFrameWork::OnOpenMiniHouseMenuWin(this);
      return;
    case 0xA3u:
      GameFrameWork::OnOpenPrivateStoreWin(this);
      return;
    case 0xACu:
      GameFrameWork::OnOpenPrivateStoreWinKey(this);
      return;
    case 0xA4u:
      GameFrameWork::OnOpenPrivateStoreWinBuy(this, uilParam);
      return;
    case 0xA5u:
      GameFrameWork::OnOpenPrivateStoreWinSell(this, uilParam);
      return;
    case 0xA6u:
      GameFrameWork::OnOpenPrivateStoreWinSearch(this);
      return;
    case 0xA7u:
      PrivateStoreWin::ms_bPrivateStoreWin = 0;
      return;
    case 0xADu:
      GameFrameWork::OnOpenRestHouseKey(this, a2);
      return;
    case 0x71u:
      GameFrameWork::OnPartyJoinProposeAccept(this);
      return;
    case 0x72u:
      GameFrameWork::OnPartyJoinProposeReject(this);
      return;
    case 0x73u:
      GameFrameWork::OnTradeProposeAskAccept(this);
      return;
    case 0x74u:
      GameFrameWork::OnTradeProposeAskReject(this);
      return;
    case 0x75u:
      GameFrameWork::NcTradeProposeCancelCmd(this);
      return;
    case 0x80u:
      GameFrameWork::OpenCharPopupMenu(this, (MHDiceGameTask *)uilParam, (char *)uiwParam);
      return;
    case 0x81u:
      GameFrameWork::OpenRaidMemberPopupMenu(this, (MHDiceGameTask *)uilParam, (char *)uiwParam);
      return;
    case 0x82u:
      GameFrameWork::OpenKQTeamPopupMenu(this, (MHDiceGameTask *)uilParam, (char *)uiwParam);
      return;
    case 0x76u:
      GameFrameWork::OnFriendConfirmReqYes(this, uilParam);
      return;
    case 0x77u:
      GameFrameWork::OnFriendConfirmReqNo(this, uilParam);
      return;
    case 0x78u:
      GameFrameWork::OnFriendDeleteYse(this, uilParam);
      return;
    case 0x84u:
      GameFrameWork::OnTimerTradeReject(this);
      return;
    case 0x8Cu:
      if ( !EditWin::ms_pkCurEditWin )
      {
        GameFrameWork::ms_bWindowSizeChanged = 1;
        GameFrameWork::RegistereWinPostion(this);
      }
      return;
    case 0x8Du:
      GameFrameWork::OpenResolutionPopup(this);
      return;
    case 0x8Eu:
      v7 = 800;
      v8 = 600;
      goto LABEL_147;
    case 0x8Fu:
      v43 = 768;
      GameFrameWork::ms_uiDisResWidth = 1024;
      GameFrameWork::ms_uiDisResHeight = 768;
      dword_A76A5A = 1024;
      dword_A76A5E = 768;
      v42 = 1024;
      goto LABEL_149;
    case 0x90u:
      v9 = 1280;
      goto LABEL_152;
    case 0x91u:
      v9 = 1280;
      v10 = 960;
      goto LABEL_153;
    case 0x92u:
      v11 = 1280;
      v12 = 1024;
      goto LABEL_156;
    case 0x93u:
      v7 = 1400;
      v8 = 1050;
      goto LABEL_147;
    case 0x94u:
      v11 = 1600;
      v12 = 1200;
LABEL_156:
      v43 = v12;
      GameFrameWork::ms_uiDisResHeight = v12;
      dword_A76A5E = v12;
      GameFrameWork::ms_uiDisResWidth = v11;
      dword_A76A5A = v11;
      v42 = v11;
      goto LABEL_149;
    case 0x95u:
    case 0x9Au:
      v9 = 1600;
      v10 = 900;
      goto LABEL_153;
    case 0x96u:
      v7 = 1920;
      v8 = 1440;
      goto LABEL_147;
    case 0x97u:
      v7 = 1920;
      GameFrameWork::ms_uiDisResHeight = 1200;
      dword_A76A5E = 1200;
      v43 = 1200;
      goto LABEL_148;
    case 0x98u:
      v7 = 1680;
      v8 = 1050;
      goto LABEL_147;
    case 0x99u:
      v9 = 1280;
      v10 = 800;
      goto LABEL_153;
    case 0x9Bu:
      v9 = 1440;
      v10 = 900;
      goto LABEL_153;
    case 0x9Cu:
      v7 = 1920;
      v8 = 1080;
      goto LABEL_147;
    case 0x9Du:
      v7 = 2560;
      v8 = 1440;
      goto LABEL_147;
    case 0x9Eu:
      v7 = 2560;
      v8 = 1600;
      goto LABEL_147;
    case 0x9Fu:
      v7 = 3840;
      v8 = 2160;
      goto LABEL_147;
    case 0xA0u:
      v9 = 1366;
LABEL_152:
      v10 = 768;
LABEL_153:
      v43 = v10;
      GameFrameWork::ms_uiDisResHeight = v10;
      dword_A76A5E = v10;
      GameFrameWork::ms_uiDisResWidth = v9;
      dword_A76A5A = v9;
      v42 = v9;
      goto LABEL_149;
    case 0xA1u:
      v7 = 3440;
      v8 = 1440;
LABEL_147:
      GameFrameWork::ms_uiDisResHeight = v8;
      dword_A76A5E = v8;
      v43 = v8;
LABEL_148:
      GameFrameWork::ms_uiDisResWidth = v7;
      dword_A76A5A = v7;
      v42 = v7;
LABEL_149:
      GameFrameWork::ms_bWindowSizeChanged = 1;
      OptionGraphicWin::SetResoulution(v5->m_pkOptionGraphicWin, v42, v43);
      GameFrameWork::RegistereWinPostion(v5);
      break;
    case 0xAFu:
      this->m_bDrawWinMgr = this->m_bDrawWinMgr == 0;
      break;
    case 0xB0u:
      this->m_bScrnBDMgr = this->m_bScrnBDMgr == 0;
      break;
    case 0xB1u:
      this->m_bTextEffMgr = this->m_bTextEffMgr == 0;
      break;
    case 0xB2u:
      this->m_bWorld = this->m_bWorld == 0;
      break;
    case 0xB3u:
      v13 = this->m_pkTargetCharHPBarWin;
      v14 = v5->m_bTargetHPBar == 0;
      v5->m_bTargetHPBar = v14;
      v13->m_bDrawTargetCharOption = v14;
      break;
    case 0xB5u:
      v15 = this->m_pkMiniMapWin;
      if ( v15 )
        MiniMapWin::OpenAllMap(v15);
      break;
    case 0xB6u:
      v16 = this->m_pkMiniMapWin;
      if ( v16 )
        MiniMapWin::OpenFullWorldMap(v16);
      break;
    case 0xB7u:
      GameFrameWork::OnSoloModeKey(this);
      break;
    case 0xECu:
      GameFrameWork::OpenWingStonePlacePopup(this);
      break;
    case 0xEDu:
      WingStoneWin::ChoiceList(this->m_pkWingStoneWin, 0);
      break;
    case 0xEEu:
      WingStoneWin::ChoiceList(this->m_pkWingStoneWin, 1u);
      break;
    case 0xEFu:
      WingStoneWin::ChoiceList(this->m_pkWingStoneWin, 2u);
      break;
    case 0xF0u:
      WingStoneWin::ChoiceList(this->m_pkWingStoneWin, 3u);
      break;
    case 0xF1u:
      WingStoneWin::ChoiceList(this->m_pkWingStoneWin, 4u);
      break;
    case 0xB9u:
    case 0xBFu:
      GameFrameWork::OnOpenChargedItemListWin(this);
      break;
    case 0xBBu:
      ChatDisplayWin2::OnNormalHotKeyTab(this->m_pkChatDisplayWin);
      break;
    case 0xBCu:
      ChatDisplayWin2::OnGuildHotKeyTab(this->m_pkChatDisplayWin);
      break;
    case 0xBDu:
      ChatDisplayWin2::OnPartyHotKeyTab(this->m_pkChatDisplayWin);
      break;
    case 0xBEu:
      ChatDisplayWin2::OnWhisperHotKeyTab(this->m_pkChatDisplayWin);
      break;
    case 0xC8u:
      GameFrameWork::OnOpenMHPopupMenuWin(this);
      break;
    case 0xC0u:
    case 0xD6u:
      GameFrameWork::OnOpenMHConfigRoomInfoWin(this);
      break;
    case 0xE4u:
      GameFrameWork::SendDelMHObjReq(this, 0);
      break;
    case 0xE0u:
      GameFrameWork::MinimizeMHWins(this, uiwParam);
      break;
    case 0xE1u:
      GameFrameWork::NormalizeMHWins(this, uiwParam);
      break;
    case 0xDFu:
      v17 = this->m_pkMHInfoWin;
      if ( v17->m_PassWord._Mysize )
      {
        v18 = (int)&v17->m_PassWord;
        if ( *(_DWORD *)(v18 + 20) >= 0x10u )
          v18 = *(_DWORD *)v18;
        mhSettingWin::SetPassWord(this->m_pkMHSettingWin, (char *)v18);
      }
      break;
    case 0xC4u:
      MiniHouseIndoor::ArrangeModeReq(&g_kWorld.m_MiniHouseIndoorMode);
      break;
    case 0xC9u:
      GameFrameWork::SendMHBuildingOrFixReq(this, uiwParam);
      break;
    case 0xCDu:
      v19 = (char *)((int (*)(void))this->m_pkMHInputPassWordWin->m_spRoomPassWord.m_pObject->vfptr[113].__vecDelDtor)();
      GameFrameWork::SendMHVisitReq(v5, v5->m_pkMHInputPassWordWin->mh_hnd, v19);
      break;
    case 0xC3u:
      GameFrameWork::SendKickReq(this, this->m_pkMHInfoWin->m_ClickedChar);
      break;
    case 0xDEu:
      GameFrameWork::ReArrangeMHObj(this, uiwParam, mhObj);
      break;
    case 0xE2u:
      GameFrameWork::MHObjFocusCancel();
      break;
    case 0xE3u:
      GameFrameWork::MHObjUsePortal();
      break;
    case 0xD7u:
      GameFrameWork::OnCloseMHConfigRoomInfoWin(this);
      break;
    case 0xD8u:
      GameFrameWork::OnOpenMHInputPassWordWin(this);
      break;
    case 0xD9u:
      GameFrameWork::OnCloseMHInputPassWordWin(this);
      break;
    case 0xCEu:
      GameFrameWork::MiniHouseIndoorModeOut(this, (MHDiceGameTask *)uilParam);
      break;
    case 0xDBu:
      GameFrameWork::OpenMHInfoWin(this, TE_EDIT_ROOM);
      break;
    case 0xC5u:
      GameFrameWork::SendDelMHObjReq(this, 1);
      break;
    case 0xC6u:
      GameFrameWork::OnArrToInvMHItem(this);
      break;
    case 0xC7u:
      GameFrameWork::OnDeleteMHItem(this);
      break;
    case 0xE5u:
      GameFrameWork::JoinDiceGameReq();
      break;
    case 0xE6u:
      GameFrameWork::OnOpenDiceRewardWin(this);
      break;
    case 0xE7u:
      GameFrameWork::OnOpenDiceExpectWin(this);
      break;
    case 0xDCu:
      GameFrameWork::SendmhObjActReq();
      break;
    case 0xEBu:
      GameFrameWork::SendMHRepairReq(this);
      break;
    case 0xE9u:
      v20 = this->m_pkInventoryWin;
      if ( v20 )
        InventoryWin::LockAllItem(v20);
      OutputDebugStringA("PGFM_CHARINV_LOCK\n");
      break;
    case 0xEAu:
      v21 = this->m_pkInventoryWin;
      if ( v21 )
        InventoryWin::UnLockAllItem(v21);
      OutputDebugStringA("PGFM_CHARINV_UNLOCK\n");
      break;
    case 0xDDu:
      if ( mhObj )
      {
        *(float *)v22 = this->m_kCameraRayDir.x;
        *(_QWORD *)&v22[4] = *(_QWORD *)&this->m_kCameraRayDir.y;
        *(float *)v23 = this->m_kCameraRayOrigin.x;
        *(_QWORD *)&v23[4] = *(_QWORD *)&this->m_kCameraRayOrigin.y;
        World::GetAdvGroundPos(&g_kWorld, *(NiPoint3 *)v23, *(NiPoint3 *)v22, (NiPoint3 *)&v44.n5_code[2], 0);
        v24 = MiniHouseIndoor::FindNearestActPos(mhObj, (NiPoint3 *)&v44.n5_code[2]);
        MiniHouseIndoor::StartMHCharEmotion(
          &g_kWorld.m_MiniHouseIndoorMode,
          (NiPoint3 *)&v44.n5_code[2],
          (unsigned __int8)v24,
          uiwParam);
      }
      break;
    case 0xF2u:
      v25 = this->m_pkMHInputPassWordWin;
      kInven.Inven = uiwParam;
      v25->mh_hnd = uiwParam;
      v26 = CGuildMonster::GetGuildEumFromMob((CMiniHouseMgr *)&g_kMiniHouseMgr, uiwParam);
      if ( v26 )
        mhInfoWin::SetTitle(v5->m_pkMHInfoWin, v26->title, 0);
      GameFrameWork::SendNetMsgZoneMgr(v5, 0x23u, 0xEu, &kInven, 2);
      break;
    case 0xE8u:
      MiniHouseIndoor::SendObjEffReq(&g_kWorld.m_MiniHouseIndoorMode);
      break;
    case 0xFBu:
      GameFrameWork::OnMapLogInError(this);
      break;
    case 0xFAu:
      ChatDisplayWin2::OnGuildAcademyHotKeyTab(this->m_pkChatDisplayWin);
      break;
    case 0xFCu:
      if ( !(unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[1].AddAbStateByAbstateIndex)()
        || !Char::IsMoverMovable(g_pkMainChar) )
      {
        KeyboardMoveProcess::SetAutoRun(&v5->m_kCharMover, v5->m_kCharMover.m_bAutoRun == 0);
        GameFrameWork::Stick(v5, 0, 0);
      }
      break;
    case 0xFEu:
      GameFrameWork::ActivateRaidWin(this);
      break;
    case 0xFDu:
      GameFrameWork::SendAutoPickItemReq(this, uiwParam == 1);
      break;
    case 0xFFu:
      if ( Inventory::FindEnchantSoketAdd(&g_kInventory, &kInven) )
        GameFrameWork::NcItemEnchantAddNewSocketReq(
          v5,
          (ITEM_INVEN)((kInven.Inven ^ uiwParam) & 0x3FF ^ kInven.Inven),
          (ITEM_INVEN)(uilParam & 0x3FF | uilParam & 0xFC00));
      break;
    case 0x100u:
      if ( uilParam )
      {
        v27 = *(_DWORD *)uilParam;
        v28 = *(_QWORD *)(uilParam + 4);
        v44.n5_code[2] = *(_QWORD *)(uilParam + 4) >> 32;
        *(_QWORD *)&v44.n5_name[0] = __PAIR__(v28, v27);
        *(_QWORD *)&v44.n5_code[3] = *(_QWORD *)(uilParam + 12);
        Name5::n_string(&v44, acstr);
        acstr[20] = 0;
        v29 = ((int (__cdecl *)(char *))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)(acstr);
        v30 = (char *)TextData2::Get(0x9BB6A8F5);
        v31 = fs(v30, v29);
        v32 = (char *)TextData2::Get(0x98A3EBF9);
        *(_DWORD *)v33 = *(_DWORD *)uilParam;
        *(_QWORD *)&v33[4] = *(_QWORD *)(uilParam + 4);
        *(_QWORD *)&v33[12] = *(_QWORD *)(uilParam + 12);
        GameFrameWork::NcPrisonAddGMReq(v5, *(Name5 *)v33, 0x7530u, v32, v31);
        operator delete((void *)uilParam);
      }
      break;
    case 0x101u:
    case 0x103u:
      if ( uilParam )
        operator delete((void *)uilParam);
      break;
    case 0x102u:
      if ( uilParam )
      {
        *(_DWORD *)v34 = *(_DWORD *)uilParam;
        *(_QWORD *)&v34[4] = *(_QWORD *)(uilParam + 4);
        *(_QWORD *)&v34[12] = *(_QWORD *)(uilParam + 12);
        GameFrameWork::NcMiscSpammerChatBanReq(this, *(Name5 *)v34);
        operator delete((void *)uilParam);
      }
      break;
    case 0x104u:
      GameFrameWork::NcQuestGiveUpReq(this, uilParam);
      break;
    case 0x105u:
      GameFrameWork::NcQuestStartReq(this, uilParam);
      break;
    case 0x107u:
      GameFrameWork::NcItemEquipBelongedCancelUseReq(this, uilParam);
      break;
    case 0x108u:
      if ( this->m_pkInventoryWin )
        InventoryWin::ms_uiMode = uilParam;
      break;
    case 0x10Au:
      Singleton<CursorState>::getInstance();
      CursorState::CancelState(v35, PUT_ON_BELONG_CLEAR);
      if ( v5->m_pkInventoryWin )
        InventoryWin::ms_uiMode = 0;
      v5->m_bPickCancel = 0;
      break;
    case 0x10Bu:
      GameFrameWork::RefreshHotKey(this);
      break;
    case 0x10Cu:
      GameFrameWork::NcCollectCardregistReq(this, a2, uiwParam);
      v36 = v5->m_pkCollectCardWin;
      v37 = 4;
      do
      {
        v38 = *v36;
        if ( *v36 )
        {
          CollectCardWin::Reset(*v36);
          PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v38->vfptr);
        }
        ++v36;
        --v37;
      }
      while ( v37 );
      break;
    case 0x10Du:
      v39 = this->m_pkCollectCardWin;
      v40 = 4;
      do
      {
        v41 = *v39;
        if ( *v39 )
        {
          CollectCardWin::Reset(*v39);
          PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v41->vfptr);
        }
        ++v39;
        --v40;
      }
      while ( v40 );
      break;
    case 0x10Eu:
      GameFrameWork::NcCharChargedbuffEraseReq(this, uiwParam);
      break;
    default:
      return;
  }
}
// A76A5A: using guessed type int dword_A76A5A;
// A76A5E: using guessed type int dword_A76A5E;
// A8CAFD: using guessed type bool GameFrameWork::ms_bWindowSizeChanged;
// A8CB00: using guessed type unsigned int GameFrameWork::ms_uiFirstCreateDevice;
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;
// A8D482: using guessed type bool PrivateStoreWin::ms_bPrivateStoreWin;

//----- (0049A020) --------------------------------------------------------
void __thiscall GameFrameWork::OnNpcDialogCommand(GameFrameWork *this, DirectUserMsgBody_NpcDialogResponse *pkBody)
{
  char *v2; // ebx@1
  char v3; // al@1
  GameFrameWork *v4; // esi@1
  signed int v5; // ecx@1
  char *v6; // edx@2
  char v7; // al@6
  GuildSelectWin *v8; // eax@31
  GuildSelectWin *v9; // eax@32
  NiUnsharedGeometryGroup *v10; // eax@39
  unsigned __int8 v11; // bl@49
  unsigned int v12; // eax@49
  CClientQuest *v13; // eax@50
  int v14; // eax@86
  PROTO_NC_QUEST_REWARD_SELECT_ITEM_INDEX_CMD kCmd; // [sp+Ch] [bp-38h]@50
  char pProto; // [sp+17h] [bp-2Dh]@45
  unsigned int mobId; // [sp+18h] [bp-2Ch]@47
  unsigned int ScpNum; // [sp+1Ch] [bp-28h]@1
  char acCmd[32]; // [sp+20h] [bp-24h]@2

  v2 = pkBody->acAction;
  v3 = *pkBody->acAction;
  v4 = this;
  v5 = 0;
  ScpNum = (unsigned int)v4;
  if ( v3 )
  {
    v6 = (char *)(acCmd - v2);
    do
    {
      if ( v3 == 32 )
        break;
      if ( v5 >= 31 )
        break;
      v2[(_DWORD)v6] = v3;
      v3 = (v2++)[1];
      ++v5;
    }
    while ( v3 );
  }
  v7 = *v2;
  for ( acCmd[v5] = 0; v7; v7 = (v2++)[1] )
  {
    if ( v7 != 32 && v7 != 9 )
      break;
  }
  if ( !strcmp(acCmd, "server_ack") )
  {
    LOBYTE(ScpNum) = atoi(v2);
    GameFrameWork::NcActNpcmenuopenAck(v4, ScpNum);
  }
  else if ( !strcmp(acCmd, "opendlg") )
  {
    if ( !strcmp(v2, "itemupgrade") )
    {
      if ( !(unsigned __int8)((int (*)(void))v4->m_pkInventoryWin->vfptr[65].__vecDelDtor)() )
        GameFrameWork::OpenInventoryWin(v4);
      InventoryWin::ms_uiMode = 0;
      GameFrameWork::OpenItemUpgradeWin(v4);
    }
    else if ( !strcmp(v2, "weapontitle") )
    {
      ItemUpgradeWin::ResetAllData(v4->m_pkItemUpgradeWin);
      InventoryWin::ms_uiMode = 0;
      if ( !(unsigned __int8)((int (*)(void))v4->m_pkInventoryWin->vfptr[65].__vecDelDtor)() )
        GameFrameWork::OpenInventoryWin(v4);
      GameFrameWork::OpenWeapontitleWin(v4);
    }
    else if ( !strcmp(v2, "enchant") )
    {
      ItemUpgradeWin::ResetAllData(v4->m_pkItemUpgradeWin);
      EnchantGemWin::ms_bSend2EndOfTrade = 1;
      InventoryWin::ms_uiMode = 0;
      if ( !(unsigned __int8)((int (*)(void))v4->m_pkInventoryWin->vfptr[65].__vecDelDtor)() )
        GameFrameWork::OpenInventoryWin(v4);
      GameFrameWork::OpenEnchantGemWin(v4);
    }
    else if ( !strcmp(v2, "kingdomquestwin") )
    {
      GameFrameWork::OpenKDQuestWin(v4, 1);
      GameFrameWork::NcActEndOfTrade(v4);
    }
    else if ( !strcmp(v2, "make_karis") )
    {
      if ( !(unsigned __int8)((int (*)(void))v4->m_pkMakeKarisWin->vfptr[65].__vecDelDtor)() )
      {
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkInventoryWin->vfptr);
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkMakeKarisWin->vfptr);
      }
    }
    else if ( !strcmp(v2, "guildmenu") )
    {
      v8 = GuildTask::GetGuildSelectWin();
      if ( !(unsigned __int8)((int (__thiscall *)(GuildSelectWin *))v8->vfptr[65].__vecDelDtor)(v8) )
      {
        v9 = GuildTask::GetGuildSelectWin();
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v9->vfptr);
      }
    }
    else if ( !strcmp(v2, "moverupgrade") )
    {
      if ( CastingProgressWin::IsDoingCast(v4->m_pkCastingProgressBar) || g_pkMainChar->m_byMode == 6 )
      {
        v10 = TextData3::Get(0xE2CEEF05);
        GameFrameWork::AddSysMsg(v4, (const char *)v10);
        NpcDialogWin::CloseDialog(v4->m_pkNpcDlgWin);
      }
      else
      {
        if ( !(unsigned __int8)((int (*)(void))v4->m_pkInventoryWin->vfptr[65].__vecDelDtor)() )
          GameFrameWork::OpenInventoryWin(v4);
        GameFrameWork::OpenMoverUpgradeWin(v4);
        InventoryWin::ms_uiMode = 0;
      }
    }
    else if ( !strcmp(v2, "itemmix") )
    {
      InventoryWin::ms_uiMode = 0;
      if ( !(unsigned __int8)((int (*)(void))v4->m_pkInventoryWin->vfptr[65].__vecDelDtor)() )
        GameFrameWork::OpenInventoryWin(v4);
      GameFrameWork::OnOpenItemMixWin(v4);
    }
  }
  else if ( !strcmp(acCmd, "HolyReward_Req") )
  {
    GameFrameWork::SendNetMsgZoneMgr(v4, 0x25u, 0x3Cu, &pProto, 1);
    NpcDialogWin::CloseDialog(v4->m_pkNpcDlgWin);
  }
  else if ( !strcmp(acCmd, "linkto") )
  {
    sscanf(v2, "%d %d", &mobId, &ScpNum);
    NpcDialogWin::CloseDialog(v4->m_pkNpcDlgWin);
    NpcDialogWin::OpenNpcNormalDialog(v4->m_pkNpcDlgWin, mobId, ScpNum);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkNpcDlgWin->vfptr);
  }
  else if ( !strcmp(acCmd, "quest_ack") )
  {
    v11 = atoi(v2);
    v12 = pkBody->dwItemSelIndex;
    if ( v12 != -1 )
    {
      kCmd.nQuestID = pkBody->dwQuestID;
      kCmd.nSelectedItemIndex = v12;
      v13 = QuestDataMgr::GetQuest();
      if ( v13 )
      {
        mobId = kCmd.nQuestID;
        *std::map<int,mhObject *,std::less<int>,std::allocator<std::pair<int const,mhObject *>>>::operator[](
           &v13->m_listRewardOfDoneQuest,
           (const int *)&mobId) = kCmd.nSelectedItemIndex;
        v4 = (GameFrameWork *)ScpNum;
      }
      GameFrameWork::SendNetMsgZoneMgr(v4, 0x11u, 0x11u, &kCmd, 6);
    }
    GameFrameWork::NcQuestScriptCmdAck(v4, pkBody->dwQuestID, pkBody->byScriptCmd, v11);
  }
  else if ( !strcmp(acCmd, "logout") )
  {
    if ( !strcmp(v2, "beautyshop") )
      GameFrameWork::OnGoBeautyShop(v4);
  }
  else if ( !strcmp(acCmd, "getin") )
  {
    if ( !strcmp(v2, "weddinghall") )
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 8u, 0x56u, 0, 0);
  }
  else if ( !strcmp(acCmd, "Gladiator") )
  {
    if ( pkBody->dwQuestID != -1 )
      GameFrameWork::NcQuestScriptCmdAck(v4, pkBody->dwQuestID, pkBody->byScriptCmd, 4u);
  }
  else if ( !strcmp(acCmd, "Knight") )
  {
    if ( pkBody->dwQuestID != -1 )
      GameFrameWork::NcQuestScriptCmdAck(v4, pkBody->dwQuestID, pkBody->byScriptCmd, 5u);
  }
  else if ( !strcmp(acCmd, "HolyKnight") )
  {
    if ( pkBody->dwQuestID != -1 )
      GameFrameWork::NcQuestScriptCmdAck(v4, pkBody->dwQuestID, pkBody->byScriptCmd, 9u);
  }
  else if ( !strcmp(acCmd, "Guardian") )
  {
    if ( pkBody->dwQuestID != -1 )
      GameFrameWork::NcQuestScriptCmdAck(v4, pkBody->dwQuestID, pkBody->byScriptCmd, 0xAu);
  }
  else if ( !strcmp(acCmd, "SharpShooter") )
  {
    if ( pkBody->dwQuestID != -1 )
      GameFrameWork::NcQuestScriptCmdAck(v4, pkBody->dwQuestID, pkBody->byScriptCmd, 0xEu);
  }
  else if ( !strcmp(acCmd, "Ranger") )
  {
    if ( pkBody->dwQuestID != -1 )
      GameFrameWork::NcQuestScriptCmdAck(v4, pkBody->dwQuestID, pkBody->byScriptCmd, 0xFu);
  }
  else if ( !strcmp(acCmd, "Warrock") )
  {
    if ( pkBody->dwQuestID != -1 )
      GameFrameWork::NcQuestScriptCmdAck(v4, pkBody->dwQuestID, pkBody->byScriptCmd, 0x13u);
  }
  else if ( !strcmp(acCmd, "Wizard") )
  {
    if ( pkBody->dwQuestID != -1 )
      GameFrameWork::NcQuestScriptCmdAck(v4, pkBody->dwQuestID, pkBody->byScriptCmd, 0x14u);
  }
  else if ( !strcmp(acCmd, "NpcAct") )
  {
    v14 = atoi(v2);
    GameFrameWork::NcActNpcMenuCmd(v4, v14);
  }
}
// A8CBE0: using guessed type bool EnchantGemWin::ms_bSend2EndOfTrade;
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (0049AAC0) --------------------------------------------------------
void __thiscall GameFrameWork::DirectMessage(GameFrameWork *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  GameFrameWork *v4; // esi@1
  AnnounceWin *v5; // ecx@2
  PgWin *v6; // esi@6
  PgWin *v7; // ecx@13
  DirectUserMsgBody_MHInfoTabChanged::TabEnum v8; // eax@22
  char *v9; // edi@29
  char *v10; // edi@32
  char *v11; // edi@36
  int v12; // edi@40
  GuildJoinReqTask *v13; // eax@45
  Char *v14; // edi@47
  char *v15; // edi@50
  Char *v16; // eax@51
  const char *v17; // edi@53
  const char *v18; // edi@55
  const char *v19; // edi@58
  const char *v20; // edi@60
  const char *v21; // edi@62
  const char *v22; // edi@64
  char *v23; // eax@67
  Name5 *v24; // eax@77
  int v25; // eax@78
  int v26; // edx@78
  float v27; // eax@78
  const char *v28; // edi@79
  Char *v29; // eax@79
  Char *v30; // edi@79
  NiUnsharedGeometryGroup *v31; // eax@80
  Mover *v32; // edi@82
  const char *v33; // edi@85
  Name5 *v34; // eax@85
  VoteWin *v35; // ecx@85
  unsigned int v36; // edi@93
  unsigned int v37; // edi@94
  PgNet *v38; // ecx@95
  TargetWin *v39; // ecx@97
  MsgBox *v40; // edi@105
  ItemRepairWin *v41; // ecx@112
  D3DXCOLOR *v42; // eax@113
  float v43; // edx@113
  float v44; // edx@113
  float v45; // eax@113
  const char *v46; // eax@114
  PetNameEditWin *v47; // ecx@114
  unsigned __int16 v48; // ax@114
  const char *v49; // eax@115
  PetNameEditWin *v50; // ecx@115
  unsigned __int16 v51; // ax@115
  unsigned __int16 v52; // ax@116
  ChargedItemEffect *v53; // eax@118
  ItemInfo *v54; // eax@119
  char *v55; // eax@120
  char *v56; // eax@120
  MsgBox *v57; // eax@120
  unsigned int v58; // edx@121
  D3DXCOLOR v59; // [sp-14h] [bp-A4h]@113
  int v60; // [sp-4h] [bp-94h]@78
  float _fTime; // [sp+0h] [bp-90h]@47
  D3DXCOLOR result; // [sp+10h] [bp-80h]@113
  char pdata; // [sp+23h] [bp-6Dh]@96
  int netcmd; // [sp+24h] [bp-6Ch]@67
  D3DXCOLOR *kFrom; // [sp+28h] [bp-68h]@54
  Name5 v66; // [sp+2Ch] [bp-64h]@77
  Name5 v67; // [sp+40h] [bp-50h]@78
  PgMsg::Frame kOkMsg; // [sp+54h] [bp-3Ch]@121
  char acMainCharID[21]; // [sp+68h] [bp-28h]@85
  int v70; // [sp+8Ch] [bp-4h]@114

  v4 = this;
  switch ( iMsgTag )
  {
    case 57:
      v5 = this->m_pkMHAnnounceWin;
      if ( v5 )
        AnnounceWin::KillNoticing(v5);
      return;
    case 58:
      GameFrameWork::OnCloseMHConfigRoomInfoWin(this);
      return;
    case 60:
      GameFrameWork::OpenMHInfoWin(this, 0);
      return;
    case 66:
      v6 = (PgWin *)&this->m_pkMHEmotionWin->vfptr;
LABEL_7:
      if ( v6 )
        PgWinMgr::CloseWin(&Pgg_kWinMgr, v6);
      return;
    case 61:
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkPopupMenuWin->vfptr);
      mhInfoWin::ClearInfo(v4->m_pkMHInfoWin);
      mhPortalListWin::Clear(v4->m_pkMHPortalListWin);
      return;
    case 62:
      GameFrameWork::OpenMHInfoWin(this, *(DirectUserMsgBody_MHInfoTabChanged::TabEnum *)pvBody);
      return;
    case 63:
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkMHMouseControlWin->vfptr);
      return;
    case 64:
      PgFrameWork::AddMsg((PgFrameWork *)&this->vfptr, 0xE1u, 1u, 0);
      return;
    case 65:
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkMHMinimizeWin->vfptr);
      v7 = v4->m_pkMHCurrentWin;
      if ( v7 )
      {
        if ( !(unsigned __int8)((int (*)(void))v7->vfptr[65].__vecDelDtor)() )
          ((void (__stdcall *)(signed int))v4->m_pkMHCurrentWin->vfptr[64].__vecDelDtor)(1);
        PgWinMgr::CloseWin(&Pgg_kWinMgr, v4->m_pkMHCurrentWin);
      }
      return;
    case 23:
      GameFrameWork::NcUserPacketToZone(this, (DirectUserMsgBody_SendPacket *)pvBody);
      return;
    case 24:
      GameFrameWork::NcUserPacketToWorld(this, (DirectUserMsgBody_SendPacket *)pvBody);
      return;
    case 25:
      GameFrameWork::AddSysMsg(this, (const char *)pvBody);
      return;
    case 26:
      GameFrameWork::AddBattleMsg(this, (char *)pvBody);
      return;
    case 37:
      GameFrameWork::OnNpcDialogCommand(this, (DirectUserMsgBody_NpcDialogResponse *)pvBody);
      return;
    case 15:
      v8 = *(_DWORD *)pvBody;
      if ( *(_DWORD *)pvBody > 1005 )
      {
        switch ( v8 )
        {
          case 1020:
            v15 = (char *)*((_DWORD *)pvBody + 2);
            if ( v15 )
            {
              v16 = CharMgr::GetChar(&g_kCharMgr, v15);
              if ( v16 )
                GameFrameWork::TargetCharReq(v4, v16);
            }
            break;
          case 1021:
            v17 = (const char *)*((_DWORD *)pvBody + 2);
            if ( v17 )
            {
              kFrom = (D3DXCOLOR *)((char *)&v59 + 4);
              Name5::Name5((Name5 *)&v59.g, v17);
              GameFrameWork::NcRaidInvitationReq(v4, *(Name5 *)&v59.g);
            }
            break;
          case 1022:
            v18 = (const char *)*((_DWORD *)pvBody + 2);
            if ( v18 )
            {
              kFrom = (D3DXCOLOR *)((char *)&v59 + 4);
              Name5::Name5((Name5 *)&v59.g, v18);
              GameFrameWork::NcRaidVanishReq(v4, *(Name5 *)&v59.g);
            }
            break;
          case 1023:
            GameFrameWork::NcRaidLeaveReq(this);
            break;
          case 1024:
            v19 = (const char *)*((_DWORD *)pvBody + 2);
            if ( v19 )
            {
              kFrom = (D3DXCOLOR *)((char *)&v59 + 4);
              Name5::Name5((Name5 *)&v59.g, v19);
              GameFrameWork::NcRaidSetLeaderReq(v4, *(Name5 *)&v59.g);
            }
            break;
          case 1025:
            v20 = (const char *)*((_DWORD *)pvBody + 2);
            if ( v20 )
            {
              kFrom = (D3DXCOLOR *)((char *)&v59 + 4);
              Name5::Name5((Name5 *)&v59.g, v20);
              GameFrameWork::NcRaidSetLooterReq(v4, *(Name5 *)&v59.g);
            }
            break;
          case 1026:
            v21 = (const char *)*((_DWORD *)pvBody + 2);
            if ( v21 )
            {
              kFrom = (D3DXCOLOR *)((char *)&v59 + 4);
              Name5::Name5((Name5 *)&v59.g, v21);
              GameFrameWork::NcRaidSetSubLeaderReq(v4, *(Name5 *)&v59.g);
            }
            break;
          case 1027:
            v22 = (const char *)*((_DWORD *)pvBody + 2);
            if ( v22 )
            {
              kFrom = (D3DXCOLOR *)((char *)&v59 + 4);
              Name5::Name5((Name5 *)&v59.g, v22);
              GameFrameWork::NcRaidDelSubLeaderReq(v4, *(Name5 *)&v59.g);
            }
            break;
          case 1014:
            if ( RaidInfo::IsMeRaidMember(&g_kRaidinfo) )
            {
              v23 = (char *)*((_DWORD *)pvBody + 2);
              netcmd = 4;
              RaidInfo::FindIndexByName(&g_kRaidinfo, v23, (unsigned int *)&netcmd, (unsigned int *)&kFrom);
              if ( netcmd != 4 )
              {
                ExpeditionPartyWin::OpenPopupWin(v4->m_pkExpeditionPartyWin[netcmd], (unsigned int)kFrom);
                if ( !(unsigned __int8)((int (*)(void))v4->m_pkExpeditionPartyWin[netcmd]->vfptr[65].__vecDelDtor)() )
                {
                  if ( g_kParty.m_uiTotalMember )
                    PartyWinInterface::OpenPopMenuParty(v4->m_pkPartyWinInterface, *((char **)pvBody + 2));
                }
              }
            }
            else if ( g_kParty.m_uiTotalMember )
            {
              PartyWinInterface::OpenPopMenuParty(v4->m_pkPartyWinInterface, *((char **)pvBody + 2));
            }
            break;
          case 1031:
            if ( this->m_pkPopupMenuWin )
              PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkPopupMenuWin->vfptr);
            if ( v4->m_pkPartyLootSetupWin )
            {
              GameFrameWork::OpenPlayGuideWin(v4, BIL_PARTY_5);
              PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkPartyLootSetupWin->vfptr);
            }
            break;
          case 1034:
            Name5::Name5(&v66, *((const char **)pvBody + 2));
            GameFrameWork::NcCollectPeepingReq(v4, v24);
            break;
          case 1035:
            Name5::Name5(&v67, *((const char **)pvBody + 2));
            v59.g = *(float *)v25;
            v59.b = *(float *)(v25 + 4);
            v59.a = *(float *)(v25 + 8);
            v26 = *(_DWORD *)(v25 + 12);
            v27 = *(float *)(v25 + 16);
            v60 = v26;
            _fTime = v27;
            GameFrameWork::NcFriendSetReq(v4, *(Name5 *)&v59.g);
            break;
          case 1036:
            v28 = (const char *)*((_DWORD *)pvBody + 2);
            kFrom = (D3DXCOLOR *)((char *)&v59 + 4);
            Name5::Name5((Name5 *)&v59.g, v28);
            v29 = CharMgr::GetUserChar(&g_kCharMgr, *(Name5 *)&v59.g);
            v30 = v29;
            if ( v29 )
            {
              if ( (unsigned __int8)((int (__thiscall *)(Char *))v29->vfptr[15].Deaffect)(v29) )
              {
                v32 = v30->m_pkMover;
                if ( v32 )
                {
                  if ( Mover::GetNextSlot(v32, (unsigned int *)&kFrom) )
                    GameFrameWork::NcMoverRideOnReq(v4, v32->m_kHandle, (unsigned int)kFrom);
                }
              }
            }
            else
            {
              v31 = TextData3::Get(0x64868AD3u);
              GameFrameWork::AddSysMsg(v4, (const char *)v31);
            }
            break;
          case 1037:
            v33 = (const char *)*((_DWORD *)pvBody + 2);
            v34 = User::GetMainCharID(&g_kUser);
            Name5::n_string(v34, acMainCharID);
            v35 = v4->m_pkVoteWin;
            acMainCharID[20] = 0;
            VoteWin::SetProposerText(v35, acMainCharID);
            VoteWin::SetTargetText(v4->m_pkVoteWin, v33);
            GameFrameWork::NcKqVoteStartCheckReq(v4);
            break;
          default:
            return;
        }
      }
      else if ( *(_DWORD *)pvBody == 1005 )
      {
        HolyPromiseAddWin::SetTargetName(this->m_pkHolyPromiseAddWin, *((const char **)pvBody + 2));
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkHolyPromiseAddWin->vfptr);
      }
      else
      {
        switch ( v8 )
        {
          case 9:
            v6 = (PgWin *)&this->m_pkPopupMenuWin->vfptr;
            goto LABEL_7;
          case 5:
            if ( this->m_pkPopupMenuWin )
              PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkPopupMenuWin->vfptr);
            GameFrameWork::NcPartyLeaveReq(v4);
            return;
          case 4:
            v9 = (char *)*((_DWORD *)pvBody + 2);
            if ( v9 )
              GameFrameWork::NcPartyChangeMasterReq(this, v9);
            v6 = (PgWin *)&v4->m_pkPopupMenuWin->vfptr;
            goto LABEL_7;
          case 3:
            v10 = (char *)*((_DWORD *)pvBody + 2);
            if ( this->m_pkPopupMenuWin )
              PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkPopupMenuWin->vfptr);
            if ( v10 )
              GameFrameWork::NcPartyKickOffReq(v4, v10);
            break;
          case 2:
            v11 = (char *)*((_DWORD *)pvBody + 2);
            if ( this->m_pkPopupMenuWin )
              PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkPopupMenuWin->vfptr);
            if ( v11 )
              GameFrameWork::NcPartyJoinReq(v4, v11);
            break;
          case 1:
            v12 = *((_DWORD *)pvBody + 2);
            if ( this->m_pkPopupMenuWin )
              PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkPopupMenuWin->vfptr);
            if ( v12 )
              GameFrameWork::NcTradeProposeReq(v4, *(_WORD *)(v12 + 552));
            break;
          case 8:
            NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 4u, 0xB0u, 0, 0);
            break;
          case 10:
            v13 = ISingletonTask<GuildJoinReqTask>::Run();
            GuildJoinReqTask::SetTargetID(v13, *((char **)pvBody + 2));
            break;
          case 7:
            ChatDisplayWin2::OnWhisperTabToTarget(this->m_pkChatDisplayWin, *((char **)pvBody + 2));
            break;
          case 6:
            v14 = CharMgr::GetChar(&g_kCharMgr, *((char **)pvBody + 2));
            CNSTimer_Interval::ReSet(&v4->m_kStickTimer, Timer::ms_fCurTime);
            LODWORD(_fTime) = 1;
            v4->m_kStickTimer.m_fCheckTime = 1.0;
            GameFrameWork::Stick(v4, v14, SLOBYTE(_fTime));
            break;
          default:
            return;
        }
      }
      return;
    case 40:
      GameFrameWork::CloseCommunityWin(this);
      GameFrameWork::OpenCommunityWin(v4, *(DirectUserMsgBody_CommunityTabChanged::TabEnum *)pvBody);
      return;
    case 41:
      GuildWin::InvalidateGuildList(this->m_pkGuildWin);
      return;
    case 50:
      GuildWarStateWin::InvalidateGuildWarList(this->m_pkGuildWarStateWin);
      return;
    case 51:
      GuildWarStateWin::InvalidateGuildWarableList(this->m_pkGuildWarStateWin);
      return;
    case 45:
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkGuildWarStateWin->vfptr);
      return;
    case 46:
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkGuildWarInformWin->vfptr);
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkGuildWarInformWin->vfptr);
      GuildWarInformWin::SetText(v4->m_pkGuildWarInformWin, (char *)pvBody);
      return;
    case 71:
      GuildAcademyWin::InvalidateAcademy(this->m_pkGuildAcademyWin);
      return;
    case 52:
      v36 = *(_DWORD *)pvBody;
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkRoarWin->vfptr);
      RoarWin::SetLockInvPos(v4->m_pkRoarWin, v36);
      return;
    case 53:
      v37 = *(_DWORD *)pvBody;
      WingStoneWin::InitInformation(this->m_pkWingStoneWin);
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkWingStoneWin->vfptr);
      WingStoneWin::SetLockInvPos(v4->m_pkWingStoneWin, v37);
      return;
    case 54:
      NetMgr::SendUserLogOutMsg2WorldMgrServerForCharSelect(&g_kNetMgr);
      v38 = (PgNet *)&v4->m_spWorldMgrNet.m_pObject->vfptr;
      v4->m_bBackCharSelect = 1;
      LOWORD(netcmd) = 3103;
      if ( v38 )
      {
        PgNet::AddNetMsg(v38, &netcmd, 2);
        PgNet::SendNetMsg((PgNet *)&v4->m_spWorldMgrNet.m_pObject->vfptr, &pdata, 1);
      }
      return;
    case 76:
      v39 = this->m_pkTargetWin;
      if ( v39 )
        TargetWin::SetSoulCount(v39, 0, *(_BYTE *)pvBody, 0);
      return;
    case 27:
      if ( !this->m_pkRaidReplyWin.m_pObject )
        return;
      if ( *(_DWORD *)pvBody )
      {
        if ( *(_DWORD *)pvBody != 1 )
          goto LABEL_105;
        _fTime = 0.0;
      }
      else
      {
        LODWORD(_fTime) = 1;
      }
      GameFrameWork::NcRaidInvitationAnswerReq(this, SLOBYTE(_fTime));
LABEL_105:
      v40 = v4->m_pkRaidReplyWin.m_pObject;
      if ( v40 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v40->m_uiRefCount) && v40 )
          v40->vfptr->__vecDelDtor((NiRefObject *)v40, 1u);
        v4->m_pkRaidReplyWin.m_pObject = 0;
      }
      return;
    case 55:
      SkillWin::OpenProduceSkillSelectWin(this->m_pkSkillWin);
      return;
    case 67:
      SkillWin::OpenProduceSkillInitWin(this->m_pkSkillWin, *(_BYTE *)pvBody);
      return;
    case 72:
      v41 = this->m_pkItemRepairWin;
      LOWORD(kFrom) = *(_WORD *)pvBody;
      ItemRepairWin::SetRepairItemSlot(v41, (ITEM_INVEN)kFrom);
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkItemRepairWin->vfptr);
      return;
    case 73:
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkGuildWarInformWin->vfptr);
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkGTInformWin->vfptr);
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkGTInformWin->vfptr);
      v42 = ColorInfoTable::GetDxColor(&result, Chat_Announcement);
      v43 = v42->r;
      _fTime = 0.0;
      v60 = 0;
      v59.g = v42->g;
      v44 = v42->b;
      v45 = v42->a;
      v59.b = v44;
      v59.a = v45;
      GTInformWin::AddText(v4->m_pkGTInformWin, (char *)pvBody, v59, 0, 0.0);
      return;
    case 79:
      v46 = PetNameEditWin::GetName(this->m_pkPetNameEditWin);
      kFrom = (D3DXCOLOR *)((char *)&v59 + 8);
      Name4::Name4((Name4 *)&v59.b, v46);
      v47 = v4->m_pkPetNameEditWin;
      v70 = 0;
      v48 = PetNameEditWin::GetPetHandle(v47);
      v70 = -1;
      GameFrameWork::OpenPetDialog(v4, v48, *(Name4 *)&v59.b);
      return;
    case 80:
      v49 = PetNameEditWin::GetName(this->m_pkPetNameEditWin);
      kFrom = (D3DXCOLOR *)((char *)&v59 + 8);
      Name4::Name4((Name4 *)&v59.b, v49);
      v50 = v4->m_pkPetNameEditWin;
      v70 = 1;
      v51 = PetNameEditWin::GetPetHandle(v50);
      v70 = -1;
      GameFrameWork::NcPetSetNameReq(v51, *(Name4 *)&v59.b);
      return;
    case 81:
      v52 = PetNameEditWin::GetPetHandle(this->m_pkPetNameEditWin);
      GameFrameWork::NcPetSetNameCancelReq(v52);
      return;
    case 82:
      if ( pvBody )
      {
        v53 = ChargedEffectTable::GetByHandle(*((_WORD *)pvBody + 2));
        if ( v53 )
        {
          v54 = ItemInfoTab::GetByInxName(v53->ItemID);
          if ( v54 )
          {
            LODWORD(_fTime) = (char *)v54 + 34;
            v55 = (char *)TextData3::Get(0x6C788FA9u);
            v56 = fs(v55, _fTime);
            v57 = MsgBox::Modal(MSGBOX_OKCANCEL, v56, v60);
            if ( v57 )
            {
              v58 = *(_DWORD *)pvBody;
              kOkMsg.m_uiFrameMsg = 270;
              kOkMsg.m_uiFrameWParam = v58;
              MsgBox::SetFrameWorkMsgOnClose(v57, (PgFrameWork *)&v4->vfptr, &kOkMsg, 0);
            }
          }
        }
      }
      return;
    default:
      return;
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0049B600) --------------------------------------------------------
NiRTTI *NiIntegerExtraData::GetRTTI()
{
  return &NiIntegerExtraData::m_RTTI;
}

//----- (0049B610) --------------------------------------------------------
ActionViewInfo *__cdecl IIDTableBase<ActionViewInfo,ActionViewTable,unsigned short>::GetByID(int uiId)
{
  int v1; // esi@1
  ActionViewInfo *result; // eax@2
  int v3; // ecx@4

  v1 = ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable
                                                        + 16))(
                          ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable,
                          uiId)
    && (unsigned __int16)uiId <= *(_WORD *)(v1 + 200)
    && (v3 = *(_DWORD *)(v1 + 196), *(_DWORD *)(v3 + 4 * (unsigned __int16)uiId)) )
  {
    result = *(ActionViewInfo **)(v3 + 4 * (unsigned __int16)uiId);
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;

//----- (0049B660) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *>::~NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *>(NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *> *this)
{
  this->vfptr = (NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *>Vtbl *)&NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *>::`vftable';
}
// 981C8C: using guessed type int (__thiscall *NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *>::`vftable')(void *p, char);

//----- (0049B670) --------------------------------------------------------
NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *> *__thiscall NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *>::`vector deleting destructor'(NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *> *this, unsigned int a2)
{
  NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *>Vtbl *)&NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 981C8C: using guessed type int (__thiscall *NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *>::`vftable')(void *p, char);

//----- (0049B6A0) --------------------------------------------------------
void __thiscall Name4::Name4(Name4 *this, const char *str)
{
  *(_QWORD *)&this->n4_code[2] = 0i64;
  *(_QWORD *)&this->n4_code[0] = 0i64;
  strncpy((char *)this->n4_code, (char *)str, 0x10u);
}

//----- (0049B6D0) --------------------------------------------------------
void __thiscall MiniHouseIndoor::SetBuildingRoomInfo(MiniHouseIndoor *this, PROTO_NC_MINIHOUSE_BUILDING_REQ k)
{
  MiniHouseIndoor *v2; // ebx@1
  char v3; // [sp+Ch] [bp-8Ch]@1
  char v4; // [sp+Dh] [bp-8Bh]@1
  char source; // [sp+16h] [bp-82h]@1
  char v6; // [sp+90h] [bp-8h]@1

  v2 = this;
  qmemcpy(&v3, &k, 0x84u);
  v6 = k.sNotify[100];
  strncpy(this->m_BuildingInfo.title, &source, 0x14u);
  strncpy(v2->m_BuildingInfo.password, &v4, 8u);
  v2->m_BuildingInfo.maxvisiter = v3;
}

//----- (0049B750) --------------------------------------------------------
void __thiscall KeyboardMoveProcess::Clear(KeyboardMoveProcess *this)
{
  *(_DWORD *)&this->m_bDownFront = 0;
  *(_DWORD *)&this->m_bOldDown = 0;
  *(_WORD *)&this->m_bOldDownBack = 0;
  this->m_bOlddownLeft = 0;
  this->m_pos3LastPos = NiPoint3::ZERO;
  this->m_pos3CurPos = NiPoint3::ZERO;
  this->m_pos3CameraDir = NiPoint3::ZERO;
  this->m_pos3MoveDir = NiPoint3::ZERO;
  this->m_pos3TargetPos = NiPoint3::ZERO;
}

//----- (0049B7F0) --------------------------------------------------------
Name5 *__thiscall Party::GetJoinProposeCharID(Party *this, Name5 *result)
{
  Name5 *v2; // eax@1

  v2 = result;
  *(_QWORD *)&result->n5_code[0] = *(_QWORD *)&this->m_kJoinProposeCharID.n5_name[0];
  result->n5_code[2] = this->m_kJoinProposeCharID.n5_code[2];
  *(_QWORD *)&result->n5_code[3] = *(_QWORD *)&this->m_kJoinProposeCharID.n5_code[3];
  return v2;
}

//----- (0049B820) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>::~NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>(NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>::`vftable';
}
// 981C6C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>::`vftable')(void *p, char);

//----- (0049B830) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<PgWin *>,PgWin *>::~NiTListBase<DFALL<PgWin *>,PgWin *>(NiTListBase<DFALL<PgWin *>,PgWin *> *this)
{
  this->vfptr = (NiTListBase<DFALL<PgWin *>,PgWin *>Vtbl *)&NiTListBase<DFALL<PgWin *>,PgWin *>::`vftable';
}
// 981C7C: using guessed type int (__thiscall *NiTListBase<DFALL<PgWin *>,PgWin *>::`vftable')(void *p, char);

//----- (0049B840) --------------------------------------------------------
unsigned int __cdecl ITableBase<MobViewInfo,MobViewInfoTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<MobViewInfo,MobViewInfoTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C29C: using guessed type int ITableBase<MobViewInfo,MobViewInfoTab>::ms_pkTable;

//----- (0049B860) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 981C6C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>::`vftable')(void *p, char);

//----- (0049B890) --------------------------------------------------------
NiTListBase<DFALL<PgWin *>,PgWin *> *__thiscall NiTListBase<DFALL<PgWin *>,PgWin *>::`vector deleting destructor'(NiTListBase<DFALL<PgWin *>,PgWin *> *this, unsigned int a2)
{
  NiTListBase<DFALL<PgWin *>,PgWin *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<PgWin *>,PgWin *>Vtbl *)&NiTListBase<DFALL<PgWin *>,PgWin *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 981C7C: using guessed type int (__thiscall *NiTListBase<DFALL<PgWin *>,PgWin *>::`vftable')(void *p, char);

//----- (0049B8C0) --------------------------------------------------------
void __thiscall NiTPointerList<unsigned int>::~NiTPointerList<unsigned int>(NiTPointerList<unsigned int> *this)
{
  NiTPointerList<unsigned int> *v1; // edi@1
  NiTListItem<unsigned int> *v2; // esi@1
  NiTListItem<unsigned int> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,unsigned int>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>::`vftable';
}
// 981C6C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>::`vftable')(void *p, char);
// 981C9C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,unsigned int>::`vftable')(void *p, char);

//----- (0049B940) --------------------------------------------------------
void __thiscall MHDiceRewardMoneyWin::SetAmout(MHDiceRewardMoneyWin *this, unsigned __int64 money)
{
  MHDiceRewardMoneyWin *v2; // esi@1
  __int64 v3; // rax@1
  __int64 v4; // rax@1
  __int64 v5; // rax@1
  __int64 v6; // rax@1
  char acStr[128]; // [sp+Ch] [bp-84h]@1

  v2 = this;
  v3 = User::GetGem(money);
  sprintf(acStr, "%I64d", v3);
  ((void (__stdcall *)(_DWORD))v2->m_pkGemText.m_pObject->vfptr[118].__vecDelDtor)(acStr);
  v4 = User::GetGold(money);
  sprintf(acStr, "%I64d", v4);
  ((void (__stdcall *)(_DWORD))v2->m_pkGoldText.m_pObject->vfptr[118].__vecDelDtor)(acStr);
  v5 = User::GetSilver(money);
  sprintf(acStr, "%I64d", v5);
  ((void (__stdcall *)(_DWORD))v2->m_pkSilverText.m_pObject->vfptr[118].__vecDelDtor)(acStr);
  v6 = User::GetCopper(money);
  sprintf(acStr, "%I64d", v6);
  ((void (__stdcall *)(_DWORD))v2->m_pkCopperText.m_pObject->vfptr[118].__vecDelDtor)(acStr);
}

//----- (0049BA50) --------------------------------------------------------
void __thiscall AnnounceWin::KillNoticing(AnnounceWin *this)
{
  AnnounceWin *v1; // ebx@1
  PgFadeTextGeometry **v2; // esi@1
  signed int v3; // edi@1

  v1 = this;
  v2 = (PgFadeTextGeometry **)this->m_aspTextGeom;
  v3 = 3;
  do
  {
    ((void (__stdcall *)(_DWORD))(*v2)->vfptr[37].__vecDelDtor)(&unk_96F8EB);
    PgFadeTextGeometry::SetLifeTime(*v2, -1.0);
    ++v2;
    --v3;
  }
  while ( v3 );
  v1->m_bNotice = 0;
}

//----- (0049BAA0) --------------------------------------------------------
void __thiscall NiTPointerListBase<DFALL<PgWin *>,PgWin *>::NiTPointerListBase<DFALL<PgWin *>,PgWin *>(NiTPointerListBase<DFALL<PgWin *>,PgWin *> *this)
{
  this->m_kAllocator.m_uiCount = 0;
  this->m_pkHead = 0;
  this->m_pkTail = 0;
  this->vfptr = (NiTListBase<DFALL<PgWin *>,PgWin *>Vtbl *)&NiTPointerListBase<DFALL<PgWin *>,PgWin *>::`vftable';
}
// 981CB4: using guessed type int (__thiscall *NiTPointerListBase<DFALL<PgWin *>,PgWin *>::`vftable')(void *p, char);

//----- (0049BAC0) --------------------------------------------------------
NiIntegerExtraData *__thiscall NiIntegerExtraData::`scalar deleting destructor'(NiIntegerExtraData *this, unsigned int a2)
{
  NiIntegerExtraData *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiIntegerExtraData::`vftable';
  NiExtraData::~NiExtraData((NiExtraData *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 981C24: using guessed type int (__thiscall *NiIntegerExtraData::`vftable')(void *p, char);

//----- (0049BAF0) --------------------------------------------------------
unsigned int __cdecl ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C1A0: using guessed type int ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::ms_pkTable;

//----- (0049BB10) --------------------------------------------------------
unsigned int __cdecl ITableBase<ActionEffectItem,ActionEffectItemTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<ActionEffectItem,ActionEffectItemTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C1A8: using guessed type int ITableBase<ActionEffectItem,ActionEffectItemTab>::ms_pkTable;

//----- (0049BB30) --------------------------------------------------------
NiNode *__thiscall ResElement::GetNiNode(ResElement *this)
{
  NiActorManager *v1; // eax@2
  NiNode *result; // eax@3

  if ( this->m_bIsCanAnimation && (v1 = this->m_pActorMgr.m_pObject) != 0 )
    result = (NiNode *)v1->m_spNIFRoot.m_pObject;
  else
    result = this->m_pNiNode.m_pObject;
  return result;
}

//----- (0049BB50) --------------------------------------------------------
void __thiscall mhSettingWin::SetPassWord(mhSettingWin *this, char *pcPassWord)
{
  mhSettingWin *v2; // esi@1
  int v3; // [sp+0h] [bp-8h]@0

  v2 = this;
  ((void (__stdcall *)(char *))this->m_spEdit[2].m_pObject->vfptr[115].__vecDelDtor)(pcPassWord);
  ((void (*)(void))v2->m_spEdit[2].m_pObject->vfptr[113].__vecDelDtor)();
  if ( pcPassWord && (NiUnsharedGeometryGroup *)pcPassWord != &unk_96F8EB )
  {
    v2->m_spCheckBox[0]->m_bCheck = 1;
    ((void (__stdcall *)(signed int, int))v2->m_spEdit[2].m_pObject->vfptr[60].__vecDelDtor)(1, v3);
    ((void (__cdecl *)(signed int))v2->m_spEdit[2].m_pObject->vfptr[64].__vecDelDtor)(1);
  }
  else
  {
    v2->m_spCheckBox[0]->m_bCheck = 0;
    ((void (__stdcall *)(signed int, int))v2->m_spEdit[2].m_pObject->vfptr[121].__vecDelDtor)(1, v3);
    ((void (__stdcall *)(_DWORD))v2->m_spEdit[2].m_pObject->vfptr[60].__vecDelDtor)(0);
    ((void (__cdecl *)(_DWORD))v2->m_spEdit[2].m_pObject->vfptr[64].__vecDelDtor)(0);
  }
}

//----- (0049BC00) --------------------------------------------------------
int __thiscall mhJoinWin::GetMaxPerson(mhJoinWin *this)
{
  const char *v1; // eax@1

  v1 = (const char *)((int (*)(void))this->m_spEdit[1].m_pObject->vfptr[113].__vecDelDtor)();
  return atoi(v1);
}

//----- (0049BC20) --------------------------------------------------------
void __thiscall mhJoinWin::SetMaxPerson(mhJoinWin *this, int PersonCount)
{
  mhJoinWin *v2; // esi@1

  v2 = this;
  _itoa(PersonCount, (char *)&PersonCount, 10);
  ((void (__stdcall *)(_DWORD))v2->m_spEdit[1].m_pObject->vfptr[115].__vecDelDtor)(&PersonCount);
}

//----- (0049BC60) --------------------------------------------------------
void __thiscall mhJoinWin::CheckEnable(mhJoinWin *this, mhJoinWin::CheckBoxIndex eIndex, int b)
{
  mhJoinWin *v3; // esi@1

  v3 = this;
  this->m_spCheckBox[eIndex]->m_bCheck = b;
  if ( eIndex == Box_PassWord )
  {
    if ( !(_BYTE)b )
      ((void (__stdcall *)(_DWORD))this->m_spEdit[2].m_pObject->vfptr[121].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v3->m_spEdit[2].m_pObject->vfptr[60].__vecDelDtor)(b);
    ((void (__stdcall *)(_DWORD))v3->m_spEdit[2].m_pObject->vfptr[64].__vecDelDtor)(b);
  }
}

//----- (0049BCC0) --------------------------------------------------------
void __thiscall PgTList<unsigned int>::~PgTList<unsigned int>(PgTList<unsigned int> *this)
{
  PgTList<unsigned int> *v1; // edi@1
  NiTListItem<unsigned int> *v2; // esi@1
  NiTListItem<unsigned int> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>Vtbl *)&PgTList<unsigned int>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>::`vftable';
}
// 981C6C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>::`vftable')(void *p, char);
// 981CDC: using guessed type int (__thiscall *PgTList<unsigned int>::`vftable')(void *p, char);

//----- (0049BD40) --------------------------------------------------------
PgTList<unsigned int> *__thiscall PgTList<unsigned int>::`vector deleting destructor'(PgTList<unsigned int> *this, unsigned int a2)
{
  PgTList<unsigned int> *v2; // edi@1
  NiTListItem<unsigned int> *v3; // esi@1
  NiTListItem<unsigned int> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>Vtbl *)&PgTList<unsigned int>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 981C6C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>::`vftable')(void *p, char);
// 981CDC: using guessed type int (__thiscall *PgTList<unsigned int>::`vftable')(void *p, char);

//----- (0049BDD0) --------------------------------------------------------
ActionViewInfo *__cdecl ActionViewTable::GetByEventCode(unsigned int nEventCode)
{
  unsigned int v1; // esi@1
  ActionViewInfo *result; // eax@4

  v1 = 0;
  if ( ITableBase<ActionViewInfo,ActionViewTable>::GetTotal() )
  {
    while ( *(_DWORD *)(CDataReader::GetRecord(
                          (CDataReader *)(ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable + 4),
                          v1)
                      + 105) != nEventCode )
    {
      if ( ++v1 >= ITableBase<ActionViewInfo,ActionViewTable>::GetTotal() )
        goto LABEL_4;
    }
    result = (ActionViewInfo *)CDataReader::GetRecord(
                                 (CDataReader *)(ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable + 4),
                                 v1);
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;

//----- (0049BE20) --------------------------------------------------------
ItemActionEffectDesc *__cdecl ItemActionEffectDescTab::GetByItemActionID(unsigned int uiIndex)
{
  unsigned int v1; // esi@1
  ItemActionEffectDesc *result; // eax@4

  v1 = 0;
  if ( ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::GetTotal() )
  {
    while ( *(_WORD *)CDataReader::GetRecord(
                        (CDataReader *)(ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::ms_pkTable + 4),
                        v1) != uiIndex )
    {
      if ( ++v1 >= ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::GetTotal() )
        goto LABEL_4;
    }
    result = (ItemActionEffectDesc *)CDataReader::GetRecord(
                                       (CDataReader *)(ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::ms_pkTable
                                                     + 4),
                                       v1);
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}
// A8C1A0: using guessed type int ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::ms_pkTable;

//----- (0049BE70) --------------------------------------------------------
ActionEffectItem *__cdecl ActionEffectItemTab::GetByItemID(unsigned int uiIndex)
{
  unsigned int v1; // esi@1
  char *v2; // eax@2
  ActionEffectItem *result; // eax@5

  v1 = 0;
  if ( ITableBase<ActionEffectItem,ActionEffectItemTab>::GetTotal() )
  {
    while ( 1 )
    {
      v2 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActionEffectItem,ActionEffectItemTab>::ms_pkTable + 4), v1);
      if ( v2 )
      {
        if ( *(_WORD *)v2 == uiIndex )
          break;
      }
      if ( ++v1 >= ITableBase<ActionEffectItem,ActionEffectItemTab>::GetTotal() )
        goto LABEL_5;
    }
    result = (ActionEffectItem *)CDataReader::GetRecord(
                                   (CDataReader *)(ITableBase<ActionEffectItem,ActionEffectItemTab>::ms_pkTable + 4),
                                   v1);
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}
// A8C1A8: using guessed type int ITableBase<ActionEffectItem,ActionEffectItemTab>::ms_pkTable;

//----- (0049BEC0) --------------------------------------------------------
void __cdecl BasicInfoLinkTab::GetSkipList(PgTList<unsigned int> *pkSkipList)
{
  PgTList<unsigned int> *v1; // esi@1
  unsigned int v2; // ebx@1
  int v3; // eax@2
  char *v4; // eax@6
  int v5; // edi@8
  int v6; // eax@8
  _DWORD *v7; // ecx@8
  PgTList<unsigned int> *pkSkipLista; // [sp+10h] [bp+8h]@3

  v1 = pkSkipList;
  v2 = 0;
  if ( pkSkipList )
  {
    v3 = *(_DWORD *)(ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable + 56);
    pkSkipLista = (PgTList<unsigned int> *)(v3 ? *(_DWORD *)(v3 + 40) : 0);
    if ( (unsigned int)pkSkipLista > 0 )
    {
      do
      {
        v4 = CDataReader::GetRecord((CDataReader *)(ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable + 4), v2);
        if ( v4 && v4[76] )
        {
          v5 = *((_DWORD *)v4 + 1);
          v6 = (int)v1->vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int> *)v1);
          *(_DWORD *)(v6 + 8) = v5;
          *(_DWORD *)v6 = 0;
          *(_DWORD *)(v6 + 4) = v1->m_pkTail;
          v7 = &v1->m_pkTail->m_pkNext;
          if ( v7 )
            *v7 = v6;
          else
            v1->m_pkHead = (NiTListItem<unsigned int> *)v6;
          ++v1->m_kAllocator.m_uiCount;
          v1->m_pkTail = (NiTListItem<unsigned int> *)v6;
        }
        ++v2;
      }
      while ( v2 < (unsigned int)pkSkipLista );
    }
  }
}
// A8C1F8: using guessed type int ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable;

//----- (0049BF50) --------------------------------------------------------
CollectCard *__cdecl CollectCardTab::GetByCardID(unsigned int uiCardID)
{
  int v1; // eax@1
  unsigned int v2; // edi@2
  unsigned int v3; // esi@4
  CollectCard *result; // eax@5

  v1 = *(_DWORD *)(ITableBase<CollectCard,CollectCardTab>::ms_pkTable + 56);
  if ( v1 )
    v2 = *(_DWORD *)(v1 + 40);
  else
    v2 = 0;
  v3 = 0;
  if ( v2 )
  {
    while ( 1 )
    {
      result = (CollectCard *)CDataReader::GetRecord(
                                (CDataReader *)(ITableBase<CollectCard,CollectCardTab>::ms_pkTable + 4),
                                v3);
      if ( result )
      {
        if ( result->CC_CardID == (_WORD)uiCardID )
          break;
      }
      if ( ++v3 >= v2 )
        goto LABEL_8;
    }
  }
  else
  {
LABEL_8:
    result = 0;
  }
  return result;
}
// A8C210: using guessed type int ITableBase<CollectCard,CollectCardTab>::ms_pkTable;

//----- (0049BFA0) --------------------------------------------------------
CollectCardTitle *__cdecl CollectCardTitleTab::GetByItemInx(const char *pcItemInx)
{
  int v1; // eax@1
  unsigned int v2; // esi@1
  char *v3; // eax@5
  char *v4; // ebx@5
  char *v5; // eax@6
  char v6; // cl@7
  unsigned int v7; // eax@8
  unsigned int i; // [sp+Ch] [bp-8h]@4
  unsigned int v10; // [sp+10h] [bp-4h]@2

  v1 = *(_DWORD *)(ITableBase<CollectCardTitle,CollectCardTitleTab>::ms_pkTable + 56);
  v2 = 0;
  if ( v1 )
    v10 = *(_DWORD *)(v1 + 40);
  else
    v10 = 0;
  i = 0;
  if ( v10 <= 0 )
    return 0;
  while ( 1 )
  {
    v3 = CDataReader::GetRecord((CDataReader *)(ITableBase<CollectCardTitle,CollectCardTitleTab>::ms_pkTable + 4), v2);
    v4 = v3;
    if ( v3 )
      break;
LABEL_11:
    i = ++v2;
    if ( v2 >= v10 )
      return 0;
  }
  v5 = v3 + 4;
  do
    v6 = *v5++;
  while ( v6 );
  v7 = v5 - (v4 + 5);
  if ( v7 != strlen(pcItemInx) || strncmp(v4 + 4, pcItemInx, v7) )
  {
    v2 = i;
    goto LABEL_11;
  }
  return (CollectCardTitle *)v4;
}
// A8C220: using guessed type int ITableBase<CollectCardTitle,CollectCardTitleTab>::ms_pkTable;

//----- (0049C040) --------------------------------------------------------
MinimonInfo *__cdecl MinimonInfoTable::GetMinimonInfoByIDX(char *pcItemIDX)
{
  char *v1; // ebx@1
  int v2; // eax@3
  unsigned int v3; // edi@4
  unsigned int v4; // esi@6
  MinimonInfo *result; // eax@7

  v1 = pcItemIDX;
  if ( pcItemIDX && *pcItemIDX )
  {
    v2 = *(_DWORD *)(ITableBase<MinimonInfo,MinimonInfoTable>::ms_pkTable + 56);
    if ( v2 )
      v3 = *(_DWORD *)(v2 + 40);
    else
      v3 = 0;
    v4 = 0;
    if ( v3 )
    {
      do
      {
        result = (MinimonInfo *)CDataReader::GetRecord(
                                  (CDataReader *)(ITableBase<MinimonInfo,MinimonInfoTable>::ms_pkTable + 4),
                                  v4);
        if ( result )
        {
          if ( !strcmp(result->ItemIDX, v1) )
            return result;
          v1 = pcItemIDX;
        }
        ++v4;
      }
      while ( v4 < v3 );
    }
    result = 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C25C: using guessed type int ITableBase<MinimonInfo,MinimonInfoTable>::ms_pkTable;

//----- (0049C0D0) --------------------------------------------------------
void __thiscall NiTList<PgWin *>::~NiTList<PgWin *>(NiTList<PgWin *> *this)
{
  NiTList<PgWin *> *v1; // edi@1
  NiTListItem<PgWin *> *v2; // esi@1
  NiTListItem<PgWin *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<DFALL<PgWin *>,PgWin *>Vtbl *)&NiTPointerListBase<DFALL<PgWin *>,PgWin *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<DFALL<PgWin *>,PgWin *>Vtbl *)&NiTListBase<DFALL<PgWin *>,PgWin *>::`vftable';
}
// 981C7C: using guessed type int (__thiscall *NiTListBase<DFALL<PgWin *>,PgWin *>::`vftable')(void *p, char);
// 981CB4: using guessed type int (__thiscall *NiTPointerListBase<DFALL<PgWin *>,PgWin *>::`vftable')(void *p, char);

//----- (0049C150) --------------------------------------------------------
NiTList<PgWin *> *__thiscall NiTPointerListBase<DFALL<PgWin *>,PgWin *>::`vector deleting destructor'(NiTList<PgWin *> *this, unsigned int a2)
{
  NiTList<PgWin *> *v2; // edi@1
  NiTListItem<PgWin *> *v3; // esi@1
  NiTListItem<PgWin *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<PgWin *>,PgWin *>Vtbl *)&NiTPointerListBase<DFALL<PgWin *>,PgWin *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<PgWin *>,PgWin *>Vtbl *)&NiTListBase<DFALL<PgWin *>,PgWin *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 981C7C: using guessed type int (__thiscall *NiTListBase<DFALL<PgWin *>,PgWin *>::`vftable')(void *p, char);
// 981CB4: using guessed type int (__thiscall *NiTPointerListBase<DFALL<PgWin *>,PgWin *>::`vftable')(void *p, char);

//----- (0049C1E0) --------------------------------------------------------
void __thiscall NiTList<ScriptBtn *>::~NiTList<ScriptBtn *>(NiTList<ScriptBtn *> *this)
{
  NiTList<ScriptBtn *> *v1; // edi@1
  NiTListItem<ScriptBtn *> *v2; // esi@1
  NiTListItem<ScriptBtn *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *>Vtbl *)&NiTPointerListBase<DFALL<ScriptBtn *>,ScriptBtn *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *>Vtbl *)&NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *>::`vftable';
}
// 981C8C: using guessed type int (__thiscall *NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *>::`vftable')(void *p, char);
// 981CCC: using guessed type int (__thiscall *NiTPointerListBase<DFALL<ScriptBtn *>,ScriptBtn *>::`vftable')(void *p, char);

//----- (0049C260) --------------------------------------------------------
NiTPointerListBase<DFALL<ScriptBtn *>,ScriptBtn *> *__thiscall NiTPointerListBase<DFALL<ScriptBtn *>,ScriptBtn *>::`vector deleting destructor'(NiTPointerListBase<DFALL<ScriptBtn *>,ScriptBtn *> *this, unsigned int a2)
{
  NiTPointerListBase<DFALL<ScriptBtn *>,ScriptBtn *> *v2; // edi@1
  NiTListItem<ScriptBtn *> *v3; // esi@1
  NiTListItem<ScriptBtn *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *>Vtbl *)&NiTPointerListBase<DFALL<ScriptBtn *>,ScriptBtn *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *>Vtbl *)&NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 981C8C: using guessed type int (__thiscall *NiTListBase<DFALL<ScriptBtn *>,ScriptBtn *>::`vftable')(void *p, char);
// 981CCC: using guessed type int (__thiscall *NiTPointerListBase<DFALL<ScriptBtn *>,ScriptBtn *>::`vftable')(void *p, char);

//----- (0049C2F0) --------------------------------------------------------
NiTPointerList<unsigned int> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,unsigned int>::`vector deleting destructor'(NiTPointerList<unsigned int> *this, unsigned int a2)
{
  NiTPointerList<unsigned int> *v2; // edi@1
  NiTListItem<unsigned int> *v3; // esi@1
  NiTListItem<unsigned int> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,unsigned int>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 981C6C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>::`vftable')(void *p, char);
// 981C9C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,unsigned int>::`vftable')(void *p, char);

//----- (0049C380) --------------------------------------------------------
D3DXCOLOR *__cdecl ColorInfoTable::GetDxColor(D3DXCOLOR *result, ColorID eColorID)
{
  char *v3; // eax@4
  char v4; // [sp-4h] [bp-8h]@2

  if ( !*(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable )
  {
    v4 = -1;
LABEL_3:
    Color::GetDxColor(result, -1, 0, -1, v4);
    return result;
  }
  v3 = CDataReader::GetRecord(
         (CDataReader *)(*(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable + 4),
         eColorID);
  v4 = -1;
  if ( !v3 )
    goto LABEL_3;
  Color::GetDxColor(result, v3[4], v3[5], v3[6], -1);
  return result;
}

//----- (0049C3F0) --------------------------------------------------------
MobViewInfo *__cdecl MobViewInfoTab::GetByID(unsigned __int16 byID)
{
  MobViewInfo *result; // eax@2
  unsigned int v2; // esi@3

  if ( byID == -1 )
  {
    result = 0;
  }
  else
  {
    v2 = 0;
    if ( ITableBase<MobViewInfo,MobViewInfoTab>::GetTotal() )
    {
      while ( 1 )
      {
        result = (MobViewInfo *)CDataReader::GetRecord(
                                  (CDataReader *)(ITableBase<MobViewInfo,MobViewInfoTab>::ms_pkTable + 4),
                                  v2);
        if ( result->ID == byID )
          break;
        if ( ++v2 >= ITableBase<MobViewInfo,MobViewInfoTab>::GetTotal() )
          goto LABEL_6;
      }
    }
    else
    {
LABEL_6:
      result = 0;
    }
  }
  return result;
}
// A8C29C: using guessed type int ITableBase<MobViewInfo,MobViewInfoTab>::ms_pkTable;

//----- (0049C440) --------------------------------------------------------
MiniHouseObjAni *__cdecl MiniHouseObjAniInfoTab::GetObjInfobyhnd(unsigned __int16 handle)
{
  int v1; // eax@1
  unsigned int v2; // edi@2
  unsigned int v3; // esi@4
  MiniHouseObjAni *result; // eax@7

  v1 = *(_DWORD *)(ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::ms_pkTable + 56);
  if ( v1 )
    v2 = *(_DWORD *)(v1 + 40);
  else
    v2 = 0;
  v3 = 0;
  if ( v2 )
  {
    while ( handle != *(_WORD *)CDataReader::GetRecord(
                                  (CDataReader *)(ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::ms_pkTable + 4),
                                  v3) )
    {
      if ( ++v3 >= v2 )
        goto LABEL_7;
    }
    result = (MiniHouseObjAni *)CDataReader::GetRecord(
                                  (CDataReader *)(ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::ms_pkTable + 4),
                                  v3);
  }
  else
  {
LABEL_7:
    result = 0;
  }
  return result;
}
// A8C150: using guessed type int ITableBase<MiniHouseObjAni,MiniHouseObjAniInfoTab>::ms_pkTable;

//----- (0049C4A0) --------------------------------------------------------
char *__thiscall mhInfoWin::GetTitle(mhInfoWin *this)
{
  char *result; // eax@2

  if ( this->m_FullTitleName._Mysize )
  {
    result = this->m_FullTitleName._Bx._Buf;
    if ( this->m_FullTitleName._Myres >= 0x10 )
      result = *(char **)result;
  }
  else
  {
    result = (char *)((int (*)(void))this->m_pkTextFieldWin[1]->vfptr[121].__vecDelDtor)();
  }
  return result;
}

//----- (0049C4D0) --------------------------------------------------------
void __thiscall mhSettingWin::Refresh(mhSettingWin *this, char *pcTitle, char *pcPassWord, int PersonCount, bool bItemView, char *pcNotice)
{
  mhSettingWin *v6; // esi@1

  v6 = this;
  ((void (__stdcall *)(_DWORD))this->m_spEdit[0].m_pObject->vfptr[115].__vecDelDtor)(pcTitle);
  ((void (__stdcall *)(_DWORD))v6->m_spEdit[3].m_pObject->vfptr[115].__vecDelDtor)(pcNotice);
  v6->m_spCheckBox[1]->m_bCheck = bItemView;
  mhSettingWin::SetPassWord(v6, pcPassWord);
  _itoa(PersonCount, (char *)&bItemView, 10);
  ((void (__stdcall *)(_DWORD))v6->m_spEdit[1].m_pObject->vfptr[115].__vecDelDtor)(&bItemView);
}

//----- (0049C550) --------------------------------------------------------
void __thiscall mhJoinWin::SetPassWord(mhJoinWin *this, char *pcPassWord)
{
  mhJoinWin *v2; // esi@1
  unsigned int v3; // kr00_4@1
  ColumnBut *v4; // ecx@1
  int v5; // [sp+0h] [bp-4h]@0

  v2 = this;
  ((void (__stdcall *)(char *))this->m_spEdit[2].m_pObject->vfptr[115].__vecDelDtor)(pcPassWord);
  v3 = strlen((const char *)((int (*)(void))v2->m_spEdit[2].m_pObject->vfptr[113].__vecDelDtor)());
  v4 = v2->m_spCheckBox[0];
  if ( v3 )
  {
    v4->m_bCheck = 1;
    ((void (__stdcall *)(signed int, int))v2->m_spEdit[2].m_pObject->vfptr[60].__vecDelDtor)(1, v5);
    ((void (__cdecl *)(signed int))v2->m_spEdit[2].m_pObject->vfptr[64].__vecDelDtor)(1);
  }
  else
  {
    v4->m_bCheck = 0;
    ((void (__stdcall *)(signed int, int))v2->m_spEdit[2].m_pObject->vfptr[121].__vecDelDtor)(1, v5);
    ((void (__stdcall *)(_DWORD))v2->m_spEdit[2].m_pObject->vfptr[60].__vecDelDtor)(0);
    ((void (__cdecl *)(_DWORD))v2->m_spEdit[2].m_pObject->vfptr[64].__vecDelDtor)(0);
  }
}

//----- (0049C5F0) --------------------------------------------------------
ChargedItemEffect *__cdecl ChargedEffectTable::GetByHandle(unsigned __int16 wHandle)
{
  unsigned int v1; // esi@1
  ChargedItemEffect *result; // eax@2

  v1 = 0;
  if ( ITableBase<ChargedItemEffect,ChargedEffectTable>::GetTotal() )
  {
    while ( 1 )
    {
      result = (ChargedItemEffect *)CDataReader::GetRecord(
                                      (CDataReader *)(ITableBase<ChargedItemEffect,ChargedEffectTable>::ms_pkTable + 4),
                                      v1);
      if ( result )
      {
        if ( result->Handle == wHandle )
          break;
      }
      if ( ++v1 >= ITableBase<ChargedItemEffect,ChargedEffectTable>::GetTotal() )
        goto LABEL_5;
    }
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}
// A886E0: using guessed type int ITableBase<ChargedItemEffect,ChargedEffectTable>::ms_pkTable;

//----- (0049C630) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<enum  OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const,EffectViewInfo *>>> *,std::less<enum  OscTarget>,std::allocator<std::pair<enum  OscTarget const,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const,EffectViewInfo *>>> *>>,0>>::_Lrotate(std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *_Wherenode)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v3; // ecx@3
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v4; // ecx@5

  v2 = _Wherenode->_Right;
  _Wherenode->_Right = v2->_Left;
  if ( !v2->_Left->_Isnil )
    v2->_Left->_Parent = _Wherenode;
  v2->_Parent = _Wherenode->_Parent;
  v3 = this->_Myhead;
  if ( _Wherenode == v3->_Parent )
  {
    v3->_Parent = v2;
    v2->_Left = _Wherenode;
    _Wherenode->_Parent = v2;
  }
  else
  {
    v4 = _Wherenode->_Parent;
    if ( _Wherenode == v4->_Left )
    {
      v4->_Left = v2;
      v2->_Left = _Wherenode;
      _Wherenode->_Parent = v2;
    }
    else
    {
      v4->_Right = v2;
      v2->_Left = _Wherenode;
      _Wherenode->_Parent = v2;
    }
  }
}

//----- (0049C690) --------------------------------------------------------
void __thiscall mhInfoWin::ClearInfo(mhInfoWin *this)
{
  char *v1; // eax@1
  bool v2; // cf@1

  v1 = this->m_PassWord._Bx._Buf;
  v2 = this->m_PassWord._Myres < 0x10;
  this->m_PassWord._Mysize = 0;
  if ( !v2 )
    v1 = *(char **)v1;
  *v1 = 0;
  this->m_bItemView = 0;
  this->m_MaxPersonCount = 0;
  this->m_NowPersonCount = 0;
  *(_DWORD *)&this->m_ClickedChar = -1;
}

//----- (0049C6D0) --------------------------------------------------------
std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0> > > *__thiscall std::_Tree<std::_Tset_traits<Effect *,std::less<Effect *>,std::allocator<Effect *>,0>>::find(std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0> > *this, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0> > > *result, PgWin *const *_Keyval)
{
  std::_Tree_nod<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0> >::_Node *v3; // edx@1
  std::_Tree_nod<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0> >::_Node *v4; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0> > > *v5; // eax@8

  v3 = this->_Myhead;
  v4 = v3->_Parent;
  while ( !v4->_Isnil )
  {
    if ( v4->_Myval >= *_Keyval )
    {
      v3 = v4;
      v4 = v4->_Left;
    }
    else
    {
      v4 = v4->_Right;
    }
  }
  if ( v3 == this->_Myhead || *_Keyval < v3->_Myval )
  {
    v5 = result;
    result->_Ptr = this->_Myhead;
  }
  else
  {
    v5 = result;
    result->_Ptr = v3;
  }
  return v5;
}

//----- (0049C740) --------------------------------------------------------
bool __stdcall ITask::OnProcessNetMsg(int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  return 0;
}

//----- (0049C750) --------------------------------------------------------
BOOL __cdecl std::operator!=<char,std::char_traits<char>,std::allocator<char>>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Left, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Right)
{
  const char *v2; // eax@1

  v2 = (const char *)_Right;
  if ( _Right->_Myres >= 0x10 )
    v2 = _Right->_Bx._Ptr;
  return std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
           _Left,
           0,
           _Left->_Mysize,
           v2,
           _Right->_Mysize) != 0;
}

//----- (0049C780) --------------------------------------------------------
CollectWin::sRewardInfo *__cdecl std::_Uninit_copy<std::_Vector_const_iterator<std::_Vector_val<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo>>>,CollectWin::sRewardInfo *,std::allocator<CollectWin::sRewardInfo>>(std::_Vector_const_iterator<std::_Vector_val<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo> > > _First, std::_Vector_const_iterator<std::_Vector_val<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo> > > _Last, CollectWin::sRewardInfo *_Dest)
{
  CollectWin::sRewardInfo *v3; // ecx@1
  CollectWin::sRewardInfo *result; // eax@1

  v3 = _First._Ptr;
  for ( result = _Dest; v3 != _Last._Ptr; ++result )
  {
    if ( result )
    {
      result->m_uiRewardGrade = v3->m_uiRewardGrade;
      result->m_uiRewardID = v3->m_uiRewardID;
      result->m_uiCount = v3->m_uiCount;
      *(_DWORD *)&result->m_bCompleted = *(_DWORD *)&v3->m_bCompleted;
    }
    ++v3;
  }
  return result;
}

//----- (0049C7C0) --------------------------------------------------------
void __thiscall mhPortalListWin::Clear(mhPortalListWin *this)
{
  mhPortalListWin *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v2; // eax@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > result; // [sp+4h] [bp-4h]@2

  v1 = this;
  v2 = this->m_mapPortalInfo._Myhead->_Left;
  if ( v2 != this->m_mapPortalInfo._Myhead )
  {
    do
      v2 = std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
             (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)&v1->m_mapPortalInfo.comp,
             &result,
             (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > >)v2)->_Ptr;
    while ( v2 != v1->m_mapPortalInfo._Myhead );
  }
}

//----- (0049C800) --------------------------------------------------------
void __thiscall GuildJoinReqTask::DirectMessage(GuildJoinReqTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  char *v4; // eax@3
  char *v5; // esi@3
  char *v6; // edi@3
  char v7; // dl@4
  PROTO_NC_GUILD_MEMBER_INVITE_REQ kProto; // [sp+0h] [bp-18h]@3

  if ( iMsgTag == 28 )
  {
    if ( *(_DWORD *)pvBody )
    {
      this->m_pkMsgHooker = (IDirectMessenger *)2;
    }
    else
    {
      v4 = (char *)&this->m_kSerialTaskList.m_kAllocator;
      *(_DWORD *)v4 = 0;
      *((_DWORD *)v4 + 1) = 0;
      *((_DWORD *)v4 + 2) = 0;
      *((_DWORD *)v4 + 3) = 0;
      v5 = (char *)*((_DWORD *)pvBody + 1);
      *(_QWORD *)&kProto.ToCharID.n5_code[3] = 0i64;
      *(_QWORD *)&kProto.ToCharID.n5_code[1] = 0i64;
      kProto.ToCharID.n5_code[0] = 0;
      v6 = (char *)&this->m_kSerialTaskList.m_kAllocator;
      do
      {
        v7 = *v5;
        *v6++ = *v5++;
      }
      while ( v7 );
      *(_QWORD *)&kProto.ToCharID.n5_code[3] = 0i64;
      *(_QWORD *)&kProto.ToCharID.n5_code[1] = 0i64;
      kProto.ToCharID.n5_code[0] = 0;
      strncpy(kProto.ToCharID.n5_name, v4, 0x14u);
      NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 9u, &kProto, 20);
    }
  }
}

//----- (0049C8C0) --------------------------------------------------------
void __thiscall GuildJoinReqTask::OnStart(GuildJoinReqTask *this)
{
  GuildJoinReqTask *v1; // esi@1
  char *v2; // eax@3
  PROTO_NC_GUILD_MEMBER_INVITE_REQ kProto; // [sp+10h] [bp-18h]@2

  v1 = this;
  if ( this->m_acTargetID[0] )
  {
    *(_QWORD *)&kProto.ToCharID.n5_code[3] = 0i64;
    *(_QWORD *)&kProto.ToCharID.n5_code[1] = 0i64;
    kProto.ToCharID.n5_code[0] = 0;
    strncpy(kProto.ToCharID.n5_name, this->m_acTargetID, 0x14u);
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 9u, &kProto, 20);
  }
  else
  {
    this->m_pkInputBox = InputBox::CreateWin();
    v2 = (char *)TextData::Get(0x159C5589u);
    InputBox::SetText(v1->m_pkInputBox, v2);
    v1->m_pkInputBox->vfptr->SetMsgHooker(&v1->m_pkInputBox->vfptr, &v1->vfptr);
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v1->m_pkInputBox->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkInputBox->vfptr);
  }
}

//----- (0049C9A0) --------------------------------------------------------
bool __thiscall GuildJoinReqTask::OnProcessNetMsg(GuildJoinReqTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  GuildJoinReqTask *v5; // edi@1
  bool result; // al@3
  signed int v7; // eax@4
  char *v8; // eax@7
  char *v9; // eax@9
  char *v10; // eax@10
  char *v11; // eax@16
  char *v12; // eax@17
  PgFrameWork *v13; // eax@18
  GameFrameWork *v14; // esi@21
  NiUnsharedGeometryGroup *v15; // eax@21
  NiPointer<MHDiceGameTask> *v16; // eax@22
  bool v17; // bl@22
  void (__thiscall ***v18)(_DWORD, _DWORD); // esi@23
  GameFrameWork *v19; // esi@27
  NiUnsharedGeometryGroup *v20; // eax@27
  char *v21; // [sp-4h] [bp-20h]@9
  unsigned int v22; // [sp-4h] [bp-20h]@18

  v5 = this;
  if ( iDepart == 29 && iCommand == 10 )
  {
    v7 = *((_WORD *)pvData + 10);
    if ( v7 > 6352 )
    {
      switch ( v7 )
      {
        case 7112:
          v11 = (char *)TextData2::Get(0xF68B4770);
          MsgBox::Modeless(MSGBOX_OK, v11);
          break;
        case 7120:
          v12 = (char *)TextData2::Get(0x55F0B0D4u);
          MsgBox::Modeless(MSGBOX_OK, v12);
          break;
        case 7257:
          v13 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
          v22 = 2145890036;
          goto LABEL_21;
        case 7258:
          v13 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
          v22 = -746040772;
          goto LABEL_21;
        case 7122:
          v13 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
          v22 = 140082800;
LABEL_21:
          v14 = (GameFrameWork *)v13;
          v15 = TextData2::Get(v22);
          GameFrameWork::AddSysMsg(v14, (const char *)v15);
          break;
        default:
          break;
      }
    }
    else if ( v7 == 6352 )
    {
      v21 = this->m_acTargetID;
      v9 = (char *)TextData2::Get(0x6ECEA7F9u);
LABEL_10:
      v10 = fs(v9, v21);
      MsgBox::Modeless(MSGBOX_OK, v10);
    }
    else
    {
      switch ( v7 )
      {
        case 3280:
        case 3281:
        case 3283:
          v8 = (char *)TextData::Get(0x7DDDB5F7u);
          goto LABEL_8;
        case 3282:
          v21 = this->m_acTargetID;
          v9 = (char *)TextData::Get(0x2A140234u);
          goto LABEL_10;
        case 3284:
          v8 = (char *)TextData::Get(0xC4C9EA1F);
LABEL_8:
          MsgBox::Modeless(MSGBOX_OK, v8);
          break;
        case 3285:
          v21 = this->m_acTargetID;
          v9 = (char *)TextData::Get(0xBDBBBE16);
          goto LABEL_10;
        case 3286:
          v9 = (char *)TextData::Get(0xB1DBBE52);
          goto LABEL_10;
        default:
          break;
      }
    }
    v16 = MHDiceGameTask::GetDiceGameTask((NiPointer<MHDiceGameTask> *)&iDepart);
    v17 = MHDiceGameTask::IsDicegamePlaying(v16->m_pObject);
    if ( iDepart )
    {
      v18 = (void (__thiscall ***)(_DWORD, _DWORD))iDepart;
      if ( !InterlockedDecrement((volatile LONG *)(iDepart + 4)) )
      {
        if ( v18 )
          (**v18)(v18, 1);
      }
    }
    if ( v17 )
    {
      v19 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      v20 = TextData::Get(0xB1DBBE52);
      GameFrameWork::AddSysMsg(v19, (const char *)v20);
      result = iRevBytes != 0;
    }
    else
    {
      v5->m_eTaskState = 2;
      result = 1;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0049CCA0) --------------------------------------------------------
GuildJoinReqTask *__cdecl ISingletonTask<GuildJoinReqTask>::Run()
{
  GuildJoinReqTask *result; // eax@1
  ITask *v1; // eax@2
  GuildJoinReqTask *v2; // esi@2

  result = (GuildJoinReqTask *)ISingletonTask<GuildJoinReqTask>::ms_pkSingletonTask;
  if ( !ISingletonTask<GuildJoinReqTask>::ms_pkSingletonTask )
  {
    v1 = (ITask *)operator new(0x58u);
    v2 = (GuildJoinReqTask *)v1;
    if ( v1 )
    {
      ITask::ITask(v1, 0);
      v2->vfptr = (NiRefObjectVtbl *)&GuildJoinReqTask::`vftable'{for `NiRefObject'};
      v2->vfptr = (IDirectMessengerVtbl *)&GuildJoinReqTask::`vftable'{for `IDirectMessenger'};
      v2->m_acTargetID[0] = 0;
    }
    else
    {
      v2 = 0;
    }
    result = v2;
    ISingletonTask<GuildJoinReqTask>::ms_pkSingletonTask = (int)v2;
  }
  return result;
}
// 981D50: using guessed type void (__thiscall *GuildJoinReqTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 981D6C: using guessed type int (__thiscall *GuildJoinReqTask::`vftable'{for `NiRefObject'})(void *p, char);
// A8CA80: using guessed type int ISingletonTask<GuildJoinReqTask>::ms_pkSingletonTask;

//----- (0049CD20) --------------------------------------------------------
void __thiscall ScriptBtn::ScriptBtn(ScriptBtn *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > kText, bool bAutoScale, NiExtraData *pkType, NiExtraData *pkAction, NiExtraData *pkNextAction)
{
  ScriptBtn *v6; // esi@1
  bool v7; // cf@1
  NiExtraData *v8; // edx@1
  NiExtraData *v9; // eax@1
  NiExtraData *v10; // ecx@1

  v6 = this;
  this->m_kText._Mysize = 0;
  this->m_kText._Myres = 15;
  this->m_kText._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&this->m_kText, &kText, 0, 0xFFFFFFFF);
  v7 = kText._Myres < 0x10;
  v8 = pkType;
  v9 = pkAction;
  v6->m_bAutoScale = bAutoScale;
  v10 = pkNextAction;
  v6->m_pkType = v8;
  v6->m_pkAction = v9;
  v6->m_pkNextAction = v10;
  if ( !v7 )
    operator delete(kText._Bx._Ptr);
}

//----- (0049CDA0) --------------------------------------------------------
GuildJoinReqTask *__thiscall GuildJoinReqTask::`vector deleting destructor'(GuildJoinReqTask *this, unsigned int a2)
{
  GuildJoinReqTask *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ISingletonTask<GuildJoinReqTask>::`vftable'{for `NiRefObject'};
  this->vfptr = (IDirectMessengerVtbl *)&ISingletonTask<GuildJoinReqTask>::`vftable'{for `IDirectMessenger'};
  ISingletonTask<GuildJoinReqTask>::ms_pkSingletonTask = 0;
  ITask::~ITask((ITask *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 981D1C: using guessed type void (__thiscall *ISingletonTask<GuildJoinReqTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 981D38: using guessed type int (__thiscall *ISingletonTask<GuildJoinReqTask>::`vftable'{for `NiRefObject'})(void *p, char);
// A8CA80: using guessed type int ISingletonTask<GuildJoinReqTask>::ms_pkSingletonTask;

//----- (0049CDE0) --------------------------------------------------------
void __thiscall std::vector<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo>>::vector<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo>>(std::vector<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo> > *this, std::vector<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo> > *_Right)
{
  std::vector<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo> > *v2; // edi@1
  signed int v3; // esi@1
  unsigned int v4; // esi@1
  NiColorA *v5; // eax@4
  CollectWin::sRewardInfo *v6; // ecx@4
  CollectWin::sRewardInfo *v7; // ST00_4@4
  int v8; // [sp+0h] [bp-24h]@1
  std::vector<HeightMapMaker::TriangleIndex *,std::allocator<HeightMapMaker::TriangleIndex *> > *v9; // [sp+10h] [bp-14h]@1
  int *v10; // [sp+14h] [bp-10h]@1
  int v11; // [sp+20h] [bp-4h]@4

  v10 = &v8;
  v2 = this;
  v9 = (std::vector<HeightMapMaker::TriangleIndex *,std::allocator<HeightMapMaker::TriangleIndex *> > *)this;
  this->_Myfirst = 0;
  this->_Mylast = 0;
  this->_Myend = 0;
  v3 = (char *)_Right->_Mylast - (char *)_Right->_Myfirst;
  this->_Myfirst = 0;
  v4 = v3 >> 4;
  this->_Mylast = 0;
  this->_Myend = 0;
  if ( v4 )
  {
    if ( v4 > 0xFFFFFFF )
      std::_Xlength_error("vector<T> too long");
    v5 = std::allocator<NiColorA>::allocate(v4);
    v2->_Myfirst = (CollectWin::sRewardInfo *)v5;
    v2->_Mylast = (CollectWin::sRewardInfo *)v5;
    v2->_Myend = (CollectWin::sRewardInfo *)&v5[v4];
    v6 = _Right->_Mylast;
    v7 = _Right->_Myfirst;
    v11 = 0;
    v2->_Mylast = std::_Uninit_copy<std::_Vector_const_iterator<std::_Vector_val<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo>>>,CollectWin::sRewardInfo *,std::allocator<CollectWin::sRewardInfo>>(
                    (std::_Vector_const_iterator<std::_Vector_val<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo> > >)v7,
                    (std::_Vector_const_iterator<std::_Vector_val<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo> > >)v6,
                    (CollectWin::sRewardInfo *)v5);
  }
}

//----- (0049CEB0) --------------------------------------------------------
void __thiscall mhInfoWin::SetTitle(mhInfoWin *this, char *pcStr, bool bPageUpdate)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // esi@1
  bool v4; // cf@1
  char *v5; // eax@2
  void *(__thiscall *v6)(NiRefObject *, unsigned int); // eax@6
  mhInfoWin *v7; // [sp+10h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Right; // [sp+14h] [bp-2Ch]@4
  int v9; // [sp+3Ch] [bp-4h]@4

  v3 = &this->m_FullTitleName;
  v4 = this->m_FullTitleName._Myres < 0x10;
  v7 = this;
  this->m_FullTitleName._Mysize = 0;
  if ( v4 )
    v5 = this->m_FullTitleName._Bx._Buf;
  else
    v5 = v3->_Bx._Ptr;
  *v5 = 0;
  _Right._Myres = 15;
  _Right._Mysize = 0;
  _Right._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Right, pcStr, strlen(pcStr));
  v9 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(v3, &_Right);
  v9 = -1;
  if ( _Right._Myres >= 0x10 )
    operator delete(_Right._Bx._Ptr);
  v6 = v7->m_pkTextFieldWin[1]->vfptr[118].__vecDelDtor;
  _Right._Myres = 15;
  _Right._Mysize = 0;
  _Right._Bx._Buf[0] = 0;
  ((void (__stdcall *)(char *))v6)(pcStr);
  if ( bPageUpdate )
    mhInfoWin::RefreshInfoPage(v7);
}

//----- (0049CFA0) --------------------------------------------------------
int __usercall mktime_0@<eax>(tm *_Tm@<eax>)
{
  return _mktime32(_Tm);
}

//----- (0049CFB0) --------------------------------------------------------
void __stdcall GameFrameWork::RemoveItemFromString(char *s, const char *toRemove)
{
  char *v3; // eax@1
  char *v4; // esi@1
  char *v5; // eax@2

  strstr(s, (char *)toRemove);
  v4 = v3;
  if ( v3 )
  {
    do
    {
      memmove(v4, &v4[strlen(toRemove)], strlen(&v4[strlen(toRemove)]) + 1);
      strstr(v4, (char *)toRemove);
      v4 = v5;
    }
    while ( v5 );
  }
}

//----- (0049D020) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BOOTH_BUYREFRESH_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int result; // eax@2

  if ( *(_WORD *)((char *)pvData + 1) )
  {
    PrivateStoreInvWin::SetLotText(
      this->m_pkPrivateStoreWin->m_apkInvWin[*(_BYTE *)pvData],
      *(_WORD *)((char *)pvData + 1));
    result = iRevBytes;
  }
  else
  {
    ItemIcon::SetItem((ItemIcon *)&this->m_pkPrivateStoreWin->m_apkInvWin[*(_BYTE *)pvData]->vfptr, 0, 1);
    result = iRevBytes;
  }
  return result;
}

//----- (0049D070) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BOOTH_INTERIORSTART_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  PrivateStoreWin::SetPrivateStoreOpen(this->m_pkPrivateStoreWin, 0);
  return iRevBytes;
}

//----- (0049D090) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BOOTH_CLOSE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1

  v3 = this;
  if ( *(_WORD *)pvData == 2625 )
  {
    PrivateStoreWin::SetPrivateStoreOpen(this->m_pkPrivateStoreWin, 0);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkPrivateStoreWin->vfptr);
    GameFrameWork::ChangeCampMode(0, 4);
  }
  return iRevBytes;
}

//----- (0049D0E0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_CT_SET_SOMEONECHANGE_CMD(int iRevBytes, void *pvData)
{
  Char *v3; // eax@1
  Char *v4; // esi@1
  char *v5; // eax@3

  v3 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  v4 = v3;
  if ( v3 )
  {
    v3->m_uiCurrCharTitleType = *((_BYTE *)pvData + 2);
    if ( !*((_BYTE *)pvData + 2) )
    {
      Char::SetCharTitleUse(v3, 0);
      v5 = CCharacterTitleData::GetTitleString(&g_characterTitleData, *((_BYTE *)pvData + 2), 0);
LABEL_6:
      Char::SetCharTitleName(v4, v5);
      return iRevBytes;
    }
    if ( *((_BYTE *)pvData + 2) != 10 )
    {
      Char::SetCharTitleUse(v3, 1);
      v5 = CCharacterTitleData::GetTitleString(&g_characterTitleData, *((_BYTE *)pvData + 2), *((_BYTE *)pvData + 3));
      goto LABEL_6;
    }
  }
  return iRevBytes;
}

//----- (0049D160) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_MISC_PINGTEST_CLIENT_ZONE_DB(int iRevBytes, void *pvData)
{
  *((_DWORD *)pvData + 2) = timeGetTime();
  return iRevBytes;
}

//----- (0049D180) --------------------------------------------------------
int __thiscall GameFrameWork::On_MISC_RESTMINUTE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  KQuestTimeWin *v3; // ecx@2

  if ( *(_BYTE *)pvData == 1 )
  {
    v3 = this->m_pkKQuestTimeWin;
    if ( v3 )
      KQuestTimeWin::ResetTime(v3, *(_WORD *)((char *)pvData + 1));
  }
  return iRevBytes;
}

//----- (0049D1B0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_CHAR_CENCHANGE_CMD(int iRevBytes, void *pvData)
{
  User::SetMoney(&g_kUser, *(_QWORD *)pvData);
  return iRevBytes;
}

//----- (0049D1D0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_CHAR_BASEPARAMCHANGE_CMD(int iRevBytes, void *pvData)
{
  User::ChangeParam(&g_kUser, (PROTO_NC_CHAR_BASEPARAMCHANGE_CMD *)pvData);
  return iRevBytes;
}

//----- (0049D1F0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_CHANGEPARAMCHANGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  StatusWin *v4; // ecx@1

  v3 = this;
  User::ChangeChangeParam(&g_kUser, (PROTO_NC_CHAR_BASEPARAMCHANGE_CMD *)pvData);
  v4 = v3->m_pkStatusWin;
  if ( v4 )
    StatusWin::UpdateBars(v4);
  return iRevBytes;
}

//----- (0049D220) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_CLIENT_CHARGEDBUFF_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  signed int v4; // esi@1
  PROTO_CHARGEDBUFF_INFO *v5; // edi@2
  GameFrameWork *v7; // [sp+Ch] [bp-4h]@1

  v3 = this;
  v7 = this;
  ChargedItemList::Clear();
  v4 = 0;
  if ( *(_WORD *)pvData > 0u )
  {
    v5 = (PROTO_CHARGEDBUFF_INFO *)((char *)pvData + 2);
    do
    {
      ChargedItemList::AddUsingItem(v5);
      ++v4;
      ++v5;
    }
    while ( v4 < *(_WORD *)pvData );
    v3 = v7;
  }
  ChargedItemListWin::Refresh(v3->m_pkChargedItemListWin);
  v3->m_pkStatusChargedBuffWin->m_fLastUpdatedTime = 0.0;
  return iRevBytes;
}

//----- (0049D280) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_CHAR_FAMECHANGE_CMD(int iRevBytes, void *pvData)
{
  unsigned int v3; // esi@1

  v3 = *(_DWORD *)pvData;
  User::GetMainCharBaseData(&g_kUser)->fame = v3;
  return iRevBytes;
}

//----- (0049D2A0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_BRIEFINFO_ITEMONFIELD_CMD(int iRevBytes, void *pvData)
{
  unsigned int v3; // esi@1
  PROTO_NC_BRIEFINFO_DROPEDITEM_CMD *v4; // edi@2

  v3 = 0;
  if ( *(_BYTE *)pvData )
  {
    v4 = (PROTO_NC_BRIEFINFO_DROPEDITEM_CMD *)((char *)pvData + 1);
    do
    {
      DropItemMgr::Add(&g_kDropItemMgr, v4);
      ++v3;
      ++v4;
    }
    while ( v3 < *(_BYTE *)pvData );
  }
  return iRevBytes;
}

//----- (0049D2E0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BRIEFINFO_DROPEDITEM_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  CharDeadEvent_DropItem *v4; // eax@1
  Char *v5; // eax@3

  v3 = this;
  v4 = (CharDeadEvent_DropItem *)operator new(0x20u);
  if ( v4 )
    CharDeadEvent_DropItem::CharDeadEvent_DropItem(
      v4,
      (PgFrameWork *)&v3->vfptr,
      (PROTO_NC_BRIEFINFO_DROPEDITEM_CMD *)pvData);
  v5 = CharMgr::GetChar(&g_kCharMgr, *((_WORD *)pvData + 6));
  if ( v5 && (unsigned __int8)((int (__thiscall *)(Char *))v5->vfptr[1].Affect)(v5) )
    GameFrameWork::OpenPlayGuideWin(v3, BIL_ITEM_1);
  return iRevBytes;
}

//----- (0049D380) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_MINIHOUSE_BUILDING_CMD(int iRevBytes, void *pvData)
{
  CMiniHouseMgr::AddInfo(
    (CMiniHouseMgr *)&g_kMiniHouseMgr,
    (PROTO_NC_BRIEFINFO_MINIHOUSEBUILD_CMD *)((char *)pvData + 2));
  return iRevBytes;
}

//----- (0049D3A0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_BRIEFINFO_MINIHOUSE_CMD(int iRevBytes, void *pvData)
{
  unsigned __int8 v3; // bl@1

  v3 = 0;
  if ( *(_BYTE *)pvData )
  {
    do
      CMiniHouseMgr::AddInfo(
        (CMiniHouseMgr *)&g_kMiniHouseMgr,
        (PROTO_NC_BRIEFINFO_MINIHOUSEBUILD_CMD *)((char *)pvData + 64 * v3++ + 1));
    while ( v3 < *(_BYTE *)pvData );
  }
  return iRevBytes;
}

//----- (0049D3E0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_BRIEFINFO_MINIHOUSEBUILD_CMD(int iRevBytes, void *pvData)
{
  CMiniHouseMgr::AddInfo((CMiniHouseMgr *)&g_kMiniHouseMgr, (PROTO_NC_BRIEFINFO_MINIHOUSEBUILD_CMD *)pvData);
  return iRevBytes;
}

//----- (0049D400) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_FURNITURE_EFFECT_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  __int16 v4; // ax@1
  const char *v5; // eax@5

  v3 = this;
  v4 = *((_WORD *)pvData + 1);
  if ( v4 != 5824 )
  {
    if ( v4 != 5831 && v4 != 5832 && v4 != 5839 )
    {
      v5 = ErrMsgTable::GetErrMsg(*((_WORD *)pvData + 1));
      GameFrameWork::AddSysMsg(v3, v5);
      return iRevBytes;
    }
    MiniHouseIndoor::ObjEffErrMsg(&g_kWorld.m_MiniHouseIndoorMode, *(_WORD *)pvData, *((_WORD *)pvData + 1));
  }
  return iRevBytes;
}

//----- (0049D470) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_BRIEFINFO_MAGICFIELDINFO_CMD(int iRevBytes, void *pvData)
{
  signed int v3; // esi@1
  PROTO_NC_BRIEFINFO_MAGICFIELDSPREAD_CMD *v4; // edi@2

  v3 = 0;
  if ( *(_BYTE *)pvData )
  {
    v4 = (PROTO_NC_BRIEFINFO_MAGICFIELDSPREAD_CMD *)((char *)pvData + 1);
    do
    {
      MagicField::AddMagicField(v4, &NiPoint3::UNIT_Y, 0);
      ++v3;
      ++v4;
    }
    while ( v3 < *(_BYTE *)pvData );
  }
  return iRevBytes;
}

//----- (0049D4C0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ACT_SOMEONEWALK_CMD(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049D4D0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ACT_SOMEONERUN_CMD(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049D4E0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ACT_MOVEFAIL_ACK(int iRevBytes, void *pvData)
{
  float fYPos; // ST08_4@1
  float fXPos; // ST04_4@1
  float v5; // ST04_4@2
  float v6; // ST00_4@2

  fXPos = (double)*(unsigned int *)pvData;
  fYPos = (double)*((unsigned int *)pvData + 1);
  if ( !MainChar::PositionSinkTest((MainChar *)g_pkMainChar, fXPos, fYPos) )
  {
    v6 = (double)*(unsigned int *)pvData;
    v5 = (double)*((unsigned int *)pvData + 1);
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))g_pkMainChar->vfptr[7].IsVisible)(LODWORD(v6), LODWORD(v5), 0);
  }
  return iRevBytes;
}

//----- (0049D560) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ACT_SOMEONESTOP_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  Char *v3; // eax@1
  Char *v4; // esi@1
  float v5; // ST04_4@5
  float v6; // ST00_4@5

  v3 = GameFrameWork::GetCharByHandle(this, *(_WORD *)pvData, 8, 19);
  v4 = v3;
  if ( v3 )
  {
    if ( (unsigned int)(((int (__thiscall *)(Char *))v3->vfptr[13].DeleteAbStateByAbstateIndex)(v3) - 1) <= 2 )
      ((void (__thiscall *)(Char *))v4->vfptr[10].DeleteAbStateByAbstateIndex)(v4);
    if ( !(unsigned __int8)((int (__thiscall *)(Char *))v4->vfptr[10].Affect)(v4) )
    {
      v6 = (double)*(unsigned int *)((char *)pvData + 2);
      v5 = (double)*(unsigned int *)((char *)pvData + 6);
      ((void (__thiscall *)(Char *, _DWORD, _DWORD, _DWORD))v4->vfptr[7].IsVisible)(v4, LODWORD(v6), LODWORD(v5), 0);
    }
  }
  return iRevBytes;
}

//----- (0049D5F0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ACT_CREATECASTBAR(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1

  v3 = this;
  KeyboardMoveProcess::SetAutoRun(&this->m_kCharMover, 0);
  GameFrameWork::Stick(v3, 0, 0);
  CastingProgressWin::StartCasting(v3->m_pkCastingProgressBar, *(_WORD *)pvData, 1);
  return iRevBytes;
}

//----- (0049D630) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ACT_CANCELCASTBAR(GameFrameWork *this, int iRevBytes, void *pvData)
{
  CastingProgressWin::CastingFail(this->m_pkCastingProgressBar);
  return iRevBytes;
}

//----- (0049D650) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ACT_WHISPERSUCCESS_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // ebx@3
  SHINE_ITEM_STRUCT *v4; // edi@4
  int v5; // eax@6
  int v6; // edx@6
  _BYTE v7[20]; // ST00_20@6
  GameFrameWork *v9; // [sp+Ch] [bp-8Ch]@1
  char acStr[129]; // [sp+10h] [bp-88h]@6

  v9 = this;
  if ( *((_BYTE *)pvData + 21) > 0x80u )
    *((_BYTE *)pvData + 21) = -128;
  v3 = *(_BYTE *)pvData;
  if ( v3 > 0 )
  {
    v4 = (SHINE_ITEM_STRUCT *)((char *)pvData + *((_BYTE *)pvData + 21) + 22);
    do
    {
      GameFrameWork::AddSChatItemLink(v9, 8, v4);
      ++v4;
      --v3;
    }
    while ( v3 );
  }
  strncpy(acStr, (char *)pvData + 22, *((_BYTE *)pvData + 21));
  v5 = *(_DWORD *)((char *)pvData + 17);
  v6 = *(_DWORD *)((char *)pvData + 1);
  acStr[*((_BYTE *)pvData + 21)] = 0;
  *(_DWORD *)v7 = v6;
  *(_DWORD *)&v7[4] = *(_DWORD *)((char *)pvData + 5);
  *(_QWORD *)&v7[8] = *(_QWORD *)((char *)pvData + 9);
  *(_DWORD *)&v7[16] = v5;
  GameFrameWork::AddWhisperChat_To(v9, *(Name5 *)v7, acStr);
  return iRevBytes;
}

//----- (0049D720) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ACT_SOMEEONEJUMP_CMD(int iRevBytes, void *pvData)
{
  Char *v3; // eax@1

  v3 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  if ( v3 )
    ((void (__thiscall *)(Char *))v3->vfptr[11].Deaffect)(v3);
  return iRevBytes;
}

//----- (0049D750) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ACT_SOMEONESPEEDCHANGE_CMD(int iRevBytes, void *pvData)
{
  Char *v3; // eax@1
  float v4; // ST00_4@2

  v3 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  if ( v3 )
  {
    v4 = (double)*((_BYTE *)pvData + 2);
    ((void (__thiscall *)(Char *, _DWORD))v3->vfptr[8].SetAbStateProperty)(v3, LODWORD(v4));
  }
  return iRevBytes;
}

//----- (0049D790) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ACT_SOMEONEFOLDTENT_CMD(int iRevBytes, void *pvData)
{
  Char *v3; // eax@1
  Char *v4; // esi@1

  v3 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  v4 = v3;
  if ( v3 )
  {
    v3->vfptr[2].Affect((AbStateInfectee *)v3, 0, (bool)((char *)pvData + 2));
    ((void (__thiscall *)(Char *, _DWORD, signed int))v4->vfptr[1].SetAbStateProperty)(v4, 0, 4);
  }
  return iRevBytes;
}

//----- (0049D7E0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ACT_SOMEONEPITCHTENT_CMD(int iRevBytes, void *pvData)
{
  Char *v3; // eax@1
  Char *v4; // esi@1
  void (__thiscall *v5)(AbStateInfectee *, ABSTATEINDEX, bool, int); // eax@2

  v3 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  v4 = v3;
  if ( v3 )
  {
    ((void (__thiscall *)(Char *, signed int))v3->vfptr[7].AddAbStateByAbstateIndex)(v3, 1);
    v5 = v4->vfptr[1].SetAbStateProperty;
    v4->m_byMiniHouseSkinID = *((_WORD *)pvData + 1);
    ((void (__thiscall *)(Char *, signed int, signed int))v5)(v4, 1, 4);
  }
  return iRevBytes;
}

//----- (0049D830) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ACT_FOLDTENT_ACK(int iRevBytes, void *pvData)
{
  if ( *(_WORD *)pvData == 2689 )
    GameFrameWork::ChangeCampMode(0, 4);
  return iRevBytes;
}

//----- (0049D850) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ACT_REINFORCE_FOLDTENT_CMD(int iRevBytes, void *pvData)
{
  GameFrameWork::ChangeCampMode(0, 4);
  return iRevBytes;
}

//----- (0049D870) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ACT_MOVESPEED_CMD(int iRevBytes, void *pvData)
{
  float v3; // ST04_4@1
  float v4; // ST04_4@1

  v3 = (double)*(_WORD *)pvData;
  ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[8].Deaffect)(LODWORD(v3));
  v4 = (double)*((_WORD *)pvData + 1);
  ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[8].SetAbStateProperty)(LODWORD(v4));
  return iRevBytes;
}

//----- (0049D8C0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ACT_RIDE_FAIL_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (0049D8F0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ACT_REINFORCE_STOP_CMD(int iRevBytes, void *pvData)
{
  float v3; // ST14_4@1
  float v4; // ST10_4@1
  const char *v5; // eax@1

  v4 = (double)*(unsigned int *)pvData;
  v3 = (double)*((unsigned int *)pvData + 1);
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))g_pkMainChar->vfptr[7].IsVisible)(LODWORD(v4), LODWORD(v3), 0);
  v5 = fs(
         "g_PKMAINCHAR_On_NC_ACT_REINFORCE_STOP_CMD : %f,  %f\n",
         (double)*(unsigned int *)pvData,
         (double)*((unsigned int *)pvData + 1));
  OutputDebugStringA(v5);
  return iRevBytes;
}

//----- (0049D980) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_TARGETINFO_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // ebx@1
  Char *v4; // eax@1
  Char *v5; // esi@1
  TargetWin *v7; // eax@6
  const char *v8; // eax@10

  v3 = this;
  v4 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)((char *)pvData + 1));
  v5 = v4;
  if ( *(_WORD *)((char *)pvData + 1) == -1 )
  {
    if ( *(_BYTE *)pvData == 1 )
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkTOTWin->vfptr);
      MainChar::SetTOTChar((MainChar *)g_pkMainChar, 0xFFFFu);
      return iRevBytes;
    }
  }
  else if ( v4 )
  {
    if ( !*(_BYTE *)pvData )
    {
      Char::HpUpdate(v4, *((_WORD *)pvData + 14), *(_DWORD *)((char *)pvData + 3));
      ((void (__thiscall *)(Char *, _DWORD))v5->vfptr[4].SetAbStateProperty)(v5, *(_DWORD *)((char *)pvData + 7));
      ((void (__thiscall *)(Char *, _DWORD))v5->vfptr[4].IsVisible)(v5, *(_DWORD *)((char *)pvData + 11));
      ((void (__thiscall *)(Char *, _DWORD))v5->vfptr[4].AddAbStateByAbstateIndex)(v5, *(_DWORD *)((char *)pvData + 15));
      MainChar::SetTOTChar((MainChar *)g_pkMainChar, 0xFFFFu);
      MainChar::SetTargetChar((MainChar *)g_pkMainChar, v5);
      ((void (__thiscall *)(Char *, _DWORD))v5->vfptr[4].~AbStateInfectee)(v5, *(_DWORD *)((char *)pvData + 19));
      ((void (__thiscall *)(Char *, _DWORD))v5->vfptr[5].Affect)(v5, *(_DWORD *)((char *)pvData + 23));
      v7 = v3->m_pkTargetWin;
      if ( v7 )
        v7->m_kTempLV = *((_BYTE *)pvData + 27);
      if ( !*(_BYTE *)pvData )
      {
        if ( v3->m_pkGMPrisonWin )
        {
          v8 = (const char *)((int (__thiscall *)(Char *))v5->vfptr[2].DeleteAbStateByAbstateIndex)(v5);
          GMPrisonWin::SetCharName(v3->m_pkGMPrisonWin, v8);
        }
      }
    }
    if ( *(_BYTE *)pvData == 1 )
    {
      Char::TOTHpUpdate(v5, *((_WORD *)pvData + 14), *(_DWORD *)((char *)pvData + 3));
      v5->vfptr[5].DeleteAbStateByAbstateIndex((AbStateInfectee *)v5, *(ABSTATEINDEX *)((char *)pvData + 7));
      MainChar::SetTOTChar((MainChar *)g_pkMainChar, *(_WORD *)((char *)pvData + 1));
      TargetOfTheTargetWin::SetTargetLv(v3->m_pkTOTWin, *((_BYTE *)pvData + 27));
      if ( !v3->m_pkTargetWin->m_bEnableTOT )
      {
        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkTOTWin->vfptr);
        return iRevBytes;
      }
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkTOTWin->vfptr);
    }
  }
  return iRevBytes;
}

//----- (0049DB30) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_EXPGAIN_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  CharDeadEvent_ExpGain *v4; // eax@1

  v3 = this;
  v4 = (CharDeadEvent_ExpGain *)operator new(0x18u);
  if ( v4 )
    CharDeadEvent_ExpGain::CharDeadEvent_ExpGain(v4, (PgFrameWork *)&v3->vfptr, (PROTO_NC_BAT_EXPGAIN_CMD *)pvData);
  return iRevBytes;
}

//----- (0049DB90) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_HPCHANGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  int v4; // esi@1
  int v5; // eax@1
  StatusWin *v6; // ecx@4

  v3 = this;
  v4 = ((int (*)(void))g_pkMainChar->vfptr[2].~AbStateInfectee)();
  Char::HpUpdate(g_pkMainChar, *((_WORD *)pvData + 2), *(_DWORD *)pvData);
  v5 = ((int (*)(void))g_pkMainChar->vfptr[2].~AbStateInfectee)();
  User::SetHP(&g_kUser, v5);
  if ( !((int (*)(void))g_pkMainChar->vfptr[2].~AbStateInfectee)() && v4 )
    ((void (*)(void))g_pkMainChar->vfptr[20].Affect)();
  v6 = v3->m_pkStatusWin;
  if ( v6 )
    StatusWin::UpdateBars(v6);
  return iRevBytes;
}

//----- (0049DC20) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_SPCHANGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  StatusWin *v4; // ecx@1

  v3 = this;
  User::SetSP(&g_kUser, *(_DWORD *)pvData);
  ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[4].IsVisible)(*(_DWORD *)pvData);
  v4 = v3->m_pkStatusWin;
  if ( v4 )
    StatusWin::UpdateBars(v4);
  return iRevBytes;
}

//----- (0049DC70) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_BAT_APCHANGE_CMD(int iRevBytes, void *pvData)
{
  User::SetAP(&g_kUser, *(_DWORD *)pvData);
  return iRevBytes;
}

//----- (0049DC90) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_ASSIST_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  Char *v4; // eax@1

  v3 = this;
  v4 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  if ( v4 )
    GameFrameWork::OnOnePickChar(v3, v4);
  return iRevBytes;
}

//----- (0049DCC0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_TARGETCHANGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  int result; // eax@2
  Char *v5; // eax@3

  v3 = this;
  if ( -1 == *(_WORD *)pvData )
  {
    MainChar::SetTargetChar((MainChar *)g_pkMainChar, 0);
    result = iRevBytes;
  }
  else
  {
    v5 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
    if ( v5 )
      GameFrameWork::OnPickChar(v3, v5);
    result = iRevBytes;
  }
  return result;
}

//----- (0049DD10) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_SKILLBASH_CAST_SUC_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  this->m_kSkillCasting.eState = 3;
  return iRevBytes;
}

//----- (0049DD30) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_SOMEONESKILLBASH_CAST_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  Char *v4; // esi@1
  Char *v5; // eax@1

  v3 = this;
  v4 = GameFrameWork::GetCharByHandle(this, *((_WORD *)pvData + 1), 9, 54);
  v5 = GameFrameWork::GetCharByHandle(v3, *((_WORD *)pvData + 2), 9, 54);
  if ( v4 && v4 != g_pkMainChar )
  {
    ((void (__thiscall *)(Char *, Char *, signed int, _DWORD))v4->vfptr[9].GetAbstateColor)(v4, v5, 1, *(_WORD *)pvData);
    v4->vfptr[16].GetAbstateColor((AbStateInfectee *)v4);
  }
  return iRevBytes;
}

//----- (0049DD90) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_SOMEONESKILLBASH_CASTCUT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  Char *v4; // eax@1
  Char *v5; // edi@1
  GameFrameWork::SkillCastState v6; // eax@5
  CastingProgressWin *v7; // ecx@7

  v3 = this;
  v4 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  v5 = v4;
  if ( v4 )
  {
    if ( Char::IsDuringSkillCasting(v4) )
      Char::CancelSkillAction(v5, 1);
    if ( v5 == g_pkMainChar )
    {
      v6 = v3->m_kSkillCasting.eState;
      if ( v6 == 2 || v6 == 3 )
      {
        v7 = v3->m_pkCastingProgressBar;
        v3->m_kSkillCasting.eState = 0;
        CastingProgressWin::CastingFail(v7);
        AttackSequenceManager::ApplicateSkillSeqImmediately(
          (AttackSequenceManager *)&g_pkMainChar->vfptr,
          g_pkMainChar,
          1,
          0);
        Char::CancelSkillAction(g_pkMainChar, 0);
        ((void (*)(void))g_pkMainChar->vfptr[10].DeleteAbStateByAbstateIndex)();
        OutputDebugStringA("On_NC_BAT_SOMEONESKILLBASH_CASTCUT_CMD\n");
      }
    }
  }
  return iRevBytes;
}

//----- (0049DE40) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_SOMEONESKILLBASH_OBJ_CAST_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  Char *v4; // esi@1
  Char *v5; // eax@1

  v3 = this;
  v4 = GameFrameWork::GetCharByHandle(this, *((_WORD *)pvData + 1), 9, 66);
  v5 = GameFrameWork::GetCharByHandle(v3, *((_WORD *)pvData + 2), 9, 66);
  if ( v4 && v4 != g_pkMainChar && v5 )
  {
    ((void (__thiscall *)(Char *, Char *, signed int, _DWORD))v4->vfptr[9].GetAbstateColor)(v4, v5, 1, *(_WORD *)pvData);
    v4->vfptr[16].GetAbstateColor((AbStateInfectee *)v4);
  }
  return iRevBytes;
}

//----- (0049DEB0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_SOMEONESKILLBASH_FLD_CAST_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  Char *v3; // eax@1
  Char *v4; // esi@1

  v3 = GameFrameWork::GetCharByHandle(this, *((_WORD *)pvData + 1), 9, 67);
  v4 = v3;
  if ( v3 && v3 != g_pkMainChar )
  {
    Char::SetSkillTargetGroundPoint(v3, *((_DWORD *)pvData + 1), *((_DWORD *)pvData + 2), 1);
    ((void (__thiscall *)(Char *, _DWORD, _DWORD, signed int, _DWORD))v4->vfptr[9].DeleteAbStateByAbstateIndex)(
      v4,
      *((_DWORD *)pvData + 1),
      *((_DWORD *)pvData + 2),
      1,
      *(_WORD *)pvData);
    v4->vfptr[16].GetAbstateColor((AbStateInfectee *)v4);
  }
  return iRevBytes;
}

//----- (0049DF20) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_SKILLBASH_CASTABORT_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  this->m_kSkillCasting.bWaitingForServerCancel = 0;
  OutputDebugStringA("On_NC_BAT_SKILLBASH_CASTABORT_ACK\n");
  AttackSequenceManager::ApplicateSkillSeqImmediately((AttackSequenceManager *)&g_pkMainChar->vfptr, g_pkMainChar, 1, 0);
  Char::CancelSkillAction(g_pkMainChar, 0);
  return iRevBytes;
}

//----- (0049DF60) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_BAT_FAMEGAIN_CMD(int iRevBytes, void *pvData)
{
  PROTO_NC_CHAR_BASE_CMD *v3; // eax@2

  if ( User::GetMainCharBaseData(&g_kUser) )
  {
    v3 = User::GetMainCharBaseData(&g_kUser);
    v3->fame += *(_DWORD *)pvData;
  }
  return iRevBytes;
}

//----- (0049DF90) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ITEM_PICKOTHER_ACK(int iRevBytes, void *pvData)
{
  g_kInventory.m_bWaitingItemDropAck = 0;
  return iRevBytes;
}

//----- (0049DFB0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_UPGRADE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  ItemUpgradeWin *v3; // ecx@1

  v3 = this->m_pkItemUpgradeWin;
  if ( v3 )
    ItemUpgradeWin::UpGradeResult(v3, *(_WORD *)pvData);
  return iRevBytes;
}

//----- (0049DFD0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_PARTY_LOGININFO_CMD(int iRevBytes, void *pvData)
{
  Party::MemberLogin(&g_kParty, (PROTO_NC_PARTY_LOGININFO_CMD *)pvData);
  return iRevBytes;
}

//----- (0049DFF0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_PARTY_LOGOUTINFO_CMD(int iRevBytes, void *pvData)
{
  Party::MemberLogout(&g_kParty, (PROTO_NC_PARTY_LOGOUTINFO_CMD *)pvData);
  return iRevBytes;
}

//----- (0049E010) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_PARTY_MEMBERCLASS_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  unsigned int v3; // edi@1
  GameFrameWork *v4; // ebx@1
  char *v5; // esi@2
  _BYTE v6[20]; // ST00_20@3
  PartyMemberInfo *v7; // eax@3
  PartyWinInterface *v8; // ecx@4

  v3 = 0;
  v4 = this;
  if ( *(_BYTE *)pvData )
  {
    v5 = (char *)pvData + 22;
    do
    {
      *(_DWORD *)v6 = *(_DWORD *)(v5 - 21);
      *(_DWORD *)&v6[4] = *(_DWORD *)(v5 - 17);
      *(_DWORD *)&v6[8] = *(_DWORD *)(v5 - 13);
      *(_DWORD *)&v6[12] = *(_DWORD *)(v5 - 9);
      *(_DWORD *)&v6[16] = *(_DWORD *)(v5 - 5);
      v7 = Party::GetMemberInfo(&g_kParty, *(Name5 *)v6);
      if ( v7 )
      {
        v7->m_iLv = (unsigned __int8)*v5;
        v7->m_iMaxHP = *(_DWORD *)(v5 + 1);
        v7->m_iMaxSP = *(_DWORD *)(v5 + 5);
        v7->m_byInform = v5[13];
        v7->m_byChrClass = *(v5 - 1);
        v7->m_bShow = 1;
        v7->m_iMaxLP = *(_DWORD *)(v5 + 9);
        v8 = v4->m_pkPartyWinInterface;
        if ( v8 )
          PartyWinInterface::Update(v8);
      }
      ++v3;
      v5 += 35;
    }
    while ( v3 < *(_BYTE *)pvData );
  }
  return iRevBytes;
}

//----- (0049E0B0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_PARTY_MEMBERLOCATION_CMD(int iRevBytes, void *pvData)
{
  unsigned int v3; // edi@1
  char *v4; // esi@2
  _BYTE v5[20]; // ST00_20@3
  PartyMemberInfo *v6; // eax@3

  v3 = 0;
  if ( *(_BYTE *)pvData )
  {
    v4 = (char *)pvData + 21;
    do
    {
      *(_DWORD *)v5 = *((_DWORD *)v4 - 5);
      *(_DWORD *)&v5[4] = *((_DWORD *)v4 - 4);
      *(_DWORD *)&v5[8] = *((_DWORD *)v4 - 3);
      *(_DWORD *)&v5[12] = *((_DWORD *)v4 - 2);
      *(_DWORD *)&v5[16] = *((_DWORD *)v4 - 1);
      v6 = Party::GetMemberInfo(&g_kParty, *(Name5 *)v5);
      if ( v6 )
      {
        v6->m_fX = (double)*(unsigned int *)v4;
        v6->m_fY = (double)*((unsigned int *)v4 + 1);
        v6->m_bShow = 1;
      }
      ++v3;
      v4 += 28;
    }
    while ( v3 < *(_BYTE *)pvData );
  }
  return iRevBytes;
}

//----- (0049E130) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_PARTY_MEMBERMAPOUT(int iRevBytes, void *pvData)
{
  _BYTE v3[20]; // ST00_20@1
  PartyMemberInfo *v4; // eax@1

  *(_DWORD *)v3 = *(_DWORD *)pvData;
  *(_QWORD *)&v3[4] = *(_QWORD *)((char *)pvData + 4);
  *(_QWORD *)&v3[12] = *(_QWORD *)((char *)pvData + 12);
  v4 = Party::GetMemberInfo(&g_kParty, *(Name5 *)v3);
  if ( v4 )
    v4->m_bShow = 0;
  return iRevBytes;
}

//----- (0049E170) --------------------------------------------------------
int __userpurge GameFrameWork::On_NC_PARTY_FINDER_LIST_ACK@<eax>(GameFrameWork *this@<ecx>, int a2@<edi>, int iRevBytes, void *pvData)
{
  GameFrameWork *v4; // ebx@1
  unsigned __int16 i; // di@3
  int result; // eax@5

  v4 = this;
  if ( PgWin::IsVisible((PgWin *)&this->m_pkPMWin->vfptr) )
  {
    CPartyMatchWin::ClearList(v4->m_pkPMWin);
    if ( CPartyMatchWin::SetListBriefInfo(
           v4->m_pkPMWin,
           a2,
           *(_WORD *)pvData,
           *((_WORD *)pvData + 2),
           *((_BYTE *)pvData + 3) != 0) )
    {
      for ( i = 0; i < *((_WORD *)pvData + 3); ++i )
        CPartyMatchWin::AddPartyInfo(v4->m_pkPMWin, (PROTO_NC_PARTY_FINDER_INFO *)((char *)pvData + 154 * i + 8));
      CPartyMatchWin::UpdateList(v4->m_pkPMWin);
      result = iRevBytes;
    }
    else
    {
      result = iRevBytes;
    }
  }
  else
  {
    result = iRevBytes;
  }
  return result;
}

//----- (0049E220) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_PARTY_FINDER_DELETE_YOUR_MSG_CMD(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049E230) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MENU_SHOPOPENWEAPON_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1

  v3 = this;
  Market::SetWeapon((PROTO_NC_MENU_SHOPOPEN_CMD *)pvData);
  GameFrameWork::OpenShopMenu(v3);
  return iRevBytes;
}

//----- (0049E260) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MENU_SHOPOPENSKILL_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1

  v3 = this;
  Market::SetSkill((PROTO_NC_MENU_SHOPOPEN_CMD *)pvData);
  GameFrameWork::OpenSkillShopMenu(v3);
  return iRevBytes;
}

//----- (0049E290) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MENU_SHOPOPENTABLE_WEAPON_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1

  v3 = this;
  Market::SetWeapon((PROTO_NC_MENU_SHOPOPENTABLE_CMD *)pvData);
  GameFrameWork::OpenShopMenu(v3);
  return iRevBytes;
}

//----- (0049E2C0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MENU_SHOPOPENTABLE_SKILL_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1

  v3 = this;
  Market::SetSkill((PROTO_NC_MENU_SHOPOPENTABLE_CMD *)pvData);
  GameFrameWork::OpenSkillShopMenu(v3);
  return iRevBytes;
}

//----- (0049E2F0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MENU_SHOPOPENSOULSTONE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1

  v3 = this;
  Market::SetSoulStone((PROTO_NC_MENU_SHOPOPENSOULSTONE_CMD *)pvData);
  GameFrameWork::OpenSoulStoneShopMenu(v3);
  return iRevBytes;
}

//----- (0049E320) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_MENU_SHOPOPENITEM_CMD(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049E330) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MENU_SERVERMENU_REQ(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1

  v3 = this;
  ServerMenuWin::SetServerMenu(this->m_pkServerMenuWin, (PROTO_NC_MENU_SERVERMENU_REQ *)pvData);
  ServerMenuWin::SetPriority(v3->m_pkServerMenuWin, *((_BYTE *)pvData + 128));
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkServerMenuWin->vfptr);
  return iRevBytes;
}

//----- (0049E380) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MENU_OPENSTORAGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1

  v3 = this;
  this->m_eOpenType = *((_BYTE *)pvData + 10);
  if ( Bank::SetContents((PROTO_NC_MENU_OPENSTORAGE_CMD *)pvData) == 1 )
    GameFrameWork::OpenStorageMenu(v3, *((_BYTE *)pvData + 9));
  return iRevBytes;
}

//----- (0049E3C0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_SKILL_COOLTIME_CMD(int iRevBytes, void *pvData)
{
  float fLastCoolTime; // ST04_4@1

  fLastCoolTime = (double)*(unsigned int *)((char *)pvData + 2);
  Skill::SetLastCoolTime(*(_WORD *)pvData, fLastCoolTime);
  return iRevBytes;
}

//----- (0049E3F0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_TRADE_OPPOSITUPBOARD_CMD(int iRevBytes, void *pvData)
{
  _BYTE *v3; // esi@1
  Item *v4; // eax@1

  v3 = pvData;
  v4 = Item::Create((char *)pvData + 1, (unsigned int *)&pvData);
  if ( v4 )
    UserTrade::AddOpp(v4, *v3);
  return iRevBytes;
}

//----- (0049E420) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_TRADE_OPPOSITDOWNBOARD_CMD(int iRevBytes, void *pvData)
{
  UserTrade::RemoveOpp(*(_BYTE *)pvData);
  return iRevBytes;
}

//----- (0049E440) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_TRADE_CENBOARDING_ACK(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049E450) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_TRADE_OPPOSITCENBOARDING_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  UserTradeWin::SetOtherMoney(this->m_pkUserTradeWin, *(_QWORD *)pvData);
  return iRevBytes;
}

//----- (0049E470) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_TRADE_BOARDLOCK_ACK(int iRevBytes, void *pvData)
{
  UserTrade::LockMy(1);
  return iRevBytes;
}

//----- (0049E490) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_TRADE_OPPOSITBOARDLOCK_CMD(int iRevBytes, void *pvData)
{
  UserTrade::LockOpp(1);
  return iRevBytes;
}

//----- (0049E4B0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_TRADE_DECIDE_ACK(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049E4C0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_TRADE_OPPOSITDECIDE_CMD(int iRevBytes, void *pvData)
{
  UserTrade::AgreeOpp(1);
  return iRevBytes;
}

//----- (0049E4E0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_TRADE_BOARDUNLOCK_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1

  v3 = this;
  UserTrade::LockMy(0);
  UserTradeWin::UnlockMyLock(v3->m_pkUserTradeWin);
  return iRevBytes;
}

//----- (0049E510) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_TRADE_OPPOSITBOARDUNLOCK_CMD(int iRevBytes, void *pvData)
{
  UserTrade::LockOpp(0);
  return iRevBytes;
}

//----- (0049E530) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_FRIEND_LIST_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // ebx@1
  GameFrameWork *v4; // edi@1
  PROTO_FRIEND_INFO *v5; // esi@1

  v3 = *(_BYTE *)pvData;
  v4 = this;
  v5 = (PROTO_FRIEND_INFO *)((char *)pvData + 1);
  FriendWin::ClearFriendList(this->m_pkFriendWin);
  FriendCallWin::ClearFriendList(v4->m_pkFriendCallWin);
  if ( v3 > 0 )
  {
    do
    {
      FriendWin::AddFriend(v4->m_pkFriendWin, v5, 1);
      FriendCallWin::AddFriend(v4->m_pkFriendCallWin, v5, 1);
      ++v5;
      --v3;
    }
    while ( v3 );
  }
  return iRevBytes;
}

//----- (0049E590) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_FRIEND_ADD_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1

  v3 = this;
  FriendWin::AddFriend(this->m_pkFriendWin, (PROTO_FRIEND_INFO *)pvData, 0);
  FriendCallWin::AddFriend(v3->m_pkFriendCallWin, (PROTO_FRIEND_INFO *)pvData, 0);
  return iRevBytes;
}

//----- (0049E5C0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_FRIEND_MAP_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  _BYTE v4[12]; // ST14_12@1
  _BYTE v5[20]; // ST00_20@1
  _BYTE v6[12]; // ST14_12@1
  _BYTE v7[20]; // ST00_20@1

  v3 = this;
  *(_DWORD *)v4 = *((_DWORD *)pvData + 5);
  *(_QWORD *)&v4[4] = *((_QWORD *)pvData + 3);
  *(_DWORD *)v5 = *(_DWORD *)pvData;
  *(_QWORD *)&v5[4] = *(_QWORD *)((char *)pvData + 4);
  *(_QWORD *)&v5[12] = *(_QWORD *)((char *)pvData + 12);
  FriendWin::ChangeMapFriend(this->m_pkFriendWin, *(Name5 *)v5, *(Name3 *)v4);
  *(_DWORD *)v6 = *((_DWORD *)pvData + 5);
  *(_QWORD *)&v6[4] = *((_QWORD *)pvData + 3);
  *(_DWORD *)v7 = *(_DWORD *)pvData;
  *(_QWORD *)&v7[4] = *(_QWORD *)((char *)pvData + 4);
  *(_QWORD *)&v7[12] = *(_QWORD *)((char *)pvData + 12);
  FriendCallWin::ChangeMapFriend(v3->m_pkFriendCallWin, *(Name5 *)v7, *(Name3 *)v6);
  return iRevBytes;
}

//----- (0049E660) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_FRIEND_PARTY_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  _BYTE v4[20]; // ST00_20@1
  _BYTE v5[20]; // ST00_20@1

  v3 = this;
  *(_DWORD *)v4 = *(_DWORD *)pvData;
  *(_QWORD *)&v4[4] = *(_QWORD *)((char *)pvData + 4);
  *(_QWORD *)&v4[12] = *(_QWORD *)((char *)pvData + 12);
  FriendWin::PartyFriend(this->m_pkFriendWin, *(Name5 *)v4, *((_BYTE *)pvData + 20) != 0);
  *(_DWORD *)v5 = *(_DWORD *)pvData;
  *(_QWORD *)&v5[4] = *(_QWORD *)((char *)pvData + 4);
  *(_QWORD *)&v5[12] = *(_QWORD *)((char *)pvData + 12);
  FriendCallWin::PartyFriend(v3->m_pkFriendCallWin, *(Name5 *)v5, *((_BYTE *)pvData + 20) != 0);
  return iRevBytes;
}

//----- (0049E6F0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_FRIEND_LEVEL_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  _BYTE v4[20]; // ST00_20@1
  _BYTE v5[20]; // ST00_20@1

  v3 = this;
  *(_DWORD *)v4 = *(_DWORD *)pvData;
  *(_QWORD *)&v4[4] = *(_QWORD *)((char *)pvData + 4);
  *(_QWORD *)&v4[12] = *(_QWORD *)((char *)pvData + 12);
  FriendWin::LevelChange(this->m_pkFriendWin, *(Name5 *)v4, *((_BYTE *)pvData + 20));
  *(_DWORD *)v5 = *(_DWORD *)pvData;
  *(_QWORD *)&v5[4] = *(_QWORD *)((char *)pvData + 4);
  *(_QWORD *)&v5[12] = *(_QWORD *)((char *)pvData + 12);
  FriendCallWin::LevelChange(v3->m_pkFriendCallWin, *(Name5 *)v5, *((_BYTE *)pvData + 20));
  return iRevBytes;
}

//----- (0049E770) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_FRIEND_POINT_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  FriendWin *v3; // ecx@1

  v3 = this->m_pkFriendWin;
  if ( v3 )
    FriendWin::SetFriendPoint(v3, *(_WORD *)pvData);
  return iRevBytes;
}

//----- (0049E790) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_KQ_STATUS_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  KingdomQuestWin::SetKQuestStatus(this->m_pkKingDomQuest, (PROTO_NC_KQ_STATUS_ACK *)pvData);
  return iRevBytes;
}

//----- (0049E7B0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_KQ_LIST_TIME_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  KingdomQuestWin *v4; // ecx@1

  v3 = this;
  v4 = this->m_pkKingDomQuest;
  if ( v4 )
    KingdomQuestWin::SetServerTime(v4, (int *)pvData);
  mhRepairObjWin::SetServerTime(v3->m_pkMHRepairWin, (int *)pvData);
  return iRevBytes;
}

//----- (0049E7E0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_KQ_LIST_ADD_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  KingdomQuestWin *v3; // ecx@1

  v3 = this->m_pkKingDomQuest;
  if ( v3 )
    KingdomQuestWin::AddKQuest(v3, (PROTO_NC_KQ_LIST_ADD_ACK *)pvData);
  return iRevBytes;
}

//----- (0049E800) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_KQ_LIST_DELETE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  unsigned __int16 v3; // si@1
  GameFrameWork *i; // ebx@1

  v3 = 0;
  for ( i = this; v3 < *(_WORD *)pvData; ++v3 )
    KingdomQuestWin::DeleteKQuestInfo(i->m_pkKingDomQuest, *(_DWORD *)((char *)pvData + 4 * v3 + 2));
  KingdomQuestWin::UpdateAllList(i->m_pkKingDomQuest);
  return iRevBytes;
}

//----- (0049E850) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_KQ_LIST_UPDATE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  KingdomQuestWin *v3; // ecx@1

  v3 = this->m_pkKingDomQuest;
  if ( v3 )
    KingdomQuestWin::UpdateListState(v3, (PROTO_NC_KQ_LIST_UPDATE_ACK *)pvData);
  return iRevBytes;
}

//----- (0049E870) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_KQ_SCHEDULE_ACK(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049E880) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_KQ_NOTIFY_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  KingdomQuestPlayerList *v4; // ecx@2
  KingdomQuestTeamList *v5; // ecx@4

  v3 = this;
  *((_BYTE *)pvData + *(_BYTE *)pvData + 1) = 0;
  if ( *(_BYTE *)pvData > 1u )
  {
    GameFrameWork::VaAddSysMsg(this, (char *)pvData + 1);
    v3->m_pkKingDomQuest->m_SelectedKQHandle = -1;
    v4 = v3->m_pkKQPlayerList;
    if ( v4 )
      KingdomQuestPlayerList::ReSetList(v4);
    v5 = v3->m_pkKQTeamList;
    if ( v5 )
      KingdomQuestTeamList::ReSetList(v5);
  }
  return iRevBytes;
}

//----- (0049E8E0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_KQ_START_CMD(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049E8F0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_KQ_RESTDEADNUM_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  KQuestTimeWin *v3; // ecx@1

  v3 = this->m_pkKQuestTimeWin;
  if ( v3 )
    KQuestTimeWin::SetRestLife(v3, *(_BYTE *)pvData);
  return iRevBytes;
}

//----- (0049E910) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_KQ_ENTRYRESPONCE_REQ(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049E920) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_WT_MOBINC_CMD(int iRevBytes, void *pvData)
{
  Inventory::UpdateWeaponTitleWhenMobDead(&g_kInventory, *(_WORD *)pvData);
  return iRevBytes;
}

//----- (0049E940) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_SCENARIO_ANIMATION_CMD(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049E950) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_SCENARIO_MESSAGENPC_CMD(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049E960) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_SCENARIO_LIGHT_CMD(int iRevBytes, void *pvData)
{
  unsigned __int8 v3; // cl@1
  unsigned __int8 v4; // cl@3
  unsigned __int8 v5; // al@5
  NiColor kColor; // [sp+0h] [bp-18h]@7
  float fB; // [sp+Ch] [bp-Ch]@1
  float fG; // [sp+10h] [bp-8h]@1
  float fR; // [sp+14h] [bp-4h]@1

  v3 = *(_BYTE *)pvData;
  fR = 0.0;
  fG = 0.0;
  fB = 0.0;
  if ( v3 )
    fR = (double)v3 / 255.0;
  v4 = *((_BYTE *)pvData + 1);
  if ( v4 )
    fG = (double)v4 / 255.0;
  v5 = *((_BYTE *)pvData + 2);
  if ( v5 )
    fB = (double)v5 / 255.0;
  World::ClearLightFog(&g_kWorld);
  kColor.r = fR;
  kColor.g = fG;
  kColor.b = fB;
  World::SetAmbientLightAmbientColor(&g_kWorld, &kColor);
  return iRevBytes;
}

//----- (0049E9F0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_SCENARIO_PLAYERLIKEMOB_ANIMATE_CMD(int iRevBytes, void *pvData)
{
  CharMgr::UpdateNpcActionEvent(&g_kCharMgr, (PROTO_NC_SCENARIO_PLAYERLIKEMOB_ANIMATE_CMD *)pvData);
  return iRevBytes;
}

//----- (0049EA10) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SCENARIO_CHATWIN_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  unsigned int v4; // ebx@1
  int v5; // ST0C_4@1
  NpcDialogWin *v6; // ecx@1
  char acTemp[2048]; // [sp+Ch] [bp-804h]@1

  v3 = this;
  memset(acTemp, 0, 0x800u);
  v4 = *((_BYTE *)pvData + 2);
  memcpy(acTemp, (char *)pvData + 3, v4);
  v5 = *(_WORD *)pvData;
  v6 = v3->m_pkNpcDlgWin;
  acTemp[v4] = 0;
  NpcDialogWin::OpenNpcScriptDialog(v6, v5, acTemp, 1);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkNpcDlgWin->vfptr);
  return iRevBytes;
}

//----- (0049EAA0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_QUEST_CLIENT_SCENARIO_DONE_ACK(int iRevBytes, void *pvData)
{
  CClientQuest *v3; // eax@1

  v3 = QuestDataMgr::GetQuest();
  CQuest::Recv_NC_QUEST_CLIENT_SCENARIO_DONE_ACK(
    (CQuest *)&v3->vfptr,
    (PROTO_NC_QUEST_CLIENT_SCENARIO_DONE_ACK *)pvData);
  return iRevBytes;
}

//----- (0049EAC0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_QUEST_NOTIFY_MOB_KILL_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  CClientQuest *v4; // eax@1
  QuestFinishWin *v5; // ecx@1

  v3 = this;
  v4 = QuestDataMgr::GetQuest();
  CQuest::Recv_NC_QUEST_NOTIFY_MOB_KILL_CMD((CQuest *)&v4->vfptr, (PROTO_NC_QUEST_NOTIFY_MOB_KILL_CMD *)pvData);
  v5 = v3->m_pkQuestFinishWin;
  if ( v5 )
    QuestFinishWin::UpdateQuest(v5);
  return iRevBytes;
}

//----- (0049EAF0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_QUEST_SELECT_START_ACK(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049EB00) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_PRISON_END_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // eax@1
  int v4; // eax@2
  PrisonTimeWin *v5; // ecx@4
  PrisonTimeWin *v7; // ecx@6

  v3 = *(_WORD *)pvData;
  if ( (_WORD)v3 == 3496 )
    goto LABEL_11;
  v4 = v3 - 3497;
  if ( !v4 )
  {
    v7 = this->m_pkPrisonTimeWin;
    if ( v7 )
      PrisonTimeWin::ResetTime(v7, *(_DWORD *)((char *)pvData + 2));
    return iRevBytes;
  }
  if ( v4 == 1 )
  {
LABEL_11:
    v5 = this->m_pkPrisonTimeWin;
    if ( v5 )
    {
      PrisonTimeWin::ResetTime(v5, 0);
      return iRevBytes;
    }
  }
  return iRevBytes;
}

//----- (0049EB70) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_EVENT_FRIEND_INITMSG_ACK(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049EBA0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_EVENT_FRIEND_REQUEST_ACK(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049EBB0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_EVENT_FRIEND_REQUESTED_CMD(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049EBC0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_EVENT_FRIEND_NPCVIEW_CMD(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049EBD0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_EVENT_FRIEND_REWARD_CMD(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049EBF0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_EVENT_WORLDCUP_ENTER_CMD(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049EC00) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_MINIHOUSE_ACTIV_ACK(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049EC10) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHARGED_BUFFTERMINATE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1

  v3 = this;
  ChargedItemList::DelUsingItem(*(_DWORD *)pvData);
  ChargedItemListWin::Refresh(v3->m_pkChargedItemListWin);
  v3->m_pkStatusChargedBuffWin->m_fLastUpdatedTime = 0.0;
  return iRevBytes;
}

//----- (0049EC50) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHARGED_DELETEWEAPONTITLE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1

  v3 = this;
  WeaponTitleDeleteWin::SetClearItemInven(this->m_pkWeaponTitleDeleteWin, (ITEM_INVEN *)pvData);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkWeaponTitleDeleteWin->vfptr);
  return iRevBytes;
}

//----- (0049EC80) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_CHARGED_SKILLEMPOW_INITIALIZE_SUC_CMD(int iRevBytes, void *pvData)
{
  Skill::ClearLearnActSkillInfo();
  Skill::SetRestEmpowerPoint(*(_BYTE *)pvData);
  SkillIcon::RefreshSkillInfoAll();
  return iRevBytes;
}

//----- (0049ECB0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_CHARGED_STAT_INITIALIZE_FAIL_CMD(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049ECC0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_CHARGED_SKILLEMPOW_INITIALIZE_FAIL_CMD(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049ECD0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHARGED_BOOTHSLOTSIZE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  PrivateStoreWin *v3; // ecx@2

  if ( *(_BYTE *)pvData <= 0x14u )
  {
    v3 = this->m_pkPrivateStoreWin;
    PrivateStoreWin::SetBoothSize(*(_BYTE *)pvData);
  }
  return iRevBytes;
}

//----- (0049ECF0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ACT_ROAR_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData != 1792 )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (0049ED20) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_REARRANGE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData != 4545 )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (0049ED50) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_MINIHOUSE_REARRANGE_CMD(int iRevBytes, void *pvData)
{
  int v3; // edx@1
  NiPoint3 NewPos; // [sp+4h] [bp-Ch]@1

  v3 = *(_WORD *)((char *)pvData + 1);
  NewPos.x = *(float *)((char *)pvData + 3);
  NewPos.y = *(float *)((char *)pvData + 7);
  NewPos.z = *(float *)((char *)pvData + 11);
  MiniHouseIndoor::SetObjPos(&g_kWorld.m_MiniHouseIndoorMode, v3, &NewPos, *(float *)((char *)pvData + 15));
  return iRevBytes;
}

//----- (0049ED90) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_MINIHOUSE_CREATE_FURNITURE_CMD(int iRevBytes, void *pvData)
{
  signed int v3; // edi@1
  char *v4; // esi@2
  char v5; // al@3
  int v6; // edx@3
  NiPoint3 ObjPos; // [sp+18h] [bp-Ch]@3

  MiniHouseIndoor::CancelPickObj(&g_kWorld.m_MiniHouseIndoorMode);
  v3 = 0;
  if ( *(_BYTE *)pvData )
  {
    v4 = (char *)pvData + 9;
    do
    {
      v5 = v4[12];
      v6 = *((_WORD *)v4 - 3);
      ObjPos.x = *((float *)v4 - 1);
      ObjPos.y = *(float *)v4;
      ObjPos.z = *((float *)v4 + 1);
      MiniHouseIndoor::AddObject(
        &g_kWorld.m_MiniHouseIndoorMode,
        *((_WORD *)v4 - 4),
        v6,
        &ObjPos,
        *((float *)v4 + 2),
        v5,
        1);
      ++v3;
      v4 += 21;
    }
    while ( v3 < *(_BYTE *)pvData );
  }
  return iRevBytes;
}

//----- (0049EE00) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_DELETE_FURNITURE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData != 4545 )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (0049EE30) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_FUNITUREINFOCOMPLETE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData != 4545 )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (0049EE60) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_MINIHOUSE_FUNICHERINVEN_CMD(int iRevBytes, void *pvData)
{
  PROTO_NC_CHAR_CLIENT_ITEM_CMD *v3; // ebx@1
  int v4; // eax@1
  char *v5; // edi@2
  char *v6; // esi@3
  Item *v7; // eax@3
  char v8; // dl@5
  char v9; // ST10_1@5
  int v10; // edx@5
  NiPoint3 Pos; // [sp+18h] [bp-18h]@5
  int v13; // [sp+24h] [bp-Ch]@2
  unsigned int uiBufSize; // [sp+28h] [bp-8h]@1
  ITEM_INVEN kInven; // [sp+2Ch] [bp-4h]@3

  v3 = (PROTO_NC_CHAR_CLIENT_ITEM_CMD *)pvData;
  v4 = *(_BYTE *)pvData;
  uiBufSize = 0;
  if ( v4 )
  {
    v5 = (char *)pvData + 3;
    v13 = v4;
    do
    {
      v6 = v5;
      v7 = Item::Create(v5, &kInven, &uiBufSize);
      v5 += uiBufSize;
      if ( v7 && v6[5] & 1 )
      {
        v8 = v6[32];
        Pos.x = *((float *)v6 + 3);
        v9 = v8;
        v10 = *((_WORD *)v6 + 3);
        Pos.y = *((float *)v6 + 4);
        Pos.z = *((float *)v6 + 5);
        MiniHouseIndoor::AddObject(
          &g_kWorld.m_MiniHouseIndoorMode,
          v10,
          *(_WORD *)(v6 + 3),
          &Pos,
          *((float *)v6 + 6),
          v9,
          1);
      }
      --v13;
    }
    while ( v13 );
    Inventory::InitData(&g_kInventory, v3, &v3->numofitem);
    BYTE3(pvData) = 1;
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x23u, 0x1Du, (char *)&pvData + 3, 1);
  }
  return iRevBytes;
}

//----- (0049EF20) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_VISIT_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData != 4481 )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (0049EF50) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_COMPULSIONMOVETO_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData != 4560 )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (0049EF80) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_MODIFY_PASSWORD_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData != 4481 )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (0049EFB0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_MODIFY_TITLE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData != 4481 )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (0049EFE0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_MODIFY_MAXENTERNUM_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData != 4481 )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (0049F010) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_MODIFY_OWNERBLOG_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@3

  v3 = this;
  if ( *(_WORD *)pvData != 4481 )
  {
    GameFrameWork::SendOwnerBlogAddrReq(this);
    if ( *(_WORD *)pvData != 4481 )
    {
      v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
      GameFrameWork::AddSysMsg(v3, v4);
    }
  }
  return iRevBytes;
}

//----- (0049F050) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_OWNERBLOG_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *(_DWORD *)pvData != 4481 )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_DWORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (0049F080) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_CHAR_ACTION_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData != 5312 )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (0049F0B0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_MINIHOUSE_CHAR_ACTION_CMD(int iRevBytes, void *pvData)
{
  MiniHouseIndoor::ObjDoAction(
    &g_kWorld.m_MiniHouseIndoorMode,
    *((_WORD *)pvData + 2),
    *((_WORD *)pvData + 3),
    *(_WORD *)pvData,
    *((_WORD *)pvData + 1),
    *((_BYTE *)pvData + 8),
    *((_BYTE *)pvData + 9));
  return iRevBytes;
}

//----- (0049F0F0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_MODIFY_NOTIFY_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData != 4481 )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (0049F120) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_PORTAL_LIST_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  signed int v3; // edi@1
  char *v4; // esi@2
  _BYTE v5[6]; // ST00_6@3
  GameFrameWork *v7; // [sp+Ch] [bp-4h]@1

  v3 = 0;
  v7 = this;
  if ( *(_WORD *)pvData > 0u )
  {
    v4 = (char *)pvData + 2;
    do
    {
      *(_DWORD *)v5 = *(_DWORD *)v4;
      *(_WORD *)&v5[4] = *((_WORD *)v4 + 2);
      mhPortalListWin::Add(v7->m_pkMHPortalListWin, *(PORTAL_INFO *)v5);
      ++v3;
      v4 += 6;
    }
    while ( v3 < *(_WORD *)pvData );
  }
  return iRevBytes;
}

//----- (0049F180) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_PORTAL_ADD_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  _BYTE v3[6]; // ST00_6@1

  *(_DWORD *)v3 = *(_DWORD *)pvData;
  *(_WORD *)&v3[4] = *((_WORD *)pvData + 2);
  mhPortalListWin::Add(this->m_pkMHPortalListWin, *(PORTAL_INFO *)v3);
  return iRevBytes;
}

//----- (0049F1B0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_MINIHOUSE_PORTAL_DEL_ACK(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049F1C0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_PORTAL_DEL_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  mhPortalListWin::Delete(this->m_pkMHPortalListWin, *(_WORD *)pvData);
  return iRevBytes;
}

//----- (0049F1E0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_MINIHOUSE_PORTAL_OPEN_ACK(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049F1F0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_MINIHOUSE_PORTAL_OPEN_CMD(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049F200) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_MINIHOUSE_PORTAL_CLOSE_ACK(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049F210) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_MINIHOUSE_PORTAL_CLOSE_CMD(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049F220) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_MINIHOUSE_PORTAL_EFFECT_ACK(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049F230) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_MINIHOUSE_PORTAL_EFFECT_CMD(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049F240) --------------------------------------------------------
void __stdcall GameFrameWork::SendMHPortalDelReq(unsigned __int16 ID)
{
  if ( ID != -1 )
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x23u, 0x4Du, &ID, 2);
}

//----- (0049F270) --------------------------------------------------------
void GameFrameWork::SendMHPortalCloseReq()
{
  char pProto; // [sp+1h] [bp-1h]@1

  pProto = 0;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x23u, 0x53u, &pProto, 1);
}

//----- (0049F290) --------------------------------------------------------
void GameFrameWork::SendMHPortalUseReq()
{
  char pProto; // [sp+1h] [bp-1h]@1

  pProto = 0;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x23u, 0x56u, &pProto, 1);
}

//----- (0049F2B0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_MINIHOUSE_FURNITURE_ENDURE_CMD(int iRevBytes, void *pvData)
{
  unsigned __int8 v3; // bl@1

  v3 = 0;
  if ( *(_BYTE *)pvData )
  {
    do
    {
      MiniHouseIndoor::ChangeEndure(
        &g_kWorld.m_MiniHouseIndoorMode,
        (MHE_STEP)*((_BYTE *)pvData + 4 * v3 + 3),
        *(_WORD *)((char *)pvData + 4 * v3 + 1));
      ++v3;
    }
    while ( v3 < *(_BYTE *)pvData );
  }
  return iRevBytes;
}

//----- (0049F2F0) --------------------------------------------------------
void __stdcall GameFrameWork::OnSendNCItemDisMantleReq(int byItemPos)
{
  BYTE3(byItemPos) = byItemPos;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x2Au, (char *)&byItemPos + 3, 1);
}

//----- (0049F320) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_LEVEL_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  if ( pvData )
    HolyPromiseWin::SetLevelChange(this->m_pkHolyPromiseWin, (Name5 *)pvData, *((_BYTE *)pvData + 20));
  return iRevBytes;
}

//----- (0049F350) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_LIST_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  HolyPromiseWin::AddHolyPromiseList(this->m_pkHolyPromiseWin, (PROTO_NC_HOLY_PROMISE_LIST_CMD *)pvData);
  return iRevBytes;
}

//----- (0049F370) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_REWARDINVENOPENFAIL_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (0049F3A0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MAP_TOWNPORTAL_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData != 6593 )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (0049F3D0) --------------------------------------------------------
void __stdcall GameFrameWork::NcGuildRetypeReq(int nType, int nCharInvenItem)
{
  BYTE1(nCharInvenItem) = 0;
  if ( nType != 2 )
    BYTE1(nCharInvenItem) = 1;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x1Du, 0xB4u, &nCharInvenItem, 2);
}

//----- (0049F410) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAT_RESTRICT_DEL_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1

  v3 = this;
  if ( *(_WORD *)pvData == 7184 )
  {
    CChatRestrict::Del(&this->m_pkChatBlockListWin->m_RestrictList, (Name5 *)((char *)pvData + 2));
    GameFrameWork::UpdateChatBlockListWin(v3);
  }
  return iRevBytes;
}

//----- (0049F450) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ACT_ACTIONBYITEM_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData != 7208 )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (0049F480) --------------------------------------------------------
int __thiscall GameFrameWork::ON_NC_KQ_MOBKILLNUMBER_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  KQuestTimeWin *v3; // ecx@2
  int v4; // eax@2

  if ( pvData )
  {
    v3 = this->m_pkKQuestTimeWin;
    v4 = *((_WORD *)pvData + 1) - *(_WORD *)pvData;
    if ( v4 > 0 )
    {
      KQuestTimeWin::SetRequiredKillMobNums(v3, v4);
      return iRevBytes;
    }
    KQuestTimeWin::SetRequiredKillMobNums(v3, 0);
  }
  return iRevBytes;
}

//----- (0049F4C0) --------------------------------------------------------
int __thiscall GameFrameWork::ON_NC_KQ_JOINING_ALARM_END_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  KingdomQuestWin *v4; // ecx@1
  bool v5; // bl@1
  MiniMapWin *v6; // ecx@3
  MiniMapWin *v7; // eax@5
  MiniMapWin *v8; // esi@6
  char bStarted; // [sp+Fh] [bp-1h]@1

  v3 = this;
  v4 = this->m_pkKingDomQuest;
  v5 = 0;
  bStarted = 0;
  if ( v4 )
  {
    v5 = v4->m_JoinHandle == *(_DWORD *)pvData;
    bStarted = KingdomQuestWin::IsStarted(v4);
  }
  v6 = v3->m_pkMiniMapWin;
  if ( v6 )
  {
    MiniMapWin::RemoveKQAlarmInfo(v6, *(_DWORD *)pvData);
    if ( v5 )
    {
      v7 = v3->m_pkMiniMapWin;
      v7->m_bKQJoined = 0;
      v7->m_bKQListChanged = 1;
    }
    v8 = v3->m_pkMiniMapWin;
    v8->m_bKQStarted = bStarted;
    v8->m_bKQListChanged = 1;
  }
  return iRevBytes;
}

//----- (0049F540) --------------------------------------------------------
int __thiscall GameFrameWork::ON_NC_KQ_JOINING_ALARM_LIST(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // ebx@1
  KingdomQuestWin *v4; // ecx@1
  MiniMapWin *v5; // ecx@3
  char *v6; // edi@5
  _WORD *v7; // eax@6
  MiniMapWin::sKQAlarmInfo *v8; // esi@7
  bool v9; // al@11
  MiniMapWin *v10; // eax@14
  char bStarted; // [sp+7h] [bp-1h]@1
  char *pvDataa; // [sp+14h] [bp+Ch]@5

  v3 = this;
  v4 = this->m_pkKingDomQuest;
  bStarted = 0;
  if ( v4 )
    bStarted = KingdomQuestWin::IsStarted(v4);
  v5 = v3->m_pkMiniMapWin;
  if ( v5 )
  {
    MiniMapWin::ResetKQAlarm(v5);
    if ( *(_WORD *)pvData )
    {
      v6 = (char *)pvData + 6;
      pvDataa = (char *)*(_WORD *)pvData;
      do
      {
        v7 = operator new(8u);
        if ( v7 )
        {
          *(_DWORD *)v7 = -1;
          v7[2] = -1;
          *((_BYTE *)v7 + 6) = 1;
          v8 = (MiniMapWin::sKQAlarmInfo *)v7;
        }
        else
        {
          v8 = 0;
        }
        v8->m_kHandle = *((_DWORD *)v6 - 1);
        v8->m_kID = *(_WORD *)v6;
        v9 = User::Lv(&g_kUser) >= (unsigned __int8)v6[2] && User::Lv(&g_kUser) <= (unsigned __int8)v6[3];
        v8->m_bJoinable = v9;
        MiniMapWin::AddKQAlarmInfo(v3->m_pkMiniMapWin, v8);
        v6 += 8;
        --pvDataa;
      }
      while ( pvDataa );
    }
    v10 = v3->m_pkMiniMapWin;
    v10->m_bKQStarted = bStarted;
    v10->m_bKQListChanged = 1;
  }
  return iRevBytes;
}

//----- (0049F620) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_BAT_SUMEONESKILLCUT_CMD(int iRevBytes, void *pvData)
{
  Char *v3; // eax@1
  Char *v4; // esi@1

  v3 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  v4 = v3;
  if ( v3 && (unsigned __int8)((int (__thiscall *)(Char *))v3->vfptr[15].AddAbStateByAbstateIndex)(v3) )
  {
    Char::CancelSkillAction(v4, 0);
    AttackSequenceManager::ApplicateSkillSeqImmediately((AttackSequenceManager *)&v4->vfptr, v4, 1, 0);
  }
  return iRevBytes;
}

//----- (0049F670) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ACT_SETITEMHEALEFFECT(int iRevBytes, void *pvData)
{
  TextEffMgr::AddNumTextEff(
    &g_kTextEffMgr,
    *(_WORD *)pvData,
    *(_WORD *)((char *)pvData + 3),
    (TextEffMgr::TextEffColor)(4 * (*((_BYTE *)pvData + 2) & 1) | 1),
    0);
  return iRevBytes;
}

//----- (0049F6B0) --------------------------------------------------------
int __userpurge GameFrameWork::On_NC_CHAR_CLIENT_AUTO_PICK_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<edi>, int iRevBytes, void *pvData)
{
  Char *v4; // eax@1

  v4 = GameFrameWork::GetCharByHandle(this, *(_WORD *)pvData, 4, 190);
  if ( v4 )
    Char::SetItemAutoPickState(v4, a2, *((_BYTE *)pvData + 2) != 0);
  return iRevBytes;
}

//----- (0049F6F0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_QUEST_ERR(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@1

  v3 = this;
  v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
  GameFrameWork::AddSysMsg(v3, v4);
  return iRevBytes;
}

//----- (0049F720) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_LOGININFO_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  _BYTE v4[20]; // ST00_20@1
  _BYTE v5[20]; // ST0C_20@1
  RaidMemberInfo *v6; // eax@1
  _BYTE v7[20]; // ST0C_20@4
  PartyMemberInfo *v8; // eax@4

  v3 = this;
  *(_DWORD *)v4 = *((_DWORD *)pvData + 1);
  *(_QWORD *)&v4[4] = *((_QWORD *)pvData + 1);
  *(_QWORD *)&v4[12] = *((_QWORD *)pvData + 2);
  RaidInfo::MemberLoginInfo(&g_kRaidinfo, *(Name5 *)v4, *((_BYTE *)pvData + 2), *((_BYTE *)pvData + 3), 1);
  *(_DWORD *)v5 = *((_DWORD *)pvData + 1);
  *(_QWORD *)&v5[4] = *((_QWORD *)pvData + 1);
  *(_QWORD *)&v5[12] = *((_QWORD *)pvData + 2);
  v6 = RaidInfo::GetRaidMemberInfo(&g_kRaidinfo, *(Name5 *)v5);
  if ( v6 )
    MiniMapWin::AddRaidMember(v3->m_pkMiniMapWin, v6);
  if ( *((_BYTE *)pvData + 2) == g_kRaidinfo.m_uiMePartyIdx )
  {
    *(_DWORD *)v7 = *((_DWORD *)pvData + 1);
    *(_QWORD *)&v7[4] = *((_QWORD *)pvData + 1);
    *(_QWORD *)&v7[12] = *((_QWORD *)pvData + 2);
    v8 = Party::GetMemberInfo(&g_kParty, *(Name5 *)v7);
    if ( v8 )
      v8->m_ucStatus = 1;
  }
  return iRevBytes;
}

//----- (0049F7F0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_LOGOUTINFO_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  _BYTE v4[20]; // ST0C_20@1
  RaidMemberInfo *v5; // eax@1
  _BYTE v6[20]; // ST00_20@3
  _BYTE v7[20]; // ST0C_20@4
  PartyMemberInfo *v8; // eax@4

  v3 = this;
  *(_DWORD *)v4 = *((_DWORD *)pvData + 1);
  *(_QWORD *)&v4[4] = *((_QWORD *)pvData + 1);
  *(_QWORD *)&v4[12] = *((_QWORD *)pvData + 2);
  v5 = RaidInfo::GetRaidMemberInfo(&g_kRaidinfo, *(Name5 *)v4);
  if ( v5 )
    MiniMapWin::RemoveRaidMember(v3->m_pkMiniMapWin, v5);
  *(_DWORD *)v6 = *((_DWORD *)pvData + 1);
  *(_QWORD *)&v6[4] = *((_QWORD *)pvData + 1);
  *(_QWORD *)&v6[12] = *((_QWORD *)pvData + 2);
  RaidInfo::MemberLoginInfo(&g_kRaidinfo, *(Name5 *)v6, *((_BYTE *)pvData + 2), *((_BYTE *)pvData + 3), 0);
  if ( *((_BYTE *)pvData + 2) == g_kRaidinfo.m_uiMePartyIdx )
  {
    *(_DWORD *)v7 = *((_DWORD *)pvData + 1);
    *(_QWORD *)&v7[4] = *((_QWORD *)pvData + 1);
    *(_QWORD *)&v7[12] = *((_QWORD *)pvData + 2);
    v8 = Party::GetMemberInfo(&g_kParty, *(Name5 *)v7);
    if ( v8 )
    {
      v8->m_ucStatus = 0;
      v8->m_bShow = 0;
    }
  }
  return iRevBytes;
}

//----- (0049F8C0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_LOOTING_TYPE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData != 7808 )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (0049F8F0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_INVITATION_ANSWER_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData != 7808 )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (0049F920) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_MAPOUT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  _BYTE v4[20]; // ST00_20@1
  RaidMemberInfo *v5; // eax@1
  _BYTE v6[20]; // ST00_20@3
  PartyMemberInfo *v7; // eax@3

  v3 = this;
  *(_DWORD *)v4 = *(_DWORD *)pvData;
  *(_QWORD *)&v4[4] = *(_QWORD *)((char *)pvData + 4);
  *(_QWORD *)&v4[12] = *(_QWORD *)((char *)pvData + 12);
  v5 = RaidInfo::GetRaidMemberInfo(&g_kRaidinfo, *(Name5 *)v4);
  if ( v5 )
  {
    v5->m_bShow = 0;
    MiniMapWin::RemoveRaidMember(v3->m_pkMiniMapWin, v5);
  }
  *(_DWORD *)v6 = *(_DWORD *)pvData;
  *(_QWORD *)&v6[4] = *(_QWORD *)((char *)pvData + 4);
  *(_QWORD *)&v6[12] = *(_QWORD *)((char *)pvData + 12);
  v7 = Party::GetMemberInfo(&g_kParty, *(Name5 *)v6);
  if ( v7 )
    v7->m_bShow = 0;
  return iRevBytes;
}

//----- (0049F9B0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_LEAVE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData != 7808 )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (0049F9E0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_VANISH_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *((_WORD *)pvData + 10) != 7808 )
  {
    v4 = ErrMsgTable::GetErrMsg(*((_WORD *)pvData + 10));
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (0049FA10) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_MEMBERINFORM_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // ebx@1
  RaidMemberInfo *v4; // eax@1
  RaidMemberInfo *v5; // esi@1
  _BYTE v6[20]; // ST00_20@5
  PartyMemberInfo *v7; // eax@5

  v3 = this;
  RaidInfo::MemberInfomUpdate(&g_kRaidinfo, (PROTO_NC_RAID_MEMBERINFORM_CMD *)pvData);
  v4 = RaidInfo::GetRaidMemberInfoByIndex(&g_kRaidinfo, *((_BYTE *)pvData + 3) + 5 * *((_BYTE *)pvData + 2));
  v5 = v4;
  if ( v4 )
    MiniMapWin::AddRaidMember(v3->m_pkMiniMapWin, v4);
  if ( *((_BYTE *)pvData + 2) == g_kRaidinfo.m_uiMePartyIdx )
  {
    if ( v5 )
    {
      *(_DWORD *)v6 = v5->m_kCharID.n5_code[0];
      *(_QWORD *)&v6[4] = *(_QWORD *)&v5->m_kCharID.n5_code[1];
      *(_QWORD *)&v6[12] = *(_QWORD *)&v5->m_kCharID.n5_code[3];
      v7 = Party::GetMemberInfo(&g_kParty, *(Name5 *)v6);
      if ( v7 )
      {
        v7->m_iHP = *((_DWORD *)pvData + 1);
        v7->m_iHP = *((_DWORD *)pvData + 1);
        v7->m_bShow = 1;
      }
    }
  }
  return iRevBytes;
}

//----- (0049FAB0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_LOCATION_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  char *v3; // edi@2
  unsigned int v4; // ebx@3
  RaidMemberInfo *v5; // eax@3
  RaidMemberInfo *v6; // esi@3
  _BYTE v7[20]; // ST00_20@5
  PartyMemberInfo *v8; // eax@5
  double v9; // st7@6
  PartyWinInterface *v10; // ecx@8
  int kInfo; // [sp+Ch] [bp-18h]@3
  unsigned int kInfo_8; // [sp+14h] [bp-10h]@3
  GameFrameWork *v14; // [sp+1Ch] [bp-8h]@1
  unsigned int i; // [sp+20h] [bp-4h]@1

  v14 = this;
  i = 0;
  if ( *(_BYTE *)pvData )
  {
    v3 = (char *)pvData + 1;
    do
    {
      v4 = *((_DWORD *)v3 + 1);
      kInfo_8 = *((_DWORD *)v3 + 2);
      kInfo = *(_DWORD *)v3;
      v5 = RaidInfo::GetRaidMemberInfoByIndex(
             &g_kRaidinfo,
             (*(_DWORD *)v3 >> 24) + 5 * (unsigned __int8)(*(_DWORD *)v3 >> 16));
      v6 = v5;
      if ( v5 )
      {
        v5->m_fX = (double)v4;
        v5->m_fY = (double)kInfo_8;
        v5->m_ucStatus = 1;
        v5->m_bShow = 1;
        MiniMapWin::AddRaidMember(v14->m_pkMiniMapWin, v5);
        if ( BYTE2(kInfo) == g_kRaidinfo.m_uiMePartyIdx )
        {
          *(_DWORD *)v7 = v6->m_kCharID.n5_code[0];
          *(_QWORD *)&v7[4] = *(_QWORD *)&v6->m_kCharID.n5_code[1];
          *(_QWORD *)&v7[12] = *(_QWORD *)&v6->m_kCharID.n5_code[3];
          v8 = Party::GetMemberInfo(&g_kParty, *(Name5 *)v7);
          if ( v8 )
          {
            v8->m_fX = v6->m_fX;
            v9 = v6->m_fY;
            v8->m_ucStatus = 1;
            v8->m_fY = v9;
            v8->m_bShow = 1;
          }
        }
      }
      v3 += 12;
      ++i;
    }
    while ( i < *(_BYTE *)pvData );
  }
  v10 = v14->m_pkPartyWinInterface;
  if ( v10 )
    PartyWinInterface::Update(v10);
  return iRevBytes;
}

//----- (0049FBD0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_SLOT_MOVE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *((_WORD *)pvData + 10) != 7808 )
  {
    v4 = ErrMsgTable::GetErrMsg(*((_WORD *)pvData + 10));
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (0049FC00) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_SET_LEADER_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *((_WORD *)pvData + 10) != 7808 )
  {
    v4 = ErrMsgTable::GetErrMsg(*((_WORD *)pvData + 10));
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (0049FC30) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_SET_LEADER_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  PartyWinInterface *v3; // ecx@1

  v3 = this->m_pkPartyWinInterface;
  if ( v3 )
    PartyWinInterface::Update(v3);
  return iRevBytes;
}

//----- (0049FC50) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_SET_SUB_LEADER_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *((_WORD *)pvData + 10) != 7808 )
  {
    v4 = ErrMsgTable::GetErrMsg(*((_WORD *)pvData + 10));
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (0049FC80) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_SET_SUB_LEADER_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  PartyWinInterface *v3; // ecx@1

  v3 = this->m_pkPartyWinInterface;
  if ( v3 )
    PartyWinInterface::Update(v3);
  return iRevBytes;
}

//----- (0049FCA0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_DEL_SUB_LEADER_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *((_WORD *)pvData + 10) != 7808 )
  {
    v4 = ErrMsgTable::GetErrMsg(*((_WORD *)pvData + 10));
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (0049FCD0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_SET_LOOTER_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *((_WORD *)pvData + 10) != 7808 )
  {
    v4 = ErrMsgTable::GetErrMsg(*((_WORD *)pvData + 10));
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (0049FD00) --------------------------------------------------------
void __thiscall GameFrameWork::On_NC_MINIHOUSE_FURNITURE_EMOTION_REQ(GameFrameWork *this, int FurnitureID, char ActPos, char ActNum)
{
  BYTE2(FurnitureID) = ActPos;
  BYTE3(FurnitureID) = ActNum;
  GameFrameWork::SetCharEmotionUIState(this, 1);
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x23u, 0x62u, &FurnitureID, 4);
}

//----- (0049FD40) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_FURNITURE_EMOTION_CANCEL_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  AbStateInfecteeVtbl *v4; // esi@4
  int v5; // eax@4
  AbStateInfecteeVtbl *v6; // esi@4
  NiPoint3 *v7; // eax@4
  NiPoint3 kCharPos; // [sp+2Ch] [bp-Ch]@5

  v3 = this;
  if ( *(_WORD *)pvData == 5912 )
  {
    if ( ((int (*)(void))g_pkMainChar->vfptr[13].DeleteAbStateByAbstateIndex)() == 4 )
      ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[13].AddAbStateByAbstateIndex)(0);
    v4 = g_pkMainChar->vfptr;
    v5 = ((int (*)(void))g_pkMainChar->vfptr[6].DeleteAbStateByAbstateIndex)();
    ((void (__thiscall *)(Char *, int))v4[6].Affect)(g_pkMainChar, v5);
    GameFrameWork::SetCharEmotionUIState(v3, 0);
    v6 = g_pkMainChar->vfptr;
    v7 = MainChar::GetRevserveMovePos((MainChar *)g_pkMainChar);
    ((void (__thiscall *)(Char *, NiPoint3 *, _DWORD, NiColor *, signed int))v6[7].SetAbStateProperty)(
      g_pkMainChar,
      v7,
      0,
      &Char::INVALIDPOINT3,
      1);
    if ( !(unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[7].GetAbstateColor)() )
    {
      ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[6].SetAbStateProperty)(&kCharPos);
      World::GetAdvGroundPos(&g_kWorld, kCharPos.x, kCharPos.y, &kCharPos);
      ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[5].~AbStateInfectee)(&kCharPos);
    }
  }
  return iRevBytes;
}

//----- (0049FE40) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ITEM_REVIVEITEMUSEFAIL_CMD(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049FE50) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SKILL_SOMEONEREVAVALTOME_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  ReviveMenuWin::EnableBtns(this->m_pkReviveMenuWin, BTN_INDEX_REVIVE_FROM_CLERIC, 1);
  return iRevBytes;
}

//----- (0049FE70) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_SKILL_REPLYREVIVEFAIL_CMD(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (0049FE80) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_DICE_GAME_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  RollingDiceWin *v4; // ecx@2

  v3 = this;
  if ( pvData )
  {
    v4 = this->m_pkRollingDiceWin;
    if ( v4 )
    {
      RollingDiceWin::SetDiceInfo(v4, *(_WORD *)pvData, *(_DWORD *)((char *)pvData + 2));
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkRollingDiceWin->vfptr);
    }
  }
  return iRevBytes;
}

//----- (0049FEC0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_DICE_GAME_START_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  int v4; // eax@2
  const char *v5; // eax@3

  v3 = this;
  if ( pvData )
  {
    v4 = *(_WORD *)pvData;
    if ( (_WORD)v4 != 0x2000 )
    {
      v5 = ErrMsgTable::GetErrMsg(v4);
      GameFrameWork::AddSysMsg(v3, v5);
    }
  }
  return iRevBytes;
}

//----- (0049FF00) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MAP_MULTY_LINK_SELECT_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkGateChannelWin->vfptr);
  return iRevBytes;
}

//----- (0049FF20) --------------------------------------------------------
void __stdcall GameFrameWork::NcMistSetChatBlockSpamFilterCmd(int bySpamMsgShow, char bySpamBlockOn, unsigned __int16 wSpamFilterRate)
{
  BYTE1(bySpamMsgShow) = bySpamBlockOn;
  BYTE2(bySpamMsgShow) = wSpamFilterRate;
  NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 2u, 0x46u, &bySpamMsgShow, 3);
}

//----- (0049FF50) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_SKILL_ITEMACTIONCOOLTIME_CMD(int iRevBytes, void *pvData)
{
  signed int v3; // edi@1
  char *v4; // esi@2
  float fLastCoolTime; // ST04_4@3

  v3 = 0;
  if ( *(_WORD *)pvData > 0u )
  {
    v4 = (char *)pvData + 2;
    do
    {
      fLastCoolTime = (double)(*((_DWORD *)v4 + 1) / 0x3E8u);
      Skill::SetLastCoolTimeByItemActionID(*(_WORD *)v4, fLastCoolTime);
      ++v3;
      v4 += 8;
    }
    while ( v3 < *(_WORD *)pvData );
  }
  return iRevBytes;
}

//----- (0049FFB0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_USER_CONNECTION_CHANGE_CHAR_ID_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  _BYTE v4[20]; // ST14_20@2
  _BYTE v5[20]; // ST00_20@2
  int result; // eax@2
  _BYTE v7[20]; // ST14_20@3
  _BYTE v8[20]; // ST14_20@3
  _BYTE v9[20]; // ST14_20@3
  _BYTE v10[20]; // ST14_20@3
  _BYTE v11[20]; // ST14_20@3
  _BYTE v12[20]; // ST14_20@3

  v3 = this;
  if ( *(_BYTE *)pvData )
  {
    *(_DWORD *)v7 = *(_DWORD *)((char *)pvData + 1);
    *(_QWORD *)&v7[4] = *(_QWORD *)((char *)pvData + 5);
    *(_QWORD *)&v7[12] = *(_QWORD *)((char *)pvData + 13);
    FriendWin::DelFriend(this->m_pkFriendWin, *(Name5 *)v7);
    *(_DWORD *)v8 = *(_DWORD *)((char *)pvData + 1);
    *(_QWORD *)&v8[4] = *(_QWORD *)((char *)pvData + 5);
    *(_QWORD *)&v8[12] = *(_QWORD *)((char *)pvData + 13);
    FriendCallWin::DelFriend(v3->m_pkFriendCallWin, *(Name5 *)v8);
    *(_DWORD *)v9 = *(_DWORD *)((char *)pvData + 1);
    *(_QWORD *)&v9[4] = *(_QWORD *)((char *)pvData + 5);
    *(_QWORD *)&v9[12] = *(_QWORD *)((char *)pvData + 13);
    HolyPromiseWin::DelHolyPromise(v3->m_pkHolyPromiseWin, *(Name5 *)v9);
    *(_DWORD *)v10 = *(_DWORD *)((char *)pvData + 1);
    *(_QWORD *)&v10[4] = *(_QWORD *)((char *)pvData + 5);
    *(_QWORD *)&v10[12] = *(_QWORD *)((char *)pvData + 13);
    Party::DeleteMember(&g_kParty, *(Name5 *)v10);
    *(_DWORD *)v11 = *(_DWORD *)((char *)pvData + 1);
    *(_QWORD *)&v11[4] = *(_QWORD *)((char *)pvData + 5);
    *(_QWORD *)&v11[12] = *(_QWORD *)((char *)pvData + 13);
    RaidInfo::DeleteMember(&g_kRaidinfo, *(Name5 *)v11);
    WeddingInfoWin::DeleteWedInfo(v3->m_pkWeddingInfoWin, (Name5 *)((char *)pvData + 1));
    GuildWin::DeleteUser(v3->m_pkGuildWin, (Name5 *)((char *)pvData + 1));
    *(_DWORD *)v12 = *(_DWORD *)((char *)pvData + 1);
    *(_QWORD *)&v12[4] = *(_QWORD *)((char *)pvData + 5);
    *(_QWORD *)&v12[12] = *(_QWORD *)((char *)pvData + 13);
    GuildAcademyWin::DeleteUser(v3->m_pkGuildAcademyWin, *(Name5 *)v12);
    CChatRestrict::Del(&v3->m_pkChatBlockListWin->m_RestrictList, (Name5 *)((char *)pvData + 1));
    GameFrameWork::UpdateChatBlockListWin(v3);
    result = iRevBytes;
  }
  else
  {
    FriendWin::ChangeUserName(this->m_pkFriendWin, (Name5 *)((char *)pvData + 1), (Name5 *)((char *)pvData + 21));
    GuildWin::ChangeUserName(v3->m_pkGuildWin, (Name5 *)((char *)pvData + 1), (Name5 *)((char *)pvData + 21));
    *(_DWORD *)v4 = *(_DWORD *)((char *)pvData + 21);
    *(_QWORD *)&v4[4] = *(_QWORD *)((char *)pvData + 25);
    *(_QWORD *)&v4[12] = *(_QWORD *)((char *)pvData + 33);
    *(_DWORD *)v5 = *(_DWORD *)((char *)pvData + 1);
    *(_QWORD *)&v5[4] = *(_QWORD *)((char *)pvData + 5);
    *(_QWORD *)&v5[12] = *(_QWORD *)((char *)pvData + 13);
    GuildAcademyWin::ChangeUserName(v3->m_pkGuildAcademyWin, *(Name5 *)v5, *(Name5 *)v4);
    FriendCallWin::ChangeUserName(v3->m_pkFriendCallWin, (Name5 *)((char *)pvData + 1), (Name5 *)((char *)pvData + 21));
    HolyPromiseWin::ChangeUserName(
      v3->m_pkHolyPromiseWin,
      (Name5 *)((char *)pvData + 1),
      (Name5 *)((char *)pvData + 21));
    WeddingInfoWin::ChangeUserName(
      v3->m_pkWeddingInfoWin,
      (Name5 *)((char *)pvData + 1),
      (Name5 *)((char *)pvData + 21));
    RaidInfo::ChangeUserName(&g_kRaidinfo, (Name5 *)((char *)pvData + 1), (Name5 *)((char *)pvData + 21));
    Party::ChangeUserName(&g_kParty, (Name5 *)((char *)pvData + 1), (Name5 *)((char *)pvData + 21));
    ChatBlockListWin::ChangeUserName(
      v3->m_pkChatBlockListWin,
      (Name5 *)((char *)pvData + 1),
      (Name5 *)((char *)pvData + 21));
    GameFrameWork::UpdateChatBlockListWin(v3);
    result = iRevBytes;
  }
  return result;
}

//----- (004A01E0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_QUEST_START_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  CQuestWin2 *v4; // edx@3

  v3 = this;
  if ( *(_WORD *)pvData == 2896 )
  {
    if ( this->m_pkQuestWin )
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkQuestWin->vfptr);
      v4 = v3->m_pkQuestWin;
      if ( v4->m_pkEpicQuestWin )
        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkEpicQuestWin->vfptr);
    }
  }
  return iRevBytes;
}

//----- (004A0230) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_QUEST_READ_ACK(int iRevBytes, void *pvData)
{
  const char *v3; // eax@1

  v3 = fs("%d ??? Read OK\n", *((_WORD *)pvData + 1));
  OutputDebugStringA(v3);
  return iRevBytes;
}

//----- (004A0260) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_CHAR_CLIENT_QUEST_READ_CMD(int iRevBytes, void *pvData)
{
  CClientQuest *v3; // eax@1

  v3 = QuestDataMgr::GetQuest();
  CQuest::Recv_NC_CHAR_QUEST_READ_CMD_ACK((CQuest *)&v3->vfptr, (PROTO_NC_CHAR_QUEST_READ_CMD *)pvData);
  return iRevBytes;
}

//----- (004A0280) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_CHAR_CLIENT_QUEST_REPEAT_CMD(int iRevBytes, void *pvData)
{
  CClientQuest *v3; // eax@1

  v3 = QuestDataMgr::GetQuest();
  CQuest::Recv_NC_CHAR_QUEST_REPEAT_CMD_ACK((CQuest *)&v3->vfptr, (PROTO_NC_CHAR_QUEST_REPEAT_CMD *)pvData);
  return iRevBytes;
}

//----- (004A02A0) --------------------------------------------------------
void GameFrameWork::SaveAllKeyOpt()
{
  signed int v1; // eax@1
  char *v2; // ecx@1
  char v3; // dl@2
  char DummyMem[1024]; // [sp+0h] [bp-404h]@1

  memset(&DummyMem[1], 0, 0x3FFu);
  strcpy(DummyMem, "_");
  v1 = 0;
  v2 = &DummyMem[5];
  do
  {
    *v2 = HIBYTE(word_B4F5BA[4 * v1]);
    v3 = word_B4F5BA[4 * v1];
    *(_WORD *)(v2 - 3) = v1;
    *(v2 - 1) = v3;
    ++v1;
    v2 += 4;
  }
  while ( v1 < 95 );
  NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Cu, 0x39u, DummyMem, 4 * *(unsigned __int16 *)DummyMem + 2);
}
// B4F5BA: using guessed type __int16 word_B4F5BA[];

//----- (004A0340) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_CHAR_OPTION_IMPROVE_SET_GAMEOPTION_ACK(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (004A0350) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_OPTION_IMPROVE_INIT_KEYMAP_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  KeyRemappingWin *v3; // edx@2
  signed int v4; // esi@3
  char *v5; // eax@4

  if ( *(_WORD *)pvData == 8464 )
  {
    v3 = this->m_pkKeyRemappingWin;
    if ( v3 )
    {
      v4 = 0;
      if ( *((_WORD *)pvData + 1) > 0u )
      {
        v5 = (char *)pvData + 4;
        do
        {
          v3->m_keyMapping[*(_WORD *)v5].keyValue = v5[3];
          v3->m_keyMapping[*(_WORD *)v5].modifier = v5[2];
          ++v4;
          v5 += 4;
        }
        while ( v4 < *((_WORD *)pvData + 1) );
      }
      KeyRemappingWin::ReflashContents(this->m_pkKeyRemappingWin);
    }
  }
  return iRevBytes;
}

//----- (004A03D0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_OPTION_IMPROVE_SET_KEYMAP_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData != 8456 )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (004A0400) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_OPTION_IMPROVE_SET_SHORTCUTDATA_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData != 8448 )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (004A0430) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_CHARSAVE_UI_STATE_SAVE_ACK(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (004A0440) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_ADMIN_LEVEL_INFORM_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // eax@1

  this->m_bIsGM = *(_BYTE *)pvData != 0;
  v3 = *(_BYTE *)pvData;
  this->m_iAdminLevel = v3;
  this->m_bEnableAdmin = v3 > 0;
  return iRevBytes;
}

//----- (004A0470) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MISC_SPAMMER_REPORT_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData != 8544 )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (004A04A0) --------------------------------------------------------
void __thiscall GameFrameWork::NcActAutoWayFindingUseGateReq(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  char pProto; // [sp+7h] [bp-1h]@1

  v1 = this;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 8u, 0x70u, &pProto, 1);
  ((void (*)(void))g_pkMainChar->vfptr[7].DeleteAbStateByAbstateIndex)();
  v1->m_bMoveRunCtrl = 0;
}

//----- (004A04E0) --------------------------------------------------------
void __stdcall GameFrameWork::NcCharNewbieGuideViewSetCmd(int nGuideView)
{
  BYTE3(nGuideView) = nGuideView;
  NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 4u, 0xDAu, (char *)&nGuideView + 3, 1);
}

//----- (004A0510) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_CLIENT_CARDCOLLECT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // ebx@1
  unsigned int v4; // edi@2
  char *v5; // esi@3
  int result; // eax@5

  v3 = this;
  if ( this->m_pkCollectWin )
  {
    v4 = 0;
    if ( *((_WORD *)pvData + 2) > 0u )
    {
      v5 = (char *)pvData + 14;
      do
      {
        CollectWin::SetCard(
          v3->m_pkCollectWin,
          *(_WORD *)v5,
          (unsigned __int8)v5[2],
          *((_DWORD *)v5 - 1),
          *((_DWORD *)v5 - 2));
        CollectWin::SetNewest(v3->m_pkCollectWin, *((_DWORD *)v5 - 2), *(_WORD *)v5);
        ++v4;
        v5 += 11;
      }
      while ( v4 < *((_WORD *)pvData + 2) );
    }
    result = iRevBytes;
  }
  else
  {
    result = iRevBytes;
  }
  return result;
}

//----- (004A0590) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_CLIENT_CARDCOLLECT_BOOKMARK_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  unsigned int v3; // edi@2
  char *v4; // esi@3
  int result; // eax@6
  GameFrameWork *v6; // [sp+0h] [bp-4h]@1

  v6 = this;
  if ( this->m_pkCollectWin )
  {
    v3 = 0;
    if ( *((_WORD *)pvData + 2) <= 0u )
    {
      result = iRevBytes;
    }
    else
    {
      v4 = (char *)pvData + 6;
      while ( 1 )
      {
        CollectWin::SetBookmark(this->m_pkCollectWin, *(_WORD *)v4, *((_WORD *)v4 + 1));
        ++v3;
        v4 += 4;
        if ( v3 >= *((_WORD *)pvData + 2) )
          break;
        this = v6;
      }
      result = iRevBytes;
    }
  }
  else
  {
    result = iRevBytes;
  }
  return result;
}

//----- (004A0600) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_CLIENT_CARDCOLLECT_REWARD_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  unsigned int v3; // esi@2
  char *v4; // edi@3
  int result; // eax@6
  GameFrameWork *v6; // [sp+0h] [bp-4h]@1

  v6 = this;
  if ( this->m_pkCollectWin )
  {
    v3 = 0;
    if ( *((_WORD *)pvData + 2) <= 0u )
    {
      result = iRevBytes;
    }
    else
    {
      v4 = (char *)pvData + 6;
      while ( 1 )
      {
        CollectWin::SetReward(this->m_pkCollectWin, *(_WORD *)v4, 1);
        ++v3;
        v4 += 2;
        if ( v3 >= *((_WORD *)pvData + 2) )
          break;
        this = v6;
      }
      result = iRevBytes;
    }
  }
  else
  {
    result = iRevBytes;
  }
  return result;
}

//----- (004A0670) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_COLLECT_PEEPING_COLLECT_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  CollectWin *v4; // ecx@2
  unsigned int v5; // ebx@3
  char *v6; // esi@4
  const char *v8; // eax@7

  v3 = this;
  if ( *((_WORD *)pvData + 10) != 11200 )
  {
    v8 = ErrMsgTable::GetErrMsg(*((_WORD *)pvData + 10));
    GameFrameWork::AddSysMsg(v3, v8);
    return iRevBytes;
  }
  v4 = this->m_pkCollectPeepingWin;
  if ( !v4 )
    return iRevBytes;
  CollectWin::InitInfo(v4);
  v5 = 0;
  if ( *((_WORD *)pvData + 13) > 0u )
  {
    v6 = (char *)pvData + 36;
    do
    {
      CollectWin::SetCard(
        v3->m_pkCollectPeepingWin,
        *(_WORD *)v6,
        (unsigned __int8)v6[2],
        *((_DWORD *)v6 - 1),
        *((_DWORD *)v6 - 2));
      CollectWin::SetNewest(v3->m_pkCollectPeepingWin, *((_DWORD *)v6 - 2), *(_WORD *)v6);
      ++v5;
      v6 += 11;
    }
    while ( v5 < *((_WORD *)pvData + 13) );
  }
  CollectWin::Update(v3->m_pkCollectPeepingWin, 0);
  GameFrameWork::OpenCollectPeepingWin(v3, 1);
  return iRevBytes;
}

//----- (004A0730) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_COLLECT_PEEPING_COLLECT_BOOKMARK_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // ebx@1
  unsigned int v4; // edi@3
  char *v5; // esi@4
  const char *v7; // eax@7

  v3 = this;
  if ( *((_WORD *)pvData + 10) != 11200 )
  {
    v7 = ErrMsgTable::GetErrMsg(*((_WORD *)pvData + 10));
    GameFrameWork::AddSysMsg(v3, v7);
    return iRevBytes;
  }
  if ( !this->m_pkCollectPeepingWin )
    return iRevBytes;
  v4 = 0;
  if ( *((_WORD *)pvData + 13) > 0u )
  {
    v5 = (char *)pvData + 28;
    do
    {
      CollectWin::SetBookmark(v3->m_pkCollectPeepingWin, *(_WORD *)v5, *((_WORD *)v5 + 1));
      ++v4;
      v5 += 4;
    }
    while ( v4 < *((_WORD *)pvData + 13) );
  }
  CollectWin::Update(v3->m_pkCollectPeepingWin, 0);
  GameFrameWork::OpenCollectPeepingWin(v3, 1);
  return iRevBytes;
}

//----- (004A07C0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_TOGGLESKILL_ON_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  ShortCutWin **v4; // esi@1
  signed int v5; // ebx@1

  v3 = this;
  ShortCutWin::OnToggleKey(this->m_pkShortCutWin, *(_WORD *)pvData);
  ShortCutWin::OnToggleKey(v3->m_pkShortCutWinV, *(_WORD *)pvData);
  v4 = v3->m_pkShortCutSubWinV;
  v5 = 4;
  do
  {
    ShortCutWin::OnToggleKey(*(v4 - 5), *(_WORD *)pvData);
    ShortCutWin::OnToggleKey(*v4, *(_WORD *)pvData);
    ++v4;
    --v5;
  }
  while ( v5 );
  return iRevBytes;
}

//----- (004A0820) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_CHANGEBYCONDITION_PARAM_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  char *v4; // ebx@1
  unsigned __int16 v5; // ax@1
  int v6; // esi@3
  _BYTE v7[6]; // ST00_6@4
  int i; // [sp+18h] [bp+Ch]@2

  v3 = this;
  CharInfoWin::EnableChangeCondition(this->m_pkCharInfoWin, 1);
  v4 = (char *)pvData;
  CharInfoWin::EnablePassiveSkillID(v3->m_pkCharInfoWin, *(_WORD *)pvData);
  CharInfoWin::SetConditionDataNum(v3->m_pkCharInfoWin, *((_WORD *)pvData + 2));
  CharInfoWin::SetSectionRate(v3->m_pkCharInfoWin, *((_WORD *)pvData + 1));
  v5 = *((_WORD *)pvData + 2);
  if ( v5 )
  {
    i = 0;
    if ( v5 > 0u )
    {
      v6 = (int)(v4 + 6);
      do
      {
        *(_DWORD *)v7 = *(_DWORD *)v6;
        *(_WORD *)&v7[4] = *(_WORD *)(v6 + 4);
        CharInfoWin::SetConditionInfo(v3->m_pkCharInfoWin, *(CHAR_CHANGEBYCONDITION_PARAM *)v7);
        v6 += 6;
        ++i;
      }
      while ( i < *((_WORD *)v4 + 2) );
    }
  }
  return iRevBytes;
}

//----- (004A08C0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_SKILL_JUMP_CMD(int iRevBytes, void *pvData)
{
  Char *v3; // edi@1
  int v4; // edx@2
  double v5; // st7@2
  int v6; // eax@4
  double v7; // st7@4
  int v8; // ecx@6
  double v9; // st7@6
  void (__thiscall *v10)(AbStateInfectee *, AbStateInst *, bool); // edx@8
  NiPoint3 nfrom; // [sp+8h] [bp-24h]@2
  NiPoint3 nTo; // [sp+14h] [bp-18h]@6
  float v14; // [sp+20h] [bp-Ch]@8
  float v15; // [sp+24h] [bp-8h]@8
  float v16; // [sp+28h] [bp-4h]@8

  v3 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  if ( v3 )
  {
    v4 = *(_DWORD *)((char *)pvData + 6);
    nfrom.x = (double)*(unsigned int *)((char *)pvData + 2);
    v5 = (double)*(signed int *)((char *)pvData + 6);
    if ( v4 < 0 )
      v5 = v5 + 4294967300.0;
    v6 = *(_DWORD *)((char *)pvData + 10);
    nfrom.y = v5;
    v7 = (double)*(signed int *)((char *)pvData + 10);
    if ( v6 < 0 )
      v7 = v7 + 4294967300.0;
    v8 = *(_DWORD *)((char *)pvData + 14);
    nTo.x = v7;
    v9 = (double)*(signed int *)((char *)pvData + 14);
    if ( v8 < 0 )
      v9 = v9 + 4294967300.0;
    nTo.y = v9;
    v14 = nTo.x - nfrom.x;
    nfrom.x = v14;
    v10 = v3->vfptr[6].Affect;
    v15 = nTo.y - nfrom.y;
    nfrom.y = v15;
    v16 = 0.0;
    nfrom.z = 0.0;
    ((void (__thiscall *)(Char *, NiPoint3 *))v10)(v3, &nfrom);
    ((void (__thiscall *)(Char *, _DWORD, _DWORD, _DWORD))v3->vfptr[9].~AbStateInfectee)(
      v3,
      *(_DWORD *)((char *)pvData + 10),
      *(_DWORD *)((char *)pvData + 14),
      *(_WORD *)((char *)pvData + 19));
  }
  return iRevBytes;
}

//----- (004A0990) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_EVENT_ATTENDANCE_LIST_CLIENT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  AttendIconWin *v4; // eax@1

  v3 = this;
  AttendCheckWin::SetEvtState(
    this->m_pkAttendCheckWin,
    (tm *)pvData,
    *((_BYTE *)pvData + 36),
    (const char *)pvData + 37,
    (const char *)pvData + 66,
    *((_BYTE *)pvData + 65));
  v4 = v3->m_pkAttendIconWin;
  v4->m_uFlags &= 0xFFFEu;
  v4->m_bEvtState = 1;
  return iRevBytes;
}

//----- (004A09E0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_EVENT_ATTENDANCE_CHANGE_DAY_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  AttendCheckWin::ChangeDay(this->m_pkAttendCheckWin, *(_BYTE *)pvData);
  return iRevBytes;
}

//----- (004A0A00) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHER_EVENT_ATTENDANCE_CHANGE_START_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  AttendIconWin *v4; // eax@1

  v3 = this;
  AttendCheckWin::InitEvtState(this->m_pkAttendCheckWin);
  AttendCheckWin::SetEvtState(v3->m_pkAttendCheckWin, (tm *)pvData, 0, 0, 0, 0);
  v4 = v3->m_pkAttendIconWin;
  v4->m_uFlags &= 0xFFFEu;
  v4->m_bEvtState = 1;
  AttendIconWin::SetActive(v3->m_pkAttendIconWin, 0);
  return iRevBytes;
}

//----- (004A0A60) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SCENARIO_TIMER_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  IDTimeWin *v3; // ecx@1

  v3 = this->m_pkIDTimeWin;
  if ( v3 )
    IDTimeWin::ResetTime(v3, *(_WORD *)pvData);
  return iRevBytes;
}

//----- (004A0A80) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ACT_ANIMATION_START_CMD(int iRevBytes, void *pvData)
{
  Char *v3; // eax@1

  v3 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  if ( v3 )
    Char::ActAction(v3, (char *)pvData + 2, 0);
  return iRevBytes;
}

//----- (004A0AB0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ACT_ANIMATION_STOP_CMD(int iRevBytes, void *pvData)
{
  Char *v3; // eax@1
  Char *v4; // edi@1
  ActionInfo *v5; // eax@2

  v3 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  v4 = v3;
  if ( v3 )
  {
    v5 = Char::GetCurPlayActInfo(v3);
    if ( v5 )
    {
      if ( !strcmp(v5->InxName, (const char *)pvData + 2) )
        ((void (__thiscall *)(Char *))v4->vfptr[10].DeleteAbStateByAbstateIndex)(v4);
    }
  }
  return iRevBytes;
}

//----- (004A0B20) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SCENARIO_MAPMARK_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  MiniMapWin *v3; // ecx@1

  v3 = this->m_pkMiniMapWin;
  if ( v3 )
    MiniMapWin::AddMapMark(v3, (PROTO_NC_SCENARIO_MAPMARK_CMD *)pvData);
  return iRevBytes;
}

//----- (004A0B40) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_BRIEFINFO_REGENMOVER_CMD(int iRevBytes, void *pvData)
{
  CharMgr::AddMover(&g_kCharMgr, (PROTO_NC_BRIEFINFO_REGENMOVER_CMD *)pvData);
  return iRevBytes;
}

//----- (004A0B60) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_BRIEFINFO_MOVER_CMD(int iRevBytes, void *pvData)
{
  CharMgr::AddMover(&g_kCharMgr, (PROTO_NC_BRIEFINFO_MOVER_CMD *)pvData);
  return iRevBytes;
}

//----- (004A0B80) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MOVER_RIDE_ON_FAIL_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData != 12392 )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (004A0BB0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MOVER_RIDE_OFF_FAIL_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData != 12416 )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (004A0BE0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MOVER_FEEDING_ERROR_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData != 12432 )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (004A0C10) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_MOVER_MOVESPEED_CMD(int iRevBytes, void *pvData)
{
  Char *v3; // esi@1
  float v4; // ST04_4@2
  float v5; // ST04_4@2

  v3 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  if ( v3 )
  {
    v4 = (double)*((_WORD *)pvData + 1);
    ((void (__thiscall *)(Char *, _DWORD))v3->vfptr[8].Deaffect)(v3, LODWORD(v4));
    v5 = (double)*((_WORD *)pvData + 2);
    ((void (__thiscall *)(Char *, _DWORD))v3->vfptr[8].SetAbStateProperty)(v3, LODWORD(v5));
  }
  return iRevBytes;
}

//----- (004A0C70) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_BRIEFINFO_REGENPET_CMD(int iRevBytes, void *pvData)
{
  CharMgr::AddPet(&g_kCharMgr, (PROTO_NC_BRIEFINFO_REGENPET_CMD *)pvData);
  return iRevBytes;
}

//----- (004A0C90) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_BRIEFINFO_PET_CMD(int iRevBytes, void *pvData)
{
  CharMgr::AddPet(&g_kCharMgr, (PROTO_NC_BRIEFINFO_PET_CMD *)pvData);
  return iRevBytes;
}

//----- (004A0CB0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_PET_USE_ITEM_FAIL_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@3

  v3 = this;
  if ( *(_WORD *)pvData != 13376 && *(_WORD *)pvData != 13440 )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (004A0CF0) --------------------------------------------------------
void __stdcall GameFrameWork::NcPetAskNewNameAck(int kError, unsigned __int16 kPetHandle)
{
  HIWORD(kError) = kPetHandle;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x35u, 6u, &kError, 4);
}

//----- (004A0D20) --------------------------------------------------------
void __stdcall GameFrameWork::NcPetSetNameCancelReq(unsigned __int16 kPetHandle)
{
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x35u, 9u, &kPetHandle, 2);
}

//----- (004A0D50) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SCENARIO_RANKING_LIST_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // eax@1
  bool v4; // zf@1
  void *v5; // ebx@2
  EventRankWin *v6; // ecx@4
  char *v7; // ebx@6
  EventRankWin *v8; // ecx@8
  SCENARIO_RANKING_INFO v10; // [sp-1Ch] [bp-30h]@4
  char v11; // [sp-4h] [bp-18h]@4
  int v12; // [sp+Ch] [bp-8h]@2
  GameFrameWork *v13; // [sp+10h] [bp-4h]@1
  char *pvDataa; // [sp+20h] [bp+Ch]@6

  v3 = this;
  v4 = this->m_pkEventRankWin == 0;
  v13 = this;
  if ( !v4 )
  {
    v5 = pvData;
    v12 = 20;
    do
    {
      if ( *(_BYTE *)v5 )
      {
        qmemcpy(&v10, v5, 0x18u);
        v6 = v3->m_pkEventRankWin;
        v11 = *((_BYTE *)v5 + 24);
        EventRankWin::AddPrevRank(v6, v10);
        v3 = v13;
      }
      v5 = (char *)v5 + 25;
      --v12;
    }
    while ( v12 );
    v7 = (char *)pvData + 500;
    pvDataa = (char *)20;
    do
    {
      if ( *v7 )
      {
        qmemcpy(&v10, v7, 0x18u);
        v8 = v13->m_pkEventRankWin;
        v11 = v7[24];
        EventRankWin::AddCurRank(v8, v10);
      }
      v7 += 25;
      --pvDataa;
    }
    while ( pvDataa );
    *(_DWORD *)&v11 = v13->m_pkEventRankWin;
    PgWinMgr::ShowWin(&Pgg_kWinMgr, *(PgWin **)&v11);
  }
  return iRevBytes;
}

//----- (004A0E00) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SCENARIO_TIMER_END_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  EventTimeWin *v3; // ecx@1
  float fDeleteTime; // ST00_4@2

  v3 = this->m_pkEventTimeWin;
  if ( v3 )
  {
    fDeleteTime = (double)*(unsigned int *)pvData;
    EventTimeWin::Stop(v3, fDeleteTime);
  }
  return iRevBytes;
}

//----- (004A0E30) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ACT_OBJECT_SOUND_CMD(int iRevBytes, void *pvData)
{
  Char *v3; // eax@1
  NiPoint3 *v4; // eax@2

  v3 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  if ( v3 )
  {
    v4 = (NiPoint3 *)((int (__thiscall *)(Char *))v3->vfptr[6].Deaffect)(v3);
    SoundMgr::CreateSound(&g_kSoundMgr, (char *)pvData + 2, v4);
  }
  return iRevBytes;
}

//----- (004A0E70) --------------------------------------------------------
void GameFrameWork::NcMiscItemShopUrlReq()
{
  NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 2u, 0x6Eu, 0, 0);
}

//----- (004A0E90) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_KQ_JOIN_LIST_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  KingdomQuestPlayerList *v4; // ecx@1
  KingdomQuestWin *v6; // eax@4
  _BYTE *v7; // esi@5
  unsigned int v8; // ebx@8
  KingdomQuestPlayerList *v9; // ecx@11
  KingdomQuestTeamList *v10; // ecx@17
  KQ_JOIN_CHAR_INFO *pvDataa; // [sp+10h] [bp+Ch]@10
  KQ_JOIN_CHAR_INFO *pvDatab; // [sp+10h] [bp+Ch]@16

  v3 = this;
  v4 = this->m_pkKQPlayerList;
  if ( !v4 )
    return 0;
  if ( !v3->m_pkKQTeamList )
    return 0;
  v6 = v3->m_pkKingDomQuest;
  if ( !v6 )
    return 0;
  v7 = pvData;
  if ( *(_WORD *)pvData != 12568 )
  {
    if ( *(_WORD *)pvData == 12569 )
    {
      KingdomQuestPlayerList::ReSetList(v4);
      return iRevBytes;
    }
    return iRevBytes;
  }
  KingdomQuestWin::SetTimer(v6, 0);
  KingdomQuestPlayerList::SetTimer(v3->m_pkKQPlayerList, 0);
  KingdomQuestTeamList::SetTimer(v3->m_pkKQTeamList, 0);
  KingdomQuestPlayerList::ReSetList(v3->m_pkKQPlayerList);
  KingdomQuestTeamList::ReSetList(v3->m_pkKQTeamList);
  v8 = 0;
  if ( *((_BYTE *)pvData + 25) != 2 )
  {
    if ( *((_BYTE *)pvData + 2) > 0u )
    {
      pvDatab = (KQ_JOIN_CHAR_INFO *)((char *)pvData + 3);
      do
      {
        v10 = v3->m_pkKQTeamList;
        if ( v10 )
          KingdomQuestTeamList::AddElement(v10, pvDatab);
        ++pvDatab;
        ++v8;
      }
      while ( v8 < v7[2] );
    }
    KingdomQuestTeamList::UpdateList(v3->m_pkKQTeamList);
    return iRevBytes;
  }
  if ( *((_BYTE *)pvData + 2) > 0u )
  {
    pvDataa = (KQ_JOIN_CHAR_INFO *)((char *)pvData + 3);
    do
    {
      v9 = v3->m_pkKQPlayerList;
      if ( v9 )
        KingdomQuestPlayerList::AddElement(v9, pvDataa);
      ++pvDataa;
      ++v8;
    }
    while ( v8 < v7[2] );
  }
  KingdomQuestPlayerList::UpdateList(v3->m_pkKQPlayerList);
  return iRevBytes;
}

//----- (004A0FB0) --------------------------------------------------------
void __thiscall GameFrameWork::SetJoinHandle(GameFrameWork *this, unsigned int kHandle)
{
  KingdomQuestPlayerList *v2; // eax@1
  KingdomQuestTeamList *v3; // eax@2

  v2 = this->m_pkKQPlayerList;
  if ( v2 )
  {
    v2->m_kQuestHandle = kHandle;
    v3 = this->m_pkKQTeamList;
    if ( v3 )
      v3->m_kQuestHandle = kHandle;
  }
}

//----- (004A0FE0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MAP_FIELD_ATTRIBUTE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int result; // eax@1

  result = iRevBytes;
  this->m_eFieldMapType = *(_DWORD *)pvData;
  return result;
}

//----- (004A1000) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SCENARIO_DIALOG_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  char acTemp[2048]; // [sp+8h] [bp-804h]@1

  v3 = this;
  memset(acTemp, 0, 0x800u);
  memcpy(acTemp, (char *)pvData + 34, *((_BYTE *)pvData + 33));
  NpcDialogWin::OpenNpcScriptDialog(v3->m_pkNpcDlgWin, (char *)pvData, acTemp, 1);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkNpcDlgWin->vfptr);
  return iRevBytes;
}

//----- (004A1080) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_MOVER_UPGRADE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  MoverUpgradeWin *v4; // ecx@1
  int v5; // eax@2
  const char *v6; // eax@3

  v3 = this;
  v4 = this->m_pkMoverUpgradeWin;
  if ( v4 )
  {
    v5 = *(_WORD *)pvData;
    if ( (_WORD)v5 != 12840 )
    {
      v6 = ErrMsgTable::GetErrMsg(v5);
      GameFrameWork::AddSysMsg(v3, v6);
      return iRevBytes;
    }
    MoverUpgradeWin::ResetSubSlot(v4);
    MoverUpgradeWin::ShowUpgradeResult(
      v3->m_pkMoverUpgradeWin,
      (unsigned int)v3,
      *((_BYTE *)pvData + 4),
      *((_BYTE *)pvData + 2) != 0,
      *((_BYTE *)pvData + 3) != 0);
  }
  return iRevBytes;
}

//----- (004A10F0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_INSTANCE_DUNGEON_LEVEL_SELECT_MENU_REQ(GameFrameWork *this, int iRevBytes, void *pvData)
{
  unsigned __int8 v3; // dl@1
  GameFrameWork *v4; // esi@1
  IndunLevelMsgWin *v5; // ecx@2
  _BYTE v6[12]; // ST08_12@3
  IndunLevelSelectWin *v8; // ecx@4
  _BYTE v9[12]; // ST04_12@5

  v3 = *((_BYTE *)pvData + 14);
  v4 = this;
  if ( v3 == 1 )
  {
    v5 = this->m_pkIndunLevelMsgWin;
    if ( v5 )
    {
      *(_QWORD *)v6 = *(_QWORD *)((char *)pvData + 2);
      *(_DWORD *)&v6[8] = *(_DWORD *)((char *)pvData + 10);
      IndunLevelMsgWin::SetInfo(v5, *(_WORD *)pvData, *(Name3 *)v6, *(ID_LEVEL_TYPE *)((char *)pvData + 15));
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkIndunLevelMsgWin->vfptr);
      return iRevBytes;
    }
  }
  else
  {
    v8 = this->m_pkIndunLevelSelectWin;
    if ( v8 )
    {
      *(_QWORD *)v9 = *(_QWORD *)((char *)pvData + 2);
      *(_DWORD *)&v9[8] = *(_DWORD *)((char *)pvData + 10);
      IndunLevelSelectWin::SetInfo(v8, *(_WORD *)pvData, *(Name3 *)v9, v3, (ID_LEVEL_TYPE *)((char *)pvData + 15));
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkIndunLevelSelectWin->vfptr);
    }
  }
  return iRevBytes;
}

//----- (004A11A0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_LPCHANGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  StatusWin *v4; // ecx@1

  v3 = this;
  User::SetLP(&g_kUser, *(_DWORD *)pvData);
  ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[4].~AbStateInfectee)(*(_DWORD *)pvData);
  v4 = v3->m_pkStatusWin;
  if ( v4 )
    StatusWin::UpdateBars(v4);
  return iRevBytes;
}

//----- (004A11F0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ACT_EFFECT_MESSAGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  EffectMsg *v3; // ecx@1

  v3 = this->m_pkEffectMsg;
  if ( v3 )
    EffectMsg::Play(v3, *(EFFECT_MESSAGE_TYPE *)pvData);
  return iRevBytes;
}

//----- (004A1210) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_KQ_SCORE_INFO_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  unsigned int v4; // esi@2

  v3 = this;
  if ( this->m_pkKQScoreWin )
  {
    GameFrameWork::OpenKQScoreWin(this, 1);
    v4 = 0;
    do
    {
      KQScoreWin::SetScore(v3->m_pkKQScoreWin, v4, *((_DWORD *)pvData + v4));
      ++v4;
    }
    while ( v4 < 2 );
  }
  return iRevBytes;
}

//----- (004A1250) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SCENARIO_EFFECT_TIMER_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  PuzzleTimeWin *v4; // ecx@1

  v3 = this;
  v4 = this->m_pkPuzzleTimeWin;
  if ( v4 )
  {
    if ( *(_BYTE *)pvData )
    {
      if ( *(_BYTE *)pvData == 1 )
        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v4->vfptr);
    }
    else
    {
      PuzzleTimeWin::ResetTime(v4, *(_WORD *)((char *)pvData + 1));
      if ( v3->m_bPlayPuzzle )
      {
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkPuzzleTimeWin->vfptr);
        return iRevBytes;
      }
    }
  }
  return iRevBytes;
}

//----- (004A12B0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_KQ_TEAM_SELECT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  KingdomQuestTeamList *v3; // esi@1

  v3 = this->m_pkKingDomQuest->m_pkKingdomQuestTeamList;
  if ( v3 )
  {
    KingdomQuestTeamList::SetElement(v3, (PROTO_NC_KQ_TEAM_SELECT_CMD *)pvData);
    KingdomQuestTeamList::UpdateList(v3);
  }
  return iRevBytes;
}

//----- (004A12E0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_SCENARIO_DEL_DIRECTIONAL_ARROW_CMD(int iRevBytes, void *pvData)
{
  EffectMgr::RemoveClientEff(&g_kEffectMgr, 1u);
  return iRevBytes;
}

//----- (004A1300) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MAP_CAN_USE_REVIVEITEM_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  ReviveMenuWin *v3; // ecx@1

  v3 = this->m_pkReviveMenuWin;
  if ( v3 )
    ReviveMenuWin::SetCanReviveItem(v3, *(_BYTE *)pvData);
  return iRevBytes;
}

//----- (004A1320) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MAP_INDUN_LEVEL_VIEW_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  MiniMapWin::ViewInDunLevelFlag(this->m_pkMiniMapWin, *(ID_LEVEL_TYPE *)pvData);
  return iRevBytes;
}

//----- (004A1340) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MENU_RANDOMOPTION_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  if ( this->m_pkRandomOptionWin )
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkRandomOptionWin->vfptr);
  return iRevBytes;
}

//----- (004A1360) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_RANDOMOPTION_CHANGE_ACCEPT_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  if ( *(_WORD *)pvData == 12872 )
    RandomOptionWin::SetChangeOption(this->m_pkRandomOptionWin);
  return iRevBytes;
}

//----- (004A1390) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_CHAT_COLOR_CHANGE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // eax@1
  GameFrameWork *v4; // esi@1
  const char *v5; // eax@3
  ChatColorSpinWin *v7; // ecx@4

  v3 = *(_WORD *)pvData;
  v4 = this;
  if ( v3 == 13824 )
  {
    v7 = this->m_pkChatColorSpinWin;
    if ( v7 )
      ChatColorSpinWin::SetChatColorID(v7, *((_BYTE *)pvData + 2));
  }
  else if ( (unsigned int)(v3 - 13825) <= 6 )
  {
    v5 = fs("Error ChatColorSystem[ %d ]", *(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v4, v5);
    return iRevBytes;
  }
  return iRevBytes;
}

//----- (004A13F0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_TERMEXTEND_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  TermExtendWin *v4; // ecx@1
  int v5; // eax@2
  const char *v6; // eax@3

  v3 = this;
  v4 = this->m_pkTermExtendWin;
  if ( v4 )
  {
    v5 = *(_WORD *)pvData;
    if ( (_WORD)v5 != 13848 )
    {
      v6 = ErrMsgTable::GetErrMsg(v5);
      GameFrameWork::AddSysMsg(v3, v6);
      return iRevBytes;
    }
    TermExtendWin::ShowUpgradeResult(v4);
  }
  return iRevBytes;
}

//----- (004A1440) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_USEITEM_MINIMON_INFO_CLIENT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  MinimonAutoItemUseWin *v3; // ecx@1
  USEITEM_MINIMON_INFO UseItemInfo; // [sp+8h] [bp-38h]@1

  qmemcpy(&UseItemInfo, pvData, 0x30u);
  v3 = this->m_pkMinimonAutoItemUseWin;
  UseItemInfo.ChargedItemList[11] = *((_WORD *)pvData + 24);
  MinimonAutoItemUseWin::SetAutoUseItemInfo(v3, &UseItemInfo);
  return iRevBytes;
}

//----- (004A1490) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_USEITEM_MINIMON_NORMAL_ITEM_OFF_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  MinimonAutoItemUseWin::SetAutoUseBuffItem(this->m_pkMinimonAutoItemUseWin, 0);
  return iRevBytes;
}

//----- (004A14B0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_USEITEM_MINIMON_CHARGED_ITEM_OFF_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  MinimonAutoItemUseWin::SetAutoUseChargedItem(this->m_pkMinimonAutoItemUseWin, 0);
  return iRevBytes;
}

//----- (004A14D0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_USEITEM_MINIMON_USE_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  Char *v3; // eax@1

  v3 = GameFrameWork::GetCharByHandle(this, *(_WORD *)pvData, 4, 190);
  if ( v3 )
    Char::SetItemAutoUseState(v3, (int)pvData, *((_BYTE *)pvData + 2) != 0);
  return iRevBytes;
}

//----- (004A1510) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_USEITEM_MINIMON_NOTICE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  if ( *(_WORD *)pvData == 13896 )
    MinimonAutoItemUseWin::AutoUseItemExhausted(this->m_pkMinimonAutoItemUseWin, *((_WORD *)pvData + 1));
  return iRevBytes;
}

//----- (004A1540) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_SELL_ITEM_INSERT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  int result; // eax@3

  v3 = this;
  if ( this->m_pkItemShopWin && (unsigned __int8)((int (*)(void))this->m_pkItemShopWin->vfptr[65].__vecDelDtor)() == 1 )
  {
    ItemShopWin::AddRepurchaseInv(v3->m_pkItemShopWin, (PROTO_NC_ITEM_SELL_ITEM_INSERT_CMD *)pvData);
    result = iRevBytes;
  }
  else
  {
    if ( v3->m_pkItemShopWin2 )
    {
      if ( (unsigned __int8)((int (*)(void))v3->m_pkItemShopWin2->vfptr[65].__vecDelDtor)() == 1 )
        NPCItemWin::AddRepurchaseInv(v3->m_pkItemShopWin2, (PROTO_NC_ITEM_SELL_ITEM_INSERT_CMD *)pvData);
    }
    result = iRevBytes;
  }
  return result;
}

//----- (004A15B0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_SELL_ITEM_DELETE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  int result; // eax@3

  v3 = this;
  if ( this->m_pkItemShopWin && (unsigned __int8)((int (*)(void))this->m_pkItemShopWin->vfptr[65].__vecDelDtor)() == 1 )
  {
    ItemShopWin::DeleteRepurchaseInv(v3->m_pkItemShopWin, *(_WORD *)pvData);
    result = iRevBytes;
  }
  else
  {
    if ( v3->m_pkItemShopWin2 )
    {
      if ( (unsigned __int8)((int (*)(void))v3->m_pkItemShopWin2->vfptr[65].__vecDelDtor)() == 1 )
        NPCItemWin::DeleteRepurchaseInv(v3->m_pkItemShopWin2, *(_WORD *)pvData);
    }
    result = iRevBytes;
  }
  return result;
}

//----- (004A1630) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_OPENCLASSCHANGEMENU_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  ClassChangeWin *v4; // ecx@1

  v3 = this;
  v4 = this->m_pkClassChangeWin;
  if ( v4 )
  {
    ClassChangeWin::SetChangeClassID(v4, *(_BYTE *)pvData);
    ClassChangeWin::SetMoney(v3->m_pkClassChangeWin, *(_QWORD *)((char *)pvData + 1));
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkClassChangeWin->vfptr);
  }
  return iRevBytes;
}

//----- (004A1680) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MENU_SERVERMENU_CLOSE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkServerMenuWin->vfptr);
  return iRevBytes;
}

//----- (004A16A0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_MAPLINK_SCROLL_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  WorldMapWin *v3; // esi@1
  unsigned __int16 v4; // ax@2

  v3 = MiniMapWin::GetWorldMap(this->m_pkMiniMapWin);
  if ( v3 )
  {
    v4 = *(_WORD *)pvData;
    if ( *(_WORD *)pvData == 14152 )
    {
      if ( (unsigned __int8)((int (__thiscall *)(WorldMapWin *))v3->vfptr[65].__vecDelDtor)(v3) )
      {
        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
        return iRevBytes;
      }
    }
    else if ( v4 )
    {
      WorldMapWin::WorldMapLinkFail(v3, v4, *((_BYTE *)pvData + 2));
    }
  }
  return iRevBytes;
}

//----- (004A1710) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_MIX_ITEM_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@3
  bool bSuccess; // [sp+4h] [bp-4h]@1

  v3 = this;
  bSuccess = 1;
  if ( this->m_pkItemMixWin )
  {
    if ( *(_WORD *)pvData != 14272 )
    {
      v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
      GameFrameWork::AddSysMsg(v3, v4);
      bSuccess = 0;
    }
    ItemMixWin::ShowMixResult(v3->m_pkItemMixWin, bSuccess);
  }
  return iRevBytes;
}

//----- (004A1770) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_NEW_UPGRADE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  ItemUpgradeWin *v3; // ecx@1

  v3 = this->m_pkItemUpgradeWin;
  if ( v3 )
    ItemUpgradeWin::UpGradeResult(v3, *(_WORD *)pvData);
  return iRevBytes;
}

//----- (004A1790) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_BRACELET_UPGRADE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  ItemUpgradeWin *v3; // ecx@1

  v3 = this->m_pkItemUpgradeWin;
  if ( v3 )
    ItemUpgradeWin::UpGradeResult(v3, *(_WORD *)pvData);
  return iRevBytes;
}

//----- (004A17B0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MENU_INDUNRANK_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork::IDRankingShowWin(this, 1);
  return iRevBytes;
}

//----- (004A17D0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_INSTANCE_DUNGEON_RANK_RESULT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  PartyScoreWin *v4; // ecx@1

  v3 = this;
  v4 = this->m_pkPartyScoreWin;
  if ( v4 )
    PartyScoreWin::SetPartyScore(
      v4,
      (SHINE_INDUN_RANK_CLIENT *)((char *)pvData + 5),
      (const unsigned __int16 *)((char *)pvData + 3),
      (const char *)pvData,
      (const char *)pvData + 1,
      (const char *)pvData + 2);
  GameFrameWork::PartyScoreShowWin(v3, 1);
  return iRevBytes;
}

//----- (004A1810) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_INSTANCE_DUNGEON_RANK_LIST_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  IDRankingWin *v3; // ecx@1

  v3 = this->m_pkIDRankingWin;
  if ( v3 )
    IDRankingWin::SetIDList(v3, (const unsigned __int16 *)pvData, (SHINE_INDUN_INFO *)((char *)pvData + 2));
  return iRevBytes;
}

//----- (004A1840) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_CHAR_ANI_FILE_CHECK_CMD(int iRevBytes, void *pvData)
{
  Name8 v4; // [sp-40h] [bp-84h]@1
  Name8 v5; // [sp-20h] [bp-64h]@1
  Name60Byte v6; // [sp+0h] [bp-44h]@1

  qmemcpy(&v6, (char *)pvData + 64, sizeof(v6));
  qmemcpy(&v5, (char *)pvData + 32, sizeof(v5));
  qmemcpy(&v4, pvData, sizeof(v4));
  AnimationMD5Checksum::CheckAniFileMD5(v4, v5, v6);
  return iRevBytes;
}

//----- (004A1890) --------------------------------------------------------
void __thiscall GameFrameWork::AddNetMsgToWorldMgr(GameFrameWork *this, unsigned __int16 department, unsigned __int16 command)
{
  Net *v3; // ecx@1

  v3 = this->m_spWorldMgrNet.m_pObject;
  command = (department << 10) | command & 0x3FF;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &command, 2);
}

//----- (004A18C0) --------------------------------------------------------
void __thiscall GameFrameWork::SendNetMsgWorldMgr(GameFrameWork *this, void *pProto, int nDataLength)
{
  PgNet::SendNetMsg((PgNet *)&this->m_spWorldMgrNet.m_pObject->vfptr, pProto, nDataLength);
}

//----- (004A18D0) --------------------------------------------------------
void __thiscall GameFrameWork::SendNetMsgWorldMgr(GameFrameWork *this, unsigned __int16 department, unsigned __int16 command, void *pProto, int nDataLength)
{
  GameFrameWork *v5; // esi@1
  Net *v6; // ecx@1

  v5 = this;
  v6 = this->m_spWorldMgrNet.m_pObject;
  command = (department << 10) | command & 0x3FF;
  PgNet::AddNetMsg((PgNet *)&v6->vfptr, &command, 2);
  PgNet::SendNetMsg((PgNet *)&v5->m_spWorldMgrNet.m_pObject->vfptr, pProto, nDataLength);
}

//----- (004A1920) --------------------------------------------------------
void __thiscall GameFrameWork::AddNetMsgToZoneMgr(GameFrameWork *this, unsigned __int16 department, unsigned __int16 command)
{
  Net *v3; // ecx@1

  v3 = this->m_spZoneNet.m_pObject;
  command = (department << 10) | command & 0x3FF;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &command, 2);
}

//----- (004A1950) --------------------------------------------------------
void __thiscall GameFrameWork::SendNetMsgZoneMgr(GameFrameWork *this, void *pProto, int nDataLength)
{
  PgNet::SendNetMsg((PgNet *)&this->m_spZoneNet.m_pObject->vfptr, pProto, nDataLength);
}

//----- (004A1960) --------------------------------------------------------
void __thiscall GameFrameWork::SendNetMsgZoneMgr(GameFrameWork *this, unsigned __int16 department, unsigned __int16 command, void *pProto, int nDataLength)
{
  GameFrameWork *v5; // esi@1
  Net *v6; // ecx@1

  v5 = this;
  v6 = this->m_spZoneNet.m_pObject;
  command = (department << 10) | command & 0x3FF;
  PgNet::AddNetMsg((PgNet *)&v6->vfptr, &command, 2);
  PgNet::SendNetMsg((PgNet *)&v5->m_spZoneNet.m_pObject->vfptr, pProto, nDataLength);
}

//----- (004A19B0) --------------------------------------------------------
void __thiscall GameFrameWork::Send_NC_MISC_PINGTEST_CLIENT_ZONE_DB(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  PgNet *v2; // ecx@1
  __int16 pdata; // [sp+4h] [bp-84h]@1
  PROTO_NC_MISC_PINGTEST_CLIENT_ZONE_DB kProto; // [sp+8h] [bp-80h]@1

  v1 = this;
  kProto.ClientSendZone = timeGetTime();
  v2 = (PgNet *)&v1->m_spZoneNet.m_pObject->vfptr;
  pdata = 2066;
  PgNet::AddNetMsg(v2, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v1->m_spZoneNet.m_pObject->vfptr, &kProto, 124);
}

//----- (004A1A10) --------------------------------------------------------
void __thiscall GameFrameWork::NcCharReviveCmd(GameFrameWork *this)
{
  Net *v1; // ecx@1
  GameFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  v1 = this->m_spZoneNet.m_pObject;
  LOWORD(netcmd) = 4174;
  PgNet::SendNetMsg((PgNet *)&v1->vfptr, &netcmd, 2);
}

//----- (004A1A40) --------------------------------------------------------
void __thiscall GameFrameWork::NcActWalkReq(GameFrameWork *this, NiPoint3 *kFrom, NiPoint3 *kTo)
{
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@1
  PgNet *v5; // ecx@1
  NETCOMMAND netcmd; // [sp+Ch] [bp-24h]@1
  __int64 v7; // [sp+10h] [bp-20h]@1
  PROTO_NC_ACT_WALK_REQ kProto; // [sp+1Ch] [bp-14h]@1

  v3 = this;
  v4 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 8215;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
  v7 = (signed __int64)kFrom->x;
  kProto.from.x = v7;
  v7 = (signed __int64)kFrom->y;
  kProto.from.y = v7;
  v7 = (signed __int64)kTo->x;
  kProto.to.x = v7;
  v5 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
  v7 = (signed __int64)kTo->y;
  kProto.to.y = v7;
  PgNet::SendNetMsg(v5, &kProto, 16);
}

//----- (004A1B20) --------------------------------------------------------
void __thiscall GameFrameWork::NcActRunReq(GameFrameWork *this, NiPoint3 *kFrom, NiPoint3 *kTo)
{
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@2
  PgNet *v5; // ecx@2
  NETCOMMAND netcmd; // [sp+Ch] [bp-24h]@2
  __int64 v7; // [sp+10h] [bp-20h]@2
  PROTO_NC_ACT_WALK_REQ kProto; // [sp+1Ch] [bp-14h]@2

  v3 = this;
  if ( this->m_bMoveRunCtrl )
  {
    v4 = this->m_spZoneNet.m_pObject;
    netcmd.protocol = 8217;
    PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
    v7 = (signed __int64)kFrom->x;
    kProto.from.x = v7;
    v7 = (signed __int64)kFrom->y;
    kProto.from.y = v7;
    v7 = (signed __int64)kTo->x;
    kProto.to.x = v7;
    v5 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
    v7 = (signed __int64)kTo->y;
    kProto.to.y = v7;
    PgNet::SendNetMsg(v5, &kProto, 16);
  }
}

//----- (004A1C10) --------------------------------------------------------
void __thiscall GameFrameWork::NcActChangeModeReq(GameFrameWork *this, char byMode)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  PROTO_NC_ACT_CHANGEMODE_REQ kProto; // [sp+Bh] [bp-1h]@1

  v2 = this;
  v3 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 8200;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
  kProto.mode = byMode;
  PgNet::SendNetMsg(v4, &kProto, 1);
}

//----- (004A1C60) --------------------------------------------------------
void __thiscall GameFrameWork::NcActNPCClickCmd(GameFrameWork *this, unsigned __int16 kHandle)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@1
  PROTO_NC_ACT_NPCCLICK_CMD kProto; // [sp+4h] [bp-8h]@1
  NETCOMMAND netcmd; // [sp+8h] [bp-4h]@1

  v2 = this;
  v3 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 8202;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
  kProto.npchandle = kHandle;
  PgNet::SendNetMsg(v4, &kProto, 2);
}

//----- (004A1CB0) --------------------------------------------------------
void __thiscall GameFrameWork::NcActEndOfTrade(GameFrameWork *this)
{
  Net *v1; // ecx@1
  GameFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  v1 = this->m_spZoneNet.m_pObject;
  LOWORD(netcmd) = 8203;
  PgNet::SendNetMsg((PgNet *)&v1->vfptr, &netcmd, 2);
}

//----- (004A1CE0) --------------------------------------------------------
void __thiscall GameFrameWork::NcActStopReq(GameFrameWork *this, NiPoint3 *kPos)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@1
  PROTO_NC_ACT_STOP_REQ kProto; // [sp+4h] [bp-14h]@1
  __int64 v6; // [sp+Ch] [bp-Ch]@1
  NETCOMMAND netcmd; // [sp+14h] [bp-4h]@1

  v2 = this;
  v3 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 8210;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v6 = (signed __int64)kPos->x;
  kProto.loc.x = v6;
  v4 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
  v6 = (signed __int64)kPos->y;
  kProto.loc.y = v6;
  PgNet::SendNetMsg(v4, &kProto, 8);
}

//----- (004A1D60) --------------------------------------------------------
void __thiscall GameFrameWork::NcActNoticeCmd(GameFrameWork *this, char *pcText)
{
  char *v2; // edi@1
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@3
  NETCOMMAND netcmd; // [sp+8h] [bp-4h]@3

  v2 = pcText;
  v3 = this;
  if ( pcText && *pcText )
  {
    v4 = this->m_spWorldMgrNet.m_pObject;
    netcmd.protocol = 8208;
    PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
    BYTE1(pcText) = strlen(v2);
    if ( BYTE1(pcText) > 0x80u )
      BYTE1(pcText) = -128;
    PgNet::AddNetMsg((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, &pcText, 2);
    PgNet::SendNetMsg((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, v2, BYTE1(pcText));
    PgNet::Flush((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr);
  }
}

//----- (004A1DE0) --------------------------------------------------------
void __thiscall GameFrameWork::NcActJumpCmd(GameFrameWork *this)
{
  Net *v1; // ecx@1
  GameFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  v1 = this->m_spZoneNet.m_pObject;
  LOWORD(netcmd) = 8228;
  PgNet::SendNetMsg((PgNet *)&v1->vfptr, &netcmd, 2);
}

//----- (004A1E10) --------------------------------------------------------
void __thiscall GameFrameWork::NcActNpcmenuopenAck(GameFrameWork *this, char bySelect)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  PROTO_NC_ACT_NPCMENUOPEN_ACK kProto; // [sp+Bh] [bp-1h]@1

  v2 = this;
  v3 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 8221;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
  kProto.ack = bySelect;
  PgNet::SendNetMsg(v4, &kProto, 1);
}

//----- (004A1E60) --------------------------------------------------------
void __thiscall GameFrameWork::NcActFoldTentCmd(GameFrameWork *this)
{
  Net *v1; // ecx@1
  GameFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  v1 = this->m_spZoneNet.m_pObject;
  LOWORD(netcmd) = 8234;
  PgNet::SendNetMsg((PgNet *)&v1->vfptr, &netcmd, 2);
}

//----- (004A1E90) --------------------------------------------------------
void __thiscall GameFrameWork::NcActPitchtentCmd(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  NiPoint3 *v2; // eax@1
  PgNet *v3; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-4h]@1

  v1 = this;
  v2 = (NiPoint3 *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
  GameFrameWork::NcActStopReq(v1, v2);
  v3 = (PgNet *)&v1->m_spZoneNet.m_pObject->vfptr;
  netcmd.protocol = 8231;
  PgNet::SendNetMsg(v3, &netcmd, 2);
}

//----- (004A1ED0) --------------------------------------------------------
void __thiscall GameFrameWork::NcActEmoticon_Cmd(GameFrameWork *this, char kID)
{
  GameFrameWork *v2; // esi@1
  PgNet *v3; // ecx@2
  PgNet *v4; // ecx@2
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@2
  PROTO_NC_ACT_EMOTICON_CMD kProto; // [sp+Bh] [bp-1h]@2

  v2 = this;
  if ( ((int (*)(void))g_pkMainChar->vfptr[13].DeleteAbStateByAbstateIndex)() != 4 )
  {
    v3 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
    netcmd.protocol = 8224;
    PgNet::AddNetMsg(v3, &netcmd, 2);
    v4 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
    kProto.emoticonid = kID;
    PgNet::SendNetMsg(v4, &kProto, 1);
  }
}

//----- (004A1F30) --------------------------------------------------------
void __thiscall GameFrameWork::NcActEmoticonStopCmd(GameFrameWork *this, char kID, unsigned int uiFrame)
{
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@1
  PgNet *v5; // ecx@1
  STOPEMOTICON_DESCRIPT kProto; // [sp+4h] [bp-8h]@1
  NETCOMMAND netcmd; // [sp+8h] [bp-4h]@1

  v3 = this;
  v4 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 8226;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
  v5 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
  kProto.emoticonid = kID;
  kProto.emoticonframe = uiFrame;
  PgNet::SendNetMsg(v5, &kProto, 3);
}

//----- (004A1F80) --------------------------------------------------------
void __thiscall GameFrameWork::NcCharPromoteReq(GameFrameWork *this)
{
  Net *v1; // ecx@1
  GameFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  v1 = this->m_spZoneNet.m_pObject;
  LOWORD(netcmd) = 4181;
  PgNet::SendNetMsg((PgNet *)&v1->vfptr, &netcmd, 2);
}

//----- (004A1FB0) --------------------------------------------------------
void __thiscall GameFrameWork::NcBatTargettingReq(GameFrameWork *this, unsigned __int16 kHandle)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@1
  PROTO_NC_BAT_TARGET_REQ kProto; // [sp+4h] [bp-8h]@1
  NETCOMMAND netcmd; // [sp+8h] [bp-4h]@1

  v2 = this;
  v3 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 9217;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
  kProto.target = kHandle;
  PgNet::SendNetMsg(v4, &kProto, 2);
}

//----- (004A2000) --------------------------------------------------------
void __thiscall GameFrameWork::NcBatBashstartCmd(GameFrameWork *this)
{
  Net *v1; // ecx@1
  GameFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  v1 = this->m_spZoneNet.m_pObject;
  LOWORD(netcmd) = 9259;
  PgNet::SendNetMsg((PgNet *)&v1->vfptr, &netcmd, 2);
}

//----- (004A2030) --------------------------------------------------------
void __thiscall GameFrameWork::NcBatBashstopCmd(GameFrameWork *this)
{
  Net *v1; // ecx@1
  GameFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  v1 = this->m_spZoneNet.m_pObject;
  LOWORD(netcmd) = 9266;
  PgNet::SendNetMsg((PgNet *)&v1->vfptr, &netcmd, 2);
}

//----- (004A2060) --------------------------------------------------------
void __thiscall GameFrameWork::NcBatSkillbashCastabortReq(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Net *v2; // ecx@1
  CastingProgressWin *v3; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-4h]@1

  v1 = this;
  v2 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 9284;
  PgNet::SendNetMsg((PgNet *)&v2->vfptr, &netcmd, 2);
  v3 = v1->m_pkCastingProgressBar;
  v1->m_kSkillCasting.eState = 0;
  CastingProgressWin::CastingFail(v3);
  v1->m_kSkillCasting.bWaitingForServerCancel = 1;
}

//----- (004A20C0) --------------------------------------------------------
void __thiscall GameFrameWork::NcBriefInfoCmd(GameFrameWork *this, unsigned __int16 kHandle, int iDepart, int iCommand)
{
  PROTO_NC_BRIEFINFO_INFORM_CMD kProto; // [sp+Ch] [bp-8h]@1

  kProto.ReceiveNetCommand.protocol = ((_WORD)iDepart << 10) | iCommand & 0x3FF;
  kProto.nMyHnd = g_pkMainChar->m_kHandle;
  kProto.hnd = kHandle;
  if ( GameFrameWork::AddAskServerInform(this, Timer::ms_fCurTime, kHandle, &kProto.ReceiveNetCommand) )
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 7u, 1u, &kProto, 6);
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004A2140) --------------------------------------------------------
void __thiscall GameFrameWork::NcItemBuyReq(GameFrameWork *this, unsigned __int16 kItemID, unsigned int dwLot)
{
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@1
  PgNet *v5; // ecx@1
  PROTO_NC_ITEM_BUY_REQ kProto; // [sp+4h] [bp-Ch]@1
  NETCOMMAND netcmd; // [sp+Ch] [bp-4h]@1

  v3 = this;
  v4 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 12291;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
  v5 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
  kProto.itemid = kItemID;
  kProto.lot = dwLot;
  PgNet::SendNetMsg(v5, &kProto, 6);
}

//----- (004A2190) --------------------------------------------------------
void __thiscall GameFrameWork::NcItemSellReq(GameFrameWork *this, char bySlot, unsigned int dwLot)
{
  GameFrameWork *v3; // esi@1
  Tutorial *v4; // eax@1
  Tutorial *v5; // eax@2
  PgNet *v6; // ecx@7
  PgNet *v7; // ecx@7
  PROTO_NC_ITEM_SELL_REQ kProto; // [sp+8h] [bp-1Ch]@7
  Tutorial *v9; // [sp+10h] [bp-14h]@2
  NETCOMMAND netcmd; // [sp+14h] [bp-10h]@7
  int v11; // [sp+20h] [bp-4h]@2

  v3 = this;
  v4 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v5 = (Tutorial *)operator new(0xB4u);
    v9 = v5;
    v11 = 0;
    if ( v5 )
      Tutorial::Tutorial(v5);
    else
      v4 = 0;
    v11 = -1;
    Singleton<Tutorial>::m_pInstance = v4;
  }
  if ( !v4->m_bLockItemSell )
  {
    v6 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
    netcmd.protocol = 12294;
    PgNet::AddNetMsg(v6, &netcmd, 2);
    v7 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
    kProto.slot = bySlot;
    kProto.lot = dwLot;
    PgNet::SendNetMsg(v7, &kProto, 5);
  }
}

//----- (004A2250) --------------------------------------------------------
void __thiscall GameFrameWork::NcItemRelocReq(GameFrameWork *this, ITEM_INVEN *kFrom, ITEM_INVEN *kTo)
{
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@1
  unsigned __int16 v5; // dx@1
  PgNet *v6; // ecx@1
  PROTO_NC_ITEM_RELOC_REQ kProto; // [sp+4h] [bp-8h]@1
  NETCOMMAND netcmd; // [sp+8h] [bp-4h]@1

  v3 = this;
  v4 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 12299;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
  v5 = kTo->Inven;
  v6 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
  kProto.from = (ITEM_INVEN)kFrom->Inven;
  kProto.to.Inven = v5;
  PgNet::SendNetMsg(v6, &kProto, 4);
}

//----- (004A22A0) --------------------------------------------------------
void __thiscall GameFrameWork::NcItemDropReq(GameFrameWork *this, ITEM_INVEN *kFrom, unsigned int dwLot, float fXPos, float fYPos)
{
  GameFrameWork *v5; // esi@1
  Net *v6; // ecx@1
  unsigned __int16 v7; // dx@1
  PgNet *v8; // ecx@1
  NETCOMMAND netcmd; // [sp+10h] [bp-1Ch]@1
  PROTO_NC_ITEM_DROP_REQ kProto; // [sp+18h] [bp-14h]@1

  v5 = this;
  v6 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 12295;
  PgNet::AddNetMsg((PgNet *)&v6->vfptr, &netcmd, 2);
  v7 = kFrom->Inven;
  kProto.lot = dwLot;
  kProto.slot.Inven = v7;
  v8 = (PgNet *)&v5->m_spZoneNet.m_pObject->vfptr;
  kProto.loc.x = (signed __int64)fXPos;
  kProto.loc.y = (signed __int64)fXPos;
  PgNet::SendNetMsg(v8, &kProto, 14);
  InventoryWin::ms_bGetDropItemActionReady = 0;
}
// A70797: using guessed type bool InventoryWin::ms_bGetDropItemActionReady;

//----- (004A2330) --------------------------------------------------------
void __thiscall GameFrameWork::NcItemPickReq(GameFrameWork *this, unsigned __int16 kItemHandle)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@2
  PgNet *v4; // ecx@2
  PROTO_NC_ITEM_PICK_REQ kProto; // [sp+4h] [bp-8h]@2
  NETCOMMAND netcmd; // [sp+8h] [bp-4h]@2

  v2 = this;
  if ( !g_kInventory.m_bWaitingItemDropAck )
  {
    v3 = this->m_spZoneNet.m_pObject;
    netcmd.protocol = 12297;
    PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
    v4 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
    kProto.itemhandle = kItemHandle;
    PgNet::SendNetMsg(v4, &kProto, 2);
    g_kInventory.m_bWaitingItemDropAck = 1;
  }
}

//----- (004A2390) --------------------------------------------------------
void __thiscall GameFrameWork::NcItemRingEquipReq(GameFrameWork *this, const char bySlot, const char byEquipSlot)
{
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@1
  PgNet *v5; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  PROTO_NC_ITEM_RINGEQUIP_REQ kProto; // [sp+8h] [bp-4h]@1

  v3 = this;
  v4 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 12304;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
  v5 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
  kProto.slot = bySlot;
  kProto.equip = byEquipSlot;
  PgNet::SendNetMsg(v5, &kProto, 2);
}

//----- (004A23E0) --------------------------------------------------------
void __thiscall GameFrameWork::NcItemMiniMonEquipReq(GameFrameWork *this, const char bySlot, const char byEquipSlot)
{
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@1
  PgNet *v5; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  PROTO_NC_ITEM_MINIMON_EQUIP_REQ kProto; // [sp+8h] [bp-4h]@1

  v3 = this;
  v4 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 12368;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
  v5 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
  kProto.nSlotNo = bySlot;
  kProto.nEquipSlot = byEquipSlot;
  PgNet::SendNetMsg(v5, &kProto, 2);
}

//----- (004A2430) --------------------------------------------------------
void __thiscall GameFrameWork::NcItemUseReq(GameFrameWork *this, const char bySlot)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  PROTO_NC_ITEM_USE_REQ kProto; // [sp+8h] [bp-4h]@1

  v2 = this;
  v3 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 12309;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
  kProto.invenslot = bySlot;
  kProto.invenType = 9;
  PgNet::SendNetMsg(v4, &kProto, 2);
}

//----- (004A2480) --------------------------------------------------------
void __thiscall GameFrameWork::NcItemUpgradeReq(GameFrameWork *this, char equipSlot, char rawSlot, char raw_left, char raw_right, char raw_middle, unsigned int gift_money)
{
  GameFrameWork *v7; // esi@1
  Net *v8; // ecx@1
  PgNet *v9; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-14h]@1
  PROTO_NC_ITEM_UPGRADE_REQ kProto; // [sp+8h] [bp-10h]@1

  v7 = this;
  v8 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 12311;
  PgNet::AddNetMsg((PgNet *)&v8->vfptr, &netcmd, 2);
  kProto.equip = equipSlot;
  kProto.raw_left = raw_left;
  kProto.raw_right = raw_right;
  kProto.raw = rawSlot;
  kProto.gift_money = gift_money;
  v9 = (PgNet *)&v7->m_spZoneNet.m_pObject->vfptr;
  kProto.raw_middle = raw_middle;
  PgNet::SendNetMsg(v9, &kProto, 9);
}

//----- (004A2500) --------------------------------------------------------
void __thiscall GameFrameWork::NcItemOpenStoragePageReq(GameFrameWork *this, char byTargePage)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  PROTO_NC_ITEM_OPENSTORAGEPAGE_REQ kProto; // [sp+Bh] [bp-1h]@1

  v2 = this;
  v3 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 12328;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
  kProto.page = byTargePage;
  PgNet::SendNetMsg(v4, &kProto, 1);
}

//----- (004A2550) --------------------------------------------------------
void __thiscall GameFrameWork::NcPartyJoinProposeRejectAck(GameFrameWork *this, Name5 kCharID)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-1Ch]@1
  PROTO_NC_PARTY_JOINPROPOSE_REQ kProto; // [sp+8h] [bp-18h]@1

  v2 = this;
  v3 = this->m_spWorldMgrNet.m_pObject;
  netcmd.protocol = 14341;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  kProto.mastername = kCharID;
  PgNet::SendNetMsg((PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 20);
}

//----- (004A25C0) --------------------------------------------------------
void __thiscall GameFrameWork::NcPartyJoinProposeTimeOutAck(GameFrameWork *this, Name5 kCharID)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-1Ch]@1
  PROTO_NC_PARTY_JOINPROPOSE_REQ kProto; // [sp+8h] [bp-18h]@1

  v2 = this;
  v3 = this->m_spWorldMgrNet.m_pObject;
  netcmd.protocol = 14342;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  kProto.mastername = kCharID;
  PgNet::SendNetMsg((PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 20);
}

//----- (004A2630) --------------------------------------------------------
void __thiscall GameFrameWork::NcPartyMemberinforeqCmd(GameFrameWork *this)
{
  Net *v1; // ecx@1
  GameFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  v1 = this->m_spZoneNet.m_pObject;
  LOWORD(netcmd) = 14408;
  PgNet::SendNetMsg((PgNet *)&v1->vfptr, &netcmd, 2);
}

//----- (004A2660) --------------------------------------------------------
void __thiscall GameFrameWork::NcPartyItemLootingSet(GameFrameWork *this, LOOTING_TYPE eType, char eLootType)
{
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@1
  PgNet *v5; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  PROTO_NC_PARTY_ITEM_LOOTING_SET kProto; // [sp+8h] [bp-4h]@1

  v3 = this;
  v4 = this->m_spWorldMgrNet.m_pObject;
  netcmd.protocol = 14411;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
  v5 = (PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr;
  kProto.nItemGrade = eLootType;
  kProto.lootingtype = eType;
  PgNet::SendNetMsg(v5, &kProto, 2);
}

//----- (004A26B0) --------------------------------------------------------
void __thiscall GameFrameWork::NcPartyFinderListReq(GameFrameWork *this, unsigned __int16 wPageNum, unsigned __int16 wMaxItemPerPage)
{
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@1
  PgNet *v5; // ecx@1
  PROTO_NC_PARTY_FINDER_LIST_REQ kProto; // [sp+4h] [bp-8h]@1
  NETCOMMAND netcmd; // [sp+8h] [bp-4h]@1

  v3 = this;
  v4 = this->m_spWorldMgrNet.m_pObject;
  netcmd.protocol = 14420;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
  v5 = (PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr;
  kProto.nPageNo = wPageNum;
  kProto.nCountOfOnePage = wMaxItemPerPage;
  PgNet::SendNetMsg(v5, &kProto, 3);
}

//----- (004A2700) --------------------------------------------------------
void __thiscall GameFrameWork::NcPartyFinderAddCommentReq(GameFrameWork *this, char *pchText)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-4h]@1

  v2 = this;
  v3 = this->m_spWorldMgrNet.m_pObject;
  netcmd.protocol = 14416;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  PgNet::SendNetMsg((PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr, pchText, 128);
}

//----- (004A2740) --------------------------------------------------------
void __thiscall GameFrameWork::NcPartyFinderDelCommentReq(GameFrameWork *this)
{
  Net *v1; // ecx@1
  GameFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  v1 = this->m_spWorldMgrNet.m_pObject;
  LOWORD(netcmd) = 14418;
  PgNet::SendNetMsg((PgNet *)&v1->vfptr, &netcmd, 2);
}

//----- (004A2770) --------------------------------------------------------
void __thiscall GameFrameWork::NcMenuServerMenuAck(GameFrameWork *this, const char ucReply)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  PROTO_NC_MENU_SERVERMENU_ACK kProto; // [sp+Bh] [bp-1h]@1

  v2 = this;
  v3 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 15362;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
  kProto.reply = ucReply;
  PgNet::SendNetMsg(v4, &kProto, 1);
}

//----- (004A27C0) --------------------------------------------------------
void __thiscall GameFrameWork::NcTradeProposeAskNoAck(GameFrameWork *this)
{
  Net *v1; // ecx@1
  GameFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  v1 = this->m_spZoneNet.m_pObject;
  LOWORD(netcmd) = 19459;
  PgNet::SendNetMsg((PgNet *)&v1->vfptr, &netcmd, 2);
}

//----- (004A27F0) --------------------------------------------------------
void __thiscall GameFrameWork::NcTradeProposeyesAck(GameFrameWork *this)
{
  Net *v1; // ecx@1
  GameFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  v1 = this->m_spZoneNet.m_pObject;
  LOWORD(netcmd) = 19462;
  PgNet::SendNetMsg((PgNet *)&v1->vfptr, &netcmd, 2);
}

//----- (004A2820) --------------------------------------------------------
void __thiscall GameFrameWork::NcTradeProposeCancelCmd(GameFrameWork *this)
{
  Net *v1; // ecx@1
  GameFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  v1 = this->m_spZoneNet.m_pObject;
  LOWORD(netcmd) = 19463;
  PgNet::SendNetMsg((PgNet *)&v1->vfptr, &netcmd, 2);
}

//----- (004A2850) --------------------------------------------------------
void __thiscall GameFrameWork::NcTradeUpboardReq(GameFrameWork *this, const char bySlot)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  PROTO_NC_TRADE_UPBOARD_REQ kProto; // [sp+Bh] [bp-1h]@1

  v2 = this;
  v3 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 19469;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
  kProto.slotinven = bySlot;
  PgNet::SendNetMsg(v4, &kProto, 1);
}

//----- (004A28A0) --------------------------------------------------------
void __thiscall GameFrameWork::NcTradeDownboardReq(GameFrameWork *this, const char bySlot)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  PROTO_NC_TRADE_DOWNBOARD_REQ kProto; // [sp+Bh] [bp-1h]@1

  v2 = this;
  v3 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 19473;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
  kProto.slotboard = bySlot;
  PgNet::SendNetMsg(v4, &kProto, 1);
}

//----- (004A28F0) --------------------------------------------------------
void __thiscall GameFrameWork::NcTradeCenboardingReq(GameFrameWork *this, const unsigned __int64 qwCen)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@1
  PROTO_NC_TRADE_CENBOARDING_REQ kProto; // [sp+4h] [bp-Ch]@1
  NETCOMMAND netcmd; // [sp+Ch] [bp-4h]@1

  v2 = this;
  v3 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 19477;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
  kProto.cen = qwCen;
  PgNet::SendNetMsg(v4, &kProto, 8);
}

//----- (004A2940) --------------------------------------------------------
void __thiscall GameFrameWork::NcTradeBoardlockReq(GameFrameWork *this)
{
  Net *v1; // ecx@1
  GameFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  v1 = this->m_spZoneNet.m_pObject;
  LOWORD(netcmd) = 19481;
  PgNet::SendNetMsg((PgNet *)&v1->vfptr, &netcmd, 2);
}

//----- (004A2970) --------------------------------------------------------
void __thiscall GameFrameWork::NcTradeDecideReq(GameFrameWork *this)
{
  Net *v1; // ecx@1
  GameFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  v1 = this->m_spZoneNet.m_pObject;
  LOWORD(netcmd) = 19487;
  PgNet::SendNetMsg((PgNet *)&v1->vfptr, &netcmd, 2);
}

//----- (004A29A0) --------------------------------------------------------
void __thiscall GameFrameWork::NcTradeCancelReq(GameFrameWork *this)
{
  Net *v1; // ecx@1
  GameFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  v1 = this->m_spZoneNet.m_pObject;
  LOWORD(netcmd) = 19466;
  PgNet::SendNetMsg((PgNet *)&v1->vfptr, &netcmd, 2);
}

//----- (004A29D0) --------------------------------------------------------
void __thiscall GameFrameWork::NcSoulStoneHPBuyReq(GameFrameWork *this, unsigned __int16 wNumber)
{
  unsigned __int16 v2; // di@1
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@2
  PgNet *v5; // ecx@2
  PROTO_NC_SOULSTONE_HP_BUY_REQ kProto; // [sp+8h] [bp-4h]@2

  v2 = wNumber;
  v3 = this;
  if ( wNumber )
  {
    v4 = this->m_spZoneNet.m_pObject;
    wNumber = 20481;
    PgNet::AddNetMsg((PgNet *)&v4->vfptr, &wNumber, 2);
    v5 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
    kProto.number = v2;
    PgNet::SendNetMsg(v5, &kProto, 2);
  }
}

//----- (004A2A20) --------------------------------------------------------
void __thiscall GameFrameWork::NcSoulStoneSPBuyReq(GameFrameWork *this, unsigned __int16 wNumber)
{
  unsigned __int16 v2; // di@1
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@2
  PgNet *v5; // ecx@2
  PROTO_NC_SOULSTONE_SP_BUY_REQ kProto; // [sp+8h] [bp-4h]@2

  v2 = wNumber;
  v3 = this;
  if ( wNumber )
  {
    v4 = this->m_spZoneNet.m_pObject;
    wNumber = 20482;
    PgNet::AddNetMsg((PgNet *)&v4->vfptr, &wNumber, 2);
    v5 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
    kProto.number = v2;
    PgNet::SendNetMsg(v5, &kProto, 2);
  }
}

//----- (004A2A70) --------------------------------------------------------
void __thiscall GameFrameWork::NcSoulStoneHPUseReq(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  PgNet *v2; // ecx@2
  NETCOMMAND netcmd; // [sp+4h] [bp-4h]@2

  v1 = this;
  if ( !Char::CheckActState(g_pkMainChar, 500000) )
  {
    v2 = (PgNet *)&v1->m_spZoneNet.m_pObject->vfptr;
    netcmd.protocol = 20487;
    PgNet::SendNetMsg(v2, &netcmd, 2);
  }
}

//----- (004A2AB0) --------------------------------------------------------
void __thiscall GameFrameWork::NcSoulStoneSPUseReq(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  PgNet *v2; // ecx@2
  NETCOMMAND netcmd; // [sp+4h] [bp-4h]@2

  v1 = this;
  if ( !Char::CheckActState(g_pkMainChar, 500000) )
  {
    v2 = (PgNet *)&v1->m_spZoneNet.m_pObject->vfptr;
    netcmd.protocol = 20489;
    PgNet::SendNetMsg(v2, &netcmd, 2);
  }
}

//----- (004A2AF0) --------------------------------------------------------
void __cdecl EmpowerAlloc(unsigned __int16 kID, Skill::EmpowerInfo kEmpowerInfo)
{
  unsigned __int16 v2; // ax@1
  int v3; // edi@1
  char v4; // dl@3
  char v5; // cl@3
  __int16 v6; // ax@3
  char v7; // bl@3
  Skill::EmpowerInfo *v8; // eax@13
  char v9; // dl@13
  char v10; // bl@13
  char v11; // cl@13
  char v12; // al@13
  char v13; // al@26
  char v14; // al@31
  PROTO_NC_SKILL_EMPOWALLOC_REQ kReqPart; // [sp+4h] [bp-1Ch]@2
  Skill::EmpowerInfo result; // [sp+Ch] [bp-14h]@13
  int iMaxLevel; // [sp+10h] [bp-10h]@1
  int iCurrLevel; // [sp+14h] [bp-Ch]@1
  Skill::EmpowerInfo kCurrSkillEmpowerInfo; // [sp+18h] [bp-8h]@13
  Skill::EmpowerInfo kInfoPart; // [sp+1Ch] [bp-4h]@35
  int kIDa; // [sp+28h] [bp+8h]@1

  iCurrLevel = 1;
  v2 = Skill::GetBaseSkillID(kID, &iMaxLevel);
  v3 = v2;
  kIDa = v2;
  if ( v2 != -1 )
  {
    *(_DWORD *)&kReqPart.skill = 0;
    kReqPart.minus = 0;
    if ( kEmpowerInfo )
    {
      v4 = kEmpowerInfo.cSmallSp;
      v5 = kEmpowerInfo.cDamageUp;
      v6 = (__int16)kReqPart.plus;
      v7 = kEmpowerInfo.cLongKeepTime;
      do
      {
        if ( iCurrLevel > iMaxLevel )
          break;
        if ( v5 > 0 )
        {
          kReqPart.plus = (SKILL_EMPOWER)(v6 & 0xFFF0 | v5 & 0xF);
          v6 = v6 & 0xFFF0 | v5 & 0xF;
          kEmpowerInfo.cDamageUp = 0;
        }
        if ( v4 > 0 )
        {
          kReqPart.plus = (SKILL_EMPOWER)(v6 & 0xFF0F | 16 * (v4 & 0xF));
          v6 = v6 & 0xFF0F | 16 * (v4 & 0xF);
          kEmpowerInfo.cSmallSp = 0;
        }
        if ( v7 > 0 )
        {
          kReqPart.plus = (SKILL_EMPOWER)(v6 & 0xF0FF | ((v7 & 0xF) << 8));
          v6 = v6 & 0xF0FF | ((v7 & 0xF) << 8);
          kEmpowerInfo.cLongKeepTime = 0;
        }
        if ( kEmpowerInfo.cShortCoolTime > 0 )
        {
          kReqPart.plus = (SKILL_EMPOWER)(v6 & 0xFFF | (kEmpowerInfo.cShortCoolTime << 12));
          kEmpowerInfo.cShortCoolTime = 0;
        }
        v8 = Skill::GetEmpowerInfo(&result, v3);
        v9 = v8->cShortCoolTime;
        v10 = v8->cLongKeepTime;
        v11 = v8->cDamageUp;
        v12 = v8->cSmallSp;
        kCurrSkillEmpowerInfo.cShortCoolTime = v9;
        kCurrSkillEmpowerInfo.cLongKeepTime = v10;
        if ( kEmpowerInfo.cDamageUp < 0 )
        {
          if ( v11 >= -kEmpowerInfo.cDamageUp )
            v11 = -kEmpowerInfo.cDamageUp;
          if ( v11 > 0 )
          {
            v10 = kCurrSkillEmpowerInfo.cLongKeepTime;
            kReqPart.minus = (SKILL_EMPOWER)(*(_WORD *)&kReqPart.minus & 0xFFF0 | v11 & 0xF);
            kEmpowerInfo.cDamageUp += v11;
          }
          v3 = kIDa;
        }
        if ( kEmpowerInfo.cSmallSp < 0 )
        {
          if ( v12 >= -kEmpowerInfo.cSmallSp )
            v12 = -kEmpowerInfo.cSmallSp;
          if ( v12 > 0 )
          {
            kReqPart.minus = (SKILL_EMPOWER)(*(_WORD *)&kReqPart.minus & 0xFF0F | 16 * (v12 & 0xF));
            kEmpowerInfo.cSmallSp += v12;
          }
        }
        if ( kEmpowerInfo.cLongKeepTime < 0 )
        {
          v13 = v10 >= -kEmpowerInfo.cLongKeepTime ? -kEmpowerInfo.cLongKeepTime : v10;
          if ( v13 > 0 )
          {
            kReqPart.minus = (SKILL_EMPOWER)(*(_WORD *)&kReqPart.minus & 0xF0FF | ((v13 & 0xF) << 8));
            kEmpowerInfo.cLongKeepTime += v13;
          }
        }
        if ( kEmpowerInfo.cShortCoolTime < 0 )
        {
          v14 = kCurrSkillEmpowerInfo.cShortCoolTime;
          if ( kCurrSkillEmpowerInfo.cShortCoolTime >= -kEmpowerInfo.cShortCoolTime )
            v14 = -kEmpowerInfo.cShortCoolTime;
          if ( v14 > 0 )
          {
            kReqPart.minus = (SKILL_EMPOWER)(*(_WORD *)&kReqPart.minus & 0xFFF | (v14 << 12));
            kEmpowerInfo.cShortCoolTime += v14;
          }
        }
        kInfoPart.cDamageUp = (*(_BYTE *)&kReqPart.plus & 0xF) - (*(_BYTE *)&kReqPart.minus & 0xF);
        kInfoPart.cSmallSp = (*(_BYTE *)&kReqPart.plus >> 4) - (*(_BYTE *)&kReqPart.minus >> 4);
        v6 = (__int16)kReqPart.plus;
        kInfoPart.cLongKeepTime = (*((_BYTE *)&kReqPart.plus + 1) & 0xF) - (*((_BYTE *)&kReqPart.minus + 1) & 0xF);
        kInfoPart.cShortCoolTime = ((*(_DWORD *)&kReqPart.plus >> 12) & 0xF)
                                 - ((*(_DWORD *)&kReqPart.minus >> 12) & 0xF);
        if ( kInfoPart )
        {
          SkillEmpowerRequest::Register(v3, kInfoPart);
          kReqPart.skill = v3;
          NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x12u, 0x11u, &kReqPart, 6);
          v6 = (__int16)kReqPart.plus;
        }
        ++iCurrLevel;
        v7 = kEmpowerInfo.cLongKeepTime;
        v4 = kEmpowerInfo.cSmallSp;
        v5 = kEmpowerInfo.cDamageUp;
        kIDa = ++v3;
      }
      while ( kEmpowerInfo );
    }
  }
}

//----- (004A2D90) --------------------------------------------------------
void __stdcall GameFrameWork::NcSkillEmpowallocReq(PROTO_NC_SKILL_EMPOWALLOC_REQ *rkReq)
{
  PROTO_NC_SKILL_EMPOWALLOC_REQ *v2; // eax@1
  SKILL_EMPOWER v3; // dx@1
  unsigned int v4; // ecx@1
  Skill::EmpowerInfo kInfo; // [sp+10h] [bp+8h]@1

  v2 = rkReq;
  v3 = rkReq->plus;
  kInfo.cDamageUp = (*(_BYTE *)&rkReq->plus & 0xF) - (*(_BYTE *)&rkReq->minus & 0xF);
  v4 = (unsigned int)v2->minus;
  kInfo.cSmallSp = (*(_BYTE *)&v3 >> 4) - (((unsigned __int8)*(_WORD *)&v2->minus >> 4) & 0xF);
  kInfo.cLongKeepTime = ((*(unsigned __int16 *)&v2->plus >> 8) & 0xF) - (BYTE1(v4) & 0xF);
  kInfo.cShortCoolTime = (((unsigned int)*(_WORD *)&v2->plus >> 12) & 0xF) - ((v4 >> 12) & 0xF);
  EmpowerAlloc(v2->skill, kInfo);
}

//----- (004A2E10) --------------------------------------------------------
void __thiscall GameFrameWork::NcSkillEmpowResetReq(GameFrameWork *this)
{
  Net *v1; // ecx@1
  GameFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  v1 = this->m_spZoneNet.m_pObject;
  LOWORD(netcmd) = 18442;
  PgNet::SendNetMsg((PgNet *)&v1->vfptr, &netcmd, 2);
}

//----- (004A2E40) --------------------------------------------------------
void __thiscall GameFrameWork::NcFriendFindReq(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Net *v2; // ecx@1
  __int16 pdata; // [sp+4h] [bp-4h]@1

  v1 = this;
  v2 = this->m_spWorldMgrNet.m_pObject;
  pdata = 21535;
  PgNet::AddNetMsg((PgNet *)&v2->vfptr, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr, 0, 0);
}

//----- (004A2E80) --------------------------------------------------------
void __thiscall GameFrameWork::NcFriendPointReq(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Net *v2; // ecx@1
  __int16 pdata; // [sp+4h] [bp-4h]@1

  v1 = this;
  v2 = this->m_spWorldMgrNet.m_pObject;
  pdata = 21533;
  PgNet::AddNetMsg((PgNet *)&v2->vfptr, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr, 0, 0);
}

//----- (004A2EC0) --------------------------------------------------------
void __thiscall GameFrameWork::NcItemSplitReq(GameFrameWork *this, ITEM_INVEN *kFrom, ITEM_INVEN *kTo, unsigned int uiVal)
{
  GameFrameWork *v4; // esi@1
  Net *v5; // ecx@1
  unsigned __int16 v6; // dx@1
  PgNet *v7; // ecx@1
  PROTO_NC_ITEM_SPLIT_REQ kProto; // [sp+4h] [bp-Ch]@1
  NETCOMMAND netcmd; // [sp+Ch] [bp-4h]@1

  v4 = this;
  v5 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 12301;
  PgNet::AddNetMsg((PgNet *)&v5->vfptr, &netcmd, 2);
  v6 = kTo->Inven;
  kProto.from = (ITEM_INVEN)kFrom->Inven;
  v7 = (PgNet *)&v4->m_spZoneNet.m_pObject->vfptr;
  kProto.to.Inven = v6;
  kProto.lot = uiVal;
  PgNet::AddNetMsg(v7, &kProto, 8);
  PgNet::SendNetMsg((PgNet *)&v4->m_spZoneNet.m_pObject->vfptr, 0, 0);
}

//----- (004A2F30) --------------------------------------------------------
void __thiscall GameFrameWork::NcBoothCloseReq(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Net *v2; // ecx@1
  __int16 pdata; // [sp+4h] [bp-4h]@1

  v1 = this;
  v2 = this->m_spZoneNet.m_pObject;
  pdata = 26628;
  PgNet::AddNetMsg((PgNet *)&v2->vfptr, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v1->m_spZoneNet.m_pObject->vfptr, 0, 0);
}

//----- (004A2F70) --------------------------------------------------------
void __thiscall GameFrameWork::NcBoothInterioStartReq(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Net *v2; // ecx@1
  __int16 pdata; // [sp+4h] [bp-4h]@1

  v1 = this;
  v2 = this->m_spZoneNet.m_pObject;
  pdata = 26640;
  PgNet::AddNetMsg((PgNet *)&v2->vfptr, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v1->m_spZoneNet.m_pObject->vfptr, 0, 0);
}

//----- (004A2FB0) --------------------------------------------------------
void __thiscall GameFrameWork::NcBoothEntryReq(GameFrameWork *this, unsigned __int16 sHandle)
{
  GameFrameWork *v2; // esi@1
  PgNet *v3; // ecx@3
  PROTO_NC_BOOTH_ENTRY_REQ kProto; // [sp+4h] [bp-8h]@3
  NETCOMMAND netcmd; // [sp+8h] [bp-4h]@3

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->m_pkPrivateStoreWin->vfptr[65].__vecDelDtor)() )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkPrivateStoreWin->vfptr);
  netcmd.protocol = 26631;
  PgNet::AddNetMsg((PgNet *)&v2->m_spZoneNet.m_pObject->vfptr, &netcmd, 2);
  v3 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
  kProto.booth = sHandle;
  PgNet::AddNetMsg(v3, &kProto, 2);
  PgNet::SendNetMsg((PgNet *)&v2->m_spZoneNet.m_pObject->vfptr, 0, 0);
}

//----- (004A3030) --------------------------------------------------------
void __thiscall GameFrameWork::NcBoothItemTradeReq(GameFrameWork *this, unsigned __int16 booth, char boothslot, unsigned __int16 itemnum)
{
  GameFrameWork *v4; // esi@1
  Net *v5; // ecx@1
  PgNet *v6; // ecx@1
  PROTO_NC_BOOTH_ITEMTRADE_REQ kProto; // [sp+4h] [bp-Ch]@1
  NETCOMMAND netcmd; // [sp+Ch] [bp-4h]@1

  v4 = this;
  InventoryWin::ms_bBuyPrivateStoreActionReady = 0;
  v5 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 26637;
  PgNet::AddNetMsg((PgNet *)&v5->vfptr, &netcmd, 2);
  kProto.booth = booth;
  kProto.itemnum = itemnum;
  v6 = (PgNet *)&v4->m_spZoneNet.m_pObject->vfptr;
  kProto.slot = boothslot;
  PgNet::AddNetMsg(v6, &kProto, 5);
  PgNet::SendNetMsg((PgNet *)&v4->m_spZoneNet.m_pObject->vfptr, 0, 0);
}
// A70798: using guessed type bool InventoryWin::ms_bBuyPrivateStoreActionReady;

//----- (004A30A0) --------------------------------------------------------
int __userpurge GameFrameWork::On_NC_BOOTH_SOMEONEOPEN_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<edi>, int iRevBytes, void *pvData)
{
  Char *v4; // ebx@2
  PrivateStoreBD *v5; // eax@3
  unsigned __int16 v6; // cx@5
  void (__thiscall *v7)(AbStateInfectee *, ABSTATEINDEX, bool, int); // eax@5
  STREETBOOTH_SIGNBOARD v9; // [sp-24h] [bp-30h]@5
  signed int v10; // [sp-4h] [bp-10h]@5

  if ( g_pkMainChar->m_kHandle != *(_WORD *)pvData )
  {
    v4 = GameFrameWork::GetCharByHandle(this, *(_WORD *)pvData, 26, 3);
    if ( v4 )
    {
      v5 = ScreenBDMgr::GetPrivateStoreBD(&g_kScrnBDMgr, *(_WORD *)pvData);
      if ( v5 )
        ScreenBDMgr::RemovePrivateStoreBD(&g_kScrnBDMgr, a2, v5);
      v6 = *((_WORD *)pvData + 1);
      v7 = v4->vfptr[1].SetAbStateProperty;
      v10 = 5;
      v4->m_byMiniHouseSkinID = v6;
      ((void (__thiscall *)(Char *, signed int, signed int))v7)(v4, 1, v10);
      v10 = *((_BYTE *)pvData + 14) != 0;
      qmemcpy(&v9, (char *)pvData + 15, sizeof(v9));
      Char::SetCampSignBoard(v4, v9, v10);
    }
  }
  return iRevBytes;
}

//----- (004A3130) --------------------------------------------------------
int __userpurge GameFrameWork::On_NC_BOOTH_SOMEONECLOSE_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<esi>, int iRevBytes, void *pvData)
{
  GameFrameWork *v4; // edi@1
  Char *v5; // eax@2
  Char *v6; // esi@2
  int v8; // [sp-4h] [bp-Ch]@2

  v4 = this;
  if ( g_pkMainChar->m_kHandle != *(_WORD *)pvData )
  {
    v8 = a2;
    v5 = GameFrameWork::GetCharByHandle(this, *(_WORD *)pvData, 26, 6);
    v6 = v5;
    if ( v5 )
    {
      if ( !(unsigned __int8)((int (__thiscall *)(Char *, int))v5->vfptr[20].Deaffect)(v5, v8) )
        v6->vfptr[2].Affect((AbStateInfectee *)v6, 0, (bool)((char *)pvData + 2));
      ((void (__thiscall *)(Char *, _DWORD))v6->vfptr[1].SetAbStateProperty)(v6, 0);
    }
    if ( v4->m_pkPrivateStoreWin )
    {
      if ( PrivateStoreWin::ms_uiPrivateStoreMode )
      {
        if ( PrivateStoreWin::ms_uiPrivateStoreMode == 2
          && PrivateStoreWin::ms_BoothHandle == *(_WORD *)pvData
          && (unsigned __int8)((int (*)(void))v4->m_pkPrivateStoreWin->vfptr[65].__vecDelDtor)() )
        {
          PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkPrivateStoreWin->vfptr);
        }
      }
      else if ( PrivateStoreWin::ms_BoothHandle == *(_WORD *)pvData
             && (unsigned __int8)((int (*)(void))v4->m_pkPrivateStoreWin->vfptr[65].__vecDelDtor)() )
      {
        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkPrivateStoreWin->vfptr);
        return iRevBytes;
      }
    }
  }
  return iRevBytes;
}
// 4A3130: could not find valid save-restore pair for esi
// A71180: using guessed type unsigned int PrivateStoreWin::ms_uiPrivateStoreMode;
// A8D480: using guessed type unsigned __int16 PrivateStoreWin::ms_BoothHandle;

//----- (004A3220) --------------------------------------------------------
void __thiscall GameFrameWork::NcBoothReflashReq(GameFrameWork *this, unsigned __int16 booth)
{
  GameFrameWork *v2; // esi@1
  PgNet *v3; // ecx@2
  PROTO_NC_BOOTH_REFRESH_REQ kProto; // [sp+4h] [bp-8h]@2
  NETCOMMAND netcmd; // [sp+8h] [bp-4h]@2

  v2 = this;
  if ( dwLastSendTime + 5000 <= timeGetTime() )
  {
    InventoryWin::ms_bBuyPrivateStoreActionReady = 0;
    v3 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
    netcmd.protocol = 26634;
    PgNet::AddNetMsg(v3, &netcmd, 2);
    kProto.booth = booth;
    PgNet::AddNetMsg((PgNet *)&v2->m_spZoneNet.m_pObject->vfptr, &kProto, 2);
    PgNet::SendNetMsg((PgNet *)&v2->m_spZoneNet.m_pObject->vfptr, 0, 0);
  }
}
// A70798: using guessed type bool InventoryWin::ms_bBuyPrivateStoreActionReady;

//----- (004A3290) --------------------------------------------------------
void __thiscall GameFrameWork::NcBoothSearchItemListCategorized(GameFrameWork *this, unsigned int kCategoryType, bool bOnlyMyClass, bool bFirst)
{
  GameFrameWork *v4; // esi@1
  Net *v5; // ecx@1
  PROTO_NC_BOOTH_SEARCH_ITEM_LIST_CATEGORIZED_REQ kProto; // [sp+4h] [bp-8h]@1

  v4 = this;
  kProto.bReqOnlyMyClass = bOnlyMyClass;
  kProto.Category = kCategoryType;
  v5 = this->m_spZoneNet.m_pObject;
  kProto.bIsOpeningReq = bFirst;
  *(_WORD *)&bOnlyMyClass = 26643;
  PgNet::AddNetMsg((PgNet *)&v5->vfptr, &bOnlyMyClass, 2);
  PgNet::SendNetMsg((PgNet *)&v4->m_spZoneNet.m_pObject->vfptr, &kProto, 6);
}

//----- (004A32E0) --------------------------------------------------------
void __thiscall GameFrameWork::NcBoothSearchBoothPosition(GameFrameWork *this, unsigned int BoothItemHandle, unsigned __int16 TargetCharHandle)
{
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@3
  PROTO_NC_BOOTH_SEARCH_BOOTH_POSITION_REQ kProto; // [sp+4h] [bp-8h]@3

  v3 = this;
  if ( BoothItemHandle != -1 && TargetCharHandle != -1 )
  {
    kProto.nTargetBoothOwnerHandle = TargetCharHandle;
    kProto.nBoothItemHandle = BoothItemHandle;
    v4 = this->m_spZoneNet.m_pObject;
    TargetCharHandle = 26645;
    PgNet::AddNetMsg((PgNet *)&v4->vfptr, &TargetCharHandle, 2);
    PgNet::SendNetMsg((PgNet *)&v3->m_spZoneNet.m_pObject->vfptr, &kProto, 6);
  }
}

//----- (004A3340) --------------------------------------------------------
void __thiscall GameFrameWork::NcCharTitleSetReq(GameFrameWork *this, unsigned int dwData)
{
  GameFrameWork *v2; // esi@1
  CharInfoWin *v3; // eax@1
  CharTitleWin *v4; // ecx@2
  PgNet *v5; // ecx@5
  PROTO_NC_CT_SET_CURRENT_REQ kProto; // [sp+4h] [bp-4h]@3

  v2 = this;
  v3 = this->m_pkCharInfoWin;
  if ( v3 )
  {
    v4 = v3->m_pkCharTitleWin;
    if ( v4 )
    {
      kProto.Type = v4->ms_ctWinListInfo[dwData].Type;
      if ( kProto.Type != 10 )
      {
        kProto.ElementNo = *((_BYTE *)&v3->m_pkCharTitleWin->ms_ctWinListInfo[dwData] + 1) & 0x3F;
        kProto.MobID = 0;
      }
      v5 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
      LOWORD(dwData) = 24577;
      PgNet::AddNetMsg(v5, &dwData, 2);
      PgNet::SendNetMsg((PgNet *)&v2->m_spZoneNet.m_pObject->vfptr, &kProto, 4);
    }
  }
}

//----- (004A33C0) --------------------------------------------------------
void __thiscall GameFrameWork::NcKqStatusReq(GameFrameWork *this, unsigned int Handle)
{
  unsigned int v2; // eax@1
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@1
  PROTO_NC_KQ_STATUS_REQ kProto; // [sp+4h] [bp-4h]@1

  v2 = Handle;
  v3 = this;
  LOWORD(Handle) = 22531;
  v4 = this->m_spWorldMgrNet.m_pObject;
  kProto.Handle = v2;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &Handle, 2);
  PgNet::SendNetMsg((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 4);
}

//----- (004A3400) --------------------------------------------------------
void __thiscall GameFrameWork::NcKqListRefreshReq(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Net *v2; // ecx@1
  __int16 pdata; // [sp+4h] [bp-8h]@1
  char v4; // [sp+Bh] [bp-1h]@1

  v1 = this;
  v2 = this->m_spWorldMgrNet.m_pObject;
  pdata = 22555;
  PgNet::AddNetMsg((PgNet *)&v2->vfptr, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr, &v4, 1);
}

//----- (004A3440) --------------------------------------------------------
void __thiscall GameFrameWork::NcKqJoinReq(GameFrameWork *this, unsigned int Handle)
{
  unsigned int v2; // eax@1
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@1
  PROTO_NC_KQ_JOIN_REQ kProto; // [sp+4h] [bp-4h]@1

  v2 = Handle;
  v3 = this;
  LOWORD(Handle) = 22533;
  v4 = this->m_spWorldMgrNet.m_pObject;
  kProto.Handle = v2;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &Handle, 2);
  PgNet::SendNetMsg((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 4);
}

//----- (004A3480) --------------------------------------------------------
void __thiscall GameFrameWork::NcKqJoinCancelReq(GameFrameWork *this, unsigned int Handle)
{
  unsigned int v2; // eax@1
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@1
  PROTO_NC_KQ_JOIN_CANCEL_REQ kProto; // [sp+4h] [bp-4h]@1

  v2 = Handle;
  v3 = this;
  LOWORD(Handle) = 22535;
  v4 = this->m_spWorldMgrNet.m_pObject;
  kProto.Handle = v2;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &Handle, 2);
  PgNet::SendNetMsg((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 4);
}

//----- (004A34C0) --------------------------------------------------------
void __thiscall GameFrameWork::NcUserPacketToWorld(GameFrameWork *this, DirectUserMsgBody_SendPacket *pkPacketBody)
{
  void *v2; // edi@1
  GameFrameWork *v3; // esi@1
  int v4; // ebx@2
  Net *v5; // ecx@3

  v2 = pkPacketBody->pvPacket;
  v3 = this;
  if ( v2 )
  {
    v4 = pkPacketBody->uiPacketSize;
    LOWORD(pkPacketBody) = (pkPacketBody->wDepartment << 10) | pkPacketBody->wCommand & 0x3FF;
    PgNet::AddNetMsg((PgNet *)&this->m_spWorldMgrNet.m_pObject->vfptr, &pkPacketBody, 2);
    PgNet::SendNetMsg((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, v2, v4);
  }
  else
  {
    v5 = this->m_spWorldMgrNet.m_pObject;
    LOWORD(pkPacketBody) = (pkPacketBody->wDepartment << 10) | pkPacketBody->wCommand & 0x3FF;
    PgNet::SendNetMsg((PgNet *)&v5->vfptr, &pkPacketBody, 2);
  }
}

//----- (004A3550) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MISC_PINGTEST_TOOL_WM_CLIENT_ZONE_DB(GameFrameWork *this, int iRevBytes, void *pvData)
{
  _DWORD *v3; // edi@1
  GameFrameWork *v4; // esi@1
  PgNet *v5; // ecx@2
  int result; // eax@2
  PgNet *v7; // ecx@3

  v3 = pvData;
  v4 = this;
  if ( *((_DWORD *)pvData + 11) )
  {
    v3[12] = timeGetTime();
    v5 = (PgNet *)&v4->m_spWorldMgrNet.m_pObject->vfptr;
    LOWORD(pvData) = 2067;
    PgNet::AddNetMsg(v5, &pvData, 2);
    PgNet::SendNetMsg((PgNet *)&v4->m_spWorldMgrNet.m_pObject->vfptr, v3, 164);
    result = iRevBytes;
  }
  else
  {
    v3[11] = timeGetTime();
    v7 = (PgNet *)&v4->m_spZoneNet.m_pObject->vfptr;
    LOWORD(pvData) = 2067;
    PgNet::AddNetMsg(v7, &pvData, 2);
    PgNet::SendNetMsg((PgNet *)&v4->m_spZoneNet.m_pObject->vfptr, v3, 164);
    result = iRevBytes;
  }
  return result;
}

//----- (004A35E0) --------------------------------------------------------
void __thiscall GameFrameWork::NcMiscWebKeyReq(GameFrameWork *this)
{
  Net *v1; // ecx@1
  GameFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  v1 = this->m_spWorldMgrNet.m_pObject;
  LOWORD(netcmd) = 2075;
  PgNet::SendNetMsg((PgNet *)&v1->vfptr, &netcmd, 2);
}

//----- (004A3610) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MISC_WEB_KEY_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  PgWin *v4; // eax@3
  mhGuestBookWin *v5; // ecx@5
  mhEditRoomWin *v7; // edi@8

  v3 = this;
  if ( *(_WORD *)pvData != 4368 )
  {
    GameFrameWork::AddSysMsg(this, "Item Mall Web Key DB Error!");
    return iRevBytes;
  }
  if ( nowState == MH_STATE_NO )
    goto LABEL_17;
  v4 = this->m_pkMHCurrentWin;
  if ( !v4 )
    goto LABEL_17;
  if ( !_mbscmp("mhGuestBookWin", v4->m_pcName) )
  {
    v5 = (mhGuestBookWin *)v3->m_pkMHCurrentWin;
    if ( !v5->m_bOpen )
    {
      mhGuestBookWin::ShowWeb(v5, (char *)pvData + 2, &v3->m_pkMHEditRoomWin->m_Tkey);
      return iRevBytes;
    }
    return iRevBytes;
  }
  if ( _mbscmp("mhEditRoomWin", v3->m_pkMHCurrentWin->m_pcName) )
  {
LABEL_17:
    if ( v3->m_pkShopWin )
    {
      GameFrameWork::OnOpenItemShopWin(v3);
      return iRevBytes;
    }
    return iRevBytes;
  }
  v7 = (mhEditRoomWin *)v3->m_pkMHCurrentWin;
  mhEditRoomWin::ShowComponent(v3->m_pkMHEditRoomWin, 1);
  if ( !v7->m_bOpen )
    mhEditRoomWin::ShowWeb(v7, (char *)pvData + 2);
  return iRevBytes;
}

//----- (004A3710) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_USER_CONNECTCUT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  int result; // eax@4

  v3 = this;
  if ( nowState == MH_STATE_NO && PgWin::IsVisible((PgWin *)&this->m_pkShopWin->vfptr) == 1 )
    ShopWin::OnWinClose(v3->m_pkShopWin);
  result = iRevBytes;
  if ( *(_WORD *)pvData == 1667 )
    g_kServer.m_bDoubleConnected = 1;
  return result;
}

//----- (004A3760) --------------------------------------------------------
int __userpurge GameFrameWork::On_NC_USER_LOGINWORLD_ACK@<eax>(GameFrameWork *this@<ecx>, int a2@<ebx>, int a3@<edi>, int iRevBytes, void *pvData)
{
  GameFrameWork *v5; // esi@1

  v5 = this;
  g_kServer.m_kWorldMgrHandle = *(_WORD *)pvData;
  User::SetAvatarInfo(&g_kUser, (PROTO_AVATARINFORMATION *)((char *)pvData + 3), *((_BYTE *)pvData + 2));
  Net::NcMiscGameTimeReq(v5->m_spWorldMgrNet.m_pObject);
  GameFrameWork::OnCharSelect(v5, a2, a3);
  return iRevBytes;
}

//----- (004A37A0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_CHAR_STAT_REMAINPOINT_CMD(int iRevBytes, void *pvData)
{
  int result; // eax@1

  result = iRevBytes;
  unk_A97D74 = *(_BYTE *)pvData;
  return result;
}

//----- (004A37C0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_CHAR_SOMEONEGUILDCHANGE_CMD(int iRevBytes, void *pvData)
{
  Char *v3; // eax@1

  v3 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  if ( v3 )
  {
    v3->m_dwGuildRegNum = *(_DWORD *)((char *)pvData + 2);
    v3->m_GuildAcademyMemberFlag = 0;
  }
  return iRevBytes;
}

//----- (004A3800) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_CHAR_SOMEONEGUILDACADEMYCHANGE_CMD(int iRevBytes, void *pvData)
{
  PgWin *v3; // eax@1
  Char *v4; // eax@3

  v3 = GuildAcademySelectTask::GetGuildAcademySelectWin();
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *))v3->vfptr[65].__vecDelDtor)(v3) )
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0xBu, 0, 0);
  v4 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  if ( v4 )
  {
    v4->m_dwGuildRegNum = *(_DWORD *)((char *)pvData + 2);
    v4->m_GuildAcademyMemberFlag = 1;
  }
  return iRevBytes;
}

//----- (004A3860) --------------------------------------------------------
int __userpurge GameFrameWork::On_NC_MAP_LINKSAME_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<ebx>, int iRevBytes, void *pvData)
{
  GameFrameWork *v4; // esi@1
  _DWORD *v5; // ecx@1
  int v6; // eax@1
  PrivateStoreWin *v7; // ecx@1
  MHDiceGameTask *v8; // edi@1
  MHDiceGameTask *v9; // ecx@9
  MHDiceGameTask *v10; // ecx@14
  GTTDiceWin *v11; // eax@19
  GTTDiceWin *v12; // eax@20
  GuildTournamentScheduleWin *v13; // eax@21
  GuildTournamentScheduleWin *v14; // eax@22
  GuildNpcMenuWin *v15; // eax@23
  GuildNpcMenuWin *v16; // eax@24
  GuildTournamentBaseWin *v17; // eax@25
  GuildTournamentBaseWin *v18; // eax@26
  GTStatusWin *v19; // eax@27
  GTStatusWin *v20; // eax@28
  GTStatusMiniWin *v21; // eax@29
  GTStatusMiniWin *v22; // eax@30
  AnnounceWin *v23; // ecx@31
  CameraEffect *v24; // ecx@35
  MarketSearchWin *v25; // ecx@37
  MiniMapWin *v26; // ecx@39
  NiPointer<MHDiceGameTask> v28; // [sp+20h] [bp-14h]@14
  NiPointer<MHDiceGameTask> result; // [sp+24h] [bp-10h]@9
  int v30; // [sp+30h] [bp-4h]@9

  v4 = this;
  v5 = pvData;
  v4->m_kNextFrameWorkID = LinkFrameWorkID;
  v6 = (int)&v4->m_kProtoNcMapLinkSameCmd;
  *(_DWORD *)v6 = *v5;
  *(_DWORD *)(v6 + 4) = v5[1];
  *(_WORD *)(v6 + 8) = *((_WORD *)v5 + 4);
  v4->m_bLinkSameServer = 1;
  v4->m_kNextFrameWorkMsg.m_uiFramelParam = (unsigned int)&v4->m_kProtoNcMapLinkSameCmd.mapid;
  v4->m_kNextFrameWorkMsg.m_uiFrameWParam = 1;
  PgFrameWork::PostFrameMsgPop((PgFrameWork *)&v4->vfptr, LinkFrameWorkID, &v4->m_kNextFrameWorkMsg);
  v7 = v4->m_pkPrivateStoreWin;
  v8 = 0;
  if ( v7 && (unsigned __int8)((int (*)(void))v7->vfptr[65].__vecDelDtor)() )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkPrivateStoreWin->vfptr);
  MiniMapWin::ClearWithOutMainChar(v4->m_pkMiniMapWin);
  MiniMapWin::ClearParty(v4->m_pkMiniMapWin);
  MiniMapWin::RemoveAllMapMark(v4->m_pkMiniMapWin);
  MiniMapWin::RemoveAllKQTeamMark(v4->m_pkMiniMapWin);
  CastingProgressWin::CastingFail(v4->m_pkCastingProgressBar);
  v4->m_kSkillCasting.eState = 0;
  if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[20].Deaffect)() )
    Char::Shape_UnMetamorphosis(g_pkMainChar, 0);
  PkRealTiemRankWin::Close(v4->m_pkKQPKRealTimeRankWin, 0);
  PkKqRankingWin::Clear(v4->m_pkPkKqRankingWin);
  ((void (__stdcall *)(_DWORD))v4->m_pkPkKqRankingWin->vfptr[64].__vecDelDtor)(0);
  GameFrameWork::CloseMapLinkGateWin(v4);
  if ( v4->m_kCharMover.m_bAutoRun )
    KeyboardMoveProcess::SetAutoRun(&v4->m_kCharMover, 0);
  GameFrameWork::Stick(v4, 0, 0);
  if ( nowState )
  {
    v9 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
    v30 = 0;
    LOBYTE(a2) = MHDiceGameTask::IsDicegamePlaying(v9);
    v30 = -1;
    if ( result.m_pObject )
    {
      v8 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v8 )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      }
    }
    if ( (_BYTE)a2 )
    {
      LOWORD(pvData) = 7312;
      v10 = MHDiceGameTask::GetDiceGameTask(&v28)->m_pObject;
      v30 = 1;
      MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_LEAVE_ACK(v10, (PROTO_NC_DICE_TAISAI_GAME_LEAVE_ACK *)&pvData);
      v30 = -1;
      if ( v28.m_pObject )
      {
        v8 = v28.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&v28.m_pObject->m_uiRefCount) )
        {
          if ( v8 )
            v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
        }
      }
    }
    GameFrameWork::CloseMHInfoWin(v4, 1);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkMHMouseControlWin->vfptr);
  }
  v11 = GuildTask::GetGTTDiceWin();
  if ( (unsigned __int8)((int (__thiscall *)(GTTDiceWin *))v11->vfptr[65].__vecDelDtor)(v11) )
  {
    v12 = GuildTask::GetGTTDiceWin();
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v12->vfptr);
  }
  v13 = GuildTask::GetGuildTournamentScheduleWin();
  if ( (unsigned __int8)((int (__thiscall *)(GuildTournamentScheduleWin *))v13->vfptr[65].__vecDelDtor)(v13) )
  {
    v14 = GuildTask::GetGuildTournamentScheduleWin();
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v14->vfptr);
  }
  v15 = GuildTask::GetGuildNpcMenuWin();
  if ( (unsigned __int8)((int (__thiscall *)(GuildNpcMenuWin *))v15->vfptr[65].__vecDelDtor)(v15) )
  {
    v16 = GuildTask::GetGuildNpcMenuWin();
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v16->vfptr);
  }
  v17 = GuildTask::GetGuildTournamnetBaseWin();
  if ( (unsigned __int8)((int (__thiscall *)(GuildTournamentBaseWin *))v17->vfptr[65].__vecDelDtor)(v17) )
  {
    v18 = GuildTask::GetGuildTournamnetBaseWin();
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v18->vfptr);
  }
  MiniMapWin::ShowGTQuit(v4->m_pkMiniMapWin, 0);
  v19 = GuildTask::GetGTStatusWin();
  if ( (unsigned __int8)((int (__thiscall *)(GTStatusWin *))v19->vfptr[65].__vecDelDtor)(v19) )
  {
    v20 = GuildTask::GetGTStatusWin();
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v20->vfptr);
  }
  v21 = GuildTask::GetGTStatusMiniWin();
  if ( (unsigned __int8)((int (__thiscall *)(GTStatusMiniWin *))v21->vfptr[65].__vecDelDtor)(v21) )
  {
    v22 = GuildTask::GetGTStatusMiniWin();
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v22->vfptr);
  }
  MachineOpt::SaveUserInfo(a2, (int)v8);
  v23 = v4->m_pkRemainAnnounceWin;
  if ( v23 )
    AnnounceWin::KillNoticing(v23);
  if ( v4->m_pkIDTimeWin )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkIDTimeWin->vfptr);
  v24 = v4->m_spCamEffect.m_pObject;
  if ( v24 )
    CameraEffect::ClearMove(v24);
  CNSTimer_Interval::ReSet(&stru_A96B34, Timer::ms_fCurTime);
  unk_A96B31 = 0;
  EffectMgr::RemoveAllClientEff(&g_kEffectMgr);
  v25 = v4->m_pkMarketSearchWin;
  if ( v25 )
  {
    MarketSearchWin::CloseSearchingMsgBox(v25);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkMarketSearchWin->vfptr);
  }
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkEventTimeWin->vfptr);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkEventRankWin->vfptr);
  v26 = v4->m_pkMiniMapWin;
  if ( v26 )
    MiniMapWin::NotViewInDunLevelFlag(v26);
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004A3C20) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_MAP_FREEPKZONE_OFF_CMD(int iRevBytes, void *pvData)
{
  BYTE3(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) &= 0xFDu;
  return iRevBytes;
}

//----- (004A3C40) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_MAP_PARTYBATTLEZONE_OFF_CMD(int iRevBytes, void *pvData)
{
  BYTE3(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) &= 0xFEu;
  return iRevBytes;
}

//----- (004A3C60) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_MAP_KQTEAMBATTLEZONE_ON_CMD(int iRevBytes, void *pvData)
{
  BYTE3(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) |= 4u;
  return iRevBytes;
}

//----- (004A3C80) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_MAP_KQTEAMBATTLEZONE_OFF_CMD(int iRevBytes, void *pvData)
{
  BYTE3(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) &= 0xFBu;
  return iRevBytes;
}

//----- (004A3CA0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BRIEFINFO_LOGINCHARACTER_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // ebx@1
  Char *v4; // esi@5
  NiPoint3 *v5; // eax@6
  int v6; // eax@7
  _BYTE ST10_12_7[12]; // ST10_12@7
  _BYTE v8[12]; // ST04_12@7
  unsigned __int16 charID_16; // ST20_2@19
  Effect *v10; // eax@19
  Name5 ST10_20_24; // ST10_20@24
  CClientGuildAcademy *v12; // eax@24
  unsigned int dwDummy; // [sp+20h] [bp-8h]@22

  v3 = this;
  if ( !unk_A96B31 && *((_BYTE *)pvData + 32) )
  {
    if ( g_pkMainChar->m_kHandle != *(_WORD *)pvData )
      CharMgr::AddChar(&g_kCharMgr, (PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *)pvData, 0);
    v4 = GameFrameWork::GetCharByHandle(v3, *(_WORD *)pvData, 7, 6);
    if ( v4 )
    {
      v5 = (NiPoint3 *)((int (__thiscall *)(Char *))v4->vfptr[6].Deaffect)(v4);
      if ( MainChar::IsView((MainChar *)g_pkMainChar, v5) )
      {
        v6 = ((int (__thiscall *)(Char *))v4->vfptr[6].Deaffect)(v4);
        *(_QWORD *)ST10_12_7 = *(_QWORD *)&NiPoint3::UNIT_Y.x;
        *(float *)&ST10_12_7[8] = NiPoint3::UNIT_Y.z;
        *(_DWORD *)v8 = *(_DWORD *)v6;
        *(_QWORD *)&v8[4] = *(_QWORD *)(v6 + 4);
        EffectMgr::CreateEffect(
          &g_kEffectMgr,
          "Regen",
          *(NiPoint3 *)v8,
          *(NiPoint3 *)ST10_12_7,
          Timer::ms_fCurTime,
          1.0);
      }
      v4->m_kCharShape.m_bAutoPickItem = *((_BYTE *)pvData + 200) != 0;
      if ( Char::GetClass(v4) == 4
        || Char::GetClass(v4) == 5
        || Char::GetClass(v4) == 9
        || Char::GetClass(v4) == 10
        || Char::GetClass(v4) == 14
        || Char::GetClass(v4) == 15
        || Char::GetClass(v4) == 19
        || Char::GetClass(v4) == 20
        || Char::GetClass(v4) == 24
        || Char::GetClass(v4) == 25
        || Char::GetClass(v4) == 27 )
      {
        charID_16 = v4->m_kHandle;
        v4->m_iCharLevel = *((_BYTE *)pvData + 201);
        v10 = EffectMgr::FindAuraEffect(&g_kEffectMgr, charID_16);
        if ( v10 )
          EffectMgr::RemoveEffect(&g_kEffectMgr, v10);
        if ( *((_BYTE *)pvData + 201) < 0x78u )
          EffectMgr::CreateAttachEffect(&g_kEffectMgr, &dwDummy, "Aura100", v4, None, Timer::ms_fCurTime, 1, 1, 0, 1);
        else
          EffectMgr::CreateAttachEffect(&g_kEffectMgr, &dwDummy, "Aura120", v4, None, Timer::ms_fCurTime, 1, 1, 0, 1);
      }
      *(_QWORD *)&ST10_20_24.n5_name[0] = *(_QWORD *)((char *)pvData + 2);
      *(_QWORD *)&ST10_20_24.n5_code[2] = *(_QWORD *)((char *)pvData + 10);
      ST10_20_24.n5_code[4] = *(_DWORD *)((char *)pvData + 18);
      v12 = GuildAcademyTask::GetGuildAcademy();
      if ( (unsigned __int8)CClientGuildAcademy::IsGuildAcademyMaster(v12, ST10_20_24) && g_pkMainChar != v4 )
        GuildAcademyTask::CreateGuildacademyMasterEffect(v4);
    }
    if ( *((_BYTE *)pvData + 237) != 2 )
      MiniMapWin::AddKQTeamMark(v3->m_pkMiniMapWin, *(_WORD *)pvData);
  }
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004A3EF0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BRIEFINFO_CHARACTER_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  signed int v3; // ebx@2
  char *v4; // edi@3
  Char *v5; // eax@4
  Char *v6; // esi@4
  unsigned __int16 v7; // ax@16
  Effect *v8; // eax@16
  _BYTE ST10_20_21[20]; // ST10_20@21
  CClientGuildAcademy *v10; // eax@21
  GameFrameWork *v12; // [sp+20h] [bp-8h]@1
  unsigned int dwDummy; // [sp+24h] [bp-4h]@19

  v12 = this;
  if ( !unk_A96B31 )
  {
    CharMgr::AddChar(&g_kCharMgr, (PROTO_NC_BRIEFINFO_CHARACTER_CMD *)pvData);
    v3 = 0;
    if ( *(_BYTE *)pvData )
    {
      v4 = (char *)pvData + 202;
      do
      {
        v5 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)(v4 - 201));
        v6 = v5;
        if ( v5 )
        {
          if ( Char::GetClass(v5) == 4
            || Char::GetClass(v6) == 5
            || Char::GetClass(v6) == 9
            || Char::GetClass(v6) == 10
            || Char::GetClass(v6) == 14
            || Char::GetClass(v6) == 15
            || Char::GetClass(v6) == 19
            || Char::GetClass(v6) == 20
            || Char::GetClass(v6) == 24
            || Char::GetClass(v6) == 25
            || Char::GetClass(v6) == 27 )
          {
            v7 = v6->m_kHandle;
            v6->m_iCharLevel = (unsigned __int8)*v4;
            v8 = EffectMgr::FindAuraEffect(&g_kEffectMgr, v7);
            if ( v8 )
              EffectMgr::RemoveEffect(&g_kEffectMgr, v8);
            if ( (unsigned __int8)*v4 < 0x78u )
              EffectMgr::CreateAttachEffect(
                &g_kEffectMgr,
                &dwDummy,
                "Aura100",
                v6,
                None,
                Timer::ms_fCurTime,
                1,
                1,
                0,
                1);
            else
              EffectMgr::CreateAttachEffect(
                &g_kEffectMgr,
                &dwDummy,
                "Aura120",
                v6,
                None,
                Timer::ms_fCurTime,
                1,
                1,
                0,
                1);
          }
          *(_DWORD *)ST10_20_21 = *(_DWORD *)(v4 - 199);
          *(_DWORD *)&ST10_20_21[4] = *(_DWORD *)(v4 - 195);
          *(_DWORD *)&ST10_20_21[8] = *(_DWORD *)(v4 - 191);
          *(_DWORD *)&ST10_20_21[12] = *(_DWORD *)(v4 - 187);
          *(_DWORD *)&ST10_20_21[16] = *(_DWORD *)(v4 - 183);
          v10 = GuildAcademyTask::GetGuildAcademy();
          if ( (unsigned __int8)CClientGuildAcademy::IsGuildAcademyMaster(v10, *(Name5 *)ST10_20_21)
            && g_pkMainChar != v6 )
          {
            GuildAcademyTask::CreateGuildacademyMasterEffect(v6);
          }
          if ( v6->m_byKQTeamType != 2 )
            MiniMapWin::AddKQTeamMark(v12->m_pkMiniMapWin, v6->m_kHandle);
        }
        ++v3;
        v4 += 239;
      }
      while ( v3 < *(_BYTE *)pvData );
    }
  }
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004A40C0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BRIEFINFO_CHANGEDECORATE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  Char *v3; // eax@1
  Char *v4; // esi@1
  Effect *v5; // eax@3

  v3 = GameFrameWork::GetCharByHandle(this, *(_WORD *)pvData, 7, 2);
  v4 = v3;
  if ( v3 )
  {
    v3->m_kCharShape.m_uiEquipPos = *((_BYTE *)pvData + 4);
    Char::Equip(v3, *((_WORD *)pvData + 1));
    if ( *((_BYTE *)pvData + 4) == 17 )
    {
      v5 = EffectMgr::FindAuraEffect(&g_kEffectMgr, v4->m_kHandle);
      if ( v5 )
        v5->vfptr[21].__vecDelDtor((NiRefObject *)v5, 0);
    }
  }
  return iRevBytes;
}

//----- (004A4130) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BRIEFINFO_CHANGEUPGRADE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  Char *v3; // eax@1
  Char *v4; // edi@1

  v3 = GameFrameWork::GetCharByHandle(this, *(_WORD *)pvData, 7, 3);
  v4 = v3;
  if ( v3 )
  {
    v3->m_kCharShape.m_uiEquipPos = *((_BYTE *)pvData + 5);
    CharShape::Equip(&v3->m_kCharShape, *((_WORD *)pvData + 1), *((_BYTE *)pvData + 4));
    Char::Equip(v4, *((_WORD *)pvData + 1), *((_BYTE *)pvData + 4));
  }
  return iRevBytes;
}

//----- (004A4190) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BRIEFINFO_CHANGEWEAPON_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  void *v3; // ebx@1
  Char *v4; // eax@1
  Char *v5; // esi@1
  int v6; // edi@3
  int v7; // edx@3
  int *v8; // eax@5
  int v9; // eax@6
  int v10; // eax@8
  char *v11; // eax@9
  CharInfoWin *v13; // ecx@12
  GameFrameWork *v14; // [sp+Ch] [bp-4h]@1

  v3 = pvData;
  v14 = this;
  v4 = GameFrameWork::GetCharByHandle(this, *(_WORD *)pvData, 7, 5);
  v5 = v4;
  if ( v4 )
  {
    Char::Equip(v4, *((_WORD *)v3 + 1), *((_BYTE *)v3 + 4));
    if ( v5->m_uiCurrCharTitleType == 10 )
    {
      v6 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      v7 = *(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      pvData = (void *)*((_WORD *)v3 + 1);
      if ( (unsigned __int8)(*(int (__thiscall **)(int, void *))(v7 + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              pvData) )
      {
        if ( (unsigned __int16)pvData <= *(_WORD *)(v6 + 200) )
        {
          v8 = (int *)(*(_DWORD *)(v6 + 196) + 4 * (unsigned __int16)pvData);
          if ( *v8 )
          {
            v9 = *v8;
            if ( v9 )
            {
              if ( *(_DWORD *)(v9 + 102) == 5 )
              {
                v10 = *((_WORD *)v3 + 3);
                if ( (_WORD)v10 == -1 )
                {
                  if ( v5->m_uiCurrCharTitleType == 10 )
                  {
                    Char::SetCharTitleUse(v5, 0);
                    v13 = v14->m_pkCharInfoWin;
                    if ( v13 )
                    {
                      LOWORD(pvData) = 0;
                      CharInfoWin::SetCharTitleCurrentInfo(v13, (CHARTITLE_BRIEFINFO *)&pvData);
                    }
                  }
                }
                else
                {
                  v11 = WeaponTitleTab::GetWeaponTitleStringByLevel(v10, *((_BYTE *)v3 + 8));
                  if ( v11 )
                  {
                    Char::SetCharTitleName(v5, v11);
                    Char::SetCharTitleUse(v5, 1);
                    return iRevBytes;
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  return iRevBytes;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (004A42A0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BRIEFINFO_UNEQUIP_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  _BYTE *v3; // ebx@1
  GameFrameWork *v4; // edi@1
  Char *v5; // eax@1
  Char *v6; // esi@1
  char *v7; // eax@4
  CharInfoWin *v8; // ecx@5
  Effect *v9; // eax@9

  v3 = pvData;
  v4 = this;
  v5 = GameFrameWork::GetCharByHandle(this, *(_WORD *)pvData, 7, 4);
  v6 = v5;
  if ( v5 )
  {
    Char::UnEquip(v5, v3[2]);
    if ( v6->m_uiCurrCharTitleType == 10 )
    {
      if ( v3[2] == 12 )
      {
        v7 = CCharacterTitleData::GetTitleString(&g_characterTitleData, 0, 0);
        Char::SetCharTitleName(v6, v7);
        Char::SetCharTitleUse(v6, 0);
      }
      v8 = v4->m_pkCharInfoWin;
      if ( v8 )
      {
        LOWORD(pvData) = 0;
        CharInfoWin::SetCharTitleCurrentInfo(v8, (CHARTITLE_BRIEFINFO *)&pvData);
      }
    }
  }
  if ( v3[2] == 17 && v6->vfptr[20].IsVisible((AbStateInfectee *)v6) >= 100 )
  {
    v9 = EffectMgr::FindAuraEffect(&g_kEffectMgr, v6->m_kHandle);
    if ( v9 )
      v9->vfptr[21].__vecDelDtor((NiRefObject *)v9, 1u);
  }
  return iRevBytes;
}

//----- (004A4360) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_BRIEFINFO_MAGICFIELDSPREAD_CMD(int iRevBytes, void *pvData)
{
  int v3; // esi@1
  int v4; // edi@1
  int v5; // esi@2
  int *v6; // eax@5
  Char *v7; // eax@8
  NiPoint3 *v8; // eax@11
  int result; // eax@11

  v3 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  v4 = *((_WORD *)pvData + 2);
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                          v4) )
  {
    if ( (unsigned __int16)v4 <= *(_WORD *)(v3 + 200) )
    {
      v6 = (int *)(*(_DWORD *)(v3 + 196) + 4 * v4);
      if ( *v6 )
        v5 = *v6;
      else
        v5 = 0;
    }
    else
    {
      v5 = 0;
    }
  }
  else
  {
    v5 = 0;
  }
  v7 = CharMgr::GetChar(&g_kCharMgr, *((_WORD *)pvData + 1));
  if ( v5 && v7 && *(_DWORD *)(v5 + 531) == 66 )
  {
    v8 = (NiPoint3 *)((int (__thiscall *)(Char *))v7->vfptr[6].DeleteAbStateByAbstateIndex)(v7);
    MagicField::AddMagicField((PROTO_NC_BRIEFINFO_MAGICFIELDSPREAD_CMD *)pvData, v8, 1);
    result = iRevBytes;
  }
  else
  {
    MagicField::AddMagicField((PROTO_NC_BRIEFINFO_MAGICFIELDSPREAD_CMD *)pvData, &NiPoint3::UNIT_Y, 0);
    result = iRevBytes;
  }
  return result;
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (004A4410) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_BRIEFINFO_BUILDDOOR_CMD(int iRevBytes, void *pvData)
{
  int v3; // edx@3
  int v4; // ecx@3
  int v5; // eax@3
  int v6; // edx@3
  char v7; // al@3
  int v8; // ecx@3
  int v9; // edx@3
  char szBlockName[33]; // [sp+4h] [bp-28h]@3

  if ( g_pkMainChar->m_kHandle != *(_WORD *)pvData )
    CharMgr::AddMob(&g_kCharMgr, (PROTO_NC_BRIEFINFO_BUILDDOOR_CMD *)pvData);
  v3 = *(_DWORD *)((char *)pvData + 14);
  v4 = *(_DWORD *)((char *)pvData + 22);
  *(_DWORD *)&szBlockName[4] = *(_DWORD *)((char *)pvData + 18);
  *(_DWORD *)&szBlockName[16] = *(_DWORD *)((char *)pvData + 30);
  v5 = *(_DWORD *)((char *)pvData + 42);
  *(_DWORD *)szBlockName = v3;
  v6 = *(_DWORD *)((char *)pvData + 26);
  *(_DWORD *)&szBlockName[28] = v5;
  v7 = *((_BYTE *)pvData + 13);
  *(_DWORD *)&szBlockName[8] = v4;
  v8 = *(_DWORD *)((char *)pvData + 34);
  *(_DWORD *)&szBlockName[12] = v6;
  v9 = *(_DWORD *)((char *)pvData + 38);
  *(_DWORD *)&szBlockName[20] = v8;
  *(_DWORD *)&szBlockName[24] = v9;
  szBlockName[32] = 0;
  if ( v7 )
  {
    if ( (unsigned __int8)(v7 - 1) <= 1u )
      World::SetSubBlockData(&g_kWorld, szBlockName, 0);
  }
  else
  {
    World::SetSubBlockData(&g_kWorld, szBlockName, 1);
  }
  return iRevBytes;
}

//----- (004A44B0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_BRIEFINFO_DOOR_CMD(int iRevBytes, void *pvData)
{
  signed int v3; // edi@1
  char *v4; // esi@2
  int v5; // ecx@3
  int v6; // edx@3
  int v7; // eax@3
  int v8; // ecx@3
  int v9; // edx@3
  char v10; // al@3
  int v11; // ecx@3
  int v12; // edx@3
  char szBlockName[33]; // [sp+8h] [bp-28h]@3

  v3 = 0;
  if ( *(_BYTE *)pvData )
  {
    v4 = (char *)pvData + 23;
    do
    {
      CharMgr::AddMob(&g_kCharMgr, (PROTO_NC_BRIEFINFO_BUILDDOOR_CMD *)(v4 - 22));
      v5 = *((_DWORD *)v4 - 2);
      v6 = *((_DWORD *)v4 - 1);
      *(_DWORD *)&szBlockName[8] = *(_DWORD *)v4;
      v7 = *((_DWORD *)v4 + 3);
      *(_DWORD *)szBlockName = v5;
      v8 = *((_DWORD *)v4 + 1);
      *(_DWORD *)&szBlockName[4] = v6;
      v9 = *((_DWORD *)v4 + 2);
      *(_DWORD *)&szBlockName[20] = v7;
      v10 = *(v4 - 9);
      *(_DWORD *)&szBlockName[12] = v8;
      v11 = *((_DWORD *)v4 + 4);
      *(_DWORD *)&szBlockName[16] = v9;
      v12 = *((_DWORD *)v4 + 5);
      *(_DWORD *)&szBlockName[24] = v11;
      *(_DWORD *)&szBlockName[28] = v12;
      szBlockName[32] = 0;
      if ( v10 )
      {
        if ( (unsigned __int8)(v10 - 1) <= 1u )
          World::SetSubBlockData(&g_kWorld, szBlockName, 0);
      }
      else
      {
        World::SetSubBlockData(&g_kWorld, szBlockName, 1);
      }
      ++v3;
      v4 += 48;
    }
    while ( v3 < *(_BYTE *)pvData );
  }
  return iRevBytes;
}

//----- (004A4560) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ACT_SOMEONECHAT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  Char *v4; // eax@1
  Char *v5; // ebx@1
  char *v6; // eax@2
  ChatBlockListWin *v7; // eax@2
  ChatBlockListWin *v8; // eax@3
  PROTO_CHAT_RESTRICT_INFO *v9; // eax@3
  SHINE_ITEM_STRUCT *v10; // ebx@6
  unsigned __int8 v11; // al@9
  int v12; // ST1C_4@12
  int v13; // ST1C_4@13
  char v14; // al@14
  __int16 v15; // cx@15
  int nitemDataCnt; // [sp+Ch] [bp-2B8h]@5
  Char *pkChar; // [sp+10h] [bp-2B4h]@1
  Name5 pCharID; // [sp+14h] [bp-2B0h]@2
  int v20; // [sp+28h] [bp-29Ch]@6
  Name5 kCharID; // [sp+2Ch] [bp-298h]@2
  char chRemoveColorText[256]; // [sp+40h] [bp-284h]@23
  char acText[256]; // [sp+140h] [bp-184h]@11
  char acStr[128]; // [sp+240h] [bp-84h]@11

  v3 = this;
  v4 = GameFrameWork::GetCharByHandle(this, *(_WORD *)((char *)pvData + 1), 8, 2);
  v5 = v4;
  pkChar = v4;
  if ( v4 )
  {
    v6 = (char *)((int (__thiscall *)(Char *))v4->vfptr[2].DeleteAbStateByAbstateIndex)(v4);
    *(_QWORD *)&kCharID.n5_code[3] = 0i64;
    *(_QWORD *)&kCharID.n5_code[1] = 0i64;
    *(_QWORD *)&kCharID.n5_name[0] = 0i64;
    strncpy(kCharID.n5_name, v6, 0x14u);
    pCharID.n5_code[2] = kCharID.n5_code[2];
    v7 = v3->m_pkChatBlockListWin;
    *(_QWORD *)&pCharID.n5_name[0] = *(_QWORD *)&kCharID.n5_name[0];
    *(_QWORD *)&pCharID.n5_code[3] = *(_QWORD *)&kCharID.n5_code[3];
    if ( !CChatRestrict::Get(&v7->m_RestrictList, &pCharID)
      || (pCharID.n5_code[2] = kCharID.n5_code[2],
          v8 = v3->m_pkChatBlockListWin,
          *(_QWORD *)&pCharID.n5_name[0] = *(_QWORD *)&kCharID.n5_name[0],
          *(_QWORD *)&pCharID.n5_code[3] = *(_QWORD *)&kCharID.n5_code[3],
          (v9 = CChatRestrict::Get(&v8->m_RestrictList, &pCharID)) != 0)
      && v9->bIsGM == 1 )
    {
      nitemDataCnt = *(_BYTE *)pvData;
      if ( nitemDataCnt > 0 )
      {
        v10 = (SHINE_ITEM_STRUCT *)((char *)pvData + *((_BYTE *)pvData + 3) + 7);
        v20 = *(_BYTE *)pvData;
        do
        {
          GameFrameWork::AddSChatItemLink(v3, 1, v10);
          ++v10;
          --v20;
        }
        while ( v20 );
        v5 = pkChar;
      }
      v11 = *((_BYTE *)pvData + 3);
      if ( v11 && v11 <= 0x80u )
      {
        memset(acStr, 0, 0x80u);
        strncpy(acStr, (char *)pvData + 7, *((_BYTE *)pvData + 3));
        acStr[*((_BYTE *)pvData + 3)] = 0;
        memset(acText, 0, 0x100u);
        if ( v5 == g_pkMainChar )
        {
          v12 = ((int (__thiscall *)(Char *))v5->vfptr[2].DeleteAbStateByAbstateIndex)(v5);
          sprintf(acText, "[%s] : %s", v12, acStr);
        }
        else
        {
          v13 = ((int (__thiscall *)(Char *))v5->vfptr[2].DeleteAbStateByAbstateIndex)(v5);
          sprintf(acText, "{color,#FFFF00,[%s]} : %s", v13, acStr);
        }
        v14 = *((_BYTE *)pvData + 4);
        if ( v14 & 2 )
        {
          v15 = *(_WORD *)((char *)pvData + 1);
          if ( v14 & 1 )
          {
            if ( v15 == g_pkMainChar->m_kHandle )
              GameFrameWork::AddGMUserChat(v3, acText);
            else
              GameFrameWork::AddGMOtherUserChat(v3, acText);
          }
          else if ( v15 == g_pkMainChar->m_kHandle )
          {
            GameFrameWork::AddUserChat(v3, acText, *((_BYTE *)pvData + 5));
          }
          else
          {
            GameFrameWork::AddOtherUserChat(v3, acText, *((_BYTE *)pvData + 5));
          }
        }
        if ( nitemDataCnt )
        {
          memset(chRemoveColorText, 0, 0x100u);
          GameFrameWork::RemoveColorText(acStr, chRemoveColorText, 0);
          ScreenBDMgr::AddSpeechBD(
            &g_kScrnBDMgr,
            v5->m_kHandle,
            chRemoveColorText,
            *((_BYTE *)pvData + 5),
            *((_BYTE *)pvData + 6));
        }
        else
        {
          ScreenBDMgr::AddSpeechBD(&g_kScrnBDMgr, v5->m_kHandle, acStr, *((_BYTE *)pvData + 5), *((_BYTE *)pvData + 6));
        }
      }
    }
  }
  return iRevBytes;
}

//----- (004A4870) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ACT_SOMEONESHOUT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  SHINE_ITEM_STRUCT *v4; // ebx@2
  unsigned __int8 v5; // cl@4
  int v6; // ebx@7
  int v7; // edx@7
  int *v8; // eax@9
  int v9; // ebx@10
  char *v10; // eax@11
  char *v11; // eax@11
  Char *v12; // eax@11
  ChatBlockListWin *v13; // eax@13
  ChatBlockListWin *v14; // eax@14
  PROTO_CHAT_RESTRICT_INFO *v15; // eax@14
  Char *v16; // eax@19
  Char *v17; // esi@19
  _BYTE v19[20]; // [sp-18h] [bp-2F0h]@16
  int nitemDataCnt; // [sp+Ch] [bp-2CCh]@1
  Name5 pCharID; // [sp+10h] [bp-2C8h]@13
  int v22; // [sp+24h] [bp-2B4h]@2
  Name5 talker; // [sp+28h] [bp-2B0h]@13
  char dst; // [sp+3Ch] [bp-29Ch]@16
  char chRemoveColorText[256]; // [sp+13Ch] [bp-19Ch]@11
  char acStr[128]; // [sp+23Ch] [bp-9Ch]@11
  char acName[21]; // [sp+2BCh] [bp-1Ch]@13

  v3 = this;
  nitemDataCnt = *(_BYTE *)pvData;
  if ( nitemDataCnt > 0 )
  {
    v4 = (SHINE_ITEM_STRUCT *)((char *)pvData + *((_BYTE *)pvData + 22) + 23);
    v22 = *(_BYTE *)pvData;
    do
    {
      GameFrameWork::AddSChatItemLink(v3, 2, v4);
      ++v4;
      --v22;
    }
    while ( v22 );
  }
  v5 = *((_BYTE *)pvData + 22);
  if ( v5 && v5 <= 0x80u )
  {
    if ( *((_BYTE *)pvData + 21) & 2 )
    {
      v6 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
      v7 = *(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
      v22 = *(_WORD *)((char *)pvData + 1);
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(v7 + 16))(ITableBase<MobInfo,MobInfoTab>::ms_pkTable, v22) )
      {
        if ( (unsigned __int16)v22 <= *(_WORD *)(v6 + 200) )
        {
          v8 = (int *)(*(_DWORD *)(v6 + 196) + 4 * (unsigned __int16)v22);
          if ( *v8 )
          {
            v9 = *v8;
            if ( *v8 )
            {
              memset(acStr, 0, 0x80u);
              strncpy(acStr, (char *)pvData + 23, *((_BYTE *)pvData + 22));
              acStr[*((_BYTE *)pvData + 22)] = 0;
              memset(chRemoveColorText, 0, 0x100u);
              sprintf(chRemoveColorText, "[%s] : %s", v9 + 34, acStr);
              v10 = fs("%s", chRemoveColorText);
              ChatDisplayWin2::AddShoutChat(v3->m_pkChatDisplayWin, v10);
              v11 = fs("%s", chRemoveColorText);
              ChatDisplayWin::AddShoutChat((ChatDisplayWin *)&v3->m_pkSysMsgDisplayWin->vfptr, v11);
              v12 = CharMgr::GetChar(&g_kCharMgr, (char *)(v9 + 34));
              if ( v12 )
                ScreenBDMgr::AddSpeechBD(&g_kScrnBDMgr, v12->m_kHandle, acStr);
            }
          }
        }
      }
    }
    else
    {
      *(_QWORD *)&talker.n5_code[3] = 0i64;
      *(_QWORD *)&talker.n5_code[1] = 0i64;
      *(_QWORD *)&talker.n5_name[0] = 0i64;
      strncpy(talker.n5_name, (char *)pvData + 1, 0x14u);
      *(Name5 *)acName = talker;
      pCharID = talker;
      v13 = v3->m_pkChatBlockListWin;
      acName[20] = 0;
      if ( !CChatRestrict::Get(&v13->m_RestrictList, &pCharID)
        || (pCharID.n5_code[2] = talker.n5_code[2],
            v14 = v3->m_pkChatBlockListWin,
            *(_QWORD *)&pCharID.n5_name[0] = *(_QWORD *)&talker.n5_name[0],
            *(_QWORD *)&pCharID.n5_code[3] = *(_QWORD *)&talker.n5_code[3],
            (v15 = CChatRestrict::Get(&v14->m_RestrictList, &pCharID)) != 0)
        && v15->bIsGM == 1 )
      {
        memset(acStr, 0, 0x80u);
        strncpy(acStr, (char *)pvData + 23, *((_BYTE *)pvData + 22));
        acStr[*((_BYTE *)pvData + 22)] = 0;
        memset(&dst, 0, 0x100u);
        sprintf(&dst, "[%s] : %s", acName, acStr);
        *(_QWORD *)v19 = *(_QWORD *)&talker.n5_name[0];
        *(_QWORD *)&v19[8] = *(_QWORD *)&talker.n5_code[2];
        *(_DWORD *)&v19[16] = talker.n5_code[4];
        if ( *((_BYTE *)pvData + 21) & 1 )
          GameFrameWork::AddGMShoutChat(v3, *(Name5 *)v19, acStr);
        else
          GameFrameWork::AddShoutChat(v3, *(Name5 *)v19, acStr);
        v16 = CharMgr::GetChar(&g_kCharMgr, acName);
        v17 = v16;
        if ( v16 )
        {
          if ( nitemDataCnt )
          {
            memset(chRemoveColorText, 0, 0x100u);
            GameFrameWork::RemoveColorText(acStr, chRemoveColorText, 0);
            ScreenBDMgr::AddSpeechBD(&g_kScrnBDMgr, v17->m_kHandle, chRemoveColorText);
          }
          else
          {
            ScreenBDMgr::AddSpeechBD(&g_kScrnBDMgr, v16->m_kHandle, acStr);
          }
        }
      }
    }
  }
  return iRevBytes;
}
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;

//----- (004A4C50) --------------------------------------------------------
int __userpurge GameFrameWork::On_NC_ACT_SOMEONEMOVEWALK_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<ebx>, int a3@<esi>, int iRevBytes, void *pvData)
{
  _WORD *v5; // edi@1
  Char *v6; // eax@2
  Char *v7; // esi@2
  int v8; // eax@4
  double v9; // st7@4
  float v10; // ecx@4
  float v11; // edx@4
  float v12; // eax@4
  unsigned int *v13; // ebx@4
  int v14; // ecx@4
  int v15; // edx@6
  double v16; // st7@6
  int v17; // eax@8
  double v18; // st7@8
  int v19; // ecx@10
  double v20; // st7@10
  AbStateInfecteeVtbl *v21; // edi@16
  float v22; // ST14_4@16
  float fY; // ST0C_4@17
  float fX; // ST08_4@17
  int v26; // [sp+14h] [bp-4Ch]@2
  NiPoint3 kPos; // [sp+1Ch] [bp-44h]@17
  NiPoint3 pos3From; // [sp+28h] [bp-38h]@10
  NiPoint3 pos3To; // [sp+34h] [bp-2Ch]@6
  float v30; // [sp+40h] [bp-20h]@12
  float v31; // [sp+44h] [bp-1Ch]@12
  float v32; // [sp+48h] [bp-18h]@12
  NiPoint3 pos3Cur; // [sp+4Ch] [bp-14h]@4
  unsigned int *v34; // [sp+58h] [bp-8h]@6
  float fGapLength; // [sp+5Ch] [bp-4h]@12
  float fMoveLengtha; // [sp+6Ch] [bp+Ch]@12
  float fMoveLengthb; // [sp+6Ch] [bp+Ch]@12
  float fMoveLengthc; // [sp+6Ch] [bp+Ch]@12
  float fMoveLength; // [sp+6Ch] [bp+Ch]@12

  v5 = pvData;
  if ( g_pkMainChar->m_kHandle != *(_WORD *)pvData )
  {
    v26 = a3;
    v6 = GameFrameWork::GetCharByHandle(this, *(_WORD *)pvData, 8, 24);
    v7 = v6;
    if ( v6 )
    {
      Char::ClearTraceMove(v6);
      if ( !(unsigned __int8)((int (__thiscall *)(Char *))v7->vfptr[10].Affect)(v7) )
      {
        v8 = ((int (__thiscall *)(Char *, int, int))v7->vfptr[6].Deaffect)(v7, a2, v26);
        v9 = (double)*(signed int *)((char *)pvData + 10);
        v10 = *(float *)v8;
        v11 = *(float *)(v8 + 4);
        v12 = *(float *)(v8 + 8);
        v13 = (unsigned int *)((char *)pvData + 10);
        pos3Cur.x = v10;
        v14 = *(_DWORD *)((char *)pvData + 10);
        pos3Cur.y = v11;
        pos3Cur.z = v12;
        if ( v14 < 0 )
          v9 = v9 + 4294967300.0;
        v15 = *(_DWORD *)((char *)pvData + 14);
        pos3To.x = v9;
        v16 = (double)*(signed int *)((char *)pvData + 14);
        v34 = (unsigned int *)((char *)pvData + 14);
        if ( v15 < 0 )
          v16 = v16 + 4294967300.0;
        v17 = *(_DWORD *)((char *)pvData + 2);
        pos3To.y = v16;
        v18 = (double)*(signed int *)((char *)pvData + 2);
        if ( v17 < 0 )
          v18 = v18 + 4294967300.0;
        v19 = *(_DWORD *)((char *)pvData + 6);
        pos3From.x = v18;
        v20 = (double)*(signed int *)((char *)pvData + 6);
        if ( v19 < 0 )
          v20 = v20 + 4294967300.0;
        pos3From.y = v20;
        v30 = pos3Cur.x - pos3To.x;
        v31 = pos3Cur.y - pos3To.y;
        v32 = pos3Cur.z - pos3Cur.z;
        fMoveLengtha = v31 * v31 + v30 * v30 + v32 * v32;
        fMoveLengthb = sqrt(fMoveLengtha);
        fGapLength = fMoveLengthb;
        v30 = pos3From.x - pos3To.x;
        v31 = pos3From.y - pos3To.y;
        v32 = pos3Cur.z - pos3Cur.z;
        fMoveLengthc = v31 * v31 + v30 * v30 + v32 * v32;
        fMoveLength = sqrt(fMoveLengthc);
        if ( 0.0 != fGapLength && fMoveLength != 0.0 && v5[9] )
        {
          ((void (__thiscall *)(Char *))v7->vfptr[8].Deaffect)(v7);
        }
        else
        {
          v21 = v7->vfptr;
          v22 = Char::GetDefWalkSpeed();
          ((void (__thiscall *)(Char *))v21[8].Deaffect)(v7);
        }
        fX = (double)*v13;
        fY = (double)*v34;
        World::GetAdvGroundPos(&g_kWorld, fX, fY, &kPos);
        if ( !((int (__thiscall *)(Char *))v7->vfptr[7].Affect)(v7) )
        {
          v7->vfptr[7].SetAbStateProperty((AbStateInfectee *)v7, (ABSTATEINDEX)&kPos, 0, (int)&Char::INVALIDPOINT3);
          return iRevBytes;
        }
        ((void (__thiscall *)(Char *))v7->vfptr[7].Deaffect)(v7);
        ((void (__thiscall *)(Char *, NiPoint3 *, signed int, NiColor *, signed int))v7->vfptr[7].SetAbStateProperty)(
          v7,
          &kPos,
          1,
          &Char::INVALIDPOINT3,
          1);
      }
    }
  }
  return iRevBytes;
}
// 4A4C50: could not find valid save-restore pair for esi

//----- (004A4EB0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ACT_SOMEONECHANGEMODE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  Char *v3; // eax@1

  v3 = GameFrameWork::GetCharByHandle(this, *(_WORD *)pvData, 8, 9);
  if ( v3 && v3->m_byMode != *((_BYTE *)pvData + 2) )
    Char::SetMode(v3, *((_BYTE *)pvData + 2));
  return iRevBytes;
}

//----- (004A4EF0) --------------------------------------------------------
void __thiscall GameFrameWork::AddWhisperList(GameFrameWork *this, Name5 shinCharID)
{
  GameFrameWork *v2; // esi@1
  char v3; // cl@1
  signed int v4; // ebx@25
  int v5; // edi@25
  int v6; // eax@33
  char dest[4]; // [sp+Ch] [bp-18h]@26
  int v8; // [sp+10h] [bp-14h]@26
  int v9; // [sp+14h] [bp-10h]@26
  int v10; // [sp+18h] [bp-Ch]@26
  int v11; // [sp+1Ch] [bp-8h]@26

  v2 = this;
  v3 = 0;
  if ( *(_QWORD *)&v2->m_CharList[0].n5_name[0] == *(_QWORD *)&shinCharID.n5_name[0]
    && *(_QWORD *)&v2->m_CharList[0].n5_code[2] == *(_QWORD *)&shinCharID.n5_code[2]
    && v2->m_CharList[0].n5_code[4] == shinCharID.n5_code[4] )
  {
    v3 = 1;
  }
  if ( *(_QWORD *)&v2->m_CharList[1].n5_name[0] == *(_QWORD *)&shinCharID.n5_name[0]
    && *(_QWORD *)&v2->m_CharList[1].n5_code[2] == *(_QWORD *)&shinCharID.n5_code[2]
    && v2->m_CharList[1].n5_code[4] == shinCharID.n5_code[4] )
  {
    v3 = 1;
  }
  if ( *(_QWORD *)&v2->m_CharList[2].n5_name[0] == *(_QWORD *)&shinCharID.n5_name[0]
    && *(_QWORD *)&v2->m_CharList[2].n5_code[2] == *(_QWORD *)&shinCharID.n5_code[2]
    && v2->m_CharList[2].n5_code[4] == shinCharID.n5_code[4] )
  {
    v3 = 1;
  }
  if ( *(_QWORD *)&v2->m_CharList[3].n5_name[0] == *(_QWORD *)&shinCharID.n5_name[0]
    && *(_QWORD *)&v2->m_CharList[3].n5_code[2] == *(_QWORD *)&shinCharID.n5_code[2]
    && v2->m_CharList[3].n5_code[4] == shinCharID.n5_code[4] )
  {
    v3 = 1;
  }
  if ( *(_QWORD *)&v2->m_CharList[4].n5_name[0] == *(_QWORD *)&shinCharID.n5_name[0]
    && *(_QWORD *)&v2->m_CharList[4].n5_code[2] == *(_QWORD *)&shinCharID.n5_code[2]
    && v2->m_CharList[4].n5_code[4] == shinCharID.n5_code[4] )
  {
    v3 = 1;
  }
  if ( (*(_QWORD *)&v2->m_CharList[5].n5_name[0] != *(_QWORD *)&shinCharID.n5_name[0]
     || *(_QWORD *)&v2->m_CharList[5].n5_code[2] != *(_QWORD *)&shinCharID.n5_code[2]
     || v2->m_CharList[5].n5_code[4] != shinCharID.n5_code[4])
    && !v3 )
  {
    v4 = 0;
    v5 = (int)&v2->m_CharList[0].n5_code[2];
    do
    {
      v11 = 0;
      v10 = 0;
      v9 = 0;
      v8 = 0;
      *(_DWORD *)dest = 0;
      strncpy(dest, byte_981D96, 0x14u);
      if ( *(_DWORD *)(v5 - 8) == *(_DWORD *)dest
        && *(_DWORD *)(v5 - 4) == v8
        && *(_DWORD *)v5 == v9
        && *(_DWORD *)(v5 + 4) == v10
        && *(_DWORD *)(v5 + 8) == v11 )
      {
        v6 = (int)&v2->m_CharList[v4];
        *(_QWORD *)v6 = *(_QWORD *)&shinCharID.n5_name[0];
        *(_QWORD *)(v6 + 8) = *(_QWORD *)&shinCharID.n5_code[2];
        *(_DWORD *)(v6 + 16) = shinCharID.n5_code[4];
        return;
      }
      ++v4;
      v5 += 20;
    }
    while ( v4 < 6 );
    v2->m_CharList[0].n5_code[0] = v2->m_CharList[1].n5_code[0];
    v2->m_CharList[0].n5_code[1] = v2->m_CharList[1].n5_code[1];
    v2->m_CharList[0].n5_code[2] = v2->m_CharList[1].n5_code[2];
    v2->m_CharList[0].n5_code[3] = v2->m_CharList[1].n5_code[3];
    v2->m_CharList[0].n5_code[4] = v2->m_CharList[1].n5_code[4];
    v2->m_CharList[1].n5_code[0] = v2->m_CharList[2].n5_code[0];
    v2->m_CharList[1].n5_code[1] = v2->m_CharList[2].n5_code[1];
    v2->m_CharList[1].n5_code[2] = v2->m_CharList[2].n5_code[2];
    v2->m_CharList[1].n5_code[3] = v2->m_CharList[2].n5_code[3];
    v2->m_CharList[1].n5_code[4] = v2->m_CharList[2].n5_code[4];
    v2->m_CharList[2].n5_code[0] = v2->m_CharList[3].n5_code[0];
    v2->m_CharList[2].n5_code[1] = v2->m_CharList[3].n5_code[1];
    v2->m_CharList[2].n5_code[2] = v2->m_CharList[3].n5_code[2];
    v2->m_CharList[2].n5_code[3] = v2->m_CharList[3].n5_code[3];
    v2->m_CharList[2].n5_code[4] = v2->m_CharList[3].n5_code[4];
    v2->m_CharList[3].n5_code[0] = v2->m_CharList[4].n5_code[0];
    v2->m_CharList[3].n5_code[1] = v2->m_CharList[4].n5_code[1];
    v2->m_CharList[3].n5_code[2] = v2->m_CharList[4].n5_code[2];
    v2->m_CharList[3].n5_code[3] = v2->m_CharList[4].n5_code[3];
    v2->m_CharList[3].n5_code[4] = v2->m_CharList[4].n5_code[4];
    v2->m_CharList[4].n5_code[0] = v2->m_CharList[5].n5_code[0];
    v2->m_CharList[4].n5_code[1] = v2->m_CharList[5].n5_code[1];
    v2->m_CharList[4].n5_code[2] = v2->m_CharList[5].n5_code[2];
    v2->m_CharList[4].n5_code[3] = v2->m_CharList[5].n5_code[3];
    v2->m_CharList[4].n5_code[4] = v2->m_CharList[5].n5_code[4];
    v2->m_CharList[5].n5_code[0] = shinCharID.n5_code[0];
    *(_QWORD *)&v2->m_CharList[5].n5_code[1] = *(_QWORD *)&shinCharID.n5_code[1];
    *(_QWORD *)&v2->m_CharList[5].n5_code[3] = *(_QWORD *)&shinCharID.n5_code[3];
  }
}

//----- (004A5240) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ACT_PARTYCHAT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // ebx@1
  SHINE_ITEM_STRUCT *v4; // edi@4
  int v5; // ebx@4
  int v6; // edx@7
  int v7; // ecx@7
  int v8; // eax@7
  int v9; // ecx@7
  unsigned int v10; // eax@7
  int v11; // edx@7
  unsigned int v12; // eax@7
  unsigned int v13; // edx@7
  ChatBlockListWin *v14; // eax@7
  unsigned int v15; // edx@7
  unsigned int v16; // ecx@8
  unsigned int v17; // edx@8
  unsigned int v18; // eax@8
  ChatBlockListWin *v19; // eax@8
  PROTO_CHAT_RESTRICT_INFO *v20; // eax@8
  _BYTE v21[20]; // ST00_20@11
  _BYTE v22[20]; // ST00_20@12
  Name5 pCharID; // [sp+Ch] [bp-B8h]@7
  GameFrameWork *v25; // [sp+20h] [bp-A4h]@1
  char acStr[129]; // [sp+24h] [bp-A0h]@7
  char acName[21]; // [sp+A8h] [bp-1Ch]@7

  v3 = this;
  v25 = this;
  if ( *((_BYTE *)pvData + 21) > 0x80u )
    *((_BYTE *)pvData + 21) = -128;
  if ( (signed int)*((_BYTE *)pvData + 20) > 0 )
  {
    v4 = (SHINE_ITEM_STRUCT *)((char *)pvData + *((_BYTE *)pvData + 21) + 22);
    v5 = *((_BYTE *)pvData + 20);
    do
    {
      GameFrameWork::AddSChatItemLink(v25, 16, v4);
      ++v4;
      --v5;
    }
    while ( v5 );
    v3 = v25;
  }
  strncpy(acStr, (char *)pvData + 22, *((_BYTE *)pvData + 21));
  v6 = *((_BYTE *)pvData + 21);
  v7 = *((_DWORD *)pvData + 1);
  *(_DWORD *)acName = *(_DWORD *)pvData;
  v8 = *((_DWORD *)pvData + 3);
  *(_DWORD *)&acName[4] = v7;
  v9 = *((_DWORD *)pvData + 4);
  *(_DWORD *)&acName[12] = v8;
  v10 = *((_DWORD *)pvData + 1);
  acStr[v6] = 0;
  v11 = *((_DWORD *)pvData + 2);
  *(_DWORD *)&acName[16] = v9;
  *(_QWORD *)&pCharID.n5_code[1] = __PAIR__(*((_DWORD *)pvData + 2), v10);
  v12 = *((_DWORD *)pvData + 4);
  *(_DWORD *)&acName[8] = v11;
  v13 = *(_DWORD *)pvData;
  pCharID.n5_code[4] = v12;
  v14 = v3->m_pkChatBlockListWin;
  pCharID.n5_code[0] = v13;
  v15 = *((_DWORD *)pvData + 3);
  acName[20] = 0;
  pCharID.n5_code[3] = v15;
  if ( !CChatRestrict::Get(&v14->m_RestrictList, &pCharID)
    || (v16 = *((_DWORD *)pvData + 2),
        v17 = *(_DWORD *)pvData,
        pCharID.n5_code[1] = *((_DWORD *)pvData + 1),
        v18 = *((_DWORD *)pvData + 4),
        pCharID.n5_code[2] = v16,
        pCharID.n5_code[4] = v18,
        v19 = v3->m_pkChatBlockListWin,
        pCharID.n5_code[0] = v17,
        pCharID.n5_code[3] = *((_DWORD *)pvData + 3),
        (v20 = CChatRestrict::Get(&v19->m_RestrictList, &pCharID)) != 0)
    && v20->bIsGM == 1 )
  {
    if ( !strcmp(acName, (const char *)((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)()) )
    {
      *(_DWORD *)v21 = *(_DWORD *)pvData;
      *(_QWORD *)&v21[4] = *(_QWORD *)((char *)pvData + 4);
      *(_QWORD *)&v21[12] = *(_QWORD *)((char *)pvData + 12);
      GameFrameWork::AddPartyChat(v3, *(Name5 *)v21, acStr);
    }
    else
    {
      *(_DWORD *)v22 = *(_DWORD *)pvData;
      *(_QWORD *)&v22[4] = *(_QWORD *)((char *)pvData + 4);
      *(_QWORD *)&v22[12] = *(_QWORD *)((char *)pvData + 12);
      GameFrameWork::AddOtherPartyChat(v3, *(Name5 *)v22, acStr);
    }
  }
  return iRevBytes;
}

//----- (004A5430) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_GUILD_CHAT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // ebx@1
  SHINE_ITEM_STRUCT *v4; // edi@5
  int v5; // ebx@5
  int v6; // ecx@8
  int v7; // edx@8
  int v8; // eax@8
  int v9; // ecx@8
  int v10; // edx@9
  int v11; // eax@9
  ChatBlockListWin *v12; // ecx@9
  PROTO_CHAT_RESTRICT_INFO *v13; // eax@9
  _BYTE v14[20]; // ST00_20@12
  _BYTE v15[20]; // ST00_20@13
  char dest[4]; // [sp+Ch] [bp-B8h]@8
  int v18; // [sp+10h] [bp-B4h]@8
  int v19; // [sp+14h] [bp-B0h]@8
  int v20; // [sp+18h] [bp-ACh]@8
  int v21; // [sp+1Ch] [bp-A8h]@8
  GameFrameWork *v22; // [sp+20h] [bp-A4h]@1
  char acStr[129]; // [sp+24h] [bp-A0h]@8
  char acName[21]; // [sp+A8h] [bp-1Ch]@8

  v3 = this;
  v22 = this;
  if ( *((_BYTE *)pvData + 25) > 0x80u )
    *((_BYTE *)pvData + 25) = -128;
  if ( *(_DWORD *)pvData == g_pkMainChar->m_dwGuildRegNum )
  {
    if ( (signed int)*((_BYTE *)pvData + 24) > 0 )
    {
      v4 = (SHINE_ITEM_STRUCT *)((char *)pvData + *((_BYTE *)pvData + 25) + 26);
      v5 = *((_BYTE *)pvData + 24);
      do
      {
        GameFrameWork::AddSChatItemLink(v22, 32, v4);
        ++v4;
        --v5;
      }
      while ( v5 );
      v3 = v22;
    }
    strncpy(acStr, (char *)pvData + 26, *((_BYTE *)pvData + 25));
    v6 = *((_DWORD *)pvData + 1);
    v7 = *((_DWORD *)pvData + 2);
    acStr[*((_BYTE *)pvData + 25)] = 0;
    v8 = *((_DWORD *)pvData + 3);
    *(_DWORD *)acName = v6;
    v9 = *((_DWORD *)pvData + 4);
    *(_DWORD *)&acName[8] = v8;
    *(_DWORD *)&acName[12] = v9;
    *(_DWORD *)&acName[4] = v7;
    *(_DWORD *)&acName[16] = *((_DWORD *)pvData + 5);
    acName[20] = 0;
    v21 = 0;
    v20 = 0;
    v19 = 0;
    v18 = 0;
    *(_DWORD *)dest = 0;
    strncpy(dest, acName, 0x14u);
    if ( !CChatRestrict::Get(&v3->m_pkChatBlockListWin->m_RestrictList, (Name5 *)dest)
      || (v10 = *((_DWORD *)pvData + 3),
          v11 = *((_DWORD *)pvData + 1),
          v18 = *((_DWORD *)pvData + 2),
          v21 = *((_DWORD *)pvData + 5),
          v12 = v3->m_pkChatBlockListWin,
          v19 = v10,
          *(_DWORD *)dest = v11,
          v20 = *((_DWORD *)pvData + 4),
          (v13 = CChatRestrict::Get(&v12->m_RestrictList, (Name5 *)dest)) != 0)
      && v13->bIsGM == 1 )
    {
      if ( !strcmp(acName, (const char *)((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)()) )
      {
        *(_DWORD *)v14 = *((_DWORD *)pvData + 1);
        *(_QWORD *)&v14[4] = *((_QWORD *)pvData + 1);
        *(_QWORD *)&v14[12] = *((_QWORD *)pvData + 2);
        GameFrameWork::AddGuildChat(v3, *(Name5 *)v14, acStr);
      }
      else
      {
        *(_DWORD *)v15 = *((_DWORD *)pvData + 1);
        *(_QWORD *)&v15[4] = *((_QWORD *)pvData + 1);
        *(_QWORD *)&v15[12] = *((_QWORD *)pvData + 2);
        GameFrameWork::AddOtherGuildChat(v3, *(Name5 *)v15, acStr);
      }
    }
  }
  return iRevBytes;
}

//----- (004A5640) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_GUILD_ACADEMY_CHAT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // eax@1
  SHINE_ITEM_STRUCT *v4; // edi@2
  int v5; // ebx@2
  int v6; // edx@7
  int v7; // eax@7
  int v8; // ecx@7
  int v9; // edx@7
  GameFrameWork *v10; // edi@7
  int v11; // ecx@8
  int v12; // edx@8
  int v13; // eax@8
  ChatBlockListWin *v14; // eax@8
  PROTO_CHAT_RESTRICT_INFO *v15; // eax@8
  _BYTE v16[20]; // ST00_20@11
  _BYTE v17[20]; // ST00_20@12
  char dest[4]; // [sp+Ch] [bp-B8h]@7
  int v20; // [sp+10h] [bp-B4h]@7
  int v21; // [sp+14h] [bp-B0h]@7
  int v22; // [sp+18h] [bp-ACh]@7
  int v23; // [sp+1Ch] [bp-A8h]@7
  GameFrameWork *v24; // [sp+20h] [bp-A4h]@1
  char acStr[129]; // [sp+24h] [bp-A0h]@7
  char acName[21]; // [sp+A8h] [bp-1Ch]@7

  v3 = *((_BYTE *)pvData + 24);
  v24 = this;
  if ( v3 > 0 )
  {
    v4 = (SHINE_ITEM_STRUCT *)((char *)pvData + *((_BYTE *)pvData + 25) + 26);
    v5 = v3;
    do
    {
      GameFrameWork::AddSChatItemLink(v24, 4096, v4);
      ++v4;
      --v5;
    }
    while ( v5 );
  }
  if ( *((_BYTE *)pvData + 25) > 0x80u )
    *((_BYTE *)pvData + 25) = -128;
  if ( *(_DWORD *)pvData == g_pkMainChar->m_dwGuildRegNum )
  {
    strncpy(acStr, (char *)pvData + 26, *((_BYTE *)pvData + 25));
    v6 = *((_DWORD *)pvData + 1);
    v7 = *((_DWORD *)pvData + 2);
    acStr[*((_BYTE *)pvData + 25)] = 0;
    v8 = *((_DWORD *)pvData + 3);
    *(_DWORD *)acName = v6;
    v9 = *((_DWORD *)pvData + 4);
    *(_DWORD *)&acName[8] = v8;
    *(_DWORD *)&acName[12] = v9;
    *(_DWORD *)&acName[4] = v7;
    *(_DWORD *)&acName[16] = *((_DWORD *)pvData + 5);
    acName[20] = 0;
    v23 = 0;
    v22 = 0;
    v21 = 0;
    v20 = 0;
    *(_DWORD *)dest = 0;
    strncpy(dest, acName, 0x14u);
    v10 = v24;
    if ( !CChatRestrict::Get(&v24->m_pkChatBlockListWin->m_RestrictList, (Name5 *)dest)
      || (v11 = *((_DWORD *)pvData + 3),
          v12 = *((_DWORD *)pvData + 1),
          v20 = *((_DWORD *)pvData + 2),
          v13 = *((_DWORD *)pvData + 5),
          v21 = v11,
          v23 = v13,
          v14 = v10->m_pkChatBlockListWin,
          *(_DWORD *)dest = v12,
          v22 = *((_DWORD *)pvData + 4),
          (v15 = CChatRestrict::Get(&v14->m_RestrictList, (Name5 *)dest)) != 0)
      && v15->bIsGM == 1 )
    {
      if ( !strcmp(acName, (const char *)((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)()) )
      {
        *(_DWORD *)v16 = *((_DWORD *)pvData + 1);
        *(_QWORD *)&v16[4] = *((_QWORD *)pvData + 1);
        *(_QWORD *)&v16[12] = *((_QWORD *)pvData + 2);
        GameFrameWork::AddGuildAcademyChat(v10, *(Name5 *)v16, acStr);
      }
      else
      {
        *(_DWORD *)v17 = *((_DWORD *)pvData + 1);
        *(_QWORD *)&v17[4] = *((_QWORD *)pvData + 1);
        *(_QWORD *)&v17[12] = *((_QWORD *)pvData + 2);
        GameFrameWork::AddOtherGuildAcademyChat(v10, *(Name5 *)v17, acStr);
      }
    }
  }
  return iRevBytes;
}

//----- (004A5850) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ACT_SOMEONEEMOTICON_CMD(int iRevBytes, void *pvData)
{
  Char *v3; // ebx@1
  int v4; // edi@2
  int v5; // esi@2
  int v6; // edx@4
  _BYTE *v7; // eax@5

  v3 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  if ( v3 )
  {
    v4 = *((_BYTE *)pvData + 2);
    v5 = ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable
                                                          + 16))(
                            ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable,
                            v4) )
    {
      if ( (unsigned __int16)v4 <= *(_WORD *)(v5 + 200) )
      {
        v6 = *(_DWORD *)(v5 + 196);
        if ( *(_DWORD *)(v6 + 4 * v4) )
        {
          v7 = *(_BYTE **)(v6 + 4 * v4);
          if ( v7 )
            ((void (__thiscall *)(Char *, _DWORD))v3->vfptr[14].Deaffect)(v3, *v7);
        }
      }
    }
  }
  return iRevBytes;
}
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;

//----- (004A58C0) --------------------------------------------------------
int __userpurge GameFrameWork::On_NC_ACT_SOMEONEEMOTICONSTOP_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<edi>, int iRevBytes, void *pvData)
{
  Char *v4; // eax@1
  Char *v5; // ebx@1
  int v6; // ST0C_4@3
  int v7; // edi@3
  int v8; // esi@3
  _BYTE *v9; // eax@4
  int v10; // edx@6
  int v11; // ST0C_4@8
  void *pvDataa; // [sp+24h] [bp+Ch]@8

  v4 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  v5 = v4;
  if ( v4 && v4 != g_pkMainChar )
  {
    v6 = a2;
    v7 = *((_BYTE *)pvData + 2);
    v8 = ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int, int))(*(_DWORD *)ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable
                                                               + 16))(
                            ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable,
                            v7,
                            v6)
      && (unsigned __int16)v7 <= *(_WORD *)(v8 + 200)
      && (v10 = *(_DWORD *)(v8 + 196), *(_DWORD *)(v10 + 4 * v7)) )
    {
      v9 = *(_BYTE **)(v10 + 4 * v7);
    }
    else
    {
      v9 = 0;
    }
    v11 = *v9;
    ((void (__thiscall *)(Char *))v5->vfptr[14].Deaffect)(v5);
    *(float *)&pvDataa = (double)*(_WORD *)((char *)pvData + 3) / 1000.0;
    ((void (__thiscall *)(Char *, signed int, void *))v5->vfptr[14].IsVisible)(v5, 1, pvDataa);
  }
  return iRevBytes;
}
// 4A58C0: could not find valid save-restore pair for edi
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;

//----- (004A5970) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ACT_SOMEONERIDE_ON_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  Char *v3; // eax@1
  Char *v4; // esi@1
  int v5; // eax@2
  _BYTE v6[12]; // ST10_12@2
  _BYTE v7[12]; // ST04_12@2

  v3 = GameFrameWork::GetCharByHandle(this, *(_WORD *)pvData, 8, 64);
  v4 = v3;
  if ( v3 )
  {
    Char::RidePet(v3, *((_WORD *)pvData + 1));
    Char::SetMode(v4, 6);
    v5 = ((int (__thiscall *)(Char *))v4->vfptr[6].Deaffect)(v4);
    *(float *)v6 = NiPoint3::UNIT_Y.x;
    *(_QWORD *)&v6[4] = *(_QWORD *)&NiPoint3::UNIT_Y.y;
    *(_DWORD *)v7 = *(_DWORD *)v5;
    *(_QWORD *)&v7[4] = *(_QWORD *)(v5 + 4);
    EffectMgr::CreateEffect(&g_kEffectMgr, "Pet_St01", *(NiPoint3 *)v7, *(NiPoint3 *)v6, Timer::ms_fCurTime, 1.0);
  }
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004A5A10) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ACT_RIDE_OFF_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  int v4; // eax@2
  _BYTE v5[12]; // ST10_12@2
  _BYTE v6[12]; // ST04_12@2

  v3 = this;
  if ( g_pkMainChar )
  {
    Char::GetoutOfPet(g_pkMainChar);
    Char::SetMode(g_pkMainChar, 1);
    v4 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
    *(float *)v5 = NiPoint3::UNIT_Y.x;
    *(_QWORD *)&v5[4] = *(_QWORD *)&NiPoint3::UNIT_Y.y;
    *(_DWORD *)v6 = *(_DWORD *)v4;
    *(_QWORD *)&v6[4] = *(_QWORD *)(v4 + 4);
    EffectMgr::CreateEffect(&g_kEffectMgr, "Pet_Fi01", *(NiPoint3 *)v6, *(NiPoint3 *)v5, Timer::ms_fCurTime, 1.0);
  }
  GameFrameWork::CloseRidePetWin(v3);
  GameFrameWork::ChangeRun();
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004A5AB0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ACT_SOMEONERIDE_OFF_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  Char *v3; // eax@1
  Char *v4; // esi@1
  int v5; // eax@2
  _BYTE v6[12]; // ST10_12@2
  _BYTE v7[12]; // ST04_12@2

  v3 = GameFrameWork::GetCharByHandle(this, *(_WORD *)pvData, 8, 67);
  v4 = v3;
  if ( v3 )
  {
    Char::GetoutOfPet(v3);
    Char::SetMode(v4, 1);
    v5 = ((int (__thiscall *)(Char *))v4->vfptr[6].Deaffect)(v4);
    *(float *)v6 = NiPoint3::UNIT_Y.x;
    *(_QWORD *)&v6[4] = *(_QWORD *)&NiPoint3::UNIT_Y.y;
    *(_DWORD *)v7 = *(_DWORD *)v5;
    *(_QWORD *)&v7[4] = *(_QWORD *)(v5 + 4);
    EffectMgr::CreateEffect(&g_kEffectMgr, "Pet_Fi01", *(NiPoint3 *)v7, *(NiPoint3 *)v6, Timer::ms_fCurTime, 1.0);
  }
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004A5B50) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_SOMEONELEVELUP_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  CharDeadEvent_SomeoneLevelUp *v4; // eax@1
  unsigned __int16 v5; // ST20_2@3
  Char *v6; // eax@3
  Char *v7; // esi@3
  unsigned int dwDummy; // [sp+20h] [bp-14h]@16
  CharDeadEvent_SomeoneLevelUp *v10; // [sp+24h] [bp-10h]@1
  int v11; // [sp+30h] [bp-4h]@1

  v3 = this;
  v4 = (CharDeadEvent_SomeoneLevelUp *)operator new(0x14u);
  v10 = v4;
  v11 = 0;
  if ( v4 )
    CharDeadEvent_SomeoneLevelUp::CharDeadEvent_SomeoneLevelUp(
      v4,
      (PgFrameWork *)&v3->vfptr,
      (PROTO_NC_BAT_SUMEONELEVELUP_CMD *)pvData);
  v5 = *(_WORD *)pvData;
  v11 = -1;
  v6 = CharMgr::GetChar(&g_kCharMgr, v5);
  v7 = v6;
  if ( v6
    && v6->vfptr[20].IsVisible((AbStateInfectee *)v6) == 120
    && (Char::GetClass(v7) == 4
     || Char::GetClass(v7) == 5
     || Char::GetClass(v7) == 9
     || Char::GetClass(v7) == 10
     || Char::GetClass(v7) == 14
     || Char::GetClass(v7) == 15
     || Char::GetClass(v7) == 19
     || Char::GetClass(v7) == 20
     || Char::GetClass(v7) == 24
     || Char::GetClass(v7) == 25
     || Char::GetClass(g_pkMainChar) == 27) )
  {
    EffectMgr::CreateAttachEffect(&g_kEffectMgr, &dwDummy, "Aura120", v7, None, Timer::ms_fCurTime, 1, 1, 0, 1);
  }
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004A5C90) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_SKILLBASH_HIT_BLAST_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // ebx@1
  Char *v4; // eax@1
  Char *v5; // esi@1
  signed int v6; // esi@5
  int v7; // edi@5
  ActiveSkillInfo *v8; // eax@7
  ShortCutWin **v9; // ebx@12
  ShortCutWin **v10; // esi@16
  signed int v11; // ebx@16
  GameFrameWork *v13; // [sp+18h] [bp-20Ch]@1
  ShortCutWin **v14; // [sp+1Ch] [bp-208h]@12
  char acConversionData1[256]; // [sp+20h] [bp-204h]@7
  char acSkillName[256]; // [sp+120h] [bp-104h]@7

  v3 = this;
  v13 = this;
  v4 = CharMgr::GetChar(&g_kCharMgr, *((_WORD *)pvData + 1));
  v5 = v4;
  if ( v4 )
  {
    AttackSequenceManager::GetSkillDmgInfoSetbyIndex((AttackSequenceManager *)&v4->vfptr, *(_WORD *)pvData);
    if ( v5->m_kHandle == g_pkMainChar->m_kHandle )
    {
      CastingProgressWin::CastingSuccess(v3->m_pkCastingProgressBar);
      Char::SetReserveSkillSmash(g_pkMainChar, 1);
      v6 = 0;
      v3->m_kSkillCasting.eState = 0;
      v7 = *((_WORD *)pvData + 2);
      if ( !AbStateInfectee::FindAbstateInstBySubAbstateType(
              (AbStateInfectee *)&g_pkMainChar->vfptr,
              SUBAB_COOLTIMEREMOVE)
        && (_WORD)v7 != -1 )
      {
        acSkillName[0] = 0;
        memset(&acSkillName[1], 0, 0xFFu);
        acConversionData1[0] = 0;
        memset(&acConversionData1[1], 0, 0xFFu);
        v8 = IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::GetByID(v7);
        if ( v8 )
        {
          sprintf(acSkillName, "%s", v8->InxName);
          strncpy(acConversionData1, acSkillName, strlen(acSkillName) - 2);
          if ( !strcmp(acConversionData1, "GroundStrike") )
            MainChar::EnableAirBorne((MainChar *)g_pkMainChar, 1, v7);
        }
        if ( !ShortCutWin::IsToggleOn(v3->m_pkShortCutWin, v7) && !ShortCutWin::IsToggleOn(v3->m_pkShortCutWinV, v7) )
        {
          v9 = v3->m_pkShortCutSubWinV;
          v14 = v9;
          while ( !ShortCutWin::IsToggleOn(*(v9 - 5), v7) && !ShortCutWin::IsToggleOn(*v9, v7) )
          {
            ++v6;
            ++v9;
            if ( v6 >= 4 )
            {
              Skill::RecordSkillUse(v7, Timer::ms_fCurTime, 0.0, 0.0);
              ShortCutWin::StartSkill(v13->m_pkShortCutWin, v7, Timer::ms_fCurTime);
              ShortCutWin::StartSkill(v13->m_pkShortCutWinV, v7, Timer::ms_fCurTime);
              v10 = v14;
              v11 = 4;
              do
              {
                ShortCutWin::StartSkill(*(v10 - 5), v7, Timer::ms_fCurTime);
                ShortCutWin::StartSkill(*v10, v7, Timer::ms_fCurTime);
                ++v10;
                --v11;
              }
              while ( v11 );
              return iRevBytes;
            }
          }
        }
      }
    }
    else
    {
      Char::SetReserveSkillSmash(v5, 1);
    }
  }
  else
  {
    OutputDebugStringA("haven't char\n");
  }
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004A5F20) --------------------------------------------------------
int __userpurge GameFrameWork::On_NC_BAT_CEASE_FIRE_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<ebx>, int iRevBytes, void *pvData)
{
  Char *v4; // eax@1
  Char *v5; // esi@1

  v4 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  v5 = v4;
  if ( v4 )
  {
    AttackSequenceManager::HardStopAttack((AttackSequenceManager *)&v4->vfptr);
    if ( v5->m_bUserCharacter )
      Char::UpdateWeaponEquipState(v5, a2);
    if ( Char::CheckActState(v5, 300000) )
    {
      ((void (__thiscall *)(Char *))v5->vfptr[10].DeleteAbStateByAbstateIndex)(v5);
      return iRevBytes;
    }
    if ( v5->m_kAbStateProperty.iUnAttackableCount && !Char::IsAbStateAction(v5) )
    {
      if ( (unsigned __int8)((int (__thiscall *)(Char *))v5->vfptr[15].AddAbStateByAbstateIndex)(v5) )
      {
        Char::CancelSkillAction(v5, 1);
        AttackSequenceManager::ApplicateSkillSeqImmediately((AttackSequenceManager *)&v5->vfptr, v5, 1, 0);
        AttackSequenceManager::ApplicateAttackSeqImmediately((AttackSequenceManager *)&v5->vfptr, 1);
      }
    }
  }
  return iRevBytes;
}

//----- (004A5FD0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_SWING_DAMAGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  void *v3; // edi@1
  int v4; // edx@4
  char v5; // cl@8
  int v6; // esi@8
  Char *v7; // eax@17
  GameFrameWork *v8; // ebx@21
  unsigned int v9; // eax@21
  Char *v10; // eax@26
  unsigned __int16 v11; // ax@30
  unsigned __int16 v12; // ax@30
  ShortCutWin **v13; // esi@30
  signed int v14; // edi@30
  unsigned __int16 v15; // ax@31
  unsigned __int16 v16; // ax@31
  GameFrameWork *v18; // [sp+4h] [bp-4h]@1
  Char *pkAttacker; // [sp+14h] [bp+Ch]@3

  v3 = pvData;
  v18 = this;
  if ( g_pkMainChar->m_kHandle == *((_WORD *)pvData + 1) )
    WaitingForLogoutWin::Cancel(this->m_pkWaitingForLogoutWin);
  pkAttacker = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  if ( pkAttacker )
  {
    v4 = *((_WORD *)v3 + 3);
    if ( v4 < 0 )
      v4 = 0;
    if ( v4 & 0xFFFF0000 )
      v4 = (unsigned __int16)v4;
    v5 = *((_BYTE *)v3 + 4);
    v6 = v4 | (*((_DWORD *)v3 + 2) != 0 ? 0 : 2147483648) | ((v5 & 0x80 | ((v5 & 0x48 | 2
                                                                                      * (v5 & 2 | 16
                                                                                                * (v5 & 4 | 8 * (v5 & 1)))) << 9)) << 13);
    if ( v5 & 0x10 && pkAttacker == g_pkMainChar && Inventory::GetEquipedWeaponAcc(&g_kInventory) )
      Inventory::DecreaeWeaponAccCharged(&g_kInventory);
    if ( *((_BYTE *)v3 + 5) & 1 && pkAttacker == g_pkMainChar && Inventory::GetEquipedShieldAcc(&g_kInventory) )
      Inventory::DecreaeShieldAccCharged(&g_kInventory);
    AttackSequenceManager::AddAttMultiDmg(
      (AttackSequenceManager *)&pkAttacker->vfptr,
      *((_BYTE *)v3 + 15),
      *((_BYTE *)v3 + 14),
      v6,
      *((_WORD *)v3 + 1),
      *((_WORD *)v3 + 6),
      *((_DWORD *)v3 + 2),
      1);
    if ( !*((_DWORD *)v3 + 2) )
    {
      v7 = CharMgr::GetChar(&g_kCharMgr, *((_WORD *)v3 + 1));
      if ( v7 )
        v7->m_bWillDead = 1;
    }
    if ( pkAttacker != g_pkMainChar || *((_DWORD *)v3 + 2) )
    {
      v8 = v18;
    }
    else
    {
      v8 = v18;
      v9 = v18->m_uiGuideViewKillCount;
      if ( v9 < 3 )
        v18->m_uiGuideViewKillCount = v9 + 1;
      if ( v18->m_uiGuideViewKillCount == 3 )
      {
        GameFrameWork::OpenPlayGuideWin(v18, BIL_MONSTER_1);
        ++v18->m_uiGuideViewKillCount;
      }
    }
    v10 = CharMgr::GetChar(&g_kCharMgr, *((_WORD *)v3 + 1));
    if ( v10 && v10 == g_pkMainChar && MainChar::IsAirBorneState((MainChar *)g_pkMainChar) && v6 )
    {
      v11 = MainChar::GetAirBorneID((MainChar *)g_pkMainChar);
      ShortCutWin::IsStartCollTime(v8->m_pkShortCutWin, v11);
      v12 = MainChar::GetAirBorneID((MainChar *)g_pkMainChar);
      ShortCutWin::IsStartCollTime(v8->m_pkShortCutWinV, v12);
      v13 = v8->m_pkShortCutSubWinV;
      v14 = 4;
      do
      {
        v15 = MainChar::GetAirBorneID((MainChar *)g_pkMainChar);
        ShortCutWin::IsStartCollTime(*(v13 - 5), v15);
        v16 = MainChar::GetAirBorneID((MainChar *)g_pkMainChar);
        ShortCutWin::IsStartCollTime(*v13, v16);
        ++v13;
        --v14;
      }
      while ( v14 );
    }
  }
  return iRevBytes;
}

//----- (004A6200) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_BAT_SOMEONESWING_DAMAGE_CMD(int iRevBytes, void *pvData)
{
  Char *v3; // eax@1
  Char *v4; // eax@3

  v3 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  if ( v3 )
  {
    AttackSequenceManager::AddAttMultiDmg(
      (AttackSequenceManager *)&v3->vfptr,
      *((_BYTE *)pvData + 12),
      *((_BYTE *)pvData + 11),
      (*(_DWORD *)((char *)pvData + 5) != 0 ? 0 : 2147483648) | ((*((_BYTE *)pvData + 4) & 2 | ((*((_BYTE *)pvData + 4) & 1) << 9)) << 20),
      *((_WORD *)pvData + 1),
      *(_WORD *)((char *)pvData + 9),
      *(_DWORD *)((char *)pvData + 5),
      0);
    if ( !*(_DWORD *)((char *)pvData + 5) )
    {
      v4 = CharMgr::GetChar(&g_kCharMgr, *((_WORD *)pvData + 1));
      if ( v4 )
        v4->m_bWillDead = 1;
    }
  }
  return iRevBytes;
}

//----- (004A6290) --------------------------------------------------------
int __stdcall GameFrameWork::ON_NC_BAT_REALLYKILL_CMD(int iRevBytes, void *pvData)
{
  unsigned __int16 v3; // bx@1
  Char *v4; // esi@1
  Char *v5; // edi@2
  Tutorial *v6; // eax@9

  v3 = *(_WORD *)pvData;
  v4 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  if ( v4 )
  {
    v5 = CharMgr::GetChar(&g_kCharMgr, *((_WORD *)pvData + 1));
    if ( v5 )
    {
      if ( !v4->m_bWillDead || !Char::CheckActState(v4, 500000) )
      {
        if ( Char::ModifyExistDyingSeq(v5, v3) )
          ((void (__thiscall *)(Char *))v4->vfptr[20].Affect)(v4);
      }
      if ( MainChar::GetTargetType((MainChar *)g_pkMainChar, v4) == 3 && v5->m_kHandle == g_pkMainChar->m_kHandle )
      {
        Singleton<Tutorial>::getInstance();
        Tutorial::AddMobKillCount(v6);
        return iRevBytes;
      }
    }
    else
    {
      ((void (__thiscall *)(Char *))v4->vfptr[20].Affect)(v4);
    }
  }
  return iRevBytes;
}

//----- (004A6350) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_BAT_PKINPKFIELD_CLIENT_CMD(int iRevBytes, void *pvData)
{
  if ( *(_WORD *)pvData == g_pkMainChar->m_kHandle )
    User::SetPKCount(&g_kUser, (unsigned int *)pvData + 1);
  return iRevBytes;
}

//----- (004A6380) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_PARTY_JOINPROPOSE_REQ(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  MHDiceGameTask *v4; // ecx@5
  bool v5; // bl@5
  PartyJoinProposeWin *v6; // esi@6
  _BYTE v7[20]; // ST00_20@7
  NiPointer<MHDiceGameTask> result; // [sp+10h] [bp-10h]@5
  int v10; // [sp+1Ch] [bp-4h]@5

  v3 = this;
  if ( g_kParty.m_bDuringJoinPropose != 1 && !g_kParty.m_uiTotalMember )
  {
    if ( byte_B4FF72
      || unk_A96B31
      || (v4 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject,
          v10 = 0,
          v5 = MHDiceGameTask::IsDicegamePlaying(v4),
          v10 = -1,
          NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&result),
          v5) )
    {
      *(_DWORD *)v7 = *(_DWORD *)pvData;
      *(_QWORD *)&v7[4] = *(_QWORD *)((char *)pvData + 4);
      *(_QWORD *)&v7[12] = *(_QWORD *)((char *)pvData + 12);
      GameFrameWork::NcPartyJoinProposeRejectAck(v3, *(Name5 *)v7);
    }
    else
    {
      Party::SetJoinProposeData(&g_kParty, (PROTO_NC_PARTY_JOINPROPOSE_REQ *)pvData);
      v6 = PartyJoinProposeWin::CreateWin((PgFrameWork *)&v3->vfptr);
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v6->vfptr);
      ITimer::SetTimer((ITimer *)&v6->vfptr, 15.0);
    }
  }
  return iRevBytes;
}
// B4FF72: using guessed type char byte_B4FF72;

//----- (004A6480) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_PARTY_MEMBER_LIST_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  PartyWinInterface *v4; // ecx@1
  unsigned int v5; // esi@3
  PartyMemberInfo *v6; // eax@4

  v3 = this;
  Party::SetMemberList(&g_kParty, (PROTO_NC_PARTY_MEMBER_LIST_CMD *)pvData);
  v4 = v3->m_pkPartyWinInterface;
  if ( v4 )
    PartyWinInterface::Update(v4);
  v5 = 0;
  if ( g_kParty.m_uiTotalMember )
  {
    do
    {
      v6 = Party::GetMemberInfo(&g_kParty, v5);
      if ( v6 )
        MiniMapWin::AddParty(v3->m_pkMiniMapWin, v6);
      ++v5;
    }
    while ( v5 < g_kParty.m_uiTotalMember );
  }
  LOWORD(pvData) = 14408;
  PgNet::SendNetMsg((PgNet *)&v3->m_spZoneNet.m_pObject->vfptr, &pvData, 2);
  return iRevBytes;
}

//----- (004A6500) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_PARTY_MEMBERINFORM_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  unsigned int v3; // edi@1
  char *v4; // esi@2
  _BYTE v5[20]; // ST00_20@3
  PartyMemberInfo *v6; // eax@3
  PartyWinInterface *v7; // ecx@4
  GameFrameWork *v9; // [sp+Ch] [bp-8h]@1

  v3 = 0;
  v9 = this;
  if ( *(_BYTE *)pvData )
  {
    v4 = (char *)pvData + 21;
    do
    {
      *(_DWORD *)v5 = *((_DWORD *)v4 - 5);
      *(_DWORD *)&v5[4] = *((_DWORD *)v4 - 4);
      *(_DWORD *)&v5[8] = *((_DWORD *)v4 - 3);
      *(_DWORD *)&v5[12] = *((_DWORD *)v4 - 2);
      *(_DWORD *)&v5[16] = *((_DWORD *)v4 - 1);
      v6 = Party::GetMemberInfo(&g_kParty, *(Name5 *)v5);
      if ( v6 )
      {
        v6->m_iHP = *(_DWORD *)v4;
        v6->m_iSP = *((_DWORD *)v4 + 1);
        v6->m_bShow = 1;
        v6->m_iLP = *((_DWORD *)v4 + 2);
        v7 = v9->m_pkPartyWinInterface;
        if ( v7 )
          PartyWinInterface::Update(v7);
      }
      ++v3;
      v4 += 32;
    }
    while ( v3 < *(_BYTE *)pvData );
  }
  return iRevBytes;
}

//----- (004A65A0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_PARTY_FINDER_ADD_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  int v4; // edi@2
  PgNet *v5; // ecx@2
  __int16 v7; // [sp+4h] [bp-8h]@2
  char v8; // [sp+6h] [bp-6h]@2
  __int16 pdata; // [sp+8h] [bp-4h]@2

  v3 = this;
  if ( PgWin::IsVisible((PgWin *)&this->m_pkPMWin->vfptr) )
  {
    v4 = v3->m_pkPMWin->m_nPageNum;
    pdata = 14420;
    PgNet::AddNetMsg((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, &pdata, 2);
    v5 = (PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr;
    v7 = v4;
    v8 = 20;
    PgNet::SendNetMsg(v5, &v7, 3);
  }
  return iRevBytes;
}

//----- (004A6610) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_PARTY_FINDER_DELETE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  Name5 *v4; // eax@2
  CPartyMatchWin *v5; // ecx@2
  int v6; // edi@3
  PgNet *v7; // ecx@3
  PgNet *v8; // ecx@3
  __int16 pdata; // [sp+4h] [bp-20h]@3
  __int16 v11; // [sp+8h] [bp-1Ch]@3
  char v12; // [sp+Ah] [bp-1Ah]@3
  Name5 id; // [sp+Ch] [bp-18h]@2

  v3 = this;
  if ( *(_WORD *)pvData == 1365 )
  {
    v4 = User::GetMainCharID(&g_kUser);
    *(_QWORD *)&id.n5_name[0] = *(_QWORD *)&v4->n5_code[0];
    *(_QWORD *)&id.n5_code[2] = *(_QWORD *)&v4->n5_code[2];
    v5 = v3->m_pkPMWin;
    id.n5_code[4] = v4->n5_code[4];
    CPartyMatchWin::DelPartyInfo(v5, &id);
    if ( PgWin::IsVisible((PgWin *)&v3->m_pkPMWin->vfptr) )
    {
      v6 = v3->m_pkPMWin->m_nPageNum;
      v7 = (PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr;
      pdata = 14420;
      PgNet::AddNetMsg(v7, &pdata, 2);
      v8 = (PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr;
      v11 = v6;
      v12 = 20;
      PgNet::SendNetMsg(v8, &v11, 3);
    }
  }
  return iRevBytes;
}

//----- (004A66D0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MENU_SHOPOPENTABLE_ITEM_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // esi@1
  int v4; // edi@1
  int v5; // ecx@3
  int v6; // eax@4
  int v7; // eax@5
  GameFrameWork *v9; // [sp+Ch] [bp-4h]@1

  v3 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  v4 = *(_WORD *)((char *)pvData + 5);
  v9 = this;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                          ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                          v4) )
  {
    if ( (unsigned __int16)v4 <= *(_WORD *)(v3 + 200) )
    {
      v5 = *(_DWORD *)(v3 + 196);
      if ( *(_DWORD *)(v5 + 4 * v4) )
      {
        v6 = *(_DWORD *)(v5 + 4 * v4);
        if ( v6 )
        {
          v7 = *(_DWORD *)(v6 + 102);
          if ( v7 == 34 || v7 == 16 )
            Market::SetItemEnchant((PROTO_NC_MENU_SHOPOPENTABLE_CMD *)pvData);
          else
            ItemMarket::SetItem((PROTO_NC_MENU_SHOPOPENTABLE_CMD *)pvData);
          GameFrameWork::OpenItemShopWin(v9, *((_WORD *)pvData + 1));
        }
      }
    }
  }
  return iRevBytes;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (004A6750) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SKILL_REVIVE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  Char *v4; // esi@1
  char v5; // bl@1
  bool (__thiscall *v6)(AbStateInfectee *, ABSTATEINDEX, float, bool); // eax@1
  int v7; // eax@3
  _BYTE v8[12]; // ST10_12@3
  _BYTE v9[12]; // ST04_12@3

  v3 = this;
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkReviveMenuWin->vfptr);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkRebirthMenuWin->vfptr);
  v4 = g_pkMainChar;
  v5 = ((int (*)(void))g_pkMainChar->vfptr[1].AddAbStateByAbstateIndex)();
  v6 = v4->vfptr[1].AddAbStateByAbstateIndex;
  v4->m_byMode = 1;
  v4->m_eStandMode = 0;
  if ( v5 != (unsigned __int8)((int (__thiscall *)(Char *))v6)(v4) )
    v4->m_bIsChangeCampMode = 1;
  ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[4].Affect)(*(_DWORD *)pvData);
  ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[4].IsVisible)(*((_DWORD *)pvData + 1));
  g_pkMainChar->m_bWillDead = 0;
  ((void (*)(void))g_pkMainChar->vfptr[10].DeleteAbStateByAbstateIndex)();
  User::SetHP(&g_kUser, *(_DWORD *)pvData);
  User::SetSP(&g_kUser, *((_DWORD *)pvData + 1));
  v7 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
  *(float *)v8 = NiPoint3::UNIT_Y.x;
  *(_QWORD *)&v8[4] = *(_QWORD *)&NiPoint3::UNIT_Y.y;
  *(_DWORD *)v9 = *(_DWORD *)v7;
  *(_QWORD *)&v9[4] = *(_QWORD *)(v7 + 4);
  EffectMgr::CreateEffect(&g_kEffectMgr, "RevivalTarget", *(NiPoint3 *)v9, *(NiPoint3 *)v8, Timer::ms_fCurTime, 1.0);
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004A6880) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_SKILL_SOMEONEREVIVE_CMD(int iRevBytes, void *pvData)
{
  Char *v3; // eax@1
  Char *v4; // esi@1
  void (__thiscall *v5)(AbStateInfectee *, AbStateInst *, bool); // edx@2
  int v6; // eax@2
  _BYTE v7[12]; // ST10_12@2
  _BYTE v8[12]; // ST04_12@2

  v3 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  v4 = v3;
  if ( v3 )
  {
    Char::SetMode(v3, 1);
    v5 = v4->vfptr[4].Affect;
    v4->m_bWillDead = 0;
    v4->m_bIsRevived = 0;
    ((void (__thiscall *)(Char *, _DWORD))v5)(v4, *(_DWORD *)((char *)pvData + 2));
    ((void (__thiscall *)(Char *, _DWORD))v4->vfptr[4].IsVisible)(v4, *(_DWORD *)((char *)pvData + 6));
    ((void (__thiscall *)(Char *))v4->vfptr[10].DeleteAbStateByAbstateIndex)(v4);
    v6 = ((int (__thiscall *)(Char *))v4->vfptr[6].Deaffect)(v4);
    *(float *)v7 = NiPoint3::UNIT_Y.x;
    *(_QWORD *)&v7[4] = *(_QWORD *)&NiPoint3::UNIT_Y.y;
    *(_DWORD *)v8 = *(_DWORD *)v6;
    *(_QWORD *)&v8[4] = *(_QWORD *)(v6 + 4);
    EffectMgr::CreateEffect(&g_kEffectMgr, "RevivalTarget", *(NiPoint3 *)v8, *(NiPoint3 *)v7, Timer::ms_fCurTime, 1.0);
  }
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004A6950) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_TRADE_DOWNBOARD_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  unsigned int *v4; // eax@1
  InvWin *v5; // ecx@2

  v3 = this;
  v4 = UserTrade::RemoveMy(*(_BYTE *)pvData);
  if ( (unsigned int)v4 < 0xC0 )
  {
    v5 = v3->m_pkInventoryWin->m_apkInvWin[(_DWORD)v4];
    if ( v5 )
      InvWin::SetLock(v5, 0);
  }
  return iRevBytes;
}

//----- (004A6990) --------------------------------------------------------
void __thiscall GameFrameWork::CleanUpTrade(GameFrameWork *this)
{
  GameFrameWork *v1; // edi@1
  unsigned int v2; // esi@1
  unsigned int *v3; // eax@3
  InvWin *v4; // ecx@4

  v1 = this;
  v2 = 0;
  do
  {
    if ( UserTrade::GetMy(v2) )
    {
      v3 = UserTrade::GetMyInvIndex(v2);
      if ( (unsigned int)v3 < 0xC0 )
      {
        v4 = v1->m_pkInventoryWin->m_apkInvWin[(_DWORD)v3];
        if ( v4 )
          InvWin::SetLock(v4, 0);
      }
    }
    ++v2;
  }
  while ( v2 < 0xC );
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkUserTradeWin->vfptr);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkInventoryWin->vfptr);
  UserTrade::SetTrading(0);
  UserTrade::Clear();
}

//----- (004A6A10) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_SOULSTONE_HP_BUY_ACK(int iRevBytes, void *pvData)
{
  Tutorial *v3; // eax@1
  Tutorial *v4; // eax@2
  SoundIndex rkIndex; // [sp+4h] [bp-14h]@1
  int v7; // [sp+14h] [bp-4h]@2

  User::SetHPStone(&g_kUser, *(_WORD *)pvData);
  rkIndex.m_dwIndex = 16;
  rkIndex.m_acFilename = 0;
  SoundGroupStatic::PlaySoundA((SoundGroupStatic *)&g_kSoundMgr.m_pkInterfaceGroup->vfptr, &rkIndex, 0, 0);
  v3 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v4 = (Tutorial *)operator new(0xB4u);
    v7 = 0;
    if ( v4 )
      Tutorial::Tutorial(v4);
    else
      v3 = 0;
    Singleton<Tutorial>::m_pInstance = v3;
  }
  v3->m_bBuyStone = 1;
  return iRevBytes;
}

//----- (004A6AC0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_SOULSTONE_SP_BUY_ACK(int iRevBytes, void *pvData)
{
  SoundIndex rkIndex; // [sp+0h] [bp-8h]@1

  User::SetSPStone(&g_kUser, *(_WORD *)pvData);
  rkIndex.m_dwIndex = 16;
  rkIndex.m_acFilename = 0;
  SoundGroupStatic::PlaySoundA((SoundGroupStatic *)&g_kSoundMgr.m_pkInterfaceGroup->vfptr, &rkIndex, 0, 0);
  return iRevBytes;
}

//----- (004A6B10) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_FRIEND_LOGOUT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  _BYTE v4[20]; // ST00_20@1
  _BYTE v5[20]; // ST00_20@1

  v3 = this;
  *(_DWORD *)v4 = *(_DWORD *)pvData;
  *(_QWORD *)&v4[4] = *(_QWORD *)((char *)pvData + 4);
  *(_QWORD *)&v4[12] = *(_QWORD *)((char *)pvData + 12);
  FriendWin::LogoutFriend(this->m_pkFriendWin, *(Name5 *)v4);
  *(_DWORD *)v5 = *(_DWORD *)pvData;
  *(_QWORD *)&v5[4] = *(_QWORD *)((char *)pvData + 4);
  *(_QWORD *)&v5[12] = *(_QWORD *)((char *)pvData + 12);
  FriendCallWin::LogoutFriend(v3->m_pkFriendCallWin, *(Name5 *)v5);
  return iRevBytes;
}

//----- (004A6BA0) --------------------------------------------------------
int __thiscall GameFrameWork::On_Nc_Kq_Complete_Cmd(GameFrameWork *this, int iRevBytes, void *pvData)
{
  NiNode *v3; // eax@1
  SoundIndex rkIndex; // [sp+Ch] [bp-8h]@2

  v3 = this->m_pEffect1.m_pObject;
  if ( v3 )
  {
    v3->m_kLocal.m_Translate.x = 500.0;
    *(float *)&rkIndex.m_dwIndex = -500.0;
    v3->m_kLocal.m_Translate.y = -500.0;
    *(float *)&rkIndex.m_acFilename = 0.0;
    v3->m_kLocal.m_Translate.z = 0.0;
    PgWinMgr::StartFullScreenEffect(&Pgg_kWinMgr, Timer::ms_fCurTime, (NiAVObject *)&this->m_pEffect1.m_pObject->vfptr);
    rkIndex.m_dwIndex = 0;
    rkIndex.m_acFilename = 0;
    SoundGroupStatic::PlaySoundA((SoundGroupStatic *)&g_kSoundMgr.m_pkInterfaceGroup->vfptr, &rkIndex, 0, 0);
  }
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004A6C20) --------------------------------------------------------
int __thiscall GameFrameWork::On_Nc_Kq_Fail_Cmd(GameFrameWork *this, int iRevBytes, void *pvData)
{
  NiNode *v3; // eax@1
  SoundIndex rkIndex; // [sp+Ch] [bp-8h]@2

  v3 = this->m_pEffect2.m_pObject;
  if ( v3 )
  {
    v3->m_kLocal.m_Translate.x = 500.0;
    *(float *)&rkIndex.m_dwIndex = -500.0;
    v3->m_kLocal.m_Translate.y = -500.0;
    *(float *)&rkIndex.m_acFilename = 0.0;
    v3->m_kLocal.m_Translate.z = 0.0;
    PgWinMgr::StartFullScreenEffect(&Pgg_kWinMgr, Timer::ms_fCurTime, (NiAVObject *)&this->m_pEffect2.m_pObject->vfptr);
    rkIndex.m_dwIndex = 1;
    rkIndex.m_acFilename = 0;
    SoundGroupStatic::PlaySoundA((SoundGroupStatic *)&g_kSoundMgr.m_pkInterfaceGroup->vfptr, &rkIndex, 0, 0);
  }
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004A6CA0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_KQ_SCORE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  signed int v4; // edi@1
  char *v5; // esi@2
  int v6; // edx@3
  int v7; // eax@3
  int v8; // ecx@3
  int v9; // edx@3
  unsigned int v10; // ST1C_4@3
  char v11; // ST18_1@3
  unsigned int v12; // ST0C_4@3
  unsigned int v13; // ST08_4@3
  unsigned int v14; // ST04_4@3
  PkKqRankingWin *v15; // ecx@3
  GameFrameWork *v17; // [sp+Ch] [bp-20h]@1
  char acName[21]; // [sp+10h] [bp-1Ch]@3

  v3 = this;
  v17 = this;
  PkKqRankingWin::Clear(this->m_pkPkKqRankingWin);
  PkKqRankingWin::SetBaseScore(v3->m_pkPkKqRankingWin, *(_DWORD *)((char *)pvData + 1));
  v4 = 0;
  if ( *(_BYTE *)pvData )
  {
    v5 = (char *)pvData + 13;
    do
    {
      v6 = *((_DWORD *)v5 - 1);
      v7 = *(_DWORD *)v5;
      *(_DWORD *)acName = *((_DWORD *)v5 - 2);
      v8 = *((_DWORD *)v5 + 1);
      *(_DWORD *)&acName[4] = v6;
      v9 = *((_DWORD *)v5 + 2);
      *(_DWORD *)&acName[12] = v8;
      v10 = *(_DWORD *)(v5 + 26);
      *(_DWORD *)&acName[8] = v7;
      LOBYTE(v7) = v5[12];
      *(_DWORD *)&acName[16] = v9;
      v11 = v5[13];
      v12 = *(_DWORD *)(v5 + 22);
      v13 = *(_DWORD *)(v5 + 18);
      v14 = *(_DWORD *)(v5 + 14);
      v15 = v17->m_pkPkKqRankingWin;
      acName[20] = 0;
      PkKqRankingWin::AddRanking(v15, acName, v14, v13, v12, v7 & 0x7F, (unsigned __int8)v7 >> 7, v11, v10);
      ++v4;
      v5 += 38;
    }
    while ( v4 < *(_BYTE *)pvData );
    v3 = v17;
  }
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkPkKqRankingWin->vfptr);
  return iRevBytes;
}

//----- (004A6D70) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_KQ_SCORE_SIMPLE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  unsigned int v3; // edi@1
  char *v4; // esi@2
  int v5; // edx@3
  int v6; // ecx@3
  int v7; // eax@3
  int v8; // ecx@3
  unsigned int v9; // ST0C_4@3
  unsigned int v10; // eax@3
  unsigned int v11; // ST04_4@3
  PkRealTiemRankWin *v12; // ecx@3
  GameFrameWork *v14; // [sp+8h] [bp-20h]@1
  char acname[21]; // [sp+Ch] [bp-1Ch]@3

  v3 = 0;
  v14 = this;
  if ( *(_BYTE *)pvData )
  {
    v4 = (char *)pvData + 26;
    do
    {
      v5 = *(_DWORD *)v4;
      v6 = *((_DWORD *)v4 - 1);
      *(_DWORD *)acname = *((_DWORD *)v4 - 2);
      v7 = *((_DWORD *)v4 + 1);
      *(_DWORD *)&acname[4] = v6;
      v8 = *((_DWORD *)v4 + 2);
      *(_DWORD *)&acname[8] = v5;
      v9 = *((_DWORD *)v4 + 3);
      *(_DWORD *)&acname[12] = v7;
      v10 = *((_DWORD *)v4 + 4);
      *(_DWORD *)&acname[16] = v8;
      v11 = *((_DWORD *)v4 + 5);
      v12 = v14->m_pkKQPKRealTimeRankWin;
      acname[20] = 0;
      PkRealTiemRankWin::SetRankInfo(v12, acname, v11, v10, v9);
      ++v3;
      v4 += 32;
    }
    while ( v3 < *(_BYTE *)pvData );
  }
  return iRevBytes;
}

//----- (004A6E00) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_SCENARIO_RUNEFFECT_CMD(int iRevBytes, void *pvData)
{
  int v3; // ecx@1
  int v4; // edx@1
  int v5; // eax@1
  __int64 ST30_8_1; // ST30_8@1
  int v7; // eax@1
  float fTime; // ST1C_4@1
  _BYTE v9[12]; // ST10_12@1
  _BYTE v10[12]; // ST04_12@1
  char acName[17]; // [sp+1Ch] [bp-18h]@1

  v3 = *((_DWORD *)pvData + 1);
  v4 = *((_DWORD *)pvData + 2);
  *(_DWORD *)acName = *(_DWORD *)pvData;
  v5 = *((_DWORD *)pvData + 3);
  *(_DWORD *)&acName[4] = v3;
  *(_DWORD *)&acName[12] = v5;
  *(_DWORD *)&acName[8] = v4;
  acName[16] = 0;
  v7 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
  fTime = (double)*((unsigned int *)pvData + 4);
  *(float *)v9 = 0.0;
  *((float *)&ST30_8_1 + 1) = 0.0;
  *(float *)&ST30_8_1 = 1.0;
  *(_QWORD *)&v9[4] = ST30_8_1;
  *(_DWORD *)v10 = *(_DWORD *)v7;
  *(_QWORD *)&v10[4] = *(_QWORD *)(v7 + 4);
  EffectMgr::CreateEffect(&g_kEffectMgr, acName, *(NiPoint3 *)v10, *(NiPoint3 *)v9, fTime, 1.0);
  return iRevBytes;
}

//----- (004A6EC0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SCENARIO_DOORSTATE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  Char *v3; // esi@1
  char v4; // al@2

  v3 = GameFrameWork::GetCharByHandle(this, *(_WORD *)pvData, 27, 9);
  if ( v3 )
  {
    v4 = *((_BYTE *)pvData + 2);
    if ( v4 )
    {
      if ( (unsigned __int8)(v4 - 1) <= 1u )
      {
        Char::SetDoorAnimation(v3, Timer::ms_fCurTime, 0);
        World::SetSubBlockData(&g_kWorld, v3->m_szBlockName, 0);
      }
    }
    else
    {
      Char::SetDoorAnimation(v3, Timer::ms_fCurTime, DOOR_CLOSE);
      World::SetSubBlockData(&g_kWorld, v3->m_szBlockName, 1);
    }
  }
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004A6F30) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SCENARIO_OBJTYPECHANGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  Char *v3; // eax@1

  v3 = GameFrameWork::GetCharByHandle(this, *(_WORD *)pvData, 27, 11);
  if ( v3 )
    v3->m_byType = *((_BYTE *)pvData + 2);
  return iRevBytes;
}

//----- (004A6F60) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_SCENARIO_FOG_CMD(int iRevBytes, void *pvData)
{
  unsigned __int8 v3; // al@1
  int result; // eax@3
  float fFog; // [sp+10h] [bp+Ch]@1

  unk_B24FB4 = (double)*(_WORD *)((char *)pvData + 1);
  v3 = *(_BYTE *)pvData;
  fFog = 0.0;
  if ( v3 )
    fFog = (double)v3 / 100.0;
  World::SetFogDepth(&g_kWorld, fFog);
  result = iRevBytes;
  unk_A99569 = 1;
  return result;
}

//----- (004A6FC0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_SCENARIO_ANIMATE_CMD(int iRevBytes, void *pvData)
{
  Char *v3; // edi@1
  int v4; // edx@2
  int v5; // eax@2
  int v6; // ecx@2
  int v7; // edx@2
  int v8; // eax@2
  int v9; // ecx@2
  int v10; // edx@2
  AttackSequenceManagerVtbl *v11; // eax@2
  NiActorManager *(__thiscall *v12)(AttackSequenceManager *); // edx@2
  NiActorManager *v13; // eax@3
  char acActCode[33]; // [sp+8h] [bp-28h]@2

  v3 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  if ( v3 )
  {
    v4 = *(_DWORD *)((char *)pvData + 6);
    v5 = *(_DWORD *)((char *)pvData + 10);
    *(_DWORD *)acActCode = *(_DWORD *)((char *)pvData + 2);
    v6 = *(_DWORD *)((char *)pvData + 14);
    *(_DWORD *)&acActCode[4] = v4;
    v7 = *(_DWORD *)((char *)pvData + 18);
    *(_DWORD *)&acActCode[8] = v5;
    v8 = *(_DWORD *)((char *)pvData + 22);
    *(_DWORD *)&acActCode[12] = v6;
    v9 = *(_DWORD *)((char *)pvData + 26);
    *(_DWORD *)&acActCode[16] = v7;
    v10 = *(_DWORD *)((char *)pvData + 30);
    *(_DWORD *)&acActCode[20] = v8;
    v11 = v3->vfptr;
    *(_DWORD *)&acActCode[24] = v9;
    *(_DWORD *)&acActCode[28] = v10;
    v12 = v11->GetActor;
    acActCode[32] = 0;
    if ( v12((AttackSequenceManager *)&v3->vfptr) )
    {
      v13 = (NiActorManager *)v3->vfptr->GetActor(&v3->vfptr);
      NiActorManager::Reset(v13);
    }
    Char::ActAction(v3, acActCode, 0);
  }
  return iRevBytes;
}

//----- (004A7060) --------------------------------------------------------
void __thiscall GameFrameWork::NcReportGetReq(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Net *v2; // ecx@1
  __int16 pdata; // [sp+4h] [bp-8h]@1
  char v4; // [sp+Bh] [bp-1h]@1

  v1 = this;
  v2 = this->m_spWorldMgrNet.m_pObject;
  pdata = -32763;
  PgNet::AddNetMsg((PgNet *)&v2->vfptr, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr, &v4, 1);
}

//----- (004A70A0) --------------------------------------------------------
void __thiscall GameFrameWork::NcReportCancelReq(GameFrameWork *this, int iRegNum)
{
  GameFrameWork *v2; // esi@1
  int v3; // eax@2
  Net *v4; // ecx@2
  PROTO_NC_REPORT_CANCEL_REQ kProto; // [sp+4h] [bp-4h]@2

  v2 = this;
  if ( this->m_pkReportWin )
  {
    v3 = iRegNum;
    LOWORD(iRegNum) = -32765;
    v4 = this->m_spWorldMgrNet.m_pObject;
    kProto.nRegNumber = v3;
    PgNet::AddNetMsg((PgNet *)&v4->vfptr, &iRegNum, 2);
    PgNet::SendNetMsg((PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 4);
  }
}

//----- (004A70F0) --------------------------------------------------------
void __thiscall GameFrameWork::NcPrisonEndReq(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Net *v2; // ecx@1
  __int16 pdata; // [sp+4h] [bp-8h]@1
  char v4; // [sp+Bh] [bp-1h]@1

  v1 = this;
  v2 = this->m_spWorldMgrNet.m_pObject;
  pdata = 31748;
  PgNet::AddNetMsg((PgNet *)&v2->vfptr, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr, &v4, 1);
}

//----- (004A7130) --------------------------------------------------------
void __thiscall GameFrameWork::NcMiniHouseActivReq(GameFrameWork *this, const char bySlot)
{
  GameFrameWork *v2; // esi@1
  DWORD v3; // eax@2
  PgNet *v4; // ecx@2
  NETCOMMAND netcmd; // [sp+8h] [bp-8h]@2
  PROTO_NC_MINIHOUSE_ACTIV_REQ kProto; // [sp+Fh] [bp-1h]@2

  v2 = this;
  if ( dwPrevTimeWhenHouseChanged_0 + 2000 < timeGetTime() )
  {
    v3 = timeGetTime();
    v4 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
    dwPrevTimeWhenHouseChanged_0 = v3;
    netcmd.protocol = -29695;
    PgNet::AddNetMsg(v4, &netcmd, 2);
    kProto.slot = bySlot;
    PgNet::SendNetMsg((PgNet *)&v2->m_spZoneNet.m_pObject->vfptr, &kProto, 1);
  }
}

//----- (004A71A0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_CHARGED_STAT_INITIALIZE_SUC_CMD(int iRevBytes, void *pvData)
{
  int result; // eax@1

  User::ClearDistributeStatPoint(&g_kUser);
  result = iRevBytes;
  unk_A97D74 = *(_BYTE *)pvData;
  return result;
}

//----- (004A71C0) --------------------------------------------------------
void __thiscall GameFrameWork::On_NC_ACT_ROAR_REQ(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Net *v2; // ecx@2
  RoarWin *v3; // eax@2
  const char *v4; // edi@2
  unsigned int v5; // eax@2
  int v6; // ebx@2
  PgNet *v7; // ecx@2
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@2
  PROTO_NC_ACT_ROAR_REQ kProto; // [sp+8h] [bp-4h]@2

  v1 = this;
  if ( this->m_pkRoarWin )
  {
    v2 = this->m_spZoneNet.m_pObject;
    netcmd.protocol = 8267;
    PgNet::AddNetMsg((PgNet *)&v2->vfptr, &netcmd, 2);
    v3 = v1->m_pkRoarWin;
    kProto.slot = v3->m_uiLockInvPos;
    v4 = (const char *)((int (__thiscall *)(EditWin *))v3->m_spEdit.m_pObject->vfptr[113].__vecDelDtor)(v3->m_spEdit.m_pObject);
    v5 = strlen(v4);
    v6 = v5 + 1;
    v7 = (PgNet *)&v1->m_spZoneNet.m_pObject->vfptr;
    kProto.len = v5 + 1;
    PgNet::AddNetMsg(v7, &kProto, 2);
    PgNet::SendNetMsg((PgNet *)&v1->m_spZoneNet.m_pObject->vfptr, (void *)v4, v6);
  }
}

//----- (004A7250) --------------------------------------------------------
void __thiscall GameFrameWork::On_NC_MAP_WING_SAVE_REQ(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Net *v2; // ecx@1
  PgNet *v3; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  PROTO_NC_MAP_WING_SAVE_REQ kProto; // [sp+Bh] [bp-1h]@1

  v1 = this;
  v2 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 6164;
  PgNet::AddNetMsg((PgNet *)&v2->vfptr, &netcmd, 2);
  v3 = (PgNet *)&v1->m_spZoneNet.m_pObject->vfptr;
  kProto.where = v1->m_pkWingStoneWin->m_uiMemorySlot;
  PgNet::AddNetMsg(v3, &kProto, 1);
  PgNet::SendNetMsg((PgNet *)&v1->m_spZoneNet.m_pObject->vfptr, &kProto, 0);
}

//----- (004A72B0) --------------------------------------------------------
void __thiscall GameFrameWork::On_NC_MAP_WING_FLY_REQ(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Net *v2; // ecx@1
  PgNet *v3; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  PROTO_NC_MAP_WING_FLY_REQ kProto; // [sp+Bh] [bp-1h]@1

  v1 = this;
  v2 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 6166;
  PgNet::AddNetMsg((PgNet *)&v2->vfptr, &netcmd, 2);
  v3 = (PgNet *)&v1->m_spZoneNet.m_pObject->vfptr;
  kProto.where = v1->m_pkWingStoneWin->m_uiMemorySlot;
  PgNet::AddNetMsg(v3, &kProto, 1);
  PgNet::SendNetMsg((PgNet *)&v1->m_spZoneNet.m_pObject->vfptr, &kProto, 0);
}

//----- (004A7310) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_EXIT_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2
  MHDiceGameTask *v5; // ecx@3
  bool v6; // bl@3
  MHDiceGameTask *v7; // esi@4
  MHDiceGameTask *v8; // ecx@8
  MHDiceGameTask *v9; // esi@9
  GameFrameWork *v11; // [sp+Ch] [bp-18h]@1
  NiPointer<MHDiceGameTask> v12; // [sp+10h] [bp-14h]@8
  NiPointer<MHDiceGameTask> result; // [sp+14h] [bp-10h]@3
  int v14; // [sp+20h] [bp-4h]@3

  v3 = this;
  v11 = this;
  if ( *(_WORD *)pvData == 4481 )
  {
    v5 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
    v14 = 0;
    v6 = MHDiceGameTask::IsDicegamePlaying(v5);
    v14 = -1;
    if ( result.m_pObject )
    {
      v7 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      }
    }
    if ( v6 )
    {
      LOWORD(pvData) = 7312;
      v8 = MHDiceGameTask::GetDiceGameTask(&v12)->m_pObject;
      v14 = 1;
      MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_LEAVE_ACK(v8, (PROTO_NC_DICE_TAISAI_GAME_LEAVE_ACK *)&pvData);
      v14 = -1;
      if ( v12.m_pObject )
      {
        v9 = v12.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&v12.m_pObject->m_uiRefCount) )
        {
          if ( v9 )
            v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
        }
      }
    }
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v11->m_pkMHMouseControlWin->vfptr);
  }
  else
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
  }
  return iRevBytes;
}

//----- (004A7430) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_CREATE_FURNITURE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData != 4545 )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
    unk_A9949E = 1;
  }
  return iRevBytes;
}

//----- (004A7470) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_DELETE_FURNITURE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  mhObject *v4; // eax@1

  v3 = this;
  v4 = mhObjectManager::GetObjectA(&stru_A993C8, this->m_pkMHEmotionWin->m_ObjID);
  if ( v4 && (void *)v4->m_iGUID == (char *)pvData + 1 )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkMHEmotionWin->vfptr);
  MiniHouseIndoor::DelObject(&g_kWorld.m_MiniHouseIndoorMode, *(_WORD *)((char *)pvData + 1), 1);
  return iRevBytes;
}

//----- (004A74D0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_LOGOUTCOMPLETE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  mhInfoWin *v4; // esi@4

  v3 = this;
  MiniHouseIndoor::DelJoinCharInfo(&g_kWorld.m_MiniHouseIndoorMode, *(_WORD *)pvData);
  if ( nowState == 5 && unk_A9943C == 2 )
  {
    MiniHouseIndoor::CancelPickObj(&g_kWorld.m_MiniHouseIndoorMode);
    MainChar::SetTargetChar((MainChar *)g_pkMainChar, 0);
  }
  v4 = v3->m_pkMHInfoWin;
  if ( v4 )
  {
    mhInfoWin::RefreshGuestPage(v4);
    mhInfoWin::RefreshInfoPage(v4);
  }
  return iRevBytes;
}

//----- (004A7530) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_LOGINCOMPLETE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  mhInfoWin *v4; // esi@1

  v3 = this;
  MiniHouseIndoor::AddJoinCharInfo(&g_kWorld.m_MiniHouseIndoorMode, *(_WORD *)((char *)pvData + 1), *(_BYTE *)pvData);
  v4 = v3->m_pkMHInfoWin;
  if ( v4 )
  {
    mhInfoWin::RefreshGuestPage(v4);
    mhInfoWin::RefreshInfoPage(v4);
  }
  return iRevBytes;
}

//----- (004A7570) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_VISITREADY_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  int result; // eax@4
  const char *v5; // eax@6

  v3 = this;
  if ( *(_DWORD *)pvData != 4481 )
  {
    v5 = ErrMsgTable::GetErrMsg(*(_DWORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v5);
    return iRevBytes;
  }
  if ( nowState )
    return iRevBytes;
  if ( *((_BYTE *)pvData + 4) )
  {
    PgFrameWork::AddMsg((PgFrameWork *)&this->vfptr, 0xCDu, 0, 0);
    result = iRevBytes;
  }
  else
  {
    PgFrameWork::AddMsg((PgFrameWork *)&this->vfptr, 0xD8u, 0, 0);
    result = iRevBytes;
  }
  return result;
}

//----- (004A75E0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_COMPULSIONMOVETO_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  Char *v3; // eax@1
  Char *v4; // esi@1
  float Pos; // ST2C_4@2
  float Pos_4; // ST30_4@2
  int v7; // eax@2
  _BYTE v8[12]; // ST10_12@2
  _BYTE v9[12]; // ST04_12@2

  v3 = GameFrameWork::GetCharByHandle(this, *(_WORD *)pvData, 35, 42);
  v4 = v3;
  if ( v3 )
  {
    Pos_4 = (double)*(unsigned int *)((char *)pvData + 6);
    Pos = (double)*(unsigned int *)((char *)pvData + 2);
    ((void (__thiscall *)(Char *, _DWORD, _DWORD, signed int))v3->vfptr[7].IsVisible)(
      v3,
      LODWORD(Pos),
      LODWORD(Pos_4),
      1);
    v7 = ((int (__thiscall *)(Char *))v4->vfptr[6].Deaffect)(v4);
    *(float *)v8 = NiPoint3::UNIT_Y.x;
    *(_QWORD *)&v8[4] = *(_QWORD *)&NiPoint3::UNIT_Y.y;
    *(_DWORD *)v9 = *(_DWORD *)v7;
    *(_QWORD *)&v9[4] = *(_QWORD *)(v7 + 4);
    EffectMgr::CreateEffect(&g_kEffectMgr, "RevivalTarget", *(NiPoint3 *)v9, *(NiPoint3 *)v8, Timer::ms_fCurTime, 1.0);
  }
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004A76B0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_MODIFY_ITEM_INFO_OPEN_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  if ( *(_WORD *)pvData != 4481 )
    this->m_pkMHSettingWin->m_spCheckBox[1]->m_bCheck = this->m_pkMHSettingWin->m_spCheckBox[1]->m_bCheck == 0;
  return iRevBytes;
}

//----- (004A76F0) --------------------------------------------------------
void __stdcall GameFrameWork::SendMHPortalOpenReq(unsigned __int16 ID)
{
  if ( ID != -1 && !mhObjectManager::GetObjectA(&stru_A993C8, 60000) )
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x23u, 0x50u, &ID, 2);
}

//----- (004A7730) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ONGAMENET_OX_EVENT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  SoundIndex *v5; // [sp-8h] [bp-18h]@3
  bool v6; // [sp-4h] [bp-14h]@3
  bool _fTime; // [sp+0h] [bp-10h]@3
  SoundIndex rkIndex; // [sp+8h] [bp-8h]@3

  v3 = this;
  CNSTimer_Interval::ReSet(&this->m_kTimerIntervalOXDelay, Timer::ms_fCurTime);
  v3->m_kTimerIntervalOXDelay.m_fCheckTime = 4.0;
  if ( *(_BYTE *)pvData == 1 )
  {
    if ( v3->m_pOXEffectO.m_pObject )
    {
      _fTime = 0;
      v3->m_bOXEventEnable = 1;
      v3->m_bOEnable = 1;
      v6 = 0;
      v5 = &rkIndex;
LABEL_7:
      rkIndex.m_dwIndex = 30;
      rkIndex.m_acFilename = 0;
      SoundGroupStatic::PlaySoundA((SoundGroupStatic *)&g_kSoundMgr.m_pkInterfaceGroup->vfptr, v5, v6, _fTime);
      return iRevBytes;
    }
  }
  else if ( *(_BYTE *)pvData == 2 && v3->m_pOXEffectX.m_pObject )
  {
    _fTime = 0;
    v6 = 0;
    v3->m_bOXEventEnable = 1;
    v3->m_bOEnable = 0;
    v5 = &rkIndex;
    goto LABEL_7;
  }
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004A77D0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_LOGIN_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  if ( pvData )
    HolyPromiseWin::SetLogin(this->m_pkHolyPromiseWin, (Name5 *)pvData);
  return iRevBytes;
}

//----- (004A7810) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_LOGOUT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  if ( pvData )
    HolyPromiseWin::SetLogOut(this->m_pkHolyPromiseWin, (Name5 *)pvData);
  return iRevBytes;
}

//----- (004A7850) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_SKILL_WARP_CMD(int iRevBytes, void *pvData)
{
  void *v3; // edi@1
  int v4; // ebx@2
  int v5; // esi@2
  int v6; // edx@4
  int v7; // eax@5
  Char *pTargetChar; // [sp+10h] [bp+Ch]@1

  v3 = pvData;
  pTargetChar = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  if ( pTargetChar )
  {
    v4 = *((_WORD *)v3 + 9);
    v5 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                          + 16))(
                            ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                            v4) )
    {
      if ( (unsigned __int16)v4 <= *(_WORD *)(v5 + 200) )
      {
        v6 = *(_DWORD *)(v5 + 196);
        if ( *(_DWORD *)(v6 + 4 * v4) )
        {
          v7 = *(_DWORD *)(v6 + 4 * v4);
          if ( v7 )
          {
            if ( *(_DWORD *)(v7 + 539) == 67 )
            {
              pTargetChar->m_kTo.x = *(_DWORD *)((char *)v3 + 10);
              pTargetChar->m_kTo.y = *(_DWORD *)((char *)v3 + 14);
              pTargetChar->m_kSkillID = *((_WORD *)v3 + 9);
              return iRevBytes;
            }
            ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))pTargetChar->vfptr[9].~AbStateInfectee)(
              *(_DWORD *)((char *)v3 + 10),
              *(_DWORD *)((char *)v3 + 14),
              *((_WORD *)v3 + 9));
          }
        }
      }
    }
  }
  return iRevBytes;
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (004A7910) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAT_RESTRICT_LIST_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // ebx@1
  ChatBlockListWin *v4; // esi@1
  signed int v5; // esi@1
  PROTO_CHAT_RESTRICT_INFO *v6; // edi@2

  v3 = this;
  v4 = this->m_pkChatBlockListWin;
  NiPointer<PgWinLRBut>::`default constructor closure'((NiPointer<NiD3DTextureStage> *)&v4->m_RestrictList);
  SlideBar::SetCurPos(v4->m_pkSlideBarEx, 0);
  v4->m_pBlockList->m_nViewStartPos = 0;
  v5 = 0;
  if ( *(_WORD *)pvData > 0u )
  {
    v6 = (PROTO_CHAT_RESTRICT_INFO *)((char *)pvData + 2);
    do
    {
      CChatRestrict::Add(&v3->m_pkChatBlockListWin->m_RestrictList, v6);
      ++v5;
      ++v6;
    }
    while ( v5 < *(_WORD *)pvData );
  }
  GameFrameWork::UpdateChatBlockListWin(v3);
  return iRevBytes;
}

//----- (004A79A0) --------------------------------------------------------
void __thiscall GameFrameWork::NcChatRestrictDelAll(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Net *v2; // ecx@1
  __int16 pdata; // [sp+4h] [bp-4h]@1

  v1 = this;
  v2 = this->m_spWorldMgrNet.m_pObject;
  pdata = -22517;
  PgNet::AddNetMsg((PgNet *)&v2->vfptr, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr, 0, 0);
}

//----- (004A79E0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAT_RESTRICT_DEL_ALL_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  ChatBlockListWin *v4; // esi@2

  v3 = this;
  if ( *(_WORD *)pvData == 7200 )
  {
    v4 = this->m_pkChatBlockListWin;
    NiPointer<PgWinLRBut>::`default constructor closure'((NiPointer<NiD3DTextureStage> *)&v4->m_RestrictList);
    SlideBar::SetCurPos(v4->m_pkSlideBarEx, 0);
    v4->m_pBlockList->m_nViewStartPos = 0;
    GameFrameWork::UpdateChatBlockListWin(v3);
  }
  return iRevBytes;
}

//----- (004A7A40) --------------------------------------------------------
void __thiscall GameFrameWork::NcHolyPromiseWithDrawCenRewardReq(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Net *v2; // ecx@1
  __int16 pdata; // [sp+4h] [bp-8h]@1
  char v4; // [sp+Bh] [bp-1h]@1

  v1 = this;
  v2 = this->m_spZoneNet.m_pObject;
  pdata = -27584;
  PgNet::AddNetMsg((PgNet *)&v2->vfptr, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v1->m_spZoneNet.m_pObject->vfptr, &v4, 1);
}

//----- (004A7A80) --------------------------------------------------------
void __thiscall GameFrameWork::NcBatAbastateEraseReq(GameFrameWork *this, unsigned __int16 id)
{
  unsigned __int16 v2; // ax@1
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@1
  PROTO_NC_BAT_ABSTATE_ERASE_REQ kProto; // [sp+4h] [bp-4h]@1

  v2 = id;
  v3 = this;
  id = 9300;
  v4 = this->m_spZoneNet.m_pObject;
  kProto.abstateIndex = v2;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &id, 2);
  PgNet::SendNetMsg((PgNet *)&v3->m_spZoneNet.m_pObject->vfptr, &kProto, 2);
}

//----- (004A7AD0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_SOULCOLLECT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  Char *v4; // eax@1
  TargetWin *v5; // ecx@1

  v3 = this;
  v4 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  v5 = v3->m_pkTargetWin;
  if ( v5
    && (*(_WORD *)pvData == -1
     || (Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1] == v4) )
  {
    TargetWin::SetSoulCount(v5, *((_BYTE *)pvData + 2), 1, 1);
  }
  return iRevBytes;
}

//----- (004A7B30) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ACT_REINFORCERELOC_CMD(int iRevBytes, void *pvData)
{
  Char *v3; // eax@1
  Char *v4; // esi@1
  float v5; // ST10_4@2
  float v6; // ST10_4@2
  float fY; // ST0C_4@2
  float fX; // ST08_4@2
  float v9; // ST0C_4@2
  float v10; // ST08_4@2
  NiPoint3 kFromPos; // [sp+1Ch] [bp-18h]@2
  NiPoint3 kPos; // [sp+28h] [bp-Ch]@2

  v3 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  v4 = v3;
  if ( v3 )
  {
    Char::ClearTraceMove(v3);
    v5 = (double)*((_WORD *)pvData + 9);
    ((void (__thiscall *)(Char *, _DWORD))v4->vfptr[8].Deaffect)(v4, LODWORD(v5));
    v6 = (double)*((_WORD *)pvData + 9);
    ((void (__thiscall *)(Char *, _DWORD))v4->vfptr[8].SetAbStateProperty)(v4, LODWORD(v6));
    fX = (double)*(unsigned int *)((char *)pvData + 10);
    fY = (double)*(unsigned int *)((char *)pvData + 14);
    World::GetAdvGroundPos(&g_kWorld, fX, fY, &kPos);
    v10 = (double)*(unsigned int *)((char *)pvData + 10);
    v9 = (double)*(unsigned int *)((char *)pvData + 14);
    World::GetAdvGroundPos(&g_kWorld, v10, v9, &kFromPos);
    if ( v4->m_kHandle == g_pkMainChar->m_kHandle )
      MainChar::EndPathFind((MainChar *)g_pkMainChar, &kPos);
    if ( *((_BYTE *)pvData + 20) & 1 )
    {
      ((void (__thiscall *)(Char *, NiPoint3 *, _DWORD, NiPoint3 *, _DWORD))v4->vfptr[7].SetAbStateProperty)(
        v4,
        &kPos,
        0,
        &kFromPos,
        0);
      return iRevBytes;
    }
    ((void (__thiscall *)(Char *, NiPoint3 *, _DWORD, NiColor *, _DWORD))v4->vfptr[7].SetAbStateProperty)(
      v4,
      &kPos,
      0,
      &Char::INVALIDPOINT3,
      0);
  }
  return iRevBytes;
}

//----- (004A7C70) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ACT_REINFORCEMOVEBYPATH_CMD(int iRevBytes, void *pvData)
{
  char *v3; // edi@1
  Char *v4; // eax@1
  Char *v5; // ebx@1
  int v6; // esi@2
  float fY; // ST04_4@3
  float fX; // ST00_4@3
  float v9; // ST08_4@10
  float v10; // ST08_4@10
  NiPoint3 pkDir; // [sp+18h] [bp-24h]@6
  NiPoint3 pos3To; // [sp+24h] [bp-18h]@4
  NiPoint3 kPos; // [sp+30h] [bp-Ch]@3
  void *pvDataa; // [sp+48h] [bp+Ch]@6

  v3 = (char *)pvData;
  v4 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  v5 = v4;
  if ( v4 )
  {
    Char::ClearTraceMove(v4);
    v6 = 0;
    if ( *((_BYTE *)pvData + 5) )
    {
      while ( 1 )
      {
        fX = (double)*(unsigned int *)&v3[8 * v6 + 6];
        fY = (double)*(unsigned int *)&v3[8 * v6 + 10];
        if ( !World::GetAdvGroundPos(&g_kWorld, fX, fY, &kPos) )
          break;
        ((void (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
        pos3To.x = kPos.x;
        pos3To.y = kPos.y;
        pos3To.z = kPos.z;
        if ( !v6 && v5->m_kHandle == g_pkMainChar->m_kHandle )
        {
          Char::GetDirToPosition(v5, &pkDir, &pos3To);
          *(float *)&pvDataa = atan2(pkDir.x, pkDir.y);
          if ( *(float *)&pvDataa <= 0.0 )
            CameraCtrl::AddTraceRotate(&_that, -540);
          else
            CameraCtrl::AddTraceRotate(&_that, 540);
        }
        Char::AddTraceMove(v5, &kPos);
        if ( ++v6 >= (unsigned __int8)v3[5] )
          goto LABEL_10;
      }
    }
    else
    {
LABEL_10:
      v9 = (double)*((_WORD *)v3 + 1);
      ((void (__thiscall *)(Char *, _DWORD))v5->vfptr[8].SetAbStateProperty)(v5, LODWORD(v9));
      v10 = (double)*((_WORD *)v3 + 1);
      ((void (__thiscall *)(Char *, _DWORD))v5->vfptr[8].Deaffect)(v5, LODWORD(v10));
    }
  }
  return iRevBytes;
}

//----- (004A7DD0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_MISC_SERVER_TIME_NOTIFY_CMD(int iRevBytes, void *pvData)
{
  char v3; // al@1

  v3 = *((_BYTE *)pvData + 36);
  qmemcpy(&Timer::ms_dLastServerTime, pvData, 0x24u);
  Timer::ms_fLastRecordServerTime = Timer::ms_fCurTime;
  Timer::ms_cTimeZone = v3;
  QueryPerformanceCounter(&Timer::ms_StartQPC);
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8B988: using guessed type float Timer::ms_fLastRecordServerTime;
// A8B98C: using guessed type char Timer::ms_cTimeZone;

//----- (004A7E10) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_USER_WILL_WORLD_SELECT_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // ebx@1
  PgFrameWork *v4; // eax@2
  int v5; // edx@3
  int v6; // ecx@3
  int v7; // edx@3
  int v8; // ecx@3
  int v9; // edx@3
  int v10; // ecx@3
  int v11; // edx@3
  int v13; // [sp+8h] [bp-20h]@3
  int v14; // [sp+Ch] [bp-1Ch]@3
  int v15; // [sp+10h] [bp-18h]@3
  int v16; // [sp+14h] [bp-14h]@3
  int v17; // [sp+18h] [bp-10h]@3
  int v18; // [sp+1Ch] [bp-Ch]@3
  int v19; // [sp+20h] [bp-8h]@3
  int v20; // [sp+24h] [bp-4h]@3

  v3 = this;
  if ( *(_WORD *)pvData == 7768 )
  {
    v4 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, AccountFrameWorkID);
    if ( v4 )
    {
      qmemcpy(&v13, (char *)pvData + 2, 0x20u);
      v5 = v13;
      *(_DWORD *)&v4[2].m_bInit = v14;
      v6 = v16;
      v4[2].m_BackFrameID = (void *)v5;
      v7 = v15;
      v4[3].m_pkMsgHooker = (IDirectMessenger *)v6;
      v8 = v18;
      v4[3].vfptr = (IDirectMessengerVtbl *)v7;
      v9 = v17;
      v4[3].m_kMsgQ.m_pBase = (PgMsg::Frame *)v8;
      v10 = v20;
      v4[3].m_uiMessageNum = v9;
      v11 = v19;
      v4[3].m_kMsgQ.m_uiHead = v10;
      v4[3].m_kMsgQ.m_uiAlloced = v11;
      v3->m_bServerSelect = 1;
      NetMgr::SendUserLogOutMsg2AllServer(&g_kNetMgr);
      PgFrameWork::PostFrameMsgChange((PgFrameWork *)&v3->vfptr, AccountFrameWorkID, 0);
      return iRevBytes;
    }
  }
  else
  {
    this->m_bServerSelect = 0;
    NetMgr::SendUserLogOutMsg2AllServer(&g_kNetMgr);
    PgFrameWork::PostFrameMsgChange((PgFrameWork *)&v3->vfptr, AccountFrameWorkID, 0);
  }
  return iRevBytes;
}

//----- (004A7EE0) --------------------------------------------------------
void __thiscall GameFrameWork::NcRaidMakeReq(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Net *v2; // ecx@1
  __int16 pdata; // [sp+4h] [bp-8h]@1
  char v4; // [sp+Bh] [bp-1h]@1

  v1 = this;
  v2 = this->m_spWorldMgrNet.m_pObject;
  pdata = -20479;
  PgNet::AddNetMsg((PgNet *)&v2->vfptr, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr, &v4, 1);
}

//----- (004A7F20) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_MEMBER_LIST_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  _BYTE v4[20]; // ST04_20@3
  _BYTE v5[20]; // ST04_20@3
  char *v6; // esi@3
  signed int v7; // ebx@3
  _BYTE v8[20]; // ST00_20@9
  unsigned int v9; // esi@13
  RaidMemberInfo *v10; // eax@14
  unsigned int v11; // esi@18
  unsigned int v12; // edi@18
  RaidMemberInfo *v13; // esi@19
  Name5 *v14; // eax@20
  _BYTE v15[20]; // ST04_20@25
  PartyMemberInfo *v16; // eax@25
  ExpeditionWin *pkWin; // [sp+Ch] [bp-20h]@3
  GameFrameWork *v19; // [sp+10h] [bp-1Ch]@1
  char dest[4]; // [sp+14h] [bp-18h]@4
  int v21; // [sp+18h] [bp-14h]@4
  int v22; // [sp+1Ch] [bp-10h]@4
  int v23; // [sp+20h] [bp-Ch]@4
  int v24; // [sp+24h] [bp-8h]@4

  v3 = this;
  v19 = this;
  if ( !RaidInfo::IsMeRaidMember(&g_kRaidinfo) )
    MiniMapWin::ClearRaidMember(v3->m_pkMiniMapWin);
  *(_DWORD *)v4 = *(_DWORD *)pvData;
  *(_QWORD *)&v4[4] = *(_QWORD *)((char *)pvData + 4);
  *(_QWORD *)&v4[12] = *(_QWORD *)((char *)pvData + 12);
  RaidInfo::ChangeRaidLeader(&g_kRaidinfo, *(Name5 *)v4);
  *(_DWORD *)v5 = *((_DWORD *)pvData + 25);
  *(_QWORD *)&v5[4] = *((_QWORD *)pvData + 13);
  *(_QWORD *)&v5[12] = *((_QWORD *)pvData + 14);
  RaidInfo::ChangeRaidLooter(&g_kRaidinfo, *(Name5 *)v5);
  pkWin = v3->m_pkExpeditionWin;
  v6 = (char *)pvData + 28;
  v7 = 4;
  do
  {
    v24 = 0;
    v23 = 0;
    v22 = 0;
    v21 = 0;
    *(_DWORD *)dest = 0;
    strncpy(dest, &byte_981E1B, 0x14u);
    if ( *((_DWORD *)v6 - 2) != *(_DWORD *)dest
      || *((_DWORD *)v6 - 1) != v21
      || *(_DWORD *)v6 != v22
      || *((_DWORD *)v6 + 1) != v23
      || *((_DWORD *)v6 + 2) != v24 )
    {
      *(_DWORD *)v8 = *((_DWORD *)v6 - 2);
      *(_DWORD *)&v8[4] = *((_DWORD *)v6 - 1);
      *(_DWORD *)&v8[8] = *(_DWORD *)v6;
      *(_QWORD *)&v8[12] = *(_QWORD *)(v6 + 4);
      RaidInfo::SetRaidSubLeader(&g_kRaidinfo, *(Name5 *)v8, 1);
    }
    v6 += 20;
    --v7;
  }
  while ( v7 );
  RaidInfo::SetItemLootingType(&g_kRaidinfo, *((_BYTE *)pvData + 120), *((_BYTE *)pvData + 121));
  if ( pkWin )
  {
    ExpeditionWin::SetLootingType(pkWin, *((_BYTE *)pvData + 121));
    ExpeditionWin::SetItemGrade(pkWin, *((_BYTE *)pvData + 120));
  }
  RaidInfo::SetMember(&g_kRaidinfo, (PROTO_NC_RAID_MEMBER_LIST_CMD *)pvData);
  MiniMapWin::ClearParty(v19->m_pkMiniMapWin);
  v9 = 0;
  do
  {
    v10 = RaidInfo::GetRaidMemberInfoByIndex(&g_kRaidinfo, v9);
    if ( v10 && v10->m_bShow )
      MiniMapWin::AddRaidMember(v19->m_pkMiniMapWin, v10);
    ++v9;
  }
  while ( v9 < 0x14 );
  v11 = g_kRaidinfo.m_uiMePartyIdx;
  v12 = 0;
  if ( g_kRaidinfo.m_MemberInfo[g_kRaidinfo.m_uiMePartyIdx]._Mylast
     - g_kRaidinfo.m_MemberInfo[g_kRaidinfo.m_uiMePartyIdx]._Myfirst )
  {
    do
    {
      v13 = RaidInfo::GetRaidMemberInfoByIndex(&g_kRaidinfo, v11 + v12 + 4 * v11);
      if ( v13 )
      {
        v14 = User::GetMainCharID(&g_kUser);
        if ( v13->m_kCharID.n5_code[0] != v14->n5_code[0]
          || v13->m_kCharID.n5_code[1] != v14->n5_code[1]
          || v13->m_kCharID.n5_code[2] != v14->n5_code[2]
          || v13->m_kCharID.n5_code[3] != v14->n5_code[3]
          || v13->m_kCharID.n5_code[4] != v14->n5_code[4] )
        {
          *(_DWORD *)v15 = v13->m_kCharID.n5_code[0];
          *(_QWORD *)&v15[4] = *(_QWORD *)&v13->m_kCharID.n5_code[1];
          *(_QWORD *)&v15[12] = *(_QWORD *)&v13->m_kCharID.n5_code[3];
          v16 = Party::GetMemberInfo(&g_kParty, *(Name5 *)v15);
          if ( v16 )
          {
            v16->m_ucStatus = v13->m_ucStatus;
            if ( !v13->m_ucStatus )
              v16->m_bShow = 0;
          }
        }
      }
      v11 = g_kRaidinfo.m_uiMePartyIdx;
      ++v12;
    }
    while ( v12 < g_kRaidinfo.m_MemberInfo[g_kRaidinfo.m_uiMePartyIdx]._Mylast
                - g_kRaidinfo.m_MemberInfo[g_kRaidinfo.m_uiMePartyIdx]._Myfirst );
  }
  return iRevBytes;
}

//----- (004A81B0) --------------------------------------------------------
void __thiscall GameFrameWork::NcRaidLootingTypeReq(GameFrameWork *this, __int16 nItemGrade, char nLootingType)
{
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@1

  v3 = this;
  HIBYTE(nItemGrade) = nLootingType;
  v4 = this->m_spWorldMgrNet.m_pObject;
  *(_WORD *)&nLootingType = -20472;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &nLootingType, 2);
  PgNet::SendNetMsg((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, &nItemGrade, 2);
}

//----- (004A8200) --------------------------------------------------------
void __thiscall GameFrameWork::NcRaidLeaveReq(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  PgNet *v2; // ecx@2
  __int16 pdata; // [sp+4h] [bp-8h]@2
  char v4; // [sp+Bh] [bp-1h]@2

  v1 = this;
  if ( RaidInfo::IsMeRaidMember(&g_kRaidinfo) )
  {
    v2 = (PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr;
    pdata = -20460;
    PgNet::AddNetMsg(v2, &pdata, 2);
    PgNet::SendNetMsg((PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr, &v4, 1);
  }
}

//----- (004A8250) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_MEMBERCLASS_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // ebx@1
  Name5 *v4; // eax@3
  _BYTE v5[20]; // ST00_20@3
  Name5 *v6; // eax@3
  _BYTE v7[20]; // ST00_20@3
  unsigned int v8; // esi@4
  RaidMemberInfo *v9; // eax@5
  unsigned int v10; // esi@9
  unsigned int v11; // edx@10
  unsigned int v12; // edi@10
  RaidMemberInfo *v13; // esi@11
  Name5 *v14; // eax@12
  _BYTE v15[20]; // ST00_20@17
  PartyMemberInfo *v16; // eax@17
  unsigned int v17; // ecx@19
  unsigned int v18; // edx@19
  unsigned int v19; // eax@19
  unsigned int v20; // ecx@19
  PartyMemberInfo *v21; // eax@19
  PartyWinInterface *v22; // ecx@22
  PROTO_NC_PARTY_JOIN_ACK kProto; // [sp+Ch] [bp-1Ch]@3

  v3 = this;
  if ( g_kParty.m_uiTotalMember && !RaidInfo::IsMeRaidMember(&g_kRaidinfo) )
  {
    v4 = Party::GetPartyMasterID(&g_kParty, &kProto.memberid);
    *(_DWORD *)v5 = v4->n5_code[0];
    *(_QWORD *)&v5[4] = *(_QWORD *)&v4->n5_code[1];
    *(_QWORD *)&v5[12] = *(_QWORD *)&v4->n5_code[3];
    RaidInfo::ChangeRaidLeader(&g_kRaidinfo, *(Name5 *)v5);
    v6 = Party::GetPartyMasterID(&g_kParty, &kProto.memberid);
    *(_DWORD *)v7 = v6->n5_code[0];
    *(_QWORD *)&v7[4] = *(_QWORD *)&v6->n5_code[1];
    *(_QWORD *)&v7[12] = *(_QWORD *)&v6->n5_code[3];
    RaidInfo::ChangeRaidLooter(&g_kRaidinfo, *(Name5 *)v7);
  }
  RaidInfo::MemberInfoDetailInfo(&g_kRaidinfo, (PROTO_NC_RAID_MEMBERCLASS_CMD *)pvData);
  MiniMapWin::ClearRaidMember(v3->m_pkMiniMapWin);
  v8 = 0;
  do
  {
    v9 = RaidInfo::GetRaidMemberInfoByIndex(&g_kRaidinfo, v8);
    if ( v9 && v9->m_bShow )
      MiniMapWin::AddRaidMember(v3->m_pkMiniMapWin, v9);
    ++v8;
  }
  while ( v8 < 0x14 );
  v10 = g_kRaidinfo.m_uiMePartyIdx;
  if ( g_kRaidinfo.m_uiMePartyIdx < 4 )
  {
    v11 = (signed int)((unsigned __int64)(2021161081i64
                                        * (unsigned int)((char *)g_kRaidinfo.m_MemberInfo[g_kRaidinfo.m_uiMePartyIdx]._Mylast
                                                       - (char *)g_kRaidinfo.m_MemberInfo[g_kRaidinfo.m_uiMePartyIdx]._Myfirst)) >> 32) >> 5;
    v12 = 0;
    if ( v11 + (v11 >> 31) )
    {
      do
      {
        v13 = RaidInfo::GetRaidMemberInfoByIndex(&g_kRaidinfo, v10 + v12 + 4 * v10);
        if ( v13 )
        {
          v14 = User::GetMainCharID(&g_kUser);
          if ( v13->m_kCharID.n5_code[0] != v14->n5_code[0]
            || v13->m_kCharID.n5_code[1] != v14->n5_code[1]
            || v13->m_kCharID.n5_code[2] != v14->n5_code[2]
            || v13->m_kCharID.n5_code[3] != v14->n5_code[3]
            || v13->m_kCharID.n5_code[4] != v14->n5_code[4] )
          {
            *(_DWORD *)v15 = v13->m_kCharID.n5_code[0];
            *(_QWORD *)&v15[4] = *(_QWORD *)&v13->m_kCharID.n5_code[1];
            *(_QWORD *)&v15[12] = *(_QWORD *)&v13->m_kCharID.n5_code[3];
            v16 = Party::GetMemberInfo(&g_kParty, *(Name5 *)v15);
            if ( v16 )
            {
              v16->m_iHP = v13->m_iHP;
              v16->m_iSP = v13->m_iSP;
              v16->m_iMaxHP = v13->m_iMaxHP;
              v16->m_iMaxSP = v13->m_iMaxSP;
              v16->m_bShow = v13->m_bShow;
              v16->m_byChrClass = v13->m_byChrClass;
              v16->m_ucStatus = v13->m_ucStatus;
              v16->m_iLv = v13->m_iLv;
              v16->m_iLP = v13->m_iLP;
              v16->m_iMaxLP = v13->m_iMaxLP;
            }
            else
            {
              v17 = v13->m_kCharID.n5_code[0];
              v18 = v13->m_kCharID.n5_code[1];
              kProto.charclass = v13->m_byChrClass;
              v19 = v13->m_kCharID.n5_code[2];
              kProto.memberid.n5_code[0] = v17;
              v20 = v13->m_kCharID.n5_code[3];
              *(_QWORD *)&kProto.memberid.n5_code[1] = __PAIR__(v19, v18);
              *(_QWORD *)&kProto.memberid.n5_code[3] = __PAIR__(v13->m_kCharID.n5_code[4], v20);
              v21 = Party::AddMember(&g_kParty, &kProto);
              if ( v21 )
              {
                v21->m_iHP = v13->m_iHP;
                v21->m_iSP = v13->m_iSP;
                v21->m_iMaxHP = v13->m_iMaxHP;
                v21->m_iMaxSP = v13->m_iMaxSP;
                v21->m_bShow = v13->m_bShow;
                v21->m_ucStatus = v13->m_ucStatus;
                v21->m_iLv = v13->m_iLv;
                v21->m_iLP = v13->m_iLP;
                v21->m_iMaxLP = v13->m_iMaxLP;
              }
            }
          }
        }
        v10 = g_kRaidinfo.m_uiMePartyIdx;
        ++v12;
      }
      while ( v12 < g_kRaidinfo.m_MemberInfo[g_kRaidinfo.m_uiMePartyIdx]._Mylast
                  - g_kRaidinfo.m_MemberInfo[g_kRaidinfo.m_uiMePartyIdx]._Myfirst );
    }
  }
  v22 = v3->m_pkPartyWinInterface;
  if ( v22 )
    PartyWinInterface::Update(v22);
  return iRevBytes;
}

//----- (004A84F0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_SLOT_MOVE_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  unsigned int v3; // eax@1
  GameFrameWork *v4; // ebx@1
  ExpeditionPartyWin *v5; // edi@2
  unsigned int v6; // eax@4
  ExpeditionPartyWin *v7; // ecx@5
  unsigned int v8; // eax@9
  unsigned int v9; // ebx@9
  unsigned int v10; // ecx@10
  PgWin *v11; // edi@12
  unsigned int v12; // ecx@16
  PgWin *v13; // edi@18
  unsigned int v14; // esi@25
  int v15; // edi@25
  RaidMemberInfo *v16; // esi@26
  Name5 *v17; // eax@27
  _BYTE v18[20]; // ST00_20@32
  PartyMemberInfo *v19; // eax@32
  char v20; // dl@33
  unsigned int v21; // ecx@34
  unsigned int v22; // eax@34
  unsigned int v23; // ecx@34
  unsigned int v24; // esi@38
  RaidMemberInfo *v25; // eax@39
  PartyWinInterface *v26; // ecx@43
  GameFrameWork *v28; // [sp+Ch] [bp-24h]@1
  unsigned int uiPreMyPartyIdx; // [sp+10h] [bp-20h]@1
  PROTO_NC_PARTY_JOIN_ACK kProto; // [sp+14h] [bp-1Ch]@34

  uiPreMyPartyIdx = g_kRaidinfo.m_uiMePartyIdx;
  v3 = *((_BYTE *)pvData + 22);
  v4 = this;
  v28 = this;
  if ( v3 >= 4 )
    v5 = 0;
  else
    v5 = this->m_pkExpeditionPartyWin[v3];
  v6 = *((_BYTE *)pvData + 26);
  if ( v6 >= 4 )
    v7 = 0;
  else
    v7 = this->m_pkExpeditionPartyWin[v6];
  if ( v5 && v7 )
  {
    v8 = *((_BYTE *)pvData + 27);
    v9 = v7->m_uiBuffViewOption[v8];
    ExpeditionPartyWin::SetOption(v7, v8, v5->m_uiBuffViewOption[*((_BYTE *)pvData + 23)]);
    ExpeditionPartyWin::SetOption(v5, *((_BYTE *)pvData + 23), v9);
    v4 = v28;
  }
  RaidInfo::Replace(&g_kRaidinfo, (PROTO_NC_RAID_SLOT_MOVE_BROAD_CMD *)pvData);
  v10 = *((_BYTE *)pvData + 22);
  if ( g_kRaidinfo.m_MemberInfo[v10]._Myfirst == g_kRaidinfo.m_MemberInfo[v10]._Mylast )
  {
    v11 = (PgWin *)(v10 >= 4 ? 0 : v4->m_pkExpeditionPartyWin[v10]);
    if ( (unsigned __int8)((int (__thiscall *)(PgWin *))v11->vfptr[65].__vecDelDtor)(v11) )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, v11);
  }
  v12 = *((_BYTE *)pvData + 26);
  if ( g_kRaidinfo.m_MemberInfo[v12]._Myfirst == g_kRaidinfo.m_MemberInfo[v12]._Mylast )
  {
    v13 = (PgWin *)(v12 >= 4 ? 0 : v4->m_pkExpeditionPartyWin[v12]);
    if ( (unsigned __int8)((int (__thiscall *)(PgWin *))v13->vfptr[65].__vecDelDtor)(v13) )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, v13);
  }
  if ( uiPreMyPartyIdx != g_kRaidinfo.m_uiMePartyIdx
    || g_kRaidinfo.m_uiMePartyIdx == *((_BYTE *)pvData + 22)
    || g_kRaidinfo.m_uiMePartyIdx == *((_BYTE *)pvData + 26) )
  {
    Party::Clear(&g_kParty);
    v14 = g_kRaidinfo.m_uiMePartyIdx;
    v15 = 0;
    if ( g_kRaidinfo.m_MemberInfo[g_kRaidinfo.m_uiMePartyIdx]._Mylast
       - g_kRaidinfo.m_MemberInfo[g_kRaidinfo.m_uiMePartyIdx]._Myfirst )
    {
      while ( 1 )
      {
        v16 = RaidInfo::GetRaidMemberInfoByIndex(&g_kRaidinfo, v14 + v15 + 4 * v14);
        if ( !v16 )
          goto LABEL_37;
        v17 = User::GetMainCharID(&g_kUser);
        if ( v16->m_kCharID.n5_code[0] == v17->n5_code[0]
          && v16->m_kCharID.n5_code[1] == v17->n5_code[1]
          && v16->m_kCharID.n5_code[2] == v17->n5_code[2]
          && v16->m_kCharID.n5_code[3] == v17->n5_code[3]
          && v16->m_kCharID.n5_code[4] == v17->n5_code[4] )
        {
          goto LABEL_37;
        }
        *(_DWORD *)v18 = v16->m_kCharID.n5_code[0];
        *(_QWORD *)&v18[4] = *(_QWORD *)&v16->m_kCharID.n5_code[1];
        *(_QWORD *)&v18[12] = *(_QWORD *)&v16->m_kCharID.n5_code[3];
        v19 = Party::GetMemberInfo(&g_kParty, *(Name5 *)v18);
        if ( v19 )
          break;
        v21 = v16->m_kCharID.n5_code[1];
        v22 = v16->m_kCharID.n5_code[0];
        kProto.charclass = v16->m_byChrClass;
        *(_QWORD *)&kProto.memberid.n5_code[1] = __PAIR__(v16->m_kCharID.n5_code[2], v21);
        v23 = v16->m_kCharID.n5_code[4];
        kProto.memberid.n5_code[0] = v22;
        *(_QWORD *)&kProto.memberid.n5_code[3] = __PAIR__(v23, v16->m_kCharID.n5_code[3]);
        v19 = Party::AddMember(&g_kParty, &kProto);
        if ( v19 )
        {
          v19->m_iHP = v16->m_iHP;
          v19->m_iSP = v16->m_iSP;
          v19->m_iMaxHP = v16->m_iMaxHP;
          v19->m_iMaxSP = v16->m_iMaxSP;
          v19->m_bShow = v16->m_bShow;
          v20 = v16->m_ucStatus;
          goto LABEL_36;
        }
LABEL_37:
        v14 = g_kRaidinfo.m_uiMePartyIdx;
        if ( ++v15 >= (unsigned int)(g_kRaidinfo.m_MemberInfo[g_kRaidinfo.m_uiMePartyIdx]._Mylast
                                   - g_kRaidinfo.m_MemberInfo[g_kRaidinfo.m_uiMePartyIdx]._Myfirst) )
          goto LABEL_38;
      }
      v19->m_iHP = v16->m_iHP;
      v19->m_iSP = v16->m_iSP;
      v19->m_iMaxHP = v16->m_iMaxHP;
      v19->m_iMaxSP = v16->m_iMaxSP;
      v19->m_bShow = v16->m_bShow;
      v19->m_byChrClass = v16->m_byChrClass;
      v20 = v16->m_ucStatus;
LABEL_36:
      v19->m_ucStatus = v20;
      v19->m_iLv = v16->m_iLv;
      goto LABEL_37;
    }
  }
LABEL_38:
  MiniMapWin::ClearRaidMember(v4->m_pkMiniMapWin);
  v24 = 0;
  do
  {
    v25 = RaidInfo::GetRaidMemberInfoByIndex(&g_kRaidinfo, v24);
    if ( v25 && v25->m_bShow )
      MiniMapWin::AddRaidMember(v4->m_pkMiniMapWin, v25);
    ++v24;
  }
  while ( v24 < 0x14 );
  v26 = v4->m_pkPartyWinInterface;
  if ( v26 )
    PartyWinInterface::Update(v26);
  return iRevBytes;
}

//----- (004A87E0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_RAID_DEL_SUB_LEADER_CMD(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (004A8810) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_RAID_SET_LOOTER_CMD(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (004A8840) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_CHAT_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // eax@1
  GameFrameWork *v4; // ebx@1
  SHINE_ITEM_STRUCT *v5; // edi@2
  int v6; // ebx@2
  int v7; // edx@7
  int v8; // ecx@7
  int v9; // eax@7
  int v10; // ecx@7
  unsigned int v11; // eax@7
  int v12; // edx@7
  unsigned int v13; // eax@7
  unsigned int v14; // edx@7
  ChatBlockListWin *v15; // eax@7
  unsigned int v16; // edx@7
  unsigned int v17; // ecx@8
  unsigned int v18; // edx@8
  unsigned int v19; // eax@8
  ChatBlockListWin *v20; // eax@8
  PROTO_CHAT_RESTRICT_INFO *v21; // eax@8
  _BYTE v22[20]; // ST00_20@11
  _BYTE v23[20]; // ST00_20@12
  Name5 pCharID; // [sp+Ch] [bp-B8h]@7
  GameFrameWork *v26; // [sp+20h] [bp-A4h]@1
  char acStr[129]; // [sp+24h] [bp-A0h]@7
  char acName[21]; // [sp+A8h] [bp-1Ch]@7

  v3 = *(_BYTE *)pvData;
  v4 = this;
  v26 = this;
  if ( v3 > 0 )
  {
    v5 = (SHINE_ITEM_STRUCT *)((char *)pvData + *((_BYTE *)pvData + 21) + 22);
    v6 = v3;
    do
    {
      GameFrameWork::AddSChatItemLink(v26, 0x2000, v5);
      ++v5;
      --v6;
    }
    while ( v6 );
    v4 = v26;
  }
  if ( *((_BYTE *)pvData + 21) > 0x80u )
    *((_BYTE *)pvData + 21) = -128;
  strncpy(acStr, (char *)pvData + 22, *((_BYTE *)pvData + 21));
  v7 = *((_BYTE *)pvData + 21);
  v8 = *(_DWORD *)((char *)pvData + 5);
  *(_DWORD *)acName = *(_DWORD *)((char *)pvData + 1);
  v9 = *(_DWORD *)((char *)pvData + 13);
  *(_DWORD *)&acName[4] = v8;
  v10 = *(_DWORD *)((char *)pvData + 17);
  *(_DWORD *)&acName[12] = v9;
  v11 = *(_DWORD *)((char *)pvData + 5);
  acStr[v7] = 0;
  v12 = *(_DWORD *)((char *)pvData + 9);
  *(_DWORD *)&acName[16] = v10;
  *(_QWORD *)&pCharID.n5_code[1] = __PAIR__(*(_DWORD *)((char *)pvData + 9), v11);
  v13 = *(_DWORD *)((char *)pvData + 17);
  *(_DWORD *)&acName[8] = v12;
  v14 = *(_DWORD *)((char *)pvData + 1);
  pCharID.n5_code[4] = v13;
  v15 = v4->m_pkChatBlockListWin;
  pCharID.n5_code[0] = v14;
  v16 = *(_DWORD *)((char *)pvData + 13);
  acName[20] = 0;
  pCharID.n5_code[3] = v16;
  if ( !CChatRestrict::Get(&v15->m_RestrictList, &pCharID)
    || (v17 = *(_DWORD *)((char *)pvData + 9),
        v18 = *(_DWORD *)((char *)pvData + 1),
        pCharID.n5_code[1] = *(_DWORD *)((char *)pvData + 5),
        v19 = *(_DWORD *)((char *)pvData + 17),
        pCharID.n5_code[2] = v17,
        pCharID.n5_code[4] = v19,
        v20 = v4->m_pkChatBlockListWin,
        pCharID.n5_code[0] = v18,
        pCharID.n5_code[3] = *(_DWORD *)((char *)pvData + 13),
        (v21 = CChatRestrict::Get(&v20->m_RestrictList, &pCharID)) != 0)
    && v21->bIsGM == 1 )
  {
    if ( !strcmp(acName, (const char *)((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)()) )
    {
      *(_DWORD *)v22 = *(_DWORD *)((char *)pvData + 1);
      *(_QWORD *)&v22[4] = *(_QWORD *)((char *)pvData + 5);
      *(_QWORD *)&v22[12] = *(_QWORD *)((char *)pvData + 13);
      GameFrameWork::AddRaidChat(v4, *(Name5 *)v22, acStr);
    }
    else
    {
      *(_DWORD *)v23 = *(_DWORD *)((char *)pvData + 1);
      *(_QWORD *)&v23[4] = *(_QWORD *)((char *)pvData + 5);
      *(_QWORD *)&v23[12] = *(_QWORD *)((char *)pvData + 13);
      GameFrameWork::AddOtherRaidChat(v4, *(Name5 *)v23, acStr);
    }
  }
  return iRevBytes;
}

//----- (004A8A40) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_FURNITURE_EMOTION_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  const char *v4; // eax@2
  AbStateInfecteeVtbl *v5; // esi@4
  int v6; // eax@4
  NiPoint3 kCharPos; // [sp+1Ch] [bp-Ch]@5

  v3 = this;
  if ( *((_WORD *)pvData + 2) != 5896 )
  {
    v4 = ErrMsgTable::GetErrMsg(*((_WORD *)pvData + 2));
    GameFrameWork::AddSysMsg(v3, v4);
    if ( ((int (*)(void))g_pkMainChar->vfptr[13].DeleteAbStateByAbstateIndex)() == 4 )
      ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[13].AddAbStateByAbstateIndex)(0);
    v5 = g_pkMainChar->vfptr;
    v6 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
    ((void (__thiscall *)(Char *, int))v5[6].Affect)(g_pkMainChar, v6);
    GameFrameWork::SetCharEmotionUIState(v3, 0);
    if ( !(unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[7].GetAbstateColor)() )
    {
      ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[6].SetAbStateProperty)(&kCharPos);
      World::GetAdvGroundPos(&g_kWorld, kCharPos.x, kCharPos.y, &kCharPos);
      ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[5].~AbStateInfectee)(&kCharPos);
    }
  }
  return iRevBytes;
}

//----- (004A8B30) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_MINIHOUSE_FURNITURE_EMOTION_CMD(int iRevBytes, void *pvData)
{
  signed int v3; // edi@2
  char *v4; // esi@3
  Char *v5; // eax@4
  int result; // eax@7

  if ( nowState )
  {
    v3 = 0;
    if ( *(_WORD *)pvData <= 0u )
    {
      result = iRevBytes;
    }
    else
    {
      v4 = (char *)pvData + 2;
      do
      {
        v5 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)v4);
        if ( v5 )
        {
          CharMgr::ImmediatelyLoadQueueingChar(&g_kCharMgr, v5);
          MiniHouseIndoor::ActMHEmotion(&g_kWorld.m_MiniHouseIndoorMode, (FURNITURE_EMOTION_INFO *)v4);
          MiniHouseIndoor::AddObjSeatInfo(
            &g_kWorld.m_MiniHouseIndoorMode,
            (unsigned __int8)v4[4],
            *(_WORD *)v4,
            *((_WORD *)v4 + 1));
        }
        ++v3;
        v4 += 6;
      }
      while ( v3 < *(_WORD *)pvData );
      result = iRevBytes;
    }
  }
  else
  {
    result = iRevBytes;
  }
  return result;
}

//----- (004A8BC0) --------------------------------------------------------
void __thiscall GameFrameWork::On_NC_MINIHOUSE_FURNITURE_EMOTION_CANCEL_REQ(GameFrameWork *this)
{
  Net *v1; // ecx@1
  GameFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  v1 = this->m_spZoneNet.m_pObject;
  LOWORD(netcmd) = -29595;
  PgNet::SendNetMsg((PgNet *)&v1->vfptr, &netcmd, 2);
}

//----- (004A8BF0) --------------------------------------------------------
int __userpurge GameFrameWork::On_NC_MINIHOUSE_FURNITURE_EMOTION_CANCEL_CMD@<eax>(GameFrameWork *this@<ecx>, NiPoint3 *a2@<ebx>, float a3@<edi>, int a4@<esi>, int iRevBytes, void *pvData)
{
  _WORD *v6; // edi@2
  unsigned __int16 *v7; // ebx@3
  Char *v8; // eax@4
  Char *v9; // esi@4
  void (__thiscall *v10)(AbStateInfectee *, ABSTATEINDEX, bool, int); // edx@7
  AbStateInfecteeVtbl *v11; // edi@7
  int v12; // eax@7
  AbStateInfecteeVtbl *v13; // esi@12
  NiPoint3 *v14; // eax@12
  AbStateInfecteeVtbl *v15; // esi@13
  int v16; // ecx@14
  int result; // eax@15
  int v18; // [sp+28h] [bp-2Ch]@3
  NiPoint3 *v19; // [sp+2Ch] [bp-28h]@3
  float v20; // [sp+30h] [bp-24h]@2
  NiPoint3 kTargetPos; // [sp+34h] [bp-20h]@11
  NiPoint3 kCharPos; // [sp+40h] [bp-14h]@7
  GameFrameWork *v23; // [sp+4Ch] [bp-8h]@1
  int i; // [sp+50h] [bp-4h]@2

  v23 = this;
  if ( nowState )
  {
    v20 = a3;
    v6 = pvData;
    i = 0;
    if ( *(_WORD *)pvData <= 0u )
    {
      result = iRevBytes;
    }
    else
    {
      v19 = a2;
      v18 = a4;
      v7 = (unsigned __int16 *)((char *)pvData + 2);
      do
      {
        v8 = CharMgr::GetChar(&g_kCharMgr, *v7);
        v9 = v8;
        if ( v8 )
        {
          if ( v8 != g_pkMainChar && !(unsigned __int8)((int (__thiscall *)(Char *))v8->vfptr[7].GetAbstateColor)(v8) )
          {
            ((void (__thiscall *)(Char *, NiPoint3 *))v9->vfptr[6].SetAbStateProperty)(v9, &kCharPos);
            World::GetAdvGroundPos(&g_kWorld, kCharPos.x, kCharPos.y, &kCharPos);
            v10 = v9->vfptr[7].SetAbStateProperty;
            kCharPos.x = kCharPos.x + 1.0;
            ((void (__thiscall *)(Char *, NiPoint3 *, _DWORD, NiColor *, signed int))v10)(
              v9,
              &kCharPos,
              0,
              &Char::INVALIDPOINT3,
              1);
            v11 = v9->vfptr;
            v12 = ((int (__thiscall *)(Char *))v9->vfptr[6].DeleteAbStateByAbstateIndex)(v9);
            ((void (__thiscall *)(Char *, int))v11[6].Affect)(v9, v12);
            v6 = pvData;
          }
          MiniHouseIndoor::DelObjSeatInfo(&g_kWorld.m_MiniHouseIndoorMode, *v7);
          if ( v9 == g_pkMainChar && ((int (*)(void))g_pkMainChar->vfptr[13].DeleteAbStateByAbstateIndex)() == 4 )
          {
            MainChar::CancelMHEmotion((MainChar *)g_pkMainChar);
            GameFrameWork::SetCharEmotionUIState(v23, 0);
            if ( (unsigned __int8)((int (__stdcall *)(int, NiPoint3 *, _DWORD))g_pkMainChar->vfptr[7].GetAbstateColor)(
                                    v18,
                                    v19,
                                    LODWORD(v20)) )
            {
              v13 = g_pkMainChar->vfptr;
              LODWORD(v20) = 1;
              v19 = (NiPoint3 *)&Char::INVALIDPOINT3;
              v14 = MainChar::GetRevserveMovePos((MainChar *)g_pkMainChar);
              ((void (__thiscall *)(Char *, NiPoint3 *, _DWORD))v13[7].SetAbStateProperty)(g_pkMainChar, v14, 0);
            }
            else
            {
              ((void (__stdcall *)(NiPoint3 *, _DWORD, _DWORD))g_pkMainChar->vfptr[6].SetAbStateProperty)(
                &kTargetPos,
                LODWORD(kTargetPos.x),
                LODWORD(kTargetPos.y));
              World::GetAdvGroundPos(&g_kWorld, kTargetPos.y, kTargetPos.y, &kTargetPos);
              LODWORD(kTargetPos.y) = 1;
              v20 = 0.0;
              kTargetPos.x = kTargetPos.x + 1.0;
              v19 = &kTargetPos;
              ((void (*)(void))g_pkMainChar->vfptr[7].SetAbStateProperty)();
            }
            v15 = g_pkMainChar->vfptr;
            v18 = ((int (*)(void))g_pkMainChar->vfptr[6].DeleteAbStateByAbstateIndex)();
            ((void (__thiscall *)(Char *))v15[6].Affect)(g_pkMainChar);
          }
        }
        v16 = *v6;
        ++v7;
        ++i;
      }
      while ( i < v16 );
      result = iRevBytes;
    }
  }
  else
  {
    result = iRevBytes;
  }
  return result;
}
// 4A8BF0: could not find valid save-restore pair for ebx
// 4A8BF0: could not find valid save-restore pair for edi
// 4A8BF0: could not find valid save-restore pair for esi

//----- (004A8DF0) --------------------------------------------------------
void __thiscall GameFrameWork::On_NC_ITEM_REVIVEITEMUSE_CMD(GameFrameWork *this)
{
  Net *v1; // ecx@1
  GameFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  v1 = this->m_spZoneNet.m_pObject;
  LOWORD(netcmd) = 12345;
  PgNet::SendNetMsg((PgNet *)&v1->vfptr, &netcmd, 2);
}

//----- (004A8E20) --------------------------------------------------------
void __thiscall GameFrameWork::On_NC_SKILL_REPLYREVIVE_CMD(GameFrameWork *this)
{
  Net *v1; // ecx@1
  GameFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  v1 = this->m_spZoneNet.m_pObject;
  LOWORD(netcmd) = 18474;
  PgNet::SendNetMsg((PgNet *)&v1->vfptr, &netcmd, 2);
}

//----- (004A8E50) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_BRIEFINFO_ABSTATE_CHANGE_CMD(int iRevBytes, void *pvData)
{
  void *v3; // ebx@1
  Char *v4; // eax@1
  AbStateInfectee *v5; // esi@1
  NiTListItem<AbStateInst *> *v6; // edi@3
  AbStateInst *v7; // eax@4
  int v8; // ebx@5
  int v9; // esi@5
  int *v10; // eax@7
  int v11; // eax@8
  AbStateInst *pkState; // [sp+8h] [bp-8h]@4
  Char *pkChar; // [sp+Ch] [bp-4h]@1

  v3 = pvData;
  v4 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  v5 = (AbStateInfectee *)v4;
  pkChar = v4;
  if ( v4 )
  {
    if ( AbStateInfectee::IsInList((AbStateInfectee *)&v4->vfptr, *(ABSTATEINDEX *)((char *)pvData + 2)) )
    {
      v6 = AbStateInfectee::GetAbStateList(v5)->m_pkHead;
      if ( v6 )
      {
        do
        {
          AbStateInfectee::GetAbStateList(v5);
          v7 = v6->m_element;
          v6 = v6->m_pkNext;
          pkState = v7;
          if ( v7 )
          {
            v8 = v7->kID;
            v9 = ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
            if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable
                                                                  + 16))(
                                    ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable,
                                    v8) )
            {
              if ( (unsigned __int16)v8 <= *(_WORD *)(v9 + 200) )
              {
                v10 = (int *)(*(_DWORD *)(v9 + 196) + 4 * v8);
                if ( *v10 )
                {
                  v11 = *v10;
                  if ( v11 )
                  {
                    if ( *(_DWORD *)(v11 + 34) == *(_DWORD *)((char *)pvData + 2) )
                      pkState->uiSubStateStr = *(_DWORD *)((char *)pvData + 10);
                  }
                }
              }
            }
            v5 = (AbStateInfectee *)pkChar;
          }
        }
        while ( v6 );
        v3 = pvData;
      }
    }
  }
  EffectMgr::SetAbstateInform(&g_kEffectMgr, (ABSTATE_INFORMATION *)((char *)v3 + 2), *(_WORD *)v3);
  return iRevBytes;
}
// A8C2A0: using guessed type int ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;

//----- (004A8F20) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_BRIEFINFO_ABSTATE_CHANGE_LIST_CMD(int iRevBytes, void *pvData)
{
  unsigned __int16 *v3; // ebx@1
  Char *v4; // esi@2
  ABSTATE_INFORMATION *v5; // edi@3
  NiTListItem<AbStateInst *> *v6; // edi@6
  AbStateInst *v7; // eax@7
  int v8; // ebx@8
  int v9; // esi@8
  int *v10; // eax@10
  int v11; // eax@11
  int result; // eax@18
  AbStateInst *pkState; // [sp+4h] [bp-10h]@7
  int i; // [sp+8h] [bp-Ch]@2
  Char *pkChar; // [sp+Ch] [bp-8h]@2
  char *v16; // [sp+10h] [bp-4h]@3

  v3 = (unsigned __int16 *)pvData;
  if ( pvData )
  {
    v4 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
    pkChar = v4;
    i = 0;
    if ( *((_BYTE *)pvData + 2) )
    {
      v5 = (ABSTATE_INFORMATION *)((char *)pvData + 3);
      v16 = (char *)pvData + 3;
      do
      {
        EffectMgr::SetAbstateInform(&g_kEffectMgr, v5, *v3);
        if ( v4 )
        {
          if ( AbStateInfectee::IsInList((AbStateInfectee *)&v4->vfptr, v5->abstateID) )
          {
            v6 = AbStateInfectee::GetAbStateList((AbStateInfectee *)&v4->vfptr)->m_pkHead;
            if ( v6 )
            {
              do
              {
                AbStateInfectee::GetAbStateList((AbStateInfectee *)&v4->vfptr);
                v7 = v6->m_element;
                v6 = v6->m_pkNext;
                pkState = v7;
                if ( v7 )
                {
                  v8 = v7->kID;
                  v9 = ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
                  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable
                                                                        + 16))(
                                          ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable,
                                          v8) )
                  {
                    if ( (unsigned __int16)v8 <= *(_WORD *)(v9 + 200) )
                    {
                      v10 = (int *)(*(_DWORD *)(v9 + 196) + 4 * v8);
                      if ( *v10 )
                      {
                        v11 = *v10;
                        if ( v11 )
                        {
                          if ( *(_DWORD *)(v11 + 34) == *(_DWORD *)v16 )
                            pkState->uiSubStateStr = *((_DWORD *)v16 + 2);
                        }
                      }
                    }
                  }
                  v4 = pkChar;
                }
              }
              while ( v6 );
              v3 = (unsigned __int16 *)pvData;
            }
          }
        }
        v5 = (ABSTATE_INFORMATION *)(v16 + 12);
        ++i;
        v16 += 12;
      }
      while ( i < *((_BYTE *)v3 + 2) );
      result = iRevBytes;
    }
    else
    {
      result = iRevBytes;
    }
  }
  else
  {
    result = iRevBytes;
  }
  return result;
}
// A8C2A0: using guessed type int ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;

//----- (004A9040) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_PARTY_SET_LOOTER_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  _BYTE v4[20]; // ST00_20@3
  int v5; // edx@3
  int v6; // eax@3
  int v7; // ecx@3
  int v8; // eax@3
  PartyLootSetupWin *v9; // ecx@3
  const char *v10; // eax@4
  char acName[21]; // [sp+8h] [bp-1Ch]@3

  v3 = this;
  if ( *((_WORD *)pvData + 10) == 1368 )
  {
    if ( this->m_pkPartyLootSetupWin )
    {
      *(_DWORD *)v4 = *(_DWORD *)pvData;
      *(_QWORD *)&v4[4] = *(_QWORD *)((char *)pvData + 4);
      *(_QWORD *)&v4[12] = *(_QWORD *)((char *)pvData + 12);
      Party::SetLooterID(&g_kParty, *(Name5 *)v4);
      v5 = *((_DWORD *)pvData + 2);
      v6 = *(_DWORD *)pvData;
      *(_DWORD *)&acName[4] = *((_DWORD *)pvData + 1);
      v7 = *((_DWORD *)pvData + 4);
      *(_DWORD *)&acName[8] = v5;
      *(_DWORD *)acName = v6;
      v8 = *((_DWORD *)pvData + 3);
      *(_DWORD *)&acName[16] = v7;
      v9 = v3->m_pkPartyLootSetupWin;
      *(_DWORD *)&acName[12] = v8;
      acName[20] = 0;
      PartyLootSetupWin::SetLooterName(v9, acName);
    }
  }
  else
  {
    v10 = ErrMsgTable::GetErrMsg(*((_WORD *)pvData + 10));
    GameFrameWork::AddSysMsg(v3, v10);
  }
  return iRevBytes;
}

//----- (004A9100) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_PARTY_ITEM_JOIN_LOOTING_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  _BYTE v4[20]; // ST00_20@1
  PartyLootSetupWin *v5; // ecx@1
  int v6; // edx@2
  int v7; // eax@2
  int v8; // edx@2
  char acstr[21]; // [sp+8h] [bp-1Ch]@2

  v3 = this;
  PartyLootSetupWin::SetItemGrade(this->m_pkPartyLootSetupWin, *(_BYTE *)pvData);
  PartyLootSetupWin::SetLootingType(v3->m_pkPartyLootSetupWin, *((_BYTE *)pvData + 1));
  Party::SetLootType(&g_kParty, *(_BYTE *)pvData, *((_BYTE *)pvData + 1));
  *(_DWORD *)v4 = *(_DWORD *)((char *)pvData + 2);
  *(_QWORD *)&v4[4] = *(_QWORD *)((char *)pvData + 6);
  *(_QWORD *)&v4[12] = *(_QWORD *)((char *)pvData + 14);
  Party::SetLooterID(&g_kParty, *(Name5 *)v4);
  v5 = v3->m_pkPartyLootSetupWin;
  if ( v5 )
  {
    v6 = *(_DWORD *)((char *)pvData + 2);
    *(_DWORD *)&acstr[4] = *(_DWORD *)((char *)pvData + 6);
    v7 = *(_DWORD *)((char *)pvData + 14);
    *(_DWORD *)acstr = v6;
    v8 = *(_DWORD *)((char *)pvData + 10);
    *(_DWORD *)&acstr[12] = v7;
    *(_DWORD *)&acstr[8] = v8;
    *(_DWORD *)&acstr[16] = *(_DWORD *)((char *)pvData + 18);
    acstr[20] = 0;
    PartyLootSetupWin::SetLooterName(v5, acstr);
  }
  return iRevBytes;
}

//----- (004A91C0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MAP_MULTY_LINK_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GateChannelWin *v3; // ecx@1

  v3 = this->m_pkGateChannelWin;
  if ( v3 )
    GateChannelWin::OpenWindow(v3, (PROTO_NC_MAP_MULTY_LINK_CMD *)pvData);
  return iRevBytes;
}

//----- (004A91E0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MISC_GET_CHAT_BLOCK_SPAM_FILTER_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  ChatDisplayWin2 *v4; // ecx@2
  bool v5; // al@2
  float fRate; // ST00_4@2

  v3 = this;
  if ( this->m_pkChatDisplayWin )
  {
    v4 = this->m_pkChatDisplayWin;
    v5 = *((_BYTE *)pvData + 1) != 0;
    v4->m_aspChatBD[0].m_pObject->m_Filter = v5;
    v4->m_pkSpamFilterOnOff->m_bCheck = v5;
    fRate = (double)*((_BYTE *)pvData + 2);
    ChatDisplayWin2::SetSpamBlockRate(v3->m_pkChatDisplayWin, fRate);
    ChatDisplayWin2::SetSpamFilteredTextShow(v3->m_pkChatDisplayWin, *(_BYTE *)pvData != 0);
  }
  return iRevBytes;
}

//----- (004A9250) --------------------------------------------------------
void __thiscall GameFrameWork::NcItemEnchantAddNewSocketReq(GameFrameWork *this, ITEM_INVEN kDrill, ITEM_INVEN kWeapon)
{
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@1
  PROTO_NC_ITEM_ENCHANT_ADD_NEW_SOCKET_REQ kProto; // [sp+4h] [bp-8h]@1
  __int16 pdata; // [sp+8h] [bp-4h]@1

  v3 = this;
  kProto.drill = kDrill;
  kProto.equipment = kWeapon;
  v4 = this->m_spZoneNet.m_pObject;
  pdata = 12356;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v3->m_spZoneNet.m_pObject->vfptr, &kProto, 4);
}

//----- (004A92A0) --------------------------------------------------------
void __thiscall GameFrameWork::NcQuestStartReq(GameFrameWork *this, unsigned __int16 nQuestID)
{
  unsigned __int16 v2; // ax@1
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@1
  PROTO_NC_QUEST_START_REQ kReq; // [sp+4h] [bp-4h]@1

  v2 = nQuestID;
  v3 = this;
  nQuestID = 17428;
  v4 = this->m_spZoneNet.m_pObject;
  kReq.nQuestID = v2;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &nQuestID, 2);
  PgNet::SendNetMsg((PgNet *)&v3->m_spZoneNet.m_pObject->vfptr, &kReq, 2);
}

//----- (004A92F0) --------------------------------------------------------
void __thiscall GameFrameWork::NcQuestReadReq(GameFrameWork *this, unsigned __int16 nQuestID)
{
  unsigned __int16 v2; // ax@1
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@1
  PROTO_NC_QUEST_READ_REQ kReq; // [sp+4h] [bp-4h]@1

  v2 = nQuestID;
  v3 = this;
  nQuestID = 17430;
  v4 = this->m_spZoneNet.m_pObject;
  kReq.nQuestID = v2;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &nQuestID, 2);
  PgNet::SendNetMsg((PgNet *)&v3->m_spZoneNet.m_pObject->vfptr, &kReq, 2);
}

//----- (004A9340) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_OPTION_IMPROVE_INIT_GAMEOPTION_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  OptionSystemWin *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData == 8480 )
  {
    MachineOpt::SetGameOpt((PROTO_NC_CHAR_OPTION_IMPROVE_GET_GAMEOPTION_CMD *)pvData + 1);
    v4 = v3->m_pkOptionSystemWin;
    qmemcpy(&v4->m_kOpenGameOption, &MachineOpt::ms_kGameOption, sizeof(v4->m_kOpenGameOption));
    OptionSystemWin::SetInfo(v4, &v4->m_kOpenGameOption);
  }
  return iRevBytes;
}
// B4FF60: using guessed type struct MachineOpt::GameOption MachineOpt::ms_kGameOption;

//----- (004A9390) --------------------------------------------------------
void __thiscall GameFrameWork::NcCharSaveUIStateSaveReq(GameFrameWork *this, int bOn)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  __int16 pdata; // [sp+4h] [bp-4h]@1

  v2 = this;
  pdata = 16421;
  v3 = this->m_spZoneNet.m_pObject;
  BYTE3(bOn) = bOn;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v2->m_spZoneNet.m_pObject->vfptr, (char *)&bOn + 3, 1);
}

//----- (004A93D0) --------------------------------------------------------
int __userpurge GameFrameWork::On_NC_ACT_NPC_ACTION_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<ebx>, int iRevBytes, void *pvData)
{
  Char *v4; // ecx@1

  v4 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)((char *)pvData + 1));
  if ( v4 )
    Char::ActAction(
      v4,
      a2,
      100 * (*(_DWORD *)((char *)pvData + 3) / 0x2710u),
      (AniEventCode::Code1)(10000 * (*(_DWORD *)((char *)pvData + 3) / 0x2710u)),
      (AniEventCode::Code2)(100
                          * (*(_DWORD *)((char *)pvData + 3) / 0x64u - 100 * (*(_DWORD *)((char *)pvData + 3) / 0x2710u))));
  return iRevBytes;
}

//----- (004A9430) --------------------------------------------------------
void __userpurge GameFrameWork::NcCollectCardregistReq(GameFrameWork *this@<ecx>, double a2@<st0>, unsigned int uiSlot)
{
  GameFrameWork *v3; // esi@1
  PgNet *v4; // ecx@2
  PgNet *v5; // ecx@2
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@2
  PROTO_NC_COLLECT_CARDREGIST_REQ kProto; // [sp+Bh] [bp-1h]@2

  v3 = this;
  if ( !GameFrameWork::IsPlayCardOpen(this, a2) )
  {
    v4 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
    netcmd.protocol = -15352;
    PgNet::AddNetMsg(v4, &netcmd, 2);
    v5 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
    kProto.invenslot = uiSlot;
    PgNet::SendNetMsg(v5, &kProto, 1);
  }
}

//----- (004A9480) --------------------------------------------------------
void __thiscall GameFrameWork::NcCollectBookmarkRegistReq(GameFrameWork *this, unsigned int uiSlot, unsigned int uiCardID)
{
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@1
  unsigned __int16 v5; // ax@1
  PgNet *v6; // ecx@3
  PROTO_NC_COLLECT_BOOKMARK_REGIST_REQ kProto; // [sp+4h] [bp-8h]@1
  NETCOMMAND netcmd; // [sp+8h] [bp-4h]@1

  v3 = this;
  v4 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = -15348;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
  v5 = uiCardID;
  kProto.BookMarkSlot = uiSlot;
  if ( !uiCardID )
    v5 = -1;
  v6 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
  kProto.CardID = v5;
  PgNet::SendNetMsg(v6, &kProto, 4);
}

//----- (004A94E0) --------------------------------------------------------
void __thiscall GameFrameWork::NcCollectRewardReq(GameFrameWork *this, unsigned int uiRewardID, unsigned __int16 kItemID)
{
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@1
  PgNet *v5; // ecx@1
  PROTO_NC_COLLECT_REWARD_REQ kProto; // [sp+4h] [bp-8h]@1
  NETCOMMAND netcmd; // [sp+8h] [bp-4h]@1

  v3 = this;
  v4 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = -15344;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
  v5 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
  kProto.RewardID = uiRewardID;
  kProto.RewardItem = kItemID;
  PgNet::SendNetMsg(v5, &kProto, 4);
}

//----- (004A9530) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_TOGGLESKILL_OFF_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  ShortCutWin **v4; // esi@1
  signed int v5; // ebx@1

  v3 = this;
  ShortCutWin::OffToggleKey(this->m_pkShortCutWin, *(_WORD *)pvData);
  ShortCutWin::OffToggleKey(v3->m_pkShortCutWinV, *(_WORD *)pvData);
  v4 = v3->m_pkShortCutSubWinV;
  v5 = 4;
  do
  {
    ShortCutWin::OffToggleKey(*(v4 - 5), *(_WORD *)pvData);
    ShortCutWin::OffToggleKey(*v4, *(_WORD *)pvData);
    ++v4;
    --v5;
  }
  while ( v5 );
  Skill::RecordSkillUse(*(_WORD *)pvData, Timer::ms_fCurTime, 0.0, 0.0);
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004A95B0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_SKILLBLAST_LIGHTNINGWAVE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // ebx@2
  int v4; // esi@2
  int v5; // esi@3
  int v6; // edx@6
  Char *v7; // ebx@9
  Char *v8; // eax@9
  float fSpeed; // ST14_4@12
  int result; // eax@13
  GameFrameWork *v11; // [sp+28h] [bp-4h]@1

  v11 = this;
  if ( AttackSequenceManager::GetSkillDmgInfoSetbyIndex((AttackSequenceManager *)&g_pkMainChar->vfptr, *(_WORD *)pvData) )
  {
    result = iRevBytes;
  }
  else
  {
    v3 = *((_WORD *)pvData + 1);
    v4 = ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable
                                                          + 16))(
                            ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable,
                            v3) )
    {
      if ( (unsigned __int16)v3 <= *(_WORD *)(v4 + 200) )
      {
        v6 = *(_DWORD *)(v4 + 196);
        if ( *(_DWORD *)(v6 + 4 * v3) )
          v5 = *(_DWORD *)(v6 + 4 * v3);
        else
          v5 = 0;
      }
      else
      {
        v5 = 0;
      }
    }
    else
    {
      v5 = 0;
    }
    v7 = CharMgr::GetChar(&g_kCharMgr, *((_WORD *)pvData + 2));
    v8 = CharMgr::GetChar(&g_kCharMgr, *((_WORD *)pvData + 3));
    if ( v5 && v7 )
    {
      if ( v8 )
      {
        fSpeed = (double)*(unsigned int *)(v5 + 191);
        EffectMgr::CreateLightningShootEff(
          &g_kEffectMgr,
          (char *)(v5 + 195),
          (char *)(v5 + 291),
          v7,
          v8,
          Timer::ms_fCurTime,
          fSpeed,
          0,
          *(LastEffPos *)(v5 + 323),
          *((_WORD *)pvData + 1) != 0,
          0xFFFFu);
        v11->m_LightningWaveInfo.bAddLightningWave = 1;
        v11->m_LightningWaveInfo.kSkillID = *((_WORD *)pvData + 1);
      }
    }
    result = iRevBytes;
  }
  return result;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8CAA0: using guessed type int ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable;

//----- (004A96D0) --------------------------------------------------------
void __thiscall GameFrameWork::NcCharEventAttendRewardReq(GameFrameWork *this, int iWeekIndex, int iIndex)
{
  int v3; // esi@1
  unsigned __int16 v4; // di@1
  GameFrameWork *v5; // ebx@1
  _BYTE **v6; // eax@3
  _BYTE *v7; // esi@4
  PgNet *v8; // ecx@5
  PgNet *v9; // ecx@5
  NETCOMMAND netcmd; // [sp+Ch] [bp-4h]@5

  v3 = ITableBase<AttendReward,AttendRewardTab>::ms_pkTable;
  v4 = iWeekIndex;
  v5 = this;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AttendReward,AttendRewardTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<AttendReward,AttendRewardTab>::ms_pkTable,
                          iWeekIndex) )
  {
    if ( v4 <= *(_WORD *)(v3 + 200) )
    {
      v6 = (_BYTE **)(*(_DWORD *)(v3 + 196) + 4 * v4);
      if ( *v6 )
      {
        v7 = *v6;
        if ( *v6 )
        {
          v8 = (PgNet *)&v5->m_spWorldMgrNet.m_pObject->vfptr;
          netcmd.protocol = 4337;
          PgNet::AddNetMsg(v8, &netcmd, 2);
          LOBYTE(iWeekIndex) = iIndex;
          v9 = (PgNet *)&v5->m_spWorldMgrNet.m_pObject->vfptr;
          BYTE1(iWeekIndex) = *v7;
          PgNet::SendNetMsg(v9, &iWeekIndex, 2);
        }
      }
    }
  }
}
// A8C28C: using guessed type int ITableBase<AttendReward,AttendRewardTab>::ms_pkTable;

//----- (004A9750) --------------------------------------------------------
void __thiscall GameFrameWork::NcCharRebirthCmd(GameFrameWork *this)
{
  Net *v1; // ecx@1
  GameFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  v1 = this->m_spZoneNet.m_pObject;
  LOWORD(netcmd) = 4354;
  PgNet::SendNetMsg((PgNet *)&v1->vfptr, &netcmd, 2);
}

//----- (004A9780) --------------------------------------------------------
void __thiscall GameFrameWork::NcCharRebirthRejectCmd(GameFrameWork *this)
{
  Net *v1; // ecx@1
  GameFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  v1 = this->m_spZoneNet.m_pObject;
  LOWORD(netcmd) = 4355;
  PgNet::SendNetMsg((PgNet *)&v1->vfptr, &netcmd, 2);
}

//----- (004A97B0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SCENARIO_CAMERA_MOVE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  float v4; // ST0C_4@5
  float fX; // ST08_4@5
  CameraEffect *v6; // eax@5
  float v7; // edx@5
  double v8; // st7@5
  float fAngleUD; // ST10_4@5
  float v10; // ST0C_4@5
  unsigned int fY; // [sp+Ch] [bp-34h]@3
  NiPoint3 CameraLookAt; // [sp+1Ch] [bp-24h]@3
  NiPoint3 DestPos; // [sp+28h] [bp-18h]@5
  float v15; // [sp+34h] [bp-Ch]@5
  float v16; // [sp+38h] [bp-8h]@5
  float v17; // [sp+3Ch] [bp-4h]@5

  v3 = this;
  if ( this->m_spCamEffect.m_pObject )
  {
    if ( !*(_BYTE *)pvData )
    {
      ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[21].Affect)(&CameraLookAt);
      fY = 4;
LABEL_6:
      CameraEffect::Start(v3->m_spCamEffect.m_pObject, Timer::ms_fCurTime, 0.5, fY, 1u);
      return iRevBytes;
    }
    if ( *(_BYTE *)pvData == 1 )
    {
      fX = (double)*(unsigned int *)((char *)pvData + 1);
      v4 = (double)*(unsigned int *)((char *)pvData + 5);
      World::GetAdvGroundPos(&g_kWorld, fX, v4, &DestPos);
      ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[21].Affect)(&CameraLookAt);
      v6 = v3->m_spCamEffect.m_pObject;
      v15 = DestPos.x - CameraLookAt.x;
      v16 = DestPos.y - CameraLookAt.y;
      v7 = v16;
      v8 = DestPos.z - CameraLookAt.z;
      v6->m_MovePos.x = v15;
      v6->m_MovePos.y = v7;
      v17 = v8;
      v6->m_MovePos.z = v17;
      fAngleUD = (double)*(_WORD *)((char *)pvData + 11);
      v10 = (double)*(_WORD *)((char *)pvData + 9);
      CameraEffect::SetAngle(v3->m_spCamEffect.m_pObject, v10, fAngleUD);
      fY = 3;
      v3->m_spCamEffect.m_pObject->m_fDist = (double)*(_WORD *)((char *)pvData + 13);
      goto LABEL_6;
    }
  }
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004A98E0) --------------------------------------------------------
void __thiscall GameFrameWork::NcActNpcMenuCmd(GameFrameWork *this, int iIndex)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  PROTO_NC_ACT_NPC_MENU_CMD kProto; // [sp+Bh] [bp-1h]@1

  v2 = this;
  v3 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 8307;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
  kProto.Ack = iIndex;
  PgNet::SendNetMsg(v4, &kProto, 1);
}

//----- (004A9930) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MOVER_SOMEONE_RIDE_ON_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // ebx@1
  unsigned __int16 *v4; // esi@1
  Mover *v5; // edi@1
  Char *v6; // eax@2
  void *v7; // eax@2
  _BYTE v8[12]; // ST10_12@3
  _BYTE v9[12]; // ST04_12@3
  void (__thiscall ***v10)(_DWORD, _DWORD); // esi@5

  v3 = this;
  v4 = (unsigned __int16 *)pvData;
  v5 = (Mover *)GameFrameWork::GetCharByHandle(this, *((_WORD *)pvData + 1), 51, 4);
  if ( v5 )
  {
    v6 = GameFrameWork::GetCharByHandle(v3, *v4, 51, 4);
    Mover::RideOn(v5, v6, *((_BYTE *)v4 + 4));
    Mover::GetSlotNode(v5, (NiPointer<NiNode> *)&pvData, *((_BYTE *)v4 + 4));
    v7 = pvData;
    if ( pvData )
    {
      *(float *)v8 = NiPoint3::UNIT_Y.x;
      *(_QWORD *)&v8[4] = *(_QWORD *)&NiPoint3::UNIT_Y.y;
      *(_DWORD *)v9 = *((_DWORD *)pvData + 35);
      *(_QWORD *)&v9[4] = *((_QWORD *)pvData + 18);
      EffectMgr::CreateEffect(&g_kEffectMgr, "Pet_St01", *(NiPoint3 *)v9, *(NiPoint3 *)v8, Timer::ms_fCurTime, 1.0);
      v7 = pvData;
    }
    if ( v7 )
    {
      v10 = (void (__thiscall ***)(_DWORD, _DWORD))v7;
      if ( !InterlockedDecrement((volatile LONG *)v7 + 1) )
      {
        if ( v10 )
          (**v10)(v10, 1);
      }
    }
  }
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004A9A50) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MOVER_SOMEONE_RIDE_OFF_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  Char *v3; // eax@1
  Char *v4; // edi@1
  Mover *v5; // esi@2
  _BYTE v6[12]; // ST10_12@4
  _BYTE v7[12]; // ST04_12@4
  void *v8; // esi@6

  v3 = GameFrameWork::GetCharByHandle(this, *(_WORD *)pvData, 51, 8);
  v4 = v3;
  if ( v3 )
  {
    v5 = v3->m_pkMover;
    if ( v5 )
    {
      Mover::GetSlotNode(v5, (NiPointer<NiNode> *)&pvData, v3->m_uiMoverSlot);
      if ( pvData )
      {
        *(float *)v6 = NiPoint3::UNIT_Y.x;
        *(_QWORD *)&v6[4] = *(_QWORD *)&NiPoint3::UNIT_Y.y;
        *(_DWORD *)v7 = *((_DWORD *)pvData + 35);
        *(_QWORD *)&v7[4] = *((_QWORD *)pvData + 18);
        EffectMgr::CreateEffect(&g_kEffectMgr, "Pet_Fi01", *(NiPoint3 *)v7, *(NiPoint3 *)v6, Timer::ms_fCurTime, 1.0);
      }
      Mover::SetMoverEffect(v5, 0, 0, 0);
      Mover::RideOff(v5, v4->m_uiMoverSlot);
      if ( pvData )
      {
        v8 = pvData;
        if ( !InterlockedDecrement((volatile LONG *)pvData + 1) )
        {
          if ( v8 )
            (**(void (__thiscall ***)(void *, signed int))v8)(v8, 1);
        }
      }
    }
  }
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004A9B80) --------------------------------------------------------
void __thiscall GameFrameWork::NcMoverRideOnReq(GameFrameWork *this, unsigned __int16 kHandle, unsigned int uiSlot)
{
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@1
  PgNet *v5; // ecx@1
  PROTO_NC_MOVER_RIDE_ON_REQ kProto; // [sp+4h] [bp-8h]@1
  NETCOMMAND netcmd; // [sp+8h] [bp-4h]@1

  v3 = this;
  v4 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = -13311;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
  v5 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
  kProto.nMoverHandle = kHandle;
  kProto.nSlot = uiSlot;
  PgNet::SendNetMsg(v5, &kProto, 3);
}

//----- (004A9BD0) --------------------------------------------------------
void __thiscall GameFrameWork::NcMoverRideOffReq(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Net *v2; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  char pdata; // [sp+Bh] [bp-1h]@1

  v1 = this;
  v2 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = -13307;
  PgNet::AddNetMsg((PgNet *)&v2->vfptr, &netcmd, 2);
  PgNet::SendNetMsg((PgNet *)&v1->m_spZoneNet.m_pObject->vfptr, &pdata, 1);
}

//----- (004A9C10) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_PET_SET_NAME_CMD(int iRevBytes, void *pvData)
{
  Char *v3; // eax@1
  int v4; // edx@2
  int v5; // ecx@2
  int v6; // edx@2
  AbStateInfectee::AbstateColor (__thiscall *v7)(AbStateInfectee *); // edx@2
  char acName[17]; // [sp+4h] [bp-18h]@2

  v3 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  if ( v3 )
  {
    v4 = *(_DWORD *)((char *)pvData + 6);
    *(_DWORD *)acName = *(_DWORD *)((char *)pvData + 2);
    v5 = *(_DWORD *)((char *)pvData + 10);
    *(_DWORD *)&acName[4] = v4;
    v6 = *(_DWORD *)((char *)pvData + 14);
    *(_DWORD *)&acName[8] = v5;
    *(_DWORD *)&acName[12] = v6;
    v7 = v3->vfptr[2].GetAbstateColor;
    acName[16] = 0;
    ((void (__thiscall *)(Char *, char *))v7)(v3, acName);
  }
  return iRevBytes;
}

//----- (004A9C80) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SCENARIO_TIMER_START_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  EventTimeWin *v4; // ecx@1

  v3 = this;
  v4 = this->m_pkEventTimeWin;
  if ( v4 )
  {
    EventTimeWin::Start(v4, Timer::ms_fCurTime);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkEventTimeWin->vfptr);
  }
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004A9CC0) --------------------------------------------------------
int __userpurge GameFrameWork::On_NC_ACT_EVENT_CODE_ACTION_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<ebx>, int iRevBytes, void *pvData)
{
  Char *v4; // ecx@1

  v4 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  if ( v4 )
    Char::ActAction(
      v4,
      a2,
      100 * (*(_DWORD *)((char *)pvData + 2) / 0x2710u),
      (AniEventCode::Code1)(10000 * (*(_DWORD *)((char *)pvData + 2) / 0x2710u)),
      (AniEventCode::Code2)(100
                          * (*(_DWORD *)((char *)pvData + 2) / 0x64u - 100 * (*(_DWORD *)((char *)pvData + 2) / 0x2710u))));
  return iRevBytes;
}

//----- (004A9D20) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_QUEST_RESET_TIME_CLIENT_CMD(int iRevBytes, void *pvData)
{
  CClientQuest *v3; // eax@1

  v3 = QuestDataMgr::GetQuest();
  if ( v3 )
  {
    CClientQuest::SetQuestResetTime(v3, (PROTO_NC_QUEST_RESET_TIME_CMD *)pvData);
    QuestDataMgr::m_bUpdate = 1;
  }
  return iRevBytes;
}
// A771B0: using guessed type bool QuestDataMgr::m_bUpdate;

//----- (004A9D50) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_KQ_VOTE_VOTING_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // edx@1
  GameFrameWork *v4; // ebx@1
  int v5; // ecx@1
  int v6; // eax@1
  int v7; // ecx@1
  int v8; // edx@3
  int v9; // ecx@3
  int v10; // eax@3
  int v11; // edx@3
  unsigned int v12; // eax@5
  char v14; // [sp+Ch] [bp-158h]@8
  char acStr[256]; // [sp+30h] [bp-134h]@7
  char acStarter[21]; // [sp+130h] [bp-34h]@1
  char acTarget[21]; // [sp+148h] [bp-1Ch]@3

  v3 = *((_DWORD *)pvData + 2);
  v4 = this;
  v5 = *((_DWORD *)pvData + 1);
  *(_DWORD *)acStarter = *(_DWORD *)pvData;
  v6 = *((_DWORD *)pvData + 3);
  *(_DWORD *)&acStarter[4] = v5;
  v7 = *((_DWORD *)pvData + 4);
  *(_DWORD *)&acStarter[12] = v6;
  *(_DWORD *)&acStarter[16] = v7;
  *(_DWORD *)&acStarter[8] = v3;
  acStarter[20] = 0;
  if ( strcmp(acStarter, (const char *)&unk_981E2B) )
    strcpy(v4->m_acStarter, acStarter);
  v8 = *((_DWORD *)pvData + 5);
  v9 = *((_DWORD *)pvData + 7);
  *(_DWORD *)&acTarget[4] = *((_DWORD *)pvData + 6);
  v10 = *((_DWORD *)pvData + 9);
  *(_DWORD *)acTarget = v8;
  v11 = *((_DWORD *)pvData + 8);
  *(_DWORD *)&acTarget[8] = v9;
  *(_DWORD *)&acTarget[16] = v10;
  *(_DWORD *)&acTarget[12] = v11;
  acTarget[20] = 0;
  if ( strcmp(acTarget, (const char *)&unk_981E61) )
    strcpy(v4->m_acTarget, acTarget);
  _mktime32((tm *)((char *)pvData + 41));
  VoteWin::SetProposerText(v4->m_pkVoteWin, acStarter);
  VoteWin::SetTargetText(v4->m_pkVoteWin, acTarget);
  VoteWin::SetReasonType(v4->m_pkVoteWin, *((_BYTE *)pvData + 40));
  LOBYTE(v12) = *((_BYTE *)pvData + 77);
  if ( (_BYTE)v12 )
  {
    v12 = (unsigned __int8)v12;
    if ( (signed int)(unsigned __int8)v12 < 256 )
    {
      strncpy(acStr, (char *)pvData + 78, v12);
      acStr[*((_BYTE *)pvData + 77)] = 0;
      VoteWin::SetReasonEditText(v4->m_pkVoteWin, acStr);
    }
  }
  qmemcpy(&v14, (char *)pvData + 41, 0x24u);
  qmemcpy(&v4->m_pkVoteWin->m_tEndTime, &v14, sizeof(v4->m_pkVoteWin->m_tEndTime));
  VoteWin::SetVoteWinType(v4->m_pkVoteWin, 0);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkVoteWin->vfptr);
  return iRevBytes;
}

//----- (004A9F30) --------------------------------------------------------
void __thiscall GameFrameWork::NcKqVoteVotingReq(GameFrameWork *this, KQ_VOTING_TYPE eVoteType)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@1
  PROTO_NC_KQ_VOTE_VOTING_REQ kProto; // [sp+4h] [bp-8h]@1
  NETCOMMAND netcmd; // [sp+8h] [bp-4h]@1

  v2 = this;
  v3 = this->m_spWorldMgrNet.m_pObject;
  netcmd.protocol = 22570;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = (PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr;
  kProto.eVoteType = eVoteType;
  PgNet::SendNetMsg(v4, &kProto, 4);
}

//----- (004A9F80) --------------------------------------------------------
void __thiscall GameFrameWork::NcKqJoinListReq(GameFrameWork *this, unsigned int kHandle)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@1
  PROTO_NC_KQ_JOIN_LIST_REQ kProto; // [sp+4h] [bp-8h]@1
  NETCOMMAND netcmd; // [sp+8h] [bp-4h]@1

  v2 = this;
  v3 = this->m_spWorldMgrNet.m_pObject;
  netcmd.protocol = 22577;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = (PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr;
  kProto.nHandle = kHandle;
  PgNet::SendNetMsg(v4, &kProto, 4);
}

//----- (004A9FD0) --------------------------------------------------------
void __thiscall GameFrameWork::NcKqVoteStartCheckReq(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Net *v2; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  char pdata; // [sp+Bh] [bp-1h]@1

  v1 = this;
  v2 = this->m_spWorldMgrNet.m_pObject;
  netcmd.protocol = 22580;
  PgNet::AddNetMsg((PgNet *)&v2->vfptr, &netcmd, 2);
  PgNet::SendNetMsg((PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr, &pdata, 1);
}

//----- (004AA010) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_SCENARIO_MAP_OBJECT_CONTROL_CMD(int iRevBytes, void *pvData)
{
  void *v3; // esi@1
  void *v4; // eax@1
  int v5; // ecx@2
  FadeObjectMgr *v6; // eax@6
  void (__thiscall ***v7)(_DWORD, _DWORD); // esi@12
  void *v9; // [sp-8h] [bp-20h]@4
  int v10; // [sp-4h] [bp-1Ch]@4
  void **v11; // [sp+8h] [bp-10h]@4
  int v12; // [sp+14h] [bp-4h]@1

  v3 = pvData;
  World::GetGroundObject(&g_kWorld, (int)pvData, (NiPointer<NiAVObject> *)&pvData, (const char *)pvData);
  v4 = pvData;
  v12 = 0;
  if ( pvData )
  {
    v5 = *(_DWORD *)((char *)v3 + 33);
    if ( !v5 )
    {
      if ( *((_BYTE *)v3 + 32) )
        *((_WORD *)pvData + 14) &= 0xFFFEu;
      else
        *((_WORD *)pvData + 14) |= 1u;
LABEL_10:
      v4 = pvData;
      goto LABEL_11;
    }
    if ( v5 == 1 )
    {
      v10 = *((_BYTE *)v3 + 32) != 0;
      v9 = pvData;
      v11 = &v9;
      if ( pvData )
        InterlockedIncrement((volatile LONG *)pvData + 1);
      LOBYTE(v12) = 1;
      Singleton<FadeObjectMgr>::getInstance();
      LOBYTE(v12) = 0;
      FadeObjectMgr::AddObject(v6, (NiPointer<NiAVObject>)v9, v10);
      goto LABEL_10;
    }
  }
LABEL_11:
  v12 = -1;
  if ( v4 )
  {
    v7 = (void (__thiscall ***)(_DWORD, _DWORD))v4;
    if ( !InterlockedDecrement((volatile LONG *)v4 + 1) )
    {
      if ( v7 )
        (**v7)(v7, 1);
    }
  }
  return iRevBytes;
}

//----- (004AA100) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ACT_ANIMATION_LEVEL_CHANGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  Char *v3; // eax@1

  v3 = GameFrameWork::GetCharByHandle(this, *(_WORD *)pvData, 8, 118);
  if ( v3 )
    v3->m_uiConditionAniLevel = *((_BYTE *)pvData + 2);
  return iRevBytes;
}

//----- (004AA130) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_USE_ACTIVESKILL_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2
  CastingProgressWin *v5; // ecx@3
  Char *v6; // eax@5

  v3 = this;
  if ( *(_WORD *)pvData != 12584 )
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
    if ( *(_WORD *)pvData == 12593 )
    {
      v5 = v3->m_pkCastingProgressBar;
      v3->m_kSkillCasting.eState = 0;
      CastingProgressWin::CastingFail(v5);
      if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[15].AddAbStateByAbstateIndex)() )
        Char::CancelSkillAction(g_pkMainChar, 0);
    }
  }
  v6 = g_pkMainChar;
  g_pkMainChar[1].m_szBlockName[1] = 0;
  *(_DWORD *)&v6[1].m_szBlockName[5] = 0;
  return iRevBytes;
}

//----- (004AA1C0) --------------------------------------------------------
void __thiscall GameFrameWork::NcItemUseActiveskillReq(GameFrameWork *this, unsigned int uiInvenSlot, unsigned __int16 kTargetHandle)
{
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@1
  PgNet *v5; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-14h]@1
  PROTO_NC_ITEM_USE_ACTIVESKILL_REQ kProto; // [sp+8h] [bp-10h]@1

  v3 = this;
  v4 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 12366;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
  kProto.nTargetHnd = kTargetHandle;
  v5 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
  kProto.nInvenSlot = uiInvenSlot;
  kProto.TargetLoc.x = 0;
  kProto.TargetLoc.y = 0;
  PgNet::SendNetMsg(v5, &kProto, 11);
}

//----- (004AA230) --------------------------------------------------------
void __thiscall GameFrameWork::NcItemUseActiveskillReq(GameFrameWork *this, unsigned int uiInvenSlot, unsigned int x, unsigned int y)
{
  GameFrameWork *v4; // esi@1
  Net *v5; // ecx@1
  PgNet *v6; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-14h]@1
  PROTO_NC_ITEM_USE_ACTIVESKILL_REQ kProto; // [sp+8h] [bp-10h]@1

  v4 = this;
  v5 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 12366;
  PgNet::AddNetMsg((PgNet *)&v5->vfptr, &netcmd, 2);
  kProto.nTargetHnd = -1;
  kProto.nInvenSlot = uiInvenSlot;
  kProto.TargetLoc.x = x;
  v6 = (PgNet *)&v4->m_spZoneNet.m_pObject->vfptr;
  kProto.TargetLoc.y = y;
  PgNet::SendNetMsg(v6, &kProto, 11);
}

//----- (004AA2A0) --------------------------------------------------------
void __thiscall GameFrameWork::NcMoverUpgradeReq(GameFrameWork *this, unsigned int uiMainInvenSlot, unsigned int uiSubInvenSlot)
{
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@1
  PgNet *v5; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  PROTO_NC_ITEM_MOVER_UPGRADE_REQ kProto; // [sp+8h] [bp-4h]@1

  v3 = this;
  v4 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 12369;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
  v5 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
  kProto.nMainSlotNo = uiMainInvenSlot;
  kProto.nSubSlotNo = uiSubInvenSlot;
  PgNet::SendNetMsg(v5, &kProto, 2);
}

//----- (004AA2F0) --------------------------------------------------------
void __thiscall GameFrameWork::NcInstanceDungeonLevelSelectMenuAck(GameFrameWork *this, unsigned __int16 kNPCHandle, ID_LEVEL_TYPE eLevelType)
{
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@1
  PgNet *v5; // ecx@1
  PROTO_NC_INSTANCE_DUNGEON_LEVEL_SELECT_MENU_ACK kProto; // [sp+4h] [bp-Ch]@1
  NETCOMMAND netcmd; // [sp+Ch] [bp-4h]@1

  v3 = this;
  v4 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = -23539;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
  v5 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
  kProto.nNPCHandle = kNPCHandle;
  kProto.eLevelType = eLevelType;
  PgNet::SendNetMsg(v5, &kProto, 6);
}

//----- (004AA340) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ACT_END_CINEMATIC(int iRevBytes, void *pvData)
{
  TextScreenEffect *v3; // ecx@1
  TextScreenEffect *v4; // eax@2
  TextScreenEffect *v5; // eax@3
  TextScreenEffect *v6; // ecx@6
  TextScreenEffect *v7; // eax@7
  TextScreenEffect *v8; // eax@8
  unsigned int v9; // eax@11
  char *v10; // edi@11
  MachineOpt::GameOption gameOption; // [sp+Ch] [bp-48h]@11
  TextScreenEffect *v13; // [sp+44h] [bp-10h]@2
  int v14; // [sp+50h] [bp-4h]@2

  v3 = Singleton<TextScreenEffect>::m_pInstance;
  if ( !Singleton<TextScreenEffect>::m_pInstance )
  {
    v4 = (TextScreenEffect *)operator new(0x28u);
    v13 = v4;
    v14 = 0;
    if ( v4 )
      TextScreenEffect::TextScreenEffect(v4);
    else
      v5 = 0;
    v3 = v5;
    v14 = -1;
    Singleton<TextScreenEffect>::m_pInstance = v5;
  }
  TextScreenEffect::AddSchedule(v3, 4);
  v6 = Singleton<TextScreenEffect>::m_pInstance;
  if ( !Singleton<TextScreenEffect>::m_pInstance )
  {
    v7 = (TextScreenEffect *)operator new(0x28u);
    v13 = v7;
    v14 = 1;
    if ( v7 )
      TextScreenEffect::TextScreenEffect(v7);
    else
      v8 = 0;
    v6 = v8;
    v14 = -1;
    Singleton<TextScreenEffect>::m_pInstance = v8;
  }
  TextScreenEffect::Stop(v6);
  qmemcpy(&gameOption, &MachineOpt::ms_kGameOption, sizeof(gameOption));
  v9 = *(_DWORD *)&gameOption.m_kVersion.hour;
  gameOption.bInterfaceCheck = 1;
  qmemcpy(&MachineOpt::ms_kGameOption, &gameOption, 0x34u);
  v10 = (char *)&MachineOpt::ms_kGameOption.bBasicInfoTipCheck;
  *(_WORD *)v10 = *(_WORD *)&gameOption.bBasicInfoTipCheck;
  v10[2] = gameOption.bAutoStack;
  byte_B4FF66 = v9 >> 16;
  return iRevBytes;
}
// B4FF60: using guessed type struct MachineOpt::GameOption MachineOpt::ms_kGameOption;
// B4FF66: using guessed type char byte_B4FF66;

//----- (004AA430) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_CHAR_TUTORIAL_STEP_REQ(int iRevBytes, void *pvData)
{
  LuaScriptMgr *v3; // ecx@1
  LuaScriptMgr *v4; // eax@2
  int v5; // eax@3
  LuaScriptTutorial *v6; // esi@6
  LuaScriptMgr *v7; // ecx@7
  LuaScriptMgr *v8; // eax@8
  int v9; // eax@9
  LuaScriptMgr *v10; // eax@13
  Tutorial *v11; // eax@14
  Tutorial *v12; // eax@15

  v3 = (LuaScriptMgr *)Singleton<LuaScriptMgr>::m_pInstance;
  if ( !Singleton<LuaScriptMgr>::m_pInstance )
  {
    v4 = (LuaScriptMgr *)operator new(0x14u);
    if ( v4 )
      LuaScriptMgr::LuaScriptMgr(v4);
    else
      v5 = 0;
    v3 = (LuaScriptMgr *)v5;
    Singleton<LuaScriptMgr>::m_pInstance = v5;
  }
  v6 = (LuaScriptTutorial *)LuaScriptMgr::GetLuaScript(v3, 0);
  if ( v6 )
    goto LABEL_24;
  v7 = (LuaScriptMgr *)Singleton<LuaScriptMgr>::m_pInstance;
  if ( !Singleton<LuaScriptMgr>::m_pInstance )
  {
    v8 = (LuaScriptMgr *)operator new(0x14u);
    if ( v8 )
      LuaScriptMgr::LuaScriptMgr(v8);
    else
      v9 = 0;
    v7 = (LuaScriptMgr *)v9;
    Singleton<LuaScriptMgr>::m_pInstance = v9;
  }
  if ( LuaScriptMgr::CreateLuaScript(v7, 0) )
  {
    Singleton<LuaScriptMgr>::getInstance();
    v6 = (LuaScriptTutorial *)LuaScriptMgr::GetLuaScript(v10, 0);
  }
  v11 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v12 = (Tutorial *)operator new(0xB4u);
    if ( v12 )
      Tutorial::Tutorial(v12);
    else
      v11 = 0;
    Singleton<Tutorial>::m_pInstance = v11;
  }
  v11->m_bEnable = 1;
  if ( v6 )
LABEL_24:
    LuaScriptTutorial::UpdateStep(v6, *(_BYTE *)pvData);
  return iRevBytes;
}
// A89C94: using guessed type int Singleton<LuaScriptMgr>::m_pInstance;

//----- (004AA560) --------------------------------------------------------
void __thiscall GameFrameWork::NcCharTutorialStepAck(GameFrameWork *this, unsigned int uiTutorialStep)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  PROTO_NC_CHAR_TUTORIAL_STEP_ACK kProto; // [sp+Bh] [bp-1h]@1

  v2 = this;
  v3 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 4375;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
  kProto.nTutorialStep = uiTutorialStep;
  PgNet::SendNetMsg(v4, &kProto, 1);
}

//----- (004AA5B0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SCENARIO_TOPVIEW_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  int result; // eax@3
  float fY; // ST0C_4@5
  float fFadeTime; // ST08_4@5
  CameraEffect *v7; // eax@5
  float v8; // edx@5
  double v9; // st7@5
  float v10; // ST0C_4@5
  NiPoint3 CameraLookAt; // [sp+1Ch] [bp-24h]@3
  NiPoint3 DestPos; // [sp+28h] [bp-18h]@5
  float v13; // [sp+34h] [bp-Ch]@5
  float v14; // [sp+38h] [bp-8h]@5
  float v15; // [sp+3Ch] [bp-4h]@5

  v3 = this;
  if ( this->m_spCamEffect.m_pObject )
  {
    if ( !*(_BYTE *)pvData )
    {
      ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[21].Affect)(&CameraLookAt);
      CameraEffect::Start(v3->m_spCamEffect.m_pObject, Timer::ms_fCurTime, 0.5, 4u, 1u);
      result = iRevBytes;
      v3->m_bPlayPuzzle = 0;
      return result;
    }
    if ( *(_BYTE *)pvData == 1 )
    {
      fFadeTime = (double)*(unsigned int *)((char *)pvData + 1);
      fY = (double)*(unsigned int *)((char *)pvData + 5);
      World::GetAdvGroundPos(&g_kWorld, fFadeTime, fY, &DestPos);
      ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[21].Affect)(&CameraLookAt);
      v7 = v3->m_spCamEffect.m_pObject;
      v13 = DestPos.x - CameraLookAt.x;
      v14 = DestPos.y - CameraLookAt.y;
      v8 = v14;
      v9 = DestPos.z - CameraLookAt.z;
      v7->m_MovePos.x = v13;
      v7->m_MovePos.y = v8;
      v15 = v9;
      v7->m_MovePos.z = v15;
      v10 = (double)*(_WORD *)((char *)pvData + 11);
      CameraEffect::SetAngle(v3->m_spCamEffect.m_pObject, v10, 89.0);
      v3->m_spCamEffect.m_pObject->m_fDist = (double)*(_WORD *)((char *)pvData + 9);
      CameraEffect::Start(v3->m_spCamEffect.m_pObject, Timer::ms_fCurTime, 0.5, 3u, 1u);
      v3->m_bPlayPuzzle = 1;
    }
  }
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004AA720) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SCENARIO_HIDE_OTHER_PLAYER_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  int result; // eax@4

  v3 = this;
  if ( *(_BYTE *)pvData )
  {
    if ( unk_A96B30 && CNSTimer_Interval::IsRun_GetCount(&stru_A96B34, Timer::ms_fCurTime) )
    {
      CNSTimer_Interval::ReSet(&stru_A96B34, Timer::ms_fCurTime);
      CharMgr::RemoveAllWithoutMainCharAndNPC(&g_kCharMgr);
      result = iRevBytes;
      unk_A96B31 = 1;
      return result;
    }
  }
  else if ( unk_A96B30 && CNSTimer_Interval::IsRun_GetCount(&stru_A96B34, Timer::ms_fCurTime) )
  {
    CNSTimer_Interval::ReSet(&stru_A96B34, Timer::ms_fCurTime);
    unk_A96B31 = 0;
    GameFrameWork::NcMiscHideExceptMeCmd(v3, 0);
  }
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004AA7D0) --------------------------------------------------------
void __thiscall GameFrameWork::NcKqTeamSelectReq(GameFrameWork *this, char nTeamType)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  PROTO_NC_KQ_TEAM_SELECT_REQ kProto; // [sp+Bh] [bp-1h]@1

  v2 = this;
  v3 = this->m_spWorldMgrNet.m_pObject;
  netcmd.protocol = 22583;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = (PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr;
  kProto.nTeamType = nTeamType;
  PgNet::SendNetMsg(v4, &kProto, 1);
}

//----- (004AA820) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_KQ_TEAM_TYPE_CMD(int iRevBytes, void *pvData)
{
  int result; // eax@1

  result = iRevBytes;
  g_pkMainChar->m_byKQTeamType = *(_BYTE *)pvData;
  return result;
}

//----- (004AA840) --------------------------------------------------------
void __thiscall GameFrameWork::NcItemRandomOptionChangeReq(GameFrameWork *this, int kItemSlotNo, int kStuffSlotNo)
{
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@1
  PgNet *v5; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  PROTO_NC_ITEM_RANDOMOPTION_CHANGE_REQ kProto; // [sp+8h] [bp-4h]@1

  v3 = this;
  v4 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 12371;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
  v5 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
  kProto.nItemSlotNo = kItemSlotNo;
  kProto.nStuffSlotNo = kStuffSlotNo;
  PgNet::SendNetMsg(v5, &kProto, 2);
}

//----- (004AA890) --------------------------------------------------------
void __thiscall GameFrameWork::NcItemChatColorChangeReq(GameFrameWork *this, int iColorSlot)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  PROTO_NC_ITEM_CHAT_COLOR_CHANGE_REQ kProto; // [sp+Bh] [bp-1h]@1

  v2 = this;
  v3 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 12373;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
  kProto.nSlotNo = iColorSlot;
  PgNet::SendNetMsg(v4, &kProto, 1);
}

//----- (004AA8E0) --------------------------------------------------------
void __thiscall GameFrameWork::NcTermExtendReq(GameFrameWork *this, unsigned int uiExtebdItemSlot, unsigned int uiTermItemSlot)
{
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@1
  PgNet *v5; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  PROTO_NC_ITEM_TERMEXTEND_REQ kProto; // [sp+8h] [bp-4h]@1

  v3 = this;
  v4 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 12375;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
  v5 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
  kProto.nExtendItemSlot = uiExtebdItemSlot;
  kProto.nTermItemSlot = uiTermItemSlot;
  PgNet::SendNetMsg(v5, &kProto, 2);
}

//----- (004AA930) --------------------------------------------------------
void __thiscall GameFrameWork::NcCharBuffItemAutoUseOnReq(GameFrameWork *this, unsigned __int16 *pkItemID)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  int v4; // edx@1
  int v5; // ecx@1
  int v6; // edx@1
  int v7; // eax@1
  PgNet *v8; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-20h]@1
  PROTO_NC_CHAR_USEITEM_MINIMON_NORMAL_ITEM_ON_REQ kProto; // [sp+8h] [bp-1Ch]@1

  v2 = this;
  v3 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 4388;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = *(_DWORD *)pkItemID;
  *(_DWORD *)&kProto.NormalItemList[2] = *((_DWORD *)pkItemID + 1);
  v5 = *((_DWORD *)pkItemID + 3);
  *(_DWORD *)&kProto.NormalItemList[0] = v4;
  v6 = *((_DWORD *)pkItemID + 2);
  *(_DWORD *)&kProto.NormalItemList[6] = v5;
  *(_DWORD *)&kProto.NormalItemList[4] = v6;
  v7 = *((_DWORD *)pkItemID + 5);
  v8 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
  *(_DWORD *)&kProto.NormalItemList[8] = *((_DWORD *)pkItemID + 4);
  *(_DWORD *)&kProto.NormalItemList[10] = v7;
  PgNet::SendNetMsg(v8, &kProto, 24);
}

//----- (004AA9B0) --------------------------------------------------------
void __thiscall GameFrameWork::NcCharBuffItemAutoUseOffReq(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Net *v2; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  char pdata; // [sp+Bh] [bp-1h]@1

  v1 = this;
  v2 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 4390;
  PgNet::AddNetMsg((PgNet *)&v2->vfptr, &netcmd, 2);
  PgNet::SendNetMsg((PgNet *)&v1->m_spZoneNet.m_pObject->vfptr, &pdata, 1);
}

//----- (004AA9F0) --------------------------------------------------------
void __thiscall GameFrameWork::NcCharChargedItemAutoUseOnReq(GameFrameWork *this, unsigned __int16 *pkItemID)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  int v4; // edx@1
  int v5; // ecx@1
  int v6; // edx@1
  int v7; // eax@1
  PgNet *v8; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-20h]@1
  PROTO_NC_CHAR_USEITEM_MINIMON_CHARGED_ITEM_ON_REQ kProto; // [sp+8h] [bp-1Ch]@1

  v2 = this;
  v3 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 4392;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = *(_DWORD *)pkItemID;
  *(_DWORD *)&kProto.ChargedItemList[2] = *((_DWORD *)pkItemID + 1);
  v5 = *((_DWORD *)pkItemID + 3);
  *(_DWORD *)&kProto.ChargedItemList[0] = v4;
  v6 = *((_DWORD *)pkItemID + 2);
  *(_DWORD *)&kProto.ChargedItemList[6] = v5;
  *(_DWORD *)&kProto.ChargedItemList[4] = v6;
  v7 = *((_DWORD *)pkItemID + 5);
  v8 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
  *(_DWORD *)&kProto.ChargedItemList[8] = *((_DWORD *)pkItemID + 4);
  *(_DWORD *)&kProto.ChargedItemList[10] = v7;
  PgNet::SendNetMsg(v8, &kProto, 24);
}

//----- (004AAA70) --------------------------------------------------------
void __thiscall GameFrameWork::NcCharChargedItemAutoUseOffReq(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Net *v2; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  char pdata; // [sp+Bh] [bp-1h]@1

  v1 = this;
  v2 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 4394;
  PgNet::AddNetMsg((PgNet *)&v2->vfptr, &netcmd, 2);
  PgNet::SendNetMsg((PgNet *)&v1->m_spZoneNet.m_pObject->vfptr, &pdata, 1);
}

//----- (004AAAB0) --------------------------------------------------------
void __thiscall GameFrameWork::NcCharChargedbuffEraseReq(GameFrameWork *this, unsigned int nChargedBuffKey)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@1
  PROTO_NC_CHAR_CHARGEDBUFF_ERASE_REQ kProto; // [sp+4h] [bp-8h]@1
  NETCOMMAND netcmd; // [sp+8h] [bp-4h]@1

  v2 = this;
  v3 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 4398;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
  kProto.nChargedBuffKey = nChargedBuffKey;
  PgNet::SendNetMsg(v4, &kProto, 4);
}

//----- (004AAB00) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_CHARGEDBUFF_ERASE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiNode *v4; // eax@4
  const char *v6; // eax@6

  v3 = this;
  if ( *(_WORD *)pvData == 13912 )
  {
    if ( g_pkMainChar )
    {
      if ( g_pkMainChar != (Char *)-780 )
      {
        v4 = g_pkMainChar->m_kCharShape.m_apkLinkNode[1];
        if ( v4 )
        {
          EffectMgr::CreateAttachEffect(&g_kEffectMgr, (unsigned int *)&pvData, "ChargedOff", v4, Timer::ms_fCurTime, 0);
          return iRevBytes;
        }
      }
    }
  }
  else
  {
    v6 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v6);
  }
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004AAB70) --------------------------------------------------------
void __thiscall GameFrameWork::NcItemRepurchaseReq(GameFrameWork *this, unsigned __int16 nHaldle)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@1
  PROTO_NC_ITEM_REPURCHASE_REQ kProto; // [sp+4h] [bp-8h]@1
  NETCOMMAND netcmd; // [sp+8h] [bp-4h]@1

  v2 = this;
  v3 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 12377;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
  kProto.nHaldle = nHaldle;
  PgNet::SendNetMsg(v4, &kProto, 2);
}

//----- (004AABC0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ITEM_SELL_ITEM_LIST_CMD(int iRevBytes, void *pvData)
{
  int v3; // esi@1
  int v4; // edi@1

  v3 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  v4 = *((_WORD *)pvData + 2);
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                          ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                          v4)
    && (unsigned __int16)v4 <= *(_WORD *)(v3 + 200)
    && *(_DWORD *)(*(_DWORD *)(v3 + 196) + 4 * v4) )
  {
    Market::SetRepurchaseItem((PROTO_NC_ITEM_SELL_ITEM_LIST_CMD *)pvData);
  }
  return iRevBytes;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (004AAC10) --------------------------------------------------------
void __thiscall GameFrameWork::NcGuildEmblemSaveReq(GameFrameWork *this, GUILD_EMBLEM_INFO pEmblemInfo)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PROTO_NC_GUILD_EMBLEM_SAVE_REQ kProto; // [sp+4h] [bp-8h]@1
  __int16 pdata; // [sp+8h] [bp-4h]@1

  v2 = this;
  pdata = 29957;
  v3 = this->m_spWorldMgrNet.m_pObject;
  kProto = (PROTO_NC_GUILD_EMBLEM_SAVE_REQ)pEmblemInfo;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 2);
}

//----- (004AAC60) --------------------------------------------------------
void __thiscall GameFrameWork::NcGuildEmblemCheckAvailabilityReq(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Net *v2; // ecx@1
  __int16 pdata; // [sp+4h] [bp-4h]@1

  v1 = this;
  v2 = this->m_spWorldMgrNet.m_pObject;
  pdata = 29953;
  PgNet::AddNetMsg((PgNet *)&v2->vfptr, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr, 0, 0);
}

//----- (004AACA0) --------------------------------------------------------
void __thiscall GameFrameWork::NcItemMaplinkScrollReq(GameFrameWork *this, WM_Link targetMap)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@1
  PROTO_NC_ITEM_MAPLINK_SCROLL_REQ kProto; // [sp+4h] [bp-8h]@1
  NETCOMMAND netcmd; // [sp+8h] [bp-4h]@1

  v2 = this;
  v3 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 12391;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
  kProto.targetMap = targetMap;
  PgNet::SendNetMsg(v4, &kProto, 4);
}

//----- (004AACF0) --------------------------------------------------------
void __thiscall GameFrameWork::NcItemMixItemReq(GameFrameWork *this, unsigned int uiLefeItemInvSlot, unsigned int uiRightItemInvSlot, unsigned int uiAddItemInvSlot)
{
  GameFrameWork *v4; // esi@1
  Net *v5; // ecx@1
  PgNet *v6; // ecx@1
  PROTO_NC_ITEM_MIX_ITEM_REQ kProto; // [sp+4h] [bp-8h]@1
  NETCOMMAND netcmd; // [sp+8h] [bp-4h]@1

  v4 = this;
  v5 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 12393;
  PgNet::AddNetMsg((PgNet *)&v5->vfptr, &netcmd, 2);
  kProto.nRawLeft = uiLefeItemInvSlot;
  kProto.nSubRaw = uiAddItemInvSlot;
  v6 = (PgNet *)&v4->m_spZoneNet.m_pObject->vfptr;
  kProto.nRawRight = uiRightItemInvSlot;
  PgNet::SendNetMsg(v6, &kProto, 3);
}

//----- (004AAD40) --------------------------------------------------------
void __thiscall GameFrameWork::NcItemRandomOptRecoverCountLimitReq(GameFrameWork *this, int _kItemSlotIdx, unsigned int _uiRecoverCnt)
{
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@1
  PgNet *v5; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  PROTO_NC_ITEM_RANDOMOPTION_RECOVER_COUNT_LIMIT_REQ kProto; // [sp+8h] [bp-4h]@1

  v3 = this;
  v4 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 12395;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
  v5 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
  kProto.nItemSlotNo = _kItemSlotIdx;
  kProto.nStuffUseLot = _uiRecoverCnt;
  PgNet::SendNetMsg(v5, &kProto, 2);
}

//----- (004AAD90) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_RANDOMOPTION_RECOVER_COUNT_LIMIT_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  int v4; // eax@2
  const char *v5; // eax@3
  RandomOptCountRecoverWin *v6; // ecx@4
  bool bSuccess; // [sp+4h] [bp-4h]@1

  v3 = this;
  bSuccess = 1;
  if ( this->m_pkInventoryWin->m_pkRandomOptCountRecoverWin )
  {
    v4 = *(_WORD *)pvData;
    if ( (_WORD)v4 != 12881 )
    {
      v5 = ErrMsgTable::GetErrMsg(v4);
      GameFrameWork::AddSysMsg(v3, v5);
      bSuccess = 0;
    }
    v6 = v3->m_pkInventoryWin->m_pkRandomOptCountRecoverWin;
    if ( v6 )
      RandomOptCountRecoverWin::ShowRecoverCountResult(v6, bSuccess);
    InventoryWin::OnResetRecoverCountState(v3->m_pkInventoryWin);
  }
  return iRevBytes;
}

//----- (004AAE00) --------------------------------------------------------
void __thiscall GameFrameWork::NcItemNewUpGradeReq(GameFrameWork *this, char equipSlot, char rawSlot)
{
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@1
  PgNet *v5; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  PROTO_NC_ITEM_NEW_UPGRADE_REQ kProto; // [sp+8h] [bp-4h]@1

  v3 = this;
  v4 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 12397;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
  v5 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
  kProto.equip = equipSlot;
  kProto.raw = rawSlot;
  PgNet::SendNetMsg(v5, &kProto, 2);
}

//----- (004AAE50) --------------------------------------------------------
void __thiscall GameFrameWork::NcItemBraceletUpgradeReq(GameFrameWork *this, char equipSlot, char rawSlot)
{
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@1
  PgNet *v5; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  PROTO_NC_ITEM_BRACELET_UPGRADE_REQ kProto; // [sp+8h] [bp-4h]@1

  v3 = this;
  v4 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 12399;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
  v5 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
  kProto.equip = equipSlot;
  kProto.raw = rawSlot;
  PgNet::SendNetMsg(v5, &kProto, 2);
}

//----- (004AAEA0) --------------------------------------------------------
void __thiscall GameFrameWork::NcInstanceDungeonRankListReq(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Net *v2; // ecx@1
  __int16 pdata; // [sp+4h] [bp-4h]@1

  v1 = this;
  v2 = this->m_spZoneNet.m_pObject;
  pdata = -23529;
  PgNet::AddNetMsg((PgNet *)&v2->vfptr, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v1->m_spZoneNet.m_pObject->vfptr, 0, 0);
}

//----- (004AAEE0) --------------------------------------------------------
void __thiscall GameFrameWork::NcMapLoginCompleteCmd(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  Net *v2; // ecx@1
  MapNavigator *v3; // edi@6
  MapNavigator *v4; // ebx@7
  GTInformWin *v5; // edi@15
  D3DXCOLOR *v6; // eax@16
  D3DXCOLOR v7; // ST04_16@16
  char *v8; // eax@16
  QuestNewsWin *v9; // eax@18
  char v10; // al@20
  QuestNewsWin *v11; // ecx@20
  PkRealTiemRankWin *v12; // ecx@22
  BasicInfoLinkType v13; // edi@24
  Name3 *v14; // eax@24
  MapInfo *v15; // eax@24
  int v16; // eax@25
  int v17; // eax@26
  int v18; // eax@30
  int v19; // eax@31
  Name3 *v20; // eax@34
  MiniMapWin *v21; // eax@35
  PgWin *v22; // eax@36
  CameraEffect *v23; // ecx@41
  MiniMapWin *v24; // ecx@48
  Name3 *v25; // eax@50
  unsigned int v26; // ecx@50
  unsigned int v27; // edx@50
  BasicInfoLinkType v28; // eax@50
  NiPointer<MapNavigator> result; // [sp+24h] [bp-A8h]@6
  NiPoint3 kPos; // [sp+28h] [bp-A4h]@17
  NETCOMMAND netcmd; // [sp+34h] [bp-98h]@2
  char MapName[128]; // [sp+38h] [bp-94h]@34
  D3DXCOLOR acstr; // [sp+B8h] [bp-14h]@16

  v1 = this;
  v2 = this->m_spZoneNet.m_pObject;
  if ( v2 )
  {
    netcmd.protocol = 6147;
    PgNet::SendNetMsg((PgNet *)&v2->vfptr, &netcmd, 2);
    if ( nowState )
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x23u, 0xAu, 0, 0);
    if ( AbStateInfectee::FindNomalAbstate((AbStateInfectee *)&g_pkMainChar->vfptr, STA_OBSERVERHIDEMODE) )
      MiniMapWin::ShowGTQuit(v1->m_pkMiniMapWin, 1);
    v1->m_bIsGM = 0;
    v3 = MapNavigator::GetMapNavigator(&result)->m_pObject;
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    if ( v3 )
    {
      if ( v3->m_eDotState == 2 )
      {
        if ( v3->m_bIsWorking )
          v3->m_eDotState = 3;
      }
      else if ( v3->m_bIsWorking )
      {
        v3->m_bIsWorking = 0;
        v5 = v1->m_pkAutoRunMsgWin;
        if ( v5 )
        {
          GTInformWin::Clear(v1->m_pkAutoRunMsgWin);
          v6 = Color::GetDxColor(&acstr, -1, -112, 0, -1);
          *(_QWORD *)&v7.r = *(_QWORD *)&v6->r;
          *(_QWORD *)&v7.b = *(_QWORD *)&v6->b;
          v8 = (char *)TextData2::Get(0x3C517589u);
          GTInformWin::AddText(v5, v8, v7, 0, 3.0);
        }
        ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[6].SetAbStateProperty)(&kPos);
        ((void (__stdcall *)(_DWORD, _DWORD, signed int))g_pkMainChar->vfptr[7].IsVisible)(
          LODWORD(kPos.x),
          LODWORD(kPos.y),
          1);
      }
    }
    GameFrameWork::OnOpenGambleHouseWin(v1, unk_B25074 != 7);
    v9 = v1->m_pkQuestNewsWin;
    if ( v9 )
    {
      if ( v9->m_ePigeonState == 1 )
      {
        v10 = User::Lv(&g_kUser);
        v11 = v1->m_pkQuestNewsWin;
        if ( QuestNewsWin::CheckNewQuest(v10) )
          GameFrameWork::OpenQuestNewsWin(v1);
      }
    }
    v12 = v1->m_pkKQPKRealTimeRankWin;
    if ( v12 )
      PkRealTiemRankWin::Open(v12);
    v13 = 1;
    v14 = World::GetMapName(&g_kWorld, (Name3 *)&kPos);
    v15 = MapInfoTab::GetByMapName(v14);
    if ( v15 )
    {
      v16 = v15->KingdomMap;
      if ( v16 )
      {
        v17 = v16 - 3;
        if ( v17 )
        {
          if ( v17 == 1 )
            v13 = 192;
        }
        else
        {
          v13 = 190;
        }
      }
      else
      {
        Singleton<Tutorial>::getInstance();
        if ( *(_BYTE *)(v18 + 18) == 1 )
        {
          Singleton<Tutorial>::getInstance();
          *(_BYTE *)(v19 + 18) = 0;
        }
        else
        {
          v13 = 188;
        }
      }
    }
    GameFrameWork::OpenPlayGuideWin(v1, v13);
    DecalMgr::RemoveAllDecal(&stru_B26354);
    if ( v1->m_pkMiniMapWin )
    {
      v20 = World::GetMapName(&g_kWorld, (Name3 *)&kPos);
      *(_DWORD *)MapName = v20->n3_code[0];
      *(_DWORD *)&MapName[4] = v20->n3_code[1];
      *(_DWORD *)&MapName[8] = v20->n3_code[2];
      MapName[12] = 0;
      if ( !strncmp(MapName, "KDMine", 6u) )
      {
        v21 = v1->m_pkMiniMapWin;
        if ( v21 )
        {
          v22 = (PgWin *)&v21->m_pkFullMapWin->vfptr;
          if ( v22 )
            PgWinMgr::ShowWin(&Pgg_kWinMgr, v22);
        }
      }
    }
    if ( v1->m_pkNpcDlgWin )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkNpcDlgWin->vfptr);
    if ( v1->m_bPlayPuzzle )
    {
      v23 = v1->m_spCamEffect.m_pObject;
      v1->m_bPlayPuzzle = 0;
      if ( v23 )
        CameraEffect::ClearMove(v23);
      if ( unk_A96B30 && CNSTimer_Interval::IsRun_GetCount(&stru_A96B34, Timer::ms_fCurTime) )
      {
        CNSTimer_Interval::ReSet(&stru_A96B34, Timer::ms_fCurTime);
        unk_A96B31 = 0;
        GameFrameWork::NcMiscHideExceptMeCmd(v1, 0);
      }
    }
    if ( v1->m_pkPuzzleTimeWin )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkPuzzleTimeWin->vfptr);
    v24 = v1->m_pkMiniMapWin;
    if ( v24 )
      MiniMapWin::NotViewInDunLevelFlag(v24);
    v1->m_bMoveRunCtrl = 1;
    v25 = World::GetMapName(&g_kWorld, (Name3 *)&kPos);
    v26 = v25->n3_code[1];
    LODWORD(acstr.r) = v25->n3_code[0];
    v27 = v25->n3_code[2];
    LODWORD(acstr.g) = v26;
    LODWORD(acstr.b) = v27;
    LOBYTE(acstr.a) = 0;
    v28 = BasicInfoLinkTab::GetbyCType(BIL_C_LINKIN_MAP, (char *)&acstr);
    if ( v28 )
      GameFrameWork::OpenPlayGuideWin(v1, v28);
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004AB2B0) --------------------------------------------------------
void __thiscall GameFrameWork::NcBatSkillbashObjCastReq(GameFrameWork *this, int kSkillID, unsigned __int16 kHandle)
{
  GameFrameWork *v3; // ebx@1
  unsigned int v4; // eax@3
  int v5; // esi@3
  int *v6; // eax@5
  int v7; // esi@6
  int v8; // edi@7
  NiUnsharedGeometryGroup *v9; // eax@10
  NiUnsharedGeometryGroup *v10; // eax@12
  PgNet *v11; // ecx@15
  PgNet *v12; // ecx@15
  int iSP; // [sp+4h] [bp-10h]@3
  Skill::EmpowerInfo kEmpowerInfo; // [sp+8h] [bp-Ch]@7
  PROTO_NC_BAT_SKILLBASH_OBJ_CAST_REQ kProto; // [sp+Ch] [bp-8h]@15
  NETCOMMAND netcmd; // [sp+10h] [bp-4h]@15

  v3 = this;
  if ( this->m_kSkillCasting.eState == SCS_IDLE && !this->m_kSkillCasting.bWaitingForServerCancel )
  {
    v4 = User::SP(&g_kUser);
    v5 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
    iSP = v4;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                          + 16))(
                            ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                            kSkillID) )
    {
      if ( (unsigned __int16)kSkillID <= *(_WORD *)(v5 + 200) )
      {
        v6 = (int *)(*(_DWORD *)(v5 + 196) + 4 * (unsigned __int16)kSkillID);
        if ( *v6 )
        {
          v7 = *v6;
          if ( *v6 )
          {
            v8 = *(_DWORD *)(v7 + 160);
            Skill::GetAccumulatedEmpowerInfo(&kEmpowerInfo, kSkillID);
            if ( kEmpowerInfo.cSmallSp )
              v8 -= *(_DWORD *)(v7 + 4 * kEmpowerInfo.cSmallSp + 463);
            if ( iSP >= v8 )
            {
              if ( (signed int)User::LP(&g_kUser) >= *(_DWORD *)(v7 + 176) )
              {
                if ( g_pkMainChar->m_byMode == 1 )
                {
                  Char::SetMode(g_pkMainChar, 2);
                  GameFrameWork::NcActChangeModeReq(v3, 2);
                }
                v11 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
                netcmd.protocol = 9280;
                PgNet::AddNetMsg(v11, &netcmd, 2);
                kProto.skill = kSkillID;
                v12 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
                kProto.target = kHandle;
                PgNet::SendNetMsg(v12, &kProto, 4);
                v3->m_kSkillCasting.eState = 2;
                v3->m_kSkillCasting.eTargetType = 0;
              }
              else
              {
                v10 = TextData3::Get(0x40601363u);
                GameFrameWork::AddSysMsg(v3, (const char *)v10);
              }
            }
            else
            {
              v9 = TextData::Get(0x2A664B39u);
              GameFrameWork::AddSysMsg(v3, (const char *)v9);
            }
          }
        }
      }
    }
  }
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (004AB420) --------------------------------------------------------
void __thiscall GameFrameWork::NcBatSkillbashFldCastReq(GameFrameWork *this, unsigned __int16 kSkillID, unsigned int x, unsigned int y)
{
  bool v4; // zf@1
  unsigned int v5; // eax@3
  int v6; // esi@3
  int *v7; // eax@5
  int v8; // esi@6
  int v9; // edi@7
  NiUnsharedGeometryGroup *v10; // eax@10
  NiUnsharedGeometryGroup *v11; // eax@12
  GameFrameWork *v12; // esi@14
  PgNet *v13; // ecx@16
  int iSP; // [sp+4h] [bp-20h]@3
  Skill::EmpowerInfo kEmpowerInfo; // [sp+8h] [bp-1Ch]@7
  NETCOMMAND netcmd; // [sp+Ch] [bp-18h]@16
  GameFrameWork *v17; // [sp+10h] [bp-14h]@1
  PROTO_NC_BAT_SKILLBASH_FLD_CAST_REQ kProto; // [sp+14h] [bp-10h]@16

  v4 = this->m_kSkillCasting.eState == 1;
  v17 = this;
  if ( v4 && !this->m_kSkillCasting.bWaitingForServerCancel )
  {
    v5 = User::SP(&g_kUser);
    v6 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
    iSP = v5;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                             + 16))(
                            ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                            kSkillID) )
    {
      if ( kSkillID <= *(_WORD *)(v6 + 200) )
      {
        v7 = (int *)(*(_DWORD *)(v6 + 196) + 4 * kSkillID);
        if ( *v7 )
        {
          v8 = *v7;
          if ( *v7 )
          {
            v9 = *(_DWORD *)(v8 + 160);
            Skill::GetAccumulatedEmpowerInfo(&kEmpowerInfo, kSkillID);
            if ( kEmpowerInfo.cSmallSp )
              v9 -= *(_DWORD *)(v8 + 4 * kEmpowerInfo.cSmallSp + 463);
            if ( iSP >= v9 )
            {
              if ( (signed int)User::LP(&g_kUser) >= *(_DWORD *)(v8 + 176) )
              {
                if ( g_pkMainChar->m_byMode == 1 )
                {
                  Char::SetMode(g_pkMainChar, 2);
                  v12 = v17;
                  GameFrameWork::NcActChangeModeReq(v17, 2);
                }
                else
                {
                  v12 = v17;
                }
                netcmd.protocol = 9281;
                PgNet::AddNetMsg((PgNet *)&v12->m_spZoneNet.m_pObject->vfptr, &netcmd, 2);
                kProto.locate.y = y;
                v13 = (PgNet *)&v12->m_spZoneNet.m_pObject->vfptr;
                kProto.skill = kSkillID;
                kProto.locate.x = x;
                PgNet::SendNetMsg(v13, &kProto, 10);
                v12->m_kSkillCasting.eState = 2;
              }
              else
              {
                v11 = TextData3::Get(0x40601363u);
                GameFrameWork::AddSysMsg(v17, (const char *)v11);
              }
            }
            else
            {
              v10 = TextData::Get(0x2A664B39u);
              GameFrameWork::AddSysMsg(v17, (const char *)v10);
            }
          }
        }
      }
    }
  }
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (004AB5B0) --------------------------------------------------------
void __thiscall GameFrameWork::NcItemEquipReq(GameFrameWork *this, const char bySlot)
{
  GameFrameWork *v2; // esi@1
  NiUnsharedGeometryGroup *v3; // eax@2
  PgNet *v4; // ecx@3
  PgNet *v5; // ecx@3
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@3
  PROTO_NC_ITEM_EQUIP_REQ kProto; // [sp+Bh] [bp-1h]@3

  v2 = this;
  if ( CharShape::IsSpactralGlowEnable(&g_pkMainChar->m_kCharShape) )
  {
    v3 = TextData2::Get(0xC0FDEAD1);
    GameFrameWork::AddSysMsg(v2, (const char *)v3);
  }
  else
  {
    v4 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
    netcmd.protocol = 12303;
    PgNet::AddNetMsg(v4, &netcmd, 2);
    v5 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
    kProto.slot = bySlot;
    PgNet::SendNetMsg(v5, &kProto, 1);
  }
}

//----- (004AB630) --------------------------------------------------------
void __thiscall GameFrameWork::NcItemUnequipReq(GameFrameWork *this, const char bySlotequip, const char bySlotinven)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@2
  PgNet *v5; // ecx@3
  PgNet *v6; // ecx@3
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@3
  PROTO_NC_ITEM_UNEQUIP_REQ kProto; // [sp+8h] [bp-4h]@3

  v3 = this;
  if ( CharShape::IsSpactralGlowEnable(&g_pkMainChar->m_kCharShape) )
  {
    v4 = TextData2::Get(0xBEF92618);
    GameFrameWork::AddSysMsg(v3, (const char *)v4);
  }
  else
  {
    v5 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
    netcmd.protocol = 12306;
    PgNet::AddNetMsg(v5, &netcmd, 2);
    v6 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
    kProto.slotequip = bySlotequip;
    kProto.slotinven = bySlotinven;
    PgNet::SendNetMsg(v6, &kProto, 2);
  }
}

//----- (004AB6B0) --------------------------------------------------------
void __thiscall GameFrameWork::NcPartyJoinReq(GameFrameWork *this, char *pcCharName)
{
  GameFrameWork *v2; // esi@1
  NiUnsharedGeometryGroup *v3; // eax@2
  Net *v4; // ecx@3
  NETCOMMAND netcmd; // [sp+Ch] [bp-1Ch]@3
  PROTO_NC_PARTY_JOIN_REQ kProto; // [sp+10h] [bp-18h]@3

  v2 = this;
  if ( unk_A96B31 )
  {
    v3 = TextData::Get(0x1E7AE39u);
    GameFrameWork::AddSysMsg(v2, (const char *)v3);
  }
  else
  {
    v4 = this->m_spWorldMgrNet.m_pObject;
    netcmd.protocol = 14338;
    PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
    *(_QWORD *)&kProto.target.n5_code[3] = 0i64;
    *(_QWORD *)&kProto.target.n5_code[1] = 0i64;
    kProto.target.n5_code[0] = 0;
    strncpy(kProto.target.n5_name, pcCharName, 0x14u);
    PgNet::SendNetMsg((PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 20);
  }
}

//----- (004AB760) --------------------------------------------------------
void __thiscall GameFrameWork::NcPartyJoinProposeAllowAck(GameFrameWork *this, Name5 kCharID)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-1Ch]@1
  PROTO_NC_PARTY_JOINPROPOSE_REQ kProto; // [sp+8h] [bp-18h]@1

  v2 = this;
  v3 = this->m_spWorldMgrNet.m_pObject;
  netcmd.protocol = 14340;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  kProto.mastername = kCharID;
  PgNet::SendNetMsg((PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 20);
}

//----- (004AB7D0) --------------------------------------------------------
void __thiscall GameFrameWork::NcPartyLeaveReq(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  NiUnsharedGeometryGroup *v2; // eax@2
  Net *v3; // ecx@3
  NETCOMMAND netcmd; // [sp+4h] [bp-4h]@3

  v1 = this;
  if ( g_kParty.m_uiTotalMember )
  {
    v3 = this->m_spWorldMgrNet.m_pObject;
    netcmd.protocol = 14346;
    PgNet::SendNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  }
  else
  {
    v2 = TextData::Get(0x7D9CEEE9u);
    GameFrameWork::AddSysMsg(v1, (const char *)v2);
  }
}

//----- (004AB820) --------------------------------------------------------
void __thiscall GameFrameWork::NcPartyKickOffReq(GameFrameWork *this, char *pcCharName)
{
  GameFrameWork *v2; // esi@1
  _BYTE v3[20]; // ST00_20@3
  PgNet *v4; // ecx@4
  NiUnsharedGeometryGroup *v5; // eax@5
  NETCOMMAND netcmd; // [sp+4h] [bp-30h]@4
  Name5 kCharID; // [sp+8h] [bp-2Ch]@3
  PROTO_NC_PARTY_JOINPROPOSE_REQ kProto; // [sp+1Ch] [bp-18h]@4

  v2 = this;
  if ( pcCharName
    && *pcCharName
    && (*(_QWORD *)&kCharID.n5_code[3] = 0i64,
        *(_QWORD *)&kCharID.n5_code[1] = 0i64,
        *(_QWORD *)&kCharID.n5_name[0] = 0i64,
        strncpy(kCharID.n5_name, pcCharName, 0x14u),
        *(_QWORD *)v3 = *(_QWORD *)&kCharID.n5_name[0],
        *(_QWORD *)&v3[8] = *(_QWORD *)&kCharID.n5_code[2],
        *(_DWORD *)&v3[16] = kCharID.n5_code[4],
        Party::GetMemberInfo(&g_kParty, *(Name5 *)v3)) )
  {
    v4 = (PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr;
    netcmd.protocol = 14356;
    PgNet::AddNetMsg(v4, &netcmd, 2);
    kProto.mastername = kCharID;
    PgNet::SendNetMsg((PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 20);
  }
  else
  {
    v5 = TextData::Get(0x1622809Du);
    GameFrameWork::AddSysMsg(v2, (const char *)v5);
  }
}

//----- (004AB920) --------------------------------------------------------
void __thiscall GameFrameWork::NcPartyChangeMasterReq(GameFrameWork *this, char *pcCharName)
{
  GameFrameWork *v2; // esi@1
  _BYTE v3[20]; // ST00_20@5
  PgNet *v4; // ecx@6
  NiUnsharedGeometryGroup *v5; // eax@2
  NETCOMMAND netcmd; // [sp+4h] [bp-30h]@6
  Name5 kCharID; // [sp+8h] [bp-2Ch]@5
  PROTO_NC_PARTY_JOINPROPOSE_REQ kProto; // [sp+1Ch] [bp-18h]@6

  v2 = this;
  if ( g_kParty.m_uiTotalMember )
  {
    if ( pcCharName )
    {
      if ( *pcCharName )
      {
        *(_QWORD *)&kCharID.n5_code[3] = 0i64;
        *(_QWORD *)&kCharID.n5_code[1] = 0i64;
        *(_QWORD *)&kCharID.n5_name[0] = 0i64;
        strncpy(kCharID.n5_name, pcCharName, 0x14u);
        *(_QWORD *)v3 = *(_QWORD *)&kCharID.n5_name[0];
        *(_QWORD *)&v3[8] = *(_QWORD *)&kCharID.n5_code[2];
        *(_DWORD *)&v3[16] = kCharID.n5_code[4];
        if ( Party::GetMemberInfo(&g_kParty, *(Name5 *)v3) )
        {
          v4 = (PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr;
          netcmd.protocol = 14376;
          PgNet::AddNetMsg(v4, &netcmd, 2);
          kProto.mastername = kCharID;
          PgNet::SendNetMsg((PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 20);
          return;
        }
      }
    }
    v5 = TextData::Get(0x472CFCABu);
  }
  else
  {
    v5 = TextData::Get(0x7D9CEEE9u);
  }
  GameFrameWork::AddSysMsg(v2, (const char *)v5);
}

//----- (004ABA30) --------------------------------------------------------
void __thiscall GameFrameWork::NcTradeProposeReq(GameFrameWork *this, unsigned __int16 kHandle)
{
  GameFrameWork *v2; // esi@1
  MsgBox *v3; // ecx@3
  PgNet *v4; // ecx@5
  PgNet *v5; // ecx@5
  NiUnsharedGeometryGroup *v6; // eax@2
  PROTO_NC_TRADE_PROPOSE_REQ kProto; // [sp+4h] [bp-8h]@5
  NETCOMMAND netcmd; // [sp+8h] [bp-4h]@5

  v2 = this;
  if ( unk_A96B31 )
  {
    v6 = TextData::Get(0xF1D6BF29);
LABEL_6:
    GameFrameWork::AddSysMsg(v2, (const char *)v6);
    return;
  }
  v3 = this->m_spUserTradeMsgBox.m_pObject;
  if ( !v3 || !(unsigned __int8)((int (*)(void))v3->vfptr[65].__vecDelDtor)() )
  {
    v4 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
    netcmd.protocol = 19457;
    PgNet::AddNetMsg(v4, &netcmd, 2);
    v5 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
    kProto.proposee = kHandle;
    PgNet::SendNetMsg(v5, &kProto, 2);
    v6 = TextData::Get(0x91E3D4F9);
    goto LABEL_6;
  }
}

//----- (004ABAB0) --------------------------------------------------------
void __thiscall GameFrameWork::NcFriendSetReq(GameFrameWork *this, Name5 kCharID)
{
  GameFrameWork *v2; // esi@1
  Name5 *v3; // eax@1
  unsigned int v4; // eax@1
  PgNet *v5; // ecx@1
  char *v6; // eax@1
  __int16 pdata; // [sp+8h] [bp-48h]@1
  PROTO_NC_FRIEND_SET_REQ kProto; // [sp+Ch] [bp-44h]@1
  char acname[21]; // [sp+34h] [bp-1Ch]@1

  v2 = this;
  *(_QWORD *)&kProto.charid.n5_code[3] = 0i64;
  *(_QWORD *)&kProto.charid.n5_code[1] = 0i64;
  kProto.charid.n5_code[0] = 0;
  *(_QWORD *)&kProto.friendid.n5_code[3] = 0i64;
  *(_QWORD *)&kProto.friendid.n5_code[1] = 0i64;
  kProto.friendid.n5_code[0] = 0;
  v3 = User::GetMainCharID(&g_kUser);
  *(_QWORD *)&kProto.charid.n5_name[0] = *(_QWORD *)&v3->n5_code[0];
  *(_QWORD *)&kProto.charid.n5_code[2] = *(_QWORD *)&v3->n5_code[2];
  v4 = v3->n5_code[4];
  kProto.friendid = kCharID;
  kProto.charid.n5_code[4] = v4;
  v5 = (PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr;
  pdata = 21505;
  PgNet::AddNetMsg(v5, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 40);
  *(Name5 *)acname = kCharID;
  acname[20] = 0;
  v6 = (char *)TextData3::Get(0x2B444487u);
  GameFrameWork::VaAddSysMsg(v2, v6, acname);
}

//----- (004ABBB0) --------------------------------------------------------
void __thiscall GameFrameWork::NcFriendSetConfirmAck(GameFrameWork *this, Name5 charid, bool bAccept_Friend)
{
  GameFrameWork *v3; // esi@1
  Name5 *v4; // eax@1
  unsigned int v5; // eax@1
  PgNet *v6; // ecx@1
  __int16 pdata; // [sp+4h] [bp-34h]@1
  PROTO_NC_FRIEND_SET_CONFIRM_ACK kProto; // [sp+8h] [bp-30h]@1

  v3 = this;
  *(_QWORD *)&kProto.charid.n5_code[3] = 0i64;
  *(_QWORD *)&kProto.charid.n5_code[1] = 0i64;
  kProto.charid.n5_code[0] = 0;
  *(_QWORD *)&kProto.friendid.n5_code[3] = 0i64;
  *(_QWORD *)&kProto.friendid.n5_code[1] = 0i64;
  kProto.friendid.n5_code[0] = 0;
  v4 = User::GetMainCharID(&g_kUser);
  *(_QWORD *)&kProto.charid.n5_name[0] = *(_QWORD *)&v4->n5_code[0];
  *(_QWORD *)&kProto.charid.n5_code[2] = *(_QWORD *)&v4->n5_code[2];
  v5 = v4->n5_code[4];
  kProto.friendid = charid;
  kProto.charid.n5_code[4] = v5;
  pdata = 21508;
  v6 = (PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr;
  kProto.accept_friend = bAccept_Friend;
  PgNet::AddNetMsg(v6, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 41);
}

//----- (004ABC70) --------------------------------------------------------
void __thiscall GameFrameWork::NcFriendDelReq(GameFrameWork *this, Name5 kCharID)
{
  GameFrameWork *v2; // esi@1
  Name5 *v3; // eax@1
  unsigned int v4; // eax@1
  PgNet *v5; // ecx@1
  __int16 pdata; // [sp+4h] [bp-30h]@1
  PROTO_NC_FRIEND_DEL_REQ kProto; // [sp+8h] [bp-2Ch]@1

  v2 = this;
  *(_QWORD *)&kProto.charid.n5_code[3] = 0i64;
  *(_QWORD *)&kProto.charid.n5_code[1] = 0i64;
  kProto.charid.n5_code[0] = 0;
  *(_QWORD *)&kProto.friendid.n5_code[3] = 0i64;
  *(_QWORD *)&kProto.friendid.n5_code[1] = 0i64;
  kProto.friendid.n5_code[0] = 0;
  v3 = User::GetMainCharID(&g_kUser);
  *(_QWORD *)&kProto.charid.n5_name[0] = *(_QWORD *)&v3->n5_code[0];
  *(_QWORD *)&kProto.charid.n5_code[2] = *(_QWORD *)&v3->n5_code[2];
  v4 = v3->n5_code[4];
  kProto.friendid = kCharID;
  kProto.charid.n5_code[4] = v4;
  v5 = (PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr;
  pdata = 21509;
  PgNet::AddNetMsg(v5, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 40);
}

//----- (004ABD30) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_SPLIT_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  __int16 v4; // cx@1
  DivideWin *v5; // eax@1
  NiUnsharedGeometryGroup *v6; // eax@5

  v3 = this;
  v4 = *(_WORD *)pvData;
  v5 = v3->m_pkDivideWin;
  if ( v5 )
    v5->m_uiResultValue = 0;
  if ( v4 != 1089 && v4 == 1095 )
  {
    v6 = TextData2::Get(0x16306F77u);
    GameFrameWork::AddSysMsg(v3, (const char *)v6);
  }
  return iRevBytes;
}

//----- (004ABD90) --------------------------------------------------------
void __thiscall GameFrameWork::NcBoothOpenReq(GameFrameWork *this, bool bIsSell)
{
  GameFrameWork *v2; // ebx@1
  NiUnsharedGeometryGroup *v3; // eax@6
  char v4; // al@9
  PgNet *v5; // ecx@16
  char v6; // al@16
  unsigned int v7; // esi@16
  signed int v8; // edi@17
  int v9; // esi@22
  PgNet *v10; // ecx@22
  signed int v11; // esi@23
  PrivateStoreWin *v12; // eax@25
  NiPoint3 *v13; // eax@30
  NETCOMMAND netcmd; // [sp+4h] [bp-3Ch]@16
  unsigned int i; // [sp+8h] [bp-38h]@22
  char itemnum; // [sp+Fh] [bp-31h]@16
  PROTO_NC_BOOTH_OPEN_REQ kProto; // [sp+10h] [bp-30h]@22
  PROTO_NC_BOOTH_OPEN_REQ::BoothItem pkItem; // [sp+30h] [bp-10h]@25

  v2 = this;
  if ( this->m_kCharMover.m_bAutoRun )
  {
    KeyboardMoveProcess::SetAutoRun(&this->m_kCharMover, 0);
    ((void (__stdcall *)(signed int))g_pkMainChar->vfptr[7].AddAbStateByAbstateIndex)(1);
  }
  if ( v2->m_pkStickChar )
  {
    ((void (__stdcall *)(signed int))g_pkMainChar->vfptr[7].AddAbStateByAbstateIndex)(1);
    GameFrameWork::Stick(v2, 0, 0);
  }
  if ( JumpProcessor::IsJump(&g_pkMainChar->m_kJumpProcessor) )
  {
    v3 = TextData::Get(0x91A68FCE);
LABEL_7:
    GameFrameWork::AddSysMsg(v2, (const char *)v3);
    return;
  }
  if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[7].GetAbstateColor)() )
  {
    v4 = g_pkMainChar->m_byMode;
    if ( v4 != 4 && v4 != 5 )
    {
      v3 = TextData::Get(0x9AA092C3);
      goto LABEL_7;
    }
  }
  if ( g_pkMainChar->m_byMode == 4 || !Char::CheckActState(g_pkMainChar, 100000) )
  {
    v3 = TextData::Get(0x979697D2);
    goto LABEL_7;
  }
  if ( v2->m_pkPrivateStoreWin )
  {
    v5 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
    netcmd.protocol = 26625;
    PgNet::AddNetMsg(v5, &netcmd, 2);
    v6 = 0;
    v7 = 0;
    itemnum = 0;
    if ( PrivateStoreWin::ms_byBoothSize )
    {
      v8 = 126;
      do
      {
        if ( ItemIcon::GetItem((ItemIcon *)(&v2->m_pkPrivateStoreWin->vfptr)[v8]) )
          ++itemnum;
        ++v7;
        ++v8;
      }
      while ( v7 < PrivateStoreWin::ms_byBoothSize );
      v6 = itemnum;
    }
    v9 = (int)&v2->m_pkPrivateStoreWin->signboard;
    qmemcpy(&kProto, (const void *)v9, 0x1Cu);
    v10 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
    *(_WORD *)&kProto.signboard.signboard[28] = *(_WORD *)(v9 + 28);
    kProto.flag = ($97F7E767E059D36400BDADC4B62CF0E2)(bIsSell | 2 * v6);
    PgNet::AddNetMsg(v10, &kProto, 31);
    i = 0;
    if ( PrivateStoreWin::ms_byBoothSize )
    {
      v11 = 126;
      do
      {
        if ( ItemIcon::GetItem((ItemIcon *)(&v2->m_pkPrivateStoreWin->vfptr)[v11]) )
        {
          v12 = v2->m_pkPrivateStoreWin;
          pkItem.invenslot = (char)(&v12->vfptr)[v11][114].__vecDelDtor;
          if ( pkItem.invenslot > 0xC0u )
            return;
          pkItem.boardslot = i;
          pkItem.unitcost = *(_QWORD *)&(&v12->vfptr)[v11][116].__vecDelDtor;
          if ( !bIsSell )
            pkItem.totallot = (unsigned __int16)(&v12->vfptr)[v11][118].__vecDelDtor;
          PgNet::AddNetMsg((PgNet *)&v2->m_spZoneNet.m_pObject->vfptr, &pkItem, 12);
        }
        ++v11;
        ++i;
      }
      while ( i < PrivateStoreWin::ms_byBoothSize );
    }
    PgNet::SendNetMsg((PgNet *)&v2->m_spZoneNet.m_pObject->vfptr, 0, 0);
    v13 = (NiPoint3 *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
    GameFrameWork::NcActStopReq(v2, v13);
  }
}
// A71184: using guessed type unsigned __int8 PrivateStoreWin::ms_byBoothSize;

//----- (004ABFF0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BOOTH_ITEMTRADE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // eax@1
  GameFrameWork *v4; // esi@1
  NiUnsharedGeometryGroup *v5; // eax@2
  NiUnsharedGeometryGroup *v7; // eax@27
  NiUnsharedGeometryGroup *v8; // eax@5

  v3 = *(_WORD *)pvData;
  v4 = this;
  if ( (_WORD)v3 == 2625 )
  {
    v5 = TextData::Get(0x82A9E4E5);
    GameFrameWork::AddSysMsg(v4, (const char *)v5);
    if ( v4->m_pkPrivateStoreWin )
    {
      GameFrameWork::NcBoothReflashReq(v4, PrivateStoreWin::ms_BoothHandle);
      return iRevBytes;
    }
  }
  else
  {
    switch ( v3 )
    {
      case 2626:
        v8 = TextData::Get(0xAEEDCEE2);
        goto LABEL_29;
      case 2627:
        v8 = TextData::Get(0xC4F4D3EA);
        goto LABEL_29;
      case 2628:
        v8 = TextData::Get(0xB6EED3DE);
        goto LABEL_29;
      case 2629:
        v8 = TextData::Get(0xB9FBC141);
        goto LABEL_29;
      case 2630:
        v8 = TextData::Get(0x29411C70u);
        goto LABEL_29;
      case 2631:
        v8 = TextData::Get(0x6FB68C98u);
        goto LABEL_29;
      case 2632:
        v8 = TextData::Get(0xBBFFDB5A);
        goto LABEL_29;
      case 2633:
        v8 = TextData::Get(0xC9FA2637);
        goto LABEL_29;
      case 2634:
        v8 = TextData::Get(0x164513AEu);
        goto LABEL_29;
      case 2649:
        v8 = TextData::Get(0x5B9272AEu);
        goto LABEL_29;
      case 2650:
        v8 = TextData::Get(0x6DE6B7FCu);
        goto LABEL_29;
      case 2635:
        v8 = TextData::Get(0xA9F5DCE7);
        goto LABEL_29;
      case 2636:
        v8 = TextData::Get(0xFE452425);
        goto LABEL_29;
      case 2637:
        v8 = TextData::Get(0x61A3577Fu);
        goto LABEL_29;
      case 2638:
        v8 = TextData::Get(0x607463EBu);
        goto LABEL_29;
      case 2639:
        v8 = TextData::Get(0xC7231A41);
        goto LABEL_29;
      case 2640:
        v8 = TextData::Get(0xC8DEEF0F);
        goto LABEL_29;
      case 2641:
        v8 = TextData::Get(0x6D8787B5u);
        goto LABEL_29;
      case 2642:
        v8 = TextData::Get(0x5C8EAAD0u);
        goto LABEL_29;
      case 2643:
        v8 = TextData::Get(0x70E5D3F0u);
        goto LABEL_29;
      case 2644:
        v8 = TextData::Get(0xB4003831);
        goto LABEL_29;
      case 2645:
        v8 = TextData::Get(0xA6F2284E);
        goto LABEL_29;
      case 2660:
        v7 = TextData2::Get(0x1F4C7A90u);
        GameFrameWork::AddSysMsg(v4, (const char *)v7);
        return iRevBytes;
      default:
        v8 = TextData::Get(0x4DB07B7Fu);
LABEL_29:
        GameFrameWork::AddSysMsg(v4, (const char *)v8);
        break;
    }
  }
  return iRevBytes;
}
// A8D480: using guessed type unsigned __int16 PrivateStoreWin::ms_BoothHandle;

//----- (004AC1D0) --------------------------------------------------------
int __userpurge GameFrameWork::On_NC_BOOTH_OPEN_ACK@<eax>(GameFrameWork *this@<ecx>, int a2@<edi>, int iRevBytes, void *pvData)
{
  GameFrameWork *v4; // ebx@1
  int v5; // eax@1
  PrivateStoreBD *v6; // eax@2
  NiUnsharedGeometryGroup *v7; // eax@24
  STREETBOOTH_SIGNBOARD v9; // [sp-24h] [bp-30h]@4
  unsigned int v10; // [sp-4h] [bp-10h]@4

  v4 = this;
  g_pkMainChar->m_byMiniHouseSkinID = Inventory::GetMiniHouseSkin(&g_kInventory);
  v5 = *(_WORD *)pvData;
  if ( (_WORD)v5 == 2625 )
  {
    v6 = ScreenBDMgr::GetPrivateStoreBD(&g_kScrnBDMgr, g_pkMainChar->m_kHandle);
    if ( v6 )
      ScreenBDMgr::RemovePrivateStoreBD(&g_kScrnBDMgr, a2, v6);
    PrivateStoreWin::SetPrivateStoreOpen(v4->m_pkPrivateStoreWin, 1);
    GameFrameWork::ChangeCampMode(1, 5);
    qmemcpy(&v9, &v4->m_pkPrivateStoreWin->signboard, sizeof(v9));
    Char::SetCampSignBoard(g_pkMainChar, v9, PrivateStoreWin::ms_uiPrivateStoreMode == 1);
    v10 = -972825633;
  }
  else
  {
    switch ( v5 )
    {
      case 2635:
        v10 = -2014592036;
        break;
      case 2643:
        v10 = -331677142;
        break;
      case 2626:
        v10 = -402666947;
        break;
      case 2627:
        v10 = -1398831983;
        break;
      case 2628:
        v10 = -486416046;
        break;
      case 2629:
        v10 = 1971516096;
        break;
      case 2634:
        v10 = 700027015;
        break;
      case 2636:
        v10 = -1816557376;
        break;
      case 2637:
        v10 = -623122149;
        break;
      case 2638:
        v10 = -1057755603;
        break;
      case 2639:
        v10 = -2106740905;
        break;
      case 2640:
        v10 = 1428501545;
        break;
      case 2642:
        v10 = -551473119;
        break;
      case 2641:
        v10 = -288375884;
        break;
      case 2630:
        v10 = 894462606;
        break;
      case 2645:
        v10 = 1637078780;
        break;
      case 2649:
        v10 = 861087124;
        break;
      default:
        v10 = -1482197565;
        break;
    }
  }
  v7 = TextData::Get(v10);
  GameFrameWork::AddSysMsg(v4, (const char *)v7);
  return iRevBytes;
}
// A71180: using guessed type unsigned int PrivateStoreWin::ms_uiPrivateStoreMode;

//----- (004AC390) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BOOTH_SOMEONEINTERIORSTART_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // ebx@1
  Char *v4; // esi@1
  PrivateStoreBD *v5; // eax@2
  int v6; // esi@5
  char *v7; // eax@10
  STREETBOOTH_SIGNBOARD v9; // [sp-24h] [bp-54h]@4
  int v10; // [sp-Ch] [bp-3Ch]@1
  signed int v11; // [sp-8h] [bp-38h]@1
  signed int v12; // [sp-4h] [bp-34h]@1
  STREETBOOTH_SIGNBOARD signboard; // [sp+Ch] [bp-24h]@1
  __int16 v14; // [sp+2Ah] [bp-6h]@3
  GameFrameWork *v15; // [sp+2Ch] [bp-4h]@1

  v3 = *(_WORD *)pvData;
  qmemcpy(&signboard, (char *)pvData + 2, 0x1Cu);
  v12 = 18;
  v11 = 26;
  v10 = v3;
  v15 = this;
  *(_WORD *)&signboard.signboard[28] = *((_WORD *)pvData + 15);
  v4 = GameFrameWork::GetCharByHandle(this, v3, 26, 18);
  if ( v4 )
  {
    v5 = ScreenBDMgr::GetPrivateStoreBD(&g_kScrnBDMgr, v3);
    if ( v5 )
      ScreenBDMgr::RemovePrivateStoreBD(&g_kScrnBDMgr, (int)&v14, v5);
    v12 = v4->m_bIsSell;
    qmemcpy(&v9, &signboard, 0x1Cu);
    LOWORD(v11) = *(_WORD *)&signboard.signboard[28];
    Char::SetCampSignBoard(v4, v9, v12);
    if ( g_pkMainChar->m_kHandle != (_WORD)v3 )
    {
      v6 = (int)v15;
      if ( v15->m_pkPrivateStoreWin )
      {
        if ( (!PrivateStoreWin::ms_uiPrivateStoreMode || PrivateStoreWin::ms_uiPrivateStoreMode == 2)
          && PrivateStoreWin::ms_BoothHandle == (_WORD)v3
          && (unsigned __int8)((int (*)(void))v15->m_pkPrivateStoreWin->vfptr[65].__vecDelDtor)() )
        {
          PgWinMgr::CloseWin(&Pgg_kWinMgr, *(PgWin **)(v6 + 736));
          v7 = (char *)TextData2::Get(0x3D836EA9u);
          MsgBox::Modeless(MSGBOX_OK, v7);
        }
      }
    }
  }
  return iRevBytes;
}
// A71180: using guessed type unsigned int PrivateStoreWin::ms_uiPrivateStoreMode;
// A8D480: using guessed type unsigned __int16 PrivateStoreWin::ms_BoothHandle;

//----- (004AC480) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BOOTH_ENTRY_SELL_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // eax@1
  GameFrameWork *v4; // ebx@1
  Char *v5; // esi@2
  PrivateStoreWin *v6; // eax@8
  int v7; // esi@9
  char v8; // al@10
  unsigned int v9; // edx@10
  Item *v10; // edi@10
  ItemIcon *v11; // ecx@11
  int v12; // edx@14
  int v13; // edi@15
  PgNet *v14; // ecx@16
  PgNet *v15; // ecx@16
  MarketSearchWin *v16; // ebx@17
  NiUnsharedGeometryGroup *v17; // eax@27
  STREETBOOTH_SIGNBOARD v19; // [sp-24h] [bp-6Ch]@7
  int *v20; // [sp-8h] [bp-50h]@16
  signed int v21; // [sp-4h] [bp-4Ch]@3
  unsigned __int64 unitcost; // [sp+Ch] [bp-3Ch]@10
  int i; // [sp+14h] [bp-34h]@9
  char *v24; // [sp+18h] [bp-30h]@1
  Char *boothslot; // [sp+1Ch] [bp-2Ch]@2
  char datasize; // [sp+23h] [bp-25h]@10
  char pkPrivateStoreName[30]; // [sp+24h] [bp-24h]@8

  InventoryWin::ms_bBuyPrivateStoreActionReady = 1;
  v3 = *(_WORD *)pvData;
  v4 = this;
  v24 = (char *)pvData;
  if ( (_WORD)v3 != 2625 )
  {
    switch ( v3 )
    {
      case 2631:
        v21 = 710359622;
        break;
      case 2632:
        v21 = 1990232328;
        break;
      case 2633:
        v21 = -2070162203;
        break;
      case 2640:
        v21 = 1738108077;
        break;
      case 2644:
        v21 = 1872881375;
        break;
      case 2645:
        v21 = 1637078780;
        break;
      default:
        v21 = -1223961910;
        break;
    }
    goto LABEL_27;
  }
  v5 = GameFrameWork::GetCharByHandle(this, *((_WORD *)pvData + 1), 26, 8);
  boothslot = v5;
  if ( !v5 )
  {
    v21 = -302243239;
LABEL_27:
    v17 = TextData::Get(v21);
    GameFrameWork::AddSysMsg(v4, (const char *)v17);
    return iRevBytes;
  }
  PrivateStoreWin::ms_BoothHandle = *((_WORD *)pvData + 1);
  if ( !(unsigned __int8)((int (*)(void))v4->m_pkInventoryWin->vfptr[65].__vecDelDtor)() )
    GameFrameWork::OpenInventoryWin(v4);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkPrivateStoreWin->vfptr);
  if ( !v5->m_bIsSell )
  {
    Char::RemovePrivateStoreBD(v5, (int)pvData);
    v21 = v5->m_bIsSell == 0;
    qmemcpy(&v19, &v5->m_stSignboard, sizeof(v19));
    v5 = boothslot;
    Char::SetCampSignBoard(boothslot, v19, v21);
    Char::AddPrivateStoreBD(v5);
  }
  PrivateStoreWin::SetPrivateStoreMode(v4->m_pkPrivateStoreWin, 0);
  *(_DWORD *)pkPrivateStoreName = 0;
  *(_DWORD *)&pkPrivateStoreName[4] = 0;
  *(_DWORD *)&pkPrivateStoreName[8] = 0;
  *(_DWORD *)&pkPrivateStoreName[12] = 0;
  *(_DWORD *)&pkPrivateStoreName[16] = 0;
  *(_DWORD *)&pkPrivateStoreName[20] = 0;
  *(_DWORD *)&pkPrivateStoreName[24] = 0;
  *(_WORD *)&pkPrivateStoreName[28] = 0;
  InventoryWin::ms_uiMode = 0;
  v6 = v4->m_pkPrivateStoreWin;
  qmemcpy(pkPrivateStoreName, &v5->m_stSignboard, sizeof(pkPrivateStoreName));
  ((void (__stdcall *)(char *))v6->m_pkStoreNameInputEdit->vfptr[115].__vecDelDtor)(pkPrivateStoreName);
  PrivateStoreWin::ClearItems(v4->m_pkPrivateStoreWin);
  if ( v24[4] )
  {
    v7 = (int)(v24 + 5);
    i = 0;
    do
    {
      v8 = *(_BYTE *)v7;
      v9 = *(_DWORD *)(v7 + 2);
      BYTE3(boothslot) = *(_BYTE *)(v7 + 1);
      datasize = v8;
      unitcost = __PAIR__(*(_DWORD *)(v7 + 6), v9);
      v10 = Item::Create((SHINE_ITEM_STRUCT *)(v7 + 10));
      if ( !v10 )
        break;
      v11 = (ItemIcon *)&v4->m_pkPrivateStoreWin->m_apkInvWin[BYTE3(boothslot)]->vfptr;
      boothslot = (Char *)(4 * BYTE3(boothslot) + 504);
      ItemIcon::SetItem(v11, v10, 1);
      *(_QWORD *)&(*(AbStateInfecteeVtbl **)((char *)&boothslot->vfptr + (unsigned int)v4->m_pkPrivateStoreWin))[14].AddAbStateByAbstateIndex = unitcost;
      if ( (unsigned int)((int (__thiscall *)(Item *))v10->vfptr[4].__vecDelDtor)(v10) > 1
        && !((int (__thiscall *)(Item *))v10->vfptr[3].__vecDelDtor)(v10) )
      {
        ItemIcon::SetItem((ItemIcon *)&v4->m_pkPrivateStoreWin->m_apkInvWin[*(_BYTE *)(v7 + 1)]->vfptr, 0, 1);
      }
      v12 = (unsigned __int8)v24[4];
      v7 += (unsigned __int8)datasize + 1;
      ++i;
    }
    while ( i < v12 );
    v13 = (int)v24;
    if ( g_pkMainChar->m_byMode == 2 )
    {
      Char::SetMode(g_pkMainChar, 1);
      v21 = 2;
      v20 = (int *)&boothslot;
      v14 = (PgNet *)&v4->m_spZoneNet.m_pObject->vfptr;
      LOWORD(boothslot) = 8200;
      PgNet::AddNetMsg(v14, &boothslot, 2);
      v15 = (PgNet *)&v4->m_spZoneNet.m_pObject->vfptr;
      datasize = 1;
      PgNet::SendNetMsg(v15, &datasize, 1);
    }
    v16 = v4->m_pkMarketSearchWin;
    if ( v16 )
      MarketSearchWin::OnSomeoneBoothOpen(v16, *(_WORD *)(v13 + 2));
  }
  return iRevBytes;
}
// A70798: using guessed type bool InventoryWin::ms_bBuyPrivateStoreActionReady;
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;
// A8D480: using guessed type unsigned __int16 PrivateStoreWin::ms_BoothHandle;

//----- (004AC790) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BOOTH_ENTRY_BUY_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // eax@1
  GameFrameWork *v4; // ebx@1
  Char *v5; // esi@2
  PrivateStoreWin *v6; // eax@8
  Char *v7; // eax@9
  AbStateInfecteeVtbl *v8; // edx@11
  int v9; // edx@11
  Item *v10; // eax@11
  Item *v11; // edi@11
  PrivateStoreWin *v12; // ecx@12
  int v13; // esi@12
  int v14; // eax@12
  int v15; // edx@12
  PrivateStoreInvWin *v16; // ecx@12
  int v17; // ecx@15
  PgNet *v18; // ecx@17
  PgNet *v19; // ecx@17
  MarketSearchWin *v20; // ebx@18
  NiUnsharedGeometryGroup *v21; // eax@28
  STREETBOOTH_SIGNBOARD v23; // [sp-24h] [bp-70h]@7
  char *v24; // [sp-8h] [bp-54h]@17
  signed int v25; // [sp-4h] [bp-50h]@3
  unsigned __int64 unitcost; // [sp+Ch] [bp-40h]@11
  int i; // [sp+14h] [bp-38h]@9
  int restquantity; // [sp+18h] [bp-34h]@11
  void *v29; // [sp+1Ch] [bp-30h]@1
  Char *pkChar; // [sp+20h] [bp-2Ch]@2
  char boothslot; // [sp+27h] [bp-25h]@11
  char pkPrivateStoreName[30]; // [sp+28h] [bp-24h]@8

  InventoryWin::ms_bBuyPrivateStoreActionReady = 1;
  v3 = *(_WORD *)pvData;
  v4 = this;
  v29 = pvData;
  if ( (_WORD)v3 != 2625 )
  {
    switch ( v3 )
    {
      case 2631:
        v25 = 710359622;
        break;
      case 2632:
        v25 = 1990232328;
        break;
      case 2633:
        v25 = -2070162203;
        break;
      case 2640:
        v25 = 1738108077;
        break;
      case 2644:
        v25 = 1872881375;
        break;
      case 2645:
        v25 = 1637078780;
        break;
      default:
        v25 = -1223961910;
        break;
    }
    goto LABEL_28;
  }
  v5 = GameFrameWork::GetCharByHandle(this, *((_WORD *)pvData + 1), 26, 9);
  pkChar = v5;
  if ( !v5 )
  {
    v25 = -302243239;
LABEL_28:
    v21 = TextData::Get(v25);
    GameFrameWork::AddSysMsg(v4, (const char *)v21);
    return iRevBytes;
  }
  PrivateStoreWin::ms_BoothHandle = *((_WORD *)pvData + 1);
  if ( !(unsigned __int8)((int (*)(void))v4->m_pkInventoryWin->vfptr[65].__vecDelDtor)() )
    GameFrameWork::OpenInventoryWin(v4);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkPrivateStoreWin->vfptr);
  if ( v5->m_bIsSell )
  {
    Char::RemovePrivateStoreBD(v5, (int)pvData);
    v25 = v5->m_bIsSell == 0;
    qmemcpy(&v23, &v5->m_stSignboard, sizeof(v23));
    v5 = pkChar;
    Char::SetCampSignBoard(pkChar, v23, v25);
    Char::AddPrivateStoreBD(v5);
  }
  PrivateStoreWin::SetPrivateStoreMode(v4->m_pkPrivateStoreWin, 2u);
  InventoryWin::ms_uiMode = 3;
  v6 = v4->m_pkPrivateStoreWin;
  qmemcpy(pkPrivateStoreName, &v5->m_stSignboard, sizeof(pkPrivateStoreName));
  ((void (__stdcall *)(char *))v6->m_pkStoreNameInputEdit->vfptr[115].__vecDelDtor)(pkPrivateStoreName);
  PrivateStoreWin::ClearItems(v4->m_pkPrivateStoreWin);
  if ( *((_BYTE *)v29 + 4) )
  {
    v7 = (Char *)((char *)v29 + 8);
    i = 0;
    for ( pkChar = (Char *)((char *)v29 + 8); ; v7 = pkChar )
    {
      v8 = v7->vfptr;
      boothslot = v7[-1].m_bAirTime;
      unitcost = __PAIR__(LODWORD(v7->m_fPrevTime), (unsigned int)v8);
      v9 = LOWORD(v7->m_kAbStateList.vfptr);
      v25 = *(_WORD *)&v7[-1].m_bDownTime;
      restquantity = v9;
      v10 = Item::Create(v25);
      v11 = v10;
      if ( !v10 )
        break;
      v12 = v4->m_pkPrivateStoreWin;
      v25 = 1;
      v13 = 4 * (unsigned __int8)boothslot + 504;
      ItemIcon::SetItem(*(ItemIcon **)((char *)&v12->vfptr + v13), v10, 1);
      v14 = *(int *)((char *)&v4->m_pkPrivateStoreWin->vfptr + v13);
      v15 = HIDWORD(unitcost);
      *(_DWORD *)(v14 + 464) = unitcost;
      *(_DWORD *)(v14 + 468) = v15;
      v16 = *(PrivateStoreInvWin **)((char *)&v4->m_pkPrivateStoreWin->vfptr + v13);
      v25 = (unsigned __int16)restquantity;
      v16->m_BuySloatItemCount = restquantity;
      PrivateStoreInvWin::SetLotText(v16, v25);
      if ( (unsigned int)((int (__thiscall *)(Item *))v11->vfptr[4].__vecDelDtor)(v11) > 1 && !(_WORD)restquantity )
        ItemIcon::SetItem(*(ItemIcon **)((char *)&v4->m_pkPrivateStoreWin->vfptr + v13), 0, 1);
      v17 = *((_BYTE *)v29 + 4);
      pkChar = (Char *)((char *)pkChar + 13);
      if ( ++i >= v17 )
        break;
    }
    if ( g_pkMainChar->m_byMode == 2 )
    {
      Char::SetMode(g_pkMainChar, 1);
      v18 = (PgNet *)&v4->m_spZoneNet.m_pObject->vfptr;
      LOWORD(pkChar) = 8200;
      PgNet::AddNetMsg(v18, &pkChar, 2);
      v25 = 1;
      v24 = &boothslot;
      v19 = (PgNet *)&v4->m_spZoneNet.m_pObject->vfptr;
      boothslot = 1;
      PgNet::SendNetMsg(v19, &boothslot, 1);
    }
    v20 = v4->m_pkMarketSearchWin;
    if ( v20 )
      MarketSearchWin::OnSomeoneBoothOpen(v20, *((_WORD *)v29 + 1));
  }
  return iRevBytes;
}
// A70798: using guessed type bool InventoryWin::ms_bBuyPrivateStoreActionReady;
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;
// A8D480: using guessed type unsigned __int16 PrivateStoreWin::ms_BoothHandle;

//----- (004ACA90) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BOOTH_REFRESH_SELL_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // ebx@1
  NiUnsharedGeometryGroup *v4; // eax@6
  Char *v5; // edi@9
  NiUnsharedGeometryGroup *v6; // eax@10
  PrivateStoreWin *v7; // eax@11
  char v8; // al@11
  char *v9; // esi@12
  char v10; // al@13
  int v11; // edx@13
  Item *v12; // eax@13
  int v13; // edi@14
  int v14; // edi@14
  int v15; // eax@14
  PgNet *v16; // ecx@16
  PgNet *v17; // ecx@16
  int unitcost; // [sp+8h] [bp-3Ch]@13
  int unitcost_4; // [sp+Ch] [bp-38h]@13
  int i; // [sp+14h] [bp-30h]@12
  __int16 pdata; // [sp+18h] [bp-2Ch]@13
  char datasize; // [sp+1Fh] [bp-25h]@13
  char pkPrivateStoreName[30]; // [sp+20h] [bp-24h]@11

  v3 = this;
  InventoryWin::ms_bBuyPrivateStoreActionReady = 1;
  if ( (unsigned __int8)((int (*)(void))this->m_pkPrivateStoreWin->vfptr[65].__vecDelDtor)() )
  {
    if ( *(_WORD *)pvData == 2625 )
    {
      v5 = GameFrameWork::GetCharByHandle(v3, *((_WORD *)pvData + 1), 26, 11);
      if ( v5 )
      {
        PrivateStoreWin::ms_BoothHandle = *((_WORD *)pvData + 1);
        PrivateStoreWin::SetPrivateStoreMode(v3->m_pkPrivateStoreWin, 0);
        v7 = v3->m_pkPrivateStoreWin;
        qmemcpy(pkPrivateStoreName, &v5->m_stSignboard, sizeof(pkPrivateStoreName));
        ((void (__stdcall *)(char *))v7->m_pkStoreNameInputEdit->vfptr[115].__vecDelDtor)(pkPrivateStoreName);
        PrivateStoreWin::ClearItems(v3->m_pkPrivateStoreWin);
        v8 = *((_BYTE *)pvData + 4);
        if ( v8 )
        {
          v9 = (char *)pvData + 5;
          i = 0;
          if ( v8 )
          {
            do
            {
              v10 = *v9;
              v11 = *(_DWORD *)(v9 + 2);
              HIBYTE(pdata) = v9[1];
              datasize = v10;
              unitcost = v11;
              unitcost_4 = *(_DWORD *)(v9 + 6);
              v12 = Item::Create((SHINE_ITEM_STRUCT *)(v9 + 10));
              if ( !v12 )
                break;
              v13 = 4 * HIBYTE(pdata) + 504;
              ItemIcon::SetItem(*(ItemIcon **)((char *)&v3->m_pkPrivateStoreWin->vfptr + v13), v12, 1);
              v14 = *(int *)((char *)&v3->m_pkPrivateStoreWin->vfptr + v13);
              v15 = (unsigned __int8)datasize;
              *(_DWORD *)(v14 + 464) = unitcost;
              v9 += v15 + 1;
              *(_DWORD *)(v14 + 468) = unitcost_4;
              ++i;
            }
            while ( i < *((_BYTE *)pvData + 4) );
          }
          if ( g_pkMainChar->m_byMode == 2 )
          {
            Char::SetMode(g_pkMainChar, 1);
            v16 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
            pdata = 8200;
            PgNet::AddNetMsg(v16, &pdata, 2);
            v17 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
            datasize = 1;
            PgNet::SendNetMsg(v17, &datasize, 1);
          }
        }
      }
      else
      {
        v6 = TextData::Get(0xEDFC2259);
        GameFrameWork::AddSysMsg(v3, (const char *)v6);
      }
    }
  }
  else
  {
    if ( !(_S3_2 & 1) )
    {
      _S3_2 |= 1u;
      unCheckTimer = Timer::ms_fCurTime;
    }
    if ( unCheckTimer + 1000.0 < Timer::ms_fCurTime )
    {
      unCheckTimer = Timer::ms_fCurTime;
      if ( 2651 == *(_WORD *)pvData )
      {
        v4 = TextData2::Get(0x3D836EA9u);
        GameFrameWork::AddSysMsg(v3, (const char *)v4);
      }
    }
  }
  return iRevBytes;
}
// A70798: using guessed type bool InventoryWin::ms_bBuyPrivateStoreActionReady;
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8D480: using guessed type unsigned __int16 PrivateStoreWin::ms_BoothHandle;

//----- (004ACCB0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BOOTH_REFRESH_BUY_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // ebx@1
  int (*v4)(void); // edx@1
  NiUnsharedGeometryGroup *v5; // eax@6
  Char *v6; // esi@9
  NiUnsharedGeometryGroup *v7; // eax@10
  PrivateStoreWin *v8; // eax@11
  _BYTE *v9; // esi@11
  int v10; // edi@12
  unsigned __int8 v11; // al@13
  int v12; // edx@13
  unsigned __int16 v13; // cx@13
  Item *v14; // eax@15
  int v15; // esi@16
  int v16; // eax@16
  PrivateStoreInvWin *v17; // ecx@16
  PgNet *v18; // ecx@19
  PgNet *v19; // ecx@19
  unsigned __int16 restquantity; // [sp+8h] [bp-3Ch]@13
  int unitcost; // [sp+Ch] [bp-38h]@13
  int unitcost_4; // [sp+10h] [bp-34h]@13
  int i; // [sp+14h] [bp-30h]@12
  _BYTE *pdata; // [sp+18h] [bp-2Ch]@1
  char boothslot; // [sp+1Fh] [bp-25h]@13
  char pkPrivateStoreName[30]; // [sp+20h] [bp-24h]@11

  v3 = this;
  InventoryWin::ms_bBuyPrivateStoreActionReady = 1;
  v4 = (int (*)(void))this->m_pkPrivateStoreWin->vfptr[65].__vecDelDtor;
  pdata = pvData;
  if ( (unsigned __int8)v4() )
  {
    if ( *(_WORD *)pvData == 2625 )
    {
      v6 = GameFrameWork::GetCharByHandle(v3, *((_WORD *)pvData + 1), 26, 12);
      if ( v6 )
      {
        PrivateStoreWin::ms_BoothHandle = *((_WORD *)pvData + 1);
        PrivateStoreWin::SetPrivateStoreMode(v3->m_pkPrivateStoreWin, 2u);
        v8 = v3->m_pkPrivateStoreWin;
        qmemcpy(pkPrivateStoreName, &v6->m_stSignboard, sizeof(pkPrivateStoreName));
        ((void (__stdcall *)(char *))v8->m_pkStoreNameInputEdit->vfptr[115].__vecDelDtor)(pkPrivateStoreName);
        PrivateStoreWin::ClearItems(v3->m_pkPrivateStoreWin);
        v9 = pdata;
        if ( pdata[4] )
        {
          i = 0;
          v10 = (int)(pdata + 8);
          do
          {
            v11 = *(_BYTE *)(v10 - 3);
            v12 = *(_DWORD *)(v10 + 4);
            unitcost = *(_DWORD *)v10;
            v13 = *(_WORD *)(v10 + 8);
            boothslot = *(_BYTE *)(v10 - 3);
            unitcost_4 = v12;
            restquantity = v13;
            if ( v13 )
            {
              v14 = Item::Create(*(_WORD *)(v10 - 2));
              if ( !v14 )
                break;
              v15 = 4 * (unsigned __int8)boothslot + 504;
              ItemIcon::SetItem(*(ItemIcon **)((char *)&v3->m_pkPrivateStoreWin->vfptr + v15), v14, 1);
              v16 = *(int *)((char *)&v3->m_pkPrivateStoreWin->vfptr + v15);
              *(_DWORD *)(v16 + 464) = unitcost;
              *(_DWORD *)(v16 + 468) = unitcost_4;
              v17 = *(PrivateStoreInvWin **)((char *)&v3->m_pkPrivateStoreWin->vfptr + v15);
              v17->m_BuySloatItemCount = restquantity;
              PrivateStoreInvWin::SetLotText(v17, restquantity);
              v9 = pdata;
            }
            else
            {
              ItemIcon::SetItem((ItemIcon *)&v3->m_pkPrivateStoreWin->m_apkInvWin[v11]->vfptr, 0, 1);
            }
            v10 += 13;
            ++i;
          }
          while ( i < v9[4] );
          if ( g_pkMainChar->m_byMode == 2 )
          {
            Char::SetMode(g_pkMainChar, 1);
            v18 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
            LOWORD(pdata) = 8200;
            PgNet::AddNetMsg(v18, &pdata, 2);
            v19 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
            boothslot = 1;
            PgNet::SendNetMsg(v19, &boothslot, 1);
          }
        }
      }
      else
      {
        v7 = TextData::Get(0xEDFC2259);
        GameFrameWork::AddSysMsg(v3, (const char *)v7);
      }
    }
  }
  else
  {
    if ( !(_S4_0 & 1) )
    {
      _S4_0 |= 1u;
      unCheckTimer_0 = Timer::ms_fCurTime;
    }
    if ( unCheckTimer_0 + 1000.0 < Timer::ms_fCurTime )
    {
      unCheckTimer_0 = Timer::ms_fCurTime;
      if ( 2651 == *(_WORD *)pvData )
      {
        v5 = TextData2::Get(0x3D836EA9u);
        GameFrameWork::AddSysMsg(v3, (const char *)v5);
      }
    }
  }
  return iRevBytes;
}
// A70798: using guessed type bool InventoryWin::ms_bBuyPrivateStoreActionReady;
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8D480: using guessed type unsigned __int16 PrivateStoreWin::ms_BoothHandle;

//----- (004ACF00) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BOOTH_SEARCH_ITEM_LIST_CATEGORIZED_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@2
  int result; // eax@2
  MarketSearchWin *v6; // ecx@3

  v3 = this;
  CharMgr::GetChar(&g_kCharMgr, *((_WORD *)pvData + 4));
  if ( *(_WORD *)pvData == 12744 )
  {
    v6 = v3->m_pkMarketSearchWin;
    if ( v6 )
      MarketSearchWin::SetListItems(v6, (PROTO_NC_BOOTH_SEARCH_ITEM_LIST_CATEGORIZED_ACK *)pvData);
    result = iRevBytes;
  }
  else
  {
    v4 = TextData3::Get(0xE40B203C);
    GameFrameWork::AddSysMsg(v3, (const char *)v4);
    result = iRevBytes;
  }
  return result;
}

//----- (004ACF60) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BOOTH_SEARCH_BOOTH_CLOSED_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  MarketSearchWin *v4; // ecx@1
  NiUnsharedGeometryGroup *v5; // eax@3

  v3 = this;
  v4 = this->m_pkMarketSearchWin;
  if ( v4 && MarketSearchWin::IsFindBooth(v4, *(_WORD *)pvData) )
  {
    MarketSearchWin::CloseSearchingMsgBox(v3->m_pkMarketSearchWin);
    v5 = TextData3::Get(0x4A9A67AFu);
    GameFrameWork::AddSysMsg(v3, (const char *)v5);
  }
  return iRevBytes;
}

//----- (004ACFB0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CT_SET_CURRENT_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  __int16 v3; // ax@1
  GameFrameWork *v4; // edi@1
  Char *v5; // eax@2
  NiGeometry *v6; // ecx@2
  unsigned int v7; // edx@6
  int v8; // ecx@7
  CharInfoWin *v9; // ecx@11
  __int16 v10; // ax@12
  char v11; // dl@12
  char *v12; // eax@14
  char v13; // dl@14
  const char *v14; // ebx@14
  NiGeometry *v15; // esi@16
  unsigned int v16; // eax@16
  char *v17; // ecx@17
  CharInfoWin *v18; // eax@26
  CharInfoWin *v19; // eax@28
  CharTitleWin *v20; // eax@29
  char v22; // bl@31
  NiUnsharedGeometryGroup *v23; // eax@36
  NiUnsharedGeometryGroup *v24; // eax@38
  unsigned int v25; // [sp-4h] [bp-1Ch]@33
  char v26; // [sp+Ch] [bp-Ch]@14
  GameFrameWork *v27; // [sp+10h] [bp-8h]@1
  const char *m_name; // [sp+14h] [bp-4h]@12

  v3 = *((_WORD *)pvData + 2);
  v4 = this;
  v27 = this;
  if ( v3 != 2561 )
  {
    v22 = 0;
    if ( v3 != 2563 )
      goto LABEL_37;
    if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[15].Deaffect)() )
    {
      v25 = 895035253;
    }
    else
    {
      if ( !(unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[1].AddAbStateByAbstateIndex)() )
        goto LABEL_37;
      v25 = 1078991129;
    }
    v22 = 1;
    v23 = TextData::Get(v25);
    GameFrameWork::AddSysMsg(v4, (const char *)v23);
LABEL_37:
    if ( *((_WORD *)pvData + 2) == 2564 )
    {
      v24 = TextData2::Get(0xBD31174E);
    }
    else
    {
      if ( v22 )
        return iRevBytes;
      v24 = TextData::Get(0xE60FBF0F);
    }
    GameFrameWork::AddSysMsg(v4, (const char *)v24);
    return iRevBytes;
  }
  v5 = g_pkMainChar;
  v6 = 0;
  if ( g_pkMainChar[1].m_kCharShape.m_apkLodGeom[5] )
  {
    do
    {
      if ( (*((_BYTE *)&v5[1].vfptr + 2 * (_DWORD)v6 + 1) & 0xC0) == -64 )
      {
        *((_BYTE *)&v5[1].vfptr + 2 * (_DWORD)v6 + 1) = *((_BYTE *)&v5[1].vfptr + 2 * (_DWORD)v6 + 1) & 0x3F | 0x80;
        v5 = g_pkMainChar;
      }
      v6 = (NiGeometry *)((char *)v6 + 1);
    }
    while ( v6 < v5[1].m_kCharShape.m_apkLodGeom[5] );
  }
  v7 = 0;
  if ( v5[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[0].dwEffectIndex[0] )
  {
    v8 = 0;
    do
    {
      if ( *((_BYTE *)&v5[1].m_kCharShape.m_apkLodGeom[7] + v8) == 3 )
      {
        *((_BYTE *)&v5[1].m_kCharShape.m_apkLodGeom[7] + v8) = 2;
        v5 = g_pkMainChar;
      }
      ++v7;
      v8 += 6;
    }
    while ( v7 < v5[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[0].dwEffectIndex[0] );
  }
  v5->m_uiCurrCharTitleType = *(_BYTE *)pvData;
  v9 = v4->m_pkCharInfoWin;
  if ( v9 )
  {
    v10 = *((_WORD *)pvData + 1);
    BYTE1(m_name) = *((_BYTE *)pvData + 1);
    v11 = *(_BYTE *)pvData;
    HIWORD(m_name) = v10;
    LOBYTE(m_name) = v11;
    CharInfoWin::SetCharTitleCurrentInfo(v9, (CHARTITLE_BRIEFINFO *)&m_name);
  }
  if ( *(_BYTE *)pvData != 10 )
  {
    v12 = CCharacterTitleData::GetTitleString(&g_characterTitleData, *(_BYTE *)pvData, *((_BYTE *)pvData + 1));
    v13 = *(_BYTE *)pvData;
    v14 = v12;
    m_name = v12;
    v26 = v13;
    if ( !v13 )
    {
      BYTE1(g_pkMainChar[1].vfptr) |= 0xC0u;
      Char::SetCharTitleUse(g_pkMainChar, 0);
      Char::SetCharTitleName(g_pkMainChar, &cName);
      goto LABEL_25;
    }
    v15 = g_pkMainChar[1].m_kCharShape.m_apkLodGeom[5];
    v16 = 0;
    if ( !v15 )
      goto LABEL_24;
    v17 = (char *)&g_pkMainChar[1].vfptr + 1;
    while ( 1 )
    {
      if ( *(v17 - 1) == v13 )
      {
        if ( (*v17 & 0x3F) == *((_BYTE *)pvData + 1) )
        {
          *((_BYTE *)&g_pkMainChar[1].vfptr + 2 * v16 + 1) |= 0xC0u;
          v14 = m_name;
          Char::SetCharTitleName(g_pkMainChar, m_name);
          Char::SetCharTitleUse(g_pkMainChar, 1);
LABEL_24:
          v4 = v27;
LABEL_25:
          if ( v14 )
          {
            v18 = v4->m_pkCharInfoWin;
            if ( v18 )
              ((void (__stdcall *)(const char *))v18->m_pkSubNameTextWin->vfptr[118].__vecDelDtor)(v14);
            break;
          }
          return iRevBytes;
        }
        v13 = v26;
      }
      ++v16;
      v17 += 2;
      if ( v16 >= (unsigned int)v15 )
      {
        v14 = m_name;
        goto LABEL_24;
      }
    }
  }
  v19 = v4->m_pkCharInfoWin;
  if ( !v19 )
    return iRevBytes;
  v20 = v19->m_pkCharTitleWin;
  if ( !v20 )
    return iRevBytes;
  CharTitleWin::UpdateViewList(v20);
  return iRevBytes;
}

//----- (004AD210) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CT_SET_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  char *v4; // ecx@1
  char *v5; // ecx@1
  char *v6; // ST08_4@1
  char *v7; // eax@1
  CharInfoWin *v8; // esi@1
  CharTitleWin *v9; // ecx@2

  v3 = this;
  *((_BYTE *)&g_pkMainChar[1].vfptr + 2 * (unsigned int)g_pkMainChar[1].m_kCharShape.m_apkLodGeom[5]) = *(_BYTE *)pvData;
  v4 = (char *)&g_pkMainChar[1].vfptr + 2 * (unsigned int)g_pkMainChar[1].m_kCharShape.m_apkLodGeom[5] + 1;
  *v4 ^= (*v4 ^ *((_BYTE *)pvData + 1)) & 0x3F;
  v5 = (char *)&g_pkMainChar[1].vfptr + 2 * (unsigned int)g_pkMainChar[1].m_kCharShape.m_apkLodGeom[5] + 1;
  *v5 = *((_BYTE *)pvData + 1) ^ (*v5 ^ *((_BYTE *)pvData + 1)) & 0x3F;
  v6 = CCharacterTitleData::GetTitleString(&g_characterTitleData, *(_BYTE *)pvData, *((_BYTE *)pvData + 1) & 0x3F);
  v7 = (char *)TextData::Get(0x3564277Au);
  GameFrameWork::VaAddSysMsg(v3, v7, v6);
  GameFrameWork::OpenPlayGuideWin(v3, BIL_NICKNAME_1);
  ++g_pkMainChar[1].m_kCharShape.m_apkLodGeom[5];
  v8 = v3->m_pkCharInfoWin;
  if ( v8 )
  {
    v9 = v8->m_pkCharTitleWin;
    if ( v9 )
      CharTitleWin::UpdateViewList(v9);
  }
  return iRevBytes;
}

//----- (004AD2E0) --------------------------------------------------------
void __thiscall GameFrameWork::NcUserPacketToZone(GameFrameWork *this, DirectUserMsgBody_SendPacket *pkPacketBody)
{
  GameFrameWork *v2; // edi@1
  NiUnsharedGeometryGroup *v3; // eax@2
  DirectUserMsgBody_SendPacket *v4; // esi@3
  Net *v5; // ecx@3
  bool v6; // zf@3
  DirectUserMsgBody_SendPacket **v7; // [sp-Ch] [bp-10h]@3
  int v8; // [sp-8h] [bp-Ch]@3

  v2 = this;
  if ( nowState )
  {
    v3 = TextData::Get(0x82F4CCD8);
    GameFrameWork::AddSysMsg(v2, (const char *)v3);
  }
  else
  {
    v4 = pkPacketBody;
    v5 = this->m_spZoneNet.m_pObject;
    v6 = pkPacketBody->pvPacket == 0;
    LOWORD(pkPacketBody) = (pkPacketBody->wDepartment << 10) | pkPacketBody->wCommand & 0x3FF;
    v8 = 2;
    v7 = &pkPacketBody;
    if ( !v6 )
    {
      PgNet::AddNetMsg((PgNet *)&v5->vfptr, &pkPacketBody, 2);
      v8 = v4->uiPacketSize;
      v5 = v2->m_spZoneNet.m_pObject;
      v7 = (DirectUserMsgBody_SendPacket **)v4->pvPacket;
    }
    PgNet::SendNetMsg((PgNet *)&v5->vfptr, v7, v8);
  }
}

//----- (004AD360) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_DEADMENU_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  double v4; // st7@1
  int v5; // eax@1
  NiUnsharedGeometryGroup *v6; // eax@5

  v3 = this;
  OutputDebugStringA("CHAR_DEAD_MENU_OPEN!!!!\n");
  ReviveMenuWin::SetAutoRevieTimeSec(v3->m_pkReviveMenuWin, *(_BYTE *)pvData);
  ReviveMenuWin::SetDeadTime(v3->m_pkReviveMenuWin, Timer::ms_fCurTime);
  RebirthMenuWin::SetAutoRevieTime(v3->m_pkRebirthMenuWin, *(_DWORD *)pvData / 0x3Cu);
  v4 = Timer::ms_fCurTime;
  RebirthMenuWin::SetDeadTime(v3->m_pkRebirthMenuWin, Timer::ms_fCurTime);
  ReviveMenuWin::SetPriority(v3->m_pkReviveMenuWin, *((_BYTE *)pvData + 4));
  AbStateInfectee::ClearAbState((AbStateInfectee *)&g_pkMainChar->vfptr, 0);
  ReviveMenuWin::EnableBtns(v3->m_pkReviveMenuWin, 0, 1);
  v5 = InventoryWin::GetFuncItemCount(v3->m_pkInventoryWin, ITEMFUNC_JUSTREVIVAL);
  ReviveMenuWin::SetReviveBtn(v3->m_pkReviveMenuWin, v5);
  InventoryWin::LockAllItem(v3->m_pkInventoryWin);
  InventoryWin::LockAllEquipItem(v3->m_pkInventoryWin);
  if ( *(_DWORD *)((char *)pvData + 5) == 1 )
    GameFrameWork::OnOpenRebirthMenuWin(v3, 1);
  else
    GameFrameWork::OnOpenReviveMenuWin(v3, 1);
  v3->m_kSkillCasting.eState = 0;
  GameFrameWork::OpenPlayGuideWin(v3, BIL_REVIVAL_1);
  if ( User::Lv(&g_kUser) <= 5 )
  {
    v6 = TextData2::Get(0xD5562A42);
    GameFrameWork::AddSysMsg(v3, (const char *)v6);
  }
  if ( GameFrameWork::IsPlayCardOpen(v3, v4) == 1 )
    GameFrameWork::OpenCollectCardWin(v3, v4, 0, 0, 0, 0, 0);
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004AD4A0) --------------------------------------------------------
int __userpurge GameFrameWork::On_NC_CHAR_REVIVESAME_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<ebx>, int iRevBytes, void *pvData)
{
  return GameFrameWork::On_NC_MAP_LINKSAME_CMD(this, a2, iRevBytes, pvData);
}

//----- (004AD4B0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BRIEFINFO_REGENMOB_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  PROTO_NC_CHAR_BASE_CMD::LoginLocation *v4; // eax@1
  int v5; // edi@3
  int v6; // ebx@3
  int *v7; // eax@5
  int v8; // eax@6
  Char *v9; // edi@8
  NiPoint3 *v10; // eax@9
  int v11; // eax@10
  _BYTE v12[12]; // ST10_12@10
  _BYTE v13[12]; // ST04_12@10
  Char *v14; // eax@13
  NiAVObject *v15; // eax@14
  GameFrameWork *v17; // [sp+18h] [bp-4h]@1

  v3 = this;
  v17 = this;
  CharMgr::AddMob(&g_kCharMgr, (PROTO_NC_BRIEFINFO_REGENMOB_CMD *)pvData);
  MiniMapWin::AddNPC(v3->m_pkMiniMapWin, (PROTO_NC_BRIEFINFO_REGENMOB_CMD *)pvData);
  v4 = User::GetMainCharLoginMapName(&g_kUser);
  if ( MapInfoTab::GetByMapName(&v4->currentmap)->KingdomMap == 1 )
    MiniMapWin::Add_KQ_MOB(v3->m_pkMiniMapWin, (PROTO_NC_BRIEFINFO_REGENMOB_CMD *)pvData);
  v5 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
  v6 = *(_WORD *)((char *)pvData + 3);
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 16))(
                          ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                          v6) )
  {
    if ( (unsigned __int16)v6 <= *(_WORD *)(v5 + 200) )
    {
      v7 = (int *)(*(_DWORD *)(v5 + 196) + 4 * v6);
      if ( *v7 )
      {
        v8 = *v7;
        if ( v8 )
        {
          if ( !*(_BYTE *)(v8 + 82) )
          {
            v9 = GameFrameWork::GetCharByHandle(v17, *(_WORD *)pvData, 7, 8);
            if ( v9 )
            {
              v10 = (NiPoint3 *)((int (__thiscall *)(Char *))v9->vfptr[6].Deaffect)(v9);
              if ( MainChar::IsView((MainChar *)g_pkMainChar, v10) )
              {
                v11 = ((int (__thiscall *)(Char *))v9->vfptr[6].Deaffect)(v9);
                *(float *)v12 = NiPoint3::UNIT_Y.x;
                *(_QWORD *)&v12[4] = *(_QWORD *)&NiPoint3::UNIT_Y.y;
                *(_DWORD *)v13 = *(_DWORD *)v11;
                *(_QWORD *)&v13[4] = *(_QWORD *)(v11 + 4);
                EffectMgr::CreateEffect(
                  &g_kEffectMgr,
                  "Regen",
                  *(NiPoint3 *)v13,
                  *(NiPoint3 *)v12,
                  Timer::ms_fCurTime,
                  1.0);
              }
            }
          }
        }
      }
    }
  }
  if ( *((_BYTE *)pvData + 151) != 2 )
    MiniMapWin::AddKQTeamMark(v17->m_pkMiniMapWin, *(_WORD *)pvData);
  v14 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  if ( v14 )
  {
    v15 = (NiAVObject *)&v14->m_spScene.m_pObject->vfptr;
    if ( v15 )
      NiAVObject::Update(v15, 0.0, 1);
  }
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;

//----- (004AD630) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BRIEFINFO_MOB_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  unsigned __int16 *v4; // esi@2
  int v5; // edi@2
  Char *v6; // eax@3
  NiAVObject *v7; // eax@4

  v3 = this;
  CharMgr::AddMob(&g_kCharMgr, (PROTO_NC_BRIEFINFO_MOB_CMD *)pvData);
  MiniMapWin::AddNPC(v3->m_pkMiniMapWin, (PROTO_NC_BRIEFINFO_MOB_CMD *)pvData);
  if ( *(_BYTE *)pvData )
  {
    v4 = (unsigned __int16 *)((char *)pvData + 1);
    v5 = *(_BYTE *)pvData;
    do
    {
      v6 = CharMgr::GetChar(&g_kCharMgr, *v4);
      if ( v6 )
      {
        v7 = (NiAVObject *)&v6->m_spScene.m_pObject->vfptr;
        if ( v7 )
          NiAVObject::Update(v7, 0.0, 1);
      }
      v4 = (unsigned __int16 *)((char *)v4 + 153);
      --v5;
    }
    while ( v5 );
  }
  return iRevBytes;
}

//----- (004AD6A0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ACT_SOMEONEWHISPER_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  SHINE_ITEM_STRUCT *v4; // ebx@2
  int v5; // ecx@4
  int v6; // edx@4
  int v7; // eax@4
  ChatBlockListWin *v8; // eax@4
  int v9; // ecx@5
  int v10; // edx@5
  int v11; // eax@5
  ChatBlockListWin *v12; // eax@5
  PROTO_CHAT_RESTRICT_INFO *v13; // eax@5
  int v14; // ecx@9
  bool v15; // zf@9
  _BYTE v16[20]; // ST00_20@10
  _BYTE v17[20]; // ST00_20@11
  _BYTE v18[20]; // ST04_20@12
  int v19; // edx@13
  int v20; // eax@13
  int v21; // ecx@13
  int v22; // eax@13
  ChatDisplayWin2 *v23; // ecx@13
  int v25; // [sp+Ch] [bp-BCh]@2
  char acStr[129]; // [sp+10h] [bp-B8h]@9
  char acReceiveName[21]; // [sp+94h] [bp-34h]@12
  char acName[21]; // [sp+ACh] [bp-1Ch]@4

  v3 = this;
  if ( (signed int)*(_BYTE *)pvData > 0 )
  {
    v4 = (SHINE_ITEM_STRUCT *)((char *)pvData + *((_BYTE *)pvData + 22) + 23);
    v25 = *(_BYTE *)pvData;
    do
    {
      GameFrameWork::AddSChatItemLink(v3, 8, v4);
      ++v4;
      --v25;
    }
    while ( v25 );
  }
  v5 = *(_DWORD *)((char *)pvData + 9);
  v6 = *(_DWORD *)((char *)pvData + 1);
  *(_DWORD *)&acName[4] = *(_DWORD *)((char *)pvData + 5);
  v7 = *(_DWORD *)((char *)pvData + 17);
  *(_DWORD *)&acName[8] = v5;
  *(_DWORD *)&acName[16] = v7;
  v8 = v3->m_pkChatBlockListWin;
  *(_DWORD *)acName = v6;
  *(_DWORD *)&acName[12] = *(_DWORD *)((char *)pvData + 13);
  if ( !CChatRestrict::Get(&v8->m_RestrictList, (Name5 *)acName)
    || (v9 = *(_DWORD *)((char *)pvData + 9),
        v10 = *(_DWORD *)((char *)pvData + 1),
        *(_DWORD *)&acName[4] = *(_DWORD *)((char *)pvData + 5),
        v11 = *(_DWORD *)((char *)pvData + 17),
        *(_DWORD *)&acName[8] = v9,
        *(_DWORD *)&acName[16] = v11,
        v12 = v3->m_pkChatBlockListWin,
        *(_DWORD *)acName = v10,
        *(_DWORD *)&acName[12] = *(_DWORD *)((char *)pvData + 13),
        (v13 = CChatRestrict::Get(&v12->m_RestrictList, (Name5 *)acName)) != 0)
    && v13->bIsGM == 1 )
  {
    if ( *((_BYTE *)pvData + 22) > 0x80u )
      *((_BYTE *)pvData + 22) = -128;
    strncpy(acStr, (char *)pvData + 23, *((_BYTE *)pvData + 22));
    v14 = *(_DWORD *)((char *)pvData + 1);
    v15 = (*((_BYTE *)pvData + 21) & 1) == 0;
    acStr[*((_BYTE *)pvData + 22)] = 0;
    if ( v15 )
    {
      *(_DWORD *)v17 = v14;
      *(_QWORD *)&v17[4] = *(_QWORD *)((char *)pvData + 5);
      *(_QWORD *)&v17[12] = *(_QWORD *)((char *)pvData + 13);
      GameFrameWork::AddWhisperChat(v3, *(Name5 *)v17, acStr);
    }
    else
    {
      *(_DWORD *)v16 = v14;
      *(_QWORD *)&v16[4] = *(_QWORD *)((char *)pvData + 5);
      *(_QWORD *)&v16[12] = *(_QWORD *)((char *)pvData + 13);
      GameFrameWork::AddGMWhisperChat(v3, *(Name5 *)v16, acStr);
    }
    *(_DWORD *)v18 = *(_DWORD *)((char *)pvData + 1);
    *(_QWORD *)&v18[4] = *(_QWORD *)((char *)pvData + 5);
    *(_QWORD *)&v18[12] = *(_QWORD *)((char *)pvData + 13);
    GameFrameWork::AddWhisperList(v3, *(Name5 *)v18);
    *(_DWORD *)&acReceiveName[8] = GameFrameWork::m_kWhisperCharID.n5_code[2];
    *(_QWORD *)acReceiveName = *(_QWORD *)&GameFrameWork::m_kWhisperCharID.n5_name[0];
    *(_QWORD *)&acReceiveName[12] = *(_QWORD *)&GameFrameWork::m_kWhisperCharID.n5_code[3];
    acReceiveName[20] = 0;
    GameFrameWork::SmartWhisper::MarkAsRecentlyUsed(&v3->m_kSmartWhisper, acReceiveName);
    if ( !ChatDisplayWin2::IsChatStart(v3->m_pkChatDisplayWin) )
    {
      v19 = *(_DWORD *)((char *)pvData + 9);
      v20 = *(_DWORD *)((char *)pvData + 1);
      *(_DWORD *)&acName[4] = *(_DWORD *)((char *)pvData + 5);
      v21 = *(_DWORD *)((char *)pvData + 17);
      *(_DWORD *)&acName[8] = v19;
      *(_DWORD *)acName = v20;
      v22 = *(_DWORD *)((char *)pvData + 13);
      *(_DWORD *)&acName[16] = v21;
      v23 = v3->m_pkChatDisplayWin;
      *(_DWORD *)&acName[12] = v22;
      acName[20] = 0;
      ChatDisplayWin2::SetChatNameEditText(v23, acName);
    }
  }
  return iRevBytes;
}

//----- (004AD8C0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ACT_WHISPERFAIL_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@4
  NiUnsharedGeometryGroup *v6; // eax@5

  v3 = this;
  if ( *(_WORD *)pvData == 3945 )
  {
    v6 = TextData::Get(0x4CB87A75u);
    goto LABEL_7;
  }
  if ( *(_WORD *)pvData == 3946 )
  {
    v6 = TextData::Get(0x8BC37FD3);
LABEL_7:
    GameFrameWork::AddSysMsg(v3, (const char *)v6);
    return iRevBytes;
  }
  if ( *(_WORD *)pvData == 3948 )
  {
    v4 = TextData2::Get(0xC10ADD20);
    GameFrameWork::AddSysMsg(v3, (const char *)v4);
    return iRevBytes;
  }
  return iRevBytes;
}

//----- (004AD920) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ACT_PARTYCHAT_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@3

  v3 = this;
  if ( *(_WORD *)pvData != 1984 )
  {
    if ( *(_WORD *)pvData == 1985 )
      v4 = TextData::Get(0xA300D0D3);
    else
      v4 = TextData::Get(0x88A89689);
    GameFrameWork::AddSysMsg(v3, (const char *)v4);
  }
  return iRevBytes;
}

//----- (004AD970) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_GUILD_CHAT_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@3

  v3 = this;
  if ( *(_WORD *)pvData != 3371 )
  {
    if ( *(_WORD *)pvData == 3372 )
      v4 = TextData::Get(0x76816B99u);
    else
      v4 = TextData::Get(0xD2DF1F23);
    GameFrameWork::AddSysMsg(v3, (const char *)v4);
  }
  return iRevBytes;
}

//----- (004AD9C0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_GUILD_ACADEMY_CHAT_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // eax@1
  GameFrameWork *v4; // esi@1
  NiUnsharedGeometryGroup *v5; // eax@3

  v3 = *(_WORD *)pvData;
  v4 = this;
  if ( (_WORD)v3 != 6136 )
  {
    switch ( v3 )
    {
      case 6137:
      case 6138:
        v5 = TextData::Get(0xB2EBE824);
        goto LABEL_6;
      case 6139:
        v5 = TextData::Get(0xCEF8D8D4);
        goto LABEL_6;
      case 6140:
        v5 = TextData::Get(0x38664AF3u);
LABEL_6:
        GameFrameWork::AddSysMsg(v4, (const char *)v5);
        break;
      default:
        return iRevBytes;
    }
  }
  return iRevBytes;
}

//----- (004ADA30) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ACT_PITCHTENT_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  int result; // eax@4
  NiUnsharedGeometryGroup *v5; // eax@5
  NiUnsharedGeometryGroup *v6; // eax@6

  v3 = this;
  switch ( *(_WORD *)pvData )
  {
    case 0xA81:
      if ( this->m_kCharMover.m_bAutoRun )
        KeyboardMoveProcess::SetAutoRun(&this->m_kCharMover, 0);
      GameFrameWork::Stick(v3, 0, 0);
      g_pkMainChar->m_byMiniHouseSkinID = Inventory::GetMiniHouseSkin(&g_kInventory);
      GameFrameWork::ChangeCampMode(1, 4);
      result = iRevBytes;
      break;
    case 0xA83:
      Char::SetMode(g_pkMainChar, 1);
      v5 = TextData::Get(0x3B582498u);
      GameFrameWork::AddSysMsg(v3, (const char *)v5);
      result = iRevBytes;
      break;
    case 0xA86:
      Char::SetMode(g_pkMainChar, 1);
      v6 = TextData2::Get(0x786078BDu);
      GameFrameWork::AddSysMsg(v3, (const char *)v6);
      result = iRevBytes;
      break;
    default:
      Char::SetMode(g_pkMainChar, 1);
      result = iRevBytes;
      break;
  }
  return result;
}

//----- (004ADB20) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ACT_RIDE_ON_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  int v4; // eax@2
  _BYTE v5[12]; // ST10_12@2
  _BYTE v6[12]; // ST04_12@2
  NiUnsharedGeometryGroup *v7; // eax@3

  v3 = this;
  if ( g_pkMainChar )
  {
    Char::RidePet(g_pkMainChar, *(_WORD *)pvData);
    Char::SetMode(g_pkMainChar, 6);
    v4 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
    *(float *)v5 = NiPoint3::UNIT_Y.x;
    *(_QWORD *)&v5[4] = *(_QWORD *)&NiPoint3::UNIT_Y.y;
    *(_DWORD *)v6 = *(_DWORD *)v4;
    *(_QWORD *)&v6[4] = *(_QWORD *)(v4 + 4);
    EffectMgr::CreateEffect(&g_kEffectMgr, "Pet_St01", *(NiPoint3 *)v6, *(NiPoint3 *)v5, Timer::ms_fCurTime, 1.0);
  }
  GameFrameWork::ChangeRun();
  GameFrameWork::OpenRidePetWin(v3, *(_WORD *)pvData);
  v7 = TextData::Get(0x43482579u);
  GameFrameWork::AddSysMsg(v3, (const char *)v7);
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004ADBE0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ACT_RIDE_HUNGRY_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  RidePetWin *v4; // ecx@1
  NiUnsharedGeometryGroup *v5; // eax@4

  v3 = this;
  v4 = this->m_pkRidePetWin;
  if ( v4 )
    RidePetWin::SetHungryPoint(v4, *(_WORD *)pvData);
  if ( !*(_WORD *)pvData )
  {
    GameFrameWork::ChangeWalk();
    v5 = TextData::Get(0x81A4DDE2);
    GameFrameWork::AddSysMsg(v3, (const char *)v5);
  }
  return iRevBytes;
}

//----- (004ADC30) --------------------------------------------------------
int __userpurge GameFrameWork::On_NC_ACT_REINFORCE_RUN_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<esi>, int iRevBytes, void *pvData)
{
  int result; // eax@1
  float fY; // ST04_4@4
  float fX; // ST00_4@4
  float v7; // ST08_4@5
  float v8; // ST04_4@5
  NiPoint3 kPos; // [sp+10h] [bp-Ch]@4

  result = iRevBytes;
  if ( iRevBytes == 8
    && (g_pkMainChar->m_kAbStateProperty.iFearCount > 0 || g_pkMainChar->m_kAbStateProperty.iKarenCaptivateStateCount > 0) )
  {
    fX = (double)*(unsigned int *)pvData;
    fY = (double)*((unsigned int *)pvData + 1);
    if ( World::GetAdvGroundPos(&g_kWorld, fX, fY, &kPos) )
    {
      v8 = (double)*(unsigned int *)pvData;
      v7 = (double)*((unsigned int *)pvData + 1);
      if ( !World::IsBlock(&g_kWorld, v8, v7) )
      {
        if ( ((int (__stdcall *)(int))g_pkMainChar->vfptr[7].Affect)(a2) != 1 )
          ((void (__stdcall *)(signed int))g_pkMainChar->vfptr[7].Deaffect)(1);
        dword_B25060->m_uFlags |= 1u;
        ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))g_pkMainChar->vfptr[7].DeleteAbStateByAbstateIndex)(
          LODWORD(kPos.x),
          LODWORD(kPos.y),
          LODWORD(kPos.z));
        ((void (__cdecl *)(NiPoint3 *, _DWORD, NiColor *, signed int))g_pkMainChar->vfptr[7].SetAbStateProperty)(
          &kPos,
          0,
          &Char::INVALIDPOINT3,
          1);
      }
    }
    result = 8;
  }
  return result;
}
// 4ADC30: could not find valid save-restore pair for esi

//----- (004ADD40) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ACT_REINFORCE_WALK_CMD(int iRevBytes, void *pvData)
{
  float fY; // ST08_4@3
  float fX; // ST04_4@3
  NiPoint3 kPos; // [sp+10h] [bp-Ch]@3

  if ( ((int (*)(void))g_pkMainChar->vfptr[7].Affect)() )
    ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[7].Deaffect)(0);
  fX = (double)*(unsigned int *)pvData;
  fY = (double)*((unsigned int *)pvData + 1);
  World::GetAdvGroundPos(&g_kWorld, fX, fY, &kPos);
  dword_B25060->m_uFlags |= 1u;
  ((void (*)(void))g_pkMainChar->vfptr[7].DeleteAbStateByAbstateIndex)();
  ((void (__stdcall *)(NiPoint3 *, _DWORD, NiColor *, signed int))g_pkMainChar->vfptr[7].SetAbStateProperty)(
    &kPos,
    0,
    &Char::INVALIDPOINT3,
    1);
  return iRevBytes;
}

//----- (004ADDF0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_LEVELUP_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  CharDeadEvent_LevelUp *v4; // eax@1
  char *v5; // ebx@1
  bool v6; // zf@3
  Effect *v7; // eax@15
  Effect *v8; // eax@18
  unsigned int v9; // eax@22
  Item *v10; // eax@23
  ItemInfo *v11; // esi@24
  float fLifeTime; // ST20_4@27
  unsigned int v13; // eax@27
  PgNet *v14; // ecx@27
  CClientQuest *v15; // eax@28
  QuestNewsWin *v16; // ecx@30
  MapNavigator *v17; // esi@35
  CharDeadEvent_LevelUp *v18; // ebx@36
  GTInformWin *v19; // esi@42
  D3DXCOLOR *v20; // eax@43
  D3DXCOLOR v21; // ST0C_16@43
  char *v22; // eax@43
  CQuestWin2 *v23; // ecx@44
  char *v24; // eax@48
  BasicInfoLinkType v25; // eax@49
  D3DXCOLOR result; // [sp+24h] [bp-30h]@43
  unsigned int dwDummy; // [sp+34h] [bp-20h]@17
  char acLv[4]; // [sp+38h] [bp-1Ch]@49
  ITEM_INVEN kInv; // [sp+3Ch] [bp-18h]@21
  CharDeadEvent_LevelUp *pdata; // [sp+40h] [bp-14h]@1
  char v32; // [sp+47h] [bp-Dh]@27
  int v33; // [sp+50h] [bp-4h]@1

  v3 = this;
  v4 = (CharDeadEvent_LevelUp *)operator new(0xFCu);
  pdata = v4;
  v5 = (char *)pvData;
  v33 = 0;
  if ( v4 )
    CharDeadEvent_LevelUp::CharDeadEvent_LevelUp(v4, (PgFrameWork *)&v3->vfptr, (PROTO_NC_BAT_LEVELUP_CMD *)pvData);
  v6 = *(_BYTE *)pvData == 120;
  v33 = -1;
  if ( v6
    && (Char::GetClass(g_pkMainChar) == 4
     || Char::GetClass(g_pkMainChar) == 5
     || Char::GetClass(g_pkMainChar) == 9
     || Char::GetClass(g_pkMainChar) == 10
     || Char::GetClass(g_pkMainChar) == 14
     || Char::GetClass(g_pkMainChar) == 15
     || Char::GetClass(g_pkMainChar) == 19
     || Char::GetClass(g_pkMainChar) == 20
     || Char::GetClass(g_pkMainChar) == 24
     || Char::GetClass(g_pkMainChar) == 25
     || Char::GetClass(g_pkMainChar) == 27) )
  {
    v7 = EffectMgr::FindAuraEffect(&g_kEffectMgr, g_pkMainChar->m_kHandle);
    if ( v7 )
      EffectMgr::RemoveEffect(&g_kEffectMgr, v7);
    if ( EffectMgr::CreateAttachEffect(
           &g_kEffectMgr,
           &dwDummy,
           "Aura120",
           g_pkMainChar,
           None,
           Timer::ms_fCurTime,
           1,
           1,
           0,
           1) == 1 )
    {
      v8 = EffectMgr::FindAuraEffect(&g_kEffectMgr, g_pkMainChar->m_kHandle);
      if ( v8 )
      {
        if ( g_pkMainChar->m_kCharShape.m_kEquip.Equ_CosEff != -1 )
          v8->vfptr[21].__vecDelDtor((NiRefObject *)v8, 0);
      }
    }
  }
  User::SetLv(&g_kUser, *(_BYTE *)pvData);
  if ( Inventory::FindMysteryVault(&g_kInventory, &kInv) )
  {
    v9 = kInv.Inven & 0x3FF;
    if ( v9 < 0xC0 )
    {
      v10 = g_kInventory.m_aspInv[v9].m_pObject;
      if ( v10 )
      {
        v11 = v10->m_pkInfo;
        if ( v11 )
        {
          if ( (unsigned __int8)((int (*)(void))v3->m_pkMysteryVaultWin->vfptr[65].__vecDelDtor)() )
            GameFrameWork::CloseMysteryVaultWin(v3);
          fLifeTime = *(float *)&v11->DemandLv;
          v13 = User::Lv(&g_kUser);
          MysteryVaultWin::OnReachTheLevel(v3->m_pkMysteryVaultWin, v13, LODWORD(fLifeTime));
          GameFrameWork::OpenMysteryVaultWin(v3);
          LOWORD(pdata) = 16421;
          v14 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
          v32 = 1;
          PgNet::AddNetMsg(v14, &pdata, 2);
          PgNet::SendNetMsg((PgNet *)&v3->m_spZoneNet.m_pObject->vfptr, &v32, 1);
        }
      }
    }
  }
  v15 = QuestDataMgr::GetQuest();
  if ( !(*(int (__thiscall **)(CClientQuest *, _DWORD))&v15->vfptr->gap4[0])(v15, *(_BYTE *)pvData) )
    QuestDataMgr::m_bUpdate = 1;
  v16 = v3->m_pkQuestNewsWin;
  if ( v16 && QuestNewsWin::QuestPlayer_LevelChange(v16, *(_BYTE *)pvData) )
  {
    EffectMgr::CreatePigeonEffect(&g_kEffectMgr, g_pkMainChar, Timer::ms_fCurTime);
    v3->m_pkQuestNewsWin->m_ePigeonState = 1;
  }
  if ( !ChargedItemList::IsEffecting(EE_AUTOPATHFIND) && User::Lv(&g_kUser) == 61 )
  {
    v17 = MapNavigator::GetMapNavigator((NiPointer<MapNavigator> *)&pdata)->m_pObject;
    if ( pdata )
    {
      v18 = pdata;
      if ( !InterlockedDecrement((volatile LONG *)&pdata->m_pkFrameWork) && v18 )
        ((void (__thiscall *)(CharDeadEvent_LevelUp *, signed int))v18->vfptr->OnDead)(v18, 1);
      v5 = (char *)pvData;
    }
    if ( v17 )
    {
      if ( v17->m_bIsWorking )
      {
        v17->m_bIsWorking = 0;
        v19 = v3->m_pkAutoRunMsgWin;
        if ( v19 )
        {
          GTInformWin::Clear(v3->m_pkAutoRunMsgWin);
          v20 = Color::GetDxColor(&result, -1, -112, 0, -1);
          *(_QWORD *)&v21.r = *(_QWORD *)&v20->r;
          *(_QWORD *)&v21.b = *(_QWORD *)&v20->b;
          v22 = (char *)TextData2::Get(0x3C517589u);
          GTInformWin::AddText(v19, v22, v21, 0, 3.0);
        }
      }
    }
  }
  v23 = v3->m_pkQuestWin;
  if ( v23 )
    CQuestWin2::LevelChange(v23, *v5);
  if ( v3->m_pkGuildWarInformWin && *v5 == 20 )
  {
    v24 = (char *)TextData::Get(0x6BABCEC5u);
    GuildWarInformWin::SetText(v3->m_pkGuildWarInformWin, v24);
  }
  _itoa((unsigned __int8)*v5, acLv, 10);
  v25 = BasicInfoLinkTab::GetbyCType(BIL_C_LV_UP, acLv);
  if ( v25 )
    GameFrameWork::OpenPlayGuideWin(v3, v25);
  return iRevBytes;
}
// A771B0: using guessed type bool QuestDataMgr::m_bUpdate;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004AE1F0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_EXPLOST_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  unsigned int v3; // ST08_4@1
  GameFrameWork *v4; // edi@1
  NiUnsharedGeometryGroup *v5; // eax@1
  char acStr[256]; // [sp+8h] [bp-104h]@1

  v3 = *(_DWORD *)pvData;
  v4 = this;
  v5 = TextData::Get(0xAB03F4E8);
  sprintf(acStr, (const char *)v5, v3);
  GameFrameWork::AddSysMsg(v4, acStr);
  User::SubCurExp(&g_kUser, *(_DWORD *)pvData);
  return iRevBytes;
}

//----- (004AE260) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_SKILLBASH_CAST_FAIL_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  CastingProgressWin *v4; // ecx@1
  NiUnsharedGeometryGroup *v5; // eax@18
  int result; // eax@18
  NiUnsharedGeometryGroup *v7; // eax@21
  NiUnsharedGeometryGroup *v8; // eax@22
  NiUnsharedGeometryGroup *v9; // eax@23
  NiUnsharedGeometryGroup *v10; // eax@4

  v3 = this;
  v4 = this->m_pkCastingProgressBar;
  v3->m_kSkillCasting.eState = 0;
  CastingProgressWin::CastingFail(v4);
  OutputDebugStringA("On_NC_BAT_SKILLBASH_CAST_FAIL_ACK\n");
  if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[15].AddAbStateByAbstateIndex)() )
    Char::CancelSkillAction(g_pkMainChar, 0);
  switch ( *(_WORD *)pvData )
  {
    case 0xFC0:
      v10 = TextData::Get(0x17380921u);
      goto LABEL_25;
    case 0xFC1:
      v10 = TextData::Get(0x2594457Du);
      goto LABEL_25;
    case 0xFC2:
      v10 = TextData::Get(0x258B4C7Bu);
      goto LABEL_25;
    case 0xFC3:
      v10 = TextData::Get(0x233D0568u);
      goto LABEL_25;
    case 0xFC4:
      v10 = TextData::Get(0xCD4D0A1D);
      goto LABEL_25;
    case 0xFC5:
      v10 = TextData::Get(0x1C4C0977u);
      goto LABEL_25;
    case 0xFC6:
      v10 = TextData::Get(0x1E3D0573u);
      goto LABEL_25;
    case 0xFC7:
      v10 = TextData::Get(0xC9E9C6D8);
      goto LABEL_25;
    case 0xFC8:
      v10 = TextData::Get(0xD4F5BC24);
      goto LABEL_25;
    case 0xFC9:
      v10 = TextData::Get(0x84F8B9D8);
      goto LABEL_25;
    case 0xFCA:
      v10 = TextData::Get(0xCD490130);
      goto LABEL_25;
    case 0xFCB:
      v10 = TextData::Get(0x277C607Eu);
      goto LABEL_25;
    case 0xFCC:
      v10 = TextData::Get(0x7EFDAFD8u);
      goto LABEL_25;
    case 0xFCD:
      v10 = TextData::Get(0xD5FA042C);
      goto LABEL_25;
    case 0xFD0:
      v5 = TextData2::Get(0xCF4DF136);
      GameFrameWork::AddSysMsg(v3, (const char *)v5);
      return iRevBytes;
    case 0xFCE:
      v10 = TextData::Get(0xD0F2FE09);
      goto LABEL_25;
    case 0xFCF:
      v10 = TextData::Get(0x82ACBABB);
      goto LABEL_25;
    case 0xFD4:
      v7 = TextData2::Get(0xB4B3476u);
      GameFrameWork::AddSysMsg(v3, (const char *)v7);
      result = iRevBytes;
      break;
    case 0xFD7:
      v8 = TextData2::Get(0xD05E2A2C);
      GameFrameWork::AddSysMsg(v3, (const char *)v8);
      result = iRevBytes;
      break;
    case 0xFD8:
      v9 = TextData2::Get(0xE561B81u);
      GameFrameWork::AddSysMsg(v3, (const char *)v9);
      result = iRevBytes;
      break;
    default:
      v10 = TextData::Get(0xE85E342A);
LABEL_25:
      GameFrameWork::AddSysMsg(v3, (const char *)v10);
      result = iRevBytes;
      break;
  }
  return result;
}

//----- (004AE460) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_CELLCHANGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  _WORD *v3; // esi@1
  GameFrameWork *v4; // edi@1
  Item *v5; // eax@1
  int v6; // ebx@1
  __int16 v7; // ax@1
  unsigned int v8; // ebx@2
  Item *v9; // ebx@3
  Item *v10; // eax@4
  Item *v11; // ecx@4
  NiRefObjectVtbl *v12; // ebx@4
  int v13; // eax@4
  unsigned __int16 v14; // dx@5
  unsigned int v15; // eax@5
  unsigned int v16; // eax@8
  Item *v17; // ebx@9
  GameFrameWork::CellChangeInvPosMode v18; // eax@12
  unsigned int v19; // eax@25
  Item *v20; // ebx@25
  unsigned __int16 v21; // ax@28
  Item *v22; // eax@31
  Item *v23; // ecx@31
  int v24; // eax@31
  int v25; // eax@34
  ItemInfo *v26; // ebx@36
  StorageWin *v27; // ecx@48
  GuildTournamentStorageWin *v28; // eax@54
  GuildAcademyStorageWin *v29; // eax@57
  GuildAcademyItemRewardWin *v30; // eax@59
  GameFrameWork::CellChangeInvPosMode v31; // eax@67
  Item *v32; // ebx@68
  GameFrameWork::CellChangeInvPosMode v33; // eax@82
  Item *v34; // ebx@83
  Item *v35; // ebx@95
  ShortCutWin *v36; // ecx@95
  ShortCutWin *v37; // ecx@97
  ShortCutWin *v38; // ecx@100
  unsigned int v39; // eax@106
  unsigned int uiSize; // [sp+Ch] [bp-10h]@1
  Item *v42; // [sp+10h] [bp-Ch]@65
  Item *pExchangeItem; // [sp+14h] [bp-8h]@4
  Item *pLocationItem; // [sp+18h] [bp-4h]@4
  Item *pkItem; // [sp+28h] [bp+Ch]@1
  Item *pkItemb; // [sp+28h] [bp+Ch]@31
  ShortCutWin **pkItema; // [sp+28h] [bp+Ch]@99

  v3 = pvData;
  v4 = this;
  v5 = Item::Create((char *)pvData + 4, &uiSize);
  v6 = *((_WORD *)pvData + 1);
  pkItem = v5;
  v7 = (unsigned __int16)v6 >> 10;
  if ( (unsigned __int16)v6 >> 10 == 9 )
  {
    v8 = v6 & 0x3FF;
    if ( v8 < 0xC0 )
    {
      v9 = g_kInventory.m_aspInv[v8].m_pObject;
      if ( v9 )
      {
        v10 = (Item *)QuestDataMgr::GetQuest();
        v11 = (Item *)v9->m_kStruct.itemid;
        v12 = v10->vfptr;
        pExchangeItem = v11;
        pLocationItem = v10;
        v13 = Inventory::GetItemCnt(&g_kInventory, (unsigned __int16)v11);
        ((void (__thiscall *)(Item *, Item *, int))v12[4].__vecDelDtor)(pLocationItem, pExchangeItem, v13);
      }
    }
    v14 = v3[1];
    v15 = v3[1] & 0x3FF;
    if ( v15 < 0xC0 )
      pLocationItem = g_kInventory.m_aspInv[v15].m_pObject;
    else
      pLocationItem = 0;
    v16 = *v3 & 0x3FF;
    if ( v16 < 0xC0 )
      v17 = g_kInventory.m_aspInv[v16].m_pObject;
    else
      v17 = 0;
    if ( !((v14 ^ *v3) & 0x3FF) )
      goto LABEL_112;
    v18 = v4->m_CellChangeInvPosMode;
    if ( v18 == CellChange_MODE0 )
    {
      if ( pLocationItem )
      {
        if ( v17 )
        {
          if ( (unsigned __int8)((int (*)(void))pLocationItem->vfptr[1].__vecDelDtor)() == 24
            && (unsigned __int8)((int (__thiscall *)(Item *))v17->vfptr[1].__vecDelDtor)(v17) == 24 )
          {
            v4->m_CellChangeInvPosMode = 1;
            ShortCutMgr::SetInvPosItem(&g_kShortCutMgr, *v3 & 0x3FF, v3[1] & 0x3FF, 0);
            goto LABEL_25;
          }
          if ( (unsigned __int8)((int (*)(void))pLocationItem->vfptr[1].__vecDelDtor)() != 24 )
          {
            v4->m_CellChangeInvPosMode = 3;
            GameFrameWork::LockShortCutWinInvPosItem(v4, *v3 & 0x3FF);
            goto LABEL_25;
          }
        }
        v4->m_CellChangeInvPosMode = 2;
        ShortCutMgr::SetInvPosItem(&g_kShortCutMgr, *v3 & 0x3FF, v3[1] & 0x3FF, 1);
        GameFrameWork::LockShortCutWinInvPosItem(v4, *v3 & 0x3FF);
      }
LABEL_25:
      v19 = v3[1];
      v20 = pkItem;
      if ( v4->m_pkWingStoneWin->m_bCheckPossibility )
        v4->m_bItemInfoChange = InventoryWin::Change(v4->m_pkInventoryWin, v19 >> 10, pkItem, v19 & 0x3FF);
      else
        InventoryWin::Change(v4->m_pkInventoryWin, v19 >> 10, pkItem, v19 & 0x3FF);
      Inventory::Add(&g_kInventory, (unsigned int)v3[1] >> 10, pkItem, v3[1] & 0x3FF);
      v21 = v3[1];
      if ( !((v21 ^ *v3) & 0x3FF) && v21 == *v3 && pkItem )
      {
        v22 = (Item *)QuestDataMgr::GetQuest();
        v23 = (Item *)pkItem->m_kStruct.itemid;
        pExchangeItem = v22;
        pkItemb = v23;
        pLocationItem = (Item *)&v22->vfptr[3];
        v24 = Inventory::GetItemCnt(&g_kInventory, (unsigned __int16)v23);
        ((void (__thiscall *)(Item *, Item *, int))pLocationItem->vfptr)(pExchangeItem, pkItemb, v24);
      }
      if ( !(unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[1].Deaffect)()
        && PgWin::IsVisible((PgWin *)&v4->m_pkReviveMenuWin->vfptr) )
      {
        v25 = InventoryWin::GetFuncItemCount(v4->m_pkInventoryWin, ITEMFUNC_JUSTREVIVAL);
        ReviveMenuWin::SetReviveBtn(v4->m_pkReviveMenuWin, v25);
      }
      v4->m_pkStatusChargedBuffWin->m_fLastUpdatedTime = 0.0;
      ChargedItemListWin::Refresh(v4->m_pkChargedItemListWin);
      ProductionWin::RefreshProductItemState(ProductTask::ms_pkProductionWin);
      if ( v20 )
      {
        v26 = v20->m_pkInfo;
        if ( v26 )
        {
          if ( !((v3[1] ^ *v3) & 0x3FF) )
          {
            switch ( v26->Class )
            {
              case 0x12:
                GameFrameWork::OpenPlayGuideWin(v4, BIL_MINIHOUSE_2);
                break;
              case 4:
              case 5:
              case 6:
              case 7:
              case 8:
                GameFrameWork::OpenPlayGuideWin(v4, BIL_ITEM_3);
                break;
              case 0xA:
                if ( v26->Equip != 25 )
                  GameFrameWork::OpenPlayGuideWin(v4, BIL_ITEM_4);
                break;
              case 0xE:
                GameFrameWork::OpenPlayGuideWin(v4, BIL_SMELTING_1);
                break;
              case 0x22:
                GameFrameWork::OpenPlayGuideWin(v4, BIL_ENCHANT_1);
                break;
              case 0x17:
                GameFrameWork::OpenPlayGuideWin(v4, BIL_MOVER_1);
                break;
              case 0x10:
                GameFrameWork::OpenPlayGuideWin(v4, BIL_WEAPONTITLE_1);
                break;
              default:
                goto LABEL_109;
            }
          }
        }
      }
      goto LABEL_109;
    }
    if ( v18 == 3 )
    {
      v4->m_CellChangeInvPosMode = 0;
      ShortCutMgr::SetInvPosItem(&g_kShortCutMgr, *v3 & 0x3FF, v3[1] & 0x3FF, 1);
    }
    else
    {
LABEL_112:
      v4->m_CellChangeInvPosMode = 0;
    }
    GameFrameWork::UnLockShortCutWinInvPosItem(v4);
    goto LABEL_25;
  }
  if ( v7 == 6 )
  {
    Bank::Add(pkItem, v6 & 0x3FF);
    v27 = v4->m_pkStorageWin;
    if ( v27 )
      StorageWin::ResetContents(v27);
    goto LABEL_109;
  }
  if ( v7 == 12 )
  {
    MiniHouseInventoryWin::Change(v4->m_pkMiniHouseInventoryWin, (unsigned int)v3[1] >> 10, pkItem, v3[1] & 0x3FF);
    Inventory::Add(&g_kInventory, (unsigned int)v3[1] >> 10, pkItem, v3[1] & 0x3FF);
    ChargedItemListWin::Refresh(v4->m_pkChargedItemListWin);
    goto LABEL_109;
  }
  if ( v7 == 4 )
  {
    GuildTournamentStorage::Add(pkItem, v6 & 0x3FF);
    if ( GuildTask::GetGuildTournamentStorageWin() )
    {
      v28 = GuildTask::GetGuildTournamentStorageWin();
      GuildTournamentStorageWin::ResetContents(v28);
    }
    goto LABEL_109;
  }
  if ( !v7 )
  {
    GuildAcademyStorage::Add(pkItem, v6 & 0x3FF);
    if ( GuildAcademyTask::GetGuildAcademyStorageWin() )
    {
      v29 = GuildAcademyTask::GetGuildAcademyStorageWin();
      GuildAcademyStorageWin::ResetContents(v29);
    }
    if ( GuildAcademyTask::GetGuildAcademyItemRewardWin() )
    {
      v30 = GuildAcademyTask::GetGuildAcademyItemRewardWin();
      GuildAcademyItemRewardWin::On_GuildAcademyStorage_Cell_Changed(v30);
    }
    goto LABEL_109;
  }
  if ( v7 == 13 || v7 == 3 || v7 == 14 || v7 == 16 )
  {
    v39 = v3[1];
    if ( pkItem )
    {
      Inventory::GetMHItemInv(&g_kInventory, v39 >> 10, v39 & 0x3FF);
      Inventory::AddMHItemInv(&g_kInventory, (unsigned int)v3[1] >> 10, v3[1] & 0x3FF, pkItem);
    }
    else
    {
      Inventory::AddMHItemInv(&g_kInventory, v39 >> 10, v39 & 0x3FF, 0);
    }
    goto LABEL_109;
  }
  if ( v7 == 2 )
  {
    v42 = Inventory::GetRewardInv(&g_kInventory, v6 & 0x3FF);
    pLocationItem = (Item *)*v3;
    pExchangeItem = Inventory::GetRewardInv(&g_kInventory, (unsigned __int16)pLocationItem & 0x3FF);
    if ( !((v6 ^ (unsigned int)pLocationItem) & 0x3FF) )
    {
      v4->m_CellChangeInvPosMode = 0;
LABEL_78:
      GameFrameWork::UnLockShortCutWinInvPosItem(v4);
      goto LABEL_79;
    }
    v31 = v4->m_CellChangeInvPosMode;
    if ( v31 )
    {
      v4->m_CellChangeInvPosMode = 0;
      if ( v31 == 3 )
        ShortCutMgr::SetInvPosItem(&g_kShortCutMgr, *v3 & 0x3FF, v3[1] & 0x3FF, 1);
      goto LABEL_78;
    }
    v32 = v42;
    if ( v42 )
    {
      if ( pExchangeItem )
      {
        if ( (unsigned __int8)((int (__thiscall *)(Item *))v42->vfptr[1].__vecDelDtor)(v42) == 24
          && (unsigned __int8)((int (*)(void))pExchangeItem->vfptr[1].__vecDelDtor)() == 24 )
        {
          v4->m_CellChangeInvPosMode = 1;
          ShortCutMgr::SetInvPosItem(&g_kShortCutMgr, *v3 & 0x3FF, v3[1] & 0x3FF, 0);
          goto LABEL_79;
        }
        if ( (unsigned __int8)((int (__thiscall *)(Item *))v32->vfptr[1].__vecDelDtor)(v32) != 24 )
        {
          v4->m_CellChangeInvPosMode = 3;
          GameFrameWork::LockShortCutWinInvPosItem(v4, *v3 & 0x3FF);
          goto LABEL_79;
        }
      }
      v4->m_CellChangeInvPosMode = 2;
      ShortCutMgr::SetInvPosItem(&g_kShortCutMgr, *v3 & 0x3FF, v3[1] & 0x3FF, 1);
      GameFrameWork::LockShortCutWinInvPosItem(v4, *v3 & 0x3FF);
    }
LABEL_79:
    InventoryWin::Change(v4->m_pkInventoryWin, (unsigned int)v3[1] >> 10, pkItem, v3[1] & 0x3FF);
    Inventory::Add(&g_kInventory, (unsigned int)v3[1] >> 10, pkItem, v3[1] & 0x3FF);
    goto LABEL_109;
  }
  if ( v7 != 15 )
    goto LABEL_109;
  v42 = Inventory::GetRewardInv(&g_kInventory, v6 & 0x3FF);
  pLocationItem = (Item *)*v3;
  pExchangeItem = Inventory::GetRewardInv(&g_kInventory, (unsigned __int16)pLocationItem & 0x3FF);
  if ( !((v6 ^ (unsigned int)pLocationItem) & 0x3FF) )
    goto LABEL_93;
  v33 = v4->m_CellChangeInvPosMode;
  if ( v33 )
  {
    if ( v33 == 3 )
    {
      v4->m_CellChangeInvPosMode = 0;
      ShortCutMgr::SetInvPosItem(&g_kShortCutMgr, *v3 & 0x3FF, v3[1] & 0x3FF, 1);
LABEL_94:
      GameFrameWork::UnLockShortCutWinInvPosItem(v4);
      goto LABEL_95;
    }
LABEL_93:
    v4->m_CellChangeInvPosMode = 0;
    goto LABEL_94;
  }
  v34 = v42;
  if ( v42 )
  {
    if ( pExchangeItem )
    {
      if ( (unsigned __int8)((int (__thiscall *)(Item *))v42->vfptr[1].__vecDelDtor)(v42) == 24
        && (unsigned __int8)((int (*)(void))pExchangeItem->vfptr[1].__vecDelDtor)() == 24 )
      {
        v4->m_CellChangeInvPosMode = 1;
        ShortCutMgr::SetInvPosItem(&g_kShortCutMgr, *v3 & 0x3FF, v3[1] & 0x3FF, 0);
        goto LABEL_95;
      }
      if ( (unsigned __int8)((int (__thiscall *)(Item *))v34->vfptr[1].__vecDelDtor)(v34) != 24 )
      {
        v4->m_CellChangeInvPosMode = 3;
        GameFrameWork::LockShortCutWinInvPosItem(v4, *v3 & 0x3FF);
        goto LABEL_95;
      }
    }
    v4->m_CellChangeInvPosMode = 2;
    ShortCutMgr::SetInvPosItem(&g_kShortCutMgr, *v3 & 0x3FF, v3[1] & 0x3FF, 1);
    GameFrameWork::LockShortCutWinInvPosItem(v4, *v3 & 0x3FF);
  }
LABEL_95:
  v35 = pkItem;
  ActionWin::Change(v4->m_pkActionWin, (unsigned int)v3[1] >> 10, pkItem, v3[1] & 0x3FF);
  Inventory::Add(&g_kInventory, (unsigned int)v3[1] >> 10, pkItem, v3[1] & 0x3FF);
  v36 = v4->m_pkShortCutWin;
  if ( v36->m_bPremiumActive )
    ShortCutWin::SetPremiumItemInfo(v36, v3[1] & 0x3FF, pkItem);
  v37 = v4->m_pkShortCutWinV;
  if ( v37->m_bPremiumActive )
    ShortCutWin::SetPremiumItemInfo(v37, v3[1] & 0x3FF, pkItem);
  pkItema = v4->m_pkShortCutSubWinV;
  pExchangeItem = (Item *)4;
  do
  {
    v38 = *(pkItema - 5);
    if ( v38->m_bPremiumActive )
      ShortCutWin::SetPremiumItemInfo(v38, v3[1] & 0x3FF, v35);
    if ( (*pkItema)->m_bPremiumActive )
      ShortCutWin::SetPremiumItemInfo(*pkItema, v3[1] & 0x3FF, v35);
    ++pkItema;
    pExchangeItem = (Item *)((char *)pExchangeItem - 1);
  }
  while ( pExchangeItem );
LABEL_109:
  GameFrameWork::OnReflashShortCutWin(v4);
  v4->m_pkStatusChargedBuffWin->m_fLastUpdatedTime = 0.0;
  return iRevBytes;
}

//----- (004AEE20) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_EQUIPCHANGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  Item *v4; // eax@1
  Item *v5; // edi@1
  unsigned int v6; // eax@1
  Item *v7; // eax@2
  int v8; // edi@8
  Item *v9; // esi@8
  Item *v10; // eax@8
  Item **v11; // edi@8
  GameFrameWork *v12; // esi@16
  char v13; // al@19
  int v14; // edi@22
  int v15; // esi@22
  ItemInfo **v16; // eax@24
  ItemInfo *v17; // eax@25
  MinimonInfo *v18; // eax@29
  Item *v19; // eax@32
  Item *v20; // esi@32
  int v21; // esi@34
  CharInfoWin *v22; // eax@45
  CharTitleWin *v23; // ecx@46
  char v24; // al@48
  Effect *v25; // eax@52
  unsigned int uiSize; // [sp+Ch] [bp-80h]@1
  char *v28; // [sp+10h] [bp-7Ch]@1
  GameFrameWork *v29; // [sp+14h] [bp-78h]@1
  int pkMobID; // [sp+18h] [bp-74h]@16
  Item *pkItem; // [sp+1Ch] [bp-70h]@1
  SHINE_ITEM_STRUCT kStruct; // [sp+20h] [bp-6Ch]@34

  v3 = this;
  v29 = this;
  v28 = (char *)pvData + 3;
  v4 = Item::Create((char *)pvData + 3, &uiSize);
  v5 = v4;
  pkItem = v4;
  GameFrameWork::OnReflashShortCutWin(v3);
  v6 = *((_BYTE *)pvData + 2);
  if ( v6 < 0x1E )
    v7 = g_kInventory.m_aspEquip[v6].m_pObject;
  else
    v7 = 0;
  if ( v5 )
  {
    SoundMgr::PlayItemEquipSound(v5->m_kStruct.itemid);
  }
  else if ( v7 )
  {
    SoundMgr::PlayItemEquipSound(v7->m_kStruct.itemid);
  }
  InventoryWin::Change(v3->m_pkInventoryWin, 8u, v5, *((_BYTE *)pvData + 2));
  v8 = *((_BYTE *)pvData + 2);
  v9 = g_kInventory.m_aspEquip[v8].m_pObject;
  v10 = pkItem;
  v11 = (Item **)(4 * v8 + 11109492);
  if ( v9 != pkItem )
  {
    if ( v9 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
        v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      v10 = pkItem;
    }
    *v11 = v10;
    if ( v10 )
      InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
  }
  v12 = v29;
  ChargedItemListWin::Refresh(v29->m_pkChargedItemListWin);
  pkMobID = 0xFFFF;
  if ( !pkItem )
  {
    Char::UnEquip(g_pkMainChar, *((_BYTE *)pvData + 2));
    goto LABEL_45;
  }
  if ( !(`TutorialMgr::GetTutorialMgr'::`2'::`local static guard' & 1) )
  {
    `TutorialMgr::GetTutorialMgr'::`2'::`local static guard' |= 1u;
    TutorialMgr::TutorialMgr(&`TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr);
    atexit(`TutorialMgr::GetTutorialMgr'::`2'::`dynamic atexit destructor for 'kTutorialMgr'');
  }
  TutorialMgr::On_NC_ITEM_EQUIP_ACK(&`TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr);
  v13 = *((_BYTE *)pvData + 2);
  if ( v13 == 25 || v13 == 28 )
  {
    g_pkMainChar->m_kCharShape.m_uiEquipPos = *((_BYTE *)pvData + 2);
    if ( *((_BYTE *)pvData + 2) == 25 )
    {
      v14 = g_pkMainChar->m_kCharShape.m_kEquip.Equ_Minimon;
      v15 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v14) )
      {
        if ( (unsigned __int16)v14 <= *(_WORD *)(v15 + 200) )
        {
          v16 = (ItemInfo **)(*(_DWORD *)(v15 + 196) + 4 * v14);
          if ( *v16 )
          {
            v17 = *v16;
LABEL_28:
            if ( v17 )
            {
              v18 = MinimonInfoTable::GetMinimonInfoByIDX(v17->InxName);
              if ( v18 )
              {
                if ( v18->MinimonRole == 2 )
                  GameFrameWork::CloseMinimonAutoUseWin(v29);
              }
            }
            goto LABEL_32;
          }
        }
      }
    }
    else if ( *((_BYTE *)pvData + 2) == 28 )
    {
      v17 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(g_pkMainChar->m_kCharShape.m_kEquip.Equ_MiniMon_R);
      goto LABEL_28;
    }
  }
LABEL_32:
  Char::Equip(g_pkMainChar, pkItem);
  v19 = Inventory::GetEquipedWeapon(&g_kInventory);
  v20 = v19;
  if ( v19 && (unsigned __int8)((int (__thiscall *)(Item *))v19->vfptr[1].__vecDelDtor)(v19) == 5 )
  {
    v21 = (int)&v20->m_kStruct;
    qmemcpy(&kStruct, (const void *)v21, 0x64u);
    v21 += 100;
    *((_WORD *)&kStruct.itemattr.Bracelet + 49) = *(_WORD *)v21;
    *((_BYTE *)&kStruct.itemattr.Bracelet + 100) = *(_BYTE *)(v21 + 2);
    if ( kStruct.itemattr.MobCard_Unident.Group != -1
      && kStruct.itemattr.weapon.CharacterTitleMobID == kStruct.itemattr.MobCard_Unident.Group )
    {
      pkMobID = kStruct.itemattr.weapon.CharacterTitleMobID;
    }
    if ( *(_WORD *)(&kStruct.itemattr.recallscroll + 13) != -1
      && kStruct.itemattr.weapon.CharacterTitleMobID == *(_WORD *)(&kStruct.itemattr.recallscroll + 13) )
    {
      pkMobID = kStruct.itemattr.weapon.CharacterTitleMobID;
    }
    if ( *(_WORD *)((char *)&kStruct.itemattr.minihouseskin + 19) != -1
      && kStruct.itemattr.weapon.CharacterTitleMobID == *(_WORD *)((char *)&kStruct.itemattr.minihouseskin + 19) )
    {
      pkMobID = kStruct.itemattr.weapon.CharacterTitleMobID;
    }
  }
  MainChar::InitCharactorWeaponTitle((MainChar *)g_pkMainChar, g_pkMainChar->m_uiCurrCharTitleType, pkMobID);
  v12 = v29;
LABEL_45:
  v22 = v12->m_pkCharInfoWin;
  if ( v22 )
  {
    ((void (__stdcall *)(char *))v22->m_pkSubNameTextWin->vfptr[118].__vecDelDtor)(g_pkMainChar->m_CharTitleName);
    v23 = v12->m_pkCharInfoWin->m_pkCharTitleWin;
    if ( v23 )
      CharTitleWin::UpdateViewList(v23);
  }
  v24 = *((_BYTE *)pvData + 2);
  if ( v24 == 25 || v24 == 28 )
    GameFrameWork::OnEquipChangeMiniMon(v12, pkItem);
  if ( *((_BYTE *)pvData + 2) == 17 )
  {
    v25 = EffectMgr::FindAuraEffect(&g_kEffectMgr, g_pkMainChar->m_kHandle);
    if ( v25 )
      ((void (__stdcall *)(_DWORD))v25->vfptr[21].__vecDelDtor)(*(_WORD *)v28 == -1);
  }
  return iRevBytes;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
// A8C638: using guessed type int `TutorialMgr::GetTutorialMgr'::`2'::`local static guard';

//----- (004AF130) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_ITEMBREAK_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  unsigned int v4; // eax@2
  Item *v5; // esi@3
  NiUnsharedGeometryGroup *v6; // eax@6

  v3 = this;
  if ( (*(_WORD *)pvData & 0xFC00) == 0x2000 )
  {
    v4 = *(_WORD *)pvData & 0x3FF;
    if ( v4 < 0x1E )
      v5 = g_kInventory.m_aspEquip[v4].m_pObject;
    else
      v5 = 0;
    if ( v5 == Inventory::GetEquipedWeaponAcc(&g_kInventory) )
    {
      v6 = TextData2::Get(0xF3D5672u);
      GameFrameWork::AddSysMsg(v3, (const char *)v6);
    }
  }
  return iRevBytes;
}

//----- (004AF190) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_BUY_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // eax@1
  GameFrameWork *v4; // esi@1
  NiUnsharedGeometryGroup *v5; // eax@3
  NiUnsharedGeometryGroup *v6; // eax@8
  NiUnsharedGeometryGroup *v7; // eax@11
  CClientQuest *v8; // eax@12
  CClientQuest *v9; // edi@12
  CQuestVtbl *v10; // esi@12
  int v11; // eax@12
  bool v12; // zf@12
  int result; // eax@12
  SoundIndex rkIndex; // [sp+8h] [bp-8h]@11

  v3 = *(_WORD *)pvData;
  v4 = this;
  if ( (_WORD)v3 == 513 )
  {
    v7 = TextData::Get(0x9603EFF2);
    GameFrameWork::AddSysMsg(v4, (const char *)v7);
    rkIndex.m_dwIndex = 16;
    rkIndex.m_acFilename = 0;
    SoundGroupStatic::PlaySoundA((SoundGroupStatic *)&g_kSoundMgr.m_pkInterfaceGroup->vfptr, &rkIndex, 0, 0);
  }
  else
  {
    switch ( v3 )
    {
      case 517:
      case 519:
      case 523:
        v5 = TextData::Get(0x299F4B7Bu);
        goto LABEL_4;
      case 522:
        v5 = TextData::Get(0x20611375u);
        goto LABEL_4;
      case 524:
        v5 = TextData::Get(0x1B3F4B7Au);
        goto LABEL_4;
      case 525:
        v5 = TextData::Get(0x1CA66555u);
LABEL_4:
        GameFrameWork::AddSysMsg(v4, (const char *)v5);
        break;
      case 527:
        v6 = TextData3::Get(0x5083C8E4u);
        goto LABEL_10;
      case 529:
        v6 = TextData3::Get(0x46DDC2A9u);
LABEL_10:
        GameFrameWork::AddSysMsg(v4, (const char *)v6);
        break;
      default:
        break;
    }
  }
  v8 = QuestDataMgr::GetQuest();
  v9 = v8;
  v10 = v8->vfptr;
  v11 = ((int (*)(void))g_pkMainChar->vfptr[20].IsVisible)();
  v12 = (*(int (__thiscall **)(CClientQuest *, int))&v10->gap4[0])(v9, v11) == 0;
  result = iRevBytes;
  if ( v12 )
    QuestDataMgr::m_bUpdate = 1;
  return result;
}
// A771B0: using guessed type bool QuestDataMgr::m_bUpdate;

//----- (004AF2B0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_SELL_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  __int16 v3; // ax@1
  GameFrameWork *v4; // esi@1
  NiUnsharedGeometryGroup *v5; // eax@4
  const char *v6; // eax@5
  CClientQuest *v7; // eax@7
  CClientQuest *v8; // edi@7
  CQuestVtbl *v9; // esi@7
  int v10; // eax@7
  bool v11; // zf@7
  int result; // eax@7
  SoundIndex rkIndex; // [sp+8h] [bp-8h]@6

  v3 = *(_WORD *)pvData;
  v4 = this;
  if ( *(_WORD *)pvData == 897 )
  {
    rkIndex.m_dwIndex = 16;
    rkIndex.m_acFilename = 0;
    SoundGroupStatic::PlaySoundA((SoundGroupStatic *)&g_kSoundMgr.m_pkInterfaceGroup->vfptr, &rkIndex, 0, 0);
  }
  else if ( v3 == 912 || v3 == 911 )
  {
    v6 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v4, v6);
  }
  else
  {
    v5 = TextData::Get(0xA4948173);
    GameFrameWork::AddSysMsg(v4, (const char *)v5);
  }
  v7 = QuestDataMgr::GetQuest();
  v8 = v7;
  v9 = v7->vfptr;
  v10 = ((int (*)(void))g_pkMainChar->vfptr[20].IsVisible)();
  v11 = (*(int (__thiscall **)(CClientQuest *, int))&v9->gap4[0])(v8, v10) == 0;
  result = iRevBytes;
  if ( v11 )
    QuestDataMgr::m_bUpdate = 1;
  return result;
}
// A771B0: using guessed type bool QuestDataMgr::m_bUpdate;

//----- (004AF360) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_RELOC_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // eax@1
  GameFrameWork *v4; // esi@1
  NiUnsharedGeometryGroup *v5; // eax@3

  v3 = *(_WORD *)pvData;
  v4 = this;
  if ( (_WORD)v3 != 577 )
  {
    switch ( v3 )
    {
      case 586:
        v5 = TextData::Get(0xCCDE2219);
        goto LABEL_6;
      case 588:
        v5 = TextData::Get(0xE2F1C6Eu);
        goto LABEL_6;
      default:
        v5 = TextData::Get(0x879E8177);
LABEL_6:
        GameFrameWork::AddSysMsg(v4, (const char *)v5);
        break;
      case 578:
      case 579:
      case 580:
      case 581:
      case 582:
      case 583:
      case 584:
      case 585:
        return iRevBytes;
    }
  }
  return iRevBytes;
}

//----- (004AF3E0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_DROP_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  signed int v3; // eax@1
  GameFrameWork *v4; // esi@1
  int v5; // eax@4
  NiUnsharedGeometryGroup *v6; // eax@6
  CClientQuest *v7; // eax@13
  CClientQuest *v8; // edi@13
  CQuestVtbl *v9; // esi@13
  int v10; // eax@13
  bool v11; // zf@13
  int result; // eax@13

  v3 = *(_WORD *)pvData;
  v4 = this;
  if ( (_WORD)v3 == 769 )
    goto LABEL_13;
  if ( v3 <= 903 )
  {
    if ( v3 != 903 )
    {
      v5 = v3 - 781;
      if ( v5 )
      {
        if ( v5 != 1 )
          goto LABEL_13;
        v6 = TextData::Get(0x82F4CCD8);
      }
      else
      {
        v6 = TextData::Get(0xD7D72510);
      }
      goto LABEL_12;
    }
    goto LABEL_11;
  }
  if ( v3 == 907 )
  {
LABEL_11:
    v6 = TextData::Get(0x8610D8D7);
    goto LABEL_12;
  }
  if ( v3 != 5057 )
    goto LABEL_13;
  v6 = TextData::Get(0xD4DBE3D2);
LABEL_12:
  GameFrameWork::AddSysMsg(v4, (const char *)v6);
LABEL_13:
  InventoryWin::ms_bGetDropItemActionReady = 1;
  v7 = QuestDataMgr::GetQuest();
  v8 = v7;
  v9 = v7->vfptr;
  v10 = ((int (*)(void))g_pkMainChar->vfptr[20].IsVisible)();
  v11 = (*(int (__thiscall **)(CClientQuest *, int))&v9->gap4[0])(v8, v10) == 0;
  result = iRevBytes;
  if ( v11 )
    QuestDataMgr::m_bUpdate = 1;
  return result;
}
// A70797: using guessed type bool InventoryWin::ms_bGetDropItemActionReady;
// A771B0: using guessed type bool QuestDataMgr::m_bUpdate;

//----- (004AF480) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_PICK_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  __int16 v3; // ax@1
  GameFrameWork *v4; // ebx@1
  NiUnsharedGeometryGroup *v5; // eax@11
  NiUnsharedGeometryGroup *v6; // eax@3
  int v7; // edi@33
  int v8; // esi@33
  int *v9; // eax@35
  int v10; // esi@36
  char *v11; // eax@38
  int v12; // ST0C_4@39
  char *v13; // eax@39
  QuestFinishWin *v14; // ecx@40
  CClientQuest *v15; // eax@44
  CClientQuest *v16; // edi@44
  CQuestVtbl *v17; // esi@44
  int v18; // eax@44
  bool v19; // zf@44
  int result; // eax@44

  g_kInventory.m_bWaitingItemDropAck = 0;
  v3 = *((_WORD *)pvData + 3);
  v4 = this;
  if ( v3 != 833 )
  {
    if ( v3 == 836 )
    {
      v6 = TextData::Get(0xE36A2F38);
    }
    else if ( v3 == 837 )
    {
      v6 = TextData::Get(0x8610D8D7);
    }
    else
    {
      if ( v3 != 838 )
      {
        if ( v3 == 843 )
        {
          DropItemMgr::Remove(&g_kDropItemMgr, *((_WORD *)pvData + 4));
          goto LABEL_44;
        }
        switch ( v3 )
        {
          case 8193:
            v5 = TextData2::Get(0x72F5D8BEu);
            break;
          case 8194:
            v5 = TextData2::Get(0xF8418A4B);
            break;
          case 8195:
            v5 = TextData2::Get(0xFF4A8C59);
            break;
          case 8196:
            v5 = TextData2::Get(0xC0F93709);
            break;
          case 8201:
            v5 = TextData2::Get(0x5547D5Fu);
            break;
          case 844:
            v5 = TextData2::Get(0xC0F93709);
            break;
          case 845:
            v5 = TextData2::Get(0x5D8A71BAu);
            break;
          case 8197:
            v5 = TextData2::Get(0x67B0D2C3u);
            break;
          case 846:
            v5 = TextData2::Get(0x12A074Cu);
            break;
          default:
            if ( v3 != 834 )
            {
              v6 = TextData::Get(0x35B67A82u);
              goto LABEL_32;
            }
            v5 = TextData2::Get(0x17290D37u);
            break;
        }
        GameFrameWork::AddSysMsg(v4, (const char *)v5);
        goto LABEL_44;
      }
      v6 = TextData::Get(0xF4F9E3F0);
    }
LABEL_32:
    GameFrameWork::AddSysMsg(v4, (const char *)v6);
    goto LABEL_44;
  }
  SoundMgr::PlayItemPutSound(*(_WORD *)pvData);
  v7 = *(_WORD *)pvData;
  v8 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                          ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                          v7) )
  {
    if ( (unsigned __int16)v7 <= *(_WORD *)(v8 + 200) )
    {
      v9 = (int *)(*(_DWORD *)(v8 + 196) + 4 * v7);
      if ( *v9 )
      {
        v10 = *v9;
        if ( *v9 )
        {
          if ( *(_DWORD *)((char *)pvData + 2) )
          {
            v12 = *(_DWORD *)((char *)pvData + 2);
            v13 = (char *)TextData::Get(0xC20BE2ED);
            GameFrameWork::VaAddSysMsg(v4, v13, v10 + 34, v12);
          }
          else
          {
            v11 = (char *)TextData::Get(0xC10BE2ED);
            GameFrameWork::VaAddSysMsg(v4, v11, v10 + 34);
          }
          v14 = v4->m_pkQuestFinishWin;
          if ( v14 )
            QuestFinishWin::UpdateQuest(v14);
          if ( *(_DWORD *)(v10 + 102) == 30 )
            GameFrameWork::OpenPlayGuideWin(v4, BIL_CARDCOLLECT_1);
        }
      }
    }
  }
LABEL_44:
  v15 = QuestDataMgr::GetQuest();
  v16 = v15;
  v17 = v15->vfptr;
  v18 = ((int (*)(void))g_pkMainChar->vfptr[20].IsVisible)();
  v19 = (*(int (__thiscall **)(CClientQuest *, int))&v17->gap4[0])(v16, v18) == 0;
  result = iRevBytes;
  if ( v19 )
    QuestDataMgr::m_bUpdate = 1;
  return result;
}
// A771B0: using guessed type bool QuestDataMgr::m_bUpdate;
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (004AF6C0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_SOMEONEPICK_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  _BYTE v3[20]; // ST00_20@2
  int v4; // edx@3
  int v5; // ecx@3
  int v6; // edi@3
  int v7; // ebx@3
  int v8; // eax@3
  int v9; // edx@3
  int v10; // edx@5
  int v11; // eax@6
  int v12; // ST10_4@8
  int v13; // ST0C_4@8
  char *v14; // eax@8
  GameFrameWork *v16; // [sp+Ch] [bp-20h]@1
  char acName[21]; // [sp+10h] [bp-1Ch]@3

  v16 = this;
  if ( RaidInfo::IsMeRaidMember(&g_kRaidinfo) )
  {
    *(_DWORD *)v3 = *(_DWORD *)pvData;
    *(_QWORD *)&v3[4] = *(_QWORD *)((char *)pvData + 4);
    *(_QWORD *)&v3[12] = *(_QWORD *)((char *)pvData + 12);
    if ( RaidInfo::GetRaidMemberInfo(&g_kRaidinfo, *(Name5 *)v3) )
    {
      v4 = *(_DWORD *)pvData;
      v5 = *((_DWORD *)pvData + 2);
      v6 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      v7 = *((_WORD *)pvData + 10);
      *(_DWORD *)&acName[4] = *((_DWORD *)pvData + 1);
      v8 = *((_DWORD *)pvData + 4);
      *(_DWORD *)acName = v4;
      v9 = *((_DWORD *)pvData + 3);
      *(_DWORD *)&acName[8] = v5;
      *(_DWORD *)&acName[16] = v8;
      *(_DWORD *)&acName[12] = v9;
      acName[20] = 0;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v7) )
      {
        if ( (unsigned __int16)v7 <= *(_WORD *)(v6 + 200) )
        {
          v10 = *(_DWORD *)(v6 + 196);
          if ( *(_DWORD *)(v10 + 4 * v7) )
          {
            v11 = *(_DWORD *)(v10 + 4 * v7);
            if ( v11 )
            {
              if ( *(_DWORD *)(v11 + 102) != 32 )
              {
                v12 = *(_DWORD *)((char *)pvData + 22);
                v13 = v11 + 34;
                v14 = (char *)TextData2::Get(0x397E6F6Bu);
                GameFrameWork::VaAddSysMsg(v16, v14, acName, v13, v12);
              }
            }
          }
        }
      }
    }
  }
  return iRevBytes;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (004AF7C0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_EQUIP_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@3
  NiUnsharedGeometryGroup *v6; // eax@4

  v3 = this;
  if ( *(_WORD *)pvData != 641 )
  {
    if ( *(_WORD *)pvData == 659 )
    {
      v4 = TextData2::Get(0x3C504783u);
      GameFrameWork::AddSysMsg(v3, (const char *)v4);
      return iRevBytes;
    }
    v6 = TextData::Get(0x87988A83);
    GameFrameWork::AddSysMsg(v3, (const char *)v6);
  }
  return iRevBytes;
}

//----- (004AF820) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_UNEQUIP_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData != 705 )
  {
    v4 = TextData::Get(0x92AD77C0);
    GameFrameWork::AddSysMsg(v3, (const char *)v4);
  }
  return iRevBytes;
}

//----- (004AF850) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_USE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  __int16 v4; // ax@1
  NiUnsharedGeometryGroup *v5; // eax@3
  int result; // eax@3
  NiUnsharedGeometryGroup *v7; // eax@5
  NiUnsharedGeometryGroup *v8; // eax@7
  NiUnsharedGeometryGroup *v9; // eax@9
  NiUnsharedGeometryGroup *v10; // eax@11
  NiUnsharedGeometryGroup *v11; // eax@23
  NiUnsharedGeometryGroup *v12; // eax@27
  NiUnsharedGeometryGroup *v13; // eax@31
  NiUnsharedGeometryGroup *v14; // eax@17
  const char *v15; // eax@41
  int v16; // ebx@42
  int v17; // esi@42
  int *v18; // eax@44
  int v19; // esi@45
  RIDING *v20; // eax@47
  RidePetWin *v21; // ecx@50
  FeedMoverWin *v22; // ecx@52
  NiUnsharedGeometryGroup *v23; // ST00_4@57
  Effect *v24; // eax@59

  v3 = this;
  v4 = *(_WORD *)pvData;
  if ( *(_WORD *)pvData == 1792 )
  {
    v16 = *((_WORD *)pvData + 1);
    v17 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v16) )
    {
      if ( (unsigned __int16)v16 <= *(_WORD *)(v17 + 200) )
      {
        v18 = (int *)(*(_DWORD *)(v17 + 196) + 4 * v16);
        if ( *v18 )
        {
          v19 = *v18;
          if ( *v18 )
          {
            if ( *(_DWORD *)(v19 + 102) == 23 )
            {
              v20 = RidePetTable::GetByInxName((char *)(v19 + 2));
              if ( v20 )
                RidePetWin::SetMoverSpeed(v3->m_pkRidePetWin, (signed int)((double)v20->RunSpeed * 0.1));
            }
            if ( *(_DWORD *)(v19 + 102) == 22 )
            {
              v21 = v3->m_pkRidePetWin;
              if ( v21 )
                RidePetWin::EnablePetFaceAni(v21);
              v22 = v3->m_pkFeedMoverWin;
              if ( v22 )
                FeedMoverWin::EnableMoverFaceAni(v22);
            }
            if ( *((_WORD *)pvData + 1) == 30072 )
            {
              if ( TextData::Get(0x8AA39ED1) )
              {
                v23 = TextData::Get(0x8AA39ED1);
                GameFrameWork::AddSysMsg(v3, (const char *)v23);
              }
              else
              {
                GameFrameWork::AddSysMsg(v3, "Unknown Text");
              }
            }
            if ( *(_DWORD *)(v19 + 110) == 17 )
            {
              v24 = EffectMgr::FindAuraEffect(&g_kEffectMgr, g_pkMainChar->m_kHandle);
              if ( v24 )
                v24->vfptr[21].__vecDelDtor((NiRefObject *)v24, 0);
            }
          }
        }
      }
    }
    return iRevBytes;
  }
  if ( v4 == 4290 )
  {
    v5 = TextData::Get(0x85F7D6D1);
    GameFrameWork::AddSysMsg(v3, (const char *)v5);
    return iRevBytes;
  }
  if ( v4 == 4296 )
  {
    v7 = TextData::Get(0x69A17256u);
    GameFrameWork::AddSysMsg(v3, (const char *)v7);
    return iRevBytes;
  }
  if ( v4 == 4298 )
  {
    v8 = TextData::Get(0x62ABC4A2u);
    GameFrameWork::AddSysMsg(v3, (const char *)v8);
    return iRevBytes;
  }
  if ( v4 == 4297 )
  {
    v9 = TextData::Get(0x83B16E5F);
    GameFrameWork::AddSysMsg(v3, (const char *)v9);
    return iRevBytes;
  }
  if ( v4 == 4295 )
  {
    v10 = TextData::Get(0xBBEEADED);
    GameFrameWork::AddSysMsg(v3, (const char *)v10);
    return iRevBytes;
  }
  if ( v4 == 1802 || v4 == 1806 || v4 == 4292 || v4 == 1807 )
    return iRevBytes;
  if ( v4 == 1818 )
  {
    v14 = TextData2::Get(0x63798E63u);
LABEL_40:
    GameFrameWork::AddSysMsg(v3, (const char *)v14);
    return iRevBytes;
  }
  if ( v4 == 1819 )
  {
    v14 = TextData2::Get(0x66917763u);
    goto LABEL_40;
  }
  if ( v4 == 1820 )
  {
    v14 = TextData2::Get(0x2A50996Cu);
    goto LABEL_40;
  }
  if ( v4 == 1812 )
  {
    v11 = TextData::Get(0x37276777u);
    GameFrameWork::AddSysMsg(v3, (const char *)v11);
    return iRevBytes;
  }
  if ( v4 == 1816 )
  {
    if ( LOBYTE(TextData::Get(0xF835350B)->vfptr) )
    {
      v12 = TextData::Get(0xF835350B);
      GameFrameWork::AddSysMsg(v3, (const char *)v12);
      result = iRevBytes;
    }
    else
    {
      GameFrameWork::AddSysMsg(v3, "Unknown Text");
      result = iRevBytes;
    }
  }
  else if ( v4 == 1817 )
  {
    if ( LOBYTE(TextData::Get(0x4B539891u)->vfptr) )
    {
      v13 = TextData::Get(0x4B539891u);
      GameFrameWork::AddSysMsg(v3, (const char *)v13);
      result = iRevBytes;
    }
    else
    {
      GameFrameWork::AddSysMsg(v3, "Unknown text");
      result = iRevBytes;
    }
  }
  else
  {
    if ( v4 == 1827 )
    {
      v14 = TextData2::Get(0x51746E67u);
      goto LABEL_40;
    }
    if ( v4 == 1828 )
    {
      v14 = TextData2::Get(0xE0DAC2DD);
      goto LABEL_40;
    }
    if ( v4 == 1829 )
    {
      v14 = TextData2::Get(0x7A09E9D9u);
      goto LABEL_40;
    }
    if ( v4 == 1830 )
    {
      v14 = TextData2::Get(0x88C5E0D0);
      goto LABEL_40;
    }
    v15 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v15);
    result = iRevBytes;
  }
  return result;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (004AFC10) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_DEPOSIT_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@3
  CClientQuest *v5; // eax@5
  CClientQuest *v6; // edi@5
  CQuestVtbl *v7; // esi@5
  int v8; // eax@5
  bool v9; // zf@5
  int result; // eax@5

  v3 = this;
  if ( *((_WORD *)pvData + 4) == 3968 )
  {
    Bank::SetMoney(*(_QWORD *)pvData);
  }
  else if ( *((_WORD *)pvData + 4) == 3971 )
  {
    v4 = TextData::Get(0xDD291C2D);
    GameFrameWork::AddSysMsg(v3, (const char *)v4);
  }
  v5 = QuestDataMgr::GetQuest();
  v6 = v5;
  v7 = v5->vfptr;
  v8 = ((int (*)(void))g_pkMainChar->vfptr[20].IsVisible)();
  v9 = (*(int (__thiscall **)(CClientQuest *, int))&v7->gap4[0])(v6, v8) == 0;
  result = iRevBytes;
  if ( v9 )
    QuestDataMgr::m_bUpdate = 1;
  return result;
}
// A771B0: using guessed type bool QuestDataMgr::m_bUpdate;

//----- (004AFC90) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_WITHDRAW_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@3
  CClientQuest *v5; // eax@5
  CClientQuest *v6; // edi@5
  CQuestVtbl *v7; // esi@5
  int v8; // eax@5
  bool v9; // zf@5
  int result; // eax@5

  v3 = this;
  if ( *((_WORD *)pvData + 4) == 3968 )
  {
    Bank::SetMoney(*(_QWORD *)pvData);
  }
  else if ( *((_WORD *)pvData + 4) == 3971 )
  {
    v4 = TextData::Get(0x2D1A2931u);
    GameFrameWork::AddSysMsg(v3, (const char *)v4);
  }
  v5 = QuestDataMgr::GetQuest();
  v6 = v5;
  v7 = v5->vfptr;
  v8 = ((int (*)(void))g_pkMainChar->vfptr[20].IsVisible)();
  v9 = (*(int (__thiscall **)(CClientQuest *, int))&v7->gap4[0])(v6, v8) == 0;
  result = iRevBytes;
  if ( v9 )
    QuestDataMgr::m_bUpdate = 1;
  return result;
}
// A771B0: using guessed type bool QuestDataMgr::m_bUpdate;

//----- (004AFD10) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_CHARGEDINVENOPEN_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  void *v3; // ebx@1
  GameFrameWork *v4; // edi@1
  InventoryWin *v5; // ecx@2
  ChargedItemInvenWin *v6; // ecx@3
  unsigned int v7; // eax@3
  char v9; // al@5
  MainMenuWin *v10; // ecx@5
  signed int v11; // esi@9
  PROTO_CHARGED_ITEM_INFO *v12; // edi@10
  NiUnsharedGeometryGroup *v13; // eax@14
  GameFrameWork *v14; // [sp+8h] [bp-4h]@1

  v3 = pvData;
  v4 = this;
  v14 = this;
  if ( *(_WORD *)pvData != 4161 )
  {
    v13 = TextData::Get(0xC2E7260D);
    GameFrameWork::AddSysMsg(v4, (const char *)v13);
    return iRevBytes;
  }
  v5 = this->m_pkInventoryWin;
  if ( !*(_WORD *)((char *)pvData + 3) )
  {
    v6 = v5->m_pkChargedItemInvenWin;
    v7 = v6->m_uiCurrPage;
    if ( v7 )
    {
      v6->m_uiCurrPage = v7 - 1;
      return iRevBytes;
    }
    return iRevBytes;
  }
  InventoryWin::ShowChargedNewMark(v5, 1);
  v9 = InventoryWin::GetIsViewNewMark(v4->m_pkInventoryWin);
  v10 = v4->m_pkMainMenuWin;
  LOBYTE(pvData) = v9;
  if ( v10 )
    MainMenuWin::ShowNewMark(v10, (int)pvData);
  if ( *((_BYTE *)v3 + 2) & 1 )
    CChargedItem::Clear(&g_kChargedItem);
  v11 = 0;
  if ( *(_WORD *)((char *)v3 + 3) > 0u )
  {
    v12 = (PROTO_CHARGED_ITEM_INFO *)((char *)v3 + 5);
    do
    {
      CChargedItem::Add(&g_kChargedItem, v12);
      ++v11;
      ++v12;
    }
    while ( v11 < *(_WORD *)((char *)v3 + 3) );
    v4 = v14;
  }
  InventoryWin::RefreshChargedItemInven(v4->m_pkInventoryWin);
  return iRevBytes;
}

//----- (004AFE00) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_PARTY_JOIN_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // eax@1
  GameFrameWork *v4; // edi@1
  PartyMemberInfo *v5; // eax@2
  int v6; // edx@4
  int v7; // eax@4
  int v8; // edx@4
  int v9; // eax@4
  char *v10; // eax@4
  PgNet *v11; // ecx@4
  PartyWinInterface *v12; // ecx@4
  int v13; // ecx@6
  int v14; // edx@6
  int v15; // ecx@6
  char *v16; // eax@6
  const char *v17; // eax@7
  __int16 pdata; // [sp+8h] [bp-20h]@4
  char acName[21]; // [sp+Ch] [bp-1Ch]@4

  v3 = *(_WORD *)((char *)pvData + 21);
  v4 = this;
  if ( (_WORD)v3 == 1217 )
  {
    v5 = Party::AddMember(&g_kParty, (PROTO_NC_PARTY_JOIN_ACK *)pvData);
    if ( v5 )
      MiniMapWin::AddParty(v4->m_pkMiniMapWin, v5);
    v6 = *(_DWORD *)pvData;
    v7 = *((_DWORD *)pvData + 1);
    *(_DWORD *)&acName[8] = *((_DWORD *)pvData + 2);
    *(_DWORD *)acName = v6;
    v8 = *((_DWORD *)pvData + 3);
    *(_DWORD *)&acName[4] = v7;
    v9 = *((_DWORD *)pvData + 4);
    *(_DWORD *)&acName[12] = v8;
    *(_DWORD *)&acName[16] = v9;
    acName[20] = 0;
    v10 = (char *)TextData::Get(0x9FA36BE3);
    GameFrameWork::VaAddSysMsg(v4, v10, acName);
    v11 = (PgNet *)&v4->m_spZoneNet.m_pObject->vfptr;
    pdata = 14408;
    PgNet::SendNetMsg(v11, &pdata, 2);
    v12 = v4->m_pkPartyWinInterface;
    if ( v12 )
      PartyWinInterface::Update(v12);
  }
  else
  {
    v13 = *(_DWORD *)pvData;
    *(_DWORD *)&acName[4] = *((_DWORD *)pvData + 1);
    v14 = *((_DWORD *)pvData + 3);
    *(_DWORD *)acName = v13;
    v15 = *((_DWORD *)pvData + 2);
    *(_DWORD *)&acName[12] = v14;
    *(_DWORD *)&acName[8] = v15;
    *(_DWORD *)&acName[16] = *((_DWORD *)pvData + 4);
    acName[20] = 0;
    v16 = ErrMsgTable::GetErrMsg(v3);
    GameFrameWork::VaAddSysMsg(v4, v16, acName);
    if ( *(_WORD *)((char *)pvData + 21) == 1242 )
    {
      v17 = ErrMsgTable::GetErrMsg(1242);
      GameFrameWork::AddSysMsg(v4, v17);
    }
  }
  return iRevBytes;
}

//----- (004AFF20) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_PARTY_LEAVE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  Name5 *v4; // eax@1
  int v5; // ecx@1
  NiUnsharedGeometryGroup *v6; // eax@6
  int v7; // edx@15
  int v8; // ecx@15
  int v9; // edx@15
  char *v10; // eax@15
  _BYTE v11[20]; // ST00_20@15
  PartyMemberInfo *v12; // eax@15
  _BYTE v13[20]; // ST00_20@17
  PartyWinInterface *v14; // ecx@18
  char acName[21]; // [sp+8h] [bp-1Ch]@15

  v3 = this;
  v4 = User::GetMainCharID(&g_kUser);
  v5 = *(_DWORD *)pvData;
  if ( *(_DWORD *)pvData != v4->n5_code[0]
    || *((_DWORD *)pvData + 1) != v4->n5_code[1]
    || *((_DWORD *)pvData + 2) != v4->n5_code[2]
    || *((_DWORD *)pvData + 3) != v4->n5_code[3]
    || *((_DWORD *)pvData + 4) != v4->n5_code[4] )
  {
    v7 = *((_DWORD *)pvData + 1);
    *(_DWORD *)&acName[8] = *((_DWORD *)pvData + 2);
    *(_DWORD *)acName = v5;
    v8 = *((_DWORD *)pvData + 3);
    *(_DWORD *)&acName[4] = v7;
    v9 = *((_DWORD *)pvData + 4);
    *(_DWORD *)&acName[12] = v8;
    *(_DWORD *)&acName[16] = v9;
    acName[20] = 0;
    v10 = (char *)TextData::Get(0x859AC5E9);
    GameFrameWork::VaAddSysMsg(v3, v10, acName);
    *(_DWORD *)v11 = *(_DWORD *)pvData;
    *(_QWORD *)&v11[4] = *(_QWORD *)((char *)pvData + 4);
    *(_QWORD *)&v11[12] = *(_QWORD *)((char *)pvData + 12);
    v12 = Party::GetMemberInfo(&g_kParty, *(Name5 *)v11);
    if ( v12 )
      MiniMapWin::RemoveParty(v3->m_pkMiniMapWin, v12);
    *(_DWORD *)v13 = *(_DWORD *)pvData;
    *(_QWORD *)&v13[4] = *(_QWORD *)((char *)pvData + 4);
    *(_QWORD *)&v13[12] = *(_QWORD *)((char *)pvData + 12);
    Party::DeleteMember(&g_kParty, *(Name5 *)v13);
  }
  else
  {
    v6 = TextData::Get(0xE35A3D30);
    GameFrameWork::AddSysMsg(v3, (const char *)v6);
    Party::ClearMemberInfo(&g_kParty);
    MiniMapWin::ClearParty(v3->m_pkMiniMapWin);
    if ( v3->m_pkPartyLootSetupWin
      && (unsigned __int8)((int (*)(void))v3->m_pkPartyLootSetupWin->vfptr[65].__vecDelDtor)() )
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkPartyLootSetupWin->vfptr);
    }
    if ( v3->m_pkRollingDiceWin && (unsigned __int8)((int (*)(void))v3->m_pkRollingDiceWin->vfptr[65].__vecDelDtor)() )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkRollingDiceWin->vfptr);
    if ( v3->m_pkRollingDiceMsgWin
      && (unsigned __int8)((int (*)(void))v3->m_pkRollingDiceMsgWin->vfptr[65].__vecDelDtor)() )
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkRollingDiceMsgWin->vfptr);
    }
  }
  v14 = v3->m_pkPartyWinInterface;
  if ( v14 )
    PartyWinInterface::Update(v14);
  return iRevBytes;
}

//----- (004B0100) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_PARTY_KICKOFF_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // eax@1
  GameFrameWork *v4; // edi@1
  Name5 *v5; // eax@2
  NiUnsharedGeometryGroup *v6; // eax@7
  int v7; // eax@8
  int v8; // edx@8
  int v9; // eax@8
  char *v10; // eax@8
  _BYTE v11[20]; // ST00_20@8
  PartyMemberInfo *v12; // eax@8
  _BYTE v13[20]; // ST00_20@10
  int v14; // eax@11
  int v15; // eax@12
  NiUnsharedGeometryGroup *v16; // eax@14
  PartyWinInterface *v17; // ecx@18
  char acName[21]; // [sp+8h] [bp-1Ch]@8

  v3 = *((_WORD *)pvData + 10);
  v4 = this;
  if ( (_WORD)v3 == 1345 )
  {
    v5 = User::GetMainCharID(&g_kUser);
    if ( *(_DWORD *)pvData != v5->n5_code[0]
      || *((_DWORD *)pvData + 1) != v5->n5_code[1]
      || *((_DWORD *)pvData + 2) != v5->n5_code[2]
      || *((_DWORD *)pvData + 3) != v5->n5_code[3]
      || *((_DWORD *)pvData + 4) != v5->n5_code[4] )
    {
      v7 = *((_DWORD *)pvData + 1);
      v8 = *((_DWORD *)pvData + 3);
      *(_DWORD *)acName = *(_DWORD *)pvData;
      *(_DWORD *)&acName[8] = *((_DWORD *)pvData + 2);
      *(_DWORD *)&acName[4] = v7;
      v9 = *((_DWORD *)pvData + 4);
      *(_DWORD *)&acName[12] = v8;
      *(_DWORD *)&acName[16] = v9;
      acName[20] = 0;
      v10 = (char *)TextData::Get(0x859AC5E9);
      GameFrameWork::VaAddSysMsg(v4, v10, acName);
      *(_DWORD *)v11 = *(_DWORD *)pvData;
      *(_QWORD *)&v11[4] = *(_QWORD *)((char *)pvData + 4);
      *(_QWORD *)&v11[12] = *(_QWORD *)((char *)pvData + 12);
      v12 = Party::GetMemberInfo(&g_kParty, *(Name5 *)v11);
      if ( v12 )
        MiniMapWin::RemoveParty(v4->m_pkMiniMapWin, v12);
      *(_DWORD *)v13 = *(_DWORD *)pvData;
      *(_QWORD *)&v13[4] = *(_QWORD *)((char *)pvData + 4);
      *(_QWORD *)&v13[12] = *(_QWORD *)((char *)pvData + 12);
      Party::DeleteMember(&g_kParty, *(Name5 *)v13);
    }
    else
    {
      v6 = TextData::Get(0xDFF6E9E5);
      GameFrameWork::AddSysMsg(v4, (const char *)v6);
      Party::Clear(&g_kParty);
      MiniMapWin::ClearParty(v4->m_pkMiniMapWin);
    }
  }
  else
  {
    v14 = v3 - 1346;
    if ( v14 )
    {
      v15 = v14 - 1;
      if ( v15 )
      {
        if ( v15 != 3 )
          goto LABEL_18;
        v16 = TextData2::Get(0x1E8367A3u);
      }
      else
      {
        v16 = TextData2::Get(0x3F654FCAu);
      }
    }
    else
    {
      v16 = TextData2::Get(0x6CD9A8DBu);
    }
    GameFrameWork::AddSysMsg(v4, (const char *)v16);
  }
LABEL_18:
  v17 = v4->m_pkPartyWinInterface;
  if ( v17 )
    PartyWinInterface::Update(v17);
  return iRevBytes;
}

//----- (004B0280) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_PARTY_DISMISS_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@1
  PartyWinInterface *v5; // ecx@10

  v3 = this;
  Party::Clear(&g_kParty);
  MiniMapWin::ClearParty(v3->m_pkMiniMapWin);
  v4 = TextData::Get(0x404224AEu);
  GameFrameWork::AddSysMsg(v3, (const char *)v4);
  if ( v3->m_pkPartyLootSetupWin
    && (unsigned __int8)((int (*)(void))v3->m_pkPartyLootSetupWin->vfptr[65].__vecDelDtor)() )
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkPartyLootSetupWin->vfptr);
  }
  if ( v3->m_pkRollingDiceWin && (unsigned __int8)((int (*)(void))v3->m_pkRollingDiceWin->vfptr[65].__vecDelDtor)() )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkRollingDiceWin->vfptr);
  if ( v3->m_pkRollingDiceMsgWin
    && (unsigned __int8)((int (*)(void))v3->m_pkRollingDiceMsgWin->vfptr[65].__vecDelDtor)() )
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkRollingDiceMsgWin->vfptr);
  }
  v5 = v3->m_pkPartyWinInterface;
  if ( v5 )
    PartyWinInterface::Update(v5);
  return iRevBytes;
}

//----- (004B0360) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_PARTY_CHANGEMASTER_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // eax@1
  GameFrameWork *v4; // edi@1
  Name5 *v5; // eax@2
  char *v6; // eax@7
  int v7; // edx@8
  int v8; // eax@8
  int v9; // ecx@8
  int v10; // ecx@8
  _BYTE v11[20]; // ST00_20@9
  PartyWinInterface *v12; // ecx@9
  int v13; // eax@12
  int v14; // eax@13
  NiUnsharedGeometryGroup *v15; // eax@15
  char *v17; // [sp-4h] [bp-28h]@7
  char acName[21]; // [sp+8h] [bp-1Ch]@8

  v3 = *((_WORD *)pvData + 10);
  v4 = this;
  if ( (_WORD)v3 != 1352 )
  {
    v13 = v3 - 1346;
    if ( v13 )
    {
      v14 = v13 - 1;
      if ( !v14 )
      {
        v15 = TextData2::Get(0xA3D3DCCE);
        goto LABEL_16;
      }
      if ( v14 != 6 )
        return iRevBytes;
    }
    v15 = TextData2::Get(0xF914141C);
LABEL_16:
    GameFrameWork::AddSysMsg(v4, (const char *)v15);
    return iRevBytes;
  }
  v5 = User::GetMainCharID(&g_kUser);
  if ( v5->n5_code[0] != *(_DWORD *)pvData
    || v5->n5_code[1] != *((_DWORD *)pvData + 1)
    || v5->n5_code[2] != *((_DWORD *)pvData + 2)
    || v5->n5_code[3] != *((_DWORD *)pvData + 3)
    || v5->n5_code[4] != *((_DWORD *)pvData + 4) )
  {
    v7 = *((_DWORD *)pvData + 2);
    v8 = *((_DWORD *)pvData + 3);
    *(_DWORD *)acName = *(_DWORD *)pvData;
    v9 = *((_DWORD *)pvData + 1);
    *(_DWORD *)&acName[8] = v7;
    *(_DWORD *)&acName[4] = v9;
    v10 = *((_DWORD *)pvData + 4);
    v17 = acName;
    *(_DWORD *)&acName[12] = v8;
    *(_DWORD *)&acName[16] = v10;
    acName[20] = 0;
    v6 = (char *)TextData::Get(0x254E645Fu);
  }
  else
  {
    v6 = (char *)TextData::Get(0xDC092711);
  }
  GameFrameWork::VaAddSysMsg(v4, v6, v17);
  *(_DWORD *)v11 = *(_DWORD *)pvData;
  *(_QWORD *)&v11[4] = *(_QWORD *)((char *)pvData + 4);
  *(_QWORD *)&v11[12] = *(_QWORD *)((char *)pvData + 12);
  Party::ChangePartyMaster(&g_kParty, *(Name5 *)v11);
  v12 = v4->m_pkPartyWinInterface;
  if ( v12 )
    PartyWinInterface::Update(v12);
  GameFrameWork::OpenPlayGuideWin(v4, BIL_PARTY_5);
  return iRevBytes;
}

//----- (004B0490) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_PARTY_ITEM_LOOTING_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  PartyLootSetupWin *v4; // ecx@1
  NiUnsharedGeometryGroup *v5; // eax@4
  char *v6; // edx@4
  char v7; // cl@5
  NiUnsharedGeometryGroup *v8; // eax@7
  char *v9; // edx@7
  char v10; // cl@8
  NiUnsharedGeometryGroup *v11; // eax@10
  char *v12; // edx@10
  char v13; // cl@11
  NiUnsharedGeometryGroup *v14; // eax@13
  char *v15; // edx@13
  char v16; // cl@14
  NiUnsharedGeometryGroup *v17; // ST04_4@17
  NiUnsharedGeometryGroup *v18; // ST04_4@18
  NiUnsharedGeometryGroup *v19; // eax@16
  const char *v20; // eax@17
  char acstr[512]; // [sp+8h] [bp-204h]@3

  v3 = this;
  Party::SetLootType(&g_kParty, *((_BYTE *)pvData + 1), *(_BYTE *)pvData);
  v4 = v3->m_pkPartyLootSetupWin;
  if ( v4 )
  {
    PartyLootSetupWin::SetItemGrade(v4, *((_BYTE *)pvData + 1));
    PartyLootSetupWin::SetLootingType(v3->m_pkPartyLootSetupWin, *(_BYTE *)pvData);
  }
  acstr[0] = 0;
  memset(&acstr[1], 0, 0x1FFu);
  switch ( *(_BYTE *)pvData )
  {
    case 0:
      v5 = TextData2::Get(0xA17ED0D6);
      v6 = (char *)(acstr - (char *)v5);
      do
      {
        v7 = (char)v5->vfptr;
        *((_BYTE *)&v5->vfptr + (_DWORD)v6) = v5->vfptr;
        v5 = (NiUnsharedGeometryGroup *)((char *)v5 + 1);
      }
      while ( v7 );
      break;
    case 1:
      v8 = TextData2::Get(0x2E192136u);
      v9 = (char *)(acstr - (char *)v8);
      do
      {
        v10 = (char)v8->vfptr;
        *((_BYTE *)&v8->vfptr + (_DWORD)v9) = v8->vfptr;
        v8 = (NiUnsharedGeometryGroup *)((char *)v8 + 1);
      }
      while ( v10 );
      break;
    case 2:
      v11 = TextData2::Get(0x32182919u);
      v12 = (char *)(acstr - (char *)v11);
      do
      {
        v13 = (char)v11->vfptr;
        *((_BYTE *)&v11->vfptr + (_DWORD)v12) = v11->vfptr;
        v11 = (NiUnsharedGeometryGroup *)((char *)v11 + 1);
      }
      while ( v13 );
      break;
    case 3:
      v14 = TextData2::Get(0xAAE9C321);
      v15 = (char *)(acstr - (char *)v14);
      do
      {
        v16 = (char)v14->vfptr;
        *((_BYTE *)&v14->vfptr + (_DWORD)v15) = v14->vfptr;
        v14 = (NiUnsharedGeometryGroup *)((char *)v14 + 1);
      }
      while ( v16 );
      break;
    default:
      break;
  }
  switch ( *((_BYTE *)pvData + 1) )
  {
    case 0:
      v19 = TextData3::Get(0xD77667Au);
      goto LABEL_20;
    case 1:
      v17 = TextData3::Get(0xD78667Au);
      v20 = fs(acstr, v17);
      goto LABEL_21;
    case 2:
      v18 = TextData3::Get(0xD79667Au);
      v20 = fs(acstr, v18);
      goto LABEL_21;
    case 3:
      v19 = TextData3::Get(0xD7A667Au);
LABEL_20:
      v20 = fs(acstr, v19);
LABEL_21:
      GameFrameWork::AddSysMsg(v3, v20);
      break;
    default:
      return iRevBytes;
  }
  return iRevBytes;
}

//----- (004B0630) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MENU_OPENSTORAGE_FAIL_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@1

  v3 = this;
  v4 = TextData::Get(0x2E6F7494u);
  GameFrameWork::AddSysMsg(v3, (const char *)v4);
  return iRevBytes;
}

//----- (004B0660) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SKILL_SKILL_LEARNSUC_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  PassiveSkillInfo *v4; // edi@2
  int v5; // eax@3
  NiPoint3 *v6; // ecx@3
  ProductionWin *v7; // ebx@5
  int v8; // ebx@8
  int v9; // edi@8
  PassiveSkillInfo **v10; // eax@10
  float v11; // edx@13
  float v12; // eax@13
  char *v13; // eax@13
  char *v15; // [sp-18h] [bp-38h]@3
  NiPoint3 v16; // [sp-14h] [bp-34h]@3
  _BYTE v17[12]; // [sp-8h] [bp-28h]@3
  float fTime; // [sp+4h] [bp-1Ch]@3
  float fScale; // [sp+8h] [bp-18h]@3
  SoundIndex rkIndex; // [sp+18h] [bp-8h]@16

  v3 = this;
  if ( *((_BYTE *)pvData + 2) )
  {
    Skill::LearnPassiveSkill(*(_WORD *)pvData);
    v4 = PasSkillInfoTab::GetByID(*(_WORD *)pvData);
    if ( !v4 )
      goto LABEL_14;
    v5 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
    fScale = 1.0;
    fTime = Timer::ms_fCurTime;
    *(NiPoint3 *)v17 = NiPoint3::UNIT_Y;
    v6 = &v16;
    v15 = "SkillLevelUp";
    goto LABEL_13;
  }
  Skill::LearnSkill(*(_WORD *)pvData, 0, 0);
  if ( (unsigned __int8)Skill::IsProduceSkill(*(_WORD *)pvData) )
  {
    v7 = ProductTask::ms_pkProductionWin;
    if ( ProductTask::ms_pkProductionWin )
    {
      if ( PgWin::IsVisible((PgWin *)&ProductTask::ms_pkProductionWin->vfptr) )
        ProductionWin::RefreshProductSkillList(v7);
    }
  }
  v8 = *(_WORD *)pvData;
  v9 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                          v8) )
  {
    if ( (unsigned __int16)v8 <= *(_WORD *)(v9 + 200) )
    {
      v10 = (PassiveSkillInfo **)(*(_DWORD *)(v9 + 196) + 4 * v8);
      if ( *v10 )
      {
        v4 = *v10;
        if ( *v10 )
        {
          v5 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
          fScale = 1.0;
          fTime = Timer::ms_fCurTime;
          *(NiPoint3 *)v17 = NiPoint3::UNIT_Y;
          v6 = &v16;
          v15 = "SkillLevelUp";
LABEL_13:
          v6->x = *(float *)v5;
          v11 = *(float *)(v5 + 4);
          v12 = *(float *)(v5 + 8);
          v6->y = v11;
          v6->z = v12;
          EffectMgr::CreateEffect(&g_kEffectMgr, v15, v16, *(NiPoint3 *)v17, fTime, fScale);
          LODWORD(fScale) = (char *)v4 + 34;
          v13 = (char *)TextData::Get(0xE3FC2944);
          GameFrameWork::VaAddSysMsg(v3, v13, fScale);
          SkillWin::ResetContents(v3->m_pkSkillWin);
          goto LABEL_14;
        }
      }
    }
  }
LABEL_14:
  if ( !(`TutorialMgr::GetTutorialMgr'::`2'::`local static guard' & 1) )
  {
    `TutorialMgr::GetTutorialMgr'::`2'::`local static guard' |= 1u;
    TutorialMgr::TutorialMgr(&`TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr);
    atexit(`TutorialMgr::GetTutorialMgr'::`2'::`dynamic atexit destructor for 'kTutorialMgr'');
  }
  TutorialMgr::On_NC_SKILL_SKILL_LEARNSUC_CMD(&`TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr);
  rkIndex.m_dwIndex = 15;
  rkIndex.m_acFilename = 0;
  SoundGroupStatic::PlaySoundA((SoundGroupStatic *)&g_kSoundMgr.m_pkInterfaceGroup->vfptr, &rkIndex, 0, 0);
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8C638: using guessed type int `TutorialMgr::GetTutorialMgr'::`2'::`local static guard';
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (004B0850) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SKILL_SKILL_LEARNFAIL_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@1

  v3 = this;
  v4 = TextData::Get(0x88A7C1D9);
  GameFrameWork::AddSysMsg(v3, (const char *)v4);
  return iRevBytes;
}

//----- (004B0880) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SKILL_UNLEARN_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  __int16 v3; // ax@1
  GameFrameWork *v4; // ebx@1
  int v5; // edi@2
  int v6; // esi@2
  int *v7; // eax@4
  int v8; // esi@5
  char *v9; // eax@7
  const char *v10; // eax@7
  int result; // eax@9
  char *v12; // eax@10
  ProductionWin *v13; // esi@10
  PassiveSkillInfo *v14; // eax@15
  int v15; // ST0C_4@16
  char *v16; // eax@16
  const char *v17; // eax@16
  const char *v18; // eax@18

  v3 = *((_WORD *)pvData + 1);
  v4 = this;
  if ( v3 == 5377 )
  {
    v5 = *(_WORD *)pvData;
    v6 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                          + 16))(
                            ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                            v5) )
    {
      if ( (unsigned __int16)v5 <= *(_WORD *)(v6 + 200) )
      {
        v7 = (int *)(*(_DWORD *)(v6 + 196) + 4 * v5);
        if ( *v7 )
        {
          v8 = *v7;
          if ( *v7 )
          {
            if ( !strcmp((const char *)(v8 + 2), "SummonMate01") )
            {
              Skill::UnLearnActiveSkill(*(_WORD *)pvData);
              v9 = (char *)TextData::Get(0x86AE677D);
              v10 = fs(v9, v8 + 34);
              GameFrameWork::AddSysMsg(v4, v10);
            }
            else
            {
              v12 = (char *)TextData::Get(0x7DA3CAF4u);
              MsgBox::Modeless(MSGBOX_OK, v12);
              v13 = ProductTask::ms_pkProductionWin;
              if ( ProductTask::ms_pkProductionWin )
              {
                if ( PgWin::IsVisible((PgWin *)&ProductTask::ms_pkProductionWin->vfptr) )
                  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v13->vfptr);
              }
              SkillWin::CloseProduceSkillSelectWin(v4->m_pkSkillWin);
              Skill::UnLearnSkill(*(_WORD *)pvData);
            }
            SkillWin::ResetContents(v4->m_pkSkillWin);
          }
        }
      }
    }
    result = iRevBytes;
  }
  else if ( v3 == 5381 )
  {
    v14 = PasSkillInfoTab::GetByID(*(_WORD *)pvData);
    if ( v14 )
    {
      v15 = (int)v14->Name;
      v16 = (char *)TextData::Get(0x86AE677D);
      v17 = fs(v16, v15);
      GameFrameWork::AddSysMsg(v4, v17);
    }
    Skill::UnLearnPassiveSkill(*(_WORD *)pvData);
    SkillWin::ResetContents(v4->m_pkSkillWin);
    result = iRevBytes;
  }
  else
  {
    v18 = ErrMsgTable::GetErrMsg(*((_WORD *)pvData + 1));
    GameFrameWork::AddSysMsg(v4, v18);
    result = iRevBytes;
  }
  return result;
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (004B0A20) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SKILL_EMPOW_RESET_SUC_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@1

  v3 = this;
  Skill::SetEmpowerResetable(0);
  Skill::ClearLearnActSkillInfo();
  Skill::SetRestEmpowerPoint(*(_BYTE *)pvData);
  SkillIcon::RefreshSkillInfoAll();
  v4 = TextData::Get(0x939C8493);
  GameFrameWork::AddSysMsg(v3, (const char *)v4);
  return iRevBytes;
}

//----- (004B0A60) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SKILL_EMPOWALLOC_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@2
  int result; // eax@2
  int v6; // ST08_4@3
  NiUnsharedGeometryGroup *v7; // eax@3
  const char *v8; // eax@3

  v3 = this;
  if ( *((_WORD *)pvData + 1) == 2177 )
  {
    SkillEmpowerRequest::Applicate(*(_WORD *)pvData);
    SkillIcon::RefreshSkillInfoAll();
    v4 = TextData::Get(0xC9403836);
    GameFrameWork::AddSysMsg(v3, (const char *)v4);
    SkillWin::SetSkillPowerSuccess(v3->m_pkSkillWin, 1);
    result = iRevBytes;
  }
  else
  {
    SkillEmpowerRequest::Cancel(*(_WORD *)pvData);
    v6 = *((_WORD *)pvData + 1);
    v7 = TextData::Get(0xE404CCC6);
    v8 = fs("%s errcode:%d", v7, v6);
    GameFrameWork::AddSysMsg(v3, v8);
    result = iRevBytes;
  }
  return result;
}

//----- (004B0AF0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SKILL_EMPOW_RESET_FAIL_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@1

  v3 = this;
  v4 = TextData::Get(0x3448756Bu);
  GameFrameWork::AddSysMsg(v3, (const char *)v4);
  return iRevBytes;
}

//----- (004B0B20) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SKILL_EMPOWPOINT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  unsigned int v4; // eax@1
  int v5; // ecx@1
  int v6; // ST08_4@2
  char *v7; // eax@2

  v3 = this;
  v4 = Skill::GetRestEmpowerPoint();
  v5 = *(_BYTE *)pvData;
  if ( v5 > v4 )
  {
    v6 = v5 - v4;
    v7 = (char *)TextData::Get(0xD1EB2A3F);
    GameFrameWork::VaAddSysMsg(v3, v7, v6);
  }
  Skill::SetRestEmpowerPoint(*(_BYTE *)pvData);
  return iRevBytes;
}

//----- (004B0B70) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SKILL_PRODUCTFIELD_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  __int16 v3; // ax@1
  GameFrameWork *v4; // esi@1
  char *v5; // eax@3

  v3 = *((_WORD *)pvData + 1);
  v4 = this;
  if ( v3 != 2817 && v3 == 2820 )
  {
    v5 = (char *)TextData::Get(0x4969746Bu);
    GameFrameWork::VaAddSysMsg(v4, v5);
  }
  return iRevBytes;
}

//----- (004B0BB0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_TRADE_PROPOSE_ASK_REQ(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  MHDiceGameTask *v4; // ecx@3
  bool v5; // bl@3
  MHDiceGameTask *v6; // esi@4
  char *v7; // eax@9
  MsgBox *v8; // eax@9
  MsgBox *v9; // esi@9
  MsgBox *v10; // ebx@9
  MsgBox *v11; // ecx@16
  MHDiceGameTask *v12; // eax@16
  NiPointer<MHDiceGameTask> result; // [sp+24h] [bp-3Ch]@3
  PgMsg::Frame kOkMsg; // [sp+28h] [bp-38h]@16
  PgMsg::Frame kCancelMsg; // [sp+3Ch] [bp-24h]@16
  int v17; // [sp+5Ch] [bp-4h]@3

  v3 = this;
  if ( byte_B4FF71 )
  {
    PgFrameWork::AddMsg((PgFrameWork *)&this->vfptr, 0x74u, 0, 0);
  }
  else
  {
    v4 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
    v17 = 0;
    v5 = MHDiceGameTask::IsDicegamePlaying(v4);
    v17 = -1;
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    if ( v5 )
    {
      PgFrameWork::AddMsg((PgFrameWork *)&v3->vfptr, 0x74u, 0, 0);
    }
    else
    {
      v7 = (char *)TextData::Get(0x6B9BE5DEu);
      v8 = MsgBox::Modeless(MSGBOX_OKCANCEL, v7);
      v9 = v3->m_spUserTradeMsgBox.m_pObject;
      v10 = v8;
      if ( v9 != v8 )
      {
        if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
          v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
        v3->m_spUserTradeMsgBox.m_pObject = v10;
        if ( v10 )
          InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
      }
      v11 = v3->m_spUserTradeMsgBox.m_pObject;
      kOkMsg.m_uiFrameMsg = 115;
      kCancelMsg.m_uiFrameMsg = 116;
      MsgBox::SetFrameWorkMsgOnClose(v11, (PgFrameWork *)&v3->vfptr, &kOkMsg, &kCancelMsg);
      v12 = (MHDiceGameTask *)operator new(0x10u);
      result.m_pObject = v12;
      v17 = 1;
      if ( v12 )
        FrameWorkTimer::FrameWorkTimer((FrameWorkTimer *)v12, 15.0, 0x84u, (PgFrameWork *)&v3->vfptr);
    }
  }
  return iRevBytes;
}
// B4FF71: using guessed type char byte_B4FF71;

//----- (004B0D20) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_TRADE_PROPOSENO_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  MsgBox *v4; // eax@1
  MsgBox *v5; // esi@2
  NiUnsharedGeometryGroup *v6; // eax@7

  v3 = this;
  v4 = this->m_spUserTradeMsgBox.m_pObject;
  if ( v4 )
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v4->vfptr);
    v5 = v3->m_spUserTradeMsgBox.m_pObject;
    if ( v5 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      v3->m_spUserTradeMsgBox.m_pObject = 0;
    }
  }
  v6 = TextData::Get(0x89E1C8CB);
  GameFrameWork::AddSysMsg(v3, (const char *)v6);
  return iRevBytes;
}

//----- (004B0D90) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_TRADE_PROPOSE_CANCELED_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  MsgBox *v4; // eax@1
  MsgBox *v5; // esi@2
  NiUnsharedGeometryGroup *v6; // eax@7

  v3 = this;
  v4 = this->m_spUserTradeMsgBox.m_pObject;
  if ( v4 )
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v4->vfptr);
    v5 = v3->m_spUserTradeMsgBox.m_pObject;
    if ( v5 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      v3->m_spUserTradeMsgBox.m_pObject = 0;
    }
  }
  v6 = TextData::Get(0xE8320D1D);
  GameFrameWork::AddSysMsg(v3, (const char *)v6);
  return iRevBytes;
}

//----- (004B0E00) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_TRADE_START_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  MsgBox *v4; // edi@2
  Name5 *v5; // eax@7
  unsigned __int16 v6; // cx@7
  Char *v7; // eax@7
  char *v8; // edi@8
  char acName[21]; // [sp+Ch] [bp-1Ch]@7

  v3 = this;
  if ( this->m_spUserTradeMsgBox.m_pObject )
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_spUserTradeMsgBox.m_pObject->vfptr);
    v4 = v3->m_spUserTradeMsgBox.m_pObject;
    if ( v4 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      v3->m_spUserTradeMsgBox.m_pObject = 0;
    }
  }
  GameFrameWork::CleanUpTrade(v3);
  v5 = User::GetMainCharID(&g_kUser);
  *(_DWORD *)acName = v5->n5_code[0];
  *(_DWORD *)&acName[4] = v5->n5_code[1];
  *(_DWORD *)&acName[8] = v5->n5_code[2];
  v6 = *(_WORD *)pvData;
  *(_DWORD *)&acName[12] = v5->n5_code[3];
  *(_DWORD *)&acName[16] = v5->n5_code[4];
  acName[20] = 0;
  v7 = GameFrameWork::GetCharByHandle(v3, v6, 19, 9);
  if ( v7 )
    v8 = (char *)((int (__thiscall *)(Char *))v7->vfptr[2].DeleteAbStateByAbstateIndex)(v7);
  else
    v8 = "unknown";
  UserTradeWin::SetMyName(v3->m_pkUserTradeWin, acName);
  UserTradeWin::SetOtherName(v3->m_pkUserTradeWin, v8);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkUserTradeWin->vfptr);
  UserTrade::SetTrading(1);
  GameFrameWork::OpenInventoryWin(v3);
  return iRevBytes;
}

//----- (004B0F10) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_TRADE_CANCEL_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@1

  v3 = this;
  v4 = TextData::Get(0x2B272E7Au);
  GameFrameWork::AddSysMsg(v3, (const char *)v4);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkUserTradeWin->vfptr);
  GameFrameWork::CleanUpTrade(v3);
  return iRevBytes;
}

//----- (004B0F50) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_TRADE_CANCEL_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@1

  v3 = this;
  v4 = TextData::Get(0x7CDFCCBFu);
  GameFrameWork::AddSysMsg(v3, (const char *)v4);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkUserTradeWin->vfptr);
  GameFrameWork::CleanUpTrade(v3);
  return iRevBytes;
}

//----- (004B0F90) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_TRADE_UPBOARDFAIL_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@1

  v3 = this;
  v4 = TextData::Get(0x4AB3818Eu);
  GameFrameWork::AddSysMsg(v3, (const char *)v4);
  return iRevBytes;
}

//----- (004B0FC0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_TRADE_UPBOARD_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  unsigned int v3; // eax@1
  GameFrameWork *v4; // edi@1
  Item *v5; // ecx@2
  unsigned int v6; // eax@3
  InvWin *v7; // eax@4

  v3 = *(_BYTE *)pvData;
  v4 = this;
  if ( v3 < 0xC0 )
  {
    v5 = g_kInventory.m_aspInv[v3].m_pObject;
    if ( v5 )
    {
      UserTrade::AddMy(v5, *((_BYTE *)pvData + 1), *(_BYTE *)pvData);
      v6 = *(_BYTE *)pvData;
      if ( v6 < 0xC0 )
      {
        v7 = v4->m_pkInventoryWin->m_apkInvWin[v6];
        if ( v7 )
        {
          InvWin::SetLock(v7, 1);
          GameFrameWork::OnReflashShortCutWin(v4);
        }
      }
    }
  }
  return iRevBytes;
}

//----- (004B1030) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_TRADE_DOWNBOARDFAIL_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@1

  v3 = this;
  v4 = TextData::Get(0x94B284D5);
  GameFrameWork::AddSysMsg(v3, (const char *)v4);
  return iRevBytes;
}

//----- (004B1060) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_TRADE_CENBOARDINGFAIL_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@1

  v3 = this;
  v4 = TextData::Get(0x990FD9DC);
  GameFrameWork::AddSysMsg(v3, (const char *)v4);
  return iRevBytes;
}

//----- (004B1090) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_TRADE_BOARDLOCKFAIL_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@1

  v3 = this;
  v4 = TextData::Get(0x949676D1);
  GameFrameWork::AddSysMsg(v3, (const char *)v4);
  return iRevBytes;
}

//----- (004B10C0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_TRADE_DECIDEFAIL_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@1

  v3 = this;
  v4 = TextData::Get(0x88E8C7C1);
  GameFrameWork::AddSysMsg(v3, (const char *)v4);
  return iRevBytes;
}

//----- (004B10F0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_TRADE_TRADECOMPLETE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@1

  v3 = this;
  v4 = TextData::Get(0x32353C81u);
  GameFrameWork::AddSysMsg(v3, (const char *)v4);
  GameFrameWork::CleanUpTrade(v3);
  return iRevBytes;
}

//----- (004B1120) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_TRADE_TRADEFAIL_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@1

  v3 = this;
  v4 = TextData::Get(0x3E4E223Bu);
  GameFrameWork::AddSysMsg(v3, (const char *)v4);
  GameFrameWork::CleanUpTrade(v3);
  return iRevBytes;
}

//----- (004B1150) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SOULSTONE_BUYFAIL_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@1

  v3 = this;
  v4 = TextData::Get(0xD2FCD5E1);
  GameFrameWork::AddSysMsg(v3, (const char *)v4);
  return iRevBytes;
}

//----- (004B1180) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SOULSTONE_HP_USESUC_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  int v4; // eax@1
  ShortCutWin **v5; // edi@3
  signed int v6; // ebx@3
  ShortCutWin **v7; // edi@5
  signed int v8; // ebx@5
  Tutorial *v9; // eax@7
  Tutorial *v10; // eax@8
  unsigned int dwDummy; // [sp+1Ch] [bp-10h]@3
  int v13; // [sp+28h] [bp-4h]@8

  v3 = this;
  v4 = User::HPStone(&g_kUser) - 1;
  if ( v4 >= 0 )
    User::SetHPStone(&g_kUser, v4);
  SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_SoulStone);
  StatusWin::HPSoulStoneCoolTimeStart(v3->m_pkStatusWin);
  EffectMgr::CreateAttachEffect(
    &g_kEffectMgr,
    &dwDummy,
    "HPSoulStone",
    g_pkMainChar->m_spScene.m_pObject,
    Timer::ms_fCurTime,
    0);
  ShortCutWin::StartHpStonCoolTime(v3->m_pkShortCutWin);
  v5 = v3->m_pkShortCutSubWin;
  v6 = 4;
  do
  {
    ShortCutWin::StartHpStonCoolTime(*v5);
    ++v5;
    --v6;
  }
  while ( v6 );
  ShortCutWin::StartHpStonCoolTime(v3->m_pkShortCutWinV);
  v7 = v3->m_pkShortCutSubWinV;
  v8 = 4;
  do
  {
    ShortCutWin::StartHpStonCoolTime(*v7);
    ++v7;
    --v8;
  }
  while ( v8 );
  ActionWin::StartHpStonCoolTime(v3->m_pkActionWin);
  v9 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v10 = (Tutorial *)operator new(0xB4u);
    v13 = 0;
    if ( v10 )
      Tutorial::Tutorial(v10);
    else
      v9 = 0;
    Singleton<Tutorial>::m_pInstance = v9;
  }
  v9->m_bUseStone = 1;
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004B12B0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SOULSTONE_SP_USESUC_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  int v4; // eax@1
  ShortCutWin **v5; // esi@3
  signed int v6; // ebx@3
  ShortCutWin **v7; // esi@5
  signed int v8; // ebx@5
  unsigned int dwDummy; // [sp+14h] [bp-4h]@3

  v3 = this;
  v4 = User::SPStone(&g_kUser) - 1;
  if ( v4 >= 0 )
    User::SetSPStone(&g_kUser, v4);
  SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_SoulStone);
  StatusWin::SPSoulStoneCoolTimeStart(v3->m_pkStatusWin);
  EffectMgr::CreateAttachEffect(
    &g_kEffectMgr,
    &dwDummy,
    "SPSoulStone",
    g_pkMainChar->m_spScene.m_pObject,
    Timer::ms_fCurTime,
    0);
  ShortCutWin::StartSpStonCoolTime(v3->m_pkShortCutWin);
  v5 = v3->m_pkShortCutSubWin;
  v6 = 4;
  do
  {
    ShortCutWin::StartSpStonCoolTime(*v5);
    ++v5;
    --v6;
  }
  while ( v6 );
  ShortCutWin::StartSpStonCoolTime(v3->m_pkShortCutWinV);
  v7 = v3->m_pkShortCutSubWinV;
  v8 = 4;
  do
  {
    ShortCutWin::StartSpStonCoolTime(*v7);
    ++v7;
    --v8;
  }
  while ( v8 );
  ActionWin::StartSpStonCoolTime(v3->m_pkActionWin);
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004B1380) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SOULSTONE_USEFAIL_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@1

  v3 = this;
  v4 = TextData::Get(0xE5FCC1DF);
  GameFrameWork::AddSysMsg(v3, (const char *)v4);
  return iRevBytes;
}

//----- (004B13B0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_SOULSTONE_HP_SOMEONEUSE_CMD(int iRevBytes, void *pvData)
{
  Char *v3; // eax@1

  v3 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  if ( v3 )
    EffectMgr::CreateAttachEffect(
      &g_kEffectMgr,
      (unsigned int *)&pvData,
      "HPSoulStone",
      v3->m_spScene.m_pObject,
      Timer::ms_fCurTime,
      0);
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004B1400) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_SOULSTONE_SP_SOMEONEUSE_CMD(int iRevBytes, void *pvData)
{
  Char *v3; // eax@1

  v3 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  if ( v3 )
    EffectMgr::CreateAttachEffect(
      &g_kEffectMgr,
      (unsigned int *)&pvData,
      "SPSoulStone",
      v3->m_spScene.m_pObject,
      Timer::ms_fCurTime,
      0);
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004B1450) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_FRIEND_SET_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  Name5 *v4; // eax@1
  int v5; // edx@6
  int v6; // eax@6
  char *v7; // eax@7
  char *v9; // [sp-4h] [bp-24h]@7
  char acName[21]; // [sp+4h] [bp-1Ch]@6

  v3 = this;
  v4 = User::GetMainCharID(&g_kUser);
  if ( *(_DWORD *)pvData == v4->n5_code[0]
    && *((_DWORD *)pvData + 1) == v4->n5_code[1]
    && *((_DWORD *)pvData + 2) == v4->n5_code[2]
    && *((_DWORD *)pvData + 3) == v4->n5_code[3]
    && *((_DWORD *)pvData + 4) == v4->n5_code[4] )
  {
    v5 = *((_DWORD *)pvData + 6);
    *(_DWORD *)acName = *((_DWORD *)pvData + 5);
    *(_DWORD *)&acName[8] = *((_DWORD *)pvData + 7);
    *(_DWORD *)&acName[16] = *((_DWORD *)pvData + 9);
    v6 = *((_WORD *)pvData + 20);
    *(_DWORD *)&acName[4] = v5;
    *(_DWORD *)&acName[12] = *((_DWORD *)pvData + 8);
    acName[20] = 0;
    switch ( v6 )
    {
      case 2370:
        v9 = acName;
        v7 = (char *)TextData::Get(0x67D7C9C6u);
        goto LABEL_18;
      case 2371:
        v9 = acName;
        v7 = (char *)TextData::Get(0xDCE7181D);
        goto LABEL_18;
      case 2373:
        v9 = acName;
        v7 = (char *)TextData::Get(0x6D7D63B6u);
        goto LABEL_18;
      case 2374:
        v9 = acName;
        v7 = (char *)TextData::Get(0x789E827Fu);
        goto LABEL_18;
      case 2375:
        v9 = acName;
        v7 = (char *)TextData::Get(0x3193516Au);
        goto LABEL_18;
      case 2376:
        v9 = acName;
        v7 = (char *)TextData::Get(0x62A2B6B6u);
        goto LABEL_18;
      case 2377:
        GameFrameWork::VaAddSysMsg(v3, "DB Error", acName);
        return iRevBytes;
      case 2380:
        v7 = (char *)TextData2::Get(0xD9103335);
        goto LABEL_18;
      case 2381:
        v7 = (char *)TextData2::Get(0x2164D4D9u);
        goto LABEL_18;
      case 2382:
        v7 = (char *)TextData2::Get(0x98CAEA27);
        goto LABEL_18;
      default:
        v7 = (char *)TextData::Get(0x70F1D7EEu);
LABEL_18:
        GameFrameWork::VaAddSysMsg(v3, v7, v9);
        break;
      case 2369:
      case 2378:
      case 2379:
        return iRevBytes;
    }
  }
  return iRevBytes;
}

//----- (004B15F0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_FRIEND_SET_CONFIRM_REQ(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  _BYTE v4[20]; // ST00_20@2
  int v5; // ecx@3
  int v6; // edx@3
  int v7; // ecx@3
  int v8; // edx@3
  NiUnsharedGeometryGroup *v9; // eax@3
  _DWORD *v10; // eax@3
  MsgBox *pkMsgBox; // [sp+Ch] [bp-148h]@3
  PgMsg::Frame kCancelMsg; // [sp+10h] [bp-144h]@6
  PgMsg::Frame kOkMsg; // [sp+24h] [bp-130h]@6
  char szMessage[256]; // [sp+38h] [bp-11Ch]@3
  char acName[21]; // [sp+138h] [bp-1Ch]@3

  v3 = this;
  if ( this->m_pkFriendWin->m_bAllow )
  {
    v5 = *((_DWORD *)pvData + 5);
    v6 = *((_DWORD *)pvData + 6);
    *(_DWORD *)&acName[8] = *((_DWORD *)pvData + 7);
    *(_DWORD *)acName = v5;
    v7 = *((_DWORD *)pvData + 8);
    *(_DWORD *)&acName[4] = v6;
    v8 = *((_DWORD *)pvData + 9);
    *(_DWORD *)&acName[12] = v7;
    *(_DWORD *)&acName[16] = v8;
    acName[20] = 0;
    v9 = TextData::Get(0xD2302531);
    sprintf(szMessage, (const char *)v9, acName);
    pkMsgBox = MsgBox::Modeless(MSGBOX_OKCANCEL, szMessage);
    v10 = operator new(0x14u);
    if ( v10 )
    {
      v10[4] = 0;
      v10[3] = 0;
      v10[2] = 0;
      v10[1] = 0;
      *v10 = 0;
    }
    else
    {
      v10 = 0;
    }
    *v10 = *((_DWORD *)pvData + 5);
    v10[1] = *((_DWORD *)pvData + 6);
    v10[2] = *((_DWORD *)pvData + 7);
    v10[3] = *((_DWORD *)pvData + 8);
    v10[4] = *((_DWORD *)pvData + 9);
    kOkMsg.m_uiFramelParam = (unsigned int)v10;
    kCancelMsg.m_uiFramelParam = (unsigned int)v10;
    kOkMsg.m_uiFrameMsg = 118;
    kCancelMsg.m_uiFrameMsg = 119;
    MsgBox::SetFrameWorkMsgOnClose(pkMsgBox, (PgFrameWork *)&v3->vfptr, &kOkMsg, &kCancelMsg);
  }
  else
  {
    *(_DWORD *)v4 = *((_DWORD *)pvData + 5);
    *(_QWORD *)&v4[4] = *((_QWORD *)pvData + 3);
    *(_QWORD *)&v4[12] = *((_QWORD *)pvData + 4);
    GameFrameWork::NcFriendSetConfirmAck(this, *(Name5 *)v4, 0);
  }
  return iRevBytes;
}

//----- (004B1730) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_FRIEND_DEL_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // edx@1
  int v4; // eax@1
  GameFrameWork *v5; // edi@1
  int v6; // ecx@1
  _BYTE v7[20]; // ST00_20@2
  _BYTE v8[20]; // ST00_20@2
  char *v9; // eax@2
  char *v11; // [sp-4h] [bp-28h]@2
  char acName[21]; // [sp+8h] [bp-1Ch]@1

  v3 = *((_DWORD *)pvData + 7);
  *(_DWORD *)acName = *((_DWORD *)pvData + 5);
  *(_DWORD *)&acName[12] = *((_DWORD *)pvData + 8);
  v4 = *((_WORD *)pvData + 20);
  v5 = this;
  *(_DWORD *)&acName[4] = *((_DWORD *)pvData + 6);
  v6 = *((_DWORD *)pvData + 9);
  *(_DWORD *)&acName[8] = v3;
  *(_DWORD *)&acName[16] = v6;
  acName[20] = 0;
  switch ( v4 )
  {
    case 2385:
      *(_DWORD *)v7 = *((_DWORD *)pvData + 5);
      *(_QWORD *)&v7[4] = *((_QWORD *)pvData + 3);
      *(_QWORD *)&v7[12] = *((_QWORD *)pvData + 4);
      FriendWin::DelFriend(v5->m_pkFriendWin, *(Name5 *)v7);
      *(_DWORD *)v8 = *((_DWORD *)pvData + 5);
      *(_QWORD *)&v8[4] = *((_QWORD *)pvData + 3);
      *(_QWORD *)&v8[12] = *((_QWORD *)pvData + 4);
      FriendCallWin::DelFriend(v5->m_pkFriendCallWin, *(Name5 *)v8);
      v11 = acName;
      v9 = (char *)TextData::Get(0x7D93A5B4u);
      goto LABEL_6;
    case 2386:
      GameFrameWork::VaAddSysMsg(v5, " DB Error", acName);
      return iRevBytes;
    case 2387:
      v11 = acName;
      v9 = (char *)TextData::Get(0x789E827Fu);
      goto LABEL_6;
    case 2388:
      return iRevBytes;
    default:
      v9 = (char *)TextData::Get(0x8A91E3C9);
LABEL_6:
      GameFrameWork::VaAddSysMsg(v5, v9, v11);
      break;
  }
  return iRevBytes;
}

//----- (004B1850) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_FRIEND_LOGIN_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  _BYTE v4[20]; // ST00_20@1
  _BYTE v5[20]; // ST00_20@1
  int v6; // eax@1
  int v7; // ecx@1
  int v8; // eax@1
  int v9; // ecx@1
  char *v10; // eax@1
  PgNet *v11; // ecx@1
  __int16 pdata; // [sp+8h] [bp-20h]@1
  char acName[21]; // [sp+Ch] [bp-1Ch]@1

  v3 = this;
  *(_DWORD *)v4 = *(_DWORD *)pvData;
  *(_QWORD *)&v4[4] = *(_QWORD *)((char *)pvData + 4);
  *(_QWORD *)&v4[12] = *(_QWORD *)((char *)pvData + 12);
  FriendWin::LoginFriend(this->m_pkFriendWin, *(Name5 *)v4);
  *(_DWORD *)v5 = *(_DWORD *)pvData;
  *(_QWORD *)&v5[4] = *(_QWORD *)((char *)pvData + 4);
  *(_QWORD *)&v5[12] = *(_QWORD *)((char *)pvData + 12);
  FriendCallWin::LoginFriend(v3->m_pkFriendCallWin, *(Name5 *)v5);
  v6 = *(_DWORD *)pvData;
  v7 = *((_DWORD *)pvData + 1);
  *(_DWORD *)&acName[8] = *((_DWORD *)pvData + 2);
  *(_DWORD *)acName = v6;
  v8 = *((_DWORD *)pvData + 3);
  *(_DWORD *)&acName[4] = v7;
  v9 = *((_DWORD *)pvData + 4);
  *(_DWORD *)&acName[12] = v8;
  *(_DWORD *)&acName[16] = v9;
  acName[20] = 0;
  v10 = (char *)TextData::Get(0x3C4C2240u);
  GameFrameWork::VaAddSysMsg(v3, v10, acName);
  SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_UPGOOD);
  v11 = (PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr;
  pdata = 21533;
  PgNet::AddNetMsg(v11, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, 0, 0);
  return iRevBytes;
}

//----- (004B1950) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_FRIEND_REFUSE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // edx@1
  GameFrameWork *v4; // esi@1
  int v5; // eax@1
  char *v6; // eax@1
  char acName[21]; // [sp+4h] [bp-1Ch]@1

  v3 = *((_DWORD *)pvData + 1);
  v4 = this;
  *(_DWORD *)acName = *(_DWORD *)pvData;
  *(_DWORD *)&acName[8] = *((_DWORD *)pvData + 2);
  *(_DWORD *)&acName[4] = v3;
  v5 = *((_DWORD *)pvData + 4);
  *(_DWORD *)&acName[12] = *((_DWORD *)pvData + 3);
  *(_DWORD *)&acName[16] = v5;
  acName[20] = 0;
  v6 = (char *)TextData::Get(0x1E211B32u);
  GameFrameWork::VaAddSysMsg(v4, v6, acName);
  return iRevBytes;
}

//----- (004B19C0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_FRIEND_DEL_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // eax@1
  GameFrameWork *v4; // edi@1
  int v5; // ecx@1
  int v6; // eax@1
  int v7; // ecx@1
  char *v8; // eax@1
  Name5 *v9; // eax@1
  _BYTE v10[20]; // ST00_20@6
  _BYTE v11[20]; // ST00_20@6
  char acName[21]; // [sp+8h] [bp-1Ch]@1

  v3 = *(_DWORD *)pvData;
  v4 = this;
  v5 = *((_DWORD *)pvData + 1);
  *(_DWORD *)&acName[8] = *((_DWORD *)pvData + 2);
  *(_DWORD *)acName = v3;
  v6 = *((_DWORD *)pvData + 3);
  *(_DWORD *)&acName[4] = v5;
  v7 = *((_DWORD *)pvData + 4);
  *(_DWORD *)&acName[12] = v6;
  *(_DWORD *)&acName[16] = v7;
  acName[20] = 0;
  v8 = (char *)TextData::Get(0x7F957CB5u);
  GameFrameWork::VaAddSysMsg(v4, v8, acName);
  v9 = User::GetMainCharID(&g_kUser);
  if ( *(_DWORD *)pvData != v9->n5_code[0]
    || *((_DWORD *)pvData + 1) != v9->n5_code[1]
    || *((_DWORD *)pvData + 2) != v9->n5_code[2]
    || *((_DWORD *)pvData + 3) != v9->n5_code[3]
    || *((_DWORD *)pvData + 4) != v9->n5_code[4] )
  {
    *(_DWORD *)v10 = *(_DWORD *)pvData;
    *(_QWORD *)&v10[4] = *(_QWORD *)((char *)pvData + 4);
    *(_QWORD *)&v10[12] = *(_QWORD *)((char *)pvData + 12);
    FriendWin::DelFriend(v4->m_pkFriendWin, *(Name5 *)v10);
    *(_DWORD *)v11 = *(_DWORD *)pvData;
    *(_QWORD *)&v11[4] = *(_QWORD *)((char *)pvData + 4);
    *(_QWORD *)&v11[12] = *(_QWORD *)((char *)pvData + 12);
    FriendCallWin::DelFriend(v4->m_pkFriendCallWin, *(Name5 *)v11);
  }
  return iRevBytes;
}

//----- (004B1AB0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_FRIEND_FIND_FRIENDS_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // edi@1
  GameFrameWork *v4; // ebx@1
  int v5; // eax@1
  int v6; // eax@2
  NiUnsharedGeometryGroup *v7; // eax@4
  NiUnsharedGeometryGroup *v9; // eax@5
  FriendWin *v10; // ecx@6
  int v11; // esi@7
  PROTO_FRIEND_INFO *v12; // edi@8
  int nFriendCnt; // [sp+8h] [bp-4h]@1
  PROTO_FRIEND_INFO *pkFriendInfo; // [sp+18h] [bp+Ch]@1

  v3 = *((_WORD *)pvData + 1);
  v4 = this;
  v5 = *(_WORD *)pvData - 14016;
  nFriendCnt = *((_WORD *)pvData + 1);
  pkFriendInfo = (PROTO_FRIEND_INFO *)((char *)pvData + 4);
  if ( v5 )
  {
    v6 = v5 - 1;
    if ( !v6 )
    {
      v9 = TextData3::Get(0x7543564u);
      GameFrameWork::AddSysMsg(v4, (const char *)v9);
      return iRevBytes;
    }
    if ( v6 == 4 )
    {
      v7 = TextData::Get(0x533C1A49u);
      GameFrameWork::AddSysMsg(v4, (const char *)v7);
      return iRevBytes;
    }
  }
  else
  {
    v10 = this->m_pkFriendWin;
    if ( v10 )
    {
      FriendWin::FriendFindClear(v10);
      FriendWin::ShowFindList(v4->m_pkFriendWin);
      v11 = 0;
      if ( v3 > 0 )
      {
        v12 = pkFriendInfo;
        do
        {
          FriendWin::AddFindFriend(v4->m_pkFriendWin, v12, v11++);
          ++v12;
        }
        while ( v11 < nFriendCnt );
      }
    }
  }
  return iRevBytes;
}

//----- (004B1B70) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_FRIEND_UES_FRIEND_POINT_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  FriendWin *v4; // ecx@2
  int v5; // ebx@2
  char *v6; // ST08_4@3
  char *v7; // eax@3
  NiUnsharedGeometryGroup *v9; // eax@4

  v3 = this;
  switch ( *(_WORD *)pvData )
  {
    case 0x36C0:
      v4 = this->m_pkFriendWin;
      v5 = *((_BYTE *)pvData + 6);
      if ( !v4 )
        return iRevBytes;
      FriendWin::SetFriendPoint(v4, *((_WORD *)pvData + 1));
      v6 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(*((_WORD *)pvData + 2))->Name;
      v7 = (char *)TextData3::Get(0xD8521327);
      GameFrameWork::VaAddSysMsg(v3, v7, v6, v5);
      return iRevBytes;
    case 0x36C4:
      v9 = TextData::Get(0x20611375u);
      goto LABEL_8;
    case 0x36C1:
      v9 = TextData3::Get(0x7543564u);
      goto LABEL_8;
    case 0x36C3:
      v9 = TextData3::Get(0x63D3128u);
      goto LABEL_8;
    case 0x36C2:
      v9 = TextData3::Get(0x1256312Eu);
LABEL_8:
      GameFrameWork::AddSysMsg(v3, (const char *)v9);
      break;
    default:
      return iRevBytes;
  }
  return iRevBytes;
}

//----- (004B1C30) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_FRIEND_GET_DIFF_FRIEND_POINT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // ST08_4@1
  GameFrameWork *v4; // esi@1
  char *v5; // eax@1

  v3 = *(_WORD *)pvData;
  v4 = this;
  v5 = (char *)TextData3::Get(0x77B1DDD6u);
  GameFrameWork::VaAddSysMsg(v4, v5, v3);
  return iRevBytes;
}

//----- (004B1C60) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_KQ_JOIN_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  char *v4; // eax@2
  char *v5; // eax@3
  bool bResult; // [sp+8h] [bp-4h]@1

  v3 = this;
  bResult = 0;
  switch ( *((_WORD *)pvData + 2) )
  {
    case 0x991:
      v4 = (char *)TextData::Get(0x31480F32u);
      GameFrameWork::VaAddSysMsg(v3, v4);
      bResult = 1;
      SoundMgr::PlayInterfaceSound(&g_kSoundMgr, CharCreateClr);
      *(_WORD *)&v3->m_pkMiniMapWin->m_bKQJoined = 257;
      break;
    case 0x992:
      v5 = (char *)TextData::Get(0x799FD0D4u);
      goto LABEL_12;
    case 0x993:
      v5 = (char *)TextData::Get(0xE1D8BC4D);
      goto LABEL_12;
    case 0x994:
      v5 = (char *)TextData::Get(0xC93E0E31);
      goto LABEL_12;
    case 0x995:
      v5 = (char *)TextData::Get(0x67856478u);
      goto LABEL_12;
    case 0x996:
      v5 = (char *)TextData::Get(0x6E837263u);
      goto LABEL_12;
    case 0x997:
      v5 = (char *)TextData::Get(0x63616FD2u);
      goto LABEL_12;
    case 0x998:
      v5 = (char *)TextData::Get(0xE9DDD32E);
      goto LABEL_12;
    case 0x99A:
      v5 = (char *)TextData2::Get(0xCF4300E9);
      goto LABEL_12;
    case 0x999:
      break;
    default:
      v5 = (char *)TextData::Get(0xD905C7E9);
LABEL_12:
      GameFrameWork::VaAddSysMsg(v3, v5);
      break;
  }
  KingdomQuestWin::JoinResult(v3->m_pkKingDomQuest, *(_DWORD *)pvData, bResult);
  return iRevBytes;
}

//----- (004B1D50) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_KQ_JOIN_CANCEL_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  char *v4; // eax@3
  char *v6; // eax@4

  v3 = this;
  if ( *((_WORD *)pvData + 2) == 2465 )
  {
    v6 = (char *)TextData::Get(0xC8D2CB46);
    GameFrameWork::VaAddSysMsg(v3, v6);
    *(_WORD *)&v3->m_pkMiniMapWin->m_bKQJoined = 256;
  }
  else if ( *((_WORD *)pvData + 2) == 2466 )
  {
    v4 = (char *)TextData::Get(0x7697DCC5u);
    GameFrameWork::VaAddSysMsg(v3, v4);
    return iRevBytes;
  }
  return iRevBytes;
}

//----- (004B1DB0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_KQ_SCORE_BOARD_INFO_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  char *v5; // eax@4

  v3 = this;
  if ( this->m_pkKDTeamScoreWin )
  {
    GameFrameWork::OpenKDTeamScoreWin(this, 1);
    KDTeamScoreWin::SetUseRound(v3->m_pkKDTeamScoreWin, *(_BYTE *)pvData != 0);
    KDTeamScoreWin::SetScore(v3->m_pkKDTeamScoreWin, 0, *(_DWORD *)((char *)pvData + 6));
    KDTeamScoreWin::SetWinFlag(v3->m_pkKDTeamScoreWin, 0, *(_DWORD *)((char *)pvData + 2));
    KDTeamScoreWin::SetScore(v3->m_pkKDTeamScoreWin, KQTT_BLUE, *(_DWORD *)((char *)pvData + 14));
    KDTeamScoreWin::SetWinFlag(v3->m_pkKDTeamScoreWin, 1u, *(_DWORD *)((char *)pvData + 10));
    switch ( *((_WORD *)pvData + 9) )
    {
      case 0x23:
      case 0x26:
        KDTeamScoreWin::SetRound(v3->m_pkKDTeamScoreWin, *((_BYTE *)pvData + 1));
        return iRevBytes;
      case 0x24:
        v5 = (char *)TextData3::Get(0xF821DC11);
        break;
      case 0x2A:
        v5 = (char *)TextData3::Get(0xE5F7AB27);
        break;
      default:
        return iRevBytes;
    }
    KDTeamScoreWin::SetTitleText(v3->m_pkKDTeamScoreWin, v5);
  }
  return iRevBytes;
}

//----- (004B1EA0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_KQ_WINTER_EVENT_2014_SCORE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  char *v4; // eax@2

  v3 = this;
  if ( this->m_pkKDTeamScoreWin )
  {
    GameFrameWork::OpenKDTeamScoreWin(this, 1);
    KDTeamScoreWin::SetUseRound(v3->m_pkKDTeamScoreWin, 0);
    KDTeamScoreWin::SetScore(v3->m_pkKDTeamScoreWin, 0, *((_DWORD *)pvData + 1));
    KDTeamScoreWin::SetWinFlag(v3->m_pkKDTeamScoreWin, 0, *(_DWORD *)pvData);
    KDTeamScoreWin::SetScore(v3->m_pkKDTeamScoreWin, KQTT_BLUE, *((_DWORD *)pvData + 3));
    KDTeamScoreWin::SetWinFlag(v3->m_pkKDTeamScoreWin, 1u, *((_DWORD *)pvData + 2));
    v4 = (char *)TextData3::Get(0xF821DC11);
    KDTeamScoreWin::SetTitleText(v3->m_pkKDTeamScoreWin, v4);
  }
  return iRevBytes;
}

//----- (004B1F30) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_WT_LICENSE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  NiUnsharedGeometryGroup *v4; // eax@4
  WeaponTitleWin *v6; // ecx@8
  __int16 v7; // ax@10
  __int16 v8; // dx@10
  unsigned int v9; // eax@11
  Item *v10; // eax@12
  unsigned int v11; // eax@14
  NiUnsharedGeometryGroup *v12; // eax@20
  SoundIndex rkIndex; // [sp+8h] [bp-8h]@20

  v3 = this;
  if ( *(_WORD *)((char *)pvData + 5) != 2489 )
  {
    if ( *(_WORD *)((char *)pvData + 5) == 2491 )
    {
      v4 = TextData::Get(0xF03E111C);
      goto LABEL_5;
    }
    if ( *(_WORD *)((char *)pvData + 5) != 2529 )
    {
      v4 = TextData::Get(0xE90C344B);
LABEL_5:
      GameFrameWork::AddSysMsg(v3, (const char *)v4);
      WeaponTitleWin::SignTitleFailed(v3->m_pkWeaponTitleWin, (ITEM_INVEN *)pvData);
      return iRevBytes;
    }
  }
  if ( *((_BYTE *)pvData + 4) )
    v6 = this->m_pkWeaponTitleWin;
  else
    v6 = (WeaponTitleWin *)&this->m_pkWeaponTitleDeleteWin->vfptr;
  v7 = *((_WORD *)pvData + 1);
  v8 = *((_WORD *)pvData + 1) >> 10;
  if ( v8 == 9 )
  {
    v9 = v7 & 0x3FF;
    if ( v9 < 0xC0 )
    {
      v10 = g_kInventory.m_aspInv[v9].m_pObject;
      goto LABEL_16;
    }
  }
  else if ( v8 == 8 )
  {
    v11 = v7 & 0x3FF;
    if ( v11 < 0x1E )
    {
      v10 = g_kInventory.m_aspEquip[v11].m_pObject;
LABEL_16:
      if ( v10 )
        WeaponTitleWin::SignTitleSuccess(v6, (ITEM_INVEN *)pvData, v10);
      goto LABEL_18;
    }
  }
LABEL_18:
  if ( !(`TutorialMgr::GetTutorialMgr'::`2'::`local static guard' & 1) )
  {
    `TutorialMgr::GetTutorialMgr'::`2'::`local static guard' |= 1u;
    TutorialMgr::TutorialMgr(&`TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr);
    atexit(`TutorialMgr::GetTutorialMgr'::`2'::`dynamic atexit destructor for 'kTutorialMgr'');
  }
  TutorialMgr::On_NC_WT_LICENSE_ACK(&`TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr);
  v12 = TextData::Get(0x746C6EE7u);
  GameFrameWork::AddSysMsg(v3, (const char *)v12);
  rkIndex.m_dwIndex = 3;
  rkIndex.m_acFilename = 0;
  SoundGroupStatic::PlaySoundA((SoundGroupStatic *)&g_kSoundMgr.m_pkInterfaceGroup->vfptr, &rkIndex, 0, 0);
  return iRevBytes;
}
// A8C638: using guessed type int `TutorialMgr::GetTutorialMgr'::`2'::`local static guard';

//----- (004B2060) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_WT_GRADE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@1

  v3 = this;
  v4 = TextData::Get(0x85F9C1CF);
  GameFrameWork::AddSysMsg(v3, (const char *)v4);
  return iRevBytes;
}

//----- (004B2090) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SCENARIO_MESSAGENOTICE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  int v4; // eax@3
  char *v5; // eax@4

  v3 = this;
  if ( this->m_pkGuildWarInformWin )
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkGuildWarInformWin->vfptr);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkGuildWarInformWin->vfptr);
  }
  v4 = *(_DWORD *)pvData;
  if ( *(_DWORD *)pvData == 8224 )
  {
    v5 = (char *)TextData2::Get(0x88A04D53);
LABEL_11:
    GuildWarInformWin::SetText(v3->m_pkGuildWarInformWin, v5);
    return iRevBytes;
  }
  if ( v4 == 8227 )
  {
    v5 = (char *)TextData2::Get(0xDE1E08F0);
    goto LABEL_11;
  }
  if ( v4 == 8225 )
  {
    v5 = (char *)TextData2::Get(0xE2502FCu);
    goto LABEL_11;
  }
  if ( v4 == 8226 )
  {
    v5 = (char *)TextData2::Get(0xBCEAA6AD);
    goto LABEL_11;
  }
  return iRevBytes;
}

//----- (004B2120) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_QUEST_REWARD_NEED_SELECT_ITEM_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@1

  v3 = this;
  v4 = TextData::Get(0x90FCD9C7);
  GameFrameWork::AddSysMsg(v3, (const char *)v4);
  return iRevBytes;
}

//----- (004B2150) --------------------------------------------------------
void __thiscall GameFrameWork::NcReportAddReq(GameFrameWork *this, Name5 sHarmer, char *cReportType, char *cReason)
{
  char *v4; // ebx@1
  GameFrameWork *v5; // esi@1
  char *v6; // eax@1
  char *v7; // edi@1
  __int16 v8; // dx@1
  char v9; // cl@2
  signed int v10; // eax@3
  char *v11; // eax@5
  PgNet *v12; // ecx@7
  signed int v13; // eax@7
  signed int v14; // eax@9
  NETCOMMAND netcmd; // [sp+Ch] [bp-11Ch]@7
  int nChatLogSize; // [sp+10h] [bp-118h]@4
  char reason[256]; // [sp+14h] [bp-114h]@9
  char reportType[16]; // [sp+114h] [bp-14h]@7

  v4 = cReason;
  v5 = this;
  v6 = this->m_chatLog;
  v7 = cReportType;
  v8 = (_WORD)this + 2649;
  do
    v9 = *v6++;
  while ( v9 );
  v10 = (unsigned __int16)((_WORD)v6 - v8);
  if ( v10 >= 2048 )
  {
    nChatLogSize = 2048;
  }
  else
  {
    nChatLogSize = v10;
    if ( !(_WORD)v10 )
    {
      v11 = (char *)TextData::Get(0xDE3C2B23);
      MsgBox::Modeless(MSGBOX_OK, v11);
      return;
    }
  }
  v12 = (PgNet *)&v5->m_spWorldMgrNet.m_pObject->vfptr;
  netcmd.protocol = -32767;
  PgNet::AddNetMsg(v12, &netcmd, 2);
  PgNet::AddNetMsg((PgNet *)&v5->m_spWorldMgrNet.m_pObject->vfptr, &sHarmer, 20);
  *(_DWORD *)reportType = 0;
  *(_DWORD *)&reportType[4] = 0;
  *(_DWORD *)&reportType[8] = 0;
  *(_DWORD *)&reportType[12] = 0;
  v13 = strlen(v7);
  if ( v13 >= 16 )
    v13 = 16;
  memcpy(reportType, v7, v13);
  PgNet::AddNetMsg((PgNet *)&v5->m_spWorldMgrNet.m_pObject->vfptr, reportType, 16);
  memset(reason, 0, 0x100u);
  v14 = strlen(v4);
  if ( v14 >= 256 )
    v14 = 256;
  memcpy(reason, v4, v14);
  PgNet::AddNetMsg((PgNet *)&v5->m_spWorldMgrNet.m_pObject->vfptr, reason, 256);
  PgNet::AddNetMsg((PgNet *)&v5->m_spWorldMgrNet.m_pObject->vfptr, &nChatLogSize, 2);
  PgNet::AddNetMsg((PgNet *)&v5->m_spWorldMgrNet.m_pObject->vfptr, v5->m_chatLog, (unsigned __int16)nChatLogSize);
  PgNet::SendNetMsg((PgNet *)&v5->m_spWorldMgrNet.m_pObject->vfptr, 0, 0);
}

//----- (004B22F0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_REPORT_ADD_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  _WORD *v3; // esi@1
  GameFrameWork *v4; // edi@1
  ReportWin *v5; // ecx@1
  char *v6; // eax@7
  __int16 pdata; // [sp+8h] [bp-4h]@15

  v3 = pvData;
  v4 = this;
  v5 = this->m_pkReportWin;
  if ( *((_WORD *)pvData + 12) == 3904 )
  {
    if ( v5 )
      ReportWin::SetReportAdd(v5, *((_DWORD *)pvData + 5));
  }
  else
  {
    if ( v5 )
      ReportWin::SetReportAddErr(v5);
    switch ( v3[12] )
    {
      case 0xF41:
        v6 = (char *)TextData::Get(0xED241873);
        goto LABEL_14;
      case 0xF42:
        v6 = (char *)TextData::Get(0xE1E96A5u);
        goto LABEL_14;
      case 0xF58:
        v6 = (char *)TextData::Get(0xD4D93C40);
        goto LABEL_14;
      case 0xF43:
        v6 = (char *)TextData::Get(0x685FEBD3u);
        goto LABEL_14;
      case 0xF44:
        v6 = (char *)TextData::Get(0x6773E6DAu);
        goto LABEL_14;
      case 0xF45:
        v6 = (char *)TextData::Get(0xB2D1E7DA);
        goto LABEL_14;
      case 0xF46:
        v6 = (char *)TextData::Get(0xB6BFE821);
LABEL_14:
        MsgBox::Modeless(MSGBOX_OK, v6);
        break;
      default:
        break;
    }
  }
  pdata = -32763;
  PgNet::AddNetMsg((PgNet *)&v4->m_spWorldMgrNet.m_pObject->vfptr, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v4->m_spWorldMgrNet.m_pObject->vfptr, (char *)&pvData + 3, 1);
  return iRevBytes;
}

//----- (004B23F0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_REPORT_GET_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // ebx@1
  __int16 v4; // ax@1
  ReportWin *v5; // ecx@2
  NiUnsharedGeometryGroup *v6; // eax@3
  NiUnsharedGeometryGroup *v7; // eax@6
  NiUnsharedGeometryGroup *v8; // eax@7
  NiUnsharedGeometryGroup *v9; // eax@8
  NiUnsharedGeometryGroup *v10; // eax@8
  ReportWin *v11; // ecx@12
  NiUnsharedGeometryGroup *v12; // eax@15
  NiUnsharedGeometryGroup *v13; // eax@15
  char *v14; // eax@17
  char temp[128]; // [sp+8h] [bp-84h]@9

  v3 = this;
  ReportWin::ShowOKButton(this->m_pkReportWin, 1);
  v4 = *(_WORD *)pvData;
  if ( *(_WORD *)pvData == 3904 )
  {
    v5 = v3->m_pkReportWin;
    if ( v5 )
    {
      ReportWin::SetMode(v5, REPORT_PROCESS);
      ReportWin::SetRegID(v3->m_pkReportWin, *(_DWORD *)((char *)pvData + 2));
      v6 = TextData::Get(0xE9444134);
      ((void (__stdcall *)(NiUnsharedGeometryGroup *))v3->m_pkReportWin->m_pkCharRegIDNameText->vfptr[118].__vecDelDtor)(v6);
      if ( *((_BYTE *)pvData + 6) )
      {
        if ( *((_BYTE *)pvData + 6) == 1 )
        {
          ReportWin::ShowOKButton(v3->m_pkReportWin, 0);
          v8 = TextData::Get(0x343D8D8Eu);
          ReportWin::SetProcessText(v3->m_pkReportWin, (const char *)v8);
        }
        else if ( *((_BYTE *)pvData + 6) == 2 )
        {
          ReportWin::ShowOKButton(v3->m_pkReportWin, 0);
          v7 = TextData::Get(0xE9F94832);
          ReportWin::SetProcessText(v3->m_pkReportWin, (const char *)v7);
        }
      }
      else
      {
        v9 = TextData::Get(0x2E525785u);
        ReportWin::SetProcessText(v3->m_pkReportWin, (const char *)v9);
        v10 = TextData::Get(0x31363B3Bu);
        ReportWin::SetOKButText(v3->m_pkReportWin, (const char *)v10);
      }
      qmemcpy(temp, (char *)pvData + 7, sizeof(temp));
      ReportWin::SetReportInfoInput(v3->m_pkReportWin, temp);
      ((void (__stdcall *)(_DWORD))v3->m_pkReportWin->m_pkReportInfoInput->vfptr[60].__vecDelDtor)(0);
      if ( !(unsigned __int8)((int (*)(void))v3->m_pkReportWin->vfptr[65].__vecDelDtor)() )
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkReportWin->vfptr);
    }
  }
  else if ( v4 == 3936 )
  {
    v11 = v3->m_pkReportWin;
    if ( v11 )
    {
      ReportWin::SetMode(v11, 0);
      if ( !(unsigned __int8)((int (*)(void))v3->m_pkReportWin->vfptr[65].__vecDelDtor)() )
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkReportWin->vfptr);
      v12 = TextData::Get(0xE9013C3B);
      ReportWin::SetOKButText(v3->m_pkReportWin, (const char *)v12);
      ((void (__stdcall *)(signed int))v3->m_pkReportWin->m_pkReportInfoInput->vfptr[60].__vecDelDtor)(1);
      v13 = TextData::Get(0xECF14A2E);
      ((void (__stdcall *)(NiUnsharedGeometryGroup *))v3->m_pkReportWin->m_pkCharRegIDNameText->vfptr[118].__vecDelDtor)(v13);
    }
  }
  else if ( v4 == 3928 )
  {
    v14 = (char *)TextData::Get(0x38443D4Cu);
    MsgBox::Modeless(MSGBOX_OK, v14);
  }
  return iRevBytes;
}

//----- (004B2650) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_REPORT_CANCEL_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int *v3; // edi@1
  GameFrameWork *v4; // esi@1
  ReportWin *v5; // ecx@2
  char *v6; // eax@4
  PgNet *v7; // ecx@4
  int result; // eax@4
  char *v9; // eax@5
  __int16 pdata; // [sp+8h] [bp-4h]@4

  v3 = (int *)pvData;
  v4 = this;
  if ( *((_WORD *)pvData + 2) == 3904 )
  {
    v5 = this->m_pkReportWin;
    if ( v5 )
    {
      ReportWin::SetMode(v5, REPORT_PROCESS);
      ReportWin::SetRegID(v4->m_pkReportWin, *v3);
    }
    v6 = (char *)TextData::Get(0x23C3216u);
    MsgBox::Modeless(MSGBOX_OK, v6);
    v7 = (PgNet *)&v4->m_spWorldMgrNet.m_pObject->vfptr;
    pdata = -32763;
    PgNet::AddNetMsg(v7, &pdata, 2);
    PgNet::SendNetMsg((PgNet *)&v4->m_spWorldMgrNet.m_pObject->vfptr, (char *)&pvData + 3, 1);
    result = iRevBytes;
  }
  else
  {
    v9 = (char *)TextData::Get(0xC3E8E91A);
    MsgBox::Modeless(MSGBOX_OK, v9);
    result = iRevBytes;
  }
  return result;
}

//----- (004B26F0) --------------------------------------------------------
void __thiscall GameFrameWork::NcPrisonAddGMReq(GameFrameWork *this, Name5 sImprison, unsigned __int16 nMinute, char *sReason, char *sRemark)
{
  GameFrameWork *v5; // esi@1
  PgNet *v6; // ecx@1
  __int16 pdata; // [sp+8h] [bp-70h]@1
  PROTO_NC_PRISON_ADD_GM_REQ kProto; // [sp+Ch] [bp-6Ch]@1

  v5 = this;
  kProto.sImprison = sImprison;
  kProto.nMinute = nMinute;
  sprintf(kProto.sReason, "%s", sReason);
  sprintf(kProto.sRemark, "%s", sRemark);
  v6 = (PgNet *)&v5->m_spWorldMgrNet.m_pObject->vfptr;
  pdata = 31745;
  PgNet::AddNetMsg(v6, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v5->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 102);
}

//----- (004B2790) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_PRISON_ADD_GM_ACK(int iRevBytes, void *pvData)
{
  int v3; // eax@1
  char *v4; // eax@3

  v3 = *((_WORD *)pvData + 10);
  if ( (_WORD)v3 != 3456 )
  {
    switch ( v3 )
    {
      case 3457:
        v4 = (char *)TextData::Get(0x807A9C6A);
        goto LABEL_11;
      case 3458:
        v4 = (char *)TextData::Get(0x179876u);
        goto LABEL_11;
      case 3459:
        v4 = (char *)TextData::Get(0x4D889772u);
        goto LABEL_11;
      case 3460:
        v4 = (char *)TextData::Get(0x52889565u);
        goto LABEL_11;
      case 3461:
        v4 = (char *)TextData::Get(0xC4E701DE);
        goto LABEL_11;
      case 3462:
        v4 = (char *)TextData::Get(0xC0512F1E);
        goto LABEL_11;
      case 3463:
        v4 = (char *)TextData::Get(0x6AE8F4CFu);
        goto LABEL_11;
      case 3464:
        v4 = (char *)TextData::Get(0x7A97A2DCu);
LABEL_11:
        MsgBox::Modeless(MSGBOX_OK, v4);
        break;
      default:
        return iRevBytes;
    }
  }
  return iRevBytes;
}

//----- (004B2840) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_PRISON_OK_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  int v4; // ST10_4@1
  NiUnsharedGeometryGroup *v5; // eax@1
  PrisonTimeWin *v6; // ecx@1
  NiUnsharedGeometryGroup *v7; // eax@5
  PgNet *v8; // ecx@6
  __int16 pdata; // [sp+8h] [bp-108h]@6
  char msg[256]; // [sp+Ch] [bp-104h]@1

  v3 = this;
  msg[0] = 0;
  memset(&msg[1], 0, 0xFFu);
  v4 = *(_WORD *)pvData;
  v5 = TextData::Get(0x3A5A878Du);
  sprintf(msg, (const char *)v5, v4, (char *)pvData + 2, (char *)pvData + 18);
  MsgBox::Modeless(MSGBOX_OK, msg);
  v6 = v3->m_pkPrisonTimeWin;
  if ( v6 )
    PrisonTimeWin::ResetTime(v6, 60 * *(_WORD *)pvData);
  if ( *(_WORD *)pvData )
  {
    if ( g_kParty.m_uiTotalMember )
    {
      v8 = (PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr;
      pdata = 14346;
      PgNet::SendNetMsg(v8, &pdata, 2);
    }
    else
    {
      v7 = TextData::Get(0x7D9CEEE9u);
      GameFrameWork::AddSysMsg(v3, (const char *)v7);
    }
  }
  return iRevBytes;
}

//----- (004B2930) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_PRISON_UNDOING_CMD(int iRevBytes, void *pvData)
{
  char *v3; // eax@1

  v3 = (char *)TextData::Get(0x88939FC3);
  MsgBox::Modeless(MSGBOX_OK, v3);
  return iRevBytes;
}

//----- (004B2950) --------------------------------------------------------
void __thiscall GameFrameWork::NcPrisonAlterGMReq(GameFrameWork *this, Name5 sImprison, unsigned __int16 nMinute, char *sReason, char *sRemark)
{
  GameFrameWork *v5; // esi@1
  PgNet *v6; // ecx@1
  __int16 pdata; // [sp+8h] [bp-70h]@1
  PROTO_NC_PRISON_ALTER_GM_REQ kProto; // [sp+Ch] [bp-6Ch]@1

  v5 = this;
  kProto.sImprison = sImprison;
  kProto.nMin = nMinute;
  sprintf(kProto.sReason, "%s", sReason);
  sprintf(kProto.sRemark, "%s", sRemark);
  v6 = (PgNet *)&v5->m_spWorldMgrNet.m_pObject->vfptr;
  pdata = 31753;
  PgNet::AddNetMsg(v6, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v5->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 102);
}

//----- (004B29F0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_PRISON_ALTER_GM_ACK(int iRevBytes, void *pvData)
{
  int v3; // eax@1
  char *v4; // eax@3

  v3 = *((_WORD *)pvData + 10);
  if ( (_WORD)v3 != 3488 )
  {
    switch ( v3 )
    {
      case 3489:
        v4 = (char *)TextData::Get(0x8984E0C2);
        goto LABEL_10;
      case 3490:
        v4 = (char *)TextData::Get(0xE4E4AFAD);
        goto LABEL_10;
      case 3491:
        v4 = (char *)TextData::Get(0x848CADD0);
        goto LABEL_10;
      case 3492:
        v4 = (char *)TextData::Get(0x827FB2D0);
        goto LABEL_10;
      case 3493:
        v4 = (char *)TextData::Get(0xEEF8242F);
        goto LABEL_10;
      case 3494:
        v4 = (char *)TextData::Get(0xC0512F1E);
        goto LABEL_10;
      case 3463:
        v4 = (char *)TextData::Get(0x6AE8F4CFu);
LABEL_10:
        MsgBox::Modeless(MSGBOX_OK, v4);
        break;
      default:
        return iRevBytes;
    }
  }
  return iRevBytes;
}

//----- (004B2AC0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MAP_WING_SAVE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  __int16 v3; // ax@1
  GameFrameWork *v4; // esi@1
  NiUnsharedGeometryGroup *v6; // eax@5
  NiUnsharedGeometryGroup *v7; // ST00_4@17

  v3 = *(_WORD *)pvData;
  v4 = this;
  if ( *(_WORD *)pvData == 4417 )
  {
    if ( LOBYTE(TextData::Get(0x4C44427Du)->vfptr) )
    {
      v7 = TextData::Get(0x4C44427Du);
      GameFrameWork::AddSysMsg(v4, (const char *)v7);
    }
    else
    {
      GameFrameWork::AddSysMsg(v4, "Unknown text");
    }
    v4->m_pkWingStoneWin->m_bCheckPossibility = 1;
    return iRevBytes;
  }
  if ( v3 == 4419 )
  {
    if ( !LOBYTE(TextData::Get(0x68A78683u)->vfptr) )
    {
      GameFrameWork::AddSysMsg(v4, "Unknown Text");
      return iRevBytes;
    }
    v6 = TextData::Get(0x68A78683u);
    goto LABEL_6;
  }
  if ( v3 == 4420 )
  {
    if ( !LOBYTE(TextData::Get(0x3E4F2E49u)->vfptr) )
    {
      GameFrameWork::AddSysMsg(v4, "Unknown Text");
      return iRevBytes;
    }
    v6 = TextData::Get(0x3E4F2E49u);
LABEL_6:
    GameFrameWork::AddSysMsg(v4, (const char *)v6);
    return iRevBytes;
  }
  if ( v3 != 4422 )
    return iRevBytes;
  if ( LOBYTE(TextData::Get(0x85BA8AED)->vfptr) )
  {
    v6 = TextData::Get(0x85BA8AED);
    goto LABEL_6;
  }
  GameFrameWork::AddSysMsg(v4, "Unknown Text");
  return iRevBytes;
}

//----- (004B2BE0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MAP_WING_FLY_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  __int16 v3; // ax@1
  GameFrameWork *v4; // esi@1
  NiUnsharedGeometryGroup *v6; // eax@5

  v3 = *(_WORD *)pvData;
  v4 = this;
  if ( *(_WORD *)pvData == 4417 )
  {
    WingStoneWin::SetFirstGoddessWingUse(this->m_pkWingStoneWin, 1);
    v4->m_pkWingStoneWin->m_uiDescript = v4->m_pkWingStoneWin->m_uiMemorySlot;
    if ( !LOBYTE(TextData::Get(0xA39E7DA5)->vfptr) )
    {
      GameFrameWork::AddSysMsg(v4, "Unknown Text");
      return iRevBytes;
    }
    v6 = TextData::Get(0xA39E7DA5);
    goto LABEL_21;
  }
  if ( v3 == 4420 )
  {
    if ( !LOBYTE(TextData::Get(0x3E4F2E49u)->vfptr) )
    {
      GameFrameWork::AddSysMsg(v4, "Unknown Text");
      return iRevBytes;
    }
    v6 = TextData::Get(0x3E4F2E49u);
LABEL_21:
    GameFrameWork::AddSysMsg(v4, (const char *)v6);
    return iRevBytes;
  }
  if ( v3 == 4422 )
  {
    if ( !LOBYTE(TextData::Get(0x85BA8AED)->vfptr) )
    {
      GameFrameWork::AddSysMsg(v4, "Unknown Text");
      return iRevBytes;
    }
    v6 = TextData::Get(0x85BA8AED);
    goto LABEL_21;
  }
  if ( v3 == 4421 )
  {
    if ( !LOBYTE(TextData::Get(0x988C9578)->vfptr) )
    {
      GameFrameWork::AddSysMsg(v4, "Unknown");
      return iRevBytes;
    }
    v6 = TextData::Get(0x988C9578);
    goto LABEL_21;
  }
  if ( v3 == 4419 )
  {
    if ( !LOBYTE(TextData::Get(0x7AAFCF08u)->vfptr) )
    {
      GameFrameWork::AddSysMsg(v4, "Unknown Text");
      return iRevBytes;
    }
    v6 = TextData::Get(0x7AAFCF08u);
    goto LABEL_21;
  }
  return iRevBytes;
}

//----- (004B2D50) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_FUNICHER_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  _BYTE *v3; // esi@1
  bool v4; // zf@1
  char *v5; // ebx@2
  char v6; // al@3
  int v7; // edx@3
  char v8; // ST10_1@3
  int v9; // eax@3
  int v10; // eax@4
  unsigned int v11; // eax@5
  void *v12; // eax@7
  void *v13; // edi@7
  const char *v14; // eax@8
  int v15; // ecx@15
  int key; // [sp+18h] [bp-28h]@4
  NiUnsharedGeometryGroup *v18; // [sp+1Ch] [bp-24h]@4
  NiUnsharedGeometryGroup *v19; // [sp+20h] [bp-20h]@4
  NiUnsharedGeometryGroup *v20; // [sp+24h] [bp-1Ch]@4
  NiPoint3 ObjPos; // [sp+28h] [bp-18h]@3
  GameFrameWork *v22; // [sp+34h] [bp-Ch]@1
  float Angle; // [sp+38h] [bp-8h]@3
  int i; // [sp+3Ch] [bp-4h]@1

  v3 = pvData;
  v4 = *(_BYTE *)pvData == 0;
  v22 = this;
  i = 0;
  if ( !v4 )
  {
    v5 = (char *)pvData + 10;
    do
    {
      v6 = v5[12];
      v7 = *((_WORD *)v5 - 3);
      ObjPos.x = *((float *)v5 - 1);
      ObjPos.y = *(float *)v5;
      ObjPos.z = *((float *)v5 + 1);
      v8 = v6;
      v9 = *((_WORD *)v5 - 4);
      Angle = *((float *)v5 + 2);
      if ( MiniHouseIndoor::AddObject(&g_kWorld.m_MiniHouseIndoorMode, v9, v7, &ObjPos, Angle, v8, 1) != 1 )
      {
        v18 = &unk_96F8EB;
        v19 = &unk_96F8EB;
        v20 = &unk_96F8EB;
        key = -1243729871;
        v10 = *(_DWORD *)(ITableBase<TextDataType2,TextData2>::ms_pkTable + 56);
        if ( v10 )
          v11 = *(_DWORD *)(v10 + 40);
        else
          v11 = 0;
        v12 = bsearch(&key, TextData2::ms_apkNode, v11, 0x10u, TextDataNodeComp);
        v13 = v12;
        if ( v12 )
        {
          if ( strcmp(*((const char **)v12 + 2), "None") )
            SoundMgr::PlayGenderVoice(&g_kSoundMgr, *((char **)v13 + 2));
          if ( strcmp(*((const char **)v13 + 3), "None") )
            SoundMgr::PlayInterfaceSound(&g_kSoundMgr, *((char **)v13 + 3));
          v14 = (const char *)*((_DWORD *)v13 + 1);
        }
        else
        {
          v14 = (const char *)&unk_96F8EB;
        }
        GameFrameWork::AddSysMsg(v22, v14);
        v3 = pvData;
      }
      v15 = *v3;
      v5 += 21;
      ++i;
    }
    while ( i < v15 );
  }
  if ( v3[1] == -1 )
  {
    BYTE3(pvData) = 1;
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x23u, 0x1Du, (char *)&pvData + 3, 1);
  }
  return iRevBytes;
}
// A88684: using guessed type int ITableBase<TextDataType2,TextData2>::ms_pkTable;

//----- (004B2EE0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_MINIHOUSE_ARRANGEMODE_CMD(int iRevBytes, void *pvData)
{
  char *v3; // eax@3
  PgWin *v5; // esi@5

  if ( *(_BYTE *)pvData == 1 )
  {
    MiniHouseIndoor::SetState(&g_kWorld.m_MiniHouseIndoorMode, MH_STATE_NORMAL);
    if ( nowState == 1 )
    {
      v3 = (char *)TextData2::Get(0x728986AAu);
      MiniHouseIndoor::SetMsgBox(&g_kWorld.m_MiniHouseIndoorMode, v3);
      return iRevBytes;
    }
  }
  else
  {
    if ( nowState == 1 )
    {
      PgWinMgr::DestroyWin(&Pgg_kWinMgr, pkWin);
      v5 = pkWin;
      if ( pkWin )
      {
        if ( !InterlockedDecrement((volatile LONG *)&pkWin->m_uiRefCount) )
        {
          if ( v5 )
            v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
        }
        pkWin = 0;
      }
    }
    MiniHouseIndoor::SetState(&g_kWorld.m_MiniHouseIndoorMode, MH_STATE_NORMAL);
  }
  return iRevBytes;
}

//----- (004B2F80) --------------------------------------------------------
void __thiscall GameFrameWork::SendMHVisitReq(GameFrameWork *this, unsigned __int16 mh_hnd, char *PassWord)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@4
  PROTO_NC_MINIHOUSE_VISIT_REQ kProto; // [sp+8h] [bp-10h]@1

  kProto.mh_hnd = mh_hnd;
  *(_DWORD *)&kProto.password[0] = 0;
  *(_DWORD *)&kProto.password[4] = 0;
  kProto.password[8] = 0;
  v3 = this;
  strcpy(kProto.password, PassWord);
  if ( unk_A96B31 && unk_A96B30 && CNSTimer_Interval::IsRun_GetCount(&stru_A96B34, Timer::ms_fCurTime) )
  {
    CNSTimer_Interval::ReSet(&stru_A96B34, Timer::ms_fCurTime);
    unk_A96B31 = 0;
    v4 = TextData::Get(0x4241667Au);
    GameFrameWork::AddSysMsg(v3, (const char *)v4);
    GameFrameWork::NcMiscHideExceptMeCmd(v3, 0);
  }
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x23u, 0x10u, &kProto, 11);
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004B3040) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_MODIFY_MAXENTERNUM_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  _BYTE *v3; // eax@1
  GameFrameWork *v4; // esi@1
  mhSettingWin *v5; // edi@1
  NiUnsharedGeometryGroup *v6; // eax@1

  v3 = pvData;
  v4 = this;
  unk_A994AC = *(_BYTE *)pvData;
  this->m_pkMHInfoWin->m_MaxPersonCount = *(_BYTE *)pvData;
  v5 = this->m_pkMHSettingWin;
  _itoa(*v3, (char *)&pvData, 10);
  ((void (__stdcall *)(void **))v5->m_spEdit[1].m_pObject->vfptr[115].__vecDelDtor)(&pvData);
  mhInfoWin::RefreshInfoPage(v4->m_pkMHInfoWin);
  v6 = TextData2::Get(0x1F3C4B8Eu);
  GameFrameWork::AddSysMsg(v4, (const char *)v6);
  return iRevBytes;
}

//----- (004B30C0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_MODIFY_NOTIFY_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@1

  v3 = this;
  ((void (__stdcall *)(char *))this->m_pkMHInfoWin->m_pkTextFieldWin[3]->vfptr[118].__vecDelDtor)((char *)pvData + 1);
  ((void (__stdcall *)(char *))v3->m_pkMHSettingWin->m_spEdit[3].m_pObject->vfptr[115].__vecDelDtor)((char *)pvData + 1);
  v4 = TextData2::Get(0x6B858CD0u);
  GameFrameWork::AddSysMsg(v3, (const char *)v4);
  return iRevBytes;
}

//----- (004B3120) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_MODIFY_ITEM_INFO_OPEN_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@2

  v3 = this;
  if ( *(_BYTE *)pvData )
    v4 = TextData2::Get(0x27453F96u);
  else
    v4 = TextData2::Get(0xE2EB542F);
  GameFrameWork::AddSysMsg(v3, (const char *)v4);
  v3->m_pkMHSettingWin->m_spCheckBox[1]->m_bCheck = *(_BYTE *)pvData != 0;
  v3->m_pkMHInfoWin->m_bItemView = *(_BYTE *)pvData != 0;
  return iRevBytes;
}

//----- (004B3180) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_MH_FURNITURE_ENDURE_KIT_USE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  mhEditRoomWin *v4; // ecx@2
  Item *v5; // eax@2
  mhObject *v6; // eax@3
  ResElement *v7; // ecx@4
  NiActorManager *v8; // edx@6
  NiNode *v9; // ebx@7
  NiPoint3 *v10; // esi@9
  float fScale; // ST20_4@9
  _BYTE v12[12]; // ST10_12@9
  _BYTE v13[12]; // ST04_12@9
  const char *v14; // eax@10
  mhRepairObjWin *v15; // ecx@13
  NiPoint3 result; // [sp+14h] [bp-Ch]@9
  void *pvDataa; // [sp+2Ch] [bp+Ch]@9

  v3 = this;
  if ( *((_WORD *)pvData + 2) == 6768 )
  {
    v4 = this->m_pkMHEditRoomWin;
    v5 = mhEditRoomWin::GetItemByObjID(v3->m_pkMHRepairWin->m_ID);
    if ( !v5 )
      goto LABEL_13;
    v5->m_kStruct.itemattr.furniture.dEndureEndTime = *(ShineDateTime *)pvData;
    v6 = mhObjectManager::GetObjectA(&stru_A993C8, v3->m_pkMHRepairWin->m_ID);
    if ( v6 )
    {
      v7 = v6->m_pkResource;
      if ( v7 )
      {
        if ( v7->m_bIsCanAnimation && (v8 = v7->m_pActorMgr.m_pObject) != 0 )
          v9 = (NiNode *)v8->m_spNIFRoot.m_pObject;
        else
          v9 = v7->m_pNiNode.m_pObject;
        *(float *)&pvDataa = Timer::ms_fCurTime;
        v10 = mhObject::GetPos(v6, &result);
        fScale = EffectMgr::CalculateEffScaleRatio(&g_kEffectMgr, "InMyHome_Repair01", v9);
        *(float *)v12 = NiPoint3::UNIT_Y.x;
        *(_QWORD *)&v12[4] = *(_QWORD *)&NiPoint3::UNIT_Y.y;
        *(float *)v13 = v10->x;
        *(_QWORD *)&v13[4] = *(_QWORD *)&v10->y;
        EffectMgr::CreateEffect(
          &g_kEffectMgr,
          "InMyHome_Repair01",
          *(NiPoint3 *)v13,
          *(NiPoint3 *)v12,
          *(float *)&pvDataa,
          fScale);
      }
    }
    v14 = (const char *)TextData2::Get(0x2F2F8D8Cu);
  }
  else
  {
    v14 = ErrMsgTable::GetErrMsg(*((_WORD *)pvData + 2));
  }
  GameFrameWork::AddSysMsg(v3, v14);
LABEL_13:
  mhRepairObjWin::RepairEnd(v3->m_pkMHRepairWin);
  MiniHouseIndoor::SetRepairObjID(&g_kWorld.m_MiniHouseIndoorMode, 0xFFFFu);
  v15 = v3->m_pkMHRepairWin;
  if ( v15 )
    mhRepairObjWin::SetRepairObjID(v15, 0xFFFFu);
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004B32E0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_GUILD_STORAGEOPEN_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // ebx@1
  CClientGuild *v4; // eax@3
  CClientGuild *v5; // esi@3
  unsigned __int64 v6; // ST00_8@6
  GuildTournamentStorageWin *v7; // eax@6
  NiUnsharedGeometryGroup *v9; // eax@9

  v3 = this;
  if ( *(_WORD *)pvData != 4672 )
  {
    if ( *(_WORD *)pvData == 4674 )
    {
      v9 = TextData::Get(0x76816B99u);
      GameFrameWork::AddSysMsg(v3, (const char *)v9);
    }
    return iRevBytes;
  }
  if ( GuildTournamentStorage::SetContents((PROTO_NC_GUILD_STORAGEOPEN_ACK *)pvData) != 1 )
    return iRevBytes;
  v4 = GuildTask::GetGuild();
  v5 = v4;
  if ( v4 )
  {
    LODWORD(v4->m_iGuildToken) = *(_DWORD *)((char *)pvData + 10);
    HIDWORD(v4->m_iGuildToken) = *(_DWORD *)((char *)pvData + 14);
  }
  if ( GuildTask::GetGuildTournamentStorageWin() )
  {
    v6 = v5->m_iGuildToken;
    v7 = GuildTask::GetGuildTournamentStorageWin();
    GuildTournamentStorageWin::SetToken(v7, v6);
  }
  GameFrameWork::OnOpenGuildTournamentStorage(v3);
  return iRevBytes;
}

//----- (004B3380) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MISC_EVENT_L20_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@4
  int result; // eax@4
  NiUnsharedGeometryGroup *v6; // eax@5
  char *v7; // eax@9

  v3 = this;
  if ( *(_WORD *)((char *)pvData + 1) == 4744 )
  {
    if ( this->m_pkGuildWarInformWin )
    {
      v7 = (char *)TextData::Get(0x1AA78782u);
      GuildWarInformWin::SetText(v3->m_pkGuildWarInformWin, v7);
    }
    result = iRevBytes;
  }
  else
  {
    if ( *(_WORD *)((char *)pvData + 1) == 4745 )
    {
      v6 = TextData::Get(0xB6F3F9E2);
    }
    else
    {
      if ( *(_WORD *)((char *)pvData + 1) != 4746 )
      {
        v4 = fs("Error : %d\n", *(_WORD *)((char *)pvData + 1));
        GameFrameWork::AddSysMsg(v3, v4);
        return iRevBytes;
      }
      v6 = TextData::Get(0xA4E02F3B);
    }
    GameFrameWork::AddSysMsg(v3, (const char *)v6);
    result = iRevBytes;
  }
  return result;
}

//----- (004B3410) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ITEM_SOMEONEUSE_CMD(int iRevBytes, void *pvData)
{
  Char *v3; // eax@1
  int v4; // edi@1
  int v5; // esi@1
  Char *v6; // ebx@1
  int v7; // esi@2
  int v8; // edx@5
  int v9; // eax@10
  _BYTE v10[12]; // ST10_12@10
  _BYTE v11[12]; // ST04_12@10

  v3 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  v4 = *((_WORD *)pvData + 5);
  v5 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  v6 = v3;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                          ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                          v4) )
  {
    if ( (unsigned __int16)v4 <= *(_WORD *)(v5 + 200) )
    {
      v8 = *(_DWORD *)(v5 + 196);
      if ( *(_DWORD *)(v8 + 4 * v4) )
        v7 = *(_DWORD *)(v8 + 4 * v4);
      else
        v7 = 0;
    }
    else
    {
      v7 = 0;
    }
  }
  else
  {
    v7 = 0;
  }
  if ( v6 && v7 )
  {
    v9 = ((int (__thiscall *)(Char *))v6->vfptr[6].Deaffect)(v6);
    *(float *)v10 = NiPoint3::UNIT_Y.x;
    *(_QWORD *)&v10[4] = *(_QWORD *)&NiPoint3::UNIT_Y.y;
    *(_DWORD *)v11 = *(_DWORD *)v9;
    *(_QWORD *)&v11[4] = *(_QWORD *)(v9 + 4);
    EffectMgr::CreateEffect(
      &g_kEffectMgr,
      (char *)(v7 + 2),
      *(NiPoint3 *)v11,
      *(NiPoint3 *)v10,
      Timer::ms_fCurTime,
      1.0);
  }
  return 0;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (004B34E0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_DISMANTLE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  MakeKarisWin *v4; // edi@2
  NiUnsharedGeometryGroup *v5; // eax@2
  int result; // eax@2
  const char *v7; // eax@3

  v3 = this;
  if ( *(_WORD *)pvData == 5760 )
  {
    v4 = this->m_pkMakeKarisWin;
    MakeKarisWin::ClearSlot(this->m_pkMakeKarisWin);
    v4->m_eState = 0;
    v5 = TextData::Get(0x2E988872u);
    GameFrameWork::AddSysMsg(v3, (const char *)v5);
    result = iRevBytes;
  }
  else
  {
    v7 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v7);
    result = iRevBytes;
    v3->m_pkMakeKarisWin->m_eState = 0;
  }
  return result;
}

//----- (004B3560) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_SET_UP_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  __int16 v4; // cx@1
  NiUnsharedGeometryGroup *v5; // eax@4
  char *v6; // eax@4
  const char *v7; // eax@4
  int result; // eax@4
  const char *v9; // eax@5
  int v10; // eax@6
  int v11; // ecx@6
  int v12; // eax@6
  int v13; // ecx@6
  char *v14; // eax@6
  const char *v15; // eax@6
  char acTime[64]; // [sp+4h] [bp-5Ch]@4
  char acName[21]; // [sp+44h] [bp-1Ch]@6

  v3 = this;
  v4 = *(_WORD *)pvData;
  if ( *(_WORD *)pvData == 5952 || v4 == 5969 )
  {
    HolyPromiseWin::SetHignHolyPromise(v3->m_pkHolyPromiseWin, (PROTO_HOLY_PROMISE_INFO *)((char *)pvData + 2));
    v10 = *(_DWORD *)((char *)pvData + 2);
    v11 = *(_DWORD *)((char *)pvData + 6);
    *(_DWORD *)&acName[8] = *(_DWORD *)((char *)pvData + 10);
    *(_DWORD *)acName = v10;
    v12 = *(_DWORD *)((char *)pvData + 14);
    *(_DWORD *)&acName[4] = v11;
    v13 = *(_DWORD *)((char *)pvData + 18);
    *(_DWORD *)&acName[12] = v12;
    *(_DWORD *)&acName[16] = v13;
    acName[20] = 0;
    v14 = (char *)TextData::Get(0x7BCDBCD7u);
    v15 = fs(v14, acName);
    GameFrameWork::AddSysMsg(v3, v15);
    result = iRevBytes;
  }
  else if ( v4 == 5962 )
  {
    v5 = TextData2::Get(0xD8DB2709);
    strftime(acTime, 0x1Fu, (const char *)v5, (tm *)((char *)pvData + 32));
    v6 = (char *)TextData::Get(0x62F2AFB0u);
    v7 = fs(v6, acTime);
    GameFrameWork::AddSysMsg(v3, v7);
    result = iRevBytes;
  }
  else
  {
    v9 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v9);
    result = iRevBytes;
  }
  return result;
}

//----- (004B3690) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_DEL_DOWN_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  int v4; // edx@2
  int v5; // eax@2
  int v6; // edx@2
  int v7; // eax@2
  char *v8; // eax@2
  const char *v9; // eax@2
  _BYTE v10[20]; // ST00_20@2
  const char *v11; // eax@3
  char acName[21]; // [sp+8h] [bp-1Ch]@2

  v3 = this;
  if ( *((_WORD *)pvData + 10) == 5952 )
  {
    v4 = *(_DWORD *)pvData;
    v5 = *((_DWORD *)pvData + 1);
    *(_DWORD *)&acName[8] = *((_DWORD *)pvData + 2);
    *(_DWORD *)acName = v4;
    v6 = *((_DWORD *)pvData + 3);
    *(_DWORD *)&acName[4] = v5;
    v7 = *((_DWORD *)pvData + 4);
    *(_DWORD *)&acName[12] = v6;
    *(_DWORD *)&acName[16] = v7;
    acName[20] = 0;
    v8 = (char *)TextData::Get(0xDC481E32);
    v9 = fs(v8, acName);
    GameFrameWork::AddSysMsg(v3, v9);
    *(_DWORD *)v10 = *(_DWORD *)pvData;
    *(_QWORD *)&v10[4] = *(_QWORD *)((char *)pvData + 4);
    *(_QWORD *)&v10[12] = *(_QWORD *)((char *)pvData + 12);
    HolyPromiseWin::DelHolyPromise(v3->m_pkHolyPromiseWin, *(Name5 *)v10);
  }
  else
  {
    v11 = ErrMsgTable::GetErrMsg(*((_WORD *)pvData + 10));
    GameFrameWork::AddSysMsg(v3, v11);
  }
  return iRevBytes;
}

//----- (004B3750) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_DEL_UP_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  char v4; // al@2
  Name5 *v5; // ecx@5
  char *v6; // eax@6
  const char *v7; // eax@3
  const char *v9; // eax@11
  char acName[21]; // [sp+4h] [bp-1Ch]@6

  v3 = this;
  if ( *(_WORD *)((char *)pvData + 1) == 5952 )
  {
    v4 = *(_BYTE *)pvData;
    if ( !*(_BYTE *)pvData )
    {
      v7 = (const char *)TextData::Get(0xF3FCC131);
LABEL_9:
      GameFrameWork::AddSysMsg(v3, v7);
      goto LABEL_10;
    }
    if ( v4 == 1 )
    {
      v5 = &this->m_pkHolyPromiseWin->m_kCHolyPromise.m_HolyPromisesUp.PromiseCharID;
      if ( v3->m_pkHolyPromiseWin != (HolyPromiseWin *)-376 )
      {
        Name5::n_string(v5, acName);
        acName[20] = 0;
        v6 = (char *)TextData::Get(0x4E3E375Cu);
        v7 = fs(v6, acName);
        goto LABEL_9;
      }
    }
    else if ( v4 == 2 )
    {
      v7 = (const char *)TextData::Get(0x1931172Du);
      goto LABEL_9;
    }
LABEL_10:
    HolyPromiseWin::DelUpHolyPromise(v3->m_pkHolyPromiseWin);
    return iRevBytes;
  }
  v9 = ErrMsgTable::GetErrMsg(*(_WORD *)((char *)pvData + 1));
  GameFrameWork::AddSysMsg(v3, v9);
  return iRevBytes;
}

//----- (004B3820) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_SET_UP_CONFIRM_REQ(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  MHDiceGameTask *v4; // ecx@1
  MHDiceGameTask *v5; // ebx@2
  _BYTE v6[20]; // ST14_20@6
  _BYTE v7[20]; // ST00_20@6
  int v8; // eax@6
  int v9; // ecx@6
  int v10; // eax@6
  int v11; // ecx@6
  char *v12; // eax@6
  char *v13; // eax@6
  MsgBox *v14; // eax@6
  HolyPromiseWin *v15; // ecx@6
  int v16; // ecx@7
  int v17; // esi@9
  NiPointer<MHDiceGameTask> result; // [sp+10h] [bp-30h]@1
  bool v20; // [sp+17h] [bp-29h]@1
  char acName[21]; // [sp+18h] [bp-28h]@6
  int v22; // [sp+3Ch] [bp-4h]@1

  v3 = this;
  v4 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  v22 = 0;
  v20 = MHDiceGameTask::IsDicegamePlaying(v4);
  v22 = -1;
  if ( result.m_pObject )
  {
    v5 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
  }
  if ( !v20 )
  {
    *(_DWORD *)v6 = *((_DWORD *)pvData + 5);
    *(_QWORD *)&v6[4] = *((_QWORD *)pvData + 3);
    *(_QWORD *)&v6[12] = *((_QWORD *)pvData + 4);
    *(_DWORD *)v7 = *(_DWORD *)pvData;
    *(_QWORD *)&v7[4] = *(_QWORD *)((char *)pvData + 4);
    *(_QWORD *)&v7[12] = *(_QWORD *)((char *)pvData + 12);
    HolyPromiseWin::SetID(v3->m_pkHolyPromiseWin, *(Name5 *)v7, *(Name5 *)v6);
    v8 = *(_DWORD *)pvData;
    v9 = *((_DWORD *)pvData + 1);
    *(_DWORD *)&acName[8] = *((_DWORD *)pvData + 2);
    *(_DWORD *)acName = v8;
    v10 = *((_DWORD *)pvData + 3);
    *(_DWORD *)&acName[4] = v9;
    v11 = *((_DWORD *)pvData + 4);
    *(_DWORD *)&acName[12] = v10;
    *(_DWORD *)&acName[16] = v11;
    acName[20] = 0;
    v12 = (char *)TextData::Get(0x37490F2Eu);
    v13 = fs(v12, acName);
    v14 = MsgBox::Modeless(MSGBOX_AGREEREFUSAL, v13);
    v15 = v3->m_pkHolyPromiseWin;
    if ( v15 )
      v16 = (int)&v15->vfptr;
    else
      v16 = 0;
    v17 = (int)&v14->vfptr;
    v14->vfptr->SetMsgHooker(&v14->vfptr, v16);
    (*(void (__thiscall **)(int, unsigned int))(*(_DWORD *)v17 + 8))(v17, v3->m_uiInsertNum);
    ++v3->m_uiInsertNum;
  }
  return iRevBytes;
}

//----- (004B3990) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_DEL_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  int v4; // ecx@2
  int v5; // edx@2
  char v6; // al@2
  int v7; // ecx@2
  const char *v8; // eax@8
  char *v9; // eax@3
  _BYTE v10[20]; // ST00_20@12
  char *v12; // [sp-4h] [bp-28h]@3
  char acName[21]; // [sp+8h] [bp-1Ch]@2

  v3 = this;
  if ( pvData )
  {
    v4 = *((_DWORD *)pvData + 1);
    v5 = *((_DWORD *)pvData + 2);
    *(_DWORD *)acName = *(_DWORD *)pvData;
    *(_DWORD *)&acName[12] = *((_DWORD *)pvData + 3);
    v6 = *((_BYTE *)pvData + 20);
    *(_DWORD *)&acName[4] = v4;
    v7 = *((_DWORD *)pvData + 4);
    *(_DWORD *)&acName[8] = v5;
    *(_DWORD *)&acName[16] = v7;
    acName[20] = 0;
    if ( v6 == 1 )
    {
      v12 = acName;
      v9 = (char *)TextData::Get(0x8CA78BD0);
    }
    else if ( v6 == 2 )
    {
      v12 = acName;
      v9 = (char *)TextData::Get(0xA4D5C7CF);
    }
    else
    {
      if ( v6 )
      {
LABEL_12:
        *(_DWORD *)v10 = *(_DWORD *)pvData;
        *(_QWORD *)&v10[4] = *(_QWORD *)((char *)pvData + 4);
        *(_QWORD *)&v10[12] = *(_QWORD *)((char *)pvData + 12);
        HolyPromiseWin::DelHolyPromise(v3->m_pkHolyPromiseWin, *(Name5 *)v10);
        return iRevBytes;
      }
      if ( Name5::operator==((Name5 *)pvData, &v3->m_pkHolyPromiseWin->m_kCHolyPromise.m_HolyPromisesUp.PromiseCharID) )
      {
        v8 = (const char *)TextData::Get(0xF3FCC131);
LABEL_11:
        GameFrameWork::AddSysMsg(v3, v8);
        goto LABEL_12;
      }
      v12 = acName;
      v9 = (char *)TextData::Get(0xDC481E32);
    }
    v8 = fs(v9, v12);
    goto LABEL_11;
  }
  return iRevBytes;
}

//----- (004B3A80) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_ADD_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  const char *v4; // eax@4
  int v6; // ecx@5
  int v7; // edx@5
  int v8; // ecx@5
  int v9; // edx@5
  char *v10; // eax@5
  const char *v11; // eax@5
  char acName[21]; // [sp+4h] [bp-1Ch]@5

  v3 = this;
  if ( pvData )
  {
    if ( *(_WORD *)pvData != 5952 && *(_WORD *)pvData != 5969 )
    {
      v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
      GameFrameWork::AddSysMsg(v3, v4);
      return iRevBytes;
    }
    HolyPromiseWin::AddPromise(this->m_pkHolyPromiseWin, (PROTO_HOLY_PROMISE_INFO *)((char *)pvData + 2));
    v6 = *(_DWORD *)((char *)pvData + 2);
    v7 = *(_DWORD *)((char *)pvData + 6);
    *(_DWORD *)&acName[8] = *(_DWORD *)((char *)pvData + 10);
    *(_DWORD *)acName = v6;
    v8 = *(_DWORD *)((char *)pvData + 14);
    *(_DWORD *)&acName[4] = v7;
    v9 = *(_DWORD *)((char *)pvData + 18);
    *(_DWORD *)&acName[12] = v8;
    *(_DWORD *)&acName[16] = v9;
    acName[20] = 0;
    v10 = (char *)TextData::Get(0x48497076u);
    v11 = fs(v10, acName);
    GameFrameWork::AddSysMsg(v3, v11);
  }
  return iRevBytes;
}

//----- (004B3B50) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_REWARD_ITEM_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  char *v3; // ebx@3
  int v4; // esi@4
  int v5; // edi@4
  int v6; // ecx@6
  int v7; // eax@7
  int v8; // eax@8
  int v9; // ST08_4@9
  int v10; // ST04_4@9
  char *v11; // eax@9
  const char *v12; // eax@9
  int v13; // ST08_4@10
  char *v14; // eax@10
  int i; // [sp+4h] [bp-8h]@2
  GameFrameWork *v17; // [sp+8h] [bp-4h]@1

  v17 = this;
  if ( pvData )
  {
    i = 0;
    if ( *(_BYTE *)pvData )
    {
      v3 = (char *)pvData + 3;
      do
      {
        v4 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
        v5 = *((_WORD *)v3 - 1);
        if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                              + 16))(
                                ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                                v5) )
        {
          if ( (unsigned __int16)v5 <= *(_WORD *)(v4 + 200) )
          {
            v6 = *(_DWORD *)(v4 + 196);
            if ( *(_DWORD *)(v6 + 4 * v5) )
            {
              v7 = *(_DWORD *)(v6 + 4 * v5);
              if ( v7 )
              {
                v8 = v7 + 34;
                if ( *(_WORD *)v3 )
                {
                  v9 = *(_WORD *)v3;
                  v10 = v8;
                  v11 = (char *)TextData::Get(0x900FB2E7);
                  v12 = fs(v11, v10, v9);
                }
                else
                {
                  v13 = v8;
                  v14 = (char *)TextData::Get(0x31BB639Bu);
                  v12 = fs(v14, v13);
                }
                GameFrameWork::AddSysMsg(v17, v12);
              }
            }
          }
        }
        v3 += 4;
        ++i;
      }
      while ( i < *(_BYTE *)pvData );
    }
  }
  return iRevBytes;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (004B3C30) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_REWARD_MONEY_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // edx@2
  unsigned int v4; // ecx@2
  unsigned int v5; // eax@2
  unsigned int v6; // ebx@2
  unsigned int v7; // esi@2
  __int64 v8; // rax@4
  int v9; // eax@4
  char v10; // cl@5
  NiUnsharedGeometryGroup *v11; // eax@6
  NiUnsharedGeometryGroup *v12; // edx@6
  char v13; // cl@7
  unsigned int v14; // eax@8
  char *v15; // edi@8
  char v16; // cl@9
  char *v17; // edi@10
  char v18; // al@11
  __int64 v19; // rax@14
  unsigned int v20; // eax@14
  char *v21; // edi@14
  char v22; // cl@15
  NiUnsharedGeometryGroup *v23; // eax@16
  NiUnsharedGeometryGroup *v24; // ecx@16
  char v25; // dl@17
  unsigned int v26; // eax@18
  NiUnsharedGeometryGroup *v27; // esi@18
  char *v28; // edi@18
  char v29; // cl@19
  char *v30; // edi@20
  char v31; // al@21
  __int64 v32; // rax@24
  unsigned int v33; // eax@24
  char *v34; // edi@24
  char v35; // cl@25
  NiUnsharedGeometryGroup *v36; // eax@26
  NiUnsharedGeometryGroup *v37; // ecx@26
  char v38; // dl@27
  unsigned int v39; // eax@28
  NiUnsharedGeometryGroup *v40; // esi@28
  char *v41; // edi@28
  char v42; // cl@29
  char *v43; // edi@30
  char v44; // al@31
  __int64 v45; // rax@34
  unsigned int v46; // eax@34
  char *v47; // edi@34
  char v48; // cl@35
  NiUnsharedGeometryGroup *v49; // eax@36
  NiUnsharedGeometryGroup *v50; // ecx@36
  char v51; // dl@37
  unsigned int v52; // eax@38
  NiUnsharedGeometryGroup *v53; // esi@38
  char *v54; // edi@38
  char v55; // cl@39
  char *v56; // edi@40
  char v57; // al@41
  char *v58; // eax@43
  const char *v59; // eax@43
  int result; // eax@43
  unsigned int Money_4; // [sp+4h] [bp-224h]@2
  GameFrameWork *v62; // [sp+8h] [bp-220h]@1
  char acStr1[256]; // [sp+Ch] [bp-21Ch]@3
  char acStr2[256]; // [sp+10Ch] [bp-11Ch]@3
  char acName[21]; // [sp+20Ch] [bp-1Ch]@2

  v62 = this;
  if ( pvData )
  {
    v3 = *((_DWORD *)pvData + 1);
    *(_DWORD *)acName = *(_DWORD *)pvData;
    *(_DWORD *)&acName[8] = *((_DWORD *)pvData + 2);
    *(_DWORD *)&acName[16] = *((_DWORD *)pvData + 4);
    v4 = *((_DWORD *)pvData + 5);
    *(_DWORD *)&acName[4] = v3;
    v5 = *((_DWORD *)pvData + 6);
    v6 = v4;
    v7 = *((_DWORD *)pvData + 6);
    *(_DWORD *)&acName[12] = *((_DWORD *)pvData + 3);
    acName[20] = 0;
    Money_4 = v5;
    if ( v5 | v4 )
    {
      memset(acStr1, 0, 0x100u);
      memset(acStr2, 0, 0x100u);
      if ( User::GetGem(__PAIR__(v7, v6)) )
      {
        v8 = User::GetGem(__PAIR__(v7, v6));
        sprintf(acStr1, "%I64d", v8);
        v9 = 0;
        do
        {
          v10 = acStr1[v9];
          acStr2[v9++] = v10;
        }
        while ( v10 );
        v11 = TextData::Get(0x475F9699u);
        v12 = v11;
        do
        {
          v13 = (char)v11->vfptr;
          v11 = (NiUnsharedGeometryGroup *)((char *)v11 + 1);
        }
        while ( v13 );
        v14 = (char *)v11 - (char *)v12;
        v15 = &acStr1[255];
        do
          v16 = (v15++)[1];
        while ( v16 );
        qmemcpy(v15, v12, v14);
        v17 = &acStr1[255];
        do
          v18 = (v17++)[1];
        while ( v18 );
        v7 = Money_4;
        *v17 = 0;
      }
      if ( User::GetGold(__PAIR__(v7, v6)) )
      {
        v19 = User::GetGold(__PAIR__(v7, v6));
        sprintf(acStr1, "%I64d", v19);
        v20 = strlen(acStr1) + 1;
        v21 = &acStr1[255];
        do
          v22 = (v21++)[1];
        while ( v22 );
        qmemcpy(v21, acStr1, v20);
        v23 = TextData::Get(0x47A395A3u);
        v24 = v23;
        do
        {
          v25 = (char)v23->vfptr;
          v23 = (NiUnsharedGeometryGroup *)((char *)v23 + 1);
        }
        while ( v25 );
        v26 = (char *)v23 - (char *)v24;
        v27 = v24;
        v28 = &acStr1[255];
        do
          v29 = (v28++)[1];
        while ( v29 );
        qmemcpy(v28, v27, v26);
        v30 = &acStr1[255];
        do
          v31 = (v30++)[1];
        while ( v31 );
        v7 = Money_4;
        *v30 = 0;
      }
      if ( User::GetSilver(__PAIR__(v7, v6)) )
      {
        v32 = User::GetSilver(__PAIR__(v7, v6));
        sprintf(acStr1, "%I64d", v32);
        v33 = strlen(acStr1) + 1;
        v34 = &acStr1[255];
        do
          v35 = (v34++)[1];
        while ( v35 );
        qmemcpy(v34, acStr1, v33);
        v36 = TextData::Get(0x98B595EF);
        v37 = v36;
        do
        {
          v38 = (char)v36->vfptr;
          v36 = (NiUnsharedGeometryGroup *)((char *)v36 + 1);
        }
        while ( v38 );
        v39 = (char *)v36 - (char *)v37;
        v40 = v37;
        v41 = &acStr1[255];
        do
          v42 = (v41++)[1];
        while ( v42 );
        qmemcpy(v41, v40, v39);
        v43 = &acStr1[255];
        do
          v44 = (v43++)[1];
        while ( v44 );
        v7 = Money_4;
        *v43 = 0;
      }
      if ( User::GetCopper(__PAIR__(v7, v6)) )
      {
        v45 = User::GetCopper(__PAIR__(v7, v6));
        sprintf(acStr1, "%I64d", v45);
        v46 = strlen(acStr1) + 1;
        v47 = &acStr1[255];
        do
          v48 = (v47++)[1];
        while ( v48 );
        qmemcpy(v47, acStr1, v46);
        v49 = TextData::Get(0x88AF99F5);
        v50 = v49;
        do
        {
          v51 = (char)v49->vfptr;
          v49 = (NiUnsharedGeometryGroup *)((char *)v49 + 1);
        }
        while ( v51 );
        v52 = (char *)v49 - (char *)v50;
        v53 = v50;
        v54 = &acStr1[255];
        do
          v55 = (v54++)[1];
        while ( v55 );
        qmemcpy(v54, v53, v52);
        v56 = &acStr1[255];
        do
          v57 = (v56++)[1];
        while ( v57 );
        *v56 = 0;
      }
      v58 = (char *)TextData::Get(0x8EB36C96);
      v59 = fs(v58, acName, acStr2);
      GameFrameWork::AddSysMsg(v62, v59);
      result = iRevBytes;
    }
    else
    {
      result = iRevBytes;
    }
  }
  else
  {
    result = iRevBytes;
  }
  return result;
}

//----- (004B4000) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_SET_UP_CONFIRM_ING(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  int v4; // edx@2
  int v5; // eax@2
  char *v6; // eax@2
  const char *v7; // eax@2
  char acName[21]; // [sp+4h] [bp-1Ch]@2

  v3 = this;
  if ( pvData )
  {
    v4 = *((_DWORD *)pvData + 1);
    *(_DWORD *)acName = *(_DWORD *)pvData;
    *(_DWORD *)&acName[8] = *((_DWORD *)pvData + 2);
    *(_DWORD *)&acName[4] = v4;
    v5 = *((_DWORD *)pvData + 4);
    *(_DWORD *)&acName[12] = *((_DWORD *)pvData + 3);
    *(_DWORD *)&acName[16] = v5;
    acName[20] = 0;
    v6 = (char *)TextData::Get(0xEAF2BFE1);
    v7 = fs(v6, acName);
    GameFrameWork::AddSysMsg(v3, v7);
  }
  return iRevBytes;
}

//----- (004B4080) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_REWARDINVENOPEN_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // ebx@1
  int v4; // edi@1
  InventoryWin *v5; // ecx@1
  char *v6; // esi@1
  char v7; // al@2
  MainMenuWin *v8; // ecx@2
  Item *v9; // eax@6
  Item *v10; // edi@6
  Item **v11; // ebx@7
  Item *v12; // esi@7
  char *pbyBuff; // [sp+Ch] [bp-10h]@7
  GameFrameWork *v15; // [sp+10h] [bp-Ch]@1
  ITEM_INVEN kInven; // [sp+14h] [bp-8h]@6
  unsigned int uiBufSize; // [sp+18h] [bp-4h]@1
  int bShow; // [sp+28h] [bp+Ch]@5

  v3 = this;
  v15 = this;
  Inventory::ClearRewardInv(&g_kInventory);
  v4 = *(_BYTE *)pvData;
  v5 = v3->m_pkInventoryWin;
  v6 = (char *)pvData + 1;
  uiBufSize = 0;
  if ( v4 )
  {
    InventoryWin::ShowRewardNewMark(v5, 1);
    v7 = InventoryWin::GetIsViewNewMark(v3->m_pkInventoryWin);
    v8 = v3->m_pkMainMenuWin;
    LOBYTE(pvData) = v7;
    if ( v8 )
      MainMenuWin::ShowNewMark(v8, (int)pvData);
    if ( v4 )
    {
      bShow = v4;
      do
      {
        v9 = Item::Create(v6, &kInven, &uiBufSize);
        v6 += uiBufSize;
        v10 = v9;
        if ( v9 )
        {
          v11 = (Item **)(4 * (kInven.Inven & 0x3FF) + 11111992);
          pbyBuff = v6;
          v12 = g_kInventory.m_aspRewardInv[kInven.Inven & 0x3FF].m_pObject;
          if ( v12 != v9 )
          {
            if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
              v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
            *v11 = v10;
            InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
          }
          ++g_kInventory.m_uiRewardCount;
          v3 = v15;
          v6 = pbyBuff;
        }
        --bShow;
      }
      while ( bShow );
    }
    v5 = v3->m_pkInventoryWin;
  }
  InventoryWin::RefreshCompensationInv(v5);
  return iRevBytes;
}

//----- (004B4170) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_GUILD_ACADEMY_REWARD_STORAGE_OPEN_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  int v4; // eax@1
  GuildAcademyItemRewardWin *v5; // eax@3
  int result; // eax@4
  int v7; // eax@8
  NiUnsharedGeometryGroup *v8; // eax@10

  v3 = this;
  v4 = *(_WORD *)pvData;
  if ( (_WORD)v4 != 6104 )
  {
    v7 = v4 - 6105;
    if ( v7 )
    {
      if ( v7 != 1 )
        return iRevBytes;
      v8 = TextData::Get(0x7290F5A0u);
    }
    else
    {
      v8 = TextData::Get(0x55985497u);
    }
    GameFrameWork::AddSysMsg(v3, (const char *)v8);
    return iRevBytes;
  }
  if ( GuildAcademyStorage::SetContents((PROTO_NC_GUILD_ACADEMY_REWARD_STORAGE_OPEN_ACK *)pvData) != 1 )
    return iRevBytes;
  v5 = GuildAcademyTask::GetGuildAcademyItemRewardWin();
  GuildAcademyItemRewardWin::On_GuildAcademyStorage_Cell_Changed(v5);
  if ( GuildAcademyTask::GetGuildAcademyItemRewardWin()->m_bFromReq )
  {
    GuildAcademyTask::GetGuildAcademyItemRewardWin()->m_bFromReq = 0;
    result = iRevBytes;
  }
  else if ( GuildAcademyTask::GetGuildAcademyMoneyRewardWin()->m_bFromReq )
  {
    GuildAcademyTask::GetGuildAcademyMoneyRewardWin()->m_bFromReq = 0;
    result = iRevBytes;
  }
  else
  {
    GameFrameWork::OnOpenGuildAcademyStorage(v3);
    result = iRevBytes;
  }
  return result;
}

//----- (004B4230) --------------------------------------------------------
void __thiscall GameFrameWork::NcChatRestrictAddReq(GameFrameWork *this, Name5 kCharID)
{
  GameFrameWork *v2; // esi@1
  ChatBlockListWin *v3; // ecx@1
  PgNet *v4; // ecx@2
  Name5 pCharID; // [sp+4h] [bp-30h]@1
  __int16 pdata; // [sp+18h] [bp-1Ch]@2
  PROTO_NC_CHAT_RESTRICT_ADD_REQ kProto; // [sp+1Ch] [bp-18h]@2

  v2 = this;
  v3 = this->m_pkChatBlockListWin;
  pCharID.n5_code[2] = kCharID.n5_code[2];
  *(_QWORD *)&pCharID.n5_name[0] = *(_QWORD *)&kCharID.n5_name[0];
  *(_QWORD *)&pCharID.n5_code[3] = *(_QWORD *)&kCharID.n5_code[3];
  if ( !CChatRestrict::Get(&v3->m_RestrictList, &pCharID) )
  {
    kProto.sChatRestrictCharID = kCharID;
    v4 = (PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr;
    pdata = -22525;
    PgNet::AddNetMsg(v4, &pdata, 2);
    PgNet::SendNetMsg((PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 20);
  }
}

//----- (004B42E0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAT_RESTRICT_ADD_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  __int16 v4; // ax@1
  char *v5; // eax@6
  const char *v7; // eax@7
  char acName[21]; // [sp+4h] [bp-1Ch]@6

  v3 = this;
  v4 = *(_WORD *)pvData;
  if ( *(_WORD *)pvData == 7171 || v4 == 7176 || v4 == 7172 || v4 == 7175 )
  {
    v7 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v7);
  }
  else if ( v4 == 7168 )
  {
    Name5::n_string((Name5 *)((char *)pvData + 2), acName);
    acName[20] = 0;
    v5 = (char *)TextData::Get(0x3E738588u);
    GameFrameWork::VaAddSysMsg(v3, v5, acName);
    CChatRestrict::Add(&v3->m_pkChatBlockListWin->m_RestrictList, (PROTO_CHAT_RESTRICT_INFO *)((char *)pvData + 2));
    GameFrameWork::UpdateChatBlockListWin(v3);
    return iRevBytes;
  }
  return iRevBytes;
}

//----- (004B43B0) --------------------------------------------------------
void __thiscall GameFrameWork::NcChatRestrictBlockDelReq(GameFrameWork *this, Name5 kCharID)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  __int16 pdata; // [sp+4h] [bp-1Ch]@1
  PROTO_NC_CHAT_RESTRICT_DEL_REQ kProto; // [sp+8h] [bp-18h]@1

  v2 = this;
  kProto.sChatRestrictCharID = kCharID;
  v3 = this->m_spWorldMgrNet.m_pObject;
  pdata = -22521;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 20);
}

//----- (004B4420) --------------------------------------------------------
int __thiscall GameFrameWork::ON_NC_KQ_NOREWARD_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData == 4356 )
  {
    v4 = TextData2::Get(0x6415E9Cu);
    GameFrameWork::AddSysMsg(v3, (const char *)v4);
  }
  return iRevBytes;
}

//----- (004B4450) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_GET_CEN_REWARD_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  int result; // eax@2
  char *v5; // ST0C_4@3
  char *v6; // eax@3

  v3 = this;
  if ( *(_WORD *)pvData == 7264 )
  {
    v5 = (char *)TextData2::Get(0xD60A0715);
    v6 = (char *)TextData2::Get(0x598881B7u);
    GameFrameWork::OnOpenHolyRewardMoneyWin(v3, 0, 1u, v6, v5);
    HolyRewardMoneyWin::SetAmout(v3->m_pkHolyRewardMoneyWin, *(_QWORD *)((char *)pvData + 2));
    result = iRevBytes;
  }
  else
  {
    NpcDialogWin::OpenNpcNormalDialog(this->m_pkNpcDlgWin, 89, 1u);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkNpcDlgWin->vfptr);
    result = iRevBytes;
    v3->m_pkNpcDlgWin->m_bHold = 0;
  }
  return result;
}

//----- (004B44E0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_WITHDRAW_CEN_REWARD_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData == 7272 )
  {
    v4 = TextData2::Get(0x163D3E3Cu);
    GameFrameWork::AddSysMsg(v3, (const char *)v4);
  }
  return iRevBytes;
}

//----- (004B4510) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_HOLY_PROMISE_CLIENT_GET_REMAIN_MONEY_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // ebx@1
  unsigned int v4; // esi@1
  GameFrameWork *v5; // edi@1
  int v6; // ST1C_4@4
  char *v7; // eax@4
  const char *v8; // eax@4
  __int64 v9; // rax@5
  int v10; // eax@5
  char v11; // cl@6
  NiUnsharedGeometryGroup *v12; // eax@7
  NiUnsharedGeometryGroup *v13; // edx@7
  char v14; // cl@8
  unsigned int v15; // eax@9
  char *v16; // edi@9
  char v17; // cl@10
  char *v18; // edi@11
  char v19; // al@12
  __int64 v20; // rax@15
  unsigned int v21; // eax@15
  char *v22; // edi@15
  char v23; // cl@16
  NiUnsharedGeometryGroup *v24; // eax@17
  NiUnsharedGeometryGroup *v25; // ecx@17
  char v26; // dl@18
  unsigned int v27; // eax@19
  NiUnsharedGeometryGroup *v28; // esi@19
  char *v29; // edi@19
  char v30; // cl@20
  char *v31; // edi@21
  char v32; // al@22
  __int64 v33; // rax@25
  unsigned int v34; // eax@25
  char *v35; // edi@25
  char v36; // cl@26
  NiUnsharedGeometryGroup *v37; // eax@27
  NiUnsharedGeometryGroup *v38; // ecx@27
  char v39; // dl@28
  unsigned int v40; // eax@29
  NiUnsharedGeometryGroup *v41; // esi@29
  char *v42; // edi@29
  char v43; // cl@30
  char *v44; // edi@31
  char v45; // al@32
  __int64 v46; // rax@35
  unsigned int v47; // eax@35
  char *v48; // edi@35
  char v49; // cl@36
  NiUnsharedGeometryGroup *v50; // eax@37
  NiUnsharedGeometryGroup *v51; // ecx@37
  char v52; // dl@38
  unsigned int v53; // eax@39
  NiUnsharedGeometryGroup *v54; // esi@39
  char *v55; // edi@39
  char v56; // cl@40
  char *v57; // edi@41
  char v58; // al@42
  char *v59; // eax@44
  const char *v60; // eax@44
  NiUnsharedGeometryGroup *v61; // eax@44
  GameFrameWork *v63; // [sp+Ch] [bp-210h]@1
  unsigned int Money; // [sp+10h] [bp-20Ch]@1
  char acStr1[256]; // [sp+18h] [bp-204h]@4
  char acStr2[256]; // [sp+118h] [bp-104h]@4

  v3 = *((_DWORD *)pvData + 1);
  v4 = *(_DWORD *)pvData;
  v5 = this;
  v63 = this;
  Money = *(_DWORD *)pvData;
  if ( v3 >= 0 && (v3 > 0 || v4) )
  {
    v6 = ((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)();
    v7 = (char *)TextData2::Get(0xA5E72706);
    v8 = fs(v7, v6);
    GameFrameWork::AddSysMsg(v5, v8);
    memset(acStr1, 0, 0x100u);
    memset(acStr2, 0, 0x100u);
    if ( User::GetGem(__PAIR__(v3, v4)) )
    {
      v9 = User::GetGem(__PAIR__(v3, v4));
      sprintf(acStr1, "%I64d", v9);
      v10 = 0;
      do
      {
        v11 = acStr1[v10];
        acStr2[v10++] = v11;
      }
      while ( v11 );
      v12 = TextData::Get(0x475F9699u);
      v13 = v12;
      do
      {
        v14 = (char)v12->vfptr;
        v12 = (NiUnsharedGeometryGroup *)((char *)v12 + 1);
      }
      while ( v14 );
      v15 = (char *)v12 - (char *)v13;
      v16 = &acStr1[255];
      do
        v17 = (v16++)[1];
      while ( v17 );
      qmemcpy(v16, v13, v15);
      v18 = &acStr1[255];
      do
        v19 = (v18++)[1];
      while ( v19 );
      v4 = Money;
      *v18 = 0;
    }
    if ( User::GetGold(__PAIR__(v3, v4)) )
    {
      v20 = User::GetGold(__PAIR__(v3, v4));
      sprintf(acStr1, "%I64d", v20);
      v21 = strlen(acStr1) + 1;
      v22 = &acStr1[255];
      do
        v23 = (v22++)[1];
      while ( v23 );
      qmemcpy(v22, acStr1, v21);
      v24 = TextData::Get(0x47A395A3u);
      v25 = v24;
      do
      {
        v26 = (char)v24->vfptr;
        v24 = (NiUnsharedGeometryGroup *)((char *)v24 + 1);
      }
      while ( v26 );
      v27 = (char *)v24 - (char *)v25;
      v28 = v25;
      v29 = &acStr1[255];
      do
        v30 = (v29++)[1];
      while ( v30 );
      qmemcpy(v29, v28, v27);
      v31 = &acStr1[255];
      do
        v32 = (v31++)[1];
      while ( v32 );
      v4 = Money;
      *v31 = 0;
    }
    if ( User::GetSilver(__PAIR__(v3, v4)) )
    {
      v33 = User::GetSilver(__PAIR__(v3, v4));
      sprintf(acStr1, "%I64d", v33);
      v34 = strlen(acStr1) + 1;
      v35 = &acStr1[255];
      do
        v36 = (v35++)[1];
      while ( v36 );
      qmemcpy(v35, acStr1, v34);
      v37 = TextData::Get(0x98B595EF);
      v38 = v37;
      do
      {
        v39 = (char)v37->vfptr;
        v37 = (NiUnsharedGeometryGroup *)((char *)v37 + 1);
      }
      while ( v39 );
      v40 = (char *)v37 - (char *)v38;
      v41 = v38;
      v42 = &acStr1[255];
      do
        v43 = (v42++)[1];
      while ( v43 );
      qmemcpy(v42, v41, v40);
      v44 = &acStr1[255];
      do
        v45 = (v44++)[1];
      while ( v45 );
      v4 = Money;
      *v44 = 0;
    }
    if ( User::GetCopper(__PAIR__(v3, v4)) )
    {
      v46 = User::GetCopper(__PAIR__(v3, v4));
      sprintf(acStr1, "%I64d", v46);
      v47 = strlen(acStr1) + 1;
      v48 = &acStr1[255];
      do
        v49 = (v48++)[1];
      while ( v49 );
      qmemcpy(v48, acStr1, v47);
      v50 = TextData::Get(0x88AF99F5);
      v51 = v50;
      do
      {
        v52 = (char)v50->vfptr;
        v50 = (NiUnsharedGeometryGroup *)((char *)v50 + 1);
      }
      while ( v52 );
      v53 = (char *)v50 - (char *)v51;
      v54 = v51;
      v55 = &acStr1[255];
      do
        v56 = (v55++)[1];
      while ( v56 );
      qmemcpy(v55, v54, v53);
      v57 = &acStr1[255];
      do
        v58 = (v57++)[1];
      while ( v58 );
      *v57 = 0;
    }
    v59 = (char *)TextData2::Get(0x6E819FB1u);
    v60 = fs(v59, acStr2);
    GameFrameWork::AddSysMsg(v63, v60);
    v61 = TextData2::Get(0x850799A6);
    GameFrameWork::AddSysMsg(v63, (const char *)v61);
  }
  return iRevBytes;
}

//----- (004B48D0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_ABSTATE_ERASE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  __int16 v3; // ax@1
  GameFrameWork *v4; // esi@1
  NiUnsharedGeometryGroup *v5; // eax@3

  v3 = *(_WORD *)pvData;
  v4 = this;
  if ( *(_WORD *)pvData != 7280 )
  {
    if ( v3 == 7281 )
    {
      v5 = TextData2::Get(0xE72A517C);
LABEL_6:
      GameFrameWork::AddSysMsg(v4, (const char *)v5);
      return iRevBytes;
    }
    if ( v3 == 7282 )
    {
      v5 = TextData2::Get(0x9FEDBEC2);
      goto LABEL_6;
    }
  }
  return iRevBytes;
}

//----- (004B4920) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_CLIENT_AUTO_PICK_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  char v4; // bl@2
  NiUnsharedGeometryGroup *v5; // eax@4
  InventoryWin *v6; // ecx@5
  InventoryWin *v7; // ecx@6
  bool v8; // al@8
  int result; // eax@11
  NiUnsharedGeometryGroup *v10; // eax@14

  v3 = this;
  if ( *(_WORD *)pvData == 7680 )
  {
    Char::SetItemAutoPickState(g_pkMainChar, (int)pvData, *((_BYTE *)pvData + 2) != 0);
    v4 = 0;
    if ( !*((_BYTE *)pvData + 2) && g_pkMainChar->m_bWaitingAckWhenInvenFull )
    {
      g_pkMainChar->m_bWaitingAckWhenInvenFull = 0;
      v5 = TextData2::Get(0xAFF3D4F6);
      GameFrameWork::AddSysMsg(v3, (const char *)v5);
      v4 = 1;
    }
    v6 = v3->m_pkInventoryWin;
    if ( !v6 )
      return iRevBytes;
    InventoryWin::OnAutoPickShow(v6);
    InventoryWin::SetAutoPickMinimon(v3->m_pkInventoryWin, 1);
    v7 = v3->m_pkInventoryWin;
    if ( v7->m_bAutoPickEnable )
    {
      if ( v4 )
        v8 = 0;
      else
        v8 = Inventory::IsFull(&g_kInventory) == 0;
      InventoryWin::SetAutoPickCheck(v3->m_pkInventoryWin, *((_BYTE *)pvData + 2) != 0, v8);
      return iRevBytes;
    }
    InventoryWin::SetAutoPickCheck(v7, *((_BYTE *)pvData + 2) != 0, 1);
    result = iRevBytes;
  }
  else
  {
    if ( *(_WORD *)pvData != 7681 )
      return iRevBytes;
    v10 = TextData2::Get(0x275D786Cu);
    GameFrameWork::AddSysMsg(v3, (const char *)v10);
    result = iRevBytes;
  }
  return result;
}

//----- (004B4A30) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MISC_MISCERROR_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData == 4052 )
  {
    v4 = TextData2::Get(0xB4B3476u);
    GameFrameWork::AddSysMsg(v3, (const char *)v4);
  }
  return iRevBytes;
}

//----- (004B4A60) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MAP_LINK_FAIL_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@2

  v3 = this;
  if ( (unsigned int)*(_WORD *)pvData - 7745 <= 1 )
  {
    v4 = TextData2::Get(0x35AC8487u);
    GameFrameWork::AddSysMsg(v3, (const char *)v4);
  }
  return iRevBytes;
}

//----- (004B4AA0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_MAKE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@2
  NiUnsharedGeometryGroup *v5; // eax@2
  int result; // eax@2
  const char *v7; // eax@3

  v3 = this;
  if ( *((_WORD *)pvData + 1) == 7808 )
  {
    v4 = TextData2::Get(0x4580777Eu);
    GameFrameWork::AddSysMsg(v3, (const char *)v4);
    v5 = TextData2::Get(0x95C5C4E0);
    GameFrameWork::AddSysMsg(v3, (const char *)v5);
    result = iRevBytes;
  }
  else
  {
    v7 = ErrMsgTable::GetErrMsg(*((_WORD *)pvData + 1));
    GameFrameWork::AddSysMsg(v3, v7);
    result = iRevBytes;
  }
  return result;
}

//----- (004B4B10) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_MAKE_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  Name5 *v4; // eax@1
  NiUnsharedGeometryGroup *v5; // eax@1
  char *v6; // eax@1
  const char *v7; // eax@1
  Name5 *v8; // eax@4
  _BYTE v9[20]; // ST00_20@4
  Name5 *v10; // eax@4
  _BYTE v11[20]; // ST00_20@4
  unsigned int v12; // edx@5
  unsigned int v13; // esi@5
  RaidMemberInfo *v14; // eax@6
  Name5 result; // [sp+8h] [bp-30h]@1
  char acPartyMaster[21]; // [sp+1Ch] [bp-1Ch]@1

  v3 = this;
  v4 = Party::GetPartyMasterID(&g_kParty, &result);
  *(_DWORD *)acPartyMaster = v4->n5_code[0];
  *(_DWORD *)&acPartyMaster[4] = v4->n5_code[1];
  *(_DWORD *)&acPartyMaster[8] = v4->n5_code[2];
  *(_DWORD *)&acPartyMaster[12] = v4->n5_code[3];
  *(_DWORD *)&acPartyMaster[16] = v4->n5_code[4];
  acPartyMaster[20] = 0;
  v5 = TextData2::Get(0x41766A8Bu);
  GameFrameWork::AddSysMsg(v3, (const char *)v5);
  v6 = (char *)TextData2::Get(0x460A1735u);
  v7 = fs(v6, acPartyMaster);
  GameFrameWork::AddSysMsg(v3, v7);
  if ( !RaidInfo::IsMeRaidMember(&g_kRaidinfo) )
    MiniMapWin::ClearRaidMember(v3->m_pkMiniMapWin);
  if ( g_kParty.m_uiTotalMember )
  {
    v8 = Party::GetPartyMasterID(&g_kParty, &result);
    *(_DWORD *)v9 = v8->n5_code[0];
    *(_QWORD *)&v9[4] = *(_QWORD *)&v8->n5_code[1];
    *(_QWORD *)&v9[12] = *(_QWORD *)&v8->n5_code[3];
    RaidInfo::ChangeRaidLeader(&g_kRaidinfo, *(Name5 *)v9);
    v10 = Party::GetPartyMasterID(&g_kParty, &result);
    *(_DWORD *)v11 = v10->n5_code[0];
    *(_QWORD *)&v11[4] = *(_QWORD *)&v10->n5_code[1];
    *(_QWORD *)&v11[12] = *(_QWORD *)&v10->n5_code[3];
    RaidInfo::ChangeRaidLooter(&g_kRaidinfo, *(Name5 *)v11);
  }
  RaidInfo::ConvertPartyToRaid(&g_kRaidinfo, (PROTO_NC_RAID_MAKE_BROAD_CMD *)pvData);
  MiniMapWin::ClearParty(v3->m_pkMiniMapWin);
  v12 = (signed int)((unsigned __int64)(2021161081i64
                                      * (unsigned int)((char *)g_kRaidinfo.m_MemberInfo[0]._Mylast
                                                     - (char *)g_kRaidinfo.m_MemberInfo[0]._Myfirst)) >> 32) >> 5;
  v13 = 0;
  if ( v12 + (v12 >> 31) )
  {
    do
    {
      v14 = RaidInfo::GetRaidMemberInfoByIndex(&g_kRaidinfo, v13);
      if ( v14 )
        MiniMapWin::AddRaidMember(v3->m_pkMiniMapWin, v14);
      ++v13;
    }
    while ( v13 < g_kRaidinfo.m_MemberInfo[0]._Mylast - g_kRaidinfo.m_MemberInfo[0]._Myfirst );
  }
  return iRevBytes;
}

//----- (004B4CC0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_DISMISS_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@1
  unsigned int v5; // ebx@1
  ExpeditionPartyWin **v6; // eax@1
  ExpeditionPartyWin *v7; // edi@2
  unsigned int v8; // esi@3
  ExpeditionWin *v9; // ecx@7
  PgWin **v10; // ebx@9
  unsigned int v11; // esi@9
  PgWin *v12; // edi@10
  int v14; // [sp+Ch] [bp-Ch]@1
  GameFrameWork *v15; // [sp+10h] [bp-8h]@1
  int v16; // [sp+14h] [bp-4h]@1

  v3 = this;
  v15 = this;
  Party::Clear(&g_kParty);
  MiniMapWin::ClearRaidMember(v3->m_pkMiniMapWin);
  v4 = TextData2::Get(0x9780657F);
  GameFrameWork::AddSysMsg(v3, (const char *)v4);
  v5 = 0;
  v6 = v3->m_pkExpeditionPartyWin;
  v14 = (int)v3->m_pkExpeditionPartyWin;
  v16 = (int)v3->m_pkExpeditionPartyWin;
  do
  {
    v7 = *v6;
    if ( *v6 )
    {
      v8 = 0;
      do
        ExpeditionPartyWin::SetOption(v7, v8++, 0);
      while ( v8 < 5 );
      v3 = v15;
    }
    ++v5;
    v6 = (ExpeditionPartyWin **)(v16 + 4);
    v16 += 4;
  }
  while ( v5 < 4 );
  v9 = v3->m_pkExpeditionWin;
  if ( v9 )
  {
    ExpeditionWin::SetLootingType(v9, 0);
    ExpeditionWin::SetItemGrade(v3->m_pkExpeditionWin, 0);
  }
  v10 = (PgWin **)v14;
  v11 = 0;
  do
  {
    v12 = *v10;
    if ( (unsigned __int8)((int (__thiscall *)(PgWin *))v12->vfptr[65].__vecDelDtor)(v12) )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, v12);
    ++v11;
    ++v10;
  }
  while ( v11 < 4 );
  RaidInfo::ClearRaidInfo(&g_kRaidinfo);
  return iRevBytes;
}

//----- (004B4DA0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_LOOTING_TYPE_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  ExpeditionWin *v4; // ecx@1
  NiUnsharedGeometryGroup *v5; // eax@4
  char *v6; // edx@4
  char v7; // cl@5
  NiUnsharedGeometryGroup *v8; // eax@7
  char *v9; // edx@7
  char v10; // cl@8
  NiUnsharedGeometryGroup *v11; // eax@10
  char *v12; // edx@10
  char v13; // cl@11
  NiUnsharedGeometryGroup *v14; // eax@13
  char *v15; // edx@13
  char v16; // cl@14
  NiUnsharedGeometryGroup *v17; // ST04_4@17
  NiUnsharedGeometryGroup *v18; // ST04_4@18
  NiUnsharedGeometryGroup *v19; // eax@16
  const char *v20; // eax@17
  char acstr[512]; // [sp+8h] [bp-204h]@3

  v3 = this;
  RaidInfo::SetItemLootingType(&g_kRaidinfo, *(_BYTE *)pvData, *((_BYTE *)pvData + 1));
  v4 = v3->m_pkExpeditionWin;
  if ( v4 )
  {
    ExpeditionWin::SetLootingType(v4, *((_BYTE *)pvData + 1));
    ExpeditionWin::SetItemGrade(v3->m_pkExpeditionWin, *(_BYTE *)pvData);
  }
  acstr[0] = 0;
  memset(&acstr[1], 0, 0x1FFu);
  switch ( *((_BYTE *)pvData + 1) )
  {
    case 0:
      v5 = TextData2::Get(0xA17ED0D6);
      v6 = (char *)(acstr - (char *)v5);
      do
      {
        v7 = (char)v5->vfptr;
        *((_BYTE *)&v5->vfptr + (_DWORD)v6) = v5->vfptr;
        v5 = (NiUnsharedGeometryGroup *)((char *)v5 + 1);
      }
      while ( v7 );
      break;
    case 1:
      v8 = TextData2::Get(0x2E192136u);
      v9 = (char *)(acstr - (char *)v8);
      do
      {
        v10 = (char)v8->vfptr;
        *((_BYTE *)&v8->vfptr + (_DWORD)v9) = v8->vfptr;
        v8 = (NiUnsharedGeometryGroup *)((char *)v8 + 1);
      }
      while ( v10 );
      break;
    case 2:
      v11 = TextData2::Get(0x32182919u);
      v12 = (char *)(acstr - (char *)v11);
      do
      {
        v13 = (char)v11->vfptr;
        *((_BYTE *)&v11->vfptr + (_DWORD)v12) = v11->vfptr;
        v11 = (NiUnsharedGeometryGroup *)((char *)v11 + 1);
      }
      while ( v13 );
      break;
    case 3:
      v14 = TextData2::Get(0xAAE9C321);
      v15 = (char *)(acstr - (char *)v14);
      do
      {
        v16 = (char)v14->vfptr;
        *((_BYTE *)&v14->vfptr + (_DWORD)v15) = v14->vfptr;
        v14 = (NiUnsharedGeometryGroup *)((char *)v14 + 1);
      }
      while ( v16 );
      break;
    default:
      break;
  }
  switch ( *(_BYTE *)pvData )
  {
    case 0:
      v19 = TextData3::Get(0xD77667Au);
      goto LABEL_20;
    case 1:
      v17 = TextData3::Get(0xD78667Au);
      v20 = fs(acstr, v17);
      goto LABEL_21;
    case 2:
      v18 = TextData3::Get(0xD79667Au);
      v20 = fs(acstr, v18);
      goto LABEL_21;
    case 3:
      v19 = TextData3::Get(0xD7A667Au);
LABEL_20:
      v20 = fs(acstr, v19);
LABEL_21:
      GameFrameWork::AddSysMsg(v3, v20);
      break;
    default:
      return iRevBytes;
  }
  return iRevBytes;
}

//----- (004B4F40) --------------------------------------------------------
void __thiscall GameFrameWork::NcRaidInvitationReq(GameFrameWork *this, Name5 kCharID)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  __int16 pdata; // [sp+4h] [bp-1Ch]@1
  PROTO_NC_RAID_INVITATION_REQ kProto; // [sp+8h] [bp-18h]@1

  v2 = this;
  kProto.sInvitationCharID = kCharID;
  v3 = this->m_spWorldMgrNet.m_pObject;
  pdata = -20468;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 20);
}

//----- (004B4FB0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_INVITATION_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  __int16 v4; // cx@1
  int v5; // edx@3
  int v6; // ecx@3
  int v7; // edx@3
  int v8; // ecx@3
  int v9; // edx@3
  _BYTE v10[20]; // ST00_20@3
  const char *v11; // eax@4
  char *v12; // eax@5
  int v13; // edx@8
  int v14; // eax@8
  char *v16; // [sp-4h] [bp-24h]@5
  char acstr[21]; // [sp+4h] [bp-1Ch]@3

  v3 = this;
  v4 = *((_WORD *)pvData + 10);
  if ( v4 != 7808 )
  {
    if ( v4 == 7880 )
    {
      v5 = *((_DWORD *)pvData + 1);
      *(_DWORD *)acstr = *(_DWORD *)pvData;
      v6 = *((_DWORD *)pvData + 2);
      *(_DWORD *)&acstr[4] = v5;
      v7 = *((_DWORD *)pvData + 3);
      *(_DWORD *)&acstr[8] = v6;
      v8 = *((_DWORD *)pvData + 4);
      *(_DWORD *)&acstr[12] = v7;
      v9 = *(_DWORD *)pvData;
      *(_DWORD *)&acstr[16] = v8;
      *(_DWORD *)v10 = v9;
      *(_QWORD *)&v10[4] = *(_QWORD *)((char *)pvData + 4);
      *(_QWORD *)&v10[12] = *(_QWORD *)((char *)pvData + 12);
      acstr[20] = 0;
      if ( RaidInfo::GetRaidMemberInfo(&g_kRaidinfo, *(Name5 *)v10) )
      {
        v11 = (const char *)TextData2::Get(0x314410EFu);
LABEL_12:
        GameFrameWork::AddSysMsg(v3, v11);
        return iRevBytes;
      }
      v16 = acstr;
      v12 = (char *)TextData2::Get(0x7CF3EBDAu);
    }
    else
    {
      if ( v4 != 7879 )
      {
        if ( v4 == 7892 )
          v11 = (const char *)TextData3::Get(0xE5F2E201);
        else
          v11 = ErrMsgTable::GetErrMsg(*((_WORD *)pvData + 10));
        goto LABEL_12;
      }
      v13 = *((_DWORD *)pvData + 1);
      *(_DWORD *)acstr = *(_DWORD *)pvData;
      *(_DWORD *)&acstr[8] = *((_DWORD *)pvData + 2);
      *(_DWORD *)&acstr[4] = v13;
      v14 = *((_DWORD *)pvData + 4);
      v16 = acstr;
      *(_DWORD *)&acstr[12] = *((_DWORD *)pvData + 3);
      *(_DWORD *)&acstr[16] = v14;
      acstr[20] = 0;
      v12 = (char *)TextData2::Get(0xC1FC2214);
    }
    v11 = fs(v12, v16);
    goto LABEL_12;
  }
  return iRevBytes;
}

//----- (004B50D0) --------------------------------------------------------
void __thiscall GameFrameWork::NcRaidInvitationAnswerReq(GameFrameWork *this, char bIsAllow)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  __int16 pdata; // [sp+4h] [bp-20h]@1
  PROTO_NC_RAID_INVITATION_ANSWER_REQ kProto; // [sp+8h] [bp-1Ch]@1

  v2 = this;
  *(_QWORD *)&kProto.sMasterCharID.n5_name[0] = *(_QWORD *)&g_kRaidinfo.m_kJoinProposeCharID.n5_name[0];
  kProto.bIsAllow = bIsAllow;
  *(_QWORD *)&kProto.sMasterCharID.n5_code[2] = *(_QWORD *)&g_kRaidinfo.m_kJoinProposeCharID.n5_code[2];
  v3 = this->m_spWorldMgrNet.m_pObject;
  kProto.sMasterCharID.n5_code[4] = g_kRaidinfo.m_kJoinProposeCharID.n5_code[4];
  pdata = -20465;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 21);
}

//----- (004B5160) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_INVITATION_ANSWER_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  bool v3; // zf@1
  int v4; // edx@1
  GameFrameWork *v5; // esi@1
  int v6; // ecx@1
  int v7; // edx@1
  int v8; // ecx@1
  char *v9; // eax@2
  const char *v10; // eax@2
  char acstr[21]; // [sp+4h] [bp-1Ch]@1

  v3 = *((_BYTE *)pvData + 20) == 0;
  v4 = *((_DWORD *)pvData + 1);
  v5 = this;
  *(_DWORD *)acstr = *(_DWORD *)pvData;
  v6 = *((_DWORD *)pvData + 2);
  *(_DWORD *)&acstr[4] = v4;
  v7 = *((_DWORD *)pvData + 3);
  *(_DWORD *)&acstr[8] = v6;
  v8 = *((_DWORD *)pvData + 4);
  *(_DWORD *)&acstr[12] = v7;
  *(_DWORD *)&acstr[16] = v8;
  acstr[20] = 0;
  if ( v3 )
  {
    v9 = (char *)TextData2::Get(0x756D5FCFu);
    v10 = fs(v9, acstr);
    GameFrameWork::AddSysMsg(v5, v10);
  }
  return iRevBytes;
}

//----- (004B51E0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_MEMBER_JOIN_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // ebx@1
  Name5 *v4; // eax@1
  int v5; // edx@6
  int v6; // eax@6
  int v7; // edx@6
  int v8; // eax@6
  char *v9; // eax@6
  const char *v10; // eax@6
  unsigned int v11; // eax@6
  ExpeditionPartyWin *v12; // eax@7
  _BYTE v13[20]; // ST00_20@9
  RaidMemberInfo *v14; // eax@9
  Name5 *v15; // eax@12
  _BYTE v16[20]; // ST00_20@14
  unsigned int v17; // ecx@15
  unsigned int v18; // edx@15
  unsigned int v19; // eax@15
  unsigned int v20; // ecx@15
  PartyWinInterface *v21; // ecx@16
  PROTO_NC_PARTY_JOIN_ACK kProto; // [sp+Ch] [bp-34h]@13
  char acstr[21]; // [sp+24h] [bp-1Ch]@6

  v3 = this;
  v4 = User::GetMainCharID(&g_kUser);
  if ( *((_DWORD *)pvData + 1) != v4->n5_code[0]
    || *((_DWORD *)pvData + 2) != v4->n5_code[1]
    || *((_DWORD *)pvData + 3) != v4->n5_code[2]
    || *((_DWORD *)pvData + 4) != v4->n5_code[3]
    || *((_DWORD *)pvData + 5) != v4->n5_code[4] )
  {
    v5 = *((_DWORD *)pvData + 1);
    v6 = *((_DWORD *)pvData + 2);
    *(_DWORD *)&acstr[8] = *((_DWORD *)pvData + 3);
    *(_DWORD *)acstr = v5;
    v7 = *((_DWORD *)pvData + 4);
    *(_DWORD *)&acstr[4] = v6;
    v8 = *((_DWORD *)pvData + 5);
    *(_DWORD *)&acstr[12] = v7;
    *(_DWORD *)&acstr[16] = v8;
    acstr[20] = 0;
    v9 = (char *)TextData2::Get(0xEADA1719);
    v10 = fs(v9, acstr);
    GameFrameWork::AddSysMsg(v3, v10);
    v11 = *((_BYTE *)pvData + 2);
    if ( v11 < 4 )
    {
      v12 = v3->m_pkExpeditionPartyWin[v11];
      if ( v12 )
        ExpeditionPartyWin::SetOption(v12, *((_BYTE *)pvData + 3), 0);
    }
    RaidInfo::AddMember(&g_kRaidinfo, (PROTO_NC_RAID_MEMBER_JOIN_BROAD_CMD *)pvData);
    *(_DWORD *)v13 = *((_DWORD *)pvData + 1);
    *(_QWORD *)&v13[4] = *((_QWORD *)pvData + 1);
    *(_QWORD *)&v13[12] = *((_QWORD *)pvData + 2);
    v14 = RaidInfo::GetRaidMemberInfo(&g_kRaidinfo, *(Name5 *)v13);
    if ( v14 )
      MiniMapWin::AddRaidMember(v3->m_pkMiniMapWin, v14);
    if ( *((_BYTE *)pvData + 2) == g_kRaidinfo.m_uiMePartyIdx )
    {
      v15 = User::GetMainCharID(&g_kUser);
      if ( Name5::operator!=((Name5 *)((char *)pvData + 4), v15) )
      {
        *(_QWORD *)&kProto.memberid.n5_code[3] = 0i64;
        *(_QWORD *)&kProto.memberid.n5_code[1] = 0i64;
        kProto.memberid.n5_code[0] = 0;
        strncpy(kProto.memberid.n5_name, &byte_981E2A, 0x14u);
        if ( Name5::operator!=((Name5 *)((char *)pvData + 4), &kProto.memberid) )
        {
          *(_DWORD *)v16 = *((_DWORD *)pvData + 1);
          *(_QWORD *)&v16[4] = *((_QWORD *)pvData + 1);
          *(_QWORD *)&v16[12] = *((_QWORD *)pvData + 2);
          if ( !Party::GetMemberInfo(&g_kParty, *(Name5 *)v16) )
          {
            v17 = *((_DWORD *)pvData + 2);
            v18 = *((_DWORD *)pvData + 3);
            kProto.charclass = 0;
            v19 = *((_DWORD *)pvData + 1);
            *(_QWORD *)&kProto.memberid.n5_code[1] = __PAIR__(v18, v17);
            v20 = *((_DWORD *)pvData + 5);
            kProto.memberid.n5_code[0] = v19;
            *(_QWORD *)&kProto.memberid.n5_code[3] = __PAIR__(v20, *((_DWORD *)pvData + 4));
            Party::AddMember(&g_kParty, &kProto);
          }
        }
      }
    }
  }
  v21 = v3->m_pkPartyWinInterface;
  if ( v21 )
    PartyWinInterface::Update(v21);
  return iRevBytes;
}

//----- (004B53C0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_LEAVE_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  Name5 *v4; // eax@1
  ExpeditionPartyWin **v5; // edi@6
  unsigned int v6; // ebx@6
  ExpeditionPartyWin *v7; // edi@7
  unsigned int v8; // esi@8
  PgWin **v9; // ebx@11
  unsigned int v10; // esi@11
  PgWin *v11; // edi@12
  ExpeditionWin *v12; // ecx@15
  NiUnsharedGeometryGroup *v13; // eax@17
  _BYTE v14[20]; // ST08_20@18
  RaidMemberInfo *v15; // eax@18
  _BYTE v16[20]; // ST00_20@20
  unsigned int v17; // ecx@20
  char *v18; // eax@20
  PgWin *v19; // ebx@22
  _BYTE v20[20]; // ST08_20@27
  int v21; // edx@28
  int v22; // eax@28
  int v23; // edx@28
  int v24; // eax@28
  char *v25; // eax@28
  const char *v26; // eax@28
  PartyWinInterface *v27; // ecx@29
  PgWin **v29; // [sp+Ch] [bp-28h]@6
  ExpeditionPartyWin **v30; // [sp+10h] [bp-24h]@6
  GameFrameWork *v31; // [sp+14h] [bp-20h]@1
  char acstr[21]; // [sp+18h] [bp-1Ch]@28

  v3 = this;
  v31 = this;
  v4 = User::GetMainCharID(&g_kUser);
  if ( v4->n5_code[0] != *((_DWORD *)pvData + 1)
    || v4->n5_code[1] != *((_DWORD *)pvData + 2)
    || v4->n5_code[2] != *((_DWORD *)pvData + 3)
    || v4->n5_code[3] != *((_DWORD *)pvData + 4)
    || v4->n5_code[4] != *((_DWORD *)pvData + 5) )
  {
    *(_DWORD *)v14 = *((_DWORD *)pvData + 1);
    *(_QWORD *)&v14[4] = *((_QWORD *)pvData + 1);
    *(_QWORD *)&v14[12] = *((_QWORD *)pvData + 2);
    v15 = RaidInfo::GetRaidMemberInfo(&g_kRaidinfo, *(Name5 *)v14);
    if ( v15 )
      MiniMapWin::RemoveRaidMember(v3->m_pkMiniMapWin, v15);
    *(_DWORD *)v16 = *((_DWORD *)pvData + 1);
    *(_QWORD *)&v16[4] = *((_QWORD *)pvData + 1);
    *(_QWORD *)&v16[12] = *((_QWORD *)pvData + 2);
    RaidInfo::DeleteMember(
      &g_kRaidinfo,
      *(Name5 *)v16,
      (std::_Vector_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo> > >)*((_BYTE *)pvData + 2),
      *((_BYTE *)pvData + 3));
    v17 = *((_BYTE *)pvData + 2);
    v18 = (char *)&g_kRaidinfo.m_MemberInfo[v17];
    if ( *(_DWORD *)v18 == *((_DWORD *)v18 + 1) )
    {
      v19 = (PgWin *)(v17 >= 4 ? 0 : v3->m_pkExpeditionPartyWin[v17]);
      if ( (unsigned __int8)((int (__thiscall *)(PgWin *))v19->vfptr[65].__vecDelDtor)(v19) )
        PgWinMgr::CloseWin(&Pgg_kWinMgr, v19);
    }
    if ( *((_BYTE *)pvData + 2) == g_kRaidinfo.m_uiMePartyIdx )
    {
      *(_DWORD *)v20 = *((_DWORD *)pvData + 1);
      *(_QWORD *)&v20[4] = *((_QWORD *)pvData + 1);
      *(_QWORD *)&v20[12] = *((_QWORD *)pvData + 2);
      Party::DeleteMember(&g_kParty, *(Name5 *)v20);
    }
    v21 = *((_DWORD *)pvData + 1);
    v22 = *((_DWORD *)pvData + 2);
    *(_DWORD *)&acstr[8] = *((_DWORD *)pvData + 3);
    *(_DWORD *)acstr = v21;
    v23 = *((_DWORD *)pvData + 4);
    *(_DWORD *)&acstr[4] = v22;
    v24 = *((_DWORD *)pvData + 5);
    *(_DWORD *)&acstr[12] = v23;
    *(_DWORD *)&acstr[16] = v24;
    acstr[20] = 0;
    v25 = (char *)TextData2::Get(0x9F98DABD);
    v26 = fs(v25, acstr);
    GameFrameWork::AddSysMsg(v3, v26);
  }
  else
  {
    Party::Clear(&g_kParty);
    MiniMapWin::ClearRaidMember(v3->m_pkMiniMapWin);
    v5 = v3->m_pkExpeditionPartyWin;
    v6 = 0;
    v29 = (PgWin **)v5;
    v30 = v5;
    do
    {
      v7 = *v5;
      if ( v7 )
      {
        v8 = 0;
        do
          ExpeditionPartyWin::SetOption(v7, v8++, 0);
        while ( v8 < 5 );
      }
      ++v6;
      v5 = v30 + 1;
      ++v30;
    }
    while ( v6 < 4 );
    v9 = v29;
    v10 = 0;
    do
    {
      v11 = *v9;
      if ( (unsigned __int8)((int (__thiscall *)(PgWin *))v11->vfptr[65].__vecDelDtor)(v11) )
        PgWinMgr::CloseWin(&Pgg_kWinMgr, v11);
      ++v10;
      ++v9;
    }
    while ( v10 < 4 );
    v12 = v31->m_pkExpeditionWin;
    if ( v12 )
    {
      ExpeditionWin::SetLootingType(v12, 0);
      ExpeditionWin::SetItemGrade(v31->m_pkExpeditionWin, 0);
    }
    RaidInfo::ClearRaidInfo(&g_kRaidinfo);
    v13 = TextData2::Get(0x412E7193u);
    GameFrameWork::AddSysMsg(v31, (const char *)v13);
    v3 = v31;
  }
  v27 = v3->m_pkPartyWinInterface;
  if ( v27 )
    PartyWinInterface::Update(v27);
  return iRevBytes;
}

//----- (004B5640) --------------------------------------------------------
void __thiscall GameFrameWork::NcRaidVanishReq(GameFrameWork *this, Name5 kCharID)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  __int16 pdata; // [sp+4h] [bp-1Ch]@1
  PROTO_NC_RAID_VANISH_REQ kProto; // [sp+8h] [bp-18h]@1

  v2 = this;
  kProto.sVanishCharID = kCharID;
  v3 = this->m_spWorldMgrNet.m_pObject;
  pdata = -20456;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 20);
}

//----- (004B56B0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_VANISH_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // edx@1
  GameFrameWork *v4; // esi@1
  int v5; // eax@1
  char *v6; // eax@1
  const char *v7; // eax@1
  char acstr[21]; // [sp+4h] [bp-1Ch]@1

  v3 = *((_DWORD *)pvData + 1);
  v4 = this;
  *(_DWORD *)acstr = *(_DWORD *)pvData;
  *(_DWORD *)&acstr[8] = *((_DWORD *)pvData + 2);
  *(_DWORD *)&acstr[4] = v3;
  v5 = *((_DWORD *)pvData + 4);
  *(_DWORD *)&acstr[12] = *((_DWORD *)pvData + 3);
  *(_DWORD *)&acstr[16] = v5;
  acstr[20] = 0;
  v6 = (char *)TextData2::Get(0x4E727586u);
  v7 = fs(v6, acstr);
  GameFrameWork::AddSysMsg(v4, v7);
  return iRevBytes;
}

//----- (004B5720) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_VANISH_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // ebx@1
  Name5 *v4; // eax@1
  unsigned int v5; // edi@6
  PgWin **v6; // ebx@6
  PgWin *v7; // esi@7
  ExpeditionWin *v8; // ecx@10
  _BYTE v9[20]; // ST08_20@13
  RaidMemberInfo *v10; // eax@13
  _BYTE v11[20]; // ST00_20@15
  unsigned int v12; // ecx@15
  char *v13; // eax@15
  PgWin *v14; // edi@17
  _BYTE v15[20]; // ST08_20@22
  int v16; // edx@23
  int v17; // eax@23
  int v18; // edx@23
  int v19; // eax@23
  char *v20; // eax@23
  const char *v21; // eax@23
  PartyWinInterface *v22; // ecx@24
  GameFrameWork *v24; // [sp+Ch] [bp-20h]@1
  char acstr[21]; // [sp+10h] [bp-1Ch]@23

  v3 = this;
  v24 = this;
  v4 = User::GetMainCharID(&g_kUser);
  if ( v4->n5_code[0] != *((_DWORD *)pvData + 6)
    || v4->n5_code[1] != *((_DWORD *)pvData + 7)
    || v4->n5_code[2] != *((_DWORD *)pvData + 8)
    || v4->n5_code[3] != *((_DWORD *)pvData + 9)
    || v4->n5_code[4] != *((_DWORD *)pvData + 10) )
  {
    *(_DWORD *)v9 = *((_DWORD *)pvData + 6);
    *(_QWORD *)&v9[4] = *(_QWORD *)((char *)pvData + 28);
    *(_QWORD *)&v9[12] = *(_QWORD *)((char *)pvData + 36);
    v10 = RaidInfo::GetRaidMemberInfo(&g_kRaidinfo, *(Name5 *)v9);
    if ( v10 )
      MiniMapWin::RemoveRaidMember(v3->m_pkMiniMapWin, v10);
    *(_DWORD *)v11 = *((_DWORD *)pvData + 6);
    *(_QWORD *)&v11[4] = *(_QWORD *)((char *)pvData + 28);
    *(_QWORD *)&v11[12] = *(_QWORD *)((char *)pvData + 36);
    RaidInfo::DeleteMember(
      &g_kRaidinfo,
      *(Name5 *)v11,
      (std::_Vector_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo> > >)*((_BYTE *)pvData + 2),
      *((_BYTE *)pvData + 3));
    v12 = *((_BYTE *)pvData + 2);
    v13 = (char *)&g_kRaidinfo.m_MemberInfo[v12];
    if ( *(_DWORD *)v13 == *((_DWORD *)v13 + 1) )
    {
      v14 = (PgWin *)(v12 >= 4 ? 0 : v3->m_pkExpeditionPartyWin[v12]);
      if ( (unsigned __int8)((int (__thiscall *)(PgWin *))v14->vfptr[65].__vecDelDtor)(v14) )
        PgWinMgr::CloseWin(&Pgg_kWinMgr, v14);
    }
    if ( *((_BYTE *)pvData + 2) == g_kRaidinfo.m_uiMePartyIdx )
    {
      *(_DWORD *)v15 = *((_DWORD *)pvData + 6);
      *(_QWORD *)&v15[4] = *(_QWORD *)((char *)pvData + 28);
      *(_QWORD *)&v15[12] = *(_QWORD *)((char *)pvData + 36);
      Party::DeleteMember(&g_kParty, *(Name5 *)v15);
    }
    v16 = *((_DWORD *)pvData + 6);
    v17 = *((_DWORD *)pvData + 7);
    *(_DWORD *)&acstr[8] = *((_DWORD *)pvData + 8);
    *(_DWORD *)acstr = v16;
    v18 = *((_DWORD *)pvData + 9);
    *(_DWORD *)&acstr[4] = v17;
    v19 = *((_DWORD *)pvData + 10);
    *(_DWORD *)&acstr[12] = v18;
    *(_DWORD *)&acstr[16] = v19;
    acstr[20] = 0;
    v20 = (char *)TextData2::Get(0xFFB7C8DB);
    v21 = fs(v20, acstr);
    GameFrameWork::AddSysMsg(v3, v21);
  }
  else
  {
    Party::Clear(&g_kParty);
    MiniMapWin::ClearRaidMember(v3->m_pkMiniMapWin);
    v5 = 0;
    v6 = (PgWin **)v3->m_pkExpeditionPartyWin;
    do
    {
      v7 = *v6;
      if ( (unsigned __int8)((int (__thiscall *)(PgWin *))v7->vfptr[65].__vecDelDtor)(v7) )
        PgWinMgr::CloseWin(&Pgg_kWinMgr, v7);
      ++v5;
      ++v6;
    }
    while ( v5 < 4 );
    v8 = v24->m_pkExpeditionWin;
    if ( v8 )
    {
      ExpeditionWin::SetLootingType(v8, 0);
      ExpeditionWin::SetItemGrade(v24->m_pkExpeditionWin, 0);
    }
    RaidInfo::ClearRaidInfo(&g_kRaidinfo);
    v3 = v24;
  }
  v22 = v3->m_pkPartyWinInterface;
  if ( v22 )
    PartyWinInterface::Update(v22);
  return iRevBytes;
}

//----- (004B5950) --------------------------------------------------------
void __thiscall GameFrameWork::NcRaidSlotMoveReq(GameFrameWork *this, int PreIndex, int PostIndex)
{
  GameFrameWork *v3; // edi@1
  int v4; // ecx@1
  unsigned __int16 v5; // si@1
  char *v6; // ecx@1
  int v7; // eax@2
  int v8; // ecx@2
  char *v9; // esi@2
  signed int v10; // ecx@2
  unsigned int v11; // ebx@2
  int v12; // eax@3
  __int16 pdata; // [sp+Ch] [bp-38h]@4
  PROTO_NC_RAID_SLOT_MOVE_REQ kProto; // [sp+10h] [bp-34h]@1

  *(_QWORD *)&kProto.sPreSlotMoveCharID.n5_code[3] = 0i64;
  *(_QWORD *)&kProto.sPreSlotMoveCharID.n5_code[1] = 0i64;
  kProto.sPreSlotMoveCharID.n5_code[0] = 0;
  *(_QWORD *)&kProto.sPostSlotMoveCharID.n5_code[3] = 0i64;
  *(_QWORD *)&kProto.sPostSlotMoveCharID.n5_code[1] = 0i64;
  kProto.sPostSlotMoveCharID.n5_code[0] = 0;
  v3 = this;
  kProto.PrePosition.nPartyIndex = PreIndex / 5;
  v4 = (unsigned __int8)kProto.PrePosition.nPartyIndex;
  v5 = g_kRaidinfo.m_PartyInfo[v4].nPartyNo;
  kProto.PrePosition.nSlotIndex = PreIndex % 5;
  v6 = (char *)&g_kRaidinfo.m_MemberInfo[v4];
  kProto.PrePosition.nPartyNo = v5;
  if ( (*((_DWORD *)v6 + 1) - *(_DWORD *)v6) / 68 > (unsigned int)(unsigned __int8)kProto.PrePosition.nSlotIndex )
  {
    v7 = *(_DWORD *)v6 + 68 * (unsigned __int8)kProto.PrePosition.nSlotIndex;
    kProto.sPreSlotMoveCharID.n5_code[0] = *(_DWORD *)v7;
    *(_QWORD *)&kProto.sPreSlotMoveCharID.n5_code[1] = *(_QWORD *)(v7 + 4);
    *(_QWORD *)&kProto.sPreSlotMoveCharID.n5_code[3] = *(_QWORD *)(v7 + 12);
    kProto.PostPosition.nPartyIndex = ((signed int)((unsigned __int64)(1717986919i64 * PostIndex) >> 32) >> 1)
                                    + ((unsigned int)((unsigned __int64)(1717986919i64 * PostIndex) >> 32) >> 31);
    v8 = (unsigned __int8)kProto.PostPosition.nPartyIndex;
    kProto.PostPosition.nPartyNo = g_kRaidinfo.m_PartyInfo[v8].nPartyNo;
    v9 = (char *)&g_kRaidinfo.m_MemberInfo[v8];
    v10 = *((_DWORD *)v9 + 1) - *(_DWORD *)v9;
    v11 = (unsigned __int8)(PostIndex - 5 * kProto.PostPosition.nPartyIndex);
    kProto.PostPosition.nSlotIndex = PostIndex - 5 * kProto.PostPosition.nPartyIndex;
    if ( v10 / 68 > v11 )
    {
      v12 = *(_DWORD *)v9 + 68 * v11;
      *(_QWORD *)&kProto.sPostSlotMoveCharID.n5_name[0] = *(_QWORD *)v12;
      kProto.sPostSlotMoveCharID.n5_code[2] = *(_DWORD *)(v12 + 8);
      *(_QWORD *)&kProto.sPostSlotMoveCharID.n5_code[3] = *(_QWORD *)(v12 + 12);
    }
    pdata = -20441;
    PgNet::AddNetMsg((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, &pdata, 2);
    PgNet::SendNetMsg((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 48);
  }
}

//----- (004B5AD0) --------------------------------------------------------
void __thiscall GameFrameWork::NcRaidSetLeaderReq(GameFrameWork *this, Name5 kCharID)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  __int16 pdata; // [sp+4h] [bp-1Ch]@1
  PROTO_NC_RAID_SET_LEADER_REQ kProto; // [sp+8h] [bp-18h]@1

  v2 = this;
  kProto.sNewLeaderCharID = kCharID;
  v3 = this->m_spWorldMgrNet.m_pObject;
  pdata = -20437;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 20);
}

//----- (004B5B40) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_SET_LEADER_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  _BYTE v4[20]; // ST04_20@1
  _BYTE v5[20]; // ST04_20@1
  _BYTE v6[20]; // ST00_20@2
  int v7; // edx@3
  int v8; // eax@3
  int v9; // edx@3
  int v10; // eax@3
  char *v11; // eax@3
  const char *v12; // eax@3
  PartyWinInterface *v13; // ecx@3
  char acstr[21]; // [sp+8h] [bp-1Ch]@3

  v3 = this;
  *(_DWORD *)v4 = *((_DWORD *)pvData + 5);
  *(_QWORD *)&v4[4] = *((_QWORD *)pvData + 3);
  *(_QWORD *)&v4[12] = *((_QWORD *)pvData + 4);
  RaidInfo::ChangeRaidLeader(&g_kRaidinfo, *(Name5 *)v4);
  *(_DWORD *)v5 = *((_DWORD *)pvData + 5);
  *(_QWORD *)&v5[4] = *((_QWORD *)pvData + 3);
  *(_QWORD *)&v5[12] = *((_QWORD *)pvData + 4);
  if ( RaidInfo::IsSubLeader(&g_kRaidinfo, *(Name5 *)v5) )
  {
    *(_DWORD *)v6 = *((_DWORD *)pvData + 5);
    *(_QWORD *)&v6[4] = *((_QWORD *)pvData + 3);
    *(_QWORD *)&v6[12] = *((_QWORD *)pvData + 4);
    RaidInfo::SetRaidSubLeader(&g_kRaidinfo, *(Name5 *)v6, 0);
  }
  v7 = *((_DWORD *)pvData + 5);
  v8 = *((_DWORD *)pvData + 6);
  *(_DWORD *)&acstr[8] = *((_DWORD *)pvData + 7);
  *(_DWORD *)acstr = v7;
  v9 = *((_DWORD *)pvData + 8);
  *(_DWORD *)&acstr[4] = v8;
  v10 = *((_DWORD *)pvData + 9);
  *(_DWORD *)&acstr[12] = v9;
  *(_DWORD *)&acstr[16] = v10;
  acstr[20] = 0;
  v11 = (char *)TextData2::Get(0x460A1735u);
  v12 = fs(v11, acstr);
  GameFrameWork::AddSysMsg(v3, v12);
  v13 = v3->m_pkPartyWinInterface;
  if ( v13 )
    PartyWinInterface::Update(v13);
  return iRevBytes;
}

//----- (004B5C50) --------------------------------------------------------
void __thiscall GameFrameWork::NcRaidSetSubLeaderReq(GameFrameWork *this, Name5 kCharID)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  __int16 pdata; // [sp+4h] [bp-1Ch]@1
  PROTO_NC_RAID_SET_SUB_LEADER_REQ kProto; // [sp+8h] [bp-18h]@1

  v2 = this;
  kProto.sNewSubLeaderCharID = kCharID;
  v3 = this->m_spWorldMgrNet.m_pObject;
  pdata = -20432;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 20);
}

//----- (004B5CC0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_SET_SUB_LEADER_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  _BYTE v4[20]; // ST00_20@1
  int v5; // edx@1
  int v6; // eax@1
  int v7; // edx@1
  int v8; // eax@1
  char *v9; // eax@1
  const char *v10; // eax@1
  PartyWinInterface *v11; // ecx@1
  char acstr[21]; // [sp+8h] [bp-1Ch]@1

  v3 = this;
  *(_DWORD *)v4 = *((_DWORD *)pvData + 5);
  *(_QWORD *)&v4[4] = *((_QWORD *)pvData + 3);
  *(_QWORD *)&v4[12] = *((_QWORD *)pvData + 4);
  RaidInfo::SetRaidSubLeader(&g_kRaidinfo, *(Name5 *)v4, 1);
  v5 = *((_DWORD *)pvData + 5);
  v6 = *((_DWORD *)pvData + 6);
  *(_DWORD *)&acstr[8] = *((_DWORD *)pvData + 7);
  *(_DWORD *)acstr = v5;
  v7 = *((_DWORD *)pvData + 8);
  *(_DWORD *)&acstr[4] = v6;
  v8 = *((_DWORD *)pvData + 9);
  *(_DWORD *)&acstr[12] = v7;
  *(_DWORD *)&acstr[16] = v8;
  acstr[20] = 0;
  v9 = (char *)TextData2::Get(0x2F756280u);
  v10 = fs(v9, acstr);
  GameFrameWork::AddSysMsg(v3, v10);
  v11 = v3->m_pkPartyWinInterface;
  if ( v11 )
    PartyWinInterface::Update(v11);
  return iRevBytes;
}

//----- (004B5D70) --------------------------------------------------------
void __thiscall GameFrameWork::NcRaidDelSubLeaderReq(GameFrameWork *this, Name5 kCharID)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  __int16 pdata; // [sp+4h] [bp-1Ch]@1
  PROTO_NC_RAID_DEL_SUB_LEADER_REQ kProto; // [sp+8h] [bp-18h]@1

  v2 = this;
  kProto.sDelSubLeaderCharID = kCharID;
  v3 = this->m_spWorldMgrNet.m_pObject;
  pdata = -20427;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 20);
}

//----- (004B5DE0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_DEL_SUB_LEADER_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  _BYTE v4[20]; // ST00_20@1
  int v5; // ecx@1
  int v6; // edx@1
  int v7; // eax@1
  int v8; // ecx@1
  int v9; // eax@1
  int v10; // edx@1
  int v11; // ecx@1
  int v12; // edx@1
  int v13; // edx@1
  char *v14; // eax@1
  const char *v15; // eax@1
  char acstrCommmander[21]; // [sp+8h] [bp-34h]@1
  char acstrDegrader[21]; // [sp+20h] [bp-1Ch]@1

  v3 = this;
  *(_DWORD *)v4 = *((_DWORD *)pvData + 5);
  *(_QWORD *)&v4[4] = *((_QWORD *)pvData + 3);
  *(_QWORD *)&v4[12] = *((_QWORD *)pvData + 4);
  RaidInfo::SetRaidSubLeader(&g_kRaidinfo, *(Name5 *)v4, 0);
  v5 = *((_DWORD *)pvData + 2);
  v6 = *(_DWORD *)pvData;
  *(_DWORD *)&acstrCommmander[4] = *((_DWORD *)pvData + 1);
  v7 = *((_DWORD *)pvData + 4);
  *(_DWORD *)&acstrCommmander[8] = v5;
  v8 = *((_DWORD *)pvData + 5);
  *(_DWORD *)&acstrCommmander[16] = v7;
  v9 = *((_DWORD *)pvData + 7);
  *(_DWORD *)acstrCommmander = v6;
  v10 = *((_DWORD *)pvData + 3);
  *(_DWORD *)acstrDegrader = v8;
  v11 = *((_DWORD *)pvData + 8);
  *(_DWORD *)&acstrDegrader[8] = v9;
  *(_DWORD *)&acstrCommmander[12] = v10;
  v12 = *((_DWORD *)pvData + 6);
  *(_DWORD *)&acstrDegrader[12] = v11;
  *(_DWORD *)&acstrDegrader[4] = v12;
  v13 = *((_DWORD *)pvData + 9);
  acstrCommmander[20] = 0;
  *(_DWORD *)&acstrDegrader[16] = v13;
  acstrDegrader[20] = 0;
  v14 = (char *)TextData2::Get(0x8C72658F);
  v15 = fs(v14, acstrCommmander, acstrDegrader);
  GameFrameWork::AddSysMsg(v3, v15);
  return iRevBytes;
}

//----- (004B5EB0) --------------------------------------------------------
void __thiscall GameFrameWork::NcRaidSetLooterReq(GameFrameWork *this, Name5 kCharID)
{
  _BYTE v2[20]; // ST00_20@1
  NiUnsharedGeometryGroup *v3; // eax@2
  PgNet *v4; // ecx@3
  GameFrameWork *v5; // [sp+Ch] [bp-20h]@1
  __int16 pdata; // [sp+10h] [bp-1Ch]@3
  PROTO_NC_RAID_SET_LOOTER_REQ kProto; // [sp+14h] [bp-18h]@1

  v5 = this;
  *(_QWORD *)v2 = *(_QWORD *)&kCharID.n5_name[0];
  *(_QWORD *)&v2[8] = *(_QWORD *)&kCharID.n5_code[2];
  kProto.sNewLooterCharID = kCharID;
  *(_DWORD *)&v2[16] = kCharID.n5_code[4];
  if ( RaidInfo::IsLooter(&g_kRaidinfo, *(Name5 *)v2) )
  {
    v3 = TextData2::Get(0x92A35DB9);
    GameFrameWork::AddSysMsg(v5, (const char *)v3);
  }
  else
  {
    v4 = (PgNet *)&v5->m_spWorldMgrNet.m_pObject->vfptr;
    pdata = -20422;
    PgNet::AddNetMsg(v4, &pdata, 2);
    PgNet::SendNetMsg((PgNet *)&v5->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 20);
  }
}

//----- (004B5F70) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_SET_LOOTER_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  _BYTE v4[20]; // ST00_20@1
  int v5; // edx@1
  int v6; // eax@1
  int v7; // edx@1
  int v8; // eax@1
  char *v9; // eax@1
  const char *v10; // eax@1
  char acstr[21]; // [sp+8h] [bp-1Ch]@1

  v3 = this;
  *(_DWORD *)v4 = *((_DWORD *)pvData + 5);
  *(_QWORD *)&v4[4] = *((_QWORD *)pvData + 3);
  *(_QWORD *)&v4[12] = *((_QWORD *)pvData + 4);
  RaidInfo::ChangeRaidLooter(&g_kRaidinfo, *(Name5 *)v4);
  v5 = *((_DWORD *)pvData + 5);
  v6 = *((_DWORD *)pvData + 6);
  *(_DWORD *)&acstr[8] = *((_DWORD *)pvData + 7);
  *(_DWORD *)acstr = v5;
  v7 = *((_DWORD *)pvData + 8);
  *(_DWORD *)&acstr[4] = v6;
  v8 = *((_DWORD *)pvData + 9);
  *(_DWORD *)&acstr[12] = v7;
  *(_DWORD *)&acstr[16] = v8;
  acstr[20] = 0;
  v9 = (char *)TextData2::Get(0x21113334u);
  v10 = fs(v9, acstr);
  GameFrameWork::AddSysMsg(v3, v10);
  return iRevBytes;
}

//----- (004B6010) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_CHAT_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData == 8130 )
  {
    v4 = TextData2::Get(0xCBE2CB31);
    GameFrameWork::AddSysMsg(v3, (const char *)v4);
  }
  return iRevBytes;
}

//----- (004B6040) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_WARNING_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@3
  const char *v6; // eax@4

  v3 = this;
  if ( *(_WORD *)pvData != 7808 )
  {
    if ( *(_WORD *)pvData == 8067 )
    {
      v4 = TextData2::Get(0xCBE2CB31);
      GameFrameWork::AddSysMsg(v3, (const char *)v4);
      return iRevBytes;
    }
    v6 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v6);
  }
  return iRevBytes;
}

//----- (004B60A0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_WARNING_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  SHINE_ITEM_STRUCT *v3; // esi@3
  int v4; // ebx@3
  int v5; // ebx@7
  char *v6; // esi@7
  NiUnsharedGeometryGroup *v7; // ST14_4@16
  NiUnsharedGeometryGroup *v8; // ST14_4@17
  char *v9; // eax@16
  D3DXCOLOR v10; // ST08_16@19
  NiUnsharedGeometryGroup *v11; // eax@20
  char *v12; // eax@20
  int nTextCnt; // [sp+10h] [bp-118h]@7
  unsigned int uiRemainderText; // [sp+14h] [bp-114h]@7
  GameFrameWork *v16; // [sp+18h] [bp-110h]@1
  char acStrText[129]; // [sp+1Ch] [bp-10Ch]@15
  char acStr[129]; // [sp+A0h] [bp-88h]@7

  v16 = this;
  if ( g_kRaidinfo.m_bIsDisplayNotice )
  {
    if ( (signed int)*(_BYTE *)pvData > 0 )
    {
      v3 = (SHINE_ITEM_STRUCT *)((char *)pvData + *((_BYTE *)pvData + 21) + 22);
      v4 = *(_BYTE *)pvData;
      do
      {
        GameFrameWork::AddSChatItemLink(v16, 0x2000, v3);
        ++v3;
        --v4;
      }
      while ( v4 );
    }
    if ( *((_BYTE *)pvData + 21) > 0x80u )
      *((_BYTE *)pvData + 21) = -128;
    strncpy(acStr, (char *)pvData + 22, *((_BYTE *)pvData + 21));
    v5 = 0;
    acStr[*((_BYTE *)pvData + 21)] = 0;
    nTextCnt = 0;
    uiRemainderText = 0;
    v6 = acStr;
    if ( acStr[0] )
    {
      while ( 1 )
      {
        if ( IsDBCSLeadByte(*v6) )
        {
          v6 += 2;
          v5 += 2;
        }
        else
        {
          ++v6;
          ++v5;
        }
        if ( ++nTextCnt >= 50 )
          break;
        if ( !*v6 )
          goto LABEL_15;
      }
      uiRemainderText = strlen(v6);
    }
LABEL_15:
    *((_BYTE *)pvData + 21) = v5;
    strncpy(acStrText, (char *)pvData + 22, (unsigned __int8)v5);
    acStrText[*((_BYTE *)pvData + 21)] = 0;
    if ( uiRemainderText )
    {
      v7 = TextData::Get(0xFAF72626);
      v9 = fs("%s : %s...", v7, acStrText);
    }
    else
    {
      v8 = TextData::Get(0xFAF72626);
      v9 = fs("%s : %s", v8, acStrText);
    }
    if ( g_kRaidinfo.m_bIsDisplayNotice )
    {
      *(_QWORD *)&v10.r = *(_QWORD *)&Color::m_kDxYellowColor.r;
      *(_QWORD *)&v10.b = *(_QWORD *)&Color::m_kDxYellowColor.b;
      GTInformWin::AddText(v16->m_pkExpeditionWarnigMsgWin, 3u, v9, v10, 3.0);
      SoundMgr::PlayInterfaceSound(&g_kSoundMgr, Dice_CoinClick);
      if ( g_pkMainChar->m_kAbStateProperty.iCantChatStateCount <= 0 )
      {
        v11 = TextData::Get(0xFAF72626);
        v12 = fs("%s : %s", v11, acStr);
        ChatDisplayWin2::AddRaidNoticeChat(v16->m_pkChatDisplayWin, v12);
      }
    }
  }
  return iRevBytes;
}

//----- (004B62B0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_DICE_GAME_START_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  Char *v4; // eax@2
  int v5; // esi@3
  int (*v6)(void); // eax@3
  int v7; // ST08_4@4
  char *v8; // eax@4
  const char *v9; // eax@4
  int v11; // ST04_4@5
  char *v12; // eax@5
  const char *v13; // eax@5

  v3 = this;
  if ( pvData )
  {
    v4 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
    if ( v4 )
    {
      v5 = *(_DWORD *)((char *)pvData + 2);
      v6 = (int (*)(void))v4->vfptr[2].DeleteAbStateByAbstateIndex;
      if ( v5 == 65534 )
      {
        v7 = v6();
        v8 = (char *)TextData2::Get(0x7F96DFC1u);
        v9 = fs(v8, v7);
        GameFrameWork::AddSysMsg(v3, v9);
        return iRevBytes;
      }
      v11 = ((int (__cdecl *)(int))v6)(v5);
      v12 = (char *)TextData2::Get(0x77A68CBCu);
      v13 = fs(v12, v11);
      GameFrameWork::AddSysMsg(v3, v13);
    }
  }
  return iRevBytes;
}

//----- (004B6340) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_DICE_GAME_RESULT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  int v4; // edx@3
  int v5; // ecx@3
  int v6; // edi@3
  int v7; // eax@3
  int v8; // edx@3
  int v9; // ebx@3
  int v10; // edx@5
  int v11; // eax@6
  int v12; // ST0C_4@7
  int v13; // ST08_4@7
  char *v14; // eax@7
  const char *v15; // eax@7
  const char *v17; // eax@9
  GameFrameWork *v18; // [sp+8h] [bp-20h]@1
  char acName[21]; // [sp+Ch] [bp-1Ch]@3

  v3 = this;
  v18 = this;
  if ( pvData )
  {
    if ( *(_WORD *)pvData == 8200 )
    {
      v4 = *(_DWORD *)((char *)pvData + 2);
      v5 = *(_DWORD *)((char *)pvData + 10);
      v6 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      *(_DWORD *)&acName[4] = *(_DWORD *)((char *)pvData + 6);
      v7 = *(_DWORD *)((char *)pvData + 18);
      *(_DWORD *)acName = v4;
      v8 = *(_DWORD *)((char *)pvData + 14);
      v9 = *((_WORD *)pvData + 13);
      *(_DWORD *)&acName[8] = v5;
      *(_DWORD *)&acName[16] = v7;
      *(_DWORD *)&acName[12] = v8;
      acName[20] = 0;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v9) )
      {
        if ( (unsigned __int16)v9 <= *(_WORD *)(v6 + 200) )
        {
          v10 = *(_DWORD *)(v6 + 196);
          if ( *(_DWORD *)(v10 + 4 * v9) )
          {
            v11 = *(_DWORD *)(v10 + 4 * v9);
            if ( v11 )
            {
              v12 = *(_DWORD *)((char *)pvData + 22);
              v13 = v11 + 34;
              v14 = (char *)TextData2::Get(0xD5EDCDC3);
              v15 = fs(v14, acName, v13, v12);
              GameFrameWork::AddSysMsg(v18, v15);
            }
          }
        }
      }
    }
    else
    {
      v17 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
      GameFrameWork::AddSysMsg(v3, v17);
    }
  }
  return iRevBytes;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (004B6430) --------------------------------------------------------
void __thiscall GameFrameWork::NcPartySetLooterReq(GameFrameWork *this, Name5 kCharID)
{
  GameFrameWork *v2; // esi@1
  Name5 *v3; // eax@1
  NiUnsharedGeometryGroup *v4; // eax@4
  __int16 pdata; // [sp+4h] [bp-30h]@5
  Name5 result; // [sp+8h] [bp-2Ch]@1
  PROTO_NC_PARTY_SET_LOOTER_REQ kProto; // [sp+1Ch] [bp-18h]@1

  v2 = this;
  kProto.sNewLooterCharID.n5_code[2] = kCharID.n5_code[2];
  *(_QWORD *)&kProto.sNewLooterCharID.n5_name[0] = *(_QWORD *)&kCharID.n5_name[0];
  *(_QWORD *)&kProto.sNewLooterCharID.n5_code[3] = *(_QWORD *)&kCharID.n5_code[3];
  v3 = Party::GetLooterID(&g_kParty, &result);
  if ( *(_QWORD *)&v3->n5_code[0] != *(_QWORD *)&kCharID.n5_name[0]
    || *(_QWORD *)&v3->n5_code[2] != *(_QWORD *)&kCharID.n5_code[2]
    || v3->n5_code[4] != kCharID.n5_code[4] )
  {
    pdata = 14426;
    PgNet::AddNetMsg((PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr, &pdata, 2);
    PgNet::SendNetMsg((PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 20);
  }
  else
  {
    v4 = TextData2::Get(0x92A35DB9);
    GameFrameWork::AddSysMsg(v2, (const char *)v4);
  }
}

//----- (004B6500) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_PARTY_SET_LOOTER_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // edx@1
  GameFrameWork *v4; // esi@1
  int v5; // eax@1
  char *v6; // eax@1
  const char *v7; // eax@1
  char *v8; // eax@2
  _BYTE v9[20]; // ST00_20@2
  const char *v10; // eax@2
  char dest[4]; // [sp+8h] [bp-30h]@2
  __int64 v13; // [sp+Ch] [bp-2Ch]@2
  __int64 v14; // [sp+14h] [bp-24h]@2
  char acStr[21]; // [sp+1Ch] [bp-1Ch]@1

  v3 = *((_DWORD *)pvData + 1);
  v4 = this;
  *(_DWORD *)acStr = *(_DWORD *)pvData;
  *(_DWORD *)&acStr[8] = *((_DWORD *)pvData + 2);
  *(_DWORD *)&acStr[4] = v3;
  v5 = *((_DWORD *)pvData + 4);
  *(_DWORD *)&acStr[12] = *((_DWORD *)pvData + 3);
  *(_DWORD *)&acStr[16] = v5;
  acStr[20] = 0;
  v6 = (char *)TextData2::Get(0x5F8E8EB2u);
  v7 = fs(v6, acStr);
  GameFrameWork::AddSysMsg(v4, v7);
  if ( v4->m_pkPartyLootSetupWin )
  {
    v8 = (char *)((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)();
    v14 = 0i64;
    v13 = 0i64;
    *(_DWORD *)dest = 0;
    strncpy(dest, v8, 0x14u);
    *(_DWORD *)v9 = *(_DWORD *)dest;
    *(_QWORD *)&v9[4] = v13;
    *(_QWORD *)&v9[12] = v14;
    Party::SetLooterID(&g_kParty, *(Name5 *)v9);
    v10 = (const char *)((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)();
    PartyLootSetupWin::SetLooterName(v4->m_pkPartyLootSetupWin, v10);
  }
  return iRevBytes;
}

//----- (004B65F0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_PARTY_SET_LOOTER_BROAD_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // edx@1
  int v4; // eax@1
  GameFrameWork *v5; // edi@1
  int v6; // ecx@1
  int v7; // edx@1
  int v8; // ecx@1
  int v9; // eax@1
  int v10; // edx@1
  int v11; // eax@1
  int v12; // eax@1
  char *v13; // eax@1
  const char *v14; // eax@1
  _BYTE v15[20]; // ST00_20@2
  char acName[21]; // [sp+8h] [bp-34h]@1
  char acName2[21]; // [sp+20h] [bp-1Ch]@1

  v3 = *((_DWORD *)pvData + 2);
  v4 = *(_DWORD *)pvData;
  v5 = this;
  *(_DWORD *)&acName[4] = *((_DWORD *)pvData + 1);
  v6 = *((_DWORD *)pvData + 4);
  *(_DWORD *)&acName[8] = v3;
  v7 = *((_DWORD *)pvData + 5);
  *(_DWORD *)&acName[16] = v6;
  v8 = *((_DWORD *)pvData + 7);
  *(_DWORD *)acName = v4;
  v9 = *((_DWORD *)pvData + 3);
  *(_DWORD *)acName2 = v7;
  v10 = *((_DWORD *)pvData + 8);
  *(_DWORD *)&acName2[8] = v8;
  *(_DWORD *)&acName[12] = v9;
  v11 = *((_DWORD *)pvData + 6);
  *(_DWORD *)&acName2[12] = v10;
  *(_DWORD *)&acName2[4] = v11;
  v12 = *((_DWORD *)pvData + 9);
  acName[20] = 0;
  *(_DWORD *)&acName2[16] = v12;
  acName2[20] = 0;
  v13 = (char *)TextData2::Get(0x16322929u);
  v14 = fs(v13, acName, acName2);
  GameFrameWork::AddSysMsg(v5, v14);
  if ( v5->m_pkPartyLootSetupWin )
  {
    *(_DWORD *)v15 = *((_DWORD *)pvData + 5);
    *(_QWORD *)&v15[4] = *((_QWORD *)pvData + 3);
    *(_QWORD *)&v15[12] = *((_QWORD *)pvData + 4);
    Party::SetLooterID(&g_kParty, *(Name5 *)v15);
    PartyLootSetupWin::SetLooterName(v5->m_pkPartyLootSetupWin, acName2);
  }
  return iRevBytes;
}

//----- (004B66D0) --------------------------------------------------------
void __stdcall GameFrameWork::SendMapMultyLink(Name3 mapName)
{
  PROTO_NC_MAP_MULTY_LINK_SELECT_REQ pkProto; // [sp+0h] [bp-10h]@1

  *(_QWORD *)&pkProto.LinkMapName.n3_code[1] = 0i64;
  pkProto.LinkMapName.n3_code[0] = 0;
  if ( MapInfoTab::GetByMapName(&mapName) )
  {
    pkProto.LinkMapName = mapName;
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 6u, 0x1Fu, &pkProto, 12);
  }
}

//----- (004B6740) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MISC_CHAT_BLOCK_SPAMER_BLOCKTIME_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  unsigned int v4; // ST04_4@2
  char *v5; // eax@2
  const char *v6; // eax@2
  int result; // eax@2
  char *v8; // eax@3
  const char *v9; // eax@3
  unsigned int v10; // [sp-4h] [bp-8h]@1

  v3 = this;
  v10 = *(_DWORD *)pvData % 0x3Cu;
  if ( (signed int)(*(_DWORD *)pvData / 0x3Cu) <= 0 )
  {
    v8 = (char *)TextData2::Get(0x1A5A5597u);
    v9 = fs(v8, v10);
    GameFrameWork::AddSysMsg(v3, v9);
    result = iRevBytes;
  }
  else
  {
    v4 = *(_DWORD *)pvData / 0x3Cu;
    v5 = (char *)TextData2::Get(0x255F559Du);
    v6 = fs(v5, v4, v10);
    GameFrameWork::AddSysMsg(v3, v6);
    result = iRevBytes;
  }
  return result;
}

//----- (004B67B0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_USER_CONNECTION_CHANGE_CHAR_ID_ITEM_USE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // eax@1
  GameFrameWork *v4; // esi@1
  char *v5; // eax@2
  PROTO_AVATARINFORMATION *v6; // eax@2
  int v7; // ebx@2
  int v8; // edi@2
  PROTO_AVATARINFORMATION *v9; // esi@2
  ItemInfo **v10; // eax@6
  char *v11; // eax@9
  int result; // eax@16
  int v13; // eax@19
  NiUnsharedGeometryGroup *v14; // eax@21
  ItemInfo *pkInfo; // [sp+8h] [bp-1Ch]@3
  Name5 MainCharName; // [sp+Ch] [bp-18h]@9

  v3 = *(_WORD *)pvData;
  v4 = this;
  if ( (_WORD)v3 != 8368 )
  {
    v13 = v3 - 8377;
    if ( v13 )
    {
      if ( v13 == 1 )
        v14 = TextData2::Get(0xA25201Du);
      else
        v14 = TextData::Get(0x226625A6u);
    }
    else
    {
      v14 = TextData2::Get(0x8AEE8F92);
    }
    GameFrameWork::AddSysMsg(v4, (const char *)v14);
    return iRevBytes;
  }
  v5 = (char *)TextData2::Get(0x2E90813Du);
  MsgBox::Modal(MSGBOX_OK, v5);
  v6 = User::GetSelectedAvatarInfo(&g_kUser);
  v7 = *((_WORD *)pvData + 1);
  v8 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  v9 = v6;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                          ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                          v7) )
  {
    if ( (unsigned __int16)v7 <= *(_WORD *)(v8 + 200) )
    {
      v10 = (ItemInfo **)(*(_DWORD *)(v8 + 196) + 4 * v7);
      if ( *v10 )
        pkInfo = *v10;
      else
        pkInfo = 0;
    }
    else
    {
      pkInfo = 0;
    }
  }
  else
  {
    pkInfo = 0;
  }
  v11 = (char *)((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)();
  *(_QWORD *)&MainCharName.n5_code[3] = 0i64;
  *(_QWORD *)&MainCharName.n5_code[1] = 0i64;
  MainCharName.n5_code[0] = 0;
  strncpy(MainCharName.n5_name, v11, 0x14u);
  if ( v9->name.n5_code[0] != MainCharName.n5_code[0]
    || __PAIR__(v9->name.n5_code[1], v9->name.n5_code[2]) != __PAIR__(MainCharName.n5_code[1], MainCharName.n5_code[2])
    || *(_QWORD *)&v9->name.n5_code[3] != *(_QWORD *)&MainCharName.n5_code[3] )
  {
    v9 = User::GetAvatarInfo(&g_kUser, &MainCharName);
  }
  if ( !v9 || !pkInfo )
    return iRevBytes;
  if ( pkInfo->ItemFunc == 4 )
  {
    v9->CharIDChangeData.bNeedChangeID = 1;
    return iRevBytes;
  }
  result = iRevBytes;
  if ( pkInfo->ItemFunc == 5 )
    *(_WORD *)&v9->CharIDChangeData.bNeedChangeID = 257;
  return result;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (004B6930) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_ENCHANT_ADD_GEM_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  _WORD *v3; // edx@1
  char *v4; // eax@1
  unsigned __int16 v5; // ax@1
  GameFrameWork *v6; // edi@1
  EnchantGemWin *v7; // esi@1
  Item *v8; // ebx@1
  unsigned int v9; // eax@2
  unsigned int v10; // eax@5
  int v11; // eax@9
  int v12; // eax@11
  char *v13; // eax@13
  int v14; // eax@17
  const char *v15; // eax@19
  int result; // eax@22
  EnchantGemToolTipWin *v17; // ecx@26
  NiUnsharedGeometryGroup *v18; // eax@30
  SHINE_ITEM_STRUCT kStruct; // [sp+Ch] [bp-70h]@9
  SoundIndex rkIndex; // [sp+74h] [bp-8h]@1
  ITEM_INVEN *pvDataa; // [sp+88h] [bp+Ch]@1

  v3 = pvData;
  v4 = (char *)pvData + 2;
  pvDataa = (ITEM_INVEN *)v4;
  v5 = *(_WORD *)v4;
  v6 = this;
  v7 = 0;
  v8 = 0;
  rkIndex.m_acFilename = (char *)this;
  if ( v5 >> 10 == 9 )
  {
    v9 = v5 & 0x3FF;
    if ( v9 >= 0xC0 )
      goto LABEL_17;
    v8 = g_kInventory.m_aspInv[v9].m_pObject;
  }
  else
  {
    if ( v5 >> 10 != 8 )
      goto LABEL_17;
    v10 = v5 & 0x3FF;
    if ( v10 >= 0x1E )
    {
      v8 = 0;
      goto LABEL_17;
    }
    v8 = g_kInventory.m_aspEquip[v10].m_pObject;
  }
  if ( v8 )
  {
    qmemcpy(&kStruct, &v8->m_kStruct, sizeof(kStruct));
    v11 = (unsigned __int8)kStruct.itemattr.weapon.maxSocketCount;
    if ( !kStruct.itemattr.weapon.createdSocketCount )
      v11 = (unsigned __int8)kStruct.itemattr.weapon.maxSocketCount + 1;
    v12 = v11 - 1;
    if ( v12 )
    {
      if ( v12 == 1 )
      {
        v7 = (EnchantGemWin *)*((_DWORD *)rkIndex.m_acFilename + 244);
        v6 = (GameFrameWork *)rkIndex.m_acFilename;
        goto LABEL_17;
      }
      v13 = rkIndex.m_acFilename;
      v7 = (EnchantGemWin *)*((_DWORD *)rkIndex.m_acFilename + 245);
    }
    else
    {
      v13 = rkIndex.m_acFilename;
      v7 = (EnchantGemWin *)*((_DWORD *)rkIndex.m_acFilename + 243);
    }
    v6 = (GameFrameWork *)v13;
  }
LABEL_17:
  v14 = *v3;
  if ( v14 == 8320 )
  {
    if ( (unsigned __int8)((int (__thiscall *)(EnchantGemWin *))v7->vfptr[65].__vecDelDtor)(v7) )
      EnchantGemWin::SignGemSuccess(v7, pvDataa, v8);
    v17 = v6->m_pkEnchantGemToolTipWin;
    if ( v17 )
      EnchantGemToolTipWin::SetEnchantGemDesc(v17, v8);
    if ( !(`TutorialMgr::GetTutorialMgr'::`2'::`local static guard' & 1) )
    {
      `TutorialMgr::GetTutorialMgr'::`2'::`local static guard' |= 1u;
      TutorialMgr::TutorialMgr(&`TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr);
      atexit(`TutorialMgr::GetTutorialMgr'::`2'::`dynamic atexit destructor for 'kTutorialMgr'');
    }
    TutorialMgr::On_NC_WT_LICENSE_ACK(&`TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr);
    v18 = TextData3::Get(0x71A8C9F1u);
    GameFrameWork::AddSysMsg(v6, (const char *)v18);
    rkIndex.m_dwIndex = 3;
    rkIndex.m_acFilename = 0;
    SoundGroupStatic::PlaySoundA((SoundGroupStatic *)&g_kSoundMgr.m_pkInterfaceGroup->vfptr, &rkIndex, 0, 0);
    result = iRevBytes;
  }
  else
  {
    if ( (unsigned int)(v14 - 8321) > 7 )
      v15 = (const char *)TextData::Get(0xE90C344B);
    else
      v15 = ErrMsgTable::GetErrMsg(*v3);
    GameFrameWork::AddSysMsg(v6, v15);
    if ( v7 )
      EnchantGemWin::SignGemFailed(v7, pvDataa);
    result = iRevBytes;
  }
  return result;
}
// A8C638: using guessed type int `TutorialMgr::GetTutorialMgr'::`2'::`local static guard';

//----- (004B6AC0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_ENCHANT_REMOVE_GEM_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  _WORD *v3; // edx@1
  char *v4; // eax@1
  unsigned __int16 v5; // ax@1
  GameFrameWork *v6; // edi@1
  EnchantGemWin *v7; // esi@1
  Item *v8; // ebx@1
  unsigned int v9; // eax@2
  unsigned int v10; // eax@5
  int v11; // eax@9
  int v12; // eax@11
  char *v13; // eax@13
  int v14; // eax@17
  const char *v15; // eax@19
  int result; // eax@22
  EnchantGemToolTipWin *v17; // ecx@26
  NiUnsharedGeometryGroup *v18; // eax@28
  SHINE_ITEM_STRUCT kStruct; // [sp+Ch] [bp-70h]@9
  SoundIndex rkIndex; // [sp+74h] [bp-8h]@1
  ITEM_INVEN *pvDataa; // [sp+88h] [bp+Ch]@1

  v3 = pvData;
  v4 = (char *)pvData + 2;
  pvDataa = (ITEM_INVEN *)v4;
  v5 = *(_WORD *)v4;
  v6 = this;
  v7 = 0;
  v8 = 0;
  rkIndex.m_acFilename = (char *)this;
  if ( v5 >> 10 == 9 )
  {
    v9 = v5 & 0x3FF;
    if ( v9 >= 0xC0 )
      goto LABEL_17;
    v8 = g_kInventory.m_aspInv[v9].m_pObject;
  }
  else
  {
    if ( v5 >> 10 != 8 )
      goto LABEL_17;
    v10 = v5 & 0x3FF;
    if ( v10 >= 0x1E )
    {
      v8 = 0;
      goto LABEL_17;
    }
    v8 = g_kInventory.m_aspEquip[v10].m_pObject;
  }
  if ( v8 )
  {
    qmemcpy(&kStruct, &v8->m_kStruct, sizeof(kStruct));
    v11 = (unsigned __int8)kStruct.itemattr.weapon.maxSocketCount;
    if ( !kStruct.itemattr.weapon.createdSocketCount )
      v11 = (unsigned __int8)kStruct.itemattr.weapon.maxSocketCount + 1;
    v12 = v11 - 1;
    if ( v12 )
    {
      if ( v12 == 1 )
      {
        v7 = (EnchantGemWin *)*((_DWORD *)rkIndex.m_acFilename + 247);
        v6 = (GameFrameWork *)rkIndex.m_acFilename;
        goto LABEL_17;
      }
      v13 = rkIndex.m_acFilename;
      v7 = (EnchantGemWin *)*((_DWORD *)rkIndex.m_acFilename + 248);
    }
    else
    {
      v13 = rkIndex.m_acFilename;
      v7 = (EnchantGemWin *)*((_DWORD *)rkIndex.m_acFilename + 246);
    }
    v6 = (GameFrameWork *)v13;
  }
LABEL_17:
  v14 = *v3;
  if ( v14 == 8336 )
  {
    if ( (unsigned __int8)((int (__thiscall *)(EnchantGemWin *))v7->vfptr[65].__vecDelDtor)(v7) )
      EnchantGemWin::SignGemSuccess(v7, pvDataa, v8);
    v17 = v6->m_pkEnchantGemToolTipWin;
    if ( v17 )
      EnchantGemToolTipWin::SetEnchantGemDesc(v17, v8);
    rkIndex.m_dwIndex = 3;
    rkIndex.m_acFilename = 0;
    SoundGroupStatic::PlaySoundA((SoundGroupStatic *)&g_kSoundMgr.m_pkInterfaceGroup->vfptr, &rkIndex, 0, 0);
    v18 = TextData3::Get(0x81B4C4D3);
    GameFrameWork::AddSysMsg(v6, (const char *)v18);
    result = iRevBytes;
  }
  else
  {
    if ( (unsigned int)(v14 - 8337) > 4 )
      v15 = (const char *)TextData::Get(0xE90C344B);
    else
      v15 = ErrMsgTable::GetErrMsg(*v3);
    GameFrameWork::AddSysMsg(v6, v15);
    if ( v7 )
      EnchantGemWin::SignGemFailed(v7, pvDataa);
    result = iRevBytes;
  }
  return result;
}

//----- (004B6C20) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_ENCHANT_ADD_NEW_SOCKET_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  __int16 v3; // ax@1
  GameFrameWork *v4; // ebx@1
  __int16 v5; // cx@1
  unsigned int v6; // eax@2
  unsigned int v7; // eax@6
  int v8; // eax@10
  int v9; // eax@12
  EnchantGemWin *v10; // ecx@15
  int v11; // eax@27
  const char *v12; // eax@29
  InventoryWin *v13; // ebx@31
  EnchantGemWin *v15; // esi@35
  EnchantGemToolTipWin *v16; // ecx@38
  InventoryWin *v17; // ebx@40
  SHINE_ITEM_STRUCT kStruct; // [sp+8h] [bp-78h]@10
  SoundIndex rkIndex; // [sp+70h] [bp-10h]@1
  EnchantGemWin *pkWin; // [sp+78h] [bp-8h]@1
  Item *pkWeapon; // [sp+7Ch] [bp-4h]@1

  rkIndex.m_acFilename = (char *)pvData + 2;
  v3 = *((_WORD *)pvData + 1);
  v4 = this;
  v5 = *((_WORD *)pvData + 1) >> 10;
  pkWin = 0;
  pkWeapon = 0;
  if ( v5 == 9 )
  {
    v6 = v3 & 0x3FF;
    if ( v6 >= 0xC0 )
    {
      pkWeapon = 0;
      goto LABEL_27;
    }
    pkWeapon = g_kInventory.m_aspInv[v6].m_pObject;
  }
  else
  {
    if ( v5 != 8 )
      goto LABEL_27;
    v7 = v3 & 0x3FF;
    if ( v7 >= 0x1E )
    {
      pkWeapon = 0;
      goto LABEL_27;
    }
    pkWeapon = g_kInventory.m_aspEquip[v7].m_pObject;
  }
  if ( pkWeapon )
  {
    qmemcpy(&kStruct, &pkWeapon->m_kStruct, sizeof(kStruct));
    v8 = (unsigned __int8)kStruct.itemattr.weapon.maxSocketCount;
    if ( !kStruct.itemattr.weapon.createdSocketCount )
      v8 = (unsigned __int8)kStruct.itemattr.weapon.maxSocketCount + 1;
    v9 = v8 - 1;
    if ( v9 )
    {
      if ( v9 == 1 )
      {
        if ( (unsigned __int8)((int (*)(void))v4->m_pkEnchantGemDeleteWin2->vfptr[65].__vecDelDtor)() )
        {
          v10 = (EnchantGemWin *)&v4->m_pkEnchantGemDeleteWin2->vfptr;
        }
        else
        {
          if ( !(unsigned __int8)((int (*)(void))v4->m_pkEnchantGemWin2->vfptr[65].__vecDelDtor)() )
            goto LABEL_27;
          v10 = v4->m_pkEnchantGemWin2;
        }
      }
      else if ( (unsigned __int8)((int (*)(void))v4->m_pkEnchantGemDeleteWin3->vfptr[65].__vecDelDtor)() )
      {
        v10 = (EnchantGemWin *)&v4->m_pkEnchantGemDeleteWin3->vfptr;
      }
      else
      {
        if ( !(unsigned __int8)((int (*)(void))v4->m_pkEnchantGemWin3->vfptr[65].__vecDelDtor)() )
          goto LABEL_27;
        v10 = v4->m_pkEnchantGemWin3;
      }
    }
    else if ( (unsigned __int8)((int (*)(void))v4->m_pkEnchantGemDeleteWin1->vfptr[65].__vecDelDtor)() )
    {
      v10 = (EnchantGemWin *)&v4->m_pkEnchantGemDeleteWin1->vfptr;
    }
    else
    {
      if ( !(unsigned __int8)((int (*)(void))v4->m_pkEnchantGemWin1->vfptr[65].__vecDelDtor)() )
        goto LABEL_27;
      v10 = v4->m_pkEnchantGemWin1;
    }
    pkWin = v10;
  }
LABEL_27:
  v11 = *(_WORD *)pvData;
  if ( v11 != 8352 )
  {
    if ( (unsigned int)(v11 - 8353) > 4 )
      v12 = (const char *)TextData::Get(0xE90C344B);
    else
      v12 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v4, v12);
    if ( pkWin )
    {
      EnchantGemWin::SignGemFailed(pkWin, (ITEM_INVEN *)rkIndex.m_acFilename);
      v13 = v4->m_pkInventoryWin;
      if ( v13 )
        InventoryWin::OnCreateNewSocket(v13, 0);
    }
    return iRevBytes;
  }
  v15 = pkWin;
  if ( pkWin && (unsigned __int8)((int (__thiscall *)(EnchantGemWin *))pkWin->vfptr[65].__vecDelDtor)(pkWin) )
    EnchantGemWin::SignGemSuccess(v15, (ITEM_INVEN *)rkIndex.m_acFilename, pkWeapon);
  v16 = v4->m_pkEnchantGemToolTipWin;
  if ( v16 )
    EnchantGemToolTipWin::SetEnchantGemDesc(v16, pkWeapon);
  rkIndex.m_dwIndex = 3;
  rkIndex.m_acFilename = 0;
  SoundGroupStatic::PlaySoundA((SoundGroupStatic *)&g_kSoundMgr.m_pkInterfaceGroup->vfptr, &rkIndex, 0, 0);
  v17 = v4->m_pkInventoryWin;
  if ( !v17 )
    return iRevBytes;
  InventoryWin::OnCreateNewSocket(v17, 1);
  return iRevBytes;
}

//----- (004B6E50) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_ENCHANT_SET_GEM_LOT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  unsigned __int16 v3; // ax@1
  unsigned int v4; // eax@2
  Item *v5; // ebx@3
  unsigned int v6; // eax@5
  int v7; // esi@8
  EnchantGemWin *v8; // esi@12
  EnchantGemToolTipWin *v9; // ecx@17
  SHINE_ITEM_STRUCT kStruct; // [sp+4h] [bp-6Ch]@8
  GameFrameWork *v12; // [sp+6Ch] [bp-4h]@1

  v3 = *(_WORD *)pvData;
  v12 = this;
  if ( v3 >> 10 == 9 )
  {
    v4 = v3 & 0x3FF;
    if ( v4 >= 0xC0 )
      return iRevBytes;
    v5 = g_kInventory.m_aspInv[v4].m_pObject;
  }
  else
  {
    if ( v3 >> 10 != 8 )
      return iRevBytes;
    v6 = v3 & 0x3FF;
    if ( v6 >= 0x1E )
      return iRevBytes;
    v5 = g_kInventory.m_aspEquip[v6].m_pObject;
  }
  if ( v5 )
  {
    qmemcpy(&kStruct, &v5->m_kStruct, sizeof(kStruct));
    v7 = (unsigned __int8)kStruct.itemattr.weapon.maxSocketCount;
    if ( !kStruct.itemattr.weapon.createdSocketCount )
      v7 = (unsigned __int8)kStruct.itemattr.weapon.maxSocketCount + 1;
    ((void (__thiscall *)(Item *, _DWORD, _DWORD))v5->vfptr[20].__vecDelDtor)(
      v5,
      *((_BYTE *)pvData + 2),
      *((_BYTE *)pvData + 3));
    if ( v7 == 1 )
    {
      v8 = v12->m_pkEnchantGemWin1;
    }
    else if ( v7 == 2 )
    {
      v8 = v12->m_pkEnchantGemWin2;
    }
    else
    {
      v8 = v12->m_pkEnchantGemWin3;
    }
    if ( (unsigned __int8)((int (__thiscall *)(EnchantGemWin *))v8->vfptr[65].__vecDelDtor)(v8) )
      EnchantGemWin::SignGemSuccess(v8, (ITEM_INVEN *)pvData, v5);
    v9 = v12->m_pkEnchantGemToolTipWin;
    if ( v9 )
      EnchantGemToolTipWin::SetEnchantGemDesc(v9, v5);
  }
  return iRevBytes;
}

//----- (004B6F40) --------------------------------------------------------
void __thiscall GameFrameWork::SendDefaultGameOpt(GameFrameWork *this)
{
  GameFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  LOWORD(netcmd) = 28741;
  PgNet::SendNetMsg((PgNet *)&g_kNetMgr.m_spWorldMgr.m_pObject->vfptr, &netcmd, 2);
}

//----- (004B6F70) --------------------------------------------------------
void __thiscall GameFrameWork::SendDefaultKeyRemappingReq(GameFrameWork *this)
{
  GameFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  LOWORD(netcmd) = 28739;
  PgNet::SendNetMsg((PgNet *)&g_kNetMgr.m_spWorldMgr.m_pObject->vfptr, &netcmd, 2);
}

//----- (004B6FA0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_MYSTERYVAULT_UI_STATE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  unsigned int v4; // eax@3
  Item *v5; // eax@4
  ItemInfo *v6; // esi@5
  unsigned int v7; // ST04_4@8
  unsigned int v8; // eax@8
  int result; // eax@9

  v3 = this;
  if ( *(_BYTE *)pvData == 1
    && Inventory::FindMysteryVault(&g_kInventory, (ITEM_INVEN *)&pvData)
    && (v4 = (unsigned __int16)pvData & 0x3FF, v4 < 0xC0)
    && (v5 = g_kInventory.m_aspInv[v4].m_pObject) != 0 )
  {
    v6 = v5->m_pkInfo;
    if ( v6 )
    {
      if ( (unsigned __int8)((int (*)(void))v3->m_pkMysteryVaultWin->vfptr[65].__vecDelDtor)() )
        GameFrameWork::CloseMysteryVaultWin(v3);
      v7 = v6->DemandLv;
      v8 = User::Lv(&g_kUser);
      MysteryVaultWin::OnReachTheLevel(v3->m_pkMysteryVaultWin, v8, v7);
      GameFrameWork::OpenMysteryVaultWin(v3);
    }
    result = iRevBytes;
  }
  else
  {
    result = iRevBytes;
  }
  return result;
}

//----- (004B7030) --------------------------------------------------------
void __thiscall GameFrameWork::NcMiscSpammerReportReq(GameFrameWork *this, Name5 kID)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  __int16 pdata; // [sp+4h] [bp-1Ch]@1
  PROTO_NC_MISC_SPAMMER_REPORT_REQ kProto; // [sp+8h] [bp-18h]@1

  v2 = this;
  kProto.sSpammerName = kID;
  v3 = this->m_spWorldMgrNet.m_pObject;
  pdata = 2143;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 20);
}

//----- (004B70A0) --------------------------------------------------------
void __thiscall GameFrameWork::NcMiscSpammerChatBanReq(GameFrameWork *this, Name5 kID)
{
  GameFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  __int16 pdata; // [sp+4h] [bp-1Ch]@1
  PROTO_NC_MISC_SPAMMER_CHAT_BAN_REQ kProto; // [sp+8h] [bp-18h]@1

  v2 = this;
  kProto.sSpammerName = kID;
  v3 = this->m_spWorldMgrNet.m_pObject;
  pdata = 2145;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &pdata, 2);
  PgNet::SendNetMsg((PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr, &kProto, 20);
}

//----- (004B7110) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MISC_SPAMMER_CHAT_BAN_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // edx@1
  GameFrameWork *v4; // esi@1
  int v5; // ecx@1
  int v6; // edx@1
  int v7; // ecx@1
  int v8; // eax@1
  char *v9; // eax@2
  const char *v10; // eax@2
  char acName[21]; // [sp+4h] [bp-1Ch]@1

  v3 = *((_DWORD *)pvData + 1);
  v4 = this;
  *(_DWORD *)acName = *(_DWORD *)pvData;
  v5 = *((_DWORD *)pvData + 2);
  *(_DWORD *)&acName[4] = v3;
  v6 = *((_DWORD *)pvData + 3);
  *(_DWORD *)&acName[8] = v5;
  v7 = *((_DWORD *)pvData + 4);
  v8 = *((_WORD *)pvData + 10);
  *(_DWORD *)&acName[12] = v6;
  *(_DWORD *)&acName[16] = v7;
  acName[20] = 0;
  if ( (_WORD)v8 == 8552 )
  {
    v9 = (char *)TextData2::Get(0x21A39D6Du);
    v10 = fs(v9, acName);
  }
  else
  {
    v10 = ErrMsgTable::GetErrMsg(v8);
  }
  GameFrameWork::AddSysMsg(v4, v10);
  return iRevBytes;
}

//----- (004B71A0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MISC_SPAMMER_RELEASE_CHAT_BAN_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@2
  int result; // eax@2
  const char *v6; // eax@3

  v3 = this;
  if ( *(_WORD *)pvData == 8560 )
  {
    v4 = TextData2::Get(0x72A18F74u);
    GameFrameWork::AddSysMsg(v3, (const char *)v4);
    result = iRevBytes;
  }
  else
  {
    v6 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v6);
    result = iRevBytes;
  }
  return result;
}

//----- (004B71F0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ACT_AUTO_WAY_FINDING_USE_GATE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // ebx@1
  MapNavigator *v4; // esi@2
  void *v5; // edi@3
  GTInformWin *v6; // esi@8
  D3DXCOLOR *v7; // eax@9
  D3DXCOLOR v8; // ST04_16@9
  char *v9; // eax@9
  D3DXCOLOR result; // [sp+14h] [bp-10h]@9

  v3 = this;
  if ( *(_WORD *)pvData != 9216 )
  {
    v4 = MapNavigator::GetMapNavigator((NiPointer<MapNavigator> *)&pvData)->m_pObject;
    if ( pvData )
    {
      v5 = pvData;
      if ( !InterlockedDecrement((volatile LONG *)pvData + 1) )
      {
        if ( v5 )
          (**(void (__thiscall ***)(void *, signed int))v5)(v5, 1);
      }
    }
    if ( v4 )
    {
      if ( v4->m_bIsWorking )
      {
        v4->m_bIsWorking = 0;
        v6 = v3->m_pkAutoRunMsgWin;
        if ( v6 )
        {
          GTInformWin::Clear(v3->m_pkAutoRunMsgWin);
          v7 = Color::GetDxColor(&result, -1, -112, 0, -1);
          *(_QWORD *)&v8.r = *(_QWORD *)&v7->r;
          *(_QWORD *)&v8.b = *(_QWORD *)&v7->b;
          v9 = (char *)TextData2::Get(0x3C517589u);
          GTInformWin::AddText(v6, v9, v8, 0, 3.0);
        }
      }
    }
  }
  return iRevBytes;
}

//----- (004B72D0) --------------------------------------------------------
int __userpurge GameFrameWork::On_NC_COLLECT_CARDOPEN_CMD@<eax>(GameFrameWork *this@<ecx>, double a2@<st0>, int iRevBytes, void *pvData)
{
  GameFrameWork *v4; // edi@1
  unsigned int v5; // eax@2
  Item *v6; // esi@3
  unsigned int v7; // ebx@4
  int v8; // eax@4
  ItemInfo *v9; // esi@4
  CollectCard *v10; // eax@5
  const char *v12; // eax@8
  unsigned int uiStar; // [sp+8h] [bp-4h]@4
  int uiSerial; // [sp+18h] [bp+Ch]@4

  v4 = this;
  if ( *(_WORD *)pvData != 11136 )
  {
    CollectCardWin::ResetEffect(this->m_pkCollectCardWin[0]);
    GameFrameWork::OpenCollectCardWin(v4, a2, 0, 0, 0, 0, 0);
    v12 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v4, v12);
    return iRevBytes;
  }
  v5 = *((_BYTE *)pvData + 2);
  if ( v5 >= 0xC0 )
    return iRevBytes;
  v6 = g_kInventory.m_aspInv[v5].m_pObject;
  if ( !v6 )
    return iRevBytes;
  v7 = 0;
  uiSerial = ((int (__thiscall *)(Item *))v6->vfptr[14].__vecDelDtor)(v6);
  v8 = ((int (__thiscall *)(Item *))v6->vfptr[16].__vecDelDtor)(v6);
  v9 = v6->m_pkInfo;
  uiStar = v8;
  if ( v9 )
  {
    v10 = CollectCardTab::GetByItemInx(v9->InxName);
    if ( v10 )
      v7 = v10->CC_CardID;
  }
  CollectCardWin::SetInfo(v4->m_pkCollectCardWin[0], v7, uiStar, uiSerial, 0);
  CollectCardWin::OpenCard(v4->m_pkCollectCardWin[0]);
  return iRevBytes;
}

//----- (004B73B0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_COLLECT_BOOKMARK_REGIST_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@3
  CollectWin *v5; // ecx@5
  const char *v7; // eax@7

  v3 = this;
  if ( *((_WORD *)pvData + 2) == 11168 )
  {
    if ( *((_WORD *)pvData + 1) == -1 )
      v4 = TextData2::Get(0xB5E1DDDF);
    else
      v4 = TextData2::Get(0x4C7F8F8Cu);
    GameFrameWork::AddSysMsg(v3, (const char *)v4);
    v5 = v3->m_pkCollectWin;
    if ( v5 )
    {
      CollectWin::SetBookmark(v5, *(_WORD *)pvData, *((_WORD *)pvData + 1));
      CollectWin::Update(v3->m_pkCollectWin, 0);
      return iRevBytes;
    }
  }
  else
  {
    v7 = ErrMsgTable::GetErrMsg(*((_WORD *)pvData + 2));
    GameFrameWork::AddSysMsg(v3, v7);
  }
  return iRevBytes;
}

//----- (004B7440) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_COLLECT_REWARD_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  CollectWin *v4; // ecx@2
  NiUnsharedGeometryGroup *v5; // eax@4
  int result; // eax@4
  const char *v7; // eax@5

  v3 = this;
  if ( *((_WORD *)pvData + 1) == 11176 )
  {
    v4 = this->m_pkCollectWin;
    if ( v4 )
    {
      CollectWin::SetReward(v4, *(_WORD *)pvData, 1);
      CollectWin::Update(v3->m_pkCollectWin, 0);
    }
    v5 = TextData2::Get(0xACFBB5B0);
    GameFrameWork::AddSysMsg(v3, (const char *)v5);
    result = iRevBytes;
  }
  else
  {
    v7 = ErrMsgTable::GetErrMsg(*((_WORD *)pvData + 1));
    GameFrameWork::AddSysMsg(v3, v7);
    result = iRevBytes;
  }
  return result;
}

//----- (004B74B0) --------------------------------------------------------
void __thiscall GameFrameWork::NcCollectPeepingReq(GameFrameWork *this, Name5 *kCharID)
{
  GameFrameWork *v2; // edi@1
  Net *v3; // ecx@1
  unsigned int v4; // edx@1
  __int64 v5; // kr00_8@1
  PgNet *v6; // ecx@1
  NETCOMMAND netcmd; // [sp+8h] [bp-1Ch]@1
  PROTO_NC_COLLECT_PEEPING_REQ kProto; // [sp+Ch] [bp-18h]@1

  v2 = this;
  v3 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = -15359;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = kCharID->n5_code[0];
  v5 = *(_QWORD *)&kCharID->n5_code[1];
  kProto.charname.n5_code[2] = *(_QWORD *)&kCharID->n5_code[1] >> 32;
  *(_QWORD *)&kProto.charname.n5_name[0] = __PAIR__(v5, v4);
  v6 = (PgNet *)&v2->m_spZoneNet.m_pObject->vfptr;
  *(_QWORD *)&kProto.charname.n5_code[3] = *(_QWORD *)&kCharID->n5_code[3];
  PgNet::SendNetMsg(v6, &kProto, 20);
}

//----- (004B7530) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_EQUIP_BELONGED_CANCEL_USE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  InventoryWin *v4; // eax@1
  unsigned int v5; // ecx@1
  ItemIcon *v6; // ecx@2
  Item *v7; // eax@3
  const char *v8; // eax@6
  int result; // eax@6
  ItemInfo *v10; // eax@8
  int v11; // ST04_4@9
  char *v12; // eax@9
  const char *v13; // eax@9

  v3 = this;
  InventoryWin::ms_uiMode = 0;
  v4 = this->m_pkInventoryWin;
  v5 = v4->m_uiReceiverInvPos;
  if ( v5 < 0xC0 && (v6 = (ItemIcon *)&v4->m_apkInvWin[v5]->vfptr) != 0 )
    v7 = ItemIcon::GetItem(v6);
  else
    v7 = 0;
  if ( *(_WORD *)pvData == 10368 )
  {
    if ( v7 )
    {
      v10 = v7->m_pkInfo;
      if ( v10 )
      {
        v11 = (int)v10->Name;
        v12 = (char *)TextData2::Get(0x6DF3BFF1u);
        v13 = fs(v12, v11);
        GameFrameWork::AddSysMsg(v3, v13);
      }
    }
    InventoryWin::StartSuccessEffect(v3->m_pkInventoryWin);
    SoundMgr::PlayInterfaceSound(&g_kSoundMgr, PutOnClear);
    result = iRevBytes;
  }
  else
  {
    v8 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v8);
    result = iRevBytes;
  }
  return result;
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (004B75E0) --------------------------------------------------------
int __userpurge GameFrameWork::On_NC_CHAR_EVENT_ATTENDANCE_CHECK_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<edi>, int iRevBytes, void *pvData)
{
  GameFrameWork *v4; // esi@1
  char *v5; // eax@2
  char *v6; // eax@3
  int v7; // eax@4

  v4 = this;
  if ( this->m_pkWelcomeMsgWin )
  {
    v5 = (char *)TextData2::Get(0xD7323F31);
    AnnounceWin::AddText(v4->m_pkWelcomeMsgWin, a2, (int)v4, v5, &Color::m_kDxGreenColor, 1, 10.0);
  }
  v6 = (char *)TextData2::Get(0x79C8E7C9u);
  GameFrameWork::AddAuthorMsg(v4, v6);
  AttendCheckWin::CheckIt(v4->m_pkAttendCheckWin);
  if ( (unsigned __int8)((int (*)(void))v4->m_pkAttendCheckWin->vfptr[65].__vecDelDtor)() )
  {
    v7 = AttendCheckWin::GetMonthRewardIndex(v4->m_pkAttendCheckWin);
    if ( v7 != -1 )
    {
      GameFrameWork::NcCharEventAttendRewardReq(v4, v7, 27);
      return iRevBytes;
    }
  }
  else
  {
    AttendIconWin::SetActive(v4->m_pkAttendIconWin, 1);
  }
  return iRevBytes;
}

//----- (004B7690) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MOVER_RIDE_ON_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // ebx@1
  _BYTE *v4; // esi@1
  Mover *v5; // eax@1
  Mover *v6; // edi@1
  void *v7; // ecx@2
  _BYTE v8[12]; // ST10_12@3
  _BYTE v9[12]; // ST04_12@3
  NiUnsharedGeometryGroup *v10; // eax@5
  void (__thiscall ***v11)(_DWORD, _DWORD); // esi@7

  v3 = this;
  v4 = pvData;
  v5 = (Mover *)CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  v6 = v5;
  if ( v5 )
  {
    Mover::RideOn(v5, g_pkMainChar, v4[2]);
    Mover::GetSlotNode(v6, (NiPointer<NiNode> *)&pvData, v4[2]);
    v7 = pvData;
    if ( pvData )
    {
      *(float *)v8 = NiPoint3::UNIT_Y.x;
      *(_QWORD *)&v8[4] = *(_QWORD *)&NiPoint3::UNIT_Y.y;
      *(_DWORD *)v9 = *((_DWORD *)pvData + 35);
      *(_QWORD *)&v9[4] = *((_QWORD *)pvData + 18);
      EffectMgr::CreateEffect(&g_kEffectMgr, "Pet_St01", *(NiPoint3 *)v9, *(NiPoint3 *)v8, Timer::ms_fCurTime, 1.0);
      v7 = pvData;
    }
    if ( !v4[2] )
    {
      v10 = TextData::Get(0x43482579u);
      GameFrameWork::AddSysMsg(v3, (const char *)v10);
      GameFrameWork::OpenFeedMoverWin(v3, *(_WORD *)v4, v4[3]);
      v7 = pvData;
    }
    if ( v7 )
    {
      v11 = (void (__thiscall ***)(_DWORD, _DWORD))v7;
      if ( !InterlockedDecrement((volatile LONG *)v7 + 1) )
      {
        if ( v11 )
          (**v11)(v11, 1);
      }
    }
  }
  else
  {
    GameFrameWork::NcBriefInfoCmd(v3, *(_WORD *)v4, 51, 2);
  }
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004B77F0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MOVER_RIDE_OFF_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  Mover *v4; // esi@2
  _BYTE v5[12]; // ST10_12@4
  _BYTE v6[12]; // ST04_12@4
  NiNode *v7; // esi@7
  NiPointer<NiNode> spSlotNode; // [sp+18h] [bp-10h]@3
  int v10; // [sp+24h] [bp-4h]@3

  v3 = this;
  if ( g_pkMainChar )
  {
    v4 = g_pkMainChar->m_pkMover;
    if ( v4 )
    {
      Mover::GetSlotNode(v4, &spSlotNode, g_pkMainChar->m_uiMoverSlot);
      v10 = 0;
      if ( spSlotNode.m_pObject )
      {
        *(float *)v5 = NiPoint3::UNIT_Y.x;
        *(_QWORD *)&v5[4] = *(_QWORD *)&NiPoint3::UNIT_Y.y;
        *(float *)v6 = spSlotNode.m_pObject->m_kWorld.m_Translate.x;
        *(_QWORD *)&v6[4] = *(_QWORD *)&spSlotNode.m_pObject->m_kWorld.m_Translate.y;
        EffectMgr::CreateEffect(&g_kEffectMgr, "Pet_Fi01", *(NiPoint3 *)v6, *(NiPoint3 *)v5, Timer::ms_fCurTime, 1.0);
      }
      Mover::SetMoverEffect(v4, 0, 0, 0);
      Mover::RideOff(v4, g_pkMainChar->m_uiMoverSlot);
      if ( (unsigned __int8)GameFrameWork::sRideOffValue::IsMove(&v3->m_kRideOffValue) )
      {
        GameFrameWork::OnPickGround(v3, &v3->m_kRideOffValue.m_kGroundPos, v3->m_kRideOffValue.m_bViewPoint);
        v3->m_kRideOffValue.m_kSkillID = -1;
        v3->m_kRideOffValue.m_pkTarget = 0;
        v3->m_kRideOffValue.m_kPoint.x = 0;
        v3->m_kRideOffValue.m_kPoint.y = 0;
        v3->m_kRideOffValue.m_kGroundPos = NiPoint3::ZERO;
        v3->m_kRideOffValue.m_bViewPoint = 0;
      }
      v7 = spSlotNode.m_pObject;
      v10 = -1;
      if ( spSlotNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spSlotNode.m_pObject->m_uiRefCount) && v7 )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    }
  }
  GameFrameWork::CloseFeedMoverWin(v3);
  GameFrameWork::ChangeRun();
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004B7990) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MOVER_HUNGRY_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  FeedMoverWin *v4; // eax@1
  NiUnsharedGeometryGroup *v5; // eax@7

  v3 = this;
  v4 = this->m_pkFeedMoverWin;
  if ( v4 )
  {
    if ( !v4->m_uiHungryPoint && *(_WORD *)pvData )
      GameFrameWork::ChangeRun();
    v3->m_pkFeedMoverWin->m_uiHungryPoint = *(_WORD *)pvData;
    FeedMoverWin::UpdateHungryPoint(v3->m_pkFeedMoverWin);
  }
  if ( !*(_WORD *)pvData )
  {
    GameFrameWork::ChangeWalk();
    v5 = TextData::Get(0x81A4DDE2);
    GameFrameWork::AddSysMsg(v3, (const char *)v5);
  }
  return iRevBytes;
}

//----- (004B7A00) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_PET_SET_NAME_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  int v4; // eax@1
  PupMain *v5; // edi@2
  NpcDialogWin *v6; // ebx@3
  char *v7; // eax@3
  int result; // eax@4
  const char *v9; // eax@5

  v3 = this;
  v4 = *(_WORD *)pvData;
  if ( (_WORD)v4 == 13520 )
  {
    v5 = PetMainTab::GetByPetID(*(_DWORD *)((char *)pvData + 2));
    if ( v5 )
    {
      NpcDialogWin::CloseDialog(v3->m_pkNpcDlgWin);
      v6 = v3->m_pkNpcDlgWin;
      v7 = (char *)TextData3::Get(0x847B6C8E);
      NpcDialogWin::OpenNpcScriptDialog(v6, v5->PupIDX, v7, 1);
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkNpcDlgWin->vfptr);
    }
    result = iRevBytes;
  }
  else
  {
    v9 = ErrMsgTable::GetErrMsg(v4);
    GameFrameWork::AddSysMsg(v3, v9);
    result = iRevBytes;
  }
  return result;
}

//----- (004B7A90) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_PET_SET_NAME_CANCEL_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  int v4; // eax@1
  PupMain *v5; // edi@2
  NpcDialogWin *v6; // ebx@3
  char *v7; // eax@3
  int result; // eax@4
  const char *v9; // eax@5

  v3 = this;
  v4 = *(_WORD *)pvData;
  if ( (_WORD)v4 == 13520 )
  {
    v5 = PetMainTab::GetByPetID(*(_DWORD *)((char *)pvData + 2));
    if ( v5 )
    {
      NpcDialogWin::CloseDialog(v3->m_pkNpcDlgWin);
      v6 = v3->m_pkNpcDlgWin;
      v7 = (char *)TextData3::Get(0x857B6C8E);
      NpcDialogWin::OpenNpcScriptDialog(v6, v5->PupIDX, v7, 1);
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkNpcDlgWin->vfptr);
    }
    result = iRevBytes;
  }
  else
  {
    v9 = ErrMsgTable::GetErrMsg(v4);
    GameFrameWork::AddSysMsg(v3, v9);
    result = iRevBytes;
  }
  return result;
}

//----- (004B7B20) --------------------------------------------------------
void __stdcall GameFrameWork::NcPetSetNameReq(unsigned __int16 kPetHandle, Name4 kPetName)
{
  PROTO_NC_PET_SET_NAME_REQ kProto; // [sp+0h] [bp-18h]@1

  kProto.sPetName = kPetName;
  kProto.nPetHandle = kPetHandle;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x35u, 7u, &kProto, 18);
}

//----- (004B7B80) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_AUTO_ARRANGE_INVEN_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  InventoryWin *v4; // eax@2
  NiPointer<NiNode> *v5; // eax@3
  SpEffect *v6; // ecx@3
  NiNode *v7; // ST00_4@3
  NiNode *v8; // edi@4
  NiNode *v9; // eax@7
  NiPointer<NiNode> *v10; // eax@7
  SpEffect *v11; // ecx@7
  NiNode *v12; // ST00_4@7
  NiNode *v13; // edi@8
  const char *v14; // eax@12
  NiPointer<NiNode> v16; // [sp+Ch] [bp-14h]@7
  NiPointer<NiNode> result; // [sp+10h] [bp-10h]@3
  int v18; // [sp+1Ch] [bp-4h]@3

  v3 = this;
  if ( *(_WORD *)pvData == 12456 )
  {
    v4 = this->m_pkInventoryWin;
    if ( v4 )
    {
      v4->m_apkArrangeButEff->m_spEffect.m_pObject->m_uFlags &= 0xFFFEu;
      v5 = InventoryWin::GetRunArrangeButEff(this->m_pkInventoryWin, &result);
      v6 = v3->m_pkInventoryWin->m_apkArrangeButEff;
      v7 = v5->m_pObject;
      v18 = 0;
      SpEffect::Start(v6, v7);
      v18 = -1;
      if ( result.m_pObject )
      {
        v8 = result.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
        {
          if ( v8 )
            v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
        }
      }
      v9 = v3->m_pkInventoryWin->m_apkArrangeInvenEff->m_spEffect.m_pObject;
      v9->m_uFlags &= 0xFFFEu;
      v10 = InventoryWin::GetRunArrangeInvenEff(v3->m_pkInventoryWin, &v16);
      v11 = v3->m_pkInventoryWin->m_apkArrangeInvenEff;
      v12 = v10->m_pObject;
      v18 = 1;
      SpEffect::Start(v11, v12);
      v18 = -1;
      if ( v16.m_pObject )
      {
        v13 = v16.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&v16.m_pObject->m_uiRefCount) )
        {
          if ( v13 )
            v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
        }
      }
    }
    SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_ItemSort);
  }
  v14 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
  GameFrameWork::AddSysMsg(v3, v14);
  return iRevBytes;
}

//----- (004B7CE0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MISC_ITEMSHOP_URL_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  __int16 v3; // ax@1
  GameFrameWork *v4; // esi@1
  ShopWin *v5; // ecx@5
  NiUnsharedGeometryGroup *v7; // eax@7

  v3 = *(_WORD *)pvData;
  v4 = this;
  if ( *(_WORD *)pvData == 12353 || v3 == 12354 || v3 == 12355 )
  {
    v7 = TextData2::Get(0x265A978Fu);
    GameFrameWork::AddSysMsg(v4, (const char *)v7);
  }
  else if ( v3 == 12352 )
  {
    v5 = this->m_pkShopWin;
    if ( v5 )
    {
      ShopWin::SetItemShopUrl(v5, (char *)pvData + 4, *((_WORD *)pvData + 1));
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkShopWin->vfptr);
      return iRevBytes;
    }
  }
  return iRevBytes;
}

//----- (004B7D70) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_KQ_VOTE_START_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@4
  NiUnsharedGeometryGroup *v6; // eax@5

  v3 = this;
  if ( *(_WORD *)pvData == 12547 )
  {
    v6 = TextData2::Get(0xC004311C);
    goto LABEL_7;
  }
  if ( *(_WORD *)pvData == 12552 )
  {
    v6 = TextData2::Get(0x2564A485u);
LABEL_7:
    GameFrameWork::AddSysMsg(v3, (const char *)v6);
    return iRevBytes;
  }
  if ( *(_WORD *)pvData == 12553 )
  {
    v4 = TextData3::Get(0x51B58EBFu);
    GameFrameWork::AddSysMsg(v3, (const char *)v4);
    return iRevBytes;
  }
  return iRevBytes;
}

//----- (004B7DD0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_KQ_VOTE_VOTING_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  VoteWin *v4; // eax@1
  KQ_VOTING_TYPE v5; // eax@3
  int v6; // eax@4
  char *v7; // eax@6
  const char *v8; // eax@7
  NiUnsharedGeometryGroup *v10; // eax@9
  char *v11; // [sp-4h] [bp-8h]@6

  v3 = this;
  v4 = this->m_pkVoteWin;
  if ( v4 && *(_WORD *)pvData == 12560 )
  {
    v5 = v4->m_eVoteType;
    if ( v5 )
    {
      v6 = v5 - 1;
      if ( !v6 )
      {
        v11 = this->m_acTarget;
        v7 = (char *)TextData2::Get(0x39939695u);
        goto LABEL_7;
      }
      if ( v6 == 1 )
      {
        v11 = this->m_acTarget;
        v7 = (char *)TextData2::Get(0x8D98D7DB);
LABEL_7:
        v8 = fs(v7, v11);
        GameFrameWork::AddSysMsg(v3, v8);
        return iRevBytes;
      }
    }
    else
    {
      v10 = TextData2::Get(0x91B0E8D5);
      GameFrameWork::AddSysMsg(v3, (const char *)v10);
    }
  }
  return iRevBytes;
}

//----- (004B7E60) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_KQ_VOTE_CANCEL_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  int v4; // edx@2
  int v5; // eax@2
  char *v6; // eax@2
  const char *v7; // eax@2
  char acTarget[21]; // [sp+4h] [bp-1Ch]@2

  v3 = this;
  if ( this->m_pkVoteWin )
  {
    v4 = *((_DWORD *)pvData + 1);
    *(_DWORD *)acTarget = *(_DWORD *)pvData;
    *(_DWORD *)&acTarget[8] = *((_DWORD *)pvData + 2);
    *(_DWORD *)&acTarget[4] = v4;
    v5 = *((_DWORD *)pvData + 4);
    *(_DWORD *)&acTarget[12] = *((_DWORD *)pvData + 3);
    *(_DWORD *)&acTarget[16] = v5;
    acTarget[20] = 0;
    v6 = (char *)TextData2::Get(0x7FFDEBD5u);
    v7 = fs(v6, acTarget);
    GameFrameWork::AddSysMsg(v3, v7);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkVoteWin->vfptr);
  }
  return iRevBytes;
}

//----- (004B7EF0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_KQ_VOTE_BAN_MSG_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // eax@1
  unsigned int v4; // edi@2
  unsigned int v5; // esi@4
  char *v6; // eax@5
  int v8; // ST0C_4@10
  int v9; // ST08_4@10
  int v10; // ST04_4@10
  char *v11; // eax@10
  const char *v12; // eax@10
  GameFrameWork *v13; // [sp+8h] [bp-4h]@1

  v3 = *(_DWORD *)(ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::ms_pkTable + 56);
  v13 = this;
  if ( v3 )
    v4 = *(_DWORD *)(v3 + 40);
  else
    v4 = 0;
  v5 = 0;
  if ( v4 )
  {
    while ( 1 )
    {
      v6 = CDataReader::GetRecord(
             (CDataReader *)(ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::ms_pkTable + 4),
             v5);
      if ( !v6 )
        break;
      if ( *(_BYTE *)pvData == *v6 )
      {
        if ( v5 )
        {
          v12 = (const char *)TextData2::Get(0x19484A1Du);
        }
        else
        {
          v8 = *((_BYTE *)pvData + 3);
          v9 = *((_BYTE *)pvData + 2);
          v10 = *((_BYTE *)pvData + 1);
          v11 = (char *)TextData2::Get(0x90A79CDA);
          v12 = fs(v11, v10, v9, v8);
        }
        GameFrameWork::AddSysMsg(v13, v12);
        return iRevBytes;
      }
      if ( ++v5 >= v4 )
        return iRevBytes;
    }
  }
  return iRevBytes;
}
// A8C240: using guessed type int ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::ms_pkTable;

//----- (004B7F90) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_KQ_VOTE_BAN_MSG_LOGOFF_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@1

  v3 = this;
  v4 = TextData2::Get(0x25394A21u);
  GameFrameWork::AddSysMsg(v3, (const char *)v4);
  return iRevBytes;
}

//----- (004B7FC0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_KQ_VOTE_START_CHECK_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  VoteWin *v4; // ecx@1
  NiUnsharedGeometryGroup *v5; // eax@4

  v3 = this;
  v4 = this->m_pkVoteWin;
  if ( v4 )
  {
    if ( *(_WORD *)pvData == 12576 )
    {
      VoteWin::SetVoteWinType(v4, 1);
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkVoteWin->vfptr);
    }
    else if ( *(_WORD *)pvData == 12578 )
    {
      v5 = TextData3::Get(0xBC43381D);
      GameFrameWork::AddSysMsg(v3, (const char *)v5);
      return iRevBytes;
    }
  }
  return iRevBytes;
}

//----- (004B8020) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_QUEST_JOBDUNGEON_LINK_FAIL_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData == 12482 )
  {
    v4 = TextData::Get(0x7AAFCF08u);
    GameFrameWork::AddSysMsg(v3, (const char *)v4);
  }
  return iRevBytes;
}

//----- (004B8050) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_KQ_TEAM_SELECT_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // eax@1
  GameFrameWork *v4; // esi@1
  char *v5; // eax@2
  KingdomQuestWin *v6; // eax@2
  KingdomQuestTeamList *v7; // esi@2
  char v8; // al@3
  NiUnsharedGeometryGroup *v9; // eax@4
  GameFrameWork *v10; // ecx@4
  GameFrameWork *v12; // [sp+Ch] [bp-34h]@1
  Name5 kName; // [sp+10h] [bp-30h]@2
  PROTO_NC_KQ_TEAM_SELECT_CMD kTeamSelectInfo; // [sp+24h] [bp-1Ch]@2

  v3 = *(_WORD *)pvData;
  v4 = this;
  v12 = this;
  if ( (_WORD)v3 == 12784 )
  {
    *(_QWORD *)&kTeamSelectInfo.sCharID.n5_code[3] = 0i64;
    *(_QWORD *)&kTeamSelectInfo.sCharID.n5_code[1] = 0i64;
    kTeamSelectInfo.sCharID.n5_code[0] = 0;
    *(_QWORD *)&kName.n5_code[3] = 0i64;
    *(_QWORD *)&kName.n5_code[1] = 0i64;
    *(_QWORD *)&kName.n5_name[0] = 0i64;
    v5 = (char *)((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)();
    STRING_TO_NAME(v5, &kName);
    kTeamSelectInfo.sCharID = kName;
    v6 = v4->m_pkKingDomQuest;
    kTeamSelectInfo.nTeamType = *((_BYTE *)pvData + 2);
    v7 = v6->m_pkKingdomQuestTeamList;
    if ( v7 )
    {
      KingdomQuestTeamList::SetElement(v7, &kTeamSelectInfo);
      KingdomQuestTeamList::UpdateList(v7);
      KingdomQuestTeamList::SetSelectedTeam(v7, *((_BYTE *)pvData + 2));
      v8 = *((_BYTE *)pvData + 2);
      if ( !v8 )
      {
        v9 = TextData3::Get(0x3533043Bu);
        v10 = v12;
LABEL_11:
        GameFrameWork::AddSysMsg(v10, (const char *)v9);
        return iRevBytes;
      }
      if ( v8 == 1 )
      {
        v9 = TextData3::Get(0x3A3E0379u);
        v10 = v12;
        goto LABEL_11;
      }
    }
  }
  else
  {
    switch ( v3 )
    {
      case 12785:
      case 12786:
      case 12787:
      case 12789:
      case 12790:
      case 12791:
        v9 = TextData3::Get(0x1AA74246u);
        goto LABEL_10;
      case 12788:
        v9 = TextData3::Get(0x5996302Du);
LABEL_10:
        v10 = v4;
        goto LABEL_11;
      default:
        return iRevBytes;
    }
  }
  return iRevBytes;
}

//----- (004B8190) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_RANDOMOPTION_CHANGE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  int v4; // eax@1
  NiUnsharedGeometryGroup *v5; // eax@3

  v3 = this;
  v4 = *(_WORD *)pvData;
  if ( v4 == 12872 )
  {
    this->m_pkRandomOptionWin->m_bSuccess = 1;
    RandomOptionWin::SetChangeAbleOption(this->m_pkRandomOptionWin, (ItemOptionStorage *)((char *)pvData + 2));
  }
  else if ( (unsigned int)(v4 - 12873) <= 7 )
  {
    v5 = TextData3::Get(0xE5E9C8C3);
    GameFrameWork::AddSysMsg(v3, (const char *)v5);
    return iRevBytes;
  }
  return iRevBytes;
}

//----- (004B81F0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_USEITEM_MINIMON_NORMAL_ITEM_ON_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@3

  v3 = this;
  if ( *(_WORD *)pvData == 13864 )
  {
    MinimonAutoItemUseWin::SetAutoUseBuffItem(this->m_pkMinimonAutoItemUseWin, 1);
  }
  else if ( *(_WORD *)pvData == 13867 )
  {
    v4 = TextData3::Get(0xB282A8Au);
    GameFrameWork::AddSysMsg(v3, (const char *)v4);
    return iRevBytes;
  }
  return iRevBytes;
}

//----- (004B8240) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_USEITEM_MINIMON_CHARGED_ITEM_ON_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@3

  v3 = this;
  if ( *(_WORD *)pvData == 13880 )
  {
    MinimonAutoItemUseWin::SetAutoUseChargedItem(this->m_pkMinimonAutoItemUseWin, 1);
  }
  else if ( *(_WORD *)pvData == 13883 )
  {
    v4 = TextData3::Get(0xB282A8Au);
    GameFrameWork::AddSysMsg(v3, (const char *)v4);
    return iRevBytes;
  }
  return iRevBytes;
}

//----- (004B8290) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_REPURCHASE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@4
  NiUnsharedGeometryGroup *v6; // eax@7

  v3 = this;
  if ( *(_WORD *)pvData == 13931 )
  {
    v6 = TextData3::Get(0x46DDC2A9u);
    GameFrameWork::AddSysMsg(v3, (const char *)v6);
  }
  else
  {
    if ( *(_WORD *)pvData == 13932 )
    {
      v4 = TextData::Get(0x299F4B7Bu);
      goto LABEL_5;
    }
    if ( *(_WORD *)pvData == 13933 )
    {
      v4 = TextData::Get(0x20611375u);
LABEL_5:
      GameFrameWork::AddSysMsg(v3, (const char *)v4);
      return iRevBytes;
    }
  }
  return iRevBytes;
}

//----- (004B82F0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ITEM_CLASS_CHANGE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  ClassChangeWin *v4; // ecx@2
  int result; // eax@2
  NiUnsharedGeometryGroup *v6; // eax@3
  NiUnsharedGeometryGroup *v7; // eax@4
  NiUnsharedGeometryGroup *v8; // eax@5
  const char *v9; // eax@6

  v3 = this;
  switch ( *(_WORD *)pvData )
  {
    case 0x3680:
      v4 = this->m_pkClassChangeWin;
      ClassChangeWin::GoCharSelectFrameWork();
      result = iRevBytes;
      break;
    case 0x3682:
      v6 = TextData3::Get(0x54A4445Fu);
      GameFrameWork::AddSysMsg(v3, (const char *)v6);
      result = iRevBytes;
      break;
    case 0x3685:
      v7 = TextData3::Get(0x539A5864u);
      GameFrameWork::AddSysMsg(v3, (const char *)v7);
      result = iRevBytes;
      break;
    case 0x3684:
      v8 = TextData3::Get(0x79E4867u);
      GameFrameWork::AddSysMsg(v3, (const char *)v8);
      result = iRevBytes;
      break;
    default:
      v9 = fs("Error Class Change[ %d ]", *(_WORD *)pvData);
      GameFrameWork::AddSysMsg(v3, v9);
      result = iRevBytes;
      break;
  }
  return result;
}

//----- (004B83B0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_INSTANCE_DUNGEON_RANK_TAB_DAMAGEDEALT_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  void *v3; // eax@1
  GameFrameWork *v4; // esi@1
  NiUnsharedGeometryGroup *v5; // eax@3
  IDRankingWin *v7; // ecx@4

  v3 = pvData;
  v4 = this;
  if ( *((_WORD *)pvData + 6) == 14848 )
  {
    v7 = this->m_pkIDRankingWin;
    if ( v7 )
    {
      pvData = (void *)*((_BYTE *)pvData + 18);
      IDRankingWin::SetRankInfo(
        v7,
        *(float *)&v4,
        (const unsigned int *)((char *)v3 + 14),
        (const int *)&pvData,
        (SHINE_INDUN_RANK_CLIENT_VALUE *)((char *)v3 + 19),
        (PROTO_AVATAR_SHAPE_INFO *)v3,
        (PROTO_AVATAR_SHAPE_INFO *)v3 + 1,
        (PROTO_AVATAR_SHAPE_INFO *)v3 + 2);
    }
  }
  else if ( *((_WORD *)pvData + 6) == 14849 )
  {
    v5 = TextData3::Get(0x938F63DA);
    GameFrameWork::AddSysMsg(v4, (const char *)v5);
    return iRevBytes;
  }
  return iRevBytes;
}

//----- (004B8420) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_INSTANCE_DUNGEON_RANK_TAB_DAMAGETAKEN_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  void *v3; // eax@1
  GameFrameWork *v4; // esi@1
  NiUnsharedGeometryGroup *v5; // eax@3
  IDRankingWin *v7; // ecx@4

  v3 = pvData;
  v4 = this;
  if ( *((_WORD *)pvData + 6) == 14848 )
  {
    v7 = this->m_pkIDRankingWin;
    if ( v7 )
    {
      pvData = (void *)*((_BYTE *)pvData + 18);
      IDRankingWin::SetRankInfo(
        v7,
        *(float *)&v4,
        (const unsigned int *)((char *)v3 + 14),
        (const int *)&pvData,
        (SHINE_INDUN_RANK_CLIENT_VALUE *)((char *)v3 + 19),
        (PROTO_AVATAR_SHAPE_INFO *)v3,
        (PROTO_AVATAR_SHAPE_INFO *)v3 + 1,
        (PROTO_AVATAR_SHAPE_INFO *)v3 + 2);
    }
  }
  else if ( *((_WORD *)pvData + 6) == 14849 )
  {
    v5 = TextData3::Get(0x938F63DA);
    GameFrameWork::AddSysMsg(v4, (const char *)v5);
    return iRevBytes;
  }
  return iRevBytes;
}

//----- (004B8490) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_INSTANCE_DUNGEON_RANK_TAB_HEALINGDONE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  void *v3; // eax@1
  GameFrameWork *v4; // esi@1
  NiUnsharedGeometryGroup *v5; // eax@3
  IDRankingWin *v7; // ecx@4

  v3 = pvData;
  v4 = this;
  if ( *((_WORD *)pvData + 6) == 14848 )
  {
    v7 = this->m_pkIDRankingWin;
    if ( v7 )
    {
      pvData = (void *)*((_BYTE *)pvData + 18);
      IDRankingWin::SetRankInfo(
        v7,
        *(float *)&v4,
        (const unsigned int *)((char *)v3 + 14),
        (const int *)&pvData,
        (SHINE_INDUN_RANK_CLIENT_VALUE *)((char *)v3 + 19),
        (PROTO_AVATAR_SHAPE_INFO *)v3,
        (PROTO_AVATAR_SHAPE_INFO *)v3 + 1,
        (PROTO_AVATAR_SHAPE_INFO *)v3 + 2);
    }
  }
  else if ( *((_WORD *)pvData + 6) == 14849 )
  {
    v5 = TextData3::Get(0x938F63DA);
    GameFrameWork::AddSysMsg(v4, (const char *)v5);
    return iRevBytes;
  }
  return iRevBytes;
}

//----- (004B8500) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_INSTANCE_DUNGEON_RANK_TAB_MYRANK_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@3
  IDRankingWin *v6; // ecx@4

  v3 = this;
  if ( *(_WORD *)pvData == 14848 )
  {
    v6 = this->m_pkIDRankingWin;
    if ( v6 )
      IDRankingWin::SetMyRecord(v6, (PROTO_NC_INSTANCE_DUNGEON_RANK_TAB_MYRANK_ACK *)pvData);
  }
  else if ( *(_WORD *)pvData == 14849 )
  {
    v4 = TextData3::Get(0x938F63DA);
    GameFrameWork::AddSysMsg(v3, (const char *)v4);
    return iRevBytes;
  }
  return iRevBytes;
}

//----- (004B8550) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_INSTANCE_DUNGEON_RANK_NEW_RANK_MSG(int iRevBytes, void *pvData)
{
  MapInfo *v3; // eax@1
  NiUnsharedGeometryGroup *v4; // eax@2
  char *v6; // [sp-8h] [bp-110h]@6
  char *v7; // [sp-4h] [bp-10Ch]@6
  char chID[128]; // [sp+4h] [bp-104h]@1
  char chRankType[128]; // [sp+84h] [bp-84h]@6

  v3 = MapInfoTab::GetByMapName((Name3 *)((char *)pvData + 20));
  strncpy(chID, v3->Name, 0x20u);
  if ( *((_BYTE *)pvData + 32) == 2 )
  {
    v4 = TextData3::Get(0x4026F785u);
    strncat(chID, (const char *)v4, 0x80u);
  }
  if ( !*((_BYTE *)pvData + 33) )
  {
    v7 = (char *)TextData3::Get(0x9390A4C8);
    v6 = chRankType;
    goto LABEL_9;
  }
  if ( *((_BYTE *)pvData + 33) == 1 )
  {
    v7 = (char *)TextData3::Get(0x2E342C63u);
    v6 = chRankType;
    goto LABEL_9;
  }
  if ( *((_BYTE *)pvData + 33) == 2 )
  {
    v7 = (char *)TextData3::Get(0x9E846385);
    v6 = chRankType;
LABEL_9:
    strncpy(v6, v7, 0x80u);
  }
  return iRevBytes;
}

//----- (004B8630) --------------------------------------------------------
void __thiscall GameFrameWork::NcInstanceDungeonRankTabDamagetakenReq(GameFrameWork *this, SHINE_INDUN_INFO *rInfo)
{
  GameFrameWork *v2; // edi@1
  Net *v3; // ecx@1
  unsigned int v4; // edx@1
  unsigned int v5; // ecx@1
  PgNet *v6; // ecx@1
  NETCOMMAND netcmd; // [sp+8h] [bp-18h]@1
  PROTO_NC_INSTANCE_DUNGEON_RANK_TAB_DAMAGETAKEN_REQ kProto; // [sp+Ch] [bp-14h]@1

  v2 = this;
  v3 = this->m_spWorldMgrNet.m_pObject;
  netcmd.protocol = -23524;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = rInfo->MapIDClient.n3_code[0];
  v5 = rInfo->MapIDClient.n3_code[2];
  kProto.sIndunInfo.MapIDClient.n3_code[1] = rInfo->MapIDClient.n3_code[1];
  kProto.sIndunInfo.MapIDClient.n3_code[0] = v4;
  LOBYTE(v4) = rInfo->ModeIDLv;
  kProto.sIndunInfo.MapIDClient.n3_code[2] = v5;
  v6 = (PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr;
  kProto.sIndunInfo.ModeIDLv = v4;
  PgNet::SendNetMsg(v6, &kProto, 13);
}

//----- (004B86A0) --------------------------------------------------------
void __thiscall GameFrameWork::NcInstanceDungeonRankTabHealingdoneReq(GameFrameWork *this, SHINE_INDUN_INFO *rInfo)
{
  GameFrameWork *v2; // edi@1
  Net *v3; // ecx@1
  unsigned int v4; // edx@1
  unsigned int v5; // ecx@1
  PgNet *v6; // ecx@1
  NETCOMMAND netcmd; // [sp+8h] [bp-18h]@1
  PROTO_NC_INSTANCE_DUNGEON_RANK_TAB_HEALINGDONE_REQ kProto; // [sp+Ch] [bp-14h]@1

  v2 = this;
  v3 = this->m_spWorldMgrNet.m_pObject;
  netcmd.protocol = -23523;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = rInfo->MapIDClient.n3_code[0];
  v5 = rInfo->MapIDClient.n3_code[2];
  kProto.sIndunInfo.MapIDClient.n3_code[1] = rInfo->MapIDClient.n3_code[1];
  kProto.sIndunInfo.MapIDClient.n3_code[0] = v4;
  LOBYTE(v4) = rInfo->ModeIDLv;
  kProto.sIndunInfo.MapIDClient.n3_code[2] = v5;
  v6 = (PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr;
  kProto.sIndunInfo.ModeIDLv = v4;
  PgNet::SendNetMsg(v6, &kProto, 13);
}

//----- (004B8710) --------------------------------------------------------
void __thiscall GameFrameWork::NcInstanceDungeonRankTabMyRankReq(GameFrameWork *this, SHINE_INDUN_INFO *rInfo)
{
  GameFrameWork *v2; // edi@1
  Net *v3; // ecx@1
  unsigned int v4; // edx@1
  unsigned int v5; // ecx@1
  PgNet *v6; // ecx@1
  NETCOMMAND netcmd; // [sp+8h] [bp-18h]@1
  PROTO_NC_INSTANCE_DUNGEON_RANK_TAB_MYRANK_REQ kProto; // [sp+Ch] [bp-14h]@1

  v2 = this;
  v3 = this->m_spWorldMgrNet.m_pObject;
  netcmd.protocol = -23522;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = rInfo->MapIDClient.n3_code[0];
  v5 = rInfo->MapIDClient.n3_code[2];
  kProto.sIndunInfo.MapIDClient.n3_code[1] = rInfo->MapIDClient.n3_code[1];
  kProto.sIndunInfo.MapIDClient.n3_code[0] = v4;
  LOBYTE(v4) = rInfo->ModeIDLv;
  kProto.sIndunInfo.MapIDClient.n3_code[2] = v5;
  v6 = (PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr;
  kProto.sIndunInfo.ModeIDLv = v4;
  PgNet::SendNetMsg(v6, &kProto, 13);
}

//----- (004B8780) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MAP_LINKOTHER_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  MHDiceGameTask *v4; // edi@1
  void *v5; // ecx@1
  int v6; // eax@1
  PrivateStoreWin *v7; // ecx@1
  MHDiceGameTask *v8; // ecx@4
  MHDiceGameTask *v9; // ebx@4
  MHDiceGameTask *v10; // ecx@9
  GTTDiceWin *v11; // eax@17
  GTTDiceWin *v12; // eax@18
  GuildTournamentScheduleWin *v13; // eax@19
  GuildTournamentScheduleWin *v14; // eax@20
  GuildNpcMenuWin *v15; // eax@21
  GuildNpcMenuWin *v16; // eax@22
  GuildTournamentBaseWin *v17; // eax@23
  GuildTournamentBaseWin *v18; // eax@24
  GTStatusWin *v19; // eax@25
  GTStatusWin *v20; // eax@26
  GTStatusMiniWin *v21; // eax@27
  GTStatusMiniWin *v22; // eax@28
  AnnounceWin *v23; // ecx@29
  CameraEffect *v24; // ecx@33
  MarketSearchWin *v25; // ecx@37
  NiPointer<MHDiceGameTask> v27; // [sp+24h] [bp-14h]@9
  NiPointer<MHDiceGameTask> result; // [sp+28h] [bp-10h]@4
  int v29; // [sp+34h] [bp-4h]@4

  v3 = this;
  v4 = 0;
  PgNet::SetSendPacketMode((PgNet *)&this->m_spZoneNet.m_pObject->vfptr, 0);
  v5 = pvData;
  v3->m_kNextFrameWorkID = LinkFrameWorkID;
  *(_DWORD *)&v3->m_kProtoNcMapLinkOtherCmd.link.mapid = *(_DWORD *)v5;
  *(unsigned int *)((char *)&v3->m_kProtoNcMapLinkOtherCmd.link.location.x + 2) = *((_DWORD *)v5 + 1);
  v6 = (int)&v3->m_kProtoNcMapLinkOtherCmd;
  *(_WORD *)(v6 + 8) = *((_WORD *)v5 + 4);
  *(_DWORD *)(v6 + 10) = *(_DWORD *)((char *)v5 + 10);
  *(_DWORD *)(v6 + 14) = *(_DWORD *)((char *)v5 + 14);
  *(_DWORD *)(v6 + 18) = *(_DWORD *)((char *)v5 + 18);
  *(_DWORD *)(v6 + 22) = *(_DWORD *)((char *)v5 + 22);
  *(_WORD *)(v6 + 26) = *((_WORD *)v5 + 13);
  *(_WORD *)(v6 + 28) = *((_WORD *)v5 + 14);
  v7 = v3->m_pkPrivateStoreWin;
  v3->m_bLinkSameServer = 0;
  v3->m_kNextFrameWorkMsg.m_uiFramelParam = (unsigned int)&v3->m_kProtoNcMapLinkOtherCmd.link.mapid;
  v3->m_kNextFrameWorkMsg.m_uiFrameWParam = 0;
  if ( v7 && (unsigned __int8)((int (*)(void))v7->vfptr[65].__vecDelDtor)() )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkPrivateStoreWin->vfptr);
  PgNet::Close((PgNet *)&v3->m_spZoneNet.m_pObject->vfptr);
  MiniMapWin::ClearWithOutMainChar(v3->m_pkMiniMapWin);
  MiniMapWin::ClearParty(v3->m_pkMiniMapWin);
  MiniMapWin::RemoveAllMapMark(v3->m_pkMiniMapWin);
  MiniMapWin::RemoveAllKQTeamMark(v3->m_pkMiniMapWin);
  PkRealTiemRankWin::Close(v3->m_pkKQPKRealTimeRankWin, 1);
  PkKqRankingWin::Clear(v3->m_pkPkKqRankingWin);
  ((void (__stdcall *)(_DWORD))v3->m_pkPkKqRankingWin->vfptr[64].__vecDelDtor)(0);
  CastingProgressWin::CastingFail(v3->m_pkCastingProgressBar);
  v3->m_kSkillCasting.eState = 0;
  v8 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  v29 = 0;
  LOBYTE(v9) = MHDiceGameTask::IsDicegamePlaying(v8);
  v29 = -1;
  if ( result.m_pObject )
  {
    v4 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
  }
  if ( (_BYTE)v9 )
  {
    LOWORD(pvData) = 7312;
    v10 = MHDiceGameTask::GetDiceGameTask(&v27)->m_pObject;
    v29 = 1;
    MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_LEAVE_ACK(v10, (PROTO_NC_DICE_TAISAI_GAME_LEAVE_ACK *)&pvData);
    v29 = -1;
    if ( v27.m_pObject )
    {
      v9 = v27.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&v27.m_pObject->m_uiRefCount) )
      {
        if ( v9 )
          v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      }
    }
  }
  GameFrameWork::CloseMHInfoWin(v3, 1);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkMHMouseControlWin->vfptr);
  if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[20].Deaffect)() )
    Char::Shape_UnMetamorphosis(g_pkMainChar, 0);
  PkRealTiemRankWin::Close(v3->m_pkKQPKRealTimeRankWin, 1);
  PkKqRankingWin::Clear(v3->m_pkPkKqRankingWin);
  ((void (__stdcall *)(_DWORD))v3->m_pkPkKqRankingWin->vfptr[64].__vecDelDtor)(0);
  GameFrameWork::CloseMapLinkGateWin(v3);
  if ( v3->m_kCharMover.m_bAutoRun )
    KeyboardMoveProcess::SetAutoRun(&v3->m_kCharMover, 0);
  GameFrameWork::Stick(v3, 0, 0);
  v11 = GuildTask::GetGTTDiceWin();
  if ( (unsigned __int8)((int (__thiscall *)(GTTDiceWin *))v11->vfptr[65].__vecDelDtor)(v11) )
  {
    v12 = GuildTask::GetGTTDiceWin();
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v12->vfptr);
  }
  v13 = GuildTask::GetGuildTournamentScheduleWin();
  if ( (unsigned __int8)((int (__thiscall *)(GuildTournamentScheduleWin *))v13->vfptr[65].__vecDelDtor)(v13) )
  {
    v14 = GuildTask::GetGuildTournamentScheduleWin();
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v14->vfptr);
  }
  v15 = GuildTask::GetGuildNpcMenuWin();
  if ( (unsigned __int8)((int (__thiscall *)(GuildNpcMenuWin *))v15->vfptr[65].__vecDelDtor)(v15) )
  {
    v16 = GuildTask::GetGuildNpcMenuWin();
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v16->vfptr);
  }
  v17 = GuildTask::GetGuildTournamnetBaseWin();
  if ( (unsigned __int8)((int (__thiscall *)(GuildTournamentBaseWin *))v17->vfptr[65].__vecDelDtor)(v17) )
  {
    v18 = GuildTask::GetGuildTournamnetBaseWin();
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v18->vfptr);
  }
  MiniMapWin::ShowGTQuit(v3->m_pkMiniMapWin, 0);
  v19 = GuildTask::GetGTStatusWin();
  if ( (unsigned __int8)((int (__thiscall *)(GTStatusWin *))v19->vfptr[65].__vecDelDtor)(v19) )
  {
    v20 = GuildTask::GetGTStatusWin();
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v20->vfptr);
  }
  v21 = GuildTask::GetGTStatusMiniWin();
  if ( (unsigned __int8)((int (__thiscall *)(GTStatusMiniWin *))v21->vfptr[65].__vecDelDtor)(v21) )
  {
    v22 = GuildTask::GetGTStatusMiniWin();
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v22->vfptr);
  }
  MachineOpt::SaveUserInfo((unsigned __int8)v9, (int)v4);
  v23 = v3->m_pkRemainAnnounceWin;
  if ( v23 )
    AnnounceWin::KillNoticing(v23);
  if ( v3->m_pkIDTimeWin )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkIDTimeWin->vfptr);
  v24 = v3->m_spCamEffect.m_pObject;
  if ( v24 )
    CameraEffect::ClearMove(v24);
  PgFrameWork::PostFrameMsgPop((PgFrameWork *)&v3->vfptr, LinkFrameWorkID, &v3->m_kNextFrameWorkMsg);
  CNSTimer_Interval::ReSet(&stru_A96B34, Timer::ms_fCurTime);
  unk_A96B31 = 0;
  if ( v3->m_pkVoteWin )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkVoteWin->vfptr);
  EffectMgr::RemoveAllClientEff(&g_kEffectMgr);
  v25 = v3->m_pkMarketSearchWin;
  if ( v25 )
  {
    MarketSearchWin::CloseSearchingMsgBox(v25);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkMarketSearchWin->vfptr);
  }
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkEventTimeWin->vfptr);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkEventRankWin->vfptr);
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004B8BB0) --------------------------------------------------------
int __userpurge GameFrameWork::On_NC_MAP_FREEPKZONE_ON_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<edi>, int iRevBytes, void *pvData)
{
  GameFrameWork *v4; // esi@1
  char *v5; // eax@3
  D3DXCOLOR v6; // ST04_16@7
  char *v7; // eax@7
  char v9; // [sp-10h] [bp-24h]@2
  char v10; // [sp-Ch] [bp-20h]@2
  char v11; // [sp-8h] [bp-1Ch]@2
  char v12; // [sp-4h] [bp-18h]@2
  D3DXCOLOR result; // [sp+4h] [bp-10h]@4

  v4 = this;
  this->m_pkAnnounceWin->m_bNotice = 1;
  if ( !*(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable )
  {
    v12 = -1;
    v11 = -1;
    v10 = ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable[0];
    v9 = -1;
LABEL_6:
    Color::GetDxColor(&result, v9, v10, v11, v12);
    goto LABEL_7;
  }
  v5 = CDataReader::GetRecord(
         (CDataReader *)(*(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable + 4),
         0x32u);
  v12 = -1;
  if ( v5 )
  {
    v11 = v5[6];
    v10 = v5[5];
    v9 = v5[4];
    goto LABEL_6;
  }
  Color::GetDxColor(&result, -1, 0, -1, -1);
LABEL_7:
  *(_QWORD *)&v6.r = *(_QWORD *)&result.r;
  *(_QWORD *)&v6.b = *(_QWORD *)&result.b;
  v7 = (char *)TextData2::Get(0x8AF6DEFC);
  GameFrameWork::AddAnnounceMsg(v4, a2, (int)v4, v7, v6);
  LODWORD(result.b) = 2;
  LODWORD(result.a) = 0;
  SoundGroupStatic::PlaySoundA(
    (SoundGroupStatic *)&g_kSoundMgr.m_pkInterfaceGroup->vfptr,
    (SoundIndex *)&result.b,
    0,
    0);
  BYTE3(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) |= 2u;
  return iRevBytes;
}

//----- (004B8C90) --------------------------------------------------------
int __userpurge GameFrameWork::On_NC_MAP_PARTYBATTLEZONE_ON_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<edi>, int iRevBytes, void *pvData)
{
  GameFrameWork *v4; // esi@1
  char *v5; // eax@3
  D3DXCOLOR v6; // ST04_16@7
  char *v7; // eax@7
  char v9; // [sp-10h] [bp-24h]@2
  char v10; // [sp-Ch] [bp-20h]@2
  char v11; // [sp-8h] [bp-1Ch]@2
  char v12; // [sp-4h] [bp-18h]@2
  D3DXCOLOR result; // [sp+4h] [bp-10h]@4

  v4 = this;
  this->m_pkAnnounceWin->m_bNotice = 1;
  if ( !*(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable )
  {
    v12 = -1;
    v11 = -1;
    v10 = ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable[0];
    v9 = -1;
LABEL_6:
    Color::GetDxColor(&result, v9, v10, v11, v12);
    goto LABEL_7;
  }
  v5 = CDataReader::GetRecord(
         (CDataReader *)(*(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable + 4),
         0x32u);
  v12 = -1;
  if ( v5 )
  {
    v11 = v5[6];
    v10 = v5[5];
    v9 = v5[4];
    goto LABEL_6;
  }
  Color::GetDxColor(&result, -1, 0, -1, -1);
LABEL_7:
  *(_QWORD *)&v6.r = *(_QWORD *)&result.r;
  *(_QWORD *)&v6.b = *(_QWORD *)&result.b;
  v7 = (char *)TextData2::Get(0x8AF6DEFC);
  GameFrameWork::AddAnnounceMsg(v4, a2, (int)v4, v7, v6);
  LODWORD(result.b) = 2;
  LODWORD(result.a) = 0;
  SoundGroupStatic::PlaySoundA(
    (SoundGroupStatic *)&g_kSoundMgr.m_pkInterfaceGroup->vfptr,
    (SoundIndex *)&result.b,
    0,
    0);
  BYTE3(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) |= 1u;
  return iRevBytes;
}

//----- (004B8D70) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_MINIHOUSE_FURNITURE_EFFECT_CMD(int iRevBytes, void *pvData)
{
  _WORD *v3; // esi@1
  char *v4; // edi@1
  unsigned __int16 v5; // bx@2
  Char *v6; // eax@5
  Char *v7; // esi@5
  char *v8; // edi@6
  int v9; // eax@7
  _BYTE v10[12]; // ST10_12@7
  _BYTE v11[12]; // ST04_12@7
  NiPoint3 *v12; // eax@10
  MiniHouseFurnitureObjEffect *pkInfo; // [sp+14h] [bp-4h]@1

  v3 = pvData;
  v4 = CDataReader::GetRecord(
         (CDataReader *)(ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::ms_pkTable + 4),
         *(_WORD *)pvData);
  pkInfo = (MiniHouseFurnitureObjEffect *)v4;
  if ( v4 )
  {
    v5 = 0;
    if ( *((_WORD *)pvData + 1) > 0u )
    {
      while ( 1 )
      {
        v6 = CharMgr::GetChar(&g_kCharMgr, v3[v5 + 2]);
        v7 = v6;
        if ( v6 )
        {
          v8 = v4 + 146;
          if ( *v8 != 45 )
          {
            v9 = ((int (__thiscall *)(Char *))v6->vfptr[6].Deaffect)(v6);
            *(float *)v10 = NiPoint3::UNIT_Y.x;
            *(_QWORD *)&v10[4] = *(_QWORD *)&NiPoint3::UNIT_Y.y;
            *(_DWORD *)v11 = *(_DWORD *)v9;
            *(_QWORD *)&v11[4] = *(_QWORD *)(v9 + 4);
            EffectMgr::CreateEffect(&g_kEffectMgr, v8, *(NiPoint3 *)v11, *(NiPoint3 *)v10, Timer::ms_fCurTime, 1.0);
          }
          if ( pkInfo->EffectSound[0] != 45 && v7->vfptr->IsVisible((AbStateInfectee *)v7) == 1 )
          {
            v12 = (NiPoint3 *)((int (__thiscall *)(Char *))v7->vfptr[6].Deaffect)(v7);
            SoundMgr::CreateSound(&g_kSoundMgr, pkInfo->EffectSound, v12);
          }
        }
        v3 = pvData;
        if ( ++v5 >= *((_WORD *)pvData + 1) )
          break;
        v4 = (char *)pkInfo;
      }
    }
  }
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8C14C: using guessed type int ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::ms_pkTable;

//----- (004B8E90) --------------------------------------------------------
int __userpurge GameFrameWork::On_NC_ACT_SOMEONEMOVERUN_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<ebx>, int a3@<esi>, int iRevBytes, void *pvData)
{
  void *v5; // edi@1
  Char *v6; // eax@2
  Char *v7; // esi@2
  int v8; // eax@4
  float v9; // ecx@4
  double v10; // st7@4
  float v11; // edx@4
  float v12; // eax@4
  int v13; // edx@4
  double v14; // st7@4
  int v15; // eax@6
  double v16; // st7@6
  int v17; // ecx@8
  double v18; // st7@8
  signed int v19; // eax@12
  void (__thiscall *v20)(AbStateInfectee *, ABSTATEINDEX, bool, int); // edx@13
  double v21; // st7@13
  float v22; // ST20_4@15
  float fY; // ST1C_4@15
  float fX; // ST18_4@15
  void (__thiscall *v26)(AbStateInfectee *, ABSTATEINDEX, bool, int); // edx@17
  int v27; // [sp+20h] [bp-54h]@2
  NiPoint3 kPos; // [sp+28h] [bp-4Ch]@15
  NiPoint3 pos3From; // [sp+34h] [bp-40h]@8
  NiPoint3 pos3To; // [sp+40h] [bp-34h]@4
  float v31; // [sp+4Ch] [bp-28h]@10
  float v32; // [sp+50h] [bp-24h]@10
  float v33; // [sp+54h] [bp-20h]@10
  NiPoint3 pos3Cur; // [sp+58h] [bp-1Ch]@4
  unsigned int *v35; // [sp+64h] [bp-10h]@4
  float fGapLength; // [sp+68h] [bp-Ch]@10
  float fMoveLength; // [sp+6Ch] [bp-8h]@10
  float v38; // [sp+70h] [bp-4h]@4
  void *pvDataa; // [sp+80h] [bp+Ch]@6
  void *pvDatab; // [sp+80h] [bp+Ch]@13

  v5 = pvData;
  if ( g_pkMainChar->m_kHandle != *(_WORD *)pvData )
  {
    v27 = a3;
    v6 = GameFrameWork::GetCharByHandle(this, *(_WORD *)pvData, 8, 26);
    v7 = v6;
    if ( v6 )
    {
      Char::ClearTraceMove(v6);
      if ( !(unsigned __int8)((int (__thiscall *)(Char *))v7->vfptr[10].Affect)(v7) )
      {
        MobViewInfoTab::GetByID(v7->m_kCharShape.m_kMobID);
        v8 = ((int (__thiscall *)(Char *, int, int))v7->vfptr[6].Deaffect)(v7, a2, v27);
        v9 = *(float *)v8;
        v10 = (double)*(unsigned int *)((char *)pvData + 10);
        v11 = *(float *)(v8 + 4);
        v12 = *(float *)(v8 + 8);
        pos3Cur.x = v9;
        pos3Cur.y = v11;
        pos3Cur.z = v12;
        v13 = *(_DWORD *)((char *)pvData + 14);
        v38 = v10;
        pos3To.x = v38;
        v35 = (unsigned int *)((char *)pvData + 14);
        v14 = (double)*(signed int *)((char *)pvData + 14);
        if ( v13 < 0 )
          v14 = v14 + 4294967300.0;
        v15 = *(_DWORD *)((char *)pvData + 2);
        *(float *)&pvDataa = v14;
        pos3To.y = *(float *)&pvDataa;
        v16 = (double)*(signed int *)((char *)v5 + 2);
        if ( v15 < 0 )
          v16 = v16 + 4294967300.0;
        v17 = *(_DWORD *)((char *)v5 + 6);
        pos3From.x = v16;
        v18 = (double)*(signed int *)((char *)v5 + 6);
        if ( v17 < 0 )
          v18 = v18 + 4294967300.0;
        pos3From.y = v18;
        v31 = pos3Cur.x - pos3To.x;
        v32 = pos3Cur.y - pos3To.y;
        v33 = pos3Cur.z - pos3Cur.z;
        fMoveLength = v32 * v32 + v31 * v31 + v33 * v33;
        fMoveLength = sqrt(fMoveLength);
        fGapLength = fMoveLength;
        v31 = pos3From.x - pos3To.x;
        v32 = pos3From.y - pos3To.y;
        v33 = pos3Cur.z - pos3Cur.z;
        fMoveLength = v32 * v32 + v31 * v31 + v33 * v33;
        fMoveLength = sqrt(fMoveLength);
        if ( 0.0 != fGapLength && fMoveLength != 0.0 && (v19 = *((_WORD *)v5 + 9), (_WORD)v19) )
        {
          v20 = v7->vfptr[8].SetAbStateProperty;
          *(float *)&pvDatab = fGapLength * ((double)v19 / fMoveLength);
          v21 = *(float *)&pvDatab;
        }
        else
        {
          ((void (__thiscall *)(Char *, _DWORD, void *, _DWORD))v7->vfptr[7].IsVisible)(v7, LODWORD(v38), pvDataa, 0);
          v20 = v7->vfptr[8].SetAbStateProperty;
          v21 = (double)*((_WORD *)v5 + 9);
        }
        v22 = v21;
        ((void (__thiscall *)(Char *, _DWORD))v20)(v7, LODWORD(v22));
        fX = (double)*(unsigned int *)((char *)v5 + 10);
        fY = (double)*v35;
        World::GetAdvGroundPos(&g_kWorld, fX, fY, &kPos);
        if ( ((int (__thiscall *)(Char *))v7->vfptr[7].Affect)(v7) == 1 )
        {
          ((void (__thiscall *)(Char *, NiPoint3 *, _DWORD))v7->vfptr[7].SetAbStateProperty)(v7, &kPos, 0);
          return iRevBytes;
        }
        ((void (__thiscall *)(Char *, signed int, _DWORD, _DWORD))v7->vfptr[7].Deaffect)(
          v7,
          1,
          LODWORD(kPos.x),
          LODWORD(kPos.y));
        v26 = v7->vfptr[7].SetAbStateProperty;
        LODWORD(kPos.y) = 1;
        LODWORD(kPos.x) = &Char::INVALIDPOINT3;
        ((void (__thiscall *)(Char *))v26)(v7);
      }
    }
  }
  return iRevBytes;
}
// 4B8E90: could not find valid save-restore pair for ebx
// 4B8E90: could not find valid save-restore pair for esi

//----- (004B9120) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ACT_NOTICE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  unsigned __int8 v3; // bl@1
  GameFrameWork *v4; // esi@1
  NiUnsharedGeometryGroup *v5; // eax@2
  AnnounceWin *v6; // edx@2
  D3DXCOLOR *v7; // eax@2
  D3DXCOLOR v8; // ST14_16@2
  D3DXCOLOR result; // [sp+Ch] [bp-198h]@2
  char acText[256]; // [sp+1Ch] [bp-188h]@2
  char v12; // [sp+11Ch] [bp-88h]@2
  char acStr[128]; // [sp+120h] [bp-84h]@2

  v3 = *((_BYTE *)pvData + 1);
  v4 = this;
  if ( v3 )
  {
    memset(acStr, 0, 0x80u);
    strncpy(acStr, (char *)pvData + 2, v3);
    acStr[*((_BYTE *)pvData + 1)] = 0;
    memset(acText, 0, 0x100u);
    v5 = TextData::Get(0x3830508Au);
    sprintf(acText, (const char *)v5, acStr);
    v6 = v4->m_pkAnnounceWin;
    v12 = 0;
    v6->m_bNotice = 1;
    v7 = ColorInfoTable::GetDxColor(&result, Center_Announcement);
    *(_QWORD *)&v8.r = *(_QWORD *)&v7->r;
    *(_QWORD *)&v8.b = *(_QWORD *)&v7->b;
    GameFrameWork::AddAnnounceMsg(v4, (int)pvData, (int)v4, acText, v8);
    GameFrameWork::AddAuthorMsg(v4, acText);
  }
  return iRevBytes;
}

//----- (004B9220) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ACT_NPCMENUOPEN_REQ(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  MobViewInfo *v4; // eax@1
  int result; // eax@3

  v3 = this;
  (*(void (__stdcall **)(_DWORD))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 16))(*(_WORD *)pvData);
  v4 = MobViewInfoTab::GetByID(*(_WORD *)pvData);
  if ( v4 && v4->MiniMapIcon == 23 )
  {
    GameFrameWork::OpenMapLinkGateWin(v3);
    result = iRevBytes;
  }
  else if ( (unsigned __int8)((int (*)(void))v3->m_pkItemShopWin2->vfptr[65].__vecDelDtor)()
         || (unsigned __int8)((int (*)(void))v3->m_pkItemShopWin->vfptr[65].__vecDelDtor)()
         || (unsigned __int8)((int (*)(void))v3->m_pkStorageWin->vfptr[65].__vecDelDtor)()
         || (unsigned __int8)((int (*)(void))v3->m_pkNPCSkillWin->vfptr[65].__vecDelDtor)()
         || (unsigned __int8)((int (*)(void))v3->m_pkNPCSoulWin->vfptr[65].__vecDelDtor)() )
  {
    OutputDebugStringA("\ni don't open the dialog since shop is open\n");
    result = iRevBytes;
  }
  else
  {
    NpcDialogWin::OpenNpcNormalDialog(v3->m_pkNpcDlgWin, *(_WORD *)pvData, 0);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkNpcDlgWin->vfptr);
    result = iRevBytes;
  }
  return result;
}
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;

//----- (004B9310) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_ABSTATEINFORM_NOEFFECT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  _DWORD *v4; // ebx@2
  unsigned int v5; // eax@2
  double v6; // st7@3
  AbnormalStateInfo *v7; // eax@5
  AbnormalStateInfo *v8; // esi@5
  int v9; // edi@6
  int v10; // esi@6
  int v11; // edx@8
  int v12; // eax@9
  char v13; // al@12
  NiUnsharedGeometryGroup *v14; // eax@21
  NiUnsharedGeometryGroup *v15; // eax@26
  GameFrameWork *v17; // [sp+18h] [bp-8h]@1
  float fTime; // [sp+1Ch] [bp-4h]@5
  AbnormalStateInfo *pkInfo; // [sp+2Ch] [bp+Ch]@5

  v3 = this;
  v17 = this;
  if ( g_pkMainChar )
  {
    v4 = pvData;
    v5 = *((_DWORD *)pvData + 1);
    if ( v5 == -1 )
      v6 = -3.0;
    else
      v6 = (double)v5 / 1000.0;
    fTime = v6;
    v7 = AbnormalStateInfoTab::GetByAbstateIndex(*(_WORD *)pvData);
    v8 = v7;
    pkInfo = v7;
    if ( v7 )
    {
      v9 = v7->ID;
      v10 = ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable,
                              v9) )
      {
        if ( (unsigned __int16)v9 <= *(_WORD *)(v10 + 200) )
        {
          v11 = *(_DWORD *)(v10 + 196);
          if ( *(_DWORD *)(v11 + 4 * v9) )
          {
            v12 = *(_DWORD *)(v11 + 4 * v9);
            if ( v12 )
            {
              if ( *(_BYTE *)(v12 + 398) != 45 && pkInfo->AbStateSaveType )
              {
                v13 = ((int (__stdcall *)(_DWORD, _DWORD, _DWORD))g_pkMainChar->vfptr->AddAbStateByAbstateIndex)(
                        *v4,
                        LODWORD(fTime),
                        0);
                v3 = v17;
                v8 = pkInfo;
              }
              else
              {
                v13 = ((int (__stdcall *)(_DWORD, _DWORD, signed int))g_pkMainChar->vfptr->AddAbStateByAbstateIndex)(
                        *v4,
                        LODWORD(fTime),
                        1);
                v3 = v17;
                v8 = pkInfo;
              }
LABEL_16:
              if ( !v13 || !v8 )
                return iRevBytes;
              if ( v8->DispelIndex == 3 )
              {
                v14 = TextData::Get(0x4EFACDCBu);
              }
              else if ( v8->DispelIndex == 4 )
              {
                v14 = TextData::Get(0x6808C3CCu);
              }
              else
              {
                if ( v8->DispelIndex != 5 )
                  goto LABEL_25;
                v14 = TextData::Get(0xA653383u);
              }
              GameFrameWork::AddSysMsg(v3, (const char *)v14);
LABEL_25:
              if ( v8->AbStataIndex == 337 )
              {
                v15 = TextData2::Get(0x4F19C4B8u);
                GameFrameWork::AddSysMsg(v3, (const char *)v15);
              }
              return iRevBytes;
            }
          }
        }
      }
      v3 = v17;
      v8 = pkInfo;
    }
    v13 = BYTE3(iRevBytes);
    goto LABEL_16;
  }
  return iRevBytes;
}
// A8C2A4: using guessed type int ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;

//----- (004B9480) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_DOTDAMAGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  void *v3; // ebx@1
  GameFrameWork *v4; // esi@1
  Char *v5; // eax@1
  Char *v6; // edi@1
  int v7; // edx@3
  unsigned __int16 v8; // ax@6
  unsigned __int16 v9; // ax@6
  ShortCutWin **v10; // esi@6
  unsigned __int16 v11; // ax@7
  unsigned __int16 v12; // ax@7
  int v13; // eax@9
  unsigned int v14; // esi@21
  AbnormalStateInfo *v15; // eax@39
  AbnormalStateViewInfo *v16; // eax@40
  int iDamage; // [sp+28h] [bp-8h]@3
  bool bDotHeal; // [sp+2Fh] [bp-1h]@21

  v3 = pvData;
  v4 = this;
  v5 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  v6 = v5;
  if ( !*(_DWORD *)((char *)v3 + 2) || !v5 )
    return iRevBytes;
  v7 = *((_WORD *)v3 + 3);
  iDamage = *((_WORD *)v3 + 3);
  if ( v5 == g_pkMainChar && v7 > 0 )
  {
    if ( MainChar::IsAirBorneState((MainChar *)g_pkMainChar) )
    {
      v8 = MainChar::GetAirBorneID((MainChar *)g_pkMainChar);
      ShortCutWin::IsStartCollTime(v4->m_pkShortCutWin, v8);
      v9 = MainChar::GetAirBorneID((MainChar *)g_pkMainChar);
      ShortCutWin::IsStartCollTime(v4->m_pkShortCutWinV, v9);
      v10 = v4->m_pkShortCutSubWinV;
      pvData = (void *)4;
      do
      {
        v11 = MainChar::GetAirBorneID((MainChar *)g_pkMainChar);
        ShortCutWin::IsStartCollTime(*(v10 - 5), v11);
        v12 = MainChar::GetAirBorneID((MainChar *)g_pkMainChar);
        ShortCutWin::IsStartCollTime(*v10, v12);
        ++v10;
        pvData = (char *)pvData - 1;
      }
      while ( pvData );
    }
    v7 = iDamage;
  }
  v13 = *((_WORD *)v3 + 4);
  BYTE3(pvData) = 1;
  if ( v13 == 14 || (_WORD)v13 == 339 )
    BYTE3(pvData) = 0;
  if ( (_WORD)v13 == 822 )
    BYTE3(pvData) = 0;
  if ( v7 > 0 && BYTE3(pvData) )
    ((void (__thiscall *)(Char *, int, signed int))v6->vfptr[12].GetAbstateColor)(v6, v7, 1);
  if ( !*(_DWORD *)((char *)v3 + 2) )
  {
    if ( Char::IsResource(v6) )
      Char::ActResourceDisappearing(v6);
    else
      ((void (__thiscall *)(Char *))v6->vfptr[20].Affect)(v6);
  }
  v14 = ((int (__thiscall *)(Char *))v6->vfptr[2].~AbStateInfectee)(v6);
  bDotHeal = 0;
  if ( !(unsigned __int8)((int (__thiscall *)(Char *))v6->vfptr[1].Affect)(v6) && !iDamage )
  {
    if ( v14 == 1 )
    {
      if ( *(_DWORD *)((char *)v3 + 2) <= 1u )
        goto LABEL_28;
    }
    else if ( *(_DWORD *)((char *)v3 + 2) < v14 )
    {
      goto LABEL_28;
    }
    bDotHeal = 1;
  }
LABEL_28:
  if ( ((int (__thiscall *)(Char *))v6->vfptr[2].~AbStateInfectee)(v6) > 0 )
  {
    Char::HpUpdate(v6, *((_WORD *)v3 + 5), *(_DWORD *)((char *)v3 + 2));
    if ( v6->m_kHandle == LOWORD(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[7].dwEffectIndex[1]) )
      Char::TOTHpUpdate(v6, *((_WORD *)v3 + 5), *(_DWORD *)((char *)v3 + 2));
  }
  if ( !bDotHeal && BYTE3(pvData) )
    TextEffMgr::AddDamage(&g_kTextEffMgr, *(_WORD *)v3, iDamage);
  if ( !iDamage && BYTE3(pvData) && *((_BYTE *)v3 + 12) == 1 )
    TextEffMgr::AddMissTextEff(&g_kTextEffMgr, *(_WORD *)v3);
  if ( *((_WORD *)v3 + 4) != -1 )
  {
    v15 = AbnormalStateInfoTab::GetByAbstateIndex(*((_WORD *)v3 + 4));
    if ( v15 )
    {
      v16 = IIDTableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab,unsigned short>::GetByID(v15->ID);
      if ( v16 )
      {
        if ( v16->DOTEffect[0] != 45 )
          EffectMgr::CreateAttachEffect(
            &g_kEffectMgr,
            (unsigned int *)&pvData,
            v16->DOTEffect,
            v6,
            v16->DOTEffectPos,
            Timer::ms_fCurTime,
            0,
            0,
            0,
            1);
      }
    }
  }
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004B96F0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_CLIENT_MOB_KILL_ANNOUNCE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  MobKillAnnounceText *v4; // esi@1
  D3DXCOLOR *v5; // eax@2
  float v6; // edx@2
  float v7; // eax@2
  int v8; // esi@2
  char *v9; // eax@2
  float v11; // [sp-10h] [bp-28h]@2
  float v12; // [sp-Ch] [bp-24h]@2
  float v13; // [sp-8h] [bp-20h]@2
  float v14; // [sp-4h] [bp-1Ch]@2
  D3DXCOLOR result; // [sp+8h] [bp-10h]@2

  v3 = this;
  v4 = MobKillAnnounceTextTab::GetByType(*(MobKillAnnounceType *)pvData);
  if ( v4 )
  {
    v5 = ColorInfoTable::GetDxColor(&result, Center_Announcement);
    v11 = v5->r;
    v12 = v5->g;
    v6 = v5->b;
    v7 = v5->a;
    v8 = (int)v4->Text;
    v13 = v6;
    v14 = v7;
    v9 = fs("%s", v8);
    GameFrameWork::AddAnnounceMsg(v3, (int)v3, v8, v9, *(D3DXCOLOR *)&v11);
  }
  return iRevBytes;
}

//----- (004B9760) --------------------------------------------------------
int __userpurge GameFrameWork::On_NC_FRIEND_SOMEONE_GET_SPECIALITEM_WORLD_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<edi>, int iRevBytes, void *pvData)
{
  int v4; // edx@1
  GameFrameWork *v5; // esi@1
  int v6; // ecx@1
  int v7; // edx@1
  char *v8; // eax@3
  D3DXCOLOR v9; // ST08_16@7
  char *v10; // eax@7
  char *v11; // eax@7
  char v13; // [sp-10h] [bp-40h]@2
  char v14; // [sp-Ch] [bp-3Ch]@2
  char v15; // [sp-8h] [bp-38h]@2
  char v16; // [sp-4h] [bp-34h]@2
  D3DXCOLOR result; // [sp+4h] [bp-2Ch]@4
  char acname[21]; // [sp+14h] [bp-1Ch]@1

  v4 = *((_DWORD *)pvData + 1);
  v5 = this;
  *(_DWORD *)acname = *(_DWORD *)pvData;
  v6 = *((_DWORD *)pvData + 2);
  *(_DWORD *)&acname[4] = v4;
  v7 = *((_DWORD *)pvData + 3);
  *(_DWORD *)&acname[16] = *((_DWORD *)pvData + 4);
  *(_DWORD *)&acname[8] = v6;
  *(_DWORD *)&acname[12] = v7;
  acname[20] = 0;
  if ( !*(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable )
  {
    v16 = -1;
    v15 = -1;
    v14 = ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable[0];
    v13 = -1;
LABEL_6:
    Color::GetDxColor(&result, v13, v14, v15, v16);
    goto LABEL_7;
  }
  v8 = CDataReader::GetRecord(
         (CDataReader *)(*(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable + 4),
         0x32u);
  v16 = -1;
  if ( v8 )
  {
    v15 = v8[6];
    v14 = v8[5];
    v13 = v8[4];
    goto LABEL_6;
  }
  Color::GetDxColor(&result, -1, 0, -1, -1);
LABEL_7:
  *(_QWORD *)&v9.r = *(_QWORD *)&result.r;
  *(_QWORD *)&v9.b = *(_QWORD *)&result.b;
  v10 = (char *)TextData3::Get(0xB6E5B116);
  v11 = fs(v10, acname);
  GameFrameWork::AddAnnounceMsg(v5, a2, (int)v5, v11, v9);
  return iRevBytes;
}

//----- (004B9850) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_PROMOTE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  char *v4; // eax@1
  NiUnsharedGeometryGroup *v5; // ebx@1
  NiUnsharedGeometryGroup *v6; // eax@4
  int v7; // eax@5
  _BYTE v8[12]; // ST10_12@5
  _BYTE v9[12]; // ST04_12@5
  NiUnsharedGeometryGroup *v10; // eax@5
  unsigned int dwDummy; // [sp+20h] [bp-88h]@16
  char szResult[128]; // [sp+24h] [bp-84h]@5

  v3 = this;
  v4 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), *(_BYTE *)pvData);
  v5 = &unk_96F8EB;
  if ( v4 )
    v5 = (NiUnsharedGeometryGroup *)(v4 + 21);
  if ( *(_BYTE *)pvData )
  {
    v7 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
    *(float *)v8 = NiPoint3::UNIT_Y.x;
    *(_QWORD *)&v8[4] = *(_QWORD *)&NiPoint3::UNIT_Y.y;
    *(_DWORD *)v9 = *(_DWORD *)v7;
    *(_QWORD *)&v9[4] = *(_QWORD *)(v7 + 4);
    EffectMgr::CreateEffect(&g_kEffectMgr, "SkillLevelUp", *(NiPoint3 *)v9, *(NiPoint3 *)v8, Timer::ms_fCurTime, 1.0);
    v10 = TextData::Get(0xD6433C22);
    sprintf(szResult, (const char *)v10, v5);
    GameFrameWork::AddSysMsg(v3, szResult);
    User::SetMainCharClass(&g_kUser, *(_BYTE *)pvData);
    g_pkMainChar->m_kCharShape.m_kClassID = *(_BYTE *)pvData;
    CharInfoWin::SetClass(v3->m_pkCharInfoWin, *(_BYTE *)pvData);
    if ( Char::GetClass(g_pkMainChar) == 4
      || Char::GetClass(g_pkMainChar) == 5
      || Char::GetClass(g_pkMainChar) == 9
      || Char::GetClass(g_pkMainChar) == 10
      || Char::GetClass(g_pkMainChar) == 14
      || Char::GetClass(g_pkMainChar) == 15
      || Char::GetClass(g_pkMainChar) == 19
      || Char::GetClass(g_pkMainChar) == 20
      || Char::GetClass(g_pkMainChar) == 24
      || Char::GetClass(g_pkMainChar) == 25
      || Char::GetClass(g_pkMainChar) == 27 )
    {
      EffectMgr::CreateAttachEffect(
        &g_kEffectMgr,
        &dwDummy,
        "Aura100",
        g_pkMainChar,
        None,
        Timer::ms_fCurTime,
        1,
        1,
        0,
        1);
    }
  }
  else
  {
    v6 = TextData::Get(0xDAEBBECA);
    GameFrameWork::AddSysMsg(v3, (const char *)v6);
  }
  return iRevBytes;
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004B9A60) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_SOMEONEPROMOTE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // ebx@1
  Char *v4; // esi@3
  char *v5; // eax@4
  int v6; // eax@7
  _BYTE v7[12]; // ST10_12@7
  _BYTE v8[12]; // ST04_12@7
  float fTime; // ST1C_4@7
  NiUnsharedGeometryGroup *v10; // eax@7
  unsigned int dwDummy; // [sp+20h] [bp-8Ch]@18
  char *szdata; // [sp+24h] [bp-88h]@5
  char szResult[128]; // [sp+28h] [bp-84h]@7

  v3 = this;
  if ( *(_WORD *)pvData == g_pkMainChar->m_kHandle )
    User::SetMainCharClass(&g_kUser, *((_BYTE *)pvData + 2));
  v4 = GameFrameWork::GetCharByHandle(v3, *(_WORD *)pvData, 4, 90);
  if ( v4 )
  {
    v5 = CDataReader::GetRecord(
           (CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4),
           *((_BYTE *)pvData + 2));
    if ( v5 )
      szdata = v5 + 21;
    else
      szdata = (char *)&unk_96F8EB;
    v6 = ((int (__thiscall *)(Char *))v4->vfptr[6].Deaffect)(v4);
    *(float *)v7 = NiPoint3::UNIT_Y.x;
    *(_QWORD *)&v7[4] = *(_QWORD *)&NiPoint3::UNIT_Y.y;
    *(_DWORD *)v8 = *(_DWORD *)v6;
    *(_QWORD *)&v8[4] = *(_QWORD *)(v6 + 4);
    EffectMgr::CreateEffect(&g_kEffectMgr, "SkillLevelUp", *(NiPoint3 *)v8, *(NiPoint3 *)v7, Timer::ms_fCurTime, 1.0);
    fTime = COERCE_FLOAT(((int (__thiscall *)(Char *))v4->vfptr[2].DeleteAbStateByAbstateIndex)(v4));
    v10 = TextData::Get(0x78E7CEBFu);
    sprintf(szResult, (const char *)v10, fTime, szdata);
    GameFrameWork::AddSysMsg(v3, szResult);
    v4->m_kCharShape.m_kClassID = *((_BYTE *)pvData + 2);
    if ( Char::GetClass(v4) == 4
      || Char::GetClass(v4) == 5
      || Char::GetClass(v4) == 9
      || Char::GetClass(v4) == 10
      || Char::GetClass(v4) == 14
      || Char::GetClass(v4) == 15
      || Char::GetClass(v4) == 19
      || Char::GetClass(v4) == 20
      || Char::GetClass(v4) == 24
      || Char::GetClass(v4) == 25
      || Char::GetClass(v4) == 27 )
    {
      EffectMgr::CreateAttachEffect(&g_kEffectMgr, &dwDummy, "Aura100", v4, None, Timer::ms_fCurTime, 1, 1, 0, 1);
    }
  }
  return iRevBytes;
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004B9C40) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHARGED_BUFFSTART_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  PgWin *v4; // ST00_4@1
  ChargedItemEffect *v5; // eax@1
  NiUnsharedGeometryGroup *v6; // eax@3

  v3 = this;
  ChargedItemList::AddUsingItem((PROTO_CHARGEDBUFF_INFO *)pvData);
  ChargedItemListWin::Refresh(v3->m_pkChargedItemListWin);
  v4 = (PgWin *)&v3->m_pkChargedItemListWin->vfptr;
  v3->m_pkStatusChargedBuffWin->m_fLastUpdatedTime = 0.0;
  PgWinMgr::ShowWin(&Pgg_kWinMgr, v4);
  v5 = ChargedEffectTable::GetByHandle(*((_WORD *)pvData + 2));
  if ( v5 && v5->EffectEnum == 33 )
  {
    v6 = TextData2::Get(0x214C2F82u);
    GameFrameWork::AddSysMsg(v3, (const char *)v6);
  }
  return iRevBytes;
}

//----- (004B9CC0) --------------------------------------------------------
int __userpurge GameFrameWork::On_NC_MINIHOUSE_ARRANGEMODE_ACK@<eax>(GameFrameWork *this@<ecx>, int a2@<edi>, int iRevBytes, void *pvData)
{
  GameFrameWork *v4; // esi@1
  const char *v5; // eax@3
  AnnounceWin *v7; // ecx@4
  D3DXCOLOR *v8; // ST04_4@8
  char *v9; // eax@8
  D3DXCOLOR result; // [sp+8h] [bp-10h]@8

  v4 = this;
  if ( *(_WORD *)pvData == 4546 )
  {
    MiniHouseIndoor::SetState(&g_kWorld.m_MiniHouseIndoorMode, MH_STATE_NORMAL);
    if ( nowState )
    {
      if ( v4->m_pkMHAnnounceWin )
      {
        v8 = ColorInfoTable::GetDxColor(&result, Center_Announcement);
        v9 = (char *)TextData2::Get(0x728986AAu);
        AnnounceWin::AddText(v4->m_pkMHAnnounceWin, a2, (int)v4, v9, v8, 1, 1000000.0);
      }
    }
  }
  else
  {
    if ( *(_WORD *)pvData != 4547 )
    {
      v5 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
      GameFrameWork::AddSysMsg(v4, v5);
      return iRevBytes;
    }
    MiniHouseIndoor::SetState(&g_kWorld.m_MiniHouseIndoorMode, MH_STATE_NORMAL);
    v7 = v4->m_pkMHAnnounceWin;
    if ( v7 )
    {
      AnnounceWin::KillNoticing(v7);
      return iRevBytes;
    }
  }
  return iRevBytes;
}

//----- (004B9D80) --------------------------------------------------------
int __thiscall GameFrameWork::ON_NC_KQ_JOINING_ALARM_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  MiniMapWin *v4; // ecx@1
  void *v5; // esi@2
  AnnounceWin *v6; // eax@6
  D3DXCOLOR *v7; // eax@8
  D3DXCOLOR v8; // ST04_16@8
  KingdomQuestWin *v9; // ecx@9
  char v10; // bl@9
  MiniMapWin::sKQAlarmInfo *v11; // eax@11
  MiniMapWin *v12; // edi@15
  D3DXCOLOR result; // [sp+Ch] [bp-10h]@8
  char bJoinable_3; // [sp+2Bh] [bp+Fh]@5

  v3 = this;
  v4 = this->m_pkMiniMapWin;
  if ( v4 )
  {
    v5 = pvData;
    if ( MiniMapWin::ConfirmKQAlarmInfo(v4, *(_DWORD *)pvData) )
    {
      *((_BYTE *)pvData + *((_BYTE *)pvData + 8) + 9) = 0;
      if ( User::Lv(&g_kUser) < *((_BYTE *)pvData + 6) || User::Lv(&g_kUser) > *((_BYTE *)pvData + 7) )
      {
        bJoinable_3 = 0;
      }
      else
      {
        bJoinable_3 = 1;
        GameFrameWork::OpenPlayGuideWin(v3, BIL_KIGNDOMQUEST_1);
      }
      v6 = v3->m_pkAnnounceWin;
      if ( v6 && bJoinable_3 )
      {
        v6->m_bNotice = 1;
        v7 = ColorInfoTable::GetDxColor(&result, Center_Announcement);
        *(_QWORD *)&v8.r = *(_QWORD *)&v7->r;
        *(_QWORD *)&v8.b = *(_QWORD *)&v7->b;
        GameFrameWork::AddAnnounceMsg(v3, (int)v3, (int)v5, (char *)v5 + 9, v8);
      }
      v9 = v3->m_pkKingDomQuest;
      v10 = 0;
      if ( v9 )
        v10 = KingdomQuestWin::IsStarted(v9);
      v11 = (MiniMapWin::sKQAlarmInfo *)operator new(8u);
      if ( v11 )
      {
        v11->m_kHandle = -1;
        v11->m_kID = -1;
        v11->m_bJoinable = 1;
      }
      else
      {
        v11 = 0;
      }
      v11->m_kHandle = *(_DWORD *)v5;
      v11->m_kID = *((_WORD *)v5 + 2);
      v11->m_bJoinable = bJoinable_3;
      MiniMapWin::AddKQAlarmInfo(v3->m_pkMiniMapWin, v11);
      v12 = v3->m_pkMiniMapWin;
      v12->m_bKQStarted = v10;
      v12->m_bKQListChanged = 1;
    }
  }
  return iRevBytes;
}

//----- (004B9EC0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_RAID_INVITATION_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // ebx@1
  MHDiceGameTask *v4; // ecx@1
  MHDiceGameTask *v5; // edi@2
  int v6; // ecx@8
  int v7; // edx@8
  int v8; // ecx@8
  int v9; // edx@8
  char *v10; // eax@8
  char *v11; // eax@8
  NiD3DDefaultShader *v12; // eax@8
  NiPointer<MHDiceGameTask> result; // [sp+10h] [bp-30h]@1
  bool v15; // [sp+17h] [bp-29h]@1
  char acName[21]; // [sp+18h] [bp-28h]@8
  int v17; // [sp+3Ch] [bp-4h]@1

  v3 = this;
  v4 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  v17 = 0;
  v15 = MHDiceGameTask::IsDicegamePlaying(v4);
  v17 = -1;
  if ( result.m_pObject )
  {
    v5 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
  }
  if ( !v15 )
  {
    if ( v3->m_pkRaidReplyWin.m_pObject || RaidInfo::IsMeRaidMember(&g_kRaidinfo) )
    {
      GameFrameWork::NcRaidInvitationAnswerReq(v3, 0);
    }
    else
    {
      v6 = *(_DWORD *)pvData;
      v7 = *((_DWORD *)pvData + 1);
      *(_DWORD *)&acName[8] = *((_DWORD *)pvData + 2);
      *(_DWORD *)acName = v6;
      v8 = *((_DWORD *)pvData + 3);
      *(_DWORD *)&acName[4] = v7;
      v9 = *((_DWORD *)pvData + 4);
      *(_DWORD *)&acName[12] = v8;
      *(_DWORD *)&acName[16] = v9;
      acName[20] = 0;
      v10 = (char *)TextData2::Get(0x240B0E23u);
      v11 = fs(v10, acName);
      v12 = (NiD3DDefaultShader *)MsgBox::Modeless(MSGBOX_OKCANCEL, v11);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_pkRaidReplyWin, v12);
      v3->m_pkRaidReplyWin.m_pObject->vfptr->SetMsgHooker(&v3->m_pkRaidReplyWin.m_pObject->vfptr, v3);
      *(_QWORD *)&g_kRaidinfo.m_kJoinProposeCharID.n5_name[0] = *(_QWORD *)pvData;
      *(_QWORD *)&g_kRaidinfo.m_kJoinProposeCharID.n5_code[2] = *((_QWORD *)pvData + 1);
      g_kRaidinfo.m_kJoinProposeCharID.n5_code[4] = *((_DWORD *)pvData + 4);
    }
  }
  return iRevBytes;
}

//----- (004BA020) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_AREADOTDAMAGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  void *v3; // esi@1
  unsigned __int16 v4; // ax@1
  AbnormalStateInfo *v5; // eax@3
  DamageEffect *v6; // eax@4
  ActionEffectInfo *v7; // eax@5
  ActionEffectInfo *v8; // edi@5
  AbnormalStateViewInfo::EffPosEnum v9; // ebx@6
  char *v10; // edi@14
  int result; // eax@16
  AbnormalStateInfo *v12; // eax@19
  DamageEffect *v13; // eax@20
  ActionEffectInfo *v14; // edi@21
  AbnormalStateViewInfo::EffPosEnum v15; // eax@22
  bool v16; // zf@31
  char *v17; // esi@32
  Char *v18; // eax@33
  int v19; // edi@34
  unsigned __int16 v20; // ax@37
  GameFrameWork *v21; // esi@37
  unsigned __int16 v22; // ax@37
  ShortCutWin **v23; // esi@37
  signed int v24; // ebx@37
  unsigned __int16 v25; // ax@38
  unsigned __int16 v26; // ax@38
  int v27; // eax@39
  Char *v28; // esi@46
  AbStateInfecteeVtbl *v29; // esi@52
  char v30; // bl@52
  int v31; // eax@59
  Char *v32; // esi@59
  AbnormalStateInfo *v33; // eax@66
  DamageEffect *v34; // eax@67
  ActionEffectInfo *v35; // eax@68
  AbnormalStateViewInfo::EffPosEnum v36; // edi@69
  int v37; // edx@78
  unsigned int dwEffHandle_; // [sp+20h] [bp-18h]@77
  GameFrameWork *v39; // [sp+24h] [bp-14h]@1
  int i; // [sp+28h] [bp-10h]@30
  Char *pkChar; // [sp+2Ch] [bp-Ch]@1
  Char *pkDamageChar; // [sp+30h] [bp-8h]@33
  bool bDamegeApplication; // [sp+37h] [bp-1h]@39

  v3 = pvData;
  v4 = *((_WORD *)pvData + 1);
  v39 = this;
  pkChar = CharMgr::GetChar(&g_kCharMgr, v4);
  if ( !pkChar )
    return iRevBytes;
  if ( *((_BYTE *)v3 + 4) )
  {
    v12 = AbnormalStateInfoTab::GetByAbstateIndex(*(_WORD *)v3);
    if ( v12 )
    {
      v13 = DamageEffectTab::GetByIndexName(v12->InxName, 0);
      if ( v13 )
      {
        v14 = ActionEffectInfoTab::GetByID(v13->EffectID);
        if ( v14 )
        {
          v15 = 0;
          if ( !strcmp(v14->GEffectPos, "None") )
            v15 = 0;
          if ( !strcmp(v14->GEffectPos, "Ground") )
            v15 = 1;
          if ( !strcmp(v14->GEffectPos, "HairLink") )
            v15 = 3;
          if ( !strcmp(v14->GEffectPos, "Chest") )
            v15 = 2;
          EffectMgr::CreateAttachEffect(
            &g_kEffectMgr,
            (unsigned int *)&i,
            v14->GrapicFile,
            pkChar,
            v15,
            Timer::ms_fCurTime,
            0,
            0,
            0,
            1);
        }
      }
    }
    v16 = *((_BYTE *)v3 + 4) == 0;
    i = 0;
    if ( v16 )
      return iRevBytes;
    v17 = (char *)v3 + 7;
    pkChar = (Char *)v17;
    while ( 1 )
    {
      v18 = CharMgr::GetChar(&g_kCharMgr, *((_WORD *)v17 - 1));
      pkDamageChar = v18;
      if ( v18 )
        break;
LABEL_78:
      v37 = *((_BYTE *)pvData + 4);
      v17 = (char *)&pkChar->m_kAbStateList.m_pkHead;
      ++i;
      pkChar = (Char *)((char *)pkChar + 12);
      if ( i >= v37 )
        return iRevBytes;
    }
    v19 = *((_DWORD *)v17 + 1);
    if ( v18 == g_pkMainChar && MainChar::IsAirBorneState((MainChar *)g_pkMainChar) && v19 > 0 )
    {
      v20 = MainChar::GetAirBorneID((MainChar *)g_pkMainChar);
      v21 = v39;
      ShortCutWin::IsStartCollTime(v39->m_pkShortCutWin, v20);
      v22 = MainChar::GetAirBorneID((MainChar *)g_pkMainChar);
      ShortCutWin::IsStartCollTime(v21->m_pkShortCutWinV, v22);
      v23 = v21->m_pkShortCutSubWinV;
      v24 = 4;
      do
      {
        v25 = MainChar::GetAirBorneID((MainChar *)g_pkMainChar);
        ShortCutWin::IsStartCollTime(*(v23 - 5), v25);
        v26 = MainChar::GetAirBorneID((MainChar *)g_pkMainChar);
        ShortCutWin::IsStartCollTime(*v23, v26);
        ++v23;
        --v24;
      }
      while ( v24 );
    }
    v27 = *(_WORD *)pvData;
    bDamegeApplication = 1;
    if ( v27 == 14 || (_WORD)v27 == 339 )
      bDamegeApplication = 0;
    if ( (_WORD)v27 == 822 )
      bDamegeApplication = 0;
    if ( v19 > 0 && bDamegeApplication )
    {
      v28 = pkDamageChar;
      ((void (__thiscall *)(Char *, int, signed int))pkDamageChar->vfptr[12].GetAbstateColor)(pkDamageChar, v19, 1);
    }
    else
    {
      v28 = pkDamageChar;
    }
    if ( !pkChar->vfptr )
    {
      if ( Char::IsResource(v28) )
        Char::ActResourceDisappearing(v28);
      else
        ((void (__thiscall *)(Char *))v28->vfptr[20].Affect)(v28);
    }
    v29 = (AbStateInfecteeVtbl *)((int (*)(void))pkDamageChar->vfptr[2].~AbStateInfectee)();
    v30 = 0;
    if ( !(unsigned __int8)((int (*)(void))pkDamageChar->vfptr[1].Affect)() && !v19 )
    {
      if ( v29 == (AbStateInfecteeVtbl *)1 )
      {
        if ( pkChar->vfptr <= (AbStateInfecteeVtbl *)1 )
          goto LABEL_59;
      }
      else if ( pkChar->vfptr < v29 )
      {
        goto LABEL_59;
      }
      v30 = 1;
    }
LABEL_59:
    v31 = ((int (*)(void))pkDamageChar->vfptr[2].~AbStateInfectee)();
    v32 = pkChar;
    if ( v31 > 0 )
    {
      Char::HpUpdate(pkDamageChar, (unsigned __int16)pkChar->m_kAbStateList.vfptr, (unsigned int)pkChar->vfptr);
      if ( pkDamageChar->m_kHandle == LOWORD(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[7].dwEffectIndex[1]) )
        Char::TOTHpUpdate(pkDamageChar, (unsigned __int16)v32->m_kAbStateList.vfptr, (unsigned int)v32->vfptr);
    }
    if ( !v30 && bDamegeApplication )
      TextEffMgr::AddDamage(&g_kTextEffMgr, *(_WORD *)&v32[-1].m_bDownTime, v19);
    if ( *(_WORD *)pvData != -1 )
    {
      v33 = AbnormalStateInfoTab::GetByAbstateIndex(*(_WORD *)pvData);
      if ( v33 )
      {
        v34 = DamageEffectTab::GetByIndexName(v33->InxName, 1u);
        if ( v34 )
        {
          v35 = ActionEffectInfoTab::GetByID(v34->EffectID);
          if ( v35 )
          {
            v36 = 0;
            if ( !strcmp(v35->GEffectPos, "None") )
              v36 = 0;
            if ( !strcmp(v35->GEffectPos, "Ground") )
              v36 = 1;
            if ( !strcmp(v35->GEffectPos, "HairLink") )
              v36 = 3;
            if ( !strcmp(v35->GEffectPos, "Chest") )
              v36 = 2;
            EffectMgr::CreateAttachEffect(
              &g_kEffectMgr,
              &dwEffHandle_,
              v35->GrapicFile,
              pkDamageChar,
              v36,
              Timer::ms_fCurTime,
              0,
              0,
              0,
              1);
          }
        }
      }
    }
    goto LABEL_78;
  }
  v5 = AbnormalStateInfoTab::GetByAbstateIndex(*(_WORD *)v3);
  if ( !v5 )
    return iRevBytes;
  v6 = DamageEffectTab::GetByIndexName(v5->InxName, 0);
  if ( !v6 )
    return iRevBytes;
  v7 = ActionEffectInfoTab::GetByID(v6->EffectID);
  v8 = v7;
  if ( !v7 )
    return iRevBytes;
  v9 = 0;
  if ( !strcmp(v7->GEffectPos, "None") )
    v9 = 0;
  if ( !strcmp(v8->GEffectPos, "Ground") )
    v9 = 1;
  if ( !strcmp(v8->GEffectPos, "HairLink") )
    v9 = 3;
  if ( !strcmp(v8->GEffectPos, "Chest") )
    v9 = 2;
  v10 = v8->GrapicFile;
  if ( AbStateInfectee::FindNomalAbstate((AbStateInfectee *)&pkChar->vfptr, STA_GTIHIDE) )
  {
    if ( pkChar == g_pkMainChar )
    {
      EffectMgr::CreateAttachEffect(
        &g_kEffectMgr,
        (unsigned int *)&pvData,
        v10,
        pkChar,
        v9,
        Timer::ms_fCurTime,
        0,
        0,
        0,
        1);
      result = iRevBytes;
    }
    else
    {
      EffectMgr::CreateAttachEffect(
        &g_kEffectMgr,
        (unsigned int *)&pvData,
        v10,
        pkChar,
        v9,
        Timer::ms_fCurTime,
        0,
        0,
        0,
        0);
      result = iRevBytes;
    }
  }
  else
  {
    EffectMgr::CreateAttachEffect(
      &g_kEffectMgr,
      (unsigned int *)&pvData,
      v10,
      pkChar,
      v9,
      Timer::ms_fCurTime,
      0,
      0,
      0,
      1);
    result = iRevBytes;
  }
  return result;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004BA6B0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_REFLECTIONDAMAGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  AbnormalStateInfo *v3; // eax@2
  DamageEffect *v4; // eax@3
  ActionEffectInfo *v5; // eax@4
  ActionEffectInfo *v6; // ebx@4
  AbnormalStateViewInfo::EffPosEnum v7; // edi@5
  Char *v8; // eax@14
  Char *v9; // edi@14
  int v10; // esi@15
  unsigned __int16 v11; // ax@18
  unsigned __int16 v12; // ax@18
  ShortCutWin **v13; // esi@18
  signed int v14; // ebx@18
  unsigned __int16 v15; // ax@19
  unsigned __int16 v16; // ax@19
  int v17; // eax@21
  unsigned int v18; // esi@33
  char v19; // bl@33
  GameFrameWork *v21; // [sp+20h] [bp-Ch]@1
  int iDamage; // [sp+24h] [bp-8h]@1
  bool bDamegeApplication; // [sp+2Bh] [bp-1h]@21

  v21 = this;
  iDamage = (int)CharMgr::GetChar(&g_kCharMgr, *((_WORD *)pvData + 1));
  if ( iDamage )
  {
    v3 = AbnormalStateInfoTab::GetByAbstateIndex(*(_WORD *)pvData);
    if ( v3 )
    {
      v4 = DamageEffectTab::GetByIndexName(v3->InxName, 0);
      if ( v4 )
      {
        v5 = ActionEffectInfoTab::GetByID(v4->EffectID);
        v6 = v5;
        if ( v5 )
        {
          v7 = 0;
          if ( !strcmp(v5->GEffectPos, "None") )
            v7 = 0;
          if ( !strcmp(v6->GEffectPos, "Ground") )
            v7 = 1;
          if ( !strcmp(v6->GEffectPos, "HairLink") )
            v7 = 3;
          if ( !strcmp(v6->GEffectPos, "Chest") )
            v7 = 2;
          EffectMgr::CreateAttachEffect(
            &g_kEffectMgr,
            (unsigned int *)&iDamage,
            v6->GrapicFile,
            (Char *)iDamage,
            v7,
            Timer::ms_fCurTime,
            0,
            0,
            0,
            1);
        }
      }
    }
  }
  v8 = CharMgr::GetChar(&g_kCharMgr, *((_WORD *)pvData + 2));
  v9 = v8;
  if ( v8 )
  {
    v10 = *((_WORD *)pvData + 5);
    iDamage = *((_WORD *)pvData + 5);
    if ( v8 == g_pkMainChar && MainChar::IsAirBorneState((MainChar *)g_pkMainChar) && v10 > 0 )
    {
      v11 = MainChar::GetAirBorneID((MainChar *)g_pkMainChar);
      ShortCutWin::IsStartCollTime(v21->m_pkShortCutWin, v11);
      v12 = MainChar::GetAirBorneID((MainChar *)g_pkMainChar);
      ShortCutWin::IsStartCollTime(v21->m_pkShortCutWinV, v12);
      v13 = v21->m_pkShortCutSubWinV;
      v14 = 4;
      do
      {
        v15 = MainChar::GetAirBorneID((MainChar *)g_pkMainChar);
        ShortCutWin::IsStartCollTime(*(v13 - 5), v15);
        v16 = MainChar::GetAirBorneID((MainChar *)g_pkMainChar);
        ShortCutWin::IsStartCollTime(*v13, v16);
        ++v13;
        --v14;
      }
      while ( v14 );
      v10 = iDamage;
    }
    v17 = *(_WORD *)pvData;
    bDamegeApplication = 1;
    if ( v17 == 14 || (_WORD)v17 == 339 )
      bDamegeApplication = 0;
    if ( (_WORD)v17 == 822 )
      bDamegeApplication = 0;
    if ( v10 > 0 && bDamegeApplication )
      ((void (__thiscall *)(Char *, int, signed int))v9->vfptr[12].GetAbstateColor)(v9, v10, 1);
    if ( !*(_DWORD *)((char *)pvData + 6) )
    {
      if ( Char::IsResource(v9) )
        Char::ActResourceDisappearing(v9);
      else
        ((void (__thiscall *)(Char *))v9->vfptr[20].Affect)(v9);
    }
    v18 = ((int (__thiscall *)(Char *))v9->vfptr[2].~AbStateInfectee)(v9);
    v19 = 0;
    if ( (unsigned __int8)((int (__thiscall *)(Char *))v9->vfptr[1].Affect)(v9) || iDamage )
      goto LABEL_40;
    if ( v18 == 1 )
    {
      if ( *(_DWORD *)((char *)pvData + 6) <= 1u )
        goto LABEL_40;
    }
    else if ( *(_DWORD *)((char *)pvData + 6) < v18 )
    {
LABEL_40:
      if ( ((int (__thiscall *)(Char *))v9->vfptr[2].~AbStateInfectee)(v9) > 0 )
      {
        Char::HpUpdate(v9, *((_WORD *)pvData + 6), *(_DWORD *)((char *)pvData + 6));
        if ( v9->m_kHandle == LOWORD(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[7].dwEffectIndex[1]) )
          Char::TOTHpUpdate(v9, *((_WORD *)pvData + 6), *(_DWORD *)((char *)pvData + 6));
      }
      if ( !v19 && bDamegeApplication )
        TextEffMgr::AddDamage(&g_kTextEffMgr, *((_WORD *)pvData + 2), iDamage);
      return iRevBytes;
    }
    v19 = 1;
    goto LABEL_40;
  }
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004BA9F0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MISC_EVENTNPC_STANDSTART_CLIENT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // edx@1
  GameFrameWork *v4; // ebx@1
  int v5; // ecx@1
  int v6; // edx@1
  int v7; // ecx@1
  int v8; // edx@1
  int v9; // ecx@1
  int v10; // edx@1
  unsigned int v11; // esi@1
  char *v12; // edi@2
  char *v13; // eax@7
  D3DXCOLOR v14; // ST08_16@10
  int v15; // edi@10
  char *v16; // eax@10
  char *v17; // eax@10
  D3DXCOLOR result; // [sp+Ch] [bp-38h]@6
  char acName[33]; // [sp+1Ch] [bp-28h]@1

  v3 = *((_DWORD *)pvData + 1);
  v4 = this;
  *(_DWORD *)acName = *(_DWORD *)pvData;
  v5 = *((_DWORD *)pvData + 2);
  *(_DWORD *)&acName[4] = v3;
  v6 = *((_DWORD *)pvData + 3);
  *(_DWORD *)&acName[8] = v5;
  v7 = *((_DWORD *)pvData + 4);
  *(_DWORD *)&acName[12] = v6;
  v8 = *((_DWORD *)pvData + 5);
  *(_DWORD *)&acName[16] = v7;
  v9 = *((_DWORD *)pvData + 6);
  *(_DWORD *)&acName[20] = v8;
  v10 = *((_DWORD *)pvData + 7);
  *(_DWORD *)&acName[24] = v9;
  *(_DWORD *)&acName[28] = v10;
  acName[32] = 0;
  v11 = 0;
  if ( (signed int)ITableBase<MobInfo,MobInfoTab>::GetTotal() > 0 )
  {
    while ( 1 )
    {
      v12 = CDataReader::GetRecord((CDataReader *)(ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 4), v11);
      if ( !strncmp(v12 + 2, acName, 0x20u) )
        break;
      if ( (signed int)++v11 >= (signed int)ITableBase<MobInfo,MobInfoTab>::GetTotal() )
        return iRevBytes;
    }
    if ( *(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable )
    {
      v13 = CDataReader::GetRecord(
              (CDataReader *)(*(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable + 4),
              0x32u);
      if ( v13 )
        Color::GetDxColor(&result, v13[4], v13[5], v13[6], -1);
      else
        Color::GetDxColor(&result, -1, 0, -1, -1);
    }
    else
    {
      Color::GetDxColor(&result, -1, ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable[0], -1, -1);
    }
    *(_QWORD *)&v14.r = *(_QWORD *)&result.r;
    v15 = (int)(v12 + 34);
    *(_QWORD *)&v14.b = *(_QWORD *)&result.b;
    v16 = (char *)TextData2::Get(0x335F5E77u);
    v17 = fs(v16, v15);
    GameFrameWork::AddAnnounceMsg(v4, v15, v11, v17, v14);
  }
  return iRevBytes;
}
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;

//----- (004BAB40) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MISC_EVENTNPC_STANDEND_CLIENT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // edx@1
  GameFrameWork *v4; // ebx@1
  int v5; // ecx@1
  int v6; // edx@1
  int v7; // ecx@1
  int v8; // edx@1
  int v9; // ecx@1
  int v10; // edx@1
  unsigned int v11; // esi@1
  char *v12; // edi@2
  char *v13; // eax@7
  D3DXCOLOR v14; // ST08_16@10
  int v15; // edi@10
  char *v16; // eax@10
  char *v17; // eax@10
  D3DXCOLOR result; // [sp+Ch] [bp-38h]@6
  char acName[33]; // [sp+1Ch] [bp-28h]@1

  v3 = *((_DWORD *)pvData + 1);
  v4 = this;
  *(_DWORD *)acName = *(_DWORD *)pvData;
  v5 = *((_DWORD *)pvData + 2);
  *(_DWORD *)&acName[4] = v3;
  v6 = *((_DWORD *)pvData + 3);
  *(_DWORD *)&acName[8] = v5;
  v7 = *((_DWORD *)pvData + 4);
  *(_DWORD *)&acName[12] = v6;
  v8 = *((_DWORD *)pvData + 5);
  *(_DWORD *)&acName[16] = v7;
  v9 = *((_DWORD *)pvData + 6);
  *(_DWORD *)&acName[20] = v8;
  v10 = *((_DWORD *)pvData + 7);
  *(_DWORD *)&acName[24] = v9;
  *(_DWORD *)&acName[28] = v10;
  acName[32] = 0;
  v11 = 0;
  if ( (signed int)ITableBase<MobInfo,MobInfoTab>::GetTotal() > 0 )
  {
    while ( 1 )
    {
      v12 = CDataReader::GetRecord((CDataReader *)(ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 4), v11);
      if ( !strncmp(v12 + 2, acName, 0x20u) )
        break;
      if ( (signed int)++v11 >= (signed int)ITableBase<MobInfo,MobInfoTab>::GetTotal() )
        return iRevBytes;
    }
    if ( *(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable )
    {
      v13 = CDataReader::GetRecord(
              (CDataReader *)(*(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable + 4),
              0x32u);
      if ( v13 )
        Color::GetDxColor(&result, v13[4], v13[5], v13[6], -1);
      else
        Color::GetDxColor(&result, -1, 0, -1, -1);
    }
    else
    {
      Color::GetDxColor(&result, -1, ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable[0], -1, -1);
    }
    *(_QWORD *)&v14.r = *(_QWORD *)&result.r;
    v15 = (int)(v12 + 34);
    *(_QWORD *)&v14.b = *(_QWORD *)&result.b;
    v16 = (char *)TextData2::Get(0x335FA46Fu);
    v17 = fs(v16, v15);
    GameFrameWork::AddAnnounceMsg(v4, v15, v11, v17, v14);
  }
  return iRevBytes;
}
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;

//----- (004BAC90) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_SCENARIO_MESSAGE_CMD(int iRevBytes, void *pvData)
{
  ScriptMsg *v3; // eax@1

  OutputDebugStringA("RCV :On_NC_SCENARIO_MESSAGE_CMD\n");
  v3 = ScriptMsgTab::GetScriptMsgInfo((const char *)pvData);
  if ( v3 )
    ScriptMsgCtrl::AddMsg(v3, 0, 0xFFFFu);
  return iRevBytes;
}

//----- (004BACD0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ACT_OBJECT_EFFECT_CMD(int iRevBytes, void *pvData)
{
  Char *v3; // esi@1
  ActionEffectInfo *v4; // eax@2

  v3 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  if ( v3 )
  {
    v4 = ActionEffectInfoTab::GetByID(*((_WORD *)pvData + 1));
    if ( v4 )
      EffectMgr::CreateActionEffect(&g_kEffectMgr, v4, 0, 0.0, v3, 0, 0, 0xFFFF, 0);
  }
  return iRevBytes;
}

//----- (004BAD30) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_KQ_VOTE_RESULT_SUC_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // eax@1
  int v4; // edx@1
  GameFrameWork *v5; // ebx@1
  int v6; // ecx@1
  int v7; // eax@1
  Name5 *v8; // eax@1
  unsigned int v9; // ecx@1
  unsigned int v10; // edx@1
  unsigned int v11; // ecx@1
  unsigned int v12; // edx@1
  unsigned int v13; // edi@1
  int v14; // eax@2
  char *v15; // eax@6
  D3DXCOLOR *v16; // eax@10
  int v17; // ST10_4@11
  int v18; // ST0C_4@11
  int v19; // ST08_4@11
  char *v20; // eax@11
  char *v21; // eax@11
  int v22; // ST20_4@11
  int v23; // ST1C_4@11
  int v24; // ST18_4@11
  char *v25; // eax@11
  const char *v26; // eax@11
  char *v27; // eax@12
  char *v28; // eax@12
  D3DXCOLOR *v29; // eax@12
  D3DXCOLOR v30; // ST14_16@12
  int v31; // ST10_4@12
  int v32; // ST0C_4@12
  int v33; // ST08_4@12
  char *v34; // eax@12
  char *v35; // eax@12
  char *v36; // eax@12
  const char *v37; // eax@12
  int v38; // ST20_4@12
  int v39; // ST1C_4@12
  int v40; // ST18_4@12
  char *v41; // eax@12
  D3DXCOLOR v43; // [sp-10h] [bp-54h]@10
  unsigned int v44; // [sp+Ch] [bp-38h]@3
  char acMainCharID[21]; // [sp+10h] [bp-34h]@1
  char acTarget[21]; // [sp+28h] [bp-1Ch]@1

  v3 = *(_DWORD *)pvData;
  v4 = *((_DWORD *)pvData + 2);
  v5 = this;
  *(_DWORD *)&acTarget[4] = *((_DWORD *)pvData + 1);
  v6 = *((_DWORD *)pvData + 4);
  *(_DWORD *)acTarget = v3;
  v7 = *((_DWORD *)pvData + 3);
  *(_DWORD *)&acTarget[16] = v6;
  *(_DWORD *)&acTarget[8] = v4;
  *(_DWORD *)&acTarget[12] = v7;
  acTarget[20] = 0;
  v8 = User::GetMainCharID(&g_kUser);
  v9 = v8->n5_code[1];
  *(_DWORD *)acMainCharID = v8->n5_code[0];
  v10 = v8->n5_code[2];
  *(_DWORD *)&acMainCharID[4] = v9;
  v11 = v8->n5_code[3];
  *(_DWORD *)&acMainCharID[8] = v10;
  v12 = v8->n5_code[4];
  *(_DWORD *)&acMainCharID[12] = v11;
  *(_DWORD *)&acMainCharID[16] = v12;
  acMainCharID[20] = 0;
  v13 = 0;
  if ( strcmp(acMainCharID, acTarget) )
  {
    v14 = *(_DWORD *)(ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::ms_pkTable + 56);
    v44 = v14 ? *(_DWORD *)(v14 + 40) : 0;
    if ( v44 > 0 )
    {
      do
      {
        v15 = CDataReader::GetRecord(
                (CDataReader *)(ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::ms_pkTable + 4),
                v13);
        if ( !v15 )
          break;
        if ( *((_BYTE *)pvData + 20) == *v15 )
        {
          v16 = ColorInfoTable::GetDxColor((D3DXCOLOR *)&acMainCharID[4], Center_Announcement);
          *(_QWORD *)&v43.r = *(_QWORD *)&v16->r;
          *(_QWORD *)&v43.b = *(_QWORD *)&v16->b;
          if ( v13 )
          {
            v27 = (char *)TextData3::Get(0x2119557Bu);
            v28 = fs(v27, acTarget);
            GameFrameWork::AddAnnounceMsg(v5, v13, (int)pvData, v28, v43);
            v29 = ColorInfoTable::GetDxColor((D3DXCOLOR *)&acMainCharID[4], Center_Announcement);
            *(_QWORD *)&v30.r = *(_QWORD *)&v29->r;
            *(_QWORD *)&v30.b = *(_QWORD *)&v29->b;
            v31 = *((_BYTE *)pvData + 23);
            v32 = *((_BYTE *)pvData + 22);
            v33 = *((_BYTE *)pvData + 21);
            v34 = (char *)TextData3::Get(0x26195F84u);
            v35 = fs(v34, v33, v32, v31);
            GameFrameWork::AddAnnounceMsg(v5, v13, (int)pvData, v35, v30);
            v36 = (char *)TextData3::Get(0x2119557Bu);
            v37 = fs(v36, acTarget);
            GameFrameWork::AddSysMsg(v5, v37);
            v38 = *((_BYTE *)pvData + 23);
            v39 = *((_BYTE *)pvData + 22);
            v40 = *((_BYTE *)pvData + 21);
            v41 = (char *)TextData3::Get(0x26195F84u);
            v26 = fs(v41, v40, v39, v38);
          }
          else
          {
            v17 = *((_BYTE *)pvData + 23);
            v18 = *((_BYTE *)pvData + 22);
            v19 = *((_BYTE *)pvData + 21);
            v20 = (char *)TextData3::Get(0x2477878Cu);
            v21 = fs(v20, acTarget, v19, v18, v17);
            GameFrameWork::AddAnnounceMsg(v5, 0, (int)pvData, v21, v43);
            v22 = *((_BYTE *)pvData + 23);
            v23 = *((_BYTE *)pvData + 22);
            v24 = *((_BYTE *)pvData + 21);
            v25 = (char *)TextData3::Get(0x2477878Cu);
            v26 = fs(v25, acTarget, v24, v23, v22);
          }
          GameFrameWork::AddSysMsg(v5, v26);
          return iRevBytes;
        }
        ++v13;
      }
      while ( v13 < v44 );
    }
  }
  return iRevBytes;
}
// A8C240: using guessed type int ITableBase<KQVoteMajorityRate,KQVoteMajorityRateTable>::ms_pkTable;

//----- (004BAF80) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_KQ_VOTE_RESULT_FAIL_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // eax@1
  int v4; // edx@1
  GameFrameWork *v5; // edi@1
  int v6; // ecx@1
  int v7; // eax@1
  Name5 *v8; // eax@1
  unsigned int v9; // ecx@1
  unsigned int v10; // edx@1
  unsigned int v11; // ecx@1
  unsigned int v12; // edx@1
  D3DXCOLOR *v13; // eax@2
  D3DXCOLOR v14; // ST14_16@2
  int v15; // ST10_4@2
  int v16; // ST0C_4@2
  int v17; // ST08_4@2
  char *v18; // eax@2
  char *v19; // eax@2
  int v20; // ST20_4@3
  int v21; // ST1C_4@3
  int v22; // ST18_4@3
  char *v23; // eax@3
  const char *v24; // eax@3
  char acMainCharID[21]; // [sp+8h] [bp-34h]@1
  char acTarget[21]; // [sp+20h] [bp-1Ch]@1

  v3 = *(_DWORD *)pvData;
  v4 = *((_DWORD *)pvData + 2);
  v5 = this;
  *(_DWORD *)&acTarget[4] = *((_DWORD *)pvData + 1);
  v6 = *((_DWORD *)pvData + 4);
  *(_DWORD *)acTarget = v3;
  v7 = *((_DWORD *)pvData + 3);
  *(_DWORD *)&acTarget[16] = v6;
  *(_DWORD *)&acTarget[8] = v4;
  *(_DWORD *)&acTarget[12] = v7;
  acTarget[20] = 0;
  v8 = User::GetMainCharID(&g_kUser);
  v9 = v8->n5_code[1];
  *(_DWORD *)acMainCharID = v8->n5_code[0];
  v10 = v8->n5_code[2];
  *(_DWORD *)&acMainCharID[4] = v9;
  v11 = v8->n5_code[3];
  *(_DWORD *)&acMainCharID[8] = v10;
  v12 = v8->n5_code[4];
  *(_DWORD *)&acMainCharID[12] = v11;
  *(_DWORD *)&acMainCharID[16] = v12;
  acMainCharID[20] = 0;
  if ( strcmp(acMainCharID, acTarget) )
  {
    v13 = ColorInfoTable::GetDxColor((D3DXCOLOR *)&acMainCharID[4], Center_Announcement);
    *(_QWORD *)&v14.r = *(_QWORD *)&v13->r;
    *(_QWORD *)&v14.b = *(_QWORD *)&v13->b;
    v15 = *((_BYTE *)pvData + 22);
    v16 = *((_BYTE *)pvData + 21);
    v17 = *((_BYTE *)pvData + 20);
    v18 = (char *)TextData3::Get(0x25292A38u);
    v19 = fs(v18, acTarget, v17, v16, v15);
    GameFrameWork::AddAnnounceMsg(v5, (int)v5, (int)pvData, v19, v14);
  }
  v20 = *((_BYTE *)pvData + 22);
  v21 = *((_BYTE *)pvData + 21);
  v22 = *((_BYTE *)pvData + 20);
  v23 = (char *)TextData3::Get(0x25292A38u);
  v24 = fs(v23, acTarget, v22, v21, v20);
  GameFrameWork::AddSysMsg(v5, v24);
  return iRevBytes;
}

//----- (004BB0C0) --------------------------------------------------------
void __thiscall GameFrameWork::NcKqVoteStartReq(GameFrameWork *this, Name5 kTargetID, unsigned int uiVoteType, std::basic_string<char,std::char_traits<char>,std::allocator<char> > kContents)
{
  Net *v4; // ecx@1
  int v5; // ebx@1
  signed int v6; // edi@1
  _BYTE *v7; // eax@4
  unsigned int v8; // eax@6
  int v9; // esi@6
  char *v10; // ecx@7
  PgNet *v11; // ecx@10
  GameFrameWork *v12; // [sp+10h] [bp-B0h]@1
  NETCOMMAND netcmd; // [sp+14h] [bp-ACh]@1
  PROTO_NC_KQ_VOTE_START_REQ kProto; // [sp+18h] [bp-A8h]@1
  char acStr[128]; // [sp+30h] [bp-90h]@3
  int v16; // [sp+BCh] [bp-4h]@1

  v12 = this;
  v4 = this->m_spWorldMgrNet.m_pObject;
  v5 = 0;
  v16 = 0;
  netcmd.protocol = 22567;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
  kProto.sTarget = kTargetID;
  kProto.nVoteType = uiVoteType;
  v6 = kContents._Mysize;
  if ( (signed int)kContents._Mysize > 127 )
    v6 = 127;
  *(_DWORD *)acStr = 0;
  while ( 1 )
  {
    v7 = kContents._Bx._Ptr;
    if ( kContents._Myres < 0x10 )
      v7 = &kContents;
    v8 = (IsDBCSLeadByte(v7[v5]) != 0) + 1;
    v9 = v8 + v5;
    if ( (signed int)(v8 + v5) > v6 )
      break;
    v10 = kContents._Bx._Ptr;
    if ( kContents._Myres < 0x10 )
      v10 = (char *)&kContents;
    memcpy(&acStr[v5], &v10[v5], v8);
    v5 = v9;
  }
  v11 = (PgNet *)&v12->m_spWorldMgrNet.m_pObject->vfptr;
  acStr[v5] = 0;
  kProto.nLen = v5;
  PgNet::AddNetMsg(v11, &kProto, 22);
  PgNet::SendNetMsg((PgNet *)&v12->m_spWorldMgrNet.m_pObject->vfptr, acStr, (unsigned __int8)kProto.nLen);
  if ( kContents._Myres >= 0x10 )
    operator delete(kContents._Bx._Ptr);
}

//----- (004BB220) --------------------------------------------------------
void __thiscall GameFrameWork::NcInstanceDungeonRankTabDamagedealtReq(GameFrameWork *this, SHINE_INDUN_INFO *rInfo)
{
  GameFrameWork *v2; // edi@1
  Net *v3; // ecx@1
  unsigned int v4; // edx@1
  unsigned int v5; // ecx@1
  PgNet *v6; // ecx@1
  NETCOMMAND netcmd; // [sp+8h] [bp-18h]@1
  PROTO_NC_INSTANCE_DUNGEON_RANK_TAB_DAMAGEDEALT_REQ kProto; // [sp+Ch] [bp-14h]@1

  v2 = this;
  v3 = this->m_spWorldMgrNet.m_pObject;
  netcmd.protocol = -23525;
  PgNet::AddNetMsg((PgNet *)&v3->vfptr, &netcmd, 2);
  v4 = rInfo->MapIDClient.n3_code[0];
  v5 = rInfo->MapIDClient.n3_code[2];
  kProto.sIndunInfo.MapIDClient.n3_code[1] = rInfo->MapIDClient.n3_code[1];
  kProto.sIndunInfo.MapIDClient.n3_code[0] = v4;
  LOBYTE(v4) = rInfo->ModeIDLv;
  kProto.sIndunInfo.MapIDClient.n3_code[2] = v5;
  v6 = (PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr;
  kProto.sIndunInfo.ModeIDLv = v4;
  PgNet::SendNetMsg(v6, &kProto, 13);
}

//----- (004BB290) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_REVIVEOTHER_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  return GameFrameWork::On_NC_MAP_LINKOTHER_CMD(this, iRevBytes, pvData);
}

//----- (004BB2A0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_SOMEONESKILLBASH_HIT_OBJ_START_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  void *v3; // esi@1
  GameFrameWork *v4; // ebx@1
  Char *v5; // edi@2
  Char *v6; // eax@2
  SkillSequence *v7; // eax@6
  Char *pkAttChar; // [sp+14h] [bp+Ch]@1

  v3 = pvData;
  v4 = this;
  pkAttChar = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  if ( pkAttChar )
  {
    (*(void (__stdcall **)(_DWORD))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 16))(*((_WORD *)v3 + 1));
    v5 = GameFrameWork::GetCharByHandle(v4, *(_WORD *)v3, 9, 79);
    v6 = GameFrameWork::GetCharByHandle(v4, *((_WORD *)v3 + 2), 9, 79);
    if ( v5 && v5 != g_pkMainChar && v6 )
    {
      ((void (__thiscall *)(Char *, Char *, signed int, _DWORD))v5->vfptr[9].GetAbstateColor)(
        v5,
        v6,
        1,
        *((_WORD *)v3 + 1));
      v5->vfptr[16].GetAbstateColor((AbStateInfectee *)v5);
    }
    v7 = (SkillSequence *)operator new(0x18u);
    if ( v7 )
    {
      v7->kDamageInfoSet.kDamageList.m_kAllocator.m_uiCount = 0;
      v7->kDamageInfoSet.kDamageList.m_pkHead = 0;
      v7->kDamageInfoSet.kDamageList.m_pkTail = 0;
      v7->kDamageInfoSet.kDamageList.vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTList<DamageInfo *>::`vftable';
    }
    else
    {
      v7 = 0;
    }
    v7->kSkillID = *((_WORD *)v3 + 1);
    v7->m_Index = *((_WORD *)v3 + 3);
    AttackSequenceManager::AddSkillSeq((AttackSequenceManager *)&pkAttChar->vfptr, v7);
  }
  return iRevBytes;
}
// 973DFC: using guessed type int (__thiscall *NiTList<DamageInfo *>::`vftable')(void *p, char);
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (004BB370) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_SKILLBASH_HIT_FLD_START_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // edi@1
  int v4; // ebx@1
  SkillSequence *v5; // eax@4
  unsigned __int16 v6; // dx@7
  GameFrameWork *v8; // [sp+Ch] [bp-4h]@1

  v8 = this;
  CharMgr::GetChar(&g_kCharMgr, this->m_kSkillCasting.kTargetHandle);
  v3 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  v4 = *(_WORD *)pvData;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                          v4)
    && (unsigned __int16)v4 <= *(_WORD *)(v3 + 200)
    && *(_DWORD *)(*(_DWORD *)(v3 + 196) + 4 * v4) )
  {
    v8->m_kSkillCasting.kGroundTypeDetail.x = *(_DWORD *)((char *)pvData + 2);
    v8->m_kSkillCasting.kGroundTypeDetail.y = *(_DWORD *)((char *)pvData + 6);
    Char::SetSkillTargetGroundPoint(g_pkMainChar, *(_DWORD *)((char *)pvData + 2), *(_DWORD *)((char *)pvData + 6), 1);
    v5 = (SkillSequence *)operator new(0x18u);
    if ( v5 )
    {
      v5->kDamageInfoSet.kDamageList.m_kAllocator.m_uiCount = 0;
      v5->kDamageInfoSet.kDamageList.m_pkHead = 0;
      v5->kDamageInfoSet.kDamageList.m_pkTail = 0;
      v5->kDamageInfoSet.kDamageList.vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTList<DamageInfo *>::`vftable';
    }
    else
    {
      v5 = 0;
    }
    v6 = *(_WORD *)pvData;
    v5->m_Index = *((_WORD *)pvData + 5);
    v5->kSkillID = v6;
    AttackSequenceManager::AddSkillSeq((AttackSequenceManager *)&g_pkMainChar->vfptr, v5);
  }
  return iRevBytes;
}
// 973DFC: using guessed type int (__thiscall *NiTList<DamageInfo *>::`vftable')(void *p, char);
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (004BB440) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_SOMEONESKILLBASH_HIT_FLD_START_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  void *v3; // esi@1
  int v4; // edi@2
  int v5; // ebx@2
  Char *v6; // eax@5
  Char *v7; // edi@5
  SkillSequence *v8; // eax@8
  GameFrameWork *v10; // [sp+Ch] [bp-4h]@1
  Char *pkAttChar; // [sp+1Ch] [bp+Ch]@1

  v3 = pvData;
  v10 = this;
  pkAttChar = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  if ( pkAttChar )
  {
    v4 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
    v5 = *((_WORD *)v3 + 1);
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                          + 16))(
                            ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                            v5) )
    {
      if ( (unsigned __int16)v5 <= *(_WORD *)(v4 + 200) && *(_DWORD *)(*(_DWORD *)(v4 + 196) + 4 * v5) )
      {
        v6 = GameFrameWork::GetCharByHandle(v10, *(_WORD *)v3, 9, 81);
        v7 = v6;
        if ( v6 && v6 != g_pkMainChar )
        {
          ((void (__thiscall *)(Char *, _DWORD, _DWORD, signed int, _DWORD))v6->vfptr[9].DeleteAbStateByAbstateIndex)(
            v6,
            *((_DWORD *)v3 + 1),
            *((_DWORD *)v3 + 2),
            1,
            *((_WORD *)v3 + 1));
          v7->vfptr[16].GetAbstateColor((AbStateInfectee *)v7);
        }
        Char::SetSkillTargetGroundPoint(pkAttChar, *((_DWORD *)v3 + 1), *((_DWORD *)v3 + 2), 1);
        v8 = (SkillSequence *)operator new(0x18u);
        if ( v8 )
        {
          v8->kDamageInfoSet.kDamageList.m_kAllocator.m_uiCount = 0;
          v8->kDamageInfoSet.kDamageList.m_pkHead = 0;
          v8->kDamageInfoSet.kDamageList.m_pkTail = 0;
          v8->kDamageInfoSet.kDamageList.vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTList<DamageInfo *>::`vftable';
        }
        else
        {
          v8 = 0;
        }
        v8->kSkillID = *((_WORD *)v3 + 1);
        v8->m_Index = *((_WORD *)v3 + 6);
        AttackSequenceManager::AddSkillSeq((AttackSequenceManager *)&pkAttChar->vfptr, v8);
      }
    }
  }
  return iRevBytes;
}
// 973DFC: using guessed type int (__thiscall *NiTList<DamageInfo *>::`vftable')(void *p, char);
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (004BB550) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_SKILLBASH_HIT_DAMAGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  Char *v3; // eax@1
  unsigned __int16 v4; // ax@3
  bool v5; // zf@6
  char *v6; // edi@7
  int v7; // edx@8
  char v8; // al@12
  char v9; // cl@12
  char v10; // si@12
  char v11; // bl@12
  unsigned int v12; // esi@13
  bool v13; // bl@13
  unsigned __int16 v14; // ax@15
  GameFrameWork *v15; // ebx@15
  unsigned __int16 v16; // ax@15
  ShortCutWin **v17; // ebx@15
  unsigned __int16 v18; // ax@16
  unsigned __int16 v19; // ax@16
  Char *v20; // eax@32
  unsigned __int16 v21; // dx@35
  unsigned __int16 v22; // ax@37
  NiTListItem<DamageInfo *> *v23; // esi@44
  NiTListItem<DamageInfo *> *v24; // ST18_4@45
  unsigned int v25; // edx@47
  DamageInfoSet pkDmgDummyInfoSet; // [sp+10h] [bp-34h]@41
  DamageInfoSet *pkDmgInfoSet; // [sp+20h] [bp-24h]@3
  GameFrameWork *v29; // [sp+24h] [bp-20h]@1
  unsigned int i; // [sp+28h] [bp-1Ch]@6
  int v31; // [sp+2Ch] [bp-18h]@15
  Char *pkChar; // [sp+30h] [bp-14h]@1
  bool bShieldCosDecreaseCharged; // [sp+36h] [bp-Eh]@3
  bool bDecreaseCharged; // [sp+37h] [bp-Dh]@3
  int v35; // [sp+40h] [bp-4h]@41

  v29 = this;
  v3 = CharMgr::GetChar(&g_kCharMgr, *((_WORD *)pvData + 1));
  pkChar = v3;
  if ( !v3 )
  {
    OutputDebugStringA("haven't char\n");
    return iRevBytes;
  }
  pkDmgInfoSet = AttackSequenceManager::GetSkillDmgInfoSetbyIndex((AttackSequenceManager *)&v3->vfptr, *(_WORD *)pvData);
  v4 = *(_WORD *)((char *)pvData + 7);
  bDecreaseCharged = 0;
  bShieldCosDecreaseCharged = 0;
  if ( v4 != -1 && *(_WORD *)((char *)pvData + 5) == 1620 )
    CharMgr::GetChar(&g_kCharMgr, v4)->m_bIsRevived = 1;
  v5 = *((_BYTE *)pvData + 4) == 0;
  i = 0;
  if ( !v5 )
  {
    v6 = (char *)pvData + 11;
    do
    {
      v7 = *(_DWORD *)(v6 + 2);
      if ( v7 < 0 )
        v7 = 0;
      if ( v7 & 0xFFFF0000 )
        v7 = (unsigned __int16)v7;
      v8 = *v6;
      v9 = *v6;
      v10 = *v6;
      v11 = *v6;
      if ( *((_WORD *)v6 - 1) == g_pkMainChar->m_kHandle )
      {
        v12 = v7 | (*(_DWORD *)(v6 + 6) != 0 ? 0 : 2147483648) | ((v8 & 0x10) != 16 ? 0 : 0x10000000) | ((v8 & 0x20) != 32 ? 0 : 0x8000000) | ((v9 & 0x40 | 2 * (v6[1] & 2 | 8 * (v9 & 8 | 16 * (~v8 & 1 | 2 * (v11 & 4 | 4 * (v10 & 2))) | 2))) << 18);
        v13 = 0;
        if ( !MainChar::IsAirBorneState((MainChar *)g_pkMainChar) || v12 <= 0 )
          goto LABEL_20;
        v14 = MainChar::GetAirBorneID((MainChar *)g_pkMainChar);
        v15 = v29;
        ShortCutWin::IsStartCollTime(v29->m_pkShortCutWin, v14);
        v16 = MainChar::GetAirBorneID((MainChar *)g_pkMainChar);
        ShortCutWin::IsStartCollTime(v15->m_pkShortCutWinV, v16);
        v17 = v15->m_pkShortCutSubWinV;
        v31 = 4;
        do
        {
          v18 = MainChar::GetAirBorneID((MainChar *)g_pkMainChar);
          ShortCutWin::IsStartCollTime(*(v17 - 5), v18);
          v19 = MainChar::GetAirBorneID((MainChar *)g_pkMainChar);
          ShortCutWin::IsStartCollTime(*v17, v19);
          ++v17;
          --v31;
        }
        while ( v31 );
      }
      else
      {
        v12 = v7 | (*(_DWORD *)(v6 + 6) != 0 ? 0 : 2147483648) | ((v8 & 0x10) != 16 ? 0 : 0x10000000) | ((v8 & 0x20) != 32 ? 0 : 0x8000000) | ((v9 & 0x40 | 2 * (v6[1] & 2 | 8 * (v9 & 8 | 16 * (~v8 & 1 | 2 * (v11 & 4 | 4 * (v10 & 2))) | 3))) << 18);
      }
      v13 = 0;
LABEL_20:
      if ( !bDecreaseCharged && *v6 & 0x80 && pkChar == g_pkMainChar && Inventory::GetEquipedWeaponAcc(&g_kInventory) )
      {
        Inventory::DecreaeWeaponAccCharged(&g_kInventory);
        bDecreaseCharged = 1;
      }
      if ( !bShieldCosDecreaseCharged
        && v6[1] & 4
        && pkChar == g_pkMainChar
        && Inventory::GetEquipedShieldAcc(&g_kInventory) )
      {
        Inventory::DecreaeShieldAccCharged(&g_kInventory);
        bShieldCosDecreaseCharged = 1;
      }
      if ( !*(_DWORD *)(v6 + 6) || v6[1] & 1 )
      {
        v20 = CharMgr::GetChar(&g_kCharMgr, *((_WORD *)v6 - 1));
        if ( v20 )
          v20->m_bWillDead = 1;
      }
      if ( pkDmgInfoSet )
      {
        v21 = g_pkMainChar->m_kHandle;
        if ( pkChar->m_kHandle == v21 )
        {
          DamageInfoSet::AddDamage(
            pkDmgInfoSet,
            v12,
            *((_WORD *)v6 - 1),
            *((_WORD *)v6 + 5),
            *(_DWORD *)(v6 + 6),
            1,
            0,
            1);
        }
        else
        {
          v22 = *((_WORD *)v6 - 1);
          if ( v22 == v21 )
            DamageInfoSet::AddDamage(
              pkDmgInfoSet,
              v12,
              v22,
              *((_WORD *)v6 + 5),
              *(_DWORD *)(v6 + 6),
              1,
              0,
              *(_WORD *)pvData);
          else
            DamageInfoSet::AddDamage(pkDmgInfoSet, v12, v22, *((_WORD *)v6 + 5), *(_DWORD *)(v6 + 6), 0, 0, -1);
        }
      }
      else
      {
        pkDmgDummyInfoSet.kDamageList.m_kAllocator.m_uiCount = 0;
        pkDmgDummyInfoSet.kDamageList.m_pkHead = 0;
        pkDmgDummyInfoSet.kDamageList.m_pkTail = 0;
        pkDmgDummyInfoSet.kDamageList.vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTList<DamageInfo *>::`vftable';
        v35 = 0;
        DamageInfoSet::Clear(&pkDmgDummyInfoSet);
        if ( pkChar->m_kHandle == g_pkMainChar->m_kHandle )
          DamageInfoSet::AddDamage(
            &pkDmgDummyInfoSet,
            v12,
            *((_WORD *)v6 - 1),
            *((_WORD *)v6 + 5),
            *(_DWORD *)(v6 + 6),
            1,
            0,
            -1);
        else
          DamageInfoSet::AddDamage(
            &pkDmgDummyInfoSet,
            v12,
            *((_WORD *)v6 - 1),
            *((_WORD *)v6 + 5),
            *(_DWORD *)(v6 + 6),
            *((_WORD *)v6 - 1) == g_pkMainChar->m_kHandle,
            0,
            -1);
        DamageInfoSet::Applicate(&pkDmgDummyInfoSet, pkChar, v13);
        v35 = 1;
        DamageInfoSet::Clear(&pkDmgDummyInfoSet);
        pkDmgDummyInfoSet.kDamageList.vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTPointerListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable';
        v23 = pkDmgDummyInfoSet.kDamageList.m_pkHead;
        v35 = 2;
        if ( pkDmgDummyInfoSet.kDamageList.m_pkHead )
        {
          do
          {
            v24 = v23;
            v23 = v23->m_pkNext;
            pkDmgDummyInfoSet.kDamageList.vfptr->DeleteItem(
              (NiTListBase<DFALL<DamageInfo *>,DamageInfo *> *)&pkDmgDummyInfoSet,
              v24);
          }
          while ( v23 );
        }
        pkDmgDummyInfoSet.kDamageList.m_kAllocator.m_uiCount = 0;
        pkDmgDummyInfoSet.kDamageList.m_pkHead = 0;
        pkDmgDummyInfoSet.kDamageList.m_pkTail = 0;
        v35 = -1;
        pkDmgDummyInfoSet.kDamageList.vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable';
      }
      v25 = *((_BYTE *)pvData + 4);
      v6 += 14;
      ++i;
    }
    while ( i < v25 );
  }
  return iRevBytes;
}
// 973DBC: using guessed type int (__thiscall *NiTListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable')(void *p, char);
// 973DEC: using guessed type int (__thiscall *NiTPointerListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable')(void *p, char);
// 973DFC: using guessed type int (__thiscall *NiTList<DamageInfo *>::`vftable')(void *p, char);

//----- (004BB9C0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_ABSTATESET_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  Char *v3; // edi@1
  unsigned int v4; // esi@2
  std::_Container_base12 *v5; // edx@4
  std::_Container_proxy *v6; // ecx@6
  int v7; // eax@6
  std::_Container_base12 *v8; // edx@10
  std::_Container_proxy *v9; // ecx@12
  int v10; // eax@12
  char v11; // al@16
  int v12; // edi@16
  char v13; // bl@16
  unsigned int v14; // esi@16
  char *v15; // esi@19
  std::_Container_base12 *v16; // edx@28
  std::_Container_proxy *v17; // edi@30
  char *v18; // eax@32
  NiUnsharedGeometryGroup *v20; // eax@26
  NiUnsharedGeometryGroup *v21; // eax@38
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > iterEnd; // [sp+14h] [bp-20h]@2
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > iter; // [sp+20h] [bp-14h]@2
  Char *pkChar; // [sp+2Ch] [bp-8h]@1
  GameFrameWork *v25; // [sp+30h] [bp-4h]@1

  v25 = this;
  v3 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  pkChar = v3;
  if ( !v3 )
    return iRevBytes;
  std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::begin(&g_kCharMgr.m_kLoadDataList, &iter);
  std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::end(&g_kCharMgr.m_kLoadDataList, &iterEnd);
  v4 = iter._Myoff;
  if ( iter._Myoff == iterEnd._Myoff )
  {
LABEL_16:
    v11 = ((int (__thiscall *)(Char *, _DWORD, _DWORD, _DWORD))v3->vfptr->AddAbStateByAbstateIndex)(
            v3,
            *(_DWORD *)((char *)pvData + 2),
            -3.0,
            0);
    v12 = *((_WORD *)pvData + 1);
    v13 = v11;
    v14 = 0;
    if ( ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::GetTotal() )
    {
      while ( *(_DWORD *)(CDataReader::GetRecord(
                            (CDataReader *)(ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable + 4),
                            v14)
                        + 34) != v12 )
      {
        if ( ++v14 >= ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::GetTotal() )
          goto LABEL_19;
      }
      v15 = CDataReader::GetRecord(
              (CDataReader *)(ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable + 4),
              v14);
    }
    else
    {
LABEL_19:
      v15 = 0;
    }
    if ( pkChar != g_pkMainChar || !v13 || !v15 )
      return iRevBytes;
    if ( *((_DWORD *)v15 + 61) == 3 )
    {
      v20 = TextData::Get(0x4EFACDCBu);
    }
    else if ( *((_DWORD *)v15 + 61) == 4 )
    {
      v20 = TextData::Get(0x6808C3CCu);
    }
    else
    {
      if ( *((_DWORD *)v15 + 61) != 5 )
        goto LABEL_37;
      v20 = TextData::Get(0xA653383u);
    }
    GameFrameWork::AddSysMsg(v25, (const char *)v20);
LABEL_37:
    if ( *(_DWORD *)(v15 + 34) == 337 )
    {
      v21 = TextData2::Get(0x4F19C4B8u);
      GameFrameWork::AddSysMsg(v25, (const char *)v21);
    }
    return iRevBytes;
  }
  while ( 1 )
  {
    if ( iter._Myproxy )
      v5 = iter._Myproxy->_Mycont;
    else
      v5 = 0;
    v6 = v5[2]._Myproxy;
    v7 = v4;
    if ( (unsigned int)v6 <= v4 )
      v7 = v4 - (_DWORD)v6;
    if ( (&v5[1]._Myproxy->_Mycont)[v7][60]._Myproxy )
    {
      if ( iter._Myproxy )
        v8 = iter._Myproxy->_Mycont;
      else
        v8 = 0;
      v9 = v8[2]._Myproxy;
      v10 = v4;
      if ( (unsigned int)v9 <= v4 )
        v10 = v4 - (_DWORD)v9;
      if ( LOWORD((&v8[1]._Myproxy->_Mycont)[v10][60]._Myproxy[69]._Mycont) == v3->m_kHandle )
        break;
    }
    if ( ++v4 == iterEnd._Myoff )
      goto LABEL_16;
  }
  if ( iter._Myproxy )
    v16 = iter._Myproxy->_Mycont;
  else
    v16 = 0;
  v17 = v16[2]._Myproxy;
  if ( (unsigned int)v17 <= v4 )
    v4 -= (unsigned int)v17;
  v18 = (char *)&(&v16[1]._Myproxy->_Mycont)[v4][22]._Myproxy + *(_DWORD *)((char *)pvData + 2) / 8 + 3;
  *v18 |= 1 << *(_DWORD *)((char *)pvData + 2) % 8;
  return iRevBytes;
}
// A8C2A0: using guessed type int ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;

//----- (004BBBB0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_ABSTATEINFORM_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  unsigned __int16 *v4; // esi@2
  unsigned int v5; // eax@2
  double v6; // st7@3
  unsigned __int16 v7; // ax@5
  AbnormalStateInfo *v8; // eax@5
  bool (__thiscall *v9)(AbStateInfectee *, ABSTATEINDEX, float, bool); // edx@5
  unsigned int v10; // esi@7
  std::_Container_base12 *v11; // edx@10
  std::_Container_proxy *v12; // ecx@12
  int v13; // eax@12
  float v14; // ebx@17
  std::_Container_base12 *v15; // edx@19
  std::_Container_proxy *v16; // edi@21
  char *v17; // eax@23
  NiUnsharedGeometryGroup *v19; // eax@24
  MapNavigator *v20; // esi@30
  GTInformWin *v21; // esi@32
  D3DXCOLOR *v22; // eax@33
  D3DXCOLOR v23; // ST04_16@33
  char *v24; // eax@33
  MapNavigator *v25; // esi@37
  MapNavigator *v26; // edi@38
  GTInformWin *v27; // esi@44
  D3DXCOLOR *v28; // eax@45
  D3DXCOLOR v29; // ST04_16@45
  char *v30; // eax@45
  NiUnsharedGeometryGroup *v31; // eax@47
  int v32; // eax@54
  SubAbStateInfo *v33; // eax@58
  CBlindEffect *v34; // ecx@60
  double v35; // st7@60
  float fFullTime; // ST14_4@60
  PgNet *v37; // ecx@61
  D3DXCOLOR v38; // [sp+24h] [bp-2Ch]@7
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > iter; // [sp+34h] [bp-1Ch]@7
  AbnormalStateInfo *pkInfo; // [sp+40h] [bp-10h]@4
  NiPointer<MapNavigator> result; // [sp+44h] [bp-Ch]@8
  float fTime; // [sp+48h] [bp-8h]@5
  GameFrameWork *v43; // [sp+4Ch] [bp-4h]@1

  v3 = this;
  v43 = this;
  if ( !g_pkMainChar )
    return iRevBytes;
  v4 = (unsigned __int16 *)pvData;
  v5 = *((_DWORD *)pvData + 1);
  if ( v5 == -1 )
  {
    v6 = -3.0;
  }
  else
  {
    pkInfo = (AbnormalStateInfo *)*((_DWORD *)pvData + 1);
    v6 = (double)v5 / 1000.0;
  }
  v7 = *(_WORD *)pvData;
  fTime = v6;
  v8 = AbnormalStateInfoTab::GetByAbstateIndex(v7);
  v9 = g_pkMainChar->vfptr->AddAbStateByAbstateIndex;
  pkInfo = v8;
  if ( !(unsigned __int8)((int (__stdcall *)(int, _DWORD, _DWORD))v9)(*(_DWORD *)v4, LODWORD(fTime), 0)
    || (fTime = COERCE_FLOAT(AbnormalStateInfoTab::GetByAbstateIndex(*v4)), fTime == 0.0) )
  {
LABEL_49:
    if ( g_pkMainChar->m_kAbStateProperty.iUnMovableCount || g_pkMainChar->m_kAbStateProperty.iFearCount > 0 )
    {
      if ( v3->m_kCharMover.m_bAutoRun )
        KeyboardMoveProcess::SetAutoRun(&v3->m_kCharMover, 0);
      GameFrameWork::Stick(v3, 0, 0);
    }
    v32 = *(_DWORD *)v4;
    if ( *(_DWORD *)v4 == 76 || v32 == 370 || v32 == 414 )
    {
      *(float *)&pvData = 0.0099999998;
      if ( pkInfo )
      {
        v33 = SubAbStateInfoTab::GetByInxName(pkInfo->SubAbState);
        if ( v33 )
          *(float *)&pvData = (double)v33->KeepTime;
      }
      v34 = v3->m_spBlindEffect.m_pObject;
      *(float *)&pvData = *(float *)&pvData / 1000.0;
      v35 = *(float *)&pvData;
      *(float *)&pvData = 0.25 * *(float *)&pvData * 3.0;
      fFullTime = v35;
      CBlindEffect::Start(v34, fFullTime, *(float *)&pvData);
      MainChar::SetTargetChar((MainChar *)g_pkMainChar, 0);
      if ( (signed int)AttackSequenceManager::GetAttSeqCount((AttackSequenceManager *)&g_pkMainChar->vfptr) > 0 )
      {
        v37 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
        LOWORD(pvData) = 9266;
        PgNet::SendNetMsg(v37, &pvData, 2);
        AttackSequenceManager::HardStopAttack((AttackSequenceManager *)&g_pkMainChar->vfptr);
      }
    }
    return iRevBytes;
  }
  std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::begin(&g_kCharMgr.m_kLoadDataList, &iter);
  std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::end(
    &g_kCharMgr.m_kLoadDataList,
    (std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *)&v38.g);
  v10 = iter._Myoff;
  if ( iter._Myoff == LODWORD(v38.a) )
  {
LABEL_17:
    v14 = fTime;
    switch ( *(_DWORD *)(LODWORD(fTime) + 244) )
    {
      case 4:
        v19 = TextData::Get(0x6808C3CCu);
        goto LABEL_27;
      case 5:
        v19 = TextData::Get(0xA653383u);
        goto LABEL_27;
      case 3:
        v19 = TextData::Get(0x4EFACDCBu);
LABEL_27:
        GameFrameWork::AddSysMsg(v3, (const char *)v19);
        break;
      case 6:
      case 7:
        if ( v3->m_kCharMover.m_bAutoRun )
          KeyboardMoveProcess::SetAutoRun(&v3->m_kCharMover, 0);
        GameFrameWork::Stick(v3, 0, 0);
        v20 = MapNavigator::GetMapNavigator(&result)->m_pObject;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&result);
        if ( v20 )
        {
          if ( v20->m_bIsWorking )
          {
            v20->m_bIsWorking = 0;
            v21 = v3->m_pkAutoRunMsgWin;
            if ( v21 )
            {
              GTInformWin::Clear(v3->m_pkAutoRunMsgWin);
              v22 = Color::GetDxColor(&v38, -1, -112, 0, -1);
              *(_QWORD *)&v23.r = *(_QWORD *)&v22->r;
              *(_QWORD *)&v23.b = *(_QWORD *)&v22->b;
              v24 = (char *)TextData2::Get(0x3C517589u);
              GTInformWin::AddText(v21, v24, v23, 0, 3.0);
            }
          }
        }
        break;
      default:
        break;
    }
    if ( *(_DWORD *)(LODWORD(v14) + 248) == 8 )
    {
      if ( v3->m_kCharMover.m_bAutoRun )
        KeyboardMoveProcess::SetAutoRun(&v3->m_kCharMover, 0);
      GameFrameWork::Stick(v3, 0, 0);
      v25 = MapNavigator::GetMapNavigator(&result)->m_pObject;
      if ( result.m_pObject )
      {
        v26 = result.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) && v26 )
          v26->vfptr->__vecDelDtor((NiRefObject *)v26, 1u);
        v3 = v43;
      }
      if ( v25 )
      {
        if ( v25->m_bIsWorking )
        {
          v25->m_bIsWorking = 0;
          v27 = v3->m_pkAutoRunMsgWin;
          if ( v27 )
          {
            GTInformWin::Clear(v3->m_pkAutoRunMsgWin);
            v28 = Color::GetDxColor(&v38, -1, -112, 0, -1);
            *(_QWORD *)&v29.r = *(_QWORD *)&v28->r;
            *(_QWORD *)&v29.b = *(_QWORD *)&v28->b;
            v30 = (char *)TextData2::Get(0x3C517589u);
            GTInformWin::AddText(v27, v30, v29, 0, 3.0);
          }
        }
      }
    }
    if ( *(_DWORD *)(LODWORD(v14) + 34) == 337 )
    {
      v31 = TextData2::Get(0x4F19C4B8u);
      GameFrameWork::AddSysMsg(v3, (const char *)v31);
    }
    v4 = (unsigned __int16 *)pvData;
    goto LABEL_49;
  }
  result.m_pObject = (MapNavigator *)g_pkMainChar->m_kHandle;
  while ( 1 )
  {
    if ( iter._Myproxy )
      v11 = iter._Myproxy->_Mycont;
    else
      v11 = 0;
    v12 = v11[2]._Myproxy;
    v13 = v10;
    if ( (unsigned int)v12 <= v10 )
      v13 = v10 - (_DWORD)v12;
    if ( LOWORD((&v11[1]._Myproxy->_Mycont)[v13][60]._Myproxy[69]._Mycont) == LOWORD(result.m_pObject) )
      break;
    if ( ++v10 == LODWORD(v38.a) )
    {
      v3 = v43;
      goto LABEL_17;
    }
  }
  if ( iter._Myproxy )
    v15 = iter._Myproxy->_Mycont;
  else
    v15 = 0;
  v16 = v15[2]._Myproxy;
  if ( (unsigned int)v16 <= v10 )
    v10 -= (unsigned int)v16;
  v17 = (char *)&(&v15[1]._Myproxy->_Mycont)[v10][22]._Myproxy + *(_DWORD *)pvData / 8 + 3;
  *v17 |= 1 << *(_DWORD *)pvData % 8;
  return iRevBytes;
}

//----- (004BC000) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_ABSTATERESET_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  void *v3; // edi@1
  unsigned __int16 v4; // ax@1
  Char *v5; // ebx@1
  unsigned int v6; // esi@2
  unsigned __int16 v7; // di@3
  _DWORD *v8; // ebx@4
  std::_Container_base12 *v9; // edx@5
  std::_Container_proxy *v10; // ecx@7
  int v11; // eax@7
  int v12; // edi@12
  unsigned int v13; // esi@12
  char *v14; // eax@15
  int v15; // eax@18
  int v16; // eax@21
  int v17; // edi@21
  unsigned int v18; // ecx@23
  int v19; // edx@23
  std::_Container_base12 *v20; // edx@28
  std::_Container_proxy *v21; // ecx@30
  char *v22; // eax@32
  NiUnsharedGeometryGroup *v24; // eax@20
  int v25; // eax@36
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > iterEnd; // [sp+Ch] [bp-20h]@2
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > iter; // [sp+18h] [bp-14h]@2
  Char *pkChar; // [sp+24h] [bp-8h]@1
  GameFrameWork *v29; // [sp+28h] [bp-4h]@1

  v3 = pvData;
  v4 = *(_WORD *)pvData;
  v29 = this;
  v5 = CharMgr::GetChar(&g_kCharMgr, v4);
  pkChar = v5;
  if ( !v5 )
    return iRevBytes;
  std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::begin(&g_kCharMgr.m_kLoadDataList, &iter);
  std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::end(&g_kCharMgr.m_kLoadDataList, &iterEnd);
  v6 = iter._Myoff;
  if ( iter._Myoff == iterEnd._Myoff )
  {
LABEL_12:
    v5->vfptr->DeleteAbStateByAbstateIndex((AbStateInfectee *)v5, *(ABSTATEINDEX *)((char *)v3 + 2));
    v12 = *((_WORD *)v3 + 1);
    v13 = 0;
    if ( ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::GetTotal() )
    {
      while ( *(_DWORD *)(CDataReader::GetRecord(
                            (CDataReader *)(ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable + 4),
                            v13)
                        + 34) != v12 )
      {
        if ( ++v13 >= ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::GetTotal() )
          goto LABEL_15;
      }
      v14 = CDataReader::GetRecord(
              (CDataReader *)(ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable + 4),
              v13);
    }
    else
    {
LABEL_15:
      v14 = 0;
    }
    if ( v5 != g_pkMainChar )
      return iRevBytes;
    if ( !v14 )
      goto LABEL_36;
    v15 = *((_DWORD *)v14 + 61) - 1;
    if ( v15 )
    {
      if ( v15 != 1 )
      {
LABEL_36:
        v25 = *(_DWORD *)((char *)pvData + 2);
        if ( v25 == 76 || v25 == 370 || v25 == 414 )
          CBlindEffect::FastEnd(v29->m_spBlindEffect.m_pObject);
        return iRevBytes;
      }
      v24 = TextData::Get(0x2D582C7Du);
    }
    else
    {
      v24 = TextData::Get(0xE5493047);
    }
    GameFrameWork::AddSysMsg(v29, (const char *)v24);
    goto LABEL_36;
  }
  v7 = v5->m_kHandle;
  while ( 1 )
  {
    v8 = &iter._Myproxy->_Mycont;
    if ( iter._Myproxy )
      v9 = iter._Myproxy->_Mycont;
    else
      v9 = 0;
    v10 = v9[2]._Myproxy;
    v11 = v6;
    if ( (unsigned int)v10 <= v6 )
      v11 = v6 - (_DWORD)v10;
    if ( LOWORD((&v9[1]._Myproxy->_Mycont)[v11][60]._Myproxy[69]._Mycont) == v7 )
      break;
    if ( ++v6 == iterEnd._Myoff )
    {
      v5 = pkChar;
      v3 = pvData;
      goto LABEL_12;
    }
  }
  v16 = *(_DWORD *)((char *)pvData + 2) / 8;
  v17 = *(_DWORD *)((char *)pvData + 2) % 8;
  if ( iter._Myproxy )
    v8 = &iter._Myproxy->_Mycont->_Myproxy;
  v18 = v8[2];
  v19 = v6;
  if ( v18 <= v6 )
    v19 = v6 - v18;
  if ( !*(_BYTE *)(*(_DWORD *)(v8[1] + 4 * v19) + v16 + 91) || !(1 << v17) )
    return iRevBytes;
  if ( iter._Myproxy )
    v20 = iter._Myproxy->_Mycont;
  else
    v20 = 0;
  v21 = v20[2]._Myproxy;
  if ( (unsigned int)v21 <= v6 )
    v6 -= (unsigned int)v21;
  v22 = (char *)&(&v20[1]._Myproxy->_Mycont)[v6][22]._Myproxy + v16 + 3;
  *v22 ^= 1 << v17;
  return iRevBytes;
}
// A8C2A0: using guessed type int ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;

//----- (004BC1F0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_SKILLBASH_HIT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // ebx@1
  ShortCutWin **v4; // esi@2
  int v5; // esi@4
  int v6; // ebx@4
  ActiveSkillInfo **v7; // eax@8
  ActiveSkillInfo *v8; // eax@10
  SkillSequence *v9; // eax@13
  char *v10; // edi@17
  int v11; // eax@18
  char v12; // al@22
  unsigned int *v13; // ebx@22
  int v14; // esi@22
  Char *v15; // eax@32
  int result; // eax@38
  unsigned int i; // [sp+18h] [bp-1Ch]@16
  bool bDisPlay; // [sp+1Ch] [bp-18h]@34
  GameFrameWork *v19; // [sp+20h] [bp-14h]@1
  int iHpChange; // [sp+24h] [bp-10h]@2
  int iHpChangea; // [sp+24h] [bp-10h]@18
  SkillSequence *pkSeq; // [sp+28h] [bp-Ch]@14
  ActiveSkillInfo *pkInfo; // [sp+2Ch] [bp-8h]@5
  bool bShieldCosDecreaseCharged; // [sp+32h] [bp-2h]@4
  bool bDecreaseCharged; // [sp+33h] [bp-1h]@4

  v3 = this;
  v19 = this;
  CastingProgressWin::CastingSuccess(this->m_pkCastingProgressBar);
  if ( !AbStateInfectee::FindAbstateInstBySubAbstateType((AbStateInfectee *)&g_pkMainChar->vfptr, SUBAB_COOLTIMEREMOVE) )
  {
    Skill::RecordSkillUse(*(_WORD *)pvData, Timer::ms_fCurTime, 0.0, 0.0);
    ShortCutWin::StartSkill(v3->m_pkShortCutWin, *(_WORD *)pvData, Timer::ms_fCurTime);
    ShortCutWin::StartSkill(v3->m_pkShortCutWinV, *(_WORD *)pvData, Timer::ms_fCurTime);
    v4 = v3->m_pkShortCutSubWinV;
    iHpChange = 4;
    do
    {
      ShortCutWin::StartSkill(*(v4 - 5), *(_WORD *)pvData, Timer::ms_fCurTime);
      ShortCutWin::StartSkill(*v4, *(_WORD *)pvData, Timer::ms_fCurTime);
      ++v4;
      --iHpChange;
    }
    while ( iHpChange );
  }
  bDecreaseCharged = 0;
  bShieldCosDecreaseCharged = 0;
  CharMgr::GetChar(&g_kCharMgr, v3->m_kSkillCasting.kTargetHandle);
  v5 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  v6 = *(_WORD *)pvData;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                          v6) )
  {
    if ( (unsigned __int16)v6 <= *(_WORD *)(v5 + 200) )
    {
      v7 = (ActiveSkillInfo **)(*(_DWORD *)(v5 + 196) + 4 * v6);
      if ( *v7 )
      {
        v8 = *v7;
        pkInfo = v8;
        if ( v8 && v8->Area )
        {
          v19->m_kSkillCasting.kGroundTypeDetail.x = *(_DWORD *)((char *)pvData + 3);
          v19->m_kSkillCasting.kGroundTypeDetail.y = *(_DWORD *)((char *)pvData + 7);
          Char::SetSkillTargetGroundPoint(
            g_pkMainChar,
            *(_DWORD *)((char *)pvData + 3),
            *(_DWORD *)((char *)pvData + 7),
            1);
        }
      }
      else
      {
        pkInfo = 0;
      }
    }
    else
    {
      pkInfo = 0;
    }
  }
  else
  {
    pkInfo = 0;
  }
  Char::SetReserveSkillSmash(g_pkMainChar, 1);
  v9 = (SkillSequence *)operator new(0x18u);
  if ( v9 )
  {
    v9->kDamageInfoSet.kDamageList.m_kAllocator.m_uiCount = 0;
    v9->kDamageInfoSet.kDamageList.m_pkHead = 0;
    v9->kDamageInfoSet.kDamageList.m_pkTail = 0;
    v9->kDamageInfoSet.kDamageList.vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTList<DamageInfo *>::`vftable';
    pkSeq = v9;
  }
  else
  {
    pkSeq = 0;
  }
  pkSeq->kSkillID = *(_WORD *)pvData;
  i = 0;
  if ( *((_BYTE *)pvData + 2) > 0u )
  {
    v10 = (char *)pvData + 13;
    do
    {
      v11 = *(_DWORD *)(v10 + 2);
      iHpChangea = v11;
      if ( v11 < 0 )
      {
        v11 = 0;
        iHpChangea = 0;
      }
      if ( v11 & 0xFFFF0000 )
        iHpChangea = (unsigned __int16)v11;
      v12 = *v10;
      v13 = (unsigned int *)(v10 + 6);
      v14 = iHpChangea | (*(_DWORD *)(v10 + 6) != 0 ? 0 : 2147483648) | ((v12 & 0x20) != 32 ? 0 : 0x8000000) | ((v12 & 0x10) != 16 ? 0 : 0x10000000) | ((v12 & 0x40 | 16 * (v12 & 8 | 16 * (~*v10 & 1 | 2 * (*v10 & 4 | 4 * (*v10 & 2))) | 2)) << 18);
      if ( GameFrameWork::AdjustRestHP(*((_WORD *)v10 - 1), (unsigned int *)(v10 + 6)) )
      {
        if ( !bDecreaseCharged && *v10 & 0x80 && Inventory::GetEquipedWeaponAcc(&g_kInventory) )
        {
          Inventory::DecreaeWeaponAccCharged(&g_kInventory);
          bDecreaseCharged = 1;
        }
        if ( !bShieldCosDecreaseCharged && v10[1] & 2 && Inventory::GetEquipedShieldAcc(&g_kInventory) )
        {
          Inventory::DecreaeShieldAccCharged(&g_kInventory);
          bShieldCosDecreaseCharged = 1;
        }
        if ( !*v13 )
        {
          v15 = CharMgr::GetChar(&g_kCharMgr, *((_WORD *)v10 - 1));
          if ( v15 )
            v15->m_bWillDead = 1;
        }
        bDisPlay = 1;
        if ( !strcmp(pkInfo->InxName, "Revival01") )
          bDisPlay = 0;
        DamageInfoSet::AddDamage(
          &pkSeq->kDamageInfoSet,
          v14,
          *((_WORD *)v10 - 1),
          *((_WORD *)v10 + 5),
          *v13,
          bDisPlay,
          0,
          -1);
      }
      v10 += 14;
      ++i;
    }
    while ( i < *((_BYTE *)pvData + 2) );
  }
  AttackSequenceManager::AddSkillSeq((AttackSequenceManager *)&g_pkMainChar->vfptr, pkSeq);
  result = iRevBytes;
  v19->m_kSkillCasting.eState = 0;
  return result;
}
// 973DFC: using guessed type int (__thiscall *NiTList<DamageInfo *>::`vftable')(void *p, char);
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (004BC570) --------------------------------------------------------
void __thiscall GameFrameWork::SendKeyRemappingReq(GameFrameWork *this, std::list<int,std::allocator<int> > *lstChanged)
{
  unsigned int v2; // esi@1
  GameFrameWork *v3; // edi@1
  KeyRemappingWin *v4; // esi@2
  std::_List_nod<int,std::allocator<int> >::_Node *v5; // edi@3
  std::_List_nod<int,std::allocator<int> >::_Node *v6; // eax@3
  char *v7; // ecx@4
  char DummyMem[1024]; // [sp+Ch] [bp-404h]@2

  v2 = lstChanged->_Mysize;
  v3 = this;
  if ( v2 )
  {
    memset(&DummyMem[1], 0, 0x3FFu);
    *(_WORD *)DummyMem = v2;
    v4 = v3->m_pkKeyRemappingWin;
    if ( v4 )
    {
      v5 = lstChanged->_Myhead;
      v6 = lstChanged->_Myhead->_Next;
      if ( v6 != lstChanged->_Myhead )
      {
        v7 = &DummyMem[5];
        do
        {
          *(_WORD *)(v7 - 3) = v6->_Myval;
          *v7 = v4->m_keyMapping[v6->_Myval].keyValue;
          *(v7 - 1) = v4->m_keyMapping[v6->_Myval].modifier;
          v6 = v6->_Next;
          v7 += 4;
        }
        while ( v6 != v5 );
      }
      NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Cu, 0x39u, DummyMem, 4 * *(unsigned __int16 *)DummyMem + 2);
    }
  }
}

//----- (004BC640) --------------------------------------------------------
void __thiscall GameFrameWork::AttackedMsg::UpdateAttackedMsg(GameFrameWork::AttackedMsg *this)
{
  GameFrameWork::AttackedMsg *v1; // esi@1
  std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *v2; // eax@1
  std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *v3; // ecx@1
  std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *v4; // edi@3

  v1 = this;
  v2 = this->m_kAttackedList._Myhead;
  v3 = this->m_kAttackedList._Myhead->_Next;
  if ( v3 != v2 )
  {
    do
    {
      if ( Timer::ms_fCurTime - v3->_Myval.m_fAttackedTime > 30.0 )
      {
        v4 = v3->_Next;
        if ( v3 != v1->m_kAttackedList._Myhead )
        {
          v3->_Prev->_Next = v4;
          v3->_Next->_Prev = v3->_Prev;
          operator delete(v3);
          --v1->m_kAttackedList._Mysize;
        }
        v3 = v4;
      }
      v3 = v3->_Next;
    }
    while ( v3 != v1->m_kAttackedList._Myhead );
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004BC690) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_CHAR_POLYMORPH_CMD(int iRevBytes, void *pvData)
{
  Char *v3; // eax@1
  Char *v4; // ebx@1
  std::_Container_proxy *v5; // edi@1
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *v7; // eax@10
  std::_Container_proxy **v8; // ecx@11
  unsigned int v9; // esi@13
  std::_Container_base12 *v10; // edx@17
  unsigned int v11; // ecx@19
  int v12; // eax@19
  std::_Container_base12 *v13; // ecx@23
  unsigned int v14; // eax@25
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *v15; // eax@28
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > v16; // [sp+Ch] [bp-24h]@28
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > result; // [sp+18h] [bp-18h]@10
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > itor; // [sp+24h] [bp-Ch]@10

  v3 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  v4 = v3;
  v5 = 0;
  if ( v3 )
  {
    if ( -1 == *((_WORD *)pvData + 1) )
    {
      Char::EnablePolymorph(v3, 0);
      if ( *((_DWORD *)pvData + 1) == 822 )
        Char::UnMetamorphosis(v4);
      else
        Char::Shape_UnMetamorphosis(v4, 0);
      if ( v4->m_kCharShape.m_bAutoPickItem )
        CharShape::SetMiniMonEffect(&v4->m_kCharShape, 0, 1);
      if ( v4->m_kCharShape.m_bAutoUseItem )
      {
        CharShape::SetMinimonAutoUseEff(&v4->m_kCharShape, (int)pvData, 1);
        return iRevBytes;
      }
    }
    else
    {
      itor._Myproxy = 0;
      itor._Mynextiter = 0;
      v7 = std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::begin(&g_kCharMgr.m_kLoadDataList, &result);
      if ( v7->_Myproxy )
      {
        v8 = &v7->_Myproxy->_Mycont->_Myproxy;
        if ( v8 )
        {
          v5 = *v8;
          itor._Myproxy = *v8;
        }
      }
      itor._Myoff = v7->_Myoff;
      v9 = itor._Myoff;
      if ( v9 != std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::end(
                   &g_kCharMgr.m_kLoadDataList,
                   &result)->_Myoff )
      {
        while ( 1 )
        {
          if ( v5 )
            v10 = v5->_Mycont;
          else
            v10 = 0;
          v11 = (unsigned int)v10[2]._Myproxy;
          v12 = v9;
          if ( v11 <= v9 )
            v12 = v9 - v11;
          if ( (Char *)(&v10[1]._Myproxy->_Mycont)[v12][60]._Myproxy == v4 )
          {
            if ( v5 )
              v13 = v5->_Mycont;
            else
              v13 = 0;
            v14 = (unsigned int)v13[2]._Myproxy;
            if ( v14 <= v9 )
              v9 -= v14;
            HIWORD((&v13[1]._Myproxy->_Mycont)[v9][20]._Myproxy) = *((_WORD *)pvData + 1);
          }
          std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::operator++(&itor, &v16, 0);
          v15 = std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::end(
                  &g_kCharMgr.m_kLoadDataList,
                  &result);
          v9 = itor._Myoff;
          if ( itor._Myoff == v15->_Myoff )
            break;
          v5 = itor._Myproxy;
        }
      }
      Char::EnablePolymorph(v4, 1);
      if ( *((_DWORD *)pvData + 1) == 822 )
        Char::Metamorphosis(v4, *((_WORD *)pvData + 1));
      else
        Char::ImmediatelyMetamorphosis(v4, *((_WORD *)pvData + 1));
      ((void (__thiscall *)(Char *, signed int))v4->vfptr[7].AddAbStateByAbstateIndex)(v4, 1);
      if ( MainChar::GetMetamorphosisType((MainChar *)g_pkMainChar) == 17
        && (Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1] == v4 )
      {
        MainChar::SetTargetChar((MainChar *)g_pkMainChar, 0);
      }
    }
  }
  return iRevBytes;
}

//----- (004BC840) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_SKILLBASH_HIT_OBJ_START_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // esi@1
  int v4; // edi@1
  SkillSequence *v5; // eax@4
  unsigned __int16 v6; // dx@7

  CharMgr::GetChar(&g_kCharMgr, this->m_kSkillCasting.kTargetHandle);
  v3 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  v4 = *(_WORD *)pvData;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                          v4)
    && (unsigned __int16)v4 <= *(_WORD *)(v3 + 200)
    && *(_DWORD *)(*(_DWORD *)(v3 + 196) + 4 * v4) )
  {
    v5 = (SkillSequence *)operator new(0x18u);
    if ( v5 )
    {
      v5->kDamageInfoSet.kDamageList.m_kAllocator.m_uiCount = 0;
      v5->kDamageInfoSet.kDamageList.m_pkHead = 0;
      v5->kDamageInfoSet.kDamageList.m_pkTail = 0;
      v5->kDamageInfoSet.kDamageList.vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTList<DamageInfo *>::`vftable';
    }
    else
    {
      v5 = 0;
    }
    v6 = *(_WORD *)pvData;
    v5->m_Index = *((_WORD *)pvData + 2);
    v5->kSkillID = v6;
    AttackSequenceManager::AddSkillSeq((AttackSequenceManager *)&g_pkMainChar->vfptr, v5);
  }
  return iRevBytes;
}
// 973DFC: using guessed type int (__thiscall *NiTList<DamageInfo *>::`vftable')(void *p, char);
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (004BC8E0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_BAT_BASH_HIT_CMD(int iRevBytes, void *pvData)
{
  _DWORD *v3; // eax@1
  AttackSequence *v4; // edi@2
  char v5; // al@4
  signed int v6; // edx@6
  Char *v7; // eax@11

  v3 = operator new(0x28u);
  if ( v3 )
  {
    v3[7] = 0;
    v3[5] = 0;
    v3[6] = 0;
    v3[4] = &NiTList<DamageInfo *>::`vftable';
    *((_WORD *)v3 + 6) = 0;
    *((_BYTE *)v3 + 14) = 0;
    v3[8] = -1;
    *((_BYTE *)v3 + 36) = 0;
    *((_WORD *)v3 + 19) = -1;
    v4 = (AttackSequence *)v3;
  }
  else
  {
    v4 = 0;
  }
  v4->byActionCode = Char::GetAttackActionCode(g_pkMainChar, *((_BYTE *)pvData + 4) & 0xF);
  v5 = Char::GetClass(g_pkMainChar);
  if ( CharClass::IsKindOf(v5, 11) )
    v4->byActionCode = 1;
  v4->fCoolTime = (double)*(_WORD *)((char *)pvData + 9) / 1000.0;
  v4->fRecvTime = Timer::ms_fCurTime;
  v6 = (unsigned int)*((_WORD *)pvData + 1) >> 1;
  if ( v6 < 0 )
    v6 = 0;
  if ( v6 & 0xFFFF0000 )
    v6 = (unsigned __int16)v6;
  DamageInfoSet::AddDamage(
    &v4->kDamageInfoSet,
    v6 | (*(_DWORD *)((char *)pvData + 5) != 0 ? 0 : 2147483648) | ((((*((_WORD *)pvData + 1) & 1) << 10) | *((_BYTE *)pvData + 4) & 0x10) << 20),
    *(_WORD *)pvData,
    *(_WORD *)((char *)pvData + 11),
    *(_DWORD *)((char *)pvData + 5),
    1,
    0,
    -1);
  if ( !*(_DWORD *)((char *)pvData + 5) )
  {
    v7 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
    if ( v7 )
      v7->m_bWillDead = 1;
  }
  AttackSequenceManager::AddAttSeq((AttackSequenceManager *)&g_pkMainChar->vfptr, v4);
  return iRevBytes;
}
// 973DFC: using guessed type int (__thiscall *NiTList<DamageInfo *>::`vftable')(void *p, char);
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004BCA10) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_BAT_BASH_MISS_CMD(int iRevBytes, void *pvData)
{
  _DWORD *v3; // eax@1
  AttackSequence *v4; // esi@2

  v3 = operator new(0x28u);
  if ( v3 )
  {
    v3[7] = 0;
    v3[5] = 0;
    v3[6] = 0;
    v3[4] = &NiTList<DamageInfo *>::`vftable';
    *((_WORD *)v3 + 6) = 0;
    *((_BYTE *)v3 + 14) = 0;
    v3[8] = -1;
    *((_BYTE *)v3 + 36) = 0;
    *((_WORD *)v3 + 19) = -1;
    v4 = (AttackSequence *)v3;
  }
  else
  {
    v4 = 0;
  }
  v4->byActionCode = Char::GetAttackActionCode(g_pkMainChar, *((_BYTE *)pvData + 2) & 0xF);
  v4->fCoolTime = (double)*(_WORD *)((char *)pvData + 3) / 1000.0;
  v4->fRecvTime = Timer::ms_fCurTime;
  DamageInfoSet::AddDamage(
    &v4->kDamageInfoSet,
    (*((_BYTE *)pvData + 2) & 0x20 | 32 * (*((_BYTE *)pvData + 2) & 0x10)) << 20,
    *(_WORD *)pvData,
    0xFFFE0000,
    0,
    1,
    0,
    -1);
  AttackSequenceManager::AddAttSeq((AttackSequenceManager *)&g_pkMainChar->vfptr, v4);
  return iRevBytes;
}
// 973DFC: using guessed type int (__thiscall *NiTList<DamageInfo *>::`vftable')(void *p, char);
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004BCAD0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_BAT_SOMEONEBASH_HIT_CMD(int iRevBytes, void *pvData)
{
  void *v3; // edi@1
  Char *v4; // esi@1
  AttackSequence *v5; // ebx@1
  _DWORD *v6; // eax@2
  unsigned int v7; // esi@4
  bool v8; // al@4
  Char *v9; // eax@4
  Char *pkAttacker; // [sp+1Ch] [bp+Ch]@1

  v3 = pvData;
  v4 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  v5 = 0;
  pkAttacker = v4;
  if ( v4 )
  {
    v6 = operator new(0x28u);
    if ( v6 )
    {
      v6[7] = 0;
      v6[5] = 0;
      v6[6] = 0;
      v6[4] = &NiTList<DamageInfo *>::`vftable';
      *((_WORD *)v6 + 6) = 0;
      *((_BYTE *)v6 + 14) = 0;
      *((_BYTE *)v6 + 36) = 0;
      v6[8] = -1;
      *((_WORD *)v6 + 19) = -1;
      v5 = (AttackSequence *)v6;
    }
    v5->byActionCode = Char::GetAttackActionCode(v4, *((_BYTE *)v3 + 4));
    v5->fCoolTime = (double)*(_WORD *)((char *)v3 + 9) / 1000.0;
    v5->fRecvTime = Timer::ms_fCurTime;
    v7 = *(_DWORD *)((char *)v3 + 5) != 0 ? 0 : 2147483648;
    v8 = Char::IsRangeAttChar(pkAttacker);
    DamageInfoSet::AddDamage(
      &v5->kDamageInfoSet,
      v7,
      *((_WORD *)v3 + 1),
      *(_WORD *)((char *)v3 + 11),
      *(_DWORD *)((char *)v3 + 5),
      0,
      v8,
      -1);
    v9 = CharMgr::GetChar(&g_kCharMgr, *((_WORD *)v3 + 1));
    if ( v9 && !*(_DWORD *)((char *)v3 + 5) )
      v9->m_bWillDead = 1;
    AttackSequenceManager::AddAttSeq((AttackSequenceManager *)&pkAttacker->vfptr, v5);
  }
  return iRevBytes;
}
// 973DFC: using guessed type int (__thiscall *NiTList<DamageInfo *>::`vftable')(void *p, char);
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004BCBD0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_BASH_MISSED_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  Char *v3; // ebx@1
  AttackSequence *v4; // edi@1
  _DWORD *v5; // eax@2
  unsigned int v6; // esi@4
  bool v7; // al@4
  void *pvDataa; // [sp+18h] [bp+Ch]@4

  WaitingForLogoutWin::Cancel(this->m_pkWaitingForLogoutWin);
  v3 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  v4 = 0;
  if ( v3 )
  {
    v5 = operator new(0x28u);
    if ( v5 )
    {
      v5[7] = 0;
      v5[5] = 0;
      v5[6] = 0;
      v5[4] = &NiTList<DamageInfo *>::`vftable';
      *((_WORD *)v5 + 6) = 0;
      *((_BYTE *)v5 + 14) = 0;
      v5[8] = -1;
      *((_BYTE *)v5 + 36) = 0;
      *((_WORD *)v5 + 19) = -1;
      v4 = (AttackSequence *)v5;
    }
    v4->byActionCode = *((_BYTE *)pvData + 2) & 0xF;
    v4->fCoolTime = (double)*(_WORD *)((char *)pvData + 3) / 1000.0;
    v4->fRecvTime = Timer::ms_fCurTime;
    v6 = (*((_BYTE *)pvData + 2) & 0x40 | 4 * (*((_BYTE *)pvData + 2) & 0x20 | 32 * (*((_BYTE *)pvData + 2) & 0x10))) << 18;
    pvDataa = (void *)g_pkMainChar->m_kHandle;
    v7 = Char::IsRangeAttChar(v3);
    DamageInfoSet::AddDamage(&v4->kDamageInfoSet, v6, (unsigned __int16)pvDataa, 0xFFFE0000, 0, 1, v7, -1);
    AttackSequenceManager::AddAttSeq((AttackSequenceManager *)&v3->vfptr, v4);
  }
  return iRevBytes;
}
// 973DFC: using guessed type int (__thiscall *NiTList<DamageInfo *>::`vftable')(void *p, char);
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004BCCD0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_BAT_SOMEONEBASH_MISS_CMD(int iRevBytes, void *pvData)
{
  _DWORD *v3; // eax@2
  AttackSequence *v4; // esi@3
  Char *pkAttacker; // [sp+8h] [bp-4h]@1

  pkAttacker = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  if ( pkAttacker )
  {
    v3 = operator new(0x28u);
    if ( v3 )
    {
      v3[7] = 0;
      v3[5] = 0;
      v3[6] = 0;
      v3[4] = &NiTList<DamageInfo *>::`vftable';
      *((_WORD *)v3 + 6) = 0;
      *((_BYTE *)v3 + 14) = 0;
      v3[8] = -1;
      *((_BYTE *)v3 + 36) = 0;
      *((_WORD *)v3 + 19) = -1;
      v4 = (AttackSequence *)v3;
    }
    else
    {
      v4 = 0;
    }
    v4->byActionCode = *((_BYTE *)pvData + 4);
    v4->fCoolTime = (double)*(_WORD *)((char *)pvData + 5) / 1000.0;
    v4->fRecvTime = Timer::ms_fCurTime;
    DamageInfoSet::AddDamage(&v4->kDamageInfoSet, 0x20000000u, *((_WORD *)pvData + 1), 0xFFFE0000, 0, 0, 0, -1);
    AttackSequenceManager::AddAttSeq((AttackSequenceManager *)&pkAttacker->vfptr, v4);
  }
  return iRevBytes;
}
// 973DFC: using guessed type int (__thiscall *NiTList<DamageInfo *>::`vftable')(void *p, char);
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004BCD90) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_SWING_START_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  Char *v3; // eax@3
  Char *v4; // ebx@3
  AttackSequence *v5; // edi@3
  AttackSequence *v6; // eax@5
  AttackSequence *v7; // edi@5
  __int16 v8; // ST18_2@7
  bool v9; // al@7
  _DWORD *v11; // eax@9
  char v12; // al@11
  __int16 v13; // ST18_2@13
  bool v14; // al@13
  GameFrameWork *v15; // [sp+Ch] [bp-4h]@1

  v15 = this;
  if ( g_pkMainChar->m_kHandle == *((_WORD *)pvData + 1) )
    WaitingForLogoutWin::Cancel(this->m_pkWaitingForLogoutWin);
  v3 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  v4 = v3;
  v5 = 0;
  if ( v3 )
  {
    if ( v3 == g_pkMainChar )
    {
      v6 = AttackSequenceManager::GetInvalidSeq((AttackSequenceManager *)&v3->vfptr);
      v7 = v6;
      if ( v6 && v6->m_SeqNum == -1 )
      {
        v6->m_SeqNum = *((_BYTE *)pvData + 8);
        v6->fCoolTime = (double)*(_WORD *)((char *)pvData + 5) / 1000.0;
        v6->fRecvTime = Timer::ms_fCurTime;
        v8 = *((_BYTE *)pvData + 7);
        v9 = Char::IsRangeAttChar(v4);
        DamageInfoSet::AddDamage(&v7->kDamageInfoSet, 0x20000000u, *((_WORD *)pvData + 1), 0xFFFE0000, 0, 0, v9, v8);
        return iRevBytes;
      }
      v5 = 0;
    }
    v11 = operator new(0x28u);
    if ( v11 )
    {
      v11[7] = 0;
      v11[5] = 0;
      v11[6] = 0;
      v11[4] = &NiTList<DamageInfo *>::`vftable';
      *((_WORD *)v11 + 6) = 0;
      *((_BYTE *)v11 + 14) = 0;
      v11[8] = -1;
      *((_BYTE *)v11 + 36) = 0;
      *((_WORD *)v11 + 19) = -1;
      v5 = (AttackSequence *)v11;
    }
    v5->byActionCode = Char::GetAttackActionCode(v4, *((_BYTE *)pvData + 4));
    v12 = Char::GetClass(v4);
    if ( CharClass::IsKindOf(v12, 11) )
      v5->byActionCode = 1;
    v5->fCoolTime = (double)*(_WORD *)((char *)pvData + 5) / 1000.0;
    v5->fRecvTime = Timer::ms_fCurTime;
    v5->m_SeqNum = *((_BYTE *)pvData + 8);
    v13 = *((_BYTE *)pvData + 7);
    v14 = Char::IsRangeAttChar(v4);
    DamageInfoSet::AddDamage(&v5->kDamageInfoSet, 0x20000000u, *((_WORD *)pvData + 1), 0xFFFE0000, 0, 0, v14, v13);
    AttackSequenceManager::AddAttSeq((AttackSequenceManager *)&v4->vfptr, v5);
    if ( v4 == g_pkMainChar )
      GameFrameWork::OpenPlayGuideWin(v15, BIL_BATTLE_2);
  }
  return iRevBytes;
}
// 973DFC: using guessed type int (__thiscall *NiTList<DamageInfo *>::`vftable')(void *p, char);
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004BCF30) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_MINIHOUSE_MODIFY_OUTSIDE_TITLE_CMD(int iRevBytes, void *pvData)
{
  void *v3; // esi@1
  stMINIHOUSEINFO *v4; // ebx@2
  int v5; // eax@3
  char *v6; // ecx@3
  char v7; // dl@4
  CharScreenBoardBase *v8; // eax@5
  CharScreenBoardBase *v9; // edi@5
  CharScreenBoardBaseVtbl *v10; // esi@6
  ScreenBoardTexture *v11; // eax@6
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > > result; // [sp+8h] [bp-4h]@1

  v3 = pvData;
  pvData = (void *)*(_WORD *)pvData;
  std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,long>>,0>>::find(
    &g_kMiniHouseMgr,
    &result,
    (const unsigned __int16 *)&pvData);
  if ( result._Ptr != (std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *)stru_B5C138._Ptr )
  {
    v4 = result._Ptr->_Myval.second;
    if ( v4 )
    {
      v5 = (int)v4->title;
      *(_DWORD *)v5 = 0;
      *(_DWORD *)(v5 + 4) = 0;
      *(_DWORD *)(v5 + 8) = 0;
      *(_DWORD *)(v5 + 12) = 0;
      *(_DWORD *)(v5 + 16) = 0;
      v6 = (char *)v3 + 2;
      do
      {
        v7 = *v6;
        v6[v4->title - ((_BYTE *)v3 + 2)] = *v6;
        ++v6;
      }
      while ( v7 );
      v8 = ScreenBDMgr::GetCharBD(&g_kScrnBDMgr, v4->handle);
      v9 = v8;
      if ( v8 )
      {
        v10 = v8->vfptr;
        v11 = ScreenBDMgr::GetScreenNameData(&g_kScrnBDMgr);
        v10->Init(v9, v4->handle, v11);
      }
    }
  }
  return iRevBytes;
}

//----- (004BCFD0) --------------------------------------------------------
void __thiscall GameFrameWork::AddAttacked(GameFrameWork *this, unsigned __int16 kHandle)
{
  char *v2; // esi@1
  std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *v3; // ecx@1
  std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *v4; // eax@1
  std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *v5; // edi@4
  std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *v6; // ST04_4@4
  std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *v7; // eax@4
  int v8; // ecx@4
  Char *v9; // eax@6
  int v10; // ST0C_4@7
  char *v11; // eax@7
  char *v12; // eax@7
  GameFrameWork::AttackedMsg::AttackedFrom kAttacked; // [sp+8h] [bp-Ch]@4
  GameFrameWork *v14; // [sp+10h] [bp-4h]@1

  v2 = (char *)&this->m_kAttackedMsg;
  v14 = this;
  v3 = this->m_kAttackedMsg.m_kAttackedList._Myhead;
  v4 = v3->_Next;
  if ( v3->_Next == v3 )
  {
LABEL_4:
    v5 = v3;
    kAttacked.m_fAttackedTime = Timer::ms_fCurTime;
    v6 = v3->_Prev;
    kAttacked.m_kAttacker = kHandle;
    v7 = std::_List_val<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>::_Buynode(v3, v6, &kAttacked);
    v8 = *((_DWORD *)v2 + 1);
    if ( (unsigned int)(536870910 - v8) < 1 )
      std::_Xlength_error("list<T> too long");
    *((_DWORD *)v2 + 1) = v8 + 1;
    v5->_Prev = v7;
    v7->_Prev->_Next = v7;
    v9 = CharMgr::GetChar(&g_kCharMgr, kHandle);
    if ( v9 )
    {
      v10 = ((int (__thiscall *)(Char *))v9->vfptr[2].DeleteAbStateByAbstateIndex)(v9);
      v11 = (char *)TextData::Get(0xE3E43B35);
      v12 = fs(v11, v10);
      GameFrameWork::AddBattleMsg(v14, v12);
    }
  }
  else
  {
    while ( v4->_Myval.m_kAttacker != kHandle )
    {
      v4 = v4->_Next;
      if ( v4 == v3 )
        goto LABEL_4;
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004BD090) --------------------------------------------------------
char __stdcall GameFrameWork::ItemNameIsCorrect(std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > listLinkItem, char *pcChatMsg)
{
  int i; // esi@3
  unsigned int v4; // eax@4
  int v5; // ebx@4
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v6; // eax@6
  int v7; // esi@7
  int v8; // edi@7
  int v9; // eax@8
  int v10; // edx@11
  int v11; // esi@15
  int v12; // esi@16
  int v13; // edi@16
  int v14; // eax@17
  int v15; // ecx@20
  int v16; // esi@25
  int v17; // edi@25
  int v18; // eax@26
  int v19; // edx@29
  int v20; // esi@34
  int v21; // edi@34
  int v22; // eax@35
  int v23; // ecx@38
  int v24; // esi@43
  int v25; // edi@43
  int v26; // eax@44
  int v27; // edx@47
  int v28; // esi@52
  int v29; // edi@52
  int v30; // eax@53
  int v31; // ecx@56
  int v32; // ebx@68
  int v33; // edi@68
  int v34; // eax@69
  int v35; // edx@72
  int v36; // esi@76
  int v37; // edi@76
  int v38; // eax@77
  int v39; // edx@80
  int v40; // eax@84
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v41; // ecx@86
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v42; // eax@86
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v43; // esi@87
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v45; // eax@90
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v46; // ecx@90
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v47; // esi@91
  std::_List_iterator<std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > iter; // [sp+18h] [bp-194h]@1
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *itera; // [sp+18h] [bp-194h]@6
  char buff[256]; // [sp+1Ch] [bp-190h]@7
  char tmpStr[128]; // [sp+11Ch] [bp-90h]@1
  int v52; // [sp+1A8h] [bp-4h]@1

  v52 = 0;
  memset(tmpStr, 0, 0x80u);
  iter._Ptr = (std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *)strlen(pcChatMsg);
  if ( (signed int)iter._Ptr > 127 )
    iter._Ptr = (std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *)127;
  for ( i = 0; ; i = v5 )
  {
    v4 = (IsDBCSLeadByte(tmpStr[i]) != 0) + 1;
    v5 = v4 + i;
    if ( (signed int)(v4 + i) > (signed int)iter._Ptr )
      break;
    memcpy(&tmpStr[i], &pcChatMsg[i], v4);
  }
  v6 = listLinkItem._Myhead;
  tmpStr[i] = 0;
  itera = listLinkItem._Myhead->_Next;
  if ( listLinkItem._Myhead->_Next == listLinkItem._Myhead )
  {
LABEL_86:
    v41 = v6->_Next;
    v6->_Next = v6;
    listLinkItem._Myhead->_Prev = listLinkItem._Myhead;
    v42 = listLinkItem._Myhead;
    if ( v41 != listLinkItem._Myhead )
    {
      do
      {
        v43 = v41->_Next;
        operator delete(v41);
        v42 = listLinkItem._Myhead;
        v41 = v43;
      }
      while ( v43 != listLinkItem._Myhead );
    }
    operator delete(v42);
    return 1;
  }
  while ( 1 )
  {
    buff[0] = 0;
    memset(&buff[1], 0, 0xFFu);
    v7 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    v8 = itera->_Myval.itemid;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v8) )
    {
      if ( (unsigned __int16)v8 <= *(_WORD *)(v7 + 200) )
      {
        v10 = *(_DWORD *)(v7 + 196);
        v9 = *(_DWORD *)(v10 + 4 * v8) ? *(_DWORD *)(v10 + 4 * v8) : 0;
      }
      else
      {
        v9 = 0;
      }
    }
    else
    {
      v9 = 0;
    }
    if ( *(_DWORD *)(v9 + 110) == 10 )
    {
      v11 = itera->_Myval.itemattr.blot.lot;
    }
    else
    {
      v12 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      v13 = itera->_Myval.itemid;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v13) )
      {
        if ( (unsigned __int16)v13 <= *(_WORD *)(v12 + 200) )
        {
          v15 = *(_DWORD *)(v12 + 196);
          v14 = *(_DWORD *)(v15 + 4 * v13) ? *(_DWORD *)(v15 + 4 * v13) : 0;
        }
        else
        {
          v14 = 0;
        }
      }
      else
      {
        v14 = 0;
      }
      if ( *(_DWORD *)(v14 + 110) == 12 )
      {
        v11 = itera->_Myval.itemattr.blot.lot;
      }
      else
      {
        v16 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
        v17 = itera->_Myval.itemid;
        if ( (unsigned __int8)(*(int (__thiscall **)(_DWORD, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                                 + 16))(
                                ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                                v17) )
        {
          if ( (unsigned __int16)v17 <= *(_WORD *)(v16 + 200) )
          {
            v19 = *(_DWORD *)(v16 + 196);
            v18 = *(_DWORD *)(v19 + 4 * v17) ? *(_DWORD *)(v19 + 4 * v17) : 0;
          }
          else
          {
            v18 = 0;
          }
        }
        else
        {
          v18 = 0;
        }
        if ( *(_DWORD *)(v18 + 110) == 7 )
        {
          v11 = itera->_Myval.itemattr.blot.lot;
        }
        else
        {
          v20 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
          v21 = itera->_Myval.itemid;
          if ( (unsigned __int8)(*(int (__thiscall **)(_DWORD, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                                   + 16))(
                                  ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                                  v21) )
          {
            if ( (unsigned __int16)v21 <= *(_WORD *)(v20 + 200) )
            {
              v23 = *(_DWORD *)(v20 + 196);
              v22 = *(_DWORD *)(v23 + 4 * v21) ? *(_DWORD *)(v23 + 4 * v21) : 0;
            }
            else
            {
              v22 = 0;
            }
          }
          else
          {
            v22 = 0;
          }
          if ( *(_DWORD *)(v22 + 110) == 21 )
          {
            v11 = itera->_Myval.itemattr.blot.lot;
          }
          else
          {
            v24 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
            v25 = itera->_Myval.itemid;
            if ( (unsigned __int8)(*(int (__thiscall **)(_DWORD, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                                     + 16))(
                                    ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                                    v25) )
            {
              if ( (unsigned __int16)v25 <= *(_WORD *)(v24 + 200) )
              {
                v27 = *(_DWORD *)(v24 + 196);
                v26 = *(_DWORD *)(v27 + 4 * v25) ? *(_DWORD *)(v27 + 4 * v25) : 0;
              }
              else
              {
                v26 = 0;
              }
            }
            else
            {
              v26 = 0;
            }
            if ( *(_DWORD *)(v26 + 110) == 1 )
            {
              v11 = itera->_Myval.itemattr.blot.lot;
            }
            else
            {
              v28 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
              v29 = itera->_Myval.itemid;
              if ( (unsigned __int8)(*(int (__thiscall **)(_DWORD, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                                       + 16))(
                                      ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                                      v29) )
              {
                if ( (unsigned __int16)v29 <= *(_WORD *)(v28 + 200) )
                {
                  v31 = *(_DWORD *)(v28 + 196);
                  v30 = *(_DWORD *)(v31 + 4 * v29) ? *(_DWORD *)(v31 + 4 * v29) : 0;
                }
                else
                {
                  v30 = 0;
                }
              }
              else
              {
                v30 = 0;
              }
              if ( *(_DWORD *)(v30 + 110) == 19 )
              {
                v11 = itera->_Myval.itemattr.blot.lot;
              }
              else
              {
                if ( IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(itera->_Myval.itemid)->Equip != 6
                  && IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(itera->_Myval.itemid)->Equip != 23
                  && IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(itera->_Myval.itemid)->Equip != 15
                  && IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(itera->_Myval.itemid)->Equip != 16
                  && IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(itera->_Myval.itemid)->Equip != 14 )
                {
                  goto LABEL_76;
                }
                v11 = itera->_Myval.itemattr.amulet.upgrade;
              }
            }
          }
        }
      }
    }
    if ( v11 )
    {
      v32 = itera->_Myval.itemid;
      v33 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      if ( (unsigned __int8)(*(int (__thiscall **)(_DWORD, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                               + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v32) )
      {
        if ( (unsigned __int16)v32 <= *(_WORD *)(v33 + 200) )
        {
          v35 = *(_DWORD *)(v33 + 196);
          if ( *(_DWORD *)(v35 + 4 * v32) )
            v34 = *(_DWORD *)(v35 + 4 * v32);
          else
            v34 = 0;
        }
        else
        {
          v34 = 0;
        }
      }
      else
      {
        v34 = 0;
      }
      sprintf(buff, "<\t%s [+%d]\t>", v34 + 34, v11);
      goto LABEL_84;
    }
LABEL_76:
    v36 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    v37 = itera->_Myval.itemid;
    if ( (unsigned __int8)(*(int (__thiscall **)(_DWORD, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                             + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v37) )
    {
      if ( (unsigned __int16)v37 <= *(_WORD *)(v36 + 200) )
      {
        v39 = *(_DWORD *)(v36 + 196);
        v38 = *(_DWORD *)(v39 + 4 * v37) ? *(_DWORD *)(v39 + 4 * v37) : 0;
      }
      else
      {
        v38 = 0;
      }
    }
    else
    {
      v38 = 0;
    }
    sprintf(buff, "<\t%s\t>", v38 + 34);
LABEL_84:
    strstr(tmpStr, buff);
    if ( !v40 )
      break;
    GameFrameWork::RemoveItemFromString(tmpStr, buff);
    v6 = listLinkItem._Myhead;
    itera = itera->_Next;
    if ( itera == listLinkItem._Myhead )
      goto LABEL_86;
  }
  v45 = listLinkItem._Myhead->_Next;
  listLinkItem._Myhead->_Next = listLinkItem._Myhead;
  listLinkItem._Myhead->_Prev = listLinkItem._Myhead;
  v46 = listLinkItem._Myhead;
  if ( v45 != listLinkItem._Myhead )
  {
    do
    {
      v47 = v45->_Next;
      operator delete(v45);
      v46 = listLinkItem._Myhead;
      v45 = v47;
    }
    while ( v47 != listLinkItem._Myhead );
  }
  operator delete(v46);
  return 0;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (004BD580) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BRIEFINFO_BRIEFINFODELETE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  unsigned __int16 *v3; // edi@1
  GameFrameWork *v4; // ebx@1
  Char *v5; // eax@1
  Char *v6; // esi@1
  Effect *v7; // eax@9
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v8; // eax@12
  Mover *v9; // ecx@14
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > >,bool> result; // [sp+Ch] [bp-8h]@12

  v3 = (unsigned __int16 *)pvData;
  v4 = this;
  v5 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  v6 = v5;
  if ( nowState )
  {
    if ( !v5 )
      goto LABEL_16;
    MiniHouseIndoor::DelCharColiNode(&g_kWorld.m_MiniHouseIndoorMode, v5->m_spScene.m_pObject);
  }
  if ( v6 )
  {
    if ( !(unsigned __int8)((int (__thiscall *)(Char *))v6->vfptr[1].Affect)(v6)
      && !Char::IsNPC(v6)
      && !Char::IsResource(v6)
      && Char::IsLinkGate(v6) )
    {
      v7 = EffectMgr::FindAuraEffect(&g_kEffectMgr, *v3);
      if ( v7 )
        EffectMgr::RemoveEffect(&g_kEffectMgr, v7);
    }
    if ( !v6->m_bIsDoor )
    {
      pvData = (void *)*v3;
      v8 = std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Buynode<unsigned short>(
             &stru_A96B00,
             (unsigned __int16 *)&pvData);
      std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Linsert(
        (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&stru_A96B00,
        &result,
        v8,
        0);
    }
    if ( v6->m_byMode == 6 )
    {
      v9 = v6->m_pkMover;
      if ( v9 )
        Mover::SetMoverEffect(v9, 0, 0, 0);
    }
  }
LABEL_16:
  MiniMapWin::RemoveNPC(v4->m_pkMiniMapWin, *v3);
  DecalMgr::RemoveCharDecal(&stru_B26354, *v3);
  MiniMapWin::RemoveKQTeamMark(v4->m_pkMiniMapWin, *v3);
  return iRevBytes;
}

//----- (004BD6A0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_BASH_HITTED_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  void *v3; // esi@1
  Char *v4; // edi@1
  AttackSequence *v5; // ebx@1
  _DWORD *v6; // eax@2
  __int16 v7; // cx@4
  signed int v8; // edi@4
  CharDeadEvent_InformWhoKilledMe *v9; // eax@10
  GameFrameWork *pkFrameWork; // [sp+14h] [bp-10h]@1
  Char *pkAttacker; // [sp+30h] [bp+Ch]@1

  pkFrameWork = this;
  WaitingForLogoutWin::Cancel(this->m_pkWaitingForLogoutWin);
  v3 = pvData;
  v4 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  v5 = 0;
  pkAttacker = v4;
  if ( v4 )
  {
    v6 = operator new(0x28u);
    if ( v6 )
    {
      v6[7] = 0;
      v6[5] = 0;
      v6[6] = 0;
      v6[4] = &NiTList<DamageInfo *>::`vftable';
      *((_WORD *)v6 + 6) = 0;
      *((_BYTE *)v6 + 14) = 0;
      *((_BYTE *)v6 + 36) = 0;
      v6[8] = -1;
      *((_WORD *)v6 + 19) = -1;
      v5 = (AttackSequence *)v6;
    }
    v5->byActionCode = Char::GetAttackActionCode(v4, *((_BYTE *)v3 + 4) & 0xF);
    v5->fCoolTime = (double)*(_WORD *)((char *)v3 + 9) / 1000.0;
    v5->fRecvTime = Timer::ms_fCurTime;
    v7 = *((_WORD *)v3 + 1);
    v8 = (unsigned int)*((_WORD *)v3 + 1) >> 1;
    if ( v8 < 0 )
      v8 = 0;
    if ( v8 & 0xFFFF0000 )
      v8 = (unsigned __int16)v8;
    DamageInfoSet::AddDamage(
      &v5->kDamageInfoSet,
      v8 | (*(_DWORD *)((char *)v3 + 5) != 0 ? 0 : 2147483648) | ((((v7 & 1) << 10) | *((_BYTE *)v3 + 4) & 0x10 | 4) << 20),
      g_pkMainChar->m_kHandle,
      *(_WORD *)((char *)v3 + 11),
      *(_DWORD *)((char *)v3 + 5),
      1,
      0,
      -1);
    if ( *(_DWORD *)((char *)v3 + 5) )
    {
      if ( !(unsigned __int8)((int (*)(void))pkAttacker->vfptr[1].Affect)() )
        GameFrameWork::AddAttacked(pkFrameWork, *(_WORD *)v3);
    }
    else
    {
      g_pkMainChar->m_bWillDead = 1;
      if ( !(unsigned __int8)((int (*)(void))pkAttacker->vfptr[1].Affect)() )
      {
        v9 = (CharDeadEvent_InformWhoKilledMe *)operator new(0x30u);
        if ( v9 )
          CharDeadEvent_InformWhoKilledMe::CharDeadEvent_InformWhoKilledMe(
            v9,
            (PgFrameWork *)&pkFrameWork->vfptr,
            g_pkMainChar->m_kHandle,
            *(_WORD *)v3);
      }
    }
    AttackSequenceManager::AddAttSeq((AttackSequenceManager *)&pkAttacker->vfptr, v5);
  }
  return iRevBytes;
}
// 973DFC: using guessed type int (__thiscall *NiTList<DamageInfo *>::`vftable')(void *p, char);
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004BD860) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BAT_SKILLBASH_HITTED_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  void *v3; // ebx@1
  Char *v4; // eax@1
  int v5; // esi@1
  int v6; // edi@1
  ActiveSkillInfo **v7; // eax@5
  char *v8; // eax@9
  SkillSequence *v9; // eax@12
  int v10; // eax@15
  char v11; // al@19
  unsigned int *v12; // edi@19
  int v13; // esi@19
  CharDeadEvent_InformWhoKilledMe *v14; // eax@26
  Char *v15; // eax@30
  int v16; // ST18_4@31
  char *v17; // eax@31
  char *v18; // eax@31
  unsigned __int16 kMainCharTarget; // [sp+10h] [bp-24h]@15
  bool bDisPlay; // [sp+14h] [bp-20h]@19
  Char *pkAttChar; // [sp+18h] [bp-1Ch]@1
  SkillSequence *pkSeq; // [sp+1Ch] [bp-18h]@13
  ActiveSkillInfo *pActiveSkill; // [sp+20h] [bp-14h]@2
  ActiveSkillInfo *pActiveSkilla; // [sp+20h] [bp-14h]@19
  GameFrameWork *v26; // [sp+24h] [bp-10h]@1
  int iHpChange; // [sp+40h] [bp+Ch]@15

  v26 = this;
  v3 = pvData;
  v4 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  v5 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  v6 = *((_WORD *)pvData + 1);
  pkAttChar = v4;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                          v6) )
  {
    if ( (unsigned __int16)v6 <= *(_WORD *)(v5 + 200) )
    {
      v7 = (ActiveSkillInfo **)(*(_DWORD *)(v5 + 196) + 4 * v6);
      if ( *v7 )
        pActiveSkill = *v7;
      else
        pActiveSkill = 0;
    }
    else
    {
      pActiveSkill = 0;
    }
  }
  else
  {
    pActiveSkill = 0;
  }
  if ( *((_WORD *)pvData + 1) == 4520 )
  {
    v8 = (char *)TextData2::Get(0x90A492AE);
    GameFrameWork::AddBattleMsg(v26, v8);
  }
  if ( pkAttChar && pkAttChar != g_pkMainChar )
  {
    Char::SetReserveSkillSmash(pkAttChar, 1);
    v9 = (SkillSequence *)operator new(0x18u);
    if ( v9 )
    {
      v9->kDamageInfoSet.kDamageList.m_kAllocator.m_uiCount = 0;
      v9->kDamageInfoSet.kDamageList.m_pkHead = 0;
      v9->kDamageInfoSet.kDamageList.m_pkTail = 0;
      v9->kDamageInfoSet.kDamageList.vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTList<DamageInfo *>::`vftable';
      pkSeq = v9;
    }
    else
    {
      pkSeq = 0;
    }
    pkSeq->kSkillID = *((_WORD *)pvData + 1);
    v10 = *(_DWORD *)((char *)pvData + 14);
    kMainCharTarget = g_pkMainChar->m_kHandle;
    iHpChange = v10;
    if ( v10 < 0 )
    {
      iHpChange = 0;
      v10 = 0;
    }
    if ( v10 & 0xFFFF0000 )
      iHpChange = (unsigned __int16)v10;
    v11 = *((_BYTE *)v3 + 12);
    v12 = (unsigned int *)((char *)v3 + 18);
    v13 = iHpChange | (*(_DWORD *)((char *)v3 + 18) != 0 ? 0 : 2147483648) | ((v11 & 0x20) != 32 ? 0 : 0x8000000) | ((v11 & 0x10) != 16 ? 0 : 0x10000000) | ((v11 & 0x40 | 16 * (v11 & 8 | 16 * (~*((_BYTE *)v3 + 12) & 1 | 2 * (*((_BYTE *)v3 + 12) & 4 | 4 * (*((_BYTE *)v3 + 12) & 2))) | 3)) << 18);
    GameFrameWork::AdjustRestHP(kMainCharTarget, (unsigned int *)((char *)v3 + 18));
    bDisPlay = 1;
    pActiveSkilla = (ActiveSkillInfo *)((char *)pActiveSkill + 2);
    if ( !strcmp((const char *)pActiveSkilla, "Revival01") )
      bDisPlay = 0;
    DamageInfoSet::AddDamage(&pkSeq->kDamageInfoSet, v13, kMainCharTarget, *((_WORD *)v3 + 11), *v12, bDisPlay, 0, -1);
    if ( *v12 )
    {
      if ( *((_BYTE *)v3 + 12) & 1 && !(unsigned __int8)((int (*)(void))pkAttChar->vfptr[1].Affect)() )
        GameFrameWork::AddAttacked(v26, *(_WORD *)v3);
    }
    else
    {
      if ( *((_BYTE *)v3 + 12) & 1 )
      {
        if ( iHpChange > 0
          && !g_pkMainChar->m_bWillDead
          && !(unsigned __int8)((int (*)(void))pkAttChar->vfptr[1].Affect)() )
        {
          v14 = (CharDeadEvent_InformWhoKilledMe *)operator new(0x30u);
          if ( v14 )
            CharDeadEvent_InformWhoKilledMe::CharDeadEvent_InformWhoKilledMe(
              v14,
              (PgFrameWork *)&v26->vfptr,
              g_pkMainChar->m_kHandle,
              *(_WORD *)v3);
        }
      }
      g_pkMainChar->m_bWillDead = 1;
      if ( g_pkMainChar->m_byMode == 3 && v13 >= 0 )
      {
        v15 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)v3);
        if ( v15 )
        {
          v16 = ((int (__thiscall *)(Char *))v15->vfptr[2].DeleteAbStateByAbstateIndex)(v15);
          v17 = (char *)TextData2::Get(0x47A65AA6u);
          v18 = fs(v17, v16);
          GameFrameWork::AddBattleMsg(v26, v18);
        }
      }
    }
    if ( strcmp((const char *)pActiveSkilla, "Revival01") )
      AttackSequenceManager::AddSkillSeq((AttackSequenceManager *)&pkAttChar->vfptr, pkSeq);
  }
  return iRevBytes;
}
// 973DFC: using guessed type int (__thiscall *NiTList<DamageInfo *>::`vftable')(void *p, char);
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (004BDBC0) --------------------------------------------------------
int __userpurge GameFrameWork::On_NC_BAT_SOMEONESKILLBASH_HIT_CMD@<eax>(GameFrameWork *this@<ecx>, int a2@<esi>, int iRevBytes, void *pvData)
{
  _BYTE *v4; // edi@1
  int v5; // ebx@2
  int v6; // ST1C_4@2
  int v7; // esi@2
  int *v8; // eax@4
  int v9; // eax@5
  _DWORD *v10; // eax@8
  int v11; // esi@11
  int v12; // ebx@11
  ActiveSkillInfo **v13; // eax@15
  char *v14; // esi@19
  unsigned int *v15; // edi@21
  unsigned int v16; // ebx@21
  Char *v17; // eax@27
  unsigned int i; // [sp+8h] [bp-14h]@18
  Char *pkAttChar; // [sp+Ch] [bp-10h]@1
  char bDisPlay; // [sp+10h] [bp-Ch]@21
  void *p; // [sp+14h] [bp-8h]@9
  ActiveSkillInfo *pActiveSkill; // [sp+18h] [bp-4h]@12

  v4 = pvData;
  pkAttChar = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
  if ( pkAttChar )
  {
    v5 = *((_WORD *)pvData + 1);
    v6 = a2;
    v7 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                               + 16))(
                            ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                            v5,
                            v6) )
    {
      if ( (unsigned __int16)v5 <= *(_WORD *)(v7 + 200) )
      {
        v8 = (int *)(*(_DWORD *)(v7 + 196) + 4 * v5);
        if ( *v8 )
        {
          v9 = *v8;
          if ( v9 )
          {
            if ( *(_DWORD *)(v9 + 259) > 0u )
              Char::SetSkillTargetGroundPoint(pkAttChar, *((_DWORD *)pvData + 1), *((_DWORD *)pvData + 2), 1);
          }
        }
      }
    }
    Char::SetReserveSkillSmash(pkAttChar, 1);
    v10 = operator new(0x18u);
    if ( v10 )
    {
      v10[4] = 0;
      v10[2] = 0;
      v10[3] = 0;
      v10[1] = &NiTList<DamageInfo *>::`vftable';
      p = v10;
    }
    else
    {
      p = 0;
    }
    *(_WORD *)p = *((_WORD *)pvData + 1);
    v11 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
    v12 = *((_WORD *)pvData + 1);
    if ( (unsigned __int8)(*(int (__thiscall **)(int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                     + 16))(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable) )
    {
      if ( (unsigned __int16)v12 <= *(_WORD *)(v11 + 200) )
      {
        v13 = (ActiveSkillInfo **)(*(_DWORD *)(v11 + 196) + 4 * v12);
        if ( *v13 )
          pActiveSkill = *v13;
        else
          pActiveSkill = 0;
      }
      else
      {
        pActiveSkill = 0;
      }
    }
    else
    {
      pActiveSkill = 0;
    }
    i = 0;
    if ( *((_BYTE *)pvData + 12) )
    {
      v14 = (char *)pvData + 23;
      do
      {
        if ( *((_WORD *)v14 - 5) != g_pkMainChar->m_kHandle )
        {
          v15 = (unsigned int *)(v14 - 8);
          bDisPlay = ((unsigned __int8)*v14 >> 4) & 1;
          v16 = (unsigned int)&loc_800000 | (*((_DWORD *)v14 - 2) != 0 ? 0 : 2147483648) | ((*v14 & 8) != 8 ? 0 : 0x8000000) | ((*v14 & 4) != 4 ? 0 : 0x10000000) | ((*v14 & 2) != 2 ? 0 : 0x20000000) | ((~*v14 & 1) << 26);
          if ( !strcmp(pActiveSkill->InxName, "Revival01") )
            bDisPlay = 0;
          if ( GameFrameWork::AdjustRestHP(*((_WORD *)v14 - 5), (unsigned int *)v14 - 2) )
          {
            if ( bDisPlay )
            {
              CharMgr::GetChar(&g_kCharMgr, *((_WORD *)v14 - 5));
              v16 |= *((_DWORD *)v14 - 1);
            }
            DamageInfoSet::AddDamage(
              (DamageInfoSet *)((char *)p + 4),
              v16,
              *((_WORD *)v14 - 5),
              *(_WORD *)(v14 + 1),
              *v15,
              bDisPlay,
              0,
              -1);
            if ( !*v15 )
            {
              v17 = CharMgr::GetChar(&g_kCharMgr, *((_WORD *)v14 - 5));
              if ( v17 )
                v17->m_bWillDead = 1;
            }
          }
          v4 = pvData;
        }
        v14 += 13;
        ++i;
      }
      while ( i < v4[12] );
    }
    if ( !*((_DWORD *)p + 4) )
    {
      DamageInfoSet::~DamageInfoSet((DamageInfoSet *)((char *)p + 4));
      operator delete(p);
      return iRevBytes;
    }
    if ( strcmp(pActiveSkill->InxName, "Revival01") )
      AttackSequenceManager::AddSkillSeq((AttackSequenceManager *)&pkAttChar->vfptr, (SkillSequence *)p);
  }
  return iRevBytes;
}
// 4BDBC0: could not find valid save-restore pair for esi
// 973DFC: using guessed type int (__thiscall *NiTList<DamageInfo *>::`vftable')(void *p, char);
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (004BDEA0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_CLIENT_NEWBIE_GUIDE_VIEW_LIST_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  char *v4; // esi@1
  unsigned int v5; // eax@1
  signed int v6; // ecx@3
  signed int v7; // eax@4
  Tutorial *v8; // eax@7
  Tutorial *v9; // eax@8
  GameFrameWork *v11; // [sp+Ch] [bp-10h]@1

  v3 = this;
  v11 = this;
  v4 = (char *)&this->m_kGuideViewList;
  std::vector<PgWinText *,std::allocator<PgWinText *>>::resize(
    (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&this->m_kGuideViewList,
    0xC5u);
  v5 = 0;
  do
  {
    *(_DWORD *)(v5 + *(_DWORD *)v4) = -1;
    v5 += 4;
  }
  while ( v5 < 0x314 );
  v6 = 0;
  if ( *(_BYTE *)pvData )
  {
    do
    {
      v7 = *((_BYTE *)pvData + v6 + 1);
      if ( v7 < 197 )
      {
        *(_DWORD *)(*(_DWORD *)v4 + 4 * v7) = v7;
        v3 = v11;
      }
      ++v6;
    }
    while ( v6 < *(_BYTE *)pvData );
  }
  v3->m_bGuideViewList = 1;
  v8 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v9 = (Tutorial *)operator new(0xB4u);
    if ( v9 )
      Tutorial::Tutorial(v9);
    else
      v8 = 0;
    Singleton<Tutorial>::m_pInstance = v8;
  }
  if ( v8->m_bEnable == 1 )
    GameFrameWork::SetPlayGuideSkipList(v3);
  return iRevBytes;
}

//----- (004BDF90) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ACT_SHOW_CINEMATIC(int iRevBytes, void *pvData)
{
  unsigned int v3; // ST0C_4@1
  unsigned int v4; // edx@2
  char *v5; // edi@2
  bool v6; // cf@2
  const char *v7; // esi@2
  TextScreenEffect *v8; // ecx@4
  TextScreenEffect *v9; // eax@5
  TextScreenEffect *v10; // eax@6
  TextScreenEffect *v11; // ecx@9
  TextScreenEffect *v12; // eax@10
  TextScreenEffect *v13; // eax@11
  MachineOpt::GameOption gameOption; // [sp+1Ch] [bp-6Ch]@2
  float v16; // [sp+54h] [bp-34h]@2
  TextScreenEffect *v17; // [sp+58h] [bp-30h]@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > sText; // [sp+5Ch] [bp-2Ch]@1
  int v19; // [sp+84h] [bp-4h]@1

  sText._Myres = 15;
  sText._Mysize = 0;
  sText._Bx._Buf[0] = 0;
  v3 = *(_WORD *)pvData;
  v19 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&sText, (const char *)pvData + 2, v3);
  if ( sText._Mysize > 0 )
  {
    v16 = Timer::ms_fCurTime;
    qmemcpy(&gameOption, &MachineOpt::ms_kGameOption, sizeof(gameOption));
    v4 = *(_DWORD *)&gameOption.m_kVersion.hour;
    gameOption.bInterfaceCheck = 0;
    qmemcpy(&MachineOpt::ms_kGameOption, &gameOption, 0x34u);
    v5 = (char *)&MachineOpt::ms_kGameOption.bBasicInfoTipCheck;
    *(_WORD *)v5 = *(_WORD *)&gameOption.bBasicInfoTipCheck;
    v6 = sText._Myres < 0x10;
    v5[2] = gameOption.bAutoStack;
    v7 = sText._Bx._Ptr;
    byte_B4FF66 = v4 >> 16;
    if ( v6 )
      v7 = (const char *)&sText;
    v8 = Singleton<TextScreenEffect>::m_pInstance;
    if ( !Singleton<TextScreenEffect>::m_pInstance )
    {
      v9 = (TextScreenEffect *)operator new(0x28u);
      v17 = v9;
      LOBYTE(v19) = 1;
      if ( v9 )
        TextScreenEffect::TextScreenEffect(v9);
      else
        v10 = 0;
      v8 = v10;
      LOBYTE(v19) = 0;
      Singleton<TextScreenEffect>::m_pInstance = v10;
    }
    TextScreenEffect::Start(v8, v7, v16, 0.5, 1);
    v11 = Singleton<TextScreenEffect>::m_pInstance;
    if ( !Singleton<TextScreenEffect>::m_pInstance )
    {
      v12 = (TextScreenEffect *)operator new(0x28u);
      v17 = v12;
      LOBYTE(v19) = 2;
      if ( v12 )
        TextScreenEffect::TextScreenEffect(v12);
      else
        v13 = 0;
      v11 = v13;
      LOBYTE(v19) = 0;
      Singleton<TextScreenEffect>::m_pInstance = v13;
    }
    TextScreenEffect::AddSchedule(v11, 2);
  }
  if ( sText._Myres >= 0x10 )
    operator delete(sText._Bx._Ptr);
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// B4FF60: using guessed type struct MachineOpt::GameOption MachineOpt::ms_kGameOption;
// B4FF66: using guessed type char byte_B4FF66;

//----- (004BE0F0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ACT_PLAY_SOUND_CMD(int iRevBytes, void *pvData)
{
  unsigned int v3; // ST04_4@1
  char *v4; // eax@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > filename; // [sp+4h] [bp-2Ch]@1
  int v7; // [sp+2Ch] [bp-4h]@1

  filename._Myres = 15;
  filename._Mysize = 0;
  filename._Bx._Buf[0] = 0;
  v3 = *(_WORD *)pvData;
  v7 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&filename, (const char *)pvData + 2, v3);
  if ( filename._Mysize )
  {
    v4 = filename._Bx._Ptr;
    if ( filename._Myres < 0x10 )
      v4 = (char *)&filename;
    SoundMgr::PlayInterfaceSound(&g_kSoundMgr, v4);
  }
  if ( filename._Myres >= 0x10 )
    operator delete(filename._Bx._Ptr);
  return iRevBytes;
}

//----- (004BE1A0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SCENARIO_SYSTEM_MESSAGE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  unsigned int v4; // ST04_4@1
  const char *v5; // eax@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > ErrorMessage; // [sp+8h] [bp-2Ch]@1
  int v8; // [sp+30h] [bp-4h]@1

  v3 = this;
  ErrorMessage._Myres = 15;
  ErrorMessage._Mysize = 0;
  ErrorMessage._Bx._Buf[0] = 0;
  v4 = *(_BYTE *)pvData;
  v8 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
    &ErrorMessage,
    (const char *)pvData + 1,
    v4);
  if ( ErrorMessage._Mysize )
  {
    v5 = ErrorMessage._Bx._Ptr;
    if ( ErrorMessage._Myres < 0x10 )
      v5 = (const char *)&ErrorMessage;
    GameFrameWork::AddSysMsg(v3, v5);
  }
  if ( ErrorMessage._Myres >= 0x10 )
    operator delete(ErrorMessage._Bx._Ptr);
  return iRevBytes;
}

//----- (004BE240) --------------------------------------------------------
int __stdcall GameFrameWork::ON_NC_GUILD_MOBGUILD_CMD(int iRevBytes, void *pvData)
{
  unsigned __int16 v3; // bx@1
  unsigned int v4; // edi@1
  std::_Tree<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > *v5; // eax@1
  std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *v6; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *v7; // eax@3
  std::pair<unsigned short const ,unsigned long> _Val; // [sp+Ch] [bp-8h]@1

  v3 = *(_WORD *)pvData;
  v4 = *(_DWORD *)((char *)pvData + 2);
  pvData = (void *)*(_WORD *)pvData;
  CGuildMonster::GetInstance();
  v6 = (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)v5;
  std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,long>>,0>>::find(
    v5,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > > *)&_Val.second,
    (const unsigned __int16 *)&pvData);
  if ( (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)_Val.second != v6->_Myhead )
    std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
      v6,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > *)&pvData,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > >)_Val.second);
  _Val.first = v3;
  _Val.second = v4;
  v7 = std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned long>>,0>>::_Buynode<std::pair<unsigned short const,unsigned long>>(
         (std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)v6,
         &_Val);
  std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)v6,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > >,bool> *)&_Val,
    v7,
    0);
  return iRevBytes;
}

//----- (004BE2B0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_QUEST_GIVE_UP_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  CClientQuest *v3; // eax@1
  CQuest *v4; // edi@1
  const char *v5; // eax@1
  int v6; // eax@1
  int v7; // eax@2
  bool v8; // zf@3
  void *v9; // eax@3
  void *v10; // ST08_4@6
  NiUnsharedGeometryGroup *v11; // eax@6
  void *v12; // ST08_4@9
  NiUnsharedGeometryGroup *v13; // eax@9
  void *v14; // eax@10
  void *v15; // ST08_4@12
  NiUnsharedGeometryGroup *v16; // eax@12
  void *v17; // eax@13
  void *v18; // ST08_4@15
  NiUnsharedGeometryGroup *v19; // eax@15
  QuestHelperMgr *v20; // eax@15
  GameFrameWork *v22; // [sp+10h] [bp-150h]@1
  PLAYER_QUEST_INFO questInfo; // [sp+14h] [bp-14Ch]@15
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strQuestName; // [sp+34h] [bp-12Ch]@1
  char szText[256]; // [sp+50h] [bp-110h]@6
  int v26; // [sp+15Ch] [bp-4h]@1

  v22 = this;
  v3 = QuestDataMgr::GetQuest();
  v4 = (CQuest *)v3;
  v5 = CQuestData::GetQuestName(v3->m_pQuestData, *(_WORD *)pvData);
  strQuestName._Mysize = 0;
  strQuestName._Bx._Buf[0] = 0;
  strQuestName._Myres = 15;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strQuestName, v5, strlen(v5));
  v6 = *((_WORD *)pvData + 1) - 2881;
  v26 = 0;
  if ( v6 )
  {
    v7 = v6 - 4;
    if ( v7 )
    {
      v8 = v7 == 1;
      v9 = strQuestName._Bx._Ptr;
      if ( v8 )
      {
        if ( strQuestName._Myres < 0x10 )
          v9 = &strQuestName;
        v12 = v9;
        v13 = TextData::Get(0x96F4E9C7);
        sprintf(szText, (const char *)v13, v12);
        GameFrameWork::AddSysMsg(v22, szText);
      }
      else
      {
        if ( strQuestName._Myres < 0x10 )
          v9 = &strQuestName;
        v10 = v9;
        v11 = TextData::Get(0x96F4E9C7);
        sprintf(szText, (const char *)v11, v10);
        GameFrameWork::AddSysMsg(v22, szText);
      }
    }
    else
    {
      v14 = strQuestName._Bx._Ptr;
      if ( strQuestName._Myres < 0x10 )
        v14 = &strQuestName;
      v15 = v14;
      v16 = TextData::Get(0x96F4E9C7);
      sprintf(szText, (const char *)v16, v15);
      GameFrameWork::AddSysMsg(v22, szText);
    }
  }
  else
  {
    CQuest::Recv_NC_QUEST_GIVE_UP_ACK(v4, (PROTO_NC_QUEST_GIVE_UP_ACK *)pvData);
    v17 = strQuestName._Bx._Ptr;
    if ( strQuestName._Myres < 0x10 )
      v17 = &strQuestName;
    v18 = v17;
    v19 = TextData::Get(0xCAF22853);
    sprintf(szText, (const char *)v19, v18);
    GameFrameWork::AddSysMsg(v22, szText);
    QuestDataMgr::m_bUpdate = 1;
    v20 = QuestHelperMgr::GetInstance();
    QuestHelperMgr::RemoveProgressQuest(v20, *(_WORD *)pvData);
    GameFrameWork::SearchQuestStartItem(v22, *(_WORD *)pvData, 1);
    questInfo.ID = *(_WORD *)pvData;
    questInfo.Status = 20;
    CQuest::AddQuestInfo(v4, &questInfo);
  }
  if ( strQuestName._Myres >= 0x10 )
    operator delete(strQuestName._Bx._Ptr);
  return iRevBytes;
}
// A771B0: using guessed type bool QuestDataMgr::m_bUpdate;

//----- (004BE500) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_QUEST_SCRIPT_CMD_REQ(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // ebx@1
  NiUnsharedGeometryGroup *v4; // eax@3
  char *v5; // eax@17
  char *v6; // edi@18
  CClientQuest *v7; // eax@19
  const char *v8; // eax@19
  void *v9; // eax@19
  int v11; // eax@24
  CClientQuest *v12; // eax@28
  CClientQuest *v13; // eax@29
  QuestHelperMgr *v14; // eax@29
  CClientQuest *v15; // eax@30
  QuestFinishWin *v16; // ecx@31
  CClientQuest *v17; // eax@33
  QuestHelperMgr *v18; // eax@33
  CClientQuest *v19; // eax@34
  CClientQuest *v20; // eax@35
  CClientQuest *v21; // eax@36
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strQuestName; // [sp+10h] [bp-2Ch]@19
  int v23; // [sp+38h] [bp-4h]@19

  v3 = this;
  switch ( *(_DWORD *)((char *)pvData + 2) )
  {
    case 0:
      switch ( *(_WORD *)((char *)pvData + 15) )
      {
        case 0xC00:
          v4 = TextData::Get(0xB8F4EE4C);
          goto LABEL_18;
        case 0xC01:
          v4 = TextData::Get(0x6C7C4F96u);
          goto LABEL_18;
        case 0xC03:
          v4 = TextData::Get(0x62E697FEu);
          goto LABEL_18;
        case 0xC04:
          v4 = TextData::Get(0xCCDCD245);
          goto LABEL_18;
        case 0xC05:
          v4 = TextData::Get(0x52F0753u);
          goto LABEL_18;
        case 0xC06:
          v4 = TextData::Get(0xC7D4DC47);
          goto LABEL_18;
        case 0xC07:
          v4 = TextData::Get(0xB1E7A9FE);
          goto LABEL_18;
        case 0xC08:
          v4 = TextData::Get(0x10783C95u);
          goto LABEL_18;
        case 0xC09:
          v4 = TextData::Get(0xB7F09B4F);
          goto LABEL_18;
        case 0xC0A:
          v4 = TextData::Get(0x171EF247u);
          goto LABEL_18;
        case 0xC0B:
          v4 = TextData::Get(0x102BF143u);
          goto LABEL_18;
        case 0xC0C:
          v4 = TextData::Get(0xB6E1B20C);
          goto LABEL_18;
        case 0xC0D:
          v4 = TextData::Get(0xB4EBA14A);
          goto LABEL_18;
        case 0xC0E:
          v4 = TextData::Get(0xD2DA9C55);
          goto LABEL_18;
        case 0xC0F:
          v5 = (char *)TextData::Get(0x13832E9Au);
          v4 = (NiUnsharedGeometryGroup *)fs(v5, 40);
LABEL_18:
          v6 = (char *)v4;
          if ( v4 )
          {
            v7 = QuestDataMgr::GetQuest();
            v8 = CQuestData::GetQuestName(v7->m_pQuestData, *(_WORD *)pvData);
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
              &strQuestName,
              v8);
            v9 = strQuestName._Bx._Ptr;
            v23 = 0;
            if ( strQuestName._Myres < 0x10 )
              v9 = &strQuestName;
            GameFrameWork::VaAddSysMsg(v3, v6, v9);
            v23 = -1;
            std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&strQuestName);
          }
          break;
        default:
          goto $LN2_60;
      }
      goto $LN2_60;
    case 1:
$LN2_60:
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkNpcDlgWin->vfptr);
      return iRevBytes;
    default:
      return iRevBytes;
    case 2:
      v11 = *(_DWORD *)((char *)pvData + 11);
      if ( v11 )
      {
        if ( v11 == 1 )
        {
          NpcDialogWin::OpenUserQuestDialog(
            this->m_pkNpcDlgWin,
            *(_DWORD *)((char *)pvData + 7),
            *(_WORD *)pvData,
            *((_BYTE *)pvData + 2));
          PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkNpcDlgWin->vfptr);
        }
      }
      else
      {
        NpcDialogWin::OpenNpcQuestDialog(
          this->m_pkNpcDlgWin,
          *(_WORD *)((char *)pvData + 15),
          *(_DWORD *)((char *)pvData + 7),
          *(_WORD *)pvData,
          *((_BYTE *)pvData + 2),
          *((_BYTE *)pvData + 6) == 0);
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkNpcDlgWin->vfptr);
      }
      return iRevBytes;
    case 5:
      v12 = QuestDataMgr::GetQuest();
      CQuest::SetQuestClear((CQuest *)&v12->vfptr, *(_WORD *)((char *)pvData + 7));
      QuestDataMgr::m_bUpdate = 1;
      return iRevBytes;
    case 6:
      v13 = QuestDataMgr::GetQuest();
      CQuest::SetQuestAccept((CQuest *)&v13->vfptr, *(_WORD *)((char *)pvData + 7));
      QuestDataMgr::m_bUpdate = 1;
      v14 = QuestHelperMgr::GetInstance();
      QuestHelperMgr::AddProgressQuest(v14, *(_WORD *)pvData);
      GameFrameWork::SearchQuestStartItem(v3, *(_WORD *)pvData, 0);
      SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_STARTQUEST);
      return iRevBytes;
    case 7:
      v15 = QuestDataMgr::GetQuest();
      CQuest::SetQuestCancel((CQuest *)&v15->vfptr, *(_WORD *)((char *)pvData + 7));
      QuestDataMgr::m_bUpdate = 1;
      goto LABEL_31;
    case 0xA:
      v17 = QuestDataMgr::GetQuest();
      CQuest::SetQuestDone((CQuest *)&v17->vfptr, *(_WORD *)((char *)pvData + 7));
      QuestDataMgr::m_bUpdate = 1;
      v18 = QuestHelperMgr::GetInstance();
      QuestHelperMgr::RemoveProgressQuest(v18, *(_WORD *)pvData);
      SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_ENDQUEST);
LABEL_31:
      v16 = v3->m_pkQuestFinishWin;
      if ( v16 )
        QuestFinishWin::UpdateQuest(v16);
      break;
    case 8:
      v19 = QuestDataMgr::GetQuest();
      CQuest::SetQuestProgress((CQuest *)&v19->vfptr, *(_WORD *)((char *)pvData + 7), *((_BYTE *)pvData + 9));
      QuestDataMgr::m_bUpdate = 1;
      break;
    case 9:
      v20 = QuestDataMgr::GetQuest();
      CQuest::SetQuestFailed((CQuest *)&v20->vfptr, *(_WORD *)((char *)pvData + 7));
      QuestDataMgr::m_bUpdate = 1;
      break;
    case 0xC:
      v21 = QuestDataMgr::GetQuest();
      CQuest::SetQuestAbort((CQuest *)&v21->vfptr, *(_WORD *)((char *)pvData + 7));
      QuestDataMgr::m_bUpdate = 1;
      break;
  }
  return iRevBytes;
}
// A771B0: using guessed type bool QuestDataMgr::m_bUpdate;

//----- (004BE8F0) --------------------------------------------------------
void __thiscall GameFrameWork::NcGuildRenameReq(GameFrameWork *this, const char *pkName, int nCharInvenItem)
{
  NiUnsharedGeometryGroup *v3; // eax@2
  GameFrameWork *v4; // [sp+10h] [bp-44h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strName; // [sp+14h] [bp-40h]@1
  PROTO_NC_GUILD_RENAME_REQ kProto; // [sp+30h] [bp-24h]@7
  int v7; // [sp+50h] [bp-4h]@1

  v4 = this;
  strName._Myres = 15;
  strName._Mysize = 0;
  strName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strName, pkName, strlen(pkName));
  v7 = 0;
  if ( strName._Mysize <= 0x10 )
  {
    if ( TextFilterTable::IsForbiddenGuildName((char *)pkName) )
    {
      if ( strName._Myres >= 0x10 )
        operator delete(strName._Bx._Ptr);
    }
    else
    {
      *(_QWORD *)&kProto.sGuildName.n4_code[2] = 0i64;
      *(_QWORD *)&kProto.sGuildName.n4_name[0] = 0i64;
      strncpy(kProto.sGuildName.n4_name, (char *)pkName, 0x10u);
      kProto.nItemSlot = nCharInvenItem;
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x1Du, 0xACu, &kProto, 17);
      if ( strName._Myres >= 0x10 )
        operator delete(strName._Bx._Ptr);
    }
  }
  else
  {
    v3 = TextData::Get(0x89B5F6C7);
    GameFrameWork::AddSysMsg(v4, (const char *)v3);
    if ( strName._Myres >= 0x10 )
      operator delete(strName._Bx._Ptr);
  }
}

//----- (004BEA00) --------------------------------------------------------
void __thiscall GameFrameWork::NcItemEquipBelongedCancelUseReq(GameFrameWork *this, unsigned int TargetItemInvPos)
{
  GameFrameWork *v2; // edi@1
  CursorState *v3; // ecx@1
  CursorState *v4; // eax@2
  int v5; // eax@3
  unsigned int v6; // ebx@6
  ItemIcon *v7; // ecx@7
  Item *v8; // esi@8
  ITask *v9; // eax@10
  int v10; // esi@10
  InventoryWin *v11; // eax@15
  unsigned int v12; // ecx@15
  ItemIcon *v13; // ecx@16
  Item *v14; // eax@17
  ItemInfo *v15; // eax@18
  InventoryWin *v16; // eax@22
  NiUnsharedGeometryGroup *v17; // eax@20

  v2 = this;
  v3 = (CursorState *)Singleton<CursorState>::m_pInstance;
  InventoryWin::ms_uiMode = 0;
  if ( !Singleton<CursorState>::m_pInstance )
  {
    v4 = (CursorState *)operator new(8u);
    if ( v4 )
      CursorState::CursorState(v4);
    else
      v5 = 0;
    v3 = (CursorState *)v5;
    Singleton<CursorState>::m_pInstance = v5;
  }
  CursorState::CancelState(v3, PUT_ON_BELONG_CLEAR);
  v6 = TargetItemInvPos;
  if ( TargetItemInvPos < 0xC0 )
  {
    v7 = (ItemIcon *)&v2->m_pkInventoryWin->m_apkInvWin[TargetItemInvPos]->vfptr;
    if ( v7 )
    {
      v8 = ItemIcon::GetItem(v7);
      TargetItemInvPos = (unsigned int)v8;
      if ( v8 )
      {
        if ( !ISingletonTask<ItemUseTask>::ms_pkSingletonTask )
        {
          v9 = (ITask *)operator new(0x5Cu);
          v10 = (int)v9;
          if ( v9 )
          {
            ITask::ITask(v9, 0);
            *(_DWORD *)v10 = &ItemUseTask::`vftable'{for `NiRefObject'};
            *(_DWORD *)(v10 + 8) = &ItemUseTask::`vftable'{for `IDirectMessenger'};
          }
          else
          {
            v10 = 0;
          }
          ISingletonTask<ItemUseTask>::ms_pkSingletonTask = v10;
          if ( !v10 )
            return;
          v8 = (Item *)TargetItemInvPos;
        }
        v11 = v2->m_pkInventoryWin;
        v12 = v11->m_uiSenderInvPos;
        if ( v12 < 0xC0 )
        {
          v13 = (ItemIcon *)&v11->m_apkInvWin[v12]->vfptr;
          if ( v13 )
          {
            v14 = ItemIcon::GetItem(v13);
            if ( v14 )
            {
              v15 = v14->m_pkInfo;
              if ( v15 )
              {
                if ( v15->ItemFunc == 6 )
                {
                  if ( Item::GetPutOnBelongState(v8) == 1 )
                  {
                    v16 = v2->m_pkInventoryWin;
                    BYTE1(TargetItemInvPos) = v6;
                    LOBYTE(TargetItemInvPos) = v16->m_uiSenderInvPos;
                    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x48u, &TargetItemInvPos, 2);
                    InventoryWin::SetReceiverInvPos(v2->m_pkInventoryWin, v6);
                    InventoryWin::ms_uiMode = 8;
                    return;
                  }
                  v17 = TextData2::Get(0xD8491D3E);
                }
                else
                {
                  v17 = TextData2::Get(0x3A6537Du);
                }
                GameFrameWork::AddSysMsg(v2, (const char *)v17);
              }
            }
          }
        }
      }
    }
  }
}
// 98258C: using guessed type void (__thiscall *ItemUseTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9825A8: using guessed type int (__thiscall *ItemUseTask::`vftable'{for `NiRefObject'})(void *p, char);
// A8BAE8: using guessed type int Singleton<CursorState>::m_pInstance;
// A8CAC0: using guessed type int ISingletonTask<ItemUseTask>::ms_pkSingletonTask;
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (004BEBD0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SCENARIO_NPCCHAT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  ScriptMsg *v3; // eax@1
  Char *v4; // edi@1
  NiUnsharedGeometryGroup *v5; // eax@2
  NiUnsharedGeometryGroup *v6; // ST0C_4@3
  int v7; // eax@3
  const char *v8; // eax@3
  char *v9; // eax@3
  GameFrameWork *v11; // [sp+Ch] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kText; // [sp+10h] [bp-2Ch]@3
  int v13; // [sp+38h] [bp-4h]@3

  v11 = this;
  OutputDebugStringA("RCV :On_NC_SCENARIO_NPCCHAT_CMD\n");
  v3 = ScriptMsgTab::GetScriptMsgInfo((const char *)pvData);
  ScriptMsgCtrl::AddMsg(v3, 0, *(_WORD *)((char *)pvData + 33));
  v4 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)((char *)pvData + 33));
  if ( v4 )
  {
    v5 = ScriptMsgTab::GetScriptMsg((const char *)pvData);
    if ( v5 )
    {
      v6 = v5;
      v7 = ((int (__thiscall *)(Char *))v4->vfptr[2].DeleteAbStateByAbstateIndex)(v4);
      kText._Myres = 15;
      kText._Mysize = 0;
      kText._Bx._Buf[0] = 0;
      v8 = fs("[%s] : %s", v7, v6);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&kText, v8, strlen(v8));
      v9 = kText._Bx._Ptr;
      v13 = 0;
      if ( kText._Myres < 0x10 )
        v9 = (char *)&kText;
      GameFrameWork::AddOtherUserChat(v11, v9);
      if ( kText._Myres >= 0x10 )
        operator delete(kText._Bx._Ptr);
    }
  }
  else
  {
    OutputDebugStringA("SCENARIO_NPCCHAT_CMD Error. There's no NpcHandle\n");
  }
  return iRevBytes;
}

//----- (004BED00) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_PET_ASK_NEW_NAME_REQ(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // eax@1
  unsigned int v4; // ebx@2
  unsigned int v5; // esi@4
  char *v6; // eax@5
  char *v7; // edi@5
  bool v9; // zf@10
  NiUnsharedGeometryGroup *v10; // eax@11
  NiUnsharedGeometryGroup *v11; // ecx@11
  int v12; // esi@11
  char v13; // dl@12
  char v14; // dl@15
  NpcDialogWin *v15; // ecx@16
  char *v16; // eax@17
  PetNameEditWin *v17; // ecx@20
  GameFrameWork *v18; // [sp+10h] [bp-3Ch]@1
  int v19; // [sp+14h] [bp-38h]@1
  int kError; // [sp+1Ch] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kScript; // [sp+20h] [bp-2Ch]@10
  int v22; // [sp+48h] [bp-4h]@10

  v18 = this;
  v19 = *(_DWORD *)((char *)pvData + 2);
  v3 = *(_DWORD *)(ITableBase<PupMain,PetMainTab>::ms_pkTable + 56);
  kError = 13504;
  if ( v3 )
    v4 = *(_DWORD *)(v3 + 40);
  else
    v4 = 0;
  v5 = 0;
  if ( v4 )
  {
    while ( 1 )
    {
      v6 = CDataReader::GetRecord((CDataReader *)(ITableBase<PupMain,PetMainTab>::ms_pkTable + 4), v5);
      v7 = v6;
      if ( v6 )
      {
        if ( *(_DWORD *)v6 == v19 )
          break;
      }
      if ( ++v5 >= v4 )
        goto LABEL_8;
    }
    kScript._Myres = 15;
    kScript._Mysize = 0;
    kScript._Bx._Buf[0] = 0;
    v9 = *((_BYTE *)pvData + 6) == 0;
    v22 = 0;
    if ( v9 )
    {
      v10 = TextData3::Get(0x827B6C8E);
      v11 = v10;
      v12 = (int)&v10->vfptr + 1;
      do
      {
        v14 = (char)v11->vfptr;
        v11 = (NiUnsharedGeometryGroup *)((char *)v11 + 1);
      }
      while ( v14 );
    }
    else
    {
      v10 = TextData3::Get(0x817B6C8E);
      v11 = v10;
      v12 = (int)&v10->vfptr + 1;
      do
      {
        v13 = (char)v11->vfptr;
        v11 = (NiUnsharedGeometryGroup *)((char *)v11 + 1);
      }
      while ( v13 );
    }
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kScript,
      (const char *)v10,
      (unsigned int)v11 - v12);
    v15 = v18->m_pkNpcDlgWin;
    if ( v15 )
    {
      NpcDialogWin::CloseDialog(v15);
      v16 = kScript._Bx._Ptr;
      if ( kScript._Myres < 0x10 )
        v16 = (char *)&kScript;
      NpcDialogWin::OpenNpcScriptDialog(v18->m_pkNpcDlgWin, v7 + 4, v16, 0);
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v18->m_pkNpcDlgWin->vfptr);
    }
    v17 = v18->m_pkPetNameEditWin;
    if ( v17 )
    {
      PetNameEditWin::SetPetHandle(v17, *(_WORD *)pvData);
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v18->m_pkPetNameEditWin->vfptr);
    }
    v22 = -1;
    if ( kScript._Myres >= 0x10 )
      operator delete(kScript._Bx._Ptr);
  }
  else
  {
LABEL_8:
    kError = 13505;
  }
  HIWORD(kError) = *(_WORD *)pvData;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x35u, 6u, &kError, 4);
  return iRevBytes;
}
// A89D30: using guessed type int ITableBase<PupMain,PetMainTab>::ms_pkTable;

//----- (004BEEC0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MAP_LINKEND_CLIENT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  __int16 v3; // si@1
  __int16 v4; // ax@2
  signed __int16 v5; // ax@2
  Char *v6; // eax@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v8; // [sp-1Ch] [bp-28h]@1
  int v9; // [sp-Ch] [bp-18h]@1
  signed int v10; // [sp-8h] [bp-14h]@1
  int v11; // [sp-4h] [bp-10h]@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v12; // [sp+4h] [bp-8h]@1
  GameFrameWork *v13; // [sp+8h] [bp-4h]@1

  v13 = this;
  v12 = &v8;
  v10 = 15;
  v9 = 0;
  v8._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &v8,
    "PopUpDialogNPC_Raemi_LimitLv",
    0x1Cu);
  v3 = CSingleDataMap::GetValue(&g_kSingleDataMap, v8);
  if ( User::Lv(&g_kUser) <= (unsigned __int16)v3 )
  {
    v12 = &v8;
    v10 = 15;
    v9 = 0;
    v8._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v8, "PopUpDialogNPC_Raemi", 0x14u);
    v4 = CSingleDataMap::GetValue(&g_kSingleDataMap, v8);
    v5 = CharMgr::FindFirstCharHandleByMobID(&g_kCharMgr, v4);
    if ( v5 != -1 )
    {
      v6 = CharMgr::GetChar(&g_kCharMgr, v5);
      if ( v6 )
      {
        v11 = v6->m_kHandle;
        GameFrameWork::NcActNPCClickCmd(v13, v11);
      }
    }
  }
  return iRevBytes;
}

//----- (004BEF80) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_BOOTH_SEARCH_BOOTH_POSITION_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  NiUnsharedGeometryGroup *v4; // eax@2
  int v5; // eax@2
  float fY; // ST0C_4@3
  float fX; // ST08_4@3
  int v8; // esi@3
  Effect *v9; // ebx@3
  Effect *v10; // edi@3
  Effect *v11; // eax@3
  _BYTE v12[12]; // ST04_12@7
  LookAtEffect *v13; // edi@7
  _BYTE v14[12]; // ST04_12@7
  LookAtEffect *v15; // esi@7
  _BYTE v16[12]; // ST04_12@7
  LookAtEffect *v17; // eax@7
  GameFrameWork *v18; // edi@11
  char *v19; // eax@11
  MsgBox *v20; // esi@11
  MarketSearchWin *v21; // eax@11
  int v22; // eax@12
  NiPoint3 kBoothPos; // [sp+18h] [bp-20h]@3
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > >,bool> result; // [sp+24h] [bp-14h]@4
  std::pair<unsigned int,Effect *> pkElement; // [sp+2Ch] [bp-Ch]@4
  GameFrameWork *v26; // [sp+34h] [bp-4h]@1

  v3 = this;
  v26 = this;
  if ( *(_WORD *)pvData == 12744 )
  {
    fX = (double)*((unsigned int *)pvData + 1);
    fY = (double)*((unsigned int *)pvData + 2);
    World::GetAdvGroundPos(&g_kWorld, fX, fY, &kBoothPos);
    v8 = *((_WORD *)pvData + 1);
    v9 = EffectMgr::JustCreateClientEffect(&g_kEffectMgr, "MarketSearchTarget1", v8);
    v10 = EffectMgr::JustCreateClientEffect(&g_kEffectMgr, "MarketSearchTarget2", v8);
    v11 = EffectMgr::JustCreateClientEffect(&g_kEffectMgr, "MarketSearchTarget3", v8);
    if ( v10 )
    {
      v10->m_bLoop = 1;
      v10->m_pkChainEffect = v11;
      pkElement.first = 0;
      pkElement.second = v10;
      std::_Tree<std::_Tmap_traits<unsigned long,ProduceInfo *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,ProduceInfo *>>,1>>::insert<std::pair<unsigned long const,ProduceInfo *>>(
        &stru_B4F204,
        &result,
        &pkElement);
    }
    if ( v9 )
    {
      v9->m_pkChainEffect = v10;
      EffectMgr::PlayEffect(&g_kEffectMgr, v9);
    }
    *(float *)v12 = kBoothPos.x;
    *(_QWORD *)&v12[4] = *(_QWORD *)&kBoothPos.y;
    v13 = EffectMgr::JustCreateLookAtEffect(&g_kEffectMgr, "MarketSearchMe1", *(NiPoint3 *)v12, g_pkMainChar);
    *(float *)v14 = kBoothPos.x;
    *(_QWORD *)&v14[4] = *(_QWORD *)&kBoothPos.y;
    v15 = EffectMgr::JustCreateLookAtEffect(&g_kEffectMgr, "MarketSearchMe2", *(NiPoint3 *)v14, g_pkMainChar);
    *(float *)v16 = kBoothPos.x;
    *(_QWORD *)&v16[4] = *(_QWORD *)&kBoothPos.y;
    v17 = EffectMgr::JustCreateLookAtEffect(&g_kEffectMgr, "MarketSearchMe3", *(NiPoint3 *)v16, g_pkMainChar);
    if ( v15 )
    {
      v15->m_pkChainEffect = (Effect *)v17;
      v15->m_bLoop = 1;
      pkElement.first = 0;
      pkElement.second = (Effect *)v15;
      std::_Tree<std::_Tmap_traits<unsigned long,ProduceInfo *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,ProduceInfo *>>,1>>::insert<std::pair<unsigned long const,ProduceInfo *>>(
        &stru_B4F204,
        &result,
        &pkElement);
    }
    if ( v13 )
    {
      v13->m_pkChainEffect = (Effect *)v15;
      EffectMgr::PlayEffect(&g_kEffectMgr, (Effect *)&v13->vfptr);
    }
    v18 = v26;
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v26->m_pkMarketSearchWin->vfptr);
    v19 = (char *)TextData3::Get(0x81AEA7C5);
    v20 = MsgBox::Modeless(MSGBOX_BOOTH_SEARCHING, v19);
    v21 = v18->m_pkMarketSearchWin;
    if ( v21 )
      v22 = (int)&v21->vfptr;
    else
      v22 = 0;
    v20->vfptr->SetMsgHooker(&v20->vfptr, v22);
    ((void (__thiscall *)(MsgBox *, unsigned int, unsigned int, _DWORD, _DWORD))v20->vfptr[59].__vecDelDtor)(
      v20,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.64999998);
    MarketSearchWin::SetSearchingMsgBox(v18->m_pkMarketSearchWin, v20);
    v5 = iRevBytes;
  }
  else
  {
    v4 = TextData3::Get(0x96D5ACFA);
    GameFrameWork::AddSysMsg(v3, (const char *)v4);
    MarketSearchWin::SetSearchBooth(v3->m_pkMarketSearchWin, 0xFFFFu);
    v5 = iRevBytes;
  }
  return v5;
}

//----- (004BF1E0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_ANNOUNCE_W2C_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  bool v3; // zf@1
  GameFrameWork *v4; // edi@1
  D3DXCOLOR *v5; // eax@2
  D3DXCOLOR v6; // ST04_16@2
  char *v7; // eax@3
  char v8; // cl@4
  unsigned int v9; // esi@5
  unsigned int v10; // esi@8
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v11; // eax@9
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v12; // eax@11
  char *v13; // eax@13
  ChatBlockListWin *v14; // ecx@15
  _BYTE v15[20]; // ST00_20@16
  char *v16; // ecx@18
  char *v17; // eax@20
  D3DXCOLOR result; // [sp+10h] [bp-ACh]@2
  GameFrameWork *v20; // [sp+20h] [bp-9Ch]@1
  char _Ptr; // [sp+24h] [bp-98h]@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v22; // [sp+28h] [bp-94h]@9
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strMsg; // [sp+44h] [bp-78h]@8
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strRoarMsg; // [sp+60h] [bp-5Ch]@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strTalker; // [sp+7Ch] [bp-40h]@8
  Name5 kCharID; // [sp+98h] [bp-24h]@15
  int v27; // [sp+B8h] [bp-4h]@5

  v3 = *(_BYTE *)pvData == 11;
  v4 = this;
  v20 = this;
  if ( v3 )
  {
    v7 = (char *)pvData + 2;
    strRoarMsg._Myres = 15;
    strRoarMsg._Mysize = 0;
    strRoarMsg._Bx._Buf[0] = 0;
    do
      v8 = *v7++;
    while ( v8 );
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &strRoarMsg,
      (const char *)pvData + 2,
      v7 - ((_BYTE *)pvData + 3));
    v27 = 0;
    _Ptr = 37;
    v9 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::find(&strRoarMsg, &_Ptr, 0, 1u);
    if ( v9 != -1 )
    {
      _Ptr = 37;
      do
      {
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::replace(&strRoarMsg, v9, 1u, 2u, 37);
        v9 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::find(&strRoarMsg, &_Ptr, v9 + 2, 1u);
      }
      while ( v9 != -1 );
    }
    _Ptr = 58;
    v10 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::find(&strRoarMsg, &_Ptr, 0, 1u);
    strTalker._Myres = 15;
    strTalker._Mysize = 0;
    strTalker._Bx._Buf[0] = 0;
    strMsg._Myres = 15;
    strMsg._Mysize = 0;
    strMsg._Bx._Buf[0] = 0;
    LOBYTE(v27) = 2;
    if ( v10 != -1 )
    {
      v11 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(&strRoarMsg, &v22, 0, v10);
      LOBYTE(v27) = 3;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strTalker, v11);
      LOBYTE(v27) = 2;
      if ( v22._Myres >= 0x10 )
        operator delete(v22._Bx._Ptr);
      v12 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(
              &strRoarMsg,
              &v22,
              v10 + 1,
              0xFFFFFFFF);
      LOBYTE(v27) = 4;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strMsg, v12);
      LOBYTE(v27) = 2;
      if ( v22._Myres >= 0x10 )
        operator delete(v22._Bx._Ptr);
      v13 = strTalker._Bx._Ptr;
      if ( strTalker._Myres < 0x10 )
        v13 = (char *)&strTalker;
      *(_QWORD *)&kCharID.n5_code[3] = 0i64;
      *(_QWORD *)&kCharID.n5_code[1] = 0i64;
      *(_QWORD *)&kCharID.n5_name[0] = 0i64;
      strncpy(kCharID.n5_name, v13, 0x14u);
      v14 = v20->m_pkChatBlockListWin;
      v22._Mysize = kCharID.n5_code[2];
      *(_QWORD *)&v22._Bx._Alias[8] = *(_QWORD *)&kCharID.n5_name[0];
      *(_QWORD *)&v22._Myres = *(_QWORD *)&kCharID.n5_code[3];
      if ( CChatRestrict::Get(&v14->m_RestrictList, (Name5 *)&v22._Bx._Alias[8]) )
      {
        *(_QWORD *)v15 = *(_QWORD *)&kCharID.n5_name[0];
        *(_QWORD *)&v15[8] = *(_QWORD *)&kCharID.n5_code[2];
        *(_DWORD *)&v15[16] = kCharID.n5_code[4];
        if ( !ChatBlockListWin::IsGM(v20->m_pkChatBlockListWin, *(Name5 *)v15) )
        {
          std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&strMsg);
          std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&strTalker);
          std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&strRoarMsg);
          return iRevBytes;
        }
      }
      v16 = strMsg._Bx._Ptr;
      if ( strMsg._Myres < 0x10 )
        v16 = (char *)&strMsg;
      v17 = strTalker._Bx._Ptr;
      if ( strTalker._Myres < 0x10 )
        v17 = (char *)&strTalker;
      GameFrameWork::AddRoarChat(v20, v17, v16);
      if ( strMsg._Myres >= 0x10 )
        operator delete(strMsg._Bx._Ptr);
    }
    strMsg._Myres = 15;
    strMsg._Mysize = 0;
    strMsg._Bx._Buf[0] = 0;
    if ( strTalker._Myres >= 0x10 )
      operator delete(strTalker._Bx._Ptr);
    strTalker._Myres = 15;
    strTalker._Mysize = 0;
    strTalker._Bx._Buf[0] = 0;
    if ( strRoarMsg._Myres >= 0x10 )
      operator delete(strRoarMsg._Bx._Ptr);
  }
  else
  {
    v5 = ColorInfoTable::GetDxColor(&result, Center_Announcement);
    *(_QWORD *)&v6.r = *(_QWORD *)&v5->r;
    *(_QWORD *)&v6.b = *(_QWORD *)&v5->b;
    GameFrameWork::AddAnnounceMsg(v4, (int)v4, (int)pvData + 2, (char *)pvData + 2, v6);
  }
  return iRevBytes;
}

//----- (004BF4E0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_MODIFY_PASSWORD_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  mhSettingWin *v4; // ecx@2
  char v5; // bl@6
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v7; // [sp-Ch] [bp-68h]@6
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v8; // [sp+14h] [bp-48h]@6
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Right; // [sp+30h] [bp-2Ch]@7
  int v10; // [sp+58h] [bp-4h]@6

  v3 = this;
  if ( unk_A9943C != 2 )
  {
    v4 = this->m_pkMHSettingWin;
    if ( *(_BYTE *)pvData )
      mhSettingWin::SetPassWord(v4, 0);
    else
      mhSettingWin::SetPassWord(v4, "........");
    if ( *(_BYTE *)pvData )
    {
      _Right._Myres = 15;
      _Right._Mysize = 0;
      _Right._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Right, &byte_981D9F, 0);
      v10 = 1;
      v5 = 2;
      v7 = &_Right;
    }
    else
    {
      v8._Myres = 15;
      v8._Mysize = 0;
      v8._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v8, "........", 8u);
      v10 = 0;
      v5 = 1;
      v7 = &v8;
    }
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v3->m_pkMHInfoWin->m_PassWord,
      v7,
      0,
      0xFFFFFFFF);
    if ( v5 & 2 )
    {
      v5 &= 0xFDu;
      if ( _Right._Myres >= 0x10 )
        operator delete(_Right._Bx._Ptr);
      _Right._Myres = 15;
      _Right._Mysize = 0;
      _Right._Bx._Buf[0] = 0;
    }
    if ( v5 & 1 && v8._Myres >= 0x10 )
      operator delete(v8._Bx._Ptr);
  }
  return iRevBytes;
}

//----- (004BF620) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_COLLECT_CARDREGIST_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // eax@1
  GameFrameWork *v4; // esi@1
  CollectWin *v5; // eax@2
  unsigned int v6; // ecx@3
  char *v7; // edx@4
  int v8; // esi@10
  GameFrameWork *v9; // edi@10
  int v10; // esi@10
  int v11; // eax@14
  __int16 v12; // di@14
  unsigned int v13; // ebx@15
  unsigned int v14; // esi@17
  char *v15; // eax@18
  int v16; // ST0C_4@22
  char *v17; // eax@22
  const char *v18; // eax@22
  GameFrameWork *v19; // ecx@22
  std::vector<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo> > kCardInfos; // [sp+10h] [bp-50h]@3
  float v22; // [sp+20h] [bp-40h]@10
  GameFrameWork *v23; // [sp+24h] [bp-3Ch]@1
  bool bPopup; // [sp+2Bh] [bp-35h]@3
  tm tb; // [sp+2Ch] [bp-34h]@10
  int v26; // [sp+5Ch] [bp-4h]@3

  v3 = *((_WORD *)pvData + 4);
  v4 = this;
  v23 = this;
  if ( (_WORD)v3 != 11152 )
  {
    v18 = ErrMsgTable::GetErrMsg(v3);
    v19 = v4;
LABEL_24:
    GameFrameWork::AddSysMsg(v19, v18);
    return iRevBytes;
  }
  v5 = this->m_pkCollectWin;
  if ( v5 )
  {
    bPopup = 0;
    std::vector<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo>>::vector<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo>>(
      &kCardInfos,
      &v5->m_kCardInfos);
    v26 = 0;
    v6 = 0;
    if ( kCardInfos._Mylast - kCardInfos._Myfirst )
    {
      v7 = (char *)&kCardInfos._Myfirst->m_tRegistTime;
      while ( *((_DWORD *)v7 - 3) != *(_WORD *)((char *)pvData + 1) || *(_DWORD *)v7 )
      {
        ++v6;
        v7 += 20;
        if ( v6 >= kCardInfos._Mylast - kCardInfos._Myfirst )
          goto LABEL_10;
      }
      bPopup = 1;
    }
LABEL_10:
    qmemcpy(&tb, &Timer::ms_dLastServerTime, sizeof(tb));
    v8 = _mktime32(&tb);
    v22 = Timer::ms_fCurTime - Timer::ms_fLastRecordServerTime;
    v9 = v23;
    v10 = (signed int)v22 + v8;
    CollectWin::SetCard(
      v23->m_pkCollectWin,
      *(_WORD *)((char *)pvData + 1),
      *((_BYTE *)pvData + 3),
      *((_DWORD *)pvData + 1),
      v10);
    CollectWin::SetNewest(v9->m_pkCollectWin, v10, *(_WORD *)((char *)pvData + 1));
    CollectWin::SetRegistPage(v9->m_pkCollectWin, *(_WORD *)((char *)pvData + 1));
    if ( bPopup )
      GameFrameWork::OpenCollectPopupWin(v9, *(_WORD *)((char *)pvData + 1));
    v26 = -1;
    if ( kCardInfos._Myfirst )
      operator delete(kCardInfos._Myfirst);
  }
  v11 = *(_DWORD *)(ITableBase<CollectCardView,CollectCardViewTab>::ms_pkTable + 56);
  v12 = *(_WORD *)((char *)pvData + 1);
  if ( v11 )
    v13 = *(_DWORD *)(v11 + 40);
  else
    v13 = 0;
  v14 = 0;
  if ( v13 )
  {
    while ( 1 )
    {
      v15 = CDataReader::GetRecord((CDataReader *)(ITableBase<CollectCardView,CollectCardViewTab>::ms_pkTable + 4), v14);
      if ( v15 )
      {
        if ( *(_WORD *)v15 == v12 )
          break;
      }
      if ( ++v14 >= v13 )
        return iRevBytes;
    }
    v16 = (int)(v15 + 34);
    v17 = (char *)TextData2::Get(0x78E5D9D9u);
    v18 = fs(v17, v16);
    v19 = v23;
    goto LABEL_24;
  }
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8B988: using guessed type float Timer::ms_fLastRecordServerTime;
// A8C214: using guessed type int ITableBase<CollectCardView,CollectCardViewTab>::ms_pkTable;

//----- (004BF800) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_CHAR_EVENT_ATTENDANCE_REWARD_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // ebx@1
  int v4; // esi@1
  GameFrameWork *v5; // edi@1
  int *v6; // eax@3
  int v7; // esi@4
  ItemInfo *v8; // eax@5
  Item *v9; // eax@6
  char *v10; // eax@8
  char *v11; // eax@10
  int v13; // [sp-4h] [bp-10h]@8

  v3 = *((_BYTE *)pvData + 1);
  v4 = ITableBase<AttendReward,AttendRewardTab>::ms_pkTable;
  v5 = this;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AttendReward,AttendRewardTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<AttendReward,AttendRewardTab>::ms_pkTable,
                          v3) )
  {
    if ( (unsigned __int16)v3 <= *(_WORD *)(v4 + 200) )
    {
      v6 = (int *)(*(_DWORD *)(v4 + 196) + 4 * v3);
      if ( *v6 )
      {
        v7 = *v6;
        if ( *v6 )
        {
          v8 = ItemInfoTab::GetByInxName((char *)(v7 + 6));
          if ( v8 )
          {
            v9 = Item::Create(v8->ID);
            if ( v9 )
            {
              AttendRewardWin::SetItemInfo(v5->m_pkAttendRewardWin, (int)pvData, (int)v5, *((_BYTE *)pvData + 1), v9);
              AttendCheckWin::SetReward(v5->m_pkAttendCheckWin, *((_BYTE *)pvData + 1));
              if ( *(_DWORD *)(v7 + 1) )
              {
                AttendCheckWin::OnRewardEffect(v5->m_pkAttendCheckWin);
                v13 = *(_BYTE *)(v7 + 5);
                v10 = (char *)TextData2::Get(0xB5C40D32);
              }
              else
              {
                GameFrameWork::OnOpenAttendRewardWin(v5);
                v13 = *(_BYTE *)(v7 + 5);
                v10 = (char *)TextData2::Get(0xB00C3516);
              }
              v11 = fs(v10, v13);
              GameFrameWork::AddAuthorMsg(v5, v11);
            }
          }
        }
      }
    }
  }
  return iRevBytes;
}
// A8C28C: using guessed type int ITableBase<AttendReward,AttendRewardTab>::ms_pkTable;

//----- (004BF8F0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_SCENARIO_SCRIPTMESSAGE_CMD(int iRevBytes, void *pvData)
{
  char *v3; // eax@1
  char v4; // dl@2
  char *v5; // ebx@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v6; // esi@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v7; // edi@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v8; // ebx@15
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v9; // esi@17
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v10; // edx@19
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v11; // ecx@21
  void *v12; // eax@23
  const char *v13; // eax@25
  const char *v14; // eax@26
  signed int v16; // [sp+10h] [bp-FCh]@4
  ScriptMsg *pkScriptMsg; // [sp+14h] [bp-F8h]@1
  int iPos; // [sp+18h] [bp-F4h]@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+1Ch] [bp-F0h]@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kStr; // [sp+38h] [bp-D4h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kContent; // [sp+54h] [bp-B8h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kArg[5]; // [sp+70h] [bp-9Ch]@4
  int v23; // [sp+108h] [bp-4h]@1

  pkScriptMsg = ScriptMsgTab::GetScriptMsgInfo((const char *)pvData);
  kStr._Myres = 15;
  kStr._Mysize = 0;
  kStr._Bx._Buf[0] = 0;
  kContent._Myres = 15;
  v3 = (char *)pvData + 37;
  v23 = 0;
  kContent._Mysize = 0;
  kContent._Bx._Buf[0] = 0;
  do
    v4 = *v3++;
  while ( v4 );
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &kContent,
    (const char *)pvData + 37,
    v3 - ((_BYTE *)pvData + 38));
  LOBYTE(v23) = 1;
  if ( kContent._Mysize > 0 )
  {
    `eh vector constructor iterator'(
      kArg,
      0x1Cu,
      5,
      (void (__thiscall *)(void *))std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    iPos = 0;
    v5 = (char *)pvData + 32;
    LOBYTE(v23) = 2;
    v6 = kArg;
    v16 = 5;
    do
    {
      v7 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(
             &kContent,
             &result,
             iPos,
             (unsigned __int8)*v5);
      if ( v6 != v7 )
      {
        if ( v6->_Myres >= 0x10 )
          operator delete(v6->_Bx._Ptr);
        v6->_Myres = 15;
        v6->_Mysize = 0;
        v6->_Bx._Buf[0] = 0;
        if ( v7->_Myres >= 0x10 )
        {
          v6->_Bx._Ptr = v7->_Bx._Ptr;
          v7->_Bx._Ptr = 0;
        }
        else
        {
          memmove(v6->_Bx._Buf, v7->_Bx._Buf, v7->_Mysize + 1);
        }
        v6->_Mysize = v7->_Mysize;
        v6->_Myres = v7->_Myres;
        v7->_Myres = 15;
        v7->_Mysize = 0;
        v7->_Bx._Buf[0] = 0;
      }
      LOBYTE(v23) = 2;
      if ( result._Myres >= 0x10 )
        operator delete(result._Bx._Ptr);
      iPos += (unsigned __int8)*v5;
      ++v6;
      ++v5;
      --v16;
    }
    while ( v16 );
    v8 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)kArg[4]._Bx._Ptr;
    if ( kArg[4]._Myres < 0x10 )
      v8 = &kArg[4];
    v9 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)kArg[3]._Bx._Ptr;
    if ( kArg[3]._Myres < 0x10 )
      v9 = &kArg[3];
    v10 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)kArg[2]._Bx._Ptr;
    if ( kArg[2]._Myres < 0x10 )
      v10 = &kArg[2];
    v11 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)kArg[1]._Bx._Ptr;
    if ( kArg[1]._Myres < 0x10 )
      v11 = &kArg[1];
    v12 = kArg[0]._Bx._Ptr;
    if ( kArg[0]._Myres < 0x10 )
      v12 = kArg;
    v13 = fs(pkScriptMsg->SM_Msg, v12, v11, v10, v9, v8);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&kStr, v13, strlen(v13));
    LOBYTE(v23) = 1;
    `eh vector destructor iterator'(
      kArg,
      0x1Cu,
      5,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
  }
  v14 = kStr._Bx._Ptr;
  if ( kStr._Myres < 0x10 )
    v14 = (const char *)&kStr;
  ScriptMsgCtrl::AddMsg(pkScriptMsg, v14, 0xFFFFu);
  if ( kContent._Myres >= 0x10 )
    operator delete(kContent._Bx._Ptr);
  kContent._Myres = 15;
  kContent._Mysize = 0;
  kContent._Bx._Buf[0] = 0;
  if ( kStr._Myres >= 0x10 )
    operator delete(kStr._Bx._Ptr);
  return iRevBytes;
}

//----- (004BFBB0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_ACT_SCRIPT_MSG_CMD(int iRevBytes, void *pvData)
{
  unsigned __int16 *v3; // esi@1
  char *v4; // eax@2
  char v5; // dl@3
  char *v6; // ebx@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v7; // esi@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v8; // edi@6
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v9; // edi@16
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v10; // esi@18
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v11; // edx@20
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v12; // ecx@22
  void *v13; // eax@24
  const char *v14; // eax@26
  const char *v15; // eax@27
  ScriptMsg *pkScriptMsg; // [sp+14h] [bp-FCh]@1
  signed int v18; // [sp+18h] [bp-F8h]@5
  int iPos; // [sp+1Ch] [bp-F4h]@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+20h] [bp-F0h]@6
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kStr; // [sp+3Ch] [bp-D4h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kContent; // [sp+58h] [bp-B8h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kArg[5]; // [sp+74h] [bp-9Ch]@5
  int v24; // [sp+10Ch] [bp-4h]@2

  v3 = (unsigned __int16 *)pvData;
  pkScriptMsg = ScriptMsgTab::GetScriptMsgInfo((const char *)pvData + 2);
  if ( pkScriptMsg )
  {
    kStr._Myres = 15;
    kStr._Mysize = 0;
    kStr._Bx._Buf[0] = 0;
    kContent._Myres = 15;
    v4 = (char *)pvData + 39;
    v24 = 0;
    kContent._Mysize = 0;
    kContent._Bx._Buf[0] = 0;
    do
      v5 = *v4++;
    while ( v5 );
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kContent,
      (const char *)pvData + 39,
      v4 - ((_BYTE *)pvData + 40));
    LOBYTE(v24) = 1;
    if ( kContent._Mysize > 0 )
    {
      `eh vector constructor iterator'(
        kArg,
        0x1Cu,
        5,
        (void (__thiscall *)(void *))std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>,
        (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
      iPos = 0;
      v6 = (char *)pvData + 34;
      LOBYTE(v24) = 2;
      v7 = kArg;
      v18 = 5;
      do
      {
        v8 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(
               &kContent,
               &result,
               iPos,
               (unsigned __int8)*v6);
        if ( v7 != v8 )
        {
          if ( v7->_Myres >= 0x10 )
            operator delete(v7->_Bx._Ptr);
          v7->_Myres = 15;
          v7->_Mysize = 0;
          v7->_Bx._Buf[0] = 0;
          if ( v8->_Myres >= 0x10 )
          {
            v7->_Bx._Ptr = v8->_Bx._Ptr;
            v8->_Bx._Ptr = 0;
          }
          else
          {
            memmove(v7->_Bx._Buf, v8->_Bx._Buf, v8->_Mysize + 1);
          }
          v7->_Mysize = v8->_Mysize;
          v7->_Myres = v8->_Myres;
          v8->_Myres = 15;
          v8->_Mysize = 0;
          v8->_Bx._Buf[0] = 0;
        }
        LOBYTE(v24) = 2;
        if ( result._Myres >= 0x10 )
          operator delete(result._Bx._Ptr);
        iPos += (unsigned __int8)*v6;
        ++v7;
        ++v6;
        --v18;
      }
      while ( v18 );
      v9 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)kArg[4]._Bx._Ptr;
      if ( kArg[4]._Myres < 0x10 )
        v9 = &kArg[4];
      v10 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)kArg[3]._Bx._Ptr;
      if ( kArg[3]._Myres < 0x10 )
        v10 = &kArg[3];
      v11 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)kArg[2]._Bx._Ptr;
      if ( kArg[2]._Myres < 0x10 )
        v11 = &kArg[2];
      v12 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)kArg[1]._Bx._Ptr;
      if ( kArg[1]._Myres < 0x10 )
        v12 = &kArg[1];
      v13 = kArg[0]._Bx._Ptr;
      if ( kArg[0]._Myres < 0x10 )
        v13 = kArg;
      v14 = fs(pkScriptMsg->SM_Msg, v13, v12, v11, v10, v9);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&kStr, v14, strlen(v14));
      LOBYTE(v24) = 1;
      `eh vector destructor iterator'(
        kArg,
        0x1Cu,
        5,
        (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
      v3 = (unsigned __int16 *)pvData;
    }
    v15 = kStr._Bx._Ptr;
    if ( kStr._Myres < 0x10 )
      v15 = (const char *)&kStr;
    ScriptMsgCtrl::AddMsg(pkScriptMsg, v15, *v3);
    if ( kContent._Myres >= 0x10 )
      operator delete(kContent._Bx._Ptr);
    kContent._Myres = 15;
    kContent._Mysize = 0;
    kContent._Bx._Buf[0] = 0;
    if ( kStr._Myres >= 0x10 )
      operator delete(kStr._Bx._Ptr);
  }
  return iRevBytes;
}

//----- (004BFE80) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_SCENARIO_DIRECTIONAL_ARROW_CMD(int iRevBytes, void *pvData)
{
  float fY; // ST0C_4@1
  float fX; // ST08_4@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> >::_Node *v5; // eax@1
  Effect *v6; // eax@2
  _BYTE v8[12]; // ST04_12@4
  LookAtEffect *v9; // edi@4
  _BYTE v10[12]; // ST04_12@4
  LookAtEffect *v11; // esi@4
  _BYTE v12[12]; // ST04_12@4
  LookAtEffect *v13; // eax@4
  NiPoint3 kPos; // [sp+14h] [bp-1Ch]@1
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > >,bool> result; // [sp+20h] [bp-10h]@5
  std::pair<unsigned int,Effect *> pkElement; // [sp+28h] [bp-8h]@1

  fX = (double)*(unsigned int *)pvData;
  fY = (double)*((unsigned int *)pvData + 1);
  World::GetAdvGroundPos(&g_kWorld, fX, fY, &kPos);
  pvData = (void *)1;
  v5 = (std::_Tree_nod<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> >::_Node *)std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::find((std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&stru_B4F204, (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&pkElement.second, (const unsigned int *)&pvData)->_Ptr;
  if ( v5 == stru_B4F204._Myhead )
  {
    *(float *)v8 = kPos.x;
    *(_QWORD *)&v8[4] = *(_QWORD *)&kPos.y;
    v9 = EffectMgr::JustCreateLookAtEffect(&g_kEffectMgr, "MarketSearchMe1", *(NiPoint3 *)v8, g_pkMainChar);
    *(float *)v10 = kPos.x;
    *(_QWORD *)&v10[4] = *(_QWORD *)&kPos.y;
    v11 = EffectMgr::JustCreateLookAtEffect(&g_kEffectMgr, "MarketSearchMe2", *(NiPoint3 *)v10, g_pkMainChar);
    *(float *)v12 = kPos.x;
    *(_QWORD *)&v12[4] = *(_QWORD *)&kPos.y;
    v13 = EffectMgr::JustCreateLookAtEffect(&g_kEffectMgr, "MarketSearchMe3", *(NiPoint3 *)v12, g_pkMainChar);
    if ( v11 )
    {
      v11->m_pkChainEffect = (Effect *)v13;
      v11->m_bLoop = 1;
      pkElement.first = 1;
      pkElement.second = (Effect *)v11;
      std::_Tree<std::_Tmap_traits<unsigned long,ProduceInfo *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,ProduceInfo *>>,1>>::insert<std::pair<unsigned long const,ProduceInfo *>>(
        &stru_B4F204,
        &result,
        &pkElement);
    }
    if ( v9 )
    {
      v9->m_pkChainEffect = (Effect *)v11;
      EffectMgr::PlayEffect(&g_kEffectMgr, (Effect *)&v9->vfptr);
    }
  }
  else
  {
    v6 = v5->_Myval.second;
    if ( v6 )
    {
      *(NiPoint3 *)&v6[1].m_ShaderEffectType = kPos;
      return iRevBytes;
    }
  }
  return iRevBytes;
}

//----- (004BFFF0) --------------------------------------------------------
void __thiscall GameFrameWork::NcActChatReq(GameFrameWork *this, char *pcText)
{
  char *v2; // esi@1
  int i; // ebx@5
  BYTE v4; // cl@6
  char *v5; // esi@6
  unsigned int v6; // eax@6
  int v7; // edi@6
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v8; // eax@8
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v9; // edi@9
  GameFrameWork *v10; // esi@9
  ChatDisplayWin2 *v11; // ecx@9
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *v12; // eax@10
  PgNet *v13; // ecx@12
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v14; // eax@16
  SHINE_ITEM_STRUCT *v15; // edx@17
  PgNet *v16; // ecx@20
  int v17; // edi@20
  SHINE_ITEM_STRUCT *v18; // ebx@21
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v19; // eax@24
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v20; // esi@25
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > v21; // [sp-10h] [bp-4F4h]@13
  PROTO_NC_ACT_CHAT_REQ *v22; // [sp-8h] [bp-4ECh]@12
  char *v23; // [sp-4h] [bp-4E8h]@8
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > result; // [sp+10h] [bp-4D4h]@10
  std::exception pExceptionObject; // [sp+1Ch] [bp-4C8h]@27
  char *_What; // [sp+28h] [bp-4BCh]@27
  GameFrameWork *v27; // [sp+2Ch] [bp-4B8h]@1
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > listLinkItem; // [sp+30h] [bp-4B4h]@8
  NETCOMMAND netcmd; // [sp+3Ch] [bp-4A8h]@3
  char *pcChatMsg; // [sp+40h] [bp-4A4h]@1
  int nCnt; // [sp+44h] [bp-4A0h]@3
  PROTO_NC_ACT_CHAT_REQ kProto; // [sp+48h] [bp-49Ch]@12
  SHINE_ITEM_STRUCT LinkItem[10]; // [sp+4Ch] [bp-498h]@13
  char acStr[128]; // [sp+454h] [bp-90h]@5
  int v35; // [sp+4E0h] [bp-4h]@9

  v2 = pcText;
  v27 = this;
  pcChatMsg = pcText;
  if ( !pcText || !*pcText )
    return;
  netcmd.protocol = 8193;
  PgNet::AddNetMsg((PgNet *)&this->m_spZoneNet.m_pObject->vfptr, &netcmd, 2);
  nCnt = strlen(pcText);
  if ( nCnt > 127 )
    nCnt = 127;
  memset(acStr, 0, 0x80u);
  for ( i = 0; ; i = v7 )
  {
    v4 = v2[i];
    v5 = &v2[i];
    v6 = (IsDBCSLeadByte(v4) != 0) + 1;
    v7 = v6 + i;
    if ( (signed int)(v6 + i) > nCnt )
      break;
    memcpy(&acStr[i], v5, v6);
    v2 = pcChatMsg;
  }
  v23 = (char *)112;
  acStr[i] = 0;
  listLinkItem._Mysize = 0;
  v8 = (std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *)operator new((unsigned int)v23);
  if ( !v8 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v9 = v8;
  v8->_Next = v8;
  listLinkItem._Myhead = v8;
  v8->_Prev = v8;
  v35 = 0;
  v10 = v27;
  v11 = v27->m_pkChatDisplayWin;
  if ( v11 )
  {
    v12 = ChatDisplayWin2::GetLinkItemList(v11, &result);
    LOBYTE(v35) = 1;
    std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::_Assign_rv(&listLinkItem, v12);
    LOBYTE(v35) = 0;
    std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~list<ItemViewDummy *,std::allocator<ItemViewDummy *>>((std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)&result);
    if ( listLinkItem._Mysize )
    {
      memset((char *)LinkItem, 0, 0x406u);
      v23 = pcChatMsg;
      pcChatMsg = (char *)&v21;
      std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>(
        &v21,
        &listLinkItem);
      if ( !GameFrameWork::ItemNameIsCorrect(v21, v23) )
      {
        std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~list<ItemViewDummy *,std::allocator<ItemViewDummy *>>((std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)&listLinkItem);
        return;
      }
      v14 = listLinkItem._Myhead->_Next;
      nCnt = 0;
      if ( v14 != listLinkItem._Myhead )
      {
        v15 = LinkItem;
        do
        {
          ++nCnt;
          qmemcpy(&v15->itemattr, &v14->_Myval.itemattr, sizeof(v15->itemattr));
          v15->itemid = v14->_Myval.itemid;
          v14 = v14->_Next;
          ++v15;
        }
        while ( v14 != listLinkItem._Myhead );
        v10 = v27;
      }
      v16 = (PgNet *)&v10->m_spZoneNet.m_pObject->vfptr;
      kProto.itemLinkDataCount = nCnt;
      kProto.len = i;
      PgNet::AddNetMsg(v16, &kProto, 2);
      v23 = (char *)(unsigned __int8)kProto.len;
      PgNet::AddNetMsg((PgNet *)&v10->m_spZoneNet.m_pObject->vfptr, acStr, (unsigned __int8)kProto.len);
      v17 = nCnt;
      if ( nCnt > 0 )
      {
        v18 = LinkItem;
        do
        {
          PgNet::AddNetMsg((PgNet *)&v10->m_spZoneNet.m_pObject->vfptr, v18, 103);
          ++v18;
          --v17;
        }
        while ( v17 );
      }
      PgNet::SendNetMsg((PgNet *)&v10->m_spZoneNet.m_pObject->vfptr, 0, 0);
      v9 = listLinkItem._Myhead;
      goto LABEL_24;
    }
    v9 = listLinkItem._Myhead;
  }
  v23 = (char *)2;
  v22 = &kProto;
  v13 = (PgNet *)&v10->m_spZoneNet.m_pObject->vfptr;
  kProto.itemLinkDataCount = 0;
  kProto.len = i;
  PgNet::AddNetMsg(v13, &kProto, 2);
  PgNet::SendNetMsg((PgNet *)&v10->m_spZoneNet.m_pObject->vfptr, acStr, (unsigned __int8)kProto.len);
LABEL_24:
  v19 = v9->_Next;
  v9->_Next = v9;
  v9->_Prev = v9;
  if ( v19 != v9 )
  {
    do
    {
      v20 = v19->_Next;
      operator delete(v19);
      v19 = v20;
    }
    while ( v20 != v9 );
  }
  operator delete(v9);
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (004C0330) --------------------------------------------------------
void __thiscall GameFrameWork::NcActShoutCmd(GameFrameWork *this, char *pcText)
{
  char *v2; // edi@1
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@3
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v5; // eax@3
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v6; // ebx@4
  ChatDisplayWin2 *v7; // ecx@4
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *v8; // eax@5
  char *v9; // eax@7
  char v10; // dl@7
  char v11; // cl@8
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v12; // eax@15
  int v13; // ebx@15
  SHINE_ITEM_STRUCT *v14; // edx@16
  SHINE_ITEM_STRUCT *v15; // edi@22
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v16; // eax@25
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v17; // esi@26
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > v18; // [sp-10h] [bp-474h]@12
  char *v19; // [sp-4h] [bp-468h]@12
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > result; // [sp+10h] [bp-454h]@5
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *v21; // [sp+1Ch] [bp-448h]@12
  std::exception pExceptionObject; // [sp+20h] [bp-444h]@28
  char *v23; // [sp+2Ch] [bp-438h]@1
  GameFrameWork *v24; // [sp+30h] [bp-434h]@1
  char *_What; // [sp+34h] [bp-430h]@28
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > listLinkItem; // [sp+38h] [bp-42Ch]@3
  NETCOMMAND netcmd; // [sp+44h] [bp-420h]@3
  PROTO_NC_ACT_SHOUT_CMD kProto; // [sp+48h] [bp-41Ch]@7
  SHINE_ITEM_STRUCT LinkItem[10]; // [sp+4Ch] [bp-418h]@12
  int v30; // [sp+460h] [bp-4h]@4

  v2 = pcText;
  v3 = this;
  v24 = this;
  v23 = pcText;
  if ( !pcText || !*pcText )
    return;
  v4 = this->m_spZoneNet.m_pObject;
  netcmd.protocol = 8222;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
  listLinkItem._Mysize = 0;
  v5 = (std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *)operator new(0x70u);
  if ( !v5 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v6 = v5;
  v5->_Next = v5;
  listLinkItem._Myhead = v5;
  v5->_Prev = v5;
  v7 = v3->m_pkChatDisplayWin;
  v30 = 0;
  if ( v7 )
  {
    v8 = ChatDisplayWin2::GetLinkItemList(v7, &result);
    LOBYTE(v30) = 1;
    std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::_Assign_rv(&listLinkItem, v8);
    LOBYTE(v30) = 0;
    std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~list<ItemViewDummy *,std::allocator<ItemViewDummy *>>((std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)&result);
    if ( listLinkItem._Mysize )
    {
      memset((char *)LinkItem, 0, 0x406u);
      v19 = pcText;
      v21 = &v18;
      std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>(
        &v18,
        &listLinkItem);
      if ( !GameFrameWork::ItemNameIsCorrect(v18, v19) )
      {
        std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~list<ItemViewDummy *,std::allocator<ItemViewDummy *>>((std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)&listLinkItem);
        return;
      }
      v12 = listLinkItem._Myhead->_Next;
      v13 = 0;
      if ( listLinkItem._Myhead->_Next != listLinkItem._Myhead )
      {
        v14 = LinkItem;
        do
        {
          qmemcpy(&v14->itemattr, &v12->_Myval.itemattr, sizeof(v14->itemattr));
          v14->itemid = v12->_Myval.itemid;
          v12 = v12->_Next;
          ++v13;
          ++v14;
        }
        while ( v12 != listLinkItem._Myhead );
        v3 = v24;
        v2 = v23;
      }
      kProto.itemLinkDataCount = v13;
      kProto.len = strlen(v2);
      if ( kProto.len > 0x80u )
        kProto.len = -128;
      PgNet::AddNetMsg((PgNet *)&v3->m_spZoneNet.m_pObject->vfptr, &kProto, 2);
      PgNet::AddNetMsg((PgNet *)&v3->m_spZoneNet.m_pObject->vfptr, v2, (unsigned __int8)kProto.len);
      if ( v13 > 0 )
      {
        v15 = LinkItem;
        do
        {
          PgNet::AddNetMsg((PgNet *)&v3->m_spZoneNet.m_pObject->vfptr, v15, 103);
          ++v15;
          --v13;
        }
        while ( v13 );
      }
      PgNet::SendNetMsg((PgNet *)&v3->m_spZoneNet.m_pObject->vfptr, 0, 0);
      v6 = listLinkItem._Myhead;
      goto LABEL_25;
    }
    v6 = listLinkItem._Myhead;
  }
  v9 = pcText;
  kProto.itemLinkDataCount = 0;
  v10 = (_BYTE)pcText + 1;
  do
    v11 = *v9++;
  while ( v11 );
  kProto.len = (_BYTE)v9 - v10;
  if ( (unsigned __int8)((_BYTE)v9 - v10) > 0x80u )
    kProto.len = -128;
  PgNet::AddNetMsg((PgNet *)&v3->m_spZoneNet.m_pObject->vfptr, &kProto, 2);
  PgNet::SendNetMsg((PgNet *)&v3->m_spZoneNet.m_pObject->vfptr, pcText, (unsigned __int8)kProto.len);
LABEL_25:
  v16 = v6->_Next;
  v6->_Next = v6;
  v6->_Prev = v6;
  if ( v16 != v6 )
  {
    do
    {
      v17 = v16->_Next;
      operator delete(v16);
      v16 = v17;
    }
    while ( v17 != v6 );
  }
  operator delete(v6);
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (004C0600) --------------------------------------------------------
void __thiscall GameFrameWork::NcActWhisperReq(GameFrameWork *this, Name5 kToChar, char *pcChat)
{
  char *v3; // edi@1
  GameFrameWork *v4; // esi@1
  Net *v5; // ecx@3
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v6; // eax@5
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v7; // ebx@6
  ChatDisplayWin2 *v8; // ecx@6
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *v9; // eax@7
  PgNet *v10; // ecx@9
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v11; // eax@13
  SHINE_ITEM_STRUCT *v12; // edx@14
  PgNet *v13; // ecx@17
  SHINE_ITEM_STRUCT *v14; // edi@18
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v15; // eax@21
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v16; // esi@22
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > v17; // [sp-10h] [bp-48Ch]@10
  PROTO_NC_ACT_WHISPER_REQ *v18; // [sp-8h] [bp-484h]@9
  char *v19; // [sp-4h] [bp-480h]@9
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > result; // [sp+10h] [bp-46Ch]@7
  std::exception pExceptionObject; // [sp+1Ch] [bp-460h]@24
  char *v22; // [sp+28h] [bp-454h]@1
  GameFrameWork *v23; // [sp+2Ch] [bp-450h]@1
  char *_What; // [sp+30h] [bp-44Ch]@24
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > listLinkItem; // [sp+34h] [bp-448h]@5
  NETCOMMAND netcmd; // [sp+40h] [bp-43Ch]@3
  int nCnt; // [sp+44h] [bp-438h]@10
  int i; // [sp+48h] [bp-434h]@3
  PROTO_NC_ACT_WHISPER_REQ kProto; // [sp+4Ch] [bp-430h]@3
  SHINE_ITEM_STRUCT LinkItem[10]; // [sp+64h] [bp-418h]@10
  int v31; // [sp+478h] [bp-4h]@6

  v3 = pcChat;
  v4 = this;
  v23 = this;
  v22 = pcChat;
  if ( !pcChat || !*pcChat )
    return;
  v5 = this->m_spWorldMgrNet.m_pObject;
  netcmd.protocol = 8204;
  PgNet::AddNetMsg((PgNet *)&v5->vfptr, &netcmd, 2);
  kProto.receiver = kToChar;
  i = strlen(pcChat);
  if ( i > 128 )
    i = 128;
  listLinkItem._Mysize = 0;
  v6 = (std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *)operator new(0x70u);
  if ( !v6 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v7 = v6;
  v6->_Next = v6;
  listLinkItem._Myhead = v6;
  v6->_Prev = v6;
  v8 = v4->m_pkChatDisplayWin;
  v31 = 0;
  if ( v8 )
  {
    v9 = ChatDisplayWin2::GetLinkItemList(v8, &result);
    LOBYTE(v31) = 1;
    std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::_Assign_rv(&listLinkItem, v9);
    LOBYTE(v31) = 0;
    std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~list<ItemViewDummy *,std::allocator<ItemViewDummy *>>((std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)&result);
    if ( listLinkItem._Mysize )
    {
      memset((char *)LinkItem, 0, 0x406u);
      v19 = pcChat;
      nCnt = (int)&v17;
      std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>(
        &v17,
        &listLinkItem);
      if ( !GameFrameWork::ItemNameIsCorrect(v17, v19) )
      {
        std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~list<ItemViewDummy *,std::allocator<ItemViewDummy *>>((std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)&listLinkItem);
        return;
      }
      v7 = listLinkItem._Myhead;
      v11 = listLinkItem._Myhead->_Next;
      nCnt = 0;
      if ( v11 != listLinkItem._Myhead )
      {
        v12 = LinkItem;
        do
        {
          ++nCnt;
          qmemcpy(&v12->itemattr, &v11->_Myval.itemattr, sizeof(v12->itemattr));
          v12->itemid = v11->_Myval.itemid;
          v11 = v11->_Next;
          ++v12;
        }
        while ( v11 != v7 );
        v4 = v23;
        v3 = v22;
      }
      v19 = (char *)22;
      v18 = &kProto;
      v13 = (PgNet *)&v4->m_spWorldMgrNet.m_pObject->vfptr;
      kProto.itemLinkDataCount = nCnt;
      kProto.len = i;
      PgNet::AddNetMsg(v13, &kProto, 22);
      PgNet::AddNetMsg((PgNet *)&v4->m_spWorldMgrNet.m_pObject->vfptr, v3, (unsigned __int8)kProto.len);
      if ( nCnt > 0 )
      {
        v14 = LinkItem;
        i = nCnt;
        do
        {
          PgNet::AddNetMsg((PgNet *)&v4->m_spWorldMgrNet.m_pObject->vfptr, v14, 103);
          ++v14;
          --i;
        }
        while ( i );
      }
      v19 = 0;
      v18 = 0;
      goto LABEL_21;
    }
    v7 = listLinkItem._Myhead;
  }
  v19 = (char *)22;
  v18 = &kProto;
  v10 = (PgNet *)&v4->m_spWorldMgrNet.m_pObject->vfptr;
  kProto.itemLinkDataCount = 0;
  kProto.len = i;
  PgNet::AddNetMsg(v10, &kProto, 22);
  v19 = (char *)(unsigned __int8)kProto.len;
  v18 = (PROTO_NC_ACT_WHISPER_REQ *)pcChat;
LABEL_21:
  PgNet::SendNetMsg((PgNet *)&v4->m_spWorldMgrNet.m_pObject->vfptr, v18, (int)v19);
  v15 = v7->_Next;
  v7->_Next = v7;
  v7->_Prev = v7;
  if ( v15 != v7 )
  {
    do
    {
      v16 = v15->_Next;
      operator delete(v15);
      v15 = v16;
    }
    while ( v16 != v7 );
  }
  operator delete(v7);
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (004C0910) --------------------------------------------------------
void __thiscall GameFrameWork::NcActPartyChatReq(GameFrameWork *this, char *pcChat)
{
  char *v2; // edi@1
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@3
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v5; // eax@5
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v6; // ebx@6
  ChatDisplayWin2 *v7; // ecx@6
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *v8; // eax@7
  PgNet *v9; // ecx@9
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v10; // eax@13
  SHINE_ITEM_STRUCT *v11; // edx@14
  PgNet *v12; // ecx@17
  SHINE_ITEM_STRUCT *v13; // edi@18
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v14; // eax@21
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v15; // esi@22
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > v16; // [sp-10h] [bp-478h]@10
  PROTO_NC_ACT_PARTYCHAT_REQ *v17; // [sp-8h] [bp-470h]@9
  char *v18; // [sp-4h] [bp-46Ch]@9
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > result; // [sp+10h] [bp-458h]@7
  std::exception pExceptionObject; // [sp+1Ch] [bp-44Ch]@24
  GameFrameWork *v21; // [sp+28h] [bp-440h]@1
  char *_What; // [sp+2Ch] [bp-43Ch]@24
  char *v23; // [sp+30h] [bp-438h]@1
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > listLinkItem; // [sp+34h] [bp-434h]@5
  NETCOMMAND netcmd; // [sp+40h] [bp-428h]@3
  int nCnt; // [sp+44h] [bp-424h]@10
  int i; // [sp+48h] [bp-420h]@3
  PROTO_NC_ACT_PARTYCHAT_REQ kProto; // [sp+4Ch] [bp-41Ch]@9
  SHINE_ITEM_STRUCT LinkItem[10]; // [sp+50h] [bp-418h]@10
  int v30; // [sp+464h] [bp-4h]@6

  v2 = pcChat;
  v3 = this;
  v21 = this;
  v23 = pcChat;
  if ( !pcChat || !*pcChat )
    return;
  v4 = this->m_spWorldMgrNet.m_pObject;
  netcmd.protocol = 8212;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
  i = strlen(pcChat);
  if ( i > 128 )
    i = 128;
  listLinkItem._Mysize = 0;
  v5 = (std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *)operator new(0x70u);
  if ( !v5 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v6 = v5;
  v5->_Next = v5;
  listLinkItem._Myhead = v5;
  v5->_Prev = v5;
  v7 = v3->m_pkChatDisplayWin;
  v30 = 0;
  if ( v7 )
  {
    v8 = ChatDisplayWin2::GetLinkItemList(v7, &result);
    LOBYTE(v30) = 1;
    std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::_Assign_rv(&listLinkItem, v8);
    LOBYTE(v30) = 0;
    std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~list<ItemViewDummy *,std::allocator<ItemViewDummy *>>((std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)&result);
    if ( listLinkItem._Mysize )
    {
      memset((char *)LinkItem, 0, 0x406u);
      v18 = pcChat;
      nCnt = (int)&v16;
      std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>(
        &v16,
        &listLinkItem);
      if ( !GameFrameWork::ItemNameIsCorrect(v16, v18) )
      {
        std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~list<ItemViewDummy *,std::allocator<ItemViewDummy *>>((std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)&listLinkItem);
        return;
      }
      v6 = listLinkItem._Myhead;
      v10 = listLinkItem._Myhead->_Next;
      nCnt = 0;
      if ( v10 != listLinkItem._Myhead )
      {
        v11 = LinkItem;
        do
        {
          ++nCnt;
          qmemcpy(&v11->itemattr, &v10->_Myval.itemattr, sizeof(v11->itemattr));
          v11->itemid = v10->_Myval.itemid;
          v10 = v10->_Next;
          ++v11;
        }
        while ( v10 != v6 );
        v3 = v21;
        v2 = v23;
      }
      v18 = (char *)2;
      v17 = &kProto;
      v12 = (PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr;
      kProto.itemLinkDataCount = nCnt;
      kProto.len = i;
      PgNet::AddNetMsg(v12, &kProto, 2);
      PgNet::AddNetMsg((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, v2, (unsigned __int8)kProto.len);
      if ( nCnt > 0 )
      {
        v13 = LinkItem;
        i = nCnt;
        do
        {
          PgNet::AddNetMsg((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, v13, 103);
          ++v13;
          --i;
        }
        while ( i );
      }
      v18 = 0;
      v17 = 0;
      goto LABEL_21;
    }
    v6 = listLinkItem._Myhead;
  }
  v18 = (char *)2;
  kProto.len = i;
  v9 = (PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr;
  kProto.itemLinkDataCount = 0;
  PgNet::AddNetMsg(v9, &kProto, 2);
  v18 = (char *)(unsigned __int8)kProto.len;
  v17 = (PROTO_NC_ACT_PARTYCHAT_REQ *)pcChat;
LABEL_21:
  PgNet::SendNetMsg((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, v17, (int)v18);
  v14 = v6->_Next;
  v6->_Next = v6;
  v6->_Prev = v6;
  if ( v14 != v6 )
  {
    do
    {
      v15 = v14->_Next;
      operator delete(v14);
      v14 = v15;
    }
    while ( v15 != v6 );
  }
  operator delete(v6);
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (004C0BF0) --------------------------------------------------------
void __thiscall GameFrameWork::NcGuildChatReq(GameFrameWork *this, char *pcChat)
{
  char *v2; // edi@1
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@3
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v5; // eax@5
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v6; // ebx@6
  ChatDisplayWin2 *v7; // ecx@6
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *v8; // eax@7
  PgNet *v9; // ecx@9
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v10; // eax@13
  SHINE_ITEM_STRUCT *v11; // edx@14
  PgNet *v12; // ecx@17
  SHINE_ITEM_STRUCT *v13; // edi@18
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v14; // eax@21
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v15; // esi@22
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > v16; // [sp-10h] [bp-478h]@10
  PROTO_NC_GUILD_CHAT_REQ *v17; // [sp-8h] [bp-470h]@9
  char *v18; // [sp-4h] [bp-46Ch]@9
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > result; // [sp+10h] [bp-458h]@7
  std::exception pExceptionObject; // [sp+1Ch] [bp-44Ch]@24
  GameFrameWork *v21; // [sp+28h] [bp-440h]@1
  char *_What; // [sp+2Ch] [bp-43Ch]@24
  char *v23; // [sp+30h] [bp-438h]@1
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > listLinkItem; // [sp+34h] [bp-434h]@5
  NETCOMMAND netcmd; // [sp+40h] [bp-428h]@3
  int nCnt; // [sp+44h] [bp-424h]@10
  int i; // [sp+48h] [bp-420h]@3
  PROTO_NC_GUILD_CHAT_REQ kProto; // [sp+4Ch] [bp-41Ch]@9
  SHINE_ITEM_STRUCT LinkItem[10]; // [sp+50h] [bp-418h]@10
  int v30; // [sp+464h] [bp-4h]@6

  v2 = pcChat;
  v3 = this;
  v21 = this;
  v23 = pcChat;
  if ( !pcChat || !*pcChat )
    return;
  v4 = this->m_spWorldMgrNet.m_pObject;
  netcmd.protocol = 29811;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
  i = strlen(pcChat);
  if ( i > 128 )
    i = 128;
  listLinkItem._Mysize = 0;
  v5 = (std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *)operator new(0x70u);
  if ( !v5 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v6 = v5;
  v5->_Next = v5;
  listLinkItem._Myhead = v5;
  v5->_Prev = v5;
  v7 = v3->m_pkChatDisplayWin;
  v30 = 0;
  if ( v7 )
  {
    v8 = ChatDisplayWin2::GetLinkItemList(v7, &result);
    LOBYTE(v30) = 1;
    std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::_Assign_rv(&listLinkItem, v8);
    LOBYTE(v30) = 0;
    std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~list<ItemViewDummy *,std::allocator<ItemViewDummy *>>((std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)&result);
    if ( listLinkItem._Mysize )
    {
      memset((char *)LinkItem, 0, 0x406u);
      v18 = pcChat;
      nCnt = (int)&v16;
      std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>(
        &v16,
        &listLinkItem);
      if ( !GameFrameWork::ItemNameIsCorrect(v16, v18) )
      {
        std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~list<ItemViewDummy *,std::allocator<ItemViewDummy *>>((std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)&listLinkItem);
        return;
      }
      v6 = listLinkItem._Myhead;
      v10 = listLinkItem._Myhead->_Next;
      nCnt = 0;
      if ( v10 != listLinkItem._Myhead )
      {
        v11 = LinkItem;
        do
        {
          ++nCnt;
          qmemcpy(&v11->itemattr, &v10->_Myval.itemattr, sizeof(v11->itemattr));
          v11->itemid = v10->_Myval.itemid;
          v10 = v10->_Next;
          ++v11;
        }
        while ( v10 != v6 );
        v3 = v21;
        v2 = v23;
      }
      v18 = (char *)2;
      v17 = &kProto;
      v12 = (PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr;
      kProto.itemLinkDataCount = nCnt;
      kProto.len = i;
      PgNet::AddNetMsg(v12, &kProto, 2);
      PgNet::AddNetMsg((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, v2, (unsigned __int8)kProto.len);
      if ( nCnt > 0 )
      {
        v13 = LinkItem;
        i = nCnt;
        do
        {
          PgNet::AddNetMsg((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, v13, 103);
          ++v13;
          --i;
        }
        while ( i );
      }
      v18 = 0;
      v17 = 0;
      goto LABEL_21;
    }
    v6 = listLinkItem._Myhead;
  }
  v18 = (char *)2;
  kProto.len = i;
  v9 = (PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr;
  kProto.itemLinkDataCount = 0;
  PgNet::AddNetMsg(v9, &kProto, 2);
  v18 = (char *)(unsigned __int8)kProto.len;
  v17 = (PROTO_NC_GUILD_CHAT_REQ *)pcChat;
LABEL_21:
  PgNet::SendNetMsg((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, v17, (int)v18);
  v14 = v6->_Next;
  v6->_Next = v6;
  v6->_Prev = v6;
  if ( v14 != v6 )
  {
    do
    {
      v15 = v14->_Next;
      operator delete(v14);
      v14 = v15;
    }
    while ( v15 != v6 );
  }
  operator delete(v6);
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (004C0ED0) --------------------------------------------------------
void __thiscall GameFrameWork::NcGuildAcademyChatReq(GameFrameWork *this, char *pcChat)
{
  char *v2; // edi@1
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@3
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v5; // eax@5
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v6; // ebx@6
  ChatDisplayWin2 *v7; // ecx@6
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *v8; // eax@7
  PgNet *v9; // ecx@9
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v10; // eax@13
  SHINE_ITEM_STRUCT *v11; // edx@14
  PgNet *v12; // ecx@17
  SHINE_ITEM_STRUCT *v13; // edi@18
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v14; // eax@21
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v15; // esi@22
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > v16; // [sp-10h] [bp-478h]@10
  PROTO_NC_GUILD_ACADEMY_CHAT_REQ *v17; // [sp-8h] [bp-470h]@9
  char *v18; // [sp-4h] [bp-46Ch]@9
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > result; // [sp+10h] [bp-458h]@7
  std::exception pExceptionObject; // [sp+1Ch] [bp-44Ch]@24
  GameFrameWork *v21; // [sp+28h] [bp-440h]@1
  char *_What; // [sp+2Ch] [bp-43Ch]@24
  char *v23; // [sp+30h] [bp-438h]@1
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > listLinkItem; // [sp+34h] [bp-434h]@5
  NETCOMMAND netcmd; // [sp+40h] [bp-428h]@3
  int nCnt; // [sp+44h] [bp-424h]@10
  int i; // [sp+48h] [bp-420h]@3
  PROTO_NC_GUILD_ACADEMY_CHAT_REQ kProto; // [sp+4Ch] [bp-41Ch]@9
  SHINE_ITEM_STRUCT LinkItem[10]; // [sp+50h] [bp-418h]@10
  int v30; // [sp+464h] [bp-4h]@6

  v2 = pcChat;
  v3 = this;
  v21 = this;
  v23 = pcChat;
  if ( !pcChat || !*pcChat )
    return;
  v4 = this->m_spWorldMgrNet.m_pObject;
  netcmd.protocol = -26520;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
  i = strlen(pcChat);
  if ( i > 128 )
    i = 128;
  listLinkItem._Mysize = 0;
  v5 = (std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *)operator new(0x70u);
  if ( !v5 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v6 = v5;
  v5->_Next = v5;
  listLinkItem._Myhead = v5;
  v5->_Prev = v5;
  v7 = v3->m_pkChatDisplayWin;
  v30 = 0;
  if ( v7 )
  {
    v8 = ChatDisplayWin2::GetLinkItemList(v7, &result);
    LOBYTE(v30) = 1;
    std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::_Assign_rv(&listLinkItem, v8);
    LOBYTE(v30) = 0;
    std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~list<ItemViewDummy *,std::allocator<ItemViewDummy *>>((std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)&result);
    if ( listLinkItem._Mysize )
    {
      memset((char *)LinkItem, 0, 0x406u);
      v18 = pcChat;
      nCnt = (int)&v16;
      std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>(
        &v16,
        &listLinkItem);
      if ( !GameFrameWork::ItemNameIsCorrect(v16, v18) )
      {
        std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~list<ItemViewDummy *,std::allocator<ItemViewDummy *>>((std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)&listLinkItem);
        return;
      }
      v6 = listLinkItem._Myhead;
      v10 = listLinkItem._Myhead->_Next;
      nCnt = 0;
      if ( v10 != listLinkItem._Myhead )
      {
        v11 = LinkItem;
        do
        {
          ++nCnt;
          qmemcpy(&v11->itemattr, &v10->_Myval.itemattr, sizeof(v11->itemattr));
          v11->itemid = v10->_Myval.itemid;
          v10 = v10->_Next;
          ++v11;
        }
        while ( v10 != v6 );
        v3 = v21;
        v2 = v23;
      }
      v18 = (char *)2;
      v17 = &kProto;
      v12 = (PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr;
      kProto.itemLinkDataCount = nCnt;
      kProto.len = i;
      PgNet::AddNetMsg(v12, &kProto, 2);
      PgNet::AddNetMsg((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, v2, (unsigned __int8)kProto.len);
      if ( nCnt > 0 )
      {
        v13 = LinkItem;
        i = nCnt;
        do
        {
          PgNet::AddNetMsg((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, v13, 103);
          ++v13;
          --i;
        }
        while ( i );
      }
      v18 = 0;
      v17 = 0;
      goto LABEL_21;
    }
    v6 = listLinkItem._Myhead;
  }
  v18 = (char *)2;
  kProto.len = i;
  v9 = (PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr;
  kProto.itemLinkDataCount = 0;
  PgNet::AddNetMsg(v9, &kProto, 2);
  v18 = (char *)(unsigned __int8)kProto.len;
  v17 = (PROTO_NC_GUILD_ACADEMY_CHAT_REQ *)pcChat;
LABEL_21:
  PgNet::SendNetMsg((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, v17, (int)v18);
  v14 = v6->_Next;
  v6->_Next = v6;
  v6->_Prev = v6;
  if ( v14 != v6 )
  {
    do
    {
      v15 = v14->_Next;
      operator delete(v14);
      v14 = v15;
    }
    while ( v15 != v6 );
  }
  operator delete(v6);
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (004C11B0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MAP_LOGOUT_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // edi@1
  unsigned __int16 v4; // ax@1
  Char *v5; // eax@5
  Char *v6; // esi@5
  Effect *v7; // eax@10
  MobViewInfo *v8; // eax@12
  mhInfoWin *v9; // edi@22
  MobViewInfo *v10; // eax@27
  EffectObjectMgr *v11; // eax@33
  unsigned __int16 kHandleNumDummy; // [sp+10h] [bp-14h]@1
  ShineObjectHandleUnion shineOBhandle; // [sp+14h] [bp-10h]@1
  int v15; // [sp+20h] [bp-4h]@1

  v3 = this;
  NiStepBoolKey::NiStepBoolKey((NiDX9SourceTextureData *)&shineOBhandle);
  v4 = *(_WORD *)pvData;
  v15 = 0;
  shineOBhandle.sohu_Handle = v4;
  switch ( ShineObjectHandleUnion::sohu_HandleSplit(&shineOBhandle, &kHandleNumDummy) )
  {
    case 1:
      if ( !DropItemMgr::Remove(&g_kDropItemMgr, *(_WORD *)pvData) )
        ICharDeadEvent::CheckEventExistOnQueue(DEventType_DropItem, *(_WORD *)pvData, 1);
      goto LABEL_35;
    case 3:
      CMiniHouseMgr::Remove((CMiniHouseMgr *)&g_kMiniHouseMgr, *(_WORD *)pvData);
      goto LABEL_35;
    case 2:
    case 4:
    case 5:
    case 8:
    case 0xA:
    case 0xB:
    case 0xC:
      v5 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)pvData);
      v6 = v5;
      if ( v5 )
      {
        if ( !(unsigned __int8)((int (__thiscall *)(Char *))v5->vfptr[1].Affect)(v5)
          && !Char::IsNPC(v6)
          && !Char::IsResource(v6)
          && Char::IsLinkGate(v6) )
        {
          v7 = EffectMgr::FindAuraEffect(&g_kEffectMgr, *(_WORD *)pvData);
          if ( v7 )
            EffectMgr::RemoveEffect(&g_kEffectMgr, v7);
        }
        v8 = MobViewInfoTab::GetByID(v6->m_kCharShape.m_kMobID);
        if ( v8 && !strcmp(v8->InxName, "KQ_G_Boss") )
          MiniMapWin::Remove_KQ_MOB(v3->m_pkMiniMapWin, 1);
        if ( Char::IsNPC(v6) )
          MiniMapWin::RemoveNPC(v3->m_pkMiniMapWin, v6->m_kHandle);
        DecalMgr::RemoveCharDecal(&stru_B26354, v6->m_kHandle);
        MiniMapWin::RemoveKQTeamMark(v3->m_pkMiniMapWin, v6->m_kHandle);
      }
      if ( nowState )
      {
        MiniHouseIndoor::DelObjSeatInfo(&g_kWorld.m_MiniHouseIndoorMode, *(_WORD *)pvData);
        MiniHouseIndoor::DelJoinCharInfo(&g_kWorld.m_MiniHouseIndoorMode, *(_WORD *)pvData);
        if ( nowState == 5 && unk_A9943C == 2 )
        {
          MiniHouseIndoor::CancelPickObj(&g_kWorld.m_MiniHouseIndoorMode);
          MainChar::SetTargetChar((MainChar *)g_pkMainChar, 0);
        }
        v9 = v3->m_pkMHInfoWin;
        if ( v9 )
        {
          mhInfoWin::RefreshGuestPage(v9);
          mhInfoWin::RefreshInfoPage(v9);
        }
      }
      if ( !v6 )
        goto LABEL_29;
      if ( !(unsigned __int8)((int (__thiscall *)(Char *))v6->vfptr[1].Affect)(v6) || Char::IsNPC(v6) )
      {
        if ( !(unsigned __int8)((int (__thiscall *)(Char *))v6->vfptr[20].DeleteAbStateByAbstateIndex)(v6) )
        {
LABEL_29:
          CharMgr::DeleteChar(&g_kCharMgr, (PROTO_NC_MAP_LOGOUT_CMD *)pvData);
          goto LABEL_35;
        }
      }
      else
      {
        v10 = MobViewInfoTab::GetByID(v6->m_kCharShape.m_kMobID);
        if ( !v10 || MobNoFadeInTab::IsNoFadeIn(v10->InxName) )
          goto LABEL_29;
      }
      CharMgr::AddFadeOutDeleteChar(&g_kCharMgr, v6);
LABEL_35:
      v15 = -1;
      ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&shineOBhandle);
      return iRevBytes;
    case 6:
      MagicField::DeleteMagicField(*(_WORD *)pvData);
      goto LABEL_35;
    case 9:
      v11 = EffectObjectMgr::GetMgr();
      if ( v11 )
        EffectObjectMgr::RemoveAllEffectObject(v11);
      goto LABEL_35;
    default:
      goto LABEL_35;
  }
}

//----- (004C1490) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_BRIEFINFO_EFFECTBLAST_CMD(int iRevBytes, void *pvData)
{
  EffectObjectMgr *v3; // eax@1

  v3 = EffectObjectMgr::GetMgr();
  if ( v3 )
    EffectObjectMgr::AddEffectObject(v3, (PROTO_NC_BRIEFINFO_EFFECTBLAST_CMD *)pvData);
  return iRevBytes;
}

//----- (004C14B0) --------------------------------------------------------
int __stdcall GameFrameWork::On_NC_BRIEFINFO_EFFECT_CMD(int iRevBytes, void *pvData)
{
  EffectObjectMgr *v3; // eax@1
  int v4; // esi@2
  EffectObjectMgr *pEffectObjectMgr; // [sp+0h] [bp-4h]@1

  v3 = EffectObjectMgr::GetMgr();
  pEffectObjectMgr = v3;
  if ( v3 )
  {
    v4 = 0;
    if ( *(_BYTE *)pvData )
    {
      while ( 1 )
      {
        EffectObjectMgr::AddEffectObject(v3, (PROTO_NC_BRIEFINFO_EFFECTBLAST_CMD *)((char *)pvData + 1));
        if ( ++v4 >= *(_BYTE *)pvData )
          break;
        v3 = pEffectObjectMgr;
      }
    }
  }
  return iRevBytes;
}

//----- (004C1500) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_BUILDING_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  const char *v4; // eax@2
  const char *v5; // eax@3
  char *v6; // eax@3
  int v7; // eax@3
  const char *v8; // eax@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v9; // ecx@3
  NiUnsharedGeometryGroup *v10; // eax@8
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Right; // [sp+18h] [bp-2Ch]@3
  int v13; // [sp+40h] [bp-4h]@3

  v3 = this;
  if ( *(_WORD *)pvData == 4481 )
  {
    v5 = (const char *)((int (*)(void))this->m_pkMHJoinWin->m_spEdit[1].m_pObject->vfptr[113].__vecDelDtor)();
    v3->m_pkMHInfoWin->m_MaxPersonCount = atoi(v5);
    v6 = (char *)((int (*)(void))v3->m_pkMHJoinWin->m_spEdit[0].m_pObject->vfptr[113].__vecDelDtor)();
    mhInfoWin::SetTitle(v3->m_pkMHInfoWin, v6, 0);
    v7 = ((int (*)(void))v3->m_pkMHJoinWin->m_spEdit[3].m_pObject->vfptr[113].__vecDelDtor)();
    ((void (__stdcall *)(int))v3->m_pkMHInfoWin->m_pkTextFieldWin[3]->vfptr[118].__vecDelDtor)(v7);
    v8 = (const char *)((int (*)(void))v3->m_pkMHJoinWin->m_spEdit[2].m_pObject->vfptr[113].__vecDelDtor)();
    _Right._Myres = 15;
    _Right._Mysize = 0;
    _Right._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Right, v8, strlen(v8));
    v9 = &v3->m_pkMHInfoWin->m_PassWord;
    v13 = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(v9, &_Right, 0, 0xFFFFFFFF);
    v13 = -1;
    if ( _Right._Myres >= 0x10 )
      operator delete(_Right._Bx._Ptr);
    _Right._Myres = 15;
    _Right._Mysize = 0;
    _Right._Bx._Buf[0] = 0;
    GameFrameWork::OnCloseJoinWin(v3);
    if ( unk_A96B31 && unk_A96B30 && CNSTimer_Interval::IsRun_GetCount(&stru_A96B34, Timer::ms_fCurTime) )
    {
      CNSTimer_Interval::ReSet(&stru_A96B34, Timer::ms_fCurTime);
      unk_A96B31 = 0;
      v10 = TextData::Get(0x4241667Au);
      GameFrameWork::AddSysMsg(v3, (const char *)v10);
      GameFrameWork::NcMiscHideExceptMeCmd(v3, 0);
    }
  }
  else
  {
    v4 = ErrMsgTable::GetErrMsg(*(_WORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v4);
    unk_A99590 = 0;
  }
  return iRevBytes;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004C16E0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_LOGINCOMPLETE_ACK(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  mhEditRoomWin *v4; // ebx@2
  char *v5; // eax@2
  char v6; // dl@3
  unsigned int v7; // ebx@4
  NiUnsharedGeometryGroup *v8; // eax@7
  int v9; // ST00_4@8
  char *v10; // eax@8
  const char *v11; // eax@11
  char *v12; // eax@13
  const char *v13; // eax@13
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v14; // ecx@13
  Char *RoomMaster; // [sp+10h] [bp-34h]@6
  char *Lev; // [sp+14h] [bp-30h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Right; // [sp+18h] [bp-2Ch]@13
  int v19; // [sp+40h] [bp-4h]@13

  v3 = this;
  if ( *(_DWORD *)pvData == 4481 )
  {
    v4 = this->m_pkMHEditRoomWin;
    v5 = (char *)pvData + 107;
    Lev = (char *)pvData + 108;
    do
      v6 = *v5++;
    while ( v6 );
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v4->m_Tkey,
      (const char *)pvData + 107,
      v5 - Lev);
    v7 = 0;
    if ( unk_A96B2C )
    {
      do
      {
        MiniHouseIndoor::AddJoinCharInfo(
          &g_kWorld.m_MiniHouseIndoorMode,
          *(_WORD *)((char *)pvData + 2 * v7 + v7 + 141),
          *((_BYTE *)pvData + 2 * v7 + v7 + 140));
        if ( !v7 )
        {
          RoomMaster = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)((char *)pvData + 141));
          if ( RoomMaster )
          {
            v9 = *((_BYTE *)pvData + 140);
            LOWORD(Lev) = 12336;
            _itoa(v9, (char *)&Lev, 10);
            v10 = (char *)((int (*)(void))RoomMaster->vfptr[2].DeleteAbStateByAbstateIndex)();
            mhInfoWin::SetRoomMakerName(v3->m_pkMHInfoWin, v10);
          }
          else
          {
            v8 = TextData2::Get(0x21292B8Cu);
            GameFrameWork::AddSysMsg(v3, (const char *)v8);
          }
        }
        ++v7;
      }
      while ( v7 < unk_A96B2C );
    }
  }
  else
  {
    v11 = ErrMsgTable::GetErrMsg(*(_DWORD *)pvData);
    GameFrameWork::AddSysMsg(v3, v11);
  }
  ((void (__stdcall *)(char *))v3->m_pkMHInfoWin->m_pkTextFieldWin[3]->vfptr[118].__vecDelDtor)((char *)pvData + 6);
  v3->m_pkMHInfoWin->m_NowPersonCount = *((_BYTE *)pvData + 139);
  v3->m_pkMHInfoWin->m_bItemView = *((_BYTE *)pvData + 5) != 0;
  v3->m_pkMHInfoWin->m_MaxPersonCount = *((_BYTE *)pvData + 4);
  if ( unk_A9943C == 2 )
  {
    v12 = (char *)((int (*)(void))v3->m_pkMHJoinWin->m_spEdit[0].m_pObject->vfptr[113].__vecDelDtor)();
    mhInfoWin::SetTitle(v3->m_pkMHInfoWin, v12, 0);
    v13 = (const char *)((int (*)(void))v3->m_pkMHJoinWin->m_spEdit[2].m_pObject->vfptr[113].__vecDelDtor)();
    _Right._Myres = 15;
    _Right._Mysize = 0;
    _Right._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Right, v13, strlen(v13));
    v14 = &v3->m_pkMHInfoWin->m_PassWord;
    v19 = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(v14, &_Right, 0, 0xFFFFFFFF);
    v19 = -1;
    if ( _Right._Myres >= 0x10 )
      operator delete(_Right._Bx._Ptr);
    _Right._Myres = 15;
    _Right._Mysize = 0;
    _Right._Bx._Buf[0] = 0;
    GameFrameWork::OnCloseJoinWin(v3);
  }
  GameFrameWork::OpenMHInfoWin(v3, 0);
  GameFrameWork::OpenPlayGuideWin(v3, BIL_MINIHOME_1);
  return iRevBytes;
}

//----- (004C1950) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_MINIHOUSE_MODIFY_TITLE_CMD(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@1

  v3 = this;
  strncpy(dest, (char *)pvData, 0x14u);
  mhInfoWin::SetTitle(v3->m_pkMHInfoWin, (char *)pvData, 0);
  ((void (__stdcall *)(void *))v3->m_pkMHSettingWin->m_spEdit[0].m_pObject->vfptr[115].__vecDelDtor)(pvData);
  mhInfoWin::RefreshInfoPage(v3->m_pkMHInfoWin);
  v4 = TextData2::Get(0x2E328F88u);
  GameFrameWork::AddSysMsg(v3, (const char *)v4);
  return iRevBytes;
}

//----- (004C19C0) --------------------------------------------------------
void __thiscall GameFrameWork::NcRaidChatReq(GameFrameWork *this, char *pcChat)
{
  char *v2; // edi@1
  GameFrameWork *v3; // esi@1
  Net *v4; // ecx@3
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v5; // eax@5
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v6; // ebx@6
  ChatDisplayWin2 *v7; // ecx@6
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *v8; // eax@7
  PgNet *v9; // ecx@9
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v10; // eax@13
  SHINE_ITEM_STRUCT *v11; // edx@14
  PgNet *v12; // ecx@17
  SHINE_ITEM_STRUCT *v13; // edi@18
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v14; // eax@21
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v15; // esi@22
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > v16; // [sp-10h] [bp-478h]@10
  PROTO_NC_RAID_CHAT_REQ *v17; // [sp-8h] [bp-470h]@9
  char *v18; // [sp-4h] [bp-46Ch]@9
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > result; // [sp+10h] [bp-458h]@7
  std::exception pExceptionObject; // [sp+1Ch] [bp-44Ch]@24
  GameFrameWork *v21; // [sp+28h] [bp-440h]@1
  char *_What; // [sp+2Ch] [bp-43Ch]@24
  char *v23; // [sp+30h] [bp-438h]@1
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > listLinkItem; // [sp+34h] [bp-434h]@5
  NETCOMMAND netcmd; // [sp+40h] [bp-428h]@3
  int nCnt; // [sp+44h] [bp-424h]@10
  int i; // [sp+48h] [bp-420h]@3
  PROTO_NC_RAID_CHAT_REQ kProto; // [sp+4Ch] [bp-41Ch]@9
  SHINE_ITEM_STRUCT LinkItem[10]; // [sp+50h] [bp-418h]@10
  int v30; // [sp+464h] [bp-4h]@6

  v2 = pcChat;
  v3 = this;
  v21 = this;
  v23 = pcChat;
  if ( !pcChat || !*pcChat )
    return;
  v4 = this->m_spWorldMgrNet.m_pObject;
  netcmd.protocol = -20417;
  PgNet::AddNetMsg((PgNet *)&v4->vfptr, &netcmd, 2);
  i = strlen(pcChat);
  if ( i > 128 )
    i = 128;
  listLinkItem._Mysize = 0;
  v5 = (std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *)operator new(0x70u);
  if ( !v5 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v6 = v5;
  v5->_Next = v5;
  listLinkItem._Myhead = v5;
  v5->_Prev = v5;
  v7 = v3->m_pkChatDisplayWin;
  v30 = 0;
  if ( v7 )
  {
    v8 = ChatDisplayWin2::GetLinkItemList(v7, &result);
    LOBYTE(v30) = 1;
    std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::_Assign_rv(&listLinkItem, v8);
    LOBYTE(v30) = 0;
    std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~list<ItemViewDummy *,std::allocator<ItemViewDummy *>>((std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)&result);
    if ( listLinkItem._Mysize )
    {
      memset((char *)LinkItem, 0, 0x406u);
      v18 = pcChat;
      nCnt = (int)&v16;
      std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>(
        &v16,
        &listLinkItem);
      if ( !GameFrameWork::ItemNameIsCorrect(v16, v18) )
      {
        std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~list<ItemViewDummy *,std::allocator<ItemViewDummy *>>((std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)&listLinkItem);
        return;
      }
      v6 = listLinkItem._Myhead;
      v10 = listLinkItem._Myhead->_Next;
      nCnt = 0;
      if ( v10 != listLinkItem._Myhead )
      {
        v11 = LinkItem;
        do
        {
          ++nCnt;
          qmemcpy(&v11->itemattr, &v10->_Myval.itemattr, sizeof(v11->itemattr));
          v11->itemid = v10->_Myval.itemid;
          v10 = v10->_Next;
          ++v11;
        }
        while ( v10 != v6 );
        v3 = v21;
        v2 = v23;
      }
      v18 = (char *)2;
      v17 = &kProto;
      v12 = (PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr;
      kProto.itemLinkDataCount = nCnt;
      kProto.nChatLen = i;
      PgNet::AddNetMsg(v12, &kProto, 2);
      PgNet::AddNetMsg((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, v2, (unsigned __int8)kProto.nChatLen);
      if ( nCnt > 0 )
      {
        v13 = LinkItem;
        i = nCnt;
        do
        {
          PgNet::AddNetMsg((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, v13, 103);
          ++v13;
          --i;
        }
        while ( i );
      }
      v18 = 0;
      v17 = 0;
      goto LABEL_21;
    }
    v6 = listLinkItem._Myhead;
  }
  v18 = (char *)2;
  kProto.nChatLen = i;
  v9 = (PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr;
  kProto.itemLinkDataCount = 0;
  PgNet::AddNetMsg(v9, &kProto, 2);
  v18 = (char *)(unsigned __int8)kProto.nChatLen;
  v17 = (PROTO_NC_RAID_CHAT_REQ *)pcChat;
LABEL_21:
  PgNet::SendNetMsg((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, v17, (int)v18);
  v14 = v6->_Next;
  v6->_Next = v6;
  v6->_Prev = v6;
  if ( v14 != v6 )
  {
    do
    {
      v15 = v14->_Next;
      operator delete(v14);
      v14 = v15;
    }
    while ( v15 != v6 );
  }
  operator delete(v6);
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (004C1CA0) --------------------------------------------------------
void __thiscall GameFrameWork::NcRaidWarningReq(GameFrameWork *this, char *pcChat)
{
  char *v2; // edi@1
  GameFrameWork *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@3
  Net *v5; // ecx@7
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v6; // eax@9
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v7; // ebx@10
  ChatDisplayWin2 *v8; // ecx@10
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *v9; // eax@11
  PgNet *v10; // ecx@13
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v11; // eax@16
  SHINE_ITEM_STRUCT *v12; // edx@17
  PgNet *v13; // ecx@20
  SHINE_ITEM_STRUCT *v14; // edi@21
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v15; // eax@24
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v16; // esi@25
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > v17; // [sp-10h] [bp-478h]@14
  PROTO_NC_RAID_CHAT_REQ *v18; // [sp-8h] [bp-470h]@13
  char *v19; // [sp-4h] [bp-46Ch]@13
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > result; // [sp+10h] [bp-458h]@11
  std::exception pExceptionObject; // [sp+1Ch] [bp-44Ch]@27
  GameFrameWork *v22; // [sp+28h] [bp-440h]@1
  char *_What; // [sp+2Ch] [bp-43Ch]@27
  char *v24; // [sp+30h] [bp-438h]@1
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > listLinkItem; // [sp+34h] [bp-434h]@9
  NETCOMMAND netcmd; // [sp+40h] [bp-428h]@7
  int nCnt; // [sp+44h] [bp-424h]@14
  int i; // [sp+48h] [bp-420h]@7
  PROTO_NC_RAID_CHAT_REQ kProto; // [sp+4Ch] [bp-41Ch]@13
  SHINE_ITEM_STRUCT LinkItem[10]; // [sp+50h] [bp-418h]@14
  int v31; // [sp+464h] [bp-4h]@10

  v2 = pcChat;
  v3 = this;
  v22 = this;
  v24 = pcChat;
  if ( !g_kRaidinfo.m_bIsMeRaidLeader && !g_kRaidinfo.m_bIsMeRaidSubLeader )
  {
    v4 = TextData2::Get(0x1E9E7454u);
    GameFrameWork::AddSysMsg(v3, (const char *)v4);
    return;
  }
  if ( pcChat && *pcChat )
  {
    v5 = this->m_spWorldMgrNet.m_pObject;
    netcmd.protocol = -20414;
    PgNet::AddNetMsg((PgNet *)&v5->vfptr, &netcmd, 2);
    i = strlen(pcChat);
    if ( i > 128 )
      i = 128;
    listLinkItem._Mysize = 0;
    v6 = (std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *)operator new(0x70u);
    if ( !v6 )
    {
      _What = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&_What);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
    v7 = v6;
    v6->_Next = v6;
    listLinkItem._Myhead = v6;
    v6->_Prev = v6;
    v8 = v3->m_pkChatDisplayWin;
    v31 = 0;
    if ( v8 )
    {
      v9 = ChatDisplayWin2::GetLinkItemList(v8, &result);
      LOBYTE(v31) = 1;
      std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::_Assign_rv(&listLinkItem, v9);
      LOBYTE(v31) = 0;
      std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~list<ItemViewDummy *,std::allocator<ItemViewDummy *>>((std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)&result);
      if ( listLinkItem._Mysize )
      {
        memset((char *)LinkItem, 0, 0x406u);
        v19 = pcChat;
        nCnt = (int)&v17;
        std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>(
          &v17,
          &listLinkItem);
        if ( !GameFrameWork::ItemNameIsCorrect(v17, v19) )
        {
          std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~list<ItemViewDummy *,std::allocator<ItemViewDummy *>>((std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)&listLinkItem);
          return;
        }
        v7 = listLinkItem._Myhead;
        v11 = listLinkItem._Myhead->_Next;
        nCnt = 0;
        if ( v11 != listLinkItem._Myhead )
        {
          v12 = LinkItem;
          do
          {
            ++nCnt;
            qmemcpy(&v12->itemattr, &v11->_Myval.itemattr, sizeof(v12->itemattr));
            v12->itemid = v11->_Myval.itemid;
            v11 = v11->_Next;
            ++v12;
          }
          while ( v11 != v7 );
          v3 = v22;
          v2 = v24;
        }
        v19 = (char *)2;
        v18 = &kProto;
        v13 = (PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr;
        kProto.itemLinkDataCount = nCnt;
        kProto.nChatLen = i;
        PgNet::AddNetMsg(v13, &kProto, 2);
        PgNet::AddNetMsg((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, v2, (unsigned __int8)kProto.nChatLen);
        if ( nCnt > 0 )
        {
          v14 = LinkItem;
          i = nCnt;
          do
          {
            PgNet::AddNetMsg((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, v14, 103);
            ++v14;
            --i;
          }
          while ( i );
        }
        v19 = 0;
        v18 = 0;
        goto LABEL_24;
      }
      v7 = listLinkItem._Myhead;
    }
    v19 = (char *)2;
    kProto.nChatLen = i;
    v10 = (PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr;
    kProto.itemLinkDataCount = 0;
    PgNet::AddNetMsg(v10, &kProto, 2);
    v19 = (char *)(unsigned __int8)kProto.nChatLen;
    v18 = (PROTO_NC_RAID_CHAT_REQ *)pcChat;
LABEL_24:
    PgNet::SendNetMsg((PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr, v18, (int)v19);
    v15 = v7->_Next;
    v7->_Next = v7;
    v7->_Prev = v7;
    if ( v15 != v7 )
    {
      do
      {
        v16 = v15->_Next;
        operator delete(v15);
        v15 = v16;
      }
      while ( v16 != v7 );
    }
    operator delete(v7);
  }
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (004C1FA0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SCENARIO_AREAENTRY_REQ(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  AreaInfoMgr *v4; // eax@1
  Name8 v6; // [sp-28h] [bp-30h]@1
  int v7; // [sp-8h] [bp-10h]@1
  int v8; // [sp-4h] [bp-Ch]@1

  v3 = this;
  v4 = AreaInfoMgr::GetInstance();
  v8 = -1;
  v7 = 1;
  v4->m_pkFrameWork = (PgFrameWork *)v3;
  qmemcpy(&v6, pvData, sizeof(v6));
  AreaInfoMgr::AddRequestAreaTest(v4, v6, v7, v8);
  return iRevBytes;
}

//----- (004C1FE0) --------------------------------------------------------
int __thiscall GameFrameWork::On_NC_SCENARIO_AREALEAVE_REQ(GameFrameWork *this, int iRevBytes, void *pvData)
{
  GameFrameWork *v3; // esi@1
  AreaInfoMgr *v4; // eax@1
  Name8 v6; // [sp-28h] [bp-30h]@1
  int v7; // [sp-8h] [bp-10h]@1
  int v8; // [sp-4h] [bp-Ch]@1

  v3 = this;
  v4 = AreaInfoMgr::GetInstance();
  v8 = -1;
  v7 = 2;
  v4->m_pkFrameWork = (PgFrameWork *)v3;
  qmemcpy(&v6, pvData, sizeof(v6));
  AreaInfoMgr::AddRequestAreaTest(v4, v6, v7, v8);
  return iRevBytes;
}

//----- (004C2020) --------------------------------------------------------
int __userpurge GameFrameWork::ProcessNetMsg@<eax>(GameFrameWork *this@<ecx>, double a2@<st0>, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  GameFrameWork *v6; // ebx@1
  int v7; // edi@1
  int v8; // eax@5
  unsigned int v9; // edi@47
  CClientQuest *v10; // eax@51
  CClientQuest *v11; // eax@52
  NiUnsharedGeometryGroup *v12; // eax@328
  NiUnsharedGeometryGroup *v13; // eax@432
  CClientQuest *v14; // eax@452
  PartyWinInterface *v15; // ecx@611

  v6 = this;
  v7 = 0;
  if ( ITask::ProcessNetMsgAll(iDepart, iCommand, iRevBytes, pvData) )
    v7 = iRevBytes;
  switch ( iDepart )
  {
    case 2:
      switch ( iCommand )
      {
        case 69:
          return GameFrameWork::On_NC_MISC_GET_CHAT_BLOCK_SPAM_FILTER_CMD(v6, iRevBytes, pvData);
        case 72:
          return GameFrameWork::On_NC_MISC_CHAT_BLOCK_SPAMER_BLOCKTIME_CMD(v6, iRevBytes, pvData);
        case 16:
          return GameFrameWork::On_MISC_RESTMINUTE_CMD(v6, iRevBytes, pvData);
        case 18:
          *((_DWORD *)pvData + 2) = timeGetTime();
          return iRevBytes;
        case 19:
          return GameFrameWork::On_NC_MISC_PINGTEST_TOOL_WM_CLIENT_ZONE_DB(v6, iRevBytes, pvData);
        case 66:
          return GameFrameWork::On_NC_MISC_MISCERROR_CMD(v6, iRevBytes, pvData);
        case 73:
          return GameFrameWork::On_NC_MISC_SERVER_TIME_NOTIFY_CMD(iRevBytes, pvData);
        case 96:
          return GameFrameWork::On_NC_MISC_SPAMMER_REPORT_ACK(v6, iRevBytes, pvData);
        case 98:
          return GameFrameWork::On_NC_MISC_SPAMMER_CHAT_BAN_ACK(v6, iRevBytes, pvData);
        case 103:
          return GameFrameWork::On_NC_MISC_SPAMMER_RELEASE_CHAT_BAN_ACK(v6, iRevBytes, pvData);
        case 108:
          return GameFrameWork::On_NC_MISC_EVENTNPC_STANDSTART_CLIENT_CMD(v6, iRevBytes, pvData);
        case 109:
          return GameFrameWork::On_NC_MISC_EVENTNPC_STANDEND_CLIENT_CMD(v6, iRevBytes, pvData);
        case 111:
          return GameFrameWork::On_NC_MISC_ITEMSHOP_URL_ACK(v6, iRevBytes, pvData);
        default:
          return v7;
      }
      return v7;
    case 45:
      if ( iCommand == 13 )
        return GameFrameWork::On_NC_USER_CONNECTION_CHANGE_CHAR_ID_CMD(v6, iRevBytes, pvData);
      if ( iCommand == 19 )
        return GameFrameWork::On_NC_USER_CONNECTION_CHANGE_CHAR_ID_ITEM_USE_ACK(v6, iRevBytes, pvData);
      return v7;
    case 3:
      switch ( iCommand )
      {
        case 23:
          return GameFrameWork::On_NC_USER_CONNECTCUT_CMD(v6, iRevBytes, pvData);
        case 20:
          return GameFrameWork::On_NC_USER_LOGINWORLD_ACK(v6, (int)v6, v7, iRevBytes, pvData);
        case 21:
          v6->m_bBackCharSelect = 0;
          return v7;
        case 52:
          return GameFrameWork::On_NC_USER_WILL_WORLD_SELECT_ACK(v6, iRevBytes, pvData);
        default:
          return v7;
      }
      return v7;
    case 28:
      if ( iCommand == 60 )
      {
$LN762:
        v7 = iRevBytes;
      }
      else
      {
        if ( iCommand == 68 )
          return GameFrameWork::On_NC_CHAR_OPTION_IMPROVE_INIT_KEYMAP_ACK(v6, iRevBytes, pvData);
        if ( iCommand == 70 )
          return GameFrameWork::On_NC_CHAR_OPTION_IMPROVE_INIT_GAMEOPTION_ACK(v6, iRevBytes, pvData);
      }
      return v7;
    case 4:
      if ( iCommand <= 323 )
      {
        if ( iCommand == 323 )
          return GameFrameWork::On_NC_CHAR_ANI_FILE_CHECK_CMD(iRevBytes, pvData);
        switch ( iCommand )
        {
          case 51:
            return GameFrameWork::On_NC_CHAR_CENCHANGE_CMD(iRevBytes, pvData);
          case 52:
            User::ChangeParam(&g_kUser, (PROTO_NC_CHAR_BASEPARAMCHANGE_CMD *)pvData);
            return iRevBytes;
          case 53:
            return GameFrameWork::On_NC_CHAR_CHANGEPARAMCHANGE_CMD(v6, iRevBytes, pvData);
          case 77:
            return GameFrameWork::On_NC_CHAR_DEADMENU_CMD(v6, iRevBytes, pvData);
          case 79:
            return GameFrameWork::On_NC_MAP_LINKSAME_CMD(v6, (int)v6, iRevBytes, pvData);
          case 80:
            return GameFrameWork::On_NC_MAP_LINKOTHER_CMD(v6, iRevBytes, pvData);
          case 89:
            return GameFrameWork::On_NC_CHAR_PROMOTE_ACK(v6, iRevBytes, pvData);
          case 90:
            return GameFrameWork::On_NC_CHAR_SOMEONEPROMOTE_CMD(v6, iRevBytes, pvData);
          case 91:
            unk_A97D74 = *(_BYTE *)pvData;
            return iRevBytes;
          case 110:
            return GameFrameWork::On_NC_CHAR_SOMEONEGUILDCHANGE_CMD(iRevBytes, pvData);
          case 150:
            return GameFrameWork::On_NC_CHAR_SOMEONEGUILDACADEMYCHANGE_CMD(iRevBytes, pvData);
          case 74:
            return GameFrameWork::On_NC_CHAR_CLIENT_CHARGEDBUFF_CMD(v6, iRevBytes, pvData);
          case 111:
            v9 = *(_DWORD *)pvData;
            User::GetMainCharBaseData(&g_kUser)->fame = v9;
            return iRevBytes;
          case 175:
            return GameFrameWork::On_NC_CHAR_POLYMORPH_CMD(iRevBytes, pvData);
          case 190:
            return GameFrameWork::On_NC_CHAR_CLIENT_AUTO_PICK_CMD(v6, v7, iRevBytes, pvData);
          case 189:
            return GameFrameWork::On_NC_CHAR_CLIENT_AUTO_PICK_ACK(v6, iRevBytes, pvData);
          case 206:
            v10 = QuestDataMgr::GetQuest();
            CQuest::Recv_NC_CHAR_QUEST_READ_CMD_ACK((CQuest *)&v10->vfptr, (PROTO_NC_CHAR_QUEST_READ_CMD *)pvData);
            return iRevBytes;
          case 215:
            v11 = QuestDataMgr::GetQuest();
            CQuest::Recv_NC_CHAR_QUEST_REPEAT_CMD_ACK((CQuest *)&v11->vfptr, (PROTO_NC_CHAR_QUEST_REPEAT_CMD *)pvData);
            return iRevBytes;
          case 212:
            return GameFrameWork::On_NC_CHAR_MYSTERYVAULT_UI_STATE_CMD(v6, iRevBytes, pvData);
          case 198:
            return GameFrameWork::On_NC_CHAR_ADMIN_LEVEL_INFORM_CMD(v6, iRevBytes, pvData);
          case 217:
            return GameFrameWork::On_NC_CHAR_CLIENT_NEWBIE_GUIDE_VIEW_LIST_CMD(v6, iRevBytes, pvData);
          case 223:
            return GameFrameWork::On_NC_CHAR_CHANGEBYCONDITION_PARAM_CMD(v6, iRevBytes, pvData);
          case 228:
            return GameFrameWork::On_NC_CHAR_CLIENT_CARDCOLLECT_CMD(v6, iRevBytes, pvData);
          case 231:
            return GameFrameWork::On_NC_CHAR_CLIENT_CARDCOLLECT_BOOKMARK_CMD(v6, iRevBytes, pvData);
          case 234:
            return GameFrameWork::On_NC_CHAR_CLIENT_CARDCOLLECT_REWARD_CMD(v6, iRevBytes, pvData);
          case 237:
            return GameFrameWork::On_NC_CHAR_EVENT_ATTENDANCE_LIST_CLIENT_CMD(v6, iRevBytes, pvData);
          case 240:
            return GameFrameWork::On_NC_CHAR_EVENT_ATTENDANCE_CHECK_CMD(v6, v7, iRevBytes, pvData);
          case 245:
            return GameFrameWork::On_NC_CHAR_EVENT_ATTENDANCE_CHANGE_DAY_CMD(v6, iRevBytes, pvData);
          case 246:
            return GameFrameWork::On_NC_CHER_EVENT_ATTENDANCE_CHANGE_START_CMD(v6, iRevBytes, pvData);
          case 242:
            return GameFrameWork::On_NC_CHAR_EVENT_ATTENDANCE_REWARD_ACK(v6, iRevBytes, pvData);
          case 278:
            return GameFrameWork::On_NC_CHAR_TUTORIAL_STEP_REQ(iRevBytes, pvData);
          case 291:
            return GameFrameWork::On_NC_CHAR_USEITEM_MINIMON_INFO_CLIENT_CMD(v6, iRevBytes, pvData);
          case 293:
            return GameFrameWork::On_NC_CHAR_USEITEM_MINIMON_NORMAL_ITEM_ON_ACK(v6, iRevBytes, pvData);
          case 295:
            MinimonAutoItemUseWin::SetAutoUseBuffItem(v6->m_pkMinimonAutoItemUseWin, 0);
            return iRevBytes;
          case 297:
            return GameFrameWork::On_NC_CHAR_USEITEM_MINIMON_CHARGED_ITEM_ON_ACK(v6, iRevBytes, pvData);
          case 299:
            MinimonAutoItemUseWin::SetAutoUseChargedItem(v6->m_pkMinimonAutoItemUseWin, 0);
            return iRevBytes;
          case 300:
            return GameFrameWork::On_NC_CHAR_USEITEM_MINIMON_USE_BROAD_CMD(v6, iRevBytes, pvData);
          case 301:
            return GameFrameWork::On_NC_CHAR_USEITEM_MINIMON_NOTICE_CMD(v6, iRevBytes, pvData);
          case 303:
            return GameFrameWork::On_NC_CHAR_CHARGEDBUFF_ERASE_ACK(v6, iRevBytes, pvData);
          default:
            return v7;
        }
      }
      return v7;
    case 42:
      switch ( iCommand )
      {
        case 2:
          return GameFrameWork::On_NC_CHAT_RESTRICT_LIST_CMD(v6, iRevBytes, pvData);
        case 6:
          return GameFrameWork::On_NC_CHAT_RESTRICT_ADD_ACK(v6, iRevBytes, pvData);
        case 10:
          return GameFrameWork::On_NC_CHAT_RESTRICT_DEL_ACK(v6, iRevBytes, pvData);
        case 14:
          return GameFrameWork::On_NC_CHAT_RESTRICT_DEL_ALL_ACK(v6, iRevBytes, pvData);
        default:
          return v7;
      }
      return v7;
    case 24:
      if ( iCommand == 2 )
        return GameFrameWork::On_NC_CT_SET_CURRENT_ACK(v6, iRevBytes, pvData);
      if ( iCommand == 3 )
        return GameFrameWork::On_NC_CT_SET_SOMEONECHANGE_CMD(iRevBytes, pvData);
      if ( iCommand == 4 )
        return GameFrameWork::On_NC_CT_SET_CMD(v6, iRevBytes, pvData);
      return v7;
    case 26:
      switch ( iCommand )
      {
        case 2:
          return GameFrameWork::On_NC_BOOTH_OPEN_ACK(v6, v7, iRevBytes, pvData);
        case 5:
          return GameFrameWork::On_NC_BOOTH_CLOSE_ACK(v6, iRevBytes, pvData);
        case 17:
          PrivateStoreWin::SetPrivateStoreOpen(v6->m_pkPrivateStoreWin, 0);
          return iRevBytes;
        case 18:
          return GameFrameWork::On_NC_BOOTH_SOMEONEINTERIORSTART_CMD(v6, iRevBytes, pvData);
        case 3:
          return GameFrameWork::On_NC_BOOTH_SOMEONEOPEN_CMD(v6, v7, iRevBytes, pvData);
        case 6:
          return GameFrameWork::On_NC_BOOTH_SOMEONECLOSE_CMD(v6, iRevBytes, iRevBytes, pvData);
        case 8:
          return GameFrameWork::On_NC_BOOTH_ENTRY_SELL_ACK(v6, iRevBytes, pvData);
        case 9:
          return GameFrameWork::On_NC_BOOTH_ENTRY_BUY_ACK(v6, iRevBytes, pvData);
        case 14:
          return GameFrameWork::On_NC_BOOTH_ITEMTRADE_ACK(v6, iRevBytes, pvData);
        case 11:
          return GameFrameWork::On_NC_BOOTH_REFRESH_SELL_ACK(v6, iRevBytes, pvData);
        case 12:
          return GameFrameWork::On_NC_BOOTH_REFRESH_BUY_ACK(v6, iRevBytes, pvData);
        case 15:
          return GameFrameWork::On_NC_BOOTH_BUYREFRESH_CMD(v6, iRevBytes, pvData);
        case 20:
          return GameFrameWork::On_NC_BOOTH_SEARCH_ITEM_LIST_CATEGORIZED_ACK(v6, iRevBytes, pvData);
        case 22:
          return GameFrameWork::On_NC_BOOTH_SEARCH_BOOTH_POSITION_ACK(v6, iRevBytes, pvData);
        case 23:
          return GameFrameWork::On_NC_BOOTH_SEARCH_BOOTH_CLOSED_CMD(v6, iRevBytes, pvData);
        default:
          return v7;
      }
      return v7;
    case 6:
      switch ( iCommand )
      {
        case 9:
          return GameFrameWork::On_NC_MAP_LINKSAME_CMD(v6, (int)v6, iRevBytes, pvData);
        case 10:
          return GameFrameWork::On_NC_MAP_LINKOTHER_CMD(v6, iRevBytes, pvData);
        case 31:
          return GameFrameWork::On_NC_MAP_MULTY_LINK_CMD(v6, iRevBytes, pvData);
        case 32:
          PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v6->m_pkGateChannelWin->vfptr);
          return iRevBytes;
        case 21:
          return GameFrameWork::On_NC_MAP_WING_SAVE_ACK(v6, iRevBytes, pvData);
        case 23:
          return GameFrameWork::On_NC_MAP_WING_FLY_ACK(v6, iRevBytes, pvData);
        case 5:
          return GameFrameWork::On_NC_MAP_LOGOUT_CMD(v6, iRevBytes, pvData);
        case 18:
          return GameFrameWork::On_NC_MAP_FREEPKZONE_ON_CMD(v6, v7, iRevBytes, pvData);
        case 19:
          BYTE3(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) &= 0xFDu;
          return iRevBytes;
        case 24:
          return GameFrameWork::On_NC_MAP_PARTYBATTLEZONE_ON_CMD(v6, v7, iRevBytes, pvData);
        case 25:
          BYTE3(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) &= 0xFEu;
          return iRevBytes;
        case 40:
          BYTE3(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) |= 4u;
          return iRevBytes;
        case 41:
          BYTE3(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) &= 0xFBu;
          return iRevBytes;
        case 27:
          return GameFrameWork::On_NC_MAP_TOWNPORTAL_ACK(v6, iRevBytes, pvData);
        case 29:
          return GameFrameWork::On_NC_MAP_LINK_FAIL_CMD(v6, iRevBytes, pvData);
        case 39:
          v6->m_eFieldMapType = *(_DWORD *)pvData;
          break;
        case 42:
          GameFrameWork::On_NC_MAP_LINKEND_CLIENT_CMD(v6, iRevBytes, pvData);
          break;
        case 43:
          GameFrameWork::On_NC_MAP_CAN_USE_REVIVEITEM_CMD(v6, iRevBytes, pvData);
          break;
        case 44:
          MiniMapWin::ViewInDunLevelFlag(v6->m_pkMiniMapWin, *(ID_LEVEL_TYPE *)pvData);
          break;
        default:
          return v7;
      }
      return v7;
    case 7:
      switch ( iCommand )
      {
        case 6:
          return GameFrameWork::On_NC_BRIEFINFO_LOGINCHARACTER_CMD(v6, iRevBytes, pvData);
        case 7:
          return GameFrameWork::On_NC_BRIEFINFO_CHARACTER_CMD(v6, iRevBytes, pvData);
        case 9:
          return GameFrameWork::On_NC_BRIEFINFO_MOB_CMD(v6, iRevBytes, pvData);
        case 8:
          return GameFrameWork::On_NC_BRIEFINFO_REGENMOB_CMD(v6, iRevBytes, pvData);
        case 2:
          return GameFrameWork::On_NC_BRIEFINFO_CHANGEDECORATE_CMD(v6, iRevBytes, pvData);
        case 3:
          return GameFrameWork::On_NC_BRIEFINFO_CHANGEUPGRADE_CMD(v6, iRevBytes, pvData);
        case 4:
          return GameFrameWork::On_NC_BRIEFINFO_UNEQUIP_CMD(v6, iRevBytes, pvData);
        case 11:
          return GameFrameWork::On_NC_BRIEFINFO_ITEMONFIELD_CMD(iRevBytes, pvData);
        case 10:
          return GameFrameWork::On_NC_BRIEFINFO_DROPEDITEM_CMD(v6, iRevBytes, pvData);
        case 12:
          return GameFrameWork::On_NC_BRIEFINFO_MAGICFIELDSPREAD_CMD(iRevBytes, pvData);
        case 13:
          return GameFrameWork::On_NC_BRIEFINFO_MAGICFIELDINFO_CMD(iRevBytes, pvData);
        case 5:
          return GameFrameWork::On_NC_BRIEFINFO_CHANGEWEAPON_CMD(v6, iRevBytes, pvData);
        case 14:
          return GameFrameWork::On_NC_BRIEFINFO_BRIEFINFODELETE_CMD(v6, iRevBytes, pvData);
        case 15:
          return GameFrameWork::On_NC_BRIEFINFO_BUILDDOOR_CMD(iRevBytes, pvData);
        case 16:
          return GameFrameWork::On_NC_BRIEFINFO_DOOR_CMD(iRevBytes, pvData);
        case 17:
          return GameFrameWork::On_NC_BRIEFINFO_EFFECTBLAST_CMD(iRevBytes, pvData);
        case 18:
          return GameFrameWork::On_NC_BRIEFINFO_EFFECT_CMD(iRevBytes, pvData);
        case 19:
          CMiniHouseMgr::AddInfo((CMiniHouseMgr *)&g_kMiniHouseMgr, (PROTO_NC_BRIEFINFO_MINIHOUSEBUILD_CMD *)pvData);
          return iRevBytes;
        case 20:
          return GameFrameWork::On_NC_BRIEFINFO_MINIHOUSE_CMD(iRevBytes, pvData);
        case 24:
          return GameFrameWork::On_NC_BRIEFINFO_ABSTATE_CHANGE_CMD(iRevBytes, pvData);
        case 25:
          return GameFrameWork::On_NC_BRIEFINFO_ABSTATE_CHANGE_LIST_CMD(iRevBytes, pvData);
        case 26:
          CharMgr::AddMover(&g_kCharMgr, (PROTO_NC_BRIEFINFO_REGENMOVER_CMD *)pvData);
          return iRevBytes;
        case 27:
          CharMgr::AddMover(&g_kCharMgr, (PROTO_NC_BRIEFINFO_MOVER_CMD *)pvData);
          return iRevBytes;
        case 28:
          CharMgr::AddPet(&g_kCharMgr, (PROTO_NC_BRIEFINFO_REGENPET_CMD *)pvData);
          return iRevBytes;
        case 29:
          CharMgr::AddPet(&g_kCharMgr, (PROTO_NC_BRIEFINFO_PET_CMD *)pvData);
          goto $LN762;
        default:
          return v7;
      }
      return v7;
    case 8:
      switch ( iCommand )
      {
        case 4:
        case 6:
          goto $LN762;
        case 2:
          return GameFrameWork::On_NC_ACT_SOMEONECHAT_CMD(v6, iRevBytes, pvData);
        case 24:
          return GameFrameWork::On_NC_ACT_SOMEONEMOVEWALK_CMD(v6, (int)v6, iRevBytes, iRevBytes, pvData);
        case 26:
          return GameFrameWork::On_NC_ACT_SOMEONEMOVERUN_CMD(v6, (int)v6, iRevBytes, iRevBytes, pvData);
        case 27:
          return GameFrameWork::On_NC_ACT_MOVEFAIL_ACK(iRevBytes, pvData);
        case 9:
          return GameFrameWork::On_NC_ACT_SOMEONECHANGEMODE_CMD(v6, iRevBytes, pvData);
        case 19:
          return GameFrameWork::On_NC_ACT_SOMEONESTOP_CMD(v6, iRevBytes, pvData);
        case 17:
          return GameFrameWork::On_NC_ACT_NOTICE_CMD(v6, iRevBytes, pvData);
        case 31:
          return GameFrameWork::On_NC_ACT_SOMEONESHOUT_CMD(v6, iRevBytes, pvData);
        case 13:
          return GameFrameWork::On_NC_ACT_SOMEONEWHISPER_CMD(v6, iRevBytes, pvData);
        case 14:
          return GameFrameWork::On_NC_ACT_WHISPERFAIL_ACK(v6, iRevBytes, pvData);
        case 15:
          return GameFrameWork::On_NC_ACT_WHISPERSUCCESS_ACK(v6, iRevBytes, pvData);
        case 21:
          return GameFrameWork::On_NC_ACT_PARTYCHAT_CMD(v6, iRevBytes, pvData);
        case 22:
          return GameFrameWork::On_NC_ACT_PARTYCHAT_ACK(v6, iRevBytes, pvData);
        case 28:
          return GameFrameWork::On_NC_ACT_NPCMENUOPEN_REQ(v6, iRevBytes, pvData);
        case 37:
          return GameFrameWork::On_NC_ACT_SOMEEONEJUMP_CMD(iRevBytes, pvData);
        case 33:
          return GameFrameWork::On_NC_ACT_SOMEONEEMOTICON_CMD(iRevBytes, pvData);
        case 35:
          return GameFrameWork::On_NC_ACT_SOMEONEEMOTICONSTOP_CMD(v6, v7, iRevBytes, pvData);
        case 38:
          return GameFrameWork::On_NC_ACT_SOMEONESPEEDCHANGE_CMD(iRevBytes, pvData);
        case 41:
          return GameFrameWork::On_NC_ACT_SOMEONEPITCHTENT_CMD(iRevBytes, pvData);
        case 44:
          return GameFrameWork::On_NC_ACT_SOMEONEFOLDTENT_CMD(iRevBytes, pvData);
        case 40:
          return GameFrameWork::On_NC_ACT_PITCHTENT_ACK(v6, iRevBytes, pvData);
        case 43:
          return GameFrameWork::On_NC_ACT_FOLDTENT_ACK(iRevBytes, pvData);
        case 61:
          GameFrameWork::ChangeCampMode(0, 4);
          return iRevBytes;
        case 62:
          return GameFrameWork::On_NC_ACT_MOVESPEED_CMD(iRevBytes, pvData);
        case 63:
          return GameFrameWork::On_NC_ACT_RIDE_ON_CMD(v6, iRevBytes, pvData);
        case 64:
          return GameFrameWork::On_NC_ACT_SOMEONERIDE_ON_CMD(v6, iRevBytes, pvData);
        case 66:
          return GameFrameWork::On_NC_ACT_RIDE_OFF_CMD(v6, iRevBytes, pvData);
        case 67:
          return GameFrameWork::On_NC_ACT_SOMEONERIDE_OFF_CMD(v6, iRevBytes, pvData);
        case 65:
          return GameFrameWork::On_NC_ACT_RIDE_FAIL_CMD(v6, iRevBytes, pvData);
        case 70:
          return GameFrameWork::On_NC_ACT_RIDE_HUNGRY_CMD(v6, iRevBytes, pvData);
        case 71:
          return GameFrameWork::On_NC_ACT_CREATECASTBAR(v6, iRevBytes, pvData);
        case 72:
          CastingProgressWin::CastingFail(v6->m_pkCastingProgressBar);
          return iRevBytes;
        case 73:
          return GameFrameWork::On_NC_ACT_REINFORCE_RUN_CMD(v6, iRevBytes, iRevBytes, pvData);
        case 74:
          return GameFrameWork::On_NC_ACT_REINFORCE_STOP_CMD(iRevBytes, pvData);
        case 77:
          return GameFrameWork::On_NC_ACT_REINFORCE_WALK_CMD(iRevBytes, pvData);
        case 76:
          return GameFrameWork::On_NC_ACT_ROAR_ACK(v6, iRevBytes, pvData);
        case 104:
          return GameFrameWork::On_NC_ACT_ACTIONBYITEM_ACK(v6, iRevBytes, pvData);
        case 105:
          return GameFrameWork::On_NC_ACT_REINFORCERELOC_CMD(iRevBytes, pvData);
        case 106:
          return GameFrameWork::On_NC_ACT_REINFORCEMOVEBYPATH_CMD(iRevBytes, pvData);
        case 111:
          return GameFrameWork::On_NC_ACT_SETITEMHEALEFFECT(iRevBytes, pvData);
        case 113:
          return GameFrameWork::On_NC_ACT_AUTO_WAY_FINDING_USE_GATE_ACK(v6, iRevBytes, pvData);
        case 114:
          return GameFrameWork::On_NC_ACT_NPC_ACTION_CMD(v6, (int)v6, iRevBytes, pvData);
        case 116:
          return GameFrameWork::On_NC_ACT_ANIMATION_START_CMD(iRevBytes, pvData);
        case 117:
          return GameFrameWork::On_NC_ACT_ANIMATION_STOP_CMD(iRevBytes, pvData);
        case 118:
          return GameFrameWork::On_NC_ACT_ANIMATION_LEVEL_CHANGE_CMD(v6, iRevBytes, pvData);
        case 130:
          return GameFrameWork::On_NC_ACT_SHOW_CINEMATIC(iRevBytes, pvData);
        case 131:
          return GameFrameWork::On_NC_ACT_END_CINEMATIC(iRevBytes, pvData);
        case 120:
          return GameFrameWork::On_NC_ACT_PLAY_SOUND_CMD(iRevBytes, pvData);
        case 119:
          return GameFrameWork::On_NC_ACT_EFFECT_MESSAGE_CMD(v6, iRevBytes, pvData);
        case 121:
          return GameFrameWork::On_NC_ACT_SCRIPT_MSG_CMD(iRevBytes, pvData);
        case 122:
          return GameFrameWork::On_NC_ACT_OBJECT_SOUND_CMD(iRevBytes, pvData);
        case 123:
          return GameFrameWork::On_NC_ACT_OBJECT_EFFECT_CMD(iRevBytes, pvData);
        case 124:
          return GameFrameWork::On_NC_ACT_EVENT_CODE_ACTION_CMD(v6, (int)v6, iRevBytes, pvData);
        default:
          return v7;
      }
      return v7;
    case 9:
      switch ( iCommand )
      {
        case 86:
          return GameFrameWork::On_NC_BAT_SUMEONESKILLCUT_CMD(iRevBytes, pvData);
        case 83:
          return GameFrameWork::On_NC_BAT_SOULCOLLECT_CMD(v6, iRevBytes, pvData);
        case 78:
          return GameFrameWork::On_NC_BAT_SKILLBASH_HIT_OBJ_START_CMD(v6, iRevBytes, pvData);
        case 79:
          return GameFrameWork::On_NC_BAT_SOMEONESKILLBASH_HIT_OBJ_START_CMD(v6, iRevBytes, pvData);
        case 80:
          return GameFrameWork::On_NC_BAT_SKILLBASH_HIT_FLD_START_CMD(v6, iRevBytes, pvData);
        case 81:
          return GameFrameWork::On_NC_BAT_SOMEONESKILLBASH_HIT_FLD_START_CMD(v6, iRevBytes, pvData);
        case 82:
          return GameFrameWork::On_NC_BAT_SKILLBASH_HIT_DAMAGE_CMD(v6, iRevBytes, pvData);
        case 87:
          return GameFrameWork::On_NC_BAT_SKILLBASH_HIT_BLAST_CMD(v6, iRevBytes, pvData);
        case 2:
          return GameFrameWork::On_NC_BAT_TARGETINFO_CMD(v6, iRevBytes, pvData);
        case 52:
          return GameFrameWork::On_NC_BAT_SKILLBASH_CAST_FAIL_ACK(v6, iRevBytes, pvData);
        case 53:
          v6->m_kSkillCasting.eState = 3;
          return iRevBytes;
        case 54:
          return GameFrameWork::On_NC_BAT_SOMEONESKILLBASH_CAST_CMD(v6, iRevBytes, pvData);
        case 56:
          return GameFrameWork::On_NC_BAT_SOMEONESKILLBASH_CASTCUT_CMD(v6, iRevBytes, pvData);
        case 57:
          return GameFrameWork::On_NC_BAT_SKILLBASH_HIT_CMD(v6, iRevBytes, pvData);
        case 58:
          return GameFrameWork::On_NC_BAT_SKILLBASH_HITTED_CMD(v6, iRevBytes, pvData);
        case 59:
          return GameFrameWork::On_NC_BAT_SOMEONESKILLBASH_HIT_CMD(v6, iRevBytes, iRevBytes, pvData);
        case 61:
          return GameFrameWork::On_NC_BAT_CEASE_FIRE_CMD(v6, (int)v6, iRevBytes, pvData);
        case 60:
          return GameFrameWork::On_NC_BAT_DOTDAMAGE_CMD(v6, iRevBytes, pvData);
        case 66:
          return GameFrameWork::On_NC_BAT_SOMEONESKILLBASH_OBJ_CAST_CMD(v6, iRevBytes, pvData);
        case 67:
          return GameFrameWork::On_NC_BAT_SOMEONESKILLBASH_FLD_CAST_CMD(v6, iRevBytes, pvData);
        case 11:
          return GameFrameWork::On_NC_BAT_EXPGAIN_CMD(v6, iRevBytes, pvData);
        case 12:
          return GameFrameWork::On_NC_BAT_LEVELUP_CMD(v6, iRevBytes, pvData);
        case 13:
          return GameFrameWork::On_NC_BAT_SOMEONELEVELUP_CMD(v6, iRevBytes, pvData);
        case 14:
          return GameFrameWork::On_NC_BAT_HPCHANGE_CMD(v6, iRevBytes, pvData);
        case 15:
          return GameFrameWork::On_NC_BAT_SPCHANGE_CMD(v6, iRevBytes, pvData);
        case 16:
          User::SetAP(&g_kUser, *(_DWORD *)pvData);
          return iRevBytes;
        case 17:
          return GameFrameWork::On_NC_BAT_EXPLOST_CMD(v6, iRevBytes, pvData);
        case 39:
          return GameFrameWork::On_NC_BAT_ABSTATESET_CMD(v6, iRevBytes, pvData);
        case 41:
          return GameFrameWork::On_NC_BAT_ABSTATEINFORM_CMD(v6, iRevBytes, pvData);
        case 40:
          return GameFrameWork::On_NC_BAT_ABSTATERESET_CMD(v6, iRevBytes, pvData);
        case 42:
          return GameFrameWork::On_NC_BAT_ABSTATEINFORM_NOEFFECT_CMD(v6, iRevBytes, pvData);
        case 63:
          return GameFrameWork::On_NC_BAT_ASSIST_ACK(v6, iRevBytes, pvData);
        case 69:
          return GameFrameWork::On_NC_BAT_SKILLBASH_CASTABORT_ACK(v6, iRevBytes, pvData);
        case 70:
          return GameFrameWork::On_NC_BAT_FAMEGAIN_CMD(iRevBytes, pvData);
        case 71:
          return GameFrameWork::On_NC_BAT_SWING_START_CMD(v6, iRevBytes, pvData);
        case 72:
          return GameFrameWork::On_NC_BAT_SWING_DAMAGE_CMD(v6, iRevBytes, pvData);
        case 73:
          return GameFrameWork::On_NC_BAT_SOMEONESWING_DAMAGE_CMD(iRevBytes, pvData);
        case 74:
          return GameFrameWork::ON_NC_BAT_REALLYKILL_CMD(iRevBytes, pvData);
        case 85:
          GameFrameWork::On_NC_BAT_ABSTATE_ERASE_ACK(v6, iRevBytes, pvData);
          return v7;
        case 75:
          return GameFrameWork::On_NC_BAT_PKINPKFIELD_CLIENT_CMD(iRevBytes, pvData);
        case 77:
          return GameFrameWork::On_NC_BAT_TARGETCHANGE_CMD(v6, iRevBytes, pvData);
        case 89:
          return GameFrameWork::On_NC_BAT_CLIENT_MOB_KILL_ANNOUNCE_CMD(v6, iRevBytes, pvData);
        case 90:
          return GameFrameWork::On_NC_BAT_AREADOTDAMAGE_CMD(v6, iRevBytes, pvData);
        case 91:
          return GameFrameWork::On_NC_BAT_REFLECTIONDAMAGE_CMD(v6, iRevBytes, pvData);
        case 92:
          return GameFrameWork::On_NC_BAT_TOGGLESKILL_ON_CMD(v6, iRevBytes, pvData);
        case 93:
          return GameFrameWork::On_NC_BAT_TOGGLESKILL_OFF_CMD(v6, iRevBytes, pvData);
        case 94:
          return GameFrameWork::On_NC_BAT_SKILLBLAST_LIGHTNINGWAVE_CMD(v6, iRevBytes, pvData);
        case 95:
          return GameFrameWork::On_NC_BAT_LPCHANGE_CMD(v6, iRevBytes, pvData);
        default:
          return v7;
      }
      return v7;
    case 12:
      switch ( iCommand )
      {
        case 58:
          goto $LN762;
        case 73:
          return GameFrameWork::On_NC_ITEM_EQUIP_BELONGED_CANCEL_USE_ACK(v6, iRevBytes, pvData);
        case 52:
          return GameFrameWork::On_NC_ITEM_MH_FURNITURE_ENDURE_KIT_USE_ACK(v6, iRevBytes, pvData);
        case 56:
          return GameFrameWork::On_NC_ITEM_ITEMBREAK_CMD(v6, iRevBytes, pvData);
        case 1:
          return GameFrameWork::On_NC_ITEM_CELLCHANGE_CMD(v6, iRevBytes, pvData);
        case 2:
          return GameFrameWork::On_NC_ITEM_EQUIPCHANGE_CMD(v6, iRevBytes, pvData);
        case 4:
          return GameFrameWork::On_NC_ITEM_BUY_ACK(v6, iRevBytes, pvData);
        case 5:
          return GameFrameWork::On_NC_ITEM_SELL_ACK(v6, iRevBytes, pvData);
        case 12:
          return GameFrameWork::On_NC_ITEM_RELOC_ACK(v6, iRevBytes, pvData);
        case 8:
          return GameFrameWork::On_NC_ITEM_DROP_ACK(v6, iRevBytes, pvData);
        case 10:
          return GameFrameWork::On_NC_ITEM_PICK_ACK(v6, iRevBytes, pvData);
        case 27:
          g_kInventory.m_bWaitingItemDropAck = 0;
          return iRevBytes;
        case 17:
          return GameFrameWork::On_NC_ITEM_EQUIP_ACK(v6, iRevBytes, pvData);
        case 19:
          return GameFrameWork::On_NC_ITEM_UNEQUIP_ACK(v6, iRevBytes, pvData);
        case 22:
          return GameFrameWork::On_NC_ITEM_USE_ACK(v6, iRevBytes, pvData);
        case 24:
          return GameFrameWork::On_NC_ITEM_UPGRADE_ACK(v6, iRevBytes, pvData);
        case 20:
          return GameFrameWork::On_NC_ITEM_SOMEONEPICK_CMD(v6, iRevBytes, pvData);
        case 14:
          return GameFrameWork::On_NC_ITEM_SPLIT_ACK(v6, iRevBytes, pvData);
        case 29:
          return GameFrameWork::On_NC_ITEM_DEPOSIT_ACK(v6, iRevBytes, pvData);
        case 31:
          return GameFrameWork::On_NC_ITEM_WITHDRAW_ACK(v6, iRevBytes, pvData);
        case 33:
          return GameFrameWork::On_NC_ITEM_CHARGEDINVENOPEN_ACK(v6, iRevBytes, pvData);
        case 41:
          return GameFrameWork::On_NC_ITEM_SOMEONEUSE_CMD(iRevBytes, pvData);
        case 43:
          return GameFrameWork::On_NC_ITEM_DISMANTLE_ACK(v6, iRevBytes, pvData);
        case 45:
          return GameFrameWork::On_NC_ITEM_REWARDINVENOPEN_ACK(v6, iRevBytes, pvData);
        case 46:
          return GameFrameWork::On_NC_ITEM_REWARDINVENOPENFAIL_ACK(v6, iRevBytes, pvData);
        case 59:
          return GameFrameWork::On_NC_ITEM_DICE_GAME_CMD(v6, iRevBytes, pvData);
        case 61:
          return GameFrameWork::On_NC_ITEM_DICE_GAME_START_ACK(v6, iRevBytes, pvData);
        case 62:
          return GameFrameWork::On_NC_ITEM_DICE_GAME_START_CMD(v6, iRevBytes, pvData);
        case 63:
          return GameFrameWork::On_NC_ITEM_DICE_GAME_RESULT_CMD(v6, iRevBytes, pvData);
        case 65:
          return GameFrameWork::On_NC_ITEM_ENCHANT_ADD_GEM_ACK(v6, iRevBytes, pvData);
        case 67:
          return GameFrameWork::On_NC_ITEM_ENCHANT_REMOVE_GEM_ACK(v6, iRevBytes, pvData);
        case 69:
          return GameFrameWork::On_NC_ITEM_ENCHANT_ADD_NEW_SOCKET_ACK(v6, iRevBytes, pvData);
        case 70:
          return GameFrameWork::On_NC_ITEM_ENCHANT_SET_GEM_LOT_CMD(v6, iRevBytes, pvData);
        case 75:
          return GameFrameWork::On_NC_ITEM_AUTO_ARRANGE_INVEN_ACK(v6, iRevBytes, pvData);
        case 79:
          return GameFrameWork::On_NC_ITEM_USE_ACTIVESKILL_ACK(v6, iRevBytes, pvData);
        case 82:
          return GameFrameWork::On_NC_ITEM_MOVER_UPGRADE_ACK(v6, iRevBytes, pvData);
        case 84:
          return GameFrameWork::On_NC_ITEM_RANDOMOPTION_CHANGE_ACK(v6, iRevBytes, pvData);
        case 98:
          return GameFrameWork::On_NC_ITEM_RANDOMOPTION_CHANGE_ACCEPT_ACK(v6, iRevBytes, pvData);
        case 86:
          return GameFrameWork::On_NC_ITEM_CHAT_COLOR_CHANGE_ACK(v6, iRevBytes, pvData);
        case 88:
          return GameFrameWork::On_NC_ITEM_TERMEXTEND_ACK(v6, iRevBytes, pvData);
        case 90:
          return GameFrameWork::On_NC_ITEM_REPURCHASE_ACK(v6, iRevBytes, pvData);
        case 91:
          return GameFrameWork::On_NC_ITEM_SELL_ITEM_LIST_CMD(iRevBytes, pvData);
        case 92:
          return GameFrameWork::On_NC_ITEM_SELL_ITEM_INSERT_CMD(v6, iRevBytes, pvData);
        case 93:
          return GameFrameWork::On_NC_ITEM_SELL_ITEM_DELETE_CMD(v6, iRevBytes, pvData);
        case 95:
          return GameFrameWork::On_NC_ITEM_CLASS_CHANGE_ACK(v6, iRevBytes, pvData);
        case 96:
          return GameFrameWork::On_NC_ITEM_OPENCLASSCHANGEMENU_CMD(v6, iRevBytes, pvData);
        case 104:
          return GameFrameWork::On_NC_ITEM_MAPLINK_SCROLL_ACK(v6, iRevBytes, pvData);
        case 106:
          return GameFrameWork::On_NC_ITEM_MIX_ITEM_ACK(v6, iRevBytes, pvData);
        case 108:
          return GameFrameWork::On_NC_ITEM_RANDOMOPTION_RECOVER_COUNT_LIMIT_ACK(v6, iRevBytes, pvData);
        case 110:
          return GameFrameWork::On_NC_ITEM_NEW_UPGRADE_ACK(v6, iRevBytes, pvData);
        case 112:
          return GameFrameWork::On_NC_ITEM_BRACELET_UPGRADE_ACK(v6, iRevBytes, pvData);
        default:
          return v7;
      }
      return v7;
    case 14:
      switch ( iCommand )
      {
        case 86:
          goto $LN762;
        case 3:
          return GameFrameWork::On_NC_PARTY_JOINPROPOSE_REQ(v6, iRevBytes, pvData);
        case 7:
          return GameFrameWork::On_NC_PARTY_JOIN_ACK(v6, iRevBytes, pvData);
        case 11:
          return GameFrameWork::On_NC_PARTY_LEAVE_ACK(v6, iRevBytes, pvData);
        case 21:
          return GameFrameWork::On_NC_PARTY_KICKOFF_ACK(v6, iRevBytes, pvData);
        case 30:
          return GameFrameWork::On_NC_PARTY_DISMISS_ACK(v6, iRevBytes, pvData);
        case 41:
          return GameFrameWork::On_NC_PARTY_CHANGEMASTER_ACK(v6, iRevBytes, pvData);
        case 9:
          return GameFrameWork::On_NC_PARTY_MEMBER_LIST_CMD(v6, iRevBytes, pvData);
        case 61:
          Party::MemberLogin(&g_kParty, (PROTO_NC_PARTY_LOGININFO_CMD *)pvData);
          return iRevBytes;
        case 71:
          Party::MemberLogout(&g_kParty, (PROTO_NC_PARTY_LOGOUTINFO_CMD *)pvData);
          return iRevBytes;
        case 50:
          return GameFrameWork::On_NC_PARTY_MEMBERINFORM_CMD(v6, iRevBytes, pvData);
        case 51:
          return GameFrameWork::On_NC_PARTY_MEMBERCLASS_CMD(v6, iRevBytes, pvData);
        case 73:
          return GameFrameWork::On_NC_PARTY_MEMBERLOCATION_CMD(iRevBytes, pvData);
        case 74:
          return GameFrameWork::On_NC_PARTY_MEMBERMAPOUT(iRevBytes, pvData);
        case 76:
          return GameFrameWork::On_NC_PARTY_ITEM_LOOTING_CMD(v6, iRevBytes, pvData);
        case 85:
          return GameFrameWork::On_NC_PARTY_FINDER_LIST_ACK(v6, v7, iRevBytes, pvData);
        case 81:
          return GameFrameWork::On_NC_PARTY_FINDER_ADD_ACK(v6, iRevBytes, pvData);
        case 83:
          return GameFrameWork::On_NC_PARTY_FINDER_DELETE_ACK(v6, iRevBytes, pvData);
        case 91:
          return GameFrameWork::On_NC_PARTY_SET_LOOTER_ACK(v6, iRevBytes, pvData);
        case 92:
          return GameFrameWork::On_NC_PARTY_SET_LOOTER_CMD(v6, iRevBytes, pvData);
        case 93:
          return GameFrameWork::On_NC_PARTY_SET_LOOTER_BROAD_CMD(v6, iRevBytes, pvData);
        case 95:
          return GameFrameWork::On_NC_PARTY_ITEM_JOIN_LOOTING_CMD(v6, iRevBytes, pvData);
        default:
          return v7;
      }
      return v7;
    case 15:
      switch ( iCommand )
      {
        case 6:
          goto $LN762;
        case 3:
          Market::SetWeapon((PROTO_NC_MENU_SHOPOPEN_CMD *)pvData);
          GameFrameWork::OpenShopMenu(v6);
          return iRevBytes;
        case 4:
          Market::SetSkill((PROTO_NC_MENU_SHOPOPEN_CMD *)pvData);
          GameFrameWork::OpenSkillShopMenu(v6);
          return iRevBytes;
        case 1:
          return GameFrameWork::On_NC_MENU_SERVERMENU_REQ(v6, iRevBytes, pvData);
        case 5:
          Market::SetSoulStone((PROTO_NC_MENU_SHOPOPENSOULSTONE_CMD *)pvData);
          GameFrameWork::OpenSoulStoneShopMenu(v6);
          return iRevBytes;
        case 7:
          v12 = TextData::Get(0x2E6F7494u);
          goto LABEL_329;
        case 8:
          return GameFrameWork::On_NC_MENU_OPENSTORAGE_CMD(v6, iRevBytes, pvData);
        case 9:
          Market::SetWeapon((PROTO_NC_MENU_SHOPOPENTABLE_CMD *)pvData);
          GameFrameWork::OpenShopMenu(v6);
          return iRevBytes;
        case 10:
          Market::SetSkill((PROTO_NC_MENU_SHOPOPENTABLE_CMD *)pvData);
          GameFrameWork::OpenSkillShopMenu(v6);
          return iRevBytes;
        case 11:
          return GameFrameWork::On_NC_MENU_SHOPOPENTABLE_ITEM_CMD(v6, iRevBytes, pvData);
        case 14:
          return GameFrameWork::On_NC_MENU_RANDOMOPTION_CMD(v6, iRevBytes, pvData);
        case 15:
          PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v6->m_pkServerMenuWin->vfptr);
          v7 = iRevBytes;
          break;
        case 16:
          GameFrameWork::IDRankingShowWin(v6, 1);
          v7 = iRevBytes;
          break;
        default:
          return v7;
      }
      return v7;
    case 18:
      switch ( iCommand )
      {
        case 43:
          goto $LN762;
        case 41:
          ReviveMenuWin::EnableBtns(v6->m_pkReviveMenuWin, BTN_INDEX_REVIVE_FROM_CLERIC, 1);
          return iRevBytes;
        case 4:
          return GameFrameWork::On_NC_SKILL_SKILL_LEARNSUC_CMD(v6, iRevBytes, pvData);
        case 5:
          v12 = TextData::Get(0x88A7C1D9);
          goto LABEL_329;
        case 15:
          return GameFrameWork::On_NC_SKILL_EMPOW_RESET_SUC_ACK(v6, iRevBytes, pvData);
        case 14:
          v12 = TextData::Get(0x3448756Bu);
          goto LABEL_329;
        case 20:
          return GameFrameWork::On_NC_SKILL_EMPOWALLOC_ACK(v6, iRevBytes, pvData);
        case 16:
          return GameFrameWork::On_NC_SKILL_EMPOWPOINT_CMD(v6, iRevBytes, pvData);
        case 30:
          return GameFrameWork::On_NC_SKILL_REVIVE_CMD(v6, iRevBytes, pvData);
        case 31:
          return GameFrameWork::On_NC_SKILL_SOMEONEREVIVE_CMD(iRevBytes, pvData);
        case 33:
          return GameFrameWork::On_NC_SKILL_COOLTIME_CMD(iRevBytes, pvData);
        case 35:
          return GameFrameWork::On_NC_SKILL_PRODUCTFIELD_ACK(v6, iRevBytes, pvData);
        case 39:
          return GameFrameWork::On_NC_SKILL_UNLEARN_ACK(v6, iRevBytes, pvData);
        case 40:
          return GameFrameWork::On_NC_SKILL_WARP_CMD(iRevBytes, pvData);
        case 44:
          return GameFrameWork::On_NC_SKILL_ITEMACTIONCOOLTIME_CMD(iRevBytes, pvData);
        case 45:
          return GameFrameWork::On_NC_SKILL_JUMP_CMD(iRevBytes, pvData);
        default:
          return v7;
      }
      return v7;
    case 19:
      switch ( iCommand )
      {
        case 23:
        case 33:
          goto $LN762;
        case 2:
          return GameFrameWork::On_NC_TRADE_PROPOSE_ASK_REQ(v6, iRevBytes, pvData);
        case 4:
          return GameFrameWork::On_NC_TRADE_PROPOSENO_ACK(v6, iRevBytes, pvData);
        case 8:
          return GameFrameWork::On_NC_TRADE_PROPOSE_CANCELED_CMD(v6, iRevBytes, pvData);
        case 9:
          return GameFrameWork::On_NC_TRADE_START_CMD(v6, iRevBytes, pvData);
        case 11:
          return GameFrameWork::On_NC_TRADE_CANCEL_ACK(v6, iRevBytes, pvData);
        case 12:
          return GameFrameWork::On_NC_TRADE_CANCEL_CMD(v6, iRevBytes, pvData);
        case 14:
          v12 = TextData::Get(0x4AB3818Eu);
          goto LABEL_329;
        case 15:
          return GameFrameWork::On_NC_TRADE_UPBOARD_ACK(v6, iRevBytes, pvData);
        case 16:
          return GameFrameWork::On_NC_TRADE_OPPOSITUPBOARD_CMD(iRevBytes, pvData);
        case 18:
          v12 = TextData::Get(0x94B284D5);
          goto LABEL_329;
        case 19:
          return GameFrameWork::On_NC_TRADE_DOWNBOARD_ACK(v6, iRevBytes, pvData);
        case 20:
          UserTrade::RemoveOpp(*(_BYTE *)pvData);
          return iRevBytes;
        case 22:
          v12 = TextData::Get(0x990FD9DC);
          goto LABEL_329;
        case 24:
          return GameFrameWork::On_NC_TRADE_OPPOSITCENBOARDING_CMD(v6, iRevBytes, pvData);
        case 26:
          v12 = TextData::Get(0x949676D1);
          goto LABEL_329;
        case 27:
          UserTrade::LockMy(1);
          return iRevBytes;
        case 28:
          UserTrade::LockOpp(1);
          return iRevBytes;
        case 32:
          v12 = TextData::Get(0x88E8C7C1);
          goto LABEL_329;
        case 34:
          UserTrade::AgreeOpp(1);
          return iRevBytes;
        case 36:
          return GameFrameWork::On_NC_TRADE_TRADECOMPLETE_CMD(v6, iRevBytes, pvData);
        case 35:
          return GameFrameWork::On_NC_TRADE_TRADEFAIL_CMD(v6, iRevBytes, pvData);
        case 29:
          return GameFrameWork::On_NC_TRADE_BOARDUNLOCK_CMD(v6, iRevBytes, pvData);
        case 30:
          UserTrade::LockOpp(0);
          v7 = iRevBytes;
          break;
        default:
          return v7;
      }
      return v7;
    case 20:
      switch ( iCommand )
      {
        case 3:
          return GameFrameWork::On_NC_SOULSTONE_HP_BUY_ACK(iRevBytes, pvData);
        case 4:
          return GameFrameWork::On_NC_SOULSTONE_SP_BUY_ACK(iRevBytes, pvData);
        case 5:
          v12 = TextData::Get(0xD2FCD5E1);
          goto LABEL_329;
        case 8:
          return GameFrameWork::On_NC_SOULSTONE_HP_USESUC_ACK(v6, iRevBytes, pvData);
        case 10:
          return GameFrameWork::On_NC_SOULSTONE_SP_USESUC_ACK(v6, iRevBytes, pvData);
        case 6:
          v12 = TextData::Get(0xE5FCC1DF);
          goto LABEL_329;
        case 11:
          return GameFrameWork::On_NC_SOULSTONE_HP_SOMEONEUSE_CMD(iRevBytes, pvData);
        case 12:
          return GameFrameWork::On_NC_SOULSTONE_SP_SOMEONEUSE_CMD(iRevBytes, pvData);
        default:
          return v7;
      }
      return v7;
    case 21:
      switch ( iCommand )
      {
        case 2:
          return GameFrameWork::On_NC_FRIEND_SET_ACK(v6, iRevBytes, pvData);
        case 3:
          return GameFrameWork::On_NC_FRIEND_SET_CONFIRM_REQ(v6, iRevBytes, pvData);
        case 6:
          return GameFrameWork::On_NC_FRIEND_DEL_ACK(v6, iRevBytes, pvData);
        case 7:
          return GameFrameWork::On_NC_FRIEND_LIST_CMD(v6, iRevBytes, pvData);
        case 9:
          return GameFrameWork::On_NC_FRIEND_LOGIN_CMD(v6, iRevBytes, pvData);
        case 10:
          return GameFrameWork::On_NC_FRIEND_LOGOUT_CMD(v6, iRevBytes, pvData);
        case 8:
          return GameFrameWork::On_NC_FRIEND_ADD_CMD(v6, iRevBytes, pvData);
        case 11:
          return GameFrameWork::On_NC_FRIEND_REFUSE_CMD(v6, iRevBytes, pvData);
        case 12:
          return GameFrameWork::On_NC_FRIEND_DEL_CMD(v6, iRevBytes, pvData);
        case 13:
          return GameFrameWork::On_NC_FRIEND_MAP_CMD(v6, iRevBytes, pvData);
        case 14:
          return GameFrameWork::On_NC_FRIEND_PARTY_CMD(v6, iRevBytes, pvData);
        case 15:
          return GameFrameWork::On_NC_FRIEND_LEVEL_CMD(v6, iRevBytes, pvData);
        case 30:
          return GameFrameWork::On_NC_FRIEND_POINT_ACK(v6, iRevBytes, pvData);
        case 32:
          return GameFrameWork::On_NC_FRIEND_FIND_FRIENDS_ACK(v6, iRevBytes, pvData);
        case 34:
          return GameFrameWork::On_NC_FRIEND_UES_FRIEND_POINT_ACK(v6, iRevBytes, pvData);
        case 36:
          return GameFrameWork::On_NC_FRIEND_SOMEONE_GET_SPECIALITEM_WORLD_CMD(v6, v7, iRevBytes, pvData);
        case 37:
          return GameFrameWork::On_NC_FRIEND_GET_DIFF_FRIEND_POINT_CMD(v6, iRevBytes, pvData);
        default:
          return v7;
      }
      return v7;
    case 22:
      switch ( iCommand )
      {
        case 10:
        case 12:
        case 25:
          goto $LN762;
        case 4:
          KingdomQuestWin::SetKQuestStatus(v6->m_pkKingDomQuest, (PROTO_NC_KQ_STATUS_ACK *)pvData);
          return iRevBytes;
        case 28:
          return GameFrameWork::On_NC_KQ_LIST_TIME_ACK(v6, iRevBytes, pvData);
        case 31:
          return GameFrameWork::On_NC_KQ_LIST_UPDATE_ACK(v6, iRevBytes, pvData);
        case 29:
          return GameFrameWork::On_NC_KQ_LIST_ADD_ACK(v6, iRevBytes, pvData);
        case 30:
          return GameFrameWork::On_NC_KQ_LIST_DELETE_ACK(v6, iRevBytes, pvData);
        case 6:
          return GameFrameWork::On_NC_KQ_JOIN_ACK(v6, iRevBytes, pvData);
        case 8:
          return GameFrameWork::On_NC_KQ_JOIN_CANCEL_ACK(v6, iRevBytes, pvData);
        case 11:
          return GameFrameWork::On_NC_KQ_NOTIFY_CMD(v6, iRevBytes, pvData);
        case 18:
          return GameFrameWork::On_Nc_Kq_Complete_Cmd(v6, iRevBytes, pvData);
        case 19:
          return GameFrameWork::On_Nc_Kq_Fail_Cmd(v6, iRevBytes, pvData);
        case 20:
          return GameFrameWork::On_NC_KQ_SCORE_CMD(v6, iRevBytes, pvData);
        case 24:
          return GameFrameWork::On_NC_KQ_RESTDEADNUM_CMD(v6, iRevBytes, pvData);
        case 33:
          return GameFrameWork::On_NC_KQ_SCORE_SIMPLE_CMD(v6, iRevBytes, pvData);
        case 60:
          return GameFrameWork::On_NC_KQ_SCORE_BOARD_INFO_CMD(v6, iRevBytes, pvData);
        case 35:
          return GameFrameWork::ON_NC_KQ_NOREWARD_CMD(v6, iRevBytes, pvData);
        case 34:
          return GameFrameWork::ON_NC_KQ_MOBKILLNUMBER_CMD(v6, iRevBytes, pvData);
        case 36:
          return GameFrameWork::ON_NC_KQ_JOINING_ALARM_CMD(v6, iRevBytes, pvData);
        case 37:
          return GameFrameWork::ON_NC_KQ_JOINING_ALARM_END_CMD(v6, iRevBytes, pvData);
        case 38:
          return GameFrameWork::ON_NC_KQ_JOINING_ALARM_LIST(v6, iRevBytes, pvData);
        case 40:
          return GameFrameWork::On_NC_KQ_VOTE_START_ACK(v6, iRevBytes, pvData);
        case 41:
          return GameFrameWork::On_NC_KQ_VOTE_VOTING_CMD(v6, iRevBytes, pvData);
        case 43:
          return GameFrameWork::On_NC_KQ_VOTE_VOTING_ACK(v6, iRevBytes, pvData);
        case 44:
          return GameFrameWork::On_NC_KQ_VOTE_RESULT_SUC_CMD(v6, iRevBytes, pvData);
        case 45:
          return GameFrameWork::On_NC_KQ_VOTE_RESULT_FAIL_CMD(v6, iRevBytes, pvData);
        case 46:
          return GameFrameWork::On_NC_KQ_VOTE_CANCEL_CMD(v6, iRevBytes, pvData);
        case 47:
          return GameFrameWork::On_NC_KQ_VOTE_BAN_MSG_CMD(v6, iRevBytes, pvData);
        case 48:
          v13 = TextData2::Get(0x25394A21u);
          GameFrameWork::AddSysMsg(v6, (const char *)v13);
          return iRevBytes;
        case 50:
          return GameFrameWork::On_NC_KQ_JOIN_LIST_ACK(v6, iRevBytes, pvData);
        case 53:
          return GameFrameWork::On_NC_KQ_VOTE_START_CHECK_ACK(v6, iRevBytes, pvData);
        case 54:
          return GameFrameWork::On_NC_KQ_SCORE_INFO_CMD(v6, iRevBytes, pvData);
        case 56:
          return GameFrameWork::On_NC_KQ_TEAM_SELECT_ACK(v6, iRevBytes, pvData);
        case 57:
          return GameFrameWork::On_NC_KQ_TEAM_SELECT_CMD(v6, iRevBytes, pvData);
        case 58:
          g_pkMainChar->m_byKQTeamType = *(_BYTE *)pvData;
          return iRevBytes;
        case 61:
          return GameFrameWork::On_NC_KQ_WINTER_EVENT_2014_SCORE_CMD(v6, iRevBytes, pvData);
        default:
          return v7;
      }
      return v7;
    case 23:
      if ( iCommand == 2 )
        return GameFrameWork::On_NC_WT_LICENSE_ACK(v6, iRevBytes, pvData);
      if ( iCommand == 3 )
      {
        v12 = TextData::Get(0x85F9C1CF);
LABEL_329:
        GameFrameWork::AddSysMsg(v6, (const char *)v12);
LABEL_330:
        v7 = iRevBytes;
      }
      else if ( iCommand == 13 )
      {
        Inventory::UpdateWeaponTitleWhenMobDead(&g_kInventory, *(_WORD *)pvData);
        v7 = iRevBytes;
      }
      return v7;
    case 25:
      if ( iCommand == 2 )
        return GameFrameWork::On_NC_ANNOUNCE_W2C_CMD(v6, iRevBytes, pvData);
      return v7;
    case 17:
      switch ( iCommand )
      {
        case 16:
          goto $LN762;
        case 19:
          return GameFrameWork::On_NC_QUEST_ERR(v6, iRevBytes, pvData);
        case 1:
          return GameFrameWork::On_NC_QUEST_SCRIPT_CMD_REQ(v6, iRevBytes, pvData);
        case 8:
          return GameFrameWork::On_NC_QUEST_GIVE_UP_ACK(v6, iRevBytes, pvData);
        case 12:
          v14 = QuestDataMgr::GetQuest();
          CQuest::Recv_NC_QUEST_CLIENT_SCENARIO_DONE_ACK(
            (CQuest *)&v14->vfptr,
            (PROTO_NC_QUEST_CLIENT_SCENARIO_DONE_ACK *)pvData);
          return iRevBytes;
        case 13:
          return GameFrameWork::On_NC_QUEST_NOTIFY_MOB_KILL_CMD(v6, iRevBytes, pvData);
        case 18:
          v12 = TextData::Get(0x90FCD9C7);
          goto LABEL_329;
        case 30:
          return GameFrameWork::On_NC_QUEST_RESET_TIME_CLIENT_CMD(iRevBytes, pvData);
        case 21:
          return GameFrameWork::On_NC_QUEST_START_ACK(v6, iRevBytes, pvData);
        case 23:
          return GameFrameWork::On_NC_QUEST_READ_ACK(iRevBytes, pvData);
        case 32:
          return GameFrameWork::On_NC_QUEST_JOBDUNGEON_LINK_FAIL_CMD(v6, iRevBytes, pvData);
        default:
          return v7;
      }
      return v7;
    case 27:
      switch ( iCommand )
      {
        case 2:
        case 3:
          goto $LN762;
        case 17:
          return GameFrameWork::On_NC_SCENARIO_NPCCHAT_CMD(v6, iRevBytes, pvData);
        case 18:
          return GameFrameWork::On_NC_SCENARIO_MESSAGE_CMD(iRevBytes, pvData);
        case 1:
          return GameFrameWork::On_NC_SCENARIO_RUNEFFECT_CMD(iRevBytes, pvData);
        case 4:
          return GameFrameWork::On_NC_SCENARIO_MESSAGENOTICE_CMD(v6, iRevBytes, pvData);
        case 9:
          return GameFrameWork::On_NC_SCENARIO_DOORSTATE_CMD(v6, iRevBytes, pvData);
        case 11:
          return GameFrameWork::On_NC_SCENARIO_OBJTYPECHANGE_CMD(v6, iRevBytes, pvData);
        case 5:
          return GameFrameWork::On_NC_SCENARIO_AREAENTRY_REQ(v6, iRevBytes, pvData);
        case 7:
          return GameFrameWork::On_NC_SCENARIO_AREALEAVE_REQ(v6, iRevBytes, pvData);
        case 10:
          return GameFrameWork::On_NC_SCENARIO_LIGHT_CMD(iRevBytes, pvData);
        case 12:
          return GameFrameWork::On_NC_SCENARIO_CHATWIN_CMD(v6, iRevBytes, pvData);
        case 13:
          return GameFrameWork::On_NC_SCENARIO_ANIMATE_CMD(iRevBytes, pvData);
        case 14:
          return GameFrameWork::On_NC_SCENARIO_FOG_CMD(iRevBytes, pvData);
        case 15:
          CharMgr::UpdateNpcActionEvent(&g_kCharMgr, (PROTO_NC_SCENARIO_PLAYERLIKEMOB_ANIMATE_CMD *)pvData);
          return iRevBytes;
        case 16:
          return GameFrameWork::On_NC_ONGAMENET_OX_EVENT_CMD(v6, iRevBytes, pvData);
        case 20:
          return GameFrameWork::On_NC_SCENARIO_CAMERA_MOVE_CMD(v6, iRevBytes, pvData);
        case 21:
          return GameFrameWork::On_NC_SCENARIO_SCRIPTMESSAGE_CMD(iRevBytes, pvData);
        case 22:
          return GameFrameWork::On_NC_SCENARIO_TIMER_CMD(v6, iRevBytes, pvData);
        case 23:
          return GameFrameWork::On_NC_SCENARIO_MAPMARK_CMD(v6, iRevBytes, pvData);
        case 24:
          return GameFrameWork::On_NC_SCENARIO_MAP_OBJECT_CONTROL_CMD(iRevBytes, pvData);
        case 25:
          return GameFrameWork::On_NC_SCENARIO_DIALOG_CMD(v6, iRevBytes, pvData);
        case 26:
          return GameFrameWork::On_NC_SCENARIO_TOPVIEW_CMD(v6, iRevBytes, pvData);
        case 27:
          return GameFrameWork::On_NC_SCENARIO_SYSTEM_MESSAGE_CMD(v6, iRevBytes, pvData);
        case 28:
          return GameFrameWork::On_NC_SCENARIO_HIDE_OTHER_PLAYER_CMD(v6, iRevBytes, pvData);
        case 29:
          return GameFrameWork::On_NC_SCENARIO_EFFECT_TIMER_CMD(v6, iRevBytes, pvData);
        case 30:
          return GameFrameWork::On_NC_SCENARIO_DIRECTIONAL_ARROW_CMD(iRevBytes, pvData);
        case 31:
          EffectMgr::RemoveClientEff(&g_kEffectMgr, 1u);
          return iRevBytes;
        case 32:
          return GameFrameWork::On_NC_SCENARIO_RANKING_LIST_CMD(v6, iRevBytes, pvData);
        case 33:
          return GameFrameWork::On_NC_SCENARIO_TIMER_START_CMD(v6, iRevBytes, pvData);
        case 34:
          return GameFrameWork::On_NC_SCENARIO_TIMER_END_CMD(v6, iRevBytes, pvData);
        default:
          return v7;
      }
      return v7;
    case 32:
      if ( iCommand == 2 )
        return GameFrameWork::On_NC_REPORT_ADD_ACK(v6, iRevBytes, pvData);
      if ( iCommand == 4 )
        return GameFrameWork::On_NC_REPORT_CANCEL_ACK(v6, iRevBytes, pvData);
      if ( iCommand == 6 )
        return GameFrameWork::On_NC_REPORT_GET_ACK(v6, iRevBytes, pvData);
      return v7;
    case 31:
      switch ( iCommand )
      {
        case 2:
          return GameFrameWork::On_NC_PRISON_ADD_GM_ACK(iRevBytes, pvData);
        case 3:
          return GameFrameWork::On_NC_PRISON_OK_CMD(v6, iRevBytes, pvData);
        case 5:
          return GameFrameWork::On_NC_PRISON_END_ACK(v6, iRevBytes, pvData);
        case 8:
          return GameFrameWork::On_NC_PRISON_UNDOING_CMD(iRevBytes, pvData);
        case 10:
          return GameFrameWork::On_NC_PRISON_ALTER_GM_ACK(iRevBytes, pvData);
        default:
          return v7;
      }
      return v7;
    case 29:
      switch ( iCommand )
      {
        case 117:
          return GameFrameWork::On_NC_GUILD_CHAT_ACK(v6, iRevBytes, pvData);
        case 116:
          return GameFrameWork::On_NC_GUILD_CHAT_CMD(v6, iRevBytes, pvData);
        case 146:
          return GameFrameWork::On_NC_GUILD_STORAGEOPEN_ACK(v6, iRevBytes, pvData);
        case 141:
          return GameFrameWork::ON_NC_GUILD_MOBGUILD_CMD(iRevBytes, pvData);
        default:
          return v7;
      }
      return v7;
    case 38:
      if ( iCommand == 105 )
      {
        v8 = GameFrameWork::On_NC_GUILD_ACADEMY_CHAT_CMD(v6, iRevBytes, pvData);
      }
      else if ( iCommand == 106 )
      {
        v8 = GameFrameWork::On_NC_GUILD_ACADEMY_CHAT_ACK(v6, iRevBytes, pvData);
      }
      else
      {
        if ( iCommand != 110 )
          return v7;
        v8 = GameFrameWork::On_NC_GUILD_ACADEMY_REWARD_STORAGE_OPEN_ACK(v6, iRevBytes, pvData);
      }
      return v8;
    case 35:
      switch ( iCommand )
      {
        case 2:
        case 78:
        case 81:
        case 84:
        case 87:
        case 88:
          goto $LN762;
        case 5:
          CMiniHouseMgr::AddInfo(
            (CMiniHouseMgr *)&g_kMiniHouseMgr,
            (PROTO_NC_BRIEFINFO_MINIHOUSEBUILD_CMD *)((char *)pvData + 2));
          return iRevBytes;
        case 4:
          return GameFrameWork::On_NC_MINIHOUSE_BUILDING_ACK(v6, iRevBytes, pvData);
        case 35:
          return GameFrameWork::On_NC_MINIHOUSE_CREATE_FURNITURE_ACK(v6, iRevBytes, pvData);
        case 9:
          return GameFrameWork::On_NC_MINIHOUSE_FUNICHER_CMD(v6, iRevBytes, pvData);
        case 32:
          return GameFrameWork::On_NC_MINIHOUSE_REARRANGE_ACK(v6, iRevBytes, pvData);
        case 33:
          return GameFrameWork::On_NC_MINIHOUSE_REARRANGE_CMD(iRevBytes, pvData);
        case 25:
          return GameFrameWork::On_NC_MINIHOUSE_EXIT_ACK(v6, iRevBytes, pvData);
        case 36:
          return GameFrameWork::On_NC_MINIHOUSE_CREATE_FURNITURE_CMD(iRevBytes, pvData);
        case 38:
          return GameFrameWork::On_NC_MINIHOUSE_DELETE_FURNITURE_ACK(v6, iRevBytes, pvData);
        case 39:
          return GameFrameWork::On_NC_MINIHOUSE_DELETE_FURNITURE_CMD(v6, iRevBytes, pvData);
        case 30:
          return GameFrameWork::On_NC_MINIHOUSE_FUNITUREINFOCOMPLETE_ACK(v6, iRevBytes, pvData);
        case 28:
          return GameFrameWork::On_NC_MINIHOUSE_ARRANGEMODE_CMD(iRevBytes, pvData);
        case 27:
          return GameFrameWork::On_NC_MINIHOUSE_ARRANGEMODE_ACK(v6, v7, iRevBytes, pvData);
        case 8:
          return GameFrameWork::On_NC_MINIHOUSE_FUNICHERINVEN_CMD(iRevBytes, pvData);
        case 11:
          return GameFrameWork::On_NC_MINIHOUSE_LOGINCOMPLETE_ACK(v6, iRevBytes, pvData);
        case 12:
          return GameFrameWork::On_NC_MINIHOUSE_LOGINCOMPLETE_CMD(v6, iRevBytes, pvData);
        case 13:
          return GameFrameWork::On_NC_MINIHOUSE_LOGOUTCOMPLETE_CMD(v6, iRevBytes, pvData);
        case 17:
          return GameFrameWork::On_NC_MINIHOUSE_VISIT_ACK(v6, iRevBytes, pvData);
        case 15:
          return GameFrameWork::On_NC_MINIHOUSE_VISITREADY_ACK(v6, iRevBytes, pvData);
        case 41:
          return GameFrameWork::On_NC_MINIHOUSE_COMPULSIONMOVETO_ACK(v6, iRevBytes, pvData);
        case 42:
          return GameFrameWork::On_NC_MINIHOUSE_COMPULSIONMOVETO_CMD(v6, iRevBytes, pvData);
        case 44:
          return GameFrameWork::On_NC_MINIHOUSE_MODIFY_PASSWORD_ACK(v6, iRevBytes, pvData);
        case 45:
          return GameFrameWork::On_NC_MINIHOUSE_MODIFY_PASSWORD_CMD(v6, iRevBytes, pvData);
        case 47:
          return GameFrameWork::On_NC_MINIHOUSE_MODIFY_TITLE_ACK(v6, iRevBytes, pvData);
        case 48:
          return GameFrameWork::On_NC_MINIHOUSE_MODIFY_TITLE_CMD(v6, iRevBytes, pvData);
        case 49:
          return GameFrameWork::On_NC_MINIHOUSE_MODIFY_OUTSIDE_TITLE_CMD(iRevBytes, pvData);
        case 51:
          return GameFrameWork::On_NC_MINIHOUSE_MODIFY_MAXENTERNUM_ACK(v6, iRevBytes, pvData);
        case 52:
          return GameFrameWork::On_NC_MINIHOUSE_MODIFY_MAXENTERNUM_CMD(v6, iRevBytes, pvData);
        case 56:
          return GameFrameWork::On_NC_MINIHOUSE_OWNERBLOG_ACK(v6, iRevBytes, pvData);
        case 54:
          return GameFrameWork::On_NC_MINIHOUSE_MODIFY_OWNERBLOG_ACK(v6, iRevBytes, pvData);
        case 62:
          return GameFrameWork::On_NC_MINIHOUSE_CHAR_ACTION_ACK(v6, iRevBytes, pvData);
        case 63:
          return GameFrameWork::On_NC_MINIHOUSE_CHAR_ACTION_CMD(iRevBytes, pvData);
        case 65:
          return GameFrameWork::On_NC_MINIHOUSE_FURNITURE_EFFECT_ACK(v6, iRevBytes, pvData);
        case 66:
          return GameFrameWork::On_NC_MINIHOUSE_FURNITURE_EFFECT_CMD(iRevBytes, pvData);
        case 73:
          return GameFrameWork::On_NC_MINIHOUSE_MODIFY_NOTIFY_ACK(v6, iRevBytes, pvData);
        case 74:
          return GameFrameWork::On_NC_MINIHOUSE_MODIFY_NOTIFY_CMD(v6, iRevBytes, pvData);
        case 68:
          return GameFrameWork::On_NC_MINIHOUSE_MODIFY_ITEM_INFO_OPEN_ACK(v6, iRevBytes, pvData);
        case 69:
          return GameFrameWork::On_NC_MINIHOUSE_MODIFY_ITEM_INFO_OPEN_CMD(v6, iRevBytes, pvData);
        case 75:
          return GameFrameWork::On_NC_MINIHOUSE_PORTAL_LIST_CMD(v6, iRevBytes, pvData);
        case 76:
          return GameFrameWork::On_NC_MINIHOUSE_PORTAL_ADD_CMD(v6, iRevBytes, pvData);
        case 79:
          return GameFrameWork::On_NC_MINIHOUSE_PORTAL_DEL_CMD(v6, iRevBytes, pvData);
        case 97:
          return GameFrameWork::On_NC_MINIHOUSE_FURNITURE_ENDURE_CMD(iRevBytes, pvData);
        case 99:
          return GameFrameWork::On_NC_MINIHOUSE_FURNITURE_EMOTION_ACK(v6, iRevBytes, pvData);
        case 100:
          return GameFrameWork::On_NC_MINIHOUSE_FURNITURE_EMOTION_CMD(iRevBytes, pvData);
        case 102:
          return GameFrameWork::On_NC_MINIHOUSE_FURNITURE_EMOTION_CANCEL_ACK(v6, iRevBytes, pvData);
        case 103:
          return GameFrameWork::On_NC_MINIHOUSE_FURNITURE_EMOTION_CANCEL_CMD(
                   v6,
                   (NiPoint3 *)v6,
                   *(float *)&v7,
                   iRevBytes,
                   iRevBytes,
                   pvData);
        default:
          return v7;
      }
      return v7;
    case 36:
      switch ( iCommand )
      {
        case 14:
        case 15:
          goto $LN762;
        case 3:
          return GameFrameWork::On_NC_CHARGED_BUFFSTART_CMD(v6, iRevBytes, pvData);
        case 4:
          return GameFrameWork::On_NC_CHARGED_BUFFTERMINATE_CMD(v6, iRevBytes, pvData);
        case 11:
          return GameFrameWork::On_NC_CHARGED_DELETEWEAPONTITLE_CMD(v6, iRevBytes, pvData);
        case 12:
          return GameFrameWork::On_NC_CHARGED_STAT_INITIALIZE_SUC_CMD(iRevBytes, pvData);
        case 13:
          return GameFrameWork::On_NC_CHARGED_SKILLEMPOW_INITIALIZE_SUC_CMD(iRevBytes, pvData);
        case 16:
          return GameFrameWork::On_NC_CHARGED_BOOTHSLOTSIZE_CMD(v6, iRevBytes, pvData);
        default:
          return v7;
      }
      return v7;
    case 37:
      switch ( iCommand )
      {
        case 2:
          return GameFrameWork::On_NC_HOLY_PROMISE_SET_UP_ACK(v6, iRevBytes, pvData);
        case 11:
          return GameFrameWork::On_NC_HOLY_PROMISE_DEL_DOWN_ACK(v6, iRevBytes, pvData);
        case 7:
          return GameFrameWork::On_NC_HOLY_PROMISE_DEL_UP_ACK(v6, iRevBytes, pvData);
        case 4:
          return GameFrameWork::On_NC_HOLY_PROMISE_SET_UP_CONFIRM_REQ(v6, iRevBytes, pvData);
        case 24:
          return GameFrameWork::On_NC_HOLY_PROMISE_DEL_CMD(v6, iRevBytes, pvData);
        case 21:
          return GameFrameWork::On_NC_HOLY_PROMISE_ADD_CMD(v6, iRevBytes, pvData);
        case 22:
          if ( !pvData )
            goto LABEL_330;
          HolyPromiseWin::SetLogin(v6->m_pkHolyPromiseWin, (Name5 *)pvData);
          return iRevBytes;
        case 25:
          return GameFrameWork::On_NC_HOLY_PROMISE_LEVEL_CMD(v6, iRevBytes, pvData);
        case 23:
          if ( !pvData )
            goto LABEL_330;
          HolyPromiseWin::SetLogOut(v6->m_pkHolyPromiseWin, (Name5 *)pvData);
          return iRevBytes;
        case 20:
          HolyPromiseWin::AddHolyPromiseList(v6->m_pkHolyPromiseWin, (PROTO_NC_HOLY_PROMISE_LIST_CMD *)pvData);
          return iRevBytes;
        case 26:
          return GameFrameWork::On_NC_HOLY_PROMISE_REWARD_ITEM_CMD(v6, iRevBytes, pvData);
        case 27:
          return GameFrameWork::On_NC_HOLY_PROMISE_REWARD_MONEY_CMD(v6, iRevBytes, pvData);
        case 3:
          return GameFrameWork::On_NC_HOLY_PROMISE_SET_UP_CONFIRM_ING(v6, iRevBytes, pvData);
        case 61:
          return GameFrameWork::On_NC_HOLY_PROMISE_GET_CEN_REWARD_ACK(v6, iRevBytes, pvData);
        case 65:
          return GameFrameWork::On_NC_HOLY_PROMISE_WITHDRAW_CEN_REWARD_ACK(v6, iRevBytes, pvData);
        case 69:
          return GameFrameWork::On_NC_HOLY_PROMISE_CLIENT_GET_REMAIN_MONEY_CMD(v6, iRevBytes, pvData);
        default:
          return v7;
      }
      return v7;
    case 44:
      switch ( iCommand )
      {
        case 55:
        case 60:
          goto $LN762;
        case 2:
          return GameFrameWork::On_NC_RAID_MAKE_ACK(v6, iRevBytes, pvData);
        case 3:
          return GameFrameWork::On_NC_RAID_MAKE_BROAD_CMD(v6, iRevBytes, pvData);
        case 6:
          return GameFrameWork::On_NC_RAID_DISMISS_BROAD_CMD(v6, iRevBytes, pvData);
        case 5:
          return GameFrameWork::On_NC_RAID_MEMBER_LIST_CMD(v6, iRevBytes, pvData);
        case 30:
          return GameFrameWork::On_NC_RAID_LOGININFO_CMD(v6, iRevBytes, pvData);
        case 32:
          return GameFrameWork::On_NC_RAID_LOGOUTINFO_CMD(v6, iRevBytes, pvData);
        case 33:
          return GameFrameWork::On_NC_RAID_MAPOUT_CMD(v6, iRevBytes, pvData);
        case 9:
          return GameFrameWork::On_NC_RAID_LOOTING_TYPE_ACK(v6, iRevBytes, pvData);
        case 10:
          return GameFrameWork::On_NC_RAID_LOOTING_TYPE_BROAD_CMD(v6, iRevBytes, pvData);
        case 13:
          return GameFrameWork::On_NC_RAID_INVITATION_ACK(v6, iRevBytes, pvData);
        case 14:
          return GameFrameWork::On_NC_RAID_INVITATION_CMD(v6, iRevBytes, pvData);
        case 16:
          return GameFrameWork::On_NC_RAID_INVITATION_ANSWER_ACK(v6, iRevBytes, pvData);
        case 17:
          return GameFrameWork::On_NC_RAID_INVITATION_ANSWER_CMD(v6, iRevBytes, pvData);
        case 18:
          return GameFrameWork::On_NC_RAID_MEMBER_JOIN_BROAD_CMD(v6, iRevBytes, pvData);
        case 21:
          return GameFrameWork::On_NC_RAID_LEAVE_ACK(v6, iRevBytes, pvData);
        case 22:
          return GameFrameWork::On_NC_RAID_LEAVE_BROAD_CMD(v6, iRevBytes, pvData);
        case 25:
          return GameFrameWork::On_NC_RAID_VANISH_ACK(v6, iRevBytes, pvData);
        case 26:
          return GameFrameWork::On_NC_RAID_VANISH_CMD(v6, iRevBytes, pvData);
        case 27:
          return GameFrameWork::On_NC_RAID_VANISH_BROAD_CMD(v6, iRevBytes, pvData);
        case 34:
          return GameFrameWork::On_NC_RAID_MEMBERINFORM_CMD(v6, iRevBytes, pvData);
        case 35:
          return GameFrameWork::On_NC_RAID_MEMBERCLASS_CMD(v6, iRevBytes, pvData);
        case 38:
          return GameFrameWork::On_NC_RAID_LOCATION_CMD(v6, iRevBytes, pvData);
        case 40:
          return GameFrameWork::On_NC_RAID_SLOT_MOVE_ACK(v6, iRevBytes, pvData);
        case 41:
          return GameFrameWork::On_NC_RAID_SLOT_MOVE_BROAD_CMD(v6, iRevBytes, pvData);
        case 44:
          return GameFrameWork::On_NC_RAID_SET_LEADER_ACK(v6, iRevBytes, pvData);
        case 45:
        case 50:
          v15 = v6->m_pkPartyWinInterface;
          if ( !v15 )
            goto LABEL_330;
          PartyWinInterface::Update(v15);
          return iRevBytes;
        case 46:
          return GameFrameWork::On_NC_RAID_SET_LEADER_BROAD_CMD(v6, iRevBytes, pvData);
        case 49:
          return GameFrameWork::On_NC_RAID_SET_SUB_LEADER_ACK(v6, iRevBytes, pvData);
        case 51:
          return GameFrameWork::On_NC_RAID_SET_SUB_LEADER_BROAD_CMD(v6, iRevBytes, pvData);
        case 54:
          return GameFrameWork::On_NC_RAID_DEL_SUB_LEADER_ACK(v6, iRevBytes, pvData);
        case 56:
          return GameFrameWork::On_NC_RAID_DEL_SUB_LEADER_BROAD_CMD(v6, iRevBytes, pvData);
        case 59:
          return GameFrameWork::On_NC_RAID_SET_LOOTER_ACK(v6, iRevBytes, pvData);
        case 61:
          return GameFrameWork::On_NC_RAID_SET_LOOTER_BROAD_CMD(v6, iRevBytes, pvData);
        case 64:
          return GameFrameWork::On_NC_RAID_CHAT_ACK(v6, iRevBytes, pvData);
        case 65:
          return GameFrameWork::On_NC_RAID_CHAT_BROAD_CMD(v6, iRevBytes, pvData);
        case 67:
          return GameFrameWork::On_NC_RAID_WARNING_ACK(v6, iRevBytes, pvData);
        case 68:
          return GameFrameWork::On_NC_RAID_WARNING_BROAD_CMD(v6, iRevBytes, pvData);
        default:
          return v7;
      }
      return v7;
    case 41:
      switch ( iCommand )
      {
        case 12:
          return GameFrameWork::On_NC_INSTANCE_DUNGEON_LEVEL_SELECT_MENU_REQ(v6, iRevBytes, pvData);
        case 18:
          return GameFrameWork::On_NC_INSTANCE_DUNGEON_RANK_RESULT_CMD(v6, iRevBytes, pvData);
        case 24:
          return GameFrameWork::On_NC_INSTANCE_DUNGEON_RANK_LIST_ACK(v6, iRevBytes, pvData);
        case 33:
          return GameFrameWork::On_NC_INSTANCE_DUNGEON_RANK_TAB_DAMAGEDEALT_ACK(v6, iRevBytes, pvData);
        case 34:
          return GameFrameWork::On_NC_INSTANCE_DUNGEON_RANK_TAB_DAMAGETAKEN_ACK(v6, iRevBytes, pvData);
        case 35:
          return GameFrameWork::On_NC_INSTANCE_DUNGEON_RANK_TAB_HEALINGDONE_ACK(v6, iRevBytes, pvData);
        case 36:
          return GameFrameWork::On_NC_INSTANCE_DUNGEON_RANK_TAB_MYRANK_ACK(v6, iRevBytes, pvData);
        case 37:
          return GameFrameWork::On_NC_INSTANCE_DUNGEON_RANK_NEW_RANK_MSG(iRevBytes, pvData);
        default:
          return v7;
      }
      return v7;
    case 49:
      switch ( iCommand )
      {
        case 5:
          return GameFrameWork::On_NC_COLLECT_PEEPING_COLLECT_ACK(v6, iRevBytes, pvData);
        case 6:
          return GameFrameWork::On_NC_COLLECT_PEEPING_COLLECT_BOOKMARK_ACK(v6, iRevBytes, pvData);
        case 7:
          return GameFrameWork::On_NC_COLLECT_CARDOPEN_CMD(v6, a2, iRevBytes, pvData);
        case 11:
          return GameFrameWork::On_NC_COLLECT_CARDREGIST_ACK(v6, iRevBytes, pvData);
        case 15:
          return GameFrameWork::On_NC_COLLECT_BOOKMARK_REGIST_ACK(v6, iRevBytes, pvData);
        case 19:
          return GameFrameWork::On_NC_COLLECT_REWARD_ACK(v6, iRevBytes, pvData);
        default:
          return v7;
      }
      return v7;
    case 51:
      switch ( iCommand )
      {
        case 2:
          return GameFrameWork::On_NC_MOVER_RIDE_ON_CMD(v6, iRevBytes, pvData);
        case 3:
          return GameFrameWork::On_NC_MOVER_RIDE_ON_FAIL_CMD(v6, iRevBytes, pvData);
        case 4:
          return GameFrameWork::On_NC_MOVER_SOMEONE_RIDE_ON_CMD(v6, iRevBytes, pvData);
        case 6:
          return GameFrameWork::On_NC_MOVER_RIDE_OFF_CMD(v6, iRevBytes, pvData);
        case 7:
          return GameFrameWork::On_NC_MOVER_RIDE_OFF_FAIL_CMD(v6, iRevBytes, pvData);
        case 8:
          return GameFrameWork::On_NC_MOVER_SOMEONE_RIDE_OFF_CMD(v6, iRevBytes, pvData);
        case 9:
          return GameFrameWork::On_NC_MOVER_FEEDING_ERROR_CMD(v6, iRevBytes, pvData);
        case 10:
          return GameFrameWork::On_NC_MOVER_HUNGRY_CMD(v6, iRevBytes, pvData);
        case 13:
          return GameFrameWork::On_NC_MOVER_MOVESPEED_CMD(iRevBytes, pvData);
        default:
          return v7;
      }
      return v7;
    case 53:
      switch ( iCommand )
      {
        case 5:
          return GameFrameWork::On_NC_PET_ASK_NEW_NAME_REQ(v6, iRevBytes, pvData);
        case 8:
          return GameFrameWork::On_NC_PET_SET_NAME_ACK(v6, iRevBytes, pvData);
        case 19:
          return GameFrameWork::On_NC_PET_SET_NAME_CMD(iRevBytes, pvData);
        case 10:
          return GameFrameWork::On_NC_PET_SET_NAME_CANCEL_ACK(v6, iRevBytes, pvData);
        case 17:
          return GameFrameWork::On_NC_PET_USE_ITEM_FAIL_ACK(v6, iRevBytes, pvData);
        default:
          return v7;
      }
      return v7;
    default:
      return v7;
  }
}

//----- (004C5CE0) --------------------------------------------------------
void __cdecl Singleton<FadeObjectMgr>::getInstance()
{
  FadeObjectMgr *v0; // eax@2
  int v1; // eax@3

  if ( !Singleton<FadeObjectMgr>::m_pInstance )
  {
    v0 = (FadeObjectMgr *)operator new(0x1Cu);
    if ( v0 )
    {
      FadeObjectMgr::FadeObjectMgr(v0);
      Singleton<FadeObjectMgr>::m_pInstance = v1;
    }
    else
    {
      Singleton<FadeObjectMgr>::m_pInstance = 0;
    }
  }
}
// A993A0: using guessed type int Singleton<FadeObjectMgr>::m_pInstance;

//----- (004C5D60) --------------------------------------------------------
AbnormalStateInfo *__cdecl IIDTableBase<AbnormalStateInfo,AbnormalStateInfoTab,unsigned short>::GetByID(int uiId)
{
  int v1; // esi@1
  AbnormalStateInfo *result; // eax@2
  int v3; // ecx@4

  v1 = ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable,
                          uiId)
    && (unsigned __int16)uiId <= *(_WORD *)(v1 + 200)
    && (v3 = *(_DWORD *)(v1 + 196), *(_DWORD *)(v3 + 4 * (unsigned __int16)uiId)) )
  {
    result = *(AbnormalStateInfo **)(v3 + 4 * (unsigned __int16)uiId);
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C2A0: using guessed type int ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;

//----- (004C5DB0) --------------------------------------------------------
AbnormalStateViewInfo *__cdecl IIDTableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab,unsigned short>::GetByID(int uiId)
{
  int v1; // esi@1
  AbnormalStateViewInfo *result; // eax@2
  int v3; // ecx@4

  v1 = ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable,
                          uiId)
    && (unsigned __int16)uiId <= *(_WORD *)(v1 + 200)
    && (v3 = *(_DWORD *)(v1 + 196), *(_DWORD *)(v3 + 4 * (unsigned __int16)uiId)) )
  {
    result = *(AbnormalStateViewInfo **)(v3 + 4 * (unsigned __int16)uiId);
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C2A4: using guessed type int ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;

//----- (004C5E00) --------------------------------------------------------
ActiveSkillViewInfo *__cdecl IIDTableBase<ActiveSkillViewInfo,ActSkillViewInfoTab,unsigned short>::GetByID(int uiId)
{
  int v1; // esi@1
  ActiveSkillViewInfo *result; // eax@2
  int v3; // ecx@4

  v1 = ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable,
                          uiId)
    && (unsigned __int16)uiId <= *(_WORD *)(v1 + 200)
    && (v3 = *(_DWORD *)(v1 + 196), *(_DWORD *)(v3 + 4 * (unsigned __int16)uiId)) )
  {
    result = *(ActiveSkillViewInfo **)(v3 + 4 * (unsigned __int16)uiId);
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8CAA0: using guessed type int ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable;

//----- (004C5E50) --------------------------------------------------------
BOOL __thiscall Name5::operator!=(Name5 *this, Name5 *nm)
{
  return this->n5_code[0] != nm->n5_code[0]
      || this->n5_code[1] != nm->n5_code[1]
      || this->n5_code[2] != nm->n5_code[2]
      || this->n5_code[3] != nm->n5_code[3]
      || this->n5_code[4] != nm->n5_code[4];
}

//----- (004C5E90) --------------------------------------------------------
void __cdecl STRING_TO_NAME(char *pcString, Name5 *kName5)
{
  char *v2; // eax@1
  char v3; // cl@3
  char acTemp[20]; // [sp+Ch] [bp-18h]@2

  v2 = pcString;
  if ( strlen(pcString) < 0x13 )
  {
    *(_DWORD *)acTemp = 0;
    *(_DWORD *)&acTemp[4] = 0;
    *(_DWORD *)&acTemp[8] = 0;
    *(_DWORD *)&acTemp[12] = 0;
    *(_DWORD *)&acTemp[16] = 0;
    do
    {
      v3 = *v2;
      v2[acTemp - pcString] = *v2;
      ++v2;
    }
    while ( v3 );
    *(_QWORD *)&kName5->n5_code[3] = 0i64;
    *(_QWORD *)&kName5->n5_code[1] = 0i64;
    kName5->n5_code[0] = 0;
    strncpy((char *)kName5->n5_code, acTemp, 0x14u);
  }
}

//----- (004C5F10) --------------------------------------------------------
bool __cdecl CharClass::IsKindOf(char kClassID, char kBaseClassID)
{
  bool result; // al@1

  result = kClassID;
  if ( kClassID )
  {
    switch ( kClassID )
    {
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
        result = 1 == kBaseClassID;
        break;
      case 6:
      case 7:
      case 8:
      case 9:
      case 0xA:
        result = 6 == kBaseClassID;
        break;
      case 0xB:
      case 0xC:
      case 0xD:
      case 0xE:
      case 0xF:
        result = 11 == kBaseClassID;
        break;
      case 0x10:
      case 0x11:
      case 0x12:
      case 0x13:
      case 0x14:
        result = 16 == kBaseClassID;
        break;
      case 0x15:
      case 0x16:
      case 0x17:
      case 0x18:
      case 0x19:
        result = 21 == kBaseClassID;
        break;
      case 0x1A:
      case 0x1B:
        result = 26 == kBaseClassID;
        break;
      default:
        result = kBaseClassID == 0;
        break;
    }
  }
  return result;
}

//----- (004C5FF0) --------------------------------------------------------
NiPoint3 *__thiscall Char::GetDirToPosition(Char *this, NiPoint3 *result, NiPoint3 *rkPos)
{
  Char *v3; // esi@1
  NiPoint3 *v4; // eax@1
  float v5; // edx@2
  float v6; // ecx@2
  float v7; // ecx@3
  float v8; // edx@3
  NiPoint3 kMyDir; // [sp+4h] [bp-24h]@1
  NiPoint3 kMyPos; // [sp+10h] [bp-18h]@1
  float v11; // [sp+1Ch] [bp-Ch]@1
  float v12; // [sp+20h] [bp-8h]@1
  float v13; // [sp+24h] [bp-4h]@1
  NiPoint3 *rkPosa; // [sp+34h] [bp+Ch]@1
  NiPoint3 *rkPosb; // [sp+34h] [bp+Ch]@1

  v3 = this;
  ((void (__cdecl *)(NiPoint3 *))this->vfptr[6].~AbStateInfectee)(&kMyDir);
  ((void (__thiscall *)(Char *, NiPoint3 *))v3->vfptr[6].SetAbStateProperty)(v3, &kMyPos);
  v11 = rkPos->x - kMyPos.x;
  v12 = rkPos->y - kMyPos.y;
  v13 = rkPos->z - kMyPos.z;
  *(float *)&rkPosa = v12 * v12 + v11 * v11 + v13 * v13;
  *(float *)&rkPosb = sqrt(*(float *)&rkPosa);
  v4 = result;
  if ( *(float *)&rkPosb >= 1.0 )
  {
    v7 = v12;
    result->x = v11;
    v8 = v13;
    result->y = v7;
    result->z = v8;
  }
  else
  {
    v5 = kMyDir.y;
    result->x = kMyDir.x;
    v6 = kMyDir.z;
    result->y = v5;
    result->z = v6;
  }
  return v4;
}

//----- (004C60A0) --------------------------------------------------------
ExpeditionPartyWin *__thiscall GameFrameWork::GetRaidPartyWin(GameFrameWork *this, unsigned int index)
{
  ExpeditionPartyWin *result; // eax@2

  if ( index >= 4 )
    result = 0;
  else
    result = this->m_pkExpeditionPartyWin[index];
  return result;
}

//----- (004C60C0) --------------------------------------------------------
void __thiscall NiPointer<NiNode>::NiPointer<NiNode>(NiPointer<NiNode> *this, NiPointer<NiNode> *ptr)
{
  NiNode *v2; // eax@1

  v2 = ptr->m_pObject;
  this->m_pObject = ptr->m_pObject;
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
}

//----- (004C60F0) --------------------------------------------------------
unsigned int __cdecl ITableBase<ActionEffectInfo,ActionEffectInfoTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<ActionEffectInfo,ActionEffectInfoTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C144: using guessed type int ITableBase<ActionEffectInfo,ActionEffectInfoTab>::ms_pkTable;

//----- (004C6110) --------------------------------------------------------
unsigned int __cdecl ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C2A0: using guessed type int ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;

//----- (004C6130) --------------------------------------------------------
unsigned int __cdecl ITableBase<SubAbStateInfo,SubAbStateInfoTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<SubAbStateInfo,SubAbStateInfoTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C2A8: using guessed type int ITableBase<SubAbStateInfo,SubAbStateInfoTab>::ms_pkTable;

//----- (004C6150) --------------------------------------------------------
std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *__cdecl std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Max(std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *_Pnode)
{
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *result; // eax@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *i; // ecx@1

  result = _Pnode;
  for ( i = _Pnode->_Right; !i->_Isnil; i = i->_Right )
    result = i;
  return result;
}

//----- (004C6170) --------------------------------------------------------
char *__cdecl WeaponTitleTab::GetWeaponTitleStringByLevel(int MobID, unsigned int level)
{
  int v2; // esi@1
  int v3; // ecx@3
  int v4; // eax@4
  int v5; // esi@5
  WEAPON_TITLE_DATA *v6; // eax@5
  char *result; // eax@7
  int v8; // [sp-4h] [bp-Ch]@6

  v2 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 16))(
                          ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                          MobID)
    && (unsigned __int16)MobID <= *(_WORD *)(v2 + 200)
    && (v3 = *(_DWORD *)(v2 + 196), *(_DWORD *)(v3 + 4 * (unsigned __int16)MobID))
    && (v4 = *(_DWORD *)(v3 + 4 * (unsigned __int16)MobID)) != 0
    && (v5 = v4 + 34, (v6 = CWeaponTitle::GetData(&WeaponTitleTab::ms_kTab, MobID, level)) != 0) )
  {
    v8 = (int)v6->Suffix;
    if ( v6->Prefix[0] )
      result = fs("%s %s %s", v6->Prefix, v5, v8);
    else
      result = fs("%s %s", v5, v8);
  }
  else
  {
    result = (char *)&unk_96F8EB;
  }
  return result;
}
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;

//----- (004C6200) --------------------------------------------------------
void __thiscall HolyRewardMoneyWin::SetAmout(HolyRewardMoneyWin *this, unsigned __int64 money)
{
  HolyRewardMoneyWin *v2; // edi@1
  __int64 v3; // rax@1
  __int64 v4; // rax@1
  __int64 v5; // rax@1
  __int64 v6; // rax@1
  char acStr[128]; // [sp+Ch] [bp-84h]@1

  v2 = this;
  v3 = User::GetGem(money);
  sprintf(acStr, "%I64d", v3);
  ((void (__stdcall *)(_DWORD))v2->m_pkGemText->vfptr[118].__vecDelDtor)(acStr);
  v4 = User::GetGold(money);
  sprintf(acStr, "%I64d", v4);
  ((void (__stdcall *)(_DWORD))v2->m_pkGoldText->vfptr[118].__vecDelDtor)(acStr);
  v5 = User::GetSilver(money);
  sprintf(acStr, "%I64d", v5);
  ((void (__stdcall *)(_DWORD))v2->m_pkSilverText->vfptr[118].__vecDelDtor)(acStr);
  v6 = User::GetCopper(money);
  sprintf(acStr, "%I64d", v6);
  ((void (__stdcall *)(_DWORD))v2->m_pkCopperText->vfptr[118].__vecDelDtor)(acStr);
  ((void (__stdcall *)(_DWORD))v2->m_pkOkBut.m_pObject->vfptr[60].__vecDelDtor)(money != 0);
}

//----- (004C6320) --------------------------------------------------------
bool __thiscall ChatBlockListWin::IsGM(ChatBlockListWin *this, Name5 kCharID)
{
  PROTO_CHAT_RESTRICT_INFO *v2; // eax@1
  bool result; // al@2

  v2 = CChatRestrict::Get(&this->m_RestrictList, &kCharID);
  if ( v2 )
    result = v2->bIsGM == 1;
  else
    result = 0;
  return result;
}

//----- (004C6350) --------------------------------------------------------
void __thiscall NiActorManager::Reset(NiActorManager *this)
{
  NiActorManager *v1; // esi@1
  NiControllerManager *v2; // ebx@1
  unsigned int i; // edi@2
  NiControllerSequence *v4; // ecx@3
  NiTListItem<unsigned int> **v5; // edi@6
  NiTListItem<unsigned int> *v6; // ST04_4@7
  NiTListItem<float> **v7; // edi@8
  NiTListItem<float> *v8; // ST04_4@9

  v1 = this;
  v2 = this->m_spManager.m_pObject;
  if ( v2 )
  {
    for ( i = 0; i < v2->m_kSequenceArray.m_uiSize; ++i )
    {
      v4 = v2->m_kSequenceArray.m_pBase[i].m_pObject;
      if ( v4 )
        NiControllerSequence::Deactivate(v4, 0.0, 0);
    }
  }
  v1->m_eTargetID = NiActorManager::INVALID_SEQUENCE_ID;
  v1->m_fTime = -3.4028235e38;
  v1->m_bBuildTimeline = 0;
  v1->m_eTransitionState = 0;
  v1->m_fTimelineRefreshTime = 3.4028235e38;
  v1->m_bStartTransition = 0;
  v1->m_fTransStartTime = 3.4028235e38;
  v1->m_fTransEndTime = -3.4028235e38;
  v1->m_pcTargetKey = 0;
  v1->m_fTransStartFrameTime = -3.4028235e38;
  v1->m_eCurID = NiActorManager::INVALID_SEQUENCE_ID;
  v1->m_pkCurSequence = 0;
  v1->m_eNextID = NiActorManager::INVALID_SEQUENCE_ID;
  v1->m_pkNextSequence = 0;
  v1->m_bChainActive = 0;
  v1->m_fNextChainTime = -3.4028235e38;
  v5 = &v1->m_kChainIDs.m_pkHead->m_pkNext;
  while ( v5 )
  {
    v6 = (NiTListItem<unsigned int> *)v5;
    v5 = (NiTListItem<unsigned int> **)*v5;
    v1->m_kChainIDs.vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int> *)&v1->m_kChainIDs,
      v6);
  }
  v1->m_kChainIDs.m_kAllocator.m_uiCount = 0;
  v1->m_kChainIDs.m_pkHead = 0;
  v1->m_kChainIDs.m_pkTail = 0;
  v7 = &v1->m_kChainDurations.m_pkHead->m_pkNext;
  while ( v7 )
  {
    v8 = (NiTListItem<float> *)v7;
    v7 = (NiTListItem<float> **)*v7;
    v1->m_kChainDurations.vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,float> *)&v1->m_kChainDurations,
      v8);
  }
  v1->m_kChainDurations.m_kAllocator.m_uiCount = 0;
  v1->m_kChainDurations.m_pkHead = 0;
  v1->m_kChainDurations.m_pkTail = 0;
  v1->m_kExtraSequences.m_uiUsed = 0;
}
// 9E4E90: using guessed type const unsigned int NiActorManager::INVALID_SEQUENCE_ID;

//----- (004C6450) --------------------------------------------------------
CollectWin::sCardInfo *__stdcall std::allocator<CollectWin::sCardInfo>::allocate(unsigned int _Count)
{
  CollectWin::sCardInfo *result; // eax@1
  std::exception pExceptionObject; // [sp+0h] [bp-Ch]@4

  result = 0;
  if ( _Count )
  {
    if ( _Count > 0xCCCCCCC || (result = (CollectWin::sCardInfo *)operator new(20 * _Count)) == 0 )
    {
      _Count = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&_Count);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
  }
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (004C64B0) --------------------------------------------------------
unsigned int __cdecl ITableBase<MobInfo,MobInfoTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;

//----- (004C64D0) --------------------------------------------------------
unsigned int __cdecl ITableBase<PassiveSkillInfo,PasSkillInfoTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8CAAC: using guessed type int ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ms_pkTable;

//----- (004C64F0) --------------------------------------------------------
unsigned int __cdecl ITableBase<RIDING,RidePetTable>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<RIDING,RidePetTable>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C278: using guessed type int ITableBase<RIDING,RidePetTable>::ms_pkTable;

//----- (004C6510) --------------------------------------------------------
unsigned int __cdecl ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C280: using guessed type int ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::ms_pkTable;

//----- (004C6530) --------------------------------------------------------
unsigned int __cdecl ITableBase<DamageEffect,DamageEffectTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<DamageEffect,DamageEffectTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C1DC: using guessed type int ITableBase<DamageEffect,DamageEffectTab>::ms_pkTable;

//----- (004C6550) --------------------------------------------------------
NiPoint3 *__thiscall mhObject::GetPos(mhObject *this, NiPoint3 *result)
{
  ResElement *v2; // eax@1
  NiActorManager *v3; // ecx@2
  NiNode *v4; // eax@3
  float v5; // edx@5
  float v6; // eax@5

  v2 = this->m_pkResource;
  if ( v2->m_bIsCanAnimation && (v3 = v2->m_pActorMgr.m_pObject) != 0 )
    v4 = (NiNode *)v3->m_spNIFRoot.m_pObject;
  else
    v4 = v2->m_pNiNode.m_pObject;
  result->x = v4->m_kLocal.m_Translate.x;
  v5 = v4->m_kLocal.m_Translate.y;
  v6 = v4->m_kLocal.m_Translate.z;
  result->y = v5;
  result->z = v6;
  return result;
}

//----- (004C6590) --------------------------------------------------------
void __thiscall MiniHouseIndoor::SetMsgBox(MiniHouseIndoor *this, char *msg)
{
  MiniHouseIndoor *v2; // ebx@1
  MsgBox *v3; // eax@1
  MsgBox *v4; // esi@1
  MsgBox *v5; // edi@1

  v2 = this;
  v3 = MsgBox::Modeless(0, msg);
  v4 = v2->m_spMsgBox.m_pObject;
  v5 = v3;
  if ( v4 != v3 )
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v2->m_spMsgBox.m_pObject = v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  }
}

//----- (004C65F0) --------------------------------------------------------
BOOL __thiscall GameFrameWork::sRideOffValue::IsMove(GameFrameWork::sRideOffValue *this)
{
  return NiPoint3::ZERO.x != this->m_kGroundPos.x
      || NiPoint3::ZERO.y != this->m_kGroundPos.y
      || NiPoint3::ZERO.z != this->m_kGroundPos.z;
}

//----- (004C6640) --------------------------------------------------------
Item *__thiscall Inventory::GetMHItemInv(Inventory *this, unsigned int uiInvType, unsigned int uiIndex)
{
  Item *result; // eax@3

  switch ( uiInvType )
  {
    case 0xDu:
      if ( uiIndex > 0x62 )
        goto LABEL_10;
      result = this->m_aspMiniHouseAccessoryItemInv[uiIndex].m_pObject;
      break;
    case 3u:
      if ( uiIndex > 0x62 )
        goto LABEL_10;
      result = this->m_aspMiniHouseFurnitureItemInv[uiIndex].m_pObject;
      break;
    case 0xEu:
      if ( uiIndex > 0x62 )
        goto LABEL_10;
      result = this->m_aspMiniHouseTileAllItemInv[uiIndex].m_pObject;
      break;
    case 0x10u:
      if ( uiIndex > 0x62 )
        goto LABEL_10;
      result = this->m_aspMiniHouseMinigameAllItemInv[uiIndex].m_pObject;
      break;
    default:
LABEL_10:
      result = 0;
      break;
  }
  return result;
}

//----- (004C66E0) --------------------------------------------------------
void __thiscall Inventory::AddEquip(Inventory *this, Item *pkItem, unsigned int uiIndex)
{
  Inventory *v3; // ebx@1
  Item *v4; // esi@1

  v3 = this;
  v4 = this->m_aspEquip[uiIndex].m_pObject;
  if ( v4 != pkItem )
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v3->m_aspEquip[uiIndex].m_pObject = pkItem;
    if ( pkItem )
      InterlockedIncrement((volatile LONG *)&pkItem->m_uiRefCount);
  }
}

//----- (004C6740) --------------------------------------------------------
void __thiscall Inventory::AddRewardInv(Inventory *this, Item *pkItem, unsigned int uiIndex)
{
  Inventory *v3; // edi@1
  Item *v4; // esi@1

  v3 = this;
  v4 = this->m_aspRewardInv[uiIndex].m_pObject;
  if ( v4 != pkItem )
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
    {
      if ( v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
    v3->m_aspRewardInv[uiIndex].m_pObject = pkItem;
    if ( !pkItem )
      goto LABEL_10;
    InterlockedIncrement((volatile LONG *)&pkItem->m_uiRefCount);
  }
  if ( pkItem )
  {
    ++v3->m_uiRewardCount;
    return;
  }
LABEL_10:
  --v3->m_uiRewardCount;
}

//----- (004C67B0) --------------------------------------------------------
Item *__thiscall Inventory::GetRewardInv(Inventory *this, unsigned int uiIndex)
{
  Item *result; // eax@2

  if ( uiIndex < 0xC0 )
    result = this->m_aspRewardInv[uiIndex].m_pObject;
  else
    result = 0;
  return result;
}

//----- (004C67D0) --------------------------------------------------------
NiPointer<NiNode> *__thiscall InventoryWin::GetRunArrangeButEff(InventoryWin *this, NiPointer<NiNode> *result)
{
  NiNode *v2; // eax@1

  v2 = this->m_pRunArrangeButEff.m_pObject;
  result->m_pObject = v2;
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  return result;
}

//----- (004C6800) --------------------------------------------------------
NiPointer<NiNode> *__thiscall InventoryWin::GetRunArrangeInvenEff(InventoryWin *this, NiPointer<NiNode> *result)
{
  NiNode *v2; // eax@1

  v2 = this->m_pRunArrangeInvenEff.m_pObject;
  result->m_pObject = v2;
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  return result;
}

//----- (004C6830) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Lrotate(std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *this, std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *_Wherenode)
{
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v3; // ecx@3
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v4; // ecx@5

  v2 = _Wherenode->_Right;
  _Wherenode->_Right = v2->_Left;
  if ( !v2->_Left->_Isnil )
    v2->_Left->_Parent = _Wherenode;
  v2->_Parent = _Wherenode->_Parent;
  v3 = this->_Myhead;
  if ( _Wherenode == v3->_Parent )
  {
    v3->_Parent = v2;
    v2->_Left = _Wherenode;
    _Wherenode->_Parent = v2;
  }
  else
  {
    v4 = _Wherenode->_Parent;
    if ( _Wherenode == v4->_Left )
    {
      v4->_Left = v2;
      v2->_Left = _Wherenode;
      _Wherenode->_Parent = v2;
    }
    else
    {
      v4->_Right = v2;
      v2->_Left = _Wherenode;
      _Wherenode->_Parent = v2;
    }
  }
}

//----- (004C6890) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Rrotate(std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *this, std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *_Wherenode)
{
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v3; // esi@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v4; // ecx@3
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v5; // ecx@5

  v2 = _Wherenode->_Left;
  _Wherenode->_Left = _Wherenode->_Left->_Right;
  v3 = v2->_Right;
  if ( !v3->_Isnil )
    v3->_Parent = _Wherenode;
  v2->_Parent = _Wherenode->_Parent;
  v4 = this->_Myhead;
  if ( _Wherenode == v4->_Parent )
  {
    v4->_Parent = v2;
    v2->_Right = _Wherenode;
    _Wherenode->_Parent = v2;
  }
  else
  {
    v5 = _Wherenode->_Parent;
    if ( _Wherenode == v5->_Right )
    {
      v5->_Right = v2;
      v2->_Right = _Wherenode;
      _Wherenode->_Parent = v2;
    }
    else
    {
      v5->_Left = v2;
      v2->_Right = _Wherenode;
      _Wherenode->_Parent = v2;
    }
  }
}

//----- (004C68F0) --------------------------------------------------------
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>,std::_Iterator_base0>::operator--(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >,std::_Iterator_base0> *this)
{
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >,std::_Iterator_base0> *result; // eax@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v2; // ecx@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *i; // edx@3
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v4; // ecx@4
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v5; // edx@5

  result = this;
  v2 = this->_Ptr;
  if ( v2->_Isnil )
  {
    result->_Ptr = v2->_Right;
    return result;
  }
  i = v2->_Left;
  if ( !v2->_Left->_Isnil )
  {
    v4 = i->_Right;
    if ( !v4->_Isnil )
    {
      do
      {
        v5 = v4;
        v4 = v4->_Right;
      }
      while ( !v4->_Isnil );
      result->_Ptr = v5;
      return result;
    }
LABEL_11:
    result->_Ptr = i;
    return result;
  }
  for ( i = v2->_Parent; !i->_Isnil; i = i->_Parent )
  {
    if ( result->_Ptr != i->_Left )
      break;
    result->_Ptr = i;
  }
  if ( !result->_Ptr->_Isnil )
    goto LABEL_11;
  return result;
}

//----- (004C6950) --------------------------------------------------------
PassiveSkillInfo *__cdecl PasSkillInfoTab::GetByID(unsigned __int16 kID)
{
  unsigned int v1; // esi@1
  PassiveSkillInfo *result; // eax@4

  v1 = 0;
  if ( ITableBase<PassiveSkillInfo,PasSkillInfoTab>::GetTotal() )
  {
    while ( *(_WORD *)CDataReader::GetRecord(
                        (CDataReader *)(ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ms_pkTable + 4),
                        v1) != kID )
    {
      if ( ++v1 >= ITableBase<PassiveSkillInfo,PasSkillInfoTab>::GetTotal() )
        goto LABEL_4;
    }
    result = (PassiveSkillInfo *)CDataReader::GetRecord(
                                   (CDataReader *)(ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ms_pkTable + 4),
                                   v1);
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}
// A8CAAC: using guessed type int ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ms_pkTable;

//----- (004C69A0) --------------------------------------------------------
void __thiscall RidePetWin::SetMoverSpeed(RidePetWin *this, int nSpeed)
{
  RidePetWin *v2; // esi@1
  PgWinText *v3; // ecx@1
  NiRefObjectVtbl *v4; // edi@1
  char *v5; // eax@1
  char *v6; // eax@1

  v2 = this;
  v3 = this->m_pkMoverSpeed;
  v2->m_nMoverSpeed = nSpeed;
  v4 = v3->vfptr;
  v5 = (char *)TextData2::Get(0xE4F43647);
  v6 = fs(v5, nSpeed);
  v4[118].__vecDelDtor((NiRefObject *)v2->m_pkMoverSpeed, (unsigned int)v6);
}

//----- (004C69F0) --------------------------------------------------------
RIDING *__cdecl RidePetTable::GetByInxName(char *pcInxName)
{
  unsigned int v1; // edi@3
  RIDING *result; // eax@6

  if ( pcInxName && *pcInxName )
  {
    v1 = 0;
    if ( ITableBase<RIDING,RidePetTable>::GetTotal() )
    {
      while ( strcmp(
                CDataReader::GetRecord((CDataReader *)(ITableBase<RIDING,RidePetTable>::ms_pkTable + 4), v1) + 2,
                pcInxName) )
      {
        if ( ++v1 >= ITableBase<RIDING,RidePetTable>::GetTotal() )
          goto LABEL_6;
      }
      result = (RIDING *)CDataReader::GetRecord((CDataReader *)(ITableBase<RIDING,RidePetTable>::ms_pkTable + 4), v1);
    }
    else
    {
LABEL_6:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C278: using guessed type int ITableBase<RIDING,RidePetTable>::ms_pkTable;

//----- (004C6A80) --------------------------------------------------------
MobKillAnnounceText *__cdecl MobKillAnnounceTextTab::GetByType(MobKillAnnounceType eType)
{
  unsigned int v1; // esi@1
  MobKillAnnounceText *result; // eax@4

  v1 = 0;
  if ( ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::GetTotal() )
  {
    while ( *(_DWORD *)CDataReader::GetRecord(
                         (CDataReader *)(ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::ms_pkTable + 4),
                         v1) != eType )
    {
      if ( ++v1 >= ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::GetTotal() )
        goto LABEL_4;
    }
    result = (MobKillAnnounceText *)CDataReader::GetRecord(
                                      (CDataReader *)(ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::ms_pkTable
                                                    + 4),
                                      v1);
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}
// A8C280: using guessed type int ITableBase<MobKillAnnounceText,MobKillAnnounceTextTab>::ms_pkTable;

//----- (004C6AD0) --------------------------------------------------------
DamageEffect *__cdecl DamageEffectTab::GetByIndexName(char *pkInxName, unsigned int uiTarget)
{
  unsigned int v2; // edi@3
  DamageEffect *result; // eax@7

  if ( pkInxName && *pkInxName )
  {
    v2 = 0;
    if ( ITableBase<DamageEffect,DamageEffectTab>::GetTotal() )
    {
      while ( strcmp(
                CDataReader::GetRecord((CDataReader *)(ITableBase<DamageEffect,DamageEffectTab>::ms_pkTable + 4), v2)
              + 6,
                pkInxName)
           || (unsigned __int8)CDataReader::GetRecord(
                                 (CDataReader *)(ITableBase<DamageEffect,DamageEffectTab>::ms_pkTable + 4),
                                 v2)[38] != uiTarget )
      {
        if ( ++v2 >= ITableBase<DamageEffect,DamageEffectTab>::GetTotal() )
          goto LABEL_7;
      }
      result = (DamageEffect *)CDataReader::GetRecord(
                                 (CDataReader *)(ITableBase<DamageEffect,DamageEffectTab>::ms_pkTable + 4),
                                 v2);
    }
    else
    {
LABEL_7:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C1DC: using guessed type int ITableBase<DamageEffect,DamageEffectTab>::ms_pkTable;

//----- (004C6B80) --------------------------------------------------------
CollectCard *__cdecl CollectCardTab::GetByItemInx(const char *pcItemInx)
{
  int v1; // eax@1
  unsigned int v2; // esi@1
  char *v3; // eax@5
  char *v4; // ebx@5
  char *v5; // eax@6
  char v6; // cl@7
  unsigned int v7; // eax@8
  unsigned int i; // [sp+Ch] [bp-8h]@4
  unsigned int v10; // [sp+10h] [bp-4h]@2

  v1 = *(_DWORD *)(ITableBase<CollectCard,CollectCardTab>::ms_pkTable + 56);
  v2 = 0;
  if ( v1 )
    v10 = *(_DWORD *)(v1 + 40);
  else
    v10 = 0;
  i = 0;
  if ( v10 <= 0 )
    return 0;
  while ( 1 )
  {
    v3 = CDataReader::GetRecord((CDataReader *)(ITableBase<CollectCard,CollectCardTab>::ms_pkTable + 4), v2);
    v4 = v3;
    if ( v3 )
      break;
LABEL_11:
    i = ++v2;
    if ( v2 >= v10 )
      return 0;
  }
  v5 = v3 + 2;
  do
    v6 = *v5++;
  while ( v6 );
  v7 = v5 - (v4 + 3);
  if ( v7 != strlen(pcItemInx) || strncmp(v4 + 2, pcItemInx, v7) )
  {
    v2 = i;
    goto LABEL_11;
  }
  return (CollectCard *)v4;
}
// A8C210: using guessed type int ITableBase<CollectCard,CollectCardTab>::ms_pkTable;

//----- (004C6C20) --------------------------------------------------------
CollectCardView *__cdecl CollectCardViewTab::GetByCardID(unsigned int uiCardID)
{
  int v1; // eax@1
  unsigned int v2; // edi@2
  unsigned int v3; // esi@4
  CollectCardView *result; // eax@5

  v1 = *(_DWORD *)(ITableBase<CollectCardView,CollectCardViewTab>::ms_pkTable + 56);
  if ( v1 )
    v2 = *(_DWORD *)(v1 + 40);
  else
    v2 = 0;
  v3 = 0;
  if ( v2 )
  {
    while ( 1 )
    {
      result = (CollectCardView *)CDataReader::GetRecord(
                                    (CDataReader *)(ITableBase<CollectCardView,CollectCardViewTab>::ms_pkTable + 4),
                                    v3);
      if ( result )
      {
        if ( result->CC_CardID == (_WORD)uiCardID )
          break;
      }
      if ( ++v3 >= v2 )
        goto LABEL_8;
    }
  }
  else
  {
LABEL_8:
    result = 0;
  }
  return result;
}
// A8C214: using guessed type int ITableBase<CollectCardView,CollectCardViewTab>::ms_pkTable;

//----- (004C6C70) --------------------------------------------------------
ActionEffectInfo *__cdecl ActionEffectInfoTab::GetByID(unsigned __int16 ID)
{
  unsigned int v1; // esi@1
  ActionEffectInfo *result; // eax@4

  v1 = 0;
  if ( ITableBase<ActionEffectInfo,ActionEffectInfoTab>::GetTotal() )
  {
    while ( *(_DWORD *)CDataReader::GetRecord(
                         (CDataReader *)(ITableBase<ActionEffectInfo,ActionEffectInfoTab>::ms_pkTable + 4),
                         v1) != ID )
    {
      if ( ++v1 >= ITableBase<ActionEffectInfo,ActionEffectInfoTab>::GetTotal() )
        goto LABEL_4;
    }
    result = (ActionEffectInfo *)CDataReader::GetRecord(
                                   (CDataReader *)(ITableBase<ActionEffectInfo,ActionEffectInfoTab>::ms_pkTable + 4),
                                   v1);
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}
// A8C144: using guessed type int ITableBase<ActionEffectInfo,ActionEffectInfoTab>::ms_pkTable;

//----- (004C6CC0) --------------------------------------------------------
AbnormalStateInfo *__cdecl AbnormalStateInfoTab::GetByAbstateIndex(unsigned __int16 dwAbstateIndex)
{
  unsigned int v1; // esi@1
  AbnormalStateInfo *result; // eax@4

  v1 = 0;
  if ( ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::GetTotal() )
  {
    while ( *(_DWORD *)(CDataReader::GetRecord(
                          (CDataReader *)(ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable + 4),
                          v1)
                      + 34) != dwAbstateIndex )
    {
      if ( ++v1 >= ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::GetTotal() )
        goto LABEL_4;
    }
    result = (AbnormalStateInfo *)CDataReader::GetRecord(
                                    (CDataReader *)(ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable + 4),
                                    v1);
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}
// A8C2A0: using guessed type int ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;

//----- (004C6D10) --------------------------------------------------------
SubAbStateInfo *__cdecl SubAbStateInfoTab::GetByInxName(char *pcInxName)
{
  unsigned int v1; // edi@3
  SubAbStateInfo *result; // eax@6

  if ( pcInxName && *pcInxName )
  {
    v1 = 0;
    if ( ITableBase<SubAbStateInfo,SubAbStateInfoTab>::GetTotal() )
    {
      while ( strcmp(
                CDataReader::GetRecord(
                  (CDataReader *)(ITableBase<SubAbStateInfo,SubAbStateInfoTab>::ms_pkTable + 4),
                  v1)
              + 2,
                pcInxName) )
      {
        if ( ++v1 >= ITableBase<SubAbStateInfo,SubAbStateInfoTab>::GetTotal() )
          goto LABEL_6;
      }
      result = (SubAbStateInfo *)CDataReader::GetRecord(
                                   (CDataReader *)(ITableBase<SubAbStateInfo,SubAbStateInfoTab>::ms_pkTable + 4),
                                   v1);
    }
    else
    {
LABEL_6:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C2A8: using guessed type int ITableBase<SubAbStateInfo,SubAbStateInfoTab>::ms_pkTable;

//----- (004C6DA0) --------------------------------------------------------
NiUnsharedGeometryGroup *__cdecl ScriptMsgTab::GetScriptMsg(const char *kIndex)
{
  NiUnsharedGeometryGroup *result; // eax@2
  unsigned int v2; // esi@3
  char *v3; // eax@4

  if ( kIndex )
  {
    v2 = 0;
    if ( ITableBase<ScriptMsg,ScriptMsgTab>::GetTotal() )
    {
      while ( 1 )
      {
        v3 = CDataReader::GetRecord((CDataReader *)(ITableBase<ScriptMsg,ScriptMsgTab>::ms_pkTable + 4), v2);
        if ( v3 )
        {
          if ( v3 != (char *)-2 && !strcmp(kIndex, v3 + 2) )
            break;
        }
        if ( ++v2 >= ITableBase<ScriptMsg,ScriptMsgTab>::GetTotal() )
          goto LABEL_8;
      }
      result = (NiUnsharedGeometryGroup *)(v3 + 34);
    }
    else
    {
LABEL_8:
      result = 0;
    }
  }
  else
  {
    result = &unk_96F8EB;
  }
  return result;
}
// A89C90: using guessed type int ITableBase<ScriptMsg,ScriptMsgTab>::ms_pkTable;

//----- (004C6E30) --------------------------------------------------------
std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *__thiscall std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Insert(std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *this, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *_Newnode)
{
  unsigned int v5; // eax@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v6; // edi@4
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v7; // edx@4
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v8; // edx@7
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v9; // edx@9
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v10; // eax@11
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v11; // edx@12
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v12; // esi@12
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v13; // esi@13
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v14; // edx@16
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v15; // esi@18
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v16; // esi@20
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v17; // edx@24
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v18; // esi@24
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v19; // edi@24
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v20; // edi@26
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v21; // edi@28
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v22; // esi@31
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v23; // edx@34
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v24; // esi@34
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v25; // esi@36
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v26; // esi@38
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v27; // edi@44
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v28; // edi@46
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v29; // ecx@52
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *v30; // eax@52

  v5 = this->_Mysize;
  if ( v5 >= 0x7FFFFFFE )
  {
    operator delete(_Newnode);
    std::_Xlength_error("map/set<T> too long");
  }
  this->_Mysize = v5 + 1;
  v6 = _Newnode;
  _Newnode->_Parent = _Wherenode;
  v7 = this->_Myhead;
  if ( _Wherenode == v7 )
  {
    v7->_Parent = _Newnode;
    this->_Myhead->_Left = _Newnode;
    this->_Myhead->_Right = _Newnode;
  }
  else if ( _Addleft )
  {
    _Wherenode->_Left = _Newnode;
    v8 = this->_Myhead;
    if ( _Wherenode == v8->_Left )
      v8->_Left = _Newnode;
  }
  else
  {
    _Wherenode->_Right = _Newnode;
    v9 = this->_Myhead;
    if ( _Wherenode == v9->_Right )
      v9->_Right = _Newnode;
  }
  v10 = _Newnode;
  while ( !v10->_Parent->_Color )
  {
    v11 = v10->_Parent;
    v12 = v11->_Parent;
    if ( v11 == v12->_Left )
    {
      v13 = v12->_Right;
      if ( v13->_Color )
      {
        if ( v10 == v11->_Right )
        {
          v10 = v10->_Parent;
          v14 = v11->_Right;
          v10->_Right = v14->_Left;
          if ( !v14->_Left->_Isnil )
            v14->_Left->_Parent = v10;
          v14->_Parent = v10->_Parent;
          v15 = this->_Myhead;
          if ( v10 == v15->_Parent )
          {
            v15->_Parent = v14;
          }
          else
          {
            v16 = v10->_Parent;
            if ( v10 == v16->_Left )
              v16->_Left = v14;
            else
              v16->_Right = v14;
          }
          v14->_Left = v10;
          v10->_Parent = v14;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Left;
        v17->_Left = v17->_Left->_Right;
        v19 = v18->_Right;
        if ( !v19->_Isnil )
          v19->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v20 = this->_Myhead;
        if ( v17 == v20->_Parent )
        {
          v20->_Parent = v18;
          v18->_Right = v17;
        }
        else
        {
          v21 = v17->_Parent;
          if ( v17 == v21->_Right )
          {
            v21->_Right = v18;
            v18->_Right = v17;
          }
          else
          {
            v21->_Left = v18;
            v18->_Right = v17;
          }
        }
LABEL_50:
        v6 = _Newnode;
        v17->_Parent = v18;
        continue;
      }
      v11->_Color = 1;
      v13->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
    else
    {
      v22 = v12->_Left;
      if ( v22->_Color )
      {
        if ( v10 == v11->_Left )
        {
          v10 = v10->_Parent;
          v23 = v11->_Left;
          v10->_Left = v23->_Right;
          v24 = v23->_Right;
          if ( !v24->_Isnil )
            v24->_Parent = v10;
          v23->_Parent = v10->_Parent;
          v25 = this->_Myhead;
          if ( v10 == v25->_Parent )
          {
            v25->_Parent = v23;
          }
          else
          {
            v26 = v10->_Parent;
            if ( v10 == v26->_Right )
              v26->_Right = v23;
            else
              v26->_Left = v23;
          }
          v23->_Right = v10;
          v10->_Parent = v23;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Right;
        v17->_Right = v18->_Left;
        if ( !v18->_Left->_Isnil )
          v18->_Left->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v27 = this->_Myhead;
        if ( v17 == v27->_Parent )
        {
          v27->_Parent = v18;
        }
        else
        {
          v28 = v17->_Parent;
          if ( v17 == v28->_Left )
            v28->_Left = v18;
          else
            v28->_Right = v18;
        }
        v18->_Left = v17;
        goto LABEL_50;
      }
      v11->_Color = 1;
      v22->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
  }
  v29 = this->_Myhead->_Parent;
  v30 = result;
  result->_Ptr = v6;
  v29->_Color = 1;
  return v30;
}

//----- (004C7060) --------------------------------------------------------
std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *__thiscall std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::begin(std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *this, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *result)
{
  unsigned int v2; // edx@1
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *v3; // eax@1
  std::_Container_proxy *v4; // ecx@1

  v2 = this->_Myoff;
  v3 = result;
  v4 = this->_Myproxy;
  result->_Mynextiter = 0;
  result->_Myproxy = v4;
  result->_Myoff = v2;
  return v3;
}

//----- (004C7080) --------------------------------------------------------
std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *__thiscall std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::end(std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *this, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *result)
{
  unsigned int v2; // edx@1
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *v3; // eax@1
  std::_Container_proxy *v4; // ecx@1

  v2 = this->_Myoff + this->_Mysize;
  v3 = result;
  v4 = this->_Myproxy;
  result->_Mynextiter = 0;
  result->_Myproxy = v4;
  result->_Myoff = v2;
  return v3;
}

//----- (004C70A0) --------------------------------------------------------
void __thiscall std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::_Splice_same(std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *this, std::_List_const_iterator<std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > _Where, std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *_Right, std::_List_const_iterator<std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > _First, std::_List_const_iterator<std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > _Last, unsigned int _Count)
{
  unsigned int v6; // edx@2
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v7; // ecx@5

  if ( this != _Right )
  {
    v6 = this->_Mysize;
    if ( 41698710 - v6 < _Count )
      std::_Xlength_error("list<T> too long");
    this->_Mysize = _Count + v6;
    _Right->_Mysize -= _Count;
  }
  _First._Ptr->_Prev->_Next = _Last._Ptr;
  _Last._Ptr->_Prev->_Next = _Where._Ptr;
  _Where._Ptr->_Prev->_Next = _First._Ptr;
  v7 = _Where._Ptr->_Prev;
  _Where._Ptr->_Prev = _Last._Ptr->_Prev;
  _Last._Ptr->_Prev = _First._Ptr->_Prev;
  _First._Ptr->_Prev = v7;
}

//----- (004C7120) --------------------------------------------------------
std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *__stdcall std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::_Buynode<SHINE_ITEM_STRUCT &>(std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *_Next, std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *_Prev, SHINE_ITEM_STRUCT *_Val)
{
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *result; // eax@1
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v5; // edx@2
  SHINE_ITEM_STRUCT *v6; // esi@3
  char *v7; // edi@3
  std::exception pExceptionObject; // [sp+0h] [bp-Ch]@5

  result = (std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *)operator new(0x70u);
  if ( !result )
  {
    _Next = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Next);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v5 = _Prev;
  result->_Next = _Next;
  result->_Prev = v5;
  if ( result != (std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *)-8 )
  {
    v6 = _Val;
    qmemcpy(&result->_Myval, _Val, 0x64u);
    v6 = (SHINE_ITEM_STRUCT *)((char *)v6 + 100);
    v7 = (char *)&result->_Myval.itemattr.Bracelet + 98;
    *(_WORD *)v7 = v6->itemid;
    v7[2] = v6->itemattr.blot.lot;
  }
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (004C7190) --------------------------------------------------------
CollectWin::sCardInfo *__cdecl std::_Uninit_copy<std::_Vector_const_iterator<std::_Vector_val<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo>>>,CollectWin::sCardInfo *,std::allocator<CollectWin::sCardInfo>>(std::_Vector_const_iterator<std::_Vector_val<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo> > > _First, std::_Vector_const_iterator<std::_Vector_val<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo> > > _Last, CollectWin::sCardInfo *_Dest)
{
  CollectWin::sCardInfo *v3; // ecx@1
  CollectWin::sCardInfo *result; // eax@1

  v3 = _First._Ptr;
  for ( result = _Dest; v3 != _Last._Ptr; ++result )
  {
    if ( result )
    {
      result->m_uiGrade = v3->m_uiGrade;
      result->m_uiCardID = v3->m_uiCardID;
      result->m_uiStar = v3->m_uiStar;
      result->m_uiSerial = v3->m_uiSerial;
      result->m_tRegistTime = v3->m_tRegistTime;
    }
    ++v3;
  }
  return result;
}

//----- (004C71E0) --------------------------------------------------------
std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > >,bool> *__thiscall std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Linsert(std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *this, std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > >,bool> *result, std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *_Node, bool _Leftish)
{
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v4; // edx@1
  std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *v5; // ebx@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v6; // ecx@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v7; // eax@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v8; // esi@1
  bool v9; // cl@1
  unsigned __int16 v10; // di@2
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v11; // edi@10
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v12; // edx@12
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > >,bool> *v13; // eax@12
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v14; // ecx@15
  bool _Addleft; // [sp+Ch] [bp-4h]@1

  v4 = _Node;
  v5 = this;
  v6 = this->_Myhead;
  v7 = v6->_Parent;
  v8 = v6;
  v9 = 1;
  _Addleft = 1;
  if ( !v7->_Isnil )
  {
    v10 = _Node->_Myval;
    do
    {
      v8 = v7;
      if ( _Leftish )
        v9 = v7->_Myval >= v10;
      else
        v9 = v10 < v7->_Myval;
      _Addleft = v9;
      if ( v9 )
        v7 = v7->_Left;
      else
        v7 = v7->_Right;
    }
    while ( !v7->_Isnil );
  }
  v11 = v8;
  *(_DWORD *)&_Leftish = v8;
  if ( v9 )
  {
    if ( v8 == v5->_Myhead->_Left )
    {
      v12 = std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Insert(
              v5,
              (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *)&_Leftish,
              1,
              v8,
              _Node)->_Ptr;
      v13 = result;
      result->first._Ptr = v12;
      result->second = 1;
      return v13;
    }
    std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >,std::_Iterator_base0> *)&_Leftish);
    v11 = (std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *)_Leftish;
    v4 = _Node;
  }
  if ( v11->_Myval >= v4->_Myval )
  {
    operator delete(v4);
    v13 = result;
    result->first._Ptr = v11;
    result->second = 0;
  }
  else
  {
    v14 = std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Insert(
            v5,
            (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *)&_Leftish,
            _Addleft,
            v8,
            v4)->_Ptr;
    v13 = result;
    result->first._Ptr = v14;
    result->second = 1;
  }
  return v13;
}

//----- (004C72C0) --------------------------------------------------------
std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *__thiscall std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Buynode<unsigned short>(std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *this, unsigned __int16 *_Val)
{
  std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *v2; // esi@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *result; // eax@1
  std::exception pExceptionObject; // [sp+4h] [bp-Ch]@5

  v2 = this;
  result = (std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *)operator new(0x10u);
  if ( !result )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  result->_Left = v2->_Myhead;
  result->_Parent = v2->_Myhead;
  result->_Right = v2->_Myhead;
  *(_WORD *)&result->_Color = 0;
  if ( result != (std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *)-12 )
    result->_Myval = *_Val;
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (004C7330) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::replace(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int _Off, unsigned int _N0, unsigned int _Count, char _Ch)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v5; // esi@1
  unsigned int v6; // ecx@1
  unsigned int v7; // ebx@3
  unsigned int v8; // eax@3
  unsigned int v9; // ecx@7
  unsigned int v10; // edx@8
  char *v11; // eax@9
  char *v12; // edx@12
  unsigned int v13; // edi@17
  unsigned int v14; // edx@19
  unsigned int v15; // edx@22
  char *v16; // eax@23
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result; // eax@26
  bool v18; // cf@33
  char *v19; // [sp+Ch] [bp-4h]@30
  int _Nm; // [sp+1Ch] [bp+Ch]@7

  v5 = this;
  v6 = this->_Mysize;
  if ( v6 < _Off )
    std::_Xout_of_range("invalid string position");
  v7 = _N0;
  v8 = v6 - _Off;
  if ( v6 - _Off < _N0 )
    v7 = v6 - _Off;
  if ( -1 - _Count <= v6 - v7 )
    std::_Xlength_error("string too long");
  v9 = _Count;
  _Nm = v8 - v7;
  if ( _Count < v7 )
  {
    v10 = v5->_Myres;
    if ( v10 < 0x10 )
      v11 = (char *)v5;
    else
      v11 = v5->_Bx._Ptr;
    if ( v10 < 0x10 )
      v12 = (char *)v5;
    else
      v12 = v5->_Bx._Ptr;
    memmove(&v12[_Off] + _Count, &v11[_Off] + v7, _Nm);
    v9 = _Count;
  }
  if ( !v9 && !v7 )
    return v5;
  v13 = v9 + v5->_Mysize - v7;
  if ( v13 > 0xFFFFFFFE )
    std::_Xlength_error("string too long");
  v14 = v5->_Myres;
  if ( v14 < v13 )
  {
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Copy(v5, v13, v5->_Mysize);
    v9 = _Count;
    if ( v13 )
    {
LABEL_21:
      if ( v7 < v9 )
      {
        v15 = v5->_Myres;
        if ( v15 < 0x10 )
          v16 = (char *)v5;
        else
          v16 = v5->_Bx._Ptr;
        if ( v15 < 0x10 )
          v19 = (char *)v5;
        else
          v19 = v5->_Bx._Ptr;
        memmove(&v19[_Off] + v9, &v16[_Off] + v7, _Nm);
        v9 = _Count;
      }
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Chassign(v5, _Off, v9, _Ch);
      v18 = v5->_Myres < 0x10;
      v5->_Mysize = v13;
      if ( !v18 )
      {
        v5->_Bx._Ptr[v13] = 0;
        return v5;
      }
      v5->_Bx._Buf[v13] = 0;
    }
    return v5;
  }
  if ( v13 )
    goto LABEL_21;
  v5->_Mysize = 0;
  if ( v14 < 0x10 )
  {
    result = v5;
    v5->_Bx._Buf[0] = 0;
  }
  else
  {
    *v5->_Bx._Ptr = 0;
    result = v5;
  }
  return result;
}

//----- (004C74A0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::find(std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *result, const unsigned int *_Keyval)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v3; // edx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v4; // eax@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *v5; // eax@8

  v3 = this->_Myhead;
  v4 = v3->_Parent;
  while ( !v4->_Isnil )
  {
    if ( v4->_Myval.first >= *_Keyval )
    {
      v3 = v4;
      v4 = v4->_Left;
    }
    else
    {
      v4 = v4->_Right;
    }
  }
  if ( v3 == this->_Myhead || *_Keyval < v3->_Myval.first )
  {
    v5 = result;
    result->_Ptr = this->_Myhead;
  }
  else
  {
    v5 = result;
    result->_Ptr = v3;
  }
  return v5;
}

//----- (004C7510) --------------------------------------------------------
std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *__thiscall std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::operator++(std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *this, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *result, int __formal)
{
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *v3; // eax@1
  std::_Container_proxy *v4; // edx@1
  std::_Container_proxy **v5; // edx@2
  unsigned int v6; // edx@4

  v3 = result;
  v4 = this->_Myproxy;
  result->_Myproxy = 0;
  result->_Mynextiter = 0;
  if ( v4 )
  {
    v5 = &v4->_Mycont->_Myproxy;
    if ( v5 )
      result->_Myproxy = *v5;
  }
  v6 = this->_Myoff;
  result->_Myoff = v6;
  this->_Myoff = v6 + 1;
  return v3;
}

//----- (004C7550) --------------------------------------------------------
ItemUseTask *__thiscall ISingletonTask<ItemUseTask>::`vector deleting destructor'(ItemUseTask *this, unsigned int a2)
{
  ItemUseTask *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ISingletonTask<ItemUseTask>::`vftable'{for `NiRefObject'};
  this->vfptr = (IDirectMessengerVtbl *)&ISingletonTask<ItemUseTask>::`vftable'{for `IDirectMessenger'};
  ISingletonTask<ItemUseTask>::ms_pkSingletonTask = 0;
  ITask::~ITask((ITask *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 982550: using guessed type void (__thiscall *ISingletonTask<ItemUseTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98256C: using guessed type int (__thiscall *ISingletonTask<ItemUseTask>::`vftable'{for `NiRefObject'})(void *p, char);
// A8CAC0: using guessed type int ISingletonTask<ItemUseTask>::ms_pkSingletonTask;

//----- (004C7590) --------------------------------------------------------
void __thiscall AttackSequence::AttackSequence(AttackSequence *this)
{
  this->kDamageInfoSet.kDamageList.m_kAllocator.m_uiCount = 0;
  this->kDamageInfoSet.kDamageList.m_pkHead = 0;
  this->kDamageInfoSet.kDamageList.m_pkTail = 0;
  this->kDamageInfoSet.kDamageList.vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTList<DamageInfo *>::`vftable';
  *(_WORD *)&this->bStarted = 0;
  this->bLastSequence = 0;
  this->bDamageRecved = 0;
  this->iAttSeqCode = -1;
  this->m_SeqNum = -1;
}
// 973DFC: using guessed type int (__thiscall *NiTList<DamageInfo *>::`vftable')(void *p, char);

//----- (004C75C0) --------------------------------------------------------
char __thiscall EffectObjectMgr::RemoveAllEffectObject(EffectObjectMgr *this)
{
  EffectObjectMgr *v1; // edi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v2; // eax@2
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v3; // esi@2
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v4; // eax@4
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *j; // eax@5
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *i; // eax@8
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v7; // ecx@13
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v8; // ebx@13
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v9; // esi@13

  v1 = this;
  if ( this->m_mapEffectObject._Mysize )
  {
    v2 = this->m_mapEffectObject._Myhead;
    v3 = v2->_Left;
    if ( v2->_Left != v2 )
    {
      do
      {
        EffectMgr::RemoveEffect(&g_kEffectMgr, (Effect *)v3->_Myval.second);
        if ( !v3->_Isnil )
        {
          v4 = v3->_Right;
          if ( v4->_Isnil )
          {
            for ( i = v3->_Parent; !i->_Isnil; i = i->_Parent )
            {
              if ( v3 != i->_Right )
                break;
              v3 = i;
            }
            v3 = i;
          }
          else
          {
            v3 = v3->_Right;
            for ( j = v4->_Left; !j->_Isnil; j = j->_Left )
              v3 = j;
          }
        }
      }
      while ( v3 != v1->m_mapEffectObject._Myhead );
    }
    v7 = v1->m_mapEffectObject._Myhead;
    v8 = v7->_Parent;
    v9 = v7->_Parent;
    if ( !v8->_Isnil )
    {
      do
      {
        std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Erase(
          (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapEffectObject.comp,
          v9->_Right);
        v9 = v9->_Left;
        operator delete(v8);
        v8 = v9;
      }
      while ( !v9->_Isnil );
    }
    v1->m_mapEffectObject._Myhead->_Parent = v1->m_mapEffectObject._Myhead;
    v1->m_mapEffectObject._Myhead->_Left = v1->m_mapEffectObject._Myhead;
    v1->m_mapEffectObject._Myhead->_Right = v1->m_mapEffectObject._Myhead;
    v1->m_mapEffectObject._Mysize = 0;
  }
  return 1;
}

//----- (004C7690) --------------------------------------------------------
void __thiscall std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::_Insert<std::_List_const_iterator<std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>(std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *this, std::_List_const_iterator<std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > _Where, std::_List_const_iterator<std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > _First, std::_List_const_iterator<std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > _Last, std::forward_iterator_tag __formal)
{
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *v5; // edi@1
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v6; // eax@1
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v7; // eax@3
  unsigned int v8; // ecx@3
  int v9; // [sp+0h] [bp-28h]@1
  std::_List_iterator<std::_List_val<float,std::allocator<float> > > result; // [sp+10h] [bp-18h]@1
  std::_List_const_iterator<std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > _Next; // [sp+14h] [bp-14h]@1
  int *v12; // [sp+18h] [bp-10h]@1
  int v13; // [sp+24h] [bp-4h]@1

  v12 = &v9;
  v5 = this;
  result._Ptr = (std::_List_nod<float,std::allocator<float> >::_Node *)this;
  v6 = _First._Ptr;
  _Next._Ptr = _First._Ptr;
  v13 = 0;
  while ( v6 != _Last._Ptr )
  {
    v7 = std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::_Buynode<SHINE_ITEM_STRUCT &>(
           _Where._Ptr,
           _Where._Ptr->_Prev,
           &v6->_Myval);
    v8 = v5->_Mysize;
    if ( 41698710 - v8 < 1 )
      std::_Xlength_error("list<T> too long");
    v5->_Mysize = v8 + 1;
    _Where._Ptr->_Prev = v7;
    v7->_Prev->_Next = v7;
    v6 = _First._Ptr->_Next;
    _First._Ptr = _First._Ptr->_Next;
  }
}

//----- (004C7760) --------------------------------------------------------
void __thiscall CharMgr::AddFadeOutDeleteChar(CharMgr *this, Char *pkChar)
{
  Char *v2; // edi@1
  CharMgr *v3; // esi@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v4; // eax@1
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > >,bool> result; // [sp+8h] [bp-8h]@1

  v2 = pkChar;
  v3 = this;
  Char::StartFadeOut(pkChar);
  pkChar = (Char *)v2->m_kHandle;
  v4 = std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Buynode<unsigned short>(
         (std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v3->m_kmapFadeOutDeletedChar.comp,
         (unsigned __int16 *)&pkChar);
  std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Linsert(
    (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v3->m_kmapFadeOutDeletedChar.comp,
    &result,
    v4,
    0);
}

//----- (004C77B0) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result, unsigned int _Off, unsigned int _Count)
{
  result->_Mysize = 0;
  result->_Myres = 15;
  result->_Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(result, this, _Off, _Count);
  return result;
}

//----- (004C77F0) --------------------------------------------------------
ItemUseTask *__cdecl ISingletonTask<ItemUseTask>::Run()
{
  ItemUseTask *result; // eax@1
  ITask *v1; // eax@2
  ItemUseTask *v2; // esi@2

  result = (ItemUseTask *)ISingletonTask<ItemUseTask>::ms_pkSingletonTask;
  if ( !ISingletonTask<ItemUseTask>::ms_pkSingletonTask )
  {
    v1 = (ITask *)operator new(0x5Cu);
    v2 = (ItemUseTask *)v1;
    if ( v1 )
    {
      ITask::ITask(v1, 0);
      v2->vfptr = (NiRefObjectVtbl *)&ItemUseTask::`vftable'{for `NiRefObject'};
      v2->vfptr = (IDirectMessengerVtbl *)&ItemUseTask::`vftable'{for `IDirectMessenger'};
    }
    else
    {
      v2 = 0;
    }
    result = v2;
    ISingletonTask<ItemUseTask>::ms_pkSingletonTask = (int)v2;
  }
  return result;
}
// 98258C: using guessed type void (__thiscall *ItemUseTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9825A8: using guessed type int (__thiscall *ItemUseTask::`vftable'{for `NiRefObject'})(void *p, char);
// A8CAC0: using guessed type int ISingletonTask<ItemUseTask>::ms_pkSingletonTask;

//----- (004C7870) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<unsigned long,ProduceInfo *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,ProduceInfo *>>,1>>::insert<std::pair<unsigned long const,ProduceInfo *>>(std::_Tree<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > >,bool> *result, std::pair<unsigned int,Effect *> *_Val)
{
  std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v4; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v5; // edx@1
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v6; // ecx@1
  bool v7; // zf@1
  unsigned int v8; // edi@2
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> >::_Node *v9; // ecx@7
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > >,bool> *v10; // eax@7

  v3 = (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)this;
  v4 = std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(
         (std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)this,
         (std::pair<int const ,int> *)_Val);
  v5 = v3->_Myhead;
  v6 = v5->_Parent;
  v7 = v6->_Isnil == 0;
  LOBYTE(_Val) = 1;
  if ( v7 )
  {
    v8 = v4->_Myval.first;
    do
    {
      v5 = v6;
      LOBYTE(_Val) = v8 < v6->_Myval.first;
      if ( (_BYTE)_Val )
        v6 = v6->_Left;
      else
        v6 = v6->_Right;
    }
    while ( !v6->_Isnil );
  }
  v9 = (std::_Tree_nod<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> >::_Node *)std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(v3, (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)&_Val, (bool)_Val, v5, v4)->_Ptr;
  v10 = result;
  result->first._Ptr = v9;
  result->second = 1;
  return v10;
}

//----- (004C78E0) --------------------------------------------------------
char __cdecl MobNoFadeInTab::IsNoFadeIn(const char *pcMobInx)
{
  int v1; // eax@1
  unsigned int v2; // esi@1
  char *v3; // eax@5
  unsigned int v4; // eax@6
  unsigned int v5; // ebx@6
  unsigned int v6; // esi@6
  unsigned int v7; // ecx@6
  unsigned int v8; // edi@8
  const char *v9; // eax@8
  int v10; // eax@10
  bool v11; // zf@10
  signed int v12; // eax@12
  bool v13; // bl@15
  unsigned int i; // [sp+10h] [bp-38h]@4
  unsigned int v16; // [sp+18h] [bp-30h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v17; // [sp+1Ch] [bp-2Ch]@6
  int v18; // [sp+44h] [bp-4h]@15

  v1 = *(_DWORD *)(ITableBase<MobNoFadeIn,MobNoFadeInTab>::ms_pkTable + 56);
  v2 = 0;
  if ( v1 )
    v16 = *(_DWORD *)(v1 + 40);
  else
    v16 = 0;
  i = 0;
  if ( v16 <= 0 )
    return 0;
  while ( 1 )
  {
    v3 = CDataReader::GetRecord((CDataReader *)(ITableBase<MobNoFadeIn,MobNoFadeInTab>::ms_pkTable + 4), v2);
    if ( v3 )
      break;
LABEL_19:
    i = ++v2;
    if ( v2 >= v16 )
      return 0;
  }
  v17._Myres = 15;
  v17._Mysize = 0;
  v17._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v17, v3, strlen(v3));
  v4 = strlen(pcMobInx);
  v5 = v17._Mysize;
  v6 = v4;
  v7 = v17._Mysize;
  if ( v17._Mysize >= v4 )
    v7 = v4;
  v8 = v17._Myres;
  v9 = v17._Bx._Ptr;
  if ( v17._Myres < 0x10 )
    v9 = (const char *)&v17;
  v10 = std::char_traits<char>::compare(v9, pcMobInx, v7);
  v11 = v10 == 0;
  if ( !v10 )
  {
    if ( v5 >= v6 )
      v12 = v5 != v6;
    else
      v12 = -1;
    v11 = v12 == 0;
  }
  v13 = v11;
  v18 = -1;
  if ( v8 >= 0x10 )
    operator delete(v17._Bx._Ptr);
  v17._Myres = 15;
  v17._Mysize = 0;
  v17._Bx._Buf[0] = 0;
  if ( !v13 )
  {
    v2 = i;
    goto LABEL_19;
  }
  return 1;
}
// A8C250: using guessed type int ITableBase<MobNoFadeIn,MobNoFadeInTab>::ms_pkTable;

//----- (004C7A30) --------------------------------------------------------
void __thiscall std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>(std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *this, std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *_Right)
{
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *v2; // esi@1
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v3; // eax@1
  std::_List_const_iterator<std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > v4; // ecx@2
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v5; // eax@2
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v6; // edx@2
  int v7; // [sp+0h] [bp-34h]@1
  std::exception pExceptionObject; // [sp+10h] [bp-24h]@3
  char *_What; // [sp+1Ch] [bp-18h]@3
  std::list<float,std::allocator<float> > *v10; // [sp+20h] [bp-14h]@1
  int *v11; // [sp+24h] [bp-10h]@1
  int v12; // [sp+30h] [bp-4h]@2

  v11 = &v7;
  v2 = this;
  v10 = (std::list<float,std::allocator<float> > *)this;
  this->_Mysize = 0;
  v3 = (std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *)operator new(0x70u);
  if ( !v3 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v2->_Myhead = v3;
  v3->_Next = v3;
  v2->_Myhead->_Prev = v2->_Myhead;
  v4._Ptr = v2->_Myhead->_Next;
  v5 = _Right->_Myhead;
  v6 = _Right->_Myhead->_Next;
  v12 = 0;
  LOBYTE(v12) = 1;
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::_Insert<std::_List_const_iterator<std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>(
    v2,
    v4,
    (std::_List_const_iterator<std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > >)v6,
    (std::_List_const_iterator<std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > >)v5,
    (std::forward_iterator_tag)_Right);
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (004C7AF0) --------------------------------------------------------
void __thiscall std::vector<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo>>::vector<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo>>(std::vector<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo> > *this, std::vector<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo> > *_Right)
{
  std::vector<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo> > *v2; // esi@1
  unsigned int v3; // edi@1
  CollectWin::sCardInfo *v4; // eax@4
  CollectWin::sCardInfo *v5; // ecx@4
  CollectWin::sCardInfo *v6; // ST00_4@4
  int v7; // [sp+0h] [bp-24h]@1
  std::vector<HeightMapMaker::TriangleIndex *,std::allocator<HeightMapMaker::TriangleIndex *> > *v8; // [sp+10h] [bp-14h]@1
  int *v9; // [sp+14h] [bp-10h]@1
  int v10; // [sp+20h] [bp-4h]@4

  v9 = &v7;
  v2 = this;
  v8 = (std::vector<HeightMapMaker::TriangleIndex *,std::allocator<HeightMapMaker::TriangleIndex *> > *)this;
  this->_Myfirst = 0;
  this->_Mylast = 0;
  this->_Myend = 0;
  v3 = _Right->_Mylast - _Right->_Myfirst;
  this->_Myfirst = 0;
  this->_Mylast = 0;
  this->_Myend = 0;
  if ( v3 )
  {
    if ( v3 > 0xCCCCCCC )
      std::_Xlength_error("vector<T> too long");
    v4 = std::allocator<CollectWin::sCardInfo>::allocate(v3);
    v2->_Myend = &v4[v3];
    v2->_Myfirst = v4;
    v2->_Mylast = v4;
    v5 = _Right->_Mylast;
    v6 = _Right->_Myfirst;
    v10 = 0;
    v2->_Mylast = std::_Uninit_copy<std::_Vector_const_iterator<std::_Vector_val<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo>>>,CollectWin::sCardInfo *,std::allocator<CollectWin::sCardInfo>>(
                    (std::_Vector_const_iterator<std::_Vector_val<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo> > >)v6,
                    (std::_Vector_const_iterator<std::_Vector_val<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo> > >)v5,
                    v4);
  }
}

//----- (004C7BD0) --------------------------------------------------------
void __thiscall std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::_Assign_rv(std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *this, std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *_Right)
{
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *v2; // esi@1
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v3; // eax@2
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v4; // edi@3

  v2 = this;
  if ( this != _Right )
  {
    v3 = this->_Myhead->_Next;
    this->_Myhead->_Next = this->_Myhead;
    this->_Myhead->_Prev = this->_Myhead;
    this->_Mysize = 0;
    if ( v3 != this->_Myhead )
    {
      do
      {
        v4 = v3->_Next;
        operator delete(v3);
        v3 = v4;
      }
      while ( v4 != v2->_Myhead );
    }
    if ( _Right->_Mysize )
      std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::_Splice_same(
        v2,
        (std::_List_const_iterator<std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > >)v2->_Myhead->_Next,
        _Right,
        (std::_List_const_iterator<std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > >)_Right->_Myhead->_Next,
        (std::_List_const_iterator<std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > >)_Right->_Myhead,
        _Right->_Mysize);
  }
}

//----- (004C7C30) --------------------------------------------------------
char __thiscall EffectObjectMgr::AddEffectObject(EffectObjectMgr *this, PROTO_NC_BRIEFINFO_EFFECTBLAST_CMD *kProto)
{
  double v2; // st7@1
  EffectObjectMgr *v3; // ebx@1
  float fYPos; // ST18_4@1
  float fXPos; // ST14_4@1
  unsigned int v6; // ecx@1
  unsigned int v7; // eax@1
  unsigned int v8; // edx@1
  unsigned int v9; // ecx@1
  unsigned int v10; // edx@1
  unsigned int v11; // eax@1
  int v12; // ecx@1
  _BYTE v13[12]; // ST10_12@2
  _BYTE v14[12]; // ST04_12@2
  Effect *v15; // edi@2
  _BYTE v16[12]; // ST14_12@3
  Effect *v17; // eax@3
  NiNode *v19; // eax@7
  std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *v20; // ebx@9
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v21; // eax@9
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > result; // [sp+1Ch] [bp-CCh]@9
  NiPoint3 kDir; // [sp+20h] [bp-C8h]@1
  NiPoint3 pos3Pos; // [sp+2Ch] [bp-BCh]@1
  unsigned int v25; // [sp+38h] [bp-B0h]@1
  unsigned int _Keyval; // [sp+3Ch] [bp-ACh]@1
  NiMatrix3 v27; // [sp+40h] [bp-A8h]@1
  char szName[128]; // [sp+64h] [bp-84h]@1

  v2 = (double)kProto->coord.xy.y;
  v3 = this;
  pos3Pos.y = NiPoint3::ZERO.y;
  pos3Pos.x = NiPoint3::ZERO.x;
  v25 = (unsigned int)this;
  pos3Pos.z = NiPoint3::ZERO.z;
  fXPos = (double)kProto->coord.xy.x;
  fYPos = v2;
  World::GetGroundPos(&g_kWorld, fXPos, fYPos, &pos3Pos, 0);
  *(float *)&_Keyval = (NI_PI + NI_PI) * (double)kProto->coord.dir / 180.0;
  NiMatrix3::MakeZRotation(&v27, *(float *)&_Keyval);
  NiMatrix3::operator*(&v27, &kDir, &World::ms_kNorthDir);
  v6 = kProto->effectname.n8_code[2];
  v7 = kProto->effectname.n8_code[1];
  *(_DWORD *)szName = kProto->effectname.n8_code[0];
  v8 = kProto->effectname.n8_code[3];
  *(_DWORD *)&szName[8] = v6;
  v9 = kProto->effectname.n8_code[5];
  *(_DWORD *)&szName[12] = v8;
  v10 = kProto->effectname.n8_code[6];
  *(_DWORD *)&szName[4] = v7;
  v11 = kProto->effectname.n8_code[4];
  *(_DWORD *)&szName[20] = v9;
  v12 = kProto->detach;
  *(_DWORD *)&szName[24] = v10;
  *(_DWORD *)&szName[16] = v11;
  *(_DWORD *)&szName[28] = kProto->effectname.n8_code[7];
  szName[32] = 0;
  if ( (_WORD)v12 == -1 )
  {
    *(float *)v13 = kDir.x;
    *(_QWORD *)&v13[4] = *(_QWORD *)&kDir.y;
    *(float *)v14 = pos3Pos.x;
    *(_QWORD *)&v14[4] = *(_QWORD *)&pos3Pos.y;
    v15 = EffectMgr::JustCreateEffect(&g_kEffectMgr, szName, *(NiPoint3 *)v14, *(NiPoint3 *)v13, Timer::ms_fCurTime, 1);
  }
  else
  {
    *(float *)v16 = kDir.x;
    *(_QWORD *)&v16[4] = *(_QWORD *)&kDir.y;
    v17 = EffectMgr::JustCreateAttachEffect(&g_kEffectMgr, szName, v12, *(NiPoint3 *)v16, Timer::ms_fCurTime);
    v15 = v17;
    if ( !v17 )
      return 0;
    LOBYTE(v17[1].vfptr) = 0;
  }
  if ( !v15 )
    return 0;
  v19 = v15->m_spDefaultEffect.m_pObject;
  if ( v19 )
  {
    _Keyval = kProto->scale;
    *(float *)&_Keyval = (double)(signed int)_Keyval / 1000.0;
    *(float *)&_Keyval = fabs(*(float *)&_Keyval);
    v19->m_kLocal.m_fScale = *(float *)&_Keyval;
  }
  v15->m_bLoop = *(_BYTE *)&kProto->flag & 1;
  EffectMgr::PlayEffect(&g_kEffectMgr, v15);
  v20 = (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v3->m_mapEffectObject.comp;
  _Keyval = kProto->handle;
  v21 = std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::find(
          v20,
          &result,
          &_Keyval)->_Ptr;
  _Keyval = (unsigned int)v21;
  if ( *(std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node **)(v25 + 8) != v21 )
  {
    EffectMgr::RemoveEffect(&g_kEffectMgr, (Effect *)v21->_Myval.second);
    std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
      (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)v20,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > *)&result,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > >)_Keyval);
  }
  v25 = kProto->handle;
  *std::map<unsigned long,NiTexture *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiTexture *>>>::operator[](
     (std::map<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> > > *)v20,
     &v25) = (unsigned int)v15;
  return 1;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// B622CC: using guessed type const float NI_PI;

//----- (004C7EE0) --------------------------------------------------------
EffectObjectMgr *__thiscall EffectObjectMgr::`scalar deleting destructor'(EffectObjectMgr *this, unsigned int a2)
{
  EffectObjectMgr *v2; // edi@1
  char *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v4; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v5; // ST04_4@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > result; // [sp+Ch] [bp-14h]@1
  std::map<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> > > *v8; // [sp+10h] [bp-10h]@1
  int v9; // [sp+1Ch] [bp-4h]@1

  v2 = this;
  v3 = (char *)&this->m_mapEffectObject;
  this->vfptr = (EffectObjectMgrVtbl *)&EffectObjectMgr::`vftable';
  v8 = &this->m_mapEffectObject;
  v4 = this->m_mapEffectObject._Myhead;
  v5._Ptr = v4->_Left;
  v9 = 0;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&this->m_mapEffectObject.comp,
    &result,
    v5,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >)v4);
  operator delete(*((void **)v3 + 1));
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9825C0: using guessed type int (__thiscall *EffectObjectMgr::`vftable')(void *p, char);

//----- (004C7F60) --------------------------------------------------------
void __thiscall mhInfoWin::SetRoomMakerName(mhInfoWin *this, char *pcStr)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v2; // esi@1
  bool v3; // cf@1
  char *v4; // eax@2
  void *(__thiscall *v5)(NiRefObject *, unsigned int); // edx@6
  mhInfoWin *v6; // [sp+10h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Right; // [sp+14h] [bp-2Ch]@4
  int v8; // [sp+3Ch] [bp-4h]@4

  v2 = &this->m_FullRoomMakerName;
  v3 = this->m_FullRoomMakerName._Myres < 0x10;
  v6 = this;
  this->m_FullRoomMakerName._Mysize = 0;
  if ( v3 )
    v4 = this->m_FullRoomMakerName._Bx._Buf;
  else
    v4 = v2->_Bx._Ptr;
  *v4 = 0;
  _Right._Myres = 15;
  _Right._Mysize = 0;
  _Right._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Right, pcStr, strlen(pcStr));
  v8 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(v2, &_Right);
  v8 = -1;
  if ( _Right._Myres >= 0x10 )
    operator delete(_Right._Bx._Ptr);
  v5 = v6->m_pkTextFieldWin[0]->vfptr[118].__vecDelDtor;
  _Right._Myres = 15;
  _Right._Mysize = 0;
  _Right._Bx._Buf[0] = 0;
  ((void (__cdecl *)(char *))v5)(pcStr);
}

//----- (004C8040) --------------------------------------------------------
EffectObjectMgr *__cdecl EffectObjectMgr::GetMgr()
{
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v0; // eax@2
  std::exception pExceptionObject; // [sp+8h] [bp-1Ch]@5
  char *_What; // [sp+14h] [bp-10h]@5
  int v4; // [sp+20h] [bp-4h]@2

  if ( !(`EffectObjectMgr::GetMgr'::`2'::`local static guard' & 1) )
  {
    `EffectObjectMgr::GetMgr'::`2'::`local static guard' |= 1u;
    v4 = 0;
    `EffectObjectMgr::GetMgr'::`2'::kEffectObjectMgr.vfptr = (EffectObjectMgrVtbl *)&EffectObjectMgr::`vftable';
    dword_A8CAD0 = 0;
    v0 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)operator new(0x18u);
    if ( !v0 )
    {
      _What = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&_What);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
    stru_A8CACC._Ptr = v0;
    v0->_Left = v0;
    stru_A8CACC._Ptr->_Parent = stru_A8CACC._Ptr;
    stru_A8CACC._Ptr->_Right = stru_A8CACC._Ptr;
    stru_A8CACC._Ptr->_Color = 1;
    stru_A8CACC._Ptr->_Isnil = 1;
    atexit(`EffectObjectMgr::GetMgr'::`2'::`dynamic atexit destructor for 'kEffectObjectMgr'');
  }
  return &`EffectObjectMgr::GetMgr'::`2'::kEffectObjectMgr;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9825C0: using guessed type int (__thiscall *EffectObjectMgr::`vftable')(void *p, char);
// A8CAD0: using guessed type int dword_A8CAD0;
// A8CAD8: using guessed type int `EffectObjectMgr::GetMgr'::`2'::`local static guard';

//----- (004C8120) --------------------------------------------------------
void __thiscall AreaInfoMgr::~AreaInfoMgr(AreaInfoMgr *this)
{
  AreaInfoMgr *v1; // esi@1
  std::_List_nod<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData> >::_Node *v2; // ecx@1
  std::_List_nod<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData> >::_Node *v3; // eax@1
  std::_List_nod<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData> >::_Node *v4; // edi@2

  v1 = this;
  this->vfptr = (AreaInfoMgrVtbl *)&AreaInfoMgr::`vftable';
  v2 = this->m_listRequest._Myhead;
  v3 = v2->_Next;
  v2->_Next = v2;
  v1->m_listRequest._Myhead->_Prev = v1->m_listRequest._Myhead;
  v1->m_listRequest._Mysize = 0;
  if ( v3 != v1->m_listRequest._Myhead )
  {
    do
    {
      v4 = v3->_Next;
      operator delete(v3);
      v3 = v4;
    }
    while ( v4 != v1->m_listRequest._Myhead );
  }
  operator delete(v1->m_listRequest._Myhead);
}
// 9825C8: using guessed type int (__thiscall *AreaInfoMgr::`vftable')(void *p, char);

//----- (004C8170) --------------------------------------------------------
AreaInfoMgr *__thiscall AreaInfoMgr::`vector deleting destructor'(AreaInfoMgr *this, unsigned int a2)
{
  AreaInfoMgr *v2; // esi@1

  v2 = this;
  AreaInfoMgr::~AreaInfoMgr(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (004C81A0) --------------------------------------------------------
AreaInfoMgr *__cdecl AreaInfoMgr::GetInstance()
{
  std::_List_nod<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData> >::_Node *v0; // eax@2
  std::exception pExceptionObject; // [sp+8h] [bp-1Ch]@5
  char *_What; // [sp+14h] [bp-10h]@5
  int v4; // [sp+20h] [bp-4h]@2

  if ( !(`AreaInfoMgr::GetInstance'::`2'::`local static guard' & 1) )
  {
    `AreaInfoMgr::GetInstance'::`2'::`local static guard' |= 1u;
    v4 = 0;
    `AreaInfoMgr::GetInstance'::`2'::kMgr.vfptr = (AreaInfoMgrVtbl *)&AreaInfoMgr::`vftable';
    `AreaInfoMgr::GetInstance'::`2'::kMgr.m_listRequest._Mysize = 0;
    v0 = (std::_List_nod<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData> >::_Node *)operator new(0x30u);
    if ( !v0 )
    {
      _What = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&_What);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
    `AreaInfoMgr::GetInstance'::`2'::kMgr.m_listRequest._Myhead = v0;
    v0->_Next = v0;
    `AreaInfoMgr::GetInstance'::`2'::kMgr.m_listRequest._Myhead->_Prev = `AreaInfoMgr::GetInstance'::`2'::kMgr.m_listRequest._Myhead;
    `AreaInfoMgr::GetInstance'::`2'::kMgr.m_pkFrameWork = 0;
    atexit(`AreaInfoMgr::GetInstance'::`2'::`dynamic atexit destructor for 'kMgr'');
  }
  return &`AreaInfoMgr::GetInstance'::`2'::kMgr;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9825C8: using guessed type int (__thiscall *AreaInfoMgr::`vftable')(void *p, char);
// A8CAF0: using guessed type int `AreaInfoMgr::GetInstance'::`2'::`local static guard';

//----- (004C8260) --------------------------------------------------------
double __thiscall NiPoint3::SqrLength(NiPoint3 *this)
{
  return (float)(this->y * this->y + this->x * this->x + this->z * this->z);
}

//----- (004C8290) --------------------------------------------------------
void __stdcall GameFrameWork::ChangeCampMode(int bCamp, int byMode)
{
  char *v3; // eax@2

  ((void (__stdcall *)(_DWORD, _DWORD))g_pkMainChar->vfptr[1].SetAbStateProperty)(bCamp, byMode);
  if ( (_BYTE)bCamp )
  {
    v3 = Inventory::GetPlayMiniHouseSound(&g_kInventory);
    SoundMgr::PlayInterfaceSound(&g_kSoundMgr, v3);
  }
}

//----- (004C82D0) --------------------------------------------------------
void __thiscall GameFrameWork::UpdateMainCharOnRevActNone(GameFrameWork *this, float fCurTime)
{
  GameFrameWork *v2; // ebx@1
  Char *v3; // esi@1
  int v4; // edi@1
  int v5; // edi@8
  int v6; // eax@8
  double v7; // st7@8
  void (__thiscall *v8)(AbStateInfectee *, ABSTATEINDEX, bool, int); // edx@8
  double v9; // st7@8
  NiPoint3 v10; // [sp+Ch] [bp-14h]@8
  double v11; // [sp+18h] [bp-8h]@8
  float fAttackableDist; // [sp+1Ch] [bp-4h]@8

  v2 = this;
  v3 = (Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1];
  v4 = MainChar::GetTargetType(
         (MainChar *)g_pkMainChar,
         (Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1]);
  if ( v3
    && (unsigned __int8)((int (__thiscall *)(Char *))v3->vfptr[1].Deaffect)(v3)
    && !Char::IsNPC(v3)
    && ((unsigned __int8)((int (__thiscall *)(Char *))v3->vfptr[1].Affect)(v3) || v4 == 3) )
  {
    if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[7].GetAbstateColor)()
      || !AttackSequenceManager::GetAttSeqCount((AttackSequenceManager *)&g_pkMainChar->vfptr)
      || (v5 = ((int (__thiscall *)(Char *))v3->vfptr[6].Deaffect)(v3),
          v6 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)(),
          v10.x = *(float *)v5 - *(float *)v6,
          v10.y = *(float *)(v5 + 4) - *(float *)(v6 + 4),
          v7 = *(float *)(v5 + 8) - *(float *)(v6 + 8),
          v8 = g_pkMainChar->vfptr[9].SetAbStateProperty,
          v10.z = v7,
          ((void (__stdcall *)(Char *))v8)(v3),
          fAttackableDist = v7,
          v11 = g_fAttackableDist + fAttackableDist,
          v9 = NiPoint3::SqrLength(&v10),
          v11 * v11 >= v9) )
    {
      if ( g_pkMainChar == v3 )
      {
        g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
        LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) = 0;
      }
    }
    else
    {
      g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
      LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) = 0;
      GameFrameWork::OnDoublePickChar(v2, v3);
    }
  }
  else
  {
    LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) = 0;
    g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[7].dwEffectIndex[0] = 0;
  }
}
// A6F544: using guessed type float g_fAttackableDist;

//----- (004C8450) --------------------------------------------------------
void __thiscall GameFrameWork::ActJump(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  NiPoint3 *v2; // eax@13

  v1 = this;
  if ( ((int (*)(void))g_pkMainChar->vfptr[2].~AbStateInfectee)() > 0
    && !AttackSequenceManager::IsDuringAttackInServer((AttackSequenceManager *)&g_pkMainChar->vfptr)
    && (signed int)AttackSequenceManager::GetAttSeqCount((AttackSequenceManager *)&g_pkMainChar->vfptr) <= 0
    && !(unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[15].AddAbStateByAbstateIndex)()
    && !(unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[1].AddAbStateByAbstateIndex)()
    && !Char::IsActGathering(g_pkMainChar)
    && !Char::IsActProducing(g_pkMainChar)
    && Char::IsMoverMovable(g_pkMainChar)
    && v1->m_kSkillCasting.eState == SCS_IDLE )
  {
    ITask::DirectDispatchAll(32, 0);
    if ( Char::IsActProducing(g_pkMainChar) )
      ITask::DirectDispatchAll(35, 0);
    if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[11].Deaffect)() )
    {
      GameFrameWork::NcActJumpCmd(v1);
    }
    else
    {
      ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[7].AddAbStateByAbstateIndex)(1);
      v2 = (NiPoint3 *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
      GameFrameWork::NcActStopReq(v1, v2);
    }
  }
}

//----- (004C8570) --------------------------------------------------------
void __stdcall GameFrameWork::UpdateMainCharOnRevActPickItem(float fCurTime)
{
  g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
}

//----- (004C8590) --------------------------------------------------------
char __thiscall GameFrameWork::UpdateMainCharMove(GameFrameWork *this, float fCurTime)
{
  GameFrameWork *v2; // esi@1
  NiPoint3 *v3; // eax@2
  Mover *v4; // ecx@2
  char result; // al@4

  v2 = this;
  if ( MainChar::TryMove8((MainChar *)g_pkMainChar, fCurTime) )
  {
    result = 1;
  }
  else
  {
    LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) = 0;
    g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
    ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[7].AddAbStateByAbstateIndex)(1);
    v3 = (NiPoint3 *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
    GameFrameWork::NcActStopReq(v2, v3);
    v4 = g_pkMainChar->m_pkMover;
    if ( v4 )
      ((void (__stdcall *)(_DWORD))v4->vfptr[7].AddAbStateByAbstateIndex)(1);
    result = 0;
  }
  return result;
}

//----- (004C8620) --------------------------------------------------------
void __thiscall GameFrameWork::StopMove(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  NiPoint3 *v2; // eax@2
  Mover *v3; // ecx@2

  v1 = this;
  if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[7].GetAbstateColor)() )
  {
    ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[7].AddAbStateByAbstateIndex)(1);
    ((void (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
    v2 = (NiPoint3 *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
    GameFrameWork::NcActStopReq(v1, v2);
    v3 = g_pkMainChar->m_pkMover;
    if ( v3 )
      ((void (__stdcall *)(_DWORD))v3->vfptr[7].AddAbStateByAbstateIndex)(1);
  }
}

//----- (004C8690) --------------------------------------------------------
void __thiscall GameFrameWork::Assist(GameFrameWork *this, Char *pkChar)
{
  GameFrameWork *v2; // edi@1
  unsigned __int16 v3; // ax@4
  Char *v4; // eax@4

  v2 = this;
  if ( pkChar && pkChar->m_bUserCharacter && pkChar != g_pkMainChar )
  {
    v3 = AttackSequenceManager::GetLastTargetHandle((AttackSequenceManager *)&pkChar->vfptr);
    v4 = CharMgr::GetChar(&g_kCharMgr, v3);
    if ( v4 )
      GameFrameWork::OnOnePickChar(v2, v4);
    else
      GameFrameWork::NcBatAssistReq(v2, pkChar);
  }
}

//----- (004C86F0) --------------------------------------------------------
void __thiscall GameFrameWork::Stick(GameFrameWork *this, Char *pkChar, bool bStart)
{
  GameFrameWork *v3; // edi@1
  Char *v4; // eax@4
  Char *v5; // ebx@4
  Mover *v6; // esi@6
  int v7; // esi@11
  int v8; // edi@11
  void (__thiscall *v9)(AbStateInfectee *, ABSTATEINDEX, bool, int); // eax@11
  float v10; // ST20_4@12
  float v11; // ST24_4@12
  float v12; // ST28_4@12
  int v13; // eax@12
  float v14; // eax@12
  float v15; // ST14_4@12
  float v16; // ST18_4@12
  float v17; // ST1C_4@12
  NiPoint3 pos3Pos; // [sp+28h] [bp-10h]@11
  GameFrameWork *v19; // [sp+34h] [bp-4h]@1
  float bStarta; // [sp+44h] [bp+Ch]@11

  v3 = this;
  v19 = this;
  this->m_pkStickChar = 0;
  if ( pkChar
    && pkChar != g_pkMainChar
    && !AttackSequenceManager::GetAttSeqCount((AttackSequenceManager *)&g_pkMainChar->vfptr) )
  {
    v4 = CharMgr::GetChar(&g_kCharMgr, pkChar);
    v5 = v4;
    if ( v4 )
    {
      v3->m_pkStickChar = v4;
      if ( (unsigned __int8)((int (__thiscall *)(Char *))v4->vfptr[15].Deaffect)(v4) != 1
        || (v6 = v3->m_pkStickChar->m_pkMover) == 0 )
      {
        v6 = (Mover *)v5;
      }
      if ( CNSTimer_Interval::IsRun_GetCount(&v3->m_kStickTimer, Timer::ms_fCurTime)
        && (unsigned __int8)((int (__thiscall *)(Mover *))v6->vfptr[7].GetAbstateColor)(v6)
        || bStart )
      {
        v7 = ((int (__thiscall *)(Char *))v5->vfptr[6].Deaffect)(v5);
        v8 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
        v9 = g_pkMainChar->vfptr[9].SetAbStateProperty;
        pos3Pos.x = *(float *)v7 - *(float *)v8;
        pos3Pos.y = *(float *)(v7 + 4) - *(float *)(v8 + 4);
        pos3Pos.z = *(float *)(v7 + 8) - *(float *)(v8 + 8);
        ((void (__stdcall *)(Char *))v9)(v5);
        bStarta = pos3Pos.x * pos3Pos.x + pos3Pos.y * pos3Pos.y + pos3Pos.z * pos3Pos.z;
        if ( bStarta > 2500.0 )
        {
          pos3Pos.x = *(float *)v8 - *(float *)v7;
          pos3Pos.y = *(float *)(v8 + 4) - *(float *)(v7 + 4);
          pos3Pos.z = *(float *)(v8 + 8) - *(float *)(v7 + 8);
          NiPoint3::Unitize(&pos3Pos);
          v10 = pos3Pos.x * 50.0;
          v11 = pos3Pos.y * 50.0;
          v12 = 50.0 * pos3Pos.z;
          v13 = ((int (__thiscall *)(Char *))v5->vfptr[6].Deaffect)(v5);
          pos3Pos.x = *(float *)v13;
          pos3Pos.y = *(float *)(v13 + 4);
          v14 = *(float *)(v13 + 8);
          v15 = v10 + pos3Pos.x;
          pos3Pos.x = v15;
          v16 = pos3Pos.y + v11;
          pos3Pos.y = v16;
          v17 = v14 + v12;
          pos3Pos.z = v17;
          GameFrameWork::OnPickGround(v19, &pos3Pos, 0);
        }
      }
    }
    else
    {
      ((void (__stdcall *)(signed int))g_pkMainChar->vfptr[7].AddAbStateByAbstateIndex)(1);
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004C88D0) --------------------------------------------------------
bool __thiscall GameFrameWork::CheckCancelingMoveUpdate(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  GameFrameWork::SkillCastState v3; // eax@5
  NiPoint3 *v4; // eax@8

  v1 = this;
  if ( g_pkMainChar->m_bWillDead || g_pkMainChar->m_kAbStateProperty.iUnMovableCount )
    return 1;
  if ( Char::HaveCurrentSkillMoveAttrib(g_pkMainChar) )
    goto LABEL_11;
  v3 = v1->m_kSkillCasting.eState;
  if ( v3 == 2 )
    return 1;
  if ( v3 == 3 )
  {
    if ( !Char::GetReserveSkillSmash(g_pkMainChar) )
    {
      v4 = (NiPoint3 *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
      GameFrameWork::NcActStopReq(v1, v4);
      GameFrameWork::NcBatSkillbashCastabortReq(v1);
      Char::CancelSkillAction(g_pkMainChar, 1);
      goto LABEL_9;
    }
    return 1;
  }
LABEL_9:
  if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[15].AddAbStateByAbstateIndex)()
    && !Char::CancelSkillActionWhenHitTimePassed(g_pkMainChar) )
  {
    return 1;
  }
LABEL_11:
  if ( g_pkMainChar->m_kAbStateProperty.iFearCount > 0 || g_pkMainChar->m_kAbStateProperty.iUnMovableCount )
    return 1;
  return g_pkMainChar->m_kAbStateProperty.iKarenCaptivateStateCount > 0;
}

//----- (004C8990) --------------------------------------------------------
void __thiscall GameFrameWork::UpdateMainCharOnRevActPickGround(GameFrameWork *this, float fCurTime, int bMoveModeChange)
{
  GameFrameWork *v3; // edi@1
  NiPoint3 *v4; // eax@9
  Mover *v5; // esi@11
  NiPoint3 kFrom; // [sp+4h] [bp-18h]@13
  NiPoint3 kRevPos; // [sp+10h] [bp-Ch]@9

  v3 = this;
  if ( GameFrameWork::CheckCancelingMoveUpdate(this) == 1 )
  {
    g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
  }
  else
  {
    if ( (signed int)AttackSequenceManager::GetAttSeqCount((AttackSequenceManager *)&g_pkMainChar->vfptr) > 0 )
    {
      GameFrameWork::NcBatBashstopCmd(v3);
      AttackSequenceManager::HardStopAttack((AttackSequenceManager *)&g_pkMainChar->vfptr);
    }
    if ( Char::IsActGathering(g_pkMainChar) )
      ITask::DirectDispatchAll(32, 0);
    if ( Char::IsActProducing(g_pkMainChar) )
      ITask::DirectDispatchAll(35, 0);
    v4 = MainChar::GetRevserveMovePos((MainChar *)g_pkMainChar);
    kRevPos.x = v4->x;
    kRevPos.y = v4->y;
    kRevPos.z = v4->z;
    if ( !AbStateInfectee::IsInList((AbStateInfectee *)&g_pkMainChar->vfptr, STA_PARALYSIS)
      && !AbStateInfectee::IsInList((AbStateInfectee *)&g_pkMainChar->vfptr, SAA_STOPANI) )
    {
      v5 = g_pkMainChar->m_pkMover;
      if ( !v5 || g_pkMainChar->m_uiMoverSlot )
      {
        ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))g_pkMainChar->vfptr[7].SetAbStateProperty)(
          &kRevPos,
          bMoveModeChange,
          &Char::INVALIDPOINT3,
          1);
        ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[6].SetAbStateProperty)(&kFrom);
        if ( ((int (*)(void))g_pkMainChar->vfptr[7].Affect)() )
          GameFrameWork::NcActRunReq(v3, &kFrom, &kRevPos);
        else
          GameFrameWork::NcActWalkReq(v3, &kFrom, &kRevPos);
      }
      else
      {
        ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v5->vfptr[7].SetAbStateProperty)(
          v5,
          &kRevPos,
          bMoveModeChange,
          &Char::INVALIDPOINT3,
          1);
        MoveToTarget::Copy(&v5->m_kMoveToTarget, &g_pkMainChar->m_kMoveToTarget);
        ((void (__thiscall *)(_DWORD, _DWORD))v5->vfptr[6].SetAbStateProperty)(v5, &kFrom);
        if ( ((int (__thiscall *)(_DWORD))v5->vfptr[7].Affect)(v5) )
          GameFrameWork::NcActRunReq(v3, &kFrom, &kRevPos);
        else
          GameFrameWork::NcActWalkReq(v3, &kFrom, &kRevPos);
      }
      g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
      LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) = 0;
    }
  }
}

//----- (004C8B70) --------------------------------------------------------
void __userpurge GameFrameWork::MainCharMoveToChar(GameFrameWork *this@<ecx>, int a2@<edi>, Char *pkTargetChar, float fDistance, int eNextAct)
{
  GameFrameWork *v5; // ebx@1
  void (__thiscall *v6)(AbStateInfectee *, ABSTATEINDEX, bool, int); // edx@2
  signed int v7; // edi@3
  signed int v8; // esi@4
  float fY; // ST20_4@5
  NiUnsharedGeometryGroup *v10; // eax@8
  NiPoint3 kFrom; // [sp+2Ch] [bp-2Ch]@12
  NiPoint3 kDirToMainChar; // [sp+38h] [bp-20h]@2
  NiPoint3 kGroundPos; // [sp+44h] [bp-14h]@2
  float v14; // [sp+50h] [bp-8h]@4
  float v15; // [sp+54h] [bp-4h]@5
  int i; // [sp+60h] [bp+8h]@3
  int j; // [sp+64h] [bp+Ch]@4

  v5 = this;
  if ( !g_pkMainChar->m_kAbStateProperty.iUnMovableCount )
  {
    Char::GetDirToChar(pkTargetChar, &kDirToMainChar, g_pkMainChar);
    NiPoint3::Unitize(&kDirToMainChar);
    v6 = pkTargetChar->vfptr[6].SetAbStateProperty;
    kDirToMainChar.x = kDirToMainChar.x * fDistance;
    kDirToMainChar.y = kDirToMainChar.y * fDistance;
    kDirToMainChar.z = fDistance * kDirToMainChar.z;
    ((void (__thiscall *)(Char *, NiPoint3 *, int))v6)(pkTargetChar, &kGroundPos, a2);
    kGroundPos.x = kDirToMainChar.x + kGroundPos.x;
    kGroundPos.y = kDirToMainChar.y + kGroundPos.y;
    kGroundPos.z = kGroundPos.z + kDirToMainChar.z;
    if ( World::IsBlock8(&g_kWorld, kGroundPos.x, kGroundPos.y) == 1 )
    {
      v7 = -20;
      i = -20;
      while ( 2 )
      {
        v8 = -20;
        j = -20;
        v14 = (double)i;
        do
        {
          v15 = (double)j + kGroundPos.y;
          fY = v15;
          v15 = v14 + kGroundPos.x;
          if ( !World::IsBlock8(&g_kWorld, v15, fY) )
          {
            kGroundPos.x = (double)i + kGroundPos.x;
            kGroundPos.y = (double)j + kGroundPos.y;
            goto LABEL_10;
          }
          j = ++v8;
        }
        while ( v8 < 20 );
        i = ++v7;
        if ( v7 < 20 )
          continue;
        break;
      }
      v10 = TextData::Get(0x2D517FA1u);
      GameFrameWork::AddSysMsg(v5, (const char *)v10);
      ((void (__cdecl *)(signed int))g_pkMainChar->vfptr[7].AddAbStateByAbstateIndex)(1);
    }
    else
    {
LABEL_10:
      ((void (__stdcall *)(NiPoint3 *, _DWORD, NiColor *, signed int))g_pkMainChar->vfptr[7].SetAbStateProperty)(
        &kGroundPos,
        0,
        &Char::INVALIDPOINT3,
        1);
      kDirToMainChar = kGroundPos;
      if ( dword_B25060 )
      {
        World::GetAdvGroundPos(&g_kWorld, kGroundPos.x, kGroundPos.y, &kDirToMainChar);
        dword_B25060->m_kLocal.m_Translate = kDirToMainChar;
        NiAVObject::Update(dword_B25060, 0.0, 1);
      }
      ((void (__cdecl *)(NiPoint3 *))g_pkMainChar->vfptr[6].SetAbStateProperty)(&kFrom);
      if ( eNextAct )
      {
        MainChar::SetStartReserveAct((MainChar *)g_pkMainChar, (MainChar::ReserveAct)eNextAct);
      }
      else if ( LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) )
      {
        MainChar::SetStartReserveAct((MainChar *)g_pkMainChar, RESERVEACT_ATTACK);
      }
      else
      {
        MainChar::SetStartReserveAct((MainChar *)g_pkMainChar, 0);
      }
      MainChar::SetRevserveMovePos((MainChar *)g_pkMainChar, &kGroundPos);
    }
  }
}
// 4C8B70: could not find valid save-restore pair for edi

//----- (004C8D80) --------------------------------------------------------
void __thiscall GameFrameWork::MainCharMoveToChar(GameFrameWork *this, NiPoint3 *rkPos, float fDistance, int eNextAct)
{
  GameFrameWork *v4; // edi@1
  NiPoint3 *v5; // eax@2
  float v6; // edx@2
  float v7; // eax@2
  _BYTE v8[12]; // ST04_12@4
  NiPoint3 kFrom; // [sp+8h] [bp-30h]@4
  NiPoint3 result; // [sp+14h] [bp-24h]@2
  NiPoint3 kDirToMainChar; // [sp+20h] [bp-18h]@2
  NiPoint3 kGroundPos; // [sp+2Ch] [bp-Ch]@2

  v4 = this;
  if ( !g_pkMainChar->m_kAbStateProperty.iUnMovableCount )
  {
    v5 = Char::GetDirToPosition(g_pkMainChar, &result, rkPos);
    kDirToMainChar.x = -v5->x;
    kDirToMainChar.y = -v5->y;
    kDirToMainChar.z = -v5->z;
    NiPoint3::Unitize(&kDirToMainChar);
    v6 = rkPos->y;
    v7 = rkPos->z;
    kGroundPos.x = rkPos->x;
    kDirToMainChar.x = kDirToMainChar.x * fDistance;
    kDirToMainChar.y = fDistance * kDirToMainChar.y;
    kGroundPos.x = kGroundPos.x + kDirToMainChar.x;
    kGroundPos.y = v6 + kDirToMainChar.y;
    kGroundPos.z = 0.0;
    if ( !GameFrameWork::CheckCancelingMoveUpdate(v4) )
      ((void (__stdcall *)(NiPoint3 *, _DWORD, NiColor *, signed int))g_pkMainChar->vfptr[7].SetAbStateProperty)(
        &kGroundPos,
        0,
        &Char::INVALIDPOINT3,
        1);
    *(float *)v8 = kGroundPos.x;
    *(_QWORD *)&v8[4] = *(_QWORD *)&kGroundPos.y;
    World::SetMoveTargetPointPos(&g_kWorld, *(NiPoint3 *)v8);
    ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[6].SetAbStateProperty)(&kFrom);
    if ( eNextAct )
    {
      MainChar::SetStartReserveAct((MainChar *)g_pkMainChar, (MainChar::ReserveAct)eNextAct);
    }
    else if ( LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) )
    {
      MainChar::SetStartReserveAct((MainChar *)g_pkMainChar, RESERVEACT_ATTACK);
    }
    else
    {
      MainChar::SetStartReserveAct((MainChar *)g_pkMainChar, 0);
    }
    MainChar::SetRevserveMovePos((MainChar *)g_pkMainChar, &kGroundPos);
  }
}

//----- (004C8EA0) --------------------------------------------------------
void __thiscall GameFrameWork::CurTargetAssist(GameFrameWork *this)
{
  Char *v1; // esi@1
  GameFrameWork *v2; // edi@1
  unsigned __int16 v3; // ax@4
  Char *v4; // eax@4

  v1 = (Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1];
  v2 = this;
  if ( v1 && v1->m_bUserCharacter && v1 != g_pkMainChar )
  {
    v3 = AttackSequenceManager::GetLastTargetHandle((AttackSequenceManager *)&v1->vfptr);
    v4 = CharMgr::GetChar(&g_kCharMgr, v3);
    if ( v4 )
      GameFrameWork::OnOnePickChar(v2, v4);
    else
      GameFrameWork::NcBatAssistReq(v2, v1);
  }
}

//----- (004C8EF0) --------------------------------------------------------
void __thiscall GameFrameWork::AutoRun(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  if ( ((int (*)(void))g_pkMainChar->vfptr[2].~AbStateInfectee)() > 0
    && !AttackSequenceManager::IsDuringAttackInServer((AttackSequenceManager *)&g_pkMainChar->vfptr)
    && (signed int)AttackSequenceManager::GetAttSeqCount((AttackSequenceManager *)&g_pkMainChar->vfptr) <= 0
    && !(unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[15].AddAbStateByAbstateIndex)()
    && !(unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[1].AddAbStateByAbstateIndex)()
    && !Char::IsActGathering(g_pkMainChar)
    && !Char::IsActProducing(g_pkMainChar)
    && Char::IsMoverMovable(g_pkMainChar)
    && g_pkMainChar->m_kAbStateProperty.iFearCount <= 0
    && g_pkMainChar->m_kAbStateProperty.iKarenCaptivateStateCount <= 0
    && v1->m_kSkillCasting.eState == SCS_IDLE )
  {
    KeyboardMoveProcess::SetAutoRun(&v1->m_kCharMover, v1->m_kCharMover.m_bAutoRun == 0);
    if ( !v1->m_kCharMover.m_bAutoRun )
      GameFrameWork::StopMove(v1);
  }
}

//----- (004C8FD0) --------------------------------------------------------
char __stdcall GameFrameWork::CheckUsableDirection(unsigned __int16 kSkillID, NiPoint3 TargetPos)
{
  return 1;
}

//----- (004C8FE0) --------------------------------------------------------
char __thiscall GameFrameWork::CheckWeaponCostumeWhenAttackTry(GameFrameWork *this)
{
  GameFrameWork *v1; // edi@1
  Item *v2; // esi@1
  Item *v3; // ebx@1
  Item *v4; // eax@1
  char *v5; // eax@4
  const char *v6; // eax@7
  int v8; // [sp-4h] [bp-10h]@4

  v1 = this;
  v2 = Inventory::GetEquipedWeaponAcc(&g_kInventory);
  v3 = Inventory::GetEquipedWeapon(&g_kInventory);
  v4 = Inventory::GetShieldAccEquip(&g_kInventory);
  if ( v2 )
  {
    if ( !((int (__thiscall *)(_DWORD))v2->vfptr[19].__vecDelDtor)(v2) )
    {
      v8 = (int)v2->m_pkInfo->Name;
      v5 = (char *)TextData2::Get(0xF3D5672u);
      goto LABEL_7;
    }
  }
  else if ( !v4 )
  {
    return 1;
  }
  if ( !v3 )
  {
    v5 = (char *)TextData2::Get(0x43B5B3C5u);
LABEL_7:
    v6 = fs(v5, v8);
    GameFrameWork::AddSysMsg(v1, v6);
    return 0;
  }
  return 1;
}

//----- (004C9060) --------------------------------------------------------
void __thiscall GameFrameWork::MainCharTryUseSkill(GameFrameWork *this, int kSkillID, float fCurTime, Char *pkTarget)
{
  GameFrameWork *v4; // esi@1
  int v5; // ebx@4
  int v6; // edi@4
  NiUnsharedGeometryGroup *v7; // eax@8
  ActiveSkillInfo *v8; // eax@11
  ActiveSkillInfo *v9; // ebx@11
  Name3 *v10; // eax@13
  MapInfo *v11; // eax@13
  NiUnsharedGeometryGroup *v12; // eax@15
  NiPoint3 *v13; // eax@30
  int v14; // eax@39
  Char *v15; // eax@43
  NiUnsharedGeometryGroup *v16; // eax@45
  Name3 result; // [sp+4h] [bp-Ch]@13
  int nCastTime; // [sp+18h] [bp+8h]@11
  ActiveSkillInfo *nCastTimea; // [sp+18h] [bp+8h]@36
  int nCastTimeb; // [sp+18h] [bp+8h]@39

  v4 = this;
  if ( !g_pkMainChar->m_kAbStateProperty.iUnAttackableCount )
  {
    if ( g_pkMainChar->m_byMode == 1 )
    {
      Char::SetMode(g_pkMainChar, 2);
      GameFrameWork::NcActChangeModeReq(v4, 2);
    }
    v5 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
    v6 = kSkillID;
    if ( (unsigned __int8)(*(int (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                                + 16))(
                            ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                            kSkillID) )
    {
      if ( (unsigned __int16)kSkillID <= *(_WORD *)(v5 + 200)
        && *(_DWORD *)(*(_DWORD *)(v5 + 196) + 4 * (unsigned __int16)kSkillID) )
      {
        if ( g_pkMainChar->m_kAbStateProperty.iUnAttackableCount )
        {
          v7 = TextData2::Get(0x2446376Au);
          GameFrameWork::AddSysMsg(v4, (const char *)v7);
          return;
        }
        if ( !Char::CheckActState(g_pkMainChar, 500000)
          && !(unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[20].Deaffect)() )
        {
          ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[13].AddAbStateByAbstateIndex)(0);
          v8 = IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::GetByID(kSkillID);
          v9 = v8;
          nCastTime = (int)v8;
          if ( v8 )
          {
            if ( v8->CannotInside != 1 )
              goto LABEL_16;
            v10 = World::GetMapName(&g_kWorld, &result);
            v11 = MapInfoTab::GetByMapName(v10);
            if ( v11 )
            {
              if ( v11->InSide == 1 )
              {
                v12 = TextData2::Get(0x788F9E81u);
                GameFrameWork::AddSysMsg(v4, (const char *)v12);
                return;
              }
LABEL_16:
              if ( g_pkMainChar->m_bWillDead )
                return;
              if ( v9->DemandType == 6 || GameFrameWork::CheckWeaponCostumeWhenAttackTry(v4) )
              {
                if ( (_WORD)v6 == 1620 && pkTarget->m_bIsRevived )
                {
                  MainChar::ResetReserveSkill((MainChar *)g_pkMainChar);
                  g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
                }
                else if ( !Skill::IsSkillUsePossible(v6) || Char::IsDuringSkillActionAndHitTimeNotPassed(g_pkMainChar) )
                {
                  v16 = TextData::Get(0xF6EB252E);
                  GameFrameWork::AddSysMsg(v4, (const char *)v16);
                }
                else
                {
                  ((void (__thiscall *)(_DWORD))pkTarget->vfptr[6].Deaffect)(pkTarget);
                  MainChar::ResetReserveSkill((MainChar *)g_pkMainChar);
                  g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
                  if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[7].GetAbstateColor)() == 1
                    && ((unsigned __int8)((int (__thiscall *)(_DWORD))pkTarget->vfptr[1].Affect)(pkTarget)
                     && *(_DWORD *)(nCastTime + 180) < 0x33u
                     || !Skill::IsMovingSkill(v6)) )
                  {
                    if ( v4->m_kCharMover.m_bAutoRun )
                      KeyboardMoveProcess::SetAutoRun(&v4->m_kCharMover, 0);
                    v4->m_pkStickChar = 0;
                    ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[7].AddAbStateByAbstateIndex)(1);
                    v13 = (NiPoint3 *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
                    GameFrameWork::NcActStopReq(v4, v13);
                  }
                  ITask::DirectDispatchAll(32, 0);
                  if ( Char::IsActProducing(g_pkMainChar) )
                    ITask::DirectDispatchAll(35, 0);
                  if ( v4->m_kSkillCasting.eState == 1 )
                    v4->m_kSkillCasting.eState = 0;
                  AttackSequenceManager::HardStopAttack((AttackSequenceManager *)&g_pkMainChar->vfptr);
                  if ( IIDTableBase<ActiveSkillViewInfo,ActSkillViewInfoTab,unsigned short>::GetByID(v6) )
                  {
                    nCastTimea = IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::GetByID(v6);
                    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))g_pkMainChar->vfptr[9].GetAbstateColor)(
                      pkTarget,
                      1,
                      v6);
                    if ( nCastTimea )
                    {
                      if ( nCastTimea->CastTime )
                      {
                        nCastTimeb = nCastTimea->CastTime;
                        v14 = AbStateInfectee::GetAddCastingTime((AbStateInfectee *)&g_pkMainChar->vfptr);
                        CastingProgressWin::StartCasting(v4->m_pkCastingProgressBar, v14 + nCastTimeb, 0);
                      }
                      else
                      {
                        Char::SetReserveSkillSmash(g_pkMainChar, 1);
                      }
                    }
                    v4->m_kSkillCasting.kTargetHandle = pkTarget->m_kHandle;
                    v4->m_kSkillCasting.kSkillID = v6;
                    if ( g_pkMainChar[1].m_szBlockName[1] )
                      GameFrameWork::NcItemUseActiveskillReq(
                        v4,
                        *(_DWORD *)&g_pkMainChar[1].m_szBlockName[5],
                        pkTarget->m_kHandle);
                    else
                      GameFrameWork::NcBatSkillbashObjCastReq(v4, v6, pkTarget->m_kHandle);
                    v15 = g_pkMainChar;
                    g_pkMainChar[1].m_szBlockName[1] = 0;
                    *(_DWORD *)&v15[1].m_szBlockName[5] = 0;
                  }
                  LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) = 1;
                }
                return;
              }
LABEL_48:
              MainChar::ResetReserveSkill((MainChar *)g_pkMainChar);
              g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
              LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) = 0;
              return;
            }
          }
          if ( v4->m_kSkillCasting.eState )
            GameFrameWork::CancelSkillCasting(v4);
          goto LABEL_48;
        }
      }
    }
  }
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (004C9450) --------------------------------------------------------
char __thiscall GameFrameWork::MainCharTryUseSkill(GameFrameWork *this, int kSkillID, float fTime, unsigned int x, unsigned int y)
{
  GameFrameWork *v5; // esi@1
  Char *v6; // ecx@1
  NiUnsharedGeometryGroup *v7; // eax@5
  Item *v9; // edi@8
  Item *v10; // ebx@8
  Item *v11; // eax@8
  char *v12; // eax@11
  const char *v13; // eax@11
  int v14; // ST0C_4@15
  char *v15; // eax@15
  const char *v16; // eax@15
  NiPoint3 *v17; // eax@24
  ActiveSkillInfo *v18; // edi@27
  ActiveSkillViewInfo *v19; // eax@32
  unsigned int v20; // edi@35
  int v21; // eax@35
  Char *v22; // eax@39
  NiUnsharedGeometryGroup *v23; // eax@40

  v5 = this;
  v6 = g_pkMainChar;
  if ( g_pkMainChar->m_kAbStateProperty.iUnAttackableCount )
    return 0;
  if ( g_pkMainChar->m_byMode == 1 )
  {
    Char::SetMode(g_pkMainChar, 2);
    GameFrameWork::NcActChangeModeReq(v5, 2);
    v6 = g_pkMainChar;
  }
  if ( v6->m_kAbStateProperty.iUnAttackableCount )
  {
    v7 = TextData2::Get(0x2446376Au);
    GameFrameWork::AddSysMsg(v5, (const char *)v7);
    return 0;
  }
  if ( Char::CheckActState(v6, 500000) )
    return 0;
  ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[13].AddAbStateByAbstateIndex)(0);
  v9 = Inventory::GetEquipedWeaponAcc(&g_kInventory);
  v10 = Inventory::GetEquipedWeapon(&g_kInventory);
  v11 = Inventory::GetShieldAccEquip(&g_kInventory);
  if ( v9 )
  {
    if ( !((int (__thiscall *)(_DWORD))v9->vfptr[19].__vecDelDtor)(v9) )
    {
      v14 = (int)v9->m_pkInfo->Name;
      v15 = (char *)TextData2::Get(0xF3D5672u);
      v16 = fs(v15, v14);
      GameFrameWork::AddSysMsg(v5, v16);
      MainChar::ResetReserveSkill((MainChar *)g_pkMainChar);
      g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
      LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) = 0;
      return 0;
    }
  }
  else if ( !v11 )
  {
    goto LABEL_16;
  }
  if ( !v10 )
  {
    v12 = (char *)TextData2::Get(0x43B5B3C5u);
    v13 = fs(v12);
    GameFrameWork::AddSysMsg(v5, v13);
    if ( v5->m_kSkillCasting.eState )
      GameFrameWork::CancelSkillCasting(v5);
    MainChar::ResetReserveSkill((MainChar *)g_pkMainChar);
    g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
    LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) = 0;
    return 0;
  }
LABEL_16:
  if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[20].Deaffect)() || g_pkMainChar->m_bWillDead )
    return 0;
  if ( !Skill::IsSkillUsePossible(kSkillID) || Char::IsDuringSkillActionAndHitTimeNotPassed(g_pkMainChar) )
  {
    v23 = TextData::Get(0xF6EB252E);
    GameFrameWork::AddSysMsg(v5, (const char *)v23);
    return 1;
  }
  ((void (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
  g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
  MainChar::ResetReserveSkill((MainChar *)g_pkMainChar);
  if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[7].GetAbstateColor)() == 1
    && !Skill::IsMovingSkill(kSkillID) )
  {
    if ( v5->m_kCharMover.m_bAutoRun )
      KeyboardMoveProcess::SetAutoRun(&v5->m_kCharMover, 0);
    v5->m_pkStickChar = 0;
    ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[7].AddAbStateByAbstateIndex)(1);
    v17 = (NiPoint3 *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
    GameFrameWork::NcActStopReq(v5, v17);
  }
  ITask::DirectDispatchAll(32, 0);
  if ( Char::IsActProducing(g_pkMainChar) )
    ITask::DirectDispatchAll(35, 0);
  v18 = IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::GetByID(kSkillID);
  if ( v18->DemandType != 6 && !GameFrameWork::CheckWeaponCostumeWhenAttackTry(v5) )
  {
    MainChar::ResetReserveSkill((MainChar *)g_pkMainChar);
    g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
    LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) = 0;
    return 0;
  }
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))g_pkMainChar->vfptr[9].DeleteAbStateByAbstateIndex)(
    x,
    y,
    1,
    kSkillID);
  if ( v18->CastTime )
  {
    v20 = v18->CastTime;
    v21 = AbStateInfectee::GetAddCastingTime((AbStateInfectee *)&g_pkMainChar->vfptr);
    CastingProgressWin::StartCasting(v5->m_pkCastingProgressBar, v21 + v20, 0);
  }
  else
  {
    v19 = IIDTableBase<ActiveSkillViewInfo,ActSkillViewInfoTab,unsigned short>::GetByID(v18->ID);
    if ( !v19 || v19->CastingType != 1 )
    {
      Char::SetSkillTargetGroundPoint(g_pkMainChar, x, y, 0);
      Char::SetReserveSkillSmash(g_pkMainChar, 1);
    }
  }
  v5->m_kSkillCasting.kTargetHandle = -1;
  v5->m_kSkillCasting.kSkillID = kSkillID;
  if ( g_pkMainChar[1].m_szBlockName[1] )
    GameFrameWork::NcItemUseActiveskillReq(v5, *(_DWORD *)&g_pkMainChar[1].m_szBlockName[5], x, y);
  else
    GameFrameWork::NcBatSkillbashFldCastReq(v5, kSkillID, x, y);
  v22 = g_pkMainChar;
  g_pkMainChar[1].m_szBlockName[1] = 0;
  *(_DWORD *)&v22[1].m_szBlockName[5] = 0;
  LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) = 1;
  return 1;
}

//----- (004C9810) --------------------------------------------------------
bool __thiscall GameFrameWork::CheckGroundSkillEnabled(GameFrameWork *this, bool bForcetoMove)
{
  GameFrameWork *v2; // esi@1
  bool result; // al@2
  _BYTE v4[12]; // ST0C_12@3
  _BYTE v5[12]; // ST00_12@3
  double v6; // st7@4
  int v7; // ebx@4
  int v8; // edi@4
  int v9; // edi@5
  int v10; // ecx@8
  int v11; // eax@11
  double v12; // st7@11
  double v13; // st6@11
  int v14; // eax@11
  float fDistance; // ST18_4@18
  NiPoint3 kGroundPos; // [sp+1Ch] [bp-1Ch]@3
  NiPoint3 kDistVector; // [sp+28h] [bp-10h]@4
  bool bApplied; // [sp+37h] [bp-1h]@4

  v2 = this;
  if ( this->m_kSkillCasting.eState != 1 )
    return 0;
  *(float *)v4 = this->m_kCameraRayDir.x;
  *(_QWORD *)&v4[4] = *(_QWORD *)&this->m_kCameraRayDir.y;
  *(float *)v5 = this->m_kCameraRayOrigin.x;
  *(_QWORD *)&v5[4] = *(_QWORD *)&this->m_kCameraRayOrigin.y;
  if ( !World::GetAdvGroundPos(&g_kWorld, *(NiPoint3 *)v5, *(NiPoint3 *)v4, &kGroundPos, 0) )
    return 0;
  v6 = kGroundPos.x;
  v2->m_kSkillCasting.eTargetType = 1;
  bApplied = 0;
  v2->m_kSkillCasting.kGroundTypeDetail.x = (signed __int64)v6;
  *(_QWORD *)&kDistVector.y = (signed __int64)kGroundPos.y;
  v2->m_kSkillCasting.kGroundTypeDetail.y = LODWORD(kDistVector.y);
  v7 = LOWORD(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[9].dwEffectIndex[0]);
  v8 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                          v7) )
  {
    if ( (unsigned __int16)v7 <= *(_WORD *)(v8 + 200) )
    {
      v10 = *(_DWORD *)(v8 + 196);
      if ( *(_DWORD *)(v10 + 4 * v7) )
        v9 = *(_DWORD *)(v10 + 4 * v7);
      else
        v9 = 0;
    }
    else
    {
      v9 = 0;
    }
  }
  else
  {
    v9 = 0;
  }
  v11 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
  v12 = kGroundPos.x;
  kDistVector.x = *(float *)v11 - kGroundPos.x;
  v13 = *(float *)(v11 + 4);
  v14 = *(_DWORD *)(v9 + 180) * *(_DWORD *)(v9 + 180);
  kDistVector.y = v13 - kGroundPos.y;
  kDistVector.z = kDistVector.y * kDistVector.y + kDistVector.x * kDistVector.x;
  if ( kDistVector.z >= (double)(unsigned int)v14 )
  {
    if ( v2->m_kCharMover.m_bAutoRun || v2->m_pkStickChar )
    {
      KeyboardMoveProcess::SetAutoRun(&v2->m_kCharMover, 0);
      v2->m_pkStickChar = 0;
    }
    if ( !bForcetoMove )
      return bApplied;
    fDistance = (double)*(unsigned int *)(v9 + 180);
    GameFrameWork::MainCharMoveToChar(v2, &kGroundPos, fDistance, 6);
  }
  else
  {
    *(_QWORD *)&kDistVector.y = (signed __int64)v12;
    if ( GameFrameWork::MainCharTryUseSkill(
           v2,
           v7,
           Timer::ms_fCurTime,
           (signed __int64)v12,
           (signed __int64)kGroundPos.y) )
    {
      bApplied = 1;
      result = 1;
      v2->m_kSkillCasting.eState = 2;
      return result;
    }
  }
  return 1;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (004C9A50) --------------------------------------------------------
void __thiscall GameFrameWork::UpdateKeyboardMove(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  NiPointer<MHDiceGameTask> *v2; // eax@9
  MHDiceGameTask *v3; // edi@9
  MHDiceGameTask *v4; // ebx@9
  bool v5; // bl@15
  KeyboardMoveProcess::Result v6; // eax@18
  float v7; // ecx@23
  float v8; // eax@23
  signed int v9; // eax@25
  mhState v10; // edi@38
  signed int v11; // eax@38
  mhRepairObjWin *v12; // ecx@42
  NiPoint3 *v13; // eax@65
  Mover *v14; // ecx@65
  NiPoint3 kGroundPos; // [sp+4h] [bp-20h]@2
  DropItem *pkDropItem; // [sp+10h] [bp-14h]@2
  Char *pkChar; // [sp+14h] [bp-10h]@2
  Char *v18; // [sp+18h] [bp-Ch]@25
  NiPointer<MHDiceGameTask> result; // [sp+1Ch] [bp-8h]@9
  KeyboardMoveProcess::Result hMinihouse; // [sp+20h] [bp-4h]@2

  v1 = this;
  if ( dword_B64790 >= 1
    && World::Pick(
         &g_kWorld,
         &this->m_kCameraRayOrigin,
         &this->m_kCameraRayDir,
         &pkChar,
         &kGroundPos,
         &pkDropItem,
         (unsigned __int16 *)&hMinihouse) == 2 )
  {
    if ( unk_B2534C )
    {
      ItemRepairWin::CancelItemRepair(v1->m_pkItemRepairWin);
      return;
    }
    if ( unk_B25350 )
    {
      InventoryWin::OnCreateNewSocket(v1->m_pkInventoryWin, 0);
      return;
    }
    if ( InventoryWin::ms_uiMode == 8 )
    {
      PgFrameWork::AddMsg((PgFrameWork *)&v1->vfptr, 0x10Au, 0, 0);
      v1->m_bPickCancel = 0;
      return;
    }
  }
  v2 = MHDiceGameTask::GetDiceGameTask(&result);
  v3 = result.m_pObject;
  v4 = v2->m_pObject;
  if ( result.m_pObject && !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  if ( !v4 || !MHDiceGameTask::IsGambleMode(v4) )
  {
    v5 = 0;
    if ( dword_B64790 >= 1 )
    {
      v5 = v1->m_kCharMover.m_bAutoRun;
      if ( v5 )
        v1->m_kCharMover.m_bAutoRun = 0;
    }
    result.m_pObject = (MHDiceGameTask *)&v1->m_kCharMover;
    v6 = KeyboardMoveProcess::Update(&v1->m_kCharMover);
    hMinihouse = v6;
    if ( !v5 || v1->m_kCharMover.m_bAutoRun )
    {
      if ( (unsigned int)v6 > 3 )
      {
LABEL_67:
        if ( v5 )
        {
          if ( hMinihouse )
            KeyboardMoveProcess::SetAutoRun((KeyboardMoveProcess *)result.m_pObject, 0);
        }
        return;
      }
    }
    else
    {
      hMinihouse = 0;
      v1->m_kCharMover.m_bAutoRun = 1;
    }
    switch ( hMinihouse )
    {
      case 0:
        if ( dword_B64790 >= 1 && !GameFrameWork::CheckGroundSkillEnabled(v1, 1) )
        {
          v10 = nowState;
          v11 = World::Pick(
                  &g_kWorld,
                  &v1->m_kCameraRayOrigin,
                  &v1->m_kCameraRayDir,
                  (Char **)&pkDropItem,
                  &kGroundPos,
                  (DropItem **)&v18,
                  (unsigned __int16 *)&pkChar);
          switch ( v11 )
          {
            case 1:
              GameFrameWork::OnPickChar(v1, (Char *)pkDropItem);
              goto LABEL_61;
            case 4:
              GameFrameWork::OnPickMiniHouse(v1, (unsigned __int16)pkChar);
              goto LABEL_61;
            case 5:
            case 10:
              if ( nowState != 2 )
                goto LABEL_67;
              v12 = v1->m_pkMHRepairWin;
              if ( v11 == 5 )
              {
                if ( !(unsigned __int8)((int (*)(void))v12->vfptr[65].__vecDelDtor)() && word_A99554[0] != -1 )
                {
                  mhRepairObjWin::SetRepairObjID(v1->m_pkMHRepairWin, word_A99554[0]);
                  GameFrameWork::OpenMHRepairWin(v1, 1, 1);
                }
              }
              else if ( !(unsigned __int8)((int (*)(void))v12->vfptr[65].__vecDelDtor)() && v1->m_pkMHRepairWin )
              {
                GameFrameWork::OpenMHRepairWin(v1, 0, 0);
              }
              return;
            case 2:
              v1->m_pkStickChar = 0;
              if ( g_pkMainChar->m_kAbStateProperty.iFearCount > 0 )
                goto LABEL_67;
              if ( v10 != 3 )
              {
                if ( v10 == 4 )
                  MiniHouseIndoor::SetState(&g_kWorld.m_MiniHouseIndoorMode, MH_STATE_NORMAL);
                else
                  GameFrameWork::OnPickGround(v1, &kGroundPos, 1);
              }
              if ( dword_B6479C )
                --dword_B6479C;
              if ( !v5 )
                return;
              KeyboardMoveProcess::SetAutoRun((KeyboardMoveProcess *)result.m_pObject, 0);
              break;
            case 8:
              if ( !unk_A99544 )
                GameFrameWork::OnPickGround(v1, &kGroundPos, 1);
              goto LABEL_67;
            case 3:
              GameFrameWork::GetDropItemByPicking(v1, (DropItem *)v18);
LABEL_61:
              if ( dword_B6479C )
                --dword_B6479C;
              break;
            default:
              goto LABEL_67;
          }
        }
        goto LABEL_67;
      case 1:
        if ( dword_B64790 < 1 )
          goto LABEL_67;
        v9 = World::Pick(
               &g_kWorld,
               &v1->m_kCameraRayOrigin,
               &v1->m_kCameraRayDir,
               &v18,
               &kGroundPos,
               (DropItem **)&pkChar,
               (unsigned __int16 *)&pkDropItem);
        if ( InventoryWin::ms_uiMode == 8 && v9 )
        {
          PgFrameWork::AddMsg((PgFrameWork *)&v1->vfptr, 0x10Au, 0, 0);
          v1->m_bPickCancel = 0;
          return;
        }
        switch ( v9 )
        {
          case 1:
            if ( !GameFrameWork::CheckGroundSkillEnabled(v1, 0) )
            {
              GameFrameWork::OnPickChar(v1, v18);
              goto LABEL_34;
            }
            break;
          case 2:
            GameFrameWork::CheckGroundSkillEnabled(v1, 0);
            break;
          case 3:
            GameFrameWork::GetDropItemByPicking(v1, (DropItem *)pkChar);
            goto LABEL_34;
          case 4:
            GameFrameWork::OnPickMiniHouse(v1, (unsigned __int16)pkDropItem);
LABEL_34:
            if ( dword_B6479C )
              --dword_B6479C;
            break;
          default:
            goto LABEL_67;
        }
        break;
      case 2:
        v7 = v1->m_kCharMover.m_pos3TargetPos.z;
        v8 = v1->m_kCharMover.m_pos3TargetPos.y;
        kGroundPos.x = v1->m_kCharMover.m_pos3TargetPos.x;
        kGroundPos.z = v7;
        v1->m_pkStickChar = 0;
        kGroundPos.y = v8;
        GameFrameWork::OnPickGround(v1, &kGroundPos, 0);
        goto LABEL_67;
      case 3:
        if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[7].GetAbstateColor)() )
        {
          if ( !(unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[10].Affect)() )
          {
            ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[7].AddAbStateByAbstateIndex)(1);
            ((void (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
            v13 = (NiPoint3 *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
            GameFrameWork::NcActStopReq(v1, v13);
            v14 = g_pkMainChar->m_pkMover;
            if ( v14 )
              ((void (__stdcall *)(_DWORD))v14->vfptr[7].AddAbStateByAbstateIndex)(1);
          }
        }
        goto LABEL_67;
    }
    goto LABEL_67;
  }
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;
// B64790: using guessed type int dword_B64790;
// B6479C: using guessed type int dword_B6479C;

//----- (004C9F10) --------------------------------------------------------
void __thiscall GameFrameWork::UpdateMainCharOnRevActSkill(GameFrameWork *this, float fCurTime)
{
  GameFrameWork *v2; // ebx@1
  MapNavigator *v3; // esi@2
  void (__thiscall ***v4)(_DWORD, _DWORD); // edi@3
  GTInformWin *v5; // esi@8
  D3DXCOLOR *v6; // eax@9
  D3DXCOLOR v7; // ST04_16@9
  char *v8; // eax@9
  bool v9; // al@10
  Char *v10; // ecx@10
  int v11; // ebx@12
  ActiveSkillInfo *v12; // edi@12
  float v13; // eax@19
  signed int v14; // esi@19
  NiUnsharedGeometryGroup *v15; // eax@22
  NiUnsharedGeometryGroup *v16; // eax@24
  NiUnsharedGeometryGroup *v17; // eax@27
  NiUnsharedGeometryGroup *v18; // eax@29
  char v19; // al@30
  GameFrameWork *v20; // esi@30
  signed int v21; // eax@31
  NiUnsharedGeometryGroup *v22; // eax@33
  Char *v23; // esi@36
  bool v24; // bl@39
  char v25; // bl@43
  bool v26; // zf@45
  ActiveSkillViewInfo *v27; // eax@51
  float v28; // eax@55
  NiUnsharedGeometryGroup *v29; // eax@71
  TargetType v30; // eax@73
  NiUnsharedGeometryGroup *v31; // eax@80
  double v32; // st7@81
  int v33; // ebx@81
  GameFrameWork *v34; // edi@86
  NiUnsharedGeometryGroup *v35; // eax@69
  float fLifeTime; // ST18_4@94
  NiUnsharedGeometryGroup *v37; // eax@95
  D3DXCOLOR result; // [sp+28h] [bp-28h]@9
  int kSkillID; // [sp+38h] [bp-18h]@12
  float fDistToChar; // [sp+3Ch] [bp-14h]@51
  Skill::EmpowerInfo kEmpowerInfo; // [sp+40h] [bp-10h]@19
  float fSkillableDist; // [sp+44h] [bp-Ch]@2
  GameFrameWork *v43; // [sp+48h] [bp-8h]@1
  unsigned __int8 v44; // [sp+4Fh] [bp-1h]@31

  v2 = this;
  v43 = this;
  if ( !Char::IsDuringSkillActionAndHitTimeNotPassed(g_pkMainChar) )
  {
    v3 = MapNavigator::GetMapNavigator((NiPointer<MapNavigator> *)&fSkillableDist)->m_pObject;
    if ( fSkillableDist != 0.0 )
    {
      v4 = (void (__thiscall ***)(_DWORD, _DWORD))LODWORD(fSkillableDist);
      if ( !InterlockedDecrement((volatile LONG *)(LODWORD(fSkillableDist) + 4)) )
      {
        if ( v4 )
          (**v4)(v4, 1);
      }
    }
    if ( v3 )
    {
      if ( v3->m_bIsWorking )
      {
        v3->m_bIsWorking = 0;
        v5 = v2->m_pkAutoRunMsgWin;
        if ( v5 )
        {
          GTInformWin::Clear(v2->m_pkAutoRunMsgWin);
          v6 = Color::GetDxColor(&result, -1, -112, 0, -1);
          *(_QWORD *)&v7.r = *(_QWORD *)&v6->r;
          *(_QWORD *)&v7.b = *(_QWORD *)&v6->b;
          v8 = (char *)TextData2::Get(0x3C517589u);
          GTInformWin::AddText(v5, v8, v7, 0, 3.0);
        }
      }
    }
    v9 = MainChar::IsAvailableStateReserveSkill((MainChar *)g_pkMainChar);
    v10 = g_pkMainChar;
    if ( !v9 )
      goto LABEL_25;
    if ( JumpProcessor::IsJump(&g_pkMainChar->m_kJumpProcessor) )
      return;
    v11 = LOWORD(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[9].dwEffectIndex[0]);
    kSkillID = v11;
    v12 = IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::GetByID(v11);
    if ( !v12 )
    {
      g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
      return;
    }
    if ( !MainChar::IsSkillUsableState((MainChar *)g_pkMainChar) )
    {
      g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
      MainChar::ResetReserveSkill((MainChar *)g_pkMainChar);
      return;
    }
    if ( (unsigned __int8)Skill::IsProduceBaseSkill(v11) )
    {
      g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
      if ( Skill::IsLearnProdSkill(v11) == 1 )
      {
        LOWORD(fCurTime) = v11;
        ITask::DirectDispatchAll(33, &fCurTime);
      }
      return;
    }
    v13 = COERCE_FLOAT(User::SP(&g_kUser));
    v14 = v12->SP;
    fSkillableDist = v13;
    Skill::GetAccumulatedEmpowerInfo(&kEmpowerInfo, v11);
    if ( kEmpowerInfo.cSmallSp )
      v14 -= v12->nT0[kEmpowerInfo.cSmallSp + 4];
    if ( SLODWORD(fSkillableDist) < v14 )
    {
      v15 = TextData::Get(0x2A664B39u);
      GameFrameWork::AddSysMsg(v43, (const char *)v15);
      g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
      return;
    }
    if ( (signed int)User::LP(&g_kUser) < (signed int)v12->LP )
    {
      v16 = TextData3::Get(0x40601363u);
      GameFrameWork::AddSysMsg(v43, (const char *)v16);
      v10 = g_pkMainChar;
LABEL_25:
      v10[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
      return;
    }
    Char::GetEquipWeaponType(g_pkMainChar);
    if ( !Inventory::IsDemandType(&g_kInventory, v12->DemandType) )
    {
      v17 = TextData::Get(0xE9E1202B);
      GameFrameWork::AddSysMsg(v43, (const char *)v17);
      g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
      MainChar::ResetReserveSkill((MainChar *)g_pkMainChar);
      return;
    }
    if ( AbStateInfectee::IsInList((AbStateInfectee *)&g_pkMainChar->vfptr, STA_REVERSEORDER) )
    {
      v18 = TextData::Get(0xC9E9C6D8);
      GameFrameWork::AddSysMsg(v43, (const char *)v18);
      g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
      MainChar::ResetReserveSkill((MainChar *)g_pkMainChar);
      return;
    }
    v19 = AbStateInfectee::IsInList((AbStateInfectee *)&g_pkMainChar->vfptr, STA_SOULFREE);
    v20 = v43;
    if ( !v19 )
    {
      v44 = v12->DemandSoul;
      v21 = GameFrameWork::GetSoulCount(v43);
      if ( v21 < v44 )
      {
        if ( v44 )
        {
          v22 = TextData2::Get(0x7E9997EFu);
          GameFrameWork::AddSysMsg(v20, (const char *)v22);
          MainChar::ResetReserveSkill((MainChar *)g_pkMainChar);
          g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
          LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) = 0;
          return;
        }
      }
    }
    switch ( v12->First )
    {
      case 1:
      case 2:
        GameFrameWork::MainCharTryUseSkill(v20, v11, fCurTime, g_pkMainChar);
        goto LABEL_96;
      case 0:
      case 3:
      case 5:
      case 7:
      case 8:
        v23 = (Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1];
        v24 = v23
           && (!(unsigned __int8)((int (__thiscall *)(unsigned int))v23->vfptr[1].Deaffect)(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1])
            || v23->m_bWillDead);
        if ( v23 && Char::IsResource(v23) )
        {
          v25 = 0;
        }
        else
        {
          if ( v24 )
            v26 = v12->SkillTargetState == 1;
          else
            v26 = v12->SkillTargetState == 0;
          v25 = v26;
        }
        fSkillableDist = COERCE_FLOAT(MainChar::GetTargetType((MainChar *)g_pkMainChar, v23));
        if ( v12->First == 3 )
        {
          v28 = COERCE_FLOAT(IIDTableBase<ActiveSkillViewInfo,ActSkillViewInfoTab,unsigned short>::GetByID(v12->ID));
        }
        else
        {
          if ( v12->First == 7 )
          {
            if ( v23 && !v23->m_bUserCharacter )
            {
              v25 = 0;
              goto LABEL_68;
            }
            goto LABEL_67;
          }
          if ( v12->First != 8 )
            goto LABEL_68;
          *(float *)&v27 = COERCE_FLOAT(IIDTableBase<ActiveSkillViewInfo,ActSkillViewInfoTab,unsigned short>::GetByID(v12->ID));
          v26 = v12->EffectType == 5;
          fDistToChar = *(float *)&v27;
          if ( v26 && v23 && Char::GetMobInfo(v23) && Char::GetMobInfo(v23)->Type == 16 )
          {
LABEL_67:
            v25 = 1;
            goto LABEL_68;
          }
          v28 = fDistToChar;
        }
        if ( v28 == 0.0
          || !*(_BYTE *)(LODWORD(v28) + 38)
          || v23 && v25 && LODWORD(fSkillableDist) != 3 && LODWORD(fSkillableDist) != 1 )
        {
LABEL_68:
          if ( v23 )
          {
            if ( LODWORD(fSkillableDist) == 1 )
            {
              v29 = TextData::Get(0x31667969u);
              GameFrameWork::AddSysMsg(v43, (const char *)v29);
              LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) = 0;
LABEL_96:
              g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
              return;
            }
            if ( v25 )
            {
              v30 = v12->First;
              if ( (v30 || LODWORD(fSkillableDist) == 3) && (v30 != 3 || LODWORD(fSkillableDist) != 3) )
              {
                if ( v30 != 8 || v12->EffectType != 5 || v23->m_kAbStateProperty.iCantHealStateCount <= 0 )
                {
                  v32 = Char::GetDistanceToChar(g_pkMainChar, v23);
                  fDistToChar = v32;
                  v33 = kSkillID;
                  ((void (__stdcall *)(Char *, int))g_pkMainChar->vfptr[9].AddAbStateByAbstateIndex)(v23, kSkillID);
                  fSkillableDist = v32;
                  ((void (__stdcall *)(Char *))g_pkMainChar->vfptr[9].IsVisible)(v23);
                  if ( fSkillableDist + 50.0 <= fDistToChar )
                  {
                    v34 = v43;
                    if ( v43->m_kCharMover.m_bAutoRun || v43->m_pkStickChar )
                    {
                      KeyboardMoveProcess::SetAutoRun(&v43->m_kCharMover, 0);
                      v34->m_pkStickChar = 0;
                    }
                    fCurTime = fSkillableDist - 1.0;
                    LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) = 1;
                    GameFrameWork::MainCharMoveToChar(v34, (int)v34, v23, fCurTime, 4);
                  }
                  else
                  {
                    if ( v12->IsMovingSkill
                      && LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) )
                    {
                      ((void (__stdcall *)(float *))g_pkMainChar->vfptr[6].SetAbStateProperty)(&result.g);
                      GameFrameWork::NcActStopReq(v43, (NiPoint3 *)&result.g);
                    }
                    GameFrameWork::MainCharTryUseSkill(v43, v33, fCurTime, v23);
                  }
                }
                else
                {
                  v31 = TextData2::Get(0xD05E2A2C);
                  GameFrameWork::AddSysMsg(v43, (const char *)v31);
                  LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) = 0;
                }
                goto LABEL_96;
              }
            }
            v35 = TextData::Get(0xF042314C);
          }
          else
          {
            v35 = TextData::Get(0x8AA587D4);
          }
          GameFrameWork::AddSysMsg(v43, (const char *)v35);
          LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) = 0;
          goto LABEL_96;
        }
        v23 = g_pkMainChar;
        fSkillableDist = 0.0;
        goto LABEL_67;
      case 4:
        if ( !Skill::IsSkillUsePossible(v11)
          || (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[15].AddAbStateByAbstateIndex)() )
        {
          v37 = TextData::Get(0xF6EB252E);
          GameFrameWork::AddSysMsg(v20, (const char *)v37);
        }
        else
        {
          fLifeTime = (double)IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::GetByID(v11)->Area;
          World::SetMagicCircleRadius(&g_kWorld, fLifeTime);
          v20->m_kSkillCasting.eState = 1;
        }
        goto LABEL_96;
      default:
        goto LABEL_96;
    }
  }
}

//----- (004CA600) --------------------------------------------------------
void __thiscall GameFrameWork::MainCharTryToAttack(GameFrameWork *this, Char *pkTargetChar)
{
  Char *v2; // esi@1
  GameFrameWork *v3; // edi@1
  double v4; // st7@1
  MainChar *v5; // ecx@1
  bool v6; // bl@3
  NiPoint3 *v7; // eax@12
  AttackSequence *v8; // eax@15
  AttackSequence *v9; // eax@16
  AttackSequence *v10; // esi@16
  Item *v11; // eax@18
  double v12; // st7@19
  unsigned int v13; // eax@21
  unsigned __int16 v14; // di@21
  bool v15; // al@23
  double v16; // st7@24
  float fDistance; // ST14_4@24
  NiPoint3 result; // [sp+18h] [bp-10h]@1
  float fAttackableDist; // [sp+24h] [bp-4h]@1

  v2 = pkTargetChar;
  v3 = this;
  Char::GetDirToChar(g_pkMainChar, &result, pkTargetChar);
  *(float *)&pkTargetChar = result.y * result.y + result.x * result.x + result.z * result.z;
  *(float *)&pkTargetChar = sqrt(*(float *)&pkTargetChar);
  v4 = *(float *)&pkTargetChar;
  ((void (__stdcall *)(Char *))g_pkMainChar->vfptr[9].SetAbStateProperty)(v2);
  fAttackableDist = v4;
  v5 = (MainChar *)g_pkMainChar;
  if ( g_pkMainChar->m_byMode == 1 )
  {
    Char::SetMode(g_pkMainChar, 2);
    GameFrameWork::NcActChangeModeReq(v3, 2);
    v5 = (MainChar *)g_pkMainChar;
  }
  v6 = MainChar::GetTargetType(v5, v2) != 1;
  if ( !(unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[15].AddAbStateByAbstateIndex)() )
  {
    ((void (__thiscall *)(Char *))v2->vfptr[6].Deaffect)(v2);
    if ( Char::IsActGathering(g_pkMainChar) )
      ITask::DirectDispatchAll(32, 0);
    if ( g_fAttackableDist + fAttackableDist - 10.0 > *(float *)&pkTargetChar && v6 )
    {
      if ( !g_pkMainChar->m_bWillDead
        && !g_pkMainChar->m_kAbStateProperty.iUnAttackableCount
        && !v2->m_bWillDead
        && !AttackSequenceManager::GetAttSeqCount((AttackSequenceManager *)&g_pkMainChar->vfptr) )
      {
        g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[7].dwEffectIndex[0] = g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1];
        v7 = (NiPoint3 *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
        GameFrameWork::NcActStopReq(v3, v7);
        ((void (__stdcall *)(signed int))g_pkMainChar->vfptr[7].AddAbStateByAbstateIndex)(1);
        if ( Char::IsResource(v2) )
        {
          pkTargetChar = v2;
          ITask::DirectDispatchAll(30, &pkTargetChar);
        }
        else if ( GameFrameWork::CheckWeaponCostumeWhenAttackTry(v3) )
        {
          v8 = (AttackSequence *)operator new(0x28u);
          if ( v8 )
          {
            AttackSequence::AttackSequence(v8);
            v10 = v9;
          }
          else
          {
            v10 = 0;
          }
          v10->byActionCode = 0;
          v10->fRecvTime = Timer::ms_fCurTime;
          v10->bFirstAttack = 1;
          LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) = 1;
          GameFrameWork::NcBatBashstartCmd(v3);
          v11 = Inventory::GetEquipedWeapon(&g_kInventory);
          if ( v11 )
            v12 = (double)IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(v11->m_kStruct.itemid)->AtkSpeed
                / 1000.0;
          else
            v12 = 1.0;
          v10->fCoolTime = v12;
          v13 = g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1];
          v14 = -1;
          if ( v13 )
            v14 = *(_WORD *)(v13 + 552);
          v15 = Char::IsRangeAttChar(g_pkMainChar);
          DamageInfoSet::AddDamage(&v10->kDamageInfoSet, 0x20000000u, v14, 0xFFFE0000, 0, 0, v15, -1);
          AttackSequenceManager::AddAttSeq((AttackSequenceManager *)&g_pkMainChar->vfptr, v10);
        }
      }
    }
    else
    {
      *(float *)&pkTargetChar = fAttackableDist - 1.0;
      v16 = *(float *)&pkTargetChar;
      LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) = 1;
      fDistance = v16;
      GameFrameWork::MainCharMoveToChar(v3, (int)v3, v2, fDistance, 0);
    }
  }
}
// A6F544: using guessed type float g_fAttackableDist;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004CA8B0) --------------------------------------------------------
void __thiscall GameFrameWork::UpdateMainCharOnRevActPickChar(GameFrameWork *this, float fCurTime)
{
  GameFrameWork *v2; // edi@1
  Char *v3; // eax@4
  unsigned int v4; // esi@4
  Char *v5; // eax@10
  Char *v6; // esi@14
  NiPoint3 *v7; // eax@15
  double v8; // st7@17
  MobInfo *v9; // eax@19
  MobType v10; // eax@20
  MHDiceGameTask *v11; // ebx@22
  MobInfo *v12; // eax@25
  NiPoint3 *v13; // eax@32
  NiPoint3 *v14; // eax@38
  NiPoint3 *v15; // eax@44
  NiPoint3 kDirToMainChar; // [sp+1Ch] [bp-14h]@17
  float fJustSideDist; // [sp+28h] [bp-8h]@17
  float fDistToChar; // [sp+2Ch] [bp-4h]@17

  v2 = this;
  if ( Char::IsActGathering(g_pkMainChar)
    && g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1] == g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[7].dwEffectIndex[0] )
  {
    return;
  }
  if ( GameFrameWork::CheckCancelingMoveUpdate(v2) == 1 )
  {
    v3 = g_pkMainChar;
    v4 = g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1];
    if ( v4 )
    {
      if ( Char::IsNPC((Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1]) )
      {
        GameFrameWork::NcActNPCClickCmd(v2, *(_WORD *)(v4 + 552));
        g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
      }
      v3 = g_pkMainChar;
    }
    if ( v3->m_byMode == 2 && v3->m_kAbStateProperty.iUnMovableCount )
    {
      v5 = (Char *)v3[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1];
      if ( v5 )
        GameFrameWork::MainCharTryToAttack(v2, v5);
    }
    return;
  }
  if ( Char::IsActProducing(g_pkMainChar) )
    ITask::DirectDispatchAll(35, 0);
  v6 = (Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1];
  if ( !v6 )
  {
    g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
    LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) = 0;
    ((void (__stdcall *)(signed int))g_pkMainChar->vfptr[7].AddAbStateByAbstateIndex)(1);
    v7 = (NiPoint3 *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
    GameFrameWork::NcActStopReq(v2, v7);
    return;
  }
  if ( !JumpProcessor::IsJump(&g_pkMainChar->m_kJumpProcessor) )
  {
    Char::GetDirToChar(v6, &kDirToMainChar, g_pkMainChar);
    fJustSideDist = kDirToMainChar.y * kDirToMainChar.y
                  + kDirToMainChar.x * kDirToMainChar.x
                  + kDirToMainChar.z * kDirToMainChar.z;
    fJustSideDist = sqrt(fJustSideDist);
    v8 = fJustSideDist;
    fDistToChar = fJustSideDist;
    if ( Char::IsNPC(v6) )
    {
      if ( fDistToChar < 150.0 )
      {
        v9 = IIDTableBase<MobInfo,MobInfoTab,unsigned short>::GetByID(v6->m_kCharShape.m_kMobID);
        if ( v9 && ((v10 = v9->Type, v10 == 23) || v10 == 26) )
        {
          v11 = MHDiceGameTask::GetDiceGameTask((NiPointer<MHDiceGameTask> *)&fJustSideDist)->m_pObject;
          NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&fJustSideDist);
          if ( v11 && !MHDiceGameTask::IsDicegamePlaying(v11) )
            MHDiceGameTask::NcGambleTypeAndWhereStandReq(v6->m_kHandle);
        }
        else
        {
          GameFrameWork::NcActNPCClickCmd(v2, v6->m_kHandle);
        }
        SoundMgr::PlayNPCVoice(&g_kSoundMgr, v6->m_kCharShape.m_kMobID);
        v12 = IIDTableBase<MobInfo,MobInfoTab,unsigned short>::GetByID(v6->m_kCharShape.m_kMobID);
        if ( !v12 || v12->Type == 15 )
          goto LABEL_34;
        goto LABEL_32;
      }
    }
    else
    {
      if ( v6->m_byMode != 5 )
      {
        ((void (__stdcall *)(Char *))g_pkMainChar->vfptr[9].SetAbStateProperty)(v6);
        ((void (__stdcall *)(Char *))g_pkMainChar->vfptr[9].IsVisible)(v6);
        fJustSideDist = v8;
        if ( (unsigned __int8)((int (__thiscall *)(Char *))v6->vfptr[1].Deaffect)(v6) )
        {
          if ( g_pkMainChar->m_byMode == 2 )
          {
            GameFrameWork::MainCharTryToAttack(v2, v6);
          }
          else if ( fJustSideDist + 50.0 >= fDistToChar )
          {
            ((void (__stdcall *)(signed int))g_pkMainChar->vfptr[7].AddAbStateByAbstateIndex)(1);
            v15 = (NiPoint3 *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
            GameFrameWork::NcActStopReq(v2, v15);
          }
          else
          {
            fJustSideDist = fJustSideDist - 1.0;
            GameFrameWork::MainCharMoveToChar(v2, (int)v2, v6, fJustSideDist, 0);
          }
          g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
        }
        else
        {
          if ( fJustSideDist + 50.0 >= fDistToChar )
          {
            ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[7].AddAbStateByAbstateIndex)(1);
            v14 = (NiPoint3 *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
            GameFrameWork::NcActStopReq(v2, v14);
          }
          else
          {
            fJustSideDist = fJustSideDist - 1.0;
            GameFrameWork::MainCharMoveToChar(v2, (int)v2, v6, fJustSideDist, 0);
          }
          g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
          LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) = 0;
        }
        return;
      }
      if ( fDistToChar < 150.0 )
      {
        GameFrameWork::NcBoothEntryReq(v2, v6->m_kHandle);
LABEL_32:
        ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[7].AddAbStateByAbstateIndex)(1);
        v13 = (NiPoint3 *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
        GameFrameWork::NcActStopReq(v2, v13);
LABEL_34:
        g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
        LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) = 0;
        return;
      }
    }
    GameFrameWork::MainCharMoveToChar(v2, (int)v2, v6, 99.0, 0);
    goto LABEL_34;
  }
}

//----- (004CACB0) --------------------------------------------------------
void __userpurge GameFrameWork::UpdateMainCharOnRevActAttack(GameFrameWork *this@<ecx>, void (__thiscall ***a2)(_DWORD, _DWORD)@<edi>, float fCurTime)
{
  GameFrameWork *v3; // ebx@1
  int (*v4)(void); // edx@1
  MapNavigator *v5; // esi@6
  GTInformWin *v6; // esi@12
  D3DXCOLOR *v7; // eax@13
  D3DXCOLOR v8; // ST04_16@13
  char *v9; // eax@13
  Char *v10; // ecx@15
  Char *v11; // esi@15
  double v12; // st7@20
  D3DXCOLOR result; // [sp+20h] [bp-1Ch]@13
  float fJustSideDist; // [sp+30h] [bp-Ch]@20
  float fDistToChar; // [sp+34h] [bp-8h]@6
  GameFrameWork *v16; // [sp+38h] [bp-4h]@1

  v3 = this;
  v4 = (int (*)(void))g_pkMainChar->vfptr[15].AddAbStateByAbstateIndex;
  v16 = this;
  if ( !(unsigned __int8)v4() && !Char::CheckActState(g_pkMainChar, 500000) && !g_pkMainChar->m_bWillDead )
  {
    ITask::DirectDispatchAll(32, 0);
    if ( Char::IsActProducing(g_pkMainChar) )
      ITask::DirectDispatchAll(35, 0);
    v5 = MapNavigator::GetMapNavigator((NiPointer<MapNavigator> *)&fDistToChar)->m_pObject;
    if ( fDistToChar != 0.0 )
    {
      a2 = (void (__thiscall ***)(_DWORD, _DWORD))LODWORD(fDistToChar);
      if ( !InterlockedDecrement((volatile LONG *)(LODWORD(fDistToChar) + 4)) )
      {
        if ( a2 )
          (**a2)(a2, 1);
      }
    }
    if ( v5 )
    {
      if ( v5->m_bIsWorking )
      {
        v5->m_bIsWorking = 0;
        v6 = v3->m_pkAutoRunMsgWin;
        if ( v6 )
        {
          GTInformWin::Clear(v3->m_pkAutoRunMsgWin);
          v7 = Color::GetDxColor(&result, -1, -112, 0, -1);
          *(_QWORD *)&v8.r = *(_QWORD *)&v7->r;
          *(_QWORD *)&v8.b = *(_QWORD *)&v7->b;
          v9 = (char *)TextData2::Get(0x3C517589u);
          GTInformWin::AddText(v6, v9, v8, 0, 3.0);
        }
      }
    }
    if ( !JumpProcessor::IsJump(&g_pkMainChar->m_kJumpProcessor) )
    {
      v10 = g_pkMainChar;
      v11 = (Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1];
      if ( v11 )
      {
        if ( !(unsigned __int8)((int (__thiscall *)(unsigned int))v11->vfptr[1].Deaffect)(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1])
          || Char::IsNPC(v11) )
        {
          v10 = g_pkMainChar;
        }
        else
        {
          v10 = g_pkMainChar;
          if ( LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0])
            && g_pkMainChar->m_byMode == 2 )
          {
            v12 = Char::GetDistanceToChar(g_pkMainChar, v11);
            fDistToChar = v12;
            ((void (__stdcall *)(Char *))g_pkMainChar->vfptr[9].SetAbStateProperty)(v11);
            ((void (__stdcall *)(Char *))g_pkMainChar->vfptr[9].IsVisible)(v11);
            fJustSideDist = v12;
            ((void (__thiscall *)(Char *))v11->vfptr[1].Affect)(v11);
            if ( g_pkMainChar->m_byMode == 2 )
            {
              GameFrameWork::MainCharTryToAttack(v16, v11);
              g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
            }
            else
            {
              if ( fJustSideDist + 50.0 < fDistToChar )
              {
                fJustSideDist = fJustSideDist - 1.0;
                GameFrameWork::MainCharMoveToChar(v16, (int)a2, v11, fJustSideDist, 0);
              }
              LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) = 0;
              g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
            }
            return;
          }
        }
      }
      v10[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
      LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) = 0;
      return;
    }
  }
}

//----- (004CAF30) --------------------------------------------------------
void __thiscall GameFrameWork::UpdateMainCharOnRevActMHCharEmotion(GameFrameWork *this, float fCurTime)
{
  int v2; // edi@5
  char v3; // bl@5
  mhObject *v4; // eax@5
  mhObject *v5; // esi@5
  ItemInfo *v6; // eax@7
  char v7; // bl@10
  NiUnsharedGeometryGroup *v8; // eax@11
  NiNode *v9; // eax@13
  void *v10; // ecx@13
  int v11; // eax@15
  int v12; // eax@23
  int GetCharPos_8; // ST28_4@23
  NiColor *v14; // eax@23
  MHEmotion *v15; // ebx@28
  float GetCharPos; // [sp+20h] [bp-58h]@23
  float GetCharPos_4; // [sp+24h] [bp-54h]@23
  GameFrameWork *v18; // [sp+2Ch] [bp-4Ch]@1
  NiPoint3 TargetPos; // [sp+30h] [bp-48h]@17
  NiPoint2 LengthXY; // [sp+3Ch] [bp-3Ch]@5
  MHEmotion *pkEmotionInfo; // [sp+44h] [bp-34h]@5
  MiniHouseFurniture *pkFur; // [sp+48h] [bp-30h]@8
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > ActPos; // [sp+4Ch] [bp-2Ch]@13
  int v24; // [sp+74h] [bp-4h]@13

  v18 = this;
  if ( nowState == MH_STATE_NO )
  {
    g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
    return;
  }
  if ( JumpProcessor::IsJump(&g_pkMainChar->m_kJumpProcessor) == 1 )
  {
    g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
    return;
  }
  v2 = *(_DWORD *)&qword_A99558;
  v3 = *((_BYTE *)&qword_A99558 + 4);
  LengthXY = *(NiPoint2 *)&qword_A99558;
  *(float *)&pkEmotionInfo = unk_A99560;
  v4 = mhObjectManager::GetObjectA(&stru_A993C8, qword_A99558);
  v5 = v4;
  if ( !v4 )
  {
    g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = (unsigned int)v4;
    return;
  }
  v6 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(v4->m_iResGUID);
  if ( !v6 )
    goto LABEL_12;
  *(float *)&pkFur = COERCE_FLOAT(MiniHouseFuritureInfoTab::GetObjByName(v6->InxName));
  if ( *(float *)&pkFur == 0.0 )
  {
    g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
    return;
  }
  v7 = MiniHouseIndoor::GetEmptyOfObjSeat(&g_kWorld.m_MiniHouseIndoorMode, v2, g_pkMainChar->m_kHandle, v3);
  LOBYTE(LengthXY.y) = v7;
  if ( v7 == -1 )
  {
    v8 = TextData2::Get(0x5A935C05u);
    GameFrameWork::AddSysMsg(v18, (const char *)v8);
LABEL_12:
    g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
    return;
  }
  MiniHouseIndoor::SetCharEmotion(&g_kWorld.m_MiniHouseIndoorMode, v2, SLOBYTE(LengthXY.y), pkEmotionInfo);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
    &ActPos,
    "ActPos");
  v24 = 0;
  mhMiscUtil::MakeNodeNameNum(&ActPos, (unsigned __int8)v7, 2);
  v9 = ResElement::GetNiNode(v5->m_pkResource);
  v10 = ActPos._Bx._Ptr;
  if ( ActPos._Myres < 0x10 )
    v10 = &ActPos;
  v11 = (int)v9->vfptr[18].__vecDelDtor((NiRefObject *)v9, (unsigned int)v10);
  if ( v11 )
  {
    TargetPos.x = *(float *)(v11 + 140);
    TargetPos.y = *(float *)(v11 + 144);
    TargetPos.z = *(float *)(v11 + 148);
    if ( pkFur->WALL )
      World::GetAdvGroundPos(&g_kWorld, TargetPos.x, TargetPos.y, &TargetPos);
    if ( (((int (*)(void))g_pkMainChar->vfptr[13].DeleteAbStateByAbstateIndex)() == 4
       || ((int (*)(void))g_pkMainChar->vfptr[13].DeleteAbStateByAbstateIndex)())
      && (v7 != BYTE1(LengthXY.y) || HIWORD(LengthXY.x) != LOWORD(LengthXY.x)) )
    {
      ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[13].AddAbStateByAbstateIndex)(0);
    }
    else
    {
      v12 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
      GetCharPos = *(float *)v12;
      GetCharPos_4 = *(float *)(v12 + 4);
      GetCharPos_8 = *(_DWORD *)(v12 + 8);
      v14 = (NiColor *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
      if ( (unsigned __int8)NiColor::operator!=(v14, (NiColor *)&TargetPos) )
      {
        *(float *)&pkFur = GetCharPos - TargetPos.x;
        *(float *)&pkFur = fabs(*(float *)&pkFur);
        LengthXY.y = *(float *)&pkFur;
        *(float *)&pkFur = GetCharPos_4 - TargetPos.y;
        *(float *)&pkFur = fabs(*(float *)&pkFur);
        pkEmotionInfo = (MHEmotion *)pkFur;
        if ( NiPoint2::Length((NiPoint2 *)((char *)&LengthXY + 4)) > 1.5 )
        {
          World::GetAdvGroundPos(&g_kWorld, TargetPos.x, TargetPos.y, &TargetPos);
          GameFrameWork::MainCharMoveToChar(v18, &TargetPos, 0.0, 7);
          g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
        }
        else
        {
          ((void (__stdcall *)(NiPoint3 *, NiPoint3 *))g_pkMainChar->vfptr[5].GetAbstateColor)(&TargetPos, &TargetPos);
        }
      }
      else
      {
        if ( LOWORD(LengthXY.x) != -1 )
        {
          v15 = pkEmotionInfo;
          if ( *(float *)&pkEmotionInfo != 0.0 )
          {
            ((void (*)(void))g_pkMainChar->vfptr[10].Deaffect)();
            GameFrameWork::On_NC_MINIHOUSE_FURNITURE_EMOTION_REQ(v18, v2, SLOBYTE(LengthXY.y), v15->ActionIndex);
          }
        }
        g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
      }
    }
  }
  else
  {
    g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
  }
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&ActPos);
}

//----- (004CB2B0) --------------------------------------------------------
void __userpurge GameFrameWork::UpdateMainChar(GameFrameWork *this@<ecx>, void (__thiscall ***a2)(_DWORD, _DWORD)@<edi>, float fCurTime)
{
  Char *v3; // eax@1
  GameFrameWork *v4; // esi@1
  int v5; // ecx@7
  GameFrameWork::SkillCastState v6; // eax@15

  v3 = g_pkMainChar;
  v4 = this;
  switch ( g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] )
  {
    case 0u:
      GameFrameWork::UpdateMainCharOnRevActNone(this, fCurTime);
      break;
    case 1u:
      GameFrameWork::UpdateMainCharOnRevActPickGround(this, fCurTime, 0);
      break;
    case 2u:
      GameFrameWork::UpdateMainCharOnRevActPickChar(this, fCurTime);
      break;
    case 3u:
      GameFrameWork::UpdateMainCharOnRevActAttack(this, a2, fCurTime);
      break;
    case 4u:
      GameFrameWork::UpdateMainCharOnRevActSkill(this, fCurTime);
      break;
    case 6u:
      v5 = LOWORD(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[9].dwEffectIndex[0]);
      if ( (_WORD)v5 != -1 )
      {
        if ( GameFrameWork::MainCharTryUseSkill(
               v4,
               v5,
               Timer::ms_fCurTime,
               v4->m_kSkillCasting.kGroundTypeDetail.x,
               v4->m_kSkillCasting.kGroundTypeDetail.y) )
        {
          v4->m_kSkillCasting.eState = 2;
        }
        v3 = g_pkMainChar;
      }
      goto $LN6_49;
    case 5u:
$LN6_49:
      v3[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
      break;
    case 7u:
      GameFrameWork::UpdateMainCharOnRevActMHCharEmotion(this, fCurTime);
      break;
    default:
      break;
  }
  GameFrameWork::UpdateKeyboardMove(v4);
  if ( !(_S3_3 & 1) )
  {
    _S3_3 |= 1u;
    dwSinceSkillActive = timeGetTime();
  }
  v6 = v4->m_kSkillCasting.eState;
  if ( v6 && v6 != 1 )
  {
    if ( timeGetTime() > dwSinceSkillActive + 10000 )
    {
      GameFrameWork::NcBatSkillbashCastabortReq(v4);
      Char::CancelSkillAction(g_pkMainChar, 1);
    }
  }
  else
  {
    dwSinceSkillActive = timeGetTime();
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004CB420) --------------------------------------------------------
double __thiscall NiPoint2::Length(NiPoint2 *this)
{
  float v1; // ST00_4@1

  v1 = this->y * this->y + this->x * this->x;
  return (float)sqrt(v1);
}

//----- (004CB450) --------------------------------------------------------
double __thiscall Char::GetDistanceToChar(Char *this, Char *pkChar)
{
  NiPoint3 kDir; // [sp+0h] [bp-Ch]@1
  Char *pkChara; // [sp+14h] [bp+8h]@1
  Char *pkCharb; // [sp+14h] [bp+8h]@1

  Char::GetDirToChar(this, &kDir, pkChar);
  *(float *)&pkChara = kDir.y * kDir.y + kDir.x * kDir.x + kDir.z * kDir.z;
  *(float *)&pkCharb = sqrt(*(float *)&pkChara);
  return *(float *)&pkCharb;
}

//----- (004CB4A0) --------------------------------------------------------
void __thiscall MainChar::ResetReserveSkill(MainChar *this)
{
  this->m_eReserveSkillType = 0;
  this->m_kReserveSkillID = -1;
  MainChar::SetStartReserveAct(this, 0);
}

//----- (004CB4C0) --------------------------------------------------------
WeaponAttrib *__cdecl WeaponAttribTab::GetWeaponAttrib(WeaponTypeEnum eWeaponEnum)
{
  int v1; // eax@1
  unsigned int v2; // edi@2
  unsigned int v3; // esi@4
  WeaponAttrib *result; // eax@5

  v1 = *(_DWORD *)(ITableBase<WeaponAttrib,WeaponAttribTab>::ms_pkTable + 56);
  if ( v1 )
    v2 = *(_DWORD *)(v1 + 40);
  else
    v2 = 0;
  v3 = 0;
  if ( v2 )
  {
    while ( 1 )
    {
      result = (WeaponAttrib *)CDataReader::GetRecord(
                                 (CDataReader *)(ITableBase<WeaponAttrib,WeaponAttribTab>::ms_pkTable + 4),
                                 v3);
      if ( result->WeaponType == eWeaponEnum )
        break;
      if ( ++v3 >= v2 )
        goto LABEL_7;
    }
  }
  else
  {
LABEL_7:
    result = 0;
  }
  return result;
}
// A8C18C: using guessed type int ITableBase<WeaponAttrib,WeaponAttribTab>::ms_pkTable;

//----- (004CB520) --------------------------------------------------------
void __thiscall GameFrameWork::SetResList(GameFrameWork *this)
{
  this->m_ResList[1].m_uiResHeight = 768;
  this->m_ResList[2].m_uiResHeight = 768;
  this->m_ResList[6].m_uiResHeight = 1200;
  this->m_ResList[9].m_uiResHeight = 1200;
  this->m_ResList[1].m_uiResWidth = 1024;
  this->m_ResList[2].m_uiResWidth = 1280;
  this->m_ResList[3].m_uiResWidth = 1280;
  this->m_ResList[4].m_uiResWidth = 1280;
  this->m_ResList[4].m_uiResHeight = 1024;
  this->m_ResList[9].m_eAspect = 3;
  this->m_ResList[10].m_eAspect = 3;
  this->m_ResList[11].m_uiResWidth = 1280;
  this->m_ResList[11].m_eAspect = 3;
  this->m_ResList[13].m_eAspect = 3;
  this->m_ResList[0].m_uiResWidth = 800;
  this->m_ResList[0].m_uiResHeight = 600;
  this->m_ResList[0].m_bCheckAdd = 0;
  this->m_ResList[0].m_eAspect = 0;
  this->m_ResList[1].m_bCheckAdd = 0;
  this->m_ResList[1].m_eAspect = 0;
  this->m_ResList[2].m_bCheckAdd = 0;
  this->m_ResList[2].m_eAspect = 1;
  this->m_ResList[3].m_uiResHeight = 960;
  this->m_ResList[3].m_bCheckAdd = 0;
  this->m_ResList[3].m_eAspect = 0;
  this->m_ResList[4].m_bCheckAdd = 0;
  this->m_ResList[4].m_eAspect = 2;
  this->m_ResList[5].m_uiResWidth = 1400;
  this->m_ResList[5].m_uiResHeight = 1050;
  this->m_ResList[5].m_bCheckAdd = 0;
  this->m_ResList[5].m_eAspect = 0;
  this->m_ResList[6].m_uiResWidth = 1600;
  this->m_ResList[6].m_bCheckAdd = 0;
  this->m_ResList[6].m_eAspect = 0;
  this->m_ResList[7].m_uiResWidth = 1600;
  this->m_ResList[7].m_uiResHeight = 900;
  this->m_ResList[7].m_bCheckAdd = 0;
  this->m_ResList[7].m_eAspect = 4;
  this->m_ResList[8].m_uiResWidth = 1920;
  this->m_ResList[8].m_uiResHeight = 1400;
  this->m_ResList[8].m_bCheckAdd = 0;
  this->m_ResList[8].m_eAspect = 4;
  this->m_ResList[9].m_uiResWidth = 1920;
  this->m_ResList[9].m_bCheckAdd = 0;
  this->m_ResList[10].m_uiResWidth = 1680;
  this->m_ResList[10].m_uiResHeight = 1050;
  this->m_ResList[10].m_bCheckAdd = 0;
  this->m_ResList[11].m_uiResHeight = 800;
  this->m_ResList[11].m_bCheckAdd = 0;
  this->m_ResList[12].m_uiResWidth = 1600;
  this->m_ResList[12].m_uiResHeight = 900;
  this->m_ResList[12].m_bCheckAdd = 0;
  this->m_ResList[12].m_eAspect = 4;
  this->m_ResList[13].m_uiResWidth = 1440;
  this->m_ResList[13].m_uiResHeight = 900;
  this->m_ResList[13].m_bCheckAdd = 0;
  this->m_ResList[14].m_uiResWidth = 1920;
  this->m_ResList[14].m_uiResHeight = 1080;
  this->m_ResList[14].m_bCheckAdd = 0;
  this->m_ResList[14].m_eAspect = 4;
  this->m_ResList[15].m_uiResWidth = 2560;
  this->m_ResList[15].m_uiResHeight = 1440;
  this->m_ResList[15].m_bCheckAdd = 0;
  this->m_ResList[15].m_eAspect = 4;
  this->m_ResList[16].m_uiResWidth = 2560;
  this->m_ResList[16].m_uiResHeight = 1600;
  this->m_ResList[16].m_bCheckAdd = 0;
  this->m_ResList[16].m_eAspect = 0;
  this->m_ResList[19].m_uiResHeight = 1440;
  this->m_ResList[17].m_uiResWidth = 3840;
  this->m_ResList[17].m_uiResHeight = 2160;
  this->m_ResList[17].m_bCheckAdd = 0;
  this->m_ResList[17].m_eAspect = 4;
  this->m_ResList[18].m_uiResWidth = 1366;
  this->m_ResList[18].m_uiResHeight = 768;
  this->m_ResList[18].m_bCheckAdd = 0;
  this->m_ResList[18].m_eAspect = 4;
  this->m_ResList[19].m_uiResWidth = 3440;
  this->m_ResList[19].m_bCheckAdd = 0;
  this->m_ResList[19].m_eAspect = 4;
}

//----- (004CB7A0) --------------------------------------------------------
DropItem *__thiscall GameFrameWork::GetDropItemByHandle(GameFrameWork *this, unsigned __int16 kHandle, int iDepart, int iCommand)
{
  GameFrameWork *v4; // esi@1
  DropItem *result; // eax@1

  v4 = this;
  result = DropItemMgr::GetByHandle(&g_kDropItemMgr, kHandle);
  if ( !result )
  {
    GameFrameWork::NcBriefInfoCmd(v4, kHandle, iDepart, iCommand);
    result = 0;
  }
  return result;
}

//----- (004CB7E0) --------------------------------------------------------
void __thiscall GameFrameWork::CloseAutoCloseWin(GameFrameWork *this, PgWin *pkWin)
{
  GameFrameWork *v2; // esi@1
  GuildNpcMenuWin *v3; // eax@25
  GuildTournamentBaseWin *v4; // eax@27
  GuildTournamentScheduleWin *v5; // eax@29
  GuildTournamentStorageWin *v6; // eax@31
  GuildTournamentStorageWin *v7; // eax@31
  GuildAcademyMenuWin *v8; // eax@35
  GuildAcademyMoneyRewardWin *v9; // eax@39
  GuildAcademyItemRewardWin *v10; // eax@41
  GuildAcademyHallOfFameWin *v11; // eax@43
  GuildAcademyRankingWin *v12; // eax@45
  PgWin *v13; // eax@47
  RandomOptionWin *v14; // ecx@49

  v2 = this;
  if ( pkWin == (PgWin *)this->m_pkItemUpgradeWin )
  {
    GameFrameWork::CloseItemUpgradeWin(this, 1);
    return;
  }
  if ( pkWin == (PgWin *)this->m_pkItemShopWin )
  {
    GameFrameWork::CloseShopMenu(this, 1);
    return;
  }
  if ( pkWin == (PgWin *)this->m_pkNPCSkillWin )
  {
    GameFrameWork::CloseSkillShopMenu(this);
    return;
  }
  if ( pkWin == (PgWin *)this->m_pkMoverUpgradeWin )
  {
    GameFrameWork::CloseMoverUpgradeWin(this, 1);
    return;
  }
  if ( pkWin == (PgWin *)this->m_pkItemMixWin )
  {
    GameFrameWork::OnCloseItemMixWin(this, 1);
    return;
  }
  if ( pkWin == (PgWin *)this->m_pkNPCSoulWin )
  {
    GameFrameWork::CloseSoulStoneShopMenu(this);
    return;
  }
  if ( pkWin == (PgWin *)this->m_pkStorageWin )
  {
    if ( this->m_eOpenType == ASOT_NPC )
      GameFrameWork::CloseStorageMenu(this);
    return;
  }
  if ( pkWin == (PgWin *)this->m_pkItemShopWin2 )
  {
    GameFrameWork::CloseItemShopWin(this);
    return;
  }
  if ( pkWin == (PgWin *)this->m_pkClassChangeWin )
  {
    GameFrameWork::CloseClassChangeWin(this);
    return;
  }
  if ( pkWin == (PgWin *)this->m_pkWeaponTitleWin )
  {
    GameFrameWork::CloseWeapontitleWin(this);
    return;
  }
  if ( pkWin == (PgWin *)this->m_pkMapLinkGateWin )
  {
    GameFrameWork::CloseMapLinkGateWin(this);
    return;
  }
  if ( (GuildNpcMenuWin *)pkWin == GuildTask::GetGuildNpcMenuWin() )
  {
    v3 = GuildTask::GetGuildNpcMenuWin();
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
    return;
  }
  if ( (GuildTournamentBaseWin *)pkWin == GuildTask::GetGuildTournamnetBaseWin() )
  {
    v4 = GuildTask::GetGuildTournamnetBaseWin();
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v4->vfptr);
    return;
  }
  if ( (GuildTournamentScheduleWin *)pkWin == GuildTask::GetGuildTournamentScheduleWin() )
  {
    v5 = GuildTask::GetGuildTournamentScheduleWin();
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v5->vfptr);
    return;
  }
  if ( (GuildTournamentStorageWin *)pkWin == GuildTask::GetGuildTournamentStorageWin() )
  {
    v6 = GuildTask::GetGuildTournamentStorageWin();
    GuildTournamentStorageWin::On_NC_ITEMDB_CLOSE_GUILD_STORAGE_CMD(v6);
    v7 = GuildTask::GetGuildTournamentStorageWin();
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v7->vfptr);
    return;
  }
  if ( pkWin == (PgWin *)v2->m_pkMakeKarisWin )
  {
    GameFrameWork::OnShowMakeKarisWin(v2, 0);
    return;
  }
  if ( (GuildAcademyMenuWin *)pkWin == GuildAcademyTask::GetGuildAcademyMenuWin() )
  {
    v8 = GuildAcademyTask::GetGuildAcademyMenuWin();
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v8->vfptr);
    return;
  }
  if ( (GuildAcademyStorageWin *)pkWin == GuildAcademyTask::GetGuildAcademyStorageWin() )
  {
    GameFrameWork::OnCloseGuildAcademyStorage();
    return;
  }
  if ( (GuildAcademyMoneyRewardWin *)pkWin == GuildAcademyTask::GetGuildAcademyMoneyRewardWin() )
  {
    v9 = GuildAcademyTask::GetGuildAcademyMoneyRewardWin();
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v9->vfptr);
    return;
  }
  if ( (GuildAcademyItemRewardWin *)pkWin == GuildAcademyTask::GetGuildAcademyItemRewardWin() )
  {
    v10 = GuildAcademyTask::GetGuildAcademyItemRewardWin();
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v10->vfptr);
    return;
  }
  if ( (GuildAcademyHallOfFameWin *)pkWin == GuildAcademyTask::GetGuildAcademyHallOfFameWin() )
  {
    v11 = GuildAcademyTask::GetGuildAcademyHallOfFameWin();
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v11->vfptr);
    return;
  }
  if ( (GuildAcademyRankingWin *)pkWin == GuildAcademyTask::GetGuildAcademyRankingWin() )
  {
    v12 = GuildAcademyTask::GetGuildAcademyRankingWin();
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v12->vfptr);
    return;
  }
  if ( pkWin == GuildAcademySelectTask::GetGuildAcademySelectWin() )
  {
    v13 = GuildAcademySelectTask::GetGuildAcademySelectWin();
    goto LABEL_48;
  }
  v14 = v2->m_pkRandomOptionWin;
  if ( (RandomOptionWin *)pkWin == v14 )
  {
    RandomOptionWin::OnCancel(v14);
    return;
  }
  if ( pkWin == (PgWin *)v2->m_pkIDRankingWin )
  {
    GameFrameWork::IDRankingShowWin(v2, 0);
    return;
  }
  v13 = (PgWin *)&v2->m_pkEventRankWin->vfptr;
  if ( pkWin == v13 )
  {
LABEL_48:
    PgWinMgr::CloseWin(&Pgg_kWinMgr, v13);
    return;
  }
  if ( pkWin == (PgWin *)v2->m_pkNpcDlgWin )
    GameFrameWork::CloseNpcDlgWin(v2);
}

//----- (004CBA90) --------------------------------------------------------
void __thiscall GameFrameWork::LockShortCutWinInvPosItem(GameFrameWork *this, unsigned __int16 invPos)
{
  GameFrameWork *v2; // esi@1
  ShortCutWin **v3; // esi@1
  signed int v4; // ebx@1

  v2 = this;
  ShortCutWin::SetShortCutInvPosWinLock(this->m_pkShortCutWin, invPos);
  ShortCutWin::SetShortCutInvPosWinLock(v2->m_pkShortCutWinV, invPos);
  v3 = v2->m_pkShortCutSubWinV;
  v4 = 4;
  do
  {
    ShortCutWin::SetShortCutInvPosWinLock(*(v3 - 5), invPos);
    ShortCutWin::SetShortCutInvPosWinLock(*v3, invPos);
    ++v3;
    --v4;
  }
  while ( v4 );
}

//----- (004CBAE0) --------------------------------------------------------
void __thiscall GameFrameWork::UnLockShortCutWinInvPosItem(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  ShortCutWin **v2; // esi@1
  signed int v3; // edi@1

  v1 = this;
  ShortCutWin::SetShortCutInvPosWinUnLock(this->m_pkShortCutWin);
  ShortCutWin::SetShortCutInvPosWinUnLock(v1->m_pkShortCutWinV);
  v2 = v1->m_pkShortCutSubWinV;
  v3 = 4;
  do
  {
    ShortCutWin::SetShortCutInvPosWinUnLock(*(v2 - 5));
    ShortCutWin::SetShortCutInvPosWinUnLock(*v2);
    ++v2;
    --v3;
  }
  while ( v3 );
}

//----- (004CBB20) --------------------------------------------------------
void __thiscall GameFrameWork::AddRoarChat(GameFrameWork *this, char *CharName, char *pcText)
{
  GameFrameWork *v3; // esi@1
  char *v4; // eax@1

  v3 = this;
  v4 = fs("[%s] : %s", CharName, pcText);
  ChatDisplayWin2::AddRoarChat(v3->m_pkChatDisplayWin, v4);
}

//----- (004CBB50) --------------------------------------------------------
void __thiscall GameFrameWork::CancelSkillCasting(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  GameFrameWork::SkillCastState v2; // eax@1
  NiPoint3 *v3; // eax@3

  v1 = this;
  v2 = this->m_kSkillCasting.eState;
  if ( v2 == 3 )
  {
    if ( !Char::GetReserveSkillSmash(g_pkMainChar) )
    {
      v3 = (NiPoint3 *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
      GameFrameWork::NcActStopReq(v1, v3);
      GameFrameWork::NcBatSkillbashCastabortReq(v1);
      Char::CancelSkillAction(g_pkMainChar, 1);
    }
  }
  else if ( v2 == 1 )
  {
    this->m_kSkillCasting.eState = 0;
  }
}

//----- (004CBBB0) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenGambleHouseWin(GameFrameWork *this, bool bAllClosed)
{
  GameFrameWork *v2; // esi@1

  v2 = this;
  if ( bAllClosed )
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkGambleWin->vfptr);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkGambleMiniWin->vfptr);
  }
  else if ( (unsigned __int8)((int (*)(void))this->m_pkGambleWin->vfptr[65].__vecDelDtor)() )
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkGambleWin->vfptr);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkGambleMiniWin->vfptr);
  }
  else
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkGambleMiniWin->vfptr);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkGambleWin->vfptr);
  }
}

//----- (004CBC50) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenExchangeCoinWin(GameFrameWork *this)
{
  if ( this->m_pkCoinExchangeWin )
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkCoinExchangeWin->vfptr);
}

//----- (004CBC70) --------------------------------------------------------
void __thiscall GameFrameWork::OnOpenVipCardWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  if ( this->m_pkGambleHouseCardWin )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkGambleHouseCardWin->vfptr[65].__vecDelDtor)() )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkGambleHouseCardWin->vfptr);
    else
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkGambleHouseCardWin->vfptr);
  }
}

//----- (004CBCC0) --------------------------------------------------------
void __thiscall GameFrameWork::SetEnchantGemWinPos(GameFrameWork *this, int XPos, int YPos, unsigned int UI_Type)
{
  GameFrameWork *v4; // esi@1

  v4 = this;
  if ( UI_Type )
  {
    if ( this->m_pkEnchantGemDeleteWin1 )
      ((void (__stdcall *)(_DWORD, _DWORD))this->m_pkEnchantGemDeleteWin1->vfptr[77].__vecDelDtor)(XPos, YPos);
    if ( v4->m_pkEnchantGemDeleteWin2 )
      ((void (__stdcall *)(_DWORD, _DWORD))v4->m_pkEnchantGemDeleteWin2->vfptr[77].__vecDelDtor)(XPos, YPos);
    if ( v4->m_pkEnchantGemDeleteWin3 )
      ((void (__stdcall *)(_DWORD, _DWORD))v4->m_pkEnchantGemDeleteWin3->vfptr[77].__vecDelDtor)(XPos, YPos);
  }
  else
  {
    if ( this->m_pkEnchantGemWin1 )
      ((void (__stdcall *)(_DWORD, _DWORD))this->m_pkEnchantGemWin1->vfptr[77].__vecDelDtor)(XPos, YPos);
    if ( v4->m_pkEnchantGemWin2 )
      ((void (__stdcall *)(_DWORD, _DWORD))v4->m_pkEnchantGemWin2->vfptr[77].__vecDelDtor)(XPos, YPos);
    if ( v4->m_pkEnchantGemWin3 )
      ((void (__stdcall *)(_DWORD, _DWORD))v4->m_pkEnchantGemWin3->vfptr[77].__vecDelDtor)(XPos, YPos);
  }
}

//----- (004CBD90) --------------------------------------------------------
void __thiscall GameFrameWork::SearchQuestStartItem(GameFrameWork *this, unsigned __int16 qID, bool bGiveup)
{
  InventoryWin::SearchQuestStartItem(this->m_pkInventoryWin, qID, bGiveup);
}

//----- (004CBDA0) --------------------------------------------------------
void __thiscall GameFrameWork::AdjustFocus(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  ChatDisplayWin2 *v2; // ecx@1

  v1 = this;
  SetFocus(g_hMainWnd);
  v2 = v1->m_pkChatDisplayWin;
  if ( v2 )
  {
    if ( (unsigned __int8)ChatDisplayWin2::IsDuringEdit(v2) )
      ChatDisplayWin2::SetEditFocus(v1->m_pkChatDisplayWin, 1);
  }
}

//----- (004CBDE0) --------------------------------------------------------
bool __thiscall GameFrameWork::IsDuringEdit(GameFrameWork *this)
{
  ChatDisplayWin2 *v1; // ecx@1

  v1 = this->m_pkChatDisplayWin;
  return v1 && (unsigned __int8)ChatDisplayWin2::IsDuringEdit(v1);
}

//----- (004CBE00) --------------------------------------------------------
bool __thiscall GameFrameWork::IsFriend(GameFrameWork *this, Name5 *CharID)
{
  FriendWin *v2; // ecx@1
  int v3; // eax@2

  v2 = this->m_pkFriendWin;
  if ( v2 )
    v3 = FriendWin::GetFriendInfo(v2, CharID) != 0;
  else
    LOBYTE(v3) = 0;
  return v3;
}

//----- (004CBE30) --------------------------------------------------------
GameFrameWork::DisplayAspect __thiscall GameFrameWork::GetDisplyAspect(GameFrameWork *this, unsigned int uiWidht, unsigned int uiHeight)
{
  signed int v3; // eax@1
  char *v4; // edx@1

  v3 = 0;
  v4 = (char *)&this->m_ResList[0].m_uiResHeight;
  while ( *((_DWORD *)v4 - 1) != uiWidht || *(_DWORD *)v4 != uiHeight )
  {
    ++v3;
    v4 += 16;
    if ( v3 >= 21 )
      return 0;
  }
  return this->m_ResList[v3].m_eAspect;
}

//----- (004CBE70) --------------------------------------------------------
void __stdcall GameFrameWork::ConvertCommaNumberWork(__int64 i64Val, char *pNumberString)
{
  char *v3; // esi@1
  unsigned int v4; // edi@1
  char *v5; // eax@1
  char v6; // dl@2
  int v7; // eax@3
  char v8; // dl@4
  char v9; // dl@4
  char v10; // dl@4
  char v11; // al@4
  char v12; // dl@6
  char v13; // dl@6
  char v14; // al@6
  char v15; // dl@8
  char v16; // al@8
  char comma2[4]; // [sp+Ch] [bp-4h]@4

  v3 = pNumberString;
  v4 = HIDWORD(i64Val);
  sprintf(pNumberString, "%I64d", i64Val);
  v5 = v3;
  pNumberString = v3 + 1;
  do
    v6 = *v5++;
  while ( v6 );
  v7 = v5 - pNumberString;
  if ( v7 <= 9 )
  {
    if ( v7 <= 6 )
    {
      if ( v7 > 3 )
      {
        *(_WORD *)((char *)&pNumberString + 1) = 0;
        HIDWORD(i64Val) = 0;
        BYTE3(pNumberString) = 0;
        LOWORD(pNumberString) = (unsigned __int8)v3[v7 - 3];
        v15 = v3[v7 - 2];
        v16 = v3[v7 - 1];
        BYTE1(pNumberString) = v15;
        BYTE2(pNumberString) = v16;
        BYTE3(pNumberString) = 0;
        sprintf(v3, "%I64d,%s", (signed __int64)__PAIR__(v4, (unsigned int)i64Val) / 1000, &pNumberString);
      }
    }
    else
    {
      LOBYTE(pNumberString) = v3[v7 - 3];
      v12 = v3[v7 - 2];
      *(_WORD *)((char *)&pNumberString + 1) = 0;
      BYTE1(pNumberString) = v12;
      BYTE2(pNumberString) = v3[v7 - 1];
      BYTE4(i64Val) = v3[v7 - 6];
      v13 = v3[v7 - 5];
      v14 = v3[v7 - 4];
      BYTE5(i64Val) = v13;
      BYTE6(i64Val) = v14;
      BYTE3(pNumberString) = 0;
      BYTE7(i64Val) = 0;
      sprintf(
        v3,
        "%I64d,%s,%s",
        (signed __int64)__PAIR__(v4, (unsigned int)i64Val) / 1000000,
        (char *)&i64Val + 4,
        &pNumberString);
    }
  }
  else
  {
    LOBYTE(pNumberString) = v3[v7 - 3];
    v8 = v3[v7 - 2];
    *(_WORD *)((char *)&pNumberString + 1) = 0;
    BYTE1(pNumberString) = v8;
    BYTE2(pNumberString) = v3[v7 - 1];
    BYTE4(i64Val) = v3[v7 - 6];
    v9 = v3[v7 - 5];
    *(_WORD *)((char *)&i64Val + 5) = 0;
    BYTE5(i64Val) = v9;
    BYTE6(i64Val) = v3[v7 - 4];
    comma2[0] = v3[v7 - 9];
    v10 = v3[v7 - 8];
    v11 = v3[v7 - 7];
    comma2[1] = v10;
    comma2[2] = v11;
    BYTE3(pNumberString) = 0;
    BYTE7(i64Val) = 0;
    comma2[3] = 0;
    sprintf(
      v3,
      "%I64d,%s,%s,%s",
      (signed __int64)__PAIR__(v4, (unsigned int)i64Val) / 1000000000,
      comma2,
      (char *)&i64Val + 4,
      &pNumberString);
  }
}

//----- (004CC020) --------------------------------------------------------
void __stdcall GameFrameWork::RemoveColorText(char *pText, char *pRemoveColorText, int nLimitTextCnt)
{
  char *v4; // esi@1
  int v5; // edi@2
  char i; // bl@3
  char v7; // al@7
  char *v8; // [sp+8h] [bp-10Ch]@3
  char chSaveText[256]; // [sp+10h] [bp-104h]@2

  v4 = pText;
  if ( pText )
  {
    v5 = 0;
    memset(chSaveText, 0, 0x100u);
    if ( *pText )
    {
      i = 0;
      v8 = chSaveText;
      while ( 1 )
      {
        if ( nLimitTextCnt && nLimitTextCnt == v5 )
          goto LABEL_19;
        if ( !strncmp(v4, "{color,", 7u) )
          break;
        if ( i && !strncmp(v4, "}", 1u) )
        {
          ++v4;
          ++v5;
          i = 0;
        }
        else
        {
          if ( !IsDBCSLeadByte(*v4) )
          {
            *v8++ = *v4;
LABEL_17:
            ++v4;
            ++v5;
            goto LABEL_18;
          }
          strncat(chSaveText, v4, 2u);
          v8 += 2;
          v4 += 2;
          v5 += 2;
        }
LABEL_18:
        if ( !*v4 )
          goto LABEL_19;
      }
      v7 = v4[7];
      v4 += 7;
      v5 += 7;
      for ( i = 1; v7; ++v5 )
      {
        if ( v7 == 44 )
          break;
        v7 = (v4++)[1];
      }
      goto LABEL_17;
    }
LABEL_19:
    strncpy(pRemoveColorText, chSaveText, strlen(chSaveText));
  }
}

//----- (004CC170) --------------------------------------------------------
void __thiscall KeyboardMoveProcess::KeyboardMoveProcess(KeyboardMoveProcess *this)
{
  KeyboardMoveProcess::Clear(this);
}

//----- (004CC180) --------------------------------------------------------
KeyboardMoveProcess::Result __thiscall KeyboardMoveProcess::Update(KeyboardMoveProcess *this)
{
  KeyboardMoveProcess *v1; // esi@1
  bool v2; // al@1
  bool v3; // zf@3
  bool v4; // bl@7
  float v5; // edx@11
  float v6; // ecx@11
  bool v7; // al@11
  int v8; // edi@11
  float v9; // eax@18
  float v10; // ecx@18
  int v11; // eax@21
  float v12; // ecx@21
  float v13; // edx@21
  float v14; // eax@21
  float v15; // edx@31
  float v16; // eax@31
  float v17; // edx@32
  float v18; // eax@32
  double v19; // st6@32
  float v20; // ecx@32
  double v21; // st6@32
  float v22; // ecx@34
  float v23; // edx@34
  float v24; // eax@34
  float v25; // ecx@37
  float v26; // edx@37
  float v27; // eax@37
  float v28; // edx@38
  float v29; // eax@38
  float v30; // ecx@38
  float v31; // edx@38
  float v32; // eax@38
  bool v33; // dl@39
  bool v34; // al@39
  bool v35; // cl@39
  KeyboardMoveProcess::Result result; // eax@40
  NiPoint3 pos3Left; // [sp+14h] [bp-44h]@15
  NiPoint3 pos3Right; // [sp+20h] [bp-38h]@20
  NiPoint3 pos3BackDir; // [sp+2Ch] [bp-2Ch]@20
  NiPoint3 pos3IsBlock; // [sp+38h] [bp-20h]@11
  NiPoint3 pos3ResultDir; // [sp+44h] [bp-14h]@20
  int i; // [sp+50h] [bp-8h]@33
  KeyboardMoveProcess::Result eResult; // [sp+54h] [bp-4h]@1

  v1 = this;
  v2 = this->m_bAutoRun;
  eResult = 0;
  if ( v2 && !(g_pkKeyboard->m_aucKeystate[5] & 4) )
  {
    v3 = this->m_bDownBack == 0;
    this->m_bKeyDown = 1;
    if ( v3 && !this->m_bdownLeft && !this->m_bDownRight )
      this->m_bDownFront = 1;
  }
  v4 = this->m_bKeyDown;
  if ( v4 || v2 )
  {
    v5 = this->m_pos3CameraDir.x;
    v6 = this->m_pos3CameraDir.z;
    pos3IsBlock.y = v1->m_pos3CameraDir.y;
    v7 = v1->m_bDownFront;
    v8 = 1;
    eResult = 1;
    v1->m_bOldDown = 1;
    pos3IsBlock.x = v5;
    pos3IsBlock.z = v6;
    if ( v1->m_bOldDownFront != v7
      || v1->m_bOldDownBack != v1->m_bDownBack
      || v1->m_bOldDownRight != v1->m_bDownRight
      || v1->m_bOlddownLeft != v1->m_bdownLeft )
    {
      eResult = 2;
    }
    else
    {
      pos3Left.x = v1->m_pos3LastPos.x - v1->m_pos3CurPos.x;
      pos3Left.y = v1->m_pos3LastPos.y - v1->m_pos3CurPos.y;
      pos3Left.z = v1->m_pos3LastPos.z - v1->m_pos3CurPos.z;
      if ( NiPoint3::Length(&pos3Left) <= 50.0 )
      {
LABEL_39:
        v33 = v1->m_bDownBack;
        v34 = v1->m_bDownRight;
        v1->m_bOldDownFront = v1->m_bDownFront;
        v35 = v1->m_bdownLeft;
        v1->m_bOldDownBack = v33;
        v1->m_bOldDownRight = v34;
        v1->m_bOlddownLeft = v35;
        goto LABEL_40;
      }
      eResult = 2;
      if ( !v4 && v1->m_bAutoRun )
      {
        v9 = v1->m_pos3MoveDir.y;
        v10 = v1->m_pos3MoveDir.z;
        pos3IsBlock.x = v1->m_pos3MoveDir.x;
        pos3IsBlock.y = v9;
        pos3IsBlock.z = v10;
      }
    }
    pos3IsBlock.z = 0.0;
    NiPoint3::Unitize(&pos3IsBlock);
    pos3BackDir.x = -pos3IsBlock.x;
    pos3BackDir.y = -pos3IsBlock.y;
    pos3BackDir.z = -pos3IsBlock.z;
    NiPoint3::UnitCross(&pos3IsBlock, &pos3Right, &NiPoint3::UNIT_Z);
    NiPoint3::UnitCross(&NiPoint3::UNIT_Z, &pos3Left, &pos3IsBlock);
    pos3ResultDir = NiPoint3::ZERO;
    if ( unk_B25004 == 1 )
    {
      v11 = ((int (*)(void))g_pkMainChar->vfptr[6].DeleteAbStateByAbstateIndex)();
      v12 = *(float *)v11;
      v13 = *(float *)(v11 + 4);
      v14 = *(float *)(v11 + 8);
      pos3IsBlock.x = v12;
      pos3IsBlock.y = v13;
      pos3IsBlock.z = v14;
    }
    if ( v1->m_bDownFront )
    {
      pos3ResultDir.x = pos3ResultDir.x + pos3IsBlock.x;
      pos3ResultDir.y = pos3ResultDir.y + pos3IsBlock.y;
      pos3ResultDir.z = pos3ResultDir.z + pos3IsBlock.z;
    }
    NiPoint3::Unitize(&pos3ResultDir);
    if ( v1->m_bDownBack )
    {
      pos3ResultDir.x = pos3ResultDir.x + pos3BackDir.x;
      pos3ResultDir.y = pos3ResultDir.y + pos3BackDir.y;
      pos3ResultDir.z = pos3ResultDir.z + pos3BackDir.z;
    }
    NiPoint3::Unitize(&pos3ResultDir);
    if ( v1->m_bDownRight )
    {
      pos3ResultDir.x = pos3Right.x + pos3ResultDir.x;
      pos3ResultDir.y = pos3Right.y + pos3ResultDir.y;
      pos3ResultDir.z = pos3Right.z + pos3ResultDir.z;
    }
    NiPoint3::Unitize(&pos3ResultDir);
    if ( v1->m_bdownLeft )
    {
      pos3ResultDir.x = pos3Left.x + pos3ResultDir.x;
      pos3ResultDir.y = pos3Left.y + pos3ResultDir.y;
      pos3ResultDir.z = pos3Left.z + pos3ResultDir.z;
    }
    NiPoint3::Unitize(&pos3ResultDir);
    if ( !v1->m_bKeyDown )
    {
      v15 = v1->m_pos3MoveDir.y;
      v16 = v1->m_pos3MoveDir.z;
      pos3ResultDir.x = v1->m_pos3MoveDir.x;
      pos3ResultDir.y = v15;
      pos3ResultDir.z = v16;
    }
    v17 = pos3ResultDir.y;
    v18 = pos3ResultDir.z;
    v19 = pos3ResultDir.x * 100.0;
    v1->m_pos3MoveDir.x = pos3ResultDir.x;
    v20 = v1->m_pos3CurPos.x;
    pos3Left.x = v19;
    pos3BackDir.x = v20;
    v21 = pos3ResultDir.y;
    v1->m_pos3MoveDir.y = v17;
    pos3BackDir.y = v1->m_pos3CurPos.y;
    v1->m_pos3MoveDir.z = v18;
    pos3Left.y = v21 * 100.0;
    pos3BackDir.z = v1->m_pos3CurPos.z;
    pos3Left.z = 100.0 * pos3ResultDir.z;
    pos3BackDir.x = pos3Left.x + pos3BackDir.x;
    pos3BackDir.y = pos3Left.y + pos3BackDir.y;
    pos3BackDir.z = pos3BackDir.z + pos3Left.z;
    if ( World::IsBlock(&g_kWorld, pos3BackDir.x, pos3BackDir.y) )
    {
      i = 1;
      while ( 1 )
      {
        v22 = v1->m_pos3CurPos.x;
        v23 = v1->m_pos3CurPos.y;
        v24 = v1->m_pos3CurPos.z;
        *(float *)&i = (double)i;
        pos3IsBlock.z = v24;
        pos3Left.x = pos3ResultDir.x * *(float *)&i;
        pos3Left.y = *(float *)&i * pos3ResultDir.y;
        pos3IsBlock.x = pos3Left.x + v22;
        pos3IsBlock.y = pos3Left.y + v23;
        if ( World::IsBlock(&g_kWorld, pos3IsBlock.x, pos3IsBlock.y) )
          break;
        ++v8;
        i = v8;
        if ( v8 >= 100 )
          goto LABEL_38;
      }
      v25 = v1->m_pos3CurPos.x;
      i = v8 - 1;
      v26 = v1->m_pos3CurPos.y;
      v27 = v1->m_pos3CurPos.z;
      *(float *)&i = (double)(v8 - 1);
      pos3Left.x = pos3ResultDir.x * *(float *)&i;
      pos3Left.y = pos3ResultDir.y * *(float *)&i;
      pos3Left.z = *(float *)&i * pos3ResultDir.z;
      pos3IsBlock.x = pos3Left.x + v25;
      pos3BackDir = pos3IsBlock;
      pos3IsBlock.y = pos3Left.y + v26;
      pos3IsBlock.z = pos3Left.z + v27;
    }
LABEL_38:
    v28 = pos3BackDir.y;
    v29 = pos3BackDir.z;
    v1->m_pos3TargetPos.x = pos3BackDir.x;
    v30 = v1->m_pos3CurPos.x;
    v1->m_pos3TargetPos.y = v28;
    v31 = v1->m_pos3CurPos.y;
    v1->m_pos3TargetPos.z = v29;
    v32 = v1->m_pos3CurPos.z;
    v1->m_pos3LastPos.x = v30;
    v1->m_pos3LastPos.y = v31;
    v1->m_pos3LastPos.z = v32;
    goto LABEL_39;
  }
  if ( this->m_bOldDown )
  {
    *(_DWORD *)&this->m_bOldDownFront = 0;
    eResult = 3;
  }
LABEL_40:
  result = eResult;
  v1->m_bOldDown = v1->m_bKeyDown;
  v1->m_bKeyDown = 0;
  *(_DWORD *)&v1->m_bDownFront = 0;
  return result;
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (004CC580) --------------------------------------------------------
Char *__thiscall GameFrameWork::GetCharByHandle(GameFrameWork *this, unsigned __int16 kHandle, int iDepart, int iCommand)
{
  GameFrameWork *v4; // edi@1
  Char *result; // eax@2

  v4 = this;
  if ( unk_A96B31 == 1 )
  {
    result = 0;
  }
  else
  {
    result = CharMgr::GetChar(&g_kCharMgr, kHandle);
    if ( result )
    {
      result->m_bConnectServer = 1;
    }
    else
    {
      GameFrameWork::NcBriefInfoCmd(v4, kHandle, iDepart, iCommand);
      result = 0;
    }
  }
  return result;
}

//----- (004CC5D0) --------------------------------------------------------
void __thiscall GameFrameWork::UpdateAutoCloseWin(GameFrameWork *this)
{
  GameFrameWork *v1; // ebx@1
  NiTListItem<PgWin *> *v2; // esi@4
  PgWin *v3; // edi@5
  NiPoint3 kDir; // [sp+4h] [bp-10h]@2
  float v5; // [sp+10h] [bp-4h]@2

  v1 = this;
  if ( this->m_pkAutoCloseWin )
  {
    ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[6].SetAbStateProperty)(&kDir);
    kDir.x = kDir.x - v1->m_kAutoCloseWinOpenPosition.x;
    kDir.y = kDir.y - v1->m_kAutoCloseWinOpenPosition.y;
    kDir.z = kDir.z - v1->m_kAutoCloseWinOpenPosition.z;
    v5 = kDir.z * kDir.z + kDir.x * kDir.x + kDir.y * kDir.y;
    if ( v5 > 28900.0 )
    {
      GameFrameWork::CloseAutoCloseWin(v1, v1->m_pkAutoCloseWin);
      v1->m_pkAutoCloseWin = 0;
    }
  }
  else
  {
    v2 = this->m_kAutoCloseWinList.m_pkHead;
    if ( v2 )
    {
      while ( 1 )
      {
        v3 = v2->m_element;
        v2 = v2->m_pkNext;
        if ( v3 )
        {
          if ( (unsigned __int8)((int (__thiscall *)(PgWin *))v3->vfptr[65].__vecDelDtor)(v3) )
            break;
        }
        if ( !v2 )
          return;
      }
      v1->m_pkAutoCloseWin = v3;
      ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[6].SetAbStateProperty)(&v1->m_kAutoCloseWinOpenPosition);
    }
  }
}

//----- (004CC6C0) --------------------------------------------------------
char __stdcall GameFrameWork::AdjustRestHP(unsigned __int16 CharHandle, unsigned int *restHP)
{
  unsigned int v3; // eax@2
  Char *v4; // eax@3
  unsigned int *v6; // edx@7
  bool v7; // sf@7
  unsigned __int8 v8; // of@7
  unsigned int *v9; // eax@7

  if ( CharHandle == g_pkMainChar->m_kHandle )
  {
    v3 = User::MaxHP(&g_kUser);
  }
  else
  {
    v4 = CharMgr::GetChar(&g_kCharMgr, CharHandle);
    if ( !v4 )
      return 0;
    v3 = ((int (__thiscall *)(_DWORD))v4->vfptr[3].Deaffect)(v4);
  }
  *(_DWORD *)&CharHandle = v3;
  if ( !v3 )
    return 0;
  v6 = restHP;
  v8 = __OFSUB__(v3, *restHP);
  v7 = ((v3 - *restHP) & 0x80000000) != 0;
  restHP = (unsigned int *)*restHP;
  v9 = (unsigned int *)&CharHandle;
  if ( !(v7 ^ v8) )
    v9 = (unsigned int *)&restHP;
  *v6 = *v9;
  return 1;
}

//----- (004CC730) --------------------------------------------------------
void __thiscall GameFrameWork::OpenDiceGameWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  MHDiceGameTask *v2; // ebx@1
  MHDiceGameTask *v3; // edi@2
  PgWin *v4; // eax@9
  NiPointer<MHDiceGameTask> result; // [sp+8h] [bp-4h]@1

  v1 = this;
  v2 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  if ( result.m_pObject )
  {
    v3 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
  }
  if ( v2 )
  {
    if ( MHDiceGameTask::IsGambleMode(v2) )
    {
      if ( !(unsigned __int8)((int (*)(void))v1->m_pkGambleDiceGameWin->vfptr[65].__vecDelDtor)() )
      {
        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkDiceGameMinimizeWin->vfptr);
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkGambleDiceGameWin->vfptr);
        return;
      }
      v4 = (PgWin *)&v1->m_pkGambleDiceGameWin->vfptr;
    }
    else
    {
      if ( !(unsigned __int8)((int (*)(void))v1->m_pkDiceGameWin->vfptr[65].__vecDelDtor)() )
      {
        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkDiceGameMinimizeWin->vfptr);
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkDiceGameWin->vfptr);
        return;
      }
      v4 = (PgWin *)&v1->m_pkDiceGameWin->vfptr;
    }
    PgWinMgr::CloseWin(&Pgg_kWinMgr, v4);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkDiceGameMinimizeWin->vfptr);
  }
}

//----- (004CC830) --------------------------------------------------------
void __thiscall GameFrameWork::OpenSlotMachineWin(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  MHDiceGameTask *v2; // edi@1
  MHDiceGameTask *v3; // ebx@2
  NiPointer<MHDiceGameTask> result; // [sp+8h] [bp-4h]@1

  v1 = this;
  v2 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  if ( result.m_pObject )
  {
    v3 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
  }
  if ( v2 && MHDiceGameTask::IsGambleMode(v2) && v2->m_eDiceGameMode == 4 )
  {
    if ( (unsigned __int8)((int (*)(void))v1->m_pkSlotMachineWin->vfptr[65].__vecDelDtor)() )
    {
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMiniSlotMachineWin->vfptr);
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkSlotMachineWin->vfptr);
    }
    else
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMiniSlotMachineWin->vfptr);
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkSlotMachineWin->vfptr);
    }
  }
}

//----- (004CC8F0) --------------------------------------------------------
void __thiscall GameFrameWork::SetCharEmotionUIState(GameFrameWork *this, bool bMHEmotionStart)
{
  GameFrameWork *v2; // esi@1
  ShortCutWin **v3; // esi@1
  signed int v4; // ebx@1
  ShortCutWin *v5; // ecx@2

  v2 = this;
  ActionWin::SetMHActionState(this->m_pkActionWin, bMHEmotionStart);
  ShortCutWin::SetMHActionState(v2->m_pkShortCutWin, bMHEmotionStart);
  ShortCutWin::SetMHActionState(v2->m_pkShortCutWinV, bMHEmotionStart);
  v3 = v2->m_pkShortCutSubWinV;
  v4 = 4;
  do
  {
    v5 = *(v3 - 5);
    if ( v5 )
      ShortCutWin::SetMHActionState(v5, bMHEmotionStart);
    if ( *v3 )
      ShortCutWin::SetMHActionState(*v3, bMHEmotionStart);
    ++v3;
    --v4;
  }
  while ( v4 );
}

//----- (004CC960) --------------------------------------------------------
void __stdcall GameFrameWork::UpdateUIScroll(SlideListWin *pkList, CClientGuild *pkGuild)
{
  PgWin *v3; // edi@1

  v3 = (PgWin *)pkList->m_pkParent;
  if ( v3 == PgWinMgr::GetTopWin(&Pgg_kWinMgr)
    && (unsigned __int8)((int (__thiscall *)(_DWORD, _DWORD, _DWORD))pkList->vfptr[83].__vecDelDtor)(
                          pkList,
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY) )
  {
    unk_B6488D = 1;
    if ( PgWin::ms_iMsDeltaZ <= 0 )
    {
      if ( PgWin::ms_iMsDeltaZ < 0 )
        CClientGuild::ReqNextPage(pkGuild);
    }
    else
    {
      CClientGuild::ReqPrevPage(pkGuild);
    }
  }
}

//----- (004CC9D0) --------------------------------------------------------
void __thiscall GameFrameWork::UpdateUIScroll(GameFrameWork *this, FrameBoxWin *pkBox, ChatBoardFlex *pkBoard)
{
  GameFrameWork *v3; // esi@1
  PgWin *v4; // edi@2

  v3 = this;
  if ( unk_B6488D )
  {
    v4 = (PgWin *)pkBox->m_pkParent;
    if ( v4 != PgWinMgr::GetTopWin(&Pgg_kWinMgr) )
    {
LABEL_9:
      v3->m_bUIScroll = 0;
      return;
    }
  }
  if ( !(unsigned __int8)((int (__thiscall *)(_DWORD, _DWORD, _DWORD))pkBox->vfptr[83].__vecDelDtor)(
                           pkBox,
                           PgWin::ms_iMsX,
                           PgWin::ms_iMsY) )
  {
    if ( PgWin::ms_iMsDeltaZ )
      return;
    goto LABEL_9;
  }
  v3->m_bUIScroll = 1;
  if ( PgWin::ms_iMsDeltaZ <= 0 )
  {
    if ( PgWin::ms_iMsDeltaZ < 0 )
      ChatBoardFlex::ViewLineDown(pkBoard);
  }
  else
  {
    ChatBoardFlex::ViewLineUp(pkBoard);
  }
}

//----- (004CCA60) --------------------------------------------------------
void __thiscall GameFrameWork::OnShowWinInterfaceList(GameFrameWork *this, bool bShow)
{
  GameFrameWork *v2; // edi@1
  NiTListItem<PgWin *> *v3; // eax@1
  TargetWin *v4; // esi@4
  AttendIconWin *v5; // eax@5
  Char *v6; // ebx@14
  MobInfo *pkMobInfo; // [sp+4h] [bp-8h]@16
  NiTListItem<PgWin *> *iter; // [sp+8h] [bp-4h]@4

  v2 = this;
  v3 = this->m_kCanHideWinList.m_pkHead;
  if ( v3 )
  {
    while ( 1 )
    {
      v4 = (TargetWin *)v3->m_element;
      iter = v3->m_pkNext;
      if ( v4 )
      {
        v5 = v2->m_pkAttendIconWin;
        if ( (AttendIconWin *)v4 == v5 )
        {
          if ( bShow && v5->m_bEvtState )
            v5->m_uFlags &= 0xFFFEu;
          else
            v5->m_uFlags |= 1u;
        }
        else
        {
          if ( bShow )
            v4->m_uFlags &= 0xFFFEu;
          else
            v4->m_uFlags |= 1u;
          if ( v4 == v2->m_pkTargetWin )
          {
            v6 = (Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1];
            if ( bShow == 1 )
            {
              if ( !v6
                || (pkMobInfo = Char::GetMobInfo((Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1]),
                    Char::IsLinkGate(v6))
                || pkMobInfo && pkMobInfo->Type == 29 )
              {
                v2->m_pkTargetWin->m_uFlags |= 1u;
              }
              else
              {
                v2->m_pkTargetWin->m_uFlags &= 0xFFFEu;
                PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkTargetWin->vfptr);
              }
            }
          }
          if ( g_kParty.m_uiTotalMember )
            PartyWinInterface::SetWindowCull(v2->m_pkPartyWinInterface, bShow == 0);
          if ( bShow && g_pkMainChar->m_byMode == 6 )
          {
            if ( v4 == (TargetWin *)v2->m_pkFeedMoverWin )
              PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkFeedMoverWin->vfptr);
            if ( v4 == (TargetWin *)v2->m_pkRidePetWin )
              PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkRidePetWin->vfptr);
          }
          else
          {
            if ( v4 == (TargetWin *)v2->m_pkFeedMoverWin )
              PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkFeedMoverWin->vfptr);
            if ( v4 == (TargetWin *)v2->m_pkRidePetWin )
              PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkRidePetWin->vfptr);
          }
        }
      }
      if ( !iter )
        break;
      v3 = iter;
    }
  }
}

//----- (004CCBF0) --------------------------------------------------------
void __userpurge GameFrameWork::AddScenarioMsg(GameFrameWork *this@<ecx>, int a2@<edi>, ScriptMsg *pkMsgInfo, char *pkStr)
{
  AnnounceWin *v4; // edx@1
  AnnounceWin *v5; // ecx@2
  PgFrameWork *v6; // eax@7
  GTInformWin *v7; // edi@8
  char *v8; // ecx@9
  signed int v9; // edx@10
  D3DXCOLOR v10; // ST04_16@10
  signed int v11; // edx@11
  D3DXCOLOR v12; // ST04_16@11
  char *v13; // eax@12
  signed int v14; // edx@13
  signed int v15; // eax@14
  char *v16; // eax@15
  signed int v17; // ecx@16
  signed int v18; // eax@17
  D3DXCOLOR v19; // [sp+Ch] [bp-50h]@17
  D3DXCOLOR v20; // [sp+1Ch] [bp-40h]@16
  D3DXCOLOR v21; // [sp+2Ch] [bp-30h]@14
  D3DXCOLOR TextColor; // [sp+3Ch] [bp-20h]@13
  float v23; // [sp+4Ch] [bp-10h]@10
  __int64 v24; // [sp+50h] [bp-Ch]@10
  float v25; // [sp+58h] [bp-4h]@10
  char *pkStra; // [sp+68h] [bp+Ch]@10
  char *pkStrb; // [sp+68h] [bp+Ch]@11
  char *pkStrc; // [sp+68h] [bp+Ch]@13
  char *pkStrd; // [sp+68h] [bp+Ch]@14
  char *pkStre; // [sp+68h] [bp+Ch]@16
  char *pkStrf; // [sp+68h] [bp+Ch]@17

  v4 = this->m_pkAnnounceWin;
  if ( v4 )
  {
    v5 = this->m_pkRemainAnnounceWin;
    if ( v5 )
    {
      if ( pkMsgInfo )
      {
        switch ( pkMsgInfo->SM_Pos )
        {
          case 1:
            v16 = pkStr;
            if ( pkStr )
            {
              pkStre = (char *)pkMsgInfo->G;
              v17 = pkMsgInfo->B;
              v20.r = (double)pkMsgInfo->R / 255.0;
              v20.g = (double)(signed int)pkStre / 255.0;
              v20.b = (double)v17 / 255.0;
              v20.a = 1.0;
              AnnounceWin::AddText(v4, a2, (int)pkMsgInfo, v16, &v20, 0, 0.0);
            }
            else
            {
              pkStrf = (char *)pkMsgInfo->G;
              v18 = pkMsgInfo->B;
              v19.r = (double)pkMsgInfo->R / 255.0;
              v19.g = (double)(signed int)pkStrf / 255.0;
              v19.b = (double)v18 / 255.0;
              v19.a = 1.0;
              AnnounceWin::AddText(v4, a2, (int)pkMsgInfo->SM_Msg, pkMsgInfo->SM_Msg, &v19, 0, 0.0);
            }
            break;
          case 2:
            v13 = pkStr;
            if ( pkStr )
            {
              pkStrc = (char *)pkMsgInfo->G;
              v14 = pkMsgInfo->B;
              TextColor.r = (double)pkMsgInfo->R / 255.0;
              TextColor.g = (double)(signed int)pkStrc / 255.0;
              TextColor.b = (double)v14 / 255.0;
              TextColor.a = 1.0;
              AnnounceWin::AddText(v5, a2, (int)pkMsgInfo, v13, &TextColor, 1, 1000000.0);
            }
            else
            {
              pkStrd = (char *)pkMsgInfo->G;
              v15 = pkMsgInfo->B;
              v21.r = (double)pkMsgInfo->R / 255.0;
              v21.g = (double)(signed int)pkStrd / 255.0;
              v21.b = (double)v15 / 255.0;
              v21.a = 1.0;
              AnnounceWin::AddText(v5, a2, (int)pkMsgInfo->SM_Msg, pkMsgInfo->SM_Msg, &v21, 1, 1000000.0);
            }
            break;
          case 3:
            v6 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
            if ( v6 )
            {
              v7 = (GTInformWin *)v6[33].m_kMsgQ.m_uiHead;
              if ( v7 )
              {
                GTInformWin::Clear((GTInformWin *)v6[33].m_kMsgQ.m_uiHead);
                v8 = pkStr;
                if ( pkStr )
                {
                  pkStra = (char *)pkMsgInfo->G;
                  v9 = pkMsgInfo->B;
                  v23 = (double)pkMsgInfo->R / 255.0;
                  *(float *)&v24 = (double)(signed int)pkStra / 255.0;
                  *((float *)&v24 + 1) = (double)v9 / 255.0;
                  v25 = 1.0;
                  v10.r = v23;
                  *(_QWORD *)&v10.g = v24;
                  v10.a = 1.0;
                  GTInformWin::AddText(v7, v8, v10, 0, 0.0);
                }
                else
                {
                  pkStrb = (char *)pkMsgInfo->G;
                  v11 = pkMsgInfo->B;
                  v23 = (double)pkMsgInfo->R / 255.0;
                  *(float *)&v24 = (double)(signed int)pkStrb / 255.0;
                  *((float *)&v24 + 1) = (double)v11 / 255.0;
                  v25 = 1.0;
                  v12.r = v23;
                  *(_QWORD *)&v12.g = v24;
                  v12.a = 1.0;
                  GTInformWin::AddText(v7, pkMsgInfo->SM_Msg, v12, 0, 0.0);
                }
              }
            }
            break;
        }
      }
    }
  }
}

//----- (004CCEF0) --------------------------------------------------------
char __thiscall GameFrameWork::UseActiveSkillItem(GameFrameWork *this, unsigned int uiInvenSlot, unsigned __int16 kSkillID)
{
  Char *v3; // ecx@2
  char result; // al@2
  Char *v5; // ecx@2

  if ( this->m_kSkillCasting.eState )
  {
    result = 1;
  }
  else
  {
    MainChar::SetReserveAct((MainChar *)g_pkMainChar, RESERVEACT_SKILL);
    v3 = g_pkMainChar;
    result = 1;
    LOWORD(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[9].dwEffectIndex[0]) = kSkillID;
    v3[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[1] = 1;
    v5 = g_pkMainChar;
    g_pkMainChar[1].m_szBlockName[1] = 1;
    *(_DWORD *)&v5[1].m_szBlockName[5] = uiInvenSlot;
  }
  return result;
}

//----- (004CCF50) --------------------------------------------------------
void __thiscall KeyboardMoveProcess::SetAutoRun(KeyboardMoveProcess *this, bool bAutoRun)
{
  KeyboardMoveProcess *v2; // esi@1
  float v3; // eax@2
  float v4; // ecx@2
  float v5; // edx@2
  GameFrameWork *v6; // edi@3
  NiUnsharedGeometryGroup *v7; // eax@5

  v2 = this;
  if ( bAutoRun )
  {
    v3 = this->m_pos3CameraDir.x;
    v4 = this->m_pos3CameraDir.y;
    v5 = v2->m_pos3CameraDir.z;
    v2->m_pos3MoveDir.x = v3;
    v2->m_pos3MoveDir.y = v4;
    v2->m_bKeyDown = 1;
    v2->m_bDownFront = 1;
    v2->m_pos3MoveDir.z = v5;
  }
  v6 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( bAutoRun )
  {
    if ( !v2->m_bAutoRun )
    {
      v7 = TextData2::Get(0x3F527D9Cu);
LABEL_8:
      GameFrameWork::AddSysMsg(v6, (const char *)v7);
      goto LABEL_9;
    }
  }
  else if ( v2->m_bAutoRun )
  {
    v7 = TextData2::Get(0x5A8C7D85u);
    goto LABEL_8;
  }
LABEL_9:
  v2->m_bAutoRun = bAutoRun;
}

//----- (004CCFC0) --------------------------------------------------------
void __thiscall GameFrameWork::Draw(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  CPostProcessEffectManager *v2; // eax@1
  CPostProcessEffectManager *v3; // eax@7
  MainApp *v4; // eax@11
  NiRenderer *v5; // ST00_4@12
  NiRenderer *v6; // edi@13
  HelpWin *v7; // ecx@16
  HWND v8; // eax@16
  CBlindEffect *v9; // ecx@18
  CameraEffect *v10; // ecx@20
  TextScreenEffect *v11; // ecx@22
  NiRenderer *v12; // edi@22
  TextScreenEffect *v13; // eax@23
  TextScreenEffect *v14; // eax@24
  HelpWin *v15; // esi@28
  HWND v16; // esi@29
  NiPointer<NiRenderer> result; // [sp+10h] [bp-118h]@12
  char acFileName[260]; // [sp+14h] [bp-114h]@12
  int v19; // [sp+124h] [bp-4h]@12

  v1 = this;
  v2 = CPostProcessEffectManager::GetInstance();
  CPostProcessEffectManager::OnRenderSceneStart(v2);
  if ( v1->m_bWorld )
    World::Draw(&g_kWorld);
  if ( v1->m_bScrnBDMgr )
    ScreenBDMgr::Draw(&g_kScrnBDMgr);
  if ( v1->m_bTextEffMgr )
    TextEffMgr::Draw(&g_kTextEffMgr);
  v3 = CPostProcessEffectManager::GetInstance();
  CPostProcessEffectManager::OnRenderSceneEnd(v3);
  if ( v1->m_bDrawInterface )
  {
    if ( v1->m_bDrawWinMgr )
      PgWinMgr::Draw(&Pgg_kWinMgr, NiRenderer::ms_pkRenderer);
  }
  else if ( v1->m_bScreenShot )
  {
    v4 = MainApp::GetMainAppInstance();
    if ( v4 )
    {
      v5 = MainApp::GetRender(v4, &result)->m_pObject;
      v19 = 0;
      ScreenShot(v5, g_hMainWnd, acFileName, 260);
      v19 = -1;
      if ( result.m_pObject )
      {
        v6 = result.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
        {
          if ( v6 )
            v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
        }
      }
      v7 = v1->m_pkHelpWin;
      *(_WORD *)&v1->m_bScreenShot = 256;
      v8 = v7->m_hWebWindow;
      if ( v8 )
        ShowWindow(v8, 5);
    }
  }
  v9 = v1->m_spBlindEffect.m_pObject;
  if ( v9 )
    CBlindEffect::Draw(v9, NiRenderer::ms_pkRenderer);
  v10 = v1->m_spCamEffect.m_pObject;
  if ( v10 )
    CameraEffect::Draw(v10, NiRenderer::ms_pkRenderer);
  v11 = Singleton<TextScreenEffect>::m_pInstance;
  v12 = NiRenderer::ms_pkRenderer;
  if ( !Singleton<TextScreenEffect>::m_pInstance )
  {
    v13 = (TextScreenEffect *)operator new(0x28u);
    v19 = 1;
    if ( v13 )
      TextScreenEffect::TextScreenEffect(v13);
    else
      v14 = 0;
    v11 = v14;
    v19 = -1;
    Singleton<TextScreenEffect>::m_pInstance = v14;
  }
  TextScreenEffect::Draw(v11, v12);
  if ( !v1->m_bDrawInterface )
  {
    v1->m_bScreenShot = 1;
    v15 = v1->m_pkHelpWin;
    if ( v15 )
    {
      v16 = v15->m_hWebWindow;
      if ( v16 )
        ShowWindow(v16, 0);
    }
  }
}

//----- (004CD1D0) --------------------------------------------------------
void __thiscall GameFrameWork::GetDropItemByPicking(GameFrameWork *this, DropItem *pkDropItem)
{
  GameFrameWork *v2; // ebx@1
  NiNode *v3; // esi@6
  int v4; // eax@6
  NiUnsharedGeometryGroup *v5; // eax@9
  NiNode *v6; // edi@10
  NiPoint3 rkPos; // [sp+14h] [bp-Ch]@7

  v2 = this;
  if ( pkDropItem
    && !Char::CheckActState(g_pkMainChar, 500000)
    && !g_pkMainChar->m_bWillDead
    && !(unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[1].AddAbStateByAbstateIndex)()
    && Char::IsMoverMovable(g_pkMainChar) )
  {
    v3 = pkDropItem->m_spNode.m_pObject;
    v4 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
    if ( pkDropItem->m_bPickable )
    {
      rkPos.x = *(float *)v4 - v3->m_kLocal.m_Translate.x;
      rkPos.y = *(float *)(v4 + 4) - v3->m_kLocal.m_Translate.y;
      rkPos.z = *(float *)(v4 + 8) - v3->m_kLocal.m_Translate.z;
      if ( NiPoint3::Length(&rkPos) <= 125.0 )
      {
        GameFrameWork::OnPickDropItem(v2, pkDropItem);
        return;
      }
    }
    else
    {
      v5 = TextData::Get(0x8610D8D7);
      GameFrameWork::AddSysMsg(v2, (const char *)v5);
    }
    v6 = pkDropItem->m_spNode.m_pObject;
    rkPos.x = v6->m_kLocal.m_Translate.x;
    rkPos.y = v6->m_kLocal.m_Translate.y;
    rkPos.z = v6->m_kLocal.m_Translate.z;
    GameFrameWork::MainCharMoveToChar(v2, &rkPos, 70.0, 5);
  }
}

//----- (004CD2E0) --------------------------------------------------------
void __thiscall GameFrameWork::SetAutoCloseWin(GameFrameWork *this, PgWin *pkWin)
{
  char *v2; // esi@1
  NiTListItem<PgWin *> *v3; // eax@1
  NiTListItem<PgWin *> **v4; // ecx@1

  v2 = (char *)&this->m_kAutoCloseWinList;
  v3 = this->m_kAutoCloseWinList.vfptr->NewItem((NiTListBase<DFALL<PgWin *>,PgWin *> *)&this->m_kAutoCloseWinList);
  v3->m_element = pkWin;
  v3->m_pkNext = 0;
  v3->m_pkPrev = (NiTListItem<PgWin *> *)*((_DWORD *)v2 + 2);
  v4 = (NiTListItem<PgWin *> **)*((_DWORD *)v2 + 2);
  if ( v4 )
  {
    *v4 = v3;
    ++*((_DWORD *)v2 + 3);
    *((_DWORD *)v2 + 2) = v3;
  }
  else
  {
    ++*((_DWORD *)v2 + 3);
    *((_DWORD *)v2 + 1) = v3;
    *((_DWORD *)v2 + 2) = v3;
  }
}

//----- (004CD330) --------------------------------------------------------
void __stdcall GameFrameWork::UpdateUIScroll(SlideListWin *pkList, SlideBar *pkBar)
{
  PgWin *v3; // esi@1
  int v4; // ecx@3
  int v5; // eax@4

  v3 = (PgWin *)pkList->m_pkParent;
  if ( v3 == PgWinMgr::GetTopWin(&Pgg_kWinMgr) )
    goto LABEL_18;
  if ( PgWinMgr::GetTopWin(&Pgg_kWinMgr) == g_pkToolTipWin )
  {
    v4 = unk_B64838 - 2;
    if ( (unsigned int)(unk_B64838 - 2) < unk_B64838 )
    {
      v5 = unk_B64830;
      if ( unk_B64838 != 2 )
      {
        do
        {
          if ( v5 )
            v5 = *(_DWORD *)v5;
          else
            v5 = 0;
          --v4;
        }
        while ( v4 );
      }
      if ( v5 && *(NiNode **)(v5 + 8) == pkList->m_pkParent )
      {
LABEL_18:
        if ( (unsigned __int8)((int (__thiscall *)(SlideListWin *, unsigned int, int))pkList->vfptr[83].__vecDelDtor)(
                                pkList,
                                PgWin::ms_iMsX,
                                PgWin::ms_iMsY) )
        {
          unk_B6488D = 1;
          if ( PgWin::ms_iMsDeltaZ <= 0 )
          {
            if ( PgWin::ms_iMsDeltaZ < 0 )
              SlideBar::OnClick2(pkBar);
          }
          else
          {
            SlideBar::OnClick1(pkBar);
          }
        }
      }
    }
  }
}

//----- (004CD3E0) --------------------------------------------------------
char __usercall GameFrameWork::IsPlayCardOpen@<al>(GameFrameWork *this@<ecx>, double a2@<st0>)
{
  GameFrameWork *v2; // edi@1
  CollectCardWin *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@4
  char result; // al@4

  v2 = this;
  v3 = this->m_pkCollectCardWin[0];
  if ( v3 && (CollectCardWin::IsPlay(this->m_pkCollectCardWin[0]) || (unsigned __int8)CollectCardWin::IsOpen(v3, a2)) )
  {
    v4 = TextData2::Get(0xC2C6B60F);
    GameFrameWork::AddSysMsg(v2, (const char *)v4);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (004CD430) --------------------------------------------------------
bool __thiscall GameFrameWork::IsVotePossible(GameFrameWork *this, unsigned int kHandle)
{
  PROTO_KQ_INFO *v2; // eax@2
  KQIsVote *v3; // eax@2
  bool result; // al@3

  if ( kHandle != -1
    && (v2 = KingdomQuestWin::GetQuestInfo(this->m_pkKingDomQuest, kHandle), (v3 = KQIsVoteTable::GetByID(v2->ID)) != 0) )
  {
    result = v3->IsVote != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (004CD470) --------------------------------------------------------
char __usercall GameFrameWork::IsAvailableArrange@<al>(GameFrameWork *this@<ecx>, double a2@<st0>)
{
  GameFrameWork *v2; // esi@1
  CollectCardWin *v3; // edi@1
  NiUnsharedGeometryGroup *v4; // eax@4
  const char *v6; // eax@7

  v2 = this;
  v3 = this->m_pkCollectCardWin[0];
  if ( v3 && (CollectCardWin::IsPlay(this->m_pkCollectCardWin[0]) || (unsigned __int8)CollectCardWin::IsOpen(v3, a2)) )
  {
    v4 = TextData2::Get(0xC2C6B60F);
    GameFrameWork::AddSysMsg(v2, (const char *)v4);
    return 0;
  }
  if ( v2->m_pkItemUpgradeWin && (unsigned __int8)((int (*)(void))v2->m_pkItemUpgradeWin->vfptr[65].__vecDelDtor)()
    || v2->m_pkMoverUpgradeWin && (unsigned __int8)((int (*)(void))v2->m_pkMoverUpgradeWin->vfptr[65].__vecDelDtor)() )
  {
    goto LABEL_23;
  }
  if ( v2->m_pkRandomOptionWin && (unsigned __int8)((int (*)(void))v2->m_pkRandomOptionWin->vfptr[65].__vecDelDtor)() )
  {
    v6 = ErrMsgTable::GetErrMsg(12458);
    goto LABEL_8;
  }
  if ( v2->m_pkTermExtendWin && (unsigned __int8)((int (*)(void))v2->m_pkTermExtendWin->vfptr[65].__vecDelDtor)()
    || v2->m_pkMinimonAutoItemUseWin
    && (unsigned __int8)((int (*)(void))v2->m_pkMinimonAutoItemUseWin->vfptr[65].__vecDelDtor)()
    || v2->m_pkItemMixWin && (unsigned __int8)((int (*)(void))v2->m_pkItemMixWin->vfptr[65].__vecDelDtor)() )
  {
LABEL_23:
    v6 = ErrMsgTable::GetErrMsg(12460);
LABEL_8:
    GameFrameWork::AddSysMsg(v2, v6);
    return 0;
  }
  return 1;
}

//----- (004CD590) --------------------------------------------------------
void __thiscall GameFrameWork::OnAutoPickByMiniMon(GameFrameWork *this, std::_Vector_iterator<std::_Vector_val<DropItem *,std::allocator<DropItem *> > > iterBegin, std::_Vector_iterator<std::_Vector_val<DropItem *,std::allocator<DropItem *> > > iterEnd)
{
  DropItem *v3; // ebx@4
  int v4; // esi@4
  int v5; // edi@4
  int v6; // edx@6
  int v7; // eax@7
  bool v8; // zf@13
  GameFrameWork *v9; // [sp+0h] [bp-8h]@1
  DropItem **iter; // [sp+4h] [bp-4h]@3

  v9 = this;
  if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[1].Deaffect)() )
  {
    if ( g_pkMainChar->m_kCharShape.m_bAutoPickItem )
    {
      iter = iterBegin._Ptr;
      if ( iterBegin._Ptr != iterEnd._Ptr )
      {
        while ( 1 )
        {
          v3 = *iter;
          v4 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
          v5 = (*iter)->m_kItemID;
          if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                                + 16))(
                                  ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                                  v5) )
          {
            if ( (unsigned __int16)v5 <= *(_WORD *)(v4 + 200) )
            {
              v6 = *(_DWORD *)(v4 + 196);
              if ( *(_DWORD *)(v6 + 4 * v5) )
              {
                v7 = *(_DWORD *)(v6 + 4 * v5);
                if ( v7 )
                {
                  if ( ItemAuthority::IsAllFalse((ItemAuthority *)&g_kItemAuthority, *(E_BelongType *)(v7 + 274)) )
                    break;
                }
              }
            }
          }
          ++iter;
          if ( iter == iterEnd._Ptr )
            return;
        }
        if ( !g_kParty.m_uiTotalMember
          || (!g_kRaidinfo.m_uiTotalMemberOnRaid ? (v8 = LOBYTE(g_kParty.m_eLootType) == 0) : (v8 = g_kRaidinfo.m_eLootType == 0),
              v8) )
        {
          GameFrameWork::OnPickDropItem(v9, v3);
        }
      }
    }
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (004CD680) --------------------------------------------------------
char __usercall GameFrameWork::PlayCardEffect@<al>(GameFrameWork *this@<ecx>, double a2@<st0>)
{
  GameFrameWork *v2; // esi@1
  NiUnsharedGeometryGroup *v3; // eax@2
  char result; // al@2
  CollectCardWin *v5; // edi@3
  NiUnsharedGeometryGroup *v6; // eax@6
  CollectCardWin *v7; // ecx@7
  SoundIndex rkIndex; // [sp+4h] [bp-8h]@8

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[1].AddAbStateByAbstateIndex)() )
  {
    v3 = TextData2::Get(0x5BAE6CCCu);
    GameFrameWork::AddSysMsg(v2, (const char *)v3);
    result = 0;
  }
  else
  {
    v5 = v2->m_pkCollectCardWin[0];
    if ( v5 && (CollectCardWin::IsPlay(v2->m_pkCollectCardWin[0]) || (unsigned __int8)CollectCardWin::IsOpen(v5, a2)) )
    {
      v6 = TextData2::Get(0xC2C6B60F);
      GameFrameWork::AddSysMsg(v2, (const char *)v6);
      result = 0;
    }
    else
    {
      GameFrameWork::OpenCollectCardWin(v2, a2, 0, 0, 0, 0, 0);
      GameFrameWork::OpenCollectCardWin(v2, a2, 1, 1u, 0, 0, 0);
      v7 = v2->m_pkCollectCardWin[0];
      if ( v7 )
      {
        CollectCardWin::PlayCardEffect(v7);
        rkIndex.m_dwIndex = 48;
        rkIndex.m_acFilename = 0;
        SoundGroupStatic::PlaySoundA((SoundGroupStatic *)&g_kSoundMgr.m_pkInterfaceGroup->vfptr, &rkIndex, 0, 0);
      }
      result = 1;
    }
  }
  return result;
}

//----- (004CD750) --------------------------------------------------------
void __thiscall GameFrameWork::HideEscapeWin(GameFrameWork *this)
{
  GameFrameWork *v1; // edi@1
  std::_Tree_nod<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0> >::_Node *v3; // esi@1
  std::_Tree_nod<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0> >::_Node *v4; // eax@3
  std::_Tree_nod<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0> >::_Node *j; // eax@4
  std::_Tree_nod<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0> >::_Node *i; // eax@7

  v1 = this;
  v2 = this->m_setEscapeHide._Myhead;
  v3 = v2->_Left;
  if ( v2->_Left != v2 )
  {
    do
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, v3->_Myval);
      if ( !v3->_Isnil )
      {
        v4 = v3->_Right;
        if ( v4->_Isnil )
        {
          for ( i = v3->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v3 != i->_Right )
              break;
            v3 = i;
          }
          v3 = i;
        }
        else
        {
          v3 = v3->_Right;
          for ( j = v4->_Left; !j->_Isnil; j = j->_Left )
            v3 = j;
        }
      }
    }
    while ( v3 != v1->m_setEscapeHide._Myhead );
  }
}

//----- (004CD7C0) --------------------------------------------------------
void __thiscall GameFrameWork::CheckWebFocus(GameFrameWork *this)
{
  GameFrameWork *v1; // edi@1
  NiTListItem<PgWin *> *v2; // ecx@3
  std::_Tree_nod<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *> >,0> >::_Node **v3; // eax@3
  std::_Tree_nod<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *> >,0> >::_Node *v4; // esi@3
  NiTListItem<PgWin *> *v5; // eax@5
  std::_Tree_nod<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *> >,0> >::_Node *v6; // eax@10
  std::_Tree_nod<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *> >,0> >::_Node *j; // eax@11
  std::_Tree_nod<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *> >,0> >::_Node *i; // eax@14
  NiTListItem<PgWin *> *v9; // esi@19
  PgWin *v10; // eax@20
  NiTListItem<PgWin *> *v11; // esi@24
  NiTListItem<PgWin *> *v12; // ST00_4@25
  PgTList<PgWin *> kCloseList; // [sp+Ch] [bp-1Ch]@3
  int v14; // [sp+24h] [bp-4h]@3

  v1 = this;
  if ( GameFrameWork::ms_bSpawnApps == 1 && !GetFocus() )
  {
    v2 = 0;
    kCloseList.m_kAllocator.m_uiCount = 0;
    kCloseList.m_pkHead = 0;
    kCloseList.m_pkTail = 0;
    kCloseList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *>Vtbl *)&PgTList<PgWin *>::`vftable';
    v3 = &v1->m_WebCtrlList._Myhead->_Left;
    v4 = *v3;
    v14 = 0;
    if ( (std::_Tree_nod<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *> >,0> >::_Node **)v4 != v3 )
    {
      do
      {
        if ( v4->_Myval.second )
        {
          v5 = kCloseList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *> *)&kCloseList);
          v5->m_element = v4->_Myval.second;
          v5->m_pkNext = 0;
          v5->m_pkPrev = kCloseList.m_pkTail;
          if ( kCloseList.m_pkTail )
          {
            kCloseList.m_pkTail->m_pkNext = v5;
            v2 = kCloseList.m_pkHead;
          }
          else
          {
            v2 = v5;
            kCloseList.m_pkHead = v5;
          }
          ++kCloseList.m_kAllocator.m_uiCount;
          kCloseList.m_pkTail = v5;
        }
        if ( !v4->_Isnil )
        {
          v6 = v4->_Right;
          if ( v6->_Isnil )
          {
            for ( i = v4->_Parent; !i->_Isnil; i = i->_Parent )
            {
              if ( v4 != i->_Right )
                break;
              v4 = i;
            }
            v4 = i;
          }
          else
          {
            v4 = v4->_Right;
            for ( j = v6->_Left; !j->_Isnil; j = j->_Left )
              v4 = j;
          }
        }
      }
      while ( v4 != v1->m_WebCtrlList._Myhead );
    }
    v9 = v2;
    if ( v2 )
    {
      do
      {
        v10 = v9->m_element;
        v9 = v9->m_pkNext;
        if ( v10 )
          PgWinMgr::CloseWin(&Pgg_kWinMgr, v10);
      }
      while ( v9 );
      v2 = kCloseList.m_pkHead;
    }
    v11 = v2;
    while ( v11 )
    {
      v12 = v11;
      v11 = v11->m_pkNext;
      kCloseList.vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,PgWin *> *)&kCloseList, v12);
    }
  }
}
// 97F2C8: using guessed type int (__thiscall *PgTList<PgWin *>::`vftable')(void *p, char);
// A8CB04: using guessed type bool GameFrameWork::ms_bSpawnApps;

//----- (004CD910) --------------------------------------------------------
void __thiscall GameFrameWork::DelWebList(GameFrameWork *this, HWND__ *hHandle)
{
  GameFrameWork *v2; // edi@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *> >,0> > > itResult; // [sp+4h] [bp-4h]@2

  v2 = this;
  if ( GameFrameWork::ms_bSpawnApps == 1 )
  {
    std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::find(
      (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&this->m_WebCtrlList,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&itResult,
      (const unsigned int *)&hHandle);
    if ( itResult._Ptr != v2->m_WebCtrlList._Myhead )
      std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
        (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)&v2->m_WebCtrlList,
        (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > *)&hHandle,
        (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > >)itResult._Ptr);
  }
}
// A8CB04: using guessed type bool GameFrameWork::ms_bSpawnApps;

//----- (004CD960) --------------------------------------------------------
void __stdcall GameFrameWork::NowLoadingText(int LoadingRate)
{
  PROTO_NC_CHAR_BASE_CMD::LoginLocation *v2; // eax@1
  MapViewInfo *v3; // esi@1
  int v4; // edi@1
  int v5; // esi@4
  _iobuf *v6; // eax@4
  _iobuf *v7; // eax@9
  int v8; // esi@10
  int v9; // esi@11
  int *v10; // esi@12
  int v11; // esi@17
  const char *v12; // eax@24
  NiScreenElements *v13; // esi@24
  NiScreenElementsData *v14; // eax@25
  NiScreenElementsData *v15; // eax@26
  int v16; // eax@28
  NiScreenElements *v17; // esi@29
  NiScreenElementsData *v18; // eax@30
  NiScreenElementsData *v19; // eax@31
  int v20; // eax@31
  int v21; // esi@31
  int v22; // eax@32
  NiScreenElementsData *v23; // ecx@34
  NiTexturingProperty *v24; // ebx@34
  NiTexturingProperty *v25; // ST38_4@34
  NiTexturingProperty *v26; // eax@34
  NiTexturingProperty *v27; // eax@35
  NiTexturingProperty *v28; // eax@37
  const char *v29; // ecx@38
  NiTexturingProperty *v30; // eax@40
  NiObjectNET *v31; // eax@41
  NiObjectNET *v32; // ebx@41
  NiObjectNET *v33; // eax@44
  NiObjectNET *v34; // ebx@44
  NiRenderer *v35; // ebx@47
  NiRenderTargetGroup *v36; // eax@54
  NiTexturingProperty *v37; // [sp+24h] [bp-130h]@35
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > ProgressBarName; // [sp+28h] [bp-12Ch]@24
  char BGName[256]; // [sp+44h] [bp-110h]@4
  int v40; // [sp+150h] [bp-4h]@24

  v2 = User::GetMainCharLoginMapName(&g_kUser);
  v3 = MapViewInfoTab::GetByMapName(&v2->currentmap);
  v4 = 0;
  if ( v3 )
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    v5 = (int)v3->Loading;
    sprintf(BGName, "%sLoading\\%s.png", &Folder::m_acMenu, v5);
    v6 = fopen(BGName, "r");
    if ( v6 )
    {
      fclose(v6);
    }
    else
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      sprintf(BGName, "%sLoading\\%s.tga", &Folder::m_acMenu, v5);
    }
    v7 = fopen(BGName, "r");
    if ( v7 )
      goto LABEL_71;
    v8 = ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable
                                                             + 16))(
                            ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable,
                            0) )
    {
      v10 = *(int **)(v8 + 196);
      if ( *v10 )
        v9 = *v10;
      else
        v9 = 0;
    }
    else
    {
      v9 = 0;
    }
    if ( !Folder::m_bInit )
      Folder::Init();
    v11 = v9 + 132;
    sprintf(BGName, "%sLoading\\%s.png", &Folder::m_acMenu, v11);
    v7 = fopen(BGName, "r");
    if ( v7 )
    {
LABEL_71:
      fclose(v7);
    }
    else
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      sprintf(BGName, "%sLoading\\%s.tga", &Folder::m_acMenu, v11);
    }
    if ( !Folder::m_bInit )
      Folder::Init();
    ProgressBarName._Myres = 15;
    ProgressBarName._Mysize = 0;
    ProgressBarName._Bx._Buf[0] = 0;
    v12 = Folder::Merge(&Folder::m_acMenu, "loading\\NowLoadingTextColor.tga");
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&ProgressBarName, v12, strlen(v12));
    v40 = 0;
    v13 = (NiScreenElements *)operator new(0xC4u);
    LOBYTE(v40) = 1;
    if ( v13 )
    {
      v14 = (NiScreenElementsData *)operator new(0x70u);
      LOBYTE(v40) = 2;
      if ( v14 )
        NiScreenElementsData::NiScreenElementsData(v14, 0, 1, 1u, 1, 1, 4, 1, 2, 1);
      else
        v15 = 0;
      LOBYTE(v40) = 1;
      NiScreenElements::NiScreenElements(v13, v15);
      v4 = v16;
    }
    LOBYTE(v40) = 0;
    v17 = (NiScreenElements *)operator new(0xC4u);
    LOBYTE(v40) = 3;
    if ( v17 )
    {
      v18 = (NiScreenElementsData *)operator new(0x70u);
      LOBYTE(v40) = 4;
      if ( v18 )
      {
        NiScreenElementsData::NiScreenElementsData(v18, 0, 1, 1u, 1, 1, 4, 1, 2, 1);
        LOBYTE(v40) = 3;
        NiScreenElements::NiScreenElements(v17, v19);
        v21 = v20;
      }
      else
      {
        LOBYTE(v40) = 3;
        NiScreenElements::NiScreenElements(v17, 0);
        v21 = v22;
      }
    }
    else
    {
      v21 = 0;
    }
    v23 = *(NiScreenElementsData **)(v4 + 184);
    LOBYTE(v40) = 0;
    NiScreenElementsData::Insert(v23, 4u, 0, 0);
    v24 = 0;
    NiScreenElementsData::Insert(*(NiScreenElementsData **)(v21 + 184), 4u, 0, 0);
    NiScreenElementsData::SetRectangle(*(NiScreenElementsData **)(v4 + 184), 0, 0.0, 0.0, 1.0, 1.0);
    *(float *)&v25 = (double)LoadingRate / 100.0 * 0.5 + 0.5;
    NiScreenElementsData::SetRectangle(*(NiScreenElementsData **)(v21 + 184), 0, 0.0, 0.87900001, *(float *)&v25, 0.121);
    NiScreenElementsData::UpdateBound(*(NiScreenElementsData **)(v4 + 184));
    NiScreenElementsData::UpdateBound(*(NiScreenElementsData **)(v21 + 184));
    NiScreenElementsData::SetColors(*(NiScreenElementsData **)(v4 + 184), 0, &NiColorA::WHITE);
    NiScreenElementsData::SetColors(*(NiScreenElementsData **)(v21 + 184), 0, &NiColorA::WHITE);
    NiScreenElementsData::SetTextures(*(NiScreenElementsData **)(v4 + 184), 0, 0, 0.0, 0.0, 1.0, 1.0);
    NiScreenElementsData::SetTextures(*(NiScreenElementsData **)(v21 + 184), 0, 0, 0.0, 0.0, *(float *)&v25, 1.0);
    v26 = (NiTexturingProperty *)operator new(0x44u);
    LOBYTE(v40) = 5;
    if ( v26 )
    {
      NiTexturingProperty::NiTexturingProperty(v26, BGName);
      v37 = v27;
    }
    else
    {
      v37 = 0;
    }
    LOBYTE(v40) = 0;
    NiTexturingProperty::SetBaseClampMode(v37, 0);
    v28 = (NiTexturingProperty *)operator new(0x44u);
    LOBYTE(v40) = 6;
    if ( v28 )
    {
      v29 = ProgressBarName._Bx._Ptr;
      if ( ProgressBarName._Myres < 0x10 )
        v29 = (const char *)&ProgressBarName;
      NiTexturingProperty::NiTexturingProperty(v28, v29);
      v24 = v30;
    }
    LOBYTE(v40) = 0;
    NiTexturingProperty::SetBaseClampMode(v24, 0);
    NiAVObject::AttachProperty((NiAVObject *)v4, (NiProperty *)&v37->vfptr);
    NiAVObject::AttachProperty((NiAVObject *)v21, (NiProperty *)&v24->vfptr);
    v31 = (NiObjectNET *)operator new(0x28u);
    v32 = v31;
    LOBYTE(v40) = 7;
    if ( v31 )
    {
      NiObjectNET::NiObjectNET(v31);
      v32->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
      LOWORD(v32[1].vfptr) = 0;
      v32[1].m_uiRefCount = 0;
      v32[1].m_pcName = (char *)1;
    }
    else
    {
      v32 = 0;
    }
    LOBYTE(v40) = 0;
    v32[1].m_uiRefCount = 1;
    v32[1].m_pcName = 0;
    NiAVObject::AttachProperty((NiAVObject *)v4, (NiProperty *)v32);
    NiAVObject::AttachProperty((NiAVObject *)v21, (NiProperty *)v32);
    v33 = (NiObjectNET *)operator new(0x20u);
    v34 = v33;
    LOBYTE(v40) = 8;
    if ( v33 )
    {
      NiObjectNET::NiObjectNET(v33);
      v34->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
      LOWORD(v34[1].vfptr) = 236;
      BYTE2(v34[1].vfptr) = 0;
    }
    else
    {
      v34 = 0;
    }
    LOWORD(v34[1].vfptr) &= 0xFFFEu;
    LOBYTE(v40) = 0;
    NiAVObject::AttachProperty((NiAVObject *)v4, (NiProperty *)v34);
    NiAVObject::AttachProperty((NiAVObject *)v21, (NiProperty *)v34);
    NiAVObject::UpdateProperties((NiAVObject *)v4);
    NiAVObject::Update((NiAVObject *)v4, 0.0, 1);
    NiAVObject::UpdateProperties((NiAVObject *)v21);
    NiAVObject::Update((NiAVObject *)v21, 0.0, 1);
    v35 = NiRenderer::ms_pkRenderer;
    if ( NiRenderer::ms_pkRenderer->m_eFrameState == FRAMESTATE_OUTSIDE_FRAME
      && NiRenderer::ms_pkRenderer->m_eOffScreenFrameState == FRAMESTATE_OUTSIDE_FRAME
      && (unsigned __int8)((int (__thiscall *)(NiRenderer *))NiRenderer::ms_pkRenderer->vfptr[66].__vecDelDtor)(NiRenderer::ms_pkRenderer) )
    {
      v35->m_eFrameState = 1;
    }
    if ( (v35->m_eFrameState == 1 || v35->m_eOffScreenFrameState == 1) && !v35->m_bRenderTargetGroupActive )
    {
      v36 = (NiRenderTargetGroup *)((int (__thiscall *)(NiRenderer *))v35->vfptr[26].__vecDelDtor)(v35);
      NiRenderer::BeginUsingRenderTargetGroup(v35, v36, 7u);
    }
    if ( (v35->m_eFrameState == 1 || v35->m_eOffScreenFrameState == 1) && v35->m_bRenderTargetGroupActive == 1 )
      v35->vfptr[71].__vecDelDtor((NiRefObject *)v35, 0);
    NiScreenElements::Draw((NiScreenElements *)v4, v35);
    NiScreenElements::Draw((NiScreenElements *)v21, v35);
    NiRenderer::EndUsingRenderTargetGroup(v35);
    if ( v35->m_eFrameState == 1
      && v35->m_eOffScreenFrameState == FRAMESTATE_OUTSIDE_FRAME
      && (unsigned __int8)((int (__thiscall *)(NiRenderer *))v35->vfptr[67].__vecDelDtor)(v35) )
    {
      v35->m_eFrameState = 2;
    }
    if ( v35->m_eFrameState == 2
      && v35->m_eOffScreenFrameState == FRAMESTATE_OUTSIDE_FRAME
      && (unsigned __int8)((int (__thiscall *)(NiRenderer *))v35->vfptr[68].__vecDelDtor)(v35) )
    {
      ++v35->m_uiFrameID;
      v35->m_eFrameState = 0;
    }
    (**(void (__thiscall ***)(_DWORD, _DWORD))v4)(v4, 1);
    (**(void (__thiscall ***)(_DWORD, _DWORD))v21)(v21, 1);
    if ( ProgressBarName._Myres >= 0x10 )
      operator delete(ProgressBarName._Bx._Ptr);
  }
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);
// A8975C: using guessed type bool Folder::m_bInit;
// A8C270: using guessed type int ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable;

//----- (004CDFD0) --------------------------------------------------------
void __thiscall GameFrameWork::UpdateAskServerInform(GameFrameWork *this, float fTime)
{
  GameFrameWork::AskInform *v2; // eax@1
  GameFrameWork::AskInform *v3; // edi@2
  GameFrameWork::AskInform *v4; // esi@4
  int v5; // eax@4
  GameFrameWork::AskInform *v6; // edx@5

  v2 = this->m_vecSentPacket._Myfirst;
  if ( v2 != this->m_vecSentPacket._Mylast )
  {
    v3 = this->m_vecSentPacket._Myfirst;
    if ( v2 != this->m_vecSentPacket._Mylast )
    {
      do
      {
        if ( v3->m_fTime + 1.0 >= fTime )
        {
          ++v3;
        }
        else
        {
          v4 = this->m_vecSentPacket._Mylast;
          v5 = (int)&v3[1];
          if ( &v3[1] != v4 )
          {
            v6 = v3;
            do
            {
              v6->m_fTime = *(float *)v5;
              *(_DWORD *)&v6->m_CharhWnd = *(_DWORD *)(v5 + 4);
              v5 += 8;
              ++v6;
            }
            while ( (GameFrameWork::AskInform *)v5 != v4 );
          }
          --this->m_vecSentPacket._Mylast;
        }
      }
      while ( v3 != this->m_vecSentPacket._Mylast );
    }
  }
}

//----- (004CE050) --------------------------------------------------------
void __thiscall GameFrameWork::ResetAskServerInform(GameFrameWork *this)
{
  GameFrameWork::AskInform *v1; // eax@1
  GameFrameWork::AskInform *v2; // edi@2
  GameFrameWork::AskInform *v3; // esi@3
  int v4; // eax@3
  GameFrameWork::AskInform *v5; // edx@4

  v1 = this->m_vecSentPacket._Myfirst;
  if ( v1 != this->m_vecSentPacket._Mylast )
  {
    v2 = this->m_vecSentPacket._Myfirst;
    if ( v1 != this->m_vecSentPacket._Mylast )
    {
      do
      {
        v3 = this->m_vecSentPacket._Mylast;
        v4 = (int)&v2[1];
        if ( &v2[1] != v3 )
        {
          v5 = v2;
          do
          {
            v5->m_fTime = *(float *)v4;
            *(_DWORD *)&v5->m_CharhWnd = *(_DWORD *)(v4 + 4);
            v4 += 8;
            ++v5;
          }
          while ( (GameFrameWork::AskInform *)v4 != v3 );
        }
        --this->m_vecSentPacket._Mylast;
      }
      while ( v2 != this->m_vecSentPacket._Mylast );
    }
  }
}

//----- (004CE0B0) --------------------------------------------------------
void __usercall GameFrameWork::OpenCard(GameFrameWork *this@<ecx>, double a2@<st0>)
{
  GameFrameWork *v2; // edi@1
  InventoryWin *v3; // eax@2
  unsigned int v4; // esi@2
  ItemIcon *v5; // eax@3
  Item *v6; // eax@4
  ItemUseTask *v7; // ebx@7
  InvWin *v8; // esi@10

  v2 = this;
  if ( this->m_pkInventoryWin )
  {
    v3 = this->m_pkInventoryWin;
    v4 = v3->m_uiCloseCardInvIndex;
    if ( v4 < 0xC0 && (v5 = (ItemIcon *)&v3->m_apkInvWin[v4]->vfptr) != 0 )
      v6 = ItemIcon::GetItem(v5);
    else
      v6 = 0;
    if ( v6 == v2->m_pkInventoryWin->m_pkCloseCardItem )
    {
      v7 = ISingletonTask<ItemUseTask>::Run();
      ItemUseTask::SetInventoryIndex(v7, v4);
      v7->vfptr->SetMsgHooker(&v7->vfptr, v2);
    }
    else
    {
      CollectCardWin::ResetEffect(v2->m_pkCollectCardWin[0]);
      GameFrameWork::OpenCollectCardWin(v2, a2, 0, 0, 0, 0, 0);
    }
    if ( v4 < 0xC0 )
    {
      v8 = v2->m_pkInventoryWin->m_apkInvWin[v4];
      if ( v8 )
        InvWin::SetLock(v8, 0);
    }
  }
}

//----- (004CE160) --------------------------------------------------------
void __thiscall GameFrameWork::AddWebList(GameFrameWork *this, std::pair<HWND__ *,PgWin *> kElement)
{
  std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *v2; // esi@2
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v3; // eax@2
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >,bool> result; // [sp+0h] [bp-8h]@2

  if ( GameFrameWork::ms_bSpawnApps == 1 )
  {
    v2 = (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&this->m_WebCtrlList;
    v3 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&this->m_WebCtrlList, (std::pair<int const ,int> *)&kElement);
    std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
      v2,
      &result,
      v3,
      0);
  }
}
// A8CB04: using guessed type bool GameFrameWork::ms_bSpawnApps;

//----- (004CE1A0) --------------------------------------------------------
bool __thiscall GameFrameWork::AddAskServerInform(GameFrameWork *this, float fTime, unsigned __int16 hnd, NETCOMMAND *netCmd)
{
  GameFrameWork::AskInform *v4; // edx@1
  std::vector<NiPoint2,std::allocator<NiPoint2> > *v5; // esi@1
  GameFrameWork::AskInform *v6; // edi@1
  int v7; // ecx@3
  unsigned __int16 v8; // ax@7
  unsigned int v9; // eax@7
  NiPoint2 *v10; // edx@8
  NiPoint2 *v11; // ecx@9
  int v12; // edi@9
  unsigned int v13; // eax@10
  bool result; // al@12
  unsigned int v15; // eax@13
  unsigned int v16; // ecx@13
  unsigned int v17; // ecx@15
  NiPoint2 *v18; // eax@20
  NiPoint2 *v19; // ecx@21
  NiPoint2 *v20; // ecx@22
  unsigned int v21; // eax@23
  unsigned int v22; // eax@25
  unsigned int v23; // ecx@25
  unsigned int v24; // ecx@27
  NiPoint2 *v25; // eax@32
  float v26; // ecx@33
  GameFrameWork::AskInform AddElement; // [sp+0h] [bp-8h]@7

  v4 = this->m_vecSentPacket._Myfirst;
  v5 = (std::vector<NiPoint2,std::allocator<NiPoint2> > *)&this->m_vecSentPacket;
  v6 = this->m_vecSentPacket._Mylast;
  if ( v4 == v6 )
  {
LABEL_7:
    AddElement.m_fTime = fTime;
    v8 = netCmd->protocol;
    AddElement.m_CharhWnd = hnd;
    AddElement.m_Packet.protocol = v8;
    v9 = (unsigned int)v5->_Mylast;
    if ( (unsigned int)&AddElement >= v9 || (v10 = v5->_Myfirst, v5->_Myfirst > (NiPoint2 *)&AddElement) )
    {
      v20 = v5->_Myend;
      if ( (NiPoint2 *)v9 == v20 )
      {
        v21 = (signed int)(v9 - (unsigned int)v5->_Myfirst) >> 3;
        if ( v21 > 0x1FFFFFFE )
          std::_Xlength_error("vector<T> too long");
        v22 = v21 + 1;
        v23 = v20 - v5->_Myfirst;
        if ( v22 > v23 )
        {
          if ( 0x1FFFFFFF - (v23 >> 1) >= v23 )
            v24 = (v23 >> 1) + v23;
          else
            v24 = 0;
          if ( v24 < v22 )
            v24 = v22;
          std::vector<NiPoint2,std::allocator<NiPoint2>>::reserve(v5, v24);
        }
      }
      v25 = v5->_Mylast;
      if ( v25 )
      {
        v26 = *(float *)&AddElement.m_CharhWnd;
        v25->x = AddElement.m_fTime;
        v25->y = v26;
      }
    }
    else
    {
      v11 = v5->_Myend;
      v12 = ((char *)&AddElement - (char *)v10) >> 3;
      if ( (NiPoint2 *)v9 == v11 )
      {
        v13 = (signed int)(v9 - (_DWORD)v10) >> 3;
        if ( v13 > 0x1FFFFFFE )
          std::_Xlength_error("vector<T> too long");
        v15 = v13 + 1;
        v16 = v11 - v10;
        if ( v15 > v16 )
        {
          if ( 0x1FFFFFFF - (v16 >> 1) >= v16 )
            v17 = (v16 >> 1) + v16;
          else
            v17 = 0;
          if ( v17 < v15 )
            v17 = v15;
          std::vector<NiPoint2,std::allocator<NiPoint2>>::reserve(v5, v17);
        }
      }
      v18 = v5->_Mylast;
      if ( v18 )
      {
        v19 = v5->_Myfirst;
        v18->x = v5->_Myfirst[v12].x;
        v18->y = v19[v12].y;
        ++v5->_Mylast;
        return 1;
      }
    }
    ++v5->_Mylast;
    result = 1;
  }
  else
  {
    while ( 1 )
    {
      if ( hnd == v4->m_CharhWnd )
      {
        v7 = v4->m_Packet.protocol;
        if ( !(((unsigned __int16)v7 ^ netCmd->protocol) & 0xFC00)
          && !((v7 ^ netCmd->protocol) & 0x3FF)
          && v4->m_fTime + 1.0 > fTime )
        {
          break;
        }
      }
      ++v4;
      if ( v4 == v6 )
        goto LABEL_7;
    }
    result = 0;
  }
  return result;
}

//----- (004CE330) --------------------------------------------------------
void __userpurge GameFrameWork::RegisterCard(GameFrameWork *this@<ecx>, double a2@<st0>, unsigned int uiSlot, unsigned int uiCardID, unsigned int uiStar, unsigned int uiSerial)
{
  GameFrameWork *v6; // edi@1
  CollectCardWin *v7; // esi@1
  NiUnsharedGeometryGroup *v8; // eax@4
  bool v9; // cf@4
  CollectCardWin *v10; // esi@5
  int v11; // ST28_4@6
  CollectWin *v12; // eax@7
  unsigned int v13; // ecx@8
  _DWORD *v14; // edx@9
  NiUnsharedGeometryGroup *v15; // eax@12
  NiUnsharedGeometryGroup *v16; // ecx@12
  int v17; // esi@12
  char v18; // dl@13
  char *v19; // eax@16
  MsgBox *v20; // esi@18
  unsigned int v21; // eax@24
  char v22; // dl@27
  char v23; // dl@31
  char v24; // dl@34
  GameFrameWork *v25; // [sp+10h] [bp-5Ch]@1
  int iYPos; // [sp+14h] [bp-58h]@1
  PgMsg::Frame kCancelMsg; // [sp+18h] [bp-54h]@19
  PgMsg::Frame pkFrameMsg; // [sp+2Ch] [bp-40h]@8
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kMsgText; // [sp+40h] [bp-2Ch]@1
  int v30; // [sp+68h] [bp-4h]@1

  v6 = this;
  v25 = this;
  iYPos = 0;
  kMsgText._Myres = 15;
  kMsgText._Mysize = 0;
  kMsgText._Bx._Buf[0] = 0;
  v7 = this->m_pkCollectCardWin[0];
  v30 = 0;
  if ( v7 && (CollectCardWin::IsPlay(v7) || (unsigned __int8)CollectCardWin::IsOpen(v7, a2)) )
  {
    v8 = TextData2::Get(0xC2C6B60F);
    GameFrameWork::AddSysMsg(v6, (const char *)v8);
    v9 = kMsgText._Myres < 0x10;
  }
  else
  {
    GameFrameWork::OpenCollectCardWin(v6, a2, 0, 0, 0, 0, 0);
    GameFrameWork::OpenCollectCardWin(v25, a2, 1, uiCardID, uiStar, uiSerial, 0);
    v10 = v25->m_pkCollectCardWin[0];
    if ( v10 )
    {
      v11 = ((int (__thiscall *)(CollectCardWin *))v10->vfptr[42].__vecDelDtor)(v10);
      iYPos = ((int (__thiscall *)(CollectCardWin *))v10->vfptr[37].__vecDelDtor)(v10) + v11;
    }
    v12 = v25->m_pkCollectWin;
    if ( v12 )
    {
      std::vector<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo>>::vector<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo>>(
        (std::vector<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo> > *)&pkFrameMsg.m_uiDumy[1],
        &v12->m_kCardInfos);
      LOBYTE(v30) = 1;
      v13 = 0;
      if ( !((signed int)(pkFrameMsg.m_uiFrameMsg - pkFrameMsg.m_uiDumy[1]) / 20) )
        goto LABEL_12;
      v14 = (_DWORD *)(pkFrameMsg.m_uiDumy[1] + 4);
      while ( *v14 != uiCardID )
      {
        ++v13;
        v14 += 5;
        if ( v13 >= (signed int)(pkFrameMsg.m_uiFrameMsg - pkFrameMsg.m_uiDumy[1]) / 20 )
          goto LABEL_12;
      }
      v21 = *(_DWORD *)(pkFrameMsg.m_uiDumy[1] + 20 * v13 + 8);
      if ( *(_DWORD *)(pkFrameMsg.m_uiDumy[1] + 20 * v13 + 16) > 0 )
      {
        if ( v21 <= uiStar )
        {
          if ( v21 == uiStar )
          {
            v15 = TextData2::Get((unsigned int)&loc_516870);
            v16 = v15;
            v17 = (int)&v15->vfptr + 1;
            do
            {
              v23 = (char)v16->vfptr;
              v16 = (NiUnsharedGeometryGroup *)((char *)v16 + 1);
            }
            while ( v23 );
          }
          else
          {
            v15 = TextData2::Get(0x182F3381u);
            v16 = v15;
            v17 = (int)&v15->vfptr + 1;
            do
            {
              v24 = (char)v16->vfptr;
              v16 = (NiUnsharedGeometryGroup *)((char *)v16 + 1);
            }
            while ( v24 );
          }
        }
        else
        {
          v15 = TextData2::Get((unsigned int)&loc_4B7C70 + 1);
          v16 = v15;
          v17 = (int)&v15->vfptr + 1;
          do
          {
            v22 = (char)v16->vfptr;
            v16 = (NiUnsharedGeometryGroup *)((char *)v16 + 1);
          }
          while ( v22 );
        }
      }
      else
      {
LABEL_12:
        v15 = TextData2::Get(0xC644301E);
        v16 = v15;
        v17 = (int)&v15->vfptr + 1;
        do
        {
          v18 = (char)v16->vfptr;
          v16 = (NiUnsharedGeometryGroup *)((char *)v16 + 1);
        }
        while ( v18 );
      }
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &kMsgText,
        (const char *)v15,
        (unsigned int)v16 - v17);
      LOBYTE(v30) = 0;
      if ( pkFrameMsg.m_uiDumy[1] )
        operator delete((void *)pkFrameMsg.m_uiDumy[1]);
    }
    v19 = kMsgText._Bx._Ptr;
    if ( kMsgText._Myres < 0x10 )
      v19 = (char *)&kMsgText;
    v20 = MsgBox::Modal(MSGBOX_OKCANCEL, v19);
    if ( v20 )
    {
      pkFrameMsg.m_uiFrameWParam = uiSlot;
      pkFrameMsg.m_uiFrameMsg = 268;
      kCancelMsg.m_uiFrameMsg = 269;
      MsgBox::SetFrameWorkMsgOnClose(v20, (PgFrameWork *)&v25->vfptr, &pkFrameMsg, &kCancelMsg);
      v20->vfptr[44].__vecDelDtor((NiRefObject *)v20, iYPos);
    }
    v9 = kMsgText._Myres < 0x10;
  }
  if ( !v9 )
    operator delete(kMsgText._Bx._Ptr);
}

//----- (004CE5A0) --------------------------------------------------------
void __thiscall GameFrameWork::~GameFrameWork(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  PartyWinInterface *v2; // edi@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v3; // ST0C_4@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v4; // ST08_4@3
  CameraEffect *v5; // edi@5
  CBlindEffect *v6; // edi@9
  void **v7; // ecx@13
  std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *v8; // eax@13
  std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *v9; // edi@14
  NiNode *v10; // edi@17
  NiNode *v11; // edi@21
  NiNode *v12; // edi@25
  NiNode *v13; // edi@29
  Net *v14; // edi@33
  Net *v15; // edi@37
  MsgBox *v16; // edi@41
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v17; // edi@45
  NiTListItem<PgWin *> **v18; // ebx@45
  NiTListItem<PgWin *> **v19; // ST0C_4@46
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v20; // edi@47
  NiTListItem<PgWin *> **v21; // ebx@47
  NiTListItem<PgWin *> **v22; // ST0C_4@48
  MsgBox *v23; // edi@49
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > v24; // ST0C_4@53
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > v25; // ST08_4@53
  KeyMap *v26; // edi@53
  PgMsg::Frame *v27; // ST0C_4@57
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > result; // [sp+10h] [bp-18h]@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > v29; // [sp+14h] [bp-14h]@3
  GameFrameWork *v30; // [sp+18h] [bp-10h]@1
  int v31; // [sp+24h] [bp-4h]@1

  v1 = this;
  v30 = this;
  this->vfptr = (IDirectMessengerVtbl *)&GameFrameWork::`vftable';
  v31 = 21;
  MachineOpt::RemoveAll();
  v2 = v1->m_pkPartyWinInterface;
  if ( v2 )
  {
    PartyWinInterface::~PartyWinInterface(v1->m_pkPartyWinInterface);
    operator delete(v2);
  }
  v29._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)&v1->m_WebCtrlList;
  v3._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_WebCtrlList._Myhead;
  v4._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_WebCtrlList._Myhead->_Left;
  LOBYTE(v31) = 22;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_WebCtrlList,
    &result,
    v4,
    v3);
  operator delete(v1->m_WebCtrlList._Myhead);
  if ( v1->m_kGuideViewList._Myfirst )
    operator delete(v1->m_kGuideViewList._Myfirst);
  v1->m_kGuideViewList._Myfirst = 0;
  v1->m_kGuideViewList._Mylast = 0;
  v1->m_kGuideViewList._Myend = 0;
  v5 = v1->m_spCamEffect.m_pObject;
  LOBYTE(v31) = 18;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  v6 = v1->m_spBlindEffect.m_pObject;
  LOBYTE(v31) = 17;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  LOBYTE(v31) = 16;
  `eh vector destructor iterator'(
    v1->m_CharList,
    0x14u,
    6,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
  v7 = (void **)&v1->m_kAttackedMsg.m_kAttackedList._Myhead->_Next;
  v8 = (std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *)*v7;
  *v7 = v7;
  v1->m_kAttackedMsg.m_kAttackedList._Myhead->_Prev = v1->m_kAttackedMsg.m_kAttackedList._Myhead;
  v1->m_kAttackedMsg.m_kAttackedList._Mysize = 0;
  if ( v8 != v1->m_kAttackedMsg.m_kAttackedList._Myhead )
  {
    do
    {
      v9 = v8->_Next;
      operator delete(v8);
      v8 = v9;
    }
    while ( v9 != v1->m_kAttackedMsg.m_kAttackedList._Myhead );
  }
  operator delete(v1->m_kAttackedMsg.m_kAttackedList._Myhead);
  std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>>>::clear(&v1->m_kSmartWhisper.m_kRecentWhisperList);
  operator delete(v1->m_kSmartWhisper.m_kRecentWhisperList._Myhead);
  LOBYTE(v31) = 13;
  ChatCommandList::~ChatCommandList(&v1->m_kChatComList);
  if ( v1->m_vecSentPacket._Myfirst )
    operator delete(v1->m_vecSentPacket._Myfirst);
  v1->m_vecSentPacket._Myfirst = 0;
  v1->m_vecSentPacket._Mylast = 0;
  v1->m_vecSentPacket._Myend = 0;
  v10 = v1->m_pOXEffectX.m_pObject;
  LOBYTE(v31) = 11;
  if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
    v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
  v11 = v1->m_pOXEffectO.m_pObject;
  LOBYTE(v31) = 10;
  if ( v11 && !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
    v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
  v12 = v1->m_pEffect2.m_pObject;
  LOBYTE(v31) = 9;
  if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
    v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
  v13 = v1->m_pEffect1.m_pObject;
  LOBYTE(v31) = 8;
  if ( v13 && !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) && v13 )
    v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
  v14 = v1->m_spWorldMgrNet.m_pObject;
  LOBYTE(v31) = 7;
  if ( v14 && !InterlockedDecrement((volatile LONG *)&v14->m_uiRefCount) && v14 )
    v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
  v15 = v1->m_spZoneNet.m_pObject;
  LOBYTE(v31) = 6;
  if ( v15 && !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) && v15 )
    v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
  v16 = v1->m_pkRaidReplyWin.m_pObject;
  LOBYTE(v31) = 5;
  if ( v16 && !InterlockedDecrement((volatile LONG *)&v16->m_uiRefCount) && v16 )
    v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
  v17 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_kCanHideWinList;
  result._Ptr = v17;
  v17->_Left = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&NiTPointerListBase<DFALL<PgWin *>,PgWin *>::`vftable';
  v18 = &v1->m_kCanHideWinList.m_pkHead->m_pkNext;
  LOBYTE(v31) = 23;
  while ( v18 )
  {
    v19 = v18;
    v18 = (NiTListItem<PgWin *> **)*v18;
    ((void (__thiscall *)(NiTList<PgWin *> *, NiTListItem<PgWin *> **))v17->_Left->_Right)(&v1->m_kCanHideWinList, v19);
  }
  v1->m_kCanHideWinList.m_kAllocator.m_uiCount = 0;
  v1->m_kCanHideWinList.m_pkHead = 0;
  v1->m_kCanHideWinList.m_pkTail = 0;
  v17->_Left = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&NiTListBase<DFALL<PgWin *>,PgWin *>::`vftable';
  v20 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_kAutoCloseWinList;
  result._Ptr = v20;
  v20->_Left = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&NiTPointerListBase<DFALL<PgWin *>,PgWin *>::`vftable';
  v21 = &v1->m_kAutoCloseWinList.m_pkHead->m_pkNext;
  LOBYTE(v31) = 24;
  while ( v21 )
  {
    v22 = v21;
    v21 = (NiTListItem<PgWin *> **)*v21;
    ((void (__thiscall *)(NiTList<PgWin *> *, NiTListItem<PgWin *> **))v20->_Left->_Right)(
      &v1->m_kAutoCloseWinList,
      v22);
  }
  v1->m_kAutoCloseWinList.m_kAllocator.m_uiCount = 0;
  v1->m_kAutoCloseWinList.m_pkHead = 0;
  v1->m_kAutoCloseWinList.m_pkTail = 0;
  v20->_Left = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&NiTListBase<DFALL<PgWin *>,PgWin *>::`vftable';
  v23 = v1->m_spUserTradeMsgBox.m_pObject;
  LOBYTE(v31) = 2;
  if ( v23 && !InterlockedDecrement((volatile LONG *)&v23->m_uiRefCount) && v23 )
    v23->vfptr->__vecDelDtor((NiRefObject *)v23, 1u);
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_setEscapeHide;
  v24._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v1->m_setEscapeHide._Myhead;
  v25._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v1->m_setEscapeHide._Myhead->_Left;
  LOBYTE(v31) = 25;
  std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::erase(
    (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v1->m_setEscapeHide,
    &v29,
    v25,
    v24);
  operator delete(v1->m_setEscapeHide._Myhead);
  v26 = v1->m_spKeyMap.m_pObject;
  LOBYTE(v31) = 0;
  if ( v26 && !InterlockedDecrement((volatile LONG *)&v26->m_uiRefCount) && v26 )
    v26->vfptr->__vecDelDtor((NiRefObject *)v26, 1u);
  v27 = v1->m_kMsgQ.m_pBase;
  v1->vfptr = (IDirectMessengerVtbl *)&PgFrameWork::`vftable';
  operator delete[](v27);
}
// 970534: using guessed type void (__thiscall *PgFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 981C7C: using guessed type int (__thiscall *NiTListBase<DFALL<PgWin *>,PgWin *>::`vftable')(void *p, char);
// 981CB4: using guessed type int (__thiscall *NiTPointerListBase<DFALL<PgWin *>,PgWin *>::`vftable')(void *p, char);
// 982724: using guessed type void (__thiscall *GameFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);

//----- (004CE9A0) --------------------------------------------------------
void __thiscall GameFrameWork::GetDropItemByArea(GameFrameWork *this, GameFrameWork::AutoPickType eType)
{
  unsigned int v2; // ebx@1
  NiPointer<NiAVObject> *v3; // esi@1
  _DWORD *v4; // edi@1
  NiRTTI *v5; // eax@2
  int v6; // eax@8
  int v7; // esi@8
  DropItem *v8; // eax@9
  NiPointer<NiAVObject> *v9; // esi@11
  DropItem **v10; // ebx@16
  NiNode *v11; // esi@17
  int v12; // edi@17
  DropItem *v13; // eax@17
  DropItem **v14; // edx@20
  int v15; // esi@22
  unsigned int v16; // eax@23
  unsigned int v17; // eax@24
  unsigned int v18; // ecx@24
  unsigned int v19; // ecx@26
  unsigned int v20; // eax@34
  unsigned int v21; // eax@35
  unsigned int v22; // ecx@35
  unsigned int v23; // ecx@37
  char *v24; // edx@47
  NiPointer<NiAVObject> *v25; // eax@47
  int v26; // ecx@47
  int v27; // eax@50
  AbStateInfecteeVtbl *v28; // edx@50
  NiPoint3 *v29; // eax@50
  const void *v30; // eax@50
  NiPointer<NiAVObject> *v31; // eax@60
  NiPointer<NiAVObject> *v32; // edi@60
  NiPointer<NiAVObject> v33; // esi@61
  NiPointer<NiAVObject> *v34; // edi@71
  NiPointer<NiAVObject> v35; // esi@72
  DropItemSorter v36; // [sp-44h] [bp-DCh]@50
  NiPoint3 *v37; // [sp-4h] [bp-9Ch]@50
  DropItemSorter v38; // [sp+10h] [bp-88h]@50
  std::vector<NiPointer<NiAVObject>,std::allocator<NiPointer<NiAVObject> > > m_setDropItem; // [sp+50h] [bp-48h]@1
  std::vector<DropItem *,std::allocator<DropItem *> > m_vecNearDropItem; // [sp+60h] [bp-38h]@16
  DropItem **_Mid; // [sp+70h] [bp-28h]@19
  float v42; // [sp+74h] [bp-24h]@19
  float v43; // [sp+78h] [bp-20h]@19
  GameFrameWork *v44; // [sp+7Ch] [bp-1Ch]@1
  std::_Vector_iterator<std::_Vector_val<NiPointer<NiAVObject>,std::allocator<NiPointer<NiAVObject> > > > iterCur; // [sp+80h] [bp-18h]@11
  DropItem *pkItem; // [sp+84h] [bp-14h]@6
  bool bNearHaveItem; // [sp+8Bh] [bp-Dh]@16
  int v48; // [sp+94h] [bp-4h]@1
  GameFrameWork::AutoPickType eTypea; // [sp+A0h] [bp+8h]@60

  v44 = this;
  v2 = 0;
  v3 = 0;
  m_setDropItem._Myfirst = 0;
  m_setDropItem._Mylast = 0;
  m_setDropItem._Myend = 0;
  v4 = dword_A995CC[0];
  v48 = 0;
  if ( dword_A995CC[0] )
  {
    v5 = (NiRTTI *)(*(int (__thiscall **)(_DWORD *))(*dword_A995CC[0] + 4))(dword_A995CC[0]);
    if ( v5 )
    {
      while ( v5 != &NiNode::m_RTTI )
      {
        v5 = v5->m_pkBaseRTTI;
        if ( !v5 )
          goto LABEL_16;
      }
      pkItem = (DropItem *)v4[47];
      if ( pkItem )
      {
        do
        {
          if ( v4[47] > v2 )
          {
            v6 = v4[45];
            v7 = *(_DWORD *)(v6 + 4 * v2);
            if ( v7 )
            {
              v8 = DropItemMgr::GetDropItemByNodePtr(&g_kDropItemMgr, *(NiNode **)(v6 + 4 * v2));
              if ( v8 )
              {
                if ( v8->m_bPickable )
                {
                  iterCur._Ptr = (NiPointer<NiAVObject> *)v7;
                  InterlockedIncrement((volatile LONG *)(v7 + 4));
                  LOBYTE(v48) = 1;
                  std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData>>>::push_back(
                    (std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData> > > *)&m_setDropItem,
                    (NiPointer<PgSprData> *)&iterCur);
                  v9 = iterCur._Ptr;
                  LOBYTE(v48) = 0;
                  if ( iterCur._Ptr )
                  {
                    if ( !InterlockedDecrement((volatile LONG *)&iterCur._Ptr[1]) )
                      ((void (__thiscall *)(NiPointer<NiAVObject> *, signed int))v9->m_pObject->vfptr)(v9, 1);
                  }
                }
              }
            }
          }
          ++v2;
        }
        while ( v2 < (unsigned int)pkItem );
        v3 = m_setDropItem._Myfirst;
      }
    }
  }
LABEL_16:
  iterCur._Ptr = v3;
  m_vecNearDropItem._Myfirst = 0;
  m_vecNearDropItem._Mylast = 0;
  m_vecNearDropItem._Myend = 0;
  LOBYTE(v48) = 2;
  std::vector<PgWinText *,std::allocator<PgWinText *>>::resize(
    (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&m_vecNearDropItem,
    0);
  v10 = m_vecNearDropItem._Myfirst;
  bNearHaveItem = 0;
  if ( v3 != m_setDropItem._Mylast )
  {
    do
    {
      v11 = (NiNode *)iterCur._Ptr->m_pObject;
      v12 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
      v13 = DropItemMgr::GetDropItemByNodePtr(&g_kDropItemMgr, v11);
      pkItem = v13;
      if ( v13 )
      {
        if ( v13->m_bPickable )
        {
          v43 = *(float *)v12 - v11->m_kLocal.m_Translate.x;
          v42 = *(float *)(v12 + 4) - v11->m_kLocal.m_Translate.y;
          *(float *)&_Mid = *(float *)(v12 + 8) - v11->m_kLocal.m_Translate.z;
          *(float *)&_Mid = v43 * v43 + v42 * v42 + *(float *)&_Mid * *(float *)&_Mid;
          *(float *)&_Mid = sqrt(*(float *)&_Mid);
          if ( *(float *)&_Mid <= 100.0 )
          {
            v14 = m_vecNearDropItem._Mylast;
            bNearHaveItem = 1;
            if ( &pkItem >= m_vecNearDropItem._Mylast || v10 > &pkItem )
            {
              if ( m_vecNearDropItem._Mylast == m_vecNearDropItem._Myend )
              {
                v20 = m_vecNearDropItem._Mylast - v10;
                if ( v20 > 0x3FFFFFFE )
LABEL_54:
                  std::_Xlength_error("vector<T> too long");
                v21 = v20 + 1;
                v22 = m_vecNearDropItem._Myend - v10;
                if ( v21 > v22 )
                {
                  if ( 0x3FFFFFFF - (v22 >> 1) >= v22 )
                    v23 = (v22 >> 1) + v22;
                  else
                    v23 = 0;
                  if ( v23 < v21 )
                    v23 = v21;
                  std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
                    (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&m_vecNearDropItem,
                    v23);
                  v10 = m_vecNearDropItem._Myfirst;
                  v14 = m_vecNearDropItem._Mylast;
                }
              }
              if ( v14 )
                *v14 = pkItem;
            }
            else
            {
              v15 = &pkItem - v10;
              if ( m_vecNearDropItem._Mylast == m_vecNearDropItem._Myend )
              {
                v16 = m_vecNearDropItem._Mylast - v10;
                if ( v16 > 0x3FFFFFFE )
                  goto LABEL_54;
                v17 = v16 + 1;
                v18 = m_vecNearDropItem._Myend - v10;
                if ( v17 > v18 )
                {
                  if ( 0x3FFFFFFF - (v18 >> 1) >= v18 )
                    v19 = (v18 >> 1) + v18;
                  else
                    v19 = 0;
                  if ( v19 < v17 )
                    v19 = v17;
                  std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
                    (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&m_vecNearDropItem,
                    v19);
                  v10 = m_vecNearDropItem._Myfirst;
                  v14 = m_vecNearDropItem._Mylast;
                }
              }
              if ( v14 )
                *v14 = v10[v15];
            }
            m_vecNearDropItem._Mylast = v14 + 1;
          }
        }
      }
      ++iterCur._Ptr;
    }
    while ( iterCur._Ptr != m_setDropItem._Mylast );
    v3 = m_setDropItem._Myfirst;
  }
  v24 = (char *)m_vecNearDropItem._Mylast;
  v25 = (NiPointer<NiAVObject> *)(m_vecNearDropItem._Mylast - v10);
  v26 = 1;
  iterCur._Ptr = v25;
  if ( v25 )
  {
    if ( (signed int)v25 < 1 )
      v26 = m_vecNearDropItem._Mylast - v10;
    _Mid = &v10[v26];
    v27 = ((int (*)(void))g_pkMainChar->vfptr[6].DeleteAbStateByAbstateIndex)();
    v28 = g_pkMainChar->vfptr;
    v37 = (NiPoint3 *)v27;
    v29 = (NiPoint3 *)((int (*)(void))v28[6].Deaffect)();
    DropItemSorter::DropItemSorter(&v38, v29, v37);
    v37 = 0;
    qmemcpy(&v36, v30, sizeof(v36));
    std::_Partial_sort<DropItem * *,DropItem *,DropItemSorter>(v10, _Mid, m_vecNearDropItem._Mylast, v36);
    if ( bNearHaveItem )
    {
      if ( eType )
      {
        if ( eType == 1 )
          GameFrameWork::OnAutoPickByMiniMon(
            v44,
            (std::_Vector_iterator<std::_Vector_val<DropItem *,std::allocator<DropItem *> > >)v10,
            (std::_Vector_iterator<std::_Vector_val<DropItem *,std::allocator<DropItem *> > >)m_vecNearDropItem._Mylast);
      }
      else
      {
        GameFrameWork::OnPickDropItem(v44, *v10);
      }
    }
    v24 = (char *)m_vecNearDropItem._Mylast;
    v3 = m_setDropItem._Myfirst;
  }
  if ( (char *)v10 != v24 )
  {
    memmove((char *)v10, v24, 0);
    m_vecNearDropItem._Mylast = v10;
  }
  if ( v3 != m_setDropItem._Mylast )
  {
    v37 = (NiPoint3 *)eType;
    v31 = std::_Move<NiPointer<NiAVObject> *,NiPointer<NiAVObject> *>(m_setDropItem._Mylast, m_setDropItem._Mylast, v3);
    eTypea = (GameFrameWork::AutoPickType)v31;
    v32 = v31;
    if ( v31 != m_setDropItem._Mylast )
    {
      do
      {
        v33.m_pObject = v32->m_pObject;
        if ( v32->m_pObject && !InterlockedDecrement((volatile LONG *)&v33.m_pObject->m_uiRefCount) && v33.m_pObject )
          v33.m_pObject->vfptr->__vecDelDtor((NiRefObject *)v33.m_pObject, 1u);
        ++v32;
      }
      while ( v32 != m_setDropItem._Mylast );
      v3 = m_setDropItem._Myfirst;
      v31 = (NiPointer<NiAVObject> *)eTypea;
    }
    m_setDropItem._Mylast = v31;
  }
  if ( v10 )
    operator delete(v10);
  v48 = -1;
  if ( v3 )
  {
    v34 = v3;
    if ( v3 != m_setDropItem._Mylast )
    {
      do
      {
        v35.m_pObject = v34->m_pObject;
        if ( v34->m_pObject && !InterlockedDecrement((volatile LONG *)&v35.m_pObject->m_uiRefCount) )
        {
          if ( v35.m_pObject )
            v35.m_pObject->vfptr->__vecDelDtor((NiRefObject *)v35.m_pObject, 1u);
        }
        ++v34;
      }
      while ( v34 != m_setDropItem._Mylast );
      v3 = m_setDropItem._Myfirst;
    }
    operator delete(v3);
  }
}

//----- (004CEDB0) --------------------------------------------------------
void __thiscall GameFrameWork::AutoPickDropItem(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1

  v1 = this;
  if ( Inventory::IsFull(&g_kInventory) )
  {
    GameFrameWork::SendAutoPickItemReq(v1, 0);
    g_pkMainChar->m_bWaitingAckWhenInvenFull = 1;
  }
  else
  {
    GameFrameWork::GetDropItemByArea(v1, APIT_MINIMON);
  }
}

//----- (004CEDF0) --------------------------------------------------------
void __thiscall GameFrameWork::GameFrameWork(GameFrameWork *this)
{
  GameFrameWork *v1; // esi@1
  std::_Tree_nod<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0> >::_Node *v2; // eax@1
  std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *v3; // eax@2
  std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *v4; // eax@3
  std::_Tree_nod<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *> >,0> >::_Node *v5; // eax@4
  MsgBox *v6; // edi@5
  char *v7; // eax@10
  PartyWinInterface *v8; // eax@11
  int v9; // edi@13
  std::exception v10; // [sp+10h] [bp-30h]@20
  std::exception pExceptionObject; // [sp+1Ch] [bp-24h]@16
  GameFrameWork *v12; // [sp+28h] [bp-18h]@1
  char *_What; // [sp+2Ch] [bp-14h]@16
  char *v14; // [sp+30h] [bp-10h]@10
  int v15; // [sp+3Ch] [bp-4h]@1

  v1 = this;
  v12 = this;
  this->m_pkMsgHooker = 0;
  this->m_uiMessageNum = 0;
  this->vfptr = (IDirectMessengerVtbl *)&PgFrameWork::`vftable';
  this->m_kMsgQ.m_pBase = (PgMsg::Frame *)operator new[](0x14u);
  v1->m_kMsgQ.m_uiAlloced = 1;
  v1->m_kMsgQ.m_uiHead = -1;
  v1->m_kMsgQ.m_uiTail = 0;
  v1->m_BackFrameID = 0;
  v1->m_bInit = 0;
  v15 = 0;
  v1->vfptr = (IDirectMessengerVtbl *)&GameFrameWork::`vftable';
  KeyboardMoveProcess::Clear(&v1->m_kCharMover);
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kStickTimer);
  v1->m_spKeyMap.m_pObject = 0;
  LOBYTE(v15) = 1;
  v1->m_setEscapeHide._Mysize = 0;
  v2 = (std::_Tree_nod<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0> >::_Node *)operator new(0x14u);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&v10, (const char *const *)&_What);
    v10.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&v10, &_TI2_AVbad_alloc_std__);
  }
  v1->m_setEscapeHide._Myhead = v2;
  v2->_Left = v2;
  v1->m_setEscapeHide._Myhead->_Parent = v1->m_setEscapeHide._Myhead;
  v1->m_setEscapeHide._Myhead->_Right = v1->m_setEscapeHide._Myhead;
  v1->m_setEscapeHide._Myhead->_Color = 1;
  v1->m_setEscapeHide._Myhead->_Isnil = 1;
  v1->m_spUserTradeMsgBox.m_pObject = 0;
  v1->m_kAutoCloseWinList.m_kAllocator.m_uiCount = 0;
  v1->m_kAutoCloseWinList.m_pkHead = 0;
  v1->m_kAutoCloseWinList.m_pkTail = 0;
  v1->m_kAutoCloseWinList.vfptr = (NiTListBase<DFALL<PgWin *>,PgWin *>Vtbl *)&NiTList<PgWin *>::`vftable';
  v1->m_kCanHideWinList.m_kAllocator.m_uiCount = 0;
  v1->m_kCanHideWinList.m_pkHead = 0;
  v1->m_kCanHideWinList.m_pkTail = 0;
  v1->m_kCanHideWinList.vfptr = (NiTListBase<DFALL<PgWin *>,PgWin *>Vtbl *)&NiTList<PgWin *>::`vftable';
  v1->m_pkRaidReplyWin.m_pObject = 0;
  v1->m_spZoneNet.m_pObject = 0;
  v1->m_spWorldMgrNet.m_pObject = 0;
  v1->m_kCollRecord.m_uiIntersectCount = 0;
  v1->m_kProtoNcMapLinkOtherCmd.sock.zoneip.n4_code[3] = 0;
  v1->m_kProtoNcMapLinkOtherCmd.sock.zoneip.n4_code[2] = 0;
  v1->m_kProtoNcMapLinkOtherCmd.sock.zoneip.n4_code[1] = 0;
  v1->m_kProtoNcMapLinkOtherCmd.sock.zoneip.n4_code[0] = 0;
  v1->m_pEffect1.m_pObject = 0;
  v1->m_pEffect2.m_pObject = 0;
  v1->m_pOXEffectO.m_pObject = 0;
  v1->m_pOXEffectX.m_pObject = 0;
  v1->m_vecSentPacket._Myfirst = 0;
  v1->m_vecSentPacket._Mylast = 0;
  v1->m_vecSentPacket._Myend = 0;
  ChatCommandList::ChatCommandList(&v1->m_kChatComList);
  LOBYTE(v15) = 14;
  v1->m_kSmartWhisper.m_kRecentWhisperList._Mysize = 0;
  v3 = (std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *)operator new(0x24u);
  if ( !v3 )
  {
    v14 = 0;
    std::exception::exception(&v10, (const char *const *)&v14);
    v10.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&v10, &_TI2_AVbad_alloc_std__);
  }
  v1->m_kSmartWhisper.m_kRecentWhisperList._Myhead = v3;
  v3->_Next = v3;
  v1->m_kSmartWhisper.m_kRecentWhisperList._Myhead->_Prev = v1->m_kSmartWhisper.m_kRecentWhisperList._Myhead;
  LOBYTE(v15) = 15;
  v1->m_kAttackedMsg.m_kAttackedList._Mysize = 0;
  v4 = (std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *)operator new(0x10u);
  if ( !v4 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_kAttackedMsg.m_kAttackedList._Myhead = v4;
  v4->_Next = v4;
  v1->m_kAttackedMsg.m_kAttackedList._Myhead->_Prev = v1->m_kAttackedMsg.m_kAttackedList._Myhead;
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kTimerIntervalOXDelay);
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kTimerInterval);
  `eh vector constructor iterator'(
    v1->m_CharList,
    0x14u,
    6,
    (void (__thiscall *)(void *))Name5::Name5,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
  v1->m_spBlindEffect.m_pObject = 0;
  v1->m_spCamEffect.m_pObject = 0;
  v1->m_kGuideViewList._Myfirst = 0;
  v1->m_kGuideViewList._Mylast = 0;
  v1->m_kGuideViewList._Myend = 0;
  LOBYTE(v15) = 20;
  v1->m_WebCtrlList._Mysize = 0;
  v5 = (std::_Tree_nod<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *> >,0> >::_Node *)operator new(0x18u);
  if ( !v5 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_WebCtrlList._Myhead = v5;
  v5->_Left = v5;
  v1->m_WebCtrlList._Myhead->_Parent = v1->m_WebCtrlList._Myhead;
  v1->m_WebCtrlList._Myhead->_Right = v1->m_WebCtrlList._Myhead;
  v1->m_WebCtrlList._Myhead->_Color = 1;
  v1->m_WebCtrlList._Myhead->_Isnil = 1;
  LOBYTE(v15) = 21;
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kPartyUpdateTime);
  v1->m_bEnableAdmin = 0;
  GameFrameWork::SetResList(v1);
  v1->m_pkRewardWin = 0;
  v1->m_pkMainCharHPBarWin = 0;
  v1->m_pkTargetCharHPBarWin = 0;
  v1->m_pkStatusWin = 0;
  v1->m_pkTargetWin = 0;
  v1->m_pkItemUpgradeWin = 0;
  v1->m_pkRidePetWin = 0;
  v1->m_pkGuildWarStateWin = 0;
  v1->m_pkMiniMapWin = 0;
  v1->m_pkMainMenuWin = 0;
  v1->m_pkWingStoneWin = 0;
  v1->m_pkShortCutWin = 0;
  v1->m_pkShortCutWinV = 0;
  v1->m_pkShortCutSubWin[0] = 0;
  v1->m_pkShortCutSubWinV[0] = 0;
  v1->m_pkShortCutSubWin[1] = 0;
  v1->m_pkShortCutSubWinV[1] = 0;
  v1->m_pkShortCutSubWin[2] = 0;
  v1->m_pkShortCutSubWinV[2] = 0;
  v1->m_pkShortCutSubWin[3] = 0;
  v1->m_pkShortCutSubWinV[3] = 0;
  v1->m_pkChatDisplayWin = 0;
  v1->m_pkSysMsgDisplayWin = 0;
  v1->m_pkCharInfoWin = 0;
  v1->m_pkInventoryWin = 0;
  v1->m_pkMiniHouseInventoryWin = 0;
  v1->m_pkSkillWin = 0;
  v1->m_pkSystemWin = 0;
  v1->m_pkMiniHouseMenuWin = 0;
  v1->m_pkPrivateStoreWin = 0;
  v1->m_pkDivideWin = 0;
  v1->m_kRideOffValue.m_pkTarget = 0;
  v1->m_kRideOffValue.m_kPoint.x = 0;
  v1->m_kRideOffValue.m_kPoint.y = 0;
  v1->m_kRideOffValue.m_kSkillID = -1;
  v1->m_kRideOffValue.m_kGroundPos = NiPoint3::ZERO;
  v1->m_kRideOffValue.m_bViewPoint = 0;
  v1->m_pkInputTextWin = 0;
  v1->m_pkMoneyWin = 0;
  v1->m_pkHolyRewardMoneyWin = 0;
  v1->m_pkStatusBuffWin = 0;
  v1->m_pkStatusDBuffWin = 0;
  v1->m_pkMainCharSpeechBubbleWin = 0;
  v1->m_pkPartyWinInterface = 0;
  v1->m_pkActionWin = 0;
  v1->m_pkKingDomQuest = 0;
  v1->m_pkQuestWin = 0;
  v1->m_pkFriendWin = 0;
  v1->m_pkOptionWin = 0;
  v1->m_pkOptionGraphicWin = 0;
  v1->m_pkFriendAddWin = 0;
  v1->m_pkGuildWin = 0;
  v1->m_pkCalculatorWin = 0;
  v1->m_pkItemShopWin = 0;
  v1->m_pkUserTradeWin = 0;
  v6 = v1->m_spUserTradeMsgBox.m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v1->m_spUserTradeMsgBox.m_pObject = 0;
  }
  v1->m_pkDesktopWin = 0;
  v1->m_pkNPCSkillWin = 0;
  v1->m_pkNPCSoulWin = 0;
  v1->m_pkNpcDlgWin = 0;
  v1->m_pkServerMenuWin = 0;
  v1->m_pkKeyRemappingWin = 0;
  v1->m_pkFriendCallWin = 0;
  v1->m_kNextFrameWorkID = 0;
  v1->m_bLinkSameServer = 1;
  v1->m_kSkillCasting.eState = 0;
  v1->m_kSkillCasting.bWaitingForServerCancel = 0;
  v7 = (char *)operator new(0x24u);
  v14 = v7;
  LOBYTE(v15) = 22;
  if ( v7 )
    PartyWinInterface::PartyWinInterface((PartyWinInterface *)v7);
  else
    v8 = 0;
  LOBYTE(v15) = 21;
  v1->m_pkPartyWinInterface = v8;
  *(_DWORD *)&v1->m_bDrawWinMgr = 16843009;
  v1->m_bTargetHPBar = 0;
  *(_WORD *)&v1->m_bOXEventEnable = 0;
  v1->m_bItemInfoChange = 0;
  v1->m_bDisplayApplyCheck = 0;
  v1->m_pkHelpWin = 0;
  v1->m_pkShopWin = 0;
  v1->m_kSmartWhisper.m_eState = 0;
  v1->m_pkForumWin = 0;
  v1->m_pkKQuestTimeWin = 0;
  v1->m_pkIDTimeWin = 0;
  v1->m_pkKQPKRealTimeRankWin = 0;
  memset(v1->m_chatLog, 0, 0x800u);
  v1->m_pkQuestFinishWin = 0;
  v1->m_pkQuestNewsWin = 0;
  v1->m_pkReportWin = 0;
  v1->m_pkPrisonTimeWin = 0;
  v1->m_pkShortCutWin = 0;
  v1->m_pkGMCommandWin = 0;
  v1->m_pkGMPrisonWin = 0;
  v1->m_pkCurrentCommunityWin = 0;
  v1->m_pkEventFriendWin = 0;
  v1->m_pkAutoCloseWin = 0;
  v1->m_pkChargedItemListWin = 0;
  v1->m_pkItemMallMenuWin = 0;
  v1->m_pkMakeKarisWin = 0;
  v1->m_pkStickChar = 0;
  v9 = (int)&v1->m_CharList[0].n5_code[3];
  v14 = (char *)6;
  do
  {
    *(_DWORD *)(v9 + 4) = 0;
    *(_DWORD *)v9 = 0;
    *(_DWORD *)(v9 - 4) = 0;
    *(_DWORD *)(v9 - 8) = 0;
    *(_DWORD *)(v9 - 12) = 0;
    strncpy((char *)(v9 - 12), byte_9825F4, 0x14u);
    v9 += 20;
    --v14;
  }
  while ( v14 );
  v1->m_CellChangeInvPosMode = 0;
  v1->m_pkWeddingInfoWin = 0;
  v1->m_pkHolyPromiseWin = 0;
  v1->m_pkHolyPromiseAddWin = 0;
  v1->m_uiInsertNum = 0;
  v1->m_pkGuildAcademyWin = 0;
  memset(v1->m_acMessage, 0, 0x400u);
  v1->m_bWhisper = 0;
  v1->m_bUIScroll = 0;
  v1->m_iCommunityValue = -1;
  v1->m_pkItemRepairWin = 0;
  v1->m_pkMHRepairWin = 0;
  v1->m_pkChatBlockListWin = 0;
  v1->m_pkExpeditionPartyWin[0] = 0;
  v1->m_pkExpeditionPartyWin[1] = 0;
  v1->m_pkExpeditionPartyWin[2] = 0;
  v1->m_pkExpeditionPartyWin[3] = 0;
  v1->m_pkExpeditionWin = 0;
  v1->m_pkExpeditionMemberAddWin = 0;
  v1->m_pkExpeditionWarnigMsgWin = 0;
  v1->m_bServerSelect = 0;
  std::vector<NiPoint2,std::allocator<NiPoint2>>::reserve(
    (std::vector<NiPoint2,std::allocator<NiPoint2> > *)&v1->m_vecSentPacket,
    0x64u);
  v1->m_pkEnchantGemWin1 = 0;
  v1->m_pkEnchantGemWin2 = 0;
  v1->m_pkEnchantGemWin3 = 0;
  v1->m_pkEnchantGemDeleteWin1 = 0;
  v1->m_pkEnchantGemDeleteWin2 = 0;
  v1->m_pkEnchantGemDeleteWin3 = 0;
  v1->m_pkEnchantGemToolTipWin = 0;
  v1->m_pkMysteryVaultWin = 0;
  v1->m_pkMapLinkGateWin = 0;
  v1->m_bIsGM = 0;
  v1->m_pkAutoRunMsgWin = 0;
  v1->m_pkDiceRewardMoneyWin = 0;
  v1->m_pkDiceExpectMoneyWin = 0;
  v1->m_pkDiceGameWin = 0;
  v1->m_pkDiceGameMinimizeWin = 0;
  v1->m_pkDiceGameHelpWin = 0;
  v1->m_pkDiceGameRankWin = 0;
  v1->m_pkDiceGameRateSheetWin = 0;
  v1->m_pkDiceGameNpcDlgWin = 0;
  v1->m_pkGambleMiniWin = 0;
  v1->m_pkGambleWin = 0;
  v1->m_pkCoinExchangeWin = 0;
  v1->m_pkGambleHouseCardWin = 0;
  v1->m_pkGambleDiceGameWin = 0;
  v1->m_pkSlotMachineWin = 0;
  v1->m_pkGBSlotHelpWin = 0;
  v1->m_pkGBSlotRankWin = 0;
  v1->m_pkMiniSlotMachineWin = 0;
  v1->m_pkCollectWin = 0;
  v1->m_pkCollectPeepingWin = 0;
  v1->m_pkCollectCardWin[0] = 0;
  v1->m_pkCollectCardWin[1] = 0;
  v1->m_pkCollectCardWin[2] = 0;
  v1->m_pkCollectCardWin[3] = 0;
  v1->m_bWelcomeMsg = 1;
  v1->m_pkWelcomeMsgWin = 0;
  v1->m_LightningWaveInfo.bAddLightningWave = 0;
  v1->m_LightningWaveInfo.kSkillID = -1;
  v1->m_pkAttendIconWin = 0;
  v1->m_pkAttendRewardWin = 0;
  v1->m_pkAttendCheckWin = 0;
  v1->m_pkCurrentTab = 0;
  v1->m_pkFeedMoverWin = 0;
  v1->m_pkPetNameEditWin = 0;
  v1->m_pkEventRankWin = 0;
  v1->m_pkEventTimeWin = 0;
  v1->m_eOpenType = 0;
  v1->m_pkVoteWin = 0;
  v1->m_pkKQPlayerList = 0;
  v1->m_acStarter[0] = 0;
  v1->m_acTarget[0] = 0;
  v1->m_pkKQScoreWin = 0;
  v1->m_pkEffectMsg = 0;
  v1->m_bMoveRunCtrl = 1;
  v1->m_pkMarketSearchWin = 0;
  v1->m_pkPuzzleTimeWin = 0;
  v1->m_bPlayPuzzle = 0;
  v1->m_pkMoverUpgradeWin = 0;
  v1->m_pkRandomOptionWin = 0;
  v1->m_pkItemUpgradeMsgWin = 0;
  v1->m_pkChatColorSpinWin = 0;
  *(_WORD *)&v1->m_bScreenShot = 256;
  v1->m_pkTermExtendWin = 0;
  v1->m_pkMinimonAutoItemUseWin = 0;
  v1->m_pkClassChangeWin = 0;
  v1->m_pkKDTeamScoreWin = 0;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 970534: using guessed type void (__thiscall *PgFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 981CEC: using guessed type int (__thiscall *NiTList<PgWin *>::`vftable')(void *p, char);
// 982724: using guessed type void (__thiscall *GameFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);

//----- (004CF660) --------------------------------------------------------
void __userpurge GameFrameWork::Update(GameFrameWork *this@<ecx>, MapNavigator *a2@<edi>, float fCurTime)
{
  GameFrameWork *v3; // esi@1
  mhRepairObjWin *v4; // ebx@1
  unsigned int v5; // eax@2
  bool v6; // zf@5
  NiNode *v7; // eax@6
  unsigned int v8; // edx@6
  unsigned int v9; // ecx@6
  NiAVObject *v10; // eax@6
  NiNode *v11; // eax@7
  unsigned int v12; // ecx@7
  unsigned int v13; // edx@7
  BasicInfoTipWin *v14; // ecx@10
  Net *v15; // ecx@16
  Net *v16; // ecx@18
  NiRTTI *v17; // eax@22
  MapNavigator *v18; // ebx@29
  char v19; // al@41
  char v20; // al@46
  AreaInfoMgr *v21; // eax@53
  ScenarioMgr *v22; // eax@59
  MainCharHPBarWin *v23; // ecx@59
  MainCharHPBarWin *v24; // ecx@61
  PgNet *v25; // ecx@63
  PgNet *v26; // ecx@65
  char *v27; // eax@73
  MsgBox *v28; // eax@73
  char *v29; // eax@74
  char *v30; // eax@80
  char *v31; // eax@81
  SpeechBubbleWin *v32; // ecx@84
  KQuestTimeWin *v33; // ecx@86
  IDTimeWin *v34; // ecx@93
  PrisonTimeWin *v35; // ecx@100
  Char *v36; // eax@110
  CBlindEffect *v37; // ecx@112
  CameraEffect *v38; // ecx@114
  BasicInfoTipWin *v39; // ecx@116
  AttendCheckWin *v40; // ecx@118
  AttendCheckWin *v41; // ecx@122
  AttendIconWin *v42; // eax@124
  FadeObjectMgr *v43; // ecx@125
  MapNavigator *v44; // eax@126
  int v45; // eax@127
  LuaScriptMgr *v46; // ecx@130
  MapNavigator *v47; // eax@131
  int v48; // eax@132
  Tutorial *v49; // ecx@135
  MapNavigator *v50; // eax@136
  Tutorial *v51; // eax@137
  TextScreenEffect *v52; // ecx@140
  MapNavigator *v53; // eax@141
  TextScreenEffect *v54; // eax@142
  int v55; // ebx@145
  int v56; // edi@146
  char *v57; // ecx@147
  char *v58; // eax@148
  char v59; // dl@149
  BasicInfoFindUI *v60; // eax@150
  PgMsg::Frame *fTime; // [sp+18h] [bp-80h]@73
  NiPointer<MapNavigator> result; // [sp+30h] [bp-68h]@29
  PgMsg::Frame kMsg; // [sp+34h] [bp-64h]@5
  char buf[64]; // [sp+48h] [bp-50h]@147
  int v65; // [sp+94h] [bp-4h]@126

  v3 = this;
  v4 = this->m_pkMHRepairWin;
  if ( v4 )
  {
    v5 = timeGetTime();
    mhRepairObjWin::UpdateTime(v4, v5);
  }
  if ( CNSTimer_Interval::IsRun_GetCount(&v3->m_kTimerIntervalOXDelay, fCurTime) && v3->m_bOXEventEnable )
  {
    v6 = v3->m_bOEnable == 0;
    *(float *)&kMsg.m_uiFrameMsg = 500.0;
    *(float *)&kMsg.m_uiFrameWParam = -500.0;
    *(float *)&kMsg.m_uiFramelParam = 0.0;
    if ( v6 )
    {
      v11 = v3->m_pOXEffectX.m_pObject;
      v12 = kMsg.m_uiFrameWParam;
      LODWORD(v11->m_kLocal.m_Translate.x) = kMsg.m_uiFrameMsg;
      v13 = kMsg.m_uiFramelParam;
      LODWORD(v11->m_kLocal.m_Translate.y) = v12;
      LODWORD(v11->m_kLocal.m_Translate.z) = v13;
      v10 = (NiAVObject *)&v3->m_pOXEffectX.m_pObject->vfptr;
    }
    else
    {
      v7 = v3->m_pOXEffectO.m_pObject;
      v8 = kMsg.m_uiFrameWParam;
      LODWORD(v7->m_kLocal.m_Translate.x) = kMsg.m_uiFrameMsg;
      v9 = kMsg.m_uiFramelParam;
      LODWORD(v7->m_kLocal.m_Translate.y) = v8;
      LODWORD(v7->m_kLocal.m_Translate.z) = v9;
      v10 = (NiAVObject *)&v3->m_pOXEffectO.m_pObject->vfptr;
    }
    PgWinMgr::StartFullScreenEffect(&Pgg_kWinMgr, Timer::ms_fCurTime, v10);
    v3->m_bOXEventEnable = 0;
  }
  if ( GameFrameWork::ms_bRendererRecreated )
  {
    GameFrameWork::SetOptionResolution(v3, GameFrameWork::ms_uiDisResWidth, GameFrameWork::ms_uiDisResHeight);
    GameFrameWork::SetWindowsPosOption(v3);
    GameFrameWork::ms_bRecreatingDisplay = 1;
    GameFrameWork::ms_bRendererRecreated = 0;
    v14 = v3->m_pkBasicInfoTipWin;
    if ( v14 )
      BasicInfoTipWin::SetResoulution(v14, GameFrameWork::ms_uiDisResWidth, GameFrameWork::ms_uiDisResHeight);
  }
  if ( v3->m_bDisplayApplyCheck )
  {
    if ( GameFrameWork::ms_bRecreatingDisplay )
    {
      GameFrameWork::ChangeWinDefaultPos(v3, (signed int)v3);
      v3->m_bDisplayApplyCheck = 0;
      GameFrameWork::ms_bRecreatingDisplay = 0;
    }
    v3->m_bDisplayApplyCheck = 0;
  }
  ITask::UpdateTaskAll(Timer::ms_fCurTime);
  v15 = v3->m_spZoneNet.m_pObject;
  v3->m_eProcessNetState = 0;
  if ( v15 )
    ((void (__stdcall *)(GameFrameWork *, signed int))v15->vfptr[4].__vecDelDtor)(v3, 100);
  v16 = v3->m_spWorldMgrNet.m_pObject;
  v3->m_eProcessNetState = 1;
  if ( v16 )
    ((void (__stdcall *)(GameFrameWork *, signed int))v16->vfptr[4].__vecDelDtor)(v3, 100);
  ICharDeadEvent::UpdateAll();
  PgWinMgr::ProcessInput(&Pgg_kWinMgr, 1);
  if ( unk_B2534C )
  {
    a2 = (MapNavigator *)dword_B64884;
    if ( dword_B64884 )
    {
      v17 = (NiRTTI *)(*(int (__thiscall **)(_DWORD *))(*dword_B64884 + 4))(dword_B64884);
      if ( v17 )
      {
        while ( v17 != &InvWin::m_RTTI )
        {
          v17 = v17->m_pkBaseRTTI;
          if ( !v17 )
            goto LABEL_27;
        }
        ((void (__thiscall *)(MapNavigator *))a2->vfptr[154].__vecDelDtor)(a2);
      }
    }
  }
LABEL_27:
  PgWinMgr::DispatchMessageA(&Pgg_kWinMgr);
  PgWinMgr::UpdateWin(&Pgg_kWinMgr, fCurTime);
  if ( CNSTimer_Interval::IsRun_GetCount(&v3->m_kPartyUpdateTime, fCurTime) )
    PartyWinInterface::Update(v3->m_pkPartyWinInterface);
  GameFrameWork::UpdateAutoCloseWin(v3);
  GameFrameWork::AttackedMsg::UpdateAttackedMsg(&v3->m_kAttackedMsg);
  Skill::Update(fCurTime);
  v18 = MapNavigator::GetMapNavigator(&result)->m_pObject;
  if ( result.m_pObject )
  {
    a2 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( a2 )
        a2->vfptr->__vecDelDtor((NiRefObject *)a2, 1u);
    }
  }
  if ( v18 )
    MapNavigator::OnIdle(v18, fCurTime);
  GameFrameWork::ProcessInput(v3);
  PgFrameWork::ProcessAllMsg((PgFrameWork *)&v3->vfptr);
  if ( !v3->m_bEscapeKeyPriority
    && !(g_pkKeyboard->m_aucKeystate[0] & 2)
    && g_pkKeyboard->m_aucKeystateLastUpdate[0] & 2 )
  {
    v3->m_bEscapeKeyPriority = 1;
  }
  if ( QuestDataMgr::m_bUpdate )
  {
    if ( v3->m_pkQuestNewsWin )
    {
      v19 = User::Lv(&g_kUser);
      if ( QuestNewsWin::QuestPlayer_LevelChange(v3->m_pkQuestNewsWin, v19) )
      {
        if ( QuestPigeonEffect::ms_bGameStart )
        {
          EffectMgr::CreatePigeonEffect(&g_kEffectMgr, g_pkMainChar, Timer::ms_fCurTime);
          v3->m_pkQuestNewsWin->m_ePigeonState = 1;
        }
        else
        {
          GameFrameWork::OpenQuestNewsWin(v3);
        }
      }
    }
  }
  else if ( !QuestPigeonEffect::ms_bGameStart )
  {
    v20 = User::Lv(&g_kUser);
    if ( QuestNewsWin::QuestPlayer_LevelChange(v3->m_pkQuestNewsWin, v20) )
    {
      GameFrameWork::OpenQuestNewsWin(v3);
      QuestPigeonEffect::ms_bGameStart = 1;
    }
  }
  GameFrameWork::UpdateMainChar(v3, a2, fCurTime);
  CharMgr::Update(&g_kCharMgr, fCurTime);
  DropItemMgr::Update(&g_kDropItemMgr, fCurTime);
  if ( g_pkMainChar->m_kCharShape.m_bAutoPickItem
    && !(unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[1].AddAbStateByAbstateIndex)() )
  {
    if ( Inventory::IsFull(&g_kInventory) )
    {
      GameFrameWork::SendAutoPickItemReq(v3, 0);
      g_pkMainChar->m_bWaitingAckWhenInvenFull = 1;
    }
    else
    {
      GameFrameWork::GetDropItemByArea(v3, APIT_MINIMON);
    }
  }
  CMiniHouseMgr::Update((CMiniHouseMgr *)&g_kMiniHouseMgr, fCurTime);
  v21 = AreaInfoMgr::GetInstance();
  AreaInfoMgr::Update(v21);
  if ( PopupMenuWin::IsMenuIDShow(v3->m_pkPopupMenuWin, PID_MHINV_RETURNTOINV) )
  {
    if ( nowState )
      MiniHouseIndoor::SetPopUpMHItemInvState(&g_kWorld.m_MiniHouseIndoorMode, 1);
  }
  else if ( nowState )
  {
    MiniHouseIndoor::SetPopUpMHItemInvState(&g_kWorld.m_MiniHouseIndoorMode, 0);
    if ( unk_A994A4 != -1 )
      unk_A994A4 = -1;
  }
  World::Update(&g_kWorld, -1, (int)a2, fCurTime);
  v22 = ScenarioMgr::GetScenarioMgr();
  ScenarioMgr::Update(v22, fCurTime);
  EffectObjectMgr::GetMgr();
  SoundMgr::Update(&g_kSoundMgr, fCurTime, pkWorldCamera);
  ScreenBDMgr::Update(&g_kScrnBDMgr, fCurTime, pkWorldCamera);
  TextEffMgr::Update(&g_kTextEffMgr, (NiCamera *)0xFFFFFFFF, fCurTime, pkWorldCamera);
  v23 = v3->m_pkMainCharHPBarWin;
  if ( v23 )
    MainCharHPBarWin::UpdatePosition(v23, -1);
  v24 = v3->m_pkTargetCharHPBarWin;
  if ( v24 )
    MainCharHPBarWin::UpdatePosition(v24, -1);
  v25 = (PgNet *)&v3->m_spZoneNet.m_pObject->vfptr;
  if ( v25 )
    PgNet::Flush(v25);
  v26 = (PgNet *)&v3->m_spWorldMgrNet.m_pObject->vfptr;
  if ( v26 )
    PgNet::Flush(v26);
  if ( !v3->m_spZoneNet.m_pObject->m_bCut || v3->m_bBackCharSelect )
  {
    if ( !v3->m_spWorldMgrNet.m_pObject->m_bCut )
      goto LABEL_84;
    NetMgr::SendUserLogOutMsg2AllServer(&g_kNetMgr);
    if ( nowState == MH_STATE_NO && PgWin::IsVisible((PgWin *)&v3->m_pkShopWin->vfptr) == 1 )
      ShopWin::OnWinClose(v3->m_pkShopWin);
    if ( g_kServer.m_bDoubleConnected == 1 )
    {
      v30 = (char *)TextData::Get(0x16526A50u);
      v28 = MsgBox::Modal(MSGBOX_OK, v30);
      g_kServer.m_bDoubleConnected = 0;
    }
    else
    {
      v31 = (char *)TextData::Get(0xCFCE1341);
      v28 = MsgBox::Modal(MSGBOX_OK, v31);
    }
    fTime = &kMsg;
  }
  else
  {
    NetMgr::SendUserLogOutMsg2AllServer(&g_kNetMgr);
    if ( nowState == MH_STATE_NO && PgWin::IsVisible((PgWin *)&v3->m_pkShopWin->vfptr) == 1 )
      ShopWin::OnWinClose(v3->m_pkShopWin);
    if ( g_kServer.m_bDoubleConnected == 1 )
    {
      v27 = (char *)TextData::Get(0x16526A50u);
      v28 = MsgBox::Modal(MSGBOX_OK, v27);
      g_kServer.m_bDoubleConnected = 0;
      fTime = &kMsg;
    }
    else
    {
      v29 = (char *)TextData::Get(0xCBCED23A);
      v28 = MsgBox::Modal(MSGBOX_OK, v29);
      fTime = &kMsg;
    }
  }
  kMsg.m_uiFrameMsg = 28;
  MsgBox::SetFrameWorkMsgOnClose(v28, (PgFrameWork *)&v3->vfptr, fTime, 0);
LABEL_84:
  v32 = v3->m_pkMainCharSpeechBubbleWin;
  if ( v32 )
    SpeechBubbleWin::Update(v32, -1, 0x1Cu, (int)v3, fCurTime, pkWorldCamera, (PgWinCamera *)pkScreenCamera);
  v33 = v3->m_pkKQuestTimeWin;
  if ( KQuestTimeWin::m_second )
  {
    if ( v33 && !(unsigned __int8)((int (*)(void))v33->vfptr[65].__vecDelDtor)() )
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkKQuestTimeWin->vfptr);
  }
  else if ( v33 && (unsigned __int8)((int (*)(void))v33->vfptr[65].__vecDelDtor)() )
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkKQuestTimeWin->vfptr);
  }
  v34 = v3->m_pkIDTimeWin;
  if ( IDTimeWin::m_second )
  {
    if ( v34 && !(unsigned __int8)((int (*)(void))v34->vfptr[65].__vecDelDtor)() )
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkIDTimeWin->vfptr);
  }
  else if ( v34 && (unsigned __int8)((int (*)(void))v34->vfptr[65].__vecDelDtor)() )
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkIDTimeWin->vfptr);
  }
  v35 = v3->m_pkPrisonTimeWin;
  if ( PrisonTimeWin::m_second )
  {
    if ( v35 && !(unsigned __int8)((int (*)(void))v35->vfptr[65].__vecDelDtor)() )
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkPrisonTimeWin->vfptr);
  }
  else if ( v35 && (unsigned __int8)((int (*)(void))v35->vfptr[65].__vecDelDtor)() )
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkPrisonTimeWin->vfptr);
    GameFrameWork::NcPrisonEndReq(v3);
  }
  if ( v3->m_bPlayPuzzle )
    GameFrameWork::OnShowWinInterfaceList(v3, 0);
  else
    GameFrameWork::OnShowWinInterfaceList(v3, byte_B4FF6D);
  v36 = v3->m_pkStickChar;
  if ( v36 )
    GameFrameWork::Stick(v3, v36, 0);
  v37 = v3->m_spBlindEffect.m_pObject;
  if ( v37 )
    CBlindEffect::Update(v37, fCurTime);
  v38 = v3->m_spCamEffect.m_pObject;
  if ( v38 )
    CameraEffect::Update(v38, fCurTime);
  ITimer::Update(fCurTime);
  GameFrameWork::UpdateAskServerInform(v3, fCurTime);
  ShortCutMgr::Update(&g_kShortCutMgr, fCurTime);
  v39 = v3->m_pkBasicInfoTipWin;
  if ( v39 )
    BasicInfoTipWin::Update(v39, fCurTime);
  v40 = v3->m_pkAttendCheckWin;
  if ( v40 && v3->m_pkAttendIconWin )
  {
    if ( AttendCheckWin::IsRewardOn(v40) )
      AttendIconWin::SetActive(v3->m_pkAttendIconWin, 1);
    v41 = v3->m_pkAttendCheckWin;
    if ( v41->m_iEvtIndex == 28 && AttendCheckWin::IsRewardAll(v41) )
    {
      v42 = v3->m_pkAttendIconWin;
      v42->m_uFlags |= 1u;
      v42->m_bEvtState = 0;
    }
  }
  GameFrameWork::CheckWebFocus(v3);
  v43 = (FadeObjectMgr *)Singleton<FadeObjectMgr>::m_pInstance;
  if ( !Singleton<FadeObjectMgr>::m_pInstance )
  {
    v44 = (MapNavigator *)operator new(0x1Cu);
    result.m_pObject = v44;
    v65 = 0;
    if ( v44 )
      FadeObjectMgr::FadeObjectMgr((FadeObjectMgr *)v44);
    else
      v45 = 0;
    v43 = (FadeObjectMgr *)v45;
    v65 = -1;
    Singleton<FadeObjectMgr>::m_pInstance = v45;
  }
  FadeObjectMgr::Update(v43, fCurTime);
  v46 = (LuaScriptMgr *)Singleton<LuaScriptMgr>::m_pInstance;
  if ( !Singleton<LuaScriptMgr>::m_pInstance )
  {
    v47 = (MapNavigator *)operator new(0x14u);
    result.m_pObject = v47;
    v65 = 1;
    if ( v47 )
      LuaScriptMgr::LuaScriptMgr((LuaScriptMgr *)v47);
    else
      v48 = 0;
    v46 = (LuaScriptMgr *)v48;
    v65 = -1;
    Singleton<LuaScriptMgr>::m_pInstance = v48;
  }
  LuaScriptMgr::Update(v46, fCurTime);
  v49 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v50 = (MapNavigator *)operator new(0xB4u);
    result.m_pObject = v50;
    v65 = 2;
    if ( v50 )
      Tutorial::Tutorial((Tutorial *)v50);
    else
      v51 = 0;
    v49 = v51;
    v65 = -1;
    Singleton<Tutorial>::m_pInstance = v51;
  }
  Tutorial::Update(v49, fCurTime);
  v52 = Singleton<TextScreenEffect>::m_pInstance;
  if ( !Singleton<TextScreenEffect>::m_pInstance )
  {
    v53 = (MapNavigator *)operator new(0x28u);
    result.m_pObject = v53;
    v65 = 3;
    if ( v53 )
      TextScreenEffect::TextScreenEffect((TextScreenEffect *)v53);
    else
      v54 = 0;
    v52 = v54;
    v65 = -1;
    Singleton<TextScreenEffect>::m_pInstance = v54;
  }
  TextScreenEffect::Update(v52, fCurTime);
  v55 = unk_B64830;
  while ( v55 )
  {
    v56 = *(_DWORD *)(v55 + 8);
    v55 = *(_DWORD *)v55;
    if ( v56 )
    {
      buf[0] = 0;
      memset(&buf[1], 0, 0x3Fu);
      v57 = *(char **)(v56 + 8);
      if ( v57 )
      {
        v58 = *(char **)(v56 + 8);
        do
          v59 = *v58++;
        while ( v59 );
        strncpy(buf, v57, v58 - (v57 + 1) - 3);
        v60 = BasicInfoFindUITab::GetByUIFile(buf);
        if ( v60 )
          GameFrameWork::OpenPlayGuideWin(v3, v60->BIL_GuideType);
      }
    }
  }
}
// A771B0: using guessed type bool QuestDataMgr::m_bUpdate;
// A89C94: using guessed type int Singleton<LuaScriptMgr>::m_pInstance;
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;
// A8CAFC: using guessed type bool GameFrameWork::ms_bRendererRecreated;
// A8CAFE: using guessed type bool GameFrameWork::ms_bRecreatingDisplay;
// A8CBE8: using guessed type unsigned int IDTimeWin::m_second;
// A8D47C: using guessed type unsigned int PrisonTimeWin::m_second;
// A8E1B4: using guessed type unsigned int KQuestTimeWin::m_second;
// A8EA80: using guessed type bool QuestPigeonEffect::ms_bGameStart;
// A993A0: using guessed type int Singleton<FadeObjectMgr>::m_pInstance;
// B4FF6D: using guessed type char byte_B4FF6D;

//----- (004D0050) --------------------------------------------------------
MapViewInfo *__cdecl IIDTableBase<MapViewInfo,MapViewInfoTab,unsigned short>::GetByID(int uiId)
{
  int v1; // esi@1
  MapViewInfo *result; // eax@2
  int v3; // ecx@4

  v1 = ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable,
                          uiId)
    && (unsigned __int16)uiId <= *(_WORD *)(v1 + 200)
    && (v3 = *(_DWORD *)(v1 + 196), *(_DWORD *)(v3 + 4 * (unsigned __int16)uiId)) )
  {
    result = *(MapViewInfo **)(v3 + 4 * (unsigned __int16)uiId);
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C270: using guessed type int ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable;

//----- (004D00A0) --------------------------------------------------------
void __cdecl std::_Push_heap<DropItem * *,int,DropItem *,DropItemSorter>(DropItem **_First, int _Hole, int _Top, DropItem **_Val, DropItemSorter _Pred)
{
  int v5; // edi@1
  int v6; // esi@1

  v5 = _Hole;
  v6 = (_Hole - 1) / 2;
  if ( _Top >= _Hole )
  {
    _First[_Hole] = *_Val;
  }
  else
  {
    while ( DropItemSorter::operator()(&_Pred, _First[v6], *_Val) )
    {
      _First[v5] = _First[v6];
      v5 = v6;
      v6 = (v6 - 1) / 2;
      if ( _Top >= v5 )
      {
        _First[v5] = *_Val;
        return;
      }
    }
    _First[v5] = *_Val;
  }
}

//----- (004D0120) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<IOptionBase *>,IOptionBase *>::~NiTListBase<DFALL<IOptionBase *>,IOptionBase *>(NiTListBase<DFALL<IOptionBase *>,IOptionBase *> *this)
{
  this->vfptr = (NiTListBase<DFALL<IOptionBase *>,IOptionBase *>Vtbl *)&NiTListBase<DFALL<IOptionBase *>,IOptionBase *>::`vftable';
}
// 9826C0: using guessed type int (__thiscall *NiTListBase<DFALL<IOptionBase *>,IOptionBase *>::`vftable')(void *p, char);

//----- (004D0130) --------------------------------------------------------
NiTListBase<DFALL<IOptionBase *>,IOptionBase *> *__thiscall NiTListBase<DFALL<IOptionBase *>,IOptionBase *>::`scalar deleting destructor'(NiTListBase<DFALL<IOptionBase *>,IOptionBase *> *this, unsigned int a2)
{
  NiTListBase<DFALL<IOptionBase *>,IOptionBase *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<IOptionBase *>,IOptionBase *>Vtbl *)&NiTListBase<DFALL<IOptionBase *>,IOptionBase *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9826C0: using guessed type int (__thiscall *NiTListBase<DFALL<IOptionBase *>,IOptionBase *>::`vftable')(void *p, char);

//----- (004D0160) --------------------------------------------------------
void __cdecl std::_Adjust_heap<DropItem * *,int,DropItem *,DropItemSorter>(DropItem **_First, int _Hole, int _Bottom, DropItem **_Val, DropItemSorter _Pred)
{
  int v5; // eax@1
  int v6; // esi@1
  bool v7; // zf@1
  int v8; // eax@4
  DropItem *v9; // edx@4
  int v10; // edi@8
  int v11; // esi@8
  DropItemSorter v12; // [sp+Ch] [bp-44h]@8
  int _Top; // [sp+4Ch] [bp-4h]@1

  v5 = _Hole;
  v6 = 2 * _Hole + 2;
  _Top = _Hole;
  v7 = v6 == _Bottom;
  if ( v6 < _Bottom )
  {
    do
    {
      if ( DropItemSorter::operator()(&_Pred, _First[v6], _First[v6 - 1]) )
        --v6;
      v8 = _Hole;
      v9 = _First[v6];
      _Hole = v6;
      v6 = 2 * v6 + 2;
      _First[v8] = v9;
      v7 = v6 == _Bottom;
    }
    while ( v6 < _Bottom );
    v5 = _Hole;
  }
  if ( v7 )
  {
    _First[v5] = _First[_Bottom - 1];
    _Hole = _Bottom - 1;
  }
  qmemcpy(&v12, &_Pred, sizeof(v12));
  v10 = _Hole;
  v11 = (_Hole - 1) / 2;
  if ( _Top >= _Hole )
  {
    _First[_Hole] = *_Val;
  }
  else
  {
    while ( DropItemSorter::operator()(&v12, _First[v11], *_Val) )
    {
      _First[v10] = _First[v11];
      v10 = v11;
      v11 = (v11 - 1) / 2;
      if ( _Top >= v10 )
      {
        _First[v10] = *_Val;
        return;
      }
    }
    _First[v10] = *_Val;
  }
}

//----- (004D0240) --------------------------------------------------------
NiPointer<NiRenderer> *__thiscall MainApp::GetRender(MainApp *this, NiPointer<NiRenderer> *result)
{
  NiRenderer *v2; // eax@1

  v2 = this->m_spRenderer.m_pObject;
  result->m_pObject = v2;
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  return result;
}

//----- (004D0270) --------------------------------------------------------
KQIsVote *__cdecl KQIsVoteTable::GetByID(const int iID)
{
  int v1; // eax@1
  unsigned int v2; // edi@2
  unsigned int v3; // esi@4
  KQIsVote *result; // eax@7

  v1 = *(_DWORD *)(ITableBase<KQIsVote,KQIsVoteTable>::ms_pkTable + 56);
  if ( v1 )
    v2 = *(_DWORD *)(v1 + 40);
  else
    v2 = 0;
  v3 = 0;
  if ( v2 )
  {
    while ( *(_WORD *)CDataReader::GetRecord((CDataReader *)(ITableBase<KQIsVote,KQIsVoteTable>::ms_pkTable + 4), v3) != iID )
    {
      if ( ++v3 >= v2 )
        goto LABEL_7;
    }
    result = (KQIsVote *)CDataReader::GetRecord((CDataReader *)(ITableBase<KQIsVote,KQIsVoteTable>::ms_pkTable + 4), v3);
  }
  else
  {
LABEL_7:
    result = 0;
  }
  return result;
}
// A8C244: using guessed type int ITableBase<KQIsVote,KQIsVoteTable>::ms_pkTable;

//----- (004D02D0) --------------------------------------------------------
BasicInfoFindUI *__cdecl BasicInfoFindUITab::GetByUIFile(char *FileName)
{
  BasicInfoFindUI *result; // eax@2
  int v2; // eax@3
  unsigned int v3; // edi@4
  unsigned int v4; // esi@6

  if ( FileName )
  {
    v2 = *(_DWORD *)(ITableBase<BasicInfoFindUI,BasicInfoFindUITab>::ms_pkTable + 56);
    if ( v2 )
      v3 = *(_DWORD *)(v2 + 40);
    else
      v3 = 0;
    v4 = 0;
    if ( v3 )
    {
      while ( 1 )
      {
        result = (BasicInfoFindUI *)CDataReader::GetRecord(
                                      (CDataReader *)(ITableBase<BasicInfoFindUI,BasicInfoFindUITab>::ms_pkTable + 4),
                                      v4);
        if ( result )
        {
          if ( !strcmp(result->UI_File, FileName) )
            break;
        }
        if ( ++v4 >= v3 )
          goto LABEL_10;
      }
    }
    else
    {
LABEL_10:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C208: using guessed type int ITableBase<BasicInfoFindUI,BasicInfoFindUITab>::ms_pkTable;

//----- (004D0350) --------------------------------------------------------
NiTList<IOptionBase *> *__thiscall NiTList<IOptionBase *>::`scalar deleting destructor'(NiTList<IOptionBase *> *this, unsigned int a2)
{
  NiTList<IOptionBase *> *v2; // edi@1
  NiTListItem<IOptionBase *> *v3; // esi@1
  NiTListItem<IOptionBase *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<IOptionBase *>,IOptionBase *>Vtbl *)&NiTPointerListBase<DFALL<IOptionBase *>,IOptionBase *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<DFALL<IOptionBase *>,IOptionBase *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<IOptionBase *>,IOptionBase *>Vtbl *)&NiTListBase<DFALL<IOptionBase *>,IOptionBase *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9826C0: using guessed type int (__thiscall *NiTListBase<DFALL<IOptionBase *>,IOptionBase *>::`vftable')(void *p, char);
// 9826D0: using guessed type int (__thiscall *NiTPointerListBase<DFALL<IOptionBase *>,IOptionBase *>::`vftable')(void *p, char);

//----- (004D03E0) --------------------------------------------------------
void __cdecl std::_Make_heap<DropItem * *,int,DropItem *,DropItemSorter>(DropItem **_First, DropItem **_Last, DropItemSorter _Pred)
{
  DropItem **v3; // ebx@1
  int v4; // eax@1
  int i; // edx@2
  DropItem *v6; // ecx@4
  int v7; // eax@4
  int v8; // edi@4
  int v9; // esi@4
  int v10; // edx@7
  DropItem *v11; // ecx@7
  DropItemSorter v12; // [sp-40h] [bp-98h]@11
  DropItemSorter v13; // [sp+Ch] [bp-4Ch]@4
  DropItem *_Val; // [sp+4Ch] [bp-Ch]@4
  int _Bottom; // [sp+50h] [bp-8h]@1
  int v16; // [sp+54h] [bp-4h]@3
  int _Hole; // [sp+60h] [bp+8h]@4
  int _Lasta; // [sp+64h] [bp+Ch]@4

  v3 = _First;
  _Bottom = _Last - _First;
  v4 = _Bottom / 2;
  if ( _Bottom / 2 > 0 )
  {
    for ( i = 2 * v4 + 2; ; i = v16 )
    {
      v6 = v3[v4 - 1];
      v7 = v4 - 1;
      _Val = v6;
      qmemcpy(&v13, &_Pred, sizeof(v13));
      v8 = _Bottom;
      _Hole = v7;
      v16 = i - 2;
      _Lasta = v7;
      v9 = i - 2;
      if ( i - 2 < _Bottom )
      {
        do
        {
          if ( DropItemSorter::operator()(&v13, v3[v9], v3[v9 - 1]) )
            --v9;
          v10 = _Lasta;
          v11 = v3[v9];
          _Lasta = v9;
          v9 = 2 * v9 + 2;
          v3[v10] = v11;
        }
        while ( v9 < v8 );
        v7 = _Hole;
      }
      if ( v9 == v8 )
      {
        v3[_Lasta] = v3[v8 - 1];
        _Lasta = v8 - 1;
      }
      qmemcpy(&v12, &v13, sizeof(v12));
      std::_Push_heap<DropItem * *,int,DropItem *,DropItemSorter>(v3, _Lasta, v7, &_Val, v12);
      if ( _Hole <= 0 )
        break;
      v4 = _Hole;
    }
  }
}

//----- (004D04C0) --------------------------------------------------------
void __thiscall std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(std::vector<NiTimeController *,std::allocator<NiTimeController *> > *this, unsigned int _Count)
{
  unsigned int v2; // eax@1
  unsigned int v3; // eax@3
  unsigned int v4; // edx@3
  unsigned int v5; // edx@5

  v2 = this->_Mylast - this->_Myfirst;
  if ( 0x3FFFFFFF - _Count < v2 )
    std::_Xlength_error("vector<T> too long");
  v3 = _Count + v2;
  v4 = this->_Myend - this->_Myfirst;
  if ( v3 > v4 )
  {
    if ( 0x3FFFFFFF - (v4 >> 1) >= v4 )
      v5 = (v4 >> 1) + v4;
    else
      v5 = 0;
    if ( v5 < v3 )
      v5 = v3;
    std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
      (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)this,
      v5);
  }
}

//----- (004D0520) --------------------------------------------------------
void __cdecl std::_Sort_heap<DropItem * *,DropItemSorter>(DropItem **_First, DropItem **_Last, DropItemSorter _Pred)
{
  DropItem **v3; // ebx@1
  signed int v4; // eax@1
  DropItem **v5; // edx@2
  DropItemSorter v6; // [sp-40h] [bp-4Ch]@2
  DropItem **_Firsta; // [sp+14h] [bp+8h]@2

  v3 = _First;
  v4 = (char *)_Last - (char *)_First;
  if ( (signed int)(((char *)_Last - (char *)_First) & 0xFFFFFFFC) > 4 )
  {
    do
    {
      v5 = *(DropItem ***)((char *)v3 + v4 - 4);
      *(DropItem **)((char *)v3 + v4 - 4) = *v3;
      _Last = v5;
      _Firsta = (DropItem **)(v4 - 4);
      qmemcpy(&v6, &_Pred, sizeof(v6));
      std::_Adjust_heap<DropItem * *,int,DropItem *,DropItemSorter>(v3, 0, (v4 - 4) >> 2, (DropItem **)&_Last, v6);
      v4 = (signed int)_Firsta;
    }
    while ( (signed int)((unsigned int)_Firsta & 0xFFFFFFFC) > 4 );
  }
}

//----- (004D0590) --------------------------------------------------------
void __thiscall std::vector<PgWinText *,std::allocator<PgWinText *>>::resize(std::vector<NiTimeController *,std::allocator<NiTimeController *> > *this, unsigned int _Newsize)
{
  std::vector<NiTimeController *,std::allocator<NiTimeController *> > *v2; // esi@1
  char *v3; // ecx@1
  unsigned int v4; // eax@1
  char *v5; // edi@2
  int v6; // edx@5

  v2 = this;
  v3 = (char *)this->_Mylast;
  v4 = (v3 - (char *)v2->_Myfirst) >> 2;
  if ( v4 <= _Newsize )
  {
    if ( v4 < _Newsize )
    {
      std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(v2, _Newsize - v4);
      v6 = v2->_Mylast - v2->_Myfirst;
      if ( _Newsize != v6 )
        memset(v2->_Mylast, 0, 4 * (_Newsize - v6));
      v2->_Mylast += _Newsize - (v2->_Mylast - v2->_Myfirst);
    }
  }
  else
  {
    v5 = (char *)&v2->_Myfirst[_Newsize];
    if ( v5 != v3 )
    {
      memmove(v5, v3, 0);
      v2->_Mylast = (NiTimeController **)v5;
    }
  }
}

//----- (004D0620) --------------------------------------------------------
NiPointer<PgSprData> *__cdecl std::_Uninit_move<NiPointer<ScreenBoardTexture::DescInfo> *,NiPointer<ScreenBoardTexture::DescInfo> *,std::allocator<NiPointer<ScreenBoardTexture::DescInfo>>,NiPointer<ScreenBoardTexture::DescInfo>>(NiPointer<PgSprData> *_First, NiPointer<PgSprData> *_Last, NiPointer<PgSprData> *_Dest)
{
  NiPointer<PgSprData> *v3; // esi@1
  NiPointer<PgSprData> *v4; // edi@2
  NiPointer<PgSprData> v5; // eax@4
  NiPointer<PgSprData> *result; // eax@7

  v3 = _First;
  if ( _First == _Last )
  {
    result = _Dest;
  }
  else
  {
    v4 = _Dest;
    do
    {
      if ( v4 )
      {
        v5.m_pObject = v3->m_pObject;
        v4->m_pObject = v3->m_pObject;
        if ( v5.m_pObject )
          InterlockedIncrement((volatile LONG *)&v5.m_pObject->m_uiRefCount);
      }
      ++v3;
      ++v4;
    }
    while ( v3 != _Last );
    result = v4;
  }
  return result;
}

//----- (004D0670) --------------------------------------------------------
void __thiscall std::vector<NiPoint2,std::allocator<NiPoint2>>::reserve(std::vector<NiPoint2,std::allocator<NiPoint2> > *this, unsigned int _Count)
{
  std::vector<NiPoint2,std::allocator<NiPoint2> > *v2; // esi@1
  NiPoint2 *v3; // ebx@4
  NiPoint2 *v4; // ST04_4@4
  NiPoint2 *v5; // ST00_4@4
  int v6; // edi@4
  int v7; // [sp+0h] [bp-24h]@1
  NiPoint2 *_Ptr; // [sp+10h] [bp-14h]@4
  int *v9; // [sp+14h] [bp-10h]@1
  int v10; // [sp+20h] [bp-4h]@4

  v9 = &v7;
  v2 = this;
  if ( _Count > 0x1FFFFFFF )
    std::_Xlength_error("vector<T> too long");
  if ( this->_Myend - this->_Myfirst < _Count )
  {
    v3 = std::allocator<NiPoint2>::allocate(_Count);
    v4 = v2->_Mylast;
    v5 = v2->_Myfirst;
    _Ptr = v3;
    v10 = 0;
    std::_Uninit_move<GameFrameWork::AskInform *,GameFrameWork::AskInform *,std::allocator<GameFrameWork::AskInform>,GameFrameWork::AskInform>(
      v5,
      v4,
      v3);
    v6 = v2->_Mylast - v2->_Myfirst;
    if ( v2->_Myfirst )
      operator delete(v2->_Myfirst);
    v2->_Myend = &v3[_Count];
    v2->_Mylast = &v3[v6];
    v2->_Myfirst = v3;
  }
}

//----- (004D0740) --------------------------------------------------------
void __cdecl std::_Partial_sort<DropItem * *,DropItem *,DropItemSorter>(DropItem **_First, DropItem **_Mid, DropItem **_Last, DropItemSorter _Pred)
{
  DropItem **v4; // ebx@1
  DropItem *v5; // eax@5
  DropItemSorter v6; // [sp-48h] [bp-5Ch]@2
  DropItemSorter v7; // [sp-40h] [bp-54h]@5
  int v8; // [sp-8h] [bp-1Ch]@2
  int v9; // [sp-4h] [bp-18h]@2
  int _Bottom; // [sp+Ch] [bp-8h]@1
  DropItem *_Val; // [sp+10h] [bp-4h]@5

  v4 = _Mid;
  _Bottom = _Mid - _First;
  if ( _Bottom > 1 )
  {
    v9 = 0;
    v8 = 0;
    qmemcpy(&v6, &_Pred, sizeof(v6));
    std::_Make_heap<DropItem * *,int,DropItem *,DropItemSorter>(_First, _Mid, v6);
  }
  if ( _Mid < _Last )
  {
    do
    {
      if ( DropItemSorter::operator()(&_Pred, *v4, *_First) )
      {
        v5 = *v4;
        *v4 = *_First;
        _Val = v5;
        qmemcpy(&v7, &_Pred, sizeof(v7));
        std::_Adjust_heap<DropItem * *,int,DropItem *,DropItemSorter>(_First, 0, _Bottom, &_Val, v7);
      }
      ++v4;
    }
    while ( v4 < _Last );
  }
  qmemcpy(&v7, &_Pred, sizeof(v7));
  std::_Sort_heap<DropItem * *,DropItemSorter>(_First, _Mid, v7);
}

//----- (004D0800) --------------------------------------------------------
void __thiscall std::set<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>>::~set<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>>(std::set<unsigned int,std::less<unsigned int>,std::allocator<unsigned int> > *this)
{
  std::set<unsigned int,std::less<unsigned int>,std::allocator<unsigned int> > *v1; // esi@1
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v2; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > v3; // ST04_4@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > result; // [sp+8h] [bp-14h]@1
  std::set<unsigned int,std::less<unsigned int>,std::allocator<unsigned int> > *v5; // [sp+Ch] [bp-10h]@1
  int v6; // [sp+18h] [bp-4h]@1

  v1 = this;
  v5 = this;
  v2 = this->_Myhead;
  v3._Ptr = v2->_Left;
  v6 = 0;
  std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::erase(
    (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&this->comp,
    &result,
    v3,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >)v2);
  operator delete(v1->_Myhead);
}

//----- (004D0860) --------------------------------------------------------
void __thiscall std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData>>>::push_back(std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData> > > *this, NiPointer<PgSprData> *_Val)
{
  std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData> > > *v2; // esi@1
  NiPointer<PgSprData> *v3; // eax@1
  NiPointer<PgSprData> *v4; // ecx@2
  int v5; // edi@3
  PgSprData **v6; // ecx@5
  PgSprData *v7; // eax@6
  NiPointer<PgSprData> *v8; // eax@10
  PgSprData *v9; // edi@11

  v2 = this;
  v3 = this->_Mylast;
  if ( _Val >= v3 || (v4 = this->_Myfirst, v2->_Myfirst > _Val) )
  {
    if ( v3 == v2->_Myend )
      std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData>>>::_Reserve(v2, 1u);
    v8 = v2->_Mylast;
    if ( v8 )
    {
      v9 = _Val->m_pObject;
      v8->m_pObject = _Val->m_pObject;
      if ( v9 )
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
    }
  }
  else
  {
    v5 = _Val - v4;
    if ( v3 == v2->_Myend )
      std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData>>>::_Reserve(v2, 1u);
    v6 = &v2->_Mylast->m_pObject;
    if ( v6 )
    {
      v7 = v2->_Myfirst[v5].m_pObject;
      *v6 = v7;
      if ( v7 )
      {
        InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
        ++v2->_Mylast;
        return;
      }
    }
  }
  ++v2->_Mylast;
}

//----- (004D08F0) --------------------------------------------------------
void __thiscall GameFrameWork::SmartWhisper::~SmartWhisper(GameFrameWork::SmartWhisper *this)
{
  void **v1; // esi@1

  v1 = (void **)&this->m_kRecentWhisperList._Myhead;
  std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>>>::clear(&this->m_kRecentWhisperList);
  operator delete(*v1);
}

//----- (004D0910) --------------------------------------------------------
NiRTTI *GameFrameWork::GetRTTI()
{
  return &GameFrameWork::m_RTTI;
}

//----- (004D0920) --------------------------------------------------------
const char *GameFrameWork::GetFrameWorkName()
{
  return GameFrameWork::m_RTTI.m_pcName;
}

//----- (004D0930) --------------------------------------------------------
GameFrameWork *__thiscall GameFrameWork::`vector deleting destructor'(GameFrameWork *this, unsigned int a2)
{
  GameFrameWork *v2; // esi@1

  v2 = this;
  GameFrameWork::~GameFrameWork(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (004D0960) --------------------------------------------------------
int __thiscall ActionIconWin::GetActionViewInfoID(ActionIconWin *this)
{
  ActionViewInfo *v1; // eax@1
  int result; // eax@2

  v1 = this->m_pkActionViewInfo;
  if ( v1 )
    result = v1->nIndex;
  else
    result = -1;
  return result;
}

//----- (004D0980) --------------------------------------------------------
char __thiscall ActionIconWin::Create(ActionIconWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork)
{
  ActionIconWin *v6; // esi@1
  char result; // al@1

  v6 = this;
  this->m_pkFrameWork = pkFrameWork;
  result = PgWinLRBut::Create((PgWinLRBut *)&this->vfptr, iXPos, iYPos, 0x20u, 0x20u, pkParent, 0, 0);
  if ( result )
  {
    v6->m_uiInvIndex = uiInvIndex;
    result = 1;
  }
  return result;
}

//----- (004D09D0) --------------------------------------------------------
bool __stdcall ActionIconWin::EatDropInstance(PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  return 0;
}

//----- (004D09E0) --------------------------------------------------------
void __thiscall ActionIconWin::OnFirstHitWin(ActionIconWin *this)
{
  ActionIconWin *v1; // esi@1

  v1 = this;
  PgWin::SetToolTipWinText((PgWin *)&this->vfptr, this->m_pkActionViewInfo->ActionName);
  PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
}

//----- (004D0A00) --------------------------------------------------------
void __thiscall PremiumActionIcon::PremiumActionIcon(PremiumActionIcon *this)
{
  PremiumActionIcon *v1; // esi@1

  v1 = this;
  ItemIcon::ItemIcon((ItemIcon *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&PremiumActionIcon::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&PremiumActionIcon::`vftable'{for `IDirectMessenger'};
  v1->m_uiInvIndex = -1;
}
// 982A18: using guessed type void (__thiscall *PremiumActionIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 982A34: using guessed type int (__thiscall *PremiumActionIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (004D0A30) --------------------------------------------------------
void __thiscall PremiumActionIcon::~PremiumActionIcon(PremiumActionIcon *this)
{
  this->vfptr = (NiRefObjectVtbl *)&PremiumActionIcon::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PremiumActionIcon::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
}
// 982A18: using guessed type void (__thiscall *PremiumActionIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 982A34: using guessed type int (__thiscall *PremiumActionIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (004D0A50) --------------------------------------------------------
bool __thiscall PremiumActionIcon::Create(PremiumActionIcon *this, int iXPos, int iYPos, PgWin *pkParent)
{
  return ItemIcon::Create((ItemIcon *)&this->vfptr, iXPos, iYPos, pkParent) != 0;
}

//----- (004D0A80) --------------------------------------------------------
void PremiumActionWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "ActionWin_Premium");
}

//----- (004D0AB0) --------------------------------------------------------
void __thiscall ActionInvTabButWin::ActionInvTabButWin(ActionInvTabButWin *this)
{
  ActionInvTabButWin *v1; // esi@1

  v1 = this;
  PgWinBut::PgWinBut((PgWinBut *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ActionInvTabButWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ActionInvTabButWin::`vftable'{for `IDirectMessenger'};
}
// 982CA0: using guessed type void (__thiscall *ActionInvTabButWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 982CBC: using guessed type int (__thiscall *ActionInvTabButWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004D0AD0) --------------------------------------------------------
void __thiscall ActionInvTabButWin::~ActionInvTabButWin(ActionInvTabButWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ActionInvTabButWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ActionInvTabButWin::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
}
// 982CA0: using guessed type void (__thiscall *ActionInvTabButWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 982CBC: using guessed type int (__thiscall *ActionInvTabButWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004D0AF0) --------------------------------------------------------
bool __thiscall ActionInvTabButWin::Create(ActionInvTabButWin *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg)
{
  return PgWinBut::Create((PgWinBut *)&this->vfptr, iXPos, iYPos, pkSprData, pkParent, uiCmdMsg, 0, 0) != 0;
}

//----- (004D0B20) --------------------------------------------------------
void ActionWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "ActionWin");
}

//----- (004D0B50) --------------------------------------------------------
void __thiscall ActionIconWin::~ActionIconWin(ActionIconWin *this)
{
  ActionIconWin *v1; // esi@1
  NiScreenElements *v2; // edi@1
  NiScreenElements *v3; // edi@5

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ActionIconWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ActionIconWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spTopPlane.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_spBackPlane.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  IconWin::~IconWin((IconWin *)&v1->vfptr);
}
// 982EF4: using guessed type void (__thiscall *ActionIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 982F14: using guessed type int (__thiscall *ActionIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004D0C10) --------------------------------------------------------
void __thiscall ActionWin::ActionWin(ActionWin *this)
{
  ActionWin *v1; // esi@1
  int v2; // edi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ActionWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ActionWin::`vftable'{for `IDirectMessenger'};
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  v1->m_kDrop.m_pkContents = 0;
  v1->m_kDrop.m_pkSender = 0;
  v2 = (int)&v1->m_kDropContents;
  *(_DWORD *)v2 = &DropContents::`vftable';
  *(_DWORD *)(v2 + 60) = 0xFFFF;
  memset((char *)v1->m_apkIconDefaultAction, 0, 0x48u);
  memset((char *)v1->m_apkIconEmotion, 0, 0x48u);
  v1->m_kDrop.m_pkContents = &v1->m_kDropContents;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 98317C: using guessed type void (__thiscall *ActionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98319C: using guessed type int (__thiscall *ActionWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004D0CA0) --------------------------------------------------------
void __thiscall ActionWin::~ActionWin(ActionWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ActionWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ActionWin::`vftable'{for `IDirectMessenger'};
  this->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  this->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 98317C: using guessed type void (__thiscall *ActionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98319C: using guessed type int (__thiscall *ActionWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004D0CD0) --------------------------------------------------------
void __thiscall ActionWin::OnWinClose(ActionWin *this)
{
  GameFrameWork::CloseActionWin((GameFrameWork *)this->m_pkFrameWork);
}

//----- (004D0CE0) --------------------------------------------------------
void __thiscall ActionWin::OnDefaultSlot_LClick(ActionWin *this, unsigned int lParam)
{
  this->m_kDropContents.m_eSenderType = 9;
  this->m_kDropContents.m_eType = 3;
  this->m_kDropContents.m_apvParam[0] = (void *)lParam;
  this->m_kDropContents.m_uiSenderIndex = 0;
  this->m_kDropContents.nTableIndexNum = this->m_apkIconDefaultAction[lParam]->m_pkActionViewInfo->nIndex;
  this->m_kDrop.m_pkSender = (PgWin *)this;
  PgCursor::ms_pkDrop = &this->m_kDrop;
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (004D0D40) --------------------------------------------------------
void __thiscall ActionWin::OnEmotionSlot_LClick(ActionWin *this, unsigned int lParam)
{
  this->m_kDropContents.m_eSenderType = 9;
  this->m_kDropContents.m_eType = 3;
  this->m_kDropContents.m_apvParam[0] = (void *)lParam;
  this->m_kDropContents.m_uiSenderIndex = 1;
  this->m_kDropContents.nTableIndexNum = this->m_apkIconEmotion[lParam]->m_pkActionViewInfo->nIndex;
  this->m_kDrop.m_pkSender = (PgWin *)this;
  PgCursor::ms_pkDrop = &this->m_kDrop;
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (004D0DA0) --------------------------------------------------------
void __thiscall ActionWin::StartHpStonCoolTime(ActionWin *this)
{
  ActionIconWin *v1; // ecx@1

  v1 = this->m_apkIconDefaultAction[8];
  if ( v1->m_pkActionViewInfo )
    IconWin::StartCoolTime((IconWin *)&v1->vfptr, Timer::ms_fCurTime, 7.0, 0.0);
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004D0DE0) --------------------------------------------------------
void __thiscall ActionWin::StartSpStonCoolTime(ActionWin *this)
{
  ActionIconWin *v1; // ecx@1

  v1 = this->m_apkIconDefaultAction[9];
  if ( v1->m_pkActionViewInfo )
    IconWin::StartCoolTime((IconWin *)&v1->vfptr, Timer::ms_fCurTime, 7.0, 0.0);
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004D0E20) --------------------------------------------------------
void __thiscall PremiumActionWin::PremiumActionWin(PremiumActionWin *this)
{
  PremiumActionWin *v1; // esi@1
  int v2; // eax@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&PremiumActionWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&PremiumActionWin::`vftable'{for `IDirectMessenger'};
  v2 = (int)&v1->m_kDropContents;
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  v1->m_kDrop.m_pkSender = 0;
  *(_DWORD *)v2 = &DropContents::`vftable';
  *(_WORD *)(v2 + 60) = -1;
  *(_DWORD *)(v2 + 64) = 0;
  v1->m_kDrop.m_pkContents = &v1->m_kDropContents;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9833C4: using guessed type void (__thiscall *PremiumActionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9833E4: using guessed type int (__thiscall *PremiumActionWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004D0E70) --------------------------------------------------------
void __thiscall PremiumActionWin::~PremiumActionWin(PremiumActionWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&PremiumActionWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PremiumActionWin::`vftable'{for `IDirectMessenger'};
  this->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  this->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9833C4: using guessed type void (__thiscall *PremiumActionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9833E4: using guessed type int (__thiscall *PremiumActionWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004D0EA0) --------------------------------------------------------
void __thiscall PremiumActionWin::OnShowActionWin(PremiumActionWin *this)
{
  PremiumActionWin *v1; // esi@1
  PgFrameWork *v2; // edi@1
  void *(__thiscall *v3)(NiRefObject *, unsigned int); // edx@2
  int XPos; // [sp+8h] [bp-8h]@2
  int YPos; // [sp+Ch] [bp-4h]@2

  v1 = this;
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    v3 = v1->vfptr[45].__vecDelDtor;
    XPos = 0;
    YPos = 0;
    ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v3)(v1, &XPos, &YPos);
    (*(void (__stdcall **)(_DWORD, _DWORD))(v2[21].m_kMsgQ.m_pBase->m_uiDumy[0] + 308))(XPos, YPos);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)v2[21].m_kMsgQ.m_pBase);
  }
}

//----- (004D0F20) --------------------------------------------------------
void __thiscall PremiumActionWin::OnEmotionAction(PremiumActionWin *this, unsigned int lParam)
{
  char v2; // al@3
  PremiumActionWin *v3; // [sp-2h] [bp-4h]@1
  int v4; // [sp-2h] [bp-4h]@5

  v3 = this;
  if ( !Char::CheckActState(g_pkMainChar, 500000) && !g_pkMainChar->m_bWillDead )
  {
    v2 = g_pkMainChar->m_byMode;
    if ( v2 != 4
      && v2 != 5
      && (((int (__cdecl *)(int))g_pkMainChar->vfptr[13].DeleteAbStateByAbstateIndex)(v4) != 4
       || g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0]) )
    {
      BYTE3(v3) = lParam;
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 8u, 0x67u, (char *)&v3 + 3, 1);
    }
  }
}

//----- (004D0FA0) --------------------------------------------------------
char __thiscall ActionInvTabButWin::EatDropInstance(ActionInvTabButWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  PgCursor::ms_bKeepDrop = 1;
  ((void (*)(void))this->vfptr[132].__vecDelDtor)();
  return 1;
}
// B648B8: using guessed type bool PgCursor::ms_bKeepDrop;

//----- (004D0FC0) --------------------------------------------------------
void __thiscall ActionIconWin::DoAction(ActionIconWin *this)
{
  ActionIconWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiInvIndex);
}

//----- (004D0FF0) --------------------------------------------------------
void __thiscall ActionIconWin::DoRAction(ActionIconWin *this)
{
  ActionIconWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiRCmdMsg, v1->m_uiInvIndex);
}

//----- (004D1020) --------------------------------------------------------
void __thiscall ActionIconWin::SetTopPlaneColor(ActionIconWin *this, float rad, float green, float blue, float alpha)
{
  ActionIconWin *v5; // esi@1
  NiScreenElements *v6; // eax@1
  NiColorA kCommonValue; // [sp+Ch] [bp-10h]@2

  v5 = this;
  v6 = this->m_spTopPlane.m_pObject;
  if ( v6 )
  {
    kCommonValue.r = rad / 255.0;
    kCommonValue.g = green / 255.0;
    kCommonValue.b = blue / 255.0;
    kCommonValue.a = alpha / 255.0;
    NiScreenElementsData::SetColors((NiScreenElementsData *)v6->m_spModelData.m_pObject, 0, &kCommonValue);
    NiScreenElementsData::UpdateBound((NiScreenElementsData *)v5->m_spTopPlane.m_pObject->m_spModelData.m_pObject);
    NiAVObject::UpdateProperties((NiAVObject *)&v5->m_spTopPlane.m_pObject->vfptr);
    NiAVObject::Update((NiAVObject *)&v5->m_spTopPlane.m_pObject->vfptr, 0.0, 1);
  }
}

//----- (004D10A0) --------------------------------------------------------
void __thiscall ActionWin::UpdateMeWin(ActionWin *this, float fCurTime)
{
  ActionWin *v2; // esi@1
  double v3; // st7@3
  float v4; // ST08_4@5
  float green; // ST04_4@5
  float rad; // ST00_4@5
  int v7; // eax@8
  ActionIconWin *v8; // ecx@8
  float alpha; // [sp+Ch] [bp-8h]@3

  v2 = this;
  if ( this->m_apkIconDefaultAction[8] )
  {
    if ( User::HPStone(&g_kUser) )
    {
      v3 = 0.0;
      alpha = 0.0;
    }
    else
    {
      alpha = 128.0;
      v3 = 0.0;
    }
    v4 = v3;
    green = v3;
    rad = v3;
    ActionIconWin::SetTopPlaneColor(v2->m_apkIconDefaultAction[8], rad, green, v4, alpha);
  }
  switch ( User::GetMainCharClass(&g_kUser) )
  {
    default:
      if ( v2->m_apkIconDefaultAction[9] )
      {
        v7 = User::SPStone(&g_kUser);
        v8 = v2->m_apkIconDefaultAction[9];
        if ( v7 )
          ActionIconWin::SetTopPlaneColor(v8, 0.0, 0.0, 0.0, 0.0);
        else
          ActionIconWin::SetTopPlaneColor(v8, 0.0, 0.0, 0.0, 128.0);
      }
      break;
    case 0x1A:
    case 0x1B:
      return;
  }
}

//----- (004D1190) --------------------------------------------------------
void __thiscall PremiumActionIcon::OnFirstHitWin(PremiumActionIcon *this)
{
  PremiumActionIcon *v1; // esi@1
  Item *v2; // edi@1
  ItemInfoWin *v3; // ecx@3

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->vfptr[81].__vecDelDtor)(0.0);
  v2 = ItemIcon::GetItem((ItemIcon *)&v1->vfptr);
  if ( v2 && PgWin::GetParentWin((PgWin *)&v1->vfptr) )
  {
    v3 = (ItemInfoWin *)v1->m_pkToolTipWin;
    if ( v3 )
    {
      ItemInfoWin::SetItemInfo(v3, v2);
      PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
    }
  }
}

//----- (004D11E0) --------------------------------------------------------
void __thiscall PremiumActionIcon::DoAction(PremiumActionIcon *this)
{
  PremiumActionIcon *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiInvIndex);
}

//----- (004D1210) --------------------------------------------------------
void __thiscall PremiumActionIcon::DoRAction(PremiumActionIcon *this)
{
  PremiumActionIcon *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiRCmdMsg, v1->m_uiInvIndex);
}

//----- (004D1240) --------------------------------------------------------
void __thiscall PremiumActionWin::Refresh(PremiumActionWin *this)
{
  PremiumActionWin *v1; // eax@1
  signed int v2; // ebx@1
  signed int v3; // ecx@1
  ItemIcon **v4; // edi@1
  Item *v5; // esi@4
  ActionViewInfo *v6; // esi@5
  NiImageConverter *v7; // eax@8
  NiPixelData *v8; // eax@8
  NiTexture::FormatPrefs kPrefs; // [sp+Ch] [bp-118h]@9
  int i; // [sp+18h] [bp-10Ch]@1
  char acFileName[260]; // [sp+1Ch] [bp-108h]@8

  v1 = this;
  v2 = 0;
  v3 = (char *)&g_kInventory.m_aspRewardInv[107] - (char *)this;
  v4 = (ItemIcon **)v1->m_apkPremiumActionIcon;
  for ( i = v3; ; v3 = i )
  {
    if ( (unsigned int)v2 < 0x2A )
    {
      v5 = *(Item **)((char *)v4 + v3);
      if ( v5 )
      {
        ItemIcon::SetItem(*v4, v5, 1);
        v6 = ActionViewTable::GetByInxName(v5->m_pkInfo->InxName);
        if ( v6 )
        {
          if ( !Folder::m_bInit )
            Folder::Init();
          sprintf(acFileName, "%s\\Icon\\%s.dds", &Folder::m_acMenu, v6->IconFileName);
          v7 = NiImageConverter::GetImageConverter();
          v8 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v7->vfptr[2].__vecDelDtor)(
                                v7,
                                acFileName,
                                0);
          if ( v8 )
          {
            kPrefs.m_ePixelLayout = 6;
            kPrefs.m_eAlphaFmt = 3;
            kPrefs.m_eMipMapped = 0;
            v8 = (NiPixelData *)NiSourceTexture::Create(v8, &kPrefs);
          }
          ((void (__stdcall *)(NiPixelData *, _DWORD, signed int, signed int))(*v4)->vfptr[146].__vecDelDtor)(
            v8,
            v6->nIconNum,
            32,
            32);
        }
      }
    }
    ++v2;
    ++v4;
    if ( v2 >= 42 )
      break;
  }
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004D1360) --------------------------------------------------------
void __thiscall PremiumActionWin::OnInvLClick(PremiumActionWin *this, unsigned int uiInvIndex)
{
  PremiumActionWin *v2; // esi@1
  Item *v3; // eax@1
  Item *v4; // edi@1
  ActionViewInfo *v5; // eax@2

  v2 = this;
  v3 = ItemIcon::GetItem((ItemIcon *)&this->m_apkPremiumActionIcon[uiInvIndex]->vfptr);
  v4 = v3;
  if ( v3 )
  {
    v2->m_kDropContents.m_eSenderType = 21;
    v2->m_kDropContents.m_eType = 0;
    v2->m_kDropContents.m_apvParam[2] = (void *)uiInvIndex;
    v2->m_kDropContents.m_uiSenderIndex = 2;
    v5 = ActionViewTable::GetByInxName(v3->m_pkInfo->InxName);
    if ( v5 )
      v2->m_kDropContents.nTableIndexNum = v5->nIndex;
    v2->m_kDropContents.m_apvParam[0] = v4;
    v2->m_kDropContents.m_apvParam[1] = 0;
    v2->m_kDropContents.m_uiSenderIndex = uiInvIndex;
    v2->m_kDropContents.m_uiLot = ((int (__thiscall *)(_DWORD))v4->vfptr[3].__vecDelDtor)(v4);
    v2->m_kDrop.m_pkSender = (PgWin *)v2;
    PgCursor::ms_pkDrop = &v2->m_kDrop;
    SoundMgr::PlayItemPutSound(v4->m_kStruct.itemid);
  }
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (004D1410) --------------------------------------------------------
void __thiscall PremiumActionWin::OnInvRClick(PremiumActionWin *this, unsigned int uiInvIndex)
{
  PremiumActionWin::OnEmotionAction(this, uiInvIndex);
}

//----- (004D1420) --------------------------------------------------------
char __thiscall PremiumActionWin::Change(PremiumActionWin *this, unsigned int uiInvType, Item *pkItem, unsigned int uiInvIndex)
{
  PremiumActionWin *v4; // ebx@1
  ActionViewInfo *v5; // esi@4
  NiSourceTexture *v6; // eax@7
  char result; // al@8
  char acFileName[260]; // [sp+Ch] [bp-108h]@7

  v4 = this;
  if ( uiInvType != 15 || uiInvIndex >= 0x2A )
  {
    result = 0;
  }
  else
  {
    ItemIcon::SetItem((ItemIcon *)&this->m_apkPremiumActionIcon[uiInvIndex]->vfptr, pkItem, 1);
    if ( pkItem )
    {
      v5 = ActionViewTable::GetByInxName(pkItem->m_pkInfo->InxName);
      if ( v5 )
      {
        if ( !Folder::m_bInit )
          Folder::Init();
        sprintf(acFileName, "%s\\Icon\\%s.dds", &Folder::m_acMenu, v5->IconFileName);
        v6 = PgUtil::LoadSourceTexture(acFileName);
        ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v4->m_apkPremiumActionIcon[uiInvIndex]->vfptr[146].__vecDelDtor)(
          v6,
          v5->nIconNum,
          32,
          32);
      }
    }
    result = 1;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004D1500) --------------------------------------------------------
int __thiscall PremiumActionWin::GetIconPosIndex(PremiumActionWin *this, int ActionViewInfoID)
{
  char *v2; // ecx@1
  Item *v3; // eax@4
  const char *v4; // ebx@5
  unsigned int v5; // edi@7
  char *v6; // eax@11
  char *v8; // [sp+Ch] [bp-Ch]@1
  int i; // [sp+10h] [bp-8h]@1
  ItemIcon **v10; // [sp+14h] [bp-4h]@1

  v2 = (char *)this->m_apkPremiumActionIcon;
  i = 0;
  v8 = v2;
  v10 = (ItemIcon **)v2;
  while ( 1 )
  {
    if ( v2 )
    {
      v3 = ItemIcon::GetItem(*v10);
      if ( v3 )
      {
        v4 = v3->m_pkInfo->InxName;
        if ( v3->m_pkInfo != (ItemInfo *)-2 )
        {
          if ( *v4 )
          {
            v5 = 0;
            if ( ITableBase<ActionViewInfo,ActionViewTable>::GetTotal() )
            {
              while ( strcmp(
                        CDataReader::GetRecord(
                          (CDataReader *)(ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable + 4),
                          v5)
                      + 1,
                        v4) )
              {
                if ( ++v5 >= ITableBase<ActionViewInfo,ActionViewTable>::GetTotal() )
                  goto LABEL_13;
              }
              v6 = CDataReader::GetRecord(
                     (CDataReader *)(ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable + 4),
                     v5);
              if ( v6 )
              {
                if ( *v6 == (_BYTE)ActionViewInfoID )
                  return i;
              }
            }
          }
        }
      }
    }
LABEL_13:
    ++v10;
    if ( ++i >= 42 )
      return -1;
    v2 = v8;
  }
}
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;

//----- (004D15E0) --------------------------------------------------------
int __thiscall ActionWin::GetIconPosIndex(ActionWin *this, int ActionViewInfoID)
{
  int result; // eax@1
  char *v3; // esi@1
  int v4; // edx@2
  _BYTE *v5; // edx@3
  int v6; // edx@4
  _BYTE *v7; // edx@8
  int v8; // edx@9

  result = 0;
  v3 = (char *)this->m_apkIconEmotion;
  while ( 1 )
  {
    v4 = *((_DWORD *)v3 - 18);
    if ( v4 )
    {
      v5 = *(_BYTE **)(v4 + 392);
      v6 = v5 ? *v5 : -1;
      if ( ActionViewInfoID == v6 )
        break;
    }
    if ( *(_DWORD *)v3 )
    {
      v7 = *(_BYTE **)(*(_DWORD *)v3 + 392);
      v8 = v7 ? *v7 : -1;
      if ( ActionViewInfoID == v8 )
        break;
    }
    ++result;
    v3 += 4;
    if ( result >= 18 )
      return PremiumActionWin::GetIconPosIndex(this->m_pkPremiumActionWin, ActionViewInfoID);
  }
  return result;
}

//----- (004D1650) --------------------------------------------------------
void __thiscall ActionWin::OnEmotionAction(ActionWin *this, unsigned int lParam)
{
  ActionWin *v2; // esi@1
  char v3; // al@3
  ActionIconWin *v4; // eax@5
  char *v5; // esi@5
  char *v6; // edi@5
  char v7; // bl@6
  unsigned __int16 v8; // di@8
  unsigned __int16 *v9; // ebx@8
  GameFrameWork *v10; // ecx@8
  MHEmotion *v11; // eax@8
  AbStateInfecteeVtbl *v12; // esi@11
  int v13; // eax@11
  NiPoint3 kGroundPos; // [sp+4h] [bp-1Ch]@8
  mhCharEmotionInfo Info; // [sp+10h] [bp-10h]@8
  ActionWin *v16; // [sp+1Ch] [bp-4h]@1

  v2 = this;
  v16 = this;
  if ( !Char::CheckActState(g_pkMainChar, 500000) && !g_pkMainChar->m_bWillDead )
  {
    v3 = g_pkMainChar->m_byMode;
    if ( v3 != 4 && v3 != 5 )
    {
      v4 = v2->m_apkIconEmotion[lParam];
      v5 = &v4->m_pkActionViewInfo->nIndex;
      v6 = &v4->m_pkLinkedAction->nIndex;
      if ( v5 )
      {
        v7 = *v5;
        if ( ((int (*)(void))g_pkMainChar->vfptr[13].DeleteAbStateByAbstateIndex)() == 4 )
        {
          if ( (unsigned __int8)((int (*)(void))v16->m_apkIconEmotion[lParam]->vfptr[61].__vecDelDtor)() )
          {
            v8 = FurnitureID;
            v9 = (unsigned __int16 *)unk_A99560;
            v10 = (GameFrameWork *)v16->m_pkFrameWork;
            *(_DWORD *)&Info.ActPos = *(_DWORD *)WantedActPos;
            GameFrameWork::GetGroundPosCam(v10, &kGroundPos);
            v11 = MiniHouseEmotionTab::GetNonMenuEmotion(*v9, *v5);
            if ( v8 != -1 && v11 )
            {
              MiniHouseIndoor::StartMHCharEmotion(
                &g_kWorld.m_MiniHouseIndoorMode,
                &kGroundPos,
                (unsigned __int8)Info.ActPos,
                v11->ActionIndex);
            }
            else
            {
              ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[13].AddAbStateByAbstateIndex)(0);
              v12 = g_pkMainChar->vfptr;
              v13 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
              ((void (__thiscall *)(_DWORD, _DWORD))v12[6].Affect)(g_pkMainChar, v13);
            }
          }
        }
        else
        {
          if ( v6 )
            v7 = *v6;
          GameFrameWork::NcActEmoticon_Cmd((GameFrameWork *)v16->m_pkFrameWork, v7);
        }
      }
    }
  }
}

//----- (004D17B0) --------------------------------------------------------
void __thiscall ActionWin::OnPremiumAction(ActionWin *this)
{
  ActionWin *v1; // esi@1
  int XPos; // [sp+4h] [bp-8h]@2
  int YPos; // [sp+8h] [bp-4h]@2

  v1 = this;
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
  if ( v1->m_pkPremiumActionWin )
  {
    XPos = 0;
    YPos = 0;
    ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[45].__vecDelDtor)(v1, &XPos, &YPos);
    ((void (__stdcall *)(_DWORD, _DWORD))v1->m_pkPremiumActionWin->vfptr[77].__vecDelDtor)(XPos, YPos);
    PremiumActionWin::Refresh(v1->m_pkPremiumActionWin);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkPremiumActionWin->vfptr);
  }
}

//----- (004D1830) --------------------------------------------------------
char __thiscall ActionWin::Change(ActionWin *this, unsigned int uiInvType, Item *pkItem, unsigned int uiInvIndex)
{
  char result; // al@3

  if ( uiInvType != 15 || uiInvIndex >= 0x2A )
  {
    result = 0;
  }
  else
  {
    PremiumActionWin::Change(this->m_pkPremiumActionWin, 0xFu, pkItem, uiInvIndex);
    result = 1;
  }
  return result;
}

//----- (004D1860) --------------------------------------------------------
void __thiscall PremiumActionWin::OnCommand(PremiumActionWin *this, unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@5

  switch ( wParam )
  {
    case 6u:
      PremiumActionWin::OnInvLClick(this, lParam);
      break;
    case 5u:
      PremiumActionWin::OnEmotionAction(this, lParam);
      break;
    case 3u:
      PremiumActionWin::OnShowActionWin(this);
      break;
    case 7u:
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v3 )
        GameFrameWork::OpenPlayGuideSearchList(v3, "ActionWin_Premium");
      break;
    default:
      return;
  }
}

//----- (004D18D0) --------------------------------------------------------
void __thiscall PremiumActionWin::SetMHActionState(PremiumActionWin *this, bool bMHEmotionStart)
{
  unsigned __int16 *v2; // ebx@3
  MHEmotion *v3; // edi@3
  ItemIcon **v4; // esi@3
  Item *v5; // eax@5
  ActionViewInfo *v6; // eax@6
  double v7; // st7@11
  float fB; // ST08_4@13
  float fG; // ST04_4@13
  float fR; // ST00_4@13
  int bEnable; // [sp+24h] [bp-4h]@0
  signed int bMHEmotionStarta; // [sp+30h] [bp+8h]@3

  LOBYTE(bEnable) = 0;
  if ( !bMHEmotionStart )
    LOBYTE(bEnable) = 1;
  v2 = (unsigned __int16 *)unk_A99560;
  v3 = 0;
  v4 = (ItemIcon **)this->m_apkPremiumActionIcon;
  bMHEmotionStarta = 42;
  do
  {
    if ( *v4 )
    {
      v5 = ItemIcon::GetItem(*v4);
      if ( v5 )
      {
        v6 = ActionViewTable::GetByInxName(v5->m_pkInfo->InxName);
        if ( v6 )
        {
          if ( v2 )
            v3 = MiniHouseEmotionTab::GetNonMenuEmotion(*v2, v6->nIndex);
          if ( !v3 )
          {
            if ( (_BYTE)bEnable )
              v7 = 1.0;
            else
              v7 = 0.44999999;
            fB = v7;
            fG = v7;
            fR = v7;
            IconWin::IconDisable((IconWin *)&(*v4)->vfptr, fR, fG, fB);
            ((void (__stdcall *)(int))(*v4)->vfptr[60].__vecDelDtor)(bEnable);
          }
        }
      }
    }
    ++v4;
    --bMHEmotionStarta;
  }
  while ( bMHEmotionStarta );
}

//----- (004D19A0) --------------------------------------------------------
void __thiscall ActionIconWin::ActionIconWin(ActionIconWin *this)
{
  ActionIconWin *v1; // esi@1
  NiAVObject *v2; // ecx@1
  NiProperty *v3; // eax@1
  NiTexturePalette *v4; // edi@1
  const char *v5; // eax@3
  NiAVObject *v6; // eax@4
  NiProperty *v7; // eax@4
  NiObjectNET *v8; // eax@6
  NiPointer<NiAlphaProperty> v9; // edi@6
  NiAVObject *v10; // ecx@11
  NiScreenElements *v11; // edi@13
  NiScreenElementsData *v12; // eax@14
  NiScreenElementsData *v13; // eax@15
  NiAlphaProperty *v14; // eax@15
  NiAlphaProperty *v15; // edi@18
  NiScreenElements *v16; // eax@26
  NiObjectNET *v17; // eax@26
  NiObjectNET *v18; // edi@26
  NiAVObject *v19; // ecx@29
  NiObjectNET *v20; // eax@29
  NiObjectNET *v21; // edi@29
  NiProperty *v22; // eax@30
  NiAVObject *v23; // ecx@32
  NiNode *v24; // edi@33
  NiColorA kCommonValue; // [sp+2Ch] [bp-3Ch]@26
  void *v26; // [sp+3Ch] [bp-2Ch]@14
  ActionIconWin *v27; // [sp+40h] [bp-28h]@1
  NiPointer<NiAlphaProperty> spAlphaProp; // [sp+44h] [bp-24h]@6
  float blue; // [sp+48h] [bp-20h]@13
  float green; // [sp+4Ch] [bp-1Ch]@13
  float rad; // [sp+50h] [bp-18h]@13
  NiPointer<NiNode> spNode; // [sp+54h] [bp-14h]@1
  NiAlphaProperty *v33; // [sp+58h] [bp-10h]@13
  int v34; // [sp+64h] [bp-4h]@1

  v1 = this;
  v27 = this;
  IconWin::IconWin((IconWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ActionIconWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ActionIconWin::`vftable'{for `IDirectMessenger'};
  v34 = 0;
  v1->m_spBackPlane.m_pObject = 0;
  v1->m_spTopPlane.m_pObject = 0;
  LOBYTE(v34) = 2;
  IconWin::CreateGeometry((IconWin *)&v1->vfptr, 0x20u, 0x20u);
  v2 = (NiAVObject *)&v1->m_spGeom.m_pObject->vfptr;
  v1->m_pkFrameWork = 0;
  v1->m_pkActionViewInfo = 0;
  v1->m_pkLinkedAction = 0;
  v3 = NiAVObject::GetProperty(v2, 0);
  NiAVObject::DetachProperty((NiAVObject *)&v1->m_spGeom.m_pObject->vfptr, v3);
  spNode.m_pObject = 0;
  v4 = pTexturePalette;
  LOBYTE(v34) = 3;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "Game\\IconMaterial.nif");
  PgUtil::LoadNodeNifFile(v5, &spNode, v4);
  if ( spNode.m_pObject )
  {
    v6 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Plane01");
    v7 = NiAVObject::GetProperty(v6, 0);
    if ( v7 )
    {
      NiAVObject::AttachProperty((NiAVObject *)&v1->m_spGeom.m_pObject->vfptr, v7);
    }
    else
    {
      v8 = (NiObjectNET *)operator new(0x20u);
      v9.m_pObject = (NiAlphaProperty *)v8;
      spAlphaProp.m_pObject = (NiAlphaProperty *)v8;
      LOBYTE(v34) = 4;
      if ( v8 )
      {
        NiObjectNET::NiObjectNET(v8);
        v9.m_pObject->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
        v9.m_pObject->m_uFlags = 236;
        v9.m_pObject->m_ucAlphaTestRef = 0;
      }
      else
      {
        v9.m_pObject = 0;
      }
      spAlphaProp.m_pObject = v9.m_pObject;
      if ( v9.m_pObject )
        InterlockedIncrement((volatile LONG *)&v9.m_pObject->m_uiRefCount);
      v9.m_pObject->m_uFlags |= 1u;
      v10 = (NiAVObject *)&v1->m_spGeom.m_pObject->vfptr;
      LOBYTE(v34) = 5;
      NiAVObject::AttachProperty(v10, (NiProperty *)&v9.m_pObject->vfptr);
      LOBYTE(v34) = 3;
      if ( !InterlockedDecrement((volatile LONG *)&v9.m_pObject->m_uiRefCount) )
        v9.m_pObject->vfptr->__vecDelDtor((NiRefObject *)v9.m_pObject, 1u);
    }
    *(float *)&v33 = 0.0 / 255.0;
    rad = *(float *)&v33;
    green = *(float *)&v33;
    blue = *(float *)&v33;
    spAlphaProp.m_pObject = v33;
    v11 = (NiScreenElements *)operator new(0xC4u);
    v33 = (NiAlphaProperty *)v11;
    LOBYTE(v34) = 6;
    if ( v11 )
    {
      v12 = (NiScreenElementsData *)operator new(0x70u);
      v26 = v12;
      LOBYTE(v34) = 7;
      if ( v12 )
      {
        NiScreenElementsData::NiScreenElementsData(v12, 0, 1, 0, 1, 1, 4, 1, 2, 1);
        LOBYTE(v34) = 6;
        NiScreenElements::NiScreenElements(v11, v13);
        v33 = v14;
      }
      else
      {
        LOBYTE(v34) = 6;
        NiScreenElements::NiScreenElements(v11, 0);
        v33 = v14;
      }
    }
    else
    {
      *(float *)&v33 = 0.0;
      v14 = 0;
    }
    v15 = (NiAlphaProperty *)v1->m_spTopPlane.m_pObject;
    LOBYTE(v34) = 3;
    if ( v15 != v14 )
    {
      if ( v15 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) && v15 )
          v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
        v14 = v33;
      }
      v1->m_spTopPlane.m_pObject = (NiScreenElements *)v14;
      if ( v14 )
        InterlockedIncrement((volatile LONG *)&v14->m_uiRefCount);
    }
    NiScreenElementsData::Insert((NiScreenElementsData *)v1->m_spTopPlane.m_pObject->m_spModelData.m_pObject, 4u, 0, 0);
    NiScreenElementsData::SetRectangle(
      (NiScreenElementsData *)v1->m_spTopPlane.m_pObject->m_spModelData.m_pObject,
      0,
      0.0,
      0.0,
      32.0,
      32.0);
    v16 = v1->m_spTopPlane.m_pObject;
    kCommonValue.r = rad;
    kCommonValue.g = green;
    kCommonValue.b = blue;
    kCommonValue.a = *(float *)&spAlphaProp.m_pObject;
    NiScreenElementsData::SetColors((NiScreenElementsData *)v16->m_spModelData.m_pObject, 0, &kCommonValue);
    v17 = (NiObjectNET *)operator new(0x20u);
    v18 = v17;
    v26 = v17;
    LOBYTE(v34) = 8;
    if ( v17 )
    {
      NiObjectNET::NiObjectNET(v17);
      v18->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
      LOWORD(v18[1].vfptr) = 236;
      BYTE2(v18[1].vfptr) = 0;
    }
    else
    {
      v18 = 0;
    }
    LOWORD(v18[1].vfptr) |= 1u;
    v19 = (NiAVObject *)&v1->m_spTopPlane.m_pObject->vfptr;
    LOBYTE(v34) = 3;
    NiAVObject::AttachProperty(v19, (NiProperty *)v18);
    v20 = (NiObjectNET *)operator new(0x28u);
    v21 = v20;
    v26 = v20;
    LOBYTE(v34) = 9;
    if ( v20 )
    {
      NiObjectNET::NiObjectNET(v20);
      LOWORD(v21[1].vfptr) = 0;
      v21->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
      v21[1].m_uiRefCount = 0;
      v21[1].m_pcName = (char *)1;
      v22 = (NiProperty *)v21;
    }
    else
    {
      v22 = 0;
    }
    v22[1].m_uiRefCount = 1;
    v22[1].m_pcName = 0;
    v23 = (NiAVObject *)&v1->m_spTopPlane.m_pObject->vfptr;
    LOBYTE(v34) = 3;
    NiAVObject::AttachProperty(v23, v22);
    NiScreenElementsData::UpdateBound((NiScreenElementsData *)v1->m_spTopPlane.m_pObject->m_spModelData.m_pObject);
    NiAVObject::UpdateProperties((NiAVObject *)&v1->m_spTopPlane.m_pObject->vfptr);
    NiAVObject::Update((NiAVObject *)&v1->m_spTopPlane.m_pObject->vfptr, 0.0, 1);
    NiNode::AttachChild((NiNode *)&v1->vfptr, (NiAVObject *)&v1->m_spTopPlane.m_pObject->vfptr, 0);
    NiAVObject::UpdateProperties((NiAVObject *)&v1->vfptr);
    NiAVObject::Update((NiAVObject *)&v1->vfptr, 0.0, 1);
    LOBYTE(v34) = 2;
    if ( spNode.m_pObject )
    {
      v24 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v24 )
          v24->vfptr->__vecDelDtor((NiRefObject *)v24, 1u);
      }
    }
  }
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);
// 982EF4: using guessed type void (__thiscall *ActionIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 982F14: using guessed type int (__thiscall *ActionIconWin::`vftable'{for `NiNode'})(void *p, char);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004D1D80) --------------------------------------------------------
void __thiscall ActionWin::OnEmotionSlot_RClick(ActionWin *this, unsigned int lParam)
{
  ActionWin::OnEmotionAction(this, lParam);
}

//----- (004D1D90) --------------------------------------------------------
void __thiscall ActionWin::SetMHActionState(ActionWin *this, bool bMHEmotionStart)
{
  double v2; // st7@3
  double v3; // st6@3
  unsigned __int16 *v4; // ebx@3
  MHEmotion *v5; // edi@3
  IconWin **v6; // esi@3
  char *v7; // eax@5
  float fB; // ST08_4@11
  float fG; // ST04_4@11
  float fR; // ST00_4@11
  ActionWin *v11; // [sp+24h] [bp-Ch]@1
  signed int v12; // [sp+28h] [bp-8h]@3
  int bEnable; // [sp+2Ch] [bp-4h]@0

  v11 = this;
  LOBYTE(bEnable) = 0;
  if ( !bMHEmotionStart )
    LOBYTE(bEnable) = 1;
  v2 = 0.44999999;
  v3 = 1.0;
  v4 = (unsigned __int16 *)unk_A99560;
  v5 = 0;
  v6 = (IconWin **)this->m_apkIconEmotion;
  v12 = 18;
  do
  {
    if ( *v6 )
    {
      v7 = (char *)(*v6)[1].m_spControllers.m_pObject;
      if ( v7 )
      {
        if ( v4 )
        {
          v2 = 0.44999999;
          v5 = MiniHouseEmotionTab::GetNonMenuEmotion(*v4, *v7);
          v3 = 1.0;
        }
        if ( !v5 )
        {
          if ( (_BYTE)bEnable )
            v2 = v3;
          fB = v2;
          fG = v2;
          fR = v2;
          IconWin::IconDisable(*v6, fR, fG, fB);
          ((void (__stdcall *)(int))(*v6)->vfptr[60].__vecDelDtor)(bEnable);
          v2 = 0.44999999;
          v3 = 1.0;
        }
      }
    }
    ++v6;
    --v12;
  }
  while ( v12 );
  PremiumActionWin::SetMHActionState(v11->m_pkPremiumActionWin, bMHEmotionStart);
}

//----- (004D1E70) --------------------------------------------------------
ActionIconWin *__cdecl ActionIconWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork)
{
  PgWin *v5; // eax@1
  PgWin *v6; // eax@2
  PgWin *v7; // esi@2
  PgWin *v8; // edi@8
  ActionIconWin *v9; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v11; // [sp+20h] [bp-4h]@1

  v5 = (PgWin *)operator new(0x198u);
  result.m_pObject = v5;
  v11 = 0;
  if ( v5 )
  {
    ActionIconWin::ActionIconWin((ActionIconWin *)v5);
    v7 = v6;
  }
  else
  {
    v7 = 0;
  }
  if ( v7 )
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  v11 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v7);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, PgWin *, PgFrameWork *))v7->vfptr[152].__vecDelDtor)(
                          v7,
                          iXPos,
                          iYPos,
                          uiInvIndex,
                          pkParent,
                          pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v7->vfptr[89].__vecDelDtor)(v7);
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = (ActionIconWin *)v7;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v7);
    if ( result.m_pObject )
    {
      v8 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v8 )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      }
    }
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = 0;
  }
  return v9;
}

//----- (004D1FB0) --------------------------------------------------------
ActionWin *__cdecl ActionWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  ActionWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x250u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    ActionWin::ActionWin((ActionWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (ActionWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (004D20E0) --------------------------------------------------------
PremiumActionIcon *__cdecl PremiumActionIcon::CreateWin(int iXPos, int iYPos, PgWin *pkParent)
{
  PgWin *v3; // eax@1
  PgWin *v4; // esi@1
  PgWin *v5; // edi@8
  PremiumActionIcon *v6; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x1C4u);
  v4 = v3;
  result.m_pObject = v3;
  v8 = 0;
  if ( v3 )
  {
    ItemIcon::ItemIcon((ItemIcon *)v3);
    v4->vfptr = (NiRefObjectVtbl *)&PremiumActionIcon::`vftable'{for `NiNode'};
    v4->vfptr = (IDirectMessengerVtbl *)&PremiumActionIcon::`vftable'{for `IDirectMessenger'};
    v4[1].m_kPropertyList.m_pkHead = (NiTListItem<NiPointer<NiProperty> > *)-1;
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v8 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v4);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgWin *))v4->vfptr[153].__vecDelDtor)(
                          v4,
                          iXPos,
                          iYPos,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v4->vfptr[89].__vecDelDtor)(v4);
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = (PremiumActionIcon *)v4;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v4);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = 0;
  }
  return v6;
}
// 982A18: using guessed type void (__thiscall *PremiumActionIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 982A34: using guessed type int (__thiscall *PremiumActionIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (004D2230) --------------------------------------------------------
PremiumActionWin *__cdecl PremiumActionWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  int v3; // eax@2
  PgWin *v4; // edi@8
  PremiumActionWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x260u);
  v2 = v1;
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&PremiumActionWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&PremiumActionWin::`vftable'{for `IDirectMessenger'};
    v3 = (int)&v2[1].m_iHeight;
    v2[1].vfptr = (IDirectMessengerVtbl *)&PgWinDrop::`vftable';
    v2[1].m_uiMessageNum = 0;
    *(_DWORD *)v3 = &DropContents::`vftable';
    *(_WORD *)(v3 + 60) = -1;
    *(_DWORD *)(v3 + 64) = 0;
    v2[1].m_pkMsgHooker = (IDirectMessenger *)&v2[1].248;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v5 = (PremiumActionWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v5 = 0;
  }
  return v5;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9833C4: using guessed type void (__thiscall *PremiumActionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9833E4: using guessed type int (__thiscall *PremiumActionWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004D23A0) --------------------------------------------------------
char __thiscall PremiumActionWin::Create(PremiumActionWin *this, PgFrameWork *pkFrameWork)
{
  PremiumActionWin *v2; // esi@1
  NiTexturePalette *v3; // ebx@1
  const char *v4; // eax@3
  PgWinSpr *v5; // eax@4
  NiNode *v6; // esi@5
  char result; // al@9
  PgSprData *v8; // eax@10
  int v9; // edi@11
  int v10; // ebx@11
  NiSourceTexture *v11; // eax@11
  PgSprData *v12; // eax@12
  PgSprData *v13; // eax@14
  PgFont *v14; // eax@16
  PgWinText *v15; // eax@16
  NiRefObjectVtbl *v16; // edx@16
  NiUnsharedGeometryGroup *v17; // eax@16
  PgSprData *v18; // eax@16
  PgWinSpr *v19; // eax@16
  PgSprData *v20; // eax@16
  PgWinSpr *v21; // eax@16
  NiSourceTexture *v22; // eax@16
  PgSprData *v23; // eax@17
  char *v24; // eax@17
  PgSprData *v25; // eax@17
  PgWinSpr *v26; // eax@17
  PgSprData *v27; // eax@17
  PgSprData *v28; // eax@17
  PgWinSpr *v29; // eax@17
  char *v30; // eax@17
  PgSprData *v31; // eax@17
  PgSprData *v32; // eax@19
  PgWinSpr *v33; // eax@19
  NiRefObjectVtbl *v34; // edx@19
  PgFont *v35; // ST34_4@19
  unsigned int v36; // ST30_4@19
  unsigned int v37; // eax@19
  PgWinText *v38; // eax@19
  NiRefObjectVtbl *v39; // edx@19
  NiUnsharedGeometryGroup *v40; // eax@19
  PgSprData *v41; // eax@20
  NiRefObjectVtbl *v42; // eax@20
  IconWin **v43; // ecx@20
  PgWinSpr *v44; // ecx@20
  NiNode *v45; // esi@21
  unsigned int uiHeight; // [sp+10h] [bp-70h]@14
  unsigned int uiWidth; // [sp+14h] [bp-6Ch]@14
  PgWinBut *pkBut; // [sp+18h] [bp-68h]@16
  PgWinSpr *pkSprWin; // [sp+1Ch] [bp-64h]@4
  int i; // [sp+20h] [bp-60h]@16
  NiPointer<NiNode> spNode; // [sp+24h] [bp-5Ch]@1
  int uiTop; // [sp+28h] [bp-58h]@10
  int uiLeft; // [sp+2Ch] [bp-54h]@10
  char acShapeName[64]; // [sp+30h] [bp-50h]@20
  int v55; // [sp+7Ch] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v55 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\ActionWin_Premium.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = (PgWinSpr *)MenuTexMgr::GetTexture(4u);
  pkSprWin = v5;
  if ( !v5
    || (v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, (NiSourceTexture *)v5),
        !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v8, 0, pkFrameWork, "PremiumActionWin", 0)) )
  {
    v6 = spNode.m_pObject;
    v55 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v9 = uiLeft;
  v10 = uiTop;
  v11 = MenuTexMgr::GetTexture(0x13u);
  if ( v11 )
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v11);
  else
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13 = PgSprData::Create(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "IconSlot",
          &uiLeft,
          &uiTop,
          (NiSourceTexture *)pkSprWin);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v13, (PgWin *)&v2->vfptr, 0, 0);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight)
    && (v14 = Font::Get(MAIN_MENU),
        v15 = PgWinText::CreateWin(uiLeft - v9, uiTop - v10, uiWidth, uiHeight, v14, (PgWin *)&v2->vfptr, 0, 0),
        v16 = v15->vfptr,
        i = (int)v15,
        v16[122].__vecDelDtor((NiRefObject *)v15, 1u),
        (*(void (__stdcall **)(struct D3DXCOLOR *))(*(_DWORD *)i + 468))(&Color::m_kDxWinTitleColor),
        pkBut = (PgWinBut *)(*(_DWORD *)i + 472),
        v17 = TextData::Get(0x90A89DE5),
        ((void (__thiscall *)(int, NiUnsharedGeometryGroup *))pkBut->vfptr)(i, v17),
        (*(void (__stdcall **)(_DWORD))(*(_DWORD *)i + 240))(0),
        v18 = PgSprData::Create(
                (NiAVObject *)&spNode.m_pObject->vfptr,
                "Panel01",
                &uiLeft,
                &uiTop,
                (NiSourceTexture *)pkSprWin),
        v19 = PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v18, (PgWin *)&v2->vfptr, 0, 0),
        v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0),
        v20 = PgSprData::Create(
                (NiAVObject *)&spNode.m_pObject->vfptr,
                "Panel02",
                &uiLeft,
                &uiTop,
                (NiSourceTexture *)pkSprWin),
        v21 = PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v20, (PgWin *)&v2->vfptr, 0, 0),
        v21->vfptr[60].__vecDelDtor((NiRefObject *)v21, 0),
        v22 = MenuTexMgr::GetTexture(0x12u),
        (i = (int)v22) != 0) )
  {
    v23 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab00Off", &uiLeft, &uiTop, v22);
    pkBut = PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, v23, (PgWin *)&v2->vfptr, 3u, 0, 0);
    pkBut->m_pkToolTipWin = g_pkToolTipWin;
    v24 = (char *)TextData2::Get(0x27538081u);
    PgWin::SetToolTipWinText((PgWin *)&pkBut->vfptr, v24);
    v25 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab00On", &uiLeft, &uiTop, (NiSourceTexture *)i);
    v26 = PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v25, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkActionInvTab = v26;
    v26->vfptr[60].__vecDelDtor((NiRefObject *)v26, 0);
    ((void (__stdcall *)(_DWORD))v2->m_pkActionInvTab->vfptr[64].__vecDelDtor)(0);
    v27 = PgSprData::Create(
            (NiAVObject *)&spNode.m_pObject->vfptr,
            "Tab01Off",
            &uiLeft,
            &uiTop,
            (NiSourceTexture *)pkSprWin);
    PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, v27, (PgWin *)&v2->vfptr, 2u, 0, 0);
    v28 = PgSprData::Create(
            (NiAVObject *)&spNode.m_pObject->vfptr,
            "Tab01On",
            &uiLeft,
            &uiTop,
            (NiSourceTexture *)pkSprWin);
    v29 = PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v28, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkPremiumActionInvTab = v29;
    v29->vfptr[60].__vecDelDtor((NiRefObject *)v29, 1u);
    ((void (__stdcall *)(signed int))v2->m_pkPremiumActionInvTab->vfptr[64].__vecDelDtor)(1);
    v2->m_pkPremiumActionInvTab->m_pkToolTipWin = g_pkToolTipWin;
    v30 = (char *)TextData2::Get(0x275F7897u);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkPremiumActionInvTab->vfptr, v30);
    v31 = PgSprData::Create(
            (NiAVObject *)&spNode.m_pObject->vfptr,
            "Num01",
            &uiLeft,
            &uiTop,
            (NiSourceTexture *)pkSprWin);
    PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v31, (PgWin *)&v2->vfptr, 0, 0);
    i = (int)PgSprData::Create(
               (NiAVObject *)&spNode.m_pObject->vfptr,
               "ClsNor",
               &uiLeft,
               &uiTop,
               (NiSourceTexture *)pkSprWin);
    PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
    PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
    PgWinCloseBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)i, (PgWin *)&v2->vfptr);
    pkBut = (PgWinBut *)MenuTexMgr::GetTexture(4u);
    if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
    {
      i = (int)PgSprData::Create(
                 (NiAVObject *)&spNode.m_pObject->vfptr,
                 "HelpLinkNor",
                 &uiLeft,
                 &uiTop,
                 (NiSourceTexture *)pkBut);
      PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
      PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
      PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)i, (PgWin *)&v2->vfptr, 7u, 0, 0);
    }
    v32 = PgSprData::Create(
            (NiAVObject *)&spNode.m_pObject->vfptr,
            "Title01",
            &uiLeft,
            &uiTop,
            (NiSourceTexture *)pkSprWin);
    v33 = PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v32, (PgWin *)&v2->vfptr, 0, 0);
    v34 = v33->vfptr;
    pkSprWin = v33;
    v34[60].__vecDelDtor((NiRefObject *)v33, 0);
    v35 = Font::Get(MAIN_MENU);
    v36 = ((int (*)(void))pkSprWin->vfptr[37].__vecDelDtor)();
    v37 = ((int (*)(void))pkSprWin->vfptr[36].__vecDelDtor)();
    v38 = PgWinText::CreateWin(uiLeft - v9, uiTop - v10, v37, v36, v35, (PgWin *)&v2->vfptr, 0, 0);
    v39 = v38->vfptr;
    i = (int)v38;
    v39[122].__vecDelDtor((NiRefObject *)v38, 4u);
    (*(void (__stdcall **)(struct D3DXCOLOR *))(*(_DWORD *)i + 468))(&Color::m_kDxWinTitleColor);
    pkBut = (PgWinBut *)(*(_DWORD *)i + 472);
    v40 = TextData2::Get(0x7B12D0DCu);
    ((void (__thiscall *)(int, NiUnsharedGeometryGroup *))pkBut->vfptr)(i, v40);
    (*(void (__stdcall **)(_DWORD))(*(_DWORD *)i + 240))(0);
    i = 0;
    pkSprWin = (PgWinSpr *)v2->m_apkPremiumActionIcon;
    do
    {
      pkBut = (PgWinBut *)(i + 1);
      sprintf(acShapeName, "IconSlot%03d", i + 1);
      v41 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, 0);
      PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v41, (PgWin *)&v2->vfptr, 0, 0);
      v42 = (NiRefObjectVtbl *)PremiumActionIcon::CreateWin(uiLeft - v9 + 1, uiTop - v10 + 1, (PgWin *)&v2->vfptr);
      pkSprWin->vfptr = v42;
      ItemIcon::SetItem((ItemIcon *)v42, 0, 1);
      (*((void (__stdcall **)(_DWORD))pkSprWin->vfptr->__vecDelDtor + 129))(6);
      (*((void (__stdcall **)(_DWORD))pkSprWin->vfptr->__vecDelDtor + 140))(5);
      v43 = (IconWin **)pkSprWin;
      pkSprWin->vfptr[68].__vecDelDtor = (void *(__thiscall *)(NiRefObject *, unsigned int))g_pkItemInfoWin;
      IconWin::ShowFocus(*v43, 1);
      v44 = pkSprWin;
      pkSprWin->vfptr[112].__vecDelDtor = (void *(__thiscall *)(NiRefObject *, unsigned int))i;
      i = (int)pkBut;
      pkSprWin = (PgWinSpr *)((char *)v44 + 4);
    }
    while ( (signed int)pkBut < 42 );
    v45 = spNode.m_pObject;
    v55 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v45 )
      v45->vfptr->__vecDelDtor((NiRefObject *)v45, 1u);
    result = 1;
  }
  else
  {
    v55 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004D2AE0) --------------------------------------------------------
ActionInvTabButWin *__cdecl ActionInvTabButWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg)
{
  PgWin *v5; // eax@1
  PgWin *v6; // esi@1
  PgWin *v7; // edi@8
  ActionInvTabButWin *v8; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v10; // [sp+20h] [bp-4h]@1

  v5 = (PgWin *)operator new(0x144u);
  v6 = v5;
  result.m_pObject = v5;
  v10 = 0;
  if ( v5 )
  {
    PgWinBut::PgWinBut((PgWinBut *)v5);
    v6->vfptr = (NiRefObjectVtbl *)&ActionInvTabButWin::`vftable'{for `NiNode'};
    v6->vfptr = (IDirectMessengerVtbl *)&ActionInvTabButWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v6 = 0;
  }
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v10 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v6);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgSprData *, PgWin *, unsigned int))v6->vfptr[140].__vecDelDtor)(
                          v6,
                          iXPos,
                          iYPos,
                          pkSprData,
                          pkParent,
                          uiCmdMsg) )
  {
    ((void (__thiscall *)(PgWin *))v6->vfptr[89].__vecDelDtor)(v6);
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = (ActionInvTabButWin *)v6;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v6);
    if ( result.m_pObject )
    {
      v7 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      }
    }
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = 0;
  }
  return v8;
}
// 982CA0: using guessed type void (__thiscall *ActionInvTabButWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 982CBC: using guessed type int (__thiscall *ActionInvTabButWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004D2C30) --------------------------------------------------------
char __thiscall ActionWin::Create(ActionWin *this, PgFrameWork *pkFrameWork)
{
  ActionWin *v2; // esi@1
  NiTexturePalette *v3; // ebx@1
  const char *v4; // eax@3
  NiSourceTexture *v5; // eax@4
  NiNode *v6; // esi@5
  LONG v7; // eax@6
  char result; // al@10
  PgSprData *v9; // eax@11
  int v10; // edi@12
  int v11; // ebx@12
  NiSourceTexture *v12; // eax@12
  PgSprData *v13; // eax@13
  PgSprData *v14; // eax@15
  PgFont *v15; // eax@17
  PgWinText *v16; // eax@17
  NiRefObjectVtbl *v17; // edx@17
  NiUnsharedGeometryGroup *v18; // eax@17
  PgSprData *v19; // eax@17
  PgWinSpr *v20; // eax@17
  PgSprData *v21; // eax@17
  PgWinSpr *v22; // eax@17
  NiSourceTexture *v23; // eax@17
  PgSprData *v24; // eax@18
  PgWinBut *v25; // eax@18
  NiSourceTexture *v26; // ST30_4@18
  PgSprData *v27; // eax@18
  PgWinSpr *v28; // eax@18
  char *v29; // eax@18
  PgSprData *v30; // eax@18
  char *v31; // eax@18
  PgSprData *v32; // eax@18
  PgWinSpr *v33; // eax@18
  PgSprData *v34; // eax@18
  PgWinBut *v35; // eax@18
  NiRefObjectVtbl *v36; // edx@18
  PgSprData *v37; // eax@20
  ActionViewInfo *v38; // eax@20
  int v39; // edx@20
  PgFont *v40; // ST54_4@20
  unsigned int v41; // ST50_4@20
  unsigned int v42; // eax@20
  PgWinText *v43; // eax@20
  NiRefObjectVtbl *v44; // edx@20
  NiUnsharedGeometryGroup *v45; // eax@20
  PgSprData *v46; // eax@20
  ActionViewInfo *v47; // eax@20
  int v48; // edx@20
  PgFont *v49; // ST54_4@20
  unsigned int v50; // ST50_4@20
  unsigned int v51; // eax@20
  PgWinText *v52; // eax@20
  NiRefObjectVtbl *v53; // edx@20
  NiUnsharedGeometryGroup *v54; // eax@20
  char *v55; // eax@20
  signed int v56; // eax@20
  PgSprData *v57; // eax@21
  int *v58; // ecx@21
  int v59; // edx@21
  PgSprData *v60; // eax@23
  int *v61; // eax@23
  int v62; // edx@23
  int v63; // ecx@23
  int v64; // eax@24
  int v65; // edi@28
  char *v66; // eax@29
  __int16 v67; // dx@30
  int v68; // eax@31
  ActionIconWin *v69; // eax@34
  ActionViewInfo *v70; // ecx@34
  int v71; // edx@34
  NiRefObjectVtbl *v72; // eax@37
  NiSourceTexture *v73; // ecx@37
  ActionViewInfo *v74; // edx@37
  NiSourceTexture *v75; // eax@37
  ActionViewInfo *v76; // ecx@37
  PgWinText *v77; // edx@37
  signed int v78; // ecx@39
  char *v79; // eax@42
  PremiumActionWin *v80; // eax@48
  PremiumActionWin *v81; // edi@48
  NiRTTI *v82; // eax@49
  NiNode *v83; // esi@56
  unsigned int uiHeight; // [sp+74h] [bp-3BCh]@15
  unsigned int uiWidth; // [sp+78h] [bp-3B8h]@15
  int iOffY; // [sp+7Ch] [bp-3B4h]@12
  PgFrameWork *v87; // [sp+80h] [bp-3B0h]@1
  tagRECT *v88; // [sp+84h] [bp-3ACh]@28
  ActionIconWin **v89; // [sp+88h] [bp-3A8h]@40
  tagRECT *v90; // [sp+8Ch] [bp-3A4h]@28
  unsigned int RecordNo; // [sp+90h] [bp-3A0h]@21
  int i; // [sp+94h] [bp-39Ch]@22
  int *v93; // [sp+98h] [bp-398h]@20
  PgWinBut *pkBut; // [sp+9Ch] [bp-394h]@17
  ActionViewInfo *pkInfo; // [sp+A0h] [bp-390h]@18
  NiSourceTexture *pkTexture; // [sp+A4h] [bp-38Ch]@4
  PgWinText *pkTextWin; // [sp+A8h] [bp-388h]@17
  NiPointer<NiNode> spNode; // [sp+ACh] [bp-384h]@1
  int uiTop; // [sp+B0h] [bp-380h]@11
  int uiLeft; // [sp+B4h] [bp-37Ch]@11
  tagRECT rectEmotion[18]; // [sp+B8h] [bp-378h]@22
  tagRECT rectDefault[18]; // [sp+1D8h] [bp-258h]@20
  char acFileName[260]; // [sp+2F8h] [bp-138h]@20
  char acShapeName[33]; // [sp+3FCh] [bp-34h]@21
  int v105; // [sp+42Ch] [bp-4h]@1

  v2 = this;
  v87 = pkFrameWork;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v105 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\ActionWin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = MenuTexMgr::GetTexture(4u);
  pkTexture = v5;
  if ( !v5
    || (v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v5),
        !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "ActionWin", 0)) )
  {
LABEL_5:
    v6 = spNode.m_pObject;
    v105 = -1;
    if ( spNode.m_pObject )
    {
      v7 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
LABEL_7:
      if ( !v7 )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    return 0;
  }
  v10 = uiTop;
  v11 = uiLeft;
  iOffY = uiTop;
  v12 = MenuTexMgr::GetTexture(0x13u);
  if ( v12 )
    v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v12);
  else
    v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v11, uiTop - v10, v13, (PgWin *)&v2->vfptr, 0, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, pkTexture);
  PgWinSpr::CreateWin(uiLeft - v11, uiTop - v10, v14, (PgWin *)&v2->vfptr, 0, 0);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight)
    && (v15 = Font::Get(MAIN_MENU),
        v16 = PgWinText::CreateWin(uiLeft - v11, uiTop - v10, uiWidth, uiHeight, v15, (PgWin *)&v2->vfptr, 0, 0),
        v17 = v16->vfptr,
        pkTextWin = v16,
        v17[122].__vecDelDtor((NiRefObject *)v16, 1u),
        ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        pkBut = (PgWinBut *)&pkTextWin->vfptr[118],
        v18 = TextData::Get(0x90A89DE5),
        ((void (__thiscall *)(_DWORD, _DWORD))pkBut->vfptr)(pkTextWin, v18),
        ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0),
        v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture),
        v20 = PgWinSpr::CreateWin(uiLeft - v11, uiTop - v10, v19, (PgWin *)&v2->vfptr, 0, 0),
        v20->vfptr[60].__vecDelDtor((NiRefObject *)v20, 0),
        v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, pkTexture),
        v22 = PgWinSpr::CreateWin(uiLeft - v11, uiTop - v10, v21, (PgWin *)&v2->vfptr, 0, 0),
        v22->vfptr[60].__vecDelDtor((NiRefObject *)v22, 0),
        v23 = MenuTexMgr::GetTexture(0x12u),
        (pkBut = (PgWinBut *)v23) != 0) )
  {
    v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab00Off", &uiLeft, &uiTop, v23);
    v25 = PgWinBut::CreateWin(uiLeft - v11, uiTop - v10, v24, (PgWin *)&v2->vfptr, 0, 0, 0);
    v26 = (NiSourceTexture *)pkBut;
    v25->m_pkToolTipWin = g_pkToolTipWin;
    v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab00On", &uiLeft, &uiTop, v26);
    v28 = PgWinSpr::CreateWin(uiLeft - v11, uiTop - v10, v27, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkActionInvTab = v28;
    v28->vfptr[60].__vecDelDtor((NiRefObject *)v28, 1u);
    ((void (__stdcall *)(signed int))v2->m_pkActionInvTab->vfptr[64].__vecDelDtor)(1);
    v2->m_pkActionInvTab->m_pkToolTipWin = g_pkToolTipWin;
    v29 = (char *)TextData2::Get(0x27538081u);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkActionInvTab->vfptr, v29);
    v30 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab01Off", &uiLeft, &uiTop, pkTexture);
    pkBut = PgWinBut::CreateWin(uiLeft - v11, uiTop - v10, v30, (PgWin *)&v2->vfptr, 6u, 0, 0);
    pkBut->m_pkToolTipWin = g_pkToolTipWin;
    v31 = (char *)TextData2::Get(0x275F7897u);
    PgWin::SetToolTipWinText((PgWin *)&pkBut->vfptr, v31);
    v32 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab01On", &uiLeft, &uiTop, pkTexture);
    v33 = PgWinSpr::CreateWin(uiLeft - v11, uiTop - v10, v32, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkPremiumActionInvTab = v33;
    v33->vfptr[60].__vecDelDtor((NiRefObject *)v33, 0);
    ((void (__stdcall *)(_DWORD))v2->m_pkPremiumActionInvTab->vfptr[64].__vecDelDtor)(0);
    v34 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Num01", &uiLeft, &uiTop, pkTexture);
    PgWinSpr::CreateWin(uiLeft - v11, uiTop - v10, v34, (PgWin *)&v2->vfptr, 0, 0);
    pkInfo = (ActionViewInfo *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "ClsNor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
    PgSprData::Add((PgSprData *)pkInfo, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
    PgSprData::Add((PgSprData *)pkInfo, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
    PgWinBut::CreateWin(uiLeft - v11, uiTop - v10, (PgSprData *)pkInfo, (PgWin *)&v2->vfptr, 1u, 0, 0);
    v35 = (PgWinBut *)MenuTexMgr::GetTexture(4u);
    v36 = spNode.m_pObject->vfptr;
    pkBut = v35;
    if ( ((int (__stdcall *)(const char *))v36[18].__vecDelDtor)("HelpLinkNor") )
    {
      pkInfo = (ActionViewInfo *)PgSprData::Create(
                                   (NiAVObject *)&spNode.m_pObject->vfptr,
                                   "HelpLinkNor",
                                   &uiLeft,
                                   &uiTop,
                                   (NiSourceTexture *)pkBut);
      PgSprData::Add((PgSprData *)pkInfo, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
      PgSprData::Add((PgSprData *)pkInfo, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
      PgWinBut::CreateWin(uiLeft - v11, uiTop - v10, (PgSprData *)pkInfo, (PgWin *)&v2->vfptr, 7u, 0, 0);
    }
    v37 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title01", &uiLeft, &uiTop, pkTexture);
    v38 = (ActionViewInfo *)PgWinSpr::CreateWin(uiLeft - v11, uiTop - v10, v37, (PgWin *)&v2->vfptr, 0, 0);
    v39 = *(_DWORD *)&v38->nIndex;
    pkInfo = v38;
    (*(void (__thiscall **)(ActionViewInfo *, _DWORD))(v39 + 240))(v38, 0);
    v40 = Font::Get(MAIN_MENU);
    v41 = (*(int (**)(void))(*(_DWORD *)&pkInfo->nIndex + 148))();
    v42 = (*(int (**)(void))(*(_DWORD *)&pkInfo->nIndex + 144))();
    v43 = PgWinText::CreateWin(uiLeft - v11, uiTop - v10, v42, v41, v40, (PgWin *)&v2->vfptr, 0, 0);
    v44 = v43->vfptr;
    pkTextWin = v43;
    v44[122].__vecDelDtor((NiRefObject *)v43, 5u);
    ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
    pkBut = (PgWinBut *)&pkTextWin->vfptr[118];
    v45 = TextData::Get(0xD9392C3D);
    ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkBut->vfptr)(pkTextWin, v45);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v46 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title02", &uiLeft, &uiTop, pkTexture);
    v47 = (ActionViewInfo *)PgWinSpr::CreateWin(uiLeft - v11, uiTop - v10, v46, (PgWin *)&v2->vfptr, 0, 0);
    v48 = *(_DWORD *)&v47->nIndex;
    pkInfo = v47;
    (*(void (__thiscall **)(ActionViewInfo *, _DWORD))(v48 + 240))(v47, 0);
    v49 = Font::Get(MAIN_MENU);
    v50 = (*(int (**)(void))(*(_DWORD *)&pkInfo->nIndex + 148))();
    v51 = (*(int (**)(void))(*(_DWORD *)&pkInfo->nIndex + 144))();
    v52 = PgWinText::CreateWin(uiLeft - v11, uiTop - v10, v51, v50, v49, (PgWin *)&v2->vfptr, 0, 0);
    v53 = v52->vfptr;
    pkTextWin = v52;
    v53[122].__vecDelDtor((NiRefObject *)v52, 5u);
    ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
    pkBut = (PgWinBut *)&pkTextWin->vfptr[118];
    v54 = TextData::Get(0x8EB3E6F0);
    ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkBut->vfptr)(pkTextWin, v54);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v55 = Folder::Menu();
    sprintf(acFileName, "%s\\Icon\\Action000.dds", v55);
    pkBut = (PgWinBut *)PgUtil::LoadSourceTexture(acFileName);
    v56 = 0;
    v93 = &rectDefault[0].top;
    do
    {
      RecordNo = v56 + 1;
      sprintf(acShapeName, "IconSlot%03d", v56 + 1);
      v57 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, pkTexture);
      PgWinSpr::CreateWin(uiLeft - v11, uiTop - v10, v57, (PgWin *)&v2->vfptr, 0, 0);
      v58 = v93;
      v59 = uiLeft;
      *v93 = uiTop;
      v56 = RecordNo;
      *(v58 - 1) = v59;
      v93 = v58 + 4;
    }
    while ( v56 < 18 );
    i = 0;
    v93 = &rectEmotion[0].top;
    do
    {
      sprintf(acShapeName, "IconSlot%03d", i + 19);
      v60 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, pkTexture);
      PgWinSpr::CreateWin(uiLeft - v11, uiTop - v10, v60, (PgWin *)&v2->vfptr, 0, 0);
      v61 = v93;
      v62 = uiLeft;
      *v93 = uiTop;
      v63 = i + 1;
      *(v61 - 1) = v62;
      i = v63;
      v93 = v61 + 4;
    }
    while ( v63 < 18 );
    v64 = *(_DWORD *)(ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable + 56);
    if ( v64 )
      v93 = *(int **)(v64 + 40);
    else
      v93 = 0;
    i = 0;
    pkTextWin = 0;
    RecordNo = 0;
    if ( (unsigned int)v93 > 0 )
    {
      v88 = rectEmotion;
      v90 = rectDefault;
      pkTexture = (NiSourceTexture *)v2->m_apkIconEmotion;
      v65 = (int)v2->m_apkIconDefaultAction;
      do
      {
        v66 = CDataReader::GetRecord(
                (CDataReader *)(ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable + 4),
                RecordNo);
        pkInfo = (ActionViewInfo *)v66;
        if ( !v66 )
          break;
        v67 = *(_WORD *)(v66 + 65);
        if ( v67 == -1 )
        {
          v68 = *(_DWORD *)(v66 + 101);
          if ( v68 )
          {
            if ( v68 == 1 )
            {
              v72 = (NiRefObjectVtbl *)ActionIconWin::CreateWin(
                                         v88->left - v11 + 1,
                                         v88->top - iOffY + 1,
                                         (unsigned int)pkTextWin,
                                         (PgWin *)&v2->vfptr,
                                         v87);
              v73 = pkTexture;
              v74 = pkInfo;
              pkTexture->vfptr = v72;
              v72[97].__vecDelDtor = (void *(__thiscall *)(NiRefObject *, unsigned int))1;
              (*((void (__stdcall **)(_DWORD, _DWORD, _DWORD, _DWORD))v73->vfptr->__vecDelDtor + 146))(
                pkBut,
                v74->nIconNum,
                32,
                32);
              (*((void (__stdcall **)(_DWORD))pkTexture->vfptr->__vecDelDtor + 129))(4);
              (*((void (__stdcall **)(_DWORD))pkTexture->vfptr->__vecDelDtor + 140))(5);
              v75 = pkTexture;
              pkTexture->vfptr[76].__vecDelDtor = (void *(__thiscall *)(NiRefObject *, unsigned int))1;
              v75->vfptr[68].__vecDelDtor = (void *(__thiscall *)(NiRefObject *, unsigned int))g_pkToolTipWin;
              (*((void (__stdcall **)(_DWORD))v75->vfptr->__vecDelDtor + 60))(1);
              (*((void (__stdcall **)(_DWORD))pkTexture->vfptr->__vecDelDtor + 64))(1);
              v76 = pkInfo;
              v77 = pkTextWin;
              pkTexture->vfptr[98].__vecDelDtor = (void *(__thiscall *)(NiRefObject *, unsigned int))pkInfo;
              if ( !ShortCutMgr::SyncShortCutAndActionWinKey(&g_kShortCutMgr, v76->nIndex, (int)v77) )
                goto LABEL_5;
              pkTextWin = (PgWinText *)((char *)pkTextWin + 1);
              pkTexture = (NiSourceTexture *)((char *)pkTexture + 4);
              ++v88;
            }
          }
          else
          {
            switch ( User::GetMainCharClass(&g_kUser) )
            {
              case 0x1A:
              case 0x1B:
                if ( !strcmp(pkInfo->InxName, "SPSton") )
                  goto LABEL_47;
                break;
              default:
                break;
            }
            v69 = ActionIconWin::CreateWin(v90->left - v11 + 1, v90->top - iOffY + 1, i, (PgWin *)&v2->vfptr, v87);
            *(_DWORD *)v65 = v69;
            v69->m_uiInvType = 0;
            (*(void (__stdcall **)(PgWinBut *, _DWORD, signed int, signed int))(**(_DWORD **)v65 + 584))(
              pkBut,
              pkInfo->nIconNum,
              32,
              32);
            (*(void (__stdcall **)(signed int))(**(_DWORD **)v65 + 516))(2);
            (*(void (__stdcall **)(signed int))(**(_DWORD **)v65 + 560))(3);
            *(_DWORD *)(*(_DWORD *)v65 + 304) = 1;
            *(_DWORD *)(*(_DWORD *)v65 + 272) = g_pkToolTipWin;
            (*(void (__stdcall **)(signed int))(**(_DWORD **)v65 + 240))(1);
            (*(void (__stdcall **)(signed int))(**(_DWORD **)v65 + 256))(1);
            v70 = pkInfo;
            v71 = i;
            *(_DWORD *)(*(_DWORD *)v65 + 392) = pkInfo;
            if ( !ShortCutMgr::SyncShortCutAndActionWinKey(&g_kShortCutMgr, v70->nIndex, v71) )
            {
              v6 = spNode.m_pObject;
              v105 = -1;
              if ( !spNode.m_pObject )
                return 0;
              v7 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
              goto LABEL_7;
            }
            ++i;
            v65 += 4;
            ++v90;
          }
        }
        else
        {
          v78 = 0;
          if ( (signed int)pkTextWin > 0 )
          {
            v89 = v2->m_apkIconEmotion;
            do
            {
              if ( !*v89 )
                break;
              v79 = &(*v89)->m_pkActionViewInfo->nIndex;
              if ( !v79 )
                break;
              if ( v67 == (unsigned __int8)*v79 )
              {
                v2->m_apkIconEmotion[v78]->m_pkLinkedAction = pkInfo;
                break;
              }
              ++v89;
              ++v78;
            }
            while ( v78 < (signed int)pkTextWin );
          }
        }
LABEL_47:
        ++RecordNo;
      }
      while ( RecordNo < (unsigned int)v93 );
    }
    v80 = PremiumActionWin::CreateWin(v87);
    v81 = v80;
    v2->m_pkPremiumActionWin = v80;
    if ( v80 )
    {
      v82 = (NiRTTI *)((int (__thiscall *)(PremiumActionWin *))v80->vfptr[1].__vecDelDtor)(v80);
      if ( v82 )
      {
        while ( v82 != &PgWin::m_RTTI )
        {
          v82 = v82->m_pkBaseRTTI;
          if ( !v82 )
            goto LABEL_56;
        }
        ((void (__thiscall *)(ActionWin *, PremiumActionWin *, _DWORD))v2->vfptr[29].__vecDelDtor)(v2, v81, 0);
        NiAVObject::UpdateProperties((NiAVObject *)&v2->vfptr);
        NiAVObject::Update((NiAVObject *)&v2->vfptr, 0.0, 1);
      }
    }
LABEL_56:
    ((void (__thiscall *)(ActionWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.0,
      0.5);
    v83 = spNode.m_pObject;
    v105 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v83 )
      v83->vfptr->__vecDelDtor((NiRefObject *)v83, 1u);
    result = 1;
  }
  else
  {
    v105 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;

//----- (004D3AF0) --------------------------------------------------------
void __thiscall ActionWin::OnDefaultAction(ActionWin *this, unsigned int lParam)
{
  ActionWin *v2; // edi@1
  ActionIconWin *v3; // eax@3
  ActionViewInfo *v4; // edi@4
  unsigned int v5; // esi@5
  const char *v6; // eax@7
  void *v7; // eax@10
  ActionWin *v8; // [sp+Ch] [bp-130h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strTargetName; // [sp+10h] [bp-12Ch]@5
  char szCommand[256]; // [sp+2Ch] [bp-110h]@12
  int v11; // [sp+138h] [bp-4h]@5

  v2 = this;
  v8 = this;
  if ( !Char::CheckActState(g_pkMainChar, 500000) && !g_pkMainChar->m_bWillDead )
  {
    v3 = v2->m_apkIconDefaultAction[lParam];
    if ( v3 )
    {
      v4 = v3->m_pkActionViewInfo;
      if ( v4 )
      {
        v5 = g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1];
        strTargetName._Myres = 15;
        strTargetName._Mysize = 0;
        strTargetName._Bx._Buf[0] = 0;
        v11 = 0;
        if ( !v5 )
          goto LABEL_15;
        if ( (*(int (__thiscall **)(unsigned int))(*(_DWORD *)v5 + 84))(v5) )
        {
          v6 = (const char *)(*(int (__thiscall **)(unsigned int))(*(_DWORD *)v5 + 84))(v5);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator=(&strTargetName, v6);
        }
        if ( !strcmp(v4->InxName, "attack") )
        {
          GameFrameWork::Stick((GameFrameWork *)v8->m_pkFrameWork, 0, 0);
          KeyboardMoveProcess::SetAutoRun((KeyboardMoveProcess *)&v8->m_pkFrameWork[1], 0);
        }
        v7 = strTargetName._Bx._Ptr;
        if ( strTargetName._Myres < 0x10 )
LABEL_15:
          v7 = &strTargetName;
        sprintf(szCommand, "/%s %s", v4->InxName, v7);
        GameFrameWork::DecodingChat((GameFrameWork *)v8->m_pkFrameWork, szCommand, 0, 0);
        std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&strTargetName);
      }
    }
  }
}

//----- (004D3C90) --------------------------------------------------------
void __thiscall PremiumActionWin::DropOnLClickInv(PremiumActionWin *this, unsigned int uiInvIndex)
{
  PremiumActionWin *v2; // ebx@1
  PgFrameWork *v3; // eax@2
  ItemIcon *v4; // ecx@3
  Item *v5; // eax@4
  ItemInfo *v6; // esi@5
  ItemUseTask *v7; // esi@7

  v2 = this;
  if ( uiInvIndex < 0xC0 )
  {
    v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v3 )
    {
      v4 = (ItemIcon *)*((_DWORD *)v3[19].m_BackFrameID + uiInvIndex + 87);
      if ( v4 )
      {
        v5 = ItemIcon::GetItem(v4);
        if ( v5 )
        {
          v6 = v5->m_pkInfo;
          if ( v6 )
          {
            SoundMgr::PlayItemPutSound(v6->ID);
            if ( v6->Type == 1 )
            {
              v7 = ISingletonTask<ItemUseTask>::Run();
              ItemUseTask::SetInventoryIndex(v7, uiInvIndex);
              v7->vfptr->SetMsgHooker(&v7->vfptr, v2->m_pkFrameWork);
            }
          }
        }
      }
    }
  }
}

//----- (004D3D20) --------------------------------------------------------
void __thiscall ActionWin::OnDefaultSlot_RClick(ActionWin *this, unsigned int lParam)
{
  ActionWin::OnDefaultAction(this, lParam);
}

//----- (004D3D30) --------------------------------------------------------
bool __thiscall PremiumActionWin::DropOnInv(PremiumActionWin *this, DropContents *pkContents, unsigned int uiReceiverInvIndex)
{
  DropContents *v3; // esi@1
  PremiumActionWin *v4; // edi@1
  _WORD *v5; // eax@3
  unsigned int v6; // eax@5
  GameFrameWork *v7; // ecx@6

  v3 = pkContents;
  v4 = this;
  if ( pkContents->m_eSenderType == 21 )
  {
    if ( pkContents->m_eType == CT_ITEM )
    {
      v5 = pkContents->m_apvParam[0];
      if ( v5 )
        SoundMgr::PlayItemPutSound(v5[4]);
    }
    v6 = v3->m_uiSenderIndex;
    if ( v6 != uiReceiverInvIndex )
    {
      LOWORD(pkContents) = uiReceiverInvIndex & 0x3FF | 0x3C00;
      v7 = (GameFrameWork *)v4->m_pkFrameWork;
      LOWORD(uiReceiverInvIndex) = v6 & 0x3FF | 0x3C00;
      GameFrameWork::NcItemRelocReq(v7, (ITEM_INVEN *)&uiReceiverInvIndex, (ITEM_INVEN *)&pkContents);
    }
  }
  return 0;
}

//----- (004D3DA0) --------------------------------------------------------
void __thiscall ActionWin::OnCommand(ActionWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 1u:
      GameFrameWork::CloseActionWin((GameFrameWork *)this->m_pkFrameWork);
      break;
    case 2u:
      ActionWin::OnDefaultSlot_LClick(this, lParam);
      break;
    case 3u:
      ActionWin::OnDefaultAction(this, lParam);
      break;
    case 4u:
      ActionWin::OnEmotionSlot_LClick(this, lParam);
      break;
    case 5u:
      ActionWin::OnEmotionAction(this, lParam);
      break;
    case 6u:
      ActionWin::OnPremiumAction(this);
      break;
    case 7u:
      ActionWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (004D3E30) --------------------------------------------------------
bool __thiscall PremiumActionIcon::EatDropInstance(PremiumActionIcon *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  PremiumActionIcon *v4; // ebx@1
  bool result; // al@2
  DropContents *v6; // esi@3
  DropContents::SenderType v7; // edi@5
  PremiumActionWin *v8; // eax@5

  v4 = this;
  if ( *pkDrop )
  {
    v6 = (DropContents *)(*pkDrop)->m_pkContents;
    if ( v6 )
    {
      v7 = v6->m_eSenderType;
      v8 = (PremiumActionWin *)PgWin::GetParentWin((PgWin *)&this->vfptr);
      if ( v7 && v7 != 21 )
        result = 0;
      else
        result = PremiumActionWin::DropOnInv(v8, v6, v4->m_uiInvIndex);
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (004D3E90) --------------------------------------------------------
void __thiscall GameFrameWork::GetGroundPosCam(GameFrameWork *this, NiPoint3 *kGroundPos)
{
  _BYTE v2[12]; // ST0C_12@1
  _BYTE v3[12]; // ST00_12@1

  *(float *)v2 = this->m_kCameraRayDir.x;
  *(_QWORD *)&v2[4] = *(_QWORD *)&this->m_kCameraRayDir.y;
  *(float *)v3 = this->m_kCameraRayOrigin.x;
  *(_QWORD *)&v3[4] = *(_QWORD *)&this->m_kCameraRayOrigin.y;
  World::GetAdvGroundPos(&g_kWorld, *(NiPoint3 *)v3, *(NiPoint3 *)v2, kGroundPos, 0);
}

//----- (004D3EF0) --------------------------------------------------------
unsigned int __cdecl ITableBase<MHEmotion,MiniHouseEmotionTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<MHEmotion,MiniHouseEmotionTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C15C: using guessed type int ITableBase<MHEmotion,MiniHouseEmotionTab>::ms_pkTable;

//----- (004D3F10) --------------------------------------------------------
PremiumActionIcon *__thiscall PremiumActionIcon::`vector deleting destructor'(PremiumActionIcon *this, unsigned int a2)
{
  PremiumActionIcon *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&PremiumActionIcon::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PremiumActionIcon::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 982A18: using guessed type void (__thiscall *PremiumActionIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 982A34: using guessed type int (__thiscall *PremiumActionIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (004D3F50) --------------------------------------------------------
ActionInvTabButWin *__thiscall ActionInvTabButWin::`scalar deleting destructor'(ActionInvTabButWin *this, unsigned int a2)
{
  ActionInvTabButWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ActionInvTabButWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ActionInvTabButWin::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 982CA0: using guessed type void (__thiscall *ActionInvTabButWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 982CBC: using guessed type int (__thiscall *ActionInvTabButWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004D3F90) --------------------------------------------------------
void __thiscall PgWinBut::DoAction(PgWinBut *this)
{
  PgWinBut *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiCmdMsgParam);
}

//----- (004D3FC0) --------------------------------------------------------
ActionIconWin *__thiscall ActionIconWin::`scalar deleting destructor'(ActionIconWin *this, unsigned int a2)
{
  ActionIconWin *v2; // esi@1

  v2 = this;
  ActionIconWin::~ActionIconWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (004D3FF0) --------------------------------------------------------
ActionWin *__thiscall ActionWin::`scalar deleting destructor'(ActionWin *this, unsigned int a2)
{
  ActionWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ActionWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ActionWin::`vftable'{for `IDirectMessenger'};
  this->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  this->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 98317C: using guessed type void (__thiscall *ActionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98319C: using guessed type int (__thiscall *ActionWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004D4040) --------------------------------------------------------
PremiumActionWin *__thiscall PremiumActionWin::`scalar deleting destructor'(PremiumActionWin *this, unsigned int a2)
{
  PremiumActionWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&PremiumActionWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PremiumActionWin::`vftable'{for `IDirectMessenger'};
  this->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  this->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9833C4: using guessed type void (__thiscall *PremiumActionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9833E4: using guessed type int (__thiscall *PremiumActionWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004D4090) --------------------------------------------------------
MHEmotion *__cdecl MiniHouseEmotionTab::GetNonMenuEmotion(unsigned __int16 MHEmotionID, char byActionViewID)
{
  unsigned int v2; // esi@1
  MHEmotion *result; // eax@2

  v2 = 0;
  if ( ITableBase<MHEmotion,MiniHouseEmotionTab>::GetTotal() )
  {
    while ( 1 )
    {
      result = (MHEmotion *)CDataReader::GetRecord(
                              (CDataReader *)(ITableBase<MHEmotion,MiniHouseEmotionTab>::ms_pkTable + 4),
                              v2);
      if ( result->MHEmotionID == MHEmotionID && result->ActionViewInfo == byActionViewID )
        break;
      if ( ++v2 >= ITableBase<MHEmotion,MiniHouseEmotionTab>::GetTotal() )
        goto LABEL_5;
    }
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}
// A8C15C: using guessed type int ITableBase<MHEmotion,MiniHouseEmotionTab>::ms_pkTable;

//----- (004D40E0) --------------------------------------------------------
void __thiscall NiAVObject::DetachProperty(NiAVObject *this, NiProperty *pkProperty)
{
  NiAVObject *v2; // esi@1
  NiProperty *v3; // edi@1
  PgWin *v4; // esi@4
  NiPointer<PgWin> result; // [sp+10h] [bp-10h]@3
  int v6; // [sp+1Ch] [bp-4h]@3

  v2 = this;
  v3 = pkProperty;
  if ( pkProperty )
    InterlockedIncrement((volatile LONG *)&pkProperty->m_uiRefCount);
  v6 = 0;
  NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::Remove(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *)&v2->m_kPropertyList,
    &result,
    (NiPointer<PgWin> *)&pkProperty);
  if ( result.m_pObject )
  {
    v4 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
  }
  v6 = -1;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  }
}

//----- (004D4190) --------------------------------------------------------
void __thiscall PgFadeTextGeometry::SetLifeTime(PgFadeTextGeometry *this, float fLifeTime)
{
  this->m_fLifeTime = fLifeTime;
  this->m_fAlphaBlendValue = 1.0;
  SpScreenText::SetAlpha((SpScreenText *)&this->vfptr, 1.0);
}

//----- (004D41C0) --------------------------------------------------------
void __thiscall PgFadeTextGeometry::UpdateDownwardPass(PgFadeTextGeometry *this, float fTime, bool bUpdateControllers)
{
  PgFadeTextGeometry *v3; // esi@1
  double v4; // st7@2
  float fSin; // ST0C_4@5
  float v6; // ST0C_4@8
  float v7; // ST0C_4@8
  float v8; // ST0C_4@9

  v3 = this;
  if ( this->m_fLifeTime < 1000000.0 )
  {
    v4 = 0.0;
    if ( this->m_fLifeTime <= 0.0 )
    {
      if ( this->m_fAlphaBlendValue > 0.0 )
      {
        fSin = this->m_fAlphaBlendValue - (Timer::ms_fDeltaTime + Timer::ms_fDeltaTime);
        this->m_fAlphaBlendValue = fSin;
        if ( fSin <= 0.0 )
          this->m_fAlphaBlendValue = 0.0;
        if ( this->m_fAlphaBlendValue > 0.0 )
        {
          v6 = this->m_fAlphaBlendValue * NI_HALF_PI;
          v7 = sin(v6);
          v4 = v7;
        }
        v8 = v4;
        SpScreenText::SetAlpha((SpScreenText *)&this->vfptr, v8);
      }
    }
    else
    {
      this->m_fLifeTime = this->m_fLifeTime - Timer::ms_fDeltaTime;
    }
  }
  SpScreenText::UpdateDownwardPass((SpScreenText *)&v3->vfptr, fTime, bUpdateControllers);
}
// A8B980: using guessed type float Timer::ms_fDeltaTime;
// B622D0: using guessed type const float NI_HALF_PI;

//----- (004D42A0) --------------------------------------------------------
void __thiscall PgFadeTextGeometry::CopyFrom(PgFadeTextGeometry *this, PgFadeTextGeometry *pkSrc)
{
  PgFadeTextGeometry *v2; // esi@1
  NiRefObjectVtbl *v3; // ebx@2
  int v4; // eax@2
  NiRefObjectVtbl *v5; // edx@2
  void *(__thiscall *v6)(NiRefObject *, unsigned int); // edx@2
  D3DXCOLOR Color; // [sp+18h] [bp-1Ch]@2
  NiColor kColor; // [sp+28h] [bp-Ch]@2

  v2 = this;
  if ( pkSrc )
  {
    v3 = this->vfptr;
    this->m_fLifeTime = pkSrc->m_fLifeTime;
    this->m_fAlphaBlendValue = pkSrc->m_fAlphaBlendValue;
    v4 = ((int (__thiscall *)(_DWORD))pkSrc->vfptr[38].__vecDelDtor)(pkSrc);
    v3[37].__vecDelDtor((NiRefObject *)v2, v4);
    SpScreenText::GetColor((SpScreenText *)&pkSrc->vfptr, &kColor);
    v5 = v2->vfptr;
    Color.r = kColor.r;
    v6 = v5[44].__vecDelDtor;
    Color.g = kColor.g;
    Color.b = kColor.b;
    v6((NiRefObject *)&v2->vfptr, (unsigned int)&Color);
    SpScreenText::SetAlpha((SpScreenText *)&v2->vfptr, v2->m_fAlphaBlendValue);
  }
}

//----- (004D4330) --------------------------------------------------------
void __thiscall AnnounceWin::UpdateMeWin(AnnounceWin *this, float fCurTime)
{
  if ( 1000000.0 != this->m_kTimerInterval.m_fCheckTime && !(this->m_uFlags & 1) )
  {
    if ( CNSTimer_Interval::IsRun_GetCount(&this->m_kTimerInterval, fCurTime) )
      AnnounceWin::m_bNoticing = 0;
  }
}
// A8CB24: using guessed type bool AnnounceWin::m_bNoticing;

//----- (004D4370) --------------------------------------------------------
void __thiscall AnnounceWin::SetFont(AnnounceWin *this, PgFont *pkFont)
{
  char *v2; // esi@1
  signed int v3; // edi@1

  v2 = (char *)this->m_aspTextGeom;
  v3 = 3;
  do
  {
    if ( *(_DWORD *)v2 )
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 144))(pkFont);
    v2 += 4;
    --v3;
  }
  while ( v3 );
}

//----- (004D43B0) --------------------------------------------------------
void __thiscall PgFadeTextGeometry::PgFadeTextGeometry(PgFadeTextGeometry *this, PgFont *pkFont)
{
  PgFadeTextGeometry *v2; // esi@1
  NiMaterialProperty *v3; // edi@1

  v2 = this;
  PgTextGeometry::PgTextGeometry((PgTextGeometry *)&this->vfptr, pkFont);
  v2->vfptr = (NiRefObjectVtbl *)&PgFadeTextGeometry::`vftable';
  v2->m_spMaterialProp.m_pObject = 0;
  v2->m_fLifeTime = 1000000.0;
  v2->m_fAlphaBlendValue = 1.0;
  v3 = v2->m_spMaterialProp.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
    {
      if ( v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
    v2->m_spMaterialProp.m_pObject = 0;
  }
}
// 983634: using guessed type int (__thiscall *PgFadeTextGeometry::`vftable')(void *p, char);

//----- (004D4460) --------------------------------------------------------
void __thiscall AnnounceWin::~AnnounceWin(AnnounceWin *this)
{
  AnnounceWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&AnnounceWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&AnnounceWin::`vftable'{for `IDirectMessenger'};
  `eh vector destructor iterator'(
    this->m_aspTextGeom,
    4u,
    3,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9836EC: using guessed type void (__thiscall *AnnounceWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98370C: using guessed type int (__thiscall *AnnounceWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004D44E0) --------------------------------------------------------
void __thiscall AnnounceWin::AnnounceWin(AnnounceWin *this)
{
  AnnounceWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&AnnounceWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&AnnounceWin::`vftable'{for `IDirectMessenger'};
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kTimerInterval);
  `eh vector constructor iterator'(
    v1->m_aspTextGeom,
    4u,
    3,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  *(_WORD *)&v1->m_bNotice = 0;
}
// 9836EC: using guessed type void (__thiscall *AnnounceWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98370C: using guessed type int (__thiscall *AnnounceWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004D4570) --------------------------------------------------------
char __thiscall AnnounceWin::Create(AnnounceWin *this, PgFrameWork *pkFrameWork)
{
  AnnounceWin *v2; // edi@1
  PgFont *v4; // eax@3
  PgFont *v5; // ebx@3
  SpScreenText **v6; // esi@4
  PgFadeTextGeometry *v7; // eax@6
  int v8; // eax@7
  SpScreenText *v9; // ebx@9
  SpScreenText *v10; // eax@17
  SpScreenText *v11; // ebx@19
  char *v12; // eax@21
  SpScreenText *v13; // eax@25
  float v14; // edx@25
  float v15; // ST38_4@25
  float v16; // edx@25
  SpScreenText *v17; // eax@25
  void *(__thiscall *v18)(NiRefObject *, unsigned int); // edx@25
  char v19; // [sp+14h] [bp-74h]@20
  char v20; // [sp+18h] [bp-70h]@20
  char v21; // [sp+1Ch] [bp-6Ch]@20
  char v22; // [sp+20h] [bp-68h]@20
  D3DXCOLOR result; // [sp+40h] [bp-48h]@22
  tagSIZE kSize; // [sp+50h] [bp-38h]@4
  PgFont *pkFont; // [sp+58h] [bp-30h]@3
  int v26; // [sp+5Ch] [bp-2Ch]@4
  int iLineYPos; // [sp+60h] [bp-28h]@4
  PgFadeTextGeometry *v28; // [sp+64h] [bp-24h]@6
  tagRECT kDrawRect; // [sp+68h] [bp-20h]@4
  int v30; // [sp+84h] [bp-4h]@6

  v2 = this;
  if ( !PgWinFrame::Create((PgWinFrame *)&this->vfptr, 0, 0, 0, pkFrameWork, "AnnounceWin", 0) )
    return 0;
  v4 = Font::Get(MENU);
  v5 = v4;
  pkFont = v4;
  if ( !v4 )
    return 0;
  SelectObject(v4->m_kFontRenderStuff.hDC, v4->m_hFont);
  PgFont::GetTextSize(v5, "W", 1, &kSize);
  iLineYPos = -2;
  SetRect(&kDrawRect, 0, 0, 500, kSize.cy);
  v6 = (SpScreenText **)v2->m_aspTextGeom;
  v26 = 3;
  while ( 1 )
  {
    v7 = (PgFadeTextGeometry *)operator new(0x158u);
    v28 = v7;
    v30 = 0;
    if ( v7 )
    {
      PgFadeTextGeometry::PgFadeTextGeometry(v7, v5);
      v28 = (PgFadeTextGeometry *)v8;
    }
    else
    {
      v28 = 0;
      v8 = 0;
    }
    v9 = *v6;
    v30 = -1;
    if ( v9 != (SpScreenText *)v8 )
    {
      if ( v9 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
          v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
        v8 = (int)v28;
      }
      *v6 = (SpScreenText *)v8;
      if ( v8 )
        InterlockedIncrement((volatile LONG *)(v8 + 4));
    }
    SpScreenText::SetShadowOffset(*v6, 1u);
    ((void (__stdcall *)(tagRECT *))(*v6)->vfptr[34].__vecDelDtor)(&kDrawRect);
    v10 = *v6;
    v10[1].vfptr = (NiRefObjectVtbl *)1;
    if ( v10->m_iAlignOption != 18 )
    {
      v10->m_iAlignOption = 18;
      v10->m_bInvalidate = 1;
    }
    v11 = *v6;
    if ( *(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable )
    {
      v12 = CDataReader::GetRecord(
              (CDataReader *)(*(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable + 4),
              0x32u);
      v22 = -1;
      if ( !v12 )
      {
        Color::GetDxColor(&result, -1, 0, -1, -1);
        goto LABEL_25;
      }
      v21 = v12[6];
      v20 = v12[5];
      v19 = v12[4];
    }
    else
    {
      v22 = -1;
      v21 = -1;
      v20 = ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable[0];
      v19 = -1;
    }
    Color::GetDxColor(&result, v19, v20, v21, v22);
LABEL_25:
    v11->vfptr[44].__vecDelDtor((NiRefObject *)v11, (unsigned int)&result);
    v13 = *v6;
    v14 = (*v6)->m_kLocal.m_Translate.y;
    v15 = (double)iLineYPos;
    v16 = (*v6)->m_kLocal.m_Translate.z;
    v13->m_kLocal.m_Translate.x = (*v6)->m_kLocal.m_Translate.x;
    v13->m_kLocal.m_Translate.y = v15;
    v13->m_kLocal.m_Translate.z = v16;
    v17 = *v6;
    v18 = v2->vfptr[29].__vecDelDtor;
    iLineYPos += kSize.cy + 2;
    ((void (__thiscall *)(AnnounceWin *, SpScreenText *, _DWORD))v18)(v2, v17, 0);
    ++v6;
    if ( !--v26 )
      break;
    v5 = pkFont;
  }
  NiAVObject::UpdateProperties((NiAVObject *)&v2->vfptr);
  v2->vfptr[38].__vecDelDtor((NiRefObject *)v2, 500u);
  v2->vfptr[39].__vecDelDtor((NiRefObject *)v2, 45u);
  ((void (__thiscall *)(AnnounceWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.2);
  v2->vfptr[60].__vecDelDtor((NiRefObject *)v2, 0);
  return 1;
}

//----- (004D4820) --------------------------------------------------------
void __userpurge AnnounceWin::AddText(AnnounceWin *this@<ecx>, int a2@<edi>, int a3@<esi>, char *pcText, D3DXCOLOR *TextColor, bool bSingleLine, float fLifeTime)
{
  AnnounceWin *v7; // esi@1
  char *v8; // edi@3
  signed int v9; // ebx@4
  signed int v10; // ebx@7
  int v11; // ecx@8
  PgFadeTextGeometry *v12; // ecx@10
  NiRefObjectVtbl **v13; // edi@12
  char *v14; // eax@14
  NiRefObjectVtbl *v15; // edx@15
  D3DXCOLOR *v16; // eax@15
  NiRefObjectVtbl **v17; // ecx@15
  PgFadeTextGeometry *v18; // ecx@19
  int v19; // [sp+10h] [bp-18h]@1
  int v20; // [sp+14h] [bp-14h]@1
  D3DXCOLOR result; // [sp+18h] [bp-10h]@10

  v20 = a3;
  v19 = a2;
  v7 = this;
  if ( 0.0 == fLifeTime )
    fLifeTime = 15.0;
  v8 = (char *)this->m_aspTextGeom;
  if ( bSingleLine )
  {
    v10 = 3;
    do
    {
      (*(void (__stdcall **)(void *))(**(_DWORD **)v8 + 148))(&unk_983626);
      v11 = *(_DWORD *)v8;
      *(float *)(v11 + 332) = -1.0;
      *(float *)(v11 + 336) = 1.0;
      SpScreenText::SetAlpha((SpScreenText *)v11, 1.0);
      v8 += 4;
      --v10;
    }
    while ( v10 );
  }
  else
  {
    v9 = 2;
    do
    {
      PgFadeTextGeometry::CopyFrom(*(PgFadeTextGeometry **)v8, *((PgFadeTextGeometry **)v8 + 1));
      v8 += 4;
      --v9;
    }
    while ( v9 );
  }
  if ( v7->m_bNotice )
  {
    ((void (__stdcall *)(D3DXCOLOR *, int, int, _DWORD, _DWORD))v7->m_aspTextGeom[2].m_pObject->vfptr[44].__vecDelDtor)(
      TextColor,
      v19,
      v20,
      LODWORD(result.r),
      LODWORD(result.g));
    ((void (__stdcall *)(char *))v7->m_aspTextGeom[2].m_pObject->vfptr[37].__vecDelDtor)(pcText);
    v12 = v7->m_aspTextGeom[2].m_pObject;
    v12->m_fLifeTime = fLifeTime;
    v12->m_fAlphaBlendValue = 1.0;
    SpScreenText::SetAlpha((SpScreenText *)&v12->vfptr, 1.0);
    CNSTimer_Interval::ReSet(&v7->m_kTimerInterval, Timer::ms_fCurTime);
    v7->m_kTimerInterval.m_fCheckTime = 30.0;
    AnnounceWin::m_bNoticing = 1;
    *(_WORD *)&v7->m_bNotice = 0;
    return;
  }
  if ( !v7->m_bRoar )
  {
    v17 = &v7->m_aspTextGeom[2].m_pObject->vfptr;
    v15 = *v17;
    v16 = TextColor;
    goto LABEL_19;
  }
  v13 = &v7->m_aspTextGeom[2].m_pObject->vfptr;
  if ( !*(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable )
  {
    Color::GetDxColor(&result, -1, ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable[0], -1, -1);
LABEL_17:
    v15 = *v13;
    v16 = &result;
    v17 = v13;
    goto LABEL_19;
  }
  v14 = CDataReader::GetRecord((CDataReader *)(*(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable + 4), 7u);
  if ( v14 )
  {
    Color::GetDxColor(&result, v14[4], v14[5], v14[6], -1);
    goto LABEL_17;
  }
  Color::GetDxColor(&result, -1, 0, -1, -1);
  v15 = *v13;
  v16 = &result;
  v17 = v13;
LABEL_19:
  ((void (__thiscall *)(NiRefObjectVtbl **, D3DXCOLOR *, int, int, _DWORD, _DWORD))v15[44].__vecDelDtor)(
    v17,
    v16,
    v19,
    v20,
    LODWORD(result.r),
    LODWORD(result.g));
  ((void (__stdcall *)(char *))v7->m_aspTextGeom[2].m_pObject->vfptr[37].__vecDelDtor)(pcText);
  v18 = v7->m_aspTextGeom[2].m_pObject;
  v18->m_fLifeTime = fLifeTime;
  v18->m_fAlphaBlendValue = 1.0;
  SpScreenText::SetAlpha((SpScreenText *)&v18->vfptr, 1.0);
  *(_WORD *)&v7->m_bNotice = 0;
}
// 4D4820: could not find valid save-restore pair for edi
// 4D4820: could not find valid save-restore pair for esi
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8CB24: using guessed type bool AnnounceWin::m_bNoticing;

//----- (004D4A10) --------------------------------------------------------
AnnounceWin *__cdecl AnnounceWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  AnnounceWin *v5; // eax@14
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x184u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    AnnounceWin::AnnounceWin((AnnounceWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( AnnounceWin::Create((AnnounceWin *)v3, pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (AnnounceWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( v3 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
    v5 = 0;
  }
  return v5;
}

//----- (004D4B40) --------------------------------------------------------
NiRTTI *NiNode::GetRTTI()
{
  return &NiNode::m_RTTI;
}

//----- (004D4B50) --------------------------------------------------------
char *__thiscall PgTextGeometry::GetText(PgTextGeometry *this)
{
  char *result; // eax@1

  result = this->m_kString.m_pcStr;
  if ( !result || !*result )
    result = 0;
  return result;
}

//----- (004D4B70) --------------------------------------------------------
unsigned int __thiscall PgTextGeometry::GetTextWidth(PgTextGeometry *this)
{
  return this->m_uiTextWidth;
}

//----- (004D4B80) --------------------------------------------------------
unsigned int __thiscall PgTextGeometry::GetTextHeight(PgTextGeometry *this)
{
  return this->m_uiTextHeight;
}

//----- (004D4B90) --------------------------------------------------------
void __thiscall PgTextGeometry::SetTextRect(PgTextGeometry *this, tagRECT *kRect)
{
  ((void (__stdcall *)(_DWORD))this->vfptr[34].__vecDelDtor)(kRect);
}

//----- (004D4BA0) --------------------------------------------------------
void __thiscall PgTextGeometry::SetColor(PgTextGeometry *this, D3DXCOLOR *kColor)
{
  PgTextGeometry *v2; // edi@1
  NiColor kNiColor; // [sp+Ch] [bp-Ch]@1

  kNiColor.r = kColor->r;
  kNiColor.g = kColor->g;
  v2 = this;
  kNiColor.b = kColor->b;
  SpScreenText::SetColor((SpScreenText *)&this->vfptr, &kNiColor);
  SpScreenText::SetAlpha((SpScreenText *)&v2->vfptr, kColor->a);
}

//----- (004D4BE0) --------------------------------------------------------
void __thiscall PgTextGeometry::SetResetTextAfterDraw(PgTextGeometry *this, bool b)
{
  this->m_bResetTextAfterDraw = b;
}

//----- (004D4BF0) --------------------------------------------------------
bool __thiscall PgTextGeometry::GetResetTextAfterDraw(PgTextGeometry *this)
{
  return this->m_bResetTextAfterDraw;
}

//----- (004D4C00) --------------------------------------------------------
void __thiscall PgTextGeometry::SetFont(PgTextGeometry *this, PgFont *pkFont)
{
  PgTextGeometry *v2; // ebx@1
  PgFont *v3; // esi@1

  v2 = this;
  SpScreenText::Init((SpScreenText *)&this->vfptr, (CSpFont *)&pkFont->vfptr);
  v3 = v2->m_spPgFont.m_pObject;
  if ( v3 != pkFont )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spPgFont.m_pObject = pkFont;
    if ( pkFont )
      InterlockedIncrement((volatile LONG *)&pkFont->m_uiRefCount);
  }
}

//----- (004D4C60) --------------------------------------------------------
PgFadeTextGeometry *__thiscall PgFadeTextGeometry::`scalar deleting destructor'(PgFadeTextGeometry *this, unsigned int a2)
{
  PgFadeTextGeometry *v2; // edi@1
  NiMaterialProperty *v3; // esi@1

  v2 = this;
  v3 = this->m_spMaterialProp.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  PgTextGeometry::~PgTextGeometry((PgTextGeometry *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (004D4CF0) --------------------------------------------------------
AnnounceWin *__thiscall AnnounceWin::`vector deleting destructor'(AnnounceWin *this, unsigned int a2)
{
  AnnounceWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&AnnounceWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&AnnounceWin::`vftable'{for `IDirectMessenger'};
  `eh vector destructor iterator'(
    this->m_aspTextGeom,
    4u,
    3,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9836EC: using guessed type void (__thiscall *AnnounceWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98370C: using guessed type int (__thiscall *AnnounceWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004D4D80) --------------------------------------------------------
void __stdcall __noreturn ATL::AtlThrowImpl(HRESULT hr)
{
  _CxxThrowException(&hr, &_TI1_AVCAtlException_ATL__);
}

//----- (004D4DA0) --------------------------------------------------------
void __thiscall ATL::CTime::CTime(ATL::CTime *this, int nYear, int nMonth, int nDay, int nHour, int nMin, int nSec, int nDST)
{
  ATL::CTime *v8; // esi@1
  __int64 v9; // rax@13
  tm atm; // [sp+4h] [bp-28h]@13

  v8 = this;
  if ( nYear < 1900 )
    ATL::AtlThrowImpl(-2147467259);
  if ( (unsigned int)(nMonth - 1) > 0xB )
    ATL::AtlThrowImpl(-2147467259);
  if ( (unsigned int)(nDay - 1) > 0x1E )
    ATL::AtlThrowImpl(-2147467259);
  if ( (unsigned int)nHour > 0x17 )
    ATL::AtlThrowImpl(-2147467259);
  if ( (unsigned int)nMin > 0x3B )
    ATL::AtlThrowImpl(-2147467259);
  if ( (unsigned int)nSec > 0x3B )
    ATL::AtlThrowImpl(-2147467259);
  atm.tm_sec = nSec;
  atm.tm_year = nYear - 1900;
  atm.tm_min = nMin;
  atm.tm_hour = nHour;
  atm.tm_mday = nDay;
  atm.tm_mon = nMonth - 1;
  atm.tm_isdst = nDST;
  v9 = _mktime64(&atm);
  v8->m_time = v9;
  if ( (HIDWORD(v9) & (unsigned int)v9) == -1 )
    ATL::AtlThrowImpl(-2147024809);
}

//----- (004D4E90) --------------------------------------------------------
void __thiscall AttendCheckBut::AttendCheckBut(AttendCheckBut *this)
{
  this->vfptr = (AttendCheckButVtbl *)&AttendCheckBut::`vftable';
  this->m_pkSpr = 0;
  this->m_pkBut = 0;
  this->m_pkTextMonth = 0;
  this->m_pkTextSlash = 0;
  this->m_pkTextDay = 0;
  this->m_eType = 0;
  this->m_apkBlinkEff = 0;
}
// 983CA0: using guessed type int (__thiscall *AttendCheckBut::`vftable')(void *p, char);

//----- (004D4EB0) --------------------------------------------------------
void __thiscall AttendCheckBut::SetTextColor(AttendCheckBut *this, D3DXCOLOR *kColor)
{
  AttendCheckBut *v2; // esi@1

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkTextMonth->vfptr[117].__vecDelDtor)(kColor);
  ((void (__stdcall *)(_DWORD))v2->m_pkTextSlash->vfptr[117].__vecDelDtor)(kColor);
  ((void (__stdcall *)(_DWORD))v2->m_pkTextDay->vfptr[117].__vecDelDtor)(kColor);
}

//----- (004D4EF0) --------------------------------------------------------
CSpFont *__stdcall AttendCheckWin::CreateFontA(Font::FontDefine *kFontDefine)
{
  PgFont *v2; // eax@1
  CSpFont *v3; // eax@2
  CSpFont *v4; // esi@2

  v2 = (PgFont *)operator new(0x184u);
  if ( v2 )
  {
    PgFont::PgFont(v2);
    v4 = v3;
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    CSpFont::Create(
      v4,
      (char *)kFontDefine->pFacename,
      kFontDefine->Height,
      kFontDefine->Width,
      kFontDefine->Weight,
      kFontDefine->Italic,
      kFontDefine->CharSet,
      kFontDefine->OutputPrecision,
      kFontDefine->Quality,
      kFontDefine->PitchAndFamily,
      kFontDefine->dwOutline,
      0x200u,
      5u);
  return v4;
}

//----- (004D4FA0) --------------------------------------------------------
void __thiscall AttendCheckWin::OnCloseWin(AttendCheckWin *this)
{
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
}

//----- (004D4FB0) --------------------------------------------------------
void __thiscall AttendCheckWin::SetDate(AttendCheckWin *this, tm *T, const int Cnt)
{
  AttendCheckWin *v3; // ebx@1
  int v4; // edx@1
  unsigned int v5; // ecx@1
  int v6; // eax@1
  PgWinText **v7; // esi@9
  int v8; // eax@10
  int v9; // ebx@10
  int v10; // eax@11
  NiRefObjectVtbl *v11; // edi@13
  char *v12; // eax@13
  NiRefObjectVtbl *v13; // edi@13
  char *v14; // eax@13
  signed int v15; // [sp+Ch] [bp-58h]@9
  ATL::CTime tmpTime; // [sp+10h] [bp-54h]@7
  tm ptm; // [sp+18h] [bp-4Ch]@10
  tm tb; // [sp+3Ch] [bp-28h]@7

  v3 = this;
  qmemcpy(&this->m_tEvtStartDay, T, sizeof(this->m_tEvtStartDay));
  v4 = this->m_tEvtStartDay.tm_mday;
  v5 = this->m_tEvtStartDay.tm_mon;
  v3->m_iEvtIndex = Cnt;
  v6 = v3->m_tEvtStartDay.tm_year + 1900;
  if ( v6 < 1900 )
    ATL::AtlThrowImpl(-2147467259);
  if ( v5 > 0xB )
    ATL::AtlThrowImpl(-2147467259);
  if ( (unsigned int)(v4 - 1) > 0x1E )
    ATL::AtlThrowImpl(-2147467259);
  tb.tm_mon = v5;
  tb.tm_sec = 0;
  tb.tm_min = 0;
  tb.tm_hour = 0;
  tb.tm_mday = v4;
  tb.tm_year = v6 - 1900;
  tb.tm_isdst = -1;
  tmpTime.m_time = _mktime64(&tb);
  if ( (HIDWORD(tmpTime.m_time) & tmpTime.m_time) == -1 )
    ATL::AtlThrowImpl(-2147024809);
  v7 = &v3->m_DayBut[0].m_pkTextDay;
  v15 = 28;
  do
  {
    v8 = _localtime64_s(&tb, &tmpTime.m_time);
    v9 = v8 == 0 ? tb.tm_mday : 0;
    if ( _localtime64_s(&ptm, &tmpTime.m_time) )
      v10 = 0;
    else
      v10 = ptm.tm_mon + 1;
    v11 = (*(v7 - 2))->vfptr;
    v12 = fs("%d", v10);
    v11[118].__vecDelDtor((NiRefObject *)*(v7 - 2), (unsigned int)v12);
    v13 = (*v7)->vfptr;
    v14 = fs("%d", v9);
    v13[118].__vecDelDtor((NiRefObject *)*v7, (unsigned int)v14);
    tmpTime.m_time += 86400i64;
    v7 += 8;
    --v15;
  }
  while ( v15 );
}

//----- (004D5110) --------------------------------------------------------
void __stdcall AttendCheckWin::OnClick(const unsigned int uiBtnIndex)
{
  GameFrameWork *v2; // ebx@1
  int v3; // esi@2
  int *v4; // eax@4
  int v5; // eax@5
  int v6; // ecx@6

  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    v3 = ITableBase<AttendReward,AttendRewardTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, const unsigned int))(*(_DWORD *)ITableBase<AttendReward,AttendRewardTab>::ms_pkTable
                                                                         + 16))(
                            ITableBase<AttendReward,AttendRewardTab>::ms_pkTable,
                            uiBtnIndex) )
    {
      if ( (unsigned __int16)uiBtnIndex <= *(_WORD *)(v3 + 200) )
      {
        v4 = (int *)(*(_DWORD *)(v3 + 196) + 4 * (unsigned __int16)uiBtnIndex);
        if ( *v4 )
        {
          v5 = *v4;
          if ( v5 )
          {
            v6 = *(_BYTE *)(v5 + 5);
            if ( (unsigned int)(7 * v6 - 1) <= 0x1B )
              GameFrameWork::NcCharEventAttendRewardReq(v2, uiBtnIndex, 7 * v6 - 1);
          }
        }
      }
    }
  }
}
// A8C28C: using guessed type int ITableBase<AttendReward,AttendRewardTab>::ms_pkTable;

//----- (004D5190) --------------------------------------------------------
void __thiscall AttendCheckWin::OnRewardEffect(AttendCheckWin *this)
{
  AttendCheckWin *v1; // esi@1

  v1 = this;
  if ( this->m_apkEffect )
  {
    SoundMgr::PlayInterfaceSound(&g_kSoundMgr, Dice_fanfare);
    SpEffect::Start(v1->m_apkEffect, v1->m_pRunEffect.m_pObject);
  }
}

//----- (004D51C0) --------------------------------------------------------
void __thiscall AttendCheckBut::Create(AttendCheckBut *this, int iOffX, int iOffY, PgWin *pkParent, NiSourceTexture *pkTexture)
{
  AttendCheckBut *v5; // esi@1
  NiTexturePalette *v6; // ebx@1
  const char *v7; // eax@3
  NiNode *v8; // eax@3
  NiNode *v9; // esi@7
  bool v10; // zf@8
  PgSprData *v11; // ebx@9
  PgWin *v12; // edi@11
  PgSprData *v13; // ST1C_4@11
  int v14; // ebx@11
  NiPointer<PgSprData::PgHitTester> *v15; // ecx@11
  PgWin *v16; // ST20_4@11
  PgFont *v17; // eax@11
  PgWinText *v18; // eax@11
  PgSprData::PgHitTester *v19; // eax@11
  PgFont *v20; // eax@11
  PgWinText *v21; // eax@11
  PgSprData::PgHitTester *v22; // eax@11
  PgFont *v23; // eax@11
  PgWinText *v24; // eax@11
  int iLeft; // [sp+10h] [bp-18h]@9
  int iTop; // [sp+14h] [bp-14h]@9
  NiPointer<NiNode> spNode; // [sp+18h] [bp-10h]@1
  int v28; // [sp+24h] [bp-4h]@1
  int iOffYa; // [sp+34h] [bp+Ch]@11
  int iOffYb; // [sp+34h] [bp+Ch]@11
  PgWin *pkParenta; // [sp+38h] [bp+10h]@11
  PgWin *pkParentb; // [sp+38h] [bp+10h]@11
  PgWin *pkParentc; // [sp+38h] [bp+10h]@11
  NiSourceTexture *pkTexturea; // [sp+3Ch] [bp+14h]@11

  v5 = this;
  spNode.m_pObject = 0;
  v6 = pTexturePalette;
  v28 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v7 = Folder::Merge(&Folder::m_acMenu, "Game\\AttendStamp.nif");
  PgUtil::LoadNodeNifFile(v7, &spNode, v6);
  v8 = spNode.m_pObject;
  if ( spNode.m_pObject )
  {
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BaseStamp", &iLeft, &iTop, pkTexture);
    if ( PgSprData::Add(v11, (NiAVObject *)&spNode.m_pObject->vfptr, "SuccessStamp") != 1 )
      PgSprData::Add(v11, (NiAVObject *)&spNode.m_pObject->vfptr, "SuccessStamp00");
    PgSprData::Add(v11, (NiAVObject *)&spNode.m_pObject->vfptr, "FailStamp");
    v12 = pkParent;
    v13 = v11;
    v14 = iOffY;
    v5->m_pkSpr = PgWinSpr::CreateWin(iOffX, iOffY, v13, pkParent, 0, 0);
    v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Month", &iLeft, &iTop, pkTexture)->m_akHitTester.m_pBase;
    v16 = pkParent;
    pkParenta = (PgWin *)v15->m_pObject->m_uiHeight;
    iOffYa = v15->m_pObject->m_uiWidth;
    v17 = Font::Get(BOLD);
    v18 = PgWinText::CreateWin(iOffX + iLeft, v14 + iTop, iOffYa, (unsigned int)pkParenta, v17, v16, 0, 0);
    v5->m_pkTextMonth = v18;
    v18->vfptr[117].__vecDelDtor((NiRefObject *)v18, (unsigned int)&Color::m_kDxWhiteColor);
    ((void (__stdcall *)(signed int))v5->m_pkTextMonth->vfptr[122].__vecDelDtor)(1);
    v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Slash", &iLeft, &iTop, pkTexture)->m_akHitTester.m_pBase->m_pObject;
    pkParentb = (PgWin *)v19->m_uiHeight;
    iOffYb = v19->m_uiWidth;
    v20 = Font::Get(BOLD);
    v21 = PgWinText::CreateWin(iOffX + iLeft, v14 + iTop, iOffYb, (unsigned int)pkParentb, v20, v12, 0, 0);
    v5->m_pkTextSlash = v21;
    v21->vfptr[117].__vecDelDtor((NiRefObject *)v21, (unsigned int)&Color::m_kDxWhiteColor);
    ((void (__stdcall *)(const char *))v5->m_pkTextSlash->vfptr[118].__vecDelDtor)("/");
    v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, off_983ABC, &iLeft, &iTop, pkTexture)->m_akHitTester.m_pBase->m_pObject;
    pkTexturea = (NiSourceTexture *)v22->m_uiHeight;
    pkParentc = (PgWin *)v22->m_uiWidth;
    v23 = Font::Get(BOLD);
    v24 = PgWinText::CreateWin(
            iOffX + iLeft,
            v14 + iTop,
            (unsigned int)pkParentc,
            (unsigned int)pkTexturea,
            v23,
            v12,
            0,
            0);
    v5->m_pkTextDay = v24;
    v24->vfptr[117].__vecDelDtor((NiRefObject *)v24, (unsigned int)&Color::m_kDxWhiteColor);
    v5->m_pkTextDay->vfptr[122].__vecDelDtor((NiRefObject *)v5->m_pkTextDay, 1u);
    v28 = -1;
    if ( spNode.m_pObject )
    {
      v9 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        v10 = v9 == 0;
LABEL_14:
        if ( !v10 )
          v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
        return;
      }
    }
  }
  else
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("Game\\AttendStamp.nif load fail", "LoadFail", 0);
      v8 = spNode.m_pObject;
    }
    v28 = -1;
    if ( v8 )
    {
      v9 = v8;
      if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      {
        v10 = v9 == 0;
        goto LABEL_14;
      }
    }
  }
}
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004D54A0) --------------------------------------------------------
void __thiscall AttendCheckBut::Create(AttendCheckBut *this, int iOffX, int iOffY, const unsigned int eButMessage, const unsigned int uiIndex, PgWin *pkParent, NiSourceTexture *pkTexture)
{
  AttendCheckBut *v7; // esi@1
  NiTexturePalette *v8; // ebx@1
  const char *v9; // eax@3
  NiNode *v10; // eax@3
  NiNode *v11; // esi@7
  bool v12; // zf@8
  PgSprData *v13; // ebx@9
  PgWin *v14; // edi@11
  PgSprData *v15; // ST1C_4@11
  int v16; // ebx@11
  PgWinSpr *v17; // eax@11
  NiNode *v18; // ecx@11
  PgWinBut *v19; // eax@13
  PgSprData::PgHitTester *v20; // eax@13
  PgFont *v21; // eax@13
  PgWinText *v22; // eax@13
  PgSprData::PgHitTester *v23; // eax@13
  PgFont *v24; // eax@13
  PgWinText *v25; // eax@13
  PgSprData::PgHitTester *v26; // eax@13
  PgFont *v27; // eax@13
  PgWinText *v28; // eax@13
  NiTexturePalette *v29; // edi@13
  const char *v30; // eax@15
  NiNode *v31; // esi@16
  SpEffect *v32; // edi@20
  NiNode *v33; // eax@21
  SpEffect *v34; // eax@21
  SpEffect *v35; // ecx@23
  NiNode *v36; // esi@24
  NiPointer<NiNode> pkNiNodePtr; // [sp+10h] [bp-1Ch]@13
  int iLeft; // [sp+14h] [bp-18h]@9
  int iTop; // [sp+18h] [bp-14h]@9
  NiPointer<NiNode> spNode; // [sp+1Ch] [bp-10h]@1
  int v41; // [sp+28h] [bp-4h]@1
  int iOffYa; // [sp+38h] [bp+Ch]@13
  int iOffYb; // [sp+38h] [bp+Ch]@13
  NiNode *pkAttechEffect; // [sp+3Ch] [bp+10h]@13
  PgSprData *pkSprData; // [sp+44h] [bp+18h]@11
  PgSprData *pkSprDataa; // [sp+44h] [bp+18h]@13
  PgSprData *pkSprDatab; // [sp+44h] [bp+18h]@13
  PgSprData *pkSprDatac; // [sp+44h] [bp+18h]@13
  NiSourceTexture *pkTexturea; // [sp+48h] [bp+1Ch]@13

  v7 = this;
  spNode.m_pObject = 0;
  v8 = pTexturePalette;
  v41 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v9 = Folder::Merge(&Folder::m_acMenu, "Game\\AttendStamp.nif");
  PgUtil::LoadNodeNifFile(v9, &spNode, v8);
  v10 = spNode.m_pObject;
  if ( spNode.m_pObject )
  {
    v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BaseStamp", &iLeft, &iTop, pkTexture);
    if ( PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "SuccessStamp") != 1 )
      PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "SuccessStamp00");
    PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "FailStamp");
    PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "GiftDisableBtn");
    v14 = pkParent;
    v15 = v13;
    v16 = iOffY;
    v17 = PgWinSpr::CreateWin(iOffX, iOffY, v15, pkParent, 0, 0);
    v18 = spNode.m_pObject;
    v7->m_pkSpr = v17;
    pkSprData = PgSprData::Create((NiAVObject *)&v18->vfptr, "GiftBtnNor", &iLeft, &iTop, pkTexture);
    PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "GiftBtnClick");
    PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "GiftBtnNor");
    if ( PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "MissonComplete") != 1 )
      PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "MissonComplete00");
    v19 = PgWinBut::CreateWin(iOffX + iLeft, iOffY + iTop, pkSprData, v14, eButMessage, 0, 0);
    v7->m_pkBut = v19;
    v19->vfptr[130].__vecDelDtor((NiRefObject *)v19, uiIndex);
    v7->m_pkBut->m_uFlags |= 1u;
    pkAttechEffect = (NiNode *)&v7->m_pkBut->vfptr;
    v20 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Month", &iLeft, &iTop, pkTexture)->m_akHitTester.m_pBase->m_pObject;
    pkSprDataa = (PgSprData *)v20->m_uiHeight;
    iOffYa = v20->m_uiWidth;
    v21 = Font::Get(BOLD);
    v22 = PgWinText::CreateWin(iOffX + iLeft, v16 + iTop, iOffYa, (unsigned int)pkSprDataa, v21, v14, 0, 0);
    v7->m_pkTextMonth = v22;
    v22->vfptr[122].__vecDelDtor((NiRefObject *)v22, 1u);
    v23 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Slash", &iLeft, &iTop, pkTexture)->m_akHitTester.m_pBase->m_pObject;
    pkSprDatab = (PgSprData *)v23->m_uiHeight;
    iOffYb = v23->m_uiWidth;
    v24 = Font::Get(BOLD);
    v25 = PgWinText::CreateWin(iOffX + iLeft, v16 + iTop, iOffYb, (unsigned int)pkSprDatab, v24, v14, 0, 0);
    v7->m_pkTextSlash = v25;
    v25->vfptr[122].__vecDelDtor((NiRefObject *)v25, 1u);
    ((void (__stdcall *)(const char *))v7->m_pkTextSlash->vfptr[118].__vecDelDtor)("/");
    v26 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, off_983BAC, &iLeft, &iTop, pkTexture)->m_akHitTester.m_pBase->m_pObject;
    pkTexturea = (NiSourceTexture *)v26->m_uiHeight;
    pkSprDatac = (PgSprData *)v26->m_uiWidth;
    v27 = Font::Get(BOLD);
    v28 = PgWinText::CreateWin(
            iOffX + iLeft,
            v16 + iTop,
            (unsigned int)pkSprDatac,
            (unsigned int)pkTexturea,
            v27,
            v14,
            0,
            0);
    v7->m_pkTextDay = v28;
    v28->vfptr[122].__vecDelDtor((NiRefObject *)v28, 1u);
    pkNiNodePtr.m_pObject = 0;
    v29 = pTexturePalette;
    LOBYTE(v41) = 1;
    if ( !Folder::m_bInit )
      Folder::Init();
    v30 = Folder::Merge(&Folder::m_acEffect, "AttendReward.nif");
    PgUtil::LoadNodeNifFile(v30, &pkNiNodePtr, v29);
    if ( pkNiNodePtr.m_pObject )
    {
      v32 = (SpEffect *)operator new(0x44u);
      LOBYTE(v41) = 2;
      if ( v32 )
      {
        v33 = (NiNode *)NiObject::Clone((NiObject *)&pkNiNodePtr.m_pObject->vfptr);
        SpEffect::SpEffect(v32, v33);
      }
      else
      {
        v34 = 0;
      }
      v7->m_apkBlinkEff = v34;
      v34->m_bLoop = 1;
      v35 = v7->m_apkBlinkEff;
      LOBYTE(v41) = 1;
      SpEffect::Start(v35, pkAttechEffect);
      LOBYTE(v41) = 0;
      if ( pkNiNodePtr.m_pObject )
      {
        v36 = pkNiNodePtr.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&pkNiNodePtr.m_pObject->m_uiRefCount) )
        {
          if ( v36 )
            v36->vfptr->__vecDelDtor((NiRefObject *)v36, 1u);
        }
      }
      v11 = spNode.m_pObject;
      v41 = -1;
      if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        v12 = v11 == 0;
LABEL_30:
        if ( !v12 )
          v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
        return;
      }
    }
    else
    {
      v31 = spNode.m_pObject;
      v41 = -1;
      if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v31 )
        ((void (__cdecl *)(signed int))v31->vfptr->__vecDelDtor)(1);
    }
  }
  else
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("Game\\AttendStamp.nif load fail", "LoadFail", 0);
      v10 = spNode.m_pObject;
    }
    v41 = -1;
    if ( v10 )
    {
      v11 = v10;
      if ( !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) )
      {
        v12 = v11 == 0;
        goto LABEL_30;
      }
    }
  }
}
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004D5910) --------------------------------------------------------
void __thiscall AttendCheckBut::SetType(AttendCheckBut *this, unsigned int eType)
{
  AttendCheckBut *v2; // esi@1
  PgWinSpr *v3; // ecx@1
  PgWinBut *v4; // esi@12

  v2 = this;
  v3 = this->m_pkSpr;
  if ( v3 )
  {
    v2->m_eType = eType;
    if ( eType )
    {
      if ( eType == 4 )
      {
        if ( v2->m_pkBut && v2->m_apkBlinkEff )
        {
          v3->m_uFlags |= 1u;
          v2->m_pkBut->m_uFlags &= 0xFFFEu;
          ((void (__stdcall *)(_DWORD))v2->m_pkBut->vfptr[60].__vecDelDtor)(0);
          v2->m_apkBlinkEff->m_spEffect.m_pObject->m_uFlags |= 1u;
        }
      }
      else if ( eType == 5 )
      {
        if ( v2->m_pkBut )
        {
          if ( v2->m_apkBlinkEff )
          {
            v3->m_uFlags |= 1u;
            v2->m_pkBut->m_uFlags &= 0xFFFEu;
            ((void (__stdcall *)(_DWORD))v2->m_pkBut->vfptr[60].__vecDelDtor)(1);
            v2->m_apkBlinkEff->m_spEffect.m_pObject->m_uFlags &= 0xFFFEu;
          }
        }
      }
      else
      {
        ((void (__stdcall *)(_DWORD))v3->vfptr[123].__vecDelDtor)(eType);
      }
    }
    else
    {
      v3->m_uFlags &= 0xFFFEu;
      ((void (__stdcall *)(_DWORD))v2->m_pkSpr->vfptr[123].__vecDelDtor)(0);
      v4 = v2->m_pkBut;
      if ( v4 )
        v4->m_uFlags |= 1u;
    }
  }
}

//----- (004D5A00) --------------------------------------------------------
char __thiscall AttendCheckWin::Create(AttendCheckWin *this, PgFrameWork *pkFrameWork)
{
  AttendCheckWin *v2; // ebx@1
  NiTexturePalette *v3; // esi@1
  const char *v4; // eax@3
  NiNode *v5; // ecx@3
  NiNode *v6; // esi@7
  bool v7; // zf@8
  char result; // al@11
  NiAVObject *v9; // eax@12
  NiTexturingProperty *v10; // eax@12
  NiTexturingProperty *v11; // esi@12
  NiTexturingProperty::Map *v12; // eax@14
  NiSourceTexture *v13; // eax@15
  NiNode *v14; // esi@18
  PgSprData *v15; // eax@22
  NiNode *v16; // esi@25
  int v17; // esi@29
  int v18; // edi@29
  PgSprData *v19; // eax@29
  PgFont *v20; // eax@31
  PgWinText *v21; // esi@31
  NiRefObjectVtbl *v22; // edi@31
  NiUnsharedGeometryGroup *v23; // eax@31
  CSpFont *v24; // eax@31
  CSpFont *v25; // eax@31
  PgWinText *v26; // eax@31
  NiRefObjectVtbl *v27; // esi@31
  NiUnsharedGeometryGroup *v28; // eax@31
  NiSourceTexture *v29; // esi@31
  PgSprData *v30; // eax@31
  PgWinText *v31; // eax@31
  PgSprData *v32; // eax@31
  PgSprData::PgHitTester *v33; // ecx@31
  int v34; // eax@31
  AttendCheckBut *v35; // edi@31
  int v36; // edx@32
  unsigned int v37; // eax@34
  bool v38; // sf@34
  unsigned __int8 v39; // of@34
  AttendCheckButVtbl *v40; // edx@34
  NiTexturingProperty *v41; // esi@40
  NiTexturingProperty *v42; // esi@45
  PgFont *v43; // eax@50
  NiD3DDefaultShader *v44; // esi@50
  const char *v45; // eax@52
  NiTexturingProperty *v46; // esi@53
  SpEffect *v47; // esi@58
  NiNode *v48; // eax@59
  SpEffect *v49; // eax@59
  NiNode *v50; // eax@62
  NiNode *v51; // esi@64
  NiTexturingProperty *v52; // esi@67
  NiNode *v53; // esi@69
  Font::FontDefine kFontDefine; // [sp+50h] [bp-84h]@31
  float v55; // [sp+84h] [bp-50h]@62
  float v56; // [sp+88h] [bp-4Ch]@62
  float v57; // [sp+8Ch] [bp-48h]@62
  unsigned int uiYPos; // [sp+90h] [bp-44h]@31
  unsigned int uiXPos; // [sp+94h] [bp-40h]@31
  AttendCheckBut *v60; // [sp+98h] [bp-3Ch]@31
  int v61; // [sp+9Ch] [bp-38h]@31
  int v62; // [sp+A0h] [bp-34h]@32
  int j; // [sp+A4h] [bp-30h]@32
  NiSourceTexture *pkTexture; // [sp+A8h] [bp-2Ch]@15
  NiPointer<NiNode> pkNiNodePtr; // [sp+ACh] [bp-28h]@50
  NiPointer<NiTexturingProperty> spTexProp; // [sp+B0h] [bp-24h]@12
  unsigned int uiWidth; // [sp+B4h] [bp-20h]@29
  unsigned int uiHeight; // [sp+B8h] [bp-1Ch]@29
  int iLeft; // [sp+BCh] [bp-18h]@22
  int iTop; // [sp+C0h] [bp-14h]@22
  NiPointer<NiNode> spNode; // [sp+C4h] [bp-10h]@1
  int v72; // [sp+D0h] [bp-4h]@1
  PgSprData *ia; // [sp+DCh] [bp+8h]@29
  PgSprData *ib; // [sp+DCh] [bp+8h]@31
  int i; // [sp+DCh] [bp+8h]@31

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v72 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\AttendWin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = spNode.m_pObject;
  if ( !spNode.m_pObject )
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("Game\\AttendWin.nif load fail", "LoadFail", 0);
      v5 = spNode.m_pObject;
    }
    v72 = -1;
    if ( v5 )
    {
      v6 = v5;
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      {
        v7 = v6 == 0;
LABEL_9:
        if ( !v7 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    return 0;
  }
  v9 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Frame");
  v10 = (NiTexturingProperty *)NiAVObject::GetProperty(v9, 8);
  v11 = v10;
  spTexProp.m_pObject = v10;
  if ( v10 )
    InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
  v12 = *v11->m_kMaps.m_pBase;
  LOBYTE(v72) = 1;
  if ( !v12 || (v13 = (NiSourceTexture *)v12->m_spTexture.m_pObject, (pkTexture = v13) == 0) )
  {
    LOBYTE(v72) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    v14 = spNode.m_pObject;
    v72 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v14 )
    {
      ((void (__thiscall *)(NiNode *))v14->vfptr->__vecDelDtor)(v14);
      return 0;
    }
    return 0;
  }
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iLeft, &iTop, v13);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v15, 0, pkFrameWork, "AttendCheckWin", 0) )
  {
    v17 = iLeft;
    v18 = iTop;
    v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft, iTop, v19, (PgWin *)&v2->vfptr, 0, 0);
    ia = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CloseBtnNor", &iLeft, &iTop, pkTexture);
    PgSprData::Add(ia, (NiAVObject *)&spNode.m_pObject->vfptr, "CloseBtnClick");
    PgSprData::Add(ia, (NiAVObject *)&spNode.m_pObject->vfptr, "CloseBtnOver");
    PgWinBut::CreateWin(iLeft, iTop, ia, (PgWin *)&v2->vfptr, 0, 0, 0);
    if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &iLeft, &iTop, &uiWidth, &uiHeight) )
    {
      v20 = Font::Get(MAIN_MENU);
      v21 = PgWinText::CreateWin(iLeft - v17, iTop - v18, uiWidth, uiHeight, v20, (PgWin *)&v2->vfptr, 0, 0);
      v21->vfptr[122].__vecDelDtor((NiRefObject *)v21, 5u);
      v22 = v21->vfptr;
      v23 = TextData2::Get(0xE53D4A31);
      v22[118].__vecDelDtor((NiRefObject *)v21, (unsigned int)v23);
      v21->vfptr[60].__vecDelDtor((NiRefObject *)v21, 0);
      ib = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text02", &iLeft, &iTop, 0);
      qmemcpy(&kFontDefine, Font::GetFontDefine(TITLEBOLD), sizeof(kFontDefine));
      kFontDefine.Weight = 700;
      kFontDefine.Height = 14;
      kFontDefine.dwOutline = 1;
      v24 = AttendCheckWin::CreateFontA(&kFontDefine);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)v2->m_spFont, (NiD3DDefaultShader *)v24);
      kFontDefine.Height = 16;
      v25 = AttendCheckWin::CreateFontA(&kFontDefine);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spFont[1], (NiD3DDefaultShader *)v25);
      v26 = PgWinText::CreateWin(
              iLeft,
              iTop,
              ib->m_akHitTester.m_pBase->m_pObject->m_uiWidth,
              ib->m_akHitTester.m_pBase->m_pObject->m_uiHeight,
              v2->m_spFont[1].m_pObject,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v2->m_pkTextCon = v26;
      v26->vfptr[122].__vecDelDtor((NiRefObject *)v26, 5u);
      v27 = v2->m_pkTextCon->vfptr;
      v28 = TextData2::Get(0x327E8F83u);
      v27[118].__vecDelDtor((NiRefObject *)v2->m_pkTextCon, (unsigned int)v28);
      v29 = pkTexture;
      v30 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &iLeft, &iTop, pkTexture);
      v31 = PgWinText::CreateWin(
              iLeft,
              iTop,
              v30->m_akHitTester.m_pBase->m_pObject->m_uiWidth,
              v30->m_akHitTester.m_pBase->m_pObject->m_uiHeight,
              v2->m_spFont[0].m_pObject,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v2->m_pkText = v31;
      v31->vfptr[122].__vecDelDtor((NiRefObject *)v31, 5u);
      v32 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Start", &iLeft, &iTop, v29);
      uiXPos = iLeft;
      v33 = v32->m_akHitTester.m_pBase->m_pObject;
      uiYPos = iTop;
      uiWidth = v33->m_uiWidth;
      uiHeight = v32->m_akHitTester.m_pBase->m_pObject->m_uiHeight;
      v34 = 0;
      v35 = v2->m_DayBut;
      i = 0;
      v61 = 0;
      v60 = v2->m_DayBut;
      while ( 2 )
      {
        v36 = 0;
        j = 0;
        v62 = v34;
        do
        {
          if ( (unsigned int)v34 > 0x1B )
          {
            v42 = spTexProp.m_pObject;
            LOBYTE(v72) = 0;
            if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
              v42->vfptr->__vecDelDtor((NiRefObject *)v42, 1u);
            v6 = spNode.m_pObject;
            v72 = -1;
            if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
            {
              v7 = v6 == 0;
              goto LABEL_9;
            }
            return 0;
          }
          v37 = uiXPos + v36 * (uiWidth + 2);
          v39 = __OFSUB__(v36, 6);
          v38 = v36 - 6 < 0;
          v40 = v35->vfptr;
          if ( v38 ^ v39 )
          {
            v40->Create(v35, v37, uiYPos + i * (uiHeight + 2), (PgWin *)v2, v29);
          }
          else
          {
            v40->Create(v35, v37, uiYPos + i * (uiHeight + 2), 1u, i, (PgWin *)v2, v29);
            v29 = pkTexture;
          }
          v36 = j + 1;
          v34 = v62 + 1;
          ++v35;
          j = v36;
          ++v62;
        }
        while ( v36 < 7 );
        ++i;
        v34 = v61 + 7;
        v35 = v60 + 7;
        v61 = v34;
        v60 += 7;
        if ( v34 < 28 )
          continue;
        break;
      }
      if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iLeft, &iTop, &uiWidth, &uiHeight) )
      {
        v43 = Font::Get(BOLD);
        v44 = (NiD3DDefaultShader *)PgWinText::CreateWin(iLeft, iTop, uiWidth, uiHeight, v43, (PgWin *)&v2->vfptr, 0, 0);
        v44->vfptr[60].__vecDelDtor((NiRefObject *)v44, 0);
        NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_pRunEffect, v44);
        pkNiNodePtr.m_pObject = 0;
        LOBYTE(v72) = 2;
        if ( !Folder::m_bInit )
          Folder::Init();
        v45 = Folder::Merge(&Folder::m_acEffect, "AttendRewardFull.nif");
        PgUtil::LoadNodeNifFile(v45, &pkNiNodePtr, 0);
        if ( pkNiNodePtr.m_pObject )
        {
          v47 = (SpEffect *)operator new(0x44u);
          LOBYTE(v72) = 3;
          if ( v47 )
          {
            v48 = (NiNode *)NiObject::Clone((NiObject *)&pkNiNodePtr.m_pObject->vfptr);
            SpEffect::SpEffect(v47, v48);
          }
          else
          {
            v49 = 0;
          }
          LOBYTE(v72) = 2;
          v2->m_apkEffect = v49;
          if ( v49 )
          {
            v50 = v49->m_spEffect.m_pObject;
            v55 = 0.0;
            v56 = 0.0;
            v50->m_kLocal.m_Translate.x = 0.0;
            v57 = 1000.0;
            v50->m_kLocal.m_Translate.y = 0.0;
            v50->m_kLocal.m_Translate.z = 1000.0;
            ((void (__thiscall *)(AttendCheckWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
              v2,
              PgWin::ms_uiScreenWidth,
              PgWin::ms_uiScreenHeight,
              0.5,
              0.5);
          }
          LOBYTE(v72) = 1;
          if ( pkNiNodePtr.m_pObject )
          {
            v51 = pkNiNodePtr.m_pObject;
            if ( !InterlockedDecrement((volatile LONG *)&pkNiNodePtr.m_pObject->m_uiRefCount) )
            {
              if ( v51 )
                v51->vfptr->__vecDelDtor((NiRefObject *)v51, 1u);
            }
          }
          v52 = spTexProp.m_pObject;
          LOBYTE(v72) = 0;
          if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
            v52->vfptr->__vecDelDtor((NiRefObject *)v52, 1u);
          v53 = spNode.m_pObject;
          v72 = -1;
          if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v53 )
            v53->vfptr->__vecDelDtor((NiRefObject *)v53, 1u);
          return 1;
        }
        v46 = spTexProp.m_pObject;
        LOBYTE(v72) = 0;
        if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
          v46->vfptr->__vecDelDtor((NiRefObject *)v46, 1u);
        v6 = spNode.m_pObject;
        v72 = -1;
        if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
        {
          v7 = v6 == 0;
          goto LABEL_9;
        }
      }
      else
      {
        v41 = spTexProp.m_pObject;
        LOBYTE(v72) = 0;
        if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
          v41->vfptr->__vecDelDtor((NiRefObject *)v41, 1u);
        v6 = spNode.m_pObject;
        v72 = -1;
        if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
        {
          v7 = v6 == 0;
          goto LABEL_9;
        }
      }
      return 0;
    }
    LOBYTE(v72) = 0;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
    v72 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    result = 0;
  }
  else
  {
    LOBYTE(v72) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    v16 = spNode.m_pObject;
    v72 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v16 )
      return 0;
    ((void (__thiscall *)(NiNode *))v16->vfptr->__vecDelDtor)(v16);
    result = 0;
  }
  return result;
}
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004D61F0) --------------------------------------------------------
void __thiscall AttendCheckWin::OnCommand(AttendCheckWin *this, unsigned int wParam, int lParam)
{
  if ( wParam )
  {
    if ( wParam == 1 )
      AttendCheckWin::OnClick(lParam);
  }
  else
  {
    ((void (*)(void))this->vfptr[135].__vecDelDtor)();
  }
}

//----- (004D6220) --------------------------------------------------------
void __thiscall AttendCheckWin::UpdateMeWin(AttendCheckWin *this, float fCurTime)
{
  AttendCheckWin *v2; // esi@1
  SpEffect *v3; // ecx@1
  GameFrameWork *v4; // eax@5
  NiRefObjectVtbl *v5; // edi@7
  unsigned int v6; // ST04_4@7
  char *v7; // eax@7
  char *v8; // eax@7

  v2 = this;
  v3 = this->m_apkEffect;
  if ( v3->m_bLive )
  {
    EffStart = 1;
    SpEffect::Update(v3, fCurTime);
  }
  if ( EffStart == 1 && !v2->m_apkEffect->m_bLive )
  {
    v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( !v4 )
      return;
    GameFrameWork::OnOpenAttendRewardWin(v4);
    EffStart = 0;
  }
  v5 = v2->m_pkText->vfptr;
  v6 = v2->m_iCheckCnt;
  v7 = (char *)TextData2::Get(0xDE3B4A41);
  v8 = fs(v7, v6, 28);
  v5[118].__vecDelDtor((NiRefObject *)v2->m_pkText, (unsigned int)v8);
}

//----- (004D62C0) --------------------------------------------------------
void __thiscall AttendCheckWin::InitEvtState(AttendCheckWin *this)
{
  AttendCheckWin *v1; // esi@1
  int v2; // esi@1
  signed int v3; // edi@1
  int v4; // eax@2
  int v5; // eax@3

  v1 = this;
  this->m_uiRBtnNum = AttendRewardTab::GetNumOfType(0);
  v1->m_iEvtIndex = 0;
  v1->m_iCheckCnt = 0;
  v1->m_bRMonthState = 0;
  v2 = (int)&v1->m_DayBut[0].m_pkSpr;
  v3 = 28;
  do
  {
    v4 = *(_DWORD *)v2;
    if ( *(_DWORD *)v2 )
    {
      *(_DWORD *)(v2 + 20) = 0;
      *(_WORD *)(v4 + 28) &= 0xFFFEu;
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 492))(0);
      v5 = *(_DWORD *)(v2 + 4);
      if ( v5 )
        *(_WORD *)(v5 + 28) |= 1u;
    }
    (*(void (__stdcall **)(D3DXCOLOR *))(**(_DWORD **)(v2 + 8) + 468))(&Color::m_kDxWhiteColor);
    (*(void (__stdcall **)(D3DXCOLOR *))(**(_DWORD **)(v2 + 12) + 468))(&Color::m_kDxWhiteColor);
    (*(void (__stdcall **)(D3DXCOLOR *))(**(_DWORD **)(v2 + 16) + 468))(&Color::m_kDxWhiteColor);
    v2 += 32;
    --v3;
  }
  while ( v3 );
}

//----- (004D6360) --------------------------------------------------------
void __thiscall AttendCheckWin::SetCheckState(AttendCheckWin *this, const char *uiCheckState)
{
  AttendCheckWin *v2; // edi@1
  unsigned int v3; // ebx@2
  char *v4; // esi@2
  int v5; // ecx@4
  int v6; // ecx@9

  v2 = this;
  if ( uiCheckState )
  {
    v3 = 0;
    v4 = (char *)&this->m_DayBut[0].m_pkSpr;
    do
    {
      if ( uiCheckState[v3] == 1 )
      {
        v5 = *(_DWORD *)v4;
        if ( *(_DWORD *)v4 )
        {
          *((_DWORD *)v4 + 5) = 1;
          (*(void (__stdcall **)(signed int))(*(_DWORD *)v5 + 492))(1);
        }
        (*(void (__stdcall **)(D3DXCOLOR *))(**((_DWORD **)v4 + 2) + 468))(&Color::m_kDxBlackColor);
        (*(void (__stdcall **)(D3DXCOLOR *))(**((_DWORD **)v4 + 3) + 468))(&Color::m_kDxBlackColor);
        (*(void (__stdcall **)(D3DXCOLOR *))(**((_DWORD **)v4 + 4) + 468))(&Color::m_kDxBlackColor);
        ++v2->m_iCheckCnt;
      }
      if ( v3 < v2->m_iEvtIndex )
      {
        if ( !*((_DWORD *)v4 + 5) )
        {
          v6 = *(_DWORD *)v4;
          if ( *(_DWORD *)v4 )
          {
            *((_DWORD *)v4 + 5) = 2;
            (*(void (__stdcall **)(signed int))(*(_DWORD *)v6 + 492))(2);
          }
        }
        (*(void (__stdcall **)(D3DXCOLOR *))(**((_DWORD **)v4 + 2) + 468))(&Color::m_kDxBlackColor);
        (*(void (__stdcall **)(D3DXCOLOR *))(**((_DWORD **)v4 + 3) + 468))(&Color::m_kDxBlackColor);
        (*(void (__stdcall **)(D3DXCOLOR *))(**((_DWORD **)v4 + 4) + 468))(&Color::m_kDxBlackColor);
      }
      ++v3;
      v4 += 32;
    }
    while ( v3 < 0x1C );
  }
}

//----- (004D6450) --------------------------------------------------------
void __thiscall AttendCheckWin::SetButState(AttendCheckWin *this, const char *uiRewardState, const int iRewardCnt)
{
  int v3; // ebx@1
  int v4; // edi@2
  int v5; // esi@2
  int *v6; // eax@4
  int v7; // eax@5
  unsigned int v8; // eax@8
  int v9; // esi@9
  PgWinSpr *v10; // eax@9
  bool v11; // zf@10
  int v12; // esi@15
  int *v13; // eax@17
  int v14; // eax@18
  int v15; // ecx@19
  unsigned int v16; // eax@19
  unsigned int v17; // esi@20
  unsigned int *v18; // edx@20
  int v19; // ecx@21
  AttendCheckWin *v20; // [sp+Ch] [bp-4h]@1
  unsigned int i; // [sp+1Ch] [bp+Ch]@14

  v3 = 0;
  v20 = this;
  if ( iRewardCnt <= 0 )
  {
LABEL_14:
    i = 0;
    if ( v20->m_uiRBtnNum )
    {
      do
      {
        v12 = ITableBase<AttendReward,AttendRewardTab>::ms_pkTable;
        if ( !(unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<AttendReward,AttendRewardTab>::ms_pkTable
                                                                  + 16))(
                                 ITableBase<AttendReward,AttendRewardTab>::ms_pkTable,
                                 (unsigned __int16)i) )
          break;
        if ( (unsigned __int16)i > *(_WORD *)(v12 + 200) )
          break;
        v13 = (int *)(*(_DWORD *)(v12 + 196) + 4 * (unsigned __int16)i);
        if ( !*v13 )
          break;
        v14 = *v13;
        if ( !v14 )
          break;
        v15 = *(_BYTE *)(v14 + 5);
        v16 = 7 * v15 - 1;
        if ( v16 >= 0x1C )
          break;
        v17 = v20->m_DayBut[v16].m_eType;
        v18 = &v20->m_DayBut[v16].m_eType;
        if ( v16 > v20->m_iEvtIndex )
        {
          v17 = 3;
        }
        else
        {
          v19 = 7 * v15 - 1;
          if ( (v16 & 0x80000000) == 0 )
          {
            do
            {
              if ( v19 != v16 && *(v18 - 4) )
                break;
              if ( *v18 != 1 )
                goto LABEL_28;
              v18 -= 8;
              --v19;
            }
            while ( v19 >= 0 );
          }
          v17 = 5;
        }
LABEL_28:
        AttendCheckBut::SetType(&v20->m_DayBut[v16], v17);
        ++i;
      }
      while ( i < v20->m_uiRBtnNum );
    }
  }
  else
  {
    while ( 1 )
    {
      v4 = uiRewardState[v3];
      v5 = ITableBase<AttendReward,AttendRewardTab>::ms_pkTable;
      if ( !(unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AttendReward,AttendRewardTab>::ms_pkTable
                                                             + 16))(
                               ITableBase<AttendReward,AttendRewardTab>::ms_pkTable,
                               v4) )
        break;
      if ( (unsigned __int16)v4 > *(_WORD *)(v5 + 200) )
        break;
      v6 = (int *)(*(_DWORD *)(v5 + 196) + 4 * v4);
      if ( !*v6 )
        break;
      v7 = *v6;
      if ( !v7 )
        break;
      if ( *(_DWORD *)(v7 + 1) == 1 )
      {
        v20->m_bRMonthState = 1;
      }
      else
      {
        v8 = 7 * *(_BYTE *)(v7 + 5) - 1;
        if ( v8 > 0x1B )
          return;
        v9 = (int)&v20->m_DayBut[v8];
        v10 = v20->m_DayBut[v8].m_pkSpr;
        if ( v10 )
        {
          v11 = *(_DWORD *)(v9 + 8) == 0;
          *(_DWORD *)(v9 + 24) = 4;
          if ( !v11 )
          {
            if ( *(_DWORD *)(v9 + 28) )
            {
              v10->m_uFlags |= 1u;
              *(_WORD *)(*(_DWORD *)(v9 + 8) + 28) &= 0xFFFEu;
              (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v9 + 8) + 240))(0);
              *(_WORD *)(**(_DWORD **)(v9 + 28) + 28) |= 1u;
            }
          }
        }
      }
      if ( ++v3 >= iRewardCnt )
        goto LABEL_14;
    }
  }
}
// A8C28C: using guessed type int ITableBase<AttendReward,AttendRewardTab>::ms_pkTable;

//----- (004D6630) --------------------------------------------------------
void __thiscall AttendCheckWin::CheckIt(AttendCheckWin *this)
{
  AttendCheckWin *v1; // edi@1
  unsigned int v2; // eax@1
  int v3; // edx@2
  int v4; // eax@3
  char *v5; // ecx@4
  unsigned int v6; // eax@8
  int v7; // edx@10
  int v8; // esi@10

  v1 = this;
  v2 = this->m_iEvtIndex;
  if ( v2 < 0x1C )
  {
    v3 = v2;
    if ( this->m_DayBut[v2].m_pkBut )
    {
      v4 = v2 - 1;
      if ( v4 >= 0 )
      {
        v5 = (char *)&this->m_DayBut[v4].m_eType;
        do
        {
          if ( *((_DWORD *)v5 - 4) )
            break;
          if ( *(_DWORD *)v5 != 1 )
            goto LABEL_9;
          v5 -= 32;
          --v4;
        }
        while ( v4 >= 0 );
      }
      v6 = 5;
    }
    else
    {
LABEL_9:
      v6 = 1;
    }
    AttendCheckBut::SetType(&v1->m_DayBut[v3], v6);
    v7 = v1->m_iEvtIndex;
    v8 = (int)&v1->m_DayBut[v7];
    ((void (__stdcall *)(_DWORD))v1->m_DayBut[v7].m_pkTextMonth->vfptr[117].__vecDelDtor)(&Color::m_kDxBlackColor);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v8 + 16) + 468))(&Color::m_kDxBlackColor);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v8 + 20) + 468))(&Color::m_kDxBlackColor);
    if ( v1->m_iEvtIndex == 27 )
      v1->m_iEvtIndex = 28;
    ++v1->m_iCheckCnt;
  }
}

//----- (004D6700) --------------------------------------------------------
void __thiscall AttendCheckWin::SetReward(AttendCheckWin *this, const unsigned int uiRewardID)
{
  int v2; // esi@1
  AttendCheckWin *v3; // ebx@1
  int *v4; // eax@3
  int v5; // eax@4
  unsigned int v6; // eax@7
  int v7; // eax@8

  v2 = ITableBase<AttendReward,AttendRewardTab>::ms_pkTable;
  v3 = this;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, const unsigned int))(*(_DWORD *)ITableBase<AttendReward,AttendRewardTab>::ms_pkTable
                                                                       + 16))(
                          ITableBase<AttendReward,AttendRewardTab>::ms_pkTable,
                          uiRewardID) )
  {
    if ( (unsigned __int16)uiRewardID <= *(_WORD *)(v2 + 200) )
    {
      v4 = (int *)(*(_DWORD *)(v2 + 196) + 4 * (unsigned __int16)uiRewardID);
      if ( *v4 )
      {
        v5 = *v4;
        if ( v5 )
        {
          if ( *(_DWORD *)(v5 + 1) == 1 )
          {
            v3->m_bRMonthState = 1;
          }
          else
          {
            v6 = 7 * *(_BYTE *)(v5 + 5) - 1;
            if ( v6 < 0x1C )
            {
              v7 = v6;
              if ( v3->m_DayBut[v7].m_pkBut )
                AttendCheckBut::SetType(&v3->m_DayBut[v7], 4u);
            }
          }
        }
      }
    }
  }
}
// A8C28C: using guessed type int ITableBase<AttendReward,AttendRewardTab>::ms_pkTable;

//----- (004D6790) --------------------------------------------------------
void __thiscall AttendCheckWin::ChangeDay(AttendCheckWin *this, const int EvtIndex)
{
  AttendCheckWin *v2; // esi@1
  unsigned int v3; // eax@2
  unsigned int v4; // eax@3
  unsigned int v5; // ecx@3
  PgWinSpr *v6; // ecx@5
  AttendReward *v7; // eax@9

  v2 = this;
  if ( (unsigned int)EvtIndex <= 0x1C )
  {
    v3 = this->m_iEvtIndex;
    if ( v3 < 0x1C )
    {
      v4 = v3;
      v5 = this->m_DayBut[v4].m_eType;
      if ( !v5 || v5 == 3 )
      {
        v6 = v2->m_DayBut[v4].m_pkSpr;
        if ( v6 )
        {
          v2->m_DayBut[v4].m_eType = 2;
          ((void (__stdcall *)(_DWORD))v6->vfptr[123].__vecDelDtor)(2);
        }
        AttendCheckBut::SetTextColor(&v2->m_DayBut[v2->m_iEvtIndex], &Color::m_kDxBlackColor);
      }
      v2->m_iEvtIndex = EvtIndex;
      if ( EvtIndex == 28 )
      {
        v7 = AttendRewardTab::GetByType(1u);
        if ( v7 )
        {
          if ( v2->m_iCheckCnt < v7->AR_Count )
            v2->m_bRMonthState = 1;
        }
      }
    }
  }
}

//----- (004D6830) --------------------------------------------------------
int __thiscall AttendCheckWin::GetMonthRewardIndex(AttendCheckWin *this)
{
  AttendCheckWin *v1; // ebx@1
  int result; // eax@2
  signed int v3; // edi@4
  AttendReward *v4; // eax@5
  unsigned int v5; // esi@8
  unsigned int i; // [sp+4h] [bp-4h]@4

  v1 = this;
  if ( this->m_iEvtIndex < 0x1C || this->m_bRMonthState )
  {
    result = -1;
  }
  else
  {
    v3 = -1;
    i = 0;
    if ( ITableBase<AttendReward,AttendRewardTab>::GetTotal() )
    {
      do
      {
        v4 = AttendRewardTab::GetByType(1u, &i);
        if ( v4 )
        {
          if ( v1->m_iCheckCnt >= v4->AR_Count )
            v3 = v4->AR_ID;
        }
        v5 = ++i;
      }
      while ( v5 < ITableBase<AttendReward,AttendRewardTab>::GetTotal() );
    }
    result = v3;
  }
  return result;
}

//----- (004D68A0) --------------------------------------------------------
char __thiscall AttendCheckWin::IsRewardOn(AttendCheckWin *this)
{
  AttendCheckWin *v1; // esi@1
  char result; // al@2
  bool v3; // zf@3
  AttendReward *v4; // eax@4
  int v5; // eax@5
  unsigned int v6; // eax@7
  unsigned int i; // [sp+4h] [bp-4h]@3

  v1 = this;
  if ( AttendCheckWin::GetMonthRewardIndex(this) == -1 )
  {
    v3 = v1->m_uiRBtnNum == 0;
    i = 0;
    if ( !v3 )
    {
      do
      {
        v4 = AttendRewardTab::GetByType(0, &i);
        if ( !v4 )
          break;
        v5 = 7 * v4->AR_Count - 1;
        if ( v5 < 0 || v5 >= 28 )
          break;
        v6 = v1->m_DayBut[v5].m_eType;
        if ( v6 == 5 )
          goto LABEL_2;
        if ( v6 == 3 )
          break;
        ++i;
      }
      while ( i < v1->m_uiRBtnNum );
    }
    result = 0;
  }
  else
  {
LABEL_2:
    result = 1;
  }
  return result;
}

//----- (004D6920) --------------------------------------------------------
char __thiscall AttendCheckWin::IsRewardAll(AttendCheckWin *this)
{
  AttendCheckWin *v1; // edi@1
  unsigned int v2; // esi@2
  char result; // al@6
  char *v4; // eax@7
  int v5; // eax@8
  unsigned int v6; // eax@10

  v1 = this;
  if ( this->m_bRMonthState )
  {
    v2 = 0;
    if ( this->m_uiRBtnNum )
    {
      while ( v2 < ITableBase<AttendReward,AttendRewardTab>::GetTotal() )
      {
        while ( *(_DWORD *)(CDataReader::GetRecord(
                              (CDataReader *)(ITableBase<AttendReward,AttendRewardTab>::ms_pkTable + 4),
                              v2)
                          + 1) )
        {
          if ( ++v2 >= ITableBase<AttendReward,AttendRewardTab>::GetTotal() )
            goto LABEL_6;
        }
        v4 = CDataReader::GetRecord((CDataReader *)(ITableBase<AttendReward,AttendRewardTab>::ms_pkTable + 4), v2);
        if ( !v4 )
          break;
        v5 = 7 * (unsigned __int8)v4[5] - 1;
        if ( v5 < 0 )
          break;
        if ( v5 >= 28 )
          break;
        v6 = v1->m_DayBut[v5].m_eType;
        if ( v6 == 5 || v6 == 3 )
          break;
        if ( ++v2 >= v1->m_uiRBtnNum )
          goto LABEL_13;
      }
LABEL_6:
      result = 0;
    }
    else
    {
LABEL_13:
      result = 1;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C28C: using guessed type int ITableBase<AttendReward,AttendRewardTab>::ms_pkTable;

//----- (004D69D0) --------------------------------------------------------
void __thiscall AttendCheckBut::~AttendCheckBut(AttendCheckBut *this)
{
  AttendCheckBut *v1; // ebx@1
  SpEffect *v2; // esi@1
  NiNode *v3; // edi@2

  v1 = this;
  v2 = this->m_apkBlinkEff;
  this->vfptr = (AttendCheckButVtbl *)&AttendCheckBut::`vftable';
  if ( v2 )
  {
    NsEffect::~NsEffect(&v2->m_kEffect);
    ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v2->m_kMarkCheck);
    v3 = v2->m_spEffect.m_pObject;
    if ( v2->m_spEffect.m_pObject && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
    {
      if ( v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
    operator delete(v2);
    v1->m_apkBlinkEff = 0;
  }
}
// 983CA0: using guessed type int (__thiscall *AttendCheckBut::`vftable')(void *p, char);

//----- (004D6A70) --------------------------------------------------------
void __thiscall AttendCheckWin::AttendCheckWin(AttendCheckWin *this)
{
  AttendCheckWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&AttendCheckWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&AttendCheckWin::`vftable'{for `IDirectMessenger'};
  v1->m_uiRBtnNum = 0;
  `eh vector constructor iterator'(
    v1->m_DayBut,
    0x20u,
    28,
    (void (__thiscall *)(void *))AttendCheckBut::AttendCheckBut,
    (void (__thiscall *)(void *))AttendCheckBut::~AttendCheckBut);
  v1->m_pkTextCon = 0;
  v1->m_pkText = 0;
  v1->m_iEvtIndex = 0;
  v1->m_iCheckCnt = 0;
  v1->m_bRMonthState = 0;
  v1->m_apkEffect = 0;
  v1->m_pRunEffect.m_pObject = 0;
  `eh vector constructor iterator'(
    v1->m_spFont,
    4u,
    2,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
}
// 983CB0: using guessed type void (__thiscall *AttendCheckWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 983CCC: using guessed type int (__thiscall *AttendCheckWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004D6B30) --------------------------------------------------------
void __thiscall AttendCheckWin::~AttendCheckWin(AttendCheckWin *this)
{
  AttendCheckWin *v1; // esi@1
  SpEffect *v2; // edi@1
  NiNode *v3; // ebx@2
  PgFont *v4; // edi@7
  PgFont *v5; // edi@12
  NiNode *v6; // edi@17

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&AttendCheckWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&AttendCheckWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_apkEffect;
  if ( v2 )
  {
    NsEffect::~NsEffect(&v2->m_kEffect);
    ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v2->m_kMarkCheck);
    v3 = v2->m_spEffect.m_pObject;
    if ( v2->m_spEffect.m_pObject && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    operator delete(v2);
    v1->m_apkEffect = 0;
  }
  v4 = v1->m_spFont[0].m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spFont[0].m_pObject = 0;
  }
  v5 = v1->m_spFont[1].m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spFont[1].m_pObject = 0;
  }
  `eh vector destructor iterator'(
    v1->m_spFont,
    4u,
    2,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v6 = v1->m_pRunEffect.m_pObject;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  `eh vector destructor iterator'(v1->m_DayBut, 0x20u, 28, (void (__thiscall *)(void *))AttendCheckBut::~AttendCheckBut);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 983CB0: using guessed type void (__thiscall *AttendCheckWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 983CCC: using guessed type int (__thiscall *AttendCheckWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004D6CB0) --------------------------------------------------------
void __thiscall AttendCheckWin::SetEvtState(AttendCheckWin *this, tm *T, const int Cnt, const char *iCheckState, const char *iRewardState, const int iRewardCnt)
{
  AttendCheckWin *v6; // esi@1

  v6 = this;
  this->m_uiRBtnNum = AttendRewardTab::GetNumOfType(0);
  AttendCheckWin::SetDate(v6, T, Cnt);
  AttendCheckWin::SetCheckState(v6, iCheckState);
  AttendCheckWin::SetButState(v6, iRewardState, iRewardCnt);
  if ( v6->m_iEvtIndex == 28 && AttendCheckWin::GetMonthRewardIndex(v6) == -1 )
    v6->m_bRMonthState = 1;
}

//----- (004D6D10) --------------------------------------------------------
AttendCheckWin *__cdecl AttendCheckWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  AttendCheckWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x524u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    AttendCheckWin::AttendCheckWin((AttendCheckWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[136].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (AttendCheckWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (004D6E40) --------------------------------------------------------
unsigned int __cdecl ITableBase<AttendReward,AttendRewardTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<AttendReward,AttendRewardTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C28C: using guessed type int ITableBase<AttendReward,AttendRewardTab>::ms_pkTable;

//----- (004D6E60) --------------------------------------------------------
AttendReward *__cdecl AttendRewardTab::GetByType(const unsigned int uiType)
{
  unsigned int v1; // esi@1
  AttendReward *result; // eax@4

  v1 = 0;
  if ( ITableBase<AttendReward,AttendRewardTab>::GetTotal() )
  {
    while ( *(_DWORD *)(CDataReader::GetRecord(
                          (CDataReader *)(ITableBase<AttendReward,AttendRewardTab>::ms_pkTable + 4),
                          v1)
                      + 1) != uiType )
    {
      if ( ++v1 >= ITableBase<AttendReward,AttendRewardTab>::GetTotal() )
        goto LABEL_4;
    }
    result = (AttendReward *)CDataReader::GetRecord(
                               (CDataReader *)(ITableBase<AttendReward,AttendRewardTab>::ms_pkTable + 4),
                               v1);
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}
// A8C28C: using guessed type int ITableBase<AttendReward,AttendRewardTab>::ms_pkTable;

//----- (004D6EB0) --------------------------------------------------------
AttendReward *__cdecl AttendRewardTab::GetByType(const unsigned int uiType, unsigned int *uiIndex)
{
  unsigned int v2; // esi@1
  AttendReward *result; // eax@4

  v2 = *uiIndex;
  if ( v2 >= ITableBase<AttendReward,AttendRewardTab>::GetTotal() )
  {
LABEL_4:
    *uiIndex = v2;
    result = 0;
  }
  else
  {
    while ( *(_DWORD *)(CDataReader::GetRecord(
                          (CDataReader *)(ITableBase<AttendReward,AttendRewardTab>::ms_pkTable + 4),
                          v2)
                      + 1) != uiType )
    {
      if ( ++v2 >= ITableBase<AttendReward,AttendRewardTab>::GetTotal() )
        goto LABEL_4;
    }
    *uiIndex = v2;
    result = (AttendReward *)CDataReader::GetRecord(
                               (CDataReader *)(ITableBase<AttendReward,AttendRewardTab>::ms_pkTable + 4),
                               v2);
  }
  return result;
}
// A8C28C: using guessed type int ITableBase<AttendReward,AttendRewardTab>::ms_pkTable;

//----- (004D6F10) --------------------------------------------------------
int __cdecl AttendRewardTab::GetNumOfType(unsigned int uiType)
{
  int v1; // ebx@1
  unsigned int v2; // esi@1

  v1 = 0;
  v2 = 0;
  if ( ITableBase<AttendReward,AttendRewardTab>::GetTotal() )
  {
    do
    {
      if ( *(_DWORD *)(CDataReader::GetRecord(
                         (CDataReader *)(ITableBase<AttendReward,AttendRewardTab>::ms_pkTable + 4),
                         v2)
                     + 1) == uiType )
        ++v1;
      ++v2;
    }
    while ( v2 < ITableBase<AttendReward,AttendRewardTab>::GetTotal() );
  }
  return v1;
}
// A8C28C: using guessed type int ITableBase<AttendReward,AttendRewardTab>::ms_pkTable;

//----- (004D6F50) --------------------------------------------------------
AttendCheckBut *__thiscall AttendCheckBut::`vector deleting destructor'(AttendCheckBut *this, unsigned int a2)
{
  AttendCheckBut *v2; // esi@1

  v2 = this;
  AttendCheckBut::~AttendCheckBut(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (004D6F80) --------------------------------------------------------
AttendCheckWin *__thiscall AttendCheckWin::`scalar deleting destructor'(AttendCheckWin *this, unsigned int a2)
{
  AttendCheckWin *v2; // esi@1

  v2 = this;
  AttendCheckWin::~AttendCheckWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (004D6FB0) --------------------------------------------------------
void __thiscall AttendIconWin::AttendIconWin(AttendIconWin *this)
{
  AttendIconWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_pkButInert = 0;
  v1->m_pkButAct = 0;
  v1->m_apkBlinkEff = 0;
  v1->m_bEvtState = 0;
  v1->vfptr = (NiRefObjectVtbl *)&AttendIconWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&AttendIconWin::`vftable'{for `IDirectMessenger'};
}
// 983FB8: using guessed type void (__thiscall *AttendIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 983FD4: using guessed type int (__thiscall *AttendIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004D6FF0) --------------------------------------------------------
void __thiscall AttendIconWin::SetActive(AttendIconWin *this, bool bActive)
{
  PgWinBut *v2; // eax@1
  PgWinBut *v3; // eax@5

  v2 = this->m_pkButAct;
  if ( v2 )
  {
    if ( bActive )
      v2->m_uFlags &= 0xFFFEu;
    else
      v2->m_uFlags |= 1u;
  }
  v3 = this->m_pkButInert;
  if ( v3 )
  {
    if ( bActive )
      v3->m_uFlags |= 1u;
    else
      v3->m_uFlags &= 0xFFFEu;
  }
}

//----- (004D7040) --------------------------------------------------------
void __thiscall AttendIconWin::OnLClick(AttendIconWin *this)
{
  AttendIconWin *v1; // esi@1
  GameFrameWork *v2; // eax@1
  PgWinBut *v3; // eax@2
  PgWinBut *v4; // esi@4

  v1 = this;
  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    GameFrameWork::OnOpenAttendCheckWin(v2);
    v3 = v1->m_pkButAct;
    if ( v3 )
      v3->m_uFlags |= 1u;
    v4 = v1->m_pkButInert;
    if ( v4 )
      v4->m_uFlags &= 0xFFFEu;
  }
}

//----- (004D7090) --------------------------------------------------------
char __thiscall AttendIconWin::Create(AttendIconWin *this, PgFrameWork *pkFrameWork)
{
  AttendIconWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@7
  char result; // al@11
  PgSprData *v8; // edi@12
  PgSprData *v9; // edi@15
  PgWinBut *v10; // eax@18
  NiNode *v11; // edi@18
  NiTexturePalette *v12; // ebx@18
  const char *v13; // eax@20
  NiNode *v14; // esi@21
  SpEffect *v15; // ebx@26
  NiNode *v16; // eax@27
  SpEffect *v17; // eax@27
  NiNode *v18; // esi@30
  NiNode *v19; // esi@33
  NiPointer<NiNode> pkNiNodePtr; // [sp+1Ch] [bp-1Ch]@18
  int iLeft; // [sp+20h] [bp-18h]@4
  int iTop; // [sp+24h] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+28h] [bp-10h]@1
  int v24; // [sp+34h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v24 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\AttendButton.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "InertNor", &iLeft, &iTop, 0);
  if ( !v5 )
    v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Inert00_Nor", &iLeft, &iTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "AttendButton", 0) )
  {
    v6 = spNode.m_pObject;
    v24 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "InertNor", &iLeft, &iTop, 0);
  if ( v8 )
  {
    PgSprData::Add(v8, (NiAVObject *)&spNode.m_pObject->vfptr, "InertClick");
  }
  else
  {
    v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Inert00_Nor", &iLeft, &iTop, 0);
    PgSprData::Add(v8, (NiAVObject *)&spNode.m_pObject->vfptr, "Inert00_Click");
  }
  v2->m_pkButInert = PgWinBut::CreateWin(iLeft, iTop, v8, (PgWin *)&v2->vfptr, 0, 0, 0);
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ActiveNor", &iLeft, &iTop, 0);
  if ( v9 )
  {
    PgSprData::Add(v9, (NiAVObject *)&spNode.m_pObject->vfptr, "AcctiveClick");
  }
  else
  {
    v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Active00_Nor", &iLeft, &iTop, 0);
    PgSprData::Add(v9, (NiAVObject *)&spNode.m_pObject->vfptr, "Acctive00_Click");
  }
  v10 = PgWinBut::CreateWin(iLeft, iTop, v9, (PgWin *)&v2->vfptr, 0, 0, 0);
  v2->m_pkButAct = v10;
  v10->m_uFlags |= 1u;
  v11 = (NiNode *)&v2->m_pkButAct->vfptr;
  pkNiNodePtr.m_pObject = 0;
  v12 = pTexturePalette;
  LOBYTE(v24) = 1;
  if ( !Folder::m_bInit )
    Folder::Init();
  v13 = Folder::Merge(&Folder::m_acEffect, "AttendButtonEff.nif");
  PgUtil::LoadNodeNifFile(v13, &pkNiNodePtr, v12);
  if ( pkNiNodePtr.m_pObject )
  {
    v15 = (SpEffect *)operator new(0x44u);
    LOBYTE(v24) = 2;
    if ( v15 )
    {
      v16 = (NiNode *)NiObject::Clone((NiObject *)&pkNiNodePtr.m_pObject->vfptr);
      SpEffect::SpEffect(v15, v16);
    }
    else
    {
      v17 = 0;
    }
    LOBYTE(v24) = 1;
    v2->m_apkBlinkEff = v17;
    SpEffect::Start(v17, v11);
    v2->m_apkBlinkEff->m_bLoop = 1;
    v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
    ((void (__thiscall *)(AttendIconWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.050000001,
      0.2);
    LOBYTE(v24) = 0;
    if ( pkNiNodePtr.m_pObject )
    {
      v18 = pkNiNodePtr.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&pkNiNodePtr.m_pObject->m_uiRefCount) )
      {
        if ( v18 )
          v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
      }
    }
    v19 = spNode.m_pObject;
    v24 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v19 )
      v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
    result = 1;
  }
  else
  {
    v14 = spNode.m_pObject;
    v24 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v14 )
      v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004D73F0) --------------------------------------------------------
void __thiscall AttendIconWin::OnCommand(AttendIconWin *this, unsigned int wParam, int lParam)
{
  AttendIconWin *v3; // esi@1
  GameFrameWork *v4; // eax@2
  PgWinBut *v5; // eax@3
  PgWinBut *v6; // eax@5

  v3 = this;
  if ( !wParam )
  {
    v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v4 )
    {
      GameFrameWork::OnOpenAttendCheckWin(v4);
      v5 = v3->m_pkButAct;
      if ( v5 )
        v5->m_uFlags |= 1u;
      v6 = v3->m_pkButInert;
      if ( v6 )
        v6->m_uFlags &= 0xFFFEu;
    }
  }
}

//----- (004D7440) --------------------------------------------------------
void __thiscall AttendIconWin::~AttendIconWin(AttendIconWin *this)
{
  AttendIconWin *v1; // ebx@1
  SpEffect *v2; // esi@1
  NiNode *v3; // edi@2

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&AttendIconWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&AttendIconWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_apkBlinkEff;
  if ( v2 )
  {
    NsEffect::~NsEffect(&v2->m_kEffect);
    ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v2->m_kMarkCheck);
    v3 = v2->m_spEffect.m_pObject;
    if ( v2->m_spEffect.m_pObject && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    operator delete(v2);
    v1->m_apkBlinkEff = 0;
  }
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 983FB8: using guessed type void (__thiscall *AttendIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 983FD4: using guessed type int (__thiscall *AttendIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004D7510) --------------------------------------------------------
AttendIconWin *__cdecl AttendIconWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  AttendIconWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x168u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&AttendIconWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&AttendIconWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = 0;
    LOBYTE(v2[1].m_kLocal.m_Rotate.m_pEntry[1][1]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (AttendIconWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 983FB8: using guessed type void (__thiscall *AttendIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 983FD4: using guessed type int (__thiscall *AttendIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004D7670) --------------------------------------------------------
AttendIconWin *__thiscall AttendIconWin::`scalar deleting destructor'(AttendIconWin *this, unsigned int a2)
{
  AttendIconWin *v2; // esi@1

  v2 = this;
  AttendIconWin::~AttendIconWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (004D76A0) --------------------------------------------------------
void __thiscall AttendRewardWin::AttendRewardWin(AttendRewardWin *this)
{
  AttendRewardWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_pkTitleText = 0;
  v1->m_pkInfoText = 0;
  v1->m_pkItemIcon = 0;
  v1->m_pkItemText = 0;
  v1->vfptr = (NiRefObjectVtbl *)&AttendRewardWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&AttendRewardWin::`vftable'{for `IDirectMessenger'};
}
// 9842DC: using guessed type void (__thiscall *AttendRewardWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9842FC: using guessed type int (__thiscall *AttendRewardWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004D76E0) --------------------------------------------------------
void __thiscall AttendRewardWin::~AttendRewardWin(AttendRewardWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&AttendRewardWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&AttendRewardWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9842DC: using guessed type void (__thiscall *AttendRewardWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9842FC: using guessed type int (__thiscall *AttendRewardWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004D7700) --------------------------------------------------------
void __thiscall AttendRewardWin::OnCloseWin(AttendRewardWin *this)
{
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
}

//----- (004D7710) --------------------------------------------------------
void __thiscall AttendRewardWin::OnCommand(AttendRewardWin *this, unsigned int wParam, int lParam)
{
  AttendRewardWin *v3; // esi@1
  SoundIndex rkIndex; // [sp+4h] [bp-8h]@2

  v3 = this;
  if ( !wParam )
  {
    rkIndex.m_dwIndex = 49;
    rkIndex.m_acFilename = 0;
    SoundGroupStatic::PlaySoundA((SoundGroupStatic *)&g_kSoundMgr.m_pkInterfaceGroup->vfptr, &rkIndex, 0, 0);
    ((void (__thiscall *)(_DWORD))v3->vfptr[135].__vecDelDtor)(v3);
  }
}

//----- (004D7760) --------------------------------------------------------
char __thiscall AttendRewardWin::Create(AttendRewardWin *this, PgFrameWork *pkFrameWork)
{
  AttendRewardWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiNode *v5; // ecx@3
  NiNode *v6; // esi@7
  bool v7; // zf@8
  NiAVObject *v9; // eax@12
  NiTexturingProperty *v10; // eax@12
  NiTexturingProperty *v11; // edi@12
  NiTexturingProperty::Map *v12; // eax@14
  NiSourceTexture *v13; // ebx@15
  PgSprData *v14; // eax@21
  PgSprData *v15; // edi@27
  PgFont *v16; // eax@29
  PgWinText *v17; // eax@29
  PgSprData *v18; // eax@29
  PgSprData::PgHitTester *v19; // eax@29
  unsigned int v20; // edi@29
  PgFont *v21; // eax@29
  PgWinText *v22; // eax@29
  PgSprData *v23; // eax@29
  PgSprData *v24; // eax@29
  PgWinSpr *v25; // edi@29
  int v26; // ST38_4@29
  int v27; // eax@29
  NiPointer<PgSprData::PgHitTester> *v28; // ecx@29
  unsigned int v29; // edi@29
  PgFont *v30; // eax@29
  PgWinText *v31; // eax@29
  PgSprData *v32; // edi@29
  PgWinBut *v33; // edi@29
  D3DXCOLOR v34; // ST2C_16@29
  char *v35; // eax@29
  PgWinText *v36; // eax@29
  PgWinText *v37; // edi@29
  NiRefObjectVtbl *v38; // ebx@29
  PgFont *v39; // eax@29
  UIUtil ui; // [sp+38h] [bp-38h]@27
  unsigned int uiWidth; // [sp+4Ch] [bp-24h]@27
  unsigned int uiHeight; // [sp+50h] [bp-20h]@27
  NiPointer<NiTexturingProperty> spTexProp; // [sp+54h] [bp-1Ch]@12
  int iLeft; // [sp+58h] [bp-18h]@21
  int iTop; // [sp+5Ch] [bp-14h]@21
  NiPointer<NiNode> spNode; // [sp+60h] [bp-10h]@1
  int v47; // [sp+6Ch] [bp-4h]@1
  PgFrameWork *pkFrameWorka; // [sp+78h] [bp+8h]@29
  PgFrameWork *pkFrameWorkb; // [sp+78h] [bp+8h]@29

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v47 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\AttendMsg.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = spNode.m_pObject;
  if ( !spNode.m_pObject )
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("Game\\AttendMsg.nif load fail", "LoadFail", 0);
      v5 = spNode.m_pObject;
    }
    v47 = -1;
    if ( !v5 )
      return 0;
    v6 = v5;
    if ( InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      return 0;
    v7 = v6 == 0;
    goto LABEL_9;
  }
  v9 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Frame");
  v10 = (NiTexturingProperty *)NiAVObject::GetProperty(v9, 8);
  v11 = v10;
  spTexProp.m_pObject = v10;
  if ( v10 )
    InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
  v12 = *v11->m_kMaps.m_pBase;
  LOBYTE(v47) = 1;
  if ( !v12 || (v13 = (NiSourceTexture *)v12->m_spTexture.m_pObject) == 0 )
  {
    LOBYTE(v47) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    v6 = spNode.m_pObject;
    v47 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v7 = v6 == 0;
    goto LABEL_9;
  }
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iLeft, &iTop, v13);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v14, 0, pkFrameWork, "AttendRewardWin", 0) )
  {
    LOBYTE(v47) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    v6 = spNode.m_pObject;
    v47 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v7 = v6 == 0;
LABEL_9:
    if ( !v7 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    return 0;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v47) = 2;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, 0, 0);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CloseBtnNor", &iLeft, &iTop, v13);
  PgSprData::Add(v15, (NiAVObject *)&spNode.m_pObject->vfptr, "CloseBtnClick");
  PgSprData::Add(v15, (NiAVObject *)&spNode.m_pObject->vfptr, "CloseBtnOver");
  PgWinCloseBut::CreateWin(iLeft, iTop, v15, (PgWin *)&v2->vfptr);
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Title", &iLeft, &iTop, &uiWidth, &uiHeight) )
  {
    LOBYTE(v47) = 1;
    UIUtil::~UIUtil(&ui);
    LOBYTE(v47) = 0;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
    v47 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  v16 = Font::Get(MAIN_MENU);
  v17 = PgWinText::CreateWin(iLeft, iTop, uiWidth, uiHeight, v16, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkTitleText = v17;
  ((void (__thiscall *)(PgWinText *))v17->vfptr[122].__vecDelDtor)(v17);
  ((void (__cdecl *)(_DWORD, signed int))v2->m_pkTitleText->vfptr[60].__vecDelDtor)(0, 5);
  v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iLeft, &iTop, v13);
  PgWinSpr::CreateWin(iLeft, iTop, v18, (PgWin *)&v2->vfptr, 0, 0);
  v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &iLeft, &iTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v20 = v19->m_uiHeight;
  pkFrameWorka = (PgFrameWork *)v19->m_uiWidth;
  v21 = Font::Get(MENU);
  v22 = PgWinText::CreateWin(iLeft, iTop, (unsigned int)pkFrameWorka, v20, v21, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkInfoText = v22;
  ((void (__thiscall *)(PgWinText *))v22->vfptr[117].__vecDelDtor)(v22);
  ((void (__cdecl *)(signed int, D3DXCOLOR *))v2->m_pkInfoText->vfptr[122].__vecDelDtor)(5, &Color::m_kDxBlackColor);
  v23 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &iLeft, &iTop, v13);
  PgWinSpr::CreateWin(iLeft, iTop, v23, (PgWin *)&v2->vfptr, 0, 0);
  v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Image", &iLeft, &iTop, 0);
  v25 = PgWinSpr::CreateWin(iLeft, iTop, v24, (PgWin *)&v2->vfptr, 0, 0);
  v26 = ((int (__thiscall *)(PgWinSpr *))v25->vfptr[42].__vecDelDtor)(v25);
  v27 = ((int (__thiscall *)(PgWinSpr *))v25->vfptr[41].__vecDelDtor)(v25);
  v2->m_pkItemIcon = ItemIcon::CreateWin(v27, v26, (PgWin *)&v2->vfptr);
  v28 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text02", &iLeft, &iTop, v13)->m_akHitTester.m_pBase;
  v29 = v28->m_pObject->m_uiHeight;
  pkFrameWorkb = (PgFrameWork *)v28->m_pObject->m_uiWidth;
  v30 = Font::Get(MENU);
  v31 = PgWinText::CreateWin(iLeft, iTop, (unsigned int)pkFrameWorkb, v29, v30, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkItemText = v31;
  v31->vfptr[117].__vecDelDtor((NiRefObject *)v31, (unsigned int)&Color::m_kDxBlackColor);
  ((void (__stdcall *)(signed int))v2->m_pkItemText->vfptr[122].__vecDelDtor)(4);
  v32 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "OkBtnNor", &iLeft, &iTop, v13);
  PgSprData::Add(v32, (NiAVObject *)&spNode.m_pObject->vfptr, "OkBtnClick");
  PgSprData::Add(v32, (NiAVObject *)&spNode.m_pObject->vfptr, "OkBtnOver");
  v33 = PgWinBut::CreateWin(iLeft, iTop, v32, (PgWin *)&v2->vfptr, 0, 0, 0);
  *(_QWORD *)&v34.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v34.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v35 = (char *)TextData::Get(0x4F5F499Fu);
  v36 = UIUtil::CreateAttachedText((PgWin *)&v33->vfptr, v35, v34, 5u);
  v37 = v36;
  v38 = v36->vfptr;
  v39 = Font::Get(MENU);
  v38[113].__vecDelDtor((NiRefObject *)v37, (unsigned int)v39);
  ((void (__thiscall *)(AttendRewardWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  LOBYTE(v47) = 1;
  UIUtil::~UIUtil(&ui);
  LOBYTE(v47) = 0;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
  v47 = -1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
  return 1;
}
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004D7CF0) --------------------------------------------------------
void __userpurge AttendRewardWin::SetItemInfo(AttendRewardWin *this@<ecx>, int a2@<ebx>, int a3@<edi>, const unsigned int uiRewardID, Item *const pkItem)
{
  AttendRewardWin *v5; // esi@1
  int v6; // edi@2
  int *v7; // eax@4
  int v8; // eax@5
  NiRefObjectVtbl *v9; // edi@7
  NiUnsharedGeometryGroup *v10; // eax@7
  NiRefObjectVtbl *v11; // edi@7
  NiRefObjectVtbl *v12; // edi@8
  NiUnsharedGeometryGroup *v13; // eax@9
  NiUnsharedGeometryGroup *v14; // eax@10
  int v15; // [sp-8h] [bp-Ch]@2
  unsigned int v16; // [sp-4h] [bp-8h]@9

  v5 = this;
  if ( pkItem )
  {
    v15 = a3;
    v6 = ITableBase<AttendReward,AttendRewardTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, const unsigned int))(*(_DWORD *)ITableBase<AttendReward,AttendRewardTab>::ms_pkTable
                                                                         + 16))(
                            ITableBase<AttendReward,AttendRewardTab>::ms_pkTable,
                            uiRewardID) )
    {
      if ( (unsigned __int16)uiRewardID <= *(_WORD *)(v6 + 200) )
      {
        v7 = (int *)(*(_DWORD *)(v6 + 196) + 4 * (unsigned __int16)uiRewardID);
        if ( *v7 )
        {
          v8 = *v7;
          if ( v8 )
          {
            if ( *(_DWORD *)(v8 + 1) )
            {
              v12 = v5->m_pkTitleText->vfptr;
              if ( *(_BYTE *)(v8 + 5) == 28 )
              {
                v13 = TextData2::Get(0x80CFF8D2);
                ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *, int, int))v12[118].__vecDelDtor)(
                  v5->m_pkTitleText,
                  v13,
                  v15,
                  a2);
                v16 = -2071488123;
              }
              else
              {
                v14 = TextData2::Get(0xD414371B);
                ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *, int, int))v12[118].__vecDelDtor)(
                  v5->m_pkTitleText,
                  v14,
                  v15,
                  a2);
                v16 = -1865223985;
              }
              v11 = v5->m_pkInfoText->vfptr;
              TextData2::Get(v16);
            }
            else
            {
              v9 = v5->m_pkTitleText->vfptr;
              v10 = TextData2::Get(0x6C9DDED9u);
              ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *, int, int))v9[118].__vecDelDtor)(
                v5->m_pkTitleText,
                v10,
                v15,
                a2);
              v11 = v5->m_pkInfoText->vfptr;
              TextData2::Get(0x69ADE1D1u);
            }
            ((void (__thiscall *)(PgWinText *))v11[118].__vecDelDtor)(v5->m_pkInfoText);
            ItemIcon::SetItem(v5->m_pkItemIcon, pkItem, 1);
            ((void (__cdecl *)(char *))v5->m_pkItemText->vfptr[118].__vecDelDtor)(pkItem->m_pkInfo->Name);
          }
        }
      }
    }
  }
}
// 4D7CF0: could not find valid save-restore pair for ebx
// 4D7CF0: could not find valid save-restore pair for edi
// A8C28C: using guessed type int ITableBase<AttendReward,AttendRewardTab>::ms_pkTable;

//----- (004D7E30) --------------------------------------------------------
AttendRewardWin *__cdecl AttendRewardWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  AttendRewardWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x168u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&AttendRewardWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&AttendRewardWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][1]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[136].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (AttendRewardWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9842DC: using guessed type void (__thiscall *AttendRewardWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9842FC: using guessed type int (__thiscall *AttendRewardWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004D7F90) --------------------------------------------------------
AttendRewardWin *__thiscall AttendRewardWin::`vector deleting destructor'(AttendRewardWin *this, unsigned int a2)
{
  AttendRewardWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&AttendRewardWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&AttendRewardWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9842DC: using guessed type void (__thiscall *AttendRewardWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9842FC: using guessed type int (__thiscall *AttendRewardWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004D7FD0) --------------------------------------------------------
void __thiscall BasicInfoTipWin::~BasicInfoTipWin(BasicInfoTipWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&BasicInfoTipWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&BasicInfoTipWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 984538: using guessed type void (__thiscall *BasicInfoTipWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 984554: using guessed type int (__thiscall *BasicInfoTipWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004D7FF0) --------------------------------------------------------
void __thiscall BasicInfoTipWin::AddText(BasicInfoTipWin *this, const char *pcText)
{
  BasicInfoTipWin *v2; // esi@1

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->m_pTextGeom->vfptr[37].__vecDelDtor)(pcText);
  ((void (__stdcall *)(_DWORD))v2->m_pTextGeom->vfptr[44].__vecDelDtor)(&v2->m_sBasicInfoTextColor);
  PgFadeTextGeometry::SetLifeTime(v2->m_pTextGeom, v2->m_fBasicInfoLifeTime);
}

//----- (004D8040) --------------------------------------------------------
void __thiscall BasicInfoTipWin::AddText(BasicInfoTipWin *this, const char *pcText, D3DXCOLOR sTextColor)
{
  BasicInfoTipWin *v3; // esi@1

  v3 = this;
  ((void (__stdcall *)(_DWORD))this->m_pTextGeom->vfptr[37].__vecDelDtor)(pcText);
  ((void (__stdcall *)(_DWORD))v3->m_pTextGeom->vfptr[44].__vecDelDtor)(&sTextColor);
  PgFadeTextGeometry::SetLifeTime(v3->m_pTextGeom, v3->m_fBasicInfoLifeTime);
}

//----- (004D8090) --------------------------------------------------------
void __thiscall BasicInfoTipWin::AddText(BasicInfoTipWin *this, const char *pcText, D3DXCOLOR sTextColor, const float fLifeTime)
{
  BasicInfoTipWin *v4; // esi@1

  v4 = this;
  ((void (__stdcall *)(_DWORD))this->m_pTextGeom->vfptr[37].__vecDelDtor)(pcText);
  ((void (__stdcall *)(_DWORD))v4->m_pTextGeom->vfptr[44].__vecDelDtor)(&sTextColor);
  PgFadeTextGeometry::SetLifeTime(v4->m_pTextGeom, fLifeTime);
}

//----- (004D80E0) --------------------------------------------------------
void __thiscall BasicInfoTipWin::Clear(BasicInfoTipWin *this)
{
  BasicInfoTipWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pTextGeom->vfptr[37].__vecDelDtor)(&unk_984530);
  PgFadeTextGeometry::SetLifeTime(v1->m_pTextGeom, -1.0);
}

//----- (004D8110) --------------------------------------------------------
BOOL __stdcall BasicInfoTipWin::ConfirmLevel(const unsigned int uiMinLevel, const unsigned int uiMaxLevel)
{
  return User::Lv(&g_kUser) >= uiMinLevel && User::Lv(&g_kUser) <= uiMaxLevel;
}

//----- (004D8140) --------------------------------------------------------
char __thiscall BasicInfoTipWin::Create(BasicInfoTipWin *this, PgFrameWork *pkFrameWork)
{
  BasicInfoTipWin *v2; // esi@1
  char result; // al@2
  PgFont *v4; // eax@3
  PgFont *v5; // edi@3
  unsigned int v6; // eax@4
  int v7; // ebx@4
  unsigned int v8; // ST1C_4@4
  unsigned int v9; // ST18_4@4
  NiSourceTexture *v10; // eax@4
  PgWinSpr *v11; // eax@4
  PgFadeTextGeometry *v12; // eax@4
  SpScreenText *v13; // eax@5
  PgFadeTextGeometry *v14; // eax@7
  tagRECT kDrawRect; // [sp+34h] [bp-20h]@4
  int v16; // [sp+50h] [bp-4h]@4

  v2 = this;
  if ( PgWinFrame::Create((PgWinFrame *)&this->vfptr, 0, 0, 0, pkFrameWork, "BasicInfoTipWin", 0)
    && (v4 = Font::Get(GTFONT), (v5 = v4) != 0) )
  {
    v6 = v4->m_uiDefHeight;
    v7 = 4 * v6;
    v8 = 4 * v6;
    v9 = PgWin::ms_uiScreenWidth;
    v10 = PgUtil::Create1PixelSourceTexture(0, 0, 0, -1);
    v11 = PgWinSpr::CreateWin(v10, 0, 0, v9, v8, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkSprWin = v11;
    v11->vfptr[64].__vecDelDtor((NiRefObject *)v11, 0);
    ((void (__stdcall *)(_DWORD))v2->m_pkSprWin->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkSprWin->vfptr[69].__vecDelDtor)(v2->m_fSprWinAlphaValue);
    SelectObject(v5->m_kFontRenderStuff.hDC, v5->m_hFont);
    SetRect(&kDrawRect, 0, 0, PgWin::ms_uiScreenWidth, v7);
    v12 = (PgFadeTextGeometry *)operator new(0x158u);
    v16 = 0;
    if ( v12 )
      PgFadeTextGeometry::PgFadeTextGeometry(v12, v5);
    else
      v13 = 0;
    v16 = -1;
    v2->m_pTextGeom = (PgFadeTextGeometry *)v13;
    SpScreenText::SetShadowOffset(v13, 0);
    ((void (__stdcall *)(tagRECT *))v2->m_pTextGeom->vfptr[34].__vecDelDtor)(&kDrawRect);
    v14 = v2->m_pTextGeom;
    v14->m_uiDrawFormat = 5;
    if ( v14->m_iAlignOption != 34 )
    {
      v14->m_iAlignOption = 34;
      v14->m_bInvalidate = 1;
    }
    ((void (__stdcall *)(D3DXCOLOR *))v2->m_pTextGeom->vfptr[44].__vecDelDtor)(&v2->m_sBasicInfoTextColor);
    NiAVObject::UpdateProperties((NiAVObject *)&v2->vfptr);
    v2->vfptr[39].__vecDelDtor((NiRefObject *)v2, v7);
    ((void (__thiscall *)(BasicInfoTipWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.67000002);
    ((void (__stdcall *)(PgFadeTextGeometry *, _DWORD))v2->m_pkSprWin->vfptr[29].__vecDelDtor)(v2->m_pTextGeom, 0);
    v2->vfptr[60].__vecDelDtor((NiRefObject *)v2, 0);
    v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 1u);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (004D8370) --------------------------------------------------------
void __thiscall BasicInfoTipWin::SetResoulution(BasicInfoTipWin *this, unsigned int uiWidth, unsigned int uiHeight)
{
  BasicInfoTipWin *v3; // esi@1
  int v4; // eax@4
  PgFadeTextGeometry *v5; // esi@4
  tagRECT kDrawRect; // [sp+14h] [bp-14h]@4

  v3 = this;
  if ( this->m_pkSprWin )
    ((void (__stdcall *)(_DWORD))this->m_pkSprWin->vfptr[117].__vecDelDtor)(uiWidth);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v3->vfptr[59].__vecDelDtor)(
    v3,
    uiWidth,
    uiHeight,
    0.5,
    0.67000002);
  if ( v3->m_pTextGeom )
  {
    v4 = ((int (*)(void))v3->m_pkSprWin->vfptr[51].__vecDelDtor)();
    SetRect(&kDrawRect, 0, 0, uiWidth, v4);
    ((void (__stdcall *)(_DWORD))v3->m_pTextGeom->vfptr[34].__vecDelDtor)(&kDrawRect);
    v5 = v3->m_pTextGeom;
    v5->m_uiDrawFormat = 5;
    if ( v5->m_iAlignOption != 34 )
    {
      v5->m_iAlignOption = 34;
      v5->m_bInvalidate = 1;
    }
  }
}

//----- (004D8450) --------------------------------------------------------
void __thiscall BasicInfoTipWin::Update(BasicInfoTipWin *this, float fCurTime)
{
  BasicInfoTipWin *v2; // esi@1
  PgWinSpr *v3; // ecx@1
  PgFadeTextGeometry *v4; // ecx@5
  double v5; // st7@7
  int v6; // eax@8
  unsigned int v7; // eax@9
  char *v8; // eax@13
  char *v9; // edi@13
  NiRefObjectVtbl *v10; // eax@15
  void *(__thiscall *v11)(NiRefObject *, unsigned int); // edx@15
  double v12; // st7@20
  PgFadeTextGeometry *v13; // eax@23
  PgWinSpr *v14; // ecx@23
  float fAlphab; // [sp+1Ch] [bp+8h]@20
  float fAlpha; // [sp+1Ch] [bp+8h]@20
  float fAlphaa; // [sp+1Ch] [bp+8h]@23

  v2 = this;
  v3 = this->m_pkSprWin;
  if ( v3 && v2->m_pTextGeom )
  {
    if ( !byte_B4FF94 )
    {
      v2->m_fBasicInfoTipTime = fCurTime;
      if ( !PgWin::IsVisible((PgWin *)&v3->vfptr) )
        return;
      v4 = v2->m_pTextGeom;
      if ( 1.0 == v4->m_fAlphaBlendValue )
        PgFadeTextGeometry::SetLifeTime(v4, 0.0);
    }
    v5 = fCurTime - v2->m_fBasicInfoTipTime;
    if ( v2->m_fBasicInfoTipCycle < v5 )
    {
      v6 = *(_DWORD *)(ITableBase<BasicInfoTip,BasicInfoTipTab>::ms_pkTable + 56);
      if ( v6 )
        v7 = *(_DWORD *)(v6 + 40);
      else
        v7 = 0;
      if ( v2->m_uiBasicInfoTipIndex >= v7 )
        v2->m_uiBasicInfoTipIndex = 0;
      v8 = CDataReader::GetRecord(
             (CDataReader *)(ITableBase<BasicInfoTip,BasicInfoTipTab>::ms_pkTable + 4),
             v2->m_uiBasicInfoTipIndex);
      v9 = v8;
      if ( v8 && (unsigned __int8)BasicInfoTipWin::ConfirmLevel((unsigned __int8)v8[288], (unsigned __int8)v8[289]) )
      {
        BasicInfoTipWin::Clear(v2);
        BasicInfoTipWin::AddText(v2, v9 + 32);
        ((void (__stdcall *)(signed int))v2->m_pkSprWin->vfptr[64].__vecDelDtor)(1);
        v5 = fCurTime;
        v10 = v2->vfptr;
        v2->m_fBasicInfoTipTime = fCurTime;
        v11 = v10[67].__vecDelDtor;
        v2->m_bBasicInfoTipAlphaValue = 1;
        ((void (__thiscall *)(BasicInfoTipWin *))v11)(v2);
      }
      ++v2->m_uiBasicInfoTipIndex;
    }
    if ( PgWin::IsVisible((PgWin *)&v2->m_pkSprWin->vfptr) )
    {
      if ( v2->m_bBasicInfoTipAlphaValue
        && (((void (*)(void))v2->m_pkSprWin->vfptr[70].__vecDelDtor)(), v2->m_fSprWinAlphaValue > v5) )
      {
        v12 = Timer::ms_fDeltaTime + Timer::ms_fDeltaTime;
        fAlphab = v12;
        ((void (*)(void))v2->m_pkSprWin->vfptr[70].__vecDelDtor)();
        fAlpha = v12 + fAlphab;
        if ( v2->m_fSprWinAlphaValue < (double)fAlpha )
          fAlpha = v2->m_fSprWinAlphaValue;
        ((void (__stdcall *)(_DWORD))v2->m_pkSprWin->vfptr[69].__vecDelDtor)(LODWORD(fAlpha));
      }
      else
      {
        v13 = v2->m_pTextGeom;
        v14 = v2->m_pkSprWin;
        v2->m_bBasicInfoTipAlphaValue = 0;
        fAlphaa = v13->m_fAlphaBlendValue;
        ((void (*)(void))v14->vfptr[70].__vecDelDtor)();
        if ( fAlphaa >= (double)fAlphaa )
          ((void (__stdcall *)(_DWORD))v2->m_pkSprWin->vfptr[69].__vecDelDtor)(LODWORD(fAlphaa));
        if ( 0.0 == fAlphaa )
          ((void (__stdcall *)(_DWORD))v2->m_pkSprWin->vfptr[64].__vecDelDtor)(0);
      }
    }
  }
}
// A8B980: using guessed type float Timer::ms_fDeltaTime;
// A8C1FC: using guessed type int ITableBase<BasicInfoTip,BasicInfoTipTab>::ms_pkTable;
// B4FF94: using guessed type char byte_B4FF94;

//----- (004D8680) --------------------------------------------------------
void __thiscall BasicInfoTipWin::BasicInfoTipWin(BasicInfoTipWin *this, const float fCycle)
{
  BasicInfoTipWin *v2; // esi@1

  v2 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v2->m_fBasicInfoTipTime = 0.0;
  v2->vfptr = (NiRefObjectVtbl *)&BasicInfoTipWin::`vftable'{for `NiNode'};
  v2->vfptr = (IDirectMessengerVtbl *)&BasicInfoTipWin::`vftable'{for `IDirectMessenger'};
  v2->m_uiBasicInfoTipIndex = 0;
  ColorInfoTable::GetDxColor(&v2->m_sBasicInfoTextColor, yellow);
  v2->m_fBasicInfoLifeTime = 10.0;
  v2->m_bBasicInfoTipAlphaValue = 0;
  v2->m_fBasicInfoTipCycle = fCycle;
  v2->m_pTextGeom = 0;
  v2->m_fSprWinAlphaValue = 0.30000001;
}
// 984538: using guessed type void (__thiscall *BasicInfoTipWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 984554: using guessed type int (__thiscall *BasicInfoTipWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004D8730) --------------------------------------------------------
BasicInfoTipWin *__cdecl BasicInfoTipWin::CreateWin(PgFrameWork *pkFrameWork, const float fCycle)
{
  PgWin *v2; // eax@1
  PgWin *v3; // eax@2
  PgWin *v4; // esi@2
  PgWin *v5; // edi@8
  BasicInfoTipWin *v6; // eax@14
  NiPointer<PgWin> result; // [sp+18h] [bp-10h]@1
  int v8; // [sp+24h] [bp-4h]@1

  v2 = (PgWin *)operator new(0x188u);
  result.m_pObject = v2;
  v8 = 0;
  if ( v2 )
  {
    BasicInfoTipWin::BasicInfoTipWin((BasicInfoTipWin *)v2, fCycle);
    v4 = v3;
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v8 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v4);
  if ( BasicInfoTipWin::Create((BasicInfoTipWin *)v4, pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v4->vfptr[89].__vecDelDtor)(v4);
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = (BasicInfoTipWin *)v4;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v4);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    v8 = -1;
    if ( v4 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
    v6 = 0;
  }
  return v6;
}

//----- (004D8870) --------------------------------------------------------
BasicInfoTipWin *__thiscall BasicInfoTipWin::`scalar deleting destructor'(BasicInfoTipWin *this, unsigned int a2)
{
  BasicInfoTipWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&BasicInfoTipWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&BasicInfoTipWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 984538: using guessed type void (__thiscall *BasicInfoTipWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 984554: using guessed type int (__thiscall *BasicInfoTipWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004D88B0) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::_Max(std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *_Pnode)
{
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *i; // ecx@1

  result = _Pnode;
  for ( i = _Pnode->_Right; !i->_Isnil; i = i->_Right )
    result = i;
  return result;
}

//----- (004D88D0) --------------------------------------------------------
__int64 __thiscall ShineDateTime::toTime_t(ShineDateTime *this)
{
  unsigned int v1; // eax@1
  unsigned int v2; // edx@1
  int v3; // ecx@1
  tm Time1; // [sp+0h] [bp-28h]@1

  v1 = (unsigned int)*this;
  v2 = *(unsigned int *)this >> 19;
  v3 = *(unsigned int *)this >> 25;
  Time1.tm_hour = v2 & 0x3F;
  Time1.tm_min = v3;
  Time1.tm_year = (unsigned __int8)v1 + 100;
  Time1.tm_sec = 0;
  Time1.tm_mday = (v1 >> 13) & 0x3F;
  Time1.tm_mon = ((v1 >> 8) & 0x1F) - 1;
  Time1.tm_isdst = -1;
  return _mktime64(&Time1);
}

//----- (004D8940) --------------------------------------------------------
void __thiscall StatusBuffWin::ResetIcons(StatusBuffWin *this)
{
  char *v1; // esi@1
  signed int v2; // edi@1

  v1 = (char *)this->m_apkAbstateBuf;
  v2 = 40;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v1 + 256))(0);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v1 + 240))(0);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v1 + 248))(0);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v1 + 40) + 256))(0);
    AbstateIcon::ClearDuplicateText(*((AbstateIcon **)v1 + 40));
    v1 += 4;
    --v2;
  }
  while ( v2 );
}

//----- (004D89A0) --------------------------------------------------------
void __thiscall StatusBuffWin::SetFrameBoxSize(StatusBuffWin *this, unsigned int uiWidth, unsigned int uiHeight)
{
  ((void (__stdcall *)(_DWORD, _DWORD))this->m_pkFrameBox.m_pObject->vfptr[135].__vecDelDtor)(uiWidth, uiHeight);
}

//----- (004D89C0) --------------------------------------------------------
void __thiscall StatusBuffWin::AlignBuf(StatusBuffWin *this, int row, int column)
{
  int v3; // edx@1
  signed int v4; // eax@1
  int v5; // ebx@4
  signed int v6; // edi@5
  int v7; // esi@5
  StatusBuffWin *v8; // [sp+0h] [bp-10h]@1
  int i; // [sp+4h] [bp-Ch]@1
  int v10; // [sp+8h] [bp-8h]@2
  int nCount; // [sp+Ch] [bp-4h]@1

  v3 = column;
  v4 = 0;
  v8 = this;
  nCount = 0;
  i = 0;
  if ( column > 0 )
  {
    v10 = 0;
    do
    {
      if ( v4 >= 40 )
        break;
      v5 = 0;
      if ( row > 0 )
      {
        v6 = 22;
        v7 = (int)&v8->m_apkAbstateBufIcon[v4];
        do
        {
          if ( v4 >= 40 )
            break;
          (*(void (__stdcall **)(int))(**(_DWORD **)(v7 - 160) + 172))(v6 - 2);
          (*(void (__stdcall **)(int))(**(_DWORD **)(v7 - 160) + 176))(v10);
          (*(void (__stdcall **)(signed int))(**(_DWORD **)v7 + 172))(v6);
          (*(void (__stdcall **)(int))(**(_DWORD **)v7 + 176))(v10 + 2);
          v4 = ++nCount;
          ++v5;
          v7 += 4;
          v6 += 20;
        }
        while ( v5 < row );
      }
      v3 = column;
      v10 += 20;
      ++i;
    }
    while ( i < column );
  }
  v8->m_uiVisiableNums = v3 * row;
}

//----- (004D8A90) --------------------------------------------------------
void __thiscall StatusBuffWin::SetBuffUI(StatusBuffWin *this, Char *pkMember, StateType type, int *AbstateNums)
{
  StatusBuffWin *v4; // esi@1
  NiTListItem<AbStateInst *> *v5; // eax@1
  unsigned int v6; // ecx@1
  int v7; // edi@2
  AbstateIcon **v8; // esi@2
  int v9; // ebx@5
  AbnormalStateViewInfo **v10; // eax@9
  AbStateInst *v11; // ebx@16
  double v12; // st7@16
  signed int v13; // eax@16
  char *v14; // eax@18
  char *v15; // ST0C_4@23
  AbstateIcon *v16; // ST14_4@23
  char *v17; // eax@23
  char *v18; // eax@23
  AbstateIcon *v19; // ecx@23
  int v20; // eax@28
  bool v21; // zf@28
  int *v22; // eax@28
  int v23; // eax@29
  int v24; // [sp-4h] [bp-18h]@18
  AbStateInst *pkAbState; // [sp+4h] [bp-10h]@5
  unsigned __int16 pkAbStatea; // [sp+4h] [bp-10h]@26
  StatusBuffWin *v27; // [sp+8h] [bp-Ch]@1
  NiTListItem<AbStateInst *> *kIter; // [sp+Ch] [bp-8h]@5
  unsigned __int16 pkInfo; // [sp+10h] [bp-4h]@5
  AbnormalStateViewInfo *pkInfoa; // [sp+10h] [bp-4h]@6
  AbnormalStateViewInfo *pkInfob; // [sp+10h] [bp-4h]@26
  unsigned int i; // [sp+1Ch] [bp+8h]@1

  v4 = this;
  v27 = this;
  v5 = AbStateInfectee::GetAbStateList((AbStateInfectee *)&pkMember->vfptr)->m_pkHead;
  v6 = *AbstateNums;
  i = *AbstateNums;
  if ( !v5 )
  {
    *AbstateNums = v6;
    return;
  }
  v7 = (int)&v4->m_apkAbstateBuf[v6];
  v8 = &v4->m_apkAbstateBufIcon[v6].m_pObject;
  while ( v6 < 0x28 )
  {
    v9 = ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;
    kIter = v5->m_pkNext;
    pkAbState = v5->m_element;
    pkInfo = pkAbState->kID;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable
                                                             + 16))(
                            ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable,
                            pkAbState->kID) )
    {
      if ( pkInfo <= *(_WORD *)(v9 + 200) )
      {
        v10 = (AbnormalStateViewInfo **)(*(_DWORD *)(v9 + 196) + 4 * pkInfo);
        if ( *v10 )
          pkInfoa = *v10;
        else
          pkInfoa = 0;
      }
      else
      {
        pkInfoa = 0;
      }
    }
    else
    {
      pkInfoa = 0;
    }
    if ( pkInfoa->View )
    {
      if ( v27->m_uiVisiableNums - 1 < i )
      {
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v7 + 256))(0);
        ((void (__stdcall *)(_DWORD))(*v8)->vfptr[64].__vecDelDtor)(0);
LABEL_32:
        ++i;
        ++v8;
        v7 += 4;
        goto LABEL_33;
      }
      if ( pkInfoa->TypeSort == type )
      {
        v11 = pkAbState;
        AbstateIcon::SetAbstate(*v8, pkAbState->kID);
        v12 = pkAbState->fLifeTime;
        v13 = (signed int)v12;
        if ( (unsigned int)(signed int)v12 > 0x927C0 )
        {
          v19 = *v8;
          v18 = pkInfoa->Descript;
        }
        else
        {
          if ( v13 < 60 )
          {
            v24 = v13 == 59 ? 59 : v13 + 1;
            v14 = (char *)TextData::Get(0x98B2A8E5);
          }
          else
          {
            v24 = (signed int)v12 / 60;
            v14 = (char *)TextData::Get(0x9CACA8F0);
          }
          v15 = fs(v14, v24);
          v16 = *v8;
          v17 = (char *)TextData::Get(0xEC4E4530);
          v18 = fs(v17, pkInfoa->Descript, "\n\n", v15);
          v19 = v16;
        }
        PgWin::SetToolTipWinText((PgWin *)&v19->vfptr, v18);
        (*v8)->m_pkToolTipWin = g_pkToolTipWin;
        ((void (__cdecl *)(signed int))(*v8)->vfptr[64].__vecDelDtor)(1);
        ((void (__cdecl *)(signed int))(*v8)->vfptr[60].__vecDelDtor)(1);
        ((void (__stdcall *)(signed int))(*v8)->vfptr[62].__vecDelDtor)(1);
        (*(void (__stdcall **)(signed int))(**(_DWORD **)v7 + 256))(1);
        ++i;
        ++v8;
        v7 += 4;
        if ( v11->uiSubStateStr )
        {
          pkAbStatea = v11->kID;
          pkInfob = (AbnormalStateViewInfo *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
          if ( (unsigned __int8)(*(int (__stdcall **)(_DWORD))(*(_DWORD *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable
                                                             + 16))(v11->kID) )
          {
            if ( pkAbStatea <= *(_WORD *)&pkInfob->Descript[130] )
            {
              v20 = *(_DWORD *)&pkInfob->Descript[126];
              v21 = *(_DWORD *)(v20 + 4 * pkAbStatea) == 0;
              v22 = (int *)(v20 + 4 * pkAbStatea);
              if ( !v21 )
              {
                v23 = *v22;
                if ( v23 )
                {
                  if ( *(_BYTE *)(v23 + 288) )
                  {
                    AbstateIcon::SetDuplicate(*v8, v11->uiSubStateStr);
                    ((void (__stdcall *)(signed int))(*v8)->vfptr[64].__vecDelDtor)(1);
                    ((void (__stdcall *)(signed int))(*v8)->vfptr[60].__vecDelDtor)(1);
                    ((void (__stdcall *)(signed int))(*v8)->vfptr[62].__vecDelDtor)(1);
                    (*(void (__stdcall **)(signed int))(**(_DWORD **)v7 + 256))(1);
                    goto LABEL_32;
                  }
                }
              }
            }
          }
        }
      }
    }
LABEL_33:
    v6 = i;
    if ( !kIter )
    {
      *AbstateNums = i;
      return;
    }
    v5 = kIter;
  }
  *AbstateNums = v6;
}
// 4D8A90: could not find valid save-restore pair for ebx
// 4D8A90: could not find valid save-restore pair for edi
// A8C2A0: using guessed type int ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
// A8C2A4: using guessed type int ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;

//----- (004D8D60) --------------------------------------------------------
void __thiscall StatusBuffWin::ProcessMeInput(StatusBuffWin *this, bool *bHit)
{
  StatusBuffWin *v2; // esi@1
  unsigned int v3; // ebx@3
  unsigned int v4; // ecx@3
  unsigned int v5; // edi@3
  unsigned int v6; // edx@3
  FrameBoxWin *v7; // edi@8
  int v8; // ST04_4@8
  unsigned int v9; // eax@8
  StatusBuffWin::EBUFF_TYPE v10; // eax@8
  int v11; // eax@9

  v2 = this;
  PgWinFrame::ProcessMeInput((PgWinFrame *)&this->vfptr, bHit);
  if ( dword_B6479C >= 1 && v2->IsFrameDraging )
  {
    v3 = ((int (*)(void))v2->m_pkFrameBox.m_pObject->vfptr[36].__vecDelDtor)();
    v4 = ((int (*)(void))v2->m_pkFrameBox.m_pObject->vfptr[37].__vecDelDtor)();
    v5 = v3 / 0x14;
    v6 = v4 / 0x14;
    if ( v3 % 0x14 > 0xA )
      ++v5;
    if ( v4 % 0x14 > 0xA )
      ++v6;
    ((void (__stdcall *)(_DWORD, _DWORD))v2->m_pkFrameBox.m_pObject->vfptr[135].__vecDelDtor)(20 * v5, 20 * v6);
    v2->IsFrameDraging = 0;
  }
  v7 = v2->m_pkFrameBox.m_pObject;
  v8 = ((int (__thiscall *)(_DWORD))v7->vfptr[37].__vecDelDtor)(v2->m_pkFrameBox.m_pObject) / 0x14u;
  v9 = ((int (__thiscall *)(_DWORD))v7->vfptr[36].__vecDelDtor)(v7);
  StatusBuffWin::AlignBuf(v2, v9 / 0x14, v8);
  v10 = v2->m_eBuffType;
  if ( v10 )
  {
    v11 = v10 - 1;
    if ( v11 )
    {
      if ( v11 == 1 )
      {
        MachineOpt::ms_kUserLoginOption.ChargedBufWidth = ((int (*)(void))v2->m_pkFrameBox.m_pObject->vfptr[36].__vecDelDtor)();
        MachineOpt::ms_kUserLoginOption.ChargedBufHeight = ((int (*)(void))v2->m_pkFrameBox.m_pObject->vfptr[37].__vecDelDtor)();
      }
    }
    else
    {
      MachineOpt::ms_kUserLoginOption.DBufWidth = ((int (*)(void))v2->m_pkFrameBox.m_pObject->vfptr[36].__vecDelDtor)();
      MachineOpt::ms_kUserLoginOption.DBufHeight = ((int (*)(void))v2->m_pkFrameBox.m_pObject->vfptr[37].__vecDelDtor)();
    }
  }
  else
  {
    MachineOpt::ms_kUserLoginOption.BufWidth = ((int (*)(void))v2->m_pkFrameBox.m_pObject->vfptr[36].__vecDelDtor)();
    MachineOpt::ms_kUserLoginOption.BufHeight = ((int (*)(void))v2->m_pkFrameBox.m_pObject->vfptr[37].__vecDelDtor)();
  }
}
// B6479C: using guessed type int dword_B6479C;

//----- (004D8F00) --------------------------------------------------------
void __stdcall StatusBuffWin::GetDayStr(char *MsgBuffer, int MsgBufSize, int Day)
{
  char *v4; // eax@1
  char *v5; // eax@1

  v4 = (char *)TextData2::Get(0x2E43F526u);
  v5 = fs(v4, Day);
  strncpy(MsgBuffer, v5, MsgBufSize);
}

//----- (004D8F30) --------------------------------------------------------
void __stdcall StatusBuffWin::GetHourStr(char *MsgBuffer, int MsgBufSize, int Hour)
{
  char *v4; // eax@1
  char *v5; // eax@1

  v4 = (char *)TextData2::Get(0x2A51F978u);
  v5 = fs(v4, Hour);
  strncpy(MsgBuffer, v5, MsgBufSize);
}

//----- (004D8F60) --------------------------------------------------------
void __stdcall StatusBuffWin::GetMinStr(char *MsgBuffer, int MsgBufSize, int Min)
{
  char *v4; // eax@1
  char *v5; // eax@1

  v4 = (char *)TextData2::Get(0x234BFE26u);
  v5 = fs(v4, Min);
  strncpy(MsgBuffer, v5, MsgBufSize);
}

//----- (004D8F90) --------------------------------------------------------
char *__stdcall StatusBuffWin::GetRemainTime(char *MsgBuffer, PROTO_CHARGEDBUFF_INFO *pkInfo)
{
  __int64 Sec; // ST24_8@3
  __int64 v4; // rax@3
  signed int v5; // edi@3
  signed int v6; // esi@3
  char *v7; // eax@5
  char *v8; // eax@5
  char *v9; // eax@5
  char *v10; // eax@5
  char *result; // eax@5
  char *v12; // eax@6
  char *v13; // eax@6
  char *v14; // eax@6
  char *v15; // eax@6
  char *v16; // eax@6
  char *v17; // eax@6
  char *v18; // eax@8
  char *v19; // eax@8
  char *v20; // eax@8
  char *v21; // eax@8
  int v22; // esi@9
  long double RemainTime; // [sp+14h] [bp-F8h]@3
  int Day; // [sp+20h] [bp-ECh]@3
  tm tb; // [sp+24h] [bp-E8h]@3
  char DayStr[64]; // [sp+48h] [bp-C4h]@3
  char HourStr[64]; // [sp+88h] [bp-84h]@3
  char MinStr[64]; // [sp+C8h] [bp-44h]@3

  if ( pkInfo && MsgBuffer )
  {
    qmemcpy(&tb, &Timer::ms_dLastServerTime, sizeof(tb));
    Sec = _mktime64(&tb);
    v4 = ShineDateTime::toTime_t(&pkInfo->EndTime);
    RemainTime = _difftime64(v4, Sec);
    Day = Timer::GetDay(RemainTime);
    v5 = Timer::GetHour(RemainTime);
    v6 = Timer::GetMin(RemainTime);
    DayStr[0] = 0;
    memset(&DayStr[1], 0, 0x3Fu);
    HourStr[0] = 0;
    memset(&HourStr[1], 0, 0x3Fu);
    MinStr[0] = 0;
    memset(&MinStr[1], 0, 0x3Fu);
    if ( RemainTime < 86400.0 )
    {
      if ( RemainTime < 3600.0 )
      {
        v22 = v6 % 60;
        if ( v22 )
        {
          StatusBuffWin::GetMinStr(MinStr, 64, v22);
          sprintf(MsgBuffer, "%s", MinStr);
          result = MsgBuffer;
        }
        else
        {
          StatusBuffWin::GetMinStr(MinStr, 64, 1);
          sprintf(MsgBuffer, "%s", MinStr);
          result = MsgBuffer;
        }
      }
      else
      {
        v18 = (char *)TextData2::Get(0x2A51F978u);
        v19 = fs(v18, v5 % 24);
        strncpy(HourStr, v19, 0x40u);
        v20 = (char *)TextData2::Get(0x234BFE26u);
        v21 = fs(v20, v6 % 60);
        strncpy(MinStr, v21, 0x40u);
        sprintf(MsgBuffer, "%s %s", HourStr, MinStr);
        result = MsgBuffer;
      }
    }
    else if ( v5 )
    {
      v12 = (char *)TextData2::Get(0x2E43F526u);
      v13 = fs(v12, Day);
      strncpy(DayStr, v13, 0x40u);
      v14 = (char *)TextData2::Get(0x2A51F978u);
      v15 = fs(v14, v5 % 24);
      strncpy(HourStr, v15, 0x40u);
      v16 = (char *)TextData2::Get(0x234BFE26u);
      v17 = fs(v16, v6 % 60);
      strncpy(MinStr, v17, 0x40u);
      sprintf(MsgBuffer, "%s %s %s", DayStr, HourStr, MinStr);
      result = MsgBuffer;
    }
    else
    {
      v7 = (char *)TextData2::Get(0x2E43F526u);
      v8 = fs(v7, Day);
      strncpy(DayStr, v8, 0x40u);
      v9 = (char *)TextData2::Get(0x234BFE26u);
      v10 = fs(v9, v6 % 60);
      strncpy(MinStr, v10, 0x40u);
      sprintf(MsgBuffer, "%s %s", DayStr, MinStr);
      result = MsgBuffer;
    }
  }
  else
  {
    result = "-";
  }
  return result;
}

//----- (004D9390) --------------------------------------------------------
char __thiscall StatusBuffWin::Create(StatusBuffWin *this, PgFrameWork *pkFrameWork, StatusBuffWin::EBUFF_TYPE type)
{
  StatusBuffWin *v3; // esi@1
  NiSourceTexture *v4; // ebx@1
  NiNode *v5; // esi@2
  bool v6; // zf@4
  const char *v8; // eax@10
  const char *v9; // ecx@11
  PgSprData *v10; // ebx@17
  NiNode *v11; // esi@18
  char *v12; // eax@26
  NiScreenElementsData *v13; // eax@31
  NiScreenElementsData *v14; // eax@32
  NiD3DDefaultShader *v15; // eax@32
  PgSprData::PgHitTester *v16; // eax@35
  unsigned int v17; // edx@35
  unsigned int v18; // eax@35
  NiScreenElementsData *v19; // ecx@35
  float fHeight; // ST3C_4@35
  float v21; // ST38_4@35
  NiScreenElements *v22; // eax@35
  NiTexturePalette *v23; // eax@35
  NiD3DDefaultShader *v24; // eax@36
  NiMaterialProperty *v25; // eax@38
  float v26; // edx@38
  NiMaterialProperty *v27; // eax@38
  float v28; // edx@38
  float v29; // edx@38
  NiMaterialProperty *v30; // eax@38
  float v31; // edx@38
  NiMaterialProperty *v32; // ebx@38
  NiTexturePalette *v33; // eax@38
  NiD3DDefaultShader *v34; // eax@39
  NiMaterialProperty *v35; // eax@41
  NiMaterialProperty *v36; // eax@41
  float v37; // edx@41
  float v38; // edx@41
  NiMaterialProperty *v39; // eax@41
  float v40; // edx@41
  NiMaterialProperty *v41; // ebx@41
  NiTexturePalette *v42; // eax@41
  NiTexturePalette *v43; // ebx@41
  NiAVObject *v44; // ecx@44
  NiTexturePalette *v45; // eax@44
  int v46; // eax@45
  int v47; // ebx@45
  int v48; // edx@47
  int v49; // ebx@47
  PgSprData *v50; // eax@47
  NiD3DDefaultShader *v51; // eax@47
  FrameBoxWin *v52; // eax@47
  FrameBoxWin *v53; // eax@47
  int v54; // edi@47
  NiSourceTexture *v55; // eax@47
  NiD3DDefaultShader *v56; // eax@47
  char *v57; // eax@47
  PopupMenuText *v58; // eax@47
  char *v59; // eax@47
  PopupMenuText *v60; // eax@47
  NiPointer<NiD3DDefaultShader> *v61; // edi@47
  NiTexturePalette *v62; // eax@58
  NiD3DDefaultShader *v63; // ecx@58
  NiTexturePalette *v64; // eax@63
  AbstateIcon *v65; // eax@68
  AbstateIcon *v66; // eax@69
  double v67; // st7@76
  float v68; // ST3C_4@82
  void *(__thiscall *v69)(NiRefObject *, unsigned int); // edx@83
  NiNode *v70; // esi@84
  NiNode *v71; // [sp+2Ch] [bp-74h]@52
  const char *fLeft; // [sp+30h] [bp-70h]@52
  int *fTop; // [sp+34h] [bp-6Ch]@52
  int *fWidth; // [sp+38h] [bp-68h]@52
  NiColorA kCommonValue; // [sp+50h] [bp-50h]@35
  NiTexturePalette *pTexturePalette; // [sp+60h] [bp-40h]@8
  void (__stdcall ***v77)(_DWORD); // [sp+64h] [bp-3Ch]@31
  int uiOrgY; // [sp+68h] [bp-38h]@1
  int uiOrgX; // [sp+6Ch] [bp-34h]@1
  int iPosX; // [sp+70h] [bp-30h]@1
  int iOffY; // [sp+74h] [bp-2Ch]@35
  int iPosY; // [sp+78h] [bp-28h]@51
  PgSprData *pkSprData; // [sp+7Ch] [bp-24h]@47
  unsigned int uiHeight; // [sp+80h] [bp-20h]@1
  int uiLeft; // [sp+84h] [bp-1Ch]@1
  int uiTop; // [sp+88h] [bp-18h]@1
  unsigned int uiWidth; // [sp+8Ch] [bp-14h]@1
  NiPointer<NiNode> spNode; // [sp+90h] [bp-10h]@1
  int v89; // [sp+9Ch] [bp-4h]@1
  PgFrameWork *pkFrameWorka; // [sp+A8h] [bp+8h]@47

  v3 = this;
  spNode.m_pObject = 0;
  v89 = 0;
  uiHeight = 0;
  uiWidth = 0;
  uiOrgY = 0;
  uiOrgX = 0;
  uiLeft = 0;
  uiTop = 0;
  v4 = MenuTexMgr::GetTexture(4u);
  iPosX = (int)v4;
  if ( !v4 )
  {
    v5 = spNode.m_pObject;
    v89 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      v6 = spNode.m_pObject == 0;
LABEL_5:
      if ( !v6 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
    return 0;
  }
  pTexturePalette = ::pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "Game\\BuffDeBuffWin.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, pTexturePalette);
  if ( !spNode.m_pObject )
    return 0;
  v9 = 0;
  if ( type )
  {
    if ( type == 1 )
    {
      v9 = "DeBuffBox";
    }
    else if ( type == 2 )
    {
      v9 = "ChargedBuff";
    }
  }
  else
  {
    v9 = "BuffBox";
  }
  v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, v9, &uiOrgX, &uiOrgY, v4);
  uiOrgY = 0;
  uiOrgX = 0;
  if ( !PgWinFrame::Create((PgWinFrame *)&v3->vfptr, 0, 0, v10, 0, pkFrameWork, "StatusbuffWin", 0) )
  {
    v11 = spNode.m_pObject;
    v89 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v11 )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    return 0;
  }
  if ( type == BUFF_UI )
  {
    v12 = (char *)TextData2::Get(0x96BEDFF2);
    goto LABEL_29;
  }
  if ( type == 1 )
  {
    v12 = (char *)TextData2::Get(0xDE13DBE2);
    goto LABEL_29;
  }
  if ( type == 2 )
  {
    v12 = (char *)TextData2::Get(0xD210AC17);
LABEL_29:
    PgWin::SetToolTipWinText((PgWin *)&v3->vfptr, v12);
  }
  *(float *)&pTexturePalette = COERCE_FLOAT(operator new(0xC4u));
  LOBYTE(v89) = 1;
  if ( *(float *)&pTexturePalette == 0.0 )
  {
    v15 = 0;
  }
  else
  {
    *(float *)&v13 = COERCE_FLOAT(operator new(0x70u));
    v77 = (void (__stdcall ***)(_DWORD))v13;
    LOBYTE(v89) = 2;
    if ( *(float *)&v13 == 0.0 )
    {
      LOBYTE(v89) = 1;
      NiScreenElements::NiScreenElements((NiScreenElements *)pTexturePalette, 0);
    }
    else
    {
      NiScreenElementsData::NiScreenElementsData(v13, 0, 1, 0, 1, 1, 4, 1, 2, 1);
      LOBYTE(v89) = 1;
      NiScreenElements::NiScreenElements((NiScreenElements *)pTexturePalette, v14);
    }
  }
  LOBYTE(v89) = 0;
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_spBackPlane, v15);
  NiScreenElementsData::Insert((NiScreenElementsData *)v3->m_spBackPlane.m_pObject->m_spModelData.m_pObject, 4u, 0, 0);
  v16 = v10->m_akHitTester.m_pBase->m_pObject;
  v17 = v16->m_uiHeight;
  v18 = v16->m_uiWidth;
  v19 = (NiScreenElementsData *)v3->m_spBackPlane.m_pObject->m_spModelData.m_pObject;
  *(float *)&v77 = (double)(uiOrgX + 1);
  *(float *)&pTexturePalette = (double)(uiOrgY + 1);
  iOffY = v18 - 2;
  v21 = (double)(v18 - 2);
  fHeight = (double)(v17 - 2);
  NiScreenElementsData::SetRectangle(v19, 0, *(float *)&v77, *(float *)&pTexturePalette, v21, fHeight);
  v22 = v3->m_spBackPlane.m_pObject;
  kCommonValue.r = 0.0;
  kCommonValue.g = 0.0;
  kCommonValue.b = 0.0;
  kCommonValue.a = 0.0;
  NiScreenElementsData::SetColors((NiScreenElementsData *)v22->m_spModelData.m_pObject, 0, &kCommonValue);
  *(float *)&v23 = COERCE_FLOAT(operator new(0x60u));
  pTexturePalette = v23;
  LOBYTE(v89) = 3;
  if ( *(float *)&v23 == 0.0 )
    v24 = 0;
  else
    NiMaterialProperty::NiMaterialProperty((NiMaterialProperty *)v23);
  LOBYTE(v89) = 0;
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_spMtrlProp, v24);
  v25 = v3->m_spMtrlProp.m_pObject;
  v25->m_amb.r = 255.0;
  v25->m_amb.g = 0.0;
  kCommonValue.g = 255.0;
  v25->m_amb.b = 0.0;
  v26 = kCommonValue.g;
  kCommonValue.b = 0.0;
  kCommonValue.a = 0.0;
  ++v25->m_uiRevID;
  v27 = v3->m_spMtrlProp.m_pObject;
  kCommonValue.g = 255.0;
  ++v27->m_uiRevID;
  v27->m_diff.r = v26;
  v28 = kCommonValue.b;
  kCommonValue.b = 0.0;
  v27->m_diff.g = v28;
  v29 = kCommonValue.a;
  kCommonValue.a = 0.0;
  v27->m_diff.b = v29;
  v30 = v3->m_spMtrlProp.m_pObject;
  v31 = kCommonValue.g;
  ++v30->m_uiRevID;
  v30->m_emit.r = v31;
  v30->m_emit.g = kCommonValue.b;
  v30->m_emit.b = kCommonValue.a;
  v32 = v3->m_spMtrlProp.m_pObject;
  ++v32->m_uiRevID;
  v32->m_fAlpha = 0.5;
  *(float *)&v33 = COERCE_FLOAT(operator new(0x60u));
  pTexturePalette = v33;
  LOBYTE(v89) = 4;
  if ( *(float *)&v33 == 0.0 )
    v34 = 0;
  else
    NiMaterialProperty::NiMaterialProperty((NiMaterialProperty *)v33);
  LOBYTE(v89) = 0;
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_spFixedMtrlProp, v34);
  v35 = v3->m_spFixedMtrlProp.m_pObject;
  v35->m_amb.r = 255.0;
  v35->m_amb.g = 0.0;
  kCommonValue.g = 255.0;
  v35->m_amb.b = 0.0;
  kCommonValue.b = 0.0;
  kCommonValue.a = 0.0;
  ++v35->m_uiRevID;
  v36 = v3->m_spFixedMtrlProp.m_pObject;
  kCommonValue.g = 255.0;
  ++v36->m_uiRevID;
  v36->m_diff.r = 255.0;
  v37 = kCommonValue.b;
  kCommonValue.b = 0.0;
  v36->m_diff.g = v37;
  v38 = kCommonValue.a;
  kCommonValue.a = 0.0;
  v36->m_diff.b = v38;
  v39 = v3->m_spFixedMtrlProp.m_pObject;
  v40 = kCommonValue.g;
  ++v39->m_uiRevID;
  v39->m_emit.r = v40;
  v39->m_emit.g = kCommonValue.b;
  v39->m_emit.b = kCommonValue.a;
  v41 = v3->m_spFixedMtrlProp.m_pObject;
  ++v41->m_uiRevID;
  v41->m_fAlpha = 0.0;
  NiAVObject::AttachProperty(
    (NiAVObject *)&v3->m_spBackPlane.m_pObject->vfptr,
    (NiProperty *)&v3->m_spMtrlProp.m_pObject->vfptr);
  *(float *)&v42 = COERCE_FLOAT(operator new(0x20u));
  v43 = v42;
  pTexturePalette = v42;
  LOBYTE(v89) = 5;
  if ( *(float *)&v42 == 0.0 )
  {
    v43 = 0;
  }
  else
  {
    NiObjectNET::NiObjectNET((NiObjectNET *)v42);
    v43->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
    LOWORD(v43[3].m_uiRefCount) = 236;
    BYTE2(v43[3].m_uiRefCount) = 0;
  }
  LOWORD(v43[3].m_uiRefCount) |= 1u;
  v44 = (NiAVObject *)&v3->m_spBackPlane.m_pObject->vfptr;
  LOBYTE(v89) = 0;
  NiAVObject::AttachProperty(v44, (NiProperty *)v43);
  *(float *)&v45 = COERCE_FLOAT(operator new(0x44u));
  pTexturePalette = v45;
  LOBYTE(v89) = 6;
  if ( *(float *)&v45 == 0.0 )
  {
    v47 = 0;
  }
  else
  {
    NiTexturingProperty::NiTexturingProperty((NiTexturingProperty *)v45);
    v47 = v46;
  }
  LOBYTE(v89) = 0;
  NiTexturingProperty::SetBaseTexture((NiTexturingProperty *)v47, (NiTexture *)iPosX);
  NiTexturingProperty::SetBaseFilterMode((NiTexturingProperty *)v47, 0);
  *(_DWORD *)(v47 + 28) = 2;
  NiAVObject::AttachProperty((NiAVObject *)&v3->m_spBackPlane.m_pObject->vfptr, (NiProperty *)v47);
  NiScreenElementsData::UpdateBound((NiScreenElementsData *)v3->m_spBackPlane.m_pObject->m_spModelData.m_pObject);
  NiAVObject::UpdateProperties((NiAVObject *)&v3->m_spBackPlane.m_pObject->vfptr);
  NiAVObject::Update((NiAVObject *)&v3->m_spBackPlane.m_pObject->vfptr, 0.0, 1);
  ((void (__thiscall *)(StatusBuffWin *, NiScreenElements *, _DWORD))v3->vfptr[29].__vecDelDtor)(
    v3,
    v3->m_spBackPlane.m_pObject,
    0);
  v48 = uiOrgY;
  v49 = uiOrgX;
  v3->m_pkToolTipWin = g_pkToolTipWin;
  iOffY = v48;
  v50 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ReSizeBox", &uiLeft, &uiTop, 0);
  pkSprData = v50;
  v51 = (NiD3DDefaultShader *)FrameBoxWin::CreateWin(
                                v50->m_spTexture.m_pObject,
                                7u,
                                7u,
                                uiLeft - v49,
                                uiTop - iOffY,
                                (PgWin *)&v3->vfptr,
                                pkFrameWork);
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_pkFrameBox, v51);
  ((void (__stdcall *)(_DWORD))v3->m_pkFrameBox.m_pObject->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(unsigned int, unsigned int))v3->m_pkFrameBox.m_pObject->vfptr[135].__vecDelDtor)(
    pkSprData->m_akHitTester.m_pBase->m_pObject->m_uiWidth,
    pkSprData->m_akHitTester.m_pBase->m_pObject->m_uiHeight);
  ((void (__stdcall *)(_DWORD))v3->m_pkFrameBox.m_pObject->vfptr[130].__vecDelDtor)(0);
  v3->m_pkFrameBox.m_pObject->m_bSizeDraggable = 1;
  v52 = v3->m_pkFrameBox.m_pObject;
  v52->m_iSizeDragMaxWidth = 600;
  v52->m_iSizeDragMinWidth = 20;
  v53 = v3->m_pkFrameBox.m_pObject;
  v53->m_iSizeDragMinHeight = 20;
  v53->m_iSizeDragMaxHeight = 400;
  v54 = (int)v3->m_pkFrameBox.m_pObject;
  (*(void (__thiscall **)(FrameBoxWin *, _DWORD))(*(_DWORD *)v54 + 256))(v3->m_pkFrameBox.m_pObject, 0);
  v55 = MenuTexMgr::GetTexture(1u);
  v56 = (NiD3DDefaultShader *)PopupMenuWin::CreateWin(v55, 4u, 4u, 0);
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_spPopupMenu, v56);
  v3->m_spPopupMenu.m_pObject->vfptr->SetMsgHooker(&v3->m_spPopupMenu.m_pObject->vfptr, &v3->vfptr);
  PopupMenuWin::Clear(v3->m_spPopupMenu.m_pObject);
  v57 = (char *)TextData2::Get(0x8A03D3F2);
  v58 = PopupMenuText::CreateWin(v57, 0, 0, 0, 0, 0, 0);
  v58->m_ePopupMenuID = 1014;
  PopupMenuWin::AddMenu(v3->m_spPopupMenu.m_pObject, v54, (PopupMenu *)&v58->vfptr);
  v59 = (char *)TextData2::Get(0x9515DEF1);
  v60 = PopupMenuText::CreateWin(v59, 0, 0, 0, 0, 0, 0);
  v60->m_ePopupMenuID = 1013;
  PopupMenuWin::AddMenu(v3->m_spPopupMenu.m_pObject, v54, (PopupMenu *)&v60->vfptr);
  PopupMenuWin::FinishMenu(v3->m_spPopupMenu.m_pObject, 0);
  v3->m_spPopupMenu.m_pObject->vfptr[64].__vecDelDtor((NiRefObject *)v3->m_spPopupMenu.m_pObject, 0);
  pkFrameWorka = (PgFrameWork *)1;
  v61 = (NiPointer<NiD3DDefaultShader> *)v3->m_apkAbstateBufIcon;
  while ( type )
  {
    if ( type == 1 )
    {
      if ( !PgUtil::GetTriShapeRect(
              (NiAVObject *)&spNode.m_pObject->vfptr,
              "CharDeBuffBox00",
              &iPosX,
              &iPosY,
              &uiWidth,
              &uiHeight) )
        goto LABEL_77;
      fWidth = &uiTop;
      fTop = &uiLeft;
      fLeft = "CharDeBuffBox00";
      v71 = spNode.m_pObject;
    }
    else
    {
      if ( type != 2 )
        goto LABEL_58;
      if ( !PgUtil::GetTriShapeRect(
              (NiAVObject *)&spNode.m_pObject->vfptr,
              "ChargedBuffBox",
              &iPosX,
              &iPosY,
              &uiWidth,
              &uiHeight) )
        goto LABEL_77;
      fWidth = &uiTop;
      fTop = &uiLeft;
      fLeft = "ChargedBuffBox";
      v71 = spNode.m_pObject;
    }
LABEL_57:
    pkSprData = PgSprData::Create((NiAVObject *)&v71->vfptr, fLeft, fTop, fWidth, 0);
LABEL_58:
    *(float *)&v62 = COERCE_FLOAT(PgWinSpr::CreateWin(uiLeft + uiWidth * (_DWORD)pkFrameWorka - v49, uiTop - iOffY, pkSprData, (PgWin *)&v3->vfptr, 0, 0));
    v63 = v61[-40].m_pObject;
    pTexturePalette = v62;
    v77 = (void (__stdcall ***)(_DWORD))v63;
    if ( (NiTexturePalette *)v63 != v62 )
    {
      if ( *(float *)&v63 != 0.0 && !InterlockedDecrement((volatile LONG *)&v63->m_uiRefCount) && *(float *)&v77 != 0.0 )
        (**v77)(1);
      v64 = pTexturePalette;
      v61[-40].m_pObject = (NiD3DDefaultShader *)pTexturePalette;
      if ( v64 )
        InterlockedIncrement((volatile LONG *)&v64->m_uiRefCount);
    }
    ((void (__stdcall *)(_DWORD))v61[-40].m_pObject->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v61[-40].m_pObject->vfptr[64].__vecDelDtor)(0);
    if ( type )
    {
      if ( type != 1 )
      {
        if ( type == 2 )
        {
          v65 = AbstateIcon::CreateWin(
                  uiWidth * (_DWORD)pkFrameWorka - v49 + iPosX + 2,
                  iPosY - iOffY + 2,
                  uiWidth - 4,
                  uiHeight - 4,
                  (PgWin *)&v3->vfptr,
                  0);
          NiPointer<PopupMenuWin>::operator=(v61, (NiD3DDefaultShader *)v65);
          LOBYTE(v61->m_pObject[1].m_kClippedProjectedShadows.vfptr) = 1;
        }
        goto LABEL_72;
      }
      v66 = AbstateIcon::CreateWin(
              uiWidth * (_DWORD)pkFrameWorka - v49 + iPosX + 2,
              iPosY - iOffY + 2,
              uiWidth - 4,
              uiHeight - 4,
              (PgWin *)&v3->vfptr,
              0);
    }
    else
    {
      v66 = AbstateIcon::CreateWin(
              uiWidth * (_DWORD)pkFrameWorka - v49 + iPosX + 2,
              iPosY - iOffY + 2,
              uiWidth - 4,
              uiHeight - 4,
              (PgWin *)&v3->vfptr,
              1);
    }
    NiPointer<PopupMenuWin>::operator=(v61, (NiD3DDefaultShader *)v66);
LABEL_72:
    ((void (__stdcall *)(_DWORD))v61->m_pObject->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v61->m_pObject->vfptr[64].__vecDelDtor)(0);
    pkFrameWorka = (PgFrameWork *)((char *)pkFrameWorka + 1);
    ++v61;
    if ( (signed int)(&pkFrameWorka[-1].m_bInit + 3) >= 40 )
    {
      StatusBuffWin::AlignBuf(v3, 20, 1);
      v3->m_eBuffType = type;
      if ( type )
      {
        if ( type == 1 )
        {
          ((void (__thiscall *)(StatusBuffWin *, unsigned int, unsigned int, _DWORD, _DWORD))v3->vfptr[59].__vecDelDtor)(
            v3,
            PgWin::ms_uiScreenWidth,
            PgWin::ms_uiScreenHeight,
            0.1,
            0.25999999);
        }
        else if ( type == 2 )
        {
          v67 = 0.28799999;
          goto LABEL_82;
        }
      }
      else
      {
        v67 = 0.22;
LABEL_82:
        v68 = v67;
        ((void (__thiscall *)(StatusBuffWin *, unsigned int, unsigned int, _DWORD, _DWORD))v3->vfptr[59].__vecDelDtor)(
          v3,
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          0.1,
          LODWORD(v68));
      }
      v69 = v3->vfptr[130].__vecDelDtor;
      v3->m_fLastUpdatedTime = 0.0;
      v69((NiRefObject *)&v3->vfptr, 1u);
      v89 = -1;
      if ( spNode.m_pObject )
      {
        v70 = spNode.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
        {
          if ( v70 )
            v70->vfptr->__vecDelDtor((NiRefObject *)v70, 1u);
        }
      }
      return 1;
    }
  }
  if ( PgUtil::GetTriShapeRect(
         (NiAVObject *)&spNode.m_pObject->vfptr,
         "CharBuffBox00",
         &iPosX,
         &iPosY,
         &uiWidth,
         &uiHeight) )
  {
    fWidth = &uiTop;
    fTop = &uiLeft;
    fLeft = "CharBuffBox00";
    v71 = spNode.m_pObject;
    goto LABEL_57;
  }
LABEL_77:
  v5 = spNode.m_pObject;
  v89 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
  {
    v6 = v5 == 0;
    goto LABEL_5;
  }
  return 0;
}
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004D9E10) --------------------------------------------------------
char __thiscall StatusBuffWin::RefreshChargedBuffIcon(StatusBuffWin *this, ChargedIconItem *pkInfo, PROTO_CHARGEDBUFF_INFO *pkBuffInfo, int BufNum)
{
  StatusBuffWin *v4; // edi@1
  char result; // al@2
  PgWin *v6; // ST30_4@3
  char *v7; // ST0C_4@3
  NiUnsharedGeometryGroup *v8; // eax@3
  char *v9; // eax@3
  int v10; // eax@3
  char *v11; // esi@7
  unsigned int v12; // eax@7
  unsigned int v13; // ecx@7
  unsigned int v14; // esi@7
  const char *v15; // eax@9
  int v16; // eax@11
  bool v17; // zf@11
  signed int v18; // eax@13
  char *v19; // eax@20
  char *v20; // [sp+10h] [bp-C4h]@7
  unsigned int RecordNo; // [sp+18h] [bp-BCh]@6
  unsigned int v22; // [sp+1Ch] [bp-B8h]@4
  const char *v23; // [sp+20h] [bp-B4h]@3
  bool v24; // [sp+27h] [bp-ADh]@16
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v25; // [sp+28h] [bp-ACh]@7
  char acToolTipMsg[128]; // [sp+44h] [bp-90h]@3
  int v27; // [sp+D0h] [bp-4h]@16

  v4 = this;
  if ( pkInfo )
  {
    acToolTipMsg[0] = 0;
    memset(&acToolTipMsg[1], 0, 0x7Fu);
    v6 = (PgWin *)&v4->m_apkAbstateBufIcon[BufNum].m_pObject->vfptr;
    v7 = StatusBuffWin::GetRemainTime(acToolTipMsg, pkBuffInfo);
    v8 = TextData::Get(0xEC4E4539);
    v9 = fs("%s\n\n%s: %s", pkInfo->Descript, v8, v7);
    PgWin::SetToolTipWinText(v6, v9);
    v4->m_apkAbstateBufIcon[BufNum].m_pObject->m_pkToolTipWin = g_pkToolTipWin;
    AbstateIcon::SetIconFile(v4->m_apkAbstateBufIcon[BufNum].m_pObject, pkInfo->IconFile, pkInfo->IconIndex);
    ((void (__stdcall *)(signed int))v4->m_apkAbstateBufIcon[BufNum].m_pObject->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(signed int))v4->m_apkAbstateBufIcon[BufNum].m_pObject->vfptr[60].__vecDelDtor)(1);
    ((void (__stdcall *)(signed int))v4->m_apkAbstateBufIcon[BufNum].m_pObject->vfptr[62].__vecDelDtor)(1);
    ((void (__stdcall *)(signed int))v4->m_apkAbstateBuf[BufNum].m_pObject->vfptr[64].__vecDelDtor)(1);
    v10 = *(_DWORD *)(ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>::ms_pkTable + 56);
    v23 = pkInfo->CI_Inx;
    if ( v10 )
      v22 = *(_DWORD *)(v10 + 40);
    else
      v22 = 0;
    RecordNo = 0;
    if ( v22 <= 0 )
    {
LABEL_20:
      v19 = 0;
    }
    else
    {
      while ( 1 )
      {
        v11 = CDataReader::GetRecord(
                (CDataReader *)(ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>::ms_pkTable + 4),
                RecordNo);
        v20 = v11;
        v25._Myres = 15;
        v25._Mysize = 0;
        v25._Bx._Buf[0] = 0;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v25, v11, strlen(v11));
        v12 = strlen(v23);
        v13 = v25._Mysize;
        v14 = v12;
        if ( v25._Mysize >= v12 )
          v13 = v12;
        v15 = v25._Bx._Ptr;
        if ( v25._Myres < 0x10 )
          v15 = (const char *)&v25;
        v16 = std::char_traits<char>::compare(v15, v23, v13);
        v17 = v16 == 0;
        if ( !v16 )
        {
          if ( v25._Mysize >= v14 )
            v18 = v25._Mysize != v14;
          else
            v18 = -1;
          v17 = v18 == 0;
        }
        v24 = v17;
        v27 = -1;
        if ( v25._Myres >= 0x10 )
          operator delete(v25._Bx._Ptr);
        v25._Myres = 15;
        v25._Mysize = 0;
        v25._Bx._Buf[0] = 0;
        if ( v24 )
          break;
        if ( ++RecordNo >= v22 )
          goto LABEL_20;
      }
      v19 = v20;
    }
    v4->m_apkAbstateBufIcon[BufNum].m_pObject->m_bEraseEnable = v19 != 0;
    v4->m_apkAbstateBufIcon[BufNum].m_pObject->m_pkChargedBuffInfo = pkBuffInfo;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C1F0: using guessed type int ITableBase<ChargedDeletableBuff,ChargedDeletableBuffTab>::ms_pkTable;

//----- (004DA0E0) --------------------------------------------------------
void __thiscall StatusBuffWin::RemoveMsgItemToMap(StatusBuffWin *this, char *pcKeyName)
{
  StatusBuffWin *v2; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v3; // edi@2
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > result; // [sp+10h] [bp-30h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Keyval; // [sp+14h] [bp-2Ch]@2
  int v6; // [sp+3Ch] [bp-4h]@2

  v2 = this;
  if ( pcKeyName )
  {
    _Keyval._Myres = 15;
    _Keyval._Mysize = 0;
    _Keyval._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Keyval, pcKeyName, strlen(pcKeyName));
    v6 = 0;
    v3 = std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::find(
           (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *)&v2->m_ChargedMsgNotice,
           &result,
           &_Keyval)->_Ptr;
    v6 = -1;
    if ( _Keyval._Myres >= 0x10 )
      operator delete(_Keyval._Bx._Ptr);
    if ( v3 != (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v2->m_ChargedMsgNotice._Myhead )
      std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,CAbstractProperty *>>,0>>::erase(
        (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > *)&v2->m_ChargedMsgNotice,
        (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > *)&result,
        (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > >)v3);
  }
}

//----- (004DA1B0) --------------------------------------------------------
void __thiscall StatusBuffWin::RemoveAllMsgItemFromMap(StatusBuffWin *this)
{
  StatusBuffWin *v1; // edi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,bool,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,bool> >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *v3; // esi@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > v4; // ecx@2
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *v5; // eax@3
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *j; // eax@4
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *i; // eax@7
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > result; // [sp+8h] [bp-4h]@11

  v1 = this;
  v2 = this->m_ChargedMsgNotice._Myhead;
  v3 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *)v2->_Left;
  if ( v2->_Left != v2 )
  {
    do
    {
      v4._Ptr = v3;
      if ( !v3->_Isnil )
      {
        v5 = v3->_Right;
        if ( v5->_Isnil )
        {
          for ( i = v3->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v3 != i->_Right )
              break;
            v3 = i;
          }
          v3 = i;
        }
        else
        {
          v3 = v3->_Right;
          for ( j = v5->_Left; !j->_Isnil; j = j->_Left )
            v3 = j;
        }
      }
      std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,CAbstractProperty *>>,0>>::erase(
        (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > *)&v1->m_ChargedMsgNotice,
        &result,
        v4);
    }
    while ( v3 != (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *)v1->m_ChargedMsgNotice._Myhead );
  }
}

//----- (004DA230) --------------------------------------------------------
void __thiscall StatusBuffWin::AddMsgItemToMap(StatusBuffWin *this, char *pcKeyName)
{
  StatusBuffWin *v2; // edi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v3; // edi@2
  std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,bool,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,bool> >,0> > *v4; // esi@7
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v5; // eax@7
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > >,bool> result; // [sp+10h] [bp-5Ch]@2
  StatusBuffWin *v7; // [sp+18h] [bp-54h]@1
  std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,bool,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,bool> >,0> > *v8; // [sp+1Ch] [bp-50h]@2
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,bool> NewElement; // [sp+20h] [bp-4Ch]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Keyval; // [sp+40h] [bp-2Ch]@2
  int v11; // [sp+68h] [bp-4h]@2

  v2 = this;
  v7 = this;
  if ( pcKeyName )
  {
    NewElement.first._Myres = 15;
    NewElement.first._Mysize = 0;
    NewElement.first._Bx._Buf[0] = 0;
    NewElement.second = 0;
    _Keyval._Myres = 15;
    v11 = 0;
    _Keyval._Mysize = 0;
    _Keyval._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Keyval, pcKeyName, strlen(pcKeyName));
    LOBYTE(v11) = 1;
    v8 = (std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,bool,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,bool> >,0> > *)&v2->m_ChargedMsgNotice.comp;
    v3 = std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::find(
           (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *)&v2->m_ChargedMsgNotice,
           (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > *)&result.second,
           &_Keyval)->_Ptr;
    LOBYTE(v11) = 0;
    if ( _Keyval._Myres >= 0x10 )
      operator delete(_Keyval._Bx._Ptr);
    if ( v3 == (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v7->m_ChargedMsgNotice._Myhead )
    {
      _Keyval._Myres = 15;
      _Keyval._Mysize = 0;
      _Keyval._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &_Keyval,
        pcKeyName,
        strlen(pcKeyName));
      LOBYTE(v11) = 2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&NewElement.first, &_Keyval);
      LOBYTE(v11) = 0;
      if ( _Keyval._Myres >= 0x10 )
        operator delete(_Keyval._Bx._Ptr);
      v4 = v8;
      NewElement.second = 0;
      v5 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,bool,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,bool>>,0>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,bool> &>(v8, &NewElement);
      std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::_Linsert(
        (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > *)v4,
        &result,
        v5,
        0);
    }
    else
    {
      LOBYTE(v3->_Myval.second.m_pObject) = 0;
    }
    if ( NewElement.first._Myres >= 0x10 )
      operator delete(NewElement.first._Bx._Ptr);
  }
}

//----- (004DA380) --------------------------------------------------------
void __thiscall StatusBuffWin::RefreshChargedBuffMsg(StatusBuffWin *this, ChargedMessageItem *pkInfo, PROTO_CHARGEDBUFF_INFO *pkBuffInfo)
{
  StatusBuffWin *v3; // ebx@1
  __int64 v4; // ST08_8@3
  __int64 v5; // rax@3
  long double v6; // st7@3
  char *v7; // esi@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v8; // eax@5
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v9; // edi@5
  ItemInfo *v10; // eax@5
  GameFrameWork *v11; // edi@8
  int v12; // ST0C_4@8
  int v13; // ST08_4@8
  char *v14; // eax@8
  const char *v15; // eax@8
  int v16; // ST08_4@19
  GameFrameWork *v17; // ebx@19
  char *v18; // eax@19
  const char *v19; // eax@19
  signed int v20; // [sp-4h] [bp-58h]@13
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > result; // [sp+10h] [bp-44h]@5
  long double pkItem; // [sp+14h] [bp-40h]@1
  int Min; // [sp+1Ch] [bp-38h]@1
  tm tb; // [sp+20h] [bp-34h]@3
  int v25; // [sp+50h] [bp-4h]@5

  v3 = this;
  Min = (int)pkInfo;
  HIDWORD(pkItem) = pkBuffInfo;
  if ( pkInfo )
  {
    if ( pkBuffInfo )
    {
      qmemcpy(&tb, &Timer::ms_dLastServerTime, sizeof(tb));
      v4 = _mktime64(&tb);
      v5 = ShineDateTime::toTime_t((ShineDateTime *)(HIDWORD(pkItem) + 10));
      v6 = _difftime64(v5, v4);
      pkItem = v6;
      if ( v6 <= 3600.0 && v6 > 2.0 )
      {
        v7 = (char *)(Min + 2);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
          (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&tb.tm_hour,
          (const char *)(Min + 2));
        v25 = 0;
        v9 = std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::find(
               (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *)&v3->m_ChargedMsgNotice,
               &result,
               v8)->_Ptr;
        v25 = -1;
        std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&tb.tm_hour);
        Min = (signed int)(pkItem / 60.0);
        v10 = ItemInfoTab::GetByInxName(v7);
        HIDWORD(pkItem) = v10;
        if ( v10 )
        {
          if ( Min == 5 )
          {
            if ( v9 != (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v3->m_ChargedMsgNotice._Myhead )
            {
              v11 = (GameFrameWork *)v3->m_pkFrameWork;
              v12 = Min;
              v13 = (int)v10->Name;
              v14 = (char *)TextData2::Get(0x163FFB3Cu);
              v15 = fs(v14, v13, v12);
              GameFrameWork::AddSysMsg(v11, v15);
              StatusBuffWin::RemoveMsgItemToMap(v3, v7);
            }
            return;
          }
          if ( Min == 60 )
          {
            if ( v9 == (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v3->m_ChargedMsgNotice._Myhead )
            {
              StatusBuffWin::AddMsgItemToMap(v3, v7);
              v10 = (ItemInfo *)HIDWORD(pkItem);
            }
            if ( !LOBYTE(v9->_Myval.second.m_pObject) )
            {
              v20 = 60;
LABEL_19:
              v16 = (int)v10->Name;
              LOBYTE(v9->_Myval.second.m_pObject) = 1;
              v17 = (GameFrameWork *)v3->m_pkFrameWork;
              v18 = (char *)TextData2::Get(0x163FFB3Cu);
              v19 = fs(v18, v16, v20);
              GameFrameWork::AddSysMsg(v17, v19);
              return;
            }
          }
          else if ( Min == 30 )
          {
            if ( v9 == (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v3->m_ChargedMsgNotice._Myhead )
            {
              StatusBuffWin::AddMsgItemToMap(v3, v7);
              v10 = (ItemInfo *)HIDWORD(pkItem);
            }
            if ( !LOBYTE(v9->_Myval.second.m_pObject) )
            {
              v20 = 30;
              goto LABEL_19;
            }
          }
          else if ( v9 == (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v3->m_ChargedMsgNotice._Myhead )
          {
            StatusBuffWin::AddMsgItemToMap(v3, v7);
          }
          else
          {
            LOBYTE(v9->_Myval.second.m_pObject) = 0;
          }
        }
      }
    }
  }
}

//----- (004DA570) --------------------------------------------------------
void __thiscall StatusBuffWin::RefreshChargedItems(StatusBuffWin *this, int *BufNum)
{
  int (__thiscall **v2)(void *, char); // eax@1
  int *v3; // edi@2
  PROTO_CHARGEDBUFF_INFO *v4; // eax@5
  unsigned __int16 v5; // bx@6
  unsigned int v6; // esi@6
  char *v7; // eax@7
  const char *v8; // esi@11
  ChargedIconItem *v9; // ebx@11
  ChargedMessageItem *pkMsgItem; // [sp+0h] [bp-Ch]@11
  int (__thiscall **iter)(void *, char); // [sp+4h] [bp-8h]@5
  StatusBuffWin *v12; // [sp+8h] [bp-4h]@1
  PROTO_CHARGEDBUFF_INFO *pkInfo; // [sp+14h] [bp+8h]@5

  v12 = this;
  v2 = ChargedItemList::GetList()[1];
  if ( v2 )
  {
    v3 = BufNum;
    while ( *v3 < 40 )
    {
      iter = (int (__thiscall **)(void *, char))*v2;
      v4 = (PROTO_CHARGEDBUFF_INFO *)v2[2];
      pkInfo = v4;
      if ( v4 )
      {
        v5 = v4->ChargedBuffID;
        v6 = 0;
        if ( ITableBase<ChargedItemEffect,ChargedEffectTable>::GetTotal() )
        {
          while ( 1 )
          {
            v7 = CDataReader::GetRecord(
                   (CDataReader *)(ITableBase<ChargedItemEffect,ChargedEffectTable>::ms_pkTable + 4),
                   v6);
            if ( v7 )
            {
              if ( *(_WORD *)v7 == v5 )
                break;
            }
            if ( ++v6 >= ITableBase<ChargedItemEffect,ChargedEffectTable>::GetTotal() )
              goto LABEL_18;
          }
          v8 = v7 + 2;
          v9 = ChargedIconItemTab::GetByItemName(v7 + 2);
          pkMsgItem = ChargedMsgItemTab::GetByItemName(v8);
          if ( v12->m_uiVisiableNums - 1 >= *v3 )
          {
            if ( v9 && StatusBuffWin::RefreshChargedBuffIcon(v12, v9, pkInfo, *v3) == 1 )
              ++*v3;
            if ( pkMsgItem )
              StatusBuffWin::RefreshChargedBuffMsg(v12, pkMsgItem, pkInfo);
          }
          else
          {
            v12->m_apkAbstateBuf[*v3].m_pObject->vfptr[64].__vecDelDtor(
              (NiRefObject *)v12->m_apkAbstateBuf[*v3].m_pObject,
              0);
            ((void (__stdcall *)(_DWORD))v12->m_apkAbstateBufIcon[*v3].m_pObject->vfptr[64].__vecDelDtor)(0);
            ++*v3;
          }
        }
      }
LABEL_18:
      if ( !iter )
        break;
      v2 = iter;
    }
  }
}
// A886E0: using guessed type int ITableBase<ChargedItemEffect,ChargedEffectTable>::ms_pkTable;

//----- (004DA680) --------------------------------------------------------
void __thiscall StatusBuffWin::~StatusBuffWin(StatusBuffWin *this)
{
  StatusBuffWin *v1; // esi@1
  PopupMenuWin *v2; // ST0C_4@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > v3; // ST0C_4@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > v4; // ST08_4@1
  NiMaterialProperty *v5; // edi@1
  NiMaterialProperty *v6; // edi@5
  NiScreenElements *v7; // edi@9
  FrameBoxWin *v8; // edi@13
  PopupMenuWin *v9; // edi@17
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > result; // [sp+10h] [bp-18h]@1
  std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,bool,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,bool> > > *v11; // [sp+14h] [bp-14h]@1
  StatusBuffWin *v12; // [sp+18h] [bp-10h]@1
  int v13; // [sp+24h] [bp-4h]@1

  v1 = this;
  v12 = this;
  this->vfptr = (NiRefObjectVtbl *)&StatusBuffWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&StatusBuffWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spPopupMenu.m_pObject;
  v13 = 9;
  PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
  v11 = &v1->m_ChargedMsgNotice;
  v3._Ptr = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *)v1->m_ChargedMsgNotice._Myhead;
  v4._Ptr = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *)v1->m_ChargedMsgNotice._Myhead->_Left;
  LOBYTE(v13) = 10;
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > *)&v1->m_ChargedMsgNotice,
    &result,
    v4,
    v3);
  operator delete(v1->m_ChargedMsgNotice._Myhead);
  LOBYTE(v13) = 7;
  NiObjectNET::~NiObjectNET((NiObjectNET *)&v1->m_spAlphaProp.vfptr);
  v5 = v1->m_spFixedMtrlProp.m_pObject;
  LOBYTE(v13) = 6;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  v6 = v1->m_spMtrlProp.m_pObject;
  LOBYTE(v13) = 5;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  v7 = v1->m_spBackPlane.m_pObject;
  LOBYTE(v13) = 4;
  if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  LOBYTE(v13) = 3;
  `eh vector destructor iterator'(
    v1->m_apkAbstateBufIcon,
    4u,
    40,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  LOBYTE(v13) = 2;
  `eh vector destructor iterator'(
    v1->m_apkAbstateBuf,
    4u,
    40,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v8 = v1->m_pkFrameBox.m_pObject;
  LOBYTE(v13) = 1;
  if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
    v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
  v9 = v1->m_spPopupMenu.m_pObject;
  LOBYTE(v13) = 0;
  if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
    v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
  v13 = -1;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 984874: using guessed type void (__thiscall *StatusBuffWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 984894: using guessed type int (__thiscall *StatusBuffWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004DA830) --------------------------------------------------------
void __thiscall StatusBuffWin::UpdateMeWin(StatusBuffWin *this, float fCurTime)
{
  StatusBuffWin *v2; // esi@1
  StatusBuffWin::EBUFF_TYPE v3; // eax@1
  int v4; // eax@2
  double v5; // st7@12
  double v6; // st6@13
  FrameBoxWin *v7; // ecx@17
  double v8; // st6@19
  NiMaterialProperty *v9; // eax@23
  NiMaterialProperty *v10; // eax@24
  bool v11; // zf@25
  int BufNum; // [sp+18h] [bp-4h]@4

  v2 = this;
  v3 = this->m_eBuffType;
  if ( v3 )
  {
    v4 = v3 - 1;
    if ( v4 )
    {
      if ( v4 == 1 )
      {
        *(float *)&BufNum = COERCE_FLOAT(((int (*)(void))this->vfptr[41].__vecDelDtor)());
        MachineOpt::ms_kUserLoginOption.ChargedBufXPos = (double)BufNum / (double)PgWin::ms_uiScreenWidth;
        *(float *)&BufNum = COERCE_FLOAT(((int (__thiscall *)(StatusBuffWin *))v2->vfptr[42].__vecDelDtor)(v2));
        MachineOpt::ms_kUserLoginOption.ChargedBufYPos = (double)BufNum / (double)PgWin::ms_uiScreenHeight;
      }
    }
    else
    {
      *(float *)&BufNum = COERCE_FLOAT(((int (*)(void))this->vfptr[41].__vecDelDtor)());
      MachineOpt::ms_kUserLoginOption.DBufXPos = (double)BufNum / (double)PgWin::ms_uiScreenWidth;
      *(float *)&BufNum = COERCE_FLOAT(((int (__thiscall *)(StatusBuffWin *))v2->vfptr[42].__vecDelDtor)(v2));
      MachineOpt::ms_kUserLoginOption.DBufYPos = (double)BufNum / (double)PgWin::ms_uiScreenHeight;
    }
  }
  else
  {
    *(float *)&BufNum = COERCE_FLOAT(((int (*)(void))this->vfptr[41].__vecDelDtor)());
    MachineOpt::ms_kUserLoginOption.BufXPos = (double)BufNum / (double)PgWin::ms_uiScreenWidth;
    *(float *)&BufNum = COERCE_FLOAT(((int (__thiscall *)(_DWORD))v2->vfptr[42].__vecDelDtor)(v2));
    MachineOpt::ms_kUserLoginOption.BufYPos = (double)BufNum / (double)PgWin::ms_uiScreenHeight;
  }
  if ( !v2->IsShowBuf )
    goto LABEL_33;
  if ( (unsigned __int8)((int (__stdcall *)(unsigned int, int))v2->m_pkFrameBox.m_pObject->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY) )
  {
    if ( v2->m_kAlphaControl.fTimeLeftToAppear > 0.0 )
      v2->m_kAlphaControl.fTimeLeftToAppear = v2->m_kAlphaControl.fTimeLeftToAppear - Timer::ms_fDeltaTime * 10.0;
    if ( v2->m_kAlphaControl.fTimeLeftToAppear <= 0.0 )
    {
      ((void (__stdcall *)(signed int))v2->m_pkFrameBox.m_pObject->vfptr[64].__vecDelDtor)(1);
      v5 = 1.0;
      if ( v2->m_kAlphaControl.fAlphaValue < 1.0 )
      {
        *(float *)&BufNum = Timer::ms_fDeltaTime + Timer::ms_fDeltaTime + v2->m_kAlphaControl.fAlphaValue;
        v6 = *(float *)&BufNum;
        v2->m_kAlphaControl.fAlphaValue = *(float *)&BufNum;
        if ( v6 > 1.0 )
          v2->m_kAlphaControl.fAlphaValue = 1.0;
        if ( v2->m_kAlphaControl.fAlphaValue < 1.0 )
        {
          *(float *)&BufNum = NI_HALF_PI * v2->m_kAlphaControl.fAlphaValue;
          *(float *)&BufNum = sin(*(float *)&BufNum);
          v5 = *(float *)&BufNum;
        }
LABEL_23:
        v9 = v2->m_spFixedMtrlProp.m_pObject;
        *(float *)&BufNum = v5;
        v9->m_fAlpha = *(float *)&BufNum;
        ++v9->m_uiRevID;
        goto LABEL_25;
      }
    }
  }
  else
  {
    v7 = v2->m_pkFrameBox.m_pObject;
    if ( v7->m_bIsDuringSizeDrag )
      goto LABEL_25;
    v5 = 0.0;
    if ( v2->m_kAlphaControl.fAlphaValue > 0.0 )
    {
      *(float *)&BufNum = v2->m_kAlphaControl.fAlphaValue - (Timer::ms_fDeltaTime + Timer::ms_fDeltaTime);
      v8 = *(float *)&BufNum;
      v2->m_kAlphaControl.fAlphaValue = *(float *)&BufNum;
      if ( v8 <= 0.0 )
      {
        v2->m_kAlphaControl.fAlphaValue = 0.0;
        v2->m_kAlphaControl.fTimeLeftToAppear = 1.0;
        ((void (__stdcall *)(_DWORD))v7->vfptr[64].__vecDelDtor)(0);
        v5 = 0.0;
      }
      if ( v5 < v2->m_kAlphaControl.fAlphaValue )
      {
        *(float *)&BufNum = NI_HALF_PI * v2->m_kAlphaControl.fAlphaValue;
        *(float *)&BufNum = sin(*(float *)&BufNum);
        v5 = *(float *)&BufNum;
      }
      goto LABEL_23;
    }
    ((void (__stdcall *)(_DWORD))v7->vfptr[64].__vecDelDtor)(0);
    v10 = v2->m_spFixedMtrlProp.m_pObject;
    v10->m_fAlpha = 0.0;
    ++v10->m_uiRevID;
  }
LABEL_25:
  ((void (__stdcall *)(_DWORD))v2->m_pkFrameBox.m_pObject->vfptr[69].__vecDelDtor)(v2->m_spFixedMtrlProp.m_pObject->m_fAlpha);
  v11 = v2->m_eBuffType == 2;
  *(float *)&BufNum = 0.0;
  if ( v11 )
  {
    if ( fCurTime > v2->m_fLastUpdatedTime + 10.0 )
    {
      StatusBuffWin::ResetIcons(v2);
      StatusBuffWin::RefreshChargedItems(v2, &BufNum);
      v2->m_fLastUpdatedTime = fCurTime;
    }
  }
  else
  {
    StatusBuffWin::ResetIcons(v2);
    AbStateInfectee::GetAbStateList((AbStateInfectee *)&g_pkMainChar->vfptr);
    if ( v2->m_eBuffType )
    {
      StatusBuffWin::SetBuffUI(v2, g_pkMainChar, Debuff, &BufNum);
    }
    else
    {
      StatusBuffWin::SetBuffUI(v2, g_pkMainChar, Skill, &BufNum);
      StatusBuffWin::SetBuffUI(v2, g_pkMainChar, Scroll, &BufNum);
      StatusBuffWin::SetBuffUI(v2, g_pkMainChar, Potion, &BufNum);
      StatusBuffWin::SetBuffUI(v2, g_pkMainChar, 0, &BufNum);
    }
  }
  if ( v2->m_uiVisiableNums < BufNum )
  {
    v2->m_spBackPlane.m_pObject->m_uFlags &= 0xFFFEu;
    return;
  }
LABEL_33:
  v2->m_spBackPlane.m_pObject->m_uFlags |= 1u;
}
// A8B980: using guessed type float Timer::ms_fDeltaTime;
// B622D0: using guessed type const float NI_HALF_PI;

//----- (004DAC40) --------------------------------------------------------
void __userpurge StatusBuffWin::DirectMessage(StatusBuffWin *this@<ecx>, int a2@<ebx>, double a3@<st0>, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  StatusBuffWin *v6; // edi@1
  float v7; // eax@2
  IDirectMessenger *v8; // eax@3
  _DWORD *v9; // esi@6
  NiTListItem<NiPointer<NiProperty> > *v10; // edx@8
  int v11; // eax@8
  AbstateIcon *v12; // ebx@11
  int v13; // eax@11
  char *v14; // esi@21
  signed int v15; // ebx@21
  bool v16; // zf@23
  char *v17; // esi@26
  signed int v18; // ebx@26

  v6 = this;
  switch ( iMsgTag )
  {
    case 14:
      v7 = this->m_kWorld.m_Rotate.m_pEntry[1][2];
      if ( v7 == 0.0 )
        v8 = 0;
      else
        v8 = (IDirectMessenger *)(LODWORD(v7) + 232);
      if ( pkFrom == v8 )
      {
        v9 = pvBody;
        BYTE1(this->m_apkAbstateBuf[23].m_pObject) = 1;
        if ( v9[2] && *v9 )
        {
          v10 = this[-1].m_apkAbstateBufIcon[3].m_pObject->m_kPropertyList.m_pkTail;
          pvBody = this[-1].m_apkAbstateBufIcon[3].m_pObject;
          v11 = ((int (__thiscall *)(NiPointer<AbstateIcon> *))v10)(&this[-1].m_apkAbstateBufIcon[3]);
          (*((void (__thiscall **)(_DWORD, _DWORD))pvBody + 43))(&v6[-1].m_apkAbstateBufIcon[3], *v9 + v11);
        }
        if ( v9[3] )
        {
          if ( v9[1] )
          {
            v12 = v6[-1].m_apkAbstateBufIcon[3].m_pObject;
            v13 = ((int (__thiscall *)(NiPointer<AbstateIcon> *))v12->m_kPropertyList.m_kAllocator.m_uiCount)(&v6[-1].m_apkAbstateBufIcon[3]);
            ((void (__thiscall *)(NiPointer<AbstateIcon> *, int))v12->m_kChildren.vfptr)(
              &v6[-1].m_apkAbstateBufIcon[3],
              v9[1] + v13);
          }
        }
      }
      break;
    case 5:
      if ( PgWinSpr::HitTest(
             (PgWinSpr *)&this[-1].m_apkAbstateBufIcon[3],
             a2,
             (int)this,
             a3,
             PgWin::ms_iMsX,
             PgWin::ms_iMsY) )
      {
        LOBYTE(v6->m_apkAbstateBuf[23].m_pObject) = 1;
      }
      break;
    case 6:
      if ( PgWinSpr::HitTest(
             (PgWinSpr *)&this[-1].m_apkAbstateBufIcon[3],
             a2,
             (int)this,
             a3,
             PgWin::ms_iMsX,
             PgWin::ms_iMsY) )
      {
        if ( LOBYTE(v6->m_apkAbstateBuf[23].m_pObject) )
        {
          (*(void (__stdcall **)(unsigned int, int))(*(_DWORD *)LODWORD(v6->m_kWorld.m_Rotate.m_pEntry[0][2]) + 308))(
            PgWin::ms_iMsX,
            PgWin::ms_iMsY);
          PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)LODWORD(v6->m_kWorld.m_Rotate.m_pEntry[0][2]));
        }
        LOBYTE(v6->m_apkAbstateBuf[23].m_pObject) = 0;
      }
      break;
    case 15:
      if ( *(_DWORD *)pvBody == 1013 )
      {
        if ( !BYTE2(this->m_apkAbstateBuf[23].m_pObject) )
        {
          v17 = (char *)&this->m_spSpr;
          v18 = 40;
          do
          {
            (*(void (__stdcall **)(signed int))(**((_DWORD **)v17 - 40) + 256))(1);
            (*(void (__stdcall **)(signed int))(**(_DWORD **)v17 + 256))(1);
            v17 += 4;
            --v18;
          }
          while ( v18 );
          (*(void (__stdcall **)(signed int))(*(_DWORD *)LODWORD(v6->m_kWorld.m_Rotate.m_pEntry[1][2]) + 256))(1);
          v16 = v6->m_apkAbstateBuf[22].m_pObject == (PgWinSpr *)2;
          BYTE2(v6->m_apkAbstateBuf[23].m_pObject) = 1;
          if ( v16 )
          {
            StatusBuffWin::ResetIcons((StatusBuffWin *)((char *)v6 - 232));
            pvBody = 0;
            StatusBuffWin::RefreshChargedItems((StatusBuffWin *)((char *)v6 - 232), (int *)&pvBody);
          }
        }
      }
      else if ( *(_DWORD *)pvBody == 1014 )
      {
        if ( BYTE2(this->m_apkAbstateBuf[23].m_pObject) )
        {
          v14 = (char *)&this->m_spSpr;
          v15 = 40;
          do
          {
            (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v14 - 40) + 256))(0);
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v14 + 256))(0);
            v14 += 4;
            --v15;
          }
          while ( v15 );
          (*(void (__stdcall **)(_DWORD))(*(_DWORD *)LODWORD(v6->m_kWorld.m_Rotate.m_pEntry[1][2]) + 256))(0);
          v16 = v6->m_apkAbstateBuf[22].m_pObject == (PgWinSpr *)2;
          BYTE2(v6->m_apkAbstateBuf[23].m_pObject) = 0;
          if ( v16 )
            StatusBuffWin::ResetIcons((StatusBuffWin *)((char *)v6 - 232));
        }
      }
      break;
    default:
      return;
  }
}

//----- (004DAEC0) --------------------------------------------------------
void __thiscall StatusBuffWin::StatusBuffWin(StatusBuffWin *this)
{
  StatusBuffWin *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,bool,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,bool> >,0> >::_Node *v2; // eax@1
  NiPointer<AbstateIcon> *v3; // ebx@2
  AbstateIcon *v4; // edi@3
  AbstateIcon *v5; // edi@8
  PopupMenuWin *v6; // edi@14
  FrameBoxWin *v7; // edi@19
  std::exception pExceptionObject; // [sp+10h] [bp-24h]@25
  StatusBuffWin *v9; // [sp+1Ch] [bp-18h]@1
  char *_What; // [sp+20h] [bp-14h]@25
  int v11; // [sp+24h] [bp-10h]@2
  int v12; // [sp+30h] [bp-4h]@1

  v1 = this;
  v9 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&StatusBuffWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&StatusBuffWin::`vftable'{for `IDirectMessenger'};
  v12 = 0;
  v1->m_spPopupMenu.m_pObject = 0;
  v1->m_pkFrameBox.m_pObject = 0;
  `eh vector constructor iterator'(
    v1->m_apkAbstateBuf,
    4u,
    40,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_apkAbstateBufIcon,
    4u,
    40,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_spBackPlane.m_pObject = 0;
  v1->m_spMtrlProp.m_pObject = 0;
  v1->m_spFixedMtrlProp.m_pObject = 0;
  NiObjectNET::NiObjectNET((NiObjectNET *)&v1->m_spAlphaProp.vfptr);
  v1->m_spAlphaProp.vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
  v1->m_spAlphaProp.m_uFlags = 236;
  v1->m_spAlphaProp.m_ucAlphaTestRef = 0;
  LOBYTE(v12) = 8;
  v1->m_ChargedMsgNotice._Mysize = 0;
  v2 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,bool,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,bool> >,0> >::_Node *)operator new(0x30u);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_ChargedMsgNotice._Myhead = v2;
  v2->_Left = v2;
  v1->m_ChargedMsgNotice._Myhead->_Parent = v1->m_ChargedMsgNotice._Myhead;
  v1->m_ChargedMsgNotice._Myhead->_Right = v1->m_ChargedMsgNotice._Myhead;
  v1->m_ChargedMsgNotice._Myhead->_Color = 1;
  v1->m_ChargedMsgNotice._Myhead->_Isnil = 1;
  v1->m_kAlphaControl.fTimeLeftToAppear = 1.0;
  LOBYTE(v12) = 9;
  v3 = v1->m_apkAbstateBufIcon;
  v1->m_kAlphaControl.fAlphaValue = 0.0;
  v11 = 40;
  do
  {
    v4 = v3[-40].m_pObject;
    if ( v4 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      v3[-40].m_pObject = 0;
    }
    v5 = v3->m_pObject;
    if ( v3->m_pObject )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      v3->m_pObject = 0;
    }
    ++v3;
    --v11;
  }
  while ( v11 );
  v6 = v1->m_spPopupMenu.m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v1->m_spPopupMenu.m_pObject = 0;
  }
  v7 = v1->m_pkFrameBox.m_pObject;
  if ( v7 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v1->m_pkFrameBox.m_pObject = 0;
  }
  *(_WORD *)&v1->IsFrameDraging = 256;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);
// 984874: using guessed type void (__thiscall *StatusBuffWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 984894: using guessed type int (__thiscall *StatusBuffWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004DB110) --------------------------------------------------------
StatusBuffWin *__cdecl StatusBuffWin::CreateWin(PgFrameWork *pkFrameWork, StatusBuffWin::EBUFF_TYPE type)
{
  PgWin *v2; // eax@1
  PgWin *v3; // eax@2
  PgWin *v4; // esi@2
  PgWin *v5; // edi@8
  StatusBuffWin *v6; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v2 = (PgWin *)operator new(0x2FCu);
  result.m_pObject = v2;
  v8 = 0;
  if ( v2 )
  {
    StatusBuffWin::StatusBuffWin((StatusBuffWin *)v2);
    v4 = v3;
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v8 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v4);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, PgFrameWork *, StatusBuffWin::EBUFF_TYPE))v4->vfptr[135].__vecDelDtor)(
                          v4,
                          pkFrameWork,
                          type) )
  {
    ((void (__thiscall *)(PgWin *))v4->vfptr[89].__vecDelDtor)(v4);
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = (StatusBuffWin *)v4;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v4);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = 0;
  }
  return v6;
}

//----- (004DB240) --------------------------------------------------------
unsigned int __cdecl ITableBase<ChargedMessageItem,ChargedMsgItemTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<ChargedMessageItem,ChargedMsgItemTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C288: using guessed type int ITableBase<ChargedMessageItem,ChargedMsgItemTab>::ms_pkTable;

//----- (004DB260) --------------------------------------------------------
unsigned int __cdecl ITableBase<ChargedIconItem,ChargedIconItemTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<ChargedIconItem,ChargedIconItemTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C284: using guessed type int ITableBase<ChargedIconItem,ChargedIconItemTab>::ms_pkTable;

//----- (004DB280) --------------------------------------------------------
ChargedMessageItem *__cdecl ChargedMsgItemTab::GetByItemName(const char *ItemName)
{
  ChargedMessageItem *result; // eax@2
  unsigned int v2; // edi@3
  unsigned int v3; // esi@3
  const char *v4; // eax@4

  if ( ItemName )
  {
    v2 = strlen(ItemName);
    v3 = 0;
    if ( ITableBase<ChargedMessageItem,ChargedMsgItemTab>::GetTotal() )
    {
      while ( 1 )
      {
        v4 = CDataReader::GetRecord(
               (CDataReader *)(ITableBase<ChargedMessageItem,ChargedMsgItemTab>::ms_pkTable + 4),
               v3)
           + 2;
        if ( v4 )
        {
          if ( !strncmp(v4, ItemName, v2) )
            break;
        }
        if ( ++v3 >= ITableBase<ChargedMessageItem,ChargedMsgItemTab>::GetTotal() )
          goto LABEL_7;
      }
      result = (ChargedMessageItem *)CDataReader::GetRecord(
                                       (CDataReader *)(ITableBase<ChargedMessageItem,ChargedMsgItemTab>::ms_pkTable + 4),
                                       v3);
    }
    else
    {
LABEL_7:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C288: using guessed type int ITableBase<ChargedMessageItem,ChargedMsgItemTab>::ms_pkTable;

//----- (004DB300) --------------------------------------------------------
ChargedIconItem *__cdecl ChargedIconItemTab::GetByItemName(const char *ItemName)
{
  ChargedIconItem *result; // eax@2
  unsigned int v2; // edi@3
  unsigned int v3; // esi@3
  const char *v4; // eax@4

  if ( ItemName )
  {
    v2 = strlen(ItemName);
    v3 = 0;
    if ( ITableBase<ChargedIconItem,ChargedIconItemTab>::GetTotal() )
    {
      while ( 1 )
      {
        v4 = CDataReader::GetRecord((CDataReader *)(ITableBase<ChargedIconItem,ChargedIconItemTab>::ms_pkTable + 4), v3)
           + 2;
        if ( v4 )
        {
          if ( !strncmp(v4, ItemName, v2) )
            break;
        }
        if ( ++v3 >= ITableBase<ChargedIconItem,ChargedIconItemTab>::GetTotal() )
          goto LABEL_7;
      }
      result = (ChargedIconItem *)CDataReader::GetRecord(
                                    (CDataReader *)(ITableBase<ChargedIconItem,ChargedIconItemTab>::ms_pkTable + 4),
                                    v3);
    }
    else
    {
LABEL_7:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C284: using guessed type int ITableBase<ChargedIconItem,ChargedIconItemTab>::ms_pkTable;

//----- (004DB380) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::find(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > *result, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Keyval)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // edi@1
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v5; // eax@1
  unsigned int v6; // ecx@2
  int v7; // eax@2
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > *v8; // eax@5
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *_Where; // [sp+18h] [bp+Ch]@1

  v3 = _Keyval;
  v4 = this;
  v5 = std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::_Lbound(
         (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > *)this,
         _Keyval);
  _Where = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v5;
  if ( v5 == (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)v4->_Myhead )
    goto LABEL_9;
  v6 = v5->_Myval.first._Mysize;
  v7 = (int)&v5->_Myval;
  if ( *(_DWORD *)(v7 + 20) >= 0x10u )
    v7 = *(_DWORD *)v7;
  if ( std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
         v3,
         0,
         v3->_Mysize,
         (const char *)v7,
         v6) < 0 )
  {
LABEL_9:
    v8 = result;
    result->_Ptr = v4->_Myhead;
  }
  else
  {
    v8 = result;
    result->_Ptr = _Where;
  }
  return v8;
}

//----- (004DB3F0) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,bool,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,bool> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,bool,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,bool>>,0>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,bool> &>(std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,bool,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,bool> >,0> > *this, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,bool> *_Val)
{
  std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,bool,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,bool> >,0> > *v2; // esi@1
  void *v3; // edi@1
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,bool> *v4; // ebx@3
  int v6; // [sp+0h] [bp-38h]@1
  std::exception pExceptionObject; // [sp+10h] [bp-28h]@5
  char *v8; // [sp+1Ch] [bp-1Ch]@2
  char *v9; // [sp+20h] [bp-18h]@2
  void *p; // [sp+24h] [bp-14h]@1
  int *v11; // [sp+28h] [bp-10h]@1
  int v12; // [sp+34h] [bp-4h]@2

  v11 = &v6;
  v2 = this;
  v3 = operator new(0x30u);
  p = v3;
  if ( !v3 )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  *(_DWORD *)v3 = v2->_Myhead;
  *((_DWORD *)v3 + 1) = v2->_Myhead;
  *((_DWORD *)v3 + 2) = v2->_Myhead;
  *((_WORD *)v3 + 22) = 0;
  v12 = 0;
  v9 = (char *)v3 + 12;
  v8 = (char *)v3 + 12;
  LOBYTE(v12) = 1;
  if ( v3 != (void *)-12 )
  {
    v4 = _Val;
    *((_DWORD *)v3 + 8) = 15;
    *((_DWORD *)v3 + 7) = 0;
    *((_BYTE *)v3 + 12) = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)v3 + 12),
      &v4->first,
      0,
      0xFFFFFFFF);
    *((_BYTE *)v3 + 40) = v4->second;
  }
  return (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,bool,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,bool> >,0> >::_Node *)v3;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (004DB4D0) --------------------------------------------------------
void __thiscall std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>>::~map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>>(CSingleDataMap *this)
{
  CSingleDataMap *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *v2; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > v3; // ST04_4@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > result; // [sp+8h] [bp-14h]@1
  CSingleDataMap *v5; // [sp+Ch] [bp-10h]@1
  int v6; // [sp+18h] [bp-4h]@1

  v1 = this;
  v5 = this;
  v2 = this->m_SingleData._Myhead;
  v3._Ptr = v2->_Left;
  v6 = 0;
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > *)&this->m_SingleData.comp,
    &result,
    v3,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > >)v2);
  operator delete(v1->m_SingleData._Myhead);
}

//----- (004DB530) --------------------------------------------------------
StatusBuffWin *__thiscall StatusBuffWin::`vector deleting destructor'(StatusBuffWin *this, unsigned int a2)
{
  StatusBuffWin *v2; // esi@1

  v2 = this;
  StatusBuffWin::~StatusBuffWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (004DB560) --------------------------------------------------------
void __thiscall CalculatorWin::OnCmdOk(CalculatorWin *this)
{
  CalculatorWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
  v2 = v1->m_pkRevWin;
  if ( v2 )
    PgWin::PostMsg(v2, 5u, v1->m_uiOkMsg, v1->m_uiResultValue);
}

//----- (004DB5A0) --------------------------------------------------------
void __thiscall CalculatorWin::OnCmdCancel(CalculatorWin *this)
{
  PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
}

//----- (004DB5B0) --------------------------------------------------------
void __thiscall CalculatorWin::GetValueFromEdit(CalculatorWin *this)
{
  CalculatorWin *v1; // esi@1
  EditWin *v2; // ecx@1
  const char *v3; // eax@1

  v1 = this;
  v2 = this->m_spEdit.m_pObject;
  v1->m_uiResultValue = 0;
  v3 = (const char *)((int (*)(void))v2->vfptr[113].__vecDelDtor)();
  if ( v3 )
  {
    if ( *v3 )
      v1->m_uiResultValue = atoi(v3);
  }
}

//----- (004DB5F0) --------------------------------------------------------
void __thiscall CalculatorWin::SetValueToEdit(CalculatorWin *this)
{
  CalculatorWin *v1; // esi@1
  char acStr[32]; // [sp+4h] [bp-24h]@1

  v1 = this;
  sprintf(acStr, "%u", this->m_uiResultValue);
  ((void (__stdcall *)(_DWORD))v1->m_spEdit.m_pObject->vfptr[116].__vecDelDtor)(acStr);
}

//----- (004DB640) --------------------------------------------------------
void __thiscall CalculatorWin::OnCmdNum(CalculatorWin *this, unsigned int uiVal)
{
  CalculatorWin *v2; // esi@1
  EditWin *v3; // ecx@1
  const char *v4; // eax@1
  unsigned int v5; // eax@4
  unsigned int v6; // ecx@4
  char string; // [sp+4h] [bp-24h]@6

  v2 = this;
  v3 = this->m_spEdit.m_pObject;
  v2->m_uiResultValue = 0;
  v4 = (const char *)((int (*)(void))v3->vfptr[113].__vecDelDtor)();
  if ( v4 && *v4 )
    v2->m_uiResultValue = atoi(v4);
  v5 = uiVal + 10 * v2->m_uiResultValue;
  v6 = v2->m_uiMax;
  v2->m_uiResultValue = v5;
  if ( v5 > v6 )
    v2->m_uiResultValue = v6;
  sprintf(&string, "%u", v2->m_uiResultValue);
  ((void (__stdcall *)(_DWORD))v2->m_spEdit.m_pObject->vfptr[116].__vecDelDtor)(&string);
}

//----- (004DB6F0) --------------------------------------------------------
void __thiscall CalculatorWin::OnCmdNum00(CalculatorWin *this)
{
  CalculatorWin *v1; // esi@1
  EditWin *v2; // ecx@1
  const char *v3; // eax@1
  unsigned int v4; // ecx@4
  unsigned int v5; // eax@4
  char string; // [sp+4h] [bp-24h]@6

  v1 = this;
  v2 = this->m_spEdit.m_pObject;
  v1->m_uiResultValue = 0;
  v3 = (const char *)((int (*)(void))v2->vfptr[113].__vecDelDtor)();
  if ( v3 && *v3 )
    v1->m_uiResultValue = atoi(v3);
  v4 = v1->m_uiMax;
  v5 = 100 * v1->m_uiResultValue;
  v1->m_uiResultValue = v5;
  if ( v5 > v4 )
    v1->m_uiResultValue = v4;
  sprintf(&string, "%u", v1->m_uiResultValue);
  ((void (__stdcall *)(_DWORD))v1->m_spEdit.m_pObject->vfptr[116].__vecDelDtor)(&string);
}

//----- (004DB790) --------------------------------------------------------
void __thiscall CalculatorWin::OnCmdMax(CalculatorWin *this)
{
  CalculatorWin *v1; // esi@1
  unsigned int v2; // ST08_4@1
  char string; // [sp+4h] [bp-24h]@1

  v1 = this;
  v2 = this->m_uiMax;
  this->m_uiResultValue = v2;
  sprintf(&string, "%u", v2);
  ((void (__stdcall *)(_DWORD))v1->m_spEdit.m_pObject->vfptr[116].__vecDelDtor)(&string);
}

//----- (004DB7F0) --------------------------------------------------------
void __thiscall CalculatorWin::OnCmdClear(CalculatorWin *this)
{
  CalculatorWin *v1; // esi@1
  char string; // [sp+4h] [bp-24h]@1

  v1 = this;
  this->m_uiResultValue = 0;
  sprintf(&string, "%u", 0);
  ((void (__stdcall *)(_DWORD))v1->m_spEdit.m_pObject->vfptr[116].__vecDelDtor)(&string);
}

//----- (004DB850) --------------------------------------------------------
void __thiscall CalculatorWin::OnCmdPlus(CalculatorWin *this)
{
  CalculatorWin *v1; // esi@1
  EditWin *v2; // ecx@1
  const char *v3; // eax@1
  unsigned int v4; // eax@4
  char string; // [sp+4h] [bp-24h]@6

  v1 = this;
  v2 = this->m_spEdit.m_pObject;
  v1->m_uiResultValue = 0;
  v3 = (const char *)((int (*)(void))v2->vfptr[113].__vecDelDtor)();
  if ( v3 && *v3 )
    v1->m_uiResultValue = atoi(v3);
  v4 = v1->m_uiMax;
  if ( ++v1->m_uiResultValue > v4 )
    v1->m_uiResultValue = v4;
  sprintf(&string, "%u", v1->m_uiResultValue);
  ((void (__stdcall *)(_DWORD))v1->m_spEdit.m_pObject->vfptr[116].__vecDelDtor)(&string);
}

//----- (004DB8F0) --------------------------------------------------------
void __thiscall CalculatorWin::OnCmdMinus(CalculatorWin *this)
{
  CalculatorWin *v1; // esi@1
  EditWin *v2; // ecx@1
  const char *v3; // eax@1
  unsigned int v4; // eax@4
  char string; // [sp+4h] [bp-24h]@6

  v1 = this;
  v2 = this->m_spEdit.m_pObject;
  v1->m_uiResultValue = 0;
  v3 = (const char *)((int (*)(void))v2->vfptr[113].__vecDelDtor)();
  if ( v3 && *v3 )
    v1->m_uiResultValue = atoi(v3);
  v4 = v1->m_uiResultValue;
  if ( v4 )
    v1->m_uiResultValue = v4 - 1;
  sprintf(&string, "%u", v1->m_uiResultValue);
  ((void (__stdcall *)(_DWORD))v1->m_spEdit.m_pObject->vfptr[116].__vecDelDtor)(&string);
}

//----- (004DB990) --------------------------------------------------------
void __thiscall CalculatorWin::Open(CalculatorWin *this, PgWin *pkRevWin, unsigned int uiOkMsg, unsigned int uiMax, char *pcText)
{
  CalculatorWin *v5; // esi@1
  PgWinText *v6; // ecx@1

  v5 = this;
  this->m_uiOkMsg = uiOkMsg;
  v6 = this->m_apkMsgText[0];
  v5->m_uiMax = uiMax;
  v5->m_pkRevWin = pkRevWin;
  ((void (__stdcall *)(_DWORD))v6->vfptr[118].__vecDelDtor)(&unk_984ADE);
  ((void (__stdcall *)(_DWORD))v5->m_apkMsgText[1]->vfptr[118].__vecDelDtor)(&unk_984ADF);
  PgWinText::SetArrayText(v5->m_apkMsgText, 2u, pcText);
  ((void (__stdcall *)(_DWORD))v5->m_spEdit.m_pObject->vfptr[115].__vecDelDtor)(&unk_984AF6);
  PgWinMgr::DoModal(&Pgg_kWinMgr, (PgWin *)&v5->vfptr, 0, 0, 0);
}

//----- (004DBA20) --------------------------------------------------------
void __thiscall CalculatorWin::CalculatorWin(CalculatorWin *this)
{
  CalculatorWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&CalculatorWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CalculatorWin::`vftable'{for `IDirectMessenger'};
  v1->m_spEdit.m_pObject = 0;
}
// 984BC8: using guessed type void (__thiscall *CalculatorWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 984BE4: using guessed type int (__thiscall *CalculatorWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004DBA50) --------------------------------------------------------
void __thiscall CalculatorWin::~CalculatorWin(CalculatorWin *this)
{
  CalculatorWin *v1; // esi@1
  EditWin *v2; // edi@1
  EditWin *v3; // edi@6

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&CalculatorWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CalculatorWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spEdit.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spEdit.m_pObject = 0;
  }
  v3 = v1->m_spEdit.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 984BC8: using guessed type void (__thiscall *CalculatorWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 984BE4: using guessed type int (__thiscall *CalculatorWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004DBB10) --------------------------------------------------------
char __thiscall CalculatorWin::Create(CalculatorWin *this, PgFrameWork *pkFrameWork)
{
  CalculatorWin *v2; // esi@1
  NiSourceTexture *v3; // ebx@1
  NiNode *v4; // esi@2
  const char *v6; // eax@9
  PgSprData *v7; // eax@10
  PgSprData *v8; // eax@11
  PgSprData *v9; // eax@11
  PgSprData *v10; // edi@11
  PgWinBut *v11; // edi@11
  PgFont *v12; // ST64_4@11
  unsigned int v13; // ST60_4@11
  unsigned int v14; // eax@11
  PgWinText *v15; // edi@11
  NiUnsharedGeometryGroup *v16; // eax@11
  PgSprData *v17; // edi@11
  PgWinBut *v18; // edi@11
  PgFont *v19; // ST64_4@11
  unsigned int v20; // ST60_4@11
  unsigned int v21; // eax@11
  PgWinText *v22; // edi@11
  NiUnsharedGeometryGroup *v23; // eax@11
  int v24; // edi@11
  PgSprData *v25; // eax@13
  PgWinBut *v26; // ST68_4@13
  PgFont *v27; // ST64_4@13
  unsigned int v28; // ST60_4@13
  unsigned int v29; // eax@13
  PgWinText *v30; // edi@13
  PgSprData *v31; // eax@14
  PgWinBut *v32; // ST68_4@14
  PgFont *v33; // ST64_4@14
  unsigned int v34; // ST60_4@14
  unsigned int v35; // eax@14
  PgWinText *v36; // edi@14
  PgSprData *v37; // eax@14
  PgWinBut *v38; // ST68_4@14
  PgFont *v39; // ST64_4@14
  unsigned int v40; // ST60_4@14
  unsigned int v41; // eax@14
  PgWinText *v42; // edi@14
  PgSprData *v43; // eax@14
  PgWinBut *v44; // ST68_4@14
  PgFont *v45; // ST64_4@14
  unsigned int v46; // ST60_4@14
  unsigned int v47; // eax@14
  PgWinText *v48; // edi@14
  PgFont *v49; // edi@15
  PgWinText *v50; // eax@15
  PgWinText *v51; // eax@15
  EditWin *v52; // eax@16
  PgSprData *v53; // edi@16
  PgSprData *v54; // edi@16
  NiNode *v55; // esi@17
  unsigned int uiHeight; // [sp+84h] [bp-4Ch]@14
  unsigned int uiWidth; // [sp+88h] [bp-48h]@14
  int i; // [sp+8Ch] [bp-44h]@7
  int uiLeft; // [sp+90h] [bp-40h]@10
  int uiTop; // [sp+94h] [bp-3Ch]@10
  NiPointer<NiNode> spNode; // [sp+98h] [bp-38h]@1
  char acShapeName[33]; // [sp+9Ch] [bp-34h]@13
  int v63; // [sp+CCh] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v63 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  if ( !v3 )
    goto LABEL_23;
  i = (int)pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = Folder::Merge(&Folder::m_acMenu, "Game\\Calculator.nif");
  PgUtil::LoadNodeNifFile(v6, &spNode, (NiTexturePalette *)i);
  if ( !spNode.m_pObject )
    return 0;
  v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v7, 0, pkFrameWork, "CalculatorWin", 0) )
    goto LABEL_23;
  v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft, uiTop, v8, (PgWin *)&v2->vfptr, 0, 0);
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft, uiTop, v9, (PgWin *)&v2->vfptr, 0, 0);
  v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "OkNor", &uiLeft, &uiTop, v3);
  PgSprData::Add(v10, (NiAVObject *)&spNode.m_pObject->vfptr, "OkClick");
  PgSprData::Add(v10, (NiAVObject *)&spNode.m_pObject->vfptr, "OkOver");
  v11 = PgWinBut::CreateWin(uiLeft, uiTop, v10, (PgWin *)&v2->vfptr, 0, 0, 0);
  v12 = Font::Get(0);
  v13 = ((int (__thiscall *)(PgWinBut *))v11->vfptr[37].__vecDelDtor)(v11);
  v14 = ((int (__thiscall *)(PgWinBut *))v11->vfptr[36].__vecDelDtor)(v11);
  v15 = PgWinText::CreateWin(0, 1, v14, v13, v12, (PgWin *)&v11->vfptr, 0, 0);
  v15->vfptr[122].__vecDelDtor((NiRefObject *)v15, 5u);
  i = (int)&v15->vfptr[118];
  v16 = TextData::Get(0x4F5F499Fu);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))i)(v15, v16);
  v15->vfptr[60].__vecDelDtor((NiRefObject *)v15, 0);
  v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CancelNor", &uiLeft, &uiTop, v3);
  PgSprData::Add(v17, (NiAVObject *)&spNode.m_pObject->vfptr, "CancelClick");
  PgSprData::Add(v17, (NiAVObject *)&spNode.m_pObject->vfptr, "CancelOver");
  v18 = PgWinBut::CreateWin(uiLeft, uiTop, v17, (PgWin *)&v2->vfptr, 0, 0, 0);
  v19 = Font::Get(0);
  v20 = ((int (__thiscall *)(PgWinBut *))v18->vfptr[37].__vecDelDtor)(v18);
  v21 = ((int (__thiscall *)(PgWinBut *))v18->vfptr[36].__vecDelDtor)(v18);
  v22 = PgWinText::CreateWin(0, 1, v21, v20, v19, (PgWin *)&v18->vfptr, 0, 0);
  v22->vfptr[122].__vecDelDtor((NiRefObject *)v22, 5u);
  i = (int)&v22->vfptr[118];
  v23 = TextData::Get(0x88A297E1);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))i)(v22, v23);
  v22->vfptr[60].__vecDelDtor((NiRefObject *)v22, 0);
  v24 = 0;
  for ( i = 0; ; v24 = i )
  {
    sprintf(acShapeName, "CalNum%02d", v24);
    v25 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, v3);
    v26 = PgWinBut::CreateWin(uiLeft, uiTop, v25, (PgWin *)&v2->vfptr, v24 + 2, 0, 0);
    v27 = Font::Get(SMALL);
    v28 = ((int (__thiscall *)(PgWinBut *))v26->vfptr[37].__vecDelDtor)(v26);
    v29 = ((int (__thiscall *)(PgWinBut *))v26->vfptr[36].__vecDelDtor)(v26);
    v30 = PgWinText::CreateWin(0, 1, v29, v28, v27, (PgWin *)&v26->vfptr, 0, 0);
    v30->vfptr[122].__vecDelDtor((NiRefObject *)v30, 5u);
    sprintf(acShapeName, "%d", i);
    v30->vfptr[118].__vecDelDtor((NiRefObject *)v30, (unsigned int)acShapeName);
    v30->vfptr[60].__vecDelDtor((NiRefObject *)v30, 0);
    v30->vfptr[117].__vecDelDtor((NiRefObject *)v30, (unsigned int)&Color::m_kDxBlackColor);
    if ( ++i >= 10 )
      break;
  }
  v31 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CalNum000", &uiLeft, &uiTop, v3);
  v32 = PgWinBut::CreateWin(uiLeft, uiTop, v31, (PgWin *)&v2->vfptr, 0xDu, 0, 0);
  v33 = Font::Get(0);
  v34 = ((int (__thiscall *)(PgWinBut *))v32->vfptr[37].__vecDelDtor)(v32);
  v35 = ((int (__thiscall *)(PgWinBut *))v32->vfptr[36].__vecDelDtor)(v32);
  v36 = PgWinText::CreateWin(0, 1, v35, v34, v33, (PgWin *)&v32->vfptr, 0, 0);
  v36->vfptr[122].__vecDelDtor((NiRefObject *)v36, 5u);
  v36->vfptr[118].__vecDelDtor((NiRefObject *)v36, (unsigned int)"00");
  v36->vfptr[60].__vecDelDtor((NiRefObject *)v36, 0);
  v36->vfptr[117].__vecDelDtor((NiRefObject *)v36, (unsigned int)&Color::m_kDxBlackColor);
  v37 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CalMax", &uiLeft, &uiTop, v3);
  v38 = PgWinBut::CreateWin(uiLeft, uiTop, v37, (PgWin *)&v2->vfptr, 0xDu, 0, 0);
  v39 = Font::Get(0);
  v40 = ((int (__thiscall *)(PgWinBut *))v38->vfptr[37].__vecDelDtor)(v38);
  v41 = ((int (__thiscall *)(PgWinBut *))v38->vfptr[36].__vecDelDtor)(v38);
  v42 = PgWinText::CreateWin(0, 1, v41, v40, v39, (PgWin *)&v38->vfptr, 0, 0);
  v42->vfptr[122].__vecDelDtor((NiRefObject *)v42, 5u);
  v42->vfptr[118].__vecDelDtor((NiRefObject *)v42, (unsigned int)"M");
  v42->vfptr[60].__vecDelDtor((NiRefObject *)v42, 0);
  v42->vfptr[117].__vecDelDtor((NiRefObject *)v42, (unsigned int)&Color::m_kDxBlackColor);
  v43 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CalClear", &uiLeft, &uiTop, v3);
  v44 = PgWinBut::CreateWin(uiLeft, uiTop, v43, (PgWin *)&v2->vfptr, 0xEu, 0, 0);
  v45 = Font::Get(0);
  v46 = ((int (__thiscall *)(PgWinBut *))v44->vfptr[37].__vecDelDtor)(v44);
  v47 = ((int (__thiscall *)(PgWinBut *))v44->vfptr[36].__vecDelDtor)(v44);
  v48 = PgWinText::CreateWin(0, 1, v47, v46, v45, (PgWin *)&v44->vfptr, 0, 0);
  v48->vfptr[122].__vecDelDtor((NiRefObject *)v48, 5u);
  v48->vfptr[118].__vecDelDtor((NiRefObject *)v48, (unsigned int)"C");
  v48->vfptr[60].__vecDelDtor((NiRefObject *)v48, 0);
  v48->vfptr[117].__vecDelDtor((NiRefObject *)v48, (unsigned int)&Color::m_kDxBlackColor);
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "CalTex", &uiLeft, &uiTop, &uiWidth, &uiHeight)
    || (v49 = Font::Get(0),
        uiHeight = v49->m_uiDefHeight + 2,
        v50 = PgWinText::CreateWin(uiLeft, uiTop + 2, uiWidth, uiHeight, v49, (PgWin *)&v2->vfptr, 0, 0),
        v2->m_apkMsgText[0] = v50,
        v50->vfptr[118].__vecDelDtor((NiRefObject *)v50, (unsigned int)&unk_984ACE),
        ((void (__stdcall *)(_DWORD))v2->m_apkMsgText[0]->vfptr[60].__vecDelDtor)(0),
        ((void (__stdcall *)(signed int))v2->m_apkMsgText[0]->vfptr[122].__vecDelDtor)(1),
        v51 = PgWinText::CreateWin(uiLeft, uiHeight + uiTop + 2, uiWidth, uiHeight, v49, (PgWin *)&v2->vfptr, 0, 0),
        v2->m_apkMsgText[1] = v51,
        v51->vfptr[118].__vecDelDtor((NiRefObject *)v51, (unsigned int)&unk_984ACF),
        ((void (__stdcall *)(_DWORD))v2->m_apkMsgText[1]->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "CalNumInput",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight)) )
  {
LABEL_23:
    v4 = spNode.m_pObject;
    v63 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
    return 0;
  }
  v52 = EditWin::CreateWin(
          uiLeft + 4,
          uiTop + 1,
          uiWidth - 8,
          uiHeight - 1,
          (PgWin *)&v2->vfptr,
          NUMBER,
          0xAu,
          1u,
          1,
          0,
          1);
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spEdit, (NiD3DDefaultShader *)v52);
  v53 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PlusNor", &uiLeft, &uiTop, v3);
  PgSprData::Add(v53, (NiAVObject *)&spNode.m_pObject->vfptr, "PlusClick");
  PgSprData::Add(v53, (NiAVObject *)&spNode.m_pObject->vfptr, "PlusOver");
  PgWinBut::CreateWin(uiLeft, uiTop, v53, (PgWin *)&v2->vfptr, 0xFu, 0, 0);
  v54 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MinusNor", &uiLeft, &uiTop, v3);
  PgSprData::Add(v54, (NiAVObject *)&spNode.m_pObject->vfptr, "MinusClick");
  PgSprData::Add(v54, (NiAVObject *)&spNode.m_pObject->vfptr, "MinusOver");
  PgWinBut::CreateWin(uiLeft, uiTop, v54, (PgWin *)&v2->vfptr, 0x10u, 0, 0);
  ((void (__thiscall *)(CalculatorWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  v63 = -1;
  if ( spNode.m_pObject )
  {
    v55 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v55 )
        v55->vfptr->__vecDelDtor((NiRefObject *)v55, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004DC330) --------------------------------------------------------
void __thiscall CalculatorWin::OnCommand(CalculatorWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0u:
      CalculatorWin::OnCmdOk(this);
      break;
    case 1u:
      PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
      break;
    case 2u:
      CalculatorWin::OnCmdNum(this, 0);
      break;
    case 3u:
      CalculatorWin::OnCmdNum(this, 1u);
      break;
    case 4u:
      CalculatorWin::OnCmdNum(this, 2u);
      break;
    case 5u:
      CalculatorWin::OnCmdNum(this, 3u);
      break;
    case 6u:
      CalculatorWin::OnCmdNum(this, 4u);
      break;
    case 7u:
      CalculatorWin::OnCmdNum(this, 5u);
      break;
    case 8u:
      CalculatorWin::OnCmdNum(this, 6u);
      break;
    case 9u:
      CalculatorWin::OnCmdNum(this, 7u);
      break;
    case 0xAu:
      CalculatorWin::OnCmdNum(this, 8u);
      break;
    case 0xBu:
      CalculatorWin::OnCmdNum(this, 9u);
      break;
    case 0xCu:
      CalculatorWin::OnCmdNum00(this);
      break;
    case 0xDu:
      CalculatorWin::OnCmdMax(this);
      break;
    case 0xEu:
      CalculatorWin::OnCmdClear(this);
      break;
    case 0xFu:
      CalculatorWin::OnCmdPlus(this);
      break;
    case 0x10u:
      CalculatorWin::OnCmdMinus(this);
      break;
    default:
      return;
  }
}

//----- (004DC440) --------------------------------------------------------
CalculatorWin *__cdecl CalculatorWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  CalculatorWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x178u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&CalculatorWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&CalculatorWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[2][2]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (CalculatorWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 984BC8: using guessed type void (__thiscall *CalculatorWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 984BE4: using guessed type int (__thiscall *CalculatorWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004DC580) --------------------------------------------------------
CalculatorWin *__thiscall CalculatorWin::`vector deleting destructor'(CalculatorWin *this, unsigned int a2)
{
  CalculatorWin *v2; // esi@1

  v2 = this;
  CalculatorWin::~CalculatorWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (004DC5B0) --------------------------------------------------------
void __thiscall CastingProgressWin::CastingProgressWin(CastingProgressWin *this)
{
  CastingProgressWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&CastingProgressWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CastingProgressWin::`vftable'{for `IDirectMessenger'};
  v1->m_fTimeWhenCasted = 3.4028235e38;
  v1->m_pkCastingProgress = 0;
  *(_WORD *)&v1->m_bCloseWhenFinished = 0;
  v1->m_fCastingTime = 0.0;
}
// 984E78: using guessed type void (__thiscall *CastingProgressWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 984E94: using guessed type int (__thiscall *CastingProgressWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004DC5F0) --------------------------------------------------------
void __thiscall CastingProgressWin::~CastingProgressWin(CastingProgressWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&CastingProgressWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CastingProgressWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 984E78: using guessed type void (__thiscall *CastingProgressWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 984E94: using guessed type int (__thiscall *CastingProgressWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004DC610) --------------------------------------------------------
void __thiscall CastingProgressWin::Stop(CastingProgressWin *this)
{
  this->m_fCastingTime = 0.0;
  this->m_fAlphaBlendValue = 1.0;
}

//----- (004DC630) --------------------------------------------------------
void __thiscall CastingProgressWin::CastingFail(CastingProgressWin *this)
{
  this->m_fCastingTime = 0.0;
  this->m_fAlphaBlendValue = 1.0;
}

//----- (004DC650) --------------------------------------------------------
bool __thiscall CastingProgressWin::IsDoingCast(CastingProgressWin *this)
{
  return this->m_fCastingTime > 0.0;
}

//----- (004DC670) --------------------------------------------------------
char __thiscall CastingProgressWin::Create(CastingProgressWin *this, PgFrameWork *pkFrameWork, bool bProductCasting)
{
  CastingProgressWin *v3; // esi@1
  char *v4; // ebx@1
  NiTexturePalette *v5; // edi@3
  const char *v6; // eax@5
  PgSprData *v7; // eax@6
  NiNode *v8; // esi@7
  int v10; // edi@12
  int v11; // ebx@12
  PgSprData *v12; // eax@12
  PgSprData *v13; // eax@12
  PgWinBar *v14; // eax@12
  PgSprData *v15; // eax@12
  PgWinBar *v16; // eax@12
  PgSprData *v17; // eax@12
  PgWinBar *v18; // eax@12
  NiNode *v19; // esi@13
  NiPointer<NiNode> spNode; // [sp+2Ch] [bp-14h]@1
  int uiLeft; // [sp+30h] [bp-10h]@6
  int v22; // [sp+3Ch] [bp-4h]@1

  v3 = this;
  spNode.m_pObject = 0;
  v22 = 0;
  v4 = "Game\\ProductBar.nif";
  if ( !bProductCasting )
    v4 = "Game\\CastingBar.nif";
  v5 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = Folder::Merge(&Folder::m_acMenu, v4);
  PgUtil::LoadNodeNifFile(v6, &spNode, v5);
  if ( !spNode.m_pObject )
    return 0;
  v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, (int *)&bProductCasting, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v3->vfptr, 0, 0, v7, 0, pkFrameWork, "CastingProgressWin", 0) )
  {
    v8 = spNode.m_pObject;
    v22 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v8 )
        v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    }
    return 0;
  }
  v10 = uiLeft;
  v11 = bProductCasting;
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, (int *)&bProductCasting, 0);
  PgWinSpr::CreateWin(uiLeft - v10, bProductCasting - v11, v12, (PgWin *)&v3->vfptr, 0, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_HP", &uiLeft, (int *)&bProductCasting, 0);
  v14 = PgWinBar::CreateWin(uiLeft - v10, bProductCasting - v11, v13, (PgWin *)&v3->vfptr, BGT_RIGHT);
  v3->m_pkCastingProgress = v14;
  v14->vfptr[60].__vecDelDtor((NiRefObject *)v14, 0);
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_HP_Start", &uiLeft, (int *)&bProductCasting, 0);
  v16 = PgWinBar::CreateWin(uiLeft - v10, bProductCasting - v11, v15, (PgWin *)&v3->vfptr, BGT_RIGHT);
  v3->m_pkCastingBarStart = (PgWinSpr *)v16;
  v16->vfptr[60].__vecDelDtor((NiRefObject *)v16, 0);
  v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_HP_End", &uiLeft, (int *)&bProductCasting, 0);
  v18 = PgWinBar::CreateWin(uiLeft - v10, bProductCasting - v11, v17, (PgWin *)&v3->vfptr, BGT_RIGHT);
  v3->m_pkCastingBarEnd = (PgWinSpr *)v18;
  v18->vfptr[60].__vecDelDtor((NiRefObject *)v18, 0);
  v3->vfptr[60].__vecDelDtor((NiRefObject *)v3, 0);
  v3->vfptr[64].__vecDelDtor((NiRefObject *)v3, 0);
  PgWin::EnableOpenCloseSound((PgWin *)&v3->vfptr, 0);
  ((void (__thiscall *)(CastingProgressWin *, unsigned int, unsigned int, _DWORD, _DWORD))v3->vfptr[59].__vecDelDtor)(
    v3,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.80000001);
  v22 = -1;
  if ( spNode.m_pObject )
  {
    v19 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v19 )
        v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004DC900) --------------------------------------------------------
void __thiscall CastingProgressWin::StartCasting(CastingProgressWin *this, unsigned int uiCastingTime, bool bCloseWhenFinished)
{
  CastingProgressWin *v3; // esi@1
  PgWinBar *v4; // ecx@1
  double v5; // st7@3

  v3 = this;
  this->m_fTimeWhenCasted = Timer::ms_fCurTime;
  v4 = this->m_pkCastingProgress;
  v3->m_fCastingTime = (double)uiCastingTime / 1000.0;
  v3->m_fAlphaBlendValue = 1.0;
  if ( 1.0 != v4->m_fMaxValue || 0.0 != v4->m_fCurValue )
  {
    v5 = 0.0;
    v4->m_fMaxValue = 1.0;
    v4->m_fCurValue = *(float *)&v5;
    PgWinBar::OnChangeValue(v4);
  }
  v3->vfptr[64].__vecDelDtor((NiRefObject *)v3, 1u);
  v3->vfptr[69].__vecDelDtor((NiRefObject *)v3, COERCE_UNSIGNED_INT(1.0));
  ((void (__stdcall *)(_DWORD))v3->m_pkCastingBarStart->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v3->m_pkCastingBarEnd->vfptr[64].__vecDelDtor)(0);
  v3->m_bCloseWhenFinished = bCloseWhenFinished;
  v3->m_bFadeStart = 0;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004DC9E0) --------------------------------------------------------
void __thiscall CastingProgressWin::CastingSuccess(CastingProgressWin *this)
{
  CastingProgressWin *v1; // esi@1
  PgWinSpr *v2; // ecx@1
  PgWinBar *v3; // ecx@1

  v1 = this;
  this->m_fCastingTime = 0.0;
  v2 = this->m_pkCastingBarStart;
  v1->m_fAlphaBlendValue = 1.0;
  ((void (__cdecl *)(_DWORD))v2->vfptr[64].__vecDelDtor)(1);
  ((void (__cdecl *)(_DWORD))v1->m_pkCastingBarEnd->vfptr[64].__vecDelDtor)(1);
  v3 = v1->m_pkCastingProgress;
  if ( 1.0 != v3->m_fMaxValue || 1.0 != v3->m_fCurValue )
  {
    v3->m_fMaxValue = 1.0;
    v3->m_fCurValue = 1.0;
    PgWinBar::OnChangeValue(v3);
  }
}

//----- (004DCA60) --------------------------------------------------------
void __thiscall CastingProgressWin::UpdateMeWin(CastingProgressWin *this, float fCurTime)
{
  double v2; // st7@1
  double v3; // st6@1
  CastingProgressWin *v4; // esi@1
  double v5; // rt0@6
  double v6; // st6@6
  double v7; // st7@6
  float fCurVal; // ST04_4@14
  float fMaxVal; // ST00_4@14
  double v10; // st7@15
  float fSin; // [sp+14h] [bp+8h]@7
  float fSina; // [sp+14h] [bp+8h]@16
  float fSinb; // [sp+14h] [bp+8h]@19
  float fSinc; // [sp+14h] [bp+8h]@19
  float fSind; // [sp+14h] [bp+8h]@20

  v2 = 0.0;
  v3 = 1.0;
  v4 = this;
  if ( !this->m_bFadeStart )
  {
    if ( Char::CheckActState(g_pkMainChar, 500000) || g_pkMainChar->m_bWillDead )
    {
      v2 = 0.0;
      v4->m_bFadeStart = 1;
      v4->m_fCastingTime = 0.0;
      v3 = 1.0;
      v4->m_fAlphaBlendValue = 1.0;
    }
    else
    {
      v2 = 0.0;
      v3 = 1.0;
    }
  }
  v5 = v3;
  v6 = v2;
  v7 = v5;
  if ( v6 >= v4->m_fCastingTime )
  {
    v10 = v6;
    if ( v6 >= v4->m_fAlphaBlendValue )
    {
      v4->vfptr[64].__vecDelDtor((NiRefObject *)v4, 0);
    }
    else
    {
      fSina = v4->m_fAlphaBlendValue - (Timer::ms_fDeltaTime + Timer::ms_fDeltaTime);
      v4->m_fAlphaBlendValue = fSina;
      if ( fSina <= v6 )
        v4->m_fAlphaBlendValue = v6;
      if ( v6 < v4->m_fAlphaBlendValue )
      {
        fSinb = v4->m_fAlphaBlendValue * NI_HALF_PI;
        fSinc = sin(fSinb);
        v10 = fSinc;
      }
      fSind = v10;
      v4->vfptr[69].__vecDelDtor((NiRefObject *)v4, LODWORD(fSind));
    }
  }
  else
  {
    fSin = (fCurTime - v4->m_fTimeWhenCasted) / v4->m_fCastingTime;
    if ( fSin > v7 )
    {
      if ( v4->m_bCloseWhenFinished )
      {
        v4->m_fCastingTime = v6;
        v4->m_fAlphaBlendValue = v7;
      }
      else
      {
        fCurVal = v7;
        fMaxVal = v7;
        PgWinBar::SetValue(v4->m_pkCastingProgress, fMaxVal, fCurVal);
        ((void (__stdcall *)(signed int))v4->m_pkCastingBarStart->vfptr[64].__vecDelDtor)(1);
        ((void (__stdcall *)(signed int))v4->m_pkCastingBarEnd->vfptr[64].__vecDelDtor)(1);
      }
    }
    else
    {
      PgWinBar::SetValue(v4->m_pkCastingProgress, 0.94999999, fSin);
      if ( fSin >= 0.0 )
        ((void (__stdcall *)(signed int))v4->m_pkCastingBarStart->vfptr[64].__vecDelDtor)(1);
      if ( fSin >= 0.949999988079071 )
        ((void (__stdcall *)(signed int))v4->m_pkCastingBarEnd->vfptr[64].__vecDelDtor)(1);
    }
  }
}
// A8B980: using guessed type float Timer::ms_fDeltaTime;
// B622D0: using guessed type const float NI_HALF_PI;

//----- (004DCC50) --------------------------------------------------------
CastingProgressWin *__cdecl CastingProgressWin::CreateWin(PgFrameWork *pkFrameWork, int bProductCasting)
{
  PgWin *v2; // eax@1
  PgWin *v3; // esi@1
  PgWin *v4; // edi@8
  CastingProgressWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v2 = (PgWin *)operator new(0x174u);
  v3 = v2;
  result.m_pObject = v2;
  v7 = 0;
  if ( v2 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v2);
    v3->vfptr = (NiRefObjectVtbl *)&CastingProgressWin::`vftable'{for `NiNode'};
    v3->vfptr = (IDirectMessengerVtbl *)&CastingProgressWin::`vftable'{for `IDirectMessenger'};
    v3[1].m_kLocal.m_Rotate.m_pEntry[0][1] = 3.4028235e38;
    LODWORD(v3[1].m_kLocal.m_Rotate.m_pEntry[1][1]) = 0;
    LOWORD(v3[1].m_kLocal.m_Rotate.m_pEntry[2][1]) = 0;
    v3[1].m_kLocal.m_Rotate.m_pEntry[0][2] = 0.0;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, PgFrameWork *, int))v3->vfptr[135].__vecDelDtor)(
                          v3,
                          pkFrameWork,
                          bProductCasting) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (CastingProgressWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}
// 984E78: using guessed type void (__thiscall *CastingProgressWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 984E94: using guessed type int (__thiscall *CastingProgressWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004DCDB0) --------------------------------------------------------
CastingProgressWin *__thiscall CastingProgressWin::`scalar deleting destructor'(CastingProgressWin *this, unsigned int a2)
{
  CastingProgressWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&CastingProgressWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CastingProgressWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 984E78: using guessed type void (__thiscall *CastingProgressWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 984E94: using guessed type int (__thiscall *CastingProgressWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004DCDF0) --------------------------------------------------------
void __thiscall PgWinBar::SetValue(PgWinBar *this, float fMaxVal, float fCurVal)
{
  double v3; // st7@3

  if ( fMaxVal != this->m_fMaxValue || fCurVal != this->m_fCurValue )
  {
    v3 = fCurVal;
    this->m_fMaxValue = fMaxVal;
    this->m_fCurValue = *(float *)&v3;
    PgWinBar::OnChangeValue(this);
  }
}

//----- (004DCE40) --------------------------------------------------------
void __cdecl GetShineDateStr(ShineDateTime kDate, char *pcStr, int iMaxStr)
{
  if ( iMaxStr >= 17 )
  {
    if ( kDate == 255 )
      sprintf(pcStr, &byte_9850D9);
    else
      sprintf(
        pcStr,
        "%04d-%02d-%02d %02d:%02d",
        *(_BYTE *)&kDate + 2000,
        (*(unsigned int *)&kDate >> 8) & 0x1F,
        (*(unsigned int *)&kDate >> 13) & 0x3F,
        (*(unsigned int *)&kDate >> 19) & 0x3F,
        *(unsigned int *)&kDate >> 25);
  }
}

//----- (004DCEB0) --------------------------------------------------------
void __thiscall ChargedItemListWin::ChargedItemInfo::ChargedItemInfo(ChargedItemListWin::ChargedItemInfo *this)
{
  this->pkIcon = 0;
  this->pkItemDescription = 0;
  this->pkItemAvailableTerm = 0;
}

//----- (004DCEC0) --------------------------------------------------------
void __usercall ChargedItemListWin::ChargedItemInfo::Reset(ChargedItemListWin::ChargedItemInfo *this@<ecx>, int a2@<edi>)
{
  ChargedItemListWin::ChargedItemInfo *v2; // esi@1

  v2 = this;
  ItemIcon::SetItemAsID(this->pkIcon, a2, 0xFFFF);
  ((void (__stdcall *)(_DWORD))v2->pkItemDescription->vfptr[118].__vecDelDtor)(&unk_9850E9);
  ((void (__stdcall *)(_DWORD))v2->pkItemAvailableTerm->vfptr[118].__vecDelDtor)(&unk_9850EA);
}

//----- (004DCF00) --------------------------------------------------------
void __thiscall ChargedItemListWin::~ChargedItemListWin(ChargedItemListWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ChargedItemListWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ChargedItemListWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 985240: using guessed type void (__thiscall *ChargedItemListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98525C: using guessed type int (__thiscall *ChargedItemListWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004DCF20) --------------------------------------------------------
Item *__stdcall ChargedItemListWin::GetTimeLimitItem(unsigned int uiIndex)
{
  unsigned int v2; // eax@1
  Item *result; // eax@2

  v2 = ChargedItemList::GetTimeLimitCharItemCount();
  if ( uiIndex >= v2 )
    result = ChargedItemList::GetTimeLimitMiniHouseItem(uiIndex - v2);
  else
    result = ChargedItemList::GetTimeLimitCharItem(uiIndex);
  return result;
}

//----- (004DCF50) --------------------------------------------------------
void ChargedItemListWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "ComItemWin");
}

//----- (004DCF80) --------------------------------------------------------
void __userpurge ChargedItemListWin::ChargedItemInfo::SetItem(ChargedItemListWin::ChargedItemInfo *this@<ecx>, int a2@<ebx>, Item *pkItem)
{
  ChargedItemListWin::ChargedItemInfo *v3; // esi@1
  ItemIcon *v4; // ecx@1
  ItemViewInfo *v5; // ebx@3
  void *(__thiscall *v6)(NiRefObject *, unsigned int); // eax@4
  ShineDateTime *v7; // eax@4
  NiRefObjectVtbl *v8; // edi@6
  PgWinText *v9; // ecx@6
  void *(__thiscall *v10)(NiRefObject *, unsigned int); // edx@6
  int v11; // [sp-4h] [bp-24h]@3
  char acDeleteDate[20]; // [sp+8h] [bp-18h]@4

  v3 = this;
  v4 = this->pkIcon;
  if ( pkItem )
  {
    v11 = a2;
    v5 = pkItem->m_pkViewInfo;
    if ( v5 )
    {
      ItemIcon::SetItemAsID(v4, (int)pkItem, v5->ID);
      ((void (__stdcall *)(char *, int))v3->pkItemDescription->vfptr[118].__vecDelDtor)(v5->Descript, v11);
      v6 = pkItem->vfptr[11].__vecDelDtor;
      acDeleteDate[0] = 0;
      v7 = (ShineDateTime *)((int (__thiscall *)(Item *))v6)(pkItem);
      if ( v7 )
        GetShineDateStr(*v7, acDeleteDate, 18);
      v8 = v3->pkItemAvailableTerm->vfptr;
      fs("~ %s", acDeleteDate);
      v9 = v3->pkItemAvailableTerm;
      v10 = v8[118].__vecDelDtor;
    }
    else
    {
      ItemIcon::SetItemAsID(v4, (int)pkItem, 0xFFFF);
      ((void (__stdcall *)(void *, int))v3->pkItemDescription->vfptr[118].__vecDelDtor)(&unk_9850E9, v11);
      v9 = v3->pkItemAvailableTerm;
      v10 = v9->vfptr[118].__vecDelDtor;
    }
    ((void (__thiscall *)(PgWinText *))v10)(v9);
  }
  else
  {
    ItemIcon::SetItem(v4, 0, 1);
    ((void (__stdcall *)(void *))v3->pkItemDescription->vfptr[118].__vecDelDtor)(&unk_9850E2);
    v3->pkItemAvailableTerm->vfptr[118].__vecDelDtor((NiRefObject *)v3->pkItemAvailableTerm, (unsigned int)&unk_9850E3);
  }
}
// 4DCF80: could not find valid save-restore pair for ebx

//----- (004DD090) --------------------------------------------------------
void __thiscall ChargedItemListWin::ChargedItemListWin(ChargedItemListWin *this)
{
  ChargedItemListWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ChargedItemListWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ChargedItemListWin::`vftable'{for `IDirectMessenger'};
  v1->m_akItemInfoList[0].pkIcon = 0;
  v1->m_akItemInfoList[0].pkItemDescription = 0;
  v1->m_akItemInfoList[0].pkItemAvailableTerm = 0;
  v1->m_akItemInfoList[1].pkIcon = 0;
  v1->m_akItemInfoList[1].pkItemDescription = 0;
  v1->m_akItemInfoList[1].pkItemAvailableTerm = 0;
  v1->m_akItemInfoList[2].pkIcon = 0;
  v1->m_akItemInfoList[2].pkItemDescription = 0;
  v1->m_akItemInfoList[2].pkItemAvailableTerm = 0;
  v1->m_akItemInfoList[3].pkIcon = 0;
  v1->m_akItemInfoList[3].pkItemDescription = 0;
  v1->m_akItemInfoList[3].pkItemAvailableTerm = 0;
  v1->m_uiCurrPage = 0;
  v1->m_pkPageText = 0;
}
// 985240: using guessed type void (__thiscall *ChargedItemListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98525C: using guessed type int (__thiscall *ChargedItemListWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004DD110) --------------------------------------------------------
bool __cdecl IsActiveChargedTimeLimitItem(Item *pkItem)
{
  bool result; // al@2

  if ( pkItem
    && pkItem->m_pkInfo->ItemGradeType == 4
    && ((int (__thiscall *)(Item *))pkItem->vfptr[11].__vecDelDtor)(pkItem)
    && *(_BYTE *)((int (__thiscall *)(_DWORD))pkItem->vfptr[11].__vecDelDtor)(pkItem) )
  {
    result = *(_BYTE *)((int (__thiscall *)(Item *))pkItem->vfptr[11].__vecDelDtor)(pkItem) != -1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (004DD160) --------------------------------------------------------
unsigned int ChargedItemListWin::GetMaxPageNum()
{
  int (__thiscall **v1)(void *, char); // esi@1
  int v2; // eax@1
  unsigned int result; // eax@2

  v1 = ChargedItemList::GetList()[3];
  v2 = (int)v1 + ChargedItemList::GetTimeLimitItemCount();
  if ( v2 )
    result = ((unsigned int)(v2 - 1) >> 2) + 1;
  else
    result = 1;
  return result;
}

//----- (004DD180) --------------------------------------------------------
char __thiscall ChargedItemListWin::Create(ChargedItemListWin *this, PgFrameWork *pkFrameWork)
{
  ChargedItemListWin *v2; // edi@1
  NiTexturePalette *v3; // esi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  NiSourceTexture *v8; // esi@10
  char *v9; // eax@12
  NiSourceTexture *v10; // eax@12
  PgSprData *v11; // eax@15
  void *v12; // esi@15
  int v13; // edi@15
  signed int v14; // ebx@15
  char *v15; // eax@16
  PgWinSpr *v16; // eax@16
  ItemIcon *v17; // eax@16
  char *v18; // eax@16
  PgWinAbbreviateText *v19; // eax@16
  PgTextGeometry *v20; // eax@16
  char *v21; // eax@16
  NiSourceTexture *v22; // esi@17
  PgWinBut *v23; // edi@17
  char *v24; // eax@17
  PgWinBut *v25; // esi@17
  char *v26; // eax@17
  PgWinText *v27; // eax@17
  ChargedItemListWin *v28; // ecx@17
  NiRefObjectVtbl *v29; // eax@17
  NiNode *v30; // esi@18
  struct D3DXCOLOR v31; // [sp-10h] [bp-64h]@12
  int *v32; // [sp+0h] [bp-54h]@13
  int *v33; // [sp+4h] [bp-50h]@13
  NiSourceTexture *v34; // [sp+8h] [bp-4Ch]@13
  UIUtil ui; // [sp+1Ch] [bp-38h]@10
  ChargedItemListWin *v36; // [sp+30h] [bp-24h]@1
  int iXOff; // [sp+34h] [bp-20h]@4
  int iLeft; // [sp+38h] [bp-1Ch]@13
  int iYOff; // [sp+3Ch] [bp-18h]@4
  int iTop; // [sp+40h] [bp-14h]@13
  NiPointer<NiNode> spNode; // [sp+44h] [bp-10h]@1
  int v42; // [sp+50h] [bp-4h]@1

  v2 = this;
  v36 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v42 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\ComItemWin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iXOff, &iYOff, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "ChargedItemWin", 0) )
  {
    v6 = spNode.m_pObject;
    v42 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v42) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, iXOff, iYOff);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  UIUtil::CreateSpr(&ui, "Panel02", 0);
  UIUtil::CreateBtn(&ui, 0xAu, "ClsNor", "ClsOver", "ClsClick", 0, 0);
  v8 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
    UIUtil::CreateBtn(&ui, 0xDu, "HelpLinkNor", "HelpLinkOver", "HelpLinkClick", 0, v8);
  v31 = Color::m_kDxWinTitleColor;
  v9 = (char *)TextData::Get(0x3D88677Bu);
  UIUtil::CreateTextNoSprEx(&ui, "WinTitle", v9, v31, 5u, 0, 3u);
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
  {
    v34 = v10;
    *(float *)&v33 = COERCE_FLOAT(&iTop);
    v32 = &iLeft;
    LODWORD(v31.a) = "Theme";
  }
  else
  {
    *(float *)&v34 = 0.0;
    *(float *)&v33 = COERCE_FLOAT(&iTop);
    v32 = &iLeft;
    LODWORD(v31.a) = "Theme";
  }
  v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, (const char *)LODWORD(v31.a), v32, v33, v34);
  PgWinSpr::CreateWin(iLeft - iXOff, iTop - iYOff, v11, (PgWin *)&v2->vfptr, 0, 0);
  v12 = (void *)1;
  v13 = (int)&v2->m_akItemInfoList[0].pkItemDescription;
  v14 = 4;
  do
  {
    *(float *)&v34 = 0.0;
    v33 = (int *)v12;
    v15 = fs("Slot%02d", v12);
    v16 = UIUtil::CreateSpr(&ui, v15, v34);
    v17 = ItemIcon::CreateWin(3, 3, (PgWin *)&v16->vfptr);
    v34 = (NiSourceTexture *)1;
    *(float *)&v33 = 0.0;
    *(_DWORD *)(v13 - 4) = v17;
    ItemIcon::SetItem(v17, (Item *)v33, (bool)v34);
    *(float *)&v34 = 0.0;
    *(float *)&v33 = 0.0;
    v32 = (int *)4;
    v31 = Color::m_kDxWhiteColor;
    v18 = fs("ItemTxt%02d", v12);
    v19 = UIUtil::CreateText(&ui, v18, &byte_9850EB, 0, v31, (unsigned int)v32, (NiSourceTexture *)v33, (bool)v34);
    *(float *)&v34 = 0.0;
    *(_DWORD *)v13 = v19;
    v20 = v19->m_spTextGeom.m_pObject;
    *(float *)&v33 = 0.0;
    v32 = (int *)5;
    v20->m_bAutoWordWrap = 1;
    v31 = Color::m_kDxWhiteColor;
    v21 = fs("ItemUseTerm%02d", v12);
    *(_DWORD *)(v13 + 4) = UIUtil::CreateText(
                             &ui,
                             v21,
                             &byte_985117,
                             0,
                             v31,
                             (unsigned int)v32,
                             (NiSourceTexture *)v33,
                             (bool)v34);
    v12 = (char *)v12 + 1;
    v13 += 12;
    --v14;
  }
  while ( v14 );
  UIUtil::CreateSpr(&ui, "Panel03", 0);
  v22 = MenuTexMgr::GetTexture(0x1Cu);
  v23 = UIUtil::CreateBtn(&ui, 0xBu, "PrePageNor", "PrePageClick", "PrePageOver", 0, v22);
  *(float *)&v34 = 8.3775814e25;
  v23->m_pkToolTipWin = g_pkToolTipWin;
  v24 = (char *)TextData3::Get((unsigned int)v34);
  PgWin::SetToolTipWinText((PgWin *)&v23->vfptr, v24);
  v25 = UIUtil::CreateBtn(&ui, 0xCu, "NextPageNor", "NextPageClick", "NextPageOver", 0, v22);
  *(float *)&v34 = 1.7053656e-16;
  v25->m_pkToolTipWin = g_pkToolTipWin;
  v26 = (char *)TextData3::Get((unsigned int)v34);
  PgWin::SetToolTipWinText((PgWin *)&v25->vfptr, v26);
  UIUtil::CreateSpr(&ui, "Number", 0);
  v27 = UIUtil::CreateTextNoSpr(&ui, "Number01", byte_985129, Color::m_kDxWhiteColor, 5u);
  v28 = v36;
  *(float *)&v34 = 0.5;
  v36->m_pkPageText = v27;
  v29 = v28->vfptr;
  *(float *)&v33 = 0.0;
  ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, NiSourceTexture *))v29[59].__vecDelDtor)(
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.0,
    v34);
  LOBYTE(v42) = 0;
  UIUtil::~UIUtil(&ui);
  v42 = -1;
  if ( spNode.m_pObject )
  {
    v30 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v30 )
        v30->vfptr->__vecDelDtor((NiRefObject *)v30, 1u);
    }
  }
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004DD5E0) --------------------------------------------------------
void __thiscall ChargedItemListWin::UpdatePageInfo(ChargedItemListWin *this)
{
  ChargedItemListWin *v1; // esi@1
  int (__thiscall **v2)(void *, char); // edi@2
  int v3; // eax@2
  unsigned int v4; // eax@3
  NiRefObjectVtbl *v5; // edi@5
  char *v6; // eax@5

  v1 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[65].__vecDelDtor)() )
  {
    v2 = ChargedItemList::GetList()[3];
    v3 = (int)v2 + ChargedItemList::GetTimeLimitItemCount();
    if ( v3 )
      v4 = ((unsigned int)(v3 - 1) >> 2) + 1;
    else
      v4 = 1;
    v5 = v1->m_pkPageText->vfptr;
    v6 = fs("%d / %d", v1->m_uiCurrPage + 1, v4);
    v5[118].__vecDelDtor((NiRefObject *)v1->m_pkPageText, (unsigned int)v6);
  }
}

//----- (004DD640) --------------------------------------------------------
void __userpurge ChargedItemListWin::ChargedItemInfo::SetItem(ChargedItemListWin::ChargedItemInfo *this@<ecx>, int a2@<ebx>, PROTO_CHARGEDBUFF_INFO *pkChargedBuffInfo)
{
  ChargedItemListWin::ChargedItemInfo *v3; // esi@1
  ChargedItemEffect *v4; // eax@3
  ItemViewInfo *v5; // eax@4
  ItemViewInfo *v6; // ebx@4
  NiRefObjectVtbl *v7; // edi@5
  char *v8; // eax@5
  int v9; // [sp-4h] [bp-38h]@3
  int v10; // [sp+0h] [bp-34h]@0
  char acUseDate[20]; // [sp+8h] [bp-2Ch]@5
  char acEndDate[20]; // [sp+1Ch] [bp-18h]@5

  v3 = this;
  if ( pkChargedBuffInfo )
  {
    v9 = a2;
    v4 = ChargedEffectTable::GetByHandle(pkChargedBuffInfo->ChargedBuffID);
    if ( v4 && (v5 = ItemViewInfoTab::GetByInxName(v4->ItemID), (v6 = v5) != 0) )
    {
      ItemIcon::SetItemAsID(v3->pkIcon, (int)pkChargedBuffInfo, v5->ID);
      ((void (__stdcall *)(char *, int, int))v3->pkItemDescription->vfptr[118].__vecDelDtor)(v6->Descript, v9, v10);
      GetShineDateStr(pkChargedBuffInfo->UseTime, acUseDate, 20);
      GetShineDateStr(pkChargedBuffInfo->EndTime, acEndDate, 20);
      v7 = v3->pkItemAvailableTerm->vfptr;
      v8 = fs("%s~%s", acUseDate, acEndDate);
      v7[118].__vecDelDtor((NiRefObject *)v3->pkItemAvailableTerm, (unsigned int)v8);
    }
    else
    {
      ItemIcon::SetItemAsID(v3->pkIcon, (int)pkChargedBuffInfo, 0xFFFF);
      ((void (__stdcall *)(void *, int, int))v3->pkItemDescription->vfptr[118].__vecDelDtor)(&unk_9850E9, v9, v10);
      v3->pkItemAvailableTerm->vfptr[118].__vecDelDtor(
        (NiRefObject *)v3->pkItemAvailableTerm,
        (unsigned int)&unk_9850EA);
    }
  }
  else
  {
    ItemIcon::SetItem(this->pkIcon, 0, 1);
    ((void (__stdcall *)(void *))v3->pkItemDescription->vfptr[118].__vecDelDtor)(&unk_9850DA);
    v3->pkItemAvailableTerm->vfptr[118].__vecDelDtor((NiRefObject *)v3->pkItemAvailableTerm, (unsigned int)&unk_9850DB);
  }
}
// 4DD640: could not find valid save-restore pair for ebx

//----- (004DD770) --------------------------------------------------------
void __thiscall ChargedItemListWin::Refresh(ChargedItemListWin *this)
{
  ChargedItemListWin *v1; // edi@1
  int (__thiscall ***v2)(void *, char); // eax@1
  int (__thiscall **v3)(void *, char); // esi@1
  unsigned int v4; // eax@1
  ChargedItemListWin::ChargedItemInfo *v5; // esi@3
  int v6; // ebx@3
  NiTListItem<PROTO_CHARGEDBUFF_INFO *> *v7; // esi@5
  int v8; // eax@5
  ChargedItemListWin::ChargedItemInfo *v9; // ebx@9
  signed int v10; // edi@9
  PROTO_CHARGEDBUFF_INFO *v11; // eax@11
  unsigned int v12; // esi@12
  ChargedItemListWin::ChargedItemInfo *v13; // ebx@13
  unsigned int v14; // eax@14
  Item *v15; // eax@15
  int (__thiscall **v16)(void *, char); // edx@18
  NiRefObjectVtbl *v17; // eax@18
  int (__thiscall **v18)(void *, char); // esi@19
  int v19; // eax@19
  unsigned int v20; // eax@20
  NiRefObjectVtbl *v21; // esi@22
  char *v22; // eax@22
  NiTList<PROTO_CHARGEDBUFF_INFO *> *pkList; // [sp+Ch] [bp-Ch]@1
  ChargedItemListWin *v24; // [sp+10h] [bp-8h]@1
  unsigned int uiHead; // [sp+14h] [bp-4h]@5
  unsigned int uiHeada; // [sp+14h] [bp-4h]@13

  v1 = this;
  v24 = this;
  v2 = ChargedItemList::GetList();
  v3 = v2[3];
  pkList = (NiTList<PROTO_CHARGEDBUFF_INFO *> *)v2;
  v4 = (unsigned int)v3 + ChargedItemList::GetTimeLimitItemCount();
  if ( 4 * v1->m_uiCurrPage > v4 )
    v1->m_uiCurrPage = (v4 - 1) >> 2;
  v5 = v1->m_akItemInfoList;
  v6 = 4;
  do
  {
    ChargedItemListWin::ChargedItemInfo::SetItem(v5, v6, 0);
    ++v5;
    --v6;
  }
  while ( v6 );
  v7 = pkList->m_pkHead;
  v8 = 4 * v1->m_uiCurrPage;
  uiHead = 4 * v1->m_uiCurrPage;
  if ( 4 * v1->m_uiCurrPage )
  {
    do
    {
      if ( !v7 )
        break;
      --v8;
      v7 = v7->m_pkNext;
    }
    while ( v8 );
    uiHead = v8;
  }
  v9 = v1->m_akItemInfoList;
  v10 = 0;
  do
  {
    if ( !v7 )
      break;
    v11 = v7->m_element;
    v7 = v7->m_pkNext;
    ChargedItemListWin::ChargedItemInfo::SetItem(v9, (int)v9, v11);
    v8 = uiHead;
    ++v10;
    ++v9;
  }
  while ( v10 < 4 );
  v12 = v8;
  if ( v10 < 4 )
  {
    v13 = &v24->m_akItemInfoList[v10];
    uiHeada = 4 - v10;
    do
    {
      v14 = ChargedItemList::GetTimeLimitCharItemCount();
      if ( v12 >= v14 )
        v15 = ChargedItemList::GetTimeLimitMiniHouseItem(v12 - v14);
      else
        v15 = ChargedItemList::GetTimeLimitCharItem(v12);
      ChargedItemListWin::ChargedItemInfo::SetItem(v13, (int)v13, v15);
      ++v12;
      ++v13;
      --uiHeada;
    }
    while ( uiHeada );
  }
  v16 = ChargedItemList::GetList()[3];
  v17 = v24->vfptr;
  v24->m_uiListCount = (unsigned int)v16;
  if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v17[65].__vecDelDtor)(v24) )
  {
    v18 = ChargedItemList::GetList()[3];
    v19 = (int)v18 + ChargedItemList::GetTimeLimitItemCount();
    if ( v19 )
      v20 = ((unsigned int)(v19 - 1) >> 2) + 1;
    else
      v20 = 1;
    v21 = v24->m_pkPageText->vfptr;
    v22 = fs("%d / %d", v24->m_uiCurrPage + 1, v20);
    v21[118].__vecDelDtor((NiRefObject *)v24->m_pkPageText, (unsigned int)v22);
  }
}

//----- (004DD8E0) --------------------------------------------------------
void __thiscall ChargedItemListWin::OnShowWin(ChargedItemListWin *this)
{
  ChargedItemListWin *v1; // esi@1

  v1 = this;
  PgWin::OnShowWin((PgWin *)&this->vfptr);
  v1->m_uiListCount = 0;
  ChargedItemListWin::Refresh(v1);
}

//----- (004DD900) --------------------------------------------------------
void __thiscall ChargedItemListWin::OnNext(ChargedItemListWin *this)
{
  ChargedItemListWin *v1; // esi@1
  int (__thiscall **v2)(void *, char); // ebx@1
  unsigned int v3; // edi@1

  v1 = this;
  v2 = ChargedItemList::GetList()[3];
  v3 = v1->m_uiCurrPage;
  if ( 4 * v3 + 4 < (unsigned int)v2 + ChargedItemList::GetTimeLimitItemCount() )
  {
    v1->m_uiCurrPage = v3 + 1;
    ChargedItemListWin::Refresh(v1);
  }
}

//----- (004DD940) --------------------------------------------------------
void __thiscall ChargedItemListWin::OnPrev(ChargedItemListWin *this)
{
  unsigned int v1; // eax@1

  v1 = this->m_uiCurrPage;
  if ( v1 )
    this->m_uiCurrPage = v1 - 1;
  ChargedItemListWin::Refresh(this);
}

//----- (004DD960) --------------------------------------------------------
ChargedItemListWin *__cdecl ChargedItemListWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  ChargedItemListWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x194u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    ChargedItemListWin::ChargedItemListWin((ChargedItemListWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (ChargedItemListWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (004DDA90) --------------------------------------------------------
void __thiscall ChargedItemListWin::OnCommand(ChargedItemListWin *this, unsigned int wParam, int lParam)
{
  unsigned int v3; // eax@2
  GameFrameWork *v4; // eax@7

  switch ( wParam )
  {
    case 0xBu:
      v3 = this->m_uiCurrPage;
      if ( v3 )
        this->m_uiCurrPage = v3 - 1;
      ChargedItemListWin::Refresh(this);
      break;
    case 0xCu:
      ChargedItemListWin::OnNext(this);
      break;
    case 0xAu:
      PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
      break;
    case 0xDu:
      v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v4 )
        GameFrameWork::OpenPlayGuideSearchList(v4, "ComItemWin");
      break;
    default:
      return;
  }
}

//----- (004DDB10) --------------------------------------------------------
unsigned int __cdecl ITableBase<ItemViewInfo,ItemViewInfoTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C298: using guessed type int ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;

//----- (004DDB30) --------------------------------------------------------
ChargedItemListWin *__thiscall ChargedItemListWin::`vector deleting destructor'(ChargedItemListWin *this, unsigned int a2)
{
  ChargedItemListWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ChargedItemListWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ChargedItemListWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 985240: using guessed type void (__thiscall *ChargedItemListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98525C: using guessed type int (__thiscall *ChargedItemListWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004DDB70) --------------------------------------------------------
ItemViewInfo *__cdecl ItemViewInfoTab::GetByInxName(char *pcInxName)
{
  unsigned int v1; // edi@3
  ItemViewInfo *result; // eax@6

  if ( pcInxName && *pcInxName )
  {
    v1 = 0;
    if ( ITableBase<ItemViewInfo,ItemViewInfoTab>::GetTotal() )
    {
      while ( strcmp(
                CDataReader::GetRecord((CDataReader *)(ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable + 4), v1)
              + 2,
                pcInxName) )
      {
        if ( ++v1 >= ITableBase<ItemViewInfo,ItemViewInfoTab>::GetTotal() )
          goto LABEL_6;
      }
      result = (ItemViewInfo *)CDataReader::GetRecord(
                                 (CDataReader *)(ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable + 4),
                                 v1);
    }
    else
    {
LABEL_6:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C298: using guessed type int ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;

//----- (004DDC00) --------------------------------------------------------
void __stdcall CharInfoWin::ConvertCommaNumber(__int64 i64Val, char *pNumberString)
{
  char *v3; // esi@1
  unsigned int v4; // edi@1
  char *v5; // eax@1
  char v6; // dl@2
  int v7; // eax@3
  char v8; // dl@4
  char v9; // dl@4
  char v10; // dl@4
  char v11; // al@4
  char v12; // dl@6
  char v13; // dl@6
  char v14; // al@6
  char v15; // dl@8
  char v16; // al@8
  char comma2[4]; // [sp+Ch] [bp-4h]@4

  v3 = pNumberString;
  v4 = HIDWORD(i64Val);
  sprintf(pNumberString, "%I64d", i64Val);
  v5 = v3;
  pNumberString = v3 + 1;
  do
    v6 = *v5++;
  while ( v6 );
  v7 = v5 - pNumberString;
  if ( v7 <= 9 )
  {
    if ( v7 <= 6 )
    {
      if ( v7 > 3 )
      {
        *(_WORD *)((char *)&pNumberString + 1) = 0;
        HIDWORD(i64Val) = 0;
        BYTE3(pNumberString) = 0;
        LOWORD(pNumberString) = (unsigned __int8)v3[v7 - 3];
        v15 = v3[v7 - 2];
        v16 = v3[v7 - 1];
        BYTE1(pNumberString) = v15;
        BYTE2(pNumberString) = v16;
        BYTE3(pNumberString) = 0;
        sprintf(v3, "%I64d,%s", (signed __int64)__PAIR__(v4, (unsigned int)i64Val) / 1000, &pNumberString);
      }
    }
    else
    {
      LOBYTE(pNumberString) = v3[v7 - 3];
      v12 = v3[v7 - 2];
      *(_WORD *)((char *)&pNumberString + 1) = 0;
      BYTE1(pNumberString) = v12;
      BYTE2(pNumberString) = v3[v7 - 1];
      BYTE4(i64Val) = v3[v7 - 6];
      v13 = v3[v7 - 5];
      v14 = v3[v7 - 4];
      BYTE5(i64Val) = v13;
      BYTE6(i64Val) = v14;
      BYTE3(pNumberString) = 0;
      BYTE7(i64Val) = 0;
      sprintf(
        v3,
        "%I64d,%s,%s",
        (signed __int64)__PAIR__(v4, (unsigned int)i64Val) / 1000000,
        (char *)&i64Val + 4,
        &pNumberString);
    }
  }
  else
  {
    LOBYTE(pNumberString) = v3[v7 - 3];
    v8 = v3[v7 - 2];
    *(_WORD *)((char *)&pNumberString + 1) = 0;
    BYTE1(pNumberString) = v8;
    BYTE2(pNumberString) = v3[v7 - 1];
    BYTE4(i64Val) = v3[v7 - 6];
    v9 = v3[v7 - 5];
    *(_WORD *)((char *)&i64Val + 5) = 0;
    BYTE5(i64Val) = v9;
    BYTE6(i64Val) = v3[v7 - 4];
    comma2[0] = v3[v7 - 9];
    v10 = v3[v7 - 8];
    v11 = v3[v7 - 7];
    comma2[1] = v10;
    comma2[2] = v11;
    BYTE3(pNumberString) = 0;
    BYTE7(i64Val) = 0;
    comma2[3] = 0;
    sprintf(
      v3,
      "%I64d,%s,%s,%s",
      (signed __int64)__PAIR__(v4, (unsigned int)i64Val) / 1000000000,
      comma2,
      (char *)&i64Val + 4,
      &pNumberString);
  }
}

//----- (004DDDB0) --------------------------------------------------------
void __thiscall CharInfoWin::OpenStatTitleWin(CharInfoWin *this)
{
  CharInfoWin *v1; // esi@1

  v1 = this;
  if ( !this->m_pkStatTitleWin )
    this->m_pkStatTitleWin = StatTitleWin::CreateWin(this->m_pkFrameWork);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkStatTitleWin->vfptr);
}

//----- (004DDDF0) --------------------------------------------------------
void __thiscall CharInfoWin::OpenCharacterTitleWin(CharInfoWin *this)
{
  CharInfoWin *v1; // esi@1

  v1 = this;
  if ( !this->m_pkCharTitleWin )
    this->m_pkCharTitleWin = CharTitleWin::CreateWin(this->m_pkFrameWork);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkCharTitleWin->vfptr);
  CharTitleWin::UpdateViewList(v1->m_pkCharTitleWin);
  CharTitleWin::SetCurTitleInfo(v1->m_pkCharTitleWin, &v1->m_kCurrentTitle);
}

//----- (004DDE50) --------------------------------------------------------
void __thiscall CharInfoWin::OnClose(CharInfoWin *this)
{
  CharInfoWin *v1; // esi@1

  v1 = this;
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkCharTitleWin->vfptr);
  PgWin::OnClose((PgWin *)&v1->vfptr);
}

//----- (004DDE70) --------------------------------------------------------
FreeStatView *__thiscall CharInfoWin::GetFreeStatView(CharInfoWin *this)
{
  return this->m_pkFreeStatView;
}

//----- (004DDE80) --------------------------------------------------------
void __thiscall CharInfoWin::SetCharTitleCurrentInfo(CharInfoWin *this, CHARTITLE_BRIEFINFO *pTitleInfo)
{
  CharTitleWin::CTWIN_LIST_INFO *v2; // edx@2
  CharTitleWin *v3; // ecx@2

  if ( pTitleInfo )
  {
    *((_BYTE *)&this->m_kCurrentTitle + 1) ^= (*((_BYTE *)&this->m_kCurrentTitle + 1) ^ pTitleInfo->ElementNo) & 0x3F;
    this->m_kCurrentTitle.MobID = pTitleInfo->MobID;
    v2 = &this->m_kCurrentTitle;
    v3 = this->m_pkCharTitleWin;
    v2->Type = pTitleInfo->Type;
    if ( v3 )
      CharTitleWin::SetCurTitleInfo(v3, v2);
  }
}

//----- (004DDED0) --------------------------------------------------------
void CharInfoWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "ChrStatus");
}

//----- (004DDF00) --------------------------------------------------------
void CharInfoWin::OnOpenCollection()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenCollectWin(v1, 1);
}

//----- (004DDF20) --------------------------------------------------------
void __thiscall CharInfoWin::EnableChangeCondition(CharInfoWin *this, bool bEnable)
{
  this->m_bChangeCondition = bEnable;
}

//----- (004DDF30) --------------------------------------------------------
void __thiscall CharInfoWin::SetChangeCondition(CharInfoWin *this, CHAR_CHANGEBYCONDITION_PARAM kCondition, char bFlag, char bIndex)
{
  char *v4; // eax@2
  char *v5; // eax@3
  char *v6; // eax@4
  char *v7; // eax@5
  char *v8; // eax@6
  char *v9; // eax@7
  char *v10; // eax@8

  switch ( bFlag )
  {
    case 0x1C:
      v4 = (char *)this + 2 * (3 * (unsigned __int8)bIndex + 324);
      *(_DWORD *)v4 = *(_DWORD *)&kCondition.nFlag;
      *((_WORD *)v4 + 2) = HIWORD(kCondition.nValue);
      break;
    case 0x1D:
      v5 = (char *)this + 2 * (3 * (unsigned __int8)bIndex + 354);
      *(_DWORD *)v5 = *(_DWORD *)&kCondition.nFlag;
      *((_WORD *)v5 + 2) = HIWORD(kCondition.nValue);
      break;
    case 0x1E:
      v6 = (char *)this + 2 * (3 * (unsigned __int8)bIndex + 474);
      *(_DWORD *)v6 = *(_DWORD *)&kCondition.nFlag;
      *((_WORD *)v6 + 2) = HIWORD(kCondition.nValue);
      break;
    case 0x1F:
      v7 = (char *)this + 2 * (3 * (unsigned __int8)bIndex + 504);
      *(_DWORD *)v7 = *(_DWORD *)&kCondition.nFlag;
      *((_WORD *)v7 + 2) = HIWORD(kCondition.nValue);
      break;
    case 0x20:
      v8 = (char *)this + 2 * (3 * (unsigned __int8)bIndex + 384);
      *(_DWORD *)v8 = *(_DWORD *)&kCondition.nFlag;
      *((_WORD *)v8 + 2) = HIWORD(kCondition.nValue);
      break;
    case 0x21:
      v9 = (char *)this + 2 * (3 * (unsigned __int8)bIndex + 534);
      *(_DWORD *)v9 = *(_DWORD *)&kCondition.nFlag;
      *((_WORD *)v9 + 2) = HIWORD(kCondition.nValue);
      break;
    case 0x23:
      v10 = (char *)this + 2 * (3 * (unsigned __int8)bIndex + 444);
      *(_DWORD *)v10 = *(_DWORD *)&kCondition.nFlag;
      *((_WORD *)v10 + 2) = HIWORD(kCondition.nValue);
      break;
    default:
      return;
  }
}

//----- (004DE050) --------------------------------------------------------
void __thiscall CharInfoWin::SetConditionDataNum(CharInfoWin *this, unsigned int uiNum)
{
  this->m_uiConditionCount = uiNum;
}

//----- (004DE060) --------------------------------------------------------
void __thiscall CharInfoWin::SetSectionRate(CharInfoWin *this, unsigned int uiRate)
{
  this->m_uiSectionRate = uiRate / 0xA;
}

//----- (004DE080) --------------------------------------------------------
void __stdcall CharInfoWin::SetMinMaxParamTextWin(PgWinText *pkWin, int iMinBaseVal, int iMinChangeVal, int iMaxBaseVal, int iMaxChangeVal, float fDisplayAlpha)
{
  double v7; // st6@1
  signed int v8; // ebx@1

  v7 = (double)iMinChangeVal * fDisplayAlpha;
  v8 = (signed int)(fDisplayAlpha * (double)iMaxChangeVal);
  ((void (__thiscall *)(PgWinText *))pkWin->vfptr[117].__vecDelDtor)(pkWin);
  if ( (signed int)v7 == v8 )
    ((void (*)(PgWinText *, const char *, ...))pkWin->vfptr[119].__vecDelDtor)(
      pkWin,
      (const char *)&unk_985998,
      (signed int)v7);
  else
    ((void (*)(PgWinText *, const char *, ...))pkWin->vfptr[119].__vecDelDtor)(pkWin, "%d ~ %d", (signed int)v7, v8);
}
// 4DE080: could not find valid save-restore pair for edi

//----- (004DE120) --------------------------------------------------------
void __stdcall CharInfoWin::SetParamTextWin(PgWinText *pkWin, int BaseVal, int ChangeVal, int iBonusVal, float fDisplayAlpha)
{
  signed int v6; // edi@1

  v6 = (signed int)(fDisplayAlpha * (double)ChangeVal);
  ((void (__thiscall *)(_DWORD))pkWin->vfptr[117].__vecDelDtor)(pkWin);
  if ( iBonusVal )
    ((void (*)(_DWORD, const char *, ...))pkWin->vfptr[119].__vecDelDtor)(pkWin, "%d (+%d)", v6, iBonusVal);
  else
    ((void (*)(_DWORD, const char *, ...))pkWin->vfptr[119].__vecDelDtor)(pkWin, "%d", v6);
}
// 4DE120: could not find valid save-restore pair for edi

//----- (004DE1B0) --------------------------------------------------------
void __stdcall CharInfoWin::SetParamTextWin(PgWinText *pkWin, float BaseVal, float ChangeVal, float fBonusVal)
{
  D3DXCOLOR *v5; // [sp-Ch] [bp-Ch]@2

  if ( ChangeVal == BaseVal )
  {
    v5 = &Color::m_kDxWhiteColor;
  }
  else if ( ChangeVal >= (double)BaseVal )
  {
    v5 = &Color::m_kDxGreenColor;
  }
  else
  {
    v5 = &Color::m_kDxRedColor;
  }
  pkWin->vfptr[117].__vecDelDtor((NiRefObject *)pkWin, (unsigned int)v5);
  ((void (*)(_DWORD, const char *, ...))pkWin->vfptr[119].__vecDelDtor)(pkWin, "%d", (signed int)(ChangeVal + 0.5));
}

//----- (004DE230) --------------------------------------------------------
void __userpurge CharInfoWin::OnCommand(CharInfoWin *this@<ecx>, int a2@<ebx>, unsigned int wParam, int lParam)
{
  CharInfoWin *v4; // esi@1

  v4 = this;
  switch ( wParam )
  {
    case 9u:
      CharInfoWin::OpenStatTitleWin(this);
      break;
    case 0x14u:
      CharInfoWin::OpenCharacterTitleWin(this);
      break;
    case 0xAu:
      StatPointReqTask::ReqIncPoint(this->m_spStatPointReqTask.m_pObject, 0);
      break;
    case 0xBu:
      StatPointReqTask::ReqIncPoint(this->m_spStatPointReqTask.m_pObject, SD_DEX);
      break;
    case 0xCu:
      StatPointReqTask::ReqIncPoint(this->m_spStatPointReqTask.m_pObject, SD_CON);
      break;
    case 0xDu:
      StatPointReqTask::ReqIncPoint(this->m_spStatPointReqTask.m_pObject, SD_INT);
      break;
    case 0xEu:
      StatPointReqTask::ReqIncPoint(this->m_spStatPointReqTask.m_pObject, SD_MEN);
      break;
    case 0xFu:
      StatPointReqTask::ReqDecPoint(this->m_spStatPointReqTask.m_pObject, 0);
      break;
    case 0x10u:
      StatPointReqTask::ReqDecPoint(this->m_spStatPointReqTask.m_pObject, SD_DEX);
      break;
    case 0x11u:
      StatPointReqTask::ReqDecPoint(this->m_spStatPointReqTask.m_pObject, SD_CON);
      break;
    case 0x12u:
      StatPointReqTask::ReqDecPoint(this->m_spStatPointReqTask.m_pObject, SD_INT);
      break;
    case 0x13u:
      StatPointReqTask::ReqDecPoint(this->m_spStatPointReqTask.m_pObject, SD_MEN);
      break;
    case 0x15u:
      if ( (unsigned __int8)((int (*)(void))this->m_pkFreeStatView->vfptr[65].__vecDelDtor)() )
      {
        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkFreeStatView->vfptr);
      }
      else
      {
        ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v4->m_pkFreeStatView->vfptr[59].__vecDelDtor)(
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          0.5,
          0.5);
        FreeStatView::SetFreeStatPoint(v4->m_pkFreeStatView, a2, &rkPoint);
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkFreeStatView->vfptr);
      }
      break;
    case 0x16u:
      CharInfoWin::OnHelpLink();
      break;
    case 0x17u:
      CharInfoWin::OnOpenCollection();
      break;
    default:
      return;
  }
}

//----- (004DE3E0) --------------------------------------------------------
void __thiscall CharInfoWin::RefreshStatTitle(CharInfoWin *this)
{
  CharInfoWin *v1; // ebx@1
  NiTList<int> *v2; // eax@2
  NiTListItem<int> **v3; // edi@3
  int v4; // eax@4
  IconWin *v5; // esi@4
  NiSourceTexture *pkTexture; // [sp+4h] [bp-4h]@1

  v1 = this;
  pkTexture = MenuTexMgr::GetTexture(8u);
  if ( pkTexture )
  {
    v2 = User::GetStatTitleList(&g_kUser);
    if ( v2 )
    {
      v3 = &v2->m_pkHead->m_pkNext;
      while ( v3 )
      {
        v4 = v1->m_aiStatTitleCount[0];
        v5 = v1->m_apkStatTitleIcon[0][v4];
        v3 = (NiTListItem<int> **)*v3;
        v1->m_aiStatTitleCount[0] = v4 + 1;
        ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v5->vfptr[146].__vecDelDtor)(
          v5,
          pkTexture,
          0,
          32,
          32);
        v5->vfptr[64].__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
  }
}

//----- (004DE460) --------------------------------------------------------
char __thiscall CharInfoWin::Create(CharInfoWin *this, PgFrameWork *pkFrameWork)
{
  CharInfoWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // ebx@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  int v10; // edi@15
  int v11; // ebx@15
  NiSourceTexture *v12; // eax@15
  PgSprData *v13; // eax@16
  PgSprData *v14; // eax@20
  PgWinSpr *v15; // eax@20
  PgSprData *v16; // eax@20
  PgFont *v17; // eax@22
  NiUnsharedGeometryGroup *v18; // eax@22
  PgFont *v19; // ST18C_4@22
  unsigned int v20; // ST188_4@22
  unsigned int v21; // eax@22
  NiUnsharedGeometryGroup *v22; // eax@22
  PgWinBut *v23; // eax@22
  char *v24; // eax@22
  PgWinBut *v25; // eax@22
  PgWinBut *v26; // eax@22
  char *v27; // eax@22
  PgWinBut *v28; // eax@22
  PgWinBut *v29; // eax@22
  char *v30; // eax@22
  PgWinBut *v31; // eax@22
  PgWinBut *v32; // eax@22
  char *v33; // eax@22
  PgWinBut *v34; // eax@22
  PgWinBut *v35; // eax@22
  char *v36; // eax@22
  PgWinBut *v37; // eax@22
  PgSprData *v38; // eax@22
  PgFont *v39; // eax@23
  NiUnsharedGeometryGroup *v40; // eax@23
  PgFont *v41; // eax@24
  PgWinText *v42; // eax@24
  Char *v43; // ecx@24
  NiGeometry *v44; // eax@24
  PgFont *v45; // eax@30
  NiUnsharedGeometryGroup *v46; // eax@30
  PgFont *v47; // eax@31
  PgWinText *v48; // eax@31
  PgFont *v49; // eax@32
  NiUnsharedGeometryGroup *v50; // eax@32
  PgFont *v51; // eax@33
  PgWinText *v52; // eax@33
  PgFont *v53; // eax@34
  NiUnsharedGeometryGroup *v54; // eax@34
  PgFont *v55; // eax@35
  PgWinText *v56; // eax@35
  PgFont *v57; // eax@36
  NiUnsharedGeometryGroup *v58; // eax@36
  PgFont *v59; // eax@37
  PgWinText *v60; // eax@37
  PgFont *v61; // eax@38
  NiUnsharedGeometryGroup *v62; // eax@38
  PgFont *v63; // eax@39
  PgWinText *v64; // eax@39
  PgFont *v65; // eax@40
  NiUnsharedGeometryGroup *v66; // eax@40
  char *v67; // eax@40
  PgFont *v68; // eax@41
  NiUnsharedGeometryGroup *v69; // eax@41
  char *v70; // eax@41
  PgFont *v71; // eax@42
  NiUnsharedGeometryGroup *v72; // eax@42
  char *v73; // eax@42
  PgFont *v74; // eax@43
  NiUnsharedGeometryGroup *v75; // eax@43
  char *v76; // eax@43
  PgFont *v77; // eax@44
  NiUnsharedGeometryGroup *v78; // eax@44
  char *v79; // eax@44
  PgFont *v80; // eax@45
  PgWinText *v81; // eax@45
  PgFont *v82; // eax@46
  PgWinText *v83; // eax@46
  PgFont *v84; // eax@47
  PgWinText *v85; // eax@47
  PgFont *v86; // eax@48
  PgWinText *v87; // eax@48
  PgFont *v88; // eax@49
  NiUnsharedGeometryGroup *v89; // eax@49
  char *v90; // eax@49
  PgFont *v91; // eax@50
  PgWinText *v92; // eax@50
  PgFont *v93; // eax@51
  PgWinText *v94; // eax@51
  NiUnsharedGeometryGroup *v95; // eax@51
  char *v96; // eax@51
  PgFont *v97; // eax@51
  PgWinText *v98; // eax@51
  char *v99; // eax@51
  PgFont *v100; // eax@52
  PgWinText *v101; // eax@52
  PgFont *v102; // eax@52
  PgWinText *v103; // eax@52
  PgFont *v104; // eax@53
  NiUnsharedGeometryGroup *v105; // eax@53
  char *v106; // eax@53
  PgFont *v107; // eax@54
  PgWinText *v108; // eax@54
  PgFont *v109; // eax@55
  NiUnsharedGeometryGroup *v110; // eax@55
  char *v111; // eax@55
  PgFont *v112; // eax@57
  PgWinText *v113; // eax@57
  PgFont *v114; // eax@59
  NiUnsharedGeometryGroup *v115; // eax@59
  PgFont *v116; // eax@60
  PgWinText *v117; // eax@60
  PgFont *v118; // eax@61
  PgWinText *v119; // eax@61
  PgFont *v120; // eax@62
  NiUnsharedGeometryGroup *v121; // eax@62
  PgFont *v122; // eax@63
  PgWinText *v123; // eax@63
  PgFont *v124; // eax@64
  NiUnsharedGeometryGroup *v125; // eax@64
  PgFont *v126; // eax@65
  PgWinText *v127; // eax@65
  PgFont *v128; // eax@66
  NiUnsharedGeometryGroup *v129; // eax@66
  PgFont *v130; // eax@67
  PgWinText *v131; // eax@67
  PgFont *v132; // eax@68
  NiUnsharedGeometryGroup *v133; // eax@68
  PgFont *v134; // eax@69
  PgWinText *v135; // eax@69
  PgFont *v136; // eax@70
  NiUnsharedGeometryGroup *v137; // eax@70
  PgFont *v138; // eax@71
  PgWinText *v139; // eax@71
  PgFont *v140; // eax@72
  NiUnsharedGeometryGroup *v141; // eax@72
  PgFont *v142; // eax@73
  PgWinText *v143; // eax@73
  PgWinBut *v144; // eax@73
  char *v145; // eax@73
  PgFont *v146; // ST188_4@73
  unsigned int v147; // ST184_4@73
  unsigned int v148; // eax@73
  NiUnsharedGeometryGroup *v149; // ST190_4@73
  PgWinBut *v150; // eax@73
  PgWin *v151; // ST180_4@73
  PgFont *v152; // ST17C_4@73
  unsigned int v153; // ST178_4@73
  unsigned int v154; // eax@73
  NiUnsharedGeometryGroup *v155; // eax@73
  NiSourceTexture *v156; // eax@73
  UIUtil ui; // [sp+1ACh] [bp-3Ch]@73
  NiRefObjectVtbl *v158; // [sp+1C0h] [bp-28h]@22
  NiSourceTexture *pkTexture; // [sp+1C4h] [bp-24h]@1
  unsigned int uiWidth; // [sp+1C8h] [bp-20h]@20
  unsigned int uiHeight; // [sp+1CCh] [bp-1Ch]@20
  int uiLeft; // [sp+1D0h] [bp-18h]@11
  int uiTop; // [sp+1D4h] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+1D8h] [bp-10h]@1
  int v165; // [sp+1E4h] [bp-4h]@1
  PgSprData *pkTextWina; // [sp+1F0h] [bp+8h]@18
  NiSourceTexture *pkTextWin; // [sp+1F0h] [bp+8h]@18
  PgSprData *pkTextWinb; // [sp+1F0h] [bp+8h]@19
  PgWinText *pkTextWinc; // [sp+1F0h] [bp+8h]@22
  PgSprData *pkTextWind; // [sp+1F0h] [bp+8h]@22
  PgWinText *pkTextWine; // [sp+1F0h] [bp+8h]@22
  PgWinText *pkTextWinf; // [sp+1F0h] [bp+8h]@22
  PgSprData *pkTextWing; // [sp+1F0h] [bp+8h]@22
  PgSprData *pkTextWinh; // [sp+1F0h] [bp+8h]@22
  PgSprData *pkTextWini; // [sp+1F0h] [bp+8h]@22
  PgSprData *pkTextWinj; // [sp+1F0h] [bp+8h]@22
  PgSprData *pkTextWink; // [sp+1F0h] [bp+8h]@22
  PgSprData *pkTextWinl; // [sp+1F0h] [bp+8h]@22
  PgSprData *pkTextWinm; // [sp+1F0h] [bp+8h]@22
  PgSprData *pkTextWinn; // [sp+1F0h] [bp+8h]@22
  PgSprData *pkTextWino; // [sp+1F0h] [bp+8h]@22
  PgSprData *pkTextWinp; // [sp+1F0h] [bp+8h]@22
  PgWinText *pkTextWinq; // [sp+1F0h] [bp+8h]@23
  PgWinText *pkTextWinr; // [sp+1F0h] [bp+8h]@30
  PgWinText *pkTextWins; // [sp+1F0h] [bp+8h]@32
  PgWinText *pkTextWint; // [sp+1F0h] [bp+8h]@34
  PgWinText *pkTextWinu; // [sp+1F0h] [bp+8h]@36
  PgWinText *pkTextWinv; // [sp+1F0h] [bp+8h]@38
  PgWinText *pkTextWinw; // [sp+1F0h] [bp+8h]@40
  PgWinText *pkTextWinx; // [sp+1F0h] [bp+8h]@41
  PgWinText *pkTextWiny; // [sp+1F0h] [bp+8h]@42
  PgWinText *pkTextWinz; // [sp+1F0h] [bp+8h]@43
  PgWinText *pkTextWinba; // [sp+1F0h] [bp+8h]@44
  PgWinText *pkTextWinbb; // [sp+1F0h] [bp+8h]@49
  PgWinText *pkTextWinbc; // [sp+1F0h] [bp+8h]@51
  PgWinText *pkTextWinbd; // [sp+1F0h] [bp+8h]@53
  PgWinText *pkTextWinbe; // [sp+1F0h] [bp+8h]@55
  PgWinText *pkTextWinbf; // [sp+1F0h] [bp+8h]@59
  PgWinText *pkTextWinbg; // [sp+1F0h] [bp+8h]@62
  PgWinText *pkTextWinbh; // [sp+1F0h] [bp+8h]@64
  PgWinText *pkTextWinbi; // [sp+1F0h] [bp+8h]@66
  PgWinText *pkTextWinbj; // [sp+1F0h] [bp+8h]@68
  PgWinText *pkTextWinbk; // [sp+1F0h] [bp+8h]@70
  PgWinText *pkTextWinbl; // [sp+1F0h] [bp+8h]@72
  PgSprData *pkTextWinbm; // [sp+1F0h] [bp+8h]@73
  PgWinText *pkTextWinbn; // [sp+1F0h] [bp+8h]@73
  PgWinText *pkTextWinbo; // [sp+1F0h] [bp+8h]@73
  PgSprData *pkTextWinbp; // [sp+1F0h] [bp+8h]@73
  PgWinText *pkTextWinbq; // [sp+1F0h] [bp+8h]@73
  PgWinText *pkTextWinbr; // [sp+1F0h] [bp+8h]@73
  char pkTextWin_3; // [sp+1F3h] [bp+Bh]@24

  v2 = this;
  spNode.m_pObject = 0;
  v165 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  pkTexture = v3;
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v165 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
    goto LABEL_5;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "Game\\ChrStatus.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "CharInfoWin", 0) )
  {
    v4 = spNode.m_pObject;
    v165 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v10 = uiLeft;
  v11 = uiTop;
  v12 = MenuTexMgr::GetTexture(0x13u);
  if ( v12 )
    v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v12);
  else
    v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop - v11, v13, (PgWin *)&v2->vfptr, 0, 0);
  pkTextWina = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(pkTextWina, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(pkTextWina, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinCloseBut::CreateWin(uiLeft - v10, uiTop - v11, pkTextWina, (PgWin *)&v2->vfptr);
  pkTextWin = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    pkTextWinb = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, pkTextWin);
    PgSprData::Add(pkTextWinb, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(pkTextWinb, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, pkTextWinb, (PgWin *)&v2->vfptr, 0x16u, 0, 0);
  }
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
  v15 = PgWinSpr::CreateWin(uiLeft - v10, uiTop - v11, v14, (PgWin *)&v2->vfptr, 0, 0);
  v15->vfptr[60].__vecDelDtor((NiRefObject *)v15, 0);
  v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, pkTexture);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop - v11, v16, (PgWin *)&v2->vfptr, 0, 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "WinTitle",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
    goto LABEL_76;
  v17 = Font::Get(MAIN_MENU);
  pkTextWinc = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v17, (PgWin *)&v2->vfptr, 0, 0);
  pkTextWinc->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinc, 1u);
  ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinc->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
  v158 = pkTextWinc->vfptr + 118;
  v18 = TextData::Get(0xD6F6DEDF);
  v158->__vecDelDtor(pkTextWinc, v18);
  ((void (__stdcall *)(_DWORD))pkTextWinc->vfptr[60].__vecDelDtor)(0);
  pkTextWind = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SubNameBtnNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(pkTextWind, (NiAVObject *)&spNode.m_pObject->vfptr, "SubNameBtnClick");
  PgSprData::Add(pkTextWind, (NiAVObject *)&spNode.m_pObject->vfptr, "SubNameBtnOver");
  pkTextWine = (PgWinText *)PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, pkTextWind, (PgWin *)&v2->vfptr, 0x14u, 0, 0);
  v19 = Font::Get(MAIN_MENU);
  v20 = ((int (*)(void))pkTextWine->vfptr[37].__vecDelDtor)();
  v21 = ((int (*)(void))pkTextWine->vfptr[36].__vecDelDtor)();
  pkTextWinf = PgWinText::CreateWin(0, 1, v21, v20, v19, (PgWin *)&pkTextWine->vfptr, 0, 0);
  pkTextWinf->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinf, 5u);
  v158 = pkTextWinf->vfptr + 118;
  v22 = TextData::Get(0x1C3E377Au);
  v158->__vecDelDtor(pkTextWinf, v22);
  ((void (__stdcall *)(_DWORD))pkTextWinf->vfptr[60].__vecDelDtor)(0);
  pkTextWing = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "StrUpNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(pkTextWing, (NiAVObject *)&spNode.m_pObject->vfptr, "StrUpClick");
  PgSprData::Add(pkTextWing, (NiAVObject *)&spNode.m_pObject->vfptr, "StrUpOver");
  v23 = PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, pkTextWing, (PgWin *)&v2->vfptr, 0xAu, 0, 0);
  v2->m_pkStrUpBtn = v23;
  v23->m_pkToolTipWin = g_pkToolTipWin;
  v24 = (char *)TextData2::Get(0xC580798B);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkStrUpBtn->vfptr, v24);
  pkTextWinh = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "StrDnNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(pkTextWinh, (NiAVObject *)&spNode.m_pObject->vfptr, "StrDnClick");
  PgSprData::Add(pkTextWinh, (NiAVObject *)&spNode.m_pObject->vfptr, "StrDnOver");
  v25 = PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, pkTextWinh, (PgWin *)&v2->vfptr, 0xFu, 0, 0);
  v2->m_pkStrDnBtn = v25;
  v25->vfptr[64].__vecDelDtor((NiRefObject *)v25, 0);
  pkTextWini = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "DexUpNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(pkTextWini, (NiAVObject *)&spNode.m_pObject->vfptr, "DexUpClick");
  PgSprData::Add(pkTextWini, (NiAVObject *)&spNode.m_pObject->vfptr, "DexUpOver");
  v26 = PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, pkTextWini, (PgWin *)&v2->vfptr, 0xBu, 0, 0);
  v2->m_pkDexUpBtn = v26;
  v26->m_pkToolTipWin = g_pkToolTipWin;
  v27 = (char *)TextData2::Get(0xC580798B);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkDexUpBtn->vfptr, v27);
  pkTextWinj = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "DexDnNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(pkTextWinj, (NiAVObject *)&spNode.m_pObject->vfptr, "DexDnClick");
  PgSprData::Add(pkTextWinj, (NiAVObject *)&spNode.m_pObject->vfptr, "DexDnOver");
  v28 = PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, pkTextWinj, (PgWin *)&v2->vfptr, 0x10u, 0, 0);
  v2->m_pkDexDnBtn = v28;
  v28->vfptr[64].__vecDelDtor((NiRefObject *)v28, 0);
  pkTextWink = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ConUpNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(pkTextWink, (NiAVObject *)&spNode.m_pObject->vfptr, "ConUpClick");
  PgSprData::Add(pkTextWink, (NiAVObject *)&spNode.m_pObject->vfptr, "ConUpOver");
  v29 = PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, pkTextWink, (PgWin *)&v2->vfptr, 0xCu, 0, 0);
  v2->m_pkConUpBtn = v29;
  v29->m_pkToolTipWin = g_pkToolTipWin;
  v30 = (char *)TextData2::Get(0xC580798B);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkConUpBtn->vfptr, v30);
  pkTextWinl = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ConDnNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(pkTextWinl, (NiAVObject *)&spNode.m_pObject->vfptr, "ConDnClick");
  PgSprData::Add(pkTextWinl, (NiAVObject *)&spNode.m_pObject->vfptr, "ConDnOver");
  v31 = PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, pkTextWinl, (PgWin *)&v2->vfptr, 0x11u, 0, 0);
  v2->m_pkConDnBtn = v31;
  v31->vfptr[64].__vecDelDtor((NiRefObject *)v31, 0);
  pkTextWinm = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IntUpNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(pkTextWinm, (NiAVObject *)&spNode.m_pObject->vfptr, "IntUpClick");
  PgSprData::Add(pkTextWinm, (NiAVObject *)&spNode.m_pObject->vfptr, "IntUpOver");
  v32 = PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, pkTextWinm, (PgWin *)&v2->vfptr, 0xDu, 0, 0);
  v2->m_pkIntUpBtn = v32;
  v32->m_pkToolTipWin = g_pkToolTipWin;
  v33 = (char *)TextData2::Get(0xC580798B);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkIntUpBtn->vfptr, v33);
  pkTextWinn = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IntDnNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(pkTextWinn, (NiAVObject *)&spNode.m_pObject->vfptr, "IntDnClick");
  PgSprData::Add(pkTextWinn, (NiAVObject *)&spNode.m_pObject->vfptr, "IntDnOver");
  v34 = PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, pkTextWinn, (PgWin *)&v2->vfptr, 0x12u, 0, 0);
  v2->m_pkIntDnBtn = v34;
  v34->vfptr[64].__vecDelDtor((NiRefObject *)v34, 0);
  pkTextWino = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MenUpNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(pkTextWino, (NiAVObject *)&spNode.m_pObject->vfptr, "MenUpClick");
  PgSprData::Add(pkTextWino, (NiAVObject *)&spNode.m_pObject->vfptr, "MenUpOver");
  v35 = PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, pkTextWino, (PgWin *)&v2->vfptr, 0xEu, 0, 0);
  v2->m_pkMenUpBtn = v35;
  v35->m_pkToolTipWin = g_pkToolTipWin;
  v36 = (char *)TextData2::Get(0xC580798B);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkMenUpBtn->vfptr, v36);
  pkTextWinp = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MenDnNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(pkTextWinp, (NiAVObject *)&spNode.m_pObject->vfptr, "MenDnClick");
  PgSprData::Add(pkTextWinp, (NiAVObject *)&spNode.m_pObject->vfptr, "MenDnOver");
  v37 = PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, pkTextWinp, (PgWin *)&v2->vfptr, 0x13u, 0, 0);
  v2->m_pkMenDnBtn = v37;
  v37->vfptr[64].__vecDelDtor((NiRefObject *)v37, 0);
  v38 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, pkTexture);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop - v11, v38, (PgWin *)&v2->vfptr, 0, 0);
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "SubName", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
    goto LABEL_76;
  v39 = Font::Get(MAIN_MENU);
  pkTextWinq = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v39, (PgWin *)&v2->vfptr, 0, 0);
  v158 = pkTextWinq->vfptr + 118;
  v40 = TextData::Get(0xDFF0F646);
  v158->__vecDelDtor(pkTextWinq, v40);
  ((void (__stdcall *)(_DWORD))pkTextWinq->vfptr[60].__vecDelDtor)(0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "SubNameTxt",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
    goto LABEL_76;
  v41 = Font::Get(MAIN_MENU);
  v42 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v41, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkSubNameTextWin = v42;
  v42->vfptr[118].__vecDelDtor((NiRefObject *)v42, (unsigned int)"-");
  ((void (__stdcall *)(char *))v2->m_pkSubNameTextWin->vfptr[118].__vecDelDtor)(g_pkMainChar->m_CharTitleName);
  ((void (__stdcall *)(_DWORD))v2->m_pkSubNameTextWin->vfptr[60].__vecDelDtor)(0);
  v2->m_kCurrentTitle.Type = 0;
  v43 = g_pkMainChar;
  v44 = 0;
  pkTextWin_3 = 0;
  if ( g_pkMainChar[1].m_kCharShape.m_apkLodGeom[5] )
  {
    do
    {
      if ( pkTextWin_3 )
        break;
      if ( (*((_BYTE *)&v43[1].vfptr + 2 * (_DWORD)v44 + 1) & 0xC0) == -64 )
      {
        v2->m_kCurrentTitle.Type = *((_BYTE *)&v43[1].vfptr + 2 * (_DWORD)v44);
        pkTextWin_3 = 1;
        *((_BYTE *)&v2->m_kCurrentTitle + 1) ^= (*((_BYTE *)&v2->m_kCurrentTitle + 1) ^ *((_BYTE *)&g_pkMainChar[1].vfptr
                                                                                        + 2 * (_DWORD)v44
                                                                                        + 1)) & 0x3F;
        v43 = g_pkMainChar;
      }
      v44 = (NiGeometry *)((char *)v44 + 1);
    }
    while ( v44 < v43[1].m_kCharShape.m_apkLodGeom[5] );
  }
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          off_9856E0,
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
    goto LABEL_76;
  v45 = Font::Get(MAIN_MENU);
  pkTextWinr = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v45, (PgWin *)&v2->vfptr, 0, 0);
  v158 = pkTextWinr->vfptr + 118;
  v46 = TextData::Get(0x80A49695);
  v158->__vecDelDtor(pkTextWinr, v46);
  ((void (__stdcall *)(_DWORD))pkTextWinr->vfptr[60].__vecDelDtor)(0);
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "sIDTxt", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
    goto LABEL_76;
  v47 = Font::Get(MAIN_MENU);
  v48 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v47, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkCharNameTextWin = v48;
  v48->vfptr[118].__vecDelDtor((NiRefObject *)v48, (unsigned int)"-");
  ((void (__stdcall *)(_DWORD))v2->m_pkCharNameTextWin->vfptr[60].__vecDelDtor)(0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          off_9856F0,
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
    goto LABEL_76;
  v49 = Font::Get(MAIN_MENU);
  pkTextWins = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v49, (PgWin *)&v2->vfptr, 0, 0);
  v158 = pkTextWins->vfptr + 118;
  v50 = TextData::Get(0x4A5F8BA3u);
  v158->__vecDelDtor(pkTextWins, v50);
  ((void (__stdcall *)(_DWORD))pkTextWins->vfptr[60].__vecDelDtor)(0);
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "JobTxt", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
    goto LABEL_76;
  v51 = Font::Get(MAIN_MENU);
  v52 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v51, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkJobTextWin = v52;
  v52->vfptr[118].__vecDelDtor((NiRefObject *)v52, (unsigned int)"-");
  ((void (__stdcall *)(_DWORD))v2->m_pkJobTextWin->vfptr[60].__vecDelDtor)(0);
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Guild", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
    goto LABEL_76;
  v53 = Font::Get(MAIN_MENU);
  pkTextWint = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v53, (PgWin *)&v2->vfptr, 0, 0);
  v158 = pkTextWint->vfptr + 118;
  v54 = TextData::Get(0x8BAB92A9);
  v158->__vecDelDtor(pkTextWint, v54);
  ((void (__stdcall *)(_DWORD))pkTextWint->vfptr[60].__vecDelDtor)(0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "GuildTxt",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
    goto LABEL_76;
  v55 = Font::Get(MAIN_MENU);
  v56 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v55, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkGuildTextWin = v56;
  v56->vfptr[118].__vecDelDtor((NiRefObject *)v56, (unsigned int)"-");
  ((void (__stdcall *)(_DWORD))v2->m_pkGuildTextWin->vfptr[60].__vecDelDtor)(0);
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "nExp", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
    goto LABEL_76;
  v57 = Font::Get(MAIN_MENU);
  pkTextWinu = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v57, (PgWin *)&v2->vfptr, 0, 0);
  pkTextWinu->vfptr[60].__vecDelDtor((NiRefObject *)pkTextWinu, 0);
  v158 = pkTextWinu->vfptr + 118;
  v58 = TextData::Get(0x455F99ACu);
  v158->__vecDelDtor(pkTextWinu, v58);
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "nExpVal", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
    goto LABEL_76;
  v59 = Font::Get(MAIN_MENU);
  v60 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v59, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkExpTextWin = v60;
  PgWin::SetToolTipWinText((PgWin *)&v60->vfptr, &byte_98548F);
  v2->m_pkExpTextWin->m_pkToolTipWin = g_pkToolTipWin;
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "honor", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
    goto LABEL_76;
  v61 = Font::Get(MAIN_MENU);
  pkTextWinv = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v61, (PgWin *)&v2->vfptr, 0, 0);
  pkTextWinv->vfptr[60].__vecDelDtor((NiRefObject *)pkTextWinv, 0);
  v158 = pkTextWinv->vfptr + 118;
  v62 = TextData::Get(0x9BAE96E8);
  v158->__vecDelDtor(pkTextWinv, v62);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "honorVal",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
    goto LABEL_76;
  v63 = Font::Get(MAIN_MENU);
  v64 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v63, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkFamousTextWin = v64;
  v64->vfptr[60].__vecDelDtor((NiRefObject *)v64, 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "Strength",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
    goto LABEL_76;
  v65 = Font::Get(MAIN_MENU);
  pkTextWinw = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v65, (PgWin *)&v2->vfptr, 0, 0);
  v158 = pkTextWinw->vfptr + 118;
  v66 = TextData::Get(0x535F9BA8u);
  v158->__vecDelDtor(pkTextWinw, v66);
  v67 = (char *)TextData::Get(0xFB0A3A40);
  PgWin::SetToolTipWinText((PgWin *)&pkTextWinw->vfptr, v67);
  pkTextWinw->m_pkToolTipWin = g_pkToolTipWin;
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "Dexterity",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
    goto LABEL_76;
  v68 = Font::Get(MAIN_MENU);
  pkTextWinx = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v68, (PgWin *)&v2->vfptr, 0, 0);
  v158 = pkTextWinx->vfptr + 118;
  v69 = TextData::Get(0x445FA199u);
  v158->__vecDelDtor(pkTextWinx, v69);
  v70 = (char *)TextData::Get(0xEC0A4031);
  PgWin::SetToolTipWinText((PgWin *)&pkTextWinx->vfptr, v70);
  pkTextWinx->m_pkToolTipWin = g_pkToolTipWin;
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "Constitution",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
    goto LABEL_76;
  v71 = Font::Get(MAIN_MENU);
  pkTextWiny = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v71, (PgWin *)&v2->vfptr, 0, 0);
  v158 = pkTextWiny->vfptr + 118;
  v72 = TextData::Get(0x9CAB8AE1);
  v158->__vecDelDtor(pkTextWiny, v72);
  v73 = (char *)TextData::Get(0x34533580u);
  PgWin::SetToolTipWinText((PgWin *)&pkTextWiny->vfptr, v73);
  pkTextWiny->m_pkToolTipWin = g_pkToolTipWin;
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "Intelligence",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
    goto LABEL_76;
  v74 = Font::Get(MAIN_MENU);
  pkTextWinz = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v74, (PgWin *)&v2->vfptr, 0, 0);
  v158 = pkTextWinz->vfptr + 118;
  v75 = TextData::Get(0x495F9DA2u);
  v158->__vecDelDtor(pkTextWinz, v75);
  v76 = (char *)TextData::Get(0xF10A3C3A);
  PgWin::SetToolTipWinText((PgWin *)&pkTextWinz->vfptr, v76);
  pkTextWinz->m_pkToolTipWin = g_pkToolTipWin;
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "MentalPower",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
    goto LABEL_76;
  v77 = Font::Get(MAIN_MENU);
  pkTextWinba = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v77, (PgWin *)&v2->vfptr, 0, 0);
  v158 = pkTextWinba->vfptr + 118;
  v78 = TextData::Get(0x575F9C9Du);
  v158->__vecDelDtor(pkTextWinba, v78);
  v79 = (char *)TextData::Get(0xFF0A3B35);
  PgWin::SetToolTipWinText((PgWin *)&pkTextWinba->vfptr, v79);
  pkTextWinba->m_pkToolTipWin = g_pkToolTipWin;
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "StrNum", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
    goto LABEL_76;
  v80 = Font::Get(MAIN_MENU);
  v81 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v80, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkStrTextWin = v81;
  v81->vfptr[60].__vecDelDtor((NiRefObject *)v81, 0);
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "DexNum", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
    goto LABEL_76;
  v82 = Font::Get(MAIN_MENU);
  v83 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v82, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkDexTextWin = v83;
  v83->vfptr[60].__vecDelDtor((NiRefObject *)v83, 0);
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "ConNum", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
    goto LABEL_76;
  v84 = Font::Get(MAIN_MENU);
  v85 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v84, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkConTextWin = v85;
  v85->vfptr[60].__vecDelDtor((NiRefObject *)v85, 0);
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "IntNum", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
    goto LABEL_76;
  v86 = Font::Get(MAIN_MENU);
  v87 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v86, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkIntTextWin = v87;
  v87->vfptr[60].__vecDelDtor((NiRefObject *)v87, 0);
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "HP", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
    goto LABEL_76;
  v88 = Font::Get(MAIN_MENU);
  pkTextWinbb = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v88, (PgWin *)&v2->vfptr, 0, 0);
  v158 = pkTextWinbb->vfptr + 118;
  v89 = TextData::Get(0x485F49A4u);
  v158->__vecDelDtor(pkTextWinbb, v89);
  v90 = (char *)TextData::Get(0xE007F443);
  PgWin::SetToolTipWinText((PgWin *)&pkTextWinbb->vfptr, v90);
  pkTextWinbb->m_pkToolTipWin = g_pkToolTipWin;
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "HPNum", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
    goto LABEL_76;
  v91 = Font::Get(MAIN_MENU);
  v92 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v91, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkHPNumTextWin = v92;
  v92->vfptr[122].__vecDelDtor((NiRefObject *)v92, 2u);
  ((void (__stdcall *)(const char *))v2->m_pkHPNumTextWin->vfptr[118].__vecDelDtor)("-");
  ((void (__stdcall *)(_DWORD))v2->m_pkHPNumTextWin->vfptr[60].__vecDelDtor)(0);
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "SP", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
    goto LABEL_76;
  v93 = Font::Get(MAIN_MENU);
  v94 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v93, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkSPTextWin = v94;
  pkTextWinbc = (PgWinText *)&v94->vfptr[118];
  v95 = TextData::Get(0x535F49A4u);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkTextWinbc->vfptr)(v2->m_pkSPTextWin, v95);
  ((void (__stdcall *)(_DWORD))v2->m_pkSPTextWin->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkSPTextWin->vfptr[64].__vecDelDtor)(0);
  v96 = (char *)TextData::Get(0xEB07F443);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkSPTextWin->vfptr, v96);
  v2->m_pkSPTextWin->m_pkToolTipWin = g_pkToolTipWin;
  v97 = Font::Get(MAIN_MENU);
  v98 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v97, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkLPTextWin = v98;
  v98->vfptr[118].__vecDelDtor((NiRefObject *)v98, (unsigned int)"LP");
  ((void (__stdcall *)(_DWORD))v2->m_pkLPTextWin->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkLPTextWin->vfptr[64].__vecDelDtor)(0);
  v99 = (char *)TextData3::Get(0x9BB29B7D);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkLPTextWin->vfptr, v99);
  v2->m_pkLPTextWin->m_pkToolTipWin = g_pkToolTipWin;
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "SPNum", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
    goto LABEL_76;
  v100 = Font::Get(MAIN_MENU);
  v101 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v100, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkSPNumTextWin = v101;
  v101->vfptr[122].__vecDelDtor((NiRefObject *)v101, 2u);
  ((void (__stdcall *)(const char *))v2->m_pkSPNumTextWin->vfptr[118].__vecDelDtor)("-");
  ((void (__stdcall *)(_DWORD))v2->m_pkSPNumTextWin->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkSPNumTextWin->vfptr[64].__vecDelDtor)(0);
  v102 = Font::Get(MAIN_MENU);
  v103 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v102, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkLPNumTextWin = v103;
  v103->vfptr[122].__vecDelDtor((NiRefObject *)v103, 2u);
  ((void (__stdcall *)(const char *))v2->m_pkLPNumTextWin->vfptr[118].__vecDelDtor)("-");
  ((void (__stdcall *)(_DWORD))v2->m_pkLPNumTextWin->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkLPNumTextWin->vfptr[64].__vecDelDtor)(0);
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Point", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
    goto LABEL_76;
  v104 = Font::Get(MAIN_MENU);
  pkTextWinbd = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v104, (PgWin *)&v2->vfptr, 0, 0);
  v158 = pkTextWinbd->vfptr + 118;
  v105 = TextData::Get(0xA4AD92A3);
  v158->__vecDelDtor(pkTextWinbd, v105);
  v106 = (char *)TextData::Get(0x43453A4Eu);
  PgWin::SetToolTipWinText((PgWin *)&pkTextWinbd->vfptr, v106);
  pkTextWinbd->m_pkToolTipWin = g_pkToolTipWin;
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "PointNum",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
    goto LABEL_76;
  v107 = Font::Get(MAIN_MENU);
  v108 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v107, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkPointNumTextWin = v108;
  v108->vfptr[122].__vecDelDtor((NiRefObject *)v108, 2u);
  ((void (__stdcall *)(const char *))v2->m_pkPointNumTextWin->vfptr[118].__vecDelDtor)("-");
  ((void (__stdcall *)(_DWORD))v2->m_pkPointNumTextWin->vfptr[60].__vecDelDtor)(0);
  if ( PgUtil::GetTriShapeRect(
         (NiAVObject *)&spNode.m_pObject->vfptr,
         "KillPoint",
         &uiLeft,
         &uiTop,
         &uiWidth,
         &uiHeight) )
  {
    v109 = Font::Get(MAIN_MENU);
    pkTextWinbe = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v109, (PgWin *)&v2->vfptr, 0, 0);
    v158 = pkTextWinbe->vfptr + 118;
    v110 = TextData::Get(0xF8F4E441);
    v158->__vecDelDtor(pkTextWinbe, v110);
    v111 = (char *)TextData::Get(0x909C8FE0);
    PgWin::SetToolTipWinText((PgWin *)&pkTextWinbe->vfptr, v111);
    pkTextWinbe->m_pkToolTipWin = g_pkToolTipWin;
  }
  if ( PgUtil::GetTriShapeRect(
         (NiAVObject *)&spNode.m_pObject->vfptr,
         "KillPointVal",
         &uiLeft,
         &uiTop,
         &uiWidth,
         &uiHeight) )
  {
    v112 = Font::Get(MAIN_MENU);
    v113 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v112, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkPkKillCountTextWin = v113;
    v113->vfptr[122].__vecDelDtor((NiRefObject *)v113, 1u);
    ((void (__stdcall *)(const char *))v2->m_pkPkKillCountTextWin->vfptr[118].__vecDelDtor)("-");
    ((void (__stdcall *)(_DWORD))v2->m_pkPkKillCountTextWin->vfptr[60].__vecDelDtor)(0);
  }
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Point01", &uiLeft, &uiTop, &uiWidth, &uiHeight)
    || (v114 = Font::Get(MAIN_MENU),
        pkTextWinbf = PgWinText::CreateWin(
                        uiLeft - v10,
                        uiTop - v11,
                        uiWidth,
                        uiHeight,
                        v114,
                        (PgWin *)&v2->vfptr,
                        0,
                        0),
        v158 = pkTextWinbf->vfptr + 118,
        v115 = TextData::Get(0x36602732u),
        v158->__vecDelDtor(pkTextWinbf, v115),
        ((void (__stdcall *)(_DWORD))pkTextWinbf->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "PointNum01",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v116 = Font::Get(MAIN_MENU),
        v117 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v116, (PgWin *)&v2->vfptr, 0, 0),
        v2->m_pkRedistributePointText = v117,
        v117->vfptr[122].__vecDelDtor((NiRefObject *)v117, 2u),
        ((void (__stdcall *)(const char *))v2->m_pkRedistributePointText->vfptr[118].__vecDelDtor)("-"),
        ((void (__stdcall *)(_DWORD))v2->m_pkRedistributePointText->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "MenNum", &uiLeft, &uiTop, &uiWidth, &uiHeight))
    || (v118 = Font::Get(MAIN_MENU),
        v119 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v118, (PgWin *)&v2->vfptr, 0, 0),
        v2->m_pkMenTextWin = v119,
        v119->vfptr[60].__vecDelDtor((NiRefObject *)v119, 0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "WeaponClass",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v120 = Font::Get(MAIN_MENU),
        pkTextWinbg = PgWinText::CreateWin(
                        uiLeft - v10,
                        uiTop - v11,
                        uiWidth,
                        uiHeight,
                        v120,
                        (PgWin *)&v2->vfptr,
                        0,
                        0),
        v158 = pkTextWinbg->vfptr + 118,
        v121 = TextData::Get(0xD342414A),
        v158->__vecDelDtor(pkTextWinbg, v121),
        ((void (__stdcall *)(_DWORD))pkTextWinbg->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WPNum", &uiLeft, &uiTop, &uiWidth, &uiHeight))
    || (v122 = Font::Get(MAIN_MENU),
        v123 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v122, (PgWin *)&v2->vfptr, 0, 0),
        v2->m_pkWCTextWin = v123,
        v123->vfptr[60].__vecDelDtor((NiRefObject *)v123, 0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "ArmorClass",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v124 = Font::Get(MAIN_MENU),
        pkTextWinbh = PgWinText::CreateWin(
                        uiLeft - v10,
                        uiTop - v11,
                        uiWidth,
                        uiHeight,
                        v124,
                        (PgWin *)&v2->vfptr,
                        0,
                        0),
        v158 = pkTextWinbh->vfptr + 118,
        v125 = TextData::Get(0x34482B2Bu),
        v158->__vecDelDtor(pkTextWinbh, v125),
        ((void (__stdcall *)(_DWORD))pkTextWinbh->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "ACNum", &uiLeft, &uiTop, &uiWidth, &uiHeight))
    || (v126 = Font::Get(MAIN_MENU),
        v127 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v126, (PgWin *)&v2->vfptr, 0, 0),
        v2->m_pkACTextWin = v127,
        v127->vfptr[60].__vecDelDtor((NiRefObject *)v127, 0),
        !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "ToHit", &uiLeft, &uiTop, &uiWidth, &uiHeight))
    || (v128 = Font::Get(MAIN_MENU),
        pkTextWinbi = PgWinText::CreateWin(
                        uiLeft - v10,
                        uiTop - v11,
                        uiWidth,
                        uiHeight,
                        v128,
                        (PgWin *)&v2->vfptr,
                        0,
                        0),
        v158 = pkTextWinbi->vfptr + 118,
        v129 = TextData::Get(0x9A03F1DE),
        v158->__vecDelDtor(pkTextWinbi, v129),
        ((void (__stdcall *)(_DWORD))pkTextWinbi->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "THNum", &uiLeft, &uiTop, &uiWidth, &uiHeight))
    || (v130 = Font::Get(MAIN_MENU),
        v131 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v130, (PgWin *)&v2->vfptr, 0, 0),
        v2->m_pkTHTextWin = v131,
        v131->vfptr[60].__vecDelDtor((NiRefObject *)v131, 0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "ToBlock",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v132 = Font::Get(MAIN_MENU),
        pkTextWinbj = PgWinText::CreateWin(
                        uiLeft - v10,
                        uiTop - v11,
                        uiWidth,
                        uiHeight,
                        v132,
                        (PgWin *)&v2->vfptr,
                        0,
                        0),
        v158 = pkTextWinbj->vfptr + 118,
        v133 = TextData::Get(0xD9E9EA4E),
        v158->__vecDelDtor(pkTextWinbj, v133),
        ((void (__stdcall *)(_DWORD))pkTextWinbj->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "TBNum", &uiLeft, &uiTop, &uiWidth, &uiHeight))
    || (v134 = Font::Get(MAIN_MENU),
        v135 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v134, (PgWin *)&v2->vfptr, 0, 0),
        v2->m_pkTBTextWin = v135,
        v135->vfptr[60].__vecDelDtor((NiRefObject *)v135, 0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "MagicAtt",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v136 = Font::Get(MAIN_MENU),
        pkTextWinbk = PgWinText::CreateWin(
                        uiLeft - v10,
                        uiTop - v11,
                        uiWidth,
                        uiHeight,
                        v136,
                        (PgWin *)&v2->vfptr,
                        0,
                        0),
        v158 = pkTextWinbk->vfptr + 118,
        v137 = TextData::Get(0x3B4B7398u),
        v158->__vecDelDtor(pkTextWinbk, v137),
        ((void (__stdcall *)(_DWORD))pkTextWinbk->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "MANum", &uiLeft, &uiTop, &uiWidth, &uiHeight))
    || (v138 = Font::Get(MAIN_MENU),
        v139 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v138, (PgWin *)&v2->vfptr, 0, 0),
        v2->m_pkMATextWin = v139,
        v139->vfptr[60].__vecDelDtor((NiRefObject *)v139, 0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "MagicRes",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v140 = Font::Get(MAIN_MENU),
        pkTextWinbl = PgWinText::CreateWin(
                        uiLeft - v10,
                        uiTop - v11,
                        uiWidth,
                        uiHeight,
                        v140,
                        (PgWin *)&v2->vfptr,
                        0,
                        0),
        v158 = pkTextWinbl->vfptr + 118,
        v141 = TextData::Get(0x2D3C7698u),
        v158->__vecDelDtor(pkTextWinbl, v141),
        ((void (__stdcall *)(_DWORD))pkTextWinbl->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "MRNum", &uiLeft, &uiTop, &uiWidth, &uiHeight)) )
  {
LABEL_76:
    v165 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  v142 = Font::Get(MAIN_MENU);
  v143 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v142, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkMRTextWin = v143;
  ((void (__thiscall *)(PgWinText *))v143->vfptr[60].__vecDelDtor)(v143);
  pkTextWinbm = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn04Nor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(pkTextWinbm, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn04Click");
  PgSprData::Add(pkTextWinbm, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn04Over");
  PgSprData::Add(pkTextWinbm, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn04Disable");
  v144 = PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, pkTextWinbm, (PgWin *)&v2->vfptr, 0x17u, 0, 0);
  pkTextWinbn = (PgWinText *)v144;
  v144->m_pkToolTipWin = g_pkToolTipWin;
  v145 = (char *)TextData2::Get(0xFF286B7B);
  PgWin::SetToolTipWinText((PgWin *)&pkTextWinbn->vfptr, v145);
  v146 = Font::Get(MAIN_MENU);
  v147 = ((int (*)(void))pkTextWinbn->vfptr[37].__vecDelDtor)();
  v148 = ((int (*)(void))pkTextWinbn->vfptr[36].__vecDelDtor)();
  pkTextWinbo = PgWinText::CreateWin(0, 0, v148, v147, v146, (PgWin *)&pkTextWinbn->vfptr, 0, 0);
  ((void (__thiscall *)(PgWinText *))pkTextWinbo->vfptr[122].__vecDelDtor)(pkTextWinbo);
  v158 = pkTextWinbo->vfptr + 118;
  v149 = TextData2::Get(0x80AC7BC0);
  ((void (__thiscall *)(PgWinText *))v158->__vecDelDtor)(pkTextWinbo);
  ((void (__cdecl *)(_DWORD, NiUnsharedGeometryGroup *, signed int, _DWORD))pkTextWinbo->vfptr[60].__vecDelDtor)(
    0,
    v149,
    5,
    0);
  pkTextWinbp = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "FreeStatNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(pkTextWinbp, (NiAVObject *)&spNode.m_pObject->vfptr, "FreeStatClick");
  PgSprData::Add(pkTextWinbp, (NiAVObject *)&spNode.m_pObject->vfptr, "FreeStatOver");
  v150 = PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, pkTextWinbp, (PgWin *)&v2->vfptr, 0x15u, 0, 0);
  v151 = (PgWin *)v150;
  pkTextWinbq = (PgWinText *)v150;
  v152 = Font::Get(MAIN_MENU);
  v153 = ((int (*)(void))pkTextWinbq->vfptr[37].__vecDelDtor)();
  v154 = ((int (*)(void))pkTextWinbq->vfptr[36].__vecDelDtor)();
  pkTextWinbr = PgWinText::CreateWin(0, 1, v154, v153, v152, v151, 0, 0);
  pkTextWinbr->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinbr, 5u);
  v158 = pkTextWinbr->vfptr + 118;
  v155 = TextData::Get(0xE9F84123);
  v158->__vecDelDtor(pkTextWinbr, v155);
  ((void (__stdcall *)(_DWORD))pkTextWinbr->vfptr[60].__vecDelDtor)(0);
  UIUtil::UIUtil(&ui);
  LOBYTE(v165) = 1;
  UIUtil::SetOffset(&ui, v10, v11);
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  ((void (__thiscall *)(CharInfoWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.0,
    0.5);
  v156 = MenuTexMgr::GetTexture(1u);
  v2->m_pkFreeStatView = FreeStatView::CreateWin(v156, 7u, 7u);
  LOBYTE(v165) = 0;
  UIUtil::~UIUtil(&ui);
  v165 = -1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004E08C0) --------------------------------------------------------
CharInfoWin *__thiscall CharInfoWin::FindConditionParam(CHAR_CHANGEBYCONDITION_PARAM *retstr, CharInfoWin *this, int index, char nFlag)
{
  int v4; // edi@1
  CharInfoWin *result; // eax@1
  unsigned int v6; // esi@1
  unsigned int v7; // ecx@1
  int v8; // edx@2

  v4 = *(_DWORD *)&retstr[104].nFlag;
  result = this;
  v6 = 0;
  v7 = (signed int)(*(unsigned int *)((char *)&retstr[104].nValue + 2) - v4) / 6;
  if ( v7 )
  {
    v8 = v4;
    if ( v7 <= 0 )
      std::_Xout_of_range("invalid vector<T> subscript");
    do
    {
      this->vfptr = *(NiRefObjectVtbl **)v8;
      LOWORD(this->m_uiRefCount) = *(_WORD *)(v8 + 4);
      if ( LOBYTE(this->vfptr) == nFlag && BYTE1(this->vfptr) == index )
        break;
      ++v6;
      v8 += 6;
    }
    while ( v7 > v6 );
  }
  return result;
}

//----- (004E0930) --------------------------------------------------------
void __thiscall CharInfoWin::SetClass(CharInfoWin *this, char kClassID)
{
  CharInfoWin *v2; // esi@1
  char *v3; // eax@1
  NiUnsharedGeometryGroup *v4; // eax@2

  v2 = this;
  v3 = CDataReader::GetRecord(
         (CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4),
         (unsigned __int8)kClassID);
  if ( v3 )
    v4 = (NiUnsharedGeometryGroup *)(v3 + 21);
  else
    v4 = &unk_96F8EB;
  ((void (__stdcall *)(_DWORD))v2->m_pkJobTextWin->vfptr[118].__vecDelDtor)(v4);
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (004E0970) --------------------------------------------------------
void __thiscall CharInfoWin::SetChangeConParamInfo(CharInfoWin *this, PassiveSkillInfo *pkInfo)
{
  CharInfoWin *v2; // esi@1
  int v3; // ST1C_4@4
  int v4; // ST18_4@4
  int v5; // ST14_4@4
  int v6; // eax@4
  int v7; // ST18_4@4
  int v8; // eax@4
  int v9; // ST18_4@4
  int v10; // eax@4
  int v11; // ST18_4@4
  int v12; // eax@4
  int v13; // ST1C_4@4
  int v14; // ST18_4@4
  int v15; // ST14_4@4
  int v16; // eax@4
  int v17; // ST1C_4@5
  int v18; // ST18_4@5
  int v19; // ST14_4@5
  int v20; // eax@5
  int v21; // ST18_4@5
  int v22; // eax@5
  int v23; // ST18_4@5
  int v24; // eax@5
  int v25; // ST18_4@5
  int v26; // eax@5
  int v27; // ST1C_4@5
  int v28; // ST18_4@5
  int v29; // ST14_4@5
  int v30; // eax@5
  signed int v31; // eax@7
  double v32; // st6@7
  int v33; // edi@9
  int v34; // ST1C_4@9
  int v35; // ST18_4@9
  int v36; // ST14_4@9
  int v37; // eax@9
  int v38; // ST1C_4@9
  int v39; // ST18_4@9
  int v40; // ST14_4@9
  int v41; // eax@9
  int v42; // ST18_4@9
  int v43; // eax@9
  int v44; // ST18_4@9
  int v45; // eax@9
  int v46; // ST18_4@9
  int v47; // eax@9
  int v48; // ST18_4@10
  int v49; // eax@10
  signed int v50; // eax@12
  double v51; // st6@12
  int v52; // edi@14
  int v53; // ST18_4@14
  int v54; // eax@14
  int v55; // ST18_4@14
  int v56; // eax@14
  int v57; // ST1C_4@14
  int v58; // ST18_4@14
  int v59; // ST14_4@14
  int v60; // eax@14
  int v61; // ST18_4@14
  int v62; // eax@14
  int v63; // ST18_4@14
  int v64; // eax@14
  int v65; // ST1C_4@14
  int v66; // ST18_4@14
  int v67; // ST14_4@14
  int v68; // eax@14
  float fDisplayAlpha; // [sp+0h] [bp-230h]@3
  CHAR_CHANGEBYCONDITION_PARAM pkParamWCLow; // [sp+Ch] [bp-224h]@9
  CHAR_CHANGEBYCONDITION_PARAM pkParamMR; // [sp+14h] [bp-21Ch]@9
  double pkParamAC; // [sp+1Ch] [bp-214h]@7
  float HPRate; // [sp+24h] [bp-20Ch]@4
  char acPassiveInxName[256]; // [sp+2Ch] [bp-204h]@2
  char acConversionData[256]; // [sp+12Ch] [bp-104h]@2

  v2 = this;
  if ( pkInfo )
  {
    acPassiveInxName[0] = 0;
    memset(&acPassiveInxName[1], 0, 0xFFu);
    acConversionData[0] = 0;
    memset(&acConversionData[1], 0, 0xFFu);
    sprintf(acPassiveInxName, "%s", pkInfo->InxName);
    strncpy(acConversionData, acPassiveInxName, strlen(acPassiveInxName) - 2);
    if ( !strcmp(acConversionData, "MoveEvasion") )
    {
      fDisplayAlpha = 1.0;
      if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[7].GetAbstateColor)() )
      {
        v3 = User::ChangeWChigh(&g_kUser);
        v4 = User::BaseWChigh(&g_kUser);
        v5 = User::ChangeWClow(&g_kUser);
        v6 = User::BaseWClow(&g_kUser);
        CharInfoWin::SetMinMaxParamTextWin(v2->m_pkWCTextWin, v6, v5, v4, v3, fDisplayAlpha);
        v7 = User::ChangeAC(&g_kUser);
        v8 = User::BaseAC(&g_kUser);
        CharInfoWin::SetParamTextWin(v2->m_pkACTextWin, v8, v7, 0, 1.0);
        v9 = User::ChangeTH(&g_kUser);
        v10 = User::BaseTH(&g_kUser);
        CharInfoWin::SetParamTextWin(v2->m_pkTHTextWin, v10, v9, 0, 1.0);
        CharInfoWin::FindConditionParam((CHAR_CHANGEBYCONDITION_PARAM *)v2, (CharInfoWin *)&HPRate, 0, 35);
        v11 = *(_DWORD *)((char *)&HPRate + 2);
        v12 = User::BaseTB(&g_kUser);
        CharInfoWin::SetParamTextWin(v2->m_pkTBTextWin, v12, v11, 0, 1.0);
        v13 = User::ChangeMAhigh(&g_kUser);
        v14 = User::BaseMAhigh(&g_kUser);
        v15 = User::ChangeMAlow(&g_kUser);
        v16 = User::BaseMAlow(&g_kUser);
        CharInfoWin::SetMinMaxParamTextWin(v2->m_pkMATextWin, v16, v15, v14, v13, 1.0);
      }
      else
      {
        v17 = User::ChangeWChigh(&g_kUser);
        v18 = User::BaseWChigh(&g_kUser);
        v19 = User::ChangeWClow(&g_kUser);
        v20 = User::BaseWClow(&g_kUser);
        CharInfoWin::SetMinMaxParamTextWin(v2->m_pkWCTextWin, v20, v19, v18, v17, fDisplayAlpha);
        v21 = User::ChangeAC(&g_kUser);
        v22 = User::BaseAC(&g_kUser);
        CharInfoWin::SetParamTextWin(v2->m_pkACTextWin, v22, v21, 0, 1.0);
        v23 = User::ChangeTH(&g_kUser);
        v24 = User::BaseTH(&g_kUser);
        CharInfoWin::SetParamTextWin(v2->m_pkTHTextWin, v24, v23, 0, 1.0);
        v25 = User::ChangeTB(&g_kUser);
        v26 = User::BaseTB(&g_kUser);
        CharInfoWin::SetParamTextWin(v2->m_pkTBTextWin, v26, v25, 0, 1.0);
        v27 = User::ChangeMAhigh(&g_kUser);
        v28 = User::BaseMAhigh(&g_kUser);
        v29 = User::ChangeMAlow(&g_kUser);
        v30 = User::BaseMAlow(&g_kUser);
        CharInfoWin::SetMinMaxParamTextWin(v2->m_pkMATextWin, v30, v29, v28, v27, 1.0);
      }
LABEL_10:
      v48 = User::ChangeMR(&g_kUser);
      v49 = User::BaseMR(&g_kUser);
      CharInfoWin::SetParamTextWin(v2->m_pkMRTextWin, v49, v48, 0, 1.0);
      return;
    }
    if ( !strcmp(acConversionData, "StrongFury") )
    {
      pkParamAC = (double)(signed int)User::MaxHP(&g_kUser);
      pkParamAC = pkParamAC - (double)(signed int)User::HP(&g_kUser);
      HPRate = COERCE_FLOAT(User::MaxHP(&g_kUser));
      v31 = v2->m_uiSectionRate;
      HPRate = pkParamAC / (double)SLODWORD(HPRate) * 100.0;
      v32 = (double)(signed int)v2->m_uiSectionRate;
      if ( v31 < 0 )
        v32 = v32 + 4294967300.0;
      v33 = (signed int)(HPRate / v32);
      CharInfoWin::FindConditionParam((CHAR_CHANGEBYCONDITION_PARAM *)v2, (CharInfoWin *)&pkParamWCLow, v33, 28);
      CharInfoWin::FindConditionParam((CHAR_CHANGEBYCONDITION_PARAM *)v2, (CharInfoWin *)&HPRate, v33, 29);
      CharInfoWin::FindConditionParam((CHAR_CHANGEBYCONDITION_PARAM *)v2, (CharInfoWin *)&pkParamAC, v33, 30);
      CharInfoWin::FindConditionParam((CHAR_CHANGEBYCONDITION_PARAM *)v2, (CharInfoWin *)&pkParamMR, v33, 31);
      v34 = *(_DWORD *)((char *)&HPRate + 2);
      v35 = User::BaseWChigh(&g_kUser);
      v36 = pkParamWCLow.nValue;
      v37 = User::BaseWClow(&g_kUser);
      CharInfoWin::SetMinMaxParamTextWin(v2->m_pkWCTextWin, v37, v36, v35, v34, 1.0);
      v38 = pkParamMR.nValue;
      v39 = User::BaseMAhigh(&g_kUser);
      v40 = *(_DWORD *)((char *)&pkParamAC + 2);
      v41 = User::BaseMAlow(&g_kUser);
      CharInfoWin::SetMinMaxParamTextWin(v2->m_pkMATextWin, v41, v40, v39, v38, 1.0);
      v42 = User::ChangeAC(&g_kUser);
      v43 = User::BaseAC(&g_kUser);
      CharInfoWin::SetParamTextWin(v2->m_pkACTextWin, v43, v42, 0, 1.0);
      v44 = User::ChangeTH(&g_kUser);
      v45 = User::BaseTH(&g_kUser);
      CharInfoWin::SetParamTextWin(v2->m_pkTHTextWin, v45, v44, 0, 1.0);
      v46 = User::ChangeTB(&g_kUser);
      v47 = User::BaseTB(&g_kUser);
      CharInfoWin::SetParamTextWin(v2->m_pkTBTextWin, v47, v46, 0, 1.0);
      goto LABEL_10;
    }
    if ( !strcmp(acConversionData, "StrongEndure") )
    {
      pkParamAC = (double)(signed int)User::MaxHP(&g_kUser);
      pkParamAC = pkParamAC - (double)(signed int)User::HP(&g_kUser);
      HPRate = COERCE_FLOAT(User::MaxHP(&g_kUser));
      v50 = v2->m_uiSectionRate;
      HPRate = pkParamAC / (double)SLODWORD(HPRate) * 100.0;
      v51 = (double)(signed int)v2->m_uiSectionRate;
      if ( v50 < 0 )
        v51 = v51 + 4294967300.0;
      v52 = (signed int)(HPRate / v51);
      CharInfoWin::FindConditionParam((CHAR_CHANGEBYCONDITION_PARAM *)v2, (CharInfoWin *)&pkParamAC, v52, 32);
      CharInfoWin::FindConditionParam((CHAR_CHANGEBYCONDITION_PARAM *)v2, (CharInfoWin *)&pkParamMR, v52, 33);
      v53 = *(_DWORD *)((char *)&pkParamAC + 2);
      v54 = User::BaseAC(&g_kUser);
      CharInfoWin::SetParamTextWin(v2->m_pkACTextWin, v54, v53, 0, 1.0);
      v55 = pkParamMR.nValue;
      v56 = User::BaseMR(&g_kUser);
      CharInfoWin::SetParamTextWin(v2->m_pkMRTextWin, v56, v55, 0, 1.0);
      v57 = User::ChangeWChigh(&g_kUser);
      v58 = User::BaseWChigh(&g_kUser);
      v59 = User::ChangeWClow(&g_kUser);
      v60 = User::BaseWClow(&g_kUser);
      CharInfoWin::SetMinMaxParamTextWin(v2->m_pkWCTextWin, v60, v59, v58, v57, 1.0);
      v61 = User::ChangeTH(&g_kUser);
      v62 = User::BaseTH(&g_kUser);
      CharInfoWin::SetParamTextWin(v2->m_pkTHTextWin, v62, v61, 0, 1.0);
      v63 = User::ChangeTB(&g_kUser);
      v64 = User::BaseTB(&g_kUser);
      CharInfoWin::SetParamTextWin(v2->m_pkTBTextWin, v64, v63, 0, 1.0);
      v65 = User::ChangeMAhigh(&g_kUser);
      v66 = User::BaseMAhigh(&g_kUser);
      v67 = User::ChangeMAlow(&g_kUser);
      v68 = User::BaseMAlow(&g_kUser);
      CharInfoWin::SetMinMaxParamTextWin(v2->m_pkMATextWin, v68, v67, v66, v65, 1.0);
    }
  }
}

//----- (004E10E0) --------------------------------------------------------
void __thiscall CharInfoWin::EnablePassiveSkillID(CharInfoWin *this, unsigned __int16 kID)
{
  unsigned __int16 *v2; // edx@1
  std::vector<unsigned short,std::allocator<unsigned short> > *v3; // esi@1
  unsigned int v4; // eax@1
  unsigned __int16 v5; // di@1
  unsigned int v6; // ecx@1
  unsigned int v7; // eax@5
  unsigned __int16 *v8; // edx@6
  unsigned __int16 *v9; // ecx@7
  int v10; // edi@7
  unsigned int v11; // eax@8
  unsigned int v12; // eax@11
  unsigned int v13; // ecx@11
  unsigned int v14; // ecx@13
  unsigned __int16 *v15; // eax@18
  unsigned __int16 *v16; // ecx@20
  unsigned int v17; // eax@21
  unsigned int v18; // eax@23
  unsigned int v19; // ecx@23
  unsigned int v20; // ecx@25
  unsigned __int16 *v21; // eax@30

  v2 = this->m_kChar_ChangeCondition._vecUsingPassiveSkill._Myfirst;
  v3 = &this->m_kChar_ChangeCondition._vecUsingPassiveSkill;
  v4 = this->m_kChar_ChangeCondition._vecUsingPassiveSkill._Mylast - v2;
  v5 = kID;
  v6 = 0;
  if ( v4 )
  {
    if ( v4 <= 0 )
      std::_Xout_of_range("invalid vector<T> subscript");
    while ( *v2 != kID )
    {
      ++v6;
      ++v2;
      if ( v4 <= v6 )
        goto LABEL_5;
    }
  }
  else
  {
LABEL_5:
    v7 = (unsigned int)v3->_Mylast;
    if ( (unsigned int)&kID >= v7 || (v8 = v3->_Myfirst, v3->_Myfirst > &kID) )
    {
      v16 = v3->_Myend;
      if ( (unsigned __int16 *)v7 == v16 )
      {
        v17 = (signed int)(v7 - (unsigned int)v3->_Myfirst) >> 1;
        if ( v17 > 0x7FFFFFFE )
          std::_Xlength_error("vector<T> too long");
        v18 = v17 + 1;
        v19 = v16 - v3->_Myfirst;
        if ( v18 > v19 )
        {
          if ( 0x7FFFFFFF - (v19 >> 1) >= v19 )
            v20 = (v19 >> 1) + v19;
          else
            v20 = 0;
          if ( v20 < v18 )
            v20 = v18;
          std::vector<unsigned short,std::allocator<unsigned short>>::reserve(v3, v20);
        }
      }
      v21 = v3->_Mylast;
      if ( v21 )
        *v21 = v5;
    }
    else
    {
      v9 = v3->_Myend;
      v10 = &kID - v8;
      if ( (unsigned __int16 *)v7 == v9 )
      {
        v11 = (signed int)(v7 - (_DWORD)v8) >> 1;
        if ( v11 > 0x7FFFFFFE )
          std::_Xlength_error("vector<T> too long");
        v12 = v11 + 1;
        v13 = v9 - v8;
        if ( v12 > v13 )
        {
          if ( 0x7FFFFFFF - (v13 >> 1) >= v13 )
            v14 = (v13 >> 1) + v13;
          else
            v14 = 0;
          if ( v14 < v12 )
            v14 = v12;
          std::vector<unsigned short,std::allocator<unsigned short>>::reserve(v3, v14);
        }
      }
      v15 = v3->_Mylast;
      if ( v15 )
      {
        *v15 = v3->_Myfirst[v10];
        ++v3->_Mylast;
        return;
      }
    }
    ++v3->_Mylast;
  }
}

//----- (004E1200) --------------------------------------------------------
void __thiscall CharInfoWin::CharInfoWin(CharInfoWin *this)
{
  CharInfoWin *v1; // esi@1
  ITask *v2; // eax@1
  ITask *v3; // edi@1
  StatPointReqTask *v4; // eax@2
  StatPointReqTask *v5; // edi@4
  char *v6; // edi@12
  char *v7; // eax@12
  char *v8; // edi@15
  char *v9; // ecx@15
  CHAR_CHANGEBYCONDITION_PARAM *v10; // ecx@18
  StatPointReqTask *v13; // [sp+14h] [bp-10h]@2

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&CharInfoWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CharInfoWin::`vftable'{for `IDirectMessenger'};
  v1->m_spStatPointReqTask.m_pObject = 0;
  v1->m_vecConditionParam._Myfirst = 0;
  v1->m_vecConditionParam._Mylast = 0;
  v1->m_vecConditionParam._Myend = 0;
  v1->m_kChar_ChangeCondition._vecUsingPassiveSkill._Myfirst = 0;
  v1->m_kChar_ChangeCondition._vecUsingPassiveSkill._Mylast = 0;
  v1->m_kChar_ChangeCondition._vecUsingPassiveSkill._Myend = 0;
  v1->m_pkCharNameTextWin = 0;
  v1->m_pkLevelTextWin = 0;
  v1->m_pkRaceTextWin = 0;
  v1->m_pkExpTextWin = 0;
  v1->m_pkNextExpTextWin = 0;
  v1->m_pkStrTextWin = 0;
  v1->m_pkDexTextWin = 0;
  v1->m_pkConTextWin = 0;
  v1->m_pkIntTextWin = 0;
  v1->m_pkMenTextWin = 0;
  v1->m_pkWCTextWin = 0;
  v1->m_pkACTextWin = 0;
  v1->m_pkTHTextWin = 0;
  v1->m_pkTBTextWin = 0;
  v1->m_pkMATextWin = 0;
  v1->m_pkMRTextWin = 0;
  v1->m_pkStatTitleText = 0;
  v1->m_pkCharmPointText = 0;
  v1->m_pkRecvCharmPointText = 0;
  v1->m_pkStatTitlePointText = 0;
  v1->m_pkStatTitleWin = 0;
  v1->m_pkCharTitleWin = 0;
  v1->m_pkSubNameTextWin = 0;
  v1->m_pkJobTextWin = 0;
  v1->m_pkGuildTextWin = 0;
  v1->m_pkHPNumTextWin = 0;
  v1->m_pkSPNumTextWin = 0;
  v1->m_pkPointNumTextWin = 0;
  v1->m_pkPkKillCountTextWin = 0;
  v2 = (ITask *)operator new(0x44u);
  v3 = v2;
  if ( v2 )
  {
    ITask::ITask(v2, 0);
    v4 = (StatPointReqTask *)v3;
    v3->vfptr = (NiRefObjectVtbl *)&StatPointReqTask::`vftable'{for `NiRefObject'};
    v3->vfptr = (IDirectMessengerVtbl *)&StatPointReqTask::`vftable'{for `IDirectMessenger'};
    v13 = (StatPointReqTask *)v3;
  }
  else
  {
    v13 = 0;
    v4 = 0;
  }
  v5 = v1->m_spStatPointReqTask.m_pObject;
  if ( v5 != v4 )
  {
    if ( v5 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      v4 = v13;
    }
    v1->m_spStatPointReqTask.m_pObject = v4;
    if ( v4 )
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  }
  v1->m_spStatPointReqTask.m_pObject->vfptr->SetMsgHooker(&v1->m_spStatPointReqTask.m_pObject->vfptr, &v1->vfptr);
  v1->m_pkStrDnBtn = 0;
  v1->m_pkDexDnBtn = 0;
  v1->m_pkConDnBtn = 0;
  v1->m_pkIntDnBtn = 0;
  v1->m_pkMenDnBtn = 0;
  v1->m_pkRedistributePointText = 0;
  v1->m_bChangeCondition = 0;
  v1->m_uiConditionCount = 0;
  v1->m_uiSectionRate = 0;
  v6 = (char *)v1->m_kChar_ChangeCondition._vecUsingPassiveSkill._Myfirst;
  v7 = (char *)v1->m_kChar_ChangeCondition._vecUsingPassiveSkill._Mylast;
  if ( v6 != v7 )
  {
    memmove(v6, v7, 0);
    v1->m_kChar_ChangeCondition._vecUsingPassiveSkill._Mylast = (unsigned __int16 *)v6;
  }
  if ( ((char *)v1->m_kChar_ChangeCondition._vecUsingPassiveSkill._Mylast
      - (char *)v1->m_kChar_ChangeCondition._vecUsingPassiveSkill._Myfirst) & 0xFFFFFFFE )
  {
    v8 = (char *)v1->m_kChar_ChangeCondition._vecUsingPassiveSkill._Myfirst;
    v9 = (char *)v1->m_kChar_ChangeCondition._vecUsingPassiveSkill._Mylast;
    if ( v8 != v9 )
    {
      memmove(v8, v9, 0);
      v1->m_kChar_ChangeCondition._vecUsingPassiveSkill._Mylast = (unsigned __int16 *)v8;
    }
  }
  if ( v1->m_vecConditionParam._Mylast - v1->m_vecConditionParam._Myfirst )
  {
    v10 = v1->m_vecConditionParam._Myfirst;
    if ( v10 != v1->m_vecConditionParam._Mylast )
      v1->m_vecConditionParam._Mylast = v10;
  }
  v1->m_pkSPTextWin = 0;
  v1->m_pkLPTextWin = 0;
  v1->m_pkLPNumTextWin = 0;
}
// 985A10: using guessed type void (__thiscall *StatPointReqTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 985A2C: using guessed type int (__thiscall *StatPointReqTask::`vftable'{for `NiRefObject'})(void *p, char);
// 985A44: using guessed type void (__thiscall *CharInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 985A64: using guessed type int (__thiscall *CharInfoWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004E14E0) --------------------------------------------------------
void __thiscall CharInfoWin::~CharInfoWin(CharInfoWin *this)
{
  CharInfoWin *v1; // esi@1
  StatPointReqTask *v2; // eax@1
  StatPointReqTask *v3; // edi@3
  CHAR_CHANGEBYCONDITION_PARAM *v4; // ecx@9
  char *v7; // ecx@14
  char *v8; // edi@14
  StatPointReqTask *v9; // edi@20

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&CharInfoWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CharInfoWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spStatPointReqTask.m_pObject;
  if ( v2 )
    v2->m_eTaskState = 2;
  v3 = this->m_spStatPointReqTask.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spStatPointReqTask.m_pObject = 0;
  }
  if ( v1->m_vecConditionParam._Mylast - v1->m_vecConditionParam._Myfirst )
  {
    v4 = v1->m_vecConditionParam._Myfirst;
    if ( v4 != v1->m_vecConditionParam._Mylast )
      v1->m_vecConditionParam._Mylast = v4;
  }
  if ( ((char *)v1->m_kChar_ChangeCondition._vecUsingPassiveSkill._Mylast
      - (char *)v1->m_kChar_ChangeCondition._vecUsingPassiveSkill._Myfirst) & 0xFFFFFFFE )
  {
    v7 = (char *)v1->m_kChar_ChangeCondition._vecUsingPassiveSkill._Mylast;
    v8 = (char *)v1->m_kChar_ChangeCondition._vecUsingPassiveSkill._Myfirst;
    if ( v8 != v7 )
    {
      memmove(v8, v7, 0);
      v1->m_kChar_ChangeCondition._vecUsingPassiveSkill._Mylast = (unsigned __int16 *)v8;
    }
  }
  v1->m_uiConditionCount = 0;
  v1->m_uiSectionRate = 0;
  v1->m_bChangeCondition = 0;
  if ( v1->m_kChar_ChangeCondition._vecUsingPassiveSkill._Myfirst )
    operator delete(v1->m_kChar_ChangeCondition._vecUsingPassiveSkill._Myfirst);
  v1->m_kChar_ChangeCondition._vecUsingPassiveSkill._Myfirst = 0;
  v1->m_kChar_ChangeCondition._vecUsingPassiveSkill._Mylast = 0;
  v1->m_kChar_ChangeCondition._vecUsingPassiveSkill._Myend = 0;
  if ( v1->m_vecConditionParam._Myfirst )
    operator delete(v1->m_vecConditionParam._Myfirst);
  v1->m_vecConditionParam._Myfirst = 0;
  v1->m_vecConditionParam._Mylast = 0;
  v1->m_vecConditionParam._Myend = 0;
  v9 = v1->m_spStatPointReqTask.m_pObject;
  if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
    v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 985A44: using guessed type void (__thiscall *CharInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 985A64: using guessed type int (__thiscall *CharInfoWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004E16A0) --------------------------------------------------------
CharInfoWin *__cdecl CharInfoWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  CharInfoWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x488u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    CharInfoWin::CharInfoWin((CharInfoWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (CharInfoWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (004E17D0) --------------------------------------------------------
void __cdecl ConvertCommaNums(int x, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *strNums)
{
  signed int v2; // eax@1
  _BYTE *v3; // esi@1
  signed int v4; // ebx@1
  signed int v5; // edi@3
  double v6; // st7@5
  unsigned int v7; // eax@6
  double v8; // st5@8
  double v9; // st7@13
  double v10; // ST1C_8@15
  signed int v11; // ST34_4@15
  double v12; // st7@15
  unsigned int v13; // edx@16
  char *v14; // ecx@17
  unsigned int v15; // eax@19
  void *v16; // ecx@20
  unsigned int v17; // ecx@28
  char *v18; // edx@29
  unsigned int v19; // eax@31
  void *v20; // ecx@32
  unsigned int v21; // eax@37
  unsigned int v22; // edi@39
  unsigned int v23; // ecx@41
  _BYTE *v24; // eax@44
  _BYTE *v25; // eax@51
  unsigned int v26; // eax@54
  unsigned int v27; // edi@56
  unsigned int v28; // ecx@58
  _BYTE *v29; // eax@61
  int v30; // [sp+20h] [bp-9Ch]@5
  signed int val; // [sp+24h] [bp-98h]@1
  signed int iResult; // [sp+28h] [bp-94h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strNumber; // [sp+2Ch] [bp-90h]@3
  char str[64]; // [sp+48h] [bp-74h]@4
  char s[34]; // [sp+88h] [bp-34h]@3
  int v36; // [sp+B8h] [bp-4h]@3

  v2 = abs(x);
  v3 = strNums;
  v4 = v2 / 100;
  val = v2 % 100;
  iResult = v2 / 100;
  if ( x < 0 )
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(strNums, 1u, 45);
  strNumber._Myres = 15;
  strNumber._Mysize = 0;
  strNumber._Bx._Buf[0] = 0;
  v36 = 0;
  _itoa(v4, s, 10);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strNumber, s, strlen(s));
  v5 = strNumber._Mysize;
  if ( (signed int)strNumber._Mysize > 0 )
  {
    while ( 1 )
    {
      str[0] = 0;
      memset(&str[1], 0, 0x3Fu);
      if ( v5 == 1 )
        break;
      v6 = 10.0;
      v30 = v5 - 1;
      if ( v5 - 1 < 0 )
        v7 = 1 - v5;
      else
        v7 = v5 - 1;
      v8 = 1.0;
      while ( 1 )
      {
        if ( v7 & 1 )
          v8 = v8 * v6;
        v7 >>= 1;
        if ( !v7 )
          break;
        v6 = v6 * v6;
      }
      v9 = v8;
      if ( v5 - 1 < 0 )
        v9 = 1.0 / v8;
      v10 = (double)iResult;
      v11 = (signed int)(v10 / v9);
      _itoa(v11, str, 10);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(strNums, str, strlen(str));
      v12 = v10 - (double)v11 * v9;
      v4 = (signed int)v12;
      iResult = (signed int)v12;
      if ( v5 % 3 == 1 )
      {
        v13 = strNums->_Myres;
        if ( v13 < 0x10 )
          v14 = (char *)strNums;
        else
          v14 = strNums->_Bx._Ptr;
        v15 = (unsigned int)&v14[strNums->_Mysize];
        if ( v13 < 0x10 )
          v16 = strNums;
        else
          v16 = strNums->_Bx._Ptr;
        if ( v15 )
          v15 -= (unsigned int)v16;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::insert(strNums, v15, 1u, 44);
      }
      --v5;
      if ( v30 <= 0 )
        goto LABEL_28;
    }
    _itoa(v4, str, 10);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(strNums, str, strlen(str));
  }
LABEL_28:
  v17 = strNums->_Myres;
  *(_DWORD *)s = 0;
  *(_DWORD *)&s[4] = 0;
  *(_DWORD *)&s[8] = 0;
  *(_DWORD *)&s[12] = 0;
  *(_DWORD *)&s[16] = 0;
  *(_DWORD *)&s[20] = 0;
  *(_DWORD *)&s[24] = 0;
  *(_DWORD *)&s[28] = 0;
  *(_WORD *)&s[32] = 0;
  if ( v17 < 0x10 )
    v18 = (char *)strNums;
  else
    v18 = strNums->_Bx._Ptr;
  v19 = (unsigned int)&v18[strNums->_Mysize];
  if ( v17 < 0x10 )
    v20 = strNums;
  else
    v20 = strNums->_Bx._Ptr;
  if ( v19 )
    v19 -= (unsigned int)v20;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::insert(strNums, v19, 1u, 46);
  if ( val < 10 )
  {
    v21 = strNums->_Mysize;
    if ( -1 - v21 <= 1 )
      std::_Xlength_error("string too long");
    v22 = v21 + 1;
    if ( v21 + 1 > 0xFFFFFFFE )
      std::_Xlength_error("string too long");
    v23 = strNums->_Myres;
    if ( v23 >= v22 )
    {
      if ( v21 == -1 )
      {
        strNums->_Mysize = 0;
        if ( v23 < 0x10 )
          strNums->_Bx._Buf[0] = 0;
        else
          *strNums->_Bx._Ptr = 0;
        goto LABEL_54;
      }
    }
    else
    {
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Copy(strNums, v21 + 1, strNums->_Mysize);
      if ( !v22 )
        goto LABEL_54;
    }
    if ( strNums->_Myres < 0x10 )
      v24 = strNums;
    else
      v24 = strNums->_Bx._Ptr;
    v24[strNums->_Mysize] = 48;
    strNums->_Mysize = v22;
    if ( strNums->_Myres < 0x10 )
      v25 = strNums;
    else
      v25 = strNums->_Bx._Ptr;
    v25[v22] = 0;
  }
LABEL_54:
  _itoa(val, s, 10);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(strNums, s, strlen(s));
  v26 = strNums->_Mysize;
  if ( -1 - v26 <= 1 )
    std::_Xlength_error("string too long");
  v27 = v26 + 1;
  if ( v26 + 1 > 0xFFFFFFFE )
    std::_Xlength_error("string too long");
  v28 = strNums->_Myres;
  if ( v28 < v27 )
  {
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Copy(strNums, v26 + 1, strNums->_Mysize);
    if ( !v27 )
      goto LABEL_70;
    goto LABEL_60;
  }
  if ( v26 != -1 )
  {
LABEL_60:
    if ( strNums->_Myres < 0x10 )
      v29 = strNums;
    else
      v29 = strNums->_Bx._Ptr;
    v29[strNums->_Mysize] = 77;
    strNums->_Mysize = v27;
    if ( strNums->_Myres >= 0x10 )
      v3 = strNums->_Bx._Ptr;
    v3[v27] = 0;
    goto LABEL_70;
  }
  strNums->_Mysize = 0;
  if ( v28 >= 0x10 )
    v3 = strNums->_Bx._Ptr;
  *v3 = 0;
LABEL_70:
  if ( strNumber._Myres >= 0x10 )
    operator delete(strNumber._Bx._Ptr);
}

//----- (004E1B80) --------------------------------------------------------
void __thiscall CharInfoWin::UpdateMeWin(CharInfoWin *this, float fCurTime)
{
  CharInfoWin *v2; // esi@1
  Name5 *v3; // eax@1
  unsigned int v4; // ecx@1
  unsigned int v5; // edx@1
  unsigned int v6; // edi@1
  unsigned int v7; // ebx@1
  unsigned int v8; // eax@1
  PgWinText *v9; // eax@1
  char v10; // al@1
  char *v11; // eax@1
  NiUnsharedGeometryGroup *v12; // ebx@1
  NiRefObjectVtbl *v13; // edi@3
  unsigned int v14; // eax@3
  char *v15; // eax@3
  unsigned __int64 v16; // rax@3
  unsigned __int64 v17; // rax@3
  __int64 v18; // kr08_8@3
  double v19; // st7@4
  CClientGuild *v20; // eax@15
  CClientGuild *v21; // eax@16
  PgWinText *v22; // ecx@16
  NiRefObjectVtbl *v23; // edi@19
  PROTO_NC_CHAR_BASE_CMD *v24; // eax@19
  char *v25; // eax@19
  PROTO_NC_CHAR_BASE_CMD *v26; // edi@20
  int v27; // ST14_4@20
  int v28; // ST10_4@20
  int v29; // eax@20
  int v30; // ST14_4@20
  int v31; // ST10_4@20
  int v32; // eax@20
  int v33; // ST14_4@20
  int v34; // ST10_4@20
  int v35; // eax@20
  int v36; // ST14_4@20
  int v37; // ST10_4@20
  int v38; // eax@20
  int v39; // ST14_4@20
  int v40; // ST10_4@20
  int v41; // eax@20
  unsigned __int16 *v42; // ecx@21
  unsigned int v43; // eax@21
  unsigned int v44; // edi@22
  PassiveSkillInfo *v45; // eax@24
  int v46; // ST14_4@29
  int v47; // ST10_4@29
  int v48; // ST0C_4@29
  int v49; // eax@29
  unsigned int v50; // ST38_4@29
  unsigned int v51; // eax@29
  PgWinText *v52; // edi@29
  signed int v53; // ebx@29
  unsigned int v54; // ST38_4@34
  unsigned int v55; // eax@34
  PgWinText *v56; // edi@34
  signed int v57; // ebx@34
  unsigned int v58; // ST38_4@39
  unsigned int v59; // eax@39
  PgWinText *v60; // edi@39
  signed int v61; // ebx@39
  int v62; // ST14_4@44
  int v63; // ST10_4@44
  int v64; // ST0C_4@44
  int v65; // eax@44
  unsigned int v66; // ST3C_4@44
  unsigned int v67; // eax@44
  PgWinText *v68; // edi@44
  double v69; // st7@44
  signed int v70; // ebx@44
  NiRefObjectVtbl *v71; // edi@50
  unsigned int v72; // ST18_4@50
  unsigned int v73; // eax@50
  NiRefObjectVtbl *v74; // edi@51
  unsigned int v75; // ST18_4@51
  unsigned int v76; // eax@51
  PgWinText *v77; // ecx@51
  NiRefObjectVtbl *v78; // edi@52
  unsigned int v79; // ST18_4@52
  unsigned int v80; // eax@52
  NiRefObjectVtbl *v81; // edi@53
  char *v82; // eax@53
  NiRefObjectVtbl *v83; // edi@54
  PROTO_NC_CHAR_BASE_CMD *v84; // eax@54
  char *v85; // eax@54
  unsigned int v86; // eax@55
  PgWinBut *v87; // ecx@55
  NiRefObjectVtbl *v88; // edi@56
  unsigned int v89; // eax@56
  PgWinText *v90; // ecx@56
  void *(__thiscall *v91)(NiRefObject *, unsigned int); // edx@56
  PgWinText *v92; // esi@57
  int v93; // [sp+1Ch] [bp-2D8h]@0
  void *v94; // [sp+30h] [bp-2C4h]@8
  signed __int64 i64TotalExp; // [sp+34h] [bp-2C0h]@3
  void *i64TotalExp_4; // [sp+38h] [bp-2BCh]@11
  float fExpRate; // [sp+3Ch] [bp-2B8h]@6
  float fExpRatea; // [sp+3Ch] [bp-2B8h]@29
  float fExpRateb; // [sp+3Ch] [bp-2B8h]@34
  float fExpRatec; // [sp+3Ch] [bp-2B8h]@39
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strCurExp; // [sp+40h] [bp-2B4h]@6
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strTotalExp; // [sp+5Ch] [bp-298h]@6
  char pNumberString[256]; // [sp+78h] [bp-27Ch]@6
  char pFullString[256]; // [sp+178h] [bp-17Ch]@7
  char acName[21]; // [sp+278h] [bp-7Ch]@1
  char acGuildName[17]; // [sp+290h] [bp-64h]@16
  char pCurExp[32]; // [sp+2A4h] [bp-50h]@6
  char pTotalExp[32]; // [sp+2C4h] [bp-30h]@6
  int v109; // [sp+2F0h] [bp-4h]@6

  v2 = this;
  v3 = User::GetMainCharID(&g_kUser);
  v4 = v3->n5_code[0];
  v5 = v3->n5_code[1];
  v6 = v3->n5_code[2];
  v7 = v3->n5_code[3];
  v8 = v3->n5_code[4];
  *(_DWORD *)&acName[4] = v5;
  *(_DWORD *)&acName[16] = v8;
  v9 = v2->m_pkCharNameTextWin;
  *(_DWORD *)acName = v4;
  *(_DWORD *)&acName[8] = v6;
  *(_DWORD *)&acName[12] = v7;
  acName[20] = 0;
  ((void (*)(PgWinText *, const char *, ...))v9->vfptr[119].__vecDelDtor)(v9, "%s", acName);
  v10 = User::GetMainCharClass(&g_kUser);
  v11 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), (unsigned __int8)v10);
  v12 = &unk_96F8EB;
  if ( v11 )
    v12 = (NiUnsharedGeometryGroup *)(v11 + 21);
  v13 = v2->m_pkJobTextWin->vfptr;
  v14 = User::Lv(&g_kUser);
  v15 = fs("%s (Lv %d)", v12, v14);
  v13[118].__vecDelDtor((NiRefObject *)v2->m_pkJobTextWin, (unsigned int)v15);
  v16 = User::NextExp(&g_kUser);
  i64TotalExp = v16 - User::PrevExp(&g_kUser);
  v17 = User::CurExp(&g_kUser);
  v18 = v17 - User::PrevExp(&g_kUser);
  if ( i64TotalExp )
    v19 = (double)(100 * v18 / i64TotalExp);
  else
    v19 = 0.0;
  fExpRate = v19;
  *(_DWORD *)&pTotalExp[1] = 0;
  *(_DWORD *)&pTotalExp[5] = 0;
  *(_DWORD *)&pTotalExp[9] = 0;
  *(_DWORD *)&pTotalExp[13] = 0;
  *(_DWORD *)&pTotalExp[17] = 0;
  *(_DWORD *)&pTotalExp[21] = 0;
  *(_DWORD *)&pTotalExp[25] = 0;
  *(_WORD *)&pTotalExp[29] = 0;
  pTotalExp[31] = 0;
  pCurExp[0] = 0;
  *(_DWORD *)&pCurExp[1] = 0;
  *(_DWORD *)&pCurExp[5] = 0;
  *(_DWORD *)&pCurExp[9] = 0;
  *(_DWORD *)&pCurExp[13] = 0;
  *(_DWORD *)&pCurExp[17] = 0;
  *(_DWORD *)&pCurExp[21] = 0;
  *(_DWORD *)&pCurExp[25] = 0;
  *(_WORD *)&pCurExp[29] = 0;
  pCurExp[31] = 0;
  pTotalExp[0] = 0;
  CharInfoWin::ConvertCommaNumber(i64TotalExp, pNumberString);
  sprintf(pTotalExp, "%s", pNumberString);
  CharInfoWin::ConvertCommaNumber(v18, pNumberString);
  sprintf(pCurExp, "%s", pNumberString);
  strCurExp._Myres = 15;
  strCurExp._Mysize = 0;
  strCurExp._Bx._Buf[0] = 0;
  v109 = 0;
  strTotalExp._Myres = 15;
  strTotalExp._Mysize = 0;
  strTotalExp._Bx._Buf[0] = 0;
  LOBYTE(v109) = 1;
  if ( abs(v18 / 1000000) <= 0 )
  {
    ((void (*)(PgWinText *, const char *, ...))v2->m_pkExpTextWin->vfptr[119].__vecDelDtor)(
      v2->m_pkExpTextWin,
      "%s/%s   %d%%",
      pCurExp,
      pTotalExp,
      (signed int)fExpRate);
    v2->m_pkExpTextWin->m_pkToolTipWin = 0;
  }
  else
  {
    pFullString[0] = 0;
    memset(&pFullString[1], 64, 0xFFu);
    sprintf(pFullString, "%s/%s", pCurExp, pTotalExp);
    ConvertCommaNums(i64TotalExp / 10000, &strTotalExp);
    ConvertCommaNums(v18 / 10000, &strCurExp);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkExpTextWin->vfptr, pFullString);
    v2->m_pkExpTextWin->m_pkToolTipWin = g_pkToolTipWin;
    if ( strTotalExp._Myres < 0x10 )
      v94 = &strTotalExp;
    else
      v94 = strTotalExp._Bx._Ptr;
    if ( strCurExp._Myres < 0x10 )
      i64TotalExp_4 = &strCurExp;
    else
      i64TotalExp_4 = strCurExp._Bx._Ptr;
    ((void (*)(PgWinText *, const char *, ...))v2->m_pkExpTextWin->vfptr[119].__vecDelDtor)(
      v2->m_pkExpTextWin,
      "%s/%s   %d%%",
      i64TotalExp_4,
      v94,
      (signed int)fExpRate);
  }
  v20 = GuildTask::GetGuild();
  if ( (unsigned __int8)CClientGuild::AmIGuildMember(v20) )
  {
    v21 = GuildTask::GetGuild();
    *(_DWORD *)acGuildName = v21->m_Guild.sName.n4_code[0];
    *(_DWORD *)&acGuildName[4] = v21->m_Guild.sName.n4_code[1];
    *(_DWORD *)&acGuildName[8] = v21->m_Guild.sName.n4_code[2];
    v22 = v2->m_pkGuildTextWin;
    *(_DWORD *)&acGuildName[12] = v21->m_Guild.sName.n4_code[3];
    acGuildName[16] = 0;
    ((void (__stdcall *)(char *))v22->vfptr[118].__vecDelDtor)(acGuildName);
  }
  else
  {
    ((void (__stdcall *)(const char *))v2->m_pkGuildTextWin->vfptr[118].__vecDelDtor)("-");
  }
  if ( User::GetMainCharBaseData(&g_kUser) )
  {
    v23 = v2->m_pkFamousTextWin->vfptr;
    v24 = User::GetMainCharBaseData(&g_kUser);
    v25 = fs("%d", v24->fame);
    v23[118].__vecDelDtor((NiRefObject *)v2->m_pkFamousTextWin, (unsigned int)v25);
  }
  v26 = User::GetMainCharBaseData(&g_kUser);
  v27 = v26->statdistribute.Strength;
  v28 = User::ChangeStr(&g_kUser);
  v29 = User::BaseStr(&g_kUser);
  CharInfoWin::SetParamTextWin(v2->m_pkStrTextWin, v29, v28, v27, 1.0);
  v30 = v26->statdistribute.Dexterity;
  v31 = User::ChangeDex(&g_kUser);
  v32 = User::BaseDex(&g_kUser);
  CharInfoWin::SetParamTextWin(v2->m_pkDexTextWin, v32, v31, v30, 1.0);
  v33 = v26->statdistribute.Constitute;
  v34 = User::ChangeCon(&g_kUser);
  v35 = User::BaseCon(&g_kUser);
  CharInfoWin::SetParamTextWin(v2->m_pkConTextWin, v35, v34, v33, 1.0);
  v36 = v26->statdistribute.Intelligence;
  v37 = User::ChangeInt(&g_kUser);
  v38 = User::BaseInt(&g_kUser);
  CharInfoWin::SetParamTextWin(v2->m_pkIntTextWin, v38, v37, v36, 1.0);
  v39 = v26->statdistribute.MentalPower;
  v40 = User::ChangeMen(&g_kUser);
  v41 = User::BaseMen(&g_kUser);
  CharInfoWin::SetParamTextWin(v2->m_pkMenTextWin, v41, v40, v39, 1.0);
  if ( v2->m_bChangeCondition )
  {
    v42 = v2->m_kChar_ChangeCondition._vecUsingPassiveSkill._Myfirst;
    v43 = v2->m_kChar_ChangeCondition._vecUsingPassiveSkill._Mylast - v42;
    if ( v43 )
    {
      v44 = 0;
      if ( v43 )
      {
        if ( v43 <= 0 )
          std::_Xout_of_range("invalid vector<T> subscript");
        do
        {
          v45 = PasSkillInfoTab::GetByID(v42[v44]);
          if ( v45 )
            CharInfoWin::SetChangeConParamInfo(v2, v45);
          v42 = v2->m_kChar_ChangeCondition._vecUsingPassiveSkill._Myfirst;
          ++v44;
        }
        while ( v2->m_kChar_ChangeCondition._vecUsingPassiveSkill._Mylast - v42 > v44 );
      }
    }
  }
  else
  {
    v46 = User::ChangeWChigh(&g_kUser);
    v47 = User::BaseWChigh(&g_kUser);
    v48 = User::ChangeWClow(&g_kUser);
    v49 = User::BaseWClow(&g_kUser);
    CharInfoWin::SetMinMaxParamTextWin(v2->m_pkWCTextWin, v49, v48, v47, v46, 1.0);
    v50 = User::ChangeAC(&g_kUser);
    v51 = User::BaseAC(&g_kUser);
    v52 = v2->m_pkACTextWin;
    LODWORD(fExpRatea) = (signed int)(double)(signed int)v51;
    v53 = (signed int)(double)(signed int)v50;
    if ( LODWORD(fExpRatea) == v53 )
    {
      v52->vfptr[117].__vecDelDtor((NiRefObject *)v52, (unsigned int)&Color::m_kDxWhiteColor);
    }
    else if ( SLODWORD(fExpRatea) <= v53 )
    {
      v52->vfptr[117].__vecDelDtor((NiRefObject *)v52, (unsigned int)&Color::m_kDxGreenColor);
    }
    else
    {
      v52->vfptr[117].__vecDelDtor((NiRefObject *)v52, (unsigned int)&Color::m_kDxRedColor);
    }
    ((void (*)(PgWinText *, const char *, ...))v52->vfptr[119].__vecDelDtor)(v52, "%d", v53);
    v54 = User::ChangeTH(&g_kUser);
    v55 = User::BaseTH(&g_kUser);
    v56 = v2->m_pkTHTextWin;
    LODWORD(fExpRateb) = (signed int)(double)(signed int)v55;
    v57 = (signed int)(double)(signed int)v54;
    if ( LODWORD(fExpRateb) == v57 )
    {
      v56->vfptr[117].__vecDelDtor((NiRefObject *)v56, (unsigned int)&Color::m_kDxWhiteColor);
    }
    else if ( SLODWORD(fExpRateb) <= v57 )
    {
      v56->vfptr[117].__vecDelDtor((NiRefObject *)v56, (unsigned int)&Color::m_kDxGreenColor);
    }
    else
    {
      v56->vfptr[117].__vecDelDtor((NiRefObject *)v56, (unsigned int)&Color::m_kDxRedColor);
    }
    ((void (*)(PgWinText *, const char *, ...))v56->vfptr[119].__vecDelDtor)(v56, "%d", v57);
    v58 = User::ChangeTB(&g_kUser);
    v59 = User::BaseTB(&g_kUser);
    v60 = v2->m_pkTBTextWin;
    LODWORD(fExpRatec) = (signed int)(double)(signed int)v59;
    v61 = (signed int)(double)(signed int)v58;
    if ( LODWORD(fExpRatec) == v61 )
    {
      v60->vfptr[117].__vecDelDtor((NiRefObject *)v60, (unsigned int)&Color::m_kDxWhiteColor);
    }
    else if ( SLODWORD(fExpRatec) <= v61 )
    {
      v60->vfptr[117].__vecDelDtor((NiRefObject *)v60, (unsigned int)&Color::m_kDxGreenColor);
    }
    else
    {
      v60->vfptr[117].__vecDelDtor((NiRefObject *)v60, (unsigned int)&Color::m_kDxRedColor);
    }
    ((void (*)(PgWinText *, const char *, ...))v60->vfptr[119].__vecDelDtor)(v60, "%d", v61);
    v62 = User::ChangeMAhigh(&g_kUser);
    v63 = User::BaseMAhigh(&g_kUser);
    v64 = User::ChangeMAlow(&g_kUser);
    v65 = User::BaseMAlow(&g_kUser);
    CharInfoWin::SetMinMaxParamTextWin(v2->m_pkMATextWin, v65, v64, v63, v62, 1.0);
    v66 = User::ChangeMR(&g_kUser);
    v67 = User::BaseMR(&g_kUser);
    v68 = v2->m_pkMRTextWin;
    v69 = (double)(signed int)v66;
    v70 = (signed int)(double)(signed int)v67;
    if ( v70 == (signed int)v69 )
    {
      v68->vfptr[117].__vecDelDtor((NiRefObject *)v68, (unsigned int)&Color::m_kDxWhiteColor);
    }
    else if ( v70 <= (signed int)v69 )
    {
      v68->vfptr[117].__vecDelDtor((NiRefObject *)v68, (unsigned int)&Color::m_kDxGreenColor);
    }
    else
    {
      v68->vfptr[117].__vecDelDtor((NiRefObject *)v68, (unsigned int)&Color::m_kDxRedColor);
    }
    ((void (*)(PgWinText *, const char *, ...))v68->vfptr[119].__vecDelDtor)(v68, "%d", (signed int)v69);
  }
  v71 = v2->m_pkHPNumTextWin->vfptr;
  v72 = User::MaxHP(&g_kUser);
  v73 = User::HP(&g_kUser);
  ((void (*)(PgWinText *, const char *, ...))v71[119].__vecDelDtor)(v2->m_pkHPNumTextWin, "%d/%d", v73, v72);
  switch ( Char::GetClass(g_pkMainChar) )
  {
    case 0x1A:
    case 0x1B:
      ((void (__stdcall *)(signed int))v2->m_pkLPTextWin->vfptr[60].__vecDelDtor)(1);
      ((void (__stdcall *)(signed int))v2->m_pkLPTextWin->vfptr[64].__vecDelDtor)(1);
      v74 = v2->m_pkLPNumTextWin->vfptr;
      v75 = User::MaxLP(&g_kUser);
      v76 = User::LP(&g_kUser);
      ((void (*)(PgWinText *, const char *, ...))v74[119].__vecDelDtor)(v2->m_pkLPNumTextWin, "%d/%d", v76, v75);
      ((void (__stdcall *)(signed int))v2->m_pkLPNumTextWin->vfptr[64].__vecDelDtor)(1);
      ((void (__stdcall *)(_DWORD))v2->m_pkSPTextWin->vfptr[60].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v2->m_pkSPTextWin->vfptr[64].__vecDelDtor)(0);
      v77 = v2->m_pkSPNumTextWin;
      break;
    default:
      ((void (__stdcall *)(signed int))v2->m_pkSPTextWin->vfptr[60].__vecDelDtor)(1);
      ((void (__stdcall *)(signed int))v2->m_pkSPTextWin->vfptr[64].__vecDelDtor)(1);
      v78 = v2->m_pkSPNumTextWin->vfptr;
      v79 = User::MaxSP(&g_kUser);
      v80 = User::SP(&g_kUser);
      ((void (*)(PgWinText *, const char *, ...))v78[119].__vecDelDtor)(v2->m_pkSPNumTextWin, "%d/%d", v80, v79);
      ((void (__stdcall *)(signed int))v2->m_pkSPNumTextWin->vfptr[64].__vecDelDtor)(1);
      ((void (__stdcall *)(_DWORD))v2->m_pkLPTextWin->vfptr[60].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v2->m_pkLPTextWin->vfptr[64].__vecDelDtor)(0);
      v77 = v2->m_pkLPNumTextWin;
      break;
  }
  ((void (__stdcall *)(_DWORD))v77->vfptr[64].__vecDelDtor)(0);
  v81 = v2->m_pkPointNumTextWin->vfptr;
  v82 = fs("%d", unk_A97D74);
  v81[118].__vecDelDtor((NiRefObject *)v2->m_pkPointNumTextWin, (unsigned int)v82);
  if ( v2->m_pkPkKillCountTextWin )
  {
    v83 = v2->m_pkPkKillCountTextWin->vfptr;
    v84 = User::GetMainCharBaseData(&g_kUser);
    v85 = fs("%d Point", v84->pkcount);
    v83[118].__vecDelDtor((NiRefObject *)v2->m_pkPkKillCountTextWin, (unsigned int)v85);
  }
  v86 = Inventory::GetStatInitialPoint(&g_kInventory);
  v87 = v2->m_pkStrDnBtn;
  if ( v86 )
  {
    ((void (__stdcall *)(signed int, int))v87->vfptr[64].__vecDelDtor)(1, v93);
    ((void (__stdcall *)(signed int))v2->m_pkDexDnBtn->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(signed int))v2->m_pkConDnBtn->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(signed int))v2->m_pkIntDnBtn->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(signed int))v2->m_pkMenDnBtn->vfptr[64].__vecDelDtor)(1);
    v88 = v2->m_pkRedistributePointText->vfptr;
    v89 = Inventory::GetStatInitialPoint(&g_kInventory);
    fs(off_985990, v89);
    v90 = v2->m_pkRedistributePointText;
    v91 = v88[118].__vecDelDtor;
  }
  else
  {
    ((void (__stdcall *)(_DWORD, int))v87->vfptr[64].__vecDelDtor)(0, v93);
    ((void (__stdcall *)(_DWORD))v2->m_pkDexDnBtn->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkConDnBtn->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkIntDnBtn->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkMenDnBtn->vfptr[64].__vecDelDtor)(0);
    v92 = v2->m_pkRedistributePointText;
    v91 = v92->vfptr[118].__vecDelDtor;
    v90 = v92;
  }
  ((void (__thiscall *)(PgWinText *))v91)(v90);
  if ( strTotalExp._Myres >= 0x10 )
    operator delete(strTotalExp._Bx._Ptr);
  strTotalExp._Myres = 15;
  strTotalExp._Mysize = 0;
  strTotalExp._Bx._Buf[0] = 0;
  if ( strCurExp._Myres >= 0x10 )
    operator delete(strCurExp._Bx._Ptr);
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (004E2740) --------------------------------------------------------
void __thiscall CharInfoWin::SetConditionInfo(CharInfoWin *this, CHAR_CHANGEBYCONDITION_PARAM kConditionParam)
{
  CHAR_CHANGEBYCONDITION_PARAM *v2; // edx@1
  std::vector<CHAR_CHANGEBYCONDITION_PARAM,std::allocator<CHAR_CHANGEBYCONDITION_PARAM> > *v3; // ecx@1
  CHAR_CHANGEBYCONDITION_PARAM *v4; // edi@1
  unsigned int v5; // edx@1
  unsigned int v6; // eax@1
  unsigned int v7; // esi@3
  int v8; // edx@5
  __int16 kParam_4; // ST14_2@5
  int v10; // eax@10

  v2 = this->m_vecConditionParam._Mylast;
  v3 = &this->m_vecConditionParam;
  v4 = v3->_Myfirst;
  v5 = (unsigned __int64)(715827883i64 * ((char *)v2 - (char *)v3->_Myfirst)) >> 32;
  v6 = v5 + (v5 >> 31);
  if ( v5 + (v5 >> 31) )
  {
    v7 = 0;
    if ( v6 )
    {
      if ( v6 <= 0 )
        goto LABEL_13;
      while ( 1 )
      {
        v8 = *(_DWORD *)&v4->nFlag;
        kParam_4 = HIWORD(v4->nValue);
        if ( __PAIR__(BYTE1(v8), (unsigned __int8)*(_DWORD *)&v4->nFlag) == *(_WORD *)&kConditionParam.nFlag )
          break;
        ++v7;
        ++v4;
        if ( v6 <= v7 )
          goto LABEL_7;
      }
      if ( v6 <= v7 )
LABEL_13:
        std::_Xout_of_range("invalid vector<T> subscript");
      v10 = (int)&v3->_Myfirst[v7].nFlag;
      *(_DWORD *)v10 = *(_DWORD *)&kConditionParam.nFlag;
      *(_WORD *)(v10 + 4) = HIWORD(kConditionParam.nValue);
    }
    else
    {
LABEL_7:
      std::vector<CHAR_CHANGEBYCONDITION_PARAM,std::allocator<CHAR_CHANGEBYCONDITION_PARAM>>::push_back(
        v3,
        &kConditionParam);
    }
  }
  else
  {
    std::vector<CHAR_CHANGEBYCONDITION_PARAM,std::allocator<CHAR_CHANGEBYCONDITION_PARAM>>::push_back(
      v3,
      &kConditionParam);
  }
}

//----- (004E27F0) --------------------------------------------------------
unsigned __int16 *__stdcall std::allocator<unsigned short>::allocate(unsigned int _Count)
{
  unsigned __int16 *result; // eax@1
  std::exception pExceptionObject; // [sp+0h] [bp-Ch]@4

  result = 0;
  if ( _Count )
  {
    if ( _Count > 0x7FFFFFFF || (result = (unsigned __int16 *)operator new(2 * _Count)) == 0 )
    {
      _Count = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&_Count);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
  }
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (004E2850) --------------------------------------------------------
CHAR_CHANGEBYCONDITION_PARAM *__stdcall std::allocator<CHAR_CHANGEBYCONDITION_PARAM>::allocate(unsigned int _Count)
{
  CHAR_CHANGEBYCONDITION_PARAM *result; // eax@1
  std::exception pExceptionObject; // [sp+0h] [bp-Ch]@4

  result = 0;
  if ( _Count )
  {
    if ( _Count > 0x2AAAAAAA || (result = (CHAR_CHANGEBYCONDITION_PARAM *)operator new(6 * _Count)) == 0 )
    {
      _Count = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&_Count);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
  }
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (004E28B0) --------------------------------------------------------
std::_String_iterator<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::end(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, std::_String_iterator<char,std::char_traits<char>,std::allocator<char> > *result)
{
  std::_String_iterator<char,std::char_traits<char>,std::allocator<char> > *v2; // eax@2

  if ( this->_Myres < 0x10 )
  {
    v2 = result;
    result->_Ptr = &this->_Bx._Buf[this->_Mysize];
  }
  else
  {
    v2 = result;
    result->_Ptr = &this->_Bx._Ptr[this->_Mysize];
  }
  return v2;
}

//----- (004E28E0) --------------------------------------------------------
void __thiscall std::vector<unsigned short,std::allocator<unsigned short>>::reserve(std::vector<unsigned short,std::allocator<unsigned short> > *this, unsigned int _Count)
{
  std::vector<unsigned short,std::allocator<unsigned short> > *v2; // esi@1
  unsigned __int16 *v3; // ebx@4
  int v4; // edi@4

  v2 = this;
  if ( _Count > 0x7FFFFFFF )
    std::_Xlength_error("vector<T> too long");
  if ( this->_Myend - this->_Myfirst < _Count )
  {
    v3 = std::allocator<unsigned short>::allocate(_Count);
    memmove((char *)v3, (char *)v2->_Myfirst, 2 * (v2->_Mylast - v2->_Myfirst));
    v4 = v2->_Mylast - v2->_Myfirst;
    if ( v2->_Myfirst )
      operator delete(v2->_Myfirst);
    v2->_Myfirst = v3;
    v2->_Myend = &v3[_Count];
    v2->_Mylast = &v3[v4];
  }
}

//----- (004E2960) --------------------------------------------------------
CHAR_CHANGEBYCONDITION_PARAM *__cdecl std::_Uninit_move<CHAR_CHANGEBYCONDITION_PARAM *,CHAR_CHANGEBYCONDITION_PARAM *,std::allocator<CHAR_CHANGEBYCONDITION_PARAM>,CHAR_CHANGEBYCONDITION_PARAM>(CHAR_CHANGEBYCONDITION_PARAM *_First, CHAR_CHANGEBYCONDITION_PARAM *_Last, CHAR_CHANGEBYCONDITION_PARAM *_Dest)
{
  CHAR_CHANGEBYCONDITION_PARAM *v3; // ecx@1
  CHAR_CHANGEBYCONDITION_PARAM *result; // eax@1

  v3 = _First;
  for ( result = _Dest; v3 != _Last; ++result )
  {
    if ( result )
    {
      *(_DWORD *)&result->nFlag = *(_DWORD *)&v3->nFlag;
      HIWORD(result->nValue) = HIWORD(v3->nValue);
    }
    ++v3;
  }
  return result;
}

//----- (004E2990) --------------------------------------------------------
void __thiscall std::vector<unsigned short,std::allocator<unsigned short>>::_Reserve(std::vector<unsigned short,std::allocator<unsigned short> > *this, unsigned int _Count)
{
  unsigned int v2; // eax@1
  unsigned int v3; // eax@3
  unsigned int v4; // edx@3
  unsigned int v5; // edx@5

  v2 = this->_Mylast - this->_Myfirst;
  if ( 0x7FFFFFFF - _Count < v2 )
    std::_Xlength_error("vector<T> too long");
  v3 = _Count + v2;
  v4 = this->_Myend - this->_Myfirst;
  if ( v3 > v4 )
  {
    if ( 0x7FFFFFFF - (v4 >> 1) >= v4 )
      v5 = (v4 >> 1) + v4;
    else
      v5 = 0;
    if ( v5 < v3 )
      v5 = v3;
    std::vector<unsigned short,std::allocator<unsigned short>>::reserve(this, v5);
  }
}

//----- (004E29F0) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::insert(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int _Off, unsigned int _Count, char _Ch)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v4; // esi@1
  unsigned int v5; // eax@1
  unsigned int v6; // edi@6
  unsigned int v7; // ecx@8
  unsigned int v8; // eax@10
  char *v9; // ecx@11
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result; // eax@14
  char *v11; // eax@18
  bool v12; // cf@20

  v4 = this;
  v5 = this->_Mysize;
  if ( v5 < _Off )
    std::_Xout_of_range("invalid string position");
  if ( -1 - v5 <= _Count )
    std::_Xlength_error("string too long");
  if ( !_Count )
    return v4;
  v6 = v5 + _Count;
  if ( v5 + _Count > 0xFFFFFFFE )
    std::_Xlength_error("string too long");
  v7 = this->_Myres;
  if ( v7 < v6 )
  {
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Copy(v4, v6, v5);
    if ( v6 )
    {
LABEL_10:
      v8 = v4->_Myres;
      if ( v8 < 0x10 )
        v9 = (char *)v4;
      else
        v9 = v4->_Bx._Ptr;
      if ( v8 < 0x10 )
        v11 = (char *)v4;
      else
        v11 = v4->_Bx._Ptr;
      memmove(&v11[_Off] + _Count, &v9[_Off], v4->_Mysize - _Off);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Chassign(v4, _Off, _Count, _Ch);
      v12 = v4->_Myres < 0x10;
      v4->_Mysize = v6;
      if ( !v12 )
      {
        v4->_Bx._Ptr[v6] = 0;
        return v4;
      }
      v4->_Bx._Buf[v6] = 0;
    }
    return v4;
  }
  if ( v6 )
    goto LABEL_10;
  v4->_Mysize = 0;
  if ( v7 < 0x10 )
  {
    result = v4;
    v4->_Bx._Buf[0] = 0;
  }
  else
  {
    *v4->_Bx._Ptr = 0;
    result = v4;
  }
  return result;
}

//----- (004E2AF0) --------------------------------------------------------
void __thiscall Char_ChangeCondition::~Char_ChangeCondition(Char_ChangeCondition *this)
{
  Char_ChangeCondition *v1; // esi@1

  v1 = this;
  if ( this->_vecUsingPassiveSkill._Myfirst )
    operator delete(this->_vecUsingPassiveSkill._Myfirst);
  v1->_vecUsingPassiveSkill._Myfirst = 0;
  v1->_vecUsingPassiveSkill._Mylast = 0;
  v1->_vecUsingPassiveSkill._Myend = 0;
}

//----- (004E2B30) --------------------------------------------------------
void __thiscall std::vector<unsigned short,std::allocator<unsigned short>>::push_back(std::vector<unsigned short,std::allocator<unsigned short> > *this, const unsigned __int16 *_Val)
{
  std::vector<unsigned short,std::allocator<unsigned short> > *v2; // esi@1
  unsigned __int16 *v3; // eax@1
  signed int v4; // edi@3
  unsigned __int16 *v5; // eax@5
  _WORD *v6; // eax@9

  v2 = this;
  v3 = this->_Mylast;
  if ( _Val >= v3 || this->_Myfirst > _Val )
  {
    if ( v3 == this->_Myend )
      std::vector<unsigned short,std::allocator<unsigned short>>::_Reserve(this, 1u);
    v6 = v2->_Mylast;
    if ( v6 )
      *v6 = *_Val;
  }
  else
  {
    v4 = _Val - this->_Myfirst;
    if ( v3 == this->_Myend )
      std::vector<unsigned short,std::allocator<unsigned short>>::_Reserve(this, 1u);
    v5 = v2->_Mylast;
    if ( v5 )
    {
      *v5 = v2->_Myfirst[v4];
      ++v2->_Mylast;
      return;
    }
  }
  ++v2->_Mylast;
}

//----- (004E2BA0) --------------------------------------------------------
void __thiscall std::vector<CHAR_CHANGEBYCONDITION_PARAM,std::allocator<CHAR_CHANGEBYCONDITION_PARAM>>::reserve(std::vector<CHAR_CHANGEBYCONDITION_PARAM,std::allocator<CHAR_CHANGEBYCONDITION_PARAM> > *this, unsigned int _Count)
{
  std::vector<CHAR_CHANGEBYCONDITION_PARAM,std::allocator<CHAR_CHANGEBYCONDITION_PARAM> > *v2; // esi@1
  CHAR_CHANGEBYCONDITION_PARAM *v3; // eax@4
  CHAR_CHANGEBYCONDITION_PARAM *v4; // ST04_4@4
  CHAR_CHANGEBYCONDITION_PARAM *v5; // ST00_4@4
  int v6; // edi@4
  CHAR_CHANGEBYCONDITION_PARAM *v7; // eax@6
  int v8; // [sp+0h] [bp-24h]@1
  CHAR_CHANGEBYCONDITION_PARAM *_Ptr; // [sp+10h] [bp-14h]@4
  int *v10; // [sp+14h] [bp-10h]@1
  int v11; // [sp+20h] [bp-4h]@4

  v10 = &v8;
  v2 = this;
  if ( _Count > 0x2AAAAAAA )
    std::_Xlength_error("vector<T> too long");
  if ( this->_Myend - this->_Myfirst < _Count )
  {
    v3 = std::allocator<CHAR_CHANGEBYCONDITION_PARAM>::allocate(_Count);
    v4 = v2->_Mylast;
    v5 = v2->_Myfirst;
    _Ptr = v3;
    v11 = 0;
    std::_Uninit_move<CHAR_CHANGEBYCONDITION_PARAM *,CHAR_CHANGEBYCONDITION_PARAM *,std::allocator<CHAR_CHANGEBYCONDITION_PARAM>,CHAR_CHANGEBYCONDITION_PARAM>(
      v5,
      v4,
      v3);
    v6 = v2->_Mylast - v2->_Myfirst;
    if ( v2->_Myfirst )
      operator delete(v2->_Myfirst);
    v7 = _Ptr;
    v2->_Myend = &_Ptr[_Count];
    v2->_Mylast = &v7[v6];
    v2->_Myfirst = v7;
  }
}

//----- (004E2C90) --------------------------------------------------------
void __thiscall std::vector<CHAR_CHANGEBYCONDITION_PARAM,std::allocator<CHAR_CHANGEBYCONDITION_PARAM>>::_Reserve(std::vector<CHAR_CHANGEBYCONDITION_PARAM,std::allocator<CHAR_CHANGEBYCONDITION_PARAM> > *this, unsigned int _Count)
{
  unsigned int v2; // esi@1
  unsigned int v3; // esi@3
  unsigned int v4; // eax@3
  unsigned int v5; // eax@5

  v2 = this->_Mylast - this->_Myfirst;
  if ( 715827882 - _Count < v2 )
    std::_Xlength_error("vector<T> too long");
  v3 = _Count + v2;
  v4 = this->_Myend - this->_Myfirst;
  if ( v3 > v4 )
  {
    if ( 715827882 - (v4 >> 1) >= v4 )
      v5 = (v4 >> 1) + v4;
    else
      v5 = 0;
    if ( v5 < v3 )
      v5 = v3;
    std::vector<CHAR_CHANGEBYCONDITION_PARAM,std::allocator<CHAR_CHANGEBYCONDITION_PARAM>>::reserve(this, v5);
  }
}

//----- (004E2D10) --------------------------------------------------------
void __thiscall std::vector<CHAR_CHANGEBYCONDITION_PARAM,std::allocator<CHAR_CHANGEBYCONDITION_PARAM>>::push_back(std::vector<CHAR_CHANGEBYCONDITION_PARAM,std::allocator<CHAR_CHANGEBYCONDITION_PARAM> > *this, CHAR_CHANGEBYCONDITION_PARAM *_Val)
{
  std::vector<CHAR_CHANGEBYCONDITION_PARAM,std::allocator<CHAR_CHANGEBYCONDITION_PARAM> > *v2; // edi@1
  CHAR_CHANGEBYCONDITION_PARAM *v3; // ecx@1
  int v4; // esi@3
  int v5; // ecx@5
  CHAR_CHANGEBYCONDITION_PARAM *v6; // eax@5
  CHAR_CHANGEBYCONDITION_PARAM *v7; // eax@9

  v2 = this;
  v3 = this->_Mylast;
  if ( _Val >= v3 || v2->_Myfirst > _Val )
  {
    if ( v3 == v2->_Myend )
      std::vector<CHAR_CHANGEBYCONDITION_PARAM,std::allocator<CHAR_CHANGEBYCONDITION_PARAM>>::_Reserve(v2, 1u);
    v7 = v2->_Mylast;
    if ( v7 )
    {
      *(_DWORD *)&v7->nFlag = *(_DWORD *)&_Val->nFlag;
      HIWORD(v7->nValue) = HIWORD(_Val->nValue);
    }
  }
  else
  {
    v4 = _Val - v2->_Myfirst;
    if ( v3 == v2->_Myend )
      std::vector<CHAR_CHANGEBYCONDITION_PARAM,std::allocator<CHAR_CHANGEBYCONDITION_PARAM>>::_Reserve(v2, 1u);
    v5 = (int)&v2->_Myfirst[v4].nFlag;
    v6 = v2->_Mylast;
    if ( v6 )
    {
      *(_DWORD *)&v6->nFlag = *(_DWORD *)v5;
      HIWORD(v6->nValue) = *(_WORD *)(v5 + 4);
      ++v2->_Mylast;
      return;
    }
  }
  ++v2->_Mylast;
}

//----- (004E2DA0) --------------------------------------------------------
CharInfoWin *__thiscall CharInfoWin::`vector deleting destructor'(CharInfoWin *this, unsigned int a2)
{
  CharInfoWin *v2; // esi@1

  v2 = this;
  CharInfoWin::~CharInfoWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (004E2DD0) --------------------------------------------------------
void __thiscall CharTitleWin::~CharTitleWin(CharTitleWin *this)
{
  CharTitleWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&CharTitleWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CharTitleWin::`vftable'{for `IDirectMessenger'};
  CDataReader::~CDataReader(&this->pCharTitleData.m_CharacterTitleData);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 985F40: using guessed type void (__thiscall *CharTitleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 985F5C: using guessed type int (__thiscall *CharTitleWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004E2E40) --------------------------------------------------------
void __thiscall CharTitleWin::OnPrevPage(CharTitleWin *this)
{
  unsigned int v1; // eax@1

  v1 = this->m_uiCurPage;
  if ( v1 )
    this->m_uiCurPage = v1 - 1;
}

//----- (004E2E60) --------------------------------------------------------
void __thiscall CharTitleWin::OnNextPage(CharTitleWin *this)
{
  ++this->m_uiCurPage;
}

//----- (004E2E70) --------------------------------------------------------
void __thiscall CharTitleWin::OnClose(CharTitleWin *this)
{
  CharTitleWin *v1; // ebx@1
  char *v2; // esi@1
  signed int v3; // edi@1

  v1 = this;
  v2 = (char *)this->m_apkChoiceNickTextWin;
  v3 = 7;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 472))(&unk_985CAE);
    v2 += 4;
    --v3;
  }
  while ( v3 );
  PgWin::OnClose((PgWin *)&v1->vfptr);
}

//----- (004E2EC0) --------------------------------------------------------
void __thiscall CharTitleWin::AddListItem(CharTitleWin *this, unsigned int uiIndex, unsigned int uiType, unsigned int uiElementNum, unsigned int uiElementValue, unsigned int uiMobID)
{
  CharTitleWin *v6; // edi@1
  SlideListWin *v7; // ecx@1
  int v8; // esi@3
  char *v9; // eax@7
  int v10; // eax@7
  char *v11; // eax@8
  char *v12; // eax@9
  unsigned int v13; // [sp-1Ch] [bp-20h]@6
  int v14; // [sp-14h] [bp-18h]@6
  int v15; // [sp-10h] [bp-14h]@6
  int v16; // [sp-Ch] [bp-10h]@6

  v6 = this;
  v7 = this->m_pListWin;
  if ( v7 && uiElementValue )
  {
    v8 = 0;
    if ( uiElementValue == 1 )
    {
      v12 = CCharacterTitleData::GetTitleString(&g_characterTitleData, uiType, uiElementNum);
      v10 = SlideListWin::AddText(v6->m_pListWin, v12);
      v16 = 0;
      v15 = 0;
      v14 = 0;
    }
    else if ( uiElementValue == 2 )
    {
      v11 = CCharacterTitleData::GetTitleString(&g_characterTitleData, uiType, uiElementNum);
      v10 = SlideListWin::AddText(v6->m_pListWin, v11);
      v16 = 255;
      v15 = 255;
      v14 = 255;
    }
    else
    {
      if ( uiElementValue != 3 )
      {
        v16 = 255;
        v15 = 255;
        v14 = 0;
        v13 = 0;
LABEL_11:
        SlideListWin::SetFontColor(v7, v13, 0, v14, v15, v16);
        v6->ms_ctWinListInfo[v8].Type = uiType;
        *((_BYTE *)&v6->ms_ctWinListInfo[v8] + 1) = ((_BYTE)uiElementValue << 6) | uiElementNum & 0x3F;
        v6->ms_ctWinListInfo[v8].MobID = uiMobID;
        return;
      }
      v9 = CCharacterTitleData::GetTitleString(&g_characterTitleData, uiType, uiElementNum);
      v10 = SlideListWin::AddText(v6->m_pListWin, v9);
      v16 = 255;
      v15 = 0;
      v14 = 255;
    }
    v7 = v6->m_pListWin;
    v8 = v10;
    v13 = v10;
    goto LABEL_11;
  }
}

//----- (004E2FC0) --------------------------------------------------------
void CharTitleWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "CharTitle");
}

//----- (004E2FF0) --------------------------------------------------------
void CharTitleWin::CharTitleSort()
{
  Char *v1; // eax@1
  NiGeometry *v2; // edx@1
  unsigned int v3; // ebx@2
  signed int v4; // esi@2
  int v5; // ecx@4
  __int16 v6; // dx@6
  __int16 v7; // dx@7
  bool v8; // zf@10
  NiGeometry *uiTotalCharTitle; // [sp+0h] [bp-10h]@1
  int v10; // [sp+4h] [bp-Ch]@2
  signed int v11; // [sp+8h] [bp-8h]@2
  int v12; // [sp+Ch] [bp-4h]@4

  v1 = g_pkMainChar;
  uiTotalCharTitle = g_pkMainChar[1].m_kCharShape.m_apkLodGeom[5];
  v2 = uiTotalCharTitle;
  if ( uiTotalCharTitle != (NiGeometry *)1 )
  {
    v3 = 1;
    v11 = 1;
    v4 = 2940;
    v10 = (int)&uiTotalCharTitle[-1].m_spShader.m_pObject + 3;
    do
    {
      if ( v3 < (unsigned int)v2 )
      {
        v5 = v4 + 2;
        v12 = (int)v2 - v3;
        do
        {
          if ( *((_BYTE *)&v1->vfptr + v4) == *((_BYTE *)&v1->vfptr + v5) )
          {
            v6 = *(_WORD *)((char *)&v1->vfptr + v4 + 2);
            *(_WORD *)((char *)&v1->vfptr + v4 + 2) = *(_WORD *)((char *)&v1->vfptr + v5);
            *(_WORD *)((char *)&g_pkMainChar->vfptr + v5) = v6;
            v1 = g_pkMainChar;
            if ( (unsigned __int8)(*((_BYTE *)&g_pkMainChar->vfptr + v4 + 1) & 0x3F) > (unsigned __int8)(*((_BYTE *)&g_pkMainChar->vfptr + v4 + 3) & 0x3F) )
            {
              v7 = *(_WORD *)((char *)&g_pkMainChar->vfptr + v4);
              *(_WORD *)((char *)&g_pkMainChar->vfptr + v4) = *(_WORD *)((char *)&g_pkMainChar->vfptr + v4 + 2);
              *(_WORD *)((char *)&g_pkMainChar->vfptr + v4 + 2) = v7;
              v1 = g_pkMainChar;
            }
          }
          v5 += 2;
          --v12;
        }
        while ( v12 );
        v2 = uiTotalCharTitle;
        v3 = v11;
      }
      ++v3;
      v4 += 2;
      v8 = v10-- == 1;
      v11 = v3;
    }
    while ( !v8 );
  }
}

//----- (004E30B0) --------------------------------------------------------
void __thiscall CharTitleWin::CharTitleWin(CharTitleWin *this)
{
  CharTitleWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&CharTitleWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CharTitleWin::`vftable'{for `IDirectMessenger'};
  CDataReader::CDataReader(&v1->pCharTitleData.m_CharacterTitleData);
  v1->m_uiCurPage = 0;
  v1->m_pSlideBarEx = 0;
}
// 985F40: using guessed type void (__thiscall *CharTitleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 985F5C: using guessed type int (__thiscall *CharTitleWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004E3130) --------------------------------------------------------
void __thiscall CharTitleWin::UpdateMeWin(CharTitleWin *this, float fCurTime)
{
  CharTitleWin *v2; // esi@1

  v2 = this;
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
    GameFrameWork::UpdateUIScroll(v2->m_pListWin, v2->m_pSlideBarEx);
}

//----- (004E3160) --------------------------------------------------------
void __thiscall CharTitleWin::OnOK(CharTitleWin *this)
{
  CharTitleWin *v1; // esi@1
  unsigned int v2; // eax@1
  int v3; // esi@2
  signed int v4; // edi@2

  v1 = this;
  v2 = SlideListWin::GetCurSelIndex(this->m_pListWin);
  if ( (unsigned int)*((_BYTE *)&v1->ms_ctWinListInfo[v2] + 1) >> 6 == 2 )
  {
    GameFrameWork::NcCharTitleSetReq((GameFrameWork *)v1->m_pkFrameWork, v2);
    v3 = (int)v1->m_apkChoiceNickTextWin;
    v4 = 7;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 472))(&unk_985CAF);
      v3 += 4;
      --v4;
    }
    while ( v4 );
  }
}

//----- (004E31B0) --------------------------------------------------------
void __thiscall CharTitleWin::OnSlideBarContent(CharTitleWin *this)
{
  this->m_pListWin->m_nViewStartPos = this->m_pSlideBarEx->m_nCurPos;
  SlideListWin::UpdateViewList(this->m_pListWin);
}

//----- (004E31E0) --------------------------------------------------------
void __thiscall CharTitleWin::ProcessMeInput(CharTitleWin *this, bool *bHit)
{
  CharTitleWin *v2; // esi@1

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[78].__vecDelDtor)() )
  {
    if ( dword_B64790 )
      ++dword_B64790;
    if ( PgWin::ms_kbRbutPressed.m_iBool )
      ++PgWin::ms_kbRbutPressed.m_iBool;
    PgWinFrame::ProcessMeInput((PgWinFrame *)&v2->vfptr, bHit);
    PgWin::ms_kbRbutPressed.m_bReserveFalse = 0;
    if ( PgWin::ms_kbRbutPressed.m_iBool )
      --PgWin::ms_kbRbutPressed.m_iBool;
    byte_B6478C = 0;
    if ( dword_B64790 )
      --dword_B64790;
  }
}
// B6478C: using guessed type char byte_B6478C;
// B64790: using guessed type int dword_B64790;

//----- (004E3260) --------------------------------------------------------
void __thiscall CharTitleWin::UpdateViewList(CharTitleWin *this)
{
  CharTitleWin *v1; // edi@1
  Char *v2; // ecx@2
  unsigned int v3; // esi@2

  v1 = this;
  if ( this->m_pListWin )
  {
    CharTitleWin::CharTitleSort();
    SlideListWin::RemoveAllList(v1->m_pListWin);
    v2 = g_pkMainChar;
    v3 = 0;
    if ( g_pkMainChar[1].m_kCharShape.m_apkLodGeom[5] )
    {
      do
      {
        CharTitleWin::AddListItem(
          v1,
          v3,
          *((_BYTE *)&v2[1].vfptr + 2 * v3),
          *((_BYTE *)&v2[1].vfptr + 2 * v3 + 1) & 0x3F,
          (unsigned int)*((_BYTE *)&v2[1].vfptr + 2 * v3 + 1) >> 6,
          0);
        v2 = g_pkMainChar;
        ++v3;
      }
      while ( (NiGeometry *)v3 < g_pkMainChar[1].m_kCharShape.m_apkLodGeom[5] );
    }
    SlideListWin::UpdateViewList(v1->m_pListWin);
    SlideBar::SetSplitCnt(v1->m_pSlideBarEx, v1->m_pListWin->m_nSlideSplitCnt);
  }
}

//----- (004E32F0) --------------------------------------------------------
CharTitleWin *__cdecl CharTitleWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  CharTitleWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+10h] [bp-10h]@1
  int v6; // [sp+1Ch] [bp-4h]@1

  v1 = (PgWin *)operator new(0xA30u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    LOBYTE(v6) = 1;
    v2->vfptr = (NiRefObjectVtbl *)&CharTitleWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&CharTitleWin::`vftable'{for `IDirectMessenger'};
    CDataReader::CDataReader((CDataReader *)&v2[8].m_kChildren);
    v2[8].m_spCollisionObject.m_pObject = 0;
    v2[8].m_kPropertyList.m_kAllocator.m_uiCount = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (CharTitleWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 985F40: using guessed type void (__thiscall *CharTitleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 985F5C: using guessed type int (__thiscall *CharTitleWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004E3450) --------------------------------------------------------
void __thiscall CharTitleWin::OnListClick(CharTitleWin *this, int nIndex)
{
  CharTitleWin *v2; // ebx@1
  int v3; // esi@1
  signed int v4; // edi@1
  char *v5; // edi@3
  CharacterTitleStateView **v6; // eax@4
  NiRefObjectVtbl *v7; // esi@5
  char *v8; // eax@5
  char *v9; // eax@5
  unsigned int v10; // edi@7
  int v11; // edx@8
  int v12; // esi@8
  std::vector<CharacterTitleStateView *,std::allocator<CharacterTitleStateView *> > ViewList; // [sp+10h] [bp-1Ch]@1
  int v14; // [sp+28h] [bp-4h]@1

  v2 = this;
  CharacterTitleStateViewTab::GetByTypeAndLevel(
    &ViewList,
    this->ms_ctWinListInfo[nIndex].Type,
    *((_BYTE *)&this->ms_ctWinListInfo[nIndex] + 1) & 0x3F);
  v14 = 0;
  v3 = (int)v2->m_apkChoiceNickTextWin;
  v4 = 7;
  do
  {
    (*(void (__stdcall **)(void *))(**(_DWORD **)v3 + 472))(&unk_985CB6);
    v3 += 4;
    --v4;
  }
  while ( v4 );
  v5 = CCharacterTitleData::GetTitleString(
         &g_characterTitleData,
         v2->ms_ctWinListInfo[nIndex].Type,
         *((_BYTE *)&v2->ms_ctWinListInfo[nIndex] + 1) & 0x3F);
  if ( !strcmp(g_pkMainChar->m_CharTitleName, v5) )
  {
    v6 = ViewList._Myfirst;
  }
  else
  {
    v7 = v2->m_apkChoiceNickTextWin[0]->vfptr;
    v8 = (char *)TextData2::Get(0xDAD4E331);
    v9 = fs(v8, v5);
    v7[118].__vecDelDtor((NiRefObject *)v2->m_apkChoiceNickTextWin[0], (unsigned int)v9);
    v6 = ViewList._Myfirst;
    if ( v2->ms_ctWinListInfo[nIndex].Type != 10 && ViewList._Myfirst != ViewList._Mylast )
    {
      v10 = 0;
      if ( ViewList._Mylast - ViewList._Myfirst )
      {
        v11 = -2580 - (_DWORD)v2;
        v12 = (int)&v2->m_apkChoiceNickTextWin[1];
        while ( 1 )
        {
          (*(void (__stdcall **)(char *))(**(_DWORD **)v12 + 472))((*(CharacterTitleStateView **)((char *)v6 + v12 + v11))->Descript);
          v6 = ViewList._Myfirst;
          ++v10;
          v12 += 4;
          if ( v10 >= ViewList._Mylast - ViewList._Myfirst )
            break;
          v11 = -2580 - (_DWORD)v2;
        }
      }
    }
  }
  if ( v6 )
    operator delete(v6);
}

//----- (004E35E0) --------------------------------------------------------
void __thiscall CharTitleWin::SetCurTitleInfo(CharTitleWin *this, CharTitleWin::CTWIN_LIST_INFO *pInfo)
{
  char *v2; // esi@2
  signed int v3; // ebx@2
  char v4; // al@4
  char v5; // ST08_1@4
  char *v6; // eax@4
  int v7; // ebx@5
  NiRefObjectVtbl *v8; // esi@5
  char *v9; // ST08_4@5
  char *v10; // eax@5
  char *v11; // eax@5
  CharacterTitleStateView **v12; // eax@7
  unsigned int v13; // edi@7
  int v14; // edx@8
  int v15; // esi@8
  std::vector<CharacterTitleStateView *,std::allocator<CharacterTitleStateView *> > ViewList; // [sp+10h] [bp-20h]@4
  CharTitleWin *v17; // [sp+20h] [bp-10h]@1
  int v18; // [sp+2Ch] [bp-4h]@4

  v17 = this;
  if ( pInfo )
  {
    v2 = (char *)this->m_apkCurrentNickTextWin;
    v3 = 7;
    do
    {
      (*(void (__stdcall **)(void *))(**(_DWORD **)v2 + 472))(&unk_985CB7);
      v2 += 4;
      --v3;
    }
    while ( v3 );
    CharacterTitleStateViewTab::GetByTypeAndLevel(&ViewList, pInfo->Type, *((_BYTE *)pInfo + 1) & 0x3F);
    v4 = pInfo->Type;
    v5 = *((_BYTE *)pInfo + 1) & 0x3F;
    v18 = 0;
    v6 = CCharacterTitleData::GetTitleString(&g_characterTitleData, v4, v5);
    if ( v6
      && (v7 = (int)v17,
          v8 = v17->m_apkCurrentNickTextWin[0]->vfptr,
          v9 = v6,
          v10 = (char *)TextData2::Get(0xE1DB2D44),
          v11 = fs(v10, v9),
          v8[118].__vecDelDtor(*(NiRefObject **)(v7 + 2548), (unsigned int)v11),
          pInfo->Type)
      && pInfo->Type != 10 )
    {
      v12 = ViewList._Myfirst;
      v13 = 0;
      if ( ViewList._Mylast - ViewList._Myfirst )
      {
        v14 = -2552 - v7;
        v15 = v7 + 2552;
        while ( 1 )
        {
          (*(void (__stdcall **)(char *))(**(_DWORD **)v15 + 472))((*(CharacterTitleStateView **)((char *)v12 + v15 + v14))->Descript);
          v12 = ViewList._Myfirst;
          ++v13;
          v15 += 4;
          if ( v13 >= ViewList._Mylast - ViewList._Myfirst )
            break;
          v14 = -2552 - v7;
        }
      }
    }
    else
    {
      v12 = ViewList._Myfirst;
    }
    if ( v12 )
      operator delete(v12);
  }
}

//----- (004E3730) --------------------------------------------------------
void __thiscall CharTitleWin::OnCommand(CharTitleWin *this, unsigned int wParam, int lParam)
{
  unsigned int v3; // eax@5

  switch ( wParam )
  {
    case 0xAu:
      CharTitleWin::OnOK(this);
      break;
    case 0xBu:
      CharTitleWin::OnSlideBarContent(this);
      break;
    case 0xCu:
      CharTitleWin::OnListClick(this, lParam);
      break;
    case 0xDu:
      v3 = this->m_uiCurPage;
      if ( v3 )
        this->m_uiCurPage = v3 - 1;
      break;
    case 0xEu:
      ++this->m_uiCurPage;
      break;
    case 0xFu:
      CharTitleWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (004E37B0) --------------------------------------------------------
char __thiscall CharTitleWin::Create(CharTitleWin *this, PgFrameWork *pkFrameWork)
{
  CharTitleWin *v2; // esi@1
  NiNode *v3; // esi@2
  bool v4; // zf@4
  char result; // al@7
  NiTexturePalette *v6; // ebx@8
  const char *v7; // eax@10
  PgSprData *v8; // eax@11
  NiNode *v9; // esi@12
  int v10; // edi@17
  int v11; // ebx@17
  NiSourceTexture *v12; // eax@17
  PgSprData *v13; // eax@18
  PgSprData *v14; // eax@22
  PgWinSpr *v15; // eax@22
  PgSprData *v16; // eax@22
  PgSprData *v17; // eax@22
  PgFont *v18; // eax@22
  NiSourceTexture *v19; // eax@24
  PgWinText *v20; // ecx@24
  NiRefObjectVtbl *v21; // edx@24
  unsigned int v22; // eax@24
  NiRefObjectVtbl *v23; // edx@24
  PgWinText *v24; // eax@25
  PgSprData *v25; // eax@26
  PgWinText *v26; // eax@26
  NiRefObjectVtbl *v27; // edx@26
  unsigned int v28; // eax@26
  NiRefObjectVtbl *v29; // edx@26
  PgWinText *v30; // eax@27
  PgFont *v31; // eax@32
  PgWinText *v32; // eax@32
  NiRefObjectVtbl *v33; // edx@32
  NiUnsharedGeometryGroup *v34; // eax@32
  PgFont *v35; // eax@33
  PgWinText *v36; // eax@33
  NiRefObjectVtbl *v37; // edx@33
  NiUnsharedGeometryGroup *v38; // eax@33
  SLWCreateInfo::Item *v39; // eax@33
  PgSprData *v40; // eax@41
  SlideListWin *v41; // eax@41
  PgWinText *v42; // eax@41
  NiRefObjectVtbl *v43; // edx@41
  NiObjectNET *v44; // eax@41
  NiObjectNET *v45; // eax@41
  NiObjectNET *v46; // eax@41
  NiObjectNET *v47; // eax@41
  NiObjectNET *v48; // eax@41
  NiObjectNET *v49; // eax@41
  SlideBar *v50; // eax@41
  PgFont *v51; // eax@41
  NiSourceTexture *v52; // ecx@41
  int (*v53)(void); // eax@41
  int v54; // eax@41
  int v55; // eax@41
  NiNode *v56; // esi@43
  SLWCreateInfo kCreateInfo; // [sp+84h] [bp-78h]@33
  unsigned int uiWidth; // [sp+A0h] [bp-5Ch]@28
  unsigned int uiHeight; // [sp+A4h] [bp-58h]@28
  unsigned int uiEdgeWidth; // [sp+A8h] [bp-54h]@24
  PgFont *pkFont; // [sp+ACh] [bp-50h]@22
  int i; // [sp+B0h] [bp-4Ch]@24
  NiSourceTexture *pkTexture; // [sp+B4h] [bp-48h]@1
  NiSourceTexture *pkTexture8; // [sp+B8h] [bp-44h]@20
  SLWCreateInfo::Item *pCIItem; // [sp+BCh] [bp-40h]@24
  int uiTop; // [sp+C0h] [bp-3Ch]@11
  int uiLeft; // [sp+C4h] [bp-38h]@11
  PgWinText *pkTextWin; // [sp+C8h] [bp-34h]@20
  NiPointer<NiNode> spNode; // [sp+CCh] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+D0h] [bp-2Ch]@33
  int v71; // [sp+F8h] [bp-4h]@1

  v2 = this;
  this->m_pkFrameWork = pkFrameWork;
  spNode.m_pObject = 0;
  v71 = 0;
  pkTexture = MenuTexMgr::GetTexture(4u);
  if ( !pkTexture )
  {
    v3 = spNode.m_pObject;
    v71 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v4 = spNode.m_pObject == 0;
LABEL_5:
    if ( !v4 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    return 0;
  }
  v6 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v7 = Folder::Merge(&Folder::m_acMenu, "Game\\CharTitle.nif");
  PgUtil::LoadNodeNifFile(v7, &spNode, v6);
  if ( !spNode.m_pObject )
    return 0;
  v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane01", &uiLeft, &uiTop, 0);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v8, 0, pkFrameWork, "CharTitleWin", 0) )
  {
    v10 = uiLeft;
    v11 = uiTop;
    v12 = MenuTexMgr::GetTexture(0x13u);
    if ( v12 )
      v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v12);
    else
      v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v10, uiTop - v11, v13, (PgWin *)&v2->vfptr, 0, 0);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "ClsNor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
    PgWinCloseBut::CreateWin(uiLeft - v10, uiTop - v11, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr);
    pkTexture8 = MenuTexMgr::GetTexture(4u);
    if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
    {
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "HelpLinkNor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture8);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
      PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xFu, 0, 0);
    }
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
    v15 = PgWinSpr::CreateWin(uiLeft - v10, uiTop - v11, v14, (PgWin *)&v2->vfptr, 0, 0);
    v15->vfptr[60].__vecDelDtor((NiRefObject *)v15, 0);
    v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, pkTexture);
    PgWinSpr::CreateWin(uiLeft - v10, uiTop - v11, v16, (PgWin *)&v2->vfptr, 0, 0);
    v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel03", &uiLeft, &uiTop, pkTexture);
    pkTextWin = (PgWinText *)PgWinSpr::CreateWin(uiLeft - v10, uiTop - v11, v17, (PgWin *)&v2->vfptr, 0, 0);
    v18 = Font::Get(0);
    pkFont = v18;
    if ( v18 )
    {
      v19 = (NiSourceTexture *)v18->m_uiDefHeight;
      v20 = pkTextWin;
      v2->m_uiFontHeight = (unsigned int)v19;
      v21 = v20->vfptr;
      pkTexture8 = v19;
      v22 = ((int (*)(void))v21[36].__vecDelDtor)();
      v23 = pkTextWin->vfptr;
      uiEdgeWidth = v22;
      ((void (*)(void))v23[37].__vecDelDtor)();
      i = 0;
      pkTexture8 = (NiSourceTexture *)(2 * (_DWORD)pkTexture8);
      pCIItem = (SLWCreateInfo::Item *)v2->m_apkCurrentNickTextWin;
      do
      {
        v24 = PgWinText::CreateWin(
                (int)pkTexture8,
                i * (v2->m_uiFontHeight + 8) + 5,
                uiEdgeWidth,
                v2->m_uiFontHeight + 8,
                pkFont,
                (PgWin *)&pkTextWin->vfptr,
                0,
                0);
        pCIItem->nItemType = (int)v24;
        v24->vfptr[122].__vecDelDtor((NiRefObject *)v24, 4u);
        (*(void (__stdcall **)(_DWORD))(*(_DWORD *)pCIItem->nItemType + 240))(0);
        (*(void (__stdcall **)(void *))(*(_DWORD *)pCIItem->nItemType + 472))(&unk_985C97);
        pCIItem = (SLWCreateInfo::Item *)((char *)pCIItem + 4);
        ++i;
      }
      while ( i < 7 );
      ((void (__stdcall *)(D3DXCOLOR *))v2->m_apkCurrentNickTextWin[0]->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
      ((void (__stdcall *)(char *))v2->m_apkCurrentNickTextWin[0]->vfptr[118].__vecDelDtor)(g_pkMainChar->m_CharTitleName);
      v25 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel04", &uiLeft, &uiTop, pkTexture);
      v26 = (PgWinText *)PgWinSpr::CreateWin(uiLeft - v10, uiTop - v11, v25, (PgWin *)&v2->vfptr, 0, 0);
      v27 = v26->vfptr;
      pkTextWin = v26;
      v28 = ((int (__thiscall *)(PgWinText *))v27[36].__vecDelDtor)(v26);
      v29 = pkTextWin->vfptr;
      uiEdgeWidth = v28;
      ((void (*)(void))v29[37].__vecDelDtor)();
      i = 0;
      pCIItem = (SLWCreateInfo::Item *)v2->m_apkChoiceNickTextWin;
      do
      {
        v30 = PgWinText::CreateWin(
                (int)pkTexture8,
                i * (v2->m_uiFontHeight + 8) + 5,
                uiEdgeWidth,
                v2->m_uiFontHeight + 8,
                pkFont,
                (PgWin *)&pkTextWin->vfptr,
                0,
                0);
        pCIItem->nItemType = (int)v30;
        v30->vfptr[122].__vecDelDtor((NiRefObject *)v30, 4u);
        (*(void (__stdcall **)(_DWORD))(*(_DWORD *)pCIItem->nItemType + 240))(0);
        (*(void (__stdcall **)(void *))(*(_DWORD *)pCIItem->nItemType + 472))(&unk_985CAD);
        pCIItem = (SLWCreateInfo::Item *)((char *)pCIItem + 4);
        ++i;
      }
      while ( i < 7 );
      ((void (__stdcall *)(D3DXCOLOR *))v2->m_apkChoiceNickTextWin[0]->vfptr[117].__vecDelDtor)(&Color::m_kDxGreenColor);
      if ( !PgUtil::GetTriShapeRect(
              (NiAVObject *)&spNode.m_pObject->vfptr,
              "WinTitle",
              &uiLeft,
              &uiTop,
              &uiWidth,
              &uiHeight)
        || (v31 = Font::Get(MAIN_MENU),
            v32 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v31, (PgWin *)&v2->vfptr, 0, 0),
            v33 = v32->vfptr,
            pkTextWin = v32,
            v33[122].__vecDelDtor((NiRefObject *)v32, 5u),
            ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
            pkTexture8 = (NiSourceTexture *)&pkTextWin->vfptr[118],
            v34 = TextData::Get(0x68A182C6u),
            ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkTexture8->vfptr)(pkTextWin, v34),
            ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0),
            !PgUtil::GetTriShapeRect(
               (NiAVObject *)&spNode.m_pObject->vfptr,
               "OkNor",
               &uiLeft,
               &uiTop,
               &uiWidth,
               &uiHeight)) )
      {
        v3 = spNode.m_pObject;
        v71 = -1;
        if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
          return 0;
        v4 = v3 == 0;
        goto LABEL_5;
      }
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "OkNor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "OkClick");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "OkOver");
      PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xAu, 0, 0);
      v35 = Font::Get(MAIN_MENU);
      v36 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v35, (PgWin *)&v2->vfptr, 0, 0);
      v37 = v36->vfptr;
      pkTextWin = v36;
      v37[122].__vecDelDtor((NiRefObject *)v36, 5u);
      ((void (__stdcall *)(D3DXCOLOR *))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
      pkTexture8 = (NiSourceTexture *)&pkTextWin->vfptr[118];
      v38 = TextData::Get(0xA5FAD5ED);
      ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkTexture8->vfptr)(pkTextWin, v38);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      kCreateInfo.m_arrItem._Myfirst = 0;
      kCreateInfo.m_arrItem._Mylast = 0;
      kCreateInfo.m_arrItem._Myend = 0;
      kCreateInfo.m_bMakeData = 0;
      kCreateInfo.m_nOffX = 0;
      kCreateInfo.m_nOffY = 0;
      LOBYTE(v71) = 1;
      v39 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
      v39->nItemType = 1;
      v39->pNode = spNode.m_pObject;
      pCIItem = v39;
      _Val._Myres = 15;
      _Val._Mysize = 0;
      _Val._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarNor", 0xCu);
      LOBYTE(v71) = 2;
      pkTexture8 = (NiSourceTexture *)&pCIItem->vecNodeName;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        &pCIItem->vecNodeName,
        &_Val);
      LOBYTE(v71) = 1;
      if ( _Val._Myres >= 0x10 )
        operator delete(_Val._Bx._Ptr);
      _Val._Myres = 15;
      _Val._Mysize = 0;
      _Val._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarClick", 0xEu);
      LOBYTE(v71) = 3;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkTexture8,
        &_Val);
      LOBYTE(v71) = 1;
      if ( _Val._Myres >= 0x10 )
        operator delete(_Val._Bx._Ptr);
      _Val._Myres = 15;
      _Val._Mysize = 0;
      _Val._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarOver", 0xDu);
      LOBYTE(v71) = 4;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkTexture8,
        &_Val);
      LOBYTE(v71) = 1;
      if ( _Val._Myres >= 0x10 )
        operator delete(_Val._Bx._Ptr);
      pCIItem = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pCIItem->nItemType = 2;
      _Val._Myres = 15;
      _Val._Mysize = 0;
      _Val._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column01", 8u);
      LOBYTE(v71) = 5;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        &pCIItem->vecNodeName,
        &_Val);
      LOBYTE(v71) = 1;
      if ( _Val._Myres >= 0x10 )
        operator delete(_Val._Bx._Ptr);
      pCIItem->pNode = spNode.m_pObject;
      _Val._Myres = 15;
      _Val._Mysize = 0;
      _Val._Bx._Buf[0] = 0;
      SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
      v40 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ColumnBox", &uiLeft, &uiTop, pkTexture);
      v41 = SlideListWin::CreateWin(uiLeft - v10, uiTop - v11, v40, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
      v2->m_pListWin = v41;
      v41->m_uiLClickMsg = 12;
      SlideListWin::UpdateViewList(v2->m_pListWin);
      v42 = (PgWinText *)PgSprData::Create(
                           (NiAVObject *)&spNode.m_pObject->vfptr,
                           "SlideBar_SlideBtnMiddle",
                           &uiLeft,
                           &uiTop,
                           pkTexture);
      v43 = spNode.m_pObject->vfptr;
      pkTextWin = v42;
      v44 = (NiObjectNET *)((int (__stdcall *)(const char *))v43[18].__vecDelDtor)("SlideBar_DnBtnNor");
      NiObjectNET::SetName(v44, "SlideBar_DnBtnNor");
      v45 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnClick");
      NiObjectNET::SetName(v45, "SlideBar_DnBtnClick");
      v46 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnOver");
      NiObjectNET::SetName(v46, "SlideBar_DnBtnOver");
      v47 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnNor");
      NiObjectNET::SetName(v47, "SlideBar_UpBtnNor");
      v48 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnClick");
      NiObjectNET::SetName(v48, "SlideBar_UpBtnClick");
      v49 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnOver");
      NiObjectNET::SetName(v49, "SlideBar_UpBtnOver");
      v50 = SlideBar::CreateWin(
              spNode.m_pObject,
              "SlideBar",
              "SlideBar_UpBtn",
              "SlideBar_DnBtn",
              (PgSprData *)pkTextWin,
              0,
              (PgWin *)&v2->vfptr);
      v2->m_pSlideBarEx = v50;
      v50->m_uiClickMsg = 11;
      v2->m_pSlideBarEx->m_eType = 1;
      v51 = (PgFont *)v2->m_pSlideBarEx->vfptr;
      v52 = (NiSourceTexture *)v2->m_pSlideBarEx;
      pkFont = v51;
      v53 = (int (*)(void))v51->m_kBucketBuffer.m_kFontHash.m_uiHashSize;
      pkTexture8 = v52;
      v54 = v53();
      v55 = ((int (__stdcall *)(int))pkTexture8->vfptr[41].__vecDelDtor)(v54 - 10);
      (*(void (__thiscall **)(SlideBar *, int))&pkFont->m_acColorToken[52])(v2->m_pSlideBarEx, v55 - 6);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "PrePageNor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "PrePageClick");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "PrePageOver");
      PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xDu, 0, 0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "NextPageNor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "NextPageClick");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "NextPageOver");
      PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xEu, 0, 0);
      ((void (__thiscall *)(CharTitleWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
        v2,
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        0.5,
        0.5);
      CharTitleWin::UpdateViewList(v2);
      LOBYTE(v71) = 0;
      if ( kCreateInfo.m_arrItem._Myfirst )
      {
        std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(
          kCreateInfo.m_arrItem._Myfirst,
          kCreateInfo.m_arrItem._Mylast);
        operator delete(kCreateInfo.m_arrItem._Myfirst);
      }
      v56 = spNode.m_pObject;
      kCreateInfo.m_arrItem._Myfirst = 0;
      kCreateInfo.m_arrItem._Mylast = 0;
      kCreateInfo.m_arrItem._Myend = 0;
      v71 = -1;
      if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v56 )
        v56->vfptr->__vecDelDtor((NiRefObject *)v56, 1u);
      result = 1;
    }
    else
    {
      v71 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 0;
    }
  }
  else
  {
    v9 = spNode.m_pObject;
    v71 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v9 )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004E4320) --------------------------------------------------------
CharTitleWin *__thiscall CharTitleWin::`scalar deleting destructor'(CharTitleWin *this, unsigned int a2)
{
  CharTitleWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&CharTitleWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CharTitleWin::`vftable'{for `IDirectMessenger'};
  CDataReader::~CDataReader(&this->pCharTitleData.m_CharacterTitleData);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 985F40: using guessed type void (__thiscall *CharTitleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 985F5C: using guessed type int (__thiscall *CharTitleWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004E43A0) --------------------------------------------------------
unsigned int __cdecl ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C1D4: using guessed type int ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::ms_pkTable;

//----- (004E43C0) --------------------------------------------------------
std::vector<CharacterTitleStateView *,std::allocator<CharacterTitleStateView *> > *__cdecl CharacterTitleStateViewTab::GetByTypeAndLevel(std::vector<CharacterTitleStateView *,std::allocator<CharacterTitleStateView *> > *result, unsigned int uiType, char Level)
{
  unsigned int v3; // ebx@1
  CharacterTitleStateView *v4; // edi@2
  CharacterTitleStateView **v5; // eax@4
  signed int v6; // edi@6
  CharacterTitleStateView **v7; // eax@8
  CharacterTitleStateView **v8; // eax@12
  CharacterTitleStateView *pkTSView; // [sp+14h] [bp-10h]@2
  int v11; // [sp+20h] [bp-4h]@1

  v3 = 0;
  result->_Myfirst = 0;
  result->_Mylast = 0;
  result->_Myend = 0;
  v11 = 0;
  if ( ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::GetTotal() )
  {
    do
    {
      v4 = (CharacterTitleStateView *)CDataReader::GetRecord(
                                        (CDataReader *)(ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::ms_pkTable
                                                      + 4),
                                        v3);
      pkTSView = v4;
      if ( v4->Type == uiType && v4->TitleLV == Level )
      {
        v5 = result->_Mylast;
        if ( &pkTSView >= v5 || result->_Myfirst > &pkTSView )
        {
          if ( v5 == result->_Myend )
            std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
              (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)result,
              1u);
          v8 = result->_Mylast;
          if ( v8 )
            *v8 = v4;
        }
        else
        {
          v6 = &pkTSView - result->_Myfirst;
          if ( v5 == result->_Myend )
            std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
              (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)result,
              1u);
          v7 = result->_Mylast;
          if ( v7 )
            *v7 = result->_Myfirst[v6];
        }
        ++result->_Mylast;
      }
      ++v3;
    }
    while ( v3 < ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::GetTotal() );
  }
  return result;
}
// A8C1D4: using guessed type int ITableBase<CharacterTitleStateView,CharacterTitleStateViewTab>::ms_pkTable;

//----- (004E44B0) --------------------------------------------------------
void __thiscall ChatBlockListWin::ChatBlockListWin(ChatBlockListWin *this)
{
  ChatBlockListWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ChatBlockListWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ChatBlockListWin::`vftable'{for `IDirectMessenger'};
  CChatRestrict::CChatRestrict(&v1->m_RestrictList);
  v1->m_pkSlideBarEx = 0;
  v1->m_pBlockList = 0;
  v1->m_bAllDelete = 0;
}
// 9862F0: using guessed type void (__thiscall *ChatBlockListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98630C: using guessed type int (__thiscall *ChatBlockListWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004E4530) --------------------------------------------------------
void __thiscall ChatBlockListWin::~ChatBlockListWin(ChatBlockListWin *this)
{
  ChatBlockListWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ChatBlockListWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ChatBlockListWin::`vftable'{for `IDirectMessenger'};
  CChatRestrict::~CChatRestrict(&this->m_RestrictList);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9862F0: using guessed type void (__thiscall *ChatBlockListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98630C: using guessed type int (__thiscall *ChatBlockListWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004E45A0) --------------------------------------------------------
void __thiscall ChatBlockListWin::CloseWin(ChatBlockListWin *this)
{
  ChatBlockListWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->vfptr[60].__vecDelDtor)(0);
  GameFrameWork::CloseChatBlockListWin((GameFrameWork *)v1->m_pkFrameWork);
}

//----- (004E45C0) --------------------------------------------------------
void __thiscall ChatBlockListWin::OpenWin(ChatBlockListWin *this)
{
  ChatBlockListWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->vfptr[60].__vecDelDtor)(1);
  GameFrameWork::OpenChatBlockListWin((GameFrameWork *)v1->m_pkFrameWork);
}

//----- (004E45E0) --------------------------------------------------------
void __thiscall ChatBlockListWin::UpdateMeWin(ChatBlockListWin *this, float fCurTime)
{
  ChatBlockListWin *v2; // esi@1

  v2 = this;
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
    GameFrameWork::UpdateUIScroll(v2->m_pBlockList, v2->m_pkSlideBarEx);
}

//----- (004E4610) --------------------------------------------------------
void __thiscall ChatBlockListWin::ChangeUserName(ChatBlockListWin *this, Name5 *OldName, Name5 *NewName)
{
  PROTO_CHAT_RESTRICT_INFO *v3; // eax@1

  v3 = CChatRestrict::Get(&this->m_RestrictList, OldName);
  if ( v3 )
  {
    *(_QWORD *)&v3->sCharID.n5_name[0] = *(_QWORD *)&NewName->n5_code[0];
    *(_QWORD *)&v3->sCharID.n5_code[2] = *(_QWORD *)&NewName->n5_code[2];
    v3->sCharID.n5_code[4] = NewName->n5_code[4];
  }
}

//----- (004E4650) --------------------------------------------------------
void __thiscall ChatBlockListWin::OnAllDeleteBtn(ChatBlockListWin *this)
{
  ChatBlockListWin *v1; // esi@1
  char *v2; // eax@2
  MsgBox *v3; // eax@2

  v1 = this;
  if ( this->m_RestrictList.m_NumOfChatRestrict )
  {
    v2 = (char *)TextData2::Get(0x2E100D5Fu);
    v3 = MsgBox::Modal(MSGBOX_OKCANCEL, v2);
    ((void (__stdcall *)(_DWORD))v3->vfptr->SetMsgHooker)(&v1->vfptr);
    v1->m_bAllDelete = 1;
  }
}

//----- (004E4690) --------------------------------------------------------
ChatBlockListWin *__cdecl ChatBlockListWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  ChatBlockListWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0xA04u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    LOBYTE(v6) = 1;
    v2->vfptr = (NiRefObjectVtbl *)&ChatBlockListWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&ChatBlockListWin::`vftable'{for `IDirectMessenger'};
    CChatRestrict::CChatRestrict((CChatRestrict *)&v2[1].m_kLocal.m_Rotate.m_pEntry[1][2]);
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
    LOBYTE(v2[1].m_kLocal.m_Rotate.m_pEntry[1][1]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (ChatBlockListWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9862F0: using guessed type void (__thiscall *ChatBlockListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98630C: using guessed type int (__thiscall *ChatBlockListWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004E47F0) --------------------------------------------------------
void __thiscall ChatBlockListWin::UpdateList(ChatBlockListWin *this)
{
  ChatBlockListWin *v1; // ebx@1
  char *v2; // esi@2
  int v3; // ecx@3
  int v4; // edx@3
  int v5; // eax@3
  int v6; // ecx@3
  _BYTE *v7; // eax@3
  NiUnsharedGeometryGroup *v8; // eax@6
  const char *v9; // eax@6
  const char *v10; // eax@9
  int i; // [sp+10h] [bp-48h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strText; // [sp+14h] [bp-44h]@1
  char acname[21]; // [sp+30h] [bp-28h]@3
  int v14; // [sp+54h] [bp-4h]@1

  v1 = this;
  strText._Myres = 15;
  strText._Mysize = 0;
  strText._Bx._Buf[0] = 0;
  v14 = 0;
  i = 0;
  if ( this->m_RestrictList.m_NumOfChatRestrict > 0 )
  {
    v2 = &this->m_RestrictList.m_ChatRestrict[0].sCharID.n5_name[8];
    do
    {
      v3 = *((_DWORD *)v2 - 1);
      v4 = *(_DWORD *)v2;
      *(_DWORD *)acname = *((_DWORD *)v2 - 2);
      v5 = *((_DWORD *)v2 + 1);
      *(_DWORD *)&acname[4] = v3;
      v6 = *((_DWORD *)v2 + 2);
      *(_DWORD *)&acname[12] = v5;
      v7 = strText._Bx._Ptr;
      *(_DWORD *)&acname[8] = v4;
      *(_DWORD *)&acname[16] = v6;
      acname[20] = 0;
      strText._Mysize = 0;
      if ( strText._Myres < 0x10 )
        v7 = &strText;
      *v7 = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, acname, strlen(acname));
      if ( v2[13] == 1 )
      {
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, 1u, 32);
        v8 = TextData2::Get(0xE24476Cu);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
          &strText,
          (const char *)v8,
          strlen((const char *)v8));
        v9 = strText._Bx._Ptr;
        if ( strText._Myres < 0x10 )
          v9 = (const char *)&strText;
        SlideListWin::AddText(v1->m_pBlockList, v9);
        SlideListWin::SetFontColor(v1->m_pBlockList, i, 0, 128, 128, 128);
      }
      else
      {
        v10 = strText._Bx._Ptr;
        if ( strText._Myres < 0x10 )
          v10 = (const char *)&strText;
        SlideListWin::AddText(v1->m_pBlockList, v10);
      }
      v2 += 22;
      ++i;
    }
    while ( i < v1->m_RestrictList.m_NumOfChatRestrict );
  }
  SlideListWin::Sort(v1->m_pBlockList, 0, 0, 0);
  SlideListWin::UpdateViewList(v1->m_pBlockList);
  if ( strText._Myres >= 0x10 )
    operator delete(strText._Bx._Ptr);
}

//----- (004E4990) --------------------------------------------------------
void __thiscall ChatBlockListWin::OnSelectDeleteBtn(ChatBlockListWin *this)
{
  ChatBlockListWin *v1; // esi@1
  signed int v2; // eax@1
  char *v3; // esi@2
  unsigned int v4; // eax@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v5; // eax@4
  char *v6; // eax@6
  _BYTE v7[20]; // ST00_20@8
  ChatBlockListWin *v8; // [sp+10h] [bp-80h]@1
  char _Ptr; // [sp+14h] [bp-7Ch]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+18h] [bp-78h]@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strText; // [sp+34h] [bp-5Ch]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strID; // [sp+50h] [bp-40h]@2
  Name5 kCharID; // [sp+6Ch] [bp-24h]@8
  int v14; // [sp+8Ch] [bp-4h]@2

  v1 = this;
  v8 = this;
  v2 = SlideListWin::GetCurSelIndex(this->m_pBlockList);
  if ( v2 >= 0 )
  {
    v3 = SlideListWin::GetText(v1->m_pBlockList, v2, 0);
    strText._Myres = 15;
    strText._Mysize = 0;
    strText._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strText, v3, strlen(v3));
    v14 = 0;
    strID._Myres = 15;
    LOBYTE(v14) = 1;
    strID._Mysize = 0;
    strID._Bx._Buf[0] = 0;
    _Ptr = 40;
    v4 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::find(&strText, &_Ptr, 0, 1u);
    if ( v4 == -1 )
    {
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strID, &strText, 0, 0xFFFFFFFF);
    }
    else
    {
      v5 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(&strText, &result, 0, v4 - 1);
      LOBYTE(v14) = 2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strID, v5);
      LOBYTE(v14) = 1;
      if ( result._Myres >= 0x10 )
        operator delete(result._Bx._Ptr);
    }
    v6 = strID._Bx._Ptr;
    if ( strID._Myres < 0x10 )
      v6 = (char *)&strID;
    *(_QWORD *)&kCharID.n5_code[3] = 0i64;
    *(_QWORD *)&kCharID.n5_code[1] = 0i64;
    *(_QWORD *)&kCharID.n5_name[0] = 0i64;
    strncpy(kCharID.n5_name, v6, 0x14u);
    *(_QWORD *)v7 = *(_QWORD *)&kCharID.n5_name[0];
    *(_QWORD *)&v7[8] = *(_QWORD *)&kCharID.n5_code[2];
    *(_DWORD *)&v7[16] = kCharID.n5_code[4];
    GameFrameWork::NcChatRestrictBlockDelReq((GameFrameWork *)v8->m_pkFrameWork, *(Name5 *)v7);
    if ( strID._Myres >= 0x10 )
      operator delete(strID._Bx._Ptr);
    strID._Myres = 15;
    strID._Mysize = 0;
    strID._Bx._Buf[0] = 0;
    if ( strText._Myres >= 0x10 )
      operator delete(strText._Bx._Ptr);
  }
}

//----- (004E4B20) --------------------------------------------------------
void __thiscall ChatBlockListWin::UpdateViewList(ChatBlockListWin *this)
{
  ChatBlockListWin *v1; // esi@1
  SlideListWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_pBlockList;
  if ( v2 )
  {
    SlideListWin::RemoveAllList(v2);
    ChatBlockListWin::UpdateList(v1);
    SlideBar::SetSplitCnt(v1->m_pkSlideBarEx, v1->m_pBlockList->m_nSlideSplitCnt);
  }
}

//----- (004E4B60) --------------------------------------------------------
void __thiscall ChatBlockListWin::DirectMessage(ChatBlockListWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  ChatBlockListWin *v4; // esi@1

  v4 = this;
  if ( LODWORD(this->m_kWorld.m_Rotate.m_pEntry[1][0]) )
  {
    if ( iMsgTag == 27 && pvBody )
    {
      if ( !*(_DWORD *)pvBody && LOBYTE(this->m_kWorld.m_Rotate.m_pEntry[1][2]) )
      {
        GameFrameWork::NcChatRestrictDelAll((GameFrameWork *)LODWORD(this->m_kLocal.m_Rotate.m_pEntry[1][0]));
        ChatBlockListWin::UpdateViewList((ChatBlockListWin *)((char *)v4 - 232));
        LOBYTE(v4->m_kWorld.m_Rotate.m_pEntry[1][2]) = 0;
      }
      if ( *(_DWORD *)pvBody == 1 )
        LOBYTE(v4->m_kWorld.m_Rotate.m_pEntry[1][2]) = 0;
    }
    LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[1][1]) = SlideListWin::GetCurSelIndex((SlideListWin *)LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[1][0]));
  }
}

//----- (004E4BC0) --------------------------------------------------------
char __thiscall ChatBlockListWin::Create(ChatBlockListWin *this, PgFrameWork *pkFrameWork)
{
  ChatBlockListWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiAVObject *v5; // eax@4
  NiTexturingProperty *v6; // eax@4
  NiTexturingProperty *v7; // edi@4
  NiTexturingProperty::Map *v8; // eax@6
  NiSourceTexture *v9; // eax@7
  NiNode *v10; // esi@10
  char result; // al@14
  PgSprData *v12; // eax@15
  NiNode *v13; // esi@18
  int v14; // edi@22
  int v15; // ebx@22
  NiSourceTexture *v16; // eax@22
  PgSprData *v17; // eax@23
  PgFont *v18; // eax@27
  PgWinText *v19; // eax@27
  NiRefObjectVtbl *v20; // edx@27
  NiUnsharedGeometryGroup *v21; // eax@27
  PgSprData *v22; // eax@29
  SLWCreateInfo::Item *v23; // eax@29
  PgWinText *v24; // eax@29
  PgSprData *v25; // eax@29
  SlideListWin *v26; // eax@29
  PgSprData *v27; // eax@29
  SlideBar *v28; // eax@29
  NiSourceTexture *v29; // ecx@29
  int (*v30)(void); // edx@29
  int v31; // eax@29
  int v32; // eax@29
  PgWinBut *v33; // edi@29
  D3DXCOLOR v34; // ST1C_16@29
  char *v35; // eax@29
  PgWinBut *v36; // edi@29
  D3DXCOLOR v37; // ST1C_16@29
  char *v38; // eax@29
  UIUtil ui; // [sp+34h] [bp-80h]@29
  SLWCreateInfo kCreateInfo; // [sp+48h] [bp-6Ch]@29
  unsigned int uiWidth; // [sp+64h] [bp-50h]@25
  unsigned int uiHeight; // [sp+68h] [bp-4Ch]@25
  NiPointer<NiTexturingProperty> spTexProp; // [sp+6Ch] [bp-48h]@4
  NiSourceTexture *pkTexture; // [sp+70h] [bp-44h]@7
  NiSourceTexture *pkTexture8; // [sp+74h] [bp-40h]@27
  PgWinText *pkTextWin; // [sp+78h] [bp-3Ch]@27
  int uiLeft; // [sp+7Ch] [bp-38h]@15
  int uiTop; // [sp+80h] [bp-34h]@15
  NiPointer<NiNode> spNode; // [sp+84h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+88h] [bp-2Ch]@29
  int v51; // [sp+B0h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  this->m_pkFrameWork = pkFrameWork;
  v3 = pTexturePalette;
  v51 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\ChatBlockList.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Frame");
  v6 = (NiTexturingProperty *)NiAVObject::GetProperty(v5, 8);
  v7 = v6;
  spTexProp.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v8 = *v7->m_kMaps.m_pBase;
  LOBYTE(v51) = 1;
  if ( !v8 || (v9 = (NiSourceTexture *)v8->m_spTexture.m_pObject, (pkTexture = v9) == 0) )
  {
    LOBYTE(v51) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v10 = spNode.m_pObject;
    v51 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
    return 0;
  }
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v9);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v12, 0, pkFrameWork, "BlockListWin", 0) )
  {
    v14 = uiLeft;
    v15 = uiTop;
    v16 = MenuTexMgr::GetTexture(0x13u);
    if ( v16 )
      v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v16);
    else
      v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v17, (PgWin *)&v2->vfptr, 0, 0);
    if ( PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "WinTitle",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight) )
    {
      v18 = Font::Get(MAIN_MENU);
      v19 = PgWinText::CreateWin(uiLeft - v14, uiTop - v15, uiWidth, uiHeight, v18, (PgWin *)&v2->vfptr, 0, 0);
      v20 = v19->vfptr;
      pkTextWin = v19;
      v20[122].__vecDelDtor((NiRefObject *)v19, 1u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v21 = TextData2::Get(0x353E7A97u);
      (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))&pkTexture8[6].m_bStatic)(pkTextWin, v21);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "ClsNor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 7u, 0, 0);
      pkTexture8 = MenuTexMgr::GetTexture(4u);
      if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
      {
        pkTextWin = (PgWinText *)PgSprData::Create(
                                   (NiAVObject *)&spNode.m_pObject->vfptr,
                                   "HelpLinkNor",
                                   &uiLeft,
                                   &uiTop,
                                   pkTexture8);
        PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
        PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
        PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 9u, 0, 0);
      }
      v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
      PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v22, (PgWin *)&v2->vfptr, 0, 0);
      kCreateInfo.m_arrItem._Myfirst = 0;
      kCreateInfo.m_arrItem._Mylast = 0;
      kCreateInfo.m_arrItem._Myend = 0;
      kCreateInfo.m_bMakeData = 0;
      kCreateInfo.m_nOffX = 0;
      kCreateInfo.m_nOffY = 0;
      LOBYTE(v51) = 2;
      v23 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
      v23->nItemType = 1;
      v23->pNode = spNode.m_pObject;
      pkTextWin = (PgWinText *)v23;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "ColumnBarNor");
      LOBYTE(v51) = 3;
      pkTexture8 = (NiSourceTexture *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2];
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v51) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "ColumnBarOver");
      LOBYTE(v51) = 4;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkTexture8,
        &_Val);
      LOBYTE(v51) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      v24 = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkTextWin = v24;
      v24->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column01");
      LOBYTE(v51) = 5;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v51) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
      kCreateInfo.m_nOffX = 3;
      kCreateInfo.m_nOffY = 0;
      SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
      v25 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextBox", &uiLeft, &uiTop, pkTexture);
      v26 = SlideListWin::CreateWin(uiLeft - v14, uiTop - v15, v25, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
      v2->m_pBlockList = v26;
      v26->m_uiLClickMsg = 8;
      SlideListWin::AlignText(v2->m_pBlockList, 0);
      SlideListWin::UpdateViewList(v2->m_pBlockList);
      v27 = PgSprData::Create(
              (NiAVObject *)&spNode.m_pObject->vfptr,
              "SlideBar_SlideBtnMiddle",
              &uiLeft,
              &uiTop,
              pkTexture);
      v28 = SlideBar::CreateWin(
              spNode.m_pObject,
              "SlideBar",
              "SlideBar_UpBtn",
              "SlideBar_DnBtn",
              v27,
              0,
              (PgWin *)&v2->vfptr);
      v2->m_pkSlideBarEx = v28;
      v28->m_uiClickMsg = 4;
      v2->m_pkSlideBarEx->m_eType = 1;
      v29 = (NiSourceTexture *)v2->m_pkSlideBarEx;
      v30 = (int (*)(void))v2->m_pkSlideBarEx->vfptr[42].__vecDelDtor;
      pkTexture = (NiSourceTexture *)v2->m_pkSlideBarEx->vfptr;
      pkTexture8 = v29;
      v31 = v30();
      v32 = ((int (__stdcall *)(int))pkTexture8->vfptr[41].__vecDelDtor)(v31);
      ((void (__thiscall *)(SlideBar *, int))pkTexture[4].m_kFormatPrefs.m_eMipMapped)(v2->m_pkSlideBarEx, v32);
      SlideBar::SetSplitCnt(v2->m_pkSlideBarEx, v2->m_pBlockList->m_nSlideSplitCnt);
      UIUtil::UIUtil(&ui);
      LOBYTE(v51) = 6;
      UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
      UIUtil::SetOffset(&ui, v14, v15);
      UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
      v33 = UIUtil::CreateBtn(&ui, 1u, "Btn01Nor", "Btn01Click", "Btn01Over", 0, 0);
      *(_QWORD *)&v34.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v34.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v35 = (char *)TextData2::Get(0xD1CB1226);
      UIUtil::CreateAttachedText((PgWin *)&v33->vfptr, v35, v34, 5u);
      v36 = UIUtil::CreateBtn(&ui, 2u, "Btn02Nor", "Btn02Click", "Btn02Over", 0, 0);
      *(_QWORD *)&v37.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v37.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v38 = (char *)TextData2::Get(0x8CCBC5D1);
      UIUtil::CreateAttachedText((PgWin *)&v36->vfptr, v38, v37, 5u);
      ((void (__thiscall *)(ChatBlockListWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
        v2,
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        0.40000001,
        0.5);
      LOBYTE(v51) = 2;
      UIUtil::~UIUtil(&ui);
      LOBYTE(v51) = 1;
      SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
      LOBYTE(v51) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
      v51 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 1;
    }
    else
    {
      LOBYTE(v51) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
      v51 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 0;
    }
  }
  else
  {
    LOBYTE(v51) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v13 = spNode.m_pObject;
    v51 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v13 )
      return 0;
    v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004E52C0) --------------------------------------------------------
void __thiscall ChatBlockListWin::OnSlideBar(ChatBlockListWin *this)
{
  ChatBlockListWin *v1; // esi@1
  SlideListWin *v2; // eax@1
  SlideBar *v3; // ecx@2

  v1 = this;
  v2 = this->m_pBlockList;
  if ( v2 )
  {
    v3 = this->m_pkSlideBarEx;
    if ( v3 )
    {
      SlideBar::SetSplitCnt(v3, v2->m_nSlideSplitCnt);
      v1->m_pBlockList->m_nViewStartPos = v1->m_pkSlideBarEx->m_nCurPos;
      SlideListWin::UpdateViewList(v1->m_pBlockList);
    }
  }
}

//----- (004E5310) --------------------------------------------------------
ChatBlockListWin *__thiscall ChatBlockListWin::`scalar deleting destructor'(ChatBlockListWin *this, unsigned int a2)
{
  ChatBlockListWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ChatBlockListWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ChatBlockListWin::`vftable'{for `IDirectMessenger'};
  CChatRestrict::~CChatRestrict(&this->m_RestrictList);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9862F0: using guessed type void (__thiscall *ChatBlockListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98630C: using guessed type int (__thiscall *ChatBlockListWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004E5390) --------------------------------------------------------
void __thiscall ChatBlockListWin::OnCommand(ChatBlockListWin *this, unsigned int wParam, int lParam)
{
  ChatBlockListWin *v3; // esi@1
  GameFrameWork *v4; // eax@6

  v3 = this;
  switch ( wParam )
  {
    case 7u:
      ((void (__stdcall *)(_DWORD))this->vfptr[60].__vecDelDtor)(0);
      GameFrameWork::CloseChatBlockListWin((GameFrameWork *)v3->m_pkFrameWork);
      break;
    case 1u:
      ChatBlockListWin::OnSelectDeleteBtn(this);
      break;
    case 2u:
      ChatBlockListWin::OnAllDeleteBtn(this);
      break;
    case 4u:
      ChatBlockListWin::OnSlideBar(this);
      break;
    case 9u:
      v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v4 )
        GameFrameWork::OpenPlayGuideSearchList(v4, "ChatBlockList");
      break;
    default:
      return;
  }
}

//----- (004E5430) --------------------------------------------------------
void __thiscall ChatEditWin::ChatStart(ChatEditWin *this)
{
  ChatEditWin *v1; // esi@1

  v1 = this;
  ((void (*)(void))this->m_spEdit.m_pObject->vfptr[120].__vecDelDtor)();
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}

//----- (004E5450) --------------------------------------------------------
void __thiscall ChatEditWin::OnEditEnd(ChatEditWin *this, unsigned int wParam, int lParam)
{
  ChatEditWin *v3; // esi@1
  GameFrameWork *v4; // edi@2
  char *v5; // eax@2

  v3 = this;
  if ( wParam == 1 )
  {
    v4 = (GameFrameWork *)this->m_pkFrameWork;
    v5 = (char *)((int (*)(void))this->m_spEdit.m_pObject->vfptr[114].__vecDelDtor)();
    GameFrameWork::DecodingChat(v4, v5, 0, 0);
  }
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
}

//----- (004E5490) --------------------------------------------------------
void __thiscall ChatEditWin::ChatEditWin(ChatEditWin *this)
{
  ChatEditWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ChatEditWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ChatEditWin::`vftable'{for `IDirectMessenger'};
  v1->m_spEdit.m_pObject = 0;
}
// 986578: using guessed type void (__thiscall *ChatEditWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 986594: using guessed type int (__thiscall *ChatEditWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004E54C0) --------------------------------------------------------
void __thiscall ChatEditWin::~ChatEditWin(ChatEditWin *this)
{
  ChatEditWin *v1; // esi@1
  EditWin *v2; // edi@1
  EditWin *v3; // edi@6

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ChatEditWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ChatEditWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spEdit.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spEdit.m_pObject = 0;
  }
  v3 = v1->m_spEdit.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 986578: using guessed type void (__thiscall *ChatEditWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 986594: using guessed type int (__thiscall *ChatEditWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004E5580) --------------------------------------------------------
char __thiscall ChatEditWin::Create(ChatEditWin *this, NiSourceTexture *pkTexture, PgFrameWork *pkFrameWork)
{
  ChatEditWin *v3; // edi@1
  NiTexturePalette *v4; // esi@1
  const char *v5; // eax@3
  PgSprData *v6; // eax@4
  NiNode *v7; // esi@5
  PgSprData *v9; // eax@10
  PgWinSpr *v10; // esi@10
  unsigned int v11; // ST0C_4@10
  unsigned int v12; // ST08_4@10
  int v13; // ST04_4@10
  int v14; // eax@10
  EditWin *v15; // eax@10
  EditWin *v16; // esi@10
  EditWin *v17; // ebx@10
  NiNode *v18; // esi@17
  int uiLeft; // [sp+1Ch] [bp-18h]@4
  int uiTop; // [sp+20h] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+24h] [bp-10h]@1
  int v22; // [sp+30h] [bp-4h]@1

  v3 = this;
  spNode.m_pObject = 0;
  v4 = pTexturePalette;
  v22 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "ChatInputWin.nif");
  PgUtil::LoadNodeNifFile(v5, &spNode, v4);
  if ( !spNode.m_pObject )
    return 0;
  v6 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "frame", &uiLeft, &uiTop, pkTexture);
  if ( !PgWinFrame::Create((PgWinFrame *)&v3->vfptr, 0, 0, v6, 0, pkFrameWork, "CharEditWin", 0) )
  {
    v7 = spNode.m_pObject;
    v22 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v7 )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    }
    return 0;
  }
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "chat input", &uiLeft, &uiTop, pkTexture);
  v10 = PgWinSpr::CreateWin(uiLeft, uiTop, v9, (PgWin *)&v3->vfptr, 0, 0);
  v11 = ((int (__thiscall *)(PgWinSpr *))v10->vfptr[37].__vecDelDtor)(v10) - 1;
  v12 = ((int (__thiscall *)(PgWinSpr *))v10->vfptr[36].__vecDelDtor)(v10) - 1;
  v13 = ((int (__thiscall *)(PgWinSpr *))v10->vfptr[42].__vecDelDtor)(v10) + 3;
  v14 = ((int (__thiscall *)(PgWinSpr *))v10->vfptr[41].__vecDelDtor)(v10);
  v15 = EditWin::CreateWin(v14 + 2, v13, v12, v11, (PgWin *)&v3->vfptr, NORMAL, 0x80u, 5u, 1, 0, 1);
  v16 = v3->m_spEdit.m_pObject;
  v17 = v15;
  if ( v16 != v15 )
  {
    if ( v16 && !InterlockedDecrement((volatile LONG *)&v16->m_uiRefCount) && v16 )
      v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
    v3->m_spEdit.m_pObject = v17;
    if ( v17 )
      InterlockedIncrement((volatile LONG *)&v17->m_uiRefCount);
  }
  ((void (__thiscall *)(ChatEditWin *, unsigned int, unsigned int, _DWORD, _DWORD))v3->vfptr[59].__vecDelDtor)(
    v3,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    1.0);
  v18 = spNode.m_pObject;
  v22 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v18 )
    v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004E5790) --------------------------------------------------------
ChatEditWin *__cdecl ChatEditWin::CreateWin(NiSourceTexture *pkTexture, PgFrameWork *pkFrameWork)
{
  PgWin *v2; // eax@1
  PgWin *v3; // esi@1
  PgWin *v4; // edi@8
  ChatEditWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v2 = (PgWin *)operator new(0x160u);
  v3 = v2;
  result.m_pObject = v2;
  v7 = 0;
  if ( v2 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v2);
    v3->vfptr = (NiRefObjectVtbl *)&ChatEditWin::`vftable'{for `NiNode'};
    v3->vfptr = (IDirectMessengerVtbl *)&ChatEditWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v3[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, NiSourceTexture *, PgFrameWork *))v3->vfptr[135].__vecDelDtor)(
                          v3,
                          pkTexture,
                          pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (ChatEditWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}
// 986578: using guessed type void (__thiscall *ChatEditWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 986594: using guessed type int (__thiscall *ChatEditWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004E58E0) --------------------------------------------------------
ChatEditWin *__thiscall ChatEditWin::`scalar deleting destructor'(ChatEditWin *this, unsigned int a2)
{
  ChatEditWin *v2; // esi@1

  v2 = this;
  ChatEditWin::~ChatEditWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (004E5910) --------------------------------------------------------
void __thiscall ClockShadowWin::CoolTimeDecrease(ClockShadowWin *this, unsigned __int16 kID)
{
  double v2; // st7@1

  v2 = this->m_fRotateTime;
  this->m_kSkillID = kID;
  if ( 0.0 != v2 )
    this->m_fRotateTime = this->m_fRotateTime - 1.0;
  if ( this->m_fRotateTime == 0.0 )
    Skill::DecreaseRecordTime(kID);
}

//----- (004E5960) --------------------------------------------------------
void __thiscall ClockShadowWin::StopClockShadow(ClockShadowWin *this)
{
  this->m_uFlags |= 1u;
  this->m_bStart = 0;
}

//----- (004E5970) --------------------------------------------------------
void __thiscall ClockShadowWin::ClockShadowWin(ClockShadowWin *this)
{
  ClockShadowWin *v1; // esi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ClockShadowWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ClockShadowWin::`vftable'{for `IDirectMessenger'};
  v1->m_spTriShape.m_pObject = 0;
  v1->m_bStart = 0;
  v1->m_kSkillID = -1;
  v1->b_show = 1;
}
// 9867B8: using guessed type void (__thiscall *ClockShadowWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9867D4: using guessed type int (__thiscall *ClockShadowWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004E59B0) --------------------------------------------------------
void __thiscall ClockShadowWin::~ClockShadowWin(ClockShadowWin *this)
{
  ClockShadowWin *v1; // esi@1
  NiTriShape *v2; // edi@1
  NiTriShape *v3; // edi@6

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ClockShadowWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ClockShadowWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spTriShape.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spTriShape.m_pObject = 0;
  }
  v3 = v1->m_spTriShape.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  PgWin::~PgWin((PgWin *)&v1->vfptr);
}
// 9867B8: using guessed type void (__thiscall *ClockShadowWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9867D4: using guessed type int (__thiscall *ClockShadowWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004E5A70) --------------------------------------------------------
void __thiscall ClockShadowWin::ResetVertex(ClockShadowWin *this)
{
  NiPoint3 *v1; // eax@3
  char *v2; // ecx@3
  signed int v3; // edx@3

  if ( !(_S3_4 & 1) )
  {
    _S3_4 |= 1u;
    aVerTex[0].x = 16.0;
    flt_A8CB2C = 0.0;
    flt_A8CB30 = 0.0;
    flt_A8CB3C = 0.0;
    flt_A8CB34 = 16.0;
    flt_A8CB38 = 16.0;
    flt_A8CB40 = 32.0;
    flt_A8CB4C = 32.0;
    flt_A8CB64 = 32.0;
    flt_A8CB68 = 32.0;
    flt_A8CB70 = 32.0;
    flt_A8CB74 = 32.0;
    flt_A8CB8C = 32.0;
    flt_A8CB98 = 32.0;
    flt_A8CB44 = 0.0;
    flt_A8CB48 = 0.0;
    flt_A8CB50 = 0.0;
    flt_A8CB54 = 0.0;
    flt_A8CB60 = 0.0;
    flt_A8CB6C = 0.0;
    flt_A8CB78 = 0.0;
    flt_A8CB84 = 0.0;
    flt_A8CB88 = 0.0;
    flt_A8CB90 = 0.0;
    flt_A8CB94 = 0.0;
    flt_A8CB9C = 0.0;
    flt_A8CBA8 = 0.0;
    flt_A8CBAC = 0.0;
    flt_A8CBB0 = 0.0;
    flt_A8CBB4 = 0.0;
    flt_A8CBB8 = 0.0;
    flt_A8CBBC = 0.0;
    flt_A8CBC0 = 0.0;
    flt_A8CBCC = 0.0;
    flt_A8CBD4 = 0.0;
    flt_A8CBD8 = 0.0;
    flt_A8CB58 = 16.0;
    flt_A8CB5C = 16.0;
    flt_A8CB7C = 16.0;
    flt_A8CB80 = 16.0;
    flt_A8CBA0 = 16.0;
    flt_A8CBA4 = 16.0;
    flt_A8CBC4 = 16.0;
    flt_A8CBC8 = 16.0;
    flt_A8CBD0 = 16.0;
  }
  v1 = this->m_spTriShape.m_pObject->m_spModelData.m_pObject->m_pkVertex;
  v2 = (char *)((char *)aVerTex - (char *)v1);
  v3 = 15;
  do
  {
    v1->x = *(float *)((char *)&v1->x + (_DWORD)v2);
    v1->y = *(float *)((char *)&v1->y + (_DWORD)v2);
    v1->z = *(float *)((char *)&v1->z + (_DWORD)v2);
    ++v1;
    --v3;
  }
  while ( v3 );
}
// A8CB2C: using guessed type float flt_A8CB2C;
// A8CB30: using guessed type float flt_A8CB30;
// A8CB34: using guessed type float flt_A8CB34;
// A8CB38: using guessed type float flt_A8CB38;
// A8CB3C: using guessed type float flt_A8CB3C;
// A8CB40: using guessed type float flt_A8CB40;
// A8CB44: using guessed type float flt_A8CB44;
// A8CB48: using guessed type float flt_A8CB48;
// A8CB4C: using guessed type float flt_A8CB4C;
// A8CB50: using guessed type float flt_A8CB50;
// A8CB54: using guessed type float flt_A8CB54;
// A8CB58: using guessed type float flt_A8CB58;
// A8CB5C: using guessed type float flt_A8CB5C;
// A8CB60: using guessed type float flt_A8CB60;
// A8CB64: using guessed type float flt_A8CB64;
// A8CB68: using guessed type float flt_A8CB68;
// A8CB6C: using guessed type float flt_A8CB6C;
// A8CB70: using guessed type float flt_A8CB70;
// A8CB74: using guessed type float flt_A8CB74;
// A8CB78: using guessed type float flt_A8CB78;
// A8CB7C: using guessed type float flt_A8CB7C;
// A8CB80: using guessed type float flt_A8CB80;
// A8CB84: using guessed type float flt_A8CB84;
// A8CB88: using guessed type float flt_A8CB88;
// A8CB8C: using guessed type float flt_A8CB8C;
// A8CB90: using guessed type float flt_A8CB90;
// A8CB94: using guessed type float flt_A8CB94;
// A8CB98: using guessed type float flt_A8CB98;
// A8CB9C: using guessed type float flt_A8CB9C;
// A8CBA0: using guessed type float flt_A8CBA0;
// A8CBA4: using guessed type float flt_A8CBA4;
// A8CBA8: using guessed type float flt_A8CBA8;
// A8CBAC: using guessed type float flt_A8CBAC;
// A8CBB0: using guessed type float flt_A8CBB0;
// A8CBB4: using guessed type float flt_A8CBB4;
// A8CBB8: using guessed type float flt_A8CBB8;
// A8CBBC: using guessed type float flt_A8CBBC;
// A8CBC0: using guessed type float flt_A8CBC0;
// A8CBC4: using guessed type float flt_A8CBC4;
// A8CBC8: using guessed type float flt_A8CBC8;
// A8CBCC: using guessed type float flt_A8CBCC;
// A8CBD0: using guessed type float flt_A8CBD0;
// A8CBD4: using guessed type float flt_A8CBD4;
// A8CBD8: using guessed type float flt_A8CBD8;

//----- (004E5BE0) --------------------------------------------------------
void __thiscall ClockShadowWin::Start(ClockShadowWin *this, float fCurTime, float fRoateTime, float fStartTime)
{
  this->m_bStart = 1;
  this->m_fStartTime = fCurTime - fStartTime;
  this->m_fRotateTime = fRoateTime;
  ClockShadowWin::ResetVertex(this);
}

//----- (004E5C10) --------------------------------------------------------
void __thiscall ClockShadowWin::HideTri(ClockShadowWin *this, unsigned int uiTriPart)
{
  NiPoint3 *v2; // eax@1
  float v3; // ecx@1
  unsigned int v4; // eax@1
  int v5; // edx@1
  int v6; // ecx@1

  v2 = this->m_spTriShape.m_pObject->m_spModelData.m_pObject->m_pkVertex;
  v3 = v2[3 * uiTriPart + 2].x;
  v4 = (unsigned int)&v2[3 * uiTriPart];
  v5 = *(_DWORD *)(v4 + 28);
  *(float *)v4 = v3;
  v6 = *(_DWORD *)(v4 + 32);
  *(_DWORD *)(v4 + 4) = v5;
  *(_DWORD *)(v4 + 8) = v6;
}

//----- (004E5C50) --------------------------------------------------------
void __thiscall ClockShadowWin::ChangeTriVertex(ClockShadowWin *this, unsigned int uiTriPart, float fX, float fY)
{
  NiPoint3 *v4; // edx@1
  unsigned int v5; // eax@1

  v4 = this->m_spTriShape.m_pObject->m_spModelData.m_pObject->m_pkVertex;
  v5 = 9 * uiTriPart;
  v4[4 * v5 / 0xC].x = fX;
  v4[4 * v5 / 0xC].y = fY;
  this->m_spTriShape.m_pObject->m_spModelData.m_pObject->m_usDirtyFlags |= 1u;
}

//----- (004E5C90) --------------------------------------------------------
void __thiscall ClockShadowWin::UpdateMeWin(ClockShadowWin *this, float fCurTime)
{
  ClockShadowWin *v2; // esi@1
  signed int v3; // edi@3
  double v4; // st7@3
  NiPoint3 *v5; // eax@4
  float v6; // ecx@4
  float v7; // edx@4
  NiPoint3 *v8; // eax@6
  float v9; // ecx@6
  float v10; // edx@6
  NiPoint3 *v11; // eax@8
  float v12; // ecx@8
  float v13; // edx@8
  NiPoint3 *v14; // eax@10
  float v15; // ecx@10
  float v16; // edx@10
  double v17; // st6@17
  double v18; // st7@17
  double v19; // st7@19
  double v20; // st6@19
  double v21; // st7@19
  double v22; // st7@20
  double v23; // st7@23
  double v24; // st6@23
  double v25; // st7@23
  double v26; // st7@24
  double v27; // st7@27
  double v28; // st6@27
  double v29; // st7@27
  double v30; // st7@28
  double v31; // st7@31
  NiPoint3 *v32; // eax@32
  unsigned __int16 v33; // ax@33
  ClockShadowWin *fX; // [sp+0h] [bp-4h]@1
  float fPastTime; // [sp+Ch] [bp+8h]@1
  float fPastTimeb; // [sp+Ch] [bp+8h]@3
  float fPastTimea; // [sp+Ch] [bp+8h]@17
  float fPastTimec; // [sp+Ch] [bp+8h]@18
  float fPastTimed; // [sp+Ch] [bp+8h]@18
  float fPastTimee; // [sp+Ch] [bp+8h]@19
  float fPastTimef; // [sp+Ch] [bp+8h]@19
  float fPastTimeg; // [sp+Ch] [bp+8h]@20
  float fPastTimeh; // [sp+Ch] [bp+8h]@20
  float fPastTimei; // [sp+Ch] [bp+8h]@21
  float fPastTimej; // [sp+Ch] [bp+8h]@21
  float fPastTimek; // [sp+Ch] [bp+8h]@22
  float fPastTimel; // [sp+Ch] [bp+8h]@23
  float fPastTimem; // [sp+Ch] [bp+8h]@23
  float fPastTimen; // [sp+Ch] [bp+8h]@24
  float fPastTimeo; // [sp+Ch] [bp+8h]@24
  float fPastTimep; // [sp+Ch] [bp+8h]@25
  float fPastTimeq; // [sp+Ch] [bp+8h]@25
  float fPastTimer; // [sp+Ch] [bp+8h]@26
  float fPastTimes; // [sp+Ch] [bp+8h]@27
  float fPastTimet; // [sp+Ch] [bp+8h]@27
  float fPastTimeu; // [sp+Ch] [bp+8h]@28
  float fPastTimev; // [sp+Ch] [bp+8h]@28
  float fPastTimew; // [sp+Ch] [bp+8h]@29
  float fPastTimex; // [sp+Ch] [bp+8h]@29
  float fPastTimey; // [sp+Ch] [bp+8h]@30
  float fPastTimez; // [sp+Ch] [bp+8h]@31
  float fPastTimeba; // [sp+Ch] [bp+8h]@31
  float fPastTimebb; // [sp+Ch] [bp+8h]@31
  float fPastTimebc; // [sp+Ch] [bp+8h]@31

  fX = this;
  v2 = this;
  fPastTime = fCurTime - this->m_fStartTime;
  if ( this->m_bStart && this->m_fRotateTime > (double)fPastTime )
  {
    v3 = 0;
    fPastTimeb = fPastTime / this->m_fRotateTime;
    v4 = fPastTimeb;
    if ( fPastTimeb > 0.125 )
    {
      v5 = this->m_spTriShape.m_pObject->m_spModelData.m_pObject->m_pkVertex;
      v6 = v5[2].y;
      v5->x = v5[2].x;
      v7 = v5[2].z;
      v5->y = v6;
      v5->z = v7;
      v3 = 1;
    }
    if ( v4 > 0.375 )
    {
      v8 = v2->m_spTriShape.m_pObject->m_spModelData.m_pObject->m_pkVertex;
      v9 = v8[5].y;
      v8[3].x = v8[5].x;
      v10 = v8[5].z;
      v8[3].y = v9;
      v8[3].z = v10;
      v3 = 2;
    }
    if ( v4 > 0.625 )
    {
      v11 = v2->m_spTriShape.m_pObject->m_spModelData.m_pObject->m_pkVertex;
      v12 = v11[8].y;
      v11[6].x = v11[8].x;
      v13 = v11[8].z;
      v11[6].y = v12;
      v11[6].z = v13;
      v3 = 3;
    }
    if ( v4 >= 0.875 )
    {
      v14 = v2->m_spTriShape.m_pObject->m_spModelData.m_pObject->m_pkVertex;
      v15 = v14[11].y;
      v14[9].x = v14[11].x;
      v16 = v14[11].z;
      v14[9].y = v15;
      v14[9].z = v16;
      v3 = 4;
    }
    if ( v4 < 1.0 )
    {
      if ( v2->b_show )
        v2->m_uFlags &= 0xFFFEu;
      else
        v2->m_uFlags |= 1u;
      v17 = v4 * (NI_PI + NI_PI);
      v18 = NI_PI;
      fPastTimea = v17;
      switch ( v3 )
      {
        case 0:
          fPastTimec = tan(fPastTimea);
          fPastTimed = fPastTimec * 16.0;
          *(float *)&fX = fPastTimed + 16.0;
          fPastTimea = 0.0;
          break;
        case 1:
          v19 = v18 * 0.25;
          fPastTimee = fPastTimea - v19;
          v20 = v19;
          v21 = fPastTimee;
          fPastTimef = v20;
          if ( fPastTimef < v21 )
          {
            fPastTimei = v21 - v20;
            fPastTimej = tan(fPastTimei);
            v22 = fPastTimej * 16.0 + 16.0;
          }
          else
          {
            fPastTimeg = v20 - v21;
            fPastTimeh = tan(fPastTimeg);
            v22 = 16.0 - fPastTimeh * 16.0;
          }
          fPastTimek = v22;
          *(float *)&fX = 32.0;
          fPastTimea = fPastTimek + 0.0;
          break;
        case 2:
          v23 = v18 * 0.25;
          fPastTimel = fPastTimea - v23 * 3.0;
          v24 = v23;
          v25 = fPastTimel;
          fPastTimem = v24;
          if ( fPastTimem < v25 )
          {
            fPastTimep = v25 - v24;
            fPastTimeq = tan(fPastTimep);
            v26 = fPastTimeq * 16.0 + 16.0;
          }
          else
          {
            fPastTimen = v24 - v25;
            fPastTimeo = tan(fPastTimen);
            v26 = 16.0 - fPastTimeo * 16.0;
          }
          fPastTimer = v26;
          *(float *)&fX = 32.0 - fPastTimer;
          fPastTimea = 32.0;
          break;
        case 3:
          v27 = v18 * 0.25;
          fPastTimes = fPastTimea - v27 * 5.0;
          v28 = v27;
          v29 = fPastTimes;
          fPastTimet = v28;
          if ( fPastTimet < v29 )
          {
            fPastTimew = v29 - v28;
            fPastTimex = tan(fPastTimew);
            v30 = fPastTimex * 16.0 + 16.0;
          }
          else
          {
            fPastTimeu = v28 - v29;
            fPastTimev = tan(fPastTimeu);
            v30 = 16.0 - fPastTimev * 16.0;
          }
          fPastTimey = v30;
          *(float *)&fX = 0.0;
          fPastTimea = 32.0 - fPastTimey;
          break;
        case 4:
          v31 = v18 * 0.25;
          fPastTimez = fPastTimea - v31 * 7.0;
          fPastTimeba = v31 - fPastTimez;
          fPastTimebb = tan(fPastTimeba);
          fPastTimebc = 16.0 - fPastTimebb * 16.0;
          *(float *)&fX = fPastTimebc + 0.0;
          fPastTimea = 0.0;
          break;
        default:
          break;
      }
      v32 = v2->m_spTriShape.m_pObject->m_spModelData.m_pObject->m_pkVertex;
      v32[3 * v3].x = *(float *)&fX;
      v32[3 * v3].y = fPastTimea;
      v2->m_spTriShape.m_pObject->m_spModelData.m_pObject->m_usDirtyFlags |= 1u;
    }
    else
    {
      v2->m_uFlags |= 1u;
    }
  }
  else
  {
    v33 = this->m_kSkillID;
    this->m_uFlags |= 1u;
    this->m_bStart = 0;
    if ( v33 != -1 )
    {
      this->m_fRotateTime = 0.0;
      Skill::DecreaseRecordTime(v33);
      v2->m_kSkillID = -1;
    }
  }
}
// B622CC: using guessed type const float NI_PI;

//----- (004E6090) --------------------------------------------------------
void __thiscall ClockShadowWin::CreateGeometry(ClockShadowWin *this)
{
  ClockShadowWin *v1; // edi@1
  NiPoint3 *v2; // eax@1
  NiPoint3 *v3; // ebx@1
  unsigned __int16 *v4; // esi@1
  unsigned int v5; // eax@1
  NiRoom *v6; // eax@3
  NiTriShape *v7; // eax@4
  NiTriShape *v8; // ebx@4
  NiTriShape *v9; // esi@6
  NiRoom *v10; // eax@13
  NiRoom *v11; // esi@13
  NiRoom *v12; // ebx@14
  NiRoom *v13; // esi@16
  NiRoom *v14; // eax@19
  int v15; // eax@20
  int v16; // esi@20
  NiRoom *v17; // eax@24
  volatile LONG *v18; // ebx@24
  NiBound kBound; // [sp+1Ch] [bp-34h]@13
  float v20; // [sp+2Ch] [bp-24h]@22
  float v21; // [sp+30h] [bp-20h]@22
  float v22; // [sp+34h] [bp-1Ch]@22
  NiPointer<NiRoom> v23; // [sp+38h] [bp-18h]@3
  NiPointer<NiRoom> element; // [sp+3Ch] [bp-14h]@22
  NiPoint3 *pkData; // [sp+40h] [bp-10h]@1
  int v26; // [sp+4Ch] [bp-4h]@3

  v1 = this;
  v2 = (NiPoint3 *)operator new[](0xB4u);
  v3 = v2;
  pkData = v2;
  v4 = (unsigned __int16 *)operator new[](0x1Eu);
  v5 = 0;
  do
  {
    v4[v5] = v5;
    ++v5;
  }
  while ( v5 < 0xF );
  v6 = (NiRoom *)operator new(0xC4u);
  v23.m_pObject = v6;
  v26 = 0;
  if ( v6 )
  {
    NiTriShape::NiTriShape((NiTriShape *)v6, 0xFu, v3, 0, 0, 0, 0, 0, 5u, v4);
    v8 = v7;
  }
  else
  {
    v8 = 0;
  }
  v9 = v1->m_spTriShape.m_pObject;
  v26 = -1;
  if ( v9 != v8 )
  {
    if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v1->m_spTriShape.m_pObject = v8;
    if ( v8 )
      InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  }
  ClockShadowWin::ResetVertex(v1);
  NiBound::ComputeFromData(&kBound, 15, pkData);
  v1->m_spTriShape.m_pObject->m_spModelData.m_pObject->m_kBound = kBound;
  NiAVObject::Update((NiAVObject *)&v1->m_spTriShape.m_pObject->vfptr, 0.0, 1);
  v10 = (NiRoom *)operator new(0x20u);
  v11 = v10;
  v23.m_pObject = v10;
  v26 = 1;
  if ( v10 )
  {
    NiObjectNET::NiObjectNET((NiObjectNET *)&v10->vfptr);
    v11->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
    v11->m_uFlags = 236;
    *((_BYTE *)&v11->m_uFlags + 2) = 0;
    v12 = v11;
  }
  else
  {
    v12 = 0;
  }
  v12->m_uFlags |= 1u;
  v26 = -1;
  v13 = (NiRoom *)operator new(0x28u);
  v23.m_pObject = v13;
  v26 = 2;
  if ( v13 )
  {
    NiObjectNET::NiObjectNET((NiObjectNET *)&v13->vfptr);
    v13->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
    v13->m_uFlags = 0;
    v13->m_pkParent = 0;
    LODWORD(v13->m_kWorldBound.m_kCenter.x) = 1;
    pkData = (NiPoint3 *)v13;
  }
  else
  {
    pkData = 0;
    v13 = 0;
  }
  v26 = -1;
  v13->m_pkParent = 0;
  LODWORD(v13->m_kWorldBound.m_kCenter.x) = 0;
  v14 = (NiRoom *)operator new(0x60u);
  v23.m_pObject = v14;
  v26 = 3;
  if ( v14 )
  {
    NiMaterialProperty::NiMaterialProperty((NiMaterialProperty *)v14);
    v16 = v15;
  }
  else
  {
    v16 = 0;
  }
  *(_DWORD *)(v16 + 88) += 2;
  v20 = 0.0;
  element.m_pObject = v12;
  v21 = 0.0;
  v22 = 0.0;
  *(float *)(v16 + 68) = 0.0;
  *(float *)(v16 + 84) = 0.75;
  *(float *)(v16 + 72) = 0.0;
  *(float *)(v16 + 76) = 0.0;
  v23.m_pObject = (NiRoom *)v1->m_spTriShape.m_pObject;
  InterlockedIncrement((volatile LONG *)&v12->m_uiRefCount);
  v26 = 4;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v23.m_pObject->m_kPropertyList,
    &element);
  v26 = -1;
  if ( !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) )
    v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
  v17 = (NiRoom *)v1->m_spTriShape.m_pObject;
  v23.m_pObject = (NiRoom *)pkData;
  v18 = (volatile LONG *)&pkData->y;
  element.m_pObject = v17;
  InterlockedIncrement((volatile LONG *)&pkData->y);
  v26 = 5;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&element.m_pObject->m_kPropertyList,
    &v23);
  v26 = -1;
  if ( !InterlockedDecrement(v18) )
    (*(void (__stdcall **)(_DWORD))LODWORD(pkData->x))(1);
  element.m_pObject = (NiRoom *)v1->m_spTriShape.m_pObject;
  v23.m_pObject = (NiRoom *)v16;
  InterlockedIncrement((volatile LONG *)(v16 + 4));
  v26 = 6;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&element.m_pObject->m_kPropertyList,
    &v23);
  v26 = -1;
  if ( !InterlockedDecrement((volatile LONG *)(v16 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v16)(v16, 1);
  ((void (__cdecl *)(NiTriShape *))v1->vfptr[29].__vecDelDtor)(v1->m_spTriShape.m_pObject);
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);

//----- (004E63A0) --------------------------------------------------------
char __thiscall ClockShadowWin::Create(ClockShadowWin *this, int iXPos, int iYPos, PgWin *pkParent)
{
  ClockShadowWin *v4; // esi@1
  char result; // al@1

  v4 = this;
  result = PgWin::Create((PgWin *)&this->vfptr, iXPos, iYPos, 0x20u, 0x20u, pkParent, 0, 0);
  if ( result )
  {
    ClockShadowWin::CreateGeometry(v4);
    v4->vfptr[60].__vecDelDtor((NiRefObject *)v4, 0);
    result = 1;
  }
  return result;
}

//----- (004E63F0) --------------------------------------------------------
ClockShadowWin *__cdecl ClockShadowWin::CreateWin(int iXPos, int iYPos, PgWin *pkParent)
{
  PgWin *v3; // eax@1
  PgWin *v4; // esi@1
  PgWin *v5; // edi@8
  ClockShadowWin *v6; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x134u);
  v4 = v3;
  result.m_pObject = v3;
  v8 = 0;
  if ( v3 )
  {
    PgWin::PgWin(v3);
    v4->vfptr = (NiRefObjectVtbl *)&ClockShadowWin::`vftable'{for `NiNode'};
    v4->vfptr = (IDirectMessengerVtbl *)&ClockShadowWin::`vftable'{for `IDirectMessenger'};
    v4[1].vfptr = 0;
    LOBYTE(v4[1].m_uiRefCount) = 0;
    LOBYTE(v4[1].m_ppkExtra) = 1;
    HIWORD(v4[1].m_ppkExtra) = -1;
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v8 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v4);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgWin *))v4->vfptr[113].__vecDelDtor)(
                          v4,
                          iXPos,
                          iYPos,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v4->vfptr[89].__vecDelDtor)(v4);
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = (ClockShadowWin *)v4;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v4);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = 0;
  }
  return v6;
}
// 9867B8: using guessed type void (__thiscall *ClockShadowWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9867D4: using guessed type int (__thiscall *ClockShadowWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004E6560) --------------------------------------------------------
void __thiscall NiGeometry::SetModelBound(NiGeometry *this, NiBound *kBound)
{
  this->m_spModelData.m_pObject->m_kBound = *kBound;
}

//----- (004E6590) --------------------------------------------------------
ClockShadowWin *__thiscall ClockShadowWin::`scalar deleting destructor'(ClockShadowWin *this, unsigned int a2)
{
  ClockShadowWin *v2; // esi@1

  v2 = this;
  ClockShadowWin::~ClockShadowWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (004E65C0) --------------------------------------------------------
void __usercall CollectCardWin::OnShowWin(CollectCardWin *this@<ecx>, double a2@<st0>)
{
  CollectCardWin *v2; // esi@1

  v2 = this;
  if ( this->m_pkWhiteBlindSpr )
  {
    ((void (*)(void))this->m_pkWhiteBlindSpr->vfptr[70].__vecDelDtor)();
    if ( 0.0 != a2 && !v2->m_bPlay && !v2->m_bOpenCard )
      ((void (__stdcall *)(_DWORD))v2->m_pkWhiteBlindSpr->vfptr[69].__vecDelDtor)(0.0);
  }
}

//----- (004E6620) --------------------------------------------------------
void __thiscall CollectCardWin::SetUnidentified(CollectCardWin *this, int bUnidentified)
{
  if ( this->m_pkUnidentifiedSpr )
    ((void (__stdcall *)(_DWORD))this->m_pkUnidentifiedSpr->vfptr[64].__vecDelDtor)(bUnidentified);
}

//----- (004E6650) --------------------------------------------------------
void __thiscall CollectCardWin::SetName(CollectCardWin *this, const char *pcName)
{
  if ( this->m_pkNameText )
    ((void (__stdcall *)(_DWORD))this->m_pkNameText->vfptr[118].__vecDelDtor)(pcName);
}

//----- (004E6680) --------------------------------------------------------
int __thiscall CollectCardWin::IsSameCard(CollectCardWin *this, unsigned int uiCardID, unsigned int uiSerial)
{
  CollectCardWin *v3; // esi@1
  int result; // eax@1

  v3 = this;
  result = ((int (*)(void))this->vfptr[65].__vecDelDtor)();
  if ( (_BYTE)result )
    result = v3->m_uiCardID == uiCardID && v3->m_uiSerial == uiSerial;
  return result;
}

//----- (004E66C0) --------------------------------------------------------
bool __thiscall CollectCardWin::IsPlay(CollectCardWin *this)
{
  CollectCardWin *v1; // esi@1

  v1 = this;
  if ( !(unsigned __int8)((int (*)(void))this->vfptr[65].__vecDelDtor)() )
    v1->m_bPlay = 0;
  return v1->m_bPlay;
}

//----- (004E66E0) --------------------------------------------------------
BOOL __usercall CollectCardWin::IsOpen@<eax>(CollectCardWin *this@<ecx>, double a2@<st0>)
{
  CollectCardWin *v2; // esi@1
  PgWinSpr *v3; // ecx@3
  bool v4; // al@3

  v2 = this;
  if ( !(unsigned __int8)((int (*)(void))this->vfptr[65].__vecDelDtor)() )
    v2->m_bOpenCard = 0;
  v3 = v2->m_pkWhiteBlindSpr;
  v4 = 0;
  if ( v3 )
  {
    ((void (*)(void))v3->vfptr[70].__vecDelDtor)();
    v4 = a2 > 0.0;
  }
  return v2->m_bOpenCard || v4;
}

//----- (004E6740) --------------------------------------------------------
void __thiscall CollectCardWin::OpenCard(CollectCardWin *this)
{
  this->m_bOpenCard = 1;
}

//----- (004E6750) --------------------------------------------------------
void __thiscall CollectCardWin::ProcessMeInput(CollectCardWin *this, bool *bHit)
{
  CollectCardWin *v2; // esi@1

  v2 = this;
  if ( !this->m_bPlay )
  {
    if ( dword_B64790 >= 1 && !this->m_bIsDuringMove )
    {
      this->m_uiOldXPos = ((int (*)(void))this->vfptr[41].__vecDelDtor)();
      v2->m_uiOldYPos = ((int (__thiscall *)(_DWORD))v2->vfptr[42].__vecDelDtor)(v2);
      PgWinFrame::ProcessMeInput((PgWinFrame *)&v2->vfptr, bHit);
      return;
    }
    if ( dword_B6479C >= 1
      && this->m_bIsDuringMove == 1
      && this->m_uiOldXPos == ((int (*)(void))this->vfptr[41].__vecDelDtor)()
      && v2->m_uiOldYPos == ((int (__thiscall *)(_DWORD))v2->vfptr[42].__vecDelDtor)(v2) )
    {
      v2->m_uiSerial = 0;
      v2->m_uiCardID = 0;
      v2->m_uiOldXPos = 0;
      v2->m_uiOldYPos = 0;
      PgWin::PostMsg((PgWin *)&v2->vfptr, 1u, 0, 0);
    }
  }
  PgWinFrame::ProcessMeInput((PgWinFrame *)&v2->vfptr, bHit);
}
// B64790: using guessed type int dword_B64790;
// B6479C: using guessed type int dword_B6479C;

//----- (004E6820) --------------------------------------------------------
void __thiscall CollectCardWin::UpdateOpen(CollectCardWin *this, float fCurTime)
{
  CollectCardWin *v2; // esi@1
  float v3; // ST08_4@2
  double v4; // st7@2
  PgWinSpr *v5; // ecx@4
  NiRefObjectVtbl *v6; // eax@7
  void *(__thiscall *v7)(NiRefObject *, unsigned int); // edx@7

  v2 = this;
  if ( this->m_bOpenCard )
  {
    v3 = this->m_fAlphaBlendValue - Timer::ms_fDeltaTime;
    this->m_fAlphaBlendValue = v3;
    v4 = 0.0;
    if ( v3 < 0.0 )
      this->m_fAlphaBlendValue = 0.0;
    v5 = this->m_pkWhiteBlindSpr;
    if ( v5 )
    {
      ((void (__stdcall *)(_DWORD))v5->vfptr[69].__vecDelDtor)(v2->m_fAlphaBlendValue);
      v4 = 0.0;
    }
    if ( v4 == v2->m_fAlphaBlendValue )
    {
      v6 = v2->vfptr;
      v2->m_fPlayTime = v4;
      v7 = v6[130].__vecDelDtor;
      v2->m_fPlayStartTime = v4;
      v2->m_bOpenCard = 0;
      v2->m_uiPlayCardID = 0;
      v7((NiRefObject *)&v2->vfptr, 1u);
    }
  }
}
// A8B980: using guessed type float Timer::ms_fDeltaTime;

//----- (004E68D0) --------------------------------------------------------
NiSourceTexture *__stdcall CollectCardWin::LoadImageFile(const char *pcFileName)
{
  NiImageConverter *v2; // eax@1
  NiSourceTexture *result; // eax@1
  NiTexture::FormatPrefs kPrefs; // [sp+0h] [bp-Ch]@2

  v2 = NiImageConverter::GetImageConverter();
  result = (NiSourceTexture *)((int (__thiscall *)(NiImageConverter *, const char *, _DWORD))v2->vfptr[2].__vecDelDtor)(
                                v2,
                                pcFileName,
                                0);
  if ( result )
  {
    kPrefs.m_ePixelLayout = 6;
    kPrefs.m_eAlphaFmt = 2;
    kPrefs.m_eMipMapped = 0;
    result = NiSourceTexture::Create((NiPixelData *)result, &kPrefs);
  }
  return result;
}

//----- (004E6920) --------------------------------------------------------
void __thiscall CollectCardWin::SetBoard(CollectCardWin *this, unsigned int uiGrade)
{
  PgWinSpr *v2; // ecx@1

  v2 = this->m_kBorderSprs._Myfirst[uiGrade];
  if ( v2 )
    ((void (__stdcall *)(_DWORD))v2->vfptr[64].__vecDelDtor)(1);
}

//----- (004E6950) --------------------------------------------------------
void __thiscall CollectCardWin::SetStar(CollectCardWin *this, unsigned int uiStar)
{
  CollectCardWin *v2; // ebx@1
  unsigned int v3; // edi@2
  unsigned int v4; // esi@4
  PgWinSpr *v5; // ecx@5

  v2 = this;
  if ( !this->m_bPlay )
  {
    v3 = uiStar;
    if ( uiStar > 9 )
      v3 = 9;
    v4 = 0;
    if ( v3 )
    {
      do
      {
        v5 = v2->m_kStarSprs._Myfirst[v4];
        if ( v5 )
          ((void (__stdcall *)(_DWORD))v5->vfptr[64].__vecDelDtor)(1);
        ++v4;
      }
      while ( v4 < v3 );
    }
  }
}

//----- (004E69A0) --------------------------------------------------------
void __thiscall CollectCardWin::Reset(CollectCardWin *this)
{
  CollectCardWin *v1; // edi@1
  unsigned int v2; // esi@5
  PgWinSpr *v3; // ecx@6
  unsigned int v4; // esi@9
  PgWinSpr *v5; // ecx@10
  unsigned int v6; // esi@13
  PgWinSpr *v7; // ecx@14
  unsigned int v8; // esi@17
  PgWinSpr *v9; // ecx@18

  v1 = this;
  if ( this->m_pkSerialText )
    ((void (__stdcall *)(_DWORD))this->m_pkSerialText->vfptr[118].__vecDelDtor)(&off_986A1E);
  if ( v1->m_pkNameText )
    ((void (__stdcall *)(_DWORD))v1->m_pkNameText->vfptr[118].__vecDelDtor)(9988639);
  v2 = 0;
  do
  {
    v3 = v1->m_kBorderSprs._Myfirst[v2];
    if ( v3 )
      ((void (__stdcall *)(_DWORD))v3->vfptr[64].__vecDelDtor)(0);
    ++v2;
  }
  while ( v2 < 4 );
  v4 = 0;
  do
  {
    v5 = v1->m_kStarSprs._Myfirst[v4];
    if ( v5 )
      ((void (__stdcall *)(_DWORD))v5->vfptr[64].__vecDelDtor)(0);
    ++v4;
  }
  while ( v4 < 9 );
  v6 = 0;
  do
  {
    v7 = v1->m_pkMobGradeTypeSprs._Myfirst[v6];
    if ( v7 )
      ((void (__stdcall *)(_DWORD))v7->vfptr[64].__vecDelDtor)(0);
    ++v6;
  }
  while ( v6 < 5 );
  v8 = 0;
  do
  {
    v9 = v1->m_pkMobTypeSprs._Myfirst[v8];
    if ( v9 )
      ((void (__stdcall *)(_DWORD))v9->vfptr[64].__vecDelDtor)(0);
    ++v8;
  }
  while ( v8 < 6 );
}
// 986A1E: using guessed type void *off_986A1E;

//----- (004E6A80) --------------------------------------------------------
void __thiscall CollectCardWin::ResetEffect(CollectCardWin *this)
{
  CollectCardWin *v1; // esi@1
  PgWinSpr *v2; // ecx@1

  v1 = this;
  CollectCardWin::Reset(this);
  v2 = v1->m_pkWhiteBlindSpr;
  v1->m_fPlayTime = 0.0;
  v1->m_fPlayStartTime = 0.0;
  *(_WORD *)&v1->m_bPlay = 0;
  v1->m_uiPlayCardID = 0;
  ((void (__stdcall *)(_DWORD))v2->vfptr[69].__vecDelDtor)(0.0);
  v1->vfptr[130].__vecDelDtor((NiRefObject *)v1, 1u);
}

//----- (004E6AD0) --------------------------------------------------------
void __thiscall CollectCardWin::SetType(CollectCardWin *this, const char *pcMobInx)
{
  int v2; // eax@1
  unsigned int v3; // eax@4
  char *v4; // eax@5
  char *v5; // edi@5
  char *v6; // eax@6
  char v7; // cl@7
  unsigned int v8; // eax@8
  signed int v9; // eax@13
  PgWinSpr *v10; // ecx@14
  signed int v11; // eax@16
  PgWinSpr *v12; // ecx@17
  CollectCardWin *v13; // [sp+0h] [bp-Ch]@1
  unsigned int i; // [sp+4h] [bp-8h]@4
  unsigned int v15; // [sp+8h] [bp-4h]@2

  v2 = *(_DWORD *)(ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 56);
  v13 = this;
  if ( v2 )
    v15 = *(_DWORD *)(v2 + 40);
  else
    v15 = 0;
  v3 = 0;
  i = 0;
  if ( v15 )
  {
    do
    {
      v4 = CDataReader::GetRecord((CDataReader *)(ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 4), v3);
      v5 = v4;
      if ( v4 )
      {
        v6 = v4 + 2;
        do
          v7 = *v6++;
        while ( v7 );
        v8 = v6 - (v5 + 3);
        if ( v8 == strlen(pcMobInx) )
        {
          if ( !strncmp(v5 + 2, pcMobInx, v8) )
            break;
          v5 = 0;
        }
      }
      v3 = i + 1;
      i = v3;
    }
    while ( v3 < v15 );
    if ( v5 )
    {
      v9 = *(_DWORD *)(v5 + 95);
      if ( v9 < 5 )
      {
        v10 = v13->m_pkMobGradeTypeSprs._Myfirst[v9];
        if ( v10 )
          ((void (__stdcall *)(signed int))v10->vfptr[64].__vecDelDtor)(1);
      }
      v11 = *(_DWORD *)(v5 + 99);
      if ( v11 < 6 )
      {
        v12 = v13->m_pkMobTypeSprs._Myfirst[v11];
        if ( v12 )
          ((void (__stdcall *)(signed int))v12->vfptr[64].__vecDelDtor)(1);
      }
    }
  }
}
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;

//----- (004E6BC0) --------------------------------------------------------
void __thiscall CollectCardWin::PlayCardEffect(CollectCardWin *this)
{
  CollectCardWin *v1; // esi@1
  unsigned int v2; // eax@1
  int v3; // ecx@1
  unsigned int v4; // ecx@2

  v1 = this;
  this->m_fPlayTime = 0.0;
  *(_WORD *)&this->m_bPlay = 1;
  this->m_fPlayStartTime = Timer::ms_fCurTime;
  this->m_fAlphaBlendValue = 0.0;
  v2 = rand();
  v3 = *(_DWORD *)(ITableBase<CollectCard,CollectCardTab>::ms_pkTable + 56);
  if ( v3 )
    v4 = *(_DWORD *)(v3 + 40);
  else
    v4 = 0;
  v1->m_uiPlayCardID = v2 % v4 + 1;
  v1->vfptr[130].__vecDelDtor((NiRefObject *)v1, 0);
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8C210: using guessed type int ITableBase<CollectCard,CollectCardTab>::ms_pkTable;

//----- (004E6C20) --------------------------------------------------------
void __thiscall CollectCardWin::~CollectCardWin(CollectCardWin *this)
{
  CollectCardWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&CollectCardWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CollectCardWin::`vftable'{for `IDirectMessenger'};
  if ( this->m_pkMobTypeSprs._Myfirst )
    operator delete(this->m_pkMobTypeSprs._Myfirst);
  v1->m_pkMobTypeSprs._Myfirst = 0;
  v1->m_pkMobTypeSprs._Mylast = 0;
  v1->m_pkMobTypeSprs._Myend = 0;
  if ( v1->m_pkMobGradeTypeSprs._Myfirst )
    operator delete(v1->m_pkMobGradeTypeSprs._Myfirst);
  v1->m_pkMobGradeTypeSprs._Myfirst = 0;
  v1->m_pkMobGradeTypeSprs._Mylast = 0;
  v1->m_pkMobGradeTypeSprs._Myend = 0;
  if ( v1->m_kStarSprs._Myfirst )
    operator delete(v1->m_kStarSprs._Myfirst);
  v1->m_kStarSprs._Myfirst = 0;
  v1->m_kStarSprs._Mylast = 0;
  v1->m_kStarSprs._Myend = 0;
  if ( v1->m_kBorderSprs._Myfirst )
    operator delete(v1->m_kBorderSprs._Myfirst);
  v1->m_kBorderSprs._Myfirst = 0;
  v1->m_kBorderSprs._Mylast = 0;
  v1->m_kBorderSprs._Myend = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 986B1C: using guessed type void (__thiscall *CollectCardWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 986B3C: using guessed type int (__thiscall *CollectCardWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004E6CE0) --------------------------------------------------------
void __thiscall CollectCardWin::CollectCardWin(CollectCardWin *this)
{
  CollectCardWin *v1; // esi@1
  int v2; // ecx@1
  char *v3; // ecx@1
  PgWinSpr **v4; // edx@1
  unsigned int v5; // eax@1
  char *v6; // edx@2
  unsigned int v7; // ecx@7
  unsigned int v8; // ecx@9
  int v9; // eax@14
  char *v10; // ecx@17
  PgWinSpr **v11; // edx@17
  int v12; // ebx@17
  unsigned int v13; // eax@17
  char *v14; // edx@18
  unsigned int v15; // eax@23
  unsigned int v16; // ecx@23
  unsigned int v17; // ecx@25
  int v18; // eax@30
  int v19; // edx@33
  int v20; // ebx@33
  char *v21; // ecx@33
  PgWinSpr **v22; // edx@33
  unsigned int v23; // eax@33
  char *v24; // edx@34
  int v25; // eax@35
  unsigned int v26; // eax@39
  unsigned int v27; // ecx@39
  unsigned int v28; // ecx@41
  int v29; // eax@46
  char *v30; // [sp+18h] [bp-14h]@2
  char *v31; // [sp+18h] [bp-14h]@18
  char *v32; // [sp+18h] [bp-14h]@34
  unsigned int v33; // [sp+1Ch] [bp-10h]@21
  unsigned int v34; // [sp+1Ch] [bp-10h]@37

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v2 = (int)&v1->m_kBorderSprs;
  v1->vfptr = (NiRefObjectVtbl *)&CollectCardWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CollectCardWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkSerialText = 0;
  v1->m_pkNameText = 0;
  v1->m_pkRankText = 0;
  v1->m_pkDescText = 0;
  v1->m_pkUnidentifiedSpr = 0;
  *(_DWORD *)v2 = 0;
  *(_DWORD *)(v2 + 4) = 0;
  *(_DWORD *)(v2 + 8) = 0;
  v1->m_kStarSprs._Myfirst = 0;
  v1->m_kStarSprs._Mylast = 0;
  v1->m_kStarSprs._Myend = 0;
  v1->m_pkMobGradeTypeSprs._Myfirst = 0;
  v1->m_pkMobGradeTypeSprs._Mylast = 0;
  v1->m_pkMobGradeTypeSprs._Myend = 0;
  v1->m_pkMobTypeSprs._Myfirst = 0;
  v1->m_pkMobTypeSprs._Mylast = 0;
  v1->m_pkMobTypeSprs._Myend = 0;
  v1->m_fPlayTime = 0.0;
  v1->m_fPlayStartTime = 0.0;
  v1->m_fAlphaBlendValue = 0.0;
  v1->m_uiOldXPos = 0;
  v1->m_uiOldYPos = 0;
  v1->m_uiCardID = 0;
  v1->m_uiSerial = 0;
  v1->m_pkWhiteBlindSpr = 0;
  *(_WORD *)&v1->m_bPlay = 0;
  v1->m_uiPlayCardID = 0;
  std::vector<PgWinText *,std::allocator<PgWinText *>>::resize(
    (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v1->m_kBorderSprs,
    4u);
  *v1->m_kBorderSprs._Myfirst = 0;
  *((_DWORD *)v1->m_kBorderSprs._Myfirst + 1) = 0;
  *((_DWORD *)v1->m_kBorderSprs._Myfirst + 2) = 0;
  *((_DWORD *)v1->m_kBorderSprs._Myfirst + 3) = 0;
  v3 = (char *)v1->m_kStarSprs._Mylast;
  v4 = v1->m_kStarSprs._Myfirst;
  v5 = v1->m_kStarSprs._Mylast - v4;
  if ( v5 <= 9 )
  {
    if ( v5 < 9 )
    {
      if ( 0x3FFFFFFF - (9 - v5) < v5 )
        std::_Xlength_error("vector<T> too long");
      v7 = v1->m_kStarSprs._Myend - v4;
      if ( v7 < 9 )
      {
        if ( 0x3FFFFFFF - (v7 >> 1) >= v7 )
          v8 = (v7 >> 1) + v7;
        else
          v8 = 0;
        if ( v8 < 9 )
          v8 = 9;
        std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
          (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&v1->m_kStarSprs,
          v8);
      }
      v9 = v1->m_kStarSprs._Mylast - v1->m_kStarSprs._Myfirst;
      if ( 9 != v9 )
        memset(v1->m_kStarSprs._Mylast, 0, 4 * (9 - v9));
      v1->m_kStarSprs._Mylast += 9 - (v1->m_kStarSprs._Mylast - v1->m_kStarSprs._Myfirst);
    }
  }
  else
  {
    v6 = (char *)(v4 + 9);
    v30 = v6;
    if ( v6 != v3 )
    {
      memmove(v6, v3, 0);
      v1->m_kStarSprs._Mylast = (PgWinSpr **)v30;
    }
  }
  *v1->m_kStarSprs._Myfirst = 0;
  *((_DWORD *)v1->m_kStarSprs._Myfirst + 1) = 0;
  *((_DWORD *)v1->m_kStarSprs._Myfirst + 2) = 0;
  *((_DWORD *)v1->m_kStarSprs._Myfirst + 3) = 0;
  *((_DWORD *)v1->m_kStarSprs._Myfirst + 4) = 0;
  *((_DWORD *)v1->m_kStarSprs._Myfirst + 5) = 0;
  *((_DWORD *)v1->m_kStarSprs._Myfirst + 6) = 0;
  *((_DWORD *)v1->m_kStarSprs._Myfirst + 7) = 0;
  *((_DWORD *)v1->m_kStarSprs._Myfirst + 8) = 0;
  v10 = (char *)v1->m_pkMobGradeTypeSprs._Mylast;
  v11 = v1->m_pkMobGradeTypeSprs._Myfirst;
  v12 = (int)&v1->m_pkMobGradeTypeSprs;
  v13 = v1->m_pkMobGradeTypeSprs._Mylast - v11;
  if ( v13 <= 5 )
  {
    if ( v13 < 5 )
    {
      v33 = v1->m_pkMobGradeTypeSprs._Mylast - v11;
      if ( 0x3FFFFFFF - (5 - v13) < v33 )
        std::_Xlength_error("vector<T> too long");
      v15 = 5 - v13 + v33;
      v16 = v1->m_pkMobGradeTypeSprs._Myend - v11;
      if ( v15 > v16 )
      {
        if ( 0x3FFFFFFF - (v16 >> 1) >= v16 )
          v17 = (v16 >> 1) + v16;
        else
          v17 = 0;
        if ( v17 < v15 )
          v17 = v15;
        std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
          (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&v1->m_pkMobGradeTypeSprs,
          v17);
      }
      v18 = v1->m_pkMobGradeTypeSprs._Mylast - v1->m_pkMobGradeTypeSprs._Myfirst;
      if ( 5 != v18 )
        memset(v1->m_pkMobGradeTypeSprs._Mylast, 0, 4 * (5 - v18));
      v12 = (int)&v1->m_pkMobGradeTypeSprs;
      v1->m_pkMobGradeTypeSprs._Mylast += 5 - (v1->m_pkMobGradeTypeSprs._Mylast - v1->m_pkMobGradeTypeSprs._Myfirst);
    }
  }
  else
  {
    v14 = (char *)(v11 + 5);
    v31 = v14;
    if ( v14 != v10 )
    {
      memmove(v14, v10, 0);
      v1->m_pkMobGradeTypeSprs._Mylast = (PgWinSpr **)v31;
    }
  }
  **(_DWORD **)v12 = 0;
  *(_DWORD *)(*(_DWORD *)v12 + 4) = 0;
  *(_DWORD *)(*(_DWORD *)v12 + 8) = 0;
  *(_DWORD *)(*(_DWORD *)v12 + 12) = 0;
  v19 = *(_DWORD *)v12;
  v20 = (int)&v1->m_pkMobTypeSprs;
  *(_DWORD *)(v19 + 16) = 0;
  v21 = (char *)v1->m_pkMobTypeSprs._Mylast;
  v22 = v1->m_pkMobTypeSprs._Myfirst;
  v23 = v1->m_pkMobTypeSprs._Mylast - v22;
  if ( v23 <= 6 )
  {
    if ( v23 < 6 )
    {
      v34 = v1->m_pkMobTypeSprs._Mylast - v22;
      if ( 0x3FFFFFFF - (6 - v23) < v34 )
        std::_Xlength_error("vector<T> too long");
      v26 = 6 - v23 + v34;
      v27 = v1->m_pkMobTypeSprs._Myend - v22;
      if ( v26 > v27 )
      {
        if ( 0x3FFFFFFF - (v27 >> 1) >= v27 )
          v28 = (v27 >> 1) + v27;
        else
          v28 = 0;
        if ( v28 < v26 )
          v28 = v26;
        std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
          (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&v1->m_pkMobTypeSprs,
          v28);
      }
      v29 = v1->m_pkMobTypeSprs._Mylast - v1->m_pkMobTypeSprs._Myfirst;
      if ( 6 != v29 )
        memset(v1->m_pkMobTypeSprs._Mylast, 0, 4 * (6 - v29));
      v20 = (int)&v1->m_pkMobTypeSprs;
      v25 = (int)&v1->m_pkMobTypeSprs._Mylast[6 - (v1->m_pkMobTypeSprs._Mylast - v1->m_pkMobTypeSprs._Myfirst)];
      goto LABEL_49;
    }
  }
  else
  {
    v24 = (char *)(v22 + 6);
    v32 = v24;
    if ( v24 != v21 )
    {
      memmove(v24, v21, 0);
      v25 = (int)v32;
LABEL_49:
      *(_DWORD *)(v20 + 4) = v25;
      goto LABEL_50;
    }
  }
LABEL_50:
  **(_DWORD **)v20 = 0;
  *(_DWORD *)(*(_DWORD *)v20 + 4) = 0;
  *(_DWORD *)(*(_DWORD *)v20 + 8) = 0;
  *(_DWORD *)(*(_DWORD *)v20 + 12) = 0;
  *(_DWORD *)(*(_DWORD *)v20 + 16) = 0;
  *(_DWORD *)(*(_DWORD *)v20 + 20) = 0;
}
// 986B1C: using guessed type void (__thiscall *CollectCardWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 986B3C: using guessed type int (__thiscall *CollectCardWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004E7160) --------------------------------------------------------
CollectCardWin *__cdecl CollectCardWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  CollectCardWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1DCu);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    CollectCardWin::CollectCardWin((CollectCardWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (CollectCardWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (004E7290) --------------------------------------------------------
char __thiscall CollectCardWin::Create(CollectCardWin *this, PgFrameWork *pkFrameWork)
{
  CollectCardWin *v2; // esi@1
  char *v3; // edi@3
  NiImageConverter *v4; // eax@3
  NiPixelData *v5; // eax@3
  NiSourceTexture *v6; // eax@4
  NiNode *v7; // esi@7
  char result; // al@11
  unsigned int v9; // eax@12
  NiSourceTexture *v10; // ecx@12
  unsigned int v11; // eax@12
  NiTexturePalette *v12; // edi@12
  const char *v13; // eax@14
  PgSprData *v14; // eax@16
  PgSprData *v15; // eax@18
  PgWinSpr *v16; // eax@18
  unsigned int v17; // edi@18
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v18; // eax@19
  const char *v19; // eax@21
  PgSprData *v20; // eax@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v21; // eax@22
  const char *v22; // eax@24
  PgSprData *v23; // eax@24
  PgWin *v24; // ST4C_4@24
  PgSprData *v25; // ST48_4@24
  int (*v26)(void); // edx@24
  int v27; // ST44_4@24
  int v28; // eax@24
  PgWinSpr *v29; // eax@24
  int v30; // edi@25
  const char *v31; // eax@26
  PgSprData *v32; // eax@26
  PgFrameWork *v33; // ecx@26
  PgWinSpr **v34; // edi@26
  PgFont *v35; // eax@28
  PgWinText *v36; // eax@28
  NiUnsharedGeometryGroup *v37; // eax@29
  NiUnsharedGeometryGroup *v38; // ecx@29
  char v39; // dl@30
  NiUnsharedGeometryGroup *v40; // eax@31
  NiUnsharedGeometryGroup *v41; // ecx@31
  char v42; // dl@32
  NiUnsharedGeometryGroup *v43; // eax@33
  NiUnsharedGeometryGroup *v44; // ecx@33
  char v45; // dl@34
  NiUnsharedGeometryGroup *v46; // eax@35
  NiUnsharedGeometryGroup *v47; // ecx@35
  char v48; // dl@36
  NiUnsharedGeometryGroup *v49; // eax@37
  const char *v50; // eax@39
  PgSprData *v51; // eax@41
  PgWinSpr **v52; // edi@41
  PgWinSpr *v53; // eax@41
  int v54; // ecx@41
  char *v55; // eax@42
  int v56; // edi@44
  bool v57; // zf@44
  NiUnsharedGeometryGroup *v58; // eax@45
  NiUnsharedGeometryGroup *v59; // ecx@45
  char v60; // dl@46
  NiUnsharedGeometryGroup *v61; // eax@47
  NiUnsharedGeometryGroup *v62; // ecx@47
  char v63; // dl@48
  NiUnsharedGeometryGroup *v64; // eax@49
  NiUnsharedGeometryGroup *v65; // ecx@49
  char v66; // dl@50
  NiUnsharedGeometryGroup *v67; // eax@51
  NiUnsharedGeometryGroup *v68; // ecx@51
  char v69; // dl@52
  NiUnsharedGeometryGroup *v70; // eax@53
  NiUnsharedGeometryGroup *v71; // ecx@53
  char v72; // dl@54
  NiUnsharedGeometryGroup *v73; // eax@55
  const char *v74; // eax@57
  PgSprData *v75; // eax@59
  PgWinSpr **v76; // edi@59
  PgWinSpr *v77; // eax@59
  int v78; // ecx@59
  char *v79; // eax@60
  int v80; // edi@62
  PgSprData *v81; // eax@63
  PgWinSpr *v82; // eax@63
  int v83; // eax@63
  unsigned int v84; // ST48_4@63
  NiSourceTexture *v85; // eax@63
  PgWinSpr *v86; // eax@63
  PgFont *v87; // eax@64
  PgWinText *v88; // eax@64
  PgFont *v89; // eax@66
  PgWinText *v90; // eax@66
  NiNode *v91; // esi@68
  unsigned int v92; // [sp+58h] [bp-324h]@0
  NiTexture::FormatPrefs kPrefs; // [sp+68h] [bp-314h]@5
  unsigned int uiHeight; // [sp+74h] [bp-308h]@1
  unsigned int uiWidth; // [sp+78h] [bp-304h]@1
  int v96; // [sp+7Ch] [bp-300h]@26
  NiPointer<NiNode> spNode; // [sp+80h] [bp-2FCh]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v98; // [sp+84h] [bp-2F8h]@18
  int iLeft; // [sp+88h] [bp-2F4h]@1
  int iTop; // [sp+8Ch] [bp-2F0h]@1
  PgFrameWork *v101; // [sp+90h] [bp-2ECh]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kRankNodeName[4]; // [sp+94h] [bp-2E8h]@18
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kMTNodeName[6]; // [sp+104h] [bp-278h]@45
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kMTToolTip[6]; // [sp+1ACh] [bp-1D0h]@45
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kMGTNodeName[5]; // [sp+254h] [bp-128h]@29
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kMGTToolTip[5]; // [sp+2E0h] [bp-9Ch]@29
  int v107; // [sp+378h] [bp-4h]@1

  v2 = this;
  v101 = pkFrameWork;
  spNode.m_pObject = 0;
  v107 = 0;
  uiWidth = 0;
  uiHeight = 0;
  iLeft = 0;
  iTop = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v3 = Folder::Merge(&Folder::m_acMenu, "Collect\\Max\\AncientStonie01.png");
  v4 = NiImageConverter::GetImageConverter();
  v5 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v4->vfptr[2].__vecDelDtor)(v4, v3, 0);
  if ( v5 )
  {
    kPrefs.m_ePixelLayout = 6;
    kPrefs.m_eAlphaFmt = 2;
    kPrefs.m_eMipMapped = 0;
    v6 = NiSourceTexture::Create(v5, &kPrefs);
  }
  else
  {
    v6 = 0;
  }
  v2->m_pkBaseTexture = v6;
  if ( !v6 )
    goto LABEL_74;
  v9 = ((int (__thiscall *)(NiSourceTexture *))v6->vfptr[15].__vecDelDtor)(v6);
  v10 = v2->m_pkBaseTexture;
  uiWidth = v9;
  v11 = ((int (*)(void))v10->vfptr[16].__vecDelDtor)();
  v12 = pTexturePalette;
  uiHeight = v11;
  if ( !Folder::m_bInit )
    Folder::Init();
  v13 = Folder::Merge(&Folder::m_acMenu, "Game\\Collect_BCard.nif");
  PgUtil::LoadNodeNifFile(v13, &spNode, v12);
  if ( !spNode.m_pObject )
    return 0;
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iLeft, &iTop, &uiWidth, &uiHeight) )
  {
LABEL_74:
    v7 = spNode.m_pObject;
    v107 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v7 )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    }
    return 0;
  }
  v14 = PgSprData::Create(v2->m_pkBaseTexture, 1, iLeft, iTop, uiWidth, uiHeight);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, iLeft, iTop, v14, 0, v101, "CollectCardWin", 0) )
  {
    v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iLeft, &iTop, 0);
    v16 = PgWinSpr::CreateWin(iLeft, iTop, v15, (PgWin *)&v2->vfptr, 0, 0);
    v16->vfptr[60].__vecDelDtor((NiRefObject *)v16, 0);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      kRankNodeName,
      "S");
    LOBYTE(v107) = 1;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &kRankNodeName[1],
      (const char *)&off_986A1E + 2);
    LOBYTE(v107) = 2;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &kRankNodeName[2],
      "B");
    LOBYTE(v107) = 3;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &kRankNodeName[3],
      "C");
    LOBYTE(v107) = 4;
    v17 = 0;
    v98 = kRankNodeName;
    do
    {
      v18 = v98;
      if ( v98->_Myres >= 0x10 )
        v18 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v98->_Bx._Ptr;
      v101 = (PgFrameWork *)spNode.m_pObject;
      v19 = fs("%sCardBack", v18);
      v20 = PgSprData::Create((NiAVObject *)v101, v19, &iLeft, &iTop, 0);
      v101 = (PgFrameWork *)&v2->m_kBorderSprs._Myfirst[v17];
      v101->vfptr = (IDirectMessengerVtbl *)PgWinSpr::CreateWin(iLeft, iTop, v20, (PgWin *)&v2->vfptr, 0, 0);
      ((void (__stdcall *)(_DWORD))v2->m_kBorderSprs._Myfirst[v17]->vfptr[64].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v2->m_kBorderSprs._Myfirst[v17]->vfptr[60].__vecDelDtor)(0);
      if ( v98->_Myres < 0x10 )
        v21 = v98;
      else
        v21 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v98->_Bx._Ptr;
      v101 = (PgFrameWork *)spNode.m_pObject;
      v22 = fs("%sCard", v21);
      v23 = PgSprData::Create((NiAVObject *)v101, v22, &iLeft, &iTop, 0);
      v24 = (PgWin *)&v2->m_kBorderSprs._Myfirst[v17]->vfptr;
      v25 = v23;
      v26 = (int (*)(void))v24->vfptr[42].__vecDelDtor;
      v101 = (PgFrameWork *)v2->m_kBorderSprs._Myfirst[v17];
      v27 = iTop - v26();
      v28 = ((int (*)(void))v101->vfptr[6].DirectDispatchToParent)();
      v29 = PgWinSpr::CreateWin(iLeft - v28, v27, v25, v24, 0, 0);
      v29->vfptr[60].__vecDelDtor((NiRefObject *)v29, 0);
      ++v98;
      ++v17;
    }
    while ( v17 < 4 );
    v30 = 0;
    do
    {
      v101 = (PgFrameWork *)spNode.m_pObject;
      v96 = v30 + 1;
      v31 = fs("Star%02d", v30 + 1);
      v32 = PgSprData::Create((NiAVObject *)v101, v31, &iLeft, &iTop, 0);
      v33 = (PgFrameWork *)(4 * v30);
      v34 = v2->m_kStarSprs._Myfirst;
      v101 = v33;
      *(PgWinSpr **)((char *)v34 + (_DWORD)v33) = PgWinSpr::CreateWin(iLeft, iTop, v32, (PgWin *)&v2->vfptr, 0, 0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)((char *)&v101->vfptr + (unsigned int)v2->m_kStarSprs._Myfirst) + 240))(0);
      v30 = v96;
    }
    while ( (unsigned int)v96 < 9 );
    if ( PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "SerialNumber",
           &iLeft,
           &iTop,
           &uiWidth,
           &uiHeight) )
    {
      v35 = Font::Get(0);
      v36 = PgWinText::CreateWin(iLeft, iTop, uiWidth, uiHeight, v35, (PgWin *)&v2->vfptr, 0, 0);
      v2->m_pkSerialText = v36;
      v36->vfptr[122].__vecDelDtor((NiRefObject *)v36, 4u);
      ((void (__stdcall *)(void *))v2->m_pkSerialText->vfptr[118].__vecDelDtor)(&unk_9869FB);
      ((void (__stdcall *)(_DWORD))v2->m_pkSerialText->vfptr[60].__vecDelDtor)(0);
    }
    kMGTNodeName[0]._Myres = 15;
    kMGTNodeName[0]._Mysize = 0;
    kMGTNodeName[0]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(kMGTNodeName, "AT_Normal", 9u);
    LOBYTE(v107) = 5;
    kMGTNodeName[1]._Myres = 15;
    kMGTNodeName[1]._Mysize = 0;
    kMGTNodeName[1]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&kMGTNodeName[1], "AT_Chief", 8u);
    LOBYTE(v107) = 6;
    kMGTNodeName[2]._Myres = 15;
    kMGTNodeName[2]._Mysize = 0;
    kMGTNodeName[2]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&kMGTNodeName[2], "AT_Boss", 7u);
    LOBYTE(v107) = 7;
    kMGTNodeName[3]._Myres = 15;
    kMGTNodeName[3]._Mysize = 0;
    kMGTNodeName[3]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&kMGTNodeName[3], "AT_Hero", 7u);
    LOBYTE(v107) = 8;
    kMGTNodeName[4]._Myres = 15;
    kMGTNodeName[4]._Mysize = 0;
    kMGTNodeName[4]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&kMGTNodeName[4], "AT_Elite", 8u);
    LOBYTE(v107) = 9;
    v37 = TextData::Get(0x23B3846u);
    v38 = v37;
    kMGTToolTip[0]._Myres = 15;
    kMGTToolTip[0]._Mysize = 0;
    kMGTToolTip[0]._Bx._Buf[0] = 0;
    v101 = (PgFrameWork *)((char *)&v37->vfptr + 1);
    do
    {
      v39 = (char)v38->vfptr;
      v38 = (NiUnsharedGeometryGroup *)((char *)v38 + 1);
    }
    while ( v39 );
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      kMGTToolTip,
      (const char *)v37,
      (char *)v38 - (char *)v101);
    LOBYTE(v107) = 10;
    v40 = TextData::Get(0xFB2A3C41);
    v41 = v40;
    kMGTToolTip[1]._Myres = 15;
    kMGTToolTip[1]._Mysize = 0;
    kMGTToolTip[1]._Bx._Buf[0] = 0;
    v101 = (PgFrameWork *)((char *)&v40->vfptr + 1);
    do
    {
      v42 = (char)v41->vfptr;
      v41 = (NiUnsharedGeometryGroup *)((char *)v41 + 1);
    }
    while ( v42 );
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kMGTToolTip[1],
      (const char *)v40,
      (char *)v41 - (char *)v101);
    LOBYTE(v107) = 11;
    v43 = TextData::Get(0xF0003D4D);
    v44 = v43;
    kMGTToolTip[2]._Myres = 15;
    kMGTToolTip[2]._Mysize = 0;
    kMGTToolTip[2]._Bx._Buf[0] = 0;
    v101 = (PgFrameWork *)((char *)&v43->vfptr + 1);
    do
    {
      v45 = (char)v44->vfptr;
      v44 = (NiUnsharedGeometryGroup *)((char *)v44 + 1);
    }
    while ( v45 );
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kMGTToolTip[2],
      (const char *)v43,
      (char *)v44 - (char *)v101);
    LOBYTE(v107) = 12;
    v46 = TextData::Get(0xE606394C);
    v47 = v46;
    kMGTToolTip[3]._Myres = 15;
    kMGTToolTip[3]._Mysize = 0;
    kMGTToolTip[3]._Bx._Buf[0] = 0;
    v101 = (PgFrameWork *)((char *)&v46->vfptr + 1);
    do
    {
      v48 = (char)v47->vfptr;
      v47 = (NiUnsharedGeometryGroup *)((char *)v47 + 1);
    }
    while ( v48 );
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kMGTToolTip[3],
      (const char *)v46,
      (char *)v47 - (char *)v101);
    LOBYTE(v107) = 13;
    v49 = TextData::Get(0xFF2B4B41);
    kMGTToolTip[4]._Myres = 15;
    kMGTToolTip[4]._Mysize = 0;
    kMGTToolTip[4]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kMGTToolTip[4],
      (const char *)v49,
      strlen((const char *)v49));
    LOBYTE(v107) = 14;
    v96 = 0;
    v98 = 0;
    v101 = (PgFrameWork *)5;
    do
    {
      if ( *(char **)((char *)&v98->_Bx._Ptr + (_DWORD)kMGTNodeName + 20) < (char *)0x10 )
        v50 = &v98->_Bx._Buf[(_DWORD)kMGTNodeName];
      else
        v50 = *(char **)((char *)&v98->_Bx._Ptr + (_DWORD)kMGTNodeName);
      v51 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, v50, &iLeft, &iTop, 0);
      v52 = (PgWinSpr **)((char *)v2->m_pkMobGradeTypeSprs._Myfirst + v96);
      v53 = PgWinSpr::CreateWin(iLeft, iTop, v51, (PgWin *)&v2->vfptr, 0, 0);
      v54 = v96;
      *v52 = v53;
      (*(PgWinSpr **)((char *)v2->m_pkMobGradeTypeSprs._Myfirst + v54))->m_pkToolTipWin = g_pkToolTipWin;
      if ( *(char **)((char *)&v98->_Bx._Ptr + (_DWORD)kMGTToolTip + 20) < (char *)0x10 )
        v55 = &v98->_Bx._Buf[(_DWORD)kMGTToolTip];
      else
        v55 = *(char **)((char *)&v98->_Bx._Ptr + (_DWORD)kMGTToolTip);
      v56 = v96;
      PgWin::SetToolTipWinText(*(PgWin **)((char *)v2->m_pkMobGradeTypeSprs._Myfirst + v96), v55);
      ++v98;
      v57 = v101 == (PgFrameWork *)1;
      v101 = (PgFrameWork *)((char *)v101 - 1);
      v96 = v56 + 4;
    }
    while ( !v57 );
    kMTNodeName[0]._Myres = 15;
    kMTNodeName[0]._Mysize = 0;
    kMTNodeName[0]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(kMTNodeName, "MT_Human", 8u);
    LOBYTE(v107) = 15;
    kMTNodeName[1]._Myres = 15;
    kMTNodeName[1]._Mysize = 0;
    kMTNodeName[1]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&kMTNodeName[1], "MT_Magiclife", 0xCu);
    LOBYTE(v107) = 16;
    kMTNodeName[2]._Myres = 15;
    kMTNodeName[2]._Mysize = 0;
    kMTNodeName[2]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&kMTNodeName[2], "MT_Spirit", 9u);
    LOBYTE(v107) = 17;
    kMTNodeName[3]._Myres = 15;
    kMTNodeName[3]._Mysize = 0;
    kMTNodeName[3]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&kMTNodeName[3], "MT_Beast", 8u);
    LOBYTE(v107) = 18;
    kMTNodeName[4]._Myres = 15;
    kMTNodeName[4]._Mysize = 0;
    kMTNodeName[4]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&kMTNodeName[4], "MT_Elemental", 0xCu);
    LOBYTE(v107) = 19;
    kMTNodeName[5]._Myres = 15;
    kMTNodeName[5]._Mysize = 0;
    kMTNodeName[5]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&kMTNodeName[5], "MT_Undead", 9u);
    LOBYTE(v107) = 20;
    v58 = TextData::Get(0xA9F5E9F8);
    v59 = v58;
    kMTToolTip[0]._Myres = 15;
    kMTToolTip[0]._Mysize = 0;
    kMTToolTip[0]._Bx._Buf[0] = 0;
    v101 = (PgFrameWork *)((char *)&v58->vfptr + 1);
    do
    {
      v60 = (char)v59->vfptr;
      v59 = (NiUnsharedGeometryGroup *)((char *)v59 + 1);
    }
    while ( v60 );
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      kMTToolTip,
      (const char *)v58,
      (char *)v59 - (char *)v101);
    LOBYTE(v107) = 21;
    v61 = TextData::Get(0xE134373B);
    v62 = v61;
    kMTToolTip[1]._Myres = 15;
    kMTToolTip[1]._Mysize = 0;
    kMTToolTip[1]._Bx._Buf[0] = 0;
    v101 = (PgFrameWork *)((char *)&v61->vfptr + 1);
    do
    {
      v63 = (char)v62->vfptr;
      v62 = (NiUnsharedGeometryGroup *)((char *)v62 + 1);
    }
    while ( v63 );
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kMTToolTip[1],
      (const char *)v61,
      (char *)v62 - (char *)v101);
    LOBYTE(v107) = 22;
    v64 = TextData::Get(0xF8FBFAF4);
    v65 = v64;
    kMTToolTip[2]._Myres = 15;
    kMTToolTip[2]._Mysize = 0;
    kMTToolTip[2]._Bx._Buf[0] = 0;
    v101 = (PgFrameWork *)((char *)&v64->vfptr + 1);
    do
    {
      v66 = (char)v65->vfptr;
      v65 = (NiUnsharedGeometryGroup *)((char *)v65 + 1);
    }
    while ( v66 );
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kMTToolTip[2],
      (const char *)v64,
      (char *)v65 - (char *)v101);
    LOBYTE(v107) = 23;
    v67 = TextData::Get(0x99F5FBEC);
    v68 = v67;
    kMTToolTip[3]._Myres = 15;
    kMTToolTip[3]._Mysize = 0;
    kMTToolTip[3]._Bx._Buf[0] = 0;
    v101 = (PgFrameWork *)((char *)&v67->vfptr + 1);
    do
    {
      v69 = (char)v68->vfptr;
      v68 = (NiUnsharedGeometryGroup *)((char *)v68 + 1);
    }
    while ( v69 );
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kMTToolTip[3],
      (const char *)v67,
      (char *)v68 - (char *)v101);
    LOBYTE(v107) = 24;
    v70 = TextData::Get(0xEE353644);
    v71 = v70;
    kMTToolTip[4]._Myres = 15;
    kMTToolTip[4]._Mysize = 0;
    kMTToolTip[4]._Bx._Buf[0] = 0;
    v101 = (PgFrameWork *)((char *)&v70->vfptr + 1);
    do
    {
      v72 = (char)v71->vfptr;
      v71 = (NiUnsharedGeometryGroup *)((char *)v71 + 1);
    }
    while ( v72 );
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kMTToolTip[4],
      (const char *)v70,
      (char *)v71 - (char *)v101);
    LOBYTE(v107) = 25;
    v73 = TextData::Get(0xE6F5EDEF);
    kMTToolTip[5]._Myres = 15;
    kMTToolTip[5]._Mysize = 0;
    kMTToolTip[5]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kMTToolTip[5],
      (const char *)v73,
      strlen((const char *)v73));
    LOBYTE(v107) = 26;
    v96 = 0;
    v98 = 0;
    v101 = (PgFrameWork *)6;
    do
    {
      if ( *(char **)((char *)&v98->_Bx._Ptr + (_DWORD)kMTNodeName + 20) < (char *)0x10 )
        v74 = &v98->_Bx._Buf[(_DWORD)kMTNodeName];
      else
        v74 = *(char **)((char *)&v98->_Bx._Ptr + (_DWORD)kMTNodeName);
      v75 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, v74, &iLeft, &iTop, 0);
      v76 = (PgWinSpr **)((char *)v2->m_pkMobTypeSprs._Myfirst + v96);
      v77 = PgWinSpr::CreateWin(iLeft, iTop, v75, (PgWin *)&v2->vfptr, 0, 0);
      v78 = v96;
      *v76 = v77;
      (*(PgWinSpr **)((char *)v2->m_pkMobTypeSprs._Myfirst + v78))->m_pkToolTipWin = g_pkToolTipWin;
      if ( *(char **)((char *)&v98->_Bx._Ptr + (_DWORD)kMTToolTip + 20) < (char *)0x10 )
        v79 = &v98->_Bx._Buf[(_DWORD)kMTToolTip];
      else
        v79 = *(char **)((char *)&v98->_Bx._Ptr + (_DWORD)kMTToolTip);
      v80 = v96;
      PgWin::SetToolTipWinText(*(PgWin **)((char *)v2->m_pkMobTypeSprs._Myfirst + v96), v79);
      ++v98;
      v57 = v101 == (PgFrameWork *)1;
      v101 = (PgFrameWork *)((char *)v101 - 1);
      v96 = v80 + 4;
    }
    while ( !v57 );
    v81 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Unidentified", &iLeft, &iTop, 0);
    v82 = PgWinSpr::CreateWin(iLeft, iTop, v81, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkUnidentifiedSpr = v82;
    v82->vfptr[60].__vecDelDtor((NiRefObject *)v82, 0);
    v83 = ((int (__thiscall *)(CollectCardWin *))v2->vfptr[37].__vecDelDtor)(v2);
    v84 = (int)v2->vfptr[36].__vecDelDtor((NiRefObject *)v2, v83);
    v85 = PgUtil::Create1PixelSourceTexture(-1, -1, -1, -1);
    v86 = PgWinSpr::CreateWin(v85, 0, 0, v84, (unsigned int)v2, 0, 0, v92);
    v2->m_pkWhiteBlindSpr = v86;
    ((void (__thiscall *)(PgWinSpr *))v86->vfptr[69].__vecDelDtor)(v86);
    ((void (__stdcall *)(signed int))v2->m_pkWhiteBlindSpr->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v2->m_pkWhiteBlindSpr->vfptr[60].__vecDelDtor)(0);
    if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Title", &iLeft, &iTop, &uiWidth, &uiHeight) )
    {
      v87 = Font::Get(0);
      v88 = PgWinText::CreateWin(iLeft, iTop, uiWidth, uiHeight, v87, (PgWin *)&v2->vfptr, 0, 0);
      v2->m_pkNameText = v88;
      v88->vfptr[122].__vecDelDtor((NiRefObject *)v88, 5u);
      ((void (__stdcall *)(void *))v2->m_pkNameText->vfptr[118].__vecDelDtor)(&unk_986A02);
      ((void (__stdcall *)(_DWORD))v2->m_pkNameText->vfptr[60].__vecDelDtor)(0);
    }
    if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Text", &iLeft, &iTop, &uiWidth, &uiHeight) )
    {
      v89 = Font::Get(0);
      v90 = PgWinText::CreateWin(iLeft, iTop, uiWidth, uiHeight, v89, (PgWin *)&v2->vfptr, 0, 0);
      v2->m_pkDescText = v90;
      v90->vfptr[122].__vecDelDtor((NiRefObject *)v90, 5u);
      ((void (__stdcall *)(void *))v2->m_pkDescText->vfptr[118].__vecDelDtor)(&unk_986A03);
      ((void (__stdcall *)(_DWORD))v2->m_pkDescText->vfptr[60].__vecDelDtor)(0);
    }
    ((void (__thiscall *)(CollectCardWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    LOBYTE(v107) = 20;
    `eh vector destructor iterator'(
      kMTToolTip,
      0x1Cu,
      6,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    LOBYTE(v107) = 14;
    `eh vector destructor iterator'(
      kMTNodeName,
      0x1Cu,
      6,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    LOBYTE(v107) = 9;
    `eh vector destructor iterator'(
      kMGTToolTip,
      0x1Cu,
      5,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    LOBYTE(v107) = 4;
    `eh vector destructor iterator'(
      kMGTNodeName,
      0x1Cu,
      5,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    LOBYTE(v107) = 0;
    `eh vector destructor iterator'(
      kRankNodeName,
      0x1Cu,
      4,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    v107 = -1;
    if ( spNode.m_pObject )
    {
      v91 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v91 )
          v91->vfptr->__vecDelDtor((NiRefObject *)v91, 1u);
      }
    }
    result = 1;
  }
  else
  {
    v107 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    result = 0;
  }
  return result;
}
// 986A1E: using guessed type void *off_986A1E;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004E8160) --------------------------------------------------------
void __thiscall CollectCardWin::SetSerial(CollectCardWin *this, unsigned int uiSerial, unsigned int uiSeason, unsigned int uiGrade)
{
  NiUnsharedGeometryGroup *v4; // esi@4
  NiUnsharedGeometryGroup *v5; // esi@4
  NiUnsharedGeometryGroup *v6; // esi@4
  NiUnsharedGeometryGroup *v7; // esi@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v8; // eax@4
  bool v9; // cf@4
  NiRefObjectVtbl *v10; // edi@6
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v11; // ST08_4@6
  char *v12; // eax@6
  char *v13; // eax@6
  CollectCardWin *v14; // [sp+18h] [bp-84h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kGrade[4]; // [sp+1Ch] [bp-80h]@4
  int v16; // [sp+98h] [bp-4h]@4

  v14 = this;
  if ( !this->m_bPlay && uiGrade < 4 && this->m_pkSerialText )
  {
    ((void (__stdcall *)(signed int))this->m_pkSerialText->vfptr[64].__vecDelDtor)(1);
    kGrade[0]._Myres = 15;
    kGrade[0]._Mysize = 0;
    kGrade[0]._Bx._Buf[0] = 0;
    v4 = TextData2::Get(0xFF43606C);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      kGrade,
      (const char *)v4,
      strlen((const char *)v4));
    v16 = 0;
    v5 = TextData2::Get(0xFF434E6C);
    kGrade[1]._Myres = 15;
    kGrade[1]._Mysize = 0;
    kGrade[1]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kGrade[1],
      (const char *)v5,
      strlen((const char *)v5));
    LOBYTE(v16) = 1;
    v6 = TextData2::Get(0xFF434F6C);
    kGrade[2]._Myres = 15;
    kGrade[2]._Mysize = 0;
    kGrade[2]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kGrade[2],
      (const char *)v6,
      strlen((const char *)v6));
    LOBYTE(v16) = 2;
    v7 = TextData2::Get(0xFF43506C);
    kGrade[3]._Myres = 15;
    kGrade[3]._Mysize = 0;
    kGrade[3]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kGrade[3],
      (const char *)v7,
      strlen((const char *)v7));
    v8 = &kGrade[uiGrade];
    v9 = v8->_Myres < 0x10;
    v16 = 3;
    if ( !v9 )
      v8 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v8->_Bx._Ptr;
    v10 = v14->m_pkSerialText->vfptr;
    v11 = v8;
    v12 = (char *)TextData2::Get(0x73A0CCBBu);
    v13 = fs(
            v12,
            uiSeason,
            v11,
            (char)(uiSerial / 0xF4240 + 64),
            (uiSerial % 0xF4240 - uiSerial % 0x2710) / 0x2710,
            uiSerial % 0x2710);
    v10[118].__vecDelDtor((NiRefObject *)v14->m_pkSerialText, (unsigned int)v13);
    v16 = -1;
    `eh vector destructor iterator'(
      kGrade,
      0x1Cu,
      4,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
  }
}

//----- (004E83A0) --------------------------------------------------------
void __thiscall CollectCardWin::SetDesc(CollectCardWin *this, char *pcDesc)
{
  char *v2; // edi@1
  CollectCardWin *v3; // esi@1
  char *v4; // eax@2
  PgWinText *v5; // ecx@2
  const char *v6; // ebx@3
  unsigned int v7; // eax@3
  const char *v8; // edx@3
  void *v9; // eax@7
  int iPixelSize; // [sp+10h] [bp-40h]@2
  PgFont *pkFont; // [sp+14h] [bp-3Ch]@2
  CollectCardWin *v12; // [sp+18h] [bp-38h]@1
  char *pcText; // [sp+1Ch] [bp-34h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kDescText; // [sp+24h] [bp-2Ch]@2
  int v15; // [sp+4Ch] [bp-4h]@2

  v2 = pcDesc;
  v3 = this;
  v12 = this;
  if ( this->m_pkDescText )
  {
    kDescText._Myres = 15;
    kDescText._Mysize = 0;
    kDescText._Bx._Buf[0] = 0;
    v15 = 0;
    fs(0);
    v4 = fs(0);
    v5 = v3->m_pkDescText;
    pcText = v4;
    pkFont = v5->m_spTextGeom.m_pObject->m_spPgFont.m_pObject;
    iPixelSize = ((int (*)(void))v5->vfptr[36].__vecDelDtor)();
    if ( strlen(pcDesc) )
    {
      do
      {
        v6 = CSpFont::SplitStrByPixelSize((CSpFont *)&pkFont->vfptr, v2, iPixelSize, 0);
        strncpy(pcText, v2, v6 - v2);
        pcText[v6 - v2] = 0;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&kDescText, pcText, strlen(pcText));
        v7 = strlen(v6);
        v8 = "\n";
        if ( !v7 )
          v8 = (const char *)&unk_986A13;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&kDescText, v8, strlen(v8));
        v2 = (char *)v6;
      }
      while ( strlen(v6) );
      v3 = v12;
    }
    v9 = kDescText._Bx._Ptr;
    if ( kDescText._Myres < 0x10 )
      v9 = &kDescText;
    ((void (__stdcall *)(void *))v3->m_pkDescText->vfptr[118].__vecDelDtor)(v9);
    if ( kDescText._Myres >= 0x10 )
      operator delete(kDescText._Bx._Ptr);
  }
}

//----- (004E8530) --------------------------------------------------------
void __thiscall CollectCardWin::SetInfo(CollectCardWin *this, unsigned int uiCardID, unsigned int uiStar, unsigned int uiSerial, int bUnidentified)
{
  CollectCardWin *v5; // esi@1
  int v6; // eax@8
  unsigned int v7; // edi@8
  char *v8; // ebx@12
  CollectCardView *v9; // edi@16
  PgWinText *v10; // ecx@17
  PgWinSpr *v11; // ecx@19
  CollectCardGroupDesc *v12; // eax@22
  int v13; // ST08_4@23
  char *v14; // eax@23
  char *v15; // eax@23
  char *v16; // eax@26
  const char *v17; // eax@26
  NiSourceTexture *v18; // eax@26
  PgWinSpr *v19; // ecx@28
  unsigned int v20; // [sp+4h] [bp-4h]@9

  v5 = this;
  if ( this->m_bPlay
    || this->m_bOpenCard
    || !(unsigned __int8)((int (*)(void))this->vfptr[65].__vecDelDtor)()
    || v5->m_uiCardID != uiCardID
    || v5->m_uiSerial != uiSerial )
  {
    CollectCardWin::Reset(v5);
    if ( !v5->m_bPlay )
    {
      v5->m_uiCardID = uiCardID;
      v5->m_uiSerial = uiSerial;
      v5->m_uiStar = uiStar;
    }
    v6 = *(_DWORD *)(ITableBase<CollectCard,CollectCardTab>::ms_pkTable + 56);
    v7 = 0;
    v20 = v6 ? *(_DWORD *)(v6 + 40) : 0;
    if ( v20 > 0 )
    {
      while ( 1 )
      {
        v8 = CDataReader::GetRecord((CDataReader *)(ITableBase<CollectCard,CollectCardTab>::ms_pkTable + 4), v7);
        if ( v8 )
        {
          if ( *(_WORD *)v8 == (_WORD)uiCardID )
            break;
        }
        if ( ++v7 >= v20 )
          return;
      }
      v9 = CollectCardViewTab::GetByCardID(uiCardID);
      if ( v9 )
      {
        v10 = v5->m_pkNameText;
        if ( v10 )
          ((void (__stdcall *)(char *))v10->vfptr[118].__vecDelDtor)(v9->CC_CardName);
        v11 = v5->m_pkUnidentifiedSpr;
        if ( v11 )
          ((void (__stdcall *)(int))v11->vfptr[64].__vecDelDtor)(bUnidentified);
        if ( (_BYTE)bUnidentified )
        {
          v12 = CollectCardGroupDescTab::GetByCardMobGroup(*(CardMobGroupIndex *)(v8 + 38));
          if ( v12 )
          {
            v13 = (int)v12->CC_MobGroupName;
            v14 = (char *)TextData2::Get(0xFEAD796C);
            v15 = fs(v14, v13);
            CollectCardWin::SetDesc(v5, v15);
          }
        }
        else
        {
          if ( !Folder::m_bInit )
            Folder::Init();
          v16 = Folder::Merge(&Folder::m_acMenu, "Collect\\Max\\%s.png");
          v17 = fs(v16, v9->CC_CardFileName);
          v18 = CollectCardWin::LoadImageFile(v17);
          if ( v18 )
            v5->vfptr[113].__vecDelDtor((NiRefObject *)v5, (unsigned int)v18);
          v19 = v5->m_kBorderSprs._Myfirst[*(_DWORD *)(v8 + 34)];
          if ( v19 )
            ((void (__stdcall *)(signed int))v19->vfptr[64].__vecDelDtor)(1);
          CollectCardWin::SetType(v5, v9->CC_MobInx);
          CollectCardWin::SetSerial(v5, uiSerial, v9->CC_CardSeason, *(_DWORD *)(v8 + 34));
          CollectCardWin::SetStar(v5, uiStar);
          CollectCardWin::SetDesc(v5, v9->CC_CardDesc);
        }
      }
    }
  }
}
// A8975C: using guessed type bool Folder::m_bInit;
// A8C210: using guessed type int ITableBase<CollectCard,CollectCardTab>::ms_pkTable;

//----- (004E8720) --------------------------------------------------------
void __thiscall CollectCardWin::UpdatePlay(CollectCardWin *this, float fCurTime)
{
  CollectCardWin *v2; // esi@1
  float v3; // ST14_4@2
  float v4; // ST14_4@3
  double v5; // st7@5
  GameFrameWork *v6; // eax@6
  double v7; // st7@8
  unsigned int v8; // ecx@9
  unsigned int v9; // eax@9
  int v10; // ecx@9
  unsigned int v11; // ecx@10
  int v12; // edx@12
  unsigned int v13; // eax@12
  int v14; // edx@12
  float fCurTimea; // [sp+14h] [bp+8h]@8

  v2 = this;
  if ( this->m_bPlay )
  {
    v3 = Timer::ms_fDeltaTime + this->m_fPlayTime;
    this->m_fPlayTime = v3;
    if ( v3 <= 4.0 )
      goto LABEL_17;
    v4 = Timer::ms_fDeltaTime + Timer::ms_fDeltaTime + this->m_fAlphaBlendValue;
    this->m_fAlphaBlendValue = v4;
    if ( v4 > 1.0 )
      this->m_fAlphaBlendValue = 1.0;
    ((void (__stdcall *)(_DWORD))this->m_pkWhiteBlindSpr->vfptr[69].__vecDelDtor)(this->m_fAlphaBlendValue);
    v5 = v2->m_fAlphaBlendValue;
    if ( 1.0 != v5 )
    {
LABEL_17:
      v7 = fCurTime;
      fCurTimea = fCurTime - v2->m_fPlayStartTime;
      if ( fCurTimea > 0.035 )
      {
        v8 = v2->m_uiPlayCardID;
        v2->m_fPlayStartTime = v7;
        CollectCardWin::SetInfo(v2, v8, 0, 0, 0);
        v9 = rand();
        v10 = *(_DWORD *)(ITableBase<CollectCard,CollectCardTab>::ms_pkTable + 56);
        if ( v10 )
          v11 = *(_DWORD *)(v10 + 40);
        else
          v11 = 0;
        v12 = v9 % v11;
        v13 = v2->m_uiPlayCardID;
        v14 = v12 + 1;
        if ( v14 == v13 )
          v14 = v13 + 1;
        v2->m_uiPlayCardID = v14;
      }
    }
    else
    {
      v2->m_bPlay = 0;
      v6 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v6 )
        GameFrameWork::OpenCard(v6, v5);
    }
  }
}
// A8B980: using guessed type float Timer::ms_fDeltaTime;
// A8C210: using guessed type int ITableBase<CollectCard,CollectCardTab>::ms_pkTable;

//----- (004E8860) --------------------------------------------------------
void __thiscall CollectCardWin::UpdateMeWin(CollectCardWin *this, float fCurTime)
{
  CollectCardWin *v2; // esi@1

  v2 = this;
  CollectCardWin::UpdatePlay(this, fCurTime);
  CollectCardWin::UpdateOpen(v2, fCurTime);
}

//----- (004E8890) --------------------------------------------------------
CollectCardGroupDesc *__cdecl CollectCardGroupDescTab::GetByCardMobGroup(CardMobGroupIndex Type)
{
  int v1; // eax@1
  unsigned int v2; // edi@2
  unsigned int v3; // esi@4
  CollectCardGroupDesc *result; // eax@5

  v1 = *(_DWORD *)(ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::ms_pkTable + 56);
  if ( v1 )
    v2 = *(_DWORD *)(v1 + 40);
  else
    v2 = 0;
  v3 = 0;
  if ( v2 )
  {
    while ( 1 )
    {
      result = (CollectCardGroupDesc *)CDataReader::GetRecord(
                                         (CDataReader *)(ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::ms_pkTable
                                                       + 4),
                                         v3);
      if ( result )
      {
        if ( result->CC_CardMobGroup == Type )
          break;
      }
      if ( ++v3 >= v2 )
        goto LABEL_8;
    }
  }
  else
  {
LABEL_8:
    result = 0;
  }
  return result;
}
// A8C218: using guessed type int ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::ms_pkTable;

//----- (004E88E0) --------------------------------------------------------
CollectCardWin *__thiscall CollectCardWin::`vector deleting destructor'(CollectCardWin *this, unsigned int a2)
{
  CollectCardWin *v2; // esi@1

  v2 = this;
  CollectCardWin::~CollectCardWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (004E8910) --------------------------------------------------------
void __thiscall CardSlotWin::Select(CardSlotWin *this, bool bSelect)
{
  if ( this->m_pkBlindSpr )
    ((void (__stdcall *)(_DWORD))this->m_pkBlindSpr->vfptr[64].__vecDelDtor)(bSelect == 0);
}

//----- (004E8940) --------------------------------------------------------
void __thiscall CollectRwItemWin::CollectRwItemWin(CollectRwItemWin *this)
{
  CollectRwItemWin *v1; // esi@1

  v1 = this;
  PgWinBut::PgWinBut((PgWinBut *)&this->vfptr);
  v1->m_pkDisableSpr = 0;
  v1->m_pkEffectSpr = 0;
  v1->m_eRewardStateType = 0;
  v1->m_uiRewardID = 0;
  v1->vfptr = (NiRefObjectVtbl *)&CollectRwItemWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CollectRwItemWin::`vftable'{for `IDirectMessenger'};
}
// 987050: using guessed type void (__thiscall *CollectRwItemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98706C: using guessed type int (__thiscall *CollectRwItemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004E8980) --------------------------------------------------------
void __thiscall CollectRwItemWin::~CollectRwItemWin(CollectRwItemWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&CollectRwItemWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CollectRwItemWin::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
}
// 987050: using guessed type void (__thiscall *CollectRwItemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98706C: using guessed type int (__thiscall *CollectRwItemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004E89A0) --------------------------------------------------------
CollectRwItemWin::eRewardStateType __thiscall CollectRwItemWin::GetState(CollectRwItemWin *this)
{
  return this->m_eRewardStateType;
}

//----- (004E89B0) --------------------------------------------------------
void __thiscall CollectRwItemWin::Reset(CollectRwItemWin *this)
{
  CollectRwItemWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkDisableSpr->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkEffectSpr->vfptr[64].__vecDelDtor)(0);
}

//----- (004E89E0) --------------------------------------------------------
void __thiscall CollectRwChoiceInv::CollectRwChoiceInv(CollectRwChoiceInv *this)
{
  CollectRwChoiceInv *v1; // esi@1

  v1 = this;
  ItemIcon::ItemIcon((ItemIcon *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&CollectRwChoiceInv::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CollectRwChoiceInv::`vftable'{for `IDirectMessenger'};
  v1->m_bSelect = 0;
}
// 9872A4: using guessed type void (__thiscall *CollectRwChoiceInv::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9872C4: using guessed type int (__thiscall *CollectRwChoiceInv::`vftable'{for `NiNode'})(void *p, char);

//----- (004E8A10) --------------------------------------------------------
void __thiscall CollectRwChoiceInv::~CollectRwChoiceInv(CollectRwChoiceInv *this)
{
  this->vfptr = (NiRefObjectVtbl *)&CollectRwChoiceInv::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CollectRwChoiceInv::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
}
// 9872A4: using guessed type void (__thiscall *CollectRwChoiceInv::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9872C4: using guessed type int (__thiscall *CollectRwChoiceInv::`vftable'{for `NiNode'})(void *p, char);

//----- (004E8A40) --------------------------------------------------------
void __thiscall CollectRwChoiceInv::Select(CollectRwChoiceInv *this, bool bSelect)
{
  this->m_bSelect = bSelect;
}

//----- (004E8A50) --------------------------------------------------------
void __thiscall CollectRwChoiceWin::OnCancel(CollectRwChoiceWin *this)
{
  this->m_bSelect = 0;
  this->m_uiSelectIndex = 0;
  PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
}

//----- (004E8A70) --------------------------------------------------------
void __thiscall CollectCardChoiceWin::OnCancel(CollectCardChoiceWin *this)
{
  this->m_bSelect = 0;
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
}

//----- (004E8A90) --------------------------------------------------------
void __thiscall CollectPopupWin::CollectPopupWin(CollectPopupWin *this)
{
  CollectPopupWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_fStartTime = 0.0;
  v1->m_pkLeftSpr = 0;
  v1->m_pkMiddleSpr = 0;
  v1->m_pkRightSpr = 0;
  v1->m_pkText = 0;
  v1->m_iMiddleXPos = 0;
  v1->vfptr = (NiRefObjectVtbl *)&CollectPopupWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CollectPopupWin::`vftable'{for `IDirectMessenger'};
}
// 987530: using guessed type void (__thiscall *CollectPopupWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98754C: using guessed type int (__thiscall *CollectPopupWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004E8AE0) --------------------------------------------------------
void __thiscall CollectPopupWin::~CollectPopupWin(CollectPopupWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&CollectPopupWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CollectPopupWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 987530: using guessed type void (__thiscall *CollectPopupWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98754C: using guessed type int (__thiscall *CollectPopupWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004E8B00) --------------------------------------------------------
void __thiscall CollectPopupWin::OnCommand(CollectPopupWin *this, unsigned int wParam, int lParam)
{
  if ( !wParam )
    PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
}

//----- (004E8B20) --------------------------------------------------------
void __thiscall CollectPopupWin::UpdateMeWin(CollectPopupWin *this, float fCurTime)
{
  if ( fCurTime - this->m_fStartTime > 3.0 )
    PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
}

//----- (004E8B50) --------------------------------------------------------
void __userpurge CollectPopupWin::SetText(CollectPopupWin *this@<ecx>, int a2@<ebx>, int a3@<edi>, const char *pcText)
{
  CollectPopupWin *v4; // esi@1
  unsigned int v5; // edi@2
  PgWinSpr *v6; // ecx@4
  NiRefObjectVtbl *v7; // ebx@4
  PgWinSpr *v8; // edi@4
  int v9; // eax@4
  NiRefObjectVtbl *v10; // ebx@4
  PgWinSpr *v11; // edi@4
  int v12; // eax@4
  tagSIZE kSize; // [sp+4h] [bp-8h]@2
  const char *pcTexta; // [sp+14h] [bp+8h]@4
  const char *pcTextb; // [sp+14h] [bp+8h]@4

  v4 = this;
  if ( this->m_pkText )
  {
    ((void (__stdcall *)(const char *, int, int))this->m_pkText->vfptr[118].__vecDelDtor)(pcText, a3, a2);
    ((void (__stdcall *)(tagSIZE *))v4->m_pkText->vfptr[123].__vecDelDtor)(&kSize);
    v5 = kSize.cx;
    if ( kSize.cx <= 0 )
      v5 = 1;
    ((void (__cdecl *)(unsigned int))v4->m_pkMiddleSpr->vfptr[117].__vecDelDtor)(v5);
    ((void (__cdecl *)(unsigned int))v4->m_pkMiddleSpr->vfptr[43].__vecDelDtor)(v4->m_iMiddleXPos - (v5 >> 1));
    v6 = v4->m_pkLeftSpr;
    v7 = v6->vfptr;
    v8 = v4->m_pkMiddleSpr;
    pcTexta = (const char *)((int (*)(void))v6->vfptr[36].__vecDelDtor)();
    v9 = ((int (__thiscall *)(PgWinSpr *))v8->vfptr[41].__vecDelDtor)(v8);
    v7[43].__vecDelDtor((NiRefObject *)v4->m_pkLeftSpr, v9 - (_DWORD)pcTexta);
    v10 = v4->m_pkRightSpr->vfptr;
    v11 = v4->m_pkMiddleSpr;
    pcTextb = (const char *)((int (*)(void))v4->m_pkMiddleSpr->vfptr[41].__vecDelDtor)();
    v12 = ((int (__thiscall *)(PgWinSpr *))v11->vfptr[36].__vecDelDtor)(v11);
    v10[43].__vecDelDtor((NiRefObject *)v4->m_pkRightSpr, (unsigned int)&pcTextb[v12]);
  }
}

//----- (004E8C50) --------------------------------------------------------
NiSourceTexture *__stdcall CardSlotWin::LoadImageFile(const char *pcFileName)
{
  NiImageConverter *v2; // eax@1
  NiSourceTexture *result; // eax@1
  NiTexture::FormatPrefs kPrefs; // [sp+0h] [bp-Ch]@2

  v2 = NiImageConverter::GetImageConverter();
  result = (NiSourceTexture *)((int (__thiscall *)(NiImageConverter *, const char *, _DWORD))v2->vfptr[2].__vecDelDtor)(
                                v2,
                                pcFileName,
                                0);
  if ( result )
  {
    kPrefs.m_ePixelLayout = 6;
    kPrefs.m_eAlphaFmt = 2;
    kPrefs.m_eMipMapped = 0;
    result = NiSourceTexture::Create((NiPixelData *)result, &kPrefs);
  }
  return result;
}

//----- (004E8CA0) --------------------------------------------------------
void __thiscall CardSlotWin::Reset(CardSlotWin *this)
{
  CardSlotWin *v1; // edi@1
  unsigned int v2; // esi@1
  PgWinSpr *v3; // ecx@2

  v1 = this;
  this->m_uiCardID = 0;
  v2 = 0;
  do
  {
    v3 = v1->m_kBorderSprs._Myfirst[v2];
    if ( v3 )
      ((void (__stdcall *)(_DWORD))v3->vfptr[64].__vecDelDtor)(0);
    ++v2;
  }
  while ( v2 < 4 );
  v1->vfptr[60].__vecDelDtor((NiRefObject *)v1, 0);
}

//----- (004E8CF0) --------------------------------------------------------
char __thiscall CollectRwItemWin::Create(CollectRwItemWin *this, NiNode *pkNode, const char *pcAbleName, const char *pcDisableName, const char *pcEffectName, PgWin *pkParent, int iCommandMsg)
{
  CollectRwItemWin *v7; // esi@1
  NiNode *v8; // edi@1
  PgWin *v9; // ebx@4
  PgSprData *v10; // eax@6
  int v12; // ebx@10
  NiNode *v13; // ST44_4@10
  PgSprData *v14; // eax@10
  PgWinSpr *v15; // eax@10
  PgSprData *v16; // eax@10
  PgWinSpr *v17; // eax@10
  int iOffX; // [sp+14h] [bp-18h]@4
  int iOffY; // [sp+18h] [bp-14h]@4
  int iLeft; // [sp+1Ch] [bp-10h]@4
  int v21; // [sp+28h] [bp-4h]@3

  v7 = this;
  v8 = pkNode;
  if ( pkNode )
    InterlockedIncrement((volatile LONG *)&pkNode->m_uiRefCount);
  v21 = 0;
  if ( !v8 )
    return 0;
  iLeft = 0;
  pkNode = 0;
  iOffX = 0;
  iOffY = 0;
  v9 = pkParent;
  if ( pkParent )
  {
    iOffX = ((int (__thiscall *)(PgWin *))pkParent->vfptr[41].__vecDelDtor)(pkParent);
    iOffY = ((int (__thiscall *)(PgWin *))v9->vfptr[42].__vecDelDtor)(v9);
  }
  v10 = PgSprData::Create((NiAVObject *)&v8->vfptr, pcAbleName, &iLeft, (int *)&pkNode, 0);
  if ( !PgWinBut::Create((PgWinBut *)&v7->vfptr, iLeft - iOffX, (int)pkNode - iOffY, v10, v9, iCommandMsg, 0, 0) )
  {
    v21 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    return 0;
  }
  v12 = iLeft;
  v13 = pkNode;
  v14 = PgSprData::Create((NiAVObject *)&v8->vfptr, pcDisableName, &iLeft, (int *)&pkNode, 0);
  v15 = PgWinSpr::CreateWin(iLeft - v12, (char *)pkNode - (char *)v13, v14, (PgWin *)&v7->vfptr, 0, 0);
  v7->m_pkDisableSpr = v15;
  v15->vfptr[60].__vecDelDtor((NiRefObject *)v15, 0);
  v16 = PgSprData::Create((NiAVObject *)&v8->vfptr, pcEffectName, &iLeft, (int *)&pkNode, 0);
  v17 = PgWinSpr::CreateWin(iLeft - v12, (char *)pkNode - (char *)v13, v16, (PgWin *)&v7->vfptr, 0, 0);
  v7->m_pkEffectSpr = v17;
  v17->vfptr[60].__vecDelDtor((NiRefObject *)v17, 0);
  v7->m_pkToolTipWin = g_pkToolTipWin;
  v21 = -1;
  if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
    v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
  return 1;
}

//----- (004E8EB0) --------------------------------------------------------
void __thiscall CollectRwItemWin::SetState(CollectRwItemWin *this, CollectRwItemWin::eRewardStateType eType)
{
  CollectRwItemWin *v2; // esi@1

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkDisableSpr->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkEffectSpr->vfptr[64].__vecDelDtor)(0);
  v2->m_eRewardStateType = eType;
  if ( eType )
  {
    if ( eType == 1 )
      ((void (__stdcall *)(_DWORD))v2->m_pkEffectSpr->vfptr[64].__vecDelDtor)(1);
  }
  else
  {
    ((void (__stdcall *)(_DWORD))v2->m_pkDisableSpr->vfptr[64].__vecDelDtor)(1);
  }
}

//----- (004E8F20) --------------------------------------------------------
void __thiscall CollectPageWin::ResetPageNum(CollectPageWin *this)
{
  CollectPageWin *v1; // edi@1
  unsigned int v2; // ebx@1
  PgWinText *v3; // esi@2
  NiRefObjectVtbl *v4; // edi@3
  PgFont *v5; // eax@3
  PgWinBut *v6; // ecx@4
  CollectPageWin *v7; // [sp+Ch] [bp-4h]@1

  v1 = this;
  v7 = this;
  v2 = 0;
  do
  {
    v3 = v1->m_kPageNumTexts._Myfirst[v2];
    if ( v3 )
    {
      v3->vfptr[118].__vecDelDtor((NiRefObject *)v3, (unsigned int)&unk_986D77);
      v4 = v3->vfptr;
      v5 = Font::Get(0);
      v4[113].__vecDelDtor((NiRefObject *)v3, (unsigned int)v5);
      v3->vfptr[117].__vecDelDtor((NiRefObject *)v3, (unsigned int)&Color::m_kDxWhiteColor);
      v1 = v7;
    }
    v6 = v1->m_kPageNumBtns._Myfirst[v2];
    if ( v6 )
      ((void (__stdcall *)(_DWORD))v6->vfptr[64].__vecDelDtor)(0);
    ++v2;
  }
  while ( v2 < 5 );
}

//----- (004E8FB0) --------------------------------------------------------
void __thiscall CollectPageWin::Update(CollectPageWin *this)
{
  CollectPageWin *v1; // ebx@1
  unsigned int v2; // ecx@1
  unsigned int v3; // esi@1
  int v4; // eax@4
  unsigned int v5; // edi@4
  PgWinText *v6; // esi@6
  NiRefObjectVtbl *v7; // ST14_4@7
  char *v8; // eax@7
  PgWinBut *v9; // esi@8
  PgWinText *v10; // esi@11
  NiRefObjectVtbl *v11; // edi@12
  PgFont *v12; // eax@12
  unsigned int uiInterval; // [sp+10h] [bp-14h]@4
  int iXPos; // [sp+14h] [bp-10h]@6
  int v15; // [sp+18h] [bp-Ch]@5
  unsigned int v16; // [sp+1Ch] [bp-8h]@5
  unsigned int uiViewSize; // [sp+20h] [bp-4h]@2

  v1 = this;
  CollectPageWin::ResetPageNum(this);
  v2 = v1->m_uiLastPage + 1;
  v3 = v1->m_uiPage / 5;
  if ( v3 >= v2 / 5 )
    uiViewSize = v2 % 5;
  else
    uiViewSize = 5;
  v4 = v1->m_uiPageNumInterval + (*(int (**)(void))(**(_DWORD **)v1->m_kPageNumTexts._Myfirst + 144))();
  v5 = 0;
  uiInterval = v4;
  if ( uiViewSize )
  {
    v16 = v4 * (5 - uiViewSize) >> 1;
    v15 = 5 * v3;
    do
    {
      v6 = v1->m_kPageNumTexts._Myfirst[v5];
      iXPos = v16 + v1->m_iPageNumFirstPos;
      if ( v6 )
      {
        v7 = v6->vfptr + 118;
        v8 = fs("%d", v15 + v5 + 1);
        v7->__vecDelDtor(v6, v8);
        v6->vfptr[43].__vecDelDtor((NiRefObject *)v6, iXPos);
        v4 = uiInterval;
      }
      v9 = v1->m_kPageNumBtns._Myfirst[v5];
      if ( v9 )
      {
        v9->vfptr[130].__vecDelDtor((NiRefObject *)v9, v5 + v15);
        v9->vfptr[43].__vecDelDtor((NiRefObject *)v9, iXPos);
        v9->vfptr[64].__vecDelDtor((NiRefObject *)v9, 1u);
        v4 = uiInterval;
      }
      v16 += v4;
      ++v5;
    }
    while ( v5 < uiViewSize );
  }
  v10 = v1->m_kPageNumTexts._Myfirst[v1->m_uiPage % 5];
  if ( v10 )
  {
    v11 = v10->vfptr;
    v12 = Font::Get(LARGEBOLD);
    v11[113].__vecDelDtor((NiRefObject *)v10, (unsigned int)v12);
    v10->vfptr[117].__vecDelDtor((NiRefObject *)v10, (unsigned int)&Color::m_kDxYellowColor);
  }
}

//----- (004E9130) --------------------------------------------------------
char __thiscall CollectRwChoiceInv::Create(CollectRwChoiceInv *this, int iXPos, int iYPos, PgWin *pkParent)
{
  CollectRwChoiceInv *v4; // esi@1
  char result; // al@1

  v4 = this;
  result = ItemIcon::Create((ItemIcon *)&this->vfptr, iXPos, iYPos, pkParent);
  if ( result )
  {
    v4->m_bSelect = 0;
    result = 1;
  }
  return result;
}

//----- (004E9160) --------------------------------------------------------
void __thiscall CollectRwChoiceInv::UpdateMeWin(CollectRwChoiceInv *this, float fCurTime)
{
  NiAVObject *v2; // eax@2

  if ( this->m_bSelect )
  {
    v2 = this->m_spClickGeom.m_pObject;
    if ( this->m_spItem.m_pObject )
    {
      v2->m_uFlags &= 0xFFFEu;
      IconWin::UpdateMeWin((IconWin *)&this->vfptr, fCurTime);
      return;
    }
    v2->m_uFlags |= 1u;
  }
  IconWin::UpdateMeWin((IconWin *)&this->vfptr, fCurTime);
}

//----- (004E91B0) --------------------------------------------------------
void __thiscall CollectRwChoiceWin::OnOK(CollectRwChoiceWin *this)
{
  CollectRwChoiceWin *v1; // esi@1
  GameFrameWork *v2; // edi@2
  ItemIcon *v3; // ecx@3
  Item *v4; // eax@4

  v1 = this;
  if ( this->m_uiSelectIndex < 5 )
  {
    v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v2 )
    {
      v3 = (ItemIcon *)&v1->m_kRewardItems._Myfirst[v1->m_uiSelectIndex]->vfptr;
      if ( v3 )
      {
        v4 = ItemIcon::GetItem(v3);
        if ( v4 )
          GameFrameWork::NcCollectRewardReq(v2, v1->m_uiRewardID, v4->m_kStruct.itemid);
        PgWin::PostMsg((PgWin *)&v1->vfptr, 1u, 0, 0);
      }
    }
  }
}

//----- (004E9220) --------------------------------------------------------
void __thiscall CollectRwChoiceWin::OnSelectItem(CollectRwChoiceWin *this, unsigned int uiIndex)
{
  CollectRwChoiceInv *v2; // eax@3
  CollectRwChoiceInv *v3; // eax@5

  if ( uiIndex < 5 )
  {
    v2 = this->m_kRewardItems._Myfirst[this->m_uiSelectIndex];
    if ( v2 )
      v2->m_bSelect = 0;
    v3 = this->m_kRewardItems._Myfirst[uiIndex];
    if ( v3 )
      v3->m_bSelect = 1;
    this->m_bSelect = 1;
    this->m_uiSelectIndex = uiIndex;
  }
  else
  {
    this->m_bSelect = 0;
  }
}

//----- (004E9280) --------------------------------------------------------
void __thiscall CollectRwChoiceWin::ResetItem(CollectRwChoiceWin *this)
{
  CollectRwChoiceWin *v1; // ebx@1
  unsigned int v2; // edi@1
  CollectRwChoiceInv *v3; // esi@2
  void *(__thiscall *v4)(NiRefObject *, unsigned int); // eax@3

  v1 = this;
  v2 = 0;
  do
  {
    v3 = v1->m_kRewardItems._Myfirst[v2];
    if ( v3 )
    {
      ItemIcon::SetItem((ItemIcon *)&v3->vfptr, 0, 1);
      IconWin::ShowFocus((IconWin *)&v3->vfptr, 0);
      v4 = v3->vfptr[64].__vecDelDtor;
      v3->m_bSelect = 0;
      v4((NiRefObject *)&v3->vfptr, 0);
    }
    ++v2;
  }
  while ( v2 < 5 );
}

//----- (004E92E0) --------------------------------------------------------
void __thiscall CollectCardChoiceWin::Reset(CollectCardChoiceWin *this)
{
  CollectCardChoiceWin *v1; // edi@1
  unsigned int v2; // esi@1
  CardSlotWin *v3; // eax@2

  v1 = this;
  this->m_bSelect = 0;
  this->m_uiSelectSlot = 0;
  v2 = 0;
  do
  {
    v3 = v1->m_kCardSlots._Myfirst[v2];
    if ( v3 )
    {
      if ( v3->m_pkBlindSpr )
        v3->m_pkBlindSpr->vfptr[64].__vecDelDtor((NiRefObject *)v3->m_pkBlindSpr, 1u);
    }
    ++v2;
  }
  while ( v2 < 4 );
}

//----- (004E9340) --------------------------------------------------------
CollectCardChoiceWin::sRegistCardInfo *__thiscall CollectCardChoiceWin::GetRegistCardInfoByGrade(CollectCardChoiceWin *this, unsigned int uiGrade, unsigned int uiIndex)
{
  int v3; // edi@1
  unsigned int v4; // edx@1
  CollectCardChoiceWin::sRegistCardInfo *v5; // esi@2

  v3 = 0;
  v4 = 0;
  if ( !(this->m_kRegistCardInfos._Mylast - this->m_kRegistCardInfos._Myfirst) )
    return 0;
  v5 = this->m_kRegistCardInfos._Myfirst;
  while ( v5->m_uiGrade != uiGrade )
  {
LABEL_6:
    ++v4;
    ++v5;
    if ( v4 >= this->m_kRegistCardInfos._Mylast - this->m_kRegistCardInfos._Myfirst )
      return 0;
  }
  if ( v3 != uiIndex )
  {
    ++v3;
    goto LABEL_6;
  }
  return &this->m_kRegistCardInfos._Myfirst[v4];
}

//----- (004E93B0) --------------------------------------------------------
int __thiscall CollectCardChoiceWin::GetRegistCardInfoCountByGrade(CollectCardChoiceWin *this, unsigned int uiGrade)
{
  int v2; // esi@1
  signed int v3; // eax@1
  CollectCardChoiceWin::sRegistCardInfo *v4; // ecx@2

  v2 = 0;
  v3 = this->m_kRegistCardInfos._Mylast - this->m_kRegistCardInfos._Myfirst;
  if ( v3 )
  {
    v4 = this->m_kRegistCardInfos._Myfirst;
    do
    {
      if ( v4->m_uiGrade == uiGrade )
        ++v2;
      ++v4;
      --v3;
    }
    while ( v3 );
  }
  return v2;
}

//----- (004E9400) --------------------------------------------------------
void __thiscall CollectPopupWin::OnShowWin(CollectPopupWin *this)
{
  this->m_fStartTime = Timer::ms_fCurTime;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004E9410) --------------------------------------------------------
void __thiscall CollectPageWin::OnPageNum(CollectPageWin *this, unsigned int uiPage)
{
  CollectPageWin *v2; // esi@1
  int v3; // ST0C_4@2
  unsigned int v4; // ST08_4@2
  PgWin *v5; // eax@2

  v2 = this;
  if ( this->m_uiPage != uiPage )
  {
    this->m_uiPage = uiPage;
    CollectPageWin::Update(this);
    v3 = v2->m_uiUpdateMsgParam;
    v4 = v2->m_uiUpdateMsg;
    v5 = PgWin::GetParentWin((PgWin *)&v2->vfptr);
    PgWin::PostMsg(v5, 5u, v4, v3);
  }
}

//----- (004E9450) --------------------------------------------------------
void __thiscall CollectPageWin::OnPageArrow(CollectPageWin *this, CollectPageWin::ePageArrowType eType)
{
  CollectPageWin *v2; // esi@1
  unsigned int v3; // eax@3
  int v4; // eax@4
  unsigned int v5; // eax@6
  unsigned int v6; // ecx@6
  int v7; // ST0C_4@11
  unsigned int v8; // ST08_4@11
  PgWin *v9; // eax@11

  v2 = this;
  switch ( eType )
  {
    case 0:
      this->m_uiPage = 0;
      break;
    case 1:
      v3 = this->m_uiPage;
      if ( v3 )
        v4 = v3 - 1;
      else
        v4 = 0;
      goto LABEL_10;
    case 2:
      v5 = this->m_uiPage;
      v6 = this->m_uiLastPage;
      if ( v5 < v6 )
        v6 = v5 + 1;
      v2->m_uiPage = v6;
      break;
    case 3:
      v4 = this->m_uiLastPage;
LABEL_10:
      this->m_uiPage = v4;
      break;
    default:
      break;
  }
  CollectPageWin::Update(v2);
  v7 = v2->m_uiUpdateMsgParam;
  v8 = v2->m_uiUpdateMsg;
  v9 = PgWin::GetParentWin((PgWin *)&v2->vfptr);
  PgWin::PostMsg(v9, 5u, v8, v7);
}

//----- (004E94F0) --------------------------------------------------------
void __thiscall CollectRwChoiceWin::OnCommand(CollectRwChoiceWin *this, unsigned int wParam, int lParam)
{
  if ( wParam )
  {
    if ( wParam == 1 )
    {
      this->m_bSelect = 0;
      this->m_uiSelectIndex = 0;
      PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
    }
    else if ( wParam == 2 )
    {
      CollectRwChoiceWin::OnSelectItem(this, lParam);
    }
  }
  else
  {
    CollectRwChoiceWin::OnOK(this);
  }
}

//----- (004E9540) --------------------------------------------------------
void __thiscall CollectCardChoiceWin::OnOK(CollectCardChoiceWin *this)
{
  CollectCardChoiceWin *v1; // esi@1
  GameFrameWork *v2; // edi@1
  NiUnsharedGeometryGroup *v3; // eax@3
  CardSlotWin *v4; // eax@4

  v1 = this;
  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    if ( v1->m_bSelect )
    {
      v4 = v1->m_kCardSlots._Myfirst[v1->m_uiSelectSlot];
      if ( v4 )
        GameFrameWork::NcCollectBookmarkRegistReq(v2, v1->m_uiBookmarkSlot, v4->m_uiCardID);
      PgWin::PostMsg((PgWin *)&v1->vfptr, 1u, 0, 0);
    }
    else
    {
      v3 = TextData2::Get(0x58826C81u);
      GameFrameWork::AddSysMsg(v2, (const char *)v3);
    }
  }
}

//----- (004E95C0) --------------------------------------------------------
void __thiscall CollectCardChoiceWin::OnSelectSlot(CollectCardChoiceWin *this, unsigned int uiSlot)
{
  CollectCardChoiceWin *v2; // esi@1
  CardSlotWin *v3; // eax@2

  v2 = this;
  if ( uiSlot < 4 )
  {
    CollectCardChoiceWin::Reset(this);
    v3 = v2->m_kCardSlots._Myfirst[uiSlot];
    if ( v3 )
    {
      if ( v3->m_pkBlindSpr )
        v3->m_pkBlindSpr->vfptr[64].__vecDelDtor((NiRefObject *)v3->m_pkBlindSpr, 0);
    }
    v2->m_bSelect = 1;
    v2->m_uiSelectSlot = uiSlot;
  }
}

//----- (004E9620) --------------------------------------------------------
char __thiscall CollectPopupWin::Create(CollectPopupWin *this, PgFrameWork *pkFrameWork)
{
  CollectPopupWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  int v8; // edi@10
  int v9; // ebx@10
  PgSprData *v10; // eax@10
  PgWinSpr *v11; // eax@10
  PgSprData *v12; // eax@10
  PgWinSpr *v13; // eax@10
  PgSprData *v14; // eax@10
  PgWinSpr *v15; // eax@10
  NiPointer<PgSprData::PgHitTester> *v16; // ecx@10
  unsigned int uiWidth; // ST58_4@10
  PgFont *v18; // eax@10
  PgWinText *v19; // eax@10
  unsigned int v20; // eax@10
  NiNode *v21; // esi@11
  NiPointer<NiNode> spNode; // [sp+2Ch] [bp-18h]@1
  int iLeft; // [sp+30h] [bp-14h]@1
  int iTop; // [sp+34h] [bp-10h]@1
  int v25; // [sp+40h] [bp-4h]@1
  PgSprData *pkSprData; // [sp+4Ch] [bp+8h]@10
  PgSprData *pkSprDataa; // [sp+4Ch] [bp+8h]@10

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v25 = 0;
  iLeft = 0;
  iTop = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\Collect_GetPopup.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iLeft, &iTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "CollectCardChoiceWin", 0) )
  {
    v6 = spNode.m_pObject;
    v25 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = iLeft;
  v9 = iTop;
  pkSprData = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &iLeft, &iTop, 0);
  PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinBut::CreateWin(iLeft, iTop, pkSprData, (PgWin *)&v2->vfptr, 0, 0, 0);
  v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnMiddle", &iLeft, &iTop, 0);
  v11 = PgWinSpr::CreateWin(iLeft - v8, iTop - v9, v10, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkMiddleSpr = v11;
  v11->vfptr[60].__vecDelDtor((NiRefObject *)v11, 0);
  v2->m_iMiddleXPos = ((int (*)(void))v2->m_pkMiddleSpr->vfptr[41].__vecDelDtor)();
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Left", &iLeft, &iTop, 0);
  v13 = PgWinSpr::CreateWin(iLeft - v8, iTop - v9, v12, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkLeftSpr = v13;
  v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnRight", &iLeft, &iTop, 0);
  v15 = PgWinSpr::CreateWin(iLeft - v8, iTop - v9, v14, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkRightSpr = v15;
  v15->vfptr[60].__vecDelDtor((NiRefObject *)v15, 0);
  v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text", &iLeft, &iTop, 0)->m_akHitTester.m_pBase;
  pkSprDataa = (PgSprData *)v16->m_pObject->m_uiHeight;
  uiWidth = v16->m_pObject->m_uiWidth;
  v18 = Font::Get(0);
  v19 = PgWinText::CreateWin(iLeft - v8, iTop - v9, uiWidth, (unsigned int)pkSprDataa, v18, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkText = v19;
  v19->vfptr[122].__vecDelDtor((NiRefObject *)v19, 5u);
  ((void (__stdcall *)(_DWORD))v2->m_pkText->vfptr[60].__vecDelDtor)(0);
  v20 = ((int (__thiscall *)(CollectPopupWin *))v2->vfptr[36].__vecDelDtor)(v2);
  ((void (__thiscall *)(CollectPopupWin *, unsigned int, unsigned int, unsigned int, _DWORD))v2->vfptr[58].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    (PgWin::ms_uiScreenWidth >> 1) - (v20 >> 1),
    0.2);
  v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
  v25 = -1;
  if ( spNode.m_pObject )
  {
    v21 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v21 )
        v21->vfptr->__vecDelDtor((NiRefObject *)v21, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004E9950) --------------------------------------------------------
void __thiscall CollectPageWin::OnCommand(CollectPageWin *this, unsigned int wParam, int lParam)
{
  CollectPageWin *v3; // esi@1
  int v4; // ST0C_4@5
  unsigned int v5; // ST08_4@5
  PgWin *v6; // eax@5

  v3 = this;
  if ( wParam )
  {
    if ( wParam == 1 )
      CollectPageWin::OnPageArrow(this, (CollectPageWin::ePageArrowType)lParam);
  }
  else if ( this->m_uiPage != lParam )
  {
    this->m_uiPage = lParam;
    CollectPageWin::Update(this);
    v4 = v3->m_uiUpdateMsgParam;
    v5 = v3->m_uiUpdateMsg;
    v6 = PgWin::GetParentWin((PgWin *)&v3->vfptr);
    PgWin::PostMsg(v6, 5u, v5, v4);
  }
}

//----- (004E99B0) --------------------------------------------------------
void __thiscall CardSlotWin::~CardSlotWin(CardSlotWin *this)
{
  CardSlotWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&CardSlotWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CardSlotWin::`vftable'{for `IDirectMessenger'};
  if ( this->m_kBorderSprs._Myfirst )
    operator delete(this->m_kBorderSprs._Myfirst);
  v1->m_kBorderSprs._Myfirst = 0;
  v1->m_kBorderSprs._Mylast = 0;
  v1->m_kBorderSprs._Myend = 0;
  PgWinLRBut::~PgWinLRBut((PgWinLRBut *)&v1->vfptr);
}
// 987770: using guessed type void (__thiscall *CardSlotWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98778C: using guessed type int (__thiscall *CardSlotWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004E9A00) --------------------------------------------------------
CollectRwItemWin *__cdecl CollectRwItemWin::CreateWin(NiNode *pkNode, const char *pcAbleName, const char *pcDisableName, const char *pcEffectName, PgWin *pkParent, int iCommandMsg)
{
  PgWin *v6; // eax@1
  PgWin *v7; // esi@1
  PgWin *v8; // edi@8
  CollectRwItemWin *v9; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v11; // [sp+20h] [bp-4h]@1

  v6 = (PgWin *)operator new(0x154u);
  v7 = v6;
  result.m_pObject = v6;
  v11 = 0;
  if ( v6 )
  {
    PgWinBut::PgWinBut((PgWinBut *)v6);
    v7->vfptr = (NiRefObjectVtbl *)&CollectRwItemWin::`vftable'{for `NiNode'};
    v7->vfptr = (IDirectMessengerVtbl *)&CollectRwItemWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v7[1].m_kWorldBound.m_kCenter.x) = 0;
    LODWORD(v7[1].m_kWorldBound.m_kCenter.y) = 0;
    LODWORD(v7[1].m_kWorldBound.m_kCenter.z) = 0;
    LODWORD(v7[1].m_kWorldBound.m_fRadius) = 0;
  }
  else
  {
    v7 = 0;
  }
  if ( v7 )
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  v11 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v7);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, NiNode *, const char *, const char *, const char *, PgWin *, int))v7->vfptr[140].__vecDelDtor)(
                          v7,
                          pkNode,
                          pcAbleName,
                          pcDisableName,
                          pcEffectName,
                          pkParent,
                          iCommandMsg) )
  {
    ((void (__thiscall *)(PgWin *))v7->vfptr[89].__vecDelDtor)(v7);
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = (CollectRwItemWin *)v7;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v7);
    if ( result.m_pObject )
    {
      v8 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v8 )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      }
    }
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = 0;
  }
  return v9;
}
// 987050: using guessed type void (__thiscall *CollectRwItemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98706C: using guessed type int (__thiscall *CollectRwItemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004E9B70) --------------------------------------------------------
void __thiscall CollectPageWin::~CollectPageWin(CollectPageWin *this)
{
  CollectPageWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&CollectPageWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CollectPageWin::`vftable'{for `IDirectMessenger'};
  if ( this->m_kPageArrowBtns._Myfirst )
    operator delete(this->m_kPageArrowBtns._Myfirst);
  v1->m_kPageArrowBtns._Myfirst = 0;
  v1->m_kPageArrowBtns._Mylast = 0;
  v1->m_kPageArrowBtns._Myend = 0;
  if ( v1->m_kPageNumBtns._Myfirst )
    operator delete(v1->m_kPageNumBtns._Myfirst);
  v1->m_kPageNumBtns._Myfirst = 0;
  v1->m_kPageNumBtns._Mylast = 0;
  v1->m_kPageNumBtns._Myend = 0;
  if ( v1->m_kPageNumTexts._Myfirst )
    operator delete(v1->m_kPageNumTexts._Myfirst);
  v1->m_kPageNumTexts._Myfirst = 0;
  v1->m_kPageNumTexts._Mylast = 0;
  v1->m_kPageNumTexts._Myend = 0;
  PgWin::~PgWin((PgWin *)&v1->vfptr);
}
// 9879DC: using guessed type void (__thiscall *CollectPageWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9879FC: using guessed type int (__thiscall *CollectPageWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004E9C00) --------------------------------------------------------
CollectRwChoiceInv *__cdecl CollectRwChoiceInv::CreateWin(int iXPos, int iYPos, PgWin *pkParent)
{
  PgWin *v3; // eax@1
  PgWin *v4; // esi@1
  PgWin *v5; // edi@8
  CollectRwChoiceInv *v6; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x1C4u);
  v4 = v3;
  result.m_pObject = v3;
  v8 = 0;
  if ( v3 )
  {
    ItemIcon::ItemIcon((ItemIcon *)v3);
    v4->vfptr = (NiRefObjectVtbl *)&CollectRwChoiceInv::`vftable'{for `NiNode'};
    v4->vfptr = (IDirectMessengerVtbl *)&CollectRwChoiceInv::`vftable'{for `IDirectMessenger'};
    LOBYTE(v4[1].m_kPropertyList.m_pkHead) = 0;
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v8 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v4);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgWin *))v4->vfptr[153].__vecDelDtor)(
                          v4,
                          iXPos,
                          iYPos,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v4->vfptr[89].__vecDelDtor)(v4);
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = (CollectRwChoiceInv *)v4;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v4);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = 0;
  }
  return v6;
}
// 9872A4: using guessed type void (__thiscall *CollectRwChoiceInv::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9872C4: using guessed type int (__thiscall *CollectRwChoiceInv::`vftable'{for `NiNode'})(void *p, char);

//----- (004E9D50) --------------------------------------------------------
void __thiscall CollectRwChoiceWin::~CollectRwChoiceWin(CollectRwChoiceWin *this)
{
  CollectRwChoiceWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&CollectRwChoiceWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CollectRwChoiceWin::`vftable'{for `IDirectMessenger'};
  if ( this->m_kRewardItems._Myfirst )
    operator delete(this->m_kRewardItems._Myfirst);
  v1->m_kRewardItems._Myfirst = 0;
  v1->m_kRewardItems._Mylast = 0;
  v1->m_kRewardItems._Myend = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 987BC8: using guessed type void (__thiscall *CollectRwChoiceWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 987BE4: using guessed type int (__thiscall *CollectRwChoiceWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004E9DA0) --------------------------------------------------------
char __thiscall CollectRwChoiceWin::Create(CollectRwChoiceWin *this, PgFrameWork *pkFrameWork)
{
  CollectRwChoiceWin *v2; // esi@1
  NiTexturePalette *v3; // ebx@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  PgFont *v8; // eax@11
  PgWinText *v9; // ebx@11
  NiRefObjectVtbl *v10; // edi@11
  NiUnsharedGeometryGroup *v11; // eax@11
  unsigned int v12; // edi@11
  NiNode *v13; // ebx@12
  const char *v14; // eax@12
  int v15; // ebx@12
  CollectRwChoiceInv **v16; // eax@13
  CollectRwChoiceInv *v17; // ebx@13
  int v18; // edi@13
  int v19; // eax@13
  NiNode *v20; // ST20_4@13
  PgSprData *v21; // edi@13
  PgWinBut *v22; // ST28_4@13
  PgWinBut *v23; // edi@13
  PgFont *v24; // ST24_4@13
  unsigned int v25; // ST20_4@13
  unsigned int v26; // eax@13
  PgWinText *v27; // edi@13
  NiRefObjectVtbl *v28; // ebx@13
  NiUnsharedGeometryGroup *v29; // eax@13
  PgSprData *v30; // edi@13
  PgWinBut *v31; // ST28_4@13
  PgFont *v32; // ST24_4@13
  unsigned int v33; // ST20_4@13
  unsigned int v34; // eax@13
  PgWinText *v35; // edi@13
  NiRefObjectVtbl *v36; // ebx@13
  NiUnsharedGeometryGroup *v37; // eax@13
  NiNode *v38; // esi@14
  unsigned int uiWidth; // [sp+48h] [bp-20h]@1
  unsigned int uiHeight; // [sp+4Ch] [bp-1Ch]@1
  int iLeft; // [sp+50h] [bp-18h]@1
  int iTop; // [sp+54h] [bp-14h]@1
  NiPointer<NiNode> spNode; // [sp+58h] [bp-10h]@1
  int v44; // [sp+64h] [bp-4h]@1
  PgFrameWork *pkFrameWorka; // [sp+70h] [bp+8h]@12

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v44 = 0;
  uiWidth = 0;
  uiHeight = 0;
  iLeft = 0;
  iTop = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\Collect_RwChoice.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iLeft, &iTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "CollectRwChoiceWin", 0)
    || !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "TextWin", &iLeft, &iTop, &uiWidth, &uiHeight) )
  {
    v6 = spNode.m_pObject;
    v44 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = Font::Get(0);
  v9 = PgWinText::CreateWin(iLeft, iTop, uiWidth, uiHeight, v8, (PgWin *)&v2->vfptr, 0, 0);
  v9->vfptr[122].__vecDelDtor((NiRefObject *)v9, 5u);
  v10 = v9->vfptr;
  v11 = TextData2::Get(0xC42803Fu);
  v10[118].__vecDelDtor((NiRefObject *)v9, (unsigned int)v11);
  v9->vfptr[60].__vecDelDtor((NiRefObject *)v9, 0);
  v12 = 0;
  do
  {
    v13 = spNode.m_pObject;
    v14 = fs("Reward%02d", v12 + 1);
    PgSprData::Create((NiAVObject *)&v13->vfptr, v14, &iLeft, &iTop, 0);
    v15 = v12;
    pkFrameWorka = (PgFrameWork *)&v2->m_kRewardItems._Myfirst[v12];
    pkFrameWorka->vfptr = (IDirectMessengerVtbl *)CollectRwChoiceInv::CreateWin(iLeft, iTop, (PgWin *)&v2->vfptr);
    ((void (__stdcall *)(signed int))v2->m_kRewardItems._Myfirst[v12]->vfptr[129].__vecDelDtor)(2);
    ((void (__stdcall *)(unsigned int))v2->m_kRewardItems._Myfirst[v12]->vfptr[130].__vecDelDtor)(v12);
    ++v12;
    v2->m_kRewardItems._Myfirst[v15]->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
  }
  while ( v12 < 5 );
  v2->m_iItemFirstPos = (*(int (**)(void))(**(_DWORD **)v2->m_kRewardItems._Myfirst + 164))();
  v16 = v2->m_kRewardItems._Myfirst;
  v17 = *v16;
  v18 = ((int (*)(void))v16[1]->vfptr[41].__vecDelDtor)() - v2->m_iItemFirstPos;
  v19 = ((int (__thiscall *)(CollectRwChoiceInv *))v17->vfptr[36].__vecDelDtor)(v17);
  v20 = spNode.m_pObject;
  v2->m_uiItemInterval = v18 - v19;
  v21 = PgSprData::Create((NiAVObject *)&v20->vfptr, "OkBtnNor", &iLeft, &iTop, 0);
  PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "OkBtnClick");
  PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "OkBtnOver");
  PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "OkBtnDisable");
  v22 = PgWinBut::CreateWin(iLeft, iTop, v21, (PgWin *)&v2->vfptr, 0, 0, 0);
  v2->m_pkOKBtn = v22;
  v23 = v22;
  v24 = Font::Get(MAIN_MENU);
  v25 = ((int (__thiscall *)(PgWinBut *))v23->vfptr[37].__vecDelDtor)(v23);
  v26 = ((int (__thiscall *)(PgWinBut *))v23->vfptr[36].__vecDelDtor)(v23);
  v27 = PgWinText::CreateWin(0, 0, v26, v25, v24, (PgWin *)&v22->vfptr, 0, 0);
  v27->vfptr[122].__vecDelDtor((NiRefObject *)v27, 5u);
  v27->vfptr[60].__vecDelDtor((NiRefObject *)v27, 0);
  v28 = v27->vfptr;
  v29 = TextData2::Get(0xBAEAE224);
  v28[118].__vecDelDtor((NiRefObject *)v27, (unsigned int)v29);
  v30 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CancelBtnNor", &iLeft, &iTop, 0);
  PgSprData::Add(v30, (NiAVObject *)&spNode.m_pObject->vfptr, "CancelBtnClick");
  PgSprData::Add(v30, (NiAVObject *)&spNode.m_pObject->vfptr, "CancelBtnOver");
  v31 = PgWinBut::CreateWin(iLeft, iTop, v30, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v32 = Font::Get(MAIN_MENU);
  v33 = ((int (__thiscall *)(PgWinBut *))v31->vfptr[37].__vecDelDtor)(v31);
  v34 = ((int (__thiscall *)(PgWinBut *))v31->vfptr[36].__vecDelDtor)(v31);
  v35 = PgWinText::CreateWin(0, 0, v34, v33, v32, (PgWin *)&v31->vfptr, 0, 0);
  v35->vfptr[122].__vecDelDtor((NiRefObject *)v35, 5u);
  v35->vfptr[60].__vecDelDtor((NiRefObject *)v35, 0);
  v36 = v35->vfptr;
  v37 = TextData2::Get(0xA6E6DFD7);
  v36[118].__vecDelDtor((NiRefObject *)v35, (unsigned int)v37);
  ((void (__thiscall *)(CollectRwChoiceWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  v44 = -1;
  if ( spNode.m_pObject )
  {
    v38 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v38 )
        v38->vfptr->__vecDelDtor((NiRefObject *)v38, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004EA200) --------------------------------------------------------
CollectPopupWin *__cdecl CollectPopupWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  CollectPopupWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x170u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2[1].m_kLocal.m_Rotate.m_pEntry[2][0] = 0.0;
    v2->vfptr = (NiRefObjectVtbl *)&CollectPopupWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&CollectPopupWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][2]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (CollectPopupWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 987530: using guessed type void (__thiscall *CollectPopupWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98754C: using guessed type int (__thiscall *CollectPopupWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004EA370) --------------------------------------------------------
void __thiscall CardSlotWin::CardSlotWin(CardSlotWin *this)
{
  CardSlotWin *v1; // esi@1

  v1 = this;
  PgWinLRBut::PgWinLRBut((PgWinLRBut *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&CardSlotWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CardSlotWin::`vftable'{for `IDirectMessenger'};
  v1->m_kBorderSprs._Myfirst = 0;
  v1->m_kBorderSprs._Mylast = 0;
  v1->m_kBorderSprs._Myend = 0;
  v1->m_pkAddBtn = 0;
  v1->m_pkUnidentifiedSpr = 0;
  v1->m_pkBlindSpr = 0;
  v1->m_uiCardID = 0;
  v1->m_uiStar = 0;
  v1->m_uiSerial = 0;
  v1->m_tRegistTime = 0;
  v1->m_uiIndex = 0;
  std::vector<PgWinText *,std::allocator<PgWinText *>>::resize(
    (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v1->m_kBorderSprs,
    4u);
  *v1->m_kBorderSprs._Myfirst = 0;
  *((_DWORD *)v1->m_kBorderSprs._Myfirst + 1) = 0;
  *((_DWORD *)v1->m_kBorderSprs._Myfirst + 2) = 0;
  *((_DWORD *)v1->m_kBorderSprs._Myfirst + 3) = 0;
}
// 987770: using guessed type void (__thiscall *CardSlotWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98778C: using guessed type int (__thiscall *CardSlotWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004EA440) --------------------------------------------------------
CardSlotWin *__cdecl CardSlotWin::CreateWin(int iXPos, int iYPos, PgWin *pkParent, unsigned int uiIndex, unsigned int uiCommandMsg, unsigned int uiRCommandMsg)
{
  PgWin *v6; // eax@1
  PgWin *v7; // eax@2
  PgWin *v8; // esi@2
  PgWin *v9; // edi@8
  CardSlotWin *v10; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v12; // [sp+20h] [bp-4h]@1

  v6 = (PgWin *)operator new(0x17Cu);
  result.m_pObject = v6;
  v12 = 0;
  if ( v6 )
  {
    CardSlotWin::CardSlotWin((CardSlotWin *)v6);
    v8 = v7;
  }
  else
  {
    v8 = 0;
  }
  if ( v8 )
    InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  v12 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v8);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgWin *, unsigned int, unsigned int, unsigned int))v8->vfptr[146].__vecDelDtor)(
                          v8,
                          iXPos,
                          iYPos,
                          pkParent,
                          uiIndex,
                          uiCommandMsg,
                          uiRCommandMsg) )
  {
    ((void (__thiscall *)(PgWin *))v8->vfptr[89].__vecDelDtor)(v8);
    v12 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v10 = (CardSlotWin *)v8;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v8);
    if ( result.m_pObject )
    {
      v9 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v9 )
          v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      }
    }
    v12 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v10 = 0;
  }
  return v10;
}

//----- (004EA580) --------------------------------------------------------
void __thiscall CollectPageWin::CollectPageWin(CollectPageWin *this)
{
  CollectPageWin *v1; // esi@1
  char *v2; // ecx@1
  PgWinBut **v3; // edi@1
  unsigned int v4; // eax@1
  char *v5; // edi@2
  unsigned int v6; // eax@7
  unsigned int v7; // ecx@7
  unsigned int v8; // ecx@9
  int v9; // eax@14
  unsigned int v10; // [sp+14h] [bp-10h]@5

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&CollectPageWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CollectPageWin::`vftable'{for `IDirectMessenger'};
  v1->m_kPageNumTexts._Myfirst = 0;
  v1->m_kPageNumTexts._Mylast = 0;
  v1->m_kPageNumTexts._Myend = 0;
  v1->m_kPageNumBtns._Myfirst = 0;
  v1->m_kPageNumBtns._Mylast = 0;
  v1->m_kPageNumBtns._Myend = 0;
  v1->m_kPageArrowBtns._Myfirst = 0;
  v1->m_kPageArrowBtns._Mylast = 0;
  v1->m_kPageArrowBtns._Myend = 0;
  v1->m_iPageNumFirstPos = 0;
  v1->m_uiPageNumInterval = 0;
  v1->m_uiPage = 0;
  v1->m_uiLastPage = 0;
  v1->m_uiUpdateMsg = 0;
  v1->m_uiUpdateMsgParam = 0;
  std::vector<PgWinText *,std::allocator<PgWinText *>>::resize(
    (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v1->m_kPageNumTexts,
    5u);
  std::vector<PgWinText *,std::allocator<PgWinText *>>::resize(
    (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v1->m_kPageNumBtns,
    5u);
  *v1->m_kPageNumTexts._Myfirst = 0;
  *v1->m_kPageNumBtns._Myfirst = 0;
  *((_DWORD *)v1->m_kPageNumTexts._Myfirst + 1) = 0;
  *((_DWORD *)v1->m_kPageNumBtns._Myfirst + 1) = 0;
  *((_DWORD *)v1->m_kPageNumTexts._Myfirst + 2) = 0;
  *((_DWORD *)v1->m_kPageNumBtns._Myfirst + 2) = 0;
  *((_DWORD *)v1->m_kPageNumTexts._Myfirst + 3) = 0;
  *((_DWORD *)v1->m_kPageNumBtns._Myfirst + 3) = 0;
  *((_DWORD *)v1->m_kPageNumTexts._Myfirst + 4) = 0;
  *((_DWORD *)v1->m_kPageNumBtns._Myfirst + 4) = 0;
  v2 = (char *)v1->m_kPageArrowBtns._Mylast;
  v3 = v1->m_kPageArrowBtns._Myfirst;
  v4 = v1->m_kPageArrowBtns._Mylast - v3;
  if ( v4 <= 4 )
  {
    if ( v4 < 4 )
    {
      v10 = v1->m_kPageArrowBtns._Mylast - v3;
      if ( 0x3FFFFFFF - (4 - v4) < v10 )
        std::_Xlength_error("vector<T> too long");
      v6 = 4 - v4 + v10;
      v7 = v1->m_kPageArrowBtns._Myend - v3;
      if ( v6 > v7 )
      {
        if ( 0x3FFFFFFF - (v7 >> 1) >= v7 )
          v8 = (v7 >> 1) + v7;
        else
          v8 = 0;
        if ( v8 < v6 )
          v8 = v6;
        std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
          (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&v1->m_kPageArrowBtns,
          v8);
      }
      v9 = v1->m_kPageArrowBtns._Mylast - v1->m_kPageArrowBtns._Myfirst;
      if ( 4 != v9 )
        memset(v1->m_kPageArrowBtns._Mylast, 0, 4 * (4 - v9));
      v1->m_kPageArrowBtns._Mylast += 4 - (v1->m_kPageArrowBtns._Mylast - v1->m_kPageArrowBtns._Myfirst);
    }
  }
  else
  {
    v5 = (char *)(v3 + 4);
    if ( v5 != v2 )
    {
      memmove(v5, v2, 0);
      v1->m_kPageArrowBtns._Mylast = (PgWinBut **)v5;
    }
  }
  *v1->m_kPageArrowBtns._Myfirst = 0;
  *((_DWORD *)v1->m_kPageArrowBtns._Myfirst + 1) = 0;
  *((_DWORD *)v1->m_kPageArrowBtns._Myfirst + 2) = 0;
  *((_DWORD *)v1->m_kPageArrowBtns._Myfirst + 3) = 0;
}
// 9879DC: using guessed type void (__thiscall *CollectPageWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9879FC: using guessed type int (__thiscall *CollectPageWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004EA7D0) --------------------------------------------------------
CollectPageWin *__cdecl CollectPageWin::CreateWin(NiNode *pkNode, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent)
{
  PgWin *v6; // eax@1
  PgWin *v7; // eax@2
  PgWin *v8; // esi@2
  PgWin *v9; // edi@8
  CollectPageWin *v10; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v12; // [sp+20h] [bp-4h]@1

  v6 = (PgWin *)operator new(0x168u);
  result.m_pObject = v6;
  v12 = 0;
  if ( v6 )
  {
    CollectPageWin::CollectPageWin((CollectPageWin *)v6);
    v8 = v7;
  }
  else
  {
    v8 = 0;
  }
  if ( v8 )
    InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  v12 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v8);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, NiNode *, int, int, unsigned int, unsigned int, PgWin *))v8->vfptr[113].__vecDelDtor)(
                          v8,
                          pkNode,
                          iXPos,
                          iYPos,
                          uiWidth,
                          uiHeight,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v8->vfptr[89].__vecDelDtor)(v8);
    v12 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v10 = (CollectPageWin *)v8;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v8);
    if ( result.m_pObject )
    {
      v9 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v9 )
          v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      }
    }
    v12 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v10 = 0;
  }
  return v10;
}

//----- (004EA910) --------------------------------------------------------
void __thiscall CollectRwChoiceWin::CollectRwChoiceWin(CollectRwChoiceWin *this)
{
  CollectRwChoiceWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&CollectRwChoiceWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CollectRwChoiceWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkOKBtn = 0;
  v1->m_kRewardItems._Myfirst = 0;
  v1->m_kRewardItems._Mylast = 0;
  v1->m_kRewardItems._Myend = 0;
  v1->m_bSelect = 0;
  v1->m_uiRewardID = 0;
  v1->m_uiSelectIndex = 0;
  v1->m_iItemFirstPos = 0;
  v1->m_uiItemInterval = 0;
  std::vector<PgWinText *,std::allocator<PgWinText *>>::resize(
    (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v1->m_kRewardItems,
    5u);
  *v1->m_kRewardItems._Myfirst = 0;
  *((_DWORD *)v1->m_kRewardItems._Myfirst + 1) = 0;
  *((_DWORD *)v1->m_kRewardItems._Myfirst + 2) = 0;
  *((_DWORD *)v1->m_kRewardItems._Myfirst + 3) = 0;
  *((_DWORD *)v1->m_kRewardItems._Myfirst + 4) = 0;
}
// 987BC8: using guessed type void (__thiscall *CollectRwChoiceWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 987BE4: using guessed type int (__thiscall *CollectRwChoiceWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004EA9E0) --------------------------------------------------------
CollectRwChoiceWin *__cdecl CollectRwChoiceWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  CollectRwChoiceWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x180u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    CollectRwChoiceWin::CollectRwChoiceWin((CollectRwChoiceWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (CollectRwChoiceWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (004EAB10) --------------------------------------------------------
char __thiscall CardSlotWin::Create(CardSlotWin *this, int iXPos, int iYPos, PgWin *pkParent, unsigned int uiIndex, unsigned int uiCommandMsg, unsigned int uiRCommandMsg)
{
  unsigned int v7; // edi@1
  CardSlotWin *v8; // esi@1
  const char *v9; // eax@3
  PgSprData *v10; // eax@4
  NiNode *v11; // esi@5
  NiSourceTexture *v13; // eax@10
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v14; // eax@12
  NiNode *v15; // ebx@16
  const char *v16; // eax@16
  PgSprData *v17; // eax@16
  PgWinSpr **v18; // ebx@16
  void *v19; // eax@16
  NiNode *v20; // ebx@18
  const char *v21; // eax@18
  PgSprData *v22; // eax@18
  PgWin *v23; // ST20_4@18
  PgSprData *v24; // ST1C_4@18
  int v25; // eax@18
  int v26; // ST18_4@18
  int v27; // eax@18
  PgWinSpr *v28; // eax@18
  PgSprData *v29; // eax@19
  PgWinSpr *v30; // eax@19
  int v31; // eax@19
  unsigned int v32; // ST1C_4@19
  NiSourceTexture *v33; // eax@19
  PgWinSpr *v34; // eax@19
  NiNode *v35; // esi@20
  unsigned int v36; // [sp+18h] [bp-A0h]@0
  NiTexturePalette *pTexturePalette; // [sp+28h] [bp-90h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *pTexturePalettea; // [sp+28h] [bp-90h]@12
  int iTop; // [sp+2Ch] [bp-8Ch]@1
  int iLeft; // [sp+30h] [bp-88h]@1
  NiPointer<NiNode> spNode; // [sp+34h] [bp-84h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kRankNodeName[4]; // [sp+38h] [bp-80h]@12
  int v43; // [sp+B4h] [bp-4h]@1

  v7 = 0;
  v8 = this;
  spNode.m_pObject = 0;
  v43 = 0;
  iLeft = 0;
  iTop = 0;
  pTexturePalette = ::pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v9 = Folder::Merge(&Folder::m_acMenu, "Game\\Collect_SCard.nif");
  PgUtil::LoadNodeNifFile(v9, &spNode, pTexturePalette);
  if ( !spNode.m_pObject )
    return 0;
  v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SmallImage", &iLeft, &iTop, 0);
  if ( !PgWinLRBut::Create((PgWinLRBut *)&v8->vfptr, iXPos, iYPos, v10, pkParent, uiCommandMsg, uiRCommandMsg) )
  {
    v11 = spNode.m_pObject;
    v43 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v11 )
        v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    }
    return 0;
  }
  v13 = PgUtil::Create1PixelSourceTexture(0, 0, 0, -1);
  if ( v13 )
    v8->vfptr[113].__vecDelDtor((NiRefObject *)v8, (unsigned int)v13);
  v8->m_uiIndex = uiIndex;
  kRankNodeName[0]._Myres = 15;
  kRankNodeName[0]._Mysize = 0;
  kRankNodeName[0]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(kRankNodeName, "S", 1u);
  LOBYTE(v43) = 1;
  kRankNodeName[1]._Myres = 15;
  kRankNodeName[1]._Mysize = 0;
  kRankNodeName[1]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&kRankNodeName[1], "A", 1u);
  LOBYTE(v43) = 2;
  kRankNodeName[2]._Myres = 15;
  kRankNodeName[2]._Mysize = 0;
  kRankNodeName[2]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&kRankNodeName[2], "B", 1u);
  LOBYTE(v43) = 3;
  kRankNodeName[3]._Myres = 15;
  kRankNodeName[3]._Mysize = 0;
  kRankNodeName[3]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&kRankNodeName[3], "C", 1u);
  v14 = kRankNodeName;
  LOBYTE(v43) = 4;
  for ( pTexturePalettea = kRankNodeName; ; v14 = pTexturePalettea )
  {
    if ( v14->_Myres >= 0x10 )
      v14 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v14->_Bx._Ptr;
    v15 = spNode.m_pObject;
    v16 = fs("%sCardBack", v14);
    v17 = PgSprData::Create((NiAVObject *)&v15->vfptr, v16, &iLeft, &iTop, 0);
    v18 = v8->m_kBorderSprs._Myfirst;
    v18[v7] = PgWinSpr::CreateWin(iLeft, iTop, v17, (PgWin *)&v8->vfptr, 0, 0);
    ((void (__stdcall *)(_DWORD))v8->m_kBorderSprs._Myfirst[v7]->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v8->m_kBorderSprs._Myfirst[v7]->vfptr[60].__vecDelDtor)(0);
    v19 = pTexturePalettea;
    if ( pTexturePalettea->_Myres >= 0x10 )
      v19 = pTexturePalettea->_Bx._Ptr;
    v20 = spNode.m_pObject;
    v21 = fs("%sCard", v19);
    v22 = PgSprData::Create((NiAVObject *)&v20->vfptr, v21, &iLeft, &iTop, 0);
    v23 = (PgWin *)&v8->m_kBorderSprs._Myfirst[v7]->vfptr;
    v24 = v22;
    v25 = ((int (__thiscall *)(PgWinSpr *))v23->vfptr[42].__vecDelDtor)(v8->m_kBorderSprs._Myfirst[v7]);
    v26 = iTop - v25;
    v27 = ((int (__thiscall *)(PgWin *))v23->vfptr[41].__vecDelDtor)(v23);
    v28 = PgWinSpr::CreateWin(iLeft - v27, v26, v24, v23, 0, 0);
    v28->vfptr[60].__vecDelDtor((NiRefObject *)v28, 0);
    ++pTexturePalettea;
    ++v7;
    if ( v7 >= 4 )
      break;
  }
  v29 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Unidentified", &iLeft, &iTop, 0);
  v30 = PgWinSpr::CreateWin(iLeft, iTop, v29, (PgWin *)&v8->vfptr, 0, 0);
  v8->m_pkUnidentifiedSpr = v30;
  v30->vfptr[60].__vecDelDtor((NiRefObject *)v30, 0);
  v31 = ((int (__thiscall *)(CardSlotWin *))v8->vfptr[37].__vecDelDtor)(v8);
  v32 = (int)v8->vfptr[36].__vecDelDtor((NiRefObject *)v8, v31);
  v33 = PgUtil::Create1PixelSourceTexture(0, 0, 0, -1);
  v34 = PgWinSpr::CreateWin(v33, 0, 0, v32, (unsigned int)v8, 0, 0, v36);
  v8->m_pkBlindSpr = v34;
  ((void (__thiscall *)(PgWinSpr *))v34->vfptr[69].__vecDelDtor)(v34);
  ((void (__stdcall *)(_DWORD))v8->m_pkBlindSpr->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v8->m_pkBlindSpr->vfptr[60].__vecDelDtor)(0);
  v8->m_pkToolTipWin = g_pkToolTipWin;
  LOBYTE(v43) = 0;
  `eh vector destructor iterator'(
    kRankNodeName,
    0x1Cu,
    4,
    (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
  v43 = -1;
  if ( spNode.m_pObject )
  {
    v35 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v35 )
        v35->vfptr->__vecDelDtor((NiRefObject *)v35, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004EAF30) --------------------------------------------------------
void __thiscall CardSlotWin::SetInfo(CardSlotWin *this, unsigned int uiCardID, unsigned int uiStar, unsigned int uiSerial, int tRegistTime)
{
  CardSlotWin *v5; // ebx@1
  PgWinSpr *v6; // ecx@1
  int v7; // eax@3
  char *v8; // eax@7
  char *v9; // esi@7
  char *v10; // eax@15
  const char *v11; // eax@15
  NiSourceTexture *v12; // eax@15
  PgWinSpr *v13; // ecx@17
  NiUnsharedGeometryGroup *v14; // esi@19
  NiUnsharedGeometryGroup *v15; // esi@19
  NiUnsharedGeometryGroup *v16; // esi@19
  NiUnsharedGeometryGroup *v17; // eax@19
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v18; // eax@19
  bool v19; // cf@19
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v20; // ST08_4@21
  int v21; // ST04_4@21
  char *v22; // eax@21
  char *v23; // ST10_4@21
  char *v24; // eax@21
  char *v25; // eax@21
  int v26; // ST14_4@22
  char *v27; // eax@22
  char *v28; // eax@22
  char *v29; // [sp+10h] [bp-94h]@7
  unsigned int v30; // [sp+18h] [bp-8Ch]@3
  unsigned int RecordNo; // [sp+1Ch] [bp-88h]@6
  CollectCard *pkCollectCard; // [sp+20h] [bp-84h]@4
  CollectCard *pkCollectCarda; // [sp+20h] [bp-84h]@12
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kGrade[4]; // [sp+24h] [bp-80h]@19
  int v35; // [sp+A0h] [bp-4h]@19

  v5 = this;
  CardSlotWin::Reset(this);
  v6 = v5->m_pkUnidentifiedSpr;
  v5->m_uiStar = uiStar;
  v5->m_uiCardID = uiCardID;
  v5->m_uiSerial = uiSerial;
  v5->m_tRegistTime = tRegistTime;
  if ( v6 )
    ((void (__stdcall *)(_DWORD))v6->vfptr[64].__vecDelDtor)(tRegistTime == 0);
  v30 = v5->m_uiCardID;
  v7 = *(_DWORD *)(ITableBase<CollectCardView,CollectCardViewTab>::ms_pkTable + 56);
  if ( v7 )
    pkCollectCard = *(CollectCard **)(v7 + 40);
  else
    pkCollectCard = 0;
  RecordNo = 0;
  if ( (unsigned int)pkCollectCard > 0 )
  {
    while ( 1 )
    {
      v8 = CDataReader::GetRecord(
             (CDataReader *)(ITableBase<CollectCardView,CollectCardViewTab>::ms_pkTable + 4),
             RecordNo);
      v9 = v8;
      v29 = v8;
      if ( v8 )
      {
        if ( *(_WORD *)v8 == (_WORD)v30 )
          break;
      }
      if ( ++RecordNo >= (unsigned int)pkCollectCard )
        return;
    }
    if ( tRegistTime <= 0 )
    {
      v26 = (int)(v8 + 34);
      v27 = (char *)TextData2::Get(0x305A715Cu);
      v28 = fs(v27, v26);
      PgWin::SetToolTipWinText((PgWin *)&v5->vfptr, v28);
    }
    else
    {
      pkCollectCarda = CollectCardTab::GetByCardID(v5->m_uiCardID);
      if ( !pkCollectCarda )
        return;
      if ( !Folder::m_bInit )
        Folder::Init();
      v10 = Folder::Merge(&Folder::m_acMenu, "Collect\\Min\\%s.png");
      v11 = fs(v10, v9 + 2);
      v12 = CardSlotWin::LoadImageFile(v11);
      if ( v12 )
        v5->vfptr[113].__vecDelDtor((NiRefObject *)v5, (unsigned int)v12);
      v13 = v5->m_kBorderSprs._Myfirst[pkCollectCarda->CC_CardGradeType];
      if ( v13 )
        ((void (__stdcall *)(signed int))v13->vfptr[64].__vecDelDtor)(1);
      kGrade[0]._Myres = 15;
      kGrade[0]._Mysize = 0;
      kGrade[0]._Bx._Buf[0] = 0;
      v14 = TextData2::Get(0xFF43606C);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        kGrade,
        (const char *)v14,
        strlen((const char *)v14));
      v35 = 0;
      v15 = TextData2::Get(0xFF434E6C);
      kGrade[1]._Myres = 15;
      kGrade[1]._Mysize = 0;
      kGrade[1]._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &kGrade[1],
        (const char *)v15,
        strlen((const char *)v15));
      LOBYTE(v35) = 1;
      v16 = TextData2::Get(0xFF434F6C);
      kGrade[2]._Myres = 15;
      kGrade[2]._Mysize = 0;
      kGrade[2]._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &kGrade[2],
        (const char *)v16,
        strlen((const char *)v16));
      LOBYTE(v35) = 2;
      v17 = TextData2::Get(0xFF43506C);
      kGrade[3]._Myres = 15;
      kGrade[3]._Mysize = 0;
      kGrade[3]._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &kGrade[3],
        (const char *)v17,
        strlen((const char *)v17));
      v18 = &kGrade[pkCollectCarda->CC_CardGradeType];
      v19 = v18->_Myres < 0x10;
      v35 = 3;
      if ( !v19 )
        v18 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v18->_Bx._Ptr;
      v20 = v18;
      v21 = (unsigned __int8)v29[386];
      v22 = (char *)TextData2::Get(0x73A0CCBBu);
      v23 = fs(
              v22,
              v21,
              v20,
              (char)(uiSerial / 0xF4240 + 64),
              (uiSerial % 0xF4240 - uiSerial % 0x2710) / 0x2710,
              uiSerial % 0x2710);
      v24 = (char *)TextData2::Get(0x1F34296Cu);
      v25 = fs(v24, v29 + 34, v23, uiStar);
      PgWin::SetToolTipWinText((PgWin *)&v5->vfptr, v25);
      v35 = -1;
      `eh vector destructor iterator'(
        kGrade,
        0x1Cu,
        4,
        (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    }
    v5->vfptr[60].__vecDelDtor((NiRefObject *)v5, 1u);
  }
}
// A8975C: using guessed type bool Folder::m_bInit;
// A8C214: using guessed type int ITableBase<CollectCardView,CollectCardViewTab>::ms_pkTable;

//----- (004EB2D0) --------------------------------------------------------
char __thiscall CollectPageWin::Create(CollectPageWin *this, NiNode *pkNode, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent)
{
  NiAVObject *v7; // ebx@1
  CollectPageWin *v8; // esi@1
  int v9; // eax@3
  int v10; // ecx@4
  int v11; // eax@5
  NiRefObjectVtbl *v12; // edx@5
  int v14; // edi@10
  unsigned int v15; // ST44_4@12
  const char *v16; // eax@12
  PgSprData *v17; // eax@12
  PgWinBut **v18; // ebx@12
  int v19; // edi@12
  PgSprData::PgHitTester *v20; // eax@12
  PgSprData *v21; // edx@12
  PgWinText **v22; // ebx@12
  PgFont *v23; // eax@12
  PgWinText **v24; // eax@13
  PgWinText *v25; // ebx@13
  int v26; // edi@13
  int v27; // ebx@13
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v28; // edi@13
  void *v29; // eax@16
  const char *v30; // eax@18
  PgSprData *v31; // eax@18
  bool v32; // cf@18
  void *v33; // eax@19
  const char *v34; // eax@21
  const char *v35; // eax@23
  PgWinBut **v36; // edi@23
  NiAVObject *v37; // esi@24
  int iLeft; // [sp+1Ch] [bp-94h]@4
  int iTop; // [sp+20h] [bp-90h]@4
  NiAVObject *pkObject; // [sp+24h] [bp-8Ch]@1
  int iOffX; // [sp+28h] [bp-88h]@5
  PgSprData *pkSprData; // [sp+2Ch] [bp-84h]@12
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > akPageNodeName[4]; // [sp+30h] [bp-80h]@13
  int v44; // [sp+ACh] [bp-4h]@3

  v7 = (NiAVObject *)pkNode;
  v8 = this;
  pkObject = (NiAVObject *)pkNode;
  if ( pkNode )
    InterlockedIncrement((volatile LONG *)&pkNode->m_uiRefCount);
  v9 = 0;
  v44 = 0;
  if ( !pkNode )
    return 0;
  v10 = 0;
  iLeft = 0;
  iTop = 0;
  if ( pkParent )
  {
    v11 = ((int (__thiscall *)(PgWin *))pkParent->vfptr[41].__vecDelDtor)(pkParent);
    v12 = pkParent->vfptr;
    iOffX = v11;
    v9 = ((int (__thiscall *)(PgWin *))v12[42].__vecDelDtor)(pkParent);
    v10 = iOffX;
  }
  if ( !PgWin::Create((PgWin *)&v8->vfptr, iXPos - v10, iYPos - v9, uiWidth, uiHeight, pkParent, 0, 0) )
  {
    v44 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&pkNode->m_uiRefCount) )
      pkNode->vfptr->__vecDelDtor((NiRefObject *)pkNode, 1u);
    return 0;
  }
  v14 = 0;
  while ( 1 )
  {
    v15 = v14 + 1;
    v16 = fs("PageBtn%02d", v14 + 1);
    v17 = PgSprData::Create(v7, v16, &iLeft, &iTop, 0);
    v18 = v8->m_kPageNumBtns._Myfirst;
    pkSprData = v17;
    v19 = v14;
    v18[v19] = PgWinBut::CreateWin(iLeft - iXPos, iTop - iYPos, v17, (PgWin *)&v8->vfptr, 0, 0, 0);
    ((void (__stdcall *)(_DWORD))v8->m_kPageNumBtns._Myfirst[v19]->vfptr[69].__vecDelDtor)(0.0);
    ((void (__stdcall *)(_DWORD))v8->m_kPageNumBtns._Myfirst[v19]->vfptr[64].__vecDelDtor)(0);
    v20 = pkSprData->m_akHitTester.m_pBase->m_pObject;
    v21 = (PgSprData *)v20->m_uiWidth;
    v22 = v8->m_kPageNumTexts._Myfirst;
    iOffX = v20->m_uiHeight;
    pkSprData = v21;
    v23 = Font::Get(0);
    v22[v19] = PgWinText::CreateWin(
                 iLeft - iXPos,
                 iTop - iYPos,
                 (unsigned int)pkSprData,
                 iOffX,
                 v23,
                 (PgWin *)&v8->vfptr,
                 0,
                 0);
    ((void (__stdcall *)(signed int))v8->m_kPageNumTexts._Myfirst[v19]->vfptr[122].__vecDelDtor)(9);
    v8->m_kPageNumTexts._Myfirst[v19]->vfptr[60].__vecDelDtor((NiRefObject *)v8->m_kPageNumTexts._Myfirst[v19], 0);
    v14 = v15;
    if ( v15 >= 5 )
      break;
    v7 = pkObject;
  }
  v8->m_iPageNumFirstPos = (*(int (**)(void))(**(_DWORD **)v8->m_kPageNumTexts._Myfirst + 164))();
  v24 = v8->m_kPageNumTexts._Myfirst;
  v25 = *v24;
  v26 = ((int (*)(void))v24[1]->vfptr[41].__vecDelDtor)() - v8->m_iPageNumFirstPos;
  v8->m_uiPageNumInterval = v26 - ((int (__thiscall *)(PgWinText *))v25->vfptr[36].__vecDelDtor)(v25);
  v27 = 0;
  akPageNodeName[0]._Myres = 15;
  akPageNodeName[0]._Mysize = 0;
  akPageNodeName[0]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(akPageNodeName, "First", 5u);
  LOBYTE(v44) = 1;
  akPageNodeName[1]._Myres = 15;
  akPageNodeName[1]._Mysize = 0;
  akPageNodeName[1]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&akPageNodeName[1], "Front", 5u);
  LOBYTE(v44) = 2;
  akPageNodeName[2]._Myres = 15;
  akPageNodeName[2]._Mysize = 0;
  akPageNodeName[2]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&akPageNodeName[2], "Next", 4u);
  LOBYTE(v44) = 3;
  akPageNodeName[3]._Myres = 15;
  akPageNodeName[3]._Mysize = 0;
  akPageNodeName[3]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&akPageNodeName[3], "Last", 4u);
  v28 = akPageNodeName;
  LOBYTE(v44) = 4;
  for ( iOffX = (int)akPageNodeName; ; v28 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)iOffX )
  {
    if ( v28->_Myres < 0x10 )
      v29 = v28;
    else
      v29 = v28->_Bx._Ptr;
    v30 = fs("%sPageNor", v29);
    v31 = PgSprData::Create(pkObject, v30, &iLeft, &iTop, 0);
    v32 = v28->_Myres < 0x10;
    pkSprData = v31;
    if ( v32 )
      v33 = v28;
    else
      v33 = v28->_Bx._Ptr;
    v34 = fs("%sPageClick", v33);
    PgSprData::Add(pkSprData, pkObject, v34);
    if ( v28->_Myres >= 0x10 )
      v28 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v28->_Bx._Ptr;
    v35 = fs("%sPageOver", v28);
    PgSprData::Add(pkSprData, pkObject, v35);
    v36 = &v8->m_kPageArrowBtns._Myfirst[v27];
    *v36 = PgWinBut::CreateWin(iLeft - iXPos, iTop - iYPos, pkSprData, (PgWin *)&v8->vfptr, 1u, 0, 0);
    ((void (__stdcall *)(int))v8->m_kPageArrowBtns._Myfirst[v27]->vfptr[130].__vecDelDtor)(v27);
    iOffX += 28;
    if ( (unsigned int)++v27 >= 4 )
      break;
  }
  LOBYTE(v44) = 0;
  `eh vector destructor iterator'(
    akPageNodeName,
    0x1Cu,
    4,
    (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
  v37 = pkObject;
  v44 = -1;
  if ( !InterlockedDecrement((volatile LONG *)&pkObject->m_uiRefCount) )
    v37->vfptr->__vecDelDtor((NiRefObject *)v37, 1u);
  return 1;
}

//----- (004EB710) --------------------------------------------------------
char __thiscall CollectCardChoiceWin::Create(CollectCardChoiceWin *this, PgFrameWork *pkFrameWork)
{
  CollectCardChoiceWin *v2; // esi@1
  const char *v3; // eax@3
  PgSprData *v4; // eax@4
  NiNode *v5; // esi@5
  bool v6; // zf@7
  PgSprData *v8; // eax@11
  PgWinSpr *v9; // eax@11
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v10; // ebx@11
  void *v11; // eax@13
  NiNode *v12; // edi@15
  const char *v13; // eax@15
  PgSprData *v14; // edi@15
  void *v15; // eax@16
  const char *v16; // eax@18
  void *v17; // eax@19
  const char *v18; // eax@21
  PgWinBut *v19; // eax@21
  unsigned int v20; // ebx@22
  NiNode *v21; // edi@23
  unsigned int v22; // ST54_4@23
  const char *v23; // eax@23
  PgSprData *v24; // eax@23
  int v25; // edi@23
  CardSlotWin *v26; // ebx@23
  NiAVObject *v27; // eax@23
  void *(__thiscall *v28)(NiRefObject *, unsigned int); // edx@23
  unsigned int v29; // ecx@23
  CardSlotWin **v30; // eax@23
  CardSlotWin *v31; // ebx@23
  NiAVObject *v32; // eax@23
  void *(__thiscall *v33)(NiRefObject *, unsigned int); // edx@23
  unsigned int v34; // ecx@23
  CardSlotWin **v35; // eax@23
  LONG v36; // eax@26
  int v37; // edi@29
  CollectPageWin *v38; // eax@32
  PgSprData *v39; // edi@32
  PgWinBut *v40; // ST38_4@32
  PgFont *v41; // ST34_4@32
  unsigned int v42; // ST30_4@32
  unsigned int v43; // eax@32
  PgWinText *v44; // edi@32
  NiRefObjectVtbl *v45; // ebx@32
  NiUnsharedGeometryGroup *v46; // eax@32
  PgSprData *v47; // edi@32
  PgWinBut *v48; // ST38_4@32
  PgFont *v49; // ST34_4@32
  unsigned int v50; // ST30_4@32
  unsigned int v51; // eax@32
  PgWinText *v52; // edi@32
  NiRefObjectVtbl *v53; // ebx@32
  NiUnsharedGeometryGroup *v54; // eax@32
  NiNode *v55; // esi@33
  unsigned int uiHeight; // [sp+4Ch] [bp-9Ch]@1
  unsigned int uiWidth; // [sp+50h] [bp-98h]@1
  unsigned int i; // [sp+54h] [bp-94h]@1
  NiAVObject *pkObject; // [sp+58h] [bp-90h]@18
  int iTop; // [sp+5Ch] [bp-8Ch]@1
  int iLeft; // [sp+60h] [bp-88h]@1
  NiPointer<NiNode> spNode; // [sp+64h] [bp-84h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > akGradeNodeName[4]; // [sp+68h] [bp-80h]@11
  int v64; // [sp+E4h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v64 = 0;
  uiWidth = 0;
  uiHeight = 0;
  iLeft = 0;
  iTop = 0;
  i = (unsigned int)pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v3 = Folder::Merge(&Folder::m_acMenu, "Game\\Collect_CardChoice.nif");
  PgUtil::LoadNodeNifFile(v3, &spNode, (NiTexturePalette *)i);
  if ( !spNode.m_pObject )
    return 0;
  v4 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iLeft, &iTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v4, 0, pkFrameWork, "CollectCardChoiceWin", 0) )
  {
    v5 = spNode.m_pObject;
    v64 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v6 = v5 == 0;
    goto LABEL_8;
  }
  v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iLeft, &iTop, 0);
  v9 = PgWinSpr::CreateWin(iLeft, iTop, v8, (PgWin *)&v2->vfptr, 0, 0);
  v9->vfptr[60].__vecDelDtor((NiRefObject *)v9, 0);
  akGradeNodeName[0]._Myres = 15;
  akGradeNodeName[0]._Mysize = 0;
  akGradeNodeName[0]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(akGradeNodeName, "S", 1u);
  LOBYTE(v64) = 1;
  akGradeNodeName[1]._Myres = 15;
  akGradeNodeName[1]._Mysize = 0;
  akGradeNodeName[1]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&akGradeNodeName[1], "A", 1u);
  LOBYTE(v64) = 2;
  akGradeNodeName[2]._Myres = 15;
  akGradeNodeName[2]._Mysize = 0;
  akGradeNodeName[2]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&akGradeNodeName[2], "B", 1u);
  LOBYTE(v64) = 3;
  akGradeNodeName[3]._Myres = 15;
  akGradeNodeName[3]._Mysize = 0;
  akGradeNodeName[3]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&akGradeNodeName[3], "C", 1u);
  LOBYTE(v64) = 4;
  i = 0;
  v10 = akGradeNodeName;
  do
  {
    if ( v10->_Myres < 0x10 )
      v11 = v10;
    else
      v11 = v10->_Bx._Ptr;
    v12 = spNode.m_pObject;
    v13 = fs("%sRankNor", v11);
    v14 = PgSprData::Create((NiAVObject *)&v12->vfptr, v13, &iLeft, &iTop, 0);
    if ( v10->_Myres < 0x10 )
      v15 = v10;
    else
      v15 = v10->_Bx._Ptr;
    pkObject = (NiAVObject *)spNode.m_pObject;
    v16 = fs("%sRankClick", v15);
    PgSprData::Add(v14, pkObject, v16);
    if ( v10->_Myres < 0x10 )
      v17 = v10;
    else
      v17 = v10->_Bx._Ptr;
    pkObject = (NiAVObject *)spNode.m_pObject;
    v18 = fs("%sRankOver", v17);
    PgSprData::Add(v14, pkObject, v18);
    v19 = PgWinBut::CreateWin(iLeft, iTop, v14, (PgWin *)&v2->vfptr, 2u, 0, 0);
    v19->vfptr[130].__vecDelDtor((NiRefObject *)v19, i);
    ++v10;
    ++i;
  }
  while ( i < 4 );
  v20 = 0;
  do
  {
    v21 = spNode.m_pObject;
    v22 = v20 + 1;
    v23 = fs("SelectCard%02d", v20 + 1);
    v24 = PgSprData::Create((NiAVObject *)&v21->vfptr, v23, &iLeft, &iTop, 0);
    i = (unsigned int)PgWinSpr::CreateWin(iLeft, iTop, v24, (PgWin *)&v2->vfptr, 0, 0);
    v25 = v20;
    pkObject = (NiAVObject *)&v2->m_kCardSlots._Myfirst[v20];
    pkObject->vfptr = (NiRefObjectVtbl *)CardSlotWin::CreateWin(iLeft, iTop, (PgWin *)&v2->vfptr, v20, 3u, 3u);
    ((void (__stdcall *)(unsigned int))v2->m_kCardSlots._Myfirst[v20]->vfptr[130].__vecDelDtor)(v20);
    ((void (__stdcall *)(unsigned int))v2->m_kCardSlots._Myfirst[v20]->vfptr[141].__vecDelDtor)(v20);
    v26 = v2->m_kCardSlots._Myfirst[v20];
    v27 = (NiAVObject *)(*(int (**)(void))(*(_DWORD *)i + 144))();
    v28 = v26->vfptr[36].__vecDelDtor;
    pkObject = v27;
    v29 = (unsigned int)v27 - ((int (__thiscall *)(CardSlotWin *))v28)(v26);
    v30 = v2->m_kCardSlots._Myfirst;
    iLeft += v29 >> 1;
    v31 = v30[v25];
    v32 = (NiAVObject *)(*(int (**)(void))(*(_DWORD *)i + 148))();
    v33 = v31->vfptr[37].__vecDelDtor;
    pkObject = v32;
    v34 = (unsigned int)v32 - ((int (__thiscall *)(CardSlotWin *))v33)(v31);
    v35 = v2->m_kCardSlots._Myfirst;
    iTop += v34 >> 1;
    ((void (__stdcall *)(int))v35[v25]->vfptr[43].__vecDelDtor)(iLeft);
    v2->m_kCardSlots._Myfirst[v25]->vfptr[44].__vecDelDtor((NiRefObject *)v2->m_kCardSlots._Myfirst[v25], iTop);
    v20 = v22;
  }
  while ( v22 < 4 );
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "FirstPageNor",
          &iLeft,
          &iTop,
          &uiWidth,
          &uiHeight) )
  {
    LOBYTE(v64) = 0;
    `eh vector destructor iterator'(
      akGradeNodeName,
      0x1Cu,
      4,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    v5 = spNode.m_pObject;
    v64 = -1;
    if ( !spNode.m_pObject )
      return 0;
    v36 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
LABEL_27:
    if ( !v36 )
    {
      v6 = v5 == 0;
LABEL_8:
      if ( !v6 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
    return 0;
  }
  v37 = iLeft;
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "LastPageNor",
          &iLeft,
          &iTop,
          &uiWidth,
          &uiHeight) )
  {
    LOBYTE(v64) = 0;
    `eh vector destructor iterator'(
      akGradeNodeName,
      0x1Cu,
      4,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    v5 = spNode.m_pObject;
    v64 = -1;
    if ( !spNode.m_pObject )
      return 0;
    v36 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
    goto LABEL_27;
  }
  uiWidth += iLeft - v37;
  v38 = CollectPageWin::CreateWin(spNode.m_pObject, iLeft, iTop, uiWidth, uiHeight, (PgWin *)&v2->vfptr);
  v2->m_pkPageWin = v38;
  v38->m_uiUpdateMsg = 4;
  v39 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "OkBtnNor", &iLeft, &iTop, 0);
  PgSprData::Add(v39, (NiAVObject *)&spNode.m_pObject->vfptr, "OkBtnClick");
  PgSprData::Add(v39, (NiAVObject *)&spNode.m_pObject->vfptr, "OkBtnOver");
  v40 = PgWinBut::CreateWin(iLeft, iTop, v39, (PgWin *)&v2->vfptr, 0, 0, 0);
  v41 = Font::Get(MAIN_MENU);
  v42 = ((int (__thiscall *)(PgWinBut *))v40->vfptr[37].__vecDelDtor)(v40);
  v43 = ((int (__thiscall *)(PgWinBut *))v40->vfptr[36].__vecDelDtor)(v40);
  v44 = PgWinText::CreateWin(0, 0, v43, v42, v41, (PgWin *)&v40->vfptr, 0, 0);
  v44->vfptr[122].__vecDelDtor((NiRefObject *)v44, 5u);
  v44->vfptr[60].__vecDelDtor((NiRefObject *)v44, 0);
  v45 = v44->vfptr;
  v46 = TextData2::Get(0xBAEAE224);
  v45[118].__vecDelDtor((NiRefObject *)v44, (unsigned int)v46);
  v47 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CancelBtnNor", &iLeft, &iTop, 0);
  PgSprData::Add(v47, (NiAVObject *)&spNode.m_pObject->vfptr, "CancelBtnClick");
  PgSprData::Add(v47, (NiAVObject *)&spNode.m_pObject->vfptr, "CancelBtnOver");
  v48 = PgWinBut::CreateWin(iLeft, iTop, v47, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v49 = Font::Get(MAIN_MENU);
  v50 = ((int (__thiscall *)(PgWinBut *))v48->vfptr[37].__vecDelDtor)(v48);
  v51 = ((int (__thiscall *)(PgWinBut *))v48->vfptr[36].__vecDelDtor)(v48);
  v52 = PgWinText::CreateWin(0, 0, v51, v50, v49, (PgWin *)&v48->vfptr, 0, 0);
  v52->vfptr[122].__vecDelDtor((NiRefObject *)v52, 5u);
  v52->vfptr[60].__vecDelDtor((NiRefObject *)v52, 0);
  v53 = v52->vfptr;
  v54 = TextData2::Get(0xA6E6DFD7);
  v53[118].__vecDelDtor((NiRefObject *)v52, (unsigned int)v54);
  ((void (__thiscall *)(CollectCardChoiceWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  LOBYTE(v64) = 0;
  `eh vector destructor iterator'(
    akGradeNodeName,
    0x1Cu,
    4,
    (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
  v64 = -1;
  if ( spNode.m_pObject )
  {
    v55 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v55 )
        v55->vfptr->__vecDelDtor((NiRefObject *)v55, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004EBEB0) --------------------------------------------------------
void __thiscall CollectCardChoiceWin::UpdateGrade(CollectCardChoiceWin *this, unsigned int uiGrade)
{
  CollectCardChoiceWin *v2; // ebx@1
  CollectPageWin *v3; // eax@1
  unsigned int v4; // ecx@2
  unsigned int v5; // eax@2
  CardSlotWin *v6; // esi@4
  unsigned int v7; // eax@5
  CollectCardChoiceWin::sRegistCardInfo *v8; // edi@6
  void *(__thiscall *v9)(NiRefObject *, unsigned int); // eax@6
  signed int v10; // [sp-Ch] [bp-1Ch]@8
  unsigned int uiPage; // [sp+4h] [bp-Ch]@2
  int uiSize; // [sp+8h] [bp-8h]@2
  unsigned int i; // [sp+Ch] [bp-4h]@2

  v2 = this;
  CollectCardChoiceWin::Reset(this);
  v3 = v2->m_pkPageWin;
  if ( v3 )
  {
    uiPage = v3->m_uiPage;
    v4 = v2->m_kRegistCardInfos._Mylast - v2->m_kRegistCardInfos._Myfirst;
    v5 = 0;
    uiSize = v2->m_kRegistCardInfos._Mylast - v2->m_kRegistCardInfos._Myfirst;
    i = 0;
    while ( 1 )
    {
      v6 = v2->m_kCardSlots._Myfirst[v5];
      if ( !v6 )
        goto LABEL_12;
      v7 = v5 + 4 * uiPage;
      if ( v7 >= v4 )
      {
        v10 = 0;
      }
      else
      {
        v8 = CollectCardChoiceWin::GetRegistCardInfoByGrade(v2, uiGrade, v7);
        v9 = v6->vfptr[64].__vecDelDtor;
        if ( !v8 )
        {
          v9((NiRefObject *)&v6->vfptr, 0);
          goto LABEL_12;
        }
        v9((NiRefObject *)&v6->vfptr, 1u);
        CardSlotWin::SetInfo(v6, v8->m_uiCardID, v8->m_uiStar, v8->m_uiSerial, v8->m_tRegistTime);
        if ( !v6->m_pkBlindSpr )
          goto LABEL_12;
        v6 = (CardSlotWin *)v6->m_pkBlindSpr;
        v10 = 1;
      }
      v6->vfptr[64].__vecDelDtor((NiRefObject *)v6, v10);
LABEL_12:
      v5 = i + 1;
      i = v5;
      if ( v5 >= 4 )
        return;
      v4 = uiSize;
    }
  }
}

//----- (004EBF90) --------------------------------------------------------
void __thiscall CollectRwChoiceWin::Update(CollectRwChoiceWin *this)
{
  CollectRwChoiceWin *v1; // esi@1
  unsigned int v2; // edi@1
  int v3; // eax@4
  unsigned int v4; // esi@5
  char *v5; // eax@8
  char *v6; // ebx@8
  ItemInfo *v7; // eax@14
  Item *v8; // eax@15
  CollectRwChoiceInv *v9; // edi@16
  unsigned int v10; // esi@17
  char *v11; // eax@17
  unsigned int uiItemCount; // [sp+8h] [bp-20h]@1
  unsigned int v13; // [sp+10h] [bp-18h]@4
  unsigned int uiInterval; // [sp+14h] [bp-14h]@1
  int v15; // [sp+18h] [bp-10h]@2
  CollectRwChoiceWin *v16; // [sp+1Ch] [bp-Ch]@1
  int v17; // [sp+20h] [bp-8h]@4
  unsigned int i; // [sp+24h] [bp-4h]@1

  v1 = this;
  v16 = this;
  CollectRwChoiceWin::ResetItem(this);
  uiInterval = v1->m_uiItemInterval + (*(int (**)(void))(**(_DWORD **)v1->m_kRewardItems._Myfirst + 144))();
  v2 = 0;
  uiItemCount = CollectCardRewardTab::GetCountByRewardID(v1->m_uiRewardID);
  i = 0;
  if ( uiItemCount )
  {
    v15 = 0;
    while ( 1 )
    {
      v3 = *(_DWORD *)(ITableBase<CollectCardReward,CollectCardRewardTab>::ms_pkTable + 56);
      v13 = v1->m_uiRewardID;
      v17 = 0;
      if ( v3 )
        v4 = *(_DWORD *)(v3 + 40);
      else
        v4 = 0;
      if ( v4 > 0 )
      {
        do
        {
          v5 = CDataReader::GetRecord(
                 (CDataReader *)(ITableBase<CollectCardReward,CollectCardRewardTab>::ms_pkTable + 4),
                 v2);
          v6 = v5;
          if ( v5 && *(_WORD *)v5 == (_WORD)v13 )
          {
            if ( v17 == i )
            {
              v7 = ItemInfoTab::GetByInxName(v5 + 8);
              if ( v7 )
              {
                v8 = Item::Create(v7->ID);
                if ( v8 )
                {
                  v9 = v16->m_kRewardItems._Myfirst[i];
                  if ( v9 )
                  {
                    v10 = v15 + v16->m_iItemFirstPos + (uiInterval * (5 - uiItemCount) >> 1);
                    ItemIcon::SetItem((ItemIcon *)&v9->vfptr, v8, 1);
                    v11 = fs("%d", *((_WORD *)v6 + 36));
                    ((void (__stdcall *)(char *))v9->m_pkLotText->vfptr[118].__vecDelDtor)(v11);
                    ((void (__stdcall *)(signed int))v9->m_pkLotText->vfptr[64].__vecDelDtor)(1);
                    v9->vfptr[43].__vecDelDtor((NiRefObject *)v9, v10);
                    IconWin::ShowFocus((IconWin *)&v9->vfptr, 1);
                    v9->vfptr[64].__vecDelDtor((NiRefObject *)v9, 1u);
                  }
                }
              }
              break;
            }
            ++v17;
          }
          ++v2;
        }
        while ( v2 < v4 );
      }
      v15 += uiInterval;
      if ( ++i >= uiItemCount )
        break;
      v1 = v16;
      v2 = 0;
    }
  }
}
// A8C21C: using guessed type int ITableBase<CollectCardReward,CollectCardRewardTab>::ms_pkTable;

//----- (004EC130) --------------------------------------------------------
void __thiscall CollectCardChoiceWin::CollectCardChoiceWin(CollectCardChoiceWin *this)
{
  CollectCardChoiceWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&CollectCardChoiceWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CollectCardChoiceWin::`vftable'{for `IDirectMessenger'};
  v1->m_kCardSlots._Myfirst = 0;
  v1->m_kCardSlots._Mylast = 0;
  v1->m_kCardSlots._Myend = 0;
  v1->m_kRegistCardInfos._Myfirst = 0;
  v1->m_kRegistCardInfos._Mylast = 0;
  v1->m_kRegistCardInfos._Myend = 0;
  v1->m_bSelect = 0;
  v1->m_uiSelectSlot = 0;
  v1->m_uiBookmarkSlot = 0;
  std::vector<PgWinText *,std::allocator<PgWinText *>>::resize(
    (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v1->m_kCardSlots,
    4u);
  *v1->m_kCardSlots._Myfirst = 0;
  *((_DWORD *)v1->m_kCardSlots._Myfirst + 1) = 0;
  *((_DWORD *)v1->m_kCardSlots._Myfirst + 2) = 0;
  *((_DWORD *)v1->m_kCardSlots._Myfirst + 3) = 0;
}
// 987E08: using guessed type void (__thiscall *CollectCardChoiceWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 987E24: using guessed type int (__thiscall *CollectCardChoiceWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004EC200) --------------------------------------------------------
void __thiscall CollectCardChoiceWin::~CollectCardChoiceWin(CollectCardChoiceWin *this)
{
  CollectCardChoiceWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&CollectCardChoiceWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CollectCardChoiceWin::`vftable'{for `IDirectMessenger'};
  if ( this->m_kRegistCardInfos._Myfirst )
    operator delete(this->m_kRegistCardInfos._Myfirst);
  v1->m_kRegistCardInfos._Myfirst = 0;
  v1->m_kRegistCardInfos._Mylast = 0;
  v1->m_kRegistCardInfos._Myend = 0;
  if ( v1->m_kCardSlots._Myfirst )
    operator delete(v1->m_kCardSlots._Myfirst);
  v1->m_kCardSlots._Myfirst = 0;
  v1->m_kCardSlots._Mylast = 0;
  v1->m_kCardSlots._Myend = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 987E08: using guessed type void (__thiscall *CollectCardChoiceWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 987E24: using guessed type int (__thiscall *CollectCardChoiceWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004EC270) --------------------------------------------------------
CollectCardChoiceWin *__cdecl CollectCardChoiceWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  CollectCardChoiceWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x188u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    CollectCardChoiceWin::CollectCardChoiceWin((CollectCardChoiceWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (CollectCardChoiceWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (004EC3A0) --------------------------------------------------------
void __thiscall CollectCardChoiceWin::OnSelectGrade(CollectCardChoiceWin *this, unsigned int uiGrade)
{
  CollectCardChoiceWin *v2; // esi@1
  CollectCardChoiceWin::sRegistCardInfo *v3; // edi@2
  int v4; // ebx@2
  int i; // eax@2
  unsigned int v6; // eax@7

  v2 = this;
  if ( this->m_pkPageWin )
  {
    v3 = this->m_kRegistCardInfos._Myfirst;
    v4 = 0;
    for ( i = this->m_kRegistCardInfos._Mylast - v3; i; --i )
    {
      if ( v3->m_uiGrade == uiGrade )
        ++v4;
      ++v3;
    }
    this->m_pkPageWin->m_uiPage = 0;
    if ( v4 )
      v6 = (unsigned int)(v4 - 1) >> 2;
    else
      v6 = 0;
    this->m_pkPageWin->m_uiLastPage = v6;
    this->m_pkPageWin->m_uiUpdateMsgParam = uiGrade;
    CollectPageWin::Update(this->m_pkPageWin);
  }
  CollectCardChoiceWin::UpdateGrade(v2, uiGrade);
}

//----- (004EC440) --------------------------------------------------------
void __thiscall CollectCardChoiceWin::ClearInfo(CollectCardChoiceWin *this)
{
  CollectCardChoiceWin *v1; // esi@1
  CollectCardChoiceWin::sRegistCardInfo *v2; // eax@1
  CollectCardChoiceWin::sRegistCardInfo *v3; // ecx@1

  v1 = this;
  v2 = this->m_kRegistCardInfos._Mylast;
  v3 = this->m_kRegistCardInfos._Myfirst;
  if ( v3 != v2 )
    v1->m_kRegistCardInfos._Mylast = std::_Move<CollectWin::sCardInfo *,CollectWin::sCardInfo *>(v2, v2, v3);
}

//----- (004EC470) --------------------------------------------------------
void __thiscall CollectRwChoiceWin::SetReward(CollectRwChoiceWin *this, unsigned int uiRewardID, int bEnable)
{
  CollectRwChoiceWin *v3; // esi@1
  PgWinBut *v4; // ecx@1

  v3 = this;
  v4 = this->m_pkOKBtn;
  v3->m_uiRewardID = uiRewardID;
  if ( v4 )
    ((void (__stdcall *)(_DWORD))v4->vfptr[60].__vecDelDtor)(bEnable);
  CollectRwChoiceWin::Update(v3);
}

//----- (004EC4B0) --------------------------------------------------------
void __thiscall CollectCardChoiceWin::OnShowWin(CollectCardChoiceWin *this)
{
  CollectCardChoiceWin::OnSelectGrade(this, 0);
}

//----- (004EC4C0) --------------------------------------------------------
void __thiscall CollectCardChoiceWin::OnCommand(CollectCardChoiceWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0u:
      CollectCardChoiceWin::OnOK(this);
      break;
    case 1u:
      this->m_bSelect = 0;
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
      break;
    case 2u:
      CollectCardChoiceWin::OnSelectGrade(this, lParam);
      break;
    case 3u:
      CollectCardChoiceWin::OnSelectSlot(this, lParam);
      break;
    case 4u:
      CollectCardChoiceWin::UpdateGrade(this, lParam);
      break;
    default:
      return;
  }
}

//----- (004EC530) --------------------------------------------------------
void __thiscall CollectCardChoiceWin::InsertInfo(CollectCardChoiceWin *this, unsigned int uiGrade, unsigned int uiCardID, unsigned int uiStar, unsigned int uiSerial, int tRegistTime)
{
  CollectCardChoiceWin::sRegistCardInfo kInfo; // [sp+0h] [bp-18h]@1

  kInfo.m_uiCardID = uiCardID;
  kInfo.m_uiGrade = uiGrade;
  kInfo.m_uiSerial = uiSerial;
  kInfo.m_uiStar = uiStar;
  kInfo.m_tRegistTime = tRegistTime;
  std::vector<CollectCardChoiceWin::sRegistCardInfo,std::allocator<CollectCardChoiceWin::sRegistCardInfo>>::push_back(
    &this->m_kRegistCardInfos,
    &kInfo);
}

//----- (004EC580) --------------------------------------------------------
CollectRwItemWin *__thiscall CollectRwItemWin::`vector deleting destructor'(CollectRwItemWin *this, unsigned int a2)
{
  CollectRwItemWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&CollectRwItemWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CollectRwItemWin::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 987050: using guessed type void (__thiscall *CollectRwItemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98706C: using guessed type int (__thiscall *CollectRwItemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004EC5C0) --------------------------------------------------------
CollectRwChoiceInv *__thiscall CollectRwChoiceInv::`scalar deleting destructor'(CollectRwChoiceInv *this, unsigned int a2)
{
  CollectRwChoiceInv *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&CollectRwChoiceInv::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CollectRwChoiceInv::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9872A4: using guessed type void (__thiscall *CollectRwChoiceInv::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9872C4: using guessed type int (__thiscall *CollectRwChoiceInv::`vftable'{for `NiNode'})(void *p, char);

//----- (004EC600) --------------------------------------------------------
CollectPopupWin *__thiscall CollectPopupWin::`scalar deleting destructor'(CollectPopupWin *this, unsigned int a2)
{
  CollectPopupWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&CollectPopupWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CollectPopupWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 987530: using guessed type void (__thiscall *CollectPopupWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98754C: using guessed type int (__thiscall *CollectPopupWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004EC640) --------------------------------------------------------
int __cdecl CollectCardRewardTab::GetCountByRewardID(unsigned int uiRewardID)
{
  int v1; // eax@1
  int v2; // ebx@1
  unsigned int v3; // edi@2
  unsigned int v4; // esi@4
  char *v5; // eax@5

  v1 = *(_DWORD *)(ITableBase<CollectCardReward,CollectCardRewardTab>::ms_pkTable + 56);
  v2 = 0;
  if ( v1 )
    v3 = *(_DWORD *)(v1 + 40);
  else
    v3 = 0;
  v4 = 0;
  if ( v3 )
  {
    do
    {
      v5 = CDataReader::GetRecord(
             (CDataReader *)(ITableBase<CollectCardReward,CollectCardRewardTab>::ms_pkTable + 4),
             v4);
      if ( v5 && *(_WORD *)v5 == uiRewardID )
        ++v2;
      ++v4;
    }
    while ( v4 < v3 );
  }
  return v2;
}
// A8C21C: using guessed type int ITableBase<CollectCardReward,CollectCardRewardTab>::ms_pkTable;

//----- (004EC690) --------------------------------------------------------
CollectCardChoiceWin::sRegistCardInfo *__cdecl std::_Move<CollectWin::sCardInfo *,CollectWin::sCardInfo *>(CollectCardChoiceWin::sRegistCardInfo *_First, CollectCardChoiceWin::sRegistCardInfo *_Last, CollectCardChoiceWin::sRegistCardInfo *_Dest)
{
  CollectCardChoiceWin::sRegistCardInfo *v3; // ecx@1
  CollectCardChoiceWin::sRegistCardInfo *result; // eax@1

  v3 = _First;
  for ( result = _Dest; v3 != _Last; ++result )
  {
    result->m_uiGrade = v3->m_uiGrade;
    result->m_uiCardID = v3->m_uiCardID;
    result->m_uiStar = v3->m_uiStar;
    result->m_uiSerial = v3->m_uiSerial;
    result->m_tRegistTime = v3->m_tRegistTime;
    ++v3;
  }
  return result;
}

//----- (004EC6D0) --------------------------------------------------------
CardSlotWin *__thiscall CardSlotWin::`vector deleting destructor'(CardSlotWin *this, unsigned int a2)
{
  CardSlotWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&CardSlotWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CardSlotWin::`vftable'{for `IDirectMessenger'};
  if ( this->m_kBorderSprs._Myfirst )
    operator delete(this->m_kBorderSprs._Myfirst);
  v2->m_kBorderSprs._Myfirst = 0;
  v2->m_kBorderSprs._Mylast = 0;
  v2->m_kBorderSprs._Myend = 0;
  PgWinLRBut::~PgWinLRBut((PgWinLRBut *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 987770: using guessed type void (__thiscall *CardSlotWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98778C: using guessed type int (__thiscall *CardSlotWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004EC740) --------------------------------------------------------
CollectPageWin *__thiscall CollectPageWin::`scalar deleting destructor'(CollectPageWin *this, unsigned int a2)
{
  CollectPageWin *v2; // esi@1

  v2 = this;
  CollectPageWin::~CollectPageWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (004EC770) --------------------------------------------------------
CollectRwChoiceWin *__thiscall CollectRwChoiceWin::`vector deleting destructor'(CollectRwChoiceWin *this, unsigned int a2)
{
  CollectRwChoiceWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&CollectRwChoiceWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CollectRwChoiceWin::`vftable'{for `IDirectMessenger'};
  if ( this->m_kRewardItems._Myfirst )
    operator delete(this->m_kRewardItems._Myfirst);
  v2->m_kRewardItems._Myfirst = 0;
  v2->m_kRewardItems._Mylast = 0;
  v2->m_kRewardItems._Myend = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 987BC8: using guessed type void (__thiscall *CollectRwChoiceWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 987BE4: using guessed type int (__thiscall *CollectRwChoiceWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004EC7E0) --------------------------------------------------------
CollectCardChoiceWin *__thiscall CollectCardChoiceWin::`scalar deleting destructor'(CollectCardChoiceWin *this, unsigned int a2)
{
  CollectCardChoiceWin *v2; // esi@1

  v2 = this;
  CollectCardChoiceWin::~CollectCardChoiceWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (004EC810) --------------------------------------------------------
bool __cdecl CollectWin::sNewestInfo::SortRegistTime(CollectWin::sNewestInfo *lhw, CollectWin::sNewestInfo *rhw)
{
  return lhw->m_tRegistTime > rhw->m_tRegistTime;
}

//----- (004EC830) --------------------------------------------------------
void __thiscall CollectCardListWin::OnPopupCardMenu(CollectCardListWin *this, unsigned int uiSlot)
{
  CollectCardListWin *v2; // esi@1
  PopupMenuWin *v3; // ecx@2

  v2 = this;
  if ( this->m_eCardListType != 1 )
  {
    v3 = this->m_pkPopupCardMenu;
    if ( v3 )
    {
      v2->m_uiSelectBookmarkSlot = uiSlot;
      ((void (__stdcall *)(_DWORD, _DWORD))v3->vfptr[77].__vecDelDtor)(PgWin::ms_iMsX, PgWin::ms_iMsY);
      ((void (__stdcall *)(_DWORD))v2->m_pkPopupCardMenu->vfptr[60].__vecDelDtor)(1);
      PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v2->m_pkPopupCardMenu->vfptr);
    }
  }
}

//----- (004EC8A0) --------------------------------------------------------
void __thiscall CollectCardListWin::OnRemoveBookmark(CollectCardListWin *this)
{
  CollectCardListWin *v1; // edi@1
  GameFrameWork *v2; // eax@1
  CollectPageWin *v3; // edx@2
  unsigned int v4; // esi@2

  v1 = this;
  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    v3 = v1->m_pkPageWin;
    v4 = 0;
    if ( v3 )
      v4 = v1->m_uiSelectBookmarkSlot + 12 * v3->m_uiPage;
    GameFrameWork::NcCollectBookmarkRegistReq(v2, v4, 0);
  }
}

//----- (004EC8F0) --------------------------------------------------------
void __thiscall CollectCardListWin::SetPage(CollectCardListWin *this, unsigned int uiPage, unsigned int uiLastPage, unsigned int uiUpdateMsg, unsigned int uiUpdateMsgParam)
{
  if ( this->m_pkPageWin )
  {
    this->m_pkPageWin->m_uiPage = uiPage;
    this->m_pkPageWin->m_uiLastPage = uiLastPage;
    this->m_pkPageWin->m_uiUpdateMsg = uiUpdateMsg;
    this->m_pkPageWin->m_uiUpdateMsgParam = uiUpdateMsgParam;
    CollectPageWin::Update(this->m_pkPageWin);
  }
}

//----- (004EC950) --------------------------------------------------------
void __thiscall CollectCardListWin::SetPage(CollectCardListWin *this, unsigned int uiPage)
{
  if ( this->m_pkPageWin )
  {
    this->m_pkPageWin->m_uiPage = uiPage;
    CollectPageWin::Update(this->m_pkPageWin);
  }
}

//----- (004EC980) --------------------------------------------------------
unsigned int __thiscall CollectCardListWin::GetPage(CollectCardListWin *this)
{
  CollectPageWin *v1; // eax@1
  unsigned int result; // eax@2

  v1 = this->m_pkPageWin;
  if ( v1 )
    result = v1->m_uiPage;
  else
    result = 0;
  return result;
}

//----- (004EC9A0) --------------------------------------------------------
void CollectWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "Collect_Main");
}

//----- (004EC9D0) --------------------------------------------------------
signed int __stdcall CollectWin::ConvertRewardGrade(unsigned int uiGrade)
{
  signed int result; // eax@1

  result = 0;
  switch ( uiGrade )
  {
    case 0u:
      result = 1;
      break;
    case 1u:
      result = 2;
      break;
    case 2u:
      result = 3;
      break;
    case 3u:
      result = 4;
      break;
    default:
      return result;
  }
  return result;
}

//----- (004ECA20) --------------------------------------------------------
void __userpurge CollectMainWin::OnSelectCard(CollectMainWin *this@<ecx>, double a2@<st0>, unsigned int uiSlot)
{
  CardSlotWin *v3; // eax@1
  unsigned int v4; // esi@1
  unsigned int v5; // edi@1
  unsigned int v6; // ebx@1
  GameFrameWork *v7; // eax@3

  v3 = this->m_kCardSlots._Myfirst[uiSlot];
  v4 = 0;
  v5 = 0;
  v6 = 0;
  if ( v3 )
  {
    v4 = v3->m_uiCardID;
    v5 = v3->m_uiStar;
    v6 = v3->m_uiSerial;
  }
  v7 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v7 )
    GameFrameWork::OpenCollectCardWin(v7, a2, 1, v4, v5, v6, 0);
}

//----- (004ECA80) --------------------------------------------------------
void __thiscall CollectMainWin::ResetCard(CollectMainWin *this)
{
  CollectMainWin *v1; // edi@1
  unsigned int v2; // esi@1
  CardSlotWin *v3; // ecx@2

  v1 = this;
  v2 = 0;
  do
  {
    v3 = v1->m_kCardSlots._Myfirst[v2];
    if ( v3 )
      CardSlotWin::Reset(v3);
    ++v2;
  }
  while ( v2 < 4 );
}

//----- (004ECAB0) --------------------------------------------------------
void __thiscall CollectMainWin::SetNewest(CollectMainWin *this, unsigned int uiSlot, unsigned int uiCardID, unsigned int uiStar, unsigned int uiSerial, int tRegistTime)
{
  CardSlotWin *v6; // esi@1

  v6 = this->m_kCardSlots._Myfirst[uiSlot];
  if ( v6 )
  {
    v6->vfptr[64].__vecDelDtor((NiRefObject *)v6, uiCardID != 0);
    CardSlotWin::SetInfo(v6, uiCardID, uiStar, uiSerial, tRegistTime);
  }
}

//----- (004ECB00) --------------------------------------------------------
void __thiscall CollectCardListWin::SetCard(CollectCardListWin *this, unsigned int uiSlot, unsigned int uiCardID, unsigned int uiStar, unsigned int uiSerial, int tRegistTime)
{
  CollectCardListWin *v6; // edi@1
  CardSlotWin *v7; // esi@1
  PgWinBut *v8; // ecx@3
  int v9; // eax@4

  v6 = this;
  v7 = this->m_kCardSlots._Myfirst[uiSlot];
  if ( v7 )
  {
    v7->vfptr[64].__vecDelDtor((NiRefObject *)v7, uiCardID != 0);
    CardSlotWin::SetInfo(v7, uiCardID, uiStar, uiSerial, tRegistTime);
  }
  v8 = v6->m_kBookmarkBtns._Myfirst[uiSlot];
  if ( v8 )
  {
    v9 = 0;
    if ( v6->m_eCardListType == CLT_BOOKMARK )
      LOBYTE(v9) = uiCardID == 0;
    ((void (__stdcall *)(int))v8->vfptr[64].__vecDelDtor)(v9);
  }
}

//----- (004ECB80) --------------------------------------------------------
void __thiscall CollectCardListWin::ResetReward(CollectCardListWin *this)
{
  CollectCardListWin *v1; // edi@1
  unsigned int v2; // esi@3
  PgWinText *v3; // ecx@4

  v1 = this;
  if ( this->m_pkRewardItem )
    ((void (__stdcall *)(_DWORD))this->m_pkRewardItem->vfptr[64].__vecDelDtor)(0);
  v2 = 0;
  do
  {
    v3 = v1->m_kRewardTexts._Myfirst[v2];
    if ( v3 )
      ((void (__stdcall *)(_DWORD))v3->vfptr[64].__vecDelDtor)(0);
    ++v2;
  }
  while ( v2 < 4 );
}

//----- (004ECBD0) --------------------------------------------------------
void __thiscall CollectCardListWin::ResetCard(CollectCardListWin *this)
{
  CollectCardListWin *v1; // edi@1
  unsigned int v2; // esi@1
  PgWinBut *v3; // ecx@2
  unsigned int v4; // esi@5
  CardSlotWin *v5; // ecx@6

  v1 = this;
  v2 = 0;
  do
  {
    v3 = v1->m_kBookmarkBtns._Myfirst[v2];
    if ( v3 )
      ((void (__stdcall *)(_DWORD))v3->vfptr[64].__vecDelDtor)(0);
    ++v2;
  }
  while ( v2 < 12 );
  v4 = 0;
  do
  {
    v5 = v1->m_kCardSlots._Myfirst[v4];
    if ( v5 )
      ((void (__stdcall *)(_DWORD))v5->vfptr[64].__vecDelDtor)(0);
    ++v4;
  }
  while ( v4 < 12 );
}

//----- (004ECC30) --------------------------------------------------------
void __thiscall CollectWin::SetBookmark(CollectWin *this, unsigned int uiSlot, unsigned int uiCardID)
{
  if ( (((char *)this->m_kBookmarkInfos._Mylast - (char *)this->m_kBookmarkInfos._Myfirst) & 0xFFFFFFFC) == 240 )
    this->m_kBookmarkInfos._Myfirst[uiSlot] = uiCardID;
}

//----- (004ECC60) --------------------------------------------------------
void __thiscall CollectWin::SetReward(CollectWin *this, unsigned int uiRewardID, bool bCompleted)
{
  unsigned int v3; // edx@1
  unsigned int v4; // eax@1
  CollectWin::sRewardInfo *v5; // esi@2
  unsigned int *v6; // ecx@2

  v3 = 0;
  v4 = this->m_kRewardInfos._Mylast - this->m_kRewardInfos._Myfirst;
  if ( v4 )
  {
    v5 = this->m_kRewardInfos._Myfirst;
    v6 = &v5->m_uiRewardID;
    while ( *v6 != uiRewardID )
    {
      ++v3;
      v6 += 4;
      if ( v3 >= v4 )
        return;
    }
    v5[v3].m_bCompleted = bCompleted;
  }
}

//----- (004ECCB0) --------------------------------------------------------
void __thiscall CollectWin::SetCard(CollectWin *this, unsigned int uiCardID, unsigned int uiStar, unsigned int uiSerial, int tRegistTime)
{
  unsigned int v5; // eax@1
  char *v6; // edx@2
  unsigned int v7; // eax@6

  v5 = 0;
  if ( this->m_kCardInfos._Mylast - this->m_kCardInfos._Myfirst )
  {
    v6 = (char *)&this->m_kCardInfos._Myfirst->m_uiCardID;
    while ( *(_DWORD *)v6 != uiCardID )
    {
      ++v5;
      v6 += 20;
      if ( v5 >= this->m_kCardInfos._Mylast - this->m_kCardInfos._Myfirst )
        return;
    }
    v7 = v5;
    this->m_kCardInfos._Myfirst[v7].m_uiStar = uiStar;
    this->m_kCardInfos._Myfirst[v7].m_uiSerial = uiSerial;
    this->m_kCardInfos._Myfirst[v7].m_tRegistTime = tRegistTime;
  }
}

//----- (004ECD30) --------------------------------------------------------
CollectWin::sRewardInfo *__thiscall CollectWin::GetRewardInfoByGrade(CollectWin *this, unsigned int uiRewardGrade)
{
  unsigned int v2; // edx@1
  unsigned int v3; // eax@1
  CollectWin::sRewardInfo *v4; // esi@2
  CollectWin::sRewardInfo *v5; // ecx@2
  CollectWin::sRewardInfo *result; // eax@6

  v2 = this->m_kRewardInfos._Mylast - this->m_kRewardInfos._Myfirst;
  v3 = 0;
  if ( v2 )
  {
    v4 = this->m_kRewardInfos._Myfirst;
    v5 = this->m_kRewardInfos._Myfirst;
    while ( v5->m_uiRewardGrade != uiRewardGrade || v5->m_bCompleted )
    {
      ++v3;
      ++v5;
      if ( v3 >= v2 )
        goto LABEL_6;
    }
    result = &v4[v3];
  }
  else
  {
LABEL_6:
    result = 0;
  }
  return result;
}

//----- (004ECD80) --------------------------------------------------------
CollectWin::sCardInfo *__thiscall CollectWin::GetCardInfoByCardID(CollectWin *this, unsigned int uiCardID)
{
  unsigned int v2; // eax@1
  unsigned int v3; // edx@1
  CollectWin::sCardInfo *v4; // ecx@2
  unsigned int *v5; // esi@2
  CollectWin::sCardInfo *result; // eax@5

  v2 = this->m_kCardInfos._Mylast - this->m_kCardInfos._Myfirst;
  v3 = 0;
  if ( v2 )
  {
    v4 = this->m_kCardInfos._Myfirst;
    v5 = &v4->m_uiCardID;
    while ( *v5 != uiCardID )
    {
      ++v3;
      v5 += 5;
      if ( v3 >= v2 )
        goto LABEL_5;
    }
    result = &v4[v3];
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (004ECDE0) --------------------------------------------------------
int __thiscall CollectWin::GetRegistCountByGrade(CollectWin *this, unsigned int uiGrade)
{
  int v2; // esi@1
  signed int v3; // eax@1
  CollectWin::sCardInfo *v4; // ecx@2

  v2 = 0;
  v3 = this->m_kCardInfos._Mylast - this->m_kCardInfos._Myfirst;
  if ( v3 )
  {
    v4 = this->m_kCardInfos._Myfirst;
    do
    {
      if ( v4->m_uiGrade == uiGrade && v4->m_tRegistTime > 0 )
        ++v2;
      ++v4;
      --v3;
    }
    while ( v3 );
  }
  return v2;
}

//----- (004ECE30) --------------------------------------------------------
void __thiscall CollectMainWin::OnCheckRewardGrade(CollectMainWin *this, unsigned int uiRewardGrade)
{
  PgWin *v2; // eax@2

  if ( uiRewardGrade < 5 )
  {
    v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
    PgWin::PostMsg(v2, 5u, 2u, uiRewardGrade);
  }
}

//----- (004ECE60) --------------------------------------------------------
void __thiscall CollectMainWin::OnSelectRewardItem(CollectMainWin *this)
{
  CollectMainWin *v1; // esi@1
  PgWin *v2; // ebx@1
  unsigned int v3; // edi@2
  CollectRwItemWin *v4; // ecx@3
  CollectRwChoiceWin *v5; // esi@4
  int bEnable; // [sp+8h] [bp-4h]@0

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
  {
    v3 = 0;
    LOBYTE(bEnable) = 0;
    if ( v1->m_pkRewardItem )
    {
      v4 = v1->m_pkRewardItem;
      v3 = v4->m_uiRewardID;
      LOBYTE(bEnable) = CollectRwItemWin::GetState(v4) == 1;
    }
    v5 = (CollectRwChoiceWin *)LODWORD(v2[1].m_kWorld.m_Rotate.m_pEntry[1][2]);
    if ( v5 )
    {
      CollectRwChoiceWin::SetReward(v5, v3, bEnable);
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v5->vfptr);
      PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)&v5->vfptr);
    }
  }
}

//----- (004ECED0) --------------------------------------------------------
void __thiscall CollectMainWin::OnSelectRewardArrow(CollectMainWin *this, CollectMainWin::eRewardArrowType eType)
{
  CollectMainWin *v2; // esi@1
  unsigned int v3; // eax@3
  unsigned int v4; // ecx@3
  unsigned int v5; // eax@6
  unsigned int v6; // eax@7
  int v7; // ST0C_4@10
  PgWin *v8; // eax@10

  v2 = this;
  if ( eType )
  {
    if ( eType == 1 )
    {
      v3 = this->m_uiRewardPage;
      v4 = this->m_uiLastRewardPage;
      if ( v3 < v4 )
        v4 = v3 + 1;
      v2->m_uiRewardPage = v4;
    }
  }
  else
  {
    v5 = this->m_uiRewardPage;
    if ( v5 )
      v6 = v5 - 1;
    else
      v6 = 0;
    this->m_uiRewardPage = v6;
  }
  v7 = v2->m_uiRewardGrade;
  v8 = PgWin::GetParentWin((PgWin *)&v2->vfptr);
  PgWin::PostMsg(v8, 5u, 2u, v7);
}

//----- (004ECF30) --------------------------------------------------------
void __thiscall CollectMainWin::Reset(CollectMainWin *this)
{
  CollectMainWin *v1; // edi@1
  unsigned int v2; // esi@1
  CardSlotWin *v3; // ecx@2

  v1 = this;
  v2 = 0;
  do
  {
    v3 = v1->m_kCardSlots._Myfirst[v2];
    if ( v3 )
      CardSlotWin::Reset(v3);
    ++v2;
  }
  while ( v2 < 4 );
}

//----- (004ECF60) --------------------------------------------------------
void __thiscall CollectMainWin::SetReward(CollectMainWin *this, unsigned int uiRewardID, unsigned int uiCount, unsigned int uiPrevCount, unsigned int uiRegistCount, bool bCompleted)
{
  CollectMainWin *v6; // esi@1
  CollectRwItemWin *v7; // ecx@1
  char *v8; // eax@5
  char *v9; // eax@8

  v6 = this;
  v7 = this->m_pkRewardItem;
  if ( v7 )
  {
    if ( uiRewardID )
    {
      if ( bCompleted )
      {
        CollectRwItemWin::SetState(v7, RST_COMPLETE);
        v8 = (char *)TextData2::Get(0x14398459u);
      }
      else
      {
        CollectRwItemWin::SetState(v7, (CollectRwItemWin::eRewardStateType)(uiRegistCount >= uiCount));
        if ( uiRegistCount >= uiCount )
        {
          v8 = (char *)TextData2::Get(0x80AA90B8);
        }
        else
        {
          v9 = (char *)TextData2::Get(0x1FAC8854u);
          v8 = fs(v9, uiRegistCount, uiCount);
        }
      }
      PgWin::SetToolTipWinText((PgWin *)&v6->m_pkRewardItem->vfptr, v8);
      ((void (__stdcall *)(_DWORD))v6->m_pkRewardItem->vfptr[64].__vecDelDtor)(1);
      v6->m_pkRewardItem->m_uiRewardID = uiRewardID;
      v6->m_fRewardMaxVal = (double)uiCount;
      v6->m_fPrevRewardMaxVal = (double)uiPrevCount;
    }
    else
    {
      ((void (__stdcall *)(_DWORD))v7->vfptr[64].__vecDelDtor)(0);
    }
  }
}

//----- (004ED050) --------------------------------------------------------
void __thiscall CollectMainWin::SetRewardGrade(CollectMainWin *this, unsigned int uiRewardGrade)
{
  CollectMainWin *v2; // esi@1
  unsigned int v3; // eax@3

  v2 = this;
  if ( this->m_uiRewardGrade != uiRewardGrade )
    this->m_uiRewardPage = 0;
  v3 = CollectCardRewardTab::GetCountByRewardGrade(uiRewardGrade);
  v2->m_uiRewardGrade = uiRewardGrade;
  v2->m_uiLastRewardPage = v3 - 1;
}

//----- (004ED090) --------------------------------------------------------
char __thiscall CollectCardListWin::Create(CollectCardListWin *this, NiNode *pkNode, PgWin *pkParent, bool bPeeping)
{
  CollectCardListWin *v4; // esi@1
  NiNode *v5; // edi@1
  PgSprData *v6; // eax@4
  NiNode *v8; // ebx@8
  PgSprData *v9; // eax@8
  PgSprData *v10; // eax@8
  unsigned int v11; // ST58_4@9
  const char *v12; // eax@9
  PgSprData *v13; // eax@9
  CardSlotWin **v14; // ST5C_4@9
  PgSprData *v15; // eax@12
  PgWinSpr *v16; // eax@12
  PgSprData::PgHitTester *v17; // eax@12
  int v18; // ST58_4@12
  int v19; // ST5C_4@12
  PgFont *v20; // eax@12
  _DWORD *v21; // ST58_4@12
  void (__thiscall **v22)(_DWORD, _DWORD); // ST5C_4@12
  NiUnsharedGeometryGroup *v23; // eax@12
  PgSprData::PgHitTester *v24; // eax@12
  int v25; // ST58_4@12
  int v26; // ST5C_4@12
  PgFont *v27; // eax@12
  PgSprData::PgHitTester *v28; // eax@13
  unsigned int v29; // ecx@13
  int v30; // edx@13
  PgWinText **v31; // eax@13
  int v32; // ST58_4@13
  PgWinText **v33; // ST5C_4@13
  PgFont *v34; // eax@13
  void (__thiscall **v35)(_DWORD, _DWORD); // ST58_4@13
  NiUnsharedGeometryGroup *v36; // eax@13
  PgSprData::PgHitTester *v37; // eax@13
  unsigned int v38; // ecx@13
  int v39; // edx@13
  PgWinText **v40; // eax@13
  int v41; // ST58_4@13
  _DWORD *v42; // ST5C_4@13
  PgFont *v43; // eax@13
  CollectRwItemWin *v44; // eax@13
  const char *v45; // eax@14
  PgWinBut **v46; // eax@15
  PgWinBut **v47; // ST58_4@15
  unsigned int v48; // ecx@15
  char *v49; // eax@15
  NiSourceTexture *v50; // eax@16
  PopupMenuWin *v51; // eax@16
  char *v52; // eax@16
  PopupMenuText *v53; // ebx@16
  char *v54; // eax@16
  PopupMenuText *v55; // ebx@16
  NiNode *iXPos; // [sp+14h] [bp-28h]@11
  int iYPos; // [sp+18h] [bp-24h]@11
  unsigned int iYPosa; // [sp+18h] [bp-24h]@14
  unsigned int uiHeight; // [sp+1Ch] [bp-20h]@4
  PgSprData *pkSprData; // [sp+20h] [bp-1Ch]@9
  unsigned int uiWidth; // [sp+24h] [bp-18h]@4
  unsigned int i; // [sp+28h] [bp-14h]@8
  int iTop; // [sp+2Ch] [bp-10h]@4
  int v64; // [sp+38h] [bp-4h]@3

  v4 = this;
  v5 = pkNode;
  if ( pkNode )
    InterlockedIncrement((volatile LONG *)&pkNode->m_uiRefCount);
  v64 = 0;
  if ( !v5 )
    return 0;
  uiWidth = 0;
  uiHeight = 0;
  pkNode = 0;
  iTop = 0;
  v6 = PgSprData::Create((NiAVObject *)&v5->vfptr, "Panel04", (int *)&pkNode, &iTop, 0);
  if ( !PgWinSpr::Create((PgWinSpr *)&v4->vfptr, (int)pkNode, iTop, v6, pkParent, 0, 0) )
    goto LABEL_5;
  v8 = pkNode;
  pkParent = (PgWin *)iTop;
  v9 = PgSprData::Create((NiAVObject *)&v5->vfptr, "Panel05", (int *)&pkNode, &iTop, 0);
  PgWinSpr::CreateWin((char *)pkNode - (char *)v8, iTop - (_DWORD)pkParent, v9, (PgWin *)&v4->vfptr, 0, 0);
  v10 = PgSprData::Create((NiAVObject *)&v5->vfptr, "Panel06", (int *)&pkNode, &iTop, 0);
  PgWinSpr::CreateWin((char *)pkNode - (char *)v8, iTop - (_DWORD)pkParent, v10, (PgWin *)&v4->vfptr, 0, 0);
  i = 0;
  do
  {
    v11 = i + 1;
    v12 = fs("Card%02d", i + 1);
    v13 = PgSprData::Create((NiAVObject *)&v5->vfptr, v12, (int *)&pkNode, &iTop, 0);
    PgWinSpr::CreateWin((char *)pkNode - (char *)v8, iTop - (_DWORD)pkParent, v13, (PgWin *)&v4->vfptr, 0, 0);
    v14 = &v4->m_kCardSlots._Myfirst[i];
    pkSprData = (PgSprData *)(4 * i);
    *v14 = CardSlotWin::CreateWin((char *)pkNode - (char *)v8, iTop - (_DWORD)pkParent, (PgWin *)&v4->vfptr, i, 2u, 5u);
    (*(void (__stdcall **)(unsigned int))(**(_DWORD **)((char *)&pkSprData->vfptr
                                                      + (unsigned int)v4->m_kCardSlots._Myfirst)
                                        + 520))(i);
    (*(void (__stdcall **)(unsigned int))(**(_DWORD **)((char *)&pkSprData->vfptr
                                                      + (unsigned int)v4->m_kCardSlots._Myfirst)
                                        + 564))(i);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)((char *)&pkSprData->vfptr + (unsigned int)v4->m_kCardSlots._Myfirst)
                                  + 240))(0);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)((char *)&pkSprData->vfptr + (unsigned int)v4->m_kCardSlots._Myfirst)
                                  + 256))(0);
    i = v11;
  }
  while ( v11 < 0xC );
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&v5->vfptr, "FirstPageNor", (int *)&pkNode, &iTop, &uiWidth, &uiHeight)
    || (iXPos = pkNode,
        iYPos = iTop,
        !PgUtil::GetTriShapeRect((NiAVObject *)&v5->vfptr, "LastPageNor", (int *)&pkNode, &iTop, &uiWidth, &uiHeight)) )
  {
LABEL_5:
    v64 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    return 0;
  }
  uiWidth += (char *)pkNode - (char *)iXPos;
  v4->m_pkPageWin = CollectPageWin::CreateWin(v5, (int)iXPos, iYPos, uiWidth, uiHeight, (PgWin *)&v4->vfptr);
  v15 = PgSprData::Create((NiAVObject *)&v5->vfptr, "Panel08", (int *)&pkNode, &iTop, 0);
  v16 = PgWinSpr::CreateWin((char *)pkNode - (char *)v8, iTop - (_DWORD)pkParent, v15, (PgWin *)&v4->vfptr, 0, 0);
  v4->m_pkRewardPanel = v16;
  v16->vfptr[60].__vecDelDtor((NiRefObject *)v16, 0);
  ((void (__stdcall *)(_DWORD))v4->m_pkRewardPanel->vfptr[64].__vecDelDtor)(0);
  v17 = PgSprData::Create((NiAVObject *)&v5->vfptr, "Text05", (int *)&pkNode, &iTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v18 = v17->m_uiHeight;
  v19 = v17->m_uiWidth;
  pkSprData = (PgSprData *)(v4->m_kRewardTexts._Myfirst + 1);
  v20 = Font::Get(0);
  pkSprData->vfptr = (NiRefObjectVtbl *)PgWinText::CreateWin(
                                          (char *)pkNode - (char *)v8,
                                          iTop - (_DWORD)pkParent,
                                          v19,
                                          v18,
                                          v20,
                                          (PgWin *)&v4->vfptr,
                                          0,
                                          0);
  (*(void (__stdcall **)(signed int))(**((_DWORD **)v4->m_kRewardTexts._Myfirst + 1) + 488))(5);
  v21 = (_DWORD *)*((_DWORD *)v4->m_kRewardTexts._Myfirst + 1);
  v22 = (void (__thiscall **)(_DWORD, _DWORD))(*v21 + 472);
  v23 = TextData2::Get(0xFC3B2029);
  (*v22)(v21, v23);
  (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v4->m_kRewardTexts._Myfirst + 1) + 256))(0);
  v24 = PgSprData::Create((NiAVObject *)&v5->vfptr, "Text07", (int *)&pkNode, &iTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v25 = v24->m_uiHeight;
  v26 = v24->m_uiWidth;
  pkSprData = (PgSprData *)(v4->m_kRewardTexts._Myfirst + 3);
  v27 = Font::Get(0);
  pkSprData->vfptr = (NiRefObjectVtbl *)PgWinText::CreateWin(
                                          (char *)pkNode - (char *)v8,
                                          iTop - (_DWORD)pkParent,
                                          v26,
                                          v25,
                                          v27,
                                          (PgWin *)&v4->vfptr,
                                          0,
                                          0);
  (*(void (__stdcall **)(signed int))(**((_DWORD **)v4->m_kRewardTexts._Myfirst + 3) + 488))(4);
  (*(void (__stdcall **)(void *))(**((_DWORD **)v4->m_kRewardTexts._Myfirst + 3) + 472))(&unk_98806E);
  (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v4->m_kRewardTexts._Myfirst + 3) + 256))(0);
  if ( !bPeeping )
  {
    v28 = PgSprData::Create((NiAVObject *)&v5->vfptr, "Text04", (int *)&pkNode, &iTop, 0)->m_akHitTester.m_pBase->m_pObject;
    v29 = v28->m_uiHeight;
    v30 = v28->m_uiWidth;
    v31 = v4->m_kRewardTexts._Myfirst;
    *(_DWORD *)&bPeeping = v29;
    v32 = v30;
    v33 = v31;
    v34 = Font::Get(0);
    *v33 = PgWinText::CreateWin(
             (char *)pkNode - (char *)v8,
             iTop - (_DWORD)pkParent,
             v32,
             bPeeping,
             v34,
             (PgWin *)&v4->vfptr,
             0,
             0);
    (*(void (__stdcall **)(signed int))(**(_DWORD **)v4->m_kRewardTexts._Myfirst + 488))(5);
    *(_DWORD *)&bPeeping = *v4->m_kRewardTexts._Myfirst;
    v35 = (void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)bPeeping + 472);
    v36 = TextData2::Get(0xAFC80C0E);
    (*v35)(bPeeping, v36);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4->m_kRewardTexts._Myfirst + 256))(0);
    v37 = PgSprData::Create((NiAVObject *)&v5->vfptr, "Text06", (int *)&pkNode, &iTop, 0)->m_akHitTester.m_pBase->m_pObject;
    v38 = v37->m_uiHeight;
    v39 = v37->m_uiWidth;
    v40 = v4->m_kRewardTexts._Myfirst;
    *(_DWORD *)&bPeeping = v38;
    v41 = v39;
    v42 = v40 + 2;
    v43 = Font::Get(0);
    *v42 = PgWinText::CreateWin(
             (char *)pkNode - (char *)v8,
             iTop - (_DWORD)pkParent,
             v41,
             bPeeping,
             v43,
             (PgWin *)&v4->vfptr,
             0,
             0);
    (*(void (__stdcall **)(signed int))(**((_DWORD **)v4->m_kRewardTexts._Myfirst + 2) + 488))(4);
    (*(void (__stdcall **)(void *))(**((_DWORD **)v4->m_kRewardTexts._Myfirst + 2) + 472))(&unk_98806F);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v4->m_kRewardTexts._Myfirst + 2) + 256))(0);
    v44 = CollectRwItemWin::CreateWin(
            v5,
            "Reward02Able01",
            "Reward02Disable01",
            "Reward02Effect01",
            (PgWin *)&v4->vfptr,
            3);
    v4->m_pkRewardItem = v44;
    v44->m_pkToolTipWin = g_pkToolTipWin;
    PgWin::SetToolTipWinText((PgWin *)&v4->m_pkRewardItem->vfptr, &byte_988076);
    ((void (__stdcall *)(_DWORD))v4->m_pkRewardItem->vfptr[64].__vecDelDtor)(0);
    pkSprData = PgSprData::Create((NiAVObject *)&v5->vfptr, "CardBtnNor", (int *)&pkNode, &iTop, 0);
    PgSprData::Add(pkSprData, (NiAVObject *)&v5->vfptr, "CardBtnClick");
    PgSprData::Add(pkSprData, (NiAVObject *)&v5->vfptr, "CardBtnOver");
    *(_DWORD *)&bPeeping = 0;
    while ( 1 )
    {
      iYPosa = bPeeping + 1;
      v45 = fs("CardBtn%02d", bPeeping + 1);
      if ( !PgUtil::GetTriShapeRect((NiAVObject *)&v5->vfptr, v45, (int *)&pkNode, &iTop, &uiWidth, &uiHeight) )
        goto LABEL_5;
      v46 = v4->m_kBookmarkBtns._Myfirst;
      i = 4 * bPeeping;
      v47 = &v46[bPeeping];
      *v47 = PgWinBut::CreateWin(
               (char *)pkNode - (char *)v8,
               iTop - (_DWORD)pkParent,
               pkSprData,
               (PgWin *)&v4->vfptr,
               4u,
               0,
               0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)((char *)v4->m_kBookmarkBtns._Myfirst + i) + 520))(bPeeping);
      v48 = i;
      (*(PgWinBut **)((char *)v4->m_kBookmarkBtns._Myfirst + i))->m_pkToolTipWin = g_pkToolTipWin;
      *(_DWORD *)&bPeeping = (char *)v4->m_kBookmarkBtns._Myfirst + v48;
      v49 = (char *)TextData2::Get(0xF9331D62);
      PgWin::SetToolTipWinText(*(PgWin **)bPeeping, v49);
      *(_DWORD *)&bPeeping = iYPosa;
      if ( iYPosa >= 0xC )
      {
        v50 = MenuTexMgr::GetTexture(1u);
        v51 = PopupMenuWin::CreateWin(v50, 4u, 4u, 0);
        v4->m_pkPopupCardMenu = v51;
        ((void (__stdcall *)(IDirectMessengerVtbl **))v51->vfptr->SetMsgHooker)(&v4->vfptr);
        PopupMenuWin::Clear(v4->m_pkPopupCardMenu);
        v52 = (char *)TextData2::Get(0x94ACCDC3);
        v53 = PopupMenuText::CreateWin(v52, 0, 0, 0, 0, 0, 0);
        PopupMenu::SetClickEvent((PopupMenu *)&v53->vfptr, 77, 0);
        PopupMenuWin::AddMenu(v4->m_pkPopupCardMenu, (int)v5, (PopupMenu *)&v53->vfptr);
        v54 = (char *)TextData2::Get(0xA0C6C4D8);
        v55 = PopupMenuText::CreateWin(v54, 0, 0, 0, 0, 0, 0);
        PopupMenu::SetClickEvent((PopupMenu *)&v55->vfptr, 78, 0);
        PopupMenuWin::AddMenu(v4->m_pkPopupCardMenu, (int)v5, (PopupMenu *)&v55->vfptr);
        PopupMenuWin::FinishMenu(v4->m_pkPopupCardMenu, 0);
        v4->m_pkPopupCardMenu->vfptr[64].__vecDelDtor((NiRefObject *)v4->m_pkPopupCardMenu, 0);
        break;
      }
    }
  }
  v64 = -1;
  if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  return 1;
}

//----- (004ED8C0) --------------------------------------------------------
void __thiscall CollectCardListWin::OnSelectRewardItem(CollectCardListWin *this)
{
  CollectCardListWin *v1; // esi@1
  PgWin *v2; // ebx@1
  unsigned int v3; // edi@2
  CollectRwItemWin *v4; // ecx@3
  CollectRwChoiceWin *v5; // esi@4
  int bEnable; // [sp+8h] [bp-4h]@0

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
  {
    v3 = 0;
    LOBYTE(bEnable) = 0;
    if ( v1->m_pkRewardItem )
    {
      v4 = v1->m_pkRewardItem;
      v3 = v4->m_uiRewardID;
      LOBYTE(bEnable) = CollectRwItemWin::GetState(v4) == 1;
    }
    v5 = (CollectRwChoiceWin *)LODWORD(v2[1].m_kWorld.m_Rotate.m_pEntry[1][2]);
    if ( v5 )
    {
      CollectRwChoiceWin::SetReward(v5, v3, bEnable);
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v5->vfptr);
      PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)&v5->vfptr);
    }
  }
}

//----- (004ED930) --------------------------------------------------------
void __thiscall CollectCardListWin::SetType(CollectCardListWin *this, CollectCardListWin::eCardListType eType, unsigned int uiGrade)
{
  CollectCardListWin *v3; // esi@1
  int v4; // eax@3
  CollectPageWin *v5; // eax@4
  PgWinSpr *v6; // ecx@6

  v3 = this;
  this->m_eCardListType = eType;
  if ( eType )
  {
    if ( eType == 1 )
    {
      v4 = CollectCardTab::GetCountByGrade(uiGrade);
      CollectCardListWin::SetPage(v3, 0, (v4 - 1) / 0xCu, 1u, uiGrade);
    }
  }
  else
  {
    CollectCardListWin::ResetReward(this);
    v5 = v3->m_pkPageWin;
    if ( v5 )
    {
      v5->m_uiPage = 0;
      v3->m_pkPageWin->m_uiLastPage = 4;
      v3->m_pkPageWin->m_uiUpdateMsg = 0;
      v3->m_pkPageWin->m_uiUpdateMsgParam = 0;
      CollectPageWin::Update(v3->m_pkPageWin);
    }
  }
  v6 = v3->m_pkRewardPanel;
  if ( v6 )
    ((void (__stdcall *)(_DWORD))v6->vfptr[64].__vecDelDtor)(v3->m_eCardListType == 1);
}

//----- (004ED9F0) --------------------------------------------------------
void __thiscall CollectWin::UpdateBookmark(CollectWin *this)
{
  CollectWin *v1; // esi@1
  CollectCardListWin *v2; // eax@1
  CollectPageWin *v3; // eax@2
  unsigned int v4; // eax@3
  unsigned int v5; // ecx@5
  unsigned int v6; // ebx@5
  unsigned int v7; // eax@5
  CollectWin::sCardInfo *v8; // edi@8
  unsigned int v9; // ecx@8
  unsigned int *v10; // edx@9
  CollectCardListWin *v11; // edi@13
  CardSlotWin *v12; // ecx@13
  PgWinBut *v13; // ecx@15
  int v14; // eax@19
  unsigned int uiSize; // [sp+4h] [bp-Ch]@5
  unsigned int v16; // [sp+8h] [bp-8h]@5
  unsigned int i; // [sp+Ch] [bp-4h]@5
  CardSlotWin *ia; // [sp+Ch] [bp-4h]@13

  v1 = this;
  v2 = this->m_pkCardListWin;
  if ( v2 )
  {
    v3 = v2->m_pkPageWin;
    if ( v3 )
      v4 = v3->m_uiPage;
    else
      v4 = 0;
    v5 = this->m_kBookmarkInfos._Mylast - this->m_kBookmarkInfos._Myfirst;
    v6 = 0;
    v7 = 12 * v4;
    uiSize = v5;
    i = 0;
    v16 = v7;
    while ( 1 )
    {
      if ( v7 < v5 )
      {
        v8 = v1->m_kCardInfos._Myfirst;
        v9 = 0;
        if ( v1->m_kCardInfos._Mylast - v8 )
        {
          v10 = &v8->m_uiCardID;
          while ( *v10 != v1->m_kBookmarkInfos._Myfirst[v16] )
          {
            ++v9;
            v10 += 5;
            if ( v9 >= v1->m_kCardInfos._Mylast - v8 )
              goto LABEL_12;
          }
          v14 = (int)&v8[v9];
          if ( !v14 || *(_DWORD *)(v14 + 16) <= 0 )
          {
LABEL_12:
            v6 = i;
            goto LABEL_13;
          }
          v6 = i;
          CollectCardListWin::SetCard(
            v1->m_pkCardListWin,
            i,
            v1->m_kBookmarkInfos._Myfirst[v16],
            *(_DWORD *)(v14 + 8),
            *(_DWORD *)(v14 + 12),
            *(_DWORD *)(v14 + 16));
        }
        else
        {
LABEL_13:
          v11 = v1->m_pkCardListWin;
          v12 = v11->m_kCardSlots._Myfirst[v6];
          ia = v12;
          if ( v12 )
          {
            ((void (__stdcall *)(_DWORD))v12->vfptr[64].__vecDelDtor)(0);
            CardSlotWin::SetInfo(ia, 0, 0, 0, 0);
          }
          v13 = v11->m_kBookmarkBtns._Myfirst[v6];
          if ( v13 )
            ((void (__stdcall *)(_DWORD))v13->vfptr[64].__vecDelDtor)(v11->m_eCardListType == 0);
        }
      }
      ++v6;
      v7 = v16 + 1;
      i = v6;
      ++v16;
      if ( v6 >= 0xC )
        break;
      v5 = uiSize;
    }
  }
}

//----- (004EDB30) --------------------------------------------------------
void __userpurge CollectMainWin::OnCommand(CollectMainWin *this@<ecx>, double a2@<st0>, unsigned int wParam, int lParam)
{
  PgWin *v4; // eax@6

  switch ( wParam )
  {
    case 0u:
      CollectMainWin::OnSelectCard(this, a2, lParam);
      break;
    case 1u:
      CollectMainWin::OnSelectRewardItem(this);
      break;
    case 2u:
      CollectMainWin::OnSelectRewardArrow(this, (CollectMainWin::eRewardArrowType)lParam);
      break;
    case 3u:
      if ( (unsigned int)lParam < 5 )
      {
        v4 = PgWin::GetParentWin((PgWin *)&this->vfptr);
        PgWin::PostMsg(v4, 5u, 2u, lParam);
      }
      break;
    default:
      return;
  }
}

//----- (004EDBA0) --------------------------------------------------------
void __thiscall CollectMainWin::InitBar(CollectMainWin *this)
{
  double v1; // st7@1
  unsigned int v2; // ebx@1
  int v3; // eax@2
  unsigned int v4; // esi@2
  unsigned int v5; // edi@3
  char *v6; // eax@6
  double v7; // st6@11
  PgWinBar *v8; // ecx@12
  PgWinBar *v9; // ecx@14
  unsigned int v10; // esi@16
  PgWinBar *v11; // ecx@17
  CollectMainWin *v12; // [sp+4h] [bp-20h]@1
  float fMaxAll; // [sp+8h] [bp-1Ch]@1
  float v14; // [sp+Ch] [bp-18h]@2
  float fMaxVal[4]; // [sp+10h] [bp-14h]@1

  v1 = 0.0;
  fMaxVal[0] = 0.0;
  fMaxVal[1] = 0.0;
  fMaxVal[2] = 0.0;
  v12 = this;
  fMaxVal[3] = 0.0;
  v2 = 0;
  fMaxAll = 0.0;
  do
  {
    v3 = *(_DWORD *)(ITableBase<CollectCard,CollectCardTab>::ms_pkTable + 56);
    v4 = 0;
    v14 = 0.0;
    if ( v3 )
      v5 = *(_DWORD *)(v3 + 40);
    else
      v5 = 0;
    if ( v5 > 0 )
    {
      do
      {
        v6 = CDataReader::GetRecord((CDataReader *)(ITableBase<CollectCard,CollectCardTab>::ms_pkTable + 4), v4);
        if ( v6 && *(_DWORD *)(v6 + 34) == v2 )
          ++LODWORD(v14);
        ++v4;
      }
      while ( v4 < v5 );
      v1 = 0.0;
    }
    v14 = (double)LODWORD(v14);
    ++v2;
    v7 = v14;
    *(&v14 + v2) = v14;
    fMaxAll = v7 + fMaxAll;
  }
  while ( v2 < 4 );
  v8 = *v12->m_kBars._Myfirst;
  if ( v8 )
  {
    v8->m_fCurValue = v1;
    v8->m_fMaxValue = fMaxAll;
    PgWinBar::OnChangeValue(v8);
    v1 = 0.0;
  }
  v9 = (PgWinBar *)*((_DWORD *)v12->m_kBars._Myfirst + 5);
  if ( v9 )
  {
    v9->m_fCurValue = v1;
    v9->m_fMaxValue = fMaxAll;
    PgWinBar::OnChangeValue(v9);
    v1 = 0.0;
  }
  v10 = 0;
  do
  {
    v11 = v12->m_kBars._Myfirst[v10 + 1];
    if ( v11 )
    {
      v11->m_fCurValue = v1;
      v11->m_fMaxValue = fMaxVal[v10];
      PgWinBar::OnChangeValue(v11);
      v1 = 0.0;
    }
    ++v10;
  }
  while ( v10 < 4 );
}
// A8C210: using guessed type int ITableBase<CollectCard,CollectCardTab>::ms_pkTable;

//----- (004EDCC0) --------------------------------------------------------
void __thiscall CollectMainWin::SetBar(CollectMainWin *this, unsigned int uiGrade, float fValue)
{
  PgWinBar *v3; // ecx@1

  v3 = this->m_kBars._Myfirst[uiGrade + 1];
  if ( v3 )
  {
    if ( fValue != v3->m_fCurValue )
    {
      v3->m_fCurValue = fValue;
      PgWinBar::OnChangeValue(v3);
    }
  }
}

//----- (004EDD00) --------------------------------------------------------
void __thiscall CollectMainWin::UpdateBar(CollectMainWin *this)
{
  CollectMainWin *v1; // edi@1
  unsigned int v2; // ecx@1
  int v3; // eax@2
  int *v4; // ebx@2
  int v5; // esi@4
  char *v6; // eax@4
  PgWinBar **v7; // ecx@6
  PgWinBar *v8; // esi@6
  PgWinText *v9; // ebx@6
  double v10; // st7@8
  PgWinBar *v11; // ecx@9
  double v12; // st6@10
  NiRefObjectVtbl *v13; // esi@10
  float v14; // ST18_4@10
  char *v15; // eax@10
  PgWinBar **v16; // edx@11
  PgWinBar *v17; // ecx@11
  double v18; // st7@12
  bool v19; // c0@12
  bool v20; // c3@12
  double v21; // st7@12
  PgWinBar *v22; // ecx@15
  int *v23; // ebx@15
  int v24; // esi@20
  char *v25; // eax@20
  signed int v26; // [sp+8h] [bp-10h]@1
  float fMaxVal; // [sp+Ch] [bp-Ch]@1
  float fAllVal; // [sp+10h] [bp-8h]@1
  float fCurVal; // [sp+14h] [bp-4h]@1

  fCurVal = 0.0;
  fMaxVal = 0.0;
  v1 = this;
  fAllVal = 0.0;
  v2 = 4;
  v26 = 4;
  do
  {
    v3 = *(int *)((char *)v1->m_kBars._Myfirst + v2);
    v4 = *(int **)((char *)v1->m_kBarTexts._Myfirst + v2);
    if ( v3 && v4 )
    {
      v5 = *v4;
      fCurVal = *(float *)(v3 + 300);
      fMaxVal = *(float *)(v3 + 304);
      fAllVal = fAllVal + fCurVal;
      v6 = fs("%d/%d", (signed int)fCurVal, (signed int)fMaxVal);
      (*(void (__thiscall **)(int *, char *))(v5 + 472))(v4, v6);
      v2 = v26;
    }
    v2 += 4;
    v26 = v2;
  }
  while ( v2 < 0x14 );
  v7 = v1->m_kBars._Myfirst;
  v8 = *v7;
  v9 = *v1->m_kBarTexts._Myfirst;
  if ( *v7 && v9 )
  {
    v10 = fAllVal;
    if ( fAllVal != v8->m_fCurValue )
    {
      v11 = *v7;
      v8->m_fCurValue = fAllVal;
      PgWinBar::OnChangeValue(v11);
      v10 = fAllVal;
    }
    v12 = v8->m_fMaxValue;
    v13 = v9->vfptr;
    v14 = v12;
    v15 = fs("%d/%d", (signed int)v10, (signed int)v14);
    v13[118].__vecDelDtor((NiRefObject *)v9, (unsigned int)v15);
  }
  v16 = v1->m_kBars._Myfirst;
  v17 = v16[v1->m_uiRewardGrade];
  if ( v17 )
  {
    fMaxVal = v1->m_fRewardMaxVal - v1->m_fPrevRewardMaxVal;
    v18 = v17->m_fCurValue - v1->m_fPrevRewardMaxVal;
    v19 = 0.0 < v18;
    v20 = 0.0 == v18;
    v21 = 0.0;
    if ( v19 || v20 )
      v21 = v17->m_fCurValue - v1->m_fPrevRewardMaxVal;
    fCurVal = v21;
  }
  v22 = v16[5];
  v23 = (int *)*((_DWORD *)v1->m_kBarTexts._Myfirst + 5);
  if ( v22 && v23 )
  {
    if ( fMaxVal != v22->m_fMaxValue || fCurVal != v22->m_fCurValue )
    {
      v22->m_fMaxValue = fMaxVal;
      v22->m_fCurValue = fCurVal;
      PgWinBar::OnChangeValue(v22);
    }
    v24 = *v23;
    v25 = fs("%d", (signed int)v1->m_fRewardMaxVal);
    (*(void (__thiscall **)(int *, char *))(v24 + 472))(v23, v25);
  }
}

//----- (004EDED0) --------------------------------------------------------
void __thiscall CollectMainWin::~CollectMainWin(CollectMainWin *this)
{
  CollectMainWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&CollectMainWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CollectMainWin::`vftable'{for `IDirectMessenger'};
  if ( this->m_kCardSlots._Myfirst )
    operator delete(this->m_kCardSlots._Myfirst);
  v1->m_kCardSlots._Myfirst = 0;
  v1->m_kCardSlots._Mylast = 0;
  v1->m_kCardSlots._Myend = 0;
  if ( v1->m_kCheckGrades._Myfirst )
    operator delete(v1->m_kCheckGrades._Myfirst);
  v1->m_kCheckGrades._Myfirst = 0;
  v1->m_kCheckGrades._Mylast = 0;
  v1->m_kCheckGrades._Myend = 0;
  if ( v1->m_kBarTexts._Myfirst )
    operator delete(v1->m_kBarTexts._Myfirst);
  v1->m_kBarTexts._Myfirst = 0;
  v1->m_kBarTexts._Mylast = 0;
  v1->m_kBarTexts._Myend = 0;
  if ( v1->m_kBars._Myfirst )
    operator delete(v1->m_kBars._Myfirst);
  v1->m_kBars._Myfirst = 0;
  v1->m_kBars._Mylast = 0;
  v1->m_kBars._Myend = 0;
  PgWinSpr::~PgWinSpr((PgWinSpr *)&v1->vfptr);
}
// 988338: using guessed type void (__thiscall *CollectMainWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 988354: using guessed type int (__thiscall *CollectMainWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004EDF90) --------------------------------------------------------
void __thiscall CollectCardListWin::~CollectCardListWin(CollectCardListWin *this)
{
  CollectCardListWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&CollectCardListWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CollectCardListWin::`vftable'{for `IDirectMessenger'};
  if ( this->m_kCardSlots._Myfirst )
    operator delete(this->m_kCardSlots._Myfirst);
  v1->m_kCardSlots._Myfirst = 0;
  v1->m_kCardSlots._Mylast = 0;
  v1->m_kCardSlots._Myend = 0;
  if ( v1->m_kBookmarkBtns._Myfirst )
    operator delete(v1->m_kBookmarkBtns._Myfirst);
  v1->m_kBookmarkBtns._Myfirst = 0;
  v1->m_kBookmarkBtns._Mylast = 0;
  v1->m_kBookmarkBtns._Myend = 0;
  if ( v1->m_kRewardTexts._Myfirst )
    operator delete(v1->m_kRewardTexts._Myfirst);
  v1->m_kRewardTexts._Myfirst = 0;
  v1->m_kRewardTexts._Mylast = 0;
  v1->m_kRewardTexts._Myend = 0;
  PgWinSpr::~PgWinSpr((PgWinSpr *)&v1->vfptr);
}
// 988560: using guessed type void (__thiscall *CollectCardListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98857C: using guessed type int (__thiscall *CollectCardListWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004EE020) --------------------------------------------------------
void __thiscall CollectMainWin::CollectMainWin(CollectMainWin *this)
{
  CollectMainWin *v1; // ebx@1
  char *v2; // ecx@1
  ColumnBut **v3; // edi@1
  unsigned int v4; // eax@1
  char *v5; // edi@2
  unsigned int v6; // ecx@7
  unsigned int v7; // ecx@9
  int v8; // eax@14
  char *v9; // ecx@17
  CardSlotWin **v10; // edi@17
  unsigned int v11; // eax@17
  char *v12; // edi@18
  unsigned int v13; // eax@23
  unsigned int v14; // ecx@23
  unsigned int v15; // ecx@25
  int v16; // eax@30
  unsigned int v17; // [sp+1Ch] [bp-10h]@21

  v1 = this;
  PgWinSpr::PgWinSpr((PgWinSpr *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&CollectMainWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CollectMainWin::`vftable'{for `IDirectMessenger'};
  v1->m_kBars._Myfirst = 0;
  v1->m_kBars._Mylast = 0;
  v1->m_kBars._Myend = 0;
  v1->m_kBarTexts._Myfirst = 0;
  v1->m_kBarTexts._Mylast = 0;
  v1->m_kBarTexts._Myend = 0;
  v1->m_kCheckGrades._Myfirst = 0;
  v1->m_kCheckGrades._Mylast = 0;
  v1->m_kCheckGrades._Myend = 0;
  v1->m_kCardSlots._Myfirst = 0;
  v1->m_kCardSlots._Mylast = 0;
  v1->m_kCardSlots._Myend = 0;
  v1->m_fRewardMaxVal = 0.0;
  v1->m_pkRewardItem = 0;
  v1->m_pkSelectGradeText = 0;
  v1->m_uiRewardGrade = 0;
  v1->m_uiRewardPage = 0;
  v1->m_uiLastRewardPage = 0;
  std::vector<PgWinText *,std::allocator<PgWinText *>>::resize(
    (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v1->m_kBars,
    6u);
  std::vector<PgWinText *,std::allocator<PgWinText *>>::resize(
    (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v1->m_kBarTexts,
    6u);
  *v1->m_kBars._Myfirst = 0;
  *v1->m_kBarTexts._Myfirst = 0;
  *((_DWORD *)v1->m_kBars._Myfirst + 1) = 0;
  *((_DWORD *)v1->m_kBarTexts._Myfirst + 1) = 0;
  *((_DWORD *)v1->m_kBars._Myfirst + 2) = 0;
  *((_DWORD *)v1->m_kBarTexts._Myfirst + 2) = 0;
  *((_DWORD *)v1->m_kBars._Myfirst + 3) = 0;
  *((_DWORD *)v1->m_kBarTexts._Myfirst + 3) = 0;
  *((_DWORD *)v1->m_kBars._Myfirst + 4) = 0;
  *((_DWORD *)v1->m_kBarTexts._Myfirst + 4) = 0;
  *((_DWORD *)v1->m_kBars._Myfirst + 5) = 0;
  *((_DWORD *)v1->m_kBarTexts._Myfirst + 5) = 0;
  v2 = (char *)v1->m_kCheckGrades._Mylast;
  v3 = v1->m_kCheckGrades._Myfirst;
  v4 = v1->m_kCheckGrades._Mylast - v3;
  if ( v4 <= 6 )
  {
    if ( v4 < 6 )
    {
      if ( 0x3FFFFFFF - (6 - v4) < v4 )
        std::_Xlength_error("vector<T> too long");
      v6 = v1->m_kCheckGrades._Myend - v3;
      if ( v6 < 6 )
      {
        if ( 0x3FFFFFFF - (v6 >> 1) >= v6 )
          v7 = (v6 >> 1) + v6;
        else
          v7 = 0;
        if ( v7 < 6 )
          v7 = 6;
        std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
          (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&v1->m_kCheckGrades,
          v7);
      }
      v8 = v1->m_kCheckGrades._Mylast - v1->m_kCheckGrades._Myfirst;
      if ( 6 != v8 )
        memset(v1->m_kCheckGrades._Mylast, 0, 4 * (6 - v8));
      v1->m_kCheckGrades._Mylast += 6 - (v1->m_kCheckGrades._Mylast - v1->m_kCheckGrades._Myfirst);
    }
  }
  else
  {
    v5 = (char *)(v3 + 6);
    if ( v5 != v2 )
    {
      memmove(v5, v2, 0);
      v1->m_kCheckGrades._Mylast = (ColumnBut **)v5;
    }
  }
  *v1->m_kCheckGrades._Myfirst = 0;
  *((_DWORD *)v1->m_kCheckGrades._Myfirst + 1) = 0;
  *((_DWORD *)v1->m_kCheckGrades._Myfirst + 2) = 0;
  *((_DWORD *)v1->m_kCheckGrades._Myfirst + 3) = 0;
  *((_DWORD *)v1->m_kCheckGrades._Myfirst + 4) = 0;
  v9 = (char *)v1->m_kCardSlots._Mylast;
  v10 = v1->m_kCardSlots._Myfirst;
  v11 = v1->m_kCardSlots._Mylast - v10;
  if ( v11 <= 4 )
  {
    if ( v11 < 4 )
    {
      v17 = v1->m_kCardSlots._Mylast - v10;
      if ( 0x3FFFFFFF - (4 - v11) < v17 )
        std::_Xlength_error("vector<T> too long");
      v13 = 4 - v11 + v17;
      v14 = v1->m_kCardSlots._Myend - v10;
      if ( v13 > v14 )
      {
        if ( 0x3FFFFFFF - (v14 >> 1) >= v14 )
          v15 = (v14 >> 1) + v14;
        else
          v15 = 0;
        if ( v15 < v13 )
          v15 = v13;
        std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
          (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&v1->m_kCardSlots,
          v15);
      }
      v16 = v1->m_kCardSlots._Mylast - v1->m_kCardSlots._Myfirst;
      if ( 4 != v16 )
        memset(v1->m_kCardSlots._Mylast, 0, 4 * (4 - v16));
      v1->m_kCardSlots._Mylast += 4 - (v1->m_kCardSlots._Mylast - v1->m_kCardSlots._Myfirst);
    }
  }
  else
  {
    v12 = (char *)(v10 + 4);
    if ( v12 != v9 )
    {
      memmove(v12, v9, 0);
      v1->m_kCardSlots._Mylast = (CardSlotWin **)v12;
    }
  }
  *v1->m_kCardSlots._Myfirst = 0;
  *((_DWORD *)v1->m_kCardSlots._Myfirst + 1) = 0;
  *((_DWORD *)v1->m_kCardSlots._Myfirst + 2) = 0;
  *((_DWORD *)v1->m_kCardSlots._Myfirst + 3) = 0;
}
// 988338: using guessed type void (__thiscall *CollectMainWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 988354: using guessed type int (__thiscall *CollectMainWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004EE3B0) --------------------------------------------------------
CollectMainWin *__cdecl CollectMainWin::CreateWin(NiNode *pkNode, PgWin *pkParent, int bPeeping)
{
  PgWin *v3; // eax@1
  PgWin *v4; // eax@2
  PgWin *v5; // esi@2
  PgWin *v6; // edi@8
  CollectMainWin *v7; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x184u);
  result.m_pObject = v3;
  v9 = 0;
  if ( v3 )
  {
    CollectMainWin::CollectMainWin((CollectMainWin *)v3);
    v5 = v4;
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v9 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v5);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, NiNode *, PgWin *, int))v5->vfptr[129].__vecDelDtor)(
                          v5,
                          pkNode,
                          pkParent,
                          bPeeping) )
  {
    ((void (__thiscall *)(PgWin *))v5->vfptr[89].__vecDelDtor)(v5);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = (CollectMainWin *)v5;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v5);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = 0;
  }
  return v7;
}

//----- (004EE4F0) --------------------------------------------------------
void __thiscall CollectCardListWin::CollectCardListWin(CollectCardListWin *this)
{
  CollectCardListWin *v1; // edi@1
  int v2; // ebx@1
  char *v3; // ecx@1
  PgWinBut **v4; // edx@1
  unsigned int v5; // eax@1
  int v6; // esi@2
  int v7; // eax@3
  unsigned int v8; // ecx@7
  unsigned int v9; // ecx@9
  int v10; // eax@14
  unsigned int v11; // eax@18
  char *v12; // ecx@20
  CardSlotWin **v13; // edx@20
  CardSlotWin ***v14; // esi@20
  unsigned int v15; // eax@20
  int v16; // ebx@21
  unsigned int v17; // ecx@26
  unsigned int v18; // ecx@28
  int v19; // eax@33
  unsigned int v20; // eax@36
  CollectCardListWin *v21; // [sp+14h] [bp-10h]@1

  v1 = this;
  v21 = this;
  PgWinSpr::PgWinSpr((PgWinSpr *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&CollectCardListWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CollectCardListWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkRewardItem = 0;
  v1->m_pkPageWin = 0;
  v1->m_pkPopupCardMenu = 0;
  v1->m_pkRewardPanel = 0;
  v1->m_kRewardTexts._Myfirst = 0;
  v1->m_kRewardTexts._Mylast = 0;
  v1->m_kRewardTexts._Myend = 0;
  v2 = (int)&v1->m_kBookmarkBtns;
  *(_DWORD *)v2 = 0;
  *(_DWORD *)(v2 + 4) = 0;
  *(_DWORD *)(v2 + 8) = 0;
  v1->m_kCardSlots._Myfirst = 0;
  v1->m_kCardSlots._Mylast = 0;
  v1->m_kCardSlots._Myend = 0;
  v1->m_uiSelectBookmarkSlot = 0;
  v1->m_eCardListType = 0;
  std::vector<PgWinText *,std::allocator<PgWinText *>>::resize(
    (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v1->m_kRewardTexts,
    4u);
  *v1->m_kRewardTexts._Myfirst = 0;
  *((_DWORD *)v1->m_kRewardTexts._Myfirst + 1) = 0;
  *((_DWORD *)v1->m_kRewardTexts._Myfirst + 2) = 0;
  *((_DWORD *)v1->m_kRewardTexts._Myfirst + 3) = 0;
  v3 = (char *)v1->m_kBookmarkBtns._Mylast;
  v4 = v1->m_kBookmarkBtns._Myfirst;
  v5 = v1->m_kBookmarkBtns._Mylast - v1->m_kBookmarkBtns._Myfirst;
  if ( v5 <= 0xC )
  {
    if ( v5 < 0xC )
    {
      if ( 0x3FFFFFFF - (12 - v5) < v5 )
        std::_Xlength_error("vector<T> too long");
      v8 = v1->m_kBookmarkBtns._Myend - v4;
      if ( v8 < 0xC )
      {
        if ( 0x3FFFFFFF - (v8 >> 1) >= v8 )
          v9 = (v8 >> 1) + v8;
        else
          v9 = 0;
        if ( v9 < 0xC )
          v9 = 12;
        std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
          (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&v1->m_kBookmarkBtns,
          v9);
      }
      v10 = v1->m_kBookmarkBtns._Mylast - v1->m_kBookmarkBtns._Myfirst;
      if ( 12 != v10 )
      {
        memset(v1->m_kBookmarkBtns._Mylast, 0, 4 * (12 - v10));
        v1 = v21;
      }
      v7 = *(_DWORD *)(v2 + 4) + 4 * (12 - ((*(_DWORD *)(v2 + 4) - *(_DWORD *)v2) >> 2));
      goto LABEL_17;
    }
  }
  else
  {
    v6 = (int)(v4 + 12);
    if ( (char *)(v4 + 12) != v3 )
    {
      memmove((char *)v4 + 48, v3, 0);
      v7 = v6;
LABEL_17:
      *(_DWORD *)(v2 + 4) = v7;
      goto LABEL_18;
    }
  }
LABEL_18:
  v11 = 0;
  do
  {
    *(_DWORD *)(v11 + *(_DWORD *)v2) = 0;
    v11 += 4;
  }
  while ( v11 < 0x30 );
  v12 = (char *)v1->m_kCardSlots._Mylast;
  v13 = v1->m_kCardSlots._Myfirst;
  v14 = &v1->m_kCardSlots._Myfirst;
  v15 = v1->m_kCardSlots._Mylast - v13;
  if ( v15 <= 0xC )
  {
    if ( v15 < 0xC )
    {
      if ( 0x3FFFFFFF - (12 - v15) < v15 )
        std::_Xlength_error("vector<T> too long");
      v17 = v1->m_kCardSlots._Myend - v13;
      if ( v17 < 0xC )
      {
        if ( 0x3FFFFFFF - (v17 >> 1) >= v17 )
          v18 = (v17 >> 1) + v17;
        else
          v18 = 0;
        if ( v18 < 0xC )
          v18 = 12;
        std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
          (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&v1->m_kCardSlots,
          v18);
      }
      v19 = v1->m_kCardSlots._Mylast - v1->m_kCardSlots._Myfirst;
      if ( 12 != v19 )
      {
        memset(v1->m_kCardSlots._Mylast, 0, 4 * (12 - v19));
        v1 = v21;
      }
      v14 = &v1->m_kCardSlots._Myfirst;
      v1->m_kCardSlots._Mylast += 12 - (v1->m_kCardSlots._Mylast - v1->m_kCardSlots._Myfirst);
    }
  }
  else
  {
    v16 = (int)(v13 + 12);
    if ( (char *)(v13 + 12) != v12 )
    {
      memmove((char *)v13 + 48, v12, 0);
      v1->m_kCardSlots._Mylast = (CardSlotWin **)v16;
    }
  }
  v20 = 0;
  do
  {
    (*v14)[v20] = 0;
    ++v20;
  }
  while ( v20 < 12 );
}
// 988560: using guessed type void (__thiscall *CollectCardListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98857C: using guessed type int (__thiscall *CollectCardListWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004EE7B0) --------------------------------------------------------
CollectCardListWin *__cdecl CollectCardListWin::CreateWin(NiNode *pkNode, PgWin *pkParent, int bPeeping)
{
  PgWin *v3; // eax@1
  PgWin *v4; // eax@2
  PgWin *v5; // esi@2
  PgWin *v6; // edi@8
  CollectCardListWin *v7; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x170u);
  result.m_pObject = v3;
  v9 = 0;
  if ( v3 )
  {
    CollectCardListWin::CollectCardListWin((CollectCardListWin *)v3);
    v5 = v4;
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v9 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v5);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, NiNode *, PgWin *, int))v5->vfptr[129].__vecDelDtor)(
                          v5,
                          pkNode,
                          pkParent,
                          bPeeping) )
  {
    ((void (__thiscall *)(PgWin *))v5->vfptr[89].__vecDelDtor)(v5);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = (CollectCardListWin *)v5;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v5);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = 0;
  }
  return v7;
}

//----- (004EE8F0) --------------------------------------------------------
void __thiscall CollectWin::InitBookmarkInfo(CollectWin *this)
{
  char *v1; // esi@1
  unsigned int v2; // eax@1

  v1 = (char *)&this->m_kBookmarkInfos;
  std::vector<PgWinText *,std::allocator<PgWinText *>>::resize(
    (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&this->m_kBookmarkInfos,
    0x3Cu);
  v2 = 0;
  do
  {
    *(_DWORD *)(v2 + *(_DWORD *)v1) = 0;
    v2 += 4;
  }
  while ( v2 < 0xF0 );
}

//----- (004EE920) --------------------------------------------------------
char __thiscall CollectMainWin::Create(CollectMainWin *this, NiNode *pkNode, PgWin *pkParent, bool bPeeping)
{
  unsigned int v4; // edi@1
  CollectMainWin *v5; // esi@1
  PgSprData *v6; // eax@4
  char result; // al@7
  PgSprData *v8; // eax@8
  PgSprData *v9; // eax@9
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v10; // eax@10
  const char *v11; // eax@14
  PgSprData *v12; // eax@14
  PgWinBar **v13; // ebx@14
  PgWinBar *v14; // ebx@14
  PgWin *v15; // ST20_4@14
  PgFont *v16; // ST1C_4@14
  unsigned int v17; // ST18_4@14
  unsigned int v18; // eax@14
  NiUnsharedGeometryGroup *v19; // eax@15
  NiUnsharedGeometryGroup *v20; // ecx@15
  char v21; // dl@16
  NiUnsharedGeometryGroup *v22; // eax@17
  NiUnsharedGeometryGroup *v23; // ecx@17
  char v24; // dl@18
  NiUnsharedGeometryGroup *v25; // eax@19
  NiUnsharedGeometryGroup *v26; // ecx@19
  char v27; // dl@20
  NiUnsharedGeometryGroup *v28; // eax@21
  NiUnsharedGeometryGroup *v29; // ecx@21
  char v30; // dl@22
  NiUnsharedGeometryGroup *v31; // eax@23
  NiUnsharedGeometryGroup *v32; // ecx@23
  char v33; // dl@24
  NiUnsharedGeometryGroup *v34; // eax@25
  NiUnsharedGeometryGroup *v35; // ecx@25
  char v36; // dl@26
  NiUnsharedGeometryGroup *v37; // eax@27
  NiUnsharedGeometryGroup *v38; // ecx@27
  char v39; // dl@28
  NiUnsharedGeometryGroup *v40; // eax@29
  NiUnsharedGeometryGroup *v41; // ecx@29
  char v42; // dl@30
  NiUnsharedGeometryGroup *v43; // eax@31
  NiUnsharedGeometryGroup *v44; // ecx@31
  char v45; // dl@32
  NiUnsharedGeometryGroup *v46; // eax@33
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v47; // edi@34
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v48; // eax@35
  const char *v49; // eax@37
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v50; // eax@38
  const char *v51; // eax@40
  ColumnBut **v52; // ebx@40
  unsigned int v53; // edi@40
  ColumnBut *v54; // eax@40
  unsigned int v55; // ecx@40
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v56; // eax@41
  PgWin *v57; // edi@43
  PgFont *v58; // ST1C_4@43
  unsigned int v59; // ST18_4@43
  unsigned int v60; // eax@43
  PgWinText *v61; // edi@43
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v62; // eax@44
  bool v63; // zf@46
  NiAVObject *v64; // ebx@47
  PgFont *v65; // eax@50
  PgWinText *v66; // edi@50
  NiUnsharedGeometryGroup *v67; // eax@50
  PgFont *v68; // eax@51
  PgWinText *v69; // edi@51
  NiUnsharedGeometryGroup *v70; // eax@51
  unsigned int v71; // edi@51
  const char *v72; // eax@52
  unsigned int v73; // edi@55
  PgFont *v74; // eax@62
  PgWinText *v75; // edi@62
  NiUnsharedGeometryGroup *v76; // eax@62
  PgSprData *v77; // eax@62
  PgWinSpr *v78; // edi@62
  PgFont *v79; // ST1C_4@62
  unsigned int v80; // ST18_4@62
  unsigned int v81; // eax@62
  PgWinText *v82; // eax@62
  NiUnsharedGeometryGroup *v83; // eax@62
  NiAVObject **v84; // eax@62
  PgWin *v85; // eax@62
  void *(__thiscall *v86)(NiRefObject *, unsigned int); // edx@62
  int v87; // eax@62
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v88; // edi@62
  void *v89; // eax@64
  const char *v90; // eax@66
  void *v91; // eax@67
  const char *v92; // eax@69
  void *v93; // eax@70
  const char *v94; // eax@72
  PgWinBut *v95; // eax@72
  int v96; // [sp+14h] [bp-2C0h]@33
  PgSprData *pkSprData; // [sp+18h] [bp-2BCh]@37
  PgSprData *pkSprDataa; // [sp+18h] [bp-2BCh]@66
  unsigned int uiHeight; // [sp+1Ch] [bp-2B8h]@4
  unsigned int uiWidth; // [sp+20h] [bp-2B4h]@4
  unsigned int i; // [sp+24h] [bp-2B0h]@10
  int iOffY; // [sp+28h] [bp-2ACh]@8
  int iOffX; // [sp+2Ch] [bp-2A8h]@8
  NiAVObject *pkObject; // [sp+30h] [bp-2A4h]@1
  int iLeft; // [sp+34h] [bp-2A0h]@4
  int iTop; // [sp+38h] [bp-29Ch]@4
  PgWin *v107; // [sp+3Ch] [bp-298h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > akRwBtnNodeName[2]; // [sp+40h] [bp-294h]@62
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > akGaugeNodeName[6]; // [sp+78h] [bp-25Ch]@10
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > akCheckToolTip[5]; // [sp+120h] [bp-1B4h]@25
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > akCheckString[5]; // [sp+1ACh] [bp-128h]@15
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > akCheckNodeName[5]; // [sp+238h] [bp-9Ch]@15
  int v113; // [sp+2D0h] [bp-4h]@3

  v4 = 0;
  v5 = this;
  pkObject = (NiAVObject *)pkNode;
  v107 = pkParent;
  if ( pkNode )
    InterlockedIncrement((volatile LONG *)&pkNode->m_uiRefCount);
  v113 = 0;
  if ( !pkNode )
    return 0;
  uiWidth = 0;
  uiHeight = 0;
  iLeft = 0;
  iTop = 0;
  v6 = PgSprData::Create((NiAVObject *)&pkNode->vfptr, "Panel03", &iLeft, &iTop, 0);
  if ( !PgWinSpr::Create((PgWinSpr *)&v5->vfptr, iLeft, iTop, v6, v107, 0, 0) )
  {
    v113 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&pkNode->m_uiRefCount) )
      pkNode->vfptr->__vecDelDtor((NiRefObject *)pkNode, 1u);
    return 0;
  }
  iOffX = iLeft;
  iOffY = iTop;
  v8 = PgSprData::Create((NiAVObject *)&pkNode->vfptr, "Panel07", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft - iOffX, iTop - iOffY, v8, (PgWin *)&v5->vfptr, 0, 0);
  if ( !bPeeping )
  {
    v9 = PgSprData::Create((NiAVObject *)&pkNode->vfptr, "RwGaugeBar", &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft - iOffX, iTop - iOffY, v9, (PgWin *)&v5->vfptr, 0, 0);
  }
  akGaugeNodeName[0]._Myres = 15;
  akGaugeNodeName[0]._Mysize = 0;
  akGaugeNodeName[0]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(akGaugeNodeName, "AllRank", 7u);
  LOBYTE(v113) = 1;
  akGaugeNodeName[1]._Myres = 15;
  akGaugeNodeName[1]._Mysize = 0;
  akGaugeNodeName[1]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&akGaugeNodeName[1], "SRank", 5u);
  LOBYTE(v113) = 2;
  akGaugeNodeName[2]._Myres = 15;
  akGaugeNodeName[2]._Mysize = 0;
  akGaugeNodeName[2]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&akGaugeNodeName[2], "ARank", 5u);
  LOBYTE(v113) = 3;
  akGaugeNodeName[3]._Myres = 15;
  akGaugeNodeName[3]._Mysize = 0;
  akGaugeNodeName[3]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&akGaugeNodeName[3], "BRank", 5u);
  LOBYTE(v113) = 4;
  akGaugeNodeName[4]._Myres = 15;
  akGaugeNodeName[4]._Mysize = 0;
  akGaugeNodeName[4]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&akGaugeNodeName[4], "CRank", 5u);
  LOBYTE(v113) = 5;
  akGaugeNodeName[5]._Myres = 15;
  akGaugeNodeName[5]._Mysize = 0;
  akGaugeNodeName[5]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&akGaugeNodeName[5], "Rw", 2u);
  v10 = akGaugeNodeName;
  LOBYTE(v113) = 6;
  for ( i = (unsigned int)akGaugeNodeName; ; v10 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)i )
  {
    if ( v10->_Myres >= 0x10 )
      v10 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v10->_Bx._Ptr;
    v11 = fs("%sGauge", v10);
    v12 = PgSprData::Create(pkObject, v11, &iLeft, &iTop, 0);
    v13 = v5->m_kBars._Myfirst;
    v13[v4] = PgWinBar::CreateWin(iLeft - iOffX, iTop - iOffY, v12, (PgWin *)&v5->vfptr, BGT_RIGHT);
    ((void (__stdcall *)(_DWORD))v5->m_kBars._Myfirst[v4]->vfptr[60].__vecDelDtor)(0);
    v14 = v5->m_kBars._Myfirst[v4];
    v15 = (PgWin *)&v5->m_kBars._Myfirst[v4]->vfptr;
    v107 = (PgWin *)&v5->m_kBarTexts._Myfirst[v4];
    v16 = Font::Get(0);
    v17 = ((int (__thiscall *)(PgWinBar *))v14->vfptr[37].__vecDelDtor)(v14);
    v18 = ((int (__thiscall *)(PgWinBar *))v14->vfptr[36].__vecDelDtor)(v14);
    v107->vfptr = (NiRefObjectVtbl *)PgWinText::CreateWin(0, 0, v18, v17, v16, v15, 0, 0);
    ((void (__stdcall *)(signed int))v5->m_kBarTexts._Myfirst[v4]->vfptr[122].__vecDelDtor)(6);
    ((void (__stdcall *)(void *))v5->m_kBarTexts._Myfirst[v4]->vfptr[118].__vecDelDtor)(&unk_98805F);
    ((void (__stdcall *)(_DWORD))v5->m_kBarTexts._Myfirst[v4]->vfptr[60].__vecDelDtor)(0);
    i += 28;
    ++v4;
    if ( v4 >= 6 )
      break;
  }
  akCheckNodeName[0]._Myres = 15;
  akCheckNodeName[0]._Mysize = 0;
  akCheckNodeName[0]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(akCheckNodeName, off_988094, 3u);
  LOBYTE(v113) = 7;
  akCheckNodeName[1]._Myres = 15;
  akCheckNodeName[1]._Mysize = 0;
  akCheckNodeName[1]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&akCheckNodeName[1], "S", 1u);
  LOBYTE(v113) = 8;
  akCheckNodeName[2]._Myres = 15;
  akCheckNodeName[2]._Mysize = 0;
  akCheckNodeName[2]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&akCheckNodeName[2], "A", 1u);
  LOBYTE(v113) = 9;
  akCheckNodeName[3]._Myres = 15;
  akCheckNodeName[3]._Mysize = 0;
  akCheckNodeName[3]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&akCheckNodeName[3], "B", 1u);
  LOBYTE(v113) = 10;
  akCheckNodeName[4]._Myres = 15;
  akCheckNodeName[4]._Mysize = 0;
  akCheckNodeName[4]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&akCheckNodeName[4], "C", 1u);
  LOBYTE(v113) = 11;
  v19 = TextData2::Get(0x284C2907u);
  v20 = v19;
  akCheckString[0]._Myres = 15;
  akCheckString[0]._Mysize = 0;
  akCheckString[0]._Bx._Buf[0] = 0;
  v107 = (PgWin *)((char *)&v19->vfptr + 1);
  do
  {
    v21 = (char)v20->vfptr;
    v20 = (NiUnsharedGeometryGroup *)((char *)v20 + 1);
  }
  while ( v21 );
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    akCheckString,
    (const char *)v19,
    (char *)v20 - (char *)v107);
  LOBYTE(v113) = 12;
  v22 = TextData2::Get(0x2659160Au);
  v23 = v22;
  akCheckString[1]._Myres = 15;
  akCheckString[1]._Mysize = 0;
  akCheckString[1]._Bx._Buf[0] = 0;
  v107 = (PgWin *)((char *)&v22->vfptr + 1);
  do
  {
    v24 = (char)v23->vfptr;
    v23 = (NiUnsharedGeometryGroup *)((char *)v23 + 1);
  }
  while ( v24 );
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &akCheckString[1],
    (const char *)v22,
    (char *)v23 - (char *)v107);
  LOBYTE(v113) = 13;
  v25 = TextData2::Get(0x1459160Au);
  v26 = v25;
  akCheckString[2]._Myres = 15;
  akCheckString[2]._Mysize = 0;
  akCheckString[2]._Bx._Buf[0] = 0;
  v107 = (PgWin *)((char *)&v25->vfptr + 1);
  do
  {
    v27 = (char)v26->vfptr;
    v26 = (NiUnsharedGeometryGroup *)((char *)v26 + 1);
  }
  while ( v27 );
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &akCheckString[2],
    (const char *)v25,
    (char *)v26 - (char *)v107);
  LOBYTE(v113) = 14;
  v28 = TextData2::Get(0x1559160Au);
  v29 = v28;
  akCheckString[3]._Myres = 15;
  akCheckString[3]._Mysize = 0;
  akCheckString[3]._Bx._Buf[0] = 0;
  v107 = (PgWin *)((char *)&v28->vfptr + 1);
  do
  {
    v30 = (char)v29->vfptr;
    v29 = (NiUnsharedGeometryGroup *)((char *)v29 + 1);
  }
  while ( v30 );
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &akCheckString[3],
    (const char *)v28,
    (char *)v29 - (char *)v107);
  LOBYTE(v113) = 15;
  v31 = TextData2::Get(0x1659160Au);
  v32 = v31;
  akCheckString[4]._Myres = 15;
  akCheckString[4]._Mysize = 0;
  akCheckString[4]._Bx._Buf[0] = 0;
  v107 = (PgWin *)((char *)&v31->vfptr + 1);
  do
  {
    v33 = (char)v32->vfptr;
    v32 = (NiUnsharedGeometryGroup *)((char *)v32 + 1);
  }
  while ( v33 );
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &akCheckString[4],
    (const char *)v31,
    (char *)v32 - (char *)v107);
  LOBYTE(v113) = 16;
  v34 = TextData2::Get(0x61ACD297u);
  v35 = v34;
  akCheckToolTip[0]._Myres = 15;
  akCheckToolTip[0]._Mysize = 0;
  akCheckToolTip[0]._Bx._Buf[0] = 0;
  v107 = (PgWin *)((char *)&v34->vfptr + 1);
  do
  {
    v36 = (char)v35->vfptr;
    v35 = (NiUnsharedGeometryGroup *)((char *)v35 + 1);
  }
  while ( v36 );
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    akCheckToolTip,
    (const char *)v34,
    (char *)v35 - (char *)v107);
  LOBYTE(v113) = 17;
  v37 = TextData2::Get(0x5DA17B46u);
  v38 = v37;
  akCheckToolTip[1]._Myres = 15;
  akCheckToolTip[1]._Mysize = 0;
  akCheckToolTip[1]._Bx._Buf[0] = 0;
  v107 = (PgWin *)((char *)&v37->vfptr + 1);
  do
  {
    v39 = (char)v38->vfptr;
    v38 = (NiUnsharedGeometryGroup *)((char *)v38 + 1);
  }
  while ( v39 );
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &akCheckToolTip[1],
    (const char *)v37,
    (char *)v38 - (char *)v107);
  LOBYTE(v113) = 18;
  v40 = TextData2::Get(0x5D8F7B46u);
  v41 = v40;
  akCheckToolTip[2]._Myres = 15;
  akCheckToolTip[2]._Mysize = 0;
  akCheckToolTip[2]._Bx._Buf[0] = 0;
  v107 = (PgWin *)((char *)&v40->vfptr + 1);
  do
  {
    v42 = (char)v41->vfptr;
    v41 = (NiUnsharedGeometryGroup *)((char *)v41 + 1);
  }
  while ( v42 );
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &akCheckToolTip[2],
    (const char *)v40,
    (char *)v41 - (char *)v107);
  LOBYTE(v113) = 19;
  v43 = TextData2::Get(0x5D907B46u);
  v44 = v43;
  akCheckToolTip[3]._Myres = 15;
  akCheckToolTip[3]._Mysize = 0;
  akCheckToolTip[3]._Bx._Buf[0] = 0;
  v107 = (PgWin *)((char *)&v43->vfptr + 1);
  do
  {
    v45 = (char)v44->vfptr;
    v44 = (NiUnsharedGeometryGroup *)((char *)v44 + 1);
  }
  while ( v45 );
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &akCheckToolTip[3],
    (const char *)v43,
    (char *)v44 - (char *)v107);
  LOBYTE(v113) = 20;
  v46 = TextData2::Get(0x5D917B46u);
  akCheckToolTip[4]._Myres = 15;
  akCheckToolTip[4]._Mysize = 0;
  akCheckToolTip[4]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &akCheckToolTip[4],
    (const char *)v46,
    strlen((const char *)v46));
  LOBYTE(v113) = 21;
  i = 0;
  v96 = 0;
  v107 = (PgWin *)5;
  do
  {
    v47 = &akCheckNodeName[v96];
    if ( *(unsigned int *)((char *)&akCheckNodeName[0]._Myres + v96 * 28) < 0x10 )
      v48 = &akCheckNodeName[v96];
    else
      v48 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v47->_Bx._Ptr;
    v49 = fs("%sRankNonSelect", v48);
    pkSprData = PgSprData::Create(pkObject, v49, &iLeft, &iTop, 0);
    if ( *(unsigned int *)((char *)&akCheckNodeName[0]._Myres + v96 * 28) < 0x10 )
      v50 = &akCheckNodeName[v96];
    else
      v50 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v47->_Bx._Ptr;
    v51 = fs("%sRankSelect", v50);
    PgSprData::Add(pkSprData, pkObject, v51);
    v52 = v5->m_kCheckGrades._Myfirst;
    v53 = i;
    v54 = ColumnBut::CreateWin(iLeft - iOffX, iTop - iOffY, pkSprData, (PgWin *)&v5->vfptr, 3u, 0);
    v55 = i;
    v52[v53] = v54;
    v5->m_kCheckGrades._Myfirst[v53]->m_nIndex = v55;
    v5->m_kCheckGrades._Myfirst[v53]->m_pkToolTipWin = g_pkToolTipWin;
    if ( *(unsigned int *)((char *)&akCheckToolTip[0]._Myres + v96 * 28) < 0x10 )
      v56 = &akCheckToolTip[v96];
    else
      v56 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)akCheckToolTip[v96]._Bx._Ptr;
    PgWin::SetToolTipWinText((PgWin *)&v5->m_kCheckGrades._Myfirst[v53]->vfptr, v56->_Bx._Buf);
    v57 = (PgWin *)&v5->m_kCheckGrades._Myfirst[v53]->vfptr;
    v58 = Font::Get(0);
    v59 = ((int (__thiscall *)(PgWin *))v57->vfptr[37].__vecDelDtor)(v57);
    v60 = ((int (__thiscall *)(PgWin *))v57->vfptr[36].__vecDelDtor)(v57);
    v61 = PgWinText::CreateWin(0, 0, v60, v59, v58, v57, 0, 0);
    v61->vfptr[122].__vecDelDtor((NiRefObject *)v61, 5u);
    if ( *(unsigned int *)((char *)&akCheckString[0]._Myres + v96 * 28) < 0x10 )
      v62 = &akCheckString[v96];
    else
      v62 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)akCheckString[v96]._Bx._Ptr;
    v61->vfptr[118].__vecDelDtor((NiRefObject *)v61, (unsigned int)v62);
    v61->vfptr[60].__vecDelDtor((NiRefObject *)v61, 0);
    ++i;
    v63 = v107 == (PgWin *)1;
    v107 = (PgWin *)((char *)v107 - 1);
    ++v96;
  }
  while ( !v63 );
  v64 = pkObject;
  if ( PgUtil::GetTriShapeRect(pkObject, "Text01", &iLeft, &iTop, &uiWidth, &uiHeight)
    && (v65 = Font::Get(0),
        v66 = PgWinText::CreateWin(iLeft - iOffX, iTop - iOffY, uiWidth, uiHeight, v65, (PgWin *)&v5->vfptr, 0, 0),
        v66->vfptr[122].__vecDelDtor((NiRefObject *)v66, 4u),
        v107 = (PgWin *)&v66->vfptr[118],
        v67 = TextData2::Get(0x42B25CC8u),
        ((void (__thiscall *)(_DWORD, _DWORD))v107->vfptr)(v66, v67),
        v66->vfptr[60].__vecDelDtor((NiRefObject *)v66, 0),
        PgUtil::GetTriShapeRect(v64, "Text02", &iLeft, &iTop, &uiWidth, &uiHeight)) )
  {
    v68 = Font::Get(0);
    v69 = PgWinText::CreateWin(iLeft - iOffX, iTop - iOffY, uiWidth, uiHeight, v68, (PgWin *)&v5->vfptr, 0, 0);
    v69->vfptr[122].__vecDelDtor((NiRefObject *)v69, 4u);
    v107 = (PgWin *)&v69->vfptr[118];
    v70 = TextData2::Get(0x153107Cu);
    ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))v107->vfptr)(v69, v70);
    v69->vfptr[60].__vecDelDtor((NiRefObject *)v69, 0);
    v71 = 0;
    do
    {
      pkObject = (NiAVObject *)(v71 + 1);
      v72 = fs("Card%02d", v71 + 1);
      if ( !PgUtil::GetTriShapeRect(v64, v72, &iLeft, &iTop, &uiWidth, &uiHeight) )
      {
        LOBYTE(v113) = 16;
        `eh vector destructor iterator'(
          akCheckToolTip,
          0x1Cu,
          5,
          (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
        LOBYTE(v113) = 11;
        `eh vector destructor iterator'(
          akCheckString,
          0x1Cu,
          5,
          (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
        LOBYTE(v113) = 6;
        `eh vector destructor iterator'(
          akCheckNodeName,
          0x1Cu,
          5,
          (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
        LOBYTE(v113) = 0;
        `eh vector destructor iterator'(
          akGaugeNodeName,
          0x1Cu,
          6,
          (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
        v113 = -1;
        if ( !InterlockedDecrement((volatile LONG *)&v64->m_uiRefCount) )
          v64->vfptr->__vecDelDtor((NiRefObject *)v64, 1u);
        return 0;
      }
      v107 = (PgWin *)&v5->m_kCardSlots._Myfirst[v71];
      v107->vfptr = (NiRefObjectVtbl *)CardSlotWin::CreateWin(
                                         iLeft - iOffX,
                                         iTop - iOffY,
                                         (PgWin *)&v5->vfptr,
                                         v71,
                                         0,
                                         0);
      ((void (__stdcall *)(unsigned int))v5->m_kCardSlots._Myfirst[v71]->vfptr[130].__vecDelDtor)(v71);
      ((void (__stdcall *)(unsigned int))v5->m_kCardSlots._Myfirst[v71]->vfptr[141].__vecDelDtor)(v71);
      v71 = (unsigned int)pkObject;
    }
    while ( (unsigned int)pkObject < 4 );
    if ( bPeeping )
    {
      (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v5->m_kBars._Myfirst + 5) + 256))(0);
      (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v5->m_kBarTexts._Myfirst + 5) + 256))(0);
      v73 = 0;
      do
      {
        v5->m_kCheckGrades._Myfirst[v73]->m_bCheck = 0;
        ((void (__stdcall *)(_DWORD))v5->m_kCheckGrades._Myfirst[v73]->vfptr[60].__vecDelDtor)(0);
        ++v73;
      }
      while ( v73 < 5 );
    }
    else
    {
      (*v5->m_kCheckGrades._Myfirst)->m_bCheck = 1;
      if ( !PgUtil::GetTriShapeRect(v64, "Text03", &iLeft, &iTop, &uiWidth, &uiHeight) )
        goto LABEL_48;
      v74 = Font::Get(0);
      v75 = PgWinText::CreateWin(iLeft - iOffX, iTop - iOffY, uiWidth, uiHeight, v74, (PgWin *)&v5->vfptr, 0, 0);
      v75->vfptr[122].__vecDelDtor((NiRefObject *)v75, 4u);
      v107 = (PgWin *)&v75->vfptr[118];
      v76 = TextData2::Get(0xC9F6430B);
      ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))v107->vfptr)(v75, v76);
      v75->vfptr[60].__vecDelDtor((NiRefObject *)v75, 0);
      v77 = PgSprData::Create(v64, "RwAll", &iLeft, &iTop, 0);
      v78 = PgWinSpr::CreateWin(iLeft - iOffX, iTop - iOffY, v77, (PgWin *)&v5->vfptr, 0, 0);
      v79 = Font::Get(0);
      v80 = ((int (__thiscall *)(PgWinSpr *))v78->vfptr[37].__vecDelDtor)(v78);
      v81 = ((int (__thiscall *)(PgWinSpr *))v78->vfptr[36].__vecDelDtor)(v78);
      v82 = PgWinText::CreateWin(0, 0, v81, v80, v79, (PgWin *)&v78->vfptr, 0, 0);
      v5->m_pkSelectGradeText = v82;
      v82->vfptr[122].__vecDelDtor((NiRefObject *)v82, 5u);
      v107 = (PgWin *)&v5->m_pkSelectGradeText->vfptr[118];
      v83 = TextData2::Get(0x284C2907u);
      ((void (__thiscall *)(_DWORD, _DWORD))v107->vfptr)(v5->m_pkSelectGradeText, v83);
      ((void (__stdcall *)(_DWORD))v5->m_pkSelectGradeText->vfptr[60].__vecDelDtor)(0);
      v84 = (NiAVObject **)CollectRwItemWin::CreateWin(
                             (NiNode *)v64,
                             "Reward02Able",
                             "Reward02Disable",
                             "Reward02Effect",
                             (PgWin *)&v5->vfptr,
                             1);
      v5->m_pkRewardItem = (CollectRwItemWin *)v84;
      pkObject = *v84;
      v85 = (PgWin *)((int (__thiscall *)(NiAVObject **))pkObject->m_kPropertyList.m_kAllocator.m_uiCount)(v84);
      v86 = v78->vfptr[37].__vecDelDtor;
      v107 = v85;
      v87 = ((int (__thiscall *)(PgWinSpr *))v86)(v78);
      ((void (__thiscall *)(CollectRwItemWin *, char *))pkObject[1].vfptr)(v5->m_pkRewardItem, (char *)v107 - v87);
      akRwBtnNodeName[0]._Myres = 15;
      akRwBtnNodeName[0]._Mysize = 0;
      akRwBtnNodeName[0]._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(akRwBtnNodeName, "Front", 5u);
      LOBYTE(v113) = 22;
      akRwBtnNodeName[1]._Myres = 15;
      akRwBtnNodeName[1]._Mysize = 0;
      akRwBtnNodeName[1]._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&akRwBtnNodeName[1], "Next", 4u);
      pkObject = 0;
      LOBYTE(v113) = 23;
      v88 = akRwBtnNodeName;
      do
      {
        if ( v88->_Myres < 0x10 )
          v89 = v88;
        else
          v89 = v88->_Bx._Ptr;
        v90 = fs("Rw%sNor", v89);
        pkSprDataa = PgSprData::Create(v64, v90, &iLeft, &iTop, 0);
        if ( v88->_Myres < 0x10 )
          v91 = v88;
        else
          v91 = v88->_Bx._Ptr;
        v92 = fs("Rw%sClick", v91);
        PgSprData::Add(pkSprDataa, v64, v92);
        if ( v88->_Myres < 0x10 )
          v93 = v88;
        else
          v93 = v88->_Bx._Ptr;
        v94 = fs("Rw%sOver", v93);
        PgSprData::Add(pkSprDataa, v64, v94);
        v95 = PgWinBut::CreateWin(iLeft - iOffX, iTop - iOffY, pkSprDataa, (PgWin *)&v5->vfptr, 2u, 0, 0);
        v95->vfptr[130].__vecDelDtor((NiRefObject *)v95, (unsigned int)pkObject);
        ++v88;
        pkObject = (NiAVObject *)((char *)pkObject + 1);
      }
      while ( (unsigned int)pkObject < 2 );
      LOBYTE(v113) = 21;
      `eh vector destructor iterator'(
        akRwBtnNodeName,
        0x1Cu,
        2,
        (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    }
    CollectMainWin::InitBar(v5);
    LOBYTE(v113) = 16;
    `eh vector destructor iterator'(
      akCheckToolTip,
      0x1Cu,
      5,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    LOBYTE(v113) = 11;
    `eh vector destructor iterator'(
      akCheckString,
      0x1Cu,
      5,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    LOBYTE(v113) = 6;
    `eh vector destructor iterator'(
      akCheckNodeName,
      0x1Cu,
      5,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    LOBYTE(v113) = 0;
    `eh vector destructor iterator'(
      akGaugeNodeName,
      0x1Cu,
      6,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    v113 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v64->m_uiRefCount) )
      v64->vfptr->__vecDelDtor((NiRefObject *)v64, 1u);
    result = 1;
  }
  else
  {
LABEL_48:
    LOBYTE(v113) = 16;
    `eh vector destructor iterator'(
      akCheckToolTip,
      0x1Cu,
      5,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    LOBYTE(v113) = 11;
    `eh vector destructor iterator'(
      akCheckString,
      0x1Cu,
      5,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    LOBYTE(v113) = 6;
    `eh vector destructor iterator'(
      akCheckNodeName,
      0x1Cu,
      5,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    LOBYTE(v113) = 0;
    `eh vector destructor iterator'(
      akGaugeNodeName,
      0x1Cu,
      6,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    v113 = -1;
    if ( InterlockedDecrement((volatile LONG *)&v64->m_uiRefCount) )
      return 0;
    v64->vfptr->__vecDelDtor((NiRefObject *)v64, 1u);
    result = 0;
  }
  return result;
}

//----- (004EFA40) --------------------------------------------------------
void __thiscall CollectMainWin::UpdateCheckBox(CollectMainWin *this)
{
  CollectMainWin *v1; // edi@1
  ColumnBut *v2; // eax@1
  int v3; // eax@3
  int v4; // eax@5
  int v5; // eax@7
  int v6; // eax@9
  ColumnBut *v7; // eax@11
  unsigned int v8; // eax@14
  NiUnsharedGeometryGroup *v9; // eax@15
  NiUnsharedGeometryGroup *v10; // ecx@15
  int v11; // esi@15
  char v12; // dl@16
  char v13; // dl@19
  char v14; // dl@22
  char v15; // dl@25
  char v16; // dl@28
  void *v17; // eax@29
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kGradeString; // [sp+10h] [bp-2Ch]@14
  int v19; // [sp+38h] [bp-4h]@14

  v1 = this;
  v2 = *this->m_kCheckGrades._Myfirst;
  if ( v2 )
    v2->m_bCheck = 0;
  v3 = *((_DWORD *)this->m_kCheckGrades._Myfirst + 1);
  if ( v3 )
    *(_BYTE *)(v3 + 380) = 0;
  v4 = *((_DWORD *)this->m_kCheckGrades._Myfirst + 2);
  if ( v4 )
    *(_BYTE *)(v4 + 380) = 0;
  v5 = *((_DWORD *)this->m_kCheckGrades._Myfirst + 3);
  if ( v5 )
    *(_BYTE *)(v5 + 380) = 0;
  v6 = *((_DWORD *)this->m_kCheckGrades._Myfirst + 4);
  if ( v6 )
    *(_BYTE *)(v6 + 380) = 0;
  v7 = this->m_kCheckGrades._Myfirst[this->m_uiRewardGrade];
  if ( v7 )
    v7->m_bCheck = 1;
  if ( this->m_pkSelectGradeText )
  {
    kGradeString._Myres = 15;
    kGradeString._Mysize = 0;
    kGradeString._Bx._Buf[0] = 0;
    v8 = this->m_uiRewardGrade;
    v19 = 0;
    switch ( v8 )
    {
      case 0u:
        v9 = TextData2::Get(0x284C2907u);
        v10 = v9;
        v11 = (int)&v9->vfptr + 1;
        do
        {
          v12 = (char)v10->vfptr;
          v10 = (NiUnsharedGeometryGroup *)((char *)v10 + 1);
        }
        while ( v12 );
        goto LABEL_29;
      case 1u:
        v9 = TextData2::Get(0x2659160Au);
        v10 = v9;
        v11 = (int)&v9->vfptr + 1;
        do
        {
          v13 = (char)v10->vfptr;
          v10 = (NiUnsharedGeometryGroup *)((char *)v10 + 1);
        }
        while ( v13 );
        goto LABEL_29;
      case 2u:
        v9 = TextData2::Get(0x1459160Au);
        v10 = v9;
        v11 = (int)&v9->vfptr + 1;
        do
        {
          v14 = (char)v10->vfptr;
          v10 = (NiUnsharedGeometryGroup *)((char *)v10 + 1);
        }
        while ( v14 );
        goto LABEL_29;
      case 3u:
        v9 = TextData2::Get(0x1559160Au);
        v10 = v9;
        v11 = (int)&v9->vfptr + 1;
        do
        {
          v15 = (char)v10->vfptr;
          v10 = (NiUnsharedGeometryGroup *)((char *)v10 + 1);
        }
        while ( v15 );
        goto LABEL_29;
      case 4u:
        v9 = TextData2::Get(0x1659160Au);
        v10 = v9;
        v11 = (int)&v9->vfptr + 1;
        do
        {
          v16 = (char)v10->vfptr;
          v10 = (NiUnsharedGeometryGroup *)((char *)v10 + 1);
        }
        while ( v16 );
LABEL_29:
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &kGradeString,
          (const char *)v9,
          (unsigned int)v10 - v11);
        v17 = kGradeString._Bx._Ptr;
        if ( kGradeString._Myres < 0x10 )
          goto LABEL_30;
        break;
      default:
LABEL_30:
        v17 = &kGradeString;
        break;
    }
    ((void (__stdcall *)(void *))v1->m_pkSelectGradeText->vfptr[118].__vecDelDtor)(v17);
    if ( kGradeString._Myres >= 0x10 )
      operator delete(kGradeString._Bx._Ptr);
  }
}

//----- (004EFC30) --------------------------------------------------------
void __thiscall CollectWin::SetNewest(CollectWin *this, int tRegistTime, unsigned int uiCardID)
{
  char *v3; // esi@1
  std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *v4; // ecx@1
  std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *v5; // eax@1
  std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *v6; // edi@4
  std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *v7; // ST04_4@4
  std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *v8; // eax@4
  int v9; // ecx@4
  CollectWin::sNewestInfo kNewestInfo; // [sp+4h] [bp-8h]@4

  v3 = (char *)&this->m_kNewestInfos;
  v4 = (std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *)this->m_kNewestInfos._Myhead;
  v5 = v4->_Next;
  if ( v4->_Next == v4 )
  {
LABEL_4:
    v6 = v4;
    kNewestInfo.m_uiCardID = uiCardID;
    v7 = v4->_Prev;
    kNewestInfo.m_tRegistTime = tRegistTime;
    v8 = std::_List_val<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>::_Buynode(
           v4,
           v7,
           (GameFrameWork::AttackedMsg::AttackedFrom *)&kNewestInfo);
    v9 = *((_DWORD *)v3 + 1);
    if ( (unsigned int)(536870910 - v9) < 1 )
      std::_Xlength_error("list<T> too long");
    *((_DWORD *)v3 + 1) = v9 + 1;
    v6->_Prev = v8;
    v8->_Prev->_Next = v8;
  }
  else
  {
    while ( LODWORD(v5->_Myval.m_fAttackedTime) != uiCardID )
    {
      v5 = v5->_Next;
      if ( v5 == v4 )
        goto LABEL_4;
    }
    *(_DWORD *)&v5->_Myval.m_kAttacker = tRegistTime;
  }
}

//----- (004EFCC0) --------------------------------------------------------
void __userpurge CollectCardListWin::OnSelectCard(CollectCardListWin *this@<ecx>, double a2@<st0>, unsigned int uiSlotIndex)
{
  CardSlotWin *v3; // eax@1
  unsigned int v4; // edi@1
  unsigned int v5; // ebx@1
  unsigned int v6; // esi@1
  GameFrameWork *v7; // eax@3
  int v8; // eax@5
  unsigned int v9; // edi@6
  unsigned int v10; // esi@8
  char *v11; // eax@9
  int v12; // esi@13
  char *v13; // edi@14
  const char *v14; // eax@16
  char *v15; // ST10_4@17
  char *v16; // eax@17
  char *v17; // edi@18
  const char *v18; // ebx@19
  unsigned int v19; // eax@19
  const char *v20; // edx@19
  void *v21; // eax@22
  int v22; // edi@26
  NiUnsharedGeometryGroup *v23; // eax@26
  char *pcText; // [sp+10h] [bp-40h]@15
  PgFont *pkFont; // [sp+18h] [bp-38h]@15
  CollectCardListWin *iPixelSize; // [sp+1Ch] [bp-34h]@1
  signed int iPixelSizea; // [sp+1Ch] [bp-34h]@15
  int tRegistTime; // [sp+20h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kSubNameValText; // [sp+24h] [bp-2Ch]@15
  int v30; // [sp+4Ch] [bp-4h]@15

  iPixelSize = this;
  v3 = this->m_kCardSlots._Myfirst[uiSlotIndex];
  v4 = 0;
  v5 = 0;
  v6 = 0;
  tRegistTime = 0;
  if ( v3 )
  {
    v5 = v3->m_uiCardID;
    v6 = v3->m_uiStar;
    v4 = v3->m_uiSerial;
    tRegistTime = v3->m_tRegistTime;
  }
  v7 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v7 )
    GameFrameWork::OpenCollectCardWin(v7, a2, 1, v5, v6, v4, tRegistTime == 0);
  v8 = *(_DWORD *)(ITableBase<CollectCard,CollectCardTab>::ms_pkTable + 56);
  if ( v8 )
    v9 = *(_DWORD *)(v8 + 40);
  else
    v9 = 0;
  v10 = 0;
  if ( v9 )
  {
    while ( 1 )
    {
      v11 = CDataReader::GetRecord((CDataReader *)(ITableBase<CollectCard,CollectCardTab>::ms_pkTable + 4), v10);
      if ( v11 )
      {
        if ( *(_WORD *)v11 == (_WORD)v5 )
          break;
      }
      if ( ++v10 >= v9 )
        return;
    }
    v12 = *((_DWORD *)iPixelSize->m_kRewardTexts._Myfirst + 3);
    if ( v12 )
    {
      v13 = (char *)CollectCardTitleTab::GetByItemInx(v11 + 2);
      if ( v13 )
      {
        kSubNameValText._Myres = 15;
        kSubNameValText._Mysize = 0;
        kSubNameValText._Bx._Buf[0] = 0;
        v30 = 0;
        fs(0);
        fs(0);
        pcText = fs(0);
        pkFont = *(PgFont **)(*(_DWORD *)(v12 + 288) + 312);
        iPixelSizea = (signed int)((double)(unsigned int)(*(int (__thiscall **)(int))(*(_DWORD *)v12 + 144))(v12)
                                 / 1.049999952316284);
        if ( tRegistTime )
        {
          v15 = CCharacterTitleData::GetTitleString(&g_characterTitleData, *v13, 0);
          v16 = (char *)TextData2::Get(0x6C8A69A3u);
          v14 = fs(v16, v15);
        }
        else
        {
          v14 = (const char *)TextData2::Get(0x58935FB7u);
        }
        v17 = (char *)v14;
        if ( strlen(v14) )
        {
          do
          {
            v18 = CSpFont::SplitStrByPixelSize((CSpFont *)&pkFont->vfptr, v17, iPixelSizea, 0);
            strncpy(pcText, v17, v18 - v17);
            pcText[v18 - v17] = 0;
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
              &kSubNameValText,
              pcText,
              strlen(pcText));
            v19 = strlen(v18);
            v20 = "\n";
            if ( !v19 )
              v20 = (const char *)&unk_988077;
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
              &kSubNameValText,
              v20,
              strlen(v20));
            v17 = (char *)v18;
          }
          while ( strlen(v18) );
        }
        v21 = kSubNameValText._Bx._Ptr;
        if ( kSubNameValText._Myres < 0x10 )
          v21 = &kSubNameValText;
        (*(void (__thiscall **)(int, void *))(*(_DWORD *)v12 + 472))(v12, v21);
        if ( kSubNameValText._Myres >= 0x10 )
          operator delete(kSubNameValText._Bx._Ptr);
      }
      else
      {
        v22 = *(_DWORD *)v12;
        v23 = TextData2::Get(0xD6502307);
        (*(void (__thiscall **)(int, NiUnsharedGeometryGroup *))(v22 + 472))(v12, v23);
      }
    }
  }
}
// A8C210: using guessed type int ITableBase<CollectCard,CollectCardTab>::ms_pkTable;

//----- (004EFF70) --------------------------------------------------------
void __thiscall CollectCardListWin::OnRegistBookmark(CollectCardListWin *this, unsigned int uiSlotIndex)
{
  PgWin *v2; // eax@1
  PgWin *v3; // ebx@1
  CollectCardChoiceWin *v4; // edi@2
  CollectPageWin *v5; // eax@3
  unsigned int v6; // esi@3
  CollectWin::sCardInfo *v7; // ebx@5
  int *v8; // esi@6
  int v9; // ecx@7
  std::vector<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo> > kCardInfos; // [sp+10h] [bp-20h]@5
  CollectCardListWin *v11; // [sp+20h] [bp-10h]@1
  int v12; // [sp+2Ch] [bp-4h]@5
  unsigned int uiSlotIndexa; // [sp+38h] [bp+8h]@6

  v11 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  v3 = v2;
  if ( v2 )
  {
    v4 = (CollectCardChoiceWin *)LODWORD(v2[1].m_kWorld.m_Rotate.m_pEntry[2][0]);
    if ( v4 )
    {
      v5 = v11->m_pkPageWin;
      v6 = 0;
      if ( v5 )
        v6 = uiSlotIndex + 12 * v5->m_uiPage;
      CollectCardChoiceWin::ClearInfo((CollectCardChoiceWin *)LODWORD(v3[1].m_kWorld.m_Rotate.m_pEntry[2][0]));
      v4->m_uiBookmarkSlot = v6;
      std::vector<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo>>::vector<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo>>(
        &kCardInfos,
        (std::vector<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo> > *)&v3[1].m_kLocal.m_fScale);
      v7 = kCardInfos._Myfirst;
      v12 = 0;
      if ( kCardInfos._Mylast - kCardInfos._Myfirst )
      {
        v8 = &kCardInfos._Myfirst->m_tRegistTime;
        uiSlotIndexa = kCardInfos._Mylast - kCardInfos._Myfirst;
        do
        {
          v9 = *v8;
          v11 = (CollectCardListWin *)*v8;
          if ( (double)(signed int)v11 > 0.0 )
            CollectCardChoiceWin::InsertInfo(v4, *(v8 - 4), *(v8 - 3), *(v8 - 2), *(v8 - 1), v9);
          v8 += 5;
          --uiSlotIndexa;
        }
        while ( uiSlotIndexa );
      }
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v4->vfptr);
      PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)&v4->vfptr);
      if ( v7 )
        operator delete(v7);
    }
  }
}

//----- (004F0090) --------------------------------------------------------
void __thiscall CollectCardListWin::OnChangeBookmark(CollectCardListWin *this)
{
  CollectCardListWin::OnRegistBookmark(this, this->m_uiSelectBookmarkSlot);
}

//----- (004F00A0) --------------------------------------------------------
void __thiscall CollectCardListWin::SetReward(CollectCardListWin *this, unsigned int uiRewardID, unsigned int uiCount, unsigned int uiRegistCount)
{
  CollectCardListWin *v4; // esi@1
  char *v5; // eax@4
  char *v6; // eax@6
  unsigned int v7; // edi@7
  PgWinText *v8; // ecx@8
  int v9; // eax@11
  unsigned int v10; // ebx@11
  unsigned int v11; // edi@13
  char *v12; // eax@14
  int v13; // esi@20
  char *v14; // eax@21
  char *v15; // edi@21
  const char *v16; // ebx@22
  unsigned int v17; // eax@22
  const char *v18; // edx@22
  void *v19; // eax@25
  unsigned int v20; // [sp-8h] [bp-58h]@4
  unsigned int v21; // [sp-4h] [bp-54h]@4
  char *pcText; // [sp+10h] [bp-40h]@21
  PgFont *pkFont; // [sp+18h] [bp-38h]@21
  int iPixelSize; // [sp+1Ch] [bp-34h]@11
  signed int iPixelSizea; // [sp+1Ch] [bp-34h]@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kConditionValText; // [sp+24h] [bp-2Ch]@21
  int v27; // [sp+4Ch] [bp-4h]@21

  v4 = this;
  CollectCardListWin::ResetReward(this);
  if ( uiRewardID )
  {
    if ( v4->m_pkRewardItem )
    {
      ((void (__stdcall *)(signed int))v4->m_pkRewardItem->vfptr[64].__vecDelDtor)(1);
      v4->m_pkRewardItem->m_uiRewardID = uiRewardID;
      CollectRwItemWin::SetState(v4->m_pkRewardItem, (CollectRwItemWin::eRewardStateType)(uiRegistCount >= uiCount));
      if ( uiRegistCount >= uiCount )
      {
        v21 = uiCount;
        v20 = uiRegistCount;
        v5 = (char *)TextData2::Get(0x80AA90B8);
      }
      else
      {
        v21 = uiCount;
        v20 = uiRegistCount;
        v5 = (char *)TextData2::Get(0x1FAC8854u);
      }
      v6 = fs(v5, v20, v21);
      PgWin::SetToolTipWinText((PgWin *)&v4->m_pkRewardItem->vfptr, v6);
    }
    v7 = 0;
    do
    {
      v8 = v4->m_kRewardTexts._Myfirst[v7];
      if ( v8 )
        ((void (__stdcall *)(signed int))v8->vfptr[64].__vecDelDtor)(1);
      ++v7;
    }
    while ( v7 < 4 );
    v9 = *(_DWORD *)(ITableBase<CollectCardReward,CollectCardRewardTab>::ms_pkTable + 56);
    v10 = 0;
    iPixelSize = 0;
    if ( v9 )
      v10 = *(_DWORD *)(v9 + 40);
    v11 = 0;
    if ( v10 )
    {
      do
      {
        v12 = CDataReader::GetRecord(
                (CDataReader *)(ITableBase<CollectCardReward,CollectCardRewardTab>::ms_pkTable + 4),
                v11);
        if ( v12 && *(_WORD *)v12 == (_WORD)uiRewardID )
        {
          if ( !iPixelSize )
          {
            v13 = *((_DWORD *)v4->m_kRewardTexts._Myfirst + 2);
            if ( v13 )
            {
              kConditionValText._Myres = 15;
              kConditionValText._Mysize = 0;
              kConditionValText._Bx._Buf[0] = 0;
              v27 = 0;
              fs(0);
              fs(0);
              pcText = fs(0);
              pkFont = *(PgFont **)(*(_DWORD *)(v13 + 288) + 312);
              iPixelSizea = (signed int)((double)(unsigned int)(*(int (__thiscall **)(int))(*(_DWORD *)v13 + 144))(v13)
                                       / 1.049999952316284);
              v14 = (char *)TextData2::Get(0xCA4E0B0B);
              v15 = fs(v14, uiCount);
              if ( strlen(v15) )
              {
                do
                {
                  v16 = CSpFont::SplitStrByPixelSize((CSpFont *)&pkFont->vfptr, v15, iPixelSizea, 0);
                  strncpy(pcText, v15, v16 - v15);
                  pcText[v16 - v15] = 0;
                  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
                    &kConditionValText,
                    pcText,
                    strlen(pcText));
                  v17 = strlen(v16);
                  v18 = "\n";
                  if ( !v17 )
                    v18 = (const char *)&unk_98807E;
                  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
                    &kConditionValText,
                    v18,
                    strlen(v18));
                  v15 = (char *)v16;
                }
                while ( strlen(v16) );
              }
              v19 = kConditionValText._Bx._Ptr;
              if ( kConditionValText._Myres < 0x10 )
                v19 = &kConditionValText;
              (*(void (__thiscall **)(int, void *))(*(_DWORD *)v13 + 472))(v13, v19);
              if ( kConditionValText._Myres >= 0x10 )
                operator delete(kConditionValText._Bx._Ptr);
            }
            return;
          }
          ++iPixelSize;
        }
        ++v11;
      }
      while ( v11 < v10 );
    }
  }
}
// A8C21C: using guessed type int ITableBase<CollectCardReward,CollectCardRewardTab>::ms_pkTable;

//----- (004F0360) --------------------------------------------------------
void __thiscall CollectWin::CollectWin(CollectWin *this)
{
  CollectWin *v1; // esi@1
  std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *v2; // eax@1
  std::exception pExceptionObject; // [sp+Ch] [bp-20h]@3
  CollectWin *v4; // [sp+18h] [bp-14h]@1
  char *_What; // [sp+1Ch] [bp-10h]@3
  int v6; // [sp+28h] [bp-4h]@1

  v1 = this;
  v4 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&CollectWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CollectWin::`vftable'{for `IDirectMessenger'};
  v6 = 0;
  v1->m_kNewestInfos._Mysize = 0;
  v2 = (std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *)operator new(0x10u);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_kNewestInfos._Myhead = v2;
  v2->_Next = v2;
  v1->m_kNewestInfos._Myhead->_Prev = v1->m_kNewestInfos._Myhead;
  v1->m_kBookmarkInfos._Myfirst = 0;
  v1->m_kBookmarkInfos._Mylast = 0;
  v1->m_kBookmarkInfos._Myend = 0;
  v1->m_kRewardInfos._Myfirst = 0;
  v1->m_kRewardInfos._Mylast = 0;
  v1->m_kRewardInfos._Myend = 0;
  v1->m_kCardInfos._Myfirst = 0;
  v1->m_kCardInfos._Mylast = 0;
  v1->m_kCardInfos._Myend = 0;
  v1->m_pkMainWin = 0;
  v1->m_pkCardListWin = 0;
  v1->m_pkRwChoiceWin = 0;
  v1->m_pkCardChoiceWin = 0;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 988794: using guessed type void (__thiscall *CollectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9887B4: using guessed type int (__thiscall *CollectWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F0460) --------------------------------------------------------
void __thiscall CollectWin::~CollectWin(CollectWin *this)
{
  CollectWin *v1; // esi@1
  void **v2; // ecx@7
  std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *v3; // eax@7
  std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *v4; // edi@8

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&CollectWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CollectWin::`vftable'{for `IDirectMessenger'};
  if ( this->m_kCardInfos._Myfirst )
    operator delete(this->m_kCardInfos._Myfirst);
  v1->m_kCardInfos._Myfirst = 0;
  v1->m_kCardInfos._Mylast = 0;
  v1->m_kCardInfos._Myend = 0;
  if ( v1->m_kRewardInfos._Myfirst )
    operator delete(v1->m_kRewardInfos._Myfirst);
  v1->m_kRewardInfos._Myfirst = 0;
  v1->m_kRewardInfos._Mylast = 0;
  v1->m_kRewardInfos._Myend = 0;
  if ( v1->m_kBookmarkInfos._Myfirst )
    operator delete(v1->m_kBookmarkInfos._Myfirst);
  v1->m_kBookmarkInfos._Myfirst = 0;
  v1->m_kBookmarkInfos._Mylast = 0;
  v1->m_kBookmarkInfos._Myend = 0;
  v2 = (void **)&v1->m_kNewestInfos._Myhead->_Next;
  v3 = (std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *)*v2;
  *v2 = v2;
  v1->m_kNewestInfos._Myhead->_Prev = v1->m_kNewestInfos._Myhead;
  v1->m_kNewestInfos._Mysize = 0;
  if ( v3 != v1->m_kNewestInfos._Myhead )
  {
    do
    {
      v4 = v3->_Next;
      operator delete(v3);
      v3 = v4;
    }
    while ( v4 != v1->m_kNewestInfos._Myhead );
  }
  operator delete(v1->m_kNewestInfos._Myhead);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 988794: using guessed type void (__thiscall *CollectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9887B4: using guessed type int (__thiscall *CollectWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F0540) --------------------------------------------------------
CollectWin *__cdecl CollectWin::CreateWin(PgFrameWork *pkFrameWork, int bPeeping)
{
  PgWin *v2; // eax@1
  PgWin *v3; // eax@2
  PgWin *v4; // esi@2
  PgWin *v5; // edi@8
  CollectWin *v6; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v2 = (PgWin *)operator new(0x1ACu);
  result.m_pObject = v2;
  v8 = 0;
  if ( v2 )
  {
    CollectWin::CollectWin((CollectWin *)v2);
    v4 = v3;
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v8 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v4);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, PgFrameWork *, int))v4->vfptr[135].__vecDelDtor)(
                          v4,
                          pkFrameWork,
                          bPeeping) )
  {
    ((void (__thiscall *)(PgWin *))v4->vfptr[89].__vecDelDtor)(v4);
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = (CollectWin *)v4;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v4);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = 0;
  }
  return v6;
}

//----- (004F0670) --------------------------------------------------------
void __thiscall CollectWin::InitNewestInfo(CollectWin *this)
{
  std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>::resize(&this->m_kNewestInfos, 0);
}

//----- (004F0680) --------------------------------------------------------
void __userpurge CollectCardListWin::OnCommand(CollectCardListWin *this@<ecx>, double a2@<st0>, unsigned int wParam, int lParam)
{
  PgWin *v4; // eax@2
  PgWin *v5; // eax@3

  switch ( wParam )
  {
    case 0u:
      v4 = PgWin::GetParentWin((PgWin *)&this->vfptr);
      PgWin::PostMsg(v4, 5u, 3u, 0);
      break;
    case 1u:
      v5 = PgWin::GetParentWin((PgWin *)&this->vfptr);
      PgWin::PostMsg(v5, 5u, 4u, lParam);
      break;
    case 2u:
      CollectCardListWin::OnSelectCard(this, a2, lParam);
      break;
    case 3u:
      CollectCardListWin::OnSelectRewardItem(this);
      break;
    case 4u:
      CollectCardListWin::OnRegistBookmark(this, lParam);
      break;
    case 5u:
      CollectCardListWin::OnPopupCardMenu(this, lParam);
      break;
    default:
      return;
  }
}

//----- (004F0720) --------------------------------------------------------
void __thiscall CollectCardListWin::DirectMessage(CollectCardListWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  CollectCardListWin *v4; // edi@1
  GameFrameWork *v5; // eax@3
  float v6; // edx@4
  unsigned int v7; // esi@4

  v4 = this;
  if ( iMsgTag == 77 )
  {
    CollectCardListWin::OnRegistBookmark(
      (CollectCardListWin *)((char *)this - 232),
      LODWORD(this->m_kWorld.m_Rotate.m_pEntry[2][0]));
  }
  else if ( iMsgTag == 78 )
  {
    v5 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v5 )
    {
      v6 = v4->m_kLocal.m_Rotate.m_pEntry[1][1];
      v7 = 0;
      if ( v6 != 0.0 )
        v7 = LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[2][0]) + 12 * *(_DWORD *)(LODWORD(v6) + 344);
      GameFrameWork::NcCollectBookmarkRegistReq(v5, v7, 0);
    }
  }
}

//----- (004F0790) --------------------------------------------------------
void __thiscall CollectWin::InitRewardInfo(CollectWin *this)
{
  int v1; // eax@1
  unsigned int v2; // esi@1
  int v3; // edi@1
  char *v4; // eax@5
  char *v5; // ebx@5
  unsigned int v6; // edx@7
  unsigned int v7; // edi@7
  unsigned int v8; // eax@7
  unsigned int v9; // ecx@8
  char *v10; // edi@9
  CollectWin::sRewardInfo *v11; // eax@11
  unsigned int v12; // edi@11
  CollectWin::sRewardInfo *v13; // eax@15
  unsigned int v14; // ecx@16
  unsigned int v15; // edx@16
  int v16; // ecx@16
  CollectWin *v17; // [sp+8h] [bp-20h]@1
  unsigned int i; // [sp+Ch] [bp-1Ch]@4
  unsigned int v19; // [sp+10h] [bp-18h]@2
  CollectWin::sRewardInfo kRewardInfo; // [sp+14h] [bp-14h]@7

  v1 = *(_DWORD *)(ITableBase<CollectCardReward,CollectCardRewardTab>::ms_pkTable + 56);
  v2 = 0;
  v3 = 0;
  v17 = this;
  if ( v1 )
    v19 = *(_DWORD *)(v1 + 40);
  else
    v19 = 0;
  i = 0;
  if ( v19 > 0 )
  {
    do
    {
      v4 = CDataReader::GetRecord(
             (CDataReader *)(ITableBase<CollectCardReward,CollectCardRewardTab>::ms_pkTable + 4),
             v2);
      v5 = v4;
      if ( v4 && v3 != *(_WORD *)v4 )
      {
        v6 = *((_WORD *)v4 + 3);
        v7 = *(_DWORD *)(v4 + 2);
        kRewardInfo.m_uiRewardID = *(_WORD *)v4;
        v8 = (unsigned int)&v17->m_kRewardInfos._Mylast->m_uiRewardGrade;
        kRewardInfo.m_uiRewardGrade = v7;
        kRewardInfo.m_uiCount = v6;
        kRewardInfo.m_bCompleted = 0;
        if ( (unsigned int)&kRewardInfo >= v8
          || (v9 = (unsigned int)&v17->m_kRewardInfos._Myfirst->m_uiRewardGrade, v9 > (unsigned int)&kRewardInfo) )
        {
          if ( (CollectWin::sRewardInfo *)v8 == v17->m_kRewardInfos._Myend )
            std::vector<NiColorA,std::allocator<NiColorA>>::_Reserve(
              (std::vector<NiColorA,std::allocator<NiColorA> > *)&v17->m_kRewardInfos,
              1u);
          v13 = v17->m_kRewardInfos._Mylast;
          if ( v13 )
          {
            v14 = kRewardInfo.m_uiRewardID;
            v15 = kRewardInfo.m_uiCount;
            v13->m_uiRewardGrade = v7;
            v13->m_uiRewardID = v14;
            v16 = *(_DWORD *)&kRewardInfo.m_bCompleted;
            v13->m_uiCount = v15;
            *(_DWORD *)&v13->m_bCompleted = v16;
          }
        }
        else
        {
          v10 = (char *)&kRewardInfo - v9;
          if ( (CollectWin::sRewardInfo *)v8 == v17->m_kRewardInfos._Myend )
            std::vector<NiColorA,std::allocator<NiColorA>>::_Reserve(
              (std::vector<NiColorA,std::allocator<NiColorA> > *)&v17->m_kRewardInfos,
              1u);
          v11 = v17->m_kRewardInfos._Mylast;
          v12 = (unsigned int)&v17->m_kRewardInfos._Myfirst->m_uiRewardGrade + ((unsigned int)v10 & 0xFFFFFFF0);
          if ( v11 )
          {
            v11->m_uiRewardGrade = *(_DWORD *)v12;
            v11->m_uiRewardID = *(_DWORD *)(v12 + 4);
            v11->m_uiCount = *(_DWORD *)(v12 + 8);
            *(_DWORD *)&v11->m_bCompleted = *(_DWORD *)(v12 + 12);
          }
        }
        ++v17->m_kRewardInfos._Mylast;
        v3 = *(_WORD *)v5;
        v2 = i;
      }
      i = ++v2;
    }
    while ( v2 < v19 );
  }
}
// A8C21C: using guessed type int ITableBase<CollectCardReward,CollectCardRewardTab>::ms_pkTable;

//----- (004F08D0) --------------------------------------------------------
void __thiscall CollectWin::InitCardInfo(CollectWin *this)
{
  int v1; // eax@1
  unsigned int v2; // ebx@1
  unsigned int v3; // esi@2
  char *v4; // edi@4
  int v5; // esi@5
  char *v6; // eax@6
  unsigned int v7; // [sp+Ch] [bp-4h]@2

  v1 = *(_DWORD *)(ITableBase<CollectCard,CollectCardTab>::ms_pkTable + 56);
  v2 = 0;
  if ( v1 )
  {
    v3 = *(_DWORD *)(v1 + 40);
    v7 = *(_DWORD *)(v1 + 40);
  }
  else
  {
    v7 = 0;
    v3 = 0;
  }
  v4 = (char *)&this->m_kCardInfos;
  std::vector<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo>>::resize(&this->m_kCardInfos, v3);
  if ( v3 > 0 )
  {
    v5 = 0;
    do
    {
      v6 = CDataReader::GetRecord((CDataReader *)(ITableBase<CollectCard,CollectCardTab>::ms_pkTable + 4), v2);
      if ( v6 )
      {
        *(_DWORD *)(v5 + *(_DWORD *)v4) = *(_DWORD *)(v6 + 34);
        *(_DWORD *)(v5 + *(_DWORD *)v4 + 4) = *(_WORD *)v6;
        *(_DWORD *)(v5 + *(_DWORD *)v4 + 8) = 0;
        *(_DWORD *)(v5 + *(_DWORD *)v4 + 12) = 0;
        *(_DWORD *)(v5 + *(_DWORD *)v4 + 16) = 0;
      }
      ++v2;
      v5 += 20;
    }
    while ( v2 < v7 );
  }
}
// A8C210: using guessed type int ITableBase<CollectCard,CollectCardTab>::ms_pkTable;

//----- (004F0950) --------------------------------------------------------
void __thiscall CollectWin::UpdateGrade(CollectWin *this, unsigned int uiGrade)
{
  CollectWin *v2; // esi@1
  CollectCardListWin *v3; // eax@1
  signed int v4; // ecx@2
  CollectWin::sRewardInfo *v5; // ebx@7
  unsigned int v6; // eax@7
  unsigned int v7; // edx@7
  CollectWin::sRewardInfo *v8; // edi@8
  CollectPageWin *v9; // eax@13
  int v10; // ebx@13
  unsigned int v11; // edi@14
  int v12; // ebx@15
  CollectWin::sCardInfo *v13; // edi@16
  unsigned int v14; // ecx@16
  int i; // eax@16
  CollectWin::sCardInfo *v16; // eax@23
  bool v17; // zf@23
  int v18; // ecx@23
  CollectWin::sCardInfo *v19; // edx@25
  unsigned int v20; // ebx@29
  unsigned int v21; // eax@29
  unsigned int v22; // ecx@29
  char *v23; // edi@29
  unsigned int v24; // ecx@32
  unsigned int v25; // edx@32
  CardSlotWin *v26; // eax@32
  CardSlotWin *v27; // esi@32
  unsigned int v28; // edx@32
  unsigned int v29; // ecx@34
  NiRefObjectVtbl **v30; // esi@34
  NiRefObjectVtbl *v31; // edx@36
  unsigned int v32; // eax@36
  NiRefObjectVtbl **v33; // ecx@36
  CollectCardListWin *v34; // esi@38
  CardSlotWin *v35; // ecx@38
  std::vector<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo> > kCardInfo; // [sp+10h] [bp-40h]@23
  unsigned int uiSerial; // [sp+20h] [bp-30h]@32
  unsigned int uiCardCount; // [sp+24h] [bp-2Ch]@29
  CollectWin *v39; // [sp+28h] [bp-28h]@1
  unsigned int uiStar; // [sp+2Ch] [bp-24h]@32
  int tRegistTime; // [sp+30h] [bp-20h]@32
  unsigned int v42; // [sp+34h] [bp-1Ch]@29
  CardSlotWin *v43; // [sp+38h] [bp-18h]@32
  unsigned int uiCardID; // [sp+3Ch] [bp-14h]@24
  int v45; // [sp+4Ch] [bp-4h]@23

  v2 = this;
  v3 = this->m_pkCardListWin;
  v39 = this;
  if ( v3 )
  {
    v4 = 0;
    switch ( uiGrade )
    {
      case 0u:
        v4 = 1;
        break;
      case 1u:
        v4 = 2;
        break;
      case 2u:
        v4 = 3;
        break;
      case 3u:
        v4 = 4;
        break;
      default:
        break;
    }
    v5 = v2->m_kRewardInfos._Myfirst;
    v6 = v2->m_kRewardInfos._Mylast - v5;
    v7 = 0;
    if ( !v6 )
      goto LABEL_12;
    v8 = v2->m_kRewardInfos._Myfirst;
    while ( v8->m_uiRewardGrade != v4 || v8->m_bCompleted )
    {
      ++v7;
      ++v8;
      if ( v7 >= v6 )
        goto LABEL_12;
    }
    v12 = (int)&v5[v7];
    if ( v12 )
    {
      v13 = v2->m_kCardInfos._Myfirst;
      v14 = 0;
      for ( i = v2->m_kCardInfos._Mylast - v13; i; --i )
      {
        if ( v13->m_uiGrade == uiGrade && v13->m_tRegistTime > 0 )
          ++v14;
        ++v13;
      }
      CollectCardListWin::SetReward(v2->m_pkCardListWin, *(_DWORD *)(v12 + 4), *(_DWORD *)(v12 + 8), v14);
    }
    else
    {
LABEL_12:
      CollectCardListWin::ResetReward(v2->m_pkCardListWin);
    }
    v9 = v2->m_pkCardListWin->m_pkPageWin;
    v10 = 0;
    if ( v9 )
      v11 = v9->m_uiPage;
    else
      v11 = 0;
    v16 = 0;
    v17 = v2->m_kCardInfos._Mylast - v2->m_kCardInfos._Myfirst == 0;
    v18 = v2->m_kCardInfos._Mylast - v2->m_kCardInfos._Myfirst;
    kCardInfo._Myfirst = 0;
    kCardInfo._Mylast = 0;
    kCardInfo._Myend = 0;
    v45 = 1;
    if ( !v17 )
    {
      uiCardID = v18;
      do
      {
        v19 = v2->m_kCardInfos._Myfirst;
        if ( v19[v10].m_uiGrade == uiGrade )
          std::vector<CollectCardChoiceWin::sRegistCardInfo,std::allocator<CollectCardChoiceWin::sRegistCardInfo>>::push_back(
            (std::vector<CollectCardChoiceWin::sRegistCardInfo,std::allocator<CollectCardChoiceWin::sRegistCardInfo> > *)&kCardInfo,
            (CollectCardChoiceWin::sRegistCardInfo *)&v19[v10]);
        ++v10;
        --uiCardID;
      }
      while ( uiCardID );
      v16 = kCardInfo._Mylast;
    }
    v20 = 0;
    v21 = v16 - kCardInfo._Myfirst;
    v22 = 12 * v11;
    uiCardCount = v21;
    v42 = 12 * v11;
    v23 = (char *)&kCardInfo._Myfirst[12 * v11].m_uiSerial;
    while ( 1 )
    {
      if ( v22 >= v21 )
      {
        v34 = v2->m_pkCardListWin;
        v35 = v34->m_kCardSlots._Myfirst[v20];
        v43 = v35;
        if ( v35 )
        {
          ((void (__stdcall *)(_DWORD))v35->vfptr[64].__vecDelDtor)(0);
          CardSlotWin::SetInfo(v43, 0, 0, 0, 0);
        }
        v33 = &v34->m_kBookmarkBtns._Myfirst[v20]->vfptr;
        if ( v33 )
        {
          v31 = *v33;
          v32 = v34->m_eCardListType == 0;
LABEL_42:
          v31[64].__vecDelDtor((NiRefObject *)v33, v32);
          goto LABEL_43;
        }
      }
      else
      {
        v24 = *(_DWORD *)v23;
        v25 = *((_DWORD *)v23 - 1);
        tRegistTime = *((_DWORD *)v23 + 1);
        v26 = (CardSlotWin *)v2->m_pkCardListWin;
        uiSerial = v24;
        v27 = *(CardSlotWin **)(v20 * 4 + *(_DWORD *)&v26->m_kBorderSprs._Alval.0);
        uiStar = v25;
        v28 = *((_DWORD *)v23 - 2);
        uiCardID = *((_DWORD *)v23 - 2);
        v43 = v26;
        if ( v27 )
        {
          v27->vfptr[64].__vecDelDtor((NiRefObject *)v27, v28 != 0);
          CardSlotWin::SetInfo(v27, uiCardID, uiStar, uiSerial, tRegistTime);
          v26 = v43;
          v28 = uiCardID;
        }
        v29 = v26->m_uiRCmdMsgParam;
        v30 = *(NiRefObjectVtbl ***)(v20 * 4 + v29);
        if ( v30 )
        {
          if ( v26->m_uiStar )
          {
            v31 = *v30;
            v32 = 0;
            v33 = *(NiRefObjectVtbl ***)(v20 * 4 + v29);
          }
          else
          {
            v17 = v28 == 0;
            v31 = *v30;
            v32 = v17;
            v33 = *(NiRefObjectVtbl ***)(v20 * 4 + v29);
          }
          goto LABEL_42;
        }
      }
LABEL_43:
      v22 = v42 + 1;
      ++v20;
      v23 += 20;
      ++v42;
      if ( v20 >= 12 )
      {
        if ( kCardInfo._Myfirst )
          operator delete(kCardInfo._Myfirst);
        return;
      }
      v2 = v39;
      v21 = uiCardCount;
    }
  }
}

//----- (004F0C40) --------------------------------------------------------
void __thiscall CollectWin::InitInfo(CollectWin *this)
{
  CollectWin *v1; // edi@1
  unsigned int v2; // eax@1

  v1 = this;
  std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>::resize(&this->m_kNewestInfos, 0);
  std::vector<PgWinText *,std::allocator<PgWinText *>>::resize(
    (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v1->m_kBookmarkInfos,
    0x3Cu);
  v2 = 0;
  do
  {
    v1->m_kBookmarkInfos._Myfirst[v2] = 0;
    ++v2;
  }
  while ( v2 < 60 );
  CollectWin::InitRewardInfo(v1);
  CollectWin::InitCardInfo(v1);
}

//----- (004F0C90) --------------------------------------------------------
void __thiscall CollectWin::UpdateMain(CollectWin *this, unsigned int uiRewardGrade)
{
  CollectWin *v2; // edi@1
  bool v3; // zf@1
  std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *v4; // eax@2
  unsigned int v5; // ebx@2
  CollectWin::sCardInfo *v6; // esi@4
  unsigned int v7; // ecx@4
  unsigned int *v8; // edx@5
  int v9; // eax@9
  unsigned int v10; // ecx@11
  unsigned int v11; // ebx@11
  unsigned int v12; // edi@11
  CardSlotWin **v13; // eax@11
  CardSlotWin *v14; // esi@11
  CardSlotWin *v15; // esi@18
  unsigned int v16; // ebx@21
  CollectWin::sCardInfo *v17; // esi@22
  unsigned int v18; // edi@22
  int j; // eax@22
  PgWinBar *v20; // ecx@27
  int v21; // edi@31
  CollectMainWin *v22; // esi@31
  unsigned int v23; // eax@33
  CollectWin::sRewardInfo *v24; // ebx@33
  unsigned int v25; // ecx@33
  CollectWin::sRewardInfo *v26; // esi@33
  CollectWin::sRewardInfo *v27; // eax@33
  char *v28; // edi@35
  int v29; // edi@38
  unsigned int v30; // ecx@39
  unsigned int v31; // ecx@40
  unsigned int v32; // edx@40
  unsigned int v33; // edx@42
  unsigned int v34; // ecx@47
  int v35; // ecx@48
  unsigned int v36; // ecx@50
  unsigned int v37; // ecx@51
  unsigned int v38; // edx@51
  unsigned int v39; // edx@53
  unsigned int v40; // ecx@63
  unsigned int v41; // edx@71
  CollectMainWin *v42; // edi@74
  std::vector<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo> > kRewardInfos; // [sp+10h] [bp-44h]@33
  unsigned int uiStar; // [sp+20h] [bp-34h]@11
  unsigned int uiRewardPage; // [sp+24h] [bp-30h]@10
  CollectWin *v46; // [sp+28h] [bp-2Ch]@1
  std::_List_iterator<std::_List_val<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > > iter; // [sp+2Ch] [bp-28h]@2
  unsigned int i; // [sp+30h] [bp-24h]@2
  unsigned int uiRegistCounts[4]; // [sp+34h] [bp-20h]@27
  int v50; // [sp+50h] [bp-4h]@33

  v2 = this;
  v3 = this->m_pkMainWin == 0;
  v46 = this;
  if ( !v3 )
  {
    std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>::sort<bool (__cdecl *)(CollectWin::sNewestInfo const &,CollectWin::sNewestInfo const &)>(
      &this->m_kNewestInfos,
      CollectWin::sNewestInfo::SortRegistTime);
    v4 = v2->m_kNewestInfos._Myhead->_Next;
    v5 = 0;
    i = 0;
    iter._Ptr = v4;
    while ( iter._Ptr != v2->m_kNewestInfos._Myhead )
    {
      v6 = v2->m_kCardInfos._Myfirst;
      v7 = 0;
      if ( v2->m_kCardInfos._Mylast - v6 )
      {
        v8 = &v6->m_uiCardID;
        while ( *v8 != iter._Ptr->_Myval.m_uiCardID )
        {
          ++v7;
          v8 += 5;
          if ( v7 >= v2->m_kCardInfos._Mylast - v6 )
            goto LABEL_14;
        }
        v9 = (int)&v6[v7];
        if ( v9 )
        {
          uiRewardPage = *(unsigned int *)(v9 + 16);
          if ( (signed int)uiRewardPage > 0 )
          {
            v10 = *(_DWORD *)(v9 + 8);
            v11 = *(_DWORD *)(v9 + 12);
            v12 = *(_DWORD *)(v9 + 4);
            v13 = v46->m_pkMainWin->m_kCardSlots._Myfirst;
            uiStar = v10;
            v14 = v13[i];
            if ( v14 )
            {
              v14->vfptr[64].__vecDelDtor((NiRefObject *)v14, v12 != 0);
              CardSlotWin::SetInfo(v14, v12, uiStar, v11, uiRewardPage);
            }
            ++i;
            v2 = v46;
          }
        }
LABEL_14:
        v5 = i;
      }
      iter._Ptr = iter._Ptr->_Next;
      if ( v5 >= 4 )
        goto LABEL_21;
    }
    for ( ; v5 < 4; ++v5 )
    {
      v15 = v2->m_pkMainWin->m_kCardSlots._Myfirst[v5];
      if ( v15 )
      {
        v15->vfptr[64].__vecDelDtor((NiRefObject *)v15, 0);
        CardSlotWin::SetInfo(v15, 0, 0, 0, 0);
      }
    }
LABEL_21:
    v16 = 0;
    do
    {
      v17 = v46->m_kCardInfos._Myfirst;
      v18 = 0;
      for ( j = v46->m_kCardInfos._Mylast - v17; j; --j )
      {
        if ( v17->m_uiGrade == v16 && v17->m_tRegistTime > 0 )
          ++v18;
        ++v17;
      }
      uiRegistCounts[v16] = v18;
      *(float *)&uiRewardPage = (double)v18;
      v20 = v46->m_pkMainWin->m_kBars._Myfirst[v16 + 1];
      if ( v20 && *(float *)&uiRewardPage != v20->m_fCurValue )
      {
        v20->m_fCurValue = *(float *)&uiRewardPage;
        PgWinBar::OnChangeValue(v20);
      }
      ++v16;
    }
    while ( v16 < 4 );
    v21 = (int)v46;
    v22 = v46->m_pkMainWin;
    if ( v22->m_uiRewardGrade != uiRewardGrade )
      v22->m_uiRewardPage = 0;
    v23 = CollectCardRewardTab::GetCountByRewardGrade(uiRewardGrade);
    v22->m_uiRewardGrade = uiRewardGrade;
    v22->m_uiLastRewardPage = v23 - 1;
    uiRewardPage = *(unsigned int *)(*(_DWORD *)(v21 + 404) + 372);
    v24 = 0;
    v25 = (*(_DWORD *)(v21 + 376) - *(_DWORD *)(v21 + 372)) >> 4;
    v26 = 0;
    v27 = 0;
    i = v25;
    kRewardInfos._Myfirst = 0;
    kRewardInfos._Mylast = 0;
    kRewardInfos._Myend = 0;
    v50 = 0;
    uiStar = 0;
    if ( v25 )
    {
      iter._Ptr = 0;
      while ( 1 )
      {
        v28 = (char *)iter._Ptr + *(_DWORD *)(v21 + 372);
        if ( *(_DWORD *)v28 == uiRewardGrade )
          break;
LABEL_62:
        ++iter._Ptr;
        v21 = (int)v46;
        if ( ++uiStar >= v25 )
          goto LABEL_63;
      }
      if ( v28 >= (char *)v27 || v26 > (CollectWin::sRewardInfo *)v28 )
      {
        if ( v27 == v24 )
        {
          v36 = v27 - v26;
          if ( v36 > 0xFFFFFFE )
LABEL_64:
            std::_Xlength_error("vector<T> too long");
          v37 = v36 + 1;
          v38 = v24 - v26;
          if ( v37 > v38 )
          {
            if ( 0xFFFFFFF - (v38 >> 1) >= v38 )
              v39 = (v38 >> 1) + v38;
            else
              v39 = 0;
            if ( v39 < v37 )
              v39 = v37;
            std::vector<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo>>::reserve(
              (std::vector<NiColorA,std::allocator<NiColorA> > *)&kRewardInfos,
              v39);
            v24 = kRewardInfos._Myend;
            v27 = kRewardInfos._Mylast;
            v26 = kRewardInfos._Myfirst;
          }
        }
        if ( !v27 )
          goto LABEL_61;
        v27->m_uiRewardGrade = *(_DWORD *)v28;
        v27->m_uiRewardID = *((_DWORD *)v28 + 1);
        v27->m_uiCount = *((_DWORD *)v28 + 2);
        v35 = *((_DWORD *)v28 + 3);
      }
      else
      {
        v29 = v28 - (char *)v26;
        if ( v27 == v24 )
        {
          v30 = v27 - v26;
          if ( v30 > 0xFFFFFFE )
            goto LABEL_64;
          v31 = v30 + 1;
          v32 = v24 - v26;
          if ( v31 > v32 )
          {
            if ( 0xFFFFFFF - (v32 >> 1) >= v32 )
              v33 = (v32 >> 1) + v32;
            else
              v33 = 0;
            if ( v33 < v31 )
              v33 = v31;
            std::vector<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo>>::reserve(
              (std::vector<NiColorA,std::allocator<NiColorA> > *)&kRewardInfos,
              v33);
            v24 = kRewardInfos._Myend;
            v27 = kRewardInfos._Mylast;
            v26 = kRewardInfos._Myfirst;
          }
        }
        v34 = (unsigned int)&v26->m_uiRewardGrade + (v29 & 0xFFFFFFF0);
        if ( !v27 )
          goto LABEL_61;
        v27->m_uiRewardGrade = *(_DWORD *)v34;
        v27->m_uiRewardID = *(_DWORD *)(v34 + 4);
        v27->m_uiCount = *(_DWORD *)(v34 + 8);
        v35 = *(_DWORD *)(v34 + 12);
      }
      *(_DWORD *)&v27->m_bCompleted = v35;
LABEL_61:
      v25 = i;
      ++v27;
      kRewardInfos._Mylast = v27;
      goto LABEL_62;
    }
LABEL_63:
    v40 = 0;
    switch ( uiRewardGrade )
    {
      case 0u:
        v40 = uiRegistCounts[0] + uiRegistCounts[1] + uiRegistCounts[2] + uiRegistCounts[3];
        break;
      case 1u:
        v40 = uiRegistCounts[0];
        break;
      case 2u:
        v40 = uiRegistCounts[1];
        break;
      case 3u:
        v40 = uiRegistCounts[2];
        break;
      case 4u:
        v40 = uiRegistCounts[3];
        break;
      default:
        break;
    }
    if ( uiRewardPage < v27 - v26 )
    {
      v41 = 0;
      if ( *(float *)&uiRewardPage != 0.0 )
        v41 = *((_DWORD *)&v26[uiRewardPage] - 2);
      CollectMainWin::SetReward(
        *(CollectMainWin **)(v21 + 404),
        v26[uiRewardPage].m_uiRewardID,
        v26[uiRewardPage].m_uiCount,
        v41,
        v40,
        v26[uiRewardPage].m_bCompleted);
    }
    v42 = *(CollectMainWin **)(v21 + 404);
    CollectMainWin::UpdateBar(v42);
    CollectMainWin::UpdateCheckBox(v42);
    if ( v26 )
      operator delete(v26);
  }
}

//----- (004F10F0) --------------------------------------------------------
void __thiscall CollectWin::OnSelectMenu(CollectWin *this, CollectWin::eMenuType eType)
{
  CollectWin *v2; // esi@1
  unsigned int v3; // ebx@1
  CollectCardListWin *v4; // edi@3
  CollectPageWin *v5; // eax@3
  PgWinSpr *v6; // ecx@5
  CollectCardListWin *v7; // edi@8
  int v8; // eax@8
  PgWinSpr *v9; // ecx@8

  v2 = this;
  v3 = eType - 2;
  switch ( eType )
  {
    case 0:
      ((void (__stdcall *)(_DWORD))this->m_pkMainWin->vfptr[64].__vecDelDtor)(1);
      ((void (__stdcall *)(_DWORD))v2->m_pkCardListWin->vfptr[64].__vecDelDtor)(0);
      CollectWin::UpdateMain(v2, 0);
      break;
    case 1:
      ((void (__stdcall *)(_DWORD))this->m_pkMainWin->vfptr[64].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v2->m_pkCardListWin->vfptr[64].__vecDelDtor)(1);
      v4 = v2->m_pkCardListWin;
      v4->m_eCardListType = 0;
      CollectCardListWin::ResetReward(v4);
      v5 = v4->m_pkPageWin;
      if ( v5 )
      {
        v5->m_uiPage = 0;
        v4->m_pkPageWin->m_uiLastPage = 4;
        v4->m_pkPageWin->m_uiUpdateMsg = 0;
        v4->m_pkPageWin->m_uiUpdateMsgParam = 0;
        CollectPageWin::Update(v4->m_pkPageWin);
      }
      v6 = v4->m_pkRewardPanel;
      if ( v6 )
        ((void (__stdcall *)(_DWORD))v6->vfptr[64].__vecDelDtor)(v4->m_eCardListType == 1);
      CollectWin::UpdateBookmark(v2);
      break;
    case 2:
    case 3:
    case 4:
    case 5:
      ((void (__stdcall *)(_DWORD))this->m_pkMainWin->vfptr[64].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v2->m_pkCardListWin->vfptr[64].__vecDelDtor)(1);
      v7 = v2->m_pkCardListWin;
      v7->m_eCardListType = 1;
      v8 = CollectCardTab::GetCountByGrade(v3);
      CollectCardListWin::SetPage(v7, 0, (v8 - 1) / 0xCu, 1u, v3);
      v9 = v7->m_pkRewardPanel;
      if ( v9 )
        ((void (__stdcall *)(_DWORD))v9->vfptr[64].__vecDelDtor)(v7->m_eCardListType == 1);
      CollectWin::UpdateGrade(v2, v3);
      break;
    default:
      return;
  }
}

//----- (004F1290) --------------------------------------------------------
void __thiscall CollectWin::SetRegistPage(CollectWin *this, unsigned int uiCardID)
{
  int v2; // eax@1
  unsigned int v3; // ebx@2
  unsigned int v4; // esi@4
  char *v5; // eax@5
  char *v6; // edi@5
  CollectWin::sCardInfo *v7; // esi@9
  unsigned int v8; // eax@9
  unsigned int v9; // ecx@9
  CollectCardListWin *v10; // ecx@14
  CollectWin *v11; // [sp+8h] [bp-8h]@1
  unsigned int uiCount; // [sp+Ch] [bp-4h]@9

  v2 = *(_DWORD *)(ITableBase<CollectCard,CollectCardTab>::ms_pkTable + 56);
  v11 = this;
  if ( v2 )
    v3 = *(_DWORD *)(v2 + 40);
  else
    v3 = 0;
  v4 = 0;
  if ( v3 )
  {
    while ( 1 )
    {
      v5 = CDataReader::GetRecord((CDataReader *)(ITableBase<CollectCard,CollectCardTab>::ms_pkTable + 4), v4);
      v6 = v5;
      if ( v5 )
      {
        if ( *(_WORD *)v5 == (_WORD)uiCardID )
          break;
      }
      if ( ++v4 >= v3 )
        return;
    }
    v7 = v11->m_kCardInfos._Myfirst;
    v8 = v11->m_kCardInfos._Mylast - v7;
    uiCount = 0;
    v9 = 0;
    if ( v8 )
    {
      do
      {
        if ( v7->m_uiCardID == uiCardID )
          break;
        if ( v7->m_uiGrade == *(_DWORD *)(v6 + 34) )
          ++uiCount;
        ++v9;
        ++v7;
      }
      while ( v9 < v8 );
    }
    CollectWin::OnSelectMenu(v11, (CollectWin::eMenuType)(*(_DWORD *)(v6 + 34) + 2));
    v10 = v11->m_pkCardListWin;
    if ( v10 )
    {
      if ( v10->m_pkPageWin )
      {
        v10->m_pkPageWin->m_uiPage = uiCount / 0xC;
        CollectPageWin::Update(v10->m_pkPageWin);
      }
    }
    CollectWin::UpdateGrade(v11, *(_DWORD *)(v6 + 34));
  }
}
// A8C210: using guessed type int ITableBase<CollectCard,CollectCardTab>::ms_pkTable;

//----- (004F13A0) --------------------------------------------------------
void __thiscall CollectWin::Update(CollectWin *this, unsigned int uiGrade)
{
  CollectWin *v2; // esi@1
  CollectCardListWin::eCardListType v3; // eax@7

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[65].__vecDelDtor)() )
  {
    if ( v2->m_pkMainWin && (unsigned __int8)((int (*)(void))v2->m_pkMainWin->vfptr[65].__vecDelDtor)() )
    {
      CollectWin::UpdateMain(v2, 0);
    }
    else if ( v2->m_pkCardListWin && (unsigned __int8)((int (*)(void))v2->m_pkCardListWin->vfptr[65].__vecDelDtor)() )
    {
      v3 = v2->m_pkCardListWin->m_eCardListType;
      if ( v3 )
      {
        if ( v3 == 1 )
          CollectWin::UpdateGrade(v2, uiGrade);
      }
      else
      {
        CollectWin::UpdateBookmark(v2);
      }
    }
  }
}

//----- (004F1430) --------------------------------------------------------
char __thiscall CollectWin::Create(CollectWin *this, PgFrameWork *pkFrameWork, int bPeeping)
{
  CollectWin *v3; // esi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  PgFont *v8; // eax@11
  PgWinText *v9; // edi@11
  NiUnsharedGeometryGroup *v10; // eax@12
  PgSprData *v11; // eax@14
  PgSprData *v12; // edi@14
  PgSprData *v13; // edi@14
  PgSprData *v14; // eax@14
  PgSprData *v15; // eax@14
  NiUnsharedGeometryGroup *v16; // eax@14
  NiUnsharedGeometryGroup *v17; // ecx@14
  char v18; // dl@15
  NiUnsharedGeometryGroup *v19; // eax@16
  NiUnsharedGeometryGroup *v20; // ecx@16
  char v21; // dl@17
  NiUnsharedGeometryGroup *v22; // eax@18
  NiUnsharedGeometryGroup *v23; // ecx@18
  char v24; // dl@19
  NiUnsharedGeometryGroup *v25; // eax@20
  NiUnsharedGeometryGroup *v26; // ecx@20
  char v27; // dl@21
  NiUnsharedGeometryGroup *v28; // eax@22
  NiUnsharedGeometryGroup *v29; // ecx@22
  char v30; // dl@23
  NiUnsharedGeometryGroup *v31; // eax@24
  unsigned int v32; // eax@24
  bool v33; // cf@26
  char *v34; // ecx@26
  char *v35; // eax@26
  NiNode *v36; // edi@28
  const char *v37; // eax@28
  PgSprData *v38; // edi@28
  int v39; // eax@29
  const char *v40; // eax@31
  int v41; // eax@32
  const char *v42; // eax@34
  PgWinBut *v43; // edi@34
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v44; // eax@35
  CollectMainWin *v45; // eax@38
  NiNode *v46; // ecx@38
  CollectCardListWin *v47; // eax@38
  PgFrameWork *v48; // edi@39
  CollectPopupWin **v49; // edi@39
  CollectPopupWin *v50; // edi@41
  NiRefObjectVtbl *v51; // edx@41
  NiAVObject *v52; // eax@41
  void *(__thiscall *v53)(NiRefObject *, unsigned int); // edx@41
  int v54; // eax@41
  unsigned int v55; // eax@42
  NiNode *v56; // esi@45
  unsigned int uiWidth; // [sp+30h] [bp-190h]@1
  char *v58; // [sp+34h] [bp-18Ch]@26
  unsigned int uiHeight; // [sp+38h] [bp-188h]@1
  unsigned int i; // [sp+3Ch] [bp-184h]@24
  PgFrameWork *v61; // [sp+40h] [bp-180h]@1
  unsigned int v62; // [sp+44h] [bp-17Ch]@24
  char *v63; // [sp+48h] [bp-178h]@26
  NiAVObject *pkObject; // [sp+4Ch] [bp-174h]@31
  int iTop; // [sp+50h] [bp-170h]@1
  int iLeft; // [sp+54h] [bp-16Ch]@1
  NiTexturePalette *pTexturePalette; // [sp+58h] [bp-168h]@1
  NiPointer<NiNode> spNode; // [sp+5Ch] [bp-164h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kGradeNodeName[6]; // [sp+60h] [bp-160h]@14
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kGradeToolTip[6]; // [sp+108h] [bp-B8h]@14
  int v71; // [sp+1BCh] [bp-4h]@1

  v3 = this;
  v61 = pkFrameWork;
  spNode.m_pObject = 0;
  v71 = 0;
  uiWidth = 0;
  uiHeight = 0;
  iLeft = 0;
  iTop = 0;
  pTexturePalette = ::pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\Collect_Main.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, pTexturePalette);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iLeft, &iTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v3->vfptr, 0, 0, v5, 0, pkFrameWork, "CollectWin", 0)
    || !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &iLeft, &iTop, &uiWidth, &uiHeight) )
  {
    v6 = spNode.m_pObject;
    v71 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = Font::Get(MAIN_MENU);
  v9 = PgWinText::CreateWin(iLeft, iTop, uiWidth, uiHeight, v8, (PgWin *)&v3->vfptr, 0, 0);
  v9->vfptr[122].__vecDelDtor((NiRefObject *)v9, 5u);
  if ( (_BYTE)bPeeping )
    v10 = TextData2::Get(0x879E788A);
  else
    v10 = TextData2::Get(0x80AC7BC0);
  v9->vfptr[118].__vecDelDtor((NiRefObject *)v9, (unsigned int)v10);
  v9->vfptr[60].__vecDelDtor((NiRefObject *)v9, 0);
  v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft, iTop, v11, (PgWin *)&v3->vfptr, 0, 0);
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &iLeft, &iTop, 0);
  PgSprData::Add(v12, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(v12, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinBut::CreateWin(iLeft, iTop, v12, (PgWin *)&v3->vfptr, 0, 0, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &iLeft, &iTop, 0);
  PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
  PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
  PgWinBut::CreateWin(iLeft, iTop, v13, (PgWin *)&v3->vfptr, 8u, 0, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft, iTop, v14, (PgWin *)&v3->vfptr, 0, 0);
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft, iTop, v15, (PgWin *)&v3->vfptr, 0, 0);
  kGradeNodeName[0]._Myres = 15;
  kGradeNodeName[0]._Mysize = 0;
  kGradeNodeName[0]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(kGradeNodeName, "Main", 4u);
  LOBYTE(v71) = 1;
  kGradeNodeName[1]._Myres = 15;
  kGradeNodeName[1]._Mysize = 0;
  kGradeNodeName[1]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&kGradeNodeName[1], "MyList", 6u);
  LOBYTE(v71) = 2;
  kGradeNodeName[2]._Myres = 15;
  kGradeNodeName[2]._Mysize = 0;
  kGradeNodeName[2]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&kGradeNodeName[2], "SRank", 5u);
  LOBYTE(v71) = 3;
  kGradeNodeName[3]._Myres = 15;
  kGradeNodeName[3]._Mysize = 0;
  kGradeNodeName[3]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&kGradeNodeName[3], "ARank", 5u);
  LOBYTE(v71) = 4;
  kGradeNodeName[4]._Myres = 15;
  kGradeNodeName[4]._Mysize = 0;
  kGradeNodeName[4]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&kGradeNodeName[4], "BRank", 5u);
  LOBYTE(v71) = 5;
  kGradeNodeName[5]._Myres = 15;
  kGradeNodeName[5]._Mysize = 0;
  kGradeNodeName[5]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&kGradeNodeName[5], "CRank", 5u);
  LOBYTE(v71) = 6;
  v16 = TextData2::Get(0x29B78270u);
  v17 = v16;
  kGradeToolTip[0]._Myres = 15;
  kGradeToolTip[0]._Mysize = 0;
  kGradeToolTip[0]._Bx._Buf[0] = 0;
  pTexturePalette = (NiTexturePalette *)((char *)&v16->vfptr + 1);
  do
  {
    v18 = (char)v17->vfptr;
    v17 = (NiUnsharedGeometryGroup *)((char *)v17 + 1);
  }
  while ( v18 );
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    kGradeToolTip,
    (const char *)v16,
    (char *)v17 - (char *)pTexturePalette);
  LOBYTE(v71) = 7;
  v19 = TextData2::Get(0x9402D28u);
  v20 = v19;
  kGradeToolTip[1]._Myres = 15;
  kGradeToolTip[1]._Mysize = 0;
  kGradeToolTip[1]._Bx._Buf[0] = 0;
  pTexturePalette = (NiTexturePalette *)((char *)&v19->vfptr + 1);
  do
  {
    v21 = (char)v20->vfptr;
    v20 = (NiUnsharedGeometryGroup *)((char *)v20 + 1);
  }
  while ( v21 );
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &kGradeToolTip[1],
    (const char *)v19,
    (char *)v20 - (char *)pTexturePalette);
  LOBYTE(v71) = 8;
  v22 = TextData2::Get(0xCCF8BD24);
  v23 = v22;
  kGradeToolTip[2]._Myres = 15;
  kGradeToolTip[2]._Mysize = 0;
  kGradeToolTip[2]._Bx._Buf[0] = 0;
  pTexturePalette = (NiTexturePalette *)((char *)&v22->vfptr + 1);
  do
  {
    v24 = (char)v23->vfptr;
    v23 = (NiUnsharedGeometryGroup *)((char *)v23 + 1);
  }
  while ( v24 );
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &kGradeToolTip[2],
    (const char *)v22,
    (char *)v23 - (char *)pTexturePalette);
  LOBYTE(v71) = 9;
  v25 = TextData2::Get(0xBAF8BD24);
  v26 = v25;
  kGradeToolTip[3]._Myres = 15;
  kGradeToolTip[3]._Mysize = 0;
  kGradeToolTip[3]._Bx._Buf[0] = 0;
  pTexturePalette = (NiTexturePalette *)((char *)&v25->vfptr + 1);
  do
  {
    v27 = (char)v26->vfptr;
    v26 = (NiUnsharedGeometryGroup *)((char *)v26 + 1);
  }
  while ( v27 );
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &kGradeToolTip[3],
    (const char *)v25,
    (char *)v26 - (char *)pTexturePalette);
  LOBYTE(v71) = 10;
  v28 = TextData2::Get(0xBBF8BD24);
  v29 = v28;
  kGradeToolTip[4]._Myres = 15;
  kGradeToolTip[4]._Mysize = 0;
  kGradeToolTip[4]._Bx._Buf[0] = 0;
  pTexturePalette = (NiTexturePalette *)((char *)&v28->vfptr + 1);
  do
  {
    v30 = (char)v29->vfptr;
    v29 = (NiUnsharedGeometryGroup *)((char *)v29 + 1);
  }
  while ( v30 );
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &kGradeToolTip[4],
    (const char *)v28,
    (char *)v29 - (char *)pTexturePalette);
  LOBYTE(v71) = 11;
  v31 = TextData2::Get(0xBCF8BD24);
  kGradeToolTip[5]._Myres = 15;
  kGradeToolTip[5]._Mysize = 0;
  kGradeToolTip[5]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &kGradeToolTip[5],
    (const char *)v31,
    strlen((const char *)v31));
  v32 = 0;
  LOBYTE(v71) = 12;
  i = 0;
  v62 = 0;
  pTexturePalette = (NiTexturePalette *)6;
  while ( 1 )
  {
    v33 = *(unsigned int *)((char *)&kGradeNodeName[0]._Myres + v32) < 0x10;
    v34 = (char *)&kGradeNodeName[0]._Myres + v32;
    v35 = (char *)kGradeNodeName + v32;
    v58 = v34;
    v63 = v35;
    if ( !v33 )
      v35 = *(char **)v35;
    v36 = spNode.m_pObject;
    v37 = fs("%sNor", v35);
    v38 = PgSprData::Create((NiAVObject *)&v36->vfptr, v37, &iLeft, &iTop, 0);
    v39 = (int)(*(_DWORD *)v58 < 0x10u ? v63 : *(_DWORD *)v63);
    pkObject = (NiAVObject *)spNode.m_pObject;
    v40 = fs("%sClick", v39);
    PgSprData::Add(v38, pkObject, v40);
    v41 = (int)(*(_DWORD *)v58 < 0x10u ? v63 : *(_DWORD *)v63);
    pkObject = (NiAVObject *)spNode.m_pObject;
    v42 = fs("%sOver", v41);
    PgSprData::Add(v38, pkObject, v42);
    v43 = PgWinBut::CreateWin(iLeft, iTop, v38, (PgWin *)&v3->vfptr, 1u, 0, 0);
    v43->vfptr[130].__vecDelDtor((NiRefObject *)v43, i);
    v43->m_pkToolTipWin = g_pkToolTipWin;
    v44 = *(unsigned int *)((char *)&kGradeToolTip[0]._Myres + v62) < 0x10 ? &kGradeToolTip[v62 / 0x1C] : kGradeToolTip[v62 / 0x1C]._Bx._Ptr;
    PgWin::SetToolTipWinText((PgWin *)&v43->vfptr, v44->_Bx._Buf);
    v62 += 28;
    ++i;
    pTexturePalette = (NiTexturePalette *)((char *)pTexturePalette - 1);
    if ( !pTexturePalette )
      break;
    v32 = v62;
  }
  v45 = CollectMainWin::CreateWin(spNode.m_pObject, (PgWin *)&v3->vfptr, bPeeping);
  v46 = spNode.m_pObject;
  v3->m_pkMainWin = v45;
  v47 = CollectCardListWin::CreateWin(v46, (PgWin *)&v3->vfptr, bPeeping);
  v3->m_pkCardListWin = v47;
  v47->vfptr[64].__vecDelDtor((NiRefObject *)v47, 0);
  if ( !(_BYTE)bPeeping )
  {
    v48 = v61;
    v3->m_pkRwChoiceWin = CollectRwChoiceWin::CreateWin(v61);
    v3->m_pkCardChoiceWin = CollectCardChoiceWin::CreateWin(v48);
    v49 = v3->m_pkPopupWin;
    pTexturePalette = (NiTexturePalette *)2;
    do
    {
      *v49 = CollectPopupWin::CreateWin(v61);
      ++v49;
      pTexturePalette = (NiTexturePalette *)((char *)pTexturePalette - 1);
    }
    while ( pTexturePalette );
    v50 = v3->m_pkPopupWin[0];
    v51 = v50->vfptr;
    v61 = (PgFrameWork *)&v3->m_pkPopupWin[1]->vfptr[44];
    v52 = (NiAVObject *)((int (__thiscall *)(CollectPopupWin *))v51[42].__vecDelDtor)(v50);
    v53 = v50->vfptr[37].__vecDelDtor;
    pkObject = v52;
    v54 = ((int (__thiscall *)(CollectPopupWin *))v53)(v50);
    ((void (__thiscall *)(CollectPopupWin *, char *))v61->vfptr)(v3->m_pkPopupWin[1], (char *)pkObject + v54);
  }
  std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>::resize(&v3->m_kNewestInfos, 0);
  std::vector<PgWinText *,std::allocator<PgWinText *>>::resize(
    (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v3->m_kBookmarkInfos,
    0x3Cu);
  v55 = 0;
  do
  {
    v3->m_kBookmarkInfos._Myfirst[v55] = 0;
    ++v55;
  }
  while ( v55 < 60 );
  CollectWin::InitRewardInfo(v3);
  CollectWin::InitCardInfo(v3);
  ((void (__thiscall *)(CollectWin *, unsigned int, unsigned int, _DWORD, _DWORD))v3->vfptr[59].__vecDelDtor)(
    v3,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  CollectWin::Update(v3, 0);
  LOBYTE(v71) = 6;
  `eh vector destructor iterator'(
    kGradeToolTip,
    0x1Cu,
    6,
    (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
  LOBYTE(v71) = 0;
  `eh vector destructor iterator'(
    kGradeNodeName,
    0x1Cu,
    6,
    (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
  v71 = -1;
  if ( spNode.m_pObject )
  {
    v56 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v56 )
        v56->vfptr->__vecDelDtor((NiRefObject *)v56, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004F1D40) --------------------------------------------------------
void __thiscall CollectWin::OnCommand(CollectWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0u:
      PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
      break;
    case 1u:
      CollectWin::OnSelectMenu(this, (CollectWin::eMenuType)lParam);
      break;
    case 2u:
      CollectWin::UpdateMain(this, lParam);
      break;
    case 3u:
      CollectWin::UpdateBookmark(this);
      break;
    case 4u:
      CollectWin::UpdateGrade(this, lParam);
      break;
    case 8u:
      CollectWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (004F1DC0) --------------------------------------------------------
void __thiscall CollectWin::OnShowWin(CollectWin *this)
{
  CollectWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkMainWin->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkCardListWin->vfptr[64].__vecDelDtor)(0);
  CollectWin::UpdateMain(v1, 0);
}

//----- (004F1E00) --------------------------------------------------------
int __cdecl CollectCardTab::GetCountByGrade(unsigned int uiGrade)
{
  int v1; // eax@1
  int v2; // ebx@1
  unsigned int v3; // edi@2
  unsigned int v4; // esi@4
  char *v5; // eax@5

  v1 = *(_DWORD *)(ITableBase<CollectCard,CollectCardTab>::ms_pkTable + 56);
  v2 = 0;
  if ( v1 )
    v3 = *(_DWORD *)(v1 + 40);
  else
    v3 = 0;
  v4 = 0;
  if ( v3 )
  {
    do
    {
      v5 = CDataReader::GetRecord((CDataReader *)(ITableBase<CollectCard,CollectCardTab>::ms_pkTable + 4), v4);
      if ( v5 && *(_DWORD *)(v5 + 34) == uiGrade )
        ++v2;
      ++v4;
    }
    while ( v4 < v3 );
  }
  return v2;
}
// A8C210: using guessed type int ITableBase<CollectCard,CollectCardTab>::ms_pkTable;

//----- (004F1E50) --------------------------------------------------------
unsigned int __cdecl CollectCardRewardTab::GetCountByRewardGrade(unsigned int uiRewardGrade)
{
  int v1; // eax@1
  int v2; // edi@1
  unsigned int v3; // ebx@2
  unsigned int v4; // esi@4
  char *v5; // eax@5
  unsigned int result; // eax@10
  unsigned int uiCount; // [sp+Ch] [bp-4h]@1

  v1 = *(_DWORD *)(ITableBase<CollectCardReward,CollectCardRewardTab>::ms_pkTable + 56);
  v2 = 0;
  uiCount = 0;
  if ( v1 )
    v3 = *(_DWORD *)(v1 + 40);
  else
    v3 = 0;
  v4 = 0;
  if ( v3 )
  {
    do
    {
      v5 = CDataReader::GetRecord(
             (CDataReader *)(ITableBase<CollectCardReward,CollectCardRewardTab>::ms_pkTable + 4),
             v4);
      if ( v5 && *(_WORD *)v5 != v2 && *(_DWORD *)(v5 + 2) == uiRewardGrade )
      {
        ++uiCount;
        v2 = *(_WORD *)v5;
      }
      ++v4;
    }
    while ( v4 < v3 );
    result = uiCount;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C21C: using guessed type int ITableBase<CollectCardReward,CollectCardRewardTab>::ms_pkTable;

//----- (004F1EC0) --------------------------------------------------------
void __thiscall std::list<std::pair<unsigned short const,QUEST_DATA *>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>>::_Splice_same(std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *this, std::_List_const_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > _Where, std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *_Right, std::_List_const_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > _First, std::_List_const_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > _Last, unsigned int _Count)
{
  unsigned int v6; // edx@2
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v7; // ecx@5

  if ( this != _Right )
  {
    v6 = this->_Mysize;
    if ( 536870910 - v6 < _Count )
      std::_Xlength_error("list<T> too long");
    this->_Mysize = _Count + v6;
    _Right->_Mysize -= _Count;
  }
  _First._Ptr->_Prev->_Next = _Last._Ptr;
  _Last._Ptr->_Prev->_Next = _Where._Ptr;
  _Where._Ptr->_Prev->_Next = _First._Ptr;
  v7 = _Where._Ptr->_Prev;
  _Where._Ptr->_Prev = _Last._Ptr->_Prev;
  _Last._Ptr->_Prev = _First._Ptr->_Prev;
  _First._Ptr->_Prev = v7;
}

//----- (004F1F40) --------------------------------------------------------
CollectCardChoiceWin::sRegistCardInfo *__cdecl std::_Uninit_move<CollectCardChoiceWin::sRegistCardInfo *,CollectCardChoiceWin::sRegistCardInfo *,std::allocator<CollectCardChoiceWin::sRegistCardInfo>,CollectCardChoiceWin::sRegistCardInfo>(CollectCardChoiceWin::sRegistCardInfo *_First, CollectCardChoiceWin::sRegistCardInfo *_Last, CollectCardChoiceWin::sRegistCardInfo *_Dest)
{
  CollectCardChoiceWin::sRegistCardInfo *v3; // ecx@1
  CollectCardChoiceWin::sRegistCardInfo *result; // eax@1

  v3 = _First;
  for ( result = _Dest; v3 != _Last; ++result )
  {
    if ( result )
    {
      result->m_uiGrade = v3->m_uiGrade;
      result->m_uiCardID = v3->m_uiCardID;
      result->m_uiStar = v3->m_uiStar;
      result->m_uiSerial = v3->m_uiSerial;
      result->m_tRegistTime = v3->m_tRegistTime;
    }
    ++v3;
  }
  return result;
}

//----- (004F1F80) --------------------------------------------------------
void __cdecl std::_Uninit_def_fill_n<CollectWin::sCardInfo *,unsigned int,CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo>,CollectWin::sCardInfo>(CollectWin::sCardInfo *_First, unsigned int _Count)
{
  unsigned int v2; // edx@1
  CollectWin::sCardInfo *v3; // eax@2

  v2 = _Count;
  if ( _Count )
  {
    v3 = _First;
    do
    {
      if ( v3 )
      {
        v3->m_uiGrade = 0;
        v3->m_uiCardID = 0;
        v3->m_uiStar = 0;
        v3->m_uiSerial = 0;
        v3->m_tRegistTime = 0;
      }
      ++v3;
      --v2;
    }
    while ( v2 );
  }
}

//----- (004F1FB0) --------------------------------------------------------
void __cdecl std::_Uninit_def_fill_n<CollectWin::sNewestInfo *,int,CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>,CollectWin::sNewestInfo>(CollectWin::sNewestInfo *_First, int _Count)
{
  int v2; // ecx@1
  CollectWin::sNewestInfo *v3; // eax@2

  v2 = _Count;
  if ( _Count > 0 )
  {
    v3 = _First;
    do
    {
      if ( v3 )
      {
        v3->m_tRegistTime = 0;
        v3->m_uiCardID = 0;
      }
      --v2;
      ++v3;
    }
    while ( v2 > 0 );
  }
}

//----- (004F1FE0) --------------------------------------------------------
NiColorA *__cdecl std::_Uninit_move<GUILD_ACADEMY_REWARD_ITEM *,GUILD_ACADEMY_REWARD_ITEM *,std::allocator<GUILD_ACADEMY_REWARD_ITEM>,GUILD_ACADEMY_REWARD_ITEM>(NiColorA *_First, NiColorA *_Last, NiColorA *_Dest)
{
  NiColorA *v3; // ecx@1
  NiColorA *result; // eax@1

  v3 = _First;
  for ( result = _Dest; v3 != _Last; ++result )
  {
    if ( result )
    {
      result->r = v3->r;
      result->g = v3->g;
      result->b = v3->b;
      result->a = v3->a;
    }
    ++v3;
  }
  return result;
}

//----- (004F2020) --------------------------------------------------------
void __thiscall std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>(std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > *this)
{
  std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > *v1; // esi@1
  std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *v2; // eax@1
  std::exception pExceptionObject; // [sp+4h] [bp-10h]@3
  char *_What; // [sp+10h] [bp-4h]@3

  v1 = this;
  this->_Mysize = 0;
  v2 = (std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *)operator new(0x10u);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->_Myhead = v2;
  v2->_Next = v2;
  v1->_Myhead->_Prev = v1->_Myhead;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (004F2080) --------------------------------------------------------
std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *__stdcall std::_List_val<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>::_Buynode(std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *_Next, std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *_Prev)
{
  void *v3; // eax@1
  void *v4; // esi@1
  std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *v5; // ecx@2
  int v7; // [sp+0h] [bp-30h]@1
  std::exception pExceptionObject; // [sp+10h] [bp-20h]@3
  void *p; // [sp+1Ch] [bp-14h]@1
  int *v10; // [sp+20h] [bp-10h]@1
  int v11; // [sp+2Ch] [bp-4h]@2

  v10 = &v7;
  v3 = operator new(0x10u);
  v4 = v3;
  p = v3;
  if ( !v3 )
  {
    _Next = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Next);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v5 = _Prev;
  *(_DWORD *)v3 = _Next;
  v11 = 0;
  *((_DWORD *)v3 + 1) = v5;
  std::_Uninit_def_fill_n<CollectWin::sNewestInfo *,int,CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>,CollectWin::sNewestInfo>(
    (CollectWin::sNewestInfo *)v3 + 1,
    1);
  return (std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *)v4;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (004F2140) --------------------------------------------------------
CollectMainWin *__thiscall CollectMainWin::`vector deleting destructor'(CollectMainWin *this, unsigned int a2)
{
  CollectMainWin *v2; // esi@1

  v2 = this;
  CollectMainWin::~CollectMainWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (004F2170) --------------------------------------------------------
CollectCardListWin *__thiscall CollectCardListWin::`vector deleting destructor'(CollectCardListWin *this, unsigned int a2)
{
  CollectCardListWin *v2; // esi@1

  v2 = this;
  CollectCardListWin::~CollectCardListWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (004F21A0) --------------------------------------------------------
void __thiscall std::vector<CollectCardChoiceWin::sRegistCardInfo,std::allocator<CollectCardChoiceWin::sRegistCardInfo>>::reserve(std::vector<CollectCardChoiceWin::sRegistCardInfo,std::allocator<CollectCardChoiceWin::sRegistCardInfo> > *this, unsigned int _Count)
{
  std::vector<CollectCardChoiceWin::sRegistCardInfo,std::allocator<CollectCardChoiceWin::sRegistCardInfo> > *v2; // esi@1
  CollectWin::sCardInfo *v3; // eax@4
  CollectCardChoiceWin::sRegistCardInfo *v4; // ST04_4@4
  CollectCardChoiceWin::sRegistCardInfo *v5; // ST00_4@4
  unsigned int v6; // edx@4
  int v7; // edi@4
  CollectCardChoiceWin::sRegistCardInfo *v8; // eax@6
  int v9; // [sp+0h] [bp-24h]@1
  CollectCardChoiceWin::sRegistCardInfo *_Ptr; // [sp+10h] [bp-14h]@4
  int *v11; // [sp+14h] [bp-10h]@1
  int v12; // [sp+20h] [bp-4h]@4

  v11 = &v9;
  v2 = this;
  if ( _Count > 0xCCCCCCC )
    std::_Xlength_error("vector<T> too long");
  if ( this->_Myend - this->_Myfirst < _Count )
  {
    v3 = std::allocator<CollectWin::sCardInfo>::allocate(_Count);
    v4 = v2->_Mylast;
    v5 = v2->_Myfirst;
    _Ptr = (CollectCardChoiceWin::sRegistCardInfo *)v3;
    v12 = 0;
    std::_Uninit_move<CollectCardChoiceWin::sRegistCardInfo *,CollectCardChoiceWin::sRegistCardInfo *,std::allocator<CollectCardChoiceWin::sRegistCardInfo>,CollectCardChoiceWin::sRegistCardInfo>(
      v5,
      v4,
      (CollectCardChoiceWin::sRegistCardInfo *)v3);
    v6 = (signed int)((unsigned __int64)(1717986919i64 * (unsigned int)((char *)v2->_Mylast - (char *)v2->_Myfirst)) >> 32) >> 3;
    v7 = v6 + (v6 >> 31);
    if ( v2->_Myfirst )
      operator delete(v2->_Myfirst);
    v8 = _Ptr;
    v2->_Myend = &_Ptr[_Count];
    v2->_Mylast = &v8[v7];
    v2->_Myfirst = v8;
  }
}

//----- (004F22A0) --------------------------------------------------------
void __thiscall std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>::merge<bool (__cdecl *)(CollectWin::sNewestInfo const &,CollectWin::sNewestInfo const &)>(std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > *this, std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > *_Right, bool (__cdecl *_Pred)(CollectWin::sNewestInfo *, CollectWin::sNewestInfo *))
{
  std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *v3; // edx@1
  std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *v4; // eax@2
  std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *v5; // esi@2
  std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *v6; // edi@2
  std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *v7; // ebx@2
  std::_List_const_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > v8; // edi@5
  std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *v9; // [sp+0h] [bp-Ch]@2
  std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *v10; // [sp+4h] [bp-8h]@1
  std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *v11; // [sp+8h] [bp-4h]@2

  v3 = (std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)_Right;
  v10 = (std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)this;
  if ( _Right != this )
  {
    v4 = _Right->_Myhead;
    v5 = _Right->_Myhead->_Next;
    v6 = this->_Myhead;
    v7 = this->_Myhead->_Next;
    v9 = this->_Myhead;
    v11 = _Right->_Myhead;
    if ( v7 == this->_Myhead )
    {
LABEL_9:
      if ( v5 != v4 )
        std::list<std::pair<unsigned short const,QUEST_DATA *>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>>::_Splice_same(
          (std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)this,
          (std::_List_const_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >)v6,
          v3,
          (std::_List_const_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >)v5,
          (std::_List_const_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >)v4,
          v3->_Mysize);
    }
    else
    {
      while ( v5 != v4 )
      {
        if ( _Pred(&v5->_Myval, &v7->_Myval) )
        {
          v8._Ptr = (std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *)v5->_Next;
          std::list<std::pair<unsigned short const,QUEST_DATA *>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>>::_Splice_same(
            v10,
            (std::_List_const_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >)v7,
            (std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)_Right,
            (std::_List_const_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >)v5,
            (std::_List_const_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >)v5->_Next,
            1u);
          v5 = (std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *)v8._Ptr;
          v6 = v9;
        }
        else
        {
          v7 = v7->_Next;
        }
        v4 = v11;
        if ( v7 == v6 )
        {
          v3 = (std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)_Right;
          this = (std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > *)v10;
          goto LABEL_9;
        }
      }
    }
  }
}

//----- (004F2320) --------------------------------------------------------
void __thiscall std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>::resize(std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > *this, unsigned int _Newsize)
{
  std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > *v2; // esi@1
  unsigned int v3; // eax@1
  unsigned int v4; // ebx@1
  std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *v5; // edi@4
  std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *v6; // eax@4
  unsigned int v7; // ecx@4
  std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *v8; // eax@8
  int v9; // [sp+0h] [bp-24h]@1
  std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > *v10; // [sp+10h] [bp-14h]@1
  int *v11; // [sp+14h] [bp-10h]@1
  int v12; // [sp+20h] [bp-4h]@2
  unsigned int _Count; // [sp+2Ch] [bp+8h]@2

  v11 = &v9;
  v2 = this;
  v10 = this;
  v3 = this->_Mysize;
  v4 = _Newsize;
  if ( _Newsize <= v3 )
  {
    if ( _Newsize < v3 )
    {
      do
      {
        v8 = v2->_Myhead->_Prev;
        if ( v8 != v2->_Myhead )
        {
          v8->_Prev->_Next = v8->_Next;
          v8->_Next->_Prev = v8->_Prev;
          operator delete(v8);
          --v2->_Mysize;
        }
      }
      while ( _Newsize < v2->_Mysize );
    }
  }
  else
  {
    _Count = 0;
    v12 = 0;
    while ( v2->_Mysize < v4 )
    {
      v5 = v2->_Myhead;
      v6 = std::_List_val<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>::_Buynode(
             v2->_Myhead,
             v2->_Myhead->_Prev);
      v7 = v2->_Mysize;
      if ( 536870910 - v7 < 1 )
        std::_Xlength_error("list<T> too long");
      ++_Count;
      v2->_Mysize = v7 + 1;
      v5->_Prev = v6;
      v6->_Prev->_Next = v6;
    }
  }
}

//----- (004F2410) --------------------------------------------------------
void __thiscall std::vector<CollectCardChoiceWin::sRegistCardInfo,std::allocator<CollectCardChoiceWin::sRegistCardInfo>>::_Reserve(std::vector<CollectCardChoiceWin::sRegistCardInfo,std::allocator<CollectCardChoiceWin::sRegistCardInfo> > *this, unsigned int _Count)
{
  unsigned int v2; // esi@1
  unsigned int v3; // esi@3
  unsigned int v4; // eax@3
  unsigned int v5; // eax@5

  v2 = this->_Mylast - this->_Myfirst;
  if ( 214748364 - _Count < v2 )
    std::_Xlength_error("vector<T> too long");
  v3 = _Count + v2;
  v4 = this->_Myend - this->_Myfirst;
  if ( v3 > v4 )
  {
    if ( 214748364 - (v4 >> 1) >= v4 )
      v5 = (v4 >> 1) + v4;
    else
      v5 = 0;
    if ( v5 < v3 )
      v5 = v3;
    std::vector<CollectCardChoiceWin::sRegistCardInfo,std::allocator<CollectCardChoiceWin::sRegistCardInfo>>::reserve(
      this,
      v5);
  }
}

//----- (004F2490) --------------------------------------------------------
void __thiscall std::vector<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo>>::resize(std::vector<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo> > *this, unsigned int _Newsize)
{
  std::vector<CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo> > *v2; // esi@1
  CollectWin::sCardInfo *v3; // ebx@1
  signed int v4; // ecx@1

  v2 = this;
  v3 = this->_Mylast;
  v4 = (char *)this->_Mylast - (char *)this->_Myfirst;
  if ( v4 / 20 <= _Newsize )
  {
    if ( v4 / 20 < _Newsize )
    {
      std::vector<CollectCardChoiceWin::sRegistCardInfo,std::allocator<CollectCardChoiceWin::sRegistCardInfo>>::_Reserve(
        (std::vector<CollectCardChoiceWin::sRegistCardInfo,std::allocator<CollectCardChoiceWin::sRegistCardInfo> > *)v2,
        _Newsize - v4 / 20);
      std::_Uninit_def_fill_n<CollectWin::sCardInfo *,unsigned int,CollectWin::sCardInfo,std::allocator<CollectWin::sCardInfo>,CollectWin::sCardInfo>(
        v2->_Mylast,
        _Newsize - (v2->_Mylast - v2->_Myfirst));
      v2->_Mylast += _Newsize - (v2->_Mylast - v2->_Myfirst);
    }
  }
  else if ( &v2->_Myfirst[_Newsize] != v3 )
  {
    v2->_Mylast = (CollectWin::sCardInfo *)std::_Move<CollectWin::sCardInfo *,CollectWin::sCardInfo *>(
                                             (CollectCardChoiceWin::sRegistCardInfo *)v3,
                                             (CollectCardChoiceWin::sRegistCardInfo *)v3,
                                             (CollectCardChoiceWin::sRegistCardInfo *)&v2->_Myfirst[_Newsize]);
  }
}

//----- (004F2550) --------------------------------------------------------
void __thiscall std::vector<CollectCardChoiceWin::sRegistCardInfo,std::allocator<CollectCardChoiceWin::sRegistCardInfo>>::push_back(std::vector<CollectCardChoiceWin::sRegistCardInfo,std::allocator<CollectCardChoiceWin::sRegistCardInfo> > *this, CollectCardChoiceWin::sRegistCardInfo *_Val)
{
  std::vector<CollectCardChoiceWin::sRegistCardInfo,std::allocator<CollectCardChoiceWin::sRegistCardInfo> > *v2; // edi@1
  CollectCardChoiceWin::sRegistCardInfo *v3; // ecx@1
  unsigned int v4; // edx@3
  int v5; // esi@3
  int v6; // ecx@5
  CollectCardChoiceWin::sRegistCardInfo *v7; // eax@5
  CollectCardChoiceWin::sRegistCardInfo *v8; // eax@9

  v2 = this;
  v3 = this->_Mylast;
  if ( _Val >= v3 || v2->_Myfirst > _Val )
  {
    if ( v3 == v2->_Myend )
      std::vector<CollectCardChoiceWin::sRegistCardInfo,std::allocator<CollectCardChoiceWin::sRegistCardInfo>>::_Reserve(
        v2,
        1u);
    v8 = v2->_Mylast;
    if ( v8 )
      *v8 = *_Val;
  }
  else
  {
    v4 = (signed int)((unsigned __int64)(1717986919i64 * ((char *)_Val - (char *)v2->_Myfirst)) >> 32) >> 3;
    v5 = v4 + (v4 >> 31);
    if ( v3 == v2->_Myend )
      std::vector<CollectCardChoiceWin::sRegistCardInfo,std::allocator<CollectCardChoiceWin::sRegistCardInfo>>::_Reserve(
        v2,
        1u);
    v6 = (int)&v2->_Myfirst[v5];
    v7 = v2->_Mylast;
    if ( v7 )
    {
      v7->m_uiGrade = *(_DWORD *)v6;
      v7->m_uiCardID = *(_DWORD *)(v6 + 4);
      v7->m_uiStar = *(_DWORD *)(v6 + 8);
      v7->m_uiSerial = *(_DWORD *)(v6 + 12);
      v7->m_tRegistTime = *(_DWORD *)(v6 + 16);
      ++v2->_Mylast;
      return;
    }
  }
  ++v2->_Mylast;
}

//----- (004F2600) --------------------------------------------------------
CollectWin *__thiscall CollectWin::`vector deleting destructor'(CollectWin *this, unsigned int a2)
{
  CollectWin *v2; // esi@1

  v2 = this;
  CollectWin::~CollectWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (004F2630) --------------------------------------------------------
void __thiscall std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>::sort<bool (__cdecl *)(CollectWin::sNewestInfo const &,CollectWin::sNewestInfo const &)>(std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > *this, bool (__cdecl *_Pred)(CollectWin::sNewestInfo *, CollectWin::sNewestInfo *))
{
  std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > *v2; // esi@1
  bool v3; // cf@1
  std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *v4; // eax@2
  std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *v5; // ebx@3
  unsigned int v6; // eax@3
  std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *v7; // eax@4
  std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *v8; // ecx@4
  std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *v9; // edx@4
  std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *v10; // edi@7
  unsigned int v11; // edi@7
  std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > *v12; // esi@8
  unsigned int v13; // ecx@11
  unsigned int v14; // eax@11
  std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > *v15; // eax@16
  std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *v16; // ecx@17
  unsigned int v17; // edx@17
  unsigned int v18; // ecx@17
  std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > *v19; // edi@23
  std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *v20; // eax@26
  std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *v21; // eax@29
  std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *v22; // esi@30
  std::exception pExceptionObject; // [sp+10h] [bp-170h]@34
  char *_What; // [sp+1Ch] [bp-164h]@34
  std::_List_const_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > _Where; // [sp+20h] [bp-160h]@1
  std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > _Templist; // [sp+24h] [bp-15Ch]@2
  std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > *v27; // [sp+30h] [bp-150h]@1
  unsigned int _Maxbin; // [sp+34h] [bp-14Ch]@3
  std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > _Binlist[26]; // [sp+38h] [bp-148h]@3
  int v30; // [sp+17Ch] [bp-4h]@3

  v2 = this;
  v3 = this->_Mysize < 2;
  v27 = this;
  _Where._Ptr = (std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *)_Pred;
  if ( !v3 )
  {
    _Templist._Mysize = 0;
    v4 = (std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *)operator new(0x10u);
    if ( !v4 )
    {
      _What = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&_What);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
    v5 = v4;
    v4->_Next = v4;
    _Templist._Myhead = v4;
    v4->_Prev = v4;
    v30 = 0;
    `eh vector constructor iterator'(
      _Binlist,
      0xCu,
      26,
      (void (__thiscall *)(void *))std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>,
      (void (__thiscall *)(void *))std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~list<ItemViewDummy *,std::allocator<ItemViewDummy *>>);
    v6 = 0;
    LOBYTE(v30) = 1;
    _Maxbin = 0;
    if ( v2->_Mysize )
    {
      do
      {
        v7 = v2->_Myhead->_Next->_Next;
        v8 = v2->_Myhead->_Next;
        v9 = v5->_Next;
        if ( &_Templist != v2 )
        {
          if ( 536870910 - _Templist._Mysize < 1 )
            std::_Xlength_error("list<T> too long");
          ++_Templist._Mysize;
          --v2->_Mysize;
        }
        v8->_Prev->_Next = v7;
        v7->_Prev->_Next = v9;
        v9->_Prev->_Next = v8;
        v10 = v9->_Prev;
        v9->_Prev = v7->_Prev;
        v7->_Prev = v8->_Prev;
        v8->_Prev = v10;
        v11 = 0;
        if ( !_Maxbin )
          goto LABEL_38;
        v12 = _Binlist;
        do
        {
          if ( !v12->_Mysize )
            break;
          std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>::merge<bool (__cdecl *)(CollectWin::sNewestInfo const &,CollectWin::sNewestInfo const &)>(
            v12,
            &_Templist,
            (bool (__cdecl *)(CollectWin::sNewestInfo *, CollectWin::sNewestInfo *))_Where._Ptr);
          if ( v12 == &_Templist )
          {
            v5 = _Templist._Myhead;
          }
          else
          {
            v5 = v12->_Myhead;
            v13 = _Templist._Mysize;
            v12->_Myhead = _Templist._Myhead;
            v14 = v12->_Mysize;
            _Templist._Myhead = v5;
            v12->_Mysize = v13;
            _Templist._Mysize = v14;
          }
          ++v11;
          ++v12;
        }
        while ( v11 < _Maxbin );
        if ( v11 == 25 )
        {
          std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>::merge<bool (__cdecl *)(CollectWin::sNewestInfo const &,CollectWin::sNewestInfo const &)>(
            &_Binlist[24],
            &_Templist,
            (bool (__cdecl *)(CollectWin::sNewestInfo *, CollectWin::sNewestInfo *))_Where._Ptr);
          v5 = _Templist._Myhead;
          v2 = v27;
        }
        else
        {
LABEL_38:
          v2 = v27;
          v15 = &_Binlist[v11];
          if ( v15 != &_Templist )
          {
            v16 = v15->_Myhead;
            v17 = _Templist._Mysize;
            v15->_Myhead = v5;
            v5 = v16;
            v18 = v15->_Mysize;
            _Templist._Myhead = v5;
            v15->_Mysize = v17;
            _Templist._Mysize = v18;
          }
          if ( v11 == _Maxbin )
            ++_Maxbin;
        }
      }
      while ( v2->_Mysize );
      v6 = _Maxbin;
    }
    if ( v6 > 1 )
    {
      v19 = &_Binlist[1];
      v27 = (std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > *)(v6 - 1);
      do
      {
        std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>::merge<bool (__cdecl *)(CollectWin::sNewestInfo const &,CollectWin::sNewestInfo const &)>(
          v19,
          v19 - 1,
          (bool (__cdecl *)(CollectWin::sNewestInfo *, CollectWin::sNewestInfo *))_Where._Ptr);
        ++v19;
        v27 = (std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > *)((char *)v27 - 1);
      }
      while ( v27 );
      v6 = _Maxbin;
    }
    v20 = (std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)(&_Templist._Alnod + 12 * v6);
    _Where._Ptr = (std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *)v2->_Myhead->_Next;
    if ( (std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)v2 != v20
      && v20->_Mysize )
    {
      std::list<std::pair<unsigned short const,QUEST_DATA *>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>>::_Splice_same(
        (std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)v2,
        _Where,
        v20,
        (std::_List_const_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >)v20->_Myhead->_Next,
        (std::_List_const_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >)v20->_Myhead,
        v20->_Mysize);
    }
    LOBYTE(v30) = 0;
    `eh vector destructor iterator'(
      _Binlist,
      0xCu,
      26,
      (void (__thiscall *)(void *))std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~list<ItemViewDummy *,std::allocator<ItemViewDummy *>>);
    v21 = v5->_Next;
    v5->_Next = v5;
    v5->_Prev = v5;
    if ( v21 != v5 )
    {
      do
      {
        v22 = v21->_Next;
        operator delete(v21);
        v21 = v22;
      }
      while ( v22 != v5 );
    }
    operator delete(v5);
  }
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (004F2920) --------------------------------------------------------
char __thiscall DesktopWin::Create(DesktopWin *this, unsigned int dwScrWidth, unsigned int dwScrHeight, PgFrameWork *pkFrameWork)
{
  DesktopWin *v4; // esi@1
  char result; // al@1

  v4 = this;
  result = PgWin::Create((PgWin *)&this->vfptr, 0, 0, dwScrWidth, dwScrHeight, 0, 0, 0);
  if ( result )
  {
    v4->m_pkFrameWork = pkFrameWork;
    result = 1;
  }
  return result;
}

//----- (004F2960) --------------------------------------------------------
void __thiscall DesktopWin::DesktopWin(DesktopWin *this)
{
  DesktopWin *v1; // esi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&DesktopWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&DesktopWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkFrameWork = 0;
  v1->m_bDroppable = 1;
}
// 9889D8: using guessed type void (__thiscall *DesktopWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9889F4: using guessed type int (__thiscall *DesktopWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F2990) --------------------------------------------------------
void __thiscall DesktopWin::~DesktopWin(DesktopWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&DesktopWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&DesktopWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
}
// 9889D8: using guessed type void (__thiscall *DesktopWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9889F4: using guessed type int (__thiscall *DesktopWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F29B0) --------------------------------------------------------
void __thiscall ItemDropTask::DirectMessage(ItemDropTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  if ( iMsgTag == 27 && pvBody && *(_DWORD *)pvBody && *(_DWORD *)pvBody == 1 )
    this->m_pkMsgHooker = (IDirectMessenger *)2;
}

//----- (004F29E0) --------------------------------------------------------
void __thiscall DesktopWin::ProcessMeInput(DesktopWin *this, bool *bHit)
{
  DesktopWin *v2; // esi@1
  int v3; // eax@3

  v2 = this;
  if ( dword_B6479C >= 1
    && (unsigned __int8)((int (__stdcall *)(unsigned int, int))this->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY) == 1 )
  {
    Singleton<CursorState>::getInstance();
    if ( *(_DWORD *)(v3 + 4) == 1 )
      PgFrameWork::AddMsg(v2->m_pkFrameWork, 0x10Au, 0, 0);
  }
}
// B6479C: using guessed type int dword_B6479C;

//----- (004F2A30) --------------------------------------------------------
void __thiscall ItemDropTask::OnStart(ItemDropTask *this)
{
  unsigned __int16 v1; // ax@1
  unsigned int v2; // eax@2
  Item *v3; // eax@3
  unsigned int v4; // eax@4
  unsigned int v5; // eax@6
  unsigned int v6; // eax@8
  unsigned int v7; // eax@10
  unsigned int v8; // eax@12
  char *v9; // esi@17
  bool v10; // zf@17
  DirectUserMsgBody_SendPacket kPacket; // [sp+4h] [bp-Ch]@17

  v1 = this->m_kItemDropPacket.slot.Inven;
  switch ( (unsigned int)this->m_kItemDropPacket.slot.Inven >> 10 )
  {
    case 9u:
      v2 = v1 & 0x3FF;
      if ( v2 >= 0xC0 )
        goto LABEL_15;
      v3 = g_kInventory.m_aspInv[v2].m_pObject;
      goto LABEL_14;
    case 8u:
      v4 = v1 & 0x3FF;
      if ( v4 >= 0x1E )
        goto LABEL_15;
      v3 = g_kInventory.m_aspEquip[v4].m_pObject;
      goto LABEL_14;
    case 3u:
      v5 = v1 & 0x3FF;
      if ( v5 > 0x62 )
        goto LABEL_15;
      v3 = g_kInventory.m_aspMiniHouseFurnitureItemInv[v5].m_pObject;
      goto LABEL_14;
    case 0xDu:
      v6 = v1 & 0x3FF;
      if ( v6 > 0x62 )
        goto LABEL_15;
      v3 = g_kInventory.m_aspMiniHouseAccessoryItemInv[v6].m_pObject;
      goto LABEL_14;
    case 0xEu:
      v7 = v1 & 0x3FF;
      if ( v7 > 0x62 )
        goto LABEL_15;
      v3 = g_kInventory.m_aspMiniHouseTileAllItemInv[v7].m_pObject;
      goto LABEL_14;
    case 0x10u:
      v8 = v1 & 0x3FF;
      if ( v8 > 0x62 )
        goto LABEL_15;
      v3 = g_kInventory.m_aspMiniHouseMinigameAllItemInv[v8].m_pObject;
LABEL_14:
      if ( !v3 )
        goto LABEL_15;
      if ( v3->m_pkInfo )
      {
        kPacket.pvPacket = &this->m_kItemDropPacket;
        v9 = (char *)&this->vfptr;
        this->m_eState = 0;
        v10 = this->m_pkMsgHooker == 0;
        *(_DWORD *)&kPacket.wDepartment = 458764;
        kPacket.uiPacketSize = 14;
        if ( !v10 )
        {
          ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))this->m_pkMsgHooker->vfptr->SendDirectMessage)(23, &kPacket, v9);
          if ( *((_DWORD *)v9 + 1) )
            (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v9 + 1) + 20))(23, &kPacket, v9);
        }
        (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v9 + 20))(v9, 23, &kPacket, v9);
      }
      else
      {
LABEL_15:
        this->m_eTaskState = 2;
      }
      break;
    default:
      return;
  }
}

//----- (004F2B70) --------------------------------------------------------
char __thiscall ItemDropTask::OnProcessNetMsg(ItemDropTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  char result; // al@3
  unsigned __int16 v6; // ax@4
  unsigned int v7; // eax@5
  Item *v8; // esi@6
  unsigned int v9; // eax@7
  unsigned int v10; // eax@9
  unsigned int v11; // eax@11
  unsigned int v12; // eax@13
  unsigned int v13; // eax@15
  CClientQuest *v14; // edi@19
  int v15; // eax@19
  CQuestVtbl *v16; // esi@19
  int v17; // ebx@19
  int v18; // eax@19
  ItemDropTask *v19; // [sp+0h] [bp-4h]@1

  v19 = this;
  if ( iDepart == 12 && iCommand == 8 )
  {
    v6 = this->m_kItemDropPacket.slot.Inven;
    switch ( (unsigned int)this->m_kItemDropPacket.slot.Inven >> 10 )
    {
      case 0u:
        v7 = v6 & 0x3FF;
        if ( v7 >= 0xC0 )
          goto LABEL_20;
        v8 = g_kInventory.m_aspInv[v7].m_pObject;
        goto LABEL_17;
      case 1u:
        v9 = v6 & 0x3FF;
        if ( v9 >= 0x1E )
          goto LABEL_20;
        v8 = g_kInventory.m_aspEquip[v9].m_pObject;
        goto LABEL_17;
      case 0xEu:
        v10 = v6 & 0x3FF;
        if ( v10 > 0x62 )
          goto LABEL_20;
        v8 = g_kInventory.m_aspMiniHouseFurnitureItemInv[v10].m_pObject;
        goto LABEL_17;
      case 0xFu:
        v11 = v6 & 0x3FF;
        if ( v11 > 0x62 )
          goto LABEL_20;
        v8 = g_kInventory.m_aspMiniHouseAccessoryItemInv[v11].m_pObject;
        goto LABEL_17;
      case 0x10u:
        v12 = v6 & 0x3FF;
        if ( v12 > 0x62 )
          goto LABEL_20;
        v8 = g_kInventory.m_aspMiniHouseTileAllItemInv[v12].m_pObject;
        goto LABEL_17;
      case 0x11u:
        v13 = v6 & 0x3FF;
        if ( v13 <= 0x62 )
        {
          v8 = g_kInventory.m_aspMiniHouseMinigameAllItemInv[v13].m_pObject;
LABEL_17:
          if ( v8 )
          {
            if ( *(_WORD *)pvData == 769 )
            {
              v14 = QuestDataMgr::GetQuest();
              v15 = v8->m_kStruct.itemid;
              v16 = v14->vfptr;
              v17 = v15;
              v18 = Inventory::GetItemCnt(&g_kInventory, v15);
              (*(void (__thiscall **)(CClientQuest *, int, int))&v16->gap4[12])(v14, v17, v18);
              this = v19;
            }
          }
        }
LABEL_20:
        this->m_eTaskState = 2;
        result = 1;
        break;
      default:
        result = 0;
        break;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (004F2CB0) --------------------------------------------------------
void __thiscall ItemDropTask::ItemDropTask(ItemDropTask *this, ITEM_INVEN *rkInven, unsigned int dwLot, unsigned int dwDropPosX, unsigned int dwDropPosY)
{
  ItemDropTask *v5; // esi@1

  v5 = this;
  ITask::ITask((ITask *)&this->vfptr, 0);
  v5->vfptr = (NiRefObjectVtbl *)&ItemDropTask::`vftable'{for `NiRefObject'};
  v5->vfptr = (IDirectMessengerVtbl *)&ItemDropTask::`vftable'{for `IDirectMessenger'};
  v5->m_kItemDropPacket.slot = (ITEM_INVEN)rkInven->Inven;
  v5->m_kItemDropPacket.loc.x = dwDropPosX;
  v5->m_kItemDropPacket.lot = dwLot;
  v5->m_kItemDropPacket.loc.y = dwDropPosY;
}
// 988BC0: using guessed type void (__thiscall *ItemDropTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 988BDC: using guessed type int (__thiscall *ItemDropTask::`vftable'{for `NiRefObject'})(void *p, char);

//----- (004F2CF0) --------------------------------------------------------
char __thiscall DesktopWin::EatDropInstance(DesktopWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  DesktopWin *v4; // edi@1
  void *v5; // esi@2
  unsigned int v6; // ST0C_4@7
  GuildAcademyItemRewardWin *v7; // eax@7
  int v9; // eax@9
  int kPos_8; // ST24_4@9
  __int16 v11; // ax@10
  ItemDropTask *v12; // ecx@16
  int v13; // eax@17
  void (__cdecl *v14)(PgFrameWork *); // eax@19
  PgFrameWork *v15; // ST0C_4@19
  float kPos; // [sp+Ch] [bp-28h]@9
  float kPos_4; // [sp+10h] [bp-24h]@9
  ITEM_INVEN kInven; // [sp+24h] [bp-10h]@10
  int v19; // [sp+30h] [bp-4h]@16

  v4 = this;
  if ( !*pkDrop )
    return 0;
  v5 = (*pkDrop)->m_pkContents;
  if ( !v5 )
    return 0;
  if ( *((_DWORD *)v5 + 2) == 4 )
    SoundMgr::PlayInterfaceSound(&g_kSoundMgr, WEAPONTITLE);
  if ( *((_DWORD *)v5 + 4) )
    return 0;
  if ( *((_DWORD *)v5 + 2) == 20 )
  {
    v6 = *((_DWORD *)v5 + 3);
    v7 = GuildAcademyTask::GetGuildAcademyItemRewardWin();
    GuildAcademyItemRewardWin::resetInven(v7, v6);
    return 0;
  }
  v9 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
  kPos_8 = *(_DWORD *)(v9 + 8);
  kPos = *(float *)v9;
  kPos_4 = *(float *)(v9 + 4);
  switch ( *((_DWORD *)v5 + 2) )
  {
    default:
      return 0;
    case 0:
      v11 = kInven.Inven & 0x3FF | 0x2400;
      break;
    case 1:
      v11 = kInven.Inven & 0x3FF | 0x2000;
      break;
    case 0xE:
      v11 = kInven.Inven & 0x3FF | 0xC00;
      break;
    case 0xF:
      v11 = kInven.Inven & 0x3FF | 0x3400;
      break;
    case 0x10:
      v11 = kInven.Inven & 0x3FF | 0x3800;
      break;
    case 0x11:
      v11 = kInven.Inven & 0x3FF | 0x4000;
      break;
  }
  kInven.Inven = (v11 ^ *((_WORD *)v5 + 6)) & 0x3FF ^ v11;
  v12 = (ItemDropTask *)operator new(0x54u);
  v19 = 0;
  if ( v12 )
    ItemDropTask::ItemDropTask(v12, &kInven, *((_DWORD *)v5 + 16), (signed __int64)kPos, (signed __int64)kPos_4);
  else
    v13 = 0;
  v14 = **(void (__cdecl ***)(PgFrameWork *))(v13 + 8);
  v15 = v4->m_pkFrameWork;
  v19 = -1;
  v14(v15);
  return 1;
}

//----- (004F2EE0) --------------------------------------------------------
DesktopWin *__cdecl DesktopWin::CreateWin(unsigned int dwScrWidth, unsigned int dwScrHeight, PgFrameWork *pkFrameWork)
{
  PgWin *v3; // eax@1
  PgWin *v4; // esi@1
  PgWin *v5; // edi@8
  DesktopWin *v6; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x124u);
  v4 = v3;
  result.m_pObject = v3;
  v8 = 0;
  if ( v3 )
  {
    PgWin::PgWin(v3);
    v4->vfptr = (NiRefObjectVtbl *)&DesktopWin::`vftable'{for `NiNode'};
    v4->vfptr = (IDirectMessengerVtbl *)&DesktopWin::`vftable'{for `IDirectMessenger'};
    v4[1].vfptr = 0;
    v4->m_bDroppable = 1;
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v8 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v4);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, unsigned int, unsigned int, PgFrameWork *))v4->vfptr[113].__vecDelDtor)(
                          v4,
                          dwScrWidth,
                          dwScrHeight,
                          pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v4->vfptr[89].__vecDelDtor)(v4);
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = (DesktopWin *)v4;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v4);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = 0;
  }
  return v6;
}
// 9889D8: using guessed type void (__thiscall *DesktopWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9889F4: using guessed type int (__thiscall *DesktopWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F3030) --------------------------------------------------------
DesktopWin *__thiscall DesktopWin::`scalar deleting destructor'(DesktopWin *this, unsigned int a2)
{
  DesktopWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&DesktopWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&DesktopWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9889D8: using guessed type void (__thiscall *DesktopWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9889F4: using guessed type int (__thiscall *DesktopWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F3070) --------------------------------------------------------
ProductTask *__thiscall ProductTask::`scalar deleting destructor'(ProductTask *this, unsigned int a2)
{
  ProductTask *v2; // esi@1

  v2 = this;
  ITask::~ITask((ITask *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (004F30A0) --------------------------------------------------------
void __thiscall DivideWin::OnCmdCancel(DivideWin *this)
{
  DivideWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  this->m_uiResultValue = 0;
  PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
  v2 = v1->m_pkRevWin;
  if ( v2 )
    PgWin::PostMsg(v2, 5u, v1->m_uiOkMsg, 0);
}

//----- (004F30E0) --------------------------------------------------------
void __thiscall DivideWin::GetValueFromEdit(DivideWin *this)
{
  DivideWin *v1; // esi@1
  EditWin *v2; // ecx@1
  const char *v3; // eax@1

  v1 = this;
  v2 = this->m_pkLotInputEdit;
  v1->m_uiResultValue = 0;
  v3 = (const char *)((int (*)(void))v2->vfptr[113].__vecDelDtor)();
  if ( v3 )
  {
    if ( *v3 )
      v1->m_uiResultValue = atoi(v3);
  }
}

//----- (004F3120) --------------------------------------------------------
void __thiscall DivideWin::SetValueToEdit(DivideWin *this)
{
  DivideWin *v1; // esi@1
  char acStr[32]; // [sp+4h] [bp-24h]@1

  v1 = this;
  sprintf(acStr, "%u", this->m_uiResultValue);
  ((void (__stdcall *)(_DWORD))v1->m_pkLotInputEdit->vfptr[116].__vecDelDtor)(acStr);
}

//----- (004F3170) --------------------------------------------------------
void __thiscall DivideWin::SetValueToEdit(DivideWin *this, unsigned int num)
{
  DivideWin *v2; // esi@1
  char acStr[32]; // [sp+4h] [bp-24h]@1

  v2 = this;
  this->m_uiResultValue = num;
  sprintf(acStr, "%u", num);
  ((void (__stdcall *)(_DWORD))v2->m_pkLotInputEdit->vfptr[116].__vecDelDtor)(acStr);
}

//----- (004F31D0) --------------------------------------------------------
void __thiscall DivideWin::OnClose(DivideWin *this)
{
  DivideWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkLotInputEdit->vfptr[121].__vecDelDtor)(1);
  PgWin::OnClose((PgWin *)&v1->vfptr);
}

//----- (004F31F0) --------------------------------------------------------
void __thiscall DivideWin::Open(DivideWin *this, PgWin *pkRevWin, unsigned int uiOkMsg, unsigned int uiMax, char *pcText)
{
  DivideWin *v5; // esi@1
  NiRefObjectVtbl *v6; // edi@1
  unsigned int v7; // eax@1
  NiRefObjectVtbl *v8; // edi@1
  unsigned int v9; // eax@1
  char string; // [sp+8h] [bp-24h]@1

  v5 = this;
  ((void (__stdcall *)(_DWORD))this->m_apkTextWin[0].m_pObject->vfptr[118].__vecDelDtor)(pcText);
  v5->m_uiResultValue = uiMax;
  sprintf(&string, "%u", uiMax);
  ((void (__stdcall *)(_DWORD))v5->m_pkLotInputEdit->vfptr[116].__vecDelDtor)(&string);
  ((void (*)(void))v5->m_pkLotInputEdit->vfptr[120].__vecDelDtor)();
  EditWin::SelectAll(v5->m_pkLotInputEdit);
  v5->m_uiOkMsg = uiOkMsg;
  v5->m_pkRevWin = pkRevWin;
  v5->m_uiMax = uiMax;
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v5->vfptr);
  v6 = v5->vfptr;
  v7 = ((int (__thiscall *)(_DWORD))v5->vfptr[36].__vecDelDtor)(v5);
  v6[43].__vecDelDtor((NiRefObject *)v5, PgWin::ms_iMsX - (v7 >> 1));
  v8 = v5->vfptr;
  v9 = ((int (__thiscall *)(_DWORD))v5->vfptr[37].__vecDelDtor)(v5);
  v8[44].__vecDelDtor((NiRefObject *)v5, PgWin::ms_iMsY - (v9 >> 1));
}

//----- (004F32E0) --------------------------------------------------------
void __thiscall DivideWin::~DivideWin(DivideWin *this)
{
  DivideWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&DivideWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&DivideWin::`vftable'{for `IDirectMessenger'};
  this->m_pkLotInputEdit = 0;
  `eh vector destructor iterator'(
    this->m_apkTextWin,
    4u,
    2,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 988C98: using guessed type void (__thiscall *DivideWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 988CB4: using guessed type int (__thiscall *DivideWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F3360) --------------------------------------------------------
char __thiscall DivideWin::Create(DivideWin *this, PgFrameWork *pkFrameWork)
{
  DivideWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // ebx@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  NiSourceTexture *v10; // eax@15
  PgSprData *v11; // eax@16
  PgWinSpr *v12; // eax@18
  PgSprData *v13; // eax@21
  PgSprData *v14; // edi@22
  PgWinBut *v15; // eax@22
  PgWinBut *v16; // edi@22
  PgWin *v17; // ST4C_4@22
  PgFont *v18; // ST48_4@22
  unsigned int v19; // ST44_4@22
  unsigned int v20; // eax@22
  PgWinText *v21; // edi@22
  NiRefObjectVtbl *v22; // ebx@22
  NiUnsharedGeometryGroup *v23; // eax@22
  PgSprData *v24; // edi@22
  PgWinBut *v25; // eax@22
  PgWinBut *v26; // edi@22
  PgWin *v27; // ST4C_4@22
  PgFont *v28; // ST48_4@22
  unsigned int v29; // ST44_4@22
  unsigned int v30; // eax@22
  PgWinText *v31; // edi@22
  NiRefObjectVtbl *v32; // ebx@22
  NiUnsharedGeometryGroup *v33; // eax@22
  PgFont *v34; // eax@22
  int v35; // ebx@22
  unsigned int v36; // edi@24
  PgFont *v37; // ST48_4@24
  unsigned int v38; // ST44_4@24
  int v39; // eax@24
  NiSourceTexture *v40; // eax@24
  NiSourceTexture *v41; // edi@24
  NiRefObjectVtbl **v42; // ebx@33
  NiRefObjectVtbl *v43; // edi@33
  NiUnsharedGeometryGroup *v44; // eax@33
  NiNode *v45; // esi@34
  PgFont *pkFont; // [sp+48h] [bp-28h]@22
  unsigned int uiWidth; // [sp+4Ch] [bp-24h]@20
  unsigned int uiHeight; // [sp+50h] [bp-20h]@20
  NiSourceTexture *pkTexture; // [sp+54h] [bp-1Ch]@1
  int uiLeft; // [sp+58h] [bp-18h]@11
  int uiTop; // [sp+5Ch] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+60h] [bp-10h]@1
  int v53; // [sp+6Ch] [bp-4h]@1
  int i; // [sp+78h] [bp+8h]@22

  v2 = this;
  spNode.m_pObject = 0;
  v53 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  pkTexture = v3;
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v53 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "Game\\MessageWin.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "CalculatorWin", 0) )
  {
    v4 = spNode.m_pObject;
    v53 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
    goto LABEL_5;
  }
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  v12 = PgWinSpr::CreateWin(uiLeft, uiTop, v11, (PgWin *)&v2->vfptr, 0, 0);
  if ( v12 )
    v12->vfptr[60].__vecDelDtor((NiRefObject *)v12, 0);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "LotInput", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "LotInput", &uiLeft, &uiTop, v3);
    PgWinSpr::CreateWin(uiLeft, uiTop, v13, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkLotInputEdit = EditWin::CreateWin(
                             uiLeft + 2,
                             uiTop + 4,
                             uiWidth,
                             uiHeight,
                             (PgWin *)&v2->vfptr,
                             NUMBER,
                             0xAu,
                             3u,
                             0,
                             0,
                             1);
  }
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor02", &uiLeft, &uiTop, v3);
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick02");
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver02");
  v15 = PgWinBut::CreateWin(uiLeft, uiTop, v14, (PgWin *)&v2->vfptr, 0, 0, 0);
  v16 = v15;
  v17 = (PgWin *)v15;
  v18 = Font::Get(0);
  v19 = ((int (__thiscall *)(PgWinBut *))v16->vfptr[37].__vecDelDtor)(v16);
  v20 = ((int (__thiscall *)(PgWinBut *))v16->vfptr[36].__vecDelDtor)(v16);
  v21 = PgWinText::CreateWin(0, 1, v20, v19, v18, v17, 0, 0);
  v21->vfptr[122].__vecDelDtor((NiRefObject *)v21, 5u);
  v22 = v21->vfptr;
  v23 = TextData::Get(0x4F5F499Fu);
  v22[118].__vecDelDtor((NiRefObject *)v21, (unsigned int)v23);
  v21->vfptr[60].__vecDelDtor((NiRefObject *)v21, 0);
  v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor04", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(v24, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick04");
  PgSprData::Add(v24, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver04");
  v25 = PgWinBut::CreateWin(uiLeft, uiTop, v24, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v26 = v25;
  v27 = (PgWin *)v25;
  v28 = Font::Get(0);
  v29 = ((int (__thiscall *)(PgWinBut *))v26->vfptr[37].__vecDelDtor)(v26);
  v30 = ((int (__thiscall *)(PgWinBut *))v26->vfptr[36].__vecDelDtor)(v26);
  v31 = PgWinText::CreateWin(0, 1, v30, v29, v28, v27, 0, 0);
  v31->vfptr[122].__vecDelDtor((NiRefObject *)v31, 5u);
  v32 = v31->vfptr;
  v33 = TextData::Get(0x88A297E1);
  v32[118].__vecDelDtor((NiRefObject *)v31, (unsigned int)v33);
  v31->vfptr[60].__vecDelDtor((NiRefObject *)v31, 0);
  v34 = Font::Get(0);
  pkFont = v34;
  i = 0;
  v35 = (int)v2->m_apkTextWin;
  while ( 1 )
  {
    v36 = v34->m_uiDefHeight;
    v37 = v34;
    v38 = v34->m_uiDefHeight;
    v39 = ((int (__thiscall *)(DivideWin *))v2->vfptr[36].__vecDelDtor)(v2);
    v40 = (NiSourceTexture *)PgWinText::CreateWin(8, i * (v36 + 1) + 8, v39 - 16, v38, v37, (PgWin *)&v2->vfptr, 0, 0);
    v41 = *(NiSourceTexture **)v35;
    pkTexture = v40;
    if ( v41 != v40 )
    {
      if ( v41 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v41->m_uiRefCount) && v41 )
          v41->vfptr->__vecDelDtor((NiRefObject *)v41, 1u);
        v40 = pkTexture;
      }
      *(_DWORD *)v35 = v40;
      if ( v40 )
        InterlockedIncrement((volatile LONG *)&v40->m_uiRefCount);
    }
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v35 + 240))(0);
    v35 += 4;
    if ( ++i >= 2 )
      break;
    v34 = pkFont;
  }
  ((void (__stdcall *)(signed int))v2->m_apkTextWin[0].m_pObject->vfptr[122].__vecDelDtor)(5);
  v42 = &v2->m_apkTextWin[0].m_pObject->vfptr;
  v43 = *v42;
  v44 = TextData::Get(0xEAF9353B);
  v43[118].__vecDelDtor((NiRefObject *)v42, (unsigned int)v44);
  ((void (__stdcall *)(IDirectMessengerVtbl **))v2->vfptr->SetMsgHooker)(&v2->vfptr);
  ((void (__thiscall *)(DivideWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  v53 = -1;
  if ( spNode.m_pObject )
  {
    v45 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v45 )
        v45->vfptr->__vecDelDtor((NiRefObject *)v45, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004F3850) --------------------------------------------------------
void __thiscall DivideWin::OnCmdOk(DivideWin *this)
{
  DivideWin *v1; // esi@1
  EditWin *v2; // ecx@1
  const char *v3; // eax@1
  unsigned int v4; // eax@5
  unsigned int v5; // ST0C_4@8
  NiUnsharedGeometryGroup *v6; // eax@8
  char temp[256]; // [sp+4h] [bp-104h]@8

  v1 = this;
  v2 = this->m_pkLotInputEdit;
  v1->m_uiResultValue = 0;
  v3 = (const char *)((int (*)(void))v2->vfptr[113].__vecDelDtor)();
  if ( v3 && *v3 )
    v1->m_uiResultValue = atoi(v3);
  if ( v1->m_pkRevWin )
  {
    v4 = v1->m_uiResultValue;
    if ( v4 && v4 <= v1->m_uiMax )
    {
      PgWin::PostMsg((PgWin *)&v1->vfptr, 1u, 0, 0);
      PgWin::PostMsg(v1->m_pkRevWin, 5u, v1->m_uiOkMsg, v1->m_uiResultValue);
    }
    else
    {
      v5 = v1->m_uiMax;
      v6 = TextData::Get(0x97A69795);
      sprintf(temp, (const char *)v6, v5);
      GameFrameWork::AddSysMsg((GameFrameWork *)v1->m_pkFrameWork, temp);
    }
  }
}

//----- (004F3940) --------------------------------------------------------
void __thiscall DivideWin::OnEditEnd(DivideWin *this, unsigned int wParam, int lParam)
{
  DivideWin *v3; // esi@1

  v3 = this;
  DivideWin::OnCmdOk(this);
  ((void (*)(void))v3->m_pkLotInputEdit->vfptr[120].__vecDelDtor)();
}

//----- (004F3960) --------------------------------------------------------
void __thiscall DivideWin::DivideWin(DivideWin *this)
{
  DivideWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&DivideWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&DivideWin::`vftable'{for `IDirectMessenger'};
  `eh vector constructor iterator'(
    v1->m_apkTextWin,
    4u,
    2,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_eMode = 0;
  v1->m_uiResultValue = 0;
}
// 988C98: using guessed type void (__thiscall *DivideWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 988CB4: using guessed type int (__thiscall *DivideWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F39F0) --------------------------------------------------------
void __thiscall DivideWin::OnCommand(DivideWin *this, unsigned int wParam, int lParam)
{
  DivideWin *v3; // esi@1
  PgWin *v4; // eax@3

  v3 = this;
  if ( wParam )
  {
    if ( wParam == 1 )
    {
      this->m_uiResultValue = 0;
      PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
      v4 = v3->m_pkRevWin;
      if ( v4 )
        PgWin::PostMsg(v4, 5u, v3->m_uiOkMsg, 0);
    }
  }
  else
  {
    DivideWin::OnCmdOk(this);
  }
}

//----- (004F3A40) --------------------------------------------------------
DivideWin *__cdecl DivideWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  DivideWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x17Cu);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    DivideWin::DivideWin((DivideWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (DivideWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (004F3B70) --------------------------------------------------------
DivideWin *__thiscall DivideWin::`scalar deleting destructor'(DivideWin *this, unsigned int a2)
{
  DivideWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&DivideWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&DivideWin::`vftable'{for `IDirectMessenger'};
  this->m_pkLotInputEdit = 0;
  `eh vector destructor iterator'(
    this->m_apkTextWin,
    4u,
    2,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 988C98: using guessed type void (__thiscall *DivideWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 988CB4: using guessed type int (__thiscall *DivideWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F3C00) --------------------------------------------------------
void __thiscall EnchantGemToolTipWin::EnchantGemToolTipWin(EnchantGemToolTipWin *this)
{
  EnchantGemToolTipWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&EnchantGemToolTipWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&EnchantGemToolTipWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkBackPanel[0] = 0;
  v1->m_pkBackPanel[1] = 0;
  v1->m_pkEnchantGemText = 0;
}
// 989258: using guessed type void (__thiscall *EnchantGemToolTipWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 989274: using guessed type int (__thiscall *EnchantGemToolTipWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F3C30) --------------------------------------------------------
void __thiscall EnchantGemToolTipWin::~EnchantGemToolTipWin(EnchantGemToolTipWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&EnchantGemToolTipWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&EnchantGemToolTipWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 989258: using guessed type void (__thiscall *EnchantGemToolTipWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 989274: using guessed type int (__thiscall *EnchantGemToolTipWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F3C50) --------------------------------------------------------
void __thiscall EnchantGemToolTipWin::Clear(EnchantGemToolTipWin *this)
{
  EnchantGemToolTipWin *v1; // ebx@1
  char *v2; // esi@1
  signed int v3; // edi@1
  int v4; // esi@3
  signed int v5; // edi@3

  v1 = this;
  v2 = (char *)&this->m_pkWeaponIconWin[0].pkGemText;
  v3 = 3;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 472))(&unk_988F0B);
    IconSlotWin::Clear(*((IconSlotWin **)v2 - 1));
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v2 - 2) + 256))(0);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v2 - 3) + 256))(0);
    v2 += 16;
    --v3;
  }
  while ( v3 );
  v4 = (int)v1->m_pkBackPanel;
  v5 = 2;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 256))(0);
    v4 += 4;
    --v5;
  }
  while ( v5 );
  v1->m_ItemID = -1;
}

//----- (004F3CE0) --------------------------------------------------------
void __thiscall EnchantGemWin::EnchantGemWin(EnchantGemWin *this)
{
  EnchantGemWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&EnchantGemWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&EnchantGemWin::`vftable'{for `IDirectMessenger'};
}
// 989498: using guessed type void (__thiscall *EnchantGemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9894B4: using guessed type int (__thiscall *EnchantGemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F3D00) --------------------------------------------------------
void __thiscall EnchantGemWin::~EnchantGemWin(EnchantGemWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&EnchantGemWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&EnchantGemWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 989498: using guessed type void (__thiscall *EnchantGemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9894B4: using guessed type int (__thiscall *EnchantGemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F3D20) --------------------------------------------------------
void __thiscall EnchantGemWin::OnQuit(EnchantGemWin *this)
{
  PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
}

//----- (004F3D30) --------------------------------------------------------
void __thiscall EnchantGemWin::SignGemFailed(EnchantGemWin *this, ITEM_INVEN *rkLicenseInven)
{
  EnchantGemWin *v2; // ebx@1
  unsigned int v3; // edi@1
  IconSlotWin **v4; // esi@2
  IconSlotWin *v5; // ecx@3
  __int16 v6; // ax@3
  signed int v7; // eax@4

  v2 = this;
  v3 = 0;
  if ( this->m_uiSlotNums )
  {
    v4 = (IconSlotWin **)this->m_akEnchantGemFrame;
    do
    {
      v5 = *v4;
      v6 = rkLicenseInven->Inven >> 10;
      if ( v6 == 9 )
      {
        v7 = 0;
      }
      else
      {
        if ( v6 != 8 )
          return;
        v7 = 1;
      }
      if ( v5->m_kContentsDetail.kItem.uiSenderType == v7
        && v5->m_kContentsDetail.kItem.uiSenderIndex == (rkLicenseInven->Inven & 0x3FF) )
      {
        IconSlotWin::Clear(v5);
      }
      ++v3;
      v4 += 4;
    }
    while ( v3 < v2->m_uiSlotNums );
  }
}

//----- (004F3DA0) --------------------------------------------------------
void __thiscall EnchantGemDeleteWin::SetClearItemInven(EnchantGemDeleteWin *this, ITEM_INVEN *rkInven)
{
  this->m_kClearInven = (ITEM_INVEN)rkInven->Inven;
}

//----- (004F3DC0) --------------------------------------------------------
void __userpurge EnchantGemWin::OnSetEnchantGem(EnchantGemWin *this@<ecx>, int a2@<ebx>, SHINE_ITEM_STRUCT *kStruct, void *pvBody)
{
  EnchantGemWin *v4; // esi@1

  v4 = this;
  IconSlotWin::SetDropContents(this->m_pkWeaponIconWin, a2, *(DropContents **)pvBody);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v4->vfptr[137].__vecDelDtor)(v4, &kStruct->itemattr, kStruct->itemid);
}

//----- (004F3E00) --------------------------------------------------------
void __thiscall EnchantGemWin::OnSend2EndOfTrade(EnchantGemWin *this)
{
  bool v1; // zf@2
  char *v2; // esi@2
  DirectUserMsgBody_SendPacket kPacket; // [sp+0h] [bp-Ch]@2

  if ( EnchantGemWin::ms_bSend2EndOfTrade )
  {
    v1 = this->m_pkMsgHooker == 0;
    v2 = (char *)&this->vfptr;
    *(_DWORD *)&kPacket.wDepartment = 720904;
    kPacket.pvPacket = 0;
    if ( !v1 )
    {
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))this->m_pkMsgHooker->vfptr->SendDirectMessage)(23, &kPacket, v2);
      if ( *((_DWORD *)v2 + 1) )
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v2 + 1) + 20))(23, &kPacket, v2);
    }
    (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v2 + 20))(v2, 23, &kPacket, v2);
    EnchantGemWin::ms_bSend2EndOfTrade = 0;
  }
}
// A8CBE0: using guessed type bool EnchantGemWin::ms_bSend2EndOfTrade;

//----- (004F3E80) --------------------------------------------------------
void __thiscall EnchantGemWin::OnCommand(EnchantGemWin *this, unsigned int wParam, int lParam)
{
  if ( wParam )
  {
    if ( wParam <= 3 )
    {
      ((void (__stdcall *)(_DWORD))this->vfptr[136].__vecDelDtor)(wParam - 1);
    }
    else if ( wParam == 5 )
    {
      PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
    }
  }
}

//----- (004F3ED0) --------------------------------------------------------
void __thiscall EnchantGemWin::ResetContents(EnchantGemWin *this)
{
  EnchantGemWin *v1; // ebx@1
  unsigned int v2; // edi@1
  int v3; // esi@4

  v1 = this;
  v2 = 0;
  if ( this->m_pkChargedSocket )
    ((void (__stdcall *)(_DWORD))this->m_pkChargedSocket->vfptr[64].__vecDelDtor)(0);
  IconSlotWin::Clear(v1->m_pkWeaponIconWin);
  v1->m_pkWeaponIconWin->m_pkToolTipWin = 0;
  if ( v1->m_uiSlotNums > 0 )
  {
    v3 = (int)&v1->m_akEnchantGemFrame[0].pkBtn;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v3 - 4) + 472))(&unk_988F22);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 240))(1);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v3 + 4) + 240))(0);
      IconSlotWin::Clear(*(IconSlotWin **)(v3 - 8));
      ++v2;
      v3 += 16;
    }
    while ( v2 < v1->m_uiSlotNums );
  }
}

//----- (004F3F60) --------------------------------------------------------
void __thiscall EnchantGemWin::SignGemSuccess(EnchantGemWin *this, ITEM_INVEN *rkLicenseInven, Item *pkWeapon)
{
  EnchantGemWin *v3; // esi@1
  IconSlotWin *v4; // ecx@1

  v3 = this;
  v4 = this->m_pkWeaponIconWin;
  if ( v4->m_eType == CT_ITEM )
  {
    if ( pkWeapon )
    {
      if ( v3->m_uiType == 1 )
        IconSlotWin::Clear(v4);
      IconSlotWin::SetItem(v3->m_pkWeaponIconWin, pkWeapon, 1, 1);
    }
    ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v3->vfptr[137].__vecDelDtor)(
      v3,
      &pkWeapon->m_kStruct.itemattr,
      pkWeapon->m_kStruct.itemid);
    SoundMgr::PlayInterfaceSound(&g_kSoundMgr, WEAPONTITLE);
  }
}

//----- (004F3FD0) --------------------------------------------------------
char __thiscall EnchantGemToolTipWin::Create(EnchantGemToolTipWin *this, PgFrameWork *pkFrameWork)
{
  EnchantGemToolTipWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@3
  NiNode *v6; // esi@4
  char result; // al@8
  char *v8; // eax@9
  PgWinSpr *v9; // eax@9
  char *v10; // eax@9
  PgWinSpr *v11; // eax@9
  float v12; // edi@9
  int v13; // esi@9
  signed int v14; // ebx@9
  char *v15; // eax@10
  PgWinText *v16; // eax@10
  char *v17; // eax@10
  PgWinSpr *v18; // eax@10
  IconSlotWin *v19; // eax@10
  char *v20; // eax@10
  char *v21; // eax@10
  PgWinSpr *v22; // eax@10
  PgWinText *v23; // eax@11
  EnchantGemToolTipWin *v24; // edi@11
  NiRefObjectVtbl *v25; // esi@11
  NiUnsharedGeometryGroup *v26; // eax@11
  PgWinText *v27; // ecx@11
  NiNode *v28; // esi@12
  D3DXCOLOR v29; // [sp-14h] [bp-54h]@10
  NiSourceTexture *v30; // [sp-4h] [bp-44h]@10
  UIUtil ui; // [sp+10h] [bp-30h]@9
  EnchantGemToolTipWin *v32; // [sp+24h] [bp-1Ch]@1
  int iXOff; // [sp+28h] [bp-18h]@3
  int iYOff; // [sp+2Ch] [bp-14h]@3
  NiPointer<NiNode> spNode; // [sp+30h] [bp-10h]@1
  int v36; // [sp+3Ch] [bp-4h]@1

  v2 = this;
  v32 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v36 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\EnchantToolTip.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iXOff, &iYOff, 0);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "EnchantGemToolTipWin", 0) )
  {
    UIUtil::UIUtil(&ui);
    LOBYTE(v36) = 1;
    UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
    UIUtil::SetOffset(&ui, iXOff, iYOff);
    UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
    v8 = fs("Panel%02d", 2);
    v9 = UIUtil::CreateSpr(&ui, v8, 0);
    v2->m_pkBackPanel[0] = v9;
    v9->vfptr[60].__vecDelDtor((NiRefObject *)v9, 0);
    v10 = fs("Panel%02d", 3);
    v11 = UIUtil::CreateSpr(&ui, v10, 0);
    v2->m_pkBackPanel[1] = v11;
    v11->vfptr[60].__vecDelDtor((NiRefObject *)v11, 0);
    LODWORD(v12) = 1;
    v13 = (int)&v2->m_pkWeaponIconWin[0].pkGemText;
    v14 = 3;
    do
    {
      v30 = (NiSourceTexture *)5;
      v29 = Color::m_kDxWhiteColor;
      v15 = fs("TitleName%02d", v12);
      v16 = UIUtil::CreateTextNoSpr(&ui, v15, &byte_988F09, v29, (unsigned int)v30);
      *(_DWORD *)v13 = v16;
      v16->m_spTextGeom.m_pObject->m_bAutoWordWrap = 1;
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v13 + 240))(0);
      (*(void (__stdcall **)(signed int))(**(_DWORD **)v13 + 488))(4);
      v30 = 0;
      v29.a = v12;
      v17 = fs("Slot%02d", v12);
      v18 = UIUtil::CreateSpr(&ui, v17, v30);
      *(_DWORD *)(v13 - 8) = v18;
      v18->vfptr[60].__vecDelDtor((NiRefObject *)v18, 0);
      v19 = IconSlotWin::CreateWin(3, 3, *(PgWin **)(v13 - 8));
      LODWORD(v29.g) = 1854303943;
      *(_DWORD *)(v13 - 4) = v19;
      v20 = (char *)TextData2::Get(LODWORD(v29.g));
      PgWin::SetToolTipWinText(*(PgWin **)(v13 - 4), v20);
      *(_DWORD *)(*(_DWORD *)(v13 - 4) + 272) = g_pkToolTipWin;
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v13 - 4) + 240))(0);
      v30 = 0;
      v29.a = v12;
      v21 = fs("RegCancelBtnNor%02d", v12);
      v22 = UIUtil::CreateSpr(&ui, v21, v30);
      *(_DWORD *)(v13 - 12) = v22;
      v22->vfptr[64].__vecDelDtor((NiRefObject *)v22, 0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v13 - 12) + 240))(0);
      ++LODWORD(v12);
      v13 += 16;
      --v14;
    }
    while ( v14 );
    v23 = UIUtil::CreateTextNoSpr(&ui, "Text01", &byte_988F0A, Color::m_kDxWhiteColor, 5u);
    v24 = v32;
    v32->m_pkEnchantGemText = v23;
    v25 = v23->vfptr;
    v26 = TextData3::Get(0x4634170Fu);
    v27 = v24->m_pkEnchantGemText;
    v30 = (NiSourceTexture *)v26;
    v25[118].__vecDelDtor((NiRefObject *)v27, (unsigned int)v26);
    ((void (__stdcall *)(_DWORD))v24->m_pkEnchantGemText->vfptr[60].__vecDelDtor)(0);
    LOBYTE(v36) = 0;
    UIUtil::~UIUtil(&ui);
    v36 = -1;
    if ( spNode.m_pObject )
    {
      v28 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v28 )
          v28->vfptr->__vecDelDtor((NiRefObject *)v28, 1u);
      }
    }
    result = 1;
  }
  else
  {
    v6 = spNode.m_pObject;
    v36 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004F4330) --------------------------------------------------------
char __thiscall EnchantGemToolTipWin::SetEnchantGemDesc(EnchantGemToolTipWin *this, Item *pkWeaponItem)
{
  EnchantGemToolTipWin *v2; // ebx@1
  char result; // al@2
  char v4; // al@3
  int v5; // edi@3
  int v6; // esi@4
  int v7; // edi@8
  int v8; // ebx@8
  unsigned __int16 **v9; // eax@10
  unsigned __int16 *v10; // edi@11
  ActionEffectItem *v11; // eax@12
  ItemActionEffectDesc *v12; // ebx@13
  Item *v13; // edi@14
  int v14; // ebx@16
  char *v15; // eax@17
  char *v16; // eax@17
  int v17; // ST08_4@18
  char *v18; // eax@18
  ActionEffectItem *pkActionEffectItem; // [sp+8h] [bp-80h]@12
  EnchantGemToolTipWin *v20; // [sp+Ch] [bp-7Ch]@1
  int i; // [sp+10h] [bp-78h]@3
  int v22; // [sp+14h] [bp-74h]@4
  char *v23; // [sp+18h] [bp-70h]@4
  SHINE_ITEM_STRUCT kStruct; // [sp+1Ch] [bp-6Ch]@3

  v2 = this;
  v20 = this;
  if ( (unsigned __int8)((int (__thiscall *)(Item *))pkWeaponItem->vfptr[1].__vecDelDtor)(pkWeaponItem) == 5 )
  {
    qmemcpy(&kStruct, &pkWeaponItem->m_kStruct, sizeof(kStruct));
    v4 = kStruct.itemattr.weapon.maxSocketCount;
    v5 = 0;
    i = 0;
    if ( kStruct.itemattr.weapon.maxSocketCount )
    {
      v23 = (char *)&kStruct.itemattr.Bracelet + 48;
      v22 = (int)&v2->m_pkWeaponIconWin[2].pkGemText;
      v6 = (int)&v2->m_pkWeaponIconWin[0].pkSlotSpr;
      do
      {
        if ( *(_WORD *)v23 == -1 )
        {
          (*(void (__stdcall **)(signed int))(**(_DWORD **)v6 + 256))(1);
          if ( v5 > 0 )
            (*(void (__stdcall **)(signed int))(**(_DWORD **)v22 + 256))(1);
        }
        else
        {
          v7 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
          v8 = *(_WORD *)v23;
          if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                                + 16))(
                                  ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                                  v8) )
          {
            if ( (unsigned __int16)v8 <= *(_WORD *)(v7 + 200) )
            {
              v9 = (unsigned __int16 **)(*(_DWORD *)(v7 + 196) + 4 * v8);
              if ( *v9 )
              {
                v10 = *v9;
                if ( *v9 )
                {
                  v11 = ActionEffectItemTab::GetByItemID(*v10);
                  pkActionEffectItem = v11;
                  if ( v11 )
                  {
                    v12 = ItemActionEffectDescTab::GetByItemActionID(v11->ItemActionID);
                    if ( v12 )
                    {
                      kStruct.itemid = *v10;
                      v13 = Item::Create(&kStruct);
                      if ( v13 )
                      {
                        IconSlotWin::Clear(*(IconSlotWin **)(v6 + 4));
                        IconSlotWin::SetItem(*(IconSlotWin **)(v6 + 4), v13, 0, 0);
                      }
                      v14 = (int)v12->ItemActionDesc;
                      if ( pkActionEffectItem->EnchantMaxLot )
                      {
                        v17 = (unsigned __int8)v23[2];
                        v18 = (char *)TextData2::Get(0xCAEBF956);
                        v16 = fs(v18, v14, v17);
                      }
                      else
                      {
                        v15 = (char *)TextData2::Get(0xCAEBFA56);
                        v16 = fs(v15, v14);
                      }
                      (*(void (__stdcall **)(char *))(**(_DWORD **)(v6 + 8) + 472))(v16);
                      (*(void (__stdcall **)(signed int))(**(_DWORD **)v6 + 256))(1);
                      (*(void (__stdcall **)(signed int))(**(_DWORD **)(v6 + 4) + 256))(1);
                      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v6 - 4) + 256))(0);
                      if ( i > 0 )
                        (*(void (__stdcall **)(signed int))(**(_DWORD **)v22 + 256))(1);
                    }
                  }
                }
              }
            }
          }
          v2 = v20;
        }
        v4 = kStruct.itemattr.weapon.maxSocketCount;
        v22 += 4;
        v23 += 3;
        v5 = i + 1;
        v6 += 16;
        i = v5;
      }
      while ( v5 < (unsigned __int8)kStruct.itemattr.weapon.maxSocketCount );
    }
    if ( !kStruct.itemattr.weapon.createdSocketCount )
    {
      ((void (__stdcall *)(signed int))v2->m_pkWeaponIconWin[(unsigned __int8)v4].pkDisableSpr->vfptr[64].__vecDelDtor)(1);
      ((void (__stdcall *)(signed int))v2->m_pkWeaponIconWin[(unsigned __int8)kStruct.itemattr.weapon.maxSocketCount].pkSlotSpr->vfptr[64].__vecDelDtor)(1);
      if ( kStruct.itemattr.weapon.maxSocketCount )
        (*(void (__stdcall **)(signed int))(**((_DWORD **)&v2->m_pkWeaponIconWin[2].pkGemText
                                             + (unsigned __int8)kStruct.itemattr.weapon.maxSocketCount)
                                          + 256))(1);
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (004F45B0) --------------------------------------------------------
char __thiscall EnchantGemWin::Create(EnchantGemWin *this, PgFrameWork *pkFrameWork, unsigned int uiSlotNum)
{
  EnchantGemWin *v3; // ebx@1
  unsigned int v4; // eax@1
  int v5; // eax@1
  NiTexturePalette *v6; // esi@1
  const char *v7; // eax@12
  PgSprData *v8; // esi@13
  char *v9; // eax@13
  NiNode *v10; // esi@14
  NiSourceTexture *v12; // eax@19
  PgSprData *v13; // eax@22
  char *v14; // eax@24
  char *v15; // eax@24
  PgWinBut *v16; // esi@24
  char *v17; // eax@24
  char *v18; // eax@24
  PgSprData *v19; // eax@24
  PgWinSpr *v20; // eax@24
  IconSlotWin *v21; // eax@24
  unsigned int v22; // edi@25
  int v23; // esi@25
  char *v24; // eax@26
  PgWinAbbreviateText *v25; // eax@26
  PgTextGeometry *v26; // eax@26
  char *v27; // eax@26
  PgWinBut *v28; // eax@26
  char *v29; // eax@26
  PgWinSpr *v30; // eax@26
  IconSlotWin *v31; // eax@26
  char *v32; // eax@26
  char *v33; // eax@26
  PgWin *v34; // ecx@26
  char *v35; // eax@26
  PgWinSpr *v36; // eax@26
  int v37; // ecx@26
  int v38; // eax@26
  char *v39; // eax@26
  unsigned int v40; // edx@27
  char *v41; // eax@27
  PgWinSpr *v42; // eax@27
  NiNode *v43; // esi@28
  char v44[24]; // [sp+1Ch] [bp-60h]@5
  PgFrameWork *v45; // [sp+34h] [bp-48h]@5
  UIUtil ui; // [sp+48h] [bp-34h]@19
  int iXPos; // [sp+5Ch] [bp-20h]@26
  int iXOff; // [sp+60h] [bp-1Ch]@13
  int iYOff; // [sp+64h] [bp-18h]@13
  int iLeft; // [sp+68h] [bp-14h]@20
  NiPointer<NiNode> spNode; // [sp+6Ch] [bp-10h]@1
  int v52; // [sp+78h] [bp-4h]@1

  v3 = this;
  spNode.m_pObject = 0;
  v4 = uiSlotNum;
  this->m_uiSlotNums = uiSlotNum;
  v5 = v4 - 1;
  this->m_uiType = 0;
  v6 = pTexturePalette;
  v52 = 0;
  if ( v5 )
  {
    if ( v5 == 1 )
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      v45 = (PgFrameWork *)v6;
      *(_DWORD *)&v44[20] = &spNode;
      *(_DWORD *)&v44[16] = "Game\\EnchantWin02.nif";
    }
    else
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      v45 = (PgFrameWork *)v6;
      *(_DWORD *)&v44[20] = &spNode;
      *(_DWORD *)&v44[16] = "Game\\EnchantWin03.nif";
    }
  }
  else
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    v45 = (PgFrameWork *)v6;
    *(_DWORD *)&v44[20] = &spNode;
    *(_DWORD *)&v44[16] = "Game\\EnchantWin01.nif";
  }
  v7 = Folder::Merge(&Folder::m_acMenu, *(char **)&v44[16]);
  PgUtil::LoadNodeNifFile(v7, *(NiPointer<NiNode> **)&v44[20], (NiTexturePalette *)v45);
  if ( !spNode.m_pObject )
    return 0;
  v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iXOff, &iYOff, 0);
  v9 = fs("EnchantGemWin%2.d", v3->m_uiSlotNums);
  if ( !PgWinFrame::Create((PgWinFrame *)&v3->vfptr, 0, 0, v8, 0, pkFrameWork, v9, 0) )
  {
    v10 = spNode.m_pObject;
    v52 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
    return 0;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v52) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v3->vfptr);
  UIUtil::SetOffset(&ui, iXOff, iYOff);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v12 = MenuTexMgr::GetTexture(0x13u);
  if ( v12 )
  {
    v45 = (PgFrameWork *)v12;
    *(_DWORD *)&v44[20] = &uiSlotNum;
    *(_DWORD *)&v44[16] = &iLeft;
    *(_DWORD *)&v44[12] = "Theme";
  }
  else
  {
    *(float *)&v45 = 0.0;
    *(_DWORD *)&v44[20] = &uiSlotNum;
    *(_DWORD *)&v44[16] = &iLeft;
    *(_DWORD *)&v44[12] = "Theme";
  }
  v13 = PgSprData::Create(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          *(const char **)&v44[12],
          *(int **)&v44[16],
          *(int **)&v44[20],
          (NiSourceTexture *)v45);
  PgWinSpr::CreateWin(iLeft - iXOff, uiSlotNum - iYOff, v13, (PgWin *)&v3->vfptr, 0, 0);
  UIUtil::CreateSpr(&ui, "Panel02", 0);
  UIUtil::CreateSpr(&ui, "Panel03", 0);
  if ( v3->m_uiSlotNums == 3 )
    UIUtil::CreateSpr(&ui, "Panel04", 0);
  *(D3DXCOLOR *)v44 = Color::m_kDxWhiteColor;
  v14 = (char *)TextData2::Get(0xCCE10B19);
  UIUtil::CreateText(&ui, "NPCText", v14, 0, *(D3DXCOLOR *)v44, 5u, 0, 0);
  *(struct D3DXCOLOR *)v44 = Color::m_kDxWinTitleColor;
  v15 = (char *)TextData2::Get(0x2B4F2789u);
  UIUtil::CreateText(&ui, "ItemName", v15, 0, *(D3DXCOLOR *)v44, 4u, 0, 0);
  UIUtil::CreateBtn(&ui, 5u, "ClsNor", "ClsOver", "ClsClick", 0, 0);
  v16 = UIUtil::CreateBtn(&ui, 5u, "QuitBtnNor", "QuitBtnOver", "QuitBtnClick", 0, 0);
  *(D3DXCOLOR *)&v44[8] = Color::m_kDxWhiteColor;
  v17 = (char *)TextData2::Get(0xCB06243E);
  UIUtil::CreateAttachedText((PgWin *)&v16->vfptr, v17, *(D3DXCOLOR *)&v44[8], 5u);
  *(struct D3DXCOLOR *)&v44[8] = Color::m_kDxWinTitleColor;
  v18 = (char *)TextData2::Get(0x1F523439u);
  UIUtil::CreateTextNoSpr(&ui, "WinTitle", v18, *(D3DXCOLOR *)&v44[8], 5u);
  v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TgetSlot", &iLeft, (int *)&uiSlotNum, 0);
  v20 = PgWinSpr::CreateWin(iLeft - iXOff, uiSlotNum - iYOff, v19, (PgWin *)&v3->vfptr, 0, 0);
  v21 = IconSlotWin::CreateWin(3, 3, (PgWin *)&v20->vfptr);
  v3->m_pkWeaponIconWin = v21;
  v21->vfptr[60].__vecDelDtor((NiRefObject *)v21, 1u);
  if ( v3->m_uiSlotNums > 0 )
  {
    v22 = 1;
    v23 = (int)&v3->m_akEnchantGemFrame[0].pkBtn;
    do
    {
      *(float *)&v45 = 0.0;
      *(_DWORD *)&v44[20] = 0;
      *(_DWORD *)&v44[16] = 4;
      *(D3DXCOLOR *)v44 = Color::m_kDxWhiteColor;
      v24 = fs("TitleName%02d", v22);
      v25 = UIUtil::CreateText(
              &ui,
              v24,
              &byte_988F16,
              3u,
              *(D3DXCOLOR *)v44,
              *(unsigned int *)&v44[16],
              *(NiSourceTexture **)&v44[20],
              (bool)v45);
      *(float *)&v45 = 0.0;
      *(_DWORD *)(v23 - 4) = v25;
      v26 = v25->m_spTextGeom.m_pObject;
      *(_DWORD *)&v44[20] = v22;
      *(_DWORD *)&v44[16] = "RegBtnLock%02d";
      v26->m_bAutoWordWrap = 1;
      *(_DWORD *)&v44[20] = fs(*(char **)&v44[16], *(_DWORD *)&v44[20]);
      *(_DWORD *)&v44[16] = v22;
      *(_DWORD *)&v44[16] = fs("RegBtnClick%02d", v22);
      *(_DWORD *)&v44[12] = v22;
      *(_DWORD *)&v44[12] = fs("RegBtnOver%02d", v22);
      *(_DWORD *)&v44[8] = v22;
      v27 = fs("RegBtnNor%02d", v22);
      v28 = UIUtil::CreateBtn(
              &ui,
              v22,
              v27,
              *(char **)&v44[12],
              *(char **)&v44[16],
              *(char **)&v44[20],
              (NiSourceTexture *)v45);
      *(float *)&v45 = 0.0;
      *(_DWORD *)&v44[20] = v22;
      *(_DWORD *)&v44[16] = "Slot%02d";
      *(_DWORD *)v23 = v28;
      v29 = fs(*(char **)&v44[16], *(_DWORD *)&v44[20]);
      v30 = UIUtil::CreateSpr(&ui, v29, (NiSourceTexture *)v45);
      v31 = IconSlotWin::CreateWin(3, 3, (PgWin *)&v30->vfptr);
      *(_DWORD *)&v44[12] = 776415289;
      *(_DWORD *)(v23 - 8) = v31;
      v32 = (char *)TextData2::Get(*(unsigned int *)&v44[12]);
      PgWin::SetToolTipWinText(*(PgWin **)(v23 - 8), v32);
      *(_DWORD *)(*(_DWORD *)(v23 - 8) + 272) = g_pkToolTipWin;
      (*(void (__stdcall **)(signed int))(**(_DWORD **)(v23 - 8) + 240))(1);
      *(_DWORD *)(*(_DWORD *)v23 + 272) = g_pkToolTipWin;
      v33 = (char *)TextData2::Get(0x5A927D7Du);
      PgWin::SetToolTipWinText(*(PgWin **)v23, v33);
      (*(void (__stdcall **)(signed int))(**(_DWORD **)v23 + 240))(1);
      v34 = *(PgWin **)v23;
      iXPos = 0;
      pkFrameWork = 0;
      ((void (__stdcall *)(int *, PgFrameWork **))v34->vfptr[45].__vecDelDtor)(&iXPos, &pkFrameWork);
      *(float *)&v45 = 0.0;
      *(_DWORD *)&v44[20] = v22;
      v35 = fs("RegBtnNor%02d", v22);
      v36 = UIUtil::CreateSpr(&ui, v35, (NiSourceTexture *)v45);
      v45 = pkFrameWork;
      v37 = iXPos;
      *(_DWORD *)(v23 + 4) = v36;
      ((void (__thiscall *)(PgWinSpr *, int, PgFrameWork *))v36->vfptr[77].__vecDelDtor)(v36, v37, v45);
      v38 = *(_DWORD *)(v23 + 4);
      *(float *)&v45 = 2.0616661e16;
      *(_DWORD *)(v38 + 272) = g_pkToolTipWin;
      v39 = (char *)TextData2::Get((unsigned int)v45);
      PgWin::SetToolTipWinText(*(PgWin **)(v23 + 4), v39);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v23 + 4) + 276))(0.0);
      (*(void (__stdcall **)(signed int))(**(_DWORD **)(v23 + 4) + 256))(1);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v23 + 4) + 240))(0);
      ++v22;
      v23 += 16;
    }
    while ( v22 - 1 < v3->m_uiSlotNums );
  }
  v40 = v3->m_uiSlotNums;
  *(float *)&v45 = 0.0;
  *(_DWORD *)&v44[20] = v40;
  v41 = fs("RegCancelBtnNor%02d", v40);
  v42 = UIUtil::CreateSpr(&ui, v41, (NiSourceTexture *)v45);
  v3->m_pkChargedSocket = v42;
  v42->vfptr[64].__vecDelDtor((NiRefObject *)v42, 0);
  ((void (__stdcall *)(_DWORD))v3->m_pkChargedSocket->vfptr[60].__vecDelDtor)(0);
  ((void (__thiscall *)(EnchantGemWin *, unsigned int, unsigned int, _DWORD, _DWORD))v3->vfptr[59].__vecDelDtor)(
    v3,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.0,
    0.5);
  LOBYTE(v52) = 0;
  UIUtil::~UIUtil(&ui);
  v52 = -1;
  if ( spNode.m_pObject )
  {
    v43 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v43 )
        v43->vfptr->__vecDelDtor((NiRefObject *)v43, 1u);
    }
  }
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004F4C00) --------------------------------------------------------
void __thiscall EnchantGemWin::DirectMessage(EnchantGemWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  IDirectMessenger *v4; // esi@1
  EnchantGemWin *v5; // ebx@1
  NiTListItem<NiPointer<NiProperty> > *v6; // eax@2
  IDirectMessenger *v7; // eax@3
  bool v8; // zf@5
  int v9; // eax@5
  int v10; // ecx@7
  int v11; // eax@10
  GameFrameWork *v12; // edi@11
  void *(__thiscall *v13)(NiTArray<NiPointer<NiAVObject> > *, unsigned int); // eax@12
  int v14; // eax@12
  NiTArray<NiPointer<NiAVObject> >Vtbl *v15; // edx@12
  int v16; // eax@12
  int v17; // edi@19
  int v18; // eax@20
  int v19; // eax@21
  Item *v20; // eax@26
  NiUnsharedGeometryGroup *v21; // esi@28
  NiUnsharedGeometryGroup *v22; // esi@36
  SHINE_ITEM_STRUCT v23; // [sp-70h] [bp-F4h]@12
  __int16 v24; // [sp-Ch] [bp-90h]@12
  char v25; // [sp-Ah] [bp-8Eh]@12
  int v26; // [sp-8h] [bp-8Ch]@12
  void *v27; // [sp-4h] [bp-88h]@11
  IDirectMessenger *v28; // [sp+Ch] [bp-78h]@1
  void *v29; // [sp+10h] [bp-74h]@1
  unsigned int i; // [sp+14h] [bp-70h]@11
  SHINE_ITEM_STRUCT kStruct; // [sp+18h] [bp-6Ch]@11

  v4 = pkFrom;
  v5 = this;
  v29 = pvBody;
  v28 = pkFrom;
  if ( iMsgTag != 22 )
    return;
  v6 = this->m_kPropertyList.m_pkHead;
  if ( v6 )
    v7 = (IDirectMessenger *)&v6[19].m_pkPrev;
  else
    v7 = 0;
  v8 = pkFrom == v7;
  v9 = *(_DWORD *)pvBody;
  if ( v8 )
  {
    if ( *(_DWORD *)(v9 + 16) )
      return;
    v10 = *(_DWORD *)(v9 + 8);
    if ( v10 )
    {
      if ( v10 != 1 )
        return;
    }
    if ( (unsigned __int8)(*(int (__thiscall **)(_DWORD))(**(_DWORD **)(v9 + 20) + 4))(*(_DWORD *)(v9 + 20)) == 5 )
    {
      v11 = *(_DWORD *)(*(_DWORD *)pvBody + 20);
      if ( !*(_DWORD *)(*(_DWORD *)(v11 + 112) + 98) )
      {
        qmemcpy(&kStruct, (const void *)(v11 + 8), 0x66u);
        v27 = GameFrameWorkID;
        *((_BYTE *)&kStruct.itemattr.Bracelet + 100) = *(_BYTE *)(v11 + 110);
        v12 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
        i = (unsigned int)v12;
        if ( v12 )
        {
          v13 = v5[-1].m_kChildren.vfptr[42].__vecDelDtor;
          v27 = (void *)v5->m_kPropertyList.m_kAllocator.m_uiCount;
          v14 = ((int (__thiscall *)(NiTArray<NiPointer<NiAVObject> > *))v13)(&v5[-1].m_kChildren);
          v15 = v5[-1].m_kChildren.vfptr;
          v26 = v14;
          v16 = ((int (__thiscall *)(NiTArray<NiPointer<NiAVObject> > *))v15[41].__vecDelDtor)(&v5[-1].m_kChildren);
          GameFrameWork::SetEnchantGemWinPos(v12, v16, v26, (unsigned int)v27);
          v27 = (void *)v5->m_kPropertyList.m_kAllocator.m_uiCount;
          qmemcpy(&v23, &kStruct, 0x64u);
          v24 = *((_WORD *)&kStruct.itemattr.Bracelet + 49);
          v25 = *((_BYTE *)&kStruct.itemattr.Bracelet + 100);
          GameFrameWork::OnOpenEnchantGemWin((GameFrameWork *)i, v23, v29, (unsigned int)v27);
        }
        *((_BYTE *)v29 + 12) = 0;
        return;
      }
    }
    v27 = (void *)-1913391614;
    goto LABEL_36;
  }
  if ( *(_DWORD *)(v9 + 16) || *(_DWORD *)(v9 + 8) )
    return;
  if ( (unsigned __int8)(*(int (__thiscall **)(_DWORD))(**(_DWORD **)(v9 + 20) + 4))(*(_DWORD *)(v9 + 20)) != 34 )
  {
    v27 = (void *)-721622281;
LABEL_36:
    v22 = TextData2::Get((unsigned int)v27);
    if ( v5->m_uiRefCount )
    {
      (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, EnchantGemWin *))(*(_DWORD *)v5->m_uiRefCount + 4))(
        25,
        v22,
        v5);
      if ( v5->m_uiRefCount )
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, EnchantGemWin *))(*(_DWORD *)v5->m_uiRefCount + 20))(
          25,
          v22,
          v5);
    }
    ((void (__thiscall *)(EnchantGemWin *, signed int, NiUnsharedGeometryGroup *, EnchantGemWin *))v5->vfptr[5].__vecDelDtor)(
      v5,
      25,
      v22,
      v5);
    return;
  }
  v8 = v5->m_kPropertyList.m_pkTail == 0;
  i = 0;
  if ( !v8 )
  {
    v17 = (int)&v5->m_kWorld.m_Rotate.m_pEntry[1][1];
    do
    {
      v18 = *(_DWORD *)(v17 - 8);
      if ( v18 )
        v19 = v18 + 232;
      else
        v19 = 0;
      if ( v4 == (IDirectMessenger *)v19 && (unsigned __int8)(*(int (**)(void))(**(_DWORD **)v17 + 244))() && v4 )
      {
        v20 = IconSlotWin::GetItem((IconSlotWin *)v5->m_kPropertyList.m_pkHead);
        if ( !v20 )
          return;
        if ( v20->m_pkInfo->Grade == *(_DWORD *)(*(_DWORD *)(*(_DWORD *)(*(_DWORD *)v29 + 20) + 112) + 131) )
        {
          (*(void (__thiscall **)(unsigned int *, signed int))(v4[-20].m_uiMessageNum + 256))(
            &v4[-20].m_uiMessageNum,
            1);
          *((_BYTE *)v29 + 12) = 1;
        }
        else
        {
          v21 = TextData3::Get(0xE94B4980);
          if ( v5->m_uiRefCount )
          {
            (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, EnchantGemWin *))(*(_DWORD *)v5->m_uiRefCount
                                                                                          + 4))(
              25,
              v21,
              v5);
            if ( v5->m_uiRefCount )
              (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, EnchantGemWin *))(*(_DWORD *)v5->m_uiRefCount
                                                                                            + 20))(
                25,
                v21,
                v5);
          }
          ((void (__thiscall *)(EnchantGemWin *, signed int, NiUnsharedGeometryGroup *, EnchantGemWin *))v5->vfptr[5].__vecDelDtor)(
            v5,
            25,
            v21,
            v5);
          v4 = v28;
        }
      }
      v17 += 16;
      ++i;
    }
    while ( (NiTListItem<NiPointer<NiProperty> > *)i < v5->m_kPropertyList.m_pkTail );
  }
}

//----- (004F4EC0) --------------------------------------------------------
void __userpurge EnchantGemWin::SetEnchantGem(EnchantGemWin *this@<ecx>, signed int a2@<ebx>, int a3@<esi>, ShineItemAttr_Weapon *pkWeapon, unsigned __int16 wepID)
{
  ShineItemAttr_Weapon *v5; // eax@1
  EnchantGemWin *v6; // edi@1
  char *v7; // esi@3
  char *v8; // eax@4
  int v9; // edi@7
  int v10; // ebx@7
  unsigned __int16 **v11; // eax@9
  unsigned __int16 *v12; // edi@10
  ActionEffectItem *v13; // eax@11
  ItemActionEffectDesc *v14; // ebx@12
  Item *v15; // eax@13
  int v16; // ebx@15
  char *v17; // eax@16
  char *v18; // eax@16
  int v19; // ST08_4@17
  char *v20; // eax@17
  void (__stdcall *v21)(signed int); // eax@20
  PgWinSpr *v22; // ecx@25
  char *v23; // eax@26
  int v24; // esi@28
  int v25; // ST10_4@28
  signed int v26; // [sp-8h] [bp-90h]@3
  int v27; // [sp-4h] [bp-8Ch]@2
  ActionEffectItem *pkActionEffectItem; // [sp+4h] [bp-84h]@11
  int i; // [sp+Ch] [bp-7Ch]@2
  char *v30; // [sp+10h] [bp-78h]@3
  EnchantGemWin *v31; // [sp+14h] [bp-74h]@1
  bool bDisableLastBtn; // [sp+1Bh] [bp-6Dh]@2
  SHINE_ITEM_STRUCT kStruct; // [sp+1Ch] [bp-6Ch]@13

  v5 = pkWeapon;
  v6 = this;
  v31 = this;
  if ( pkWeapon )
  {
    v27 = a3;
    bDisableLastBtn = 0;
    i = 0;
    if ( pkWeapon->maxSocketCount )
    {
      v7 = (char *)&this->m_akEnchantGemFrame[0].pkBtn;
      v30 = (char *)pkWeapon->gemSockets;
      v26 = a2;
      do
      {
        (*(void (__stdcall **)(void *, signed int))(**((_DWORD **)v7 - 1) + 472))(&unk_988F17, v26);
        IconSlotWin::Clear(*((IconSlotWin **)v7 - 2));
        v8 = (char *)TextData2::Get(0x6E866EC7u);
        PgWin::SetToolTipWinText(*((PgWin **)v7 - 2), v8);
        *(_DWORD *)(*((_DWORD *)v7 - 2) + 272) = g_pkToolTipWin;
        if ( *(_WORD *)v30 != -1 || bDisableLastBtn )
        {
          v9 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
          v10 = *(_WORD *)v30;
          v26 = *(_WORD *)v30;
          if ( (unsigned __int8)(*(int (__thiscall **)(int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable)
            && (unsigned __int16)v10 <= *(_WORD *)(v9 + 200)
            && (v11 = (unsigned __int16 **)(*(_DWORD *)(v9 + 196) + 4 * v10), *v11)
            && (v12 = *v11) != 0 )
          {
            v13 = ActionEffectItemTab::GetByItemID(*v12);
            pkActionEffectItem = v13;
            if ( v13 )
            {
              v14 = ItemActionEffectDescTab::GetByItemActionID(v13->ItemActionID);
              if ( v14 )
              {
                kStruct.itemid = *v12;
                v15 = Item::Create(&kStruct);
                if ( v15 )
                  IconSlotWin::SetItem(*((IconSlotWin **)v7 - 2), v15, 1, 1);
                v16 = (int)v14->ItemActionDesc;
                if ( pkActionEffectItem->EnchantMaxLot )
                {
                  v19 = (unsigned __int8)v30[2];
                  v20 = (char *)TextData2::Get(0xCAEBF956);
                  v18 = fs(v20, v16, v19);
                }
                else
                {
                  v17 = (char *)TextData2::Get(0xCAEBFA56);
                  v18 = fs(v17, v16);
                }
                (*(void (__stdcall **)(char *))(**((_DWORD **)v7 - 1) + 472))(v18);
              }
              (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v7 + 240))(0);
            }
          }
          else
          {
            v21 = *(void (__stdcall **)(signed int))(**(_DWORD **)v7 + 240);
            if ( bDisableLastBtn )
            {
              v21(0);
            }
            else
            {
              v21(1);
              bDisableLastBtn = 1;
            }
          }
          v6 = v31;
        }
        else
        {
          v26 = 1;
          (*(void (**)(void))(**(_DWORD **)v7 + 240))();
        }
        v5 = pkWeapon;
        v30 += 3;
        v7 += 16;
        ++i;
      }
      while ( i < pkWeapon->maxSocketCount );
    }
    v22 = v6->m_pkChargedSocket;
    if ( v5->createdSocketCount )
    {
      ((void (__stdcall *)(_DWORD, int))v22->vfptr[64].__vecDelDtor)(0, v27);
    }
    else
    {
      ((void (__stdcall *)(signed int, int))v22->vfptr[64].__vecDelDtor)(1, v27);
      (*((void (__stdcall **)(_DWORD))(&v6->vfptr)[4 * (v6->m_uiSlotNums + 21)]->__vecDelDtor + 60))(0);
      v23 = (char *)TextData2::Get(0x76A66687u);
      PgWin::SetToolTipWinText(*((PgWin **)&v6->m_bLeftLike + 4 * v6->m_uiSlotNums), v23);
    }
    v24 = **((_DWORD **)&v6->m_fInitYPos + 4 * v6->m_uiSlotNums);
    v25 = (unsigned __int8)(*((int (**)(void))(&v6->vfptr)[4 * (v6->m_uiSlotNums + 21)]->__vecDelDtor + 61))() == 0;
    (*(void (__thiscall **)(_DWORD))(v24 + 240))(*((_DWORD *)&v6->m_fInitYPos + 4 * v6->m_uiSlotNums));
  }
}
// 4F4EC0: could not find valid save-restore pair for ebx
// 4F4EC0: could not find valid save-restore pair for esi
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (004F5170) --------------------------------------------------------
void __thiscall EnchantGemWin::OnRegBtn(EnchantGemWin *this, int iIndex)
{
  EnchantGemWin *v2; // esi@1
  IconSlotWin *v3; // ecx@1
  IconSlotWin *v4; // edx@2
  unsigned int v5; // eax@3
  __int16 v6; // ax@4
  int v7; // esi@9
  NiUnsharedGeometryGroup *v8; // edi@9
  PROTO_NC_ITEM_ENCHANT_ADD_GEM_REQ kProto; // [sp+8h] [bp-8h]@4

  v2 = this;
  v3 = this->m_pkWeaponIconWin;
  if ( v3->m_eType || (v4 = v2->m_akEnchantGemFrame[iIndex].pkSlot, v4->m_eType) )
  {
    v7 = (int)&v2->vfptr;
    v8 = TextData2::Get(0xBD5A1741);
    if ( *(_DWORD *)(v7 + 4) )
    {
      (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v7 + 4) + 4))(25, v8, v7);
      if ( *(_DWORD *)(v7 + 4) )
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v7 + 4) + 20))(25, v8, v7);
    }
    (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v7 + 20))(v7, 25, v8, v7);
  }
  else
  {
    v5 = v3->m_kContentsDetail.kItem.uiSenderType;
    if ( v5 == 1 )
    {
      v6 = kProto.equipment.Inven & 0x3FF | 0x2000;
      kProto.equipment.Inven = kProto.equipment.Inven & 0x3FF | 0x2000;
    }
    else if ( v5 )
    {
      v6 = kProto.equipment.Inven;
    }
    else
    {
      v6 = kProto.equipment.Inven & 0x3FF | 0x2400;
      kProto.equipment.Inven = kProto.equipment.Inven & 0x3FF | 0x2400;
    }
    kProto.equipment.Inven = (v6 ^ LOWORD(v3->m_kContentsDetail.kItem.uiSenderIndex)) & 0x3FF ^ v6;
    kProto.gem.Inven = ((kProto.gem.Inven & 0x3FF | 0x2400) ^ LOWORD(v4->m_kContentsDetail.kItem.uiSenderIndex)) & 0x3FF ^ (kProto.gem.Inven & 0x3FF | 0x2400);
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x40u, &kProto, 4);
  }
}

//----- (004F5290) --------------------------------------------------------
void __thiscall EnchantGemWin::OnClose(EnchantGemWin *this)
{
  EnchantGemWin *v1; // esi@1
  GameFrameWork *v2; // edi@1
  unsigned int v3; // ST08_4@2
  int v4; // ST04_4@2
  int v5; // eax@2

  v1 = this;
  EnchantGemWin::ResetContents(this);
  EnchantGemWin::OnSend2EndOfTrade(v1);
  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    v3 = v1->m_uiType;
    v4 = ((int (__thiscall *)(_DWORD))v1->vfptr[42].__vecDelDtor)(v1);
    v5 = ((int (__thiscall *)(_DWORD))v1->vfptr[41].__vecDelDtor)(v1);
    GameFrameWork::SetEnchantGemWinPos(v2, v5, v4, v3);
  }
}

//----- (004F52F0) --------------------------------------------------------
char __thiscall EnchantGemDeleteWin::Create(EnchantGemDeleteWin *this, PgFrameWork *pkFrameWork, unsigned int uiSlotNum)
{
  EnchantGemDeleteWin *v3; // ebx@1
  unsigned int v4; // eax@1
  int v5; // eax@1
  NiTexturePalette *v6; // esi@1
  const char *v7; // eax@12
  PgSprData *v8; // eax@13
  NiNode *v9; // esi@14
  NiSourceTexture *v11; // eax@19
  PgSprData *v12; // eax@22
  char *v13; // eax@24
  char *v14; // eax@24
  PgWinBut *v15; // esi@24
  char *v16; // eax@24
  char *v17; // eax@24
  PgSprData *v18; // eax@24
  PgWinSpr *v19; // eax@24
  IconSlotWin *v20; // eax@24
  unsigned int v21; // edi@25
  int v22; // esi@25
  char *v23; // eax@26
  PgWinAbbreviateText *v24; // eax@26
  PgTextGeometry *v25; // eax@26
  char *v26; // eax@26
  PgWinBut *v27; // eax@26
  char *v28; // eax@26
  PgWinSpr *v29; // eax@26
  IconSlotWin *v30; // eax@26
  char *v31; // eax@26
  char *v32; // eax@26
  PgWin *v33; // ecx@26
  char *v34; // eax@26
  PgWinSpr *v35; // eax@26
  int v36; // ecx@26
  int v37; // eax@26
  char *v38; // eax@26
  unsigned int v39; // edx@27
  char *v40; // eax@27
  PgWinSpr *v41; // eax@27
  NiNode *v42; // esi@28
  char v43[24]; // [sp+1Ch] [bp-60h]@5
  PgFrameWork *v44; // [sp+34h] [bp-48h]@5
  UIUtil ui; // [sp+48h] [bp-34h]@19
  int iXPos; // [sp+5Ch] [bp-20h]@26
  int iXOff; // [sp+60h] [bp-1Ch]@13
  int iYOff; // [sp+64h] [bp-18h]@13
  int iLeft; // [sp+68h] [bp-14h]@20
  NiPointer<NiNode> spNode; // [sp+6Ch] [bp-10h]@1
  int v51; // [sp+78h] [bp-4h]@1

  v3 = this;
  spNode.m_pObject = 0;
  v4 = uiSlotNum;
  this->m_uiSlotNums = uiSlotNum;
  v5 = v4 - 1;
  this->m_uiType = 1;
  v6 = pTexturePalette;
  v51 = 0;
  if ( v5 )
  {
    if ( v5 == 1 )
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      v44 = (PgFrameWork *)v6;
      *(_DWORD *)&v43[20] = &spNode;
      *(_DWORD *)&v43[16] = "Game\\EnchantWin02.nif";
    }
    else
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      v44 = (PgFrameWork *)v6;
      *(_DWORD *)&v43[20] = &spNode;
      *(_DWORD *)&v43[16] = "Game\\EnchantWin03.nif";
    }
  }
  else
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    v44 = (PgFrameWork *)v6;
    *(_DWORD *)&v43[20] = &spNode;
    *(_DWORD *)&v43[16] = "Game\\EnchantWin01.nif";
  }
  v7 = Folder::Merge(&Folder::m_acMenu, *(char **)&v43[16]);
  PgUtil::LoadNodeNifFile(v7, *(NiPointer<NiNode> **)&v43[20], (NiTexturePalette *)v44);
  if ( !spNode.m_pObject )
    return 0;
  v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iXOff, &iYOff, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v3->vfptr, 0, 0, v8, 0, pkFrameWork, "EnchantGemDeleteWin", 0) )
  {
    v9 = spNode.m_pObject;
    v51 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v9 )
        v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    }
    return 0;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v51) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v3->vfptr);
  UIUtil::SetOffset(&ui, iXOff, iYOff);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v11 = MenuTexMgr::GetTexture(0x13u);
  if ( v11 )
  {
    v44 = (PgFrameWork *)v11;
    *(_DWORD *)&v43[20] = &uiSlotNum;
    *(_DWORD *)&v43[16] = &iLeft;
    *(_DWORD *)&v43[12] = "Theme";
  }
  else
  {
    *(float *)&v44 = 0.0;
    *(_DWORD *)&v43[20] = &uiSlotNum;
    *(_DWORD *)&v43[16] = &iLeft;
    *(_DWORD *)&v43[12] = "Theme";
  }
  v12 = PgSprData::Create(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          *(const char **)&v43[12],
          *(int **)&v43[16],
          *(int **)&v43[20],
          (NiSourceTexture *)v44);
  PgWinSpr::CreateWin(iLeft - iXOff, uiSlotNum - iYOff, v12, (PgWin *)&v3->vfptr, 0, 0);
  UIUtil::CreateSpr(&ui, "Panel02", 0);
  UIUtil::CreateSpr(&ui, "Panel03", 0);
  if ( v3->m_uiSlotNums == 3 )
    UIUtil::CreateSpr(&ui, "Panel04", 0);
  *(D3DXCOLOR *)v43 = Color::m_kDxWhiteColor;
  v13 = (char *)TextData2::Get(0xCCE10B19);
  UIUtil::CreateText(&ui, "NPCText", v13, 0, *(D3DXCOLOR *)v43, 5u, 0, 0);
  *(struct D3DXCOLOR *)v43 = Color::m_kDxWinTitleColor;
  v14 = (char *)TextData2::Get(0x2B4F2789u);
  UIUtil::CreateText(&ui, "ItemName", v14, 0, *(D3DXCOLOR *)v43, 4u, 0, 0);
  UIUtil::CreateBtn(&ui, 5u, "ClsNor", "ClsOver", "ClsClick", 0, 0);
  v15 = UIUtil::CreateBtn(&ui, 5u, "QuitBtnNor", "QuitBtnOver", "QuitBtnClick", 0, 0);
  *(D3DXCOLOR *)&v43[8] = Color::m_kDxWhiteColor;
  v16 = (char *)TextData2::Get(0xCB06243E);
  UIUtil::CreateAttachedText((PgWin *)&v15->vfptr, v16, *(D3DXCOLOR *)&v43[8], 5u);
  *(struct D3DXCOLOR *)&v43[8] = Color::m_kDxWinTitleColor;
  v17 = (char *)TextData2::Get(0x1E4B2C7Au);
  UIUtil::CreateTextNoSpr(&ui, "WinTitle", v17, *(D3DXCOLOR *)&v43[8], 5u);
  v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TgetSlot", &iLeft, (int *)&uiSlotNum, 0);
  v19 = PgWinSpr::CreateWin(iLeft - iXOff, uiSlotNum - iYOff, v18, (PgWin *)&v3->vfptr, 0, 0);
  v20 = IconSlotWin::CreateWin(3, 3, (PgWin *)&v19->vfptr);
  v3->m_pkWeaponIconWin = v20;
  v20->vfptr[60].__vecDelDtor((NiRefObject *)v20, 1u);
  if ( v3->m_uiSlotNums > 0 )
  {
    v21 = 1;
    v22 = (int)&v3->m_akEnchantGemFrame[0].pkBtn;
    do
    {
      *(float *)&v44 = 0.0;
      *(_DWORD *)&v43[20] = 0;
      *(_DWORD *)&v43[16] = 5;
      *(D3DXCOLOR *)v43 = Color::m_kDxWhiteColor;
      v23 = fs("TitleName%02d", v21);
      v24 = UIUtil::CreateText(
              &ui,
              v23,
              &byte_988F23,
              0,
              *(D3DXCOLOR *)v43,
              *(unsigned int *)&v43[16],
              *(NiSourceTexture **)&v43[20],
              (bool)v44);
      *(float *)&v44 = 0.0;
      *(_DWORD *)(v22 - 4) = v24;
      v25 = v24->m_spTextGeom.m_pObject;
      *(_DWORD *)&v43[20] = v21;
      *(_DWORD *)&v43[16] = "RegBtnLock%02d";
      v25->m_bAutoWordWrap = 1;
      *(_DWORD *)&v43[20] = fs(*(char **)&v43[16], *(_DWORD *)&v43[20]);
      *(_DWORD *)&v43[16] = v21;
      *(_DWORD *)&v43[16] = fs("RegBtnClick%02d", v21);
      *(_DWORD *)&v43[12] = v21;
      *(_DWORD *)&v43[12] = fs("RegBtnOver%02d", v21);
      *(_DWORD *)&v43[8] = v21;
      v26 = fs("RegBtnNor%02d", v21);
      v27 = UIUtil::CreateBtn(
              &ui,
              v21,
              v26,
              *(char **)&v43[12],
              *(char **)&v43[16],
              *(char **)&v43[20],
              (NiSourceTexture *)v44);
      *(float *)&v44 = 0.0;
      *(_DWORD *)&v43[20] = v21;
      *(_DWORD *)&v43[16] = "Slot%02d";
      *(_DWORD *)v22 = v27;
      v28 = fs(*(char **)&v43[16], *(_DWORD *)&v43[20]);
      v29 = UIUtil::CreateSpr(&ui, v28, (NiSourceTexture *)v44);
      v30 = IconSlotWin::CreateWin(3, 3, (PgWin *)&v29->vfptr);
      *(_DWORD *)&v43[12] = 1854303943;
      *(_DWORD *)(v22 - 8) = v30;
      v31 = (char *)TextData2::Get(*(unsigned int *)&v43[12]);
      PgWin::SetToolTipWinText(*(PgWin **)(v22 - 8), v31);
      *(_DWORD *)(*(_DWORD *)(v22 - 8) + 272) = g_pkToolTipWin;
      (*(void (__stdcall **)(signed int))(**(_DWORD **)(v22 - 8) + 240))(1);
      *(_DWORD *)(*(_DWORD *)v22 + 272) = g_pkToolTipWin;
      v32 = (char *)TextData2::Get(0x5A927D7Du);
      PgWin::SetToolTipWinText(*(PgWin **)v22, v32);
      (*(void (__stdcall **)(signed int))(**(_DWORD **)v22 + 240))(1);
      v33 = *(PgWin **)v22;
      iXPos = 0;
      pkFrameWork = 0;
      ((void (__stdcall *)(int *, PgFrameWork **))v33->vfptr[45].__vecDelDtor)(&iXPos, &pkFrameWork);
      *(float *)&v44 = 0.0;
      *(_DWORD *)&v43[20] = v21;
      v34 = fs("RegBtnNor%02d", v21);
      v35 = UIUtil::CreateSpr(&ui, v34, (NiSourceTexture *)v44);
      v44 = pkFrameWork;
      v36 = iXPos;
      *(_DWORD *)(v22 + 4) = v35;
      ((void (__thiscall *)(PgWinSpr *, int, PgFrameWork *))v35->vfptr[77].__vecDelDtor)(v35, v36, v44);
      v37 = *(_DWORD *)(v22 + 4);
      *(float *)&v44 = 2.0616661e16;
      *(_DWORD *)(v37 + 272) = g_pkToolTipWin;
      v38 = (char *)TextData2::Get((unsigned int)v44);
      PgWin::SetToolTipWinText(*(PgWin **)(v22 + 4), v38);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v22 + 4) + 276))(0.0);
      (*(void (__stdcall **)(signed int))(**(_DWORD **)(v22 + 4) + 256))(1);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v22 + 4) + 240))(0);
      ++v21;
      v22 += 16;
    }
    while ( v21 - 1 < v3->m_uiSlotNums );
  }
  v39 = v3->m_uiSlotNums;
  *(float *)&v44 = 0.0;
  *(_DWORD *)&v43[20] = v39;
  v40 = fs("RegCancelBtnNor%02d", v39);
  v41 = UIUtil::CreateSpr(&ui, v40, (NiSourceTexture *)v44);
  v3->m_pkChargedSocket = v41;
  v41->vfptr[64].__vecDelDtor((NiRefObject *)v41, 0);
  ((void (__stdcall *)(_DWORD))v3->m_pkChargedSocket->vfptr[60].__vecDelDtor)(0);
  ((void (__thiscall *)(EnchantGemDeleteWin *, unsigned int, unsigned int, _DWORD, _DWORD))v3->vfptr[59].__vecDelDtor)(
    v3,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.0,
    0.5);
  LOBYTE(v51) = 0;
  UIUtil::~UIUtil(&ui);
  v51 = -1;
  if ( spNode.m_pObject )
  {
    v42 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v42 )
        v42->vfptr->__vecDelDtor((NiRefObject *)v42, 1u);
    }
  }
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004F5930) --------------------------------------------------------
void __thiscall EnchantGemDeleteWin::OnRegBtn(EnchantGemDeleteWin *this, int iIndex)
{
  EnchantGemDeleteWin *v2; // esi@1
  IconSlotWin *v3; // ecx@1
  int v4; // esi@2
  NiUnsharedGeometryGroup *v5; // edi@2
  unsigned int v6; // eax@7
  __int16 v7; // ax@8
  __int16 v8; // cx@12
  int v9; // esi@14
  NiUnsharedGeometryGroup *v10; // edi@14
  PROTO_NC_ITEM_ENCHANT_REMOVE_GEM_REQ kProto; // [sp+8h] [bp-8h]@8

  v2 = this;
  v3 = this->m_pkWeaponIconWin;
  if ( v3->m_eType )
  {
    v4 = (int)&v2->vfptr;
    v5 = TextData2::Get(0xBD5A1741);
    if ( *(_DWORD *)(v4 + 4) )
    {
      (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v4 + 4) + 4))(25, v5, v4);
      if ( *(_DWORD *)(v4 + 4) )
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v4 + 4) + 20))(25, v5, v4);
    }
    (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v4 + 20))(v4, 25, v5, v4);
  }
  else if ( v2->m_akEnchantGemFrame[iIndex].pkSlot->m_eType )
  {
    v9 = (int)&v2->vfptr;
    v10 = TextData2::Get(0x1A543726u);
    if ( *(_DWORD *)(v9 + 4) )
    {
      (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v9 + 4) + 4))(25, v10, v9);
      if ( *(_DWORD *)(v9 + 4) )
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v9 + 4) + 20))(25, v10, v9);
    }
    (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v9 + 20))(v9, 25, v10, v9);
  }
  else
  {
    v6 = v3->m_kContentsDetail.kItem.uiSenderType;
    if ( v6 == 1 )
    {
      v7 = kProto.equipment.Inven & 0x3FF | 0x2000;
      kProto.equipment.Inven = kProto.equipment.Inven & 0x3FF | 0x2000;
    }
    else if ( v6 )
    {
      v7 = kProto.equipment.Inven;
    }
    else
    {
      v7 = kProto.equipment.Inven & 0x3FF | 0x2400;
      kProto.equipment.Inven = kProto.equipment.Inven & 0x3FF | 0x2400;
    }
    v8 = (v7 ^ LOWORD(v3->m_kContentsDetail.kItem.uiSenderIndex)) & 0x3FF;
    kProto.gemSocketIndex = iIndex;
    kProto.equipment.Inven = v8 ^ v7;
    if ( Inventory::FindEnchantSoketReload(&g_kInventory, &kProto.remover) )
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x42u, &kProto, 5);
  }
}

//----- (004F5A90) --------------------------------------------------------
void __userpurge EnchantGemDeleteWin::SetEnchantGem(EnchantGemDeleteWin *this@<ecx>, int a2@<esi>, ShineItemAttr_Weapon *pkWeapon, unsigned __int16 wepID)
{
  ShineItemAttr_Weapon *v4; // ebx@1
  EnchantGemDeleteWin *v5; // edi@1
  char v6; // al@2
  bool v7; // zf@2
  int v8; // esi@3
  int v9; // edi@5
  int v10; // ebx@5
  unsigned __int16 **v11; // eax@7
  unsigned __int16 *v12; // edi@8
  ActionEffectItem *v13; // eax@9
  ItemActionEffectDesc *v14; // ebx@10
  Item *v15; // eax@11
  int v16; // ebx@13
  char *v17; // eax@14
  char *v18; // eax@14
  int v19; // ST08_4@15
  char *v20; // eax@15
  void (__stdcall *v21)(signed int); // eax@17
  int v22; // ecx@22
  void *(__thiscall *v23)(NiRefObject *, unsigned int); // eax@23
  char *v24; // eax@24
  int v25; // esi@26
  int v26; // ST0C_4@26
  int v27; // [sp-4h] [bp-94h]@2
  ITEM_INVEN kInven; // [sp+8h] [bp-88h]@2
  ShineItemAttr_Weapon *v29; // [sp+Ch] [bp-84h]@1
  ActionEffectItem *pkActionEffectItem; // [sp+10h] [bp-80h]@9
  int i; // [sp+14h] [bp-7Ch]@2
  EnchantGemDeleteWin *v32; // [sp+18h] [bp-78h]@1
  $FD2CF8E9010B3884B2A559AF78033A94 *v33; // [sp+1Ch] [bp-74h]@3
  bool bRemoveItemFound; // [sp+23h] [bp-6Dh]@2
  SHINE_ITEM_STRUCT kStruct; // [sp+24h] [bp-6Ch]@11

  v4 = pkWeapon;
  v5 = this;
  v32 = this;
  v29 = pkWeapon;
  if ( pkWeapon )
  {
    v27 = a2;
    v6 = Inventory::FindEnchantSoketReload(&g_kInventory, &kInven);
    v7 = pkWeapon->maxSocketCount == 0;
    bRemoveItemFound = v6;
    i = 0;
    if ( !v7 )
    {
      v8 = (int)&v5->m_akEnchantGemFrame[0].pkBtn;
      v33 = pkWeapon->gemSockets;
      while ( 1 )
      {
        (*(void (__stdcall **)(void *))(**(_DWORD **)(v8 - 4) + 472))(&unk_988F32);
        IconSlotWin::Clear(*(IconSlotWin **)(v8 - 8));
        if ( v33->elementalGemID != -1 )
          break;
LABEL_22:
        v4 = v29;
        v22 = v29->maxSocketCount;
        ++v33;
        v8 += 16;
        if ( ++i >= v22 )
          goto LABEL_23;
      }
      v9 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      v10 = v33->elementalGemID;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v10)
        && (unsigned __int16)v10 <= *(_WORD *)(v9 + 200)
        && (v11 = (unsigned __int16 **)(*(_DWORD *)(v9 + 196) + 4 * v10), *v11)
        && (v12 = *v11) != 0 )
      {
        v13 = ActionEffectItemTab::GetByItemID(*v12);
        pkActionEffectItem = v13;
        if ( !v13 )
        {
LABEL_21:
          v5 = v32;
          goto LABEL_22;
        }
        v14 = ItemActionEffectDescTab::GetByItemActionID(v13->ItemActionID);
        if ( v14 )
        {
          kStruct.itemid = *v12;
          v15 = Item::Create(&kStruct);
          if ( v15 )
            IconSlotWin::SetItem(*(IconSlotWin **)(v8 - 8), v15, 1, 1);
          v16 = (int)v14->ItemActionDesc;
          if ( pkActionEffectItem->EnchantMaxLot )
          {
            v19 = v33->restCount;
            v20 = (char *)TextData2::Get(0xCAEBF956);
            v18 = fs(v20, v16, v19);
          }
          else
          {
            v17 = (char *)TextData2::Get(0xCAEBFA56);
            v18 = fs(v17, v16);
          }
          (*(void (__stdcall **)(char *))(**(_DWORD **)(v8 - 4) + 472))(v18);
        }
        v21 = *(void (__stdcall **)(signed int))(**(_DWORD **)v8 + 240);
        if ( bRemoveItemFound )
        {
          v21(1);
          goto LABEL_21;
        }
      }
      else
      {
        v21 = *(void (__stdcall **)(signed int))(**(_DWORD **)v8 + 240);
      }
      v21(0);
      goto LABEL_21;
    }
LABEL_23:
    v23 = v5->m_pkChargedSocket->vfptr[64].__vecDelDtor;
    if ( v4->createdSocketCount )
    {
      ((void (__stdcall *)(_DWORD, int))v23)(0, v27);
    }
    else
    {
      ((void (__stdcall *)(signed int, int))v23)(1, v27);
      (*((void (__stdcall **)(_DWORD))(&v5->vfptr)[4 * (v5->m_uiSlotNums + 21)]->__vecDelDtor + 60))(0);
      v24 = (char *)TextData2::Get(0x76A66687u);
      PgWin::SetToolTipWinText(*((PgWin **)&v5->m_bLeftLike + 4 * v5->m_uiSlotNums), v24);
    }
    v25 = **((_DWORD **)&v5->m_fInitYPos + 4 * v5->m_uiSlotNums);
    v26 = (unsigned __int8)(*((int (**)(void))(&v5->vfptr)[4 * (v5->m_uiSlotNums + 21)]->__vecDelDtor + 61))() == 0;
    (*(void (__thiscall **)(_DWORD))(v25 + 240))(*((_DWORD *)&v5->m_fInitYPos + 4 * v5->m_uiSlotNums));
  }
}
// 4F5A90: could not find valid save-restore pair for esi
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (004F5D00) --------------------------------------------------------
void __thiscall EnchantGemWin::OnShowWin(EnchantGemWin *this)
{
  EnchantGemWin *v1; // esi@1
  bool v2; // zf@1
  PgWin **v3; // ebx@2
  int v4; // eax@3
  unsigned int v5; // eax@4
  void *v6; // eax@6
  void *v7; // edi@6
  char *v8; // eax@7
  int key; // [sp+4h] [bp-18h]@3
  NiUnsharedGeometryGroup *v10; // [sp+8h] [bp-14h]@3
  NiUnsharedGeometryGroup *v11; // [sp+Ch] [bp-10h]@3
  NiUnsharedGeometryGroup *v12; // [sp+10h] [bp-Ch]@3
  EnchantGemWin *v13; // [sp+14h] [bp-8h]@1
  unsigned int i; // [sp+18h] [bp-4h]@1

  v1 = this;
  v2 = this->m_uiSlotNums == 0;
  v13 = this;
  i = 0;
  if ( !v2 )
  {
    v3 = (PgWin **)this->m_akEnchantGemFrame;
    do
    {
      v10 = &unk_96F8EB;
      v11 = &unk_96F8EB;
      v12 = &unk_96F8EB;
      key = 1854303943;
      v4 = *(_DWORD *)(ITableBase<TextDataType2,TextData2>::ms_pkTable + 56);
      if ( v4 )
        v5 = *(_DWORD *)(v4 + 40);
      else
        v5 = 0;
      v6 = bsearch(&key, TextData2::ms_apkNode, v5, 0x10u, TextDataNodeComp);
      v7 = v6;
      if ( v6 )
      {
        if ( strcmp(*((const char **)v6 + 2), "None") )
          SoundMgr::PlayGenderVoice(&g_kSoundMgr, *((char **)v7 + 2));
        if ( strcmp(*((const char **)v7 + 3), "None") )
          SoundMgr::PlayInterfaceSound(&g_kSoundMgr, *((char **)v7 + 3));
        v8 = (char *)*((_DWORD *)v7 + 1);
        v1 = v13;
      }
      else
      {
        v8 = (char *)&unk_96F8EB;
      }
      PgWin::SetToolTipWinText(*v3, v8);
      (*v3)->m_pkToolTipWin = g_pkToolTipWin;
      v3 += 4;
      ++i;
    }
    while ( i < v1->m_uiSlotNums );
  }
}
// A88684: using guessed type int ITableBase<TextDataType2,TextData2>::ms_pkTable;

//----- (004F5E40) --------------------------------------------------------
EnchantGemToolTipWin *__cdecl EnchantGemToolTipWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  EnchantGemToolTipWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x198u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&EnchantGemToolTipWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&EnchantGemToolTipWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kWorld.m_Rotate.m_pEntry[0][0]) = 0;
    LODWORD(v2[1].m_kWorld.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kWorld.m_Rotate.m_pEntry[0][2]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (EnchantGemToolTipWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 989258: using guessed type void (__thiscall *EnchantGemToolTipWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 989274: using guessed type int (__thiscall *EnchantGemToolTipWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F5F90) --------------------------------------------------------
EnchantGemWin *__cdecl EnchantGemWin::CreateWin(PgFrameWork *pkFrameWork, unsigned int uiSlotNum)
{
  PgWin *v2; // eax@1
  PgWin *v3; // esi@1
  PgWin *v4; // edi@8
  EnchantGemWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v2 = (PgWin *)operator new(0x198u);
  v3 = v2;
  result.m_pObject = v2;
  v7 = 0;
  if ( v2 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v2);
    v3->vfptr = (NiRefObjectVtbl *)&EnchantGemWin::`vftable'{for `NiNode'};
    v3->vfptr = (IDirectMessengerVtbl *)&EnchantGemWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, PgFrameWork *, unsigned int))v3->vfptr[135].__vecDelDtor)(
                          v3,
                          pkFrameWork,
                          uiSlotNum) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (EnchantGemWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}
// 989498: using guessed type void (__thiscall *EnchantGemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9894B4: using guessed type int (__thiscall *EnchantGemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F60D0) --------------------------------------------------------
EnchantGemDeleteWin *__cdecl EnchantGemDeleteWin::CreateWin(PgFrameWork *pkFrameWork, unsigned int uiSlotNum)
{
  PgWin *v2; // eax@1
  PgWin *v3; // esi@1
  PgWin *v4; // edi@8
  EnchantGemDeleteWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v2 = (PgWin *)operator new(0x19Cu);
  v3 = v2;
  result.m_pObject = v2;
  v7 = 0;
  if ( v2 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v2);
    v3->vfptr = (NiRefObjectVtbl *)&EnchantGemDeleteWin::`vftable'{for `NiNode'};
    v3->vfptr = (IDirectMessengerVtbl *)&EnchantGemDeleteWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, PgFrameWork *, unsigned int))v3->vfptr[135].__vecDelDtor)(
                          v3,
                          pkFrameWork,
                          uiSlotNum) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (EnchantGemDeleteWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}
// 9896E0: using guessed type void (__thiscall *EnchantGemDeleteWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9896FC: using guessed type int (__thiscall *EnchantGemDeleteWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F6210) --------------------------------------------------------
EnchantGemToolTipWin *__thiscall EnchantGemToolTipWin::`vector deleting destructor'(EnchantGemToolTipWin *this, unsigned int a2)
{
  EnchantGemToolTipWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&EnchantGemToolTipWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&EnchantGemToolTipWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 989258: using guessed type void (__thiscall *EnchantGemToolTipWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 989274: using guessed type int (__thiscall *EnchantGemToolTipWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F6250) --------------------------------------------------------
EnchantGemDeleteWin *__thiscall EnchantGemWin::`vector deleting destructor'(EnchantGemDeleteWin *this, unsigned int a2)
{
  EnchantGemDeleteWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&EnchantGemWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&EnchantGemWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 989498: using guessed type void (__thiscall *EnchantGemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9894B4: using guessed type int (__thiscall *EnchantGemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F6290) --------------------------------------------------------
void __thiscall EventFriendWin::EventFriendWin(EventFriendWin *this)
{
  EventFriendWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_pkCharNameInputEdit = 0;
  v1->m_pkCheckTextBut = 0;
  v1->m_pkCheck = 0;
  v1->m_pkOk = 0;
  v1->vfptr = (NiRefObjectVtbl *)&EventFriendWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&EventFriendWin::`vftable'{for `IDirectMessenger'};
}
// 9899C8: using guessed type void (__thiscall *EventFriendWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9899E4: using guessed type int (__thiscall *EventFriendWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F62D0) --------------------------------------------------------
void __thiscall EventFriendWin::~EventFriendWin(EventFriendWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&EventFriendWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&EventFriendWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9899C8: using guessed type void (__thiscall *EventFriendWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9899E4: using guessed type int (__thiscall *EventFriendWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F62F0) --------------------------------------------------------
void __thiscall EventFriendWin::OnCmdCancel(EventFriendWin *this)
{
  PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
}

//----- (004F6310) --------------------------------------------------------
void __thiscall EventFriendWin::SetEnableRequestButton(EventFriendWin *this, int b)
{
  if ( this->m_pkOk )
    ((void (__stdcall *)(_DWORD))this->m_pkOk->vfptr[60].__vecDelDtor)(b);
}

//----- (004F6340) --------------------------------------------------------
void __thiscall EventFriendWin::ShowCheck(EventFriendWin *this, int b)
{
  EventFriendWin *v2; // esi@1

  v2 = this;
  if ( this->m_pkCheck )
    ((void (__stdcall *)(_DWORD))this->m_pkCheck->vfptr[64].__vecDelDtor)(b);
  if ( v2->m_pkCheckTextBut )
    ((void (__stdcall *)(_DWORD))v2->m_pkCheckTextBut->vfptr[64].__vecDelDtor)(b);
}

//----- (004F6390) --------------------------------------------------------
void __thiscall EventFriendWin::OnClose(EventFriendWin *this)
{
  ColumnBut *v1; // eax@1

  v1 = this->m_pkCheck;
  if ( v1 )
    GameFrameWork::NcEventFriendHideMsgCmd((GameFrameWork *)this->m_pkFrameWork, v1->m_bCheck);
}

//----- (004F63C0) --------------------------------------------------------
char __thiscall EventFriendWin::Create(EventFriendWin *this, PgFrameWork *pkFrameWork)
{
  EventFriendWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // ebx@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  int v10; // ebx@15
  PgWinBut *v11; // eax@15
  ColumnBut *v12; // eax@17
  PgSprData *v13; // edi@18
  PgWinBut *v14; // eax@18
  int iOffY; // [sp+1Ch] [bp-1Ch]@15
  int uiLeft; // [sp+20h] [bp-18h]@11
  int uiTop; // [sp+24h] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+28h] [bp-10h]@1
  int v19; // [sp+34h] [bp-4h]@1
  PgSprData *pkSprData; // [sp+40h] [bp+8h]@15
  PgSprData *pkSprDataa; // [sp+40h] [bp+8h]@15
  PgSprData *pkSprDatab; // [sp+40h] [bp+8h]@17

  v2 = this;
  spNode.m_pObject = 0;
  v19 = 0;
  v3 = MenuTexMgr::GetTexture(0xFu);
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v19 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
    goto LABEL_5;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "Game\\Event01.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Object01", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "EventFriendWin", 0) )
  {
    v4 = spNode.m_pObject;
    v19 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v10 = uiLeft;
  iOffY = uiTop;
  pkSprData = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, v3);
  PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinBut::CreateWin(uiLeft - v10, uiTop - iOffY, pkSprData, (PgWin *)&v2->vfptr, 0xCu, 0, 0);
  pkSprDataa = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "RegistNor", &uiLeft, &uiTop, v3);
  PgSprData::Add(pkSprDataa, (NiAVObject *)&spNode.m_pObject->vfptr, "RegistClick");
  PgSprData::Add(pkSprDataa, (NiAVObject *)&spNode.m_pObject->vfptr, "RegistOver");
  v11 = PgWinBut::CreateWin(uiLeft - v10, uiTop - iOffY, pkSprDataa, (PgWin *)&v2->vfptr, 0xAu, 0, 0);
  v2->m_pkOk = v11;
  v11->vfptr[60].__vecDelDtor((NiRefObject *)v11, 0);
  if ( !v2->m_pkOk
    || (pkSprDatab = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CheckNor", &uiLeft, &uiTop, v3),
        PgSprData::Add(pkSprDatab, (NiAVObject *)&spNode.m_pObject->vfptr, "CheckClick"),
        v12 = ColumnBut::CreateWin(uiLeft - v10, uiTop - iOffY, pkSprDatab, (PgWin *)&v2->vfptr, 0xEu, 0),
        (v2->m_pkCheck = v12) == 0)
    || (v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &uiLeft, &uiTop, v3),
        PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "Text01"),
        PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "Text01"),
        v14 = PgWinBut::CreateWin(uiLeft - v10, uiTop - iOffY, v13, (PgWin *)&v2->vfptr, 0xEu, 0, 0),
        (v2->m_pkCheckTextBut = v14) == 0) )
  {
    v19 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  ((void (__thiscall *)(EventFriendWin *))v2->vfptr[59].__vecDelDtor)(v2);
  v19 = -1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004F66E0) --------------------------------------------------------
void __thiscall EventFriendWin::OnCmdOk(EventFriendWin *this)
{
  EventFriendWin *v1; // esi@1
  GameFrameWork *v2; // edi@1
  char *v3; // eax@1

  v1 = this;
  v2 = (GameFrameWork *)this->m_pkFrameWork;
  v3 = (char *)TextData::Get(0x84A2B1EA);
  GameFrameWork::OnOpenInputTextWin(v2, (PgWin *)&v1->vfptr, 0xDu, v3);
}

//----- (004F6710) --------------------------------------------------------
void __thiscall EventFriendWin::OnCommand(EventFriendWin *this, unsigned int wParam, int lParam)
{
  EventFriendWin *v3; // esi@1
  GameFrameWork *v4; // edi@2
  char *v5; // eax@2
  unsigned int v6; // eax@4
  const char *v7; // eax@5

  v3 = this;
  switch ( wParam )
  {
    case 0xAu:
      v4 = (GameFrameWork *)this->m_pkFrameWork;
      v5 = (char *)TextData::Get(0x84A2B1EA);
      GameFrameWork::OnOpenInputTextWin(v4, (PgWin *)&v3->vfptr, 0xDu, v5);
      break;
    case 0xBu:
    case 0xCu:
      PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
      break;
    case 0xDu:
      v6 = this->m_pkFrameWork[20].m_kMsgQ.m_uiTail;
      if ( v6 )
      {
        v7 = (const char *)(*(int (**)(void))(**(_DWORD **)(v6 + 344) + 452))();
        if ( v7 )
          GameFrameWork::NcEventFriendRequestReq((GameFrameWork *)v3->m_pkFrameWork, v7);
      }
      break;
    case 0xEu:
      if ( this->m_pkCheck )
        this->m_pkCheck->m_bCheck = this->m_pkCheck->m_bCheck == 0;
      break;
    default:
      return;
  }
}

//----- (004F67D0) --------------------------------------------------------
EventFriendWin *__cdecl EventFriendWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  EventFriendWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x174u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&EventFriendWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&EventFriendWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[2][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (EventFriendWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9899C8: using guessed type void (__thiscall *EventFriendWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9899E4: using guessed type int (__thiscall *EventFriendWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F6930) --------------------------------------------------------
EventFriendWin *__thiscall EventFriendWin::`vector deleting destructor'(EventFriendWin *this, unsigned int a2)
{
  EventFriendWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&EventFriendWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&EventFriendWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9899C8: using guessed type void (__thiscall *EventFriendWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9899E4: using guessed type int (__thiscall *EventFriendWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F6970) --------------------------------------------------------
void __thiscall FeedMoverWin::DirectMessage(FeedMoverWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  char *v4; // esi@2
  void (__thiscall *v5)(float *, IDirectMessenger **, int *); // eax@2
  signed int v6; // eax@3
  int iSy; // [sp+0h] [bp-4h]@1

  iSy = (int)this;
  if ( pkFrom )
  {
    v4 = (char *)&this[-1].m_kBound.m_kCenter.z;
    pkFrom = (IDirectMessenger *)PgWin::ms_iMsX;
    v5 = *(void (__thiscall **)(float *, IDirectMessenger **, int *))(LODWORD(this[-1].m_kBound.m_kCenter.z) + 224);
    iSy = PgWin::ms_iMsY;
    v5(&this[-1].m_kBound.m_kCenter.z, &pkFrom, &iSy);
    if ( (signed int)pkFrom >= 0 )
    {
      v6 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v4 + 144))(v4);
      if ( (signed int)pkFrom < v6 && iSy >= 0 )
        (*(void (__thiscall **)(_DWORD))(*(_DWORD *)v4 + 148))(v4);
    }
  }
}

//----- (004F69E0) --------------------------------------------------------
void __thiscall FeedMoverWin::Normalize(FeedMoverWin *this, int b)
{
  FeedMoverWin *v2; // esi@1
  PgWinText *v3; // ecx@1
  bool v4; // zf@1
  bool v5; // bl@1
  int v6; // eax@1
  int v7; // eax@5
  int v8; // eax@9
  int v9; // eax@13
  int v10; // eax@17

  v2 = this;
  v3 = this->m_pkNameTextWin;
  v4 = v2->m_pkMoverHG == 0;
  v2->m_bNormalize = b;
  v5 = !v4;
  v6 = ((int (__stdcall *)(_DWORD))v3->vfptr[64].__vecDelDtor)(b);
  LOBYTE(v6) = v2->m_bNormalize && v5;
  ((void (__stdcall *)(_DWORD))v2->m_pkNum_Hungry->vfptr[64].__vecDelDtor)(v6);
  v7 = ((int (__stdcall *)(_DWORD))v2->m_pkMoverSpeed->vfptr[64].__vecDelDtor)(v2->m_bNormalize);
  LOBYTE(v7) = v2->m_bNormalize && v5;
  v8 = ((int (__stdcall *)(_DWORD))v2->m_pkHPBarWin->vfptr[64].__vecDelDtor)(v7);
  LOBYTE(v8) = v2->m_bNormalize && v5;
  v9 = ((int (__stdcall *)(_DWORD))v2->m_pkHPBarStartWin->vfptr[64].__vecDelDtor)(v8);
  LOBYTE(v9) = v2->m_bNormalize && v5;
  v10 = ((int (__stdcall *)(_DWORD))v2->m_pkHPBarEndWin->vfptr[64].__vecDelDtor)(v9);
  LOBYTE(v10) = v2->m_bNormalize && v5;
  ((void (__stdcall *)(_DWORD))v2->m_pkPanel[0]->vfptr[64].__vecDelDtor)(v10);
  ((void (__stdcall *)(_DWORD))v2->m_pkPanel[1]->vfptr[64].__vecDelDtor)(v2->m_bNormalize);
}

//----- (004F6B00) --------------------------------------------------------
void __thiscall FeedMoverWin::~FeedMoverWin(FeedMoverWin *this)
{
  FeedMoverWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&FeedMoverWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&FeedMoverWin::`vftable'{for `IDirectMessenger'};
  `eh vector destructor iterator'(
    this->m_spMoverTexture,
    4u,
    3,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v1->m_kMarkCheck);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 989D50: using guessed type void (__thiscall *FeedMoverWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 989D6C: using guessed type int (__thiscall *FeedMoverWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F6B90) --------------------------------------------------------
void __thiscall FeedMoverWin::EnableMoverFaceAni(FeedMoverWin *this)
{
  FeedMoverWin *v1; // edi@1
  NiSourceTexture *v2; // esi@1
  PgWinSpr *v3; // ecx@4

  v1 = this;
  v2 = this->m_spMoverTexture[2].m_pObject;
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  if ( v2 )
  {
    v3 = v1->m_pkMoverFaceCutWin;
    if ( v3 )
      ((void (__stdcall *)(_DWORD))v3->vfptr[113].__vecDelDtor)(v2);
  }
  v1->m_kMarkCheck.m_fMarkTime = 2.0;
  CNSTimer_MarkCheck::ReSet(&v1->m_kMarkCheck, Timer::ms_fCurTime, OVER);
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004F6C50) --------------------------------------------------------
void __thiscall FeedMoverWin::ProcessMeInput(FeedMoverWin *this, bool *bHit)
{
  FeedMoverWin *v2; // esi@1
  bool v3; // bl@1

  v2 = this;
  v3 = PgWin::ms_kbRbutReleased.m_iBool >= 1;
  if ( (unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD))this->m_pkMoverFaceCutWin->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY)
    && v3 )
  {
    FeedMoverWin::Normalize(v2, v2->m_bNormalize == 0);
  }
  PgWinFrame::ProcessMeInput((PgWinFrame *)&v2->vfptr, bHit);
}

//----- (004F6CB0) --------------------------------------------------------
void __thiscall FeedMoverWin::UpdateFaceCut(FeedMoverWin *this)
{
  char *v1; // eax@2

  if ( this->m_pkMoverFaceCutWin )
  {
    v1 = (char *)this->m_spMoverTexture;
    if ( !this->m_uiHungryPoint )
      v1 = (char *)&this->m_spMoverTexture[1];
    ((void (__stdcall *)(_DWORD))this->m_pkMoverFaceCutWin->vfptr[113].__vecDelDtor)(*(_DWORD *)v1);
  }
}

//----- (004F6CF0) --------------------------------------------------------
void __thiscall FeedMoverWin::FeedMoverWin(FeedMoverWin *this)
{
  FeedMoverWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&FeedMoverWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&FeedMoverWin::`vftable'{for `IDirectMessenger'};
  CNSTimer_MarkCheck::CNSTimer_MarkCheck(&v1->m_kMarkCheck);
  v1->m_pkFrameWork = 0;
  v1->m_pkHPBarWin = 0;
  v1->m_pkHPBarStartWin = 0;
  v1->m_pkHPBarEndWin = 0;
  v1->m_pkMoverFaceCutWin = 0;
  v1->m_pkNameTextWin = 0;
  v1->m_pkNum_Hungry = 0;
  v1->m_pkMoverSpeed = 0;
  v1->m_pkMoverMain = 0;
  v1->m_pkMoverView = 0;
  v1->m_pkMoverHG = 0;
  `eh vector constructor iterator'(
    v1->m_spMoverTexture,
    4u,
    3,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_uiMaxHP = 0;
  v1->m_uiHungryPoint = 0;
  v1->m_uiMoverSpeed = 0;
  v1->m_bNormalize = 1;
  v1->m_kMoverID = -1;
  v1->m_uiMoverLevel = 0;
  v1->m_pkPanel[0] = 0;
  v1->m_pkPanel[1] = 0;
}
// 989D50: using guessed type void (__thiscall *FeedMoverWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 989D6C: using guessed type int (__thiscall *FeedMoverWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F6DF0) --------------------------------------------------------
char __thiscall FeedMoverWin::Create(FeedMoverWin *this, PgFrameWork *pkFrameWork)
{
  FeedMoverWin *v2; // esi@1
  PgFrameWork *v3; // ebx@1
  NiSourceTexture *v4; // edi@1
  NiNode *v5; // esi@2
  const char *v7; // eax@9
  PgSprData *v8; // eax@10
  void *(__thiscall *v9)(NiRefObject *, unsigned int); // eax@11
  int v10; // edi@11
  PgFrameWork *v11; // ebx@11
  PgSprData *v12; // eax@11
  PgWinSpr *v13; // eax@11
  const char *v14; // eax@13
  NiSourceTexture *v15; // eax@13
  const char *v16; // eax@16
  PgSprData *v17; // eax@17
  PgWinSpr *v18; // eax@17
  PgSprData *v19; // eax@17
  PgWinSpr *v20; // eax@17
  PgSprData *v21; // eax@17
  PgWinSpr *v22; // eax@17
  PgSprData *v23; // eax@17
  PgWinBar *v24; // eax@17
  PgSprData *v25; // eax@17
  PgWinBar *v26; // eax@17
  PgSprData *v27; // eax@17
  PgWinBar *v28; // eax@17
  PgWin *fXPosRate; // ST4C_4@17
  PgFont *v30; // eax@17
  PgWinAbbreviateText *v31; // eax@17
  PgFont *v32; // eax@17
  PgWinText *v33; // eax@17
  PgFont *v34; // eax@17
  PgWinText *v35; // eax@17
  NiNode *v36; // esi@18
  NiTexturePalette *pkMoverTexture; // [sp+64h] [bp-24h]@7
  NiSourceTexture *pkMoverTexturea; // [sp+64h] [bp-24h]@13
  unsigned int uiWidth; // [sp+68h] [bp-20h]@17
  unsigned int uiHeight; // [sp+6Ch] [bp-1Ch]@17
  NiSourceTexture *pkTexture; // [sp+70h] [bp-18h]@1
  NiPointer<NiNode> spNode; // [sp+74h] [bp-14h]@1
  int iLeft; // [sp+78h] [bp-10h]@10
  int v44; // [sp+84h] [bp-4h]@1

  v2 = this;
  v3 = pkFrameWork;
  this->m_pkFrameWork = pkFrameWork;
  spNode.m_pObject = 0;
  v44 = 0;
  v4 = MenuTexMgr::GetTexture(4u);
  pkTexture = v4;
  if ( !v4 )
    goto LABEL_24;
  pkMoverTexture = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v7 = Folder::Merge(&Folder::m_acMenu, "Game\\PetFace.nif");
  PgUtil::LoadNodeNifFile(v7, &spNode, pkMoverTexture);
  if ( !spNode.m_pObject )
    return 0;
  v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iLeft, (int *)&pkFrameWork, v4);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v8, 0, v3, "FeedMoverWin", 0) )
  {
LABEL_24:
    v5 = spNode.m_pObject;
    v44 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
    return 0;
  }
  v9 = v2->vfptr[60].__vecDelDtor;
  v2->m_bDroppable = 1;
  v9((NiRefObject *)&v2->vfptr, 1u);
  v10 = iLeft;
  v11 = pkFrameWork;
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel03", &iLeft, (int *)&pkFrameWork, pkTexture);
  v13 = PgWinSpr::CreateWin(iLeft, (int)pkFrameWork, v12, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkPanel[1] = v13;
  v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
  if ( !Folder::m_bInit )
    Folder::Init();
  v14 = fs("%sgame\\MobPortrait\\%s.png", &Folder::m_acMenu, "coll01");
  v15 = PgUtil::LoadSourceTexture(v14);
  pkMoverTexturea = v15;
  if ( !v15 )
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    v16 = fs("%sgame\\MobPortrait\\%s.tga", &Folder::m_acMenu, "coll01");
    v15 = PgUtil::LoadSourceTexture(v16);
    pkMoverTexturea = v15;
  }
  v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "FaceCut_Mon", &iLeft, (int *)&pkFrameWork, v15);
  v18 = PgWinSpr::CreateWin(iLeft - v10, (char *)pkFrameWork - (char *)v11, v17, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkMoverFaceCutWin = v18;
  v18->vfptr[60].__vecDelDtor((NiRefObject *)v18, 0);
  ((void (__stdcall *)(NiSourceTexture *))v2->m_pkMoverFaceCutWin->vfptr[113].__vecDelDtor)(pkMoverTexturea);
  v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel04", &iLeft, (int *)&pkFrameWork, pkTexture);
  v20 = PgWinSpr::CreateWin(iLeft, (int)pkFrameWork, v19, (PgWin *)&v2->vfptr, 0, 0);
  v20->vfptr[60].__vecDelDtor((NiRefObject *)v20, 0);
  v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &iLeft, (int *)&pkFrameWork, pkTexture);
  v22 = PgWinSpr::CreateWin(iLeft, (int)pkFrameWork, v21, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkPanel[0] = v22;
  v22->vfptr[60].__vecDelDtor((NiRefObject *)v22, 0);
  v23 = PgSprData::Create(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "Fill_HP_Start",
          &iLeft,
          (int *)&pkFrameWork,
          pkTexture);
  v24 = PgWinBar::CreateWin(iLeft - v10, (char *)pkFrameWork - (char *)v11, v23, (PgWin *)&v2->vfptr, BGT_RIGHT);
  v2->m_pkHPBarStartWin = (PgWinSpr *)v24;
  v24->vfptr[64].__vecDelDtor((NiRefObject *)v24, 1u);
  ((void (__stdcall *)(_DWORD))v2->m_pkHPBarStartWin->vfptr[60].__vecDelDtor)(0);
  v25 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_HP_End", &iLeft, (int *)&pkFrameWork, pkTexture);
  v26 = PgWinBar::CreateWin(iLeft - v10, (char *)pkFrameWork - (char *)v11, v25, (PgWin *)&v2->vfptr, BGT_RIGHT);
  v2->m_pkHPBarEndWin = (PgWinSpr *)v26;
  v26->vfptr[64].__vecDelDtor((NiRefObject *)v26, 1u);
  ((void (__stdcall *)(_DWORD))v2->m_pkHPBarEndWin->vfptr[60].__vecDelDtor)(0);
  v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_HP", &iLeft, (int *)&pkFrameWork, pkTexture);
  v28 = PgWinBar::CreateWin(iLeft - v10, (char *)pkFrameWork - (char *)v11, v27, (PgWin *)&v2->vfptr, BGT_RIGHT);
  v2->m_pkHPBarWin = v28;
  v28->vfptr[60].__vecDelDtor((NiRefObject *)v28, 0);
  PgUtil::GetTriShapeRect(
    (NiAVObject *)&spNode.m_pObject->vfptr,
    "CharName",
    &iLeft,
    (int *)&pkFrameWork,
    &uiWidth,
    &uiHeight);
  fXPosRate = g_pkToolTipWin;
  v30 = Font::Get(0);
  v31 = PgWinAbbreviateText::CreateWin(
          iLeft - v10,
          (char *)pkFrameWork - (char *)v11,
          uiWidth,
          uiHeight,
          v30,
          (PgWin *)&v2->vfptr,
          "2",
          0,
          0,
          1,
          fXPosRate,
          0x14u);
  v2->m_pkNameTextWin = (PgWinText *)v31;
  v31->vfptr[122].__vecDelDtor((NiRefObject *)v31, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkNameTextWin->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(const char *))v2->m_pkNameTextWin->vfptr[118].__vecDelDtor)("TestName");
  PgUtil::GetTriShapeRect(
    (NiAVObject *)&spNode.m_pObject->vfptr,
    "Num_Hungry",
    &iLeft,
    (int *)&pkFrameWork,
    &uiWidth,
    &uiHeight);
  v32 = Font::Get(0);
  v33 = PgWinText::CreateWin(
          iLeft - v10,
          (char *)pkFrameWork - (char *)v11,
          uiWidth,
          uiHeight,
          v32,
          (PgWin *)&v2->vfptr,
          "2",
          0);
  v2->m_pkNum_Hungry = v33;
  v33->vfptr[60].__vecDelDtor((NiRefObject *)v33, 0);
  ((void (__stdcall *)(void *))v2->m_pkNum_Hungry->vfptr[118].__vecDelDtor)(&unk_989C15);
  PgUtil::GetTriShapeRect(
    (NiAVObject *)&spNode.m_pObject->vfptr,
    "Num_Velocity",
    &iLeft,
    (int *)&pkFrameWork,
    &uiWidth,
    &uiHeight);
  v34 = Font::Get(0);
  v35 = PgWinText::CreateWin(
          iLeft - v10,
          (char *)pkFrameWork - (char *)v11,
          uiWidth,
          uiHeight,
          v34,
          (PgWin *)&v2->vfptr,
          "2",
          0);
  v2->m_pkMoverSpeed = v35;
  v35->vfptr[122].__vecDelDtor((NiRefObject *)v35, 2u);
  ((void (__stdcall *)(_DWORD))v2->m_pkMoverSpeed->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(const char *))v2->m_pkMoverSpeed->vfptr[118].__vecDelDtor)("-");
  PgWin::InitPos((PgWin *)&v2->vfptr, PgWin::ms_uiScreenWidth, PgWin::ms_uiScreenHeight, 0.0, 0.25);
  v44 = -1;
  if ( spNode.m_pObject )
  {
    v36 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v36 )
        v36->vfptr->__vecDelDtor((NiRefObject *)v36, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004F7390) --------------------------------------------------------
void __thiscall FeedMoverWin::UpdateMeWin(FeedMoverWin *this, float fCurTime)
{
  FeedMoverWin *v2; // esi@1
  int v3; // eax@1
  _DWORD *v4; // eax@3

  v2 = this;
  CNSTimer_MarkCheck::Update(&this->m_kMarkCheck, Timer::ms_fCurTime);
  if ( v3 == 1 && v2->m_pkMoverFaceCutWin )
  {
    v4 = (_DWORD *)v2->m_spMoverTexture;
    if ( !v2->m_uiHungryPoint )
      v4 = &v2->m_spMoverTexture[1].m_pObject;
    ((void (__stdcall *)(_DWORD))v2->m_pkMoverFaceCutWin->vfptr[113].__vecDelDtor)(*v4);
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (004F73F0) --------------------------------------------------------
void __thiscall FeedMoverWin::UpdateMoverSpeed(FeedMoverWin *this)
{
  FeedMoverWin *v1; // ebx@1
  int v2; // eax@2
  unsigned int v3; // edx@3
  int v4; // esi@3
  unsigned int v5; // ST18_4@4
  char *v6; // eax@4
  const char *v7; // eax@4
  unsigned int v8; // eax@4
  char *v9; // edi@4
  char v10; // cl@5
  NiRefObjectVtbl *v11; // esi@7
  unsigned int v12; // ST18_4@7
  char *v13; // eax@7
  char *v14; // eax@7
  char UpText[128]; // [sp+4h] [bp-104h]@4
  char SpeedText[128]; // [sp+84h] [bp-84h]@4

  v1 = this;
  if ( this->m_pkMoverSpeed )
  {
    v2 = *(_WORD *)CDataReader::GetRecord(
                     (CDataReader *)(ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::ms_pkTable + 4),
                     LOBYTE(this->m_uiMoverLevel));
    if ( (_WORD)v2
      && (v3 = (signed int)((unsigned __int64)(27487790700i64 * v2) >> 32) >> 6, (v4 = v3 + (v3 >> 31)) != 0) )
    {
      SpeedText[0] = 0;
      memset(&SpeedText[1], 0, 0x7Fu);
      UpText[0] = 0;
      memset(&UpText[1], 0, 0x7Fu);
      v5 = v1->m_uiMoverSpeed;
      v6 = (char *)TextData2::Get(0xE4F43647);
      v7 = fs(v6, v5);
      sprintf(SpeedText, v7);
      sprintf(UpText, "(+%d)", v4);
      v8 = strlen(UpText) + 1;
      v9 = &UpText[127];
      do
        v10 = (v9++)[1];
      while ( v10 );
      qmemcpy(v9, UpText, v8);
      ((void (__stdcall *)(char *))v1->m_pkMoverSpeed->vfptr[118].__vecDelDtor)(SpeedText);
    }
    else
    {
      v11 = v1->m_pkMoverSpeed->vfptr;
      v12 = v1->m_uiMoverSpeed;
      v13 = (char *)TextData2::Get(0xE4F43647);
      v14 = fs(v13, v12);
      v11[118].__vecDelDtor((NiRefObject *)v1->m_pkMoverSpeed, (unsigned int)v14);
    }
  }
}
// A8C258: using guessed type int ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::ms_pkTable;

//----- (004F7560) --------------------------------------------------------
void __thiscall FeedMoverWin::UpdateHungryPoint(FeedMoverWin *this)
{
  FeedMoverWin *v1; // esi@1
  PgWinBar *v2; // ecx@1
  float v3; // ST0C_4@2
  _DWORD *v4; // eax@5

  v1 = this;
  v2 = this->m_pkHPBarWin;
  if ( v2 )
  {
    v3 = (double)v1->m_uiMaxHP;
    v2->m_fCurValue = (double)v1->m_uiHungryPoint;
    v2->m_fMaxValue = v3;
    PgWinBar::OnChangeValue(v2);
  }
  if ( v1->m_kMarkCheck.m_TimeStateCur != -1 && v1->m_pkMoverFaceCutWin )
  {
    v4 = (_DWORD *)v1->m_spMoverTexture;
    if ( !v1->m_uiHungryPoint )
      v4 = &v1->m_spMoverTexture[1].m_pObject;
    ((void (__stdcall *)(_DWORD))v1->m_pkMoverFaceCutWin->vfptr[113].__vecDelDtor)(*v4);
  }
}

//----- (004F7600) --------------------------------------------------------
FeedMoverWin *__cdecl FeedMoverWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  FeedMoverWin *v5; // eax@14
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1C8u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    FeedMoverWin::FeedMoverWin((FeedMoverWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( FeedMoverWin::Create((FeedMoverWin *)v3, pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (FeedMoverWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( v3 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
    v5 = 0;
  }
  return v5;
}

//----- (004F7730) --------------------------------------------------------
char __thiscall FeedMoverWin::EatDropInstance(FeedMoverWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  FeedMoverWin *v4; // ebx@1
  DropContents *v5; // eax@2
  _DWORD *v7; // esi@6
  MoverMain *v8; // eax@10
  MoverHG *v9; // edi@12
  int v10; // eax@13
  ItemUseTask *v11; // esi@16
  GameFrameWork *v12; // esi@18
  NiUnsharedGeometryGroup *v13; // eax@18
  unsigned int v14; // [sp-Ch] [bp-10h]@15
  DropContents *pkContents; // [sp+Ch] [bp+8h]@2

  v4 = this;
  if ( !*pkDrop )
    return 0;
  v5 = (DropContents *)(*pkDrop)->m_pkContents;
  pkContents = v5;
  if ( v5->m_eSenderType || v5->m_eType )
  {
    PgCursor::ms_bKeepDrop = 1;
    return 0;
  }
  v7 = v5->m_apvParam[0];
  if ( !v7 )
  {
    PgCursor::ms_bKeepDrop = 1;
    return 0;
  }
  if ( (unsigned __int8)(*(int (__thiscall **)(_DWORD *))(*v7 + 4))(v7) != 22 )
    return 0;
  v8 = v4->m_pkMoverMain;
  if ( !v8 )
    return 0;
  if ( v8->DurationHour || (v9 = v4->m_pkMoverHG) == 0 )
  {
    v14 = 1906944922;
LABEL_18:
    v12 = (GameFrameWork *)v4->m_pkFrameWork;
    v13 = TextData::Get(v14);
    GameFrameWork::AddSysMsg(v12, (const char *)v13);
    return 0;
  }
  v10 = v7[28];
  if ( v10 )
  {
    if ( !strncmp((const char *)(v10 + 2), v9->FeedType, strlen((const char *)(v10 + 2))) )
    {
      v11 = ISingletonTask<ItemUseTask>::Run();
      ItemUseTask::SetInventoryIndex(v11, pkContents->m_uiSenderIndex);
      v11->vfptr->SetMsgHooker(&v11->vfptr, v4->m_pkFrameWork);
      return 1;
    }
    v14 = -1141985811;
    goto LABEL_18;
  }
  return 0;
}
// B648B8: using guessed type bool PgCursor::ms_bKeepDrop;

//----- (004F7830) --------------------------------------------------------
void __thiscall FeedMoverWin::UpdateMover(FeedMoverWin *this)
{
  int v1; // eax@1
  unsigned int v2; // ebx@1
  unsigned int v3; // edi@2
  unsigned int v4; // esi@4
  MoverMain *v5; // eax@5
  MoverView *v6; // eax@10
  FeedMoverWin *v7; // ebx@10
  MoverHG *v8; // eax@11
  MoverMain *v9; // ecx@13
  bool v10; // zf@13
  double v11; // st7@13
  ItemInfo *v12; // eax@14
  unsigned int v13; // ecx@15
  NiRefObjectVtbl *v14; // esi@16
  char *v15; // eax@16
  const char *v16; // ecx@18
  const char *v17; // ecx@18
  const char *v18; // ecx@18
  FeedMoverWin *v19; // esi@18
  char *v20; // esi@24
  NiSourceTexture *v21; // edi@24
  NiImageConverter *v22; // eax@25
  NiPixelData *v23; // eax@25
  NiSourceTexture *v24; // esi@27
  NiSourceTexture *v25; // edi@34
  void *v26; // esi@37
  char *v27; // esi@41
  NiImageConverter *v28; // eax@42
  NiPixelData *v29; // eax@42
  NiSourceTexture *v30; // eax@43
  PgWinSpr *v31; // ecx@49
  int v32; // [sp-4h] [bp-A4h]@15
  NiTexture::FormatPrefs kPrefs; // [sp+10h] [bp-90h]@26
  NiTexture::FormatPrefs v34; // [sp+1Ch] [bp-84h]@43
  __int64 v35; // [sp+28h] [bp-78h]@13
  int v36; // [sp+30h] [bp-70h]@13
  FeedMoverWin *v37; // [sp+34h] [bp-6Ch]@1
  NiSourceTexture **v38; // [sp+38h] [bp-68h]@18
  unsigned __int16 v39; // [sp+3Ah] [bp-66h]@13
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kImage[3]; // [sp+3Ch] [bp-64h]@18
  int v41; // [sp+9Ch] [bp-4h]@18

  v1 = *(_DWORD *)(ITableBase<MoverMain,MoverMainTab>::ms_pkTable + 56);
  v2 = this->m_kMoverID;
  v37 = this;
  if ( v1 )
    v3 = *(_DWORD *)(v1 + 40);
  else
    v3 = 0;
  v4 = 0;
  if ( v3 )
  {
    while ( 1 )
    {
      v5 = (MoverMain *)CDataReader::GetRecord((CDataReader *)(ITableBase<MoverMain,MoverMainTab>::ms_pkTable + 4), v4);
      if ( v5 )
      {
        if ( v5->MoverID == v2 )
          break;
      }
      if ( ++v4 >= v3 )
        goto LABEL_8;
    }
  }
  else
  {
LABEL_8:
    v5 = 0;
  }
  v37->m_pkMoverMain = v5;
  if ( v5 )
  {
    v6 = MoverViewTab::GetByMoverIdx(v5->MoverIDX);
    v7 = v37;
    v37->m_pkMoverView = v6;
    if ( v6 )
    {
      v8 = MoverHGTab::GetByMoverIdx(v7->m_pkMoverMain->MoverIDX);
      v7->m_pkMoverHG = v8;
      if ( v8 )
        v7->m_uiMaxHP = v8->MaxHG;
      v9 = v7->m_pkMoverMain;
      v36 = v9->RunSpeed;
      v10 = v7->m_pkNameTextWin == 0;
      v11 = (double)v36;
      v36 = v39 | 0xC00;
      v35 = (signed __int64)(v11 * 0.1);
      v7->m_uiMoverSpeed = v35;
      if ( !v10 )
      {
        v12 = ItemInfoTab::GetByInxName(v9->MoverIDX);
        if ( v12 )
        {
          v13 = v7->m_uiMoverLevel;
          v32 = (int)v12->Name;
          if ( v13 )
          {
            v14 = v7->m_pkNameTextWin->vfptr;
            v15 = fs("(+%d)%s", v13, v32);
            v14[118].__vecDelDtor((NiRefObject *)v7->m_pkNameTextWin, (unsigned int)v15);
          }
          else
          {
            v7->m_pkNameTextWin->vfptr[118].__vecDelDtor((NiRefObject *)v7->m_pkNameTextWin, v32);
          }
        }
      }
      v16 = v7->m_pkMoverView->Normalmage;
      kImage[0]._Myres = 15;
      kImage[0]._Mysize = 0;
      kImage[0]._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(kImage, v16, strlen(v16));
      v17 = v7->m_pkMoverView->HungryImage;
      v41 = 0;
      kImage[1]._Mysize = 0;
      kImage[1]._Bx._Buf[0] = 0;
      kImage[1]._Myres = 15;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&kImage[1], v17, strlen(v17));
      v18 = v7->m_pkMoverView->EatImage;
      LOBYTE(v41) = 1;
      kImage[2]._Myres = 15;
      kImage[2]._Mysize = 0;
      kImage[2]._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&kImage[2], v18, strlen(v18));
      v19 = (FeedMoverWin *)kImage;
      v41 = 2;
      v37 = (FeedMoverWin *)kImage;
      v38 = (NiSourceTexture **)v7->m_spMoverTexture;
      v36 = 3;
      while ( 1 )
      {
        if ( v19->m_uiExtraDataSize >= 0x10 )
          v19 = (FeedMoverWin *)v19->vfptr;
        if ( !Folder::m_bInit )
          Folder::Init();
        v20 = fs("%sgame\\MobPortrait\\%s.png", &Folder::m_acMenu, v19);
        v21 = 0;
        if ( v20 )
        {
          v22 = NiImageConverter::GetImageConverter();
          v23 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v22->vfptr[2].__vecDelDtor)(
                                 v22,
                                 v20,
                                 0);
          if ( v23 )
          {
            kPrefs.m_ePixelLayout = 6;
            kPrefs.m_eAlphaFmt = 3;
            kPrefs.m_eMipMapped = 0;
            v21 = NiSourceTexture::Create(v23, &kPrefs);
          }
        }
        v24 = *v38;
        if ( *v38 != v21 )
        {
          if ( v24 && !InterlockedDecrement((volatile LONG *)&v24->m_uiRefCount) && v24 )
            v24->vfptr->__vecDelDtor((NiRefObject *)v24, 1u);
          *v38 = v21;
          if ( v21 )
            InterlockedIncrement((volatile LONG *)&v21->m_uiRefCount);
        }
        v25 = *v38;
        HIDWORD(v35) = v25;
        if ( v25 )
          InterlockedIncrement((volatile LONG *)&v25->m_uiRefCount);
        LOBYTE(v41) = 3;
        if ( !v25 )
        {
          v26 = v37;
          if ( v37->m_uiExtraDataSize >= 0x10 )
            v26 = v37->vfptr;
          if ( !Folder::m_bInit )
            Folder::Init();
          v27 = fs("%sgame\\MobPortrait\\%s.tga", &Folder::m_acMenu, v26);
          if ( v27 )
          {
            v28 = NiImageConverter::GetImageConverter();
            v29 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v28->vfptr[2].__vecDelDtor)(
                                   v28,
                                   v27,
                                   0);
            if ( v29 )
            {
              v34.m_ePixelLayout = 6;
              v34.m_eAlphaFmt = 3;
              v34.m_eMipMapped = 0;
              v30 = NiSourceTexture::Create(v29, &v34);
              if ( v30 )
              {
                v25 = v30;
                InterlockedIncrement((volatile LONG *)&v30->m_uiRefCount);
              }
            }
          }
        }
        LOBYTE(v41) = 2;
        if ( v25 && !InterlockedDecrement((volatile LONG *)&v25->m_uiRefCount) )
          v25->vfptr->__vecDelDtor((NiRefObject *)v25, 1u);
        ++v38;
        v37 = (FeedMoverWin *)((char *)v37 + 28);
        if ( !--v36 )
          break;
        v19 = v37;
      }
      v31 = v7->m_pkMoverFaceCutWin;
      v7->m_uiHungryPoint = 0;
      if ( v31 )
        ((void (__stdcall *)(NiSourceTexture *))v31->vfptr[113].__vecDelDtor)(v7->m_spMoverTexture[1].m_pObject);
      FeedMoverWin::UpdateMoverSpeed(v7);
      FeedMoverWin::Normalize(v7, 1);
      v41 = -1;
      `eh vector destructor iterator'(
        kImage,
        0x1Cu,
        3,
        (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    }
  }
}
// A8975C: using guessed type bool Folder::m_bInit;
// A89D24: using guessed type int ITableBase<MoverMain,MoverMainTab>::ms_pkTable;

//----- (004F7C30) --------------------------------------------------------
MoverMain *__cdecl MoverMainTab::GetByMoverID(unsigned int kMoverID)
{
  int v1; // eax@1
  unsigned int v2; // edi@2
  unsigned int v3; // esi@4
  MoverMain *result; // eax@5

  v1 = *(_DWORD *)(ITableBase<MoverMain,MoverMainTab>::ms_pkTable + 56);
  if ( v1 )
    v2 = *(_DWORD *)(v1 + 40);
  else
    v2 = 0;
  v3 = 0;
  if ( v2 )
  {
    while ( 1 )
    {
      result = (MoverMain *)CDataReader::GetRecord(
                              (CDataReader *)(ITableBase<MoverMain,MoverMainTab>::ms_pkTable + 4),
                              v3);
      if ( result )
      {
        if ( result->MoverID == kMoverID )
          break;
      }
      if ( ++v3 >= v2 )
        goto LABEL_8;
    }
  }
  else
  {
LABEL_8:
    result = 0;
  }
  return result;
}
// A89D24: using guessed type int ITableBase<MoverMain,MoverMainTab>::ms_pkTable;

//----- (004F7C80) --------------------------------------------------------
MoverUpgradeEffect *__cdecl MoverUpgradeEffectTab::GetByGrade(char nGrade)
{
  return (MoverUpgradeEffect *)CDataReader::GetRecord(
                                 (CDataReader *)(ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::ms_pkTable + 4),
                                 (unsigned __int8)nGrade);
}
// A8C258: using guessed type int ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::ms_pkTable;

//----- (004F7CA0) --------------------------------------------------------
FeedMoverWin *__thiscall FeedMoverWin::`scalar deleting destructor'(FeedMoverWin *this, unsigned int a2)
{
  FeedMoverWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&FeedMoverWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&FeedMoverWin::`vftable'{for `IDirectMessenger'};
  `eh vector destructor iterator'(
    this->m_spMoverTexture,
    4u,
    3,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v2->m_kMarkCheck);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 989D50: using guessed type void (__thiscall *FeedMoverWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 989D6C: using guessed type int (__thiscall *FeedMoverWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F7D40) --------------------------------------------------------
MoverView *__cdecl MoverViewTab::GetByMoverIdx(const char *pcMoverIdx)
{
  int v1; // eax@1
  unsigned int v2; // edi@1
  char *v3; // eax@5
  unsigned int v4; // eax@6
  unsigned int v5; // ebx@6
  unsigned int v6; // esi@6
  unsigned int v7; // ecx@6
  unsigned int v8; // edi@8
  const char *v9; // eax@8
  int v10; // eax@10
  bool v11; // zf@10
  signed int v12; // eax@12
  bool v13; // bl@15
  MoverView *pkMoverView; // [sp+10h] [bp-3Ch]@5
  unsigned int i; // [sp+18h] [bp-34h]@4
  unsigned int v17; // [sp+1Ch] [bp-30h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v18; // [sp+20h] [bp-2Ch]@6
  int v19; // [sp+48h] [bp-4h]@15

  v1 = *(_DWORD *)(ITableBase<MoverView,MoverViewTab>::ms_pkTable + 56);
  v2 = 0;
  if ( v1 )
    v17 = *(_DWORD *)(v1 + 40);
  else
    v17 = 0;
  i = 0;
  if ( v17 <= 0 )
    return 0;
  while ( 1 )
  {
    v3 = CDataReader::GetRecord((CDataReader *)(ITableBase<MoverView,MoverViewTab>::ms_pkTable + 4), v2);
    pkMoverView = (MoverView *)v3;
    if ( v3 )
      break;
LABEL_19:
    i = ++v2;
    if ( v2 >= v17 )
      return 0;
  }
  v18._Myres = 15;
  v18._Mysize = 0;
  v18._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v18, v3, strlen(v3));
  v4 = strlen(pcMoverIdx);
  v5 = v18._Mysize;
  v6 = v4;
  v7 = v18._Mysize;
  if ( v18._Mysize >= v4 )
    v7 = v4;
  v8 = v18._Myres;
  v9 = v18._Bx._Ptr;
  if ( v18._Myres < 0x10 )
    v9 = (const char *)&v18;
  v10 = std::char_traits<char>::compare(v9, pcMoverIdx, v7);
  v11 = v10 == 0;
  if ( !v10 )
  {
    if ( v5 >= v6 )
      v12 = v5 != v6;
    else
      v12 = -1;
    v11 = v12 == 0;
  }
  v13 = v11;
  v19 = -1;
  if ( v8 >= 0x10 )
    operator delete(v18._Bx._Ptr);
  v18._Myres = 15;
  v18._Mysize = 0;
  v18._Bx._Buf[0] = 0;
  if ( !v13 )
  {
    v2 = i;
    goto LABEL_19;
  }
  return pkMoverView;
}
// A8C228: using guessed type int ITableBase<MoverView,MoverViewTab>::ms_pkTable;

//----- (004F7E90) --------------------------------------------------------
void __thiscall FreeStatView::FreeStatView(FreeStatView *this)
{
  FreeStatView *v1; // esi@1

  v1 = this;
  FrameBoxWin::FrameBoxWin((FrameBoxWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&FreeStatView::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&FreeStatView::`vftable'{for `IDirectMessenger'};
}
// 98A03C: using guessed type void (__thiscall *FreeStatView::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98A05C: using guessed type int (__thiscall *FreeStatView::`vftable'{for `NiNode'})(void *p, char);

//----- (004F7EB0) --------------------------------------------------------
void __thiscall FreeStatView::~FreeStatView(FreeStatView *this)
{
  this->vfptr = (NiRefObjectVtbl *)&FreeStatView::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&FreeStatView::`vftable'{for `IDirectMessenger'};
  FrameBoxWin::~FrameBoxWin((FrameBoxWin *)&this->vfptr);
}
// 98A03C: using guessed type void (__thiscall *FreeStatView::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98A05C: using guessed type int (__thiscall *FreeStatView::`vftable'{for `NiNode'})(void *p, char);

//----- (004F7ED0) --------------------------------------------------------
void __thiscall FreeStatView::ClearText(FreeStatView *this)
{
  char *v1; // esi@1
  signed int v2; // edi@1

  v1 = (char *)this->m_apkTextWin;
  v2 = 20;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v1 + 472))(&unk_989FA9);
    v1 += 4;
    --v2;
  }
  while ( v2 );
}

//----- (004F7F00) --------------------------------------------------------
char __thiscall FreeStatView::SetTipText(FreeStatView *this, int nLine, char *pcText, int r, int g, int b, Font::Type font)
{
  FreeStatView *v7; // esi@1
  char result; // al@2
  NiRefObjectVtbl *v9; // ebx@3
  PgFont *v10; // eax@3

  v7 = this;
  if ( nLine < 20 )
  {
    v9 = this->m_apkTextWin[nLine]->vfptr;
    v10 = Font::Get(font);
    v9[113].__vecDelDtor((NiRefObject *)v7->m_apkTextWin[nLine], (unsigned int)v10);
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v7->m_apkTextWin[nLine]->vfptr[116].__vecDelDtor)(r, g, b, 255);
    ((void (__stdcall *)(_DWORD))v7->m_apkTextWin[nLine]->vfptr[118].__vecDelDtor)(pcText);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (004F7F80) --------------------------------------------------------
void __thiscall FreeStatView::OnCommand(FreeStatView *this, unsigned int wParam, int lParam)
{
  unsigned int v3; // eax@1

  v3 = wParam - 1;
  if ( wParam == 1 )
    PgWin::PostMsg((PgWin *)&this->vfptr, 1u, v3, v3);
}

//----- (004F7FA0) --------------------------------------------------------
char *__cdecl GetIntSignedStr(int iValue)
{
  char *result; // eax@2

  if ( iValue <= 0 )
    result = fs("%d", iValue);
  else
    result = fs(off_989FC4, iValue);
  return result;
}

//----- (004F7FD0) --------------------------------------------------------
char *__cdecl GetFloatSignedStr(float fValue)
{
  char *result; // eax@2
  double v2; // [sp+0h] [bp-8h]@1

  v2 = fValue;
  if ( fValue <= 0.0 )
    result = fs("%.1f%%", v2);
  else
    result = fs("+%.1f%%", v2);
  return result;
}

//----- (004F8010) --------------------------------------------------------
char __thiscall FreeStatView::SetText(FreeStatView *this, int nLine, char *pcText)
{
  char result; // al@2

  if ( nLine < 20 )
  {
    ((void (__stdcall *)(_DWORD))this->m_apkTextWin[nLine]->vfptr[118].__vecDelDtor)(pcText);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (004F8040) --------------------------------------------------------
void __thiscall FreeStatView::AdjustSize(FreeStatView *this)
{
  FreeStatView *v1; // edi@1
  char *v2; // esi@1
  PgFont *v3; // eax@1
  unsigned int v4; // ebx@2
  char *v5; // eax@3
  bool v6; // zf@7
  unsigned int v7; // esi@8
  unsigned int v8; // esi@8
  NiRefObjectVtbl **v9; // eax@8
  NiRefObjectVtbl *v10; // edx@8
  NiRefObjectVtbl *v11; // esi@8
  unsigned int v12; // eax@8
  tagSIZE kSize; // [sp+8h] [bp-18h]@4
  PgFont *pkFont; // [sp+10h] [bp-10h]@1
  int v15; // [sp+14h] [bp-Ch]@2
  PgWinText **v16; // [sp+18h] [bp-8h]@2
  unsigned int uiCy; // [sp+1Ch] [bp-4h]@2

  v1 = this;
  v2 = (char *)this->m_apkTextWin;
  v3 = (PgFont *)((int (*)(void))this->m_apkTextWin[0]->vfptr[114].__vecDelDtor)();
  pkFont = v3;
  if ( v3 )
  {
    SelectObject(v3->m_kFontRenderStuff.hDC, v3->m_hFont);
    v4 = 0;
    uiCy = 0;
    v16 = v1->m_apkTextWin;
    v15 = 20;
    do
    {
      v5 = (char *)(*(int (**)(void))(**(_DWORD **)v2 + 484))();
      if ( v5 )
      {
        PgFont::GetTextSize(pkFont, v5, strlen(v5), &kSize);
        if ( kSize.cx > v4 )
          v4 = kSize.cx;
        uiCy += kSize.cy + 3;
      }
      v2 = (char *)(v16 + 1);
      v6 = v15-- == 1;
      ++v16;
    }
    while ( !v6 );
    v7 = uiCy;
    ((void (__stdcall *)(unsigned int))v1->m_pkOKBut->vfptr[44].__vecDelDtor)(uiCy);
    v8 = ((int (*)(void))v1->m_pkOKBut->vfptr[37].__vecDelDtor)() + v7;
    v9 = &v1->m_pkOKBut->vfptr;
    v10 = *v9;
    uiCy = v8;
    v11 = *v9;
    v12 = ((int (*)(void))v10[36].__vecDelDtor)();
    v11[43].__vecDelDtor((NiRefObject *)v1->m_pkOKBut, (v4 >> 1) - (v12 >> 1) + 20);
    if ( v4 )
      ((void (__thiscall *)(FreeStatView *, unsigned int, unsigned int))v1->vfptr[135].__vecDelDtor)(
        v1,
        v4 + 2 * v1->m_uiEdgeWidth + 90,
        uiCy + 2 * v1->m_uiEdgeHeight);
  }
}

//----- (004F8170) --------------------------------------------------------
char __thiscall FreeStatView::Create(FreeStatView *this, NiSourceTexture *pkTexture, unsigned int uiEdgeWidth, unsigned int uiEdgeHeight)
{
  FreeStatView *v4; // esi@1
  char result; // al@2
  signed int v6; // edi@3
  PgWinText **v7; // ebx@3
  PgFont *v8; // eax@4
  PgWinText *v9; // eax@4
  NiTexturePalette *v10; // edi@5
  const char *v11; // eax@7
  PgSprData *v12; // edi@8
  PgWinBut *v13; // ST14_4@8
  PgWinBut *v14; // esi@8
  PgFont *v15; // ST10_4@8
  unsigned int v16; // ST0C_4@8
  unsigned int v17; // eax@8
  PgWinText *v18; // esi@8
  NiRefObjectVtbl *v19; // edi@8
  NiUnsharedGeometryGroup *v20; // eax@8
  void (__thiscall ***v21)(_DWORD, _DWORD); // esi@9

  v4 = this;
  if ( !FrameBoxWin::Create((FrameBoxWin *)&this->vfptr, pkTexture, uiEdgeWidth, uiEdgeHeight, 0, 0, 0, 0) )
    goto LABEL_15;
  v6 = 0;
  v7 = v4->m_apkTextWin;
  do
  {
    v8 = Font::Get(0);
    v9 = PgWinText::CreateWin(
           v4->m_uiEdgeWidth,
           v4->m_uiEdgeHeight + v6 + 2,
           0x100u,
           0x10u,
           v8,
           (PgWin *)&v4->vfptr,
           0,
           0);
    *v7 = v9;
    v9->vfptr[60].__vecDelDtor((NiRefObject *)v9, 0);
    v6 += 14;
    ++v7;
  }
  while ( v6 < 280 );
  ((void (__thiscall *)(FreeStatView *))v4->vfptr[138].__vecDelDtor)(v4);
  ((void (__thiscall *)(FreeStatView *, unsigned int, unsigned int))v4->vfptr[135].__vecDelDtor)(
    v4,
    2 * v4->m_uiEdgeWidth + 128,
    2 * v4->m_uiEdgeHeight + 12);
  uiEdgeHeight = 0;
  v10 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v11 = Folder::Merge(&Folder::m_acMenu, "Game\\MessageWin.nif");
  PgUtil::LoadNodeNifFile(v11, (NiPointer<NiNode> *)&uiEdgeHeight, v10);
  if ( uiEdgeHeight )
  {
    v12 = PgSprData::Create((NiAVObject *)uiEdgeHeight, "BtnNor01", (int *)&pkTexture, (int *)&uiEdgeWidth, 0);
    PgSprData::Add(v12, (NiAVObject *)uiEdgeHeight, "BtnClick01");
    PgSprData::Add(v12, (NiAVObject *)uiEdgeHeight, "BtnOver01");
    v13 = PgWinBut::CreateWin((int)pkTexture, uiEdgeWidth, v12, (PgWin *)&v4->vfptr, 1u, 0, 0);
    v4->m_pkOKBut = v13;
    v14 = v13;
    v15 = Font::Get(0);
    v16 = ((int (__thiscall *)(PgWinBut *))v14->vfptr[37].__vecDelDtor)(v14);
    v17 = ((int (__thiscall *)(PgWinBut *))v14->vfptr[36].__vecDelDtor)(v14);
    v18 = PgWinText::CreateWin(0, 0, v17, v16, v15, (PgWin *)&v13->vfptr, 0, 0);
    v18->vfptr[122].__vecDelDtor((NiRefObject *)v18, 5u);
    v19 = v18->vfptr;
    v20 = TextData::Get(0x4F5F499Fu);
    v19[118].__vecDelDtor((NiRefObject *)v18, (unsigned int)v20);
    v18->vfptr[60].__vecDelDtor((NiRefObject *)v18, 0);
    if ( uiEdgeHeight )
    {
      v21 = (void (__thiscall ***)(_DWORD, _DWORD))uiEdgeHeight;
      if ( !InterlockedDecrement((volatile LONG *)(uiEdgeHeight + 4)) )
      {
        if ( v21 )
          (**v21)(v21, 1);
      }
    }
    result = 1;
  }
  else
  {
LABEL_15:
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004F83A0) --------------------------------------------------------
void __userpurge FreeStatView::SetFreeStatPoint(FreeStatView *this@<ecx>, int a2@<ebx>, User::FreeStatPoint *rkPoint)
{
  User::FreeStatPoint *v3; // edi@1
  FreeStatView *v4; // esi@1
  char *v5; // eax@2
  int v6; // ST40_4@4
  NiRefObjectVtbl *v7; // ebx@4
  char *v8; // ST3C_4@4
  NiUnsharedGeometryGroup *v9; // eax@4
  char *v10; // eax@4
  char *v11; // eax@5
  NiRefObjectVtbl *v12; // ebx@7
  char *v13; // ST44_4@7
  NiUnsharedGeometryGroup *v14; // eax@7
  char *v15; // eax@8
  NiRefObjectVtbl *v16; // ebx@10
  char *v17; // ST40_4@10
  NiUnsharedGeometryGroup *v18; // eax@10
  char *v19; // eax@10
  char *v20; // eax@11
  NiRefObjectVtbl *v21; // ebx@13
  char *v22; // ST40_4@13
  NiUnsharedGeometryGroup *v23; // eax@13
  char *v24; // eax@13
  char *v25; // eax@14
  NiRefObjectVtbl *v26; // ebx@16
  char *v27; // ST44_4@16
  NiUnsharedGeometryGroup *v28; // eax@16
  char *v29; // eax@16
  char *v30; // eax@17
  NiRefObjectVtbl *v31; // ebx@19
  char *v32; // ST44_4@19
  NiUnsharedGeometryGroup *v33; // eax@19
  char *v34; // eax@20
  NiRefObjectVtbl *v35; // ebx@22
  char *v36; // ST40_4@22
  NiUnsharedGeometryGroup *v37; // eax@22
  char *v38; // eax@22
  char *v39; // eax@23
  NiRefObjectVtbl *v40; // ebx@25
  char *v41; // ST40_4@25
  NiUnsharedGeometryGroup *v42; // eax@25
  char *v43; // eax@25
  char *v44; // eax@26
  NiRefObjectVtbl *v45; // ebx@28
  char *v46; // ST44_4@28
  NiUnsharedGeometryGroup *v47; // eax@28
  char *v48; // eax@29
  NiRefObjectVtbl *v49; // edi@31
  char *v50; // ST44_4@31
  NiUnsharedGeometryGroup *v51; // eax@31
  double v52; // [sp+3Ch] [bp-10h]@7
  double v53; // [sp+3Ch] [bp-10h]@10
  double v54; // [sp+3Ch] [bp-10h]@19
  double v55; // [sp+3Ch] [bp-10h]@22
  unsigned int v56; // [sp+40h] [bp-Ch]@1
  signed int v57; // [sp+44h] [bp-8h]@4
  char *v58; // [sp+44h] [bp-8h]@7
  signed int v59; // [sp+44h] [bp-8h]@13
  signed int v60; // [sp+44h] [bp-8h]@16
  char *v61; // [sp+44h] [bp-8h]@19
  signed int v62; // [sp+44h] [bp-8h]@25
  signed int v63; // [sp+44h] [bp-8h]@28
  User::FreeStatPoint *rkPointa; // [sp+54h] [bp+8h]@7
  User::FreeStatPoint *rkPointb; // [sp+54h] [bp+8h]@10
  User::FreeStatPoint *rkPointc; // [sp+54h] [bp+8h]@19
  User::FreeStatPoint *rkPointd; // [sp+54h] [bp+8h]@22

  v3 = rkPoint;
  v4 = this;
  v56 = rkPoint->dwFreeWC;
  if ( (signed int)rkPoint->dwFreeWC <= 0 )
    v5 = fs("%d", v56);
  else
    v5 = fs(off_989FC4, v56);
  v6 = a2;
  v7 = v4->vfptr;
  v8 = v5;
  v9 = TextData::Get(0x16404892u);
  v10 = fs("%s : %s", v9, v8);
  ((void (__thiscall *)(FreeStatView *, signed int, char *, int))v7[139].__vecDelDtor)(v4, 2, v10, v6);
  v57 = rkPoint->dwFreeAC;
  if ( v57 <= 0 )
    v11 = fs("%d", v57);
  else
    v11 = fs(off_989FC4, v57);
  v12 = v4->vfptr;
  v13 = v11;
  v14 = TextData::Get(0x16414C8Bu);
  v58 = fs("%s : %s", v14, v13);
  v12[139].__vecDelDtor((NiRefObject *)v4, 3u);
  *(float *)&rkPointa = (double)rkPoint->dwFreeTH / 10.0;
  v52 = *(float *)&rkPointa;
  if ( *(float *)&rkPointa <= 0.0 )
    v15 = fs("%.1f%%", v52);
  else
    v15 = fs("+%.1f%%", v52);
  v16 = v4->vfptr;
  v17 = v15;
  v18 = TextData::Get(0xD0F94C4F);
  v19 = fs("%s : %s", v18, v17);
  ((void (__thiscall *)(FreeStatView *, signed int, char *))v16[139].__vecDelDtor)(v4, 4, v19);
  *(float *)&rkPointb = (double)v3->dwFreeTB / 10.0;
  v53 = *(float *)&rkPointb;
  if ( *(float *)&rkPointb <= 0.0 )
    v20 = fs("%.1f%%", v53);
  else
    v20 = fs("+%.1f%%", v53);
  v21 = v4->vfptr;
  v22 = v20;
  v23 = TextData::Get(0x393C303Du);
  v24 = fs("%s : %s", v23, v22);
  ((void (__thiscall *)(FreeStatView *, signed int, char *, char *))v21[139].__vecDelDtor)(v4, 5, v24, v58);
  v59 = v3->dwFreeMA;
  if ( v59 <= 0 )
    v25 = fs("%d", v59);
  else
    v25 = fs(off_989FC4, v59);
  v26 = v4->vfptr;
  v27 = v25;
  v28 = TextData::Get(0x273C7779u);
  v29 = fs("%s : %s", v28, v27);
  ((void (__thiscall *)(FreeStatView *, signed int, char *))v26[139].__vecDelDtor)(v4, 6, v29);
  v60 = v3->dwFreeMR;
  if ( v60 <= 0 )
    v30 = fs("%d", v60);
  else
    v30 = fs(off_989FC4, v60);
  v31 = v4->vfptr;
  v32 = v30;
  v33 = TextData::Get(0x2F368A93u);
  v61 = fs("%s : %s", v33, v32);
  v31[139].__vecDelDtor((NiRefObject *)v4, 7u);
  *(float *)&rkPointc = (double)v3->dwFreeCRITICAL / 10.0;
  v54 = *(float *)&rkPointc;
  if ( *(float *)&rkPointc <= 0.0 )
    v34 = fs("%.1f%%", v54);
  else
    v34 = fs("+%.1f%%", v54);
  v35 = v4->vfptr;
  v36 = v34;
  v37 = TextData::Get(0x2D8F9C72u);
  v38 = fs("%s : %s", v37, v36);
  ((void (__thiscall *)(FreeStatView *, signed int, char *))v35[139].__vecDelDtor)(v4, 8, v38);
  *(float *)&rkPointd = (double)v3->dwFreeBLOCK / 10.0;
  v55 = *(float *)&rkPointd;
  if ( *(float *)&rkPointd <= 0.0 )
    v39 = fs("%.1f%%", v55);
  else
    v39 = fs("+%.1f%%", v55);
  v40 = v4->vfptr;
  v41 = v39;
  v42 = TextData::Get(0x263F3F94u);
  v43 = fs("%s : %s", v42, v41);
  ((void (__thiscall *)(FreeStatView *, signed int, char *, char *))v40[139].__vecDelDtor)(v4, 9, v43, v61);
  v62 = v3->dwFreeMAXHP;
  if ( v62 <= 0 )
    v44 = fs("%d", v62);
  else
    v44 = fs(off_989FC4, v62);
  v45 = v4->vfptr;
  v46 = v44;
  v47 = TextData3::Get(0xE2DB033E);
  fs("%s : %s", v47, v46);
  v45[139].__vecDelDtor((NiRefObject *)v4, 10u);
  v63 = v3->dwFreeMAXSP;
  if ( v63 <= 0 )
    v48 = fs("%d", v63);
  else
    v48 = fs(off_989FC4, v63);
  v49 = v4->vfptr;
  v50 = v48;
  v51 = TextData3::Get(0xFBE9C230);
  fs("%s : %s", v51, v50);
  v49[139].__vecDelDtor((NiRefObject *)v4, 11u);
  FreeStatView::AdjustSize(v4);
}
// 4F83A0: could not find valid save-restore pair for ebx

//----- (004F8720) --------------------------------------------------------
void __userpurge FreeStatView::UpdateMeWin(FreeStatView *this@<ecx>, int a2@<ebx>, float fCurTime)
{
  FreeStatView::SetFreeStatPoint(this, a2, &rkPoint);
}

//----- (004F8730) --------------------------------------------------------
void __thiscall FreeStatView::InitAllTextWin(FreeStatView *this)
{
  FreeStatView *v1; // esi@1
  NiRefObjectVtbl *v2; // edi@1
  NiUnsharedGeometryGroup *v3; // eax@1
  NiRefObjectVtbl *v4; // edi@1
  NiUnsharedGeometryGroup *v5; // eax@1
  NiRefObjectVtbl *v6; // edi@1
  NiUnsharedGeometryGroup *v7; // eax@1
  NiRefObjectVtbl *v8; // edi@1
  NiUnsharedGeometryGroup *v9; // eax@1
  NiRefObjectVtbl *v10; // edi@1
  NiUnsharedGeometryGroup *v11; // eax@1
  NiRefObjectVtbl *v12; // edi@1
  NiUnsharedGeometryGroup *v13; // eax@1

  v1 = this;
  v2 = this->vfptr;
  v3 = TextData::Get(0x354F417Bu);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v2[137].__vecDelDtor)(
    v1,
    0,
    v3,
    255,
    255,
    255,
    1);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v1->vfptr[137].__vecDelDtor)(
    v1,
    1,
    " ",
    255,
    255,
    255,
    0);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v1->vfptr[137].__vecDelDtor)(
    v1,
    2,
    &unk_989FAA,
    251,
    225,
    49,
    0);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v1->vfptr[137].__vecDelDtor)(
    v1,
    3,
    &unk_989FAB,
    149,
    251,
    192,
    0);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v1->vfptr[137].__vecDelDtor)(
    v1,
    4,
    &unk_989FB7,
    154,
    251,
    49,
    0);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v1->vfptr[137].__vecDelDtor)(
    v1,
    5,
    &unk_989FC2,
    154,
    251,
    49,
    0);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v1->vfptr[137].__vecDelDtor)(
    v1,
    6,
    &unk_989FC3,
    101,
    163,
    255,
    0);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v1->vfptr[137].__vecDelDtor)(
    v1,
    7,
    &unk_989FCB,
    191,
    135,
    225,
    0);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v1->vfptr[137].__vecDelDtor)(
    v1,
    8,
    &unk_989FDB,
    191,
    135,
    225,
    0);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v1->vfptr[137].__vecDelDtor)(
    v1,
    9,
    &unk_98A02E,
    49,
    251,
    192,
    0);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v1->vfptr[137].__vecDelDtor)(
    v1,
    10,
    &unk_98A02F,
    49,
    251,
    192,
    0);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v1->vfptr[137].__vecDelDtor)(
    v1,
    11,
    &unk_98A030,
    191,
    135,
    225,
    0);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v1->vfptr[137].__vecDelDtor)(
    v1,
    12,
    " ",
    255,
    255,
    255,
    0);
  v4 = v1->vfptr;
  v5 = TextData::Get(0x8BD4EBFA);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v4[137].__vecDelDtor)(
    v1,
    13,
    v5,
    251,
    225,
    49,
    0);
  v6 = v1->vfptr;
  v7 = TextData::Get(0x8BD5EBFA);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v6[137].__vecDelDtor)(
    v1,
    14,
    v7,
    154,
    251,
    49,
    0);
  v8 = v1->vfptr;
  v9 = TextData::Get(0x8BD6EBFA);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v8[137].__vecDelDtor)(
    v1,
    15,
    v9,
    49,
    251,
    192,
    0);
  v10 = v1->vfptr;
  v11 = TextData::Get(0x8BD7EBFA);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v10[137].__vecDelDtor)(
    v1,
    16,
    v11,
    101,
    163,
    255,
    0);
  v12 = v1->vfptr;
  v13 = TextData::Get(0x8BD8EBFA);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v12[137].__vecDelDtor)(
    v1,
    17,
    v13,
    191,
    135,
    225,
    0);
}

//----- (004F89E0) --------------------------------------------------------
FreeStatView *__cdecl FreeStatView::CreateWin(NiSourceTexture *pkTexture, unsigned int uiEdgeHeight, unsigned int uiEdgeWidth)
{
  PgWin *v3; // eax@1
  PgWin *v4; // esi@1
  PgWin *v5; // edi@8
  FreeStatView *v6; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x1F4u);
  v4 = v3;
  result.m_pObject = v3;
  v8 = 0;
  if ( v3 )
  {
    FrameBoxWin::FrameBoxWin((FrameBoxWin *)v3);
    v4->vfptr = (NiRefObjectVtbl *)&FreeStatView::`vftable'{for `NiNode'};
    v4->vfptr = (IDirectMessengerVtbl *)&FreeStatView::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v8 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v4);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, NiSourceTexture *, unsigned int, unsigned int))v4->vfptr[140].__vecDelDtor)(
                          v4,
                          pkTexture,
                          uiEdgeHeight,
                          uiEdgeWidth) )
  {
    ((void (__thiscall *)(PgWin *))v4->vfptr[89].__vecDelDtor)(v4);
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = (FreeStatView *)v4;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v4);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = 0;
  }
  return v6;
}
// 98A03C: using guessed type void (__thiscall *FreeStatView::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98A05C: using guessed type int (__thiscall *FreeStatView::`vftable'{for `NiNode'})(void *p, char);

//----- (004F8B30) --------------------------------------------------------
FreeStatView *__thiscall FreeStatView::`scalar deleting destructor'(FreeStatView *this, unsigned int a2)
{
  FreeStatView *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&FreeStatView::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&FreeStatView::`vftable'{for `IDirectMessenger'};
  FrameBoxWin::~FrameBoxWin((FrameBoxWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98A03C: using guessed type void (__thiscall *FreeStatView::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98A05C: using guessed type int (__thiscall *FreeStatView::`vftable'{for `NiNode'})(void *p, char);

//----- (004F8B70) --------------------------------------------------------
void __thiscall FriendCallWin::FriendCallWin(FriendCallWin *this)
{
  FriendCallWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&FriendCallWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&FriendCallWin::`vftable'{for `IDirectMessenger'};
  CFriend::CFriend(&v1->m_kFriend);
  v1->m_pkSlideBarEx = 0;
  v1->m_pFriendListWin = 0;
}
// 98A430: using guessed type void (__thiscall *FriendCallWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98A44C: using guessed type int (__thiscall *FriendCallWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F8BF0) --------------------------------------------------------
void __thiscall FriendCallWin::~FriendCallWin(FriendCallWin *this)
{
  FriendCallWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&FriendCallWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&FriendCallWin::`vftable'{for `IDirectMessenger'};
  CFriend::~CFriend(&this->m_kFriend);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 98A430: using guessed type void (__thiscall *FriendCallWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98A44C: using guessed type int (__thiscall *FriendCallWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F8C60) --------------------------------------------------------
void __thiscall FriendCallWin::ClearFriendList(FriendCallWin *this)
{
  NiPointer<PgWinLRBut>::`default constructor closure'((NiPointer<NiD3DTextureStage> *)&this->m_kFriend);
}

//----- (004F8C70) --------------------------------------------------------
void FriendCallWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "CallFrnd");
}

//----- (004F8CA0) --------------------------------------------------------
void __thiscall FriendCallWin::OnSlideBar(FriendCallWin *this)
{
  if ( this->m_pFriendListWin )
  {
    this->m_pFriendListWin->m_nViewStartPos = this->m_pkSlideBarEx->m_nCurPos;
    SlideListWin::UpdateViewList(this->m_pFriendListWin);
  }
}

//----- (004F8CD0) --------------------------------------------------------
void __thiscall FriendCallWin::OnCommand(FriendCallWin *this, unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@4

  switch ( wParam )
  {
    case 1u:
      if ( this->m_pFriendListWin )
      {
        this->m_pFriendListWin->m_nViewStartPos = this->m_pkSlideBarEx->m_nCurPos;
        SlideListWin::UpdateViewList(this->m_pFriendListWin);
      }
      break;
    case 3u:
      PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
      break;
    case 4u:
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v3 )
        GameFrameWork::OpenPlayGuideSearchList(v3, "CallFrnd");
      break;
  }
}

//----- (004F8D50) --------------------------------------------------------
void __thiscall FriendCallWin::AddListItem_DefInfo(FriendCallWin *this, PROTO_FRIEND_INFO *pdata)
{
  FriendCallWin *v2; // ebx@1
  SlideListWin *v3; // ecx@1
  unsigned int v4; // eax@2
  unsigned int v5; // edx@2
  unsigned int v6; // eax@2
  unsigned int v7; // edi@2
  char *v8; // eax@2
  const char *v9; // eax@3
  SlideListWin *v10; // ecx@5
  SlideListWin *v11; // ecx@5
  char szdata[128]; // [sp+8h] [bp-9Ch]@5
  char acname[21]; // [sp+88h] [bp-1Ch]@2

  v2 = this;
  v3 = this->m_pFriendListWin;
  if ( v3 )
  {
    v4 = pdata->charid.n5_code[0];
    *(_DWORD *)&acname[4] = pdata->charid.n5_code[1];
    v5 = pdata->charid.n5_code[3];
    *(_DWORD *)acname = v4;
    v6 = pdata->charid.n5_code[2];
    *(_DWORD *)&acname[12] = v5;
    *(_DWORD *)&acname[8] = v6;
    *(_DWORD *)&acname[16] = pdata->charid.n5_code[4];
    acname[20] = 0;
    v7 = SlideListWin::AddText(v3, acname);
    v8 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), pdata->classid);
    if ( v8 )
      v9 = v8 + 21;
    else
      v9 = (const char *)&unk_96F8EB;
    SlideListWin::SetText(v2->m_pFriendListWin, v7, 1u, v9);
    sprintf(szdata, "%d", pdata->level);
    SlideListWin::SetText(v2->m_pFriendListWin, v7, 2u, szdata);
    szdata[0] = pdata->isparty != 0 ? 111 : 120;
    v10 = v2->m_pFriendListWin;
    szdata[1] = 0;
    SlideListWin::SetText(v10, v7, 3u, szdata);
    SlideListWin::SetData(v2->m_pFriendListWin, v7, (unsigned int)pdata);
    SlideListWin::SetFontSize(v2->m_pFriendListWin, v7, 1);
    v11 = v2->m_pFriendListWin;
    if ( *(_BYTE *)&pdata->logininfo & 1 )
      SlideListWin::SetFontColor(v11, v7, 255, 255, 0);
    else
      SlideListWin::SetFontColor(v11, v7, 200, 200, 200);
  }
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (004F8E90) --------------------------------------------------------
void __thiscall FriendCallWin::UpdateViewList(FriendCallWin *this)
{
  FriendCallWin *v1; // edi@1
  SlideListWin *v2; // ecx@1
  int v3; // esi@3
  SlideListWin *v4; // ecx@4
  int v5; // eax@5
  int v6; // edx@5
  int v7; // eax@5
  unsigned int v8; // ebx@5
  char *v9; // eax@5
  const char *v10; // eax@6
  SlideListWin *v11; // ecx@8
  SlideListWin *v12; // ecx@8
  int i; // [sp+4h] [bp-A0h]@2
  char string; // [sp+8h] [bp-9Ch]@8
  char v15; // [sp+9h] [bp-9Bh]@8
  char szText[4]; // [sp+88h] [bp-1Ch]@5
  int v17; // [sp+8Ch] [bp-18h]@5
  int v18; // [sp+90h] [bp-14h]@5
  int v19; // [sp+94h] [bp-10h]@5
  int v20; // [sp+98h] [bp-Ch]@5
  char v21; // [sp+9Ch] [bp-8h]@5

  v1 = this;
  v2 = this->m_pFriendListWin;
  if ( v2 )
  {
    SlideListWin::RemoveAllList(v2);
    i = 0;
    if ( v1->m_kFriend.m_NumOfFriend > 0 )
    {
      v3 = (int)&v1->m_kFriend.m_Friends[0].charid.n5_code[2];
      do
      {
        v4 = v1->m_pFriendListWin;
        if ( v4 )
        {
          v5 = *(_DWORD *)(v3 - 8);
          v17 = *(_DWORD *)(v3 - 4);
          v6 = *(_DWORD *)(v3 + 4);
          *(_DWORD *)szText = v5;
          v7 = *(_DWORD *)v3;
          v19 = v6;
          v18 = v7;
          v20 = *(_DWORD *)(v3 + 8);
          v21 = 0;
          v8 = SlideListWin::AddText(v4, szText);
          v9 = CDataReader::GetRecord(
                 (CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4),
                 *(_BYTE *)(v3 + 12));
          if ( v9 )
            v10 = v9 + 21;
          else
            v10 = (const char *)&unk_96F8EB;
          SlideListWin::SetText(v1->m_pFriendListWin, v8, 1u, v10);
          sprintf(&string, "%d", *(_BYTE *)(v3 + 13));
          SlideListWin::SetText(v1->m_pFriendListWin, v8, 2u, &string);
          string = *(_BYTE *)(v3 + 14) != 0 ? 111 : 120;
          v11 = v1->m_pFriendListWin;
          v15 = 0;
          SlideListWin::SetText(v11, v8, 3u, &string);
          SlideListWin::SetData(v1->m_pFriendListWin, v8, v3 - 12);
          SlideListWin::SetFontSize(v1->m_pFriendListWin, v8, 1);
          v12 = v1->m_pFriendListWin;
          if ( *(_BYTE *)(v3 - 12) & 1 )
            SlideListWin::SetFontColor(v12, v8, 255, 255, 0);
          else
            SlideListWin::SetFontColor(v12, v8, 200, 200, 200);
        }
        v3 += 72;
        ++i;
      }
      while ( i < v1->m_kFriend.m_NumOfFriend );
    }
    SlideListWin::UpdateViewList(v1->m_pFriendListWin);
    SlideBar::SetSplitCnt(v1->m_pkSlideBarEx, v1->m_pFriendListWin->m_nSlideSplitCnt);
  }
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (004F9050) --------------------------------------------------------
void __thiscall FriendCallWin::ChangeUserName(FriendCallWin *this, Name5 *OldName, Name5 *NewName)
{
  FriendCallWin *v3; // esi@1
  PROTO_FRIEND_INFO *v4; // eax@1

  v3 = this;
  v4 = CFriend::Get(&this->m_kFriend, OldName);
  if ( v4 )
  {
    *(_QWORD *)&v4->charid.n5_name[0] = *(_QWORD *)&NewName->n5_code[0];
    *(_QWORD *)&v4->charid.n5_code[2] = *(_QWORD *)&NewName->n5_code[2];
    v4->charid.n5_code[4] = NewName->n5_code[4];
    FriendCallWin::UpdateViewList(v3);
  }
}

//----- (004F90A0) --------------------------------------------------------
FriendCallWin *__cdecl FriendCallWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  FriendCallWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1D88u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    LOBYTE(v6) = 1;
    v2->vfptr = (NiRefObjectVtbl *)&FriendCallWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&FriendCallWin::`vftable'{for `IDirectMessenger'};
    CFriend::CFriend((CFriend *)v2[1].m_kLocal.m_Rotate.m_pEntry[1]);
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (FriendCallWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 98A430: using guessed type void (__thiscall *FriendCallWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98A44C: using guessed type int (__thiscall *FriendCallWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F9200) --------------------------------------------------------
void __thiscall FriendCallWin::AddFriend(FriendCallWin *this, PROTO_FRIEND_INFO *pInfo, bool bListElem)
{
  FriendCallWin *v3; // esi@1

  v3 = this;
  CFriend::Add(&this->m_kFriend, pInfo);
  FriendCallWin::UpdateViewList(v3);
}

//----- (004F9230) --------------------------------------------------------
char __thiscall FriendCallWin::DelFriend(FriendCallWin *this, Name5 charid)
{
  FriendCallWin *v2; // esi@1

  v2 = this;
  CFriend::Del(&this->m_kFriend, &charid);
  FriendCallWin::UpdateViewList(v2);
  return 1;
}

//----- (004F9260) --------------------------------------------------------
char __thiscall FriendCallWin::LoginFriend(FriendCallWin *this, Name5 charid)
{
  FriendCallWin *v2; // esi@1

  v2 = this;
  CFriend::Login(&this->m_kFriend, &charid);
  FriendCallWin::UpdateViewList(v2);
  return 1;
}

//----- (004F9290) --------------------------------------------------------
char __thiscall FriendCallWin::LogoutFriend(FriendCallWin *this, Name5 charid)
{
  FriendCallWin *v2; // esi@1

  v2 = this;
  CFriend::Logout(&this->m_kFriend, &charid);
  FriendCallWin::UpdateViewList(v2);
  return 1;
}

//----- (004F92C0) --------------------------------------------------------
char __thiscall FriendCallWin::ChangeMapFriend(FriendCallWin *this, Name5 charid, Name3 mapName)
{
  FriendCallWin *v3; // esi@1
  _BYTE v4[20]; // ST00_20@1

  v3 = this;
  *(_QWORD *)v4 = *(_QWORD *)&charid.n5_name[0];
  *(_QWORD *)&v4[8] = *(_QWORD *)&charid.n5_code[2];
  *(_DWORD *)&v4[16] = charid.n5_code[4];
  CFriend::MapChange(&this->m_kFriend, *(Name5 *)v4, &mapName);
  FriendCallWin::UpdateViewList(v3);
  return 1;
}

//----- (004F9310) --------------------------------------------------------
char __thiscall FriendCallWin::PartyFriend(FriendCallWin *this, Name5 charid, bool bParty)
{
  FriendCallWin *v3; // esi@1
  _BYTE v4[20]; // ST00_20@1

  v3 = this;
  *(_QWORD *)v4 = *(_QWORD *)&charid.n5_name[0];
  *(_QWORD *)&v4[8] = *(_QWORD *)&charid.n5_code[2];
  *(_DWORD *)&v4[16] = charid.n5_code[4];
  CFriend::PartyChange(&this->m_kFriend, *(Name5 *)v4, bParty);
  FriendCallWin::UpdateViewList(v3);
  return 1;
}

//----- (004F9360) --------------------------------------------------------
char __thiscall FriendCallWin::LevelChange(FriendCallWin *this, Name5 charid, char Level)
{
  FriendCallWin *v3; // esi@1
  _BYTE v4[20]; // ST00_20@1

  v3 = this;
  *(_QWORD *)v4 = *(_QWORD *)&charid.n5_name[0];
  *(_QWORD *)&v4[8] = *(_QWORD *)&charid.n5_code[2];
  *(_DWORD *)&v4[16] = charid.n5_code[4];
  CFriend::LevelChange(&this->m_kFriend, *(Name5 *)v4, Level);
  FriendCallWin::UpdateViewList(v3);
  return 1;
}

//----- (004F93B0) --------------------------------------------------------
char __thiscall FriendCallWin::Create(FriendCallWin *this, PgFrameWork *pkFrameWork)
{
  FriendCallWin *v2; // esi@1
  const char *v3; // eax@3
  PgSprData *v4; // eax@4
  NiNode *v5; // esi@5
  int v7; // edi@10
  NiSourceTexture *v8; // eax@10
  PgSprData *v9; // eax@11
  D3DXCOLOR v10; // ST1C_16@13
  D3DXCOLOR v11; // ST1C_16@13
  NiSourceTexture *v12; // edi@13
  PgWinBut *v13; // eax@15
  D3DXCOLOR v14; // ST1C_16@15
  SLWCreateInfo::Item *v15; // edi@15
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *v16; // edi@15
  SLWCreateInfo::Item *v17; // edi@21
  PgSprData *v18; // eax@23
  SlideListWin *v19; // eax@23
  PgSprData *v20; // eax@23
  SlideBar *v21; // eax@23
  SlideBar *v22; // edi@23
  void *(__thiscall *v23)(NiRefObject *, unsigned int); // edx@23
  SlideBar *v24; // ecx@23
  int v25; // eax@23
  int v26; // eax@23
  NiNode *v27; // esi@25
  UIUtil ui; // [sp+24h] [bp-70h]@13
  SLWCreateInfo kCreateInfo; // [sp+38h] [bp-5Ch]@15
  int iOffX; // [sp+54h] [bp-40h]@10
  int iOffY; // [sp+58h] [bp-3Ch]@1
  int uiLeft; // [sp+5Ch] [bp-38h]@4
  int uiTop; // [sp+60h] [bp-34h]@4
  NiPointer<NiNode> spNode; // [sp+64h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+68h] [bp-2Ch]@15
  int v36; // [sp+90h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  this->m_pkFrameWork = pkFrameWork;
  v36 = 0;
  iOffY = (int)pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v3 = Folder::Merge(&Folder::m_acMenu, "Game\\CallFrnd.nif");
  PgUtil::LoadNodeNifFile(v3, &spNode, (NiTexturePalette *)iOffY);
  if ( !spNode.m_pObject )
    return 0;
  v4 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane01", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v4, 0, pkFrameWork, "FriendCallWin", 0) )
  {
    v5 = spNode.m_pObject;
    v36 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
    return 0;
  }
  v7 = uiLeft;
  iOffX = uiLeft;
  iOffY = uiTop;
  v8 = MenuTexMgr::GetTexture(0x13u);
  if ( v8 )
    v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v8);
  else
    v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v7, uiTop - iOffY, v9, (PgWin *)&v2->vfptr, 0, 0);
  UIUtil::UIUtil(&ui);
  LOBYTE(v36) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, v7, iOffY);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  UIUtil::CreateSpr(&ui, "Panel01", 0);
  UIUtil::CreateSpr(&ui, "Panel02", 0);
  UIUtil::CreateBtn(&ui, 3u, "ClsNor", "ClsOver", "ClsClick", 0, 0);
  *(_QWORD *)&v10.r = *(_QWORD *)&Color::m_kDxWinTitleColor.r;
  *(_QWORD *)&v10.b = *(_QWORD *)&Color::m_kDxWinTitleColor.b;
  UIUtil::CreateTextNoSpr(&ui, "WinTitle", "Ä£±¸ ¼ÒÈ¯", v10, 5u);
  *(_QWORD *)&v11.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v11.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  UIUtil::CreateTextNoSpr(&ui, "ColumnBox", "Ä£±¸ ¼ÒÈ¯ÇÏ±â¿¡ ´ëÇÑ ¾È³»", v11, 5u);
  v12 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
    UIUtil::CreateBtn(&ui, 4u, "HelpLinkNor", "HelpLinkOver", "HelpLinkClick", 0, v12);
  v13 = UIUtil::CreateBtn(&ui, 1u, "OkNor", "OkOver", "OkClick", 0, 0);
  *(_QWORD *)&v14.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v14.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  UIUtil::CreateAttachedText((PgWin *)&v13->vfptr, "Ä£±¸ ºÎ¸£±â", v14, 5u);
  kCreateInfo.m_arrItem._Myfirst = 0;
  kCreateInfo.m_arrItem._Mylast = 0;
  kCreateInfo.m_arrItem._Myend = 0;
  kCreateInfo.m_bMakeData = 0;
  kCreateInfo.m_nOffX = 0;
  kCreateInfo.m_nOffY = 0;
  LOBYTE(v36) = 2;
  v15 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
  v15->nItemType = 1;
  v15->pNode = spNode.m_pObject;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarNor", 0xCu);
  v16 = &v15->vecNodeName;
  LOBYTE(v36) = 3;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v16,
    &_Val);
  LOBYTE(v36) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarClick", 0xEu);
  LOBYTE(v36) = 4;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v16,
    &_Val);
  LOBYTE(v36) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarOver", 0xDu);
  LOBYTE(v36) = 5;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v16,
    &_Val);
  LOBYTE(v36) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v17 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  v17->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column01", 8u);
  LOBYTE(v36) = 6;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &v17->vecNodeName,
    &_Val);
  LOBYTE(v36) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v17->pNode = spNode.m_pObject;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  kCreateInfo.m_nOffX = 5;
  kCreateInfo.m_nOffY = 0;
  SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
  v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ListBox", &uiLeft, &uiTop, 0);
  v19 = SlideListWin::CreateWin(uiLeft - iOffX, uiTop - iOffY, v18, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
  v2->m_pFriendListWin = v19;
  SlideListWin::UpdateViewList(v19);
  v20 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle", &uiLeft, &uiTop, 0);
  v21 = SlideBar::CreateWin(
          spNode.m_pObject,
          "SlideBar",
          "SlideBar_UpBtn",
          "SlideBar_DnBtn",
          v20,
          0,
          (PgWin *)&v2->vfptr);
  v2->m_pkSlideBarEx = v21;
  v21->m_uiClickMsg = 2;
  v2->m_pkSlideBarEx->m_eType = 1;
  v22 = v2->m_pkSlideBarEx;
  v23 = v2->m_pkSlideBarEx->vfptr[42].__vecDelDtor;
  v24 = v2->m_pkSlideBarEx;
  iOffX = (int)v2->m_pkSlideBarEx->vfptr;
  v25 = ((int (__thiscall *)(SlideBar *))v23)(v24);
  v26 = (int)v22->vfptr[41].__vecDelDtor((NiRefObject *)v22, v25 - 18);
  (*(void (__thiscall **)(SlideBar *, int))(iOffX + 308))(v2->m_pkSlideBarEx, v26);
  ((void (__thiscall *)(FriendCallWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.30000001,
    0.5);
  LOBYTE(v36) = 1;
  if ( kCreateInfo.m_arrItem._Myfirst )
  {
    std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(
      kCreateInfo.m_arrItem._Myfirst,
      kCreateInfo.m_arrItem._Mylast);
    operator delete(kCreateInfo.m_arrItem._Myfirst);
  }
  kCreateInfo.m_arrItem._Myfirst = 0;
  kCreateInfo.m_arrItem._Mylast = 0;
  kCreateInfo.m_arrItem._Myend = 0;
  LOBYTE(v36) = 0;
  UIUtil::~UIUtil(&ui);
  v27 = spNode.m_pObject;
  v36 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v27 )
    v27->vfptr->__vecDelDtor((NiRefObject *)v27, 1u);
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004F9950) --------------------------------------------------------
FriendCallWin *__thiscall FriendCallWin::`scalar deleting destructor'(FriendCallWin *this, unsigned int a2)
{
  FriendCallWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&FriendCallWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&FriendCallWin::`vftable'{for `IDirectMessenger'};
  CFriend::~CFriend(&this->m_kFriend);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98A430: using guessed type void (__thiscall *FriendCallWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98A44C: using guessed type int (__thiscall *FriendCallWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F99D0) --------------------------------------------------------
void __thiscall FriendAddWin::FriendAddWin(FriendAddWin *this)
{
  FriendAddWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&FriendAddWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&FriendAddWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkInputBox = 0;
}
// 98AFB8: using guessed type void (__thiscall *FriendAddWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98AFD4: using guessed type int (__thiscall *FriendAddWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F9A00) --------------------------------------------------------
void __thiscall FriendAddWin::~FriendAddWin(FriendAddWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&FriendAddWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&FriendAddWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 98AFB8: using guessed type void (__thiscall *FriendAddWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98AFD4: using guessed type int (__thiscall *FriendAddWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004F9A20) --------------------------------------------------------
void __thiscall FriendAddWin::SetTargetName(FriendAddWin *this, const char *szName)
{
  if ( szName )
    ((void (__stdcall *)(_DWORD))this->m_pkInputBox->vfptr[116].__vecDelDtor)(szName);
}

//----- (004F9A60) --------------------------------------------------------
void __thiscall FriendAddWin::OnClose(FriendAddWin *this)
{
  ((void (__stdcall *)(_DWORD))this->m_pkInputBox->vfptr[121].__vecDelDtor)(1);
}

//----- (004F9A80) --------------------------------------------------------
void __thiscall FriendAddWin::OnShowWin(FriendAddWin *this)
{
  ((void (*)(void))this->m_pkInputBox->vfptr[120].__vecDelDtor)();
}

//----- (004F9AB0) --------------------------------------------------------
void __thiscall FriendWin::OnSortByTitle01(FriendWin *this)
{
  FriendWin *v1; // esi@1
  SlideListWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_pListWinTime;
  if ( v2 )
  {
    v1->m_nSortColumn = 0;
    SlideListWin::Sort(v2, 0, 0, 0);
    SlideListWin::UpdateViewList(v1->m_pListWinTime);
  }
}

//----- (004F9AE0) --------------------------------------------------------
void __thiscall FriendWin::OnSortByTitle02(FriendWin *this)
{
  FriendWin *v1; // esi@1
  SlideListWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_pListWinTime;
  if ( v2 )
  {
    v1->m_nSortColumn = 1;
    SlideListWin::Sort(v2, 1, 0, 0);
    SlideListWin::UpdateViewList(v1->m_pListWinTime);
  }
}

//----- (004F9B10) --------------------------------------------------------
void __thiscall FriendWin::OnSortByTitle03(FriendWin *this)
{
  FriendWin *v1; // esi@1
  SlideListWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_pListWinTime;
  if ( v2 )
  {
    v1->m_nSortColumn = 2;
    SlideListWin::Sort(v2, 2, 0, 1);
    SlideListWin::UpdateViewList(v1->m_pListWinTime);
  }
}

//----- (004F9B40) --------------------------------------------------------
void __thiscall FriendWin::OnSortByTitle04(FriendWin *this)
{
  FriendWin *v1; // esi@1
  SlideListWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_pListWinTime;
  if ( v2 )
  {
    v1->m_nSortColumn = 3;
    SlideListWin::Sort(v2, 3, 0, 0);
    SlideListWin::UpdateViewList(v1->m_pListWinTime);
  }
}

//----- (004F9BA0) --------------------------------------------------------
void __thiscall FriendWin::ClearFriendList(FriendWin *this)
{
  NiPointer<PgWinLRBut>::`default constructor closure'((NiPointer<NiD3DTextureStage> *)&this->m_kFriend);
}

//----- (004F9BB0) --------------------------------------------------------
int __stdcall FriendWin::GetReadNum(_iobuf *fp, int size)
{
  int result; // eax@2
  signed int v4; // edi@5

  if ( size )
  {
    if ( fp )
    {
      fseek(fp, 0, 2);
      v4 = ftell(fp);
      fseek(fp, 0, 0);
      result = v4 / size;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (004F9C00) --------------------------------------------------------
char __stdcall FriendWin::WriteOptFile(_iobuf *fp, void *pData, unsigned int size)
{
  char result; // al@4

  if ( fp && pData && size )
  {
    fwrite(pData, size, 1u, fp);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (004F9C40) --------------------------------------------------------
bool __stdcall FriendWin::IsValidateFile(_iobuf *fp, int dataSize)
{
  signed int v3; // edi@1

  fseek(fp, 0, 2);
  v3 = ftell(fp);
  fseek(fp, 0, 0);
  return v3 % dataSize == 0;
}

//----- (004F9C80) --------------------------------------------------------
void FriendWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "FriendList");
}

//----- (004F9CB0) --------------------------------------------------------
PROTO_FRIEND_INFO *__thiscall FriendWin::GetFriendInfo(FriendWin *this, Name5 *CharID)
{
  return CFriend::Get(&this->m_kFriend, CharID);
}

//----- (004F9CC0) --------------------------------------------------------
void __thiscall FriendWin::FriendFindClear(FriendWin *this)
{
  NiPointer<PgWinLRBut>::`default constructor closure'((NiPointer<NiD3DTextureStage> *)&this->m_kFindFriend);
}

//----- (004F9CD0) --------------------------------------------------------
void __thiscall FriendWin::OnSortByTitle05(FriendWin *this)
{
  FriendWin *v1; // esi@1
  SlideListWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_pListWinTime;
  if ( v2 )
  {
    v1->m_nSortColumn = 4;
    SlideListWin::Sort(v2, 4, 0, 0);
    SlideListWin::UpdateViewList(v1->m_pListWinTime);
  }
}

//----- (004F9D00) --------------------------------------------------------
void __thiscall FriendWin::OnSortByTitle06(FriendWin *this)
{
  FriendWin *v1; // esi@1
  SlideListWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_pListWinTime;
  if ( v2 )
  {
    v1->m_nSortColumn = 5;
    SlideListWin::Sort(v2, 5, 0, 0);
    SlideListWin::UpdateViewList(v1->m_pListWinTime);
  }
}

//----- (004F9D30) --------------------------------------------------------
void __thiscall FriendWin::OnFriendPointUse(FriendWin *this)
{
  if ( this->m_uiFriendPoint >= this->m_uiFriendUsePoint )
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x15u, 0x21u, 0, 0);
}

//----- (004F9D60) --------------------------------------------------------
void __thiscall FriendWin::OnFriendPointHelp(FriendWin *this)
{
  FriendWin *v1; // esi@1

  v1 = this;
  if ( !(unsigned __int8)((int (*)(void))this->m_pkFriendPointTipMsg->vfptr[65].__vecDelDtor)() )
    PgWinMgr::ShowWin(&Pgg_kWinMgr, v1->m_pkFriendPointTipMsg);
}

//----- (004F9D90) --------------------------------------------------------
void __thiscall FriendWin::ResetAddBtn(FriendWin *this)
{
  FriendWin *v1; // ebx@1
  char *v2; // esi@2
  signed int v3; // edi@2

  v1 = this;
  if ( this->m_pkInviterBtn )
  {
    v2 = (char *)this->m_pkAddBtn;
    v3 = 27;
    do
    {
      if ( *(_DWORD *)v2 )
      {
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 240))(0);
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 256))(0);
      }
      v2 += 4;
      --v3;
    }
    while ( v3 );
    ((void (__stdcall *)(_DWORD))v1->m_pkInviterBtn->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v1->m_pkInviterBtn->vfptr[60].__vecDelDtor)(0);
  }
}

//----- (004F9E00) --------------------------------------------------------
void __thiscall FriendPointTipMsg::FriendPointTipMsg(FriendPointTipMsg *this)
{
  FriendPointTipMsg *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&FriendPointTipMsg::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&FriendPointTipMsg::`vftable'{for `IDirectMessenger'};
}
// 98B1F8: using guessed type void (__thiscall *FriendPointTipMsg::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98B214: using guessed type int (__thiscall *FriendPointTipMsg::`vftable'{for `NiNode'})(void *p, char);

//----- (004F9E20) --------------------------------------------------------
void __thiscall FriendPointTipMsg::~FriendPointTipMsg(FriendPointTipMsg *this)
{
  this->vfptr = (NiRefObjectVtbl *)&FriendPointTipMsg::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&FriendPointTipMsg::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 98B1F8: using guessed type void (__thiscall *FriendPointTipMsg::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98B214: using guessed type int (__thiscall *FriendPointTipMsg::`vftable'{for `NiNode'})(void *p, char);

//----- (004F9E40) --------------------------------------------------------
void __thiscall FriendPointTipMsg::OnCmdOK(FriendPointTipMsg *this)
{
  FriendPointTipMsg *v1; // esi@1

  v1 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[65].__vecDelDtor)() )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}

//----- (004F9E60) --------------------------------------------------------
void __thiscall FriendAddWin::OnFriendAddOk(FriendAddWin *this)
{
  FriendAddWin *v1; // edi@1
  char *v2; // eax@1
  _BYTE v3[20]; // ST04_20@4
  Name5 kNullID; // [sp+Ch] [bp-2Ch]@1
  Name5 kCharID; // [sp+20h] [bp-18h]@1

  v1 = this;
  v2 = (char *)((int (*)(void))this->m_pkInputBox->vfptr[113].__vecDelDtor)();
  *(_QWORD *)&kCharID.n5_code[3] = 0i64;
  *(_QWORD *)&kCharID.n5_code[1] = 0i64;
  *(_QWORD *)&kCharID.n5_name[0] = 0i64;
  strncpy(kCharID.n5_name, v2, 0x14u);
  *(_QWORD *)&kNullID.n5_code[3] = 0i64;
  *(_QWORD *)&kNullID.n5_code[1] = 0i64;
  *(_QWORD *)&kNullID.n5_name[0] = 0i64;
  strncpy(kNullID.n5_name, &byte_98A699, 0x14u);
  if ( *(_QWORD *)&kCharID.n5_name[0] != *(_QWORD *)&kNullID.n5_name[0]
    || *(_QWORD *)&kCharID.n5_code[2] != *(_QWORD *)&kNullID.n5_code[2]
    || kCharID.n5_code[4] != kNullID.n5_code[4] )
  {
    *(_QWORD *)v3 = *(_QWORD *)&kCharID.n5_name[0];
    *(_QWORD *)&v3[8] = *(_QWORD *)&kCharID.n5_code[2];
    *(_DWORD *)&v3[16] = kCharID.n5_code[4];
    GameFrameWork::NcFriendSetReq((GameFrameWork *)v1->m_pkFrameWork, *(Name5 *)v3);
  }
  ((void (__stdcall *)(void *))v1->m_pkInputBox->vfptr[115].__vecDelDtor)(&unk_98A69A);
  GameFrameWork::CloseFriendAddWin((GameFrameWork *)v1->m_pkFrameWork);
}

//----- (004F9F40) --------------------------------------------------------
void __thiscall FriendAddWin::OnFriendAddCancel(FriendAddWin *this)
{
  FriendAddWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkInputBox->vfptr[115].__vecDelDtor)(&unk_98A69B);
  GameFrameWork::CloseFriendAddWin((GameFrameWork *)v1->m_pkFrameWork);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}

//----- (004F9F70) --------------------------------------------------------
void __thiscall FriendAddWin::OnCommand(FriendAddWin *this, unsigned int wParam, int lParam)
{
  FriendAddWin *v3; // esi@1

  v3 = this;
  if ( wParam )
  {
    if ( wParam == 1 )
    {
      ((void (__stdcall *)(_DWORD))this->m_pkInputBox->vfptr[115].__vecDelDtor)(&unk_98A69B);
      GameFrameWork::CloseFriendAddWin((GameFrameWork *)v3->m_pkFrameWork);
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
    }
  }
  else
  {
    FriendAddWin::OnFriendAddOk(this);
  }
}

//----- (004F9FC0) --------------------------------------------------------
void __thiscall FriendAddWin::OnEditEnd(FriendAddWin *this, unsigned int wParam, int lParam)
{
  FriendAddWin::OnFriendAddOk(this);
}

//----- (004F9FD0) --------------------------------------------------------
void __thiscall FriendWin::ProcessMeInput(FriendWin *this, bool *bHit)
{
  FriendWin *v2; // esi@1

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[78].__vecDelDtor)() )
  {
    if ( dword_B64790 )
      ++dword_B64790;
    if ( PgWin::ms_kbRbutPressed.m_iBool )
      ++PgWin::ms_kbRbutPressed.m_iBool;
    PgWinFrame::ProcessMeInput((PgWinFrame *)&v2->vfptr, bHit);
    PgWin::ms_kbRbutPressed.m_bReserveFalse = 0;
    if ( PgWin::ms_kbRbutPressed.m_iBool )
      --PgWin::ms_kbRbutPressed.m_iBool;
    byte_B6478C = 0;
    if ( dword_B64790 )
      --dword_B64790;
  }
}
// B6478C: using guessed type char byte_B6478C;
// B64790: using guessed type int dword_B64790;

//----- (004FA050) --------------------------------------------------------
void __thiscall FriendWin::UpdateMeWin(FriendWin *this, float fCurTime)
{
  FriendWin *v2; // esi@1

  v2 = this;
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
    GameFrameWork::UpdateUIScroll(v2->m_pListWinTime, v2->m_pkSlideBarEx);
}

//----- (004FA080) --------------------------------------------------------
void __thiscall FriendWin::OnLClick(FriendWin *this, int nItemIndex)
{
  FriendWin *v2; // esi@1

  v2 = this;
  if ( this == (FriendWin *)g_pkToolTipWin->m_pkToolTipParentWin )
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
  v2->m_bEnableInviter = 0;
}

//----- (004FA0B0) --------------------------------------------------------
void __thiscall FriendWin::OnRClick(FriendWin *this, int nItemIndex)
{
  FriendWin *v2; // esi@1
  int v3; // ecx@3
  PopupMenuWin *v4; // ecx@5

  v2 = this;
  if ( this == (FriendWin *)g_pkToolTipWin->m_pkToolTipParentWin )
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
  v3 = v2->m_iTabIndex;
  if ( !v3 )
  {
    ((void (__stdcall *)(_DWORD, _DWORD))v2->m_spPopupMenu->vfptr[77].__vecDelDtor)(PgWin::ms_iMsX, PgWin::ms_iMsY);
    PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v2->m_spPopupMenu->vfptr);
    v4 = v2->m_spPopupMenu;
    goto LABEL_7;
  }
  if ( v3 == 1 )
  {
    ((void (__stdcall *)(_DWORD, _DWORD))v2->m_spFindPopupMenu->vfptr[77].__vecDelDtor)(PgWin::ms_iMsX, PgWin::ms_iMsY);
    PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v2->m_spFindPopupMenu->vfptr);
    v4 = v2->m_spFindPopupMenu;
LABEL_7:
    ((void (__stdcall *)(_DWORD))v4->vfptr[60].__vecDelDtor)(1);
  }
  v2->m_bEnableInviter = 0;
}

//----- (004FA160) --------------------------------------------------------
void __thiscall FriendWin::OnAddFrnd(FriendWin *this)
{
  GameFrameWork::OpenFriendAddWin((GameFrameWork *)this->m_pkFrameWork);
}

//----- (004FA170) --------------------------------------------------------
void __thiscall FriendWin::OnWinClose(FriendWin *this)
{
  FriendWin *v1; // esi@1

  v1 = this;
  if ( this == (FriendWin *)g_pkToolTipWin->m_pkToolTipParentWin )
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
  GameFrameWork::CloseCommunityWin((GameFrameWork *)v1->m_pkFrameWork);
}

//----- (004FA1A0) --------------------------------------------------------
void __thiscall FriendWin::OnSlideBar(FriendWin *this)
{
  if ( this->m_pListWinTime )
  {
    this->m_pListWinTime->m_nViewStartPos = this->m_pkSlideBarEx->m_nCurPos;
    SlideListWin::UpdateViewList(this->m_pListWinTime);
  }
}

//----- (004FA1D0) --------------------------------------------------------
void __thiscall FriendWin::OnChangeTab(FriendWin *this, DirectUserMsgBody_CommunityTabChanged::TabEnum eTab)
{
  char *v2; // esi@1

  v2 = (char *)&this->vfptr;
  if ( this->m_pkMsgHooker )
  {
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))this->m_pkMsgHooker->vfptr->SendDirectMessage)(40, &eTab, v2);
    if ( *((_DWORD *)v2 + 1) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v2 + 1) + 20))(40, &eTab, v2);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v2 + 20))(v2, 40, &eTab, v2);
}

//----- (004FA230) --------------------------------------------------------
void __thiscall FriendWin::OnTopWin(FriendWin *this)
{
  GameFrameWork::SetTopFriendAddWin((GameFrameWork *)this->m_pkFrameWork);
}

//----- (004FA240) --------------------------------------------------------
void __thiscall FriendWin::MakeDefaultOptFile(FriendWin *this)
{
  FriendWin *v1; // edi@1
  const char *v2; // eax@3
  _iobuf *v3; // esi@3
  char *v4; // eax@4
  FriendWin::FriendSaveOptData data; // [sp+8h] [bp-48h]@4

  v1 = this;
  if ( !Folder::m_bInit )
    Folder::Init();
  v2 = Folder::Merge(&Folder::m_acSystem, "FPLIST.ons");
  v3 = fopen(v2, "wb");
  if ( v3 )
  {
    memset(data.username, 0, 0x41u);
    v4 = (char *)((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)();
    strncpy(data.username, v4, 0x40u);
    data.bAllow = v1->m_bAllow;
    fwrite(&data, 0x41u, 1u, v3);
    fclose(v3);
  }
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004FA2F0) --------------------------------------------------------
char __thiscall FriendWin::SaveOptFile(FriendWin *this)
{
  FriendWin *v1; // ebx@1
  const char *v2; // eax@3
  _iobuf *v3; // eax@3
  _iobuf *v4; // esi@3
  signed int v6; // edi@5
  int v7; // edi@5
  signed int v8; // ebx@6
  char *v9; // eax@7
  int v10; // ebx@7
  char *v11; // eax@12
  FriendWin *v12; // ecx@14
  FriendWin::FriendSaveOptData *v13; // [sp-14h] [bp-A8h]@13
  unsigned int v14; // [sp-10h] [bp-A4h]@13
  _iobuf *v15; // [sp-8h] [bp-9Ch]@13
  FriendWin *v16; // [sp+8h] [bp-8Ch]@1
  FriendWin::FriendSaveOptData data; // [sp+Ch] [bp-88h]@8
  char userName[64]; // [sp+50h] [bp-44h]@7

  v1 = this;
  v16 = this;
  if ( !Folder::m_bInit )
    Folder::Init();
  v2 = Folder::Merge(&Folder::m_acSystem, "FPLIST.ons");
  v3 = fopen(v2, "rb+");
  v4 = v3;
  if ( !v3 )
  {
    FriendWin::MakeDefaultOptFile(v1);
    return 1;
  }
  fseek(v3, 0, 2);
  v6 = ftell(v4);
  fseek(v4, 0, 0);
  v7 = v6 / 65;
  if ( v7 > 100 )
    goto LABEL_20;
  fseek(v4, 0, 2);
  v8 = ftell(v4);
  fseek(v4, 0, 0);
  if ( v8 % 65 )
  {
    v1 = v16;
LABEL_20:
    fclose(v4);
    v12 = v1;
    goto LABEL_21;
  }
  userName[0] = 0;
  memset(&userName[1], 0, 0x3Fu);
  v9 = (char *)((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)();
  strncpy(userName, v9, 0x40u);
  v10 = 0;
  if ( v7 > 0 )
  {
    do
    {
      memset(data.username, 0, 0x41u);
      if ( !fread(&data, 0x41u, 1u, v4) )
        goto LABEL_14;
      if ( !strncmp(userName, data.username, 0x40u) )
      {
        fseek(v4, -1, 1);
        if ( v16 == (FriendWin *)-7596 )
          goto LABEL_18;
        v15 = v4;
        v14 = 1;
        v13 = (FriendWin::FriendSaveOptData *)&v16->m_bAllow;
        goto LABEL_17;
      }
    }
    while ( ++v10 < v7 );
  }
  if ( v7 == 100 )
  {
LABEL_14:
    fclose(v4);
    v12 = v16;
LABEL_21:
    FriendWin::MakeDefaultOptFile(v12);
    return 1;
  }
  memset(data.username, 0, 0x41u);
  v11 = (char *)((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)();
  strncpy(data.username, v11, 0x40u);
  data.bAllow = v16->m_bAllow;
  fseek(v4, 0, 2);
  if ( &data )
  {
    v15 = v4;
    v14 = 65;
    v13 = &data;
LABEL_17:
    fwrite(v13, v14, 1u, v15);
  }
LABEL_18:
  fclose(v4);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004FA530) --------------------------------------------------------
void __thiscall FriendWin::OnInviterLClick(FriendWin *this, int nItemIndex)
{
  FriendWin *v2; // esi@1

  v2 = this;
  if ( this == (FriendWin *)g_pkToolTipWin->m_pkToolTipParentWin )
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
  v2->m_bEnableInviter = 1;
}

//----- (004FA560) --------------------------------------------------------
void __thiscall FriendWin::OnInviterRClick(FriendWin *this, int nItemIndex)
{
  FriendWin *v2; // esi@1
  PopupMenuWin *v3; // ecx@3

  v2 = this;
  if ( this == (FriendWin *)g_pkToolTipWin->m_pkToolTipParentWin )
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
  v3 = v2->m_spFindPopupMenu;
  if ( v3 )
  {
    ((void (__stdcall *)(_DWORD, _DWORD))v3->vfptr[77].__vecDelDtor)(PgWin::ms_iMsX, PgWin::ms_iMsY);
    PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v2->m_spFindPopupMenu->vfptr);
    ((void (__stdcall *)(_DWORD))v2->m_spFindPopupMenu->vfptr[60].__vecDelDtor)(1);
    v2->m_bEnableInviter = 1;
  }
}

//----- (004FA5D0) --------------------------------------------------------
void __thiscall FriendWin::OnFindTab(FriendWin *this)
{
  FriendWin *v1; // esi@1

  v1 = this;
  GameFrameWork::NcFriendFindReq((GameFrameWork *)this->m_pkFrameWork);
  GameFrameWork::OpenPlayGuideWin((GameFrameWork *)v1->m_pkFrameWork, BIL_FRIEND_1);
}

//----- (004FA5F0) --------------------------------------------------------
void __thiscall FriendPointTipMsg::OnCommand(FriendPointTipMsg *this, unsigned int wParam, int lParam)
{
  FriendPointTipMsg *v3; // esi@1

  v3 = this;
  if ( !wParam )
  {
    if ( (unsigned __int8)((int (*)(void))this->vfptr[65].__vecDelDtor)() )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
  }
}

//----- (004FA620) --------------------------------------------------------
char __thiscall FriendAddWin::Create(FriendAddWin *this, PgFrameWork *pkFrameWork)
{
  FriendAddWin *v2; // esi@1
  PgFrameWork *v3; // edi@1
  NiTexturePalette *v4; // ebx@1
  const char *v5; // eax@3
  PgSprData *v6; // eax@4
  NiNode *v7; // esi@5
  NiSourceTexture *v9; // eax@10
  PgSprData *v10; // eax@11
  PgWinSpr *v11; // eax@13
  PgFont *v12; // eax@16
  PgWinText *v13; // edi@16
  NiRefObjectVtbl *v14; // ebx@16
  NiUnsharedGeometryGroup *v15; // eax@16
  PgSprData *v16; // edi@16
  NiPointer<PgSprData::PgHitTester> *v17; // ecx@16
  unsigned int v18; // edi@16
  unsigned int v19; // ebx@16
  PgFont *v20; // eax@16
  PgWinText *v21; // edi@16
  NiRefObjectVtbl *v22; // ebx@16
  NiUnsharedGeometryGroup *v23; // eax@16
  PgSprData *v24; // edi@16
  NiPointer<PgSprData::PgHitTester> *v25; // ecx@16
  unsigned int v26; // edi@16
  unsigned int v27; // ebx@16
  PgFont *v28; // eax@16
  PgWinText *v29; // edi@16
  NiRefObjectVtbl *v30; // ebx@16
  NiUnsharedGeometryGroup *v31; // eax@16
  EditWin *v32; // eax@16
  NiNode *v33; // esi@17
  UIUtil ui; // [sp+4Ch] [bp-30h]@16
  unsigned int uiWidth; // [sp+60h] [bp-1Ch]@15
  unsigned int uiHeight; // [sp+64h] [bp-18h]@15
  int uiLeft; // [sp+68h] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+6Ch] [bp-10h]@1
  int v39; // [sp+78h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pkFrameWork;
  this->m_pkFrameWork = pkFrameWork;
  v4 = pTexturePalette;
  v39 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "Game\\AddFriendList.nif");
  PgUtil::LoadNodeNifFile(v5, &spNode, v4);
  if ( !spNode.m_pObject )
    return 0;
  v6 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, (int *)&pkFrameWork, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v6, 0, v3, "FriendAddWin", 0) )
    goto LABEL_23;
  v9 = MenuTexMgr::GetTexture(0x13u);
  if ( v9 )
    v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, (int *)&pkFrameWork, v9);
  else
    v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, (int *)&pkFrameWork, 0);
  v11 = PgWinSpr::CreateWin(uiLeft + 2, (int)&pkFrameWork->vfptr + 2, v10, (PgWin *)&v2->vfptr, 0, 0);
  if ( v11 )
    v11->vfptr[60].__vecDelDtor((NiRefObject *)v11, 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "TextBox",
          &uiLeft,
          (int *)&pkFrameWork,
          &uiWidth,
          &uiHeight) )
  {
LABEL_23:
    v7 = spNode.m_pObject;
    v39 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v7 )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    }
    return 0;
  }
  v12 = Font::Get(0);
  v13 = PgWinText::CreateWin(uiLeft, (int)pkFrameWork, uiWidth, uiHeight, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13->vfptr[122].__vecDelDtor((NiRefObject *)v13, 1u);
  v13->vfptr[117].__vecDelDtor((NiRefObject *)v13, (unsigned int)&Color::m_kDxWinTitleColor);
  v14 = v13->vfptr;
  v15 = TextData::Get(0x1B15336Du);
  v14[118].__vecDelDtor((NiRefObject *)v13, (unsigned int)v15);
  v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
  v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor02", &uiLeft, (int *)&pkFrameWork, 0);
  PgSprData::Add(v16, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick02");
  PgSprData::Add(v16, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver02");
  PgWinBut::CreateWin(uiLeft, (int)pkFrameWork, v16, (PgWin *)&v2->vfptr, 0, 0, 0);
  v17 = v16->m_akHitTester.m_pBase;
  v18 = v17->m_pObject->m_uiHeight;
  v19 = v17->m_pObject->m_uiWidth;
  v20 = Font::Get(0);
  v21 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v19, v18, v20, (PgWin *)&v2->vfptr, 0, 0);
  v21->vfptr[122].__vecDelDtor((NiRefObject *)v21, 5u);
  v22 = v21->vfptr;
  v23 = TextData::Get(0x8AA0A8EF);
  v22[118].__vecDelDtor((NiRefObject *)v21, (unsigned int)v23);
  v21->vfptr[60].__vecDelDtor((NiRefObject *)v21, 0);
  v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor03", &uiLeft, (int *)&pkFrameWork, 0);
  PgSprData::Add(v24, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick03");
  PgSprData::Add(v24, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver03");
  PgWinBut::CreateWin(uiLeft, (int)pkFrameWork, v24, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v25 = v24->m_akHitTester.m_pBase;
  v26 = v25->m_pObject->m_uiHeight;
  v27 = v25->m_pObject->m_uiWidth;
  v28 = Font::Get(0);
  v29 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v27, v26, v28, (PgWin *)&v2->vfptr, 0, 0);
  v29->vfptr[122].__vecDelDtor((NiRefObject *)v29, 5u);
  v30 = v29->vfptr;
  v31 = TextData::Get(0x88A297E1);
  v30[118].__vecDelDtor((NiRefObject *)v29, (unsigned int)v31);
  v29->vfptr[60].__vecDelDtor((NiRefObject *)v29, 0);
  UIUtil::UIUtil(&ui);
  LOBYTE(v39) = 1;
  UIUtil::SetOffset(&ui, 0, 0);
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v32 = UIUtil::CreateEdit(&ui, "InputBox", 16, NORMAL, 0, 1);
  v2->m_pkInputBox = v32;
  v32->vfptr[115].__vecDelDtor((NiRefObject *)v32, (unsigned int)&unk_98A683);
  ((void (__stdcall *)(_DWORD))v2->m_pkInputBox->m_spEditWin.m_pObject->vfptr[15].__vecDelDtor)(0);
  ((void (__thiscall *)(FriendAddWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  LOBYTE(v39) = 0;
  UIUtil::~UIUtil(&ui);
  v39 = -1;
  if ( spNode.m_pObject )
  {
    v33 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v33 )
        v33->vfptr->__vecDelDtor((NiRefObject *)v33, 1u);
    }
  }
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004FAA60) --------------------------------------------------------
void __thiscall FriendWin::AddListItem_ExtInfo(FriendWin *this, PROTO_FRIEND_INFO *pdata)
{
  FriendWin *v2; // edi@1
  SlideListWin *v3; // ecx@2
  unsigned int v4; // eax@5
  unsigned int v5; // edx@5
  unsigned int v6; // eax@5
  unsigned int v7; // eax@5
  unsigned int v8; // ebx@5
  MapInfo *v9; // eax@5
  SlideListWin *v10; // ecx@5
  unsigned int v11; // eax@8
  NiUnsharedGeometryGroup *v12; // eax@9
  SlideListWin *v13; // ecx@14
  char szdata[128]; // [sp+8h] [bp-9Ch]@5
  char acname[21]; // [sp+88h] [bp-1Ch]@5

  v2 = this;
  if ( pdata )
  {
    v3 = this->m_pListWinTime;
    if ( v3 )
    {
      if ( !v2->m_bShowOnlineOnly || *(_BYTE *)&pdata->logininfo & 1 )
      {
        v4 = pdata->charid.n5_code[0];
        *(_DWORD *)&acname[4] = pdata->charid.n5_code[1];
        v5 = pdata->charid.n5_code[3];
        *(_DWORD *)acname = v4;
        v6 = pdata->charid.n5_code[2];
        *(_DWORD *)&acname[12] = v5;
        *(_DWORD *)&acname[8] = v6;
        v7 = pdata->charid.n5_code[4];
        szdata[0] = 0;
        *(_DWORD *)&acname[16] = v7;
        acname[20] = 0;
        v8 = SlideListWin::AddText(v3, acname);
        v9 = MapInfoTab::GetByMapName(&pdata->map);
        v10 = v2->m_pListWinTime;
        if ( v9 )
          SlideListWin::SetText(v10, v8, 4u, v9->Name);
        else
          SlideListWin::SetText(v10, v8, 4u, "...");
        v11 = (unsigned int)pdata->logininfo;
        if ( *(_DWORD *)&pdata->logininfo & 1 )
        {
          v12 = TextData::Get(0x95F9F1F2);
        }
        else
        {
          if ( v11 & 0xFFE )
          {
            sprintf(szdata, "%d-%d", (unsigned __int16)v11 >> 12, (v11 >> 16) & 0x1F);
            goto LABEL_14;
          }
          v12 = TextData::Get(0xDA01413E);
        }
        sprintf(szdata, (const char *)v12);
LABEL_14:
        SlideListWin::SetText(v2->m_pListWinTime, v8, 5u, szdata);
        SlideListWin::SetData(v2->m_pListWinTime, v8, (unsigned int)pdata);
        SlideListWin::SetFontSize(v2->m_pListWinTime, v8, 1);
        v13 = v2->m_pListWinTime;
        if ( *(_BYTE *)&pdata->logininfo & 1 )
          SlideListWin::SetFontColor(v13, v8, 255, 255, 0);
        else
          SlideListWin::SetFontColor(v13, v8, 200, 200, 200);
        return;
      }
    }
  }
}

//----- (004FABD0) --------------------------------------------------------
void __thiscall FriendWin::OnClickRejectBtn(FriendWin *this)
{
  FriendWin *v1; // esi@1
  bool v2; // al@1
  NiRefObjectVtbl *v3; // edi@1
  NiUnsharedGeometryGroup *v4; // eax@2
  char *v5; // eax@2
  NiUnsharedGeometryGroup *v6; // eax@3
  char *v7; // eax@3
  GameFrameWork *v8; // esi@4
  NiUnsharedGeometryGroup *v9; // eax@4
  unsigned int v10; // [sp-4h] [bp-Ch]@2

  v1 = this;
  v2 = this->m_bAllow == 0;
  this->m_bAllow = v2;
  MachineOpt::ms_kUserLoginOption.bFriendAddAllow = v2;
  v3 = this->m_pkRejectText->vfptr;
  if ( this->m_bAllow )
  {
    v4 = TextData2::Get(0x2D524575u);
    v3[118].__vecDelDtor((NiRefObject *)v1->m_pkRejectText, (unsigned int)v4);
    v5 = (char *)TextData2::Get(0x7AB19781u);
    PgWin::SetToolTipWinText((PgWin *)&v1->m_pkRejectBtn->vfptr, v5);
    v10 = 742466590;
  }
  else
  {
    v6 = TextData2::Get(0x3552452Fu);
    v3[118].__vecDelDtor((NiRefObject *)v1->m_pkRejectText, (unsigned int)v6);
    v7 = (char *)TextData2::Get(0x72B197C7u);
    PgWin::SetToolTipWinText((PgWin *)&v1->m_pkRejectBtn->vfptr, v7);
    v10 = -890167274;
  }
  v8 = (GameFrameWork *)v1->m_pkFrameWork;
  v9 = TextData2::Get(v10);
  GameFrameWork::AddSysMsg(v8, (const char *)v9);
}

//----- (004FAC90) --------------------------------------------------------
bool __thiscall FriendWin::LoadOptFile(FriendWin *this)
{
  const char *v1; // eax@3
  _iobuf *v2; // eax@3
  _iobuf *v3; // esi@3
  bool result; // al@4
  signed int v5; // edi@5
  int v6; // edi@5
  signed int v7; // ebx@6
  char *v8; // eax@7
  int v9; // ebx@7
  int v10; // [sp-Ch] [bp-98h]@3
  int v11; // [sp-8h] [bp-94h]@3
  unsigned int v12; // [sp-4h] [bp-90h]@0
  FriendWin *v13; // [sp+0h] [bp-8Ch]@1
  FriendWin::FriendSaveOptData data; // [sp+4h] [bp-88h]@8
  char userName[64]; // [sp+48h] [bp-44h]@7

  v13 = this;
  if ( !Folder::m_bInit )
    Folder::Init();
  v1 = Folder::Merge(&Folder::m_acSystem, "FPLIST.ons");
  v2 = fopen(v1, "rb");
  v3 = v2;
  if ( v2 )
  {
    fseek(v2, 0, 2);
    v5 = ftell(v3);
    fseek(v3, 0, 0);
    v6 = v5 / 65;
    if ( v6 > 100 || (fseek(v3, 0, 2), v7 = ftell(v3), fseek(v3, 0, 0), v7 % 65) )
    {
      fclose(v3);
      FriendWin::MakeDefaultOptFile(v13);
      result = 1;
    }
    else
    {
      userName[0] = 0;
      memset(&userName[1], 0, 0x3Fu);
      v8 = (char *)((int (__stdcall *)(signed int, int, int))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)(
                     64,
                     v10,
                     v11);
      strncpy(userName, v8, v12);
      v9 = 0;
      if ( v6 > 0 )
      {
        while ( 1 )
        {
          memset(data.username, 0, 0x41u);
          fread(&data, 0x41u, 1u, v3);
          if ( !&data )
          {
            fclose(v3);
            return 0;
          }
          if ( !strncmp(userName, data.username, 0x40u) )
            break;
          if ( ++v9 >= v6 )
          {
            fclose(v3);
            return 1;
          }
        }
        if ( v13->m_bAllow != data.bAllow )
          FriendWin::OnClickRejectBtn(v13);
      }
      fclose(v3);
      result = 1;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004FAE70) --------------------------------------------------------
void __thiscall FriendWin::SetFriendPoint(FriendWin *this, int iFriendPoint)
{
  FriendWin *v2; // esi@1
  PgWinText *v3; // eax@3
  NiRefObjectVtbl *v4; // ebx@4
  char *v5; // eax@4
  char *v6; // eax@4
  PgWinBut *v7; // ecx@4
  void *(__thiscall *v8)(NiRefObject *, unsigned int); // eax@4

  v2 = this;
  if ( iFriendPoint >= 0 )
  {
    if ( this->m_pFriendPointUseBut )
    {
      v3 = this->m_pkFriendPointText;
      if ( v3 )
      {
        v4 = v3->vfptr;
        v5 = (char *)TextData3::Get(0x9BE4C2CD);
        v6 = fs(v5, iFriendPoint);
        v4[118].__vecDelDtor((NiRefObject *)v2->m_pkFriendPointText, (unsigned int)v6);
        v7 = v2->m_pFriendPointUseBut;
        v2->m_uiFriendPoint = iFriendPoint;
        v8 = v7->vfptr[60].__vecDelDtor;
        if ( iFriendPoint < v2->m_uiFriendUsePoint )
          ((void (__stdcall *)(_DWORD))v8)(0);
        else
          ((void (__stdcall *)(_DWORD))v8)(1);
      }
    }
  }
}

//----- (004FAEF0) --------------------------------------------------------
void __thiscall FriendWin::OnFriendFindAdd(FriendWin *this, int CheckIndex)
{
  FriendWin *v2; // esi@1
  SlideListWin *v3; // ecx@2
  int v4; // edi@3
  char *v5; // eax@5
  MsgBox *v6; // eax@5
  SlideListWin *v7; // ecx@5
  MsgBox *v8; // ebx@5
  unsigned int dwData; // [sp+4h] [bp-20h]@4
  char acname[21]; // [sp+8h] [bp-1Ch]@5

  v2 = this;
  if ( CheckIndex >= 0 )
  {
    v3 = this->m_pListWinTime;
    if ( v3 )
    {
      v4 = CheckIndex + v2->m_pkSlideBarEx->m_nCurPos;
      if ( v4 >= 0 )
      {
        if ( SlideListWin::GetData(v3, v4, &dwData) )
        {
          *(_DWORD *)acname = *(_DWORD *)(dwData + 4);
          *(_DWORD *)&acname[4] = *(_DWORD *)(dwData + 8);
          *(_DWORD *)&acname[8] = *(_DWORD *)(dwData + 12);
          *(_DWORD *)&acname[12] = *(_DWORD *)(dwData + 16);
          *(_DWORD *)&acname[16] = *(_DWORD *)(dwData + 20);
          acname[20] = 0;
          v5 = (char *)TextData3::Get(0x60807D89u);
          v6 = MsgBox::Modal(MSGBOX_OKCANCEL, v5, acname);
          v7 = v2->m_pListWinTime;
          v8 = v6;
          v2->m_bEnableInviter = 0;
          SlideListWin::SetCurSelIndex(v7, v4);
          v8->vfptr->SetMsgHooker(&v8->vfptr, &v2->vfptr);
        }
      }
    }
  }
}

//----- (004FAFC0) --------------------------------------------------------
void __thiscall FriendWin::OnFriendInviterAdd(FriendWin *this)
{
  FriendWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  char *v3; // eax@3
  MsgBox *v4; // eax@3
  SlideListWin *v5; // ecx@3
  MsgBox *v6; // edi@3
  unsigned int dwData; // [sp+4h] [bp-20h]@2
  char acname[21]; // [sp+8h] [bp-1Ch]@3

  v1 = this;
  v2 = this->m_pkInviterWin;
  if ( v2 )
  {
    if ( SlideListWin::GetData(v2, 0, &dwData) )
    {
      *(_DWORD *)acname = *(_DWORD *)(dwData + 4);
      *(_DWORD *)&acname[4] = *(_DWORD *)(dwData + 8);
      *(_DWORD *)&acname[8] = *(_DWORD *)(dwData + 12);
      *(_DWORD *)&acname[12] = *(_DWORD *)(dwData + 16);
      *(_DWORD *)&acname[16] = *(_DWORD *)(dwData + 20);
      acname[20] = 0;
      v3 = (char *)TextData3::Get(0x60807D89u);
      v4 = MsgBox::Modal(MSGBOX_OKCANCEL, v3, acname);
      v5 = v1->m_pkInviterWin;
      v6 = v4;
      v1->m_bEnableInviter = 1;
      SlideListWin::SetCurSelIndex(v5, 0);
      v6->vfptr->SetMsgHooker(&v6->vfptr, &v1->vfptr);
    }
  }
}

//----- (004FB070) --------------------------------------------------------
char __thiscall FriendPointTipMsg::Create(FriendPointTipMsg *this)
{
  FriendPointTipMsg *v1; // edi@1
  NiSourceTexture *v2; // esi@1
  char result; // al@6
  NiTexturePalette *v4; // ebx@7
  const char *v5; // eax@9
  PgSprData *v6; // eax@10
  NiNode *v7; // esi@11
  NiSourceTexture *v8; // eax@16
  PgSprData *v9; // eax@17
  PgWinSpr *v10; // eax@19
  PgSprData *v11; // esi@21
  PgWinBut *v12; // ST28_4@21
  PgFont *v13; // ST24_4@21
  unsigned int v14; // ST20_4@21
  unsigned int v15; // eax@21
  PgWinText *v16; // esi@21
  NiRefObjectVtbl *v17; // ebx@21
  NiUnsharedGeometryGroup *v18; // eax@21
  PgFont *v19; // eax@21
  PgWinText *v20; // esi@21
  NiRefObjectVtbl *v21; // ebx@21
  NiUnsharedGeometryGroup *v22; // eax@21
  PgFont *v23; // eax@21
  PgWinText *v24; // esi@21
  NiRefObjectVtbl *v25; // ebx@21
  NiUnsharedGeometryGroup *v26; // eax@21
  NiSourceTexture *v27; // eax@21
  PgSprData *v28; // eax@21
  PgWinSpr *v29; // eax@21
  NiNode *v30; // esi@22
  unsigned int uiWidth; // [sp+44h] [bp-20h]@21
  unsigned int uiHeight; // [sp+48h] [bp-1Ch]@21
  int uiLeft; // [sp+4Ch] [bp-18h]@10
  int uiTop; // [sp+50h] [bp-14h]@10
  NiPointer<NiNode> spNode; // [sp+54h] [bp-10h]@1
  int v36; // [sp+60h] [bp-4h]@1

  v1 = this;
  spNode.m_pObject = 0;
  v36 = 0;
  v2 = MenuTexMgr::GetTexture(4u);
  if ( !v2 )
  {
    v36 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( spNode.m_pObject )
        spNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spNode.m_pObject, 1u);
    }
    return 0;
  }
  v4 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "Game\\FriendPointTip.nif");
  PgUtil::LoadNodeNifFile(v5, &spNode, v4);
  if ( !spNode.m_pObject )
    return 0;
  v6 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, v2);
  if ( PgWinFrame::Create((PgWinFrame *)&v1->vfptr, 0, 0, v6, 0, 0, 0, 0) )
  {
    v8 = MenuTexMgr::GetTexture(0x13u);
    if ( v8 )
      v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v8);
    else
      v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
    v10 = PgWinSpr::CreateWin(uiLeft, uiTop, v9, (PgWin *)&v1->vfptr, 0, 0);
    if ( v10 )
      v10->vfptr[60].__vecDelDtor((NiRefObject *)v10, 0);
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor01", &uiLeft, &uiTop, v2);
    PgSprData::Add(v11, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick01");
    PgSprData::Add(v11, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver01");
    v12 = PgWinBut::CreateWin(uiLeft, uiTop, v11, (PgWin *)&v1->vfptr, 0, 0, 0);
    v13 = Font::Get(0);
    v14 = ((int (__thiscall *)(PgWinBut *))v12->vfptr[37].__vecDelDtor)(v12);
    v15 = ((int (__thiscall *)(PgWinBut *))v12->vfptr[36].__vecDelDtor)(v12);
    v16 = PgWinText::CreateWin(0, 0, v15, v14, v13, (PgWin *)&v12->vfptr, 0, 0);
    v16->vfptr[122].__vecDelDtor((NiRefObject *)v16, 5u);
    v17 = v16->vfptr;
    v18 = TextData::Get(0x4F5F499Fu);
    v17[118].__vecDelDtor((NiRefObject *)v16, (unsigned int)v18);
    v16->vfptr[60].__vecDelDtor((NiRefObject *)v16, 0);
    PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Text00", &uiLeft, &uiTop, &uiWidth, &uiHeight);
    v19 = Font::Get(MAIN_MENU);
    v20 = PgWinText::CreateWin(uiLeft, uiTop, uiWidth, uiHeight, v19, (PgWin *)&v1->vfptr, 0, 0);
    v20->vfptr[122].__vecDelDtor((NiRefObject *)v20, 4u);
    v21 = v20->vfptr;
    v22 = TextData3::Get(0x9B9B73B0);
    v21[118].__vecDelDtor((NiRefObject *)v20, (unsigned int)v22);
    v20->vfptr[60].__vecDelDtor((NiRefObject *)v20, 0);
    PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &uiLeft, &uiTop, &uiWidth, &uiHeight);
    v23 = Font::Get(MAIN_MENU);
    v24 = PgWinText::CreateWin(uiLeft, uiTop, uiWidth, uiHeight, v23, (PgWin *)&v1->vfptr, 0, 0);
    v24->vfptr[122].__vecDelDtor((NiRefObject *)v24, 4u);
    v25 = v24->vfptr;
    v26 = TextData3::Get(0x9B9B73B1);
    v25[118].__vecDelDtor((NiRefObject *)v24, (unsigned int)v26);
    v24->vfptr[60].__vecDelDtor((NiRefObject *)v24, 0);
    v27 = MenuTexMgr::GetTexture(0x1Du);
    v28 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Table", &uiLeft, &uiTop, v27);
    v29 = PgWinSpr::CreateWin(uiLeft, uiTop, v28, (PgWin *)&v1->vfptr, 0, 0);
    v29->vfptr[60].__vecDelDtor((NiRefObject *)v29, 0);
    ((void (__thiscall *)(FriendPointTipMsg *, unsigned int, unsigned int, _DWORD, _DWORD))v1->vfptr[59].__vecDelDtor)(
      v1,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    v36 = -1;
    if ( spNode.m_pObject )
    {
      v30 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v30 )
          v30->vfptr->__vecDelDtor((NiRefObject *)v30, 1u);
      }
    }
    result = 1;
  }
  else
  {
    v7 = spNode.m_pObject;
    v36 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (004FB470) --------------------------------------------------------
void __thiscall FriendAddWin::UpdateMeWin(FriendAddWin *this, float fCurTime)
{
  FriendAddWin *v2; // edi@1

  v2 = this;
  if ( g_pkKeyboard->m_aucKeystate[0] & 2 )
  {
    BYTE3(this->m_pkFrameWork[73].m_kMsgQ.m_uiAlloced) = 0;
    if ( PgWinMgr::IsIn(&Pgg_kWinMgr, (PgWin *)&this->vfptr) )
      PgTQueue<PgWinMgr::PgWinMsg>::Add(&stru_B6483C, (PgWinMgr::PgWinMsg)__PAIR__(1, (unsigned int)v2));
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (004FB4D0) --------------------------------------------------------
void __thiscall FriendWin::AddListItem_DefInfo(FriendWin *this, PROTO_FRIEND_INFO *pdata)
{
  FriendWin *v2; // edi@1
  SlideListWin *v3; // ecx@1
  unsigned int v4; // eax@4
  unsigned int v5; // edx@4
  unsigned int v6; // eax@4
  unsigned int v7; // ebx@4
  char *v8; // eax@4
  const char *v9; // eax@5
  SlideListWin *v10; // ecx@7
  SlideListWin *v11; // ecx@7
  char szdata[128]; // [sp+8h] [bp-9Ch]@7
  char acname[21]; // [sp+88h] [bp-1Ch]@4

  v2 = this;
  v3 = this->m_pListWinTime;
  if ( v3 && (!v2->m_bShowOnlineOnly || *(_BYTE *)&pdata->logininfo & 1) )
  {
    v4 = pdata->charid.n5_code[0];
    *(_DWORD *)&acname[4] = pdata->charid.n5_code[1];
    v5 = pdata->charid.n5_code[3];
    *(_DWORD *)acname = v4;
    v6 = pdata->charid.n5_code[2];
    *(_DWORD *)&acname[12] = v5;
    *(_DWORD *)&acname[8] = v6;
    *(_DWORD *)&acname[16] = pdata->charid.n5_code[4];
    acname[20] = 0;
    v7 = SlideListWin::AddText(v3, acname);
    v8 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), pdata->classid);
    if ( v8 )
      v9 = v8 + 21;
    else
      v9 = (const char *)&unk_96F8EB;
    SlideListWin::SetText(v2->m_pListWinTime, v7, 1u, v9);
    sprintf(szdata, "%d", pdata->level);
    SlideListWin::SetText(v2->m_pListWinTime, v7, 2u, szdata);
    szdata[0] = pdata->isparty != 0 ? 111 : 120;
    v10 = v2->m_pListWinTime;
    szdata[1] = 0;
    SlideListWin::SetText(v10, v7, 3u, szdata);
    SlideListWin::SetData(v2->m_pListWinTime, v7, (unsigned int)pdata);
    SlideListWin::SetFontSize(v2->m_pListWinTime, v7, 1);
    v11 = v2->m_pListWinTime;
    if ( *(_BYTE *)&pdata->logininfo & 1 )
      SlideListWin::SetFontColor(v11, v7, 255, 255, 0);
    else
      SlideListWin::SetFontColor(v11, v7, 200, 200, 200);
  }
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (004FB630) --------------------------------------------------------
void __thiscall FriendWin::ViewAllInfo(FriendWin *this, PROTO_FRIEND_INFO *pdata)
{
  FriendWin *v2; // edi@1
  unsigned int v3; // ecx@2
  unsigned int v4; // edx@2
  unsigned int v5; // eax@2
  unsigned int v6; // ecx@2
  char *v7; // eax@2
  NiUnsharedGeometryGroup *v8; // eax@3
  NiUnsharedGeometryGroup *v9; // ST14_4@5
  NiUnsharedGeometryGroup *v10; // eax@5
  NiUnsharedGeometryGroup *v11; // ST10_4@6
  NiUnsharedGeometryGroup *v12; // ST10_4@7
  MapInfo *v13; // eax@8
  int v14; // ST14_4@9
  NiUnsharedGeometryGroup *v15; // eax@9
  unsigned int v16; // eax@10
  int v17; // ST14_4@13
  int v18; // ST10_4@13
  NiUnsharedGeometryGroup *v19; // eax@13
  NiUnsharedGeometryGroup *v20; // eax@11
  char szdata[128]; // [sp+8h] [bp-9Ch]@5
  char acname[21]; // [sp+88h] [bp-1Ch]@2

  v2 = this;
  if ( pdata )
  {
    ToolTipWin::ClearTipText((ToolTipWin *)g_pkToolTipWin);
    v3 = pdata->charid.n5_code[1];
    v4 = pdata->charid.n5_code[2];
    *(_DWORD *)acname = pdata->charid.n5_code[0];
    v5 = pdata->charid.n5_code[3];
    *(_DWORD *)&acname[4] = v3;
    v6 = pdata->charid.n5_code[4];
    *(_DWORD *)&acname[12] = v5;
    *(_DWORD *)&acname[16] = v6;
    *(_DWORD *)&acname[8] = v4;
    acname[20] = 0;
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))g_pkToolTipWin->vfptr[137].__vecDelDtor)(
      0,
      acname,
      1,
      255,
      255,
      0);
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))g_pkToolTipWin->vfptr[137].__vecDelDtor)(
      1,
      &unk_98A6A2,
      255,
      255,
      255,
      0);
    v7 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), pdata->classid);
    if ( v7 )
      v8 = (NiUnsharedGeometryGroup *)(v7 + 21);
    else
      v8 = &unk_96F8EB;
    v9 = v8;
    v10 = TextData::Get(0x95A9DAED);
    sprintf(szdata, (const char *)v10, v9);
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))g_pkToolTipWin->vfptr[137].__vecDelDtor)(
      2,
      szdata,
      255,
      255,
      255,
      0);
    sprintf(szdata, "LV : %d", pdata->level);
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))g_pkToolTipWin->vfptr[137].__vecDelDtor)(
      3,
      szdata,
      255,
      255,
      255,
      0);
    if ( pdata->isparty )
    {
      v11 = TextData::Get(0xEFE6FA48);
      sprintf(szdata, (const char *)v11);
    }
    else
    {
      v12 = TextData::Get(0xA0989BF4);
      sprintf(szdata, (const char *)v12);
    }
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))g_pkToolTipWin->vfptr[137].__vecDelDtor)(
      4,
      szdata,
      255,
      255,
      255,
      0);
    v13 = MapInfoTab::GetByMapName(&pdata->map);
    if ( v13 )
    {
      v14 = (int)v13->Name;
      v15 = TextData::Get(0xDE353F4D);
      sprintf(szdata, (const char *)v15, v14);
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))g_pkToolTipWin->vfptr[137].__vecDelDtor)(
        5,
        szdata,
        255,
        255,
        255,
        0);
    }
    v16 = (unsigned int)pdata->logininfo;
    if ( *(_DWORD *)&pdata->logininfo & 1 )
    {
      v20 = TextData::Get(0x8F909FD1);
    }
    else
    {
      if ( v16 & 0xFFE )
      {
        v17 = (v16 >> 16) & 0x1F;
        v18 = (unsigned __int16)v16 >> 12;
        v19 = TextData2::Get(0xF1ECBD28);
        sprintf(szdata, (const char *)v19, v18, v17);
LABEL_16:
        ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))g_pkToolTipWin->vfptr[137].__vecDelDtor)(
          6,
          szdata,
          255,
          255,
          255,
          0);
        ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))g_pkToolTipWin->vfptr[137].__vecDelDtor)(
          7,
          pdata->statustitle,
          255,
          255,
          255,
          0);
        ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[139].__vecDelDtor)(v2);
        ((void (__stdcall *)(_DWORD, _DWORD))g_pkToolTipWin->vfptr[77].__vecDelDtor)(PgWin::ms_iMsX, PgWin::ms_iMsY);
        return;
      }
      v20 = TextData::Get(0x94E2F5DB);
    }
    sprintf(szdata, (const char *)v20);
    goto LABEL_16;
  }
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (004FB920) --------------------------------------------------------
void __thiscall FriendWin::AddFindListItem(FriendWin *this, PROTO_FRIEND_INFO *pdata)
{
  FriendWin *v2; // edi@1
  unsigned int v3; // edx@3
  unsigned int v4; // eax@3
  unsigned int v5; // ecx@3
  unsigned int v6; // eax@3
  SlideListWin *v7; // ecx@3
  unsigned int v8; // ebx@3
  char *v9; // eax@3
  const char *v10; // eax@4
  char szdata[128]; // [sp+8h] [bp-9Ch]@6
  char acname[21]; // [sp+88h] [bp-1Ch]@3

  v2 = this;
  if ( pdata && this->m_pkFindWin )
  {
    v3 = pdata->charid.n5_code[2];
    v4 = pdata->charid.n5_code[0];
    *(_DWORD *)&acname[4] = pdata->charid.n5_code[1];
    v5 = pdata->charid.n5_code[4];
    *(_DWORD *)&acname[8] = v3;
    *(_DWORD *)acname = v4;
    v6 = pdata->charid.n5_code[3];
    *(_DWORD *)&acname[16] = v5;
    v7 = v2->m_pListWinTime;
    *(_DWORD *)&acname[12] = v6;
    acname[20] = 0;
    v8 = SlideListWin::AddText(v7, acname);
    v9 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), pdata->classid);
    if ( v9 )
      v10 = v9 + 21;
    else
      v10 = (const char *)&unk_96F8EB;
    SlideListWin::SetText(v2->m_pkFindWin, v8, 1u, v10);
    sprintf(szdata, "%d", pdata->level);
    SlideListWin::SetText(v2->m_pkFindWin, v8, 2u, szdata);
    SlideListWin::SetData(v2->m_pkFindWin, v8, (unsigned int)pdata);
    SlideListWin::SetFontSize(v2->m_pkFindWin, v8, 1);
    SlideListWin::SetFontColor(v2->m_pkFindWin, v8, 255, 255, 0);
  }
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (004FBA30) --------------------------------------------------------
void __userpurge FriendWin::SetInviterInfo(FriendWin *this@<ecx>, int a2@<ebx>, PROTO_FRIEND_INFO *pdata)
{
  FriendWin *v3; // esi@1
  unsigned int v4; // edx@4
  unsigned int v5; // eax@4
  unsigned int v6; // ecx@4
  unsigned int v7; // eax@4
  SlideListWin *v8; // ecx@4
  unsigned int v9; // ebx@4
  char *v10; // eax@4
  const char *v11; // eax@5
  SlideListWin *v12; // ecx@7
  int v13; // [sp-4h] [bp-ACh]@4
  char szdata[128]; // [sp+Ch] [bp-9Ch]@7
  char acname[21]; // [sp+8Ch] [bp-1Ch]@4

  v3 = this;
  if ( this->m_pkInviterWin && this->m_pkToolTip && pdata )
  {
    v13 = a2;
    ((void (__stdcall *)(_DWORD))this->m_pkToolTip->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v3->m_pkToolTip->vfptr[64].__vecDelDtor)(0);
    SlideListWin::RemoveAllList(v3->m_pkInviterWin);
    v4 = pdata->charid.n5_code[2];
    v5 = pdata->charid.n5_code[0];
    *(_DWORD *)&acname[4] = pdata->charid.n5_code[1];
    v6 = pdata->charid.n5_code[4];
    *(_DWORD *)&acname[8] = v4;
    *(_DWORD *)acname = v5;
    v7 = pdata->charid.n5_code[3];
    *(_DWORD *)&acname[16] = v6;
    v8 = v3->m_pkInviterWin;
    *(_DWORD *)&acname[12] = v7;
    acname[20] = 0;
    v9 = SlideListWin::AddText(v8, acname);
    SlideListWin::SetText(v3->m_pkInviterWin, v9, 0, acname);
    v10 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), pdata->classid);
    if ( v10 )
      v11 = v10 + 21;
    else
      v11 = (const char *)&unk_96F8EB;
    SlideListWin::SetText(v3->m_pkInviterWin, v9, 1u, v11);
    sprintf(szdata, "%d", pdata->level);
    SlideListWin::SetText(v3->m_pkInviterWin, v9, 2u, szdata);
    SlideListWin::SetData(v3->m_pkInviterWin, v9, (unsigned int)pdata);
    SlideListWin::SetFontSize(v3->m_pkInviterWin, v9, 1);
    v12 = v3->m_pkInviterWin;
    if ( *(_BYTE *)&pdata->logininfo & 1 )
    {
      SlideListWin::SetFontColor(v12, v9, 255, 255, 0);
      if ( CFriend::Get(&v3->m_kFriend, &pdata->charid) )
      {
LABEL_12:
        SlideListWin::UpdateViewList(v3->m_pkInviterWin);
        return;
      }
      ((void (__stdcall *)(signed int, int))v3->m_pkInviterBtn->vfptr[64].__vecDelDtor)(1, v13);
    }
    else
    {
      SlideListWin::SetFontColor(v12, v9, 200, 200, 200);
      ((void (__stdcall *)(_DWORD, int))v3->m_pkInviterBtn->vfptr[64].__vecDelDtor)(0, v13);
    }
    ((void (*)(void))v3->m_pkInviterBtn->vfptr[60].__vecDelDtor)();
    goto LABEL_12;
  }
}
// 4FBA30: could not find valid save-restore pair for ebx
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (004FBC20) --------------------------------------------------------
void __thiscall FriendWin::DirectMessage(FriendWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  FriendWin *v4; // esi@1
  SlideListWin *v5; // ecx@1
  signed int v6; // eax@2
  unsigned int *v7; // eax@7
  int v8; // ecx@8
  SlideListWin *v9; // ecx@11
  signed int v10; // eax@12
  char v11; // al@13
  signed int v12; // eax@14
  GameFrameWork *v13; // ecx@21
  int v14; // ecx@22
  SlideListWin *v15; // ecx@25
  signed int v16; // eax@26
  char v17; // al@27
  signed int v18; // eax@28
  unsigned int v19; // edi@35
  GameFrameWork *v20; // ecx@35
  SlideListWin *v21; // ecx@43
  signed int v22; // eax@44
  SlideListWin *v23; // ecx@45
  int v24; // [sp-14h] [bp-44h]@7
  int v25; // [sp-10h] [bp-40h]@7
  int v26; // [sp-Ch] [bp-3Ch]@7
  int v27; // [sp-8h] [bp-38h]@7
  unsigned int *v28; // [sp-4h] [bp-34h]@7
  int *v29; // [sp+8h] [bp-28h]@50
  bool bDataCheck; // [sp+Fh] [bp-21h]@18
  unsigned int dwData; // [sp+10h] [bp-20h]@5
  char acname[21]; // [sp+14h] [bp-1Ch]@21

  v4 = this;
  v5 = *(SlideListWin **)&this->m_kFriend.m_Friends[96].statustitle[28];
  if ( v5 )
  {
    v6 = SlideListWin::GetCurSelIndex(v5);
    switch ( iMsgTag )
    {
      case 9:
      case 12:
        if ( &v4[-1].m_pkAddBtn[3] == (PgWinBut **)g_pkToolTipWin->m_pkToolTipParentWin )
          ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
        return;
      case 18:
        if ( SlideListWin::GetData(*(SlideListWin **)&v4->m_kFriend.m_Friends[96].statustitle[28], v6, &dwData)
          && dwData )
        {
          v24 = *(_DWORD *)(dwData + 4);
          v25 = *(_DWORD *)(dwData + 8);
          v26 = *(_DWORD *)(dwData + 12);
          v7 = *(unsigned int **)(dwData + 20);
          v27 = *(_DWORD *)(dwData + 16);
          v28 = v7;
          GameFrameWork::OnFriendDelete((GameFrameWork *)LODWORD(v4->m_kLocal.m_Rotate.m_pEntry[1][0]), *(Name5 *)&v24);
        }
        return;
      case 20:
        v8 = *(_DWORD *)&v4->m_kFriend.m_Friends[97].statustitle[0];
        if ( v8 )
        {
          if ( v8 == 1 )
          {
            if ( v4->m_kFriend.m_Friends[97].map.n3_name[2] )
            {
              v9 = (SlideListWin *)v4->m_kFindFriend.m_Friends[99].logininfo;
              if ( !v9 )
                return;
              v10 = SlideListWin::GetCurSelIndex(v9);
              if ( v10 < 0 )
                return;
              v11 = SlideListWin::GetData((SlideListWin *)v4->m_kFindFriend.m_Friends[99].logininfo, v10, &dwData);
            }
            else
            {
              v12 = SlideListWin::GetCurSelIndex(*(SlideListWin **)&v4->m_kFindFriend.m_Friends[98].statustitle[28]);
              if ( v12 < 0 )
                return;
              v11 = SlideListWin::GetData(
                      *(SlideListWin **)&v4->m_kFindFriend.m_Friends[98].statustitle[28],
                      v12,
                      &dwData);
            }
          }
          else
          {
            v11 = bDataCheck;
          }
        }
        else
        {
          if ( v6 < 0 )
            return;
          v11 = SlideListWin::GetData(*(SlideListWin **)&v4->m_kFindFriend.m_Friends[98].statustitle[24], v6, &dwData);
        }
        if ( v11 && dwData )
        {
          Name5::n_string((Name5 *)(dwData + 4), acname);
          v13 = (GameFrameWork *)LODWORD(v4->m_kLocal.m_Rotate.m_pEntry[1][0]);
          acname[20] = 0;
          GameFrameWork::NcPartyJoinReq(v13, acname);
        }
        return;
      case 21:
        v14 = *(_DWORD *)&v4->m_kFriend.m_Friends[97].statustitle[0];
        if ( v14 )
        {
          if ( v14 == 1 )
          {
            if ( v4->m_kFriend.m_Friends[97].map.n3_name[2] )
            {
              v15 = (SlideListWin *)v4->m_kFindFriend.m_Friends[99].logininfo;
              if ( !v15 )
                return;
              v16 = SlideListWin::GetCurSelIndex(v15);
              if ( v16 < 0 )
                return;
              v17 = SlideListWin::GetData((SlideListWin *)v4->m_kFindFriend.m_Friends[99].logininfo, v16, &dwData);
            }
            else
            {
              v18 = SlideListWin::GetCurSelIndex(*(SlideListWin **)&v4->m_kFindFriend.m_Friends[98].statustitle[28]);
              if ( v18 < 0 )
                return;
              v17 = SlideListWin::GetData(
                      *(SlideListWin **)&v4->m_kFindFriend.m_Friends[98].statustitle[28],
                      v18,
                      &dwData);
            }
          }
          else
          {
            v17 = bDataCheck;
          }
        }
        else
        {
          if ( v6 < 0 )
            return;
          v17 = SlideListWin::GetData(*(SlideListWin **)&v4->m_kFindFriend.m_Friends[98].statustitle[24], v6, &dwData);
        }
        if ( v17 && dwData )
        {
          v19 = dwData + 4;
          Name5::n_string((Name5 *)(dwData + 4), acname);
          *(_QWORD *)&GameFrameWork::m_kWhisperCharID.n5_name[0] = *(_QWORD *)v19;
          *(_QWORD *)&GameFrameWork::m_kWhisperCharID.n5_code[2] = *(_QWORD *)(v19 + 8);
          GameFrameWork::m_kWhisperCharID.n5_code[4] = *(_DWORD *)(v19 + 16);
          v20 = (GameFrameWork *)LODWORD(v4->m_kLocal.m_Rotate.m_pEntry[1][0]);
          acname[20] = 0;
          GameFrameWork::OnWhisperChatStart(v20, acname);
        }
        return;
      case 19:
        if ( v6 >= 0
          && SlideListWin::GetData(*(SlideListWin **)&v4->m_kFriend.m_Friends[96].statustitle[28], v6, &dwData)
          && dwData )
        {
          FriendWin::ViewAllInfo((FriendWin *)((char *)v4 - 232), (PROTO_FRIEND_INFO *)dwData);
        }
        return;
      case 27:
        if ( !pvBody || *(_DWORD *)pvBody )
          return;
        if ( v4->m_kFriend.m_Friends[97].map.n3_name[2] )
        {
          v21 = (SlideListWin *)v4->m_kFindFriend.m_Friends[99].logininfo;
          if ( !v21 )
            return;
          v22 = SlideListWin::GetCurSelIndex(v21);
          if ( v22 < 0 )
            return;
          v23 = (SlideListWin *)v4->m_kFindFriend.m_Friends[99].logininfo;
          v28 = &dwData;
        }
        else
        {
          v22 = SlideListWin::GetCurSelIndex(*(SlideListWin **)&v4->m_kFindFriend.m_Friends[98].statustitle[28]);
          if ( v22 < 0 )
            return;
          v28 = &dwData;
          v23 = *(SlideListWin **)&v4->m_kFindFriend.m_Friends[98].statustitle[28];
        }
        if ( SlideListWin::GetData(v23, v22, v28) && dwData )
        {
          Name5::n_string((Name5 *)(dwData + 4), acname);
          v29 = &v24;
          acname[20] = 0;
          Name5::Name5((Name5 *)&v24, acname);
          GameFrameWork::NcFriendSetReq((GameFrameWork *)LODWORD(v4->m_kLocal.m_Rotate.m_pEntry[1][0]), *(Name5 *)&v24);
        }
        break;
      default:
        return;
    }
  }
}

//----- (004FBFD0) --------------------------------------------------------
void __thiscall FriendWin::UpdateViewList(FriendWin *this)
{
  FriendWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  int v3; // ebx@3
  PROTO_FRIEND_INFO *v4; // edi@4
  int v5; // eax@5

  v1 = this;
  v2 = this->m_pListWinTime;
  if ( v2 && !v1->m_iTabIndex )
  {
    SlideListWin::RemoveAllList(v2);
    v3 = 0;
    if ( v1->m_kFriend.m_NumOfFriend > 0 )
    {
      v4 = v1->m_kFriend.m_Friends;
      do
      {
        v5 = v1->m_iDefaultView;
        if ( v5 )
        {
          if ( v5 == 1 )
            FriendWin::AddListItem_ExtInfo(v1, v4);
        }
        else
        {
          FriendWin::AddListItem_DefInfo(v1, v4);
        }
        ++v3;
        ++v4;
      }
      while ( v3 < v1->m_kFriend.m_NumOfFriend );
    }
    SlideListWin::Sort(v1->m_pListWinTime, v1->m_nSortColumn, 0, 0);
    SlideListWin::UpdateViewList(v1->m_pListWinTime);
    SlideBar::SetSplitCnt(v1->m_pkSlideBarEx, v1->m_pListWinTime->m_nSlideSplitCnt);
  }
}

//----- (004FC070) --------------------------------------------------------
void __thiscall FriendWin::ChangeUserName(FriendWin *this, Name5 *OldName, Name5 *NewName)
{
  FriendWin *v3; // esi@1
  PROTO_FRIEND_INFO *v4; // eax@1

  v3 = this;
  v4 = CFriend::Get(&this->m_kFriend, OldName);
  if ( v4 )
  {
    *(_QWORD *)&v4->charid.n5_name[0] = *(_QWORD *)&NewName->n5_code[0];
    *(_QWORD *)&v4->charid.n5_code[2] = *(_QWORD *)&NewName->n5_code[2];
    v4->charid.n5_code[4] = NewName->n5_code[4];
    FriendWin::UpdateViewList(v3);
  }
}

//----- (004FC0C0) --------------------------------------------------------
void __thiscall FriendWin::UpdateFindList(FriendWin *this, int nIndex)
{
  FriendWin *v2; // esi@1
  int v3; // edi@3
  int v4; // ebx@5
  int nPosX; // [sp+Ch] [bp+8h]@5

  v2 = this;
  if ( this->m_pkFindWin )
  {
    if ( this->m_pkFindBar )
    {
      v3 = nIndex;
      if ( nIndex >= 0 )
      {
        FriendWin::AddFindListItem(this, &this->m_kFindFriend.m_Friends[nIndex]);
        if ( nIndex < 27 )
        {
          nPosX = SlideListWin::GetColumPosX(v2->m_pkFindWin, nIndex, 3u);
          v4 = SlideListWin::GetColumPosY(v2->m_pkFindWin, v3, 3u) + 1;
          ((void (__stdcall *)(_DWORD))v2->m_pkAddBtn[v3]->vfptr[64].__vecDelDtor)(1);
          ((void (__stdcall *)(_DWORD))v2->m_pkAddBtn[v3]->vfptr[60].__vecDelDtor)(1);
          ((void (__stdcall *)(_DWORD))v2->m_pkAddBtn[v3]->vfptr[43].__vecDelDtor)(nPosX + 33);
          v2->m_pkAddBtn[v3]->vfptr[44].__vecDelDtor((NiRefObject *)v2->m_pkAddBtn[v3], v4);
        }
        SlideListWin::UpdateViewList(v2->m_pkFindWin);
        SlideBar::SetSplitCnt(v2->m_pkFindBar, v2->m_pkFindWin->m_nSlideSplitCnt);
      }
    }
  }
}

//----- (004FC1B0) --------------------------------------------------------
void __thiscall FriendWin::ResetTitleType(FriendWin *this, int iCnt, int iCondition)
{
  int v3; // ebx@2
  char *v4; // edi@3
  int i; // esi@4

  if ( iCnt >= 0 )
  {
    v3 = 0;
    if ( iCnt > 0 )
    {
      v4 = (char *)&this->m_vecTitleType[0]._Mylast;
      do
      {
        for ( i = *((_DWORD *)v4 - 1); i != *(_DWORD *)v4; i += 4 )
        {
          if ( !*(_DWORD *)i )
            break;
          (*(void (__stdcall **)(_DWORD))(**(_DWORD **)i + 256))(v3 == iCondition);
        }
        ++v3;
        v4 += 16;
      }
      while ( v3 < iCnt );
    }
  }
}

//----- (004FC210) --------------------------------------------------------
void __thiscall FriendWin::ResetTabType(FriendWin *this, int iCnt, int iCondition)
{
  int v3; // ebx@2
  char *v4; // edi@3
  int i; // esi@4

  if ( iCnt >= 0 )
  {
    v3 = 0;
    if ( iCnt > 0 )
    {
      v4 = (char *)&this->m_vecTabType[0]._Mylast;
      do
      {
        for ( i = *((_DWORD *)v4 - 1); i != *(_DWORD *)v4; i += 4 )
        {
          if ( !*(_DWORD *)i )
            break;
          (*(void (__stdcall **)(_DWORD))(**(_DWORD **)i + 256))(v3 == iCondition);
        }
        ++v3;
        v4 += 16;
      }
      while ( v3 < iCnt );
    }
  }
}

//----- (004FC270) --------------------------------------------------------
void __thiscall FriendWin::ShowFindList(FriendWin *this)
{
  FriendWin *v1; // esi@1
  PgWinBut *v2; // ecx@3
  int v3; // ebx@3
  int v4; // edi@5
  int i; // esi@5
  signed int v6; // ebx@9
  int v7; // edi@10
  int j; // esi@10
  SlideBar *v9; // edx@14
  FriendWin *v10; // [sp+4h] [bp-4h]@1

  v1 = this;
  v10 = this;
  if ( this->m_pkFindWin && this->m_pkFindBar )
  {
    v2 = this->m_pkListName;
    v1->m_iTabIndex = 1;
    ((void (__stdcall *)(_DWORD))v2->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v1->m_pkListNameText->vfptr[64].__vecDelDtor)(0);
    v3 = 0;
    while ( 1 )
    {
      v4 = (int)v1 + 16 * v3;
      for ( i = *(_DWORD *)(v4 + 14984); i != *(_DWORD *)(v4 + 14988); i += 4 )
      {
        if ( !*(_DWORD *)i )
          break;
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)i + 256))(v3 == 2);
      }
      if ( ++v3 >= 3 )
        break;
      v1 = v10;
    }
    v6 = 0;
    do
    {
      v7 = (int)v10 + 16 * v6;
      for ( j = *(_DWORD *)(v7 + 15032); j != *(_DWORD *)(v7 + 15036); j += 4 )
      {
        if ( !*(_DWORD *)j )
          break;
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)j + 256))(v6 == 1);
      }
      ++v6;
    }
    while ( v6 < 2 );
    v9 = v10->m_pkFindBar;
    v10->m_pListWinTime = v10->m_pkFindWin;
    v10->m_pkSlideBarEx = v9;
    FriendWin::ResetAddBtn(v10);
    SlideListWin::RemoveAllList(v10->m_pListWinTime);
    SlideListWin::UpdateViewList(v10->m_pListWinTime);
    v10->m_pkListTab->m_bCheck = 0;
    v10->m_pkFindTab->m_bCheck = 1;
  }
}

//----- (004FC3B0) --------------------------------------------------------
FriendAddWin *__cdecl FriendAddWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  FriendAddWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x15Cu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&FriendAddWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&FriendAddWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (FriendAddWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 98AFB8: using guessed type void (__thiscall *FriendAddWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98AFD4: using guessed type int (__thiscall *FriendAddWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004FC4F0) --------------------------------------------------------
void __thiscall FriendWin::~FriendWin(FriendWin *this)
{
  FriendWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&FriendWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&FriendWin::`vftable'{for `IDirectMessenger'};
  `eh vector destructor iterator'(
    this->m_vecTabType,
    0x10u,
    3,
    (void (__thiscall *)(void *))std::vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>::~vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>);
  `eh vector destructor iterator'(
    v1->m_vecTitleType,
    0x10u,
    3,
    (void (__thiscall *)(void *))std::vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>::~vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>);
  CFriend::~CFriend(&v1->m_kFindFriend);
  CFriend::~CFriend(&v1->m_kFriend);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 98B438: using guessed type void (__thiscall *FriendWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98B454: using guessed type int (__thiscall *FriendWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004FC5A0) --------------------------------------------------------
void __thiscall FriendWin::OnAddInfoBtn(FriendWin *this)
{
  FriendWin *v1; // edi@1
  int v2; // eax@1
  signed int v3; // ebx@1
  NiRefObjectVtbl *v4; // esi@5
  NiUnsharedGeometryGroup *v5; // eax@5
  PgWin ***v6; // edi@6
  PgWin **i; // esi@7
  unsigned int v8; // [sp-4h] [bp-18h]@3
  FriendWin *v9; // [sp+Ch] [bp-8h]@1
  int v10; // [sp+10h] [bp-4h]@6

  v1 = this;
  v2 = this->m_iDefaultView;
  v3 = 0;
  v9 = this;
  if ( !v2 )
  {
    this->m_iDefaultView = 1;
    v8 = -655796683;
    goto LABEL_5;
  }
  if ( v2 == 1 )
  {
    this->m_iDefaultView = 0;
    v8 = 891961159;
LABEL_5:
    v4 = this->m_pkInfoType->vfptr;
    v5 = TextData::Get(v8);
    v4[118].__vecDelDtor((NiRefObject *)v1->m_pkInfoType, (unsigned int)v5);
  }
  v10 = v1->m_iDefaultView;
  v6 = &v1->m_vecTitleType[0]._Mylast;
  do
  {
    for ( i = *(v6 - 1); i != *v6; ++i )
    {
      if ( !*i )
        break;
      ((void (__stdcall *)(_DWORD))(*i)->vfptr[64].__vecDelDtor)(v3 == v10);
    }
    ++v3;
    v6 += 4;
  }
  while ( v3 < 3 );
  FriendWin::UpdateViewList(v9);
}

//----- (004FC650) --------------------------------------------------------
void __thiscall FriendWin::OnShowAllFriend(FriendWin *this)
{
  FriendWin *v1; // esi@1
  PgWinText *v2; // eax@1
  bool v3; // cl@1
  NiRefObjectVtbl *v4; // edi@2
  NiUnsharedGeometryGroup *v5; // eax@3
  NiUnsharedGeometryGroup *v6; // eax@4

  v1 = this;
  v2 = this->m_pkShowOnlineOnly;
  v3 = this->m_bShowOnlineOnly == 0;
  v1->m_bShowOnlineOnly = v3;
  if ( v2 )
  {
    v4 = v2->vfptr;
    if ( v3 )
    {
      v5 = TextData::Get(0x28344C40u);
      v4[118].__vecDelDtor((NiRefObject *)v1->m_pkShowOnlineOnly, (unsigned int)v5);
      FriendWin::UpdateViewList(v1);
    }
    else
    {
      v6 = TextData::Get(0x708D957Fu);
      v4[118].__vecDelDtor((NiRefObject *)v1->m_pkShowOnlineOnly, (unsigned int)v6);
      FriendWin::UpdateViewList(v1);
    }
  }
}

//----- (004FC6C0) --------------------------------------------------------
void __thiscall FriendWin::AddFriend(FriendWin *this, PROTO_FRIEND_INFO *pInfo, bool bListElem)
{
  FriendWin *v3; // esi@1
  unsigned int v4; // eax@3
  unsigned int v5; // ecx@3
  GameFrameWork *v6; // ebx@3
  unsigned int v7; // eax@3
  unsigned int v8; // ecx@3
  char *v9; // eax@3
  int v10; // eax@4
  int i; // edi@7
  char acName[21]; // [sp+Ch] [bp-1Ch]@3

  v3 = this;
  if ( CFriend::Add(&this->m_kFriend, pInfo) == 1 && !bListElem )
  {
    v4 = pInfo->charid.n5_code[0];
    v5 = pInfo->charid.n5_code[1];
    v6 = (GameFrameWork *)v3->m_pkFrameWork;
    *(_DWORD *)&acName[8] = pInfo->charid.n5_code[2];
    *(_DWORD *)acName = v4;
    v7 = pInfo->charid.n5_code[3];
    *(_DWORD *)&acName[4] = v5;
    v8 = pInfo->charid.n5_code[4];
    *(_DWORD *)&acName[12] = v7;
    *(_DWORD *)&acName[16] = v8;
    acName[20] = 0;
    v9 = (char *)TextData::Get(0xB5ECC6AC);
    GameFrameWork::VaAddSysMsg(v6, v9, acName);
  }
  v10 = v3->m_iTabIndex;
  if ( v10 )
  {
    if ( v10 == 1 )
    {
      if ( CFriend::Del(&v3->m_kFindFriend, &pInfo->charid) )
      {
        FriendWin::ResetAddBtn(v3);
        SlideListWin::RemoveAllList(v3->m_pkFindWin);
        for ( i = 0; i < v3->m_kFindFriend.m_NumOfFriend; ++i )
          FriendWin::UpdateFindList(v3, i);
      }
    }
  }
  else
  {
    FriendWin::UpdateViewList(v3);
  }
}

//----- (004FC7B0) --------------------------------------------------------
char __thiscall FriendWin::DelFriend(FriendWin *this, Name5 charid)
{
  FriendWin *v2; // esi@1

  v2 = this;
  CFriend::Del(&this->m_kFriend, &charid);
  FriendWin::UpdateViewList(v2);
  return 1;
}

//----- (004FC7E0) --------------------------------------------------------
char __thiscall FriendWin::LoginFriend(FriendWin *this, Name5 charid)
{
  FriendWin *v2; // esi@1

  v2 = this;
  CFriend::Login(&this->m_kFriend, &charid);
  FriendWin::UpdateViewList(v2);
  return 1;
}

//----- (004FC810) --------------------------------------------------------
char __thiscall FriendWin::LogoutFriend(FriendWin *this, Name5 charid)
{
  FriendWin *v2; // esi@1

  v2 = this;
  CFriend::Logout(&this->m_kFriend, &charid);
  FriendWin::UpdateViewList(v2);
  return 1;
}

//----- (004FC840) --------------------------------------------------------
char __thiscall FriendWin::ChangeMapFriend(FriendWin *this, Name5 charid, Name3 mapName)
{
  FriendWin *v3; // esi@1
  _BYTE v4[20]; // ST00_20@1

  v3 = this;
  *(_QWORD *)v4 = *(_QWORD *)&charid.n5_name[0];
  *(_QWORD *)&v4[8] = *(_QWORD *)&charid.n5_code[2];
  *(_DWORD *)&v4[16] = charid.n5_code[4];
  CFriend::MapChange(&this->m_kFriend, *(Name5 *)v4, &mapName);
  FriendWin::UpdateViewList(v3);
  return 1;
}

//----- (004FC890) --------------------------------------------------------
char __thiscall FriendWin::PartyFriend(FriendWin *this, Name5 charid, bool bParty)
{
  FriendWin *v3; // esi@1
  _BYTE v4[20]; // ST00_20@1

  v3 = this;
  *(_QWORD *)v4 = *(_QWORD *)&charid.n5_name[0];
  *(_QWORD *)&v4[8] = *(_QWORD *)&charid.n5_code[2];
  *(_DWORD *)&v4[16] = charid.n5_code[4];
  CFriend::PartyChange(&this->m_kFriend, *(Name5 *)v4, bParty);
  FriendWin::UpdateViewList(v3);
  return 1;
}

//----- (004FC8E0) --------------------------------------------------------
char __thiscall FriendWin::LevelChange(FriendWin *this, Name5 charid, char Level)
{
  FriendWin *v3; // esi@1
  _BYTE v4[20]; // ST00_20@1

  v3 = this;
  *(_QWORD *)v4 = *(_QWORD *)&charid.n5_name[0];
  *(_QWORD *)&v4[8] = *(_QWORD *)&charid.n5_code[2];
  *(_DWORD *)&v4[16] = charid.n5_code[4];
  CFriend::LevelChange(&this->m_kFriend, *(Name5 *)v4, Level);
  FriendWin::UpdateViewList(v3);
  return 1;
}

//----- (004FC930) --------------------------------------------------------
void __thiscall FriendWin::AddFindFriend(FriendWin *this, PROTO_FRIEND_INFO *pInfo, int nIndex)
{
  FriendWin *v3; // esi@1

  v3 = this;
  if ( nIndex >= 0 )
  {
    if ( CFriend::Add(&this->m_kFindFriend, pInfo) )
      FriendWin::UpdateFindList(v3, nIndex);
  }
}

//----- (004FC960) --------------------------------------------------------
void __thiscall FriendWin::OnListTab(FriendWin *this)
{
  FriendWin *v1; // esi@1
  PgWinBut *v2; // ecx@1
  SlideBar *v3; // ecx@1
  int v4; // edx@1
  PgWin ***v5; // ebx@1
  PgWin **i; // edi@2
  signed int v7; // eax@6
  int v8; // ebx@7
  PgWin **v9; // edi@7
  bool v10; // zf@9
  void *(__thiscall *v11)(NiRefObject *, unsigned int); // eax@9
  int v12; // [sp+Ch] [bp-8h]@1
  signed int v13; // [sp+10h] [bp-4h]@1
  signed int v14; // [sp+10h] [bp-4h]@6

  v1 = this;
  FriendWin::ResetAddBtn(this);
  GameFrameWork::NcFriendPointReq((GameFrameWork *)v1->m_pkFrameWork);
  v2 = v1->m_pkListName;
  v1->m_iTabIndex = 0;
  ((void (__stdcall *)(_DWORD))v2->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkListNameText->vfptr[64].__vecDelDtor)(1);
  v3 = v1->m_pkListBar;
  v4 = v1->m_iDefaultView;
  v1->m_pListWinTime = v1->m_pkListWin;
  v1->m_pkSlideBarEx = v3;
  v12 = v4;
  v13 = 0;
  v5 = &v1->m_vecTitleType[0]._Mylast;
  do
  {
    for ( i = *(v5 - 1); i != *v5; ++i )
    {
      if ( !*i )
        break;
      ((void (__stdcall *)(_DWORD))(*i)->vfptr[64].__vecDelDtor)(v13 == v12);
    }
    v5 += 4;
    ++v13;
  }
  while ( v13 < 3 );
  v7 = 0;
  v14 = 0;
  do
  {
    v8 = v7;
    v9 = v1->m_vecTabType[v7]._Myfirst;
    if ( v9 != v1->m_vecTabType[v7]._Mylast )
    {
      do
      {
        if ( !*v9 )
          break;
        v10 = v7 == 0;
        v11 = (*v9)->vfptr[64].__vecDelDtor;
        if ( v10 )
          ((void (__stdcall *)(_DWORD))v11)(1);
        else
          ((void (__stdcall *)(_DWORD))v11)(0);
        v7 = v14;
        ++v9;
      }
      while ( v9 != v1->m_vecTabType[4 * v8 / 0x10u]._Mylast );
    }
    v14 = ++v7;
  }
  while ( v7 < 2 );
  FriendWin::UpdateViewList(v1);
  v1->m_pkListTab->m_bCheck = 1;
  v1->m_pkFindTab->m_bCheck = 0;
}

//----- (004FCA80) --------------------------------------------------------
FriendPointTipMsg *__cdecl FriendPointTipMsg::CreateWin()
{
  PgWin *v0; // eax@1
  PgWin *v1; // esi@1
  PgWin *v2; // edi@8
  FriendPointTipMsg *v3; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v5; // [sp+20h] [bp-4h]@1

  v0 = (PgWin *)operator new(0x158u);
  v1 = v0;
  result.m_pObject = v0;
  v5 = 0;
  if ( v0 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v0);
    v1->vfptr = (NiRefObjectVtbl *)&FriendPointTipMsg::`vftable'{for `NiNode'};
    v1->vfptr = (IDirectMessengerVtbl *)&FriendPointTipMsg::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v1 = 0;
  }
  if ( v1 )
    InterlockedIncrement((volatile LONG *)&v1->m_uiRefCount);
  v5 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v1);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *))v1->vfptr[135].__vecDelDtor)(v1) )
  {
    ((void (__thiscall *)(PgWin *))v1->vfptr[89].__vecDelDtor)(v1);
    v5 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
      v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
    v3 = (FriendPointTipMsg *)v1;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v1);
    if ( result.m_pObject )
    {
      v2 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v2 )
          v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
      }
    }
    v5 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
      v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
    v3 = 0;
  }
  return v3;
}
// 98B1F8: using guessed type void (__thiscall *FriendPointTipMsg::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98B214: using guessed type int (__thiscall *FriendPointTipMsg::`vftable'{for `NiNode'})(void *p, char);

//----- (004FCBC0) --------------------------------------------------------
void __thiscall FriendWin::OnCommand(FriendWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0xBu:
      FriendWin::OnWinClose(this);
      break;
    case 0xCu:
      GameFrameWork::OpenFriendAddWin((GameFrameWork *)this->m_pkFrameWork);
      break;
    case 0xDu:
      FriendWin::OnAddInfoBtn(this);
      break;
    case 0xEu:
      FriendWin::OnShowAllFriend(this);
      break;
    case 0x10u:
      FriendWin::OnSlideBar(this);
      break;
    case 0x13u:
      FriendWin::OnSortByTitle01(this);
      break;
    case 0x14u:
      FriendWin::OnSortByTitle02(this);
      break;
    case 0x15u:
      FriendWin::OnSortByTitle03(this);
      break;
    case 0x16u:
      FriendWin::OnSortByTitle04(this);
      break;
    case 0x18u:
      FriendWin::OnLClick(this, lParam);
      break;
    case 0x17u:
      FriendWin::OnRClick(this, lParam);
      break;
    case 0x1Eu:
      FriendWin::OnClickRejectBtn(this);
      break;
    case 0x19u:
      FriendWin::OnChangeTab(this, TE_GUILD);
      break;
    case 0x1Au:
      FriendWin::OnChangeTab(this, TE_PARTYMATCH);
      break;
    case 0x1Bu:
      FriendWin::OnChangeTab(this, TE_WEDDING);
      break;
    case 0x1Cu:
      FriendWin::OnChangeTab(this, TE_HOLYPROMISE);
      break;
    case 0x1Du:
      FriendWin::OnChangeTab(this, TE_GUILDACADEMY);
      break;
    case 0x1Fu:
      FriendWin::OnHelpLink();
      break;
    case 0x20u:
      FriendWin::OnListTab(this);
      break;
    case 0x21u:
      FriendWin::OnFindTab(this);
      break;
    case 0x22u:
      FriendWin::OnFriendPointUse(this);
      break;
    case 0x23u:
      FriendWin::OnFriendPointHelp(this);
      break;
    case 0x24u:
      FriendWin::OnFriendFindAdd(this, lParam);
      break;
    case 0x25u:
      FriendWin::OnFriendInviterAdd(this);
      break;
    case 0x26u:
      FriendWin::OnInviterLClick(this, lParam);
      break;
    case 0x27u:
      FriendWin::OnInviterRClick(this, lParam);
      break;
    case 0x28u:
      FriendWin::OnSortByTitle05(this);
      break;
    case 0x29u:
      FriendWin::OnSortByTitle06(this);
      break;
    default:
      return;
  }
}

//----- (004FCD90) --------------------------------------------------------
void __thiscall FriendWin::FriendWin(FriendWin *this)
{
  FriendWin *v1; // esi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v2; // [sp-1Ch] [bp-3Ch]@1
  int v3; // [sp-Ch] [bp-2Ch]@1
  signed int v4; // [sp-8h] [bp-28h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v5; // [sp+Ch] [bp-14h]@1
  FriendWin *v6; // [sp+10h] [bp-10h]@1
  int v7; // [sp+1Ch] [bp-4h]@1

  v1 = this;
  v6 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v7 = 0;
  v1->vfptr = (NiRefObjectVtbl *)&FriendWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&FriendWin::`vftable'{for `IDirectMessenger'};
  CFriend::CFriend(&v1->m_kFriend);
  CFriend::CFriend(&v1->m_kFindFriend);
  `eh vector constructor iterator'(
    v1->m_vecTitleType,
    0x10u,
    3,
    (void (__thiscall *)(void *))CPartyFinder::CPartyFinder,
    (void (__thiscall *)(void *))std::vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>::~vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>);
  `eh vector constructor iterator'(
    v1->m_vecTabType,
    0x10u,
    3,
    (void (__thiscall *)(void *))CPartyFinder::CPartyFinder,
    (void (__thiscall *)(void *))std::vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>::~vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>);
  v5 = &v2;
  v1->m_bShowOnlineOnly = 0;
  v1->m_nSortColumn = 0;
  v1->m_pkSlideBarEx = 0;
  v1->m_pkSlideBar = 0;
  v1->m_pListWinTime = 0;
  v1->m_pkInfoType = 0;
  *(_WORD *)&v1->m_bInviter = 0;
  v1->m_uiFriendPoint = 0;
  v1->m_iTabIndex = 0;
  v1->m_pkListTab = 0;
  v1->m_pkFindTab = 0;
  v1->m_pkFindWin = 0;
  v1->m_pkFindBar = 0;
  v1->m_pkListBar = 0;
  v1->m_pkListWin = 0;
  v1->m_pkInviterWin = 0;
  v1->m_pkInviterBtn = 0;
  v1->m_pkToolTip = 0;
  v1->m_iDefaultView = 0;
  v1->m_spFindPopupMenu = 0;
  v4 = 15;
  v3 = 0;
  LOBYTE(v7) = 4;
  v2._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v2, "FriendUsePoint", 0xEu);
  v1->m_uiFriendUsePoint = (unsigned __int16)CSingleDataMap::GetValue(&g_kSingleDataMap, v2);
  v1->m_pkAddBtn[0] = 0;
  v1->m_pkAddBtn[1] = 0;
  v1->m_pkAddBtn[2] = 0;
  v1->m_pkAddBtn[3] = 0;
  v1->m_pkAddBtn[4] = 0;
  v1->m_pkAddBtn[5] = 0;
  v1->m_pkAddBtn[6] = 0;
  v1->m_pkAddBtn[7] = 0;
  v1->m_pkAddBtn[8] = 0;
  v1->m_pkAddBtn[9] = 0;
  v1->m_pkAddBtn[10] = 0;
  v1->m_pkAddBtn[11] = 0;
  v1->m_pkAddBtn[12] = 0;
  v1->m_pkAddBtn[13] = 0;
  v1->m_pkAddBtn[14] = 0;
  v1->m_pkAddBtn[15] = 0;
  v1->m_pkAddBtn[16] = 0;
  v1->m_pkAddBtn[17] = 0;
  v1->m_pkAddBtn[18] = 0;
  v1->m_pkAddBtn[19] = 0;
  v1->m_pkAddBtn[20] = 0;
  v1->m_pkAddBtn[21] = 0;
  v1->m_pkAddBtn[22] = 0;
  v1->m_pkAddBtn[23] = 0;
  v1->m_pkAddBtn[24] = 0;
  v1->m_pkAddBtn[25] = 0;
  v1->m_pkAddBtn[26] = 0;
  v1->m_pkFriendPointTipMsg = 0;
  v1->m_pkShowOnlineOnly = 0;
  v1->m_spPopupMenu = 0;
  v1->m_bAllow = 1;
}
// 98B438: using guessed type void (__thiscall *FriendWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98B454: using guessed type int (__thiscall *FriendWin::`vftable'{for `NiNode'})(void *p, char);

//----- (004FCFB0) --------------------------------------------------------
FriendWin *__cdecl FriendWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  FriendWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x3AECu);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    FriendWin::FriendWin((FriendWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (FriendWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (004FD0E0) --------------------------------------------------------
char __thiscall FriendWin::Create(FriendWin *this, PgFrameWork *pkFrameWork)
{
  FriendWin *v2; // esi@1
  NiTexturePalette *v3; // ebx@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  LONG v7; // eax@6
  char result; // al@10
  int v9; // edi@11
  int v10; // ebx@11
  NiSourceTexture *v11; // eax@11
  PgSprData *v12; // eax@12
  PgSprData *v13; // eax@14
  PgFont *v14; // eax@17
  PgWinText *v15; // eax@17
  NiRefObjectVtbl *v16; // edx@17
  NiUnsharedGeometryGroup *v17; // eax@17
  PgSprData *v18; // eax@19
  PgWinSpr *v19; // eax@19
  PgFont *v20; // eax@21
  PgWinText *v21; // eax@21
  NiRefObjectVtbl *v22; // edx@21
  NiUnsharedGeometryGroup *v23; // eax@21
  PgFont *v24; // eax@21
  PgWinText *v25; // eax@21
  NiRefObjectVtbl *v26; // edx@21
  NiUnsharedGeometryGroup *v27; // eax@21
  SLWCreateInfo::Item *v28; // eax@21
  int v29; // eax@21
  PgSprData *v30; // eax@21
  SlideListWin *v31; // eax@21
  int v32; // eax@21
  PgSprData *v33; // eax@21
  SlideBar *v34; // eax@21
  int v35; // eax@21
  PgWinBut *v36; // eax@21
  float v37; // edx@21
  int v38; // ecx@21
  PgWinText *v39; // edx@21
  PgFont *v40; // eax@21
  PgWinText *v41; // eax@21
  NiRefObjectVtbl *v42; // edx@21
  NiUnsharedGeometryGroup *v43; // eax@21
  PgWinText *v44; // edx@21
  float v45; // ecx@21
  PgWinText *v46; // eax@21
  PgFont *v47; // eax@21
  PgWinText *v48; // eax@21
  NiRefObjectVtbl *v49; // edx@21
  NiUnsharedGeometryGroup *v50; // eax@21
  PgWinBut *v51; // eax@21
  float v52; // edx@21
  int v53; // ecx@21
  PgWinText *v54; // edx@21
  PgFont *v55; // eax@21
  PgWinText *v56; // eax@21
  NiRefObjectVtbl *v57; // edx@21
  NiUnsharedGeometryGroup *v58; // eax@21
  PgWinBut *v59; // eax@21
  float v60; // edx@21
  int v61; // ecx@21
  PgWinText *v62; // edx@21
  PgFont *v63; // eax@21
  PgWinText *v64; // eax@21
  NiRefObjectVtbl *v65; // edx@21
  NiUnsharedGeometryGroup *v66; // eax@21
  char *v67; // eax@21
  int v68; // eax@21
  PgWinText *v69; // edx@21
  PgFont *v70; // eax@21
  PgWinText *v71; // eax@21
  NiRefObjectVtbl *v72; // edx@21
  NiUnsharedGeometryGroup *v73; // eax@21
  char *v74; // eax@21
  int v75; // eax@21
  PgWinText *v76; // edx@21
  PgFont *v77; // eax@21
  PgWinText *v78; // eax@21
  NiUnsharedGeometryGroup *v79; // eax@21
  PgWinBut *v80; // eax@21
  float v81; // edx@21
  int v82; // ecx@21
  PgWinText *v83; // edx@21
  PgFont *v84; // eax@21
  PgWinText *v85; // eax@21
  NiUnsharedGeometryGroup *v86; // eax@21
  PgWinBut *v87; // eax@21
  PgWinText *v88; // ecx@21
  int v89; // eax@21
  int v90; // edx@21
  PgFont *v91; // eax@21
  PgWinText *v92; // eax@21
  NiUnsharedGeometryGroup *v93; // eax@21
  char *v94; // eax@21
  PgSprData *v95; // eax@21
  char *v96; // eax@21
  char *v97; // eax@21
  char *v98; // eax@21
  char *v99; // eax@21
  char *v100; // eax@21
  char *v101; // eax@21
  PgSprData::PgHitTester *v102; // eax@21
  int v103; // edx@21
  PgFont *v104; // eax@21
  PgWinText *v105; // eax@21
  NiRefObjectVtbl *v106; // edx@21
  NiUnsharedGeometryGroup *v107; // eax@21
  NiPointer<PgSprData::PgHitTester> *v108; // ecx@21
  int v109; // eax@21
  PgFont *v110; // eax@21
  PgWinText *v111; // eax@21
  NiRefObjectVtbl *v112; // edx@21
  NiUnsharedGeometryGroup *v113; // eax@21
  NiPointer<PgSprData::PgHitTester> *v114; // ecx@21
  int v115; // eax@21
  PgFont *v116; // eax@21
  PgWinText *v117; // eax@21
  NiRefObjectVtbl *v118; // edx@21
  NiUnsharedGeometryGroup *v119; // eax@21
  NiPointer<PgSprData::PgHitTester> *v120; // ecx@21
  int v121; // eax@21
  PgFont *v122; // eax@21
  PgWinText *v123; // eax@21
  NiRefObjectVtbl *v124; // edx@21
  NiUnsharedGeometryGroup *v125; // eax@21
  NiPointer<PgSprData::PgHitTester> *v126; // ecx@21
  int v127; // eax@21
  PgFont *v128; // eax@21
  PgWinText *v129; // eax@21
  NiRefObjectVtbl *v130; // edx@21
  NiUnsharedGeometryGroup *v131; // eax@21
  NiPointer<PgSprData::PgHitTester> *v132; // ecx@21
  int v133; // eax@21
  PgFont *v134; // eax@21
  PgWinText *v135; // eax@21
  NiRefObjectVtbl *v136; // edx@21
  NiUnsharedGeometryGroup *v137; // eax@21
  ColumnBut *v138; // eax@21
  PgWinText *v139; // edx@21
  int v140; // eax@21
  int v141; // edx@21
  PgFont *v142; // eax@21
  PgWinText *v143; // eax@21
  NiRefObjectVtbl *v144; // edx@21
  NiUnsharedGeometryGroup *v145; // eax@21
  ColumnBut *v146; // eax@21
  PgWinText *v147; // edx@21
  int v148; // eax@21
  int v149; // edx@21
  PgFont *v150; // eax@21
  PgWinText *v151; // eax@21
  NiRefObjectVtbl *v152; // edx@21
  NiUnsharedGeometryGroup *v153; // eax@21
  PgWinBut *v154; // eax@21
  NiRefObjectVtbl *v155; // edx@21
  int v156; // eax@21
  PgWinText *v157; // edx@21
  PgFont *v158; // eax@21
  PgWinText *v159; // eax@21
  NiRefObjectVtbl *v160; // edx@21
  NiUnsharedGeometryGroup *v161; // eax@21
  PgWinBut *v162; // eax@21
  NiRefObjectVtbl *v163; // edx@21
  int v164; // eax@21
  PgWinText *v165; // edx@21
  PgFont *v166; // eax@21
  PgWinText *v167; // eax@21
  NiRefObjectVtbl *v168; // edx@21
  NiUnsharedGeometryGroup *v169; // eax@21
  PgWinBut *v170; // eax@21
  PgWinText *v171; // edx@21
  int v172; // eax@21
  int v173; // edx@21
  PgFont *v174; // eax@21
  PgWinText *v175; // eax@21
  NiRefObjectVtbl *v176; // edx@21
  NiUnsharedGeometryGroup *v177; // eax@21
  unsigned int v178; // ST1B8_4@21
  char *v179; // eax@21
  char *v180; // eax@21
  SLWCreateInfo::Item *v181; // eax@21
  int v182; // eax@21
  int v183; // eax@21
  int v184; // eax@21
  int v185; // eax@21
  PgSprData *v186; // eax@21
  SlideListWin *v187; // eax@21
  SLWCreateInfo::Item *v188; // eax@21
  int v189; // eax@21
  int v190; // eax@21
  int v191; // eax@21
  int v192; // eax@21
  PgSprData *v193; // eax@21
  SlideListWin *v194; // eax@21
  char *v195; // eax@21
  PgSprData *v196; // eax@21
  SlideBar *v197; // eax@21
  float v198; // ecx@21
  PgWinText *v199; // eax@21
  PgFont *v200; // eax@21
  PgWinText *v201; // eax@21
  NiRefObjectVtbl *v202; // edx@21
  NiUnsharedGeometryGroup *v203; // eax@21
  PgWinBut *v204; // eax@21
  float v205; // edx@21
  int v206; // ecx@21
  PgWinText *v207; // edx@21
  PgFont *v208; // eax@21
  PgWinText *v209; // eax@21
  NiRefObjectVtbl *v210; // edx@21
  NiUnsharedGeometryGroup *v211; // eax@21
  PgWinBut *v212; // eax@21
  float v213; // edx@21
  int v214; // ecx@21
  PgWinText *v215; // edx@21
  PgFont *v216; // eax@21
  PgWinText *v217; // eax@21
  NiRefObjectVtbl *v218; // edx@21
  NiUnsharedGeometryGroup *v219; // eax@21
  PgWinBut *v220; // eax@21
  NiRefObjectVtbl *v221; // edx@21
  PgFont *v222; // eax@21
  PgWinText *v223; // eax@21
  unsigned int v224; // ST1B8_4@21
  char *v225; // eax@21
  char *v226; // eax@21
  PgWinBut *v227; // eax@22
  PgWinBut *v228; // eax@23
  int v229; // eax@23
  SlideListWin *v230; // ecx@23
  int v231; // eax@23
  void *(__thiscall *v232)(NiRefObject *, unsigned int); // edx@23
  PgSprData *v233; // eax@23
  PgWinSpr *v234; // eax@23
  char *v235; // eax@23
  NiSourceTexture *v236; // eax@23
  PopupMenuWin *v237; // eax@23
  char *v238; // eax@23
  PopupMenuText *v239; // ebx@23
  char *v240; // eax@23
  PopupMenuText *v241; // ebx@23
  char *v242; // eax@23
  PopupMenuText *v243; // ebx@23
  NiSourceTexture *v244; // eax@23
  PopupMenuWin *v245; // eax@23
  char *v246; // eax@23
  PopupMenuText *v247; // edi@23
  char *v248; // eax@23
  PopupMenuText *v249; // edi@23
  FriendPointTipMsg *v250; // eax@23
  NiNode *v251; // esi@25
  SLWCreateInfo kCreateInfo; // [sp+1CCh] [bp-1F0h]@21
  unsigned int uiWidth; // [sp+1E8h] [bp-1D4h]@14
  unsigned int uiHeight; // [sp+1ECh] [bp-1D0h]@14
  int uiLeft; // [sp+1F0h] [bp-1CCh]@4
  int uiTop; // [sp+1F4h] [bp-1C8h]@4
  NiPointer<NiNode> spNode; // [sp+1F8h] [bp-1C4h]@1
  int nPosY; // [sp+1FCh] [bp-1C0h]@21
  int i; // [sp+200h] [bp-1BCh]@17
  PgWinText *pkTextWin; // [sp+204h] [bp-1B8h]@17
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v261; // [sp+208h] [bp-1B4h]@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v262; // [sp+224h] [bp-198h]@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v263; // [sp+240h] [bp-17Ch]@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v264; // [sp+25Ch] [bp-160h]@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v265; // [sp+278h] [bp-144h]@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v266; // [sp+294h] [bp-128h]@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v267; // [sp+2B0h] [bp-10Ch]@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v268; // [sp+2CCh] [bp-F0h]@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v269; // [sp+2E8h] [bp-D4h]@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v270; // [sp+304h] [bp-B8h]@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v271; // [sp+320h] [bp-9Ch]@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v272; // [sp+33Ch] [bp-80h]@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v273; // [sp+358h] [bp-64h]@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v274; // [sp+374h] [bp-48h]@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+390h] [bp-2Ch]@21
  int v276; // [sp+3B8h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  this->m_pkFrameWork = pkFrameWork;
  v3 = pTexturePalette;
  v276 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\FriendList.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "FriendWin", 0) )
  {
    v6 = spNode.m_pObject;
    v276 = -1;
    if ( spNode.m_pObject )
    {
      v7 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
      goto LABEL_7;
    }
    return 0;
  }
  v9 = uiLeft;
  v10 = uiTop;
  v11 = MenuTexMgr::GetTexture(0x13u);
  if ( v11 )
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v11);
  else
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v13, (PgWin *)&v2->vfptr, 0, 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "WinTitle",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
  {
LABEL_15:
    v6 = spNode.m_pObject;
    v276 = -1;
    if ( spNode.m_pObject )
    {
      v7 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
LABEL_7:
      if ( !v7 )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    return 0;
  }
  v14 = Font::Get(MAIN_MENU);
  v15 = PgWinText::CreateWin(uiLeft - v9, uiTop - v10, uiWidth, uiHeight, v14, (PgWin *)&v2->vfptr, 0, 0);
  v16 = v15->vfptr;
  pkTextWin = v15;
  v16[122].__vecDelDtor((NiRefObject *)v15, 1u);
  ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
  i = (int)&pkTextWin->vfptr[118];
  v17 = TextData::Get(0xE3504941);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))i)(pkTextWin, v17);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xBu, 0, 0);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "HelpLinkNor",
                               &uiLeft,
                               &uiTop,
                               0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x1Fu, 0, 0);
  }
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0, 0);
  i = (int)PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0, 0);
  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
    (std::vector<unsigned long,std::allocator<unsigned long> > *)v2->m_vecTabType,
    (const unsigned int *)&i);
  v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "FindPlane", &uiLeft, &uiTop, 0);
  v19 = PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v18, (PgWin *)&v2->vfptr, 0, 0);
  i = (int)v19;
  if ( v19 )
  {
    v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
    (*(void (__stdcall **)(_DWORD))(*(_DWORD *)i + 256))(0);
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_vecTabType[1],
      (const unsigned int *)&i);
    PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &uiLeft, &uiTop, 0);
    v20 = Font::Get(TITLEBOLD);
    v21 = PgWinText::CreateWin(uiLeft - v9, uiTop - v10, uiWidth, uiHeight, v20, (PgWin *)&v2->vfptr, 0, 0);
    v22 = v21->vfptr;
    pkTextWin = v21;
    v22[122].__vecDelDtor((NiRefObject *)v21, 5u);
    i = (int)&pkTextWin->vfptr[118];
    v23 = TextData::Get(0xDCF3EDF4);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))i)(pkTextWin, v23);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Category", &uiLeft, &uiTop, 0);
    v24 = Font::Get(TITLEBOLD);
    v25 = PgWinText::CreateWin(uiLeft - v9, uiTop - v10, uiWidth, uiHeight, v24, (PgWin *)&v2->vfptr, 0, 0);
    v26 = v25->vfptr;
    pkTextWin = v25;
    v26[122].__vecDelDtor((NiRefObject *)v25, 5u);
    i = (int)&pkTextWin->vfptr[118];
    v27 = TextData3::Get(0x2E4A1B0Bu);
    (*(void (__thiscall **)(_DWORD, _DWORD))i)(pkTextWin, v27);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    kCreateInfo.m_arrItem._Myfirst = 0;
    kCreateInfo.m_arrItem._Mylast = 0;
    kCreateInfo.m_arrItem._Myend = 0;
    kCreateInfo.m_bMakeData = 0;
    kCreateInfo.m_nOffX = 0;
    kCreateInfo.m_nOffY = 0;
    LOBYTE(v276) = 1;
    v28 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
    v28->nItemType = 1;
    v28->pNode = spNode.m_pObject;
    nPosY = (int)v28;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &_Val,
      "ColumnBarNor");
    LOBYTE(v276) = 2;
    nPosY += 72;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)nPosY,
      &_Val);
    LOBYTE(v276) = 1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &_Val,
      "ColumnBarClick");
    LOBYTE(v276) = 3;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)nPosY,
      &_Val);
    LOBYTE(v276) = 1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &_Val,
      "ColumnBarOver");
    LOBYTE(v276) = 4;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)nPosY,
      &_Val);
    LOBYTE(v276) = 1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
    nPosY = (int)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    *(_DWORD *)nPosY = 2;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &_Val,
      "Column01");
    LOBYTE(v276) = 5;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)(nPosY + 72),
      &_Val);
    LOBYTE(v276) = 1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
    v29 = nPosY;
    *(NiPointer<NiNode> *)(nPosY + 4) = spNode;
    *(_BYTE *)(v29 + 88) = 1;
    nPosY = (int)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    *(_DWORD *)nPosY = 2;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &_Val,
      "Column02");
    LOBYTE(v276) = 6;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)(nPosY + 72),
      &_Val);
    LOBYTE(v276) = 1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
    *(NiPointer<NiNode> *)(nPosY + 4) = spNode;
    nPosY = (int)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    *(_DWORD *)nPosY = 2;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &_Val,
      "Column03");
    LOBYTE(v276) = 7;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)(nPosY + 72),
      &_Val);
    LOBYTE(v276) = 1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
    *(NiPointer<NiNode> *)(nPosY + 4) = spNode;
    nPosY = (int)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    *(_DWORD *)nPosY = 2;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &_Val,
      "Column04");
    LOBYTE(v276) = 8;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)(nPosY + 72),
      &_Val);
    LOBYTE(v276) = 1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
    *(NiPointer<NiNode> *)(nPosY + 4) = spNode;
    nPosY = (int)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    *(_DWORD *)nPosY = 2;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &_Val,
      "MoreInfoTitleColumn01");
    LOBYTE(v276) = 9;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)(nPosY + 72),
      &_Val);
    LOBYTE(v276) = 1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
    *(NiPointer<NiNode> *)(nPosY + 4) = spNode;
    nPosY = (int)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    *(_DWORD *)nPosY = 2;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &_Val,
      "MoreInfoTitleColumn02");
    LOBYTE(v276) = 10;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)(nPosY + 72),
      &_Val);
    LOBYTE(v276) = 1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
    *(NiPointer<NiNode> *)(nPosY + 4) = spNode;
    SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
    v30 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane01", &uiLeft, &uiTop, 0);
    v31 = SlideListWin::CreateWin(uiLeft - v9, uiTop - v10, v30, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
    v2->m_pkListWin = v31;
    v31->m_uiRClickMsg = 23;
    v2->m_pkListWin->m_uiLClickMsg = 24;
    SlideListWin::UpdateViewList(v2->m_pkListWin);
    v32 = (int)v2->m_pkListWin;
    v2->m_pListWinTime = (SlideListWin *)v32;
    i = v32;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)v2->m_vecTabType,
      (const unsigned int *)&i);
    v33 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle", &uiLeft, &uiTop, 0);
    v34 = SlideBar::CreateWin(
            spNode.m_pObject,
            "SlideBar",
            "SlideBar_UpBtn",
            "SlideBar_DnBtn",
            v33,
            0,
            (PgWin *)&v2->vfptr);
    v2->m_pkListBar = v34;
    v34->m_uiClickMsg = 16;
    v2->m_pkListBar->m_eType = 1;
    v35 = (int)v2->m_pkListBar;
    v2->m_pkSlideBarEx = (SlideBar *)v35;
    i = v35;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)v2->m_vecTabType,
      (const unsigned int *)&i);
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title01Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title01Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title01Over");
    v36 = PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x13u, 0, 0);
    v37 = pkTextWin->m_kWorldBound.m_kCenter.x;
    nPosY = (int)v36;
    v38 = *(_DWORD *)(*(_DWORD *)LODWORD(v37) + 24);
    v39 = *(PgWinText **)(*(_DWORD *)LODWORD(v37) + 20);
    i = v38;
    pkTextWin = v39;
    v40 = Font::Get(MAIN_MENU);
    v41 = PgWinText::CreateWin(uiLeft - v9, uiTop - v10 + 1, (unsigned int)pkTextWin, i, v40, (PgWin *)&v2->vfptr, 0, 0);
    v42 = v41->vfptr;
    pkTextWin = v41;
    v42[122].__vecDelDtor((NiRefObject *)v41, 5u);
    i = (int)&pkTextWin->vfptr[118];
    v43 = TextData::Get(0x4EA49695u);
    (*(void (__thiscall **)(_DWORD, _DWORD))i)(pkTextWin, v43);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v44 = pkTextWin;
    v2->m_pkListName = (PgWinBut *)nPosY;
    v2->m_pkListNameText = v44;
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title02Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title02Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title02Over");
    nPosY = (int)PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x14u, 0, 0);
    v45 = pkTextWin->m_kWorldBound.m_kCenter.x;
    v46 = *(PgWinText **)(*(_DWORD *)LODWORD(v45) + 20);
    i = *(_DWORD *)(*(_DWORD *)LODWORD(v45) + 24);
    pkTextWin = v46;
    v47 = Font::Get(MAIN_MENU);
    v48 = PgWinText::CreateWin(uiLeft - v9, uiTop - v10 + 1, (unsigned int)pkTextWin, i, v47, (PgWin *)&v2->vfptr, 0, 0);
    v49 = v48->vfptr;
    pkTextWin = v48;
    v49[122].__vecDelDtor((NiRefObject *)v48, 5u);
    i = (int)&pkTextWin->vfptr[118];
    v50 = TextData::Get(0x4A5F8BA3u);
    (*(void (__thiscall **)(_DWORD, _DWORD))i)(pkTextWin, v50);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    i = nPosY;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)v2->m_vecTitleType,
      (const unsigned int *)&i);
    i = (int)pkTextWin;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)v2->m_vecTitleType,
      (const unsigned int *)&i);
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title03Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title03Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title03Over");
    v51 = PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x15u, 0, 0);
    v52 = pkTextWin->m_kWorldBound.m_kCenter.x;
    nPosY = (int)v51;
    v53 = *(_DWORD *)(*(_DWORD *)LODWORD(v52) + 24);
    v54 = *(PgWinText **)(*(_DWORD *)LODWORD(v52) + 20);
    i = v53;
    pkTextWin = v54;
    v55 = Font::Get(MAIN_MENU);
    v56 = PgWinText::CreateWin(uiLeft - v9, uiTop - v10 + 1, (unsigned int)pkTextWin, i, v55, (PgWin *)&v2->vfptr, 0, 0);
    v57 = v56->vfptr;
    pkTextWin = v56;
    v57[122].__vecDelDtor((NiRefObject *)v56, 5u);
    i = (int)&pkTextWin->vfptr[118];
    v58 = TextData::Get(0x8BF7ED01);
    (*(void (__thiscall **)(_DWORD, _DWORD))i)(pkTextWin, v58);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    i = nPosY;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)v2->m_vecTitleType,
      (const unsigned int *)&i);
    i = (int)pkTextWin;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)v2->m_vecTitleType,
      (const unsigned int *)&i);
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title04Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title04Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title04Over");
    v59 = PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x16u, 0, 0);
    v60 = pkTextWin->m_kWorldBound.m_kCenter.x;
    nPosY = (int)v59;
    v61 = *(_DWORD *)(*(_DWORD *)LODWORD(v60) + 24);
    v62 = *(PgWinText **)(*(_DWORD *)LODWORD(v60) + 20);
    i = v61;
    pkTextWin = v62;
    v63 = Font::Get(MAIN_MENU);
    v64 = PgWinText::CreateWin(uiLeft - v9, uiTop - v10 + 1, (unsigned int)pkTextWin, i, v63, (PgWin *)&v2->vfptr, 0, 0);
    v65 = v64->vfptr;
    pkTextWin = v64;
    v65[122].__vecDelDtor((NiRefObject *)v64, 5u);
    i = (int)&pkTextWin->vfptr[118];
    v66 = TextData::Get(0x34329AB0u);
    (*(void (__thiscall **)(_DWORD, _DWORD))i)(pkTextWin, v66);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    i = nPosY;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)v2->m_vecTitleType,
      (const unsigned int *)&i);
    i = (int)pkTextWin;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)v2->m_vecTitleType,
      (const unsigned int *)&i);
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "AddFrndNor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "AddFrndClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "AddFrndOver");
    nPosY = (int)PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xCu, 0, 0);
    *(_DWORD *)(nPosY + 272) = g_pkToolTipWin;
    v67 = (char *)TextData2::Get(0x42C080Du);
    PgWin::SetToolTipWinText((PgWin *)nPosY, v67);
    v68 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
    v69 = *(PgWinText **)(v68 + 20);
    i = *(_DWORD *)(v68 + 24);
    pkTextWin = v69;
    v70 = Font::Get(MAIN_MENU);
    v71 = PgWinText::CreateWin(uiLeft - v9, uiTop - v10 + 1, (unsigned int)pkTextWin, i, v70, (PgWin *)&v2->vfptr, 0, 0);
    v72 = v71->vfptr;
    pkTextWin = v71;
    v72[122].__vecDelDtor((NiRefObject *)v71, 5u);
    i = (int)&pkTextWin->vfptr[118];
    v73 = TextData::Get(0x1B50368Cu);
    (*(void (__thiscall **)(_DWORD, _DWORD))i)(pkTextWin, v73);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    i = nPosY;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_vecTabType[1],
      (const unsigned int *)&i);
    i = (int)pkTextWin;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_vecTabType[1],
      (const unsigned int *)&i);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "AddInfoBtnNor",
                               &uiLeft,
                               &uiTop,
                               0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "AddInfoBtnClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "AddInfoBtnOver");
    nPosY = (int)PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xDu, 0, 0);
    *(_DWORD *)(nPosY + 272) = g_pkToolTipWin;
    v74 = (char *)TextData2::Get(0x45322451u);
    PgWin::SetToolTipWinText((PgWin *)nPosY, v74);
    v75 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
    v76 = *(PgWinText **)(v75 + 20);
    i = *(_DWORD *)(v75 + 24);
    pkTextWin = v76;
    v77 = Font::Get(MAIN_MENU);
    v78 = PgWinText::CreateWin(uiLeft - v9, uiTop - v10 + 1, (unsigned int)pkTextWin, i, v77, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkInfoType = v78;
    v78->vfptr[122].__vecDelDtor((NiRefObject *)v78, 5u);
    i = (int)&v2->m_pkInfoType->vfptr[118];
    v79 = TextData::Get(0xD8E95635);
    (*(void (__thiscall **)(_DWORD, _DWORD))i)(v2->m_pkInfoType, v79);
    ((void (__stdcall *)(_DWORD))v2->m_pkInfoType->vfptr[60].__vecDelDtor)(0);
    i = nPosY;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)v2->m_vecTabType,
      (const unsigned int *)&i);
    i = (int)v2->m_pkInfoType;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)v2->m_vecTabType,
      (const unsigned int *)&i);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "ShowAllFrndNor",
                               &uiLeft,
                               &uiTop,
                               0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ShowAllFrndClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ShowAllFrndOver");
    v80 = PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xEu, 0, 0);
    v81 = pkTextWin->m_kWorldBound.m_kCenter.x;
    nPosY = (int)v80;
    v82 = *(_DWORD *)(*(_DWORD *)LODWORD(v81) + 24);
    v83 = *(PgWinText **)(*(_DWORD *)LODWORD(v81) + 20);
    i = v82;
    pkTextWin = v83;
    v84 = Font::Get(MAIN_MENU);
    v85 = PgWinText::CreateWin(uiLeft - v9, uiTop - v10 + 1, (unsigned int)pkTextWin, i, v84, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkShowOnlineOnly = v85;
    v85->vfptr[122].__vecDelDtor((NiRefObject *)v85, 5u);
    i = (int)&v2->m_pkShowOnlineOnly->vfptr[118];
    v86 = TextData::Get(0x39428786u);
    (*(void (__thiscall **)(_DWORD, _DWORD))i)(v2->m_pkShowOnlineOnly, v86);
    ((void (__stdcall *)(_DWORD))v2->m_pkShowOnlineOnly->vfptr[60].__vecDelDtor)(0);
    i = nPosY;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)v2->m_vecTabType,
      (const unsigned int *)&i);
    i = (int)v2->m_pkShowOnlineOnly;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)v2->m_vecTabType,
      (const unsigned int *)&i);
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
    v87 = PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x1Eu, 0, 0);
    v88 = pkTextWin;
    v2->m_pkRejectBtn = v87;
    v89 = *(_DWORD *)LODWORD(v88->m_kWorldBound.m_kCenter.x);
    v90 = *(_DWORD *)(v89 + 20);
    i = *(_DWORD *)(v89 + 24);
    nPosY = v90;
    v91 = Font::Get(0);
    v92 = PgWinText::CreateWin(uiLeft - v9, uiTop - v10 + 1, nPosY, i, v91, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkRejectText = v92;
    v92->vfptr[122].__vecDelDtor((NiRefObject *)v92, 5u);
    i = (int)&v2->m_pkRejectText->vfptr[118];
    v93 = TextData2::Get(0x2D524575u);
    (*(void (__thiscall **)(_DWORD, _DWORD))i)(v2->m_pkRejectText, v93);
    ((void (__stdcall *)(_DWORD))v2->m_pkRejectText->vfptr[60].__vecDelDtor)(0);
    v94 = (char *)TextData2::Get(0x7AB19781u);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkRejectBtn->vfptr, v94);
    v2->m_pkRejectBtn->m_pkToolTipWin = g_pkToolTipWin;
    i = (int)v2->m_pkRejectBtn;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)v2->m_vecTabType,
      (const unsigned int *)&i);
    i = (int)v2->m_pkRejectText;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)v2->m_vecTabType,
      (const unsigned int *)&i);
    v95 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Base", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v95, (PgWin *)&v2->vfptr, 0, 0);
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "FriendNor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "FriendClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "FriendOver");
    nPosY = (int)PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xAu, 0, 0);
    v96 = (char *)TextData::Get(0xDCF3EDF4);
    PgWin::SetToolTipWinText((PgWin *)nPosY, v96);
    *(_DWORD *)(nPosY + 272) = g_pkToolTipWin;
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MasterNor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "MasterClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "MasterOver");
    nPosY = (int)PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x1Cu, 0, 0);
    v97 = (char *)TextData::Get(0xF44C3A3C);
    PgWin::SetToolTipWinText((PgWin *)nPosY, v97);
    *(_DWORD *)(nPosY + 272) = g_pkToolTipWin;
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GuildNor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GuildClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GuildOver");
    nPosY = (int)PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x19u, 0, 0);
    v98 = (char *)TextData::Get(0x9BEAF4F4);
    PgWin::SetToolTipWinText((PgWin *)nPosY, v98);
    *(_DWORD *)(nPosY + 272) = g_pkToolTipWin;
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "WeddingNor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "WeddingClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "WeddingOver");
    nPosY = (int)PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x1Bu, 0, 0);
    v99 = (char *)TextData::Get(0xC8F53F44);
    PgWin::SetToolTipWinText((PgWin *)nPosY, v99);
    *(_DWORD *)(nPosY + 272) = g_pkToolTipWin;
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "PartyMatchNor",
                               &uiLeft,
                               &uiTop,
                               0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "PartyMatchClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "PartyMatchOver");
    nPosY = (int)PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x1Au, 0, 0);
    v100 = (char *)TextData::Get(0x1C4B503Eu);
    PgWin::SetToolTipWinText((PgWin *)nPosY, v100);
    *(_DWORD *)(nPosY + 272) = g_pkToolTipWin;
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "GuildAcademyNor",
                               &uiLeft,
                               &uiTop,
                               0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GuildAcademyClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GuildAcademyOver");
    nPosY = (int)PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x1Du, 0, 0);
    v101 = (char *)TextData::Get(0x253B184Cu);
    PgWin::SetToolTipWinText((PgWin *)nPosY, v101);
    *(_DWORD *)(nPosY + 272) = g_pkToolTipWin;
    v102 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Friend", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
    v103 = v102->m_uiWidth;
    i = v102->m_uiHeight;
    nPosY = v103;
    v104 = Font::Get(TITLEBOLD);
    v105 = PgWinText::CreateWin(uiLeft, uiTop, nPosY, i, v104, (PgWin *)&v2->vfptr, 0, 0);
    v106 = v105->vfptr;
    pkTextWin = v105;
    v106[122].__vecDelDtor((NiRefObject *)v105, 1u);
    i = (int)&pkTextWin->vfptr[118];
    v107 = TextData::Get(0xDCF3EDF4);
    (*(void (__thiscall **)(_DWORD, _DWORD))i)(pkTextWin, v107);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v108 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HolyPromise", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
    v109 = v108->m_pObject->m_uiWidth;
    i = v108->m_pObject->m_uiHeight;
    nPosY = v109;
    v110 = Font::Get(TITLEBOLD);
    v111 = PgWinText::CreateWin(uiLeft, uiTop, nPosY, i, v110, (PgWin *)&v2->vfptr, 0, 0);
    v112 = v111->vfptr;
    pkTextWin = v111;
    v112[122].__vecDelDtor((NiRefObject *)v111, 1u);
    i = (int)&pkTextWin->vfptr[118];
    v113 = TextData::Get(0xF44C3A3C);
    (*(void (__thiscall **)(_DWORD, _DWORD))i)(pkTextWin, v113);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v114 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Guild", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
    v115 = v114->m_pObject->m_uiWidth;
    i = v114->m_pObject->m_uiHeight;
    nPosY = v115;
    v116 = Font::Get(TITLEBOLD);
    v117 = PgWinText::CreateWin(uiLeft, uiTop, nPosY, i, v116, (PgWin *)&v2->vfptr, 0, 0);
    v118 = v117->vfptr;
    pkTextWin = v117;
    v118[122].__vecDelDtor((NiRefObject *)v117, 1u);
    i = (int)&pkTextWin->vfptr[118];
    v119 = TextData::Get(0x9BEAF4F4);
    (*(void (__thiscall **)(_DWORD, _DWORD))i)(pkTextWin, v119);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v120 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Wedding", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
    v121 = v120->m_pObject->m_uiWidth;
    i = v120->m_pObject->m_uiHeight;
    nPosY = v121;
    v122 = Font::Get(TITLEBOLD);
    v123 = PgWinText::CreateWin(uiLeft, uiTop, nPosY, i, v122, (PgWin *)&v2->vfptr, 0, 0);
    v124 = v123->vfptr;
    pkTextWin = v123;
    v124[122].__vecDelDtor((NiRefObject *)v123, 1u);
    i = (int)&pkTextWin->vfptr[118];
    v125 = TextData::Get(0xC8F53F44);
    (*(void (__thiscall **)(_DWORD, _DWORD))i)(pkTextWin, v125);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v126 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GuildAcademy", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
    v127 = v126->m_pObject->m_uiWidth;
    i = v126->m_pObject->m_uiHeight;
    nPosY = v127;
    v128 = Font::Get(TITLEBOLD);
    v129 = PgWinText::CreateWin(uiLeft, uiTop, nPosY, i, v128, (PgWin *)&v2->vfptr, 0, 0);
    v130 = v129->vfptr;
    pkTextWin = v129;
    v130[122].__vecDelDtor((NiRefObject *)v129, 1u);
    i = (int)&pkTextWin->vfptr[118];
    v131 = TextData::Get(0x253B184Cu);
    (*(void (__thiscall **)(_DWORD, _DWORD))i)(pkTextWin, v131);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v132 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PartyMatch", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
    v133 = v132->m_pObject->m_uiWidth;
    i = v132->m_pObject->m_uiHeight;
    nPosY = v133;
    v134 = Font::Get(TITLEBOLD);
    v135 = PgWinText::CreateWin(uiLeft, uiTop, nPosY, i, v134, (PgWin *)&v2->vfptr, 0, 0);
    v136 = v135->vfptr;
    pkTextWin = v135;
    v136[122].__vecDelDtor((NiRefObject *)v135, 1u);
    i = (int)&pkTextWin->vfptr[118];
    v137 = TextData::Get(0x1C4B503Eu);
    (*(void (__thiscall **)(_DWORD, _DWORD))i)(pkTextWin, v137);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "List_Tab_Off",
                               &uiLeft,
                               &uiTop,
                               0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "List_Tab_On");
    v138 = ColumnBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x20u, 0);
    v139 = pkTextWin;
    v2->m_pkListTab = v138;
    v138->m_bCheck = 1;
    v140 = *(_DWORD *)LODWORD(v139->m_kWorldBound.m_kCenter.x);
    v141 = *(_DWORD *)(v140 + 20);
    i = *(_DWORD *)(v140 + 24);
    nPosY = v141;
    v142 = Font::Get(MAIN_MENU);
    v143 = PgWinText::CreateWin(uiLeft, uiTop, nPosY, i, v142, (PgWin *)&v2->vfptr, 0, 0);
    v144 = v143->vfptr;
    pkTextWin = v143;
    v144[122].__vecDelDtor((NiRefObject *)v143, 5u);
    i = (int)&pkTextWin->vfptr[118];
    v145 = TextData3::Get(0x73938387u);
    (*(void (__thiscall **)(_DWORD, _DWORD))i)(pkTextWin, v145);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "Find_Tab_Off",
                               &uiLeft,
                               &uiTop,
                               0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Find_Tab_On");
    v146 = ColumnBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x21u, 0);
    v147 = pkTextWin;
    v2->m_pkFindTab = v146;
    v146->m_bCheck = 0;
    v148 = *(_DWORD *)LODWORD(v147->m_kWorldBound.m_kCenter.x);
    v149 = *(_DWORD *)(v148 + 20);
    i = *(_DWORD *)(v148 + 24);
    nPosY = v149;
    v150 = Font::Get(MAIN_MENU);
    v151 = PgWinText::CreateWin(uiLeft, uiTop, nPosY, i, v150, (PgWin *)&v2->vfptr, 0, 0);
    v152 = v151->vfptr;
    pkTextWin = v151;
    v152[122].__vecDelDtor((NiRefObject *)v151, 5u);
    i = (int)&pkTextWin->vfptr[118];
    v153 = TextData3::Get(0x738D7382u);
    (*(void (__thiscall **)(_DWORD, _DWORD))i)(pkTextWin, v153);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "MoreInfoTitle01Nor",
                               &uiLeft,
                               &uiTop,
                               0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "MoreInfoTitle01Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "MoreInfoTitle01Over");
    v154 = PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x28u, 0, 0);
    v155 = v154->vfptr;
    nPosY = (int)v154;
    v155[64].__vecDelDtor((NiRefObject *)v154, 0);
    v156 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
    v157 = *(PgWinText **)(v156 + 20);
    i = *(_DWORD *)(v156 + 24);
    pkTextWin = v157;
    v158 = Font::Get(MAIN_MENU);
    v159 = PgWinText::CreateWin(
             uiLeft - v9,
             uiTop - v10 + 1,
             (unsigned int)pkTextWin,
             i,
             v158,
             (PgWin *)&v2->vfptr,
             0,
             0);
    v160 = v159->vfptr;
    pkTextWin = v159;
    v160[122].__vecDelDtor((NiRefObject *)v159, 5u);
    i = (int)&pkTextWin->vfptr[118];
    v161 = TextData::Get(0xDE033F4D);
    (*(void (__thiscall **)(_DWORD, _DWORD))i)(pkTextWin, v161);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[64].__vecDelDtor)(0);
    i = nPosY;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_vecTitleType[1],
      (const unsigned int *)&i);
    i = (int)pkTextWin;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_vecTitleType[1],
      (const unsigned int *)&i);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "MoreInfoTitle02Nor",
                               &uiLeft,
                               &uiTop,
                               0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "MoreInfoTitle02Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "MoreInfoTitle02Over");
    v162 = PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x29u, 0, 0);
    v163 = v162->vfptr;
    nPosY = (int)v162;
    v163[64].__vecDelDtor((NiRefObject *)v162, 0);
    v164 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
    v165 = *(PgWinText **)(v164 + 20);
    i = *(_DWORD *)(v164 + 24);
    pkTextWin = v165;
    v166 = Font::Get(MAIN_MENU);
    v167 = PgWinText::CreateWin(
             uiLeft - v9,
             uiTop - v10 + 1,
             (unsigned int)pkTextWin,
             i,
             v166,
             (PgWin *)&v2->vfptr,
             0,
             0);
    v168 = v167->vfptr;
    pkTextWin = v167;
    v168[122].__vecDelDtor((NiRefObject *)v167, 5u);
    i = (int)&pkTextWin->vfptr[118];
    v169 = TextData::Get(0xE7495037);
    (*(void (__thiscall **)(_DWORD, _DWORD))i)(pkTextWin, v169);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[64].__vecDelDtor)(0);
    i = nPosY;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_vecTitleType[1],
      (const unsigned int *)&i);
    i = (int)pkTextWin;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_vecTitleType[1],
      (const unsigned int *)&i);
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "UseBtnNor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "UseBtnClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "UseBtnOver");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "UseBtnDis");
    v170 = PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x22u, 0, 0);
    v171 = pkTextWin;
    v2->m_pFriendPointUseBut = v170;
    v172 = *(_DWORD *)LODWORD(v171->m_kWorldBound.m_kCenter.x);
    v173 = *(_DWORD *)(v172 + 20);
    i = *(_DWORD *)(v172 + 24);
    nPosY = v173;
    v174 = Font::Get(MAIN_MENU);
    v175 = PgWinText::CreateWin(uiLeft - v9, uiTop - v10 + 1, nPosY, i, v174, (PgWin *)&v2->vfptr, 0, 0);
    v176 = v175->vfptr;
    pkTextWin = v175;
    v176[122].__vecDelDtor((NiRefObject *)v175, 5u);
    i = (int)&pkTextWin->vfptr[118];
    v177 = TextData3::Get(0xC8E5EF29);
    (*(void (__thiscall **)(_DWORD, _DWORD))i)(pkTextWin, v177);
    v2->m_pFriendPointUseBut->m_pkToolTipWin = g_pkToolTipWin;
    v178 = v2->m_uiFriendUsePoint;
    v179 = (char *)TextData3::Get(0xDAFD1A23);
    v180 = fs(v179, v178);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pFriendPointUseBut->vfptr, v180);
    ((void (__stdcall *)(_DWORD))v2->m_pFriendPointUseBut->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "FriendHelpNor",
                               &uiLeft,
                               &uiTop,
                               0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "FriendHelpClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "FriendHelpOver");
    PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x23u, 0, 0);
    SLWCreateInfo::Clear(&kCreateInfo);
    v181 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
    v181->nItemType = 1;
    v181->pNode = spNode.m_pObject;
    nPosY = (int)v181;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &v262,
      "FindColumnBarNor");
    LOBYTE(v276) = 11;
    nPosY += 72;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)nPosY,
      &v262);
    LOBYTE(v276) = 1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v262);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &v274,
      "FindColumnBarClick");
    LOBYTE(v276) = 12;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)nPosY,
      &v274);
    LOBYTE(v276) = 1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v274);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &v273,
      "FindColumnBarOver");
    LOBYTE(v276) = 13;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)nPosY,
      &v273);
    LOBYTE(v276) = 1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v273);
    nPosY = (int)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    *(_DWORD *)nPosY = 2;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &v272,
      "FindColumn00");
    LOBYTE(v276) = 14;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)(nPosY + 72),
      &v272);
    LOBYTE(v276) = 1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v272);
    v182 = nPosY;
    *(NiPointer<NiNode> *)(nPosY + 4) = spNode;
    *(_BYTE *)(v182 + 88) = 1;
    nPosY = (int)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    *(_DWORD *)nPosY = 2;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &v268,
      "FindColumn01");
    LOBYTE(v276) = 15;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)(nPosY + 72),
      &v268);
    LOBYTE(v276) = 1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v268);
    v183 = nPosY;
    *(NiPointer<NiNode> *)(nPosY + 4) = spNode;
    *(_BYTE *)(v183 + 88) = 1;
    nPosY = (int)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    *(_DWORD *)nPosY = 2;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &v264,
      "FindColumn02");
    LOBYTE(v276) = 16;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)(nPosY + 72),
      &v264);
    LOBYTE(v276) = 1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v264);
    v184 = nPosY;
    *(NiPointer<NiNode> *)(nPosY + 4) = spNode;
    *(_BYTE *)(v184 + 88) = 1;
    nPosY = (int)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    *(_DWORD *)nPosY = 2;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &v266,
      "FindColumn03");
    LOBYTE(v276) = 17;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)(nPosY + 72),
      &v266);
    LOBYTE(v276) = 1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v266);
    v185 = nPosY;
    *(NiPointer<NiNode> *)(nPosY + 4) = spNode;
    *(_BYTE *)(v185 + 88) = 1;
    SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
    v186 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "FindPlane01", &uiLeft, &uiTop, 0);
    v187 = SlideListWin::CreateWin(uiLeft - v9, uiTop - v10, v186, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
    v2->m_pkFindWin = v187;
    v187->m_uiLClickMsg = 24;
    v2->m_pkFindWin->m_uiRClickMsg = 23;
    SlideListWin::UpdateViewList(v2->m_pkFindWin);
    ((void (__stdcall *)(_DWORD))v2->m_pkFindWin->vfptr[64].__vecDelDtor)(0);
    i = (int)v2->m_pkFindWin;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_vecTabType[1],
      (const unsigned int *)&i);
    SLWCreateInfo::Clear(&kCreateInfo);
    v188 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
    v188->nItemType = 1;
    v188->pNode = spNode.m_pObject;
    nPosY = (int)v188;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &v271,
      "InviteColumnBarNor");
    LOBYTE(v276) = 18;
    nPosY += 72;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)nPosY,
      &v271);
    LOBYTE(v276) = 1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v271);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &v269,
      "InviteColumnBarClick");
    LOBYTE(v276) = 19;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)nPosY,
      &v269);
    LOBYTE(v276) = 1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v269);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &v267,
      "InviteColumnBarOver");
    LOBYTE(v276) = 20;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)nPosY,
      &v267);
    LOBYTE(v276) = 1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v267);
    nPosY = (int)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    *(_DWORD *)nPosY = 2;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &v265,
      "InviteColumn00");
    LOBYTE(v276) = 21;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)(nPosY + 72),
      &v265);
    LOBYTE(v276) = 1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v265);
    v189 = nPosY;
    *(NiPointer<NiNode> *)(nPosY + 4) = spNode;
    *(_BYTE *)(v189 + 88) = 1;
    nPosY = (int)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    *(_DWORD *)nPosY = 2;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &v263,
      "InviteColumn01");
    LOBYTE(v276) = 22;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)(nPosY + 72),
      &v263);
    LOBYTE(v276) = 1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v263);
    v190 = nPosY;
    *(NiPointer<NiNode> *)(nPosY + 4) = spNode;
    *(_BYTE *)(v190 + 88) = 1;
    nPosY = (int)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    *(_DWORD *)nPosY = 2;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &v261,
      "InviteColumn02");
    LOBYTE(v276) = 23;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)(nPosY + 72),
      &v261);
    LOBYTE(v276) = 1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v261);
    v191 = nPosY;
    *(NiPointer<NiNode> *)(nPosY + 4) = spNode;
    *(_BYTE *)(v191 + 88) = 1;
    nPosY = (int)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    *(_DWORD *)nPosY = 2;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &v270,
      "InviteColumn03");
    LOBYTE(v276) = 24;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)(nPosY + 72),
      &v270);
    LOBYTE(v276) = 1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v270);
    v192 = nPosY;
    *(NiPointer<NiNode> *)(nPosY + 4) = spNode;
    *(_BYTE *)(v192 + 88) = 1;
    SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
    v193 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "InvitePlane", &uiLeft, &uiTop, 0);
    v194 = SlideListWin::CreateWin(uiLeft - v9, uiTop - v10, v193, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
    v2->m_pkInviterWin = v194;
    v194->m_uiLClickMsg = 38;
    v2->m_pkInviterWin->m_uiRClickMsg = 39;
    SlideListWin::UpdateViewList(v2->m_pkInviterWin);
    ((void (__stdcall *)(_DWORD))v2->m_pkInviterWin->vfptr[64].__vecDelDtor)(0);
    SlideListWin::SetToolTipWin(v2->m_pkInviterWin, g_pkToolTipWin);
    v195 = (char *)TextData3::Get(0x8D969DD1);
    SlideListWin::SetToolTipWinText(v2->m_pkInviterWin, 0, v195);
    i = (int)v2->m_pkInviterWin;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_vecTabType[1],
      (const unsigned int *)&i);
    v196 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle", &uiLeft, &uiTop, 0);
    v197 = SlideBar::CreateWin(
             spNode.m_pObject,
             "FindSlideBar",
             "FindSlideBar_UpBtn",
             "FindSlideBar_DnBtn",
             v196,
             0,
             (PgWin *)&v2->vfptr);
    v2->m_pkFindBar = v197;
    v197->m_uiClickMsg = 16;
    v2->m_pkFindBar->m_eType = 1;
    ((void (__stdcall *)(_DWORD))v2->m_pkFindBar->vfptr[64].__vecDelDtor)(0);
    i = (int)v2->m_pkFindBar;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_vecTabType[1],
      (const unsigned int *)&i);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "FindTitle00Nor",
                               &uiLeft,
                               &uiTop,
                               0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "FindTitle00Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "FindTitle00Over");
    nPosY = (int)PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x13u, 0, 0);
    v198 = pkTextWin->m_kWorldBound.m_kCenter.x;
    v199 = *(PgWinText **)(*(_DWORD *)LODWORD(v198) + 20);
    i = *(_DWORD *)(*(_DWORD *)LODWORD(v198) + 24);
    pkTextWin = v199;
    v200 = Font::Get(MAIN_MENU);
    v201 = PgWinText::CreateWin(
             uiLeft - v9,
             uiTop - v10 + 1,
             (unsigned int)pkTextWin,
             i,
             v200,
             (PgWin *)&v2->vfptr,
             0,
             0);
    v202 = v201->vfptr;
    pkTextWin = v201;
    v202[122].__vecDelDtor((NiRefObject *)v201, 5u);
    i = (int)&pkTextWin->vfptr[118];
    v203 = TextData::Get(0x4EA49695u);
    (*(void (__thiscall **)(_DWORD, _DWORD))i)(pkTextWin, v203);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    (*(void (__stdcall **)(_DWORD))(*(_DWORD *)nPosY + 256))(0);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[64].__vecDelDtor)(0);
    i = nPosY;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_vecTitleType[2],
      (const unsigned int *)&i);
    i = (int)pkTextWin;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_vecTitleType[2],
      (const unsigned int *)&i);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "FindTitle01Nor",
                               &uiLeft,
                               &uiTop,
                               0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "FindTitle01Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "FindTitle01Over");
    v204 = PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x14u, 0, 0);
    v205 = pkTextWin->m_kWorldBound.m_kCenter.x;
    nPosY = (int)v204;
    v206 = *(_DWORD *)(*(_DWORD *)LODWORD(v205) + 24);
    v207 = *(PgWinText **)(*(_DWORD *)LODWORD(v205) + 20);
    i = v206;
    pkTextWin = v207;
    v208 = Font::Get(MAIN_MENU);
    v209 = PgWinText::CreateWin(
             uiLeft - v9,
             uiTop - v10 + 1,
             (unsigned int)pkTextWin,
             i,
             v208,
             (PgWin *)&v2->vfptr,
             0,
             0);
    v210 = v209->vfptr;
    pkTextWin = v209;
    v210[122].__vecDelDtor((NiRefObject *)v209, 5u);
    i = (int)&pkTextWin->vfptr[118];
    v211 = TextData::Get(0x96B28AA0);
    (*(void (__thiscall **)(_DWORD, _DWORD))i)(pkTextWin, v211);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    (*(void (__stdcall **)(_DWORD))(*(_DWORD *)nPosY + 256))(0);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[64].__vecDelDtor)(0);
    i = nPosY;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_vecTitleType[2],
      (const unsigned int *)&i);
    i = (int)pkTextWin;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_vecTitleType[2],
      (const unsigned int *)&i);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "FindTitle02Nor",
                               &uiLeft,
                               &uiTop,
                               0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "FindTitle02Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "FindTitle02Over");
    v212 = PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x15u, 0, 0);
    v213 = pkTextWin->m_kWorldBound.m_kCenter.x;
    nPosY = (int)v212;
    v214 = *(_DWORD *)(*(_DWORD *)LODWORD(v213) + 24);
    v215 = *(PgWinText **)(*(_DWORD *)LODWORD(v213) + 20);
    i = v214;
    pkTextWin = v215;
    v216 = Font::Get(MAIN_MENU);
    v217 = PgWinText::CreateWin(
             uiLeft - v9,
             uiTop - v10 + 1,
             (unsigned int)pkTextWin,
             i,
             v216,
             (PgWin *)&v2->vfptr,
             0,
             0);
    v218 = v217->vfptr;
    pkTextWin = v217;
    v218[122].__vecDelDtor((NiRefObject *)v217, 5u);
    i = (int)&pkTextWin->vfptr[118];
    v219 = TextData::Get(0x98A49F99);
    (*(void (__thiscall **)(_DWORD, _DWORD))i)(pkTextWin, v219);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    (*(void (__stdcall **)(_DWORD))(*(_DWORD *)nPosY + 256))(0);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[64].__vecDelDtor)(0);
    i = nPosY;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_vecTitleType[2],
      (const unsigned int *)&i);
    i = (int)pkTextWin;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_vecTitleType[2],
      (const unsigned int *)&i);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "FindTitle03Nor",
                               &uiLeft,
                               &uiTop,
                               0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "FindTitle03Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "FindTitle03Over");
    v220 = PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0, 0, 0);
    v221 = v220->vfptr;
    nPosY = (int)v220;
    v221[64].__vecDelDtor((NiRefObject *)v220, 0);
    i = nPosY;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_vecTitleType[2],
      (const unsigned int *)&i);
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "Frind_Point_Text",
      &uiLeft,
      &uiTop,
      &uiWidth,
      &uiHeight);
    v222 = Font::Get(MAIN_MENU);
    v223 = PgWinText::CreateWin(uiLeft - v9, uiTop - v10, uiWidth, uiHeight, v222, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkFriendPointText = v223;
    v223->vfptr[122].__vecDelDtor((NiRefObject *)v223, 5u);
    v224 = v2->m_uiFriendPoint;
    i = (int)&v2->m_pkFriendPointText->vfptr[118];
    v225 = (char *)TextData3::Get(0x9BE4C2CD);
    v226 = fs(v225, v224);
    (*(void (__thiscall **)(PgWinText *, char *))i)(v2->m_pkFriendPointText, v226);
    ((void (__stdcall *)(_DWORD))v2->m_pkFriendPointText->vfptr[60].__vecDelDtor)(0);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "FirendAddNor",
                               &uiLeft,
                               &uiTop,
                               0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "FirendAddOver");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "FirendAddClick");
    i = 0;
    nPosY = (int)v2->m_pkAddBtn;
    do
    {
      v227 = PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x24u, 0, 0);
      *(_DWORD *)nPosY = v227;
      v227->vfptr[60].__vecDelDtor((NiRefObject *)v227, 0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)nPosY + 256))(0);
      (*(void (__stdcall **)(int))(**(_DWORD **)nPosY + 520))(i);
      nPosY += 4;
      ++i;
    }
    while ( i < 27 );
    v228 = PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x25u, 0, 0);
    v2->m_pkInviterBtn = v228;
    v228->vfptr[60].__vecDelDtor((NiRefObject *)v228, 0);
    ((void (__stdcall *)(_DWORD))v2->m_pkInviterBtn->vfptr[64].__vecDelDtor)(0);
    v229 = SlideListWin::GetColumPosX(v2->m_pkInviterWin, 0, 3u);
    v230 = v2->m_pkInviterWin;
    i = v229 + 33;
    v231 = SlideListWin::GetColumPosY(v230, 0, 3u);
    v232 = v2->m_pkInviterBtn->vfptr[43].__vecDelDtor;
    nPosY = v231 + 1;
    ((void (__stdcall *)(int))v232)(i);
    ((void (__stdcall *)(int))v2->m_pkInviterBtn->vfptr[44].__vecDelDtor)(nPosY);
    v233 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ToolTip", &uiLeft, &uiTop, 0);
    v234 = PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v233, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkToolTip = v234;
    v234->m_pkToolTipWin = g_pkToolTipWin;
    v235 = (char *)TextData3::Get(0x94A1E2CD);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkToolTip->vfptr, v235);
    i = (int)v2->m_pkToolTip;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_vecTitleType[2],
      (const unsigned int *)&i);
    v236 = MenuTexMgr::GetTexture(1u);
    v237 = PopupMenuWin::CreateWin(v236, 4u, 4u, 0);
    v2->m_spPopupMenu = v237;
    ((void (__stdcall *)(IDirectMessengerVtbl **))v237->vfptr->SetMsgHooker)(&v2->vfptr);
    PopupMenuWin::Clear(v2->m_spPopupMenu);
    v238 = (char *)TextData::Get(0x2B3D9AB4u);
    v239 = PopupMenuText::CreateWin(v238, 0, 0, 0, 0, 0, 0);
    PopupMenu::SetClickEvent((PopupMenu *)&v239->vfptr, 20, 0);
    PopupMenuWin::AddMenu(v2->m_spPopupMenu, (int)&v2->vfptr, (PopupMenu *)&v239->vfptr);
    v240 = (char *)TextData::Get(0xBEEF0012);
    v241 = PopupMenuText::CreateWin(v240, 0, 0, 0, 0, 0, 0);
    PopupMenu::SetClickEvent((PopupMenu *)&v241->vfptr, 21, 0);
    PopupMenuWin::AddMenu(v2->m_spPopupMenu, (int)&v2->vfptr, (PopupMenu *)&v241->vfptr);
    v242 = (char *)TextData::Get(0x98E9FBEC);
    v243 = PopupMenuText::CreateWin(v242, 0, 0, 0, 0, 0, 0);
    PopupMenu::SetClickEvent((PopupMenu *)&v243->vfptr, 18, 0);
    PopupMenuWin::AddMenu(v2->m_spPopupMenu, (int)&v2->vfptr, (PopupMenu *)&v243->vfptr);
    PopupMenuWin::FinishMenu(v2->m_spPopupMenu, 0);
    ((void (__stdcall *)(_DWORD))v2->m_spPopupMenu->vfptr[64].__vecDelDtor)(0);
    v244 = MenuTexMgr::GetTexture(1u);
    v245 = PopupMenuWin::CreateWin(v244, 4u, 4u, 0);
    v2->m_spFindPopupMenu = v245;
    ((void (__stdcall *)(IDirectMessengerVtbl **))v245->vfptr->SetMsgHooker)(&v2->vfptr);
    PopupMenuWin::Clear(v2->m_spFindPopupMenu);
    v246 = (char *)TextData::Get(0x2B3D9AB4u);
    v247 = PopupMenuText::CreateWin(v246, 0, 0, 0, 0, 0, 0);
    PopupMenu::SetClickEvent((PopupMenu *)&v247->vfptr, 20, 0);
    PopupMenuWin::AddMenu(v2->m_spFindPopupMenu, (int)v247, (PopupMenu *)&v247->vfptr);
    v248 = (char *)TextData::Get(0xBEEF0012);
    v249 = PopupMenuText::CreateWin(v248, 0, 0, 0, 0, 0, 0);
    PopupMenu::SetClickEvent((PopupMenu *)&v249->vfptr, 21, 0);
    PopupMenuWin::AddMenu(v2->m_spFindPopupMenu, (int)v249, (PopupMenu *)&v249->vfptr);
    PopupMenuWin::FinishMenu(v2->m_spFindPopupMenu, 0);
    ((void (__stdcall *)(_DWORD))v2->m_spFindPopupMenu->vfptr[64].__vecDelDtor)(0);
    v250 = FriendPointTipMsg::CreateWin();
    v2->m_pkFriendPointTipMsg = (PgWin *)v250;
    if ( !v250 )
    {
      LOBYTE(v276) = 0;
      SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
      goto LABEL_15;
    }
    v250->vfptr[64].__vecDelDtor((NiRefObject *)v250, 0);
    ((void (__thiscall *)(FriendWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.40000001,
      0.5);
    LOBYTE(v276) = 0;
    SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
    v251 = spNode.m_pObject;
    v276 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v251 )
      v251->vfptr->__vecDelDtor((NiRefObject *)v251, 1u);
    result = 1;
  }
  else
  {
    v276 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005008A0) --------------------------------------------------------
void __thiscall PgTQueue<PgWinMgr::PgWinMsg>::Realloc(PgTQueue<PgWinMgr::PgWinMsg> *this, unsigned int uiNewSize)
{
  PgTQueue<PgWinMgr::PgWinMsg> *v2; // esi@1
  PgWinMgr::PgWinMsg *v3; // eax@1
  unsigned int v4; // edi@1
  unsigned int v5; // edx@1
  int v6; // ebx@3
  PgWinMgr::PgWinMsg *v7; // ecx@3
  int v8; // eax@4
  int v9; // edi@6
  int v10; // ecx@7
  int v11; // eax@8
  int v12; // edi@10
  PgWinMgr::PgWinMsg *v13; // ecx@10
  int v14; // eax@11
  PgWinMgr::PgWinMsg *v15; // ST00_4@12
  PgWinMgr::PgWinMsg *pNewBase; // [sp+Ch] [bp-8h]@1
  unsigned int i; // [sp+10h] [bp-4h]@3
  unsigned int ia; // [sp+10h] [bp-4h]@6
  unsigned int ib; // [sp+10h] [bp-4h]@10

  v2 = this;
  v3 = (PgWinMgr::PgWinMsg *)operator new[](16 * uiNewSize);
  v4 = v2->m_uiHead;
  v5 = 0;
  pNewBase = v3;
  if ( v4 < v2->m_uiTail )
  {
    ib = v2->m_uiHead;
    v12 = v4;
    v13 = v3;
    do
    {
      v14 = (int)&v2->m_pBase[v12];
      v13->m_pkWin = v2->m_pBase[v12].m_pkWin;
      v13->m_Msg = *(_DWORD *)(v14 + 4);
      v13->m_wParam = *(_DWORD *)(v14 + 8);
      v13->m_lParam = *(_DWORD *)(v14 + 12);
      ++v5;
      ++v13;
      ++v12;
      ++ib;
    }
    while ( ib < v2->m_uiTail );
  }
  else
  {
    if ( v4 < v2->m_uiAlloced )
    {
      v6 = 16 * v4;
      i = 16 * v4;
      v7 = v3;
      do
      {
        v8 = (int)v2->m_pBase + v6;
        v7->m_pkWin = *(PgWin **)v8;
        v7->m_Msg = *(_DWORD *)(v8 + 4);
        v7->m_wParam = *(_DWORD *)(v8 + 8);
        v7->m_lParam = *(_DWORD *)(v8 + 12);
        ++v4;
        v6 = i + 16;
        ++v5;
        ++v7;
        i += 16;
      }
      while ( v4 < v2->m_uiAlloced );
      v3 = pNewBase;
    }
    v9 = 0;
    ia = 0;
    if ( v2->m_uiTail )
    {
      v10 = (int)&v3[v5];
      do
      {
        v11 = (int)&v2->m_pBase[v9];
        *(_DWORD *)v10 = v2->m_pBase[v9].m_pkWin;
        *(_DWORD *)(v10 + 4) = *(_DWORD *)(v11 + 4);
        *(_DWORD *)(v10 + 8) = *(_DWORD *)(v11 + 8);
        *(_DWORD *)(v10 + 12) = *(_DWORD *)(v11 + 12);
        ++v5;
        v10 += 16;
        ++v9;
        ++ia;
      }
      while ( ia < v2->m_uiTail );
    }
  }
  v2->m_uiTail = v5;
  v15 = v2->m_pBase;
  v2->m_uiHead = 0;
  v2->m_uiAlloced = uiNewSize;
  operator delete[](v15);
  v2->m_pBase = pNewBase;
}

//----- (005009C0) --------------------------------------------------------
FriendAddWin *__thiscall FriendAddWin::`vector deleting destructor'(FriendAddWin *this, unsigned int a2)
{
  FriendAddWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&FriendAddWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&FriendAddWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98AFB8: using guessed type void (__thiscall *FriendAddWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98AFD4: using guessed type int (__thiscall *FriendAddWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00500A00) --------------------------------------------------------
FriendPointTipMsg *__thiscall FriendPointTipMsg::`scalar deleting destructor'(FriendPointTipMsg *this, unsigned int a2)
{
  FriendPointTipMsg *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&FriendPointTipMsg::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&FriendPointTipMsg::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98B1F8: using guessed type void (__thiscall *FriendPointTipMsg::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98B214: using guessed type int (__thiscall *FriendPointTipMsg::`vftable'{for `NiNode'})(void *p, char);

//----- (00500A40) --------------------------------------------------------
int __thiscall SlideListWin::GetColumPosX(SlideListWin *this, unsigned int uiIndex, unsigned int uiColumn)
{
  SlideListWin *v3; // esi@1
  unsigned int v4; // eax@1
  ColumnBut *v5; // ecx@2
  PgWinText *v6; // edi@3
  int result; // eax@4
  int v8; // ebx@7
  int v9; // edi@7

  v3 = this;
  v4 = this->m_vecButList._Mylast - this->m_vecButList._Myfirst;
  if ( uiIndex < v4
    && (v5 = this->m_vecButList._Myfirst[uiIndex], uiColumn < v5->m_vecTextWin._Mylast - v5->m_vecTextWin._Myfirst)
    && (v6 = v5->m_vecTextWin._Myfirst[uiColumn]) != 0
    && (signed int)uiIndex < (signed int)v4
    && v5 )
  {
    v8 = ((int (*)(void))v5->vfptr[41].__vecDelDtor)();
    v9 = v8 + ((int (__thiscall *)(PgWinText *))v6->vfptr[41].__vecDelDtor)(v6);
    result = v9 + ((int (__thiscall *)(SlideListWin *))v3->vfptr[41].__vecDelDtor)(v3);
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00500AD0) --------------------------------------------------------
int __thiscall SlideListWin::GetColumPosY(SlideListWin *this, unsigned int uiIndex, unsigned int uiColumn)
{
  SlideListWin *v3; // esi@1
  unsigned int v4; // eax@1
  ColumnBut *v5; // ecx@2
  PgWinText *v6; // edi@3
  int result; // eax@4
  int v8; // ebx@7
  int v9; // edi@7

  v3 = this;
  v4 = this->m_vecButList._Mylast - this->m_vecButList._Myfirst;
  if ( uiIndex < v4
    && (v5 = this->m_vecButList._Myfirst[uiIndex], uiColumn < v5->m_vecTextWin._Mylast - v5->m_vecTextWin._Myfirst)
    && (v6 = v5->m_vecTextWin._Myfirst[uiColumn]) != 0
    && (signed int)uiIndex < (signed int)v4
    && v5 )
  {
    v8 = ((int (*)(void))v5->vfptr[42].__vecDelDtor)();
    v9 = v8 + ((int (__thiscall *)(PgWinText *))v6->vfptr[42].__vecDelDtor)(v6);
    result = v9 + ((int (__thiscall *)(SlideListWin *))v3->vfptr[42].__vecDelDtor)(v3);
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00500B60) --------------------------------------------------------
void __thiscall PgTQueue<PgWinMgr::PgWinMsg>::Add(PgTQueue<PgWinMgr::PgWinMsg> *this, PgWinMgr::PgWinMsg element)
{
  PgTQueue<PgWinMgr::PgWinMsg> *v2; // esi@1
  unsigned int v3; // eax@1
  PgWinMgr::PgWinMsg *v4; // eax@2

  v2 = this;
  v3 = this->m_uiHead;
  if ( v3 == -1 )
  {
    v4 = this->m_pBase;
    this->m_uiHead = 0;
    *v4 = element;
    this->m_uiTail = 1;
  }
  else
  {
    if ( v3 == this->m_uiTail )
      PgTQueue<PgWinMgr::PgWinMsg>::Realloc(this, 2 * this->m_uiAlloced);
    v2->m_pBase[v2->m_uiTail++] = element;
  }
  if ( v2->m_uiTail == v2->m_uiAlloced )
    v2->m_uiTail = 0;
}

//----- (00500BE0) --------------------------------------------------------
FriendWin *__thiscall FriendWin::`scalar deleting destructor'(FriendWin *this, unsigned int a2)
{
  FriendWin *v2; // esi@1

  v2 = this;
  FriendWin::~FriendWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00500C10) --------------------------------------------------------
void __thiscall FullMapWin::OnShowGrid(FullMapWin *this)
{
  char *v1; // esi@1
  signed int v2; // edi@1

  v1 = (char *)this->m_pkGridSprWin;
  v2 = 22;
  if ( (unsigned __int8)((int (*)(void))this->m_pkGridSprWin[0]->vfptr[65].__vecDelDtor)() )
  {
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v1 + 256))(0);
      v1 += 4;
      --v2;
    }
    while ( v2 );
  }
  else
  {
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v1 + 256))(1);
      v1 += 4;
      --v2;
    }
    while ( v2 );
  }
}

//----- (00500C70) --------------------------------------------------------
char __thiscall FullMapWin::GetWinPos(FullMapWin *this, float fCharWorldX, float fCharWorldY, float *rfXPos, float *rfYPos)
{
  char result; // al@1

  *rfXPos = (0.02 * fCharWorldX / this->m_fFullMapScale - this->m_fMapOffsetX) * this->m_fMapScaleX;
  result = 1;
  *rfYPos = (512.0 - 0.02 * fCharWorldY / this->m_fFullMapScale - this->m_fMapOffsetY) * this->m_fMapScaleY;
  return result;
}

//----- (00500CC0) --------------------------------------------------------
void __thiscall FullMapWin::OnDestroy(FullMapWin *this)
{
  PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkWorldMapWin->vfptr);
}

//----- (00500CE0) --------------------------------------------------------
WorldMapWin *__thiscall FullMapWin::GetWorldMap(FullMapWin *this)
{
  return this->m_pkWorldMapWin;
}

//----- (00500CF0) --------------------------------------------------------
void __thiscall FullMapWin::CloseWorldMap(FullMapWin *this)
{
  FullMapWin *v1; // esi@1

  v1 = this;
  if ( (unsigned __int8)((int (*)(void))this->m_pkWorldMapWin->vfptr[65].__vecDelDtor)() )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkWorldMapWin->vfptr);
}

//----- (00500D20) --------------------------------------------------------
void __thiscall FullMapWin::OnShowIndexList(FullMapWin *this)
{
  FullMapWin *v1; // esi@1
  char v2; // al@1
  void *(__thiscall *v3)(NiRefObject *, unsigned int); // edx@1
  int v4; // esi@2
  signed int v5; // edi@2
  int v6; // esi@7
  signed int v7; // edi@7

  v1 = this;
  v2 = ((int (*)(void))this->m_pkIndexPanel[0]->vfptr[65].__vecDelDtor)();
  v3 = v1->m_pkIndexPanel[0]->vfptr[64].__vecDelDtor;
  if ( v2 )
  {
    ((void (__stdcall *)(_DWORD))v3)(0);
    ((void (__stdcall *)(_DWORD))v1->m_pkIndexPanel[1]->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(signed int))v1->m_pkIndexBtn[0]->vfptr[60].__vecDelDtor)(1);
    ((void (__stdcall *)(signed int))v1->m_pkIndexBtn[0]->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v1->m_pkIndexBtn[1]->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v1->m_pkIndexBtn[1]->vfptr[64].__vecDelDtor)(0);
    v6 = (int)v1->m_pkCategoryText;
    v7 = 20;
    do
    {
      if ( *(_DWORD *)v6 )
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v6 + 256))(0);
      v6 += 4;
      --v7;
    }
    while ( v7 );
  }
  else
  {
    ((void (__stdcall *)(signed int))v3)(1);
    ((void (__stdcall *)(signed int))v1->m_pkIndexPanel[1]->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v1->m_pkIndexBtn[0]->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v1->m_pkIndexBtn[0]->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(signed int))v1->m_pkIndexBtn[1]->vfptr[60].__vecDelDtor)(1);
    ((void (__stdcall *)(signed int))v1->m_pkIndexBtn[1]->vfptr[64].__vecDelDtor)(1);
    v4 = (int)v1->m_pkCategoryText;
    v5 = 20;
    do
    {
      if ( *(_DWORD *)v4 )
        (*(void (__stdcall **)(signed int))(**(_DWORD **)v4 + 256))(1);
      v4 += 4;
      --v5;
    }
    while ( v5 );
  }
}

//----- (00500E60) --------------------------------------------------------
void __thiscall FullMapWin::ResetQuestNum(FullMapWin *this)
{
  char *v1; // esi@1
  signed int v2; // edi@1

  v1 = (char *)this->m_pkQuestListNum;
  v2 = 40;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v1 - 40) + 240))(0);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v1 - 40) + 256))(0);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v1 + 240))(0);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v1 + 256))(0);
    v1 += 4;
    --v2;
  }
  while ( v2 );
}

//----- (00500EC0) --------------------------------------------------------
void __thiscall FullMapWin::SetMapScale(FullMapWin *this, float fScale)
{
  this->m_fFullMapScale = fScale;
}

//----- (00500ED0) --------------------------------------------------------
void __thiscall FullMapWin::SetMapViewRect(FullMapWin *this, unsigned int dwLeft, unsigned int dwTop, unsigned int dwRight, unsigned int dwBottom)
{
  this->m_kMapViewRect.left = dwLeft;
  this->m_kMapViewRect.top = dwTop;
  this->m_kMapViewRect.right = dwRight;
  this->m_kMapViewRect.bottom = dwBottom;
}

//----- (00500F00) --------------------------------------------------------
char __stdcall FullMapWin::AbbreviateText(char *pResult, const char *pTarget, int nAbbreviationSize)
{
  const char *v4; // edi@1
  int v5; // eax@1
  int v6; // ebx@3
  char *v7; // esi@3
  char *v8; // esi@8
  char v9; // al@9
  char result; // al@10

  v4 = pTarget;
  v5 = strlen(pTarget);
  if ( v5 && v5 >= nAbbreviationSize )
  {
    v6 = 0;
    v7 = pResult;
    while ( v6 < nAbbreviationSize )
    {
      if ( IsDBCSLeadByte(*v4) )
      {
        *v7 = *v4;
        v6 += 2;
        v7[1] = v4[1];
        v4 += 2;
        v7 += 2;
      }
      else
      {
        ++v6;
        *v7++ = *v4++;
      }
    }
    v8 = v7 - 1;
    do
      v9 = (v8++)[1];
    while ( v9 );
    *(_DWORD *)v8 = 3026478;
    result = 1;
  }
  else
  {
    strcpy(pResult, pTarget);
    result = 0;
  }
  return result;
}

//----- (00500FA0) --------------------------------------------------------
void FullMapWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "MinimapFull");
}

//----- (00500FD0) --------------------------------------------------------
char __thiscall FullMapWin::SearchKQ_MOB(FullMapWin *this, PROTO_NC_BRIEFINFO_REGENMOB_CMD *pkProto)
{
  FullMapWin *v2; // ebx@1
  NiTListItem<NpcMarkWin *> *v3; // esi@1
  NpcMarkWin *v4; // eax@2
  char result; // al@5

  v2 = this;
  v3 = this->m_kNpcList.m_pkHead;
  if ( v3 )
  {
    while ( 1 )
    {
      v4 = v3->m_element;
      v3 = v3->m_pkNext;
      if ( v4 )
      {
        if ( CharMgr::GetChar(&g_kCharMgr, v4->m_kCharHandle)->m_kCharShape.m_kMobID == pkProto->mobid )
          break;
      }
      if ( !v3 )
        goto LABEL_5;
    }
    v2->m_bTeleport = 0;
    result = 0;
  }
  else
  {
LABEL_5:
    result = 1;
  }
  return result;
}

//----- (00501030) --------------------------------------------------------
void __thiscall FullMapWin::UpdateMainCharPos(FullMapWin *this)
{
  FullMapWin *v1; // esi@1
  int v2; // eax@1
  int kPos_8; // ST10_4@1
  float fXPos; // ST18_4@1
  float fYPos; // ST14_4@1
  MainCharMarkWin *v6; // eax@1
  float v7; // ecx@1
  float v8; // edx@1
  float v9; // ecx@1
  MainCharMarkWin *v10; // esi@1
  float v11; // eax@1
  float v12; // ecx@1
  float v13; // eax@1

  v1 = this;
  v2 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
  kPos_8 = *(_DWORD *)(v2 + 8);
  fXPos = (0.02 * *(float *)v2 / v1->m_fFullMapScale - v1->m_fMapOffsetX) * v1->m_fMapScaleX;
  fYPos = (512.0 - 0.02 * *(float *)(v2 + 4) / v1->m_fFullMapScale - v1->m_fMapOffsetY) * v1->m_fMapScaleY;
  ((void (__stdcall *)(signed int))v1->m_pkMainCharMarkWin->vfptr[64].__vecDelDtor)(1);
  v6 = v1->m_pkMainCharMarkWin;
  v7 = v6->m_kLocal.m_Translate.x;
  v8 = v6->m_kLocal.m_Translate.y;
  v9 = v6->m_kLocal.m_Translate.z;
  v6->m_kLocal.m_Translate.x = fXPos;
  v6->m_kLocal.m_Translate.y = fYPos;
  v6->m_kLocal.m_Translate.z = v9;
  ((void (__stdcall *)(signed int))v1->m_pkMainCharMarkSecondWin->vfptr[64].__vecDelDtor)(1);
  v10 = v1->m_pkMainCharMarkSecondWin;
  v11 = v10->m_kLocal.m_Translate.x;
  v12 = v10->m_kLocal.m_Translate.y;
  v13 = v10->m_kLocal.m_Translate.z;
  v10->m_kLocal.m_Translate.x = fXPos;
  v10->m_kLocal.m_Translate.y = fYPos;
  v10->m_kLocal.m_Translate.z = v13;
}

//----- (00501130) --------------------------------------------------------
void __thiscall FullMapWin::UpdateMainCharDir(FullMapWin *this)
{
  FullMapWin *v1; // esi@1
  Mover *v2; // eax@1
  NiPoint3 kDir; // [sp+4h] [bp-34h]@2
  NiMatrix3 kMat; // [sp+10h] [bp-28h]@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[6].GetAbstateColor)(&kMat);
  v2 = g_pkMainChar->m_pkMover;
  if ( v2 )
    ((void (__thiscall *)(_DWORD, _DWORD))v2->vfptr[6].~AbStateInfectee)(v2, &kDir);
  else
    ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[6].~AbStateInfectee)(&kDir);
  kDir.y = -kDir.y;
  kDir.z = -kDir.z;
  NpNs_RotateModelZToVector(&kDir, &kMat);
  ((void (__stdcall *)(_DWORD))v1->m_pkMainCharMarkWin->vfptr[74].__vecDelDtor)(&kMat);
  ((void (__stdcall *)(_DWORD))v1->m_pkMainCharMarkSecondWin->vfptr[74].__vecDelDtor)(&kMat);
}

//----- (005011E0) --------------------------------------------------------
char __thiscall FullMapWin::IsInNPC(FullMapWin *this, unsigned __int16 kCharHandle)
{
  NiTListItem<NpcMarkWin *> *v2; // eax@1
  NpcMarkWin *v3; // ecx@2
  char result; // al@5

  v2 = this->m_kNpcList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      v2 = v2->m_pkNext;
      if ( v3 )
      {
        if ( v3->m_kCharHandle == kCharHandle )
          break;
      }
      if ( !v2 )
        goto LABEL_5;
    }
    result = 1;
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (00501220) --------------------------------------------------------
char __thiscall FullMapWin::IsInParty(FullMapWin *this, PartyMemberInfo *pkInfo)
{
  NiTListItem<PartyMarkWin *> *v2; // esi@1
  PartyMarkWin *v3; // ecx@2
  char result; // al@5

  v2 = this->m_kPartyList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      v2 = v2->m_pkNext;
      if ( v3 )
      {
        if ( PartyMarkWin::GetParty(v3) == pkInfo )
          break;
      }
      if ( !v2 )
        goto LABEL_5;
    }
    result = 1;
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (00501260) --------------------------------------------------------
PgSprData *__thiscall FullMapWin::GetMapIconSprData(FullMapWin *this, unsigned int kIndex)
{
  PgSprData *result; // eax@2

  switch ( kIndex )
  {
    case 0u:
      result = this->m_spNPCFurnitureSprData.m_pObject;
      break;
    case 1u:
      result = this->m_spNPCGuildSprData.m_pObject;
      break;
    case 2u:
      result = this->m_spNPCHelpSprData.m_pObject;
      break;
    case 3u:
      result = this->m_spNPCItemSprData.m_pObject;
      break;
    case 4u:
      result = this->m_spNPCKingdomSprData.m_pObject;
      break;
    case 5u:
    case 0x18u:
      result = this->m_spLinkSprData.m_pObject;
      break;
    case 6u:
      result = this->m_spNPCMineSprData.m_pObject;
      break;
    case 7u:
      result = this->m_spNPCQuestSprData.m_pObject;
      break;
    case 8u:
      result = this->m_spNPCSkillSprData.m_pObject;
      break;
    case 9u:
      result = this->m_spNPCSmithSprData.m_pObject;
      break;
    case 0xAu:
      result = this->m_spNPCSoulStoneSprData.m_pObject;
      break;
    case 0xBu:
      result = this->m_spNPCStoreSprData.m_pObject;
      break;
    case 0xCu:
      result = this->m_spNPCTemplarSprData.m_pObject;
      break;
    case 0xEu:
      result = this->m_spNPCWTitleSprData.m_pObject;
      break;
    case 0xFu:
      result = this->m_spMiniHouseSprData.m_pObject;
      break;
    case 0x12u:
      result = this->m_spFlagNormal.m_pObject;
      break;
    case 0x10u:
      result = this->m_spFlagRed.m_pObject;
      break;
    case 0x11u:
      result = this->m_spFlagBlue.m_pObject;
      break;
    case 0x15u:
      result = this->m_spWarpGray.m_pObject;
      break;
    case 0x13u:
      result = this->m_spWarpBlue.m_pObject;
      break;
    case 0x14u:
      result = this->m_spWarpRed.m_pObject;
      break;
    case 0x16u:
      result = 0;
      break;
    case 0x17u:
      result = this->m_spLinkTownSprData.m_pObject;
      break;
    case 0x19u:
      result = this->m_spMobChiefSprData.m_pObject;
      break;
    case 0x1Au:
      result = this->m_spMobDmgSprData.m_pObject;
      break;
    case 0x1Bu:
      result = this->m_spMobNormalSprData.m_pObject;
      break;
    case 0x1Cu:
      result = this->m_spBlueWoodSprData.m_pObject;
      break;
    case 0x1Du:
      result = this->m_spRedWoodSprData.m_pObject;
      break;
    case 0x1Eu:
      result = this->m_spCaptureFlagSprData.m_pObject;
      break;
    default:
      result = this->m_spNPCNormalSprData.m_pObject;
      break;
  }
  return result;
}

//----- (00501420) --------------------------------------------------------
void __thiscall FullMapWin::UpdateArea(FullMapWin *this, unsigned int uiIndex)
{
  unsigned int v2; // esi@1
  signed int v3; // ebx@1
  FullMapWin *v4; // edi@1
  NiTListItem<QuestHelperMarkWin *> *v5; // esi@5
  QuestHelperMarkWin *v6; // edi@6
  NiTListItem<MobAreaMarkWin *> *v7; // edi@16
  MobAreaMarkWin *v8; // esi@17
  unsigned __int16 v9; // ax@18
  unsigned __int16 v10; // ax@19
  NiTListItem<QuestHelperMarkWin *> *v11; // edi@23
  QuestHelperMarkWin *v12; // esi@24
  unsigned __int16 v13; // ax@25
  unsigned __int16 v14; // ax@26
  FullMapWin *v15; // [sp+Ch] [bp-14h]@1
  unsigned int uiListCnt; // [sp+10h] [bp-10h]@1
  unsigned int uiCnt; // [sp+14h] [bp-Ch]@5
  unsigned int Mob_ID; // [sp+18h] [bp-8h]@1
  unsigned int Quest_ID; // [sp+1Ch] [bp-4h]@1

  v2 = 0;
  v3 = 0xFFFF;
  v4 = this;
  v15 = this;
  Quest_ID = 0xFFFF;
  Mob_ID = 0xFFFF;
  uiListCnt = 0;
  if ( uiIndex )
  {
    do
    {
      SlideListWin::GetData(v4->m_pkQuestSlideListWin, v2, &Quest_ID);
      if ( Quest_ID > 0xFFFF )
        ++uiListCnt;
      ++v2;
    }
    while ( v2 < uiIndex );
  }
  v5 = v4->m_kQuestBallList.m_pkHead;
  uiCnt = 0;
  if ( !v5 )
    goto LABEL_15;
  while ( 1 )
  {
    v6 = v5->m_element;
    v5 = v5->m_pkNext;
    if ( v6 )
      break;
LABEL_11:
    if ( !v5 )
      goto LABEL_14;
  }
  if ( v3 != QuestHelperMarkWin::GetQuestID(v6) )
    ++uiCnt;
  if ( uiCnt <= uiListCnt )
  {
    v3 = QuestHelperMarkWin::GetQuestID(v6);
    goto LABEL_11;
  }
  Quest_ID = QuestHelperMarkWin::GetQuestID(v6);
LABEL_14:
  v4 = v15;
LABEL_15:
  SlideListWin::GetData(v4->m_pkQuestSlideListWin, uiIndex, &Mob_ID);
  if ( Mob_ID != 0xFFFF )
  {
    v7 = v4->m_kMobAreaList.m_pkHead;
    while ( v7 )
    {
      v8 = v7->m_element;
      v7 = v7->m_pkNext;
      if ( v8 )
      {
        v9 = MobAreaMarkWin::GetMobID(v8);
        if ( v9 != Mob_ID || (v10 = MobAreaMarkWin::GetQuestID(v8), v10 != Quest_ID) )
          v8->vfptr[64].__vecDelDtor((NiRefObject *)v8, 0);
        else
          v8->vfptr[64].__vecDelDtor((NiRefObject *)v8, 1u);
      }
    }
    v11 = v15->m_kQuestBallList.m_pkHead;
    while ( v11 )
    {
      v12 = v11->m_element;
      v11 = v11->m_pkNext;
      if ( v12 )
      {
        v13 = QuestHelperMarkWin::GetMobID(v12);
        if ( v13 != Mob_ID || (v14 = QuestHelperMarkWin::GetQuestID(v12), v14 != Quest_ID) )
          v12->vfptr[64].__vecDelDtor((NiRefObject *)v12, 0);
        else
          v12->vfptr[64].__vecDelDtor((NiRefObject *)v12, 1u);
      }
    }
    v15->m_pkQuestSlideListWin->m_bCheckEnable = 0;
  }
}

//----- (00501590) --------------------------------------------------------
void __thiscall FullMapWin::UpdateArea(FullMapWin *this, unsigned __int16 Quest_ID, unsigned __int16 Mob_ID)
{
  FullMapWin *v3; // ebx@1
  NiTListItem<MobAreaMarkWin *> *v4; // edi@1
  MobAreaMarkWin *v5; // esi@2
  NiTListItem<QuestHelperMarkWin *> *v6; // edi@7
  QuestHelperMarkWin *v7; // esi@8

  v3 = this;
  v4 = this->m_kMobAreaList.m_pkHead;
  while ( v4 )
  {
    v5 = v4->m_element;
    v4 = v4->m_pkNext;
    if ( MobAreaMarkWin::GetMobID(v5) != Mob_ID || MobAreaMarkWin::GetQuestID(v5) != Quest_ID )
      v5->vfptr[64].__vecDelDtor((NiRefObject *)v5, 0);
    else
      v5->vfptr[64].__vecDelDtor((NiRefObject *)v5, 1u);
  }
  v6 = v3->m_kQuestBallList.m_pkHead;
  while ( v6 )
  {
    v7 = v6->m_element;
    v6 = v6->m_pkNext;
    if ( v7 )
    {
      if ( QuestHelperMarkWin::GetMobID(v7) != Mob_ID || QuestHelperMarkWin::GetQuestID(v7) != Quest_ID )
        v7->vfptr[64].__vecDelDtor((NiRefObject *)v7, 0);
      else
        v7->vfptr[64].__vecDelDtor((NiRefObject *)v7, 1u);
    }
  }
}

//----- (00501630) --------------------------------------------------------
void __thiscall FullMapWin::UpdateSlideBarMapList(FullMapWin *this)
{
  FullMapWin *v1; // esi@1
  SlideBar *v2; // ecx@1
  SlideListWin *v3; // eax@2

  v1 = this;
  v2 = this->m_pkMapSlideBar;
  if ( v2 )
  {
    v3 = v1->m_pkMapSlideListWin;
    if ( v3 )
    {
      SlideBar::SetSplitCnt(v2, v3->m_nSlideSplitCnt);
      v1->m_pkMapSlideListWin->m_nViewStartPos = v1->m_pkMapSlideBar->m_nCurPos;
      SlideListWin::UpdateViewList(v1->m_pkMapSlideListWin);
    }
  }
}

//----- (00501680) --------------------------------------------------------
BOOL __thiscall FullMapWin::IsSameMapName(FullMapWin *this)
{
  FullMapWin *v1; // esi@1
  Name3 *v2; // eax@1
  Name3 result; // [sp+4h] [bp-Ch]@1

  v1 = this;
  v2 = World::GetMapName(&g_kWorld, &result);
  return v1->m_kSelectedMapName.n3_code[0] == v2->n3_code[0]
      && v1->m_kSelectedMapName.n3_code[1] == v2->n3_code[1]
      && v1->m_kSelectedMapName.n3_code[2] == v2->n3_code[2];
}

//----- (005016E0) --------------------------------------------------------
void __thiscall FullMapWin::UpdateRaidPos(FullMapWin *this)
{
  void **v1; // eax@1
  RaidMarkWin *v2; // esi@4
  RaidMemberInfo *v3; // eax@5
  RaidMemberInfo *v4; // edi@5
  _BYTE v5[20]; // ST00_20@7
  Char *v6; // eax@7
  Char *v7; // ebx@7
  double v8; // st7@9
  float v9; // eax@12
  float v10; // ecx@12
  float v11; // eax@12
  float v12; // ecx@12
  NiPoint3 kPos; // [sp+Ch] [bp-28h]@9
  float v14; // [sp+18h] [bp-1Ch]@12
  float v15; // [sp+1Ch] [bp-18h]@12
  FullMapWin *v16; // [sp+24h] [bp-10h]@1
  void *kIter; // [sp+28h] [bp-Ch]@3
  float y; // [sp+2Ch] [bp-8h]@11
  float x; // [sp+30h] [bp-4h]@9

  v1 = (void **)&this->m_kRaidList.m_pkHead->m_pkNext;
  v16 = this;
  if ( v1 )
  {
    while ( 1 )
    {
      v2 = (RaidMarkWin *)v1[2];
      kIter = *v1;
      if ( v2 )
      {
        v3 = RaidMarkWin::GetRaidMember(v2);
        v4 = v3;
        if ( !v3 )
          return;
        if ( v3->m_bShow
          && ((*(_DWORD *)v5 = v3->m_kCharID.n5_code[0],
               *(_QWORD *)&v5[4] = *(_QWORD *)&v3->m_kCharID.n5_code[1],
               *(_QWORD *)&v5[12] = *(_QWORD *)&v3->m_kCharID.n5_code[3],
               v6 = CharMgr::GetChar(&g_kCharMgr, *(Name5 *)v5),
               (v7 = v6) == 0)
           || !Char::IsUpdate(v6) ? (x = v4->m_fX, v8 = v4->m_fY) : (((void (__thiscall *)(Char *, NiPoint3 *))v7->vfptr[6].SetAbStateProperty)(
                                                                       v7,
                                                                       &kPos),
                                                                     x = kPos.x,
                                                                     v8 = kPos.y),
              y = v8,
              x = (0.02 * x / v16->m_fFullMapScale - v16->m_fMapOffsetX) * v16->m_fMapScaleX,
              y = (512.0 - 0.02 * y / v16->m_fFullMapScale - v16->m_fMapOffsetY) * v16->m_fMapScaleY,
              (unsigned __int8)FullMapWin::IsSameMapName(v16)) )
        {
          v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 1u);
          v9 = v2->m_kLocal.m_Translate.x;
          v10 = v2->m_kLocal.m_Translate.y;
          v14 = x;
          v11 = v2->m_kLocal.m_Translate.z;
          v15 = y;
          v12 = y;
          v2->m_kLocal.m_Translate.x = x;
          v2->m_kLocal.m_Translate.y = v12;
          v2->m_kLocal.m_Translate.z = v11;
        }
        else
        {
          v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 0);
        }
      }
      if ( !kIter )
        break;
      v1 = (void **)kIter;
    }
  }
}

//----- (00501840) --------------------------------------------------------
char __thiscall FullMapWin::IsInRaid(FullMapWin *this, RaidMemberInfo *pkInfo)
{
  NiTListItem<RaidMarkWin *> *v2; // esi@1
  RaidMarkWin *v3; // ecx@2
  RaidMemberInfo *v4; // eax@3
  char result; // al@10

  v2 = this->m_kRaidList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      v2 = v2->m_pkNext;
      if ( v3 )
      {
        v4 = RaidMarkWin::GetRaidMember(v3);
        if ( v4 )
        {
          if ( v4->m_kCharID.n5_code[0] == pkInfo->m_kCharID.n5_code[0]
            && v4->m_kCharID.n5_code[1] == pkInfo->m_kCharID.n5_code[1]
            && v4->m_kCharID.n5_code[2] == pkInfo->m_kCharID.n5_code[2]
            && v4->m_kCharID.n5_code[3] == pkInfo->m_kCharID.n5_code[3]
            && v4->m_kCharID.n5_code[4] == pkInfo->m_kCharID.n5_code[4] )
          {
            break;
          }
        }
      }
      if ( !v2 )
        goto LABEL_10;
    }
    result = 1;
  }
  else
  {
LABEL_10:
    result = 0;
  }
  return result;
}

//----- (005018B0) --------------------------------------------------------
void __thiscall FullMapWin::UpdateGTEnemyPos(FullMapWin *this)
{
  FullMapWin *v1; // edi@1
  NiTListItem<GTIScanMarkWin *> *v2; // ebx@1
  GTIScanMarkWin *v3; // esi@2
  ScanMemberInfo *v4; // eax@3
  float fXPos; // ST20_4@4
  float fYPos; // ST1C_4@4
  float v7; // eax@4
  float v8; // ecx@4
  float v9; // eax@4

  v1 = this;
  v2 = this->m_kEnemyList.m_pkHead;
  while ( v2 )
  {
    v3 = v2->m_element;
    v2 = v2->m_pkNext;
    if ( v3 )
    {
      v4 = GTIScanMarkWin::GetEnemyPos(v3);
      if ( !v4 )
        return;
      fXPos = ((double)v4->loc.x * 0.02 / v1->m_fFullMapScale - v1->m_fMapOffsetX) * v1->m_fMapScaleX;
      fYPos = (512.0 - 0.02 * (double)v4->loc.y / v1->m_fFullMapScale - v1->m_fMapOffsetY) * v1->m_fMapScaleY;
      v3->vfptr[64].__vecDelDtor((NiRefObject *)v3, 1u);
      v7 = v3->m_kLocal.m_Translate.x;
      v8 = v3->m_kLocal.m_Translate.y;
      v9 = v3->m_kLocal.m_Translate.z;
      v3->m_kLocal.m_Translate.x = fXPos;
      v3->m_kLocal.m_Translate.y = fYPos;
      v3->m_kLocal.m_Translate.z = v9;
    }
  }
}

//----- (005019A0) --------------------------------------------------------
void __usercall FullMapWin::OnMapTransparency(FullMapWin *this@<ecx>, int a2@<edi>)
{
  FullMapWin *v2; // esi@1
  SlideBar *v3; // ecx@1
  int v4; // ST18_4@1
  unsigned int v5; // ebx@1
  unsigned int v6; // edi@1
  int v7; // ecx@2
  double v8; // st7@3
  float v9; // ST18_4@5
  float nCurPos; // [sp+1Ch] [bp-4h]@1

  v2 = this;
  v3 = this->m_pkSlides;
  v4 = v3->m_nCurPos;
  nCurPos = (double)v4 / 100.0;
  SlideBar::SetCurPos(v3, v4);
  ((void (__stdcall *)(_DWORD, int))v2->m_pkInvisibleWin->vfptr[69].__vecDelDtor)(LODWORD(nCurPos), a2);
  ((void (__thiscall *)(FullMapWin *))v2->vfptr[69].__vecDelDtor)(v2);
  v5 = 0;
  v6 = v2->m_kVisibleControls._Mylast - v2->m_kVisibleControls._Myfirst;
  if ( v6 )
  {
    do
    {
      v7 = (int)&v2->m_kVisibleControls._Myfirst[v5];
      if ( *(_DWORD *)v7 )
      {
        v8 = nCurPos;
        if ( nCurPos < 0.5 )
          v8 = 0.60000002;
        v9 = v8;
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v7 + 276))(LODWORD(v9));
      }
      ++v5;
    }
    while ( v5 < v6 );
  }
  MachineOpt::ms_kUserLoginOption.FullMapAlpha = nCurPos;
}
// 5019A0: could not find valid save-restore pair for edi

//----- (00501A90) --------------------------------------------------------
void __userpurge FullMapWin::SetInvisibleWinAlpha(FullMapWin *this@<ecx>, int a2@<edi>, const float fAlpha)
{
  FullMapWin *v3; // esi@1

  v3 = this;
  SlideBar::SetCurPos(this->m_pkSlides, (signed int)(fAlpha * 100.0));
  FullMapWin::OnMapTransparency(v3, a2);
}

//----- (00501AC0) --------------------------------------------------------
bool __thiscall InvisibleWin::HitTest(InvisibleWin *this, int iSx, int iSy)
{
  InvisibleWin *v3; // esi@1
  void *(__thiscall *v4)(NiRefObject *, unsigned int); // edx@1
  int v5; // eax@2
  int v6; // eax@4
  double v7; // st7@5
  char v8; // bl@5
  bool result; // al@8
  int v10; // [sp+4h] [bp-4h]@1

  v3 = this;
  v4 = this->vfptr[56].__vecDelDtor;
  v10 = iSy;
  iSy = iSx;
  ((void (__stdcall *)(int *, int *))v4)(&iSy, &v10);
  if ( iSy < 0 )
    goto LABEL_12;
  v5 = ((int (__thiscall *)(InvisibleWin *))v3->vfptr[36].__vecDelDtor)(v3);
  if ( iSy >= v5 )
    goto LABEL_12;
  if ( v10 < 0 )
    goto LABEL_12;
  v6 = ((int (__thiscall *)(InvisibleWin *))v3->vfptr[37].__vecDelDtor)(v3);
  if ( v10 >= v6 )
    goto LABEL_12;
  v7 = v3->m_pkMaterialProp->m_fAlpha;
  v8 = 1;
  BYTE3(iSy) = 1;
  if ( v7 >= 0.8999999761581421 )
    v8 = 0;
  v3->vfptr[60].__vecDelDtor((NiRefObject *)v3, v8 == 0);
  if ( v8 )
LABEL_12:
    result = 0;
  else
    result = BYTE3(iSy);
  return result;
}

//----- (00501B60) --------------------------------------------------------
void __thiscall FullMapWin::InitPos(FullMapWin *this, unsigned int uiScreenWidth, unsigned int uiScreenHeight, float fXPosRate, float fYPosRate)
{
  FullMapWin *v5; // esi@1
  unsigned int v6; // edi@1
  unsigned int v7; // edi@1
  int v8; // eax@1

  v5 = this;
  PgWin::InitPos((PgWin *)&this->vfptr, uiScreenWidth, uiScreenHeight, fXPosRate, fYPosRate);
  v6 = (unsigned int)((int (*)(void))v5->m_pkIndexPanel[0]->vfptr[36].__vecDelDtor)() >> 1;
  v7 = ((unsigned int)((int (*)(void))v5->m_pkQuestListPanel[0]->vfptr[36].__vecDelDtor)() >> 1) + v6;
  v8 = ((int (__thiscall *)(_DWORD))v5->vfptr[41].__vecDelDtor)(v5);
  v5->vfptr[43].__vecDelDtor((NiRefObject *)v5, v7 + v8);
}

//----- (00501BD0) --------------------------------------------------------
void __thiscall FullMapWin::RemoveNPC(FullMapWin *this, unsigned __int16 handle)
{
  unsigned __int16 v2; // si@1
  FullMapWin *v3; // edi@1
  NiTListItem<NpcMarkWin *> *v4; // eax@2
  NpcMarkWin *v5; // ecx@3
  void (__thiscall ***v6)(_DWORD, _DWORD); // esi@8
  void *kCurrIter; // [sp+8h] [bp-4h]@3

  v2 = handle;
  v3 = this;
  if ( CharMgr::GetChar(&g_kCharMgr, handle) )
  {
    v4 = v3->m_kNpcList.m_pkHead;
    if ( v4 )
    {
      while ( 1 )
      {
        v5 = v4->m_element;
        kCurrIter = v4;
        v4 = v4->m_pkNext;
        if ( v5 )
        {
          if ( v5->m_kCharHandle == v2 )
            break;
        }
        if ( !v4 )
          return;
      }
      PgWin::DetachChildWin(v3->m_pkFullMapViewWin, (NiPointer<PgWin> *)&handle, (PgWin *)&v5->vfptr);
      if ( handle )
      {
        v6 = (void (__thiscall ***)(_DWORD, _DWORD))handle;
        if ( !InterlockedDecrement((volatile LONG *)(handle + 4)) )
        {
          if ( v6 )
            (**v6)(v6, 1);
        }
      }
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&v3->m_kNpcList,
        &kCurrIter);
    }
  }
}

//----- (00501C70) --------------------------------------------------------
void __thiscall FullMapWin::AddParty(FullMapWin *this, PartyMemberInfo *pkParty)
{
  FullMapWin *v2; // ebx@1
  PgWin *v3; // edi@2
  PgWin *v4; // edi@5
  PartyMarkWin *v5; // edi@9
  unsigned int v6; // edx@10
  unsigned int v7; // eax@10
  unsigned int v8; // edx@10
  unsigned int v9; // eax@10
  PgWinSpr *v10; // eax@10
  PgWinSpr *v11; // eax@10
  int v12; // eax@10
  _DWORD *v13; // ecx@10
  NiPointer<PgWin> result; // [sp+Ch] [bp-20h]@1
  char acName[21]; // [sp+10h] [bp-1Ch]@10

  v2 = this;
  PgWin::DetachChildWin(this->m_pkFullMapViewWin, &result, (PgWin *)&this->m_pkMainCharMarkWin->vfptr);
  if ( result.m_pObject )
  {
    v3 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
  }
  PgWin::DetachChildWin(v2->m_pkFullMapViewWin, &result, (PgWin *)&v2->m_pkMainCharMarkSecondWin->vfptr);
  v4 = result.m_pObject;
  if ( result.m_pObject && !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v5 = PartyMarkWin::CreateWin(0, 0, v2->m_spPartySprData.m_pObject, v2->m_pkFullMapViewWin);
  if ( v5 )
  {
    v6 = pkParty->m_kCharID.n5_code[0];
    v7 = pkParty->m_kCharID.n5_code[1];
    *(_DWORD *)&acName[8] = pkParty->m_kCharID.n5_code[2];
    *(_DWORD *)acName = v6;
    v8 = pkParty->m_kCharID.n5_code[3];
    *(_DWORD *)&acName[4] = v7;
    v9 = pkParty->m_kCharID.n5_code[4];
    *(_DWORD *)&acName[12] = v8;
    *(_DWORD *)&acName[16] = v9;
    acName[20] = 0;
    v10 = MiniMapMarkWin::GetMarkWin((MiniMapMarkWin *)&v5->vfptr);
    PgWin::SetToolTipWinText((PgWin *)&v10->vfptr, acName);
    result.m_pObject = g_pkToolTipWin;
    v11 = MiniMapMarkWin::GetMarkWin((MiniMapMarkWin *)&v5->vfptr);
    v11->m_pkToolTipWin = result.m_pObject;
    PartyMarkWin::SetParty(v5, pkParty);
    v12 = (int)v2->m_kPartyList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *> *)&v2->m_kPartyList);
    *(_DWORD *)(v12 + 8) = v5;
    *(_DWORD *)v12 = 0;
    *(_DWORD *)(v12 + 4) = v2->m_kPartyList.m_pkTail;
    v13 = &v2->m_kPartyList.m_pkTail->m_pkNext;
    if ( v13 )
      *v13 = v12;
    else
      v2->m_kPartyList.m_pkHead = (NiTListItem<PartyMarkWin *> *)v12;
    ++v2->m_kPartyList.m_kAllocator.m_uiCount;
    v2->m_kPartyList.m_pkTail = (NiTListItem<PartyMarkWin *> *)v12;
  }
  PgWin::AttachChildWin(v2->m_pkFullMapViewWin, (PgWin *)&v2->m_pkMainCharMarkWin->vfptr);
  PgWin::AttachChildWin(v2->m_pkFullMapViewWin, (PgWin *)&v2->m_pkMainCharMarkSecondWin->vfptr);
}

//----- (00501DF0) --------------------------------------------------------
void __thiscall FullMapWin::RemoveParty(FullMapWin *this, PartyMemberInfo *pkParty)
{
  FullMapWin *v2; // ebx@1
  NiTListItem<PartyMarkWin *> *v3; // esi@1
  PartyMarkWin *v4; // edi@2
  PartyMemberInfo *v5; // eax@3
  PartyMemberInfo *v6; // esi@7
  void *kCurrIter; // [sp+8h] [bp-4h]@2

  v2 = this;
  v3 = this->m_kPartyList.m_pkHead;
  if ( v3 )
  {
    while ( 1 )
    {
      v4 = v3->m_element;
      kCurrIter = v3;
      v3 = v3->m_pkNext;
      if ( v4 )
      {
        v5 = PartyMarkWin::GetParty(v4);
        if ( v5 == pkParty )
          break;
      }
      if ( !v3 )
        return;
    }
    PgWin::DetachChildWin(v2->m_pkFullMapViewWin, (NiPointer<PgWin> *)&pkParty, (PgWin *)&v4->vfptr);
    if ( pkParty )
    {
      v6 = pkParty;
      if ( !InterlockedDecrement((volatile LONG *)&pkParty->m_kCharID.n5_code[1]) )
      {
        if ( v6 )
          (*(void (__thiscall **)(_DWORD, _DWORD))v6->m_kCharID.n5_code[0])(v6, 1);
      }
    }
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&v2->m_kPartyList,
      &kCurrIter);
  }
}

//----- (00501E80) --------------------------------------------------------
void __thiscall FullMapWin::ClearParty(FullMapWin *this)
{
  FullMapWin *v1; // ebx@1
  NiTListItem<PartyMarkWin *> *v2; // eax@2
  NiTListItem<PartyMarkWin *> *v3; // ecx@2
  PgWin *v4; // edi@5
  PgWin *v5; // edi@7
  NiPointer<PgWin> result; // [sp+4h] [bp-4h]@6

  v1 = this;
  while ( v1->m_kPartyList.m_kAllocator.m_uiCount )
  {
    v2 = v1->m_kPartyList.m_pkHead;
    v3 = v2->m_pkNext;
    v1->m_kPartyList.m_pkHead = v2->m_pkNext;
    if ( v3 )
      v3->m_pkPrev = 0;
    else
      v1->m_kPartyList.m_pkTail = 0;
    v4 = (PgWin *)&v2->m_element->vfptr;
    v1->m_kPartyList.vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *> *)&v1->m_kPartyList,
      v2);
    --v1->m_kPartyList.m_kAllocator.m_uiCount;
    if ( v4 )
    {
      PgWin::DetachChildWin(v1->m_pkFullMapViewWin, &result, v4);
      if ( result.m_pObject )
      {
        v5 = result.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
        {
          if ( v5 )
            v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
        }
      }
    }
  }
}

//----- (00501F30) --------------------------------------------------------
void __thiscall FullMapWin::ClearWithOutMainChar(FullMapWin *this)
{
  FullMapWin *v1; // ebx@1
  NiTListItem<NpcMarkWin *> *v2; // esi@1
  PgWin *v3; // eax@2
  PgWin *v4; // edi@4
  NiTListItem<NpcMarkWin *> **v5; // esi@8
  NiTListItem<NpcMarkWin *> *v6; // ST04_4@9
  NiPointer<PgWin> result; // [sp+Ch] [bp-4h]@3

  v1 = this;
  v2 = this->m_kNpcList.m_pkHead;
  while ( v2 )
  {
    v3 = (PgWin *)&v2->m_element->vfptr;
    v2 = v2->m_pkNext;
    if ( v3 )
    {
      PgWin::DetachChildWin(v1->m_pkFullMapViewWin, &result, v3);
      if ( result.m_pObject )
      {
        v4 = result.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
        {
          if ( v4 )
            v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
        }
      }
    }
  }
  v5 = &v1->m_kNpcList.m_pkHead->m_pkNext;
  while ( v5 )
  {
    v6 = (NiTListItem<NpcMarkWin *> *)v5;
    v5 = (NiTListItem<NpcMarkWin *> **)*v5;
    v1->m_kNpcList.vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *> *)&v1->m_kNpcList, v6);
  }
  v1->m_kNpcList.m_kAllocator.m_uiCount = 0;
  v1->m_kNpcList.m_pkHead = 0;
  v1->m_kNpcList.m_pkTail = 0;
}

//----- (00501FD0) --------------------------------------------------------
void __thiscall FullMapWin::UpdatePartyPos(FullMapWin *this)
{
  void **v1; // eax@1
  PartyMarkWin *v2; // esi@4
  PartyMemberInfo *v3; // eax@5
  PartyMemberInfo *v4; // edi@5
  _BYTE v5[20]; // ST00_20@7
  Char *v6; // eax@7
  Char *v7; // ebx@7
  double v8; // st7@9
  float v9; // eax@12
  float v10; // ecx@12
  float v11; // eax@12
  float v12; // ecx@12
  NiPoint3 kPos; // [sp+Ch] [bp-28h]@9
  float v14; // [sp+18h] [bp-1Ch]@12
  float v15; // [sp+1Ch] [bp-18h]@12
  FullMapWin *v16; // [sp+24h] [bp-10h]@1
  void *kIter; // [sp+28h] [bp-Ch]@3
  float y; // [sp+2Ch] [bp-8h]@11
  float x; // [sp+30h] [bp-4h]@9

  v1 = (void **)&this->m_kPartyList.m_pkHead->m_pkNext;
  v16 = this;
  if ( v1 )
  {
    while ( 1 )
    {
      v2 = (PartyMarkWin *)v1[2];
      kIter = *v1;
      if ( v2 )
      {
        v3 = PartyMarkWin::GetParty(v2);
        v4 = v3;
        if ( !v3 )
          return;
        if ( v3->m_bShow
          && ((*(_DWORD *)v5 = v3->m_kCharID.n5_code[0],
               *(_QWORD *)&v5[4] = *(_QWORD *)&v3->m_kCharID.n5_code[1],
               *(_QWORD *)&v5[12] = *(_QWORD *)&v3->m_kCharID.n5_code[3],
               v6 = CharMgr::GetChar(&g_kCharMgr, *(Name5 *)v5),
               (v7 = v6) == 0)
           || !Char::IsUpdate(v6) ? (x = v4->m_fX, v8 = v4->m_fY) : (((void (__thiscall *)(Char *, NiPoint3 *))v7->vfptr[6].SetAbStateProperty)(
                                                                       v7,
                                                                       &kPos),
                                                                     x = kPos.x,
                                                                     v8 = kPos.y),
              y = v8,
              x = (0.02 * x / v16->m_fFullMapScale - v16->m_fMapOffsetX) * v16->m_fMapScaleX,
              y = (512.0 - 0.02 * y / v16->m_fFullMapScale - v16->m_fMapOffsetY) * v16->m_fMapScaleY,
              (unsigned __int8)FullMapWin::IsSameMapName(v16)) )
        {
          v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 1u);
          v9 = v2->m_kLocal.m_Translate.x;
          v10 = v2->m_kLocal.m_Translate.y;
          v14 = x;
          v11 = v2->m_kLocal.m_Translate.z;
          v15 = y;
          v12 = y;
          v2->m_kLocal.m_Translate.x = x;
          v2->m_kLocal.m_Translate.y = v12;
          v2->m_kLocal.m_Translate.z = v11;
        }
        else
        {
          v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 0);
        }
      }
      if ( !kIter )
        break;
      v1 = (void **)kIter;
    }
  }
}

//----- (00502130) --------------------------------------------------------
void __thiscall FullMapWin::RemoveMapMark(FullMapWin *this, unsigned int nGroup)
{
  FullMapWin *v2; // esi@1
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v3; // ebx@1
  MapMarkWin *v4; // edi@1
  MapMarkWin *v5; // esi@3
  MapMarkWin *pkWin; // [sp+Ch] [bp-4h]@1

  v2 = this;
  v3 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_kMapMarkMap;
  pkWin = 0;
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_kMapMarkMap,
    nGroup,
    (NiVBSet **)&pkWin);
  v4 = pkWin;
  if ( pkWin )
  {
    PgWin::DetachChildWin(v2->m_pkFullMapViewWin, (NiPointer<PgWin> *)&pkWin, (PgWin *)&pkWin->vfptr);
    if ( pkWin )
    {
      v5 = pkWin;
      if ( !InterlockedDecrement((volatile LONG *)&pkWin->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v4->vfptr);
    NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::RemoveAt(v3, nGroup);
  }
}

//----- (005021B0) --------------------------------------------------------
void __thiscall FullMapWin::RemoveAllMapMark(FullMapWin *this)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v1; // ebx@1
  unsigned int v2; // ecx@1
  unsigned int v3; // eax@1
  NiTMapItem<unsigned long,NiPointer<PgWinBut> > **v4; // edx@2
  NiTMapItem<unsigned long,NiPointer<PgWinBut> > *v5; // eax@5
  NiTMapItem<unsigned long,NiPointer<PgWinBut> > *v6; // esi@6
  PgWin *v7; // edi@7
  int v8; // eax@10
  unsigned int v9; // edx@10
  unsigned int v10; // eax@10
  NiTMapItem<unsigned long,NiPointer<PgWinBut> > **v11; // ecx@11
  PgWin *v12; // edi@16
  MapMarkWin *pkWin; // [sp+8h] [bp-Ch]@7
  NiPointer<PgWin> result; // [sp+Ch] [bp-8h]@15
  FullMapWin *v15; // [sp+10h] [bp-4h]@1

  v1 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kMapMarkMap;
  v15 = this;
  v2 = this->m_kMapMarkMap.m_uiHashSize;
  v3 = 0;
  if ( v2 )
  {
    v4 = v1->m_ppkHashTable;
    while ( !*v4 )
    {
      ++v3;
      ++v4;
      if ( v3 >= v2 )
        goto LABEL_5;
    }
    v5 = v1->m_ppkHashTable[v3];
  }
  else
  {
LABEL_5:
    v5 = 0;
  }
  v6 = v5;
  while ( v6 )
  {
    v7 = (PgWin *)&v6->m_val.m_pObject->vfptr;
    pkWin = (MapMarkWin *)v6->m_val.m_pObject;
    if ( v6->m_pkNext )
    {
      v6 = v6->m_pkNext;
    }
    else
    {
      v8 = v1->vfptr->KeyToHashIndex(v1, v6->m_key);
      v9 = v1->m_uiHashSize;
      v10 = v8 + 1;
      if ( v10 >= v9 )
      {
LABEL_14:
        v6 = 0;
      }
      else
      {
        v11 = &v1->m_ppkHashTable[v10];
        while ( 1 )
        {
          v6 = *v11;
          if ( *v11 )
            break;
          ++v10;
          ++v11;
          if ( v10 >= v9 )
            goto LABEL_14;
        }
      }
    }
    PgWin::DetachChildWin(v15->m_pkFullMapViewWin, &result, v7);
    if ( result.m_pObject )
    {
      v12 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v12 )
          v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
      }
    }
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&pkWin->vfptr);
  }
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v1);
}

//----- (00502290) --------------------------------------------------------
void __thiscall FullMapWin::UpdateMapMark(FullMapWin *this)
{
  char *v1; // edi@1
  unsigned int v2; // ecx@1
  unsigned int v3; // eax@1
  _DWORD *v4; // edx@2
  int v5; // eax@5
  int v6; // esi@6
  MapMarkWin *v7; // eax@7
  unsigned int v8; // ebx@7
  int v9; // eax@8
  unsigned int v10; // edx@8
  unsigned int v11; // eax@8
  int *v12; // ecx@9
  FullMapWin *v13; // [sp+14h] [bp-8h]@1
  MapMarkWin *pkWin; // [sp+18h] [bp-4h]@7

  v1 = (char *)&this->m_kMapMarkMap;
  v13 = this;
  v2 = this->m_kMapMarkMap.m_uiHashSize;
  v3 = 0;
  if ( v2 )
  {
    v4 = (_DWORD *)*((_DWORD *)v1 + 2);
    while ( !*v4 )
    {
      ++v3;
      ++v4;
      if ( v3 >= v2 )
        goto LABEL_5;
    }
    v5 = *(_DWORD *)(*((_DWORD *)v1 + 2) + 4 * v3);
  }
  else
  {
LABEL_5:
    v5 = 0;
  }
  v6 = v5;
  while ( v6 )
  {
    v7 = *(MapMarkWin **)(v6 + 8);
    v8 = *(_DWORD *)(v6 + 4);
    v6 = *(_DWORD *)v6;
    pkWin = v7;
    if ( !v6 )
    {
      v9 = (*(int (__thiscall **)(char *, unsigned int))(*(_DWORD *)v1 + 4))(v1, v8);
      v10 = *((_DWORD *)v1 + 1);
      v11 = v9 + 1;
      if ( v11 >= v10 )
      {
LABEL_12:
        v6 = 0;
      }
      else
      {
        v12 = (int *)(*((_DWORD *)v1 + 2) + 4 * v11);
        while ( 1 )
        {
          v6 = *v12;
          if ( *v12 )
            break;
          ++v11;
          ++v12;
          if ( v11 >= v10 )
            goto LABEL_12;
        }
      }
    }
    if ( pkWin )
    {
      if ( (unsigned __int8)MapMarkWin::IsPassLifeTime(pkWin, Timer::ms_fCurTime) )
        FullMapWin::RemoveMapMark(v13, v8);
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00502340) --------------------------------------------------------
void __usercall FullMapWin::UpdateKQTeamMark(FullMapWin *this@<ecx>, signed int a2@<edi>)
{
  char *v2; // ebx@1
  unsigned int v3; // ecx@1
  unsigned int v4; // eax@1
  _DWORD *v5; // edx@2
  int v6; // eax@5
  int v7; // esi@6
  int v8; // eax@8
  int v9; // edi@8
  int v10; // eax@9
  unsigned int v11; // edx@9
  unsigned int v12; // eax@9
  int *v13; // ecx@10
  Char *v14; // eax@15
  int v15; // eax@16
  int kPos_8; // ST18_4@16
  int v17; // ecx@17
  int v18; // edx@17
  int v19; // eax@17
  signed int v20; // [sp-4h] [bp-30h]@7
  float fYPos; // [sp+20h] [bp-Ch]@16
  FullMapWin *v22; // [sp+24h] [bp-8h]@1
  unsigned __int16 fXPos; // [sp+28h] [bp-4h]@8
  float fXPosa; // [sp+28h] [bp-4h]@16

  v2 = (char *)&this->m_KQTeamMarkWinMap;
  v22 = this;
  v3 = this->m_KQTeamMarkWinMap.m_uiHashSize;
  v4 = 0;
  if ( v3 )
  {
    v5 = (_DWORD *)*((_DWORD *)v2 + 2);
    while ( !*v5 )
    {
      ++v4;
      ++v5;
      if ( v4 >= v3 )
        goto LABEL_5;
    }
    v6 = *(_DWORD *)(*((_DWORD *)v2 + 2) + 4 * v4);
  }
  else
  {
LABEL_5:
    v6 = 0;
  }
  v7 = v6;
  if ( v6 )
  {
    v20 = a2;
    do
    {
      v8 = *(_WORD *)(v7 + 4);
      v9 = *(_DWORD *)(v7 + 8);
      v7 = *(_DWORD *)v7;
      fXPos = v8;
      if ( !v7 )
      {
        v10 = (*(int (__thiscall **)(char *, int))(*(_DWORD *)v2 + 4))(v2, v8);
        v11 = *((_DWORD *)v2 + 1);
        v12 = v10 + 1;
        if ( v12 >= v11 )
        {
LABEL_13:
          v7 = 0;
        }
        else
        {
          v13 = (int *)(*((_DWORD *)v2 + 2) + 4 * v12);
          while ( 1 )
          {
            v7 = *v13;
            if ( *v13 )
              break;
            ++v12;
            ++v13;
            if ( v12 >= v11 )
              goto LABEL_13;
          }
        }
      }
      if ( v9 )
      {
        v14 = CharMgr::GetChar(&g_kCharMgr, fXPos);
        if ( v14 )
        {
          v15 = ((int (__thiscall *)(Char *, signed int))v14->vfptr[6].Deaffect)(v14, v20);
          kPos_8 = *(_DWORD *)(v15 + 8);
          fXPosa = (0.02 * *(float *)v15 / v22->m_fFullMapScale - v22->m_fMapOffsetX) * v22->m_fMapScaleX;
          fYPos = (512.0 - 0.02 * *(float *)(v15 + 4) / v22->m_fFullMapScale - v22->m_fMapOffsetY) * v22->m_fMapScaleY;
          if ( (unsigned __int8)FullMapWin::IsSameMapName(v22) )
          {
            v20 = 1;
            (*(void (__thiscall **)(int))(*(_DWORD *)v9 + 256))(v9);
            v17 = *(_DWORD *)(v9 + 88);
            v18 = *(_DWORD *)(v9 + 92);
            v19 = *(_DWORD *)(v9 + 96);
            *(float *)(v9 + 88) = fXPosa;
            *(float *)(v9 + 92) = fYPos;
            *(_DWORD *)(v9 + 96) = v19;
          }
          else
          {
            v20 = 0;
            (*(void (__thiscall **)(int))(*(_DWORD *)v9 + 256))(v9);
          }
        }
      }
    }
    while ( v7 );
  }
}
// 502340: could not find valid save-restore pair for edi

//----- (005024B0) --------------------------------------------------------
void __thiscall FullMapWin::RemoveKQTeamMark(FullMapWin *this, int kCharHandle)
{
  FullMapWin *v2; // esi@1
  NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *v3; // ebx@1
  KQTeamMarkWin *v4; // edi@1
  KQTeamMarkWin *v5; // esi@3
  KQTeamMarkWin *pkWin; // [sp+Ch] [bp-4h]@1

  v2 = this;
  v3 = (NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *)&this->m_KQTeamMarkWinMap.vfptr;
  pkWin = 0;
  NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::GetAt(
    (NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *)&this->m_KQTeamMarkWinMap.vfptr,
    kCharHandle,
    &pkWin);
  v4 = pkWin;
  if ( pkWin )
  {
    PgWin::DetachChildWin(v2->m_pkFullMapViewWin, (NiPointer<PgWin> *)&pkWin, (PgWin *)&pkWin->vfptr);
    if ( pkWin )
    {
      v5 = pkWin;
      if ( !InterlockedDecrement((volatile LONG *)&pkWin->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v4->vfptr);
    NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::RemoveAt(v3, kCharHandle);
  }
}

//----- (00502530) --------------------------------------------------------
void __thiscall FullMapWin::RemoveAllKQTeamMark(FullMapWin *this)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v1; // ebx@1
  unsigned int v2; // ecx@1
  unsigned int v3; // eax@1
  NiTMapItem<unsigned long,NiPointer<PgWinBut> > **v4; // edx@2
  NiTMapItem<unsigned long,NiPointer<PgWinBut> > *v5; // eax@5
  NiTMapItem<unsigned long,NiPointer<PgWinBut> > *v6; // esi@6
  PgWin *v7; // edi@7
  int v8; // eax@10
  unsigned int v9; // edx@10
  unsigned int v10; // eax@10
  NiTMapItem<unsigned long,NiPointer<PgWinBut> > **v11; // ecx@11
  PgWin *v12; // edi@16
  KQTeamMarkWin *pkWin; // [sp+8h] [bp-Ch]@7
  NiPointer<PgWin> result; // [sp+Ch] [bp-8h]@15
  FullMapWin *v15; // [sp+10h] [bp-4h]@1

  v1 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_KQTeamMarkWinMap;
  v15 = this;
  v2 = this->m_KQTeamMarkWinMap.m_uiHashSize;
  v3 = 0;
  if ( v2 )
  {
    v4 = v1->m_ppkHashTable;
    while ( !*v4 )
    {
      ++v3;
      ++v4;
      if ( v3 >= v2 )
        goto LABEL_5;
    }
    v5 = v1->m_ppkHashTable[v3];
  }
  else
  {
LABEL_5:
    v5 = 0;
  }
  v6 = v5;
  while ( v6 )
  {
    v7 = (PgWin *)&v6->m_val.m_pObject->vfptr;
    pkWin = (KQTeamMarkWin *)v6->m_val.m_pObject;
    if ( v6->m_pkNext )
    {
      v6 = v6->m_pkNext;
    }
    else
    {
      v8 = v1->vfptr->KeyToHashIndex(v1, LOWORD(v6->m_key));
      v9 = v1->m_uiHashSize;
      v10 = v8 + 1;
      if ( v10 >= v9 )
      {
LABEL_14:
        v6 = 0;
      }
      else
      {
        v11 = &v1->m_ppkHashTable[v10];
        while ( 1 )
        {
          v6 = *v11;
          if ( *v11 )
            break;
          ++v10;
          ++v11;
          if ( v10 >= v9 )
            goto LABEL_14;
        }
      }
    }
    PgWin::DetachChildWin(v15->m_pkFullMapViewWin, &result, v7);
    if ( result.m_pObject )
    {
      v12 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v12 )
          v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
      }
    }
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&pkWin->vfptr);
  }
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v1);
}

//----- (00502610) --------------------------------------------------------
void __thiscall FullMapWin::OpenWorldMap(FullMapWin *this)
{
  FullMapWin *v1; // esi@1
  Name3 *v2; // eax@1
  MapViewInfo *v3; // edi@1
  Name3 result; // [sp+10h] [bp-Ch]@1

  v1 = this;
  v2 = World::GetMapName(&g_kWorld, &result);
  v3 = MapViewInfoTab::GetByMapName(v2);
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v1->m_pkWorldMapWin->vfptr[59].__vecDelDtor)(
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  if ( v3->WorldMapView )
    PgWinMgr::ShowWinAtAbsoluteNear(&Pgg_kWinMgr, (PgWin *)&v1->m_pkWorldMapWin->vfptr);
}

//----- (00502680) --------------------------------------------------------
void __thiscall FullMapWin::ResetQuestHelper(FullMapWin *this)
{
  FullMapWin *v1; // ebx@1
  NiTListItem<PgWinSpr *> *v2; // eax@2
  NiTListItem<PgWinSpr *> *v3; // ecx@2
  PgWin *v4; // edi@5
  PgWin *v5; // edi@7
  NiTListItem<QuestHelperMarkWin *> *v6; // eax@12
  NiTListItem<QuestHelperMarkWin *> *v7; // ecx@12
  PgWin *v8; // edi@15
  PgWin *v9; // edi@17
  NiTListItem<MobAreaMarkWin *> *v10; // eax@22
  NiTListItem<MobAreaMarkWin *> *v11; // ecx@22
  PgWin *v12; // edi@25
  PgWin *v13; // edi@27
  NiPointer<PgWin> result; // [sp+Ch] [bp-4h]@6

  v1 = this;
  while ( v1->m_kQuestNumList.m_kAllocator.m_uiCount )
  {
    v2 = v1->m_kQuestNumList.m_pkHead;
    v3 = v2->m_pkNext;
    v1->m_kQuestNumList.m_pkHead = v2->m_pkNext;
    if ( v3 )
      v3->m_pkPrev = 0;
    else
      v1->m_kQuestNumList.m_pkTail = 0;
    v4 = (PgWin *)&v2->m_element->vfptr;
    v1->m_kQuestNumList.vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *> *)&v1->m_kQuestNumList,
      v2);
    --v1->m_kQuestNumList.m_kAllocator.m_uiCount;
    if ( v4 )
    {
      PgWin::DetachChildWin(v1->m_pkFullMapViewWin, &result, v4);
      if ( result.m_pObject )
      {
        v5 = result.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
        {
          if ( v5 )
            v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
        }
      }
    }
  }
  while ( v1->m_kQuestBallList.m_kAllocator.m_uiCount )
  {
    v6 = v1->m_kQuestBallList.m_pkHead;
    v7 = v6->m_pkNext;
    v1->m_kQuestBallList.m_pkHead = v6->m_pkNext;
    if ( v7 )
      v7->m_pkPrev = 0;
    else
      v1->m_kQuestBallList.m_pkTail = 0;
    v8 = (PgWin *)&v6->m_element->vfptr;
    v1->m_kQuestBallList.vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *> *)&v1->m_kQuestBallList,
      v6);
    --v1->m_kQuestBallList.m_kAllocator.m_uiCount;
    if ( v8 )
    {
      PgWin::DetachChildWin(v1->m_pkFullMapViewWin, &result, v8);
      if ( result.m_pObject )
      {
        v9 = result.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
        {
          if ( v9 )
            v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
        }
      }
    }
  }
  while ( v1->m_kMobAreaList.m_kAllocator.m_uiCount )
  {
    v10 = v1->m_kMobAreaList.m_pkHead;
    v11 = v10->m_pkNext;
    v1->m_kMobAreaList.m_pkHead = v10->m_pkNext;
    if ( v11 )
      v11->m_pkPrev = 0;
    else
      v1->m_kMobAreaList.m_pkTail = 0;
    v12 = (PgWin *)&v10->m_element->vfptr;
    v1->m_kMobAreaList.vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *> *)&v1->m_kMobAreaList,
      v10);
    --v1->m_kMobAreaList.m_kAllocator.m_uiCount;
    if ( v12 )
    {
      PgWin::DetachChildWin(v1->m_pkFullMapViewWin, &result, v12);
      if ( result.m_pObject )
      {
        v13 = result.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
        {
          if ( v13 )
            v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
        }
      }
    }
  }
}

//----- (00502850) --------------------------------------------------------
void __thiscall FullMapWin::AddMapList(FullMapWin *this)
{
  FullMapWin *v1; // esi@1
  unsigned int v2; // ebx@2
  unsigned int v3; // edi@4
  char *v4; // eax@5
  MapInfo *v5; // ebx@6
  unsigned int v6; // edi@6
  signed int v7; // [sp+4h] [bp-8h]@2
  unsigned int _i; // [sp+8h] [bp-4h]@4

  v1 = this;
  if ( ITableBase<MapViewInfo,MapViewInfoTab>::GetTotal() )
  {
    v2 = 1;
    v7 = 1;
    do
    {
      if ( v2 > ITableBase<MapViewInfo,MapViewInfoTab>::GetTotal() )
        break;
      v3 = 0;
      _i = 0;
      if ( ITableBase<MapViewInfo,MapViewInfoTab>::GetTotal() )
      {
        do
        {
          v4 = CDataReader::GetRecord((CDataReader *)(ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable + 4), v3);
          if ( v2 == (unsigned __int8)v4[211] )
          {
            v5 = MapInfoTab::GetByMapName((Name3 *)(v4 + 2));
            v6 = SlideListWin::AddText(v1->m_pkMapSlideListWin, v5->Name);
            SlideListWin::SetText(v1->m_pkMapSlideListWin, v6, 0, v5->Name);
            SlideListWin::SetFontColor(v1->m_pkMapSlideListWin, v6, 255, 255, 255);
            SlideListWin::SetData(v1->m_pkMapSlideListWin, v6, v5->ID);
            ++v1->m_uiMapListTotalCnt;
            v2 = v7;
            v3 = _i;
          }
          _i = ++v3;
        }
        while ( v3 < ITableBase<MapViewInfo,MapViewInfoTab>::GetTotal() );
      }
      v7 = ++v2;
    }
    while ( v2 - 1 < ITableBase<MapViewInfo,MapViewInfoTab>::GetTotal() );
  }
}
// A8C270: using guessed type int ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable;

//----- (00502940) --------------------------------------------------------
void __thiscall FullMapWin::OnSlideBarMapList(FullMapWin *this)
{
  FullMapWin *v1; // esi@1
  SlideBar *v2; // ecx@1
  SlideListWin *v3; // eax@2

  v1 = this;
  v2 = this->m_pkMapSlideBar;
  if ( v2 )
  {
    v3 = v1->m_pkMapSlideListWin;
    if ( v3 )
    {
      SlideBar::SetSplitCnt(v2, v3->m_nSlideSplitCnt);
      v1->m_pkMapSlideListWin->m_nViewStartPos = v1->m_pkMapSlideBar->m_nCurPos;
      SlideListWin::UpdateViewList(v1->m_pkMapSlideListWin);
    }
  }
}

//----- (00502990) --------------------------------------------------------
void __thiscall FullMapWin::UpdateQuestNum(FullMapWin *this)
{
  FullMapWin *v1; // esi@1
  SlideListWin *v2; // ecx@2
  int v3; // eax@2
  int v4; // edi@2
  int v5; // ebx@3
  int v6; // eax@3
  SlideListWin *v7; // ecx@3
  unsigned int v8; // edi@5
  int v9; // eax@7
  unsigned int dwNumCnt; // [sp+4h] [bp-Ch]@3
  int i; // [sp+8h] [bp-8h]@2
  int nPosY; // [sp+Ch] [bp-4h]@3

  v1 = this;
  FullMapWin::ResetQuestNum(this);
  if ( v1->m_kQuestBallList.m_kAllocator.m_uiCount )
  {
    v2 = v1->m_pkQuestSlideListWin;
    v3 = (char *)v2->m_vecButList._Mylast - (char *)v2->m_vecButList._Myfirst;
    v4 = 0;
    i = 0;
    if ( (signed int)(v3 & 0xFFFFFFFC) > 0 )
    {
      do
      {
        v5 = SlideListWin::GetColumPosX(v2, v4, 0);
        v6 = SlideListWin::GetColumPosY(v1->m_pkQuestSlideListWin, v4, 0);
        v7 = v1->m_pkQuestSlideListWin;
        nPosY = v6;
        if ( SlideListWin::GetData(v7, v4 + v7->m_nViewStartPos, &dwNumCnt) && dwNumCnt >= 0xFFFF )
        {
          v8 = dwNumCnt - 0xFFFF;
          if ( dwNumCnt - 0xFFFF >= v1->m_kQuestBallList.m_kAllocator.m_uiCount )
            return;
          ((void (__stdcall *)(_DWORD))v1->m_pkQuestListNumBall[v8]->vfptr[64].__vecDelDtor)(1);
          ((void (__stdcall *)(_DWORD))v1->m_pkQuestListNumBall[v8]->vfptr[43].__vecDelDtor)(v5);
          ((void (__stdcall *)(_DWORD))v1->m_pkQuestListNumBall[v8]->vfptr[44].__vecDelDtor)(nPosY - 5);
          ((void (__stdcall *)(_DWORD))v1->m_pkQuestListNum[v8]->vfptr[64].__vecDelDtor)(1);
          ((void (__stdcall *)(_DWORD))v1->m_pkQuestListNum[v8]->vfptr[43].__vecDelDtor)(v5 + 6);
          ((void (__stdcall *)(_DWORD))v1->m_pkQuestListNum[v8]->vfptr[44].__vecDelDtor)(nPosY);
          v4 = i;
        }
        v2 = v1->m_pkQuestSlideListWin;
        ++v4;
        v9 = v2->m_vecButList._Mylast - v2->m_vecButList._Myfirst;
        i = v4;
      }
      while ( v4 < v9 );
    }
  }
}

//----- (00502AD0) --------------------------------------------------------
void __thiscall FullMapWin::CenterPlaceSelectedMap(FullMapWin *this)
{
  FullMapWin *v1; // esi@1
  unsigned int v2; // edi@1
  SlideListWin *v3; // ecx@2
  unsigned int dwMapID; // [sp+8h] [bp-4h]@2

  v1 = this;
  v2 = 0;
  if ( this->m_uiMapListTotalCnt )
  {
    do
    {
      SlideListWin::GetData(v1->m_pkMapSlideListWin, v2, &dwMapID);
      v3 = v1->m_pkMapSlideListWin;
      if ( dwMapID == v1->m_kSelectedMapID )
      {
        SlideBar::SetCurPos(v1->m_pkMapSlideBar, v2 - (v3->m_vecButList._Mylast - v3->m_vecButList._Myfirst) / 2);
        SlideListWin::SetFontColor(v1->m_pkMapSlideListWin, v2, 255, 255, 0);
      }
      else
      {
        SlideListWin::SetFontColor(v3, v2, 255, 255, 255);
      }
      ++v2;
    }
    while ( v2 < v1->m_uiMapListTotalCnt );
  }
}

//----- (00502B60) --------------------------------------------------------
void __thiscall FullMapWin::AddRaidMember(FullMapWin *this, RaidMemberInfo *pkRaid)
{
  FullMapWin *v2; // ebx@1
  PgWin *v3; // edi@3
  PgWin *v4; // edi@6
  RaidMarkWin *v5; // edi@10
  unsigned int v6; // edx@11
  unsigned int v7; // eax@11
  unsigned int v8; // edx@11
  unsigned int v9; // eax@11
  PgWinSpr *v10; // eax@11
  PgWinSpr *v11; // eax@11
  int v12; // eax@11
  _DWORD *v13; // ecx@11
  NiPointer<PgWin> result; // [sp+8h] [bp-20h]@2
  char acName[21]; // [sp+Ch] [bp-1Ch]@11

  v2 = this;
  if ( !FullMapWin::IsInRaid(this, pkRaid) )
  {
    PgWin::DetachChildWin(v2->m_pkFullMapViewWin, &result, (PgWin *)&v2->m_pkMainCharMarkWin->vfptr);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    PgWin::DetachChildWin(v2->m_pkFullMapViewWin, &result, (PgWin *)&v2->m_pkMainCharMarkSecondWin->vfptr);
    v4 = result.m_pObject;
    if ( result.m_pObject && !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v5 = RaidMarkWin::CreateWin(0, 0, v2->m_spPartySprData.m_pObject, v2->m_pkFullMapViewWin);
    if ( v5 )
    {
      v6 = pkRaid->m_kCharID.n5_code[0];
      v7 = pkRaid->m_kCharID.n5_code[1];
      *(_DWORD *)&acName[8] = pkRaid->m_kCharID.n5_code[2];
      *(_DWORD *)acName = v6;
      v8 = pkRaid->m_kCharID.n5_code[3];
      *(_DWORD *)&acName[4] = v7;
      v9 = pkRaid->m_kCharID.n5_code[4];
      *(_DWORD *)&acName[12] = v8;
      *(_DWORD *)&acName[16] = v9;
      acName[20] = 0;
      v10 = MiniMapMarkWin::GetMarkWin((MiniMapMarkWin *)&v5->vfptr);
      PgWin::SetToolTipWinText((PgWin *)&v10->vfptr, acName);
      result.m_pObject = g_pkToolTipWin;
      v11 = MiniMapMarkWin::GetMarkWin((MiniMapMarkWin *)&v5->vfptr);
      v11->m_pkToolTipWin = result.m_pObject;
      RaidMarkWin::SetRaidMember(v5, pkRaid);
      v12 = (int)v2->m_kRaidList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *> *)&v2->m_kRaidList);
      *(_DWORD *)(v12 + 8) = v5;
      *(_DWORD *)v12 = 0;
      *(_DWORD *)(v12 + 4) = v2->m_kRaidList.m_pkTail;
      v13 = &v2->m_kRaidList.m_pkTail->m_pkNext;
      if ( v13 )
        *v13 = v12;
      else
        v2->m_kRaidList.m_pkHead = (NiTListItem<RaidMarkWin *> *)v12;
      ++v2->m_kRaidList.m_kAllocator.m_uiCount;
      v2->m_kRaidList.m_pkTail = (NiTListItem<RaidMarkWin *> *)v12;
    }
    PgWin::AttachChildWin(v2->m_pkFullMapViewWin, (PgWin *)&v2->m_pkMainCharMarkWin->vfptr);
    PgWin::AttachChildWin(v2->m_pkFullMapViewWin, (PgWin *)&v2->m_pkMainCharMarkSecondWin->vfptr);
  }
}

//----- (00502CF0) --------------------------------------------------------
void __thiscall FullMapWin::RemoveRaidMember(FullMapWin *this, RaidMemberInfo *pkRaid)
{
  NiTListItem<RaidMarkWin *> *v2; // esi@1
  RaidMemberInfo *v3; // ebx@2
  RaidMarkWin *v4; // edi@3
  RaidMemberInfo *v5; // eax@4
  RaidMemberInfo *v6; // esi@13
  void *kCurrIter; // [sp+4h] [bp-8h]@3
  FullMapWin *v8; // [sp+8h] [bp-4h]@1

  v2 = this->m_kRaidList.m_pkHead;
  v8 = this;
  if ( v2 )
  {
    v3 = pkRaid;
    while ( 1 )
    {
      v4 = v2->m_element;
      kCurrIter = v2;
      v2 = v2->m_pkNext;
      if ( v4 )
      {
        v5 = RaidMarkWin::GetRaidMember(v4);
        if ( v5 )
        {
          if ( v5->m_kCharID.n5_code[0] == v3->m_kCharID.n5_code[0]
            && v5->m_kCharID.n5_code[1] == v3->m_kCharID.n5_code[1]
            && v5->m_kCharID.n5_code[2] == v3->m_kCharID.n5_code[2]
            && v5->m_kCharID.n5_code[3] == v3->m_kCharID.n5_code[3]
            && v5->m_kCharID.n5_code[4] == v3->m_kCharID.n5_code[4] )
          {
            break;
          }
        }
      }
      if ( !v2 )
        return;
    }
    PgWin::DetachChildWin(v8->m_pkFullMapViewWin, (NiPointer<PgWin> *)&pkRaid, (PgWin *)&v4->vfptr);
    if ( pkRaid )
    {
      v6 = pkRaid;
      if ( !InterlockedDecrement((volatile LONG *)&pkRaid->m_kCharID.n5_code[1]) )
      {
        if ( v6 )
          (*(void (__thiscall **)(_DWORD, _DWORD))v6->m_kCharID.n5_code[0])(v6, 1);
      }
    }
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&v8->m_kRaidList,
      &kCurrIter);
  }
}

//----- (00502DB0) --------------------------------------------------------
void __thiscall FullMapWin::ClearRaidMember(FullMapWin *this)
{
  FullMapWin *v1; // ebx@1
  NiTListItem<RaidMarkWin *> *v2; // eax@2
  NiTListItem<RaidMarkWin *> *v3; // ecx@2
  PgWin *v4; // edi@5
  PgWin *v5; // edi@7
  NiPointer<PgWin> result; // [sp+4h] [bp-4h]@6

  v1 = this;
  while ( v1->m_kRaidList.m_kAllocator.m_uiCount )
  {
    v2 = v1->m_kRaidList.m_pkHead;
    v3 = v2->m_pkNext;
    v1->m_kRaidList.m_pkHead = v2->m_pkNext;
    if ( v3 )
      v3->m_pkPrev = 0;
    else
      v1->m_kRaidList.m_pkTail = 0;
    v4 = (PgWin *)&v2->m_element->vfptr;
    v1->m_kRaidList.vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *> *)&v1->m_kRaidList,
      v2);
    --v1->m_kRaidList.m_kAllocator.m_uiCount;
    if ( v4 )
    {
      PgWin::DetachChildWin(v1->m_pkFullMapViewWin, &result, v4);
      if ( result.m_pObject )
      {
        v5 = result.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
        {
          if ( v5 )
            v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
        }
      }
    }
  }
}

//----- (00502E60) --------------------------------------------------------
void __thiscall FullMapWin::ClearGTEnemyPos(FullMapWin *this)
{
  FullMapWin *v1; // ebx@1
  NiTListItem<GTIScanMarkWin *> *v2; // esi@1
  PgWin *v3; // ST04_4@2
  PgWin *v4; // ecx@2
  PgWin *v5; // edi@3
  void *kCurrIter; // [sp+8h] [bp-8h]@2
  NiPointer<PgWin> result; // [sp+Ch] [bp-4h]@2

  v1 = this;
  v2 = this->m_kEnemyList.m_pkHead;
  while ( v2 )
  {
    v3 = (PgWin *)&v2->m_element->vfptr;
    v4 = v1->m_pkFullMapViewWin;
    kCurrIter = v2;
    v2 = v2->m_pkNext;
    PgWin::DetachChildWin(v4, &result, v3);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&v1->m_kEnemyList,
      &kCurrIter);
  }
}

//----- (00502ED0) --------------------------------------------------------
void __thiscall FullMapWin::AddGTEnemyPos(FullMapWin *this, ScanMemberInfo *pkMemberInfo)
{
  FullMapWin *v2; // edi@1
  PgWin *v3; // esi@2
  PgWin *v4; // esi@5
  unsigned int v5; // esi@9
  unsigned int v6; // esi@11
  GTIScanMarkWin *v7; // eax@10
  GTIScanMarkWin *v8; // ebx@13
  int v9; // eax@14
  _DWORD *v10; // ecx@14
  NiPointer<PgWin> result; // [sp+Ch] [bp-4h]@1

  v2 = this;
  PgWin::DetachChildWin(this->m_pkFullMapViewWin, &result, (PgWin *)&this->m_pkMainCharMarkWin->vfptr);
  if ( result.m_pObject )
  {
    v3 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
  }
  PgWin::DetachChildWin(v2->m_pkFullMapViewWin, &result, (PgWin *)&v2->m_pkMainCharMarkSecondWin->vfptr);
  v4 = result.m_pObject;
  if ( result.m_pObject && !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v5 = g_pkMainChar->m_dwGuildRegNum;
  if ( GuildTask::GetGuildTournamentImprove()->m_BlueTeam == v5 )
  {
    v7 = GTIScanMarkWin::CreateWin(0, 0, v2->m_spRedPos.m_pObject, v2->m_pkFullMapViewWin);
  }
  else
  {
    v6 = g_pkMainChar->m_dwGuildRegNum;
    if ( GuildTask::GetGuildTournamentImprove()->m_RedTeam != v6 )
      goto LABEL_18;
    v7 = GTIScanMarkWin::CreateWin(0, 0, v2->m_spBluePos.m_pObject, v2->m_pkFullMapViewWin);
  }
  v8 = v7;
  if ( v7 )
  {
    GTIScanMarkWin::SetEnemyPos(v7, *pkMemberInfo);
    v9 = (int)v2->m_kEnemyList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *> *)&v2->m_kEnemyList);
    *(_DWORD *)(v9 + 8) = v8;
    *(_DWORD *)v9 = 0;
    *(_DWORD *)(v9 + 4) = v2->m_kEnemyList.m_pkTail;
    v10 = &v2->m_kEnemyList.m_pkTail->m_pkNext;
    if ( v10 )
      *v10 = v9;
    else
      v2->m_kEnemyList.m_pkHead = (NiTListItem<GTIScanMarkWin *> *)v9;
    ++v2->m_kEnemyList.m_kAllocator.m_uiCount;
    v2->m_kEnemyList.m_pkTail = (NiTListItem<GTIScanMarkWin *> *)v9;
  }
LABEL_18:
  PgWin::AttachChildWin(v2->m_pkFullMapViewWin, (PgWin *)&v2->m_pkMainCharMarkWin->vfptr);
  PgWin::AttachChildWin(v2->m_pkFullMapViewWin, (PgWin *)&v2->m_pkMainCharMarkSecondWin->vfptr);
}

//----- (00503030) --------------------------------------------------------
void __thiscall InvisibleWin::SetAlpha(InvisibleWin *this, float fAlpha)
{
  NiMaterialProperty *v2; // eax@1

  v2 = this->m_pkMaterialProp;
  ++v2->m_uiRevID;
  v2->m_fAlpha = fAlpha;
}

//----- (00503050) --------------------------------------------------------
void __thiscall InvisibleWin::Init(InvisibleWin *this)
{
  InvisibleWin *v1; // esi@1
  NiMaterialProperty *v2; // eax@1
  NiMaterialProperty *v3; // eax@2
  NiMaterialProperty *v4; // eax@4
  float v5; // edx@4
  NiMaterialProperty *v6; // eax@4
  float v7; // edx@4
  NiMaterialProperty *v8; // eax@4

  v1 = this;
  v2 = (NiMaterialProperty *)operator new(0x60u);
  if ( v2 )
    NiMaterialProperty::NiMaterialProperty(v2);
  else
    v3 = 0;
  v1->m_pkMaterialProp = v3;
  v3->m_amb = NiColor::WHITE;
  ++v3->m_uiRevID;
  v4 = v1->m_pkMaterialProp;
  v4->m_diff.r = NiColor::WHITE.r;
  v4->m_diff.g = NiColor::WHITE.g;
  v5 = NiColor::WHITE.b;
  ++v4->m_uiRevID;
  v4->m_diff.b = v5;
  v6 = v1->m_pkMaterialProp;
  v6->m_emit.r = NiColor::WHITE.r;
  v6->m_emit.g = NiColor::WHITE.g;
  v7 = NiColor::WHITE.b;
  ++v6->m_uiRevID;
  v6->m_emit.b = v7;
  v8 = v1->m_pkMaterialProp;
  ++v8->m_uiRevID;
  v8->m_fAlpha = 0.5;
  ((void (__cdecl *)(_DWORD))v1->vfptr[60].__vecDelDtor)(0);
}
// A7D11C: using guessed type const struct NiColor NiColor::WHITE;

//----- (00503150) --------------------------------------------------------
void __thiscall FullMapWin::AddNPC(FullMapWin *this, PROTO_NC_BRIEFINFO_REGENMOB_CMD *pkProto)
{
  FullMapWin *v2; // esi@1
  Char *v3; // eax@1
  Char *v4; // ebx@1
  unsigned __int16 v5; // dx@2
  NiTListItem<NpcMarkWin *> *v6; // eax@2
  NpcMarkWin *v7; // ecx@3
  MobViewInfo *v8; // eax@7
  PgSprData *v9; // eax@8
  NpcMarkWin *v10; // edi@8
  char *v11; // eax@12
  char *v12; // ST14_4@14
  PgWinSpr *v13; // eax@14
  PgWin *v14; // ebx@14
  int v15; // edi@17
  int v16; // ebx@17
  MobViewInfo *v17; // eax@21
  PgSprData *v18; // edi@23
  NiTListItem<NpcMarkWin *> *v19; // eax@29
  NpcMarkWin *v20; // ecx@30
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *v21; // ebx@34
  NpcMarkWin *v22; // esi@34
  MobInfo *v23; // edi@35
  PgWinSpr *v24; // eax@40
  PgWin *v25; // edi@40
  char *v26; // [sp-8h] [bp-1Ch]@38
  NpcMarkWin *pkfindWin; // [sp+8h] [bp-Ch]@30
  NpcMarkWin *pkWin; // [sp+Ch] [bp-8h]@8
  MobInfo *pkMobInfo; // [sp+10h] [bp-4h]@1

  v2 = this;
  v3 = CharMgr::GetChar(&g_kCharMgr, pkProto->handle);
  v4 = v3;
  pkMobInfo = (MobInfo *)v3;
  if ( v3 )
  {
    v5 = v3->m_kHandle;
    v6 = v2->m_kNpcList.m_pkHead;
    if ( v6 )
    {
      while ( 1 )
      {
        v7 = v6->m_element;
        v6 = v6->m_pkNext;
        if ( v7 )
        {
          if ( v7->m_kCharHandle == v5 )
            break;
        }
        if ( !v6 )
          goto LABEL_6;
      }
      if ( FullMapWin::IsInNPC(v2, v5) )
      {
        v15 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
        v16 = v4->m_kCharShape.m_kMobID;
        if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable
                                                              + 16))(
                                ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                                v16) )
        {
          if ( (unsigned __int16)v16 <= *(_WORD *)(v15 + 200) )
          {
            if ( *(_DWORD *)(*(_DWORD *)(v15 + 196) + 4 * v16) )
            {
              if ( Char::IsNPC((Char *)pkMobInfo) )
              {
                v17 = MobViewInfoTab::GetByID(*(_WORD *)&pkMobInfo[8].IsNPC);
                if ( v17 )
                {
                  switch ( v17->MiniMapIcon )
                  {
                    case 0x12:
                      v18 = v2->m_spFlagNormal.m_pObject;
                      goto LABEL_29;
                    case 0x10:
                      v18 = v2->m_spFlagRed.m_pObject;
                      goto LABEL_29;
                    case 0x11:
                      v18 = v2->m_spFlagBlue.m_pObject;
                      goto LABEL_29;
                    case 0x15:
                      v18 = v2->m_spWarpGray.m_pObject;
                      goto LABEL_29;
                    case 0x13:
                      v18 = v2->m_spWarpBlue.m_pObject;
                      goto LABEL_29;
                    case 0x14:
                      v18 = v2->m_spWarpRed.m_pObject;
LABEL_29:
                      v19 = v2->m_kNpcList.m_pkHead;
                      if ( !v19 )
                        return;
                      break;
                    default:
                      return;
                  }
                  while ( 1 )
                  {
                    v20 = v19->m_element;
                    v19 = v19->m_pkNext;
                    pkfindWin = v20;
                    if ( v20 )
                    {
                      if ( v20->m_kCharHandle == pkProto->handle )
                        break;
                    }
                    if ( !v19 )
                      return;
                  }
                  PgWin::DetachChildWin(v2->m_pkFullMapViewWin, (NiPointer<PgWin> *)&pkWin, (PgWin *)&v20->vfptr);
                  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkWin);
                  v21 = (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v2->m_kNpcList;
                  NiTPointerListBase<DFALL<AttackSequence *>,AttackSequence *>::Remove(
                    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *> *)&v2->m_kNpcList,
                    (NiLight *const *)&pkfindWin);
                  v22 = NpcMarkWin::CreateWin(0, 0, v18, &v2->m_kQuestStateImg, v2->m_pkFullMapViewWin, 0);
                  pkfindWin = v22;
                  if ( v22 )
                  {
                    v23 = IIDTableBase<MobInfo,MobInfoTab,unsigned short>::GetByID(*(_WORD *)&pkMobInfo[8].IsNPC);
                    if ( v23 )
                    {
                      if ( MiniMapMarkWin::GetMarkWin((MiniMapMarkWin *)&v22->vfptr) )
                      {
                        if ( Char::IsLinkGate((Char *)pkMobInfo) )
                          v26 = Char::GetLinkGateName((Char *)pkMobInfo);
                        else
                          v26 = v23->Name;
                        v24 = MiniMapMarkWin::GetMarkWin((MiniMapMarkWin *)&v22->vfptr);
                        PgWin::SetToolTipWinText((PgWin *)&v24->vfptr, v26);
                        v25 = g_pkToolTipWin;
                        MiniMapMarkWin::GetMarkWin((MiniMapMarkWin *)&v22->vfptr)->m_pkToolTipWin = v25;
                      }
                    }
                  }
                  v22->m_kCharHandle = pkProto->handle;
                  NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
                    v21,
                    (NiD3DXEffectParameter *const *)&pkfindWin);
                }
              }
            }
          }
        }
      }
    }
    else
    {
LABEL_6:
      if ( Char::IsNPC(v4) )
      {
        v8 = MobViewInfoTab::GetByID(v4->m_kCharShape.m_kMobID);
        if ( v8 )
        {
          v9 = FullMapWin::GetMapIconSprData(v2, v8->MiniMapIcon);
          v10 = NpcMarkWin::CreateWin(
                  0,
                  0,
                  v9,
                  &v2->m_kQuestStateImg,
                  v2->m_pkFullMapViewWin,
                  v2->m_spAutoRunMark.m_pObject);
          pkWin = v10;
          if ( v10 )
          {
            pkMobInfo = IIDTableBase<MobInfo,MobInfoTab,unsigned short>::GetByID(v4->m_kCharShape.m_kMobID);
            if ( pkMobInfo && MiniMapMarkWin::GetMarkWin((MiniMapMarkWin *)&v10->vfptr) )
            {
              if ( Char::IsLinkGate(v4) )
                v11 = Char::GetLinkGateName(v4);
              else
                v11 = pkMobInfo->Name;
              v12 = v11;
              v13 = MiniMapMarkWin::GetMarkWin((MiniMapMarkWin *)&v10->vfptr);
              PgWin::SetToolTipWinText((PgWin *)&v13->vfptr, v12);
              v14 = g_pkToolTipWin;
              MiniMapMarkWin::GetMarkWin((MiniMapMarkWin *)&v10->vfptr)->m_pkToolTipWin = v14;
            }
            v10->m_kCharHandle = pkProto->handle;
            NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
              (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v2->m_kNpcList,
              (NiD3DXEffectParameter *const *)&pkWin);
          }
        }
      }
    }
  }
}
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;

//----- (00503480) --------------------------------------------------------
void __thiscall FullMapWin::Add_KQ_MOB(FullMapWin *this, PROTO_NC_BRIEFINFO_REGENMOB_CMD *pkProto)
{
  FullMapWin *v2; // esi@1
  Char *v3; // eax@1
  Char *v4; // ebx@1
  MobViewInfo *v5; // eax@3
  NpcMarkWin *v6; // edi@7
  MobInfo *v7; // ebx@8
  PgWinSpr *v8; // eax@11
  PgWin *v9; // ebx@11
  Char *pkChar; // [sp+Ch] [bp-8h]@1
  NpcMarkWin *pkWin; // [sp+10h] [bp-4h]@7

  v2 = this;
  v3 = CharMgr::GetChar(&g_kCharMgr, pkProto->handle);
  v4 = v3;
  pkChar = v3;
  if ( v3 )
  {
    if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v3->vfptr[1].Affect)(v3) )
    {
      v5 = MobViewInfoTab::GetByID(v4->m_kCharShape.m_kMobID);
      if ( v5 )
      {
        if ( v5->MiniMapIcon == 13 && !strcmp(v5->InxName, "KQ_G_Boss") )
        {
          if ( !FullMapWin::SearchKQ_MOB(v2, pkProto) )
            return;
          PgWin::DetachChildWin(
            v2->m_pkFullMapViewWin,
            (NiPointer<PgWin> *)&pkWin,
            (PgWin *)&v2->m_pkMainCharMarkWin->vfptr);
          NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkWin);
          PgWin::DetachChildWin(
            v2->m_pkFullMapViewWin,
            (NiPointer<PgWin> *)&pkWin,
            (PgWin *)&v2->m_pkMainCharMarkSecondWin->vfptr);
          NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkWin);
          v6 = NpcMarkWin::CreateWin(
                 0,
                 0,
                 v2->m_spNPCKingdomSprData.m_pObject,
                 &v2->m_kQuestStateImg,
                 v2->m_pkFullMapViewWin,
                 0);
          pkWin = v6;
          if ( v6 )
          {
            v7 = IIDTableBase<MobInfo,MobInfoTab,unsigned short>::GetByID(v4->m_kCharShape.m_kMobID);
            if ( v7 && MiniMapMarkWin::GetMarkWin((MiniMapMarkWin *)&v6->vfptr) )
            {
              if ( (unsigned __int8)((int (*)(void))pkChar->vfptr[1].Affect)() )
              {
                v8 = MiniMapMarkWin::GetMarkWin((MiniMapMarkWin *)&v6->vfptr);
                PgWin::SetToolTipWinText((PgWin *)&v8->vfptr, v7->Name);
                v9 = g_pkToolTipWin;
                MiniMapMarkWin::GetMarkWin((MiniMapMarkWin *)&v6->vfptr)->m_pkToolTipWin = v9;
              }
            }
            v6->m_kCharHandle = pkProto->handle;
            NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
              (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v2->m_kNpcList,
              (NiD3DXEffectParameter *const *)&pkWin);
          }
        }
        PgWin::AttachChildWin(v2->m_pkFullMapViewWin, (PgWin *)&v2->m_pkMainCharMarkWin->vfptr);
        PgWin::AttachChildWin(v2->m_pkFullMapViewWin, (PgWin *)&v2->m_pkMainCharMarkSecondWin->vfptr);
      }
    }
  }
}

//----- (00503630) --------------------------------------------------------
void __thiscall FullMapWin::UpdateNPCPos(FullMapWin *this)
{
  FullMapWin *v1; // edi@1
  NiTListItem<NpcMarkWin *> *v2; // eax@1
  NpcMarkWin *v3; // esi@4
  Char *v4; // eax@5
  Char *v5; // ebx@5
  unsigned int v6; // edi@7
  int v7; // eax@11
  int kPos_8; // ST18_4@11
  float v9; // ST1C_4@12
  float v10; // eax@12
  float v11; // ST20_4@12
  float v12; // ST1C_4@12
  double v13; // st7@12
  float v14; // ST20_4@12
  float kPos; // [sp+4h] [bp-24h]@11
  float kPos_4; // [sp+8h] [bp-20h]@11
  FullMapWin *v17; // [sp+1Ch] [bp-Ch]@1
  unsigned __int16 v18; // [sp+20h] [bp-8h]@6
  NiTListItem<NpcMarkWin *> *kIter; // [sp+24h] [bp-4h]@4

  v1 = this;
  v2 = this->m_kNpcList.m_pkHead;
  v17 = this;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      kIter = v2->m_pkNext;
      if ( v3 )
      {
        v4 = CharMgr::GetChar(&g_kCharMgr, v3->m_kCharHandle);
        v5 = v4;
        if ( v4 )
        {
          v18 = v4->m_kCharShape.m_kMobID;
          if ( v18 != -1 )
          {
            v6 = 0;
            if ( ITableBase<MobViewInfo,MobViewInfoTab>::GetTotal() )
            {
              do
              {
                if ( *(_WORD *)CDataReader::GetRecord(
                                 (CDataReader *)(ITableBase<MobViewInfo,MobViewInfoTab>::ms_pkTable + 4),
                                 v6) == v18 )
                  break;
                ++v6;
              }
              while ( v6 < ITableBase<MobViewInfo,MobViewInfoTab>::GetTotal() );
            }
            v1 = v17;
          }
          v7 = ((int (__thiscall *)(Char *))v5->vfptr[6].Deaffect)(v5);
          kPos = *(float *)v7;
          kPos_4 = *(float *)(v7 + 4);
          kPos_8 = *(_DWORD *)(v7 + 8);
          if ( (unsigned __int8)FullMapWin::IsSameMapName(v1) )
          {
            v9 = v3->m_kLocal.m_Translate.x;
            v10 = v3->m_kLocal.m_Translate.z;
            v11 = v3->m_kLocal.m_Translate.y;
            v12 = (0.02 * kPos / v1->m_fFullMapScale - v1->m_fMapOffsetX) * v1->m_fMapScaleX;
            v13 = (512.0 - 0.02 * kPos_4 / v1->m_fFullMapScale - v1->m_fMapOffsetY) * v1->m_fMapScaleY;
            v3->m_kLocal.m_Translate.x = v12;
            v14 = v13;
            v3->m_kLocal.m_Translate.y = v14;
            v3->m_kLocal.m_Translate.z = v10;
          }
          else
          {
            v3->vfptr[64].__vecDelDtor((NiRefObject *)v3, 0);
          }
        }
      }
      if ( !kIter )
        break;
      v2 = kIter;
    }
  }
}
// A8C29C: using guessed type int ITableBase<MobViewInfo,MobViewInfoTab>::ms_pkTable;

//----- (00503770) --------------------------------------------------------
void __thiscall FullMapWin::AddMapMark(FullMapWin *this, PROTO_NC_SCENARIO_MAPMARK_CMD *pkProto)
{
  FullMapWin *v2; // edi@1
  void (__thiscall ***v3)(_DWORD, _DWORD); // esi@2
  void (__thiscall ***v4)(_DWORD, _DWORD); // esi@5
  PROTO_NC_SCENARIO_MAPMARK_CMD *v5; // ebx@10
  PgSprData *v6; // eax@11
  MapMarkWin *v7; // esi@11
  int v8; // eax@12
  double v9; // st7@12
  float v10; // eax@15
  float v11; // ecx@15
  float v12; // eax@15
  float v13; // ecx@15
  float v14; // ST1C_4@15
  int v15; // edx@18
  MainCharMarkWin *v16; // esi@19
  NiAVObject *v17; // ebx@19
  NiRTTI *v18; // eax@20
  MainCharMarkWin *v19; // esi@25
  NiAVObject *v20; // edi@25
  NiRTTI *v21; // eax@26
  NiPoint2 kPos; // [sp+3Ch] [bp-14h]@12
  float fYPos; // [sp+44h] [bp-Ch]@14
  int i; // [sp+48h] [bp-8h]@1
  MapMarkWin *pkDelWin; // [sp+4Ch] [bp-4h]@14

  v2 = this;
  PgWin::DetachChildWin(this->m_pkFullMapViewWin, (NiPointer<PgWin> *)&i, (PgWin *)&this->m_pkMainCharMarkWin->vfptr);
  if ( i )
  {
    v3 = (void (__thiscall ***)(_DWORD, _DWORD))i;
    if ( !InterlockedDecrement((volatile LONG *)(i + 4)) )
    {
      if ( v3 )
        (**v3)(v3, 1);
    }
  }
  PgWin::DetachChildWin(v2->m_pkFullMapViewWin, (NiPointer<PgWin> *)&i, (PgWin *)&v2->m_pkMainCharMarkSecondWin->vfptr);
  v4 = (void (__thiscall ***)(_DWORD, _DWORD))i;
  if ( i && !InterlockedDecrement((volatile LONG *)(i + 4)) && v4 )
    (**v4)(v4, 1);
  i = 0;
  if ( pkProto->nNum > 0u )
  {
    v5 = pkProto + 2;
    do
    {
      v6 = FullMapWin::GetMapIconSprData(v2, LOBYTE(v5[4].nNum));
      v7 = MapMarkWin::CreateWin(0, 0, v6, v2->m_pkFullMapViewWin);
      if ( v7 )
      {
        v8 = *(_DWORD *)&v5[2].nNum;
        kPos.x = (double)*(unsigned int *)&v5->nNum;
        v9 = (double)*(signed int *)&v5[2].nNum;
        if ( v8 < 0 )
          v9 = v9 + 4294967300.0;
        kPos.y = v9;
        MapMarkWin::SetPos(v7, &kPos);
        *(float *)&pkDelWin = (double)*(unsigned int *)((char *)&v5[4].nNum + 1) / 1000.0 + Timer::ms_fCurTime;
        MapMarkWin::SetLifeTime(v7, *(float *)&pkDelWin);
        *(float *)&pkDelWin = (0.02 * kPos.x / v2->m_fFullMapScale - v2->m_fMapOffsetX) * v2->m_fMapScaleX;
        fYPos = (512.0 - 0.02 * kPos.y / v2->m_fFullMapScale - v2->m_fMapOffsetY) * v2->m_fMapScaleY;
        if ( (unsigned __int8)FullMapWin::IsSameMapName(v2) )
        {
          v7->vfptr[64].__vecDelDtor((NiRefObject *)v7, 1u);
          v10 = v7->m_kLocal.m_Translate.x;
          v11 = v7->m_kLocal.m_Translate.y;
          v12 = v7->m_kLocal.m_Translate.z;
          v13 = fYPos;
          v7->m_kLocal.m_Translate.x = *(float *)&pkDelWin;
          v7->m_kLocal.m_Translate.y = v13;
          v7->m_kLocal.m_Translate.z = v12;
          LODWORD(v14) = v5[-1].nNum;
          *(float *)&pkDelWin = 0.0;
          NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
            (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v2->m_kMapMarkMap,
            LODWORD(v14),
            (NiVBSet **)&pkDelWin);
          if ( *(float *)&pkDelWin != 0.0 )
            FullMapWin::RemoveMapMark(v2, v5[-1].nNum);
          NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::SetAt(
            (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v2->m_kMapMarkMap,
            v5[-1].nNum,
            (NiVBSet *)v7);
        }
      }
      v15 = pkProto->nNum;
      v5 = (PROTO_NC_SCENARIO_MAPMARK_CMD *)((char *)v5 + 15);
      ++i;
    }
    while ( i < v15 );
  }
  v16 = v2->m_pkMainCharMarkWin;
  v17 = (NiAVObject *)&v2->m_pkFullMapViewWin->vfptr;
  if ( v16 )
  {
    v18 = (NiRTTI *)((int (__thiscall *)(MainCharMarkWin *))v16->vfptr[1].__vecDelDtor)(v2->m_pkMainCharMarkWin);
    if ( v18 )
    {
      while ( v18 != &PgWin::m_RTTI )
      {
        v18 = v18->m_pkBaseRTTI;
        if ( !v18 )
          goto LABEL_25;
      }
      ((void (__thiscall *)(NiAVObject *, MainCharMarkWin *, _DWORD))v17->vfptr[29].__vecDelDtor)(v17, v16, 0);
      NiAVObject::UpdateProperties(v17);
      NiAVObject::Update(v17, 0.0, 1);
    }
  }
LABEL_25:
  v19 = v2->m_pkMainCharMarkSecondWin;
  v20 = (NiAVObject *)&v2->m_pkFullMapViewWin->vfptr;
  if ( v19 )
  {
    v21 = (NiRTTI *)((int (__thiscall *)(MainCharMarkWin *))v19->vfptr[1].__vecDelDtor)(v19);
    if ( v21 )
    {
      while ( v21 != &PgWin::m_RTTI )
      {
        v21 = v21->m_pkBaseRTTI;
        if ( !v21 )
          return;
      }
      ((void (__thiscall *)(NiAVObject *, MainCharMarkWin *, _DWORD))v20->vfptr[29].__vecDelDtor)(v20, v19, 0);
      NiAVObject::UpdateProperties(v20);
      NiAVObject::Update(v20, 0.0, 1);
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00503A20) --------------------------------------------------------
void __thiscall FullMapWin::AddKQTeamMark(FullMapWin *this, int kCharHandle)
{
  FullMapWin *v2; // esi@1
  Char *v3; // eax@1
  char v4; // al@2
  PgSprData *v5; // eax@3
  KQTeamMarkWin *v6; // ebx@7
  KQTeamMarkWin *pkDelWin; // [sp+4h] [bp-4h]@8

  v2 = this;
  v3 = CharMgr::GetChar(&g_kCharMgr, kCharHandle);
  if ( v3 )
  {
    v4 = v3->m_byKQTeamType;
    if ( v4 )
    {
      if ( v4 != 1 )
        return;
      v5 = v2->m_spBluePos.m_pObject;
    }
    else
    {
      v5 = v2->m_spRedPos.m_pObject;
    }
    if ( v5 )
    {
      v6 = KQTeamMarkWin::CreateWin(0, 0, v5, v2->m_pkFullMapViewWin);
      if ( v6 )
      {
        pkDelWin = 0;
        NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::GetAt(
          (NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *)&v2->m_KQTeamMarkWinMap.vfptr,
          kCharHandle,
          &pkDelWin);
        if ( pkDelWin )
          FullMapWin::RemoveKQTeamMark(v2, kCharHandle);
        NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::SetAt(
          (NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *)&v2->m_KQTeamMarkWinMap.vfptr,
          kCharHandle,
          v6);
      }
    }
  }
}

//----- (00503AC0) --------------------------------------------------------
void __thiscall FullMapWin::Remove_KQ_MOB(FullMapWin *this, bool b)
{
  NiTListItem<NpcMarkWin *> *v2; // ecx@1
  NpcMarkWin *v3; // ebx@4
  Char *v4; // eax@5
  Char *v5; // esi@5
  unsigned __int16 v6; // di@6
  unsigned int v7; // esi@6
  char *v8; // eax@8
  FullMapWin *v9; // [sp+0h] [bp-4h]@1
  NiTListItem<NpcMarkWin *> *kIter; // [sp+Ch] [bp+8h]@4

  v9 = this;
  this->m_bTeleport = b;
  v2 = this->m_kNpcList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      kIter = v2->m_pkNext;
      if ( v3 )
      {
        v4 = CharMgr::GetChar(&g_kCharMgr, v3->m_kCharHandle);
        v5 = v4;
        if ( v4 )
        {
          ((void (__thiscall *)(_DWORD))v4->vfptr[6].Deaffect)(v4);
          v6 = v5->m_kCharShape.m_kMobID;
          v7 = 0;
          if ( v6 != -1 )
          {
            if ( ITableBase<MobViewInfo,MobViewInfoTab>::GetTotal() )
            {
              while ( 1 )
              {
                v8 = CDataReader::GetRecord((CDataReader *)(ITableBase<MobViewInfo,MobViewInfoTab>::ms_pkTable + 4), v7);
                if ( *(_WORD *)v8 == v6 )
                  break;
                if ( ++v7 >= ITableBase<MobViewInfo,MobViewInfoTab>::GetTotal() )
                  goto LABEL_10;
              }
              v7 = (unsigned int)v8;
            }
            else
            {
LABEL_10:
              v7 = 0;
            }
          }
          if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v3->vfptr[65].__vecDelDtor)(v3)
            && *(_DWORD *)(v7 + 170) == 13 )
          {
            if ( v9->m_bTeleport )
              v3->vfptr[64].__vecDelDtor((NiRefObject *)v3, 0);
          }
        }
      }
      if ( !kIter )
        break;
      v2 = kIter;
    }
  }
}
// A8C29C: using guessed type int ITableBase<MobViewInfo,MobViewInfoTab>::ms_pkTable;

//----- (00503BB0) --------------------------------------------------------
void __thiscall FullMapWin::OnShowMapList(FullMapWin *this)
{
  FullMapWin *v1; // esi@1
  char v2; // al@1
  PgWinSpr *v3; // ecx@1
  SlideBar *v4; // ecx@2
  SlideListWin *v5; // eax@3

  v1 = this;
  v2 = ((int (*)(void))this->m_pkMapListPanel[0]->vfptr[65].__vecDelDtor)();
  v3 = v1->m_pkMapListPanel[0];
  if ( v2 )
  {
    ((void (__stdcall *)(_DWORD))v3->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v1->m_pkMapListPanel[1]->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v1->m_pkMapSlideListWin->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v1->m_pkMapSlideBar->vfptr[64].__vecDelDtor)(0);
  }
  else
  {
    ((void (__stdcall *)(signed int))v3->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(signed int))v1->m_pkMapListPanel[1]->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(signed int))v1->m_pkMapSlideListWin->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(signed int))v1->m_pkMapSlideBar->vfptr[64].__vecDelDtor)(1);
    FullMapWin::CenterPlaceSelectedMap(v1);
    v4 = v1->m_pkMapSlideBar;
    if ( v4 )
    {
      v5 = v1->m_pkMapSlideListWin;
      if ( v5 )
      {
        SlideBar::SetSplitCnt(v4, v5->m_nSlideSplitCnt);
        v1->m_pkMapSlideListWin->m_nViewStartPos = v1->m_pkMapSlideBar->m_nCurPos;
        SlideListWin::UpdateViewList(v1->m_pkMapSlideListWin);
      }
    }
  }
}

//----- (00503CB0) --------------------------------------------------------
void __thiscall FullMapWin::OnShowQuestList(FullMapWin *this, bool b)
{
  FullMapWin *v2; // esi@1
  void *(__thiscall *v3)(NiRefObject *, unsigned int); // edx@1

  v2 = this;
  v3 = this->m_pkQuestListPanel[0]->vfptr[64].__vecDelDtor;
  if ( b == 1 )
  {
    ((void (__stdcall *)(_DWORD))v3)(1);
    ((void (__stdcall *)(_DWORD))v2->m_pkQuestListPanel[1]->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v2->m_pkQuestSlideListWin->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v2->m_pkQuestSlideBar->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v2->m_pkQuestListBtn[0]->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkQuestListBtn[0]->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkQuestListBtn[1]->vfptr[60].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v2->m_pkQuestListBtn[1]->vfptr[64].__vecDelDtor)(1);
    FullMapWin::UpdateQuestNum(v2);
  }
  else
  {
    ((void (__stdcall *)(_DWORD))v3)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkQuestListPanel[1]->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkQuestSlideListWin->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkQuestSlideBar->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkQuestListBtn[0]->vfptr[60].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v2->m_pkQuestListBtn[0]->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v2->m_pkQuestListBtn[1]->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkQuestListBtn[1]->vfptr[64].__vecDelDtor)(0);
    FullMapWin::ResetQuestNum(v2);
  }
}

//----- (00503DF0) --------------------------------------------------------
void __thiscall FullMapWin::UpdateSlideBarQuestList(FullMapWin *this)
{
  FullMapWin *v1; // esi@1
  SlideBar *v2; // ecx@1
  SlideListWin *v3; // eax@2

  v1 = this;
  v2 = this->m_pkQuestSlideBar;
  if ( v2 )
  {
    v3 = v1->m_pkQuestSlideListWin;
    if ( v3 )
    {
      SlideBar::SetSplitCnt(v2, v3->m_nSlideSplitCnt);
      v1->m_pkQuestSlideListWin->m_nViewStartPos = v1->m_pkQuestSlideBar->m_nCurPos;
      SlideListWin::UpdateViewList(v1->m_pkQuestSlideListWin);
      FullMapWin::UpdateQuestNum(v1);
    }
  }
}

//----- (00503E40) --------------------------------------------------------
void __thiscall FullMapWin::OnShowWin(FullMapWin *this)
{
  FullMapWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  GameFrameWork *v3; // eax@8

  v1 = this;
  CNSTimer_Interval::ReSet(&this->m_kRandomTimer_Interval, Timer::ms_fCurTime);
  v2 = v1->m_pkMapSlideListWin;
  v1->m_kRandomTimer_Interval.m_fCheckTime = 0.5;
  if ( (unsigned __int8)((int (*)(void))v2->vfptr[65].__vecDelDtor)() == 1 )
    FullMapWin::OnShowMapList(v1);
  if ( v1->m_pkAutoRunText )
  {
    if ( ChargedItemList::IsEffecting(EE_AUTOPATHFIND) )
    {
      ((void (__stdcall *)(_DWORD))v1->m_pkAutoRunText->vfptr[64].__vecDelDtor)(0);
    }
    else if ( User::Lv(&g_kUser) <= 0x3C )
    {
      ((void (__stdcall *)(_DWORD))v1->m_pkAutoRunText->vfptr[64].__vecDelDtor)(1);
    }
  }
  v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v3 )
    GameFrameWork::OpenPlayGuideWin(v3, BIL_MAP_1);
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00503EE0) --------------------------------------------------------
void __userpurge FullMapWin::UpdateMeWin(FullMapWin *this@<ecx>, signed int a2@<edi>, float fCurTime)
{
  FullMapWin *v3; // esi@1
  char *v4; // eax@1
  MainCharMarkWin *v5; // eax@7
  Name3 *v6; // eax@10
  NiTListItem<NpcMarkWin *> *v7; // esi@16
  NpcMarkWin *v8; // ecx@17
  GameFrameWork *v9; // eax@19
  Name3 result; // [sp+14h] [bp-Ch]@10

  v3 = this;
  v4 = this->m_kMapTitle._Bx._Buf;
  if ( this->m_kMapTitle._Myres >= 0x10 )
    v4 = *(char **)v4;
  ((void (__stdcall *)(_DWORD))this->m_pkMapNameTextWin->vfptr[118].__vecDelDtor)(v4);
  FullMapWin::UpdateMainCharDir(v3);
  FullMapWin::UpdateMainCharPos(v3);
  if ( RaidInfo::IsMeRaidMember(&g_kRaidinfo) )
    FullMapWin::UpdateRaidPos(v3);
  else
    FullMapWin::UpdatePartyPos(v3);
  FullMapWin::UpdateNPCPos(v3);
  FullMapWin::UpdateMapMark(v3);
  FullMapWin::UpdateKQTeamMark(v3, a2);
  FullMapWin::UpdateGTEnemyPos(v3);
  if ( CNSTimer_Interval::IsRun_GetCount(&v3->m_kRandomTimer_Interval, fCurTime) )
  {
    v5 = v3->m_pkMainCharMarkWin;
    if ( v5->m_uFlags & 1 )
    {
      v5->m_uFlags &= 0xFFFEu;
      v3->m_pkMainCharMarkSecondWin->m_uFlags |= 1u;
    }
    else
    {
      v5->m_uFlags |= 1u;
      v3->m_pkMainCharMarkSecondWin->m_uFlags &= 0xFFFEu;
    }
  }
  v6 = World::GetMapName(&g_kWorld, &result);
  if ( v3->m_kSelectedMapName.n3_code[0] != v6->n3_code[0]
    || v3->m_kSelectedMapName.n3_code[1] != v6->n3_code[1]
    || v3->m_kSelectedMapName.n3_code[2] != v6->n3_code[2] )
  {
    v3->m_pkMainCharMarkWin->m_uFlags |= 1u;
    v3->m_pkMainCharMarkSecondWin->m_uFlags |= 1u;
  }
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
  {
    GameFrameWork::UpdateUIScroll(v3->m_pkMapSlideListWin, v3->m_pkMapSlideBar);
    GameFrameWork::UpdateUIScroll(v3->m_pkQuestSlideListWin, v3->m_pkQuestSlideBar);
  }
  v7 = v3->m_kNpcList.m_pkHead;
  while ( v7 )
  {
    v8 = v7->m_element;
    v7 = v7->m_pkNext;
    if ( v8
      && (unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD))v8->vfptr[83].__vecDelDtor)(
                            PgWin::ms_iMsX,
                            PgWin::ms_iMsY) )
    {
      v9 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v9 )
        GameFrameWork::OpenPlayGuideWin(v9, BIL_MAP_3);
    }
  }
}

//----- (00504080) --------------------------------------------------------
void __thiscall FullMapWin::AddNPC(FullMapWin *this, PROTO_NC_BRIEFINFO_MOB_CMD *pkProto)
{
  FullMapWin *v2; // esi@1
  PgWin *v3; // edi@2
  PgWin *v4; // edi@5
  signed int v5; // edi@9
  PROTO_NC_BRIEFINFO_REGENMOB_CMD *v6; // ebx@10
  MainCharMarkWin *v7; // edi@12
  NiAVObject *v8; // ebx@12
  NiRTTI *v9; // eax@13
  MainCharMarkWin *v10; // edi@18
  NiAVObject *v11; // esi@18
  NiRTTI *v12; // eax@19
  NiPointer<PgWin> result; // [sp+2Ch] [bp-4h]@1

  v2 = this;
  PgWin::DetachChildWin(this->m_pkFullMapViewWin, &result, (PgWin *)&this->m_pkMainCharMarkWin->vfptr);
  if ( result.m_pObject )
  {
    v3 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
  }
  PgWin::DetachChildWin(v2->m_pkFullMapViewWin, &result, (PgWin *)&v2->m_pkMainCharMarkSecondWin->vfptr);
  v4 = result.m_pObject;
  if ( result.m_pObject && !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v5 = 0;
  if ( pkProto->mobnum )
  {
    v6 = (PROTO_NC_BRIEFINFO_REGENMOB_CMD *)&pkProto[1];
    do
    {
      FullMapWin::AddNPC(v2, v6);
      ++v5;
      ++v6;
    }
    while ( v5 < pkProto->mobnum );
  }
  v7 = v2->m_pkMainCharMarkWin;
  v8 = (NiAVObject *)&v2->m_pkFullMapViewWin->vfptr;
  if ( v7 )
  {
    v9 = (NiRTTI *)((int (__thiscall *)(_DWORD))v7->vfptr[1].__vecDelDtor)(v2->m_pkMainCharMarkWin);
    if ( v9 )
    {
      while ( v9 != &PgWin::m_RTTI )
      {
        v9 = v9->m_pkBaseRTTI;
        if ( !v9 )
          goto LABEL_18;
      }
      ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v8->vfptr[29].__vecDelDtor)(v8, v7, 0);
      NiAVObject::UpdateProperties(v8);
      NiAVObject::Update(v8, 0.0, 1);
    }
  }
LABEL_18:
  v10 = v2->m_pkMainCharMarkSecondWin;
  v11 = (NiAVObject *)&v2->m_pkFullMapViewWin->vfptr;
  if ( v10 )
  {
    v12 = (NiRTTI *)((int (__thiscall *)(_DWORD))v10->vfptr[1].__vecDelDtor)(v10);
    if ( v12 )
    {
      while ( v12 != &PgWin::m_RTTI )
      {
        v12 = v12->m_pkBaseRTTI;
        if ( !v12 )
          return;
      }
      ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v11->vfptr[29].__vecDelDtor)(v11, v10, 0);
      NiAVObject::UpdateProperties(v11);
      NiAVObject::Update(v11, 0.0, 1);
    }
  }
}

//----- (005041E0) --------------------------------------------------------
void __thiscall FullMapWin::UpdateQuestHelper(FullMapWin *this)
{
  FullMapWin *v1; // ebx@1
  NiTListItem<MobAreaMarkWin *> *v2; // edi@1
  MobAreaMarkWin *v3; // esi@2
  PgWinSpr *v4; // eax@3
  PgWinSpr *v5; // eax@3
  PgWinSpr *v6; // eax@3
  float v7; // edx@3
  float v8; // ecx@3
  double v9; // st7@3
  float v10; // eax@5
  int v11; // edi@9
  NiTListItem<float> *v12; // esi@10
  double v13; // st7@10
  double v14; // st6@10
  double v15; // st5@11
  double v16; // st4@12
  NiTListItem<float> *v17; // esi@12
  double v18; // st4@12
  int v19; // ecx@18
  int v20; // edx@18
  int v21; // eax@18
  float v22; // ecx@18
  PgWin *v23; // esi@18
  float v24; // edx@18
  float v25; // ecx@18
  float v26; // eax@18
  float v27; // eax@18
  double v28; // st7@18
  NiTListItem<float> *v29; // eax@18
  NiTListItem<float> *v30; // eax@22
  PgWin *v31; // ecx@25
  int v32; // edx@29
  NiRTTI *v33; // eax@29
  NiAVObject *v34; // edi@33
  PgWin *v35; // edi@35
  NiAVObject *v36; // edi@38
  NiRTTI *v37; // eax@38
  NiTListItem<float> *v38; // esi@44
  NiTListItem<float> *v39; // ST24_4@45
  PgTList<float> kList; // [sp+38h] [bp-64h]@1
  float v41; // [sp+48h] [bp-54h]@18
  float v42; // [sp+4Ch] [bp-50h]@18
  float v43; // [sp+54h] [bp-48h]@18
  float v44; // [sp+58h] [bp-44h]@18
  float v45; // [sp+60h] [bp-3Ch]@3
  NiPoint2 v46; // [sp+64h] [bp-38h]@3
  NiPointer<PgWin> result; // [sp+6Ch] [bp-30h]@3
  NiPoint2 kPos; // [sp+70h] [bp-2Ch]@3
  float fOldY; // [sp+78h] [bp-24h]@12
  float fXPos; // [sp+7Ch] [bp-20h]@3
  float fWidth; // [sp+80h] [bp-1Ch]@3
  float fYPos; // [sp+84h] [bp-18h]@3
  float fDeltaX; // [sp+88h] [bp-14h]@3
  float v54; // [sp+8Ch] [bp-10h]@10
  int v55; // [sp+98h] [bp-4h]@1

  v1 = this;
  kList.m_kAllocator.m_uiCount = 0;
  kList.m_pkHead = 0;
  kList.m_pkTail = 0;
  kList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,float>Vtbl *)&PgTList<float>::`vftable';
  v2 = this->m_kMobAreaList.m_pkHead;
  v55 = 0;
  while ( v2 )
  {
    v3 = v2->m_element;
    v2 = v2->m_pkNext;
    if ( v3 )
    {
      MobAreaMarkWin::GetPos(v3, &kPos);
      fXPos = (0.02 * kPos.x / v1->m_fFullMapScale - v1->m_fMapOffsetX) * v1->m_fMapScaleX;
      fYPos = (512.0 - 0.02 * kPos.y / v1->m_fFullMapScale - v1->m_fMapOffsetY) * v1->m_fMapScaleY;
      v4 = MiniMapMarkWin::GetMarkWin((MiniMapMarkWin *)&v3->vfptr);
      result.m_pObject = (PgWin *)((unsigned int)((int (__thiscall *)(PgWinSpr *))v4->vfptr[36].__vecDelDtor)(v4) >> 1);
      fWidth = (double)(unsigned int)result.m_pObject;
      v5 = MiniMapMarkWin::GetMarkWin((MiniMapMarkWin *)&v3->vfptr);
      result.m_pObject = (PgWin *)((unsigned int)((int (__thiscall *)(PgWinSpr *))v5->vfptr[37].__vecDelDtor)(v5) >> 1);
      fDeltaX = (double)(unsigned int)result.m_pObject;
      v6 = MiniMapMarkWin::GetMarkWin((MiniMapMarkWin *)&v3->vfptr);
      v7 = v6->m_kLocal.m_Translate.y;
      v45 = v6->m_kLocal.m_Translate.x;
      v8 = v6->m_kLocal.m_Translate.z;
      fXPos = fXPos - fWidth;
      fWidth = fYPos - fDeltaX;
      v45 = fXPos;
      v9 = fWidth;
      v6->m_kLocal.m_Translate.x = fXPos;
      v46.x = v9;
      v6->m_kLocal.m_Translate.y = v46.x;
      v6->m_kLocal.m_Translate.z = v8;
    }
  }
  v10 = *(float *)&v1->m_kQuestBallList.m_pkHead;
  fYPos = *(float *)&v1->m_kQuestNumList.m_pkHead;
  if ( v10 != 0.0 )
  {
    while ( fYPos != 0.0 )
    {
      v11 = *(_DWORD *)(LODWORD(v10) + 8);
      fXPos = *(float *)LODWORD(v10);
      if ( v11 )
      {
        QuestHelperMarkWin::GetPos((QuestHelperMarkWin *)v11, &v46);
        v12 = kList.m_pkHead;
        v54 = (0.02 * v46.x / v1->m_fFullMapScale - v1->m_fMapOffsetX) * v1->m_fMapScaleX;
        fWidth = (512.0 - 0.02 * v46.y / v1->m_fFullMapScale - v1->m_fMapOffsetY) * v1->m_fMapScaleY;
        v13 = fWidth;
        v14 = v54;
        if ( kList.m_pkHead )
        {
          v15 = 21.0;
          do
          {
            v16 = v12->m_element;
            v17 = v12->m_pkNext;
            fDeltaX = v16;
            fOldY = v17->m_element;
            v12 = v17->m_pkNext;
            v18 = fDeltaX;
            fDeltaX = fDeltaX - v14;
            fDeltaX = fabs(fDeltaX);
            if ( fDeltaX < v15 )
            {
              fOldY = fOldY - v13;
              fOldY = fabs(fOldY);
              if ( fOldY < v15 )
              {
                if ( v14 < v18 )
                  fDeltaX = fDeltaX * -1.0;
                fOldY = COERCE_FLOAT((*(int (__thiscall **)(int))(*(_DWORD *)v11 + 144))(v11));
                v54 = (double)LODWORD(fOldY) - fDeltaX + v54;
                v13 = fWidth;
                v15 = 21.0;
                v14 = v54;
              }
            }
          }
          while ( v12 );
        }
        v19 = *(_DWORD *)(v11 + 88);
        v20 = *(_DWORD *)(v11 + 92);
        v21 = *(_DWORD *)(v11 + 96);
        v43 = v14;
        *(float *)(v11 + 88) = v43;
        v22 = fYPos;
        v44 = v13;
        *(float *)(v11 + 92) = v44;
        *(_DWORD *)(v11 + 96) = v21;
        v23 = *(PgWin **)(LODWORD(v22) + 8);
        v24 = v23->m_kLocal.m_Translate.x;
        fOldY = v14 - 5.0;
        v25 = *(float *)LODWORD(v22);
        v26 = v23->m_kLocal.m_Translate.y;
        v41 = v24;
        fDeltaX = v13 - 7.0;
        v42 = v26;
        v27 = v23->m_kLocal.m_Translate.z;
        v41 = fOldY;
        fYPos = v25;
        v28 = fDeltaX;
        v23->m_kLocal.m_Translate.x = fOldY;
        v42 = v28;
        v23->m_kLocal.m_Translate.y = v42;
        v23->m_kLocal.m_Translate.z = v27;
        v23->vfptr[60].__vecDelDtor((NiRefObject *)v23, 0);
        v23->vfptr[64].__vecDelDtor((NiRefObject *)v23, 1u);
        v29 = kList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,float> *)&kList);
        v29->m_element = v54;
        v29->m_pkNext = 0;
        v29->m_pkPrev = kList.m_pkTail;
        if ( kList.m_pkTail )
          kList.m_pkTail->m_pkNext = v29;
        else
          kList.m_pkHead = v29;
        ++kList.m_kAllocator.m_uiCount;
        kList.m_pkTail = v29;
        v30 = kList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,float> *)&kList);
        v30->m_element = fWidth;
        v30->m_pkNext = 0;
        v30->m_pkPrev = kList.m_pkTail;
        if ( kList.m_pkTail )
          kList.m_pkTail->m_pkNext = v30;
        else
          kList.m_pkHead = v30;
        v31 = v1->m_pkFullMapViewWin;
        ++kList.m_kAllocator.m_uiCount;
        kList.m_pkTail = v30;
        PgWin::DetachChildWin(v31, (NiPointer<PgWin> *)&kPos.y, (PgWin *)v11);
        if ( LODWORD(kPos.y) )
        {
          fOldY = kPos.y;
          if ( !InterlockedDecrement((volatile LONG *)(LODWORD(kPos.y) + 4)) && fOldY != 0.0 )
            (**(void (__stdcall ***)(_DWORD))LODWORD(fOldY))(1);
        }
        v32 = *(_DWORD *)v11;
        fWidth = *(float *)&v1->m_pkFullMapViewWin;
        v33 = (NiRTTI *)(*(int (__thiscall **)(int))(v32 + 4))(v11);
        if ( v33 )
        {
          while ( v33 != &PgWin::m_RTTI )
          {
            v33 = v33->m_pkBaseRTTI;
            if ( !v33 )
              goto LABEL_34;
          }
          (*(void (__stdcall **)(int, _DWORD))(*(_DWORD *)LODWORD(fWidth) + 116))(v11, 0);
          v34 = (NiAVObject *)LODWORD(fWidth);
          NiAVObject::UpdateProperties((NiAVObject *)LODWORD(fWidth));
          NiAVObject::Update(v34, 0.0, 1);
        }
LABEL_34:
        PgWin::DetachChildWin(v1->m_pkFullMapViewWin, &result, v23);
        if ( result.m_pObject )
        {
          v35 = result.m_pObject;
          if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
          {
            if ( v35 )
              v35->vfptr->__vecDelDtor((NiRefObject *)v35, 1u);
          }
        }
        v36 = (NiAVObject *)&v1->m_pkFullMapViewWin->vfptr;
        v37 = (NiRTTI *)((int (__thiscall *)(PgWin *))v23->vfptr[1].__vecDelDtor)(v23);
        if ( v37 )
        {
          while ( v37 != &PgWin::m_RTTI )
          {
            v37 = v37->m_pkBaseRTTI;
            if ( !v37 )
              goto LABEL_43;
          }
          ((void (__thiscall *)(NiAVObject *, PgWin *, _DWORD))v36->vfptr[29].__vecDelDtor)(v36, v23, 0);
          NiAVObject::UpdateProperties(v36);
          NiAVObject::Update(v36, 0.0, 1);
        }
      }
LABEL_43:
      if ( fXPos == 0.0 )
        break;
      v10 = fXPos;
    }
  }
  kList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,float>Vtbl *)&PgTList<float>::`vftable';
  v38 = kList.m_pkHead;
  v55 = 1;
  if ( kList.m_pkHead )
  {
    do
    {
      v39 = v38;
      v38 = v38->m_pkNext;
      kList.vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,float> *)&kList, v39);
    }
    while ( v38 );
  }
}
// 98C144: using guessed type int (__thiscall *PgTList<float>::`vftable')(void *p, char);

//----- (005046D0) --------------------------------------------------------
void __thiscall FullMapWin::OnQuestListLClick(FullMapWin *this, unsigned int nIndex)
{
  FullMapWin *v2; // esi@1
  SlideBar *v3; // ecx@1
  SlideListWin *v4; // eax@2

  v2 = this;
  FullMapWin::UpdateArea(this, nIndex);
  v3 = v2->m_pkQuestSlideBar;
  if ( v3 )
  {
    v4 = v2->m_pkQuestSlideListWin;
    if ( v4 )
    {
      SlideBar::SetSplitCnt(v3, v4->m_nSlideSplitCnt);
      v2->m_pkQuestSlideListWin->m_nViewStartPos = v2->m_pkQuestSlideBar->m_nCurPos;
      SlideListWin::UpdateViewList(v2->m_pkQuestSlideListWin);
      FullMapWin::UpdateQuestNum(v2);
    }
  }
}

//----- (00504730) --------------------------------------------------------
void __thiscall FullMapWin::OnSlideBarQuestList(FullMapWin *this)
{
  FullMapWin *v1; // esi@1
  SlideBar *v2; // ecx@1
  SlideListWin *v3; // eax@2

  v1 = this;
  v2 = this->m_pkQuestSlideBar;
  if ( v2 )
  {
    v3 = v1->m_pkQuestSlideListWin;
    if ( v3 )
    {
      SlideBar::SetSplitCnt(v2, v3->m_nSlideSplitCnt);
      v1->m_pkQuestSlideListWin->m_nViewStartPos = v1->m_pkQuestSlideBar->m_nCurPos;
      SlideListWin::UpdateViewList(v1->m_pkQuestSlideListWin);
      FullMapWin::UpdateQuestNum(v1);
    }
  }
}

//----- (00504780) --------------------------------------------------------
void __thiscall FullMapWin::FullMapWin(FullMapWin *this)
{
  FullMapWin *v1; // esi@1
  char *v2; // eax@1
  unsigned int v3; // ST18_4@1
  char *v4; // eax@1
  unsigned int v5; // ST08_4@1
  PgSprData *v6; // edi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&FullMapWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&FullMapWin::`vftable'{for `IDirectMessenger'};
  v1->m_kRaidList.m_kAllocator.m_uiCount = 0;
  v1->m_kRaidList.m_pkHead = 0;
  v1->m_kRaidList.m_pkTail = 0;
  v1->m_kRaidList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>Vtbl *)&PgTList<RaidMarkWin *>::`vftable';
  v1->m_kNpcList.m_kAllocator.m_uiCount = 0;
  v1->m_kNpcList.m_pkHead = 0;
  v1->m_kNpcList.m_pkTail = 0;
  v1->m_kNpcList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>Vtbl *)&PgTList<NpcMarkWin *>::`vftable';
  v1->m_kPartyList.m_kAllocator.m_uiCount = 0;
  v1->m_kPartyList.m_pkHead = 0;
  v1->m_kPartyList.m_pkTail = 0;
  v1->m_kPartyList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>Vtbl *)&PgTList<PartyMarkWin *>::`vftable';
  v1->m_spPartySprData.m_pObject = 0;
  v1->m_spNPCSoulStoneSprData.m_pObject = 0;
  v1->m_spNPCGuildSprData.m_pObject = 0;
  v1->m_spNPCQuestSprData.m_pObject = 0;
  v1->m_spNPCStoreSprData.m_pObject = 0;
  v1->m_spNPCKingdomSprData.m_pObject = 0;
  v1->m_spNPCMineSprData.m_pObject = 0;
  v1->m_spNPCFurnitureSprData.m_pObject = 0;
  v1->m_spNPCSmithSprData.m_pObject = 0;
  v1->m_spNPCSkillSprData.m_pObject = 0;
  v1->m_spNPCHelpSprData.m_pObject = 0;
  v1->m_spNPCTemplarSprData.m_pObject = 0;
  v1->m_spNPCItemSprData.m_pObject = 0;
  v1->m_spNPCNormalSprData.m_pObject = 0;
  v1->m_spNPCWTitleSprData.m_pObject = 0;
  v1->m_kQuestStateImg.spIng.m_pObject = 0;
  v1->m_kQuestStateImg.spAble.m_pObject = 0;
  v1->m_kQuestStateImg.spReward.m_pObject = 0;
  v1->m_kQuestStateImg.spLowAble.m_pObject = 0;
  v1->m_spMainCharSprData.m_pObject = 0;
  v1->m_spLinkSprData.m_pObject = 0;
  v1->m_spLinkTownSprData.m_pObject = 0;
  v1->m_spMiniHouseSprData.m_pObject = 0;
  v1->m_spMainCharSprDataSecond.m_pObject = 0;
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kRandomTimer_Interval);
  v1->m_spFlagNormal.m_pObject = 0;
  v1->m_spFlagRed.m_pObject = 0;
  v1->m_spFlagBlue.m_pObject = 0;
  v1->m_spWarpRed.m_pObject = 0;
  v1->m_spWarpBlue.m_pObject = 0;
  v1->m_spWarpGray.m_pObject = 0;
  v1->m_spFullMapGeom.m_pObject = 0;
  v1->m_spFullMapTexProp.m_pObject = 0;
  v1->m_spAutoRunMark.m_pObject = 0;
  v1->m_spMobChiefSprData.m_pObject = 0;
  v1->m_spMobNormalSprData.m_pObject = 0;
  v1->m_spMobDmgSprData.m_pObject = 0;
  v1->m_spRedWoodSprData.m_pObject = 0;
  v1->m_spBlueWoodSprData.m_pObject = 0;
  v1->m_spCaptureFlagSprData.m_pObject = 0;
  v1->m_kQuestBallList.m_kAllocator.m_uiCount = 0;
  v1->m_kQuestBallList.m_pkHead = 0;
  v1->m_kQuestBallList.m_pkTail = 0;
  v1->m_kQuestBallList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>Vtbl *)&PgTList<QuestHelperMarkWin *>::`vftable';
  v1->m_kQuestNumList.m_kAllocator.m_uiCount = 0;
  v1->m_kQuestNumList.m_pkHead = 0;
  v1->m_kQuestNumList.m_pkTail = 0;
  v1->m_kQuestNumList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>Vtbl *)&PgTList<PgWinSpr *>::`vftable';
  v1->m_spQuestHelperNumBall.m_pObject = 0;
  `eh vector constructor iterator'(
    v1->m_spQuestHelperNum,
    4u,
    40,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_kSelectedMapName.n3_code[2] = 0;
  v1->m_kSelectedMapName.n3_code[1] = 0;
  v1->m_kSelectedMapName.n3_code[0] = 0;
  v1->m_kMapTitle._Myres = 15;
  v1->m_kMapTitle._Mysize = 0;
  v1->m_kMapTitle._Bx._Buf[0] = 0;
  CNSTimer_MarkCheck::CNSTimer_MarkCheck(&v1->m_kMarkCheck);
  v1->m_kMobAreaList.m_kAllocator.m_uiCount = 0;
  v1->m_kMobAreaList.m_pkHead = 0;
  v1->m_kMobAreaList.m_pkTail = 0;
  v1->m_kMobAreaList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>Vtbl *)&PgTList<MobAreaMarkWin *>::`vftable';
  v1->m_spRedPos.m_pObject = 0;
  v1->m_spBluePos.m_pObject = 0;
  v1->m_kEnemyList.m_kAllocator.m_uiCount = 0;
  v1->m_kEnemyList.m_pkHead = 0;
  v1->m_kEnemyList.m_pkTail = 0;
  v1->m_kEnemyList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>Vtbl *)&PgTList<GTIScanMarkWin *>::`vftable';
  v1->m_kVisibleControls._Myfirst = 0;
  v1->m_kVisibleControls._Mylast = 0;
  v1->m_kVisibleControls._Myend = 0;
  v1->m_kMapMarkMap.vfptr = (NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>Vtbl *)&NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>::`vftable';
  v1->m_kMapMarkMap.m_uiHashSize = 37;
  v1->m_kMapMarkMap.m_kAllocator.m_uiCount = 0;
  v2 = (char *)operator new[](0x94u);
  v3 = 4 * v1->m_kMapMarkMap.m_uiHashSize;
  v1->m_kMapMarkMap.m_ppkHashTable = (NiTMapItem<unsigned int,MapMarkWin *> **)v2;
  memset(v2, 0, v3);
  v1->m_kMapMarkMap.vfptr = (NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>Vtbl *)&NiTMap<unsigned int,MapMarkWin *>::`vftable';
  v1->m_KQTeamMarkWinMap.vfptr = (NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>Vtbl *)&NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::`vftable';
  v1->m_KQTeamMarkWinMap.m_uiHashSize = 37;
  v1->m_KQTeamMarkWinMap.m_kAllocator.m_uiCount = 0;
  v4 = (char *)operator new[](0x94u);
  v5 = 4 * v1->m_KQTeamMarkWinMap.m_uiHashSize;
  v1->m_KQTeamMarkWinMap.m_ppkHashTable = (NiTMapItem<unsigned short,KQTeamMarkWin *> **)v4;
  memset(v4, 0, v5);
  v1->m_KQTeamMarkWinMap.vfptr = (NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>Vtbl *)&NiTMap<unsigned short,KQTeamMarkWin *>::`vftable';
  v1->m_fFullMapScale = 0.0;
  v1->m_pkMiniMapWin = 0;
  v1->m_pkMainCharMarkWin = 0;
  v1->m_fAlphaBlendValue = 1.0;
  v1->m_pkFullMapViewWin = 0;
  v1->m_pkWorldMapWin = 0;
  v1->m_pkGridNumSprWin = 0;
  v1->m_pkMainCharMarkSecondWin = 0;
  v1->m_bTeleport = 0;
  v1->m_uiMapListTotalCnt = 0;
  v1->m_pkAutoRunText = 0;
  v6 = v1->m_spAutoRunMark.m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    v1->m_spAutoRunMark.m_pObject = 0;
  }
}
// 98BFDC: using guessed type int (__thiscall *NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>::`vftable')(void *p, char);
// 98BFFC: using guessed type int (__thiscall *NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::`vftable')(void *p, char);
// 98C0E4: using guessed type int (__thiscall *PgTList<NpcMarkWin *>::`vftable')(void *p, char);
// 98C0F4: using guessed type int (__thiscall *NiTMap<unsigned int,MapMarkWin *>::`vftable')(void *p, char);
// 98C114: using guessed type int (__thiscall *NiTMap<unsigned short,KQTeamMarkWin *>::`vftable')(void *p, char);
// 98C164: using guessed type int (__thiscall *PgTList<RaidMarkWin *>::`vftable')(void *p, char);
// 98C174: using guessed type int (__thiscall *PgTList<PartyMarkWin *>::`vftable')(void *p, char);
// 98C184: using guessed type int (__thiscall *PgTList<GTIScanMarkWin *>::`vftable')(void *p, char);
// 98C194: using guessed type int (__thiscall *PgTList<QuestHelperMarkWin *>::`vftable')(void *p, char);
// 98C1A4: using guessed type int (__thiscall *PgTList<PgWinSpr *>::`vftable')(void *p, char);
// 98C1B4: using guessed type int (__thiscall *PgTList<MobAreaMarkWin *>::`vftable')(void *p, char);
// 98C1D0: using guessed type void (__thiscall *FullMapWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98C1EC: using guessed type int (__thiscall *FullMapWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00504B40) --------------------------------------------------------
void __thiscall FullMapWin::~FullMapWin(FullMapWin *this)
{
  FullMapWin *v1; // esi@1
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // edi@1
  NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>Vtbl **v3; // ST20_4@1
  int v4; // edi@3
  NiTListItem<GTIScanMarkWin *> **v5; // ebx@3
  NiTListItem<GTIScanMarkWin *> **v6; // ST0C_4@4
  PgSprData *v7; // edi@5
  PgSprData *v8; // edi@9
  int v9; // edi@13
  NiTListItem<MobAreaMarkWin *> **v10; // ebx@13
  NiTListItem<MobAreaMarkWin *> **v11; // ST0C_4@14
  PgSprData *v12; // edi@17
  int v13; // edi@21
  NiTListItem<PgWinSpr *> **v14; // ebx@21
  NiTListItem<PgWinSpr *> **v15; // ST0C_4@22
  int v16; // edi@23
  NiTListItem<QuestHelperMarkWin *> **v17; // ebx@23
  NiTListItem<QuestHelperMarkWin *> **v18; // ST0C_4@24
  PgSprData *v19; // edi@25
  PgSprData *v20; // edi@29
  PgSprData *v21; // edi@33
  PgSprData *v22; // edi@37
  PgSprData *v23; // edi@41
  PgSprData *v24; // edi@45
  PgSprData *v25; // edi@49
  NiTexturingProperty *v26; // edi@53
  NiScreenElements *v27; // edi@57
  PgSprData *v28; // edi@61
  PgSprData *v29; // edi@65
  PgSprData *v30; // edi@69
  PgSprData *v31; // edi@73
  PgSprData *v32; // edi@77
  PgSprData *v33; // edi@81
  PgSprData *v34; // edi@85
  PgSprData *v35; // edi@89
  PgSprData *v36; // edi@93
  PgSprData *v37; // edi@97
  PgSprData *v38; // edi@101
  PgSprData *v39; // edi@105
  PgSprData *v40; // edi@109
  PgSprData *v41; // edi@113
  PgSprData *v42; // edi@117
  PgSprData *v43; // edi@121
  PgSprData *v44; // edi@125
  PgSprData *v45; // edi@129
  PgSprData *v46; // edi@133
  PgSprData *v47; // edi@137
  PgSprData *v48; // edi@141
  PgSprData *v49; // edi@145
  PgSprData *v50; // edi@149
  PgSprData *v51; // edi@153
  PgSprData *v52; // edi@157
  PgSprData *v53; // edi@161
  int v54; // edi@165
  NiTListItem<PartyMarkWin *> **v55; // ebx@165
  NiTListItem<PartyMarkWin *> **v56; // ST0C_4@166
  int v57; // edi@167
  NiTListItem<NpcMarkWin *> **v58; // ebx@167
  NiTListItem<NpcMarkWin *> **v59; // ST0C_4@168
  int v60; // edi@169
  NiTListItem<RaidMarkWin *> **v61; // ebx@169
  NiTListItem<RaidMarkWin *> **v62; // ST0C_4@170

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&FullMapWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&FullMapWin::`vftable'{for `IDirectMessenger'};
  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_KQTeamMarkWinMap;
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMap<unsigned short,KQTeamMarkWin *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_KQTeamMarkWinMap);
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v2);
  operator delete[](v2->m_ppkHashTable);
  v3 = &v1->m_kMapMarkMap.vfptr;
  *v3 = (NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>Vtbl *)&NiTMap<unsigned int,MapMarkWin *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kMapMarkMap);
  *v3 = (NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>Vtbl *)&NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kMapMarkMap);
  operator delete[](v1->m_kMapMarkMap.m_ppkHashTable);
  if ( v1->m_kVisibleControls._Myfirst )
    operator delete(v1->m_kVisibleControls._Myfirst);
  v4 = (int)&v1->m_kEnemyList;
  v1->m_kVisibleControls._Myfirst = 0;
  v1->m_kVisibleControls._Mylast = 0;
  v1->m_kVisibleControls._Myend = 0;
  v1->m_kEnemyList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>Vtbl *)&PgTList<GTIScanMarkWin *>::`vftable';
  v5 = &v1->m_kEnemyList.m_pkHead->m_pkNext;
  while ( v5 )
  {
    v6 = v5;
    v5 = (NiTListItem<GTIScanMarkWin *> **)*v5;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v4 + 8))(&v1->m_kEnemyList, v6);
  }
  v1->m_kEnemyList.m_kAllocator.m_uiCount = 0;
  v1->m_kEnemyList.m_pkHead = 0;
  v1->m_kEnemyList.m_pkTail = 0;
  *(_DWORD *)v4 = &NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`vftable';
  v7 = v1->m_spBluePos.m_pObject;
  if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  v8 = v1->m_spRedPos.m_pObject;
  if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
    v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
  v9 = (int)&v1->m_kMobAreaList;
  v1->m_kMobAreaList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>Vtbl *)&PgTList<MobAreaMarkWin *>::`vftable';
  v10 = &v1->m_kMobAreaList.m_pkHead->m_pkNext;
  while ( v10 )
  {
    v11 = v10;
    v10 = (NiTListItem<MobAreaMarkWin *> **)*v10;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v9 + 8))(&v1->m_kMobAreaList, v11);
  }
  v1->m_kMobAreaList.m_kAllocator.m_uiCount = 0;
  v1->m_kMobAreaList.m_pkHead = 0;
  v1->m_kMobAreaList.m_pkTail = 0;
  *(_DWORD *)v9 = &NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::`vftable';
  ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v1->m_kMarkCheck);
  if ( v1->m_kMapTitle._Myres >= 0x10 )
    operator delete(v1->m_kMapTitle._Bx._Ptr);
  v1->m_kMapTitle._Myres = 15;
  v1->m_kMapTitle._Mysize = 0;
  v1->m_kMapTitle._Bx._Buf[0] = 0;
  `eh vector destructor iterator'(
    v1->m_spQuestHelperNum,
    4u,
    40,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v12 = v1->m_spQuestHelperNumBall.m_pObject;
  if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
    v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
  v13 = (int)&v1->m_kQuestNumList;
  v1->m_kQuestNumList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>Vtbl *)&PgTList<PgWinSpr *>::`vftable';
  v14 = &v1->m_kQuestNumList.m_pkHead->m_pkNext;
  while ( v14 )
  {
    v15 = v14;
    v14 = (NiTListItem<PgWinSpr *> **)*v14;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v13 + 8))(&v1->m_kQuestNumList, v15);
  }
  v1->m_kQuestNumList.m_kAllocator.m_uiCount = 0;
  v1->m_kQuestNumList.m_pkHead = 0;
  v1->m_kQuestNumList.m_pkTail = 0;
  *(_DWORD *)v13 = &NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`vftable';
  v16 = (int)&v1->m_kQuestBallList;
  v1->m_kQuestBallList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>Vtbl *)&PgTList<QuestHelperMarkWin *>::`vftable';
  v17 = &v1->m_kQuestBallList.m_pkHead->m_pkNext;
  while ( v17 )
  {
    v18 = v17;
    v17 = (NiTListItem<QuestHelperMarkWin *> **)*v17;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v16 + 8))(&v1->m_kQuestBallList, v18);
  }
  v1->m_kQuestBallList.m_kAllocator.m_uiCount = 0;
  v1->m_kQuestBallList.m_pkHead = 0;
  v1->m_kQuestBallList.m_pkTail = 0;
  *(_DWORD *)v16 = &NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::`vftable';
  v19 = v1->m_spCaptureFlagSprData.m_pObject;
  if ( v19 && !InterlockedDecrement((volatile LONG *)&v19->m_uiRefCount) && v19 )
    v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
  v20 = v1->m_spBlueWoodSprData.m_pObject;
  if ( v20 && !InterlockedDecrement((volatile LONG *)&v20->m_uiRefCount) && v20 )
    v20->vfptr->__vecDelDtor((NiRefObject *)v20, 1u);
  v21 = v1->m_spRedWoodSprData.m_pObject;
  if ( v21 && !InterlockedDecrement((volatile LONG *)&v21->m_uiRefCount) && v21 )
    v21->vfptr->__vecDelDtor((NiRefObject *)v21, 1u);
  v22 = v1->m_spMobDmgSprData.m_pObject;
  if ( v22 && !InterlockedDecrement((volatile LONG *)&v22->m_uiRefCount) && v22 )
    v22->vfptr->__vecDelDtor((NiRefObject *)v22, 1u);
  v23 = v1->m_spMobNormalSprData.m_pObject;
  if ( v23 && !InterlockedDecrement((volatile LONG *)&v23->m_uiRefCount) && v23 )
    v23->vfptr->__vecDelDtor((NiRefObject *)v23, 1u);
  v24 = v1->m_spMobChiefSprData.m_pObject;
  if ( v24 && !InterlockedDecrement((volatile LONG *)&v24->m_uiRefCount) && v24 )
    v24->vfptr->__vecDelDtor((NiRefObject *)v24, 1u);
  v25 = v1->m_spAutoRunMark.m_pObject;
  if ( v25 && !InterlockedDecrement((volatile LONG *)&v25->m_uiRefCount) && v25 )
    v25->vfptr->__vecDelDtor((NiRefObject *)v25, 1u);
  v26 = v1->m_spFullMapTexProp.m_pObject;
  if ( v26 && !InterlockedDecrement((volatile LONG *)&v26->m_uiRefCount) && v26 )
    v26->vfptr->__vecDelDtor((NiRefObject *)v26, 1u);
  v27 = v1->m_spFullMapGeom.m_pObject;
  if ( v27 && !InterlockedDecrement((volatile LONG *)&v27->m_uiRefCount) && v27 )
    v27->vfptr->__vecDelDtor((NiRefObject *)v27, 1u);
  v28 = v1->m_spWarpGray.m_pObject;
  if ( v28 && !InterlockedDecrement((volatile LONG *)&v28->m_uiRefCount) && v28 )
    v28->vfptr->__vecDelDtor((NiRefObject *)v28, 1u);
  v29 = v1->m_spWarpBlue.m_pObject;
  if ( v29 && !InterlockedDecrement((volatile LONG *)&v29->m_uiRefCount) && v29 )
    v29->vfptr->__vecDelDtor((NiRefObject *)v29, 1u);
  v30 = v1->m_spWarpRed.m_pObject;
  if ( v30 && !InterlockedDecrement((volatile LONG *)&v30->m_uiRefCount) && v30 )
    v30->vfptr->__vecDelDtor((NiRefObject *)v30, 1u);
  v31 = v1->m_spFlagBlue.m_pObject;
  if ( v31 && !InterlockedDecrement((volatile LONG *)&v31->m_uiRefCount) && v31 )
    v31->vfptr->__vecDelDtor((NiRefObject *)v31, 1u);
  v32 = v1->m_spFlagRed.m_pObject;
  if ( v32 && !InterlockedDecrement((volatile LONG *)&v32->m_uiRefCount) && v32 )
    v32->vfptr->__vecDelDtor((NiRefObject *)v32, 1u);
  v33 = v1->m_spFlagNormal.m_pObject;
  if ( v33 && !InterlockedDecrement((volatile LONG *)&v33->m_uiRefCount) && v33 )
    v33->vfptr->__vecDelDtor((NiRefObject *)v33, 1u);
  v34 = v1->m_spMainCharSprDataSecond.m_pObject;
  if ( v34 && !InterlockedDecrement((volatile LONG *)&v34->m_uiRefCount) && v34 )
    v34->vfptr->__vecDelDtor((NiRefObject *)v34, 1u);
  v35 = v1->m_spMiniHouseSprData.m_pObject;
  if ( v35 && !InterlockedDecrement((volatile LONG *)&v35->m_uiRefCount) && v35 )
    v35->vfptr->__vecDelDtor((NiRefObject *)v35, 1u);
  v36 = v1->m_spLinkTownSprData.m_pObject;
  if ( v36 && !InterlockedDecrement((volatile LONG *)&v36->m_uiRefCount) && v36 )
    v36->vfptr->__vecDelDtor((NiRefObject *)v36, 1u);
  v37 = v1->m_spLinkSprData.m_pObject;
  if ( v37 && !InterlockedDecrement((volatile LONG *)&v37->m_uiRefCount) && v37 )
    v37->vfptr->__vecDelDtor((NiRefObject *)v37, 1u);
  v38 = v1->m_spMainCharSprData.m_pObject;
  if ( v38 && !InterlockedDecrement((volatile LONG *)&v38->m_uiRefCount) && v38 )
    v38->vfptr->__vecDelDtor((NiRefObject *)v38, 1u);
  QuestStateImage::~QuestStateImage(&v1->m_kQuestStateImg);
  v39 = v1->m_spNPCWTitleSprData.m_pObject;
  if ( v39 && !InterlockedDecrement((volatile LONG *)&v39->m_uiRefCount) && v39 )
    v39->vfptr->__vecDelDtor((NiRefObject *)v39, 1u);
  v40 = v1->m_spNPCNormalSprData.m_pObject;
  if ( v40 && !InterlockedDecrement((volatile LONG *)&v40->m_uiRefCount) && v40 )
    v40->vfptr->__vecDelDtor((NiRefObject *)v40, 1u);
  v41 = v1->m_spNPCItemSprData.m_pObject;
  if ( v41 && !InterlockedDecrement((volatile LONG *)&v41->m_uiRefCount) && v41 )
    v41->vfptr->__vecDelDtor((NiRefObject *)v41, 1u);
  v42 = v1->m_spNPCTemplarSprData.m_pObject;
  if ( v42 && !InterlockedDecrement((volatile LONG *)&v42->m_uiRefCount) && v42 )
    v42->vfptr->__vecDelDtor((NiRefObject *)v42, 1u);
  v43 = v1->m_spNPCHelpSprData.m_pObject;
  if ( v43 && !InterlockedDecrement((volatile LONG *)&v43->m_uiRefCount) && v43 )
    v43->vfptr->__vecDelDtor((NiRefObject *)v43, 1u);
  v44 = v1->m_spNPCSkillSprData.m_pObject;
  if ( v44 && !InterlockedDecrement((volatile LONG *)&v44->m_uiRefCount) && v44 )
    v44->vfptr->__vecDelDtor((NiRefObject *)v44, 1u);
  v45 = v1->m_spNPCSmithSprData.m_pObject;
  if ( v45 && !InterlockedDecrement((volatile LONG *)&v45->m_uiRefCount) && v45 )
    v45->vfptr->__vecDelDtor((NiRefObject *)v45, 1u);
  v46 = v1->m_spNPCFurnitureSprData.m_pObject;
  if ( v46 && !InterlockedDecrement((volatile LONG *)&v46->m_uiRefCount) && v46 )
    v46->vfptr->__vecDelDtor((NiRefObject *)v46, 1u);
  v47 = v1->m_spNPCMineSprData.m_pObject;
  if ( v47 && !InterlockedDecrement((volatile LONG *)&v47->m_uiRefCount) && v47 )
    v47->vfptr->__vecDelDtor((NiRefObject *)v47, 1u);
  v48 = v1->m_spNPCKingdomSprData.m_pObject;
  if ( v48 && !InterlockedDecrement((volatile LONG *)&v48->m_uiRefCount) && v48 )
    v48->vfptr->__vecDelDtor((NiRefObject *)v48, 1u);
  v49 = v1->m_spNPCStoreSprData.m_pObject;
  if ( v49 && !InterlockedDecrement((volatile LONG *)&v49->m_uiRefCount) && v49 )
    v49->vfptr->__vecDelDtor((NiRefObject *)v49, 1u);
  v50 = v1->m_spNPCQuestSprData.m_pObject;
  if ( v50 && !InterlockedDecrement((volatile LONG *)&v50->m_uiRefCount) && v50 )
    v50->vfptr->__vecDelDtor((NiRefObject *)v50, 1u);
  v51 = v1->m_spNPCGuildSprData.m_pObject;
  if ( v51 && !InterlockedDecrement((volatile LONG *)&v51->m_uiRefCount) && v51 )
    v51->vfptr->__vecDelDtor((NiRefObject *)v51, 1u);
  v52 = v1->m_spNPCSoulStoneSprData.m_pObject;
  if ( v52 && !InterlockedDecrement((volatile LONG *)&v52->m_uiRefCount) && v52 )
    v52->vfptr->__vecDelDtor((NiRefObject *)v52, 1u);
  v53 = v1->m_spPartySprData.m_pObject;
  if ( v53 && !InterlockedDecrement((volatile LONG *)&v53->m_uiRefCount) && v53 )
    v53->vfptr->__vecDelDtor((NiRefObject *)v53, 1u);
  v54 = (int)&v1->m_kPartyList;
  v1->m_kPartyList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>Vtbl *)&PgTList<PartyMarkWin *>::`vftable';
  v55 = &v1->m_kPartyList.m_pkHead->m_pkNext;
  while ( v55 )
  {
    v56 = v55;
    v55 = (NiTListItem<PartyMarkWin *> **)*v55;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v54 + 8))(&v1->m_kPartyList, v56);
  }
  v1->m_kPartyList.m_kAllocator.m_uiCount = 0;
  v1->m_kPartyList.m_pkHead = 0;
  v1->m_kPartyList.m_pkTail = 0;
  *(_DWORD *)v54 = &NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`vftable';
  v57 = (int)&v1->m_kNpcList;
  v1->m_kNpcList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>Vtbl *)&PgTList<NpcMarkWin *>::`vftable';
  v58 = &v1->m_kNpcList.m_pkHead->m_pkNext;
  while ( v58 )
  {
    v59 = v58;
    v58 = (NiTListItem<NpcMarkWin *> **)*v58;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v57 + 8))(&v1->m_kNpcList, v59);
  }
  v1->m_kNpcList.m_kAllocator.m_uiCount = 0;
  v1->m_kNpcList.m_pkHead = 0;
  v1->m_kNpcList.m_pkTail = 0;
  *(_DWORD *)v57 = &NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`vftable';
  v60 = (int)&v1->m_kRaidList;
  v1->m_kRaidList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>Vtbl *)&PgTList<RaidMarkWin *>::`vftable';
  v61 = &v1->m_kRaidList.m_pkHead->m_pkNext;
  while ( v61 )
  {
    v62 = v61;
    v61 = (NiTListItem<RaidMarkWin *> **)*v61;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v60 + 8))(&v1->m_kRaidList, v62);
  }
  v1->m_kRaidList.m_kAllocator.m_uiCount = 0;
  v1->m_kRaidList.m_pkHead = 0;
  v1->m_kRaidList.m_pkTail = 0;
  *(_DWORD *)v60 = &NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 98BF8C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`vftable')(void *p, char);
// 98BF9C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`vftable')(void *p, char);
// 98BFBC: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`vftable')(void *p, char);
// 98BFCC: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`vftable')(void *p, char);
// 98BFDC: using guessed type int (__thiscall *NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>::`vftable')(void *p, char);
// 98BFFC: using guessed type int (__thiscall *NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::`vftable')(void *p, char);
// 98C01C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::`vftable')(void *p, char);
// 98C02C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`vftable')(void *p, char);
// 98C03C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::`vftable')(void *p, char);
// 98C0E4: using guessed type int (__thiscall *PgTList<NpcMarkWin *>::`vftable')(void *p, char);
// 98C0F4: using guessed type int (__thiscall *NiTMap<unsigned int,MapMarkWin *>::`vftable')(void *p, char);
// 98C114: using guessed type int (__thiscall *NiTMap<unsigned short,KQTeamMarkWin *>::`vftable')(void *p, char);
// 98C164: using guessed type int (__thiscall *PgTList<RaidMarkWin *>::`vftable')(void *p, char);
// 98C174: using guessed type int (__thiscall *PgTList<PartyMarkWin *>::`vftable')(void *p, char);
// 98C184: using guessed type int (__thiscall *PgTList<GTIScanMarkWin *>::`vftable')(void *p, char);
// 98C194: using guessed type int (__thiscall *PgTList<QuestHelperMarkWin *>::`vftable')(void *p, char);
// 98C1A4: using guessed type int (__thiscall *PgTList<PgWinSpr *>::`vftable')(void *p, char);
// 98C1B4: using guessed type int (__thiscall *PgTList<MobAreaMarkWin *>::`vftable')(void *p, char);
// 98C1D0: using guessed type void (__thiscall *FullMapWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98C1EC: using guessed type int (__thiscall *FullMapWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00505410) --------------------------------------------------------
FullMapWin *__cdecl FullMapWin::CreateWin(MiniMapWin *pkMiniMap, PgFrameWork *pkFrameWork)
{
  PgWin *v2; // eax@1
  PgWin *v3; // eax@2
  PgWin *v4; // esi@2
  PgWin *v5; // edi@8
  FullMapWin *v6; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v2 = (PgWin *)operator new(0x93Cu);
  result.m_pObject = v2;
  v8 = 0;
  if ( v2 )
  {
    FullMapWin::FullMapWin((FullMapWin *)v2);
    v4 = v3;
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v8 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v4);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, MiniMapWin *, PgFrameWork *))v4->vfptr[135].__vecDelDtor)(
                          v4,
                          pkMiniMap,
                          pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v4->vfptr[89].__vecDelDtor)(v4);
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = (FullMapWin *)v4;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v4);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = 0;
  }
  return v6;
}

//----- (00505540) --------------------------------------------------------
InvisibleWin *__cdecl InvisibleWin::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, char *pcName, unsigned int uiExtStyle)
{
  PgWin *v7; // eax@1
  PgWin *v8; // esi@1
  PgWin *v9; // edi@8
  InvisibleWin *v10; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v12; // [sp+20h] [bp-4h]@1

  v7 = (PgWin *)operator new(0x124u);
  v8 = v7;
  result.m_pObject = v7;
  v12 = 0;
  if ( v7 )
  {
    PgWin::PgWin(v7);
    v8->vfptr = (NiRefObjectVtbl *)&InvisibleWin::`vftable'{for `NiNode'};
    v8->vfptr = (IDirectMessengerVtbl *)&InvisibleWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v8 = 0;
  }
  if ( v8 )
    InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  v12 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v8);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, unsigned int, PgWin *, char *, unsigned int))v8->vfptr[84].__vecDelDtor)(
                          v8,
                          iXPos,
                          iYPos,
                          uiWidth,
                          uiHeight,
                          pkParent,
                          pcName,
                          uiExtStyle) )
  {
    ((void (__thiscall *)(PgWin *))v8->vfptr[89].__vecDelDtor)(v8);
    v12 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v10 = (InvisibleWin *)v8;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v8);
    if ( result.m_pObject )
    {
      v9 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v9 )
          v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      }
    }
    v12 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v10 = 0;
  }
  return v10;
}
// 98BD94: using guessed type void (__thiscall *InvisibleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98BDB4: using guessed type int (__thiscall *InvisibleWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005056A0) --------------------------------------------------------
void __thiscall FullMapWin::InitVisibleControls(FullMapWin *this)
{
  FullMapWin *v1; // ebx@1
  std::vector<unsigned long,std::allocator<unsigned long> > *v2; // esi@1
  unsigned int v3; // eax@2
  PgWinSpr **v4; // edi@2
  unsigned int *v5; // edx@3
  unsigned int *v6; // ecx@4
  int v7; // edi@4
  unsigned int v8; // eax@5
  unsigned int v9; // eax@6
  unsigned int v10; // ecx@6
  unsigned int v11; // ecx@8
  unsigned int *v12; // eax@13
  unsigned int *v13; // ecx@15
  unsigned int v14; // eax@16
  unsigned int v15; // eax@17
  unsigned int v16; // ecx@17
  unsigned int v17; // ecx@19
  unsigned int *v18; // eax@24
  unsigned int v19; // eax@26
  unsigned int v20; // edi@28
  unsigned int v21; // eax@28
  unsigned int *v22; // edx@29
  unsigned int *v23; // ecx@30
  int v24; // edi@30
  unsigned int v25; // eax@31
  unsigned int v26; // eax@32
  unsigned int v27; // ecx@32
  unsigned int v28; // ecx@34
  unsigned int *v29; // eax@40
  unsigned int *v30; // ecx@42
  unsigned int v31; // eax@43
  unsigned int v32; // eax@44
  unsigned int v33; // ecx@44
  unsigned int v34; // ecx@46
  unsigned int *v35; // eax@51
  unsigned int v36; // eax@53
  PgWinSpr **v37; // edi@53
  unsigned int *v38; // edx@54
  unsigned int *v39; // ecx@55
  int v40; // edi@55
  unsigned int v41; // eax@56
  unsigned int v42; // eax@57
  unsigned int v43; // ecx@57
  unsigned int v44; // ecx@59
  unsigned int *v45; // eax@64
  unsigned int *v46; // ecx@66
  unsigned int v47; // eax@67
  unsigned int v48; // eax@68
  unsigned int v49; // ecx@68
  unsigned int v50; // ecx@70
  unsigned int *v51; // eax@75
  unsigned int v52; // eax@77
  char *v53; // [sp+8h] [bp-14h]@1
  unsigned int i; // [sp+Ch] [bp-10h]@1
  PgWinSpr **v55; // [sp+10h] [bp-Ch]@1
  PgWinSpr **v56; // [sp+14h] [bp-8h]@2
  FullMapWin *v57; // [sp+18h] [bp-4h]@1

  v1 = this;
  v2 = (std::vector<unsigned long,std::allocator<unsigned long> > *)&this->m_kVisibleControls;
  v57 = this;
  v53 = (char *)&this->m_pkFullMapViewWin;
  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
    (std::vector<unsigned long,std::allocator<unsigned long> > *)&this->m_kVisibleControls,
    (const unsigned int *)&this->m_pkFullMapViewWin);
  i = (unsigned int)v1->m_pkSlides;
  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(v2, &i);
  i = (unsigned int)v1->m_pkQuestSlideBar->m_pkSlidePoint;
  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(v2, &i);
  i = (unsigned int)v1->m_pkMapSlideBar;
  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(v2, &i);
  i = (unsigned int)v1->m_pkQuestSlideListWin;
  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(v2, &i);
  i = (unsigned int)v1->m_pkMapSlideListWin;
  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(v2, &i);
  i = (unsigned int)v1->m_pkWorldMapBut;
  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(v2, &i);
  i = (unsigned int)v1->m_pkIndexBtn[0];
  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(v2, &i);
  i = (unsigned int)v1->m_pkIndexBtn[1];
  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(v2, &i);
  i = (unsigned int)v1->m_pkQuestListBtn[0];
  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(v2, &i);
  i = (unsigned int)v1->m_pkQuestListBtn[1];
  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(v2, &i);
  i = (unsigned int)v1->m_pkIndexPanel[1];
  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(v2, &i);
  i = (unsigned int)v1->m_pkMapListPanel[0];
  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(v2, &i);
  i = (unsigned int)v1->m_pkMapListPanel[1];
  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(v2, &i);
  i = 0;
  v55 = v1->m_pkGridSprWin;
  do
  {
    v3 = (unsigned int)v2->_Mylast;
    v4 = (PgWinSpr **)*v55;
    v56 = (PgWinSpr **)*v55;
    if ( (unsigned int)&v56 >= v3 || (v5 = v2->_Myfirst, v2->_Myfirst > (unsigned int *)&v56) )
    {
      v13 = v2->_Myend;
      if ( (unsigned int *)v3 == v13 )
      {
        v14 = (signed int)(v3 - (unsigned int)v2->_Myfirst) >> 2;
        if ( v14 > 0x3FFFFFFE )
LABEL_35:
          std::_Xlength_error("vector<T> too long");
        v15 = v14 + 1;
        v16 = v13 - v2->_Myfirst;
        if ( v15 > v16 )
        {
          if ( 0x3FFFFFFF - (v16 >> 1) >= v16 )
            v17 = (v16 >> 1) + v16;
          else
            v17 = 0;
          if ( v17 < v15 )
            v17 = v15;
          std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
            (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)v2,
            v17);
          v1 = v57;
        }
      }
      v18 = v2->_Mylast;
      if ( v18 )
        *v18 = (unsigned int)v4;
    }
    else
    {
      v6 = v2->_Myend;
      v7 = ((char *)&v56 - (char *)v5) >> 2;
      if ( (unsigned int *)v3 == v6 )
      {
        v8 = (signed int)(v3 - (_DWORD)v5) >> 2;
        if ( v8 > 0x3FFFFFFE )
          goto LABEL_35;
        v9 = v8 + 1;
        v10 = v6 - v5;
        if ( v9 > v10 )
        {
          if ( 0x3FFFFFFF - (v10 >> 1) >= v10 )
            v11 = (v10 >> 1) + v10;
          else
            v11 = 0;
          if ( v11 < v9 )
            v11 = v9;
          std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
            (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)v2,
            v11);
          v1 = v57;
        }
      }
      v12 = v2->_Mylast;
      if ( v12 )
        *v12 = v2->_Myfirst[v7];
    }
    v19 = i;
    ++v2->_Mylast;
    ++v55;
    i = v19 + 1;
  }
  while ( v19 + 1 < 0x16 );
  i = 0;
  v56 = v1->m_pkQuestListNum;
  do
  {
    v20 = (unsigned int)*(v56 - 40);
    v21 = (unsigned int)v2->_Mylast;
    v55 = (PgWinSpr **)*(v56 - 40);
    if ( (unsigned int)&v55 >= v21 || (v22 = v2->_Myfirst, v2->_Myfirst > (unsigned int *)&v55) )
    {
      v30 = v2->_Myend;
      if ( (unsigned int *)v21 == v30 )
      {
        v31 = (signed int)(v21 - (unsigned int)v2->_Myfirst) >> 2;
        if ( v31 > 0x3FFFFFFE )
          goto LABEL_35;
        v32 = v31 + 1;
        v33 = v30 - v2->_Myfirst;
        if ( v32 > v33 )
        {
          if ( 0x3FFFFFFF - (v33 >> 1) >= v33 )
            v34 = (v33 >> 1) + v33;
          else
            v34 = 0;
          if ( v34 < v32 )
            v34 = v32;
          std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
            (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)v2,
            v34);
          v1 = v57;
        }
      }
      v35 = v2->_Mylast;
      if ( v35 )
        *v35 = v20;
    }
    else
    {
      v23 = v2->_Myend;
      v24 = ((char *)&v55 - (char *)v22) >> 2;
      if ( (unsigned int *)v21 == v23 )
      {
        v25 = (signed int)(v21 - (_DWORD)v22) >> 2;
        if ( v25 > 0x3FFFFFFE )
          goto LABEL_35;
        v26 = v25 + 1;
        v27 = v23 - v22;
        if ( v26 > v27 )
        {
          if ( 0x3FFFFFFF - (v27 >> 1) >= v27 )
            v28 = (v27 >> 1) + v27;
          else
            v28 = 0;
          if ( v28 < v26 )
            v28 = v26;
          std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
            (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)v2,
            v28);
          v1 = v57;
        }
      }
      v29 = v2->_Mylast;
      if ( v29 )
        *v29 = v2->_Myfirst[v24];
    }
    ++v2->_Mylast;
    v36 = (unsigned int)v2->_Mylast;
    v37 = (PgWinSpr **)*v56;
    v55 = (PgWinSpr **)*v56;
    if ( (unsigned int)&v55 >= v36 || (v38 = v2->_Myfirst, v2->_Myfirst > (unsigned int *)&v55) )
    {
      v46 = v2->_Myend;
      if ( (unsigned int *)v36 == v46 )
      {
        v47 = (signed int)(v36 - (unsigned int)v2->_Myfirst) >> 2;
        if ( v47 > 0x3FFFFFFE )
          goto LABEL_35;
        v48 = v47 + 1;
        v49 = v46 - v2->_Myfirst;
        if ( v48 > v49 )
        {
          if ( 0x3FFFFFFF - (v49 >> 1) >= v49 )
            v50 = (v49 >> 1) + v49;
          else
            v50 = 0;
          if ( v50 < v48 )
            v50 = v48;
          std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
            (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)v2,
            v50);
          v1 = v57;
        }
      }
      v51 = v2->_Mylast;
      if ( v51 )
        *v51 = (unsigned int)v37;
    }
    else
    {
      v39 = v2->_Myend;
      v40 = ((char *)&v55 - (char *)v38) >> 2;
      if ( (unsigned int *)v36 == v39 )
      {
        v41 = (signed int)(v36 - (_DWORD)v38) >> 2;
        if ( v41 > 0x3FFFFFFE )
          goto LABEL_35;
        v42 = v41 + 1;
        v43 = v39 - v38;
        if ( v42 > v43 )
        {
          if ( 0x3FFFFFFF - (v43 >> 1) >= v43 )
            v44 = (v43 >> 1) + v43;
          else
            v44 = 0;
          if ( v44 < v42 )
            v44 = v42;
          std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
            (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)v2,
            v44);
          v1 = v57;
        }
      }
      v45 = v2->_Mylast;
      if ( v45 )
        *v45 = v2->_Myfirst[v40];
    }
    v52 = i;
    ++v2->_Mylast;
    ++v56;
    i = v52 + 1;
  }
  while ( v52 + 1 < 0x28 );
  ((void (__stdcall *)(_DWORD))v1->m_pkGridNumSprWin->vfptr[60].__vecDelDtor)(0);
  (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v53 + 240))(0);
}

//----- (00505AB0) --------------------------------------------------------
void __thiscall FullMapWin::ResetView(FullMapWin *this, bool bTextureChange)
{
  FullMapWin *v2; // esi@1
  MaskedWin *v3; // ecx@1
  NiSourceTexture *v4; // ebx@3
  Name3 *v5; // eax@4
  MapViewInfo *v6; // eax@5
  MapViewInfo *v7; // edi@5
  int v8; // eax@6
  int v9; // ecx@6
  const char *v10; // eax@7
  const char *v11; // ecx@7
  char v12; // dl@8
  int v13; // edi@10
  int v14; // ebx@10
  double v15; // st7@10
  double v16; // st7@10
  double v17; // st6@12
  NiTexturingProperty *v18; // ecx@14
  Name3 result; // [sp+1Ch] [bp-10h]@4
  const char *v20; // [sp+28h] [bp-4h]@6
  NiTexture *pkMapTexture; // [sp+34h] [bp+8h]@3

  v2 = this;
  v3 = this->m_pkMiniMapWin->m_pkMiniMapWin;
  if ( v3 )
  {
    if ( bTextureChange )
    {
      v4 = World::GetMiniMapTexture(&g_kWorld);
      pkMapTexture = (NiTexture *)v4;
    }
    else
    {
      pkMapTexture = MaskedWin::GetBaseTexture(v3);
      v5 = World::GetMapName(&g_kWorld, &result);
      v4 = (NiSourceTexture *)pkMapTexture;
      v2->m_kSelectedMapName.n3_code[0] = v5->n3_code[0];
      v2->m_kSelectedMapName.n3_code[1] = v5->n3_code[1];
      v2->m_kSelectedMapName.n3_code[2] = v5->n3_code[2];
    }
    v6 = MapViewInfoTab::GetByMapName(&v2->m_kSelectedMapName);
    v7 = v6;
    if ( v6 )
    {
      v2->m_fFullMapScale = v6->MiniMapScale;
      v8 = v6->EndY;
      v9 = v7->EndX;
      v20 = (const char *)v7->StartY;
      v2->m_kMapViewRect.left = v7->StartX;
      v2->m_kMapViewRect.top = (int)v20;
      v2->m_kMapViewRect.right = v9;
      v2->m_kMapViewRect.bottom = v8;
    }
    v10 = MapInfoTab::GetByMapName(&v2->m_kSelectedMapName)->Name;
    v11 = v10;
    v20 = v10 + 1;
    do
      v12 = *v11++;
    while ( v12 );
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v2->m_kMapTitle, v10, v11 - v20);
    v2->m_kSelectedMapID = v7->ID;
    FullMapWin::CenterPlaceSelectedMap(v2);
    if ( v4 )
    {
      ((void (__thiscall *)(NiSourceTexture *))v4->vfptr[15].__vecDelDtor)(v4);
      ((void (__thiscall *)(NiSourceTexture *))v4->vfptr[16].__vecDelDtor)(v4);
      v13 = v2->m_kMapViewRect.right - v2->m_kMapViewRect.left + 1;
      v14 = v2->m_kMapViewRect.bottom - v2->m_kMapViewRect.top + 1;
      NiScreenElementsData::SetTextures(
        (NiScreenElementsData *)v2->m_spFullMapGeom.m_pObject->m_spModelData.m_pObject,
        0,
        0,
        0.0,
        0.0,
        1.0,
        1.0);
      NiScreenElementsData::SetRectangle(
        (NiScreenElementsData *)v2->m_spFullMapGeom.m_pObject->m_spModelData.m_pObject,
        0,
        0.0,
        0.0,
        512.0,
        512.0);
      v15 = (double)v2->m_kMapViewRect.left;
      v20 = (const char *)v13;
      v2->m_fMapOffsetX = v15;
      v2->m_fMapOffsetY = (double)v2->m_kMapViewRect.top;
      v16 = (double)(signed int)v20;
      if ( v13 < 0 )
        v16 = v16 + 4294967300.0;
      v20 = (const char *)v14;
      v2->m_fMapScaleX = 512.0 / v16;
      v17 = (double)(signed int)v20;
      if ( v14 < 0 )
        v17 = v17 + 4294967300.0;
      v18 = v2->m_spFullMapTexProp.m_pObject;
      v2->m_fMapScaleY = 512.0 / v17;
      NiTexturingProperty::SetBaseTexture(v18, pkMapTexture);
      v2->m_spFullMapGeom.m_pObject->m_spModelData.m_pObject->m_usDirtyFlags |= 9u;
      NiAVObject::UpdateProperties((NiAVObject *)&v2->vfptr);
    }
  }
}

//----- (00505CD0) --------------------------------------------------------
void __thiscall FullMapWin::AddQuestList(FullMapWin *this)
{
  FullMapWin *v1; // esi@1
  NiTListItem<NSFParsedShader *> *v2; // eax@2
  NSFParsedShader *v3; // ecx@4
  NSBShader *v4; // eax@5
  QUEST_DATA *v5; // ebx@9
  QUEST_DATA *v6; // edi@10
  bool v7; // al@10
  const char *v8; // eax@13
  const char *v9; // eax@14
  unsigned int v10; // edi@18
  const char *v11; // eax@18
  MobInfo *v12; // eax@22
  const char *v13; // eax@23
  unsigned int v14; // edi@23
  const char *v15; // eax@23
  unsigned __int16 *v16; // ebx@26
  char *v17; // eax@28
  const char *v18; // eax@29
  unsigned int v19; // edi@33
  const char *v20; // eax@33
  char *v21; // eax@39
  const char *v22; // eax@40
  unsigned int v23; // edi@44
  const char *v24; // eax@44
  QuestHelperMgr *v25; // edi@48
  char *v26; // eax@48
  unsigned int v27; // edi@49
  const char *v28; // eax@49
  char *v29; // eax@52
  const char *v30; // eax@53
  unsigned int v31; // edi@57
  const char *v32; // eax@57
  CClientQuest *pQuest; // [sp+10h] [bp-D8h]@1
  CQuestData *pQData; // [sp+14h] [bp-D4h]@1
  NiTListItem<NSFParsedShader *> *kIter; // [sp+18h] [bp-D0h]@4
  signed __int16 OldQuest_ID; // [sp+1Ch] [bp-CCh]@2
  signed int dwData; // [sp+20h] [bp-C8h]@3
  unsigned int *v38; // [sp+24h] [bp-C4h]@37
  unsigned __int16 *v39; // [sp+28h] [bp-C0h]@37
  int i; // [sp+2Ch] [bp-BCh]@26
  int ia; // [sp+2Ch] [bp-BCh]@37
  bool bStartReward; // [sp+33h] [bp-B5h]@10
  QUEST_DATA *lpQuest; // [sp+34h] [bp-B4h]@9
  QuestHelperMgr *pkMgr; // [sp+38h] [bp-B0h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kText; // [sp+3Ch] [bp-ACh]@13
  char acResult[128]; // [sp+58h] [bp-90h]@14
  int v47; // [sp+E4h] [bp-4h]@13

  v1 = this;
  pQuest = QuestDataMgr::GetQuest();
  pQData = pQuest->m_pQuestData;
  SlideListWin::RemoveAllList(v1->m_pkQuestSlideListWin);
  pkMgr = QuestHelperMgr::GetInstance();
  if ( pkMgr )
  {
    v2 = QuestHelperMgr::ms_pQuestMCList.m_pkHead;
    OldQuest_ID = -1;
    if ( QuestHelperMgr::ms_pQuestMCList.m_pkHead )
    {
      dwData = 0xFFFF;
      do
      {
        v3 = v2->m_element;
        kIter = v2->m_pkNext;
        if ( v3 )
        {
          v4 = v3[1].m_spNSBShader.m_pObject;
          if ( v4 )
          {
            if ( v4->m_uiRefCount == v1->m_kSelectedMapName.n3_code[0]
              && v4->m_pcName == (char *)v1->m_kSelectedMapName.n3_code[1]
              && v4->m_pcDescription == (char *)v1->m_kSelectedMapName.n3_code[2] )
            {
              v5 = (QUEST_DATA *)v3->m_spNSBShader.m_pObject;
              lpQuest = (QUEST_DATA *)v3->m_spNSBShader.m_pObject;
              if ( OldQuest_ID != LOWORD(v3->m_spNSBShader.m_pObject->m_uiRefCount) )
              {
                OldQuest_ID = v5->ID;
                v6 = CQuest::GetNewQuestStatus((CQuest *)&pQuest->vfptr, v5->ID);
                v7 = QuestHelperMgr::IsStartRewardQuest(v5);
                bStartReward = v7;
                if ( v6 != (QUEST_DATA *)8 || v7 || v5->End.bLevel )
                {
                  kText._Myres = 15;
                  kText._Mysize = 0;
                  kText._Bx._Buf[0] = 0;
                  v47 = 0;
                  v8 = CQuestData::GetQuestName(pQData, v5->ID);
                  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&kText, v8, strlen(v8));
                  if ( kText._Mysize )
                  {
                    memset(acResult, 0, 0x80u);
                    v9 = kText._Bx._Ptr;
                    if ( kText._Myres < 0x10 )
                      v9 = (const char *)&kText;
                    if ( FullMapWin::AbbreviateText(acResult, v9, 24) )
                      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                        &kText,
                        acResult,
                        strlen(acResult));
                    QuestHelperMgr::ClearConditionText(pkMgr);
                    v10 = SlideListWin::AddText(v1->m_pkQuestSlideListWin, &byte_98B68A);
                    v11 = kText._Bx._Ptr;
                    if ( kText._Myres < 0x10 )
                      v11 = (const char *)&kText;
                    SlideListWin::SetText(v1->m_pkQuestSlideListWin, v10, 1u, v11);
                    SlideListWin::SetFontColor(v1->m_pkQuestSlideListWin, v10, 255, 255, 0);
                    SlideListWin::SetData(v1->m_pkQuestSlideListWin, v10, dwData++);
                    if ( bStartReward == 1 && !v5->End.bLevel )
                    {
                      v12 = IIDTableBase<MobInfo,MobInfoTab,unsigned short>::GetByID(v5->End.NPCMobList[0].NPCMobID);
                      if ( v12 )
                      {
                        v13 = fs("- NPC %s", v12->Name);
                        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator=(&kText, v13);
                        v14 = SlideListWin::AddText(v1->m_pkQuestSlideListWin, &byte_98B68B);
                        v15 = kText._Bx._Ptr;
                        if ( kText._Myres < 0x10 )
                          v15 = (const char *)&kText;
                        SlideListWin::SetText(v1->m_pkQuestSlideListWin, v14, 1u, v15);
                        SlideListWin::SetFontColor(v1->m_pkQuestSlideListWin, v14, 255, 255, 255);
                        SlideListWin::SetData(v1->m_pkQuestSlideListWin, v14, v5->End.NPCMobList[0].NPCMobID);
                      }
                    }
                    i = 0;
                    v16 = &lpQuest->End.NPCMobList[0].NPCMobID;
                    do
                    {
                      if ( !*((_BYTE *)v16 - 2) )
                        break;
                      QuestHelperMgr::AddMobConditionText(pkMgr, lpQuest, &kText, *v16, 1);
                      v17 = QuestHelperMgr::GetConditionText(pkMgr);
                      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                        &kText,
                        v17,
                        strlen(v17));
                      if ( kText._Mysize )
                      {
                        memset(acResult, 0, 0x80u);
                        v18 = kText._Bx._Ptr;
                        if ( kText._Myres < 0x10 )
                          v18 = (const char *)&kText;
                        if ( FullMapWin::AbbreviateText(acResult, v18, 24) )
                          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                            &kText,
                            acResult,
                            strlen(acResult));
                        v19 = SlideListWin::AddText(v1->m_pkQuestSlideListWin, &byte_98B69A);
                        v20 = kText._Bx._Ptr;
                        if ( kText._Myres < 0x10 )
                          v20 = (const char *)&kText;
                        SlideListWin::SetText(v1->m_pkQuestSlideListWin, v19, 1u, v20);
                        SlideListWin::SetFontColor(v1->m_pkQuestSlideListWin, v19, 255, 255, 255);
                        SlideListWin::SetData(v1->m_pkQuestSlideListWin, v19, *v16);
                        QuestHelperMgr::ClearConditionText(pkMgr);
                      }
                      v16 += 4;
                      ++i;
                    }
                    while ( i < 5 );
                    ia = 0;
                    v38 = &lpQuest->Action[0].IfTarget;
                    v39 = &lpQuest->End.ItemList[0].ItemID;
                    do
                    {
                      if ( !*((_BYTE *)v39 - 2) )
                        break;
                      QuestHelperMgr::AddItemConditionText(pkMgr, lpQuest, &kText, *v39, 1);
                      v21 = QuestHelperMgr::GetConditionText(pkMgr);
                      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                        &kText,
                        v21,
                        strlen(v21));
                      if ( kText._Mysize )
                      {
                        memset(acResult, 0, 0x80u);
                        v22 = kText._Bx._Ptr;
                        if ( kText._Myres < 0x10 )
                          v22 = (const char *)&kText;
                        if ( FullMapWin::AbbreviateText(acResult, v22, 20) )
                          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                            &kText,
                            acResult,
                            strlen(acResult));
                        v23 = SlideListWin::AddText(v1->m_pkQuestSlideListWin, &byte_98B69B);
                        v24 = kText._Bx._Ptr;
                        if ( kText._Myres < 0x10 )
                          v24 = (const char *)&kText;
                        SlideListWin::SetText(v1->m_pkQuestSlideListWin, v23, 1u, v24);
                        SlideListWin::SetFontColor(v1->m_pkQuestSlideListWin, v23, 255, 255, 255);
                        SlideListWin::SetData(v1->m_pkQuestSlideListWin, v23, *v38);
                        QuestHelperMgr::ClearConditionText(pkMgr);
                      }
                      v39 += 3;
                      v38 += 8;
                      ++ia;
                    }
                    while ( ia < 5 );
                    v25 = pkMgr;
                    QuestHelperMgr::AddLevelConditionText(pkMgr, lpQuest, &kText);
                    v26 = QuestHelperMgr::GetConditionText(pkMgr);
                    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                      &kText,
                      v26,
                      strlen(v26));
                    if ( kText._Mysize )
                    {
                      v27 = SlideListWin::AddText(v1->m_pkQuestSlideListWin, &byte_98B6B1);
                      v28 = kText._Bx._Ptr;
                      if ( kText._Myres < 0x10 )
                        v28 = (const char *)&kText;
                      SlideListWin::SetText(v1->m_pkQuestSlideListWin, v27, 1u, v28);
                      SlideListWin::SetFontColor(v1->m_pkQuestSlideListWin, v27, 255, 255, 255);
                      SlideListWin::SetData(v1->m_pkQuestSlideListWin, v27, lpQuest->End.NPCMobList[ia].NPCMobID);
                      QuestHelperMgr::ClearConditionText(pkMgr);
                      v25 = pkMgr;
                    }
                    QuestHelperMgr::AddLocationConditionText(v25, lpQuest, &kText);
                    v29 = QuestHelperMgr::GetConditionText(v25);
                    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                      &kText,
                      v29,
                      strlen(v29));
                    if ( kText._Mysize )
                    {
                      memset(acResult, 0, 0x80u);
                      v30 = kText._Bx._Ptr;
                      if ( kText._Myres < 0x10 )
                        v30 = (const char *)&kText;
                      if ( FullMapWin::AbbreviateText(acResult, v30, 20) )
                        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                          &kText,
                          acResult,
                          strlen(acResult));
                      v31 = SlideListWin::AddText(v1->m_pkQuestSlideListWin, byte_98B6B2);
                      v32 = kText._Bx._Ptr;
                      if ( kText._Myres < 0x10 )
                        v32 = (const char *)&kText;
                      SlideListWin::SetText(v1->m_pkQuestSlideListWin, v31, 1u, v32);
                      SlideListWin::SetFontColor(v1->m_pkQuestSlideListWin, v31, 255, 255, 255);
                      QuestHelperMgr::ClearConditionText(pkMgr);
                    }
                    SlideListWin::AddText(v1->m_pkQuestSlideListWin, "\n");
                  }
                  v47 = -1;
                  if ( kText._Myres >= 0x10 )
                    operator delete(kText._Bx._Ptr);
                  kText._Myres = 15;
                  kText._Mysize = 0;
                  kText._Bx._Buf[0] = 0;
                }
              }
            }
          }
        }
        v2 = kIter;
      }
      while ( kIter );
    }
    SlideListWin::AlignText(v1->m_pkQuestSlideListWin, 4u);
  }
}

//----- (00506500) --------------------------------------------------------
void __thiscall FullMapWin::AddQuestHelper(FullMapWin *this)
{
  FullMapWin *v1; // edi@1
  QuestHelperMgr *v2; // eax@1
  NiTListItem<NSFParsedShader *> *v3; // eax@2
  QUEST_DATA **v4; // esi@5
  MobCoordinate *v5; // ebx@6
  signed int v6; // eax@13
  double v7; // st7@13
  QUEST_DATA *v8; // ecx@15
  QuestHelperMarkWin *v9; // esi@17
  unsigned __int16 v10; // ST14_2@17
  QUEST_DATA *v11; // ST10_4@17
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v12; // eax@17
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v13; // ecx@17
  char v14; // dl@18
  char *v15; // eax@19
  char *v16; // ST14_4@21
  PgWinSpr *v17; // eax@21
  PgWinSpr *v18; // eax@21
  int v19; // eax@21
  _DWORD *v20; // ecx@21
  float v21; // edx@24
  PgWinSpr *v22; // eax@26
  PgWinSpr *v23; // esi@26
  void *(__thiscall *v24)(NiRefObject *, unsigned int); // eax@26
  int v25; // eax@26
  _DWORD *v26; // ecx@26
  bool v27; // cf@29
  MobAreaMarkWin *v28; // esi@31
  signed int v29; // edx@31
  double v30; // st6@31
  signed int v31; // eax@33
  double v32; // st6@33
  double v33; // st7@35
  double v34; // st6@36
  NiRefObjectVtbl *v35; // edx@39
  PgWinSpr *v36; // eax@39
  PgWinSpr *v37; // eax@39
  float v38; // ecx@39
  NiRefObjectVtbl *v39; // edx@45
  NiRefObjectVtbl *v40; // edx@45
  PgWinSpr *v41; // eax@45
  int v42; // eax@46
  _DWORD *v43; // ecx@46
  NiTListItem<MobCoordinate *> *v44; // eax@49
  MobCoordinate **v45; // ecx@50
  NiTListItem<MobCoordinate *> *v46; // edx@50
  NiTListItem<MobCoordinate *> *v47; // eax@54
  NiTListItem<MobCoordinate *> *v48; // esi@61
  NiTListItem<MobCoordinate *> *v49; // ST14_4@62
  CClientQuest *pQuest; // [sp+10h] [bp-78h]@1
  NiTListItem<NSFParsedShader *> *kIter; // [sp+14h] [bp-74h]@5
  NiPoint2 kPos; // [sp+18h] [bp-70h]@15
  QuestHelperMgr *pkMgr; // [sp+20h] [bp-68h]@1
  signed __int16 Quest_ID; // [sp+24h] [bp-64h]@2
  PgSprData **v55; // [sp+28h] [bp-60h]@3
  unsigned int uiAreaIndex; // [sp+2Ch] [bp-5Ch]@2
  PgTList<MobCoordinate *> kList; // [sp+30h] [bp-58h]@2
  PgSprData **v58; // [sp+40h] [bp-48h]@3
  __int64 v59; // [sp+44h] [bp-44h]@15
  PgWinSpr *pkNumWin; // [sp+4Ch] [bp-3Ch]@2
  __int64 v61; // [sp+50h] [bp-38h]@13
  float fRange; // [sp+58h] [bp-30h]@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kText; // [sp+5Ch] [bp-2Ch]@17
  int v64; // [sp+84h] [bp-4h]@2

  v1 = this;
  FullMapWin::ResetQuestHelper(this);
  pQuest = QuestDataMgr::GetQuest();
  v2 = QuestHelperMgr::GetInstance();
  pkMgr = v2;
  if ( v2 )
  {
    v2->m_OldHandleNum = -1;
    uiAreaIndex = 0;
    Quest_ID = -1;
    pkNumWin = (PgWinSpr *)0xFFFF;
    kList.m_kAllocator.m_uiCount = 0;
    kList.m_pkHead = 0;
    kList.m_pkTail = 0;
    kList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>Vtbl *)&PgTList<MobCoordinate *>::`vftable';
    v3 = QuestHelperMgr::ms_pQuestMCList.m_pkHead;
    v64 = 0;
    if ( QuestHelperMgr::ms_pQuestMCList.m_pkHead )
    {
      v55 = v1->m_spMobArea;
      v58 = (PgSprData **)v1->m_spQuestHelperNum;
      while ( 1 )
      {
        v4 = (QUEST_DATA **)v3->m_element;
        kIter = v3->m_pkNext;
        fRange = *(float *)&v4;
        if ( *(float *)&v4 == 0.0 )
          goto LABEL_60;
        v5 = (MobCoordinate *)v4[1];
        if ( !v5 )
          goto LABEL_60;
        if ( v5->MapName.n3_code[0] == v1->m_kSelectedMapName.n3_code[0]
          && v5->MapName.n3_code[1] == v1->m_kSelectedMapName.n3_code[1]
          && v5->MapName.n3_code[2] == v1->m_kSelectedMapName.n3_code[2] )
        {
          break;
        }
LABEL_59:
        if ( uiAreaIndex > 0xC8 )
          goto LABEL_61;
LABEL_60:
        if ( !kIter )
          goto LABEL_61;
        v3 = kIter;
      }
      if ( CQuest::GetNewQuestStatus((CQuest *)&pQuest->vfptr, (*v4)->ID) == (QUEST_DATA *)8
        && !(unsigned __int8)QuestHelperMgr::IsStartRewardQuest(*v4)
        && !(*v4)->End.bLevel )
      {
        goto LABEL_60;
      }
      v6 = v5->CenterY;
      *((float *)&v61 + 1) = (double)v5->CenterX;
      v7 = (double)(signed int)v5->CenterY;
      if ( v6 < 0 )
        v7 = v7 + 4294967300.0;
      v8 = *v4;
      *((float *)&v59 + 1) = v7;
      kPos.x = *((float *)&v61 + 1);
      kPos.y = *((float *)&v59 + 1);
      if ( Quest_ID != v8->ID || (_WORD)pkNumWin != v5->Mob_ID )
      {
        v9 = QuestHelperMarkWin::CreateWin(
               0,
               0,
               v1->m_spQuestHelperNumBall.m_pObject,
               v1->m_pkFullMapViewWin,
               v1->m_spAutoRunMark.m_pObject);
        QuestHelperMarkWin::SetQuestID(v9, *(_WORD *)(*(_DWORD *)LODWORD(fRange) + 4));
        QuestHelperMarkWin::SetMobID(v9, v5->Mob_ID);
        QuestHelperMarkWin::SetPos(v9, kPos);
        v9->vfptr[64].__vecDelDtor((NiRefObject *)v9, 0);
        kText._Myres = 15;
        kText._Mysize = 0;
        kText._Bx._Buf[0] = 0;
        v10 = v5->Mob_ID;
        v11 = *(QUEST_DATA **)LODWORD(fRange);
        LOBYTE(v64) = 1;
        v12 = QuestHelperMgr::AddConditionText(pkMgr, v11, v10);
        v13 = v12;
        pkNumWin = (PgWinSpr *)&v12->_Bx._Buf[1];
        do
        {
          v14 = v13->_Bx._Buf[0];
          v13 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)v13 + 1);
        }
        while ( v14 );
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &kText,
          v12->_Bx._Buf,
          (char *)v13 - (char *)pkNumWin);
        v15 = kText._Bx._Ptr;
        if ( kText._Myres < 0x10 )
          v15 = (char *)&kText;
        v16 = v15;
        v17 = MiniMapMarkWin::GetMarkWin((MiniMapMarkWin *)&v9->vfptr);
        PgWin::SetToolTipWinText((PgWin *)&v17->vfptr, v16);
        pkNumWin = (PgWinSpr *)g_pkToolTipWin;
        v18 = MiniMapMarkWin::GetMarkWin((MiniMapMarkWin *)&v9->vfptr);
        v18->m_pkToolTipWin = (PgWin *)pkNumWin;
        v19 = (int)v1->m_kQuestBallList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *> *)&v1->m_kQuestBallList);
        *(_DWORD *)(v19 + 8) = v9;
        *(_DWORD *)v19 = 0;
        *(_DWORD *)(v19 + 4) = v1->m_kQuestBallList.m_pkTail;
        v20 = &v1->m_kQuestBallList.m_pkTail->m_pkNext;
        if ( v20 )
          *v20 = v19;
        else
          v1->m_kQuestBallList.m_pkHead = (NiTListItem<QuestHelperMarkWin *> *)v19;
        ++v1->m_kQuestBallList.m_kAllocator.m_uiCount;
        v21 = fRange;
        v1->m_kQuestBallList.m_pkTail = (NiTListItem<QuestHelperMarkWin *> *)v19;
        if ( Quest_ID == *(_WORD *)(*(_DWORD *)LODWORD(v21) + 4) )
          --v58;
        v22 = PgWinSpr::CreateWin(0, 0, *v58, v1->m_pkFullMapViewWin, 0, 0);
        v23 = v22;
        v24 = v22->vfptr[60].__vecDelDtor;
        pkNumWin = v23;
        v24((NiRefObject *)&v23->vfptr, 0);
        v23->vfptr[64].__vecDelDtor((NiRefObject *)v23, 1u);
        v25 = (int)v1->m_kQuestNumList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *> *)&v1->m_kQuestNumList);
        *(_DWORD *)(v25 + 8) = v23;
        *(_DWORD *)v25 = 0;
        *(_DWORD *)(v25 + 4) = v1->m_kQuestNumList.m_pkTail;
        v26 = &v1->m_kQuestNumList.m_pkTail->m_pkNext;
        if ( v26 )
          *v26 = v25;
        else
          v1->m_kQuestNumList.m_pkHead = (NiTListItem<PgWinSpr *> *)v25;
        ++v1->m_kQuestNumList.m_kAllocator.m_uiCount;
        ++v58;
        v27 = kText._Myres < 0x10;
        v1->m_kQuestNumList.m_pkTail = (NiTListItem<PgWinSpr *> *)v25;
        Quest_ID = *(_WORD *)(*(_DWORD *)LODWORD(fRange) + 4);
        pkNumWin = (PgWinSpr *)v5->Mob_ID;
        LOBYTE(v64) = 0;
        if ( !v27 )
          operator delete(kText._Bx._Ptr);
      }
      v28 = MobAreaMarkWin::CreateWin(0, 0, *v55, v1->m_pkFullMapViewWin);
      MobAreaMarkWin::SetPos(v28, kPos);
      MobAreaMarkWin::SetMobID(v28, v5->Mob_ID);
      MobAreaMarkWin::SetQuestID(v28, *(_WORD *)(*(_DWORD *)LODWORD(fRange) + 4));
      v28->vfptr[64].__vecDelDtor((NiRefObject *)v28, 0);
      v28->vfptr[60].__vecDelDtor((NiRefObject *)v28, 0);
      v29 = v5->Height;
      *((float *)&v59 + 1) = (double)v5->Width * 0.02 / v1->m_fFullMapScale * v1->m_fMapScaleX;
      v30 = (double)(signed int)v5->Height;
      if ( v29 < 0 )
        v30 = v30 + 4294967300.0;
      v31 = v5->RangeDegree;
      *((float *)&v61 + 1) = v30 * 0.02 / v1->m_fFullMapScale * v1->m_fMapScaleY;
      v32 = (double)(signed int)v5->RangeDegree;
      if ( v31 < 0 )
        v32 = v32 + 4294967300.0;
      fRange = 0.02 * v32 / v1->m_fFullMapScale * v1->m_fMapScaleX;
      v33 = *((float *)&v59 + 1);
      if ( 0.0 == *((float *)&v59 + 1) )
      {
        v34 = *((float *)&v61 + 1);
        if ( *((float *)&v61 + 1) == 0.0 )
        {
          if ( fRange < 40.0 )
            fRange = 40.0;
          v61 = (signed __int64)fRange;
          v35 = v28->vfptr;
          fRange = *(float *)&v61;
          v35[38].__vecDelDtor((NiRefObject *)v28, v61);
          v28->vfptr[39].__vecDelDtor((NiRefObject *)v28, LODWORD(fRange));
          v36 = MiniMapMarkWin::GetMarkWin((MiniMapMarkWin *)&v28->vfptr);
          v36->vfptr[117].__vecDelDtor((NiRefObject *)v36, LODWORD(fRange));
          v37 = MiniMapMarkWin::GetMarkWin((MiniMapMarkWin *)&v28->vfptr);
          v38 = fRange;
          goto LABEL_46;
        }
      }
      else
      {
        v34 = *((float *)&v61 + 1);
      }
      if ( v33 < 40.0 )
      {
        *((float *)&v59 + 1) = 40.0;
        v33 = (float)40.0;
      }
      if ( v34 < 40.0 )
        *((float *)&v61 + 1) = 40.0;
      v59 = (signed __int64)v33;
      v39 = v28->vfptr;
      HIDWORD(v59) = (signed __int64)v33;
      v39[38].__vecDelDtor((NiRefObject *)v28, HIDWORD(v59));
      v61 = (signed __int64)*((float *)&v61 + 1);
      v40 = v28->vfptr;
      HIDWORD(v61) = v61;
      v40[39].__vecDelDtor((NiRefObject *)v28, v61);
      v41 = MiniMapMarkWin::GetMarkWin((MiniMapMarkWin *)&v28->vfptr);
      v41->vfptr[117].__vecDelDtor((NiRefObject *)v41, HIDWORD(v59));
      v37 = MiniMapMarkWin::GetMarkWin((MiniMapMarkWin *)&v28->vfptr);
      v38 = *((float *)&v61 + 1);
LABEL_46:
      v37->vfptr[118].__vecDelDtor((NiRefObject *)v37, LODWORD(v38));
      v42 = (int)v1->m_kMobAreaList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *> *)&v1->m_kMobAreaList);
      *(_DWORD *)(v42 + 8) = v28;
      *(_DWORD *)v42 = 0;
      *(_DWORD *)(v42 + 4) = v1->m_kMobAreaList.m_pkTail;
      v43 = &v1->m_kMobAreaList.m_pkTail->m_pkNext;
      if ( v43 )
        *v43 = v42;
      else
        v1->m_kMobAreaList.m_pkHead = (NiTListItem<MobAreaMarkWin *> *)v42;
      v1->m_kMobAreaList.m_pkTail = (NiTListItem<MobAreaMarkWin *> *)v42;
      v44 = kList.m_pkHead;
      ++v1->m_kMobAreaList.m_kAllocator.m_uiCount;
      if ( !v44 )
        goto LABEL_54;
      while ( 1 )
      {
        v45 = &v44->m_element;
        v46 = v44;
        v44 = v44->m_pkNext;
        if ( v5 == *v45 )
          break;
        if ( !v44 )
          goto LABEL_54;
      }
      if ( !v46 )
      {
LABEL_54:
        v47 = kList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *> *)&kList);
        v47->m_element = v5;
        v47->m_pkNext = 0;
        v47->m_pkPrev = kList.m_pkTail;
        if ( kList.m_pkTail )
          kList.m_pkTail->m_pkNext = v47;
        else
          kList.m_pkHead = v47;
        ++kList.m_kAllocator.m_uiCount;
        kList.m_pkTail = v47;
      }
      ++uiAreaIndex;
      ++v55;
      goto LABEL_59;
    }
LABEL_61:
    NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *>::RemoveAll((NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *> *)&kList);
    FullMapWin::AddQuestList(v1);
    FullMapWin::UpdateSlideBarQuestList(v1);
    FullMapWin::OnShowQuestList(v1, v1->m_kQuestBallList.m_kAllocator.m_uiCount > 0);
    FullMapWin::UpdateQuestHelper(v1);
    kList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>Vtbl *)&PgTList<MobCoordinate *>::`vftable';
    v48 = kList.m_pkHead;
    v64 = 2;
    if ( kList.m_pkHead )
    {
      do
      {
        v49 = v48;
        v48 = v48->m_pkNext;
        kList.vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *> *)&kList, v49);
      }
      while ( v48 );
    }
  }
}
// 98C134: using guessed type int (__thiscall *PgTList<MobCoordinate *>::`vftable')(void *p, char);

//----- (00506BA0) --------------------------------------------------------
void __thiscall FullMapWin::RemoveQuestHelperMark(FullMapWin *this, QuestHelperMarkWin *pkWin, PgWinSpr *pkNumWin)
{
  FullMapWin *v3; // edi@1
  unsigned __int16 v4; // bx@1
  QuestHelperMgr *v5; // eax@1
  QUEST_DATA *lpQuest; // [sp+Ch] [bp-8h]@2
  CQuest *pQuest; // [sp+10h] [bp-4h]@1

  v3 = this;
  v4 = QuestHelperMarkWin::GetQuestID(pkWin);
  pQuest = (CQuest *)QuestDataMgr::GetQuest();
  v5 = QuestHelperMgr::GetInstance();
  if ( v5 )
  {
    lpQuest = QuestHelperMgr::GetPQData(v5, v4);
    if ( lpQuest )
    {
      if ( CQuest::GetNewQuestStatus(pQuest, v4) == (QUEST_DATA *)8
        && !(unsigned __int8)QuestHelperMgr::IsStartRewardQuest(lpQuest) )
      {
        PgWin::DetachChildWin(v3->m_pkFullMapViewWin, (NiPointer<PgWin> *)&lpQuest, (PgWin *)&pkWin->vfptr);
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&lpQuest);
        NiTPointerListBase<DFALL<AttackSequence *>,AttackSequence *>::Remove(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *> *)&v3->m_kQuestBallList,
          (NiLight *const *)&pkWin);
        PgWin::DetachChildWin(v3->m_pkFullMapViewWin, (NiPointer<PgWin> *)&pkWin, (PgWin *)&pkNumWin->vfptr);
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkWin);
        NiTPointerListBase<DFALL<AttackSequence *>,AttackSequence *>::Remove(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *> *)&v3->m_kQuestNumList,
          (NiLight *const *)&pkNumWin);
        FullMapWin::AddQuestList(v3);
        FullMapWin::UpdateSlideBarQuestList(v3);
      }
    }
  }
}

//----- (00506C70) --------------------------------------------------------
void __thiscall FullMapWin::OnMapListLClick(FullMapWin *this, unsigned int nIndex)
{
  FullMapWin *v2; // esi@1
  unsigned int v3; // eax@2
  int v4; // edi@2
  int v5; // ebx@2
  int v6; // eax@3
  int v7; // edx@6
  SlideBar *v8; // ecx@9
  SlideListWin *v9; // eax@10
  _BYTE v10[12]; // ST00_12@12
  char v11; // al@12

  v2 = this;
  if ( SlideListWin::GetData(this->m_pkMapSlideListWin, nIndex, &nIndex) )
  {
    v3 = nIndex;
    v2->m_kSelectedMapID = nIndex;
    v4 = ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable;
    v5 = (unsigned __int16)v3;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, unsigned int))(*(_DWORD *)ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable
                                                                   + 16))(
                            ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable,
                            v3) )
    {
      if ( (unsigned __int16)v5 <= *(_WORD *)(v4 + 200) )
      {
        v7 = *(_DWORD *)(v4 + 196);
        if ( *(_DWORD *)(v7 + 4 * v5) )
          v6 = *(_DWORD *)(v7 + 4 * v5);
        else
          v6 = 0;
      }
      else
      {
        v6 = 0;
      }
    }
    else
    {
      v6 = 0;
    }
    v2->m_kSelectedMapName.n3_code[0] = *(_DWORD *)(v6 + 2);
    v2->m_kSelectedMapName.n3_code[1] = *(_DWORD *)(v6 + 6);
    v2->m_kSelectedMapName.n3_code[2] = *(_DWORD *)(v6 + 10);
    FullMapWin::OnShowMapList(v2);
    v8 = v2->m_pkMapSlideBar;
    if ( v8 )
    {
      v9 = v2->m_pkMapSlideListWin;
      if ( v9 )
      {
        SlideBar::SetSplitCnt(v8, v9->m_nSlideSplitCnt);
        v2->m_pkMapSlideListWin->m_nViewStartPos = v2->m_pkMapSlideBar->m_nCurPos;
        SlideListWin::UpdateViewList(v2->m_pkMapSlideListWin);
      }
    }
    *(_DWORD *)v10 = v2->m_kSelectedMapName.n3_code[0];
    *(_QWORD *)&v10[4] = *(_QWORD *)&v2->m_kSelectedMapName.n3_code[1];
    v11 = World::SelectMiniMap(&g_kWorld, v4, *(Name3 *)v10);
    FullMapWin::ResetView(v2, v11);
    FullMapWin::AddQuestList(v2);
    FullMapWin::UpdateSlideBarQuestList(v2);
    FullMapWin::AddQuestHelper(v2);
  }
}
// A8C270: using guessed type int ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable;

//----- (00506DA0) --------------------------------------------------------
void __thiscall FullMapWin::LocationInfo(FullMapWin *this, unsigned __int16 Quest_ID)
{
  FullMapWin *v2; // esi@1
  NiTListItem<NSFParsedShader *> *v3; // ebx@2
  NSFParsedShader *v4; // eax@3
  NSBShader *v5; // edi@4
  QUEST_DATA *v6; // eax@5
  unsigned int v7; // eax@9
  unsigned int v8; // ecx@9
  int v9; // edi@9
  _BYTE v10[12]; // ST00_12@14
  char v11; // al@14
  Name3 kMapName; // [sp+Ch] [bp-14h]@1
  QuestHelperMgr *pkMgr; // [sp+18h] [bp-8h]@1
  int Mob_ID; // [sp+1Ch] [bp-4h]@1

  v2 = this;
  World::GetMapName(&g_kWorld, &kMapName);
  Mob_ID = 0xFFFF;
  pkMgr = QuestHelperMgr::GetInstance();
  if ( pkMgr )
  {
    v3 = QuestHelperMgr::ms_pQuestMCList.m_pkHead;
    if ( QuestHelperMgr::ms_pQuestMCList.m_pkHead )
    {
      while ( 1 )
      {
        v4 = v3->m_element;
        v3 = v3->m_pkNext;
        if ( v4 )
        {
          v5 = v4[1].m_spNSBShader.m_pObject;
          if ( v5 )
          {
            v6 = (QUEST_DATA *)v4->m_spNSBShader.m_pObject;
            if ( v6->ID == Quest_ID && QuestHelperMgr::IsConditionProgress(v6, HIWORD(v5->vfptr)) )
            {
              if ( (_WORD)Mob_ID == -1 )
                Mob_ID = HIWORD(v5->vfptr);
              v7 = v5->m_uiRefCount;
              v8 = (unsigned int)v5->m_pcName;
              v9 = (int)v5->m_pcDescription;
              *(_QWORD *)&kMapName.n3_name[0] = __PAIR__(v8, v7);
              kMapName.n3_code[2] = v9;
              if ( v2->m_kSelectedMapName.n3_code[0] == v7
                && v2->m_kSelectedMapName.n3_code[1] == v8
                && v2->m_kSelectedMapName.n3_code[2] == v9 )
              {
                break;
              }
            }
          }
        }
        if ( !v3 )
          goto LABEL_13;
      }
    }
    else
    {
LABEL_13:
      v9 = kMapName.n3_code[2];
      v8 = kMapName.n3_code[1];
      v7 = kMapName.n3_code[0];
    }
    v2->m_kSelectedMapName.n3_code[0] = v7;
    v2->m_kSelectedMapName.n3_code[1] = v8;
    v2->m_kSelectedMapName.n3_code[2] = v9;
    *(_DWORD *)v10 = v2->m_kSelectedMapName.n3_code[0];
    *(_QWORD *)&v10[4] = __PAIR__(v9, v8);
    v11 = World::SelectMiniMap(&g_kWorld, v9, *(Name3 *)v10);
    FullMapWin::ResetView(v2, v11);
    FullMapWin::AddQuestHelper(v2);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
    FullMapWin::UpdateArea(v2, Quest_ID, Mob_ID);
  }
}

//----- (00506EC0) --------------------------------------------------------
void __userpurge FullMapWin::OnCommand(FullMapWin *this@<ecx>, int a2@<edi>, unsigned int wParam, int lParam)
{
  FullMapWin *v4; // esi@1
  char v5; // al@6

  v4 = this;
  switch ( wParam )
  {
    case 1u:
      PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
      break;
    case 2u:
      FullMapWin::OpenWorldMap(this);
      break;
    case 3u:
      FullMapWin::OnShowGrid(this);
      break;
    case 4u:
      FullMapWin::OnShowIndexList(this);
      break;
    case 5u:
      v5 = ((int (*)(void))this->m_pkQuestSlideListWin->vfptr[65].__vecDelDtor)();
      FullMapWin::OnShowQuestList(v4, v5 == 0);
      break;
    case 6u:
      FullMapWin::OnShowMapList(this);
      break;
    case 7u:
      FullMapWin::OnMapListLClick(this, lParam);
      break;
    case 8u:
      FullMapWin::OnSlideBarMapList(this);
      break;
    case 9u:
      FullMapWin::OnQuestListLClick(this, lParam);
      break;
    case 0xAu:
      FullMapWin::OnSlideBarQuestList(this);
      break;
    case 0xCu:
      FullMapWin::OnMapTransparency(this, a2);
      break;
    case 0xDu:
      FullMapWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (00506FB0) --------------------------------------------------------
char __thiscall FullMapWin::Create(FullMapWin *this, MiniMapWin *pkMiniMap, PgFrameWork *pkFrameWork)
{
  FullMapWin *v3; // esi@1
  NiTexturePalette *v4; // edi@2
  const char *v5; // eax@4
  PgSprData *v6; // eax@5
  PgSprData *v7; // ebx@5
  PgSprData *v8; // edi@5
  PgSprData *v9; // eax@12
  PgSprData *v10; // edi@12
  PgSprData *v11; // ebx@12
  PgSprData *v12; // eax@19
  PgSprData *v13; // edi@19
  PgSprData *v14; // ebx@19
  PgSprData *v15; // eax@26
  PgSprData *v16; // edi@26
  PgSprData *v17; // ebx@26
  PgSprData *v18; // eax@33
  PgSprData *v19; // edi@33
  PgSprData *v20; // ebx@33
  PgSprData *v21; // eax@40
  PgSprData *v22; // edi@40
  PgSprData *v23; // ebx@40
  PgSprData *v24; // eax@47
  PgSprData *v25; // edi@47
  PgSprData *v26; // ebx@47
  PgSprData *v27; // eax@54
  PgSprData *v28; // edi@54
  PgSprData *v29; // ebx@54
  PgSprData *v30; // eax@61
  PgSprData *v31; // edi@61
  PgSprData *v32; // ebx@61
  PgSprData *v33; // eax@68
  PgSprData *v34; // edi@68
  PgSprData *v35; // ebx@68
  PgSprData *v36; // eax@75
  PgSprData *v37; // edi@75
  PgSprData *v38; // ebx@75
  PgSprData *v39; // eax@82
  PgSprData *v40; // edi@82
  PgSprData *v41; // ebx@82
  PgSprData *v42; // eax@89
  PgSprData *v43; // edi@89
  PgSprData *v44; // ebx@89
  PgSprData *v45; // eax@96
  PgSprData *v46; // edi@96
  PgSprData *v47; // ebx@96
  PgSprData *v48; // eax@103
  PgSprData *v49; // edi@103
  PgSprData *v50; // ebx@103
  PgSprData *v51; // eax@110
  PgSprData *v52; // edi@110
  PgSprData *v53; // ebx@110
  PgSprData *v54; // eax@117
  PgSprData *v55; // edi@117
  PgSprData *v56; // ebx@117
  PgSprData *v57; // eax@124
  PgSprData *v58; // edi@124
  PgSprData *v59; // ebx@124
  PgSprData *v60; // eax@131
  PgSprData *v61; // edi@131
  PgSprData *v62; // ebx@131
  PgSprData *v63; // eax@138
  PgSprData *v64; // edi@138
  PgSprData *v65; // ebx@138
  PgSprData *v66; // eax@145
  PgSprData *v67; // edi@145
  PgSprData *v68; // ebx@145
  PgSprData *v69; // eax@152
  PgSprData *v70; // edi@152
  PgSprData *v71; // ebx@152
  PgSprData *v72; // eax@159
  PgSprData *v73; // edi@159
  PgSprData *v74; // ebx@159
  PgSprData *v75; // eax@166
  PgSprData *v76; // edi@166
  PgSprData *v77; // ebx@166
  PgSprData *v78; // eax@173
  PgSprData *v79; // edi@173
  PgSprData *v80; // ebx@173
  PgSprData *v81; // eax@180
  PgSprData *v82; // edi@180
  PgSprData *v83; // ebx@180
  PgSprData *v84; // eax@187
  PgSprData *v85; // edi@187
  PgSprData *v86; // ebx@187
  PgSprData *v87; // eax@194
  PgSprData *v88; // edi@194
  PgSprData *v89; // ebx@194
  PgSprData *v90; // eax@201
  PgSprData *v91; // edi@201
  PgSprData *v92; // ebx@201
  PgSprData *v93; // eax@208
  PgSprData *v94; // edi@208
  PgSprData *v95; // ebx@208
  PgSprData *v96; // eax@215
  PgSprData *v97; // edi@215
  PgSprData *v98; // ebx@215
  PgSprData *v99; // eax@222
  PgSprData *v100; // edi@222
  PgSprData *v101; // ebx@222
  PgSprData *v102; // eax@229
  PgSprData *v103; // edi@229
  PgSprData *v104; // ebx@229
  PgSprData *v105; // eax@236
  PgSprData *v106; // edi@236
  PgSprData *v107; // ebx@236
  PgSprData *v108; // eax@243
  PgSprData *v109; // edi@243
  PgSprData *v110; // ebx@243
  PgSprData *v111; // eax@250
  PgSprData *v112; // edi@250
  PgSprData *v113; // ebx@250
  PgSprData *v114; // eax@257
  PgSprData *v115; // edi@257
  PgSprData *v116; // ebx@257
  PgSprData *v117; // eax@264
  PgSprData *v118; // edi@264
  PgSprData *v119; // ebx@264
  PgSprData *v120; // eax@271
  PgSprData *v121; // edi@271
  PgSprData *v122; // ebx@271
  PgSprData *v123; // eax@278
  NiNode *v124; // esi@279
  PgSprData *v126; // eax@284
  PgWinSpr *v127; // eax@284
  PgSprData *v128; // ebx@284
  NiSourceTexture *v129; // edi@284
  PgSprData *v130; // edi@285
  PgFont *v131; // eax@286
  PgWinText *v132; // eax@286
  PgSprData *v133; // eax@286
  NiScreenElementsData *v134; // edi@286
  NiSourceTexture *v135; // eax@286
  NiD3DDefaultShader *v136; // eax@287
  NiSourceTexture *v137; // eax@289
  NiD3DDefaultShader *v138; // eax@290
  InvisibleWin *v139; // eax@292
  NiObjectNET *v140; // eax@292
  unsigned int v141; // eax@293
  NiAVObject *v142; // ecx@295
  PgSprData *v143; // eax@295
  SlideBar *v144; // eax@295
  char *v145; // eax@295
  PgWin *v146; // ecx@295
  MainCharMarkWin *v147; // eax@295
  PgWin *v148; // ST178_4@295
  MainCharMarkWin *v149; // eax@295
  NiNode *v150; // edx@295
  PgSprData *v151; // eax@295
  PgWinSpr *v152; // eax@295
  std::vector<unsigned long,std::allocator<unsigned long> > *v153; // ebx@295
  PgSprData *v154; // edi@295
  PgWinBut *v155; // edi@295
  char *v156; // eax@295
  PgSprData *v157; // edi@295
  char *v158; // eax@295
  signed int v159; // edi@295
  NiNode *v160; // ebx@296
  const char *v161; // eax@298
  PgSprData *v162; // eax@298
  PgWinSpr *v163; // eax@298
  const char *v164; // eax@299
  PgSprData *v165; // eax@301
  PgSprData *v166; // eax@303
  PgWinSpr *v167; // eax@303
  PgSprData *v168; // eax@303
  PgWinSpr *v169; // eax@303
  NiUnsharedGeometryGroup *v170; // eax@303
  NiUnsharedGeometryGroup *v171; // eax@303
  NiUnsharedGeometryGroup *v172; // eax@303
  NiUnsharedGeometryGroup *v173; // eax@303
  NiUnsharedGeometryGroup *v174; // eax@303
  NiUnsharedGeometryGroup *v175; // eax@303
  NiUnsharedGeometryGroup *v176; // eax@303
  NiUnsharedGeometryGroup *v177; // eax@303
  NiUnsharedGeometryGroup *v178; // eax@303
  NiUnsharedGeometryGroup *v179; // eax@303
  NiUnsharedGeometryGroup *v180; // eax@303
  NiUnsharedGeometryGroup *v181; // eax@303
  NiUnsharedGeometryGroup *v182; // eax@303
  NiUnsharedGeometryGroup *v183; // eax@303
  NiUnsharedGeometryGroup *v184; // eax@303
  NiUnsharedGeometryGroup *v185; // eax@303
  NiUnsharedGeometryGroup *v186; // eax@303
  int v187; // edi@303
  NiNode *v188; // ebx@306
  const char *v189; // eax@306
  NiPointer<PgSprData::PgHitTester> *v190; // ecx@306
  unsigned int v191; // ebx@306
  PgFont *v192; // eax@306
  PgWinText *v193; // eax@306
  void *v194; // eax@307
  PgFont *v195; // eax@312
  PgWinText *v196; // eax@312
  NiRefObjectVtbl *v197; // edi@312
  PgFont *v198; // eax@312
  NiRefObjectVtbl *v199; // edi@312
  NiUnsharedGeometryGroup *v200; // eax@312
  PgSprData *v201; // edi@313
  char *v202; // eax@313
  PgSprData *v203; // edi@313
  char *v204; // eax@313
  PgSprData *v205; // eax@313
  PgSprData *v206; // edi@313
  PgSprData *v207; // ebx@313
  NiSourceTexture *v208; // eax@320
  NiNode *v209; // edi@321
  const char *v210; // eax@321
  NiRefObjectVtbl *v211; // eax@321
  NiRefObjectVtbl *v212; // edi@321
  NiRefObjectVtbl *v213; // ebx@321
  NiSourceTexture *v214; // eax@329
  PgSprData **v215; // edi@330
  signed int v216; // ebx@330
  signed int v217; // edi@333
  int v218; // ebx@333
  const char *v219; // eax@334
  PgSprData *v220; // eax@334
  PgWinSpr *v221; // eax@334
  SLWCreateInfo::Item *v222; // edi@335
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *v223; // edi@335
  SLWCreateInfo::Item *v224; // edi@341
  SLWCreateInfo::Item *v225; // edi@343
  NiSourceTexture *v226; // edi@345
  PgSprData *v227; // ebx@345
  PgFont *v228; // eax@345
  SlideListWin *v229; // eax@345
  PgSprData *v230; // eax@345
  SlideBar *v231; // eax@345
  SlideBar *v232; // eax@345
  NiRefObjectVtbl *v233; // ebx@345
  SlideBar *v234; // edi@345
  int v235; // eax@345
  int v236; // eax@345
  PgSprData *v237; // edi@345
  char *v238; // eax@345
  PgSprData *v239; // edi@345
  char *v240; // eax@345
  signed int v241; // edi@345
  PgWinSpr **v242; // ebx@345
  PgSprData *v243; // eax@346
  const char *v244; // eax@346
  PgSprData *v245; // eax@346
  PgSprData *v246; // edi@347
  PgWinBut *v247; // ebx@347
  char *v248; // eax@347
  PgSprData *v249; // eax@347
  PgWinSpr *v250; // eax@347
  NiRefObjectVtbl *v251; // edx@347
  std::vector<CBaseObject *,std::allocator<CBaseObject *> > *v252; // edi@347
  IDirectMessenger *v253; // eax@347
  IDirectMessengerVtbl *v254; // edx@348
  unsigned int v255; // ecx@349
  int v256; // ebx@349
  unsigned int v257; // eax@350
  unsigned int v258; // ecx@352
  NiSourceTexture *v259; // ecx@354
  CBaseObject **v260; // ebx@359
  CBaseObject **v261; // eax@359
  unsigned int v262; // ecx@361
  unsigned int v263; // eax@362
  unsigned int v264; // ecx@364
  NiSourceTexture *v265; // ecx@366
  _DWORD *v266; // eax@371
  PgWinSpr *v267; // eax@373
  unsigned int v268; // eax@373
  CBaseObject **v269; // ebx@374
  CBaseObject **v270; // ecx@375
  NiSourceTexture *v271; // edx@375
  unsigned int v272; // eax@376
  unsigned int v273; // eax@378
  unsigned int v274; // ecx@378
  unsigned int v275; // ecx@380
  CBaseObject **v276; // edx@385
  CBaseObject **v277; // eax@385
  CBaseObject **v278; // ecx@387
  unsigned int v279; // eax@388
  unsigned int v280; // eax@390
  unsigned int v281; // ecx@390
  unsigned int v282; // ecx@392
  float *v283; // eax@397
  signed int v284; // edi@399
  int v285; // ebx@399
  const char *v286; // eax@400
  PgSprData *v287; // eax@400
  PgWinSpr *v288; // eax@400
  boost::shared_ptr<SLWCreateInfo::Item> *v289; // edi@402
  SLWCreateInfo::Item *v290; // edi@403
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *v291; // edi@403
  SLWCreateInfo::Item *v292; // edi@409
  NiSourceTexture *v293; // edi@411
  PgSprData *v294; // eax@411
  SlideListWin *v295; // eax@411
  PgSprData *v296; // edi@411
  NiObjectNET *v297; // eax@411
  NiObjectNET *v298; // eax@411
  NiObjectNET *v299; // eax@411
  NiObjectNET *v300; // eax@411
  NiObjectNET *v301; // eax@411
  NiObjectNET *v302; // eax@411
  SlideBar *v303; // eax@411
  SlideBar *v304; // eax@411
  NiRefObjectVtbl *v305; // ebx@411
  SlideBar *v306; // edi@411
  int v307; // eax@411
  int v308; // eax@411
  SlideBar *v309; // ecx@411
  double v310; // st7@412
  NiRefObjectVtbl *v311; // edx@414
  PgFrameWork *v312; // ebx@414
  unsigned int v313; // edi@414
  unsigned int v314; // esi@414
  double v315; // st7@416
  int v316; // ecx@418
  NiNode *v317; // esi@423
  int *v318; // [sp+180h] [bp-2BCh]@299
  int *v319; // [sp+184h] [bp-2B8h]@299
  SLWCreateInfo kCreateInfo; // [sp+19Ch] [bp-2A0h]@335
  unsigned int uiWidth; // [sp+1B8h] [bp-284h]@284
  unsigned int uiHeight; // [sp+1BCh] [bp-280h]@284
  PgFrameWork *v323; // [sp+1C0h] [bp-27Ch]@1
  NiSourceTexture *pkTexture; // [sp+1C4h] [bp-278h]@286
  NiSourceTexture *pkMobRangeTexture; // [sp+1C8h] [bp-274h]@306
  PgWinSpr *pkWinSpr; // [sp+1CCh] [bp-270h]@303
  unsigned int i; // [sp+1D0h] [bp-26Ch]@284
  int uiTop; // [sp+1D4h] [bp-268h]@5
  int uiLeft; // [sp+1D8h] [bp-264h]@5
  NiPointer<NiNode> spNode; // [sp+1DCh] [bp-260h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+1E0h] [bp-25Ch]@335
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > pTextList[20]; // [sp+1FCh] [bp-240h]@303
  int v333; // [sp+438h] [bp-4h]@1

  v3 = this;
  v323 = pkFrameWork;
  spNode.m_pObject = 0;
  v333 = 0;
  if ( !pkMiniMap )
    return 0;
  this->m_pkMiniMapWin = pkMiniMap;
  v4 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "Game\\MinimapFull.nif");
  PgUtil::LoadNodeNifFile(v5, &spNode, v4);
  if ( !spNode.m_pObject )
    return 0;
  v6 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "AutoRunTarget", &uiLeft, &uiTop, 0);
  v7 = v3->m_spAutoRunMark.m_pObject;
  v8 = v6;
  if ( v7 != v6 )
  {
    if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v3->m_spAutoRunMark.m_pObject = v8;
    if ( v8 )
      InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  }
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NPCLink", &uiLeft, &uiTop, 0);
  v10 = v3->m_spLinkSprData.m_pObject;
  v11 = v9;
  if ( v10 != v9 )
  {
    if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    v3->m_spLinkSprData.m_pObject = v11;
    if ( v11 )
      InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
  }
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NPCSoulStone", &uiLeft, &uiTop, 0);
  v13 = v3->m_spNPCSoulStoneSprData.m_pObject;
  v14 = v12;
  if ( v13 != v12 )
  {
    if ( v13 && !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) && v13 )
      v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
    v3->m_spNPCSoulStoneSprData.m_pObject = v14;
    if ( v14 )
      InterlockedIncrement((volatile LONG *)&v14->m_uiRefCount);
  }
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NPCGuild", &uiLeft, &uiTop, 0);
  v16 = v3->m_spNPCGuildSprData.m_pObject;
  v17 = v15;
  if ( v16 != v15 )
  {
    if ( v16 && !InterlockedDecrement((volatile LONG *)&v16->m_uiRefCount) && v16 )
      v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
    v3->m_spNPCGuildSprData.m_pObject = v17;
    if ( v17 )
      InterlockedIncrement((volatile LONG *)&v17->m_uiRefCount);
  }
  v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NPCQuest", &uiLeft, &uiTop, 0);
  v19 = v3->m_spNPCQuestSprData.m_pObject;
  v20 = v18;
  if ( v19 != v18 )
  {
    if ( v19 && !InterlockedDecrement((volatile LONG *)&v19->m_uiRefCount) && v19 )
      v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
    v3->m_spNPCQuestSprData.m_pObject = v20;
    if ( v20 )
      InterlockedIncrement((volatile LONG *)&v20->m_uiRefCount);
  }
  v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NPCStore", &uiLeft, &uiTop, 0);
  v22 = v3->m_spNPCStoreSprData.m_pObject;
  v23 = v21;
  if ( v22 != v21 )
  {
    if ( v22 && !InterlockedDecrement((volatile LONG *)&v22->m_uiRefCount) && v22 )
      v22->vfptr->__vecDelDtor((NiRefObject *)v22, 1u);
    v3->m_spNPCStoreSprData.m_pObject = v23;
    if ( v23 )
      InterlockedIncrement((volatile LONG *)&v23->m_uiRefCount);
  }
  v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NPCKingdom", &uiLeft, &uiTop, 0);
  v25 = v3->m_spNPCKingdomSprData.m_pObject;
  v26 = v24;
  if ( v25 != v24 )
  {
    if ( v25 && !InterlockedDecrement((volatile LONG *)&v25->m_uiRefCount) && v25 )
      v25->vfptr->__vecDelDtor((NiRefObject *)v25, 1u);
    v3->m_spNPCKingdomSprData.m_pObject = v26;
    if ( v26 )
      InterlockedIncrement((volatile LONG *)&v26->m_uiRefCount);
  }
  v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NPCMine", &uiLeft, &uiTop, 0);
  v28 = v3->m_spNPCMineSprData.m_pObject;
  v29 = v27;
  if ( v28 != v27 )
  {
    if ( v28 && !InterlockedDecrement((volatile LONG *)&v28->m_uiRefCount) && v28 )
      v28->vfptr->__vecDelDtor((NiRefObject *)v28, 1u);
    v3->m_spNPCMineSprData.m_pObject = v29;
    if ( v29 )
      InterlockedIncrement((volatile LONG *)&v29->m_uiRefCount);
  }
  v30 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NPCFurniture", &uiLeft, &uiTop, 0);
  v31 = v3->m_spNPCFurnitureSprData.m_pObject;
  v32 = v30;
  if ( v31 != v30 )
  {
    if ( v31 && !InterlockedDecrement((volatile LONG *)&v31->m_uiRefCount) && v31 )
      v31->vfptr->__vecDelDtor((NiRefObject *)v31, 1u);
    v3->m_spNPCFurnitureSprData.m_pObject = v32;
    if ( v32 )
      InterlockedIncrement((volatile LONG *)&v32->m_uiRefCount);
  }
  v33 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NPCSmith", &uiLeft, &uiTop, 0);
  v34 = v3->m_spNPCSmithSprData.m_pObject;
  v35 = v33;
  if ( v34 != v33 )
  {
    if ( v34 && !InterlockedDecrement((volatile LONG *)&v34->m_uiRefCount) && v34 )
      v34->vfptr->__vecDelDtor((NiRefObject *)v34, 1u);
    v3->m_spNPCSmithSprData.m_pObject = v35;
    if ( v35 )
      InterlockedIncrement((volatile LONG *)&v35->m_uiRefCount);
  }
  v36 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NPCSkill", &uiLeft, &uiTop, 0);
  v37 = v3->m_spNPCSkillSprData.m_pObject;
  v38 = v36;
  if ( v37 != v36 )
  {
    if ( v37 && !InterlockedDecrement((volatile LONG *)&v37->m_uiRefCount) && v37 )
      v37->vfptr->__vecDelDtor((NiRefObject *)v37, 1u);
    v3->m_spNPCSkillSprData.m_pObject = v38;
    if ( v38 )
      InterlockedIncrement((volatile LONG *)&v38->m_uiRefCount);
  }
  v39 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NPCHelp", &uiLeft, &uiTop, 0);
  v40 = v3->m_spNPCHelpSprData.m_pObject;
  v41 = v39;
  if ( v40 != v39 )
  {
    if ( v40 && !InterlockedDecrement((volatile LONG *)&v40->m_uiRefCount) && v40 )
      v40->vfptr->__vecDelDtor((NiRefObject *)v40, 1u);
    v3->m_spNPCHelpSprData.m_pObject = v41;
    if ( v41 )
      InterlockedIncrement((volatile LONG *)&v41->m_uiRefCount);
  }
  v42 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NPCTempler", &uiLeft, &uiTop, 0);
  v43 = v3->m_spNPCTemplarSprData.m_pObject;
  v44 = v42;
  if ( v43 != v42 )
  {
    if ( v43 && !InterlockedDecrement((volatile LONG *)&v43->m_uiRefCount) && v43 )
      v43->vfptr->__vecDelDtor((NiRefObject *)v43, 1u);
    v3->m_spNPCTemplarSprData.m_pObject = v44;
    if ( v44 )
      InterlockedIncrement((volatile LONG *)&v44->m_uiRefCount);
  }
  v45 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NPCItem", &uiLeft, &uiTop, 0);
  v46 = v3->m_spNPCItemSprData.m_pObject;
  v47 = v45;
  if ( v46 != v45 )
  {
    if ( v46 && !InterlockedDecrement((volatile LONG *)&v46->m_uiRefCount) && v46 )
      v46->vfptr->__vecDelDtor((NiRefObject *)v46, 1u);
    v3->m_spNPCItemSprData.m_pObject = v47;
    if ( v47 )
      InterlockedIncrement((volatile LONG *)&v47->m_uiRefCount);
  }
  v48 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NPCNormal", &uiLeft, &uiTop, 0);
  v49 = v3->m_spNPCNormalSprData.m_pObject;
  v50 = v48;
  if ( v49 != v48 )
  {
    if ( v49 && !InterlockedDecrement((volatile LONG *)&v49->m_uiRefCount) && v49 )
      v49->vfptr->__vecDelDtor((NiRefObject *)v49, 1u);
    v3->m_spNPCNormalSprData.m_pObject = v50;
    if ( v50 )
      InterlockedIncrement((volatile LONG *)&v50->m_uiRefCount);
  }
  v51 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NPCWtitle", &uiLeft, &uiTop, 0);
  v52 = v3->m_spNPCWTitleSprData.m_pObject;
  v53 = v51;
  if ( v52 != v51 )
  {
    if ( v52 && !InterlockedDecrement((volatile LONG *)&v52->m_uiRefCount) && v52 )
      v52->vfptr->__vecDelDtor((NiRefObject *)v52, 1u);
    v3->m_spNPCWTitleSprData.m_pObject = v53;
    if ( v53 )
      InterlockedIncrement((volatile LONG *)&v53->m_uiRefCount);
  }
  v54 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NPCQuestING", &uiLeft, &uiTop, 0);
  v55 = v3->m_kQuestStateImg.spIng.m_pObject;
  v56 = v54;
  if ( v55 != v54 )
  {
    if ( v55 && !InterlockedDecrement((volatile LONG *)&v55->m_uiRefCount) && v55 )
      v55->vfptr->__vecDelDtor((NiRefObject *)v55, 1u);
    v3->m_kQuestStateImg.spIng.m_pObject = v56;
    if ( v56 )
      InterlockedIncrement((volatile LONG *)&v56->m_uiRefCount);
  }
  v57 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NPCQuest", &uiLeft, &uiTop, 0);
  v58 = v3->m_kQuestStateImg.spAble.m_pObject;
  v59 = v57;
  if ( v58 != v57 )
  {
    if ( v58 && !InterlockedDecrement((volatile LONG *)&v58->m_uiRefCount) && v58 )
      v58->vfptr->__vecDelDtor((NiRefObject *)v58, 1u);
    v3->m_kQuestStateImg.spAble.m_pObject = v59;
    if ( v59 )
      InterlockedIncrement((volatile LONG *)&v59->m_uiRefCount);
  }
  v60 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NPCQuestEND", &uiLeft, &uiTop, 0);
  v61 = v3->m_kQuestStateImg.spReward.m_pObject;
  v62 = v60;
  if ( v61 != v60 )
  {
    if ( v61 && !InterlockedDecrement((volatile LONG *)&v61->m_uiRefCount) && v61 )
      v61->vfptr->__vecDelDtor((NiRefObject *)v61, 1u);
    v3->m_kQuestStateImg.spReward.m_pObject = v62;
    if ( v62 )
      InterlockedIncrement((volatile LONG *)&v62->m_uiRefCount);
  }
  v63 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NPCLinkTown", &uiLeft, &uiTop, 0);
  v64 = v3->m_spLinkTownSprData.m_pObject;
  v65 = v63;
  if ( v64 != v63 )
  {
    if ( v64 && !InterlockedDecrement((volatile LONG *)&v64->m_uiRefCount) && v64 )
      v64->vfptr->__vecDelDtor((NiRefObject *)v64, 1u);
    v3->m_spLinkTownSprData.m_pObject = v65;
    if ( v65 )
      InterlockedIncrement((volatile LONG *)&v65->m_uiRefCount);
  }
  v66 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NPCQuestLowLevel", &uiLeft, &uiTop, 0);
  v67 = v3->m_kQuestStateImg.spLowAble.m_pObject;
  v68 = v66;
  if ( v67 != v66 )
  {
    if ( v67 && !InterlockedDecrement((volatile LONG *)&v67->m_uiRefCount) && v67 )
      v67->vfptr->__vecDelDtor((NiRefObject *)v67, 1u);
    v3->m_kQuestStateImg.spLowAble.m_pObject = v68;
    if ( v68 )
      InterlockedIncrement((volatile LONG *)&v68->m_uiRefCount);
  }
  v69 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Party", &uiLeft, &uiTop, 0);
  v70 = v3->m_spPartySprData.m_pObject;
  v71 = v69;
  if ( v70 != v69 )
  {
    if ( v70 && !InterlockedDecrement((volatile LONG *)&v70->m_uiRefCount) && v70 )
      v70->vfptr->__vecDelDtor((NiRefObject *)v70, 1u);
    v3->m_spPartySprData.m_pObject = v71;
    if ( v71 )
      InterlockedIncrement((volatile LONG *)&v71->m_uiRefCount);
  }
  v72 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Me01", &uiLeft, &uiTop, 0);
  v73 = v3->m_spMainCharSprData.m_pObject;
  v74 = v72;
  if ( v73 != v72 )
  {
    if ( v73 && !InterlockedDecrement((volatile LONG *)&v73->m_uiRefCount) && v73 )
      v73->vfptr->__vecDelDtor((NiRefObject *)v73, 1u);
    v3->m_spMainCharSprData.m_pObject = v74;
    if ( v74 )
      InterlockedIncrement((volatile LONG *)&v74->m_uiRefCount);
  }
  v75 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MiniHouse", &uiLeft, &uiTop, 0);
  v76 = v3->m_spMiniHouseSprData.m_pObject;
  v77 = v75;
  if ( v76 != v75 )
  {
    if ( v76 && !InterlockedDecrement((volatile LONG *)&v76->m_uiRefCount) && v76 )
      v76->vfptr->__vecDelDtor((NiRefObject *)v76, 1u);
    v3->m_spMiniHouseSprData.m_pObject = v77;
    if ( v77 )
      InterlockedIncrement((volatile LONG *)&v77->m_uiRefCount);
  }
  v78 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Me02", &uiLeft, &uiTop, 0);
  v79 = v3->m_spMainCharSprDataSecond.m_pObject;
  v80 = v78;
  if ( v79 != v78 )
  {
    if ( v79 && !InterlockedDecrement((volatile LONG *)&v79->m_uiRefCount) && v79 )
      v79->vfptr->__vecDelDtor((NiRefObject *)v79, 1u);
    v3->m_spMainCharSprDataSecond.m_pObject = v80;
    if ( v80 )
      InterlockedIncrement((volatile LONG *)&v80->m_uiRefCount);
  }
  v81 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GuilWarFlag_Yellow", &uiLeft, &uiTop, 0);
  v82 = v3->m_spFlagNormal.m_pObject;
  v83 = v81;
  if ( v82 != v81 )
  {
    if ( v82 && !InterlockedDecrement((volatile LONG *)&v82->m_uiRefCount) && v82 )
      v82->vfptr->__vecDelDtor((NiRefObject *)v82, 1u);
    v3->m_spFlagNormal.m_pObject = v83;
    if ( v83 )
      InterlockedIncrement((volatile LONG *)&v83->m_uiRefCount);
  }
  v84 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GuilWarFlag_Red", &uiLeft, &uiTop, 0);
  v85 = v3->m_spFlagRed.m_pObject;
  v86 = v84;
  if ( v85 != v84 )
  {
    if ( v85 && !InterlockedDecrement((volatile LONG *)&v85->m_uiRefCount) && v85 )
      v85->vfptr->__vecDelDtor((NiRefObject *)v85, 1u);
    v3->m_spFlagRed.m_pObject = v86;
    if ( v86 )
      InterlockedIncrement((volatile LONG *)&v86->m_uiRefCount);
  }
  v87 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GuilWarFlag_Blue", &uiLeft, &uiTop, 0);
  v88 = v3->m_spFlagBlue.m_pObject;
  v89 = v87;
  if ( v88 != v87 )
  {
    if ( v88 && !InterlockedDecrement((volatile LONG *)&v88->m_uiRefCount) && v88 )
      v88->vfptr->__vecDelDtor((NiRefObject *)v88, 1u);
    v3->m_spFlagBlue.m_pObject = v89;
    if ( v89 )
      InterlockedIncrement((volatile LONG *)&v89->m_uiRefCount);
  }
  v90 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "WarpGray", &uiLeft, &uiTop, 0);
  v91 = v3->m_spWarpGray.m_pObject;
  v92 = v90;
  if ( v91 != v90 )
  {
    if ( v91 && !InterlockedDecrement((volatile LONG *)&v91->m_uiRefCount) && v91 )
      v91->vfptr->__vecDelDtor((NiRefObject *)v91, 1u);
    v3->m_spWarpGray.m_pObject = v92;
    if ( v92 )
      InterlockedIncrement((volatile LONG *)&v92->m_uiRefCount);
  }
  v93 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "WarpRed", &uiLeft, &uiTop, 0);
  v94 = v3->m_spWarpRed.m_pObject;
  v95 = v93;
  if ( v94 != v93 )
  {
    if ( v94 && !InterlockedDecrement((volatile LONG *)&v94->m_uiRefCount) && v94 )
      v94->vfptr->__vecDelDtor((NiRefObject *)v94, 1u);
    v3->m_spWarpRed.m_pObject = v95;
    if ( v95 )
      InterlockedIncrement((volatile LONG *)&v95->m_uiRefCount);
  }
  v96 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "WarpBlue", &uiLeft, &uiTop, 0);
  v97 = v3->m_spWarpBlue.m_pObject;
  v98 = v96;
  if ( v97 != v96 )
  {
    if ( v97 && !InterlockedDecrement((volatile LONG *)&v97->m_uiRefCount) && v97 )
      v97->vfptr->__vecDelDtor((NiRefObject *)v97, 1u);
    v3->m_spWarpBlue.m_pObject = v98;
    if ( v98 )
      InterlockedIncrement((volatile LONG *)&v98->m_uiRefCount);
  }
  v99 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ForceRed", &uiLeft, &uiTop, 0);
  v100 = v3->m_spRedPos.m_pObject;
  v101 = v99;
  if ( v100 != v99 )
  {
    if ( v100 && !InterlockedDecrement((volatile LONG *)&v100->m_uiRefCount) && v100 )
      v100->vfptr->__vecDelDtor((NiRefObject *)v100, 1u);
    v3->m_spRedPos.m_pObject = v101;
    if ( v101 )
      InterlockedIncrement((volatile LONG *)&v101->m_uiRefCount);
  }
  v102 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ForceBlue", &uiLeft, &uiTop, 0);
  v103 = v3->m_spBluePos.m_pObject;
  v104 = v102;
  if ( v103 != v102 )
  {
    if ( v103 && !InterlockedDecrement((volatile LONG *)&v103->m_uiRefCount) && v103 )
      v103->vfptr->__vecDelDtor((NiRefObject *)v103, 1u);
    v3->m_spBluePos.m_pObject = v104;
    if ( v104 )
      InterlockedIncrement((volatile LONG *)&v104->m_uiRefCount);
  }
  v105 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ChiefMonster", &uiLeft, &uiTop, 0);
  v106 = v3->m_spMobChiefSprData.m_pObject;
  v107 = v105;
  if ( v106 != v105 )
  {
    if ( v106 && !InterlockedDecrement((volatile LONG *)&v106->m_uiRefCount) && v106 )
      v106->vfptr->__vecDelDtor((NiRefObject *)v106, 1u);
    v3->m_spMobChiefSprData.m_pObject = v107;
    if ( v107 )
      InterlockedIncrement((volatile LONG *)&v107->m_uiRefCount);
  }
  v108 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NormalMonster", &uiLeft, &uiTop, 0);
  v109 = v3->m_spMobNormalSprData.m_pObject;
  v110 = v108;
  if ( v109 != v108 )
  {
    if ( v109 && !InterlockedDecrement((volatile LONG *)&v109->m_uiRefCount) && v109 )
      v109->vfptr->__vecDelDtor((NiRefObject *)v109, 1u);
    v3->m_spMobNormalSprData.m_pObject = v110;
    if ( v110 )
      InterlockedIncrement((volatile LONG *)&v110->m_uiRefCount);
  }
  v111 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Broken", &uiLeft, &uiTop, 0);
  v112 = v3->m_spMobDmgSprData.m_pObject;
  v113 = v111;
  if ( v112 != v111 )
  {
    if ( v112 && !InterlockedDecrement((volatile LONG *)&v112->m_uiRefCount) && v112 )
      v112->vfptr->__vecDelDtor((NiRefObject *)v112, 1u);
    v3->m_spMobDmgSprData.m_pObject = v113;
    if ( v113 )
      InterlockedIncrement((volatile LONG *)&v113->m_uiRefCount);
  }
  v114 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "RedWood", &uiLeft, &uiTop, 0);
  v115 = v3->m_spRedWoodSprData.m_pObject;
  v116 = v114;
  if ( v115 != v114 )
  {
    if ( v115 && !InterlockedDecrement((volatile LONG *)&v115->m_uiRefCount) && v115 )
      v115->vfptr->__vecDelDtor((NiRefObject *)v115, 1u);
    v3->m_spRedWoodSprData.m_pObject = v116;
    if ( v116 )
      InterlockedIncrement((volatile LONG *)&v116->m_uiRefCount);
  }
  v117 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BlueWood", &uiLeft, &uiTop, 0);
  v118 = v3->m_spBlueWoodSprData.m_pObject;
  v119 = v117;
  if ( v118 != v117 )
  {
    if ( v118 && !InterlockedDecrement((volatile LONG *)&v118->m_uiRefCount) && v118 )
      v118->vfptr->__vecDelDtor((NiRefObject *)v118, 1u);
    v3->m_spBlueWoodSprData.m_pObject = v119;
    if ( v119 )
      InterlockedIncrement((volatile LONG *)&v119->m_uiRefCount);
  }
  v120 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Flag", &uiLeft, &uiTop, 0);
  v121 = v3->m_spCaptureFlagSprData.m_pObject;
  v122 = v120;
  if ( v121 != v120 )
  {
    if ( v121 && !InterlockedDecrement((volatile LONG *)&v121->m_uiRefCount) && v121 )
      v121->vfptr->__vecDelDtor((NiRefObject *)v121, 1u);
    v3->m_spCaptureFlagSprData.m_pObject = v122;
    if ( v122 )
      InterlockedIncrement((volatile LONG *)&v122->m_uiRefCount);
  }
  v123 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v3->vfptr, 0, 0, v123, 0, v323, "FullMapWin", 0) )
  {
    v124 = spNode.m_pObject;
    v333 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v124 )
        v124->vfptr->__vecDelDtor((NiRefObject *)v124, 1u);
    }
    return 0;
  }
  uiWidth = uiLeft;
  uiHeight = uiTop;
  v126 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  v127 = PgWinSpr::CreateWin(uiLeft, uiTop, v126, (PgWin *)&v3->vfptr, 0, 0);
  v127->vfptr[60].__vecDelDtor((NiRefObject *)v127, 0);
  v128 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v128, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(v128, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  *(float *)&i = COERCE_FLOAT(PgWinBut::CreateWin(uiLeft, uiTop, v128, (PgWin *)&v3->vfptr, 1u, 0, 0));
  v323 = (PgFrameWork *)&v3->m_kVisibleControls;
  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
    (std::vector<unsigned long,std::allocator<unsigned long> > *)&v3->m_kVisibleControls,
    &i);
  v129 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    v130 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, v129);
    PgSprData::Add(v130, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(v130, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    *(float *)&i = COERCE_FLOAT(PgWinBut::CreateWin(uiLeft, uiTop, v130, (PgWin *)&v3->vfptr, 0xDu, 0, 0));
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v3->m_kVisibleControls,
      &i);
  }
  PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight);
  v131 = Font::Get(0);
  v132 = PgWinText::CreateWin(uiLeft, uiTop, uiWidth, uiHeight, v131, (PgWin *)&v3->vfptr, 0, 0);
  v3->m_pkMapNameTextWin = v132;
  v132->vfptr[122].__vecDelDtor((NiRefObject *)v132, 1u);
  ((void (__stdcall *)(void *))v3->m_pkMapNameTextWin->vfptr[118].__vecDelDtor)(&unk_98B689);
  ((void (__stdcall *)(_DWORD))v3->m_pkMapNameTextWin->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(struct D3DXCOLOR *))v3->m_pkMapNameTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
  v133 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Gride_Num", &uiLeft, &uiTop, 0);
  v3->m_pkGridNumSprWin = PgWinSpr::CreateWin(uiLeft, uiTop, v133, (PgWin *)&v3->vfptr, 0, 0);
  PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "fullmap", &uiLeft, &uiTop, &uiWidth, &uiHeight);
  v3->m_pkFullMapViewWin = PgWin::CreateWin(uiLeft, uiTop, uiWidth, uiHeight, (PgWin *)&v3->vfptr, 0, 0);
  v134 = PgUtil::CreateScreenGeometryData(1u, 1u, 0, 0, 1u, 1u);
  v135 = (NiSourceTexture *)operator new(0xC4u);
  pkTexture = v135;
  LOBYTE(v333) = 1;
  if ( v135 )
    NiScreenElements::NiScreenElements((NiScreenElements *)v135, v134);
  else
    v136 = 0;
  LOBYTE(v333) = 0;
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_spFullMapGeom, v136);
  v137 = (NiSourceTexture *)operator new(0x44u);
  pkTexture = v137;
  LOBYTE(v333) = 2;
  if ( v137 )
    NiTexturingProperty::NiTexturingProperty((NiTexturingProperty *)v137);
  else
    v138 = 0;
  LOBYTE(v333) = 0;
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_spFullMapTexProp, v138);
  NiTexturingProperty::SetBaseTexture(v3->m_spFullMapTexProp.m_pObject, 0);
  v139 = InvisibleWin::CreateWin(uiLeft, uiTop, uiWidth, uiHeight, (PgWin *)&v3->vfptr, 0, 0);
  v3->m_pkInvisibleWin = v139;
  InvisibleWin::Init(v139);
  NiAVObject::AttachProperty(
    (NiAVObject *)&v3->m_spFullMapGeom.m_pObject->vfptr,
    (NiProperty *)&v3->m_pkInvisibleWin->m_pkMaterialProp->vfptr);
  ((void (__stdcall *)(InvisibleWin *, _DWORD))v3->m_pkFullMapViewWin->vfptr[29].__vecDelDtor)(v3->m_pkInvisibleWin, 0);
  v140 = (NiObjectNET *)operator new(0x20u);
  i = (unsigned int)v140;
  LOBYTE(v333) = 3;
  if ( v140 )
  {
    NiObjectNET::NiObjectNET(v140);
    v141 = i;
    *(_DWORD *)i = &NiAlphaProperty::`vftable';
    *(_WORD *)(v141 + 28) = 236;
    *(_BYTE *)(v141 + 30) = 0;
  }
  else
  {
    v141 = 0;
  }
  *(_WORD *)(v141 + 28) = *(_WORD *)(v141 + 28) & 0xFEED | 0xED;
  v142 = (NiAVObject *)&v3->m_spFullMapGeom.m_pObject->vfptr;
  LOBYTE(v333) = 0;
  NiAVObject::AttachProperty(v142, (NiProperty *)v141);
  v143 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MovingPoint", &uiLeft, &uiTop, 0);
  i = (unsigned int)v143;
  v144 = SlideBar::CreateWin(
           spNode.m_pObject,
           "AlphaOptBar",
           "AlphaOptBarLow",
           "AlphaOptBarHigh",
           v143,
           0xBu,
           (PgWin *)&v3->vfptr);
  v3->m_pkSlides = v144;
  v144->m_uiClickMsg = 12;
  SlideBar::SetSplitCnt(v3->m_pkSlides, 100);
  *(float *)&i = COERCE_FLOAT(PgWinSpr::CreateWin(uiLeft, uiTop, (PgSprData *)i, (PgWin *)&v3->vfptr, 0, 0));
  v145 = (char *)TextData2::Get(0x729894C6u);
  PgWin::SetToolTipWinText((PgWin *)i, v145);
  v146 = (PgWin *)i;
  *(_DWORD *)(i + 272) = g_pkToolTipWin;
  PgWin::AttachChildWin((PgWin *)&v3->m_pkSlides->m_pkSlidePoint->vfptr, v146);
  NiTexturingProperty::SetBaseFilterMode(v3->m_spFullMapTexProp.m_pObject, FILTER_BILERP);
  v3->m_spFullMapTexProp.m_pObject->m_eApply = 2;
  NiTexturingProperty::SetBaseClampMode(v3->m_spFullMapTexProp.m_pObject, 0);
  NiAVObject::AttachProperty(
    (NiAVObject *)&v3->m_spFullMapGeom.m_pObject->vfptr,
    (NiProperty *)&v3->m_spFullMapTexProp.m_pObject->vfptr);
  NiAVObject::UpdateProperties((NiAVObject *)&v3->m_spFullMapGeom.m_pObject->vfptr);
  ((void (__stdcall *)(NiScreenElements *, _DWORD))v3->m_pkFullMapViewWin->vfptr[29].__vecDelDtor)(
    v3->m_spFullMapGeom.m_pObject,
    0);
  v147 = MainCharMarkWin::CreateWin(0, 0, v3->m_spMainCharSprData.m_pObject, v3->m_pkFullMapViewWin);
  v148 = v3->m_pkFullMapViewWin;
  v3->m_pkMainCharMarkWin = v147;
  v149 = MainCharMarkWin::CreateWin(0, 0, v3->m_spMainCharSprDataSecond.m_pObject, v148);
  v150 = spNode.m_pObject;
  v3->m_pkMainCharMarkSecondWin = v149;
  v151 = PgSprData::Create((NiAVObject *)&v150->vfptr, "Panel02", &uiLeft, &uiTop, 0);
  v152 = PgWinSpr::CreateWin(uiLeft, uiTop, v151, (PgWin *)&v3->vfptr, 0, 0);
  v153 = (std::vector<unsigned long,std::allocator<unsigned long> > *)v323;
  i = (unsigned int)v152;
  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
    (std::vector<unsigned long,std::allocator<unsigned long> > *)v323,
    &i);
  v154 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GridNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v154, (NiAVObject *)&spNode.m_pObject->vfptr, "GridClick");
  PgSprData::Add(v154, (NiAVObject *)&spNode.m_pObject->vfptr, "GridOver");
  v155 = PgWinBut::CreateWin(uiLeft, uiTop, v154, (PgWin *)&v3->vfptr, 3u, 0, 0);
  v156 = (char *)TextData::Get(0x9A9C6BE6);
  PgWin::SetToolTipWinText((PgWin *)&v155->vfptr, v156);
  v155->m_pkToolTipWin = g_pkToolTipWin;
  i = (unsigned int)v155;
  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(v153, &i);
  v157 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "AllMapBtnNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v157, (NiAVObject *)&spNode.m_pObject->vfptr, "AllMapBtnClick");
  PgSprData::Add(v157, (NiAVObject *)&spNode.m_pObject->vfptr, "AllMapBtnOver");
  v3->m_pkWorldMapBut = PgWinBut::CreateWin(uiLeft, uiTop, v157, (PgWin *)&v3->vfptr, 2u, 0, 0);
  v158 = (char *)TextData::Get(0xFA4B2544);
  PgWin::SetToolTipWinText((PgWin *)&v3->m_pkWorldMapBut->vfptr, v158);
  v3->m_pkWorldMapBut->m_pkToolTipWin = g_pkToolTipWin;
  v159 = 0;
  do
  {
    v160 = spNode.m_pObject;
    if ( v159 >= 10 )
    {
      v319 = &uiTop;
      v318 = &uiLeft;
      v164 = fs("Grid%d", v159 + 1);
    }
    else
    {
      if ( v159 == 9 )
      {
        v161 = fs("Grid%d", 10);
        v162 = PgSprData::Create((NiAVObject *)&v160->vfptr, v161, &uiLeft, &uiTop, 0);
        v163 = PgWinSpr::CreateWin(uiLeft, uiTop, v162, (PgWin *)&v3->vfptr, 0, 0);
        v3->m_pkGridSprWin[9] = v163;
        goto LABEL_302;
      }
      v319 = &uiTop;
      v318 = &uiLeft;
      v164 = fs("Grid0%d", v159 + 1);
    }
    v165 = PgSprData::Create((NiAVObject *)&v160->vfptr, v164, v318, v319, 0);
    v163 = PgWinSpr::CreateWin(uiLeft, uiTop, v165, (PgWin *)&v3->vfptr, 0, 0);
    v3->m_pkGridSprWin[v159] = v163;
LABEL_302:
    v163->vfptr[64].__vecDelDtor((NiRefObject *)v163, 0);
    ++v159;
  }
  while ( v159 < 22 );
  v166 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel06", &uiLeft, &uiTop, 0);
  v167 = PgWinSpr::CreateWin(uiLeft, uiTop, v166, (PgWin *)&v3->vfptr, 0, 0);
  v3->m_pkIndexPanel[0] = v167;
  v167->vfptr[60].__vecDelDtor((NiRefObject *)v167, 0);
  ((void (__stdcall *)(_DWORD))v3->m_pkIndexPanel[0]->vfptr[64].__vecDelDtor)(0);
  v168 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel05", &uiLeft, &uiTop, 0);
  v169 = PgWinSpr::CreateWin(uiLeft, uiTop, v168, (PgWin *)&v3->vfptr, 0, 0);
  v3->m_pkIndexPanel[1] = v169;
  v169->vfptr[60].__vecDelDtor((NiRefObject *)v169, 0);
  ((void (__stdcall *)(_DWORD))v3->m_pkIndexPanel[1]->vfptr[64].__vecDelDtor)(0);
  `eh vector constructor iterator'(
    pTextList,
    0x1Cu,
    20,
    (void (__thiscall *)(void *))std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>,
    (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
  LOBYTE(v333) = 4;
  v170 = TextData2::Get(0xE22C1F11);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    pTextList,
    (const char *)v170,
    strlen((const char *)v170));
  v171 = TextData2::Get(0x3949342Cu);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &pTextList[1],
    (const char *)v171,
    strlen((const char *)v171));
  v172 = TextData2::Get(0xD6C8D823);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &pTextList[2],
    (const char *)v172,
    strlen((const char *)v172));
  v173 = TextData2::Get(0xC8D8F7C2);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &pTextList[3],
    (const char *)v173,
    strlen((const char *)v173));
  v174 = TextData2::Get(0x3D463C7Fu);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &pTextList[4],
    (const char *)v174,
    strlen((const char *)v174));
  v175 = TextData2::Get(0xC8D8EDD6);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &pTextList[5],
    (const char *)v175,
    strlen((const char *)v175));
  v176 = TextData2::Get(0x353E8671u);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &pTextList[6],
    (const char *)v176,
    strlen((const char *)v176));
  v177 = TextData2::Get(0xEAD62108);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &pTextList[7],
    (const char *)v177,
    strlen((const char *)v177));
  v178 = TextData2::Get(0xD2E9D6D3);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &pTextList[8],
    (const char *)v178,
    strlen((const char *)v178));
  v179 = TextData2::Get(0xE133110A);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &pTextList[9],
    (const char *)v179,
    strlen((const char *)v179));
  v180 = TextData2::Get(0x37443837u);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &pTextList[10],
    (const char *)v180,
    strlen((const char *)v180));
  v181 = TextData2::Get(0x7E93A2C8u);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &pTextList[11],
    (const char *)v181,
    strlen((const char *)v181));
  v182 = TextData2::Get(0x9B9989D7);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &pTextList[12],
    (const char *)v182,
    strlen((const char *)v182));
  v183 = TextData2::Get(0x2C224582u);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &pTextList[13],
    (const char *)v183,
    strlen((const char *)v183));
  v184 = TextData2::Get(0xC3F32825);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &pTextList[14],
    (const char *)v184,
    strlen((const char *)v184));
  v185 = TextData2::Get(0x2E51302Bu);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &pTextList[15],
    (const char *)v185,
    strlen((const char *)v185));
  v186 = TextData2::Get(0x8BA6D9C9);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &pTextList[16],
    (const char *)v186,
    strlen((const char *)v186));
  *(float *)&i = 0.0;
  *(float *)&pkWinSpr = COERCE_FLOAT(pTextList);
  v187 = (int)v3->m_pkCategoryText;
  do
  {
    if ( pkWinSpr->m_ppkExtra )
    {
      v188 = spNode.m_pObject;
      v189 = fs("Text%02d", i + 1);
      v190 = PgSprData::Create((NiAVObject *)&v188->vfptr, v189, &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
      v191 = v190->m_pObject->m_uiHeight;
      pkMobRangeTexture = (NiSourceTexture *)v190->m_pObject->m_uiWidth;
      v192 = Font::Get(TITLEBOLD);
      v193 = PgWinText::CreateWin(uiLeft, uiTop, (unsigned int)pkMobRangeTexture, v191, v192, (PgWin *)&v3->vfptr, 0, 0);
      *(_DWORD *)v187 = v193;
      v193->vfptr[122].__vecDelDtor((NiRefObject *)v193, 5u);
      if ( pkWinSpr->m_uiExtraDataSize < 0x10 )
        v194 = pkWinSpr;
      else
        v194 = pkWinSpr->vfptr;
      (*(void (__stdcall **)(void *))(**(_DWORD **)v187 + 472))(v194);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v187 + 240))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v187 + 256))(0);
    }
    else
    {
      *(_DWORD *)v187 = 0;
    }
    pkWinSpr = (PgWinSpr *)((char *)pkWinSpr + 28);
    v187 += 4;
    ++i;
  }
  while ( i < 0x14 );
  if ( PgUtil::GetTriShapeRect(
         (NiAVObject *)&spNode.m_pObject->vfptr,
         "Text_AutoRun",
         &uiLeft,
         &uiTop,
         &uiWidth,
         &uiHeight) )
  {
    v195 = Font::Get(0);
    v196 = PgWinText::CreateWin(uiLeft, uiTop, uiWidth, uiHeight, v195, (PgWin *)&v3->vfptr, 0, 0);
    v3->m_pkAutoRunText = v196;
    v196->vfptr[122].__vecDelDtor((NiRefObject *)v196, 5u);
    v197 = v3->m_pkAutoRunText->vfptr;
    v198 = Font::Get(SMALL);
    v197[113].__vecDelDtor((NiRefObject *)v3->m_pkAutoRunText, (unsigned int)v198);
    v199 = v3->m_pkAutoRunText->vfptr;
    v200 = TextData2::Get(0x91A6E8E8);
    v199[118].__vecDelDtor((NiRefObject *)v3->m_pkAutoRunText, (unsigned int)v200);
    ((void (__stdcall *)(_DWORD))v3->m_pkAutoRunText->vfptr[60].__vecDelDtor)(0);
  }
  v201 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ExBtn_L_Nor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v201, (NiAVObject *)&spNode.m_pObject->vfptr, "ExBtn_L_Over");
  PgSprData::Add(v201, (NiAVObject *)&spNode.m_pObject->vfptr, "ExBtn_L_Click");
  v3->m_pkIndexBtn[0] = PgWinBut::CreateWin(uiLeft, uiTop, v201, (PgWin *)&v3->vfptr, 4u, 0, 0);
  v202 = (char *)TextData2::Get(0x8FA26CBF);
  PgWin::SetToolTipWinText((PgWin *)&v3->m_pkIndexBtn[0]->vfptr, v202);
  v3->m_pkIndexBtn[0]->m_pkToolTipWin = g_pkToolTipWin;
  ((void (__stdcall *)(signed int))v3->m_pkIndexBtn[0]->vfptr[60].__vecDelDtor)(1);
  ((void (__stdcall *)(signed int))v3->m_pkIndexBtn[0]->vfptr[64].__vecDelDtor)(1);
  v203 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ExBtn_L_Nor01", &uiLeft, &uiTop, 0);
  PgSprData::Add(v203, (NiAVObject *)&spNode.m_pObject->vfptr, "ExBtn_L_Over01");
  PgSprData::Add(v203, (NiAVObject *)&spNode.m_pObject->vfptr, "ExBtn_L_Click01");
  v3->m_pkIndexBtn[1] = PgWinBut::CreateWin(uiLeft, uiTop, v203, (PgWin *)&v3->vfptr, 4u, 0, 0);
  v204 = (char *)TextData2::Get(0x8FA26CBF);
  PgWin::SetToolTipWinText((PgWin *)&v3->m_pkIndexBtn[1]->vfptr, v204);
  v3->m_pkIndexBtn[1]->m_pkToolTipWin = g_pkToolTipWin;
  ((void (__stdcall *)(_DWORD))v3->m_pkIndexBtn[1]->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v3->m_pkIndexBtn[1]->vfptr[64].__vecDelDtor)(0);
  v205 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "QuestListNumBall", &uiLeft, &uiTop, 0);
  v206 = v3->m_spQuestHelperNumBall.m_pObject;
  v207 = v205;
  if ( v206 != v205 )
  {
    if ( v206 && !InterlockedDecrement((volatile LONG *)&v206->m_uiRefCount) && v206 )
      v206->vfptr->__vecDelDtor((NiRefObject *)v206, 1u);
    v3->m_spQuestHelperNumBall.m_pObject = v207;
    if ( v207 )
      InterlockedIncrement((volatile LONG *)&v207->m_uiRefCount);
  }
  v208 = 0;
  pkWinSpr = (PgWinSpr *)v3->m_spQuestHelperNum;
  do
  {
    v209 = spNode.m_pObject;
    pkMobRangeTexture = (NiSourceTexture *)((char *)v208 + 1);
    v210 = fs("QuestListNum%02d", (char *)&v208->vfptr + 1);
    v211 = (NiRefObjectVtbl *)PgSprData::Create((NiAVObject *)&v209->vfptr, v210, &uiLeft, &uiTop, 0);
    v212 = pkWinSpr->vfptr;
    v213 = v211;
    if ( pkWinSpr->vfptr != v211 )
    {
      if ( v212 && !InterlockedDecrement((volatile LONG *)&v212[1]) && v212 )
        (*(void (__thiscall **)(NiRefObjectVtbl *, signed int))v212->__vecDelDtor)(v212, 1);
      pkWinSpr->vfptr = v213;
      if ( v213 )
        InterlockedIncrement((volatile LONG *)&v213[1]);
    }
    v208 = pkMobRangeTexture;
    pkWinSpr = (PgWinSpr *)((char *)pkWinSpr + 4);
  }
  while ( (signed int)pkMobRangeTexture < 40 );
  v214 = MenuTexMgr::GetTexture(0x15u);
  pkMobRangeTexture = v214;
  if ( v214 )
  {
    v215 = v3->m_spMobArea;
    v216 = 200;
    while ( 1 )
    {
      *v215 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MobRange", &uiLeft, &uiTop, v214);
      ++v215;
      if ( !--v216 )
        break;
      v214 = pkMobRangeTexture;
    }
  }
  v217 = 0;
  v218 = (int)v3->m_pkQuestListPanel;
  do
  {
    pkMobRangeTexture = (NiSourceTexture *)spNode.m_pObject;
    v219 = fs("Panel%02d", v217 + 3);
    v220 = PgSprData::Create((NiAVObject *)pkMobRangeTexture, v219, &uiLeft, &uiTop, 0);
    v221 = PgWinSpr::CreateWin(uiLeft, uiTop, v220, (PgWin *)&v3->vfptr, 0, 0);
    *(_DWORD *)v218 = v221;
    v221->vfptr[60].__vecDelDtor((NiRefObject *)v221, 0);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v218 + 256))(0);
    ++v217;
    v218 += 4;
  }
  while ( v217 < 2 );
  kCreateInfo.m_arrItem._Myfirst = 0;
  kCreateInfo.m_arrItem._Mylast = 0;
  kCreateInfo.m_arrItem._Myend = 0;
  kCreateInfo.m_bMakeData = 0;
  kCreateInfo.m_nOffX = 0;
  kCreateInfo.m_nOffY = 0;
  LOBYTE(v333) = 5;
  v222 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
  v222->nItemType = 1;
  v222->pNode = spNode.m_pObject;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarNor", 0xCu);
  v223 = &v222->vecNodeName;
  LOBYTE(v333) = 6;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v223,
    &_Val);
  LOBYTE(v333) = 5;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarClick", 0xEu);
  LOBYTE(v333) = 7;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v223,
    &_Val);
  LOBYTE(v333) = 5;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarOver", 0xDu);
  LOBYTE(v333) = 8;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v223,
    &_Val);
  LOBYTE(v333) = 5;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v224 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  v224->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column03", 8u);
  LOBYTE(v333) = 9;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &v224->vecNodeName,
    &_Val);
  LOBYTE(v333) = 5;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v224->pNode = spNode.m_pObject;
  v225 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  v225->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column01", 8u);
  LOBYTE(v333) = 10;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &v225->vecNodeName,
    &_Val);
  LOBYTE(v333) = 5;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v225->pNode = spNode.m_pObject;
  SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
  v226 = MenuTexMgr::GetTexture(4u);
  pkTexture = v226;
  v227 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SubText01", &uiLeft, &uiTop, v226);
  v228 = Font::Get(TITLEBOLD);
  v229 = SlideListWin::CreateWin(uiLeft + 25, uiTop, v227, (PgWin *)&v3->vfptr, v228, &kCreateInfo, 0, 0);
  v3->m_pkQuestSlideListWin = v229;
  v229->m_uiLClickMsg = 9;
  SlideListWin::AlignText(v3->m_pkQuestSlideListWin, 1u);
  FullMapWin::AddQuestList(v3);
  SlideListWin::UpdateViewList(v3->m_pkQuestSlideListWin);
  ((void (__stdcall *)(_DWORD))v3->m_pkQuestSlideListWin->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v3->m_pkQuestSlideListWin->vfptr[64].__vecDelDtor)(0);
  v3->m_pkQuestSlideListWin->m_bCheckEnable = 0;
  v230 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle", &uiLeft, &uiTop, v226);
  v231 = SlideBar::CreateWin(
           spNode.m_pObject,
           "SlideBar",
           "SlideBar_UpBtn",
           "SlideBar_DnBtn",
           v230,
           0,
           (PgWin *)&v3->vfptr);
  v3->m_pkQuestSlideBar = v231;
  v231->m_uiClickMsg = 10;
  v3->m_pkQuestSlideBar->m_eType = 1;
  v232 = v3->m_pkQuestSlideBar;
  v233 = v232->vfptr;
  v234 = v3->m_pkQuestSlideBar;
  v235 = ((int (__thiscall *)(SlideBar *))v232->vfptr[42].__vecDelDtor)(v3->m_pkQuestSlideBar);
  v236 = (int)v234->vfptr[41].__vecDelDtor((NiRefObject *)v234, v235);
  v233[77].__vecDelDtor((NiRefObject *)v3->m_pkQuestSlideBar, v236);
  ((void (__stdcall *)(_DWORD))v3->m_pkQuestSlideBar->vfptr[64].__vecDelDtor)(0);
  SlideBar::SetSplitCnt(v3->m_pkQuestSlideBar, v3->m_pkQuestSlideListWin->m_nSlideSplitCnt);
  v237 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ExBtn_R_Nor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v237, (NiAVObject *)&spNode.m_pObject->vfptr, "ExBtn_R_Over");
  PgSprData::Add(v237, (NiAVObject *)&spNode.m_pObject->vfptr, "ExBtn_R_Click");
  v3->m_pkQuestListBtn[0] = PgWinBut::CreateWin(uiLeft, uiTop, v237, (PgWin *)&v3->vfptr, 5u, 0, 0);
  v238 = (char *)TextData2::Get(0xEDF9B63E);
  PgWin::SetToolTipWinText((PgWin *)&v3->m_pkQuestListBtn[0]->vfptr, v238);
  v3->m_pkQuestListBtn[0]->m_pkToolTipWin = g_pkToolTipWin;
  ((void (__stdcall *)(_DWORD))v3->m_pkQuestListBtn[0]->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v3->m_pkQuestListBtn[0]->vfptr[64].__vecDelDtor)(0);
  v239 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ExBtn_R_Nor01", &uiLeft, &uiTop, 0);
  PgSprData::Add(v239, (NiAVObject *)&spNode.m_pObject->vfptr, "ExBtn_R_Over01");
  PgSprData::Add(v239, (NiAVObject *)&spNode.m_pObject->vfptr, "ExBtn_R_Click01");
  v3->m_pkQuestListBtn[1] = PgWinBut::CreateWin(uiLeft, uiTop, v239, (PgWin *)&v3->vfptr, 5u, 0, 0);
  v240 = (char *)TextData2::Get(0xEDF9B63E);
  PgWin::SetToolTipWinText((PgWin *)&v3->m_pkQuestListBtn[1]->vfptr, v240);
  v3->m_pkQuestListBtn[1]->m_pkToolTipWin = g_pkToolTipWin;
  ((void (__stdcall *)(_DWORD))v3->m_pkQuestListBtn[1]->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v3->m_pkQuestListBtn[1]->vfptr[64].__vecDelDtor)(0);
  v241 = 0;
  v242 = v3->m_pkQuestListNum;
  do
  {
    v243 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "QuestListNumBall", &uiLeft, &uiTop, 0);
    ++v241;
    *(v242 - 40) = PgWinSpr::CreateWin(0, 0, v243, (PgWin *)&v3->vfptr, 0, 0);
    pkMobRangeTexture = (NiSourceTexture *)spNode.m_pObject;
    v244 = fs("QuestListNum%02d", v241);
    v245 = PgSprData::Create((NiAVObject *)pkMobRangeTexture, v244, &uiLeft, &uiTop, 0);
    *v242 = PgWinSpr::CreateWin(0, 0, v245, (PgWin *)&v3->vfptr, 0, 0);
    ++v242;
  }
  while ( v241 < 40 );
  v246 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v246, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver");
  PgSprData::Add(v246, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick");
  v247 = PgWinBut::CreateWin(uiLeft, uiTop, v246, (PgWin *)&v3->vfptr, 6u, 0, 0);
  v248 = (char *)TextData2::Get(0x8E10C8C0);
  PgWin::SetToolTipWinText((PgWin *)&v247->vfptr, v248);
  v247->m_pkToolTipWin = g_pkToolTipWin;
  v249 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn_arrow", &uiLeft, &uiTop, 0);
  v250 = PgWinSpr::CreateWin(uiLeft, uiTop, v249, (PgWin *)&v3->vfptr, 0, 0);
  v251 = v250->vfptr;
  pkWinSpr = v250;
  v251[60].__vecDelDtor((NiRefObject *)v250, 0);
  v252 = (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)v323;
  v253 = v323->m_pkMsgHooker;
  i = (unsigned int)v247;
  if ( &i >= (unsigned int *)v253 || (v254 = v323->vfptr, v323->vfptr > (IDirectMessengerVtbl *)&i) )
  {
    v262 = v323->m_uiMessageNum;
    if ( v253 == (IDirectMessenger *)v262 )
    {
      v263 = ((char *)v253 - (char *)v323->vfptr) >> 2;
      if ( v263 > 0x3FFFFFFE )
        std::_Xlength_error("vector<T> too long");
      v264 = (signed int)(v262 - (unsigned int)v323->vfptr) >> 2;
      pkMobRangeTexture = (NiSourceTexture *)(v263 + 1);
      if ( v263 + 1 > v264 )
      {
        if ( 0x3FFFFFFF - (v264 >> 1) >= v264 )
          v265 = (NiSourceTexture *)((v264 >> 1) + v264);
        else
          v265 = 0;
        if ( v265 < pkMobRangeTexture )
          v265 = pkMobRangeTexture;
        std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
          (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)v323,
          (unsigned int)v265);
      }
    }
    v266 = v252->_Mylast;
    if ( v266 )
      *v266 = v247;
  }
  else
  {
    v255 = v323->m_uiMessageNum;
    v256 = ((char *)&i - (char *)v254) >> 2;
    if ( v253 == (IDirectMessenger *)v255 )
    {
      v257 = ((char *)v253 - (char *)v254) >> 2;
      if ( v257 > 0x3FFFFFFE )
        std::_Xlength_error("vector<T> too long");
      v258 = (signed int)(v255 - (_DWORD)v254) >> 2;
      pkMobRangeTexture = (NiSourceTexture *)(v257 + 1);
      if ( v257 + 1 > v258 )
      {
        if ( 0x3FFFFFFF - (v258 >> 1) >= v258 )
          v259 = (NiSourceTexture *)((v258 >> 1) + v258);
        else
          v259 = 0;
        if ( v259 < pkMobRangeTexture )
          v259 = pkMobRangeTexture;
        std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
          (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)v323,
          (unsigned int)v259);
      }
    }
    v260 = &v252->_Myfirst[v256];
    v261 = v252->_Mylast;
    if ( v261 )
      *v261 = *v260;
  }
  v267 = pkWinSpr;
  ++v252->_Mylast;
  i = (unsigned int)v267;
  v268 = (unsigned int)v252->_Mylast;
  if ( (unsigned int)&i >= v268 || (v269 = v252->_Myfirst, v252->_Myfirst > (CBaseObject **)&i) )
  {
    v278 = v252->_Myend;
    if ( (CBaseObject **)v268 == v278 )
    {
      v279 = (signed int)(v268 - (unsigned int)v252->_Myfirst) >> 2;
      if ( v279 > 0x3FFFFFFE )
        std::_Xlength_error("vector<T> too long");
      v280 = v279 + 1;
      v281 = v278 - v252->_Myfirst;
      if ( v280 > v281 )
      {
        if ( 0x3FFFFFFF - (v281 >> 1) >= v281 )
          v282 = (v281 >> 1) + v281;
        else
          v282 = 0;
        if ( v282 < v280 )
          v282 = v280;
        std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v252, v282);
      }
    }
    v283 = (float *)v252->_Mylast;
    if ( v283 )
      *v283 = *(float *)&pkWinSpr;
  }
  else
  {
    v270 = v252->_Myend;
    v271 = (NiSourceTexture *)(((char *)&i - (char *)v269) >> 2);
    pkMobRangeTexture = (NiSourceTexture *)(((char *)&i - (char *)v269) >> 2);
    if ( (CBaseObject **)v268 == v270 )
    {
      v272 = (signed int)(v268 - (_DWORD)v269) >> 2;
      if ( v272 > 0x3FFFFFFE )
        std::_Xlength_error("vector<T> too long");
      v273 = v272 + 1;
      v274 = v270 - v269;
      if ( v273 > v274 )
      {
        if ( 0x3FFFFFFF - (v274 >> 1) >= v274 )
          v275 = (v274 >> 1) + v274;
        else
          v275 = 0;
        if ( v275 < v273 )
          v275 = v273;
        std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v252, v275);
        v271 = pkMobRangeTexture;
      }
    }
    v276 = &v252->_Myfirst[(_DWORD)v271];
    v277 = v252->_Mylast;
    if ( v277 )
      *v277 = *v276;
  }
  ++v252->_Mylast;
  v284 = 0;
  v285 = (int)v3->m_pkMapListPanel;
  do
  {
    pkMobRangeTexture = (NiSourceTexture *)spNode.m_pObject;
    v286 = fs("Panel%02d", v284 + 7);
    v287 = PgSprData::Create((NiAVObject *)pkMobRangeTexture, v286, &uiLeft, &uiTop, 0);
    v288 = PgWinSpr::CreateWin(uiLeft, uiTop, v287, (PgWin *)&v3->vfptr, 0, 0);
    *(_DWORD *)v285 = v288;
    v288->vfptr[60].__vecDelDtor((NiRefObject *)v288, 0);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v285 + 256))(0);
    ++v284;
    v285 += 4;
  }
  while ( v284 < 2 );
  if ( kCreateInfo.m_arrItem._Myfirst != kCreateInfo.m_arrItem._Mylast )
  {
    v289 = std::_Move<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem> *>(
             kCreateInfo.m_arrItem._Mylast,
             kCreateInfo.m_arrItem._Mylast,
             kCreateInfo.m_arrItem._Myfirst);
    std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(v289, kCreateInfo.m_arrItem._Mylast);
    kCreateInfo.m_arrItem._Mylast = v289;
  }
  kCreateInfo.m_bMakeData = 0;
  kCreateInfo.m_nOffX = 0;
  kCreateInfo.m_nOffY = 0;
  v290 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
  v290->nItemType = 1;
  v290->pNode = spNode.m_pObject;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarNor01", 0xEu);
  v291 = &v290->vecNodeName;
  LOBYTE(v333) = 11;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v291,
    &_Val);
  LOBYTE(v333) = 5;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarClick01", 0x10u);
  LOBYTE(v333) = 12;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v291,
    &_Val);
  LOBYTE(v333) = 5;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarOver01", 0xFu);
  LOBYTE(v333) = 13;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v291,
    &_Val);
  LOBYTE(v333) = 5;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v292 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  v292->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column02", 8u);
  LOBYTE(v333) = 14;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &v292->vecNodeName,
    &_Val);
  LOBYTE(v333) = 5;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  v292->pNode = spNode.m_pObject;
  SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
  v293 = pkTexture;
  v294 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SubText02", &uiLeft, &uiTop, pkTexture);
  v295 = SlideListWin::CreateWin(uiLeft, uiTop, v294, (PgWin *)&v3->vfptr, &kCreateInfo, 0, 0);
  v3->m_pkMapSlideListWin = v295;
  v295->m_uiLClickMsg = 7;
  SlideListWin::AlignText(v3->m_pkMapSlideListWin, 4u);
  FullMapWin::AddMapList(v3);
  SlideListWin::UpdateViewList(v3->m_pkMapSlideListWin);
  v3->m_pkMapSlideListWin->m_bCheckEnable = 0;
  ((void (__stdcall *)(_DWORD))v3->m_pkMapSlideListWin->vfptr[64].__vecDelDtor)(0);
  v296 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle", &uiLeft, &uiTop, v293);
  v297 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnNor01");
  NiObjectNET::SetName(v297, "SlideBar_DnBtn01Nor");
  v298 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnClick01");
  NiObjectNET::SetName(v298, "SlideBar_DnBtn01Click");
  v299 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnOver01");
  NiObjectNET::SetName(v299, "SlideBar_DnBtn01Over");
  v300 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnNor01");
  NiObjectNET::SetName(v300, "SlideBar_UpBtn01Nor");
  v301 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnClick01");
  NiObjectNET::SetName(v301, "SlideBar_UpBtn01Click");
  v302 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnOver01");
  NiObjectNET::SetName(v302, "SlideBar_UpBtn01Over");
  v303 = SlideBar::CreateWin(
           spNode.m_pObject,
           "SlideBar01",
           "SlideBar_UpBtn01",
           "SlideBar_DnBtn01",
           v296,
           0,
           (PgWin *)&v3->vfptr);
  v3->m_pkMapSlideBar = v303;
  v303->m_uiClickMsg = 8;
  v3->m_pkMapSlideBar->m_eType = 1;
  v304 = v3->m_pkMapSlideBar;
  v305 = v304->vfptr;
  v306 = v3->m_pkMapSlideBar;
  v307 = ((int (__thiscall *)(SlideBar *))v304->vfptr[42].__vecDelDtor)(v3->m_pkMapSlideBar);
  v308 = (int)v306->vfptr[41].__vecDelDtor((NiRefObject *)v306, v307);
  v305[77].__vecDelDtor((NiRefObject *)v3->m_pkMapSlideBar, v308);
  ((void (__stdcall *)(_DWORD))v3->m_pkMapSlideBar->vfptr[64].__vecDelDtor)(0);
  SlideBar::SetSplitCnt(v3->m_pkMapSlideBar, v3->m_pkMapSlideListWin->m_nSlideSplitCnt);
  ((void (__thiscall *)(FullMapWin *, unsigned int, unsigned int, _DWORD, _DWORD))v3->vfptr[59].__vecDelDtor)(
    v3,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  v3->m_pkWorldMapWin = WorldMapWin::CreateWin(v3->m_pkFrameWork);
  FullMapWin::InitVisibleControls(v3);
  v309 = v3->m_pkSlides;
  pkTexture = (NiSourceTexture *)v309->m_nCurPos;
  *(float *)&i = (double)(signed int)pkTexture / 100.0;
  SlideBar::SetCurPos(v309, (int)pkTexture);
  ((void (__stdcall *)(unsigned int))v3->m_pkInvisibleWin->vfptr[69].__vecDelDtor)(i);
  if ( *(float *)&i >= 0.8999999761581421 )
    v310 = 1.0;
  else
    v310 = 0.0;
  v311 = v3->vfptr;
  *(float *)&pkWinSpr = v310;
  v311[69].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkWinSpr);
  v312 = v323;
  v313 = 0;
  v314 = ((char *)v323->m_pkMsgHooker - (char *)v323->vfptr) >> 2;
  if ( v314 )
  {
    do
    {
      if ( *((_DWORD *)&v312->vfptr->SetMsgHooker + v313) )
      {
        v315 = *(float *)&i;
        if ( *(float *)&i < 0.5 )
          v315 = 0.60000002;
        v316 = *((_DWORD *)&v312->vfptr->SetMsgHooker + v313);
        *(float *)&v323 = v315;
        (*(void (__stdcall **)(PgFrameWork *))(*(_DWORD *)v316 + 276))(v323);
      }
      ++v313;
    }
    while ( v313 < v314 );
  }
  LOBYTE(v333) = 4;
  if ( kCreateInfo.m_arrItem._Myfirst )
  {
    std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(
      kCreateInfo.m_arrItem._Myfirst,
      kCreateInfo.m_arrItem._Mylast);
    operator delete(kCreateInfo.m_arrItem._Myfirst);
  }
  kCreateInfo.m_arrItem._Myfirst = 0;
  kCreateInfo.m_arrItem._Mylast = 0;
  kCreateInfo.m_arrItem._Myend = 0;
  LOBYTE(v333) = 0;
  `eh vector destructor iterator'(
    pTextList,
    0x1Cu,
    20,
    (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
  v333 = -1;
  if ( spNode.m_pObject )
  {
    v317 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v317 )
        v317->vfptr->__vecDelDtor((NiRefObject *)v317, 1u);
    }
  }
  return 1;
}
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00509FF0) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::~NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>(NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`vftable';
}
// 98BF8C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`vftable')(void *p, char);

//----- (0050A000) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::~NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>(NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`vftable';
}
// 98BF9C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`vftable')(void *p, char);

//----- (0050A010) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::~NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>(NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`vftable';
}
// 98BFBC: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`vftable')(void *p, char);

//----- (0050A020) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::~NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>(NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`vftable';
}
// 98BFCC: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`vftable')(void *p, char);

//----- (0050A030) --------------------------------------------------------
void __thiscall NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::SetAt(NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *this, int key, KQTeamMarkWin *val)
{
  int v3; // ebx@1
  NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *v4; // esi@1
  int v5; // eax@1
  NiTMapItem<unsigned short,KQTeamMarkWin *> *v6; // edi@1
  NiTMapItem<unsigned short,KQTeamMarkWin *> *v7; // edi@4
  unsigned int uiIndex; // [sp+14h] [bp+8h]@1

  v3 = key;
  v4 = this;
  v5 = ((int (__stdcall *)(int))this->vfptr->KeyToHashIndex)(key);
  v6 = v4->m_ppkHashTable[v5];
  uiIndex = v5;
  if ( v6 )
  {
    while ( !v4->vfptr->IsKeysEqual(v4, v3, v6->m_key) )
    {
      v6 = v6->m_pkNext;
      if ( !v6 )
        goto LABEL_4;
    }
    v4->vfptr->ClearValue(v4, v6);
    v4->vfptr->SetValue(v4, v6, v3, val);
  }
  else
  {
LABEL_4:
    v7 = v4->vfptr->NewItem(v4);
    v4->vfptr->SetValue(v4, v7, v3, val);
    v7->m_pkNext = v4->m_ppkHashTable[uiIndex];
    v4->m_ppkHashTable[uiIndex] = v7;
    ++v4->m_kAllocator.m_uiCount;
  }
}

//----- (0050A0C0) --------------------------------------------------------
bool __thiscall NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::RemoveAt(NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *this, int key)
{
  NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *v2; // esi@1
  int v3; // ebx@1
  NiTMapItem<unsigned short,KQTeamMarkWin *> *v4; // edi@1
  bool result; // al@3
  NiTMapItem<unsigned short,KQTeamMarkWin *> *v6; // ebx@4
  NiTMapItem<unsigned short,KQTeamMarkWin *> *v7; // edi@4

  v2 = this;
  v3 = ((int (__stdcall *)(int))this->vfptr->KeyToHashIndex)(key);
  v4 = v2->m_ppkHashTable[v3];
  if ( !v4 )
    goto LABEL_7;
  if ( v2->vfptr->IsKeysEqual(v2, key, v4->m_key) )
  {
    v2->m_ppkHashTable[v3] = v4->m_pkNext;
    v2->vfptr->ClearValue(v2, v4);
    v2->vfptr->DeleteItem(v2, v4);
    --v2->m_kAllocator.m_uiCount;
    return 1;
  }
  v6 = v4;
  v7 = v4->m_pkNext;
  if ( v7 )
  {
    while ( !v2->vfptr->IsKeysEqual(v2, key, v7->m_key) )
    {
      v6 = v7;
      v7 = v7->m_pkNext;
      if ( !v7 )
        goto LABEL_7;
    }
    v6->m_pkNext = v7->m_pkNext;
    v2->vfptr->ClearValue(v2, v7);
    v2->vfptr->DeleteItem(v2, v7);
    --v2->m_kAllocator.m_uiCount;
    result = 1;
  }
  else
  {
LABEL_7:
    result = 0;
  }
  return result;
}

//----- (0050A180) --------------------------------------------------------
char __thiscall NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::GetAt(NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *this, int key, KQTeamMarkWin **val)
{
  NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *v3; // esi@1
  NiTMapItem<unsigned short,KQTeamMarkWin *> *v4; // edi@1
  char result; // al@4

  v3 = this;
  v4 = this->m_ppkHashTable[((int (__stdcall *)(_DWORD))this->vfptr->KeyToHashIndex)(key)];
  if ( v4 )
  {
    while ( !v3->vfptr->IsKeysEqual(v3, key, v4->m_key) )
    {
      v4 = v4->m_pkNext;
      if ( !v4 )
        goto LABEL_4;
    }
    *val = v4->m_val;
    result = 1;
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}

//----- (0050A1E0) --------------------------------------------------------
unsigned int __thiscall NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::KeyToHashIndex(NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *this, unsigned __int16 key)
{
  return key % this->m_uiHashSize;
}

//----- (0050A200) --------------------------------------------------------
BOOL __stdcall NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::IsKeysEqual(unsigned __int16 key1, unsigned __int16 key2)
{
  return key1 == key2;
}

//----- (0050A220) --------------------------------------------------------
void __stdcall NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::SetValue(NiTMapItem<unsigned short,KQTeamMarkWin *> *pkItem, unsigned __int16 key, KQTeamMarkWin *val)
{
  pkItem->m_key = key;
  pkItem->m_val = val;
}

//----- (0050A240) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::~NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>(NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::`vftable';
}
// 98C01C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::`vftable')(void *p, char);

//----- (0050A250) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::~NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>(NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`vftable';
}
// 98C02C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`vftable')(void *p, char);

//----- (0050A260) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::~NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>(NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::`vftable';
}
// 98C03C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::`vftable')(void *p, char);

//----- (0050A270) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>::~NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>(NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>::`vftable';
}
// 98C04C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>::`vftable')(void *p, char);

//----- (0050A280) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 98BF8C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`vftable')(void *p, char);

//----- (0050A2B0) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 98BF9C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`vftable')(void *p, char);

//----- (0050A2E0) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 98BFBC: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`vftable')(void *p, char);

//----- (0050A310) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 98BFCC: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`vftable')(void *p, char);

//----- (0050A340) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 98C01C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::`vftable')(void *p, char);

//----- (0050A370) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 98C02C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`vftable')(void *p, char);

//----- (0050A3A0) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 98C03C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::`vftable')(void *p, char);

//----- (0050A3D0) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 98C04C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>::`vftable')(void *p, char);

//----- (0050A400) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,float>::~NiTListBase<NiTPointerAllocator<unsigned int>,float>(NiTListBase<NiTPointerAllocator<unsigned int>,float> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,float>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,float>::`vftable';
}
// 98BF7C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,float>::`vftable')(void *p, char);

//----- (0050A410) --------------------------------------------------------
void __thiscall NiTPointerList<float>::~NiTPointerList<float>(NiTPointerList<float> *this)
{
  NiTPointerList<float> *v1; // edi@1
  NiTListItem<float> *v2; // esi@1
  NiTListItem<float> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,float>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,float>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,float> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,float>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,float>::`vftable';
}
// 98BF7C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,float>::`vftable')(void *p, char);
// 98C06C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,float>::`vftable')(void *p, char);

//----- (0050A490) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,float> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,float>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,float> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,float> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,float>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,float>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 98BF7C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,float>::`vftable')(void *p, char);

//----- (0050A4C0) --------------------------------------------------------
void __thiscall QuestStateImage::~QuestStateImage(QuestStateImage *this)
{
  QuestStateImage *v1; // edi@1
  PgSprData *v2; // esi@1
  PgSprData *v3; // esi@5
  PgSprData *v4; // esi@9
  PgSprData *v5; // esi@13

  v1 = this;
  v2 = this->spLowAble.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->spReward.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v4 = v1->spAble.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v5 = v1->spIng.m_pObject;
  if ( v1->spIng.m_pObject && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
  {
    if ( v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  }
}

//----- (0050A5A0) --------------------------------------------------------
void __thiscall NiTPointerList<NpcMarkWin *>::~NiTPointerList<NpcMarkWin *>(NiTPointerList<NpcMarkWin *> *this)
{
  NiTPointerList<NpcMarkWin *> *v1; // edi@1
  NiTListItem<NpcMarkWin *> *v2; // esi@1
  NiTListItem<NpcMarkWin *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`vftable';
}
// 98BF9C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`vftable')(void *p, char);
// 98BFAC: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`vftable')(void *p, char);

//----- (0050A620) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *> *v2; // edi@1
  NiTListItem<NpcMarkWin *> *v3; // esi@1
  NiTListItem<NpcMarkWin *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98BF9C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`vftable')(void *p, char);
// 98BFAC: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`vftable')(void *p, char);

//----- (0050A6B0) --------------------------------------------------------
void __thiscall NiTPointerList<MobCoordinate *>::~NiTPointerList<MobCoordinate *>(NiTPointerList<MobCoordinate *> *this)
{
  NiTPointerList<MobCoordinate *> *v1; // edi@1
  NiTListItem<MobCoordinate *> *v2; // esi@1
  NiTListItem<MobCoordinate *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>::`vftable';
}
// 98C04C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>::`vftable')(void *p, char);
// 98C05C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>::`vftable')(void *p, char);

//----- (0050A730) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *> *v2; // edi@1
  NiTListItem<MobCoordinate *> *v3; // esi@1
  NiTListItem<MobCoordinate *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98C04C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>::`vftable')(void *p, char);
// 98C05C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>::`vftable')(void *p, char);

//----- (0050A7C0) --------------------------------------------------------
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,float>::AddTail(NiTPointerListBase<NiTPointerAllocator<unsigned int>,float> *this, const float *element)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,float> *v2; // esi@1
  int v3; // eax@1
  double v4; // st7@1
  _DWORD *v5; // ecx@1

  v2 = this;
  v3 = ((int (*)(void))this->vfptr->NewItem)();
  v4 = *element;
  *(_DWORD *)v3 = 0;
  *(float *)(v3 + 8) = v4;
  *(_DWORD *)(v3 + 4) = v2->m_pkTail;
  v5 = &v2->m_pkTail->m_pkNext;
  if ( v5 )
  {
    *v5 = v3;
    ++v2->m_kAllocator.m_uiCount;
    v2->m_pkTail = (NiTListItem<float> *)v3;
  }
  else
  {
    ++v2->m_kAllocator.m_uiCount;
    v2->m_pkHead = (NiTListItem<float> *)v3;
    v2->m_pkTail = (NiTListItem<float> *)v3;
  }
}

//----- (0050A810) --------------------------------------------------------
void __thiscall PgTList<NpcMarkWin *>::~PgTList<NpcMarkWin *>(PgTList<NpcMarkWin *> *this)
{
  PgTList<NpcMarkWin *> *v1; // edi@1
  NiTListItem<NpcMarkWin *> *v2; // esi@1
  NiTListItem<NpcMarkWin *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>Vtbl *)&PgTList<NpcMarkWin *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`vftable';
}
// 98BF9C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`vftable')(void *p, char);
// 98C0E4: using guessed type int (__thiscall *PgTList<NpcMarkWin *>::`vftable')(void *p, char);

//----- (0050A890) --------------------------------------------------------
void __thiscall NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>::~NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>(NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *> *this)
{
  NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *> *v1; // esi@1

  v1 = this;
  this->vfptr = (NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>Vtbl *)&NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v1->m_ppkHashTable);
}
// 98BFDC: using guessed type int (__thiscall *NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>::`vftable')(void *p, char);

//----- (0050A8B0) --------------------------------------------------------
void __thiscall NiTMap<unsigned int,MapMarkWin *>::~NiTMap<unsigned int,MapMarkWin *>(NiTMap<unsigned int,MapMarkWin *> *this)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v1; // esi@1

  v1 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>Vtbl *)&NiTMap<unsigned int,MapMarkWin *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v1->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v1);
  operator delete[](v1->m_ppkHashTable);
}
// 98BFDC: using guessed type int (__thiscall *NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>::`vftable')(void *p, char);
// 98C0F4: using guessed type int (__thiscall *NiTMap<unsigned int,MapMarkWin *>::`vftable')(void *p, char);

//----- (0050A920) --------------------------------------------------------
void __thiscall NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::~NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>(NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *this)
{
  NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *v1; // esi@1

  v1 = this;
  this->vfptr = (NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>Vtbl *)&NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v1->m_ppkHashTable);
}
// 98BFFC: using guessed type int (__thiscall *NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::`vftable')(void *p, char);

//----- (0050A940) --------------------------------------------------------
void __thiscall NiTMap<unsigned short,KQTeamMarkWin *>::~NiTMap<unsigned short,KQTeamMarkWin *>(NiTMap<unsigned short,KQTeamMarkWin *> *this)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v1; // esi@1

  v1 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>Vtbl *)&NiTMap<unsigned short,KQTeamMarkWin *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v1->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v1);
  operator delete[](v1->m_ppkHashTable);
}
// 98BFFC: using guessed type int (__thiscall *NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::`vftable')(void *p, char);
// 98C114: using guessed type int (__thiscall *NiTMap<unsigned short,KQTeamMarkWin *>::`vftable')(void *p, char);

//----- (0050A9B0) --------------------------------------------------------
void __thiscall PgTList<MobCoordinate *>::~PgTList<MobCoordinate *>(PgTList<MobCoordinate *> *this)
{
  PgTList<MobCoordinate *> *v1; // edi@1
  NiTListItem<MobCoordinate *> *v2; // esi@1
  NiTListItem<MobCoordinate *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>Vtbl *)&PgTList<MobCoordinate *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>::`vftable';
}
// 98C04C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>::`vftable')(void *p, char);
// 98C134: using guessed type int (__thiscall *PgTList<MobCoordinate *>::`vftable')(void *p, char);

//----- (0050AA30) --------------------------------------------------------
void __thiscall PgTList<float>::~PgTList<float>(PgTList<float> *this)
{
  PgTList<float> *v1; // edi@1
  NiTListItem<float> *v2; // esi@1
  NiTListItem<float> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,float>Vtbl *)&PgTList<float>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,float> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,float>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,float>::`vftable';
}
// 98BF7C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,float>::`vftable')(void *p, char);
// 98C144: using guessed type int (__thiscall *PgTList<float>::`vftable')(void *p, char);

//----- (0050AAB0) --------------------------------------------------------
NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *> *__thiscall NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>::`scalar deleting destructor'(NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *> *this, unsigned int a2)
{
  NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>Vtbl *)&NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98BFDC: using guessed type int (__thiscall *NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>::`vftable')(void *p, char);

//----- (0050AAF0) --------------------------------------------------------
NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *__thiscall NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::`vector deleting destructor'(NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *this, unsigned int a2)
{
  NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>Vtbl *)&NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98BFFC: using guessed type int (__thiscall *NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::`vftable')(void *p, char);

//----- (0050AB30) --------------------------------------------------------
void __stdcall NiTPointerMap<unsigned int,float>::DeleteItem(NiTMapItem<unsigned int,float> *pkItem)
{
  bool v2; // zf@1

  pkItem->m_val = 0.0;
  EnterCriticalSection(&NiTAbstractPoolAllocator<unsigned int>::ms_kCriticalSection);
  dword_B62428 = GetCurrentThreadId();
  ++dword_B6242C;
  pkItem->m_key = 0;
  pkItem->m_pkNext = (NiTMapItem<unsigned int,float> *)NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem;
  v2 = dword_B6242C-- == 1;
  NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem = (int)pkItem;
  if ( v2 )
    dword_B62428 = 0;
  LeaveCriticalSection(&NiTAbstractPoolAllocator<unsigned int>::ms_kCriticalSection);
}
// B6240C: using guessed type int NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem;
// B62428: using guessed type int dword_B62428;
// B6242C: using guessed type int dword_B6242C;

//----- (0050AB90) --------------------------------------------------------
void __thiscall NiTPointerList<RaidMarkWin *>::~NiTPointerList<RaidMarkWin *>(NiTPointerList<RaidMarkWin *> *this)
{
  NiTPointerList<RaidMarkWin *> *v1; // edi@1
  NiTListItem<RaidMarkWin *> *v2; // esi@1
  NiTListItem<RaidMarkWin *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`vftable';
}
// 98BF8C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`vftable')(void *p, char);
// 98C07C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`vftable')(void *p, char);

//----- (0050AC10) --------------------------------------------------------
PgTList<NpcMarkWin *> *__thiscall PgTList<NpcMarkWin *>::`vector deleting destructor'(PgTList<NpcMarkWin *> *this, unsigned int a2)
{
  PgTList<NpcMarkWin *> *v2; // edi@1
  NiTListItem<NpcMarkWin *> *v3; // esi@1
  NiTListItem<NpcMarkWin *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>Vtbl *)&PgTList<NpcMarkWin *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98BF9C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`vftable')(void *p, char);
// 98C0E4: using guessed type int (__thiscall *PgTList<NpcMarkWin *>::`vftable')(void *p, char);

//----- (0050ACA0) --------------------------------------------------------
void __thiscall NiTPointerList<PartyMarkWin *>::~NiTPointerList<PartyMarkWin *>(NiTPointerList<PartyMarkWin *> *this)
{
  NiTPointerList<PartyMarkWin *> *v1; // edi@1
  NiTListItem<PartyMarkWin *> *v2; // esi@1
  NiTListItem<PartyMarkWin *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`vftable';
}
// 98BFBC: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`vftable')(void *p, char);
// 98C08C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`vftable')(void *p, char);

//----- (0050AD20) --------------------------------------------------------
void __thiscall NiTPointerList<QuestHelperMarkWin *>::~NiTPointerList<QuestHelperMarkWin *>(NiTPointerList<QuestHelperMarkWin *> *this)
{
  NiTPointerList<QuestHelperMarkWin *> *v1; // edi@1
  NiTListItem<QuestHelperMarkWin *> *v2; // esi@1
  NiTListItem<QuestHelperMarkWin *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::`vftable';
}
// 98C01C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::`vftable')(void *p, char);
// 98C09C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::`vftable')(void *p, char);

//----- (0050ADA0) --------------------------------------------------------
void __thiscall NiTPointerList<PgWinSpr *>::~NiTPointerList<PgWinSpr *>(NiTPointerList<PgWinSpr *> *this)
{
  NiTPointerList<PgWinSpr *> *v1; // edi@1
  NiTListItem<PgWinSpr *> *v2; // esi@1
  NiTListItem<PgWinSpr *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`vftable';
}
// 98C02C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`vftable')(void *p, char);
// 98C0AC: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`vftable')(void *p, char);

//----- (0050AE20) --------------------------------------------------------
void __thiscall NiTPointerList<MobAreaMarkWin *>::~NiTPointerList<MobAreaMarkWin *>(NiTPointerList<MobAreaMarkWin *> *this)
{
  NiTPointerList<MobAreaMarkWin *> *v1; // edi@1
  NiTListItem<MobAreaMarkWin *> *v2; // esi@1
  NiTListItem<MobAreaMarkWin *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::`vftable';
}
// 98C03C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::`vftable')(void *p, char);
// 98C0BC: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::`vftable')(void *p, char);

//----- (0050AEA0) --------------------------------------------------------
void __thiscall NiTPointerList<GTIScanMarkWin *>::~NiTPointerList<GTIScanMarkWin *>(NiTPointerList<GTIScanMarkWin *> *this)
{
  NiTPointerList<GTIScanMarkWin *> *v1; // edi@1
  NiTListItem<GTIScanMarkWin *> *v2; // esi@1
  NiTListItem<GTIScanMarkWin *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`vftable';
}
// 98BFCC: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`vftable')(void *p, char);
// 98C0CC: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`vftable')(void *p, char);

//----- (0050AF20) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *> *v2; // edi@1
  NiTListItem<RaidMarkWin *> *v3; // esi@1
  NiTListItem<RaidMarkWin *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98BF8C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`vftable')(void *p, char);
// 98C07C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`vftable')(void *p, char);

//----- (0050AFB0) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *> *v2; // edi@1
  NiTListItem<PartyMarkWin *> *v3; // esi@1
  NiTListItem<PartyMarkWin *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98BFBC: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`vftable')(void *p, char);
// 98C08C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`vftable')(void *p, char);

//----- (0050B040) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *> *v2; // edi@1
  NiTListItem<QuestHelperMarkWin *> *v3; // esi@1
  NiTListItem<QuestHelperMarkWin *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98C01C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::`vftable')(void *p, char);
// 98C09C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::`vftable')(void *p, char);

//----- (0050B0D0) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *> *v2; // edi@1
  NiTListItem<PgWinSpr *> *v3; // esi@1
  NiTListItem<PgWinSpr *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98C02C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`vftable')(void *p, char);
// 98C0AC: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`vftable')(void *p, char);

//----- (0050B160) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *> *v2; // edi@1
  NiTListItem<MobAreaMarkWin *> *v3; // esi@1
  NiTListItem<MobAreaMarkWin *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98C03C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::`vftable')(void *p, char);
// 98C0BC: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::`vftable')(void *p, char);

//----- (0050B1F0) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *> *v2; // edi@1
  NiTListItem<GTIScanMarkWin *> *v3; // esi@1
  NiTListItem<GTIScanMarkWin *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98BFCC: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`vftable')(void *p, char);
// 98C0CC: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`vftable')(void *p, char);

//----- (0050B280) --------------------------------------------------------
PgTList<MobCoordinate *> *__thiscall PgTList<MobCoordinate *>::`scalar deleting destructor'(PgTList<MobCoordinate *> *this, unsigned int a2)
{
  PgTList<MobCoordinate *> *v2; // edi@1
  NiTListItem<MobCoordinate *> *v3; // esi@1
  NiTListItem<MobCoordinate *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>Vtbl *)&PgTList<MobCoordinate *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98C04C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MobCoordinate *>::`vftable')(void *p, char);
// 98C134: using guessed type int (__thiscall *PgTList<MobCoordinate *>::`vftable')(void *p, char);

//----- (0050B310) --------------------------------------------------------
PgTList<float> *__thiscall PgTList<float>::`vector deleting destructor'(PgTList<float> *this, unsigned int a2)
{
  PgTList<float> *v2; // edi@1
  NiTListItem<float> *v3; // esi@1
  NiTListItem<float> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,float>Vtbl *)&PgTList<float>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,float> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,float>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,float>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98BF7C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,float>::`vftable')(void *p, char);
// 98C144: using guessed type int (__thiscall *PgTList<float>::`vftable')(void *p, char);

//----- (0050B3A0) --------------------------------------------------------
NiTPointerList<float> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,float>::`vector deleting destructor'(NiTPointerList<float> *this, unsigned int a2)
{
  NiTPointerList<float> *v2; // edi@1
  NiTListItem<float> *v3; // esi@1
  NiTListItem<float> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,float>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,float>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,float> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,float>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,float>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98BF7C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,float>::`vftable')(void *p, char);
// 98C06C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,float>::`vftable')(void *p, char);

//----- (0050B430) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<unsigned int,MapMarkWin *>::`vector deleting destructor'(NiTMap<unsigned int,MapMarkWin *> *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // esi@1

  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>Vtbl *)&NiTMap<unsigned int,MapMarkWin *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v2);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98BFDC: using guessed type int (__thiscall *NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>::`vftable')(void *p, char);
// 98C0F4: using guessed type int (__thiscall *NiTMap<unsigned int,MapMarkWin *>::`vftable')(void *p, char);

//----- (0050B4B0) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<unsigned short,KQTeamMarkWin *>::`scalar deleting destructor'(NiTMap<unsigned short,KQTeamMarkWin *> *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // esi@1

  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>Vtbl *)&NiTMap<unsigned short,KQTeamMarkWin *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v2);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98BFFC: using guessed type int (__thiscall *NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::`vftable')(void *p, char);
// 98C114: using guessed type int (__thiscall *NiTMap<unsigned short,KQTeamMarkWin *>::`vftable')(void *p, char);

//----- (0050B530) --------------------------------------------------------
void __thiscall PgTList<RaidMarkWin *>::~PgTList<RaidMarkWin *>(PgTList<RaidMarkWin *> *this)
{
  PgTList<RaidMarkWin *> *v1; // edi@1
  NiTListItem<RaidMarkWin *> *v2; // esi@1
  NiTListItem<RaidMarkWin *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>Vtbl *)&PgTList<RaidMarkWin *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`vftable';
}
// 98BF8C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`vftable')(void *p, char);
// 98C164: using guessed type int (__thiscall *PgTList<RaidMarkWin *>::`vftable')(void *p, char);

//----- (0050B5B0) --------------------------------------------------------
void __thiscall PgTList<PartyMarkWin *>::~PgTList<PartyMarkWin *>(PgTList<PartyMarkWin *> *this)
{
  PgTList<PartyMarkWin *> *v1; // edi@1
  NiTListItem<PartyMarkWin *> *v2; // esi@1
  NiTListItem<PartyMarkWin *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>Vtbl *)&PgTList<PartyMarkWin *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`vftable';
}
// 98BFBC: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`vftable')(void *p, char);
// 98C174: using guessed type int (__thiscall *PgTList<PartyMarkWin *>::`vftable')(void *p, char);

//----- (0050B630) --------------------------------------------------------
void __thiscall PgTList<GTIScanMarkWin *>::~PgTList<GTIScanMarkWin *>(PgTList<GTIScanMarkWin *> *this)
{
  PgTList<GTIScanMarkWin *> *v1; // edi@1
  NiTListItem<GTIScanMarkWin *> *v2; // esi@1
  NiTListItem<GTIScanMarkWin *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>Vtbl *)&PgTList<GTIScanMarkWin *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`vftable';
}
// 98BFCC: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`vftable')(void *p, char);
// 98C184: using guessed type int (__thiscall *PgTList<GTIScanMarkWin *>::`vftable')(void *p, char);

//----- (0050B6B0) --------------------------------------------------------
void __thiscall PgTList<QuestHelperMarkWin *>::~PgTList<QuestHelperMarkWin *>(PgTList<QuestHelperMarkWin *> *this)
{
  PgTList<QuestHelperMarkWin *> *v1; // edi@1
  NiTListItem<QuestHelperMarkWin *> *v2; // esi@1
  NiTListItem<QuestHelperMarkWin *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>Vtbl *)&PgTList<QuestHelperMarkWin *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::`vftable';
}
// 98C01C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::`vftable')(void *p, char);
// 98C194: using guessed type int (__thiscall *PgTList<QuestHelperMarkWin *>::`vftable')(void *p, char);

//----- (0050B730) --------------------------------------------------------
void __thiscall PgTList<PgWinSpr *>::~PgTList<PgWinSpr *>(PgTList<PgWinSpr *> *this)
{
  PgTList<PgWinSpr *> *v1; // edi@1
  NiTListItem<PgWinSpr *> *v2; // esi@1
  NiTListItem<PgWinSpr *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>Vtbl *)&PgTList<PgWinSpr *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`vftable';
}
// 98C02C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`vftable')(void *p, char);
// 98C1A4: using guessed type int (__thiscall *PgTList<PgWinSpr *>::`vftable')(void *p, char);

//----- (0050B7B0) --------------------------------------------------------
void __thiscall PgTList<MobAreaMarkWin *>::~PgTList<MobAreaMarkWin *>(PgTList<MobAreaMarkWin *> *this)
{
  PgTList<MobAreaMarkWin *> *v1; // edi@1
  NiTListItem<MobAreaMarkWin *> *v2; // esi@1
  NiTListItem<MobAreaMarkWin *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>Vtbl *)&PgTList<MobAreaMarkWin *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::`vftable';
}
// 98C03C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::`vftable')(void *p, char);
// 98C1B4: using guessed type int (__thiscall *PgTList<MobAreaMarkWin *>::`vftable')(void *p, char);

//----- (0050B830) --------------------------------------------------------
PgTList<RaidMarkWin *> *__thiscall PgTList<RaidMarkWin *>::`scalar deleting destructor'(PgTList<RaidMarkWin *> *this, unsigned int a2)
{
  PgTList<RaidMarkWin *> *v2; // edi@1
  NiTListItem<RaidMarkWin *> *v3; // esi@1
  NiTListItem<RaidMarkWin *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>Vtbl *)&PgTList<RaidMarkWin *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98BF8C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`vftable')(void *p, char);
// 98C164: using guessed type int (__thiscall *PgTList<RaidMarkWin *>::`vftable')(void *p, char);

//----- (0050B8C0) --------------------------------------------------------
PgTList<PartyMarkWin *> *__thiscall PgTList<PartyMarkWin *>::`vector deleting destructor'(PgTList<PartyMarkWin *> *this, unsigned int a2)
{
  PgTList<PartyMarkWin *> *v2; // edi@1
  NiTListItem<PartyMarkWin *> *v3; // esi@1
  NiTListItem<PartyMarkWin *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>Vtbl *)&PgTList<PartyMarkWin *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98BFBC: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`vftable')(void *p, char);
// 98C174: using guessed type int (__thiscall *PgTList<PartyMarkWin *>::`vftable')(void *p, char);

//----- (0050B950) --------------------------------------------------------
PgTList<QuestHelperMarkWin *> *__thiscall PgTList<QuestHelperMarkWin *>::`scalar deleting destructor'(PgTList<QuestHelperMarkWin *> *this, unsigned int a2)
{
  PgTList<QuestHelperMarkWin *> *v2; // edi@1
  NiTListItem<QuestHelperMarkWin *> *v3; // esi@1
  NiTListItem<QuestHelperMarkWin *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>Vtbl *)&PgTList<QuestHelperMarkWin *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98C01C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMarkWin *>::`vftable')(void *p, char);
// 98C194: using guessed type int (__thiscall *PgTList<QuestHelperMarkWin *>::`vftable')(void *p, char);

//----- (0050B9E0) --------------------------------------------------------
PgTList<PgWinSpr *> *__thiscall PgTList<PgWinSpr *>::`vector deleting destructor'(PgTList<PgWinSpr *> *this, unsigned int a2)
{
  PgTList<PgWinSpr *> *v2; // edi@1
  NiTListItem<PgWinSpr *> *v3; // esi@1
  NiTListItem<PgWinSpr *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>Vtbl *)&PgTList<PgWinSpr *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98C02C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`vftable')(void *p, char);
// 98C1A4: using guessed type int (__thiscall *PgTList<PgWinSpr *>::`vftable')(void *p, char);

//----- (0050BA70) --------------------------------------------------------
PgTList<MobAreaMarkWin *> *__thiscall PgTList<MobAreaMarkWin *>::`scalar deleting destructor'(PgTList<MobAreaMarkWin *> *this, unsigned int a2)
{
  PgTList<MobAreaMarkWin *> *v2; // edi@1
  NiTListItem<MobAreaMarkWin *> *v3; // esi@1
  NiTListItem<MobAreaMarkWin *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>Vtbl *)&PgTList<MobAreaMarkWin *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98C03C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MobAreaMarkWin *>::`vftable')(void *p, char);
// 98C1B4: using guessed type int (__thiscall *PgTList<MobAreaMarkWin *>::`vftable')(void *p, char);

//----- (0050BB00) --------------------------------------------------------
PgTList<GTIScanMarkWin *> *__thiscall PgTList<GTIScanMarkWin *>::`scalar deleting destructor'(PgTList<GTIScanMarkWin *> *this, unsigned int a2)
{
  PgTList<GTIScanMarkWin *> *v2; // edi@1
  NiTListItem<GTIScanMarkWin *> *v3; // esi@1
  NiTListItem<GTIScanMarkWin *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>Vtbl *)&PgTList<GTIScanMarkWin *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98BFCC: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`vftable')(void *p, char);
// 98C184: using guessed type int (__thiscall *PgTList<GTIScanMarkWin *>::`vftable')(void *p, char);

//----- (0050BB90) --------------------------------------------------------
FullMapWin *__thiscall FullMapWin::`vector deleting destructor'(FullMapWin *this, unsigned int a2)
{
  FullMapWin *v2; // esi@1

  v2 = this;
  FullMapWin::~FullMapWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0050BBE0) --------------------------------------------------------
void __thiscall GateChannelWin::Link(GateChannelWin *this, GateChannelWin::BtnMsg BtnIndex)
{
  GateChannelWin *v2; // esi@1
  PgFrameWork *v3; // ecx@1
  char *v4; // esi@4
  int v5; // edx@6
  _BYTE v6[12]; // ST00_12@9

  v2 = this;
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
  v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( BtnIndex == PGWM_MH_UI_MOVE_1 )
  {
    if ( !v3 )
      return;
    v5 = (int)v2->m_LinkData.LinkMapName;
    goto LABEL_9;
  }
  if ( BtnIndex == 1 )
  {
    if ( !v3 )
      return;
    v5 = (int)&v2->m_LinkData.LinkMapName[1];
LABEL_9:
    *(_DWORD *)v6 = *(_DWORD *)v5;
    *(_QWORD *)&v6[4] = *(_QWORD *)(v5 + 4);
    GameFrameWork::SendMapMultyLink(*(Name3 *)v6);
    return;
  }
  if ( BtnIndex == 2 )
  {
    v4 = (char *)&v2->m_LinkData;
    memset(v4, 0, 0x49u);
    *(_WORD *)v4 = -1;
  }
}

//----- (0050BC70) --------------------------------------------------------
void __thiscall GateChannelWin::~GateChannelWin(GateChannelWin *this)
{
  GateChannelWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&GateChannelWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GateChannelWin::`vftable'{for `IDirectMessenger'};
  `eh vector destructor iterator'(
    this->m_LinkData.LinkMapName,
    0xCu,
    5,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 98C4F4: using guessed type void (__thiscall *GateChannelWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98C514: using guessed type int (__thiscall *GateChannelWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0050BCF0) --------------------------------------------------------
void __thiscall GateChannelWin::OnCommand(GateChannelWin *this, unsigned int wParam, int lParam)
{
  GateChannelWin *v3; // esi@1
  char *v4; // esi@4
  int v5; // edx@6
  _BYTE v6[12]; // ST00_12@9

  v3 = this;
  if ( !wParam )
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
    if ( !PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
      return;
    v5 = (int)v3->m_LinkData.LinkMapName;
    goto LABEL_9;
  }
  if ( wParam == 1 )
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
    if ( !PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
      return;
    v5 = (int)&v3->m_LinkData.LinkMapName[1];
LABEL_9:
    *(_DWORD *)v6 = *(_DWORD *)v5;
    *(_QWORD *)&v6[4] = *(_QWORD *)(v5 + 4);
    GameFrameWork::SendMapMultyLink(*(Name3 *)v6);
    return;
  }
  if ( wParam == 2 )
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
    PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v4 = (char *)&v3->m_LinkData;
    memset(v4, 0, 0x49u);
    *(_WORD *)v4 = -1;
  }
}

//----- (0050BDC0) --------------------------------------------------------
void __thiscall GateChannelWin::GateChannelWin(GateChannelWin *this)
{
  GateChannelWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GateChannelWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GateChannelWin::`vftable'{for `IDirectMessenger'};
  `eh vector constructor iterator'(
    v1->m_LinkData.LinkMapName,
    0xCu,
    5,
    (void (__thiscall *)(void *))Name3::Name3,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
}
// 98C4F4: using guessed type void (__thiscall *GateChannelWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98C514: using guessed type int (__thiscall *GateChannelWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0050BE40) --------------------------------------------------------
char __thiscall GateChannelWin::Create(GateChannelWin *this, PgFrameWork *pkFrameWork)
{
  GateChannelWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiNode *v5; // eax@3
  NiNode *v6; // esi@7
  LONG v7; // eax@7
  PgSprData *v9; // eax@15
  NiNode *v10; // esi@16
  int v11; // edi@20
  int v12; // ebx@20
  NiSourceTexture *v13; // eax@20
  PgSprData *v14; // eax@21
  PgSprData::PgHitTester *v15; // eax@23
  unsigned int uiWidth; // ST48_4@23
  PgFont *v17; // eax@23
  PgWinText *v18; // eax@23
  NiUnsharedGeometryGroup *v19; // eax@23
  NiPointer<PgSprData::PgHitTester> *v20; // ecx@23
  unsigned int v21; // ST48_4@23
  PgFont *v22; // eax@23
  PgWinText *v23; // eax@23
  NiUnsharedGeometryGroup *v24; // eax@23
  NiPointer<PgSprData::PgHitTester> *v25; // ecx@23
  unsigned int v26; // ST48_4@23
  PgFont *v27; // eax@23
  PgWinText *v28; // eax@23
  NiUnsharedGeometryGroup *v29; // eax@23
  NiPointer<PgSprData::PgHitTester> *v30; // ecx@23
  unsigned int v31; // ST48_4@23
  PgFont *v32; // eax@23
  PgWinText *v33; // eax@23
  NiRefObjectVtbl *v34; // edi@23
  NiUnsharedGeometryGroup *v35; // eax@23
  NiNode *v36; // eax@23
  NiNode *v37; // esi@24
  NiSourceTexture *pkTexture; // [sp+4Ch] [bp-1Ch]@12
  int uiLeft; // [sp+50h] [bp-18h]@15
  int uiTop; // [sp+54h] [bp-14h]@15
  NiPointer<NiNode> spNode; // [sp+58h] [bp-10h]@1
  int v42; // [sp+64h] [bp-4h]@1
  PgSprData *pkSprData; // [sp+70h] [bp+8h]@23
  PgSprData *pkSprDataa; // [sp+70h] [bp+8h]@23
  PgSprData *pkSprDatab; // [sp+70h] [bp+8h]@23
  PgSprData *pkSprDatac; // [sp+70h] [bp+8h]@23
  PgSprData *pkSprDatad; // [sp+70h] [bp+8h]@23
  PgSprData *pkSprDatae; // [sp+70h] [bp+8h]@23
  PgSprData *pkSprDataf; // [sp+70h] [bp+8h]@23
  PgSprData *pkSprDatag; // [sp+70h] [bp+8h]@23
  PgSprData *pkSprDatah; // [sp+70h] [bp+8h]@23
  PgSprData *pkSprDatai; // [sp+70h] [bp+8h]@23

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v42 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\GateChannel.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = spNode.m_pObject;
  if ( !spNode.m_pObject )
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("Game\\GateChannel.nif load fail", "LoadFail", 0);
      v5 = spNode.m_pObject;
    }
    v42 = -1;
    if ( !v5 )
      return 0;
    v6 = v5;
    v7 = InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount);
    goto LABEL_8;
  }
  pkTexture = MenuTexMgr::GetTexture(4u);
  if ( !pkTexture )
  {
    v6 = spNode.m_pObject;
    v42 = -1;
    if ( !spNode.m_pObject )
      return 0;
    v7 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
LABEL_8:
    if ( !v7 )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "GateChannelWin", 0) )
  {
    v10 = spNode.m_pObject;
    v42 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v10 )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    return 0;
  }
  v11 = uiLeft;
  v12 = uiTop;
  v13 = MenuTexMgr::GetTexture(0x13u);
  if ( v13 )
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v13);
  else
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v11, uiTop - v12, v14, (PgWin *)&v2->vfptr, 0, 0);
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Textbox", &uiLeft, &uiTop, pkTexture)->m_akHitTester.m_pBase->m_pObject;
  pkSprData = (PgSprData *)v15->m_uiHeight;
  uiWidth = v15->m_uiWidth;
  v17 = Font::Get(0);
  v18 = PgWinText::CreateWin(
          uiLeft - v11,
          uiTop - v12,
          uiWidth,
          (unsigned int)pkSprData,
          v17,
          (PgWin *)&v2->vfptr,
          0,
          0);
  v2->m_TextWin[0] = v18;
  v18->vfptr[122].__vecDelDtor((NiRefObject *)v18, 5u);
  pkSprDataa = (PgSprData *)v2->m_TextWin[0]->vfptr;
  v19 = TextData::Get(0x97A4A8DF);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkSprDataa[5].m_akHitTester.m_uiGrowBy)(
    v2->m_TextWin[0],
    v19);
  ((void (__stdcall *)(_DWORD))v2->m_TextWin[0]->vfptr[60].__vecDelDtor)(0);
  pkSprDatab = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Nor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(pkSprDatab, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
  PgSprData::Add(pkSprDatab, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
  PgWinBut::CreateWin(uiLeft - v11, uiTop - v12, pkSprDatab, (PgWin *)&v2->vfptr, 0, 0, 0);
  v20 = pkSprDatab->m_akHitTester.m_pBase;
  pkSprDatac = (PgSprData *)v20->m_pObject->m_uiHeight;
  v21 = v20->m_pObject->m_uiWidth;
  v22 = Font::Get(0);
  v23 = PgWinText::CreateWin(uiLeft - v11, uiTop - v12, v21, (unsigned int)pkSprDatac, v22, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_TextWin[1] = v23;
  v23->vfptr[122].__vecDelDtor((NiRefObject *)v23, 5u);
  pkSprDatad = (PgSprData *)v2->m_TextWin[1]->vfptr;
  v24 = TextData::Get(0x97A4A8DF);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkSprDatad[5].m_akHitTester.m_uiGrowBy)(
    v2->m_TextWin[1],
    v24);
  ((void (__stdcall *)(_DWORD))v2->m_TextWin[1]->vfptr[60].__vecDelDtor)(0);
  pkSprDatae = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Nor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(pkSprDatae, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Click");
  PgSprData::Add(pkSprDatae, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Over");
  PgWinBut::CreateWin(uiLeft - v11, uiTop - v12, pkSprDatae, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v25 = pkSprDatae->m_akHitTester.m_pBase;
  pkSprDataf = (PgSprData *)v25->m_pObject->m_uiHeight;
  v26 = v25->m_pObject->m_uiWidth;
  v27 = Font::Get(0);
  v28 = PgWinText::CreateWin(uiLeft - v11, uiTop - v12, v26, (unsigned int)pkSprDataf, v27, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_TextWin[2] = v28;
  v28->vfptr[122].__vecDelDtor((NiRefObject *)v28, 5u);
  pkSprDatag = (PgSprData *)v2->m_TextWin[2]->vfptr;
  v29 = TextData::Get(0x97A4A8DF);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkSprDatag[5].m_akHitTester.m_uiGrowBy)(
    v2->m_TextWin[2],
    v29);
  ((void (__stdcall *)(_DWORD))v2->m_TextWin[2]->vfptr[60].__vecDelDtor)(0);
  pkSprDatah = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Nor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(pkSprDatah, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Click");
  PgSprData::Add(pkSprDatah, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Over");
  PgWinBut::CreateWin(uiLeft - v11, uiTop - v12, pkSprDatah, (PgWin *)&v2->vfptr, 2u, 0, 0);
  v30 = pkSprDatah->m_akHitTester.m_pBase;
  pkSprDatai = (PgSprData *)v30->m_pObject->m_uiHeight;
  v31 = v30->m_pObject->m_uiWidth;
  v32 = Font::Get(0);
  v33 = PgWinText::CreateWin(uiLeft - v11, uiTop - v12, v31, (unsigned int)pkSprDatai, v32, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_TextWin[3] = v33;
  v33->vfptr[122].__vecDelDtor((NiRefObject *)v33, 5u);
  v34 = v2->m_TextWin[3]->vfptr;
  v35 = TextData::Get(0x97A4A8DF);
  v34[118].__vecDelDtor((NiRefObject *)v2->m_TextWin[3], (unsigned int)v35);
  ((void (__stdcall *)(_DWORD))v2->m_TextWin[3]->vfptr[60].__vecDelDtor)(0);
  ((void (__thiscall *)(GateChannelWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.2);
  v36 = spNode.m_pObject;
  v2->m_LinkData.npcHandle = -1;
  v42 = -1;
  if ( v36 )
  {
    v37 = v36;
    if ( !InterlockedDecrement((volatile LONG *)&v36->m_uiRefCount) )
    {
      if ( v37 )
        v37->vfptr->__vecDelDtor((NiRefObject *)v37, 1u);
    }
  }
  return 1;
}
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0050C3E0) --------------------------------------------------------
void __thiscall GateChannelWin::UpdateMeWin(GateChannelWin *this, float fCurTime)
{
  GateChannelWin *v2; // edi@1
  char *v3; // esi@1
  float v4; // ST14_4@2
  float v5; // ST18_4@2
  double v6; // st7@2
  double v7; // st5@2
  MapNavigator *v8; // ebx@6
  NiPoint3 UserPos; // [sp+14h] [bp-1Ch]@2
  float v10; // [sp+20h] [bp-10h]@2
  float v11; // [sp+24h] [bp-Ch]@2
  MapNavigator *pkNavi; // [sp+28h] [bp-8h]@2
  NiPointer<MapNavigator> result; // [sp+2Ch] [bp-4h]@2

  v2 = this;
  v3 = (char *)&this->m_LinkData;
  if ( this->m_LinkData.npcHandle != -1 )
  {
    v4 = (double)this->m_LinkData.npcPosition.x;
    v5 = (double)this->m_LinkData.npcPosition.y;
    ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[6].SetAbStateProperty)(&UserPos);
    v10 = UserPos.x - v4;
    UserPos.x = v10;
    result.m_pObject = (MapNavigator *)v2->m_LinkData.limitRange;
    v11 = UserPos.y - v5;
    UserPos.y = v11;
    *(float *)&pkNavi = 0.0 - 0.0;
    v6 = v11;
    LODWORD(UserPos.z) = pkNavi;
    v7 = *(float *)&pkNavi;
    *(double *)&v11 = (double)(signed int)result.m_pObject;
    *(float *)&result.m_pObject = v6 * v6 + v10 * v10 + v7 * v7;
    *(float *)&result.m_pObject = sqrt(*(float *)&result.m_pObject);
    if ( *(float *)&result.m_pObject > *(double *)&v11 )
    {
      memset(v3, 0, 0x49u);
      *(_WORD *)v3 = -1;
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
    }
  }
  if ( (unsigned __int8)((int (__thiscall *)(GateChannelWin *))v2->vfptr[65].__vecDelDtor)(v2) )
  {
    pkNavi = MapNavigator::GetMapNavigator(&result)->m_pObject;
    if ( *(float *)&result.m_pObject != 0.0 )
    {
      v8 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v8 )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      }
    }
    if ( *(float *)&pkNavi != 0.0 && pkNavi->m_eDotState == 2 )
    {
      memset(v3, 0, 0x49u);
      *(_WORD *)v3 = -1;
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
    }
  }
}

//----- (0050C550) --------------------------------------------------------
void __thiscall GateChannelWin::OpenWindow(GateChannelWin *this, PROTO_NC_MAP_MULTY_LINK_CMD *pkProto)
{
  GateChannelWin *v2; // esi@1
  signed int v3; // edi@1
  MapInfo *v4; // eax@3
  MapInfo *v5; // ebx@3
  NiRefObjectVtbl *v6; // edi@5
  int v7; // ST04_4@5
  char *v8; // eax@5
  char *v9; // eax@5
  int i; // [sp+8h] [bp-8h]@1
  int BtnIndex; // [sp+Ch] [bp-4h]@1
  PROTO_NC_MAP_MULTY_LINK_CMD *pkProtoa; // [sp+18h] [bp+8h]@2

  v2 = this;
  PROTO_NC_MAP_MULTY_LINK_CMD::operator=(&this->m_LinkData, pkProto);
  v3 = 0;
  BtnIndex = 1;
  i = 0;
  if ( v2->m_LinkData.num )
  {
    pkProtoa = (PROTO_NC_MAP_MULTY_LINK_CMD *)&v2->m_TextWin[1];
    do
    {
      v4 = MapInfoTab::GetByMapName(&v2->m_LinkData.LinkMapName[v3]);
      v5 = v4;
      if ( !v4 )
        break;
      if ( !v3 )
      {
        v6 = v2->m_TextWin[0]->vfptr;
        v7 = (int)v4->Name;
        v8 = (char *)TextData2::Get(0x2F51786Bu);
        v9 = fs(v8, v7);
        v6[118].__vecDelDtor((NiRefObject *)v2->m_TextWin[0], (unsigned int)v9);
        v3 = i;
      }
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)&pkProtoa->npcHandle + 472))(v5->Name);
      pkProtoa = (PROTO_NC_MAP_MULTY_LINK_CMD *)((char *)pkProtoa + 4);
      if ( ++BtnIndex > 2 )
        break;
      i = ++v3;
    }
    while ( v3 < v2->m_LinkData.num );
  }
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
}

//----- (0050C630) --------------------------------------------------------
GateChannelWin *__cdecl GateChannelWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  GateChannelWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1B4u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    LOBYTE(v6) = 1;
    v2->vfptr = (NiRefObjectVtbl *)&GateChannelWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&GateChannelWin::`vftable'{for `IDirectMessenger'};
    `eh vector constructor iterator'(
      (char *)&v2[1].m_kLocal.m_Rotate.m_pEntry[2][2] + 1,
      0xCu,
      5,
      (void (__thiscall *)(void *))Name3::Name3,
      (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (GateChannelWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 98C4F4: using guessed type void (__thiscall *GateChannelWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98C514: using guessed type int (__thiscall *GateChannelWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0050C790) --------------------------------------------------------
PROTO_NC_MAP_MULTY_LINK_CMD *__thiscall PROTO_NC_MAP_MULTY_LINK_CMD::operator=(PROTO_NC_MAP_MULTY_LINK_CMD *this, PROTO_NC_MAP_MULTY_LINK_CMD *__that)
{
  PROTO_NC_MAP_MULTY_LINK_CMD *result; // eax@1

  result = this;
  this->npcHandle = __that->npcHandle;
  this->npcPosition.x = __that->npcPosition.x;
  this->npcPosition.y = __that->npcPosition.y;
  this->limitRange = __that->limitRange;
  this->num = __that->num;
  *(_QWORD *)&this->LinkMapName[0].n3_name[0] = *(_QWORD *)&__that->LinkMapName[0].n3_name[0];
  this->LinkMapName[0].n3_code[2] = __that->LinkMapName[0].n3_code[2];
  *(_QWORD *)&this->LinkMapName[1].n3_name[0] = *(_QWORD *)&__that->LinkMapName[1].n3_name[0];
  this->LinkMapName[1].n3_code[2] = __that->LinkMapName[1].n3_code[2];
  *(_QWORD *)&this->LinkMapName[2].n3_name[0] = *(_QWORD *)&__that->LinkMapName[2].n3_name[0];
  this->LinkMapName[2].n3_code[2] = __that->LinkMapName[2].n3_code[2];
  *(_QWORD *)&this->LinkMapName[3].n3_name[0] = *(_QWORD *)&__that->LinkMapName[3].n3_name[0];
  this->LinkMapName[3].n3_code[2] = __that->LinkMapName[3].n3_code[2];
  *(_QWORD *)&this->LinkMapName[4].n3_name[0] = *(_QWORD *)&__that->LinkMapName[4].n3_name[0];
  this->LinkMapName[4].n3_code[2] = __that->LinkMapName[4].n3_code[2];
  return result;
}

//----- (0050C820) --------------------------------------------------------
GateChannelWin *__thiscall GateChannelWin::`scalar deleting destructor'(GateChannelWin *this, unsigned int a2)
{
  GateChannelWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GateChannelWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GateChannelWin::`vftable'{for `IDirectMessenger'};
  `eh vector destructor iterator'(
    this->m_LinkData.LinkMapName,
    0xCu,
    5,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98C4F4: using guessed type void (__thiscall *GateChannelWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98C514: using guessed type int (__thiscall *GateChannelWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0050C8B0) --------------------------------------------------------
void __thiscall GatheringWin::GatheringWin(GatheringWin *this)
{
  GatheringWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GatheringWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GatheringWin::`vftable'{for `IDirectMessenger'};
  v1->m_fTimeWhenStarted = 3.4028235e38;
  v1->m_pkGatheringProgress = 0;
  v1->m_pkSuccessEffect = 0;
  v1->m_fGatheringTime = 0.0;
  v1->m_pkSuccessEffectNode = 0;
  v1->m_pkFailEffectNode = 0;
  v1->m_pkFailEffect = 0;
}
// 98C7B8: using guessed type void (__thiscall *GatheringWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98C7D4: using guessed type int (__thiscall *GatheringWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0050C900) --------------------------------------------------------
void __thiscall GatheringWin::Stop(GatheringWin *this)
{
  this->m_fGatheringTime = 0.0;
  this->m_fAlphaBlendValue = 1.0;
}

//----- (0050C920) --------------------------------------------------------
void __thiscall GatheringWin::GatheringFail(GatheringWin *this)
{
  this->m_fGatheringTime = 0.0;
  this->m_fAlphaBlendValue = 1.0;
}

//----- (0050C940) --------------------------------------------------------
void __thiscall GatheringWin::GatheringSuccess(GatheringWin *this)
{
  this->m_fGatheringTime = 0.0;
  this->m_fAlphaBlendValue = 1.0;
}

//----- (0050C960) --------------------------------------------------------
BOOL __thiscall GatheringWin::IsFinished(GatheringWin *this)
{
  return this->m_fGatheringTime <= 0.0;
}

//----- (0050C980) --------------------------------------------------------
void __thiscall GatheringWin::DirectMessage(GatheringWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  GatheringWin *v4; // esi@1
  double v5; // st7@3
  double v6; // st6@3
  bool v7; // zf@4
  signed int v8; // eax@4
  double v9; // st7@7
  float fProgress; // ST28_4@9
  signed int v11; // ebx@9
  int v12; // edx@9
  void *(__thiscall *v13)(NiTArray<NiPointer<NiAVObject> > *, unsigned int); // eax@9
  int v14; // eax@10
  int v15; // eax@12
  int v16; // ecx@13
  int v17; // eax@14
  NiTListItem<NiPointer<NiProperty> > *v18; // eax@18
  NiTListItem<NiPointer<NiProperty> > *v19; // ST1C_4@18
  unsigned int v20; // eax@24
  float v21; // ST1C_4@24
  int y; // [sp+2Ch] [bp-4h]@9

  v4 = this;
  if ( iMsgTag == 9 && this->m_kWorld.m_Rotate.m_pEntry[1][0] > 0.0 )
  {
    v5 = Timer::ms_fCurTime - this->m_kWorld.m_Rotate.m_pEntry[0][2];
    v6 = v5 / this->m_kWorld.m_Rotate.m_pEntry[1][2];
    iMsgTag = (signed int)v6;
    if ( (signed int)v6 >= SLODWORD(this->m_kWorld.m_fScale) )
    {
      v8 = (signed int)v6 & 0x80000001;
      v7 = v8 == 0;
      *(float *)&iMsgTag = v5 - (double)iMsgTag * this->m_kWorld.m_Rotate.m_pEntry[1][2];
      if ( v8 < 0 )
        v7 = (((_BYTE)v8 - 1) | 0xFFFFFFFE) == -1;
      if ( v7 )
        v9 = *(float *)&iMsgTag;
      else
        v9 = 1.0 - *(float *)&iMsgTag;
      fProgress = v9;
      *(float *)&iMsgTag = COERCE_FLOAT((*(int (**)(void))(*(_DWORD *)LODWORD(this->m_kWorld.m_Rotate.m_pEntry[2][0])
                                                         + 164))());
      v11 = (signed int)((double)iMsgTag + (double)SLODWORD(v4->m_kWorld.m_Translate.x) * fProgress);
      v12 = *((_DWORD *)pvBody + 1);
      v13 = v4[-1].m_kChildren.vfptr[56].__vecDelDtor;
      iMsgTag = *(int *)pvBody;
      y = v12;
      ((void (__thiscall *)(NiTArray<NiPointer<NiAVObject> > *, int *, int *))v13)(&v4[-1].m_kChildren, &iMsgTag, &y);
      if ( iMsgTag >= 0 )
      {
        v14 = ((int (__thiscall *)(NiTArray<NiPointer<NiAVObject> > *))v4[-1].m_kChildren.vfptr[36].__vecDelDtor)(&v4[-1].m_kChildren);
        if ( iMsgTag < v14 && y >= 0 )
        {
          v15 = ((int (__thiscall *)(NiTArray<NiPointer<NiAVObject> > *))v4[-1].m_kChildren.vfptr[37].__vecDelDtor)(&v4[-1].m_kChildren);
          if ( y < v15 )
          {
            v16 = LODWORD(v4->m_kWorld.m_Translate.y);
            if ( iMsgTag < v16 || (v17 = LODWORD(v4->m_kWorld.m_Translate.z), iMsgTag >= v17) || v11 < v16 || v11 >= v17 )
            {
              if ( v4->m_spCollisionObject.m_pObject )
              {
                v20 = v4->m_kPropertyList.m_kAllocator.m_uiCount;
                v21 = (double)iMsgTag;
                *(float *)(v20 + 88) = v21;
                *(float *)(v20 + 92) = 4.0;
                *(float *)(v20 + 96) = -8.0;
                NiAVObject::Update((NiAVObject *)v4->m_kPropertyList.m_kAllocator.m_uiCount, 0.0, 1);
                SpEffect::Start(
                  (SpEffect *)v4->m_spCollisionObject.m_pObject,
                  (NiNode *)LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[2][0]));
              }
              SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_ItemPutRing);
            }
            else
            {
              if ( v4->m_kPropertyList.m_pkTail )
              {
                v18 = v4->m_kPropertyList.m_pkHead;
                *(float *)&v19 = (double)iMsgTag;
                v18[7].m_pkPrev = v19;
                *(float *)&v18[7].m_element.m_pObject = 4.0;
                *(float *)&v18[8].m_pkNext = -8.0;
                NiAVObject::Update((NiAVObject *)v4->m_kPropertyList.m_pkHead, 0.0, 1);
                SpEffect::Start(
                  (SpEffect *)v4->m_kPropertyList.m_pkTail,
                  (NiNode *)LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[2][0]));
              }
              if ( v4->m_uiRefCount )
              {
                (*(void (__stdcall **)(signed int, _DWORD, GatheringWin *))(*(_DWORD *)v4->m_uiRefCount + 4))(31, 0, v4);
                if ( v4->m_uiRefCount )
                  (*(void (__stdcall **)(signed int, _DWORD, GatheringWin *))(*(_DWORD *)v4->m_uiRefCount + 20))(
                    31,
                    0,
                    v4);
              }
              ((void (__thiscall *)(GatheringWin *, signed int, _DWORD, GatheringWin *))v4->vfptr[5].__vecDelDtor)(
                v4,
                31,
                0,
                v4);
              SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_MBoxGet);
            }
          }
        }
      }
      ++LODWORD(v4->m_kWorld.m_fScale);
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0050CBE0) --------------------------------------------------------
char __thiscall GatheringWin::Create(GatheringWin *this, PgFrameWork *pkFrameWork)
{
  GatheringWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  int v8; // edi@10
  int v9; // ebx@10
  PgSprData *v10; // eax@10
  PgWinSpr *v11; // eax@10
  PgSprData *v12; // eax@10
  PgWinBar *v13; // eax@10
  PgSprData *v14; // eax@10
  PgWinBar *v15; // eax@10
  PgSprData *v16; // eax@10
  PgWinBar *v17; // eax@10
  PgSprData *v18; // eax@10
  PgWinSpr *v19; // eax@10
  NiNode *v20; // eax@10
  SpEffect *v21; // eax@11
  SpEffect *v22; // eax@12
  NiNode *v23; // eax@15
  SpEffect *v24; // eax@16
  SpEffect *v25; // eax@17
  NiNode *v26; // esi@20
  NiPointer<NiNode> spNode; // [sp+34h] [bp-18h]@1
  int uiLeft; // [sp+38h] [bp-14h]@4
  int uiTop; // [sp+3Ch] [bp-10h]@4
  int v30; // [sp+48h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v30 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\ProductBar.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "GatheringWin", 0) )
  {
    v6 = spNode.m_pObject;
    v30 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = uiLeft;
  v9 = uiTop;
  v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, 0);
  v11 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v10, (PgWin *)&v2->vfptr, 0, 0);
  v11->vfptr[60].__vecDelDtor((NiRefObject *)v11, 0);
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_HP", &uiLeft, &uiTop, 0);
  v13 = PgWinBar::CreateWin(uiLeft - v8, uiTop - v9, v12, (PgWin *)&v2->vfptr, BGT_RIGHT);
  v2->m_pkGatheringProgress = v13;
  v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
  v2->m_iFullBarWidth = ((int (*)(void))v2->m_pkGatheringProgress->vfptr[36].__vecDelDtor)();
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_HP_Start", &uiLeft, &uiTop, 0);
  v15 = PgWinBar::CreateWin(uiLeft - v8, uiTop - v9, v14, (PgWin *)&v2->vfptr, BGT_RIGHT);
  v2->m_pkGatheringBarStart = (PgWinSpr *)v15;
  v15->vfptr[60].__vecDelDtor((NiRefObject *)v15, 0);
  v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_HP_End", &uiLeft, &uiTop, 0);
  v17 = PgWinBar::CreateWin(uiLeft - v8, uiTop - v9, v16, (PgWin *)&v2->vfptr, BGT_RIGHT);
  v2->m_pkGatheringBarEnd = (PgWinSpr *)v17;
  v17->vfptr[60].__vecDelDtor((NiRefObject *)v17, 0);
  v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PickPoint", &uiLeft, &uiTop, 0);
  v19 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v18, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkSuccessBox = v19;
  v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
  v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 0);
  v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
  v20 = EffectMgr::GetEffectNode(&g_kEffectMgr, "GatherSucc");
  if ( v20 )
  {
    v2->m_pkSuccessEffectNode = v20;
    v21 = (SpEffect *)operator new(0x44u);
    LOBYTE(v30) = 1;
    if ( v21 )
      SpEffect::SpEffect(v21, v2->m_pkSuccessEffectNode);
    else
      v22 = 0;
    LOBYTE(v30) = 0;
    v2->m_pkSuccessEffect = v22;
  }
  v23 = EffectMgr::GetEffectNode(&g_kEffectMgr, "GatherFail");
  if ( v23 )
  {
    v2->m_pkFailEffectNode = v23;
    v24 = (SpEffect *)operator new(0x44u);
    LOBYTE(v30) = 2;
    if ( v24 )
      SpEffect::SpEffect(v24, v2->m_pkFailEffectNode);
    else
      v25 = 0;
    LOBYTE(v30) = 0;
    v2->m_pkFailEffect = v25;
  }
  ((void (__thiscall *)(GatheringWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.69999999);
  v26 = spNode.m_pObject;
  v30 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v26 )
    v26->vfptr->__vecDelDtor((NiRefObject *)v26, 1u);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0050CF50) --------------------------------------------------------
void __thiscall GatheringWin::~GatheringWin(GatheringWin *this)
{
  GatheringWin *v1; // ebx@1
  SpEffect *v2; // esi@1
  NiNode *v3; // edi@2

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&GatheringWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GatheringWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_pkSuccessEffect;
  if ( v2 )
  {
    NsEffect::~NsEffect(&v2->m_kEffect);
    ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v2->m_kMarkCheck);
    v3 = v2->m_spEffect.m_pObject;
    if ( v2->m_spEffect.m_pObject && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    operator delete(v2);
  }
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 98C7B8: using guessed type void (__thiscall *GatheringWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98C7D4: using guessed type int (__thiscall *GatheringWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0050D010) --------------------------------------------------------
void __thiscall GatheringWin::StartGathering(GatheringWin *this, unsigned int uiGatheringCycle, unsigned int uiGatheringCount, int iThickness)
{
  GatheringWin *v4; // esi@1
  signed int v5; // ebx@1
  PgWinBar *v6; // ecx@1
  double v7; // st7@3
  int v8; // edi@6
  int v9; // edi@6
  PgWinSpr *v10; // ecx@6
  unsigned int uiGatheringCyclea; // [sp+3Ch] [bp+8h]@6

  v4 = this;
  v5 = (signed int)((double)this->m_iFullBarWidth * 0.25);
  this->m_fTimeWhenStarted = Timer::ms_fCurTime;
  this->m_fGatheringTime = (double)(uiGatheringCount * uiGatheringCycle) / 1000.0;
  v6 = this->m_pkGatheringProgress;
  v4->m_fGatheringCycle = (double)uiGatheringCycle / 1000.0;
  if ( 1.0 != v6->m_fMaxValue || 0.0 != v6->m_fCurValue )
  {
    v7 = 0.0;
    v6->m_fMaxValue = 1.0;
    v6->m_fCurValue = *(float *)&v7;
    PgWinBar::OnChangeValue(v6);
  }
  v4->vfptr[64].__vecDelDtor((NiRefObject *)v4, 1u);
  v4->vfptr[69].__vecDelDtor((NiRefObject *)v4, COERCE_UNSIGNED_INT(1.0));
  ((void (__stdcall *)(_DWORD))v4->m_pkGatheringBarStart->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v4->m_pkGatheringBarEnd->vfptr[64].__vecDelDtor)(0);
  ((void (__thiscall *)(GatheringWin *))v4->vfptr[37].__vecDelDtor)(v4);
  if ( v5 > v4->m_iFullBarWidth )
    v5 = v4->m_iFullBarWidth;
  uiGatheringCyclea = (unsigned int)v4->m_pkGatheringProgress;
  v8 = rand() % (v4->m_iFullBarWidth - v5);
  v9 = (*(int (**)(void))(*(_DWORD *)uiGatheringCyclea + 164))() + v8;
  ((void (__stdcall *)(int))v4->m_pkSuccessBox->vfptr[43].__vecDelDtor)(v9);
  ((void (__stdcall *)(_DWORD))v4->m_pkSuccessBox->vfptr[44].__vecDelDtor)(0);
  ((void (__stdcall *)(signed int))v4->m_pkSuccessBox->vfptr[117].__vecDelDtor)(v5);
  v10 = v4->m_pkSuccessBox;
  v4->m_iStartPos = v9;
  v4->m_iEndPos = v5 + v9;
  v4->m_iClickCount = 0;
  ((void (__stdcall *)(signed int))v10->vfptr[64].__vecDelDtor)(1);
  ((void (__thiscall *)(GatheringWin *, unsigned int, unsigned int, _DWORD, _DWORD))v4->vfptr[59].__vecDelDtor)(
    v4,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.69999999);
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0050D1E0) --------------------------------------------------------
void __thiscall GatheringWin::UpdateMeWin(GatheringWin *this, float fCurTime)
{
  GatheringWin *v2; // esi@1
  double v3; // st7@1
  double v4; // st6@1
  SpEffect *v5; // ecx@3
  double v6; // rt2@5
  double v7; // st6@5
  double v8; // st7@5
  double v9; // st6@6
  signed int v10; // eax@6
  bool v11; // zf@8
  signed int v12; // eax@8
  double v13; // st6@11
  PgWinBar *v14; // ecx@13
  double v15; // st6@13
  float fTime; // ST04_4@14
  float v17; // ST04_4@18
  float fMaxVal; // ST00_4@18
  double v19; // st7@19
  float fSin; // [sp+14h] [bp+8h]@6
  float fSina; // [sp+14h] [bp+8h]@13
  float fSinb; // [sp+14h] [bp+8h]@20
  float fSinc; // [sp+14h] [bp+8h]@23
  float fSind; // [sp+14h] [bp+8h]@23
  float fSine; // [sp+14h] [bp+8h]@24

  v2 = this;
  v3 = 0.0;
  v4 = 1.0;
  if ( Char::CheckActState(g_pkMainChar, 500000) )
  {
    v2->m_fGatheringTime = 0.0;
    v2->m_fAlphaBlendValue = *(float *)&v4;
  }
  v5 = v2->m_pkSuccessEffect;
  if ( v5 )
  {
    SpEffect::Update(v5, fCurTime);
    v3 = 0.0;
    v4 = 1.0;
  }
  v6 = v4;
  v7 = v3;
  v8 = v6;
  if ( v7 >= v2->m_fGatheringTime )
  {
    v19 = v7;
    if ( v7 >= v2->m_fAlphaBlendValue )
    {
      v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 0);
    }
    else
    {
      fSinb = v2->m_fAlphaBlendValue - (Timer::ms_fDeltaTime + Timer::ms_fDeltaTime);
      v2->m_fAlphaBlendValue = fSinb;
      if ( fSinb <= v7 )
        v2->m_fAlphaBlendValue = v7;
      if ( v7 < v2->m_fAlphaBlendValue )
      {
        fSinc = v2->m_fAlphaBlendValue * NI_HALF_PI;
        fSind = sin(fSinc);
        v19 = fSind;
      }
      fSine = v19;
      ((void (__stdcall *)(_DWORD))v2->m_pkSuccessBox->vfptr[64].__vecDelDtor)(0);
      v2->vfptr[69].__vecDelDtor((NiRefObject *)v2, LODWORD(fSine));
    }
  }
  else
  {
    v9 = fCurTime - v2->m_fTimeWhenStarted;
    v10 = (signed int)(v9 / v2->m_fGatheringCycle);
    fSin = v9 - (double)v10 * v2->m_fGatheringCycle;
    if ( v10 > v2->m_iClickCount )
      v2->m_iClickCount = v10;
    v12 = v10 & 0x80000001;
    v11 = v12 == 0;
    if ( v12 < 0 )
      v11 = (((_BYTE)v12 - 1) | 0xFFFFFFFE) == -1;
    if ( v11 )
      v13 = fSin;
    else
      v13 = 1.0 - fSin;
    v14 = v2->m_pkGatheringProgress;
    fSina = v13;
    v15 = fSina;
    if ( fSina > v8 )
    {
      v17 = v8;
      fMaxVal = v8;
      PgWinBar::SetValue(v14, fMaxVal, v17);
      ((void (__stdcall *)(signed int))v2->m_pkGatheringBarStart->vfptr[64].__vecDelDtor)(1);
      ((void (__stdcall *)(signed int))v2->m_pkGatheringBarEnd->vfptr[64].__vecDelDtor)(1);
    }
    else
    {
      fTime = v15;
      PgWinBar::SetValue(v14, 0.94999999, fTime);
      if ( fSina >= 0.0 )
        ((void (__stdcall *)(signed int))v2->m_pkGatheringBarStart->vfptr[64].__vecDelDtor)(1);
      if ( fSina >= 0.949999988079071 )
        ((void (__stdcall *)(signed int))v2->m_pkGatheringBarEnd->vfptr[64].__vecDelDtor)(1);
    }
  }
}
// A8B980: using guessed type float Timer::ms_fDeltaTime;
// B622D0: using guessed type const float NI_HALF_PI;

//----- (0050D3F0) --------------------------------------------------------
GatheringWin *__cdecl GatheringWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  GatheringWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x198u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    GatheringWin::GatheringWin((GatheringWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    PgWin::EnableOpenCloseSound(v3, 0);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, v3);
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (GatheringWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (0050D530) --------------------------------------------------------
GatheringWin *__thiscall GatheringWin::`vector deleting destructor'(GatheringWin *this, unsigned int a2)
{
  GatheringWin *v2; // esi@1

  v2 = this;
  GatheringWin::~GatheringWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0050D560) --------------------------------------------------------
BOOL __cdecl GuildListWin::GuildInfo::Low_GuildType(GuildListWin::GuildInfo *lhw, GuildListWin::GuildInfo *rhw)
{
  return lhw->m_unGuildType < rhw->m_unGuildType;
}

//----- (0050D580) --------------------------------------------------------
BOOL __cdecl GuildListWin::GuildInfo::Low_GuildGrade(GuildListWin::GuildInfo *lhw, GuildListWin::GuildInfo *rhw)
{
  return lhw->m_unGuildGrade < rhw->m_unGuildGrade;
}

//----- (0050D5A0) --------------------------------------------------------
BOOL __cdecl GTRequestListWin::GuildInfo::Low_GuildTotalMember(GuildListWin::GuildInfo *lhw, GuildListWin::GuildInfo *rhw)
{
  return lhw->m_unGuildTotalMember < rhw->m_unGuildTotalMember;
}

//----- (0050D5C0) --------------------------------------------------------
void __thiscall GuildListWin::OnPrevPage(GuildListWin *this)
{
  int v1; // eax@1

  v1 = this->m_GuildIndex;
  GuildListTask::OnNCGuildListReq();
}

//----- (0050D5F0) --------------------------------------------------------
void __thiscall GuildListWin::OnNextPage(GuildListWin *this)
{
  int v1; // ST00_4@1

  v1 = this->m_GuildIndex + 22;
  GuildListTask::OnNCGuildListReq();
}

//----- (0050D610) --------------------------------------------------------
void GuildListWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "GuildList");
}

//----- (0050D640) --------------------------------------------------------
void __thiscall GuildListWin::UpdateMeWin(GuildListWin *this, float fCurTime)
{
  GuildListWin *v2; // esi@1

  v2 = this;
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
    GameFrameWork::UpdateUIScroll(v2->m_pkGuildLIst, v2->m_pkSlideBarGuild);
}

//----- (0050D670) --------------------------------------------------------
void __thiscall GuildListWin::OnSlideBar(GuildListWin *this)
{
  GuildListWin *v1; // esi@1
  SlideListWin *v2; // eax@1
  SlideBar *v3; // ecx@2

  v1 = this;
  v2 = this->m_pkGuildLIst;
  if ( v2 )
  {
    v3 = this->m_pkSlideBarGuild;
    if ( v3 )
      SlideBar::SetSplitCnt(v3, v2->m_nSlideSplitCnt);
    v1->m_pkGuildLIst->m_nViewStartPos = v1->m_pkSlideBarGuild->m_nCurPos;
    SlideListWin::UpdateViewList(v1->m_pkGuildLIst);
  }
}

//----- (0050D6C0) --------------------------------------------------------
void __thiscall GuildListWin::OnSearchChoice(GuildListWin *this)
{
  GuildListWin *v1; // esi@1

  v1 = this;
  if ( this == (GuildListWin *)g_pkToolTipWin->m_pkToolTipParentWin )
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD, _DWORD))v1->m_spPopupMenu->vfptr[77].__vecDelDtor)(PgWin::ms_iMsX, PgWin::ms_iMsY);
  PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v1->m_spPopupMenu->vfptr);
  ((void (__stdcall *)(_DWORD))v1->m_spPopupMenu->vfptr[60].__vecDelDtor)(1);
}

//----- (0050D730) --------------------------------------------------------
void __thiscall GuildListWin::OnClose(GuildListWin *this)
{
  GuildListWin *v1; // esi@1
  PgWinText *v2; // eax@1
  NiRefObjectVtbl *v3; // edi@2
  NiUnsharedGeometryGroup *v4; // eax@2
  SlideListWin *v5; // edi@3

  v1 = this;
  v2 = this->m_pkSearchType;
  this->m_bFirstSort = 0;
  this->m_iSearchTyepe = 23;
  if ( v2 )
  {
    v3 = v2->vfptr;
    v4 = TextData2::Get(0xD90AE9EE);
    v3[118].__vecDelDtor((NiRefObject *)v1->m_pkSearchType, (unsigned int)v4);
  }
  SlideBar::SetSplitCnt(v1->m_pkSlideBarGuild, 0);
  v1->m_pkGuildLIst->m_nSlideSplitCnt = 0;
  v5 = v1->m_pkGuildLIst;
  v5->m_fCurSlideBtnPos = 0.0;
  v5->m_nViewStartPos = (signed int)((double)v5->m_nSlideSplitCnt * 0.0);
  v1->m_pkGuildLIst->m_nViewStartPos = 0;
  *(_DWORD *)&v1->m_acSearchName[0] = 0;
  *(_DWORD *)&v1->m_acSearchName[4] = 0;
  *(_DWORD *)&v1->m_acSearchName[8] = 0;
  *(_DWORD *)&v1->m_acSearchName[12] = 0;
  *(_DWORD *)&v1->m_acSearchName[16] = 0;
  *(_DWORD *)&v1->m_acSearchName[20] = 0;
  *(_DWORD *)&v1->m_acSearchName[24] = 0;
  *(_DWORD *)&v1->m_acSearchName[28] = 0;
  ((void (__stdcall *)(_DWORD))v1->m_spEdit.m_pObject->vfptr[115].__vecDelDtor)(&unk_98CA12);
  PgWin::OnClose((PgWin *)&v1->vfptr);
}

//----- (0050D810) --------------------------------------------------------
void __thiscall GuildListWin::DirectMessage(GuildListWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  GuildListWin *v4; // esi@1
  PgWinText *v5; // eax@3
  NiRefObjectVtbl *v6; // edi@4
  NiUnsharedGeometryGroup *v7; // eax@4
  PgWinText *v8; // eax@5
  NiRefObjectVtbl *v9; // edi@6
  NiUnsharedGeometryGroup *v10; // eax@6

  v4 = this;
  if ( iMsgTag == 74 )
  {
    v8 = this->m_apkListTextWin[3][20];
    this->m_apkListTextWin[3][21] = (PgWinText *)23;
    if ( v8 )
    {
      v9 = v8->vfptr;
      v10 = TextData2::Get(0xD90AE9EE);
      v9[118].__vecDelDtor((NiRefObject *)v4->m_apkListTextWin[3][20], (unsigned int)v10);
    }
  }
  else if ( iMsgTag == 75 )
  {
    v5 = this->m_apkListTextWin[3][20];
    this->m_apkListTextWin[3][21] = (PgWinText *)24;
    if ( v5 )
    {
      v6 = v5->vfptr;
      v7 = TextData2::Get(0xE012F32C);
      v6[118].__vecDelDtor((NiRefObject *)v4->m_apkListTextWin[3][20], (unsigned int)v7);
    }
  }
}

//----- (0050D8A0) --------------------------------------------------------
void __thiscall GuildListWin::AddGuildInfo(GuildListWin *this, GuildListWin::GuildInfo *kGuildInfo)
{
  GuildListWin::GuildInfo *v2; // ebx@1
  GuildListWin *v3; // edi@1
  unsigned int v4; // ST2C_4@1
  unsigned int v5; // ecx@3
  char *v6; // eax@6
  char v7; // dl@7
  GuildListWin::GuildInfo *v8; // eax@9
  char *v9; // esi@12
  char *v10; // ebx@13
  BOOL v11; // eax@13
  const char *v12; // edi@13
  int v13; // ebx@16
  char *v14; // eax@16
  const char *v15; // ebx@17
  unsigned int v16; // eax@20
  char *v17; // edi@20
  char v18; // cl@21
  unsigned int v19; // edx@22
  char *v20; // edi@22
  char v21; // cl@23
  unsigned int v22; // eax@24
  char *v23; // edi@24
  char v24; // cl@25
  unsigned int v25; // kr00_4@26
  char *v26; // eax@26
  char v27; // dl@27
  unsigned int v28; // eax@28
  char *v29; // esi@28
  char *v30; // edi@28
  char v31; // cl@29
  int v32; // edx@30
  GuildListWin *v33; // ebx@30
  char v34; // bl@37
  int v35; // ebx@39
  char *v36; // eax@39
  const char *v37; // ebx@40
  unsigned int v38; // eax@43
  char *v39; // edi@43
  char v40; // cl@44
  unsigned int v41; // edx@45
  char *v42; // edi@45
  char v43; // cl@46
  unsigned int v44; // eax@47
  char *v45; // edi@47
  char v46; // cl@48
  unsigned int v47; // kr04_4@49
  char *v48; // eax@49
  char v49; // dl@50
  char v50; // cl@52
  char *v51; // edi@59
  const char *v52; // eax@63
  unsigned int v53; // eax@64
  char *v54; // edi@64
  char v55; // cl@65
  unsigned int v56; // eax@66
  char *v57; // edi@66
  char v58; // cl@67
  unsigned int v59; // kr08_4@68
  char *v60; // eax@68
  char v61; // dl@69
  unsigned int v62; // eax@70
  char *v63; // esi@70
  char *v64; // edi@70
  char v65; // cl@71
  char *v66; // edi@72
  char *v67; // esi@72
  char v68; // cl@72
  int v69; // eax@72
  unsigned int v70; // eax@73
  char *v71; // edi@73
  char v72; // cl@74
  unsigned int v73; // eax@75
  char *v74; // edi@75
  char v75; // cl@76
  unsigned int v76; // kr0C_4@77
  char *v77; // eax@77
  char v78; // dl@78
  char v79; // cl@80
  unsigned int v80; // esi@86
  char *v81; // ecx@86
  char *v82; // eax@89
  char v83; // dl@90
  char *v84; // esi@94
  BOOL v85; // eax@95
  const char *v86; // edi@95
  unsigned int v87; // ebx@98
  const char *v88; // eax@98
  const char *v89; // ebx@99
  unsigned int v90; // eax@102
  char *v91; // edi@102
  char v92; // cl@103
  unsigned int v93; // edx@104
  char *v94; // edi@104
  char v95; // cl@105
  unsigned int v96; // eax@106
  char *v97; // edi@106
  char v98; // cl@107
  unsigned int v99; // kr10_4@108
  char *v100; // eax@108
  char v101; // dl@109
  unsigned int v102; // eax@110
  char *v103; // esi@110
  char *v104; // edi@110
  char v105; // cl@111
  int v106; // edx@112
  GuildListWin *v107; // esi@112
  char *v108; // edi@118
  char *v109; // edi@118
  char v110; // bl@119
  unsigned int v111; // ebx@121
  const char *v112; // eax@121
  const char *v113; // ebx@122
  unsigned int v114; // eax@125
  char *v115; // edi@125
  char v116; // cl@126
  unsigned int v117; // edx@127
  char *v118; // edi@127
  char v119; // cl@128
  unsigned int v120; // eax@129
  char *v121; // edi@129
  char v122; // cl@130
  unsigned int v123; // kr14_4@131
  char *v124; // eax@131
  char v125; // dl@132
  char v126; // cl@134
  char *v127; // edi@141
  const char *v128; // eax@145
  int v129; // edi@148
  GuildListWin::GuildInfo *v130; // ebx@149
  unsigned int v131; // eax@149
  unsigned int v132; // eax@151
  char *v133; // edi@151
  char v134; // cl@152
  unsigned int v135; // eax@153
  char *v136; // edi@153
  char v137; // cl@154
  unsigned int v138; // kr18_4@155
  char *v139; // eax@155
  char v140; // dl@156
  unsigned int v141; // eax@157
  char *v142; // esi@157
  char *v143; // edi@157
  char v144; // cl@158
  unsigned int v145; // eax@160
  char *v146; // edi@160
  char v147; // cl@161
  unsigned int v148; // eax@162
  char *v149; // edi@162
  char v150; // cl@163
  unsigned int v151; // kr1C_4@164
  char *v152; // eax@164
  char v153; // dl@165
  char v154; // cl@167
  NiUnsharedGeometryGroup *v155; // eax@150
  char TextCmd2[256]; // [sp+Ch] [bp-430h]@3
  BYTE TestChar[4]; // [sp+10Ch] [bp-330h]@37
  GuildListWin::GuildInfo *v158; // [sp+110h] [bp-32Ch]@1
  int GuildNamelen; // [sp+114h] [bp-328h]@11
  char *pChar; // [sp+118h] [bp-324h]@16
  int c2; // [sp+11Ch] [bp-320h]@14
  int Searchlen; // [sp+120h] [bp-31Ch]@8
  int c1; // [sp+124h] [bp-318h]@13
  int iLastIndex; // [sp+128h] [bp-314h]@1
  GuildListWin *v165; // [sp+12Ch] [bp-310h]@1
  int i; // [sp+130h] [bp-30Ch]@11
  char *pkCharClone; // [sp+134h] [bp-308h]@4
  char TextCmd3[256]; // [sp+138h] [bp-304h]@3
  char TextCmd4[256]; // [sp+238h] [bp-204h]@3
  char szText[4]; // [sp+338h] [bp-104h]@3
  int v171; // [sp+33Ch] [bp-100h]@3
  int v172; // [sp+340h] [bp-FCh]@3
  int v173; // [sp+344h] [bp-F8h]@3
  char dst; // [sp+348h] [bp-F4h]@3
  char Name[128]; // [sp+3B8h] [bp-84h]@1

  v2 = kGuildInfo;
  v3 = this;
  v4 = this->m_uiNo;
  v165 = this;
  v158 = kGuildInfo;
  sprintf(Name, "%d", v4);
  iLastIndex = SlideListWin::AddText(v3->m_pkGuildLIst, Name);
  if ( !strcmp(v3->m_acSearchName, (const char *)&unk_98CA13) || v3->m_iSearchTyepe != 23 )
    goto LABEL_62;
  v171 = 2032956015;
  *(_DWORD *)szText = 1819239291;
  v172 = 1869376613;
  v173 = 11383;
  memset(&dst, 0, 0xF0u);
  strcpy(TextCmd2, "}");
  TextCmd2[2] = 0;
  memset(&TextCmd2[3], 0, 0xFDu);
  memset(TextCmd3, 0, 0x100u);
  memset(TextCmd4, 0, 0x100u);
  v5 = kGuildInfo->m_strGuildName._Myres;
  pkCharClone = (char *)(v5 < 0x10 ? kGuildInfo : kGuildInfo->m_strGuildName._Bx._Ptr);
  v6 = v3->m_acSearchName;
  do
    v7 = *v6++;
  while ( v7 );
  Searchlen = v6 - &v3->m_acSearchName[1];
  v8 = v5 < 0x10 ? kGuildInfo : kGuildInfo->m_strGuildName._Bx._Ptr;
  GuildNamelen = strlen(v8->m_strGuildName._Bx._Buf);
  i = 0;
  if ( GuildNamelen <= 0 )
  {
LABEL_62:
    if ( v2->m_strGuildName._Myres < 0x10 )
      v52 = (const char *)v2;
    else
      v52 = v2->m_strGuildName._Bx._Ptr;
    SlideListWin::SetText(v3->m_pkGuildLIst, iLastIndex, 1u, v52);
    v33 = v165;
    goto LABEL_84;
  }
  v9 = TextCmd4;
  while ( 1 )
  {
    v10 = pkCharClone;
    LOBYTE(c1) = *pkCharClone;
    v11 = IsDBCSLeadByte(c1);
    v12 = v165->m_acSearchName;
    if ( !v11 )
      break;
    LOBYTE(c2) = *v12;
    if ( !IsDBCSLeadByte(c2) )
    {
      strncpy(v9, v10, 2u);
      i += 2;
      v9 += 2;
      pkCharClone = v10 + 2;
      goto LABEL_60;
    }
    if ( (_BYTE)c1 != (_BYTE)c2 )
    {
      strncpy(v9, v10, 2u);
      goto LABEL_35;
    }
    v13 = Searchlen;
    strncpy(TextCmd3, pkCharClone, Searchlen);
    v14 = (char *)_mbsstr(TextCmd3, v12);
    pChar = v14;
    if ( !v14 )
    {
      strncpy(v9, pkCharClone, v13);
LABEL_35:
      i += 2;
      v9 += 2;
      pkCharClone += 2;
      goto LABEL_60;
    }
    v15 = v14;
    if ( !strcmp(v14, v12) )
    {
      if ( !i )
      {
        v53 = strlen(TextCmd3) + 1;
        v54 = &TextCmd4[255];
        do
          v55 = (v54++)[1];
        while ( v55 );
        qmemcpy(v54, TextCmd3, v53);
        v56 = strlen(TextCmd2) + 1;
        v57 = &TextCmd4[255];
        do
          v58 = (v57++)[1];
        while ( v58 );
        qmemcpy(v57, TextCmd2, v56);
        v59 = strlen(v15);
        v60 = &pkCharClone[v59];
        do
          v61 = *v60++;
        while ( v61 );
        v62 = v60 - &pkCharClone[v59];
        v63 = &pkCharClone[v59];
        v64 = &TextCmd4[255];
        do
          v65 = (v64++)[1];
        while ( v65 );
        goto LABEL_72;
      }
      if ( i > 0 )
      {
        v16 = strlen(szText) + 1;
        v17 = &TextCmd3[255];
        do
          v18 = (v17++)[1];
        while ( v18 );
        qmemcpy(v17, szText, v16);
        v19 = strlen(v15) + 1;
        v20 = &TextCmd3[255];
        do
          v21 = (v20++)[1];
        while ( v21 );
        qmemcpy(v20, v15, v19);
        v22 = strlen(TextCmd2) + 1;
        v23 = &TextCmd3[255];
        do
          v24 = (v23++)[1];
        while ( v24 );
        qmemcpy(v23, TextCmd2, v22);
        v25 = strlen(v15);
        v26 = &pkCharClone[v25];
        do
          v27 = *v26++;
        while ( v27 );
        v28 = v26 - &pkCharClone[v25];
        v29 = &pkCharClone[v25];
        v30 = &TextCmd3[255];
        do
          v31 = (v30++)[1];
        while ( v31 );
LABEL_30:
        v32 = iLastIndex;
        v33 = v165;
        qmemcpy(v30, v29, v28);
        SlideListWin::SetText(v33->m_pkGuildLIst, v32, 1u, TextCmd4);
        goto LABEL_84;
      }
    }
    else
    {
      strncpy(v9, pkCharClone, 2u);
      i += 2;
      v9 += 2;
    }
    memset(TextCmd3, 0, 0x100u);
    pkCharClone += 2;
LABEL_60:
    if ( i >= GuildNamelen )
    {
      v3 = v165;
      v2 = v158;
      goto LABEL_62;
    }
  }
  v34 = *v12;
  TestChar[0] = *v12;
  if ( IsDBCSLeadByte(TestChar[0]) )
  {
    v51 = pkCharClone;
    strncpy(v9, pkCharClone, 1u);
    ++i;
    ++v9;
    pkCharClone = v51 + 1;
    goto LABEL_60;
  }
  if ( (_BYTE)c1 != v34 )
  {
    strncpy(v9, pkCharClone, 1u);
    goto LABEL_58;
  }
  v35 = Searchlen;
  strncpy(TextCmd3, pkCharClone, Searchlen);
  v36 = (char *)_mbsstr(TextCmd3, v12);
  pChar = v36;
  if ( !v36 )
  {
    strncpy(v9, pkCharClone, v35);
LABEL_58:
    ++i;
    ++v9;
    ++pkCharClone;
    goto LABEL_60;
  }
  v37 = v36;
  if ( strcmp(v36, v12) )
  {
    strncpy(v9, pkCharClone, 1u);
    ++i;
    ++v9;
LABEL_55:
    memset(TextCmd3, 0, 0x100u);
    ++pkCharClone;
    goto LABEL_60;
  }
  if ( i )
  {
    if ( i > 0 )
    {
      v38 = strlen(szText) + 1;
      v39 = &TextCmd3[255];
      do
        v40 = (v39++)[1];
      while ( v40 );
      qmemcpy(v39, szText, v38);
      v41 = strlen(v37) + 1;
      v42 = &TextCmd3[255];
      do
        v43 = (v42++)[1];
      while ( v43 );
      qmemcpy(v42, v37, v41);
      v44 = strlen(TextCmd2) + 1;
      v45 = &TextCmd3[255];
      do
        v46 = (v45++)[1];
      while ( v46 );
      qmemcpy(v45, TextCmd2, v44);
      v47 = strlen(v37);
      v48 = &pkCharClone[v47];
      do
        v49 = *v48++;
      while ( v49 );
      v28 = v48 - &pkCharClone[v47];
      v29 = &pkCharClone[v47];
      v30 = &TextCmd3[255];
      do
        v50 = (v30++)[1];
      while ( v50 );
      goto LABEL_30;
    }
    goto LABEL_55;
  }
  v70 = strlen(TextCmd3) + 1;
  v71 = &TextCmd4[255];
  do
    v72 = (v71++)[1];
  while ( v72 );
  qmemcpy(v71, TextCmd3, v70);
  v73 = strlen(TextCmd2) + 1;
  v74 = &TextCmd4[255];
  do
    v75 = (v74++)[1];
  while ( v75 );
  qmemcpy(v74, TextCmd2, v73);
  v76 = strlen(v37);
  v77 = &pkCharClone[v76];
  do
    v78 = *v77++;
  while ( v78 );
  v62 = v77 - &pkCharClone[v76];
  v63 = &pkCharClone[v76];
  v64 = &TextCmd4[255];
  do
    v79 = (v64++)[1];
  while ( v79 );
LABEL_72:
  v33 = v165;
  qmemcpy(v64, v63, 4 * (v62 >> 2));
  v67 = &v63[4 * (v62 >> 2)];
  v66 = &v64[4 * (v62 >> 2)];
  v68 = v62;
  v69 = iLastIndex;
  qmemcpy(v66, v67, v68 & 3);
  SlideListWin::SetText(v33->m_pkGuildLIst, v69, 1u, szText);
LABEL_84:
  if ( !strcmp(v33->m_acSearchName, (const char *)&unk_98CA21) || v33->m_iSearchTyepe != 24 )
    goto LABEL_145;
  v171 = 2032956015;
  *(_DWORD *)szText = 1819239291;
  v172 = 1869376613;
  v173 = 11383;
  memset(&dst, 0, 0xF0u);
  strcpy(TextCmd2, "}");
  TextCmd2[2] = 0;
  memset(&TextCmd2[3], 0, 0xFDu);
  memset(TextCmd3, 0, 0x100u);
  memset(TextCmd4, 0, 0x100u);
  v80 = v158->m_MasterName._Myres;
  v81 = v158->m_MasterName._Bx._Buf;
  if ( v80 < 0x10 )
    pkCharClone = v158->m_MasterName._Bx._Buf;
  else
    pkCharClone = *(char **)v81;
  v82 = v33->m_acSearchName;
  do
    v83 = *v82++;
  while ( v83 );
  c2 = v82 - &v33->m_acSearchName[1];
  if ( v80 >= 0x10 )
    v81 = *(char **)v81;
  pChar = (char *)strlen(v81);
  i = 0;
  if ( (signed int)pChar <= 0 )
    goto LABEL_145;
  v84 = TextCmd4;
  while ( 2 )
  {
    LOBYTE(c1) = *pkCharClone;
    v85 = IsDBCSLeadByte(c1);
    v86 = v165->m_acSearchName;
    if ( !v85 )
    {
      v110 = *v86;
      TestChar[0] = *v86;
      if ( !IsDBCSLeadByte(TestChar[0]) )
      {
        if ( (_BYTE)c1 == v110 )
        {
          v111 = c2;
          strncpy(TextCmd3, pkCharClone, c2);
          v112 = _mbsstr(TextCmd3, v86);
          GuildNamelen = (int)v112;
          if ( v112 )
          {
            v113 = v112;
            if ( !strcmp(v112, v86) )
            {
              if ( !i )
              {
                v145 = strlen(TextCmd3) + 1;
                v146 = &TextCmd4[255];
                do
                  v147 = (v146++)[1];
                while ( v147 );
                qmemcpy(v146, TextCmd3, v145);
                v148 = strlen(TextCmd2) + 1;
                v149 = &TextCmd4[255];
                do
                  v150 = (v149++)[1];
                while ( v150 );
                qmemcpy(v149, TextCmd2, v148);
                v151 = strlen(v113);
                v152 = &pkCharClone[v151];
                do
                  v153 = *v152++;
                while ( v153 );
                v141 = v152 - &pkCharClone[v151];
                v142 = &pkCharClone[v151];
                v143 = &TextCmd4[255];
                do
                  v154 = (v143++)[1];
                while ( v154 );
                goto LABEL_159;
              }
              if ( i > 0 )
              {
                v114 = strlen(szText) + 1;
                v115 = &TextCmd3[255];
                do
                  v116 = (v115++)[1];
                while ( v116 );
                qmemcpy(v115, szText, v114);
                v117 = strlen(v113) + 1;
                v118 = &TextCmd3[255];
                do
                  v119 = (v118++)[1];
                while ( v119 );
                qmemcpy(v118, v113, v117);
                v120 = strlen(TextCmd2) + 1;
                v121 = &TextCmd3[255];
                do
                  v122 = (v121++)[1];
                while ( v122 );
                qmemcpy(v121, TextCmd2, v120);
                v123 = strlen(v113);
                v124 = &pkCharClone[v123];
                do
                  v125 = *v124++;
                while ( v125 );
                v102 = v124 - &pkCharClone[v123];
                v103 = &pkCharClone[v123];
                v104 = &TextCmd3[255];
                do
                  v126 = (v104++)[1];
                while ( v126 );
                goto LABEL_112;
              }
            }
            else
            {
              strncpy(v84, pkCharClone, 1u);
              ++i;
              ++v84;
            }
            memset(TextCmd3, 0, 0x100u);
            ++pkCharClone;
            goto LABEL_143;
          }
          strncpy(v84, pkCharClone, v111);
        }
        else
        {
          strncpy(v84, pkCharClone, 1u);
        }
        ++i;
        ++v84;
        ++pkCharClone;
        goto LABEL_143;
      }
      v127 = pkCharClone;
      strncpy(v84, pkCharClone, 1u);
      ++i;
      ++v84;
      v109 = v127 + 1;
LABEL_142:
      pkCharClone = v109;
      goto LABEL_143;
    }
    LOBYTE(Searchlen) = *v86;
    if ( !IsDBCSLeadByte(Searchlen) )
    {
      v108 = pkCharClone;
      strncpy(v84, pkCharClone, 2u);
      i += 2;
      v84 += 2;
      v109 = v108 + 2;
      goto LABEL_142;
    }
    if ( (_BYTE)c1 != (_BYTE)Searchlen )
    {
      strncpy(v84, pkCharClone, 2u);
      goto LABEL_117;
    }
    v87 = c2;
    strncpy(TextCmd3, pkCharClone, c2);
    v88 = _mbsstr(TextCmd3, v86);
    GuildNamelen = (int)v88;
    if ( !v88 )
    {
      strncpy(v84, pkCharClone, v87);
LABEL_117:
      i += 2;
      v84 += 2;
      pkCharClone += 2;
      goto LABEL_143;
    }
    v89 = v88;
    if ( strcmp(v88, v86) )
    {
      strncpy(v84, pkCharClone, 2u);
      i += 2;
      v84 += 2;
      goto LABEL_114;
    }
    if ( !i )
    {
      v132 = strlen(TextCmd3) + 1;
      v133 = &TextCmd4[255];
      do
        v134 = (v133++)[1];
      while ( v134 );
      qmemcpy(v133, TextCmd3, v132);
      v135 = strlen(TextCmd2) + 1;
      v136 = &TextCmd4[255];
      do
        v137 = (v136++)[1];
      while ( v137 );
      qmemcpy(v136, TextCmd2, v135);
      v138 = strlen(v89);
      v139 = &pkCharClone[v138];
      do
        v140 = *v139++;
      while ( v140 );
      v141 = v139 - &pkCharClone[v138];
      v142 = &pkCharClone[v138];
      v143 = &TextCmd4[255];
      do
        v144 = (v143++)[1];
      while ( v144 );
LABEL_159:
      qmemcpy(v143, v142, v141);
      v129 = iLastIndex;
      v107 = v165;
      SlideListWin::SetText(v165->m_pkGuildLIst, iLastIndex, 2u, szText);
      goto LABEL_149;
    }
    if ( i > 0 )
    {
      v90 = strlen(szText) + 1;
      v91 = &TextCmd3[255];
      do
        v92 = (v91++)[1];
      while ( v92 );
      qmemcpy(v91, szText, v90);
      v93 = strlen(v89) + 1;
      v94 = &TextCmd3[255];
      do
        v95 = (v94++)[1];
      while ( v95 );
      qmemcpy(v94, v89, v93);
      v96 = strlen(TextCmd2) + 1;
      v97 = &TextCmd3[255];
      do
        v98 = (v97++)[1];
      while ( v98 );
      qmemcpy(v97, TextCmd2, v96);
      v99 = strlen(v89);
      v100 = &pkCharClone[v99];
      do
        v101 = *v100++;
      while ( v101 );
      v102 = v100 - &pkCharClone[v99];
      v103 = &pkCharClone[v99];
      v104 = &TextCmd3[255];
      do
        v105 = (v104++)[1];
      while ( v105 );
LABEL_112:
      v106 = iLastIndex;
      qmemcpy(v104, v103, v102);
      v107 = v165;
      SlideListWin::SetText(v165->m_pkGuildLIst, v106, 2u, TextCmd4);
      goto LABEL_148;
    }
LABEL_114:
    memset(TextCmd3, 0, 0x100u);
    pkCharClone += 2;
LABEL_143:
    if ( i < (signed int)pChar )
      continue;
    break;
  }
  v33 = v165;
LABEL_145:
  v128 = v158->m_MasterName._Bx._Buf;
  if ( v158->m_MasterName._Myres >= 0x10 )
    v128 = *(const char **)v128;
  SlideListWin::SetText(v33->m_pkGuildLIst, iLastIndex, 2u, v128);
  v107 = v165;
LABEL_148:
  v129 = iLastIndex;
LABEL_149:
  v130 = v158;
  v131 = v158->m_unGuildType;
  if ( !v131 )
  {
    v155 = TextData::Get(0x3E3D34A2u);
    goto LABEL_171;
  }
  if ( v131 == 1 )
  {
    v155 = TextData::Get(0x3E486D96u);
LABEL_171:
    SlideListWin::SetText(v107->m_pkGuildLIst, v129, 3u, (const char *)v155);
  }
  sprintf(Name, "%d", v130->m_unGuildGrade);
  SlideListWin::SetText(v107->m_pkGuildLIst, v129, 4u, Name);
  sprintf(Name, "%d", v130->m_unGuildTotalMember);
  SlideListWin::SetText(v107->m_pkGuildLIst, v129, 5u, Name);
}

//----- (0050E860) --------------------------------------------------------
void __thiscall GuildListWin::DisplayInfoSetting(GuildListWin *this, bool bSearch)
{
  GuildListWin *v2; // esi@1
  SlideListWin *v3; // ecx@1
  NiRefObjectVtbl *v4; // edi@1
  unsigned int v5; // ST04_4@1
  char *v6; // eax@1
  char *v7; // eax@1
  GuildListWin::GuildInfo *v8; // edi@3
  int v9; // eax@4
  const char *v10; // eax@6
  NiRefObjectVtbl *v11; // ebx@9
  unsigned int v12; // ST04_4@9
  char *v13; // eax@9
  char *v14; // eax@9
  NiRefObjectVtbl *v15; // ebx@14
  unsigned int v16; // ST04_4@14
  char *v17; // eax@14
  char *v18; // eax@14
  unsigned int i; // [sp+Ch] [bp-8h]@1
  int v20; // [sp+10h] [bp-4h]@2

  v2 = this;
  v3 = this->m_pkGuildLIst;
  v2->m_uiNo = 0;
  SlideListWin::RemoveAllList(v3);
  v4 = v2->m_pkTotalGuildNum->vfptr;
  v5 = v2->m_uiNo;
  v6 = (char *)TextData2::Get(0x3B544247u);
  v7 = fs(v6, v5);
  v4[118].__vecDelDtor((NiRefObject *)v2->m_pkTotalGuildNum, (unsigned int)v7);
  i = 0;
  if ( v2->m_vecGuildInfo._Mylast - v2->m_vecGuildInfo._Myfirst )
  {
    v20 = 0;
    do
    {
      v8 = &v2->m_vecGuildInfo._Myfirst[v20];
      if ( bSearch )
      {
        v9 = v2->m_iSearchTyepe;
        if ( v9 == 23 )
        {
          if ( v8->m_strGuildName._Myres < 0x10 )
            v10 = v2->m_vecGuildInfo._Myfirst[v20].m_strGuildName._Bx._Buf;
          else
            v10 = v8->m_strGuildName._Bx._Ptr;
        }
        else
        {
          if ( v9 != 24 )
            goto LABEL_16;
          v10 = v8->m_MasterName._Bx._Buf;
          if ( v8->m_MasterName._Myres >= 0x10 )
            v10 = *(const char **)v10;
        }
        if ( _mbsstr(v10, v2->m_acSearchName) )
        {
          ++v2->m_uiNo;
          v11 = v2->m_pkTotalGuildNum->vfptr;
          v12 = v2->m_uiNo;
          v13 = (char *)TextData2::Get(0x3B544247u);
          v14 = fs(v13, v12);
          v11[118].__vecDelDtor((NiRefObject *)v2->m_pkTotalGuildNum, (unsigned int)v14);
LABEL_15:
          GuildListWin::AddGuildInfo(v2, v8);
          goto LABEL_16;
        }
      }
      else if ( !v2->m_bSearchStart )
      {
        ++v2->m_uiNo;
        v15 = v2->m_pkTotalGuildNum->vfptr;
        v16 = v2->m_uiNo;
        v17 = (char *)TextData2::Get(0x3B544247u);
        v18 = fs(v17, v16);
        v15[118].__vecDelDtor((NiRefObject *)v2->m_pkTotalGuildNum, (unsigned int)v18);
        goto LABEL_15;
      }
LABEL_16:
      ++v20;
      ++i;
    }
    while ( i < v2->m_vecGuildInfo._Mylast - v2->m_vecGuildInfo._Myfirst );
  }
  SlideListWin::UpdateViewList(v2->m_pkGuildLIst);
}

//----- (0050EA00) --------------------------------------------------------
void __thiscall GuildListWin::GuildListWin(GuildListWin *this)
{
  GuildListWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GuildListWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildListWin::`vftable'{for `IDirectMessenger'};
  v1->m_vecGuildInfo._Myfirst = 0;
  v1->m_vecGuildInfo._Mylast = 0;
  v1->m_vecGuildInfo._Myend = 0;
  v1->m_SortPradicationFunc.manager = 0;
  v1->m_SortPradicationFunc.functor.obj_ptr = 0;
  v1->m_SortPradicationFunc.invoker = 0;
  v1->m_spEdit.m_pObject = 0;
  *(_WORD *)&v1->m_bFirstSort = 0;
  v1->m_spPopupMenu = 0;
  v1->m_uiNo = 0;
  v1->m_iSearchTyepe = 23;
  *(_DWORD *)&v1->m_acSearchName[0] = 0;
  *(_DWORD *)&v1->m_acSearchName[4] = 0;
  *(_DWORD *)&v1->m_acSearchName[8] = 0;
  *(_DWORD *)&v1->m_acSearchName[12] = 0;
  *(_DWORD *)&v1->m_acSearchName[16] = 0;
  *(_DWORD *)&v1->m_acSearchName[20] = 0;
  *(_DWORD *)&v1->m_acSearchName[24] = 0;
  *(_DWORD *)&v1->m_acSearchName[28] = 0;
  v1->m_GuildIndex = 0;
}
// 98CD6C: using guessed type void (__thiscall *GuildListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98CD8C: using guessed type int (__thiscall *GuildListWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0050EAA0) --------------------------------------------------------
void __thiscall GuildListWin::~GuildListWin(GuildListWin *this)
{
  GuildListWin *v1; // esi@1
  EditWin *v2; // edi@1
  GuildListWin::GuildInfo *v3; // eax@7

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildListWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildListWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spEdit.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  if ( v1->m_SortPradicationFunc.manager )
    v1->m_SortPradicationFunc.functor.obj_ptr = (void *)((int (__cdecl *)(_DWORD, _DWORD))v1->m_SortPradicationFunc.manager)(
                                                          v1->m_SortPradicationFunc.functor.obj_ptr,
                                                          1);
  v1->m_SortPradicationFunc.manager = 0;
  v1->m_SortPradicationFunc.invoker = 0;
  v3 = v1->m_vecGuildInfo._Myfirst;
  if ( v3 )
  {
    std::_Destroy_range<std::allocator<GTRequestListWin::GuildInfo>>(v3, v1->m_vecGuildInfo._Mylast);
    operator delete(v1->m_vecGuildInfo._Myfirst);
  }
  v1->m_vecGuildInfo._Myfirst = 0;
  v1->m_vecGuildInfo._Mylast = 0;
  v1->m_vecGuildInfo._Myend = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 98CD6C: using guessed type void (__thiscall *GuildListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98CD8C: using guessed type int (__thiscall *GuildListWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0050EBA0) --------------------------------------------------------
GuildListWin *__cdecl GuildListWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  GuildListWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x3D4u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    GuildListWin::GuildListWin((GuildListWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (GuildListWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (0050ECD0) --------------------------------------------------------
void __thiscall GuildListWin::Clear(GuildListWin *this)
{
  GuildListWin *v1; // esi@1
  GuildListWin::GuildInfo *v2; // eax@1
  GuildListWin::GuildInfo *v3; // ecx@1
  GuildListWin::GuildInfo *v4; // edi@2

  v1 = this;
  *(_DWORD *)&this->m_acSearchName[0] = 0;
  *(_DWORD *)&this->m_acSearchName[4] = 0;
  *(_DWORD *)&this->m_acSearchName[8] = 0;
  *(_DWORD *)&this->m_acSearchName[12] = 0;
  *(_DWORD *)&this->m_acSearchName[16] = 0;
  *(_DWORD *)&this->m_acSearchName[20] = 0;
  *(_DWORD *)&this->m_acSearchName[24] = 0;
  *(_DWORD *)&this->m_acSearchName[28] = 0;
  v2 = this->m_vecGuildInfo._Mylast;
  v3 = this->m_vecGuildInfo._Myfirst;
  if ( v3 != v2 )
  {
    v4 = std::_Move<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::GuildInfo *>(v2, v2, v3);
    std::_Destroy_range<std::allocator<GTRequestListWin::GuildInfo>>(v4, v1->m_vecGuildInfo._Mylast);
    v1->m_vecGuildInfo._Mylast = v4;
  }
  SlideListWin::RemoveAllList(v1->m_pkGuildLIst);
  SlideListWin::UpdateViewList(v1->m_pkGuildLIst);
}

//----- (0050ED70) --------------------------------------------------------
void __thiscall GuildListWin::SetGuildList(GuildListWin *this, SHINE_GUILD_LIST_NEW *pkList, unsigned int uiTotalGuild)
{
  unsigned int v3; // edx@2
  unsigned int v4; // ecx@2
  unsigned int v5; // edx@2
  unsigned int v6; // ecx@2
  unsigned int v7; // eax@2
  unsigned int v8; // edx@2
  unsigned int v9; // eax@2
  unsigned int v10; // ecx@2
  NiRefObjectVtbl *v11; // esi@3
  char *v12; // eax@3
  char *v13; // eax@3
  GuildListWin::GuildInfo *v14; // edi@5
  unsigned int v15; // edx@5
  GuildListWin *v16; // [sp+10h] [bp-84h]@1
  GuildListWin::GuildInfo kGuildInfo; // [sp+14h] [bp-80h]@1
  char acName[17]; // [sp+58h] [bp-3Ch]@2
  _DWORD acName2[5]; // [sp+6Ch] [bp-28h]@2
  char v20; // [sp+80h] [bp-14h]@2
  int v21; // [sp+90h] [bp-4h]@1

  v16 = this;
  kGuildInfo.m_strGuildName._Myres = 15;
  kGuildInfo.m_strGuildName._Mysize = 0;
  kGuildInfo.m_strGuildName._Bx._Buf[0] = 0;
  kGuildInfo.m_MasterName._Myres = 15;
  kGuildInfo.m_MasterName._Mysize = 0;
  kGuildInfo.m_MasterName._Bx._Buf[0] = 0;
  v21 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &kGuildInfo.m_strGuildName,
    (const char *)&unk_96F8EB,
    0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &kGuildInfo.m_MasterName,
    (const char *)&unk_96F8EB,
    0);
  if ( pkList )
  {
    v3 = pkList->sGuildName.n4_code[2];
    v4 = pkList->sGuildName.n4_code[1];
    *(_DWORD *)acName = pkList->sGuildName.n4_code[0];
    *(_DWORD *)&acName[12] = pkList->sGuildName.n4_code[3];
    *(_DWORD *)&acName[8] = v3;
    *(_DWORD *)&acName[4] = v4;
    acName[16] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kGuildInfo.m_strGuildName,
      acName,
      strlen(acName));
    v5 = pkList->sMasterCharID.n5_code[0];
    v6 = pkList->sMasterCharID.n5_code[2];
    acName2[1] = pkList->sMasterCharID.n5_code[1];
    v7 = pkList->sMasterCharID.n5_code[4];
    acName2[0] = v5;
    v8 = pkList->sMasterCharID.n5_code[3];
    acName2[4] = v7;
    acName2[3] = v8;
    acName2[2] = v6;
    v20 = 0;
    LOBYTE(acName2[4]) = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kGuildInfo.m_MasterName,
      (const char *)acName2,
      strlen((const char *)acName2));
    v9 = pkList->nType;
    v10 = pkList->nMemberCnt;
    kGuildInfo.m_unGuildGrade = pkList->nGrade;
    kGuildInfo.m_unGuildType = v9;
    kGuildInfo.m_unGuildTotalMember = v10;
    if ( uiTotalGuild > 0 )
    {
      v11 = v16->m_pkTotalGuildNum->vfptr;
      v12 = (char *)TextData2::Get(0x3B544247u);
      v13 = fs(v12, uiTotalGuild);
      v11[118].__vecDelDtor((NiRefObject *)v16->m_pkTotalGuildNum, (unsigned int)v13);
    }
    std::vector<GuildAcademySelectWin::GuildInfo,std::allocator<GuildAcademySelectWin::GuildInfo>>::push_back(
      &v16->m_vecGuildInfo,
      &kGuildInfo);
    if ( !v16->m_bFirstSort )
    {
      v14 = v16->m_vecGuildInfo._Myfirst;
      v15 = (signed int)((unsigned __int64)(2021161081i64
                                          * (unsigned int)((char *)v16->m_vecGuildInfo._Mylast - (char *)v14)) >> 32) >> 5;
      std::_Sort<GTRequestListWin::GuildInfo *,int,bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &)>(
        v14,
        v16->m_vecGuildInfo._Mylast,
        v15 + (v15 >> 31),
        GTRequestListWin::GuildInfo::High_GuildName);
      v16->m_bFirstSort = 1;
    }
  }
  if ( kGuildInfo.m_MasterName._Myres >= 0x10 )
    operator delete(kGuildInfo.m_MasterName._Bx._Ptr);
  kGuildInfo.m_MasterName._Myres = 15;
  kGuildInfo.m_MasterName._Mysize = 0;
  kGuildInfo.m_MasterName._Bx._Buf[0] = 0;
  if ( kGuildInfo.m_strGuildName._Myres >= 0x10 )
    operator delete(kGuildInfo.m_strGuildName._Bx._Ptr);
}

//----- (0050EF60) --------------------------------------------------------
void __thiscall GuildListWin::OnSearch(GuildListWin *this)
{
  GuildListWin *v1; // esi@1
  int v2; // edi@2
  char *v3; // eax@2
  int v4; // edi@2
  char v5; // cl@3
  int v6; // eax@4
  SlideBar *v7; // ecx@11
  SlideListWin *v8; // edi@11
  boost::detail::function::any_pointer (__cdecl *v9)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp-Ch] [bp-1Ch]@9
  int v10; // [sp-8h] [bp-18h]@9
  bool (__cdecl *v11)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *); // [sp-4h] [bp-14h]@5
  boost::detail::function::any_pointer (__cdecl **v12)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp+Ch] [bp-4h]@9

  v1 = this;
  if ( !((int (*)(void))this->m_spEdit.m_pObject->vfptr[113].__vecDelDtor)() )
    return;
  v2 = (int)v1->m_acSearchName;
  *(_DWORD *)v2 = 0;
  *(_DWORD *)(v2 + 4) = 0;
  *(_DWORD *)(v2 + 8) = 0;
  *(_DWORD *)(v2 + 12) = 0;
  *(_DWORD *)(v2 + 16) = 0;
  *(_DWORD *)(v2 + 20) = 0;
  *(_DWORD *)(v2 + 24) = 0;
  *(_DWORD *)(v2 + 28) = 0;
  v3 = (char *)((int (*)(void))v1->m_spEdit.m_pObject->vfptr[113].__vecDelDtor)();
  v4 = v1->m_acSearchName - v3;
  do
  {
    v5 = *v3;
    v3[v4] = *v3;
    ++v3;
  }
  while ( v5 );
  v6 = v1->m_iSearchTyepe;
  if ( v6 == 23 )
  {
    v11 = GTRequestListWin::GuildInfo::High_GuildName;
LABEL_8:
    boost::function<bool __cdecl (GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void>>::operator=<bool (__cdecl *)(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &)>(
      &v1->m_SortPradicationFunc,
      v11);
    goto LABEL_9;
  }
  if ( v6 == 24 )
  {
    v11 = GTRequestListWin::GuildInfo::High_GuildMasterName;
    goto LABEL_8;
  }
LABEL_9:
  v9 = 0;
  v10 = 0;
  v11 = 0;
  v12 = &v9;
  if ( v1->m_SortPradicationFunc.manager )
  {
    v11 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))v1->m_SortPradicationFunc.invoker;
    v9 = v1->m_SortPradicationFunc.manager;
    v10 = ((int (__cdecl *)(void *, _DWORD))v1->m_SortPradicationFunc.manager)(
            v1->m_SortPradicationFunc.functor.obj_ptr,
            0);
  }
  std::sort<std::_Vector_iterator<std::_Vector_val<GTRequestListWin::GuildInfo,std::allocator<GTRequestListWin::GuildInfo>>>,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(
    (std::_Vector_iterator<std::_Vector_val<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > >)v1->m_vecGuildInfo._Myfirst,
    (std::_Vector_iterator<std::_Vector_val<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > >)v1->m_vecGuildInfo._Mylast,
    *(boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *)&v9);
  v7 = v1->m_pkSlideBarGuild;
  v11 = 0;
  v1->m_bSearchStart = 1;
  SlideBar::SetSplitCnt(v7, (int)v11);
  v1->m_pkGuildLIst->m_nSlideSplitCnt = 0;
  v8 = v1->m_pkGuildLIst;
  v8->m_fCurSlideBtnPos = 0.0;
  v8->m_nViewStartPos = (signed int)((double)v8->m_nSlideSplitCnt * 0.0);
  v1->m_pkGuildLIst->m_nViewStartPos = 0;
  GuildListWin::DisplayInfoSetting(v1, 1);
}

//----- (0050F0A0) --------------------------------------------------------
void __thiscall GuildListWin::ShowFormerList(GuildListWin *this)
{
  void *v1; // eax@1
  GuildListWin *v2; // esi@1
  boost::detail::function::any_pointer (__cdecl *v3)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // ebx@1
  int (__cdecl *v4)(boost::detail::function::any_pointer, GuildListWin::GuildInfo *, GuildListWin::GuildInfo *); // ecx@1
  char *v5; // edi@1
  boost::detail::function::any_pointer (__cdecl *v6)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // edx@4
  void *v7; // edx@4
  boost::detail::function::any_pointer (__cdecl *v8)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp-Ch] [bp-28h]@7
  int v9; // [sp-8h] [bp-24h]@7
  bool (__cdecl *v10)(boost::detail::function::any_pointer, GuildListWin::GuildInfo *, GuildListWin::GuildInfo *); // [sp-4h] [bp-20h]@7
  char v11; // [sp+Ch] [bp-10h]@3
  int (__cdecl *v12)(boost::detail::function::any_pointer, GuildListWin::GuildInfo *, GuildListWin::GuildInfo *); // [sp+14h] [bp-8h]@2
  boost::detail::function::any_pointer (__cdecl **v13)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp+18h] [bp-4h]@7

  v1 = 0;
  v2 = this;
  this->m_bSearchStart = 0;
  *(_DWORD *)&this->m_acSearchName[0] = 0;
  *(_DWORD *)&this->m_acSearchName[4] = 0;
  *(_DWORD *)&this->m_acSearchName[8] = 0;
  *(_DWORD *)&this->m_acSearchName[12] = 0;
  *(_DWORD *)&this->m_acSearchName[16] = 0;
  *(_DWORD *)&this->m_acSearchName[20] = 0;
  v3 = 0;
  v4 = 0;
  *(_DWORD *)&v2->m_acSearchName[24] = 0;
  *(_DWORD *)&v2->m_acSearchName[28] = 0;
  v5 = (char *)&v2->m_SortPradicationFunc;
  if ( GTRequestListWin::GuildInfo::High_GuildName )
  {
    v12 = boost::detail::function::function_invoker2<bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),bool,GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &>::invoke;
    v3 = boost::detail::function::functor_manager<bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>::manage;
    v1 = boost::detail::function::functor_manager<bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>::manage(
           (boost::detail::function::any_pointer)GTRequestListWin::GuildInfo::High_GuildName,
           0).obj_ptr;
    v4 = boost::detail::function::function_invoker2<bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),bool,GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &>::invoke;
  }
  if ( v5 != &v11 )
  {
    v6 = v3;
    v3 = *(boost::detail::function::any_pointer (__cdecl **)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type))v5;
    *(_DWORD *)v5 = v6;
    v7 = v1;
    v1 = v2->m_SortPradicationFunc.functor.obj_ptr;
    v2->m_SortPradicationFunc.functor.obj_ptr = v7;
    v2->m_SortPradicationFunc.invoker = (bool (__cdecl *)(boost::detail::function::any_pointer, GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))v4;
  }
  if ( v3 )
    ((void (__cdecl *)(void *, signed int))v3)(v1, 1);
  v8 = 0;
  v9 = 0;
  v10 = 0;
  v13 = &v8;
  if ( *(_DWORD *)v5 )
  {
    v10 = v2->m_SortPradicationFunc.invoker;
    v8 = *(boost::detail::function::any_pointer (__cdecl **)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type))v5;
    v9 = (*(int (__cdecl **)(void *, _DWORD))v5)(v2->m_SortPradicationFunc.functor.obj_ptr, 0);
  }
  std::sort<std::_Vector_iterator<std::_Vector_val<GTRequestListWin::GuildInfo,std::allocator<GTRequestListWin::GuildInfo>>>,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(
    (std::_Vector_iterator<std::_Vector_val<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > >)v2->m_vecGuildInfo._Myfirst,
    (std::_Vector_iterator<std::_Vector_val<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > >)v2->m_vecGuildInfo._Mylast,
    *(boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *)&v8);
  GuildListWin::DisplayInfoSetting(v2, 0);
}

//----- (0050F190) --------------------------------------------------------
char __thiscall GuildListWin::Create(GuildListWin *this, PgFrameWork *pkFrameWork)
{
  GuildListWin *v2; // esi@1
  char result; // al@6
  NiTexturePalette *v4; // ebx@7
  const char *v5; // eax@9
  PgSprData *v6; // eax@10
  NiNode *v7; // esi@11
  int v8; // ebx@16
  int v9; // edi@16
  NiSourceTexture *v10; // eax@16
  PgSprData *v11; // eax@17
  PgSprData *v12; // eax@21
  PgWinSpr *v13; // eax@21
  PgFont *v14; // eax@23
  PopupMenu *v15; // eax@23
  NiRefObjectVtbl *v16; // edx@23
  NiUnsharedGeometryGroup *v17; // eax@23
  PgSprData *v18; // eax@23
  SLWCreateInfo::Item *v19; // eax@23
  PopupMenu *v20; // eax@23
  PopupMenu *v21; // eax@23
  PopupMenu *v22; // eax@23
  PopupMenu *v23; // eax@23
  PopupMenu *v24; // eax@23
  PopupMenu *v25; // eax@23
  PopupMenu *v26; // eax@23
  PgSprData *v27; // eax@23
  SlideListWin *v28; // eax@23
  PgSprData *v29; // eax@23
  SlideBar *v30; // eax@23
  float v31; // ecx@23
  PopupMenu *v32; // eax@23
  PgFont *v33; // eax@23
  PopupMenu *v34; // eax@23
  NiRefObjectVtbl *v35; // edx@23
  NiUnsharedGeometryGroup *v36; // eax@23
  float v37; // ecx@23
  PopupMenu *v38; // eax@23
  PgFont *v39; // eax@23
  PopupMenu *v40; // eax@23
  NiRefObjectVtbl *v41; // edx@23
  NiUnsharedGeometryGroup *v42; // eax@23
  float v43; // ecx@23
  PopupMenu *v44; // eax@23
  PgFont *v45; // eax@23
  PopupMenu *v46; // eax@23
  NiRefObjectVtbl *v47; // edx@23
  NiUnsharedGeometryGroup *v48; // eax@23
  float v49; // ecx@23
  PopupMenu *v50; // eax@23
  PgFont *v51; // eax@23
  PopupMenu *v52; // eax@23
  NiRefObjectVtbl *v53; // edx@23
  NiUnsharedGeometryGroup *v54; // eax@23
  float v55; // ecx@23
  PopupMenu *v56; // eax@23
  PgFont *v57; // eax@23
  PopupMenu *v58; // eax@23
  NiRefObjectVtbl *v59; // edx@23
  NiUnsharedGeometryGroup *v60; // eax@23
  float v61; // ecx@23
  PopupMenu *v62; // eax@23
  PgFont *v63; // eax@23
  PopupMenu *v64; // eax@23
  NiRefObjectVtbl *v65; // edx@23
  NiUnsharedGeometryGroup *v66; // eax@23
  float v67; // ecx@23
  PopupMenu *v68; // eax@23
  PgFont *v69; // eax@23
  PgWinText *v70; // eax@23
  int v71; // eax@23
  PopupMenu *v72; // edx@23
  PgFont *v73; // eax@23
  PgWinText *v74; // eax@23
  NiUnsharedGeometryGroup *v75; // eax@23
  PgSprData *v76; // eax@23
  EditWin *v77; // eax@23
  NiSourceTexture *v78; // eax@23
  PopupMenuWin *v79; // eax@23
  char *v80; // eax@23
  char *v81; // eax@23
  int v82; // eax@23
  NiSourceTexture *v83; // edx@23
  PgFont *v84; // eax@23
  PgWinText *v85; // edi@23
  NiRefObjectVtbl *v86; // ebx@23
  NiUnsharedGeometryGroup *v87; // eax@23
  SLWCreateInfo kCreateInfo; // [sp+A4h] [bp-68h]@23
  unsigned int uiHeight; // [sp+C0h] [bp-4Ch]@21
  unsigned int uiWidth; // [sp+C4h] [bp-48h]@21
  NiSourceTexture *pkTexture; // [sp+C8h] [bp-44h]@1
  unsigned int v92; // [sp+CCh] [bp-40h]@23
  int uiTop; // [sp+D0h] [bp-3Ch]@10
  int uiLeft; // [sp+D4h] [bp-38h]@10
  NiPointer<NiNode> spNode; // [sp+D8h] [bp-34h]@1
  PopupMenu *pkMenu; // [sp+DCh] [bp-30h]@19
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+E0h] [bp-2Ch]@23
  int v98; // [sp+108h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v98 = 0;
  pkTexture = MenuTexMgr::GetTexture(4u);
  if ( !pkTexture )
  {
    v98 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( spNode.m_pObject )
        spNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spNode.m_pObject, 1u);
    }
    return 0;
  }
  v4 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildList.nif");
  PgUtil::LoadNodeNifFile(v5, &spNode, v4);
  if ( !spNode.m_pObject )
    return 0;
  v6 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v6, 0, pkFrameWork, "GuildListWin", 0) )
  {
    v8 = uiLeft;
    v9 = uiTop;
    v10 = MenuTexMgr::GetTexture(0x13u);
    if ( v10 )
      v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
    else
      v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v11, (PgWin *)&v2->vfptr, 0, 0);
    pkMenu = (PopupMenu *)PgSprData::Create(
                            (NiAVObject *)&spNode.m_pObject->vfptr,
                            "ClsNor",
                            &uiLeft,
                            &uiTop,
                            pkTexture);
    PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
    PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
    PgWinCloseBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkMenu, (PgWin *)&v2->vfptr);
    pkMenu = (PopupMenu *)MenuTexMgr::GetTexture(4u);
    if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
    {
      pkMenu = (PopupMenu *)PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "HelpLinkNor",
                              &uiLeft,
                              &uiTop,
                              (NiSourceTexture *)pkMenu);
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
      PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkMenu, (PgWin *)&v2->vfptr, 0x19u, 0, 0);
    }
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
    v13 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v12, (PgWin *)&v2->vfptr, 0, 0);
    v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
    if ( PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "WinTitle",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight) )
    {
      v14 = Font::Get(MAIN_MENU);
      v15 = (PopupMenu *)PgWinText::CreateWin(uiLeft, uiTop - v9, uiWidth, uiHeight, v14, (PgWin *)&v2->vfptr, 0, 0);
      v16 = v15->vfptr;
      pkMenu = v15;
      v16[122].__vecDelDtor((NiRefObject *)v15, 5u);
      ((void (__stdcall *)(struct D3DXCOLOR *))pkMenu->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
      v92 = (unsigned int)pkMenu->vfptr;
      v17 = TextData2::Get(0x2C5335A1u);
      (*(void (__thiscall **)(PopupMenu *, NiUnsharedGeometryGroup *))(v92 + 472))(pkMenu, v17);
      ((void (__stdcall *)(_DWORD))pkMenu->vfptr[60].__vecDelDtor)(0);
      v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, pkTexture);
      PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v18, (PgWin *)&v2->vfptr, 0, 0);
      kCreateInfo.m_arrItem._Myfirst = 0;
      kCreateInfo.m_arrItem._Mylast = 0;
      kCreateInfo.m_arrItem._Myend = 0;
      kCreateInfo.m_bMakeData = 0;
      kCreateInfo.m_nOffX = 0;
      kCreateInfo.m_nOffY = 0;
      LOBYTE(v98) = 1;
      v19 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
      pkMenu = (PopupMenu *)v19;
      v19->nItemType = 1;
      v19->pNode = spNode.m_pObject;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "ColumnBarNor");
      LOBYTE(v98) = 2;
      pkMenu = (PopupMenu *)((char *)pkMenu + 72);
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkMenu,
        &_Val);
      LOBYTE(v98) = 1;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "ColumnBarClick");
      LOBYTE(v98) = 3;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkMenu,
        &_Val);
      LOBYTE(v98) = 1;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "ColumnBarOver");
      LOBYTE(v98) = 4;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkMenu,
        &_Val);
      LOBYTE(v98) = 1;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      v20 = (PopupMenu *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkMenu = v20;
      v20->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column01");
      LOBYTE(v98) = 5;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkMenu->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v98) = 1;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      pkMenu->m_uiRefCount = (unsigned int)spNode.m_pObject;
      v21 = (PopupMenu *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkMenu = v21;
      v21->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column02");
      LOBYTE(v98) = 6;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkMenu->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v98) = 1;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      pkMenu->m_uiRefCount = (unsigned int)spNode.m_pObject;
      v22 = (PopupMenu *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkMenu = v22;
      v22->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column03");
      LOBYTE(v98) = 7;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkMenu->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v98) = 1;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      v23 = pkMenu;
      pkMenu->m_uiRefCount = (unsigned int)spNode.m_pObject;
      LOBYTE(v23->m_kLocal.m_Translate.x) = 1;
      v24 = (PopupMenu *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkMenu = v24;
      v24->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column04");
      LOBYTE(v98) = 8;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkMenu->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v98) = 1;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      pkMenu->m_uiRefCount = (unsigned int)spNode.m_pObject;
      v25 = (PopupMenu *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkMenu = v25;
      v25->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column05");
      LOBYTE(v98) = 9;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkMenu->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v98) = 1;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      pkMenu->m_uiRefCount = (unsigned int)spNode.m_pObject;
      v26 = (PopupMenu *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkMenu = v26;
      v26->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column06");
      LOBYTE(v98) = 10;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkMenu->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v98) = 1;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      pkMenu->m_uiRefCount = (unsigned int)spNode.m_pObject;
      kCreateInfo.m_nOffX = 6;
      kCreateInfo.m_nOffY = 0;
      SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
      v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SubText01", &uiLeft, &uiTop, pkTexture);
      v28 = SlideListWin::CreateWin(uiLeft - v8, uiTop - v9, v27, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 1);
      v2->m_pkGuildLIst = v28;
      SlideListWin::UpdateViewList(v28);
      v29 = PgSprData::Create(
              (NiAVObject *)&spNode.m_pObject->vfptr,
              "SlideBar_SlideBtnMiddle",
              &uiLeft,
              &uiTop,
              pkTexture);
      v30 = SlideBar::CreateWin(
              spNode.m_pObject,
              "SlideBar",
              "SlideBar_UpBtn",
              "SlideBar_DnBtn",
              v29,
              0,
              (PgWin *)&v2->vfptr);
      v2->m_pkSlideBarGuild = v30;
      v30->m_uiClickMsg = 13;
      v2->m_pkSlideBarGuild->m_eType = 1;
      pkMenu = (PopupMenu *)PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "Title01Nor",
                              &uiLeft,
                              &uiTop,
                              pkTexture);
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Title01Click");
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Title01Over");
      PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkMenu, (PgWin *)&v2->vfptr, 0xEu, 0, 0);
      v31 = pkMenu->m_kWorldBound.m_kCenter.x;
      v32 = *(PopupMenu **)(*(_DWORD *)LODWORD(v31) + 20);
      v92 = *(_DWORD *)(*(_DWORD *)LODWORD(v31) + 24);
      pkMenu = v32;
      v33 = Font::Get(MAIN_MENU);
      v34 = (PopupMenu *)PgWinText::CreateWin(
                           uiLeft - v8,
                           uiTop - v9 + 1,
                           (unsigned int)pkMenu,
                           v92,
                           v33,
                           (PgWin *)&v2->vfptr,
                           0,
                           0);
      v35 = v34->vfptr;
      pkMenu = v34;
      v35[122].__vecDelDtor((NiRefObject *)v34, 5u);
      v92 = (unsigned int)pkMenu->vfptr;
      v36 = TextData2::Get(0x26B17C8Fu);
      (*(void (__thiscall **)(PopupMenu *, NiUnsharedGeometryGroup *))(v92 + 472))(pkMenu, v36);
      ((void (__stdcall *)(_DWORD))pkMenu->vfptr[60].__vecDelDtor)(0);
      pkMenu = (PopupMenu *)PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "Title02Nor",
                              &uiLeft,
                              &uiTop,
                              pkTexture);
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Title02Click");
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Title02Over");
      PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkMenu, (PgWin *)&v2->vfptr, 0xFu, 0, 0);
      v37 = pkMenu->m_kWorldBound.m_kCenter.x;
      v38 = *(PopupMenu **)(*(_DWORD *)LODWORD(v37) + 20);
      v92 = *(_DWORD *)(*(_DWORD *)LODWORD(v37) + 24);
      pkMenu = v38;
      v39 = Font::Get(MAIN_MENU);
      v40 = (PopupMenu *)PgWinText::CreateWin(
                           uiLeft - v8,
                           uiTop - v9 + 1,
                           (unsigned int)pkMenu,
                           v92,
                           v39,
                           (PgWin *)&v2->vfptr,
                           0,
                           0);
      v41 = v40->vfptr;
      pkMenu = v40;
      v41[122].__vecDelDtor((NiRefObject *)v40, 5u);
      v92 = (unsigned int)pkMenu->vfptr;
      v42 = TextData2::Get(0xD90AE9EE);
      (*(void (__thiscall **)(_DWORD, _DWORD))(v92 + 472))(pkMenu, v42);
      ((void (__stdcall *)(_DWORD))pkMenu->vfptr[60].__vecDelDtor)(0);
      pkMenu = (PopupMenu *)PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "Title03Nor",
                              &uiLeft,
                              &uiTop,
                              pkTexture);
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Title03Click");
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Title03Over");
      PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkMenu, (PgWin *)&v2->vfptr, 0x10u, 0, 0);
      v43 = pkMenu->m_kWorldBound.m_kCenter.x;
      v44 = *(PopupMenu **)(*(_DWORD *)LODWORD(v43) + 20);
      v92 = *(_DWORD *)(*(_DWORD *)LODWORD(v43) + 24);
      pkMenu = v44;
      v45 = Font::Get(MAIN_MENU);
      v46 = (PopupMenu *)PgWinText::CreateWin(
                           uiLeft - v8,
                           uiTop - v9 + 1,
                           (unsigned int)pkMenu,
                           v92,
                           v45,
                           (PgWin *)&v2->vfptr,
                           0,
                           0);
      v47 = v46->vfptr;
      pkMenu = v46;
      v47[122].__vecDelDtor((NiRefObject *)v46, 5u);
      v92 = (unsigned int)pkMenu->vfptr;
      v48 = TextData2::Get(0xE012F32C);
      (*(void (__thiscall **)(_DWORD, _DWORD))(v92 + 472))(pkMenu, v48);
      ((void (__stdcall *)(_DWORD))pkMenu->vfptr[60].__vecDelDtor)(0);
      pkMenu = (PopupMenu *)PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "Title04Nor",
                              &uiLeft,
                              &uiTop,
                              pkTexture);
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Title04Click");
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Title04Over");
      PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkMenu, (PgWin *)&v2->vfptr, 0x11u, 0, 0);
      v49 = pkMenu->m_kWorldBound.m_kCenter.x;
      v50 = *(PopupMenu **)(*(_DWORD *)LODWORD(v49) + 20);
      v92 = *(_DWORD *)(*(_DWORD *)LODWORD(v49) + 24);
      pkMenu = v50;
      v51 = Font::Get(MAIN_MENU);
      v52 = (PopupMenu *)PgWinText::CreateWin(
                           uiLeft - v8,
                           uiTop - v9 + 1,
                           (unsigned int)pkMenu,
                           v92,
                           v51,
                           (PgWin *)&v2->vfptr,
                           0,
                           0);
      v53 = v52->vfptr;
      pkMenu = v52;
      v53[122].__vecDelDtor((NiRefObject *)v52, 5u);
      v92 = (unsigned int)pkMenu->vfptr;
      v54 = TextData2::Get(0x29633D92u);
      (*(void (__thiscall **)(_DWORD, _DWORD))(v92 + 472))(pkMenu, v54);
      ((void (__stdcall *)(_DWORD))pkMenu->vfptr[60].__vecDelDtor)(0);
      pkMenu = (PopupMenu *)PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "Title05Nor",
                              &uiLeft,
                              &uiTop,
                              pkTexture);
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Title05Click");
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Title05Over");
      PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkMenu, (PgWin *)&v2->vfptr, 0x12u, 0, 0);
      v55 = pkMenu->m_kWorldBound.m_kCenter.x;
      v56 = *(PopupMenu **)(*(_DWORD *)LODWORD(v55) + 20);
      v92 = *(_DWORD *)(*(_DWORD *)LODWORD(v55) + 24);
      pkMenu = v56;
      v57 = Font::Get(MAIN_MENU);
      v58 = (PopupMenu *)PgWinText::CreateWin(
                           uiLeft - v8,
                           uiTop - v9 + 1,
                           (unsigned int)pkMenu,
                           v92,
                           v57,
                           (PgWin *)&v2->vfptr,
                           0,
                           0);
      v59 = v58->vfptr;
      pkMenu = v58;
      v59[122].__vecDelDtor((NiRefObject *)v58, 5u);
      v92 = (unsigned int)pkMenu->vfptr;
      v60 = TextData::Get(0x88C9DFD4);
      (*(void (__thiscall **)(_DWORD, _DWORD))(v92 + 472))(pkMenu, v60);
      ((void (__stdcall *)(_DWORD))pkMenu->vfptr[60].__vecDelDtor)(0);
      pkMenu = (PopupMenu *)PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "Title06Nor",
                              &uiLeft,
                              &uiTop,
                              pkTexture);
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Title06Click");
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Title06Over");
      PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkMenu, (PgWin *)&v2->vfptr, 0x13u, 0, 0);
      v61 = pkMenu->m_kWorldBound.m_kCenter.x;
      v62 = *(PopupMenu **)(*(_DWORD *)LODWORD(v61) + 20);
      v92 = *(_DWORD *)(*(_DWORD *)LODWORD(v61) + 24);
      pkMenu = v62;
      v63 = Font::Get(MAIN_MENU);
      v64 = (PopupMenu *)PgWinText::CreateWin(
                           uiLeft - v8,
                           uiTop - v9 + 1,
                           (unsigned int)pkMenu,
                           v92,
                           v63,
                           (PgWin *)&v2->vfptr,
                           0,
                           0);
      v65 = v64->vfptr;
      pkMenu = v64;
      v65[122].__vecDelDtor((NiRefObject *)v64, 5u);
      v92 = (unsigned int)pkMenu->vfptr;
      v66 = TextData2::Get(0xBFFAD625);
      (*(void (__thiscall **)(_DWORD, _DWORD))(v92 + 472))(pkMenu, v66);
      ((void (__stdcall *)(_DWORD))pkMenu->vfptr[60].__vecDelDtor)(0);
      pkMenu = (PopupMenu *)PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "Count_total",
                              &uiLeft,
                              &uiTop,
                              pkTexture);
      PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkMenu, (PgWin *)&v2->vfptr, 0, 0);
      v67 = pkMenu->m_kWorldBound.m_kCenter.x;
      v68 = *(PopupMenu **)(*(_DWORD *)LODWORD(v67) + 20);
      v92 = *(_DWORD *)(*(_DWORD *)LODWORD(v67) + 24);
      pkMenu = v68;
      v69 = Font::Get(MAIN_MENU);
      v70 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9 + 1, (unsigned int)pkMenu, v92, v69, (PgWin *)&v2->vfptr, 0, 0);
      v2->m_pkTotalGuildNum = v70;
      v70->vfptr[122].__vecDelDtor((NiRefObject *)v70, 5u);
      ((void (__stdcall *)(void *))v2->m_pkTotalGuildNum->vfptr[118].__vecDelDtor)(&unk_98CA0B);
      ((void (__stdcall *)(_DWORD))v2->m_pkTotalGuildNum->vfptr[60].__vecDelDtor)(0);
      pkMenu = (PopupMenu *)PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "SearchChoiceNor",
                              &uiLeft,
                              &uiTop,
                              pkTexture);
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "SearchChoiceClick");
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "SearchChoiceOver");
      PgWinBut::CreateWin(uiLeft, uiTop, (PgSprData *)pkMenu, (PgWin *)&v2->vfptr, 0x14u, 0, 0);
      v71 = *(_DWORD *)LODWORD(pkMenu->m_kWorldBound.m_kCenter.x);
      v72 = *(PopupMenu **)(v71 + 20);
      v92 = *(_DWORD *)(v71 + 24);
      pkMenu = v72;
      v73 = Font::Get(0);
      v74 = PgWinText::CreateWin(uiLeft, uiTop + 1, (unsigned int)pkMenu, v92, v73, (PgWin *)&v2->vfptr, 0, 0);
      v2->m_pkSearchType = v74;
      v74->vfptr[122].__vecDelDtor((NiRefObject *)v74, 5u);
      v92 = (unsigned int)v2->m_pkSearchType->vfptr;
      v75 = TextData2::Get(0xD90AE9EE);
      (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v92 + 472))(v2->m_pkSearchType, v75);
      ((void (__stdcall *)(_DWORD))v2->m_pkSearchType->vfptr[60].__vecDelDtor)(0);
      v76 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Search_Input", &uiLeft, &uiTop, pkTexture);
      PgWinSpr::CreateWin(uiLeft, uiTop, v76, (PgWin *)&v2->vfptr, 0, 0);
      v77 = EditWin::CreateWin(uiLeft, uiTop + 2, uiWidth, uiHeight, (PgWin *)&v2->vfptr, NORMAL, 0x10u, 1u, 1, 0, 1);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spEdit, (NiD3DDefaultShader *)v77);
      EditWin::SetImeStatus(v2->m_spEdit.m_pObject, IS_KOREAN);
      pkMenu = (PopupMenu *)PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "SearchNor",
                              &uiLeft,
                              &uiTop,
                              pkTexture);
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "SearchClick");
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "SearchOver");
      PgWinBut::CreateWin(uiLeft, uiTop, (PgSprData *)pkMenu, (PgWin *)&v2->vfptr, 0x15u, 0, 0);
      v78 = MenuTexMgr::GetTexture(1u);
      v79 = PopupMenuWin::CreateWin(v78, 4u, 4u, 0);
      v2->m_spPopupMenu = v79;
      ((void (__stdcall *)(IDirectMessengerVtbl **))v79->vfptr->SetMsgHooker)(&v2->vfptr);
      PopupMenuWin::Clear(v2->m_spPopupMenu);
      v80 = (char *)TextData2::Get(0xD90AE9EE);
      pkMenu = (PopupMenu *)PopupMenuText::CreateWin(v80, 0, 0, 0, 0, 0, 0);
      PopupMenu::SetClickEvent(pkMenu, 74, 0);
      PopupMenuWin::AddMenu(v2->m_spPopupMenu, v9, pkMenu);
      v81 = (char *)TextData2::Get(0xE012F32C);
      pkMenu = (PopupMenu *)PopupMenuText::CreateWin(v81, 0, 0, 0, 0, 0, 0);
      PopupMenu::SetClickEvent(pkMenu, 75, 0);
      PopupMenuWin::AddMenu(v2->m_spPopupMenu, v9, pkMenu);
      PopupMenuWin::FinishMenu(v2->m_spPopupMenu, 0);
      ((void (__stdcall *)(_DWORD))v2->m_spPopupMenu->vfptr[64].__vecDelDtor)(0);
      pkMenu = (PopupMenu *)PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "Btn01Nor",
                              &uiLeft,
                              &uiTop,
                              pkTexture);
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
      PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkMenu, (PgWin *)&v2->vfptr, 0x16u, 0, 0);
      v82 = *(_DWORD *)LODWORD(pkMenu->m_kWorldBound.m_kCenter.x);
      v83 = *(NiSourceTexture **)(v82 + 20);
      v92 = *(_DWORD *)(v82 + 24);
      pkTexture = v83;
      v84 = Font::Get(MAIN_MENU);
      v85 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9, (unsigned int)pkTexture, v92, v84, (PgWin *)&v2->vfptr, 0, 0);
      v85->vfptr[122].__vecDelDtor((NiRefObject *)v85, 5u);
      v86 = v85->vfptr;
      v87 = TextData2::Get(0x4A8E7A8Au);
      v86[118].__vecDelDtor((NiRefObject *)v85, (unsigned int)v87);
      v85->vfptr[60].__vecDelDtor((NiRefObject *)v85, 0);
      ((void (__thiscall *)(GuildListWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
        v2,
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        0.5,
        0.5);
      LOBYTE(v98) = 0;
      SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
      v98 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 1;
    }
    else
    {
      v98 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 0;
    }
  }
  else
  {
    v7 = spNode.m_pObject;
    v98 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00510200) --------------------------------------------------------
void __thiscall GuildListWin::OnCommand(GuildListWin *this, unsigned int wParam, int lParam)
{
  GuildListWin *v3; // esi@1
  SlideListWin *v4; // edi@25
  boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > v5; // [sp-Ch] [bp-14h]@7
  bool (__cdecl *v6)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *); // [sp-4h] [bp-Ch]@3

  v3 = this;
  switch ( wParam )
  {
    case 0xBu:
      GuildListWin::OnPrevPage(this);
      return;
    case 0xCu:
      v6 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))(this->m_GuildIndex + 22);
      GuildListTask::OnNCGuildListReq();
      return;
    case 0xDu:
      GuildListWin::OnSlideBar(this);
      return;
    case 0xFu:
      if ( bSGuildName )
      {
        bSGuildName = 0;
        v6 = GuildListWin::GuildInfo::Low_GuildName;
      }
      else
      {
        bSGuildName = 1;
        v6 = GTRequestListWin::GuildInfo::High_GuildName;
      }
      goto LABEL_7;
    case 0x10u:
      if ( bSMasterName )
      {
        bSMasterName = 0;
        v6 = GTRequestListWin::GuildInfo::Low_GuildMasterName;
      }
      else
      {
        bSMasterName = 1;
        v6 = GTRequestListWin::GuildInfo::High_GuildMasterName;
      }
      goto LABEL_7;
    case 0x11u:
      if ( bSGuildType )
      {
        bSGuildType = 0;
        v6 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))GuildListWin::GuildInfo::Low_GuildType;
      }
      else
      {
        bSGuildType = 1;
        v6 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))GuildListWin::GuildInfo::High_GuildType;
      }
      goto LABEL_7;
    case 0x12u:
      if ( bSGuildGrade )
      {
        bSGuildGrade = 0;
        v6 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))GuildListWin::GuildInfo::Low_GuildGrade;
      }
      else
      {
        bSGuildGrade = 1;
        v6 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))GTRequestListWin::GuildInfo::High_GuildGrade;
      }
      goto LABEL_7;
    case 0x13u:
      if ( bSTotalMember )
      {
        bSTotalMember = 0;
        v6 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))GTRequestListWin::GuildInfo::Low_GuildTotalMember;
      }
      else
      {
        bSTotalMember = 1;
        v6 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))GTRequestListWin::GuildInfo::High_GuildTotalMember;
      }
LABEL_7:
      boost::function<bool __cdecl (GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void>>::operator=<bool (__cdecl *)(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &)>(
        &this->m_SortPradicationFunc,
        v6);
      boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>(
        &v5,
        &v3->m_SortPradicationFunc);
      std::sort<std::_Vector_iterator<std::_Vector_val<GTRequestListWin::GuildInfo,std::allocator<GTRequestListWin::GuildInfo>>>,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(
        (std::_Vector_iterator<std::_Vector_val<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > >)v3->m_vecGuildInfo._Myfirst,
        (std::_Vector_iterator<std::_Vector_val<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > >)v3->m_vecGuildInfo._Mylast,
        v5);
      if ( v3->m_bSearchStart )
        GuildListWin::DisplayInfoSetting(v3, 1);
      else
        GuildListWin::DisplayInfoSetting(v3, 0);
      break;
    case 0x14u:
      GuildListWin::OnSearchChoice(this);
      break;
    case 0x15u:
      GuildListWin::OnSearch(this);
      break;
    case 0x16u:
      this->m_bSearchStart = 0;
      *(_DWORD *)&this->m_acSearchName[0] = 0;
      *(_DWORD *)&this->m_acSearchName[4] = 0;
      *(_DWORD *)&this->m_acSearchName[8] = 0;
      *(_DWORD *)&this->m_acSearchName[12] = 0;
      *(_DWORD *)&this->m_acSearchName[16] = 0;
      *(_DWORD *)&this->m_acSearchName[20] = 0;
      *(_DWORD *)&this->m_acSearchName[24] = 0;
      *(_DWORD *)&this->m_acSearchName[28] = 0;
      SlideBar::SetSplitCnt(this->m_pkSlideBarGuild, 0);
      v3->m_pkGuildLIst->m_nSlideSplitCnt = 0;
      v4 = v3->m_pkGuildLIst;
      v4->m_fCurSlideBtnPos = 0.0;
      v4->m_nViewStartPos = (signed int)((double)v4->m_nSlideSplitCnt * 0.0);
      v3->m_pkGuildLIst->m_nViewStartPos = 0;
      GuildListWin::ShowFormerList(v3);
      break;
    case 0x19u:
      GuildListWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (00510470) --------------------------------------------------------
void __thiscall GuildListWin::OnEditEnd(GuildListWin *this, unsigned int wParam, int lParam)
{
  GuildListWin *v3; // esi@1
  EditWin *v4; // edi@1
  NiRefObjectVtbl *v5; // ebx@1
  int v6; // eax@1

  v3 = this;
  v4 = this->m_spEdit.m_pObject;
  v5 = v4->vfptr;
  v6 = ((int (__thiscall *)(_DWORD))v4->vfptr[114].__vecDelDtor)(this->m_spEdit.m_pObject);
  v5[115].__vecDelDtor((NiRefObject *)v4, v6);
  ((void (*)(void))v3->m_spEdit.m_pObject->vfptr[120].__vecDelDtor)();
  GuildListWin::OnSearch(v3);
}

//----- (005104B0) --------------------------------------------------------
void __thiscall boost::bad_function_call::bad_function_call(boost::bad_function_call *this, boost::bad_function_call *__that)
{
  boost::bad_function_call *v2; // esi@1

  v2 = this;
  std::exception::exception((std::exception *)&this->vfptr, (std::exception *)&__that->vfptr);
  v2->vfptr = (std::exceptionVtbl *)&boost::bad_function_call::`vftable';
}
// 98CD40: using guessed type int (__thiscall *boost::bad_function_call::`vftable')(void *p, char);

//----- (005104D0) --------------------------------------------------------
RaidMemberInfo *__stdcall std::allocator<GuildAcademySelectWin::GuildInfo>::allocate(unsigned int _Count)
{
  RaidMemberInfo *result; // eax@1
  std::exception pExceptionObject; // [sp+0h] [bp-Ch]@4

  result = 0;
  if ( _Count )
  {
    if ( _Count > 0x3C3C3C3 || (result = (RaidMemberInfo *)operator new(68 * _Count)) == 0 )
    {
      _Count = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&_Count);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
  }
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00510530) --------------------------------------------------------
void __cdecl __noreturn boost::throw_exception<boost::bad_function_call>(boost::bad_function_call *e)
{
  std::exception pExceptionObject; // [sp+0h] [bp-Ch]@1

  std::exception::exception(&pExceptionObject, (std::exception *)&e->vfptr);
  pExceptionObject.vfptr = (std::exceptionVtbl *)&boost::bad_function_call::`vftable';
  _CxxThrowException(&pExceptionObject, &_TI3_AVbad_function_call_boost__);
}
// 98CD40: using guessed type int (__thiscall *boost::bad_function_call::`vftable')(void *p, char);

//----- (00510560) --------------------------------------------------------
void __cdecl std::_Push_heap<GTRequestListWin::GuildInfo *,int,GTRequestListWin::GuildInfo,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(GuildListWin::GuildInfo *_First, int _Hole, int _Top, GuildListWin::GuildInfo *_Val, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > _Pred)
{
  int v5; // edi@1
  int v6; // ebx@1
  GuildListWin::GuildInfo *v7; // esi@3
  GuildListWin::GuildInfo *v8; // edi@4
  int v9; // eax@5
  GuildListWin::GuildInfo *v10; // edi@5
  GuildListWin::GuildInfo *v11; // esi@5
  boost::detail::function::any_pointer (__cdecl *v12)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // eax@5
  std::exception v13; // [sp+10h] [bp-18h]@8
  int i; // [sp+24h] [bp-4h]@1

  v5 = _Hole;
  v6 = (_Hole - 1) / 2;
  for ( i = 0; _Top < v5; v6 = (v6 - 1) / 2 )
  {
    if ( !_Pred.manager )
    {
      _Hole = (int)"call to empty boost::function";
      std::exception::exception(&v13, (const char *const *)&_Hole);
      v13.vfptr = (std::exceptionVtbl *)&boost::bad_function_call::`vftable';
      LOBYTE(i) = 1;
      boost::throw_exception<boost::bad_function_call>((boost::bad_function_call *)&v13);
    }
    v7 = &_First[v6];
    if ( !(unsigned __int8)((int (__cdecl *)(void *, GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))_Pred.invoker)(
                             _Pred.functor.obj_ptr,
                             &_First[v6],
                             _Val) )
      break;
    v8 = &_First[v5];
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v8->m_strGuildName,
      &v7->m_strGuildName,
      0,
      0xFFFFFFFF);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v8->m_MasterName,
      &v7->m_MasterName,
      0,
      0xFFFFFFFF);
    v8->m_unGuildType = v7->m_unGuildType;
    v8->m_unGuildGrade = v7->m_unGuildGrade;
    v8->m_unGuildTotalMember = v7->m_unGuildTotalMember;
    v5 = v6;
  }
  v9 = 17 * v5;
  v10 = _Val;
  v11 = &_First[4 * v9 / 0x44u];
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_First[4 * v9 / 0x44u].m_strGuildName,
    &_Val->m_strGuildName,
    0,
    0xFFFFFFFF);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &v11->m_MasterName,
    &v10->m_MasterName,
    0,
    0xFFFFFFFF);
  v11->m_unGuildType = v10->m_unGuildType;
  v12 = _Pred.manager;
  v11->m_unGuildGrade = v10->m_unGuildGrade;
  v11->m_unGuildTotalMember = v10->m_unGuildTotalMember;
  i = -1;
  if ( v12 )
    ((void (__cdecl *)(void *, signed int))v12)(_Pred.functor.obj_ptr, 1);
}
// 98CD40: using guessed type int (__thiscall *boost::bad_function_call::`vftable')(void *p, char);

//----- (005106B0) --------------------------------------------------------
GuildListWin::GuildInfo *__cdecl std::_Uninit_move<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::GuildInfo *,std::allocator<GuildAcademySelectWin::GuildInfo>,GuildAcademySelectWin::GuildInfo>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, GuildListWin::GuildInfo *_Dest)
{
  GuildListWin::GuildInfo *v3; // esi@1
  GuildListWin::GuildInfo *v4; // edi@1
  int v5; // ecx@4
  int v7; // [sp+0h] [bp-24h]@1
  GuildListWin::GuildInfo *_Next; // [sp+10h] [bp-14h]@1
  int *v9; // [sp+14h] [bp-10h]@1
  int v10; // [sp+20h] [bp-4h]@1

  v9 = &v7;
  v3 = _Dest;
  v4 = _First;
  _Next = _Dest;
  v10 = 0;
  while ( v4 != _Last )
  {
    LOBYTE(v10) = 1;
    if ( v3 )
    {
      v3->m_strGuildName._Myres = 15;
      v3->m_strGuildName._Mysize = 0;
      v3->m_strGuildName._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v3->m_strGuildName,
        &v4->m_strGuildName,
        0,
        0xFFFFFFFF);
      v5 = (int)&v3->m_MasterName;
      *(_DWORD *)(v5 + 20) = 15;
      *(_DWORD *)(v5 + 16) = 0;
      LOBYTE(v10) = 2;
      *(_BYTE *)v5 = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v3->m_MasterName,
        &v4->m_MasterName,
        0,
        0xFFFFFFFF);
      v3->m_unGuildType = v4->m_unGuildType;
      v3->m_unGuildGrade = v4->m_unGuildGrade;
      v3->m_unGuildTotalMember = v4->m_unGuildTotalMember;
    }
    ++v3;
    LOBYTE(v10) = 0;
    ++v4;
  }
  return v3;
}

//----- (005107A0) --------------------------------------------------------
void __cdecl std::_Med3<GTRequestListWin::GuildInfo *,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Mid, GuildListWin::GuildInfo *_Last, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > _Pred)
{
  std::exception v4; // [sp+10h] [bp-1Ch]@2
  char *_What; // [sp+1Ch] [bp-10h]@2
  int v6; // [sp+28h] [bp-4h]@1

  v6 = 0;
  if ( !_Pred.manager )
  {
    _What = "call to empty boost::function";
    std::exception::exception(&v4, (const char *const *)&_What);
    v4.vfptr = (std::exceptionVtbl *)&boost::bad_function_call::`vftable';
    LOBYTE(v6) = 1;
    boost::throw_exception<boost::bad_function_call>((boost::bad_function_call *)&v4);
  }
  if ( (unsigned __int8)((int (__cdecl *)(void *, GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))_Pred.invoker)(
                          _Pred.functor.obj_ptr,
                          _Mid,
                          _First) )
    std::swap<GTRequestListWin::GuildInfo>(_Mid, _First);
  if ( !_Pred.manager )
  {
    _What = "call to empty boost::function";
    std::exception::exception(&v4, (const char *const *)&_What);
    v4.vfptr = (std::exceptionVtbl *)&boost::bad_function_call::`vftable';
    LOBYTE(v6) = 2;
    boost::throw_exception<boost::bad_function_call>((boost::bad_function_call *)&v4);
  }
  if ( (unsigned __int8)((int (__cdecl *)(void *, GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))_Pred.invoker)(
                          _Pred.functor.obj_ptr,
                          _Last,
                          _Mid) )
    std::swap<GTRequestListWin::GuildInfo>(_Last, _Mid);
  if ( !_Pred.manager )
  {
    _What = "call to empty boost::function";
    std::exception::exception(&v4, (const char *const *)&_What);
    v4.vfptr = (std::exceptionVtbl *)&boost::bad_function_call::`vftable';
    LOBYTE(v6) = 3;
    boost::throw_exception<boost::bad_function_call>((boost::bad_function_call *)&v4);
  }
  if ( (unsigned __int8)((int (__cdecl *)(_DWORD, _DWORD, _DWORD))_Pred.invoker)(_Pred.functor.obj_ptr, _Mid, _First) )
    std::swap<GTRequestListWin::GuildInfo>(_Mid, _First);
  v6 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}
// 98CD40: using guessed type int (__thiscall *boost::bad_function_call::`vftable')(void *p, char);

//----- (005108E0) --------------------------------------------------------
void __cdecl std::_Adjust_heap<GTRequestListWin::GuildInfo *,int,GTRequestListWin::GuildInfo,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(GuildListWin::GuildInfo *_First, int _Hole, int _Bottom, GuildListWin::GuildInfo *_Val, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > _Pred)
{
  int v5; // ebx@1
  int v6; // edi@1
  int v7; // esi@1
  bool v8; // zf@1
  GuildListWin::GuildInfo *v9; // edi@5
  GuildListWin::GuildInfo *v10; // ebx@5
  GuildListWin::GuildInfo *v11; // esi@8
  GuildListWin::GuildInfo *v12; // ebx@8
  boost::detail::function::any_pointer (__cdecl *v13)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp-Ch] [bp-38h]@9
  int v14; // [sp-8h] [bp-34h]@9
  bool (__cdecl *v15)(boost::detail::function::any_pointer, GuildListWin::GuildInfo *, GuildListWin::GuildInfo *); // [sp-4h] [bp-30h]@9
  std::exception v16; // [sp+10h] [bp-1Ch]@14
  int _Top; // [sp+1Ch] [bp-10h]@1
  int v18; // [sp+28h] [bp-4h]@1

  v5 = _Hole;
  v6 = _Bottom;
  v7 = 2 * _Hole + 2;
  v18 = 0;
  _Top = _Hole;
  v8 = v7 == _Bottom;
  if ( v7 < _Bottom )
  {
    do
    {
      if ( !_Pred.manager )
      {
        _Hole = (int)"call to empty boost::function";
        std::exception::exception(&v16, (const char *const *)&_Hole);
        v16.vfptr = (std::exceptionVtbl *)&boost::bad_function_call::`vftable';
        LOBYTE(v18) = 1;
        boost::throw_exception<boost::bad_function_call>((boost::bad_function_call *)&v16);
      }
      if ( (unsigned __int8)((int (__cdecl *)(void *, GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))_Pred.invoker)(
                              _Pred.functor.obj_ptr,
                              &_First[v7],
                              &_First[v7 - 1]) )
        --v7;
      v9 = &_First[v7];
      v10 = &_First[v5];
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v10->m_strGuildName,
        &v9->m_strGuildName,
        0,
        0xFFFFFFFF);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v10->m_MasterName,
        &v9->m_MasterName,
        0,
        0xFFFFFFFF);
      v10->m_unGuildType = v9->m_unGuildType;
      v10->m_unGuildGrade = v9->m_unGuildGrade;
      v10->m_unGuildTotalMember = v9->m_unGuildTotalMember;
      v5 = v7;
      v7 = 2 * v7 + 2;
    }
    while ( v7 < _Bottom );
    v6 = _Bottom;
    v8 = v7 == _Bottom;
  }
  if ( v8 )
  {
    v11 = &_First[v6 - 1];
    v12 = &_First[v5];
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v12->m_strGuildName,
      &v11->m_strGuildName,
      0,
      0xFFFFFFFF);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v12->m_MasterName,
      &v11->m_MasterName,
      0,
      0xFFFFFFFF);
    v12->m_unGuildType = v11->m_unGuildType;
    v12->m_unGuildGrade = v11->m_unGuildGrade;
    v12->m_unGuildTotalMember = v11->m_unGuildTotalMember;
    v5 = v6 - 1;
  }
  v13 = 0;
  v14 = 0;
  v15 = 0;
  _Bottom = (int)&v13;
  if ( _Pred.manager )
  {
    v15 = _Pred.invoker;
    v13 = _Pred.manager;
    v14 = ((int (__cdecl *)(void *, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
  }
  std::_Push_heap<GTRequestListWin::GuildInfo *,int,GTRequestListWin::GuildInfo,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(
    _First,
    v5,
    _Top,
    _Val,
    *(boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *)&v13);
  v18 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}
// 98CD40: using guessed type int (__thiscall *boost::bad_function_call::`vftable')(void *p, char);

//----- (00510A90) --------------------------------------------------------
void __cdecl std::_Pop_heap<GTRequestListWin::GuildInfo *,int,GTRequestListWin::GuildInfo,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, GuildListWin::GuildInfo *_Dest, GuildListWin::GuildInfo *_Val, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > _Pred)
{
  boost::detail::function::any_pointer (__cdecl *v5)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp-Ch] [bp-24h]@1
  int v6; // [sp-8h] [bp-20h]@1
  bool (__cdecl *v7)(boost::detail::function::any_pointer, GuildListWin::GuildInfo *, GuildListWin::GuildInfo *); // [sp-4h] [bp-1Ch]@1
  int v8; // [sp+14h] [bp-4h]@1

  v8 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_Dest->m_strGuildName,
    &_First->m_strGuildName,
    0,
    0xFFFFFFFF);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_Dest->m_MasterName,
    &_First->m_MasterName,
    0,
    0xFFFFFFFF);
  _Dest->m_unGuildType = _First->m_unGuildType;
  _Dest->m_unGuildGrade = _First->m_unGuildGrade;
  _Dest->m_unGuildTotalMember = _First->m_unGuildTotalMember;
  v5 = 0;
  v6 = 0;
  v7 = 0;
  if ( _Pred.manager )
  {
    v7 = _Pred.invoker;
    v5 = _Pred.manager;
    v6 = ((int (__cdecl *)(void *, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
  }
  std::_Adjust_heap<GTRequestListWin::GuildInfo *,int,GTRequestListWin::GuildInfo,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(
    _First,
    0,
    _Last - _First,
    _Val,
    *(boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *)&v5);
  v8 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}

//----- (00510B80) --------------------------------------------------------
#error "510D4E: positive sp value has been found (funcsize=183)"

//----- (00510D50) --------------------------------------------------------
void __cdecl std::_Pop_heap_0<GuildListWin::GuildInfo *,GuildListWin::GuildInfo,boost::function<bool __cdecl (GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void>>>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > _Pred)
{
  boost::detail::function::any_pointer (__cdecl *v3)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp-10h] [bp-7Ch]@1
  int v4; // [sp-Ch] [bp-78h]@1
  bool (__cdecl *v5)(boost::detail::function::any_pointer, GuildListWin::GuildInfo *, GuildListWin::GuildInfo *); // [sp-8h] [bp-74h]@1
  int v6; // [sp-4h] [bp-70h]@1
  boost::detail::function::any_pointer (__cdecl **v7)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp+10h] [bp-5Ch]@1
  GuildListWin::GuildInfo *v8; // [sp+14h] [bp-58h]@1
  GuildListWin::GuildInfo _Val; // [sp+18h] [bp-54h]@1
  int v10; // [sp+68h] [bp-4h]@1

  v8 = _First;
  v10 = 0;
  GuildListWin::GuildInfo::GuildInfo(&_Val, _Last - 1);
  v6 = 0;
  v3 = 0;
  v4 = 0;
  v5 = 0;
  LOBYTE(v10) = 1;
  v7 = &v3;
  if ( _Pred.manager )
  {
    v5 = _Pred.invoker;
    v3 = _Pred.manager;
    v4 = ((int (__cdecl *)(void *, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
  }
  std::_Pop_heap<GTRequestListWin::GuildInfo *,int,GTRequestListWin::GuildInfo,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(
    v8,
    _Last - 1,
    _Last - 1,
    &_Val,
    *(boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *)&v3);
  if ( _Val.m_MasterName._Myres >= 0x10 )
    operator delete(_Val.m_MasterName._Bx._Ptr);
  _Val.m_MasterName._Myres = 15;
  _Val.m_MasterName._Mysize = 0;
  _Val.m_MasterName._Bx._Buf[0] = 0;
  if ( _Val.m_strGuildName._Myres >= 0x10 )
    operator delete(_Val.m_strGuildName._Bx._Ptr);
  _Val.m_strGuildName._Myres = 15;
  _Val.m_strGuildName._Mysize = 0;
  _Val.m_strGuildName._Bx._Buf[0] = 0;
  v10 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}

//----- (00510E50) --------------------------------------------------------
#error "51123A: positive sp value has been found (funcsize=334)"

//----- (00511240) --------------------------------------------------------
void __thiscall std::vector<GTRequestListWin::GuildInfo,std::allocator<GTRequestListWin::GuildInfo>>::reserve(std::vector<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > *this, unsigned int _Count)
{
  std::vector<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > *v2; // esi@1
  RaidMemberInfo *v3; // eax@4
  GuildListWin::GuildInfo *v4; // ST04_4@4
  GuildListWin::GuildInfo *v5; // ST00_4@4
  unsigned int v6; // edx@4
  int v7; // edi@4
  GuildListWin::GuildInfo *v8; // eax@6
  int v9; // [sp+0h] [bp-24h]@1
  GuildListWin::GuildInfo *_Ptr; // [sp+10h] [bp-14h]@4
  int *v11; // [sp+14h] [bp-10h]@1
  int v12; // [sp+20h] [bp-4h]@4

  v11 = &v9;
  v2 = this;
  if ( _Count > 0x3C3C3C3 )
    std::_Xlength_error("vector<T> too long");
  if ( this->_Myend - this->_Myfirst < _Count )
  {
    v3 = std::allocator<GuildAcademySelectWin::GuildInfo>::allocate(_Count);
    v4 = v2->_Mylast;
    v5 = v2->_Myfirst;
    _Ptr = (GuildListWin::GuildInfo *)v3;
    v12 = 0;
    std::_Uninit_move<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::GuildInfo *,std::allocator<GuildAcademySelectWin::GuildInfo>,GuildAcademySelectWin::GuildInfo>(
      v5,
      v4,
      (GuildListWin::GuildInfo *)v3);
    v6 = (signed int)((unsigned __int64)(2021161081i64 * (unsigned int)((char *)v2->_Mylast - (char *)v2->_Myfirst)) >> 32) >> 5;
    v7 = v6 + (v6 >> 31);
    if ( v2->_Myfirst )
    {
      std::_Destroy_range<std::allocator<GTRequestListWin::GuildInfo>>(v2->_Myfirst, v2->_Mylast);
      operator delete(v2->_Myfirst);
    }
    v8 = _Ptr;
    v2->_Myend = &_Ptr[_Count];
    v2->_Mylast = &v8[v7];
    v2->_Myfirst = v8;
  }
}

//----- (00511360) --------------------------------------------------------
void __cdecl std::_Sort_heap<GTRequestListWin::GuildInfo *,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > _Pred)
{
  int v3; // ebx@3
  boost::detail::function::any_pointer (__cdecl *v4)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // edi@3
  unsigned int v5; // edx@9
  boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > v6; // [sp-10h] [bp-40h]@5
  int v7; // [sp-Ch] [bp-3Ch]@5
  bool (__cdecl *v8)(boost::detail::function::any_pointer, GuildListWin::GuildInfo *, GuildListWin::GuildInfo *); // [sp-8h] [bp-38h]@5
  int v9; // [sp-4h] [bp-34h]@5
  boost::detail::function::any_pointer (__cdecl *v10)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp+10h] [bp-20h]@3
  int v11; // [sp+14h] [bp-1Ch]@3
  bool (__cdecl *v12)(boost::detail::function::any_pointer, GuildListWin::GuildInfo *, GuildListWin::GuildInfo *); // [sp+18h] [bp-18h]@3
  boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *v13; // [sp+1Ch] [bp-14h]@5
  int v14; // [sp+20h] [bp-10h]@2
  int v15; // [sp+2Ch] [bp-4h]@1

  v15 = 0;
  if ( _Last - _First > 1 )
  {
    v14 = (char *)_Last - (char *)_First;
    do
    {
      v3 = 0;
      v4 = 0;
      v10 = 0;
      v11 = 0;
      v12 = 0;
      if ( _Pred.manager )
      {
        v4 = _Pred.manager;
        v12 = _Pred.invoker;
        v10 = _Pred.manager;
        v3 = ((int (__cdecl *)(void *, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
        v11 = v3;
      }
      v9 = 0;
      LOBYTE(v15) = 1;
      v13 = &v6;
      v6.manager = 0;
      v7 = 0;
      v8 = 0;
      if ( v4 )
      {
        v8 = v12;
        v6.manager = v4;
        v7 = ((int (__cdecl *)(int, _DWORD))v4)(v3, 0);
      }
      std::_Pop_heap_0<GuildListWin::GuildInfo *,GuildListWin::GuildInfo,boost::function<bool __cdecl (GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void>>>(
        _First,
        _Last,
        v6);
      LOBYTE(v15) = 0;
      if ( v4 )
        v11 = ((int (__cdecl *)(int, signed int))v4)(v3, 1);
      --_Last;
      v5 = (signed int)((unsigned __int64)(2021161081i64 * (v14 - 68)) >> 32) >> 5;
      v14 -= 68;
      v10 = 0;
      v12 = 0;
    }
    while ( (signed int)(v5 + (v5 >> 31)) > 1 );
  }
  v15 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}

//----- (00511490) --------------------------------------------------------
void __thiscall std::vector<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo>>::_Reserve(std::vector<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > *this, unsigned int _Count)
{
  unsigned int v2; // esi@1
  unsigned int v3; // esi@3
  unsigned int v4; // eax@3
  unsigned int v5; // eax@5

  v2 = this->_Mylast - this->_Myfirst;
  if ( 63161283 - _Count < v2 )
    std::_Xlength_error("vector<T> too long");
  v3 = _Count + v2;
  v4 = this->_Myend - this->_Myfirst;
  if ( v3 > v4 )
  {
    if ( 63161283 - (v4 >> 1) >= v4 )
      v5 = (v4 >> 1) + v4;
    else
      v5 = 0;
    if ( v5 < v3 )
      v5 = v3;
    std::vector<GTRequestListWin::GuildInfo,std::allocator<GTRequestListWin::GuildInfo>>::reserve(this, v5);
  }
}

//----- (00511510) --------------------------------------------------------
#error "5115AE: positive sp value has been found (funcsize=52)"

//----- (005115B0) --------------------------------------------------------
GuildListWin *__thiscall GuildListWin::`vector deleting destructor'(GuildListWin *this, unsigned int a2)
{
  GuildListWin *v2; // esi@1

  v2 = this;
  GuildListWin::~GuildListWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005115E0) --------------------------------------------------------
void __thiscall std::vector<GuildAcademySelectWin::GuildInfo,std::allocator<GuildAcademySelectWin::GuildInfo>>::push_back(std::vector<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > *this, GuildListWin::GuildInfo *_Val)
{
  std::vector<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > *v2; // edi@1
  GuildListWin::GuildInfo *v3; // ecx@1
  unsigned int v4; // edx@3
  int v5; // esi@3
  GuildListWin::GuildInfo *v6; // ecx@5
  GuildListWin::GuildInfo *v7; // ecx@9

  v2 = this;
  v3 = this->_Mylast;
  if ( _Val >= v3 || v2->_Myfirst > _Val )
  {
    if ( v3 == v2->_Myend )
      std::vector<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo>>::_Reserve(v2, 1u);
    v7 = v2->_Mylast;
    if ( v7 )
      GuildListWin::GuildInfo::GuildInfo(v7, _Val);
  }
  else
  {
    v4 = (signed int)((unsigned __int64)(2021161081i64 * ((char *)_Val - (char *)v2->_Myfirst)) >> 32) >> 5;
    v5 = v4 + (v4 >> 31);
    if ( v3 == v2->_Myend )
      std::vector<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo>>::_Reserve(v2, 1u);
    v6 = v2->_Mylast;
    if ( v6 )
      GuildListWin::GuildInfo::GuildInfo(v6, &v2->_Myfirst[v5]);
  }
  ++v2->_Mylast;
}

//----- (005116A0) --------------------------------------------------------
void __cdecl std::_Sort<GTRequestListWin::GuildInfo *,int,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, int _Ideal, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > _Pred)
{
  GuildListWin::GuildInfo *v4; // edi@1
  GuildListWin::GuildInfo *v5; // ebx@1
  int v6; // eax@1
  signed int v7; // esi@2
  boost::detail::function::any_pointer (__cdecl *v8)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp-Ch] [bp-30h]@4
  int v9; // [sp-8h] [bp-2Ch]@4
  bool (__cdecl *v10)(boost::detail::function::any_pointer, GuildListWin::GuildInfo *, GuildListWin::GuildInfo *); // [sp-4h] [bp-28h]@4
  std::pair<GuildListWin::GuildInfo *,GuildListWin::GuildInfo *> _Mid; // [sp+10h] [bp-14h]@6
  int v12; // [sp+20h] [bp-4h]@1

  v4 = _Last;
  v5 = _First;
  v6 = _Last - _First;
  v12 = 0;
  if ( v6 <= 32 )
    goto LABEL_14;
  v7 = _Ideal;
  while ( v7 > 0 )
  {
    v8 = 0;
    v9 = 0;
    v10 = 0;
    if ( _Pred.manager )
    {
      v10 = _Pred.invoker;
      v8 = _Pred.manager;
      v9 = ((int (__cdecl *)(void *, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
    }
    std::_Unguarded_partition<GuildListWin::GuildInfo *,boost::function<bool __cdecl (GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void>>>(
      &_Mid,
      v5,
      v4,
      *(boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *)&v8);
    v7 = v7 / 2 / 2 + v7 / 2;
    v8 = 0;
    v9 = 0;
    v10 = 0;
    if ( _Mid.first - v5 >= v4 - _Mid.second )
    {
      if ( _Pred.manager )
      {
        v10 = _Pred.invoker;
        v8 = _Pred.manager;
        v9 = ((int (__cdecl *)(void *, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
      }
      std::_Sort<GTRequestListWin::GuildInfo *,int,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(
        _Mid.second,
        v4,
        v7,
        *(boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *)&v8);
      v4 = _Mid.first;
    }
    else
    {
      if ( _Pred.manager )
      {
        v10 = _Pred.invoker;
        v8 = _Pred.manager;
        v9 = ((int (__cdecl *)(_DWORD, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
      }
      std::_Sort<GTRequestListWin::GuildInfo *,int,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(
        v5,
        _Mid.first,
        v7,
        *(boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *)&v8);
      v5 = _Mid.second;
    }
    v6 = v4 - v5;
    if ( v6 <= 32 )
      goto LABEL_14;
  }
  if ( v6 <= 32 )
  {
LABEL_14:
    if ( v6 > 1 )
    {
      v8 = 0;
      v9 = 0;
      v10 = 0;
      if ( _Pred.manager )
      {
        v10 = _Pred.invoker;
        v8 = _Pred.manager;
        v9 = ((int (__cdecl *)(_DWORD, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
      }
      std::_Insertion_sort<GTRequestListWin::GuildInfo *,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(
        v5,
        v4,
        *(boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *)&v8);
    }
  }
  else
  {
    v8 = 0;
    v9 = 0;
    v10 = 0;
    if ( _Pred.manager )
    {
      v10 = _Pred.invoker;
      v8 = _Pred.manager;
      v9 = ((int (__cdecl *)(_DWORD, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
    }
    std::make_heap<GuildListWin::GuildInfo *,boost::function<bool __cdecl (GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void>>>(
      v5,
      v4,
      *(boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *)&v8);
    v8 = 0;
    v9 = 0;
    v10 = 0;
    if ( _Pred.manager )
    {
      v10 = _Pred.invoker;
      v8 = _Pred.manager;
      v9 = ((int (__cdecl *)(_DWORD, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
    }
    std::sort_heap<GTRequestListWin::GuildInfo *,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(
      v5,
      v4,
      *(boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *)&v8);
  }
  v12 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}

//----- (00511900) --------------------------------------------------------
#error "5119B6: positive sp value has been found (funcsize=63)"

//----- (005119C0) --------------------------------------------------------
void __thiscall GuildSelectWin::GuildSelectWin(GuildSelectWin *this)
{
  GuildSelectWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GuildSelectWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildSelectWin::`vftable'{for `IDirectMessenger'};
}
// 98D0C4: using guessed type void (__thiscall *GuildSelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98D0E4: using guessed type int (__thiscall *GuildSelectWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005119E0) --------------------------------------------------------
void __thiscall GuildSelectWin::~GuildSelectWin(GuildSelectWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GuildSelectWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildSelectWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 98D0C4: using guessed type void (__thiscall *GuildSelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98D0E4: using guessed type int (__thiscall *GuildSelectWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00511A00) --------------------------------------------------------
void __thiscall GuildSelectWin::OnGuildBtn(GuildSelectWin *this)
{
  GuildSelectWin *v1; // edi@1
  GuildNpcMenuWin *v2; // esi@1
  int YPos; // [sp+8h] [bp-8h]@2
  int XPos; // [sp+Ch] [bp-4h]@2

  v1 = this;
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
  v2 = GuildTask::GetGuildNpcMenuWin();
  if ( !(unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[65].__vecDelDtor)(v2) )
  {
    ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[45].__vecDelDtor)(v1, &XPos, &YPos);
    v2->vfptr[43].__vecDelDtor((NiRefObject *)v2, XPos);
    v2->vfptr[44].__vecDelDtor((NiRefObject *)v2, YPos);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
  }
}

//----- (00511A80) --------------------------------------------------------
void __thiscall GuildSelectWin::OnAcademyBtn(GuildSelectWin *this)
{
  GuildSelectWin *v1; // edi@1
  GuildAcademyMenuWin *v2; // esi@1
  int YPos; // [sp+8h] [bp-8h]@2
  int XPos; // [sp+Ch] [bp-4h]@2

  v1 = this;
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
  v2 = GuildAcademyTask::GetGuildAcademyMenuWin();
  if ( !(unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[65].__vecDelDtor)(v2) )
  {
    ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[45].__vecDelDtor)(v1, &XPos, &YPos);
    v2->vfptr[43].__vecDelDtor((NiRefObject *)v2, XPos);
    v2->vfptr[44].__vecDelDtor((NiRefObject *)v2, YPos);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
  }
}

//----- (00511B00) --------------------------------------------------------
void GuildSelectWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "GuildSelect");
}

//----- (00511B30) --------------------------------------------------------
void __thiscall GuildSelectWin::OnCommand(GuildSelectWin *this, unsigned int wParam, int lParam)
{
  if ( wParam )
  {
    if ( wParam == 1 )
      GuildSelectWin::OnGuildBtn(this);
  }
  else
  {
    GuildSelectWin::OnAcademyBtn(this);
  }
}

//----- (00511B50) --------------------------------------------------------
char __thiscall GuildSelectWin::Create(GuildSelectWin *this, PgFrameWork *pkFrameWork)
{
  GuildSelectWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  char result; // al@9
  NiSourceTexture *v8; // eax@10
  PgSprData *v9; // eax@11
  NiNode *v10; // esi@14
  PgFont *v11; // eax@19
  PgWinText *v12; // edi@19
  NiRefObjectVtbl *v13; // ebx@19
  NiUnsharedGeometryGroup *v14; // eax@19
  PgSprData *v15; // eax@19
  PgSprData *v16; // eax@19
  PgSprData *v17; // edi@19
  NiSourceTexture *v18; // edi@19
  PgSprData *v19; // edi@20
  PgSprData *v20; // edi@21
  PgSprData::PgHitTester *v21; // eax@21
  unsigned int v22; // edi@21
  unsigned int v23; // ebx@21
  PgFont *v24; // eax@21
  PgWinText *v25; // edi@21
  NiRefObjectVtbl *v26; // ebx@21
  NiUnsharedGeometryGroup *v27; // eax@21
  PgSprData *v28; // edi@21
  NiPointer<PgSprData::PgHitTester> *v29; // edx@21
  unsigned int v30; // edi@21
  unsigned int v31; // ebx@21
  PgFont *v32; // eax@21
  PgWinText *v33; // edi@21
  NiRefObjectVtbl *v34; // ebx@21
  NiUnsharedGeometryGroup *v35; // eax@21
  NiNode *v36; // esi@22
  unsigned int uiWidth; // [sp+44h] [bp-20h]@13
  unsigned int uiHeight; // [sp+48h] [bp-1Ch]@13
  int uiLeft; // [sp+4Ch] [bp-18h]@4
  int uiTop; // [sp+50h] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+54h] [bp-10h]@1
  int v42; // [sp+60h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v42 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildSelect.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "GuildSelectWin", 0) )
  {
    v6 = spNode.m_pObject;
    v42 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = MenuTexMgr::GetTexture(0x13u);
  if ( v8 )
    v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v8);
  else
    v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft, uiTop, v9, (PgWin *)&v2->vfptr, 0, 0);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v11 = Font::Get(MAIN_MENU);
    v12 = PgWinText::CreateWin(uiLeft, uiTop, uiWidth, uiHeight, v11, (PgWin *)&v2->vfptr, 0, 0);
    v12->vfptr[117].__vecDelDtor((NiRefObject *)v12, (unsigned int)&Color::m_kDxWinTitleColor);
    v12->vfptr[122].__vecDelDtor((NiRefObject *)v12, 1u);
    v13 = v12->vfptr;
    v14 = TextData::Get(0x9BEAF4F4);
    v13[118].__vecDelDtor((NiRefObject *)v12, (unsigned int)v14);
    v12->vfptr[60].__vecDelDtor((NiRefObject *)v12, 0);
    v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft, uiTop, v15, (PgWin *)&v2->vfptr, 0, 0);
    v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft, uiTop, v16, (PgWin *)&v2->vfptr, 0, 0);
    v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v17, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
    PgSprData::Add(v17, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
    PgWinCloseBut::CreateWin(uiLeft, uiTop, v17, (PgWin *)&v2->vfptr);
    v18 = MenuTexMgr::GetTexture(4u);
    if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
    {
      v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, v18);
      PgSprData::Add(v19, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
      PgSprData::Add(v19, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
      PgWinBut::CreateWin(uiLeft, uiTop, v19, (PgWin *)&v2->vfptr, 2u, 0, 0);
    }
    v20 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v20, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
    PgSprData::Add(v20, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
    PgWinBut::CreateWin(uiLeft, uiTop, v20, (PgWin *)&v2->vfptr, 1u, 0, 0);
    v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
    v22 = v21->m_uiHeight;
    v23 = v21->m_uiWidth;
    v24 = Font::Get(MENU);
    v25 = PgWinText::CreateWin(uiLeft, uiTop, v23, v22, v24, (PgWin *)&v2->vfptr, 0, 0);
    v25->vfptr[122].__vecDelDtor((NiRefObject *)v25, 5u);
    v26 = v25->vfptr;
    v27 = TextData::Get(0x9BEAF4F4);
    v26[118].__vecDelDtor((NiRefObject *)v25, (unsigned int)v27);
    v25->vfptr[60].__vecDelDtor((NiRefObject *)v25, 0);
    v28 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v28, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Click");
    PgSprData::Add(v28, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Over");
    PgWinBut::CreateWin(uiLeft, uiTop, v28, (PgWin *)&v2->vfptr, 0, 0, 0);
    v29 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text02", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
    v30 = v29->m_pObject->m_uiHeight;
    v31 = v29->m_pObject->m_uiWidth;
    v32 = Font::Get(MENU);
    v33 = PgWinText::CreateWin(uiLeft, uiTop, v31, v30, v32, (PgWin *)&v2->vfptr, 0, 0);
    v33->vfptr[122].__vecDelDtor((NiRefObject *)v33, 5u);
    v34 = v33->vfptr;
    v35 = TextData::Get(0x253B184Cu);
    v34[118].__vecDelDtor((NiRefObject *)v33, (unsigned int)v35);
    v33->vfptr[60].__vecDelDtor((NiRefObject *)v33, 0);
    ((void (__thiscall *)(GuildSelectWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    v42 = -1;
    if ( spNode.m_pObject )
    {
      v36 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v36 )
          v36->vfptr->__vecDelDtor((NiRefObject *)v36, 1u);
      }
    }
    result = 1;
  }
  else
  {
    v10 = spNode.m_pObject;
    v42 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v10 )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00512070) --------------------------------------------------------
GuildSelectWin *__cdecl GuildSelectWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  GuildSelectWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x158u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&GuildSelectWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&GuildSelectWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (GuildSelectWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 98D0C4: using guessed type void (__thiscall *GuildSelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98D0E4: using guessed type int (__thiscall *GuildSelectWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005121B0) --------------------------------------------------------
GuildSelectWin *__thiscall GuildSelectWin::`vector deleting destructor'(GuildSelectWin *this, unsigned int a2)
{
  GuildSelectWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildSelectWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildSelectWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98D0C4: using guessed type void (__thiscall *GuildSelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98D0E4: using guessed type int (__thiscall *GuildSelectWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005121F0) --------------------------------------------------------
void __thiscall HelpWin::OnClose(HelpWin *this)
{
  HWND__ *v1; // esi@1
  GameFrameWork *v2; // eax@2

  this->m_bOpen = 0;
  v1 = this->m_hWebWindow;
  if ( GameFrameWork::ms_bSpawnApps == 1 )
  {
    v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v2 )
      GameFrameWork::DelWebList(v2, v1);
  }
  DestroyWindow(v1);
}
// A8CB04: using guessed type bool GameFrameWork::ms_bSpawnApps;

//----- (00512230) --------------------------------------------------------
void __thiscall HelpWin::ReGenPos(HelpWin *this)
{
  HelpWin *v1; // esi@1
  int v2; // edx@1
  int v3; // eax@1
  int v4; // ecx@1

  v1 = this;
  v1->m_uiWebXPos = v1->m_uiPlaneWebXPos + ((int (*)(void))this->vfptr[41].__vecDelDtor)();
  v2 = ((int (__thiscall *)(_DWORD))v1->vfptr[42].__vecDelDtor)(v1) + v1->m_uiPlaneWebYPos + 2;
  v3 = v1->m_uiPlaneWebWidth - 8;
  v4 = v1->m_uiPlaneWebHeight - 10;
  v1->m_uiWebYPos = v2;
  v1->m_uiWebWidth = v3;
  v1->m_uiWebHeight = v4;
}

//----- (00512290) --------------------------------------------------------
void __thiscall HelpWin::UpdateWebPos(HelpWin *this)
{
  HelpWin *v1; // esi@1
  tagRECT rect; // [sp+4h] [bp-14h]@3

  v1 = this;
  if ( IsWindow(this->m_hWebWindow) )
  {
    if ( v1->m_bOpen )
    {
      HelpWin::ReGenPos(v1);
      GetWindowRect(g_hMainWnd, &rect);
      MoveWindow(
        v1->m_hWebWindow,
        rect.left + v1->m_uiWebXPos,
        rect.top + v1->m_uiWebYPos,
        v1->m_uiWebWidth,
        v1->m_uiWebHeight,
        1);
    }
  }
}

//----- (00512320) --------------------------------------------------------
void __thiscall HelpWin::OnWinClose(HelpWin *this)
{
  HelpWin *v1; // esi@1
  HWND__ *v2; // edi@1
  GameFrameWork *v3; // eax@2
  GameFrameWork *v4; // ecx@4

  v1 = this;
  this->m_bOpen = 0;
  v2 = this->m_hWebWindow;
  if ( GameFrameWork::ms_bSpawnApps == 1 )
  {
    v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v3 )
      GameFrameWork::DelWebList(v3, v2);
  }
  DestroyWindow(v2);
  v4 = (GameFrameWork *)v1->m_pkFrameWork;
  v1->m_hWebWindow = 0;
  GameFrameWork::CloseHelpWin(v4);
}
// A8CB04: using guessed type bool GameFrameWork::ms_bSpawnApps;

//----- (00512380) --------------------------------------------------------
void __thiscall HelpWin::UpdateMeWin(HelpWin *this, float fCurTime)
{
  HelpWin::UpdateWebPos(this);
}

//----- (00512390) --------------------------------------------------------
char __thiscall HelpWin::Create(HelpWin *this, PgFrameWork *pkFrameWork)
{
  HelpWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiAVObject *v5; // eax@4
  NiTexturingProperty *v6; // eax@4
  NiTexturingProperty *v7; // edi@4
  NiTexturingProperty::Map *v8; // eax@6
  PgSprData *v9; // eax@9
  NiNode *v10; // esi@12
  char result; // al@16
  int v12; // ebx@17
  NiNode *v13; // esi@20
  PgFont *v14; // eax@24
  PgWinText *v15; // edi@24
  NiRefObjectVtbl *v16; // ST3C_4@24
  NiUnsharedGeometryGroup *v17; // eax@24
  NiSourceTexture *v18; // edi@26
  PgSprData *v19; // eax@26
  PgWinSpr *v20; // eax@26
  PgSprData *v21; // edi@26
  unsigned int uiWidth; // [sp+34h] [bp-28h]@17
  unsigned int uiHeight; // [sp+38h] [bp-24h]@17
  NiPointer<NiTexturingProperty> spTexProp; // [sp+3Ch] [bp-20h]@4
  NiSourceTexture *pkTexture; // [sp+40h] [bp-1Ch]@7
  int uiLeft; // [sp+44h] [bp-18h]@9
  int uiTop; // [sp+48h] [bp-14h]@9
  NiPointer<NiNode> spNode; // [sp+4Ch] [bp-10h]@1
  int v29; // [sp+58h] [bp-4h]@1
  int iOffY; // [sp+64h] [bp+8h]@17

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v29 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\HelpWin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Panel01");
  v6 = (NiTexturingProperty *)NiAVObject::GetProperty(v5, 8);
  v7 = v6;
  spTexProp.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v8 = *v7->m_kMaps.m_pBase;
  LOBYTE(v29) = 1;
  if ( v8 )
    pkTexture = (NiSourceTexture *)v8->m_spTexture.m_pObject;
  else
    pkTexture = 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, pkTexture);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "HelpWin", 0) )
  {
    LOBYTE(v29) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v10 = spNode.m_pObject;
    v29 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
    return 0;
  }
  v12 = uiLeft;
  iOffY = uiTop;
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v14 = Font::Get(0);
    v15 = PgWinText::CreateWin(uiLeft - v12, uiTop - iOffY, uiWidth, uiHeight, v14, (PgWin *)&v2->vfptr, 0, 0);
    v15->vfptr[122].__vecDelDtor((NiRefObject *)v15, 1u);
    v15->vfptr[117].__vecDelDtor((NiRefObject *)v15, (unsigned int)&Color::m_kDxWinTitleColor);
    v16 = v15->vfptr;
    v17 = TextData::Get(0x48AF9599u);
    v16[118].__vecDelDtor((NiRefObject *)v15, (unsigned int)v17);
    v15->vfptr[60].__vecDelDtor((NiRefObject *)v15, 0);
    if ( PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Panel01",
           &v2->m_uiPlaneWebXPos,
           &v2->m_uiPlaneWebYPos,
           &v2->m_uiPlaneWebWidth,
           &v2->m_uiPlaneWebHeight) )
    {
      v18 = pkTexture;
      v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
      v20 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - iOffY, v19, (PgWin *)&v2->vfptr, 0, 0);
      v20->vfptr[60].__vecDelDtor((NiRefObject *)v20, 1u);
      v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, v18);
      PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
      PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
      PgWinBut::CreateWin(uiLeft - v12, uiTop - iOffY, v21, (PgWin *)&v2->vfptr, 1u, 0, 0);
      ((void (__thiscall *)(HelpWin *))v2->vfptr[59].__vecDelDtor)(v2);
      v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
      HelpWin::ReGenPos(v2);
      LOBYTE(v29) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
      v29 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 1;
    }
    else
    {
      LOBYTE(v29) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
      v29 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 0;
    }
  }
  else
  {
    LOBYTE(v29) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v13 = spNode.m_pObject;
    v29 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v13 )
      return 0;
    ((void (__thiscall *)(NiNode *))v13->vfptr->__vecDelDtor)(v13);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00512740) --------------------------------------------------------
void __thiscall HelpWin::OnCommand(HelpWin *this, unsigned int wParam, int lParam)
{
  if ( wParam == 1 )
    HelpWin::OnWinClose(this);
}

//----- (00512760) --------------------------------------------------------
void __thiscall HelpWin::HelpWin(HelpWin *this)
{
  HelpWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&HelpWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&HelpWin::`vftable'{for `IDirectMessenger'};
  v1->m_kWebAddress._Mysize = 0;
  v1->m_kWebAddress._Myres = 15;
  v1->m_kWebAddress._Bx._Buf[0] = 0;
  v1->m_bOpen = 0;
}
// 98D3A0: using guessed type void (__thiscall *HelpWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98D3BC: using guessed type int (__thiscall *HelpWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005127A0) --------------------------------------------------------
void __thiscall HelpWin::~HelpWin(HelpWin *this)
{
  HelpWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&HelpWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&HelpWin::`vftable'{for `IDirectMessenger'};
  if ( this->m_kWebAddress._Myres >= 0x10 )
    operator delete(this->m_kWebAddress._Bx._Ptr);
  v1->m_kWebAddress._Myres = 15;
  v1->m_kWebAddress._Mysize = 0;
  v1->m_kWebAddress._Bx._Buf[0] = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 98D3A0: using guessed type void (__thiscall *HelpWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98D3BC: using guessed type int (__thiscall *HelpWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005127F0) --------------------------------------------------------
HelpWin *__cdecl HelpWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  HelpWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x19Cu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&HelpWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&HelpWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kWorld.m_Rotate.m_pEntry[1][0]) = 15;
    LODWORD(v2[1].m_kWorld.m_Rotate.m_pEntry[0][2]) = 0;
    LOBYTE(v2[1].m_kLocal.m_Translate.z) = 0;
    LOBYTE(v2[1].m_kLocal.m_Rotate.m_pEntry[2][0]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (HelpWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 98D3A0: using guessed type void (__thiscall *HelpWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98D3BC: using guessed type int (__thiscall *HelpWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00512950) --------------------------------------------------------
void __thiscall HelpWin::OnShowWin(HelpWin *this)
{
  HelpWin *v1; // esi@1
  unsigned int v2; // ebx@1
  bool v3; // cf@3
  int v4; // ecx@3
  int v5; // edx@3
  int v6; // eax@3
  const char *v7; // eax@4
  void *(__thiscall *v8)(NiRefObject *, unsigned int); // edx@6
  unsigned int v9; // ecx@6
  tagRECT kWebRect; // [sp+Ch] [bp-24h]@3
  NiRect<int> kRect; // [sp+1Ch] [bp-14h]@6
  unsigned int uiPosY; // [sp+2Ch] [bp-4h]@6

  v1 = this;
  v2 = 0;
  if ( !this->m_kWebAddress._Mysize )
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &this->m_kWebAddress,
      "http://cdn2.outspark.com/swf/beginners_guide.html",
      0x31u);
  v3 = v1->m_kWebAddress._Myres < 0x10;
  v4 = v1->m_uiWebYPos;
  v5 = v1->m_uiWebWidth;
  kWebRect.left = v1->m_uiWebXPos;
  v6 = v1->m_uiWebHeight;
  kWebRect.top = v4;
  kWebRect.right = v5;
  kWebRect.bottom = v6;
  if ( v3 )
    v7 = v1->m_kWebAddress._Bx._Buf;
  else
    v7 = v1->m_kWebAddress._Bx._Ptr;
  v1->m_hWebWindow = CreateWebWindow(g_hMainWnd, g_hMainInstance, v7, &kWebRect, (PgWin *)&v1->vfptr);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::erase(&v1->m_kWebAddress, 0, 0xFFFFFFFF);
  v8 = v1->vfptr[52].__vecDelDtor;
  v1->m_bOpen = 1;
  kRect.m_left = 0;
  kRect.m_right = 0;
  kRect.m_top = 0;
  kRect.m_bottom = 0;
  v8((NiRefObject *)&v1->vfptr, (unsigned int)&kRect);
  v9 = kRect.m_bottom - kRect.m_top;
  uiPosY = 0;
  if ( PgWin::ms_uiScreenWidth >= kRect.m_right - kRect.m_left && PgWin::ms_uiScreenHeight >= v9 )
  {
    v2 = (PgWin::ms_uiScreenWidth - (kRect.m_right - kRect.m_left)) >> 1;
    uiPosY = (PgWin::ms_uiScreenHeight - v9) >> 1;
  }
  v1->vfptr[43].__vecDelDtor((NiRefObject *)v1, v2);
  v1->vfptr[44].__vecDelDtor((NiRefObject *)v1, uiPosY);
  SetFocus(g_hMainWnd);
}

//----- (00512A70) --------------------------------------------------------
void __thiscall HelpWin::SetWebAddress(HelpWin *this, const char *pcAddress)
{
  HelpWin *v2; // edi@1
  const char *v3; // eax@3

  v2 = this;
  if ( !Folder::m_bInit )
    Folder::Init();
  v3 = Folder::Merge(&Folder::m_acMain, (char *)pcAddress);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v2->m_kWebAddress, v3, strlen(v3));
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00512AC0) --------------------------------------------------------
HelpWin *__thiscall HelpWin::`scalar deleting destructor'(HelpWin *this, unsigned int a2)
{
  HelpWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&HelpWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&HelpWin::`vftable'{for `IDirectMessenger'};
  if ( this->m_kWebAddress._Myres >= 0x10 )
    operator delete(this->m_kWebAddress._Bx._Ptr);
  v2->m_kWebAddress._Myres = 15;
  v2->m_kWebAddress._Mysize = 0;
  v2->m_kWebAddress._Bx._Buf[0] = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98D3A0: using guessed type void (__thiscall *HelpWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98D3BC: using guessed type int (__thiscall *HelpWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00512B30) --------------------------------------------------------
void __thiscall HolyPromiseAddWin::HolyPromiseAddWin(HolyPromiseAddWin *this)
{
  HolyPromiseAddWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&HolyPromiseAddWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&HolyPromiseAddWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkInputBox = 0;
}
// 98DAFC: using guessed type void (__thiscall *HolyPromiseAddWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98DB1C: using guessed type int (__thiscall *HolyPromiseAddWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00512B60) --------------------------------------------------------
void __thiscall HolyPromiseAddWin::~HolyPromiseAddWin(HolyPromiseAddWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&HolyPromiseAddWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&HolyPromiseAddWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 98DAFC: using guessed type void (__thiscall *HolyPromiseAddWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98DB1C: using guessed type int (__thiscall *HolyPromiseAddWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00512B80) --------------------------------------------------------
void __thiscall HolyPromiseAddWin::SetTargetName(HolyPromiseAddWin *this, const char *szName)
{
  if ( szName )
    ((void (__stdcall *)(_DWORD))this->m_pkInputBox->vfptr[116].__vecDelDtor)(szName);
}

//----- (00512BA0) --------------------------------------------------------
void __thiscall HolyPromiseAddWin::OnClose(HolyPromiseAddWin *this)
{
  ((void (__stdcall *)(_DWORD))this->m_pkInputBox->vfptr[121].__vecDelDtor)(1);
}

//----- (00512BC0) --------------------------------------------------------
void __thiscall HolyPromiseAddWin::OnShowWin(HolyPromiseAddWin *this)
{
  ((void (*)(void))this->m_pkInputBox->vfptr[120].__vecDelDtor)();
}

//----- (00512BD0) --------------------------------------------------------
void __thiscall HolyPromiseWin::OnSortByTitle01(HolyPromiseWin *this)
{
  HolyPromiseWin *v1; // esi@1
  SlideListWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_pListLowRankPromise;
  if ( v2 )
  {
    v1->m_nSortColumn = 0;
    SlideListWin::Sort(v2, 0, 0, 0);
    SlideListWin::UpdateViewList(v1->m_pListLowRankPromise);
  }
}

//----- (00512C00) --------------------------------------------------------
void __thiscall HolyPromiseWin::OnSortByTitle02(HolyPromiseWin *this)
{
  HolyPromiseWin *v1; // esi@1
  SlideListWin *v2; // ecx@2

  v1 = this;
  if ( this->m_pkSlideBarPromiseList )
  {
    v2 = this->m_pListLowRankPromise;
    v1->m_nSortColumn = 1;
    SlideListWin::Sort(v2, 1, 0, 0);
    SlideListWin::UpdateViewList(v1->m_pListLowRankPromise);
  }
}

//----- (00512C40) --------------------------------------------------------
void __thiscall HolyPromiseWin::OnSortByTitle03(HolyPromiseWin *this)
{
  HolyPromiseWin *v1; // esi@1
  SlideListWin *v2; // ecx@2

  v1 = this;
  if ( this->m_pkSlideBarPromiseList )
  {
    v2 = this->m_pListLowRankPromise;
    v1->m_nSortColumn = 2;
    SlideListWin::Sort(v2, 2, 0, 1);
    SlideListWin::UpdateViewList(v1->m_pListLowRankPromise);
  }
}

//----- (00512C80) --------------------------------------------------------
void __thiscall HolyPromiseWin::OnSortByTitle04(HolyPromiseWin *this)
{
  HolyPromiseWin *v1; // esi@1
  SlideListWin *v2; // ecx@2

  v1 = this;
  if ( this->m_pkSlideBarPromiseList )
  {
    v2 = this->m_pListLowRankPromise;
    v1->m_nSortColumn = 3;
    SlideListWin::Sort(v2, 3, 0, 0);
    SlideListWin::UpdateViewList(v1->m_pListLowRankPromise);
  }
}

//----- (00512CC0) --------------------------------------------------------
void __thiscall HolyPromiseWin::ClearHolyPromise(HolyPromiseWin *this)
{
  CHolyPromise::ClearMember(&this->m_kCHolyPromise);
}

//----- (00512CD0) --------------------------------------------------------
void __thiscall HolyPromiseWin::UpdateMeWin(HolyPromiseWin *this, float fCurTime)
{
  HolyPromiseWin *v2; // esi@1

  v2 = this;
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
    GameFrameWork::UpdateUIScroll(v2->m_pListLowRankPromise, v2->m_pkSlideBarPromiseList);
}

//----- (00512D00) --------------------------------------------------------
void HolyPromiseWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "HolyPromis");
}

//----- (00512D30) --------------------------------------------------------
void __thiscall HolyPromiseAddWin::OnFriendAddCancel(HolyPromiseAddWin *this)
{
  HolyPromiseAddWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkInputBox->vfptr[115].__vecDelDtor)(&unk_98D616);
  GameFrameWork::CloseHolyPromiseAddWin((GameFrameWork *)v1->m_pkFrameWork);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}

//----- (00512D60) --------------------------------------------------------
void __thiscall HolyPromiseWin::OnChangeTab(HolyPromiseWin *this, DirectUserMsgBody_CommunityTabChanged::TabEnum eTab)
{
  char *v2; // esi@1

  v2 = (char *)&this->vfptr;
  if ( this->m_pkMsgHooker )
  {
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))this->m_pkMsgHooker->vfptr->SendDirectMessage)(40, &eTab, v2);
    if ( *((_DWORD *)v2 + 1) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v2 + 1) + 20))(40, &eTab, v2);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v2 + 20))(v2, 40, &eTab, v2);
}

//----- (00512DC0) --------------------------------------------------------
void __thiscall HolyPromiseWin::OnLClick(HolyPromiseWin *this, int nItemIndex)
{
  this->m_bEnableHighPromise = 0;
  if ( this == (HolyPromiseWin *)g_pkToolTipWin->m_pkToolTipParentWin )
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
}

//----- (00512DF0) --------------------------------------------------------
void __thiscall HolyPromiseWin::OnRClick(HolyPromiseWin *this, int nItemIndex)
{
  HolyPromiseWin *v2; // esi@1

  v2 = this;
  if ( this == (HolyPromiseWin *)g_pkToolTipWin->m_pkToolTipParentWin )
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD, _DWORD))v2->m_spPopupMenu->vfptr[77].__vecDelDtor)(PgWin::ms_iMsX, PgWin::ms_iMsY);
  PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v2->m_spPopupMenu->vfptr);
  ((void (__stdcall *)(_DWORD))v2->m_spPopupMenu->vfptr[60].__vecDelDtor)(1);
  v2->m_bEnableHighPromise = 0;
}

//----- (00512E60) --------------------------------------------------------
void __thiscall HolyPromiseWin::OnHighRankLClick(HolyPromiseWin *this, int nItemIndex)
{
  this->m_bEnableHighPromise = 1;
  if ( this == (HolyPromiseWin *)g_pkToolTipWin->m_pkToolTipParentWin )
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
}

//----- (00512E90) --------------------------------------------------------
void __thiscall HolyPromiseWin::OnHighRankRClick(HolyPromiseWin *this, int nItemIndex)
{
  HolyPromiseWin *v2; // esi@1

  v2 = this;
  if ( this == (HolyPromiseWin *)g_pkToolTipWin->m_pkToolTipParentWin )
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD, _DWORD))v2->m_spPopupMenu->vfptr[77].__vecDelDtor)(PgWin::ms_iMsX, PgWin::ms_iMsY);
  PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v2->m_spPopupMenu->vfptr);
  ((void (__stdcall *)(_DWORD))v2->m_spPopupMenu->vfptr[60].__vecDelDtor)(1);
  v2->m_bEnableHighPromise = 1;
}

//----- (00512F00) --------------------------------------------------------
void __thiscall HolyPromiseWin::OnInviteHighPromise(HolyPromiseWin *this)
{
  GameFrameWork::OpenHolyPromiseAddWin((GameFrameWork *)this->m_pkFrameWork);
}

//----- (00512F10) --------------------------------------------------------
void __thiscall HolyPromiseWin::OnSendWhisper(HolyPromiseWin *this)
{
  HolyPromiseWin *v1; // edi@1
  SlideListWin *v2; // eax@1
  SlideListWin *v3; // ecx@2
  signed int v4; // eax@4
  signed int v5; // eax@6
  char v6; // al@5
  unsigned int v7; // esi@9
  GameFrameWork *v8; // ecx@10
  unsigned int dwData; // [sp+4h] [bp-20h]@5
  char acname[21]; // [sp+8h] [bp-1Ch]@10

  v1 = this;
  v2 = this->m_pListLowRankPromise;
  if ( v2 )
  {
    v3 = this->m_pkListHighRankPromise;
    if ( v3 )
    {
      if ( v1->m_bEnableHighPromise )
      {
        v5 = SlideListWin::GetCurSelIndex(v3);
        if ( v5 < 0 )
          return;
        v6 = SlideListWin::GetData(v1->m_pkListHighRankPromise, v5, &dwData);
      }
      else
      {
        v4 = SlideListWin::GetCurSelIndex(v2);
        if ( v4 < 0 )
          return;
        v6 = SlideListWin::GetData(v1->m_pListLowRankPromise, v4, &dwData);
      }
      if ( v6 )
      {
        v7 = dwData;
        if ( dwData )
        {
          Name5::n_string((Name5 *)dwData, acname);
          *(_QWORD *)&GameFrameWork::m_kWhisperCharID.n5_name[0] = *(_QWORD *)v7;
          *(_QWORD *)&GameFrameWork::m_kWhisperCharID.n5_code[2] = *(_QWORD *)(v7 + 8);
          GameFrameWork::m_kWhisperCharID.n5_code[4] = *(_DWORD *)(v7 + 16);
          v8 = (GameFrameWork *)v1->m_pkFrameWork;
          acname[20] = 0;
          GameFrameWork::OnWhisperChatStart(v8, acname);
        }
      }
    }
  }
}

//----- (00512FE0) --------------------------------------------------------
void __thiscall HolyPromiseWin::OnSlideBar(HolyPromiseWin *this)
{
  if ( this->m_pListLowRankPromise )
  {
    this->m_pListLowRankPromise->m_nViewStartPos = this->m_pkSlideBarPromiseList->m_nCurPos;
    SlideListWin::UpdateViewList(this->m_pListLowRankPromise);
  }
}

//----- (00513010) --------------------------------------------------------
void __thiscall HolyPromiseWin::OnTopWin(HolyPromiseWin *this)
{
  GameFrameWork::SetTopHolyPromiseAddWin((GameFrameWork *)this->m_pkFrameWork);
}

//----- (00513020) --------------------------------------------------------
char __thiscall HolyPromiseAddWin::Create(HolyPromiseAddWin *this, PgFrameWork *pkFrameWork)
{
  HolyPromiseAddWin *v2; // esi@1
  PgFrameWork *v3; // edi@1
  NiTexturePalette *v4; // ebx@1
  const char *v5; // eax@3
  PgSprData *v6; // eax@4
  NiNode *v7; // esi@5
  NiSourceTexture *v9; // eax@10
  PgSprData *v10; // eax@11
  PgWinSpr *v11; // eax@13
  PgFont *v12; // eax@16
  PgWinText *v13; // edi@16
  NiRefObjectVtbl *v14; // ebx@16
  NiUnsharedGeometryGroup *v15; // eax@16
  PgSprData *v16; // edi@16
  NiPointer<PgSprData::PgHitTester> *v17; // ecx@16
  unsigned int v18; // edi@16
  unsigned int v19; // ebx@16
  PgFont *v20; // eax@16
  PgWinText *v21; // edi@16
  NiRefObjectVtbl *v22; // ebx@16
  NiUnsharedGeometryGroup *v23; // eax@16
  PgSprData *v24; // edi@16
  NiPointer<PgSprData::PgHitTester> *v25; // ecx@16
  unsigned int v26; // edi@16
  unsigned int v27; // ebx@16
  PgFont *v28; // eax@16
  PgWinText *v29; // edi@16
  NiRefObjectVtbl *v30; // ebx@16
  NiUnsharedGeometryGroup *v31; // eax@16
  EditWin *v32; // eax@16
  NiNode *v33; // esi@17
  UIUtil ui; // [sp+4Ch] [bp-30h]@16
  unsigned int uiWidth; // [sp+60h] [bp-1Ch]@15
  unsigned int uiHeight; // [sp+64h] [bp-18h]@15
  int uiLeft; // [sp+68h] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+6Ch] [bp-10h]@1
  int v39; // [sp+78h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pkFrameWork;
  this->m_pkFrameWork = pkFrameWork;
  v4 = pTexturePalette;
  v39 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "Game\\AddFriendList.nif");
  PgUtil::LoadNodeNifFile(v5, &spNode, v4);
  if ( !spNode.m_pObject )
    return 0;
  v6 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, (int *)&pkFrameWork, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v6, 0, v3, "HolyPromiseAddWin", 0) )
    goto LABEL_23;
  v9 = MenuTexMgr::GetTexture(0x13u);
  if ( v9 )
    v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, (int *)&pkFrameWork, v9);
  else
    v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, (int *)&pkFrameWork, 0);
  v11 = PgWinSpr::CreateWin(uiLeft + 2, (int)&pkFrameWork->vfptr + 2, v10, (PgWin *)&v2->vfptr, 0, 0);
  if ( v11 )
    v11->vfptr[60].__vecDelDtor((NiRefObject *)v11, 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "TextBox",
          &uiLeft,
          (int *)&pkFrameWork,
          &uiWidth,
          &uiHeight) )
  {
LABEL_23:
    v7 = spNode.m_pObject;
    v39 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v7 )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    }
    return 0;
  }
  v12 = Font::Get(0);
  v13 = PgWinText::CreateWin(
          uiLeft,
          (int)(&pkFrameWork[-1].m_bInit + 2),
          uiWidth,
          uiHeight,
          v12,
          (PgWin *)&v2->vfptr,
          0,
          0);
  v13->vfptr[122].__vecDelDtor((NiRefObject *)v13, 1u);
  v13->vfptr[117].__vecDelDtor((NiRefObject *)v13, (unsigned int)&Color::m_kDxWinTitleColor);
  v14 = v13->vfptr;
  v15 = TextData::Get(0xE2E8BBD8);
  v14[118].__vecDelDtor((NiRefObject *)v13, (unsigned int)v15);
  v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
  v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor02", &uiLeft, (int *)&pkFrameWork, 0);
  PgSprData::Add(v16, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick02");
  PgSprData::Add(v16, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver02");
  PgWinBut::CreateWin(uiLeft, (int)pkFrameWork, v16, (PgWin *)&v2->vfptr, 0, 0, 0);
  v17 = v16->m_akHitTester.m_pBase;
  v18 = v17->m_pObject->m_uiHeight;
  v19 = v17->m_pObject->m_uiWidth;
  v20 = Font::Get(0);
  v21 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v19, v18, v20, (PgWin *)&v2->vfptr, 0, 0);
  v21->vfptr[122].__vecDelDtor((NiRefObject *)v21, 5u);
  v22 = v21->vfptr;
  v23 = TextData::Get(0xA7FCD9E4);
  v22[118].__vecDelDtor((NiRefObject *)v21, (unsigned int)v23);
  v21->vfptr[60].__vecDelDtor((NiRefObject *)v21, 0);
  v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor03", &uiLeft, (int *)&pkFrameWork, 0);
  PgSprData::Add(v24, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick03");
  PgSprData::Add(v24, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver03");
  PgWinBut::CreateWin(uiLeft, (int)pkFrameWork, v24, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v25 = v24->m_akHitTester.m_pBase;
  v26 = v25->m_pObject->m_uiHeight;
  v27 = v25->m_pObject->m_uiWidth;
  v28 = Font::Get(0);
  v29 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v27, v26, v28, (PgWin *)&v2->vfptr, 0, 0);
  v29->vfptr[122].__vecDelDtor((NiRefObject *)v29, 5u);
  v30 = v29->vfptr;
  v31 = TextData::Get(0x88A297E1);
  v30[118].__vecDelDtor((NiRefObject *)v29, (unsigned int)v31);
  v29->vfptr[60].__vecDelDtor((NiRefObject *)v29, 0);
  UIUtil::UIUtil(&ui);
  LOBYTE(v39) = 1;
  UIUtil::SetOffset(&ui, 0, 0);
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v32 = UIUtil::CreateEdit(&ui, "InputBox", 16, NORMAL, 0, 1);
  v2->m_pkInputBox = v32;
  v32->vfptr[115].__vecDelDtor((NiRefObject *)v32, (unsigned int)&unk_98D5F3);
  ((void (__stdcall *)(_DWORD))v2->m_pkInputBox->m_spEditWin.m_pObject->vfptr[15].__vecDelDtor)(0);
  ((void (__thiscall *)(HolyPromiseAddWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  LOBYTE(v39) = 0;
  UIUtil::~UIUtil(&ui);
  v39 = -1;
  if ( spNode.m_pObject )
  {
    v33 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v33 )
        v33->vfptr->__vecDelDtor((NiRefObject *)v33, 1u);
    }
  }
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00513470) --------------------------------------------------------
void __thiscall HolyPromiseAddWin::OnFriendAddOk(HolyPromiseAddWin *this)
{
  HolyPromiseAddWin *v1; // edi@1
  char *v2; // eax@1
  Name5 *v3; // eax@4
  PROTO_NC_HOLY_PROMISE_SET_UP_REQ kProto; // [sp+8h] [bp-54h]@4
  Name5 kNullID; // [sp+30h] [bp-2Ch]@1
  Name5 kCharID; // [sp+44h] [bp-18h]@1

  v1 = this;
  v2 = (char *)((int (*)(void))this->m_pkInputBox->vfptr[113].__vecDelDtor)();
  *(_QWORD *)&kCharID.n5_code[3] = 0i64;
  *(_QWORD *)&kCharID.n5_code[1] = 0i64;
  *(_QWORD *)&kCharID.n5_name[0] = 0i64;
  strncpy(kCharID.n5_name, v2, 0x14u);
  *(_QWORD *)&kNullID.n5_code[3] = 0i64;
  *(_QWORD *)&kNullID.n5_code[1] = 0i64;
  *(_QWORD *)&kNullID.n5_name[0] = 0i64;
  strncpy(kNullID.n5_name, &byte_98D60E, 0x14u);
  if ( *(_QWORD *)&kCharID.n5_name[0] != *(_QWORD *)&kNullID.n5_name[0]
    || *(_QWORD *)&kCharID.n5_code[2] != *(_QWORD *)&kNullID.n5_code[2]
    || kCharID.n5_code[4] != kNullID.n5_code[4] )
  {
    *(_QWORD *)&kProto.CharID.n5_code[3] = 0i64;
    *(_QWORD *)&kProto.CharID.n5_code[1] = 0i64;
    kProto.CharID.n5_code[0] = 0;
    *(_QWORD *)&kProto.UpCharID.n5_code[3] = 0i64;
    *(_QWORD *)&kProto.UpCharID.n5_code[1] = 0i64;
    kProto.UpCharID.n5_code[0] = 0;
    v3 = User::GetMainCharID(&g_kUser);
    *(_QWORD *)&kProto.CharID.n5_name[0] = *(_QWORD *)&v3->n5_code[0];
    *(_QWORD *)&kProto.CharID.n5_code[2] = *(_QWORD *)&v3->n5_code[2];
    kProto.CharID.n5_code[4] = v3->n5_code[4];
    kProto.UpCharID = kCharID;
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x25u, 1u, &kProto, 40);
  }
  ((void (__stdcall *)(_DWORD))v1->m_pkInputBox->vfptr[115].__vecDelDtor)(&unk_98D60F);
  GameFrameWork::CloseHolyPromiseAddWin((GameFrameWork *)v1->m_pkFrameWork);
}

//----- (005135B0) --------------------------------------------------------
void __thiscall HolyPromiseAddWin::OnCommand(HolyPromiseAddWin *this, unsigned int wParam, int lParam)
{
  HolyPromiseAddWin *v3; // esi@1

  v3 = this;
  if ( wParam )
  {
    if ( wParam == 1 )
    {
      ((void (__stdcall *)(_DWORD))this->m_pkInputBox->vfptr[115].__vecDelDtor)(&unk_98D616);
      GameFrameWork::CloseHolyPromiseAddWin((GameFrameWork *)v3->m_pkFrameWork);
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
    }
  }
  else
  {
    HolyPromiseAddWin::OnFriendAddOk(this);
  }
}

//----- (00513600) --------------------------------------------------------
void __thiscall HolyPromiseAddWin::OnEditEnd(HolyPromiseAddWin *this, unsigned int wParam, int lParam)
{
  HolyPromiseAddWin::OnFriendAddOk(this);
}

//----- (00513610) --------------------------------------------------------
void __thiscall HolyPromiseWin::SetHolyPromiseList(HolyPromiseWin *this, PROTO_HOLY_PROMISE_INFO *pkData, bool bHighList)
{
  HolyPromiseWin *v3; // esi@1
  unsigned int v4; // ecx@8
  unsigned int v5; // edx@8
  unsigned int v6; // eax@8
  unsigned int v7; // ebx@9
  NiUnsharedGeometryGroup *v8; // eax@10
  NiUnsharedGeometryGroup *v9; // eax@11
  const char *v10; // eax@12
  const char *v11; // eax@15
  SlideListWin *v12; // ecx@15
  NiUnsharedGeometryGroup *v13; // eax@17
  NiUnsharedGeometryGroup *v14; // eax@18
  const char *v15; // eax@19
  const char *v16; // eax@22
  char dest[4]; // [sp+8h] [bp-30h]@3
  int v18; // [sp+Ch] [bp-2Ch]@3
  int v19; // [sp+10h] [bp-28h]@3
  int v20; // [sp+14h] [bp-24h]@3
  int v21; // [sp+18h] [bp-20h]@3
  char acname[21]; // [sp+1Ch] [bp-1Ch]@8

  v3 = this;
  if ( pkData )
  {
    if ( this->m_pListLowRankPromise )
    {
      v21 = 0;
      v20 = 0;
      v19 = 0;
      v18 = 0;
      *(_DWORD *)dest = 0;
      strncpy(dest, &byte_98D631, 0x14u);
      if ( pkData->PromiseCharID.n5_code[0] != *(_DWORD *)dest
        || pkData->PromiseCharID.n5_code[1] != v18
        || pkData->PromiseCharID.n5_code[2] != v19
        || pkData->PromiseCharID.n5_code[3] != v20
        || pkData->PromiseCharID.n5_code[4] != v21 )
      {
        v4 = pkData->PromiseCharID.n5_code[2];
        v5 = pkData->PromiseCharID.n5_code[3];
        *(_QWORD *)acname = *(_QWORD *)&pkData->PromiseCharID.n5_name[0];
        v6 = pkData->PromiseCharID.n5_code[4];
        *(_DWORD *)&acname[8] = v4;
        *(_DWORD *)&acname[12] = v5;
        *(_DWORD *)&acname[16] = v6;
        acname[20] = 0;
        if ( bHighList )
        {
          v7 = SlideListWin::AddText(v3->m_pkListHighRankPromise, acname);
          if ( *(_BYTE *)&pkData->LogonInfo & 1 )
          {
            v8 = TextData::Get(0x95F9F1F2);
            SlideListWin::SetText(v3->m_pkListHighRankPromise, v7, 1u, (const char *)v8);
            SlideListWin::SetText(v3->m_pkListHighRankPromise, v7, 3u, &byte_98D632);
            SlideListWin::SetFontColor(v3->m_pkListHighRankPromise, v7, 255, 255, 0);
          }
          else
          {
            v9 = TextData::Get(0xF6FF3844);
            SlideListWin::SetText(v3->m_pkListHighRankPromise, v7, 1u, (const char *)v9);
            SlideListWin::SetFontColor(v3->m_pkListHighRankPromise, v7, 200, 200, 200);
            if ( *(_DWORD *)&pkData->LogonInfo & 0xFFE )
              v10 = fs(
                      "%d-%d-%d",
                      (*(unsigned int *)&pkData->LogonInfo >> 1) & 0x7FF,
                      (unsigned __int16)*(_DWORD *)&pkData->LogonInfo >> 12,
                      (*(unsigned int *)&pkData->LogonInfo >> 16) & 0x1F);
            else
              v10 = (const char *)TextData::Get(0xDA01413E);
            SlideListWin::SetText(v3->m_pkListHighRankPromise, v7, 3u, v10);
          }
          v11 = fs("%d", pkData->Level);
          SlideListWin::SetText(v3->m_pkListHighRankPromise, v7, 2u, v11);
          SlideListWin::SetData(v3->m_pkListHighRankPromise, v7, (unsigned int)pkData);
          v12 = v3->m_pkListHighRankPromise;
        }
        else
        {
          v7 = SlideListWin::AddText(v3->m_pListLowRankPromise, acname);
          if ( *(_BYTE *)&pkData->LogonInfo & 1 )
          {
            v13 = TextData::Get(0x95F9F1F2);
            SlideListWin::SetText(v3->m_pListLowRankPromise, v7, 1u, (const char *)v13);
            SlideListWin::SetText(v3->m_pListLowRankPromise, v7, 3u, &byte_98D633);
            SlideListWin::SetFontColor(v3->m_pListLowRankPromise, v7, 255, 255, 0);
          }
          else
          {
            v14 = TextData::Get(0xF6FF3844);
            SlideListWin::SetText(v3->m_pListLowRankPromise, v7, 1u, (const char *)v14);
            SlideListWin::SetFontColor(v3->m_pListLowRankPromise, v7, 200, 200, 200);
            if ( *(_DWORD *)&pkData->LogonInfo & 0xFFE )
              v15 = fs(
                      "%d-%d-%d",
                      (*(unsigned int *)&pkData->LogonInfo >> 1) & 0x7FF,
                      (unsigned __int16)*(_DWORD *)&pkData->LogonInfo >> 12,
                      (*(unsigned int *)&pkData->LogonInfo >> 16) & 0x1F);
            else
              v15 = (const char *)TextData::Get(0xDA01413E);
            SlideListWin::SetText(v3->m_pListLowRankPromise, v7, 3u, v15);
          }
          v16 = fs("%d", pkData->Level);
          SlideListWin::SetText(v3->m_pListLowRankPromise, v7, 2u, v16);
          SlideListWin::SetData(v3->m_pListLowRankPromise, v7, (unsigned int)pkData);
          v12 = v3->m_pListLowRankPromise;
        }
        SlideListWin::SetFontSize(v12, v7, 1);
      }
    }
  }
}

//----- (00513920) --------------------------------------------------------
void __thiscall HolyPromiseWin::CheckDay(HolyPromiseWin *this, PROTO_HOLY_PROMISE_INFO *pdata, bool bHigh)
{
  HolyPromiseWin *v3; // esi@1
  unsigned int v4; // edx@2
  unsigned int v5; // eax@2
  unsigned int v6; // ecx@2
  char *v7; // eax@3
  char *v8; // eax@3
  MsgBox *v9; // eax@3
  int v10; // edx@4
  char *v11; // eax@7
  char *v12; // eax@7
  MsgBox *v13; // eax@7
  int v14; // edx@8
  unsigned int v15; // edx@13
  __int64 v16; // kr00_8@13
  PROTO_NC_HOLY_PROMISE_DEL_DOWN_REQ kProto; // [sp+8h] [bp-1Ch]@2
  char v18; // [sp+1Ch] [bp-8h]@2

  v3 = this;
  if ( CHolyPromise::IsDelPenlety(&pdata->LogonInfo) )
  {
    v4 = pdata->PromiseCharID.n5_code[1];
    v5 = pdata->PromiseCharID.n5_code[2];
    kProto.DownCharID.n5_code[0] = pdata->PromiseCharID.n5_code[0];
    v6 = pdata->PromiseCharID.n5_code[3];
    *(_QWORD *)&kProto.DownCharID.n5_code[1] = __PAIR__(v5, v4);
    *(_QWORD *)&kProto.DownCharID.n5_code[3] = __PAIR__(pdata->PromiseCharID.n5_code[4], v6);
    v18 = 0;
    if ( bHigh )
    {
      v7 = (char *)TextData::Get(0x9DF3B9E1);
      v8 = fs(v7, &kProto);
      v9 = MsgBox::Modeless(MSGBOX_OKCANCEL, v8);
      if ( v3 )
        v10 = (int)&v3->vfptr;
      else
        v10 = 0;
      ((void (__stdcall *)(int))v9->vfptr->SetMsgHooker)(v10);
      v3->m_bDelHigh = 1;
    }
    else
    {
      v11 = (char *)TextData::Get(0x8FC3BDED);
      v12 = fs(v11, &kProto);
      v13 = MsgBox::Modeless(MSGBOX_OKCANCEL, v12);
      if ( v3 )
        v14 = (int)&v3->vfptr;
      else
        v14 = 0;
      ((void (__stdcall *)(int))v13->vfptr->SetMsgHooker)(v14);
      *(_QWORD *)&v3->m_kDelLowCharID.n5_name[0] = *(_QWORD *)&pdata->PromiseCharID.n5_name[0];
      *(_QWORD *)&v3->m_kDelLowCharID.n5_code[2] = *(_QWORD *)&pdata->PromiseCharID.n5_code[2];
      v3->m_kDelLowCharID.n5_code[4] = pdata->PromiseCharID.n5_code[4];
      v3->m_bDelLow = 1;
    }
  }
  else if ( bHigh )
  {
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x25u, 6u, 0, 0);
  }
  else
  {
    v15 = pdata->PromiseCharID.n5_code[0];
    v16 = *(_QWORD *)&pdata->PromiseCharID.n5_code[1];
    kProto.DownCharID.n5_code[2] = *(_QWORD *)&pdata->PromiseCharID.n5_code[1] >> 32;
    *(_QWORD *)&kProto.DownCharID.n5_name[0] = __PAIR__(v16, v15);
    *(_QWORD *)&kProto.DownCharID.n5_code[3] = *(_QWORD *)&pdata->PromiseCharID.n5_code[3];
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x25u, 0xAu, &kProto, 20);
  }
}

//----- (00513AA0) --------------------------------------------------------
void __thiscall HolyPromiseAddWin::UpdateMeWin(HolyPromiseAddWin *this, float fCurTime)
{
  HolyPromiseAddWin *v2; // edi@1

  v2 = this;
  if ( g_pkKeyboard->m_aucKeystate[0] & 2 )
  {
    BYTE3(PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID)[73].m_kMsgQ.m_uiAlloced) = 0;
    if ( PgWinMgr::IsIn(&Pgg_kWinMgr, (PgWin *)&this->vfptr) )
      PgTQueue<PgWinMgr::PgWinMsg>::Add(&stru_B6483C, (PgWinMgr::PgWinMsg)__PAIR__(1, (unsigned int)v2));
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (00513B00) --------------------------------------------------------
void __thiscall HolyPromiseWin::OnRemovalPromise(HolyPromiseWin *this)
{
  HolyPromiseWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  signed int v3; // eax@4
  signed int v4; // eax@8
  unsigned int dwData; // [sp+4h] [bp-4h]@5

  v1 = this;
  v2 = this->m_pListLowRankPromise;
  if ( v2 && v1->m_pkListHighRankPromise )
  {
    if ( v1->m_bEnableHighPromise )
    {
      v4 = SlideListWin::GetCurSelIndex(v1->m_pkListHighRankPromise);
      if ( v4 >= 0 && SlideListWin::GetData(v1->m_pkListHighRankPromise, v4, &dwData) && dwData )
        HolyPromiseWin::CheckDay(v1, (PROTO_HOLY_PROMISE_INFO *)dwData, 1);
    }
    else
    {
      v3 = SlideListWin::GetCurSelIndex(v2);
      if ( v3 >= 0 && SlideListWin::GetData(v1->m_pListLowRankPromise, v3, &dwData) )
      {
        if ( dwData )
          HolyPromiseWin::CheckDay(v1, (PROTO_HOLY_PROMISE_INFO *)dwData, 0);
      }
    }
  }
}

//----- (00513B90) --------------------------------------------------------
void __thiscall HolyPromiseWin::UpdateViewList(HolyPromiseWin *this)
{
  HolyPromiseWin *v1; // esi@1
  bool v2; // di@1
  SlideListWin *v3; // ecx@2
  int v4; // ebx@4
  int v5; // edx@12
  int v6; // ecx@12
  int v7; // edx@12
  SlideListWin *v8; // ecx@12
  unsigned int v9; // edi@12
  NiUnsharedGeometryGroup *v10; // eax@13
  NiUnsharedGeometryGroup *v11; // eax@14
  const char *v12; // eax@15
  const char *v13; // eax@18
  int i; // [sp+8h] [bp-34h]@3
  char dest[4]; // [sp+Ch] [bp-30h]@7
  int v16; // [sp+10h] [bp-2Ch]@7
  int v17; // [sp+14h] [bp-28h]@7
  int v18; // [sp+18h] [bp-24h]@7
  int v19; // [sp+1Ch] [bp-20h]@7
  char szText[4]; // [sp+20h] [bp-1Ch]@12
  int v21; // [sp+24h] [bp-18h]@12
  int v22; // [sp+28h] [bp-14h]@12
  int v23; // [sp+2Ch] [bp-10h]@12
  int v24; // [sp+30h] [bp-Ch]@12
  char v25; // [sp+34h] [bp-8h]@12

  v1 = this;
  v2 = 0;
  if ( this->m_pListLowRankPromise )
  {
    v3 = this->m_pkListHighRankPromise;
    if ( v3 )
    {
      SlideListWin::RemoveAllList(v3);
      SlideListWin::RemoveAllList(v1->m_pListLowRankPromise);
      HolyPromiseWin::SetHolyPromiseList(v1, &v1->m_kCHolyPromise.m_HolyPromisesUp, 1);
      SlideListWin::UpdateViewList(v1->m_pkListHighRankPromise);
      i = 0;
      if ( v1->m_kCHolyPromise.m_HolyPromisesMemberCount > 0 )
      {
        v4 = (int)&v1->m_kCHolyPromise.m_HolyPromisesMember[0].PromiseCharID.n5_code[2];
        do
        {
          if ( v4 != 8 )
          {
            if ( v1->m_pListLowRankPromise )
            {
              v19 = 0;
              v18 = 0;
              v17 = 0;
              v16 = 0;
              *(_DWORD *)dest = 0;
              strncpy(dest, &byte_98D631, 0x14u);
              if ( *(_DWORD *)(v4 - 8) != *(_DWORD *)dest
                || *(_DWORD *)(v4 - 4) != v16
                || *(_DWORD *)v4 != v17
                || *(_DWORD *)(v4 + 4) != v18
                || *(_DWORD *)(v4 + 8) != v19 )
              {
                v5 = *(_DWORD *)(v4 - 4);
                v6 = *(_DWORD *)(v4 + 4);
                *(_DWORD *)szText = *(_DWORD *)(v4 - 8);
                v22 = *(_DWORD *)v4;
                v21 = v5;
                v7 = *(_DWORD *)(v4 + 8);
                v23 = v6;
                v8 = v1->m_pListLowRankPromise;
                v24 = v7;
                v25 = 0;
                v9 = SlideListWin::AddText(v8, szText);
                if ( *(_BYTE *)(v4 + 12) & 1 )
                {
                  v10 = TextData::Get(0x95F9F1F2);
                  SlideListWin::SetText(v1->m_pListLowRankPromise, v9, 1u, (const char *)v10);
                  SlideListWin::SetText(v1->m_pListLowRankPromise, v9, 3u, &byte_98D633);
                  SlideListWin::SetFontColor(v1->m_pListLowRankPromise, v9, 255, 255, 0);
                }
                else
                {
                  v11 = TextData::Get(0xF6FF3844);
                  SlideListWin::SetText(v1->m_pListLowRankPromise, v9, 1u, (const char *)v11);
                  SlideListWin::SetFontColor(v1->m_pListLowRankPromise, v9, 200, 200, 200);
                  if ( *(_DWORD *)(v4 + 12) & 0xFFE )
                    v12 = fs(
                            "%d-%d-%d",
                            (*(_DWORD *)(v4 + 12) >> 1) & 0x7FF,
                            (unsigned __int16)*(_DWORD *)(v4 + 12) >> 12,
                            (*(_DWORD *)(v4 + 12) >> 16) & 0x1F);
                  else
                    v12 = (const char *)TextData::Get(0xDA01413E);
                  SlideListWin::SetText(v1->m_pListLowRankPromise, v9, 3u, v12);
                }
                v13 = fs("%d", *(_BYTE *)(v4 + 16));
                SlideListWin::SetText(v1->m_pListLowRankPromise, v9, 2u, v13);
                SlideListWin::SetData(v1->m_pListLowRankPromise, v9, v4 - 8);
                SlideListWin::SetFontSize(v1->m_pListLowRankPromise, v9, 1);
                v2 = 0;
              }
            }
          }
          v4 += 26;
          ++i;
        }
        while ( i < v1->m_kCHolyPromise.m_HolyPromisesMemberCount );
      }
      SlideListWin::Sort(v1->m_pListLowRankPromise, v1->m_nSortColumn, v2, v2);
      SlideListWin::UpdateViewList(v1->m_pListLowRankPromise);
      SlideBar::SetSplitCnt(v1->m_pkSlideBarPromiseList, v1->m_pListLowRankPromise->m_nSlideSplitCnt);
    }
  }
}

//----- (00513E10) --------------------------------------------------------
void __thiscall HolyPromiseWin::ChangeUserName(HolyPromiseWin *this, Name5 *OldName, Name5 *NewName)
{
  HolyPromiseWin *v3; // esi@1
  CHolyPromise *v4; // eax@1
  int Index; // [sp+4h] [bp-4h]@1

  v3 = this;
  Index = 0;
  v4 = CHolyPromise::Get(&this->m_kCHolyPromise, OldName, &Index);
  if ( v4 )
  {
    *(_QWORD *)&v4->m_HolyPromisesUp.PromiseCharID.n5_name[0] = *(_QWORD *)&NewName->n5_code[0];
    *(_QWORD *)&v4->m_HolyPromisesUp.PromiseCharID.n5_code[2] = *(_QWORD *)&NewName->n5_code[2];
    v4->m_HolyPromisesUp.PromiseCharID.n5_code[4] = NewName->n5_code[4];
    HolyPromiseWin::UpdateViewList(v3);
  }
}

//----- (00513E70) --------------------------------------------------------
void __thiscall HolyPromiseWin::OnCommand(HolyPromiseWin *this, unsigned int wParam, int lParam)
{
  HolyPromiseWin *v3; // esi@1

  v3 = this;
  switch ( wParam )
  {
    case 0u:
      HolyPromiseWin::OnLClick(this, lParam);
      break;
    case 1u:
      HolyPromiseWin::OnRClick(this, lParam);
      break;
    case 2u:
      HolyPromiseWin::OnHighRankLClick(this, lParam);
      break;
    case 3u:
      HolyPromiseWin::OnHighRankRClick(this, lParam);
      break;
    case 4u:
      if ( this == (HolyPromiseWin *)g_pkToolTipWin->m_pkToolTipParentWin )
        ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
      GameFrameWork::CloseCommunityWin((GameFrameWork *)v3->m_pkFrameWork);
      break;
    case 5u:
      HolyPromiseWin::OnSortByTitle01(this);
      break;
    case 6u:
      HolyPromiseWin::OnSortByTitle02(this);
      break;
    case 7u:
      HolyPromiseWin::OnSortByTitle03(this);
      break;
    case 8u:
      HolyPromiseWin::OnSortByTitle04(this);
      break;
    case 0xAu:
      HolyPromiseWin::OnChangeTab(this, 0);
      break;
    case 0xBu:
      HolyPromiseWin::OnChangeTab(this, TE_GUILD);
      break;
    case 0xDu:
      HolyPromiseWin::OnChangeTab(this, TE_WEDDING);
      break;
    case 0xEu:
      HolyPromiseWin::OnChangeTab(this, TE_PARTYMATCH);
      break;
    case 0xCu:
      HolyPromiseWin::OnChangeTab(this, TE_GUILDACADEMY);
      break;
    case 0x10u:
      GameFrameWork::OpenHolyPromiseAddWin((GameFrameWork *)this->m_pkFrameWork);
      break;
    case 0x11u:
      HolyPromiseWin::OnSendWhisper(this);
      break;
    case 0x12u:
      HolyPromiseWin::OnRemovalPromise(this);
      break;
    case 0x13u:
      HolyPromiseWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (00513FD0) --------------------------------------------------------
void __thiscall HolyPromiseWin::SetHignHolyPromise(HolyPromiseWin *this, PROTO_HOLY_PROMISE_INFO *pkInfo)
{
  HolyPromiseWin *v2; // esi@1

  v2 = this;
  CHolyPromise::SetUp(&this->m_kCHolyPromise, pkInfo);
  HolyPromiseWin::UpdateViewList(v2);
}

//----- (00514000) --------------------------------------------------------
void __thiscall HolyPromiseWin::DelHolyPromise(HolyPromiseWin *this, Name5 CharID)
{
  HolyPromiseWin *v2; // esi@1

  v2 = this;
  CHolyPromise::Del(&this->m_kCHolyPromise, &CharID);
  HolyPromiseWin::UpdateViewList(v2);
}

//----- (00514030) --------------------------------------------------------
void __thiscall HolyPromiseWin::DelUpHolyPromise(HolyPromiseWin *this)
{
  HolyPromiseWin *v1; // esi@1

  v1 = this;
  CHolyPromise::DelUp(&this->m_kCHolyPromise);
  HolyPromiseWin::UpdateViewList(v1);
}

//----- (00514050) --------------------------------------------------------
void __thiscall HolyPromiseWin::AddHolyPromiseList(HolyPromiseWin *this, PROTO_NC_HOLY_PROMISE_LIST_CMD *pInfo)
{
  HolyPromiseWin *v2; // esi@1

  v2 = this;
  CHolyPromise::Add(&this->m_kCHolyPromise, pInfo);
  HolyPromiseWin::UpdateViewList(v2);
}

//----- (00514080) --------------------------------------------------------
void __thiscall HolyPromiseWin::AddPromise(HolyPromiseWin *this, PROTO_HOLY_PROMISE_INFO *pkInfo)
{
  HolyPromiseWin *v2; // esi@1

  v2 = this;
  CHolyPromise::Add(&this->m_kCHolyPromise, pkInfo);
  HolyPromiseWin::UpdateViewList(v2);
}

//----- (005140B0) --------------------------------------------------------
void __thiscall HolyPromiseWin::SetLogin(HolyPromiseWin *this, Name5 *pCharID)
{
  HolyPromiseWin *v2; // esi@1

  v2 = this;
  CHolyPromise::Login(&this->m_kCHolyPromise, pCharID);
  HolyPromiseWin::UpdateViewList(v2);
}

//----- (005140E0) --------------------------------------------------------
void __thiscall HolyPromiseWin::SetLogOut(HolyPromiseWin *this, Name5 *pCharID)
{
  HolyPromiseWin *v2; // esi@1

  v2 = this;
  CHolyPromise::Logout(&this->m_kCHolyPromise, pCharID);
  HolyPromiseWin::UpdateViewList(v2);
}

//----- (00514110) --------------------------------------------------------
void __thiscall HolyPromiseWin::SetLevelChange(HolyPromiseWin *this, Name5 *pCharID, char Level)
{
  HolyPromiseWin *v3; // esi@1

  v3 = this;
  CHolyPromise::LevelChange(&this->m_kCHolyPromise, pCharID, Level);
  HolyPromiseWin::UpdateViewList(v3);
}

//----- (00514140) --------------------------------------------------------
HolyPromiseAddWin *__cdecl HolyPromiseAddWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  HolyPromiseAddWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x15Cu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&HolyPromiseAddWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&HolyPromiseAddWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (HolyPromiseAddWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 98DAFC: using guessed type void (__thiscall *HolyPromiseAddWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98DB1C: using guessed type int (__thiscall *HolyPromiseAddWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00514280) --------------------------------------------------------
void __thiscall HolyPromiseWin::DirectMessage(HolyPromiseWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  HolyPromiseWin *v4; // esi@1
  int v5; // edx@12
  PROTO_HOLY_PROMISE_DATE v6; // ecx@12
  int v7; // eax@12
  int v8; // ecx@12
  int v9; // eax@12
  unsigned int v10; // eax@14
  unsigned int v11; // edx@14
  unsigned int v12; // ecx@14
  unsigned int v13; // eax@14
  unsigned int v14; // eax@14
  unsigned int v15; // edx@18
  unsigned int v16; // ecx@18
  unsigned int v17; // eax@18
  unsigned int v18; // edx@18
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v19; // edx@18
  PROTO_NC_HOLY_PROMISE_SET_UP_CONFIRM_ACK *v20; // [sp-Ch] [bp-5Ch]@14
  unsigned int _Keyval; // [sp+4h] [bp-4Ch]@14
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > iter; // [sp+8h] [bp-48h]@14
  int pProto; // [sp+Ch] [bp-44h]@12
  PROTO_HOLY_PROMISE_DATE v24; // [sp+10h] [bp-40h]@12
  int v25; // [sp+14h] [bp-3Ch]@12
  int v26; // [sp+18h] [bp-38h]@12
  int v27; // [sp+1Ch] [bp-34h]@12
  PROTO_NC_HOLY_PROMISE_SET_UP_CONFIRM_ACK kProto; // [sp+20h] [bp-30h]@14

  v4 = this;
  if ( iMsgTag == 27 )
  {
    if ( !pvBody )
      return;
    if ( *(_DWORD *)pvBody )
    {
      if ( *(_DWORD *)pvBody != 1 )
        return;
      if ( this->m_kCHolyPromise.m_HolyPromisesMember[13].PromiseCharID.n5_name[11] )
      {
LABEL_10:
        v4->m_kCHolyPromise.m_HolyPromisesMember[13].PromiseCharID.n5_name[11] = 0;
        return;
      }
      if ( this->m_kCHolyPromise.m_HolyPromisesMember[13].PromiseCharID.n5_name[12] )
      {
LABEL_13:
        v4->m_kCHolyPromise.m_HolyPromisesMember[13].PromiseCharID.n5_name[12] = 0;
        return;
      }
      PROTO_NC_HOLY_PROMISE_SET_UP_CONFIRM_ACK::PROTO_NC_HOLY_PROMISE_SET_UP_CONFIRM_ACK(&kProto);
      v15 = *(unsigned int *)((char *)&v4->m_kCHolyPromise.m_HolyPromisesMember[11].LogonInfo + 2);
      v16 = v4->m_kCHolyPromise.m_HolyPromisesMember[12].PromiseCharID.n5_code[1];
      kProto.UpCharID.n5_code[1] = v4->m_kCHolyPromise.m_HolyPromisesMember[12].PromiseCharID.n5_code[0];
      v17 = v4->m_kCHolyPromise.m_HolyPromisesMember[12].PromiseCharID.n5_code[3];
      kProto.UpCharID.n5_code[0] = v15;
      v18 = v4->m_kCHolyPromise.m_HolyPromisesMember[12].PromiseCharID.n5_code[2];
      kProto.UpCharID.n5_code[2] = v16;
      *(_QWORD *)&kProto.UpCharID.n5_code[3] = __PAIR__(v17, v18);
      v19 = (std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *)pkFrom->m_uiMessageNum;
      kProto.bAccept = 0;
      iter._Ptr = v19;
      std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::find(
        (std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *)((char *)&v4->m_kCHolyPromise.m_HolyPromisesMember[13].PromiseCharID.n5_code[4] + 2),
        (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > *)&_Keyval,
        (const unsigned int *)&iter);
      *(_QWORD *)&kProto.CharID.n5_name[0] = *(_QWORD *)(_Keyval + 16);
      *(_QWORD *)&kProto.CharID.n5_code[2] = *(_QWORD *)(_Keyval + 24);
      kProto.CharID.n5_code[4] = *(_DWORD *)(_Keyval + 32);
      v20 = &kProto;
    }
    else
    {
      if ( this->m_kCHolyPromise.m_HolyPromisesMember[13].PromiseCharID.n5_name[11] )
      {
        NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x25u, 6u, 0, 0);
        goto LABEL_10;
      }
      if ( this->m_kCHolyPromise.m_HolyPromisesMember[13].PromiseCharID.n5_name[12] )
      {
        v5 = *(_DWORD *)&this->m_kCHolyPromise.m_HolyPromisesMember[12].Level;
        v6 = this->m_kCHolyPromise.m_HolyPromisesMember[12].LogonInfo;
        v7 = v4->m_kCHolyPromise.m_HolyPromisesMember[12].PromiseCharID.n5_code[4];
        v25 = v5;
        v24 = v6;
        v8 = *(unsigned int *)((char *)&v4->m_kCHolyPromise.m_HolyPromisesMember[13].PromiseCharID.n5_code[1] + 2);
        pProto = v7;
        v9 = *(unsigned int *)((char *)&v4->m_kCHolyPromise.m_HolyPromisesMember[13].PromiseCharID.n5_code[0] + 2);
        v27 = v8;
        v26 = v9;
        NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x25u, 0xAu, &pProto, 20);
        goto LABEL_13;
      }
      PROTO_NC_HOLY_PROMISE_SET_UP_CONFIRM_ACK::PROTO_NC_HOLY_PROMISE_SET_UP_CONFIRM_ACK(&kProto);
      v10 = *(unsigned int *)((char *)&v4->m_kCHolyPromise.m_HolyPromisesMember[11].LogonInfo + 2);
      v11 = v4->m_kCHolyPromise.m_HolyPromisesMember[12].PromiseCharID.n5_code[1];
      kProto.UpCharID.n5_code[1] = v4->m_kCHolyPromise.m_HolyPromisesMember[12].PromiseCharID.n5_code[0];
      v12 = v4->m_kCHolyPromise.m_HolyPromisesMember[12].PromiseCharID.n5_code[3];
      kProto.UpCharID.n5_code[0] = v10;
      v13 = v4->m_kCHolyPromise.m_HolyPromisesMember[12].PromiseCharID.n5_code[2];
      kProto.UpCharID.n5_code[2] = v11;
      *(_QWORD *)&kProto.UpCharID.n5_code[3] = __PAIR__(v12, v13);
      v14 = pkFrom->m_uiMessageNum;
      kProto.bAccept = 1;
      _Keyval = v14;
      std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::find(
        (std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *)((char *)&v4->m_kCHolyPromise.m_HolyPromisesMember[13].PromiseCharID.n5_code[4] + 2),
        &iter,
        &_Keyval);
      *(_QWORD *)&kProto.CharID.n5_name[0] = *(_QWORD *)&iter._Ptr->_Myval.second.n5_name[0];
      *(_QWORD *)&kProto.CharID.n5_code[2] = *(_QWORD *)&iter._Ptr->_Myval.second.n5_code[2];
      kProto.CharID.n5_code[4] = iter._Ptr->_Myval.second.n5_code[4];
      v20 = &kProto;
    }
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x25u, 5u, v20, 41);
    return;
  }
  if ( iMsgTag == 69 )
  {
    HolyPromiseWin::OnSendWhisper((HolyPromiseWin *)((char *)this - 232));
  }
  else if ( iMsgTag == 70 )
  {
    HolyPromiseWin::OnRemovalPromise((HolyPromiseWin *)((char *)this - 232));
  }
}

//----- (005144D0) --------------------------------------------------------
void __thiscall HolyPromiseWin::SetID(HolyPromiseWin *this, Name5 RequestID, Name5 HighID)
{
  HolyPromiseWin *v3; // esi@1
  unsigned int v4; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v5; // eax@1
  std::pair<unsigned int const ,Name5> _Val; // [sp+Ch] [bp-20h]@1
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > >,bool> result; // [sp+24h] [bp-8h]@1

  v3 = this;
  this->m_kRequestCharID.n5_code[4] = RequestID.n5_code[4];
  *(_QWORD *)&this->m_kRequestCharID.n5_name[0] = *(_QWORD *)&RequestID.n5_name[0];
  *(_QWORD *)&this->m_kRequestCharID.n5_code[2] = *(_QWORD *)&RequestID.n5_code[2];
  this->m_kHighCharID.n5_code[0] = HighID.n5_code[0];
  *(_QWORD *)&this->m_kHighCharID.n5_code[1] = *(_QWORD *)&HighID.n5_code[1];
  this->m_kHighCharID.n5_code[3] = HighID.n5_code[3];
  _Val.second.n5_code[1] = RequestID.n5_code[1];
  this->m_kHighCharID.n5_code[4] = HighID.n5_code[4];
  v4 = this->m_uiCharNum;
  _Val.second.n5_code[0] = RequestID.n5_code[0];
  _Val.first = v4;
  *(_QWORD *)&_Val.second.n5_code[2] = *(_QWORD *)&RequestID.n5_code[2];
  _Val.second.n5_code[4] = RequestID.n5_code[4];
  v5 = std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Buynode<std::pair<unsigned int const,Name5>>(
         (std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *)&this->m_kCharNameIndex.comp,
         &_Val);
  std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *)&v3->m_kCharNameIndex.comp,
    &result,
    v5,
    0);
  ++v3->m_uiCharNum;
}

//----- (00514580) --------------------------------------------------------
void __thiscall HolyPromiseWin::Terminate(HolyPromiseWin *this)
{
  HolyPromiseWin *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v2; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v3; // eax@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > result; // [sp+4h] [bp-4h]@2

  v1 = this;
  v2 = this->m_kCharNameIndex._Myhead;
  v3 = v2->_Left;
  if ( v2->_Left != v2 )
  {
    do
      v3 = std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::erase(
             (std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *)&v1->m_kCharNameIndex.comp,
             &result,
             (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > >)v3)->_Ptr;
    while ( v3 != v1->m_kCharNameIndex._Myhead );
  }
  std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::clear((std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *)&v1->m_kCharNameIndex.comp);
  v1->m_uiCharNum = 0;
}

//----- (005145D0) --------------------------------------------------------
void __thiscall HolyPromiseWin::~HolyPromiseWin(HolyPromiseWin *this)
{
  HolyPromiseWin *v1; // esi@1
  char *v2; // edi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v3; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > v4; // ST04_4@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > result; // [sp+Ch] [bp-18h]@1
  std::map<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> > > *v6; // [sp+10h] [bp-14h]@1
  HolyPromiseWin *v7; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v1 = this;
  v7 = this;
  this->vfptr = (NiRefObjectVtbl *)&HolyPromiseWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&HolyPromiseWin::`vftable'{for `IDirectMessenger'};
  v8 = 0;
  v2 = (char *)&this->m_kCharNameIndex;
  v6 = &this->m_kCharNameIndex;
  v3 = this->m_kCharNameIndex._Myhead;
  v4._Ptr = v3->_Left;
  LOBYTE(v8) = 2;
  std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *)&this->m_kCharNameIndex.comp,
    &result,
    v4,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > >)v3);
  operator delete(*((void **)v2 + 1));
  LOBYTE(v8) = 0;
  CHolyPromise::~CHolyPromise(&v1->m_kCHolyPromise);
  v8 = -1;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 98DD40: using guessed type void (__thiscall *HolyPromiseWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98DD5C: using guessed type int (__thiscall *HolyPromiseWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00514670) --------------------------------------------------------
void __thiscall HolyPromiseWin::HolyPromiseWin(HolyPromiseWin *this)
{
  HolyPromiseWin *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v2; // eax@1
  int v3; // ST0C_4@2
  int v4; // ST00_4@2
  std::exception pExceptionObject; // [sp+10h] [bp-20h]@3
  HolyPromiseWin *v6; // [sp+1Ch] [bp-14h]@1
  char *_What; // [sp+20h] [bp-10h]@3
  int v8; // [sp+2Ch] [bp-4h]@1

  v1 = this;
  v6 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v8 = 0;
  v1->vfptr = (NiRefObjectVtbl *)&HolyPromiseWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&HolyPromiseWin::`vftable'{for `IDirectMessenger'};
  CHolyPromise::CHolyPromise(&v1->m_kCHolyPromise);
  v1->m_kRequestCharID.n5_code[4] = 0;
  v1->m_kRequestCharID.n5_code[3] = 0;
  v1->m_kRequestCharID.n5_code[2] = 0;
  v1->m_kRequestCharID.n5_code[1] = 0;
  v1->m_kRequestCharID.n5_code[0] = 0;
  v1->m_kHighCharID.n5_code[4] = 0;
  v1->m_kHighCharID.n5_code[3] = 0;
  v1->m_kHighCharID.n5_code[2] = 0;
  v1->m_kHighCharID.n5_code[1] = 0;
  v1->m_kHighCharID.n5_code[0] = 0;
  v1->m_kDelLowCharID.n5_code[4] = 0;
  v1->m_kDelLowCharID.n5_code[3] = 0;
  v1->m_kDelLowCharID.n5_code[2] = 0;
  v1->m_kDelLowCharID.n5_code[1] = 0;
  v1->m_kDelLowCharID.n5_code[0] = 0;
  LOBYTE(v8) = 1;
  v1->m_kCharNameIndex._Mysize = 0;
  v2 = (std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *)operator new(0x28u);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_kCharNameIndex._Myhead = v2;
  v2->_Left = v2;
  v1->m_kCharNameIndex._Myhead->_Parent = v1->m_kCharNameIndex._Myhead;
  v1->m_kCharNameIndex._Myhead->_Right = v1->m_kCharNameIndex._Myhead;
  v1->m_kCharNameIndex._Myhead->_Color = 1;
  v1->m_kCharNameIndex._Myhead->_Isnil = 1;
  v1->m_pkName = 0;
  v1->m_pkLogInfo = 0;
  v1->m_pkLevel = 0;
  v1->m_LastConnect = 0;
  v1->m_spPopupMenu = 0;
  v1->m_pkListHighRankPromise = 0;
  v1->m_pListLowRankPromise = 0;
  v1->m_pkSlideBarPromiseList = 0;
  v1->m_nSortColumn = 0;
  v1->m_bEnableHighPromise = 0;
  memset(v1->m_kCHolyPromise.m_HolyPromisesUp.PromiseCharID.n5_name, 0, 0x228u);
  v1->m_kRequestCharID.n5_code[4] = 0;
  v1->m_kRequestCharID.n5_code[3] = 0;
  v1->m_kRequestCharID.n5_code[2] = 0;
  v1->m_kRequestCharID.n5_code[1] = 0;
  v1->m_kRequestCharID.n5_code[0] = 0;
  strncpy(v1->m_kRequestCharID.n5_name, &byte_98D617, 0x14u);
  v3 = (int)&v1->m_kHighCharID;
  *(_DWORD *)(v3 + 16) = 0;
  *(_DWORD *)(v3 + 12) = 0;
  *(_DWORD *)(v3 + 8) = 0;
  *(_DWORD *)(v3 + 4) = 0;
  *(_DWORD *)v3 = 0;
  strncpy(v1->m_kHighCharID.n5_name, &byte_98D61E, 0x14u);
  v4 = (int)&v1->m_kDelLowCharID;
  *(_DWORD *)(v4 + 16) = 0;
  *(_DWORD *)(v4 + 12) = 0;
  *(_DWORD *)(v4 + 8) = 0;
  *(_DWORD *)(v4 + 4) = 0;
  *(_DWORD *)v4 = 0;
  strncpy(v1->m_kDelLowCharID.n5_name, &byte_98D61F, 0x14u);
  *(_WORD *)&v1->m_bDelHigh = 0;
  v1->m_uiCharNum = 0;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 98DD40: using guessed type void (__thiscall *HolyPromiseWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98DD5C: using guessed type int (__thiscall *HolyPromiseWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00514860) --------------------------------------------------------
HolyPromiseWin *__cdecl HolyPromiseWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  HolyPromiseWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x3F8u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    HolyPromiseWin::HolyPromiseWin((HolyPromiseWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (HolyPromiseWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00514990) --------------------------------------------------------
char __thiscall HolyPromiseWin::Create(HolyPromiseWin *this, PgFrameWork *pkFrameWork)
{
  HolyPromiseWin *v2; // esi@1
  NiTexturePalette *v3; // ebx@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  LONG v7; // eax@6
  int v9; // edi@11
  int v10; // ebx@11
  NiSourceTexture *v11; // eax@11
  PgSprData *v12; // eax@12
  PgSprData *v13; // eax@14
  PgFont *v14; // eax@17
  PgWinText *v15; // eax@17
  NiRefObjectVtbl *v16; // edx@17
  NiUnsharedGeometryGroup *v17; // eax@17
  PgSprData *v18; // eax@19
  PgSprData *v19; // eax@19
  PgFont *v20; // eax@19
  PgWinText *v21; // eax@19
  NiRefObjectVtbl *v22; // edx@19
  NiUnsharedGeometryGroup *v23; // eax@19
  PgFont *v24; // eax@19
  PgWinText *v25; // eax@19
  NiRefObjectVtbl *v26; // edx@19
  NiUnsharedGeometryGroup *v27; // eax@19
  PgFont *v28; // eax@19
  PgWinText *v29; // eax@19
  NiRefObjectVtbl *v30; // edx@19
  NiUnsharedGeometryGroup *v31; // eax@19
  SLWCreateInfo::Item *v32; // eax@19
  SLWCreateInfo::Item *v33; // eax@27
  PgSprData *v34; // eax@33
  SlideListWin *v35; // eax@33
  PgSprData *v36; // eax@33
  PgFont *v37; // eax@33
  PgWinText *v38; // eax@33
  NiRefObjectVtbl *v39; // edx@33
  NiUnsharedGeometryGroup *v40; // eax@33
  SLWCreateInfo::Item *v41; // eax@33
  SLWCreateInfo::Item *v42; // eax@41
  PgSprData *v43; // eax@47
  SlideListWin *v44; // eax@47
  PgSprData *v45; // eax@47
  SlideBar *v46; // eax@47
  int v47; // eax@47
  PgWinText *v48; // edx@47
  PgFont *v49; // eax@47
  PgWinText *v50; // eax@47
  NiRefObjectVtbl *v51; // edx@47
  NiUnsharedGeometryGroup *v52; // eax@47
  float v53; // ecx@47
  PgWinText *v54; // eax@47
  PgFont *v55; // eax@47
  PgWinText *v56; // eax@47
  NiRefObjectVtbl *v57; // edx@47
  NiUnsharedGeometryGroup *v58; // eax@47
  float v59; // ecx@47
  PgWinText *v60; // eax@47
  PgFont *v61; // eax@47
  PgWinText *v62; // eax@47
  NiRefObjectVtbl *v63; // edx@47
  NiUnsharedGeometryGroup *v64; // eax@47
  float v65; // ecx@47
  PgWinText *v66; // eax@47
  PgFont *v67; // eax@47
  PgWinText *v68; // eax@47
  NiRefObjectVtbl *v69; // edx@47
  NiUnsharedGeometryGroup *v70; // eax@47
  char *v71; // eax@47
  int v72; // eax@47
  PgWinText *v73; // edx@47
  PgFont *v74; // eax@47
  PgWinText *v75; // eax@47
  NiRefObjectVtbl *v76; // edx@47
  NiUnsharedGeometryGroup *v77; // eax@47
  float v78; // ecx@47
  PgWinText *v79; // eax@47
  PgFont *v80; // eax@47
  PgWinText *v81; // eax@47
  NiRefObjectVtbl *v82; // edx@47
  NiUnsharedGeometryGroup *v83; // eax@47
  char *v84; // eax@47
  int v85; // eax@47
  PgWinText *v86; // edx@47
  PgFont *v87; // eax@47
  PgWinText *v88; // eax@47
  NiRefObjectVtbl *v89; // edx@47
  NiUnsharedGeometryGroup *v90; // eax@47
  PgSprData *v91; // eax@47
  char *v92; // eax@47
  char *v93; // eax@47
  char *v94; // eax@47
  char *v95; // eax@47
  char *v96; // eax@47
  PgWinBut *v97; // edi@47
  char *v98; // eax@47
  NiPointer<PgSprData::PgHitTester> *v99; // ecx@47
  unsigned int v100; // edi@47
  unsigned int v101; // ebx@47
  PgFont *v102; // eax@47
  PgWinText *v103; // edi@47
  NiRefObjectVtbl *v104; // ebx@47
  NiUnsharedGeometryGroup *v105; // eax@47
  PgSprData::PgHitTester *v106; // eax@47
  unsigned int v107; // edi@47
  unsigned int v108; // ebx@47
  PgFont *v109; // eax@47
  PgWinText *v110; // edi@47
  NiRefObjectVtbl *v111; // ebx@47
  NiUnsharedGeometryGroup *v112; // eax@47
  NiPointer<PgSprData::PgHitTester> *v113; // ecx@47
  unsigned int v114; // edi@47
  unsigned int v115; // ebx@47
  PgFont *v116; // eax@47
  PgWinText *v117; // edi@47
  NiRefObjectVtbl *v118; // ebx@47
  NiUnsharedGeometryGroup *v119; // eax@47
  PgSprData::PgHitTester *v120; // eax@47
  unsigned int v121; // edi@47
  unsigned int v122; // ebx@47
  PgFont *v123; // eax@47
  PgWinText *v124; // edi@47
  NiRefObjectVtbl *v125; // ebx@47
  NiUnsharedGeometryGroup *v126; // eax@47
  NiPointer<PgSprData::PgHitTester> *v127; // ecx@47
  unsigned int v128; // edi@47
  unsigned int v129; // ebx@47
  PgFont *v130; // eax@47
  PgWinText *v131; // edi@47
  NiRefObjectVtbl *v132; // ebx@47
  NiUnsharedGeometryGroup *v133; // eax@47
  PgSprData::PgHitTester *v134; // eax@47
  unsigned int v135; // edi@47
  unsigned int v136; // ebx@47
  PgFont *v137; // eax@47
  PgWinText *v138; // edi@47
  NiRefObjectVtbl *v139; // ebx@47
  NiUnsharedGeometryGroup *v140; // eax@47
  NiSourceTexture *v141; // eax@47
  PopupMenuWin *v142; // eax@47
  char *v143; // eax@47
  PopupMenuText *v144; // edi@47
  char *v145; // eax@47
  PopupMenuText *v146; // edi@47
  NiNode *v147; // esi@48
  SLWCreateInfo kCreateInfo; // [sp+108h] [bp-80h]@19
  SLWCreateInfo kCreateInfo2; // [sp+124h] [bp-64h]@33
  unsigned int uiHeight; // [sp+140h] [bp-48h]@14
  unsigned int uiWidth; // [sp+144h] [bp-44h]@14
  int uiTop; // [sp+148h] [bp-40h]@4
  int uiLeft; // [sp+14Ch] [bp-3Ch]@4
  NiPointer<NiNode> spNode; // [sp+150h] [bp-38h]@1
  SLWCreateInfo::Item *pCIItem2; // [sp+154h] [bp-34h]@17
  PgWinText *pkTextWin; // [sp+158h] [bp-30h]@17
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+15Ch] [bp-2Ch]@19
  int v158; // [sp+184h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  this->m_pkFrameWork = pkFrameWork;
  v3 = pTexturePalette;
  v158 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\HolyPromis.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "HolyPromisWin", 0) )
  {
    v6 = spNode.m_pObject;
    v158 = -1;
    if ( spNode.m_pObject )
    {
      v7 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
      goto LABEL_7;
    }
    return 0;
  }
  v9 = uiLeft;
  v10 = uiTop;
  v11 = MenuTexMgr::GetTexture(0x13u);
  if ( v11 )
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v11);
  else
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v13, (PgWin *)&v2->vfptr, 0, 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "WinTitle",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
  {
    v6 = spNode.m_pObject;
    v158 = -1;
    if ( spNode.m_pObject )
    {
      v7 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
LABEL_7:
      if ( !v7 )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    return 0;
  }
  v14 = Font::Get(MAIN_MENU);
  v15 = PgWinText::CreateWin(uiLeft - v9, uiTop - v10, uiWidth, uiHeight, v14, (PgWin *)&v2->vfptr, 0, 0);
  v16 = v15->vfptr;
  pkTextWin = v15;
  v16[122].__vecDelDtor((NiRefObject *)v15, 1u);
  ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
  pCIItem2 = (SLWCreateInfo::Item *)pkTextWin->vfptr;
  v17 = TextData::Get(0xE3504941);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))&pCIItem2[4].bAbbreviatable)(pkTextWin, v17);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 4u, 0, 0);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "HelpLinkNor",
                               &uiLeft,
                               &uiTop,
                               0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x13u, 0, 0);
  }
  v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v18, (PgWin *)&v2->vfptr, 0, 0);
  v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Promis01", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v19, (PgWin *)&v2->vfptr, 0, 0);
  v20 = Font::Get(MAIN_MENU);
  v21 = PgWinText::CreateWin(uiLeft - v9 + 130, uiTop - v10, uiWidth, uiHeight, v20, (PgWin *)&v2->vfptr, 0, 0);
  v22 = v21->vfptr;
  pkTextWin = v21;
  v22[122].__vecDelDtor((NiRefObject *)v21, 1u);
  ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
  pCIItem2 = (SLWCreateInfo::Item *)pkTextWin->vfptr;
  v23 = TextData::Get(0x83A47797);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))&pCIItem2[4].bAbbreviatable)(pkTextWin, v23);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &uiLeft, &uiTop, 0);
  v24 = Font::Get(TITLEBOLD);
  v25 = PgWinText::CreateWin(uiLeft - v9, uiTop - v10, uiWidth, uiHeight, v24, (PgWin *)&v2->vfptr, 0, 0);
  v26 = v25->vfptr;
  pkTextWin = v25;
  v26[122].__vecDelDtor((NiRefObject *)v25, 5u);
  pCIItem2 = (SLWCreateInfo::Item *)pkTextWin->vfptr;
  v27 = TextData::Get(0xF44C3A3C);
  (*(void (__thiscall **)(_DWORD, _DWORD))&pCIItem2[4].bAbbreviatable)(pkTextWin, v27);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Category", &uiLeft, &uiTop, 0);
  v28 = Font::Get(TITLEBOLD);
  v29 = PgWinText::CreateWin(uiLeft - v9, uiTop - v10, uiWidth, uiHeight, v28, (PgWin *)&v2->vfptr, 0, 0);
  v30 = v29->vfptr;
  pkTextWin = v29;
  v30[122].__vecDelDtor((NiRefObject *)v29, 5u);
  pCIItem2 = (SLWCreateInfo::Item *)pkTextWin->vfptr;
  v31 = TextData3::Get(0x2E4A1B0Bu);
  (*(void (__thiscall **)(_DWORD, _DWORD))&pCIItem2[4].bAbbreviatable)(pkTextWin, v31);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  kCreateInfo.m_arrItem._Myfirst = 0;
  kCreateInfo.m_arrItem._Mylast = 0;
  kCreateInfo.m_arrItem._Myend = 0;
  kCreateInfo.m_bMakeData = 0;
  kCreateInfo.m_nOffX = 0;
  kCreateInfo.m_nOffY = 0;
  LOBYTE(v158) = 1;
  v32 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
  v32->nItemType = 1;
  v32->pNode = spNode.m_pObject;
  pCIItem2 = v32;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBar01Nor", 0xEu);
  LOBYTE(v158) = 2;
  pCIItem2 = (SLWCreateInfo::Item *)((char *)pCIItem2 + 72);
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pCIItem2,
    &_Val);
  LOBYTE(v158) = 1;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBar01Click", 0x10u);
  LOBYTE(v158) = 3;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pCIItem2,
    &_Val);
  LOBYTE(v158) = 1;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBar01Over", 0xFu);
  LOBYTE(v158) = 4;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pCIItem2,
    &_Val);
  LOBYTE(v158) = 1;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  pCIItem2 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pCIItem2->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column01", 8u);
  LOBYTE(v158) = 5;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &pCIItem2->vecNodeName,
    &_Val);
  LOBYTE(v158) = 1;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v33 = pCIItem2;
  pCIItem2->pNode = spNode.m_pObject;
  v33->bAbbreviatable = 1;
  pCIItem2 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pCIItem2->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column02", 8u);
  LOBYTE(v158) = 6;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &pCIItem2->vecNodeName,
    &_Val);
  LOBYTE(v158) = 1;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  pCIItem2->pNode = spNode.m_pObject;
  pCIItem2 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pCIItem2->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column03", 8u);
  LOBYTE(v158) = 7;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &pCIItem2->vecNodeName,
    &_Val);
  LOBYTE(v158) = 1;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  pCIItem2->pNode = spNode.m_pObject;
  pCIItem2 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pCIItem2->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column04", 8u);
  LOBYTE(v158) = 8;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &pCIItem2->vecNodeName,
    &_Val);
  LOBYTE(v158) = 1;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  pCIItem2->pNode = spNode.m_pObject;
  SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
  v34 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextBox01", &uiLeft, &uiTop, 0);
  v35 = SlideListWin::CreateWin(uiLeft - v9, uiTop - v10, v34, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
  v2->m_pkListHighRankPromise = v35;
  v35->m_uiRClickMsg = 3;
  v2->m_pkListHighRankPromise->m_uiLClickMsg = 2;
  SlideListWin::UpdateViewList(v2->m_pkListHighRankPromise);
  SLWCreateInfo::Clear(&kCreateInfo);
  v36 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Promis02", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v36, (PgWin *)&v2->vfptr, 0, 0);
  v37 = Font::Get(MAIN_MENU);
  v38 = PgWinText::CreateWin(uiLeft - v9 + 130, uiTop - v10, uiWidth, uiHeight, v37, (PgWin *)&v2->vfptr, 0, 0);
  v39 = v38->vfptr;
  pkTextWin = v38;
  v39[122].__vecDelDtor((NiRefObject *)v38, 1u);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
  pCIItem2 = (SLWCreateInfo::Item *)pkTextWin->vfptr;
  v40 = TextData::Get(0x53A38988u);
  (*(void (__thiscall **)(_DWORD, _DWORD))&pCIItem2[4].bAbbreviatable)(pkTextWin, v40);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  kCreateInfo2.m_arrItem._Myfirst = 0;
  kCreateInfo2.m_arrItem._Mylast = 0;
  kCreateInfo2.m_arrItem._Myend = 0;
  kCreateInfo2.m_bMakeData = 0;
  kCreateInfo2.m_nOffX = 0;
  kCreateInfo2.m_nOffY = 0;
  LOBYTE(v158) = 9;
  v41 = SLWCreateInfo::AddItemInfo(&kCreateInfo2, 1);
  v41->nItemType = 1;
  v41->pNode = spNode.m_pObject;
  pCIItem2 = v41;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBar02Nor", 0xEu);
  LOBYTE(v158) = 10;
  pCIItem2 = (SLWCreateInfo::Item *)((char *)pCIItem2 + 72);
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pCIItem2,
    &_Val);
  LOBYTE(v158) = 9;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBar02Click", 0x10u);
  LOBYTE(v158) = 11;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pCIItem2,
    &_Val);
  LOBYTE(v158) = 9;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBar02Over", 0xFu);
  LOBYTE(v158) = 12;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pCIItem2,
    &_Val);
  LOBYTE(v158) = 9;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  pCIItem2 = SLWCreateInfo::AddItemInfo(&kCreateInfo2, 2);
  pCIItem2->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column05", 8u);
  LOBYTE(v158) = 13;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &pCIItem2->vecNodeName,
    &_Val);
  LOBYTE(v158) = 9;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v42 = pCIItem2;
  pCIItem2->pNode = spNode.m_pObject;
  v42->bAbbreviatable = 1;
  pCIItem2 = SLWCreateInfo::AddItemInfo(&kCreateInfo2, 2);
  pCIItem2->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column06", 8u);
  LOBYTE(v158) = 14;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &pCIItem2->vecNodeName,
    &_Val);
  LOBYTE(v158) = 9;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  pCIItem2->pNode = spNode.m_pObject;
  pCIItem2 = SLWCreateInfo::AddItemInfo(&kCreateInfo2, 2);
  pCIItem2->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column07", 8u);
  LOBYTE(v158) = 15;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &pCIItem2->vecNodeName,
    &_Val);
  LOBYTE(v158) = 9;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  pCIItem2->pNode = spNode.m_pObject;
  pCIItem2 = SLWCreateInfo::AddItemInfo(&kCreateInfo2, 2);
  pCIItem2->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column08", 8u);
  LOBYTE(v158) = 16;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &pCIItem2->vecNodeName,
    &_Val);
  LOBYTE(v158) = 9;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  pCIItem2->pNode = spNode.m_pObject;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  kCreateInfo2.m_nOffX = 4;
  kCreateInfo2.m_nOffY = 0;
  SLWCreateInfo::MakeTempData(&kCreateInfo2, 0);
  v43 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextBox02", &uiLeft, &uiTop, 0);
  v44 = SlideListWin::CreateWin(uiLeft - v9, uiTop - v10, v43, (PgWin *)&v2->vfptr, &kCreateInfo2, 0, 0);
  v2->m_pListLowRankPromise = v44;
  v44->m_uiRClickMsg = 1;
  v2->m_pListLowRankPromise->m_uiLClickMsg = 0;
  SlideListWin::UpdateViewList(v2->m_pListLowRankPromise);
  v45 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle", &uiLeft, &uiTop, 0);
  v46 = SlideBar::CreateWin(
          spNode.m_pObject,
          "SlideBar",
          "SlideBar_UpBtn",
          "SlideBar_DnBtn",
          v45,
          0,
          (PgWin *)&v2->vfptr);
  v2->m_pkSlideBarPromiseList = v46;
  v46->m_uiClickMsg = 9;
  v2->m_pkSlideBarPromiseList->m_eType = 1;
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title01Nor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title01Click");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title01Over");
  PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 5u, 0, 0);
  v47 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
  v48 = *(PgWinText **)(v47 + 20);
  pCIItem2 = *(SLWCreateInfo::Item **)(v47 + 24);
  pkTextWin = v48;
  v49 = Font::Get(MAIN_MENU);
  v50 = PgWinText::CreateWin(
          uiLeft - v9,
          uiTop - v10 + 1,
          (unsigned int)pkTextWin,
          (unsigned int)pCIItem2,
          v49,
          (PgWin *)&v2->vfptr,
          0,
          0);
  v51 = v50->vfptr;
  pkTextWin = v50;
  v51[122].__vecDelDtor((NiRefObject *)v50, 5u);
  pCIItem2 = (SLWCreateInfo::Item *)pkTextWin->vfptr;
  v52 = TextData::Get(0xD6F6DEDF);
  (*(void (__thiscall **)(_DWORD, _DWORD))&pCIItem2[4].bAbbreviatable)(pkTextWin, v52);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title02Nor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title02Click");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title02Over");
  PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 6u, 0, 0);
  v53 = pkTextWin->m_kWorldBound.m_kCenter.x;
  v54 = *(PgWinText **)(*(_DWORD *)LODWORD(v53) + 20);
  pCIItem2 = *(SLWCreateInfo::Item **)(*(_DWORD *)LODWORD(v53) + 24);
  pkTextWin = v54;
  v55 = Font::Get(MAIN_MENU);
  v56 = PgWinText::CreateWin(
          uiLeft - v9,
          uiTop - v10 + 1,
          (unsigned int)pkTextWin,
          (unsigned int)pCIItem2,
          v55,
          (PgWin *)&v2->vfptr,
          0,
          0);
  v57 = v56->vfptr;
  pkTextWin = v56;
  v57[122].__vecDelDtor((NiRefObject *)v56, 5u);
  pCIItem2 = (SLWCreateInfo::Item *)pkTextWin->vfptr;
  v58 = TextData::Get(0x95F9F1F2);
  (*(void (__thiscall **)(_DWORD, _DWORD))&pCIItem2[4].bAbbreviatable)(pkTextWin, v58);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title03Nor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title03Click");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title03Over");
  PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 7u, 0, 0);
  v59 = pkTextWin->m_kWorldBound.m_kCenter.x;
  v60 = *(PgWinText **)(*(_DWORD *)LODWORD(v59) + 20);
  pCIItem2 = *(SLWCreateInfo::Item **)(*(_DWORD *)LODWORD(v59) + 24);
  pkTextWin = v60;
  v61 = Font::Get(MAIN_MENU);
  v62 = PgWinText::CreateWin(
          uiLeft - v9,
          uiTop - v10 + 1,
          (unsigned int)pkTextWin,
          (unsigned int)pCIItem2,
          v61,
          (PgWin *)&v2->vfptr,
          0,
          0);
  v63 = v62->vfptr;
  pkTextWin = v62;
  v63[122].__vecDelDtor((NiRefObject *)v62, 5u);
  pCIItem2 = (SLWCreateInfo::Item *)pkTextWin->vfptr;
  v64 = TextData::Get(0x8BF7ED01);
  (*(void (__thiscall **)(_DWORD, _DWORD))&pCIItem2[4].bAbbreviatable)(pkTextWin, v64);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title04Nor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title04Click");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title04Over");
  PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 8u, 0, 0);
  v65 = pkTextWin->m_kWorldBound.m_kCenter.x;
  v66 = *(PgWinText **)(*(_DWORD *)LODWORD(v65) + 20);
  pCIItem2 = *(SLWCreateInfo::Item **)(*(_DWORD *)LODWORD(v65) + 24);
  pkTextWin = v66;
  v67 = Font::Get(MAIN_MENU);
  v68 = PgWinText::CreateWin(
          uiLeft - v9,
          uiTop - v10 + 1,
          (unsigned int)pkTextWin,
          (unsigned int)pCIItem2,
          v67,
          (PgWin *)&v2->vfptr,
          0,
          0);
  v69 = v68->vfptr;
  pkTextWin = v68;
  v69[122].__vecDelDtor((NiRefObject *)v68, 5u);
  pCIItem2 = (SLWCreateInfo::Item *)pkTextWin->vfptr;
  v70 = TextData::Get(0x86B47191);
  (*(void (__thiscall **)(_DWORD, _DWORD))&pCIItem2[4].bAbbreviatable)(pkTextWin, v70);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Nor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
  pCIItem2 = (SLWCreateInfo::Item *)PgWinBut::CreateWin(
                                      uiLeft - v9,
                                      uiTop - v10,
                                      (PgSprData *)pkTextWin,
                                      (PgWin *)&v2->vfptr,
                                      0x10u,
                                      0,
                                      0);
  pCIItem2[2].vecNodeName._Myend = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)g_pkToolTipWin;
  v71 = (char *)TextData2::Get(0xEEE7C3EB);
  PgWin::SetToolTipWinText((PgWin *)pCIItem2, v71);
  v72 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
  v73 = *(PgWinText **)(v72 + 20);
  pCIItem2 = *(SLWCreateInfo::Item **)(v72 + 24);
  pkTextWin = v73;
  v74 = Font::Get(MAIN_MENU);
  v75 = PgWinText::CreateWin(
          uiLeft - v9,
          uiTop - v10 + 1,
          (unsigned int)pkTextWin,
          (unsigned int)pCIItem2,
          v74,
          (PgWin *)&v2->vfptr,
          0,
          0);
  v76 = v75->vfptr;
  pkTextWin = v75;
  v76[122].__vecDelDtor((NiRefObject *)v75, 5u);
  pCIItem2 = (SLWCreateInfo::Item *)pkTextWin->vfptr;
  v77 = TextData::Get(0xD937143F);
  (*(void (__thiscall **)(_DWORD, _DWORD))&pCIItem2[4].bAbbreviatable)(pkTextWin, v77);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Nor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
  PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x11u, 0, 0);
  v78 = pkTextWin->m_kWorldBound.m_kCenter.x;
  v79 = *(PgWinText **)(*(_DWORD *)LODWORD(v78) + 20);
  pCIItem2 = *(SLWCreateInfo::Item **)(*(_DWORD *)LODWORD(v78) + 24);
  pkTextWin = v79;
  v80 = Font::Get(MAIN_MENU);
  v81 = PgWinText::CreateWin(
          uiLeft - v9,
          uiTop - v10 + 1,
          (unsigned int)pkTextWin,
          (unsigned int)pCIItem2,
          v80,
          (PgWin *)&v2->vfptr,
          0,
          0);
  v82 = v81->vfptr;
  pkTextWin = v81;
  v82[122].__vecDelDtor((NiRefObject *)v81, 5u);
  pCIItem2 = (SLWCreateInfo::Item *)pkTextWin->vfptr;
  v83 = TextData::Get(0x32648786u);
  (*(void (__thiscall **)(_DWORD, _DWORD))&pCIItem2[4].bAbbreviatable)(pkTextWin, v83);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Nor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
  pCIItem2 = (SLWCreateInfo::Item *)PgWinBut::CreateWin(
                                      uiLeft - v9,
                                      uiTop - v10,
                                      (PgSprData *)pkTextWin,
                                      (PgWin *)&v2->vfptr,
                                      0x12u,
                                      0,
                                      0);
  pCIItem2[2].vecNodeName._Myend = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)g_pkToolTipWin;
  v84 = (char *)TextData2::Get(0xF0F3FF34);
  PgWin::SetToolTipWinText((PgWin *)pCIItem2, v84);
  v85 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
  v86 = *(PgWinText **)(v85 + 20);
  pCIItem2 = *(SLWCreateInfo::Item **)(v85 + 24);
  pkTextWin = v86;
  v87 = Font::Get(MAIN_MENU);
  v88 = PgWinText::CreateWin(
          uiLeft - v9,
          uiTop - v10 + 1,
          (unsigned int)pkTextWin,
          (unsigned int)pCIItem2,
          v87,
          (PgWin *)&v2->vfptr,
          0,
          0);
  v89 = v88->vfptr;
  pkTextWin = v88;
  v89[122].__vecDelDtor((NiRefObject *)v88, 5u);
  pCIItem2 = (SLWCreateInfo::Item *)pkTextWin->vfptr;
  v90 = TextData::Get(0x85B0B3E0);
  (*(void (__thiscall **)(_DWORD, _DWORD))&pCIItem2[4].bAbbreviatable)(pkTextWin, v90);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  v91 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Base", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v91, (PgWin *)&v2->vfptr, 0, 0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "FriendNor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "FriendClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "FriendOver");
  pCIItem2 = (SLWCreateInfo::Item *)PgWinBut::CreateWin(
                                      uiLeft - v9,
                                      uiTop - v10,
                                      (PgSprData *)pkTextWin,
                                      (PgWin *)&v2->vfptr,
                                      0xAu,
                                      0,
                                      0);
  v92 = (char *)TextData::Get(0xDCF3EDF4);
  PgWin::SetToolTipWinText((PgWin *)pCIItem2, v92);
  pCIItem2[2].vecNodeName._Myend = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)g_pkToolTipWin;
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MasterNor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "MasterClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "MasterOver");
  pCIItem2 = (SLWCreateInfo::Item *)PgWinBut::CreateWin(
                                      uiLeft - v9,
                                      uiTop - v10,
                                      (PgSprData *)pkTextWin,
                                      (PgWin *)&v2->vfptr,
                                      0xFu,
                                      0,
                                      0);
  v93 = (char *)TextData::Get(0xF44C3A3C);
  PgWin::SetToolTipWinText((PgWin *)pCIItem2, v93);
  pCIItem2[2].vecNodeName._Myend = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)g_pkToolTipWin;
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GuildNor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GuildClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GuildOver");
  pCIItem2 = (SLWCreateInfo::Item *)PgWinBut::CreateWin(
                                      uiLeft - v9,
                                      uiTop - v10,
                                      (PgSprData *)pkTextWin,
                                      (PgWin *)&v2->vfptr,
                                      0xBu,
                                      0,
                                      0);
  v94 = (char *)TextData::Get(0x9BEAF4F4);
  PgWin::SetToolTipWinText((PgWin *)pCIItem2, v94);
  pCIItem2[2].vecNodeName._Myend = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)g_pkToolTipWin;
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "WeddingNor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "WeddingClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "WeddingOver");
  pCIItem2 = (SLWCreateInfo::Item *)PgWinBut::CreateWin(
                                      uiLeft - v9,
                                      uiTop - v10,
                                      (PgSprData *)pkTextWin,
                                      (PgWin *)&v2->vfptr,
                                      0xDu,
                                      0,
                                      0);
  v95 = (char *)TextData::Get(0xC8F53F44);
  PgWin::SetToolTipWinText((PgWin *)pCIItem2, v95);
  pCIItem2[2].vecNodeName._Myend = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)g_pkToolTipWin;
  pkTextWin = (PgWinText *)PgSprData::Create(
                             (NiAVObject *)&spNode.m_pObject->vfptr,
                             "PartyMatchNor",
                             &uiLeft,
                             &uiTop,
                             0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "PartyMatchClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "PartyMatchOver");
  pCIItem2 = (SLWCreateInfo::Item *)PgWinBut::CreateWin(
                                      uiLeft - v9,
                                      uiTop - v10,
                                      (PgSprData *)pkTextWin,
                                      (PgWin *)&v2->vfptr,
                                      0xEu,
                                      0,
                                      0);
  v96 = (char *)TextData::Get(0x1C4B503Eu);
  PgWin::SetToolTipWinText((PgWin *)pCIItem2, v96);
  pCIItem2[2].vecNodeName._Myend = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)g_pkToolTipWin;
  pkTextWin = (PgWinText *)PgSprData::Create(
                             (NiAVObject *)&spNode.m_pObject->vfptr,
                             "GuildAcademyNor",
                             &uiLeft,
                             &uiTop,
                             0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GuildAcademyClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GuildAcademyOver");
  v97 = PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xCu, 0, 0);
  v98 = (char *)TextData::Get(0x253B184Cu);
  PgWin::SetToolTipWinText((PgWin *)&v97->vfptr, v98);
  v97->m_pkToolTipWin = g_pkToolTipWin;
  v99 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Friend", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
  v100 = v99->m_pObject->m_uiHeight;
  v101 = v99->m_pObject->m_uiWidth;
  v102 = Font::Get(TITLEBOLD);
  v103 = PgWinText::CreateWin(uiLeft, uiTop, v101, v100, v102, (PgWin *)&v2->vfptr, 0, 0);
  v103->vfptr[122].__vecDelDtor((NiRefObject *)v103, 1u);
  v104 = v103->vfptr;
  v105 = TextData::Get(0xDCF3EDF4);
  v104[118].__vecDelDtor((NiRefObject *)v103, (unsigned int)v105);
  v103->vfptr[60].__vecDelDtor((NiRefObject *)v103, 0);
  v106 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HolyPromise", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v107 = v106->m_uiHeight;
  v108 = v106->m_uiWidth;
  v109 = Font::Get(TITLEBOLD);
  v110 = PgWinText::CreateWin(uiLeft, uiTop, v108, v107, v109, (PgWin *)&v2->vfptr, 0, 0);
  v110->vfptr[122].__vecDelDtor((NiRefObject *)v110, 1u);
  v111 = v110->vfptr;
  v112 = TextData::Get(0xF44C3A3C);
  v111[118].__vecDelDtor((NiRefObject *)v110, (unsigned int)v112);
  v110->vfptr[60].__vecDelDtor((NiRefObject *)v110, 0);
  v113 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Guild", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
  v114 = v113->m_pObject->m_uiHeight;
  v115 = v113->m_pObject->m_uiWidth;
  v116 = Font::Get(TITLEBOLD);
  v117 = PgWinText::CreateWin(uiLeft, uiTop, v115, v114, v116, (PgWin *)&v2->vfptr, 0, 0);
  v117->vfptr[122].__vecDelDtor((NiRefObject *)v117, 1u);
  v118 = v117->vfptr;
  v119 = TextData::Get(0x9BEAF4F4);
  v118[118].__vecDelDtor((NiRefObject *)v117, (unsigned int)v119);
  v117->vfptr[60].__vecDelDtor((NiRefObject *)v117, 0);
  v120 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GuildAcademy", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v121 = v120->m_uiHeight;
  v122 = v120->m_uiWidth;
  v123 = Font::Get(TITLEBOLD);
  v124 = PgWinText::CreateWin(uiLeft, uiTop, v122, v121, v123, (PgWin *)&v2->vfptr, 0, 0);
  v124->vfptr[122].__vecDelDtor((NiRefObject *)v124, 1u);
  v125 = v124->vfptr;
  v126 = TextData::Get(0x253B184Cu);
  v125[118].__vecDelDtor((NiRefObject *)v124, (unsigned int)v126);
  v124->vfptr[60].__vecDelDtor((NiRefObject *)v124, 0);
  v127 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Wedding", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
  v128 = v127->m_pObject->m_uiHeight;
  v129 = v127->m_pObject->m_uiWidth;
  v130 = Font::Get(TITLEBOLD);
  v131 = PgWinText::CreateWin(uiLeft, uiTop, v129, v128, v130, (PgWin *)&v2->vfptr, 0, 0);
  v131->vfptr[122].__vecDelDtor((NiRefObject *)v131, 1u);
  v132 = v131->vfptr;
  v133 = TextData::Get(0xC8F53F44);
  v132[118].__vecDelDtor((NiRefObject *)v131, (unsigned int)v133);
  v131->vfptr[60].__vecDelDtor((NiRefObject *)v131, 0);
  v134 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PartyMatch", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v135 = v134->m_uiHeight;
  v136 = v134->m_uiWidth;
  v137 = Font::Get(TITLEBOLD);
  v138 = PgWinText::CreateWin(uiLeft, uiTop, v136, v135, v137, (PgWin *)&v2->vfptr, 0, 0);
  v138->vfptr[122].__vecDelDtor((NiRefObject *)v138, 1u);
  v139 = v138->vfptr;
  v140 = TextData::Get(0x1C4B503Eu);
  v139[118].__vecDelDtor((NiRefObject *)v138, (unsigned int)v140);
  v138->vfptr[60].__vecDelDtor((NiRefObject *)v138, 0);
  v141 = MenuTexMgr::GetTexture(1u);
  v142 = PopupMenuWin::CreateWin(v141, 4u, 4u, 0);
  v2->m_spPopupMenu = v142;
  ((void (__stdcall *)(IDirectMessengerVtbl **))v142->vfptr->SetMsgHooker)(&v2->vfptr);
  PopupMenuWin::Clear(v2->m_spPopupMenu);
  v143 = (char *)TextData::Get(0xBEEF0012);
  v144 = PopupMenuText::CreateWin(v143, 0, 0, 0, 0, 0, 0);
  PopupMenu::SetClickEvent((PopupMenu *)&v144->vfptr, 69, 0);
  PopupMenuWin::AddMenu(v2->m_spPopupMenu, (int)v144, (PopupMenu *)&v144->vfptr);
  v145 = (char *)TextData::Get(0x85B0B3E0);
  v146 = PopupMenuText::CreateWin(v145, 0, 0, 0, 0, 0, 0);
  PopupMenu::SetClickEvent((PopupMenu *)&v146->vfptr, 70, 0);
  PopupMenuWin::AddMenu(v2->m_spPopupMenu, (int)v146, (PopupMenu *)&v146->vfptr);
  PopupMenuWin::FinishMenu(v2->m_spPopupMenu, 0);
  ((void (__stdcall *)(_DWORD))v2->m_spPopupMenu->vfptr[64].__vecDelDtor)(0);
  ((void (__thiscall *)(HolyPromiseWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  LOBYTE(v158) = 1;
  SLWCreateInfo::~SLWCreateInfo(&kCreateInfo2);
  LOBYTE(v158) = 0;
  SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
  v158 = -1;
  if ( spNode.m_pObject )
  {
    v147 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v147 )
        v147->vfptr->__vecDelDtor((NiRefObject *)v147, 1u);
    }
  }
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005163F0) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Max(std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *_Pnode)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *i; // ecx@1

  result = _Pnode;
  for ( i = _Pnode->_Right; !i->_Isnil; i = i->_Right )
    result = i;
  return result;
}

//----- (00516410) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Min(std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *_Pnode)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v2; // ecx@1

  result = _Pnode;
  v2 = _Pnode->_Left;
  if ( !_Pnode->_Left->_Isnil )
  {
    do
    {
      result = v2;
      v2 = v2->_Left;
    }
    while ( !v2->_Isnil );
  }
  return result;
}

//----- (00516430) --------------------------------------------------------
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>,std::_Iterator_base0>::operator++(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >,std::_Iterator_base0> *this)
{
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >,std::_Iterator_base0> *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v2; // edx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v3; // ecx@2
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v4; // edx@3
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *i; // edx@6

  result = this;
  v2 = this->_Ptr;
  if ( !this->_Ptr->_Isnil )
  {
    v3 = v2->_Right;
    if ( v3->_Isnil )
    {
      for ( i = v2->_Parent; !i->_Isnil; i = i->_Parent )
      {
        if ( result->_Ptr != i->_Right )
          break;
        result->_Ptr = i;
      }
      result->_Ptr = i;
    }
    else
    {
      v4 = v3->_Left;
      if ( !v3->_Left->_Isnil )
      {
        do
        {
          v3 = v4;
          v4 = v4->_Left;
        }
        while ( !v4->_Isnil );
      }
      result->_Ptr = v3;
    }
  }
  return result;
}

//----- (00516480) --------------------------------------------------------
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>,std::_Iterator_base0>::operator--(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >,std::_Iterator_base0> *this)
{
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >,std::_Iterator_base0> *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v2; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *i; // edx@3
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v4; // ecx@4
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v5; // edx@5

  result = this;
  v2 = this->_Ptr;
  if ( v2->_Isnil )
  {
    result->_Ptr = v2->_Right;
    return result;
  }
  i = v2->_Left;
  if ( !v2->_Left->_Isnil )
  {
    v4 = i->_Right;
    if ( !v4->_Isnil )
    {
      do
      {
        v5 = v4;
        v4 = v4->_Right;
      }
      while ( !v4->_Isnil );
      result->_Ptr = v5;
      return result;
    }
LABEL_11:
    result->_Ptr = i;
    return result;
  }
  for ( i = v2->_Parent; !i->_Isnil; i = i->_Parent )
  {
    if ( result->_Ptr != i->_Left )
      break;
    result->_Ptr = i;
  }
  if ( !result->_Ptr->_Isnil )
    goto LABEL_11;
  return result;
}

//----- (005164E0) --------------------------------------------------------
HolyPromiseAddWin *__thiscall HolyPromiseAddWin::`scalar deleting destructor'(HolyPromiseAddWin *this, unsigned int a2)
{
  HolyPromiseAddWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&HolyPromiseAddWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&HolyPromiseAddWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98DAFC: using guessed type void (__thiscall *HolyPromiseAddWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98DB1C: using guessed type int (__thiscall *HolyPromiseAddWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00516520) --------------------------------------------------------
void __thiscall PROTO_NC_HOLY_PROMISE_SET_UP_CONFIRM_ACK::PROTO_NC_HOLY_PROMISE_SET_UP_CONFIRM_ACK(PROTO_NC_HOLY_PROMISE_SET_UP_CONFIRM_ACK *this)
{
  *(_QWORD *)&this->CharID.n5_code[3] = 0i64;
  *(_QWORD *)&this->CharID.n5_code[1] = 0i64;
  this->CharID.n5_code[0] = 0;
  *(_QWORD *)&this->UpCharID.n5_code[3] = 0i64;
  *(_QWORD *)&this->UpCharID.n5_code[1] = 0i64;
  this->UpCharID.n5_code[0] = 0;
}

//----- (00516550) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Rrotate(std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *_Wherenode)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v4; // ecx@3
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v5; // ecx@5

  v2 = _Wherenode->_Left;
  _Wherenode->_Left = _Wherenode->_Left->_Right;
  v3 = v2->_Right;
  if ( !v3->_Isnil )
    v3->_Parent = _Wherenode;
  v2->_Parent = _Wherenode->_Parent;
  v4 = this->_Myhead;
  if ( _Wherenode == v4->_Parent )
  {
    v4->_Parent = v2;
    v2->_Right = _Wherenode;
    _Wherenode->_Parent = v2;
  }
  else
  {
    v5 = _Wherenode->_Parent;
    if ( _Wherenode == v5->_Right )
    {
      v5->_Right = v2;
      v2->_Right = _Wherenode;
      _Wherenode->_Parent = v2;
    }
    else
    {
      v5->_Left = v2;
      v2->_Right = _Wherenode;
      _Wherenode->_Parent = v2;
    }
  }
}

//----- (005165B0) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Lrotate(std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *_Wherenode)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v3; // ecx@3
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v4; // ecx@5

  v2 = _Wherenode->_Right;
  _Wherenode->_Right = v2->_Left;
  if ( !v2->_Left->_Isnil )
    v2->_Left->_Parent = _Wherenode;
  v2->_Parent = _Wherenode->_Parent;
  v3 = this->_Myhead;
  if ( _Wherenode == v3->_Parent )
  {
    v3->_Parent = v2;
    v2->_Left = _Wherenode;
    _Wherenode->_Parent = v2;
  }
  else
  {
    v4 = _Wherenode->_Parent;
    if ( _Wherenode == v4->_Left )
    {
      v4->_Left = v2;
      v2->_Left = _Wherenode;
      _Wherenode->_Parent = v2;
    }
    else
    {
      v4->_Right = v2;
      v2->_Left = _Wherenode;
      _Wherenode->_Parent = v2;
    }
  }
}

//----- (00516610) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::find(std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > *result, const unsigned int *_Keyval)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v3; // edx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v4; // eax@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > *v5; // eax@8

  v3 = this->_Myhead;
  v4 = v3->_Parent;
  while ( !v4->_Isnil )
  {
    if ( v4->_Myval.first >= *_Keyval )
    {
      v3 = v4;
      v4 = v4->_Left;
    }
    else
    {
      v4 = v4->_Right;
    }
  }
  if ( v3 == this->_Myhead || *_Keyval < v3->_Myval.first )
  {
    v5 = result;
    result->_Ptr = this->_Myhead;
  }
  else
  {
    v5 = result;
    result->_Ptr = v3;
  }
  return v5;
}

//----- (00516680) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *_Newnode)
{
  unsigned int v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v6; // edi@4
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v7; // edx@4
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v8; // edx@7
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v9; // edx@9
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v10; // eax@11
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v11; // edx@12
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v12; // esi@12
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v13; // esi@13
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v14; // edx@16
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v15; // esi@18
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v16; // esi@20
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v17; // edx@24
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v18; // esi@24
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v19; // edi@24
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v20; // edi@26
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v21; // edi@28
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v22; // esi@31
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v23; // edx@34
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v24; // esi@34
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v25; // esi@36
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v26; // esi@38
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v27; // edi@44
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v28; // edi@46
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v29; // ecx@52
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > *v30; // eax@52

  v5 = this->_Mysize;
  if ( v5 >= 0xAAAAAA9 )
  {
    operator delete(_Newnode);
    std::_Xlength_error("map/set<T> too long");
  }
  this->_Mysize = v5 + 1;
  v6 = _Newnode;
  _Newnode->_Parent = _Wherenode;
  v7 = this->_Myhead;
  if ( _Wherenode == v7 )
  {
    v7->_Parent = _Newnode;
    this->_Myhead->_Left = _Newnode;
    this->_Myhead->_Right = _Newnode;
  }
  else if ( _Addleft )
  {
    _Wherenode->_Left = _Newnode;
    v8 = this->_Myhead;
    if ( _Wherenode == v8->_Left )
      v8->_Left = _Newnode;
  }
  else
  {
    _Wherenode->_Right = _Newnode;
    v9 = this->_Myhead;
    if ( _Wherenode == v9->_Right )
      v9->_Right = _Newnode;
  }
  v10 = _Newnode;
  while ( !v10->_Parent->_Color )
  {
    v11 = v10->_Parent;
    v12 = v11->_Parent;
    if ( v11 == v12->_Left )
    {
      v13 = v12->_Right;
      if ( v13->_Color )
      {
        if ( v10 == v11->_Right )
        {
          v10 = v10->_Parent;
          v14 = v11->_Right;
          v10->_Right = v14->_Left;
          if ( !v14->_Left->_Isnil )
            v14->_Left->_Parent = v10;
          v14->_Parent = v10->_Parent;
          v15 = this->_Myhead;
          if ( v10 == v15->_Parent )
          {
            v15->_Parent = v14;
          }
          else
          {
            v16 = v10->_Parent;
            if ( v10 == v16->_Left )
              v16->_Left = v14;
            else
              v16->_Right = v14;
          }
          v14->_Left = v10;
          v10->_Parent = v14;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Left;
        v17->_Left = v17->_Left->_Right;
        v19 = v18->_Right;
        if ( !v19->_Isnil )
          v19->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v20 = this->_Myhead;
        if ( v17 == v20->_Parent )
        {
          v20->_Parent = v18;
          v18->_Right = v17;
        }
        else
        {
          v21 = v17->_Parent;
          if ( v17 == v21->_Right )
          {
            v21->_Right = v18;
            v18->_Right = v17;
          }
          else
          {
            v21->_Left = v18;
            v18->_Right = v17;
          }
        }
LABEL_50:
        v6 = _Newnode;
        v17->_Parent = v18;
        continue;
      }
      v11->_Color = 1;
      v13->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
    else
    {
      v22 = v12->_Left;
      if ( v22->_Color )
      {
        if ( v10 == v11->_Left )
        {
          v10 = v10->_Parent;
          v23 = v11->_Left;
          v10->_Left = v23->_Right;
          v24 = v23->_Right;
          if ( !v24->_Isnil )
            v24->_Parent = v10;
          v23->_Parent = v10->_Parent;
          v25 = this->_Myhead;
          if ( v10 == v25->_Parent )
          {
            v25->_Parent = v23;
          }
          else
          {
            v26 = v10->_Parent;
            if ( v10 == v26->_Right )
              v26->_Right = v23;
            else
              v26->_Left = v23;
          }
          v23->_Right = v10;
          v10->_Parent = v23;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Right;
        v17->_Right = v18->_Left;
        if ( !v18->_Left->_Isnil )
          v18->_Left->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v27 = this->_Myhead;
        if ( v17 == v27->_Parent )
        {
          v27->_Parent = v18;
        }
        else
        {
          v28 = v17->_Parent;
          if ( v17 == v28->_Left )
            v28->_Left = v18;
          else
            v28->_Right = v18;
        }
        v18->_Left = v17;
        goto LABEL_50;
      }
      v11->_Color = 1;
      v22->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
  }
  v29 = this->_Myhead->_Parent;
  v30 = result;
  result->_Ptr = v6;
  v29->_Color = 1;
  return v30;
}

//----- (005168B0) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Buynode<std::pair<unsigned int const,Name5>>(std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *this, std::pair<unsigned int const ,Name5> *_Val)
{
  std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *result; // eax@1
  std::exception pExceptionObject; // [sp+4h] [bp-Ch]@5

  v2 = this;
  result = (std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *)operator new(0x28u);
  if ( !result )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  result->_Left = v2->_Myhead;
  result->_Parent = v2->_Myhead;
  result->_Right = v2->_Myhead;
  *(_WORD *)&result->_Color = 0;
  if ( result != (std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *)-12 )
    result->_Myval = *_Val;
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00516940) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::erase(std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > _Where)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v4; // edi@4
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v5; // eax@7
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v6; // esi@8
  std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *v7; // ecx@10
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v8; // eax@10
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v9; // eax@17
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v10; // ecx@20
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v11; // ecx@29
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v12; // ecx@31
  char v13; // cl@34
  std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *i; // ecx@36
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v15; // eax@38
  unsigned int v16; // eax@59
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > *v17; // eax@61
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *_Erasednode; // [sp+10h] [bp-8h]@3
  std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *v19; // [sp+14h] [bp-4h]@1

  v3 = _Where._Ptr;
  v19 = this;
  if ( _Where._Ptr->_Isnil )
    std::_Xout_of_range("invalid map/set<T> iterator");
  _Erasednode = _Where._Ptr;
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >,std::_Iterator_base0> *)&_Where._Ptr);
  if ( v3->_Left->_Isnil )
  {
    v4 = v3->_Right;
LABEL_8:
    v6 = v3->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v7 = v19;
    v8 = v19->_Myhead;
    if ( v8->_Parent == v3 )
    {
      v8->_Parent = v4;
    }
    else if ( v6->_Left == v3 )
    {
      v6->_Left = v4;
    }
    else
    {
      v6->_Right = v4;
    }
    if ( v19->_Myhead->_Left == v3 )
    {
      if ( v4->_Isnil )
      {
        v9 = v6;
      }
      else
      {
        v9 = std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Min(v4);
        v7 = v19;
      }
      v7->_Myhead->_Left = v9;
    }
    v10 = v7->_Myhead;
    if ( v10->_Right == v3 )
    {
      if ( v4->_Isnil )
        v10->_Right = v6;
      else
        v10->_Right = std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Max(v4);
    }
    goto LABEL_35;
  }
  if ( v3->_Right->_Isnil )
  {
    v4 = v3->_Left;
    goto LABEL_8;
  }
  v5 = _Where._Ptr;
  v4 = _Where._Ptr->_Right;
  if ( _Where._Ptr == v3 )
    goto LABEL_8;
  v3->_Left->_Parent = _Where._Ptr;
  v5->_Left = v3->_Left;
  if ( v5 == v3->_Right )
  {
    v6 = v5;
  }
  else
  {
    v6 = v5->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v6->_Left = v4;
    v5->_Right = v3->_Right;
    v3->_Right->_Parent = v5;
  }
  v11 = v19->_Myhead;
  if ( v11->_Parent == v3 )
  {
    v11->_Parent = v5;
  }
  else
  {
    v12 = v3->_Parent;
    if ( v12->_Left == v3 )
      v12->_Left = v5;
    else
      v12->_Right = v5;
  }
  v5->_Parent = v3->_Parent;
  v13 = v5->_Color;
  v5->_Color = v3->_Color;
  v3->_Color = v13;
LABEL_35:
  if ( _Erasednode->_Color == 1 )
  {
    for ( i = v19; v4 != i->_Myhead->_Parent; v6 = v6->_Parent )
    {
      if ( v4->_Color != 1 )
        break;
      v15 = v6->_Left;
      if ( v4 == v6->_Left )
      {
        v15 = v6->_Right;
        if ( !v15->_Color )
        {
          v15->_Color = 1;
          v6->_Color = 0;
          std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Lrotate(
            i,
            v6);
          v15 = v6->_Right;
          i = v19;
        }
        if ( v15->_Isnil )
          goto LABEL_53;
        if ( v15->_Left->_Color != 1 || v15->_Right->_Color != 1 )
        {
          if ( v15->_Right->_Color == 1 )
          {
            v15->_Left->_Color = 1;
            v15->_Color = 0;
            std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Rrotate(
              i,
              v15);
            v15 = v6->_Right;
            i = v19;
          }
          v15->_Color = v6->_Color;
          v6->_Color = 1;
          v15->_Right->_Color = 1;
          std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Lrotate(
            i,
            v6);
          break;
        }
      }
      else
      {
        if ( !v15->_Color )
        {
          v15->_Color = 1;
          v6->_Color = 0;
          std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Rrotate(
            i,
            v6);
          v15 = v6->_Left;
          i = v19;
        }
        if ( v15->_Isnil )
          goto LABEL_53;
        if ( v15->_Right->_Color != 1 || v15->_Left->_Color != 1 )
        {
          if ( v15->_Left->_Color == 1 )
          {
            v15->_Right->_Color = 1;
            v15->_Color = 0;
            std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Lrotate(
              i,
              v15);
            v15 = v6->_Left;
            i = v19;
          }
          v15->_Color = v6->_Color;
          v6->_Color = 1;
          v15->_Left->_Color = 1;
          std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Rrotate(
            i,
            v6);
          break;
        }
      }
      v15->_Color = 0;
LABEL_53:
      v4 = v6;
    }
    v4->_Color = 1;
  }
  operator delete(_Erasednode);
  v16 = v19->_Mysize;
  if ( v16 )
    v19->_Mysize = v16 - 1;
  v17 = result;
  result->_Ptr = _Where._Ptr;
  return v17;
}

//----- (00516B90) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Erase(std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *_Rootnode)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v2; // edi@1
  std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *i; // esi@1

  v2 = _Rootnode;
  v3 = this;
  for ( i = _Rootnode; !i->_Isnil; v2 = i )
  {
    std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Erase(
      v3,
      i->_Right);
    i = i->_Left;
    operator delete(v2);
  }
}

//----- (00516BD0) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *_Node, bool _Leftish)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v4; // edx@1
  std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *v5; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v6; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v7; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v8; // esi@1
  bool v9; // cl@1
  unsigned int v10; // edi@2
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v11; // edi@10
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v12; // edx@12
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > >,bool> *v13; // eax@12
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v14; // ecx@15
  bool _Addleft; // [sp+Ch] [bp-4h]@1

  v4 = _Node;
  v5 = this;
  v6 = this->_Myhead;
  v7 = v6->_Parent;
  v8 = v6;
  v9 = 1;
  _Addleft = 1;
  if ( !v7->_Isnil )
  {
    v10 = _Node->_Myval.first;
    do
    {
      v8 = v7;
      if ( _Leftish )
        v9 = v7->_Myval.first >= v10;
      else
        v9 = v10 < v7->_Myval.first;
      _Addleft = v9;
      if ( v9 )
        v7 = v7->_Left;
      else
        v7 = v7->_Right;
    }
    while ( !v7->_Isnil );
  }
  v11 = v8;
  *(_DWORD *)&_Leftish = v8;
  if ( v9 )
  {
    if ( v8 == v5->_Myhead->_Left )
    {
      v12 = std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Insert(
              v5,
              (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > *)&_Leftish,
              1,
              v8,
              _Node)->_Ptr;
      v13 = result;
      result->first._Ptr = v12;
      result->second = 1;
      return v13;
    }
    std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >,std::_Iterator_base0> *)&_Leftish);
    v11 = (std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *)_Leftish;
    v4 = _Node;
  }
  if ( v11->_Myval.first >= v4->_Myval.first )
  {
    operator delete(v4);
    v13 = result;
    result->first._Ptr = v11;
    result->second = 0;
  }
  else
  {
    v14 = std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Insert(
            v5,
            (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > *)&_Leftish,
            _Addleft,
            v8,
            v4)->_Ptr;
    v13 = result;
    result->first._Ptr = v14;
    result->second = 1;
  }
  return v13;
}

//----- (00516CB0) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::clear(std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *this)
{
  std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *v1; // edi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v4; // esi@1

  v1 = this;
  v2 = this->_Myhead;
  v3 = v2->_Parent;
  v4 = v2->_Parent;
  if ( !v3->_Isnil )
  {
    do
    {
      std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::_Erase(
        v1,
        v4->_Right);
      v4 = v4->_Left;
      operator delete(v3);
      v3 = v4;
    }
    while ( !v4->_Isnil );
  }
  v1->_Myhead->_Parent = v1->_Myhead;
  v1->_Myhead->_Left = v1->_Myhead;
  v1->_Myhead->_Right = v1->_Myhead;
  v1->_Mysize = 0;
}

//----- (00516D00) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::erase(std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > _Last)
{
  std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v6; // ecx@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > *v7; // eax@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > v8; // edx@5
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v9; // eax@6
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *v10; // ecx@7
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *j; // eax@7
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> >::_Node *i; // eax@10
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Name5> >,0> > > v13; // [sp+4h] [bp-4h]@14

  v4 = this;
  v5 = this->_Myhead;
  v6 = _First._Ptr;
  if ( _First._Ptr != v5->_Left || _Last._Ptr != v5 )
  {
    for ( ; _First._Ptr != _Last._Ptr; v6 = _First._Ptr )
    {
      v8._Ptr = v6;
      if ( !v6->_Isnil )
      {
        v9 = v6->_Right;
        if ( v9->_Isnil )
        {
          for ( i = v6->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v6 != i->_Right )
              break;
            v6 = i;
          }
          _First._Ptr = i;
        }
        else
        {
          v10 = v6->_Right;
          for ( j = v9->_Left; !j->_Isnil; j = j->_Left )
            v10 = j;
          _First._Ptr = v10;
        }
      }
      std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::erase(
        v4,
        &v13,
        v8);
    }
    v7 = result;
    result->_Ptr = v6;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<unsigned int,Name5,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Name5>>,0>>::clear(v4);
    v7 = result;
    result->_Ptr = v4->_Myhead->_Left;
  }
  return v7;
}

//----- (00516DA0) --------------------------------------------------------
HolyPromiseWin *__thiscall HolyPromiseWin::`vector deleting destructor'(HolyPromiseWin *this, unsigned int a2)
{
  HolyPromiseWin *v2; // esi@1

  v2 = this;
  HolyPromiseWin::~HolyPromiseWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00516DD0) --------------------------------------------------------
void __thiscall IDTimeWin::IDTimeWin(IDTimeWin *this)
{
  IDTimeWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&IDTimeWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&IDTimeWin::`vftable'{for `IDirectMessenger'};
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kTimer);
}
// 98DFDC: using guessed type void (__thiscall *IDTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98DFFC: using guessed type int (__thiscall *IDTimeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00516E40) --------------------------------------------------------
void __thiscall IDTimeWin::~IDTimeWin(IDTimeWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&IDTimeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&IDTimeWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 98DFDC: using guessed type void (__thiscall *IDTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98DFFC: using guessed type int (__thiscall *IDTimeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00516E80) --------------------------------------------------------
void __thiscall IDTimeWin::UpdateMeWin(IDTimeWin *this, float fCurTime)
{
  IDTimeWin *v2; // edi@1
  char *v3; // eax@3
  PgWinText *v4; // edi@4
  void *(__thiscall *v5)(NiRefObject *, unsigned int); // eax@4
  PgWinText *v6; // ecx@4
  PgWinText *v7; // edi@7
  float fCurTimea; // [sp+10h] [bp+8h]@3

  v2 = this;
  if ( CNSTimer_Interval::IsRun_GetCount(&this->m_kTimer, fCurTime) )
  {
    v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 1u);
    --IDTimeWin::m_second;
  }
  ((void (__stdcall *)(_DWORD))v2->m_minuteTxtWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  fCurTimea = COERCE_FLOAT(v2->m_minuteTxtWin->vfptr);
  v3 = fs(
         "%02d:%02d:%02d",
         IDTimeWin::m_second / 0x3C / 0x3C % 0x3C,
         IDTimeWin::m_second / 0x3C % 0x3C,
         IDTimeWin::m_second % 0x3C);
  (*(void (__thiscall **)(_DWORD, _DWORD))(LODWORD(fCurTimea) + 472))(v2->m_minuteTxtWin, v3);
  if ( IDTimeWin::m_second >= 0x3C )
  {
    if ( IDTimeWin::m_second >= 0x12C )
      goto LABEL_9;
    v7 = v2->m_minuteTxtWin;
    v5 = v7->vfptr[117].__vecDelDtor;
    v6 = v7;
  }
  else
  {
    v4 = v2->m_minuteTxtWin;
    v5 = v4->vfptr[117].__vecDelDtor;
    v6 = v4;
    if ( !(IDTimeWin::m_second & 1) )
    {
      v5((NiRefObject *)&v4->vfptr, (unsigned int)&Color::m_kDxWhiteColor);
      goto LABEL_9;
    }
  }
  v5((NiRefObject *)&v6->vfptr, (unsigned int)&Color::m_kDxRedColor);
LABEL_9:
  if ( IDTimeWin::m_second == 60 )
    SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_KQLast);
}
// A8CBE8: using guessed type unsigned int IDTimeWin::m_second;

//----- (00516FA0) --------------------------------------------------------
void __thiscall IDTimeWin::ResetTime(IDTimeWin *this, unsigned int second)
{
  IDTimeWin *v2; // esi@1

  v2 = this;
  IDTimeWin::m_second = second;
  CNSTimer_Interval::ReSet(&this->m_kTimer, Timer::ms_fCurTime);
  v2->m_kTimer.m_fCheckTime = 1.0;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8CBE8: using guessed type unsigned int IDTimeWin::m_second;

//----- (00516FD0) --------------------------------------------------------
char __thiscall IDTimeWin::Create(IDTimeWin *this, PgFrameWork *pkFrameWork)
{
  IDTimeWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // ebx@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  PgSprData *v10; // eax@15
  PgWinSpr *v11; // eax@15
  PgSprData *v12; // eax@15
  PgWinSpr *v13; // eax@15
  PgSprData *v14; // eax@15
  PgSprData *v15; // edi@15
  PgWinSpr *v16; // eax@15
  NiPointer<PgSprData::PgHitTester> *v17; // ecx@15
  unsigned int v18; // edi@15
  unsigned int v19; // ebx@15
  PgFont *v20; // eax@15
  PgWinText *v21; // eax@15
  NiRefObjectVtbl *v22; // edi@15
  PgFont *v23; // eax@15
  NiRefObjectVtbl *v24; // edi@15
  int v25; // eax@15
  NiNode *v26; // esi@16
  int uiLeft; // [sp+34h] [bp-18h]@11
  int uiTop; // [sp+38h] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+3Ch] [bp-10h]@1
  int v30; // [sp+48h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v30 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v30 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "\\Game\\QuestTime.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "IDTimeWin", 0) )
  {
    v4 = spNode.m_pObject;
    v30 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
    goto LABEL_5;
  }
  v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Reward", &uiLeft, &uiTop, 0);
  v11 = PgWinSpr::CreateWin(uiLeft, uiTop, v10, (PgWin *)&v2->vfptr, 0, 0);
  v11->vfptr[64].__vecDelDtor((NiRefObject *)v11, 1u);
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  v13 = PgWinSpr::CreateWin(uiLeft, uiTop, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Time", &uiLeft, &uiTop, v3);
  v15 = v14;
  v16 = PgWinSpr::CreateWin(uiLeft, uiTop, v14, (PgWin *)&v2->vfptr, 0, 0);
  v16->vfptr[60].__vecDelDtor((NiRefObject *)v16, 0);
  v17 = v15->m_akHitTester.m_pBase;
  v18 = v17->m_pObject->m_uiHeight;
  v19 = v17->m_pObject->m_uiWidth;
  v20 = Font::Get(0);
  v21 = PgWinText::CreateWin(uiLeft, uiTop + 2, v19, v18, v20, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_minuteTxtWin = v21;
  v21->vfptr[122].__vecDelDtor((NiRefObject *)v21, 5u);
  v22 = v2->m_minuteTxtWin->vfptr;
  v23 = Font::Get(LARGEBOLD);
  v22[113].__vecDelDtor((NiRefObject *)v2->m_minuteTxtWin, (unsigned int)v23);
  ((void (__stdcall *)(const char *))v2->m_minuteTxtWin->vfptr[118].__vecDelDtor)("00:00:00");
  ((void (__stdcall *)(_DWORD))v2->m_minuteTxtWin->vfptr[60].__vecDelDtor)(0);
  ((void (__thiscall *)(IDTimeWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    1.0,
    0.0);
  v24 = v2->vfptr;
  v25 = (int)v2->vfptr[41].__vecDelDtor((NiRefObject *)v2, 210u);
  v24[77].__vecDelDtor((NiRefObject *)v2, v25);
  v30 = -1;
  if ( spNode.m_pObject )
  {
    v26 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v26 )
        v26->vfptr->__vecDelDtor((NiRefObject *)v26, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005172C0) --------------------------------------------------------
IDTimeWin *__cdecl IDTimeWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  IDTimeWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x178u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    LOBYTE(v6) = 1;
    v2->vfptr = (NiRefObjectVtbl *)&IDTimeWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&IDTimeWin::`vftable'{for `IDirectMessenger'};
    CNSTimer_Interval::CNSTimer_Interval((CNSTimer_Interval *)&v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]);
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (IDTimeWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 98DFDC: using guessed type void (__thiscall *IDTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98DFFC: using guessed type int (__thiscall *IDTimeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00517410) --------------------------------------------------------
IDTimeWin *__thiscall IDTimeWin::`scalar deleting destructor'(IDTimeWin *this, unsigned int a2)
{
  IDTimeWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&IDTimeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&IDTimeWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98DFDC: using guessed type void (__thiscall *IDTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98DFFC: using guessed type int (__thiscall *IDTimeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00517450) --------------------------------------------------------
void __thiscall IndunLevelSelectWin::sIndunLevelButton::sIndunLevelButton(IndunLevelSelectWin::sIndunLevelButton *this)
{
  this->m_pkBtn = 0;
  this->m_pkText = 0;
  this->m_uiPos = 0;
}

//----- (00517460) --------------------------------------------------------
void __thiscall IndunLevelSelectWin::sIndunLevelButton::sIndunLevelButton(IndunLevelSelectWin::sIndunLevelButton *this, PgWinBut *pkBtn, PgWinText *pkText, unsigned int uiPos)
{
  this->m_pkBtn = pkBtn;
  this->m_pkText = pkText;
  this->m_uiPos = uiPos;
}

//----- (00517480) --------------------------------------------------------
void __thiscall IndunLevelSelectWin::sIndunLevelButton::Reset(IndunLevelSelectWin::sIndunLevelButton *this)
{
  IndunLevelSelectWin::sIndunLevelButton *v1; // esi@1
  PgWinBut *v2; // ecx@1

  v1 = this;
  v2 = this->m_pkBtn;
  if ( v2 )
  {
    ((void (__stdcall *)(_DWORD))v2->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v1->m_pkBtn->vfptr[44].__vecDelDtor)(v1->m_uiPos);
    ((void (__stdcall *)(_DWORD))v1->m_pkBtn->vfptr[130].__vecDelDtor)(0);
  }
  if ( v1->m_pkText )
    ((void (__stdcall *)(_DWORD))v1->m_pkText->vfptr[118].__vecDelDtor)(&unk_98E21C);
}

//----- (005174D0) --------------------------------------------------------
void __thiscall IndunLevelSelectWin::sIndunLevelButton::ChangePos(IndunLevelSelectWin::sIndunLevelButton *this, bool bChange)
{
  IndunLevelSelectWin::sIndunLevelButton *v2; // esi@1
  PgWinBut *v3; // ecx@1
  NiRefObjectVtbl *v4; // edi@3
  unsigned int v5; // eax@3

  v2 = this;
  v3 = this->m_pkBtn;
  if ( v3 )
  {
    if ( bChange )
    {
      v4 = v3->vfptr;
      v5 = ((int (*)(void))v3->vfptr[37].__vecDelDtor)();
      v4[44].__vecDelDtor((NiRefObject *)v2->m_pkBtn, v2->m_uiPos + (v5 >> 1));
    }
  }
}

//----- (00517510) --------------------------------------------------------
void __thiscall IndunLevelSelectWin::sIndunLevelButton::SetText(IndunLevelSelectWin::sIndunLevelButton *this, const char *pcText)
{
  IndunLevelSelectWin::sIndunLevelButton *v2; // esi@1
  PgWinBut *v3; // ecx@1

  v2 = this;
  v3 = this->m_pkBtn;
  if ( v3 )
    ((void (__stdcall *)(_DWORD))v3->vfptr[64].__vecDelDtor)(1);
  if ( v2->m_pkText )
    ((void (__stdcall *)(_DWORD))v2->m_pkText->vfptr[118].__vecDelDtor)(pcText);
}

//----- (00517550) --------------------------------------------------------
void __thiscall IndunLevelSelectWin::sIndunLevelButton::SetParam(IndunLevelSelectWin::sIndunLevelButton *this, unsigned int uiParam)
{
  PgWinBut *v2; // ecx@1

  v2 = this->m_pkBtn;
  if ( v2 )
    ((void (__stdcall *)(_DWORD))v2->vfptr[130].__vecDelDtor)(uiParam);
}

//----- (00517570) --------------------------------------------------------
void __thiscall IndunLevelSelectWin::~IndunLevelSelectWin(IndunLevelSelectWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&IndunLevelSelectWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&IndunLevelSelectWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 98E2DC: using guessed type void (__thiscall *IndunLevelSelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98E2FC: using guessed type int (__thiscall *IndunLevelSelectWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00517590) --------------------------------------------------------
void __thiscall IndunLevelSelectWin::OnSelect(IndunLevelSelectWin *this, ID_LEVEL_TYPE eLevelType)
{
  IndunLevelSelectWin *v2; // esi@1
  GameFrameWork *v3; // eax@1

  v2 = this;
  v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v3 )
    GameFrameWork::NcInstanceDungeonLevelSelectMenuAck(v3, v2->m_kNPCHandle, eLevelType);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
}

//----- (005175D0) --------------------------------------------------------
void __thiscall IndunLevelSelectWin::OnCancel(IndunLevelSelectWin *this)
{
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
}

//----- (005175E0) --------------------------------------------------------
void __thiscall IndunLevelSelectWin::ResetInfo(IndunLevelSelectWin *this)
{
  IndunLevelSelectWin *v1; // esi@1
  PgWinText *v2; // ecx@1
  int v3; // esi@3
  signed int v4; // edi@3

  v1 = this;
  v2 = this->m_pkMsgText;
  v1->m_kNPCHandle = -1;
  if ( v2 )
    ((void (__stdcall *)(_DWORD))v2->vfptr[118].__vecDelDtor)(&unk_98E21E);
  v3 = (int)v1->m_kIndunLevelButton;
  v4 = 3;
  do
  {
    if ( *(_DWORD *)v3 )
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 256))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 176))(*(_DWORD *)(v3 + 8));
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 520))(0);
    }
    if ( *(_DWORD *)(v3 + 4) )
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v3 + 4) + 472))(&unk_98E21C);
    v3 += 12;
    --v4;
  }
  while ( v4 );
}

//----- (00517670) --------------------------------------------------------
void __thiscall IndunLevelMsgWin::IndunLevelMsgWin(IndunLevelMsgWin *this)
{
  IndunLevelMsgWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_pkMsgText = 0;
  v1->m_pkLevelText = 0;
  v1->m_eLevelType = 0;
  v1->vfptr = (NiRefObjectVtbl *)&IndunLevelMsgWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&IndunLevelMsgWin::`vftable'{for `IDirectMessenger'};
  v1->m_kNPCHandle = 0;
}
// 98E520: using guessed type void (__thiscall *IndunLevelMsgWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98E53C: using guessed type int (__thiscall *IndunLevelMsgWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005176B0) --------------------------------------------------------
void __thiscall IndunLevelMsgWin::~IndunLevelMsgWin(IndunLevelMsgWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&IndunLevelMsgWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&IndunLevelMsgWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 98E520: using guessed type void (__thiscall *IndunLevelMsgWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98E53C: using guessed type int (__thiscall *IndunLevelMsgWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005176D0) --------------------------------------------------------
void __thiscall IndunLevelMsgWin::ResetInfo(IndunLevelMsgWin *this)
{
  IndunLevelMsgWin *v1; // esi@1
  PgWinText *v2; // ecx@1
  PgWinText *v3; // ecx@3

  v1 = this;
  v2 = this->m_pkMsgText;
  if ( v2 )
    ((void (__stdcall *)(_DWORD))v2->vfptr[118].__vecDelDtor)(&unk_98E256);
  v3 = v1->m_pkLevelText;
  if ( v3 )
    ((void (__stdcall *)(_DWORD))v3->vfptr[118].__vecDelDtor)(&unk_98E257);
  *(_DWORD *)&v1->m_kNPCHandle = 0xFFFF;
}

//----- (00517720) --------------------------------------------------------
void __thiscall IndunLevelSelectWin::IndunLevelSelectWin(IndunLevelSelectWin *this)
{
  IndunLevelSelectWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_pkMsgText = 0;
  v1->vfptr = (NiRefObjectVtbl *)&IndunLevelSelectWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&IndunLevelSelectWin::`vftable'{for `IDirectMessenger'};
  v1->m_kIndunLevelButton[0].m_pkBtn = 0;
  v1->m_kIndunLevelButton[0].m_pkText = 0;
  v1->m_kIndunLevelButton[0].m_uiPos = 0;
  v1->m_kIndunLevelButton[1].m_pkBtn = 0;
  v1->m_kIndunLevelButton[1].m_pkText = 0;
  v1->m_kIndunLevelButton[1].m_uiPos = 0;
  v1->m_kIndunLevelButton[2].m_pkBtn = 0;
  v1->m_kIndunLevelButton[2].m_pkText = 0;
  v1->m_kIndunLevelButton[2].m_uiPos = 0;
  v1->m_kNPCHandle = 0;
}
// 98E2DC: using guessed type void (__thiscall *IndunLevelSelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98E2FC: using guessed type int (__thiscall *IndunLevelSelectWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00517790) --------------------------------------------------------
void __thiscall IndunLevelSelectWin::OnCommand(IndunLevelSelectWin *this, unsigned int wParam, int lParam)
{
  IndunLevelSelectWin *v3; // esi@1
  GameFrameWork *v4; // eax@4

  v3 = this;
  if ( wParam )
  {
    if ( wParam == 1 )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
  }
  else
  {
    v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v4 )
      GameFrameWork::NcInstanceDungeonLevelSelectMenuAck(v4, v3->m_kNPCHandle, (ID_LEVEL_TYPE)lParam);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
  }
}

//----- (005177F0) --------------------------------------------------------
void __thiscall IndunLevelMsgWin::OnOk(IndunLevelMsgWin *this)
{
  IndunLevelMsgWin *v1; // esi@1
  GameFrameWork *v2; // eax@1
  PgWinText *v3; // ecx@3
  PgWinText *v4; // ecx@5

  v1 = this;
  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
    GameFrameWork::NcInstanceDungeonLevelSelectMenuAck(v2, v1->m_kNPCHandle, v1->m_eLevelType);
  v3 = v1->m_pkMsgText;
  if ( v3 )
    ((void (__stdcall *)(_DWORD))v3->vfptr[118].__vecDelDtor)(&unk_98E256);
  v4 = v1->m_pkLevelText;
  if ( v4 )
    ((void (__stdcall *)(_DWORD))v4->vfptr[118].__vecDelDtor)(&unk_98E257);
  *(_DWORD *)&v1->m_kNPCHandle = 0xFFFF;
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}

//----- (00517880) --------------------------------------------------------
void __thiscall IndunLevelMsgWin::OnCancel(IndunLevelMsgWin *this)
{
  IndunLevelMsgWin *v1; // esi@1
  PgWinText *v2; // ecx@1
  PgWinText *v3; // ecx@3

  v1 = this;
  v2 = this->m_pkMsgText;
  if ( v2 )
    ((void (__stdcall *)(_DWORD))v2->vfptr[118].__vecDelDtor)(&unk_98E256);
  v3 = v1->m_pkLevelText;
  if ( v3 )
    ((void (__stdcall *)(_DWORD))v3->vfptr[118].__vecDelDtor)(&unk_98E257);
  *(_DWORD *)&v1->m_kNPCHandle = 0xFFFF;
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}

//----- (005178E0) --------------------------------------------------------
char __thiscall IndunLevelSelectWin::Create(IndunLevelSelectWin *this, PgFrameWork *pkFrameWork)
{
  IndunLevelSelectWin *v2; // edi@1
  NiTexturePalette *v3; // esi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  NiSourceTexture *v8; // eax@10
  PgWinSpr *v9; // eax@10
  D3DXCOLOR v10; // ST1C_16@10
  PgFrameWork *v11; // eax@10
  int v12; // edi@10
  const char *v13; // eax@11
  PgWinBut *v14; // esi@11
  PgFont *v15; // ST20_4@11
  unsigned int v16; // ST1C_4@11
  unsigned int v17; // eax@11
  PgWinText *v18; // ebx@11
  int v19; // eax@11
  PgWinBut *v20; // ST24_4@16
  PgFont *v21; // ST20_4@16
  unsigned int v22; // ST1C_4@16
  unsigned int v23; // eax@16
  PgWinText *v24; // esi@16
  NiRefObjectVtbl *v25; // edi@16
  NiUnsharedGeometryGroup *v26; // eax@16
  NiNode *v27; // esi@17
  UIUtil ui; // [sp+40h] [bp-30h]@10
  int uiLeft; // [sp+54h] [bp-1Ch]@4
  int uiTop; // [sp+58h] [bp-18h]@4
  IndunLevelSelectWin *v31; // [sp+5Ch] [bp-14h]@1
  NiPointer<NiNode> spNode; // [sp+60h] [bp-10h]@1
  int v33; // [sp+6Ch] [bp-4h]@1
  PgFrameWork *pkFrameWorka; // [sp+78h] [bp+8h]@11

  v2 = this;
  v31 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v33 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\ModeIDWin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "IndunLevelSelectWin", 0) )
  {
    v6 = spNode.m_pObject;
    v33 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v33) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, 0, 0);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v8 = MenuTexMgr::GetTexture(0x13u);
  v9 = UIUtil::CreateSpr(&ui, "Theme", v8);
  v9->vfptr[60].__vecDelDtor((NiRefObject *)v9, 0);
  *(_QWORD *)&v10.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v10.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v2->m_pkMsgText = UIUtil::CreateTextNoSpr(&ui, "Textbox", &byte_98E21D, v10, 5u);
  v11 = 0;
  v12 = (int)v2->m_kIndunLevelButton;
  do
  {
    pkFrameWorka = (PgFrameWork *)((char *)v11 + 1);
    v13 = fs("Btn%02d", (char *)&v11->vfptr + 1);
    v14 = UIUtil::CreateButton(&ui, 0, v13, 0, 3);
    v15 = Font::Get(0);
    v16 = ((int (__thiscall *)(PgWinBut *))v14->vfptr[37].__vecDelDtor)(v14);
    v17 = ((int (__thiscall *)(PgWinBut *))v14->vfptr[36].__vecDelDtor)(v14);
    v18 = PgWinText::CreateWin(0, 0, v17, v16, v15, (PgWin *)&v14->vfptr, 0, 0);
    v18->vfptr[122].__vecDelDtor((NiRefObject *)v18, 5u);
    v18->vfptr[60].__vecDelDtor((NiRefObject *)v18, 0);
    v19 = ((int (__thiscall *)(PgWinBut *))v14->vfptr[42].__vecDelDtor)(v14);
    *(_DWORD *)v12 = v14;
    *(_DWORD *)(v12 + 4) = v18;
    *(_DWORD *)(v12 + 8) = v19;
    if ( *(_DWORD *)v12 )
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v12 + 256))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v12 + 176))(*(_DWORD *)(v12 + 8));
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v12 + 520))(0);
    }
    if ( *(_DWORD *)(v12 + 4) )
      (*(void (__stdcall **)(void *))(**(_DWORD **)(v12 + 4) + 472))(&unk_98E21C);
    v11 = pkFrameWorka;
    v12 += 12;
  }
  while ( (unsigned int)pkFrameWorka < 3 );
  v20 = UIUtil::CreateButton(&ui, 1u, "QuitBtn", 0, 3);
  v21 = Font::Get(0);
  v22 = ((int (__thiscall *)(PgWinBut *))v20->vfptr[37].__vecDelDtor)(v20);
  v23 = ((int (__thiscall *)(PgWinBut *))v20->vfptr[36].__vecDelDtor)(v20);
  v24 = PgWinText::CreateWin(0, 0, v23, v22, v21, (PgWin *)&v20->vfptr, 0, 0);
  v24->vfptr[122].__vecDelDtor((NiRefObject *)v24, 5u);
  v25 = v24->vfptr;
  v26 = TextData::Get(0xDDE7EBEF);
  v25[118].__vecDelDtor((NiRefObject *)v24, (unsigned int)v26);
  v24->vfptr[60].__vecDelDtor((NiRefObject *)v24, 0);
  ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v31->vfptr[59].__vecDelDtor)(
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.2);
  LOBYTE(v33) = 0;
  UIUtil::~UIUtil(&ui);
  v33 = -1;
  if ( spNode.m_pObject )
  {
    v27 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v27 )
        v27->vfptr->__vecDelDtor((NiRefObject *)v27, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00517C40) --------------------------------------------------------
char __thiscall IndunLevelMsgWin::Create(IndunLevelMsgWin *this, PgFrameWork *pkFrameWork)
{
  IndunLevelMsgWin *v2; // edi@1
  NiTexturePalette *v3; // esi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  NiSourceTexture *v8; // eax@10
  PgWinSpr *v9; // eax@10
  D3DXCOLOR v10; // ST14_16@10
  D3DXCOLOR v11; // ST14_16@10
  PgWinText *v12; // eax@10
  PgWinBut *v13; // ST1C_4@10
  PgFont *v14; // ST18_4@10
  unsigned int v15; // ST14_4@10
  unsigned int v16; // eax@10
  PgWinText *v17; // esi@10
  NiRefObjectVtbl *v18; // ebx@10
  NiUnsharedGeometryGroup *v19; // eax@10
  PgWinBut *v20; // ST1C_4@10
  PgFont *v21; // ST18_4@10
  unsigned int v22; // ST14_4@10
  unsigned int v23; // eax@10
  PgWinText *v24; // esi@10
  NiRefObjectVtbl *v25; // ebx@10
  NiUnsharedGeometryGroup *v26; // eax@10
  NiNode *v27; // esi@11
  UIUtil ui; // [sp+38h] [bp-2Ch]@10
  int uiLeft; // [sp+4Ch] [bp-18h]@4
  int uiTop; // [sp+50h] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+54h] [bp-10h]@1
  int v32; // [sp+60h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v32 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\ModeIDMsg.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "IndunLevelMsgWin", 0) )
  {
    v6 = spNode.m_pObject;
    v32 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v32) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, 0, 0);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v8 = MenuTexMgr::GetTexture(0x13u);
  v9 = UIUtil::CreateSpr(&ui, "Theme", v8);
  v9->vfptr[60].__vecDelDtor((NiRefObject *)v9, 0);
  *(_QWORD *)&v10.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v10.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v2->m_pkMsgText = UIUtil::CreateTextNoSpr(&ui, "TextBox01", &byte_98E21F, v10, 5u);
  *(_QWORD *)&v11.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v11.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v12 = UIUtil::CreateTextNoSpr(&ui, "TextBox02", &byte_98E233, v11, 5u);
  v2->m_pkLevelText = v12;
  v12->vfptr[117].__vecDelDtor((NiRefObject *)v12, (unsigned int)&Color::m_kDxYellowColor);
  v13 = UIUtil::CreateButton(&ui, 0, "Btn01", 0, 3);
  v14 = Font::Get(0);
  v15 = ((int (__thiscall *)(PgWinBut *))v13->vfptr[37].__vecDelDtor)(v13);
  v16 = ((int (__thiscall *)(PgWinBut *))v13->vfptr[36].__vecDelDtor)(v13);
  v17 = PgWinText::CreateWin(0, 0, v16, v15, v14, (PgWin *)&v13->vfptr, 0, 0);
  v17->vfptr[122].__vecDelDtor((NiRefObject *)v17, 5u);
  v18 = v17->vfptr;
  v19 = TextData::Get(0x4F5F499Fu);
  v18[118].__vecDelDtor((NiRefObject *)v17, (unsigned int)v19);
  v17->vfptr[60].__vecDelDtor((NiRefObject *)v17, 0);
  v20 = UIUtil::CreateButton(&ui, 1u, "Btn02", 0, 3);
  v21 = Font::Get(0);
  v22 = ((int (__thiscall *)(PgWinBut *))v20->vfptr[37].__vecDelDtor)(v20);
  v23 = ((int (__thiscall *)(PgWinBut *))v20->vfptr[36].__vecDelDtor)(v20);
  v24 = PgWinText::CreateWin(0, 0, v23, v22, v21, (PgWin *)&v20->vfptr, 0, 0);
  v24->vfptr[122].__vecDelDtor((NiRefObject *)v24, 5u);
  v25 = v24->vfptr;
  v26 = TextData::Get(0x88A297E1);
  v25[118].__vecDelDtor((NiRefObject *)v24, (unsigned int)v26);
  v24->vfptr[60].__vecDelDtor((NiRefObject *)v24, 0);
  ((void (__thiscall *)(IndunLevelMsgWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.2);
  LOBYTE(v32) = 0;
  UIUtil::~UIUtil(&ui);
  v32 = -1;
  if ( spNode.m_pObject )
  {
    v27 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v27 )
        v27->vfptr->__vecDelDtor((NiRefObject *)v27, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00517F80) --------------------------------------------------------
void __thiscall IndunLevelMsgWin::OnCommand(IndunLevelMsgWin *this, unsigned int wParam, int lParam)
{
  if ( wParam )
  {
    if ( wParam == 1 )
      IndunLevelMsgWin::OnCancel(this);
  }
  else
  {
    IndunLevelMsgWin::OnOk(this);
  }
}

//----- (00517FA0) --------------------------------------------------------
IndunLevelSelectWin *__cdecl IndunLevelSelectWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  IndunLevelSelectWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x184u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    IndunLevelSelectWin::IndunLevelSelectWin((IndunLevelSelectWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (IndunLevelSelectWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (005180D0) --------------------------------------------------------
IndunLevelMsgWin *__cdecl IndunLevelMsgWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  IndunLevelMsgWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x168u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&IndunLevelMsgWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&IndunLevelMsgWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
    LOWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][1]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (IndunLevelMsgWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 98E520: using guessed type void (__thiscall *IndunLevelMsgWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98E53C: using guessed type int (__thiscall *IndunLevelMsgWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00518230) --------------------------------------------------------
void __thiscall IndunLevelSelectWin::SetInfo(IndunLevelSelectWin *this, unsigned __int16 kNPCHandle, Name3 kMapIndex, unsigned int uiMenuCount, ID_LEVEL_TYPE *eLevelType)
{
  IndunLevelSelectWin *v5; // ebx@1
  MapInfo *v6; // eax@2
  NiRefObjectVtbl **v7; // ecx@3
  NiRefObjectVtbl *v8; // esi@4
  int v9; // ST0C_4@4
  char *v10; // eax@4
  char *v11; // eax@4
  NiUnsharedGeometryGroup *v12; // eax@5
  NiUnsharedGeometryGroup *v13; // eax@5
  NiUnsharedGeometryGroup *v14; // eax@5
  unsigned int v15; // ebx@5
  int v16; // esi@6
  int v17; // ecx@7
  unsigned int v18; // edi@7
  int v19; // edi@9
  unsigned int v20; // eax@9
  int v21; // ecx@15
  ID_LEVEL_TYPE *v22; // [sp+10h] [bp-70h]@1
  IndunLevelSelectWin *v23; // [sp+14h] [bp-6Ch]@1
  unsigned int uiLevelType; // [sp+18h] [bp-68h]@7
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *uiLevelTypea; // [sp+18h] [bp-68h]@11
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kButtonText[3]; // [sp+1Ch] [bp-64h]@5
  int v27; // [sp+7Ch] [bp-4h]@5

  v5 = this;
  v23 = this;
  v22 = eLevelType;
  if ( uiMenuCount != 1 )
  {
    IndunLevelSelectWin::ResetInfo(this);
    v6 = MapInfoTab::GetByMapName(&kMapIndex);
    if ( v6 )
    {
      v7 = &v5->m_pkMsgText->vfptr;
      if ( v7 )
      {
        v8 = *v7;
        v9 = (int)v6->Name;
        v10 = (char *)TextData2::Get(0x2F51786Bu);
        v11 = fs(v10, v9);
        v8[118].__vecDelDtor((NiRefObject *)v5->m_pkMsgText, (unsigned int)v11);
      }
      kButtonText[0]._Myres = 15;
      kButtonText[0]._Mysize = 0;
      kButtonText[0]._Bx._Buf[0] = 0;
      v12 = TextData3::Get(0xA7E9DC3F);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        kButtonText,
        (const char *)v12,
        strlen((const char *)v12));
      v27 = 0;
      v13 = TextData3::Get(0xA7432633);
      kButtonText[1]._Myres = 15;
      kButtonText[1]._Mysize = 0;
      kButtonText[1]._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &kButtonText[1],
        (const char *)v13,
        strlen((const char *)v13));
      LOBYTE(v27) = 1;
      v14 = TextData3::Get(0xA8E9DF2A);
      kButtonText[2]._Myres = 15;
      kButtonText[2]._Mysize = 0;
      kButtonText[2]._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &kButtonText[2],
        (const char *)v14,
        strlen((const char *)v14));
      v15 = 0;
      v27 = 2;
      if ( uiMenuCount > 0 )
      {
        v16 = (int)v23->m_kIndunLevelButton;
        do
        {
          v17 = *(_DWORD *)v16;
          v18 = v22[v15];
          uiLevelType = v22[v15];
          if ( *(_DWORD *)v16 && uiMenuCount == 2 )
          {
            v19 = *(_DWORD *)v17;
            v20 = (*(int (**)(void))(*(_DWORD *)v17 + 148))();
            (*(void (__thiscall **)(int, unsigned int))(v19 + 176))(*(_DWORD *)v16, *(_DWORD *)(v16 + 8) + (v20 >> 1));
            v18 = uiLevelType;
          }
          if ( *(&kButtonText[0]._Myres + 7 * v18) < 0x10 )
            uiLevelTypea = &kButtonText[v18];
          else
            uiLevelTypea = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)kButtonText[v18]._Bx._Ptr;
          if ( *(_DWORD *)v16 )
            (*(void (__stdcall **)(signed int))(**(_DWORD **)v16 + 256))(1);
          v21 = *(_DWORD *)(v16 + 4);
          if ( v21 )
            (*(void (__stdcall **)(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *))(*(_DWORD *)v21 + 472))(uiLevelTypea);
          if ( *(_DWORD *)v16 )
            (*(void (__stdcall **)(unsigned int))(**(_DWORD **)v16 + 520))(v18);
          ++v15;
          v16 += 12;
        }
        while ( v15 < uiMenuCount );
      }
      v23->m_kNPCHandle = kNPCHandle;
      v27 = -1;
      `eh vector destructor iterator'(
        kButtonText,
        0x1Cu,
        3,
        (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    }
  }
}

//----- (00518450) --------------------------------------------------------
void __thiscall IndunLevelMsgWin::SetInfo(IndunLevelMsgWin *this, unsigned __int16 kNPCHandle, Name3 kMapIndex, ID_LEVEL_TYPE eLevelType)
{
  IndunLevelMsgWin *v4; // edi@1
  MapInfo *v5; // ecx@1
  NiRefObjectVtbl **v6; // eax@2
  NiRefObjectVtbl *v7; // esi@3
  int v8; // ST08_4@3
  char *v9; // eax@3
  char *v10; // eax@3
  NiUnsharedGeometryGroup *v11; // eax@7
  NiUnsharedGeometryGroup *v12; // ecx@7
  int v13; // esi@7
  char v14; // dl@8
  char v15; // dl@11
  char v16; // dl@14
  NiRefObjectVtbl **v17; // eax@16
  void *v18; // ecx@17
  NiRefObjectVtbl *v19; // esi@19
  char *v20; // eax@19
  bool v21; // cf@20
  ID_LEVEL_TYPE v22; // ecx@20
  MapInfo *pkMapInfo; // [sp+Ch] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kLevel; // [sp+10h] [bp-2Ch]@4
  int v25; // [sp+38h] [bp-4h]@4

  v4 = this;
  v5 = MapInfoTab::GetByMapName(&kMapIndex);
  pkMapInfo = v5;
  if ( !v5 )
    return;
  v6 = &v4->m_pkMsgText->vfptr;
  if ( v6 )
  {
    v7 = *v6;
    v8 = (int)v5->Name;
    v9 = (char *)TextData2::Get(0x2F51786Bu);
    v10 = fs(v9, v8);
    v7[118].__vecDelDtor((NiRefObject *)v4->m_pkMsgText, (unsigned int)v10);
  }
  kLevel._Myres = 15;
  kLevel._Mysize = 0;
  kLevel._Bx._Buf[0] = 0;
  v25 = 0;
  if ( eLevelType == ILT_EASY )
  {
    v11 = TextData3::Get(0xA7E9DC3F);
    v12 = v11;
    v13 = (int)&v11->vfptr + 1;
    do
    {
      v16 = (char)v12->vfptr;
      v12 = (NiUnsharedGeometryGroup *)((char *)v12 + 1);
    }
    while ( v16 );
    goto LABEL_15;
  }
  if ( eLevelType == 1 )
  {
    v11 = TextData3::Get(0xA7432633);
    v12 = v11;
    v13 = (int)&v11->vfptr + 1;
    do
    {
      v15 = (char)v12->vfptr;
      v12 = (NiUnsharedGeometryGroup *)((char *)v12 + 1);
    }
    while ( v15 );
    goto LABEL_15;
  }
  if ( eLevelType == 2 )
  {
    v11 = TextData3::Get(0xA8E9DF2A);
    v12 = v11;
    v13 = (int)&v11->vfptr + 1;
    do
    {
      v14 = (char)v12->vfptr;
      v12 = (NiUnsharedGeometryGroup *)((char *)v12 + 1);
    }
    while ( v14 );
LABEL_15:
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kLevel,
      (const char *)v11,
      (unsigned int)v12 - v13);
  }
  v17 = &v4->m_pkLevelText->vfptr;
  if ( v17 )
  {
    v18 = kLevel._Bx._Ptr;
    if ( kLevel._Myres < 0x10 )
      v18 = &kLevel;
    v19 = *v17;
    v20 = fs("(%s %s)", pkMapInfo->Name, v18);
    v19[118].__vecDelDtor((NiRefObject *)v4->m_pkLevelText, (unsigned int)v20);
  }
  v21 = kLevel._Myres < 0x10;
  v22 = eLevelType;
  v4->m_kNPCHandle = kNPCHandle;
  v4->m_eLevelType = v22;
  if ( !v21 )
    operator delete(kLevel._Bx._Ptr);
}

//----- (005185E0) --------------------------------------------------------
IndunLevelSelectWin *__thiscall IndunLevelSelectWin::`vector deleting destructor'(IndunLevelSelectWin *this, unsigned int a2)
{
  IndunLevelSelectWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&IndunLevelSelectWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&IndunLevelSelectWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98E2DC: using guessed type void (__thiscall *IndunLevelSelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98E2FC: using guessed type int (__thiscall *IndunLevelSelectWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00518620) --------------------------------------------------------
IndunLevelMsgWin *__thiscall IndunLevelMsgWin::`vector deleting destructor'(IndunLevelMsgWin *this, unsigned int a2)
{
  IndunLevelMsgWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&IndunLevelMsgWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&IndunLevelMsgWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98E520: using guessed type void (__thiscall *IndunLevelMsgWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98E53C: using guessed type int (__thiscall *IndunLevelMsgWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00518660) --------------------------------------------------------
void __thiscall InputTextWin::OnCmdOk(InputTextWin *this)
{
  InputTextWin *v1; // esi@1

  v1 = this;
  PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
  PgWin::PostMsg(v1->m_pkRevWin, 5u, v1->m_uiOkMsg, 0);
}

//----- (00518690) --------------------------------------------------------
void __thiscall InputTextWin::OnCmdCancel(InputTextWin *this)
{
  PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
}

//----- (005186A0) --------------------------------------------------------
void __thiscall InputTextWin::OnClose(InputTextWin *this)
{
  InputTextWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkInputEdit->vfptr[121].__vecDelDtor)(1);
  PgWin::OnClose((PgWin *)&v1->vfptr);
}

//----- (005186C0) --------------------------------------------------------
void __thiscall InputTextWin::OnEditEnd(InputTextWin *this, unsigned int wParam, int lParam)
{
  InputTextWin *v3; // esi@1

  v3 = this;
  PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
  PgWin::PostMsg(v3->m_pkRevWin, 5u, v3->m_uiOkMsg, 0);
  ((void (*)(void))v3->m_pkInputEdit->vfptr[120].__vecDelDtor)();
}

//----- (00518700) --------------------------------------------------------
void __thiscall InputTextWin::OnCommand(InputTextWin *this, unsigned int wParam, int lParam)
{
  InputTextWin *v3; // esi@1

  v3 = this;
  if ( wParam )
  {
    if ( wParam == 1 )
      PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
  }
  else
  {
    PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
    PgWin::PostMsg(v3->m_pkRevWin, 5u, v3->m_uiOkMsg, 0);
  }
}

//----- (00518750) --------------------------------------------------------
void __thiscall InputTextWin::Open(InputTextWin *this, PgWin *pkRevWin, unsigned int uiOkMsg, char *pcText)
{
  InputTextWin *v4; // esi@1
  NiRefObjectVtbl *v5; // edi@1
  unsigned int v6; // eax@1
  NiRefObjectVtbl *v7; // edi@1
  unsigned int v8; // eax@1

  v4 = this;
  ((void (__stdcall *)(_DWORD))this->m_apkTextWin[0].m_pObject->vfptr[118].__vecDelDtor)(pcText);
  ((void (*)(void))v4->m_pkInputEdit->vfptr[120].__vecDelDtor)();
  v4->m_pkRevWin = pkRevWin;
  v4->m_uiOkMsg = uiOkMsg;
  PgWinMgr::DoModal(&Pgg_kWinMgr, (PgWin *)&v4->vfptr, 0, 0, 0);
  v5 = v4->vfptr;
  v6 = ((int (__thiscall *)(_DWORD))v4->vfptr[36].__vecDelDtor)(v4);
  v5[43].__vecDelDtor((NiRefObject *)v4, PgWin::ms_iMsX - (v6 >> 1));
  v7 = v4->vfptr;
  v8 = ((int (__thiscall *)(_DWORD))v4->vfptr[37].__vecDelDtor)(v4);
  v7[44].__vecDelDtor((NiRefObject *)v4, PgWin::ms_iMsY - (v8 >> 1));
}

//----- (005187F0) --------------------------------------------------------
void __thiscall InputTextWin::~InputTextWin(InputTextWin *this)
{
  InputTextWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&InputTextWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&InputTextWin::`vftable'{for `IDirectMessenger'};
  this->m_pkInputEdit = 0;
  `eh vector destructor iterator'(
    this->m_apkTextWin,
    4u,
    2,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 98E7FC: using guessed type void (__thiscall *InputTextWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98E81C: using guessed type int (__thiscall *InputTextWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00518870) --------------------------------------------------------
char __thiscall InputTextWin::Create(InputTextWin *this, PgFrameWork *pkFrameWork)
{
  InputTextWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // ebx@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  NiSourceTexture *v10; // eax@15
  PgSprData *v11; // eax@16
  PgWinSpr *v12; // eax@18
  PgSprData *v13; // eax@21
  PgSprData *v14; // edi@22
  PgWinBut *v15; // eax@22
  PgWinBut *v16; // edi@22
  PgWin *v17; // ST4C_4@22
  PgFont *v18; // ST48_4@22
  unsigned int v19; // ST44_4@22
  unsigned int v20; // eax@22
  PgWinText *v21; // edi@22
  NiRefObjectVtbl *v22; // ebx@22
  NiUnsharedGeometryGroup *v23; // eax@22
  PgSprData *v24; // edi@22
  PgWinBut *v25; // eax@22
  PgWinBut *v26; // edi@22
  PgWin *v27; // ST4C_4@22
  PgFont *v28; // ST48_4@22
  unsigned int v29; // ST44_4@22
  unsigned int v30; // eax@22
  PgWinText *v31; // edi@22
  NiRefObjectVtbl *v32; // ebx@22
  NiUnsharedGeometryGroup *v33; // eax@22
  PgFont *v34; // eax@22
  int v35; // edi@22
  unsigned int v36; // ebx@24
  PgFont *v37; // ST48_4@24
  unsigned int v38; // ST44_4@24
  int v39; // eax@24
  NiSourceTexture *v40; // eax@24
  NiSourceTexture *v41; // ebx@24
  NiRefObjectVtbl **v42; // ebx@33
  NiRefObjectVtbl *v43; // edi@33
  NiUnsharedGeometryGroup *v44; // eax@33
  NiNode *v45; // esi@34
  PgFont *pkFont; // [sp+44h] [bp-28h]@22
  unsigned int uiWidth; // [sp+48h] [bp-24h]@20
  unsigned int uiHeight; // [sp+4Ch] [bp-20h]@20
  NiSourceTexture *pkTexture; // [sp+50h] [bp-1Ch]@1
  int uiLeft; // [sp+54h] [bp-18h]@11
  int uiTop; // [sp+58h] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+5Ch] [bp-10h]@1
  int v53; // [sp+68h] [bp-4h]@1
  int i; // [sp+74h] [bp+8h]@22

  v2 = this;
  spNode.m_pObject = 0;
  v53 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  pkTexture = v3;
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v53 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "Game\\MessageWin.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "CalculatorWin", 0) )
  {
    v4 = spNode.m_pObject;
    v53 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
    goto LABEL_5;
  }
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  v12 = PgWinSpr::CreateWin(uiLeft, uiTop, v11, (PgWin *)&v2->vfptr, 0, 0);
  if ( v12 )
    v12->vfptr[60].__vecDelDtor((NiRefObject *)v12, 0);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "LotInput", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "LotInput", &uiLeft, &uiTop, v3);
    PgWinSpr::CreateWin(uiLeft, uiTop, v13, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkInputEdit = EditWin::CreateWin(
                          uiLeft + 2,
                          uiTop + 4,
                          uiWidth,
                          uiHeight,
                          (PgWin *)&v2->vfptr,
                          NORMAL,
                          0x10u,
                          3u,
                          0,
                          0,
                          1);
  }
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor02", &uiLeft, &uiTop, v3);
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick02");
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver02");
  v15 = PgWinBut::CreateWin(uiLeft, uiTop, v14, (PgWin *)&v2->vfptr, 0, 0, 0);
  v16 = v15;
  v17 = (PgWin *)v15;
  v18 = Font::Get(0);
  v19 = ((int (__thiscall *)(PgWinBut *))v16->vfptr[37].__vecDelDtor)(v16);
  v20 = ((int (__thiscall *)(PgWinBut *))v16->vfptr[36].__vecDelDtor)(v16);
  v21 = PgWinText::CreateWin(0, 1, v20, v19, v18, v17, 0, 0);
  v21->vfptr[122].__vecDelDtor((NiRefObject *)v21, 5u);
  v22 = v21->vfptr;
  v23 = TextData::Get(0x4F5F499Fu);
  v22[118].__vecDelDtor((NiRefObject *)v21, (unsigned int)v23);
  v21->vfptr[60].__vecDelDtor((NiRefObject *)v21, 0);
  v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor04", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(v24, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick04");
  PgSprData::Add(v24, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver04");
  v25 = PgWinBut::CreateWin(uiLeft, uiTop, v24, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v26 = v25;
  v27 = (PgWin *)v25;
  v28 = Font::Get(0);
  v29 = ((int (__thiscall *)(PgWinBut *))v26->vfptr[37].__vecDelDtor)(v26);
  v30 = ((int (__thiscall *)(PgWinBut *))v26->vfptr[36].__vecDelDtor)(v26);
  v31 = PgWinText::CreateWin(0, 1, v30, v29, v28, v27, 0, 0);
  v31->vfptr[122].__vecDelDtor((NiRefObject *)v31, 5u);
  v32 = v31->vfptr;
  v33 = TextData::Get(0x88A297E1);
  v32[118].__vecDelDtor((NiRefObject *)v31, (unsigned int)v33);
  v31->vfptr[60].__vecDelDtor((NiRefObject *)v31, 0);
  v34 = Font::Get(0);
  pkFont = v34;
  i = 0;
  v35 = (int)v2->m_apkTextWin;
  while ( 1 )
  {
    v36 = v34->m_uiDefHeight;
    v37 = v34;
    v38 = v34->m_uiDefHeight;
    v39 = ((int (__thiscall *)(InputTextWin *))v2->vfptr[36].__vecDelDtor)(v2);
    v40 = (NiSourceTexture *)PgWinText::CreateWin(8, i * (v36 + 1) + 8, v39 - 16, v38, v37, (PgWin *)&v2->vfptr, 0, 0);
    v41 = *(NiSourceTexture **)v35;
    pkTexture = v40;
    if ( v41 != v40 )
    {
      if ( v41 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v41->m_uiRefCount) && v41 )
          v41->vfptr->__vecDelDtor((NiRefObject *)v41, 1u);
        v40 = pkTexture;
      }
      *(_DWORD *)v35 = v40;
      if ( v40 )
        InterlockedIncrement((volatile LONG *)&v40->m_uiRefCount);
    }
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v35 + 240))(0);
    v35 += 4;
    if ( ++i >= 2 )
      break;
    v34 = pkFont;
  }
  ((void (__stdcall *)(signed int))v2->m_apkTextWin[0].m_pObject->vfptr[122].__vecDelDtor)(5);
  v42 = &v2->m_apkTextWin[0].m_pObject->vfptr;
  v43 = *v42;
  v44 = TextData::Get(0xEAF9353B);
  v43[118].__vecDelDtor((NiRefObject *)v42, (unsigned int)v44);
  ((void (__thiscall *)(InputTextWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  v53 = -1;
  if ( spNode.m_pObject )
  {
    v45 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v45 )
        v45->vfptr->__vecDelDtor((NiRefObject *)v45, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00518D50) --------------------------------------------------------
void __thiscall InputTextWin::InputTextWin(InputTextWin *this)
{
  InputTextWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&InputTextWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&InputTextWin::`vftable'{for `IDirectMessenger'};
  `eh vector constructor iterator'(
    v1->m_apkTextWin,
    4u,
    2,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
}
// 98E7FC: using guessed type void (__thiscall *InputTextWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98E81C: using guessed type int (__thiscall *InputTextWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00518DD0) --------------------------------------------------------
InputTextWin *__cdecl InputTextWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  InputTextWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x270u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    LOBYTE(v6) = 1;
    v2->vfptr = (NiRefObjectVtbl *)&InputTextWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&InputTextWin::`vftable'{for `IDirectMessenger'};
    `eh vector constructor iterator'(
      &v2[2].m_kWorldBound.m_kCenter.y,
      4u,
      2,
      (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
      (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (InputTextWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 98E7FC: using guessed type void (__thiscall *InputTextWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98E81C: using guessed type int (__thiscall *InputTextWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00518F30) --------------------------------------------------------
InputTextWin *__thiscall InputTextWin::`scalar deleting destructor'(InputTextWin *this, unsigned int a2)
{
  InputTextWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&InputTextWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&InputTextWin::`vftable'{for `IDirectMessenger'};
  this->m_pkInputEdit = 0;
  `eh vector destructor iterator'(
    this->m_apkTextWin,
    4u,
    2,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98E7FC: using guessed type void (__thiscall *InputTextWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98E81C: using guessed type int (__thiscall *InputTextWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00518FC0) --------------------------------------------------------
void __thiscall ChargedItemUseTask::OnStart(ChargedItemUseTask *this)
{
  ChargedItemUseTask *v1; // esi@1

  v1 = this;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x22u, &this->m_kChargedItemWithDrawPacket, 4);
  v1->m_eState = 0;
}

//----- (00518FE0) --------------------------------------------------------
void __thiscall InvWin::SetInvType(InvWin *this, unsigned int uiInvType)
{
  this->m_uiInvType = uiInvType;
}

//----- (00518FF0) --------------------------------------------------------
void __thiscall InvWin::SetActive(InvWin *this, bool bActive)
{
  this->m_bActive = bActive;
}

//----- (00519000) --------------------------------------------------------
bool __thiscall InvWin::GetActive(InvWin *this)
{
  return this->m_bActive;
}

//----- (00519010) --------------------------------------------------------
bool __thiscall InvWin::IsLock(InvWin *this)
{
  return this->m_bLock;
}

//----- (00519020) --------------------------------------------------------
void __thiscall InvTabButWin::InvTabButWin(InvTabButWin *this)
{
  InvTabButWin *v1; // esi@1

  v1 = this;
  PgWinBut::PgWinBut((PgWinBut *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&InvTabButWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&InvTabButWin::`vftable'{for `IDirectMessenger'};
  v1->m_bDroppable = 1;
}
// 98F14C: using guessed type void (__thiscall *InvTabButWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98F16C: using guessed type int (__thiscall *InvTabButWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00519050) --------------------------------------------------------
void __thiscall InvTabButWin::~InvTabButWin(InvTabButWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&InvTabButWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&InvTabButWin::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
}
// 98F14C: using guessed type void (__thiscall *InvTabButWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98F16C: using guessed type int (__thiscall *InvTabButWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00519070) --------------------------------------------------------
bool __thiscall InvTabButWin::Create(InvTabButWin *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg)
{
  return PgWinBut::Create((PgWinBut *)&this->vfptr, iXPos, iYPos, pkSprData, pkParent, uiCmdMsg, 0, 0) != 0;
}

//----- (005190A0) --------------------------------------------------------
void __thiscall ChargedItemIcon::ChargedItemIcon(ChargedItemIcon *this)
{
  ChargedItemIcon *v1; // esi@1

  v1 = this;
  ItemIcon::ItemIcon((ItemIcon *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ChargedItemIcon::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ChargedItemIcon::`vftable'{for `IDirectMessenger'};
  v1->m_dwChargedItemID = -1;
}
// 98F3A4: using guessed type void (__thiscall *ChargedItemIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98F3C4: using guessed type int (__thiscall *ChargedItemIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (005190D0) --------------------------------------------------------
void __thiscall ChargedItemIcon::~ChargedItemIcon(ChargedItemIcon *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ChargedItemIcon::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ChargedItemIcon::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
}
// 98F3A4: using guessed type void (__thiscall *ChargedItemIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98F3C4: using guessed type int (__thiscall *ChargedItemIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (005190F0) --------------------------------------------------------
bool __thiscall ChargedItemIcon::Create(ChargedItemIcon *this, int iXPos, int iYPos, PgWin *pkParent)
{
  return ItemIcon::Create((ItemIcon *)&this->vfptr, iXPos, iYPos, pkParent) != 0;
}

//----- (00519110) --------------------------------------------------------
void __thiscall ChargedItemIcon::SetChargedItem(ChargedItemIcon *this, unsigned int dwShopItemID)
{
  this->m_dwChargedItemID = dwShopItemID;
  ItemIcon::SetChargedItem((ItemIcon *)&this->vfptr, dwShopItemID);
}

//----- (00519130) --------------------------------------------------------
void __thiscall ChargedItemInvenWin::ChargedItemInvenWin(ChargedItemInvenWin *this)
{
  ChargedItemInvenWin *v1; // esi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ChargedItemInvenWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ChargedItemInvenWin::`vftable'{for `IDirectMessenger'};
  v1->m_apkItemIcon[0] = 0;
  v1->m_apkItemIcon[1] = 0;
  v1->m_apkItemIcon[2] = 0;
  v1->m_apkItemIcon[3] = 0;
  v1->m_apkItemIcon[4] = 0;
  v1->m_apkItemIcon[5] = 0;
  v1->m_apkItemIcon[6] = 0;
  v1->m_apkItemIcon[7] = 0;
  v1->m_apkItemIcon[8] = 0;
  v1->m_apkItemIcon[9] = 0;
  v1->m_apkItemIcon[10] = 0;
  v1->m_apkItemIcon[11] = 0;
  v1->m_apkItemIcon[12] = 0;
  v1->m_apkItemIcon[13] = 0;
  v1->m_apkItemIcon[14] = 0;
  v1->m_apkItemIcon[15] = 0;
  v1->m_apkItemIcon[16] = 0;
  v1->m_apkItemIcon[17] = 0;
  v1->m_apkItemIcon[18] = 0;
  v1->m_apkItemIcon[19] = 0;
  v1->m_apkItemIcon[20] = 0;
  v1->m_apkItemIcon[21] = 0;
  v1->m_apkItemIcon[22] = 0;
  v1->m_apkItemIcon[23] = 0;
  v1->m_uiCurrPage = 0;
}
// 98F630: using guessed type void (__thiscall *ChargedItemInvenWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98F64C: using guessed type int (__thiscall *ChargedItemInvenWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005191F0) --------------------------------------------------------
void __thiscall ChargedItemInvenWin::~ChargedItemInvenWin(ChargedItemInvenWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ChargedItemInvenWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ChargedItemInvenWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
}
// 98F630: using guessed type void (__thiscall *ChargedItemInvenWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98F64C: using guessed type int (__thiscall *ChargedItemInvenWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00519210) --------------------------------------------------------
void __thiscall ChargedItemInvenWin::SendPageInfoReq(ChargedItemInvenWin *this)
{
  ChargedItemInvenWin *kProto; // [sp+0h] [bp-4h]@1

  kProto = this;
  LOWORD(kProto) = this->m_uiCurrPage;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x20u, &kProto, 2);
}

//----- (00519240) --------------------------------------------------------
void __thiscall ChargedItemInvenWin::Refresh(ChargedItemInvenWin *this)
{
  ChargedItemInvenWin *v1; // esi@1
  NiRefObjectVtbl *v2; // edi@1
  char *v3; // eax@1
  int v4; // edi@1
  int v5; // esi@1
  signed int v6; // ebx@1
  int v7; // esi@3
  PROTO_CHARGED_ITEM_INFO *v8; // eax@4

  v1 = this;
  v2 = this->m_pkPageNumText->vfptr;
  v3 = fs("%d", this->m_uiCurrPage + 1);
  v2[118].__vecDelDtor((NiRefObject *)v1->m_pkPageNumText, (unsigned int)v3);
  v4 = (int)v1->m_apkItemIcon;
  v5 = (int)v1->m_apkItemIcon;
  v6 = 24;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v5 + 608))(-1);
    v5 += 4;
    --v6;
  }
  while ( v6 );
  v7 = 0;
  do
  {
    v8 = CChargedItem::Seek(&g_kChargedItem, v7);
    if ( !v8 )
      break;
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 608))(v8->ItemCode);
    ++v7;
    v4 += 4;
  }
  while ( v7 < 24 );
}

//----- (005192D0) --------------------------------------------------------
void __thiscall ChargedItemInvenWin::DirectMessage(ChargedItemInvenWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  ChargedItemInvenWin *v4; // esi@1

  v4 = this;
  if ( iMsgTag == 48 )
  {
    ChargedItemInvenWin::Refresh((ChargedItemInvenWin *)((char *)this - 232));
    LOWORD(iMsgTag) = v4->m_kPropertyList.vfptr;
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x20u, &iMsgTag, 2);
  }
}

//----- (00519310) --------------------------------------------------------
void ChargedItemInvenWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "ChrInv");
}

//----- (00519340) --------------------------------------------------------
bool __thiscall CompensationItemIcon::Create(CompensationItemIcon *this, int iXPos, int iYPos, PgWin *pkParent)
{
  return ItemIcon::Create((ItemIcon *)&this->vfptr, iXPos, iYPos, pkParent) != 0;
}

//----- (00519360) --------------------------------------------------------
void __thiscall CompensationItemIcon::SetChargedItem(CompensationItemIcon *this, unsigned int dwShopItemID)
{
  this->m_dwChargedItemID = dwShopItemID;
  ItemIcon::SetChargedItem((ItemIcon *)&this->vfptr, dwShopItemID);
}

//----- (00519380) --------------------------------------------------------
void __thiscall CompensationInvWin::CompensationInvWin(CompensationInvWin *this)
{
  CompensationInvWin *v1; // esi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&CompensationInvWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CompensationInvWin::`vftable'{for `IDirectMessenger'};
  v1->m_apkItemIcon[0] = 0;
  v1->m_apkItemIcon[1] = 0;
  v1->m_apkItemIcon[2] = 0;
  v1->m_apkItemIcon[3] = 0;
  v1->m_apkItemIcon[4] = 0;
  v1->m_apkItemIcon[5] = 0;
  v1->m_apkItemIcon[6] = 0;
  v1->m_apkItemIcon[7] = 0;
  v1->m_apkItemIcon[8] = 0;
  v1->m_apkItemIcon[9] = 0;
  v1->m_apkItemIcon[10] = 0;
  v1->m_apkItemIcon[11] = 0;
  v1->m_apkItemIcon[12] = 0;
  v1->m_apkItemIcon[13] = 0;
  v1->m_apkItemIcon[14] = 0;
  v1->m_apkItemIcon[15] = 0;
  v1->m_apkItemIcon[16] = 0;
  v1->m_apkItemIcon[17] = 0;
  v1->m_apkItemIcon[18] = 0;
  v1->m_apkItemIcon[19] = 0;
  v1->m_apkItemIcon[20] = 0;
  v1->m_apkItemIcon[21] = 0;
  v1->m_apkItemIcon[22] = 0;
  v1->m_apkItemIcon[23] = 0;
  v1->m_uiCurrPage = 0;
}
// 98F818: using guessed type void (__thiscall *CompensationInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98F834: using guessed type int (__thiscall *CompensationInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00519440) --------------------------------------------------------
void __thiscall CompensationInvWin::~CompensationInvWin(CompensationInvWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&CompensationInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CompensationInvWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
}
// 98F818: using guessed type void (__thiscall *CompensationInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98F834: using guessed type int (__thiscall *CompensationInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00519460) --------------------------------------------------------
bool __stdcall CompensationInvWin::EatDropInstance(PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  return 0;
}

//----- (00519470) --------------------------------------------------------
void __thiscall CompensationInvWin::OnOpenPage(CompensationInvWin *this)
{
  CompensationInvWin *v1; // esi@1
  NiRefObjectVtbl *v2; // edi@1
  char *v3; // eax@1
  PROTO_NC_ITEM_REWARDINVENOPEN_REQ kProto; // [sp+8h] [bp-4h]@1

  v1 = this;
  kProto.page = this->m_uiCurrPage;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x2Cu, &kProto, 2);
  v2 = v1->m_pkPageNumText->vfptr;
  v3 = fs("%d", v1->m_uiCurrPage + 1);
  v2[118].__vecDelDtor((NiRefObject *)v1->m_pkPageNumText, (unsigned int)v3);
}

//----- (005194D0) --------------------------------------------------------
void __thiscall CompensationInvWin::Change(CompensationInvWin *this, Item *pkItem, unsigned int uiInvIndex)
{
  ItemIcon::SetItem((ItemIcon *)&this->m_apkItemIcon[uiInvIndex]->vfptr, pkItem, 1);
}

//----- (005194F0) --------------------------------------------------------
void CompensationInvWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "ChrInv");
}

//----- (00519520) --------------------------------------------------------
char __thiscall InventoryWin::Change(InventoryWin *this, unsigned int uiInvType, Item *pkItem, unsigned int uiInvIndex)
{
  InvWin *v4; // ecx@3
  CompensationInvWin *v6; // ecx@11

  if ( uiInvType == 9 )
  {
    if ( uiInvIndex < 0xC0 )
    {
      v4 = this->m_apkInvWin[uiInvIndex];
      goto LABEL_4;
    }
    return 0;
  }
  if ( uiInvType == 8 )
  {
    v4 = this->m_apkEquipWin[uiInvIndex];
LABEL_4:
    if ( v4 )
      ItemIcon::SetItem((ItemIcon *)&v4->vfptr, pkItem, 1);
    return 1;
  }
  if ( uiInvType != 2 || uiInvIndex >= 0xC0 )
    return 0;
  v6 = this->m_pkCompensationInvenWin;
  if ( !v6 )
    return 1;
  ItemIcon::SetItem((ItemIcon *)&v6->m_apkItemIcon[uiInvIndex]->vfptr, pkItem, 1);
  return 1;
}

//----- (005195A0) --------------------------------------------------------
void __thiscall InventoryWin::OnInputPrivateStoreBuyClientItemCount(InventoryWin *this, unsigned int uiBuyLot)
{
  GameFrameWork::NcBoothItemTradeReq(
    (GameFrameWork *)this->m_pkFrameWork,
    PrivateStoreWin::ms_BoothHandle,
    this->m_uiCurInvIndex,
    uiBuyLot);
}
// A8D480: using guessed type unsigned __int16 PrivateStoreWin::ms_BoothHandle;

//----- (005195D0) --------------------------------------------------------
void __thiscall InventoryWin::RefreshChargedItemInven(InventoryWin *this)
{
  if ( !this->m_bChargedStart )
    ChargedItemInvenWin::Refresh(this->m_pkChargedItemInvenWin);
}

//----- (00519600) --------------------------------------------------------
void InventoryWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "ChrInv");
}

//----- (00519630) --------------------------------------------------------
void __thiscall InventoryWin::SetAutoPickMinimon(InventoryWin *this, const bool bAutoPickMinimon)
{
  this->m_bAutoPickMinimon = bAutoPickMinimon;
}

//----- (00519640) --------------------------------------------------------
char __thiscall InventoryWin::SetSenderInvPos(InventoryWin *this, unsigned int uiPos)
{
  char result; // al@2

  if ( uiPos == -1 )
  {
    this->m_uiSenderInvPos = -1;
    result = 0;
  }
  else
  {
    this->m_uiSenderInvPos = uiPos;
    result = 1;
  }
  return result;
}

//----- (00519670) --------------------------------------------------------
char __thiscall InventoryWin::SetReceiverInvPos(InventoryWin *this, unsigned int uiPos)
{
  char result; // al@2

  if ( uiPos == -1 )
  {
    this->m_uiReceiverInvPos = -1;
    result = 0;
  }
  else
  {
    this->m_uiReceiverInvPos = uiPos;
    result = 1;
  }
  return result;
}

//----- (005196A0) --------------------------------------------------------
void __usercall InventoryWin::OnArrange(InventoryWin *this@<ecx>, double a2@<st0>)
{
  GameFrameWork *v2; // eax@1

  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( !v2 || GameFrameWork::IsAvailableArrange(v2, a2) )
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x4Au, 0, 0);
}

//----- (005196E0) --------------------------------------------------------
void __thiscall InventoryWin::SetEnableAutoArrange(InventoryWin *this, int bEnable)
{
  InventoryWin *v2; // esi@1

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkArrangeBut->vfptr[64].__vecDelDtor)(bEnable);
  ((void (__stdcall *)(_DWORD))v2->m_pkArrangeDisable->vfptr[64].__vecDelDtor)((_BYTE)bEnable == 0);
}

//----- (00519720) --------------------------------------------------------
void __thiscall InventoryWin::OnOpenMagicBox(InventoryWin *this)
{
  InventoryWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkInvMagicBoxBut->vfptr[60].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkInvMagicBoxBut->vfptr[64].__vecDelDtor)(1);
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x4Cu, 0, 0);
}

//----- (00519760) --------------------------------------------------------
void __thiscall InventoryWin::ShowRewardNewMark(InventoryWin *this, bool bShow)
{
  bool v2; // al@1

  v2 = this->m_bRewardStart;
  this->m_bRewardNew = v2 && bShow;
  ((void (__stdcall *)(_BYTE))this->m_pkNewRewardItem->vfptr[64].__vecDelDtor)(v2);
}

//----- (005197A0) --------------------------------------------------------
void __thiscall InventoryWin::ShowChargedNewMark(InventoryWin *this, bool bShow)
{
  this->m_bChargedNew = this->m_bChargedStart && bShow;
  ((void (__stdcall *)(_DWORD))this->m_pkNewChargedItem->vfptr[64].__vecDelDtor)(this->m_bChargedNew);
}

//----- (005197E0) --------------------------------------------------------
void __thiscall InventoryWin::SetStartNewMark(InventoryWin *this)
{
  *(_WORD *)&this->m_bRewardStart = 257;
}

//----- (005197F0) --------------------------------------------------------
BOOL __thiscall InventoryWin::GetIsViewNewMark(InventoryWin *this)
{
  return this->m_bRewardNew || this->m_bChargedNew;
}

//----- (00519810) --------------------------------------------------------
void __thiscall ChargedItemUseTask::SetChargedInvenIndex(ChargedItemUseTask *this, unsigned int uiIndex)
{
  ChargedItemUseTask *v2; // esi@1
  PROTO_CHARGED_ITEM_INFO *v3; // eax@1

  v2 = this;
  v3 = CChargedItem::Seek(&g_kChargedItem, uiIndex);
  if ( v3 )
    v2->m_kChargedItemWithDrawPacket.ItemOrderNo = v3->ItemOrderNo;
  else
    v2->m_eTaskState = 2;
}

//----- (00519840) --------------------------------------------------------
void __thiscall ChargedItemUseTask::DirectMessage(ChargedItemUseTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  ChargedItemUseTask *v4; // esi@1

  v4 = this;
  if ( iMsgTag == 27 && pvBody )
  {
    if ( *(_DWORD *)pvBody )
    {
      if ( *(_DWORD *)pvBody == 1 )
        this->m_pkMsgHooker = (IDirectMessenger *)2;
    }
    else
    {
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x22u, &this->m_kSerialTaskList.m_kAllocator, 4);
      v4->m_kSerialTaskList.m_pkTail = 0;
    }
  }
}

//----- (00519890) --------------------------------------------------------
void __thiscall InvWin::InvWin(InvWin *this)
{
  InvWin *v1; // esi@1

  v1 = this;
  ItemIcon::ItemIcon((ItemIcon *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&InvWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&InvWin::`vftable'{for `IDirectMessenger'};
  v1->m_spSubImagePlane.m_pObject = 0;
  v1->m_spSubImageTexProp.m_pObject = 0;
  v1->m_pkLotText = 0;
  v1->m_uiInvIndex = -1;
  v1->m_uiInvType = 9;
  ItemIcon::SetItem((ItemIcon *)&v1->vfptr, 0, 1);
  *(_WORD *)&v1->m_bActive = 0;
}
// 98FA00: using guessed type void (__thiscall *InvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98FA1C: using guessed type int (__thiscall *InvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00519930) --------------------------------------------------------
void __thiscall InvWin::~InvWin(InvWin *this)
{
  InvWin *v1; // esi@1
  NiTexturingProperty *v2; // edi@1
  NiScreenElements *v3; // edi@5

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&InvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&InvWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spSubImageTexProp.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_spSubImagePlane.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  ItemIcon::~ItemIcon((ItemIcon *)&v1->vfptr);
}
// 98FA00: using guessed type void (__thiscall *InvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98FA1C: using guessed type int (__thiscall *InvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005199E0) --------------------------------------------------------
char __thiscall InvTabButWin::EatDropInstance(InvTabButWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  PgCursor::ms_bKeepDrop = 1;
  ((void (*)(void))this->vfptr[132].__vecDelDtor)();
  return 1;
}
// B648B8: using guessed type bool PgCursor::ms_bKeepDrop;

//----- (00519A00) --------------------------------------------------------
void __thiscall CompensationItemIcon::CompensationItemIcon(CompensationItemIcon *this)
{
  CompensationItemIcon *v1; // esi@1
  int v2; // eax@1

  v1 = this;
  ItemIcon::ItemIcon((ItemIcon *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&CompensationItemIcon::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CompensationItemIcon::`vftable'{for `IDirectMessenger'};
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  v2 = (int)&v1->m_kDropContents;
  v1->m_kDrop.m_pkSender = 0;
  *(_DWORD *)(v2 + 64) = 0;
  *(_DWORD *)v2 = &DropContents::`vftable';
  *(_WORD *)(v2 + 60) = -1;
  v1->m_kDrop.m_pkContents = &v1->m_kDropContents;
  v1->m_dwChargedItemID = -1;
  v1->m_uiInvIndex = -1;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 98FC90: using guessed type void (__thiscall *CompensationItemIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98FCAC: using guessed type int (__thiscall *CompensationItemIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (00519A60) --------------------------------------------------------
void __thiscall CompensationItemIcon::~CompensationItemIcon(CompensationItemIcon *this)
{
  this->vfptr = (NiRefObjectVtbl *)&CompensationItemIcon::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CompensationItemIcon::`vftable'{for `IDirectMessenger'};
  this->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  this->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 98FC90: using guessed type void (__thiscall *CompensationItemIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98FCAC: using guessed type int (__thiscall *CompensationItemIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (00519A90) --------------------------------------------------------
void __thiscall CompensationItemIcon::SetDropContents(CompensationItemIcon *this, Item *pkItem, unsigned int uiInvIndex, bool b)
{
  CompensationItemIcon *v4; // esi@1

  v4 = this;
  this->m_kDropContents.m_eSenderType = 3;
  this->m_kDropContents.m_eType = 0;
  if ( pkItem )
  {
    this->m_kDropContents.m_apvParam[1] = 0;
    this->m_kDropContents.m_uiSenderIndex = uiInvIndex;
    this->m_kDropContents.m_apvParam[0] = pkItem;
    this->m_kDropContents.m_uiLot = ((int (*)(void))pkItem->vfptr[3].__vecDelDtor)();
  }
  v4->m_kDrop.m_pkSender = (PgWin *)v4;
  PgCursor::ms_pkDrop = &v4->m_kDrop;
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (00519AF0) --------------------------------------------------------
void __thiscall CompensationInvWin::OnInvLClick(CompensationInvWin *this, unsigned int uiInvIndex)
{
  CompensationInvWin *v2; // esi@1
  Item *v3; // edi@1
  CompensationItemIcon *v4; // esi@2

  v2 = this;
  v3 = ItemIcon::GetItem((ItemIcon *)&this->m_apkItemIcon[uiInvIndex]->vfptr);
  if ( v3 )
  {
    v4 = v2->m_apkItemIcon[uiInvIndex];
    v4->m_kDropContents.m_eSenderType = 3;
    v4->m_kDropContents.m_eType = 0;
    v4->m_kDropContents.m_apvParam[0] = v3;
    v4->m_kDropContents.m_apvParam[1] = 0;
    v4->m_kDropContents.m_uiSenderIndex = uiInvIndex;
    v4->m_kDropContents.m_uiLot = ((int (__thiscall *)(_DWORD))v3->vfptr[3].__vecDelDtor)(v3);
    v4->m_kDrop.m_pkSender = (PgWin *)v4;
    PgCursor::ms_pkDrop = &v4->m_kDrop;
    SoundMgr::PlayItemPutSound(v3->m_kStruct.itemid);
  }
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (00519B70) --------------------------------------------------------
void __thiscall InventoryWin::InventoryWin(InventoryWin *this)
{
  InventoryWin *v1; // esi@1
  int v2; // edi@1
  MsgBox *v3; // edi@1
  NiNode *v4; // edi@6
  NiNode *v5; // edi@11

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&InventoryWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&InventoryWin::`vftable'{for `IDirectMessenger'};
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  v1->m_kDrop.m_pkContents = 0;
  v1->m_kDrop.m_pkSender = 0;
  v2 = (int)&v1->m_kDropContents;
  *(_DWORD *)v2 = &DropContents::`vftable';
  *(_WORD *)(v2 + 60) = -1;
  *(_DWORD *)(v2 + 64) = 0;
  v1->m_spMsgBox.m_pObject = 0;
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kTimerInterval);
  CNSTimer_MarkCheck::CNSTimer_MarkCheck(&v1->m_kMarkCheck);
  NsEffect::NsEffect(&v1->m_kEffect);
  v1->m_spEffect.m_pObject = 0;
  v1->m_pRunArrangeButEff.m_pObject = 0;
  v1->m_pRunArrangeInvenEff.m_pObject = 0;
  v1->m_kDrop.m_pkContents = &v1->m_kDropContents;
  memset(v1->m_apkInvWin, 0, sizeof(v1->m_apkInvWin));
  v1->m_apkEquipWin[0] = 0;
  v1->m_apkEquipWin[1] = 0;
  v1->m_apkEquipWin[2] = 0;
  v1->m_apkEquipWin[3] = 0;
  v1->m_apkEquipWin[4] = 0;
  v1->m_apkEquipWin[5] = 0;
  v1->m_apkEquipWin[6] = 0;
  v1->m_apkEquipWin[7] = 0;
  v1->m_apkEquipWin[8] = 0;
  v1->m_apkEquipWin[9] = 0;
  v1->m_apkEquipWin[10] = 0;
  v1->m_apkEquipWin[11] = 0;
  v1->m_apkEquipWin[12] = 0;
  v1->m_apkEquipWin[13] = 0;
  v1->m_apkEquipWin[14] = 0;
  v1->m_apkEquipWin[15] = 0;
  v1->m_apkEquipWin[16] = 0;
  v1->m_apkEquipWin[17] = 0;
  v1->m_apkEquipWin[18] = 0;
  v1->m_apkEquipWin[19] = 0;
  v1->m_apkEquipWin[20] = 0;
  v1->m_apkEquipWin[21] = 0;
  v1->m_apkEquipWin[22] = 0;
  v1->m_apkEquipWin[23] = 0;
  v1->m_apkEquipWin[24] = 0;
  v1->m_apkEquipWin[25] = 0;
  v1->m_apkEquipWin[26] = 0;
  v1->m_apkEquipWin[27] = 0;
  v1->m_apkEquipWin[28] = 0;
  v1->m_apkEquipWin[29] = 0;
  v1->m_apkActiveTabWin[0] = 0;
  v1->m_apkActiveTabWin[1] = 0;
  v1->m_apkActiveTabWin[2] = 0;
  v1->m_apkActiveTabWin[3] = 0;
  v1->m_apkActiveTabWin[4] = 0;
  v1->m_apkActiveTabWin[5] = 0;
  v1->m_apkActiveTabWin[6] = 0;
  v1->m_apkActiveTabWin[7] = 0;
  v1->m_iActivePage = 0;
  v1->m_pTargetItem = 0;
  v1->m_bDivide = 0;
  v1->m_pkChargedItemInvenWin = 0;
  v1->m_pkCompensationInvenWin = 0;
  v1->m_pkInchenBtn = 0;
  v3 = v1->m_spMsgBox.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spMsgBox.m_pObject = 0;
  }
  v1->m_iEnchantAddItemInvIdx = -1;
  v1->m_pkAutoPickBtn = 0;
  v1->m_pkAutoPickDisable = 0;
  v1->m_pkAutoPickON = 0;
  v1->m_pkAutoPickOFF = 0;
  *(_WORD *)&v1->m_bAutoPickMinimon = 0;
  v1->m_uiReceiverInvPos = -1;
  v1->m_uiSenderInvPos = -1;
  v1->m_pkInvMagicBoxBut = 0;
  v1->m_pkDisMagicBoxBut = 0;
  v1->m_pkAutoUseWinOpenBtn = 0;
  v1->m_pkAutoUseDisable = 0;
  v1->m_apkArrangeButEff = 0;
  v1->m_apkArrangeInvenEff = 0;
  v1->m_pkArrangeBut = 0;
  v4 = v1->m_pRunArrangeButEff.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_pRunArrangeButEff.m_pObject = 0;
  }
  v5 = v1->m_pRunArrangeInvenEff.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_pRunArrangeInvenEff.m_pObject = 0;
  }
  v1->m_pkArrangeDisable = 0;
  v1->m_pkNewRewardItem = 0;
  v1->m_pkNewChargedItem = 0;
  *(_DWORD *)&v1->m_bRewardStart = 0;
  v1->m_bShowEquip = 1;
  v1->m_bAutoPickCheck = 0;
  v1->m_pEquipTheme = 0;
  v1->m_nOpenPage = 0;
  v1->m_pkInvPanel = 0;
  v1->m_pkMoneyPanel = 0;
  v1->m_pkFunctionPanel = 0;
  v1->m_pkGoldBtn = 0;
  v1->m_pkSilverBtn = 0;
  v1->m_pkCopperBtn = 0;
  v1->m_pkGemBtn = 0;
  v1->m_pkGoldInput = 0;
  v1->m_pkSilverInput = 0;
  v1->m_pkCopperInput = 0;
  v1->m_pkGemInput = 0;
  v1->m_pkInvenTheme = 0;
  v1->m_pkChrEquipOnOffBut = 0;
  v1->m_pkChargedItemOffTabWin = 0;
  v1->m_pkCompensationItemOffTabWin = 0;
  memset(v1->m_pkInvSlot, 0, sizeof(v1->m_pkInvSlot));
  v1->m_pkNumSpr[0] = 0;
  v1->m_pkNumSpr[1] = 0;
  v1->m_pkNumSpr[2] = 0;
  v1->m_pkNumSpr[3] = 0;
  v1->m_pkNumSpr[4] = 0;
  v1->m_pkNumSpr[5] = 0;
  v1->m_pkNumSpr[6] = 0;
  v1->m_pkNumSpr[7] = 0;
  v1->currPcItemId = -1;
  v1->iEffectKey = -1;
  v1->m_pkRandomOptCountRecoverWin = 0;
  v1->m_bBlinkActive = 0;
  v1->m_iBlinkSlotNum = 9999;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 98FF18: using guessed type void (__thiscall *InventoryWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98FF34: using guessed type int (__thiscall *InventoryWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00519F30) --------------------------------------------------------
void __thiscall InventoryWin::~InventoryWin(InventoryWin *this)
{
  InventoryWin *v1; // esi@1
  RandomOptCountRecoverWin *v2; // eax@1
  NiNode *v3; // edi@3
  NiNode *v4; // edi@7
  NiNode *v5; // edi@11
  MsgBox *v6; // edi@15

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&InventoryWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&InventoryWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_pkRandomOptCountRecoverWin;
  this->m_pTargetItem = 0;
  if ( v2 )
  {
    PgWin::PostMsg((PgWin *)&v2->vfptr, 2u, 0, 0);
    v1->m_pkRandomOptCountRecoverWin = 0;
  }
  v3 = v1->m_pRunArrangeInvenEff.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v4 = v1->m_pRunArrangeButEff.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v5 = v1->m_spEffect.m_pObject;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  NsEffect::~NsEffect(&v1->m_kEffect);
  ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v1->m_kMarkCheck);
  v6 = v1->m_spMsgBox.m_pObject;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  v1->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 98FF18: using guessed type void (__thiscall *InventoryWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98FF34: using guessed type int (__thiscall *InventoryWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0051A090) --------------------------------------------------------
void __thiscall InventoryWin::OnInvLClickPrivateStoreMode(InventoryWin *this, unsigned int uiInvIndex)
{
  InventoryWin *v2; // esi@1
  Item *v3; // eax@1

  v2 = this;
  v3 = ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[uiInvIndex]->vfptr);
  v2->m_kDropContents.m_eSenderType = 0;
  v2->m_kDropContents.m_eType = 0;
  if ( v3 )
  {
    v2->m_kDropContents.m_apvParam[0] = v3;
    v2->m_kDropContents.m_apvParam[1] = 0;
    v2->m_kDropContents.m_uiSenderIndex = uiInvIndex;
    v2->m_kDropContents.m_uiLot = ((int (__thiscall *)(_DWORD))v3->vfptr[3].__vecDelDtor)(v3);
  }
  v2->m_kDrop.m_pkSender = (PgWin *)v2;
  PgCursor::ms_pkDrop = &v2->m_kDrop;
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (0051A100) --------------------------------------------------------
void __thiscall InventoryWin::OnInvRClickShopMode(InventoryWin *this, unsigned int uiInvIndex)
{
  InventoryWin *v2; // esi@1

  v2 = this;
  if ( ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[uiInvIndex]->vfptr) )
    GameFrameWork::NcItemSellReq((GameFrameWork *)v2->m_pkFrameWork, uiInvIndex, 1u);
}

//----- (0051A130) --------------------------------------------------------
void __thiscall InventoryWin::OnInvLClickBankMode(InventoryWin *this, unsigned int uiInvIndex)
{
  InventoryWin *v2; // esi@1
  Item *v3; // edi@1

  v2 = this;
  v3 = ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[uiInvIndex]->vfptr);
  v2->m_kDropContents.m_eSenderType = 0;
  v2->m_kDropContents.m_eType = 0;
  if ( v3 )
  {
    v2->m_kDropContents.m_apvParam[0] = v3;
    v2->m_kDropContents.m_apvParam[1] = 0;
    v2->m_kDropContents.m_uiSenderIndex = uiInvIndex;
    v2->m_kDropContents.m_uiLot = ((int (__thiscall *)(_DWORD))v3->vfptr[3].__vecDelDtor)(v3);
  }
  v2->m_kDrop.m_pkSender = (PgWin *)v2;
  PgCursor::ms_pkDrop = &v2->m_kDrop;
  SoundMgr::PlayItemPutSound(v3->m_kStruct.itemid);
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (0051A1B0) --------------------------------------------------------
void __thiscall InventoryWin::OnInvLClickGuildAcademyStorageMode(InventoryWin *this, unsigned int uiInvIndex)
{
  InventoryWin *v2; // esi@1
  Item *v3; // edi@1

  v2 = this;
  v3 = ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[uiInvIndex]->vfptr);
  v2->m_kDropContents.m_eSenderType = 0;
  v2->m_kDropContents.m_eType = 0;
  if ( v3 )
  {
    v2->m_kDropContents.m_apvParam[0] = v3;
    v2->m_kDropContents.m_apvParam[1] = 0;
    v2->m_kDropContents.m_uiSenderIndex = uiInvIndex;
    v2->m_kDropContents.m_uiLot = ((int (__thiscall *)(_DWORD))v3->vfptr[3].__vecDelDtor)(v3);
  }
  v2->m_kDrop.m_pkSender = (PgWin *)v2;
  PgCursor::ms_pkDrop = &v2->m_kDrop;
  SoundMgr::PlayItemPutSound(v3->m_kStruct.itemid);
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (0051A230) --------------------------------------------------------
void __thiscall InventoryWin::OnInvLClickGttStoreMode(InventoryWin *this, unsigned int uiInvIndex)
{
  InventoryWin *v2; // esi@1
  Item *v3; // edi@1

  v2 = this;
  v3 = ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[uiInvIndex]->vfptr);
  v2->m_kDropContents.m_eSenderType = 0;
  v2->m_kDropContents.m_eType = 0;
  if ( v3 )
  {
    v2->m_kDropContents.m_apvParam[0] = v3;
    v2->m_kDropContents.m_apvParam[1] = 0;
    v2->m_kDropContents.m_uiSenderIndex = uiInvIndex;
    v2->m_kDropContents.m_uiLot = ((int (__thiscall *)(_DWORD))v3->vfptr[3].__vecDelDtor)(v3);
  }
  v2->m_kDrop.m_pkSender = (PgWin *)v2;
  PgCursor::ms_pkDrop = &v2->m_kDrop;
  SoundMgr::PlayItemPutSound(v3->m_kStruct.itemid);
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (0051A2B0) --------------------------------------------------------
void __thiscall InventoryWin::OnClickRepairItem(InventoryWin *this, ITEM_INVEN kFrom)
{
  InventoryWin *v2; // edi@1
  ItemRepairWin *v3; // esi@1
  IDirectMessenger *v4; // ecx@2
  IDirectMessenger *v5; // ecx@4

  v2 = this;
  v3 = (ItemRepairWin *)this->m_pkFrameWork[33].m_kMsgQ.m_uiAlloced;
  if ( !(unsigned __int8)((int (__thiscall *)(_DWORD))v3->vfptr[65].__vecDelDtor)(this->m_pkFrameWork[33].m_kMsgQ.m_uiAlloced) )
  {
    ItemRepairWin::SetRepairItemSlot(v3, kFrom);
    v4 = v2->m_pkMsgHooker;
    if ( v4 )
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v4->vfptr->SendDirectMessage)(72, &kFrom, &v2->vfptr);
    v5 = v2->m_pkMsgHooker;
    if ( v5 )
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v5->vfptr->DirectDispatchToParent)(72, &kFrom, &v2->vfptr);
    v2->vfptr->DirectDispatchToParent((IDirectMessenger *)&v2->vfptr, 72, &kFrom, (IDirectMessenger *)&v2->vfptr);
  }
}

//----- (0051A330) --------------------------------------------------------
void __thiscall InventoryWin::OnResetRecoverCountState(InventoryWin *this)
{
  RandomOptCountRecoverWin *v1; // ecx@4

  if ( unk_B25354 )
  {
    if ( InventoryWin::ms_uiMode == 9 )
      InventoryWin::ms_uiMode = 0;
    unk_B25354 = 0;
    this->m_iRecoveryCountItemInvIdx = -1;
    v1 = this->m_pkRandomOptCountRecoverWin;
    if ( v1 )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
  }
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (0051A370) --------------------------------------------------------
signed int __thiscall InventoryWin::FindItem(InventoryWin *this, unsigned __int16 ItemID)
{
  signed int v2; // esi@1
  ItemIcon **v3; // edi@1
  Item *v4; // eax@2
  unsigned __int16 *v5; // eax@3

  v2 = 0;
  v3 = (ItemIcon **)this->m_apkInvWin;
  while ( 1 )
  {
    v4 = ItemIcon::GetItem(*v3);
    if ( v4 )
    {
      v5 = &v4->m_pkInfo->ID;
      if ( v5 )
      {
        if ( *v5 == ItemID )
          break;
      }
    }
    ++v2;
    ++v3;
    if ( v2 >= 192 )
      return 193;
  }
  return v2;
}

//----- (0051A3C0) --------------------------------------------------------
int __thiscall InventoryWin::GetFuncItemCount(InventoryWin *this, ItemFuncEnum e)
{
  int v2; // ebx@1
  ItemIcon **v3; // esi@1
  signed int v4; // edi@1
  Item *v5; // eax@2
  ItemInfo *v6; // ecx@3

  v2 = 0;
  v3 = (ItemIcon **)this->m_apkInvWin;
  v4 = 192;
  do
  {
    v5 = ItemIcon::GetItem(*v3);
    if ( v5 )
    {
      v6 = v5->m_pkInfo;
      if ( v6 )
      {
        if ( v6->ItemFunc == e )
          v2 += ((int (__thiscall *)(Item *))v5->vfptr[3].__vecDelDtor)(v5);
      }
    }
    ++v3;
    --v4;
  }
  while ( v4 );
  return v2;
}

//----- (0051A410) --------------------------------------------------------
void __thiscall InventoryWin::SearchQuestStartItem(InventoryWin *this, unsigned __int16 qID, bool bGiveup)
{
  InventoryWin *v3; // ebx@1
  CClientQuest *v4; // eax@1
  CQuestData *v5; // edi@2
  signed int v6; // esi@2
  QUEST_DATA *v7; // eax@3
  signed int v8; // eax@7
  ItemIcon *v9; // ecx@8

  v3 = this;
  v4 = QuestDataMgr::GetQuest();
  if ( v4 )
  {
    v5 = v4->m_pQuestData;
    v6 = 0;
    if ( CQuestData::GetNumOfQuestData(v4->m_pQuestData) > 0u )
    {
      do
      {
        v7 = CQuestData::GetQuestDataByIndex(v5, v6);
        if ( v7 )
        {
          if ( v7->ID == qID )
          {
            if ( v7->Start.bItem )
            {
              if ( !v7->Start.bNPC )
              {
                v8 = InventoryWin::FindItem(v3, v7->Start.ItemID);
                if ( v8 < 193 )
                {
                  v9 = (ItemIcon *)&v3->m_apkInvWin[v8]->vfptr;
                  if ( bGiveup )
                    ItemIcon::GiveUpQuest(v9);
                  else
                    ItemIcon::DoingQuest(v9);
                }
              }
            }
          }
        }
        ++v6;
      }
      while ( v6 < CQuestData::GetNumOfQuestData(v5) );
    }
  }
}

//----- (0051A4A0) --------------------------------------------------------
void __thiscall InventoryWin::StartSuccessEffect(InventoryWin *this)
{
  InventoryWin *v1; // esi@1

  v1 = this;
  if ( this->m_uiReceiverInvPos != -1 )
  {
    NsEffect::Start(&this->m_kEffect, Timer::ms_fCurTime);
    v1->m_kMarkCheck.m_fMarkTime = v1->m_kEffect.m_fMaxTime;
    CNSTimer_MarkCheck::ReSet(&v1->m_kMarkCheck, Timer::ms_fCurTime, OVER);
    ((void (__stdcall *)(_DWORD, _DWORD))v1->m_apkInvWin[v1->m_uiReceiverInvPos]->vfptr[29].__vecDelDtor)(
      v1->m_spEffect.m_pObject,
      1);
    NiAVObject::UpdateProperties((NiAVObject *)&v1->m_apkInvWin[v1->m_uiReceiverInvPos]->vfptr);
    NiAVObject::UpdateEffects((NiAVObject *)&v1->m_apkInvWin[v1->m_uiReceiverInvPos]->vfptr);
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0051A530) --------------------------------------------------------
void __thiscall InventoryWin::OnCloseMagicBox(InventoryWin *this)
{
  GameFrameWork::CloseStorageMenu((GameFrameWork *)this->m_pkFrameWork);
}

//----- (0051A540) --------------------------------------------------------
signed int __thiscall InventoryWin::FindEquipItem(InventoryWin *this, unsigned __int16 kItemID)
{
  signed int v2; // esi@1
  ItemIcon **v3; // edi@1
  Item *v4; // eax@3
  unsigned __int16 *v5; // eax@4

  v2 = 0;
  v3 = (ItemIcon **)this->m_apkEquipWin;
  while ( 1 )
  {
    if ( *v3 )
    {
      v4 = ItemIcon::GetItem(*v3);
      if ( v4 )
      {
        v5 = &v4->m_pkInfo->ID;
        if ( v5 )
        {
          if ( *v5 == kItemID )
            break;
        }
      }
    }
    ++v2;
    ++v3;
    if ( v2 >= 30 )
      return 31;
  }
  return v2;
}

//----- (0051A590) --------------------------------------------------------
void __thiscall InventoryWin::NcNewRewardAndChargedItem(InventoryWin *this)
{
  InventoryWin *v1; // edi@1
  CompensationInvWin *v2; // esi@1
  NiRefObjectVtbl *v3; // ebx@1
  char *v4; // eax@1
  __int16 pProto; // [sp+Ch] [bp-4h]@1

  v1 = this;
  v2 = this->m_pkCompensationInvenWin;
  pProto = v2->m_uiCurrPage;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x2Cu, &pProto, 2);
  v3 = v2->m_pkPageNumText->vfptr;
  v4 = fs("%d", v2->m_uiCurrPage + 1);
  v3[118].__vecDelDtor((NiRefObject *)v2->m_pkPageNumText, (unsigned int)v4);
  pProto = v1->m_pkChargedItemInvenWin->m_uiCurrPage;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x20u, &pProto, 2);
}

//----- (0051A620) --------------------------------------------------------
char __thiscall ChargedItemUseTask::OnProcessNetMsg(ChargedItemUseTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  ChargedItemUseTask *v5; // edi@1
  char result; // al@3
  __int16 v7; // ax@4
  PROTO_CHARGED_ITEM_INFO *v8; // eax@5
  char *v9; // eax@12
  int v10; // ST10_4@13
  NiUnsharedGeometryGroup *v11; // eax@13
  char *v12; // eax@13

  v5 = this;
  if ( iDepart == 12 && iCommand == 35 )
  {
    v7 = *((_WORD *)pvData + 2);
    if ( v7 == 4161 )
    {
      v8 = CChargedItem::Find(&g_kChargedItem, *(_DWORD *)pvData);
      if ( v8 )
        CChargedItem::Del(&g_kChargedItem, v8);
      if ( v5->m_pkMsgHooker )
      {
        ((void (__stdcall *)(signed int, _DWORD, IDirectMessengerVtbl **))v5->m_pkMsgHooker->vfptr->SendDirectMessage)(
          48,
          0,
          &v5->vfptr);
        if ( v5->m_pkMsgHooker )
          ((void (__stdcall *)(signed int, _DWORD, IDirectMessengerVtbl **))v5->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            48,
            0,
            &v5->vfptr);
      }
      v5->vfptr->DirectDispatchToParent((IDirectMessenger *)&v5->vfptr, 48, 0, (IDirectMessenger *)&v5->vfptr);
      v5->m_eTaskState = 2;
      result = 1;
    }
    else if ( v7 == 4165 )
    {
      v9 = (char *)TextData::Get(0x91A8CDCE);
      MsgBox::Modeless(MSGBOX_OK, v9);
      v5->m_eTaskState = 2;
      result = 1;
    }
    else
    {
      v10 = *((_WORD *)pvData + 2);
      v11 = TextData::Get(0xE90C344B);
      v12 = fs("%s : %d", v11, v10);
      MsgBox::Modeless(MSGBOX_OK, v12);
      v5->m_eTaskState = 2;
      result = 1;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0051A710) --------------------------------------------------------
void __thiscall InvWin::UpdateMeWin(InvWin *this, float fCurTime)
{
  InvWin *v2; // esi@1
  unsigned int v3; // eax@1
  unsigned int v4; // eax@2
  Item *v5; // edi@3
  unsigned int v6; // eax@6
  void *(__thiscall *v7)(NiRefObject *, unsigned int); // edx@11

  v2 = this;
  v3 = this->m_uiInvType;
  if ( v3 == 9 )
  {
    v4 = this->m_uiInvIndex;
    if ( v4 < 0xC0 )
      v5 = g_kInventory.m_aspInv[v4].m_pObject;
    else
      v5 = 0;
  }
  else
  {
    if ( v3 != 8 )
      goto LABEL_11;
    v6 = this->m_uiInvIndex;
    if ( v6 < 0x1E )
      v5 = g_kInventory.m_aspEquip[v6].m_pObject;
    else
      v5 = 0;
  }
  if ( v5 != ItemIcon::GetItem((ItemIcon *)&this->vfptr) )
    ItemIcon::SetItem((ItemIcon *)&v2->vfptr, v5, 1);
LABEL_11:
  v7 = v2->vfptr[64].__vecDelDtor;
  if ( v2->m_bActive )
  {
    v7((NiRefObject *)&v2->vfptr, 1u);
    v2->m_bDroppable = 1;
    if ( !ItemIcon::GetItem((ItemIcon *)&v2->vfptr) )
      v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 0);
    IconWin::UpdateMeWin((IconWin *)&v2->vfptr, fCurTime);
  }
  else
  {
    v7((NiRefObject *)&v2->vfptr, 0);
    v2->m_bDroppable = 0;
  }
}

//----- (0051A7D0) --------------------------------------------------------
void __thiscall InvWin::DoAction(InvWin *this)
{
  InvWin *v1; // esi@1
  PgWin *v2; // eax@2

  v1 = this;
  if ( !this->m_bLock )
  {
    v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
    if ( v2 )
      PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiInvIndex);
  }
}

//----- (0051A800) --------------------------------------------------------
void __thiscall InvWin::DoRAction(InvWin *this)
{
  InvWin *v1; // esi@1
  PgWin *v2; // eax@2

  v1 = this;
  if ( !this->m_bLock )
  {
    v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
    if ( v2 )
      PgWin::PostCommandMsg(v2, v1->m_uiRCmdMsg, v1->m_uiInvIndex);
  }
}

//----- (0051A830) --------------------------------------------------------
void __thiscall InvWin::OnFirstHitWin(InvWin *this)
{
  InvWin *v1; // esi@1
  Item *v2; // ebx@1
  ItemInfoWin *v3; // edi@4
  char *v4; // eax@11

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->vfptr[81].__vecDelDtor)(0.0);
  v2 = ItemIcon::GetItem((ItemIcon *)&v1->vfptr);
  if ( v2 )
  {
    if ( !v1->m_bLock )
    {
      if ( PgWin::GetParentWin((PgWin *)&v1->vfptr) )
      {
        v3 = (ItemInfoWin *)v1->m_pkToolTipWin;
        if ( v3 )
        {
          if ( InventoryWin::ms_uiMode
            && InventoryWin::ms_uiMode != 7
            && InventoryWin::ms_uiMode != 9
            && InventoryWin::ms_uiMode != 2 )
          {
            ItemInfoWin::SetSellInfo(v3, v2, 1);
            PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
          }
          else if ( g_pkKeyboard->m_aucKeystate[7] & 1 )
          {
            v4 = (char *)TextData3::Get(0x42331237u);
            ItemInfoWin::SetItemToolTip(v3, v4);
            PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
          }
          else
          {
            if ( !(unsigned __int8)((int (__thiscall *)(_DWORD))v3->vfptr[65].__vecDelDtor)(v1->m_pkToolTipWin) )
              ItemInfoWin::SetItemInfo(v3, v2);
            PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
          }
        }
      }
    }
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (0051A900) --------------------------------------------------------
void __thiscall InvWin::OnFirstHitWinEx(InvWin *this)
{
  InvWin *v1; // esi@1
  Item *v2; // edi@1
  ItemInfoWin *v3; // ecx@4

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->vfptr[81].__vecDelDtor)(0.0);
  v2 = ItemIcon::GetItem((ItemIcon *)&v1->vfptr);
  if ( v2 )
  {
    if ( !v1->m_bLock )
    {
      if ( PgWin::GetParentWin((PgWin *)&v1->vfptr) )
      {
        v3 = (ItemInfoWin *)v1->m_pkToolTipWin;
        if ( v3 )
        {
          if ( InventoryWin::ms_uiMode && InventoryWin::ms_uiMode != 2 )
          {
            ItemInfoWin::SetSellInfo(v3, v2, 1);
            PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
          }
          else
          {
            ItemInfoWin::SetItemInfo(v3, v2);
            PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
          }
        }
      }
    }
  }
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (0051A970) --------------------------------------------------------
void __thiscall ChargedItemIcon::OnFirstHitWin(ChargedItemIcon *this)
{
  ChargedItemIcon *v1; // ebx@1
  unsigned int v2; // eax@1
  ItemShopView *v3; // esi@2
  char *v4; // edi@2
  HDC__ *v5; // ebx@3
  signed int v6; // esi@3
  int v7; // eax@4
  PgWin *v8; // ecx@5
  ChargedItemIcon *v9; // [sp+4h] [bp-108h]@1
  char acStr[256]; // [sp+8h] [bp-104h]@4

  v1 = this;
  v2 = this->m_dwChargedItemID;
  v9 = this;
  if ( v2 == -1 )
  {
    this->m_pkToolTipWin = 0;
    ToolTipWin::ClearTipText((ToolTipWin *)g_pkToolTipWin);
  }
  else
  {
    v3 = ItemShopViewTable::GetByShopID(v2);
    v1->m_pkToolTipWin = g_pkToolTipWin;
    ToolTipWin::ClearTipText((ToolTipWin *)g_pkToolTipWin);
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))g_pkToolTipWin->vfptr[137].__vecDelDtor)(
      0,
      v3->Name,
      255,
      255,
      255,
      0);
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))g_pkToolTipWin->vfptr[137].__vecDelDtor)(
      1,
      " ",
      255,
      255,
      255,
      0);
    v4 = v3->Descript;
    if ( v3->Descript[0] != 45 )
    {
      v5 = Font::Get(0)->m_kFontRenderStuff.hDC;
      v6 = 2;
      do
      {
        v7 = PgUtil::StringPixelCopy(acStr, v4, v5, 200);
        if ( !v7 )
          break;
        v8 = g_pkToolTipWin;
        acStr[v7] = 0;
        v4 += v7;
        ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v8->vfptr[137].__vecDelDtor)(
          v6++,
          acStr,
          255,
          255,
          255,
          0);
      }
      while ( v6 < 20 );
      v1 = v9;
    }
    ((void (*)(void))v1->m_pkToolTipWin->vfptr[109].__vecDelDtor)();
  }
  PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
}

//----- (0051AAD0) --------------------------------------------------------
void __thiscall CompensationItemIcon::OnFirstHitWin(CompensationItemIcon *this)
{
  CompensationItemIcon *v1; // edi@1
  unsigned int v2; // eax@1
  Item *v3; // esi@2
  ItemInfoWin *v4; // ecx@4

  v1 = this;
  v2 = this->m_uiInvIndex;
  if ( v2 >= 0xC0 || (v3 = g_kInventory.m_aspRewardInv[v2].m_pObject) == 0 )
  {
LABEL_9:
    PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
    return;
  }
  if ( PgWin::GetParentWin((PgWin *)&this->vfptr) )
  {
    v4 = (ItemInfoWin *)v1->m_pkToolTipWin;
    if ( v4 )
    {
      if ( InventoryWin::ms_uiMode && InventoryWin::ms_uiMode != 2 )
      {
        ItemInfoWin::SetSellInfo(v4, v3, 1);
        PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
        return;
      }
      ItemInfoWin::SetItemInfo(v4, v3);
      goto LABEL_9;
    }
  }
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (0051AB30) --------------------------------------------------------
void __thiscall CompensationItemIcon::DoAction(CompensationItemIcon *this)
{
  CompensationItemIcon *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiInvIndex);
}

//----- (0051AB60) --------------------------------------------------------
void __thiscall CompensationItemIcon::DoRAction(CompensationItemIcon *this)
{
  CompensationItemIcon *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiRCmdMsg, v1->m_uiInvIndex);
}

//----- (0051AB90) --------------------------------------------------------
void __thiscall CompensationInvWin::Refresh(CompensationInvWin *this)
{
  char *v1; // esi@1
  signed int v2; // edi@1
  ItemIcon *v3; // ecx@2
  unsigned int v4; // eax@2

  v1 = (char *)this->m_apkItemIcon;
  v2 = 24;
  do
  {
    v3 = *(ItemIcon **)v1;
    v4 = *(_DWORD *)(*(_DWORD *)v1 + 452);
    if ( v4 < 0xC0 && g_kInventory.m_aspRewardInv[v4].m_pObject )
    {
      if ( v4 < 0xC0 )
        ItemIcon::SetItem(v3, g_kInventory.m_aspRewardInv[v4].m_pObject, 1);
      else
        ItemIcon::SetItem(v3, 0, 1);
    }
    else
    {
      ItemIcon::SetItem(v3, 0, 1);
    }
    v1 += 4;
    --v2;
  }
  while ( v2 );
}

//----- (0051ABF0) --------------------------------------------------------
void __thiscall CompensationInvWin::OnInvRClick(CompensationInvWin *this, unsigned int uiInvIndex)
{
  __int16 v2; // bx@2
  Item *v3; // esi@2
  GameFrameWork *v4; // edi@3
  unsigned int v5; // eax@3
  NiUnsharedGeometryGroup *v6; // eax@4
  CompensationInvWin *kFrom; // [sp+0h] [bp-4h]@1

  kFrom = this;
  if ( !PgCursor::ms_pkDrop )
  {
    v2 = uiInvIndex;
    v3 = ItemIcon::GetItem((ItemIcon *)&this->m_apkItemIcon[uiInvIndex]->vfptr);
    if ( v3 )
    {
      v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      v5 = Inventory::GetInvIdxLotIsNotMax(&g_kInventory, v3);
      if ( v5 == -1 )
      {
        v6 = TextData::Get(0x91A8CDCE);
        GameFrameWork::AddSysMsg(v4, (const char *)v6);
      }
      else
      {
        LOWORD(kFrom) = v2 & 0x3FF | 0x800;
        LOWORD(uiInvIndex) = v5 & 0x3FF | 0x2400;
        GameFrameWork::NcItemRelocReq(v4, (ITEM_INVEN *)&kFrom, (ITEM_INVEN *)&uiInvIndex);
        SoundMgr::PlayItemPutSound(v3->m_kStruct.itemid);
      }
    }
  }
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (0051ACA0) --------------------------------------------------------
void __thiscall CompensationInvWin::DirectMessage(CompensationInvWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  if ( iMsgTag == 49 )
    CompensationInvWin::Refresh((CompensationInvWin *)((char *)this - 232));
}

//----- (0051ACC0) --------------------------------------------------------
void __thiscall InventoryWin::OnInvShiftLClickPrivateStoreMode(InventoryWin *this, unsigned int uiInvIndex)
{
  InventoryWin *v2; // esi@1
  InvWin *v3; // ecx@1
  Item *v4; // edi@2
  GameFrameWork *v5; // ebx@4
  char *v6; // ST0C_4@4
  int v7; // eax@4

  v2 = this;
  v3 = this->m_apkInvWin[uiInvIndex];
  if ( !v3->m_bLock )
  {
    v4 = ItemIcon::GetItem((ItemIcon *)&v3->vfptr);
    if ( v4 )
    {
      v2->m_bDivide = 0;
      if ( (unsigned int)((int (__thiscall *)(_DWORD))v4->vfptr[3].__vecDelDtor)(v4) > 1 )
      {
        v2->m_bDivide = 1;
        InventoryWin::ms_kFrom.Inven = uiInvIndex & 0x3FF | 0x2400;
        v5 = (GameFrameWork *)v2->m_pkFrameWork;
        v6 = (char *)TextData::Get(0xFBF1412E);
        v7 = ((int (__thiscall *)(_DWORD))v4->vfptr[3].__vecDelDtor)(v4);
        GameFrameWork::OnOpenDivideWin(v5, (PgWin *)&v2->vfptr, 0x10u, v7 - 1, v6, 0);
      }
    }
  }
}

//----- (0051AD50) --------------------------------------------------------
void __thiscall InventoryWin::OnInvShiftRClickPrivateStoreMode(InventoryWin *this, unsigned int uiInvIndex)
{
  InventoryWin *v2; // esi@1
  Item *v3; // edi@2
  GameFrameWork *v4; // ebx@4
  char *v5; // ST0C_4@4
  unsigned int v6; // eax@4

  v2 = this;
  if ( PrivateStoreWin::ms_uiPrivateStoreMode == 2 )
  {
    v3 = ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[uiInvIndex]->vfptr);
    v2->m_uiCurInvIndex = uiInvIndex;
    if ( (unsigned int)((int (__thiscall *)(_DWORD))v3->vfptr[3].__vecDelDtor)(v3) <= 1
      || (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[15].Deaffect)() )
    {
      GameFrameWork::NcBoothItemTradeReq(
        (GameFrameWork *)v2->m_pkFrameWork,
        PrivateStoreWin::ms_BoothHandle,
        v2->m_uiCurInvIndex,
        1u);
    }
    else
    {
      v4 = (GameFrameWork *)v2->m_pkFrameWork;
      v5 = (char *)TextData::Get(0x37494293u);
      v6 = ((int (__thiscall *)(_DWORD))v3->vfptr[3].__vecDelDtor)(v3);
      GameFrameWork::OnOpenDivideWin(v4, (PgWin *)&v2->vfptr, 0x13u, v6, v5, 1u);
    }
  }
}
// A71180: using guessed type unsigned int PrivateStoreWin::ms_uiPrivateStoreMode;
// A8D480: using guessed type unsigned __int16 PrivateStoreWin::ms_BoothHandle;

//----- (0051AE00) --------------------------------------------------------
void __thiscall InventoryWin::OnInvLClickNormalMode(InventoryWin *this, unsigned int uiInvIndex)
{
  InventoryWin *v2; // esi@1
  InvWin *v3; // ecx@1
  Item *v4; // eax@2
  Item *v5; // edi@2
  ActionViewInfo *v6; // eax@4

  v2 = this;
  v3 = this->m_apkInvWin[uiInvIndex];
  if ( !v3->m_bLock )
  {
    v4 = ItemIcon::GetItem((ItemIcon *)&v3->vfptr);
    v5 = v4;
    if ( v4 )
    {
      if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v4->vfptr[1].__vecDelDtor)(v4) == 27 )
      {
        v6 = ActionViewTable::GetByInxName(v5->m_pkInfo->InxName);
        if ( v6 )
          v2->m_kDropContents.nTableIndexNum = v6->nIndex;
      }
      v2->m_kDropContents.m_eSenderType = 0;
      v2->m_kDropContents.m_eType = 0;
      v2->m_kDropContents.m_uiSenderIndex = uiInvIndex;
      v2->m_kDropContents.m_apvParam[0] = v5;
      v2->m_kDropContents.m_apvParam[1] = 0;
      v2->m_kDropContents.m_uiLot = ((int (__thiscall *)(_DWORD))v5->vfptr[3].__vecDelDtor)(v5);
      v2->m_kDrop.m_pkSender = (PgWin *)v2;
      PgCursor::ms_pkDrop = &v2->m_kDrop;
      SoundMgr::PlayItemPutSound(v5->m_kStruct.itemid);
    }
  }
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (0051AEC0) --------------------------------------------------------
void __thiscall InventoryWin::OnInvShiftLClickNormalMode(InventoryWin *this, unsigned int uiInvIndex)
{
  InventoryWin *v2; // esi@1
  InvWin *v3; // ecx@1
  Item *v4; // edi@2
  GameFrameWork *v5; // ebx@4
  char *v6; // ST0C_4@4
  int v7; // eax@4

  v2 = this;
  v3 = this->m_apkInvWin[uiInvIndex];
  if ( !v3->m_bLock )
  {
    v4 = ItemIcon::GetItem((ItemIcon *)&v3->vfptr);
    if ( v4 )
    {
      v2->m_bDivide = 0;
      if ( (unsigned int)((int (__thiscall *)(_DWORD))v4->vfptr[3].__vecDelDtor)(v4) > 1 )
      {
        v2->m_bDivide = 1;
        InventoryWin::ms_kFrom.Inven = uiInvIndex & 0x3FF | 0x2400;
        v5 = (GameFrameWork *)v2->m_pkFrameWork;
        v6 = (char *)TextData::Get(0xFBF1412E);
        v7 = ((int (__thiscall *)(_DWORD))v4->vfptr[3].__vecDelDtor)(v4);
        GameFrameWork::OnOpenDivideWin(v5, (PgWin *)&v2->vfptr, 0x10u, v7 - 1, v6, 1u);
      }
    }
  }
}

//----- (0051AF50) --------------------------------------------------------
void __thiscall InventoryWin::OnInvLClickShopMode(InventoryWin *this, unsigned int uiInvIndex)
{
  InventoryWin::OnInvLClickNormalMode(this, uiInvIndex);
}

//----- (0051AF60) --------------------------------------------------------
void __thiscall InventoryWin::OnInvShiftLClickShopMode(InventoryWin *this, unsigned int uiInvIndex)
{
  InventoryWin *v2; // esi@1
  InvWin *v3; // ecx@1
  Item *v4; // edi@2
  GameFrameWork *v5; // ebx@4
  char *v6; // ST0C_4@4
  int v7; // eax@4

  v2 = this;
  v3 = this->m_apkInvWin[uiInvIndex];
  if ( !v3->m_bLock )
  {
    v4 = ItemIcon::GetItem((ItemIcon *)&v3->vfptr);
    if ( v4 )
    {
      v2->m_bDivide = 0;
      if ( (unsigned int)((int (__thiscall *)(_DWORD))v4->vfptr[3].__vecDelDtor)(v4) > 1 )
      {
        v2->m_bDivide = 1;
        InventoryWin::ms_kFrom.Inven = uiInvIndex & 0x3FF | 0x2400;
        v5 = (GameFrameWork *)v2->m_pkFrameWork;
        v6 = (char *)TextData::Get(0xFBF1412E);
        v7 = ((int (__thiscall *)(_DWORD))v4->vfptr[3].__vecDelDtor)(v4);
        GameFrameWork::OnOpenDivideWin(v5, (PgWin *)&v2->vfptr, 0x10u, v7 - 1, v6, 1u);
      }
    }
  }
}

//----- (0051AFF0) --------------------------------------------------------
void __thiscall InventoryWin::OnInvShiftRClickShopMode(InventoryWin *this, unsigned int uiInvIndex)
{
  InventoryWin *v2; // edi@1
  Item *v3; // eax@1
  Item *v4; // esi@1
  NiRefObjectVtbl *v5; // eax@4
  Item *v6; // ecx@4
  int v7; // eax@5
  GameFrameWork *v8; // ebx@6
  char *v9; // ST0C_4@6
  unsigned int v10; // eax@6
  unsigned int v11; // eax@9
  char *v12; // eax@13
  MsgBox *v13; // eax@13

  v2 = this;
  v3 = ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[uiInvIndex]->vfptr);
  v4 = v3;
  if ( v3 && v3->m_pkInfo )
  {
    if ( g_pkKeyboard->m_aucKeystate[5] & 4 )
    {
      v5 = v3->vfptr;
      v6 = v4;
      if ( !byte_B4FF75 )
      {
        v7 = ((int (__thiscall *)(_DWORD))v5[4].__vecDelDtor)(v4);
        InventoryWin::ms_kFrom.Inven = uiInvIndex & 0x3FF | 0x2400;
        if ( v7 != 1 )
        {
          v8 = (GameFrameWork *)v2->m_pkFrameWork;
          v9 = (char *)TextData::Get(0x4C907C7Fu);
          v10 = ((int (__thiscall *)(_DWORD))v4->vfptr[3].__vecDelDtor)(v4);
          GameFrameWork::OnOpenDivideWin(v8, (PgWin *)&v2->vfptr, 0x11u, v10, v9, 1u);
          return;
        }
LABEL_13:
        v12 = (char *)TextData::Get(0x4A432A41u);
        v13 = MsgBox::Modal(MSGBOX_OKCANCEL, v12);
        if ( v2 )
          ((void (__stdcall *)(_DWORD))v13->vfptr->SetMsgHooker)(&v2->vfptr);
        else
          ((void (__stdcall *)(_DWORD))v13->vfptr->SetMsgHooker)(0);
        return;
      }
    }
    else
    {
      if ( !(g_pkKeyboard->m_aucKeystate[3] & 0x20) )
      {
        if ( byte_B4FF75 || ((int (__thiscall *)(_DWORD))v3->vfptr[4].__vecDelDtor)(v3) != 1 )
        {
          GameFrameWork::NcItemSellReq((GameFrameWork *)v2->m_pkFrameWork, uiInvIndex, 1u);
          return;
        }
        InventoryWin::ms_kFrom.Inven = uiInvIndex & 0x3FF | 0x2400;
        goto LABEL_13;
      }
      v5 = v3->vfptr;
      v6 = v4;
    }
    v11 = ((int (__thiscall *)(_DWORD))v5[3].__vecDelDtor)(v6);
    GameFrameWork::NcItemSellReq((GameFrameWork *)v2->m_pkFrameWork, uiInvIndex, v11);
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;
// B4FF75: using guessed type char byte_B4FF75;

//----- (0051B130) --------------------------------------------------------
void __thiscall InventoryWin::OnInvRClickBankMode(InventoryWin *this, unsigned int uiInvIndex)
{
  __int16 v2; // bx@1
  InventoryWin *v3; // edi@1
  Item *v4; // eax@1
  Item *v5; // esi@1
  unsigned int v6; // eax@2
  NiUnsharedGeometryGroup *v7; // eax@3
  GameFrameWork *v8; // ecx@4
  ITEM_INVEN kFrom; // [sp+Ch] [bp-4h]@4

  v2 = uiInvIndex;
  v3 = this;
  v4 = ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[uiInvIndex]->vfptr);
  v5 = v4;
  if ( v4 )
  {
    v6 = Bank::GetInvIdxLotIsNotMax(v4);
    if ( v6 == -1 )
    {
      v7 = TextData::Get(0x91A8CDCE);
      GameFrameWork::AddSysMsg((GameFrameWork *)v3->m_pkFrameWork, (const char *)v7);
    }
    else
    {
      LOWORD(uiInvIndex) = v6 & 0x3FF | 0x1800;
      v8 = (GameFrameWork *)v3->m_pkFrameWork;
      kFrom.Inven = v2 & 0x3FF | 0x2400;
      GameFrameWork::NcItemRelocReq(v8, &kFrom, (ITEM_INVEN *)&uiInvIndex);
      SoundMgr::PlayItemPutSound(v5->m_kStruct.itemid);
    }
  }
}

//----- (0051B1D0) --------------------------------------------------------
void __thiscall InventoryWin::OnInvShiftLClickBankMode(InventoryWin *this, unsigned int uiInvIndex)
{
  InventoryWin *v2; // esi@1
  InvWin *v3; // ecx@1
  Item *v4; // edi@2
  GameFrameWork *v5; // ebx@4
  char *v6; // ST0C_4@4
  int v7; // eax@4

  v2 = this;
  v3 = this->m_apkInvWin[uiInvIndex];
  if ( !v3->m_bLock )
  {
    v4 = ItemIcon::GetItem((ItemIcon *)&v3->vfptr);
    if ( v4 )
    {
      v2->m_bDivide = 0;
      if ( (unsigned int)((int (__thiscall *)(_DWORD))v4->vfptr[3].__vecDelDtor)(v4) > 1 )
      {
        v2->m_bDivide = 1;
        InventoryWin::ms_kFrom.Inven = uiInvIndex & 0x3FF | 0x2400;
        v5 = (GameFrameWork *)v2->m_pkFrameWork;
        v6 = (char *)TextData::Get(0xFBF1412E);
        v7 = ((int (__thiscall *)(_DWORD))v4->vfptr[3].__vecDelDtor)(v4);
        GameFrameWork::OnOpenDivideWin(v5, (PgWin *)&v2->vfptr, 0x10u, v7 - 1, v6, 1u);
      }
    }
  }
}

//----- (0051B260) --------------------------------------------------------
void __thiscall InventoryWin::OnInvShiftRClickBankMode(InventoryWin *this, unsigned int uiInvIndex)
{
  InventoryWin::OnInvRClickBankMode(this, uiInvIndex);
}

//----- (0051B270) --------------------------------------------------------
void __thiscall InventoryWin::OnInvRClickGuildAcademyStorageMode(InventoryWin *this, unsigned int uiInvIndex)
{
  __int16 v2; // bx@1
  InventoryWin *v3; // edi@1
  Item *v4; // eax@1
  Item *v5; // esi@1
  signed int v6; // eax@2
  NiUnsharedGeometryGroup *v7; // eax@3
  GameFrameWork *v8; // ecx@4
  ITEM_INVEN kFrom; // [sp+Ch] [bp-4h]@4

  v2 = uiInvIndex;
  v3 = this;
  v4 = ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[uiInvIndex]->vfptr);
  v5 = v4;
  if ( v4 )
  {
    v6 = GuildAcademyStorage::GetInvIdxLotIsNotMax(v4);
    if ( v6 == -1 )
    {
      v7 = TextData::Get(0x91A8CDCE);
      GameFrameWork::AddSysMsg((GameFrameWork *)v3->m_pkFrameWork, (const char *)v7);
    }
    else
    {
      LOWORD(uiInvIndex) = v6 & 0x3FF;
      v8 = (GameFrameWork *)v3->m_pkFrameWork;
      kFrom.Inven = v2 & 0x3FF | 0x2400;
      GameFrameWork::NcItemRelocReq(v8, &kFrom, (ITEM_INVEN *)&uiInvIndex);
      SoundMgr::PlayItemPutSound(v5->m_kStruct.itemid);
    }
  }
}

//----- (0051B310) --------------------------------------------------------
void __thiscall InventoryWin::OnInvShiftLClickGuildAcademyStorageMode(InventoryWin *this, unsigned int uiInvIndex)
{
  InventoryWin *v2; // esi@1
  InvWin *v3; // ecx@1
  Item *v4; // edi@2
  GameFrameWork *v5; // ebx@4
  char *v6; // ST0C_4@4
  int v7; // eax@4

  v2 = this;
  v3 = this->m_apkInvWin[uiInvIndex];
  if ( !v3->m_bLock )
  {
    v4 = ItemIcon::GetItem((ItemIcon *)&v3->vfptr);
    if ( v4 )
    {
      v2->m_bDivide = 0;
      if ( (unsigned int)((int (__thiscall *)(_DWORD))v4->vfptr[3].__vecDelDtor)(v4) > 1 )
      {
        v2->m_bDivide = 1;
        InventoryWin::ms_kFrom.Inven = uiInvIndex & 0x3FF | 0x2400;
        v5 = (GameFrameWork *)v2->m_pkFrameWork;
        v6 = (char *)TextData::Get(0xFBF1412E);
        v7 = ((int (__thiscall *)(_DWORD))v4->vfptr[3].__vecDelDtor)(v4);
        GameFrameWork::OnOpenDivideWin(v5, (PgWin *)&v2->vfptr, 0x10u, v7 - 1, v6, 1u);
      }
    }
  }
}

//----- (0051B3A0) --------------------------------------------------------
void __thiscall InventoryWin::OnInvShiftRClickGuildAcademyStorageMode(InventoryWin *this, unsigned int uiInvIndex)
{
  InventoryWin::OnInvRClickGuildAcademyStorageMode(this, uiInvIndex);
}

//----- (0051B3B0) --------------------------------------------------------
void __thiscall InventoryWin::UnEquip(InventoryWin *this, unsigned int uiInvIndex)
{
  InventoryWin *v2; // esi@1
  int v3; // eax@3

  v2 = this;
  if ( g_pkMainChar->m_byMode != 5 && ItemIcon::GetItem((ItemIcon *)&this->m_apkEquipWin[uiInvIndex]->vfptr) )
  {
    v3 = 0;
    while ( g_kInventory.m_aspInv[v3].m_pObject )
    {
      if ( (unsigned int)++v3 >= 0xC0 )
        return;
    }
    if ( v3 != -1 )
      GameFrameWork::NcItemUnequipReq((GameFrameWork *)v2->m_pkFrameWork, uiInvIndex, v3);
  }
}

//----- (0051B410) --------------------------------------------------------
void __thiscall InventoryWin::UseEquipedItem(InventoryWin *this, unsigned int uiInvIndex)
{
  char v2; // bl@2
  Item *v3; // eax@2
  ItemInfo *v4; // ecx@3
  int v5; // eax@3

  if ( g_pkMainChar->m_byMode != 5 )
  {
    v2 = uiInvIndex;
    v3 = ItemIcon::GetItem((ItemIcon *)&this->m_apkEquipWin[uiInvIndex]->vfptr);
    if ( v3 )
    {
      v4 = v3->m_pkInfo;
      v5 = 0;
      while ( g_kInventory.m_aspInv[v5].m_pObject )
      {
        if ( (unsigned int)++v5 >= 0xC0 )
          goto LABEL_8;
      }
      if ( v5 != -1 )
        goto LABEL_9;
LABEL_8:
      if ( v4->Class != 5 )
        return;
LABEL_9:
      LOBYTE(uiInvIndex) = v2;
      BYTE1(uiInvIndex) = 8;
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x15u, &uiInvIndex, 2);
    }
  }
}

//----- (0051B480) --------------------------------------------------------
void __thiscall InventoryWin::OnEquipRClick(InventoryWin *this, unsigned int uiInvIndex)
{
  if ( InventoryWin::ms_uiMode != 6 )
    InventoryWin::UnEquip(this, uiInvIndex);
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (0051B4A0) --------------------------------------------------------
bool __thiscall InventoryWin::DropOnInv(InventoryWin *this, DropContents *pkContents, unsigned int uiReceiverInvIndex)
{
  DropContents *v3; // ebx@1
  DropContents::SenderType v4; // edi@1
  InventoryWin *v5; // esi@1
  CClientGuild *v6; // eax@10
  _WORD *v7; // eax@12
  unsigned int v8; // ebx@14
  PgFrameWork *v9; // ecx@17
  unsigned int v10; // edi@17
  Item *v11; // eax@18
  bool result; // al@19
  GameFrameWork *v13; // ecx@20
  void *v14; // ebx@24
  ItemInfo *v15; // edi@25
  unsigned int i64BuyPrice; // ST20_4@25
  GameFrameWork *v17; // esi@26
  NiUnsharedGeometryGroup *v18; // eax@26
  unsigned __int16 v19; // dx@29
  GameFrameWork *v20; // ebx@29
  char *v21; // eax@29
  __int16 v22; // bx@32
  GameFrameWork *v23; // ecx@33
  DivideWin *v24; // eax@33
  unsigned int v25; // eax@34
  PgFrameWork *v26; // ecx@40
  unsigned int v27; // eax@40
  GameFrameWork *v28; // ecx@42
  DivideWin *v29; // eax@42
  unsigned int v30; // eax@43
  GameFrameWork *v31; // ecx@47
  ITEM_INVEN kFrom; // [sp+14h] [bp-4h]@20

  v3 = pkContents;
  v4 = pkContents->m_eSenderType;
  v5 = this;
  if ( v4 == ST_INV_CHAR || v4 == 1 || v4 == 5 || v4 == 6 || v4 == 7 )
    goto LABEL_9;
  if ( v4 != 19 )
  {
    if ( v4 != 3 && v4 != 13 )
      return 0;
LABEL_9:
    if ( v4 != 19 )
      goto LABEL_11;
  }
  v6 = GuildTask::GetGuild();
  if ( !CClientGuild::CanIUseStorage(v6) )
    return 0;
LABEL_11:
  if ( v3->m_eType == CT_ITEM )
  {
    v7 = v3->m_apvParam[0];
    if ( v7 )
      SoundMgr::PlayItemPutSound(v7[4]);
  }
  v8 = v3->m_uiSenderIndex;
  if ( v4 == ST_INV_CHAR )
  {
    if ( v8 != uiReceiverInvIndex )
    {
      if ( !v5->m_bDivide )
      {
LABEL_20:
        v13 = (GameFrameWork *)v5->m_pkFrameWork;
        kFrom.Inven = v8 & 0x3FF | 0x2400;
        LOWORD(pkContents) = uiReceiverInvIndex & 0x3FF | 0x2400;
        GameFrameWork::NcItemRelocReq(v13, &kFrom, (ITEM_INVEN *)&pkContents);
        return 1;
      }
      v9 = v5->m_pkFrameWork;
      v5->m_bDivide = 0;
      v10 = v9[20].m_kMsgQ.m_uiHead;
      if ( v10 )
      {
        v11 = ItemIcon::GetItem((ItemIcon *)&v5->m_apkInvWin[v8]->vfptr);
        if ( (unsigned int)((int (__thiscall *)(Item *))v11->vfptr[3].__vecDelDtor)(v11) > 1 )
        {
          InventoryWin::ms_kFrom.Inven = v8 & 0x3FF | 0x2400;
          InventoryWin::ms_kTo.Inven = uiReceiverInvIndex & 0x3FF | 0x2400;
          GameFrameWork::NcItemSplitReq(
            (GameFrameWork *)v5->m_pkFrameWork,
            &InventoryWin::ms_kFrom,
            &InventoryWin::ms_kTo,
            *(_DWORD *)(v10 + 348));
          return 1;
        }
        goto LABEL_20;
      }
    }
    return 0;
  }
  if ( v4 == 1 )
  {
    GameFrameWork::NcItemUnequipReq((GameFrameWork *)v5->m_pkFrameWork, v8, uiReceiverInvIndex);
    return 1;
  }
  if ( v4 != 5 )
  {
    if ( v4 == 6 )
    {
      v22 = v8 & 0x3FF | 0x1800;
    }
    else
    {
      if ( v4 == 7 )
      {
        GameFrameWork::NcTradeDownboardReq((GameFrameWork *)v5->m_pkFrameWork, v8);
        return 1;
      }
      if ( v4 == 13 )
      {
        if ( v5->m_bDivide )
        {
          v26 = v5->m_pkFrameWork;
          v5->m_bDivide = 0;
          v27 = v26[20].m_kMsgQ.m_uiHead;
          if ( v27 )
          {
            if ( *(_DWORD *)(v27 + 376) != 1 )
              return 0;
          }
        }
        v28 = (GameFrameWork *)v5->m_pkFrameWork;
        LOWORD(pkContents) = v8 & 0x3FF | 0x1000;
        LOWORD(uiReceiverInvIndex) = uiReceiverInvIndex & 0x3FF | 0x2400;
        v29 = v28->m_pkDivideWin;
        if ( v29 && (v30 = v29->m_uiResultValue) != 0 )
        {
          GameFrameWork::NcItemSplitReq(v28, (ITEM_INVEN *)&pkContents, (ITEM_INVEN *)&uiReceiverInvIndex, v30);
          result = 1;
        }
        else
        {
          GameFrameWork::NcItemRelocReq(v28, (ITEM_INVEN *)&pkContents, (ITEM_INVEN *)&uiReceiverInvIndex);
          result = 1;
        }
        return result;
      }
      if ( v4 == 3 )
      {
        v31 = (GameFrameWork *)v5->m_pkFrameWork;
        LOWORD(pkContents) = v8 & 0x3FF | 0x800;
        LOWORD(uiReceiverInvIndex) = uiReceiverInvIndex & 0x3FF | 0x2400;
        GameFrameWork::NcItemRelocReq(v31, (ITEM_INVEN *)&pkContents, (ITEM_INVEN *)&uiReceiverInvIndex);
        return 1;
      }
      if ( v4 != 19 )
        return 1;
      v22 = v8 & 0x3FF;
    }
    v23 = (GameFrameWork *)v5->m_pkFrameWork;
    LOWORD(pkContents) = v22;
    LOWORD(uiReceiverInvIndex) = uiReceiverInvIndex & 0x3FF | 0x2400;
    v24 = v23->m_pkDivideWin;
    if ( v24 )
    {
      v25 = v24->m_uiResultValue;
      if ( v25 )
      {
        GameFrameWork::NcItemSplitReq(v23, (ITEM_INVEN *)&pkContents, (ITEM_INVEN *)&uiReceiverInvIndex, v25);
        return 1;
      }
    }
    GameFrameWork::NcItemRelocReq(v23, (ITEM_INVEN *)&pkContents, (ITEM_INVEN *)&uiReceiverInvIndex);
    return 1;
  }
  v14 = pkContents->m_apvParam[0];
  if ( !v14 )
    return 0;
  v15 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(*(_WORD *)((char *)v14 + 1));
  i64BuyPrice = v15->BuyPrice;
  if ( i64BuyPrice > (signed __int64)User::GetMoney(&g_kUser) )
  {
    v17 = (GameFrameWork *)v5->m_pkFrameWork;
    v18 = TextData::Get(0x5B531F00u);
    GameFrameWork::AddSysMsg(v17, (const char *)v18);
    return 0;
  }
  if ( g_pkKeyboard->m_aucKeystate[5] & 4 )
  {
    v19 = *(_WORD *)((char *)v14 + 1);
    v20 = (GameFrameWork *)v5->m_pkFrameWork;
    v5->m_TargetItemID = v19;
    v21 = (char *)TextData::Get(0x2C588E90u);
    GameFrameWork::OnOpenDivideWin(v20, (PgWin *)&v5->vfptr, 0x12u, v15->MaxLot, v21, 1u);
    result = 1;
  }
  else
  {
    GameFrameWork::NcItemBuyReq((GameFrameWork *)v5->m_pkFrameWork, *(_WORD *)((char *)v14 + 1), v15->MaxLot);
    result = 1;
  }
  return result;
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (0051B880) --------------------------------------------------------
void __userpurge InventoryWin::OnActivePage(InventoryWin *this@<ecx>, int a2@<edi>, unsigned int uiIndex)
{
  signed int v3; // ebx@1
  InventoryWin *v4; // esi@1
  char *v5; // edi@2
  int v6; // edi@6
  signed int v7; // ebx@6
  int v8; // ebx@8
  unsigned int v9; // edi@9
  int v10; // [sp+10h] [bp-Ch]@2

  v3 = 8;
  v4 = this;
  if ( uiIndex < 8 )
  {
    v10 = a2;
    v5 = (char *)this->m_apkActiveTabWin;
    do
    {
      if ( *(_DWORD *)v5 )
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v5 + 256))(0);
      v5 += 4;
      --v3;
    }
    while ( v3 );
    ((void (__stdcall *)(signed int, int))v4->m_apkActiveTabWin[uiIndex]->vfptr[64].__vecDelDtor)(1, v10);
    v6 = (int)v4->m_apkInvWin;
    v7 = 192;
    do
    {
      *(_BYTE *)(*(_DWORD *)v6 + 456) = 0;
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v6 + 324))(0.0);
      v6 += 4;
      --v7;
    }
    while ( v7 );
    v8 = 24 * uiIndex;
    v4->m_iActivePage = 24 * uiIndex;
    if ( (signed int)(24 * uiIndex) < (signed int)(24 * uiIndex + 24) )
    {
      v9 = (unsigned int)&v4->m_apkInvWin[24 * uiIndex];
      do
      {
        *(_BYTE *)(*(_DWORD *)v9 + 456) = 1;
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v9 + 324))(0.0);
        ++v8;
        v9 += 4;
      }
      while ( v8 < v4->m_iActivePage + 24 );
    }
    ((void (__cdecl *)(_DWORD))v4->m_pkChargedItemTabWin->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v4->m_pkChargedItemInvenWin->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v4->m_pkChargedItemInvenWin->vfptr[62].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v4->m_pkCompensationItemTabWin->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v4->m_pkCompensationInvenWin->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v4->m_pkCompensationInvenWin->vfptr[62].__vecDelDtor)(0);
    Inventory::ClearRewardInv(&g_kInventory);
    CompensationInvWin::Refresh(v4->m_pkCompensationInvenWin);
    v4->m_nOpenPage = uiIndex;
  }
}
// 51B880: could not find valid save-restore pair for edi

//----- (0051B9E0) --------------------------------------------------------
void __thiscall InventoryWin::OnChargedItemPage(InventoryWin *this)
{
  InventoryWin *v1; // esi@1
  char *v2; // edi@1
  signed int v3; // ebx@1
  int v4; // edi@5
  signed int v5; // ebx@5
  __int16 pProto; // [sp+14h] [bp-4h]@7

  v1 = this;
  v2 = (char *)this->m_apkActiveTabWin;
  v3 = 8;
  do
  {
    if ( *(_DWORD *)v2 )
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 256))(0);
    v2 += 4;
    --v3;
  }
  while ( v3 );
  v4 = (int)v1->m_apkInvWin;
  v5 = 192;
  do
  {
    *(_BYTE *)(*(_DWORD *)v4 + 456) = 0;
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 324))(0.0);
    v4 += 4;
    --v5;
  }
  while ( v5 );
  ((void (__stdcall *)(signed int))v1->m_pkChargedItemTabWin->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(signed int))v1->m_pkChargedItemInvenWin->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(signed int))v1->m_pkChargedItemInvenWin->vfptr[62].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkCompensationItemTabWin->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkCompensationInvenWin->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkCompensationInvenWin->vfptr[62].__vecDelDtor)(0);
  Inventory::ClearRewardInv(&g_kInventory);
  CompensationInvWin::Refresh(v1->m_pkCompensationInvenWin);
  CChargedItem::Clear(&g_kChargedItem);
  ChargedItemInvenWin::Refresh(v1->m_pkChargedItemInvenWin);
  pProto = v1->m_pkChargedItemInvenWin->m_uiCurrPage;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x20u, &pProto, 2);
  v1->m_bChargedStart = 0;
}

//----- (0051BB10) --------------------------------------------------------
void __thiscall InventoryWin::OnCompensationPage(InventoryWin *this)
{
  InventoryWin *v1; // esi@1
  char *v2; // edi@1
  signed int v3; // ebx@1
  int v4; // edi@5
  signed int v5; // ebx@5
  PROTO_NC_ITEM_REWARDINVENOPEN_REQ kProto; // [sp+14h] [bp-4h]@7

  v1 = this;
  v2 = (char *)this->m_apkActiveTabWin;
  v3 = 8;
  do
  {
    if ( *(_DWORD *)v2 )
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 256))(0);
    v2 += 4;
    --v3;
  }
  while ( v3 );
  v4 = (int)v1->m_apkInvWin;
  v5 = 192;
  do
  {
    *(_BYTE *)(*(_DWORD *)v4 + 456) = 0;
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 324))(0.0);
    v4 += 4;
    --v5;
  }
  while ( v5 );
  ((void (__stdcall *)(_DWORD))v1->m_pkChargedItemTabWin->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkChargedItemInvenWin->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkChargedItemInvenWin->vfptr[62].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkCompensationItemTabWin->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkCompensationInvenWin->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkCompensationInvenWin->vfptr[62].__vecDelDtor)(1);
  Inventory::ClearRewardInv(&g_kInventory);
  CompensationInvWin::Refresh(v1->m_pkCompensationInvenWin);
  CChargedItem::Clear(&g_kChargedItem);
  ChargedItemInvenWin::Refresh(v1->m_pkChargedItemInvenWin);
  kProto.page = v1->m_pkCompensationInvenWin->m_uiCurrPage;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x2Cu, &kProto, 2);
  v1->m_bRewardStart = 0;
}

//----- (0051BC40) --------------------------------------------------------
void __thiscall InventoryWin::RefreshCompensationInv(InventoryWin *this)
{
  if ( !this->m_bRewardStart )
    CompensationInvWin::Refresh(this->m_pkCompensationInvenWin);
}

//----- (0051BC60) --------------------------------------------------------
void __thiscall InventoryWin::UpdateInventory(InventoryWin *this)
{
  InventoryWin *v1; // edi@1
  char *v2; // esi@2
  signed int v3; // ebx@2
  unsigned int v4; // esi@4
  unsigned int v5; // eax@6
  unsigned int auiEquipPos[26]; // [sp+10h] [bp-6Ch]@4

  v1 = this;
  if ( this->m_bShowEquip )
  {
    v2 = (char *)this->m_apkInvWin;
    v3 = 192;
    do
    {
      *(_BYTE *)(*(_DWORD *)v2 + 456) = 1;
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 324))(0.0);
      v2 += 4;
      --v3;
    }
    while ( v3 );
  }
  auiEquipPos[0] = 6;
  auiEquipPos[1] = 1;
  auiEquipPos[2] = 23;
  auiEquipPos[3] = 12;
  auiEquipPos[4] = 7;
  auiEquipPos[5] = 10;
  auiEquipPos[6] = 16;
  auiEquipPos[7] = 19;
  auiEquipPos[8] = 15;
  auiEquipPos[9] = 14;
  auiEquipPos[10] = 21;
  auiEquipPos[11] = 0;
  auiEquipPos[12] = 22;
  auiEquipPos[13] = 20;
  auiEquipPos[14] = 8;
  auiEquipPos[15] = 17;
  auiEquipPos[16] = 24;
  auiEquipPos[17] = 25;
  auiEquipPos[18] = 26;
  auiEquipPos[19] = 27;
  auiEquipPos[20] = 11;
  auiEquipPos[21] = 13;
  auiEquipPos[22] = 9;
  auiEquipPos[23] = 29;
  auiEquipPos[24] = 18;
  auiEquipPos[25] = 28;
  v4 = 0;
  do
  {
    if ( v4 < 0x1E )
    {
      v5 = auiEquipPos[v4];
      if ( v5 )
      {
        v1->m_apkEquipWin[v5]->m_bActive = 1;
        v1->m_apkEquipWin[v5]->vfptr[81].__vecDelDtor((NiRefObject *)v1->m_apkEquipWin[v5], COERCE_UNSIGNED_INT(0.0));
      }
    }
    ++v4;
  }
  while ( v4 < 0x1A );
  if ( v1->m_bShowEquip )
    InventoryWin::OnActivePage(v1, (int)v1, 0);
}

//----- (0051BDD0) --------------------------------------------------------
void __thiscall InventoryWin::OnInvRClickGttStoreMode(InventoryWin *this, unsigned int uiInvIndex)
{
  InventoryWin *v2; // esi@1
  Item *v3; // eax@1
  GameFrameWork *v4; // esi@2
  NiUnsharedGeometryGroup *v5; // eax@2

  v2 = this;
  v3 = ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[uiInvIndex]->vfptr);
  if ( v3 )
  {
    SoundMgr::PlayItemPutSound(v3->m_kStruct.itemid);
    v4 = (GameFrameWork *)v2->m_pkFrameWork;
    v5 = TextData::Get(0xE2F1C6Eu);
    GameFrameWork::AddSysMsg(v4, (const char *)v5);
  }
}

//----- (0051BE20) --------------------------------------------------------
void __thiscall InventoryWin::OnInvShiftLClickGttStoreMode(InventoryWin *this, unsigned int uiInvIndex)
{
  InventoryWin *v2; // esi@1
  InvWin *v3; // ecx@1
  Item *v4; // edi@2
  GameFrameWork *v5; // ebx@4
  char *v6; // ST0C_4@4
  int v7; // eax@4

  v2 = this;
  v3 = this->m_apkInvWin[uiInvIndex];
  if ( !v3->m_bLock )
  {
    v4 = ItemIcon::GetItem((ItemIcon *)&v3->vfptr);
    if ( v4 )
    {
      v2->m_bDivide = 0;
      if ( (unsigned int)((int (__thiscall *)(_DWORD))v4->vfptr[3].__vecDelDtor)(v4) > 1 )
      {
        v2->m_bDivide = 1;
        InventoryWin::ms_kFrom.Inven = uiInvIndex & 0x3FF | 0x2400;
        v5 = (GameFrameWork *)v2->m_pkFrameWork;
        v6 = (char *)TextData::Get(0xFBF1412E);
        v7 = ((int (__thiscall *)(_DWORD))v4->vfptr[3].__vecDelDtor)(v4);
        GameFrameWork::OnOpenDivideWin(v5, (PgWin *)&v2->vfptr, 0x10u, v7 - 1, v6, 1u);
      }
    }
  }
}

//----- (0051BEB0) --------------------------------------------------------
void __thiscall InventoryWin::SetAutoPickCheck(InventoryWin *this, const bool bCheck, const bool bSysMsg)
{
  InventoryWin *v3; // esi@1
  bool v4; // bl@4
  NiUnsharedGeometryGroup *v5; // eax@6
  bool v6; // zf@10
  bool v7; // bl@11
  GameFrameWork *v8; // eax@13
  unsigned int v9; // [sp-Ch] [bp-14h]@6
  int bAutoPickCheck; // [sp+4h] [bp-4h]@0
  char *pcSysMsg; // [sp+10h] [bp+8h]@10

  v3 = this;
  if ( !this->m_pkAutoPickBtn || !this->m_pkAutoPickON || !this->m_pkAutoPickOFF )
    return;
  v4 = bCheck;
  LOBYTE(bAutoPickCheck) = bCheck;
  if ( !this->m_bAutoPickMinimon )
  {
    v4 = 0;
    LOBYTE(bAutoPickCheck) = 0;
    v5 = TextData2::Get(0xCCF8D9CC);
    goto LABEL_9;
  }
  if ( !bCheck )
  {
    v5 = TextData2::Get(0xC3F9D912);
LABEL_9:
    v9 = 1874639786;
    goto LABEL_10;
  }
  v5 = TextData2::Get(0xCBF9D9CC);
  v9 = 1874621874;
LABEL_10:
  pcSysMsg = (char *)v5;
  TextData2::Get(v9);
  v6 = v3->m_bShowEquip == 0;
  v3->m_bAutoPickCheck = v4;
  if ( !v6 )
  {
    ((void (__stdcall *)(int))v3->m_pkAutoPickON->vfptr[64].__vecDelDtor)(bAutoPickCheck);
    v7 = v4 == 0;
    ((void (__stdcall *)(bool))v3->m_pkAutoPickOFF->vfptr[64].__vecDelDtor)(v7);
    ((void (__stdcall *)(bool))v3->m_pkAutoPickON->vfptr[60].__vecDelDtor)(v7);
    ((void (__thiscall *)(PgWinSpr *))v3->m_pkAutoPickOFF->vfptr[60].__vecDelDtor)(v3->m_pkAutoPickOFF);
  }
  if ( bSysMsg )
  {
    v8 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v8 )
      GameFrameWork::AddSysMsg(v8, pcSysMsg);
  }
}

//----- (0051BFC0) --------------------------------------------------------
void __thiscall InventoryWin::OnAutoPickShow(InventoryWin *this)
{
  InventoryWin *v1; // esi@1
  MinimonInfo *v2; // eax@2
  char v3; // bl@2
  Item *v4; // edi@2
  int v5; // eax@20
  bool bRightPickEnable; // [sp+7h] [bp-1h]@2

  v1 = this;
  if ( this->m_pkAutoPickBtn )
  {
    v2 = (MinimonInfo *)g_kInventory.m_aspEquip[25].m_pObject;
    v3 = 0;
    v4 = g_kInventory.m_aspEquip[28].m_pObject;
    bRightPickEnable = 0;
    if ( g_kInventory.m_aspEquip[25].m_pObject )
    {
      v2 = (MinimonInfo *)g_kInventory.m_aspEquip[25].m_pObject->m_pkInfo;
      if ( v2 )
      {
        v2 = MinimonInfoTable::GetMinimonInfoByIDX(&v2->ItemIDX[2]);
        if ( v2->MinimonRole == 1 )
          v3 = 1;
      }
    }
    if ( v4 )
    {
      v2 = (MinimonInfo *)v4->m_pkInfo;
      if ( v2 )
      {
        v2 = MinimonInfoTable::GetMinimonInfoByIDX(&v2->ItemIDX[2]);
        if ( v2->MinimonRole == 1 )
          bRightPickEnable = 1;
      }
    }
    if ( v1->m_bShowEquip )
    {
      if ( v3 || bRightPickEnable )
        v2 = (MinimonInfo *)1;
      else
        LOBYTE(v2) = 0;
      v2 = (MinimonInfo *)((int (__stdcall *)(_DWORD))v1->m_pkAutoPickBtn->vfptr[64].__vecDelDtor)(v2);
    }
    if ( v3 || bRightPickEnable )
      v2 = (MinimonInfo *)1;
    else
      LOBYTE(v2) = 0;
    v5 = ((int (__stdcall *)(_DWORD))v1->m_pkAutoPickBtn->vfptr[60].__vecDelDtor)(v2);
    if ( v1->m_bShowEquip )
    {
      LOBYTE(v5) = !v3 && !bRightPickEnable;
      v5 = ((int (__stdcall *)(_DWORD))v1->m_pkAutoPickDisable->vfptr[64].__vecDelDtor)(v5);
    }
    LOBYTE(v5) = !v3 && !bRightPickEnable;
    ((void (__stdcall *)(_DWORD))v1->m_pkAutoPickDisable->vfptr[60].__vecDelDtor)(v5);
    if ( v1->m_bShowEquip )
    {
      ((void (__stdcall *)(_DWORD))v1->m_pkAutoPickON->vfptr[64].__vecDelDtor)(v1->m_bAutoPickCheck);
      ((void (__stdcall *)(_DWORD))v1->m_pkAutoPickOFF->vfptr[64].__vecDelDtor)(v1->m_bAutoPickCheck == 0);
      ((void (__stdcall *)(_DWORD))v1->m_pkAutoPickON->vfptr[60].__vecDelDtor)(v1->m_bAutoPickCheck == 0);
      ((void (__stdcall *)(_DWORD))v1->m_pkAutoPickOFF->vfptr[60].__vecDelDtor)(v1->m_bAutoPickCheck);
    }
  }
}

//----- (0051C140) --------------------------------------------------------
void __thiscall InventoryWin::OnAutoPickCheck(InventoryWin *this)
{
  InventoryWin *v1; // esi@1
  char v2; // al@3
  void *(__thiscall *v3)(NiRefObject *, unsigned int); // edx@3
  PgFrameWork *v4; // edi@6
  char v5; // al@8
  NiUnsharedGeometryGroup *v6; // eax@9
  int v7; // [sp+0h] [bp-4h]@0

  v1 = this;
  if ( this->m_pkAutoPickON && this->m_pkAutoPickOFF )
  {
    v2 = ((int (*)(void))this->m_pkAutoPickON->vfptr[61].__vecDelDtor)();
    v3 = v1->m_pkAutoPickON->vfptr[60].__vecDelDtor;
    if ( v2 == 1 )
    {
      ((void (__stdcall *)(_DWORD, int))v3)(0, v7);
      ((void (__cdecl *)(signed int))v1->m_pkAutoPickOFF->vfptr[60].__vecDelDtor)(1);
    }
    else
    {
      ((void (__stdcall *)(signed int, int))v3)(1, v7);
      ((void (__cdecl *)(_DWORD))v1->m_pkAutoPickOFF->vfptr[60].__vecDelDtor)(0);
    }
    v4 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v4 )
    {
      if ( v1->m_bAutoPickMinimon )
      {
        v5 = ((int (*)(void))v1->m_pkAutoPickON->vfptr[61].__vecDelDtor)();
        PgFrameWork::AddMsg(v4, 0xFDu, v5 == 0, 0);
      }
      else
      {
        v6 = TextData2::Get(0xCCF8D9CC);
        GameFrameWork::AddSysMsg((GameFrameWork *)v4, (const char *)v6);
      }
    }
  }
}

//----- (0051C200) --------------------------------------------------------
void __thiscall InventoryWin::OnAutoUseShow(InventoryWin *this)
{
  InventoryWin *v1; // ebx@1
  MinimonInfo *v2; // eax@2
  Item *v3; // esi@2
  int v4; // eax@20
  bool bRightAutoUse; // [sp+6h] [bp-2h]@2
  bool bLeftAutoUse; // [sp+7h] [bp-1h]@2

  v1 = this;
  if ( this->m_pkAutoUseWinOpenBtn )
  {
    v2 = (MinimonInfo *)g_kInventory.m_aspEquip[25].m_pObject;
    v3 = g_kInventory.m_aspEquip[28].m_pObject;
    bLeftAutoUse = 0;
    bRightAutoUse = 0;
    if ( g_kInventory.m_aspEquip[25].m_pObject )
    {
      v2 = (MinimonInfo *)g_kInventory.m_aspEquip[25].m_pObject->m_pkInfo;
      if ( v2 )
      {
        v2 = MinimonInfoTable::GetMinimonInfoByIDX(&v2->ItemIDX[2]);
        if ( v2->MinimonRole == 2 )
          bLeftAutoUse = 1;
      }
    }
    if ( v3 )
    {
      v2 = (MinimonInfo *)v3->m_pkInfo;
      if ( v2 )
      {
        v2 = MinimonInfoTable::GetMinimonInfoByIDX(&v2->ItemIDX[2]);
        if ( v2->MinimonRole == 2 )
          bRightAutoUse = 1;
      }
    }
    if ( v1->m_bShowEquip )
    {
      if ( bLeftAutoUse || bRightAutoUse )
        v2 = (MinimonInfo *)1;
      else
        LOBYTE(v2) = 0;
      v2 = (MinimonInfo *)((int (__stdcall *)(_DWORD))v1->m_pkAutoUseWinOpenBtn->vfptr[64].__vecDelDtor)(v2);
    }
    if ( bLeftAutoUse || bRightAutoUse )
      v2 = (MinimonInfo *)1;
    else
      LOBYTE(v2) = 0;
    v4 = ((int (__stdcall *)(_DWORD))v1->m_pkAutoUseWinOpenBtn->vfptr[60].__vecDelDtor)(v2);
    if ( v1->m_bShowEquip )
    {
      LOBYTE(v4) = !bLeftAutoUse && !bRightAutoUse;
      v4 = ((int (__stdcall *)(_DWORD))v1->m_pkAutoUseDisable->vfptr[64].__vecDelDtor)(v4);
    }
    LOBYTE(v4) = !bLeftAutoUse && !bRightAutoUse;
    ((void (__stdcall *)(_DWORD))v1->m_pkAutoUseDisable->vfptr[60].__vecDelDtor)(v4);
  }
}

//----- (0051C320) --------------------------------------------------------
void __thiscall InventoryWin::OnOffEquipWin(InventoryWin *this)
{
  InventoryWin *v1; // esi@1
  signed int v2; // ebx@1
  char *v3; // edi@2
  IconWin **v4; // edi@4
  signed int v5; // ebx@4
  char v6; // al@8
  void *(__thiscall *v7)(NiRefObject *, unsigned int); // edx@8
  int v8; // edx@9
  char *v9; // edi@12
  IconWin **v10; // edi@14
  signed int v11; // ebx@14
  int v12; // edi@17
  signed int v13; // ebx@17
  int v14; // edi@19
  signed int v15; // ebx@19
  NiNode *v16; // eax@21

  v1 = this;
  v2 = 8;
  if ( this->m_bShowEquip )
  {
    v3 = (char *)this->m_apkInvTabWin;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 256))(v1->m_bShowEquip);
      v3 += 4;
      --v2;
    }
    while ( v2 );
    v4 = (IconWin **)v1->m_apkInvWin;
    v5 = 192;
    do
    {
      IconWin::ShowFocus(*v4, v1->m_bShowEquip);
      ((void (__stdcall *)(_DWORD))(*v4)->vfptr[81].__vecDelDtor)(0.0);
      ++v4;
      --v5;
    }
    while ( v5 );
    ((void (__stdcall *)(_DWORD))v1->m_pkCompensationItemOffTabWin->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
    ((void (__stdcall *)(_DWORD))v1->m_pkChargedItemOffTabWin->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
    if ( v1->m_nOpenPage >= 0 )
      InventoryWin::OnActivePage(v1, (int)v4, v1->m_nOpenPage);
    ((void (__stdcall *)(_DWORD))v1->m_pkNewRewardItem->vfptr[64].__vecDelDtor)(v1->m_bRewardNew);
    ((void (__stdcall *)(_DWORD))v1->m_pkNewChargedItem->vfptr[64].__vecDelDtor)(v1->m_bChargedNew);
    v6 = ChargedItemList::IsEffecting(EE_STORAGE_ANYWHERE);
    v7 = v1->m_pkInvMagicBoxBut->vfptr[64].__vecDelDtor;
    if ( v6 == 1 )
    {
      ((void (__stdcall *)(_DWORD))v7)(v1->m_bShowEquip);
      ((void (__stdcall *)(_DWORD))v1->m_pkInvMagicBoxBut->vfptr[60].__vecDelDtor)(v1->m_bShowEquip);
      ((void (__stdcall *)(_DWORD))v1->m_pkDisMagicBoxBut->vfptr[64].__vecDelDtor)(v1->m_bShowEquip == 0);
      v8 = v1->m_bShowEquip == 0;
    }
    else
    {
      ((void (__stdcall *)(_DWORD))v7)(v1->m_bShowEquip == 0);
      ((void (__stdcall *)(_DWORD))v1->m_pkInvMagicBoxBut->vfptr[60].__vecDelDtor)(v1->m_bShowEquip == 0);
      ((void (__stdcall *)(_DWORD))v1->m_pkDisMagicBoxBut->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
      v8 = v1->m_bShowEquip;
    }
    ((void (__stdcall *)(int))v1->m_pkDisMagicBoxBut->vfptr[60].__vecDelDtor)(v8);
    InventoryWin::OnAutoUseShow(v1);
    InventoryWin::OnAutoPickShow(v1);
  }
  else
  {
    v9 = (char *)this->m_apkActiveTabWin;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v9 - 8) + 256))(v1->m_bShowEquip);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v9 + 256))(v1->m_bShowEquip);
      (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v9 + 8) + 256))(v1->m_bShowEquip);
      v9 += 4;
      --v2;
    }
    while ( v2 );
    ((void (__stdcall *)(_DWORD))v1->m_pkChargedItemInvenWin->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
    ((void (__stdcall *)(_DWORD))v1->m_pkChargedItemTabWin->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
    ((void (__stdcall *)(_DWORD))v1->m_pkChargedItemDisableTabWin->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
    ((void (__stdcall *)(_DWORD))v1->m_pkCompensationInvenWin->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
    ((void (__stdcall *)(_DWORD))v1->m_pkCompensationItemTabWin->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
    ((void (__stdcall *)(_DWORD))v1->m_pkCompensationDisableTabWin->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
    ((void (__stdcall *)(_DWORD))v1->m_pkNewRewardItem->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
    ((void (__stdcall *)(_DWORD))v1->m_pkNewChargedItem->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
    ((void (__stdcall *)(_DWORD))v1->m_pkInvMagicBoxBut->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
    ((void (__stdcall *)(_DWORD))v1->m_pkDisMagicBoxBut->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
    ((void (__stdcall *)(_DWORD))v1->m_pkAutoPickON->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
    ((void (__stdcall *)(_DWORD))v1->m_pkAutoPickBtn->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
    ((void (__stdcall *)(_DWORD))v1->m_pkAutoPickOFF->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
    ((void (__stdcall *)(_DWORD))v1->m_pkAutoPickDisable->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
    v10 = (IconWin **)v1->m_apkInvWin;
    v11 = 192;
    do
    {
      IconWin::ShowFocus(*v10, v1->m_bShowEquip);
      LOBYTE((*v10)[1].m_kLocal.m_Rotate.m_pEntry[2][0]) = v1->m_bShowEquip;
      ((void (__stdcall *)(_DWORD))(*v10)->vfptr[81].__vecDelDtor)(0.0);
      ++v10;
      --v11;
    }
    while ( v11 );
    ((void (__stdcall *)(_DWORD))v1->m_pkAutoUseWinOpenBtn->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
    ((void (__stdcall *)(_DWORD))v1->m_pkAutoUseDisable->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
  }
  v12 = (int)v1->m_pkNumSpr;
  v13 = 8;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v12 + 256))(v1->m_bShowEquip);
    v12 += 4;
    --v13;
  }
  while ( v13 );
  v14 = (int)v1->m_pkInvSlot;
  v15 = 24;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v14 + 256))(v1->m_bShowEquip);
    v14 += 4;
    --v15;
  }
  while ( v15 );
  ((void (__stdcall *)(_DWORD))v1->m_pkArrangeBut->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
  ((void (__stdcall *)(_DWORD))v1->m_pkCopperText->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
  ((void (__stdcall *)(_DWORD))v1->m_pkSilverText->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
  ((void (__stdcall *)(_DWORD))v1->m_pkGoldText->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
  ((void (__stdcall *)(_DWORD))v1->m_pkGemText->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
  ((void (__stdcall *)(_DWORD))v1->m_pkChargedItemOffTabWin->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
  ((void (__stdcall *)(_DWORD))v1->m_pkCompensationItemOffTabWin->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
  ((void (__stdcall *)(_DWORD))v1->m_pkInvPanel->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
  ((void (__stdcall *)(_DWORD))v1->m_pkMoneyPanel->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
  ((void (__stdcall *)(_DWORD))v1->m_pkFunctionPanel->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
  ((void (__stdcall *)(_DWORD))v1->m_pkGoldBtn->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
  ((void (__stdcall *)(_DWORD))v1->m_pkSilverBtn->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
  ((void (__stdcall *)(_DWORD))v1->m_pkCopperBtn->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
  ((void (__stdcall *)(_DWORD))v1->m_pkGemBtn->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
  ((void (__stdcall *)(_DWORD))v1->m_pkGoldInput->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
  ((void (__stdcall *)(_DWORD))v1->m_pkSilverInput->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
  ((void (__stdcall *)(_DWORD))v1->m_pkCopperInput->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
  ((void (__stdcall *)(_DWORD))v1->m_pkGemInput->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
  ((void (__stdcall *)(_DWORD))v1->m_pkInvenTheme->vfptr[64].__vecDelDtor)(v1->m_bShowEquip);
  v16 = v1->m_pRunArrangeInvenEff.m_pObject;
  if ( v1->m_bShowEquip )
    v16->m_uFlags &= 0xFFFEu;
  else
    v16->m_uFlags |= 1u;
}

//----- (0051C920) --------------------------------------------------------
void __thiscall InventoryWin::ItemChatLink(InventoryWin *this, unsigned int uiLClickType, unsigned int uiInvIndex)
{
  GameFrameWork *v3; // eax@3
  GameFrameWork *v4; // ebx@3
  NiUnsharedGeometryGroup *v5; // eax@5
  ItemIcon *v6; // ecx@9
  Item *v7; // eax@12
  ItemInfo *v8; // ebx@13
  int v9; // esi@13
  char *v10; // eax@13
  char v11; // dl@14
  unsigned int v12; // eax@16
  char *v13; // edi@16
  char v14; // cl@17
  GameFrameWork *pkGame; // [sp+8h] [bp-2B4h]@3
  InventoryWin *v16; // [sp+Ch] [bp-2B0h]@1
  SHINE_ITEM_STRUCT rItemStruct; // [sp+10h] [bp-2ACh]@13
  char chItemTagName[256]; // [sp+78h] [bp-244h]@16
  char chItemName[256]; // [sp+178h] [bp-144h]@15
  char chItemUpGrade[64]; // [sp+278h] [bp-44h]@16

  v16 = this;
  if ( uiLClickType == 3 || uiLClickType == 5 )
  {
    v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v4 = v3;
    pkGame = v3;
    if ( v3 && GameFrameWork::IsRoarShowWin(v3) )
    {
      v5 = TextData3::Get(0x5F9769D4u);
      GameFrameWork::AddSysMsg(v4, (const char *)v5);
      return;
    }
    if ( uiLClickType == 3 )
    {
      if ( uiInvIndex >= 0xC0 )
        return;
      v6 = (ItemIcon *)&v16->m_apkInvWin[uiInvIndex]->vfptr;
    }
    else
    {
      if ( uiLClickType != 5 || uiInvIndex >= 0x1E )
        return;
      v6 = (ItemIcon *)&v16->m_apkEquipWin[uiInvIndex]->vfptr;
    }
    v7 = ItemIcon::GetItem(v6);
    if ( v7 )
    {
      v8 = v7->m_pkInfo;
      qmemcpy(&rItemStruct, &v7->m_kStruct, sizeof(rItemStruct));
      v9 = ((int (__thiscall *)(Item *))v7->vfptr[9].__vecDelDtor)(v7);
      v10 = v8->Name;
      do
        v11 = *v10++;
      while ( v11 );
      strncpy(chItemName, v8->Name, v10 - &v8->Name[1] + 1);
      if ( v9 )
      {
        sprintf(chItemUpGrade, " [+%d]", v9);
        v12 = strlen(chItemUpGrade) + 1;
        v13 = &chItemTagName[255];
        do
          v14 = (v13++)[1];
        while ( v14 );
        qmemcpy(v13, chItemUpGrade, v12);
      }
      sprintf(chItemTagName, "<\t%s\t>", chItemName);
      if ( pkGame )
        GameFrameWork::ChatItemLink(pkGame, chItemTagName, &rItemStruct);
    }
  }
}

//----- (0051CAD0) --------------------------------------------------------
void __thiscall InvWin::SetLock(InvWin *this, bool bLock)
{
  InvWin *v2; // ebx@1
  NiProperty *v3; // edi@2
  NiObjectNET *v4; // eax@3
  NiObjectNET *v5; // esi@3
  NiProperty *v6; // esi@7
  NiMaterialProperty *v7; // eax@8
  NiProperty *v8; // eax@9
  double v9; // st7@13
  NiTimeController *kColor; // ST14_4@15
  NiExtraData **kColor_4; // ST18_4@15
  unsigned int kColor_8; // ST1C_4@15

  v2 = this;
  if ( this->m_bLock != bLock )
  {
    v3 = NiAVObject::GetProperty((NiAVObject *)&this->vfptr, 9);
    if ( !v3 )
    {
      v4 = (NiObjectNET *)operator new(0x28u);
      v5 = v4;
      if ( v4 )
      {
        NiObjectNET::NiObjectNET(v4);
        v5->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
        LOWORD(v5[1].vfptr) = 0;
        v5[1].m_uiRefCount = 0;
        v5[1].m_pcName = (char *)1;
      }
      else
      {
        v5 = 0;
      }
      v3 = (NiProperty *)v5;
      NiAVObject::AttachProperty((NiAVObject *)&v2->vfptr, (NiProperty *)v5);
    }
    v6 = NiAVObject::GetProperty((NiAVObject *)&v2->vfptr, 3);
    if ( !v6 )
    {
      v7 = (NiMaterialProperty *)operator new(0x60u);
      if ( v7 )
        NiMaterialProperty::NiMaterialProperty(v7);
      else
        v8 = 0;
      v6 = v8;
      NiAVObject::AttachProperty((NiAVObject *)&v2->vfptr, v8);
    }
    v2->m_bLock = bLock;
    v3[1].m_uiRefCount = 0;
    v3[1].m_pcName = 0;
    ++v6[3].m_uiRefCount;
    if ( bLock )
      v9 = 0.40000001;
    else
      v9 = 1.0;
    *(float *)&kColor = v9;
    *(float *)&kColor_4 = v9;
    v6[2].m_spControllers.m_pObject = kColor;
    *(float *)&kColor_8 = v9;
    v6[2].m_ppkExtra = kColor_4;
    v6[2].m_uiExtraDataSize = kColor_8;
    NiAVObject::UpdateProperties((NiAVObject *)&v2->vfptr);
  }
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);

//----- (0051CC00) --------------------------------------------------------
void __thiscall CompensationInvWin::OnCommand(CompensationInvWin *this, unsigned int wParam, int lParam)
{
  unsigned int v3; // eax@2
  unsigned int v4; // eax@5
  GameFrameWork *v5; // eax@11

  switch ( wParam )
  {
    case 1u:
      v3 = this->m_uiCurrPage;
      if ( v3 )
        this->m_uiCurrPage = v3 - 1;
      CompensationInvWin::OnOpenPage(this);
      break;
    case 2u:
      v4 = ++this->m_uiCurrPage;
      if ( g_kInventory.m_uiRewardCount != 24 && v4 )
        this->m_uiCurrPage = v4 - 1;
      CompensationInvWin::OnOpenPage(this);
      break;
    case 5u:
      CompensationInvWin::OnInvRClick(this, lParam);
      break;
    case 6u:
      CompensationInvWin::OnInvLClick(this, lParam);
      break;
    case 3u:
      v5 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v5 )
        GameFrameWork::OpenPlayGuideSearchList(v5, "ChrInv");
      break;
    default:
      return;
  }
}

//----- (0051CCB0) --------------------------------------------------------
void __thiscall InventoryWin::OnEquipLClick(InventoryWin *this, unsigned int uiInvIndex)
{
  InventoryWin *v2; // ebx@1
  InvWin *v3; // ecx@1
  Item *v4; // esi@1
  Item *v5; // esi@6
  int v6; // ebx@10
  NiUnsharedGeometryGroup *v7; // esi@10
  Item *v8; // edi@17
  ItemInfo *v9; // esi@19
  int v10; // esi@22
  char *v11; // eax@23
  NiD3DDefaultShader *v12; // eax@23
  int v13; // ebx@23
  NiUnsharedGeometryGroup *v14; // esi@23
  signed int v15; // eax@27
  MsgBox **v16; // esi@29
  char *v17; // eax@30
  NiD3DDefaultShader *v18; // eax@30
  PgFrameWork *v19; // eax@30
  int v20; // ebx@31
  NiUnsharedGeometryGroup *v21; // esi@31
  GameFrameWork *v22; // ebx@36
  NiUnsharedGeometryGroup *v23; // eax@36
  SHINE_ITEM_STRUCT kStruct; // [sp+Ch] [bp-84h]@21
  unsigned int kFrom; // [sp+74h] [bp-1Ch]@1
  PgMsg::Frame kOkMsg; // [sp+78h] [bp-18h]@30

  v2 = this;
  v3 = this->m_apkEquipWin[uiInvIndex];
  kFrom = uiInvIndex;
  v4 = ItemIcon::GetItem((ItemIcon *)&v3->vfptr);
  if ( v4 )
  {
    if ( g_pkKeyboard->m_aucKeystate[7] & 1 )
    {
      InventoryWin::ItemChatLink(v2, 5u, uiInvIndex);
    }
    else
    {
      switch ( InventoryWin::ms_uiMode )
      {
        case 6u:
          if ( uiInvIndex < 0x1E )
            v5 = g_kInventory.m_aspEquip[uiInvIndex].m_pObject;
          else
            v5 = 0;
          if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v5->vfptr[1].__vecDelDtor)(v5) == 26
            || (unsigned __int8)((int (__thiscall *)(_DWORD))v5->vfptr[1].__vecDelDtor)(v5) == 37 )
          {
            LOWORD(kFrom) = uiInvIndex & 0x3FF | 0x2000;
            InventoryWin::OnClickRepairItem(v2, (ITEM_INVEN)kFrom);
          }
          else
          {
            v6 = (int)&v2->vfptr;
            v7 = TextData2::Get(0xB23A203F);
            if ( *(_DWORD *)(v6 + 4) )
            {
              (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v6 + 4) + 4))(25, v7, v6);
              if ( *(_DWORD *)(v6 + 4) )
                (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v6 + 4) + 20))(25, v7, v6);
            }
            (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v6 + 20))(v6, 25, v7, v6);
          }
          break;
        case 7u:
          if ( uiInvIndex < 0x1E )
            v8 = g_kInventory.m_aspEquip[uiInvIndex].m_pObject;
          else
            v8 = 0;
          v9 = v8->m_pkInfo;
          if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v8->vfptr[1].__vecDelDtor)(v8) != 5 || v9->Type )
          {
            v20 = (int)&v2->vfptr;
            v21 = TextData2::Get(0x569771CAu);
            if ( *(_DWORD *)(v20 + 4) )
            {
              (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v20 + 4) + 4))(25, v21, v20);
              if ( *(_DWORD *)(v20 + 4) )
                (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v20 + 4) + 20))(25, v21, v20);
            }
            (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v20 + 20))(v20, 25, v21, v20);
          }
          else
          {
            qmemcpy(&kStruct, &v8->m_kStruct, sizeof(kStruct));
            if ( kStruct.itemattr.weapon.createdSocketCount )
            {
              v10 = (int)&v2->m_spMsgBox;
              if ( !v2->m_spMsgBox.m_pObject )
              {
                v11 = (char *)TextData2::Get(0xE3E2319u);
                v12 = (NiD3DDefaultShader *)MsgBox::Modeless(MSGBOX_OK, v11);
                NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spMsgBox, v12);
                v13 = (int)&v2->vfptr;
                (**(void (__thiscall ***)(_DWORD, _DWORD))(*(_DWORD *)v10 + 232))(*(_DWORD *)v10 + 232, v13);
                v14 = TextData2::Get(0xE3E2319u);
                if ( *(_DWORD *)(v13 + 4) )
                {
                  (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v13 + 4) + 4))(25, v14, v13);
                  if ( *(_DWORD *)(v13 + 4) )
                    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v13 + 4) + 20))(25, v14, v13);
                }
                (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v13 + 20))(v13, 25, v14, v13);
              }
            }
            else
            {
              v15 = v2->m_iEnchantAddItemInvIdx;
              if ( v15 >= 0 && v15 < 192 )
              {
                v16 = &v2->m_spMsgBox.m_pObject;
                if ( !v2->m_spMsgBox.m_pObject )
                {
                  v17 = (char *)TextData2::Get(0x123B201Cu);
                  v18 = (NiD3DDefaultShader *)MsgBox::Modeless(MSGBOX_OKCANCEL, v17);
                  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spMsgBox, v18);
                  kOkMsg.m_uiFrameWParam = v2->m_iEnchantAddItemInvIdx;
                  kOkMsg.m_uiFrameMsg = 255;
                  kOkMsg.m_uiFramelParam = kFrom | 0x2000;
                  v19 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
                  MsgBox::SetFrameWorkMsgOnClose(*v16, v19, &kOkMsg, 0);
                  (*v16)->vfptr->SetMsgHooker(&(*v16)->vfptr, &v2->vfptr);
                }
              }
            }
          }
          break;
        case 9u:
          v22 = (GameFrameWork *)v2->m_pkFrameWork;
          v23 = TextData3::Get(0x99BEF7C3);
          GameFrameWork::AddSysMsg(v22, (const char *)v23);
          break;
        default:
          v2->m_kDropContents.m_eType = 0;
          v2->m_kDropContents.m_eSenderType = 1;
          v2->m_kDropContents.m_apvParam[1] = 0;
          v2->m_kDropContents.m_apvParam[0] = v4;
          v2->m_kDropContents.m_uiSenderIndex = uiInvIndex;
          v2->m_kDropContents.m_uiLot = ((int (__thiscall *)(_DWORD))v4->vfptr[3].__vecDelDtor)(v4);
          v2->m_kDrop.m_pkSender = (PgWin *)v2;
          PgCursor::ms_pkDrop = &v2->m_kDrop;
          SoundMgr::PlayItemPutSound(v4->m_kStruct.itemid);
          break;
      }
    }
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (0051D070) --------------------------------------------------------
void __thiscall InventoryWin::LockAllItem(InventoryWin *this)
{
  char *v1; // ecx@1
  int v2; // edi@2
  NiProperty *v3; // ebx@3
  NiRoom *v4; // eax@4
  NiRoom *v5; // esi@4
  NiProperty *v6; // esi@12
  NiRoom *v7; // eax@13
  NiProperty *v8; // eax@14
  bool v9; // zf@22
  NiPointer<NiRoom> element; // [sp+1Ch] [bp-18h]@4
  int v11; // [sp+20h] [bp-14h]@1
  char *v12; // [sp+24h] [bp-10h]@1
  int v13; // [sp+30h] [bp-4h]@4

  v1 = (char *)this->m_apkInvWin;
  v12 = v1;
  v11 = 192;
  do
  {
    v2 = *(_DWORD *)v1;
    if ( *(_BYTE *)(*(_DWORD *)v1 + 457) != 1 )
    {
      v3 = NiAVObject::GetProperty((NiAVObject *)v2, 9);
      if ( !v3 )
      {
        v4 = (NiRoom *)operator new(0x28u);
        v5 = v4;
        element.m_pObject = v4;
        v13 = 0;
        if ( v4 )
        {
          NiObjectNET::NiObjectNET((NiObjectNET *)&v4->vfptr);
          v5->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
          v5->m_uFlags = 0;
          v5->m_pkParent = 0;
          LODWORD(v5->m_kWorldBound.m_kCenter.x) = 1;
        }
        else
        {
          v5 = 0;
        }
        v3 = (NiProperty *)v5;
        element.m_pObject = v5;
        if ( v5 )
          InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
        v13 = 1;
        NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(v2 + 156),
          &element);
        v13 = -1;
        if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
      v6 = NiAVObject::GetProperty((NiAVObject *)v2, 3);
      if ( !v6 )
      {
        v7 = (NiRoom *)operator new(0x60u);
        element.m_pObject = v7;
        v13 = 2;
        if ( v7 )
        {
          NiMaterialProperty::NiMaterialProperty((NiMaterialProperty *)v7);
          v6 = v8;
        }
        else
        {
          v6 = 0;
        }
        element.m_pObject = (NiRoom *)v6;
        if ( v6 )
          InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
        v13 = 3;
        NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(v2 + 156),
          &element);
        v13 = -1;
        if ( v6 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
            v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
        }
      }
      *(_BYTE *)(v2 + 457) = 1;
      v3[1].m_uiRefCount = 0;
      v3[1].m_pcName = 0;
      ++v6[3].m_uiRefCount;
      *(float *)&v6[2].m_spControllers.m_pObject = 0.40000001;
      *(float *)&v6[2].m_ppkExtra = 0.40000001;
      *(float *)&v6[2].m_uiExtraDataSize = 0.40000001;
      NiAVObject::UpdateProperties((NiAVObject *)v2);
    }
    v1 = v12 + 4;
    v9 = v11-- == 1;
    v12 += 4;
  }
  while ( !v9 );
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);

//----- (0051D240) --------------------------------------------------------
void __thiscall InventoryWin::UnLockAllItem(InventoryWin *this)
{
  char *v1; // ecx@1
  int v2; // edi@2
  NiProperty *v3; // ebx@3
  NiRoom *v4; // eax@4
  NiRoom *v5; // esi@4
  NiProperty *v6; // esi@12
  NiRoom *v7; // eax@13
  NiProperty *v8; // eax@14
  bool v9; // zf@22
  NiPointer<NiRoom> element; // [sp+1Ch] [bp-18h]@4
  int v11; // [sp+20h] [bp-14h]@1
  char *v12; // [sp+24h] [bp-10h]@1
  int v13; // [sp+30h] [bp-4h]@4

  v1 = (char *)this->m_apkInvWin;
  v12 = v1;
  v11 = 192;
  do
  {
    v2 = *(_DWORD *)v1;
    if ( *(_BYTE *)(*(_DWORD *)v1 + 457) )
    {
      v3 = NiAVObject::GetProperty((NiAVObject *)v2, 9);
      if ( !v3 )
      {
        v4 = (NiRoom *)operator new(0x28u);
        v5 = v4;
        element.m_pObject = v4;
        v13 = 0;
        if ( v4 )
        {
          NiObjectNET::NiObjectNET((NiObjectNET *)&v4->vfptr);
          v5->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
          v5->m_uFlags = 0;
          v5->m_pkParent = 0;
          LODWORD(v5->m_kWorldBound.m_kCenter.x) = 1;
        }
        else
        {
          v5 = 0;
        }
        v3 = (NiProperty *)v5;
        element.m_pObject = v5;
        if ( v5 )
          InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
        v13 = 1;
        NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(v2 + 156),
          &element);
        v13 = -1;
        if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
      v6 = NiAVObject::GetProperty((NiAVObject *)v2, 3);
      if ( !v6 )
      {
        v7 = (NiRoom *)operator new(0x60u);
        element.m_pObject = v7;
        v13 = 2;
        if ( v7 )
        {
          NiMaterialProperty::NiMaterialProperty((NiMaterialProperty *)v7);
          v6 = v8;
        }
        else
        {
          v6 = 0;
        }
        element.m_pObject = (NiRoom *)v6;
        if ( v6 )
          InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
        v13 = 3;
        NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(v2 + 156),
          &element);
        v13 = -1;
        if ( v6 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
            v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
        }
      }
      *(_BYTE *)(v2 + 457) = 0;
      v3[1].m_uiRefCount = 0;
      v3[1].m_pcName = 0;
      ++v6[3].m_uiRefCount;
      *(float *)&v6[2].m_spControllers.m_pObject = 1.0;
      *(float *)&v6[2].m_ppkExtra = 1.0;
      *(float *)&v6[2].m_uiExtraDataSize = 1.0;
      NiAVObject::UpdateProperties((NiAVObject *)v2);
    }
    v1 = v12 + 4;
    v9 = v11-- == 1;
    v12 += 4;
  }
  while ( !v9 );
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);

//----- (0051D400) --------------------------------------------------------
void __thiscall InventoryWin::LockAllEquipItem(InventoryWin *this)
{
  char *v1; // ecx@1
  int v2; // edi@2
  NiProperty *v3; // ebx@4
  NiRoom *v4; // eax@5
  NiRoom *v5; // esi@5
  NiProperty *v6; // esi@13
  NiRoom *v7; // eax@14
  NiProperty *v8; // eax@15
  bool v9; // zf@23
  NiPointer<NiRoom> element; // [sp+1Ch] [bp-18h]@5
  int v11; // [sp+20h] [bp-14h]@1
  char *v12; // [sp+24h] [bp-10h]@1
  int v13; // [sp+30h] [bp-4h]@5

  v1 = (char *)this->m_apkEquipWin;
  v12 = v1;
  v11 = 30;
  do
  {
    v2 = *(_DWORD *)v1;
    if ( *(_DWORD *)v1 && *(_BYTE *)(v2 + 457) != 1 )
    {
      v3 = NiAVObject::GetProperty((NiAVObject *)v2, 9);
      if ( !v3 )
      {
        v4 = (NiRoom *)operator new(0x28u);
        v5 = v4;
        element.m_pObject = v4;
        v13 = 0;
        if ( v4 )
        {
          NiObjectNET::NiObjectNET((NiObjectNET *)&v4->vfptr);
          v5->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
          v5->m_uFlags = 0;
          v5->m_pkParent = 0;
          LODWORD(v5->m_kWorldBound.m_kCenter.x) = 1;
        }
        else
        {
          v5 = 0;
        }
        v3 = (NiProperty *)v5;
        element.m_pObject = v5;
        if ( v5 )
          InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
        v13 = 1;
        NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(v2 + 156),
          &element);
        v13 = -1;
        if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
      v6 = NiAVObject::GetProperty((NiAVObject *)v2, 3);
      if ( !v6 )
      {
        v7 = (NiRoom *)operator new(0x60u);
        element.m_pObject = v7;
        v13 = 2;
        if ( v7 )
        {
          NiMaterialProperty::NiMaterialProperty((NiMaterialProperty *)v7);
          v6 = v8;
        }
        else
        {
          v6 = 0;
        }
        element.m_pObject = (NiRoom *)v6;
        if ( v6 )
          InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
        v13 = 3;
        NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(v2 + 156),
          &element);
        v13 = -1;
        if ( v6 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
            v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
        }
      }
      *(_BYTE *)(v2 + 457) = 1;
      v3[1].m_uiRefCount = 0;
      v3[1].m_pcName = 0;
      ++v6[3].m_uiRefCount;
      *(float *)&v6[2].m_spControllers.m_pObject = 0.40000001;
      *(float *)&v6[2].m_ppkExtra = 0.40000001;
      *(float *)&v6[2].m_uiExtraDataSize = 0.40000001;
      NiAVObject::UpdateProperties((NiAVObject *)v2);
    }
    v1 = v12 + 4;
    v9 = v11-- == 1;
    v12 += 4;
  }
  while ( !v9 );
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);

//----- (0051D5D0) --------------------------------------------------------
void __thiscall InventoryWin::UnLockAllEquipItem(InventoryWin *this)
{
  char *v1; // ecx@1
  int v2; // edi@2
  NiProperty *v3; // ebx@4
  NiRoom *v4; // eax@5
  NiRoom *v5; // esi@5
  NiProperty *v6; // esi@13
  NiRoom *v7; // eax@14
  NiProperty *v8; // eax@15
  bool v9; // zf@23
  NiPointer<NiRoom> element; // [sp+1Ch] [bp-18h]@5
  int v11; // [sp+20h] [bp-14h]@1
  char *v12; // [sp+24h] [bp-10h]@1
  int v13; // [sp+30h] [bp-4h]@5

  v1 = (char *)this->m_apkEquipWin;
  v12 = v1;
  v11 = 30;
  do
  {
    v2 = *(_DWORD *)v1;
    if ( *(_DWORD *)v1 && *(_BYTE *)(v2 + 457) )
    {
      v3 = NiAVObject::GetProperty((NiAVObject *)v2, 9);
      if ( !v3 )
      {
        v4 = (NiRoom *)operator new(0x28u);
        v5 = v4;
        element.m_pObject = v4;
        v13 = 0;
        if ( v4 )
        {
          NiObjectNET::NiObjectNET((NiObjectNET *)&v4->vfptr);
          v5->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
          v5->m_uFlags = 0;
          v5->m_pkParent = 0;
          LODWORD(v5->m_kWorldBound.m_kCenter.x) = 1;
        }
        else
        {
          v5 = 0;
        }
        v3 = (NiProperty *)v5;
        element.m_pObject = v5;
        if ( v5 )
          InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
        v13 = 1;
        NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(v2 + 156),
          &element);
        v13 = -1;
        if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
      v6 = NiAVObject::GetProperty((NiAVObject *)v2, 3);
      if ( !v6 )
      {
        v7 = (NiRoom *)operator new(0x60u);
        element.m_pObject = v7;
        v13 = 2;
        if ( v7 )
        {
          NiMaterialProperty::NiMaterialProperty((NiMaterialProperty *)v7);
          v6 = v8;
        }
        else
        {
          v6 = 0;
        }
        element.m_pObject = (NiRoom *)v6;
        if ( v6 )
          InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
        v13 = 3;
        NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(v2 + 156),
          &element);
        v13 = -1;
        if ( v6 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
            v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
        }
      }
      *(_BYTE *)(v2 + 457) = 0;
      v3[1].m_uiRefCount = 0;
      v3[1].m_pcName = 0;
      ++v6[3].m_uiRefCount;
      *(float *)&v6[2].m_spControllers.m_pObject = 1.0;
      *(float *)&v6[2].m_ppkExtra = 1.0;
      *(float *)&v6[2].m_uiExtraDataSize = 1.0;
      NiAVObject::UpdateProperties((NiAVObject *)v2);
    }
    v1 = v12 + 4;
    v9 = v11-- == 1;
    v12 += 4;
  }
  while ( !v9 );
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);

//----- (0051D7A0) --------------------------------------------------------
void __thiscall InventoryWin::OnCreateNewSocket(InventoryWin *this, bool bSucss)
{
  InventoryWin *v2; // esi@1
  signed int v3; // eax@3
  PgWin *v4; // eax@8
  MsgBox *v5; // edi@9
  ITEM_INVEN kInven; // [sp+4h] [bp-4h]@2

  v2 = this;
  if ( unk_B25350 )
  {
    if ( Inventory::FindEnchantSoketAdd(&g_kInventory, &kInven) )
    {
      v3 = v2->m_iEnchantAddItemInvIdx;
      if ( v3 >= 0 && v3 < 192 )
        InvWin::SetLock(v2->m_apkInvWin[v3], 0);
    }
    if ( InventoryWin::ms_uiMode == 7 )
      InventoryWin::ms_uiMode = 0;
  }
  unk_B25350 = 0;
  v4 = (PgWin *)&v2->m_spMsgBox.m_pObject->vfptr;
  if ( v4 )
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, v4);
    v5 = v2->m_spMsgBox.m_pObject;
    if ( v5 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      v2->m_spMsgBox.m_pObject = 0;
    }
  }
  if ( v2->m_iEnchantAddItemInvIdx > 0 )
    v2->m_iEnchantAddItemInvIdx = -1;
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (0051D860) --------------------------------------------------------
InvWin *__cdecl InvWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent)
{
  PgWin *v4; // eax@1
  PgWin *v5; // eax@2
  PgWin *v6; // esi@2
  PgWin *v7; // edi@8
  InvWin *v8; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v10; // [sp+20h] [bp-4h]@1

  v4 = (PgWin *)operator new(0x1D4u);
  result.m_pObject = v4;
  v10 = 0;
  if ( v4 )
  {
    InvWin::InvWin((InvWin *)v4);
    v6 = v5;
  }
  else
  {
    v6 = 0;
  }
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v10 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v6);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, PgWin *))v6->vfptr[155].__vecDelDtor)(
                          v6,
                          iXPos,
                          iYPos,
                          uiInvIndex,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v6->vfptr[89].__vecDelDtor)(v6);
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = (InvWin *)v6;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v6);
    if ( result.m_pObject )
    {
      v7 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      }
    }
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = 0;
  }
  return v8;
}

//----- (0051D9A0) --------------------------------------------------------
InvTabButWin *__cdecl InvTabButWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg)
{
  PgWin *v5; // eax@1
  PgWin *v6; // esi@1
  PgWin *v7; // edi@8
  InvTabButWin *v8; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v10; // [sp+20h] [bp-4h]@1

  v5 = (PgWin *)operator new(0x144u);
  v6 = v5;
  result.m_pObject = v5;
  v10 = 0;
  if ( v5 )
  {
    PgWinBut::PgWinBut((PgWinBut *)v5);
    v6->vfptr = (NiRefObjectVtbl *)&InvTabButWin::`vftable'{for `NiNode'};
    v6->vfptr = (IDirectMessengerVtbl *)&InvTabButWin::`vftable'{for `IDirectMessenger'};
    v6->m_bDroppable = 1;
  }
  else
  {
    v6 = 0;
  }
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v10 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v6);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgSprData *, PgWin *, unsigned int))v6->vfptr[140].__vecDelDtor)(
                          v6,
                          iXPos,
                          iYPos,
                          pkSprData,
                          pkParent,
                          uiCmdMsg) )
  {
    ((void (__thiscall *)(PgWin *))v6->vfptr[89].__vecDelDtor)(v6);
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = (InvTabButWin *)v6;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v6);
    if ( result.m_pObject )
    {
      v7 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      }
    }
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = 0;
  }
  return v8;
}
// 98F14C: using guessed type void (__thiscall *InvTabButWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98F16C: using guessed type int (__thiscall *InvTabButWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0051DB00) --------------------------------------------------------
ChargedItemIcon *__cdecl ChargedItemIcon::CreateWin(int iXPos, int iYPos, PgWin *pkParent)
{
  PgWin *v3; // eax@1
  PgWin *v4; // esi@1
  PgWin *v5; // edi@8
  ChargedItemIcon *v6; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x1C4u);
  v4 = v3;
  result.m_pObject = v3;
  v8 = 0;
  if ( v3 )
  {
    ItemIcon::ItemIcon((ItemIcon *)v3);
    v4->vfptr = (NiRefObjectVtbl *)&ChargedItemIcon::`vftable'{for `NiNode'};
    v4->vfptr = (IDirectMessengerVtbl *)&ChargedItemIcon::`vftable'{for `IDirectMessenger'};
    v4[1].m_kPropertyList.m_pkHead = (NiTListItem<NiPointer<NiProperty> > *)-1;
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v8 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v4);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgWin *))v4->vfptr[153].__vecDelDtor)(
                          v4,
                          iXPos,
                          iYPos,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v4->vfptr[89].__vecDelDtor)(v4);
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = (ChargedItemIcon *)v4;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v4);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = 0;
  }
  return v6;
}
// 98F3A4: using guessed type void (__thiscall *ChargedItemIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98F3C4: using guessed type int (__thiscall *ChargedItemIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (0051DC50) --------------------------------------------------------
ChargedItemInvenWin *__cdecl ChargedItemInvenWin::CreateWin()
{
  PgWin *v0; // eax@1
  PgWin *v1; // eax@2
  PgWin *v2; // esi@2
  PgWin *v3; // edi@8
  ChargedItemInvenWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v0 = (PgWin *)operator new(0x188u);
  result.m_pObject = v0;
  v6 = 0;
  if ( v0 )
  {
    ChargedItemInvenWin::ChargedItemInvenWin((ChargedItemInvenWin *)v0);
    v2 = v1;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *))v2->vfptr[113].__vecDelDtor)(v2) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (ChargedItemInvenWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}

//----- (0051DD80) --------------------------------------------------------
char __thiscall ChargedItemInvenWin::Create(ChargedItemInvenWin *this)
{
  ChargedItemInvenWin *v1; // edi@1
  char result; // al@2
  NiTexturePalette *v3; // esi@3
  const char *v4; // eax@5
  signed int v5; // ebx@6
  IconWin **v6; // esi@6
  ChargedItemIcon *v7; // eax@7
  IconWin *v8; // eax@7
  bool v9; // zf@7
  PgSprData *v10; // esi@8
  PgSprData *v11; // esi@8
  NiSourceTexture *v12; // esi@8
  PgSprData *v13; // esi@9
  PgSprData *v14; // esi@10
  NiPointer<PgSprData::PgHitTester> *v15; // ecx@10
  unsigned int v16; // esi@10
  unsigned int v17; // ebx@10
  PgFont *v18; // eax@10
  PgWinText *v19; // eax@10
  NiNode *v20; // esi@11
  unsigned int uiWidth; // [sp+10h] [bp-70h]@6
  unsigned int uiHeight; // [sp+14h] [bp-6Ch]@6
  int v23; // [sp+18h] [bp-68h]@6
  int iOffY; // [sp+1Ch] [bp-64h]@6
  int iOffX; // [sp+20h] [bp-60h]@6
  int iLeft; // [sp+24h] [bp-5Ch]@7
  int iTop; // [sp+28h] [bp-58h]@7
  NiPointer<NiNode> spNode; // [sp+2Ch] [bp-54h]@3
  char acShapeName[64]; // [sp+30h] [bp-50h]@7
  int v30; // [sp+7Ch] [bp-4h]@3

  v1 = this;
  if ( !PgWin::Create((PgWin *)&this->vfptr, 0, 0, 1u, 1u, 0, "ChargedItemInvenWin", 0) )
    goto LABEL_17;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v30 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\ChrInv.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( spNode.m_pObject )
  {
    PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iOffX, &iOffY, &uiWidth, &uiHeight);
    v5 = 4;
    v6 = (IconWin **)v1->m_apkItemIcon;
    v23 = 24;
    do
    {
      sprintf(acShapeName, "InvItemSlot%03d", v5 - 3);
      PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &iLeft, &iTop, &uiWidth, &uiHeight);
      v7 = ChargedItemIcon::CreateWin(iLeft - iOffX + 1, iTop - iOffY + 1, (PgWin *)&v1->vfptr);
      *v6 = (IconWin *)v7;
      ItemIcon::SetItem((ItemIcon *)&v7->vfptr, 0, 1);
      ((void (__stdcall *)(signed int))(*v6)->vfptr[140].__vecDelDtor)(v5);
      (*v6)->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
      IconWin::ShowFocus(*v6, 1);
      v8 = *v6;
      ++v6;
      ++v5;
      v9 = v23-- == 1;
      v8->m_bDroppable = 0;
    }
    while ( !v9 );
    v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PrePageNor", &iLeft, &iTop, 0);
    PgSprData::Add(v10, (NiAVObject *)&spNode.m_pObject->vfptr, "PrePageClick");
    PgSprData::Add(v10, (NiAVObject *)&spNode.m_pObject->vfptr, "PrePageOver");
    PgWinBut::CreateWin(iLeft - iOffX, iTop - iOffY, v10, (PgWin *)&v1->vfptr, 1u, 0, 0);
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NextPageNor", &iLeft, &iTop, 0);
    PgSprData::Add(v11, (NiAVObject *)&spNode.m_pObject->vfptr, "NextPageClick");
    PgSprData::Add(v11, (NiAVObject *)&spNode.m_pObject->vfptr, "NextPageOver");
    PgWinBut::CreateWin(iLeft - iOffX, iTop - iOffY, v11, (PgWin *)&v1->vfptr, 2u, 0, 0);
    v12 = MenuTexMgr::GetTexture(4u);
    if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
    {
      v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &iLeft, &iTop, v12);
      PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
      PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
      PgWinBut::CreateWin(iLeft - iOffX, iTop - iOffY, v13, (PgWin *)&v1->vfptr, 3u, 0, 0);
    }
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PageNum", &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft - iOffX, iTop - iOffY, v14, (PgWin *)&v1->vfptr, 0, 0);
    v15 = v14->m_akHitTester.m_pBase;
    v16 = v15->m_pObject->m_uiHeight;
    v17 = v15->m_pObject->m_uiWidth;
    v18 = Font::Get(SMALL);
    v19 = PgWinText::CreateWin(iLeft - iOffX - 2, iTop - iOffY + 2, v17, v16, v18, (PgWin *)&v1->vfptr, 0, 0);
    v1->m_pkPageNumText = v19;
    v19->vfptr[122].__vecDelDtor((NiRefObject *)v19, 2u);
    ((void (__stdcall *)(const char *))v1->m_pkPageNumText->vfptr[118].__vecDelDtor)("0");
    ((void (__stdcall *)(_DWORD))v1->m_pkPageNumText->vfptr[60].__vecDelDtor)(0);
    v1->m_bDroppable = 0;
    v1->m_uiCurrPage = 0;
    ChargedItemInvenWin::Refresh(v1);
    v30 = -1;
    if ( spNode.m_pObject )
    {
      v20 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v20 )
          v20->vfptr->__vecDelDtor((NiRefObject *)v20, 1u);
      }
    }
    result = 1;
  }
  else
  {
LABEL_17:
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0051E110) --------------------------------------------------------
CompensationItemIcon *__cdecl CompensationItemIcon::CreateWin(int iXPos, int iYPos, PgWin *pkParent)
{
  PgWin *v3; // eax@1
  PgWin *v4; // eax@2
  PgWin *v5; // esi@2
  PgWin *v6; // edi@8
  CompensationItemIcon *v7; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x220u);
  result.m_pObject = v3;
  v9 = 0;
  if ( v3 )
  {
    CompensationItemIcon::CompensationItemIcon((CompensationItemIcon *)v3);
    v5 = v4;
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v9 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v5);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgWin *))v5->vfptr[153].__vecDelDtor)(
                          v5,
                          iXPos,
                          iYPos,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v5->vfptr[89].__vecDelDtor)(v5);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = (CompensationItemIcon *)v5;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v5);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = 0;
  }
  return v7;
}

//----- (0051E250) --------------------------------------------------------
CompensationInvWin *__cdecl CompensationInvWin::CreateWin()
{
  PgWin *v0; // eax@1
  PgWin *v1; // eax@2
  PgWin *v2; // esi@2
  PgWin *v3; // edi@8
  CompensationInvWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v0 = (PgWin *)operator new(0x188u);
  result.m_pObject = v0;
  v6 = 0;
  if ( v0 )
  {
    CompensationInvWin::CompensationInvWin((CompensationInvWin *)v0);
    v2 = v1;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *))v2->vfptr[113].__vecDelDtor)(v2) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (CompensationInvWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}

//----- (0051E380) --------------------------------------------------------
char __thiscall CompensationInvWin::Create(CompensationInvWin *this)
{
  int v1; // ebx@1
  CompensationInvWin *v2; // edi@1
  char result; // al@2
  NiTexturePalette *v4; // esi@3
  const char *v5; // eax@5
  IconWin **v6; // esi@6
  CompensationItemIcon *v7; // eax@7
  PgSprData *v8; // esi@8
  PgSprData *v9; // esi@8
  NiSourceTexture *v10; // esi@8
  PgSprData *v11; // esi@9
  PgSprData *v12; // esi@10
  NiPointer<PgSprData::PgHitTester> *v13; // ecx@10
  unsigned int v14; // esi@10
  unsigned int v15; // ebx@10
  PgFont *v16; // eax@10
  PgWinText *v17; // eax@10
  NiNode *v18; // eax@10
  NiNode *v19; // esi@11
  unsigned int uiHeight; // [sp+10h] [bp-70h]@6
  int v21; // [sp+14h] [bp-6Ch]@7
  unsigned int uiWidth; // [sp+18h] [bp-68h]@6
  int iOffY; // [sp+1Ch] [bp-64h]@6
  int iOffX; // [sp+20h] [bp-60h]@6
  int iLeft; // [sp+24h] [bp-5Ch]@7
  int iTop; // [sp+28h] [bp-58h]@7
  NiPointer<NiNode> spNode; // [sp+2Ch] [bp-54h]@3
  char acShapeName[64]; // [sp+30h] [bp-50h]@7
  int v29; // [sp+7Ch] [bp-4h]@3

  v1 = 0;
  v2 = this;
  if ( !PgWin::Create((PgWin *)&this->vfptr, 0, 0, 1u, 1u, 0, "CompensationInvWin", 0) )
    goto LABEL_17;
  spNode.m_pObject = 0;
  v4 = pTexturePalette;
  v29 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "Game\\ChrInv.nif");
  PgUtil::LoadNodeNifFile(v5, &spNode, v4);
  if ( spNode.m_pObject )
  {
    PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iOffX, &iOffY, &uiWidth, &uiHeight);
    v6 = (IconWin **)v2->m_apkItemIcon;
    do
    {
      v21 = v1 + 1;
      sprintf(acShapeName, "InvItemSlot%03d", v1 + 1);
      PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &iLeft, &iTop, &uiWidth, &uiHeight);
      v7 = CompensationItemIcon::CreateWin(iLeft - iOffX + 1, iTop - iOffY + 1, (PgWin *)&v2->vfptr);
      *v6 = (IconWin *)v7;
      ItemIcon::SetItem((ItemIcon *)&v7->vfptr, 0, 1);
      ((void (__stdcall *)(signed int))(*v6)->vfptr[140].__vecDelDtor)(5);
      (*v6)->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
      IconWin::ShowFocus(*v6, 1);
      (*v6)->m_bDroppable = 0;
      LODWORD((*v6)[1].m_kLocal.m_Rotate.m_pEntry[1][2]) = v1;
      v1 = v21;
      ++v6;
    }
    while ( v21 < 24 );
    v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PrePageNor", &iLeft, &iTop, 0);
    PgSprData::Add(v8, (NiAVObject *)&spNode.m_pObject->vfptr, "PrePageClick");
    PgSprData::Add(v8, (NiAVObject *)&spNode.m_pObject->vfptr, "PrePageOver");
    PgWinBut::CreateWin(iLeft - iOffX, iTop - iOffY, v8, (PgWin *)&v2->vfptr, 1u, 0, 0);
    v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NextPageNor", &iLeft, &iTop, 0);
    PgSprData::Add(v9, (NiAVObject *)&spNode.m_pObject->vfptr, "NextPageClick");
    PgSprData::Add(v9, (NiAVObject *)&spNode.m_pObject->vfptr, "NextPageOver");
    PgWinBut::CreateWin(iLeft - iOffX, iTop - iOffY, v9, (PgWin *)&v2->vfptr, 2u, 0, 0);
    v10 = MenuTexMgr::GetTexture(4u);
    if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
    {
      v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &iLeft, &iTop, v10);
      PgSprData::Add(v11, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
      PgSprData::Add(v11, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
      PgWinBut::CreateWin(iLeft - iOffX, iTop - iOffY, v11, (PgWin *)&v2->vfptr, 3u, 0, 0);
    }
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PageNum", &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft - iOffX, iTop - iOffY, v12, (PgWin *)&v2->vfptr, 0, 0);
    v13 = v12->m_akHitTester.m_pBase;
    v14 = v13->m_pObject->m_uiHeight;
    v15 = v13->m_pObject->m_uiWidth;
    v16 = Font::Get(SMALL);
    v17 = PgWinText::CreateWin(iLeft - iOffX - 2, iTop - iOffY + 2, v15, v14, v16, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkPageNumText = v17;
    v17->vfptr[122].__vecDelDtor((NiRefObject *)v17, 2u);
    ((void (__stdcall *)(const char *))v2->m_pkPageNumText->vfptr[118].__vecDelDtor)("1");
    ((void (__stdcall *)(_DWORD))v2->m_pkPageNumText->vfptr[60].__vecDelDtor)(0);
    v18 = spNode.m_pObject;
    v2->m_bDroppable = 0;
    v2->m_uiCurrPage = 0;
    v29 = -1;
    if ( v18 )
    {
      v19 = v18;
      if ( !InterlockedDecrement((volatile LONG *)&v18->m_uiRefCount) )
      {
        if ( v19 )
          v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
      }
    }
    result = 1;
  }
  else
  {
LABEL_17:
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0051E700) --------------------------------------------------------
InventoryWin *__cdecl InventoryWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  InventoryWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0xA08u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    InventoryWin::InventoryWin((InventoryWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (InventoryWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (0051E830) --------------------------------------------------------
char __thiscall InventoryWin::Create(InventoryWin *this, PgFrameWork *pkFrameWork)
{
  InventoryWin *v2; // ebx@1
  const char *v3; // eax@3
  NiObjectNET *v4; // eax@3
  NiNode *v5; // esi@3
  NiNode *v6; // edi@3
  NiTexturePalette *v7; // esi@10
  const char *v8; // eax@12
  PgSprData *v9; // eax@13
  NiNode *v10; // esi@14
  char result; // al@18
  int v12; // esi@19
  int v13; // edi@19
  PgSprData *v14; // eax@20
  PgSprData *v15; // eax@22
  PgWinSpr *v16; // eax@22
  NiNode *v17; // edx@22
  PgSprData *v18; // eax@22
  PgWinBut *v19; // eax@22
  int v20; // ecx@22
  PgWinBut *v21; // eax@27
  PgSprData *v22; // eax@29
  PgSprData *v23; // eax@29
  PgSprData *v24; // eax@29
  PgWinSpr *v25; // eax@29
  bool v26; // zf@29
  PgSprData *v27; // eax@30
  PgSprData *v28; // eax@32
  PgWinSpr *v29; // eax@32
  NiNode *v30; // edx@32
  PgSprData *v31; // eax@32
  NiSourceTexture *v32; // eax@32
  NiRefObjectVtbl *v33; // edx@32
  PgFont *v34; // eax@35
  PgWinText *v35; // eax@35
  NiRefObjectVtbl *v36; // edx@35
  NiUnsharedGeometryGroup *v37; // eax@35
  PgSprData *v38; // eax@35
  InvTabButWin *v39; // eax@35
  PgSprData *v40; // eax@35
  PgWinSpr *v41; // eax@35
  PgSprData *v42; // eax@35
  PgWinSpr *v43; // eax@35
  PgSprData *v44; // eax@35
  InvTabButWin *v45; // eax@35
  PgSprData *v46; // eax@35
  PgWinSpr *v47; // eax@35
  PgSprData *v48; // eax@35
  PgWinSpr *v49; // eax@35
  PgSprData *v50; // eax@35
  InvTabButWin *v51; // eax@35
  PgSprData *v52; // eax@35
  PgWinSpr *v53; // eax@35
  PgSprData *v54; // eax@35
  PgWinSpr *v55; // eax@35
  PgSprData *v56; // eax@35
  InvTabButWin *v57; // eax@35
  PgSprData *v58; // eax@35
  PgWinSpr *v59; // eax@35
  PgSprData *v60; // eax@35
  PgWinSpr *v61; // eax@35
  PgSprData *v62; // eax@35
  InvTabButWin *v63; // eax@35
  PgSprData *v64; // eax@35
  PgWinSpr *v65; // eax@35
  PgSprData *v66; // eax@35
  PgWinSpr *v67; // eax@35
  PgSprData *v68; // eax@35
  InvTabButWin *v69; // eax@35
  PgSprData *v70; // eax@35
  PgWinSpr *v71; // eax@35
  PgSprData *v72; // eax@35
  PgWinSpr *v73; // eax@35
  PgSprData *v74; // eax@35
  InvTabButWin *v75; // eax@35
  char *v76; // eax@35
  PgSprData *v77; // eax@35
  PgWinSpr *v78; // eax@35
  PgSprData *v79; // eax@35
  PgWinSpr *v80; // eax@35
  PgSprData *v81; // eax@35
  PgWinSpr *v82; // eax@35
  PgSprData *v83; // eax@35
  char *v84; // eax@35
  PgSprData *v85; // eax@35
  PgWinSpr *v86; // eax@35
  PgSprData *v87; // eax@35
  PgWinSpr *v88; // eax@35
  PgSprData *v89; // eax@35
  PgWinSpr *v90; // eax@35
  PgSprData *v91; // eax@35
  PgSprData *v92; // eax@36
  unsigned int v93; // eax@37
  InvWin *v94; // eax@38
  int v95; // eax@38
  PgSprData *v96; // eax@41
  PgWinSpr *v97; // eax@41
  PgWinBut *v98; // ecx@41
  NiSourceTexture *v99; // edx@41
  InvWin *v100; // eax@42
  IconWin **v101; // eax@42
  PgSprData *v102; // eax@44
  PgWinSpr *v103; // eax@44
  char *v104; // eax@44
  PgSprData *v105; // eax@44
  PgWinSpr *v106; // eax@44
  int v107; // edx@44
  int v108; // eax@44
  int v109; // edx@44
  PgFont *v110; // eax@44
  PgWinText *v111; // eax@44
  PgSprData *v112; // eax@44
  PgWinSpr *v113; // eax@44
  char *v114; // eax@44
  int v115; // ecx@44
  int v116; // eax@44
  PgFont *v117; // eax@44
  PgWinText *v118; // eax@44
  PgSprData *v119; // eax@44
  PgWinSpr *v120; // eax@44
  char *v121; // eax@44
  int v122; // ecx@44
  int v123; // eax@44
  PgFont *v124; // eax@44
  PgWinText *v125; // eax@44
  PgSprData *v126; // eax@44
  PgWinSpr *v127; // eax@44
  char *v128; // eax@44
  int v129; // ecx@44
  int v130; // eax@44
  PgFont *v131; // eax@44
  PgWinText *v132; // eax@44
  PgWinBut *v133; // eax@44
  char *v134; // eax@44
  PgSprData *v135; // eax@44
  PgWinBut *v136; // eax@44
  char *v137; // eax@44
  PgSprData *v138; // eax@44
  PgWinSpr *v139; // eax@44
  PgSprData *v140; // eax@44
  PgWinSpr *v141; // eax@44
  ChargedItemInvenWin *v142; // eax@44
  NiRTTI *v143; // eax@45
  CompensationInvWin *v144; // eax@50
  NiRTTI *v145; // eax@51
  PgWinBut *v146; // eax@56
  char *v147; // eax@56
  int v148; // ecx@56
  int v149; // eax@61
  PgSprData *v150; // eax@63
  PgWinSpr *v151; // eax@63
  char *v152; // eax@63
  PgWinBut *v153; // eax@63
  PgSprData *v154; // eax@63
  PgWinBut *v155; // eax@63
  PgWinBut *v156; // eax@63
  char *v157; // eax@63
  PgSprData *v158; // eax@63
  PgWinBut *v159; // eax@63
  char *v160; // eax@63
  PgSprData *v161; // eax@63
  InvTabButWin *v162; // eax@63
  PgSprData *v163; // eax@63
  PgWinSpr *v164; // eax@63
  PgSprData *v165; // eax@63
  PgWinSpr *v166; // eax@63
  PgSprData *v167; // eax@63
  InvTabButWin *v168; // eax@63
  PgSprData *v169; // eax@63
  PgWinSpr *v170; // eax@63
  PgSprData *v171; // eax@63
  PgWinSpr *v172; // eax@63
  NiTexturePalette *v173; // eax@63
  PgSprData *v174; // eax@64
  NiRefObjectVtbl *v175; // eax@64
  PgWinBut *v176; // eax@65
  NiNode *v177; // esi@66
  int v178; // eax@73
  char v179; // cl@74
  char *v180; // edi@75
  char v181; // al@76
  _WORD *v182; // edi@77
  NiTexturePalette *v183; // ST174_4@77
  int v184; // edi@77
  NiTexturePalette *v185; // esi@77
  NiNode *v186; // eax@78
  SpEffect *v187; // eax@78
  PgWinBut *v188; // ecx@80
  NiNode *v189; // esi@80
  float v190; // edx@80
  PgWinSpr *v191; // ecx@80
  int (*v192)(void); // eax@80
  int (*v193)(void); // eax@80
  double v194; // st7@80
  double v195; // st7@80
  NiTexturePalette *v196; // esi@80
  int v197; // eax@82
  char v198; // cl@83
  char *v199; // eax@84
  char v200; // cl@85
  NiTexturePalette *v201; // esi@86
  NiNode *v202; // eax@87
  SpEffect *v203; // eax@87
  NiNode *v204; // ecx@89
  NiNode *v205; // esi@89
  float v206; // edx@89
  PgWinSpr *v207; // ecx@89
  int (*v208)(void); // eax@89
  int (*v209)(void); // eax@89
  double v210; // st7@89
  double v211; // st7@89
  NiNode *v212; // esi@90
  NiNode *v213; // esi@93
  unsigned int uiHeight; // [sp+188h] [bp-DCh]@34
  unsigned int uiWidth; // [sp+18Ch] [bp-D8h]@34
  NiPoint3 EffectPos; // [sp+190h] [bp-D4h]@80
  NiPointer<NiNode> pkNiNodePtr; // [sp+19Ch] [bp-C8h]@71
  NiSourceTexture *pkSkinTexture; // [sp+1A0h] [bp-C4h]@19
  PgWinBut *pkBut; // [sp+1A4h] [bp-C0h]@22
  float v220; // [sp+1A8h] [bp-BCh]@80
  double v221; // [sp+1ACh] [bp-B8h]@1
  NiTexturePalette *pTexturePalette; // [sp+1B4h] [bp-B0h]@41
  int i; // [sp+1B8h] [bp-ACh]@22
  NiPointer<NiNode> spNode; // [sp+1BCh] [bp-A8h]@1
  int uiTop; // [sp+1C0h] [bp-A4h]@13
  int uiLeft; // [sp+1C4h] [bp-A0h]@13
  unsigned int auiEquipPos[26]; // [sp+1C8h] [bp-9Ch]@35
  char acShapeName[33]; // [sp+230h] [bp-34h]@36
  int v229; // [sp+260h] [bp-4h]@1

  HIDWORD(v221) = pkFrameWork;
  v2 = this;
  spNode.m_pObject = 0;
  v229 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v3 = Folder::Merge(&Folder::m_acEffect, "PutOnClear.nif");
  v4 = Ns_LoadNifFile(v3, 0);
  v5 = v2->m_spEffect.m_pObject;
  v6 = (NiNode *)v4;
  if ( (NiObjectNET *)v5 != v4 )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v2->m_spEffect.m_pObject = v6;
    if ( v6 )
      InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  }
  NsEffect::SetEffectNode(&v2->m_kEffect, (NiAVObject *)&v2->m_spEffect.m_pObject->vfptr);
  v7 = ::pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "Game\\ChrInv.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, (PgFrameWork *)HIDWORD(v221), "InventoryWin", 0) )
    goto LABEL_100;
  v12 = uiLeft;
  v13 = uiTop;
  pkSkinTexture = MenuTexMgr::GetTexture(0x13u);
  if ( pkSkinTexture )
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, pkSkinTexture);
  else
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  v2->m_pkInvenTheme = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v14, (PgWin *)&v2->vfptr, 0, 0);
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  v16 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v15, (PgWin *)&v2->vfptr, 0, 0);
  v17 = spNode.m_pObject;
  v2->m_pkInvPanel = v16;
  v18 = PgSprData::Create((NiAVObject *)&v17->vfptr, "Panel02", &uiLeft, &uiTop, 0);
  v19 = (PgWinBut *)PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v18, (PgWin *)&v2->vfptr, 0, 0);
  v20 = (int)v2->m_pRunArrangeInvenEff.m_pObject;
  pkBut = v19;
  i = v20;
  if ( (PgWinBut *)v20 != v19 )
  {
    if ( v20 && !InterlockedDecrement((volatile LONG *)(v20 + 4)) && i )
      (**(void (__stdcall ***)(_DWORD))i)(1);
    v21 = pkBut;
    v2->m_pRunArrangeInvenEff.m_pObject = (NiNode *)pkBut;
    if ( v21 )
      InterlockedIncrement((volatile LONG *)&v21->m_uiRefCount);
  }
  v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane01", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v22, (PgWin *)&v2->vfptr, 0, 0);
  v23 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Object02", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v23, (PgWin *)&v2->vfptr, 0, 0);
  v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel03", &uiLeft, &uiTop, 0);
  v25 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v24, (PgWin *)&v2->vfptr, 0, 0);
  v26 = pkSkinTexture == 0;
  v2->m_pkMoneyPanel = v25;
  if ( v26 )
    v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme01", &uiLeft, &uiTop, 0);
  else
    v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme01", &uiLeft, &uiTop, pkSkinTexture);
  v2->m_pEquipTheme = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v27, (PgWin *)&v2->vfptr, 0, 0);
  v28 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel04", &uiLeft, &uiTop, 0);
  v29 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v28, (PgWin *)&v2->vfptr, 0, 0);
  v30 = spNode.m_pObject;
  v2->m_pkFunctionPanel = v29;
  v31 = PgSprData::Create((NiAVObject *)&v30->vfptr, "Panel05", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v31, (PgWin *)&v2->vfptr, 0, 0);
  i = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinCloseBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)i, (PgWin *)&v2->vfptr);
  v32 = MenuTexMgr::GetTexture(4u);
  v33 = spNode.m_pObject->vfptr;
  HIDWORD(v221) = v32;
  if ( ((int (__stdcall *)(const char *))v33[18].__vecDelDtor)("HelpLinkNor") )
  {
    i = (int)PgSprData::Create(
               (NiAVObject *)&spNode.m_pObject->vfptr,
               "HelpLinkNor",
               &uiLeft,
               &uiTop,
               (NiSourceTexture *)HIDWORD(v221));
    PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)i, (PgWin *)&v2->vfptr, 0x15u, 0, 0);
  }
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "WinTitle",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
  {
LABEL_100:
    v10 = spNode.m_pObject;
    v229 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
    return 0;
  }
  v34 = Font::Get(MAIN_MENU);
  v35 = PgWinText::CreateWin(uiLeft - v12, uiTop - v13 + 2, uiWidth, uiHeight, v34, (PgWin *)&v2->vfptr, 0, 0);
  v36 = v35->vfptr;
  i = (int)v35;
  v36[122].__vecDelDtor((NiRefObject *)v35, 1u);
  (*(void (__stdcall **)(struct D3DXCOLOR *))(*(_DWORD *)i + 468))(&Color::m_kDxWinTitleColor);
  HIDWORD(v221) = *(_DWORD *)i + 472;
  v37 = TextData::Get(0xF0F6EEF6);
  (*(void (__thiscall **)(int, NiUnsharedGeometryGroup *))HIDWORD(v221))(i, v37);
  (*(void (__stdcall **)(_DWORD))(*(_DWORD *)i + 240))(0);
  v38 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Inv1thTabOff", &uiLeft, &uiTop, 0);
  v39 = InvTabButWin::CreateWin(uiLeft - v12, uiTop - v13, v38, (PgWin *)&v2->vfptr, 8u);
  v2->m_apkInvTabWin[0] = (PgWinBut *)v39;
  v39->m_pkToolTipWin = g_pkToolTipWin;
  v40 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Inv1thTabDis", &uiLeft, &uiTop, 0);
  v41 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v40, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_apkDisableTabWin[0] = v41;
  v41->vfptr[60].__vecDelDtor((NiRefObject *)v41, 0);
  ((void (__stdcall *)(_DWORD))v2->m_apkDisableTabWin[0]->vfptr[64].__vecDelDtor)(0);
  v42 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Inv1thTabOn", &uiLeft, &uiTop, 0);
  v43 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v42, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_apkActiveTabWin[0] = v43;
  v43->vfptr[60].__vecDelDtor((NiRefObject *)v43, 0);
  ((void (__stdcall *)(signed int))v2->m_apkActiveTabWin[0]->vfptr[64].__vecDelDtor)(1);
  v44 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Inv2thTabOff", &uiLeft, &uiTop, 0);
  v45 = InvTabButWin::CreateWin(uiLeft - v12, uiTop - v13, v44, (PgWin *)&v2->vfptr, 9u);
  v2->m_apkInvTabWin[1] = (PgWinBut *)v45;
  v45->m_pkToolTipWin = g_pkToolTipWin;
  v46 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Inv2thTabDis", &uiLeft, &uiTop, 0);
  v47 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v46, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_apkDisableTabWin[1] = v47;
  v47->vfptr[60].__vecDelDtor((NiRefObject *)v47, 0);
  ((void (__stdcall *)(_DWORD))v2->m_apkDisableTabWin[1]->vfptr[64].__vecDelDtor)(0);
  v48 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Inv2thTabOn", &uiLeft, &uiTop, 0);
  v49 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v48, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_apkActiveTabWin[1] = v49;
  v49->vfptr[60].__vecDelDtor((NiRefObject *)v49, 0);
  ((void (__stdcall *)(_DWORD))v2->m_apkActiveTabWin[1]->vfptr[64].__vecDelDtor)(0);
  v50 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Inv3thTabOff", &uiLeft, &uiTop, 0);
  v51 = InvTabButWin::CreateWin(uiLeft - v12, uiTop - v13, v50, (PgWin *)&v2->vfptr, 0xAu);
  v2->m_apkInvTabWin[2] = (PgWinBut *)v51;
  v51->m_pkToolTipWin = g_pkToolTipWin;
  v52 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Inv3thTabDis", &uiLeft, &uiTop, 0);
  v53 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v52, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_apkDisableTabWin[2] = v53;
  v53->vfptr[60].__vecDelDtor((NiRefObject *)v53, 0);
  ((void (__stdcall *)(_DWORD))v2->m_apkDisableTabWin[2]->vfptr[64].__vecDelDtor)(0);
  v54 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Inv3thTabOn", &uiLeft, &uiTop, 0);
  v55 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v54, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_apkActiveTabWin[2] = v55;
  v55->vfptr[60].__vecDelDtor((NiRefObject *)v55, 0);
  ((void (__stdcall *)(_DWORD))v2->m_apkActiveTabWin[2]->vfptr[64].__vecDelDtor)(0);
  v56 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Inv4thTabOff", &uiLeft, &uiTop, 0);
  v57 = InvTabButWin::CreateWin(uiLeft - v12, uiTop - v13, v56, (PgWin *)&v2->vfptr, 0xBu);
  v2->m_apkInvTabWin[3] = (PgWinBut *)v57;
  v57->m_pkToolTipWin = g_pkToolTipWin;
  v58 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Inv4thTabDis", &uiLeft, &uiTop, 0);
  v59 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v58, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_apkDisableTabWin[3] = v59;
  v59->vfptr[60].__vecDelDtor((NiRefObject *)v59, 0);
  ((void (__stdcall *)(_DWORD))v2->m_apkDisableTabWin[3]->vfptr[64].__vecDelDtor)(0);
  v60 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Inv4thTabOn", &uiLeft, &uiTop, 0);
  v61 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v60, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_apkActiveTabWin[3] = v61;
  v61->vfptr[60].__vecDelDtor((NiRefObject *)v61, 0);
  ((void (__stdcall *)(_DWORD))v2->m_apkActiveTabWin[3]->vfptr[64].__vecDelDtor)(0);
  v62 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Inv5thTabOff", &uiLeft, &uiTop, 0);
  v63 = InvTabButWin::CreateWin(uiLeft - v12, uiTop - v13, v62, (PgWin *)&v2->vfptr, 0xCu);
  v2->m_apkInvTabWin[4] = (PgWinBut *)v63;
  v63->m_pkToolTipWin = g_pkToolTipWin;
  v64 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Inv5thTabDis", &uiLeft, &uiTop, 0);
  v65 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v64, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_apkDisableTabWin[4] = v65;
  v65->vfptr[60].__vecDelDtor((NiRefObject *)v65, 0);
  ((void (__stdcall *)(_DWORD))v2->m_apkDisableTabWin[4]->vfptr[64].__vecDelDtor)(0);
  v66 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Inv5thTabOn", &uiLeft, &uiTop, 0);
  v67 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v66, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_apkActiveTabWin[4] = v67;
  v67->vfptr[60].__vecDelDtor((NiRefObject *)v67, 0);
  ((void (__stdcall *)(_DWORD))v2->m_apkActiveTabWin[4]->vfptr[64].__vecDelDtor)(0);
  v68 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Inv6thTabOff", &uiLeft, &uiTop, 0);
  v69 = InvTabButWin::CreateWin(uiLeft - v12, uiTop - v13, v68, (PgWin *)&v2->vfptr, 0xDu);
  v2->m_apkInvTabWin[5] = (PgWinBut *)v69;
  v69->m_pkToolTipWin = g_pkToolTipWin;
  v70 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Inv6thTabDis", &uiLeft, &uiTop, 0);
  v71 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v70, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_apkDisableTabWin[5] = v71;
  v71->vfptr[60].__vecDelDtor((NiRefObject *)v71, 0);
  ((void (__stdcall *)(_DWORD))v2->m_apkDisableTabWin[5]->vfptr[64].__vecDelDtor)(0);
  v72 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Inv6thTabOn", &ui= (unsigned int);
  v73 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v72, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_apkActiveTabWin[5] = v73;
  v73->vfptr[60].__vecDelDtor((NiRefObject *)v73, 0);
  ((void (__stdcall *)(_DWORD))v2->m_apkActiveTabWin[5]->vfptr[64].__vecDelDtor)(0);
  v74 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PCBangOff", &uiLeft, &uiTop, 0);
  v75 = InvTabButWin::CreateWin(uiLeft - v12, uiTop - v13, v74, (PgWin *)&v2->vfptr, 0xEu);
  v2->m_pkCompensationItemOffTabWin = (PgWinBut *)v75;
  v75->m_pkToolTipWin = g_pkToolTipWin;
  v76 = (char *)TextData::Get(0x8A91AAD2);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkCompensationItemOffTabWin->vfptr, v76);
  v77 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PCBangOn", &uiLeft, &uiTop, 0);
  v78 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v77, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkCompensationItemTabWin = v78;
  v78->vfptr[60].__vecDelDtor((NiRefObject *)v78, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkCompensationItemTabWin->vfptr[64].__vecDelDtor)(0);
  v79 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PCBangDis", &uiLeft, &uiTop, 0);
  v80 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v79, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkCompensationDisableTabWin = v80;
  v80->vfptr[60].__vecDelDtor((NiRefObject *)v80, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkCompensationDisableTabWin->vfptr[64].__vecDelDtor)(0);
  v81 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NewItem01", &uiLeft, &uiTop, 0);
  v82 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v81, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkNewRewardItem = v82;
  v82->vfptr[64].__vecDelDtor((NiRefObject *)v82, 0);
  v83 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "InvCommercialOff", &uiLeft, &uiTop, 0);
  pkBut = PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, v83, (PgWin *)&v2->vfptr, 0xFu, 0, 0);
  pkBut->m_pkToolTipWin = g_pkToolTipWin;
  v84 = (char *)TextData::Get(0xB9F8D72A);
  PgWin::SetToolTipWinText((PgWin *)&pkBut->vfptr, v84);
  v2->m_pkChargedItemOffTabWin = pkBut;
  v85 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "InvCommercialOn", &uiLeft, &uiTop, 0);
  v86 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v85, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkChargedItemTabWin = v86;
  v86->vfptr[60].__vecDelDtor((NiRefObject *)v86, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkChargedItemTabWin->vfptr[64].__vecDelDtor)(0);
  v87 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "InvCommercialDis", &uiLeft, &uiTop, 0);
  v88 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v87, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkChargedItemDisableTabWin = v88;
  v88->vfptr[60].__vecDelDtor((NiRefObject *)v88, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkChargedItemDisableTabWin->vfptr[64].__vecDelDtor)(0);
  v89 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NewItem", &uiLeft, &uiTop, 0);
  v90 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v89, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkNewChargedItem = v90;
  v90->vfptr[64].__vecDelDtor((NiRefObject *)v90, 0);
  v91 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v91, (PgWin *)&v2->vfptr, 0, 0);
  auiEquipPos[0] = 6;
  auiEquipPos[1] = 1;
  auiEquipPos[2] = 23;
  auiEquipPos[3] = 12;
  auiEquipPos[4] = 7;
  auiEquipPos[5] = 10;
  auiEquipPos[6] = 16;
  auiEquipPos[7] = 19;
  auiEquipPos[8] = 15;
  auiEquipPos[9] = 14;
  auiEquipPos[10] = 21;
  auiEquipPos[11] = 0;
  auiEquipPos[12] = 22;
  auiEquipPos[13] = 20;
  auiEquipPos[14] = 8;
  auiEquipPos[15] = 17;
  auiEquipPos[16] = 24;
  auiEquipPos[17] = 25;
  auiEquipPos[18] = 26;
  auiEquipPos[19] = 27;
  auiEquipPos[20] = 11;
  auiEquipPos[21] = 13;
  auiEquipPos[22] = 9;
  auiEquipPos[23] = 29;
  auiEquipPos[24] = 18;
  auiEquipPos[25] = 28;
  i = 0;
  do
  {
    HIDWORD(v221) = i + 1;
    sprintf(acShapeName, "EquipSlot%03d", i + 1);
    v92 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v92, (PgWin *)&v2->vfptr, 0, 0);
    if ( i < 30 )
    {
      v93 = auiEquipPos[i];
      i = v93;
      if ( v93 )
      {
        v94 = InvWin::CreateWin(uiLeft - v12 + 1, uiTop - v13 + 1, v93, (PgWin *)&v2->vfptr);
        v2->m_apkEquipWin[i] = v94;
        ItemIcon::SetItem((ItemIcon *)&v94->vfptr, 0, 1);
        ((void (__stdcall *)(signed int))v2->m_apkEquipWin[i]->vfptr[129].__vecDelDtor)(5);
        ((void (__stdcall *)(signed int))v2->m_apkEquipWin[i]->vfptr[140].__vecDelDtor)(6);
        v95 = i;
        v2->m_apkEquipWin[i]->m_uiInvType = 8;
        v2->m_apkEquipWin[v95]->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
        v2->m_apkEquipWin[v95]->m_eType = 1;
        v2->m_apkEquipWin[v95]->m_bActive = 1;
        IconWin::ShowFocus((IconWin *)&v2->m_apkEquipWin[v95]->vfptr, 1);
      }
    }
    i = HIDWORD(v221);
  }
  while ( SHIDWORD(v221) < 26 );
  pkSkinTexture = 0;
  pkBut = (PgWinBut *)v2->m_apkInvWin;
  do
  {
    pTexturePalette = (NiTexturePalette *)((char *)&pkSkinTexture->vfptr + 1);
    sprintf(acShapeName, "InvItemSlot%03d", (char *)&pkSkinTexture->vfptr + 1);
    v96 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, 0);
    v97 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v96, (PgWin *)&v2->vfptr, 0, 0);
    v98 = pkBut;
    v99 = pkSkinTexture;
    LODWORD(pkBut[4].m_kWorld.m_Rotate.m_pEntry[1][2]) = v97;
    pkSkinTexture = v99;
    i = (int)v98;
    HIDWORD(v221) = 8;
    do
    {
      v100 = InvWin::CreateWin(uiLeft - v12 + 1, uiTop - v13 + 1, (unsigned int)pkSkinTexture, (PgWin *)&v2->vfptr);
      *(_DWORD *)i = v100;
      ItemIcon::SetItem((ItemIcon *)&v100->vfptr, 0, 1);
      (*(void (__stdcall **)(signed int))(**(_DWORD **)i + 516))(3);
      (*(void (__stdcall **)(signed int))(**(_DWORD **)i + 560))(4);
      v101 = (IconWin **)i;
      *(_DWORD *)(*(_DWORD *)i + 452) = 9;
      (*v101)->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
      (*v101)->m_eType = 1;
      IconWin::ShowFocus(*v101, 1);
      i += 96;
      pkSkinTexture = (NiSourceTexture *)((char *)pkSkinTexture + 24);
      --HIDWORD(v221);
    }
    while ( HIDWORD(v221) );
    pkBut = (PgWinBut *)((char *)pkBut + 4);
    pkSkinTexture = (NiSourceTexture *)pTexturePalette;
  }
  while ( (signed int)pTexturePalette < 24 );
  v102 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CopperBtn", &uiLeft, &uiTop, 0);
  v103 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v102, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkCopperBtn = v103;
  v103->m_pkToolTipWin = g_pkToolTipWin;
  v104 = (char *)TextData::Get(0x88AF99F5);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkCopperBtn->vfptr, v104);
  ((void (__stdcall *)(signed int))v2->m_pkCopperBtn->vfptr[60].__vecDelDtor)(1);
  v105 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CopperInput", &uiLeft, &uiTop, 0);
  i = (int)v105;
  v106 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v105, (PgWin *)&v2->vfptr, 0, 0);
  v107 = i;
  v2->m_pkCopperInput = v106;
  v108 = **(_DWORD **)(v107 + 36);
  v109 = *(_DWORD *)(v108 + 20);
  pTexturePalette = *(NiTexturePalette **)(v108 + 24);
  HIDWORD(v221) = v109;
  v110 = Font::Get(SMALL);
  v111 = PgWinText::CreateWin(
           uiLeft - v12 - 2,
           uiTop - v13 + 2,
           HIDWORD(v221),
           (unsigned int)pTexturePalette,
           v110,
           (PgWin *)&v2->vfptr,
           0,
           0);
  v2->m_pkCopperText = v111;
  v111->vfptr[122].__vecDelDtor((NiRefObject *)v111, 2u);
  ((void (__stdcall *)(const char *))v2->m_pkCopperText->vfptr[118].__vecDelDtor)("0");
  ((void (__stdcall *)(_DWORD))v2->m_pkCopperText->vfptr[60].__vecDelDtor)(0);
  v112 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SilverBtn", &uiLeft, &uiTop, 0);
  v113 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v112, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkSilverBtn = v113;
  v113->m_pkToolTipWin = g_pkToolTipWin;
  v114 = (char *)TextData::Get(0x98B595EF);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkSilverBtn->vfptr, v114);
  ((void (__stdcall *)(signed int))v2->m_pkSilverBtn->vfptr[60].__vecDelDtor)(1);
  i = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SilverInput", &uiLeft, &uiTop, 0);
  v2->m_pkSilverInput = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)i, (PgWin *)&v2->vfptr, 0, 0);
  v115 = *(_DWORD *)(i + 36);
  v116 = *(_DWORD *)(*(_DWORD *)v115 + 20);
  pTexturePalette = *(NiTexturePalette **)(*(_DWORD *)v115 + 24);
  HIDWORD(v221) = v116;
  v117 = Font::Get(SMALL);
  v118 = PgWinText::CreateWin(
           uiLeft - v12 - 2,
           uiTop - v13 + 2,
           HIDWORD(v221),
           (unsigned int)pTexturePalette,
           v117,
           (PgWin *)&v2->vfptr,
           0,
           0);
  v2->m_pkSilverText = v118;
  v118->vfptr[122].__vecDelDtor((NiRefObject *)v118, 2u);
  ((void (__stdcall *)(const char *))v2->m_pkSilverText->vfptr[118].__vecDelDtor)("0");
  ((void (__stdcall *)(_DWORD))v2->m_pkSilverText->vfptr[60].__vecDelDtor)(0);
  v119 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GoldBtn", &uiLeft, &uiTop, 0);
  v120 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v119, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkGoldBtn = v120;
  v120->m_pkToolTipWin = g_pkToolTipWin;
  v121 = (char *)TextData::Get(0x47A395A3u);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkGoldBtn->vfptr, v121);
  ((void (__stdcall *)(signed int))v2->m_pkGoldBtn->vfptr[60].__vecDelDtor)(1);
  i = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GoldInput", &uiLeft, &uiTop, 0);
  v2->m_pkGoldInput = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)i, (PgWin *)&v2->vfptr, 0, 0);
  v122 = *(_DWORD *)(i + 36);
  v123 = *(_DWORD *)(*(_DWORD *)v122 + 20);
  pTexturePalette = *(NiTexturePalette **)(*(_DWORD *)v122 + 24);
  HIDWORD(v221) = v123;
  v124 = Font::Get(SMALL);
  v125 = PgWinText::CreateWin(
           uiLeft - v12 - 2,
           uiTop - v13 + 2,
           HIDWORD(v221),
           (unsigned int)pTexturePalette,
           v124,
           (PgWin *)&v2->vfptr,
           0,
           0);
  v2->m_pkGoldText = v125;
  v125->vfptr[122].__vecDelDtor((NiRefObject *)v125, 2u);
  ((void (__stdcall *)(const char *))v2->m_pkGoldText->vfptr[118].__vecDelDtor)("0");
  ((void (__stdcall *)(_DWORD))v2->m_pkGoldText->vfptr[60].__vecDelDtor)(0);
  v126 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GemBtn", &uiLeft, &uiTop, 0);
  v127 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v126, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkGemBtn = v127;
  v127->m_pkToolTipWin = g_pkToolTipWin;
  v128 = (char *)TextData::Get(0x475F9699u);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkGemBtn->vfptr, v128);
  ((void (__stdcall *)(signed int))v2->m_pkGemBtn->vfptr[60].__vecDelDtor)(1);
  i = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GemInput", &uiLeft, &uiTop, 0);
  v2->m_pkGemInput = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)i, (PgWin *)&v2->vfptr, 0, 0);
  v129 = *(_DWORD *)(i + 36);
  v130 = *(_DWORD *)(*(_DWORD *)v129 + 20);
  pTexturePalette = *(NiTexturePalette **)(*(_DWORD *)v129 + 24);
  HIDWORD(v221) = v130;
  v131 = Font::Get(SMALL);
  v132 = PgWinText::CreateWin(
           uiLeft - v12 - 2,
           uiTop - v13 + 2,
           HIDWORD(v221),
           (unsigned int)pTexturePalette,
           v131,
           (PgWin *)&v2->vfptr,
           0,
           0);
  v2->m_pkGemText = v132;
  v132->vfptr[122].__vecDelDtor((NiRefObject *)v132, 2u);
  ((void (__stdcall *)(const char *))v2->m_pkGemText->vfptr[118].__vecDelDtor)("0");
  ((void (__stdcall *)(_DWORD))v2->m_pkGemText->vfptr[60].__vecDelDtor)(0);
  i = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MiniMonNor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "MiniMonClick");
  PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "MiniMonOver");
  v133 = PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)i, (PgWin *)&v2->vfptr, 0x16u, 0, 0);
  v2->m_pkAutoPickBtn = v133;
  v133->m_pkToolTipWin = g_pkToolTipWin;
  v134 = (char *)TextData2::Get(0xB110C907);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkAutoPickBtn->vfptr, v134);
  ((void (__stdcall *)(_DWORD))v2->m_pkAutoPickBtn->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkAutoPickBtn->vfptr[60].__vecDelDtor)(0);
  v135 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MiniMonDisable", &uiLeft, &uiTop, 0);
  v136 = PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, v135, (PgWin *)&v2->vfptr, 0, 0, 0);
  v2->m_pkAutoPickDisable = v136;
  v136->m_pkToolTipWin = g_pkToolTipWin;
  v137 = (char *)TextData2::Get(0x759331Bu);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkAutoPickDisable->vfptr, v137);
  ((void (__stdcall *)(signed int))v2->m_pkAutoPickDisable->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(signed int))v2->m_pkAutoPickDisable->vfptr[60].__vecDelDtor)(1);
  v138 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MiniMonON", &uiLeft, &uiTop, 0);
  v139 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v138, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkAutoPickON = v139;
  v139->vfptr[64].__vecDelDtor((NiRefObject *)v139, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkAutoPickON->vfptr[60].__vecDelDtor)(0);
  v140 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MiniMonOFF", &uiLeft, &uiTop, 0);
  v141 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v140, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkAutoPickOFF = v141;
  v141->vfptr[64].__vecDelDtor((NiRefObject *)v141, 1u);
  ((void (__stdcall *)(signed int))v2->m_pkAutoPickOFF->vfptr[60].__vecDelDtor)(1);
  v142 = ChargedItemInvenWin::CreateWin();
  HIDWORD(v221) = v142;
  v2->m_pkChargedItemInvenWin = v142;
  if ( v142 )
  {
    v143 = (NiRTTI *)((int (*)(void))v142->vfptr[1].__vecDelDtor)();
    if ( v143 )
    {
      while ( v143 != &PgWin::m_RTTI )
      {
        v143 = v143->m_pkBaseRTTI;
        if ( !v143 )
          goto LABEL_50;
      }
      ((void (__thiscall *)(InventoryWin *, _DWORD, _DWORD))v2->vfptr[29].__vecDelDtor)(v2, HIDWORD(v221), 0);
      NiAVObject::UpdateProperties((NiAVObject *)&v2->vfptr);
      NiAVObject::Update((NiAVObject *)&v2->vfptr, 0.0, 1);
    }
  }
LABEL_50:
  v144 = CompensationInvWin::CreateWin();
  HIDWORD(v221) = v144;
  v2->m_pkCompensationInvenWin = v144;
  if ( v144 )
  {
    v145 = (NiRTTI *)((int (*)(void))v144->vfptr[1].__vecDelDtor)();
    if ( v145 )
    {
      while ( v145 != &PgWin::m_RTTI )
      {
        v145 = v145->m_pkBaseRTTI;
        if ( !v145 )
          goto LABEL_56;
      }
      ((void (__thiscall *)(InventoryWin *, _DWORD, _DWORD))v2->vfptr[29].__vecDelDtor)(v2, HIDWORD(v221), 0);
      NiAVObject::UpdateProperties((NiAVObject *)&v2->vfptr);
      NiAVObject::Update((NiAVObject *)&v2->vfptr, 0.0, 1);
    }
  }
LABEL_56:
  i = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "AutoArrayNor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "AutoArrayClick");
  PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "AutoArrayOver");
  v146 = PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)i, (PgWin *)&v2->vfptr, 0x17u, 0, 0);
  v2->m_pkArrangeBut = v146;
  v146->m_pkToolTipWin = g_pkToolTipWin;
  v147 = (char *)TextData2::Get(0xDBE83345);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkArrangeBut->vfptr, v147);
  v148 = (int)v2->m_pRunArrangeButEff.m_pObject;
  HIDWORD(v221) = v2->m_pkArrangeBut;
  i = v148;
  if ( v148 != HIDWORD(v221) )
  {
    if ( v148 && !InterlockedDecrement((volatile LONG *)(v148 + 4)) && i )
      (**(void (__stdcall ***)(_DWORD))i)(1);
    v149 = HIDWORD(v221);
    v2->m_pRunArrangeButEff.m_pObject = (NiNode *)HIDWORD(v221);
    if ( v149 )
      InterlockedIncrement((volatile LONG *)(v149 + 4));
  }
  v150 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "AutoArrayDisable", &uiLeft, &uiTop, 0);
  v151 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v150, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkArrangeDisable = v151;
  v151->m_pkToolTipWin = g_pkToolTipWin;
  v152 = (char *)TextData3::Get(0x7D918182u);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkArrangeDisable->vfptr, v152);
  ((void (__stdcall *)(_DWORD))v2->m_pkArrangeDisable->vfptr[64].__vecDelDtor)(0);
  i = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "InventoryOpenNor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "InventoryOpenClick");
  PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "InventoryOpenOver");
  v153 = PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)i, (PgWin *)&v2->vfptr, 0x18u, 0, 0);
  v2->m_pkInvMagicBoxBut = v153;
  v153->m_pkToolTipWin = g_pkToolTipWin;
  ((void (__stdcall *)(_DWORD))v2->m_pkInvMagicBoxBut->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkInvMagicBoxBut->vfptr[64].__vecDelDtor)(0);
  v154 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "InventoryOpenDisable", &uiLeft, &uiTop, 0);
  v155 = PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, v154, (PgWin *)&v2->vfptr, 0, 0, 0);
  v2->m_pkDisMagicBoxBut = v155;
  v155->m_pkToolTipWin = g_pkToolTipWin;
  ((void (__stdcall *)(signed int))v2->m_pkDisMagicBoxBut->vfptr[60].__vecDelDtor)(1);
  ((void (__stdcall *)(signed int))v2->m_pkDisMagicBoxBut->vfptr[64].__vecDelDtor)(1);
  i = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MiniMonAutoUseNor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "MiniMonAutoUseClick");
  PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "MiniMonAutoUseOver");
  v156 = PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)i, (PgWin *)&v2->vfptr, 0x19u, 0, 0);
  v2->m_pkAutoUseWinOpenBtn = v156;
  v156->m_pkToolTipWin = g_pkToolTipWin;
  v157 = (char *)TextData3::Get(0x717EC0B6u);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkAutoUseWinOpenBtn->vfptr, v157);
  ((void (__stdcall *)(_DWORD))v2->m_pkAutoUseWinOpenBtn->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkAutoUseWinOpenBtn->vfptr[64].__vecDelDtor)(0);
  v158 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MiniMonAutoUseDisable", &uiLeft, &uiTop, 0);
  v159 = PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, v158, (PgWin *)&v2->vfptr, 0, 0, 0);
  v2->m_pkAutoUseDisable = v159;
  v159->m_pkToolTipWin = g_pkToolTipWin;
  v160 = (char *)TextData3::Get(0xC4C3BC02);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkAutoUseDisable->vfptr, v160);
  ((void (__stdcall *)(signed int))v2->m_pkAutoUseDisable->vfptr[60].__vecDelDtor)(1);
  ((void (__stdcall *)(signed int))v2->m_pkAutoUseDisable->vfptr[64].__vecDelDtor)(1);
  v161 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Inv7thTabOff", &uiLeft, &uiTop, 0);
  v162 = InvTabButWin::CreateWin(uiLeft - v12, uiTop - v13, v161, (PgWin *)&v2->vfptr, 0x1Au);
  v2->m_apkInvTabWin[6] = (PgWinBut *)v162;
  v162->m_pkToolTipWin = g_pkToolTipWin;
  v163 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Inv7thTabDis", &uiLeft, &uiTop, 0);
  v164 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v163, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_apkDisableTabWin[6] = v164;
  v164->vfptr[60].__vecDelDtor((NiRefObject *)v164, 0);
  ((void (__stdcall *)(_DWORD))v2->m_apkDisableTabWin[6]->vfptr[64].__vecDelDtor)(0);
  v165 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Inv7thTabOn", &uiLeft, &uiTop, 0);
  v166 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v165, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_apkActiveTabWin[6] = v166;
  v166->vfptr[60].__vecDelDtor((NiRefObject *)v166, 0);
  ((void (__stdcall *)(_DWORD))v2->m_apkActiveTabWin[6]->vfptr[64].__vecDelDtor)(0);
  v167 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Inv8thTabOff", &uiLeft, &uiTop, 0);
  v168 = InvTabButWin::CreateWin(uiLeft - v12, uiTop - v13, v167, (PgWin *)&v2->vfptr, 0x1Bu);
  v2->m_apkInvTabWin[7] = (PgWinBut *)v168;
  v168->m_pkToolTipWin = g_pkToolTipWin;
  v169 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Inv8thTabDis", &uiLeft, &uiTop, 0);
  v170 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v169, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_apkDisableTabWin[7] = v170;
  v170->vfptr[60].__vecDelDtor((NiRefObject *)v170, 0);
  ((void (__stdcall *)(_DWORD))v2->m_apkDisableTabWin[7]->vfptr[64].__vecDelDtor)(0);
  v171 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Inv8thTabOn", &uiLeft, &uiTop, 0);
  v172 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v171, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_apkActiveTabWin[7] = v172;
  v172->vfptr[60].__vecDelDtor((NiRefObject *)v172, 0);
  ((void (__stdcall *)(_DWORD))v2->m_apkActiveTabWin[7]->vfptr[64].__vecDelDtor)(0);
  v173 = 0;
  pkBut = (PgWinBut *)v2->m_pkNumSpr;
  do
  {
    pTexturePalette = (NiTexturePalette *)((char *)v173 + 1);
    sprintf(acShapeName, "Num%02d", (char *)&v173->vfptr + 1);
    v174 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, 0);
    v175 = (NiRefObjectVtbl *)PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v174, (PgWin *)&v2->vfptr, 0, 0);
    pkBut->vfptr = v175;
    (*((void (__thiscall **)(_DWORD, _DWORD))v175->__vecDelDtor + 60))(v175, 0);
    v173 = pTexturePalette;
    pkBut = (PgWinBut *)((char *)pkBut + 4);
  }
  while ( (signed int)pTexturePalette < 8 );
  i = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ChrEquipON", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "ChrEquipOff");
  v176 = PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)i, (PgWin *)&v2->vfptr, 0x1Cu, 0, 0);
  v2->m_pkChrEquipOnOffBut = v176;
  if ( v176 )
  {
    pkNiNodePtr.m_pObject = 0;
    LOBYTE(v229) = 1;
    pTexturePalette = ::pTexturePalette;
    if ( !Folder::m_bInit )
      Folder::Init();
    v178 = 0;
    do
    {
      v179 = *(&Folder::m_acEffect + v178);
      *(&Folder::m_acMerge + v178++) = v179;
    }
    while ( v179 );
    v180 = &Folder::m_acMerge - 1;
    do
      v181 = (v180++)[1];
    while ( v181 );
    qmemcpy(v180, "ItemSort_Button_US.nif", 0x14u);
    v182 = v180 + 20;
    v183 = pTexturePalette;
    *v182 = *(_WORD *)"if";
    ++v182;
    *(_BYTE *)v182 = aItemsort_butto[22];
    v184 = (int)v182 + 1;
    PgUtil::LoadNodeNifFile(&Folder::m_acMerge, &pkNiNodePtr, v183);
    *(float *)&v185 = COERCE_FLOAT(operator new(0x44u));
    pTexturePalette = v185;
    LOBYTE(v229) = 2;
    if ( *(float *)&v185 == 0.0 )
    {
      v187 = 0;
    }
    else
    {
      v186 = (NiNode *)NiObject::Clone((NiObject *)&pkNiNodePtr.m_pObject->vfptr);
      SpEffect::SpEffect((SpEffect *)v185, v186);
    }
    v188 = v2->m_pkArrangeBut;
    v2->m_apkArrangeButEff = v187;
    v189 = v187->m_spEffect.m_pObject;
    EffectPos.x = v188->m_kLocal.m_Translate.x;
    v190 = v188->m_kLocal.m_Translate.y;
    EffectPos.z = v188->m_kLocal.m_Translate.z;
    v191 = v2->m_pEquipTheme;
    EffectPos.y = v190;
    v192 = (int (*)(void))v191->vfptr[37].__vecDelDtor;
    LOBYTE(v229) = 1;
    *(float *)&pTexturePalette = COERCE_FLOAT(v192());
    v193 = (int (*)(void))v2->m_pkMoneyPanel->vfptr[37].__vecDelDtor;
    v221 = (double)(unsigned int)pTexturePalette - EffectPos.y;
    *(float *)&pTexturePalette = (double)(unsigned int)v193() + v221;
    v220 = -EffectPos.x;
    v194 = *(float *)&pTexturePalette;
    v189->m_kLocal.m_Translate.x = v220;
    *(float *)&v221 = v194;
    v195 = EffectPos.z;
    v189->m_kLocal.m_Translate.y = *(float *)&v221;
    *((float *)&v221 + 1) = v195;
    v189->m_kLocal.m_Translate.z = *((float *)&v221 + 1);
    v2->m_apkArrangeButEff->m_bLoop = 1;
    v196 = ::pTexturePalette;
    if ( !Folder::m_bInit )
      Folder::Init();
    v197 = 0;
    do
    {
      v198 = *(&Folder::m_acEffect + v197);
      *(&Folder::m_acMerge + v197++) = v198;
    }
    while ( v198 );
    v199 = &Folder::m_acMerge - 1;
    do
      v200 = (v199++)[1];
    while ( v200 );
    *(_DWORD *)v199 = 1835365449;
    *((_DWORD *)v199 + 1) = 1953656659;
    *((_DWORD *)v199 + 2) = 1918976607;
    *((_DWORD *)v199 + 3) = 777213279;
    *((_DWORD *)v199 + 4) = byte_66696E;
    PgUtil::LoadNodeNifFile(&Folder::m_acMerge, &pkNiNodePtr, v196);
    *(float *)&v201 = COERCE_FLOAT(operator new(0x44u));
    pTexturePalette = v201;
    LOBYTE(v229) = 3;
    if ( *(float *)&v201 == 0.0 )
    {
      v203 = 0;
    }
    else
    {
      v202 = (NiNode *)NiObject::Clone((NiObject *)&pkNiNodePtr.m_pObject->vfptr);
      SpEffect::SpEffect((SpEffect *)v201, v202);
    }
    v204 = v2->m_pRunArrangeInvenEff.m_pObject;
    v2->m_apkArrangeInvenEff = v203;
    v205 = v203->m_spEffect.m_pObject;
    EffectPos.x = v204->m_kLocal.m_Translate.x;
    v206 = v204->m_kLocal.m_Translate.y;
    EffectPos.z = v204->m_kLocal.m_Translate.z;
    v207 = v2->m_pEquipTheme;
    EffectPos.y = v206;
    v208 = (int (*)(void))v207->vfptr[37].__vecDelDtor;
    LOBYTE(v229) = 1;
    *(float *)&pTexturePalette = COERCE_FLOAT(v208());
    v209 = (int (*)(void))v2->m_pkMoneyPanel->vfptr[37].__vecDelDtor;
    v221 = (double)(unsigned int)pTexturePalette - EffectPos.y;
    *(float *)&pTexturePalette = (double)(unsigned int)v209() + v221;
    v220 = -EffectPos.x;
    v210 = *(float *)&pTexturePalette;
    v205->m_kLocal.m_Translate.x = v220;
    *(float *)&v221 = v210;
    v211 = EffectPos.z;
    v205->m_kLocal.m_Translate.y = *(float *)&v221;
    *((float *)&v221 + 1) = v211;
    v205->m_kLocal.m_Translate.z = *((float *)&v221 + 1);
    v2->m_apkArrangeInvenEff->m_bLoop = 1;
    ((void (__thiscall *)(InventoryWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.81999999,
      0.57999998);
    InventoryWin::OnActivePage(v2, v184, 0);
    LOBYTE(v229) = 0;
    if ( pkNiNodePtr.m_pObject )
    {
      v212 = pkNiNodePtr.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&pkNiNodePtr.m_pObject->m_uiRefCount) )
      {
        if ( v212 )
          v212->vfptr->__vecDelDtor((NiRefObject *)v212, 1u);
      }
    }
    v213 = spNode.m_pObject;
    v229 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v213 )
      v213->vfptr->__vecDelDtor((NiRefObject *)v213, 1u);
    result = 1;
  }
  else
  {
    v177 = spNode.m_pObject;
    v229 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v177 )
      v177->vfptr->__vecDelDtor((NiRefObject *)v177, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00520FC0) --------------------------------------------------------
void __thiscall InventoryWin::DirectMessage(InventoryWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  InventoryWin *v4; // edi@1

  v4 = this;
  if ( iMsgTag == 27 && pvBody )
  {
    if ( unk_B25350 )
      InventoryWin::OnCreateNewSocket((InventoryWin *)((char *)this - 232), 0);
    if ( !*(_DWORD *)pvBody )
      GameFrameWork::NcItemSellReq(
        (GameFrameWork *)LODWORD(v4->m_kLocal.m_Rotate.m_pEntry[1][0]),
        InventoryWin::ms_kFrom.Inven,
        1u);
  }
}

//----- (00521010) --------------------------------------------------------
void __usercall InventoryWin::OnClose(InventoryWin *this@<ecx>, int a2@<edi>)
{
  InventoryWin *v2; // esi@1

  v2 = this;
  if ( this->m_bShowEquip )
    InventoryWin::OnActivePage(this, a2, this->m_iActivePage);
  if ( InventoryWin::ms_uiMode == 8 )
    PgFrameWork::AddMsg(v2->m_pkFrameWork, 0x10Au, 0, 0);
  if ( unk_B2534C )
  {
    ItemRepairWin::CancelItemRepair((ItemRepairWin *)v2->m_pkFrameWork[33].m_kMsgQ.m_uiAlloced);
  }
  else if ( unk_B25350 )
  {
    InventoryWin::OnCreateNewSocket(v2, 0);
  }
  else if ( unk_B25354 )
  {
    InventoryWin::OnResetRecoverCountState(v2);
  }
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (00521090) --------------------------------------------------------
void __thiscall InventoryWin::UpdateBlinkEffect(InventoryWin *this)
{
  InventoryWin *v1; // esi@1
  unsigned int v2; // ebx@2
  const char *v3; // edx@4
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *v4; // ecx@4
  PgWin *v5; // edi@4
  PgWin *v6; // ebx@5
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v7; // ecx@11
  const char *v8; // ecx@16
  const char *v9; // ST00_4@16
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *v10; // ecx@16
  PgWin *v11; // edi@16
  PgWin *v12; // eax@17
  PgWin *v13; // ebx@17
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v14; // ecx@23
  const char *v15; // edx@25
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *v16; // ecx@25
  PgWin *v17; // ebx@25
  unsigned int v18; // eax@26
  PgWin *v19; // eax@27
  int v20; // edx@29
  UIBlinkEffect *v21; // eax@29
  NiColorA *v22; // [sp-4h] [bp-40h]@4
  NiColorA kColor; // [sp+10h] [bp-2Ch]@29
  unsigned int uiSlot; // [sp+20h] [bp-1Ch]@2
  NiPointer<PgWin> spParent; // [sp+24h] [bp-18h]@5
  NiPointer<PgWin> result; // [sp+28h] [bp-14h]@8
  NiPointer<PgWin> spWin; // [sp+2Ch] [bp-10h]@4
  int v28; // [sp+38h] [bp-4h]@4

  v1 = this;
  if ( this->m_bBlinkActive )
  {
    v2 = InventoryWin::FindItem(this, this->currPcItemId);
    uiSlot = v2;
    if ( v2 <= 0xC0 )
    {
      if ( v1->m_nOpenPage == v2 / 0x18 )
      {
        if ( v2 != v1->m_iBlinkSlotNum )
        {
          spWin.m_pObject = 0;
          v8 = (const char *)v1->iEffectKey;
          v22 = (NiColorA *)&spWin;
          v9 = v8;
          v10 = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)v1->m_UIEffectList;
          v28 = 2;
          NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
            v10,
            v9,
            (NiPointer<NiShaderLibrary> *)&spWin);
          v11 = spWin.m_pObject;
          if ( spWin.m_pObject )
          {
            v12 = PgWin::GetParentWin(spWin.m_pObject);
            v13 = v12;
            result.m_pObject = v12;
            if ( v12 )
              InterlockedIncrement((volatile LONG *)&v12->m_uiRefCount);
            LOBYTE(v28) = 3;
            if ( v13 )
            {
              PgWin::DetachChildWin(v13, &spParent, v11);
              NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spParent);
            }
            PgWinMgr::Remove(&Pgg_kWinMgr, &spParent, v11);
            NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spParent);
            if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) )
              v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
            v14 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)v1->m_UIEffectList;
            v22 = (NiColorA *)v1->iEffectKey;
            spWin.m_pObject = 0;
            NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::RemoveAt(
              v14,
              (unsigned int)v22);
            LOBYTE(v28) = 2;
            NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&result);
            v2 = uiSlot;
          }
          v28 = -1;
          NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spWin);
        }
        v1->m_iBlinkSlotNum = v2;
        spWin.m_pObject = 0;
        v15 = (const char *)v1->iEffectKey;
        v22 = (NiColorA *)&spWin;
        v16 = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)v1->m_UIEffectList;
        v28 = 4;
        NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
          v16,
          v15,
          (NiPointer<NiShaderLibrary> *)&spWin);
        v17 = spWin.m_pObject;
        if ( !spWin.m_pObject )
        {
          v18 = v1->m_iBlinkSlotNum;
          if ( v18 >= 0xC0 || (v19 = (PgWin *)&v1->m_apkInvWin[v18]->vfptr) == 0 )
          {
            v28 = -1;
            NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spWin);
            return;
          }
          v20 = v1->m_UIEffectList->m_kAllocator.m_uiCount;
          kColor.r = 255.0;
          kColor.g = 250.0;
          v22 = &kColor;
          kColor.b = 205.0;
          v1->iEffectKey = v20;
          kColor.a = 255.0;
          v21 = UIBlinkEffect::CreateWin(v19, v22);
          uiSlot = (unsigned int)&v22;
          v22 = (NiColorA *)v21;
          if ( v21 )
            InterlockedIncrement((volatile LONG *)&v21->m_uiRefCount);
          NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
            (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)v1->m_UIEffectList,
            v1->iEffectKey,
            (NiPointer<PgWinBut>)v22);
        }
        v28 = -1;
        if ( v17 && !InterlockedDecrement((volatile LONG *)&v17->m_uiRefCount) )
          v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
      }
      else
      {
        spWin.m_pObject = 0;
        v3 = (const char *)v1->iEffectKey;
        v22 = (NiColorA *)&spWin;
        v4 = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)v1->m_UIEffectList;
        v28 = 0;
        NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
          v4,
          v3,
          (NiPointer<NiShaderLibrary> *)&spWin);
        v5 = spWin.m_pObject;
        if ( spWin.m_pObject )
        {
          v6 = PgWin::GetParentWin(spWin.m_pObject);
          spParent.m_pObject = v6;
          if ( v6 )
            InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
          LOBYTE(v28) = 1;
          if ( v6 )
          {
            PgWin::DetachChildWin(v6, &result, v5);
            NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&result);
          }
          PgWinMgr::Remove(&Pgg_kWinMgr, &result, v5);
          NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&result);
          if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
            v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
          v22 = (NiColorA *)v1->iEffectKey;
          v7 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)v1->m_UIEffectList;
          v5 = 0;
          spWin.m_pObject = 0;
          NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::RemoveAt(
            v7,
            (unsigned int)v22);
          LOBYTE(v28) = 0;
          NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spParent);
        }
        v28 = -1;
        if ( v5 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
            ((void (__cdecl *)(signed int))v5->vfptr->__vecDelDtor)(1);
        }
      }
    }
  }
}

//----- (005213C0) --------------------------------------------------------
void __thiscall InventoryWin::UpdateMeWin(InventoryWin *this, float fCurTime)
{
  InventoryWin *v2; // esi@1
  int v3; // eax@1
  unsigned int v4; // eax@2
  void (__thiscall ***v5)(_DWORD, _DWORD); // edi@4
  __int64 v6; // rax@8
  __int64 v7; // rax@8
  __int64 v8; // rax@8
  __int64 v9; // rax@8
  __int64 v10; // rax@8
  __int64 v11; // rax@8
  __int64 v12; // rax@8
  __int64 v13; // rax@8
  int v14; // edi@8
  int v15; // ebx@8
  char *v16; // eax@12
  bool v17; // zf@22
  void *(__thiscall *v18)(NiRefObject *, unsigned int); // eax@22
  char *v19; // eax@23
  char *v20; // eax@24
  unsigned int dwValue; // [sp+10h] [bp-8Ch]@8
  int iUsing; // [sp+14h] [bp-88h]@3
  char acStr[128]; // [sp+18h] [bp-84h]@8

  v2 = this;
  InventoryWin::UpdateBlinkEffect(this);
  CNSTimer_MarkCheck::Update(&v2->m_kMarkCheck, Timer::ms_fCurTime);
  if ( v3 == 1 )
  {
    CNSTimer_MarkCheck::ReSet(&v2->m_kMarkCheck, Timer::ms_fCurTime, OVER);
    v4 = v2->m_uiReceiverInvPos;
    if ( v4 != -1 )
    {
      ((void (__stdcall *)(int *, NiNode *))v2->m_apkInvWin[v4]->vfptr[30].__vecDelDtor)(
        &iUsing,
        v2->m_spEffect.m_pObject);
      if ( iUsing )
      {
        v5 = (void (__thiscall ***)(_DWORD, _DWORD))iUsing;
        if ( !InterlockedDecrement((volatile LONG *)(iUsing + 4)) )
        {
          if ( v5 )
            (**v5)(v5, 1);
        }
      }
      v2->m_uiReceiverInvPos = -1;
    }
  }
  v6 = User::GetMoney(&g_kUser);
  v7 = User::GetGem(v6);
  sprintf(acStr, "%I64d", v7);
  ((void (__stdcall *)(char *))v2->m_pkGemText->vfptr[118].__vecDelDtor)(acStr);
  v8 = User::GetMoney(&g_kUser);
  v9 = User::GetGold(v8);
  sprintf(acStr, "%I64d", v9);
  ((void (__stdcall *)(char *))v2->m_pkGoldText->vfptr[118].__vecDelDtor)(acStr);
  v10 = User::GetMoney(&g_kUser);
  v11 = User::GetSilver(v10);
  sprintf(acStr, "%I64d", v11);
  ((void (__stdcall *)(char *))v2->m_pkSilverText->vfptr[118].__vecDelDtor)(acStr);
  v12 = User::GetMoney(&g_kUser);
  v13 = User::GetCopper(v12);
  sprintf(acStr, "%I64d", v13);
  ((void (__stdcall *)(char *))v2->m_pkCopperText->vfptr[118].__vecDelDtor)(acStr);
  ChargedItemList::GetTotalEffectingValue(EE_MOREINVENTORY, &dwValue);
  iUsing = dwValue + 2;
  v14 = 0;
  v15 = (int)v2->m_apkInvTabWin;
  do
  {
    if ( v2->m_bShowEquip )
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v15 + 64) + 256))(v14 >= iUsing);
    if ( v14 < iUsing )
    {
      if ( v14 == v2->m_iActivePage / 24 )
      {
        if ( v14 < 2 )
          v16 = (char *)TextData::Get(0x3742948Eu);
        else
          v16 = (char *)TextData::Get(0x28537F8Au);
      }
      else if ( v14 < 2 )
      {
        v16 = (char *)TextData::Get(0xDAF8E945);
      }
      else
      {
        v16 = (char *)TextData::Get(0xD6E9FA30);
      }
    }
    else
    {
      v16 = (char *)TextData::Get(0xD9F5404C);
    }
    PgWin::SetToolTipWinText(*(PgWin **)v15, v16);
    ++v14;
    v15 += 4;
  }
  while ( v14 < 8 );
  if ( v2->m_bShowEquip )
  {
    v17 = ChargedItemList::IsEffecting(EE_STORAGE_ANYWHERE) == 1;
    v18 = v2->m_pkInvMagicBoxBut->vfptr[64].__vecDelDtor;
    if ( v17 )
    {
      ((void (__stdcall *)(signed int))v18)(1);
      ((void (__stdcall *)(signed int))v2->m_pkInvMagicBoxBut->vfptr[60].__vecDelDtor)(1);
      v19 = (char *)TextData2::Get(0x79A5ADB0u);
      PgWin::SetToolTipWinText((PgWin *)&v2->m_pkInvMagicBoxBut->vfptr, v19);
      ((void (__stdcall *)(_DWORD))v2->m_pkDisMagicBoxBut->vfptr[64].__vecDelDtor)(0);
      v2->m_pkDisMagicBoxBut->vfptr[60].__vecDelDtor((NiRefObject *)v2->m_pkDisMagicBoxBut, 0);
    }
    else
    {
      ((void (__stdcall *)(_DWORD))v18)(0);
      ((void (__stdcall *)(_DWORD))v2->m_pkInvMagicBoxBut->vfptr[60].__vecDelDtor)(0);
      ((void (__stdcall *)(signed int))v2->m_pkDisMagicBoxBut->vfptr[64].__vecDelDtor)(1);
      ((void (__stdcall *)(signed int))v2->m_pkDisMagicBoxBut->vfptr[60].__vecDelDtor)(1);
      v20 = (char *)TextData2::Get(0xC5FABCF1);
      PgWin::SetToolTipWinText((PgWin *)&v2->m_pkDisMagicBoxBut->vfptr, v20);
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00521710) --------------------------------------------------------
void __thiscall InventoryWin::GetItem(InventoryWin *this, std::vector<unsigned int,std::allocator<unsigned int> > *lstItem, unsigned __int16 ItemID)
{
  unsigned __int16 v3; // bx@1
  signed int v4; // esi@1
  ItemIcon **v5; // edi@1
  Item *v6; // eax@2
  unsigned __int16 *v7; // eax@3

  v3 = ItemID;
  v4 = 0;
  v5 = (ItemIcon **)this->m_apkInvWin;
  do
  {
    v6 = ItemIcon::GetItem(*v5);
    if ( v6 )
    {
      v7 = &v6->m_pkInfo->ID;
      if ( v7 )
      {
        if ( *v7 == v3 )
        {
          *(_DWORD *)&ItemID = v4;
          std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
            (std::vector<unsigned long,std::allocator<unsigned long> > *)lstItem,
            (const unsigned int *)&ItemID);
        }
      }
    }
    ++v4;
    ++v5;
  }
  while ( v4 < 192 );
}

//----- (00521760) --------------------------------------------------------
unsigned int __thiscall InventoryWin::GetTotalItemCount(InventoryWin *this, unsigned __int16 ItemID)
{
  InventoryWin *v2; // edi@1
  unsigned int result; // eax@2
  unsigned int v4; // ebx@3
  unsigned int *v5; // eax@3
  unsigned int *v6; // esi@4
  unsigned int v7; // eax@5
  Item *v8; // eax@8
  std::vector<unsigned int,std::allocator<unsigned int> > lstItem; // [sp+10h] [bp-1Ch]@3
  int v10; // [sp+28h] [bp-4h]@3

  v2 = this;
  if ( ItemID == -1 )
  {
    result = 0;
  }
  else
  {
    v4 = 0;
    lstItem._Myfirst = 0;
    lstItem._Mylast = 0;
    lstItem._Myend = 0;
    v10 = 0;
    InventoryWin::GetItem(this, &lstItem, ItemID);
    v5 = lstItem._Myfirst;
    if ( lstItem._Myfirst != lstItem._Mylast )
    {
      v6 = lstItem._Myfirst;
      do
      {
        v7 = *v6;
        if ( *v6 < 0xC0 && v2->m_apkInvWin[v7] && ItemIcon::GetItem((ItemIcon *)&v2->m_apkInvWin[v7]->vfptr) )
        {
          v8 = ItemIcon::GetItem((ItemIcon *)&v2->m_apkInvWin[*v6]->vfptr);
          v4 += ((int (__thiscall *)(Item *))v8->vfptr[3].__vecDelDtor)(v8);
        }
        ++v6;
      }
      while ( v6 != lstItem._Mylast );
      v5 = lstItem._Myfirst;
    }
    if ( v5 )
      operator delete(v5);
    result = v4;
  }
  return result;
}

//----- (00521840) --------------------------------------------------------
char __thiscall InvWin::Create(InvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent)
{
  InvWin *v5; // esi@1
  char result; // al@1

  v5 = this;
  result = ItemIcon::Create((ItemIcon *)&this->vfptr, iXPos, iYPos, pkParent);
  if ( result )
  {
    v5->m_uiInvIndex = uiInvIndex;
    ItemIcon::ShowLotText((ItemIcon *)&v5->vfptr, 1);
    pkParent = (PgWin *)v5;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      &IconWin::ms_kCoolTimeIconList,
      (const unsigned int *)&pkParent);
    result = 1;
  }
  return result;
}

//----- (00521890) --------------------------------------------------------
void __thiscall ChargedItemInvenWin::OnInvRClick(ChargedItemInvenWin *this, unsigned int uiInvIndex)
{
  ChargedItemInvenWin *v2; // edi@1
  int v3; // esi@2
  ITask *v4; // eax@3
  PROTO_CHARGED_ITEM_INFO *v5; // eax@7

  v2 = this;
  if ( !PgCursor::ms_pkDrop )
  {
    v3 = ISingletonTask<ChargedItemUseTask>::ms_pkSingletonTask;
    if ( !ISingletonTask<ChargedItemUseTask>::ms_pkSingletonTask )
    {
      v4 = (ITask *)operator new(0x48u);
      v3 = (int)v4;
      if ( v4 )
      {
        ITask::ITask(v4, 0);
        *(_DWORD *)v3 = &ChargedItemUseTask::`vftable'{for `NiRefObject'};
        *(_DWORD *)(v3 + 8) = &ChargedItemUseTask::`vftable'{for `IDirectMessenger'};
      }
      else
      {
        v3 = 0;
      }
      ISingletonTask<ChargedItemUseTask>::ms_pkSingletonTask = v3;
    }
    v5 = CChargedItem::Seek(&g_kChargedItem, uiInvIndex - 24 * v2->m_uiCurrPage);
    if ( v5 )
      *(_DWORD *)(v3 + 68) = v5->ItemOrderNo;
    else
      *(_DWORD *)(v3 + 20) = 2;
    (**(void (__thiscall ***)(_DWORD, _DWORD))(v3 + 8))(v3 + 8, &v2->vfptr);
  }
}
// 990190: using guessed type void (__thiscall *ChargedItemUseTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9901AC: using guessed type int (__thiscall *ChargedItemUseTask::`vftable'{for `NiRefObject'})(void *p, char);
// A8CC00: using guessed type int ISingletonTask<ChargedItemUseTask>::ms_pkSingletonTask;
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (00521970) --------------------------------------------------------
void __thiscall InventoryWin::OnInvLClick(InventoryWin *this, unsigned int uiInvIndex)
{
  InventoryWin *v2; // ebx@1
  GameFrameWork *v3; // eax@3
  GameFrameWork *v4; // edi@3
  const char *v5; // eax@5
  GameFrameWork *v6; // ecx@5
  Item *v7; // eax@7
  ItemInfo *v8; // ebx@8
  int v9; // esi@8
  char *v10; // eax@8
  char v11; // dl@9
  unsigned int v12; // eax@11
  char *v13; // edi@11
  char v14; // cl@12
  bool v15; // zf@16
  Item *v16; // edi@40
  int v17; // ebx@44
  NiUnsharedGeometryGroup *v18; // esi@44
  Item *v19; // esi@51
  ItemInfo *v20; // edi@53
  int v21; // esi@55
  int v22; // esi@56
  char *v23; // eax@57
  NiD3DDefaultShader *v24; // eax@57
  int v25; // ebx@57
  NiUnsharedGeometryGroup *v26; // esi@57
  signed int v27; // eax@61
  MsgBox **v28; // esi@63
  char *v29; // eax@64
  NiD3DDefaultShader *v30; // eax@64
  PgFrameWork *v31; // eax@64
  int v32; // ebx@65
  NiUnsharedGeometryGroup *v33; // esi@65
  Item *v34; // eax@71
  ItemInfo *v35; // eax@73
  char *v36; // eax@76
  char *v37; // eax@76
  MsgBox *v38; // edi@76
  CursorState *v39; // eax@76
  PgFrameWork *v40; // eax@76
  Item *v41; // edi@81
  _BYTE *v42; // eax@83
  __int16 v43; // ax@87
  GameFrameWork *v44; // ebx@87
  char *v45; // eax@87
  RandomOptCountRecoverWin *v46; // eax@90
  GameFrameWork *v47; // ebx@91
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v48; // [sp-1Ch] [bp-300h]@87
  unsigned int v49; // [sp-8h] [bp-2ECh]@76
  Item *v50; // [sp-4h] [bp-2E8h]@11
  unsigned int kFrom; // [sp+Ch] [bp-2D8h]@1
  SHINE_ITEM_STRUCT kStruct; // [sp+10h] [bp-2D4h]@8
  PgMsg::Frame kCancelMsg; // [sp+78h] [bp-26Ch]@76
  PgMsg::Frame kOkMsg; // [sp+8Ch] [bp-258h]@64
  char pText; // [sp+A0h] [bp-244h]@14
  char v56; // [sp+19Fh] [bp-145h]@11
  char dest; // [sp+1A0h] [bp-144h]@10
  char string; // [sp+2A0h] [bp-44h]@11

  v2 = this;
  kFrom = uiInvIndex;
  if ( !InventoryWin::ms_uiMode )
  {
    this->m_bDivide = InventoryWin::ms_uiMode;
    if ( g_pkKeyboard->m_aucKeystate[7] & 1 )
    {
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      v4 = v3;
      kFrom = (unsigned int)v3;
      if ( v3 && GameFrameWork::IsRoarShowWin(v3) )
      {
        v5 = (const char *)TextData3::Get(0x5F9769D4u);
        v6 = v4;
LABEL_92:
        GameFrameWork::AddSysMsg(v6, v5);
        return;
      }
      if ( uiInvIndex < 0xC0 )
      {
        v7 = ItemIcon::GetItem((ItemIcon *)&v2->m_apkInvWin[uiInvIndex]->vfptr);
        if ( v7 )
        {
          v8 = v7->m_pkInfo;
          qmemcpy(&kStruct, &v7->m_kStruct, sizeof(kStruct));
          v9 = ((int (__thiscall *)(Item *))v7->vfptr[9].__vecDelDtor)(v7);
          v10 = v8->Name;
          do
            v11 = *v10++;
          while ( v11 );
          strncpy(&dest, v8->Name, v10 - &v8->Name[1] + 1);
          if ( v9 )
          {
            v50 = (Item *)v9;
            sprintf(&string, " [+%d]", v9);
            v12 = strlen(&string) + 1;
            v13 = &v56;
            do
              v14 = (v13++)[1];
            while ( v14 );
            qmemcpy(v13, &string, v12);
          }
          sprintf(&pText, "<\t%s\t>", &dest);
          if ( kFrom )
            GameFrameWork::ChatItemLink((GameFrameWork *)kFrom, &pText, &kStruct);
        }
      }
      return;
    }
    v15 = (g_pkKeyboard->m_aucKeystate[5] & 4) == 0;
    v50 = (Item *)uiInvIndex;
    if ( !v15 )
    {
      InventoryWin::OnInvShiftLClickNormalMode(this, (unsigned int)v50);
      return;
    }
LABEL_21:
    InventoryWin::OnInvLClickNormalMode(this, (unsigned int)v50);
    return;
  }
  if ( InventoryWin::ms_uiMode == 1 )
  {
    this->m_bDivide = 0;
    v15 = (g_pkKeyboard->m_aucKeystate[5] & 4) == 0;
    v50 = (Item *)uiInvIndex;
    if ( !v15 )
    {
      InventoryWin::OnInvShiftLClickShopMode(this, (unsigned int)v50);
      return;
    }
    goto LABEL_21;
  }
  switch ( InventoryWin::ms_uiMode )
  {
    case 2u:
      this->m_bDivide = 0;
      v15 = (g_pkKeyboard->m_aucKeystate[5] & 4) == 0;
      v50 = (Item *)uiInvIndex;
      if ( v15 )
        InventoryWin::OnInvLClickBankMode(this, (unsigned int)v50);
      else
        InventoryWin::OnInvShiftLClickBankMode(this, (unsigned int)v50);
      break;
    case 3u:
      this->m_bDivide = 0;
      v15 = (g_pkKeyboard->m_aucKeystate[5] & 4) == 0;
      v50 = (Item *)uiInvIndex;
      if ( v15 )
        InventoryWin::OnInvLClickPrivateStoreMode(this, (unsigned int)v50);
      else
        InventoryWin::OnInvShiftLClickPrivateStoreMode(this, (unsigned int)v50);
      break;
    case 4u:
      this->m_bDivide = 0;
      v15 = (g_pkKeyboard->m_aucKeystate[5] & 4) == 0;
      v50 = (Item *)uiInvIndex;
      if ( v15 )
        InventoryWin::OnInvLClickGttStoreMode(this, (unsigned int)v50);
      else
        InventoryWin::OnInvShiftLClickGttStoreMode(this, (unsigned int)v50);
      break;
    case 5u:
      this->m_bDivide = 0;
      v15 = (g_pkKeyboard->m_aucKeystate[5] & 4) == 0;
      v50 = (Item *)uiInvIndex;
      if ( v15 )
        InventoryWin::OnInvLClickGuildAcademyStorageMode(this, (unsigned int)v50);
      else
        InventoryWin::OnInvShiftLClickGuildAcademyStorageMode(this, (unsigned int)v50);
      break;
    case 6u:
      if ( uiInvIndex < 0xC0 )
        v16 = g_kInventory.m_aspInv[uiInvIndex].m_pObject;
      else
        v16 = 0;
      if ( (unsigned __int8)((int (__thiscall *)(Item *))v16->vfptr[1].__vecDelDtor)(v16) == 26
        || (unsigned __int8)((int (__thiscall *)(Item *))v16->vfptr[1].__vecDelDtor)(v16) == 37 )
      {
        InventoryWin::OnClickRepairItem(v2, (ITEM_INVEN)(uiInvIndex & 0x3FF | 0x2400));
      }
      else
      {
        v17 = (int)&v2->vfptr;
        v18 = TextData2::Get(0xB23A203F);
        if ( *(_DWORD *)(v17 + 4) )
        {
          (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v17 + 4) + 4))(25, v18, v17);
          if ( *(_DWORD *)(v17 + 4) )
            (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v17 + 4) + 20))(
              25,
              v18,
              v17);
        }
        (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v17 + 20))(
          v17,
          25,
          v18,
          v17);
      }
      break;
    case 7u:
      if ( uiInvIndex < 0xC0 )
        v19 = g_kInventory.m_aspInv[uiInvIndex].m_pObject;
      else
        v19 = 0;
      v20 = v19->m_pkInfo;
      if ( (unsigned __int8)((int (__thiscall *)(Item *))v19->vfptr[1].__vecDelDtor)(v19) != 5 || v20->Type )
      {
        v32 = (int)&v2->vfptr;
        v33 = TextData2::Get(0x569771CAu);
        if ( *(_DWORD *)(v32 + 4) )
        {
          (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v32 + 4) + 4))(25, v33, v32);
          if ( *(_DWORD *)(v32 + 4) )
            (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v32 + 4) + 20))(
              25,
              v33,
              v32);
        }
        (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v32 + 20))(
          v32,
          25,
          v33,
          v32);
      }
      else
      {
        v21 = (int)&v19->m_kStruct;
        qmemcpy(&kStruct, (const void *)v21, 0x64u);
        v21 += 100;
        *((_WORD *)&kStruct.itemattr.Bracelet + 49) = *(_WORD *)v21;
        *((_BYTE *)&kStruct.itemattr.Bracelet + 100) = *(_BYTE *)(v21 + 2);
        if ( kStruct.itemattr.weapon.createdSocketCount )
        {
          v22 = (int)&v2->m_spMsgBox;
          if ( !v2->m_spMsgBox.m_pObject )
          {
            v23 = (char *)TextData2::Get(0xE3E2319u);
            v24 = (NiD3DDefaultShader *)MsgBox::Modeless(MSGBOX_OK, v23);
            NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spMsgBox, v24);
            v25 = (int)&v2->vfptr;
            (**(void (__thiscall ***)(_DWORD, _DWORD))(*(_DWORD *)v22 + 232))(*(_DWORD *)v22 + 232, v25);
            v26 = TextData2::Get(0xE3E2319u);
            if ( *(_DWORD *)(v25 + 4) )
            {
              (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v25 + 4) + 4))(
                25,
                v26,
                v25);
              if ( *(_DWORD *)(v25 + 4) )
                (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v25 + 4) + 20))(
                  25,
                  v26,
                  v25);
            }
            (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v25 + 20))(
              v25,
              25,
              v26,
              v25);
          }
        }
        else
        {
          v27 = v2->m_iEnchantAddItemInvIdx;
          if ( v27 >= 0 && v27 < 192 )
          {
            v28 = &v2->m_spMsgBox.m_pObject;
            if ( !v2->m_spMsgBox.m_pObject )
            {
              v29 = (char *)TextData2::Get(0x123B201Cu);
              v30 = (NiD3DDefaultShader *)MsgBox::Modeless(MSGBOX_OKCANCEL, v29);
              NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spMsgBox, v30);
              kOkMsg.m_uiFrameWParam = v2->m_iEnchantAddItemInvIdx;
              kOkMsg.m_uiFrameMsg = 255;
              kOkMsg.m_uiFramelParam = kFrom | 0x2400;
              v31 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
              MsgBox::SetFrameWorkMsgOnClose(*v28, v31, &kOkMsg, 0);
              (*v28)->vfptr->SetMsgHooker(&(*v28)->vfptr, &v2->vfptr);
            }
          }
        }
      }
      break;
    case 8u:
      if ( uiInvIndex < 0xC0 )
        v34 = g_kInventory.m_aspInv[uiInvIndex].m_pObject;
      else
        v34 = 0;
      v35 = v34->m_pkInfo;
      if ( v35 )
        v50 = (Item *)v35->Name;
      else
        v50 = (Item *)&unk_98EA4B;
      v36 = (char *)TextData2::Get(0x6F9FCDEAu);
      v37 = fs(v36, v50);
      v38 = MsgBox::Modal(MSGBOX_OKCANCEL, v37, v49);
      Singleton<CursorState>::getInstance();
      CursorState::SetState(v39, 0);
      kOkMsg.m_uiFrameMsg = 263;
      kCancelMsg.m_uiFrameMsg = 266;
      kOkMsg.m_uiFramelParam = uiInvIndex;
      v40 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      MsgBox::SetFrameWorkMsgOnClose(v38, v40, &kOkMsg, &kCancelMsg);
      if ( v2 )
        v38->vfptr->SetMsgHooker(&v38->vfptr, &v2->vfptr);
      else
        v38->vfptr->SetMsgHooker(&v38->vfptr, 0);
      break;
    default:
      if ( InventoryWin::ms_uiMode != 9 )
        return;
      if ( uiInvIndex < 0xC0 )
        v41 = g_kInventory.m_aspInv[uiInvIndex].m_pObject;
      else
        v41 = 0;
      v42 = (_BYTE *)((int (__thiscall *)(Item *))v41->vfptr[12].__vecDelDtor)(v41);
      if ( !v42 || v2->m_iRecoveryCountItemInvIdx < 0 || !(*v42 & 0xFE) )
      {
        v47 = (GameFrameWork *)v2->m_pkFrameWork;
        v5 = (const char *)TextData3::Get(0x98BEF7C3);
        v6 = v47;
        goto LABEL_92;
      }
      if ( !(unsigned __int8)((int (__thiscall *)(Item *))v41->vfptr[18].__vecDelDtor)(v41) )
      {
        kFrom = (unsigned int)&v48;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
          &v48,
          "LimitRandomOption");
        v43 = CSingleDataMap::GetValue(&g_kSingleDataMap, v48);
        v44 = (GameFrameWork *)v2->m_pkFrameWork;
        v50 = (Item *)(unsigned __int16)v43;
        v45 = (char *)TextData3::Get(0x96BEF7C3);
        v5 = fs(v45, v50);
        v6 = v44;
        goto LABEL_92;
      }
      if ( !v2->m_pkRandomOptCountRecoverWin )
        v2->m_pkRandomOptCountRecoverWin = RandomOptCountRecoverWin::CreateWin(v2->m_pkFrameWork);
      v46 = RandomOptCountRecoverWin::Modal(v2->m_pkRandomOptCountRecoverWin);
      v50 = v41;
      v49 = uiInvIndex;
      v2->m_pkRandomOptCountRecoverWin = v46;
      RandomOptCountRecoverWin::SetRecoverCountItemSlot(v46, v49, v50);
      break;
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (00522160) --------------------------------------------------------
void __userpurge InventoryWin::OnInvRClickNormalMode(InventoryWin *this@<ecx>, double a2@<st0>, unsigned int uiInvIndex)
{
  InventoryWin *v3; // edi@1
  Item *v4; // eax@2
  Item *v5; // esi@2
  ItemInfo *v6; // ebx@3
  ItemTypeEnum v7; // eax@4
  int v8; // eax@5
  unsigned int v9; // esi@8
  CollectCard *v10; // eax@8
  unsigned int v11; // eax@9
  ItemUseTask *v12; // esi@15
  int uiStar; // [sp+4h] [bp-8h]@8

  v3 = this;
  if ( uiInvIndex < 0xC0 )
  {
    v4 = ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[uiInvIndex]->vfptr);
    v5 = v4;
    if ( v4 )
    {
      v6 = v4->m_pkInfo;
      if ( v6 )
      {
        v7 = v6->Type;
        if ( v7 )
        {
          v8 = v7 - 1;
          if ( v8 )
          {
            if ( v8 == 5 && v6->Class == 31 )
            {
              uiStar = ((int (__thiscall *)(Item *))v5->vfptr[16].__vecDelDtor)(v5);
              v9 = ((int (__thiscall *)(Item *))v5->vfptr[14].__vecDelDtor)(v5);
              v10 = CollectCardTab::GetByItemInx(v6->InxName);
              if ( v10 )
                v11 = v10->CC_CardID;
              else
                v11 = 0;
              GameFrameWork::RegisterCard((GameFrameWork *)v3->m_pkFrameWork, a2, uiInvIndex, v11, uiStar, v9);
            }
          }
          else if ( v6->Class == 30 )
          {
            if ( GameFrameWork::PlayCardEffect((GameFrameWork *)v3->m_pkFrameWork, a2) )
            {
              InvWin::SetLock(v3->m_apkInvWin[uiInvIndex], 1);
              v3->m_uiCloseCardInvIndex = uiInvIndex;
              v3->m_pkCloseCardItem = v5;
            }
          }
          else
          {
            v12 = ISingletonTask<ItemUseTask>::Run();
            ItemUseTask::SetInventoryIndex(v12, uiInvIndex);
            v12->vfptr->SetMsgHooker(&v12->vfptr, v3->m_pkFrameWork);
          }
        }
        else
        {
          GameFrameWork::NcItemEquipReq((GameFrameWork *)v3->m_pkFrameWork, uiInvIndex);
        }
      }
    }
  }
}

//----- (00522290) --------------------------------------------------------
void __thiscall InventoryWin::OnInvShiftRClickNormalMode(InventoryWin *this, unsigned int uiInvIndex)
{
  InventoryWin *v2; // edi@1
  Item *v3; // eax@3
  Item *v4; // ebx@3
  ItemInfo *v5; // esi@4
  ItemViewInfo *v6; // eax@5
  CQuestData *v7; // eax@6
  unsigned int v8; // eax@7
  PgFrameWork *v9; // ecx@8
  ChatColorSpinWin *v10; // ebx@8
  ChatColorInfo v11; // ST00_16@10
  TermExtendWin *v12; // ebx@12
  _BYTE v13[12]; // ST04_12@14
  int v14; // edi@20
  NiUnsharedGeometryGroup *v15; // esi@20
  ItemClassEnum v16; // eax@24
  int v17; // edi@30
  NiUnsharedGeometryGroup *v18; // esi@30
  unsigned int v19; // ST0C_4@40
  __int64 v20; // rax@40
  ItemUseTask *v21; // esi@41
  ItemUseTask *v22; // ebx@47
  ItemUseTask *v23; // ebx@50
  ItemUseTask *v24; // esi@52
  PgFrameWork *v25; // eax@53
  MHDiceGameTask *v26; // esi@54
  CClientQuest *v27; // eax@56
  CQuestData *v28; // esi@57
  QUEST_DATA *v29; // eax@58
  QUEST_DATA *v30; // ebx@58
  QUEST_DATA *v31; // eax@62
  PgFrameWork *v32; // eax@65
  PgFrameWork *v33; // esi@65
  unsigned int v34; // ebx@71
  CollectCard *v35; // eax@71
  unsigned int v36; // eax@72
  unsigned int pkExtendInfo_8; // [sp+18h] [bp-18h]@0
  int v38; // [sp+1Ch] [bp-14h]@0
  CQuest *uiCardID; // [sp+20h] [bp-10h]@56
  unsigned int uiStar; // [sp+24h] [bp-Ch]@3
  int uiStara; // [sp+24h] [bp-Ch]@71
  NiPointer<MHDiceGameTask> result; // [sp+28h] [bp-8h]@54
  CQuestData *pQData; // [sp+2Ch] [bp-4h]@6
  int i; // [sp+38h] [bp+8h]@57

  v2 = this;
  if ( uiInvIndex >= 0xC0 )
    return;
  if ( !this->m_apkInvWin[uiInvIndex] )
    return;
  ((void (__stdcall *)(_DWORD))this->m_apkInvWin[uiInvIndex]->vfptr[81].__vecDelDtor)(0.0);
  v3 = ItemIcon::GetItem((ItemIcon *)&v2->m_apkInvWin[uiInvIndex]->vfptr);
  v4 = v3;
  uiStar = (unsigned int)v3;
  if ( !v3 )
    return;
  v5 = v3->m_pkInfo;
  if ( !v5 )
    return;
  v6 = IIDTableBase<ItemViewInfo,ItemViewInfoTab,unsigned short>::GetByID(v5->ID);
  if ( !v6 )
    goto LABEL_77;
  v7 = (CQuestData *)ChargedEffectTable::GetByInxName(v6->InxName);
  pQData = v7;
  if ( !v7 )
    goto LABEL_77;
  v8 = v7->m_hashmap_QuestData._List._Mysize;
  if ( v8 == 36 )
  {
    v9 = v2->m_pkFrameWork;
    v10 = *(ChatColorSpinWin **)&v9[141].m_bInit;
    if ( v10 )
    {
      if ( !(unsigned __int8)((int (__thiscall *)(_DWORD))v10->vfptr[65].__vecDelDtor)(*(_DWORD *)&v9[141].m_bInit) )
      {
        *(_QWORD *)&v11.uiInveInx = __PAIR__(v5->ID, uiInvIndex);
        v11.uiColorType = *(_WORD *)&pQData->m_hashmap_QuestData._List._Alnod.0;
        *(_DWORD *)&v11.kChatColorID = v38;
        ChatColorSpinWin::SetChatColorInfo(v10, v11);
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v10->vfptr);
        InvWin::SetLock(v2->m_apkInvWin[uiInvIndex], 1);
      }
    }
    return;
  }
  if ( v8 == 37 )
  {
    v12 = (TermExtendWin *)v2->m_pkFrameWork[142].m_pkMsgHooker;
    if ( v12 )
    {
      if ( !(unsigned __int8)((int (__thiscall *)(TermExtendWin *))v12->vfptr[65].__vecDelDtor)(v12) )
      {
        LOWORD(pkExtendInfo_8) = HIWORD(pQData->m_hashmap_QuestData._List._Myhead);
        *(_DWORD *)v13 = (char *)v5 + 2;
        *(_QWORD *)&v13[4] = __PAIR__(uiInvIndex, pkExtendInfo_8);
        TermExtendWin::SetExtendInfo(v12, *(ExtendItemInfo *)v13);
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v12->vfptr);
        if ( !(unsigned __int8)((int (__thiscall *)(InventoryWin *))v2->vfptr[65].__vecDelDtor)(v2) )
          PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
      }
    }
  }
  else
  {
LABEL_77:
    SoundMgr::PlayItemPutSound(v5->ID);
    switch ( v5->Type )
    {
      case 0:
        if ( !Inventory::IsHandedItem(v5) )
          goto LABEL_34;
        if ( v5->WeaponType == 16 || Inventory::CanIEquipHandedItem(v5) )
        {
          v16 = v5->Class;
          if ( v16 != 26 && v16 != 37
            || Inventory::GetEquipedWeapon(&g_kInventory)
            || (pQData = 0, Char::GetAniCode(g_pkMainChar, 0, (unsigned int *)&pQData, 0),
                            pQData != (CQuestData *)300000)
            && pQData != (CQuestData *)600000
            && pQData != (CQuestData *)700000 )
          {
LABEL_34:
            if ( v5->ItemGradeType == 4
              && ((int (__thiscall *)(Item *))v4->vfptr[11].__vecDelDtor)(v4)
              && !*(_BYTE *)((int (__thiscall *)(Item *))v4->vfptr[11].__vecDelDtor)(v4) )
            {
              goto LABEL_78;
            }
            if ( !CItemAuthorityBase::IA_IsDataPutOnBelonged(&g_kItemAuthority, v5->BT_Inx) )
            {
              GameFrameWork::NcItemEquipReq((GameFrameWork *)v2->m_pkFrameWork, uiInvIndex);
              return;
            }
            if ( Item::GetPutOnBelongState(v4) )
            {
              GameFrameWork::NcItemEquipReq((GameFrameWork *)v2->m_pkFrameWork, uiInvIndex);
              return;
            }
            if ( v5->Type
              || (v19 = (unsigned __int8)User::GetMainCharClass(&g_kUser),
                  v20 = CharClass::GetBitbyClassType(v5->UseClass),
                  CharClass::TestChrClassMask(v20, v19)) )
            {
LABEL_78:
              v21 = ISingletonTask<ItemUseTask>::Run();
              ItemUseTask::SetInventoryIndex(v21, uiInvIndex);
              v21->vfptr->SetMsgHooker(&v21->vfptr, v2->m_pkFrameWork);
              ItemUseTask::SetGameFrameWork(v21, (GameFrameWork *)v2->m_pkFrameWork);
              return;
            }
          }
          else
          {
            v17 = (int)&v2->vfptr;
            v18 = TextData2::Get(0x43B5B3C5u);
            if ( *(_DWORD *)(v17 + 4) )
            {
              (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v17 + 4) + 4))(
                25,
                v18,
                v17);
              if ( *(_DWORD *)(v17 + 4) )
                (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v17 + 4) + 20))(
                  25,
                  v18,
                  v17);
            }
            (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v17 + 20))(
              v17,
              25,
              v18,
              v17);
          }
        }
        else
        {
          v14 = (int)&v2->vfptr;
          v15 = TextData2::Get(0xA6FD0F42);
          if ( *(_DWORD *)(v14 + 4) )
          {
            (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v14 + 4) + 4))(
              25,
              v15,
              v14);
            if ( *(_DWORD *)(v14 + 4) )
              (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v14 + 4) + 20))(
                25,
                v15,
                v14);
          }
          (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v14 + 20))(
            v14,
            25,
            v15,
            v14);
        }
        break;
      case 1:
        if ( v5->Class == 30 )
        {
          if ( GameFrameWork::PlayCardEffect((GameFrameWork *)v2->m_pkFrameWork, 0.0) )
          {
            InvWin::SetLock(v2->m_apkInvWin[uiInvIndex], 1);
            v2->m_uiCloseCardInvIndex = uiInvIndex;
            v2->m_pkCloseCardItem = v4;
          }
        }
        else
        {
          v22 = ISingletonTask<ItemUseTask>::Run();
          ItemUseTask::SetInventoryIndex(v22, uiInvIndex);
          v22->vfptr->SetMsgHooker(&v22->vfptr, v2->m_pkFrameWork);
          if ( v5->Class == 18 )
            GameFrameWork::OpenMiniHouseInventoryWin((GameFrameWork *)v2->m_pkFrameWork);
        }
        return;
      case 2:
        if ( v5->Class == 13 )
        {
          v23 = ISingletonTask<ItemUseTask>::Run();
          ItemUseTask::SetInventoryIndex(v23, uiInvIndex);
          v23->vfptr->SetMsgHooker(&v23->vfptr, v2->m_pkFrameWork);
        }
        if ( !strcmp(v5->InxName, "ProposeRing") )
        {
          v24 = ISingletonTask<ItemUseTask>::Run();
          ItemUseTask::SetInventoryIndex(v24, uiInvIndex);
          v24->vfptr->SetMsgHooker(&v24->vfptr, v2->m_pkFrameWork);
        }
        return;
      case 5:
        v25 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
        if ( !(unsigned __int8)(*(int (**)(void))(*(_DWORD *)v25[22].m_kMsgQ.m_uiHead + 260))() )
        {
          v26 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
          NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&result);
          if ( v26 )
            MHDiceGameTask::NcGambleCoinVipcardUIopenReq(uiInvIndex);
        }
        return;
      case 4:
        v27 = QuestDataMgr::GetQuest();
        uiCardID = (CQuest *)v27;
        if ( v27 )
        {
          v28 = v27->m_pQuestData;
          pQData = v27->m_pQuestData;
          i = 0;
          if ( CQuestData::GetNumOfQuestData(pQData) > 0u )
          {
            do
            {
              v29 = CQuestData::GetQuestDataByIndex(v28, i);
              v30 = v29;
              if ( v29 )
              {
                if ( v29->Start.bItem )
                {
                  if ( !v29->Start.bNPC && v29->Start.ItemID == *(_WORD *)(uiStar + 8) )
                  {
                    v31 = CQuest::GetNewQuestStatus(uiCardID, v29->ID);
                    if ( v31 == (QUEST_DATA *)5 || v31 == (QUEST_DATA *)9 || v31 == (QUEST_DATA *)4 )
                    {
                      v32 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
                      v33 = v32;
                      if ( v32 )
                      {
                        QuestStartItemWin::ResetViewPoint((QuestStartItemWin *)v32[35].m_kMsgQ.m_uiTail);
                        QuestStartItemWin::SetQuestInfo((QuestStartItemWin *)v33[35].m_kMsgQ.m_uiTail, v30->ID);
                        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)v33[35].m_kMsgQ.m_uiTail);
                        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
                        PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)v33[35].m_kMsgQ.m_uiTail);
                      }
                      v28 = pQData;
                    }
                  }
                }
              }
              ++i;
            }
            while ( i < CQuestData::GetNumOfQuestData(v28) );
          }
        }
        return;
      case 6:
        if ( v5->Class == 31 )
        {
          uiStara = ((int (__thiscall *)(Item *))v4->vfptr[16].__vecDelDtor)(v4);
          v34 = ((int (__thiscall *)(Item *))v4->vfptr[14].__vecDelDtor)(v4);
          v35 = CollectCardTab::GetByItemInx(v5->InxName);
          if ( v35 )
            v36 = v35->CC_CardID;
          else
            v36 = 0;
          GameFrameWork::RegisterCard((GameFrameWork *)v2->m_pkFrameWork, 0.0, uiInvIndex, v36, uiStara, v34);
        }
        return;
      default:
        return;
    }
  }
}

//----- (00522930) --------------------------------------------------------
bool __thiscall InventoryWin::DropOnEquip(InventoryWin *this, DropContents *pkContents, unsigned int uiReceiverInvIndex)
{
  DropContents::SenderType v3; // edi@1
  InventoryWin *v4; // ebx@1
  _WORD *v5; // eax@2
  unsigned int v6; // esi@5
  Item *v7; // eax@6
  Item *v8; // edi@6
  ItemInfo *v9; // esi@7
  unsigned int v10; // ST08_4@11
  __int64 v11; // rax@11
  ItemUseTask *v12; // esi@12
  bool result; // al@12
  ItemEquipEnum v14; // eax@13
  unsigned int v15; // edi@13
  MinimonInfo *v16; // eax@18
  NiUnsharedGeometryGroup *v17; // edi@27
  NiUnsharedGeometryGroup *v18; // edi@38
  unsigned int uiSenderInvIndex; // [sp+14h] [bp+8h]@5

  v3 = pkContents->m_eSenderType;
  v4 = this;
  if ( pkContents->m_eType == CT_ITEM )
  {
    v5 = pkContents->m_apvParam[0];
    if ( v5 )
      SoundMgr::PlayItemPutSound(v5[4]);
  }
  if ( v3 )
    return 0;
  v6 = pkContents->m_uiSenderIndex;
  uiSenderInvIndex = v6;
  if ( v6 >= 0xC0 )
    return 0;
  v7 = ItemIcon::GetItem((ItemIcon *)&v4->m_apkInvWin[v6]->vfptr);
  v8 = v7;
  if ( !v7 )
    return 0;
  v9 = v7->m_pkInfo;
  if ( v9->Type )
    return 0;
  if ( CItemAuthorityBase::IA_IsDataPutOnBelonged(&g_kItemAuthority, v9->BT_Inx)
    && Item::GetPutOnBelongState(v8) == SPOBI_NOT_BELONGED )
  {
    if ( v9->Type
      || (v10 = (unsigned __int8)User::GetMainCharClass(&g_kUser),
          v11 = CharClass::GetBitbyClassType(v9->UseClass),
          CharClass::TestChrClassMask(v11, v10)) )
    {
      v12 = ISingletonTask<ItemUseTask>::Run();
      ItemUseTask::SetInventoryIndex(v12, uiSenderInvIndex);
      v12->vfptr->SetMsgHooker(&v12->vfptr, v4->m_pkFrameWork);
      ItemUseTask::SetGameFrameWork(v12, (GameFrameWork *)v4->m_pkFrameWork);
      return 1;
    }
    return 1;
  }
  v14 = v9->Equip;
  v15 = uiReceiverInvIndex;
  if ( v14 == 15 && (uiReceiverInvIndex == 15 || uiReceiverInvIndex == 16) )
  {
    GameFrameWork::NcItemRingEquipReq((GameFrameWork *)v4->m_pkFrameWork, uiSenderInvIndex, uiReceiverInvIndex);
    return 1;
  }
  if ( v14 == 25 )
  {
    v16 = MinimonInfoTable::GetMinimonInfoByIDX(v9->InxName);
    if ( v16 && v16->MinimonEquipPos == 2 && (v15 == 25 || v15 == 28) )
    {
      GameFrameWork::NcItemMiniMonEquipReq((GameFrameWork *)v4->m_pkFrameWork, uiSenderInvIndex, v15);
      result = 1;
    }
    else
    {
      GameFrameWork::NcItemEquipReq((GameFrameWork *)v4->m_pkFrameWork, uiSenderInvIndex);
      result = 1;
    }
    return result;
  }
  if ( !Inventory::IsHandedItem(v9) )
    goto LABEL_46;
  if ( v9->WeaponType != 16 && !Inventory::CanIEquipHandedItem(v9) )
  {
    v17 = TextData2::Get(0xA6FD0F42);
    if ( v4->m_pkMsgHooker )
    {
      ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v4->m_pkMsgHooker->vfptr->SendDirectMessage)(
        25,
        v17,
        &v4->vfptr);
      if ( v4->m_pkMsgHooker )
        ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v4->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          25,
          v17,
          &v4->vfptr);
    }
    v4->vfptr->DirectDispatchToParent((IDirectMessenger *)&v4->vfptr, 25, v17, (IDirectMessenger *)&v4->vfptr);
    return 0;
  }
  if ( v9->Class != 26
    || Inventory::GetEquipedWeapon(&g_kInventory) && v9->Class != 37
    || (uiReceiverInvIndex = 0, Char::GetAniCode(g_pkMainChar, 0, &uiReceiverInvIndex, 0), uiReceiverInvIndex != 300000)
    && uiReceiverInvIndex != 600000
    && uiReceiverInvIndex != 700000 )
  {
LABEL_46:
    GameFrameWork::NcItemEquipReq((GameFrameWork *)v4->m_pkFrameWork, uiSenderInvIndex);
    return 1;
  }
  v18 = TextData2::Get(0x43B5B3C5u);
  if ( v4->m_pkMsgHooker )
  {
    ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v4->m_pkMsgHooker->vfptr->SendDirectMessage)(
      25,
      v18,
      &v4->vfptr);
    if ( v4->m_pkMsgHooker )
      ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v4->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
        25,
        v18,
        &v4->vfptr);
  }
  v4->vfptr->DirectDispatchToParent((IDirectMessenger *)&v4->vfptr, 25, v18, (IDirectMessenger *)&v4->vfptr);
  return 0;
}

//----- (00522BF0) --------------------------------------------------------
bool __thiscall InvWin::EatDropInstance(InvWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  InvWin *v4; // edi@1
  bool result; // al@2
  DropContents *v6; // esi@5
  DropContents::SenderType v7; // eax@8
  InventoryWin *v8; // ecx@18

  v4 = this;
  if ( !this->m_bLock && *pkDrop && this->m_bActive )
  {
    v6 = (DropContents *)(*pkDrop)->m_pkContents;
    if ( !v6
      || InventoryWin::ms_uiMode != 1 && v6->m_eType
      || (v7 = v6->m_eSenderType) != 0
      && v7 != 1
      && v7 != 2
      && v7 != 6
      && v7 != 5
      && v7 != 7
      && v7 != 3
      && v7 != 19
      && v7 != 13 )
    {
      result = 0;
    }
    else
    {
      v8 = (InventoryWin *)PgWin::GetParentWin((PgWin *)&this->vfptr);
      if ( v4->m_uiInvType == 9 )
        result = InventoryWin::DropOnInv(v8, v6, v4->m_uiInvIndex);
      else
        result = InventoryWin::DropOnEquip(v8, v6, v4->m_uiInvIndex);
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (00522CA0) --------------------------------------------------------
void __thiscall ChargedItemInvenWin::OnCommand(ChargedItemInvenWin *this, unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@6
  unsigned int v4; // eax@10

  if ( wParam - 4 > 0x17 )
  {
    switch ( wParam )
    {
      case 1u:
        v4 = this->m_uiCurrPage;
        if ( v4 )
          this->m_uiCurrPage = v4 - 1;
        LOWORD(wParam) = this->m_uiCurrPage;
        NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x20u, &wParam, 2);
        break;
      case 2u:
        if ( g_kChargedItem.m_NumOfChargedItem >= 0x18u )
        {
          ++this->m_uiCurrPage;
          LOWORD(wParam) = this->m_uiCurrPage;
          NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x20u, &wParam, 2);
        }
        break;
      case 3u:
        v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
        if ( v3 )
          GameFrameWork::OpenPlayGuideSearchList(v3, "ChrInv");
        break;
    }
  }
  else
  {
    ChargedItemInvenWin::OnInvRClick(this, wParam + 24 * this->m_uiCurrPage - 4);
  }
}

//----- (00522D60) --------------------------------------------------------
void __thiscall InventoryWin::OnInvRClick(InventoryWin *this, unsigned int uiInvIndex, unsigned int uiUser)
{
  InventoryWin *v3; // ebx@1
  InvWin *v4; // ecx@3
  Item *v5; // eax@8
  Item *v6; // esi@8
  ItemInfo *v7; // eax@9
  _DWORD *v8; // eax@12
  int v9; // eax@13
  Item *v10; // eax@19
  Item *v11; // edi@19
  ItemInfo *v12; // esi@20
  E_BelongType v13; // ST10_4@21
  SHINE_PUT_ON_BELONGED_ITEM v14; // eax@23
  SHINE_PUT_ON_BELONGED_ITEM v15; // eax@26
  SHINE_PUT_ON_BELONGED_ITEM v16; // eax@27
  _DWORD *v17; // eax@28
  int v18; // eax@29
  Item *v19; // eax@40
  Item *v20; // edi@40
  ItemInfo *v21; // esi@41
  E_BelongType v22; // ST10_4@42
  SHINE_PUT_ON_BELONGED_ITEM v23; // eax@44
  SHINE_PUT_ON_BELONGED_ITEM v24; // eax@47
  SHINE_PUT_ON_BELONGED_ITEM v25; // eax@48
  _DWORD *v26; // eax@50
  int v27; // eax@51
  GameFrameWork *v28; // esi@54
  NiUnsharedGeometryGroup *v29; // eax@54
  unsigned int v30; // [sp-Ch] [bp-10h]@11

  v3 = this;
  if ( !Char::CheckActState(g_pkMainChar, 500000) && !g_pkMainChar->m_bWillDead )
  {
    v4 = v3->m_apkInvWin[uiInvIndex];
    if ( !v4->m_bLock && !PgCursor::ms_pkDrop )
    {
      if ( InventoryWin::ms_uiMode && uiUser != 1 )
      {
        if ( InventoryWin::ms_uiMode == 1 )
        {
          v5 = ItemIcon::GetItem((ItemIcon *)&v4->vfptr);
          v6 = v5;
          if ( !v5 )
            goto LABEL_59;
          v7 = v5->m_pkInfo;
          if ( v7 && !CItemAuthorityBase::IA_CanNpcSell(&g_kItemAuthority, v7->BT_Inx) )
          {
            v30 = -1533312649;
LABEL_54:
            v28 = (GameFrameWork *)v3->m_pkFrameWork;
            v29 = TextData::Get(v30);
            GameFrameWork::AddSysMsg(v28, (const char *)v29);
            return;
          }
          v8 = (_DWORD *)((int (__thiscall *)(Item *))v6->vfptr[11].__vecDelDtor)(v6);
          if ( !v8 || (v9 = *v8 & 0xFF) == 0 || v9 == 255 )
          {
LABEL_59:
            InventoryWin::OnInvShiftRClickShopMode(v3, uiInvIndex);
            return;
          }
LABEL_53:
          v30 = -1634432127;
          goto LABEL_54;
        }
        if ( InventoryWin::ms_uiMode == 2 )
        {
          if ( PgWin::ms_bShiftPressed )
          {
            InventoryWin::OnInvRClickBankMode(v3, uiInvIndex);
            return;
          }
          v10 = ItemIcon::GetItem((ItemIcon *)&v4->vfptr);
          v11 = v10;
          if ( !v10 )
            goto LABEL_31;
          v12 = v10->m_pkInfo;
          if ( !v12 )
          {
LABEL_28:
            v17 = (_DWORD *)((int (__thiscall *)(Item *))v11->vfptr[11].__vecDelDtor)(v11);
            if ( v17 )
            {
              v18 = *v17 & 0xFF;
              if ( v18 )
              {
                if ( v18 != 255 )
                  goto LABEL_53;
              }
            }
LABEL_31:
            InventoryWin::OnInvRClickBankMode(v3, uiInvIndex);
            return;
          }
          v13 = v12->BT_Inx;
          uiUser = 0;
          if ( !CItemAuthorityBase::IA_IsDataAccBelonged(&g_kItemAuthority, v13)
            && !CItemAuthorityBase::IA_IsDataChrBelonged(&g_kItemAuthority, v12->BT_Inx) )
          {
            v14 = Item::GetPutOnBelongState(v11);
            if ( !CItemAuthorityBase::IA_CanInvenReloc(
                    &g_kItemAuthority,
                    v12->BT_Inx,
                    v14,
                    9u,
                    6u,
                    (E_RELOC_ERR *)&uiUser) )
            {
              v30 = -2102363671;
              goto LABEL_54;
            }
            goto LABEL_28;
          }
          if ( CItemAuthorityBase::IA_IsDataPutOnBelonged(&g_kItemAuthority, v12->BT_Inx) == 1 )
          {
            v15 = Item::GetPutOnBelongState(v11);
            if ( !CItemAuthorityBase::IA_IsWorkAccBelonged(&g_kItemAuthority, v12->BT_Inx, v15) )
            {
              v16 = Item::GetPutOnBelongState(v11);
              if ( !CItemAuthorityBase::IA_IsWorkChrBelonged(&g_kItemAuthority, v12->BT_Inx, v16) )
                goto LABEL_28;
            }
          }
LABEL_49:
          v30 = -857857511;
          goto LABEL_54;
        }
        if ( InventoryWin::ms_uiMode == 3 )
        {
          InventoryWin::OnInvShiftRClickPrivateStoreMode(v3, uiInvIndex);
          return;
        }
        if ( InventoryWin::ms_uiMode == 4 )
        {
          v30 = 237968494;
          goto LABEL_54;
        }
        if ( InventoryWin::ms_uiMode == 5 )
        {
          if ( PgWin::ms_bShiftPressed )
          {
            InventoryWin::OnInvRClickGuildAcademyStorageMode(v3, uiInvIndex);
          }
          else
          {
            v19 = ItemIcon::GetItem((ItemIcon *)&v4->vfptr);
            v20 = v19;
            if ( v19 )
            {
              v21 = v19->m_pkInfo;
              if ( v21 )
              {
                v22 = v21->BT_Inx;
                uiUser = 0;
                if ( CItemAuthorityBase::IA_IsDataAccBelonged(&g_kItemAuthority, v22)
                  || CItemAuthorityBase::IA_IsDataChrBelonged(&g_kItemAuthority, v21->BT_Inx) )
                {
                  if ( CItemAuthorityBase::IA_IsDataPutOnBelonged(&g_kItemAuthority, v21->BT_Inx) != 1 )
                    goto LABEL_49;
                  v24 = Item::GetPutOnBelongState(v20);
                  if ( CItemAuthorityBase::IA_IsWorkAccBelonged(&g_kItemAuthority, v21->BT_Inx, v24) )
                    goto LABEL_49;
                  v25 = Item::GetPutOnBelongState(v20);
                  if ( CItemAuthorityBase::IA_IsWorkChrBelonged(&g_kItemAuthority, v21->BT_Inx, v25) )
                    goto LABEL_49;
                }
                else
                {
                  v23 = Item::GetPutOnBelongState(v20);
                  if ( !CItemAuthorityBase::IA_CanInvenReloc(
                          &g_kItemAuthority,
                          v21->BT_Inx,
                          v23,
                          9u,
                          0,
                          (E_RELOC_ERR *)&uiUser) )
                  {
                    v30 = -2102363671;
                    goto LABEL_54;
                  }
                }
              }
              v26 = (_DWORD *)((int (__thiscall *)(Item *))v20->vfptr[11].__vecDelDtor)(v20);
              if ( v26 )
              {
                v27 = *v26 & 0xFF;
                if ( v27 )
                {
                  if ( v27 != 255 )
                    goto LABEL_53;
                }
              }
            }
            InventoryWin::OnInvRClickGuildAcademyStorageMode(v3, uiInvIndex);
          }
        }
      }
      else
      {
        InventoryWin::OnInvShiftRClickNormalMode(v3, uiInvIndex);
      }
    }
  }
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;
// B6474C: using guessed type bool PgWin::ms_bShiftPressed;
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (005230D0) --------------------------------------------------------
signed int __thiscall InventoryWin::FindItem(InventoryWin *this, char *ItemName)
{
  InventoryWin *v2; // esi@1
  ItemInfo *v3; // eax@1
  signed int result; // eax@2

  v2 = this;
  v3 = ItemInfoTab::GetByInxName(ItemName);
  if ( v3 )
    result = InventoryWin::FindItem(v2, v3->ID);
  else
    result = 193;
  return result;
}

//----- (00523100) --------------------------------------------------------
signed int __thiscall InventoryWin::FindEquipItem(InventoryWin *this, const char *pcItemIdx)
{
  InventoryWin *v2; // esi@1
  ItemInfo *v3; // eax@1
  signed int result; // eax@2

  v2 = this;
  v3 = ItemInfoTab::GetByInxName((char *)pcItemIdx);
  if ( v3 )
    result = InventoryWin::FindEquipItem(v2, v3->ID);
  else
    result = 31;
  return result;
}

//----- (00523130) --------------------------------------------------------
signed int __stdcall InventoryWin::FindItemID(char *ItemName)
{
  ItemInfo *v2; // eax@1
  signed int result; // eax@2

  v2 = ItemInfoTab::GetByInxName(ItemName);
  if ( v2 )
    result = v2->ID;
  else
    result = 193;
  return result;
}

//----- (00523160) --------------------------------------------------------
void __userpurge InventoryWin::OnCommand(InventoryWin *this@<ecx>, int a2@<edi>, double a3@<st0>, unsigned int wParam, int lParam)
{
  InventoryWin *v5; // esi@1
  int v6; // ecx@1
  Item *v7; // eax@20
  int v8; // ecx@21
  PgFrameWork *v9; // eax@32
  PgFrameWork *v10; // ecx@35
  PgWin *v11; // esi@35
  bool v12; // zf@41
  unsigned int v13; // edi@42
  int v14; // edi@42
  int v15; // edi@42
  int lParama; // [sp+2Ch] [bp+Ch]@42

  v5 = this;
  v6 = g_pkMainChar->m_byMode;
  switch ( wParam )
  {
    case 3u:
      InventoryWin::OnInvLClick(v5, lParam);
      break;
    case 4u:
      if ( v6 != 5 )
        InventoryWin::OnInvRClick(v5, lParam, 0);
      break;
    case 5u:
      if ( v6 != 5 )
        InventoryWin::OnEquipLClick(v5, lParam);
      break;
    case 6u:
      if ( v6 != 5 && !PgCursor::ms_pkDrop && InventoryWin::ms_uiMode != 6 )
        InventoryWin::UnEquip(v5, lParam);
      break;
    case 8u:
      InventoryWin::OnActivePage(v5, a2, 0);
      break;
    case 9u:
      InventoryWin::OnActivePage(v5, a2, 1u);
      break;
    case 0xAu:
      InventoryWin::OnActivePage(v5, a2, 2u);
      break;
    case 0xBu:
      InventoryWin::OnActivePage(v5, a2, 3u);
      break;
    case 0xCu:
      InventoryWin::OnActivePage(v5, a2, 4u);
      break;
    case 0xDu:
      InventoryWin::OnActivePage(v5, a2, 5u);
      break;
    case 0xFu:
      InventoryWin::OnChargedItemPage(v5);
      break;
    case 0xEu:
      InventoryWin::OnCompensationPage(v5);
      break;
    case 0x10u:
      if ( lParam )
      {
        v7 = ItemIcon::GetItem((ItemIcon *)&v5->m_apkInvWin[InventoryWin::ms_kFrom.Inven & 0x3FF]->vfptr);
        if ( v7 )
        {
          v5->m_kDropContents.m_eSenderType = 0;
          v5->m_kDropContents.m_eType = 0;
          v8 = InventoryWin::ms_kFrom.Inven & 0x3FF;
          v5->m_kDropContents.m_apvParam[0] = v7;
          v5->m_kDropContents.m_uiSenderIndex = v8;
          v5->m_kDropContents.m_apvParam[1] = 0;
          ((void (__thiscall *)(Item *))v7->vfptr[3].__vecDelDtor)(v7);
          v5->m_kDropContents.m_uiLot = lParam;
          v5->m_kDrop.m_pkSender = (PgWin *)v5;
          PgCursor::ms_pkDrop = &v5->m_kDrop;
        }
      }
      break;
    case 0x11u:
      if ( lParam )
        GameFrameWork::NcItemSellReq((GameFrameWork *)v5->m_pkFrameWork, InventoryWin::ms_kFrom.Inven, lParam);
      break;
    case 0x12u:
      if ( lParam )
        GameFrameWork::NcItemBuyReq((GameFrameWork *)v5->m_pkFrameWork, v5->m_TargetItemID, lParam);
      break;
    case 0x13u:
      if ( lParam )
        InventoryWin::OnInputPrivateStoreBuyClientItemCount(v5, lParam);
      break;
    case 0x14u:
      GameFrameWork::OpenEnchantGemWin((GameFrameWork *)v5->m_pkFrameWork);
      break;
    case 0x15u:
      InventoryWin::OnHelpLink();
      break;
    case 0x16u:
      InventoryWin::OnAutoPickCheck(v5);
      break;
    case 0x17u:
      InventoryWin::OnArrange(v5, a3);
      break;
    case 0x18u:
      v9 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( (unsigned __int8)(*(int (__stdcall **)(int))(*(_DWORD *)v9[26].m_kMsgQ.m_uiAlloced + 260))(a2) == 1 )
        GameFrameWork::CloseStorageMenu((GameFrameWork *)v5->m_pkFrameWork);
      else
        InventoryWin::OnOpenMagicBox(v5);
      break;
    case 0x19u:
      v10 = v5->m_pkFrameWork;
      v11 = (PgWin *)v10[142].m_uiMessageNum;
      if ( v11 )
      {
        if ( (unsigned __int8)v11->vfptr[65].__vecDelDtor((NiRefObject *)v10[142].m_uiMessageNum, a2) )
        {
          PgWinMgr::CloseWin(&Pgg_kWinMgr, v11);
        }
        else
        {
          PgWinMgr::ShowWin(&Pgg_kWinMgr, v11);
          MinimonAutoItemUseWin::ShowAutoUseItemInfo((MinimonAutoItemUseWin *)v11);
        }
      }
      break;
    case 0x1Au:
      InventoryWin::OnActivePage(v5, a2, 6u);
      break;
    case 0x1Bu:
      InventoryWin::OnActivePage(v5, a2, 7u);
      break;
    case 0x1Cu:
      v12 = v5->m_bShowEquip == 0;
      if ( !v5->m_bShowEquip )
      {
        v13 = PgWin::ms_uiScreenHeight - ((int (*)(void))v5->m_pkInvenTheme->vfptr[37].__vecDelDtor)();
        v14 = v13 - ((int (*)(void))v5->m_pEquipTheme->vfptr[37].__vecDelDtor)();
        v15 = v14 - ((int (__thiscall *)(InventoryWin *))v5->vfptr[37].__vecDelDtor)(v5);
        *(float *)&lParama = (double)(unsigned int)(v15 - ((int (*)(void))v5->m_pkMoneyPanel->vfptr[37].__vecDelDtor)());
        if ( *(float *)&lParama < (double)v5->m_kLocal.m_Translate.y )
          NiAVObject::SetTranslate(
            (NiAVObject *)&v5->vfptr,
            v5->m_kLocal.m_Translate.x,
            *(float *)&lParama,
            v5->m_kLocal.m_Translate.z);
        v12 = v5->m_bShowEquip == 0;
      }
      v5->m_bShowEquip = v12;
      InventoryWin::OnOffEquipWin(v5);
      break;
    default:
      return;
  }
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (005235B0) --------------------------------------------------------
void __thiscall ChatColorSpinWin::SetChatColorInfo(ChatColorSpinWin *this, ChatColorInfo kChatColorInfo)
{
  this->m_kChatItem = kChatColorInfo;
}

//----- (005235E0) --------------------------------------------------------
ItemViewInfo *__cdecl IIDTableBase<ItemViewInfo,ItemViewInfoTab,unsigned short>::GetByID(int uiId)
{
  int v1; // esi@1
  ItemViewInfo *result; // eax@2
  int v3; // ecx@4

  v1 = ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable,
                          uiId)
    && (unsigned __int16)uiId <= *(_WORD *)(v1 + 200)
    && (v3 = *(_DWORD *)(v1 + 196), *(_DWORD *)(v3 + 4 * (unsigned __int16)uiId)) )
  {
    result = *(ItemViewInfo **)(v3 + 4 * (unsigned __int16)uiId);
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C298: using guessed type int ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;

//----- (00523630) --------------------------------------------------------
unsigned __int16 __thiscall CQuestData::GetNumOfQuestData(CQuestData *this)
{
  QUEST_DATA_HEAD *v1; // eax@1
  unsigned __int16 result; // ax@2

  v1 = this->m_pDataHead;
  if ( v1 )
    result = v1->NumOfQuest;
  else
    result = 0;
  return result;
}

//----- (00523640) --------------------------------------------------------
NiRTTI *InvWin::GetRTTI()
{
  return &InvWin::m_RTTI;
}

//----- (00523650) --------------------------------------------------------
InvTabButWin *__thiscall InvTabButWin::`vector deleting destructor'(InvTabButWin *this, unsigned int a2)
{
  InvTabButWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&InvTabButWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&InvTabButWin::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98F14C: using guessed type void (__thiscall *InvTabButWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98F16C: using guessed type int (__thiscall *InvTabButWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00523690) --------------------------------------------------------
ChargedItemIcon *__thiscall ChargedItemIcon::`scalar deleting destructor'(ChargedItemIcon *this, unsigned int a2)
{
  ChargedItemIcon *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ChargedItemIcon::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ChargedItemIcon::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98F3A4: using guessed type void (__thiscall *ChargedItemIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98F3C4: using guessed type int (__thiscall *ChargedItemIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (005236D0) --------------------------------------------------------
ChargedItemInvenWin *__thiscall ChargedItemInvenWin::`vector deleting destructor'(ChargedItemInvenWin *this, unsigned int a2)
{
  ChargedItemInvenWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ChargedItemInvenWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ChargedItemInvenWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98F630: using guessed type void (__thiscall *ChargedItemInvenWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98F64C: using guessed type int (__thiscall *ChargedItemInvenWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00523710) --------------------------------------------------------
CompensationInvWin *__thiscall CompensationInvWin::`scalar deleting destructor'(CompensationInvWin *this, unsigned int a2)
{
  CompensationInvWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&CompensationInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CompensationInvWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 98F818: using guessed type void (__thiscall *CompensationInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98F834: using guessed type int (__thiscall *CompensationInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00523750) --------------------------------------------------------
unsigned int __cdecl ITableBase<ItemShopView,ItemShopViewTable>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<ItemShopView,ItemShopViewTable>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C188: using guessed type int ITableBase<ItemShopView,ItemShopViewTable>::ms_pkTable;

//----- (00523770) --------------------------------------------------------
ItemShopView *__cdecl ItemShopViewTable::GetByShopID(unsigned int dwShopID)
{
  unsigned int v1; // esi@1
  ItemShopView *result; // eax@2

  v1 = 0;
  if ( ITableBase<ItemShopView,ItemShopViewTable>::GetTotal() )
  {
    while ( 1 )
    {
      result = (ItemShopView *)CDataReader::GetRecord(
                                 (CDataReader *)(ITableBase<ItemShopView,ItemShopViewTable>::ms_pkTable + 4),
                                 v1);
      if ( result )
      {
        if ( result->goodsNo == dwShopID )
          break;
      }
      if ( ++v1 >= ITableBase<ItemShopView,ItemShopViewTable>::GetTotal() )
        goto LABEL_5;
    }
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}
// A8C188: using guessed type int ITableBase<ItemShopView,ItemShopViewTable>::ms_pkTable;

//----- (005237B0) --------------------------------------------------------
InvWin *__thiscall InvWin::`scalar deleting destructor'(InvWin *this, unsigned int a2)
{
  InvWin *v2; // esi@1

  v2 = this;
  InvWin::~InvWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005237E0) --------------------------------------------------------
CompensationItemIcon *__thiscall CompensationItemIcon::`scalar deleting destructor'(CompensationItemIcon *this, unsigned int a2)
{
  CompensationItemIcon *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&CompensationItemIcon::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CompensationItemIcon::`vftable'{for `IDirectMessenger'};
  this->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  this->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 98FC90: using guessed type void (__thiscall *CompensationItemIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 98FCAC: using guessed type int (__thiscall *CompensationItemIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (00523830) --------------------------------------------------------
InventoryWin *__thiscall InventoryWin::`vector deleting destructor'(InventoryWin *this, unsigned int a2)
{
  InventoryWin *v2; // esi@1

  v2 = this;
  InventoryWin::~InventoryWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00523860) --------------------------------------------------------
ChargedItemUseTask *__thiscall ChargedItemUseTask::`vector deleting destructor'(ChargedItemUseTask *this, unsigned int a2)
{
  ChargedItemUseTask *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ISingletonTask<ChargedItemUseTask>::`vftable'{for `NiRefObject'};
  this->vfptr = (IDirectMessengerVtbl *)&ISingletonTask<ChargedItemUseTask>::`vftable'{for `IDirectMessenger'};
  ISingletonTask<ChargedItemUseTask>::ms_pkSingletonTask = 0;
  ITask::~ITask((ITask *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 990158: using guessed type void (__thiscall *ISingletonTask<ChargedItemUseTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 990174: using guessed type int (__thiscall *ISingletonTask<ChargedItemUseTask>::`vftable'{for `NiRefObject'})(void *p, char);
// A8CC00: using guessed type int ISingletonTask<ChargedItemUseTask>::ms_pkSingletonTask;

//----- (005238A0) --------------------------------------------------------
void __thiscall ItemInfoWin::~ItemInfoWin(ItemInfoWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ItemInfoWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ItemInfoWin::`vftable'{for `IDirectMessenger'};
  FrameBoxWin::~FrameBoxWin((FrameBoxWin *)&this->vfptr);
}
// 9906B4: using guessed type void (__thiscall *ItemInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9906D4: using guessed type int (__thiscall *ItemInfoWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005238C0) --------------------------------------------------------
long double __usercall difftime_0@<edx:eax>(int _Time1@<ecx>, int _Time2@<eax>)
{
  long double result; // rax@1

  _difftime32(_Time1, _Time2);
  return result;
}

//----- (005238D0) --------------------------------------------------------
int __usercall mktime_1@<eax>(tm *_Tm@<eax>)
{
  return _mktime32(_Tm);
}

//----- (005238E0) --------------------------------------------------------
void __thiscall ItemInfoWin::HideAllMoneyWin(ItemInfoWin *this)
{
  ItemInfoWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkGemIcon->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkGoldIcon->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkSilverIcon->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkCopperIcon->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkGemText->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkGoldText->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkSilverText->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkCopperText->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkTotalGemIcon->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkTotalGoldIcon->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkTotalSilverIcon->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkTotalCopperIcon->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkTotalGemText->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkTotalGoldText->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkTotalSilverText->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkTotalCopperText->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkItemMoneyIcon->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkItemMoneyText->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkItemMoneyNumText->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkItemTotalMoneyIcon->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkItemTotalMoneyText->vfptr[64].__vecDelDtor)(0);
  v1->m_uiItemMoneyWidth = 0;
}

//----- (00523A70) --------------------------------------------------------
BOOL __thiscall ItemInfoWin::IsMoneyShow(ItemInfoWin *this)
{
  ItemInfoWin *v1; // esi@1

  v1 = this;
  return (unsigned __int8)((int (*)(void))this->m_pkGemIcon->vfptr[65].__vecDelDtor)()
      || (unsigned __int8)((int (*)(void))v1->m_pkGoldIcon->vfptr[65].__vecDelDtor)()
      || (unsigned __int8)((int (*)(void))v1->m_pkSilverIcon->vfptr[65].__vecDelDtor)()
      || (unsigned __int8)((int (*)(void))v1->m_pkCopperIcon->vfptr[65].__vecDelDtor)();
}

//----- (00523AD0) --------------------------------------------------------
BOOL __thiscall ItemInfoWin::IsTotalMoneyShow(ItemInfoWin *this)
{
  ItemInfoWin *v1; // esi@1

  v1 = this;
  return (unsigned __int8)((int (*)(void))this->m_pkTotalGemIcon->vfptr[65].__vecDelDtor)()
      || (unsigned __int8)((int (*)(void))v1->m_pkTotalGoldIcon->vfptr[65].__vecDelDtor)()
      || (unsigned __int8)((int (*)(void))v1->m_pkTotalSilverIcon->vfptr[65].__vecDelDtor)()
      || (unsigned __int8)((int (*)(void))v1->m_pkTotalCopperIcon->vfptr[65].__vecDelDtor)();
}

//----- (00523B30) --------------------------------------------------------
int __thiscall ItemInfoWin::GetMoneyWinWidth(ItemInfoWin *this)
{
  ItemInfoWin *v1; // esi@1
  int v2; // edi@1
  int result; // eax@8

  v1 = this;
  v2 = 0;
  if ( (unsigned __int8)((int (*)(void))this->m_pkGemIcon->vfptr[65].__vecDelDtor)() )
    v2 = ((int (*)(void))v1->m_pkGemText->vfptr[36].__vecDelDtor)() + v1->m_uiIconWidth + 2;
  if ( (unsigned __int8)((int (*)(void))v1->m_pkGoldIcon->vfptr[65].__vecDelDtor)() )
    v2 += v1->m_uiIconWidth + ((int (*)(void))v1->m_pkGoldText->vfptr[36].__vecDelDtor)() + 2;
  if ( (unsigned __int8)((int (*)(void))v1->m_pkSilverIcon->vfptr[65].__vecDelDtor)() )
    v2 += v1->m_uiIconWidth + ((int (*)(void))v1->m_pkSilverText->vfptr[36].__vecDelDtor)() + 2;
  if ( (unsigned __int8)((int (*)(void))v1->m_pkCopperIcon->vfptr[65].__vecDelDtor)() )
    result = v2 + v1->m_uiIconWidth + ((int (*)(void))v1->m_pkCopperText->vfptr[36].__vecDelDtor)() + 2;
  else
    result = v2;
  return result;
}

//----- (00523C00) --------------------------------------------------------
int __thiscall ItemInfoWin::GetTotalMoneyWinWidth(ItemInfoWin *this)
{
  ItemInfoWin *v1; // esi@1
  int v2; // edi@1
  int result; // eax@8

  v1 = this;
  v2 = 0;
  if ( (unsigned __int8)((int (*)(void))this->m_pkTotalGemIcon->vfptr[65].__vecDelDtor)() )
    v2 = ((int (*)(void))v1->m_pkTotalGemText->vfptr[36].__vecDelDtor)() + v1->m_uiIconWidth + 2;
  if ( (unsigned __int8)((int (*)(void))v1->m_pkTotalGoldIcon->vfptr[65].__vecDelDtor)() )
    v2 += v1->m_uiIconWidth + ((int (*)(void))v1->m_pkTotalGoldText->vfptr[36].__vecDelDtor)() + 2;
  if ( (unsigned __int8)((int (*)(void))v1->m_pkTotalSilverIcon->vfptr[65].__vecDelDtor)() )
    v2 += v1->m_uiIconWidth + ((int (*)(void))v1->m_pkTotalSilverText->vfptr[36].__vecDelDtor)() + 2;
  if ( (unsigned __int8)((int (*)(void))v1->m_pkTotalCopperIcon->vfptr[65].__vecDelDtor)() )
    result = v2 + v1->m_uiIconWidth + ((int (*)(void))v1->m_pkTotalCopperText->vfptr[36].__vecDelDtor)() + 2;
  else
    result = v2;
  return result;
}

//----- (00523CD0) --------------------------------------------------------
void __thiscall ItemInfoWin::InitTimeLimitUpdateTime(ItemInfoWin *this)
{
  this->RemainTimeUpdate = 1.0;
}

//----- (00523CE0) --------------------------------------------------------
void __thiscall ItemInfoWin::ReduceTimeLimitUpdateTime(ItemInfoWin *this)
{
  if ( this->RemainTimeUpdate > 0.0 )
    this->RemainTimeUpdate = this->RemainTimeUpdate - 0.02;
}

//----- (00523D10) --------------------------------------------------------
void __stdcall ItemInfoWin::OnCommand(unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@2

  if ( wParam == 10 )
  {
    v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v3 )
      GameFrameWork::LinkItemShowWin(v3, 0);
  }
}

//----- (00523D40) --------------------------------------------------------
void __thiscall ItemInfoWin::SetCloseButtonPos(ItemInfoWin *this)
{
  ItemInfoWin *v1; // esi@1
  int v2; // edi@1
  double v3; // st7@1
  PgWinBut *v4; // esi@1
  float fY; // ST14_4@2
  float v6; // ST0C_4@2
  float fX; // [sp+18h] [bp-4h]@1

  v1 = this;
  v2 = ((int (*)(void))this->m_pkCloseBtn->vfptr[36].__vecDelDtor)();
  fX = (double)(unsigned int)(((int (__thiscall *)(ItemInfoWin *))v1->vfptr[36].__vecDelDtor)(v1) - v2);
  v3 = (double)(unsigned int)((int (*)(void))v1->m_pkCloseBtn->vfptr[37].__vecDelDtor)();
  v4 = v1->m_pkCloseBtn;
  if ( v4 )
  {
    v4->m_kLocal.m_Translate.x = fX;
    fY = v3;
    v6 = -fY;
    v4->m_kLocal.m_Translate.y = v6;
    v4->m_kLocal.m_Translate.z = 0.0;
  }
}

//----- (00523DE0) --------------------------------------------------------
void __thiscall ItemInfoWin::ShowMoneyWin(ItemInfoWin *this, int iXPos, int iYPos, __int64 i64Money)
{
  ItemInfoWin *v4; // esi@1
  int v5; // edi@5
  int v6; // edi@5
  int v7; // edi@8
  int v8; // edi@10
  int v9; // edi@12
  int v10; // [sp+0h] [bp-38h]@0
  __int64 i64Val; // [sp+Ch] [bp-2Ch]@1
  __int64 i64Vala; // [sp+Ch] [bp-2Ch]@7
  __int64 i64Valb; // [sp+Ch] [bp-2Ch]@9
  __int64 i64Valc; // [sp+Ch] [bp-2Ch]@11
  char acMoneyStr[32]; // [sp+14h] [bp-24h]@5

  v4 = this;
  this->m_uiMoneyXPos = 0;
  i64Val = User::GetGem(i64Money);
  if ( (signed __int64)User::GetMoney(&g_kUser) >= i64Money )
  {
    ((void (__stdcall *)(D3DXCOLOR *, int))v4->m_pkGemText->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor, v10);
    ((void (__stdcall *)(D3DXCOLOR *))v4->m_pkGoldText->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
    ((void (__stdcall *)(D3DXCOLOR *))v4->m_pkSilverText->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
    ((void (__cdecl *)(D3DXCOLOR *))v4->m_pkCopperText->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  }
  else
  {
    ((void (__stdcall *)(D3DXCOLOR *, int))v4->m_pkGemText->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor, v10);
    ((void (__stdcall *)(D3DXCOLOR *))v4->m_pkGoldText->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
    ((void (__stdcall *)(D3DXCOLOR *))v4->m_pkSilverText->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
    ((void (__cdecl *)(D3DXCOLOR *))v4->m_pkCopperText->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
  }
  if ( i64Val )
  {
    ((void (__stdcall *)(signed int))v4->m_pkGemText->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(int, int))v4->m_pkGemText->vfptr[77].__vecDelDtor)(iXPos, iYPos + 3);
    sprintf(acMoneyStr, "%I64d", i64Val);
    ((void (__stdcall *)(char *))v4->m_pkGemText->vfptr[125].__vecDelDtor)(acMoneyStr);
    v5 = iXPos + ((int (*)(void))v4->m_pkGemText->vfptr[36].__vecDelDtor)() + 1;
    ((void (__stdcall *)(signed int))v4->m_pkGemIcon->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(int, int))v4->m_pkGemIcon->vfptr[77].__vecDelDtor)(v5, iYPos);
    v6 = v5 + v4->m_uiIconWidth + 1;
  }
  else
  {
    v6 = iXPos;
  }
  i64Vala = User::GetGold(i64Money);
  if ( i64Vala )
  {
    ((void (__stdcall *)(signed int))v4->m_pkGoldText->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(int, int))v4->m_pkGoldText->vfptr[77].__vecDelDtor)(v6, iYPos + 3);
    sprintf(acMoneyStr, "%I64d", i64Vala);
    ((void (__stdcall *)(char *))v4->m_pkGoldText->vfptr[125].__vecDelDtor)(acMoneyStr);
    v7 = v6 + ((int (*)(void))v4->m_pkGoldText->vfptr[36].__vecDelDtor)() + 1;
    ((void (__stdcall *)(signed int))v4->m_pkGoldIcon->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(int, int))v4->m_pkGoldIcon->vfptr[77].__vecDelDtor)(v7, iYPos);
    v6 = v7 + v4->m_uiIconWidth + 1;
  }
  i64Valb = User::GetSilver(i64Money);
  if ( i64Valb )
  {
    ((void (__stdcall *)(signed int))v4->m_pkSilverText->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(int, int))v4->m_pkSilverText->vfptr[77].__vecDelDtor)(v6, iYPos + 3);
    sprintf(acMoneyStr, "%I64d", i64Valb);
    ((void (__stdcall *)(char *))v4->m_pkSilverText->vfptr[125].__vecDelDtor)(acMoneyStr);
    v8 = v6 + ((int (*)(void))v4->m_pkSilverText->vfptr[36].__vecDelDtor)() + 1;
    ((void (__stdcall *)(signed int))v4->m_pkSilverIcon->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(int, int))v4->m_pkSilverIcon->vfptr[77].__vecDelDtor)(v8, iYPos);
    v6 = v8 + v4->m_uiIconWidth + 1;
  }
  i64Valc = User::GetCopper(i64Money);
  if ( i64Valc )
  {
    ((void (__stdcall *)(signed int))v4->m_pkCopperText->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(int, int))v4->m_pkCopperText->vfptr[77].__vecDelDtor)(v6, iYPos + 3);
    sprintf(acMoneyStr, "%I64d", i64Valc);
    ((void (__stdcall *)(char *))v4->m_pkCopperText->vfptr[125].__vecDelDtor)(acMoneyStr);
    v9 = v6 + ((int (*)(void))v4->m_pkCopperText->vfptr[36].__vecDelDtor)() + 1;
    ((void (__stdcall *)(signed int))v4->m_pkCopperIcon->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(int, int))v4->m_pkCopperIcon->vfptr[77].__vecDelDtor)(v9, iYPos);
  }
}

//----- (005241A0) --------------------------------------------------------
void __thiscall ItemInfoWin::ShowPrivateStoreMoneyWin(ItemInfoWin *this, int iXPos, int iYPos, __int64 i64Money, bool bBuyItem)
{
  ItemInfoWin *v5; // esi@1
  __int64 v6; // kr00_8@1
  int v7; // edi@4
  int v8; // edi@4
  int v9; // edi@7
  int v10; // edi@9
  int v11; // edi@11
  int v12; // edi@13
  __int64 i64Val; // [sp+Ch] [bp-2Ch]@6
  __int64 i64Vala; // [sp+Ch] [bp-2Ch]@8
  __int64 i64Valb; // [sp+Ch] [bp-2Ch]@10
  char acMoneyStr[32]; // [sp+14h] [bp-24h]@4

  v5 = this;
  User::GetGem(i64Money);
  ((void (__stdcall *)(_DWORD))v5->m_pkGemText->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  ((void (__stdcall *)(_DWORD))v5->m_pkGoldText->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  ((void (__stdcall *)(_DWORD))v5->m_pkSilverText->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  ((void (__stdcall *)(_DWORD))v5->m_pkCopperText->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  v6 = User::GetGem(i64Money);
  ((void (__stdcall *)(_DWORD))v5->m_pkGemText->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  ((void (__stdcall *)(_DWORD))v5->m_pkGoldText->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  ((void (__stdcall *)(_DWORD))v5->m_pkSilverText->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  ((void (__stdcall *)(_DWORD))v5->m_pkCopperText->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  if ( !bBuyItem )
  {
    ((void (__stdcall *)(_DWORD))v5->m_pkGemText->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
    ((void (__stdcall *)(_DWORD))v5->m_pkGoldText->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
    ((void (__stdcall *)(_DWORD))v5->m_pkSilverText->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
    ((void (__stdcall *)(_DWORD))v5->m_pkCopperText->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
  }
  if ( v6 )
  {
    ((void (__stdcall *)(_DWORD))v5->m_pkGemText->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v5->m_pkGemText->vfptr[77].__vecDelDtor)(iXPos, iYPos + 3);
    sprintf(acMoneyStr, "%I64d", v6);
    ((void (__stdcall *)(_DWORD))v5->m_pkGemText->vfptr[125].__vecDelDtor)(acMoneyStr);
    v7 = iXPos + ((int (*)(void))v5->m_pkGemText->vfptr[36].__vecDelDtor)() + 1;
    ((void (__stdcall *)(_DWORD))v5->m_pkGemIcon->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v5->m_pkGemIcon->vfptr[77].__vecDelDtor)(v7, iYPos);
    v8 = v7 + v5->m_uiIconWidth + 1;
  }
  else
  {
    v8 = iXPos;
  }
  i64Val = User::GetGold(i64Money);
  if ( i64Val )
  {
    ((void (__stdcall *)(_DWORD))v5->m_pkGoldText->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v5->m_pkGoldText->vfptr[77].__vecDelDtor)(v8, iYPos + 3);
    sprintf(acMoneyStr, "%I64d", i64Val);
    ((void (__stdcall *)(_DWORD))v5->m_pkGoldText->vfptr[125].__vecDelDtor)(acMoneyStr);
    v9 = v8 + ((int (*)(void))v5->m_pkGoldText->vfptr[36].__vecDelDtor)() + 1;
    ((void (__stdcall *)(_DWORD))v5->m_pkGoldIcon->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v5->m_pkGoldIcon->vfptr[77].__vecDelDtor)(v9, iYPos);
    v8 = v9 + v5->m_uiIconWidth + 1;
  }
  i64Vala = User::GetSilver(i64Money);
  if ( i64Vala )
  {
    ((void (__stdcall *)(_DWORD))v5->m_pkSilverText->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v5->m_pkSilverText->vfptr[77].__vecDelDtor)(v8, iYPos + 3);
    sprintf(acMoneyStr, "%I64d", i64Vala);
    ((void (__stdcall *)(_DWORD))v5->m_pkSilverText->vfptr[125].__vecDelDtor)(acMoneyStr);
    v10 = v8 + ((int (*)(void))v5->m_pkSilverText->vfptr[36].__vecDelDtor)() + 1;
    ((void (__stdcall *)(_DWORD))v5->m_pkSilverIcon->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v5->m_pkSilverIcon->vfptr[77].__vecDelDtor)(v10, iYPos);
    v8 = v10 + v5->m_uiIconWidth + 1;
  }
  i64Valb = User::GetCopper(i64Money);
  if ( i64Valb )
  {
    ((void (__stdcall *)(_DWORD))v5->m_pkCopperText->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v5->m_pkCopperText->vfptr[77].__vecDelDtor)(v8, iYPos + 3);
    sprintf(acMoneyStr, "%I64d", i64Valb);
    ((void (__stdcall *)(_DWORD))v5->m_pkCopperText->vfptr[125].__vecDelDtor)(acMoneyStr);
    v11 = v8 + ((int (*)(void))v5->m_pkCopperText->vfptr[36].__vecDelDtor)() + 1;
    ((void (__stdcall *)(_DWORD))v5->m_pkCopperIcon->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v5->m_pkCopperIcon->vfptr[77].__vecDelDtor)(v11, iYPos);
    v8 = v11 + v5->m_uiIconWidth + 1;
  }
  if ( !i64Money )
  {
    ((void (__stdcall *)(_DWORD))v5->m_pkCopperText->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v5->m_pkCopperText->vfptr[77].__vecDelDtor)(v8, iYPos + 3);
    sprintf(acMoneyStr, "%d", 0);
    ((void (__stdcall *)(_DWORD))v5->m_pkCopperText->vfptr[125].__vecDelDtor)(acMoneyStr);
    v12 = v8 + ((int (*)(void))v5->m_pkCopperText->vfptr[36].__vecDelDtor)() + 1;
    ((void (__stdcall *)(_DWORD))v5->m_pkCopperIcon->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v5->m_pkCopperIcon->vfptr[77].__vecDelDtor)(v12, iYPos);
  }
}

//----- (00524650) --------------------------------------------------------
void __thiscall ItemInfoWin::ShowTotalMoneyWin(ItemInfoWin *this, int iXPos, int iYPos, __int64 i64Money, bool bBuyItem)
{
  ItemInfoWin *v5; // esi@1
  __int64 v6; // rax@1
  int v7; // ebx@1
  int v8; // edi@1
  int v9; // edi@4
  int v10; // edi@4
  int v11; // edi@7
  int v12; // edi@9
  int v13; // edi@11
  int v14; // edi@13
  __int64 i64Val; // [sp+Ch] [bp-2Ch]@1
  __int64 i64Vala; // [sp+Ch] [bp-2Ch]@6
  __int64 i64Valb; // [sp+Ch] [bp-2Ch]@8
  __int64 i64Valc; // [sp+Ch] [bp-2Ch]@10
  char acMoneyStr[32]; // [sp+14h] [bp-24h]@4

  v5 = this;
  v6 = User::GetGem(i64Money);
  v7 = HIDWORD(v6);
  v8 = v6;
  i64Val = v6;
  ((void (__stdcall *)(D3DXCOLOR *))v5->m_pkTotalGemText->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  ((void (__stdcall *)(D3DXCOLOR *))v5->m_pkTotalGoldText->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  ((void (__stdcall *)(D3DXCOLOR *))v5->m_pkTotalSilverText->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  ((void (__stdcall *)(D3DXCOLOR *))v5->m_pkTotalCopperText->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  if ( !bBuyItem )
  {
    ((void (__stdcall *)(D3DXCOLOR *))v5->m_pkTotalGemText->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
    ((void (__stdcall *)(D3DXCOLOR *))v5->m_pkTotalGoldText->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
    ((void (__stdcall *)(D3DXCOLOR *))v5->m_pkTotalSilverText->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
    ((void (__stdcall *)(D3DXCOLOR *))v5->m_pkTotalCopperText->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
  }
  if ( v7 | v8 )
  {
    ((void (__stdcall *)(signed int))v5->m_pkTotalGemText->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(int, int))v5->m_pkTotalGemText->vfptr[77].__vecDelDtor)(iXPos, iYPos + 3);
    sprintf(acMoneyStr, "%I64d", i64Val);
    ((void (__stdcall *)(char *))v5->m_pkTotalGemText->vfptr[125].__vecDelDtor)(acMoneyStr);
    v9 = iXPos + ((int (*)(void))v5->m_pkTotalGemText->vfptr[36].__vecDelDtor)() + 1;
    ((void (__stdcall *)(signed int))v5->m_pkTotalGemIcon->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(int, int))v5->m_pkTotalGemIcon->vfptr[77].__vecDelDtor)(v9, iYPos);
    v10 = v9 + v5->m_uiIconWidth + 1;
  }
  else
  {
    v10 = iXPos;
  }
  i64Vala = User::GetGold(i64Money);
  if ( i64Vala )
  {
    ((void (__stdcall *)(signed int))v5->m_pkTotalGoldText->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(int, int))v5->m_pkTotalGoldText->vfptr[77].__vecDelDtor)(v10, iYPos + 3);
    sprintf(acMoneyStr, "%I64d", i64Vala);
    ((void (__stdcall *)(char *))v5->m_pkTotalGoldText->vfptr[125].__vecDelDtor)(acMoneyStr);
    v11 = v10 + ((int (*)(void))v5->m_pkTotalGoldText->vfptr[36].__vecDelDtor)() + 1;
    ((void (__stdcall *)(signed int))v5->m_pkTotalGoldIcon->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(int, int))v5->m_pkTotalGoldIcon->vfptr[77].__vecDelDtor)(v11, iYPos);
    v10 = v11 + v5->m_uiIconWidth + 1;
  }
  i64Valb = User::GetSilver(i64Money);
  if ( i64Valb )
  {
    ((void (__stdcall *)(signed int))v5->m_pkTotalSilverText->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(int, int))v5->m_pkTotalSilverText->vfptr[77].__vecDelDtor)(v10, iYPos + 3);
    sprintf(acMoneyStr, "%I64d", i64Valb);
    ((void (__stdcall *)(char *))v5->m_pkTotalSilverText->vfptr[125].__vecDelDtor)(acMoneyStr);
    v12 = v10 + ((int (*)(void))v5->m_pkTotalSilverText->vfptr[36].__vecDelDtor)() + 1;
    ((void (__stdcall *)(signed int))v5->m_pkTotalSilverIcon->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(int, int))v5->m_pkTotalSilverIcon->vfptr[77].__vecDelDtor)(v12, iYPos);
    v10 = v12 + v5->m_uiIconWidth + 1;
  }
  i64Valc = User::GetCopper(i64Money);
  if ( i64Valc )
  {
    ((void (__stdcall *)(signed int))v5->m_pkTotalCopperText->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(int, int))v5->m_pkTotalCopperText->vfptr[77].__vecDelDtor)(v10, iYPos + 3);
    sprintf(acMoneyStr, "%I64d", i64Valc);
    ((void (__stdcall *)(char *))v5->m_pkTotalCopperText->vfptr[125].__vecDelDtor)(acMoneyStr);
    v13 = v10 + ((int (*)(void))v5->m_pkTotalCopperText->vfptr[36].__vecDelDtor)() + 1;
    ((void (__stdcall *)(signed int))v5->m_pkTotalCopperIcon->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(int, int))v5->m_pkTotalCopperIcon->vfptr[77].__vecDelDtor)(v13, iYPos);
    v10 = v13 + v5->m_uiIconWidth + 1;
  }
  if ( !i64Money )
  {
    ((void (__stdcall *)(signed int))v5->m_pkTotalCopperText->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(int, int))v5->m_pkTotalCopperText->vfptr[77].__vecDelDtor)(v10, iYPos + 3);
    sprintf(acMoneyStr, "%d", 0);
    ((void (__stdcall *)(char *))v5->m_pkTotalCopperText->vfptr[125].__vecDelDtor)(acMoneyStr);
    v14 = v10 + ((int (*)(void))v5->m_pkTotalCopperText->vfptr[36].__vecDelDtor)() + 1;
    ((void (__stdcall *)(signed int))v5->m_pkTotalCopperIcon->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(int, int))v5->m_pkTotalCopperIcon->vfptr[77].__vecDelDtor)(v14, iYPos);
  }
}

//----- (00524AA0) --------------------------------------------------------
void __thiscall ItemInfoWin::AdjustSizeIfIamToolTipWin(ItemInfoWin *this)
{
  ItemInfoWin *v1; // esi@1
  char *v2; // ebx@1
  PgFont *v3; // eax@1
  unsigned int v4; // edi@2
  char *v5; // eax@3
  bool v6; // zf@7
  unsigned int v7; // ebx@12
  unsigned int v8; // eax@12
  unsigned int v9; // eax@19
  tagSIZE kSize; // [sp+8h] [bp-18h]@4
  PgFont *pkFont; // [sp+10h] [bp-10h]@1
  int v12; // [sp+14h] [bp-Ch]@2
  PgWinText **v13; // [sp+18h] [bp-8h]@2
  unsigned int uiCy; // [sp+1Ch] [bp-4h]@2

  v1 = this;
  v2 = (char *)this->m_apkTextWin;
  v3 = (PgFont *)((int (*)(void))this->m_apkTextWin[0]->vfptr[114].__vecDelDtor)();
  pkFont = v3;
  if ( v3 )
  {
    SelectObject(v3->m_kFontRenderStuff.hDC, v3->m_hFont);
    v4 = 0;
    uiCy = 0;
    v13 = v1->m_apkTextWin;
    v12 = 80;
    do
    {
      v5 = (char *)(*(int (**)(void))(**(_DWORD **)v2 + 484))();
      if ( v5 )
      {
        PgFont::GetTextSize(pkFont, v5, strlen(v5), &kSize);
        if ( kSize.cx > v4 )
          v4 = kSize.cx;
        uiCy += kSize.cy + 2;
      }
      v2 = (char *)(v13 + 1);
      v6 = v12-- == 1;
      ++v13;
    }
    while ( !v6 );
    if ( (unsigned __int8)((int (*)(void))v1->m_pkGemIcon->vfptr[65].__vecDelDtor)()
      || (unsigned __int8)((int (*)(void))v1->m_pkGoldIcon->vfptr[65].__vecDelDtor)()
      || (unsigned __int8)((int (*)(void))v1->m_pkSilverIcon->vfptr[65].__vecDelDtor)()
      || (unsigned __int8)((int (*)(void))v1->m_pkCopperIcon->vfptr[65].__vecDelDtor)() )
    {
      v7 = uiCy + v1->m_uiIconHeight + 2;
      v8 = v1->m_uiMoneyXPos + ItemInfoWin::GetMoneyWinWidth(v1);
      if ( v8 > v4 )
        v4 = v8;
    }
    else
    {
      v7 = uiCy;
    }
    if ( (unsigned __int8)((int (*)(void))v1->m_pkTotalGemIcon->vfptr[65].__vecDelDtor)()
      || (unsigned __int8)((int (*)(void))v1->m_pkTotalGoldIcon->vfptr[65].__vecDelDtor)()
      || (unsigned __int8)((int (*)(void))v1->m_pkTotalSilverIcon->vfptr[65].__vecDelDtor)()
      || (unsigned __int8)((int (*)(void))v1->m_pkTotalCopperIcon->vfptr[65].__vecDelDtor)() )
    {
      v9 = v1->m_uiTotalMoneyXPos + ItemInfoWin::GetTotalMoneyWinWidth(v1);
      if ( v9 > v4 )
        v4 = v9;
    }
    if ( (unsigned __int8)((int (*)(void))v1->m_pkItemMoneyIcon->vfptr[65].__vecDelDtor)()
      && v1->m_uiItemMoneyWidth > v4 )
    {
      v4 = v1->m_uiItemMoneyWidth;
    }
    if ( v4 )
      ((void (__thiscall *)(ItemInfoWin *, unsigned int, unsigned int))v1->vfptr[135].__vecDelDtor)(
        v1,
        v4 + 2 * v1->m_uiEdgeWidth + 14,
        v7 + 2 * v1->m_uiEdgeHeight);
  }
}

//----- (00524C70) --------------------------------------------------------
void __thiscall ItemInfoWin::SetTextBeginNewLine(ItemInfoWin *this, const char *pkTextData, int *nIndex, D3DXCOLOR *kColor)
{
  char *v4; // ebx@1
  ItemInfoWin *v5; // edi@1
  int v6; // eax@2
  HDC__ *hDC; // [sp+Ch] [bp-10Ch]@1
  char acStr[256]; // [sp+14h] [bp-104h]@1

  v4 = (char *)pkTextData;
  v5 = this;
  hDC = *(HDC__ **)(((int (*)(void))this->m_apkTextWin[*nIndex]->vfptr[114].__vecDelDtor)() + 192);
  memset(acStr, 0, 0x100u);
  while ( *nIndex < 80 )
  {
    v6 = PgUtil::StringPixelCopy(acStr, v4, hDC, v5->m_iItemNameLength);
    if ( !v6 )
      break;
    acStr[v6] = 0;
    v4 += v6;
    ((void (__stdcall *)(_DWORD))v5->m_apkTextWin[*nIndex]->vfptr[118].__vecDelDtor)(acStr);
    ((void (__stdcall *)(_DWORD))v5->m_apkTextWin[*nIndex]->vfptr[117].__vecDelDtor)(kColor);
    ++*nIndex;
    memset(acStr, 0, 0x100u);
  }
}

//----- (00524D70) --------------------------------------------------------
void __thiscall ItemInfoWin::SetItemToolTip(ItemInfoWin *this, char *pText)
{
  ItemInfoWin *v2; // ebx@1
  int v3; // esi@2
  signed int v4; // edi@2

  v2 = this;
  if ( pText )
  {
    ItemInfoWin::HideAllMoneyWin(this);
    v3 = (int)v2->m_apkTextWin;
    v4 = 80;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 472))(&unk_990292);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 468))(&Color::m_kDxWhiteColor);
      v3 += 4;
      --v4;
    }
    while ( v4 );
    ((void (__stdcall *)(_DWORD))v2->m_apkTextWin[0]->vfptr[118].__vecDelDtor)(pText);
    ((void (__thiscall *)(_DWORD))v2->vfptr[109].__vecDelDtor)(v2);
  }
}

//----- (00524DE0) --------------------------------------------------------
char __thiscall ItemInfoWin::Create(ItemInfoWin *this, NiSourceTexture *pkTexture, unsigned int uiEdgeWidth, unsigned int uiEdgeHeight)
{
  ItemInfoWin *v4; // esi@1
  char result; // al@2
  PgFont *v6; // eax@3
  PgFont *v7; // ecx@3
  signed int v8; // edi@4
  PgWinText **v9; // ebx@4
  PgWinText *v10; // eax@6
  NiTexturePalette *v11; // edi@8
  const char *v12; // eax@10
  PgSprData *v13; // eax@11
  PgWinSpr *v14; // eax@11
  NiAVObject *v15; // edx@11
  PgSprData *v16; // eax@11
  PgWinSpr *v17; // eax@11
  NiAVObject *v18; // edx@11
  PgSprData *v19; // eax@11
  PgWinSpr *v20; // eax@11
  NiAVObject *v21; // edx@11
  PgSprData *v22; // eax@11
  PgWinSpr *v23; // eax@11
  NiAVObject *v24; // edx@11
  PgSprData *v25; // eax@11
  PgWinSpr *v26; // eax@11
  NiAVObject *v27; // edx@11
  PgSprData *v28; // eax@11
  PgWinSpr *v29; // eax@11
  NiAVObject *v30; // edx@11
  PgSprData *v31; // eax@11
  PgWinSpr *v32; // eax@11
  NiAVObject *v33; // edx@11
  PgSprData *v34; // eax@11
  PgWinSpr *v35; // eax@11
  PgWinSpr *v36; // ecx@11
  int v37; // eax@11
  PgWinSpr *v38; // ecx@11
  PgFont *v39; // eax@11
  PgFont *v40; // eax@11
  PgFont *v41; // eax@11
  PgFont *v42; // eax@11
  PgFont *v43; // eax@11
  PgFont *v44; // eax@11
  PgFont *v45; // eax@11
  PgFont *v46; // eax@11
  PgFont *v47; // eax@11
  PgFont *v48; // eax@11
  PgFont *v49; // eax@11
  void (__thiscall ***v50)(_DWORD, _DWORD); // esi@12
  PgFont *pkFont; // [sp+10h] [bp-14h]@3
  int uiLeft; // [sp+14h] [bp-10h]@11
  int v53; // [sp+20h] [bp-4h]@7

  v4 = this;
  if ( !FrameBoxWin::Create((FrameBoxWin *)&this->vfptr, pkTexture, uiEdgeWidth, uiEdgeHeight, 0, 0, 0, 0) )
    goto LABEL_18;
  v6 = Font::Get(0);
  v7 = v6;
  pkFont = v6;
  if ( !v6 )
    goto LABEL_18;
  v4->m_iFontHeight = v6->m_uiDefHeight;
  v8 = 0;
  v9 = v4->m_apkTextWin;
  while ( 1 )
  {
    v10 = PgWinText::CreateWin(
            v4->m_uiEdgeWidth,
            v8 * (v4->m_iFontHeight + 2) + v4->m_uiEdgeHeight + 2,
            0x100u,
            v4->m_iFontHeight + 4,
            v7,
            (PgWin *)&v4->vfptr,
            0,
            0);
    *v9 = v10;
    v10->vfptr[60].__vecDelDtor((NiRefObject *)v10, 0);
    ++v8;
    ++v9;
    if ( v8 >= 80 )
      break;
    v7 = pkFont;
  }
  ((void (__thiscall *)(ItemInfoWin *, unsigned int, unsigned int))v4->vfptr[135].__vecDelDtor)(
    v4,
    2 * v4->m_uiEdgeWidth + 142,
    v4->m_iFontHeight + 2 * v4->m_uiEdgeHeight);
  v4->vfptr[64].__vecDelDtor((NiRefObject *)v4, 0);
  uiEdgeHeight = 0;
  v53 = 0;
  if ( !pkTexture )
    goto LABEL_18;
  v11 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v12 = Folder::Merge(&Folder::m_acMenu, "Game\\Money.nif");
  PgUtil::LoadNodeNifFile(v12, (NiPointer<NiNode> *)&uiEdgeHeight, v11);
  if ( uiEdgeHeight )
  {
    v13 = PgSprData::Create((NiAVObject *)uiEdgeHeight, "MyGemBtn", &uiLeft, (int *)&uiEdgeWidth, 0);
    v14 = PgWinSpr::CreateWin(0, 0, v13, (PgWin *)&v4->vfptr, 0, 0);
    v15 = (NiAVObject *)uiEdgeHeight;
    v4->m_pkGemIcon = v14;
    v16 = PgSprData::Create(v15, "MyGoldBtn", &uiLeft, (int *)&uiEdgeWidth, 0);
    v17 = PgWinSpr::CreateWin(0, 0, v16, (PgWin *)&v4->vfptr, 0, 0);
    v18 = (NiAVObject *)uiEdgeHeight;
    v4->m_pkGoldIcon = v17;
    v19 = PgSprData::Create(v18, "MySilverBtn", &uiLeft, (int *)&uiEdgeWidth, 0);
    v20 = PgWinSpr::CreateWin(0, 0, v19, (PgWin *)&v4->vfptr, 0, 0);
    v21 = (NiAVObject *)uiEdgeHeight;
    v4->m_pkSilverIcon = v20;
    v22 = PgSprData::Create(v21, "MyCopperBtn", &uiLeft, (int *)&uiEdgeWidth, 0);
    v23 = PgWinSpr::CreateWin(0, 0, v22, (PgWin *)&v4->vfptr, 0, 0);
    v24 = (NiAVObject *)uiEdgeHeight;
    v4->m_pkCopperIcon = v23;
    v25 = PgSprData::Create(v24, "MyGemBtn", &uiLeft, (int *)&uiEdgeWidth, 0);
    v26 = PgWinSpr::CreateWin(0, 0, v25, (PgWin *)&v4->vfptr, 0, 0);
    v27 = (NiAVObject *)uiEdgeHeight;
    v4->m_pkTotalGemIcon = v26;
    v28 = PgSprData::Create(v27, "MyGoldBtn", &uiLeft, (int *)&uiEdgeWidth, 0);
    v29 = PgWinSpr::CreateWin(0, 0, v28, (PgWin *)&v4->vfptr, 0, 0);
    v30 = (NiAVObject *)uiEdgeHeight;
    v4->m_pkTotalGoldIcon = v29;
    v31 = PgSprData::Create(v30, "MySilverBtn", &uiLeft, (int *)&uiEdgeWidth, 0);
    v32 = PgWinSpr::CreateWin(0, 0, v31, (PgWin *)&v4->vfptr, 0, 0);
    v33 = (NiAVObject *)uiEdgeHeight;
    v4->m_pkTotalSilverIcon = v32;
    v34 = PgSprData::Create(v33, "MyCopperBtn", &uiLeft, (int *)&uiEdgeWidth, 0);
    v35 = PgWinSpr::CreateWin(0, 0, v34, (PgWin *)&v4->vfptr, 0, 0);
    v36 = v4->m_pkGemIcon;
    v4->m_pkTotalCopperIcon = v35;
    v37 = ((int (*)(void))v36->vfptr[36].__vecDelDtor)();
    v38 = v4->m_pkGemIcon;
    v4->m_uiIconWidth = v37;
    v4->m_uiIconHeight = ((int (*)(void))v38->vfptr[37].__vecDelDtor)();
    v39 = Font::Get(SMALL);
    v4->m_pkGemText = AutoSizingTextWin::CreateWin(0, 0, v39, (PgWin *)&v4->vfptr);
    v40 = Font::Get(SMALL);
    v4->m_pkGoldText = AutoSizingTextWin::CreateWin(0, 0, v40, (PgWin *)&v4->vfptr);
    v41 = Font::Get(SMALL);
    v4->m_pkSilverText = AutoSizingTextWin::CreateWin(0, 0, v41, (PgWin *)&v4->vfptr);
    v42 = Font::Get(SMALL);
    v4->m_pkCopperText = AutoSizingTextWin::CreateWin(0, 0, v42, (PgWin *)&v4->vfptr);
    v43 = Font::Get(SMALL);
    v4->m_pkTotalGemText = AutoSizingTextWin::CreateWin(0, 0, v43, (PgWin *)&v4->vfptr);
    v44 = Font::Get(SMALL);
    v4->m_pkTotalGoldText = AutoSizingTextWin::CreateWin(0, 0, v44, (PgWin *)&v4->vfptr);
    v45 = Font::Get(SMALL);
    v4->m_pkTotalSilverText = AutoSizingTextWin::CreateWin(0, 0, v45, (PgWin *)&v4->vfptr);
    v46 = Font::Get(SMALL);
    v4->m_pkTotalCopperText = AutoSizingTextWin::CreateWin(0, 0, v46, (PgWin *)&v4->vfptr);
    v4->m_pkItemMoneyIcon = IconWin::CreateWin(0, 0, 32, 32, (PgWin *)&v4->vfptr);
    v47 = Font::Get(SMALL);
    v4->m_pkItemMoneyText = AutoSizingTextWin::CreateWin(0, 0, v47, (PgWin *)&v4->vfptr);
    v48 = Font::Get(SMALL);
    v4->m_pkItemMoneyNumText = AutoSizingTextWin::CreateWin(0, 0, v48, (PgWin *)&v4->vfptr);
    v4->m_pkItemTotalMoneyIcon = IconWin::CreateWin(0, 0, 32, 32, (PgWin *)&v4->vfptr);
    v49 = Font::Get(SMALL);
    v4->m_pkItemTotalMoneyText = AutoSizingTextWin::CreateWin(0, 0, v49, (PgWin *)&v4->vfptr);
    ItemInfoWin::HideAllMoneyWin(v4);
    v53 = -1;
    if ( uiEdgeHeight )
    {
      v50 = (void (__thiscall ***)(_DWORD, _DWORD))uiEdgeHeight;
      if ( !InterlockedDecrement((volatile LONG *)(uiEdgeHeight + 4)) )
      {
        if ( v50 )
          (**v50)(v50, 1);
      }
    }
    result = 1;
  }
  else
  {
LABEL_18:
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00525270) --------------------------------------------------------
char __thiscall ItemInfoWin::CreateCloseButton(ItemInfoWin *this)
{
  ItemInfoWin *v1; // edi@1
  NiTexturePalette *v2; // esi@1
  const char *v3; // eax@3
  char result; // al@4
  NiSourceTexture *v5; // eax@5
  PgSprData *v6; // esi@5
  NiNode *v7; // esi@6
  int uiLeft; // [sp+Ch] [bp-18h]@5
  int uiTop; // [sp+10h] [bp-14h]@5
  NiPointer<NiNode> spNode; // [sp+14h] [bp-10h]@1
  int v11; // [sp+20h] [bp-4h]@1

  v1 = this;
  spNode.m_pObject = 0;
  v2 = pTexturePalette;
  v11 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v3 = Folder::Merge(&Folder::m_acMenu, "Game\\CloseButton.nif");
  PgUtil::LoadNodeNifFile(v3, &spNode, v2);
  if ( spNode.m_pObject )
  {
    v5 = MenuTexMgr::GetTexture(4u);
    v6 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor", &uiLeft, &uiTop, v5);
    PgSprData::Add(v6, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick");
    PgSprData::Add(v6, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver");
    v1->m_pkCloseBtn = PgWinBut::CreateWin(0, 0, v6, (PgWin *)&v1->vfptr, 0xAu, 0, 0);
    v11 = -1;
    if ( spNode.m_pObject )
    {
      v7 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      }
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00525390) --------------------------------------------------------
void __thiscall ItemInfoWin::SetItemExpInfo(ItemInfoWin *this, __int64 i64Exp)
{
  ItemInfoWin *v2; // esi@1
  PgWinText **v3; // ebx@1
  int v4; // esi@1
  signed int v5; // edi@1
  NiRefObjectVtbl *v6; // esi@3
  NiUnsharedGeometryGroup *v7; // eax@3
  char *v8; // eax@3

  v2 = this;
  ItemInfoWin::HideAllMoneyWin(this);
  v3 = v2->m_apkTextWin;
  v4 = (int)v2->m_apkTextWin;
  v5 = 80;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 472))(&unk_9901E7);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 468))(&Color::m_kDxWhiteColor);
    v4 += 4;
    --v5;
  }
  while ( v5 );
  v6 = (*v3)->vfptr;
  v7 = TextData::Get(0x455F99ACu);
  v8 = fs("%s: %I64d", v7, i64Exp);
  v6[118].__vecDelDtor((NiRefObject *)*v3, (unsigned int)v8);
}

//----- (00525420) --------------------------------------------------------
void __thiscall ItemInfoWin::SetItemMoneyInfo(ItemInfoWin *this, __int64 i64Money)
{
  ItemInfoWin *v2; // ebx@1
  int v3; // esi@1
  signed int v4; // edi@1

  v2 = this;
  ItemInfoWin::HideAllMoneyWin(this);
  v3 = (int)v2->m_apkTextWin;
  v4 = 80;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 472))(&unk_9901F1);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 468))(&Color::m_kDxWhiteColor);
    v3 += 4;
    --v4;
  }
  while ( v4 );
  ItemInfoWin::ShowPrivateStoreMoneyWin(v2, v2->m_uiEdgeWidth, v2->m_uiEdgeHeight, i64Money, 1);
}

//----- (00525490) --------------------------------------------------------
void __thiscall ItemInfoWin::SetItemFameInfo(ItemInfoWin *this, unsigned int iFameVal)
{
  ItemInfoWin *v2; // esi@1
  PgWinText **v3; // ebx@1
  int v4; // esi@1
  signed int v5; // edi@1
  NiRefObjectVtbl *v6; // esi@3
  NiUnsharedGeometryGroup *v7; // eax@3
  char *v8; // eax@3

  v2 = this;
  ItemInfoWin::HideAllMoneyWin(this);
  v3 = v2->m_apkTextWin;
  v4 = (int)v2->m_apkTextWin;
  v5 = 80;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 472))(&unk_9901F2);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 468))(&Color::m_kDxWhiteColor);
    v4 += 4;
    --v5;
  }
  while ( v5 );
  v6 = (*v3)->vfptr;
  v7 = TextData::Get(0x9BAE96E8);
  v8 = fs("%s:%d", v7, iFameVal);
  v6[118].__vecDelDtor((NiRefObject *)*v3, (unsigned int)v8);
}

//----- (00525510) --------------------------------------------------------
void __userpurge ItemInfoWin::InsertWeaponTitleContents(ItemInfoWin *this@<ecx>, int a2@<edi>, Item *pkItem, int *iIndex)
{
  unsigned __int16 *v4; // eax@4
  char v5; // dl@4
  char *v6; // esi@4
  char *v7; // eax@6
  const char *v8; // eax@9
  NiRefObjectVtbl *v9; // esi@13
  char *v10; // eax@13
  signed int v11; // [sp+Ch] [bp-74h]@4
  ItemInfoWin *v12; // [sp+10h] [bp-70h]@1
  SHINE_ITEM_STRUCT kStruct; // [sp+14h] [bp-6Ch]@4

  v12 = this;
  if ( *iIndex < 80
    && pkItem
    && (unsigned __int8)((int (__thiscall *)(Item *))pkItem->vfptr[1].__vecDelDtor)(pkItem) == 5 )
  {
    v4 = &pkItem->m_kStruct.itemid;
    qmemcpy(&kStruct, &pkItem->m_kStruct, sizeof(kStruct));
    v5 = 0;
    v6 = (char *)&kStruct.itemattr.armor.deletetime;
    v11 = 3;
    do
    {
      if ( *(_WORD *)v6 != -1 )
      {
        v7 = WeaponTitleTab::GetWeaponTitleString(*(_WORD *)v6, *(_DWORD *)(v6 + 2) & 0xFFFFFFF, *v4);
        ((void (__stdcall *)(char *))v12->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(v7);
        ++*iIndex;
        v4 = &pkItem->m_kStruct.itemid;
        v5 = 1;
      }
      v6 += 6;
      --v11;
    }
    while ( v11 );
    if ( v5 )
    {
      v8 = (const char *)(*(int (__stdcall **)(int))(**((_DWORD **)&v12->m_uiTotalMoneyXPos + *iIndex) + 484))(a2);
      if ( v8 && *iIndex > 0 && !strcmp(v8, " ") )
      {
        ((void (__stdcall *)(const char *))v12->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(" ");
        ++*iIndex;
      }
      v9 = v12->m_apkTextWin[*iIndex]->vfptr;
      v10 = (char *)TextData::Get(0x8AFEEDF6);
      fs(v10, (char *)&kStruct.itemattr.costumweapon + 27);
      ((void (__thiscall *)(PgWinText *))v9[118].__vecDelDtor)(v12->m_apkTextWin[*iIndex]);
      ++*iIndex;
    }
  }
}
// 525510: could not find valid save-restore pair for edi

//----- (00525680) --------------------------------------------------------
char *__cdecl GetLastCoolTimeStr(int iTime)
{
  NiUnsharedGeometryGroup *v1; // eax@2
  char *v2; // edx@2
  unsigned int v3; // eax@2
  char *v4; // edi@2
  char v5; // cl@3
  NiUnsharedGeometryGroup *v6; // eax@6
  char v7; // cl@7
  NiUnsharedGeometryGroup *v8; // ST0C_4@10
  char v9; // cl@11
  float v11; // [sp+0h] [bp-28h]@1
  char acTmp[32]; // [sp+4h] [bp-24h]@2

  acStr[0] = 0;
  v11 = (double)iTime / 1000.0
      - (double)(60 * (iTime / 1000 / 60 - 60 * (iTime / 1000 / 3600)))
      - (double)(3600 * (iTime / 1000 / 3600));
  if ( iTime / 1000 / 3600 )
  {
    v1 = TextData::Get(0x9CB3EDF8);
    sprintf(acTmp, (const char *)v1, iTime / 1000 / 3600);
    v2 = acTmp;
    v3 = strlen(acTmp) + 1;
    v4 = &acStr[-1];
    do
      v5 = (v4++)[1];
    while ( v5 );
LABEL_12:
    qmemcpy(v4, v2, v3);
    return acStr;
  }
  if ( iTime / 1000 / 60 != 60 * (iTime / 1000 / 3600) )
  {
    v6 = TextData::Get(0x9CACA8F9);
    sprintf(acTmp, (const char *)v6, " ", iTime / 1000 / 60 - 60 * (iTime / 1000 / 3600));
    v2 = acTmp;
    v3 = strlen(acTmp) + 1;
    v4 = &acStr[-1];
    do
      v7 = (v4++)[1];
    while ( v7 );
    goto LABEL_12;
  }
  if ( 0.0 != v11 )
  {
    v8 = TextData::Get(0x535F8C99u);
    sprintf(acTmp, "%d%s", (signed int)v11, v8);
    v2 = acTmp;
    v3 = strlen(acTmp) + 1;
    v4 = &acStr[-1];
    do
      v9 = (v4++)[1];
    while ( v9 );
    goto LABEL_12;
  }
  return acStr;
}

//----- (00525810) --------------------------------------------------------
int __thiscall ItemInfoWin::DisplayItemDurationBackupTime(ItemInfoWin *this, int iIndex)
{
  int v2; // edi@1
  ItemInfoWin *v3; // ebx@1
  NiUnsharedGeometryGroup *v4; // eax@1
  char *v5; // edx@1
  char v6; // cl@2
  char *v7; // eax@4
  char *v8; // edx@4
  char v9; // cl@5
  unsigned int v10; // eax@6
  char *v11; // edi@6
  char v12; // cl@7
  char *v13; // eax@10
  char *v14; // edx@10
  char v15; // cl@11
  unsigned int v16; // eax@12
  char *v17; // edi@12
  char v18; // cl@13
  char *v19; // eax@16
  char *v20; // edx@16
  char v21; // cl@17
  unsigned int v22; // eax@18
  char *v23; // edi@18
  char v24; // cl@19
  NiRefObjectVtbl *v25; // esi@21
  char *v26; // eax@21
  char *v27; // eax@21
  int result; // eax@21
  int v29; // [sp+8h] [bp-408h]@1
  char strResult[1024]; // [sp+Ch] [bp-404h]@1

  v2 = iIndex;
  v3 = this;
  v29 = iIndex;
  strResult[0] = 0;
  memset(&strResult[1], 0, 0x3FFu);
  v4 = TextData::Get(0x27444090u);
  v5 = (char *)(strResult - (char *)v4);
  do
  {
    v6 = (char)v4->vfptr;
    *((_BYTE *)&v4->vfptr + (_DWORD)v5) = v4->vfptr;
    v4 = (NiUnsharedGeometryGroup *)((char *)v4 + 1);
  }
  while ( v6 );
  if ( strcmp(v3->strStaticDay, "0") == 1 )
  {
    v7 = v3->strStaticDay;
    v8 = v3->strStaticDay;
    do
      v9 = *v7++;
    while ( v9 );
    v10 = v7 - v8;
    v11 = (char *)&v29 + 3;
    do
      v12 = (v11++)[1];
    while ( v12 );
    qmemcpy(v11, v8, v10);
    v2 = v29;
  }
  if ( strcmp(v3->strStaticHour, "0") == 1 )
  {
    v13 = v3->strStaticHour;
    v14 = v3->strStaticHour;
    do
      v15 = *v13++;
    while ( v15 );
    v16 = v13 - v14;
    v17 = (char *)&v29 + 3;
    do
      v18 = (v17++)[1];
    while ( v18 );
    qmemcpy(v17, v14, v16);
    v2 = v29;
  }
  if ( strcmp(v3->strStaticMinute, "0") == 1 )
  {
    v19 = v3->strStaticMinute;
    v20 = v3->strStaticMinute;
    do
      v21 = *v19++;
    while ( v21 );
    v22 = v19 - v20;
    v23 = (char *)&v29 + 3;
    do
      v24 = (v23++)[1];
    while ( v24 );
    qmemcpy(v23, v20, v22);
    v2 = v29;
  }
  ((void (__stdcall *)(char *))v3->m_apkTextWin[v2]->vfptr[118].__vecDelDtor)(strResult);
  v25 = v3->m_apkTextWin[v2 + 1]->vfptr;
  v26 = (char *)TextData::Get(0x7ACAD1D9u);
  v27 = fs(v26, v3->strStaticItemDeleteTime);
  v25[118].__vecDelDtor((NiRefObject *)v3->m_apkTextWin[v2 + 1], (unsigned int)v27);
  result = v2 + 2;
  if ( v3->RemainTimeUpdate > 0.0 )
    v3->RemainTimeUpdate = v3->RemainTimeUpdate - 0.02;
  return result;
}

//----- (00525A40) --------------------------------------------------------
int __thiscall ItemInfoWin::DisplayItemDurationDirectTime(ItemInfoWin *this, int iIndex, ShineDateTime kDelTime)
{
  ItemInfoWin *v3; // esi@1
  char *v4; // eax@1
  char v5; // cl@2
  char *v6; // eax@3
  char v7; // cl@4
  char *v8; // eax@5
  int v9; // esi@5
  char v10; // cl@6
  int v11; // esi@7
  int v12; // eax@7
  long double v13; // st7@7
  signed int v14; // esi@7
  signed int v15; // eax@7
  int v16; // edi@7
  long double v17; // st7@7
  unsigned int v18; // edx@7
  int v19; // ebx@7
  NiUnsharedGeometryGroup *v20; // eax@7
  char *v21; // ecx@7
  char v22; // dl@8
  NiUnsharedGeometryGroup *v23; // eax@10
  char *v24; // eax@10
  char v25; // cl@11
  unsigned int v26; // eax@12
  char *v27; // edi@12
  char v28; // cl@13
  NiUnsharedGeometryGroup *v29; // eax@16
  char *v30; // eax@16
  char v31; // cl@17
  unsigned int v32; // eax@18
  char *v33; // edi@18
  char v34; // cl@19
  NiUnsharedGeometryGroup *v35; // eax@22
  char *v36; // eax@22
  char v37; // cl@23
  unsigned int v38; // eax@24
  char *v39; // edi@24
  char v40; // cl@25
  NiRefObjectVtbl *v41; // esi@27
  char *v42; // eax@27
  char *v43; // eax@27
  char *v44; // eax@27
  char v45; // cl@28
  int v47; // [sp+Ch] [bp-77Ch]@3
  ItemInfoWin *v48; // [sp+10h] [bp-778h]@1
  int iHour; // [sp+14h] [bp-774h]@7
  int v50; // [sp+18h] [bp-770h]@5
  int v51; // [sp+1Ch] [bp-76Ch]@1
  tm TimeRL; // [sp+28h] [bp-760h]@7
  tm TimeRH; // [sp+4Ch] [bp-73Ch]@7
  char strResult[1024]; // [sp+70h] [bp-718h]@1
  char strDay[255]; // [sp+470h] [bp-318h]@1
  char strHour[255]; // [sp+570h] [bp-218h]@1
  char strMinute[255]; // [sp+670h] [bp-118h]@1
  char acDeleteDate[20]; // [sp+770h] [bp-18h]@27

  v3 = this;
  this->RemainTimeUpdate = 1.0;
  v48 = this;
  strcpy(strDay, "0");
  memset(&strDay[2], 0, 0xFDu);
  strcpy(strHour, "0");
  memset(&strHour[2], 0, 0xFDu);
  strcpy(strMinute, "0");
  memset(&strMinute[2], 0, 0xFDu);
  strResult[0] = 0;
  memset(&strResult[1], 0, 0x3FFu);
  v4 = strDay;
  v51 = (char *)v3 - strDay + 440;
  do
  {
    v5 = *v4;
    v4[(char *)v3 - strDay + 440] = *v4;
    ++v4;
  }
  while ( v5 );
  v6 = strHour;
  v47 = (char *)v3 - strHour + 695;
  do
  {
    v7 = *v6;
    v6[(char *)v3 - strHour + 695] = *v6;
    ++v6;
  }
  while ( v7 );
  v8 = strMinute;
  v9 = (char *)v3 - strMinute;
  v50 = v9 + 950;
  do
  {
    v10 = *v8;
    v8[v9 + 950] = *v8;
    ++v8;
  }
  while ( v10 );
  qmemcpy(&TimeRL, &Timer::ms_dLastServerTime, sizeof(TimeRL));
  v11 = _mktime32(&TimeRL);
  TimeRH.tm_year = *(_BYTE *)&kDelTime + 100;
  TimeRH.tm_mon = ((*(unsigned int *)&kDelTime >> 8) & 0x1F) - 1;
  TimeRH.tm_min = *(unsigned int *)&kDelTime >> 25;
  TimeRH.tm_mday = (*(unsigned int *)&kDelTime >> 13) & 0x3F;
  TimeRH.tm_hour = (*(unsigned int *)&kDelTime >> 19) & 0x3F;
  TimeRH.tm_sec = 0;
  v12 = _mktime32(&TimeRH);
  v13 = _difftime32(v12, v11);
  v14 = (signed int)(v13 / 86400.0);
  v15 = (signed int)(v13 / 3600.0);
  v16 = v15 % 24;
  iHour = v15 % 24;
  v17 = v13 - (double)(86400 * v14) - (double)(3600 * (v15 % 24));
  v18 = (signed int)((signed int)v17 + ((unsigned __int64)(-2004318071i64 * (signed int)v17) >> 32)) >> 5;
  v19 = v18 + (v18 >> 31);
  v20 = TextData::Get(0x27444090u);
  v21 = (char *)(strResult - (char *)v20);
  do
  {
    v22 = (char)v20->vfptr;
    *((_BYTE *)&v20->vfptr + (_DWORD)v21) = v20->vfptr;
    v20 = (NiUnsharedGeometryGroup *)((char *)v20 + 1);
  }
  while ( v22 );
  if ( v14 > 0 )
  {
    v23 = TextData::Get(0x97BEF4E9);
    sprintf(strDay, (const char *)v23, v14);
    v24 = strDay;
    do
    {
      v25 = *v24;
      v24[v51] = *v24;
      ++v24;
    }
    while ( v25 );
    v26 = strlen(strDay) + 1;
    v27 = (char *)&TimeRH.tm_isdst + 3;
    do
      v28 = (v27++)[1];
    while ( v28 );
    qmemcpy(v27, strDay, v26);
    v16 = iHour;
  }
  if ( v16 > 0 )
  {
    v29 = TextData::Get(0xA703F2F6);
    sprintf(strHour, (const char *)v29, v16);
    v30 = strHour;
    do
    {
      v31 = *v30;
      v30[v47] = *v30;
      ++v30;
    }
    while ( v31 );
    v32 = strlen(strHour) + 1;
    v33 = (char *)&TimeRH.tm_isdst + 3;
    do
      v34 = (v33++)[1];
    while ( v34 );
    qmemcpy(v33, strHour, v32);
  }
  if ( v19 > 0 )
  {
    v35 = TextData::Get(0xF507F634);
    sprintf(strMinute, (const char *)v35, v19);
    v36 = strMinute;
    do
    {
      v37 = *v36;
      v36[v50] = *v36;
      ++v36;
    }
    while ( v37 );
    v38 = strlen(strMinute) + 1;
    v39 = (char *)&TimeRH.tm_isdst + 3;
    do
      v40 = (v39++)[1];
    while ( v40 );
    qmemcpy(v39, strMinute, v38);
  }
  ((void (__stdcall *)(char *))v48->m_apkTextWin[iIndex]->vfptr[118].__vecDelDtor)(strResult);
  GetShineDateStr(kDelTime, acDeleteDate, 18);
  v41 = v48->m_apkTextWin[iIndex + 1]->vfptr;
  v42 = (char *)TextData::Get(0x7ACAD1D9u);
  v43 = fs(v42, acDeleteDate);
  v41[118].__vecDelDtor((NiRefObject *)v48->m_apkTextWin[iIndex + 1], (unsigned int)v43);
  v44 = acDeleteDate;
  do
  {
    v45 = *v44;
    v44[(char *)v48 - acDeleteDate + 420] = *v44;
    ++v44;
  }
  while ( v45 );
  return iIndex + 2;
}

//----- (00525E60) --------------------------------------------------------
void __thiscall ItemInfoWin::InsertItemEffectContents(ItemInfoWin *this, ItemInfo *pkInfo, int *iIndex)
{
  unsigned int v3; // ebx@1
  ItemInfoWin *v4; // edi@1
  char *v5; // eax@2
  ItemActionEffectDesc *v6; // ebx@4
  NiUnsharedGeometryGroup *v7; // ST08_4@6
  NiUnsharedGeometryGroup *v8; // ST08_4@7
  char *v9; // eax@6
  char *v10; // ebx@8
  int v11; // eax@9
  int v12; // eax@12
  PgWinText *v13; // ecx@13
  int iTextLine; // [sp+Ch] [bp-110h]@1
  HDC__ *hDC; // [sp+10h] [bp-10Ch]@5
  unsigned int i; // [sp+14h] [bp-108h]@1
  char acStr[256]; // [sp+18h] [bp-104h]@5

  v3 = 0;
  v4 = this;
  iTextLine = *iIndex;
  i = 0;
  if ( ITableBase<ActionEffectItem,ActionEffectItemTab>::GetTotal() )
  {
    do
    {
      v5 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActionEffectItem,ActionEffectItemTab>::ms_pkTable + 4), v3);
      if ( v5 )
      {
        if ( *(_WORD *)v5 == pkInfo->ID )
        {
          v6 = ItemActionEffectDescTab::GetByItemActionID(*((_WORD *)v5 + 1));
          if ( v6 )
          {
            acStr[0] = 0;
            memset(&acStr[1], 0, 0xFFu);
            hDC = *(HDC__ **)(((int (*)(void))v4->m_apkTextWin[0]->vfptr[114].__vecDelDtor)() + 192);
            if ( v6->UseItem )
            {
              v7 = TextData2::Get(0xB8D2E5D2);
              v9 = fs("%s %s", v7, v6->ItemActionDesc);
            }
            else
            {
              v8 = TextData2::Get(0xCED02416);
              v9 = fs("%s %s", v8, v6->ItemActionDesc);
            }
            v10 = v9;
            memset(acStr, 0, 0x100u);
            while ( *iIndex < 80 )
            {
              v11 = PgUtil::StringPixelCopy(acStr, v10, hDC, v4->m_iItemNameLength);
              if ( !v11 )
                break;
              acStr[v11] = 0;
              v10 += v11;
              ((void (__stdcall *)(_DWORD))v4->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
              ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v4->m_apkTextWin[*iIndex]->vfptr[116].__vecDelDtor)(
                0,
                200,
                20,
                255);
              ++*iIndex;
              memset(acStr, 0, 0x100u);
            }
          }
        }
      }
      v3 = ++i;
    }
    while ( i < ITableBase<ActionEffectItem,ActionEffectItemTab>::GetTotal() );
  }
  v12 = *iIndex;
  if ( iTextLine < *iIndex )
  {
    v13 = v4->m_apkTextWin[v12];
    *iIndex = v12 + 1;
    ((void (__stdcall *)(_DWORD))v13->vfptr[118].__vecDelDtor)(" ");
  }
}
// A8C1A8: using guessed type int ITableBase<ActionEffectItem,ActionEffectItemTab>::ms_pkTable;

//----- (00526060) --------------------------------------------------------
void __thiscall ItemInfoWin::InsertRequireWeponContents(ItemInfoWin *this, ItemInfo *pkItemInfo, int *iIndex)
{
  NiUnsharedGeometryGroup *v3; // eax@3
  NiUnsharedGeometryGroup *v4; // eax@4
  NiUnsharedGeometryGroup *v5; // edx@4
  char v6; // cl@5
  unsigned int v7; // eax@6
  char *v8; // edi@6
  char v9; // cl@7
  NiUnsharedGeometryGroup *v10; // eax@9
  char v11; // cl@10
  char v12; // cl@12
  NiUnsharedGeometryGroup *v13; // eax@14
  char v14; // cl@15
  char v15; // cl@17
  NiUnsharedGeometryGroup *v16; // eax@19
  char v17; // cl@20
  char v18; // cl@22
  NiUnsharedGeometryGroup *v19; // eax@24
  char v20; // cl@25
  char v21; // cl@27
  NiUnsharedGeometryGroup *v22; // eax@29
  char v23; // cl@30
  char v24; // cl@32
  NiUnsharedGeometryGroup *v25; // eax@34
  char v26; // cl@35
  char v27; // cl@37
  NiUnsharedGeometryGroup *v28; // eax@39
  char v29; // cl@40
  char v30; // cl@42
  NiUnsharedGeometryGroup *v31; // eax@44
  char v32; // cl@45
  char v33; // cl@47
  NiUnsharedGeometryGroup *v34; // eax@49
  char v35; // cl@50
  char v36; // cl@52
  NiUnsharedGeometryGroup *v37; // eax@54
  char v38; // cl@55
  char v39; // cl@57
  NiUnsharedGeometryGroup *v40; // eax@59
  char v41; // cl@60
  char v42; // cl@62
  Item *v43; // eax@64
  ItemInfo *v44; // eax@65
  __int64 v45; // kr00_8@68
  ItemInfoWin *v46; // [sp+8h] [bp-58h]@1
  D3DXCOLOR kTextColor; // [sp+Ch] [bp-54h]@6
  char pkBuff[64]; // [sp+1Ch] [bp-44h]@3

  v46 = this;
  if ( pkItemInfo && pkItemInfo->Class == 26 )
  {
    pkBuff[0] = 0;
    memset(&pkBuff[1], 0, 0x3Fu);
    v3 = TextData2::Get(0x2D8479A5u);
    sprintf(pkBuff, (const char *)v3);
    switch ( pkItemInfo->WeaponType )
    {
      case 1:
        v4 = TextData2::Get(0x5E8CB8A7u);
        v5 = v4;
        do
        {
          v6 = (char)v4->vfptr;
          v4 = (NiUnsharedGeometryGroup *)((char *)v4 + 1);
        }
        while ( v6 );
        v7 = (char *)v4 - (char *)v5;
        v8 = (char *)&kTextColor.a + 3;
        do
          v9 = (v8++)[1];
        while ( v9 );
        goto LABEL_63;
      case 0x15:
        v10 = TextData2::Get(0x6791B8B1u);
        v5 = v10;
        do
        {
          v11 = (char)v10->vfptr;
          v10 = (NiUnsharedGeometryGroup *)((char *)v10 + 1);
        }
        while ( v11 );
        v7 = (char *)v10 - (char *)v5;
        v8 = (char *)&kTextColor.a + 3;
        do
          v12 = (v8++)[1];
        while ( v12 );
        goto LABEL_63;
      case 2:
        v13 = TextData2::Get(0xC2E7D923);
        v5 = v13;
        do
        {
          v14 = (char)v13->vfptr;
          v13 = (NiUnsharedGeometryGroup *)((char *)v13 + 1);
        }
        while ( v14 );
        v7 = (char *)v13 - (char *)v5;
        v8 = (char *)&kTextColor.a + 3;
        do
          v15 = (v8++)[1];
        while ( v15 );
        goto LABEL_63;
      case 3:
        v16 = TextData2::Get(0xC73E1F0D);
        v5 = v16;
        do
        {
          v17 = (char)v16->vfptr;
          v16 = (NiUnsharedGeometryGroup *)((char *)v16 + 1);
        }
        while ( v17 );
        v7 = (char *)v16 - (char *)v5;
        v8 = (char *)&kTextColor.a + 3;
        do
          v18 = (v8++)[1];
        while ( v18 );
        goto LABEL_63;
      case 4:
        v19 = TextData2::Get(0xCBE6D911);
        v5 = v19;
        do
        {
          v20 = (char)v19->vfptr;
          v19 = (NiUnsharedGeometryGroup *)((char *)v19 + 1);
        }
        while ( v20 );
        v7 = (char *)v19 - (char *)v5;
        v8 = (char *)&kTextColor.a + 3;
        do
          v21 = (v8++)[1];
        while ( v21 );
        goto LABEL_63;
      case 5:
        v22 = TextData2::Get(0xB4F21E0F);
        v5 = v22;
        do
        {
          v23 = (char)v22->vfptr;
          v22 = (NiUnsharedGeometryGroup *)((char *)v22 + 1);
        }
        while ( v23 );
        v7 = (char *)v22 - (char *)v5;
        v8 = (char *)&kTextColor.a + 3;
        do
          v24 = (v8++)[1];
        while ( v24 );
        goto LABEL_63;
      case 0xA:
        v25 = TextData2::Get(0xB5E8301B);
        v5 = v25;
        do
        {
          v26 = (char)v25->vfptr;
          v25 = (NiUnsharedGeometryGroup *)((char *)v25 + 1);
        }
        while ( v26 );
        v7 = (char *)v25 - (char *)v5;
        v8 = (char *)&kTextColor.a + 3;
        do
          v27 = (v8++)[1];
        while ( v27 );
        goto LABEL_63;
      case 0xB:
        v28 = TextData2::Get(0xB4FC1D1A);
        v5 = v28;
        do
        {
          v29 = (char)v28->vfptr;
          v28 = (NiUnsharedGeometryGroup *)((char *)v28 + 1);
        }
        while ( v29 );
        v7 = (char *)v28 - (char *)v5;
        v8 = (char *)&kTextColor.a + 3;
        do
          v30 = (v8++)[1];
        while ( v30 );
        goto LABEL_63;
      case 0xD:
        v31 = TextData2::Get(0x6322619u);
        v5 = v31;
        do
        {
          v32 = (char)v31->vfptr;
          v31 = (NiUnsharedGeometryGroup *)((char *)v31 + 1);
        }
        while ( v32 );
        v7 = (char *)v31 - (char *)v5;
        v8 = (char *)&kTextColor.a + 3;
        do
          v33 = (v8++)[1];
        while ( v33 );
        goto LABEL_63;
      case 0x11:
        v34 = TextData2::Get(0xA3B2823u);
        v5 = v34;
        do
        {
          v35 = (char)v34->vfptr;
          v34 = (NiUnsharedGeometryGroup *)((char *)v34 + 1);
        }
        while ( v35 );
        v7 = (char *)v34 - (char *)v5;
        v8 = (char *)&kTextColor.a + 3;
        do
          v36 = (v8++)[1];
        while ( v36 );
        goto LABEL_63;
      case 0x12:
        v37 = TextData2::Get(0xBFE8300D);
        v5 = v37;
        do
        {
          v38 = (char)v37->vfptr;
          v37 = (NiUnsharedGeometryGroup *)((char *)v37 + 1);
        }
        while ( v38 );
        v7 = (char *)v37 - (char *)v5;
        v8 = (char *)&kTextColor.a + 3;
        do
          v39 = (v8++)[1];
        while ( v39 );
        goto LABEL_63;
      case 0x13:
        v40 = TextData2::Get(0xBF2C1D0D);
        v5 = v40;
        do
        {
          v41 = (char)v40->vfptr;
          v40 = (NiUnsharedGeometryGroup *)((char *)v40 + 1);
        }
        while ( v41 );
        v7 = (char *)v40 - (char *)v5;
        v8 = (char *)&kTextColor.a + 3;
        do
          v42 = (v8++)[1];
        while ( v42 );
LABEL_63:
        qmemcpy(v8, v5, v7);
        break;
      default:
        break;
    }
    kTextColor = Color::m_kDxWhiteColor;
    v43 = Inventory::GetEquipedWeapon(&g_kInventory);
    if ( v43 )
    {
      v44 = v43->m_pkInfo;
      if ( v44 )
      {
        if ( v44->WeaponType != pkItemInfo->WeaponType )
          kTextColor = Color::m_kDxRedColor;
      }
    }
    else
    {
      v45 = CharClass::GetBitbyClassType(pkItemInfo->UseClass);
      if ( !(v45 & (1i64 << Char::GetClass(g_pkMainChar))) )
        kTextColor = Color::m_kDxRedColor;
    }
    ((void (__stdcall *)(D3DXCOLOR *))v46->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&kTextColor);
    ((void (__stdcall *)(char *))v46->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(pkBuff);
    ++*iIndex;
  }
}

//----- (00526480) --------------------------------------------------------
void __thiscall ItemInfoWin::InsertSocketInfoContents(ItemInfoWin *this, Item *pkItem, int *iIndex)
{
  ItemInfoWin *v3; // edx@1
  ItemInfo *v4; // eax@2
  int v5; // ecx@4
  int v6; // edi@4
  char *v7; // eax@5
  ItemInfoWin *v8; // esi@9
  NiRefObjectVtbl **v9; // ST1C_4@9
  NiRefObjectVtbl *v10; // ST20_4@9
  char *v11; // eax@9
  char *v12; // eax@9
  NiRefObjectVtbl *v13; // edi@9
  PgWinText *v14; // ST20_4@9
  int v15; // ST0C_4@9
  char *v16; // eax@9
  char *v17; // eax@9
  PgWinText *v18; // esi@9
  ItemInfoWin *v19; // [sp+4h] [bp-74h]@1
  SHINE_ITEM_STRUCT kStruct; // [sp+Ch] [bp-6Ch]@2

  v3 = this;
  v19 = this;
  if ( pkItem )
  {
    v4 = pkItem->m_pkInfo;
    qmemcpy(&kStruct, &pkItem->m_kStruct, sizeof(kStruct));
    if ( v4 )
    {
      if ( v4->Class == 5 )
      {
        v5 = (unsigned __int8)kStruct.itemattr.weapon.maxSocketCount;
        v6 = 0;
        if ( (signed int)(unsigned __int8)kStruct.itemattr.weapon.maxSocketCount > 0 )
        {
          v7 = (char *)&kStruct.itemattr.Bracelet + 48;
          do
          {
            if ( *(_WORD *)v7 == -1 )
              ++v6;
            v7 += 3;
            --v5;
          }
          while ( v5 );
          ((void (__stdcall *)(signed int, signed int, signed int, signed int))v3->m_apkTextWin[*iIndex]->vfptr[116].__vecDelDtor)(
            220,
            100,
            20,
            255);
          v8 = v19;
          v9 = &v19->m_apkTextWin[*iIndex]->vfptr;
          v10 = *v9;
          v11 = (char *)TextData3::Get(0x87AC6D7A);
          v12 = fs(v11, v6);
          v10[118].__vecDelDtor((NiRefObject *)v9, (unsigned int)v12);
          ((void (__stdcall *)(signed int, signed int, signed int, signed int))v8->m_apkTextWin[++*iIndex]->vfptr[116].__vecDelDtor)(
            220,
            100,
            20,
            255);
          v13 = v8->m_apkTextWin[*iIndex]->vfptr;
          v14 = v8->m_apkTextWin[*iIndex];
          v15 = (unsigned __int8)kStruct.itemattr.weapon.maxSocketCount;
          v16 = (char *)TextData3::Get(0x2A586979u);
          v17 = fs(v16, v15);
          v13[118].__vecDelDtor((NiRefObject *)v14, (unsigned int)v17);
          v18 = v8->m_apkTextWin[++*iIndex];
          ++*iIndex;
          v18->vfptr[118].__vecDelDtor((NiRefObject *)v18, (unsigned int)" ");
        }
      }
    }
  }
}

//----- (005265E0) --------------------------------------------------------
void __userpurge ItemInfoWin::ShowItemMoneyWin(ItemInfoWin *this@<ecx>, int a2@<ebx>, int a3@<edi>, int iXPos, int iYPos, int iLot, ItemViewInfo *pkViewInfo, ItemMoney *pkItemMoney, bool bBuyPossible)
{
  ItemInfoWin *v9; // esi@1
  int v10; // eax@7
  NiRefObjectVtbl *v11; // edi@7
  PgFont *v12; // ebx@7
  char *v13; // eax@7
  char *v14; // eax@7
  void *(__thiscall *v15)(NiRefObject *, unsigned int); // edx@7
  char *v16; // eax@7
  char *v17; // ecx@7
  char v18; // dl@8
  unsigned int v19; // ST28_4@9
  int v20; // ebx@9
  NiRefObjectVtbl *v21; // edi@9
  NiSourceTexture *v22; // eax@9
  NiRefObjectVtbl *v23; // edi@9
  int v24; // ebx@9
  int v25; // ST28_4@9
  char *v26; // ST24_4@9
  char *v27; // eax@9
  char *v28; // eax@9
  void *(__thiscall *v29)(NiRefObject *, unsigned int); // eax@9
  int v30; // [sp+34h] [bp-120h]@0
  tagSIZE kSize; // [sp+38h] [bp-11Ch]@9
  ItemInfo *pkItemInfo; // [sp+40h] [bp-114h]@6
  ItemViewInfo *v33; // [sp+44h] [bp-110h]@1
  ItemMoney *v34; // [sp+48h] [bp-10Ch]@1
  int v35; // [sp+4Ch] [bp-108h]@1
  char acStr[256]; // [sp+50h] [bp-104h]@7

  v35 = iLot;
  v9 = this;
  v33 = pkViewInfo;
  v34 = pkItemMoney;
  if ( pkViewInfo )
  {
    if ( pkItemMoney )
    {
      if ( this->m_pkItemMoneyIcon )
      {
        if ( this->m_pkItemMoneyNumText )
        {
          if ( this->m_pkItemMoneyText )
          {
            pkItemInfo = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(pkViewInfo->ID);
            if ( pkItemInfo )
            {
              v10 = ((int (__stdcall *)(int, int))v9->m_apkTextWin[0]->vfptr[114].__vecDelDtor)(a3, a2);
              v11 = v9->m_pkItemMoneyNumText->vfptr;
              v12 = (PgFont *)v10;
              v13 = (char *)TextData3::Get(0x2B2A567Au);
              v14 = fs(v13, v35);
              v11[125].__vecDelDtor((NiRefObject *)v9->m_pkItemMoneyNumText, (unsigned int)v14);
              v15 = v9->m_pkItemMoneyNumText->vfptr[77].__vecDelDtor;
              v35 = iYPos + 3;
              ((void (__stdcall *)(int, int))v15)(iXPos + 3, iYPos + 3);
              ((void (__stdcall *)(signed int))v9->m_pkItemMoneyNumText->vfptr[64].__vecDelDtor)(1);
              v16 = (char *)((int (*)(void))v9->m_pkItemMoneyNumText->vfptr[121].__vecDelDtor)();
              v17 = (char *)(acStr - v16);
              do
              {
                v18 = *v16;
                v16[(_DWORD)v17] = *v16;
                ++v16;
              }
              while ( v18 );
              PgFont::GetTextSize(v12, acStr, strlen(acStr), &kSize);
              v19 = v33->IconIndex;
              v20 = iXPos + kSize.cx;
              v21 = v9->m_pkItemMoneyIcon->vfptr;
              v22 = IconMgr::GetTexture(v33->IconFile);
              ((void (__thiscall *)(IconWin *, NiSourceTexture *, unsigned int))v21[146].__vecDelDtor)(
                v9->m_pkItemMoneyIcon,
                v22,
                v19);
              ((void (__stdcall *)(int, int))v9->m_pkItemMoneyIcon->vfptr[77].__vecDelDtor)(v20, iYPos - 5);
              ((void (__stdcall *)(_DWORD))v9->m_pkItemMoneyIcon->vfptr[71].__vecDelDtor)(0.69999999);
              ((void (__stdcall *)(signed int))v9->m_pkItemMoneyIcon->vfptr[64].__vecDelDtor)(1);
              v23 = v9->m_pkItemMoneyText->vfptr;
              v24 = v20 + v9->m_uiIconWidth + 6;
              v25 = v34->IM_MoneyLot;
              v26 = pkItemInfo->Name;
              v27 = (char *)TextData3::Get(0x10361F61u);
              v28 = fs(v27, v26, v25);
              v23[125].__vecDelDtor((NiRefObject *)v9->m_pkItemMoneyText, (unsigned int)v28);
              ((void (__stdcall *)(int, int))v9->m_pkItemMoneyText->vfptr[77].__vecDelDtor)(v24, v35);
              ((void (__stdcall *)(signed int))v9->m_pkItemMoneyText->vfptr[64].__vecDelDtor)(1);
              v29 = v9->m_pkItemMoneyNumText->vfptr[117].__vecDelDtor;
              if ( bBuyPossible )
              {
                ((void (__stdcall *)(D3DXCOLOR *, int))v29)(&Color::m_kDxWhiteColor, v30);
                ((void (__cdecl *)(D3DXCOLOR *))v9->m_pkItemMoneyText->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
              }
              else
              {
                ((void (__stdcall *)(D3DXCOLOR *, int))v29)(&Color::m_kDxRedColor, v30);
                ((void (__cdecl *)(D3DXCOLOR *))v9->m_pkItemMoneyText->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
              }
            }
          }
        }
      }
    }
  }
}

//----- (00526880) --------------------------------------------------------
void __thiscall ItemInfoWin::ShowTotalItemMoneyWin(ItemInfoWin *this, int iXPos, int iYPos, int iLot, ItemViewInfo *pkViewInfo, ItemMoney *pkItemMoney, bool bBuyPossible)
{
  ItemInfoWin *v7; // esi@1
  NiRefObjectVtbl *v8; // edi@6
  unsigned int v9; // ST10_4@6
  NiSourceTexture *v10; // eax@6
  int v11; // ebx@6
  PgFont *v12; // eax@6
  NiRefObjectVtbl *v13; // edi@6
  int v14; // ST18_4@6
  char *v15; // eax@6
  char *v16; // eax@6
  char *v17; // eax@6
  char *v18; // ecx@6
  char v19; // dl@7
  void *(__thiscall *v20)(NiRefObject *, unsigned int); // eax@8
  tagSIZE kSize; // [sp+28h] [bp-118h]@8
  ItemMoney *v22; // [sp+30h] [bp-110h]@1
  ItemInfo *pkItemInfo; // [sp+34h] [bp-10Ch]@5
  PgFont *pkFont; // [sp+38h] [bp-108h]@6
  char acStr[256]; // [sp+3Ch] [bp-104h]@6

  v7 = this;
  v22 = pkItemMoney;
  if ( pkViewInfo )
  {
    if ( pkItemMoney )
    {
      if ( this->m_pkItemTotalMoneyIcon )
      {
        if ( this->m_pkItemTotalMoneyText )
        {
          pkItemInfo = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(pkViewInfo->ID);
          if ( pkItemInfo )
          {
            v8 = v7->m_pkItemTotalMoneyIcon->vfptr;
            v9 = pkViewInfo->IconIndex;
            v10 = IconMgr::GetTexture(pkViewInfo->IconFile);
            ((void (__thiscall *)(IconWin *, NiSourceTexture *, unsigned int, signed int, signed int))v8[146].__vecDelDtor)(
              v7->m_pkItemTotalMoneyIcon,
              v10,
              v9,
              32,
              32);
            ((void (__stdcall *)(int, int))v7->m_pkItemTotalMoneyIcon->vfptr[77].__vecDelDtor)(iXPos, iYPos - 5);
            ((void (__stdcall *)(_DWORD))v7->m_pkItemTotalMoneyIcon->vfptr[71].__vecDelDtor)(0.69999999);
            ((void (__stdcall *)(signed int))v7->m_pkItemTotalMoneyIcon->vfptr[64].__vecDelDtor)(1);
            v11 = iXPos + v7->m_uiIconWidth + 3;
            v12 = (PgFont *)((int (*)(void))v7->m_apkTextWin[0]->vfptr[114].__vecDelDtor)();
            v13 = v7->m_pkItemTotalMoneyText->vfptr;
            pkFont = v12;
            v14 = iLot * v22->IM_MoneyLot;
            v15 = (char *)TextData3::Get(0x10361F61u);
            v16 = fs(v15, pkItemInfo->Name, v14);
            v13[125].__vecDelDtor((NiRefObject *)v7->m_pkItemTotalMoneyText, (unsigned int)v16);
            v17 = (char *)((int (*)(void))v7->m_pkItemTotalMoneyText->vfptr[121].__vecDelDtor)();
            v18 = (char *)(acStr - v17);
            do
            {
              v19 = *v17;
              v17[(_DWORD)v18] = *v17;
              ++v17;
            }
            while ( v19 );
            PgFont::GetTextSize(pkFont, acStr, strlen(acStr), &kSize);
            v7->m_uiItemMoneyWidth += v11;
            ((void (__stdcall *)(int, int))v7->m_pkItemTotalMoneyText->vfptr[77].__vecDelDtor)(v11 + 3, iYPos + 3);
            ((void (__stdcall *)(signed int))v7->m_pkItemTotalMoneyText->vfptr[64].__vecDelDtor)(1);
            v20 = v7->m_pkItemTotalMoneyText->vfptr[117].__vecDelDtor;
            if ( bBuyPossible )
              ((void (__stdcall *)(D3DXCOLOR *))v20)(&Color::m_kDxWhiteColor);
            else
              ((void (__stdcall *)(D3DXCOLOR *))v20)(&Color::m_kDxRedColor);
          }
        }
      }
    }
  }
}

//----- (00526A90) --------------------------------------------------------
void __thiscall ItemInfoWin::InsertRandomOptCntContents(ItemInfoWin *this, Item *pkItem, int *iIndex)
{
  ItemInfoWin *v3; // edi@1
  _BYTE *v4; // eax@3
  int v5; // eax@5
  NiRefObjectVtbl *v6; // ebx@6
  int v7; // ST0C_4@6
  char *v8; // eax@6
  char *v9; // eax@6

  v3 = this;
  if ( pkItem )
  {
    if ( *iIndex >= 0 )
    {
      v4 = (_BYTE *)((int (__thiscall *)(Item *))pkItem->vfptr[12].__vecDelDtor)(pkItem);
      if ( v4 )
      {
        if ( *v4 & 0xFE )
        {
          v5 = v3->m_iLimitRandomOption
             - (unsigned __int8)((int (__thiscall *)(Item *))pkItem->vfptr[18].__vecDelDtor)(pkItem);
          if ( v5 >= 0 )
          {
            v6 = v3->m_apkTextWin[*iIndex]->vfptr;
            v7 = v5;
            v8 = (char *)TextData3::Get(0xE2ED021D);
            v9 = fs(v8, v7);
            v6[118].__vecDelDtor((NiRefObject *)v3->m_apkTextWin[*iIndex], (unsigned int)v9);
            ((void (__stdcall *)(signed int, signed int, signed int, signed int))v3->m_apkTextWin[*iIndex]->vfptr[116].__vecDelDtor)(
              220,
              100,
              20,
              255);
            ++*iIndex;
          }
        }
      }
    }
  }
}

//----- (00526B40) --------------------------------------------------------
void __thiscall ItemInfoWin::InsertRequireShieldContents(ItemInfoWin *this, ItemInfo *pkItemInfo, int *iIndex)
{
  NiUnsharedGeometryGroup *v3; // eax@3
  NiUnsharedGeometryGroup *v4; // eax@3
  NiUnsharedGeometryGroup *v5; // edx@3
  char v6; // cl@4
  unsigned int v7; // eax@5
  char *v8; // edi@5
  char v9; // cl@6
  NiUnsharedGeometryGroup *v10; // esi@7
  float v11; // edx@7
  char *v12; // edi@7
  char *v13; // esi@7
  char v14; // cl@7
  float v15; // eax@7
  Item *v16; // eax@7
  __int64 v17; // kr00_8@10
  ItemInfoWin *v18; // [sp+8h] [bp-58h]@1
  D3DXCOLOR kTextColor; // [sp+Ch] [bp-54h]@5
  char pkBuff[64]; // [sp+1Ch] [bp-44h]@3

  v18 = this;
  if ( pkItemInfo && pkItemInfo->Class == 37 )
  {
    pkBuff[0] = 0;
    memset(&pkBuff[1], 0, 0x3Fu);
    v3 = TextData2::Get(0x2D8479A5u);
    sprintf(pkBuff, (const char *)v3);
    v4 = TextData3::Get(0xFF441E15);
    v5 = v4;
    do
    {
      v6 = (char)v4->vfptr;
      v4 = (NiUnsharedGeometryGroup *)((char *)v4 + 1);
    }
    while ( v6 );
    v7 = (char *)v4 - (char *)v5;
    v8 = (char *)&kTextColor.a + 3;
    do
      v9 = (v8++)[1];
    while ( v9 );
    v10 = v5;
    v11 = Color::m_kDxWhiteColor.r;
    qmemcpy(v8, v10, 4 * (v7 >> 2));
    v13 = (char *)v10 + 4 * (v7 >> 2);
    v12 = &v8[4 * (v7 >> 2)];
    v14 = v7;
    v15 = Color::m_kDxWhiteColor.g;
    qmemcpy(v12, v13, v14 & 3);
    kTextColor.r = v11;
    kTextColor.b = Color::m_kDxWhiteColor.b;
    kTextColor.g = v15;
    kTextColor.a = Color::m_kDxWhiteColor.a;
    v16 = Inventory::GetLeftHandEquip(&g_kInventory);
    if ( v16 && (unsigned __int8)((int (__thiscall *)(Item *))v16->vfptr[1].__vecDelDtor)(v16) != 7 )
      kTextColor = Color::m_kDxRedColor;
    v17 = CharClass::GetBitbyClassType(pkItemInfo->UseClass);
    if ( !(v17 & (1i64 << Char::GetClass(g_pkMainChar))) )
      kTextColor = Color::m_kDxRedColor;
    ((void (__stdcall *)(D3DXCOLOR *))v18->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&kTextColor);
    ((void (__stdcall *)(char *))v18->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(pkBuff);
    ++*iIndex;
  }
}

//----- (00526CD0) --------------------------------------------------------
void __thiscall ItemInfoWin::InsertMoverUpgradeContents(ItemInfoWin *this, ItemInfo *pkItemInfo, char nGrade, int *iIndex)
{
  ItemInfoWin *v4; // edi@1
  char *v5; // eax@1
  int *v6; // esi@1
  char *v7; // ebx@1
  __int16 v8; // ax@1
  NiRefObjectVtbl *v9; // ebx@2
  int v10; // ST0C_4@2
  char *v11; // eax@2
  char *v12; // eax@2
  __int16 v13; // ax@3
  NiRefObjectVtbl *v14; // ebx@4
  char *v15; // eax@4
  char *v16; // eax@4
  NiRefObjectVtbl *v17; // ebx@4
  char *v18; // eax@4
  char *v19; // eax@4
  __int16 v20; // ax@5
  NiRefObjectVtbl *v21; // ebx@6
  int v22; // ST0C_4@6
  char *v23; // eax@6
  char *v24; // eax@6
  __int16 v25; // ax@7
  NiRefObjectVtbl *v26; // ebx@8
  int v27; // ST0C_4@8
  char *v28; // eax@8
  char *v29; // eax@8
  NiRefObjectVtbl *v30; // ebx@10
  NiUnsharedGeometryGroup *v31; // eax@10
  char *v32; // ebx@11
  AbnormalStateViewInfo *v33; // eax@12
  const char *v34; // eax@12
  char *nGradea; // [sp+18h] [bp+Ch]@1
  int *iIndexa; // [sp+1Ch] [bp+10h]@4

  v4 = this;
  v5 = CDataReader::GetRecord(
         (CDataReader *)(ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::ms_pkTable + 4),
         (unsigned __int8)nGrade);
  v6 = iIndex;
  v7 = v5;
  v8 = *(_WORD *)v5;
  nGradea = v7;
  if ( v8 )
  {
    v9 = v4->m_apkTextWin[*iIndex]->vfptr;
    v10 = (signed __int16)(100 * v8) / 1000;
    v11 = (char *)TextData3::Get(0x3D202268u);
    v12 = fs(v11, v10);
    v9[118].__vecDelDtor((NiRefObject *)v4->m_apkTextWin[*iIndex], (unsigned int)v12);
    ((void (__stdcall *)(D3DXCOLOR *))v4->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
    ++*iIndex;
    v7 = nGradea;
  }
  v13 = *((_WORD *)v7 + 2);
  if ( v13 )
  {
    v14 = v4->m_apkTextWin[*iIndex]->vfptr;
    iIndexa = (int *)((signed __int16)(100 * v13) / 1000);
    v15 = (char *)TextData3::Get(0x3D7B6760u);
    v16 = fs(v15, iIndexa);
    v14[118].__vecDelDtor((NiRefObject *)v4->m_apkTextWin[*v6], (unsigned int)v16);
    ((void (__stdcall *)(D3DXCOLOR *))v4->m_apkTextWin[*v6]->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
    v17 = v4->m_apkTextWin[++*v6]->vfptr;
    v18 = (char *)TextData3::Get(0x3D7B676Bu);
    v19 = fs(v18, iIndexa);
    v17[118].__vecDelDtor((NiRefObject *)v4->m_apkTextWin[*v6], (unsigned int)v19);
    ((void (__stdcall *)(D3DXCOLOR *))v4->m_apkTextWin[*v6]->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
    ++*v6;
    v7 = nGradea;
  }
  v20 = *((_WORD *)v7 + 4);
  if ( v20 )
  {
    v21 = v4->m_apkTextWin[*v6]->vfptr;
    v22 = (signed __int16)(100 * v20) / 1000;
    v23 = (char *)TextData3::Get(0x89776A68);
    v24 = fs(v23, v22);
    v21[118].__vecDelDtor((NiRefObject *)v4->m_apkTextWin[*v6], (unsigned int)v24);
    ((void (__stdcall *)(_DWORD))v4->m_apkTextWin[*v6]->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
    ++*v6;
    v7 = nGradea;
  }
  v25 = *((_WORD *)v7 + 3);
  if ( v25 )
  {
    v26 = v4->m_apkTextWin[*v6]->vfptr;
    v27 = (signed __int16)(100 * v25) / 1000;
    v28 = (char *)TextData3::Get(0xA0BAAEA6);
    v29 = fs(v28, v27);
    v26[118].__vecDelDtor((NiRefObject *)v4->m_apkTextWin[*v6], (unsigned int)v29);
    ((void (__stdcall *)(_DWORD))v4->m_apkTextWin[*v6]->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
    ++*v6;
    v7 = nGradea;
  }
  if ( strcmp(v7 + 10, "-") )
  {
    v30 = v4->m_apkTextWin[*v6]->vfptr;
    v31 = TextData3::Get(0x3D216C59u);
    v30[118].__vecDelDtor((NiRefObject *)v4->m_apkTextWin[*v6], (unsigned int)v31);
    ((void (__stdcall *)(_DWORD))v4->m_apkTextWin[*v6]->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
    ++*v6;
    v7 = nGradea;
  }
  v32 = v7 + 42;
  if ( strcmp(v32, "-") )
  {
    v33 = AbnormalStateViewInfoTab::GetByInxName(v32);
    v34 = fs("+ %s", v33->Descript);
    ItemInfoWin::SetTextBeginNewLine(v4, v34, v6, &Color::m_kDxWhiteColor);
  }
}
// A8C258: using guessed type int ITableBase<MoverUpgradeEffect,MoverUpgradeEffectTab>::ms_pkTable;

//----- (00527000) --------------------------------------------------------
void __thiscall ItemInfoWin::ItemInfoWin(ItemInfoWin *this)
{
  ItemInfoWin *v1; // esi@1
  __int16 v2; // ax@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v3; // [sp-1Ch] [bp-3Ch]@1
  int v4; // [sp-Ch] [bp-2Ch]@1
  signed int v5; // [sp-8h] [bp-28h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v6; // [sp+Ch] [bp-14h]@1
  ItemInfoWin *v7; // [sp+10h] [bp-10h]@1
  int v8; // [sp+1Ch] [bp-4h]@1

  v1 = this;
  v7 = this;
  FrameBoxWin::FrameBoxWin((FrameBoxWin *)&this->vfptr);
  v6 = &v3;
  v1->vfptr = (NiRefObjectVtbl *)&ItemInfoWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ItemInfoWin::`vftable'{for `IDirectMessenger'};
  v5 = 15;
  v4 = 0;
  v8 = 0;
  v3._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v3, "LimitRandomOption", 0x11u);
  v2 = CSingleDataMap::GetValue(&g_kSingleDataMap, v3);
  v1->RemainTimeUpdate = -1.0;
  v1->m_iLimitRandomOption = (unsigned __int16)v2;
  v1->m_uiMoneyXPos = 0;
  v1->m_iFontHeight = 14;
  v1->m_pkItemMoneyIcon = 0;
  v1->m_pkItemMoneyText = 0;
  v1->m_pkItemMoneyNumText = 0;
  v1->m_pkItemTotalMoneyIcon = 0;
  v1->m_pkItemTotalMoneyText = 0;
  v1->m_uiItemMoneyWidth = 0;
  v1->strStaticItemDeleteTime[0] = 0;
  v1->strStaticDay[0] = 0;
  v1->strStaticHour[0] = 0;
  v1->strStaticMinute[0] = 0;
}
// 9906B4: using guessed type void (__thiscall *ItemInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9906D4: using guessed type int (__thiscall *ItemInfoWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005270F0) --------------------------------------------------------
ItemInfoWin *__cdecl ItemInfoWin::CreateWin(NiSourceTexture *pkTexture, unsigned int uiEdgeHeight, unsigned int uiEdgeWidth)
{
  PgWin *v3; // eax@1
  PgWin *v4; // eax@2
  PgWin *v5; // esi@2
  PgWin *v6; // edi@8
  ItemInfoWin *v7; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x678u);
  result.m_pObject = v3;
  v9 = 0;
  if ( v3 )
  {
    ItemInfoWin::ItemInfoWin((ItemInfoWin *)v3);
    v5 = v4;
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v9 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v5);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, NiSourceTexture *, unsigned int, unsigned int))v5->vfptr[137].__vecDelDtor)(
                          v5,
                          pkTexture,
                          uiEdgeHeight,
                          uiEdgeWidth) )
  {
    ((void (__thiscall *)(PgWin *))v5->vfptr[89].__vecDelDtor)(v5);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = (ItemInfoWin *)v5;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v5);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = 0;
  }
  return v7;
}

//----- (00527230) --------------------------------------------------------
void __thiscall ItemInfoWin::InsertSetItemContents(ItemInfoWin *this, ItemInfo *pkInfo, int *iIndex)
{
  ItemInfoWin *v3; // edi@1
  SetItemName *v4; // eax@3
  NiRefObjectVtbl *v5; // ebx@4
  char *v6; // eax@4
  PgWinText *v7; // ecx@5
  NiRefObjectVtbl **v8; // ebx@5
  NiRefObjectVtbl *v9; // edi@5
  NiUnsharedGeometryGroup *v10; // eax@5
  unsigned int v11; // ebx@5
  char *v12; // eax@6
  char *v13; // edi@6
  const char *v14; // eax@7
  signed int v15; // edi@9
  bool v16; // cf@9
  Item *v17; // eax@11
  unsigned int v18; // edi@18
  char *v19; // edi@19
  int v20; // ebx@21
  unsigned int v21; // edi@21
  PgWinText *v22; // ecx@26
  NiRefObjectVtbl *v23; // edi@26
  char *v24; // eax@26
  char *v25; // eax@26
  char *v26; // eax@28
  char v27; // dl@29
  unsigned int v28; // edi@30
  const void *v29; // eax@32
  int v30; // ecx@34
  unsigned int v31; // eax@36
  unsigned int v32; // edi@36
  char *v33; // edx@39
  char *v34; // ecx@40
  _BYTE *v35; // ecx@41
  unsigned int v36; // eax@41
  int v37; // eax@45
  char *v38; // edi@45
  int v39; // eax@48
  PgWinText *v40; // ecx@57
  unsigned int v41; // [sp+14h] [bp-248h]@18
  ItemInfoWin *v42; // [sp+18h] [bp-244h]@1
  char *pkTempItemActionEffectDesc; // [sp+1Ch] [bp-240h]@25
  ItemActionEffectDesc *pkTempItemActionEffectDesca; // [sp+1Ch] [bp-240h]@45
  ItemInfo *pkTempInfo; // [sp+20h] [bp-23Ch]@6
  ItemInfo *pkTempInfoa; // [sp+20h] [bp-23Ch]@17
  int iEquipedSetItemCount; // [sp+24h] [bp-238h]@5
  unsigned int i; // [sp+28h] [bp-234h]@5
  signed int ia; // [sp+28h] [bp-234h]@17
  char _Ptr; // [sp+2Ch] [bp-230h]@30
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strDesc; // [sp+30h] [bp-22Ch]@28
  char buffer[256]; // [sp+4Ch] [bp-210h]@32
  char acStr[256]; // [sp+14Ch] [bp-110h]@47
  int v54; // [sp+258h] [bp-4h]@30

  v3 = this;
  v42 = this;
  if ( *iIndex < 80 && pkInfo->SetItemIndex[0] != 45 )
  {
    v4 = SetItemNameTab::GetByInxName(pkInfo->SetItemIndex);
    if ( v4 )
    {
      v5 = v3->m_apkTextWin[*iIndex]->vfptr;
      v6 = fs("[%s]", v4->SetName);
      v5[118].__vecDelDtor((NiRefObject *)v3->m_apkTextWin[*iIndex], (unsigned int)v6);
      ((void (__stdcall *)(signed int, signed int, signed int, signed int))v3->m_apkTextWin[*iIndex]->vfptr[116].__vecDelDtor)(
        120,
        120,
        255,
        255);
      ++*iIndex;
    }
    v7 = v3->m_apkTextWin[(*iIndex)++];
    ((void (__stdcall *)(const char *))v7->vfptr[118].__vecDelDtor)(" ");
    v8 = &v3->m_apkTextWin[(*iIndex)++]->vfptr;
    v9 = *v8;
    v10 = TextData2::Get(0xDB653F36);
    v9[118].__vecDelDtor((NiRefObject *)v8, (unsigned int)v10);
    v11 = 0;
    iEquipedSetItemCount = 0;
    i = 0;
    if ( ITableBase<ItemInfo,ItemInfoTab>::GetTotal() )
    {
      do
      {
        v12 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v11);
        v13 = v12;
        pkTempInfo = (ItemInfo *)v12;
        if ( v12 )
        {
          v14 = v12 + 342;
          if ( v13[342] != 45 && !strcmp(v14, pkInfo->SetItemIndex) )
          {
            ((void (__stdcall *)(char *))v42->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(v13 + 34);
            v15 = 0;
            v16 = 1;
            do
            {
              if ( v16 )
              {
                v17 = g_kInventory.m_aspEquip[v15].m_pObject;
                if ( v17 )
                {
                  if ( pkTempInfo->ID == v17->m_kStruct.itemid )
                  {
                    ((void (__stdcall *)(D3DXCOLOR *))v42->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
                    ++iEquipedSetItemCount;
                  }
                }
              }
              v16 = (unsigned int)++v15 < 0x1E;
            }
            while ( v15 < 30 );
            ++*iIndex;
            v11 = i;
          }
        }
        i = ++v11;
      }
      while ( v11 < ITableBase<ItemInfo,ItemInfoTab>::GetTotal() );
    }
    ia = 2;
    pkTempInfoa = (ItemInfo *)4;
    do
    {
      v18 = 0;
      v41 = 0;
      if ( SetEffectTab::GetTotal() )
      {
        do
        {
          v19 = CDataReader::GetRecord((CDataReader *)(ITableBase<SetEffect,SetEffectTab>::ms_pkTable + 4), v18);
          if ( !strcmp(v19, pkInfo->SetItemIndex) && (unsigned __int8)v19[32] == ia )
          {
            v20 = *(_WORD *)(v19 + 33);
            v21 = 0;
            if ( ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::GetTotal() )
            {
              while ( *(_WORD *)CDataReader::GetRecord(
                                  (CDataReader *)(ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::ms_pkTable
                                                + 4),
                                  v21) != v20 )
              {
                if ( ++v21 >= ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::GetTotal() )
                  goto LABEL_55;
              }
              pkTempItemActionEffectDesc = CDataReader::GetRecord(
                                             (CDataReader *)(ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::ms_pkTable
                                                           + 4),
                                             v21);
              if ( pkTempItemActionEffectDesc )
              {
                v22 = v42->m_apkTextWin[(*iIndex)++];
                ((void (__stdcall *)(const char *))v22->vfptr[118].__vecDelDtor)(" ");
                v23 = v42->m_apkTextWin[*iIndex]->vfptr;
                v24 = (char *)TextData2::Get(0xDB03E333);
                v25 = fs(v24, ia);
                v23[118].__vecDelDtor((NiRefObject *)v42->m_apkTextWin[*iIndex], (unsigned int)v25);
                if ( ia <= iEquipedSetItemCount )
                  ((void (__stdcall *)(struct D3DXCOLOR *))v42->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxBlueColor);
                ++*iIndex;
                v26 = pkTempItemActionEffectDesc + 3;
                strDesc._Myres = 15;
                strDesc._Mysize = 0;
                strDesc._Bx._Buf[0] = 0;
                do
                  v27 = *v26++;
                while ( v27 );
                std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                  &strDesc,
                  pkTempItemActionEffectDesc + 3,
                  v26 - (pkTempItemActionEffectDesc + 4));
                v54 = 0;
                _Ptr = 10;
                v28 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::find(&strDesc, &_Ptr, 0, 1u);
                if ( v28 != -1 )
                {
                  _Ptr = 10;
                  do
                  {
                    buffer[0] = 0;
                    memset(&buffer[1], 0, 0xFFu);
                    v29 = strDesc._Bx._Ptr;
                    if ( strDesc._Myres < 0x10 )
                      v29 = &strDesc;
                    memcpy_s(buffer, v28, v29, 0);
                    v30 = *iIndex;
                    buffer[0] = 0;
                    ((void (__stdcall *)(char *))v42->m_apkTextWin[v30]->vfptr[118].__vecDelDtor)(buffer);
                    if ( ia <= iEquipedSetItemCount )
                      ((void (__stdcall *)(D3DXCOLOR *))v42->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
                    v31 = strDesc._Mysize;
                    ++*iIndex;
                    v32 = v28 + 1;
                    if ( v31 < v32 )
                      v32 = v31;
                    if ( v32 )
                    {
                      v33 = strDesc._Bx._Ptr;
                      if ( strDesc._Myres >= 0x10 )
                      {
                        v34 = strDesc._Bx._Ptr;
                      }
                      else
                      {
                        v33 = (char *)&strDesc;
                        v34 = (char *)&strDesc;
                      }
                      memmove(v34, &v33[v32], v31 - v32);
                      v35 = strDesc._Bx._Ptr;
                      v36 = strDesc._Mysize - v32;
                      strDesc._Mysize -= v32;
                      if ( strDesc._Myres < 0x10 )
                        v35 = &strDesc;
                      v35[v36] = 0;
                    }
                    v28 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::find(
                            &strDesc,
                            &_Ptr,
                            0,
                            1u);
                  }
                  while ( v28 != -1 );
                }
                v37 = ((int (*)(void))v42->m_apkTextWin[0]->vfptr[114].__vecDelDtor)();
                v38 = strDesc._Bx._Ptr;
                pkTempItemActionEffectDesca = *(ItemActionEffectDesc **)(v37 + 192);
                if ( strDesc._Myres < 0x10 )
                  v38 = (char *)&strDesc;
                memset(acStr, 0, 0x100u);
                while ( *iIndex < 80 )
                {
                  v39 = PgUtil::StringPixelCopy(
                          acStr,
                          v38,
                          (HDC__ *)pkTempItemActionEffectDesca,
                          v42->m_iItemNameLength);
                  if ( !v39 )
                    break;
                  acStr[v39] = 0;
                  v38 += v39;
                  ((void (__stdcall *)(char *))v42->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
                  if ( ia <= iEquipedSetItemCount )
                    ((void (__stdcall *)(_DWORD))v42->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
                  ++*iIndex;
                  memset(acStr, 0, 0x100u);
                }
                v54 = -1;
                if ( strDesc._Myres >= 0x10 )
                  operator delete(strDesc._Bx._Ptr);
                strDesc._Myres = 15;
                strDesc._Mysize = 0;
                strDesc._Bx._Buf[0] = 0;
              }
            }
          }
LABEL_55:
          v18 = ++v41;
        }
        while ( v41 < SetEffectTab::GetTotal() );
      }
      ++ia;
      pkTempInfoa = (ItemInfo *)((char *)pkTempInfoa - 1);
    }
    while ( pkTempInfoa );
    v40 = v42->m_apkTextWin[(*iIndex)++];
    ((void (__stdcall *)(const char *))v40->vfptr[118].__vecDelDtor)(" ");
  }
}
// A695F0: using guessed type struct D3DXCOLOR Color::m_kDxBlueColor;
// A8C1A0: using guessed type int ITableBase<ItemActionEffectDesc,ItemActionEffectDescTab>::ms_pkTable;
// A8C1A4: using guessed type int ITableBase<SetEffect,SetEffectTab>::ms_pkTable;
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (005278B0) --------------------------------------------------------
void __thiscall ItemInfoWin::InsertItemMixContents(ItemInfoWin *this, Item *pkItem, int *iIndex)
{
  ItemInfoWin *v3; // edi@1
  ItemInfo *v4; // eax@3
  char *v5; // eax@4
  NiRefObjectVtbl *v6; // ebx@7
  NiUnsharedGeometryGroup *v7; // eax@7

  v3 = this;
  if ( pkItem && *iIndex >= 0 )
  {
    v4 = pkItem->m_pkInfo;
    if ( v4 )
      v5 = v4->InxName;
    else
      v5 = 0;
    if ( ItemMixDataTab::IsMixItem(&g_kItemMixDataTab, v5) )
    {
      v6 = v3->m_apkTextWin[*iIndex]->vfptr;
      v7 = TextData3::Get(0x17C17067u);
      v6[118].__vecDelDtor((NiRefObject *)v3->m_apkTextWin[*iIndex], (unsigned int)v7);
      ((void (__stdcall *)(_DWORD))v3->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
      ++*iIndex;
    }
  }
}

//----- (00527930) --------------------------------------------------------
void __thiscall ItemInfoWin::InsertNameContents(ItemInfoWin *this, ItemInfoWin::sNameContentsParameter *Parameter, int *iIndex)
{
  bool v3; // sf@1
  unsigned __int8 v4; // of@1
  ItemViewInfo *v5; // edx@1
  int v6; // esi@1
  Item *v7; // edi@1
  ItemInfo *v8; // ecx@1
  BRAccUpgradeInfo *v9; // eax@8
  UpgradeFactor v10; // ecx@10
  UpGradeInfo *v11; // eax@26
  UpgradeFactor v12; // ecx@28
  char *v13; // esi@46
  WEAPON_TITLE_DATA *v14; // eax@48
  unsigned int v15; // ecx@53
  unsigned int v16; // eax@60
  ItemInfoWin *v17; // esi@63
  NiRefObjectVtbl **v18; // edx@66
  NiRefObjectVtbl *v19; // edi@68
  char *v20; // eax@68
  char *v21; // edi@82
  unsigned __int8 v22; // al@85
  signed int v23; // ecx@87
  int v24; // eax@88
  int v25; // edx@89
  int v26; // edi@89
  NiRefObjectVtbl *v27; // edi@91
  char *v28; // eax@91
  char *v29; // eax@91
  void *(__thiscall *v30)(NiRefObject *, unsigned int); // eax@91
  ItemInfo *v31; // edi@92
  const char *v32; // edi@96
  RIDING *v33; // eax@96
  const char *v34; // edx@97
  char *v35; // eax@97
  char v36; // cl@98
  MoverItem *v37; // eax@100
  MoverHG *v38; // eax@101
  char *v39; // eax@103
  ItemInfo *v40; // eax@105
  NiRefObjectVtbl *v41; // edi@106
  int v42; // STCC_4@106
  char *v43; // eax@106
  char *v44; // eax@106
  const char *v45; // eax@111
  PupMain *v46; // eax@112
  PupView *v47; // eax@113
  NiRefObjectVtbl **v48; // ecx@115
  bool v49; // cf@115
  void *v50; // eax@115
  void *v51; // STCC_4@117
  NiRefObjectVtbl *v52; // edi@117
  char *v53; // eax@117
  char *v54; // eax@117
  PgWinText *v55; // ecx@117
  ItemInfo *v56; // edi@119
  unsigned int v57; // edi@120
  NiUnsharedGeometryGroup *v58; // eax@122
  PgWinText *v59; // ecx@124
  signed int v60; // edi@130
  NiRefObjectVtbl *v61; // edi@131
  unsigned int v62; // STCC_4@131
  char *v63; // eax@131
  char *v64; // eax@131
  MinimonInfo *v65; // eax@134
  MinimonEquipPos v66; // eax@135
  NiUnsharedGeometryGroup *v67; // STC8_4@136
  NiUnsharedGeometryGroup *v68; // STC8_4@138
  NiUnsharedGeometryGroup *v69; // STC8_4@139
  unsigned int v70; // STCC_4@142
  NiUnsharedGeometryGroup *v71; // eax@142
  NiRefObjectVtbl *v72; // edi@145
  NiUnsharedGeometryGroup *v73; // eax@145
  NiRefObjectVtbl *v74; // edi@146
  NiUnsharedGeometryGroup *v75; // eax@146
  const char *v76; // eax@148
  GradeItemOption *v77; // edi@152
  char *v78; // eax@154
  char v79; // cl@155
  signed int v80; // edx@157
  int v81; // ecx@158
  int v82; // eax@159
  int v83; // edi@159
  NiRefObjectVtbl **v84; // eax@167
  NiRefObjectVtbl *v85; // edi@167
  int v86; // STCC_4@167
  NiUnsharedGeometryGroup *v87; // eax@167
  char *v88; // eax@167
  NiRefObjectVtbl *v89; // edi@168
  int v90; // STCC_4@168
  int v91; // STC8_4@168
  NiUnsharedGeometryGroup *v92; // eax@168
  char *v93; // eax@168
  PgWinText *v94; // ecx@169
  NiRefObjectVtbl *v95; // edi@172
  int v96; // STCC_4@172
  NiUnsharedGeometryGroup *v97; // eax@172
  char *v98; // eax@172
  NiRefObjectVtbl **v99; // eax@179
  float v100; // edx@179
  NiRefObjectVtbl *v101; // edi@179
  int v102; // STCC_4@179
  NiUnsharedGeometryGroup *v103; // eax@179
  char *v104; // eax@179
  NiRefObjectVtbl *v105; // edi@180
  int v106; // STCC_4@180
  int v107; // STC8_4@180
  NiUnsharedGeometryGroup *v108; // eax@180
  char *v109; // eax@180
  PgWinText *v110; // ecx@181
  NiRefObjectVtbl *v111; // edi@184
  int v112; // STCC_4@184
  NiUnsharedGeometryGroup *v113; // eax@184
  char *v114; // eax@184
  NiRefObjectVtbl **v115; // eax@191
  float v116; // edx@191
  NiRefObjectVtbl *v117; // edi@191
  int v118; // STCC_4@191
  NiUnsharedGeometryGroup *v119; // eax@191
  char *v120; // eax@191
  NiRefObjectVtbl *v121; // edi@192
  int v122; // STCC_4@192
  int v123; // STC8_4@192
  NiUnsharedGeometryGroup *v124; // eax@192
  char *v125; // eax@192
  PgWinText *v126; // ecx@193
  NiRefObjectVtbl *v127; // edi@196
  int v128; // STCC_4@196
  NiUnsharedGeometryGroup *v129; // eax@196
  char *v130; // eax@196
  NiRefObjectVtbl **v131; // eax@203
  float v132; // edx@203
  NiRefObjectVtbl *v133; // edi@203
  int v134; // STCC_4@203
  NiUnsharedGeometryGroup *v135; // eax@203
  char *v136; // eax@203
  NiRefObjectVtbl *v137; // edi@204
  int v138; // STCC_4@204
  int v139; // STC8_4@204
  NiUnsharedGeometryGroup *v140; // eax@204
  char *v141; // eax@204
  PgWinText *v142; // ecx@205
  NiRefObjectVtbl *v143; // edi@208
  int v144; // STCC_4@208
  NiUnsharedGeometryGroup *v145; // eax@208
  char *v146; // eax@208
  NiRefObjectVtbl **v147; // eax@215
  float v148; // edx@215
  NiRefObjectVtbl *v149; // edi@215
  int v150; // STCC_4@215
  NiUnsharedGeometryGroup *v151; // eax@215
  char *v152; // eax@215
  NiRefObjectVtbl *v153; // edi@216
  int v154; // STCC_4@216
  int v155; // STC8_4@216
  NiUnsharedGeometryGroup *v156; // eax@216
  char *v157; // eax@216
  PgWinText *v158; // ecx@217
  NiRefObjectVtbl *v159; // edi@220
  int v160; // STCC_4@220
  NiUnsharedGeometryGroup *v161; // eax@220
  char *v162; // eax@220
  unsigned int v163; // eax@224
  bool v164; // zf@231
  NiRefObjectVtbl *v165; // edi@232
  double v166; // STC8_8@232
  double v167; // STC0_8@232
  char *v168; // eax@232
  char *v169; // eax@232
  NiRefObjectVtbl *v170; // edi@235
  double v171; // STC8_8@235
  char *v172; // STC4_4@235
  char *v173; // eax@235
  float v174; // edi@238
  int v175; // STCC_4@240
  NiUnsharedGeometryGroup *v176; // eax@240
  unsigned int v177; // edx@242
  int v178; // STCC_4@242
  NiUnsharedGeometryGroup *v179; // eax@242
  int v180; // STCC_4@244
  NiUnsharedGeometryGroup *v181; // eax@244
  __int16 v182; // ax@245
  int v183; // edi@245
  int v184; // ecx@245
  int v185; // STCC_4@249
  int v186; // STC8_4@249
  NiUnsharedGeometryGroup *v187; // eax@249
  double v188; // STC8_8@250
  char *v189; // STC4_4@250
  NiRefObjectVtbl *v190; // edi@256
  int v191; // STCC_4@256
  NiUnsharedGeometryGroup *v192; // eax@256
  char *v193; // eax@256
  NiRefObjectVtbl *v194; // edi@262
  int v195; // STCC_4@262
  NiUnsharedGeometryGroup *v196; // eax@262
  char *v197; // eax@262
  NiRefObjectVtbl *v198; // edi@268
  int v199; // STCC_4@268
  NiUnsharedGeometryGroup *v200; // eax@268
  char *v201; // eax@268
  NiRefObjectVtbl *v202; // edi@274
  int v203; // STCC_4@274
  NiUnsharedGeometryGroup *v204; // eax@274
  char *v205; // eax@274
  NiRefObjectVtbl *v206; // edi@280
  int v207; // STCC_4@280
  NiUnsharedGeometryGroup *v208; // eax@280
  char *v209; // eax@280
  int v210; // STCC_4@286
  NiUnsharedGeometryGroup *v211; // STC8_4@286
  int v212; // eax@289
  NiRefObjectVtbl *v213; // edi@291
  int v214; // STCC_4@291
  int v215; // STC8_4@291
  NiUnsharedGeometryGroup *v216; // eax@291
  char *v217; // eax@291
  NiRefObjectVtbl *v218; // edi@292
  int v219; // STCC_4@292
  NiUnsharedGeometryGroup *v220; // eax@292
  char *v221; // eax@292
  NiRefObjectVtbl *v222; // edi@294
  int v223; // STCC_4@294
  NiUnsharedGeometryGroup *v224; // eax@294
  char *v225; // STCC_4@294
  NiRefObjectVtbl *v226; // edi@298
  int v227; // STCC_4@298
  int v228; // STC8_4@298
  NiUnsharedGeometryGroup *v229; // eax@298
  char *v230; // eax@298
  NiRefObjectVtbl *v231; // edi@299
  int v232; // STCC_4@299
  NiUnsharedGeometryGroup *v233; // eax@299
  char *v234; // eax@299
  NiRefObjectVtbl *v235; // edi@301
  int v236; // STCC_4@301
  NiUnsharedGeometryGroup *v237; // eax@301
  char *v238; // STCC_4@301
  NiRefObjectVtbl *v239; // edi@305
  int v240; // STCC_4@305
  int v241; // STC8_4@305
  NiUnsharedGeometryGroup *v242; // eax@305
  char *v243; // eax@305
  NiRefObjectVtbl *v244; // edi@306
  int v245; // STCC_4@306
  NiUnsharedGeometryGroup *v246; // eax@306
  char *v247; // eax@306
  NiRefObjectVtbl *v248; // edi@308
  int v249; // STCC_4@308
  NiUnsharedGeometryGroup *v250; // eax@308
  char *v251; // STCC_4@308
  NiRefObjectVtbl *v252; // edi@312
  int v253; // STCC_4@312
  int v254; // STC8_4@312
  NiUnsharedGeometryGroup *v255; // eax@312
  char *v256; // eax@312
  NiRefObjectVtbl *v257; // edi@313
  int v258; // STCC_4@313
  NiUnsharedGeometryGroup *v259; // eax@313
  char *v260; // eax@313
  NiRefObjectVtbl *v261; // edi@315
  int v262; // STCC_4@315
  NiUnsharedGeometryGroup *v263; // eax@315
  char *v264; // STCC_4@315
  NiRefObjectVtbl *v265; // edi@319
  int v266; // STCC_4@319
  int v267; // STC8_4@319
  NiUnsharedGeometryGroup *v268; // eax@319
  char *v269; // eax@319
  NiRefObjectVtbl *v270; // edi@320
  int v271; // STCC_4@320
  NiUnsharedGeometryGroup *v272; // eax@320
  char *v273; // eax@320
  int v274; // STCC_4@322
  NiUnsharedGeometryGroup *v275; // STC8_4@322
  NiRefObjectVtbl *v276; // edi@324
  int v277; // STCC_4@324
  NiUnsharedGeometryGroup *v278; // eax@324
  char *v279; // eax@324
  NiRefObjectVtbl *v280; // edi@326
  int v281; // STCC_4@326
  NiUnsharedGeometryGroup *v282; // eax@326
  char *v283; // eax@326
  NiRefObjectVtbl *v284; // edi@328
  int v285; // STCC_4@328
  NiUnsharedGeometryGroup *v286; // eax@328
  char *v287; // eax@328
  NiRefObjectVtbl *v288; // edi@330
  int v289; // STCC_4@330
  NiUnsharedGeometryGroup *v290; // eax@330
  char *v291; // eax@330
  NiRefObjectVtbl *v292; // edi@332
  int v293; // STCC_4@332
  NiUnsharedGeometryGroup *v294; // eax@332
  char *v295; // eax@332
  int v296; // STCC_4@334
  NiUnsharedGeometryGroup *v297; // eax@334
  PgWinText *v298; // ecx@334
  int v299; // eax@341
  int v300; // STCC_4@345
  NiUnsharedGeometryGroup *v301; // STC8_4@345
  int v302; // STCC_4@347
  NiUnsharedGeometryGroup *v303; // STC8_4@347
  int v304; // STCC_4@352
  NiUnsharedGeometryGroup *v305; // eax@352
  int v306; // edi@354
  __int16 v307; // ax@364
  NiUnsharedGeometryGroup *v308; // eax@366
  int v309; // STCC_4@368
  NiUnsharedGeometryGroup *v310; // STC8_4@368
  NiUnsharedGeometryGroup *v311; // STC8_4@370
  unsigned int v312; // eax@371
  unsigned int v313; // STC8_4@373
  unsigned int v314; // STC4_4@373
  NiUnsharedGeometryGroup *v315; // eax@373
  __int64 v316; // kr20_8@375
  NiUnsharedGeometryGroup *v317; // STC8_4@378
  int v318; // eax@383
  int v319; // edi@387
  unsigned int v320; // eax@396
  unsigned int v321; // STC8_4@398
  NiUnsharedGeometryGroup *v322; // eax@398
  unsigned int v323; // STCC_4@400
  NiUnsharedGeometryGroup *v324; // STC8_4@400
  NiUnsharedGeometryGroup *v325; // STC8_4@401
  int v326; // eax@408
  int v327; // edi@412
  __int16 v328; // ax@422
  NiUnsharedGeometryGroup *v329; // eax@424
  int v330; // STCC_4@426
  NiUnsharedGeometryGroup *v331; // STC8_4@426
  NiUnsharedGeometryGroup *v332; // STC8_4@428
  unsigned int v333; // eax@429
  unsigned int v334; // STC8_4@431
  unsigned int v335; // STC4_4@431
  NiUnsharedGeometryGroup *v336; // eax@431
  __int64 v337; // kr28_8@433
  NiUnsharedGeometryGroup *v338; // STC8_4@436
  int v339; // edi@438
  double v340; // STC8_8@447
  NiUnsharedGeometryGroup *v341; // eax@447
  PgWinText *v342; // ecx@447
  double v343; // STC8_8@449
  NiUnsharedGeometryGroup *v344; // eax@449
  int v345; // eax@454
  int v346; // edi@458
  unsigned int v347; // eax@467
  unsigned int v348; // STC8_4@469
  NiUnsharedGeometryGroup *v349; // eax@469
  unsigned int v350; // STCC_4@471
  NiUnsharedGeometryGroup *v351; // STC8_4@471
  NiUnsharedGeometryGroup *v352; // STC8_4@472
  unsigned int v353; // eax@474
  unsigned int v354; // ecx@476
  unsigned int v355; // STCC_4@478
  NiUnsharedGeometryGroup *v356; // eax@478
  unsigned int v357; // ecx@479
  unsigned int v358; // ecx@481
  unsigned int v359; // STCC_4@483
  NiUnsharedGeometryGroup *v360; // eax@483
  unsigned int v361; // ecx@484
  unsigned int v362; // ecx@486
  unsigned int v363; // STCC_4@488
  NiUnsharedGeometryGroup *v364; // eax@488
  unsigned int v365; // ecx@489
  unsigned int v366; // ecx@491
  unsigned int v367; // STCC_4@493
  NiUnsharedGeometryGroup *v368; // eax@493
  int v369; // edi@494
  unsigned int v370; // eax@494
  int v371; // ecx@494
  int v372; // STCC_4@498
  unsigned int v373; // STC8_4@498
  NiUnsharedGeometryGroup *v374; // eax@498
  unsigned int v375; // STCC_4@500
  NiUnsharedGeometryGroup *v376; // STC8_4@500
  int v377; // STCC_4@502
  NiUnsharedGeometryGroup *v378; // STC8_4@502
  int v379; // eax@507
  int v380; // eax@508
  int v381; // STCC_4@509
  NiUnsharedGeometryGroup *v382; // eax@509
  int v383; // edi@510
  unsigned int v384; // eax@510
  int v385; // ecx@510
  int v386; // STCC_4@514
  unsigned int v387; // STC8_4@514
  NiUnsharedGeometryGroup *v388; // eax@514
  unsigned int v389; // STCC_4@516
  NiUnsharedGeometryGroup *v390; // STC8_4@516
  int v391; // STCC_4@518
  NiUnsharedGeometryGroup *v392; // STC8_4@518
  int v393; // eax@523
  int v394; // eax@524
  int v395; // STCC_4@525
  NiUnsharedGeometryGroup *v396; // eax@525
  unsigned int v397; // ecx@526
  int v398; // STCC_4@528
  unsigned int v399; // STC8_4@528
  NiUnsharedGeometryGroup *v400; // eax@528
  unsigned int v401; // STCC_4@529
  NiUnsharedGeometryGroup *v402; // eax@529
  unsigned int v403; // eax@531
  double v404; // st6@532
  signed __int64 v405; // st6@538
  double v406; // st5@538
  double v407; // st4@538
  double v408; // st5@542
  NiUnsharedGeometryGroup *v409; // eax@543
  double v410; // st7@545
  NiUnsharedGeometryGroup *v411; // STC4_4@546
  NiUnsharedGeometryGroup *v412; // STC4_4@548
  unsigned int v413; // eax@550
  bool v414; // zf@557
  NiRefObjectVtbl *v415; // edi@558
  double v416; // STC8_8@558
  double v417; // STC0_8@558
  char *v418; // eax@558
  char *v419; // eax@558
  NiRefObjectVtbl *v420; // edi@561
  double v421; // STC8_8@561
  char *v422; // eax@561
  char *v423; // eax@561
  double v424; // STC8_8@562
  char *v425; // eax@562
  double v426; // STC8_8@566
  NiUnsharedGeometryGroup *v427; // eax@566
  int v428; // edi@569
  int v429; // STCC_4@569
  NiUnsharedGeometryGroup *v430; // eax@569
  int v431; // edi@572
  int v432; // STCC_4@572
  NiUnsharedGeometryGroup *v433; // eax@572
  int v434; // eax@574
  unsigned int v435; // edi@577
  CollectCard *v436; // esi@578
  char *v437; // eax@579
  NiRefObjectVtbl *v438; // edi@583
  int v439; // STCC_4@583
  char *v440; // eax@583
  char *v441; // eax@583
  NiUnsharedGeometryGroup *v442; // edi@585
  NiUnsharedGeometryGroup *v443; // edi@585
  NiUnsharedGeometryGroup *v444; // edi@585
  NiUnsharedGeometryGroup *v445; // edi@585
  int (*v446)(void); // eax@585
  unsigned int v447; // eax@585
  unsigned int v448; // edi@585
  CollectCard *v449; // eax@585
  CollectCardView *v450; // eax@586
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v451; // ecx@587
  unsigned int v452; // STC8_4@589
  int v453; // STC4_4@589
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v454; // STC0_4@589
  int v455; // STBC_4@589
  char *v456; // eax@589
  char *v457; // eax@589
  NiRefObjectVtbl *v458; // edi@589
  char *v459; // STCC_4@589
  char *v460; // eax@589
  char *v461; // eax@589
  NiRefObjectVtbl *v462; // edi@590
  int v463; // STCC_4@590
  char *v464; // eax@590
  char *v465; // eax@590
  const char *v466; // eax@591
  char *v467; // [sp+C4h] [bp-3CCh]@66
  signed int v468; // [sp+C4h] [bp-3CCh]@76
  int v469; // [sp+C8h] [bp-3C8h]@7
  char *v470; // [sp+C8h] [bp-3C8h]@66
  char *v471[6]; // [sp+C8h] [bp-3C8h]@76
  __int64 v472; // [sp+C8h] [bp-3C8h]@366
  __int64 v473; // [sp+C8h] [bp-3C8h]@424
  char *v474[6]; // [sp+CCh] [bp-3C4h]@66
  tagSIZE kSize; // [sp+E0h] [bp-3B0h]@70
  __int64 v476; // [sp+E8h] [bp-3A8h]@48
  $4AABC1791467D0026BF410EA3EFCEA48 kWeaponTitleUpPoint; // [sp+F0h] [bp-3A0h]@44
  ItemInfoWin *v478; // [sp+FCh] [bp-394h]@1
  $C5E0EEA78FBB82605590B04B4448F50A kUpPoint; // [sp+100h] [bp-390h]@2
  CollectCard *pkCollectCard; // [sp+124h] [bp-36Ch]@1
  float fCrlTB; // [sp+128h] [bp-368h]@1
  char cSerialKey; // [sp+12Fh] [bp-361h]@2
  Item *pkItem; // [sp+130h] [bp-360h]@1
  float fRanCriRate; // [sp+134h] [bp-35Ch]@1
  ItemInfo *pkInfo; // [sp+138h] [bp-358h]@1
  unsigned int uiSerialMiddle; // [sp+13Ch] [bp-354h]@46
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > PetName; // [sp+140h] [bp-350h]@96
  char v488; // [sp+15Ch] [bp-334h]@161
  char acEquipableClassStr[256]; // [sp+1D0h] [bp-2C0h]@91
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > ptr; // [sp+2D4h] [bp-1BCh]@46
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v491; // [sp+2F0h] [bp-1A0h]@152
  int v492; // [sp+30Ch] [bp-184h]@152
  int v493; // [sp+310h] [bp-180h]@178
  int v494; // [sp+314h] [bp-17Ch]@202
  int v495; // [sp+318h] [bp-178h]@214
  int v496; // [sp+31Ch] [bp-174h]@494
  signed int v497; // [sp+320h] [bp-170h]@439
  int v498; // [sp+324h] [bp-16Ch]@338
  int v499; // [sp+328h] [bp-168h]@282
  int v500; // [sp+32Ch] [bp-164h]@405
  int v501; // [sp+330h] [bp-160h]@453
  int v502; // [sp+334h] [bp-15Ch]@510
  int v503; // [sp+338h] [bp-158h]@585
  signed int v504; // [sp+33Ch] [bp-154h]@585
  int v505; // [sp+340h] [bp-150h]@245
  int aiOptionValue[15]; // [sp+344h] [bp-14Ch]@84
  char acStr[256]; // [sp+380h] [bp-110h]@122
  int v508; // [sp+48Ch] [bp-4h]@96

  v4 = __OFSUB__(*iIndex, 80);
  v3 = *iIndex - 80 < 0;
  v5 = Parameter->pkViewInfo;
  v6 = Parameter->iItemUpgrade;
  v7 = Parameter->pkItem;
  v478 = this;
  v8 = Parameter->pkInfo;
  pkCollectCard = (CollectCard *)Parameter;
  pkInfo = v8;
  fCrlTB = *(float *)&v5;
  fRanCriRate = *(float *)&v6;
  pkItem = v7;
  if ( !(v3 ^ v4) )
    return;
  cSerialKey = User::GetMainCharClass(&g_kUser);
  kUpPoint.iAC = 0;
  kUpPoint.iWC = 0;
  kUpPoint.iShieldAC = 0;
  kUpPoint.iMA = 0;
  kUpPoint.iMR = 0;
  kUpPoint.iWC_MA = 0;
  kUpPoint.iAC_MR = 0;
  kUpPoint.iCriRate = 0;
  kUpPoint.iMaCriRate = 0;
  if ( *(float *)&v6 != 0.0 )
  {
    if ( !v7 )
      goto LABEL_44;
    if ( (unsigned __int8)((int (__thiscall *)(Item *))v7->vfptr[1].__vecDelDtor)(v7) != 23 )
      goto LABEL_597;
  }
  if ( v7 && (unsigned __int8)((int (__thiscall *)(Item *))v7->vfptr[1].__vecDelDtor)(v7) == 38 )
  {
LABEL_597:
    v469 = pkInfo->BasicUpInx;
    if ( (unsigned __int8)((int (*)(void))pkItem->vfptr[1].__vecDelDtor)() == 38 )
    {
      v9 = IIDTableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab,unsigned short>::GetByID(v469);
      if ( v9 )
      {
        if ( v6 > pkItem->m_pkInfo->UpLimit )
          return;
        v10 = v9->UpFactor;
        if ( v10 )
        {
          switch ( v10 )
          {
            case 1:
              kUpPoint.iWC = v9->BRAccUpdata[v6];
              break;
            case 2:
              kUpPoint.iShieldAC = v9->BRAccUpdata[v6];
              break;
            case 3:
              kUpPoint.iMA = v9->BRAccUpdata[v6];
              break;
            case 4:
              kUpPoint.iMR = v9->BRAccUpdata[v6];
              break;
            case 6:
              kUpPoint.iWC_MA = v9->BRAccUpdata[v6];
              break;
            case 7:
              kUpPoint.iAC_MR = v9->BRAccUpdata[v6];
              break;
            case 8:
              kUpPoint.iCriRate = v9->BRAccUpdata[v6];
              break;
          }
        }
        else
        {
          kUpPoint.iAC = v9->BRAccUpdata[v6];
        }
      }
    }
    else
    {
      v11 = IIDTableBase<UpGradeInfo,UpGradeInfoTab,unsigned short>::GetByID(v469);
      if ( v11 )
      {
        if ( v6 > 12 )
          return;
        v12 = v11->UpFactor;
        if ( v12 )
        {
          switch ( v12 )
          {
            case 1:
              kUpPoint.iWC = *((_WORD *)&v11->UpFactor + v6 + 1);
              break;
            case 2:
              kUpPoint.iShieldAC = *((_WORD *)&v11->UpFactor + v6 + 1);
              break;
            case 3:
              kUpPoint.iMA = *((_WORD *)&v11->UpFactor + v6 + 1);
              break;
            case 4:
              kUpPoint.iMR = *((_WORD *)&v11->UpFactor + v6 + 1);
              break;
            case 6:
              kUpPoint.iWC_MA = *((_WORD *)&v11->UpFactor + v6 + 1);
              break;
            case 7:
              kUpPoint.iAC_MR = *((_WORD *)&v11->UpFactor + v6 + 1);
              break;
            case 8:
              kUpPoint.iCriRate = *((_WORD *)&v11->UpFactor + v6 + 1);
              break;
          }
        }
        else
        {
          kUpPoint.iAC = *((_WORD *)&v11->UpFactor + v6 + 1);
        }
      }
    }
  }
LABEL_44:
  kWeaponTitleUpPoint.iMinAdd = 0;
  kWeaponTitleUpPoint.iMaxAdd = 0;
  kWeaponTitleUpPoint.dwCriRate = 0;
  if ( pkItem && (unsigned __int8)((int (*)(void))pkItem->vfptr[1].__vecDelDtor)() == 5 )
  {
    qmemcpy(&ptr._Bx._Alias[8], &pkItem->m_kStruct, 0x67u);
    v13 = (char *)&ptr._Mysize + 1;
    uiSerialMiddle = 3;
    do
    {
      if ( *(_WORD *)v13 != -1 )
      {
        v14 = CWeaponTitle::GetLevelData(
                &WeaponTitleTab::ms_kTab,
                *(_WORD *)v13,
                *(_DWORD *)(v13 + 2) & 0xFFFFFFF,
                (unsigned int *)&v476 + 1);
        if ( v14 )
        {
          if ( kWeaponTitleUpPoint.iMaxAdd < v14->MaxAdd )
            kWeaponTitleUpPoint.iMaxAdd = v14->MaxAdd;
          if ( kWeaponTitleUpPoint.iMinAdd < v14->MinAdd )
            kWeaponTitleUpPoint.iMinAdd = v14->MinAdd;
          v15 = kWeaponTitleUpPoint.dwCriRate;
          if ( v14->SP1_Type == 1 && kWeaponTitleUpPoint.dwCriRate < v14->SP1_Value )
          {
            v15 = v14->SP1_Value;
            kWeaponTitleUpPoint.dwCriRate = v14->SP1_Value;
          }
          if ( v14->SP2_Type == 1 && v15 < v14->SP2_Value )
          {
            v15 = v14->SP2_Value;
            kWeaponTitleUpPoint.dwCriRate = v14->SP2_Value;
          }
          if ( v14->SP3_Type == 1 )
          {
            v16 = v14->SP3_Value;
            if ( v15 < v16 )
              kWeaponTitleUpPoint.dwCriRate = v16;
          }
        }
      }
      v13 += 6;
      --uiSerialMiddle;
    }
    while ( *(float *)&uiSerialMiddle != 0.0 );
  }
  v17 = v478;
  ((void (__stdcall *)(D3DXCOLOR *))v478->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  if ( fRanCriRate == 0.0 )
  {
    ((void (__stdcall *)(char *))v17->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(pkInfo->Name);
  }
  else
  {
    if ( pkItem && (unsigned __int8)((int (*)(void))pkItem->vfptr[1].__vecDelDtor)() == 23 )
    {
      v18 = &v17->m_apkTextWin[*iIndex]->vfptr;
      v474[0] = pkInfo->Name;
      v470 = (char *)LODWORD(fRanCriRate);
      v467 = "(+%d)%s";
    }
    else
    {
      v18 = &v17->m_apkTextWin[*iIndex]->vfptr;
      *(float *)v474 = fRanCriRate;
      v470 = pkInfo->Name;
      v467 = "%s[+%d]";
    }
    v19 = *v18;
    v20 = fs(v467, v470, v474[0]);
    v19[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v20);
  }
  ((void (__stdcall *)(tagSIZE *))v17->m_apkTextWin[*iIndex]->vfptr[123].__vecDelDtor)(&kSize);
  if ( kSize.cx <= 200 )
    v17->m_iItemNameLength = 200;
  else
    v17->m_iItemNameLength = kSize.cx;
  switch ( pkInfo->ItemGradeType )
  {
    case 1:
      ((void (__stdcall *)(_DWORD, signed int, _DWORD, signed int))v17->m_apkTextWin[*iIndex]->vfptr[116].__vecDelDtor)(
        0,
        255,
        0,
        255);
      goto LABEL_82;
    case 2:
    case 5:
      ((void (__stdcall *)(signed int, signed int, signed int, signed int))v17->m_apkTextWin[*iIndex]->vfptr[116].__vecDelDtor)(
        13,
        194,
        254,
        255);
      goto LABEL_82;
    case 3:
      *(_QWORD *)v471 = 1095216660480i64;
      v468 = 228;
      break;
    case 4:
      ((void (__stdcall *)(signed int, signed int, signed int, _DWORD))v17->m_apkTextWin[*iIndex]->vfptr[116].__vecDelDtor)(
        253,
        32,
        239,
        255);
      goto LABEL_82;
    case 6:
      *(_QWORD *)v471 = 1095216660480i64;
      v468 = 128;
      break;
    case 7:
      *(_QWORD *)v471 = 1095216660735i64;
      v468 = 0;
      break;
    default:
      *(_QWORD *)v471 = 1095216660735i64;
      v468 = 255;
      break;
  }
  ((void (__stdcall *)(signed int, signed int, char *, char *))v17->m_apkTextWin[*iIndex]->vfptr[116].__vecDelDtor)(
    255,
    v468,
    v471[0],
    v471[1]);
LABEL_82:
  ((void (__stdcall *)(const char *))v17->m_apkTextWin[++*iIndex]->vfptr[118].__vecDelDtor)(" ");
  ++*iIndex;
  v21 = 0;
  if ( pkItem )
    v21 = (char *)((int (*)(void))pkItem->vfptr[12].__vecDelDtor)();
  memset((char *)aiOptionValue, 0, 0x3Cu);
  if ( v21 )
  {
    v22 = *v21;
    if ( *v21 & 0xFE )
    {
      if ( v22 & 1 )
      {
        v23 = (unsigned int)v22 >> 1;
        if ( v23 > 0 )
        {
          v24 = (int)(v21 + 1);
          do
          {
            v25 = *(_WORD *)(v24 + 1);
            v26 = *(_BYTE *)v24;
            v24 += 3;
            --v23;
            aiOptionValue[v26] = v25;
          }
          while ( v23 );
        }
      }
    }
  }
  if ( pkInfo->Type )
  {
    v31 = pkInfo;
  }
  else
  {
    v476 = CharClass::GetBitbyClassType(pkInfo->UseClass);
    CharClass::GetEquipableClassSortStr(v476, acEquipableClassStr, 0x100u);
    v27 = v17->m_apkTextWin[*iIndex]->vfptr;
    v28 = (char *)TextData::Get(0xDC00D34E);
    v29 = fs(v28, acEquipableClassStr);
    v27[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v29);
    v30 = v17->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor;
    if ( v476 & (1i64 << cSerialKey) )
    {
      ((void (__stdcall *)(D3DXCOLOR *))v30)(&Color::m_kDxWhiteColor);
      ++*iIndex;
      v31 = pkInfo;
    }
    else
    {
      ((void (__stdcall *)(D3DXCOLOR *))v30)(&Color::m_kDxRedColor);
      ++*iIndex;
      v31 = pkInfo;
    }
  }
  ItemInfoWin::InsertRequireWeponContents(v17, v31, iIndex);
  ItemInfoWin::InsertRequireShieldContents(v17, v31, iIndex);
  if ( v31->Class == 23 )
  {
    PetName._Myres = 15;
    PetName._Mysize = 0;
    PetName._Bx._Buf[0] = 0;
    v32 = pkInfo->InxName;
    v508 = 0;
    v33 = RidePetTable::GetByInxName(pkInfo->InxName);
    if ( v33 )
    {
      v34 = v33->FeedType;
      v35 = v33->FeedType;
      uiSerialMiddle = (unsigned int)(v35 + 1);
      do
        v36 = *v35++;
      while ( v36 );
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &PetName,
        v34,
        (unsigned int)&v35[-uiSerialMiddle]);
    }
    v37 = MoverItemTab::GetByItemIdx(v32);
    if ( v37 )
    {
      v38 = MoverHGTab::GetByMoverIdx(v37->MoverIDX);
      if ( v38 )
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &PetName,
          v38->FeedType,
          strlen(v38->FeedType));
    }
    v39 = PetName._Bx._Ptr;
    if ( PetName._Myres < 0x10 )
      v39 = (char *)&PetName;
    v40 = ItemInfoTab::GetByInxName(v39);
    if ( v40 )
    {
      v41 = v17->m_apkTextWin[*iIndex]->vfptr;
      v42 = (int)v40->Name;
      v43 = (char *)TextData2::Get(0xEFF2282E);
      v44 = fs(v43, v42);
      v41[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v44);
      ((void (__stdcall *)(const char *))v17->m_apkTextWin[++*iIndex]->vfptr[118].__vecDelDtor)(" ");
      ++*iIndex;
    }
    v508 = -1;
    if ( PetName._Myres >= 0x10 )
      operator delete(PetName._Bx._Ptr);
  }
  if ( pkInfo->Class == 36 )
  {
    PetName._Myres = 15;
    PetName._Mysize = 0;
    PetName._Bx._Buf[0] = 0;
    v508 = 1;
    if ( !pkItem
      || (v45 = (const char *)((int (*)(void))pkItem->vfptr[20].__vecDelDtor)(),
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&PetName, v45, strlen(v45)),
          !PetName._Mysize) )
    {
      v46 = PetMainTab::GetByItemIdx(pkInfo->InxName);
      if ( v46 )
      {
        v47 = PetViewTab::GetByPetIdx(v46->PupIDX);
        if ( v47 )
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
            &PetName,
            v47->Name,
            strlen(v47->Name));
      }
    }
    v48 = &v17->m_apkTextWin[*iIndex]->vfptr;
    v49 = PetName._Myres < 0x10;
    ++*iIndex;
    v50 = PetName._Bx._Ptr;
    uiSerialMiddle = (unsigned int)v48;
    if ( v49 )
      v50 = &PetName;
    v51 = v50;
    v52 = *v48;
    v53 = (char *)TextData3::Get(0x46AE8582u);
    v54 = fs(v53, v51);
    v52[118].__vecDelDtor((NiRefObject *)uiSerialMiddle, (unsigned int)v54);
    v55 = v17->m_apkTextWin[(*iIndex)++];
    ((void (__stdcall *)(const char *))v55->vfptr[118].__vecDelDtor)(" ");
    v508 = -1;
    if ( PetName._Myres >= 0x10 )
      operator delete(PetName._Bx._Ptr);
  }
  v56 = pkInfo;
  if ( pkInfo->DemandLv )
  {
    v57 = pkInfo->DemandLv;
    if ( aiOptionValue[13] )
      v57 -= aiOptionValue[13];
    v58 = TextData::Get(0xD7383A33);
    sprintf(acStr, (const char *)v58, v57);
    ((void (__stdcall *)(char *))v17->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
    if ( v57 <= User::Lv(&g_kUser) )
    {
      v59 = v17->m_apkTextWin[*iIndex];
      if ( aiOptionValue[13] <= 0 )
        ((void (__stdcall *)(D3DXCOLOR *))v59->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
      else
        ((void (__stdcall *)(signed int, signed int, signed int, signed int))v59->vfptr[116].__vecDelDtor)(
          220,
          100,
          20,
          255);
    }
    else
    {
      ((void (__stdcall *)(D3DXCOLOR *))v17->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
    }
    ++*iIndex;
    v56 = pkInfo;
  }
  if ( pkCollectCard->CC_ItemInx[14] && v56->BuyDemandLv )
  {
    v60 = pkInfo->BuyDemandLv;
    uiSerialMiddle = pkInfo->BuyDemandLv;
    if ( v60 > (signed int)User::Lv(&g_kUser) )
    {
      v61 = v17->m_apkTextWin[*iIndex]->vfptr;
      v62 = uiSerialMiddle;
      v63 = (char *)TextData3::Get(0x77914C4Du);
      v64 = fs(v63, v62);
      v61[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v64);
      ((void (__stdcall *)(D3DXCOLOR *))v17->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
      ++*iIndex;
    }
    v56 = pkInfo;
  }
  if ( v56->Equip == 25 )
  {
    v65 = MinimonInfoTable::GetMinimonInfoByIDX((char *)(LODWORD(fCrlTB) + 2));
    if ( v65 )
    {
      v66 = v65->MinimonEquipPos;
      if ( v66 == 2 )
      {
        v67 = TextData3::Get(0x9097A5C5);
        sprintf(acStr, (const char *)v67);
      }
      else if ( v66 == 1 )
      {
        v68 = TextData3::Get(0x282F0A22u);
        sprintf(acStr, (const char *)v68);
      }
      else
      {
        v69 = TextData3::Get(0xE3180332);
        sprintf(acStr, (const char *)v69);
      }
    }
    ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
    ((void (__stdcall *)(D3DXCOLOR *))v17->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
    ++*iIndex;
  }
  if ( v56->Grade )
  {
    v70 = v56->Grade;
    v71 = TextData::Get(0x4634383Bu);
    sprintf(acStr, (const char *)v71, v70);
    ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
    ++*iIndex;
  }
  if ( v56->Class == 5 )
  {
    if ( v56->TwoHand )
    {
      v72 = v17->m_apkTextWin[*iIndex]->vfptr;
      v73 = TextData::Get(0x4B437992u);
      v72[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v73);
    }
    else
    {
      v74 = v17->m_apkTextWin[*iIndex]->vfptr;
      v75 = TextData::Get(0x46436F89u);
      v74[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v75);
    }
    ++*iIndex;
  }
  v76 = (const char *)(*(int (**)(void))(**((_DWORD **)&v17->m_uiTotalMoneyXPos + *iIndex) + 484))();
  if ( v76 && *iIndex > 0 && strcmp(v76, " ") )
  {
    ((void (__stdcall *)(const char *))v17->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(" ");
    ++*iIndex;
  }
  HIDWORD(v476) = (char *)pkInfo + 2;
  *(float *)&v77 = COERCE_FLOAT(GradeItemOptionTab::GetByInxName(pkInfo->InxName));
  fRanCriRate = *(float *)&v77;
  *(_DWORD *)&v491._Alval.0 = 0;
  memset((char *)&v492, 0, 0x38u);
  if ( pkInfo->Class == 4 )
  {
    if ( pkItem )
    {
      *(float *)&v78 = COERCE_FLOAT(((int (*)(void))pkItem->vfptr[13].__vecDelDtor)());
      uiSerialMiddle = (unsigned int)v78;
      if ( *(float *)&v78 != 0.0 )
      {
        v79 = *v78;
        if ( *v78 & 0xFE )
        {
          if ( v79 & 1 )
          {
            v80 = (unsigned int)(unsigned __int8)v79 >> 1;
            if ( v80 > 0 )
            {
              v81 = (int)(v78 + 1);
              do
              {
                v82 = *(_WORD *)(v81 + 1);
                v83 = *(_BYTE *)v81;
                v81 += 3;
                --v80;
                *((_DWORD *)&v491._Alval.0 + v83) = v82;
              }
              while ( v80 );
              v78 = (char *)uiSerialMiddle;
            }
          }
        }
      }
    }
    else
    {
      *(float *)&v78 = COERCE_FLOAT(&v488);
    }
    if ( fRanCriRate != 0.0 && *(float *)&v78 != 0.0 )
    {
      if ( *(_WORD *)(LODWORD(fRanCriRate) + 32) )
      {
        if ( aiOptionValue[0] <= 0 && *(_DWORD *)&v491._Alval.0 <= 0 )
        {
          v84 = &v17->m_apkTextWin[(*iIndex)++]->vfptr;
          v85 = *v84;
          v86 = *(_WORD *)(LODWORD(fRanCriRate) + 32);
          uiSerialMiddle = (unsigned int)v84;
          v87 = TextData::Get(0xF2FBFC44);
          v88 = fs("%s +%d", v87, v86);
          v85[118].__vecDelDtor((NiRefObject *)uiSerialMiddle, (unsigned int)v88);
          goto LABEL_176;
        }
        v89 = v17->m_apkTextWin[*iIndex]->vfptr;
        v90 = *(_DWORD *)&v491._Alval.0 + aiOptionValue[0];
        v91 = *(_WORD *)(LODWORD(fRanCriRate) + 32);
        v92 = TextData::Get(0xF2FBFC44);
        v93 = fs("%s +%d (+%d)", v92, v91, v90);
        v89[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v93);
        if ( *(_DWORD *)&v491._Alval.0 <= 0 )
          goto LABEL_175;
        v94 = v17->m_apkTextWin[*iIndex];
      }
      else
      {
        if ( aiOptionValue[0] <= 0 && *(_DWORD *)&v491._Alval.0 <= 0 )
        {
LABEL_176:
          if ( *(_WORD *)(LODWORD(fRanCriRate) + 36) )
          {
            if ( aiOptionValue[2] <= 0 && v493 <= 0 )
            {
              v99 = &v17->m_apkTextWin[*iIndex]->vfptr;
              v100 = fRanCriRate;
              ++*iIndex;
              v101 = *v99;
              uiSerialMiddle = (unsigned int)v99;
              v102 = *(_WORD *)(LODWORD(v100) + 36);
              v103 = TextData::Get(0xE3ECFC4A);
              v104 = fs("%s +%d", v103, v102);
              v101[118].__vecDelDtor((NiRefObject *)uiSerialMiddle, (unsigned int)v104);
              goto LABEL_188;
            }
            v105 = v17->m_apkTextWin[*iIndex]->vfptr;
            v106 = aiOptionValue[2] + v493;
            v107 = *(_WORD *)(LODWORD(fRanCriRate) + 36);
            v108 = TextData::Get(0xE3ECFC4A);
            v109 = fs("%s +%d (+%d)", v108, v107, v106);
            v105[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v109);
            if ( v493 <= 0 )
              goto LABEL_187;
            v110 = v17->m_apkTextWin[*iIndex];
          }
          else
          {
            if ( aiOptionValue[2] <= 0 && v493 <= 0 )
            {
LABEL_188:
              if ( *(_WORD *)(LODWORD(fRanCriRate) + 34) )
              {
                if ( aiOptionValue[1] <= 0 && v492 <= 0 )
                {
                  v115 = &v17->m_apkTextWin[*iIndex]->vfptr;
                  v116 = fRanCriRate;
                  ++*iIndex;
                  v117 = *v115;
                  uiSerialMiddle = (unsigned int)v115;
                  v118 = *(_WORD *)(LODWORD(v116) + 34);
                  v119 = TextData::Get(0xEDEBFC40);
                  v120 = fs("%s +%d", v119, v118);
                  v117[118].__vecDelDtor((NiRefObject *)uiSerialMiddle, (unsigned int)v120);
                  goto LABEL_200;
                }
                v121 = v17->m_apkTextWin[*iIndex]->vfptr;
                v122 = aiOptionValue[1] + v492;
                v123 = *(_WORD *)(LODWORD(fRanCriRate) + 34);
                v124 = TextData::Get(0xEDEBFC40);
                v125 = fs("%s +%d (+%d)", v124, v123, v122);
                v121[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v125);
                if ( v492 <= 0 )
                  goto LABEL_199;
                v126 = v17->m_apkTextWin[*iIndex];
              }
              else
              {
                if ( aiOptionValue[1] <= 0 && v492 <= 0 )
                {
LABEL_200:
                  if ( *(_WORD *)(LODWORD(fRanCriRate) + 38) )
                  {
                    if ( aiOptionValue[3] <= 0 && v494 <= 0 )
                    {
                      v131 = &v17->m_apkTextWin[*iIndex]->vfptr;
                      v132 = fRanCriRate;
                      ++*iIndex;
                      v133 = *v131;
                      uiSerialMiddle = (unsigned int)v131;
                      v134 = *(_WORD *)(LODWORD(v132) + 38);
                      v135 = TextData::Get(0xECF1FC46);
                      v136 = fs("%s +%d", v135, v134);
                      v133[118].__vecDelDtor((NiRefObject *)uiSerialMiddle, (unsigned int)v136);
                      goto LABEL_212;
                    }
                    v137 = v17->m_apkTextWin[*iIndex]->vfptr;
                    v138 = aiOptionValue[3] + v494;
                    v139 = *(_WORD *)(LODWORD(fRanCriRate) + 38);
                    v140 = TextData::Get(0xECF1FC46);
                    v141 = fs("%s +%d (+%d)", v140, v139, v138);
                    v137[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v141);
                    if ( v494 <= 0 )
                      goto LABEL_211;
                    v142 = v17->m_apkTextWin[*iIndex];
                  }
                  else
                  {
                    if ( aiOptionValue[3] <= 0 && v494 <= 0 )
                    {
LABEL_212:
                      if ( *(_WORD *)(LODWORD(fRanCriRate) + 40) )
                      {
                        if ( aiOptionValue[4] <= 0 && v495 <= 0 )
                        {
                          v147 = &v17->m_apkTextWin[*iIndex]->vfptr;
                          v148 = fRanCriRate;
                          ++*iIndex;
                          v149 = *v147;
                          uiSerialMiddle = (unsigned int)v147;
                          v150 = *(_WORD *)(LODWORD(v148) + 40);
                          v151 = TextData::Get(0xE3F5FC40);
                          v152 = fs("%s +%d", v151, v150);
                          v149[118].__vecDelDtor((NiRefObject *)uiSerialMiddle, (unsigned int)v152);
                          goto LABEL_224;
                        }
                        v153 = v17->m_apkTextWin[*iIndex]->vfptr;
                        v154 = aiOptionValue[4] + v495;
                        v155 = *(_WORD *)(LODWORD(fRanCriRate) + 40);
                        v156 = TextData::Get(0xE3F5FC40);
                        v157 = fs("%s +%d (+%d)", v156, v155, v154);
                        v153[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v157);
                        if ( v495 > 0 )
                        {
                          v158 = v17->m_apkTextWin[*iIndex];
LABEL_222:
                          ((void (__stdcall *)(signed int, signed int, _DWORD, signed int))v158->vfptr[116].__vecDelDtor)(
                            255,
                            255,
                            0,
                            255);
                          goto LABEL_223;
                        }
                      }
                      else
                      {
                        if ( aiOptionValue[4] <= 0 && !v495 )
                        {
LABEL_224:
                          v163 = pkInfo->CrlTB;
                          if ( v163 || aiOptionValue[12] > 0 )
                          {
                            *(float *)&uiSerialMiddle = 0.0;
                            fCrlTB = 0.0;
                            if ( v163 )
                              *(float *)&uiSerialMiddle = (double)v163 / 10.0;
                            if ( aiOptionValue[12] > 0 )
                              fCrlTB = (double)aiOptionValue[12] / 10.0;
                            if ( v163 )
                            {
                              v164 = aiOptionValue[12] == 0;
                              if ( aiOptionValue[12] > 0 )
                              {
                                v165 = v17->m_apkTextWin[*iIndex]->vfptr;
                                v166 = fCrlTB;
                                v167 = *(float *)&uiSerialMiddle;
                                v168 = (char *)TextData3::Get(0xADF1B5B7);
                                v169 = fs(v168, v167, v166);
LABEL_287:
                                v165[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v169);
                                goto LABEL_237;
                              }
                            }
                            else
                            {
                              v164 = aiOptionValue[12] == 0;
                            }
                            if ( v164 )
                            {
                              v165 = v17->m_apkTextWin[*iIndex]->vfptr;
                              v188 = *(float *)&uiSerialMiddle;
                              v189 = (char *)TextData::Get(0x2E452A84u);
                              v169 = fs(v189, v188);
                              goto LABEL_287;
                            }
                            v170 = v17->m_apkTextWin[*iIndex]->vfptr;
                            v171 = fCrlTB;
                            v172 = (char *)TextData3::Get(0xAEF1B5B7);
                            v173 = fs(v172, v171);
LABEL_236:
                            v170[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v173);
LABEL_237:
                            ++*iIndex;
                            goto LABEL_238;
                          }
                          goto LABEL_238;
                        }
                        v159 = v17->m_apkTextWin[*iIndex]->vfptr;
                        v160 = aiOptionValue[4] + v495;
                        v161 = TextData::Get(0xE3F5FC40);
                        v162 = fs("%s (+%d)", v161, v160);
                        v159[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v162);
                        if ( v495 > 0 )
                        {
                          v158 = v17->m_apkTextWin[*iIndex];
                          goto LABEL_222;
                        }
                      }
LABEL_223:
                      ++*iIndex;
                      goto LABEL_224;
                    }
                    v143 = v17->m_apkTextWin[*iIndex]->vfptr;
                    v144 = aiOptionValue[3] + v494;
                    v145 = TextData::Get(0xECF1FC46);
                    v146 = fs("%s (+%d)", v145, v144);
                    v143[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v146);
                    if ( v494 <= 0 )
                    {
LABEL_211:
                      ++*iIndex;
                      goto LABEL_212;
                    }
                    v142 = v17->m_apkTextWin[*iIndex];
                  }
                  ((void (__stdcall *)(signed int, signed int, _DWORD, signed int))v142->vfptr[116].__vecDelDtor)(
                    255,
                    255,
                    0,
                    255);
                  goto LABEL_211;
                }
                v127 = v17->m_apkTextWin[*iIndex]->vfptr;
                v128 = aiOptionValue[1] + v492;
                v129 = TextData::Get(0xEDEBFC40);
                v130 = fs("%s (+%d)", v129, v128);
                v127[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v130);
                if ( v492 <= 0 )
                {
LABEL_199:
                  ++*iIndex;
                  goto LABEL_200;
                }
                v126 = v17->m_apkTextWin[*iIndex];
              }
              ((void (__stdcall *)(signed int, signed int, _DWORD, signed int))v126->vfptr[116].__vecDelDtor)(
                255,
                255,
                0,
                255);
              goto LABEL_199;
            }
            v111 = v17->m_apkTextWin[*iIndex]->vfptr;
            v112 = aiOptionValue[2] + v493;
            v113 = TextData::Get(0xE3ECFC4A);
            v114 = fs("%s (+%d)", v113, v112);
            v111[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v114);
            if ( v493 <= 0 )
            {
LABEL_187:
              ++*iIndex;
              goto LABEL_188;
            }
            v110 = v17->m_apkTextWin[*iIndex];
          }
          ((void (__stdcall *)(signed int, signed int, _DWORD, signed int))v110->vfptr[116].__vecDelDtor)(
            255,
            255,
            0,
            255);
          goto LABEL_187;
        }
        v95 = v17->m_apkTextWin[*iIndex]->vfptr;
        v96 = *(_DWORD *)&v491._Alval.0 + aiOptionValue[0];
        v97 = TextData::Get(0xF2FBFC44);
        v98 = fs("%s (+%d)", v97, v96);
        v95[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v98);
        if ( *(_DWORD *)&v491._Alval.0 <= 0 )
        {
LABEL_175:
          ++*iIndex;
          goto LABEL_176;
        }
        v94 = v17->m_apkTextWin[*iIndex];
      }
      ((void (__stdcall *)(signed int, signed int, _DWORD, signed int))v94->vfptr[116].__vecDelDtor)(255, 255, 0, 255);
      goto LABEL_175;
    }
    if ( aiOptionValue[0] > 0 )
    {
      if ( *(_DWORD *)&v491._Alval.0 <= 0 )
      {
LABEL_256:
        v190 = v17->m_apkTextWin[*iIndex]->vfptr;
        v191 = *(_DWORD *)&v491._Alval.0 + aiOptionValue[0];
        v192 = TextData::Get(0xF2FBFC44);
        v193 = fs("%s (+%d)", v192, v191);
        v190[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v193);
        ++*iIndex;
LABEL_257:
        if ( aiOptionValue[2] > 0 )
        {
          if ( v493 <= 0 )
          {
LABEL_262:
            v194 = v17->m_apkTextWin[*iIndex]->vfptr;
            v195 = aiOptionValue[2] + v493;
            v196 = TextData::Get(0xE3ECFC4A);
            v197 = fs("%s (+%d)", v196, v195);
            v194[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v197);
            ++*iIndex;
LABEL_263:
            if ( aiOptionValue[1] > 0 )
            {
              if ( v492 <= 0 )
              {
LABEL_268:
                v198 = v17->m_apkTextWin[*iIndex]->vfptr;
                v199 = aiOptionValue[1] + v492;
                v200 = TextData::Get(0xEDEBFC40);
                v201 = fs("%s (+%d)", v200, v199);
                v198[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v201);
                ++*iIndex;
LABEL_269:
                if ( aiOptionValue[3] > 0 )
                {
                  if ( v494 <= 0 )
                  {
LABEL_274:
                    v202 = v17->m_apkTextWin[*iIndex]->vfptr;
                    v203 = aiOptionValue[3] + v494;
                    v204 = TextData::Get(0xECF1FC46);
                    v205 = fs("%s (+%d)", v204, v203);
                    v202[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v205);
                    ++*iIndex;
LABEL_275:
                    if ( aiOptionValue[4] > 0 )
                    {
                      if ( v495 <= 0 )
                      {
LABEL_280:
                        v206 = v17->m_apkTextWin[*iIndex]->vfptr;
                        v207 = aiOptionValue[4] + v495;
                        v208 = TextData::Get(0xE3F5FC40);
                        v209 = fs("%s (+%d)", v208, v207);
                        v206[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v209);
                        ++*iIndex;
LABEL_281:
                        if ( aiOptionValue[8] > 0 )
                        {
                          if ( v499 <= 0 )
                          {
LABEL_286:
                            v165 = v17->m_apkTextWin[*iIndex]->vfptr;
                            v210 = aiOptionValue[8] + v499;
                            v211 = TextData::Get(0xE3F5FC40);
                            v169 = fs("%s (+%d)", v211, v210);
                            goto LABEL_287;
                          }
                        }
                        else if ( v499 <= 0 )
                        {
                          goto LABEL_238;
                        }
                        ((void (__stdcall *)(signed int, signed int, _DWORD, signed int))v17->m_apkTextWin[*iIndex]->vfptr[116].__vecDelDtor)(
                          255,
                          255,
                          0,
                          255);
                        goto LABEL_286;
                      }
                    }
                    else if ( v495 <= 0 )
                    {
                      goto LABEL_281;
                    }
                    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v17->m_apkTextWin[*iIndex]->vfptr[116].__vecDelDtor)(
                      255,
                      255,
                      0,
                      255);
                    goto LABEL_280;
                  }
                }
                else if ( v494 <= 0 )
                {
                  goto LABEL_275;
                }
                ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v17->m_apkTextWin[*iIndex]->vfptr[116].__vecDelDtor)(
                  255,
                  255,
                  0,
                  255);
                goto LABEL_274;
              }
            }
            else if ( v492 <= 0 )
            {
              goto LABEL_269;
            }
            ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v17->m_apkTextWin[*iIndex]->vfptr[116].__vecDelDtor)(
              255,
              255,
              0,
              255);
            goto LABEL_268;
          }
        }
        else if ( v493 <= 0 )
        {
          goto LABEL_263;
        }
        ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v17->m_apkTextWin[*iIndex]->vfptr[116].__vecDelDtor)(
          255,
          255,
          0,
          255);
        goto LABEL_262;
      }
    }
    else if ( *(_DWORD *)&v491._Alval.0 <= 0 )
    {
      goto LABEL_257;
    }
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v17->m_apkTextWin[*iIndex]->vfptr[116].__vecDelDtor)(
      255,
      255,
      0,
      255);
    goto LABEL_256;
  }
  if ( *(float *)&v77 == 0.0 )
  {
    if ( aiOptionValue[0] > 0 )
    {
      v276 = v17->m_apkTextWin[*iIndex]->vfptr;
      v277 = aiOptionValue[0];
      v278 = TextData::Get(0xF2FBFC44);
      v279 = fs("%s (+%d)", v278, v277);
      v276[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v279);
      ++*iIndex;
    }
    if ( aiOptionValue[2] > 0 )
    {
      v280 = v17->m_apkTextWin[*iIndex]->vfptr;
      v281 = aiOptionValue[2];
      v282 = TextData::Get(0xE3ECFC4A);
      v283 = fs("%s (+%d)", v282, v281);
      v280[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v283);
      ++*iIndex;
    }
    if ( aiOptionValue[1] > 0 )
    {
      v284 = v17->m_apkTextWin[*iIndex]->vfptr;
      v285 = aiOptionValue[1];
      v286 = TextData::Get(0xEDEBFC40);
      v287 = fs("%s (+%d)", v286, v285);
      v284[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v287);
      ++*iIndex;
    }
    if ( aiOptionValue[3] > 0 )
    {
      v288 = v17->m_apkTextWin[*iIndex]->vfptr;
      v289 = aiOptionValue[3];
      v290 = TextData::Get(0xECF1FC46);
      v291 = fs("%s (+%d)", v290, v289);
      v288[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v291);
      ++*iIndex;
    }
    if ( aiOptionValue[4] > 0 )
    {
      v292 = v17->m_apkTextWin[*iIndex]->vfptr;
      v293 = aiOptionValue[4];
      v294 = TextData::Get(0xE3F5FC40);
      v295 = fs("%s (+%d)", v294, v293);
      v292[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v295);
      ++*iIndex;
    }
    goto LABEL_333;
  }
  v212 = v77->STR;
  if ( (_WORD)v212 )
  {
    if ( aiOptionValue[0] <= 0 )
    {
      v218 = v17->m_apkTextWin[*iIndex]->vfptr;
      v219 = v212;
      v220 = TextData::Get(0xF2FBFC44);
      v221 = fs("%s +%d", v220, v219);
      v218[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v221);
    }
    else
    {
      v213 = v17->m_apkTextWin[*iIndex]->vfptr;
      v214 = aiOptionValue[0];
      v215 = v212;
      v216 = TextData::Get(0xF2FBFC44);
      v217 = fs("%s +%d (+%d)", v216, v215, v214);
      v213[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v217);
    }
  }
  else
  {
    if ( aiOptionValue[0] <= 0 )
      goto LABEL_296;
    v222 = v17->m_apkTextWin[*iIndex]->vfptr;
    v223 = aiOptionValue[0];
    v224 = TextData::Get(0xF2FBFC44);
    v225 = fs("%s (+%d)", v224, v223);
    v222[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v225);
  }
  ++*iIndex;
LABEL_296:
  if ( *(_WORD *)(LODWORD(fRanCriRate) + 36) )
  {
    if ( aiOptionValue[2] <= 0 )
    {
      v231 = v17->m_apkTextWin[*iIndex]->vfptr;
      v232 = *(_WORD *)(LODWORD(fRanCriRate) + 36);
      v233 = TextData::Get(0xE3ECFC4A);
      v234 = fs("%s +%d", v233, v232);
      v231[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v234);
    }
    else
    {
      v226 = v17->m_apkTextWin[*iIndex]->vfptr;
      v227 = aiOptionValue[2];
      v228 = *(_WORD *)(LODWORD(fRanCriRate) + 36);
      v229 = TextData::Get(0xE3ECFC4A);
      v230 = fs("%s +%d (+%d)", v229, v228, v227);
      v226[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v230);
    }
  }
  else
  {
    if ( aiOptionValue[2] <= 0 )
      goto LABEL_303;
    v235 = v17->m_apkTextWin[*iIndex]->vfptr;
    v236 = aiOptionValue[2];
    v237 = TextData::Get(0xE3ECFC4A);
    v238 = fs("%s (+%d)", v237, v236);
    v235[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v238);
  }
  ++*iIndex;
LABEL_303:
  if ( *(_WORD *)(LODWORD(fRanCriRate) + 34) )
  {
    if ( aiOptionValue[1] <= 0 )
    {
      v244 = v17->m_apkTextWin[*iIndex]->vfptr;
      v245 = *(_WORD *)(LODWORD(fRanCriRate) + 34);
      v246 = TextData::Get(0xEDEBFC40);
      v247 = fs("%s +%d", v246, v245);
      v244[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v247);
    }
    else
    {
      v239 = v17->m_apkTextWin[*iIndex]->vfptr;
      v240 = aiOptionValue[1];
      v241 = *(_WORD *)(LODWORD(fRanCriRate) + 34);
      v242 = TextData::Get(0xEDEBFC40);
      v243 = fs("%s +%d (+%d)", v242, v241, v240);
      v239[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v243);
    }
  }
  else
  {
    if ( aiOptionValue[1] <= 0 )
      goto LABEL_310;
    v248 = v17->m_apkTextWin[*iIndex]->vfptr;
    v249 = aiOptionValue[1];
    v250 = TextData::Get(0xEDEBFC40);
    v251 = fs("%s (+%d)", v250, v249);
    v248[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v251);
  }
  ++*iIndex;
LABEL_310:
  if ( *(_WORD *)(LODWORD(fRanCriRate) + 38) )
  {
    if ( aiOptionValue[3] <= 0 )
    {
      v257 = v17->m_apkTextWin[*iIndex]->vfptr;
      v258 = *(_WORD *)(LODWORD(fRanCriRate) + 38);
      v259 = TextData::Get(0xECF1FC46);
      v260 = fs("%s +%d", v259, v258);
      v257[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v260);
    }
    else
    {
      v252 = v17->m_apkTextWin[*iIndex]->vfptr;
      v253 = aiOptionValue[3];
      v254 = *(_WORD *)(LODWORD(fRanCriRate) + 38);
      v255 = TextData::Get(0xECF1FC46);
      v256 = fs("%s +%d (+%d)", v255, v254, v253);
      v252[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v256);
    }
  }
  else
  {
    if ( aiOptionValue[3] <= 0 )
      goto LABEL_317;
    v261 = v17->m_apkTextWin[*iIndex]->vfptr;
    v262 = aiOptionValue[3];
    v263 = TextData::Get(0xECF1FC46);
    v264 = fs("%s (+%d)", v263, v262);
    v261[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v264);
  }
  ++*iIndex;
LABEL_317:
  if ( *(_WORD *)(LODWORD(fRanCriRate) + 40) )
  {
    if ( aiOptionValue[4] <= 0 )
    {
      v270 = v17->m_apkTextWin[*iIndex]->vfptr;
      v271 = *(_WORD *)(LODWORD(fRanCriRate) + 40);
      v272 = TextData::Get(0xE3F5FC40);
      v273 = fs("%s +%d", v272, v271);
      v270[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v273);
    }
    else
    {
      v265 = v17->m_apkTextWin[*iIndex]->vfptr;
      v266 = aiOptionValue[4];
      v267 = *(_WORD *)(LODWORD(fRanCriRate) + 40);
      v268 = TextData::Get(0xE3F5FC40);
      v269 = fs("%s +%d (+%d)", v268, v267, v266);
      v265[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v269);
    }
    goto LABEL_237;
  }
  if ( aiOptionValue[4] > 0 )
  {
    v170 = v17->m_apkTextWin[*iIndex]->vfptr;
    v274 = aiOptionValue[4];
    v275 = TextData::Get(0xE3F5FC40);
    v173 = fs("%s (+%d)", v275, v274);
    goto LABEL_236;
  }
LABEL_238:
  v174 = fRanCriRate;
  if ( fRanCriRate != 0.0 )
  {
    if ( *(_WORD *)(LODWORD(fRanCriRate) + 42) )
    {
      v175 = *(_WORD *)(LODWORD(fRanCriRate) + 42) / 10;
      v176 = TextData::Get(0x68A3E3E7u);
      sprintf(acStr, (const char *)v176, v175);
      ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
      ++*iIndex;
    }
    if ( *(_WORD *)(LODWORD(v174) + 44) )
    {
      v177 = (signed int)(1717986919 * (unsigned __int64)*(_WORD *)(LODWORD(v174) + 44) >> 32) >> 2;
      v178 = v177 + (v177 >> 31);
      v179 = TextData::Get(0x72E4CCD1u);
      sprintf(acStr, (const char *)v179, v178);
      ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
      ++*iIndex;
    }
    if ( *(_WORD *)(LODWORD(v174) + 46) )
    {
      v180 = *(_WORD *)(LODWORD(v174) + 46) / 10;
      v181 = TextData::Get(0x72A29BD0u);
      sprintf(acStr, (const char *)v181, v180);
      ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
      ++*iIndex;
    }
    v182 = *(_WORD *)(LODWORD(fRanCriRate) + 54);
    v183 = v505;
    v184 = v505 + aiOptionValue[14];
    if ( !v182 )
    {
      if ( !v184 )
      {
LABEL_351:
        if ( !*(_WORD *)(LODWORD(fRanCriRate) + 56) )
          goto LABEL_336;
        v304 = *(_WORD *)(LODWORD(fRanCriRate) + 56);
        v305 = TextData3::Get(0xFBE9C230);
        sprintf(acStr, "%s : +%i", v305, v304);
        v298 = v17->m_apkTextWin[*iIndex];
        goto LABEL_335;
      }
      goto LABEL_346;
    }
    if ( v184 )
    {
      v185 = v505 + aiOptionValue[14];
      v186 = *(_WORD *)(LODWORD(fRanCriRate) + 54);
      v187 = TextData3::Get(0xE2DB033E);
      sprintf(acStr, "%s : +%i (+%d)", v187, v186, v185);
    }
    else
    {
      if ( !v182 )
      {
LABEL_346:
        if ( v184 )
        {
          v302 = v505 + aiOptionValue[14];
          v303 = TextData3::Get(0xE2DB033E);
          sprintf(acStr, "%s : (+%d)", v303, v302);
        }
        goto LABEL_348;
      }
      v300 = *(_WORD *)(LODWORD(fRanCriRate) + 54);
      v301 = TextData3::Get(0xE2DB033E);
      sprintf(acStr, "%s : +%i", v301, v300);
    }
LABEL_348:
    if ( v183 )
      ((void (__stdcall *)(D3DXCOLOR *))v17->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
    ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
    ++*iIndex;
    goto LABEL_351;
  }
LABEL_333:
  if ( aiOptionValue[14] > 0 )
  {
    v296 = aiOptionValue[14];
    v297 = TextData3::Get(0xE2DB033E);
    sprintf(acStr, "%s : (+%d)", v297, v296);
    v298 = v17->m_apkTextWin[*iIndex];
LABEL_335:
    ((void (__stdcall *)(char *))v298->vfptr[118].__vecDelDtor)(acStr);
    ++*iIndex;
  }
LABEL_336:
  if ( pkInfo->MaxWC
    || aiOptionValue[7]
    || v498
    || fRanCriRate != 0.0 && *(_WORD *)(LODWORD(fRanCriRate) + 58) != (_WORD)v498 )
  {
    v299 = kUpPoint.iWC;
    goto LABEL_354;
  }
  v299 = kUpPoint.iWC;
  if ( kUpPoint.iWC || kUpPoint.iWC_MA != kUpPoint.iWC )
  {
LABEL_354:
    v306 = 0;
    if ( v299 || kUpPoint.iWC_MA )
      v306 = v299 + kUpPoint.iWC_MA;
    if ( v498 )
      v306 += v498;
    if ( v306 )
      ((void (__stdcall *)(D3DXCOLOR *))v17->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
    if ( aiOptionValue[7] )
      v306 += aiOptionValue[7];
    if ( pkInfo->Class == 4 )
    {
      v307 = *(_WORD *)(LODWORD(fRanCriRate) + 58);
      if ( !v307 )
        goto LABEL_598;
      if ( v306 > 0 )
      {
        HIDWORD(v472) = v306;
        LODWORD(v472) = *(_WORD *)(LODWORD(fRanCriRate) + 58);
        v308 = TextData3::Get(0xF4020223);
LABEL_376:
        sprintf(acStr, (const char *)v308, v472);
        goto LABEL_379;
      }
      if ( !v307 )
      {
LABEL_598:
        if ( v306 )
        {
          v311 = TextData3::Get(0xF402D023);
          sprintf(acStr, (const char *)v311, v306);
        }
        goto LABEL_379;
      }
      v309 = *(_WORD *)(LODWORD(fRanCriRate) + 58);
      v310 = TextData3::Get(0xF4020123);
      sprintf(acStr, (const char *)v310, v309);
LABEL_379:
      ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
      ++*iIndex;
      goto LABEL_380;
    }
    v312 = pkInfo->MaxWC;
    if ( v312 )
    {
      if ( v306 > 0 )
      {
        v313 = pkInfo->MaxWC;
        v314 = pkInfo->MinWC;
        v315 = TextData::Get(0x1D424C56u);
        sprintf(acStr, (const char *)v315, v314, v313, v306);
        goto LABEL_379;
      }
      if ( v312 )
      {
        v316 = *(_QWORD *)&pkInfo->MinWC;
        v472 = *(_QWORD *)&pkInfo->MinWC;
        v308 = TextData::Get(0x1E424C56u);
        goto LABEL_376;
      }
    }
    if ( v306 )
    {
      v317 = TextData3::Get(0xF402D023);
      sprintf(acStr, (const char *)v317, v306);
    }
    goto LABEL_379;
  }
LABEL_380:
  if ( pkInfo->AC || aiOptionValue[8] || v499 )
  {
    v318 = kUpPoint.iAC;
    goto LABEL_387;
  }
  v318 = kUpPoint.iAC;
  if ( kUpPoint.iAC || kUpPoint.iAC_MR != kUpPoint.iAC )
  {
LABEL_387:
    v319 = 0;
    if ( v318 || kUpPoint.iAC_MR )
      v319 = v318 + kUpPoint.iAC_MR;
    if ( v499 )
      v319 += v499;
    if ( v319 )
      ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
    if ( aiOptionValue[8] )
      v319 += aiOptionValue[8];
    v320 = pkInfo->AC;
    if ( v320 )
    {
      if ( v319 > 0 )
      {
        v321 = pkInfo->AC;
        v322 = TextData::Get(0xE454C48u);
        sprintf(acStr, (const char *)v322, v321, v319);
LABEL_402:
        ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
        ++*iIndex;
        goto LABEL_403;
      }
      if ( v320 )
      {
        v323 = pkInfo->AC;
        v324 = TextData::Get(0xF454C48u);
        sprintf(acStr, (const char *)v324, v323);
        goto LABEL_402;
      }
    }
    v325 = TextData3::Get(0xF4F4C126);
    sprintf(acStr, (const char *)v325, v319);
    goto LABEL_402;
  }
LABEL_403:
  if ( pkInfo->MaxMA
    || aiOptionValue[9]
    || v500
    || fRanCriRate != 0.0 && *(_WORD *)(LODWORD(fRanCriRate) + 60) != (_WORD)v500 )
  {
    v326 = kUpPoint.iMA;
    goto LABEL_412;
  }
  v326 = kUpPoint.iMA;
  if ( kUpPoint.iMA || kUpPoint.iWC_MA != kUpPoint.iMA )
  {
LABEL_412:
    v327 = 0;
    if ( v326 || kUpPoint.iWC_MA )
      v327 = v326 + kUpPoint.iWC_MA;
    if ( v500 )
      v327 += v500;
    if ( v327 )
      ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
    if ( aiOptionValue[9] )
      v327 += aiOptionValue[9];
    if ( pkInfo->Class == 4 )
    {
      v328 = *(_WORD *)(LODWORD(fRanCriRate) + 60);
      if ( !v328 )
        goto LABEL_599;
      if ( v327 > 0 )
      {
        HIDWORD(v473) = v327;
        LODWORD(v473) = *(_WORD *)(LODWORD(fRanCriRate) + 60);
        v329 = TextData3::Get(0x1A401227u);
LABEL_434:
        sprintf(acStr, (const char *)v329, v473);
        goto LABEL_437;
      }
      if ( !v328 )
      {
LABEL_599:
        if ( v327 )
        {
          v332 = TextData3::Get(0xE8401227);
          sprintf(acStr, (const char *)v332, v327);
        }
        goto LABEL_437;
      }
      v330 = *(_WORD *)(LODWORD(fRanCriRate) + 60);
      v331 = TextData3::Get(0x19401227u);
      sprintf(acStr, (const char *)v331, v330);
LABEL_437:
      ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
      ++*iIndex;
      goto LABEL_438;
    }
    v333 = pkInfo->MaxMA;
    if ( v333 )
    {
      if ( v327 > 0 )
      {
        v334 = pkInfo->MaxMA;
        v335 = pkInfo->MinMA;
        v336 = TextData::Get(0x2E467194u);
        sprintf(acStr, (const char *)v336, v335, v334, v327);
        goto LABEL_437;
      }
      if ( v333 )
      {
        v337 = *(_QWORD *)&pkInfo->MinMA;
        v473 = *(_QWORD *)&pkInfo->MinMA;
        v329 = TextData::Get(0x2E467294u);
        goto LABEL_434;
      }
    }
    if ( v327 )
    {
      v338 = TextData3::Get(0xE8401227);
      sprintf(acStr, (const char *)v338, v327);
    }
    goto LABEL_437;
  }
LABEL_438:
  v339 = kUpPoint.iCriRate;
  if ( kUpPoint.iCriRate )
  {
    uiSerialMiddle = kUpPoint.iCriRate;
    if ( v497 )
    {
      v339 = v497 + kUpPoint.iCriRate;
      uiSerialMiddle = v497 + kUpPoint.iCriRate;
    }
    if ( *(float *)&v339 != 0.0 )
      ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
    if ( aiOptionValue[6] )
    {
      v339 += aiOptionValue[6];
      uiSerialMiddle = v339;
    }
    v164 = pkInfo->Class == 4;
    *(float *)&uiSerialMiddle = (double)(signed int)uiSerialMiddle / 1000.0;
    if ( v164 )
    {
      if ( *(float *)&v339 != 0.0 )
      {
        v340 = *(float *)&uiSerialMiddle;
        v341 = TextData2::Get(0xF8E1D127);
        sprintf(acStr, (const char *)v341, v340);
        v342 = v17->m_apkTextWin[*iIndex];
LABEL_450:
        ((void (__stdcall *)(char *))v342->vfptr[118].__vecDelDtor)(acStr);
        ++*iIndex;
        goto LABEL_451;
      }
    }
    else if ( *(float *)&v339 != 0.0 )
    {
      v343 = *(float *)&uiSerialMiddle;
      v344 = TextData2::Get(0xF8E1D127);
      sprintf(acStr, (const char *)v344, v343);
      v342 = v17->m_apkTextWin[*iIndex];
      goto LABEL_450;
    }
  }
LABEL_451:
  if ( pkInfo->MR || aiOptionValue[10] || v501 )
  {
    v345 = kUpPoint.iMR;
    goto LABEL_458;
  }
  v345 = kUpPoint.iMR;
  if ( kUpPoint.iMR || kUpPoint.iAC_MR != kUpPoint.iMR )
  {
LABEL_458:
    v346 = 0;
    if ( v345 || kUpPoint.iAC_MR )
      v346 = v345 + kUpPoint.iAC_MR;
    if ( v501 )
      v346 += v501;
    if ( v346 )
      ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
    if ( aiOptionValue[10] )
      v346 += aiOptionValue[10];
    v347 = pkInfo->MR;
    if ( v347 )
    {
      if ( v346 > 0 )
      {
        v348 = pkInfo->MR;
        v349 = TextData::Get(0x7EC8DAE4u);
        sprintf(acStr, (const char *)v349, v348, v346);
LABEL_473:
        ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
        ++*iIndex;
        goto LABEL_474;
      }
      if ( v347 )
      {
        v350 = pkInfo->MR;
        v351 = TextData::Get(0x7EC9DAE4u);
        sprintf(acStr, (const char *)v351, v350);
        goto LABEL_473;
      }
    }
    v352 = TextData3::Get(0x82906278);
    sprintf(acStr, (const char *)v352, v346);
    goto LABEL_473;
  }
LABEL_474:
  v353 = pkInfo->WCRate;
  if ( v353 && v353 > 0x3E8 )
  {
    v354 = v353 - 1000;
    if ( v353 == 1000 )
      v354 = 1;
    v355 = v354 / 0xA;
    v356 = TextData::Get(0x3083AB9Au);
    sprintf(acStr, (const char *)v356, v355);
    ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
    ++*iIndex;
  }
  v357 = pkInfo->ACRate;
  if ( v357 && v357 > 0x3E8 )
  {
    v358 = v357 - 1000;
    if ( !v358 )
      v358 = 1;
    v359 = v358 / 0xA;
    v360 = TextData::Get(0x2186AB8Cu);
    sprintf(acStr, (const char *)v360, v359);
    ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
    ++*iIndex;
  }
  v361 = pkInfo->MARate;
  if ( v361 && v361 > 0x3E8 )
  {
    v362 = v361 - 1000;
    if ( !v362 )
      v362 = 1;
    v363 = v362 / 0xA;
    v364 = TextData::Get(0x72879FD8u);
    sprintf(acStr, (const char *)v364, v363);
    ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
    ++*iIndex;
  }
  v365 = pkInfo->MRRate;
  if ( v365 && v365 > 0x3E8 )
  {
    v366 = v365 - 1000;
    if ( !v366 )
      v366 = 1;
    v367 = v366 / 0xA;
    v368 = TextData::Get(0xC2D83928);
    sprintf(acStr, (const char *)v368, v367);
    ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
    ++*iIndex;
  }
  v369 = v496;
  v370 = pkInfo->TH;
  v371 = v496 + aiOptionValue[5];
  if ( !v370 )
  {
    if ( !v371 )
      goto LABEL_506;
    goto LABEL_501;
  }
  if ( v371 )
  {
    v372 = v496 + aiOptionValue[5];
    v373 = pkInfo->TH;
    v374 = TextData3::Get(0xF4FFB70B);
    sprintf(acStr, (const char *)v374, v373, v372);
  }
  else
  {
    if ( !v370 )
    {
LABEL_501:
      if ( v371 )
      {
        v377 = v496 + aiOptionValue[5];
        v378 = TextData3::Get(0xF4FFB70C);
        sprintf(acStr, (const char *)v378, v377);
      }
      goto LABEL_503;
    }
    v375 = pkInfo->TH;
    v376 = TextData::Get(0xD3F94C53);
    sprintf(acStr, (const char *)v376, v375);
  }
LABEL_503:
  if ( v369 )
    ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
  ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
  ++*iIndex;
LABEL_506:
  if ( fRanCriRate != 0.0 )
  {
    v379 = *(_WORD *)(LODWORD(fRanCriRate) + 50);
    if ( (_WORD)v379 )
    {
      v380 = (v379 - 1000) / 10;
      if ( v380 > 0 )
      {
        v381 = v380;
        v382 = TextData::Get(0x21378697u);
        sprintf(acStr, (const char *)v382, v381);
        ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
        ++*iIndex;
      }
    }
  }
  v383 = v502;
  v384 = pkInfo->TB;
  v385 = v502 + aiOptionValue[11];
  if ( !v384 )
  {
    if ( !v385 )
      goto LABEL_522;
    goto LABEL_517;
  }
  if ( v385 )
  {
    v386 = v502 + aiOptionValue[11];
    v387 = pkInfo->TB;
    v388 = TextData3::Get(0xDA292719);
    sprintf(acStr, (const char *)v388, v387, v386);
  }
  else
  {
    if ( !v384 )
    {
LABEL_517:
      if ( v385 )
      {
        v391 = v502 + aiOptionValue[11];
        v392 = TextData3::Get(0xDA2A2719);
        sprintf(acStr, (const char *)v392, v391);
      }
      goto LABEL_519;
    }
    v389 = pkInfo->TB;
    v390 = TextData::Get(0x4338324Cu);
    sprintf(acStr, (const char *)v390, v389);
  }
LABEL_519:
  if ( v383 )
    ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
  ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
  ++*iIndex;
LABEL_522:
  if ( fRanCriRate != 0.0 )
  {
    v393 = *(_WORD *)(LODWORD(fRanCriRate) + 52);
    if ( (_WORD)v393 )
    {
      v394 = (v393 - 1000) / 10;
      if ( v394 > 0 )
      {
        v395 = v394;
        v396 = TextData::Get(0x667A819Au);
        sprintf(acStr, (const char *)v396, v395);
        ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
        ++*iIndex;
      }
    }
  }
  v397 = pkInfo->ShieldAC;
  if ( v397 )
  {
    if ( kUpPoint.iShieldAC )
    {
      v398 = kUpPoint.iShieldAC / 10;
      v399 = v397 / 0xA;
      v400 = TextData::Get(0x1B433184u);
      sprintf(acStr, (const char *)v400, v399, v398);
      ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
    }
    else
    {
      v401 = v397 / 0xA;
      v402 = TextData::Get(0x1B433185u);
      sprintf(acStr, (const char *)v402, v401);
    }
    ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
    ++*iIndex;
  }
  v403 = pkInfo->CriRate;
  fCrlTB = 0.0;
  *(float *)&uiSerialMiddle = 0.0;
  fRanCriRate = 0.0;
  if ( v403 )
  {
    v404 = 10.0;
    fCrlTB = (double)v403 / 10.0;
  }
  else
  {
    v404 = 10.0;
  }
  if ( kWeaponTitleUpPoint.dwCriRate )
    *(float *)&uiSerialMiddle = (double)kWeaponTitleUpPoint.dwCriRate / v404;
  if ( aiOptionValue[6] )
    fRanCriRate = (double)aiOptionValue[6] / v404;
  *(double *)&v405 = fCrlTB;
  v406 = *(float *)&uiSerialMiddle;
  v407 = fRanCriRate;
  if ( fCrlTB > 0.0 )
    goto LABEL_542;
  if ( v407 + v406 > 0.0 )
  {
    if ( fCrlTB <= 0.0 )
    {
      v410 = v407 + v406;
      goto LABEL_548;
    }
    *(double *)&v405 = fCrlTB;
LABEL_542:
    v408 = v406 + fRanCriRate;
    if ( v408 > 0.0 )
    {
      v409 = TextData3::Get(0xD22E1226);
      sprintf(
        acStr,
        (const char *)v409,
        (_DWORD)v405,
        (_DWORD)((unsigned __int64)v405 >> 32),
        LODWORD(v408),
        (_DWORD)(*(unsigned __int64 *)&v408 >> 32));
      if ( *(float *)&uiSerialMiddle > 0.0 )
        ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
      goto LABEL_549;
    }
    v410 = v408;
    if ( *(double *)&v405 > 0.0 )
    {
      v411 = TextData::Get(0x2E452A83u);
      sprintf(acStr, (const char *)v411, (_DWORD)v405, (_DWORD)((unsigned __int64)v405 >> 32));
LABEL_549:
      ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
      ++*iIndex;
      goto LABEL_550;
    }
LABEL_548:
    v412 = TextData3::Get(0xD22F1226);
    sprintf(acStr, (const char *)v412, LODWORD(v410), (_DWORD)(*(unsigned __int64 *)&v410 >> 32));
    goto LABEL_549;
  }
LABEL_550:
  v413 = pkInfo->CrlTB;
  if ( !v413 && aiOptionValue[12] <= 0 )
    goto LABEL_565;
  fCrlTB = 0.0;
  *(float *)&uiSerialMiddle = 0.0;
  if ( v413 )
    fCrlTB = (double)v413 / 10.0;
  if ( aiOptionValue[12] > 0 )
    *(float *)&uiSerialMiddle = (double)aiOptionValue[12] / 10.0;
  if ( v413 )
  {
    v414 = aiOptionValue[12] == 0;
    if ( aiOptionValue[12] > 0 )
    {
      v415 = v17->m_apkTextWin[*iIndex]->vfptr;
      v416 = *(float *)&uiSerialMiddle;
      v417 = fCrlTB;
      v418 = (char *)TextData3::Get(0xADF1B5B7);
      v419 = fs(v418, v417, v416);
LABEL_563:
      v415[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v419);
      goto LABEL_564;
    }
  }
  else
  {
    v414 = aiOptionValue[12] == 0;
  }
  if ( v414 )
  {
    v415 = v17->m_apkTextWin[*iIndex]->vfptr;
    v424 = fCrlTB;
    v425 = (char *)TextData::Get(0x2E452A84u);
    v419 = fs(v425, v424);
    goto LABEL_563;
  }
  v420 = v17->m_apkTextWin[*iIndex]->vfptr;
  v421 = *(float *)&uiSerialMiddle;
  v422 = (char *)TextData3::Get(0xAEF1B5B7);
  v423 = fs(v422, v421);
  v420[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v423);
LABEL_564:
  ++*iIndex;
LABEL_565:
  if ( pkInfo->Class == 5 )
  {
    *(float *)&uiSerialMiddle = (double)pkInfo->AtkSpeed / 1000.0;
    v426 = *(float *)&uiSerialMiddle;
    v427 = TextData::Get(0x3F452739u);
    sprintf(acStr, (const char *)v427, v426);
    ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
    ++*iIndex;
  }
  if ( !pkCollectCard->CC_ItemInx[14] && pkInfo->Class == 26 )
  {
    v428 = ((int (*)(void))pkItem->vfptr[19].__vecDelDtor)();
    v429 = ((int (*)(void))pkItem->vfptr[21].__vecDelDtor)();
    v430 = TextData2::Get(0xDA13E036);
    sprintf(acStr, (const char *)v430, v428, v429);
    ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
    ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
    ++*iIndex;
  }
  if ( !pkCollectCard->CC_ItemInx[14] && pkInfo->Class == 37 )
  {
    v431 = ((int (*)(void))pkItem->vfptr[19].__vecDelDtor)();
    v432 = ((int (*)(void))pkItem->vfptr[21].__vecDelDtor)();
    v433 = TextData2::Get(0xDA13E036);
    sprintf(acStr, (const char *)v433, v431, v432);
    ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
    ((void (__stdcall *)(_DWORD))v17->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
    ++*iIndex;
  }
  if ( pkInfo->Class == 30 )
  {
    *(float *)&uiSerialMiddle = COERCE_FLOAT(((int (*)(void))pkItem->vfptr[17].__vecDelDtor)());
    v434 = *(_DWORD *)(ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::ms_pkTable + 56);
    pkCollectCard = (CollectCard *)(v434 ? *(_DWORD *)(v434 + 40) : 0);
    v435 = 0;
    if ( pkCollectCard )
    {
      v436 = pkCollectCard;
      while ( 1 )
      {
        v437 = CDataReader::GetRecord(
                 (CDataReader *)(ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::ms_pkTable + 4),
                 v435);
        if ( v437 )
        {
          if ( *(_DWORD *)v437 == uiSerialMiddle )
            break;
        }
        if ( ++v435 >= (unsigned int)v436 )
        {
          v17 = v478;
          goto LABEL_584;
        }
      }
      v17 = v478;
      v438 = v478->m_apkTextWin[*iIndex]->vfptr;
      v439 = (int)(v437 + 4);
      v440 = (char *)TextData2::Get(0x1A44766Du);
      v441 = fs(v440, v439);
      v438[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v441);
      ++*iIndex;
    }
  }
LABEL_584:
  if ( pkInfo->Class == 31 )
  {
    v442 = TextData2::Get(0xFF43606C);
    ptr._Myres = 15;
    ptr._Mysize = 0;
    ptr._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &ptr,
      (const char *)v442,
      strlen((const char *)v442));
    v508 = 2;
    v443 = TextData2::Get(0xFF434E6C);
    v491._Myres = 15;
    v491._Mysize = 0;
    v491._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v491,
      (const char *)v443,
      strlen((const char *)v443));
    LOBYTE(v508) = 3;
    v444 = TextData2::Get(0xFF434F6C);
    v497 = 15;
    v496 = 0;
    LOBYTE(v492) = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v492,
      (const char *)v444,
      strlen((const char *)v444));
    LOBYTE(v508) = 4;
    v445 = TextData2::Get(0xFF43506C);
    v504 = 15;
    v503 = 0;
    LOBYTE(v499) = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v499,
      (const char *)v445,
      strlen((const char *)v445));
    v446 = (int (*)(void))pkItem->vfptr[14].__vecDelDtor;
    v508 = 5;
    v447 = v446();
    v448 = v447 % 0x2710;
    pkCollectCard = (CollectCard *)(v447 / 0xF4240);
    uiSerialMiddle = (v447 % 0xF4240 - v447 % 0x2710) / 0x2710;
    cSerialKey = v447 / 0xF4240 + 64;
    v449 = CollectCardTab::GetByItemInx((const char *)HIDWORD(v476));
    pkCollectCard = v449;
    if ( v449 )
    {
      v450 = CollectCardViewTab::GetByCardID(v449->CC_CardID);
      if ( v450 )
      {
        v451 = &ptr + pkCollectCard->CC_CardGradeType;
        if ( *(&ptr._Myres + 7 * pkCollectCard->CC_CardGradeType) >= 0x10 )
          v451 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v451->_Bx._Ptr;
        v452 = uiSerialMiddle;
        v453 = cSerialKey;
        v454 = v451;
        v455 = v450->CC_CardSeason;
        v456 = (char *)TextData2::Get(0x73A0CCBBu);
        v457 = fs(v456, v455, v454, v453, v452, v448);
        v458 = v17->m_apkTextWin[*iIndex]->vfptr;
        v459 = v457;
        v460 = (char *)TextData2::Get(0x1899725Au);
        v461 = fs(v460, v459);
        v458[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v461);
        ++*iIndex;
      }
    }
    v462 = v17->m_apkTextWin[*iIndex]->vfptr;
    v463 = ((int (*)(void))pkItem->vfptr[16].__vecDelDtor)();
    v464 = (char *)TextData2::Get(0xC46326Au);
    v465 = fs(v464, v463);
    v462[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)v465);
    ++*iIndex;
    v508 = -1;
    `eh vector destructor iterator'(
      &ptr,
      0x1Cu,
      4,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
  }
  v466 = (const char *)(*(int (**)(void))(**((_DWORD **)&v17->m_uiTotalMoneyXPos + *iIndex) + 484))();
  if ( v466 && *iIndex > 0 )
  {
    if ( strcmp(v466, " ") )
    {
      v17->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor((NiRefObject *)v17->m_apkTextWin[*iIndex], (unsigned int)" ");
      ++*iIndex;
    }
  }
}
// A8C218: using guessed type int ITableBase<CollectCardGroupDesc,CollectCardGroupDescTab>::ms_pkTable;

//----- (0052AC80) --------------------------------------------------------
void __thiscall ItemInfoWin::InsertMoneyContents(ItemInfoWin *this, ItemInfo *pkInfo, int iLot, __int64 i64Money, int *iIndex, ItemInfoWin::eSellState eState)
{
  ItemInfoWin *v6; // esi@1
  int v7; // ebx@2
  int v8; // edx@2
  int (__thiscall *v9)(int, ItemMoney *); // eax@2
  int v10; // eax@3
  int *v11; // eax@6
  ItemMoney *v12; // eax@9
  bool v13; // bl@10
  NiRefObjectVtbl *v14; // ebx@14
  NiUnsharedGeometryGroup *v15; // eax@14
  ItemMoney *v16; // ebx@14
  ItemInfo *v17; // eax@14
  int v18; // eax@14
  int v19; // ecx@14
  char *v20; // eax@16
  char *v21; // edx@16
  char v22; // cl@17
  int v23; // eax@18
  NiRefObjectVtbl *v24; // ebx@19
  NiUnsharedGeometryGroup *v25; // eax@19
  char *v26; // eax@19
  char *v27; // ecx@19
  char v28; // dl@20
  PgFont *v29; // ebx@21
  char *v30; // eax@23
  char *v31; // edx@23
  char v32; // cl@24
  char v33; // cl@25
  ItemMoney *v34; // edx@25
  int v35; // eax@25
  NiUnsharedGeometryGroup *v36; // ST10_4@33
  NiUnsharedGeometryGroup *v37; // ST10_4@34
  int v38; // eax@37
  char v39; // ST14_1@37
  int v40; // ecx@37
  NiUnsharedGeometryGroup *v41; // eax@39
  int v42; // ebx@41
  char v43; // ST14_1@41
  PgWinText *v44; // esi@42
  ItemViewInfo *pkMoneyViewInfo; // [sp+Ch] [bp-120h]@9
  tagSIZE kSize; // [sp+10h] [bp-11Ch]@18
  ItemMoney *pkItemMoney; // [sp+18h] [bp-114h]@2
  PgFont *pkFont; // [sp+1Ch] [bp-110h]@2
  bool bShowItemMoney; // [sp+23h] [bp-109h]@2
  int bBuyPossible; // [sp+24h] [bp-108h]@2
  char acStr[256]; // [sp+28h] [bp-104h]@16

  v6 = this;
  if ( *iIndex < 80 )
  {
    pkFont = (PgFont *)((int (*)(void))this->m_apkTextWin[0]->vfptr[114].__vecDelDtor)();
    v7 = ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;
    v8 = *(_DWORD *)ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;
    pkItemMoney = (ItemMoney *)pkInfo->ID;
    v9 = *(int (__thiscall **)(int, ItemMoney *))(v8 + 16);
    LOBYTE(bBuyPossible) = 1;
    bShowItemMoney = 0;
    if ( (unsigned __int8)v9(ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable, pkItemMoney) )
    {
      if ( (unsigned __int16)pkItemMoney <= *(_WORD *)(v7 + 200) )
      {
        v11 = (int *)(*(_DWORD *)(v7 + 196) + 4 * (unsigned __int16)pkItemMoney);
        if ( *v11 )
          v10 = *v11;
        else
          v10 = 0;
      }
      else
      {
        v10 = 0;
      }
    }
    else
    {
      v10 = 0;
    }
    v12 = ItemMoneyTab::GetByInxName((char *)(v10 + 2));
    pkItemMoney = v12;
    pkMoneyViewInfo = 0;
    if ( v12 )
    {
      v13 = 1;
      pkMoneyViewInfo = ItemViewInfoTab::GetByInxName(v12->IM_MoneyIDX);
    }
    else
    {
      v13 = bShowItemMoney;
    }
    ((void (__stdcall *)(_DWORD))v6->m_pkItemMoneyIcon->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v6->m_pkItemMoneyText->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v6->m_pkItemMoneyNumText->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v6->m_pkItemTotalMoneyIcon->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v6->m_pkItemTotalMoneyText->vfptr[64].__vecDelDtor)(0);
    if ( v13 )
    {
      if ( eState == 2 )
      {
        ItemInfoWin::HideAllMoneyWin(v6);
        v14 = v6->m_apkTextWin[*iIndex]->vfptr;
        v15 = TextData3::Get(0x10361F2Fu);
        v14[118].__vecDelDtor((NiRefObject *)v6->m_apkTextWin[*iIndex], (unsigned int)v15);
        v16 = pkItemMoney;
        v17 = ItemInfoTab::GetByInxName(pkItemMoney->IM_MoneyIDX);
        v18 = Inventory::GetItemLot(&g_kInventory, v17->ID);
        v19 = pkItemMoney->IM_MoneyLot;
        LOBYTE(bBuyPossible) = 1;
        if ( v19 > v18 )
        {
          ((void (__stdcall *)(D3DXCOLOR *))v6->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
          LOBYTE(bBuyPossible) = 0;
        }
        v20 = (char *)((int (*)(void))v6->m_apkTextWin[*iIndex]->vfptr[121].__vecDelDtor)();
        v21 = (char *)(acStr - v20);
        do
        {
          v22 = *v20;
          v21[(_DWORD)v20] = *v20;
          ++v20;
        }
        while ( v22 );
        PgFont::GetTextSize(pkFont, acStr, strlen(acStr), &kSize);
        v23 = kSize.cx;
        v6->m_uiItemMoneyWidth += kSize.cx;
        if ( iLot > 0 )
        {
          ItemInfoWin::ShowItemMoneyWin(
            v6,
            (int)v16,
            (int)iIndex,
            v23 + 5,
            v6->m_uiEdgeHeight + *iIndex * (v6->m_iFontHeight + 2),
            iLot,
            pkMoneyViewInfo,
            v16,
            bBuyPossible);
          *iIndex += 2;
          ((void (__stdcall *)(const char *))v6->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(" ");
          v24 = v6->m_apkTextWin[*iIndex]->vfptr;
          v25 = TextData3::Get(0x2B2A247Au);
          v24[118].__vecDelDtor((NiRefObject *)v6->m_apkTextWin[*iIndex], (unsigned int)v25);
          v26 = (char *)((int (*)(void))v6->m_apkTextWin[*iIndex]->vfptr[121].__vecDelDtor)();
          v27 = (char *)(acStr - v26);
          do
          {
            v28 = *v26;
            v27[(_DWORD)v26] = *v26;
            ++v26;
          }
          while ( v28 );
          v29 = pkFont;
          PgFont::GetTextSize(pkFont, acStr, strlen(acStr), &kSize);
          v6->m_uiItemMoneyWidth += kSize.cx;
          if ( !(_BYTE)bBuyPossible )
            ((void (__stdcall *)(D3DXCOLOR *))v6->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
          v30 = (char *)((int (*)(void))v6->m_apkTextWin[*iIndex]->vfptr[121].__vecDelDtor)();
          v31 = (char *)(acStr - v30);
          do
          {
            v32 = *v30;
            v31[(_DWORD)v30] = *v30;
            ++v30;
          }
          while ( v32 );
          PgFont::GetTextSize(v29, acStr, strlen(acStr), &kSize);
          v33 = bBuyPossible;
          v34 = pkItemMoney;
          v35 = kSize.cx;
          v6->m_uiItemMoneyWidth += kSize.cx;
          ItemInfoWin::ShowTotalItemMoneyWin(
            v6,
            v35 + 5,
            v6->m_uiEdgeHeight + *iIndex * (v6->m_iFontHeight + 2),
            iLot,
            pkMoneyViewInfo,
            v34,
            v33);
        }
LABEL_42:
        v44 = v6->m_apkTextWin[++*iIndex];
        v44->vfptr[118].__vecDelDtor((NiRefObject *)v44, (unsigned int)" ");
        return;
      }
    }
    else if ( eState == 2 )
    {
      goto LABEL_29;
    }
    if ( eState != 3 )
    {
      ((void (__stdcall *)(D3DXCOLOR *))v6->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
LABEL_31:
      if ( iLot > 0 )
      {
        if ( eState )
        {
          v37 = TextData::Get(0x98A2FCFE);
          sprintf(acStr, (const char *)v37, iLot);
        }
        else
        {
          v36 = TextData::Get(0x3089A194u);
          sprintf(acStr, (const char *)v36, iLot);
        }
        if ( !(_BYTE)bBuyPossible )
          ((void (__stdcall *)(_DWORD))v6->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
        ((void (__stdcall *)(char *))v6->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
        ++*iIndex;
        PgFont::GetTextSize(pkFont, acStr, strlen(acStr), &kSize);
        v38 = kSize.cx + v6->m_uiEdgeWidth;
        v39 = bBuyPossible;
        v40 = v6->m_iFontHeight;
        v6->m_uiMoneyXPos = v38;
        ItemInfoWin::ShowPrivateStoreMoneyWin(
          v6,
          v38 + 7,
          v6->m_uiEdgeHeight + (*iIndex - 1) * (v40 + 2),
          i64Money,
          v39);
      }
      ((void (__stdcall *)(const char *))v6->m_apkTextWin[++*iIndex]->vfptr[118].__vecDelDtor)(" ");
      if ( iLot > 0 )
      {
        v41 = TextData::Get(0x9EB2A8F8);
        sprintf(acStr, "%s", v41);
        if ( !(_BYTE)bBuyPossible )
          ((void (__stdcall *)(_DWORD))v6->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
        ((void (__stdcall *)(char *))v6->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(acStr);
        PgFont::GetTextSize(pkFont, acStr, strlen(acStr), &kSize);
        v42 = kSize.cx + v6->m_uiEdgeWidth;
        v43 = bBuyPossible;
        v6->m_uiTotalMoneyXPos = v42;
        ItemInfoWin::ShowTotalMoneyWin(
          v6,
          v42 + 7,
          v6->m_uiEdgeHeight + *iIndex * (v6->m_iFontHeight + 2),
          iLot * i64Money,
          v43);
      }
      goto LABEL_42;
    }
LABEL_29:
    if ( (signed __int64)User::GetMoney(&g_kUser) < i64Money )
      LOBYTE(bBuyPossible) = 0;
    goto LABEL_31;
  }
}
// A8C298: using guessed type int ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;

//----- (0052B290) --------------------------------------------------------
void __thiscall ItemInfoWin::InsertProductContents(ItemInfoWin *this, Item *pkItem, int *iIndex)
{
  ItemInfo *v3; // eax@2
  ProduceInfo *v4; // esi@3
  int *v5; // edi@4
  const char *v6; // eax@5
  ProduceViewInfo *v7; // eax@9
  NiRefObjectVtbl *v8; // edi@10
  unsigned int v9; // edx@11
  unsigned int *v10; // esi@11
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v11; // eax@11
  ItemInfo *v12; // ecx@12
  const char *v13; // eax@16
  void *v14; // eax@18
  char *v15; // eax@20
  const char *v16; // eax@20
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v17; // [sp-1Ch] [bp-98h]@3
  void *v18; // [sp-Ch] [bp-88h]@3
  int *v19; // [sp-8h] [bp-84h]@3
  D3DXCOLOR *v20; // [sp-4h] [bp-80h]@10
  ItemInfo *pkMaterialItemInfo; // [sp+10h] [bp-6Ch]@12
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v22; // [sp+14h] [bp-68h]@3
  std::vector<unsigned int,std::allocator<unsigned int> > kMaterialCount; // [sp+18h] [bp-64h]@11
  int *nIndex; // [sp+28h] [bp-54h]@1
  ItemInfoWin *v25; // [sp+2Ch] [bp-50h]@1
  unsigned int _Val; // [sp+30h] [bp-4Ch]@11
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > Materials; // [sp+34h] [bp-48h]@11
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v28; // [sp+50h] [bp-2Ch]@5
  int v29; // [sp+78h] [bp-4h]@5

  v25 = this;
  nIndex = iIndex;
  if ( pkItem )
  {
    v3 = pkItem->m_pkInfo;
    if ( v3 )
    {
      v19 = (int *)15;
      v18 = 0;
      v22 = &v17;
      v17._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v17,
        v3->InxName,
        strlen(v3->InxName));
      v4 = ProduceInfoTable::GetByProduct(v17);
      if ( v4 )
      {
        v5 = nIndex;
        if ( *nIndex > 0 )
        {
          v6 = (const char *)(*(int (**)(void))(**((_DWORD **)&v25->m_uiTotalMoneyXPos + *nIndex) + 484))();
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
            &v28,
            v6);
          v29 = 0;
          if ( v28._Mysize > 0
            && std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(&v28, " ") )
          {
            ((void (__stdcall *)(const char *))v25->m_apkTextWin[*v5]->vfptr[118].__vecDelDtor)(" ");
            ++*v5;
          }
          v29 = -1;
          std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v28);
        }
        v7 = ProduceViewInfoTable::GetByMasteryType(v4->MasteryType);
        if ( v7 )
        {
          v8 = v25->m_apkTextWin[*v5]->vfptr;
          v20 = (D3DXCOLOR *)v7->Name;
          v20 = (D3DXCOLOR *)fs("[%s]", v7->Name);
          v8[118].__vecDelDtor((NiRefObject *)v25->m_apkTextWin[*nIndex], (unsigned int)v20);
          v5 = nIndex;
          ((void (__stdcall *)(D3DXCOLOR *))v25->m_apkTextWin[*nIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxGreenColor);
          ++*v5;
        }
        ItemInfoWin::SetTextBeginNewLine(v25, v4->Name, v5, &Color::m_kDxGreenColor);
        *(_DWORD *)&v28._Bx._Alias[12] = 0;
        v28._Mysize = 0;
        v28._Myres = 0;
        v29 = 1;
        _Val = (unsigned int)ItemInfoTab::GetByInxName(v4->Raw0);
        std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
          (std::vector<unsigned long,std::allocator<unsigned long> > *)&v28._Bx._Alias[12],
          &_Val);
        _Val = (unsigned int)ItemInfoTab::GetByInxName(v4->Raw1);
        std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
          (std::vector<unsigned long,std::allocator<unsigned long> > *)&v28._Bx._Alias[12],
          &_Val);
        _Val = (unsigned int)ItemInfoTab::GetByInxName(v4->Raw2);
        std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
          (std::vector<unsigned long,std::allocator<unsigned long> > *)&v28._Bx._Alias[12],
          &_Val);
        _Val = (unsigned int)ItemInfoTab::GetByInxName(v4->Raw3);
        std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
          (std::vector<unsigned long,std::allocator<unsigned long> > *)&v28._Bx._Alias[12],
          &_Val);
        _Val = (unsigned int)ItemInfoTab::GetByInxName(v4->Raw4);
        std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
          (std::vector<unsigned long,std::allocator<unsigned long> > *)&v28._Bx._Alias[12],
          &_Val);
        _Val = (unsigned int)ItemInfoTab::GetByInxName(v4->Raw5);
        std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
          (std::vector<unsigned long,std::allocator<unsigned long> > *)&v28._Bx._Alias[12],
          &_Val);
        _Val = (unsigned int)ItemInfoTab::GetByInxName(v4->Raw6);
        std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
          (std::vector<unsigned long,std::allocator<unsigned long> > *)&v28._Bx._Alias[12],
          &_Val);
        _Val = (unsigned int)ItemInfoTab::GetByInxName(v4->Raw7);
        std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
          (std::vector<unsigned long,std::allocator<unsigned long> > *)&v28._Bx._Alias[12],
          &_Val);
        kMaterialCount._Myfirst = 0;
        kMaterialCount._Mylast = 0;
        kMaterialCount._Myend = 0;
        v9 = v4->Quantity0;
        LOBYTE(v29) = 2;
        _Val = v9;
        std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
          (std::vector<unsigned long,std::allocator<unsigned long> > *)&kMaterialCount,
          &_Val);
        _Val = v4->Quantity1;
        std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
          (std::vector<unsigned long,std::allocator<unsigned long> > *)&kMaterialCount,
          &_Val);
        _Val = v4->Quantity2;
        std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
          (std::vector<unsigned long,std::allocator<unsigned long> > *)&kMaterialCount,
          &_Val);
        _Val = v4->Quantity3;
        std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
          (std::vector<unsigned long,std::allocator<unsigned long> > *)&kMaterialCount,
          &_Val);
        _Val = v4->Quantity4;
        std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
          (std::vector<unsigned long,std::allocator<unsigned long> > *)&kMaterialCount,
          &_Val);
        _Val = v4->Quantity5;
        std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
          (std::vector<unsigned long,std::allocator<unsigned long> > *)&kMaterialCount,
          &_Val);
        _Val = v4->Quantity6;
        std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
          (std::vector<unsigned long,std::allocator<unsigned long> > *)&kMaterialCount,
          &_Val);
        _Val = v4->Quantity7;
        std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
          (std::vector<unsigned long,std::allocator<unsigned long> > *)&kMaterialCount,
          &_Val);
        Materials._Myres = 15;
        Materials._Mysize = 0;
        Materials._Bx._Buf[0] = 0;
        v10 = kMaterialCount._Myfirst;
        v11 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)(*(_DWORD *)&v28._Bx._Alias[12]
                                                                                     - (unsigned int)kMaterialCount._Myfirst);
        LOBYTE(v29) = 3;
        v22 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)(*(_DWORD *)&v28._Bx._Alias[12]
                                                                                     - (unsigned int)kMaterialCount._Myfirst);
        _Val = 8;
        do
        {
          v12 = *(ItemInfo **)((char *)v10 + (_DWORD)v11);
          pkMaterialItemInfo = v12;
          if ( v12 && *v10 )
          {
            if ( Materials._Mysize > 0 )
            {
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&Materials, ", ", 2u);
              v12 = pkMaterialItemInfo;
            }
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
              &Materials,
              v12->Name,
              strlen(v12->Name));
            v13 = fs("(%d)", *v10);
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&Materials, v13, strlen(v13));
            v5 = nIndex;
            v11 = v22;
          }
          ++v10;
          --_Val;
        }
        while ( _Val );
        v14 = Materials._Bx._Ptr;
        if ( Materials._Myres < 0x10 )
          v14 = &Materials;
        v20 = &Color::m_kDxGreenColor;
        v19 = v5;
        v18 = v14;
        v15 = (char *)TextData3::Get(0x829488E5);
        v16 = fs(v15, v18);
        ItemInfoWin::SetTextBeginNewLine(v25, v16, v19, v20);
        if ( Materials._Myres >= 0x10 )
          operator delete(Materials._Bx._Ptr);
        Materials._Myres = 15;
        Materials._Mysize = 0;
        Materials._Bx._Buf[0] = 0;
        if ( kMaterialCount._Myfirst )
          operator delete(kMaterialCount._Myfirst);
        if ( *(_DWORD *)&v28._Bx._Alias[12] )
          operator delete(*(void **)&v28._Bx._Alias[12]);
      }
    }
  }
}

//----- (0052B6F0) --------------------------------------------------------
void __thiscall ItemInfoWin::InsertMaterialContents(ItemInfoWin *this, Item *pkItem, int *iIndex)
{
  ItemInfo *v3; // eax@2
  ItemInfoWin *v4; // ebx@4
  const char *v5; // eax@5
  unsigned int v6; // eax@9
  ProduceViewInfo *v7; // esi@11
  const char *v8; // edx@14
  char *v9; // eax@14
  int v10; // esi@14
  char v11; // cl@15
  NiRefObjectVtbl *v12; // esi@19
  NiUnsharedGeometryGroup *v13; // eax@19
  const char *v14; // eax@19
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v15; // [sp-1Ch] [bp-7Ch]@3
  int v16; // [sp-Ch] [bp-6Ch]@3
  signed int v17; // [sp-8h] [bp-68h]@3
  ItemInfo *v18; // [sp+10h] [bp-50h]@3
  unsigned int i; // [sp+14h] [bp-4Ch]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > str; // [sp+18h] [bp-48h]@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > ProduceSkills; // [sp+34h] [bp-2Ch]@9
  int v22; // [sp+5Ch] [bp-4h]@5

  i = (unsigned int)this;
  if ( pkItem )
  {
    v3 = pkItem->m_pkInfo;
    if ( v3 )
    {
      v17 = 15;
      v16 = 0;
      v18 = (ItemInfo *)&v15;
      v15._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v15,
        v3->InxName,
        strlen(v3->InxName));
      v18 = ProduceInfoTable::GetMaterialInfo(v15);
      if ( v18 )
      {
        v4 = (ItemInfoWin *)i;
        if ( *iIndex > 0 )
        {
          v5 = (const char *)(*(int (**)(void))(**(_DWORD **)(i + 4 * *iIndex + 1212) + 484))();
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
            &str,
            v5);
          v22 = 0;
          if ( str._Mysize > 0
            && std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(&str, " ") )
          {
            ((void (__stdcall *)(const char *))v4->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(" ");
            ++*iIndex;
          }
          std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&str);
        }
        ProduceSkills._Myres = 15;
        ProduceSkills._Mysize = 0;
        ProduceSkills._Bx._Buf[0] = 0;
        v6 = 0;
        v22 = 1;
        i = 0;
        do
        {
          if ( v18->InxName[v6 + 26] )
          {
            v7 = ProduceViewInfoTable::GetByMasteryType((TotalMasteryType)v6);
            if ( v7 )
            {
              if ( ProduceSkills._Mysize )
                std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&ProduceSkills, ", ", 2u);
              v8 = v7->Name;
              v9 = v7->Name;
              v10 = (int)&v7->Name[1];
              do
                v11 = *v9++;
              while ( v11 );
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
                &ProduceSkills,
                v8,
                (unsigned int)&v9[-v10]);
            }
            v6 = i;
          }
          i = ++v6;
        }
        while ( v6 < 7 );
        v12 = v4->m_apkTextWin[*iIndex]->vfptr;
        v13 = TextData3::Get(0xD6DD342A);
        v12[118].__vecDelDtor((NiRefObject *)v4->m_apkTextWin[*iIndex], (unsigned int)v13);
        ((void (__stdcall *)(D3DXCOLOR *))v4->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxGreenColor);
        ++*iIndex;
        v14 = ProduceSkills._Bx._Ptr;
        if ( ProduceSkills._Myres < 0x10 )
          v14 = (const char *)&ProduceSkills;
        ItemInfoWin::SetTextBeginNewLine(v4, v14, iIndex, &Color::m_kDxGreenColor);
        if ( ProduceSkills._Myres >= 0x10 )
          operator delete(ProduceSkills._Bx._Ptr);
      }
    }
  }
}

//----- (0052B8E0) --------------------------------------------------------
void __userpurge ItemInfoWin::InsertDescriptContents(ItemInfoWin *this@<ecx>, int a2@<edi>, ItemViewInfo *pkViewInfo, char nGrade, Item *pkItem, int *iIndex, int iLot)
{
  unsigned __int8 v7; // of@1
  ItemInfo *v8; // edi@2
  char v9; // cl@6
  char v10; // al@6
  char v11; // cl@6
  char v12; // al@6
  char v13; // cl@6
  unsigned int v14; // esi@8
  Skill::LearnProdSkillInfo *v15; // eax@9
  Skill::LearnProdSkillInfo *v16; // edi@9
  ProduceInfo *v17; // eax@9
  PgWinText *v18; // esi@15
  NiRefObjectVtbl *v19; // edi@15
  unsigned int v20; // ST30_4@15
  char *v21; // eax@15
  char *v22; // eax@15
  int v23; // eax@16
  const char *v24; // eax@17
  CClientQuest *v25; // eax@24
  signed int v26; // edi@25
  QUEST_DATA *v27; // eax@26
  QUEST_DATA *v28; // esi@26
  int *v29; // edi@36
  int v30; // ST30_4@36
  int v31; // ST2C_4@36
  char *v32; // eax@36
  char *v33; // eax@36
  const char *v34; // eax@38
  ItemInfoWin *v35; // edi@42
  char *v36; // esi@42
  int v37; // eax@44
  signed int v38; // eax@45
  char *v39; // eax@49
  const char *v40; // eax@52
  PgWinText *v41; // esi@59
  NiRefObjectVtbl *v42; // edi@59
  int v43; // ST30_4@59
  char *v44; // eax@59
  char *v45; // eax@59
  int v46; // eax@59
  int v47; // edi@59
  unsigned __int16 v48; // di@61
  PgWinText *v49; // esi@62
  NiRefObjectVtbl *v50; // edi@62
  NiUnsharedGeometryGroup *v51; // eax@62
  char *v52; // eax@64
  char *v53; // ST30_4@64
  int v54; // esi@65
  int v55; // eax@66
  int v56; // edx@69
  int v57; // eax@73
  int v58; // esi@75
  int v59; // edx@75
  int v60; // eax@76
  int v61; // edx@79
  int *v62; // esi@82
  int v63; // ST30_4@82
  char *v64; // eax@82
  char *v65; // ST30_4@82
  int v66; // edi@83
  int v67; // eax@83
  ItemViewInfo *v68; // esi@85
  MiniHouse *v69; // eax@86
  signed __int64 v70; // rax@88
  int v71; // edi@88
  int v72; // esi@88
  NiUnsharedGeometryGroup *v73; // eax@88
  char *v74; // edx@88
  char v75; // cl@89
  NiUnsharedGeometryGroup *v76; // eax@91
  unsigned int v77; // eax@91
  char *v78; // edi@91
  char v79; // cl@92
  NiUnsharedGeometryGroup *v80; // eax@95
  char *v81; // edx@95
  unsigned int v82; // eax@95
  char *v83; // edi@95
  char v84; // cl@96
  int v85; // esi@102
  int v86; // eax@102
  long double v87; // st7@102
  signed int v88; // eax@102
  NiUnsharedGeometryGroup *v89; // eax@102
  char *v90; // esi@102
  char v91; // cl@103
  NiUnsharedGeometryGroup *v92; // eax@105
  unsigned int v93; // eax@105
  char *v94; // edi@105
  char v95; // cl@106
  NiUnsharedGeometryGroup *v96; // eax@109
  unsigned int v97; // eax@109
  char *v98; // edi@109
  char v99; // cl@110
  int v100; // edi@112
  NiUnsharedGeometryGroup *v101; // eax@113
  unsigned int v102; // eax@113
  char *v103; // edi@113
  char v104; // cl@114
  NiUnsharedGeometryGroup *v105; // eax@119
  NiUnsharedGeometryGroup *v106; // edx@119
  char v107; // cl@120
  unsigned int v108; // eax@121
  char *v109; // edi@121
  char v110; // cl@122
  char *v111; // edi@123
  char *v112; // esi@123
  char v113; // cl@123
  int v114; // eax@123
  MiniHouseFurniture *v115; // eax@126
  GameType v116; // edx@126
  ItemInfoWin *v117; // esi@128
  PgFont *v118; // edi@128
  int v119; // eax@128
  int v120; // edx@128
  __int64 v121; // ST28_8@128
  signed int v122; // edi@138
  MoverItem *v123; // eax@138
  MoverMain *v124; // eax@139
  RIDING *v125; // eax@141
  bool v126; // zf@142
  bool v127; // sf@142
  int v128; // esi@146
  int v129; // edi@146
  NiUnsharedGeometryGroup *v130; // eax@146
  char *v131; // edx@146
  char v132; // cl@147
  NiUnsharedGeometryGroup *v133; // eax@149
  unsigned int v134; // eax@149
  char *v135; // edi@149
  char v136; // cl@150
  NiUnsharedGeometryGroup *v137; // eax@153
  char v138; // cl@154
  Item *v139; // esi@158
  ItemInfoWin *v140; // edi@158
  ShineDateTime *v141; // eax@160
  ShineDateTime v142; // ecx@160
  int v143; // eax@160
  int v144; // eax@164
  const char *v145; // eax@171
  ItemInfo *v146; // esi@177
  NiUnsharedGeometryGroup *v147; // ST34_4@181
  NiUnsharedGeometryGroup *v148; // ST30_4@181
  NiUnsharedGeometryGroup *v149; // ST34_4@182
  NiUnsharedGeometryGroup *v150; // ST30_4@182
  NiRefObjectVtbl *v151; // esi@183
  NiUnsharedGeometryGroup *v152; // eax@183
  NiUnsharedGeometryGroup *v153; // ST34_4@187
  NiUnsharedGeometryGroup *v154; // ST30_4@187
  NiUnsharedGeometryGroup *v155; // ST34_4@188
  NiUnsharedGeometryGroup *v156; // ST30_4@188
  const char *v157; // eax@181
  NiRefObjectVtbl *v158; // esi@190
  NiUnsharedGeometryGroup *v159; // eax@190
  ItemInfo *v160; // eax@193
  char *v161; // eax@194
  ActiveSkillInfo *v162; // eax@195
  double v163; // st7@196
  NiRefObjectVtbl *v164; // esi@197
  char *v165; // ST30_4@197
  NiUnsharedGeometryGroup *v166; // eax@197
  char *v167; // eax@197
  NiRefObjectVtbl **v168; // esi@199
  NiRefObjectVtbl *v169; // edi@199
  unsigned int v170; // ST30_4@199
  NiUnsharedGeometryGroup *v171; // eax@199
  char *v172; // eax@199
  const char *v173; // eax@200
  int v174; // [sp-Ch] [bp-7E8h]@63
  NiUnsharedGeometryGroup *v175; // [sp-8h] [bp-7E4h]@63
  int v176; // [sp-4h] [bp-7E0h]@2
  int iMinute; // [sp+Ch] [bp-7D0h]@2
  int iMinutea; // [sp+Ch] [bp-7D0h]@99
  int iMinuteb; // [sp+Ch] [bp-7D0h]@102
  ProduceInfo *iDay; // [sp+10h] [bp-7CCh]@7
  int iDaya; // [sp+10h] [bp-7CCh]@25
  int iDayb; // [sp+10h] [bp-7CCh]@102
  tagSIZE kSize; // [sp+14h] [bp-7C8h]@8
  Item *v184; // [sp+1Ch] [bp-7C0h]@1
  int iHour; // [sp+20h] [bp-7BCh]@2
  ItemInfoWin *v186; // [sp+24h] [bp-7B8h]@1
  SHINE_ITEM_STRUCT kStruct; // [sp+28h] [bp-7B4h]@58
  tm TimeRL; // [sp+90h] [bp-74Ch]@102
  tm tb; // [sp+B4h] [bp-728h]@6
  char strResult[1024]; // [sp+D8h] [bp-704h]@85
  char acStr[256]; // [sp+4D8h] [bp-304h]@2
  char strDay[255]; // [sp+5D8h] [bp-204h]@85
  char strHour[255]; // [sp+6D8h] [bp-104h]@85

  v7 = __OFSUB__(*iIndex, 80);
  v127 = *iIndex - 80 < 0;
  v186 = this;
  v184 = pkItem;
  if ( !(v127 ^ v7) )
    return;
  v176 = a2;
  acStr[0] = 0;
  memset(&acStr[1], 0, 0xFFu);
  v8 = 0;
  iMinute = 0;
  iHour = 0;
  if ( pkItem )
  {
    v8 = pkItem->m_pkInfo;
    iMinute = (int)v8;
    if ( v8 )
    {
      if ( v8->Class == 11 && !strcmp(v8->ItemUseSkill, "UseSkill") )
      {
        v9 = v8->InxName[1];
        tb.tm_min = 0;
        tb.tm_hour = 0;
        tb.tm_mday = 0;
        tb.tm_mon = 0;
        tb.tm_year = 0;
        tb.tm_wday = 0;
        tb.tm_yday = 0;
        tb.tm_isdst = 0;
        tb.tm_min = v8->InxName[0];
        HIWORD(tb.tm_min) = v8->InxName[2];
        v10 = v8->InxName[4];
        BYTE1(tb.tm_min) = v9;
        v11 = v8->InxName[3];
        LOBYTE(tb.tm_hour) = v10;
        v12 = v8->InxName[6];
        BYTE3(tb.tm_min) = v11;
        v13 = v8->InxName[5];
        BYTE2(tb.tm_hour) = v12;
        BYTE1(tb.tm_hour) = v13;
        if ( !strcmp((const char *)&tb.tm_min, "Recipe_") )
        {
          iDay = ProduceInfoTable::GetByNeedMasteryGain(v8->InxName);
          if ( iDay )
          {
            v14 = 0;
            kSize.cy = Skill::GetTotalLearnProductSkill();
            if ( kSize.cy )
            {
              do
              {
                v15 = Skill::GetLearnProductSkill(v14);
                v16 = v15;
                v17 = ProduceInfoTable::GetByID(v15->kSkillID);
                if ( v17 && iDay->MasteryType == v17->MasteryType )
                  iHour += v16->kSkillExp;
                ++v14;
              }
              while ( v14 < kSize.cy );
            }
            if ( iDay->NeededMasteryGain > iHour )
              ((void (__stdcall *)(D3DXCOLOR *))v186->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
            v18 = v186->m_apkTextWin[*iIndex];
            v19 = v18->vfptr;
            v20 = iDay->NeededMasteryGain;
            v21 = (char *)TextData::Get(0x957C6FFD);
            v22 = fs(v21, v20);
            v19[118].__vecDelDtor((NiRefObject *)v18, (unsigned int)v22);
            ++*iIndex;
            v8 = (ItemInfo *)iMinute;
          }
        }
      }
    }
  }
  v23 = *iIndex;
  if ( *iIndex <= 0 )
  {
    v186->m_apkTextWin[v23]->vfptr[118].__vecDelDtor((NiRefObject *)v186->m_apkTextWin[v23], (unsigned int)" ");
    goto LABEL_21;
  }
  v24 = (const char *)(*(int (__thiscall **)(_DWORD))(**((_DWORD **)&v186->m_uiTotalMoneyXPos + v23) + 484))(*(&v186->m_uiTotalMoneyXPos + v23));
  if ( v24 && strcmp(v24, " ") )
  {
    ((void (__stdcall *)(const char *))v186->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(" ");
LABEL_21:
    ++*iIndex;
  }
  if ( v8 && v8->Type == 4 )
  {
    v25 = QuestDataMgr::GetQuest();
    if ( v25 )
    {
      v26 = 0;
      iHour = (int)v25->m_pQuestData;
      iDaya = 0;
      if ( CQuestData::GetNumOfQuestData((CQuestData *)iHour) > 0u )
      {
        do
        {
          v27 = CQuestData::GetQuestDataByIndex((CQuestData *)iHour, v26);
          v28 = v27;
          if ( v27 && v27->Start.bItem && !v27->Start.bNPC && v27->Start.ItemID == v184->m_kStruct.itemid )
          {
            if ( v27->Start.LevelMin > User::Lv(&g_kUser) || User::Lv(&g_kUser) > v28->Start.LevelMax )
              ((void (__stdcall *)(D3DXCOLOR *))v186->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
            if ( User::Lv(&g_kUser) >= v28->Start.LevelMin && User::Lv(&g_kUser) <= v28->Start.LevelMax )
              ((void (__stdcall *)(D3DXCOLOR *))v186->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
            v29 = (int *)v186->m_apkTextWin[*iIndex];
            v30 = v28->Start.LevelMax;
            v31 = v28->Start.LevelMin;
            kSize.cy = *v29;
            v32 = (char *)TextData2::Get(0x7EAA8B9Fu);
            v33 = fs(v32, v31, v30);
            (*(void (__thiscall **)(int *, char *))(kSize.cy + 472))(v29, v33);
            ++*iIndex;
            v26 = iDaya;
          }
          iDaya = ++v26;
        }
        while ( v26 < CQuestData::GetNumOfQuestData((CQuestData *)iHour) );
      }
    }
    v34 = (const char *)(*(int (**)(void))(**((_DWORD **)&v186->m_uiTotalMoneyXPos + *iIndex) + 484))();
    if ( v34 && *iIndex > 0 && !strcmp(v34, " ") )
    {
      ((void (__stdcall *)(const char *))v186->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(" ");
      ++*iIndex;
    }
  }
  v35 = v186;
  v36 = pkViewInfo->Descript;
  if ( pkViewInfo->Descript[0] != 45 )
  {
    kSize.cy = *(_DWORD *)(((int (*)(void))v186->m_apkTextWin[0]->vfptr[114].__vecDelDtor)() + 192);
    memset(acStr, 0, 0x100u);
    while ( *iIndex < 80 )
    {
      v37 = PgUtil::StringPixelCopy(acStr, v36, (HDC__ *)kSize.cy, v35->m_iItemNameLength);
      if ( !v37 )
        break;
      acStr[v37] = 0;
      v36 += v37;
      v38 = 0;
      if ( acStr[0] == 32 )
      {
        do
        {
          if ( !acStr[v38] )
            break;
          if ( v38 >= 64 )
            break;
          ++v38;
        }
        while ( acStr[v38] == 32 );
      }
      v39 = &acStr[v38];
      if ( v39 )
      {
        ((void (__stdcall *)(char *))v35->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(v39);
        ++*iIndex;
      }
      memset(acStr, 0, 0x100u);
    }
  }
  v40 = (const char *)(*(int (**)(void))(**((_DWORD **)&v35->m_uiTotalMoneyXPos + *iIndex) + 484))();
  if ( v40 && *iIndex > 0 && strcmp(v40, " ") )
  {
    ((void (__stdcall *)(const char *))v35->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(" ");
    ++*iIndex;
  }
  if ( !v184 )
    goto LABEL_158;
  if ( (unsigned __int8)((int (*)(void))v184->vfptr[1].__vecDelDtor)() == 13 )
  {
    qmemcpy(&kStruct, &v184->m_kStruct, sizeof(kStruct));
    if ( (unsigned __int8)(*(_DWORD *)&kStruct.itemid >> 16) )
    {
      v41 = v186->m_apkTextWin[*iIndex];
      v42 = v41->vfptr;
      v43 = (unsigned __int8)(*(_DWORD *)&kStruct.itemid >> 16);
      v44 = (char *)TextData::Get(0xA0A48F88);
      v45 = fs(v44, v43);
      v42[118].__vecDelDtor((NiRefObject *)v41, (unsigned int)v45);
      v46 = (unsigned __int8)kStruct.itemattr.blot.lot;
      ++*iIndex;
      v47 = 0;
      iHour = 0;
      if ( v46 > 0 )
      {
        do
        {
          if ( v47 )
          {
            v57 = *(&kStruct.itemattr.furniture.furnicherID + 5 * v47);
            if ( (_WORD)v57 != -1 )
            {
              v58 = ITableBase<MapInfo,MapInfoTab>::ms_pkTable;
              v59 = *(_DWORD *)ITableBase<MapInfo,MapInfoTab>::ms_pkTable;
              kSize.cy = *(&kStruct.itemattr.furniture.furnicherID + 5 * v47);
              if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(v59 + 16))(
                                      ITableBase<MapInfo,MapInfoTab>::ms_pkTable,
                                      v57) )
              {
                if ( LOWORD(kSize.cy) <= *(_WORD *)(v58 + 200) )
                {
                  v61 = *(_DWORD *)(v58 + 196);
                  if ( *(_DWORD *)(v61 + 4 * LOWORD(kSize.cy)) )
                    v60 = *(_DWORD *)(v61 + 4 * LOWORD(kSize.cy));
                  else
                    v60 = 0;
                }
                else
                {
                  v60 = 0;
                }
              }
              else
              {
                v60 = 0;
              }
              v62 = (int *)v186->m_apkTextWin[*iIndex];
              v63 = v60 + 14;
              kSize.cy = *v62;
              v64 = (char *)TextData::Get(0x333C156Du);
              v65 = fs(v64, v47 + 1, v63);
              (*(void (__thiscall **)(int *, char *))(kSize.cy + 472))(v62, v65);
              goto LABEL_83;
            }
            v49 = v186->m_apkTextWin[*iIndex];
            v50 = v49->vfptr;
            v175 = TextData::Get(0x9BEBE5D9);
            v174 = iHour + 1;
          }
          else
          {
            v48 = kStruct.itemattr.furniture.furnicherID;
            if ( kStruct.itemattr.furniture.furnicherID == -1 )
            {
              v49 = v186->m_apkTextWin[*iIndex];
              v50 = v49->vfptr;
              v51 = TextData::Get(0x9BEBE5D9);
            }
            else
            {
              v54 = ITableBase<MapInfo,MapInfoTab>::ms_pkTable;
              if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<MapInfo,MapInfoTab>::ms_pkTable
                                                                       + 16))(
                                      ITableBase<MapInfo,MapInfoTab>::ms_pkTable,
                                      *(unsigned int *)((char *)&kStruct.itemattr.Capsule.content.dwrdkey[0] + 1)) )
              {
                if ( v48 <= *(_WORD *)(v54 + 200) )
                {
                  v56 = *(_DWORD *)(v54 + 196);
                  if ( *(_DWORD *)(v56 + 4 * v48) )
                    v55 = *(_DWORD *)(v56 + 4 * v48);
                  else
                    v55 = 0;
                }
                else
                {
                  v55 = 0;
                }
              }
              else
              {
                v55 = 0;
              }
              v49 = v186->m_apkTextWin[*iIndex];
              v50 = v49->vfptr;
              v51 = (NiUnsharedGeometryGroup *)(v55 + 14);
            }
            v175 = v51;
            v174 = 1;
          }
          v52 = (char *)TextData::Get(0x333C156Du);
          v53 = fs(v52, v174, v175);
          v50[118].__vecDelDtor((NiRefObject *)v49, (unsigned int)v53);
LABEL_83:
          v66 = iHour;
          v67 = (unsigned __int8)kStruct.itemattr.blot.lot;
          ++*iIndex;
          v47 = v66 + 1;
          iHour = v47;
        }
        while ( v47 < v67 );
      }
    }
  }
  if ( (unsigned __int8)((int (__thiscall *)(Item *))v184->vfptr[1].__vecDelDtor)(v184) == 18 )
  {
    strDay[0] = 0;
    memset(&strDay[1], 0, 0xFEu);
    strHour[0] = 0;
    memset(&strHour[1], 0, 0xFEu);
    strResult[0] = 0;
    memset(&strResult[1], 0, 0x3FFu);
    v68 = v184->m_pkViewInfo;
    if ( !v68 )
      goto LABEL_158;
    v69 = MiniHouseTable::GetByInxName(v68->InxName);
    if ( !v69 || !v69->KeepTime_Hour )
      goto LABEL_158;
    v70 = v69->KeepTime_Hour;
    v71 = v70 % 24;
    kSize.cy = v70 % 24;
    v72 = v70 / 24;
    v73 = TextData::Get(0xC1D8D332);
    v74 = (char *)(strResult - (char *)v73);
    do
    {
      v75 = (char)v73->vfptr;
      v74[(_DWORD)v73] = (char)v73->vfptr;
      v73 = (NiUnsharedGeometryGroup *)((char *)v73 + 1);
    }
    while ( v75 );
    if ( v72 > 0 )
    {
      v76 = TextData::Get(0x97BEF4E9);
      sprintf(strDay, (const char *)v76, v72);
      v77 = strlen(strDay) + 1;
      v78 = (char *)&tb.tm_isdst + 3;
      do
        v79 = (v78++)[1];
      while ( v79 );
      qmemcpy(v78, strDay, v77);
      v71 = kSize.cy;
    }
    if ( v71 <= 0 )
      goto LABEL_156;
    v80 = TextData::Get(0xA703F2F6);
    sprintf(strHour, (const char *)v80, v71);
    v81 = strHour;
    v82 = strlen(strHour) + 1;
    v83 = (char *)&tb.tm_isdst + 3;
    do
      v84 = (v83++)[1];
    while ( v84 );
LABEL_155:
    qmemcpy(v83, v81, v82);
LABEL_156:
    ((void (__stdcall *)(char *))v186->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(strResult);
LABEL_157:
    ++*iIndex;
    goto LABEL_158;
  }
  if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v184->vfptr[1].__vecDelDtor)(v184) != 29 )
  {
    if ( (unsigned __int8)((int (__thiscall *)(Item *))v184->vfptr[1].__vecDelDtor)(v184) == 9 )
    {
      qmemcpy(&kStruct, &v184->m_kStruct, sizeof(kStruct));
      v115 = MiniHouseFuritureInfoTab::GetObjByName(pkViewInfo->InxName);
      v116 = v115->GameType;
      if ( v116 || strcmp(v115->InvenType, "MINIGAME") )
      {
        if ( v116 == 1
          && (BYTE3(kStruct.itemattr.dlot.lot)
           || *(unsigned int *)((char *)&kStruct.itemattr.Capsule.content.dwrdkey[0] + 3) & 0xFFFFFF00)
          && BYTE3(kStruct.itemattr.dlot.lot) != 255 )
        {
          if ( v186->RemainTimeUpdate <= 0.0 )
            *iIndex = ItemInfoWin::DisplayItemDurationDirectTime(
                        v186,
                        *iIndex,
                        *(ShineDateTime *)((char *)&kStruct.itemattr.dlot.lot + 3));
          else
            *iIndex = ItemInfoWin::DisplayItemDurationBackupTime(v186, *iIndex);
        }
      }
      else
      {
        strHour[0] = 0;
        memset(&strHour[1], 0, 0xFFu);
        v117 = v186;
        v118 = (PgFont *)((int (*)(void))v186->m_apkTextWin[0]->vfptr[114].__vecDelDtor)();
        ((void (__stdcall *)(char *))v186->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(strHour);
        ++*iIndex;
        PgFont::GetTextSize(v118, strHour, strlen(strHour), &kSize);
        v119 = kSize.cx + v117->m_uiEdgeWidth;
        v120 = v117->m_iFontHeight;
        v121 = kStruct.itemattr.furniture.nRewardMoney;
        v117->m_uiMoneyXPos = v119;
        ItemInfoWin::ShowPrivateStoreMoneyWin(
          v117,
          v119 + 7,
          v117->m_uiEdgeHeight + (*iIndex - 1) * (v120 + 2),
          v121,
          1);
      }
      goto LABEL_158;
    }
    if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v184->vfptr[1].__vecDelDtor)(v184) != 23 || !iMinute )
      goto LABEL_158;
    v122 = 0;
    v123 = MoverItemTab::GetByItemIdx((const char *)(iMinute + 2));
    if ( v123 )
    {
      v124 = MoverMainTab::GetByMoverIdx(v123->MoverIDX);
      if ( v124 )
        v122 = v124->DurationHour;
    }
    v125 = RidePetTable::GetByInxName((char *)(iMinute + 2));
    if ( v125 )
    {
      v126 = v122 == 0;
      v127 = v122 < 0;
      if ( v122 )
      {
LABEL_145:
        if ( v127 || v126 )
          goto LABEL_158;
        strHour[0] = 0;
        memset(&strHour[1], 0, 0xFEu);
        strDay[0] = 0;
        memset(&strDay[1], 0, 0xFEu);
        strResult[0] = 0;
        memset(&strResult[1], 0, 0x3FFu);
        v128 = v122 / 24;
        v129 = v122 % 24;
        kSize.cy = v129;
        v130 = TextData::Get(0xC1D8D332);
        v131 = (char *)(strResult - (char *)v130);
        do
        {
          v132 = (char)v130->vfptr;
          v131[(_DWORD)v130] = (char)v130->vfptr;
          v130 = (NiUnsharedGeometryGroup *)((char *)v130 + 1);
        }
        while ( v132 );
        if ( v128 > 0 )
        {
          v133 = TextData::Get(0x97BEF4E9);
          sprintf(strHour, (const char *)v133, v128);
          v134 = strlen(strHour) + 1;
          v135 = (char *)&tb.tm_isdst + 3;
          do
            v136 = (v135++)[1];
          while ( v136 );
          qmemcpy(v135, strHour, v134);
          v129 = kSize.cy;
        }
        if ( v129 <= 0 )
          goto LABEL_156;
        v137 = TextData::Get(0xA703F2F6);
        sprintf(strDay, (const char *)v137, v129);
        v81 = strDay;
        v82 = strlen(strDay) + 1;
        v83 = (char *)&tb.tm_isdst + 3;
        do
          v138 = (v83++)[1];
        while ( v138 );
        goto LABEL_155;
      }
      v122 = v125->UseTime;
    }
    v126 = v122 == 0;
    v127 = v122 < 0;
    goto LABEL_145;
  }
  qmemcpy(&kStruct, &v184->m_kStruct, sizeof(kStruct));
  iMinutea = (unsigned __int8)kStruct.itemattr.amulet.upgrade;
  if ( (kStruct.itemattr.amulet.upgrade || *(_DWORD *)((char *)&kStruct.itemattr.armor.deletetime + 1) & 0xFFFFFF00)
    && (unsigned __int8)kStruct.itemattr.amulet.upgrade != 255 )
  {
    strHour[0] = 0;
    memset(&strHour[1], 0, 0xFEu);
    strDay[0] = 0;
    memset(&strDay[1], 0, 0xFEu);
    strResult[0] = 0;
    memset(&strResult[1], 0, 0x3FFu);
    qmemcpy(&TimeRL, &Timer::ms_dLastServerTime, sizeof(TimeRL));
    v85 = _mktime32(&TimeRL);
    tb.tm_year = iMinutea + 100;
    tb.tm_mon = ((*(unsigned int *)((char *)&kStruct.itemattr.armor.deletetime + 1) >> 8) & 0x1F) - 1;
    tb.tm_mday = (*(unsigned int *)((char *)&kStruct.itemattr.armor.deletetime + 1) >> 13) & 0x3F;
    tb.tm_hour = (*(unsigned int *)((char *)&kStruct.itemattr.armor.deletetime + 1) >> 19) & 0x3F;
    tb.tm_min = *(unsigned int *)((char *)&kStruct.itemattr.armor.deletetime + 1) >> 25;
    tb.tm_sec = 0;
    v86 = _mktime32(&tb);
    v87 = _difftime32(v86, v85);
    iDayb = (signed int)(v87 / 86400.0);
    v88 = (signed int)(v87 / 3600.0);
    iHour = v88 % 24;
    kSize.cy = 3600 * (v88 % 24);
    iMinuteb = (signed int)(v87 - (double)(86400 * iDayb) - (double)kSize.cy) / 60;
    v89 = TextData::Get(0x27444090u);
    v90 = (char *)(strResult - (char *)v89);
    do
    {
      v91 = (char)v89->vfptr;
      v90[(_DWORD)v89] = (char)v89->vfptr;
      v89 = (NiUnsharedGeometryGroup *)((char *)v89 + 1);
    }
    while ( v91 );
    if ( iDayb > 0 )
    {
      v92 = TextData::Get(0x97BEF4E9);
      sprintf(strHour, (const char *)v92, iDayb);
      v93 = strlen(strHour) + 1;
      v94 = (char *)&tb.tm_isdst + 3;
      do
        v95 = (v94++)[1];
      while ( v95 );
      qmemcpy(v94, strHour, v93);
    }
    if ( iHour > 0 )
    {
      v96 = TextData::Get(0xA703F2F6);
      sprintf(strDay, (const char *)v96, iHour);
      v97 = strlen(strDay) + 1;
      v98 = (char *)&tb.tm_isdst + 3;
      do
        v99 = (v98++)[1];
      while ( v99 );
      qmemcpy(v98, strDay, v97);
    }
    v100 = iMinuteb;
    if ( iMinuteb > 0 )
    {
      v101 = TextData::Get(0xF507F634);
      sprintf(strDay, (const char *)v101, iMinuteb);
      v102 = strlen(strDay) + 1;
      v103 = (char *)&tb.tm_isdst + 3;
      do
        v104 = (v103++)[1];
      while ( v104 );
      qmemcpy(v103, strDay, v102);
      v100 = iMinuteb;
    }
    ((void (__stdcall *)(_DWORD))v186->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
    if ( iDayb > 0 || iHour > 0 || v100 > 0 )
    {
      ((void (__cdecl *)(char *))v186->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(strResult);
    }
    else
    {
      v105 = TextData2::Get(0xA5A4A8EF);
      v106 = v105;
      do
      {
        v107 = (char)v105->vfptr;
        v105 = (NiUnsharedGeometryGroup *)((char *)v105 + 1);
      }
      while ( v107 );
      v108 = (char *)v105 - (char *)v106;
      v109 = (char *)&tb.tm_isdst + 3;
      do
        v110 = (v109++)[1];
      while ( v110 );
      qmemcpy(v109, v106, 4 * (v108 >> 2));
      v112 = (char *)v106 + 4 * (v108 >> 2);
      v111 = &v109[4 * (v108 >> 2)];
      v113 = v108;
      v114 = *iIndex;
      qmemcpy(v111, v112, v113 & 3);
      ((void (__cdecl *)(char *))v186->m_apkTextWin[v114]->vfptr[118].__vecDelDtor)(strResult);
    }
    goto LABEL_157;
  }
LABEL_158:
  v139 = v184;
  v140 = v186;
  ItemInfoWin::InsertProductContents(v186, v184, iIndex);
  ItemInfoWin::InsertMaterialContents(v140, v139, iIndex);
  if ( v139 )
  {
    if ( ((int (__thiscall *)(Item *))v139->vfptr[11].__vecDelDtor)(v139) )
    {
      v141 = (ShineDateTime *)((int (__thiscall *)(Item *))v139->vfptr[11].__vecDelDtor)(v139);
      v142 = *v141;
      v143 = (unsigned __int8)*(_DWORD *)v141;
      if ( (v143 || *(_DWORD *)&v142 & 0xFFFFFF00) && v143 != 255 )
      {
        if ( v140->RemainTimeUpdate <= 0.0 )
          v144 = ItemInfoWin::DisplayItemDurationDirectTime(v140, *iIndex, v142);
        else
          v144 = ItemInfoWin::DisplayItemDurationBackupTime(v140, *iIndex);
        *iIndex = v144;
      }
    }
  }
  if ( nGrade && v139 && (unsigned __int8)((int (__thiscall *)(Item *))v139->vfptr[1].__vecDelDtor)(v139) == 23 )
    ItemInfoWin::InsertMoverUpgradeContents(v140, v139->m_pkInfo, nGrade, iIndex);
  v145 = (const char *)(*(int (**)(void))(**((_DWORD **)&v140->m_uiTotalMoneyXPos + *iIndex) + 484))();
  if ( v145 && *iIndex > 0 )
  {
    if ( strcmp(v145, " ") )
    {
      ((void (__stdcall *)(const char *))v140->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(" ");
      ++*iIndex;
    }
    v139 = v184;
  }
  if ( !v139 )
    goto LABEL_200;
  v146 = v184->m_pkInfo;
  if ( v146 )
  {
    ((void (__stdcall *)(D3DXCOLOR *, int))v140->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(
      &Color::m_kDxRedColor,
      v176);
    if ( CItemAuthorityBase::IA_IsDataChrBelonged(&g_kItemAuthority, v146->BT_Inx) )
    {
      if ( CItemAuthorityBase::IA_IsDataPutOnBelonged(&g_kItemAuthority, v146->BT_Inx) )
      {
        if ( Item::GetPutOnBelongState(v184) )
        {
          v149 = TextData2::Get(0xE004343E);
          v150 = TextData2::Get(0xF64F3F3F);
          v157 = fs("%s (%s)", v150, v149);
        }
        else
        {
          v147 = TextData2::Get(0x2E63888Du);
          v148 = TextData2::Get(0xF64F3F3F);
          v157 = fs("%s (%s)", v148, v147);
        }
LABEL_189:
        ItemInfoWin::SetTextBeginNewLine(v140, v157, iIndex, &Color::m_kDxRedColor);
        goto LABEL_192;
      }
      v151 = v140->m_apkTextWin[*iIndex]->vfptr;
      kSize.cy = (int)v140->m_apkTextWin[*iIndex];
      v152 = TextData2::Get(0x8AA2A8FA);
      v151[118].__vecDelDtor((NiRefObject *)kSize.cy, (unsigned int)v152);
    }
    else
    {
      if ( !CItemAuthorityBase::IA_IsDataAccBelonged(&g_kItemAuthority, v146->BT_Inx) )
      {
LABEL_192:
        ((void (__cdecl *)(D3DXCOLOR *))v140->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
        goto LABEL_193;
      }
      if ( CItemAuthorityBase::IA_IsDataPutOnBelonged(&g_kItemAuthority, v146->BT_Inx) )
      {
        if ( Item::GetPutOnBelongState(v184) )
        {
          v155 = TextData2::Get(0xE004343E);
          v156 = TextData2::Get(0xF6403A3D);
          v157 = fs("%s (%s)", v156, v155);
        }
        else
        {
          v153 = TextData2::Get(0x2E63888Du);
          v154 = TextData2::Get(0xF6403A3D);
          v157 = fs("%s (%s)", v154, v153);
        }
        goto LABEL_189;
      }
      v158 = v140->m_apkTextWin[*iIndex]->vfptr;
      kSize.cy = (int)v140->m_apkTextWin[*iIndex];
      v159 = TextData2::Get(0x85A0A8EB);
      v158[118].__vecDelDtor((NiRefObject *)kSize.cy, (unsigned int)v159);
    }
    ++*iIndex;
    goto LABEL_192;
  }
LABEL_193:
  v160 = v184->m_pkInfo;
  if ( v160 )
  {
    v161 = v160->ItemUseSkill;
    if ( *v161 != 45 )
    {
      v162 = ActSkillInfoTab::GetByInxName(v161);
      if ( v162 )
      {
        v163 = Skill::GetLastCoolTime(v162->ID) * 1000.0;
        kSize = (tagSIZE)(signed __int64)v163;
        if ( (unsigned int)(signed __int64)v163 )
        {
          v164 = v140->m_apkTextWin[*iIndex]->vfptr;
          kSize.cy = (int)v140->m_apkTextWin[*iIndex];
          v165 = GetLastCoolTimeStr((signed __int64)v163);
          v166 = TextData::Get(0x3C4F342Cu);
          v167 = fs("%s: %s", v166, v165);
          v164[118].__vecDelDtor((NiRefObject *)kSize.cy, (unsigned int)v167);
          ++*iIndex;
        }
      }
    }
  }
  if ( (unsigned __int8)((int (*)(void))v184->vfptr[1].__vecDelDtor)() == 24 )
  {
    v168 = &v140->m_apkTextWin[*iIndex]->vfptr;
    v169 = *v168;
    v170 = v184->m_kStruct.itemattr.dlot.lot;
    v171 = TextData::Get(0x3C2F4A36u);
    v172 = fs("%s %d", v171, v170);
    v169[118].__vecDelDtor((NiRefObject *)v168, (unsigned int)v172);
    ++*iIndex;
    v140 = v186;
  }
LABEL_200:
  v173 = (const char *)(*(int (**)(void))(**((_DWORD **)&v140->m_uiTotalMoneyXPos + *iIndex) + 484))();
  if ( v173 && *iIndex > 0 )
  {
    if ( strcmp(v173, " ") )
    {
      ((void (__stdcall *)(const char *))v140->m_apkTextWin[*iIndex]->vfptr[118].__vecDelDtor)(" ");
      ++*iIndex;
    }
  }
}
// 52B8E0: could not find valid save-restore pair for edi
// A89D38: using guessed type int ITableBase<MapInfo,MapInfoTab>::ms_pkTable;

//----- (0052CE00) --------------------------------------------------------
void __userpurge ItemInfoWin::SetBasicItemInfo(ItemInfoWin *this@<ecx>, int a2@<edi>, int iItemID, int iItemUpgrade, int iLot, int *rkIndex, Item *pkItem)
{
  ItemInfoWin *v7; // esi@1
  int v8; // ST14_4@2
  int v9; // ebx@2
  unsigned __int16 v10; // di@2
  ItemInfo *v11; // ebx@3
  int v12; // edx@6
  _DWORD *v13; // eax@13
  Item *v14; // edi@18
  int v15; // edi@18
  const char *v16; // eax@18
  ItemInfoWin::sNameContentsParameter Parameter; // [sp+4h] [bp-18h]@18
  int iIndex; // [sp+18h] [bp-4h]@2
  ItemViewInfo *pkViewInfo; // [sp+24h] [bp+8h]@9
  ItemViewInfo *pkViewInfoa; // [sp+24h] [bp+8h]@10

  v7 = this;
  if ( *rkIndex < 80 )
  {
    v8 = a2;
    iIndex = 0;
    User::GetMainCharClass(&g_kUser);
    v9 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    v10 = iItemID;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                               + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            iItemID,
                            v8) )
    {
      if ( (unsigned __int16)iItemID <= *(_WORD *)(v9 + 200) )
      {
        v12 = *(_DWORD *)(v9 + 196);
        v11 = (ItemInfo *)(*(_DWORD *)(v12 + 4 * (unsigned __int16)iItemID) ? *(_DWORD *)(v12
                                                                                        + 4 * (unsigned __int16)iItemID) : 0);
      }
      else
      {
        v11 = 0;
      }
    }
    else
    {
      v11 = 0;
    }
    pkViewInfo = (ItemViewInfo *)ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable + 16))() )
    {
      if ( v10 <= *(_WORD *)&pkViewInfo->LinkFile[30] )
      {
        v13 = (_DWORD *)(*(_DWORD *)&pkViewInfo->LinkFile[26] + 4 * v10);
        pkViewInfoa = (ItemViewInfo *)(*v13 ? *v13 : 0);
      }
      else
      {
        pkViewInfoa = 0;
      }
    }
    else
    {
      pkViewInfoa = 0;
    }
    v7->m_pkItem = 0;
    v7->m_pkItemInfo = 0;
    if ( v11 )
    {
      if ( pkViewInfoa )
      {
        v14 = pkItem;
        Parameter.bNPCShop = 0;
        Parameter.pkViewInfo = pkViewInfoa;
        Parameter.iItemUpgrade = iItemUpgrade;
        Parameter.pkInfo = v11;
        Parameter.pkItem = pkItem;
        ItemInfoWin::InsertNameContents(v7, &Parameter, &iIndex);
        ItemInfoWin::InsertWeaponTitleContents(v7, (int)v14, v14, &iIndex);
        ItemInfoWin::InsertDescriptContents(v7, (int)v14, pkViewInfoa, iItemUpgrade, v14, &iIndex, iLot);
        ItemInfoWin::InsertItemEffectContents(v7, v11, &iIndex);
        ItemInfoWin::InsertSetItemContents(v7, v11, &iIndex);
        ItemInfoWin::InsertSocketInfoContents(v7, pkItem, &iIndex);
        ItemInfoWin::InsertRandomOptCntContents(v7, pkItem, &iIndex);
        ItemInfoWin::InsertItemMixContents(v7, pkItem, &iIndex);
        v15 = iIndex;
        v16 = (const char *)(*(int (**)(void))(**((_DWORD **)&v7->m_uiTotalMoneyXPos + iIndex) + 484))();
        if ( v16 && v15 > 0 && !strcmp(v16, " ") )
          (*(void (__stdcall **)(void *))(**((_DWORD **)&v7->m_uiTotalMoneyXPos + v15--) + 472))(&unk_9901D6);
        *rkIndex = v15;
      }
    }
  }
}
// 52CE00: could not find valid save-restore pair for edi
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
// A8C298: using guessed type int ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;

//----- (0052CFD0) --------------------------------------------------------
void __thiscall ItemInfoWin::SetItemInfo(ItemInfoWin *this, Item *pkItem)
{
  ItemInfoWin *v2; // ebx@1
  int v3; // esi@1
  signed int v4; // edi@1
  Item *v5; // esi@3
  void *(__thiscall *v6)(NiRefObject *, unsigned int); // edx@4
  Item *v7; // ecx@4
  bool v8; // zf@4
  NiRefObjectVtbl *v9; // eax@4
  void *(__thiscall *v10)(NiRefObject *, unsigned int); // edx@5
  int v11; // eax@7
  int v12; // edi@7
  int v13; // ebx@7
  int v14; // eax@7
  NiRefObjectVtbl *v15; // eax@8
  ItemInfoWin *v16; // [sp+Ch] [bp-4h]@1

  v2 = this;
  v16 = this;
  ItemInfoWin::HideAllMoneyWin(this);
  v3 = (int)v2->m_apkTextWin;
  v4 = 80;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 472))(&unk_9901D7);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 468))(&Color::m_kDxWhiteColor);
    v3 += 4;
    --v4;
  }
  while ( v4 );
  v5 = pkItem;
  if ( pkItem )
  {
    v6 = pkItem->vfptr[1].__vecDelDtor;
    v7 = pkItem;
    pkItem = 0;
    v8 = (unsigned __int8)((int (__thiscall *)(_DWORD))v6)(v7) == 23;
    v9 = v5->vfptr;
    if ( v8 )
      v10 = v9[10].__vecDelDtor;
    else
      v10 = v9[9].__vecDelDtor;
    v11 = ((int (__thiscall *)(_DWORD))v10)(v5);
    v12 = v5->m_kStruct.itemid;
    v13 = v11;
    v14 = ((int (__thiscall *)(_DWORD))v5->vfptr[3].__vecDelDtor)(v5);
    ItemInfoWin::SetBasicItemInfo(v16, v12, v12, v13, v14, (int *)&pkItem, v5);
    v2 = v16;
  }
  v15 = v2->vfptr;
  v2->m_pkItem = v5;
  v2->m_pkItemInfo = v5->m_pkInfo;
  ((void (__thiscall *)(_DWORD))v15[109].__vecDelDtor)(v2);
}

//----- (0052D090) --------------------------------------------------------
void __thiscall ItemInfoWin::SetRepurchaseInfo(ItemInfoWin *this, Item *pkItem)
{
  ItemInfoWin *v2; // edi@1
  int v3; // esi@1
  signed int v4; // ebx@1
  Item *v5; // esi@3
  int v6; // ebx@4
  int v7; // edx@4
  ItemInfo *v8; // ebx@5
  ItemInfo **v9; // eax@8
  int (__stdcall *v10)(Item *); // eax@11
  ItemViewInfo **v11; // eax@15
  void *(__thiscall *v12)(NiRefObject *, unsigned int); // eax@20
  int v13; // eax@20
  unsigned int v14; // ST08_4@20
  int v15; // eax@20
  PgFrameWork *v16; // eax@20
  ItemInfoWin::sNameContentsParameter Parameter; // [sp+Ch] [bp-18h]@20
  ItemViewInfo *pkViewInfo; // [sp+20h] [bp-4h]@11

  v2 = this;
  ItemInfoWin::HideAllMoneyWin(this);
  v3 = (int)v2->m_apkTextWin;
  v4 = 80;
  do
  {
    (*(void (__stdcall **)(void *))(**(_DWORD **)v3 + 472))(&unk_9901FF);
    (*(void (__stdcall **)(D3DXCOLOR *))(**(_DWORD **)v3 + 468))(&Color::m_kDxWhiteColor);
    v3 += 4;
    --v4;
  }
  while ( v4 );
  v5 = pkItem;
  if ( pkItem )
  {
    v6 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    v7 = *(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    pkItem = (Item *)pkItem->m_kStruct.itemid;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, Item *))(v7 + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            pkItem) )
    {
      if ( (unsigned __int16)pkItem <= *(_WORD *)(v6 + 200) )
      {
        v9 = (ItemInfo **)(*(_DWORD *)(v6 + 196) + 4 * (unsigned __int16)pkItem);
        if ( *v9 )
          v8 = *v9;
        else
          v8 = 0;
      }
      else
      {
        v8 = 0;
      }
    }
    else
    {
      v8 = 0;
    }
    v10 = *(int (__stdcall **)(Item *))(*(_DWORD *)ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable + 16);
    pkViewInfo = (ItemViewInfo *)ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;
    if ( (unsigned __int8)v10(pkItem) )
    {
      if ( (unsigned __int16)pkItem <= *(_WORD *)&pkViewInfo->LinkFile[30] )
      {
        v11 = (ItemViewInfo **)(*(_DWORD *)&pkViewInfo->LinkFile[26] + 4 * (unsigned __int16)pkItem);
        if ( *v11 )
          pkViewInfo = *v11;
        else
          pkViewInfo = 0;
      }
      else
      {
        pkViewInfo = 0;
      }
    }
    else
    {
      pkViewInfo = 0;
    }
    if ( v8 && pkViewInfo )
    {
      v2->m_pkItem = v5;
      v2->m_pkItemInfo = v8;
      pkItem = 0;
      User::GetMainCharClass(&g_kUser);
      v12 = v5->vfptr[9].__vecDelDtor;
      Parameter.pkViewInfo = pkViewInfo;
      Parameter.bNPCShop = 0;
      Parameter.pkInfo = v8;
      Parameter.iItemUpgrade = ((int (__thiscall *)(Item *))v12)(v5);
      Parameter.pkItem = v5;
      ItemInfoWin::InsertNameContents(v2, &Parameter, (int *)&pkItem);
      ItemInfoWin::InsertWeaponTitleContents(v2, (int)v2, v5, (int *)&pkItem);
      v13 = ((int (__thiscall *)(Item *))v5->vfptr[3].__vecDelDtor)(v5);
      ItemInfoWin::InsertDescriptContents(v2, (int)v2, pkViewInfo, 0, v5, (int *)&pkItem, v13);
      ItemInfoWin::InsertItemEffectContents(v2, v8, (int *)&pkItem);
      ItemInfoWin::InsertSetItemContents(v2, v8, (int *)&pkItem);
      ItemInfoWin::InsertRandomOptCntContents(v2, v5, (int *)&pkItem);
      ItemInfoWin::InsertItemMixContents(v2, v5, (int *)&pkItem);
      v14 = v8->SellPrice;
      v15 = ((int (__thiscall *)(Item *))v5->vfptr[3].__vecDelDtor)(v5);
      ItemInfoWin::InsertMoneyContents(v2, v8, v15, v14, (int *)&pkItem, SellState_NPC_Repurchase);
      v2->m_pkItem = 0;
      v16 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v16 )
        EnchantGemToolTipWin::Clear((EnchantGemToolTipWin *)v16[27].m_kMsgQ.m_uiTail);
    }
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
// A8C298: using guessed type int ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;

//----- (0052D290) --------------------------------------------------------
void __userpurge ItemInfoWin::SetNPCItemSellInfo(ItemInfoWin *this@<ecx>, int a2@<ebx>, int a3@<esi>, int iItemID, int iItemUpgrade, int iLot, int *rkIndex, __int64 i64Money)
{
  bool v8; // sf@1
  unsigned __int8 v9; // of@1
  ItemInfoWin *v10; // edi@1
  int v11; // ebx@2
  ItemInfo *v12; // ebx@3
  int v13; // edx@6
  int (*v14)(void); // edx@9
  ItemViewInfo *v15; // esi@10
  void *(__thiscall *v16)(NiRefObject *, unsigned int); // edx@13
  ItemViewInfo *v17; // eax@18
  ActiveSkillInfo *v18; // esi@20
  int v19; // esi@22
  char *v20; // eax@22
  char *v21; // eax@22
  char v22; // al@22
  int v23; // esi@24
  PROTO_NC_CHAR_BASE_CMD *v24; // eax@29
  bool v25; // cf@29
  void *(__thiscall *v26)(NiRefObject *, unsigned int); // eax@29
  int v27; // ST14_4@32
  NiUnsharedGeometryGroup *v28; // eax@32
  char *v29; // eax@32
  CClientGuild *v30; // eax@35
  unsigned int v31; // ecx@36
  void *(__thiscall *v32)(NiRefObject *, unsigned int); // eax@36
  unsigned int v33; // ST14_4@39
  char *v34; // eax@39
  char *v35; // eax@39
  int v36; // ST1C_4@45
  NiUnsharedGeometryGroup *v37; // eax@45
  NiUnsharedGeometryGroup *v38; // eax@45
  char *v39; // eax@45
  NiUnsharedGeometryGroup *v40; // ST18_4@45
  int v41; // ST14_4@45
  NiUnsharedGeometryGroup *v42; // eax@45
  int v43; // [sp-8h] [bp-140h]@9
  int v44; // [sp-4h] [bp-13Ch]@2
  ItemInfoWin::sNameContentsParameter Parameter; // [sp+4h] [bp-134h]@20
  int *v46; // [sp+18h] [bp-120h]@1
  __int64 kWhoEquip; // [sp+1Ch] [bp-11Ch]@22
  int v48; // [sp+24h] [bp-114h]@1
  NiRefObjectVtbl *v49; // [sp+28h] [bp-110h]@9
  int iIndex; // [sp+2Ch] [bp-10Ch]@2
  bool bItemMoney; // [sp+33h] [bp-105h]@18
  char acstr[256]; // [sp+34h] [bp-104h]@22

  v48 = iLot;
  v9 = __OFSUB__(*rkIndex, 80);
  v8 = *rkIndex - 80 < 0;
  v10 = this;
  v46 = rkIndex;
  if ( !(v8 ^ v9) )
    return;
  v44 = a2;
  iIndex = 0;
  User::GetMainCharClass(&g_kUser);
  v11 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                             + 16))(
                          ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                          iItemID,
                          a3) )
  {
    if ( (unsigned __int16)iItemID <= *(_WORD *)(v11 + 200) )
    {
      v13 = *(_DWORD *)(v11 + 196);
      v12 = (ItemInfo *)(*(_DWORD *)(v13 + 4 * (unsigned __int16)iItemID) ? *(_DWORD *)(v13
                                                                                      + 4 * (unsigned __int16)iItemID) : 0);
    }
    else
    {
      v12 = 0;
    }
  }
  else
  {
    v12 = 0;
  }
  v14 = *(int (**)(void))(*(_DWORD *)ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable + 16);
  v43 = iItemID;
  v49 = (NiRefObjectVtbl *)ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;
  if ( (unsigned __int8)v14() )
  {
    if ( (unsigned __int16)iItemID <= LOWORD(v49[50].__vecDelDtor) )
    {
      v16 = v49[49].__vecDelDtor;
      v15 = (ItemViewInfo *)(*((_DWORD *)v16 + (unsigned __int16)iItemID) ? *((_DWORD *)v16 + (unsigned __int16)iItemID) : 0);
    }
    else
    {
      v15 = 0;
    }
  }
  else
  {
    v15 = 0;
  }
  v10->m_pkItem = 0;
  v10->m_pkItemInfo = 0;
  if ( !v12 || !v15 )
    return;
  v17 = IIDTableBase<ItemViewInfo,ItemViewInfoTab,unsigned short>::GetByID(iItemID);
  bItemMoney = 0;
  if ( ItemMoneyTab::GetByInxName(v17->InxName) )
    bItemMoney = 1;
  Parameter.iItemUpgrade = iItemUpgrade;
  Parameter.pkItem = 0;
  Parameter.pkInfo = v12;
  Parameter.pkViewInfo = v15;
  Parameter.bNPCShop = 1;
  ItemInfoWin::InsertNameContents(v10, &Parameter, &iIndex);
  ItemInfoWin::InsertDescriptContents(v10, (int)v10, v15, 0, 0, &iIndex, v48);
  ItemInfoWin::InsertItemEffectContents(v10, v12, &iIndex);
  ItemInfoWin::InsertSetItemContents(v10, v12, &iIndex);
  v18 = ActSkillInfoTab::GetByInxName(v12->InxName);
  if ( v18 && ActSkillViewInfoTab::GetByInxName(v12->InxName) )
  {
    kWhoEquip = CharClass::GetBitbyClassType(v18->UseClass);
    CharClass::GetEquipableClassSortStr(kWhoEquip, acstr, 0x100u);
    v19 = iIndex;
    v49 = v10->m_apkTextWin[iIndex]->vfptr;
    v20 = (char *)TextData::Get(0x9FF5FBEC);
    v21 = fs(v20, acstr);
    ((void (__thiscall *)(PgWinText *, char *, int))v49[118].__vecDelDtor)(v10->m_apkTextWin[v19], v21, iItemID);
    v22 = User::GetMainCharClass(&g_kUser);
    if ( !CharClass::TestChrClassMask(kWhoEquip, (unsigned __int8)v22) )
      ((void (__stdcall *)(D3DXCOLOR *))v10->m_apkTextWin[v19]->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
    ((void (__cdecl *)(const char *))v10->m_apkTextWin[v19 + 1]->vfptr[118].__vecDelDtor)(" ");
    v23 = v19 + 2;
    iIndex = v23;
  }
  else
  {
    v23 = iIndex;
  }
  if ( v12->BuyFame )
  {
    if ( v12->BuyGToken )
    {
LABEL_34:
      if ( !bItemMoney )
      {
        v30 = GuildTask::GetGuild();
        if ( v30 )
        {
          v31 = v30->m_iGuildToken;
          v32 = v10->m_apkTextWin[v23]->vfptr[117].__vecDelDtor;
          if ( v31 <= v12->BuyGToken )
            ((void (__stdcall *)(D3DXCOLOR *))v32)(&Color::m_kDxRedColor);
          else
            ((void (__stdcall *)(D3DXCOLOR *))v32)(&Color::m_kDxWhiteColor);
          v33 = v12->BuyGToken;
          v49 = v10->m_apkTextWin[v23]->vfptr;
          v34 = (char *)TextData2::Get(0x4F472D2Fu);
          v35 = fs(v34, v33);
          v49[118].__vecDelDtor((NiRefObject *)v10->m_apkTextWin[v23], (unsigned int)v35);
          ((void (__stdcall *)(const char *))v10->m_apkTextWin[v23 + 1]->vfptr[118].__vecDelDtor)(" ");
          v23 += 2;
          iIndex = v23;
        }
      }
      goto LABEL_40;
    }
    if ( !bItemMoney )
    {
      v24 = User::GetMainCharBaseData(&g_kUser);
      v25 = v48 * v12->BuyFame < v24->fame;
      v26 = v10->m_apkTextWin[v23]->vfptr[117].__vecDelDtor;
      if ( v25 )
        ((void (__stdcall *)(D3DXCOLOR *))v26)(&Color::m_kDxWhiteColor);
      else
        ((void (__stdcall *)(D3DXCOLOR *))v26)(&Color::m_kDxRedColor);
      v27 = v48 * v12->BuyFame;
      v49 = v10->m_apkTextWin[v23]->vfptr;
      v28 = TextData::Get(0xD4E9322A);
      v29 = fs("%s: %d", v28, v27);
      v49[118].__vecDelDtor((NiRefObject *)v10->m_apkTextWin[v23], (unsigned int)v29);
      ((void (__stdcall *)(const char *))v10->m_apkTextWin[v23 + 1]->vfptr[118].__vecDelDtor)(" ");
      v23 += 2;
      iIndex = v23;
    }
  }
  if ( v12->BuyGToken )
    goto LABEL_34;
LABEL_40:
  if ( v12->BuyGBCoin && !bItemMoney )
  {
    if ( v12->BuyGBCoin >= User::Coin(&g_kUser) )
      ((void (__stdcall *)(D3DXCOLOR *, int, int))v10->m_apkTextWin[v23]->vfptr[117].__vecDelDtor)(
        &Color::m_kDxRedColor,
        v43,
        v44);
    else
      ((void (__stdcall *)(D3DXCOLOR *, int, int))v10->m_apkTextWin[v23]->vfptr[117].__vecDelDtor)(
        &Color::m_kDxWhiteColor,
        v43,
        v44);
    acstr[0] = 0;
    memset(&acstr[1], 0, 0xFFu);
    v36 = v48;
    v37 = TextData2::Get(0x7A9898DEu);
    sprintf(acstr, (const char *)v37, v36);
    v49 = v10->m_apkTextWin[v23]->vfptr;
    v38 = TextData2::Get(0xD75E3C3E);
    v39 = fs("%s %d %s", acstr, v12->BuyGBCoin, v38);
    v49[118].__vecDelDtor((NiRefObject *)v10->m_apkTextWin[v23], (unsigned int)v39);
    ((void (__stdcall *)(const char *))v10->m_apkTextWin[v23 + 1]->vfptr[118].__vecDelDtor)(" ");
    User::Coin(&g_kUser);
    LODWORD(kWhoEquip) = v48 * v12->BuyGBCoin;
    ((void (*)(void))v10->m_apkTextWin[v23 + 2]->vfptr[117].__vecDelDtor)();
    v49 = v10->m_apkTextWin[v23 + 2]->vfptr;
    v40 = TextData2::Get(0xD75E3C3E);
    v41 = v48 * v12->BuyGBCoin;
    v42 = TextData::Get(0x9EB2A8F8);
    fs("%s %d %s", v42, v41, v40);
    ((void (__thiscall *)(PgWinText *))v49[118].__vecDelDtor)(v10->m_apkTextWin[v23 + 2]);
    ((void (__stdcall *)(const char *))v10->m_apkTextWin[v23 + 3]->vfptr[118].__vecDelDtor)(" ");
    v23 += 4;
    iIndex = v23;
  }
  if ( (!v12->BuyGToken || bItemMoney)
    && (SHIDWORD(i64Money) > 0 || SHIDWORD(i64Money) >= 0 && (_DWORD)i64Money || !v12->BuyGBCoin || bItemMoney) )
  {
    ItemInfoWin::InsertMoneyContents(v10, v12, v48, i64Money, &iIndex, SellState_NPC_Sell);
    v23 = iIndex;
  }
  *v46 = v23;
}
// 52D290: could not find valid save-restore pair for ebx
// 52D290: could not find valid save-restore pair for esi
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
// A8C298: using guessed type int ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;

//----- (0052D8D0) --------------------------------------------------------
void __userpurge ItemInfoWin::SetPrivateStoreItemInfo(ItemInfoWin *this@<ecx>, int a2@<edi>, int iItemID, int iItemUpgrade, int iLot, int *rkIndex, __int64 i64Money, Item *pkItem, bool bSellMode)
{
  ItemInfoWin *v9; // esi@1
  int v10; // ST18_4@2
  int v11; // ebx@2
  unsigned __int16 v12; // di@2
  ItemInfo *v13; // ebx@3
  int v14; // edx@6
  ItemViewInfo **v15; // eax@13
  Item *v16; // edi@18
  ItemInfoWin::sNameContentsParameter Parameter; // [sp+4h] [bp-18h]@18
  int iIndex; // [sp+18h] [bp-4h]@2
  ItemViewInfo *pkViewInfo; // [sp+24h] [bp+8h]@9
  ItemViewInfo *pkViewInfoa; // [sp+24h] [bp+8h]@10

  v9 = this;
  if ( *rkIndex < 80 )
  {
    v10 = a2;
    iIndex = 0;
    User::GetMainCharClass(&g_kUser);
    v11 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    v12 = iItemID;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                               + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            iItemID,
                            v10) )
    {
      if ( (unsigned __int16)iItemID <= *(_WORD *)(v11 + 200) )
      {
        v14 = *(_DWORD *)(v11 + 196);
        if ( *(_DWORD *)(v14 + 4 * (unsigned __int16)iItemID) )
          v13 = *(ItemInfo **)(v14 + 4 * (unsigned __int16)iItemID);
        else
          v13 = 0;
      }
      else
      {
        v13 = 0;
      }
    }
    else
    {
      v13 = 0;
    }
    pkViewInfo = (ItemViewInfo *)ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable + 16))() )
    {
      if ( v12 <= *(_WORD *)&pkViewInfo->LinkFile[30] )
      {
        v15 = (ItemViewInfo **)(*(_DWORD *)&pkViewInfo->LinkFile[26] + 4 * v12);
        if ( *v15 )
          pkViewInfoa = *v15;
        else
          pkViewInfoa = 0;
      }
      else
      {
        pkViewInfoa = 0;
      }
    }
    else
    {
      pkViewInfoa = 0;
    }
    if ( v13 )
    {
      if ( pkViewInfoa )
      {
        v16 = pkItem;
        Parameter.pkViewInfo = pkViewInfoa;
        Parameter.iItemUpgrade = iItemUpgrade;
        Parameter.bNPCShop = 0;
        Parameter.pkInfo = v13;
        Parameter.pkItem = pkItem;
        ItemInfoWin::InsertNameContents(v9, &Parameter, &iIndex);
        ItemInfoWin::InsertWeaponTitleContents(v9, (int)v16, v16, &iIndex);
        ItemInfoWin::InsertDescriptContents(v9, (int)v16, pkViewInfoa, iItemUpgrade, v16, &iIndex, iLot);
        ItemInfoWin::InsertItemEffectContents(v9, v13, &iIndex);
        ItemInfoWin::InsertSetItemContents(v9, v13, &iIndex);
        ItemInfoWin::InsertRandomOptCntContents(v9, pkItem, &iIndex);
        ItemInfoWin::InsertItemMixContents(v9, pkItem, &iIndex);
        ItemInfoWin::InsertMoneyContents(v9, v13, iLot, i64Money, &iIndex, (ItemInfoWin::eSellState)(bSellMode != 0));
        *rkIndex = iIndex;
      }
    }
  }
}
// 52D8D0: could not find valid save-restore pair for edi
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
// A8C298: using guessed type int ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;

//----- (0052DA50) --------------------------------------------------------
void __thiscall ItemInfoWin::SetBuyInfo(ItemInfoWin *this, PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *pkSellInfo)
{
  ItemInfoWin *v2; // esi@1
  int v3; // esi@1
  signed int v4; // edi@1
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v5; // ebx@3
  int v6; // esi@4
  int v7; // edi@4
  int v8; // esi@5
  int v9; // ecx@8
  __int64 v10; // ST10_8@12
  int v11; // ST08_4@12
  int v12; // ST00_4@12
  PgFrameWork *v13; // eax@13
  ItemInfoWin *v14; // [sp+Ch] [bp-4h]@1

  v2 = this;
  v14 = this;
  ItemInfoWin::HideAllMoneyWin(this);
  v3 = (int)v2->m_apkTextWin;
  v4 = 80;
  do
  {
    (*(void (__stdcall **)(void *))(**(_DWORD **)v3 + 472))(&unk_9901F3);
    (*(void (__stdcall **)(D3DXCOLOR *))(**(_DWORD **)v3 + 468))(&Color::m_kDxWhiteColor);
    v3 += 4;
    --v4;
  }
  while ( v4 );
  v5 = pkSellInfo;
  if ( pkSellInfo )
  {
    v6 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    v7 = pkSellInfo->item;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v7) )
    {
      if ( (unsigned __int16)v7 <= *(_WORD *)(v6 + 200) )
      {
        v9 = *(_DWORD *)(v6 + 196);
        if ( *(_DWORD *)(v9 + 4 * v7) )
          v8 = *(_DWORD *)(v9 + 4 * v7);
        else
          v8 = 0;
      }
      else
      {
        v8 = 0;
      }
    }
    else
    {
      v8 = 0;
    }
    (*(void (__stdcall **)(_DWORD))(*(_DWORD *)ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable + 16))(v5->item);
    if ( v8 )
    {
      v10 = *(_DWORD *)(v8 + 211);
      v11 = *(_DWORD *)(v8 + 106);
      v12 = v5->item;
      pkSellInfo = 0;
      ItemInfoWin::SetNPCItemSellInfo(v14, (int)v5, v8, v12, 0, v11, (int *)&pkSellInfo, v10);
    }
    v14->m_pkItem = 0;
    v13 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v13 )
      EnchantGemToolTipWin::Clear((EnchantGemToolTipWin *)v13[27].m_kMsgQ.m_uiTail);
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
// A8C298: using guessed type int ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;

//----- (0052DB50) --------------------------------------------------------
void __thiscall ItemInfoWin::SetPrivateStoreSellInfo(ItemInfoWin *this, Item *pkItem, __int64 i64SellMoney, bool bMyInven)
{
  ItemInfoWin *v4; // ebx@1
  int v5; // esi@1
  signed int v6; // edi@1
  Item *v7; // esi@3
  ItemInfo *v8; // edi@4
  void *(__thiscall *v9)(NiRefObject *, unsigned int); // edx@5
  int v10; // ebx@5
  int v11; // eax@5
  ItemInfoWin *v12; // [sp+Ch] [bp-4h]@1

  v4 = this;
  v12 = this;
  ItemInfoWin::HideAllMoneyWin(this);
  v5 = (int)v4->m_apkTextWin;
  v6 = 80;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v5 + 472))(&unk_9901FE);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v5 + 468))(&Color::m_kDxWhiteColor);
    v5 += 4;
    --v6;
  }
  while ( v6 );
  v7 = pkItem;
  if ( pkItem )
  {
    v8 = pkItem->m_pkInfo;
    v4->m_pkItem = pkItem;
    v4->m_pkItemInfo = v8;
    if ( v8 )
    {
      v9 = v7->vfptr[3].__vecDelDtor;
      pkItem = 0;
      v10 = ((int (__thiscall *)(_DWORD))v9)(v7);
      v11 = ((int (__thiscall *)(_DWORD))v7->vfptr[9].__vecDelDtor)(v7);
      if ( v8->Class == 23 )
      {
        v10 = 1;
        v11 = ((int (__thiscall *)(_DWORD))v7->vfptr[10].__vecDelDtor)(v7);
      }
      ItemInfoWin::SetPrivateStoreItemInfo(
        v12,
        (int)v8,
        v7->m_kStruct.itemid,
        v11,
        v10,
        (int *)&pkItem,
        i64SellMoney,
        v7,
        1);
    }
  }
}

//----- (0052DC10) --------------------------------------------------------
void __thiscall ItemInfoWin::SetPrivateStoreBuyInfo(ItemInfoWin *this, Item *pkItem, __int64 i64SellMoney, unsigned int uiLot, bool bMyInven)
{
  ItemInfoWin *v5; // ebx@1
  int v6; // esi@1
  signed int v7; // edi@1
  Item *v8; // ecx@3
  ItemInfo *v9; // eax@4
  int v10; // esi@5
  Item *v11; // ST18_4@5
  __int64 v12; // ST10_8@5
  int v13; // ST08_4@5
  int (*v14)(void); // edx@5
  int v15; // eax@5

  v5 = this;
  ItemInfoWin::HideAllMoneyWin(this);
  v6 = (int)v5->m_apkTextWin;
  v7 = 80;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v6 + 472))(&unk_990221);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v6 + 468))(&Color::m_kDxWhiteColor);
    v6 += 4;
    --v7;
  }
  while ( v7 );
  v8 = pkItem;
  if ( pkItem )
  {
    v9 = pkItem->m_pkInfo;
    v5->m_pkItem = pkItem;
    v5->m_pkItemInfo = v9;
    if ( v9 )
    {
      v10 = v8->m_kStruct.itemid;
      v11 = v8;
      v12 = i64SellMoney;
      v13 = uiLot;
      v14 = (int (*)(void))v8->vfptr[9].__vecDelDtor;
      pkItem = 0;
      v15 = v14();
      ItemInfoWin::SetPrivateStoreItemInfo(v5, 0, v10, v15, v13, (int *)&pkItem, v12, v11, 0);
    }
  }
}

//----- (0052DCB0) --------------------------------------------------------
void __thiscall ItemInfoWin::SetSellInfo(ItemInfoWin *this, Item *pkItem, bool bMyInven)
{
  if ( pkItem )
    ItemInfoWin::SetPrivateStoreSellInfo(this, pkItem, pkItem->m_pkInfo->SellPrice, bMyInven);
}

//----- (0052DCE0) --------------------------------------------------------
UpGradeInfo *__cdecl IIDTableBase<UpGradeInfo,UpGradeInfoTab,unsigned short>::GetByID(int uiId)
{
  int v1; // esi@1
  UpGradeInfo *result; // eax@2
  int v3; // ecx@4

  v1 = ITableBase<UpGradeInfo,UpGradeInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<UpGradeInfo,UpGradeInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<UpGradeInfo,UpGradeInfoTab>::ms_pkTable,
                          uiId)
    && (unsigned __int16)uiId <= *(_WORD *)(v1 + 200)
    && (v3 = *(_DWORD *)(v1 + 196), *(_DWORD *)(v3 + 4 * (unsigned __int16)uiId)) )
  {
    result = *(UpGradeInfo **)(v3 + 4 * (unsigned __int16)uiId);
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C274: using guessed type int ITableBase<UpGradeInfo,UpGradeInfoTab>::ms_pkTable;

//----- (0052DD30) --------------------------------------------------------
BRAccUpgradeInfo *__cdecl IIDTableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab,unsigned short>::GetByID(int uiId)
{
  int v1; // esi@1
  BRAccUpgradeInfo *result; // eax@2
  int v3; // ecx@4

  v1 = ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::ms_pkTable,
                          uiId)
    && (unsigned __int16)uiId <= *(_WORD *)(v1 + 200)
    && (v3 = *(_DWORD *)(v1 + 196), *(_DWORD *)(v3 + 4 * (unsigned __int16)uiId)) )
  {
    result = *(BRAccUpgradeInfo **)(v3 + 4 * (unsigned __int16)uiId);
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C290: using guessed type int ITableBase<BRAccUpgradeInfo,BRAccUpgradeInfoTab>::ms_pkTable;

//----- (0052DD80) --------------------------------------------------------
unsigned int __cdecl ITableBase<ItemMoney,ItemMoneyTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<ItemMoney,ItemMoneyTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C140: using guessed type int ITableBase<ItemMoney,ItemMoneyTab>::ms_pkTable;

//----- (0052DDA0) --------------------------------------------------------
unsigned int __cdecl ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C2A4: using guessed type int ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;

//----- (0052DDC0) --------------------------------------------------------
unsigned int __cdecl ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8CAA0: using guessed type int ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable;

//----- (0052DDE0) --------------------------------------------------------
ItemInfoWin *__thiscall ItemInfoWin::`scalar deleting destructor'(ItemInfoWin *this, unsigned int a2)
{
  ItemInfoWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ItemInfoWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ItemInfoWin::`vftable'{for `IDirectMessenger'};
  FrameBoxWin::~FrameBoxWin((FrameBoxWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9906B4: using guessed type void (__thiscall *ItemInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9906D4: using guessed type int (__thiscall *ItemInfoWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0052DE20) --------------------------------------------------------
unsigned int __cdecl ITableBase<ItemInfo,ItemInfoTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0052DE40) --------------------------------------------------------
unsigned int __cdecl ITableBase<GradeItemOption,GradeItemOptionTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<GradeItemOption,GradeItemOptionTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C180: using guessed type int ITableBase<GradeItemOption,GradeItemOptionTab>::ms_pkTable;

//----- (0052DE60) --------------------------------------------------------
unsigned int __cdecl ITableBase<MiniHouse,MiniHouseTable>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<MiniHouse,MiniHouseTable>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C184: using guessed type int ITableBase<MiniHouse,MiniHouseTable>::ms_pkTable;

//----- (0052DE80) --------------------------------------------------------
unsigned int __cdecl ITableBase<ProduceInfo,ProduceInfoTable>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C16C: using guessed type int ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable;

//----- (0052DEA0) --------------------------------------------------------
unsigned int __cdecl ITableBase<ProduceViewInfo,ProduceViewInfoTable>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<ProduceViewInfo,ProduceViewInfoTable>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C178: using guessed type int ITableBase<ProduceViewInfo,ProduceViewInfoTable>::ms_pkTable;

//----- (0052DEC0) --------------------------------------------------------
unsigned int __cdecl ITableBase<SetItemName,SetItemNameTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<SetItemName,SetItemNameTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C19C: using guessed type int ITableBase<SetItemName,SetItemNameTab>::ms_pkTable;

//----- (0052DEE0) --------------------------------------------------------
char *__cdecl WeaponTitleTab::GetWeaponTitleString(unsigned __int16 MobID, unsigned int MobKillCount, unsigned __int16 wepID)
{
  int v3; // esi@1
  int v4; // edx@3
  int v5; // eax@4
  WEAPON_TITLE_DATA *v6; // esi@5
  WEAPON_TITLE_DATA *v7; // eax@6
  unsigned int v8; // ecx@6
  unsigned int v9; // edx@7
  unsigned int v10; // eax@7
  int v11; // edi@13
  int *v12; // eax@15
  int v13; // edi@16
  unsigned int v14; // eax@18
  NiUnsharedGeometryGroup *v15; // eax@19
  int v16; // edi@21
  signed int v17; // ecx@22
  char *v18; // ebx@22
  int v19; // esi@22
  char *v20; // ST08_4@23
  char *v21; // eax@23
  char *result; // eax@23
  char *v23; // ST08_4@24
  char *v24; // eax@24
  char *v25; // eax@25
  int v26; // esi@25
  int v27; // [sp-4h] [bp-44h]@22
  unsigned int dwLevel; // [sp+10h] [bp-30h]@5
  unsigned int dwRatio; // [sp+14h] [bp-2Ch]@8
  char *pcMobName; // [sp+18h] [bp-28h]@5
  char acRatio[32]; // [sp+1Ch] [bp-24h]@19

  v3 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 16))(
                          ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                          MobID)
    && MobID <= *(_WORD *)(v3 + 200)
    && (v4 = *(_DWORD *)(v3 + 196), *(_DWORD *)(v4 + 4 * MobID))
    && (v5 = *(_DWORD *)(v4 + 4 * MobID)) != 0
    && (pcMobName = (char *)(v5 + 34),
        (v6 = CWeaponTitle::GetLevelData(&WeaponTitleTab::ms_kTab, MobID, MobKillCount, &dwLevel)) != 0)
    && ((v7 = CWeaponTitle::GetPrevLevelData(&WeaponTitleTab::ms_kTab, MobID, dwLevel), v8 = v6->MobKillCount, !v7) ? (!v8 ? (dwRatio = 100 * MobKillCount) : (dwRatio = 100 * MobKillCount / v8)) : (v9 = v7->MobKillCount, v10 = 100 * (MobKillCount - v9), v8 != v9) ? (dwRatio = v10 / (v8 - v9)) : (dwRatio = v10 / v8),
        (v11 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
         (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                             + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            wepID))
     && wepID <= *(_WORD *)(v11 + 200)
     && (v12 = (int *)(*(_DWORD *)(v11 + 196) + 4 * wepID), *v12)
     && (v13 = *v12) != 0) )
  {
    if ( dwLevel < 9 && (v14 = CWeaponTitle::GetMaxLevel(&WeaponTitleTab::ms_kTab, MobID), v14 > dwLevel) )
    {
      sprintf(acRatio, "%d%%", dwRatio);
    }
    else
    {
      v15 = TextData::Get(0xA6A3EDF0);
      sprintf(acRatio, "%s", v15);
    }
    v16 = v13 + 278;
    if ( v6->MinAdd )
    {
      v17 = v6->MaxAdd - 1000;
      v18 = v6->Prefix;
      v19 = (int)v6->Suffix;
      v27 = v17 / 10;
      if ( *v18 )
      {
        v23 = pcMobName;
        v24 = (char *)TextData::Get(0x2C424C4Du);
        result = fs(v24, v18, v23, v19, v16, acRatio, v27);
      }
      else
      {
        v20 = pcMobName;
        v21 = (char *)TextData::Get(0x2B424C4Du);
        result = fs(v21, v20, v19, v16, acRatio, v27);
      }
    }
    else
    {
      v25 = v6->Prefix;
      v26 = (int)v6->Suffix;
      if ( *v25 )
        result = fs("%s %s %s %s: %s", v25, pcMobName, v26, v16, acRatio);
      else
        result = fs("%s %s %s: %s", pcMobName, v26, v16, acRatio);
    }
  }
  else
  {
    result = (char *)&unk_96F8EB;
  }
  return result;
}
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0052E160) --------------------------------------------------------
GradeItemOption *__cdecl GradeItemOptionTab::GetByInxName(char *pcInxName)
{
  unsigned int v1; // edi@3
  GradeItemOption *result; // eax@6

  if ( pcInxName && *pcInxName )
  {
    v1 = 0;
    if ( ITableBase<GradeItemOption,GradeItemOptionTab>::GetTotal() )
    {
      while ( strcmp(
                CDataReader::GetRecord(
                  (CDataReader *)(ITableBase<GradeItemOption,GradeItemOptionTab>::ms_pkTable + 4),
                  v1),
                pcInxName) )
      {
        if ( ++v1 >= ITableBase<GradeItemOption,GradeItemOptionTab>::GetTotal() )
          goto LABEL_6;
      }
      result = (GradeItemOption *)CDataReader::GetRecord(
                                    (CDataReader *)(ITableBase<GradeItemOption,GradeItemOptionTab>::ms_pkTable + 4),
                                    v1);
    }
    else
    {
LABEL_6:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C180: using guessed type int ITableBase<GradeItemOption,GradeItemOptionTab>::ms_pkTable;

//----- (0052E1F0) --------------------------------------------------------
MiniHouse *__cdecl MiniHouseTable::GetByInxName(char *pcInxName)
{
  unsigned int v1; // edi@3
  MiniHouse *result; // eax@6

  if ( pcInxName && *pcInxName )
  {
    v1 = 0;
    if ( ITableBase<MiniHouse,MiniHouseTable>::GetTotal() )
    {
      while ( strcmp(
                CDataReader::GetRecord((CDataReader *)(ITableBase<MiniHouse,MiniHouseTable>::ms_pkTable + 4), v1) + 2,
                pcInxName) )
      {
        if ( ++v1 >= ITableBase<MiniHouse,MiniHouseTable>::GetTotal() )
          goto LABEL_6;
      }
      result = (MiniHouse *)CDataReader::GetRecord(
                              (CDataReader *)(ITableBase<MiniHouse,MiniHouseTable>::ms_pkTable + 4),
                              v1);
    }
    else
    {
LABEL_6:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C184: using guessed type int ITableBase<MiniHouse,MiniHouseTable>::ms_pkTable;

//----- (0052E280) --------------------------------------------------------
ProduceInfo *__cdecl ProduceInfoTable::GetByID(unsigned __int16 kSkillID)
{
  ProduceInfo *result; // eax@2
  unsigned int v2; // esi@3

  if ( kSkillID == -1 )
  {
    result = 0;
  }
  else
  {
    v2 = 0;
    if ( ITableBase<ProduceInfo,ProduceInfoTable>::GetTotal() )
    {
      while ( 1 )
      {
        result = (ProduceInfo *)CDataReader::GetRecord(
                                  (CDataReader *)(ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable + 4),
                                  v2);
        if ( result->ProductID == kSkillID )
          break;
        if ( ++v2 >= ITableBase<ProduceInfo,ProduceInfoTable>::GetTotal() )
          goto LABEL_6;
      }
    }
    else
    {
LABEL_6:
      result = 0;
    }
  }
  return result;
}
// A8C16C: using guessed type int ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable;

//----- (0052E2D0) --------------------------------------------------------
ProduceInfo *__cdecl ProduceInfoTable::GetByNeedMasteryGain(char *pcName)
{
  ProduceInfo *result; // eax@2
  unsigned int v2; // esi@3

  if ( pcName )
  {
    v2 = 0;
    if ( ITableBase<ProduceInfo,ProduceInfoTable>::GetTotal() )
    {
      while ( 1 )
      {
        result = (ProduceInfo *)CDataReader::GetRecord(
                                  (CDataReader *)(ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable + 4),
                                  v2);
        if ( result )
        {
          if ( !strcmp(result->ProduceIndex, pcName) )
            break;
        }
        if ( ++v2 >= ITableBase<ProduceInfo,ProduceInfoTable>::GetTotal() )
          goto LABEL_7;
      }
    }
    else
    {
LABEL_7:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C16C: using guessed type int ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable;

//----- (0052E350) --------------------------------------------------------
ProduceViewInfo *__cdecl ProduceViewInfoTable::GetByMasteryType(TotalMasteryType eType)
{
  unsigned int v1; // esi@1
  ProduceViewInfo *result; // eax@2

  v1 = 0;
  if ( ITableBase<ProduceViewInfo,ProduceViewInfoTable>::GetTotal() )
  {
    while ( 1 )
    {
      result = (ProduceViewInfo *)CDataReader::GetRecord(
                                    (CDataReader *)(ITableBase<ProduceViewInfo,ProduceViewInfoTable>::ms_pkTable + 4),
                                    v1);
      if ( result->MasteryType == eType )
        break;
      if ( ++v1 >= ITableBase<ProduceViewInfo,ProduceViewInfoTable>::GetTotal() )
        goto LABEL_4;
    }
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}
// A8C178: using guessed type int ITableBase<ProduceViewInfo,ProduceViewInfoTable>::ms_pkTable;

//----- (0052E390) --------------------------------------------------------
SetItemName *__cdecl SetItemNameTab::GetByInxName(char *pcInxName)
{
  unsigned int v1; // edi@3
  SetItemName *result; // eax@6

  if ( pcInxName && *pcInxName )
  {
    v1 = 0;
    if ( ITableBase<SetItemName,SetItemNameTab>::GetTotal() )
    {
      while ( strcmp(
                CDataReader::GetRecord((CDataReader *)(ITableBase<SetItemName,SetItemNameTab>::ms_pkTable + 4), v1),
                pcInxName) )
      {
        if ( ++v1 >= ITableBase<SetItemName,SetItemNameTab>::GetTotal() )
          goto LABEL_6;
      }
      result = (SetItemName *)CDataReader::GetRecord(
                                (CDataReader *)(ITableBase<SetItemName,SetItemNameTab>::ms_pkTable + 4),
                                v1);
    }
    else
    {
LABEL_6:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C19C: using guessed type int ITableBase<SetItemName,SetItemNameTab>::ms_pkTable;

//----- (0052E420) --------------------------------------------------------
unsigned int __cdecl SetEffectTab::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<SetEffect,SetEffectTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C1A4: using guessed type int ITableBase<SetEffect,SetEffectTab>::ms_pkTable;

//----- (0052E440) --------------------------------------------------------
ItemMoney *__cdecl ItemMoneyTab::GetByInxName(char *pcInxName)
{
  unsigned int v1; // edi@3
  ItemMoney *result; // eax@6

  if ( pcInxName && *pcInxName )
  {
    v1 = 0;
    if ( ITableBase<ItemMoney,ItemMoneyTab>::GetTotal() )
    {
      while ( strcmp(
                CDataReader::GetRecord((CDataReader *)(ITableBase<ItemMoney,ItemMoneyTab>::ms_pkTable + 4), v1),
                pcInxName) )
      {
        if ( ++v1 >= ITableBase<ItemMoney,ItemMoneyTab>::GetTotal() )
          goto LABEL_6;
      }
      result = (ItemMoney *)CDataReader::GetRecord(
                              (CDataReader *)(ITableBase<ItemMoney,ItemMoneyTab>::ms_pkTable + 4),
                              v1);
    }
    else
    {
LABEL_6:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C140: using guessed type int ITableBase<ItemMoney,ItemMoneyTab>::ms_pkTable;

//----- (0052E4D0) --------------------------------------------------------
AbnormalStateViewInfo *__cdecl AbnormalStateViewInfoTab::GetByInxName(char *pcInxName)
{
  unsigned int v1; // edi@3
  AbnormalStateViewInfo *result; // eax@6

  if ( pcInxName && *pcInxName )
  {
    v1 = 0;
    if ( ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::GetTotal() )
    {
      while ( strcmp(
                CDataReader::GetRecord(
                  (CDataReader *)(ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable + 4),
                  v1)
              + 2,
                pcInxName) )
      {
        if ( ++v1 >= ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::GetTotal() )
          goto LABEL_6;
      }
      result = (AbnormalStateViewInfo *)CDataReader::GetRecord(
                                          (CDataReader *)(ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable
                                                        + 4),
                                          v1);
    }
    else
    {
LABEL_6:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C2A4: using guessed type int ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;

//----- (0052E560) --------------------------------------------------------
ActiveSkillViewInfo *__cdecl ActSkillViewInfoTab::GetByInxName(char *pcInxName)
{
  unsigned int v1; // edi@3
  ActiveSkillViewInfo *result; // eax@6

  if ( pcInxName && *pcInxName )
  {
    v1 = 0;
    if ( ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::GetTotal() )
    {
      while ( 1 )
      {
        CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable + 4), v1);
        if ( !strcmp(
                CDataReader::GetRecord(
                  (CDataReader *)(ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable + 4),
                  v1)
              + 2,
                pcInxName) )
          break;
        if ( ++v1 >= ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::GetTotal() )
          goto LABEL_6;
      }
      result = (ActiveSkillViewInfo *)CDataReader::GetRecord(
                                        (CDataReader *)(ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable
                                                      + 4),
                                        v1);
    }
    else
    {
LABEL_6:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8CAA0: using guessed type int ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable;

//----- (0052E600) --------------------------------------------------------
ProduceInfo *__cdecl ProduceInfoTable::GetByProduct(std::basic_string<char,std::char_traits<char>,std::allocator<char> > Product)
{
  int v1; // eax@1
  unsigned int v2; // esi@1
  char *v3; // eax@5
  const char *v4; // ebx@6
  unsigned int v5; // eax@6
  unsigned int v6; // edi@6
  unsigned int v7; // esi@6
  unsigned int v8; // ecx@6
  const char *v9; // eax@8
  int v10; // eax@10
  ProduceInfo *pkProduceInfo; // [sp+10h] [bp-18h]@5
  unsigned int i; // [sp+14h] [bp-14h]@4
  unsigned int v14; // [sp+18h] [bp-10h]@2

  v1 = *(_DWORD *)(ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable + 56);
  v2 = 0;
  if ( v1 )
    v14 = *(_DWORD *)(v1 + 40);
  else
    v14 = 0;
  i = 0;
  if ( v14 <= 0 )
  {
LABEL_15:
    if ( Product._Myres >= 0x10 )
      operator delete(Product._Bx._Ptr);
    return 0;
  }
  while ( 1 )
  {
    v3 = CDataReader::GetRecord((CDataReader *)(ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable + 4), v2);
    pkProduceInfo = (ProduceInfo *)v3;
    if ( v3 )
      break;
LABEL_14:
    i = ++v2;
    if ( v2 >= v14 )
      goto LABEL_15;
  }
  v4 = v3 + 98;
  v5 = strlen(v3 + 98);
  v6 = Product._Mysize;
  v7 = v5;
  v8 = Product._Mysize;
  if ( Product._Mysize >= v5 )
    v8 = v5;
  v9 = Product._Bx._Ptr;
  if ( Product._Myres < 0x10 )
    v9 = (const char *)&Product;
  v10 = std::char_traits<char>::compare(v9, v4, v8);
  if ( v10 || v6 < v7 || (LOBYTE(v10) = v6 != v7, v10) )
  {
    v2 = i;
    goto LABEL_14;
  }
  if ( Product._Myres >= 0x10 )
    operator delete(Product._Bx._Ptr);
  return pkProduceInfo;
}
// A8C16C: using guessed type int ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable;

//----- (0052E710) --------------------------------------------------------
MoverItem *__cdecl MoverItemTab::GetByItemIdx(const char *pcItemIdx)
{
  int v1; // eax@1
  unsigned int v2; // esi@1
  char *v3; // eax@5
  unsigned int v4; // eax@6
  unsigned int v5; // ebx@6
  unsigned int v6; // esi@6
  unsigned int v7; // ecx@6
  unsigned int v8; // edi@8
  const char *v9; // eax@8
  int v10; // eax@10
  bool v11; // zf@10
  signed int v12; // eax@12
  bool v13; // bl@15
  MoverItem *pkMoverItem; // [sp+10h] [bp-3Ch]@5
  unsigned int i; // [sp+18h] [bp-34h]@4
  unsigned int v17; // [sp+1Ch] [bp-30h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v18; // [sp+20h] [bp-2Ch]@6
  int v19; // [sp+48h] [bp-4h]@15

  v1 = *(_DWORD *)(ITableBase<MoverItem,MoverItemTab>::ms_pkTable + 56);
  v2 = 0;
  if ( v1 )
    v17 = *(_DWORD *)(v1 + 40);
  else
    v17 = 0;
  i = 0;
  if ( v17 <= 0 )
    return 0;
  while ( 1 )
  {
    v3 = CDataReader::GetRecord((CDataReader *)(ITableBase<MoverItem,MoverItemTab>::ms_pkTable + 4), v2);
    pkMoverItem = (MoverItem *)v3;
    if ( v3 )
      break;
LABEL_19:
    i = ++v2;
    if ( v2 >= v17 )
      return 0;
  }
  v18._Myres = 15;
  v18._Mysize = 0;
  v18._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v18, v3 + 32, strlen(v3 + 32));
  v4 = strlen(pcItemIdx);
  v5 = v18._Mysize;
  v6 = v4;
  v7 = v18._Mysize;
  if ( v18._Mysize >= v4 )
    v7 = v4;
  v8 = v18._Myres;
  v9 = v18._Bx._Ptr;
  if ( v18._Myres < 0x10 )
    v9 = (const char *)&v18;
  v10 = std::char_traits<char>::compare(v9, pcItemIdx, v7);
  v11 = v10 == 0;
  if ( !v10 )
  {
    if ( v5 >= v6 )
      v12 = v5 != v6;
    else
      v12 = -1;
    v11 = v12 == 0;
  }
  v13 = v11;
  v19 = -1;
  if ( v8 >= 0x10 )
    operator delete(v18._Bx._Ptr);
  v18._Myres = 15;
  v18._Mysize = 0;
  v18._Bx._Buf[0] = 0;
  if ( !v13 )
  {
    v2 = i;
    goto LABEL_19;
  }
  return pkMoverItem;
}
// A8C238: using guessed type int ITableBase<MoverItem,MoverItemTab>::ms_pkTable;

//----- (0052E870) --------------------------------------------------------
PupMain *__cdecl PetMainTab::GetByItemIdx(const char *pcItemIdx)
{
  int v1; // eax@1
  unsigned int v2; // esi@1
  char *v3; // eax@5
  unsigned int v4; // eax@6
  unsigned int v5; // ebx@6
  unsigned int v6; // esi@6
  unsigned int v7; // ecx@6
  unsigned int v8; // edi@8
  const char *v9; // eax@8
  int v10; // eax@10
  bool v11; // zf@10
  signed int v12; // eax@12
  bool v13; // bl@15
  PupMain *pkPetMain; // [sp+10h] [bp-3Ch]@5
  unsigned int i; // [sp+18h] [bp-34h]@4
  unsigned int v17; // [sp+1Ch] [bp-30h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v18; // [sp+20h] [bp-2Ch]@6
  int v19; // [sp+48h] [bp-4h]@15

  v1 = *(_DWORD *)(ITableBase<PupMain,PetMainTab>::ms_pkTable + 56);
  v2 = 0;
  if ( v1 )
    v17 = *(_DWORD *)(v1 + 40);
  else
    v17 = 0;
  i = 0;
  if ( v17 <= 0 )
    return 0;
  while ( 1 )
  {
    v3 = CDataReader::GetRecord((CDataReader *)(ITableBase<PupMain,PetMainTab>::ms_pkTable + 4), v2);
    pkPetMain = (PupMain *)v3;
    if ( v3 )
      break;
LABEL_19:
    i = ++v2;
    if ( v2 >= v17 )
      return 0;
  }
  v18._Myres = 15;
  v18._Mysize = 0;
  v18._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v18, v3 + 36, strlen(v3 + 36));
  v4 = strlen(pcItemIdx);
  v5 = v18._Mysize;
  v6 = v4;
  v7 = v18._Mysize;
  if ( v18._Mysize >= v4 )
    v7 = v4;
  v8 = v18._Myres;
  v9 = v18._Bx._Ptr;
  if ( v18._Myres < 0x10 )
    v9 = (const char *)&v18;
  v10 = std::char_traits<char>::compare(v9, pcItemIdx, v7);
  v11 = v10 == 0;
  if ( !v10 )
  {
    if ( v5 >= v6 )
      v12 = v5 != v6;
    else
      v12 = -1;
    v11 = v12 == 0;
  }
  v13 = v11;
  v19 = -1;
  if ( v8 >= 0x10 )
    operator delete(v18._Bx._Ptr);
  v18._Myres = 15;
  v18._Mysize = 0;
  v18._Bx._Buf[0] = 0;
  if ( !v13 )
  {
    v2 = i;
    goto LABEL_19;
  }
  return pkPetMain;
}
// A89D30: using guessed type int ITableBase<PupMain,PetMainTab>::ms_pkTable;

//----- (0052E9D0) --------------------------------------------------------
void __thiscall ItemMallMenuWin::ItemMallMenuWin(ItemMallMenuWin *this)
{
  ItemMallMenuWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ItemMallMenuWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ItemMallMenuWin::`vftable'{for `IDirectMessenger'};
}
// 990A5C: using guessed type void (__thiscall *ItemMallMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 990A7C: using guessed type int (__thiscall *ItemMallMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0052E9F0) --------------------------------------------------------
void __thiscall ItemMallMenuWin::~ItemMallMenuWin(ItemMallMenuWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ItemMallMenuWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ItemMallMenuWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 990A5C: using guessed type void (__thiscall *ItemMallMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 990A7C: using guessed type int (__thiscall *ItemMallMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0052EA10) --------------------------------------------------------
void __thiscall ItemMallMenuWin::OnCmdOpenItemMall(ItemMallMenuWin *this)
{
  ItemMallMenuWin *v1; // esi@1
  PgFrameWork *v2; // ecx@1

  v1 = this;
  v2 = this->m_pkFrameWork;
  GameFrameWork::NcMiscItemShopUrlReq();
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}

//----- (0052EA30) --------------------------------------------------------
void __thiscall ItemMallMenuWin::OnCmdOpenUsingChargedItemList(ItemMallMenuWin *this)
{
  PgFrameWork *v1; // ecx@1

  v1 = this->m_pkFrameWork;
  if ( v1 )
    PgFrameWork::AddMsg(v1, 0xB9u, 0, 0);
}

//----- (0052EA50) --------------------------------------------------------
void ItemMallMenuWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "MallMenu");
}

//----- (0052EA80) --------------------------------------------------------
void __thiscall ItemMallMenuWin::OnCommand(ItemMallMenuWin *this, unsigned int wParam, int lParam)
{
  ItemMallMenuWin *v3; // esi@1
  GameFrameWork *v4; // eax@4
  PgFrameWork *v5; // ecx@6
  PgFrameWork *v6; // ecx@8

  v3 = this;
  switch ( wParam )
  {
    case 5u:
      v6 = this->m_pkFrameWork;
      GameFrameWork::NcMiscItemShopUrlReq();
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
      break;
    case 6u:
      v5 = this->m_pkFrameWork;
      if ( v5 )
        PgFrameWork::AddMsg(v5, 0xB9u, 0, 0);
      break;
    case 7u:
      v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v4 )
        GameFrameWork::OpenPlayGuideSearchList(v4, "MallMenu");
      break;
  }
}

//----- (0052EB00) --------------------------------------------------------
char __thiscall ItemMallMenuWin::Create(ItemMallMenuWin *this, PgFrameWork *pkFrameWork)
{
  ItemMallMenuWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  char result; // al@9
  int v8; // edi@10
  int v9; // ebx@10
  NiSourceTexture *v10; // eax@10
  PgSprData *v11; // eax@11
  PgSprData *v12; // eax@13
  PgSprData *v13; // eax@13
  PgSprData *v14; // edi@13
  NiSourceTexture *v15; // edi@13
  PgSprData *v16; // edi@14
  NiNode *v17; // esi@16
  PgFont *v18; // eax@21
  PgWinText *v19; // edi@21
  unsigned int v20; // ST54_4@21
  NiUnsharedGeometryGroup *v21; // eax@21
  PgSprData *v22; // edi@21
  NiPointer<PgSprData::PgHitTester> *v23; // edx@21
  unsigned int v24; // edi@21
  unsigned int v25; // ST54_4@21
  PgFont *v26; // eax@21
  PgWinText *v27; // edi@21
  unsigned int v28; // ST54_4@21
  NiUnsharedGeometryGroup *v29; // eax@21
  PgSprData *v30; // edi@21
  NiPointer<PgSprData::PgHitTester> *v31; // edx@21
  unsigned int v32; // edi@21
  unsigned int v33; // ST54_4@21
  PgFont *v34; // eax@21
  PgWinText *v35; // edi@21
  unsigned int v36; // ST54_4@21
  NiUnsharedGeometryGroup *v37; // eax@21
  PgSprData *v38; // edi@21
  NiPointer<PgSprData::PgHitTester> *v39; // edx@21
  unsigned int v40; // edi@21
  PgFont *v41; // eax@21
  PgWinText *v42; // edi@21
  NiRefObjectVtbl *v43; // ebx@21
  NiUnsharedGeometryGroup *v44; // eax@21
  NiNode *v45; // esi@22
  unsigned int uiWidth; // [sp+54h] [bp-20h]@15
  unsigned int uiHeight; // [sp+58h] [bp-1Ch]@15
  int uiLeft; // [sp+5Ch] [bp-18h]@4
  int uiTop; // [sp+60h] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+64h] [bp-10h]@1
  int v51; // [sp+70h] [bp-4h]@1
  int iYOff; // [sp+7Ch] [bp+8h]@10
  int iYOffa; // [sp+7Ch] [bp+8h]@21

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v51 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\MallMenu.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "ItemMallMenuWin", 0) )
  {
    v6 = spNode.m_pObject;
    v51 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = uiTop;
  v9 = uiLeft;
  iYOff = uiTop;
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v8, v11, (PgWin *)&v2->vfptr, 0, 0);
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop, v13, (PgWin *)&v2->vfptr, 0, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinCloseBut::CreateWin(uiLeft - v9, uiTop - iYOff, v14, (PgWin *)&v2->vfptr);
  v15 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, v15);
    PgSprData::Add(v16, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(v16, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v9, uiTop - iYOff, v16, (PgWin *)&v2->vfptr, 7u, 0, 0);
  }
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v18 = Font::Get(0);
    v19 = PgWinText::CreateWin(uiLeft - v9, uiTop, uiWidth, uiHeight, v18, (PgWin *)&v2->vfptr, 0, 0);
    v19->vfptr[122].__vecDelDtor((NiRefObject *)v19, 1u);
    v19->vfptr[117].__vecDelDtor((NiRefObject *)v19, (unsigned int)&Color::m_kDxWinTitleColor);
    v20 = (unsigned int)v19->vfptr;
    v21 = TextData::Get(0xF40ADF3A);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v20 + 472))(v19, v21);
    v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
    v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v22, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
    PgSprData::Add(v22, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
    PgWinBut::CreateWin(uiLeft - v9, uiTop, v22, (PgWin *)&v2->vfptr, 5u, 0, 0);
    v23 = v22->m_akHitTester.m_pBase;
    v24 = v23->m_pObject->m_uiHeight;
    v25 = v23->m_pObject->m_uiWidth;
    v26 = Font::Get(0);
    v27 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, v25, v24, v26, (PgWin *)&v2->vfptr, 0, 0);
    v27->vfptr[122].__vecDelDtor((NiRefObject *)v27, 5u);
    v28 = (unsigned int)v27->vfptr;
    v29 = TextData::Get(0x7C9CDAE8u);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v28 + 472))(v27, v29);
    v27->vfptr[60].__vecDelDtor((NiRefObject *)v27, 0);
    v30 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v30, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Click");
    PgSprData::Add(v30, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Over");
    PgWinBut::CreateWin(uiLeft - v9, uiTop, v30, (PgWin *)&v2->vfptr, 6u, 0, 0);
    v31 = v30->m_akHitTester.m_pBase;
    v32 = v31->m_pObject->m_uiHeight;
    v33 = v31->m_pObject->m_uiWidth;
    v34 = Font::Get(0);
    v35 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, v33, v32, v34, (PgWin *)&v2->vfptr, 0, 0);
    v35->vfptr[122].__vecDelDtor((NiRefObject *)v35, 5u);
    v36 = (unsigned int)v35->vfptr;
    v37 = TextData::Get(0x9286CA0u);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v36 + 472))(v35, v37);
    v35->vfptr[60].__vecDelDtor((NiRefObject *)v35, 0);
    v38 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v38, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Click");
    PgSprData::Add(v38, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Over");
    PgWinCloseBut::CreateWin(uiLeft - v9, uiTop - iYOff, v38, (PgWin *)&v2->vfptr);
    v39 = v38->m_akHitTester.m_pBase;
    v40 = v39->m_pObject->m_uiHeight;
    iYOffa = v39->m_pObject->m_uiWidth;
    v41 = Font::Get(0);
    v42 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOffa, v40, v41, (PgWin *)&v2->vfptr, 0, 0);
    v42->vfptr[122].__vecDelDtor((NiRefObject *)v42, 5u);
    v43 = v42->vfptr;
    v44 = TextData::Get(0x9FE7FBFC);
    v43[118].__vecDelDtor((NiRefObject *)v42, (unsigned int)v44);
    v42->vfptr[60].__vecDelDtor((NiRefObject *)v42, 0);
    ((void (__thiscall *)(ItemMallMenuWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    v51 = -1;
    if ( spNode.m_pObject )
    {
      v45 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v45 )
          v45->vfptr->__vecDelDtor((NiRefObject *)v45, 1u);
      }
    }
    result = 1;
  }
  else
  {
    v17 = spNode.m_pObject;
    v51 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v17 )
      v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0052F100) --------------------------------------------------------
ItemMallMenuWin *__cdecl ItemMallMenuWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  ItemMallMenuWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x158u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&ItemMallMenuWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&ItemMallMenuWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (ItemMallMenuWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 990A5C: using guessed type void (__thiscall *ItemMallMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 990A7C: using guessed type int (__thiscall *ItemMallMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0052F240) --------------------------------------------------------
ItemMallMenuWin *__thiscall ItemMallMenuWin::`scalar deleting destructor'(ItemMallMenuWin *this, unsigned int a2)
{
  ItemMallMenuWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ItemMallMenuWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ItemMallMenuWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 990A5C: using guessed type void (__thiscall *ItemMallMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 990A7C: using guessed type int (__thiscall *ItemMallMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0052F280) --------------------------------------------------------
void __usercall ShopInvWin::ShopInvWin(ShopInvWin *this@<ecx>, int a2@<ebx>, int a3@<edi>)
{
  ShopInvWin *v3; // esi@1

  v3 = this;
  ItemShopInvWin::ItemShopInvWin((ItemShopInvWin *)&this->vfptr, a2, a3);
  v3->vfptr = (NiRefObjectVtbl *)&ShopInvWin::`vftable'{for `NiNode'};
  v3->vfptr = (IDirectMessengerVtbl *)&ShopInvWin::`vftable'{for `IDirectMessenger'};
}
// 990E60: using guessed type void (__thiscall *ShopInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 990E7C: using guessed type int (__thiscall *ShopInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0052F2A0) --------------------------------------------------------
void __thiscall ShopInvWin::~ShopInvWin(ShopInvWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ShopInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ShopInvWin::`vftable'{for `IDirectMessenger'};
  ItemShopInvWin::~ItemShopInvWin((ItemShopInvWin *)&this->vfptr);
}
// 990E60: using guessed type void (__thiscall *ShopInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 990E7C: using guessed type int (__thiscall *ShopInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0052F300) --------------------------------------------------------
void ItemShopWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "NPCItem");
}

//----- (0052F330) --------------------------------------------------------
unsigned int __thiscall ItemShopWin::GetSellItemNum(ItemShopWin *this)
{
  unsigned int v1; // eax@1
  unsigned int result; // eax@2

  v1 = this->m_uiCurPageType;
  if ( v1 )
  {
    if ( v1 == 1 )
    {
      result = Market::GetTotalArmor();
    }
    else if ( v1 == 3 )
    {
      result = Market::GetTotalRepurchase();
    }
    else
    {
      result = Market::GetTotalAcc();
    }
  }
  else
  {
    result = Market::GetTotalWeapon();
  }
  return result;
}

//----- (0052F360) --------------------------------------------------------
unsigned int __thiscall ItemShopWin::GetMaxPageNum(ItemShopWin *this)
{
  unsigned int v1; // eax@1
  unsigned int v2; // eax@2
  unsigned int result; // eax@9

  v1 = this->m_uiCurPageType;
  if ( v1 )
  {
    if ( v1 == 1 )
    {
      v2 = Market::GetTotalArmor();
    }
    else if ( v1 == 3 )
    {
      v2 = Market::GetTotalRepurchase();
    }
    else
    {
      v2 = Market::GetTotalAcc();
    }
  }
  else
  {
    v2 = Market::GetTotalWeapon();
  }
  if ( v2 )
    result = (v2 - 1) / 0x2A + 1;
  else
    result = 1;
  return result;
}

//----- (0052F3B0) --------------------------------------------------------
ShopInvWin *__thiscall ItemShopWin::GetInvWin(ItemShopWin *this, unsigned int uiIndex)
{
  ShopInvWin *result; // eax@2

  if ( uiIndex < 0x2A )
    result = this->m_apkInvWin[uiIndex];
  else
    result = 0;
  return result;
}

//----- (0052F3D0) --------------------------------------------------------
void __thiscall ItemShopWin::DeleteRepurchaseInv(ItemShopWin *this, unsigned __int16 nHandle)
{
  ItemShopWin *v2; // ebx@1
  unsigned int v3; // edi@1
  unsigned int v4; // eax@1
  int v5; // esi@1
  ItemRepurchase *v6; // eax@3
  unsigned int v7; // [sp+Ch] [bp-4h]@1
  ItemShopInvWin **nHandlea; // [sp+18h] [bp+8h]@2

  v2 = this;
  v3 = Market::FindRepurchase(nHandle);
  v4 = Market::GetTotalRepurchase();
  v5 = 0;
  v7 = v4 - v3;
  if ( v4 != v3 )
  {
    nHandlea = (ItemShopInvWin **)&v2->m_apkInvWin[v3 + 1];
    do
    {
      v6 = ItemShopInvWin::GetRepurchaseItem(*nHandlea);
      if ( v2->m_uiCurPageType == 3 )
      {
        if ( v5 + v3 == 41 )
          ItemShopInvWin::SetItemIcon((ItemShopInvWin *)&v2->m_apkInvWin[v5 + v3]->vfptr, 0);
        else
          ItemShopInvWin::SetItemIcon((ItemShopInvWin *)&v2->m_apkInvWin[v5 + v3]->vfptr, v6);
      }
      ++nHandlea;
      ++v5;
    }
    while ( v5 < v7 );
  }
  Market::DeleteRepurchase(v3);
}

//----- (0052F460) --------------------------------------------------------
void __thiscall ItemShopWin::AddRepurchaseInv(ItemShopWin *this, PROTO_NC_ITEM_SELL_ITEM_INSERT_CMD *pkRepurItem)
{
  ItemShopWin *v2; // esi@1
  unsigned int v3; // eax@1
  unsigned int v4; // edi@1
  ItemRepurchase *v5; // eax@1
  ItemRepurchase *v6; // eax@3

  v2 = this;
  v3 = Market::GetTotalRepurchase();
  v4 = v3;
  v5 = ItemShopInvWin::GetRepurchaseItem((ItemShopInvWin *)&v2->m_apkInvWin[v3]->vfptr);
  if ( !v5 || !v5->pItem )
  {
    v6 = Market::AddRepurchase(pkRepurItem);
    if ( v2->m_uiCurPageType == 3 )
      ItemShopInvWin::SetRepurchaseItem((ItemShopInvWin *)&v2->m_apkInvWin[v4]->vfptr, v6);
  }
}

//----- (0052F4B0) --------------------------------------------------------
void __userpurge ShopInvWin::SetItem(ShopInvWin *this@<ecx>, int a2@<ebx>, PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *pkInfo)
{
  ShopInvWin *v3; // esi@1
  int v4; // eax@3
  int v5; // eax@3

  v3 = this;
  ItemShopInvWin::SetItem((ItemShopInvWin *)&this->vfptr, a2, pkInfo);
  if ( pkInfo )
  {
    if ( pkInfo->item != -1 )
    {
      Singleton<Tutorial>::getInstance();
      v3->vfptr[60].__vecDelDtor((NiRefObject *)v3, *(_BYTE *)(v4 + 12) == 0);
      Singleton<Tutorial>::getInstance();
      IconWin::IconDisable((IconWin *)&v3->vfptr, *(_BYTE *)(v5 + 12));
    }
  }
}

//----- (0052F510) --------------------------------------------------------
void __thiscall ItemShopWin::ItemShopWin(ItemShopWin *this)
{
  ItemShopWin *v1; // esi@1
  int v2; // eax@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ItemShopWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ItemShopWin::`vftable'{for `IDirectMessenger'};
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  v1->m_kDrop.m_pkSender = 0;
  v2 = (int)&v1->m_kDropContents;
  *(_DWORD *)v2 = &DropContents::`vftable';
  *(_DWORD *)(v2 + 64) = 0;
  *(_WORD *)(v2 + 60) = -1;
  v1->m_kDrop.m_pkContents = &v1->m_kDropContents;
  v1->m_uiCurPage = 0;
  v1->m_uiCurPageType = 0;
  v1->m_pkTitleTextWin = 0;
  memset(v1->m_apkInvWin, 0, sizeof(v1->m_apkInvWin));
  v1->m_pkPageText = 0;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9910EC: using guessed type void (__thiscall *ItemShopWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99110C: using guessed type int (__thiscall *ItemShopWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0052F590) --------------------------------------------------------
void __thiscall ItemShopWin::~ItemShopWin(ItemShopWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ItemShopWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ItemShopWin::`vftable'{for `IDirectMessenger'};
  this->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  this->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9910EC: using guessed type void (__thiscall *ItemShopWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99110C: using guessed type int (__thiscall *ItemShopWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0052F5D0) --------------------------------------------------------
void __thiscall ItemShopWin::OnCancel(ItemShopWin *this)
{
  GameFrameWork::CloseShopMenu((GameFrameWork *)this->m_pkFrameWork, 1);
}

//----- (0052F5E0) --------------------------------------------------------
void __thiscall ItemShopWin::UpdatePageInfo(ItemShopWin *this)
{
  ItemShopWin *v1; // esi@1
  NiRefObjectVtbl *v2; // edi@2
  unsigned int v3; // eax@2
  char *v4; // eax@2

  v1 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[65].__vecDelDtor)() )
  {
    v2 = v1->m_pkPageText->vfptr;
    v3 = ItemShopWin::GetMaxPageNum(v1);
    v4 = fs("%d / %d", v1->m_uiCurPage + 1, v3);
    v2[118].__vecDelDtor((NiRefObject *)v1->m_pkPageText, (unsigned int)v4);
  }
}

//----- (0052F630) --------------------------------------------------------
void __thiscall ItemShopWin::OnInvRClick(ItemShopWin *this, unsigned int uiInvIndex)
{
  unsigned int v2; // esi@1
  ItemShopWin *v3; // edi@1
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v4; // eax@1
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v5; // ebx@1
  ItemRepurchase *v6; // eax@1
  ItemRepurchase *v7; // esi@1
  int v8; // esi@2
  int v9; // edi@2
  int v10; // esi@3
  int *v11; // eax@6
  unsigned int v12; // ebx@9
  GameFrameWork *v13; // esi@10
  NiUnsharedGeometryGroup *v14; // eax@11
  unsigned int v15; // ebx@14
  ItemShopWin *v16; // [sp+Ch] [bp-4h]@1
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *pkSellInfo; // [sp+18h] [bp+8h]@1

  v2 = uiInvIndex;
  v3 = this;
  v16 = this;
  v4 = ItemShopInvWin::GetItem((ItemShopInvWin *)&this->m_apkInvWin[uiInvIndex]->vfptr);
  v5 = v4;
  pkSellInfo = v4;
  v6 = ItemShopInvWin::GetRepurchaseItem((ItemShopInvWin *)&v3->m_apkInvWin[v2]->vfptr);
  v7 = v6;
  if ( v5 )
  {
    v8 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    v9 = v5->item;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v9) )
    {
      if ( (unsigned __int16)v9 <= *(_WORD *)(v8 + 200) )
      {
        v11 = (int *)(*(_DWORD *)(v8 + 196) + 4 * v9);
        if ( *v11 )
          v10 = *v11;
        else
          v10 = 0;
      }
      else
      {
        v10 = 0;
      }
    }
    else
    {
      v10 = 0;
    }
    v12 = *(_DWORD *)(v10 + 211);
    if ( v12 > (signed __int64)User::GetMoney(&g_kUser) )
    {
      v13 = (GameFrameWork *)v16->m_pkFrameWork;
LABEL_11:
      v14 = TextData::Get(0x304F413Du);
      GameFrameWork::AddSysMsg(v13, (const char *)v14);
      return;
    }
    GameFrameWork::NcItemBuyReq((GameFrameWork *)v16->m_pkFrameWork, pkSellInfo->item, *(_DWORD *)(v10 + 106));
  }
  else if ( v6 )
  {
    v15 = v6->pItem->m_pkInfo->SellPrice;
    if ( v15 > (signed __int64)User::GetMoney(&g_kUser) )
    {
      v13 = (GameFrameWork *)v16->m_pkFrameWork;
      goto LABEL_11;
    }
    GameFrameWork::NcItemRepurchaseReq((GameFrameWork *)v16->m_pkFrameWork, v7->nHandle);
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0052F760) --------------------------------------------------------
void __thiscall ItemShopWin::ResetContents(ItemShopWin *this)
{
  ItemShopInvWin **v1; // edi@1
  ItemShopInvWin **v2; // esi@2
  unsigned int v3; // ebx@2
  unsigned int v4; // eax@4
  unsigned int v5; // esi@4
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v6; // eax@8
  ItemShopInvWin *v7; // ebx@8
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v8; // esi@8
  Tutorial *v9; // eax@10
  Tutorial *v10; // eax@11
  Tutorial *v11; // eax@15
  Tutorial *v12; // eax@16
  unsigned int v13; // ebx@24
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v14; // eax@27
  ItemShopInvWin *v15; // esi@27
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v16; // edi@27
  int v17; // eax@29
  int v18; // eax@29
  ItemRepurchase *v19; // eax@35
  unsigned int v20; // ebx@37
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v21; // eax@40
  ItemShopInvWin *v22; // esi@40
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v23; // edi@40
  int v24; // eax@42
  int v25; // eax@42
  unsigned int v26; // eax@45
  unsigned int v27; // eax@46
  unsigned int v28; // ecx@53
  NiRefObjectVtbl *v29; // esi@55
  char *v30; // eax@55
  ItemShopWin *v31; // [sp+14h] [bp-1Ch]@1
  unsigned int v32; // [sp+18h] [bp-18h]@6
  ItemShopInvWin **v33; // [sp+18h] [bp-18h]@25
  ItemShopInvWin **v34; // [sp+18h] [bp-18h]@38
  unsigned int i; // [sp+1Ch] [bp-14h]@5
  unsigned int ia; // [sp+1Ch] [bp-14h]@25
  unsigned int ib; // [sp+1Ch] [bp-14h]@38
  unsigned int uiTotal; // [sp+20h] [bp-10h]@5
  unsigned int uiTotala; // [sp+20h] [bp-10h]@24
  unsigned int uiTotalb; // [sp+20h] [bp-10h]@33
  unsigned int uiTotalc; // [sp+20h] [bp-10h]@37

  v31 = this;
  v1 = (ItemShopInvWin **)this->m_apkInvWin;
  if ( this->m_apkInvWin[0] )
  {
    v2 = (ItemShopInvWin **)this->m_apkInvWin;
    v3 = 42;
    do
    {
      ItemShopInvWin::SetItem(*v2, v3, 0);
      ItemShopInvWin::SetRepurchaseItem(*v2, 0);
      ++v2;
      --v3;
    }
    while ( v3 );
    v4 = v31->m_uiCurPageType;
    v5 = 42 * v31->m_uiCurPage;
    if ( v4 )
    {
      if ( v4 == 1 )
      {
        uiTotala = Market::GetTotalArmor();
        v13 = v5;
        if ( v5 < uiTotala )
        {
          ia = 0;
          v33 = v1;
          do
          {
            if ( ia >= 0x2A )
              break;
            v14 = Market::GetArmor(v13);
            v15 = *v33;
            v16 = v14;
            ItemShopInvWin::SetItem(*v33, v13, v14);
            if ( v16 && v16->item != -1 )
            {
              Singleton<Tutorial>::getInstance();
              v15->vfptr[60].__vecDelDtor((NiRefObject *)v15, *(_BYTE *)(v17 + 12) == 0);
              Singleton<Tutorial>::getInstance();
              IconWin::IconDisable((IconWin *)&v15->vfptr, *(_BYTE *)(v18 + 12));
            }
            ++v33;
            ++ia;
            ++v13;
          }
          while ( v13 < uiTotala );
        }
      }
      else if ( v4 == 3 )
      {
        for ( uiTotalb = Market::GetTotalRepurchase(); v5 < uiTotalb; ++v3 )
        {
          if ( v3 >= 0x2A )
            break;
          v19 = Market::GetRepurchase(v5);
          ItemShopInvWin::SetRepurchaseItem(*v1, v19);
          ++v5;
          ++v1;
        }
      }
      else
      {
        uiTotalc = Market::GetTotalAcc();
        v20 = v5;
        if ( v5 < uiTotalc )
        {
          ib = 0;
          v34 = v1;
          do
          {
            if ( ib >= 0x2A )
              break;
            v21 = Market::GetAcc(v20);
            v22 = *v34;
            v23 = v21;
            ItemShopInvWin::SetItem(*v34, v20, v21);
            if ( v23 && v23->item != -1 )
            {
              Singleton<Tutorial>::getInstance();
              v22->vfptr[60].__vecDelDtor((NiRefObject *)v22, *(_BYTE *)(v24 + 12) == 0);
              Singleton<Tutorial>::getInstance();
              IconWin::IconDisable((IconWin *)&v22->vfptr, *(_BYTE *)(v25 + 12));
            }
            ++v34;
            ++ib;
            ++v20;
          }
          while ( v20 < uiTotalc );
        }
      }
    }
    else
    {
      uiTotal = Market::GetTotalWeapon();
      i = v5;
      if ( v5 < uiTotal )
      {
        v32 = 0;
        do
        {
          if ( v32 >= 0x2A )
            break;
          v6 = Market::GetWeaopn(i);
          v7 = *v1;
          v8 = v6;
          ItemShopInvWin::SetItem(v7, (int)v7, v6);
          if ( v8 && v8->item != -1 )
          {
            v9 = Singleton<Tutorial>::m_pInstance;
            if ( !Singleton<Tutorial>::m_pInstance )
            {
              v10 = (Tutorial *)operator new(0xB4u);
              if ( v10 )
                Tutorial::Tutorial(v10);
              else
                v9 = 0;
              Singleton<Tutorial>::m_pInstance = v9;
            }
            v7->vfptr[60].__vecDelDtor((NiRefObject *)v7, v9->m_bLockItemShop == 0);
            v11 = Singleton<Tutorial>::m_pInstance;
            if ( !Singleton<Tutorial>::m_pInstance )
            {
              v12 = (Tutorial *)operator new(0xB4u);
              if ( v12 )
                Tutorial::Tutorial(v12);
              else
                v11 = 0;
              Singleton<Tutorial>::m_pInstance = v11;
            }
            IconWin::IconDisable((IconWin *)&v7->vfptr, v11->m_bLockItemShop);
          }
          ++v32;
          ++v1;
          ++i;
        }
        while ( i < uiTotal );
      }
    }
    if ( (unsigned __int8)((int (__thiscall *)(ItemShopWin *))v31->vfptr[65].__vecDelDtor)(v31) )
    {
      v26 = v31->m_uiCurPageType;
      if ( v26 )
      {
        if ( v26 == 1 )
        {
          v27 = Market::GetTotalArmor();
        }
        else if ( v26 == 3 )
        {
          v27 = Market::GetTotalRepurchase();
        }
        else
        {
          v27 = Market::GetTotalAcc();
        }
      }
      else
      {
        v27 = Market::GetTotalWeapon();
      }
      if ( v27 )
        v28 = (v27 - 1) / 0x2A + 1;
      else
        v28 = 1;
      v29 = v31->m_pkPageText->vfptr;
      v30 = fs("%d / %d", v31->m_uiCurPage + 1, v28);
      v29[118].__vecDelDtor((NiRefObject *)v31->m_pkPageText, (unsigned int)v30);
    }
  }
}

//----- (0052FAD0) --------------------------------------------------------
void __thiscall ItemShopWin::OnShowWin(ItemShopWin *this)
{
  ItemShopWin *v1; // esi@1
  NiRefObjectVtbl *v2; // edi@2
  unsigned int v3; // eax@2
  char *v4; // eax@2

  v1 = this;
  PgWin::OnShowWin((PgWin *)&this->vfptr);
  if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v1->vfptr[65].__vecDelDtor)(v1) )
  {
    v2 = v1->m_pkPageText->vfptr;
    v3 = ItemShopWin::GetMaxPageNum(v1);
    v4 = fs("%d / %d", v1->m_uiCurPage + 1, v3);
    v2[118].__vecDelDtor((NiRefObject *)v1->m_pkPageText, (unsigned int)v4);
  }
}

//----- (0052FB20) --------------------------------------------------------
void __thiscall ItemShopWin::OnSetPage(ItemShopWin *this, unsigned int uiPage)
{
  this->m_uiCurPage = uiPage;
  ItemShopWin::ResetContents(this);
}

//----- (0052FB40) --------------------------------------------------------
void __thiscall ItemShopWin::ResetPage(ItemShopWin *this)
{
  this->m_uiCurPage = 0;
  this->m_uiCurPageType = 0;
  ItemShopWin::ResetContents(this);
}

//----- (0052FB60) --------------------------------------------------------
void __thiscall ItemShopWin::OnWeapon(ItemShopWin *this)
{
  ItemShopWin *v1; // esi@1
  Tutorial *v2; // eax@1
  Tutorial *v3; // eax@2

  v1 = this;
  v2 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v3 = (Tutorial *)operator new(0xB4u);
    if ( v3 )
      Tutorial::Tutorial(v3);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  if ( !v2->m_bLockItemShopTab )
  {
    if ( v1->m_uiCurPageType )
    {
      v1->m_uiCurPageType = 0;
      v1->m_uiCurPage = 0;
      ItemShopWin::ResetContents(v1);
    }
  }
}

//----- (0052FC00) --------------------------------------------------------
void __thiscall ItemShopWin::OnArmor(ItemShopWin *this)
{
  ItemShopWin *v1; // esi@1
  Tutorial *v2; // eax@1
  Tutorial *v3; // eax@2

  v1 = this;
  v2 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v3 = (Tutorial *)operator new(0xB4u);
    if ( v3 )
      Tutorial::Tutorial(v3);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  if ( !v2->m_bLockItemShopTab && v1->m_uiCurPageType != 1 )
  {
    v1->m_uiCurPageType = 1;
    v1->m_uiCurPage = 0;
    ItemShopWin::ResetContents(v1);
  }
}

//----- (0052FCA0) --------------------------------------------------------
void __thiscall ItemShopWin::OnAcc(ItemShopWin *this)
{
  ItemShopWin *v1; // esi@1
  Tutorial *v2; // eax@1
  Tutorial *v3; // eax@2

  v1 = this;
  v2 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v3 = (Tutorial *)operator new(0xB4u);
    if ( v3 )
      Tutorial::Tutorial(v3);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  if ( !v2->m_bLockItemShopTab && v1->m_uiCurPageType != 2 )
  {
    v1->m_uiCurPageType = 2;
    v1->m_uiCurPage = 0;
    ItemShopWin::ResetContents(v1);
  }
}

//----- (0052FD40) --------------------------------------------------------
void __thiscall ItemShopWin::OnRepurchase(ItemShopWin *this)
{
  ItemShopWin *v1; // esi@1
  Tutorial *v2; // eax@1
  Tutorial *v3; // eax@2

  v1 = this;
  v2 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v3 = (Tutorial *)operator new(0xB4u);
    if ( v3 )
      Tutorial::Tutorial(v3);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  if ( !v2->m_bLockItemShopTab && v1->m_uiCurPageType != 3 )
  {
    v1->m_uiCurPageType = 3;
    v1->m_uiCurPage = 0;
    ItemShopWin::ResetContents(v1);
  }
}

//----- (0052FDE0) --------------------------------------------------------
void __thiscall ItemShopWin::OnPrevPage(ItemShopWin *this)
{
  ItemShopWin *v1; // esi@1
  Tutorial *v2; // eax@1
  Tutorial *v3; // eax@2
  unsigned int v4; // eax@7

  v1 = this;
  v2 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v3 = (Tutorial *)operator new(0xB4u);
    if ( v3 )
      Tutorial::Tutorial(v3);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  if ( !v2->m_bLockItemShopTab )
  {
    v4 = v1->m_uiCurPage;
    if ( v4 )
      v1->m_uiCurPage = v4 - 1;
    ItemShopWin::ResetContents(v1);
  }
}

//----- (0052FE70) --------------------------------------------------------
void __thiscall ItemShopWin::OnNextPage(ItemShopWin *this)
{
  ItemShopWin *v1; // esi@1
  Tutorial *v2; // eax@1
  Tutorial *v3; // eax@2
  unsigned int v4; // eax@7
  unsigned int v5; // eax@8
  unsigned int v6; // ecx@14

  v1 = this;
  v2 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v3 = (Tutorial *)operator new(0xB4u);
    if ( v3 )
      Tutorial::Tutorial(v3);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  if ( !v2->m_bLockItemShopTab )
  {
    v4 = v1->m_uiCurPageType;
    if ( v4 )
    {
      if ( v4 == 1 )
      {
        v5 = Market::GetTotalArmor();
      }
      else if ( v4 == 3 )
      {
        v5 = Market::GetTotalRepurchase();
      }
      else
      {
        v5 = Market::GetTotalAcc();
      }
    }
    else
    {
      v5 = Market::GetTotalWeapon();
    }
    v6 = v1->m_uiCurPage;
    if ( 42 * (v6 + 1) < v5 )
      v1->m_uiCurPage = v6 + 1;
    ItemShopWin::ResetContents(v1);
  }
}

//----- (0052FF40) --------------------------------------------------------
void __thiscall ItemShopWin::OnCommand(ItemShopWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 1u:
      ItemShopWin::OnInvRClick(this, lParam);
      break;
    case 2u:
      ItemShopWin::OnWeapon(this);
      break;
    case 3u:
      ItemShopWin::OnArmor(this);
      break;
    case 4u:
      ItemShopWin::OnAcc(this);
      break;
    case 5u:
      ItemShopWin::OnRepurchase(this);
      break;
    case 6u:
      ItemShopWin::OnPrevPage(this);
      break;
    case 7u:
      ItemShopWin::OnNextPage(this);
      break;
    case 9u:
      GameFrameWork::CloseShopMenu((GameFrameWork *)this->m_pkFrameWork, 1);
      break;
    case 0xBu:
      ItemShopWin::OnHelpLink();
      break;
    case 0xCu:
      this->m_uiCurPage = lParam;
      ItemShopWin::ResetContents(this);
      break;
    default:
      return;
  }
}

//----- (00530000) --------------------------------------------------------
ShopInvWin *__usercall ShopInvWin::CreateWin@<eax>(int a1@<ebx>, int a2@<edi>, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent)
{
  PgWin *v6; // eax@1
  PgWin *v7; // esi@1
  PgWin *v8; // edi@8
  ShopInvWin *v9; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v11; // [sp+20h] [bp-4h]@1

  v6 = (PgWin *)operator new(0x1CCu);
  v7 = v6;
  result.m_pObject = v6;
  v11 = 0;
  if ( v6 )
  {
    ItemShopInvWin::ItemShopInvWin((ItemShopInvWin *)v6, a1, a2);
    v7->vfptr = (NiRefObjectVtbl *)&ShopInvWin::`vftable'{for `NiNode'};
    v7->vfptr = (IDirectMessengerVtbl *)&ShopInvWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v7 = 0;
  }
  if ( v7 )
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  v11 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v7);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, PgWin *))v7->vfptr[154].__vecDelDtor)(
                          v7,
                          iXPos,
                          iYPos,
                          uiInvIndex,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v7->vfptr[89].__vecDelDtor)(v7);
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = (ShopInvWin *)v7;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v7);
    if ( result.m_pObject )
    {
      v8 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v8 )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      }
    }
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = 0;
  }
  return v9;
}
// 990E60: using guessed type void (__thiscall *ShopInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 990E7C: using guessed type int (__thiscall *ShopInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00530150) --------------------------------------------------------
ItemShopWin *__cdecl ItemShopWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  ItemShopWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x268u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    ItemShopWin::ItemShopWin((ItemShopWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (ItemShopWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00530280) --------------------------------------------------------
char __thiscall ItemShopWin::Create(ItemShopWin *this, PgFrameWork *pkFrameWork)
{
  ItemShopWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  LONG v5; // eax@3
  const char *v7; // eax@10
  PgSprData *v8; // eax@11
  int v9; // edi@12
  int v10; // ebx@12
  NiSourceTexture *v11; // eax@12
  PgSprData *v12; // eax@13
  PgSprData *v13; // eax@17
  PgWinSpr *v14; // eax@17
  PgSprData *v15; // eax@17
  PgFont *v16; // eax@19
  PgWinText *v17; // eax@19
  NiRefObjectVtbl *v18; // edx@19
  NiUnsharedGeometryGroup *v19; // eax@19
  PgSprData *v20; // eax@19
  PgSprData *v21; // eax@20
  NiRefObjectVtbl *v22; // eax@20
  PgWinText *v23; // ecx@20
  char *v24; // eax@21
  NiSourceTexture *v25; // ST44_4@21
  char *v26; // eax@21
  NiSourceTexture *v27; // ST44_4@21
  char *v28; // eax@21
  NiSourceTexture *v29; // ST44_4@21
  char *v30; // eax@21
  char *v31; // eax@21
  char *v32; // eax@21
  PgSprData *v33; // eax@21
  PgFont *v34; // eax@24
  PgWinText *v35; // eax@24
  NiNode *v36; // esi@25
  unsigned int uiHeight; // [sp+3Ch] [bp-58h]@17
  NiSourceTexture *pkTexture10; // [sp+40h] [bp-54h]@20
  unsigned int uiWidth; // [sp+44h] [bp-50h]@17
  int i; // [sp+48h] [bp-4Ch]@8
  NiSourceTexture *pkTexture; // [sp+4Ch] [bp-48h]@1
  int uiTop; // [sp+50h] [bp-44h]@11
  int uiLeft; // [sp+54h] [bp-40h]@11
  NiPointer<NiNode> spNode; // [sp+58h] [bp-3Ch]@1
  PgWinText *pkTextWin; // [sp+5Ch] [bp-38h]@15
  char acShapeName[33]; // [sp+60h] [bp-34h]@20
  int v47; // [sp+90h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v47 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  pkTexture = v3;
  if ( !v3 )
    goto LABEL_31;
  i = (int)pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v7 = Folder::Merge(&Folder::m_acMenu, "Game\\NPCItem.nif");
  PgUtil::LoadNodeNifFile(v7, &spNode, (NiTexturePalette *)i);
  if ( !spNode.m_pObject )
    return 0;
  v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v8, 0, pkFrameWork, "ItemShopWin", 0) )
  {
LABEL_31:
    v4 = spNode.m_pObject;
    v47 = -1;
    if ( spNode.m_pObject )
    {
      v5 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
      goto LABEL_4;
    }
    return 0;
  }
  v9 = uiLeft;
  v10 = uiTop;
  v11 = MenuTexMgr::GetTexture(0x13u);
  if ( v11 )
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v11);
  else
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v12, (PgWin *)&v2->vfptr, 0, 0);
  pkTextWin = (PgWinText *)PgSprData::Create(
                             (NiAVObject *)&spNode.m_pObject->vfptr,
                             "ClsNor",
                             &uiLeft,
                             &uiTop,
                             pkTexture);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 9u, 0, 0);
  i = (int)MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "HelpLinkNor",
                               &uiLeft,
                               &uiTop,
                               (NiSourceTexture *)i);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xBu, 0, 0);
  }
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
  v14 = PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v13, (PgWin *)&v2->vfptr, 0, 0);
  v14->vfptr[60].__vecDelDtor((NiRefObject *)v14, 0);
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, pkTexture);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v15, (PgWin *)&v2->vfptr, 0, 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "WinTitle",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
  {
    v47 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  v16 = Font::Get(0);
  v17 = PgWinText::CreateWin(uiLeft - v9, uiTop - v10 + 2, uiWidth, uiHeight, v16, (PgWin *)&v2->vfptr, 0, 0);
  v18 = v17->vfptr;
  pkTextWin = v17;
  v18[122].__vecDelDtor((NiRefObject *)v17, 5u);
  ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
  i = (int)&pkTextWin->vfptr[118];
  v19 = TextData::Get(0xF0574438);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))i)(pkTextWin, v19);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  v20 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, pkTexture);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v20, (PgWin *)&v2->vfptr, 0, 0);
  i = 0;
  pkTextWin = (PgWinText *)v2->m_apkInvWin;
  do
  {
    pkTexture10 = (NiSourceTexture *)(i + 1);
    sprintf(acShapeName, "IconSlot%03d", i + 1);
    v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, pkTexture);
    PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v21, (PgWin *)&v2->vfptr, 0, 0);
    v22 = (NiRefObjectVtbl *)ShopInvWin::CreateWin(v10, v9, uiLeft - v9 + 1, uiTop - v10 + 1, i, (PgWin *)&v2->vfptr);
    pkTextWin->vfptr = v22;
    ItemShopInvWin::SetItem((ItemShopInvWin *)v22, v10, 0);
    (*((void (__stdcall **)(_DWORD))pkTextWin->vfptr->__vecDelDtor + 129))(0);
    (*((void (__stdcall **)(_DWORD))pkTextWin->vfptr->__vecDelDtor + 140))(1);
    v23 = pkTextWin;
    pkTextWin->vfptr[68].__vecDelDtor = (void *(__thiscall *)(NiRefObject *, unsigned int))g_pkItemInfoWin;
    i = (int)pkTexture10;
    pkTextWin = (PgWinText *)((char *)v23 + 4);
  }
  while ( (signed int)pkTexture10 < 42 );
  pkTexture = MenuTexMgr::GetTexture(0x1Du);
  pkTextWin = (PgWinText *)PgSprData::Create(
                             (NiAVObject *)&spNode.m_pObject->vfptr,
                             "WeaNor",
                             &uiLeft,
                             &uiTop,
                             pkTexture);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "WeaClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "WeaOver");
  pkTextWin = (PgWinText *)PgWinBut::CreateWin(
                             uiLeft - v9,
                             uiTop - v10,
                             (PgSprData *)pkTextWin,
                             (PgWin *)&v2->vfptr,
                             2u,
                             0,
                             0);
  v24 = (char *)TextData::Get(0xDC05F8EC);
  PgWin::SetToolTipWinText((PgWin *)&pkTextWin->vfptr, v24);
  v25 = pkTexture;
  pkTextWin->m_pkToolTipWin = g_pkToolTipWin;
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ArmNor", &uiLeft, &uiTop, v25);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ArmClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ArmOver");
  pkTextWin = (PgWinText *)PgWinBut::CreateWin(
                             uiLeft - v9,
                             uiTop - v10,
                             (PgSprData *)pkTextWin,
                             (PgWin *)&v2->vfptr,
                             3u,
                             0,
                             0);
  v26 = (char *)TextData::Get(0x9BF2F7F8);
  PgWin::SetToolTipWinText((PgWin *)&pkTextWin->vfptr, v26);
  v27 = pkTexture;
  pkTextWin->m_pkToolTipWin = g_pkToolTipWin;
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "AccNor", &uiLeft, &uiTop, v27);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "AccClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "AccOver");
  pkTextWin = (PgWinText *)PgWinBut::CreateWin(
                             uiLeft - v9,
                             uiTop - v10,
                             (PgSprData *)pkTextWin,
                             (PgWin *)&v2->vfptr,
                             4u,
                             0,
                             0);
  v28 = (char *)TextData::Get(0x8CA0A8EE);
  PgWin::SetToolTipWinText((PgWin *)&pkTextWin->vfptr, v28);
  v29 = pkTexture;
  pkTextWin->m_pkToolTipWin = g_pkToolTipWin;
  pkTextWin = (PgWinText *)PgSprData::Create(
                             (NiAVObject *)&spNode.m_pObject->vfptr,
                             "RepurchaseNor",
                             &uiLeft,
                             &uiTop,
                             v29);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "RepurchaseClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "RepurchaseOver");
  pkTextWin = (PgWinText *)PgWinBut::CreateWin(
                             uiLeft - v9,
                             uiTop - v10,
                             (PgSprData *)pkTextWin,
                             (PgWin *)&v2->vfptr,
                             5u,
                             0,
                             0);
  v30 = (char *)TextData3::Get(0x2392E3Eu);
  PgWin::SetToolTipWinText((PgWin *)&pkTextWin->vfptr, v30);
  pkTextWin->m_pkToolTipWin = g_pkToolTipWin;
  pkTexture = MenuTexMgr::GetTexture(4u);
  pkTexture10 = MenuTexMgr::GetTexture(0x1Cu);
  pkTextWin = (PgWinText *)PgSprData::Create(
                             (NiAVObject *)&spNode.m_pObject->vfptr,
                             "PrePageNor",
                             &uiLeft,
                             &uiTop,
                             pkTexture10);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "PrePageClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "PrePageOver");
  pkTextWin = (PgWinText *)PgWinBut::CreateWin(
                             uiLeft - v9,
                             uiTop - v10,
                             (PgSprData *)pkTextWin,
                             (PgWin *)&v2->vfptr,
                             6u,
                             0,
                             0);
  pkTextWin->m_pkToolTipWin = g_pkToolTipWin;
  v31 = (char *)TextData3::Get(0x6A8A9870u);
  PgWin::SetToolTipWinText((PgWin *)&pkTextWin->vfptr, v31);
  pkTextWin = (PgWinText *)PgSprData::Create(
                             (NiAVObject *)&spNode.m_pObject->vfptr,
                             "NextPageNor",
                             &uiLeft,
                             &uiTop,
                             pkTexture10);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "NextPageClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "NextPageOver");
  pkTextWin = (PgWinText *)PgWinBut::CreateWin(
                             uiLeft - v9,
                             uiTop - v10,
                             (PgSprData *)pkTextWin,
                             (PgWin *)&v2->vfptr,
                             7u,
                             0,
                             0);
  pkTextWin->m_pkToolTipWin = g_pkToolTipWin;
  v32 = (char *)TextData3::Get(0x25449D82u);
  PgWin::SetToolTipWinText((PgWin *)&pkTextWin->vfptr, v32);
  v33 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Number", &uiLeft, &uiTop, pkTexture);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v33, (PgWin *)&v2->vfptr, 0, 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "Number01",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
  {
    v4 = spNode.m_pObject;
    v47 = -1;
    if ( spNode.m_pObject )
    {
      v5 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
LABEL_4:
      if ( !v5 )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
      return 0;
    }
    return 0;
  }
  v34 = Font::Get(0);
  v35 = PgWinText::CreateWin(uiLeft - v9, uiTop - v10, uiWidth, uiHeight, v34, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkPageText = v35;
  v35->vfptr[122].__vecDelDtor((NiRefObject *)v35, 5u);
  ((void (__thiscall *)(ItemShopWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  v47 = -1;
  if ( spNode.m_pObject )
  {
    v36 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v36 )
        v36->vfptr->__vecDelDtor((NiRefObject *)v36, 1u);
    }
  }
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00530B20) --------------------------------------------------------
ShopInvWin *__thiscall ShopInvWin::`scalar deleting destructor'(ShopInvWin *this, unsigned int a2)
{
  ShopInvWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ShopInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ShopInvWin::`vftable'{for `IDirectMessenger'};
  ItemShopInvWin::~ItemShopInvWin((ItemShopInvWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 990E60: using guessed type void (__thiscall *ShopInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 990E7C: using guessed type int (__thiscall *ShopInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00530B60) --------------------------------------------------------
ItemShopWin *__thiscall ItemShopWin::`scalar deleting destructor'(ItemShopWin *this, unsigned int a2)
{
  ItemShopWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ItemShopWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ItemShopWin::`vftable'{for `IDirectMessenger'};
  this->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  this->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9910EC: using guessed type void (__thiscall *ItemShopWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99110C: using guessed type int (__thiscall *ItemShopWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00530BB0) --------------------------------------------------------
void __thiscall ItemTradeWin::ItemTradeWin(ItemTradeWin *this)
{
  ItemTradeWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ItemTradeWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ItemTradeWin::`vftable'{for `IDirectMessenger'};
  v1->m_eMode = 1;
  v1->m_uiResultValue = 0;
}
// 991440: using guessed type void (__thiscall *ItemTradeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99145C: using guessed type int (__thiscall *ItemTradeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00530BE0) --------------------------------------------------------
void __thiscall ItemTradeWin::~ItemTradeWin(ItemTradeWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ItemTradeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ItemTradeWin::`vftable'{for `IDirectMessenger'};
  this->m_pkLotInputEdit = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 991440: using guessed type void (__thiscall *ItemTradeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99145C: using guessed type int (__thiscall *ItemTradeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00530C00) --------------------------------------------------------
void __thiscall ItemTradeWin::OnCmdCancel(ItemTradeWin *this)
{
  ItemTradeWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  this->m_uiResultValue = 0;
  PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
  v2 = v1->m_pkRevWin;
  if ( v2 )
    PgWin::PostMsg(v2, 5u, v1->m_uiOkMsg, 0);
}

//----- (00530C40) --------------------------------------------------------
void __thiscall ItemTradeWin::GetValueFromEdit(ItemTradeWin *this)
{
  ItemTradeWin *v1; // esi@1
  EditWin *v2; // ecx@1
  const char *v3; // eax@1

  v1 = this;
  v2 = this->m_pkLotInputEdit;
  v1->m_uiResultValue = 0;
  v3 = (const char *)((int (*)(void))v2->vfptr[113].__vecDelDtor)();
  if ( v3 )
  {
    if ( *v3 )
      v1->m_uiResultValue = atoi(v3);
  }
}

//----- (00530C80) --------------------------------------------------------
void __thiscall ItemTradeWin::SetValueToEdit(ItemTradeWin *this)
{
  ItemTradeWin *v1; // esi@1
  char acStr[32]; // [sp+4h] [bp-24h]@1

  v1 = this;
  sprintf(acStr, "%u", this->m_uiResultValue);
  ((void (__stdcall *)(_DWORD))v1->m_pkLotInputEdit->vfptr[116].__vecDelDtor)(acStr);
}

//----- (00530CD0) --------------------------------------------------------
void __thiscall ItemTradeWin::SetValueToEdit(ItemTradeWin *this, unsigned int num)
{
  ItemTradeWin *v2; // esi@1
  char acStr[32]; // [sp+4h] [bp-24h]@1

  v2 = this;
  this->m_uiResultValue = num;
  sprintf(acStr, "%u", num);
  ((void (__stdcall *)(_DWORD))v2->m_pkLotInputEdit->vfptr[116].__vecDelDtor)(acStr);
}

//----- (00530D30) --------------------------------------------------------
void __userpurge ItemTradeWin::UpdateMeWin(ItemTradeWin *this@<ecx>, int a2@<ebx>, int a3@<edi>, float fCurTime)
{
  ItemTradeWin *v4; // esi@1
  const char *v5; // eax@2
  unsigned int v6; // edi@2
  NiRefObjectVtbl *v7; // edi@3
  char *v8; // eax@3
  NiRefObjectVtbl *v9; // ebx@4
  __int64 v10; // rax@4
  NiRefObjectVtbl *v11; // ebx@4
  __int64 v12; // rax@4
  NiRefObjectVtbl *v13; // ebx@4
  __int64 v14; // rax@4
  char *v15; // eax@4
  NiRefObjectVtbl *v16; // ebx@4
  __int64 v17; // rax@4
  char *v18; // eax@4

  v4 = this;
  if ( (unsigned __int8)((int (*)(void))this->m_pkLotInputEdit->vfptr[122].__vecDelDtor)() )
  {
    v5 = (const char *)((int (__stdcall *)(int, int))v4->m_pkLotInputEdit->vfptr[113].__vecDelDtor)(a3, a2);
    v6 = atoi(v5);
    if ( v6 > v4->m_uiMax )
    {
      v7 = v4->m_pkLotInputEdit->vfptr;
      v8 = fs("%d", v4->m_uiMax);
      v7[115].__vecDelDtor((NiRefObject *)v4->m_pkLotInputEdit, (unsigned int)v8);
      v6 = v4->m_uiMax;
    }
    v9 = v4->m_pkGemText->vfptr;
    v10 = User::GetGem(v6 * v4->m_uiPrice);
    fs("%d", v10);
    ((void (__thiscall *)(PgWinText *))v9[118].__vecDelDtor)(v4->m_pkGemText);
    v11 = v4->m_pkGoldText->vfptr;
    v12 = User::GetGold(v6 * v4->m_uiPrice);
    fs("%d", v12);
    ((void (__thiscall *)(PgWinText *))v11[118].__vecDelDtor)(v4->m_pkGoldText);
    v13 = v4->m_pkSilverText->vfptr;
    v14 = User::GetSilver(v6 * v4->m_uiPrice);
    v15 = fs("%d", v14);
    v13[118].__vecDelDtor((NiRefObject *)v4->m_pkSilverText, (unsigned int)v15);
    v16 = v4->m_pkCopperText->vfptr;
    v17 = User::GetCopper(v6 * v4->m_uiPrice);
    v18 = fs("%d", v17);
    v16[118].__vecDelDtor((NiRefObject *)v4->m_pkCopperText, (unsigned int)v18);
  }
}

//----- (00530E80) --------------------------------------------------------
void __thiscall ItemTradeWin::Open(ItemTradeWin *this, PgWin *pkRevWin, unsigned int uiOkMsg, ItemInfo *pkItemInfo, char *pcText)
{
  ItemTradeWin *v5; // esi@1
  NiRefObjectVtbl *v6; // edi@1
  unsigned int v7; // eax@1
  NiRefObjectVtbl *v8; // edi@1
  unsigned int v9; // eax@1
  char string; // [sp+Ch] [bp-24h]@1

  v5 = this;
  this->m_pkRevWin = pkRevWin;
  this->m_uiOkMsg = uiOkMsg;
  this->m_uiResultValue = pkItemInfo->MaxLot;
  this->m_uiMax = pkItemInfo->MaxLot;
  this->m_uiPrice = pkItemInfo->BuyPrice;
  ((void (*)(void))this->m_pkLotInputEdit->vfptr[120].__vecDelDtor)();
  v5->m_uiResultValue = 1;
  sprintf(&string, "%u", 1);
  ((void (__stdcall *)(_DWORD))v5->m_pkLotInputEdit->vfptr[116].__vecDelDtor)(&string);
  ((void (__stdcall *)(_DWORD))v5->m_pkTitleText->vfptr[118].__vecDelDtor)(pcText);
  ((void (__stdcall *)(_DWORD))v5->m_pkItemNameText->vfptr[118].__vecDelDtor)(pkItemInfo->Name);
  ItemIcon::SetItemAsID(v5->m_pkItemIcon, (int)pkItemInfo, pkItemInfo->ID);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v5->vfptr);
  v6 = v5->vfptr;
  v7 = ((int (__thiscall *)(_DWORD))v5->vfptr[36].__vecDelDtor)(v5);
  v6[43].__vecDelDtor((NiRefObject *)v5, PgWin::ms_iMsX - (v7 >> 1));
  v8 = v5->vfptr;
  v9 = ((int (__thiscall *)(_DWORD))v5->vfptr[37].__vecDelDtor)(v5);
  v8[44].__vecDelDtor((NiRefObject *)v5, PgWin::ms_iMsY - (v9 >> 1));
}

//----- (00530FA0) --------------------------------------------------------
void __thiscall ItemTradeWin::OnClose(ItemTradeWin *this)
{
  ItemTradeWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkLotInputEdit->vfptr[121].__vecDelDtor)(1);
  PgWin::OnClose((PgWin *)&v1->vfptr);
}

//----- (00530FC0) --------------------------------------------------------
void __thiscall ItemTradeWin::Open(ItemTradeWin *this, PgWin *pkRevWin, unsigned int uiOkMsg, Item *pkItem, char *pcText)
{
  ItemTradeWin *v5; // esi@1
  int v6; // eax@1
  bool v7; // zf@1
  PgFrameWork *v8; // eax@2
  signed int v9; // ebx@3
  unsigned __int16 v10; // ST1C_2@6
  unsigned int v11; // ST08_4@11
  NiRefObjectVtbl *v12; // edi@11
  unsigned int v13; // eax@11
  NiRefObjectVtbl *v14; // edi@11
  unsigned int v15; // eax@11
  GameFrameWork *pkGame; // [sp+14h] [bp-2Ch]@2
  int i; // [sp+18h] [bp-28h]@3
  char string; // [sp+1Ch] [bp-24h]@11

  v5 = this;
  this->m_pkRevWin = pkRevWin;
  this->m_uiOkMsg = uiOkMsg;
  this->m_uiResultValue = ((int (__thiscall *)(_DWORD))pkItem->vfptr[3].__vecDelDtor)(pkItem);
  v6 = ((int (__thiscall *)(_DWORD))pkItem->vfptr[3].__vecDelDtor)(pkItem);
  v7 = v5->m_eMode == 2;
  v5->m_uiMax = v6;
  if ( v7 )
  {
    v8 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    pkGame = (GameFrameWork *)v8;
    if ( v8 )
    {
      i = 0;
      v9 = 126;
      while ( 1 )
      {
        if ( ItemIcon::GetItem(*(ItemIcon **)(v9 * 4 + v8[20].m_kMsgQ.m_uiAlloced)) )
        {
          v10 = pkItem->m_kStruct.itemid;
          if ( v10 == ItemIcon::GetItem((ItemIcon *)(&pkGame->m_pkPrivateStoreWin->vfptr)[v9])->m_kStruct.itemid )
            break;
        }
        ++i;
        ++v9;
        if ( v9 >= 146 )
          goto LABEL_11;
        v8 = (PgFrameWork *)pkGame;
      }
      v5->m_uiPrice = pkGame->m_pkPrivateStoreWin->m_apkInvWin[i]->i64SellMoney;
    }
  }
  else
  {
    v5->m_uiPrice = pkItem->m_pkInfo->SellPrice;
  }
LABEL_11:
  ((void (*)(void))v5->m_pkLotInputEdit->vfptr[120].__vecDelDtor)();
  v11 = v5->m_uiMax;
  v5->m_uiResultValue = v11;
  sprintf(&string, "%u", v11);
  ((void (__stdcall *)(_DWORD))v5->m_pkLotInputEdit->vfptr[116].__vecDelDtor)(&string);
  ((void (__stdcall *)(_DWORD))v5->m_pkTitleText->vfptr[118].__vecDelDtor)(pcText);
  ((void (__stdcall *)(_DWORD))v5->m_pkItemNameText->vfptr[118].__vecDelDtor)(pkItem->m_pkInfo->Name);
  ItemIcon::SetItemAsID(v5->m_pkItemIcon, (int)pkItem, pkItem->m_kStruct.itemid);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v5->vfptr);
  v12 = v5->vfptr;
  v13 = ((int (__thiscall *)(_DWORD))v5->vfptr[36].__vecDelDtor)(v5);
  v12[43].__vecDelDtor((NiRefObject *)v5, PgWin::ms_iMsX - (v13 >> 1));
  v14 = v5->vfptr;
  v15 = ((int (__thiscall *)(_DWORD))v5->vfptr[37].__vecDelDtor)(v5);
  v14[44].__vecDelDtor((NiRefObject *)v5, PgWin::ms_iMsY - (v15 >> 1));
}

//----- (005311A0) --------------------------------------------------------
char __thiscall ItemTradeWin::Create(ItemTradeWin *this, PgFrameWork *pkFrameWork)
{
  ItemTradeWin *v2; // esi@1
  NiSourceTexture *v3; // ebx@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // edi@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  NiSourceTexture *v10; // eax@15
  PgSprData *v11; // eax@16
  PgWinSpr *v12; // eax@18
  PgSprData *v13; // eax@21
  PgSprData *v14; // edi@22
  PgWinBut *v15; // ST64_4@22
  PgFont *v16; // ST60_4@22
  unsigned int v17; // ST5C_4@22
  unsigned int v18; // eax@22
  PgWinText *v19; // edi@22
  NiUnsharedGeometryGroup *v20; // eax@22
  PgSprData *v21; // edi@22
  PgWinBut *v22; // ST64_4@22
  PgFont *v23; // ST60_4@22
  unsigned int v24; // ST5C_4@22
  unsigned int v25; // eax@22
  PgWinText *v26; // edi@22
  NiUnsharedGeometryGroup *v27; // eax@22
  PgFont *v28; // eax@24
  PgWinText *v29; // eax@24
  PgSprData *v30; // eax@24
  PgWinSpr *v31; // eax@24
  int v32; // ecx@24
  PgFont *v33; // eax@25
  PgWinText *v34; // eax@25
  PgSprData *v35; // eax@25
  PgFont *v36; // eax@26
  PgWinText *v37; // eax@26
  PgFont *v38; // eax@27
  PgWinText *v39; // eax@27
  PgFont *v40; // eax@28
  PgWinText *v41; // eax@28
  PgFont *v42; // eax@29
  PgWinText *v43; // eax@29
  unsigned int uiWidth; // [sp+80h] [bp-20h]@20
  unsigned int uiHeight; // [sp+84h] [bp-1Ch]@20
  int uiLeft; // [sp+88h] [bp-18h]@11
  int uiTop; // [sp+8Ch] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+90h] [bp-10h]@1
  int v49; // [sp+9Ch] [bp-4h]@1
  PgFrameWork *pkFrameWorka; // [sp+A8h] [bp+8h]@22
  PgFrameWork *pkFrameWorkb; // [sp+A8h] [bp+8h]@22

  v2 = this;
  spNode.m_pObject = 0;
  v49 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v49 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
    goto LABEL_5;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "Game\\ItemTrade.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "ItemTradeWin", 0) )
  {
    v4 = spNode.m_pObject;
    v49 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  v12 = PgWinSpr::CreateWin(uiLeft, uiTop, v11, (PgWin *)&v2->vfptr, 0, 0);
  if ( v12 )
    v12->vfptr[60].__vecDelDtor((NiRefObject *)v12, 0);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "LotInput", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "LotInput", &uiLeft, &uiTop, v3);
    PgWinSpr::CreateWin(uiLeft, uiTop, v13, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkLotInputEdit = EditWin::CreateWin(
                             uiLeft + 2,
                             uiTop + 4,
                             uiWidth,
                             uiHeight,
                             (PgWin *)&v2->vfptr,
                             NUMBER,
                             0xAu,
                             3u,
                             0,
                             0,
                             1);
  }
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor01", &uiLeft, &uiTop, v3);
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick01");
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver01");
  v15 = PgWinBut::CreateWin(uiLeft, uiTop, v14, (PgWin *)&v2->vfptr, 0, 0, 0);
  v16 = Font::Get(0);
  v17 = ((int (__thiscall *)(PgWinBut *))v15->vfptr[37].__vecDelDtor)(v15);
  v18 = ((int (__thiscall *)(PgWinBut *))v15->vfptr[36].__vecDelDtor)(v15);
  v19 = PgWinText::CreateWin(0, 1, v18, v17, v16, (PgWin *)&v15->vfptr, 0, 0);
  v19->vfptr[122].__vecDelDtor((NiRefObject *)v19, 5u);
  pkFrameWorka = (PgFrameWork *)v19->vfptr;
  v20 = TextData::Get(0x4F5F499Fu);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkFrameWorka[13].m_pkMsgHooker)(v19, v20);
  v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
  v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor02", &uiLeft, &uiTop, v3);
  PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick02");
  PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver02");
  v22 = PgWinBut::CreateWin(uiLeft, uiTop, v21, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v23 = Font::Get(0);
  v24 = ((int (__thiscall *)(PgWinBut *))v22->vfptr[37].__vecDelDtor)(v22);
  v25 = ((int (__thiscall *)(PgWinBut *))v22->vfptr[36].__vecDelDtor)(v22);
  v26 = PgWinText::CreateWin(0, 1, v25, v24, v23, (PgWin *)&v22->vfptr, 0, 0);
  v26->vfptr[122].__vecDelDtor((NiRefObject *)v26, 5u);
  pkFrameWorkb = (PgFrameWork *)v26->vfptr;
  v27 = TextData::Get(0x88A297E1);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkFrameWorkb[13].m_pkMsgHooker)(v26, v27);
  v26->vfptr[60].__vecDelDtor((NiRefObject *)v26, 0);
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &uiLeft, &uiTop, &uiWidth, &uiHeight)
    || (v28 = Font::Get(0),
        v29 = PgWinText::CreateWin(uiLeft, uiTop, uiWidth, uiHeight, v28, (PgWin *)&v2->vfptr, 0, 0),
        v2->m_pkTitleText = v29,
        v29->vfptr[122].__vecDelDtor((NiRefObject *)v29, 5u),
        ((void (__stdcall *)(void *))v2->m_pkTitleText->vfptr[118].__vecDelDtor)(&unk_99133F),
        ((void (__stdcall *)(_DWORD))v2->m_pkTitleText->vfptr[60].__vecDelDtor)(0),
        v30 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ItemSlot", &uiLeft, &uiTop, v3),
        v31 = PgWinSpr::CreateWin(uiLeft, uiTop, v30, (PgWin *)&v2->vfptr, 0, 0),
        v32 = uiLeft,
        v2->m_pkItemSlotWin = v31,
        v2->m_pkItemIcon = ItemIcon::CreateWin(v32, uiTop, (PgWin *)&v2->vfptr),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "ItemName",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v33 = Font::Get(0),
        v34 = PgWinText::CreateWin(uiLeft, uiTop, uiWidth, uiHeight, v33, (PgWin *)&v2->vfptr, 0, 0),
        v2->m_pkItemNameText = v34,
        v34->vfptr[122].__vecDelDtor((NiRefObject *)v34, 5u),
        ((void (__stdcall *)(void *))v2->m_pkItemNameText->vfptr[118].__vecDelDtor)(&unk_991355),
        ((void (__stdcall *)(_DWORD))v2->m_pkItemNameText->vfptr[60].__vecDelDtor)(0),
        v35 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, v3),
        PgWinSpr::CreateWin(uiLeft, uiTop, v35, (PgWin *)&v2->vfptr, 0, 0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "GemInput",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v36 = Font::Get(0),
        v37 = PgWinText::CreateWin(uiLeft, uiTop, uiWidth, uiHeight, v36, (PgWin *)&v2->vfptr, 0, 0),
        v2->m_pkGemText = v37,
        v37->vfptr[122].__vecDelDtor((NiRefObject *)v37, 5u),
        ((void (__stdcall *)(void *))v2->m_pkGemText->vfptr[118].__vecDelDtor)(&unk_991356),
        ((void (__stdcall *)(_DWORD))v2->m_pkGemText->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "GoldInput",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v38 = Font::Get(0),
        v39 = PgWinText::CreateWin(uiLeft, uiTop, uiWidth, uiHeight, v38, (PgWin *)&v2->vfptr, 0, 0),
        v2->m_pkGoldText = v39,
        v39->vfptr[122].__vecDelDtor((NiRefObject *)v39, 5u),
        ((void (__stdcall *)(void *))v2->m_pkGoldText->vfptr[118].__vecDelDtor)(&unk_991357),
        ((void (__stdcall *)(_DWORD))v2->m_pkGoldText->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "SilverInput",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v40 = Font::Get(0),
        v41 = PgWinText::CreateWin(uiLeft, uiTop, uiWidth, uiHeight, v40, (PgWin *)&v2->vfptr, 0, 0),
        v2->m_pkSilverText = v41,
        v41->vfptr[122].__vecDelDtor((NiRefObject *)v41, 5u),
        ((void (__stdcall *)(void *))v2->m_pkSilverText->vfptr[118].__vecDelDtor)(&unk_99135E),
        ((void (__stdcall *)(_DWORD))v2->m_pkSilverText->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "CopperInput",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight)) )
  {
    v49 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  v42 = Font::Get(0);
  v43 = PgWinText::CreateWin(uiLeft, uiTop, uiWidth, uiHeight, v42, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkCopperText = v43;
  ((void (__thiscall *)(PgWinText *))v43->vfptr[122].__vecDelDtor)(v43);
  ((void (__cdecl *)(void *, signed int))v2->m_pkCopperText->vfptr[118].__vecDelDtor)(&unk_99135F, 5);
  ((void (__cdecl *)(_DWORD))v2->m_pkCopperText->vfptr[60].__vecDelDtor)(0);
  ((void (__cdecl *)(IDirectMessengerVtbl **))v2->vfptr->SetMsgHooker)(&v2->vfptr);
  ((void (__thiscall *)(ItemTradeWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  v49 = -1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00531960) --------------------------------------------------------
void __thiscall ItemTradeWin::OnCmdOk(ItemTradeWin *this)
{
  ItemTradeWin *v1; // esi@1
  EditWin *v2; // ecx@1
  const char *v3; // eax@1
  unsigned int v4; // eax@5
  unsigned int v5; // ST0C_4@8
  NiUnsharedGeometryGroup *v6; // eax@8
  char temp[256]; // [sp+4h] [bp-104h]@8

  v1 = this;
  v2 = this->m_pkLotInputEdit;
  v1->m_uiResultValue = 0;
  v3 = (const char *)((int (*)(void))v2->vfptr[113].__vecDelDtor)();
  if ( v3 && *v3 )
    v1->m_uiResultValue = atoi(v3);
  if ( v1->m_pkRevWin )
  {
    v4 = v1->m_uiResultValue;
    if ( v4 && v4 <= v1->m_uiMax )
    {
      PgWin::PostMsg((PgWin *)&v1->vfptr, 1u, 0, 0);
      PgWin::PostMsg(v1->m_pkRevWin, 5u, v1->m_uiOkMsg, v1->m_uiResultValue);
    }
    else
    {
      v5 = v1->m_uiMax;
      v6 = TextData::Get(0x97A69795);
      sprintf(temp, (const char *)v6, v5);
      GameFrameWork::AddSysMsg((GameFrameWork *)v1->m_pkFrameWork, temp);
    }
  }
}

//----- (00531A50) --------------------------------------------------------
void __thiscall ItemTradeWin::OnEditEnd(ItemTradeWin *this, unsigned int wParam, int lParam)
{
  ItemTradeWin *v3; // esi@1

  v3 = this;
  ItemTradeWin::OnCmdOk(this);
  ((void (*)(void))v3->m_pkLotInputEdit->vfptr[120].__vecDelDtor)();
}

//----- (00531A70) --------------------------------------------------------
void __thiscall ItemTradeWin::OnCommand(ItemTradeWin *this, unsigned int wParam, int lParam)
{
  ItemTradeWin *v3; // esi@1
  PgWin *v4; // eax@3

  v3 = this;
  if ( wParam )
  {
    if ( wParam == 1 )
    {
      this->m_uiResultValue = 0;
      PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
      v4 = v3->m_pkRevWin;
      if ( v4 )
        PgWin::PostMsg(v4, 5u, v3->m_uiOkMsg, 0);
    }
  }
  else
  {
    ItemTradeWin::OnCmdOk(this);
  }
}

//----- (00531AC0) --------------------------------------------------------
ItemTradeWin *__cdecl ItemTradeWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  ItemTradeWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x194u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&ItemTradeWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&ItemTradeWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kWorld.m_Rotate.m_pEntry[0][2]) = 1;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (ItemTradeWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 991440: using guessed type void (__thiscall *ItemTradeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99145C: using guessed type int (__thiscall *ItemTradeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00531C10) --------------------------------------------------------
ItemTradeWin *__thiscall ItemTradeWin::`vector deleting destructor'(ItemTradeWin *this, unsigned int a2)
{
  ItemTradeWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ItemTradeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ItemTradeWin::`vftable'{for `IDirectMessenger'};
  this->m_pkLotInputEdit = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 991440: using guessed type void (__thiscall *ItemTradeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99145C: using guessed type int (__thiscall *ItemTradeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00531C50) --------------------------------------------------------
BOOL __thiscall ItemUpgradeWin::IsUpgradeSlotItem(ItemUpgradeWin *this)
{
  return ItemIcon::GetItem((ItemIcon *)&this->m_apkSlotWin[8]->vfptr) != 0;
}

//----- (00531C70) --------------------------------------------------------
void __thiscall ForgeSlotInvWin::ForgeSlotInvWin(ForgeSlotInvWin *this)
{
  ForgeSlotInvWin *v1; // esi@1

  v1 = this;
  ItemIcon::ItemIcon((ItemIcon *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ForgeSlotInvWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ForgeSlotInvWin::`vftable'{for `IDirectMessenger'};
  v1->m_uiSenderType = -1;
  v1->m_uiSenderInvIndex = -1;
  v1->m_pkSender = 0;
  v1->m_uiInvIndex = -1;
  v1->m_uiInvType = 1;
  ItemIcon::SetItem((ItemIcon *)&v1->vfptr, 0, 1);
  v1->m_pkFrameWork = 0;
  v1->m_bLock = 0;
}
// 9918DC: using guessed type void (__thiscall *ForgeSlotInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9918FC: using guessed type int (__thiscall *ForgeSlotInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00531D10) --------------------------------------------------------
void __thiscall ForgeSlotInvWin::~ForgeSlotInvWin(ForgeSlotInvWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ForgeSlotInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ForgeSlotInvWin::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
}
// 9918DC: using guessed type void (__thiscall *ForgeSlotInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9918FC: using guessed type int (__thiscall *ForgeSlotInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00531D30) --------------------------------------------------------
char __thiscall ForgeSlotInvWin::Create(ForgeSlotInvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork)
{
  ForgeSlotInvWin *v6; // esi@1
  char result; // al@1

  v6 = this;
  this->m_pkFrameWork = pkFrameWork;
  result = ItemIcon::Create((ItemIcon *)&this->vfptr, iXPos, iYPos, pkParent);
  if ( result )
  {
    v6->m_uiInvIndex = uiInvIndex;
    ItemIcon::ShowLotText((ItemIcon *)&v6->vfptr, 0);
    result = 1;
  }
  return result;
}

//----- (00531D80) --------------------------------------------------------
void __thiscall ForgeSlotInvWin::SetSlotType(ForgeSlotInvWin *this, unsigned int uiInvType)
{
  this->m_uiInvType = uiInvType;
}

//----- (00531D90) --------------------------------------------------------
unsigned int __thiscall ForgeSlotInvWin::GetSlotType(ForgeSlotInvWin *this)
{
  return this->m_uiInvType;
}

//----- (00531DD0) --------------------------------------------------------
ForgeSlotInvWin *__thiscall ItemUpgradeWin::GetInsertedOldSlot(ItemUpgradeWin *this, unsigned int _uiSlotNum)
{
  ItemUpgradeWin *v2; // esi@1
  ItemIcon *v4; // ebx@14
  ItemIcon **v5; // esi@14
  signed int v6; // edi@14

  v2 = this;
  if ( _uiSlotNum == 9 )
  {
    if ( ItemIcon::GetItem((ItemIcon *)&this->m_apkSlotWin[9]->vfptr) )
      return v2->m_apkSlotWin[9];
    return 0;
  }
  if ( _uiSlotNum == 10 )
  {
    if ( ItemIcon::GetItem((ItemIcon *)&this->m_apkSlotWin[10]->vfptr) )
      return v2->m_apkSlotWin[10];
    return 0;
  }
  if ( _uiSlotNum == 11 )
  {
    if ( ItemIcon::GetItem((ItemIcon *)&this->m_apkSlotWin[11]->vfptr) )
      return v2->m_apkSlotWin[11];
    return 0;
  }
  if ( _uiSlotNum == 8 )
  {
    if ( ItemIcon::GetItem((ItemIcon *)&this->m_apkSlotWin[8]->vfptr) )
      return v2->m_apkSlotWin[8];
    return 0;
  }
  v4 = 0;
  v5 = (ItemIcon **)this->m_apkSlotWin;
  v6 = 8;
  do
  {
    if ( ItemIcon::GetItem(*v5) )
      v4 = *v5;
    ++v5;
    --v6;
  }
  while ( v6 );
  return (ForgeSlotInvWin *)v4;
}

//----- (00531E90) --------------------------------------------------------
void __thiscall ItemUpgradeWin::StopSlotRotate(ItemUpgradeWin *this)
{
  this->m_bUpGradeStart = 1;
  this->m_fAcceleration = 1.8;
}

//----- (00531EB0) --------------------------------------------------------
bool __thiscall ItemUpgradeWin::IsUpgradingitem(ItemUpgradeWin *this)
{
  return this->m_bUpGradeStart;
}

//----- (00531EC0) --------------------------------------------------------
int __thiscall ItemUpgradeWin::GetUpgradeSlotItemClass(ItemUpgradeWin *this)
{
  Item *v1; // eax@1
  int result; // eax@2

  v1 = ItemIcon::GetItem((ItemIcon *)&this->m_apkSlotWin[8]->vfptr);
  if ( v1 )
    result = (unsigned __int8)((int (__thiscall *)(Item *))v1->vfptr[1].__vecDelDtor)(v1);
  else
    result = -1;
  return result;
}

//----- (00531EE0) --------------------------------------------------------
void ItemUpgradeWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "ItemUpgrade");
}

//----- (00531F10) --------------------------------------------------------
void __thiscall ItemUpgradeWin::EnableSprSlot(ItemUpgradeWin *this, unsigned int uiSlotNum)
{
  ItemUpgradeWin *v2; // eax@1
  ForgeSlotInvWin *v3; // ecx@2
  NiRefObjectVtbl **v4; // esi@3
  NiRefObjectVtbl *v5; // edi@4
  Item *v6; // eax@4

  v2 = this;
  if ( uiSlotNum < 0xC )
  {
    v3 = this->m_apkSlotWin[uiSlotNum];
    if ( v3 )
    {
      v4 = &v2->pkForgeSlot[uiSlotNum]->vfptr;
      if ( v4 )
      {
        v5 = *v4;
        v6 = ItemIcon::GetItem((ItemIcon *)&v3->vfptr);
        v5[60].__vecDelDtor((NiRefObject *)v4, v6 == 0);
      }
    }
  }
}

//----- (00531F60) --------------------------------------------------------
void __thiscall ItemUpgradeMsgWin::ItemUpgradeMsgWin(ItemUpgradeMsgWin *this)
{
  ItemUpgradeMsgWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_pkOutlineSpr = 0;
  v1->m_pkGoldSpr = 0;
  v1->m_pkBlueSpr = 0;
  v1->m_pkRedSpr = 0;
  v1->m_pkNoItemText = 0;
  v1->vfptr = (NiRefObjectVtbl *)&ItemUpgradeMsgWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ItemUpgradeMsgWin::`vftable'{for `IDirectMessenger'};
}
// 991B70: using guessed type void (__thiscall *ItemUpgradeMsgWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 991B8C: using guessed type int (__thiscall *ItemUpgradeMsgWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00531FA0) --------------------------------------------------------
void __thiscall ItemUpgradeMsgWin::~ItemUpgradeMsgWin(ItemUpgradeMsgWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ItemUpgradeMsgWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ItemUpgradeMsgWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 991B70: using guessed type void (__thiscall *ItemUpgradeMsgWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 991B8C: using guessed type int (__thiscall *ItemUpgradeMsgWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00531FD0) --------------------------------------------------------
void __thiscall ItemUpgradeMsgWin::OnClose(ItemUpgradeMsgWin *this)
{
  ItemUpgradeMsgWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkRedSpr->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkBlueSpr->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkGoldSpr->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkNoItemText->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkOutlineSpr->vfptr[64].__vecDelDtor)(0);
  PgWin::PostMsg((PgWin *)&v1->vfptr, 1u, 0, 0);
}

//----- (00532050) --------------------------------------------------------
void __thiscall ForgeSlotInvWin::OnFirstHitWin(ForgeSlotInvWin *this)
{
  ForgeSlotInvWin *v1; // esi@1
  PgWin *v2; // eax@5
  unsigned int v3; // ecx@6
  ItemIcon *v4; // ecx@7
  Item *v5; // eax@9
  ItemInfoWin *v6; // ecx@10

  v1 = this;
  if ( !this->m_bLock )
  {
    if ( ItemIcon::GetItem((ItemIcon *)&this->vfptr) )
      v1->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
    else
      v1->m_pkToolTipWin = g_pkToolTipWin;
    PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
    v2 = v1->m_pkSender;
    if ( v2 )
    {
      v3 = v1->m_uiSenderInvIndex;
      if ( v3 < 0xC0 )
      {
        v4 = (ItemIcon *)LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][v3 + 2]);
        if ( v4 )
        {
          if ( ItemIcon::GetItem(v4) )
          {
            v5 = ItemIcon::GetItem((ItemIcon *)&v1->vfptr);
            if ( v5 )
            {
              v6 = (ItemInfoWin *)v1->m_pkToolTipWin;
              if ( v6 )
              {
                ItemInfoWin::SetItemInfo(v6, v5);
                PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
              }
            }
          }
        }
      }
    }
  }
}

//----- (005320E0) --------------------------------------------------------
char __thiscall ForgeSlotInvWin::SetSenderInvSlotLock(ForgeSlotInvWin *this, bool _bLock)
{
  PgWin *v2; // eax@1
  char result; // al@2
  unsigned int v4; // ecx@3
  InvWin *v5; // ecx@4

  v2 = this->m_pkSender;
  if ( v2
    && (v4 = this->m_uiSenderInvIndex, v4 < 0xC0)
    && (v5 = (InvWin *)LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][v4 + 2])) != 0 )
  {
    InvWin::SetLock(v5, _bLock);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00532120) --------------------------------------------------------
void __thiscall ItemUpgradeWin::~ItemUpgradeWin(ItemUpgradeWin *this)
{
  ItemUpgradeWin *v1; // esi@1
  NiNode *v2; // edi@1
  NiNode *v3; // edi@6
  NiNode *v4; // edi@11
  NiNode *v5; // edi@16
  NiNode *v6; // edi@21
  NiNode *v7; // edi@26
  NiNode *v8; // edi@30
  NiNode *v9; // edi@34
  NiNode *v10; // edi@38
  NiNode *v11; // edi@42

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ItemUpgradeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ItemUpgradeWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spEffect_SUCC_1.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spEffect_SUCC_1.m_pObject = 0;
  }
  v3 = v1->m_spEffect_SUCC_2.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spEffect_SUCC_2.m_pObject = 0;
  }
  v4 = v1->m_spEffect_FAIL_0.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spEffect_FAIL_0.m_pObject = 0;
  }
  v5 = v1->m_spEffect_FAIL_1.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spEffect_FAIL_1.m_pObject = 0;
  }
  v6 = v1->m_spEffect_DESTROY.m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v1->m_spEffect_DESTROY.m_pObject = 0;
  }
  v7 = v1->m_spEffect_DESTROY.m_pObject;
  if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  v8 = v1->m_spEffect_FAIL_1.m_pObject;
  if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
    v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
  v9 = v1->m_spEffect_FAIL_0.m_pObject;
  if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
    v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
  v10 = v1->m_spEffect_SUCC_2.m_pObject;
  if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
    v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
  v11 = v1->m_spEffect_SUCC_1.m_pObject;
  if ( v11 && !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
    v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
  NsEffect::~NsEffect(&v1->m_kEffect);
  ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v1->m_kMarkCheck);
  v1->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 991DB0: using guessed type void (__thiscall *ItemUpgradeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 991DCC: using guessed type int (__thiscall *ItemUpgradeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00532370) --------------------------------------------------------
void __thiscall ItemUpgradeWin::ProcessMeInput(ItemUpgradeWin *this, bool *bHit)
{
  ItemUpgradeWin *v2; // esi@1

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[78].__vecDelDtor)() )
  {
    if ( dword_B64790 )
      ++dword_B64790;
    if ( PgWin::ms_kbRbutPressed.m_iBool )
      ++PgWin::ms_kbRbutPressed.m_iBool;
    PgWinFrame::ProcessMeInput((PgWinFrame *)&v2->vfptr, bHit);
    PgWin::ms_kbRbutPressed.m_bReserveFalse = 0;
    if ( PgWin::ms_kbRbutPressed.m_iBool )
      --PgWin::ms_kbRbutPressed.m_iBool;
    byte_B6478C = 0;
    if ( dword_B64790 )
      --dword_B64790;
  }
}
// B6478C: using guessed type char byte_B6478C;
// B64790: using guessed type int dword_B64790;

//----- (005323F0) --------------------------------------------------------
void __thiscall ItemUpgradeWin::OnCancel(ItemUpgradeWin *this)
{
  GameFrameWork::CloseItemUpgradeWin((GameFrameWork *)this->m_pkFrameWork, 1);
}

//----- (00532400) --------------------------------------------------------
void __thiscall ItemUpgradeWin::UpGradeResult(ItemUpgradeWin *this, unsigned int dwUpgradeResult)
{
  this->m_fAcceleration = 1.8;
  *(_WORD *)&this->m_bUpGradeStart = 257;
  this->m_dwUpResult = dwUpgradeResult;
  if ( dwUpgradeResult != 2243
    && dwUpgradeResult != 2244
    && dwUpgradeResult != 14339
    && dwUpgradeResult != 15367
    && dwUpgradeResult != 15368 )
  {
    this->m_nSuccessTargetSlot = (rand() % 7 + this->m_nSuccessTargetSlot + 1) % 8;
  }
}

//----- (00532480) --------------------------------------------------------
void __thiscall ItemUpgradeWin::StartResultEffect(ItemUpgradeWin *this, NiAVObject *_pEffect)
{
  ItemUpgradeWin *v2; // esi@1

  v2 = this;
  this->m_pCurObject = _pEffect;
  NsEffect::SetEffectNode(&this->m_kEffect, _pEffect);
  NsEffect::Start(&v2->m_kEffect, Timer::ms_fCurTime);
  v2->m_kMarkCheck.m_fMarkTime = v2->m_kEffect.m_fMaxTime;
  CNSTimer_MarkCheck::ReSet(&v2->m_kMarkCheck, Timer::ms_fCurTime, OVER);
  ((void (__stdcall *)(_DWORD, _DWORD))v2->pkForgeSlot[8]->vfptr[29].__vecDelDtor)(_pEffect, 1);
  NiAVObject::UpdateProperties((NiAVObject *)&v2->pkForgeSlot[8]->vfptr);
  NiAVObject::UpdateEffects((NiAVObject *)&v2->pkForgeSlot[8]->vfptr);
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00532510) --------------------------------------------------------
bool __thiscall ItemUpgradeWin::IsSameGrade(ItemUpgradeWin *this, Item *pkUpSource)
{
  bool result; // al@2
  Item *v3; // eax@3

  if ( pkUpSource && (v3 = ItemIcon::GetItem((ItemIcon *)&this->m_apkSlotWin[8]->vfptr)) != 0 )
    result = pkUpSource->m_pkInfo->Grade == v3->m_pkInfo->Grade;
  else
    result = 0;
  return result;
}

//----- (00532550) --------------------------------------------------------
char __thiscall ItemUpgradeWin::IsBraceletUpsourceItem(ItemUpgradeWin *this, Item *pkUpSource)
{
  signed int v2; // eax@2
  char *v3; // ecx@2
  char result; // al@5

  if ( pkUpSource )
  {
    v2 = 0;
    v3 = (char *)this->m_BraceletGradeItemID;
    while ( pkUpSource->m_kStruct.itemid != *(_WORD *)v3 )
    {
      ++v2;
      v3 += 2;
      if ( v2 >= 4 )
        goto LABEL_5;
    }
    result = 1;
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (00532580) --------------------------------------------------------
char *__thiscall ItemUpgradeWin::GetBraceletUpsourceName(ItemUpgradeWin *this)
{
  Item *v1; // eax@1
  char *result; // eax@2

  v1 = Item::Create(this->m_BraceletGradeItemID[0]);
  if ( v1 )
    result = v1->m_pkInfo->Name;
  else
    result = 0;
  return result;
}

//----- (005325A0) --------------------------------------------------------
char *__thiscall ItemUpgradeWin::GetUpgradeSlotItemName(ItemUpgradeWin *this)
{
  Item *v1; // eax@1
  char *result; // eax@2

  v1 = ItemIcon::GetItem((ItemIcon *)&this->m_apkSlotWin[8]->vfptr);
  if ( v1 )
    result = v1->m_pkInfo->Name;
  else
    result = 0;
  return result;
}

//----- (005325C0) --------------------------------------------------------
void __thiscall ForgeSlotInvWin::DoAction(ForgeSlotInvWin *this)
{
  ForgeSlotInvWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiInvIndex);
}

//----- (005325F0) --------------------------------------------------------
void __thiscall ForgeSlotInvWin::DoRAction(ForgeSlotInvWin *this)
{
  ForgeSlotInvWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiRCmdMsg, v1->m_uiInvIndex);
}

//----- (00532620) --------------------------------------------------------
void __thiscall ForgeSlotInvWin::ReSetSlot(ForgeSlotInvWin *this)
{
  ForgeSlotInvWin *v1; // esi@1
  PgWin *v2; // eax@1
  unsigned int v3; // ecx@2
  InvWin *v4; // ecx@3

  v1 = this;
  v2 = this->m_pkSender;
  this->m_bLock = 0;
  if ( v2 )
  {
    v3 = this->m_uiSenderInvIndex;
    if ( v3 < 0xC0 )
    {
      v4 = (InvWin *)LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][v3 + 2]);
      if ( v4 )
        InvWin::SetLock(v4, 0);
    }
  }
  v1->m_uiSenderType = -1;
  v1->m_uiSenderInvIndex = -1;
  v1->m_pkSender = 0;
  ItemIcon::SetItem((ItemIcon *)&v1->vfptr, 0, 1);
}

//----- (00532680) --------------------------------------------------------
char __thiscall ItemUpgradeWin::DropForgeSlot(ItemUpgradeWin *this, unsigned int uiReceiverInvIndex, PgWinDrop *pkDrop)
{
  ItemUpgradeWin *v3; // edi@1
  ForgeSlotInvWin *v4; // esi@1
  char result; // al@2
  ForgeSlotInvWin *v6; // eax@4
  signed int v7; // esi@5
  ItemIcon **v8; // edi@5
  Item *v9; // ebx@7
  ItemIcon *v10; // ecx@12
  NiRefObjectVtbl **v11; // ebx@13
  NiRefObjectVtbl *v12; // esi@14
  Item *v13; // eax@14
  ItemIcon *v14; // ecx@17
  NiRefObjectVtbl **v15; // edi@18
  NiRefObjectVtbl *v16; // ebx@19
  Item *v17; // eax@19
  PgWin *v18; // eax@20
  unsigned int v19; // esi@21
  InvWin *v20; // ecx@22
  DropContents *pkContents; // [sp+8h] [bp-14h]@3
  ForgeSlotInvWin *pOldSlot; // [sp+10h] [bp-Ch]@4
  ItemUpgradeWin *v23; // [sp+14h] [bp-8h]@1
  ForgeSlotInvWin *pSlot; // [sp+18h] [bp-4h]@1

  v3 = this;
  v4 = this->m_apkSlotWin[uiReceiverInvIndex];
  v23 = this;
  pSlot = v4;
  if ( v4 && (pkContents = (DropContents *)pkDrop->m_pkContents) != 0 )
  {
    v6 = ItemUpgradeWin::GetInsertedOldSlot(this, uiReceiverInvIndex);
    pOldSlot = v6;
    if ( v6 )
    {
      v7 = 0;
      v8 = (ItemIcon **)v3->m_apkSlotWin;
      while ( 1 )
      {
        v9 = ItemIcon::GetItem((ItemIcon *)&v6->vfptr);
        if ( ItemIcon::GetItem(*v8) == v9 )
          break;
        ++v7;
        ++v8;
        if ( v7 >= 8 )
        {
          v7 = -1;
          break;
        }
        v6 = pOldSlot;
      }
      ForgeSlotInvWin::ReSetSlot(pOldSlot);
      v3 = v23;
      if ( v7 != -1 && (unsigned int)v7 < 0xC )
      {
        v10 = (ItemIcon *)&v23->m_apkSlotWin[v7]->vfptr;
        if ( v10 )
        {
          v11 = &v23->pkForgeSlot[v7]->vfptr;
          if ( v11 )
          {
            v12 = *v11;
            v13 = ItemIcon::GetItem(v10);
            v12[60].__vecDelDtor((NiRefObject *)v11, v13 == 0);
          }
        }
      }
      v4 = pSlot;
    }
    v4->m_uiSenderType = pkContents->m_eSenderType;
    v4->m_uiSenderInvIndex = pkContents->m_uiSenderIndex;
    v4->m_pkSender = pkDrop->m_pkSender;
    ItemIcon::SetItem((ItemIcon *)&v4->vfptr, (Item *)pkContents->m_apvParam[0], 1);
    if ( uiReceiverInvIndex < 0xC )
    {
      v14 = (ItemIcon *)&v3->m_apkSlotWin[uiReceiverInvIndex]->vfptr;
      if ( v14 )
      {
        v15 = &v3->pkForgeSlot[uiReceiverInvIndex]->vfptr;
        if ( v15 )
        {
          v16 = *v15;
          v17 = ItemIcon::GetItem(v14);
          v16[60].__vecDelDtor((NiRefObject *)v15, v17 == 0);
        }
      }
    }
    v18 = v4->m_pkSender;
    if ( v18 )
    {
      v19 = v4->m_uiSenderInvIndex;
      if ( v19 < 0xC0 )
      {
        v20 = (InvWin *)LODWORD(v18[1].m_kLocal.m_Rotate.m_pEntry[0][v19 + 2]);
        if ( v20 )
          InvWin::SetLock(v20, 1);
      }
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (005327E0) --------------------------------------------------------
void __thiscall ItemUpgradeWin::ResetAllData(ItemUpgradeWin *this)
{
  ItemUpgradeWin *v1; // edi@1
  char *v2; // ebx@1
  ItemIcon *v3; // esi@2
  int v4; // eax@2
  unsigned int v5; // ecx@3
  InvWin *v6; // eax@4
  NiRefObjectVtbl **v7; // eax@7
  NiRefObjectVtbl *v8; // esi@7
  NiUnsharedGeometryGroup *v9; // eax@7
  signed int v10; // [sp+Ch] [bp-4h]@1

  v1 = this;
  this->m_pkSlotOn->m_uFlags |= 1u;
  v1->m_pkSprBomb[0]->m_uFlags |= 1u;
  v1->m_pkSprBomb[1]->m_uFlags |= 1u;
  this->m_pkSprBomb[2]->m_uFlags |= 1u;
  v2 = (char *)this->m_apkSlotWin;
  v10 = 12;
  do
  {
    v3 = *(ItemIcon **)v2;
    v4 = *(_DWORD *)(*(_DWORD *)v2 + 472);
    *(_BYTE *)(*(_DWORD *)v2 + 448) = 0;
    if ( v4 )
    {
      v5 = (unsigned int)v3[1].m_spControllers.m_pObject;
      if ( v5 < 0xC0 )
      {
        v6 = *(InvWin **)(v4 + 4 * v5 + 348);
        if ( v6 )
          InvWin::SetLock(v6, 0);
      }
    }
    v3[1].m_pcName = (char *)-1;
    v3[1].m_spControllers.m_pObject = (NiTimeController *)-1;
    v3[1].m_uiMaxSize = 0;
    ItemIcon::SetItem(v3, 0, 1);
    v2 += 4;
    --v10;
  }
  while ( v10 );
  v7 = &v1->m_pkStartTextWin->vfptr;
  v1->m_bUpGradeStart = 0;
  v8 = *v7;
  v9 = TextData::Get(0xCF06FADC);
  v8[118].__vecDelDtor((NiRefObject *)v1->m_pkStartTextWin, (unsigned int)v9);
}

//----- (005328D0) --------------------------------------------------------
void __thiscall ItemUpgradeWin::StartSlotRotate(ItemUpgradeWin *this)
{
  ItemUpgradeWin *v1; // esi@1
  NiRefObjectVtbl *v2; // edi@1
  NiUnsharedGeometryGroup *v3; // eax@1
  int v4; // eax@1

  v1 = this;
  v2 = this->m_pkStartTextWin->vfptr;
  v3 = TextData::Get(0x30798C95u);
  v2[118].__vecDelDtor((NiRefObject *)v1->m_pkStartTextWin, (unsigned int)v3);
  v1->m_dwUpResult = 0;
  v1->m_fRotateStartTime = Timer::ms_fCurTime;
  CNSTimer_Interval::ReSet(&v1->m_kTimerInterval, v1->m_fRotateStartTime);
  v1->m_fSpeed = 15.0;
  *(_WORD *)&v1->m_bUpGradeStart = 1;
  v1->m_eUpgradeState = 1;
  v4 = v1->m_nSuccessTargetSlot;
  v1->m_kTimerInterval.m_fCheckTime = 0.06666667;
  v1->m_nBombCount = 0;
  v1->m_fAcceleration = 0.0;
  v1->m_nCurRotatePos = v4;
  v1->m_pkSlotOn->m_uFlags &= 0xFFFEu;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00532980) --------------------------------------------------------
void __thiscall ItemUpgradeWin::AssistItemShow(ItemUpgradeWin *this)
{
  ItemUpgradeWin *v1; // esi@1

  v1 = this;
  ForgeSlotInvWin::ReSetSlot(this->m_apkSlotWin[9]);
  ForgeSlotInvWin::ReSetSlot(v1->m_apkSlotWin[10]);
  ForgeSlotInvWin::ReSetSlot(v1->m_apkSlotWin[11]);
  IconWin::ShowFocus((IconWin *)&v1->m_apkSlotWin[9]->vfptr, v1->m_bNormalUpgradeWin);
  IconWin::ShowFocus((IconWin *)&v1->m_apkSlotWin[10]->vfptr, v1->m_bNormalUpgradeWin);
  IconWin::ShowFocus((IconWin *)&v1->m_apkSlotWin[11]->vfptr, v1->m_bNormalUpgradeWin);
  ((void (__stdcall *)(_DWORD))v1->pkForgeSlot[9]->vfptr[64].__vecDelDtor)(v1->m_bNormalUpgradeWin);
  ((void (__stdcall *)(_DWORD))v1->pkForgeSlot[10]->vfptr[64].__vecDelDtor)(v1->m_bNormalUpgradeWin);
  ((void (__stdcall *)(_DWORD))v1->pkForgeSlot[11]->vfptr[64].__vecDelDtor)(v1->m_bNormalUpgradeWin);
}

//----- (00532A30) --------------------------------------------------------
char __thiscall ItemUpgradeMsgWin::Create(ItemUpgradeMsgWin *this, PgFrameWork *pkFrameWork)
{
  ItemUpgradeMsgWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  PgWinSpr *v8; // eax@10
  PgWinSpr *v9; // eax@10
  char *v10; // eax@10
  PgWinSpr *v11; // eax@10
  char *v12; // eax@10
  PgWinSpr *v13; // eax@10
  char *v14; // eax@10
  char *v15; // edi@10
  float v16; // ST18_4@10
  D3DXCOLOR v17; // ST1C_16@10
  NiUnsharedGeometryGroup *v18; // ST0C_4@10
  int v19; // eax@10
  int v20; // eax@10
  char *v21; // edi@10
  float v22; // ST1C_4@10
  D3DXCOLOR v23; // ST20_16@10
  NiUnsharedGeometryGroup *v24; // ST10_4@10
  int v25; // eax@10
  int v26; // eax@10
  D3DXCOLOR v27; // ST1C_16@10
  char *v28; // eax@10
  D3DXCOLOR v29; // ST1C_16@10
  char *v30; // eax@10
  PgWinText *v31; // eax@10
  NiNode *v32; // esi@11
  bool v33; // [sp+1Ch] [bp-38h]@0
  UIUtil ui; // [sp+28h] [bp-2Ch]@10
  int uiLeft; // [sp+3Ch] [bp-18h]@4
  int uiTop; // [sp+40h] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+44h] [bp-10h]@1
  int v38; // [sp+50h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v38 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\ItemUpgradeMsg.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "ItemUpgradeMsgWin", 0) )
  {
    v6 = spNode.m_pObject;
    v38 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v38) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, 0, 0);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  UIUtil::CreateSpr(&ui, "Theme", 0);
  v8 = UIUtil::CreateSpr(&ui, "Panel02", 0);
  v2->m_pkOutlineSpr = v8;
  ((void (__thiscall *)(PgWinSpr *))v8->vfptr[64].__vecDelDtor)(v8);
  v9 = UIUtil::CreateSpr(&ui, "GoldNine", 0);
  v2->m_pkGoldSpr = v9;
  v9->vfptr[64].__vecDelDtor((NiRefObject *)v9, 0);
  v2->m_pkGoldSpr->m_pkToolTipWin = g_pkToolTipWin;
  v10 = (char *)TextData3::Get(0x2701DC06u);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkGoldSpr->vfptr, v10);
  v11 = UIUtil::CreateSpr(&ui, "BlueMile", 0);
  v2->m_pkBlueSpr = v11;
  v11->vfptr[64].__vecDelDtor((NiRefObject *)v11, 0);
  v2->m_pkBlueSpr->m_pkToolTipWin = g_pkToolTipWin;
  v12 = (char *)TextData3::Get(0x2200E502u);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkBlueSpr->vfptr, v12);
  v13 = UIUtil::CreateSpr(&ui, "RedEye", 0);
  v2->m_pkRedSpr = v13;
  v13->vfptr[64].__vecDelDtor((NiRefObject *)v13, 0);
  v2->m_pkRedSpr->m_pkToolTipWin = g_pkToolTipWin;
  v14 = (char *)TextData3::Get(0xD3CED007);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkRedSpr->vfptr, v14);
  v15 = (char *)UIUtil::CreateButton(&ui, 0, "Btn01", 0, 3);
  v16 = Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v17.r = *(_QWORD *)&Color::m_kDxWhiteColor.g;
  *(_QWORD *)&v17.b = __PAIR__(5, LODWORD(Color::m_kDxWhiteColor.a));
  v18 = TextData::Get(0x4F5F499Fu);
  v19 = (*(int (__thiscall **)(char *))(*(_DWORD *)v15 + 148))(v15);
  v20 = (*(int (__thiscall **)(char *, int))(*(_DWORD *)v15 + 144))(v15, v19);
  UIUtil::CreateTextNoTag(&ui, 0, 0, v20, (int)v18, v15, 0, LODWORD(v16), v17, 0, 0, 0);
  v21 = (char *)UIUtil::CreateButton(&ui, 1u, "Btn02", 0, 3);
  v22 = Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v23.r = *(_QWORD *)&Color::m_kDxWhiteColor.g;
  *(_QWORD *)&v23.b = __PAIR__(5, LODWORD(Color::m_kDxWhiteColor.a));
  v24 = TextData::Get(0x45B392ACu);
  v25 = (*(int (__thiscall **)(char *))(*(_DWORD *)v21 + 148))(v21);
  v26 = (*(int (__thiscall **)(char *, int))(*(_DWORD *)v21 + 144))(v21, v25);
  UIUtil::CreateTextNoTag(&ui, 0, 0, v26, (int)v24, v21, 0, LODWORD(v22), v23, 0, 0, v33);
  *(_QWORD *)&v27.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v27.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v28 = (char *)TextData3::Get(0xA1867FCF);
  UIUtil::CreateTextEx(&ui, "Text01", v28, 0, v27, 5u, 0, 0, 0);
  *(_QWORD *)&v29.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v29.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v30 = (char *)TextData3::Get(0x236A4146u);
  v31 = UIUtil::CreateTextEx(&ui, "Text02", v30, 0, v29, 5u, 0, 0, 0);
  v2->m_pkNoItemText = v31;
  ((void (__thiscall *)(PgWinText *))v31->vfptr[64].__vecDelDtor)(v31);
  ((void (__thiscall *)(ItemUpgradeMsgWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  LOBYTE(v38) = 0;
  UIUtil::~UIUtil(&ui);
  v38 = -1;
  if ( spNode.m_pObject )
  {
    v32 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v32 )
        v32->vfptr->__vecDelDtor((NiRefObject *)v32, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00532E80) --------------------------------------------------------
void __thiscall ItemUpgradeMsgWin::OnShowWin(ItemUpgradeMsgWin *this)
{
  ItemUpgradeMsgWin *v1; // esi@1
  PgFrameWork *v2; // eax@1
  unsigned int v3; // edi@2
  char v4; // bl@3
  unsigned int v5; // eax@6
  Item *v6; // ecx@7

  v1 = this;
  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    v3 = v2[15].m_kMsgQ.m_uiAlloced;
    if ( v3 )
    {
      v4 = 0;
      if ( *(_BYTE *)(v3 + 726) == -1 )
      {
        ((void (__stdcall *)(_DWORD))v1->m_pkRedSpr->vfptr[64].__vecDelDtor)(1);
        v4 = 1;
      }
      if ( *(_BYTE *)(v3 + 727) == -1 )
      {
        v5 = *(_BYTE *)(v3 + 724);
        if ( v5 < 0xC0 )
        {
          v6 = g_kInventory.m_aspInv[v5].m_pObject;
          if ( v6 )
          {
            if ( ((int (*)(void))v6->vfptr[9].__vecDelDtor)() )
            {
              ((void (__stdcall *)(_DWORD))v1->m_pkBlueSpr->vfptr[64].__vecDelDtor)(1);
              v4 = 1;
            }
          }
        }
      }
      if ( *(_BYTE *)(v3 + 728) == -1 )
      {
        ((void (__stdcall *)(_DWORD))v1->m_pkGoldSpr->vfptr[64].__vecDelDtor)(1);
      }
      else if ( !v4 )
      {
        return;
      }
      ((void (__stdcall *)(_DWORD))v1->m_pkNoItemText->vfptr[64].__vecDelDtor)(1);
      ((void (__stdcall *)(_DWORD))v1->m_pkOutlineSpr->vfptr[64].__vecDelDtor)(1);
    }
  }
}

//----- (00532F60) --------------------------------------------------------
void __thiscall ForgeSlotInvWin::ReSetInitSlot(ForgeSlotInvWin *this)
{
  ForgeSlotInvWin *v1; // esi@1
  PgWin *v2; // eax@1
  unsigned int v3; // ecx@2
  ItemIcon *v4; // ecx@3
  Item *v5; // eax@4

  v1 = this;
  v2 = this->m_pkSender;
  if ( v2 )
  {
    v3 = this->m_uiSenderInvIndex;
    if ( v3 < 0xC0 )
    {
      v4 = (ItemIcon *)LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][v3 + 2]);
      if ( v4 )
      {
        v5 = ItemIcon::GetItem(v4);
        if ( v5 )
        {
          v1->m_bLock = 0;
          ItemIcon::SetItem((ItemIcon *)&v1->vfptr, v5, 1);
        }
        else
        {
          ForgeSlotInvWin::ReSetSlot(v1);
        }
      }
    }
  }
}

//----- (00532FB0) --------------------------------------------------------
void __thiscall ItemUpgradeWin::DirectMessage(ItemUpgradeWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  ItemUpgradeWin *v4; // esi@1
  int *v5; // eax@4
  signed int v6; // ecx@4
  int v7; // edi@5

  v4 = this;
  if ( iMsgTag == 27 && pvBody && !*(_DWORD *)pvBody )
  {
    ItemUpgradeWin::StartSlotRotate((ItemUpgradeWin *)((char *)this - 232));
    v5 = &v4->m_iDragOffX;
    v6 = 12;
    do
    {
      v7 = *v5;
      ++v5;
      --v6;
      *(_BYTE *)(v7 + 448) = 1;
    }
    while ( v6 );
    GameFrameWork::NcItemUpgradeReq(
      (GameFrameWork *)LODWORD(v4->m_kLocal.m_Rotate.m_pEntry[1][0]),
      (char)v4->pkForgeSlot[9],
      BYTE1(v4->pkForgeSlot[9]),
      BYTE2(v4->pkForgeSlot[9]),
      BYTE3(v4->pkForgeSlot[9]),
      (char)v4->pkForgeSlot[10],
      (unsigned int)v4->pkForgeSlot[11]);
    v4->pkForgeSlot[9] = (PgWinSpr *)-1;
    LOBYTE(v4->pkForgeSlot[10]) = -1;
    v4->pkForgeSlot[11] = 0;
  }
}

//----- (00533060) --------------------------------------------------------
void __thiscall ItemUpgradeWin::StartUpgrade(ItemUpgradeWin *this)
{
  ItemUpgradeWin *v1; // esi@1
  ForgeSlotInvWin **v2; // eax@1
  signed int v3; // ecx@1
  ForgeSlotInvWin *v4; // edi@2
  int v5; // eax@3

  v1 = this;
  ItemUpgradeWin::StartSlotRotate(this);
  v2 = v1->m_apkSlotWin;
  v3 = 12;
  do
  {
    v4 = *v2;
    ++v2;
    --v3;
    v4->m_bLock = 1;
  }
  while ( v3 );
  v5 = v1->m_UpgradeType;
  if ( v5 )
  {
    if ( v5 == 1 )
    {
      GameFrameWork::NcItemNewUpGradeReq((GameFrameWork *)v1->m_pkFrameWork, v1->m_bEquipSlot, v1->m_bRawSlot);
    }
    else if ( v5 == 2 )
    {
      GameFrameWork::NcItemBraceletUpgradeReq((GameFrameWork *)v1->m_pkFrameWork, v1->m_bEquipSlot, v1->m_bRawSlot);
    }
  }
  else
  {
    GameFrameWork::NcItemUpgradeReq(
      (GameFrameWork *)v1->m_pkFrameWork,
      v1->m_bEquipSlot,
      v1->m_bRawSlot,
      v1->m_bGemRedSlot,
      v1->m_bGemBlueSlot,
      v1->m_bGoldNineSlot,
      v1->m_dwMoney);
  }
}

//----- (00533120) --------------------------------------------------------
void __thiscall ItemUpgradeWin::ResetAllDataWithoutItem(ItemUpgradeWin *this)
{
  ItemUpgradeWin *v1; // edi@1
  signed int v2; // ebx@1
  ForgeSlotInvWin *v3; // esi@3
  PgWin *v4; // eax@3
  unsigned int v5; // ecx@4
  InvWin *v6; // eax@5
  ItemIcon *v7; // ecx@8
  NiRefObjectVtbl **v8; // ebx@9
  NiRefObjectVtbl *v9; // esi@10
  Item *v10; // eax@10
  unsigned int v11; // eax@14
  ForgeSlotInvWin *v12; // esi@17
  PgWin *v13; // eax@17
  unsigned int v14; // ecx@18
  ItemIcon *v15; // ecx@19
  Item *v16; // eax@20
  int i; // [sp+Ch] [bp-4h]@1

  v1 = this;
  this->m_pkSlotOn->m_uFlags |= 1u;
  v1->m_pkSprBomb[0]->m_uFlags |= 1u;
  v1->m_pkSprBomb[1]->m_uFlags |= 1u;
  v1->m_pkSprBomb[2]->m_uFlags |= 1u;
  v2 = 0;
  i = 0;
  do
  {
    if ( v2 == 8 )
    {
      v11 = v1->m_dwUpResult;
      if ( v11 != 2247 && v11 != 15371 )
      {
        v12 = v1->m_apkSlotWin[8];
        v13 = v12->m_pkSender;
        if ( v13 )
        {
          v14 = v12->m_uiSenderInvIndex;
          if ( v14 < 0xC0 )
          {
            v15 = (ItemIcon *)LODWORD(v13[1].m_kLocal.m_Rotate.m_pEntry[0][v14 + 2]);
            if ( v15 )
            {
              v16 = ItemIcon::GetItem(v15);
              if ( v16 )
              {
                v12->m_bLock = 0;
                ItemIcon::SetItem((ItemIcon *)&v12->vfptr, v16, 1);
              }
              else
              {
                ForgeSlotInvWin::ReSetSlot(v12);
              }
            }
          }
        }
      }
      else
      {
        ForgeSlotInvWin::ReSetSlot(v1->m_apkSlotWin[8]);
      }
LABEL_8:
      v7 = (ItemIcon *)&v1->m_apkSlotWin[v2]->vfptr;
      if ( v7 )
      {
        v8 = &v1->pkForgeSlot[v2]->vfptr;
        if ( v8 )
        {
          v9 = *v8;
          v10 = ItemIcon::GetItem(v7);
          v9[60].__vecDelDtor((NiRefObject *)v8, v10 == 0);
        }
        v2 = i;
      }
      goto LABEL_12;
    }
    v3 = v1->m_apkSlotWin[v2];
    v4 = v3->m_pkSender;
    v3->m_bLock = 0;
    if ( v4 )
    {
      v5 = v3->m_uiSenderInvIndex;
      if ( v5 < 0xC0 )
      {
        v6 = (InvWin *)LODWORD(v4[1].m_kLocal.m_Rotate.m_pEntry[0][v5 + 2]);
        if ( v6 )
          InvWin::SetLock(v6, 0);
      }
    }
    v3->m_uiSenderType = -1;
    v3->m_uiSenderInvIndex = -1;
    v3->m_pkSender = 0;
    ItemIcon::SetItem((ItemIcon *)&v3->vfptr, 0, 1);
    if ( (unsigned int)v2 < 0xC )
      goto LABEL_8;
LABEL_12:
    i = ++v2;
  }
  while ( v2 < 12 );
  v1->m_bUpGradeStart = 0;
  *(_DWORD *)&v1->m_bEquipSlot = -1;
  v1->m_bGoldNineSlot = -1;
  v1->m_dwMoney = 0;
}

//----- (005332C0) --------------------------------------------------------
void __thiscall ItemUpgradeWin::EndSlotRotate(ItemUpgradeWin *this)
{
  ItemUpgradeWin *v1; // esi@1
  unsigned int v2; // ecx@1
  GameFrameWork *v3; // edi@5
  NiUnsharedGeometryGroup *v4; // ST0C_4@5
  GameFrameWork *v5; // edi@6
  NiUnsharedGeometryGroup *v6; // ST0C_4@6
  GameFrameWork *v7; // edi@7
  NiUnsharedGeometryGroup *v8; // ST0C_4@7
  GameFrameWork *v9; // edi@8
  NiUnsharedGeometryGroup *v10; // ST0C_4@8
  GameFrameWork *v11; // edi@9
  NiUnsharedGeometryGroup *v12; // ST0C_4@9
  GameFrameWork *v13; // edi@10
  NiUnsharedGeometryGroup *v14; // ST0C_4@10
  GameFrameWork *v15; // edi@11
  NiUnsharedGeometryGroup *v16; // ST0C_4@11
  GameFrameWork *v17; // edi@12
  NiUnsharedGeometryGroup *v18; // ST0C_4@12
  GameFrameWork *v19; // edi@13
  NiUnsharedGeometryGroup *v20; // ST0C_4@13
  GameFrameWork *v21; // edi@14
  NiUnsharedGeometryGroup *v22; // ST0C_4@14
  GameFrameWork *v23; // edi@15
  NiUnsharedGeometryGroup *v24; // ST0C_4@15
  GameFrameWork *v25; // edi@16
  NiUnsharedGeometryGroup *v26; // ST0C_4@16
  GameFrameWork *v27; // edi@17
  NiUnsharedGeometryGroup *v28; // ST0C_4@17
  GameFrameWork *v29; // edi@18
  NiUnsharedGeometryGroup *v30; // ST0C_4@18
  GameFrameWork *v31; // edi@19
  NiUnsharedGeometryGroup *v32; // ST0C_4@19
  GameFrameWork *v33; // edi@20
  NiUnsharedGeometryGroup *v34; // ST0C_4@20
  GameFrameWork *v35; // edi@21
  NiUnsharedGeometryGroup *v36; // ST0C_4@21
  GameFrameWork *v37; // edi@31
  NiUnsharedGeometryGroup *v38; // ST0C_4@31
  Item *v39; // ebx@34
  Item *v40; // eax@34
  GameFrameWork *v41; // ST1C_4@36
  int v42; // edi@36
  int v43; // ebx@36
  char *v44; // ST0C_4@36
  char *v45; // eax@36
  const char *v46; // eax@36
  GameFrameWork *v47; // edi@37
  NiUnsharedGeometryGroup *v48; // ST0C_4@37
  GameFrameWork *v49; // edi@38
  NiUnsharedGeometryGroup *v50; // ST0C_4@38
  NiRefObjectVtbl **v51; // eax@46
  NiRefObjectVtbl *v52; // edi@46
  NiUnsharedGeometryGroup *v53; // eax@46
  unsigned int v54; // [sp-4h] [bp-98h]@4
  char szErrorCode[128]; // [sp+10h] [bp-84h]@43

  v1 = this;
  v2 = this->m_dwUpResult;
  if ( v2 <= 0x3801 )
  {
    if ( v2 == 14337 )
    {
      v35 = (GameFrameWork *)v1->m_pkFrameWork;
      v36 = TextData3::Get(0xED462021);
      GameFrameWork::AddSysMsg(v35, (const char *)v36);
      goto LABEL_44;
    }
    switch ( v2 )
    {
      case 0x8C2u:
        goto $LN35_9;
      case 0x8C3u:
        ItemUpgradeWin::StartResultEffect(v1, (NiAVObject *)&v1->m_spEffect_SUCC_1.m_pObject->vfptr);
        SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_UPGOOD);
        v5 = (GameFrameWork *)v1->m_pkFrameWork;
        v6 = TextData::Get(0x23664B7Cu);
        GameFrameWork::AddSysMsg(v5, (const char *)v6);
        goto LABEL_44;
      case 0x8C4u:
        ItemUpgradeWin::StartResultEffect(v1, (NiAVObject *)&v1->m_spEffect_SUCC_2.m_pObject->vfptr);
        SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_UPBEST);
        v7 = (GameFrameWork *)v1->m_pkFrameWork;
        v8 = TextData::Get(0x24664B7Cu);
        GameFrameWork::AddSysMsg(v7, (const char *)v8);
        goto LABEL_44;
      case 0x8C5u:
        ItemUpgradeWin::StartResultEffect(v1, (NiAVObject *)&v1->m_spEffect_FAIL_0.m_pObject->vfptr);
        SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_UPWORST);
        v9 = (GameFrameWork *)v1->m_pkFrameWork;
        v10 = TextData::Get(0x729AA57Au);
        GameFrameWork::AddSysMsg(v9, (const char *)v10);
        goto LABEL_44;
      case 0x8C6u:
        ItemUpgradeWin::StartResultEffect(v1, (NiAVObject *)&v1->m_spEffect_FAIL_1.m_pObject->vfptr);
        SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_UPWORST);
        v11 = (GameFrameWork *)v1->m_pkFrameWork;
        v12 = TextData::Get(0x12B4A27Bu);
        GameFrameWork::AddSysMsg(v11, (const char *)v12);
        goto LABEL_44;
      case 0x8C7u:
        ItemUpgradeWin::StartResultEffect(v1, (NiAVObject *)&v1->m_spEffect_DESTROY.m_pObject->vfptr);
        v13 = (GameFrameWork *)v1->m_pkFrameWork;
        v14 = TextData::Get(0x24524480u);
        GameFrameWork::AddSysMsg(v13, (const char *)v14);
        goto LABEL_44;
      case 0x8C8u:
        v15 = (GameFrameWork *)v1->m_pkFrameWork;
        v16 = TextData::Get(0xB6E3E423);
        GameFrameWork::AddSysMsg(v15, (const char *)v16);
        goto LABEL_44;
      case 0x8C9u:
        v17 = (GameFrameWork *)v1->m_pkFrameWork;
        v18 = TextData2::Get(0xFF869D74);
        GameFrameWork::AddSysMsg(v17, (const char *)v18);
        goto LABEL_44;
      case 0x8CAu:
        v19 = (GameFrameWork *)v1->m_pkFrameWork;
        v20 = TextData::Get(0x7E92A6CBu);
        GameFrameWork::AddSysMsg(v19, (const char *)v20);
        goto LABEL_44;
      case 0x8CBu:
        v21 = (GameFrameWork *)v1->m_pkFrameWork;
        v22 = TextData::Get(0x304F412Du);
        GameFrameWork::AddSysMsg(v21, (const char *)v22);
        goto LABEL_44;
      case 0x8CFu:
        v23 = (GameFrameWork *)v1->m_pkFrameWork;
        v24 = TextData::Get(0x2B90B779u);
        GameFrameWork::AddSysMsg(v23, (const char *)v24);
        goto LABEL_44;
      case 0x8D2u:
        v25 = (GameFrameWork *)v1->m_pkFrameWork;
        v26 = TextData::Get(0x60DFB2B8u);
        GameFrameWork::AddSysMsg(v25, (const char *)v26);
        goto LABEL_44;
      case 0x8D3u:
        v27 = (GameFrameWork *)v1->m_pkFrameWork;
        v28 = TextData::Get(0xA6EBB6AF);
        GameFrameWork::AddSysMsg(v27, (const char *)v28);
        goto LABEL_44;
      case 0x8D4u:
        v29 = (GameFrameWork *)v1->m_pkFrameWork;
        v30 = TextData::Get(0xA5E2B9B4);
        GameFrameWork::AddSysMsg(v29, (const char *)v30);
        goto LABEL_44;
      case 0x8D0u:
        v31 = (GameFrameWork *)v1->m_pkFrameWork;
        v32 = TextData::Get(0xC9114F0D);
        GameFrameWork::AddSysMsg(v31, (const char *)v32);
        goto LABEL_44;
      case 0x8D1u:
        v33 = (GameFrameWork *)v1->m_pkFrameWork;
        v34 = TextData::Get(0xC0575B11);
        GameFrameWork::AddSysMsg(v33, (const char *)v34);
        goto LABEL_44;
      default:
        goto LABEL_43;
    }
    goto LABEL_43;
  }
  if ( v2 > 0x3C01 )
  {
    switch ( v2 )
    {
      case 0x3C07u:
$LN17_27:
        ItemUpgradeWin::StartResultEffect(v1, (NiAVObject *)&v1->m_spEffect_SUCC_1.m_pObject->vfptr);
        SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_UPGOOD);
        v54 = 593906556;
        goto LABEL_5;
      case 0x3C02u:
      case 0x3C04u:
        v39 = Item::Create(v1->m_UpgradedItemID);
        v40 = Item::Create(v1->m_UpsourceItemID);
        if ( v39 && v40 )
        {
          v41 = (GameFrameWork *)v1->m_pkFrameWork;
          v42 = (int)v40->m_pkInfo->Name;
          v43 = (int)v39->m_pkInfo->Name;
          v44 = ItemUpgradeWin::GetBraceletUpsourceName(v1);
          v45 = (char *)TextData3::Get(0xF4333A4B);
          v46 = fs(v45, v43, v42, v44);
          GameFrameWork::AddSysMsg(v41, v46);
        }
        goto LABEL_44;
      case 0x3C05u:
        v47 = (GameFrameWork *)v1->m_pkFrameWork;
        v48 = TextData3::Get(0x4EA8C4C2u);
        GameFrameWork::AddSysMsg(v47, (const char *)v48);
        goto LABEL_44;
      case 0x3C03u:
        v49 = (GameFrameWork *)v1->m_pkFrameWork;
        v50 = TextData3::Get(0x4779B4D5u);
        GameFrameWork::AddSysMsg(v49, (const char *)v50);
        goto LABEL_44;
      case 0x3C08u:
        ItemUpgradeWin::StartResultEffect(v1, (NiAVObject *)&v1->m_spEffect_SUCC_2.m_pObject->vfptr);
        SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_UPBEST);
        v54 = 610683772;
        goto LABEL_5;
      case 0x3C09u:
        ItemUpgradeWin::StartResultEffect(v1, (NiAVObject *)&v1->m_spEffect_FAIL_0.m_pObject->vfptr);
LABEL_27:
        SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_UPWORST);
        v54 = 1922737530;
        goto LABEL_5;
      case 0x3C0Au:
        ItemUpgradeWin::StartResultEffect(v1, (NiAVObject *)&v1->m_spEffect_FAIL_1.m_pObject->vfptr);
LABEL_29:
        SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_UPWORST);
        v54 = 313827963;
        goto LABEL_5;
      case 0x3C0Bu:
        ItemUpgradeWin::StartResultEffect(v1, (NiAVObject *)&v1->m_spEffect_DESTROY.m_pObject->vfptr);
        v54 = 609371264;
        goto LABEL_5;
      default:
        goto LABEL_43;
    }
    goto LABEL_43;
  }
  if ( v2 != 15361 )
  {
    switch ( v2 )
    {
      case 0x3802u:
        goto $LN35_9;
      case 0x3803u:
        goto $LN17_27;
      case 0x3804u:
        ItemUpgradeWin::StartResultEffect(v1, (NiAVObject *)&v1->m_spEffect_FAIL_0.m_pObject->vfptr);
        goto LABEL_27;
      case 0x3805u:
        ItemUpgradeWin::StartResultEffect(v1, (NiAVObject *)&v1->m_spEffect_FAIL_1.m_pObject->vfptr);
        goto LABEL_29;
      case 0x3806u:
        v54 = -1226578909;
        goto LABEL_5;
      case 0x3807u:
        v37 = (GameFrameWork *)v1->m_pkFrameWork;
        v38 = TextData2::Get(0xFF869D74);
        GameFrameWork::AddSysMsg(v37, (const char *)v38);
        goto LABEL_44;
      case 0x3808u:
        v54 = 2123540171;
        goto LABEL_5;
      default:
        break;
    }
LABEL_43:
    sprintf(szErrorCode, " Upgrade Error (Code:%d)", v2);
    GameFrameWork::AddSysMsg((GameFrameWork *)v1->m_pkFrameWork, szErrorCode);
    goto LABEL_44;
  }
$LN35_9:
  v54 = -1787109935;
LABEL_5:
  v3 = (GameFrameWork *)v1->m_pkFrameWork;
  v4 = TextData::Get(v54);
  GameFrameWork::AddSysMsg(v3, (const char *)v4);
LABEL_44:
  ItemUpgradeWin::ResetAllDataWithoutItem(v1);
  if ( !(`TutorialMgr::GetTutorialMgr'::`2'::`local static guard' & 1) )
  {
    `TutorialMgr::GetTutorialMgr'::`2'::`local static guard' |= 1u;
    TutorialMgr::TutorialMgr(&`TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr);
    atexit(`TutorialMgr::GetTutorialMgr'::`2'::`dynamic atexit destructor for 'kTutorialMgr'');
  }
  TutorialMgr::On_NC_ITEM_UPGRADE_ACK(&`TutorialMgr::GetTutorialMgr'::`2'::kTutorialMgr);
  v51 = &v1->m_pkStartTextWin->vfptr;
  v1->m_eUpgradeState = 0;
  v52 = *v51;
  v53 = TextData::Get(0xCF06FADC);
  v52[118].__vecDelDtor((NiRefObject *)v1->m_pkStartTextWin, (unsigned int)v53);
  *(_DWORD *)&v1->m_UpgradedItemID = -1;
}
// A8C638: using guessed type int `TutorialMgr::GetTutorialMgr'::`2'::`local static guard';

//----- (00533860) --------------------------------------------------------
void __thiscall ItemUpgradeWin::UpdateSlotRotate(ItemUpgradeWin *this, float fCurTime)
{
  ItemUpgradeWin *v2; // esi@1
  ItemUpgradeWin::UpgradeState v3; // eax@2
  float v4; // ST10_4@3
  signed int v5; // edi@5
  int v6; // ecx@7
  unsigned int v7; // eax@8
  int v8; // edi@17
  int v9; // ebx@17
  int v10; // eax@20
  float v11; // edi@21
  int v12; // ebx@28
  int v13; // edi@28
  PgWinSpr *v14; // eax@28
  float fCurSpeed; // [sp+10h] [bp-4h]@3

  v2 = this;
  if ( this->m_bUpGradeStart )
  {
    v3 = this->m_eUpgradeState;
    if ( v3 == 1 )
    {
      v4 = fCurTime - this->m_fRotateStartTime;
      fCurSpeed = this->m_fSpeed - v4 * this->m_fAcceleration;
      if ( fCurSpeed < 1.700000047683716 )
        fCurSpeed = 1.6;
      this->m_kTimerInterval.m_fCheckTime = 1.0 / fCurSpeed;
      v5 = CNSTimer_Interval::IsRun_GetCount(&this->m_kTimerInterval, fCurTime);
      if ( v5 )
        SoundMgr::PlayInterfaceSound(&g_kSoundMgr, "SFX_SlotOne");
      v6 = (v5 + v2->m_nCurRotatePos) % 8;
      v2->m_nCurRotatePos = v6;
      if ( fCurSpeed < 1.700000047683716 )
      {
        v7 = v2->m_dwUpResult;
        if ( v7 == 2243 || v7 == 14339 || v7 == 15367 || v7 == 15368 || v7 == 2244 )
        {
          if ( v2->m_nSuccessTargetSlot == v6 )
          {
            v2->m_eUpgradeState = 3;
            CNSTimer_Interval::ReSet(&v2->m_kTimerInterval, fCurTime);
            v2->m_kTimerInterval.m_fCheckTime = 0.66666669;
          }
        }
        else if ( v2->m_nSuccessTargetSlot == v6 )
        {
          v2->m_eUpgradeState = 2;
        }
      }
      v8 = ((int (*)(void))v2->pkForgeSlot[v2->m_nCurRotatePos]->vfptr[48].__vecDelDtor)();
      v9 = ((int (*)(void))v2->pkForgeSlot[v2->m_nCurRotatePos]->vfptr[50].__vecDelDtor)();
      ((void (__stdcall *)(int))v2->m_pkSlotOn->vfptr[43].__vecDelDtor)(v8);
      ((void (__stdcall *)(int))v2->m_pkSlotOn->vfptr[44].__vecDelDtor)(v9);
    }
    else if ( v3 == 3 )
    {
      if ( CNSTimer_Interval::IsRun_GetCount(&this->m_kTimerInterval, fCurTime) )
      {
        v10 = v2->m_nBombCount;
        if ( v10 )
        {
          if ( v10 == 1 )
          {
            LODWORD(v11) = 8;
          }
          else if ( v10 == 2 )
          {
            v11 = *(float *)&v2->m_nCurRawSlot;
          }
          else
          {
            v11 = fCurTime;
          }
        }
        else
        {
          SoundMgr::PlayInterfaceSound(&g_kSoundMgr, "SFX_SlotEnd");
          v11 = *(float *)&v2->m_nSuccessTargetSlot;
        }
        if ( v2->m_nBombCount < 3 )
        {
          v2->m_pkSlotOn->m_uFlags |= 1u;
          v12 = ((int (*)(void))v2->pkForgeSlot[LODWORD(v11)]->vfptr[48].__vecDelDtor)();
          v13 = ((int (*)(void))v2->pkForgeSlot[LODWORD(v11)]->vfptr[50].__vecDelDtor)();
          ((void (__stdcall *)(int))v2->m_pkSprBomb[v2->m_nBombCount]->vfptr[43].__vecDelDtor)(v12);
          ((void (__stdcall *)(int))v2->m_pkSprBomb[v2->m_nBombCount]->vfptr[44].__vecDelDtor)(v13);
          v14 = v2->m_pkSprBomb[v2->m_nBombCount];
          v14->m_uFlags &= 0xFFFEu;
        }
        ++v2->m_nBombCount;
      }
      if ( v2->m_nBombCount >= 4 )
        ItemUpgradeWin::EndSlotRotate(v2);
    }
    else if ( v3 == 2 && CNSTimer_Interval::IsRun_GetCount(&this->m_kTimerInterval, fCurTime) )
    {
      ItemUpgradeWin::EndSlotRotate(v2);
    }
  }
}

//----- (00533B10) --------------------------------------------------------
void __thiscall ItemUpgradeWin::ChangeUpgradeWin(ItemUpgradeWin *this, bool bNormalWin, int iUpgradeType)
{
  ItemUpgradeWin *v3; // edi@1
  GameFrameWork *v4; // esi@5
  NiUnsharedGeometryGroup *v5; // eax@5
  NiRefObjectVtbl *v6; // esi@7
  NiUnsharedGeometryGroup *v7; // eax@7
  ItemIcon **v8; // esi@7
  Item *v9; // ebx@9
  Item *v10; // eax@10
  int *v11; // eax@14
  int v12; // ebx@15
  Item *v13; // eax@15
  GameFrameWork *v14; // ebx@17
  NiUnsharedGeometryGroup *v15; // eax@17
  char *v16; // eax@18
  NiRefObjectVtbl *v17; // esi@20
  NiUnsharedGeometryGroup *v18; // eax@20
  int v19; // esi@20
  int v20; // ebx@20
  ItemInfo **v21; // eax@22
  ItemIcon **v22; // esi@24
  Item *v23; // ebx@26
  Item *v24; // eax@27
  ItemIcon *v25; // ecx@30
  int *v26; // ebx@31
  int v27; // esi@32
  Item *v28; // eax@32
  GameFrameWork *v29; // ebx@34
  NiUnsharedGeometryGroup *v30; // eax@34
  int v31; // eax@36
  Item *v32; // eax@37
  int v33; // ST04_4@40
  char *v34; // eax@40
  char *v35; // eax@40
  ItemInfo *pHighGradeItem; // [sp+Ch] [bp-8h]@23
  int v37; // [sp+10h] [bp-4h]@24
  int i; // [sp+1Ch] [bp+8h]@7
  int ia; // [sp+1Ch] [bp+8h]@24
  int iUpgradeTypea; // [sp+20h] [bp+Ch]@14

  v3 = this;
  this->m_UpgradeType = iUpgradeType;
  this->m_bNormalUpgradeWin = bNormalWin;
  if ( !bNormalWin
    && (ItemIcon::GetItem((ItemIcon *)&this->m_apkSlotWin[9]->vfptr)
     || ItemIcon::GetItem((ItemIcon *)&v3->m_apkSlotWin[10]->vfptr)
     || ItemIcon::GetItem((ItemIcon *)&v3->m_apkSlotWin[11]->vfptr)) )
  {
    v4 = (GameFrameWork *)v3->m_pkFrameWork;
    v5 = TextData3::Get(0xEF71897F);
    GameFrameWork::AddSysMsg(v4, (const char *)v5);
  }
  if ( v3->m_bNormalUpgradeWin )
  {
    v6 = v3->m_pkForgeFirstText->vfptr;
    v7 = TextData::Get(0x333F8F7Eu);
    v6[118].__vecDelDtor((NiRefObject *)v3->m_pkForgeFirstText, (unsigned int)v7);
    ((void (__stdcall *)(signed int))v3->m_pkForgeSecondText->vfptr[64].__vecDelDtor)(1);
    i = 0;
    v8 = (ItemIcon **)v3->m_apkSlotWin;
    do
    {
      if ( ItemIcon::GetItem(*v8) )
      {
        v9 = ItemIcon::GetItem(*v8);
        if ( !v9
          || (v10 = ItemIcon::GetItem((ItemIcon *)&v3->m_apkSlotWin[8]->vfptr)) == 0
          || v9->m_pkInfo->Grade != v10->m_pkInfo->Grade )
        {
          ForgeSlotInvWin::ReSetSlot((ForgeSlotInvWin *)*v8);
          if ( (unsigned int)i < 0xC )
          {
            if ( *v8 )
            {
              v11 = (int *)*(v8 - 19);
              iUpgradeTypea = (int)v11;
              if ( v11 )
              {
                v12 = *v11;
                v13 = ItemIcon::GetItem(*v8);
                (*(void (__thiscall **)(int, _DWORD))(v12 + 240))(iUpgradeTypea, v13 == 0);
              }
            }
          }
          if ( ItemIcon::GetItem((ItemIcon *)&v3->m_apkSlotWin[8]->vfptr) )
          {
            v14 = (GameFrameWork *)v3->m_pkFrameWork;
            v15 = TextData3::Get(0xED462021);
            GameFrameWork::AddSysMsg(v14, (const char *)v15);
          }
        }
      }
      v16 = (char *)TextData::Get(0xD5174325);
      PgWin::SetToolTipWinText((PgWin *)&(*(v8 - 19))->vfptr, v16);
      ++v8;
      ++i;
    }
    while ( i < 8 );
    ItemUpgradeWin::AssistItemShow(v3);
  }
  else
  {
    v17 = v3->m_pkForgeFirstText->vfptr;
    v18 = TextData3::Get(0xBCE0AFCF);
    ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *, _DWORD))v17[120].__vecDelDtor)(
      v3->m_pkForgeFirstText,
      v18,
      0);
    ((void (__stdcall *)(_DWORD))v3->m_pkForgeSecondText->vfptr[64].__vecDelDtor)(0);
    v19 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    v20 = v3->m_GradeItemID;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v20) )
    {
      if ( (unsigned __int16)v20 <= *(_WORD *)(v19 + 200) )
      {
        v21 = (ItemInfo **)(*(_DWORD *)(v19 + 196) + 4 * v20);
        if ( *v21 )
        {
          pHighGradeItem = *v21;
          if ( *v21 )
          {
            v22 = (ItemIcon **)v3->m_apkSlotWin;
            ia = 0;
            v37 = (int)v3->m_apkSlotWin;
            do
            {
              if ( ItemIcon::GetItem(*v22) )
              {
                v23 = ItemIcon::GetItem(*v22);
                if ( !v23
                  || (v24 = ItemIcon::GetItem((ItemIcon *)&v3->m_apkSlotWin[8]->vfptr)) == 0
                  || v23->m_pkInfo->Grade != v24->m_pkInfo->Grade )
                {
                  ForgeSlotInvWin::ReSetSlot((ForgeSlotInvWin *)*v22);
                  if ( (unsigned int)ia < 0xC )
                  {
                    v25 = *v22;
                    if ( *v22 )
                    {
                      v26 = (int *)*(v22 - 19);
                      if ( v26 )
                      {
                        v27 = *v26;
                        v28 = ItemIcon::GetItem(v25);
                        (*(void (__thiscall **)(int *, _DWORD))(v27 + 240))(v26, v28 == 0);
                        v22 = (ItemIcon **)v37;
                      }
                    }
                  }
                  if ( ItemIcon::GetItem((ItemIcon *)&v3->m_apkSlotWin[8]->vfptr) )
                  {
                    v29 = (GameFrameWork *)v3->m_pkFrameWork;
                    v30 = TextData3::Get(0xED462021);
                    GameFrameWork::AddSysMsg(v29, (const char *)v30);
                  }
                }
              }
              if ( iUpgradeType == 1 )
              {
                v31 = (int)pHighGradeItem->Name;
              }
              else
              {
                v32 = Item::Create(v3->m_BraceletGradeItemID[0]);
                if ( v32 )
                  v31 = (int)v32->m_pkInfo->Name;
                else
                  v31 = 0;
              }
              v33 = v31;
              v34 = (char *)TextData3::Get(0x5FFCC4C7u);
              v35 = fs(v34, v33);
              PgWin::SetToolTipWinText((PgWin *)&(*(v22 - 19))->vfptr, v35);
              ++v22;
              ++ia;
              v37 = (int)v22;
            }
            while ( ia < 8 );
            ItemUpgradeWin::AssistItemShow(v3);
          }
        }
      }
    }
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (00533E60) --------------------------------------------------------
void __thiscall ItemUpgradeMsgWin::OnApply(ItemUpgradeMsgWin *this)
{
  ItemUpgradeMsgWin *v1; // edi@1
  PgFrameWork *v2; // eax@1
  ItemUpgradeWin *v3; // ebx@2
  int v4; // eax@3
  Item *v5; // eax@5
  GameFrameWork *v6; // esi@6
  int v7; // ST0C_4@6
  char *v8; // eax@6
  const char *v9; // eax@6
  int v10; // eax@7
  Item *v11; // eax@9
  GameFrameWork *v12; // esi@10
  int v13; // ST0C_4@10
  char *v14; // eax@10
  const char *v15; // eax@10
  int v16; // eax@11
  Item *v17; // eax@13
  GameFrameWork *v18; // esi@14
  int v19; // ST0C_4@14
  char *v20; // eax@14
  const char *v21; // eax@14
  int v22; // eax@15
  Item *v23; // eax@17
  GameFrameWork *v24; // esi@18
  int v25; // ST0C_4@18
  char *v26; // eax@18
  const char *v27; // eax@18

  v1 = this;
  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    v3 = (ItemUpgradeWin *)v2[15].m_kMsgQ.m_uiAlloced;
    if ( v3 )
    {
      ItemUpgradeWin::StartUpgrade(v3);
      LOBYTE(v4) = v3->m_bRawSlot;
      if ( (_BYTE)v4 != -1 )
      {
        v4 = (unsigned __int8)v4;
        if ( (unsigned __int8)v4 < 0xC0u )
        {
          v5 = g_kInventory.m_aspInv[v4].m_pObject;
          if ( v5 )
          {
            v6 = (GameFrameWork *)v1->m_pkFrameWork;
            v7 = (int)v5->m_pkInfo->Name;
            v8 = (char *)TextData3::Get(0xB95AF4F3);
            v9 = fs(v8, v7);
            GameFrameWork::AddSysMsg(v6, v9);
          }
        }
      }
      LOBYTE(v10) = v3->m_bGemRedSlot;
      if ( (_BYTE)v10 != -1 )
      {
        v10 = (unsigned __int8)v10;
        if ( (unsigned __int8)v10 < 0xC0u )
        {
          v11 = g_kInventory.m_aspInv[v10].m_pObject;
          if ( v11 )
          {
            v12 = (GameFrameWork *)v1->m_pkFrameWork;
            v13 = (int)v11->m_pkInfo->Name;
            v14 = (char *)TextData3::Get(0xB95AF4F3);
            v15 = fs(v14, v13);
            GameFrameWork::AddSysMsg(v12, v15);
          }
        }
      }
      LOBYTE(v16) = v3->m_bGoldNineSlot;
      if ( (_BYTE)v16 != -1 )
      {
        v16 = (unsigned __int8)v16;
        if ( (unsigned __int8)v16 < 0xC0u )
        {
          v17 = g_kInventory.m_aspInv[v16].m_pObject;
          if ( v17 )
          {
            v18 = (GameFrameWork *)v1->m_pkFrameWork;
            v19 = (int)v17->m_pkInfo->Name;
            v20 = (char *)TextData3::Get(0xB95AF4F3);
            v21 = fs(v20, v19);
            GameFrameWork::AddSysMsg(v18, v21);
          }
        }
      }
      LOBYTE(v22) = v3->m_bGemBlueSlot;
      if ( (_BYTE)v22 != -1 )
      {
        v22 = (unsigned __int8)v22;
        if ( (unsigned __int8)v22 < 0xC0u )
        {
          v23 = g_kInventory.m_aspInv[v22].m_pObject;
          if ( v23 )
          {
            v24 = (GameFrameWork *)v1->m_pkFrameWork;
            v25 = (int)v23->m_pkInfo->Name;
            v26 = (char *)TextData3::Get(0xB95AF4F3);
            v27 = fs(v26, v25);
            GameFrameWork::AddSysMsg(v24, v27);
          }
        }
      }
      PgWin::PostMsg((PgWin *)&v1->vfptr, 1u, 0, 0);
    }
  }
}

//----- (00533FD0) --------------------------------------------------------
char __thiscall ForgeSlotInvWin::EatDropInstance(ForgeSlotInvWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  ForgeSlotInvWin *v4; // ebx@1
  void *v5; // eax@3
  GameFrameWork *v6; // ebx@4
  NiUnsharedGeometryGroup *v7; // eax@4
  Item *v9; // esi@8
  ItemUpgradeWin *v10; // edi@10
  unsigned int v11; // eax@11
  GameFrameWork *v12; // ebx@18
  const char *v13; // eax@18
  char *v14; // eax@28
  int v15; // eax@37
  int v16; // eax@50
  unsigned int v17; // [sp-Ch] [bp-10h]@17
  char *v18; // [sp-Ch] [bp-10h]@28

  v4 = this;
  if ( this->m_bLock )
    goto LABEL_5;
  if ( !*pkDrop )
    return 0;
  v5 = (*pkDrop)->m_pkContents;
  if ( *((_DWORD *)v5 + 2) )
  {
    v6 = (GameFrameWork *)this->m_pkFrameWork;
    v7 = TextData3::Get(0x4779B4D5u);
    GameFrameWork::AddSysMsg(v6, (const char *)v7);
LABEL_5:
    PgCursor::ms_bKeepDrop = 1;
    return 0;
  }
  if ( *((_DWORD *)v5 + 4) )
    goto LABEL_5;
  v9 = (Item *)*((_DWORD *)v5 + 5);
  if ( !v9 )
  {
    PgCursor::ms_bKeepDrop = 1;
    return 0;
  }
  v10 = (ItemUpgradeWin *)PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( !v10 )
    return 0;
  v11 = v4->m_uiInvType;
  if ( !v11 )
  {
    if ( !v9->m_pkInfo->UpLimit
      || (unsigned __int8)((int (__thiscall *)(Item *))v9->vfptr[1].__vecDelDtor)(v9) == 14
      || (unsigned __int8)((int (__thiscall *)(Item *))v9->vfptr[1].__vecDelDtor)(v9) == 19
      || (unsigned __int8)((int (__thiscall *)(_DWORD))v9->vfptr[1].__vecDelDtor)(v9) == 20
      || (unsigned __int8)((int (__thiscall *)(_DWORD))v9->vfptr[1].__vecDelDtor)(v9) == 25 )
    {
      v17 = -1226578909;
LABEL_18:
      v12 = (GameFrameWork *)v4->m_pkFrameWork;
      v13 = (const char *)TextData::Get(v17);
LABEL_19:
      GameFrameWork::AddSysMsg(v12, v13);
LABEL_20:
      PgCursor::ms_bKeepDrop = 1;
      return 0;
    }
    goto LABEL_48;
  }
  if ( v11 != 1 )
  {
    if ( v11 == 2 )
    {
      if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v9->vfptr[1].__vecDelDtor)(v9) != 19 )
      {
        v17 = 153303337;
        goto LABEL_18;
      }
    }
    else if ( v11 == 3 )
    {
      if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v9->vfptr[1].__vecDelDtor)(v9) != 20 )
      {
        v17 = 354889839;
        goto LABEL_18;
      }
    }
    else
    {
      if ( v11 != 4 )
        goto LABEL_20;
      if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v9->vfptr[1].__vecDelDtor)(v9) != 25 )
      {
        v17 = 204092782;
        goto LABEL_18;
      }
    }
    goto LABEL_48;
  }
  if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v9->vfptr[1].__vecDelDtor)(v9) != 14 )
  {
    v17 = 119947882;
    goto LABEL_18;
  }
  if ( (unsigned __int8)ItemUpgradeWin::IsUpgradeSlotItem(v10) )
  {
    if ( ItemUpgradeWin::IsBraceletUpsourceItem(v10, v9) == 1 )
    {
      if ( ItemUpgradeWin::GetUpgradeSlotItemClass(v10) == 38 )
        goto LABEL_48;
      v12 = (GameFrameWork *)v4->m_pkFrameWork;
      v18 = ItemUpgradeWin::GetUpgradeSlotItemName(v10);
      v14 = (char *)TextData3::Get(0xF4333A4C);
LABEL_29:
      v13 = fs(v14, v18);
      goto LABEL_19;
    }
    if ( v9->m_pkInfo->Grade == 6 )
    {
      if ( ItemUpgradeWin::GetUpgradeSlotItemClass(v10) == 38 )
      {
        v12 = (GameFrameWork *)v4->m_pkFrameWork;
        v18 = ItemUpgradeWin::GetBraceletUpsourceName(v10);
        v14 = (char *)TextData3::Get(0x5FFCC4C7u);
        goto LABEL_29;
      }
      if ( ItemUpgradeWin::IsSameGrade(v10, v9) )
        goto LABEL_48;
      v12 = (GameFrameWork *)v4->m_pkFrameWork;
    }
    else
    {
      if ( !v10->m_UpgradeType )
        goto LABEL_48;
      v15 = ItemUpgradeWin::GetUpgradeSlotItemClass(v10);
      v12 = (GameFrameWork *)v4->m_pkFrameWork;
      if ( v15 == 38 )
      {
        v18 = ItemUpgradeWin::GetBraceletUpsourceName(v10);
        v14 = (char *)TextData3::Get(0x5FFCC4C7u);
        goto LABEL_29;
      }
    }
    v13 = (const char *)TextData3::Get(0xED462021);
    goto LABEL_19;
  }
LABEL_48:
  if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v9->vfptr[1].__vecDelDtor)(v9) == 38
    || ItemUpgradeWin::IsBraceletUpsourceItem(v10, v9) == 1 )
  {
    v16 = 2;
  }
  else
  {
    v16 = v9->m_pkInfo->Grade == 6;
  }
  if ( v16 != v10->m_UpgradeType )
    ItemUpgradeWin::ChangeUpgradeWin(v10, v16 == 0, v16);
  return ItemUpgradeWin::DropForgeSlot(v10, v4->m_uiInvIndex, *pkDrop);
}
// B648B8: using guessed type bool PgCursor::ms_bKeepDrop;

//----- (00534270) --------------------------------------------------------
void __thiscall ItemUpgradeWin::UpdateMeWin(ItemUpgradeWin *this, float fCurTime)
{
  ItemUpgradeWin *v2; // esi@1
  int v3; // eax@1
  void (__thiscall ***v4)(_DWORD, _DWORD); // edi@4

  v2 = this;
  ItemUpgradeWin::UpdateSlotRotate(this, fCurTime);
  CNSTimer_MarkCheck::Update(&v2->m_kMarkCheck, Timer::ms_fCurTime);
  if ( v3 == 1 )
  {
    if ( v2->m_pCurObject )
    {
      ((void (__stdcall *)(float *, NiAVObject *))v2->pkForgeSlot[8]->vfptr[30].__vecDelDtor)(
        &fCurTime,
        v2->m_pCurObject);
      if ( fCurTime != 0.0 )
      {
        v4 = (void (__thiscall ***)(_DWORD, _DWORD))LODWORD(fCurTime);
        if ( !InterlockedDecrement((volatile LONG *)(LODWORD(fCurTime) + 4)) )
        {
          if ( v4 )
            (**v4)(v4, 1);
        }
      }
    }
    v2->m_pCurObject = 0;
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (005342F0) --------------------------------------------------------
void __thiscall ItemUpgradeWin::OnApply(ItemUpgradeWin *this)
{
  ItemUpgradeWin *v1; // esi@1
  GameFrameWork *v2; // esi@2
  NiUnsharedGeometryGroup *v3; // eax@2
  ForgeSlotInvWin *v4; // ebx@3
  Item *v5; // edi@3
  ItemIcon **v6; // ebx@4
  ForgeSlotInvWin *v7; // ST30_4@9
  GameFrameWork *v8; // esi@10
  NiUnsharedGeometryGroup *v9; // eax@10
  ForgeSlotInvWin *v10; // ST30_4@12
  ItemInfo *v11; // ebx@14
  unsigned int v12; // eax@14
  int v13; // ebx@17
  Item *v14; // ebx@19
  ForgeSlotInvWin *v15; // ST30_4@21
  NiUnsharedGeometryGroup *v16; // eax@21
  ForgeSlotInvWin *v17; // ST30_4@22
  ForgeSlotInvWin *v18; // ST30_4@23
  ForgeSlotInvWin *v19; // ST30_4@24
  NiUnsharedGeometryGroup *v20; // eax@24
  ForgeSlotInvWin *v21; // ST30_4@26
  GameFrameWork *v22; // ebx@27
  NiUnsharedGeometryGroup *v23; // eax@27
  Item *v24; // ebx@28
  Item *v25; // ST2C_4@30
  NiUnsharedGeometryGroup *v26; // eax@30
  Item *v27; // ST2C_4@31
  Item *v28; // ST2C_4@32
  Item *v29; // ST2C_4@33
  NiUnsharedGeometryGroup *v30; // eax@33
  Item *v31; // ST2C_4@35
  GameFrameWork *v32; // ebx@36
  NiUnsharedGeometryGroup *v33; // eax@36
  GameFrameWork *v34; // ebx@39
  NiUnsharedGeometryGroup *v35; // eax@39
  int v36; // ebx@40
  Item *v37; // ST2C_4@41
  GameFrameWork *v38; // edi@42
  NiUnsharedGeometryGroup *v39; // eax@42
  unsigned int v40; // edi@44
  unsigned int v41; // ebx@48
  unsigned int v42; // edi@49
  bool v43; // zf@51
  PgWin *v44; // esi@53
  GameFrameWork *v45; // edi@55
  NiUnsharedGeometryGroup *v46; // eax@55
  GameFrameWork *v47; // esi@58
  NiUnsharedGeometryGroup *v48; // eax@58
  unsigned int v49; // [sp-Ch] [bp-28h]@13
  Item *pBlueGem; // [sp+4h] [bp-18h]@19
  ForgeSlotInvWin *pRawSlot; // [sp+8h] [bp-14h]@3
  Item *pItemRaw; // [sp+Ch] [bp-10h]@4
  Item *pGoldNine; // [sp+10h] [bp-Ch]@4
  Item *pGoldNinea; // [sp+10h] [bp-Ch]@19
  char rawSlot; // [sp+16h] [bp-6h]@9
  char equipSlot; // [sp+17h] [bp-5h]@4
  char GoldNineSlot; // [sp+18h] [bp-4h]@3
  char gemBlueSlot; // [sp+19h] [bp-3h]@3
  char gemRedSlot; // [sp+1Ah] [bp-2h]@3
  bool bGemResult; // [sp+1Bh] [bp-1h]@19

  v1 = this;
  if ( this->m_bUpGradeStart )
  {
    v2 = (GameFrameWork *)this->m_pkFrameWork;
    v3 = TextData::Get(0xC7E4E718);
    GameFrameWork::AddSysMsg(v2, (const char *)v3);
    return;
  }
  v4 = this->m_apkSlotWin[8];
  gemRedSlot = -1;
  gemBlueSlot = -1;
  GoldNineSlot = -1;
  pRawSlot = 0;
  v5 = ItemIcon::GetItem((ItemIcon *)&v4->vfptr);
  if ( !v5 )
  {
    v49 = 1771407352;
    goto LABEL_58;
  }
  equipSlot = v4->m_uiSenderInvIndex;
  v1->m_UpgradedItemID = v5->m_kStruct.itemid;
  pItemRaw = 0;
  v6 = (ItemIcon **)v1->m_apkSlotWin;
  pGoldNine = (Item *)8;
  do
  {
    if ( ItemIcon::GetItem(*v6) )
    {
      pItemRaw = ItemIcon::GetItem(*v6);
      pRawSlot = (ForgeSlotInvWin *)*v6;
    }
    ++v6;
    pGoldNine = (Item *)((char *)pGoldNine - 1);
  }
  while ( pGoldNine );
  if ( !pItemRaw )
  {
    v49 = -883880437;
    goto LABEL_58;
  }
  rawSlot = pRawSlot->m_uiSenderInvIndex;
  v1->m_UpsourceItemID = pItemRaw->m_kStruct.itemid;
  v1->m_nSuccessTargetSlot = ((unsigned __int8)pRawSlot->m_uiInvIndex - 4) & 7;
  v1->m_nCurRawSlot = pRawSlot->m_uiInvIndex;
  v7 = (ForgeSlotInvWin *)v5->m_pkInfo->UpLimit;
  if ( ((int (__thiscall *)(_DWORD))v5->vfptr[9].__vecDelDtor)(v5) >= (signed int)v7 )
  {
    v8 = (GameFrameWork *)v1->m_pkFrameWork;
    v9 = TextData3::Get(0x4EA8C4C2u);
    GameFrameWork::AddSysMsg(v8, (const char *)v9);
    return;
  }
  if ( v1->m_UpgradeType != 2 )
  {
    v10 = (ForgeSlotInvWin *)pItemRaw->m_pkInfo->UpLimit;
    if ( ((int (__thiscall *)(_DWORD))v5->vfptr[9].__vecDelDtor)(v5) < (signed int)v10 )
    {
      v49 = -872603382;
LABEL_58:
      v47 = (GameFrameWork *)v1->m_pkFrameWork;
      v48 = TextData::Get(v49);
      GameFrameWork::AddSysMsg(v47, (const char *)v48);
      return;
    }
    v11 = pItemRaw->m_pkInfo;
    v12 = v11->Grade;
    if ( v5->m_pkInfo->Grade != v12 && v12 )
    {
      v49 = -1176520779;
      goto LABEL_58;
    }
    v13 = v11->UpResource;
    if ( ((int (__thiscall *)(_DWORD))v5->vfptr[9].__vecDelDtor)(v5) > v13 )
    {
      v49 = -939907822;
      goto LABEL_58;
    }
  }
  v14 = ItemIcon::GetItem((ItemIcon *)&v1->m_apkSlotWin[9]->vfptr);
  pBlueGem = ItemIcon::GetItem((ItemIcon *)&v1->m_apkSlotWin[10]->vfptr);
  pGoldNinea = ItemIcon::GetItem((ItemIcon *)&v1->m_apkSlotWin[11]->vfptr);
  bGemResult = 1;
  if ( v14 )
  {
    gemRedSlot = v1->m_apkSlotWin[9]->m_uiSenderInvIndex;
    if ( v5->m_pkInfo->Grade != v14->m_pkInfo->Grade )
    {
      v15 = (ForgeSlotInvWin *)v1->m_pkFrameWork;
      v16 = TextData::Get(0xBFDF0804);
      GameFrameWork::AddSysMsg((GameFrameWork *)v15, (const char *)v16);
      bGemResult = 0;
    }
    v17 = (ForgeSlotInvWin *)v14->m_pkInfo->UpLimit;
    if ( ((int (__thiscall *)(_DWORD))v5->vfptr[9].__vecDelDtor)(v5) < (signed int)v17
      || (v18 = (ForgeSlotInvWin *)v14->m_pkInfo->UpResource,
          ((int (__thiscall *)(_DWORD))v5->vfptr[9].__vecDelDtor)(v5) > (signed int)v18) )
    {
      v19 = (ForgeSlotInvWin *)v1->m_pkFrameWork;
      v20 = TextData::Get(0x96CCDCC7);
      GameFrameWork::AddSysMsg((GameFrameWork *)v19, (const char *)v20);
      bGemResult = 0;
    }
    if ( (unsigned int)((int (__thiscall *)(_DWORD))v14->vfptr[3].__vecDelDtor)(v14) < 1
      || (v21 = (ForgeSlotInvWin *)((int (__thiscall *)(_DWORD))v14->vfptr[4].__vecDelDtor)(v14),
          ((int (__thiscall *)(_DWORD))v14->vfptr[3].__vecDelDtor)(v14) > (unsigned int)v21) )
    {
      v22 = (GameFrameWork *)v1->m_pkFrameWork;
      v23 = TextData::Get(0xD5BED8EF);
      GameFrameWork::AddSysMsg(v22, (const char *)v23);
      bGemResult = 0;
    }
  }
  v24 = pBlueGem;
  if ( pBlueGem )
  {
    gemBlueSlot = v1->m_apkSlotWin[10]->m_uiSenderInvIndex;
    if ( v5->m_pkInfo->Grade != pBlueGem->m_pkInfo->Grade )
    {
      v25 = (Item *)v1->m_pkFrameWork;
      v26 = TextData::Get(0xA641020E);
      GameFrameWork::AddSysMsg((GameFrameWork *)v25, (const char *)v26);
      bGemResult = 0;
    }
    v27 = (Item *)v24->m_pkInfo->UpLimit;
    if ( ((int (__thiscall *)(_DWORD))v5->vfptr[9].__vecDelDtor)(v5) < (signed int)v27
      || (v28 = (Item *)v24->m_pkInfo->UpResource,
          ((int (__thiscall *)(_DWORD))v5->vfptr[9].__vecDelDtor)(v5) > (signed int)v28) )
    {
      v29 = (Item *)v1->m_pkFrameWork;
      v30 = TextData::Get(0x90D6C329);
      GameFrameWork::AddSysMsg((GameFrameWork *)v29, (const char *)v30);
      bGemResult = 0;
    }
    if ( (unsigned int)((int (__thiscall *)(_DWORD))v24->vfptr[3].__vecDelDtor)(v24) < 1
      || (v31 = (Item *)((int (__thiscall *)(_DWORD))v24->vfptr[4].__vecDelDtor)(v24),
          ((int (__thiscall *)(_DWORD))v24->vfptr[3].__vecDelDtor)(v24) > (unsigned int)v31) )
    {
      v32 = (GameFrameWork *)v1->m_pkFrameWork;
      v33 = TextData::Get(0xE1C2CF35);
      GameFrameWork::AddSysMsg(v32, (const char *)v33);
      bGemResult = 0;
    }
  }
  if ( pGoldNinea )
  {
    GoldNineSlot = v1->m_apkSlotWin[11]->m_uiSenderInvIndex;
    if ( v5->m_pkInfo->Grade != pGoldNinea->m_pkInfo->Grade )
    {
      v34 = (GameFrameWork *)v1->m_pkFrameWork;
      v35 = TextData::Get(0xA5380513);
      GameFrameWork::AddSysMsg(v34, (const char *)v35);
      bGemResult = 0;
    }
    v36 = pGoldNinea->m_pkInfo->UpLimit;
    if ( ((int (__thiscall *)(_DWORD))v5->vfptr[9].__vecDelDtor)(v5) < v36
      || (v37 = (Item *)pGoldNinea->m_pkInfo->UpResource,
          ((int (__thiscall *)(_DWORD))v5->vfptr[9].__vecDelDtor)(v5) > (signed int)v37) )
    {
      v38 = (GameFrameWork *)v1->m_pkFrameWork;
      v39 = TextData::Get(0x93DBC220);
      GameFrameWork::AddSysMsg(v38, (const char *)v39);
      bGemResult = 0;
    }
    if ( (unsigned int)((int (__thiscall *)(_DWORD))pGoldNinea->vfptr[3].__vecDelDtor)(pGoldNinea) < 1
      || (v40 = ((int (__thiscall *)(_DWORD))pGoldNinea->vfptr[4].__vecDelDtor)(pGoldNinea),
          ((int (__thiscall *)(_DWORD))pGoldNinea->vfptr[3].__vecDelDtor)(pGoldNinea) > v40) )
    {
      v49 = -658123724;
      goto LABEL_58;
    }
  }
  if ( !bGemResult )
    return;
  if ( (unsigned int)((int (__thiscall *)(_DWORD))pItemRaw->vfptr[3].__vecDelDtor)(pItemRaw) < 1
    || (v41 = ((int (__thiscall *)(_DWORD))pItemRaw->vfptr[4].__vecDelDtor)(pItemRaw),
        ((int (__thiscall *)(_DWORD))pItemRaw->vfptr[3].__vecDelDtor)(pItemRaw) > v41) )
  {
    v45 = (GameFrameWork *)v1->m_pkFrameWork;
    v46 = TextData::Get(0x946B8C9C);
    GameFrameWork::AddSysMsg(v45, (const char *)v46);
    v49 = 730969977;
    goto LABEL_58;
  }
  v42 = User::ConvertMoney(0i64, 0i64, 0i64, 0i64);
  if ( v42 > (signed __int64)User::GetMoney(&g_kUser) )
  {
    v49 = -1285540828;
    goto LABEL_58;
  }
  v43 = v1->m_bNormalUpgradeWin == 0;
  v1->m_bEquipSlot = equipSlot;
  v1->m_bRawSlot = rawSlot;
  v1->m_bGemRedSlot = gemRedSlot;
  v1->m_bGemBlueSlot = gemBlueSlot;
  v1->m_bGoldNineSlot = GoldNineSlot;
  v1->m_dwMoney = v42;
  if ( v43 )
  {
    ItemUpgradeWin::StartUpgrade(v1);
  }
  else
  {
    v44 = (PgWin *)&v1->m_pkItemUpgradeMsgWin->vfptr;
    if ( v44 )
      PgWinMgr::DoModal(&Pgg_kWinMgr, v44, 0, 0, 0);
  }
}

//----- (005348A0) --------------------------------------------------------
void __thiscall ItemUpgradeWin::OnSlotLClick(ItemUpgradeWin *this, unsigned int _uiSlotIndex)
{
  ItemUpgradeWin *v2; // esi@1
  ForgeSlotInvWin *v3; // edi@3
  Item *v4; // eax@4
  unsigned int v5; // ecx@5
  ItemIcon *v6; // ecx@6

  v2 = this;
  if ( this->m_bUpGradeStart )
  {
    PgCursor::ms_bKeepDrop = 1;
  }
  else
  {
    v3 = this->m_apkSlotWin[_uiSlotIndex];
    if ( v3 )
    {
      v4 = ItemIcon::GetItem((ItemIcon *)&this->m_apkSlotWin[_uiSlotIndex]->vfptr);
      if ( v4 )
      {
        v2->m_kDropContents.m_eSenderType = v3->m_uiSenderType;
        v2->m_kDropContents.m_eType = 0;
        v5 = v3->m_uiSenderInvIndex;
        v2->m_kDropContents.m_apvParam[0] = v4;
        v2->m_kDropContents.m_uiSenderIndex = v5;
        v2->m_kDropContents.m_apvParam[1] = 0;
        v2->m_kDropContents.m_uiLot = ((int (__thiscall *)(_DWORD))v4->vfptr[3].__vecDelDtor)(v4);
        v2->m_kDrop.m_pkSender = v3->m_pkSender;
        PgCursor::ms_pkDrop = &v2->m_kDrop;
        ForgeSlotInvWin::ReSetSlot(v3);
        ItemUpgradeWin::EnableSprSlot(v2, _uiSlotIndex);
        if ( !v2->m_bNormalUpgradeWin )
        {
          v6 = (ItemIcon *)&v2->m_apkSlotWin[8]->vfptr;
          if ( v6 )
          {
            if ( !ItemIcon::GetItem(v6) )
              ItemUpgradeWin::ChangeUpgradeWin(v2, 1, 0);
          }
        }
      }
    }
  }
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;
// B648B8: using guessed type bool PgCursor::ms_bKeepDrop;

//----- (00534970) --------------------------------------------------------
void __thiscall ItemUpgradeWin::OnCommand(ItemUpgradeWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0xBu:
      ItemUpgradeWin::OnSlotLClick(this, lParam);
      break;
    case 0xCu:
      ItemUpgradeWin::OnApply(this);
      break;
    case 0xDu:
      GameFrameWork::CloseItemUpgradeWin((GameFrameWork *)this->m_pkFrameWork, 1);
      break;
    case 0xFu:
      ItemUpgradeWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (005349D0) --------------------------------------------------------
void __thiscall ItemUpgradeWin::OnClose(ItemUpgradeWin *this)
{
  ItemUpgradeWin *v1; // esi@1

  v1 = this;
  ItemUpgradeWin::ResetAllData(this);
  ItemUpgradeWin::ChangeUpgradeWin(v1, 1, 0);
}

//----- (005349F0) --------------------------------------------------------
void __thiscall ItemUpgradeMsgWin::OnCommand(ItemUpgradeMsgWin *this, unsigned int wParam, int lParam)
{
  if ( wParam )
  {
    if ( wParam == 1 )
      ((void (*)(void))this->vfptr[90].__vecDelDtor)();
  }
  else
  {
    ItemUpgradeMsgWin::OnApply(this);
  }
}

//----- (00534A20) --------------------------------------------------------
ForgeSlotInvWin *__cdecl ForgeSlotInvWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork)
{
  PgWin *v5; // eax@1
  PgWin *v6; // eax@2
  PgWin *v7; // esi@2
  PgWin *v8; // edi@8
  ForgeSlotInvWin *v9; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v11; // [sp+20h] [bp-4h]@1

  v5 = (PgWin *)operator new(0x1DCu);
  result.m_pObject = v5;
  v11 = 0;
  if ( v5 )
  {
    ForgeSlotInvWin::ForgeSlotInvWin((ForgeSlotInvWin *)v5);
    v7 = v6;
  }
  else
  {
    v7 = 0;
  }
  if ( v7 )
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  v11 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v7);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, PgWin *, PgFrameWork *))v7->vfptr[154].__vecDelDtor)(
                          v7,
                          iXPos,
                          iYPos,
                          uiInvIndex,
                          pkParent,
                          pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v7->vfptr[89].__vecDelDtor)(v7);
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = (ForgeSlotInvWin *)v7;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v7);
    if ( result.m_pObject )
    {
      v8 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v8 )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      }
    }
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = 0;
  }
  return v9;
}

//----- (00534B60) --------------------------------------------------------
ItemUpgradeMsgWin *__cdecl ItemUpgradeMsgWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  ItemUpgradeMsgWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x16Cu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&ItemUpgradeMsgWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&ItemUpgradeMsgWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][2]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (ItemUpgradeMsgWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 991B70: using guessed type void (__thiscall *ItemUpgradeMsgWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 991B8C: using guessed type int (__thiscall *ItemUpgradeMsgWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00534CC0) --------------------------------------------------------
char __thiscall ItemUpgradeWin::Create(ItemUpgradeWin *this, PgFrameWork *pkFrameWork)
{
  ItemUpgradeWin *v2; // esi@1
  const char *v3; // eax@3
  NiObjectNET *v4; // eax@3
  NiNode *v5; // edi@3
  NiNode *v6; // ebx@3
  const char *v7; // eax@12
  NiObjectNET *v8; // eax@12
  NiNode *v9; // edi@12
  NiNode *v10; // ebx@12
  const char *v11; // eax@21
  NiObjectNET *v12; // eax@21
  NiNode *v13; // edi@21
  NiNode *v14; // ebx@21
  const char *v15; // eax@30
  NiObjectNET *v16; // eax@30
  NiNode *v17; // edi@30
  NiNode *v18; // ebx@30
  const char *v19; // eax@39
  NiObjectNET *v20; // eax@39
  NiNode *v21; // edi@39
  NiNode *v22; // ebx@39
  NiSourceTexture *v23; // edi@46
  NiNode *v24; // esi@47
  LONG v25; // eax@48
  char result; // al@52
  NiTexturePalette *v27; // ebx@53
  const char *v28; // eax@55
  PgSprData *v29; // eax@56
  int v30; // edi@59
  int v31; // ebx@59
  NiSourceTexture *v32; // eax@59
  PgSprData *v33; // eax@60
  PgFont *v34; // eax@64
  PgWinText *v35; // eax@64
  NiRefObjectVtbl *v36; // edx@64
  NiUnsharedGeometryGroup *v37; // eax@64
  PgSprData *v38; // eax@64
  PgSprData *v39; // eax@64
  NiAVObject *v40; // eax@64
  NiTexturingProperty *v41; // eax@64
  NiTexturingProperty::Map *v42; // eax@66
  NiSourceTexture *v43; // eax@67
  PgSprData *v44; // eax@69
  NiSourceTexture *v45; // eax@69
  NiRefObjectVtbl *v46; // edx@69
  PgSprData *v47; // eax@71
  int v48; // eax@71
  NiSourceTexture *v49; // edx@71
  PgFont *v50; // eax@71
  PgWinText *v51; // eax@71
  NiUnsharedGeometryGroup *v52; // eax@71
  int v53; // eax@71
  NiSourceTexture *v54; // edx@71
  PgFont *v55; // eax@71
  PgWinText *v56; // eax@71
  NiRefObjectVtbl *v57; // edx@71
  NiUnsharedGeometryGroup *v58; // eax@71
  PgSprData *v59; // eax@71
  NiPointer<PgSprData::PgHitTester> *v60; // edx@71
  NiSourceTexture *v61; // ecx@71
  NiSourceTexture *v62; // edx@71
  PgFont *v63; // eax@71
  PgWinText *v64; // eax@71
  NiUnsharedGeometryGroup *v65; // eax@71
  int v66; // eax@71
  NiSourceTexture *v67; // edx@71
  PgFont *v68; // eax@71
  PgWinText *v69; // eax@71
  NiUnsharedGeometryGroup *v70; // eax@71
  PgSprData *v71; // eax@71
  PgSprData *v72; // eax@72
  PgWinSpr *v73; // eax@72
  PgFrameWork *v74; // ST44_4@72
  int v75; // edx@72
  NiRefObjectVtbl *v76; // eax@72
  PgWinText *v77; // ecx@72
  char *v78; // eax@73
  char *v79; // eax@74
  char *v80; // eax@75
  char *v81; // eax@76
  IconWin **v82; // ecx@79
  PgSprData *v83; // eax@80
  PgWinSpr *v84; // eax@80
  NiSourceTexture *v85; // ST50_4@80
  NiNode *v86; // ecx@80
  PgWinText *v87; // eax@80
  PgWinSpr *v88; // eax@80
  PgSprData *v89; // ecx@80
  int v90; // edx@80
  PgWinSpr *v91; // eax@80
  PgSprData *v92; // ecx@80
  int v93; // edx@80
  NiTexturingProperty *v94; // esi@80
  NiNode *v95; // esi@82
  unsigned int uiHeight; // [sp+90h] [bp-60h]@62
  unsigned int uiWidth; // [sp+94h] [bp-5Ch]@62
  PgFrameWork *v98; // [sp+98h] [bp-58h]@1
  NiPointer<NiTexturingProperty> spTexProp; // [sp+9Ch] [bp-54h]@64
  NiSourceTexture *pkTexture; // [sp+A0h] [bp-50h]@46
  NiSourceTexture *pkTextureMain; // [sp+A4h] [bp-4Ch]@69
  NiSourceTexture *pkTexture8; // [sp+A8h] [bp-48h]@69
  NiPointer<NiNode> spNode; // [sp+ACh] [bp-44h]@1
  int uiTop; // [sp+B0h] [bp-40h]@56
  int uiLeft; // [sp+B4h] [bp-3Ch]@56
  PgWinText *pkTextWin; // [sp+B8h] [bp-38h]@64
  char acShapeName[33]; // [sp+BCh] [bp-34h]@72
  int v108; // [sp+ECh] [bp-4h]@1

  v2 = this;
  v98 = pkFrameWork;
  spNode.m_pObject = 0;
  v108 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v3 = Folder::Merge(&Folder::m_acEffect, "SUCC_1.nif");
  v4 = Ns_LoadNifFile(v3, 0);
  v5 = v2->m_spEffect_SUCC_1.m_pObject;
  v6 = (NiNode *)v4;
  if ( (NiObjectNET *)v5 != v4 )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v2->m_spEffect_SUCC_1.m_pObject = v6;
    if ( v6 )
      InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  }
  if ( !Folder::m_bInit )
    Folder::Init();
  v7 = Folder::Merge(&Folder::m_acEffect, "SUCC_2.nif");
  v8 = Ns_LoadNifFile(v7, 0);
  v9 = v2->m_spEffect_SUCC_2.m_pObject;
  v10 = (NiNode *)v8;
  if ( (NiObjectNET *)v9 != v8 )
  {
    if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v2->m_spEffect_SUCC_2.m_pObject = v10;
    if ( v10 )
      InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
  }
  if ( !Folder::m_bInit )
    Folder::Init();
  v11 = Folder::Merge(&Folder::m_acEffect, "FAIL_0.nif");
  v12 = Ns_LoadNifFile(v11, 0);
  v13 = v2->m_spEffect_FAIL_0.m_pObject;
  v14 = (NiNode *)v12;
  if ( (NiObjectNET *)v13 != v12 )
  {
    if ( v13 && !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) && v13 )
      v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
    v2->m_spEffect_FAIL_0.m_pObject = v14;
    if ( v14 )
      InterlockedIncrement((volatile LONG *)&v14->m_uiRefCount);
  }
  if ( !Folder::m_bInit )
    Folder::Init();
  v15 = Folder::Merge(&Folder::m_acEffect, "FAIL_1.nif");
  v16 = Ns_LoadNifFile(v15, 0);
  v17 = v2->m_spEffect_FAIL_1.m_pObject;
  v18 = (NiNode *)v16;
  if ( (NiObjectNET *)v17 != v16 )
  {
    if ( v17 && !InterlockedDecrement((volatile LONG *)&v17->m_uiRefCount) && v17 )
      v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
    v2->m_spEffect_FAIL_1.m_pObject = v18;
    if ( v18 )
      InterlockedIncrement((volatile LONG *)&v18->m_uiRefCount);
  }
  if ( !Folder::m_bInit )
    Folder::Init();
  v19 = Folder::Merge(&Folder::m_acEffect, "DESTROY.nif");
  v20 = Ns_LoadNifFile(v19, 0);
  v21 = v2->m_spEffect_DESTROY.m_pObject;
  v22 = (NiNode *)v20;
  if ( (NiObjectNET *)v21 != v20 )
  {
    if ( v21 && !InterlockedDecrement((volatile LONG *)&v21->m_uiRefCount) && v21 )
      v21->vfptr->__vecDelDtor((NiRefObject *)v21, 1u);
    v2->m_spEffect_DESTROY.m_pObject = v22;
    if ( v22 )
      InterlockedIncrement((volatile LONG *)&v22->m_uiRefCount);
  }
  v23 = MenuTexMgr::GetTexture(4u);
  pkTexture = v23;
  if ( !v23 )
  {
    v24 = spNode.m_pObject;
    v108 = -1;
    if ( spNode.m_pObject )
    {
      v25 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
      goto LABEL_49;
    }
    return 0;
  }
  v27 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v28 = Folder::Merge(&Folder::m_acMenu, "Game\\ItemUpgrade.nif");
  PgUtil::LoadNodeNifFile(v28, &spNode, v27);
  if ( !spNode.m_pObject )
    return 0;
  v29 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v23);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v29, 0, v98, "ItemUpgradeWin", 0) )
  {
    v24 = spNode.m_pObject;
    v108 = -1;
    if ( spNode.m_pObject )
    {
      v25 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
LABEL_49:
      if ( !v25 )
      {
        if ( v24 )
          v24->vfptr->__vecDelDtor((NiRefObject *)v24, 1u);
      }
    }
    return 0;
  }
  v30 = uiLeft;
  v31 = uiTop;
  v32 = MenuTexMgr::GetTexture(0x13u);
  if ( v32 )
    v33 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v32);
  else
    v33 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v30, uiTop - v31, v33, (PgWin *)&v2->vfptr, 0, 0);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v34 = Font::Get(0);
    v35 = PgWinText::CreateWin(uiLeft - v30, uiTop - v31, uiWidth, uiHeight, v34, (PgWin *)&v2->vfptr, 0, 0);
    v36 = v35->vfptr;
    pkTextWin = v35;
    v36[122].__vecDelDtor((NiRefObject *)v35, 1u);
    ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
    spTexProp.m_pObject = (NiTexturingProperty *)&pkTextWin->vfptr[118];
    v37 = TextData::Get(0x33598174u);
    ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))spTexProp.m_pObject->vfptr)(pkTextWin, v37);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v38 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
    PgWinSpr::CreateWin(uiLeft - v30, uiTop - v31, v38, (PgWin *)&v2->vfptr, 0, 0);
    v39 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, pkTexture);
    PgWinSpr::CreateWin(uiLeft - v30, uiTop - v31, v39, (PgWin *)&v2->vfptr, 0, 0);
    v40 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Panel03");
    v41 = (NiTexturingProperty *)NiAVObject::GetProperty(v40, 8);
    spTexProp.m_pObject = v41;
    if ( v41 )
    {
      InterlockedIncrement((volatile LONG *)&v41->m_uiRefCount);
      v41 = spTexProp.m_pObject;
    }
    v42 = *v41->m_kMaps.m_pBase;
    LOBYTE(v108) = 1;
    if ( v42 )
      v43 = (NiSourceTexture *)v42->m_spTexture.m_pObject;
    else
      v43 = 0;
    v44 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel03", &uiLeft, &uiTop, v43);
    PgWinSpr::CreateWin(uiLeft - v30, uiTop - v31, v44, (PgWin *)&v2->vfptr, 0, 0);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "ClsNor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
    PgWinBut::CreateWin(uiLeft - v30, uiTop - v31, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xDu, 0, 0);
    pkTexture8 = MenuTexMgr::GetTexture(0x18u);
    v45 = MenuTexMgr::GetTexture(4u);
    v46 = spNode.m_pObject->vfptr;
    pkTextureMain = v45;
    if ( ((int (__stdcall *)(const char *))v46[18].__vecDelDtor)("HelpLinkNor") )
    {
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "HelpLinkNor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTextureMain);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
      PgWinBut::CreateWin(uiLeft - v30, uiTop - v31, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xFu, 0, 0);
    }
    v47 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Object01", &uiLeft, &uiTop, pkTexture8);
    PgWinSpr::CreateWin(uiLeft - v30, uiTop - v31, v47, (PgWin *)&v2->vfptr, 0, 0);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "OkNor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "OkClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "OkOver");
    PgWinBut::CreateWin(uiLeft - v30, uiTop - v31, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xCu, 0, 0);
    v48 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
    v49 = *(NiSourceTexture **)(v48 + 20);
    pkTexture8 = *(NiSourceTexture **)(v48 + 24);
    pkTextureMain = v49;
    v50 = Font::Get(0);
    v51 = PgWinText::CreateWin(
            uiLeft - v30,
            uiTop - v31 + 1,
            (unsigned int)pkTextureMain,
            (unsigned int)pkTexture8,
            v50,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v2->m_pkStartTextWin = v51;
    v51->vfptr[122].__vecDelDtor((NiRefObject *)v51, 5u);
    pkTexture8 = (NiSourceTexture *)&v2->m_pkStartTextWin->vfptr[118];
    v52 = TextData::Get(0x9D06FADC);
    ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkTexture8->vfptr)(v2->m_pkStartTextWin, v52);
    ((void (__stdcall *)(_DWORD))v2->m_pkStartTextWin->vfptr[60].__vecDelDtor)(0);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "CancelNor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "CancelClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "CancelOver");
    PgWinBut::CreateWin(uiLeft - v30, uiTop - v31, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xDu, 0, 0);
    v53 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
    v54 = *(NiSourceTexture **)(v53 + 20);
    pkTexture8 = *(NiSourceTexture **)(v53 + 24);
    pkTextureMain = v54;
    v55 = Font::Get(0);
    v56 = PgWinText::CreateWin(
            uiLeft - v30,
            uiTop - v31 + 1,
            (unsigned int)pkTextureMain,
            (unsigned int)pkTexture8,
            v55,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v57 = v56->vfptr;
    pkTextWin = v56;
    v57[122].__vecDelDtor((NiRefObject *)v56, 5u);
    pkTexture8 = (NiSourceTexture *)&pkTextWin->vfptr[118];
    v58 = TextData::Get(0x97A4A8DF);
    ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkTexture8->vfptr)(pkTextWin, v58);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v59 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ForgeText", &uiLeft, &uiTop, pkTexture);
    v60 = v59->m_akHitTester.m_pBase;
    pkTextWin = (PgWinText *)v59;
    v61 = (NiSourceTexture *)v60->m_pObject->m_uiHeight;
    v62 = (NiSourceTexture *)v60->m_pObject->m_uiWidth;
    pkTexture8 = v61;
    pkTextureMain = v62;
    v63 = Font::Get(MENU);
    v64 = PgWinText::CreateWin(
            uiLeft - v30,
            uiTop - v31 + 1,
            (unsigned int)pkTextureMain,
            (unsigned int)pkTexture8,
            v63,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v2->m_pkForgeFirstText = v64;
    v64->vfptr[122].__vecDelDtor((NiRefObject *)v64, 5u);
    pkTexture8 = (NiSourceTexture *)&v2->m_pkForgeFirstText->vfptr[118];
    v65 = TextData::Get(0x333F8F7Eu);
    ((void (__thiscall *)(_DWORD, _DWORD))pkTexture8->vfptr)(v2->m_pkForgeFirstText, v65);
    ((void (__stdcall *)(_DWORD))v2->m_pkForgeFirstText->vfptr[60].__vecDelDtor)(0);
    v66 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
    v67 = *(NiSourceTexture **)(v66 + 20);
    pkTexture8 = *(NiSourceTexture **)(v66 + 24);
    pkTextureMain = v67;
    v68 = Font::Get(MENU);
    v69 = PgWinText::CreateWin(
            uiLeft - v30,
            uiTop - v31 + 20,
            (unsigned int)pkTextureMain,
            (unsigned int)pkTexture8,
            v68,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v2->m_pkForgeSecondText = v69;
    v69->vfptr[122].__vecDelDtor((NiRefObject *)v69, 5u);
    pkTexture8 = (NiSourceTexture *)&v2->m_pkForgeSecondText->vfptr[118];
    v70 = TextData::Get(0xDFD9E4D8);
    ((void (__thiscall *)(_DWORD, _DWORD))pkTexture8->vfptr)(v2->m_pkForgeSecondText, v70);
    ((void (__stdcall *)(_DWORD))v2->m_pkForgeSecondText->vfptr[60].__vecDelDtor)(0);
    v71 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, pkTexture);
    PgWinSpr::CreateWin(uiLeft - v30, uiTop - v31, v71, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkItemUpgradeMsgWin = ItemUpgradeMsgWin::CreateWin(v98);
    pkTextureMain = (NiSourceTexture *)-8;
    pkTextWin = (PgWinText *)v2->m_apkSlotWin;
    do
    {
      sprintf(acShapeName, "ForgeSlot%02d", (char *)&pkTextureMain->m_pcName + 1);
      v72 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, pkTexture);
      v73 = PgWinSpr::CreateWin(uiLeft - v30, uiTop - v31, v72, (PgWin *)&v2->vfptr, 0, 0);
      v74 = v98;
      v75 = uiLeft;
      LODWORD(pkTextWin[-1].m_kBound.m_kCenter.x) = v73;
      v76 = (NiRefObjectVtbl *)ForgeSlotInvWin::CreateWin(
                                 v75 - v30 + 1,
                                 uiTop - v31 + 1,
                                 (unsigned int)&pkTextureMain->m_pcName,
                                 (PgWin *)&v2->vfptr,
                                 v74);
      pkTextWin->vfptr = v76;
      (*((void (__thiscall **)(_DWORD, _DWORD))v76->__vecDelDtor + 60))(v76, 1);
      (*((void (__stdcall **)(_DWORD))pkTextWin->vfptr->__vecDelDtor + 64))(1);
      (*(void (__stdcall **)(signed int))(*(_DWORD *)LODWORD(pkTextWin[-1].m_kBound.m_kCenter.x) + 240))(1);
      (*(void (__stdcall **)(signed int))(*(_DWORD *)LODWORD(pkTextWin[-1].m_kBound.m_kCenter.x) + 256))(1);
      v77 = pkTextWin;
      *(_DWORD *)(LODWORD(pkTextWin[-1].m_kBound.m_kCenter.x) + 272) = g_pkToolTipWin;
      (*(void (__stdcall **)(signed int))(*(_DWORD *)LODWORD(v77[-1].m_kBound.m_kCenter.x) + 240))(1);
      switch ( pkTextureMain )
      {
        case 0u:
          pkTextWin->vfptr[117].__vecDelDtor = 0;
          v78 = (char *)TextData::Get(0x92B9FCD4);
          PgWin::SetToolTipWinText((PgWin *)LODWORD(pkTextWin[-1].m_kBound.m_kCenter.x), v78);
          break;
        case 1u:
          pkTextWin->vfptr[117].__vecDelDtor = (void *(__thiscall *)(NiRefObject *, unsigned int))2;
          v79 = (char *)TextData2::Get(0xCF1BF12u);
          goto LABEL_78;
        case 2u:
          pkTextWin->vfptr[117].__vecDelDtor = (void *(__thiscall *)(NiRefObject *, unsigned int))3;
          v80 = (char *)TextData2::Get(0xF0361326);
          PgWin::SetToolTipWinText((PgWin *)LODWORD(pkTextWin[-1].m_kBound.m_kCenter.x), v80);
          break;
        case 3u:
          pkTextWin->vfptr[117].__vecDelDtor = (void *(__thiscall *)(NiRefObject *, unsigned int))4;
          v81 = (char *)TextData2::Get(0xF6351520);
          PgWin::SetToolTipWinText((PgWin *)LODWORD(pkTextWin[-1].m_kBound.m_kCenter.x), v81);
          break;
        default:
          pkTextWin->vfptr[117].__vecDelDtor = (void *(__thiscall *)(NiRefObject *, unsigned int))1;
          v79 = (char *)TextData::Get(0xD5174325);
LABEL_78:
          PgWin::SetToolTipWinText((PgWin *)LODWORD(pkTextWin[-1].m_kBound.m_kCenter.x), v79);
          break;
      }
      (*((void (__stdcall **)(_DWORD))pkTextWin->vfptr->__vecDelDtor + 129))(11);
      (*((void (__stdcall **)(_DWORD))pkTextWin->vfptr->__vecDelDtor + 140))(10);
      v82 = (IconWin **)pkTextWin;
      pkTextWin->vfptr[76].__vecDelDtor = (void *(__thiscall *)(NiRefObject *, unsigned int))1;
      IconWin::ShowFocus(*v82, 1);
      pkTextWin = (PgWinText *)((char *)pkTextWin + 4);
      pkTextureMain = (NiSourceTexture *)((char *)pkTextureMain + 1);
    }
    while ( (signed int)&pkTextureMain->m_pcName < 12 );
    v83 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlotOn", &uiLeft, &uiTop, pkTexture);
    v84 = PgWinSpr::CreateWin(uiLeft - v30, uiTop - v31, v83, (PgWin *)&v2->vfptr, 0, 0);
    v85 = pkTexture;
    v86 = spNode.m_pObject;
    v2->m_pkSlotOn = v84;
    v87 = (PgWinText *)PgSprData::Create((NiAVObject *)&v86->vfptr, "SlotBomb", &uiLeft, &uiTop, v85);
    pkTextWin = v87;
    v88 = PgWinSpr::CreateWin(uiLeft - v30 + 45, uiTop - v31, (PgSprData *)v87, (PgWin *)&v2->vfptr, 0, 0);
    v89 = (PgSprData *)pkTextWin;
    v90 = uiTop;
    v2->m_pkSprBomb[0] = v88;
    v91 = PgWinSpr::CreateWin(uiLeft - v30 + 85, v90 - v31, v89, (PgWin *)&v2->vfptr, 0, 0);
    v92 = (PgSprData *)pkTextWin;
    v93 = uiTop;
    v2->m_pkSprBomb[1] = v91;
    v2->m_pkSprBomb[2] = PgWinSpr::CreateWin(uiLeft - v30 + 125, v93 - v31, v92, (PgWin *)&v2->vfptr, 0, 0);
    PgWin::InitPos((PgWin *)&v2->vfptr, PgWin::ms_uiScreenWidth, PgWin::ms_uiScreenHeight, 0.30000001, 0.5);
    v94 = spTexProp.m_pObject;
    LOBYTE(v108) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
      v94->vfptr->__vecDelDtor((NiRefObject *)v94, 1u);
    v95 = spNode.m_pObject;
    v108 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v95 )
      v95->vfptr->__vecDelDtor((NiRefObject *)v95, 1u);
    result = 1;
  }
  else
  {
    v108 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005359A0) --------------------------------------------------------
void __thiscall ItemUpgradeWin::ItemUpgradeWin(ItemUpgradeWin *this)
{
  ItemUpgradeWin *v1; // esi@1
  NiNode *v2; // edi@1
  NiNode *v3; // edi@6
  NiNode *v4; // edi@11
  NiNode *v5; // edi@16
  NiNode *v6; // edi@21
  int v7; // ecx@26
  int v8; // eax@26
  int *v9; // eax@27
  const char *v10; // eax@27
  const char *v11; // edx@27
  char v12; // cl@28
  __int16 v13; // ax@29
  int v14; // ecx@29
  int v15; // [sp-1Ch] [bp-48h]@26
  char *v16; // [sp-Ch] [bp-38h]@26
  signed int v17; // [sp-8h] [bp-34h]@26
  unsigned int v18; // [sp-4h] [bp-30h]@26
  ItemUpgradeWin *v19; // [sp+10h] [bp-1Ch]@1
  int *v20; // [sp+14h] [bp-18h]@26
  const char *v21; // [sp+18h] [bp-14h]@27
  _WORD *v22; // [sp+1Ch] [bp-10h]@26
  int v23; // [sp+28h] [bp-4h]@1

  v1 = this;
  v19 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ItemUpgradeWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ItemUpgradeWin::`vftable'{for `IDirectMessenger'};
  v23 = 0;
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  v1->m_kDrop.m_pkContents = 0;
  v1->m_kDrop.m_pkSender = 0;
  v1->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v1->m_kDropContents.m_kItemID = -1;
  v1->m_kDropContents.m_uiLot = 0;
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kTimerInterval);
  CNSTimer_MarkCheck::CNSTimer_MarkCheck(&v1->m_kMarkCheck);
  LOBYTE(v23) = 3;
  NsEffect::NsEffect(&v1->m_kEffect);
  v1->m_spEffect_SUCC_1.m_pObject = 0;
  v1->m_spEffect_SUCC_2.m_pObject = 0;
  v1->m_spEffect_FAIL_0.m_pObject = 0;
  v1->m_spEffect_FAIL_1.m_pObject = 0;
  v1->m_spEffect_DESTROY.m_pObject = 0;
  v1->m_fRotateStartTime = 0.0;
  *(_WORD *)&v1->m_bUpGradeStart = 0;
  v1->m_dwUpResult = 0;
  v1->m_fSpeed = 10.0;
  v1->m_nSuccessTargetSlot = -1;
  v1->m_nBombCount = 0;
  v1->m_nCurRawSlot = 0;
  v1->m_fAcceleration = 0.0;
  v2 = v1->m_spEffect_SUCC_1.m_pObject;
  LOBYTE(v23) = 9;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spEffect_SUCC_1.m_pObject = 0;
  }
  v3 = v1->m_spEffect_SUCC_2.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spEffect_SUCC_2.m_pObject = 0;
  }
  v4 = v1->m_spEffect_FAIL_0.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spEffect_FAIL_0.m_pObject = 0;
  }
  v5 = v1->m_spEffect_FAIL_1.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spEffect_FAIL_1.m_pObject = 0;
  }
  v6 = v1->m_spEffect_DESTROY.m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v1->m_spEffect_DESTROY.m_pObject = 0;
  }
  v18 = 48;
  v1->m_bGoldNineSlot = -1;
  v17 = 0;
  v16 = (char *)v1->m_apkSlotWin;
  v1->m_pCurObject = 0;
  *(_DWORD *)&v1->m_bEquipSlot = -1;
  v1->m_dwMoney = 0;
  v1->m_eUpgradeState = 0;
  v1->m_kDrop.m_pkContents = &v1->m_kDropContents;
  memset(v16, v17, v18);
  memset((char *)v1->pkForgeSlot, 0, 0x30u);
  v15 = v7;
  v20 = &v15;
  v1->m_pkItemUpgradeMsgWin = 0;
  v1->m_bNormalUpgradeWin = 1;
  v1->m_pkForgeFirstText = 0;
  v1->m_pkForgeSecondText = 0;
  v17 = 15;
  v16 = 0;
  LOBYTE(v15) = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v15,
    "Grade6",
    6u);
  v1->m_GradeItemID = CSingleDataMap::GetValue(
                        &g_kSingleDataMap,
                        *(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v15);
  v8 = 0;
  v22 = v1->m_BraceletGradeItemID;
  do
  {
    v9 = (int *)(v8 + 1);
    v18 = (unsigned int)v9;
    v20 = v9;
    v10 = fs("BR_UPSORCE0%d");
    v11 = v10;
    v17 = 15;
    v16 = 0;
    LOBYTE(v15) = 0;
    v21 = v10 + 1;
    do
      v12 = *v11++;
    while ( v12 );
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v15,
      v10,
      v11 - v21);
    v13 = CSingleDataMap::GetValue(
            &g_kSingleDataMap,
            *(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v15);
    v14 = (int)v22;
    *v22 = v13;
    v8 = (int)v20;
    v22 = (_WORD *)(v14 + 2);
  }
  while ( (signed int)v20 < 4 );
  v1->m_UpgradeType = 0;
  *(_DWORD *)&v1->m_UpgradedItemID = -1;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 991DB0: using guessed type void (__thiscall *ItemUpgradeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 991DCC: using guessed type int (__thiscall *ItemUpgradeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00535CB0) --------------------------------------------------------
ItemUpgradeWin *__cdecl ItemUpgradeWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  ItemUpgradeWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x300u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    ItemUpgradeWin::ItemUpgradeWin((ItemUpgradeWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (ItemUpgradeWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00535DE0) --------------------------------------------------------
ForgeSlotInvWin *__thiscall ForgeSlotInvWin::`scalar deleting destructor'(ForgeSlotInvWin *this, unsigned int a2)
{
  ForgeSlotInvWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ForgeSlotInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ForgeSlotInvWin::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9918DC: using guessed type void (__thiscall *ForgeSlotInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9918FC: using guessed type int (__thiscall *ForgeSlotInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00535E20) --------------------------------------------------------
ItemUpgradeMsgWin *__thiscall ItemUpgradeMsgWin::`vector deleting destructor'(ItemUpgradeMsgWin *this, unsigned int a2)
{
  ItemUpgradeMsgWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ItemUpgradeMsgWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ItemUpgradeMsgWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 991B70: using guessed type void (__thiscall *ItemUpgradeMsgWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 991B8C: using guessed type int (__thiscall *ItemUpgradeMsgWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00535E60) --------------------------------------------------------
ItemUpgradeWin *__thiscall ItemUpgradeWin::`vector deleting destructor'(ItemUpgradeWin *this, unsigned int a2)
{
  ItemUpgradeWin *v2; // esi@1

  v2 = this;
  ItemUpgradeWin::~ItemUpgradeWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00535E90) --------------------------------------------------------
void __thiscall KeyRemappingBut::KeyRemappingBut(KeyRemappingBut *this)
{
  KeyRemappingBut *v1; // esi@1

  v1 = this;
  PgWinBut::PgWinBut((PgWinBut *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&KeyRemappingBut::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&KeyRemappingBut::`vftable'{for `IDirectMessenger'};
  v1->m_uiInvIndex = -1;
}
// 992D90: using guessed type void (__thiscall *KeyRemappingBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 992DAC: using guessed type int (__thiscall *KeyRemappingBut::`vftable'{for `NiNode'})(void *p, char);

//----- (00535EC0) --------------------------------------------------------
void __thiscall KeyRemappingBut::~KeyRemappingBut(KeyRemappingBut *this)
{
  this->vfptr = (NiRefObjectVtbl *)&KeyRemappingBut::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&KeyRemappingBut::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
}
// 992D90: using guessed type void (__thiscall *KeyRemappingBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 992DAC: using guessed type int (__thiscall *KeyRemappingBut::`vftable'{for `NiNode'})(void *p, char);

//----- (00535EE0) --------------------------------------------------------
void __thiscall KeyRemappingWin::OnReset(KeyRemappingWin *this)
{
  GameFrameWork::SendDefaultKeyRemappingReq((GameFrameWork *)this->m_pkFrameWork);
}

//----- (00535F00) --------------------------------------------------------
signed int __stdcall KeyRemappingWin::ConvertKeyCode(char keyValue)
{
  signed int result; // eax@7
  char buf[9]; // [sp+0h] [bp-10h]@1

  GetKeyboardLayoutNameA(buf);
  switch ( keyValue )
  {
    case 0x41:
      if ( !strcmp(buf, "0000040C")
        || !strcmp(buf, "00000484")
        || !strcmp(buf, "0000047E")
        || !strcmp(buf, "00000483")
        || !strcmp(buf, "00000482") )
      {
        goto LABEL_8;
      }
      goto LABEL_7;
    case 0x42:
      return 48;
    case 0x43:
      return 46;
    case 0x44:
      return 32;
    case 0x45:
      return 18;
    case 0x46:
      return 33;
    case 0x47:
      return 34;
    case 0x48:
      return 35;
    case 0x49:
      return 23;
    case 0x4A:
      return 36;
    case 0x4B:
      return 37;
    case 0x4C:
      return 38;
    case 0x4D:
      return 50;
    case 0x4E:
      return 49;
    case 0x4F:
      return 24;
    case 0x50:
      return 25;
    case 0x51:
      if ( !strcmp(buf, "0000040C")
        || !strcmp(buf, "00000484")
        || !strcmp(buf, "0000047E")
        || !strcmp(buf, "00000483")
        || !strcmp(buf, "00000482") )
      {
LABEL_7:
        result = 30;
      }
      else
      {
LABEL_8:
        result = 16;
      }
      return result;
    case 0x52:
      return 19;
    case 0x53:
      return 31;
    case 0x54:
      return 20;
    case 0x55:
      return 22;
    case 0x56:
      return 47;
    case 0x57:
      if ( strcmp(buf, "0000040C")
        && strcmp(buf, "00000484")
        && strcmp(buf, "0000047E")
        && strcmp(buf, "00000483")
        && strcmp(buf, "00000482") )
      {
        goto LABEL_40;
      }
      goto LABEL_41;
    case 0x58:
      result = 45;
      break;
    case 0x59:
      if ( !strcmp(buf, "00000407") )
        result = 44;
      else
        result = 21;
      break;
    case 0x5A:
      if ( !strcmp(buf, "00000407") )
      {
        result = 21;
      }
      else if ( !strcmp(buf, "0000040C")
             || !strcmp(buf, "00000484")
             || !strcmp(buf, "0000047E")
             || !strcmp(buf, "00000483")
             || !strcmp(buf, "00000482") )
      {
LABEL_40:
        result = 17;
      }
      else
      {
LABEL_41:
        result = 44;
      }
      break;
    case 0x1B:
      result = 1;
      break;
    case 0xD:
      result = 28;
      break;
    case 0x31:
      result = 2;
      break;
    case 0x32:
      result = 3;
      break;
    case 0x33:
      result = 4;
      break;
    case 0x34:
      result = 5;
      break;
    case 0x35:
      result = 6;
      break;
    case 0x36:
      result = 7;
      break;
    case 0x37:
      result = 8;
      break;
    case 0x38:
      result = 9;
      break;
    case 0x39:
      result = 10;
      break;
    case 0x30:
      result = 11;
      break;
    case 0xBD:
      result = 12;
      break;
    case 0xBB:
      result = 13;
      break;
    case 0xDB:
      result = 26;
      break;
    case 0xDD:
      result = 27;
      break;
    case 0xBA:
      result = 39;
      break;
    case 0xDE:
      result = 40;
      break;
    case 0xDC:
      result = 43;
      break;
    case 0xBC:
      result = 51;
      break;
    case 0xBE:
      result = 52;
      break;
    case 0x6F:
      result = 53;
      break;
    case 0x6A:
      result = 55;
      break;
    case 0x20:
      result = 57;
      break;
    case 0x70:
      result = 59;
      break;
    case 0x71:
      result = 60;
      break;
    case 0x72:
      result = 61;
      break;
    case 0x73:
      result = 62;
      break;
    case 0x74:
      result = 63;
      break;
    case 0x75:
      result = 64;
      break;
    case 0x76:
      result = 65;
      break;
    case 0x77:
      result = 66;
      break;
    case 0x78:
      result = 67;
      break;
    case 0x79:
      result = 68;
      break;
    case 0x6D:
      result = 74;
      break;
    case 0x6B:
      result = 78;
      break;
    case 0x60:
      result = 82;
      break;
    case 0x61:
      result = 79;
      break;
    case 0x62:
      result = 80;
      break;
    case 0x63:
      result = 81;
      break;
    case 0x64:
      result = 75;
      break;
    case 0x65:
      result = 76;
      break;
    case 0x66:
      result = 77;
      break;
    case 0x67:
      result = 71;
      break;
    case 0x68:
      result = 72;
      break;
    case 0x69:
      result = 73;
      break;
    case 0x6E:
      result = 83;
      break;
    case 0x7A:
      result = 85;
      break;
    case 0x7B:
      result = 86;
      break;
    case 0xBF:
      result = 116;
      break;
    case 0xC0:
      result = 41;
      break;
    case 0x10:
      result = 42;
      break;
    case 0x11:
      result = 29;
      break;
    case 0x12:
      result = 56;
      break;
    case 0x14:
      result = 58;
      break;
    case 0x90:
      result = 69;
      break;
    case 0x91:
      result = 70;
      break;
    case 0x21:
      result = 122;
      break;
    case 0x22:
      result = 127;
      break;
    case 0x23:
      result = 125;
      break;
    case 0x24:
      result = 120;
      break;
    case 0x25:
      result = 123;
      break;
    case 0x26:
      result = 121;
      break;
    case 0x27:
      result = 124;
      break;
    case 0x28:
      result = 126;
      break;
    case 0x2D:
      result = 128;
      break;
    case 0x2E:
      result = 129;
      break;
    case 0x5B:
      result = 130;
      break;
    case 0xF5:
      result = 15;
      break;
    case 8:
      result = 14;
      break;
    case 0x13:
      result = 119;
      break;
    default:
      result = 0;
      break;
  }
  return result;
}

//----- (00536E80) --------------------------------------------------------
signed int __stdcall KeyRemappingWin::ConvertKeyCodeModifier(char keyModifier)
{
  signed int result; // eax@4

  switch ( keyModifier )
  {
    case 16:
      result = 64;
      break;
    case 17:
      result = 1;
      break;
    case 18:
      result = 4;
      break;
    default:
      result = 0;
      break;
  }
  return result;
}

//----- (00536EC0) --------------------------------------------------------
int __thiscall KeyRemappingWin::GetKeyIndexByName(KeyRemappingWin *this, char *pcBtnName)
{
  int result; // eax@2
  signed int v3; // edi@3
  const char *v4; // esi@3

  if ( pcBtnName )
  {
    v3 = 0;
    v4 = (const char *)this->m_keyMapping;
    while ( strncmp(v4, pcBtnName, strlen(pcBtnName)) )
    {
      ++v3;
      v4 += 258;
      if ( v3 >= 95 )
        return -1;
    }
    result = v3;
  }
  else
  {
    result = -1;
  }
  return result;
}

//----- (00536F20) --------------------------------------------------------
void KeyRemappingWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "KeyRemappingWin");
}

//----- (00536F50) --------------------------------------------------------
char __stdcall KeyRemappingWin::SaveDefalultKeyRemapping(bool bDefault)
{
  _iobuf *v2; // eax@3
  _iobuf *v3; // esi@3
  char result; // al@4
  char acFileName[256]; // [sp+0h] [bp-104h]@3

  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acFileName, "%s%s", &Folder::m_acSystem, "KeyMapping.mco");
  v2 = fopen(acFileName, "wb");
  v3 = v2;
  if ( v2 )
  {
    fwrite(&MachineOpt::m_keyMappingBuff, 0xF4u, 1u, v2);
    fclose(v3);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A76A68: using guessed type struct MachineOpt::StKeyMappingBuffer MachineOpt::m_keyMappingBuff;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00536FF0) --------------------------------------------------------
char __thiscall KeyRemappingWin::UpdateDynamicStrings(KeyRemappingWin *this, float fTime)
{
  struct NiInputKeyboard *v2; // edi@1
  KeyRemappingWin *v3; // esi@1
  char result; // al@2
  char v5; // bl@3
  int v6; // eax@72
  int v7; // ecx@72
  void *(__thiscall *v8)(NiRefObject *, unsigned int); // eax@152
  void *(__thiscall *v9)(NiRefObject *, unsigned int); // eax@154
  void *(__thiscall *v10)(NiRefObject *, unsigned int); // eax@156
  void *(__thiscall *v11)(NiRefObject *, unsigned int); // eax@158
  void *(__thiscall *v12)(NiRefObject *, unsigned int); // eax@160
  void *(__thiscall *v13)(NiRefObject *, unsigned int); // eax@162
  void *(__thiscall *v14)(NiRefObject *, unsigned int); // eax@164
  struct NiInputMouse *v15; // eax@261
  const char *v16; // [sp-8h] [bp-20h]@53
  const char *v17; // [sp-8h] [bp-20h]@62
  const char *v18; // [sp-8h] [bp-20h]@93
  const char *v19; // [sp-8h] [bp-20h]@120
  char buf[9]; // [sp+8h] [bp-10h]@3

  v2 = g_pkKeyboard;
  v3 = this;
  if ( g_pkKeyboard )
  {
    v5 = 0;
    GetKeyboardLayoutNameA(buf);
    if ( v3->m_bModeif )
      v3->m_bModeif = 0;
    if ( v2->m_aucKeystate[5] & 4 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].modifier = 16;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"LSHIFT ");
      v3->m_bModeif = 1;
    }
    if ( v2->m_aucKeystate[6] & 0x40 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].modifier = 16;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"RSHIFT ");
      v3->m_bModeif = 1;
    }
    if ( v2->m_aucKeystate[3] & 0x20 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].modifier = 17;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"LCTRL ");
      v3->m_bModeif = 1;
    }
    if ( v2->m_aucKeystate[13] & 8 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].modifier = 17;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"RCTRL ");
      v3->m_bModeif = 1;
    }
    if ( v2->m_aucKeystate[7] & 1 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].modifier = 18;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"LMENU ");
      v3->m_bModeif = 1;
    }
    if ( v2->m_aucKeystate[14] & 0x40 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].modifier = 18;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"RMENU ");
      v3->m_bModeif = 1;
    }
    if ( v2->m_aucKeystate[0] & 2 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 27;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"ESC ");
    }
    if ( v2->m_aucKeystate[3] & 0x10 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 13;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"ENTER ");
    }
    if ( v2->m_aucKeystate[13] & 4 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 13;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"ENTER ");
    }
    if ( v2->m_aucKeystate[0] & 4 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 49;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"1 ");
    }
    if ( v2->m_aucKeystate[0] & 8 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 50;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"2 ");
    }
    if ( v2->m_aucKeystate[0] & 0x10 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 51;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"3 ");
    }
    if ( v2->m_aucKeystate[0] & 0x20 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 52;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"4 ");
    }
    if ( v2->m_aucKeystate[0] & 0x40 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 53;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"5 ");
    }
    if ( v2->m_aucKeystate[0] & 0x80 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 54;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"6 ");
    }
    if ( v2->m_aucKeystate[1] & 1 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 55;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"7 ");
    }
    if ( v2->m_aucKeystate[1] & 2 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 56;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"8 ");
    }
    if ( v2->m_aucKeystate[1] & 4 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 57;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"9 ");
    }
    if ( v2->m_aucKeystate[1] & 8 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 48;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"0 ");
    }
    if ( v2->m_aucKeystate[1] & 0x10 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = -67;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"- ");
    }
    if ( v2->m_aucKeystate[1] & 0x20 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = -69;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"= ");
    }
    if ( v2->m_aucKeystate[2] & 1 )
    {
      if ( !strcmp(buf, "0000040C")
        || !strcmp(buf, "00000484")
        || !strcmp(buf, "0000047E")
        || !strcmp(buf, "00000483")
        || !strcmp(buf, "00000482") )
      {
        v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 65;
        v16 = "A ";
      }
      else
      {
        v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 81;
        v16 = "Q ";
      }
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)v16);
    }
    if ( v2->m_aucKeystate[2] & 2 )
    {
      if ( !strcmp(buf, "0000040C")
        || !strcmp(buf, "00000484")
        || !strcmp(buf, "0000047E")
        || !strcmp(buf, "00000483")
        || !strcmp(buf, "00000482") )
      {
        v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 90;
        v17 = "Z ";
      }
      else
      {
        v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 87;
        v17 = "W ";
      }
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)v17);
    }
    if ( v2->m_aucKeystate[2] & 4 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 69;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"E ");
    }
    if ( v2->m_aucKeystate[2] & 8 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 82;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"R ");
    }
    if ( v2->m_aucKeystate[2] & 0x10 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 84;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"T ");
    }
    if ( v2->m_aucKeystate[2] & 0x20 )
    {
      v6 = strcmp(buf, "00000407");
      v7 = v3->m_uiTargetKeyIndex;
      v5 = 1;
      if ( v6 )
      {
        v3->m_keyMapping[v7].keyValue = 89;
        v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"Y ");
      }
      else
      {
        v3->m_keyMapping[v7].keyValue = 90;
        v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"Z ");
      }
    }
    if ( v2->m_aucKeystate[2] & 0x40 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 85;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"U ");
    }
    if ( v2->m_aucKeystate[2] & 0x80 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 73;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"I ");
    }
    if ( v2->m_aucKeystate[3] & 1 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 79;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"O ");
    }
    if ( v2->m_aucKeystate[3] & 2 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 80;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"P ");
    }
    if ( v2->m_aucKeystate[3] & 4 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = -37;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"[ ");
    }
    if ( v2->m_aucKeystate[3] & 8 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = -35;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"] ");
    }
    if ( v2->m_aucKeystate[3] & 0x40 )
    {
      if ( !strcmp(buf, "0000040C")
        || !strcmp(buf, "00000484")
        || !strcmp(buf, "0000047E")
        || !strcmp(buf, "00000483")
        || !strcmp(buf, "00000482") )
      {
        v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 81;
        v18 = "Q ";
      }
      else
      {
        v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 65;
        v18 = "A ";
      }
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)v18);
    }
    if ( v2->m_aucKeystate[3] & 0x80 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 83;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"S ");
    }
    if ( v2->m_aucKeystate[4] & 1 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 68;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"D ");
    }
    if ( v2->m_aucKeystate[4] & 2 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 70;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"F ");
    }
    if ( v2->m_aucKeystate[4] & 4 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 71;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"G ");
    }
    if ( v2->m_aucKeystate[4] & 8 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 72;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"H ");
    }
    if ( v2->m_aucKeystate[4] & 0x10 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 74;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"J ");
    }
    if ( v2->m_aucKeystate[4] & 0x20 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 75;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"K ");
    }
    if ( v2->m_aucKeystate[4] & 0x40 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 76;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"L ");
    }
    if ( v2->m_aucKeystate[4] & 0x80 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = -70;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"; ");
    }
    if ( v2->m_aucKeystate[5] & 1 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = -34;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"' ");
    }
    if ( v2->m_aucKeystate[5] & 8 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = -36;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"\\ ");
    }
    if ( v2->m_aucKeystate[5] & 0x10 )
    {
      if ( !strcmp(buf, "00000407") )
      {
        v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 89;
        v19 = "Y ";
      }
      else if ( !strcmp(buf, "0000040C")
             || !strcmp(buf, "00000484")
             || !strcmp(buf, "0000047E")
             || !strcmp(buf, "00000483")
             || !strcmp(buf, "00000482") )
      {
        v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 87;
        v19 = "W ";
      }
      else
      {
        v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 90;
        v19 = "Z ";
      }
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)v19);
    }
    if ( v2->m_aucKeystate[5] & 0x20 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 88;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"X ");
    }
    if ( v2->m_aucKeystate[5] & 0x40 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 67;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"C ");
    }
    if ( v2->m_aucKeystate[5] & 0x80 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 86;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"V ");
    }
    if ( v2->m_aucKeystate[6] & 1 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 66;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"B ");
    }
    if ( v2->m_aucKeystate[6] & 2 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 78;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"N ");
    }
    if ( v2->m_aucKeystate[6] & 4 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 77;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"M ");
    }
    if ( v2->m_aucKeystate[6] & 8 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = -68;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)", ");
    }
    if ( v2->m_aucKeystate[6] & 0x10 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = -66;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)". ");
    }
    if ( v2->m_aucKeystate[6] & 0x20 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 111;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"/ ");
    }
    if ( v2->m_aucKeystate[6] & 0x80 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 106;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"* ");
    }
    if ( v2->m_aucKeystate[7] & 2 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 32;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"  ");
    }
    if ( v2->m_aucKeystate[7] & 8 )
    {
      v8 = v3->vfptr[135].__vecDelDtor;
      v3->m_bImpossibleKey = 1;
      v5 = 0;
      v8((NiRefObject *)&v3->vfptr, (unsigned int)"F1 ");
    }
    if ( v2->m_aucKeystate[7] & 0x10 )
    {
      v9 = v3->vfptr[135].__vecDelDtor;
      v3->m_bImpossibleKey = 1;
      v5 = 0;
      v9((NiRefObject *)&v3->vfptr, (unsigned int)"F2 ");
    }
    if ( v2->m_aucKeystate[7] & 0x20 )
    {
      v10 = v3->vfptr[135].__vecDelDtor;
      v3->m_bImpossibleKey = 1;
      v5 = 0;
      v10((NiRefObject *)&v3->vfptr, (unsigned int)"F3 ");
    }
    if ( v2->m_aucKeystate[7] & 0x40 )
    {
      v11 = v3->vfptr[135].__vecDelDtor;
      v3->m_bImpossibleKey = 1;
      v5 = 0;
      v11((NiRefObject *)&v3->vfptr, (unsigned int)"F4 ");
    }
    if ( v2->m_aucKeystate[7] & 0x80 )
    {
      v12 = v3->vfptr[135].__vecDelDtor;
      v3->m_bImpossibleKey = 1;
      v5 = 0;
      v12((NiRefObject *)&v3->vfptr, (unsigned int)"F5 ");
    }
    if ( v2->m_aucKeystate[8] & 1 )
    {
      v13 = v3->vfptr[135].__vecDelDtor;
      v3->m_bImpossibleKey = 1;
      v5 = 0;
      v13((NiRefObject *)&v3->vfptr, (unsigned int)"F6 ");
    }
    if ( v2->m_aucKeystate[8] & 2 )
    {
      v14 = v3->vfptr[135].__vecDelDtor;
      v3->m_bImpossibleKey = 1;
      v5 = 0;
      v14((NiRefObject *)&v3->vfptr, (unsigned int)"F7 ");
    }
    if ( v2->m_aucKeystate[8] & 4 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 119;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"F8 ");
    }
    if ( v2->m_aucKeystate[8] & 8 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 120;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"F9 ");
    }
    if ( v2->m_aucKeystate[8] & 0x10 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 121;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"F10 ");
    }
    if ( v2->m_aucKeystate[9] & 4 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 109;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"NP- ");
    }
    if ( v2->m_aucKeystate[9] & 0x40 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 107;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"NP+ ");
    }
    if ( v2->m_aucKeystate[10] & 4 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 96;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"NP0 ");
    }
    if ( v2->m_aucKeystate[9] & 0x80 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 97;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"NP1 ");
    }
    if ( v2->m_aucKeystate[10] & 1 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 98;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"NP2 ");
    }
    if ( v2->m_aucKeystate[10] & 2 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 99;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"NP3 ");
    }
    if ( v2->m_aucKeystate[9] & 8 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 100;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"NP4 ");
    }
    if ( v2->m_aucKeystate[9] & 0x10 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 101;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"NP5 ");
    }
    if ( v2->m_aucKeystate[9] & 0x20 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 102;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"NP6 ");
    }
    if ( v2->m_aucKeystate[8] & 0x80 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 103;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"NP7 ");
    }
    if ( v2->m_aucKeystate[9] & 1 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 104;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"NP8 ");
    }
    if ( v2->m_aucKeystate[9] & 2 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 105;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"NP9 ");
    }
    if ( v2->m_aucKeystate[10] & 8 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 110;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"NP. ");
    }
    if ( v2->m_aucKeystate[10] & 0x20 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 122;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"F11 ");
    }
    if ( v2->m_aucKeystate[10] & 0x40 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 123;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"F12 ");
    }
    if ( v2->m_aucKeystate[14] & 0x10 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = -65;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"NP/ ");
    }
    if ( v2->m_aucKeystate[5] & 2 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = -64;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"` ");
    }
    if ( v2->m_aucKeystate[7] & 4 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 20;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"CAP ");
    }
    if ( v2->m_aucKeystate[8] & 0x20 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = -112;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"NUML ");
    }
    if ( v2->m_aucKeystate[8] & 0x40 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = -111;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"SCROLL ");
    }
    if ( v2->m_aucKeystate[15] & 1 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 36;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"HOME ");
    }
    if ( v2->m_aucKeystate[15] & 2 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 38;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"UP ");
    }
    if ( v2->m_aucKeystate[15] & 8 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 37;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"LEFT ");
    }
    if ( v2->m_aucKeystate[15] & 0x10 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 39;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"RIGHT ");
    }
    if ( v2->m_aucKeystate[15] & 0x20 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 35;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"END ");
    }
    if ( v2->m_aucKeystate[15] & 0x40 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 40;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"DOWN ");
    }
    if ( v2->m_aucKeystate[15] & 0x80 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 34;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"PGDN");
    }
    if ( v2->m_aucKeystate[15] & 4 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 33;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"PGUP ");
    }
    if ( v2->m_aucKeystate[16] & 1 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 45;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"INS ");
    }
    if ( v2->m_aucKeystate[16] & 2 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 46;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"DEL ");
    }
    if ( v2->m_aucKeystate[16] & 4 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 91;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"LWIN ");
    }
    if ( v2->m_aucKeystate[16] & 8 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 91;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"RWIN ");
    }
    if ( v2->m_aucKeystate[16] & 0x10 )
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"APPS ");
    if ( v2->m_aucKeystate[1] & 0x80 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = -11;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"TAB ");
    }
    if ( v2->m_aucKeystate[1] & 0x40 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 8;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"\\ ");
    }
    if ( v2->m_aucKeystate[14] & 0x80 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 19;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"Pause Break ");
    }
    if ( !(v2->m_aucKeystate[5] & 4) && v2->m_aucKeystateLastUpdate[5] & 4 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 16;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"Shift");
    }
    if ( !(v2->m_aucKeystate[6] & 0x40) && v2->m_aucKeystateLastUpdate[6] & 0x40 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 16;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"Shift ");
    }
    if ( !(v2->m_aucKeystate[3] & 0x20) && v2->m_aucKeystateLastUpdate[3] & 0x20 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 17;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"Ctrl");
    }
    if ( !(v2->m_aucKeystate[13] & 8) && v2->m_aucKeystateLastUpdate[13] & 8 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 17;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"Ctrl ");
    }
    if ( !(v2->m_aucKeystate[7] & 1) && v2->m_aucKeystateLastUpdate[7] & 1 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 18;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)&off_992788);
    }
    if ( !(v2->m_aucKeystate[14] & 0x40) && v2->m_aucKeystateLastUpdate[14] & 0x40 )
    {
      v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = 18;
      v5 = 1;
      v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)&off_99278C);
    }
    v15 = g_pkMouse;
    if ( g_pkMouse->m_akButtons[0].m_bPressed || g_pkMouse->m_akButtons[1].m_bPressed )
    {
      result = 0;
    }
    else
    {
      if ( g_pkMouse->m_akButtons[2].m_bPressed )
      {
        v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = -6;
        v5 = 1;
        v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)&off_992798);
        v15 = g_pkMouse;
      }
      if ( v15->m_akButtons[3].m_bPressed )
      {
        v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = -5;
        v5 = 1;
        v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"MMOD_X1");
        v15 = g_pkMouse;
      }
      if ( v15->m_akButtons[4].m_bPressed )
      {
        v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = -4;
        v5 = 1;
        v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"MMOD_X2");
        v15 = g_pkMouse;
      }
      if ( v15->m_akButtons[5].m_bPressed )
      {
        v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = -3;
        v5 = 1;
        v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"MMOD_X3");
        v15 = g_pkMouse;
      }
      if ( v15->m_akButtons[6].m_bPressed )
      {
        v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = -2;
        v5 = 1;
        v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"MMMOD_X4");
        v15 = g_pkMouse;
      }
      if ( v15->m_akButtons[7].m_bPressed )
      {
        v3->m_keyMapping[v3->m_uiTargetKeyIndex].keyValue = -1;
        v5 = 1;
        v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)"MMOD_X5");
      }
      result = v5;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// 992788: using guessed type void *off_992788;
// 99278C: using guessed type void *off_99278C;
// 992798: using guessed type void *off_992798;
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;
// A8C4A8: using guessed type struct NiInputMouse *g_pkMouse;

//----- (005389D0) --------------------------------------------------------
char __thiscall KeyRemappingBut::Create(KeyRemappingBut *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, char *pcName, unsigned int uiExtStyle, unsigned int uiInvIndex)
{
  KeyRemappingBut *v9; // esi@1
  char result; // al@1
  void *(__thiscall *v11)(NiRefObject *, unsigned int); // edx@2

  v9 = this;
  result = PgWinSpr::Create((PgWinSpr *)&this->vfptr, iXPos, iYPos, pkSprData, pkParent, pcName, uiExtStyle);
  if ( result )
  {
    v9->vfptr[138].__vecDelDtor((NiRefObject *)v9, 0);
    v11 = v9->vfptr[129].__vecDelDtor;
    v9->m_uiButNum = pkSprData->m_akGeomData.m_uiSize;
    v11((NiRefObject *)&v9->vfptr, uiCmdMsg);
    v9->m_uiInvIndex = uiInvIndex;
    result = 1;
  }
  return result;
}

//----- (00538A40) --------------------------------------------------------
void __thiscall KeyRemappingBut::DoAction(KeyRemappingBut *this)
{
  KeyRemappingBut *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiInvIndex);
}

//----- (00538A70) --------------------------------------------------------
bool __thiscall KeyRemappingWin::KeyMappingInfo(KeyRemappingWin *this, unsigned int uiKeyMappingIndex, unsigned int *uiMsg, char *keyName)
{
  KeyRemappingWin *v4; // edi@1
  NiUnsharedGeometryGroup *v5; // eax@1
  PgFrameWork *v6; // eax@1
  MainMenuWin *v7; // ecx@1
  PgMsg::Frame *v8; // edi@1
  PgMsg::Frame *v9; // edx@1
  int v10; // eax@1
  bool result; // al@2
  bool bDataReadOK; // [sp+13h] [bp-105h]@1
  char ToolTipText[256]; // [sp+14h] [bp-104h]@1

  v4 = this;
  bDataReadOK = 1;
  ToolTipText[0] = 0;
  memset(&ToolTipText[1], 0, 0xFFu);
  v5 = TextData::Get(0x9FBEF2E2);
  sprintf(ToolTipText, (const char *)v5, &v4->m_keyMapping[uiKeyMappingIndex], keyName);
  v6 = v4->m_pkFrameWork;
  v7 = (MainMenuWin *)v6[16].vfptr;
  v8 = v6[15].m_kMsgQ.m_pBase;
  v9 = v6[20].m_kMsgQ.m_pBase;
  v10 = *(_DWORD *)&v6[15].m_bInit;
  if ( v7 )
  {
    switch ( uiKeyMappingIndex )
    {
      case 0u:
        *uiMsg = 17;
        MainMenuWin::SetMainButToolTip(v7, 9u, ToolTipText);
        dword_B4F5BC = 1;
        break;
      case 1u:
        *uiMsg = 29;
        MainMenuWin::SetMainButToolTip(v7, 0, ToolTipText);
        dword_B4F5C4 = 1;
        break;
      case 2u:
        *uiMsg = 106;
        MainMenuWin::SetMainButToolTip(v7, 0xAu, ToolTipText);
        dword_B4F5CC = 1;
        break;
      case 8u:
        *uiMsg = 109;
        MainMenuWin::SetMainButToolTip(v7, 2u, ToolTipText);
        dword_B4F5FC = 1;
        break;
      case 3u:
        *uiMsg = 107;
        MainMenuWin::SetMainButToolTip(v7, 6u, ToolTipText);
        dword_B4F5D4 = 1;
        break;
      case 4u:
        *uiMsg = 108;
        MainMenuWin::SetMainButToolTip(v7, 5u, ToolTipText);
        dword_B4F5DC = 1;
        break;
      case 5u:
        *uiMsg = 16;
        MainMenuWin::SetMainButToolTip(v7, 4u, ToolTipText);
        dword_B4F5E4 = 1;
        break;
      case 7u:
        *uiMsg = 162;
        MainMenuWin::SetMainButToolTip(v7, 1u, ToolTipText);
        dword_B4F5F4 = 1;
        break;
      case 0xFu:
        *uiMsg = 20;
        MainMenuWin::SetMainButToolTip(v7, 7u, ToolTipText);
        dword_B4F634 = 1;
        break;
      case 0xEu:
        *uiMsg = 191;
        dword_B4F62C = 1;
        break;
      case 0x29u:
        *uiMsg = 181;
        if ( v10 )
          PgWin::SetToolTipWinText(*(PgWin **)(v10 + 368), ToolTipText);
        dword_B4F704 = 2;
        break;
      case 0x2Au:
        *uiMsg = 182;
        if ( v10 )
          PgWin::SetToolTipWinText(*(PgWin **)(*(_DWORD *)(v10 + 532) + 592), ToolTipText);
        dword_B4F70C = 2;
        break;
      case 0x28u:
        *uiMsg = 111;
        dword_B4F6FC = 2;
        break;
      case 0x15u:
        *uiMsg = 254;
        if ( v10 )
          PgWin::SetToolTipWinText(*(PgWin **)(v10 + 380), ToolTipText);
        dword_B4F664 = 1;
        break;
      case 6u:
        *uiMsg = 110;
        MainMenuWin::SetMainButToolTip(v7, 3u, ToolTipText);
        dword_B4F5EC = 1;
        break;
      case 0x10u:
        *uiMsg = 245;
        dword_B4F63C = 1;
        break;
      case 0x14u:
        *uiMsg = 247;
        dword_B4F65C = 1;
        break;
      case 0x11u:
        *uiMsg = 246;
        dword_B4F644 = 1;
        break;
      case 0x13u:
        *uiMsg = 249;
        dword_B4F654 = 1;
        break;
      case 0x12u:
        *uiMsg = 248;
        dword_B4F64C = 1;
        break;
      case 9u:
        *uiMsg = 11;
        dword_B4F604 = 1;
        break;
      case 0xAu:
        *uiMsg = 187;
        dword_B4F60C = 1;
        break;
      case 0xBu:
        *uiMsg = 188;
        dword_B4F614 = 1;
        break;
      case 0x16u:
        *uiMsg = 250;
        dword_B4F66C = 1;
        break;
      case 0xCu:
        *uiMsg = 189;
        dword_B4F61C = 1;
        break;
      case 0xDu:
        *uiMsg = 190;
        dword_B4F624 = 1;
        break;
      case 0x2Du:
        *uiMsg = 252;
        dword_B4F724 = 2;
        break;
      case 0x17u:
        *uiMsg = 98;
        dword_B4F674 = 2;
        break;
      case 0x18u:
        *uiMsg = 99;
        dword_B4F67C = 2;
        break;
      case 0x1Au:
        *uiMsg = 100;
        dword_B4F68C = 2;
        break;
      case 0x1Bu:
        *uiMsg = 101;
        dword_B4F694 = 2;
        break;
      case 0x1Du:
        *uiMsg = 102;
        dword_B4F6A4 = 2;
        break;
      case 0x1Cu:
        *uiMsg = 103;
        dword_B4F69C = 2;
        break;
      case 0x24u:
        *uiMsg = 104;
        if ( v8 )
          PgWin::SetToolTipWinText((PgWin *)v8[17].m_uiDumy[1], ToolTipText);
        dword_B4F6DC = 2;
        if ( v8 )
          StatusWin::SetStoneAlarmShortcutText((StatusWin *)v8, keyName);
        break;
      case 0x25u:
        *uiMsg = 105;
        if ( v8 )
          PgWin::SetToolTipWinText((PgWin *)v8[17].m_uiFrameMsg, ToolTipText);
        dword_B4F6E4 = 2;
        break;
      case 0x22u:
        *uiMsg = 173;
        if ( v9 )
          PgWin::SetToolTipWinText((PgWin *)v9[17].m_uiFrameMsg, ToolTipText);
        dword_B4F6CC = 2;
        break;
      case 0x23u:
        *uiMsg = 112;
        dword_B4F6D4 = 2;
        break;
      case 0x26u:
        *uiMsg = 44;
        dword_B4F6EC = 2;
        break;
      case 0x27u:
        *uiMsg = 172;
        if ( v9 )
          PgWin::SetToolTipWinText((PgWin *)v9[17].m_uiDumy[1], ToolTipText);
        dword_B4F6F4 = 2;
        break;
      case 0x2Bu:
        *uiMsg = 183;
        dword_B4F714 = 2;
        break;
      case 0x2Cu:
        dword_B4F71C = 1;
        break;
      case 0x2Eu:
        *uiMsg = 214;
        if ( v9 )
          PgWin::SetToolTipWinText((PgWin *)v9[17].m_uiFrameWParam, ToolTipText);
        dword_B4F72C = 0;
        break;
      case 0x2Fu:
        *uiMsg = 45;
        dword_B4F734 = 3;
        break;
      case 0x30u:
        *uiMsg = 46;
        dword_B4F73C = 3;
        break;
      case 0x31u:
        *uiMsg = 47;
        dword_B4F744 = 3;
        break;
      case 0x32u:
        *uiMsg = 48;
        dword_B4F74C = 3;
        break;
      case 0x33u:
        *uiMsg = 49;
        dword_B4F754 = 3;
        break;
      case 0x34u:
        *uiMsg = 50;
        dword_B4F75C = 3;
        break;
      case 0x35u:
        *uiMsg = 51;
        dword_B4F764 = 3;
        break;
      case 0x36u:
        *uiMsg = 52;
        dword_B4F76C = 3;
        break;
      case 0x37u:
        *uiMsg = 53;
        dword_B4F774 = 3;
        break;
      case 0x38u:
        *uiMsg = 54;
        dword_B4F77C = 3;
        break;
      case 0x39u:
        *uiMsg = 55;
        dword_B4F784 = 3;
        break;
      case 0x3Au:
        *uiMsg = 56;
        dword_B4F78C = 3;
        break;
      case 0x3Bu:
        *uiMsg = 57;
        dword_B4F794 = 3;
        break;
      case 0x3Cu:
        *uiMsg = 58;
        dword_B4F79C = 3;
        break;
      case 0x3Du:
        *uiMsg = 59;
        dword_B4F7A4 = 3;
        break;
      case 0x3Eu:
        *uiMsg = 60;
        dword_B4F7AC = 3;
        break;
      case 0x3Fu:
        *uiMsg = 61;
        dword_B4F7B4 = 3;
        break;
      case 0x40u:
        *uiMsg = 62;
        dword_B4F7BC = 3;
        break;
      case 0x41u:
        *uiMsg = 63;
        dword_B4F7C4 = 3;
        break;
      case 0x42u:
        *uiMsg = 64;
        dword_B4F7CC = 3;
        break;
      case 0x43u:
        *uiMsg = 65;
        dword_B4F7D4 = 3;
        break;
      case 0x44u:
        *uiMsg = 66;
        dword_B4F7DC = 3;
        break;
      case 0x45u:
        *uiMsg = 67;
        dword_B4F7E4 = 3;
        break;
      case 0x46u:
        *uiMsg = 68;
        dword_B4F7EC = 3;
        break;
      case 0x47u:
        *uiMsg = 69;
        dword_B4F7F4 = 3;
        break;
      case 0x48u:
        *uiMsg = 70;
        dword_B4F7FC = 3;
        break;
      case 0x49u:
        *uiMsg = 71;
        dword_B4F804 = 3;
        break;
      case 0x4Au:
        *uiMsg = 72;
        dword_B4F80C = 3;
        break;
      case 0x4Bu:
        *uiMsg = 73;
        dword_B4F814 = 3;
        break;
      case 0x4Cu:
        *uiMsg = 74;
        dword_B4F81C = 3;
        break;
      case 0x4Du:
        *uiMsg = 75;
        dword_B4F824 = 3;
        break;
      case 0x4Eu:
        *uiMsg = 76;
        dword_B4F82C = 3;
        break;
      case 0x4Fu:
        *uiMsg = 77;
        dword_B4F834 = 3;
        break;
      case 0x50u:
        *uiMsg = 78;
        dword_B4F83C = 3;
        break;
      case 0x51u:
        *uiMsg = 79;
        dword_B4F844 = 3;
        break;
      case 0x52u:
        *uiMsg = 80;
        dword_B4F84C = 3;
        break;
      case 0x53u:
        *uiMsg = 81;
        dword_B4F854 = 3;
        break;
      case 0x54u:
        *uiMsg = 82;
        dword_B4F85C = 3;
        break;
      case 0x55u:
        *uiMsg = 83;
        dword_B4F864 = 3;
        break;
      case 0x56u:
        *uiMsg = 84;
        dword_B4F86C = 3;
        break;
      case 0x57u:
        *uiMsg = 85;
        dword_B4F874 = 3;
        break;
      case 0x58u:
        *uiMsg = 86;
        dword_B4F87C = 3;
        break;
      case 0x59u:
        *uiMsg = 87;
        dword_B4F884 = 3;
        break;
      case 0x5Au:
        *uiMsg = 88;
        dword_B4F88C = 3;
        break;
      case 0x5Bu:
        *uiMsg = 89;
        dword_B4F894 = 3;
        break;
      case 0x5Cu:
        *uiMsg = 90;
        dword_B4F89C = 3;
        break;
      case 0x5Du:
        *uiMsg = 91;
        dword_B4F8A4 = 3;
        break;
      case 0x5Eu:
        *uiMsg = 92;
        dword_B4F8AC = 3;
        break;
      default:
        bDataReadOK = 0;
        break;
    }
    result = bDataReadOK;
  }
  else
  {
    result = 0;
  }
  return result;
}
// B4F5BC: using guessed type int dword_B4F5BC;
// B4F5C4: using guessed type int dword_B4F5C4;
// B4F5CC: using guessed type int dword_B4F5CC;
// B4F5D4: using guessed type int dword_B4F5D4;
// B4F5DC: using guessed type int dword_B4F5DC;
// B4F5E4: using guessed type int dword_B4F5E4;
// B4F5EC: using guessed type int dword_B4F5EC;
// B4F5F4: using guessed type int dword_B4F5F4;
// B4F5FC: using guessed type int dword_B4F5FC;
// B4F604: using guessed type int dword_B4F604;
// B4F60C: using guessed type int dword_B4F60C;
// B4F614: using guessed type int dword_B4F614;
// B4F61C: using guessed type int dword_B4F61C;
// B4F624: using guessed type int dword_B4F624;
// B4F62C: using guessed type int dword_B4F62C;
// B4F634: using guessed type int dword_B4F634;
// B4F63C: using guessed type int dword_B4F63C;
// B4F644: using guessed type int dword_B4F644;
// B4F64C: using guessed type int dword_B4F64C;
// B4F654: using guessed type int dword_B4F654;
// B4F65C: using guessed type int dword_B4F65C;
// B4F664: using guessed type int dword_B4F664;
// B4F66C: using guessed type int dword_B4F66C;
// B4F674: using guessed type int dword_B4F674;
// B4F67C: using guessed type int dword_B4F67C;
// B4F68C: using guessed type int dword_B4F68C;
// B4F694: using guessed type int dword_B4F694;
// B4F69C: using guessed type int dword_B4F69C;
// B4F6A4: using guessed type int dword_B4F6A4;
// B4F6CC: using guessed type int dword_B4F6CC;
// B4F6D4: using guessed type int dword_B4F6D4;
// B4F6DC: using guessed type int dword_B4F6DC;
// B4F6E4: using guessed type int dword_B4F6E4;
// B4F6EC: using guessed type int dword_B4F6EC;
// B4F6F4: using guessed type int dword_B4F6F4;
// B4F6FC: using guessed type int dword_B4F6FC;
// B4F704: using guessed type int dword_B4F704;
// B4F70C: using guessed type int dword_B4F70C;
// B4F714: using guessed type int dword_B4F714;
// B4F71C: using guessed type int dword_B4F71C;
// B4F724: using guessed type int dword_B4F724;
// B4F72C: using guessed type int dword_B4F72C;
// B4F734: using guessed type int dword_B4F734;
// B4F73C: using guessed type int dword_B4F73C;
// B4F744: using guessed type int dword_B4F744;
// B4F74C: using guessed type int dword_B4F74C;
// B4F754: using guessed type int dword_B4F754;
// B4F75C: using guessed type int dword_B4F75C;
// B4F764: using guessed type int dword_B4F764;
// B4F76C: using guessed type int dword_B4F76C;
// B4F774: using guessed type int dword_B4F774;
// B4F77C: using guessed type int dword_B4F77C;
// B4F784: using guessed type int dword_B4F784;
// B4F78C: using guessed type int dword_B4F78C;
// B4F794: using guessed type int dword_B4F794;
// B4F79C: using guessed type int dword_B4F79C;
// B4F7A4: using guessed type int dword_B4F7A4;
// B4F7AC: using guessed type int dword_B4F7AC;
// B4F7B4: using guessed type int dword_B4F7B4;
// B4F7BC: using guessed type int dword_B4F7BC;
// B4F7C4: using guessed type int dword_B4F7C4;
// B4F7CC: using guessed type int dword_B4F7CC;
// B4F7D4: using guessed type int dword_B4F7D4;
// B4F7DC: using guessed type int dword_B4F7DC;
// B4F7E4: using guessed type int dword_B4F7E4;
// B4F7EC: using guessed type int dword_B4F7EC;
// B4F7F4: using guessed type int dword_B4F7F4;
// B4F7FC: using guessed type int dword_B4F7FC;
// B4F804: using guessed type int dword_B4F804;
// B4F80C: using guessed type int dword_B4F80C;
// B4F814: using guessed type int dword_B4F814;
// B4F81C: using guessed type int dword_B4F81C;
// B4F824: using guessed type int dword_B4F824;
// B4F82C: using guessed type int dword_B4F82C;
// B4F834: using guessed type int dword_B4F834;
// B4F83C: using guessed type int dword_B4F83C;
// B4F844: using guessed type int dword_B4F844;
// B4F84C: using guessed type int dword_B4F84C;
// B4F854: using guessed type int dword_B4F854;
// B4F85C: using guessed type int dword_B4F85C;
// B4F864: using guessed type int dword_B4F864;
// B4F86C: using guessed type int dword_B4F86C;
// B4F874: using guessed type int dword_B4F874;
// B4F87C: using guessed type int dword_B4F87C;
// B4F884: using guessed type int dword_B4F884;
// B4F88C: using guessed type int dword_B4F88C;
// B4F894: using guessed type int dword_B4F894;
// B4F89C: using guessed type int dword_B4F89C;
// B4F8A4: using guessed type int dword_B4F8A4;
// B4F8AC: using guessed type int dword_B4F8AC;

//----- (00539580) --------------------------------------------------------
char *__stdcall KeyRemappingWin::GetKeyString(char uiKeyValue, char uiModifier)
{
  NiUnsharedGeometryGroup *v3; // eax@2
  signed int v4; // eax@87
  int v5; // eax@91
  int v6; // eax@92
  const char *v8; // [sp-8h] [bp-110h]@5
  char *v9; // [sp-4h] [bp-10Ch]@5
  char temp[2]; // [sp+0h] [bp-108h]@82
  char keyName[256]; // [sp+4h] [bp-104h]@1

  keyName[0] = 0;
  memset(&keyName[1], 0, 0xFFu);
  switch ( uiKeyValue )
  {
    case 0:
      v3 = TextData::Get(0x3343908Bu);
      sprintf(keyName, "%s", v3);
      break;
    case 0x1B:
      sprintf(keyName, (const char *)&unk_9928D8, &off_9928D4);
      break;
    case 0xD:
      sprintf(keyName, "%s", "Enter");
      break;
    case 0x31:
      v9 = "1";
      v8 = "%s";
      goto LABEL_83;
    case 0x32:
      sprintf(keyName, "%s", "2");
      break;
    case 0x33:
      sprintf(keyName, "%s", "3");
      break;
    case 0x34:
      v9 = "4";
      v8 = "%s";
      goto LABEL_83;
    case 0x35:
      sprintf(keyName, "%s", "5");
      break;
    case 0x36:
      sprintf(keyName, "%s", "6");
      break;
    case 0x37:
      v9 = "7";
      v8 = "%s";
      goto LABEL_83;
    case 0x38:
      sprintf(keyName, "%s", "8");
      break;
    case 0x39:
      sprintf(keyName, "%s", "9");
      break;
    case 0x30:
      v9 = "0";
      v8 = "%s";
      goto LABEL_83;
    case 0xBD:
      sprintf(keyName, "%s", "-");
      break;
    case 0xBB:
      sprintf(keyName, "%s", "=");
      break;
    case 0xDB:
      v9 = "[";
      v8 = "%s";
      goto LABEL_83;
    case 0xDD:
      sprintf(keyName, "%s", "]");
      break;
    case 0xBA:
      sprintf(keyName, "%s", ";");
      break;
    case 0xDE:
      v9 = "'";
      v8 = "%s";
      goto LABEL_83;
    case 0xDC:
      sprintf(keyName, "%s", "\\");
      break;
    case 0xBC:
      sprintf(keyName, "%s", ",");
      break;
    case 0xBE:
      v9 = ".";
      v8 = "%s";
      goto LABEL_83;
    case 0x6F:
      sprintf(keyName, "%s", "/");
      break;
    case 0x20:
      sprintf(keyName, "%s", "Space");
      break;
    case 0x70:
      v9 = "F1";
      v8 = "%s";
      goto LABEL_83;
    case 0x71:
      sprintf(keyName, "%s", "F2");
      break;
    case 0x72:
      sprintf(keyName, "%s", "F3");
      break;
    case 0x73:
      v9 = "F4";
      v8 = "%s";
      goto LABEL_83;
    case 0x74:
      sprintf(keyName, "%s", "F5");
      break;
    case 0x75:
      sprintf(keyName, "%s", "F6");
      break;
    case 0x76:
      v9 = "F7";
      v8 = "%s";
      goto LABEL_83;
    case 0x77:
      sprintf(keyName, "%s", "F8");
      break;
    case 0x78:
      sprintf(keyName, "%s", "F9");
      break;
    case 0x79:
      v9 = "F10";
      v8 = "%s";
      goto LABEL_83;
    case 0x24:
      sprintf(keyName, "%s", "Home");
      break;
    case 0x26:
      sprintf(keyName, "%s", "Up");
      break;
    case 0x21:
      v9 = "PGUP";
      v8 = "%s";
      goto LABEL_83;
    case 0x6D:
      sprintf(keyName, "%s", "-");
      break;
    case 0x25:
      sprintf(keyName, "%s", "Left");
      break;
    case 0x27:
      v9 = "Right";
      v8 = "%s";
      goto LABEL_83;
    case 0x6B:
      sprintf(keyName, "%s", "+");
      break;
    case 0x23:
      sprintf(keyName, (const char *)&unk_992A30, &off_992A2C);
      break;
    case 0x28:
      v9 = "Down";
      v8 = "%s";
      goto LABEL_83;
    case 0x22:
      sprintf(keyName, "%s", "PGDN");
      break;
    case 0x2D:
      sprintf(keyName, (const char *)&unk_992A50, &off_992A4C);
      break;
    case 0x2E:
      v9 = (char *)&off_992A54;
      v8 = (const char *)&unk_992A58;
      goto LABEL_83;
    case 0x7A:
      sprintf(keyName, (const char *)&unk_992A60, &unk_992A5C);
      break;
    case 0x7B:
      sprintf(keyName, (const char *)&unk_992A68, &unk_992A64);
      break;
    case 0xBF:
      v9 = (char *)&unk_992A6C;
      v8 = (const char *)&unk_992A70;
      goto LABEL_83;
    case 0xC0:
      sprintf(keyName, (const char *)&unk_992A78, &unk_992A74);
      break;
    case 0x10:
      sprintf(keyName, "%s", "Shift");
      break;
    case 0x11:
      v9 = "Ctrl";
      v8 = "%s";
      goto LABEL_83;
    case 0x12:
      sprintf(keyName, (const char *)&unk_992A98, &off_992A94);
      break;
    case 0x14:
      sprintf(keyName, "%s", "Caps Lock");
      break;
    case 0x90:
      v9 = "Num Lock";
      v8 = "%s";
      goto LABEL_83;
    case 0x91:
      sprintf(keyName, "%s", "Scroll Lock");
      break;
    case 0x5B:
      sprintf(keyName, (const char *)&unk_992AD0, &off_992ACC);
      break;
    case 0xF5:
      v9 = (char *)&off_992AD4;
      v8 = (const char *)&unk_992AD8;
      goto LABEL_83;
    case 8:
      sprintf(keyName, "%s", "BackSpace");
      break;
    case 0x6A:
      sprintf(keyName, "%s", "*");
      break;
    case 0x13:
      v9 = "Pause Break";
      v8 = "%s";
      goto LABEL_83;
    case 0x60:
      sprintf(keyName, "%s", "Num0");
      break;
    case 0x61:
      sprintf(keyName, "%s", "Num1");
      break;
    case 0x62:
      v9 = "Num2";
      v8 = "%s";
      goto LABEL_83;
    case 0x63:
      sprintf(keyName, "%s", "Num3");
      break;
    case 0x64:
      sprintf(keyName, "%s", "Num4");
      break;
    case 0x65:
      v9 = "Num5";
      v8 = "%s";
      goto LABEL_83;
    case 0x66:
      sprintf(keyName, "%s", "Num6");
      break;
    case 0x67:
      sprintf(keyName, "%s", "Num7");
      break;
    case 0x68:
      v9 = "Num8";
      v8 = "%s";
      goto LABEL_83;
    case 0x69:
      sprintf(keyName, "%s", "Num9");
      break;
    case 0x6E:
      sprintf(keyName, "%s", "Decimal");
      break;
    case 0xF8:
      v9 = (char *)&off_992B88;
      v8 = (const char *)&unk_992B8C;
      goto LABEL_83;
    case 0xF9:
      sprintf(keyName, (const char *)&unk_992B94, &off_992B90);
      break;
    case 0xFA:
      sprintf(keyName, (const char *)&unk_992B9C, &off_992B98);
      break;
    case 0xFB:
      v9 = "MMOD_X1";
      v8 = "%s";
      goto LABEL_83;
    case 0xFC:
      sprintf(keyName, "%s", "MMOD_X2");
      break;
    case 0xFD:
      sprintf(keyName, "%s", "MMOD_X3");
      break;
    case 0xFE:
      v9 = "MMOD_X4";
      v8 = "%s";
      goto LABEL_83;
    case 0xFF:
      sprintf(keyName, "%s", "MMOD_X5");
      break;
    default:
      v9 = temp;
      temp[0] = uiKeyValue;
      temp[1] = 0;
      v8 = "%s";
LABEL_83:
      sprintf(keyName, v8, v9);
      break;
  }
  switch ( uiModifier )
  {
    case 16:
      v4 = 64;
      break;
    case 17:
      v4 = 1;
      break;
    case 18:
      v4 = 4;
      break;
    default:
      v4 = 0;
      break;
  }
  v5 = v4 - 1;
  if ( v5 )
  {
    v6 = v5 - 3;
    if ( v6 )
    {
      if ( v6 == 60 )
        sprintf(resultKeyName, "Shift + %s", keyName, *(_DWORD *)temp);
      else
        sprintf(resultKeyName, "%s", keyName, *(_DWORD *)temp);
    }
    else
    {
      sprintf(resultKeyName, "Alt + %s", keyName, *(_DWORD *)temp);
    }
  }
  else
  {
    sprintf(resultKeyName, "Ctrl + %s", keyName, *(_DWORD *)temp);
  }
  return resultKeyName;
}
// 9928D4: using guessed type void *off_9928D4;
// 992A2C: using guessed type char (*off_992A2C)[11];
// 992A4C: using guessed type void *off_992A4C;
// 992A54: using guessed type void *off_992A54;
// 992A94: using guessed type void *off_992A94;
// 992ACC: using guessed type void *off_992ACC;
// 992AD4: using guessed type void *off_992AD4;
// 992B88: using guessed type void *off_992B88;
// 992B90: using guessed type void *off_992B90;
// 992B98: using guessed type void *off_992B98;

//----- (00539EF0) --------------------------------------------------------
void __thiscall KeyRemappingWin::SetUIPageInfo(KeyRemappingWin *this)
{
  KeyRemappingWin *v1; // edi@1
  unsigned int v2; // eax@1
  unsigned int v3; // esi@1
  int v4; // eax@2
  int *v5; // eax@8
  int v6; // ebx@8
  unsigned int v7; // eax@10
  char *v8; // eax@12
  unsigned int v9; // esi@17
  int v10; // [sp+0h] [bp-128h]@0
  int *v11; // [sp+Ch] [bp-11Ch]@8
  unsigned int AttribCount; // [sp+10h] [bp-118h]@1
  ShineKeyMsg::ShineKeyAttribute eSelectedAttrib; // [sp+14h] [bp-114h]@0
  int v14; // [sp+18h] [bp-110h]@8
  int v15; // [sp+1Ch] [bp-10Ch]@8
  int v16; // [sp+20h] [bp-108h]@8
  char keyName[256]; // [sp+24h] [bp-104h]@12

  v1 = this;
  v2 = this->m_uiCurPageType;
  v3 = 0;
  AttribCount = 0;
  if ( v2 )
  {
    v4 = v2 - 1;
    if ( v4 )
    {
      if ( v4 == 1 )
      {
        eSelectedAttrib = 3;
        ((void (__stdcall *)(signed int, int))this->m_pkPrePageBut->vfptr[64].__vecDelDtor)(1, v10);
        ((void (__cdecl *)(signed int))v1->m_pkNextPageBut->vfptr[64].__vecDelDtor)(1);
      }
      goto LABEL_8;
    }
    eSelectedAttrib = 2;
  }
  else
  {
    eSelectedAttrib = 1;
  }
  ((void (__stdcall *)(_DWORD, int))this->m_pkPrePageBut->vfptr[64].__vecDelDtor)(0, v10);
  ((void (__cdecl *)(_DWORD))v1->m_pkNextPageBut->vfptr[64].__vecDelDtor)(0);
LABEL_8:
  v15 = (int)v1->m_apkKeyMappingBtn;
  v5 = &dword_B4F5BC;
  v11 = &dword_B4F5BC;
  v6 = (int)v1->m_keyMapping;
  v16 = (int)v1->m_apkInvLevWin;
  v14 = (int)v1->m_apkInvTextWin;
  do
  {
    if ( *v5 != eSelectedAttrib )
      goto LABEL_20;
    v7 = 24 * v1->m_uiCurPage;
    if ( v3 < v7 || v3 >= v7 + 24 )
      goto LABEL_18;
    keyName[0] = 0;
    memset(&keyName[1], 0, 0xFFu);
    v8 = KeyRemappingWin::GetKeyString(*(_BYTE *)(v6 + 257), *(_BYTE *)(v6 + 256));
    sprintf(keyName, "%s", v8);
    if ( *(_BYTE *)v6 != 45 || *(_BYTE *)(v6 + 1) != 45 )
    {
      if ( v3 >= 0x18 )
      {
        v9 = v3 % 0x18;
        ((void (__stdcall *)(int))v1->m_apkInvTextWin[v9]->vfptr[118].__vecDelDtor)(v6);
        ((void (__stdcall *)(char *))v1->m_apkInvLevWin[v9]->vfptr[118].__vecDelDtor)(keyName);
        v1->m_apkKeyMappingBtn[v9]->vfptr[64].__vecDelDtor((NiRefObject *)v1->m_apkKeyMappingBtn[v9], 1u);
        v3 = AttribCount;
      }
      else
      {
        (*(void (__stdcall **)(int))(**(_DWORD **)v14 + 472))(v6);
        (*(void (__stdcall **)(char *))(**(_DWORD **)v16 + 472))(keyName);
        (*(void (__stdcall **)(signed int))(**(_DWORD **)v15 + 256))(1);
      }
LABEL_18:
      v14 += 4;
      v16 += 4;
      ++v3;
      v15 += 4;
      goto LABEL_19;
    }
    v14 -= 4;
    v16 -= 4;
    --v3;
    v15 -= 4;
LABEL_19:
    AttribCount = v3;
LABEL_20:
    v5 = v11 + 2;
    v6 += 258;
    v11 = v5;
  }
  while ( (signed int)v5 < (signed int)&unk_B4F8B4 );
}
// B4F5BC: using guessed type int dword_B4F5BC;

//----- (0053A140) --------------------------------------------------------
void __thiscall KeyRemappingWin::SetKeyName(KeyRemappingWin *this)
{
  KeyRemappingWin *v1; // esi@1
  signed int v2; // edi@1
  NiUnsharedGeometryGroup *v3; // eax@3
  NiUnsharedGeometryGroup *v4; // eax@4
  NiUnsharedGeometryGroup *v5; // eax@5
  NiUnsharedGeometryGroup *v6; // eax@6
  NiUnsharedGeometryGroup *v7; // eax@7
  NiUnsharedGeometryGroup *v8; // eax@8
  NiUnsharedGeometryGroup *v9; // eax@9
  NiUnsharedGeometryGroup *v10; // eax@10
  NiUnsharedGeometryGroup *v11; // eax@11
  NiUnsharedGeometryGroup *v12; // eax@12
  NiUnsharedGeometryGroup *v13; // eax@13
  NiUnsharedGeometryGroup *v14; // eax@14
  NiUnsharedGeometryGroup *v15; // eax@15
  NiUnsharedGeometryGroup *v16; // eax@16
  NiUnsharedGeometryGroup *v17; // eax@17
  NiUnsharedGeometryGroup *v18; // eax@18
  NiUnsharedGeometryGroup *v19; // eax@19
  NiUnsharedGeometryGroup *v20; // eax@20
  NiUnsharedGeometryGroup *v21; // eax@21
  NiUnsharedGeometryGroup *v22; // eax@22
  NiUnsharedGeometryGroup *v23; // eax@23
  NiUnsharedGeometryGroup *v24; // eax@24
  NiUnsharedGeometryGroup *v25; // eax@25
  NiUnsharedGeometryGroup *v26; // eax@26
  NiUnsharedGeometryGroup *v27; // eax@27
  NiUnsharedGeometryGroup *v28; // eax@28
  NiUnsharedGeometryGroup *v29; // eax@29
  NiUnsharedGeometryGroup *v30; // eax@30
  NiUnsharedGeometryGroup *v31; // eax@31
  NiUnsharedGeometryGroup *v32; // eax@32
  NiUnsharedGeometryGroup *v33; // eax@33
  NiUnsharedGeometryGroup *v34; // eax@34
  NiUnsharedGeometryGroup *v35; // eax@35
  NiUnsharedGeometryGroup *v36; // eax@36
  NiUnsharedGeometryGroup *v37; // eax@37
  NiUnsharedGeometryGroup *v38; // eax@38
  NiUnsharedGeometryGroup *v39; // eax@39
  NiUnsharedGeometryGroup *v40; // eax@40
  NiUnsharedGeometryGroup *v41; // eax@41
  NiUnsharedGeometryGroup *v42; // eax@42
  NiUnsharedGeometryGroup *v43; // eax@43
  NiUnsharedGeometryGroup *v44; // eax@44
  NiUnsharedGeometryGroup *v45; // eax@45
  NiUnsharedGeometryGroup *v46; // eax@46
  NiUnsharedGeometryGroup *v47; // eax@47
  NiUnsharedGeometryGroup *v48; // eax@48
  NiUnsharedGeometryGroup *v49; // eax@49
  NiUnsharedGeometryGroup *v50; // eax@50
  NiUnsharedGeometryGroup *v51; // eax@51
  NiUnsharedGeometryGroup *v52; // eax@52
  NiUnsharedGeometryGroup *v53; // eax@53
  NiUnsharedGeometryGroup *v54; // eax@54
  NiUnsharedGeometryGroup *v55; // eax@55
  NiUnsharedGeometryGroup *v56; // eax@56
  NiUnsharedGeometryGroup *v57; // eax@57
  NiUnsharedGeometryGroup *v58; // eax@58
  NiUnsharedGeometryGroup *v59; // eax@59
  NiUnsharedGeometryGroup *v60; // eax@60
  NiUnsharedGeometryGroup *v61; // eax@61
  NiUnsharedGeometryGroup *v62; // eax@62
  NiUnsharedGeometryGroup *v63; // eax@63
  NiUnsharedGeometryGroup *v64; // eax@64
  NiUnsharedGeometryGroup *v65; // eax@65
  NiUnsharedGeometryGroup *v66; // eax@66
  NiUnsharedGeometryGroup *v67; // eax@67
  NiUnsharedGeometryGroup *v68; // eax@68
  NiUnsharedGeometryGroup *v69; // eax@69
  NiUnsharedGeometryGroup *v70; // eax@70
  NiUnsharedGeometryGroup *v71; // eax@71
  NiUnsharedGeometryGroup *v72; // eax@72
  NiUnsharedGeometryGroup *v73; // eax@73
  NiUnsharedGeometryGroup *v74; // eax@74
  NiUnsharedGeometryGroup *v75; // eax@75
  NiUnsharedGeometryGroup *v76; // eax@76
  NiUnsharedGeometryGroup *v77; // eax@77
  NiUnsharedGeometryGroup *v78; // eax@78
  NiUnsharedGeometryGroup *v79; // eax@79
  NiUnsharedGeometryGroup *v80; // eax@80
  NiUnsharedGeometryGroup *v81; // eax@81
  NiUnsharedGeometryGroup *v82; // eax@82
  NiUnsharedGeometryGroup *v83; // eax@83
  NiUnsharedGeometryGroup *v84; // eax@84
  NiUnsharedGeometryGroup *v85; // eax@85
  NiUnsharedGeometryGroup *v86; // eax@86
  NiUnsharedGeometryGroup *v87; // eax@87
  NiUnsharedGeometryGroup *v88; // eax@88
  NiUnsharedGeometryGroup *v89; // eax@89
  NiUnsharedGeometryGroup *v90; // eax@90
  NiUnsharedGeometryGroup *v91; // eax@91

  v1 = this;
  v2 = 0;
  do
  {
    switch ( v2 )
    {
      case 0:
        v3 = TextData::Get(0xD8DC563D);
        sprintf((char *)v1->m_keyMapping, "%s", v3);
        break;
      case 1:
        v4 = TextData::Get(0x392C5A44u);
        sprintf(v1->m_keyMapping[1].Name, "%s", v4);
        break;
      case 2:
        v5 = TextData::Get(0x1E6A9D86u);
        sprintf(v1->m_keyMapping[2].Name, "%s", v5);
        break;
      case 3:
        v6 = TextData::Get(0x35849D96u);
        sprintf(v1->m_keyMapping[3].Name, "%s", v6);
        break;
      case 4:
        v7 = TextData::Get(0xDE33523A);
        sprintf(v1->m_keyMapping[4].Name, "%s", v7);
        break;
      case 5:
        v8 = TextData::Get(0xE8395936);
        sprintf(v1->m_keyMapping[5].Name, "%s", v8);
        break;
      case 6:
        v9 = TextData::Get(0x3085A787u);
        sprintf(v1->m_keyMapping[6].Name, "%s", v9);
        break;
      case 7:
        v10 = TextData::Get(0x2B6EA294u);
        sprintf(v1->m_keyMapping[7].Name, "%s", v10);
        break;
      case 8:
        v11 = TextData::Get(0x24244F45u);
        sprintf(v1->m_keyMapping[8].Name, "%s", v11);
        break;
      case 9:
        v12 = TextData::Get(0x29205A79u);
        sprintf(v1->m_keyMapping[9].Name, "%s", v12);
        break;
      case 10:
        v13 = TextData::Get(0x6F6B96F6u);
        sprintf(v1->m_keyMapping[10].Name, "%s", v13);
        break;
      case 11:
        v14 = TextData::Get(0x9B609A7D);
        sprintf(v1->m_keyMapping[11].Name, "%s", v14);
        break;
      case 12:
        v15 = TextData::Get(0x877EA286);
        sprintf(v1->m_keyMapping[12].Name, "%s", v15);
        break;
      case 13:
        v16 = TextData::Get(0x687E0CCDu);
        sprintf(v1->m_keyMapping[13].Name, "%s", v16);
        break;
      case 14:
        v17 = TextData::Get(0xC1E4E133);
        sprintf(v1->m_keyMapping[14].Name, "%s", v17);
        break;
      case 23:
        v18 = TextData::Get(0xE2DB06F1);
        sprintf(v1->m_keyMapping[23].Name, "%s", v18);
        break;
      case 24:
        v19 = TextData::Get(0xD4D65134);
        sprintf(v1->m_keyMapping[24].Name, "%s", v19);
        break;
      case 26:
        v20 = TextData::Get(0xD8E05A37);
        sprintf(v1->m_keyMapping[26].Name, "%s", v20);
        break;
      case 27:
        v21 = TextData::Get(0xDC3A4E38);
        sprintf(v1->m_keyMapping[27].Name, "%s", v21);
        break;
      case 28:
        v22 = TextData::Get(0x293D518Bu);
        sprintf(v1->m_keyMapping[28].Name, "%s", v22);
        break;
      case 29:
        v23 = TextData::Get(0xE8DE563E);
        sprintf(v1->m_keyMapping[29].Name, "%s", v23);
        break;
      case 34:
        v24 = TextData::Get(0xD83A4B44);
        sprintf(v1->m_keyMapping[34].Name, "%s", v24);
        break;
      case 35:
        v25 = TextData::Get(0xE7E75640);
        sprintf(v1->m_keyMapping[35].Name, "%s", v25);
        break;
      case 37:
        v26 = TextData::Get(0x31365A44u);
        sprintf(v1->m_keyMapping[37].Name, "%s", v26);
        break;
      case 36:
        v27 = TextData::Get(0x312B5A44u);
        sprintf(v1->m_keyMapping[36].Name, "%s", v27);
        break;
      case 38:
        v28 = TextData::Get(0x7D6E9C97u);
        sprintf(v1->m_keyMapping[38].Name, "%s", v28);
        break;
      case 39:
        v29 = TextData::Get(0xE72C5840);
        sprintf(v1->m_keyMapping[39].Name, "%s", v29);
        break;
      case 40:
        v30 = TextData::Get(0xD43D5A43);
        sprintf(v1->m_keyMapping[40].Name, "%s", v30);
        break;
      case 41:
        v31 = TextData::Get(0x2F2FA284u);
        sprintf(v1->m_keyMapping[41].Name, "%s", v31);
        break;
      case 42:
        v32 = TextData::Get(0x83D5E5D9);
        sprintf(v1->m_keyMapping[42].Name, "%s", v32);
        break;
      case 43:
        v33 = TextData::Get(0xAE1E232B);
        sprintf(v1->m_keyMapping[43].Name, "%s", v33);
        break;
      case 47:
        v34 = TextData::Get(0x4F9ADDF4u);
        sprintf(v1->m_keyMapping[47].Name, "%s", v34);
        break;
      case 48:
        v35 = TextData::Get(0x4F9ADEF4u);
        sprintf(v1->m_keyMapping[48].Name, "%s", v35);
        break;
      case 49:
        v36 = TextData::Get(0x4F9ADFF4u);
        sprintf(v1->m_keyMapping[49].Name, "%s", v36);
        break;
      case 50:
        v37 = TextData::Get(0x4F9AE0F4u);
        sprintf(v1->m_keyMapping[50].Name, "%s", v37);
        break;
      case 51:
        v38 = TextData::Get(0x4F9AE1F4u);
        sprintf(v1->m_keyMapping[51].Name, "%s", v38);
        break;
      case 52:
        v39 = TextData::Get(0x4F9AE2F4u);
        sprintf(v1->m_keyMapping[52].Name, "%s", v39);
        break;
      case 53:
        v40 = TextData::Get(0x4F9AE3F4u);
        sprintf(v1->m_keyMapping[53].Name, "%s", v40);
        break;
      case 54:
        v41 = TextData::Get(0x4F9AE4F4u);
        sprintf(v1->m_keyMapping[54].Name, "%s", v41);
        break;
      case 55:
        v42 = TextData::Get(0x4F9AE5F4u);
        sprintf(v1->m_keyMapping[55].Name, "%s", v42);
        break;
      case 56:
        v43 = TextData::Get(0x4FCADDF4u);
        sprintf(v1->m_keyMapping[56].Name, "%s", v43);
        break;
      case 57:
        v44 = TextData::Get(0x4FCBDDF4u);
        sprintf(v1->m_keyMapping[57].Name, "%s", v44);
        break;
      case 58:
        v45 = TextData::Get(0x4FCCDDF4u);
        sprintf(v1->m_keyMapping[58].Name, "%s", v45);
        break;
      case 59:
        v46 = TextData::Get(0x509ADDF4u);
        sprintf(v1->m_keyMapping[59].Name, "%s", v46);
        break;
      case 60:
        v47 = TextData::Get(0x509ADEF4u);
        sprintf(v1->m_keyMapping[60].Name, "%s", v47);
        break;
      case 61:
        v48 = TextData::Get(0x509ADFF4u);
        sprintf(v1->m_keyMapping[61].Name, "%s", v48);
        break;
      case 62:
        v49 = TextData::Get(0x509AE0F4u);
        sprintf(v1->m_keyMapping[62].Name, "%s", v49);
        break;
      case 63:
        v50 = TextData::Get(0x509AE1F4u);
        sprintf(v1->m_keyMapping[63].Name, "%s", v50);
        break;
      case 64:
        v51 = TextData::Get(0x509AE2F4u);
        sprintf(v1->m_keyMapping[64].Name, "%s", v51);
        break;
      case 65:
        v52 = TextData::Get(0x509AE3F4u);
        sprintf(v1->m_keyMapping[65].Name, "%s", v52);
        break;
      case 66:
        v53 = TextData::Get(0x509AE4F4u);
        sprintf(v1->m_keyMapping[66].Name, "%s", v53);
        break;
      case 67:
        v54 = TextData::Get(0x509AE5F4u);
        sprintf(v1->m_keyMapping[67].Name, "%s", v54);
        break;
      case 68:
        v55 = TextData::Get(0x50CADDF4u);
        sprintf(v1->m_keyMapping[68].Name, "%s", v55);
        break;
      case 69:
        v56 = TextData::Get(0x50CBDDF4u);
        sprintf(v1->m_keyMapping[69].Name, "%s", v56);
        break;
      case 70:
        v57 = TextData::Get(0x50CCDDF4u);
        sprintf(v1->m_keyMapping[70].Name, "%s", v57);
        break;
      case 71:
        v58 = TextData::Get(0x519ADDF4u);
        sprintf(v1->m_keyMapping[71].Name, "%s", v58);
        break;
      case 72:
        v59 = TextData::Get(0x519ADEF4u);
        sprintf(v1->m_keyMapping[72].Name, "%s", v59);
        break;
      case 73:
        v60 = TextData::Get(0x519ADFF4u);
        sprintf(v1->m_keyMapping[73].Name, "%s", v60);
        break;
      case 74:
        v61 = TextData::Get(0x519AE0F4u);
        sprintf(v1->m_keyMapping[74].Name, "%s", v61);
        break;
      case 75:
        v62 = TextData::Get(0x519AE1F4u);
        sprintf(v1->m_keyMapping[75].Name, "%s", v62);
        break;
      case 76:
        v63 = TextData::Get(0x519AE2F4u);
        sprintf(v1->m_keyMapping[76].Name, "%s", v63);
        break;
      case 77:
        v64 = TextData::Get(0x519AE3F4u);
        sprintf(v1->m_keyMapping[77].Name, "%s", v64);
        break;
      case 78:
        v65 = TextData::Get(0x519AE4F4u);
        sprintf(v1->m_keyMapping[78].Name, "%s", v65);
        break;
      case 79:
        v66 = TextData::Get(0x519AE5F4u);
        sprintf(v1->m_keyMapping[79].Name, "%s", v66);
        break;
      case 80:
        v67 = TextData::Get(0x51CADDF4u);
        sprintf(v1->m_keyMapping[80].Name, "%s", v67);
        break;
      case 81:
        v68 = TextData::Get(0x51CBDDF4u);
        sprintf(v1->m_keyMapping[81].Name, "%s", v68);
        break;
      case 82:
        v69 = TextData::Get(0x51CCDDF4u);
        sprintf(v1->m_keyMapping[82].Name, "%s", v69);
        break;
      case 83:
        v70 = TextData::Get(0x529ADDF4u);
        sprintf(v1->m_keyMapping[83].Name, "%s", v70);
        break;
      case 84:
        v71 = TextData::Get(0x529ADEF4u);
        sprintf(v1->m_keyMapping[84].Name, "%s", v71);
        break;
      case 85:
        v72 = TextData::Get(0x529ADFF4u);
        sprintf(v1->m_keyMapping[85].Name, "%s", v72);
        break;
      case 86:
        v73 = TextData::Get(0x529AE0F4u);
        sprintf(v1->m_keyMapping[86].Name, "%s", v73);
        break;
      case 87:
        v74 = TextData::Get(0x529AE1F4u);
        sprintf(v1->m_keyMapping[87].Name, "%s", v74);
        break;
      case 88:
        v75 = TextData::Get(0x529AE2F4u);
        sprintf(v1->m_keyMapping[88].Name, "%s", v75);
        break;
      case 89:
        v76 = TextData::Get(0x529AE3F4u);
        sprintf(v1->m_keyMapping[89].Name, "%s", v76);
        break;
      case 90:
        v77 = TextData::Get(0x529AE4F4u);
        sprintf(v1->m_keyMapping[90].Name, "%s", v77);
        break;
      case 91:
        v78 = TextData::Get(0x529AE5F4u);
        sprintf(v1->m_keyMapping[91].Name, "%s", v78);
        break;
      case 92:
        v79 = TextData::Get(0x52CADDF4u);
        sprintf(v1->m_keyMapping[92].Name, "%s", v79);
        break;
      case 93:
        v80 = TextData::Get(0x52CBDDF4u);
        sprintf(v1->m_keyMapping[93].Name, "%s", v80);
        break;
      case 94:
        v81 = TextData::Get(0x52CCDDF4u);
        sprintf(v1->m_keyMapping[94].Name, "%s", v81);
        break;
      case 15:
        v82 = TextData::Get(0xE2F5413C);
        sprintf(v1->m_keyMapping[15].Name, "%s", v82);
        break;
      case 16:
        v83 = TextData2::Get(0x839E68F4);
        sprintf(v1->m_keyMapping[16].Name, "%s", v83);
        break;
      case 17:
        v84 = TextData2::Get(0xE2DAD147);
        sprintf(v1->m_keyMapping[17].Name, "%s", v84);
        break;
      case 18:
        v85 = TextData2::Get(0xCDC81050);
        sprintf(v1->m_keyMapping[18].Name, "%s", v85);
        break;
      case 19:
        v86 = TextData2::Get(0x7C857D9Eu);
        sprintf(v1->m_keyMapping[19].Name, "%s", v86);
        break;
      case 20:
        v87 = TextData2::Get(0xC0EA0236);
        sprintf(v1->m_keyMapping[20].Name, "%s", v87);
        break;
      case 22:
        v88 = TextData2::Get(0xABCEBA58);
        sprintf(v1->m_keyMapping[22].Name, "%s", v88);
        break;
      case 45:
        v89 = TextData2::Get(0xFB453836);
        sprintf(v1->m_keyMapping[45].Name, "%s", v89);
        break;
      case 21:
        v90 = TextData2::Get(0xFDF7DB2E);
        sprintf(v1->m_keyMapping[21].Name, "%s", v90);
        break;
      case 46:
        v91 = TextData2::Get(0x9BF6EDF0);
        sprintf(v1->m_keyMapping[46].Name, "%s", v91);
        break;
      default:
        sprintf(v1->m_keyMapping[v2].Name, "%s", "--");
        break;
    }
    ++v2;
  }
  while ( v2 < 95 );
}

//----- (0053AF80) --------------------------------------------------------
void __thiscall KeyRemappingWin::ReflashContents(KeyRemappingWin *this)
{
  KeyRemappingWin *v1; // edi@1
  char *v2; // esi@1
  signed int v3; // ebx@1
  unsigned int v4; // eax@3
  unsigned int v5; // esi@3
  int v6; // eax@4
  int *v7; // ecx@10
  int v8; // ebx@10
  unsigned int v9; // eax@12
  char *v10; // eax@14
  unsigned int v11; // esi@19
  int v12; // [sp+0h] [bp-128h]@0
  int *v13; // [sp+Ch] [bp-11Ch]@10
  unsigned int v14; // [sp+10h] [bp-118h]@3
  signed int v15; // [sp+14h] [bp-114h]@0
  int v16; // [sp+18h] [bp-110h]@10
  int v17; // [sp+1Ch] [bp-10Ch]@10
  int v18; // [sp+20h] [bp-108h]@10
  char string; // [sp+24h] [bp-104h]@14
  char dst; // [sp+25h] [bp-103h]@14

  v1 = this;
  v2 = (char *)this->m_apkInvLevWin;
  v3 = 24;
  do
  {
    (*(void (__stdcall **)(void *))(**((_DWORD **)v2 - 24) + 472))(&unk_992019);
    (*(void (__stdcall **)(void *))(**(_DWORD **)v2 + 472))(&unk_99201A);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v2 + 24) + 256))(0);
    v2 += 4;
    --v3;
  }
  while ( v3 );
  v4 = v1->m_uiCurPageType;
  v5 = 0;
  v14 = 0;
  if ( v4 )
  {
    v6 = v4 - 1;
    if ( v6 )
    {
      if ( v6 == 1 )
      {
        v15 = 3;
        ((void (__stdcall *)(signed int, int))v1->m_pkPrePageBut->vfptr[64].__vecDelDtor)(1, v12);
        ((void (__cdecl *)(signed int))v1->m_pkNextPageBut->vfptr[64].__vecDelDtor)(1);
      }
      goto LABEL_10;
    }
    v15 = 2;
  }
  else
  {
    v15 = 1;
  }
  ((void (__stdcall *)(_DWORD, int))v1->m_pkPrePageBut->vfptr[64].__vecDelDtor)(0, v12);
  ((void (__cdecl *)(_DWORD))v1->m_pkNextPageBut->vfptr[64].__vecDelDtor)(0);
LABEL_10:
  v17 = (int)v1->m_apkKeyMappingBtn;
  v7 = &dword_B4F5BC;
  v13 = &dword_B4F5BC;
  v8 = (int)v1->m_keyMapping;
  v18 = (int)v1->m_apkInvLevWin;
  v16 = (int)v1->m_apkInvTextWin;
  do
  {
    if ( *v7 != v15 )
      goto LABEL_22;
    v9 = 24 * v1->m_uiCurPage;
    if ( v5 < v9 || v5 >= v9 + 24 )
      goto LABEL_20;
    string = 0;
    memset(&dst, 0, 0xFFu);
    v10 = KeyRemappingWin::GetKeyString(*(_BYTE *)(v8 + 257), *(_BYTE *)(v8 + 256));
    sprintf(&string, "%s", v10);
    if ( *(_BYTE *)v8 != 45 || *(_BYTE *)(v8 + 1) != 45 )
    {
      if ( v5 >= 0x18 )
      {
        v11 = v5 % 0x18;
        ((void (__stdcall *)(int))v1->m_apkInvTextWin[v11]->vfptr[118].__vecDelDtor)(v8);
        ((void (__stdcall *)(char *))v1->m_apkInvLevWin[v11]->vfptr[118].__vecDelDtor)(&string);
        v1->m_apkKeyMappingBtn[v11]->vfptr[64].__vecDelDtor((NiRefObject *)v1->m_apkKeyMappingBtn[v11], 1u);
        v5 = v14;
      }
      else
      {
        (*(void (__stdcall **)(int))(**(_DWORD **)v16 + 472))(v8);
        (*(void (__stdcall **)(char *))(**(_DWORD **)v18 + 472))(&string);
        (*(void (__stdcall **)(signed int))(**(_DWORD **)v17 + 256))(1);
      }
LABEL_20:
      v16 += 4;
      v18 += 4;
      ++v5;
      v17 += 4;
      goto LABEL_21;
    }
    v16 -= 4;
    v18 -= 4;
    --v5;
    v17 -= 4;
LABEL_21:
    v14 = v5;
LABEL_22:
    v7 = v13 + 2;
    v8 += 258;
    v13 = v7;
  }
  while ( (signed int)v7 < (signed int)&unk_B4F8B4 );
}
// B4F5BC: using guessed type int dword_B4F5BC;

//----- (0053B220) --------------------------------------------------------
void __thiscall KeyRemappingWin::UpdateMeWin(KeyRemappingWin *this, float fCurTime)
{
  KeyRemappingWin *v2; // esi@1
  char *v3; // edi@2
  signed int v4; // ebx@2
  bool v5; // zf@6
  signed int v6; // edx@8
  int v7; // eax@8
  int v8; // ecx@9
  int v9; // ecx@13
  int v10; // ecx@17
  int v11; // ecx@21
  int v12; // ecx@25
  NiRefObjectVtbl **v13; // edi@30
  NiRefObjectVtbl *v14; // ebx@30
  char *v15; // eax@30
  GameFrameWork *v16; // edi@32
  NiUnsharedGeometryGroup *v17; // eax@33
  float fCurTimea; // [sp+1Ch] [bp+8h]@8

  v2 = this;
  if ( !this->m_bCheckingKey )
  {
    v3 = (char *)this->m_apkKeyMappingBtn;
    v4 = 24;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 240))(1);
      v3 += 4;
      --v4;
    }
    while ( v4 );
  }
  if ( v2->m_bCheckingKey == 1 )
  {
    if ( KeyRemappingWin::UpdateDynamicStrings(v2, fCurTime) )
    {
      v5 = v2->m_bModeif == 0;
      v2->m_bCheckRemaping = 0;
      if ( v5 )
        v2->m_keyMapping[v2->m_uiTargetKeyIndex].modifier = 0;
      v2->m_bModeif = 1;
      v6 = 2;
      v7 = (int)&v2->m_keyMapping[0].modifier;
      LODWORD(fCurTimea) = 19;
      do
      {
        v8 = v2->m_uiTargetKeyIndex;
        if ( v2->m_keyMapping[v8].keyValue == *(_BYTE *)(v7 + 1)
          && v2->m_keyMapping[v8].modifier == *(_BYTE *)v7
          && v2->m_uiTargetKeyIndex != v6 - 2 )
        {
          *(_WORD *)v7 = 0;
        }
        v9 = v2->m_uiTargetKeyIndex;
        if ( v2->m_keyMapping[v9].keyValue == *(_BYTE *)(v7 + 259)
          && v2->m_keyMapping[v9].modifier == *(_BYTE *)(v7 + 258)
          && v2->m_uiTargetKeyIndex != v6 - 1 )
        {
          *(_WORD *)(v7 + 258) = 0;
        }
        v10 = v2->m_uiTargetKeyIndex;
        if ( v2->m_keyMapping[v10].keyValue == *(_BYTE *)(v7 + 517)
          && v2->m_keyMapping[v10].modifier == *(_BYTE *)(v7 + 516)
          && v2->m_uiTargetKeyIndex != v6 )
        {
          *(_WORD *)(v7 + 516) = 0;
        }
        v11 = v2->m_uiTargetKeyIndex;
        if ( v2->m_keyMapping[v11].keyValue == *(_BYTE *)(v7 + 775)
          && v2->m_keyMapping[v11].modifier == *(_BYTE *)(v7 + 774)
          && v2->m_uiTargetKeyIndex != v6 + 1 )
        {
          *(_WORD *)(v7 + 774) = 0;
        }
        v12 = v2->m_uiTargetKeyIndex;
        if ( v2->m_keyMapping[v12].keyValue == *(_BYTE *)(v7 + 1033)
          && v2->m_keyMapping[v12].modifier == *(_BYTE *)(v7 + 1032)
          && v2->m_uiTargetKeyIndex != v6 + 2 )
        {
          *(_WORD *)(v7 + 1032) = 0;
        }
        v6 += 5;
        v7 += 1290;
        --LODWORD(fCurTimea);
      }
      while ( fCurTimea != 0.0 );
      v13 = &v2->m_apkInvLevWin[v2->m_uiSelectButIndex]->vfptr;
      v14 = *v13;
      v15 = KeyRemappingWin::GetKeyString(
              v2->m_keyMapping[v2->m_uiTargetKeyIndex].keyValue,
              v2->m_keyMapping[v2->m_uiTargetKeyIndex].modifier);
      v14[118].__vecDelDtor((NiRefObject *)v13, (unsigned int)v15);
    }
    else
    {
      if ( !v2->m_bImpossibleKey )
        return;
      v16 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v16 )
      {
        v17 = TextData2::Get(0xA79985A1);
        GameFrameWork::AddSysMsg(v16, (const char *)v17);
      }
      v2->m_bImpossibleKey = 0;
    }
    v2->m_bCheckingKey = 0;
    KeyRemappingWin::ReflashContents(v2);
  }
}

//----- (0053B480) --------------------------------------------------------
void __thiscall KeyRemappingWin::AddInfo(KeyRemappingWin *this, unsigned int uiTotalNum, unsigned int uiOffset)
{
  KeyRemappingWin *v3; // esi@1
  signed int v4; // edi@1
  char *v5; // ebx@2
  char *v6; // eax@5
  signed int v7; // [sp+8h] [bp-10Ch]@2
  const char *v8; // [sp+Ch] [bp-108h]@2
  char keyName[256]; // [sp+10h] [bp-104h]@5

  v3 = this;
  v4 = 24 * this->m_uiCurPage;
  if ( v4 < (signed int)uiTotalNum )
  {
    v5 = (char *)(2 * (uiOffset + v4) + 10971763);
    v7 = 0;
    v8 = this->m_keyMapping[uiOffset + v4].Name;
    do
    {
      if ( v7 >= 24 )
        break;
      if ( !strcmp(v8, " ") )
        break;
      ((void (__stdcall *)(_DWORD))v3->m_apkInvTextWin[v4 - 24 * v3->m_uiCurPage]->vfptr[118].__vecDelDtor)(v8);
      keyName[0] = 0;
      memset(&keyName[1], 0, 0xFFu);
      v6 = KeyRemappingWin::GetKeyString(*v5, *(v5 - 1));
      sprintf(keyName, "%s", v6);
      ((void (__stdcall *)(_DWORD))v3->m_apkInvLevWin[v4 - 24 * v3->m_uiCurPage]->vfptr[118].__vecDelDtor)(keyName);
      ((void (__stdcall *)(_DWORD))v3->m_apkKeyMappingBtn[v4 - 24 * v3->m_uiCurPage]->vfptr[64].__vecDelDtor)(1);
      v8 += 258;
      ++v7;
      ++v4;
      v5 += 2;
    }
    while ( v4 < (signed int)uiTotalNum );
  }
}

//----- (0053B620) --------------------------------------------------------
void __thiscall KeyRemappingWin::OnKeyRemapping(KeyRemappingWin *this, unsigned int uiNum)
{
  KeyRemappingWin *v2; // ebx@1
  unsigned int v3; // esi@3
  char *v4; // eax@3
  int v5; // eax@3
  NiRefObjectVtbl *v6; // edi@6
  NiUnsharedGeometryGroup *v7; // eax@6
  KeyMap *v8; // eax@6

  v2 = this;
  if ( this->m_bCheckRemaping )
  {
    ((void (__stdcall *)(_DWORD))this->m_apkKeyMappingBtn[this->m_uiSelectButIndex]->vfptr[60].__vecDelDtor)(1);
    qmemcpy(
      &v2->m_keyMapping[v2->m_uiTargetKeyIndex],
      &v2->m_kOldKeyMap,
      sizeof(v2->m_keyMapping[v2->m_uiTargetKeyIndex]));
    v2->m_bCheckRemaping = 0;
  }
  v2->m_bCheckingKey = 0;
  KeyRemappingWin::ReflashContents(v2);
  v3 = uiNum;
  v2->m_uiSelectButIndex = uiNum;
  v4 = (char *)((int (*)(void))v2->m_apkInvTextWin[uiNum]->vfptr[121].__vecDelDtor)();
  v5 = KeyRemappingWin::GetKeyIndexByName(v2, v4);
  v2->m_uiTargetKeyIndex = v5;
  if ( v5 != -1 )
  {
    if ( v5 )
    {
      qmemcpy(&v2->m_kOldKeyMap, &v2->m_keyMapping[v5], sizeof(v2->m_kOldKeyMap));
      v3 = uiNum;
    }
    v2->m_bCheckingKey = 1;
    v6 = v2->m_apkInvLevWin[v3]->vfptr;
    v7 = TextData::Get(0xF8554241);
    v6[118].__vecDelDtor((NiRefObject *)v2->m_apkInvLevWin[v3], (unsigned int)v7);
    v8 = GameFrameWork::GetKeyMap((GameFrameWork *)v2->m_pkFrameWork);
    KeyMap::RemoveAll(v8);
    ((void (__stdcall *)(_DWORD))v2->m_apkKeyMappingBtn[v2->m_uiSelectButIndex]->vfptr[60].__vecDelDtor)(0);
    v2->m_bCheckRemaping = 1;
  }
}

//----- (0053B740) --------------------------------------------------------
void __thiscall KeyRemappingWin::OnMainMenu(KeyRemappingWin *this)
{
  KeyRemappingWin *v1; // edi@1
  unsigned int v2; // ecx@1
  unsigned int v3; // eax@1
  ColumnBut *v4; // edx@2
  int v5; // esi@3
  signed int v6; // ebx@3

  v1 = this;
  v2 = 0;
  v1->m_uiCurPage = 0;
  v1->m_uiCurPageType = 0;
  v3 = v1->m_pkTabList._Mylast - v1->m_pkTabList._Myfirst;
  if ( v3 )
  {
    do
    {
      v4 = v1->m_pkTabList._Myfirst[v2++];
      v4->m_bCheck = 0;
    }
    while ( v2 < v3 );
  }
  (*v1->m_pkTabList._Myfirst)->m_bCheck = 1;
  v5 = (int)v1->m_apkInvLevWin;
  v6 = 24;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v5 - 96) + 472))(&unk_992019);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v5 + 472))(&unk_99201A);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v5 + 96) + 256))(0);
    v5 += 4;
    --v6;
  }
  while ( v6 );
  KeyRemappingWin::SetUIPageInfo(v1);
  ((void (__stdcall *)(_DWORD))v1->m_apkKeyMappingBtn[v1->m_uiSelectButIndex]->vfptr[60].__vecDelDtor)(1);
}

//----- (0053B800) --------------------------------------------------------
void __thiscall KeyRemappingWin::OnGame(KeyRemappingWin *this)
{
  KeyRemappingWin *v1; // edi@1
  unsigned int v2; // ecx@1
  unsigned int v3; // eax@1
  ColumnBut *v4; // edx@2
  int v5; // esi@3
  signed int v6; // ebx@3

  v1 = this;
  v2 = 0;
  v1->m_uiCurPage = 0;
  v1->m_uiCurPageType = 1;
  v3 = v1->m_pkTabList._Mylast - v1->m_pkTabList._Myfirst;
  if ( v3 )
  {
    do
    {
      v4 = v1->m_pkTabList._Myfirst[v2++];
      v4->m_bCheck = 0;
    }
    while ( v2 < v3 );
  }
  *(_BYTE *)(*((_DWORD *)v1->m_pkTabList._Myfirst + 1) + 380) = 1;
  v5 = (int)v1->m_apkInvLevWin;
  v6 = 24;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v5 - 96) + 472))(&unk_992019);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v5 + 472))(&unk_99201A);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v5 + 96) + 256))(0);
    v5 += 4;
    --v6;
  }
  while ( v6 );
  KeyRemappingWin::SetUIPageInfo(v1);
  ((void (__stdcall *)(_DWORD))v1->m_apkKeyMappingBtn[v1->m_uiSelectButIndex]->vfptr[60].__vecDelDtor)(1);
}

//----- (0053B8C0) --------------------------------------------------------
void __thiscall KeyRemappingWin::OnShortCut(KeyRemappingWin *this)
{
  KeyRemappingWin *v1; // edi@1
  unsigned int v2; // ecx@1
  unsigned int v3; // eax@1
  ColumnBut *v4; // edx@2
  int v5; // esi@3
  signed int v6; // ebx@3

  v1 = this;
  v2 = 0;
  v1->m_uiCurPage = 0;
  v1->m_uiCurPageType = 2;
  v3 = v1->m_pkTabList._Mylast - v1->m_pkTabList._Myfirst;
  if ( v3 )
  {
    do
    {
      v4 = v1->m_pkTabList._Myfirst[v2++];
      v4->m_bCheck = 0;
    }
    while ( v2 < v3 );
  }
  *(_BYTE *)(*((_DWORD *)v1->m_pkTabList._Myfirst + 2) + 380) = 1;
  v5 = (int)v1->m_apkInvLevWin;
  v6 = 24;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v5 - 96) + 472))(&unk_992019);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v5 + 472))(&unk_99201A);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v5 + 96) + 256))(0);
    v5 += 4;
    --v6;
  }
  while ( v6 );
  KeyRemappingWin::SetUIPageInfo(v1);
  ((void (__stdcall *)(_DWORD))v1->m_apkKeyMappingBtn[v1->m_uiSelectButIndex]->vfptr[60].__vecDelDtor)(1);
}

//----- (0053B980) --------------------------------------------------------
void __thiscall KeyRemappingWin::OnPrevPage(KeyRemappingWin *this)
{
  unsigned int v1; // eax@1

  v1 = this->m_uiCurPage;
  if ( v1 )
  {
    this->m_uiCurPage = v1 - 1;
    KeyRemappingWin::ReflashContents(this);
  }
}

//----- (0053B9A0) --------------------------------------------------------
void __thiscall KeyRemappingWin::OnNextPage(KeyRemappingWin *this)
{
  unsigned int v1; // eax@1
  unsigned int v2; // edx@2
  unsigned int v3; // eax@7

  v1 = this->m_uiCurPageType;
  if ( v1 )
  {
    if ( v1 == 1 )
    {
      v2 = this->m_uiGameTotalNum;
    }
    else
    {
      if ( v1 != 2 )
        return;
      v2 = this->m_uiShortCutTotalNum;
    }
  }
  else
  {
    v2 = this->m_uiMainMenuTotalNum;
  }
  v3 = this->m_uiCurPage;
  if ( 8 * (3 * v3 + 3) < v2 )
  {
    this->m_uiCurPage = v3 + 1;
    KeyRemappingWin::ReflashContents(this);
  }
}

//----- (0053B9F0) --------------------------------------------------------
void __thiscall KeyRemappingWin::SetKeyRemapping(KeyRemappingWin *this, bool bKeyboard, NiInputMouse::Button mouseKeyCode, NiInputKeyboard::KeyCode keyCode, unsigned int msg, unsigned int modifier)
{
  KeyMap *v6; // esi@3

  if ( mouseKeyCode && mouseKeyCode != 1 )
  {
    v6 = GameFrameWork::GetKeyMap((GameFrameWork *)this->m_pkFrameWork);
    if ( bKeyboard )
      KeyMap::Remove(v6, keyCode, modifier);
    else
      KeyMap::Remove(v6, mouseKeyCode, modifier);
    KeyMap::Remove(v6, msg);
    if ( msg < 0x62 || msg > 0x65 )
    {
      if ( bKeyboard )
        KeyMap::Add(v6, msg, keyCode, WAS_RELEASED, modifier, 0);
      else
        KeyMap::AddMouse(v6, msg, mouseKeyCode, WAS_RELEASED, modifier, 0);
    }
    else if ( bKeyboard )
    {
      KeyMap::Add(v6, msg, keyCode, IS_DOWN, modifier, 0);
    }
    else
    {
      KeyMap::AddMouse(v6, msg, mouseKeyCode, IS_DOWN, modifier, 0);
    }
  }
}

//----- (0053BAB0) --------------------------------------------------------
void __thiscall KeyRemappingWin::SetFromKeyMsgToGameMsg(KeyRemappingWin *this)
{
  int v1; // esi@1
  char *v2; // edi@1
  char v3; // bl@2
  char *v4; // eax@4
  char v5; // ST10_1@5
  KeyRemappingWin *v6; // ebx@5
  char *v7; // eax@5
  char v8; // cl@6
  unsigned int v9; // edi@10
  signed int v10; // ebx@14
  KeyMap *v11; // esi@14
  NiInputMouse::Button v12; // esi@17
  KeyMap *v13; // edi@35
  unsigned int v14; // ebx@35
  KeyRemappingWin *v15; // ebx@38
  signed int v16; // edi@38
  char *v17; // esi@38
  char *v18; // eax@42
  KeyMap *v19; // esi@46
  unsigned int uiMsg; // [sp+Ch] [bp-11Ch]@4
  char *v21; // [sp+10h] [bp-118h]@1
  int i; // [sp+14h] [bp-114h]@1
  unsigned int v23; // [sp+18h] [bp-110h]@5
  unsigned int uiModif; // [sp+1Ch] [bp-10Ch]@29
  KeyRemappingWin *v25; // [sp+20h] [bp-108h]@1
  char keyName[256]; // [sp+24h] [bp-104h]@5

  v1 = 0;
  v2 = &this->m_keyMapping[0].keyValue;
  v25 = this;
  i = 0;
  v21 = &this->m_keyMapping[0].keyValue;
  do
  {
    v3 = *(v2 - 1);
    if ( v3 || *v2 )
    {
      keyName[0] = 0;
      memset(&keyName[1], 0, 0xFFu);
      v5 = v3;
      v6 = v25;
      v7 = KeyRemappingWin::GetKeyString(*v2, v5);
      sprintf(keyName, "%s", v7);
      if ( KeyRemappingWin::KeyMappingInfo(v6, v1, &v23, keyName) )
      {
        v8 = *v2;
        if ( (unsigned __int8)*v2 >= 0xF8u )
        {
          v12 = -1;
          switch ( v8 )
          {
            case 0xF8:
              v12 = 0;
              break;
            case 0xF9:
              v12 = 1;
              break;
            case 0xFA:
              v12 = 2;
              break;
            case 0xFB:
              v12 = 3;
              break;
            case 0xFC:
              v12 = 4;
              break;
            case 0xFD:
              v12 = 5;
              break;
            case 0xFE:
              v12 = 6;
              break;
            case 0xFF:
              v12 = 7;
              break;
            default:
              break;
          }
          switch ( *(v2 - 1) )
          {
            case 16:
              uiModif = 64;
              break;
            case 17:
              uiModif = 1;
              break;
            case 18:
              uiModif = 4;
              break;
            default:
              uiModif = 0;
              break;
          }
          if ( v12 && v12 != 1 )
          {
            v13 = GameFrameWork::GetKeyMap((GameFrameWork *)v6->m_pkFrameWork);
            KeyMap::Remove(v13, v12, uiModif);
            v14 = v23;
            KeyMap::Remove(v13, v23);
            if ( v14 - 98 > 3 )
              KeyMap::AddMouse(v13, v14, v12, WAS_RELEASED, uiModif, 0);
            else
              KeyMap::AddMouse(v13, v14, v12, IS_DOWN, uiModif, 0);
          }
        }
        else
        {
          switch ( *(v2 - 1) )
          {
            case 16:
              v9 = 64;
              break;
            case 17:
              v9 = 1;
              break;
            case 18:
              v9 = 4;
              break;
            default:
              v9 = 0;
              break;
          }
          v10 = KeyRemappingWin::ConvertKeyCode(v8);
          v11 = GameFrameWork::GetKeyMap((GameFrameWork *)v25->m_pkFrameWork);
          KeyMap::Remove(v11, (NiInputKeyboard::KeyCode)v10, v9);
          KeyMap::Remove(v11, v23);
          if ( v23 - 98 > 3 )
            KeyMap::Add(v11, v23, (NiInputKeyboard::KeyCode)v10, WAS_RELEASED, v9, 0);
          else
            KeyMap::Add(v11, v23, (NiInputKeyboard::KeyCode)v10, IS_DOWN, v9, 0);
        }
        v15 = v25;
        v16 = 0;
        v17 = &v25->m_keyMapping[0].modifier;
        do
        {
          if ( v17[1] == *v21 && *v17 == *(v21 - 1) && v16 != i )
          {
            *(_WORD *)v17 = 0;
            v18 = (char *)TextData::Get(0x3343908Bu);
            KeyRemappingWin::KeyMappingInfo(v15, v16, &v23, v18);
          }
          ++v16;
          v17 += 258;
        }
        while ( v16 < 95 );
        v1 = i;
        v2 = v21;
      }
    }
    else
    {
      v4 = (char *)TextData::Get(0x3343908Bu);
      KeyRemappingWin::KeyMappingInfo(v25, v1, &uiMsg, v4);
    }
    ++v1;
    v2 += 258;
    i = v1;
    v21 = v2;
  }
  while ( v1 < 95 );
  v19 = GameFrameWork::GetKeyMap((GameFrameWork *)v25->m_pkFrameWork);
  KeyMap::Add(v19, 0x1Eu, KEY_F1, WAS_RELEASED, 0, 0);
  KeyMap::Add(v19, 0x1Fu, KEY_F2, WAS_RELEASED, 0, 0);
  KeyMap::Add(v19, 0x20u, KEY_F3, WAS_RELEASED, 0, 0);
  KeyMap::Add(v19, 0x21u, KEY_F4, WAS_RELEASED, 0, 0);
  KeyMap::Add(v19, 0x22u, KEY_F5, WAS_RELEASED, 0, 0);
  KeyMap::Add(v19, 0x23u, KEY_F6, WAS_RELEASED, 0, 0);
}

//----- (0053BE20) --------------------------------------------------------
void __thiscall KeyRemappingWin::SetSyncFromOpt(KeyRemappingWin *this, bool bOverWrite)
{
  KeyRemappingWin *v2; // esi@1
  struct MachineOpt::stKeyMapData **v3; // eax@3
  char v4; // dl@4
  int v5; // ecx@4

  v2 = this;
  if ( bOverWrite == 1 )
    memset((char *)this->m_keyMapping, 0, 0x5FBEu);
  v3 = &MachineOpt::m_keyMap;
  do
  {
    v2->m_keyMapping[*(_WORD *)v3].keyValue = *((_BYTE *)v3 + 3);
    v2->m_keyMapping[*(_WORD *)v3].modifier = *((_BYTE *)v3 + 2);
    v2->m_keyMapping[*((_WORD *)v3 + 4)].keyValue = *((_BYTE *)v3 + 11);
    v2->m_keyMapping[*((_WORD *)v3 + 4)].modifier = *((_BYTE *)v3 + 10);
    v2->m_keyMapping[*((_WORD *)v3 + 8)].keyValue = *((_BYTE *)v3 + 19);
    v2->m_keyMapping[*((_WORD *)v3 + 8)].modifier = *((_BYTE *)v3 + 18);
    v2->m_keyMapping[*((_WORD *)v3 + 12)].keyValue = *((_BYTE *)v3 + 27);
    v2->m_keyMapping[*((_WORD *)v3 + 12)].modifier = *((_BYTE *)v3 + 26);
    v2->m_keyMapping[*((_WORD *)v3 + 16)].keyValue = *((_BYTE *)v3 + 35);
    v4 = *((_BYTE *)v3 + 34);
    v5 = *((_WORD *)v3 + 16);
    v3 += 10;
    v2->m_keyMapping[v5].modifier = v4;
  }
  while ( (signed int)v3 < (signed int)&unk_B4F8B0 );
  KeyRemappingWin::SetKeyName(v2);
  KeyRemappingWin::SetFromKeyMsgToGameMsg(v2);
}
// B4F5B8: using guessed type struct MachineOpt::stKeyMapData *MachineOpt::m_keyMap;

//----- (0053BF50) --------------------------------------------------------
void __thiscall KeyRemappingWin::SetSyncToOpt(KeyRemappingWin *this)
{
  KeyRemappingWin *v1; // esi@1
  struct MachineOpt::stKeyMapData **v2; // eax@1
  int v3; // ecx@2
  char v4; // dl@2
  int v5; // ecx@5
  char v6; // dl@5
  int v7; // ecx@8
  char v8; // dl@8
  int v9; // ecx@11
  char v10; // dl@11
  int v11; // ecx@14
  char v12; // dl@14

  v1 = this;
  v2 = &MachineOpt::m_keyMap;
  do
  {
    v3 = *(_WORD *)v2;
    v4 = v1->m_keyMapping[v3].keyValue;
    if ( *((_BYTE *)v2 + 3) != v4 || *((_BYTE *)v2 + 2) != v1->m_keyMapping[v3].modifier )
    {
      *((_BYTE *)v2 + 3) = v4;
      *((_BYTE *)v2 + 2) = v1->m_keyMapping[v3].modifier;
    }
    v5 = *((_WORD *)v2 + 4);
    v6 = v1->m_keyMapping[v5].keyValue;
    if ( *((_BYTE *)v2 + 11) != v6 || *((_BYTE *)v2 + 10) != v1->m_keyMapping[v5].modifier )
    {
      *((_BYTE *)v2 + 11) = v6;
      *((_BYTE *)v2 + 10) = v1->m_keyMapping[v5].modifier;
    }
    v7 = *((_WORD *)v2 + 8);
    v8 = v1->m_keyMapping[v7].keyValue;
    if ( *((_BYTE *)v2 + 19) != v8 || *((_BYTE *)v2 + 18) != v1->m_keyMapping[v7].modifier )
    {
      *((_BYTE *)v2 + 19) = v8;
      *((_BYTE *)v2 + 18) = v1->m_keyMapping[v7].modifier;
    }
    v9 = *((_WORD *)v2 + 12);
    v10 = v1->m_keyMapping[v9].keyValue;
    if ( *((_BYTE *)v2 + 27) != v10 || *((_BYTE *)v2 + 26) != v1->m_keyMapping[v9].modifier )
    {
      *((_BYTE *)v2 + 27) = v10;
      *((_BYTE *)v2 + 26) = v1->m_keyMapping[v9].modifier;
    }
    v11 = *((_WORD *)v2 + 16);
    v12 = v1->m_keyMapping[v11].keyValue;
    if ( *((_BYTE *)v2 + 35) != v12 || *((_BYTE *)v2 + 34) != v1->m_keyMapping[v11].modifier )
    {
      *((_BYTE *)v2 + 35) = v12;
      *((_BYTE *)v2 + 34) = v1->m_keyMapping[v11].modifier;
    }
    v2 += 10;
  }
  while ( (signed int)v2 < (signed int)&unk_B4F8B0 );
  KeyRemappingWin::SetKeyName(v1);
  KeyRemappingWin::SetFromKeyMsgToGameMsg(v1);
}
// B4F5B8: using guessed type struct MachineOpt::stKeyMapData *MachineOpt::m_keyMap;

//----- (0053C070) --------------------------------------------------------
KeyRemappingBut *__cdecl KeyRemappingBut::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, char *pcName, unsigned int uiExtStyle, unsigned int uiInvIndex)
{
  PgWin *v8; // eax@1
  PgWin *v9; // esi@1
  PgWin *v10; // edi@8
  KeyRemappingBut *v11; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v13; // [sp+20h] [bp-4h]@1

  v8 = (PgWin *)operator new(0x148u);
  v9 = v8;
  result.m_pObject = v8;
  v13 = 0;
  if ( v8 )
  {
    PgWinBut::PgWinBut((PgWinBut *)v8);
    v9->vfptr = (NiRefObjectVtbl *)&KeyRemappingBut::`vftable'{for `NiNode'};
    v9->vfptr = (IDirectMessengerVtbl *)&KeyRemappingBut::`vftable'{for `IDirectMessenger'};
    LODWORD(v9[1].m_kWorldBound.m_kCenter.x) = -1;
  }
  else
  {
    v9 = 0;
  }
  if ( v9 )
    InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  v13 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v9);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgSprData *, PgWin *, unsigned int, char *, unsigned int, unsigned int))v9->vfptr[140].__vecDelDtor)(
                          v9,
                          iXPos,
                          iYPos,
                          pkSprData,
                          pkParent,
                          uiCmdMsg,
                          pcName,
                          uiExtStyle,
                          uiInvIndex) )
  {
    ((void (__thiscall *)(PgWin *))v9->vfptr[89].__vecDelDtor)(v9);
    v13 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v11 = (KeyRemappingBut *)v9;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v9);
    if ( result.m_pObject )
    {
      v10 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v10 )
          v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
      }
    }
    v13 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v11 = 0;
  }
  return v11;
}
// 992D90: using guessed type void (__thiscall *KeyRemappingBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 992DAC: using guessed type int (__thiscall *KeyRemappingBut::`vftable'{for `NiNode'})(void *p, char);

//----- (0053C1E0) --------------------------------------------------------
void __thiscall KeyRemappingWin::KeyRemappingWin(KeyRemappingWin *this)
{
  KeyRemappingWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&KeyRemappingWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&KeyRemappingWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkTabList._Myfirst = 0;
  v1->m_pkTabList._Mylast = 0;
  v1->m_pkTabList._Myend = 0;
  v1->m_uiCurPageType = 0;
  v1->m_uiCurPage = 0;
  *(_WORD *)&v1->m_bCheckingKey = 0;
  v1->m_uiSelectButIndex = 0;
  v1->m_bImpossibleKey = 0;
  v1->m_pkPrePageBut = 0;
  v1->m_pkNextPageBut = 0;
  v1->m_bModeif = 0;
  v1->m_uiTargetKeyIndex = 0;
  v1->m_uiMainMenuTotalNum = 25;
  v1->m_uiGameTotalNum = 24;
  v1->m_uiShortCutTotalNum = 48;
}
// 992FE4: using guessed type void (__thiscall *KeyRemappingWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 993004: using guessed type int (__thiscall *KeyRemappingWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0053C270) --------------------------------------------------------
void __thiscall KeyRemappingWin::~KeyRemappingWin(KeyRemappingWin *this)
{
  KeyRemappingWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&KeyRemappingWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&KeyRemappingWin::`vftable'{for `IDirectMessenger'};
  if ( this->m_pkTabList._Myfirst )
    operator delete(this->m_pkTabList._Myfirst);
  v1->m_pkTabList._Myfirst = 0;
  v1->m_pkTabList._Mylast = 0;
  v1->m_pkTabList._Myend = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 992FE4: using guessed type void (__thiscall *KeyRemappingWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 993004: using guessed type int (__thiscall *KeyRemappingWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0053C2C0) --------------------------------------------------------
KeyRemappingWin *__cdecl KeyRemappingWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  KeyRemappingWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x6378u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    KeyRemappingWin::KeyRemappingWin((KeyRemappingWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[136].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (KeyRemappingWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (0053C3F0) --------------------------------------------------------
void __thiscall KeyRemappingWin::OnCancel(KeyRemappingWin *this)
{
  KeyRemappingWin *v1; // esi@1

  v1 = this;
  KeyRemappingWin::SetSyncFromOpt(this, 0);
  KeyRemappingWin::ReflashContents(v1);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}

//----- (0053C410) --------------------------------------------------------
char __thiscall KeyRemappingWin::LoadDefalultKeyRemapping(KeyRemappingWin *this, bool bDefault)
{
  KeyRemappingWin::SetSyncFromOpt(this, bDefault);
  return 1;
}

//----- (0053C440) --------------------------------------------------------
char __thiscall KeyRemappingWin::Create(KeyRemappingWin *this, PgFrameWork *pkFrameWork)
{
  KeyRemappingWin *v2; // esi@1
  char result; // al@6
  NiTexturePalette *v4; // ebx@7
  const char *v5; // eax@9
  PgSprData *v6; // eax@10
  NiNode *v7; // esi@11
  int v8; // edi@16
  int v9; // ebx@16
  NiSourceTexture *v10; // eax@16
  PgSprData *v11; // eax@17
  PgSprData *v12; // eax@21
  PgWinSpr *v13; // eax@21
  PgSprData *v14; // eax@21
  PgFont *v15; // eax@23
  PgWinText *v16; // eax@23
  NiRefObjectVtbl *v17; // edx@23
  NiUnsharedGeometryGroup *v18; // eax@23
  PgSprData *v19; // eax@23
  PgFont *v20; // eax@24
  PgWinText *v21; // eax@24
  NiRefObjectVtbl *v22; // edx@24
  NiUnsharedGeometryGroup *v23; // eax@24
  PgFont *v24; // eax@25
  PgWinText *v25; // eax@25
  NiRefObjectVtbl *v26; // edx@25
  NiUnsharedGeometryGroup *v27; // eax@25
  PgFont *v28; // eax@26
  PgWinText *v29; // eax@26
  NiRefObjectVtbl *v30; // edx@26
  NiUnsharedGeometryGroup *v31; // eax@26
  PgSprData *v32; // eax@26
  PgWinText **v33; // edi@26
  PgSprData *v34; // eax@28
  PgFont *v35; // eax@28
  PgWinText *v36; // eax@28
  unsigned int v37; // ST64_4@28
  char *v38; // eax@28
  char *v39; // eax@28
  PgFont *v40; // eax@29
  PgWinText *v41; // eax@29
  char *v42; // eax@29
  PgSprData *v43; // edi@30
  PgWinBut *v44; // eax@30
  NiSourceTexture *v45; // ST48_4@30
  NiNode *v46; // edx@30
  PgSprData *v47; // edi@30
  PgSprData *v48; // ST54_4@30
  int v49; // edi@30
  PgWinBut *v50; // edi@30
  D3DXCOLOR v51; // ST54_16@30
  char *v52; // eax@30
  PgWinBut *v53; // edi@30
  D3DXCOLOR v54; // ST54_16@30
  char *v55; // eax@30
  PgWinBut *v56; // edi@30
  D3DXCOLOR v57; // ST54_16@30
  char *v58; // eax@30
  char *v59; // ecx@31
  unsigned int v60; // eax@31
  NiNode *v61; // esi@34
  UIUtil ui; // [sp+78h] [bp-78h]@30
  unsigned int v63; // [sp+8Ch] [bp-64h]@27
  unsigned int v64; // [sp+90h] [bp-60h]@27
  unsigned int i; // [sp+94h] [bp-5Ch]@26
  int iOffY; // [sp+98h] [bp-58h]@16
  unsigned int uiHeight; // [sp+9Ch] [bp-54h]@21
  unsigned int uiWidth; // [sp+A0h] [bp-50h]@21
  NiSourceTexture *pkTexture; // [sp+A4h] [bp-4Ch]@1
  NiSourceTexture *pkTexture8; // [sp+A8h] [bp-48h]@19
  PgWinText *pkTextWin; // [sp+ACh] [bp-44h]@19
  int uiLeft; // [sp+B0h] [bp-40h]@10
  int uiTop; // [sp+B4h] [bp-3Ch]@10
  NiPointer<NiNode> spNode; // [sp+B8h] [bp-38h]@1
  char acShapeName[33]; // [sp+BCh] [bp-34h]@27
  int v76; // [sp+ECh] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v76 = 0;
  pkTexture = MenuTexMgr::GetTexture(4u);
  if ( !pkTexture )
  {
    v76 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( spNode.m_pObject )
        spNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spNode.m_pObject, 1u);
    }
    return 0;
  }
  v4 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "Game\\KeyRemappingWin.nif");
  PgUtil::LoadNodeNifFile(v5, &spNode, v4);
  if ( !spNode.m_pObject )
    return 0;
  v6 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v6, 0, pkFrameWork, "KeyRemappingWin", 0) )
  {
    v8 = uiTop;
    v9 = uiLeft;
    iOffY = uiTop;
    v10 = MenuTexMgr::GetTexture(0x13u);
    if ( v10 )
      v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
    else
      v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v9, uiTop - v8, v11, (PgWin *)&v2->vfptr, 0, 0);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "ClsNor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
    PgWinCloseBut::CreateWin(uiLeft - v9, uiTop - v8, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr);
    pkTexture8 = MenuTexMgr::GetTexture(4u);
    if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
    {
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "HelpLinkNor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture8);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
      PgWinBut::CreateWin(uiLeft - v9, uiTop - v8, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x14u, 0, 0);
    }
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
    v13 = PgWinSpr::CreateWin(uiLeft - v9, uiTop - v8, v12, (PgWin *)&v2->vfptr, 0, 0);
    v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, pkTexture);
    PgWinSpr::CreateWin(uiLeft - v9, uiTop - v8, v14, (PgWin *)&v2->vfptr, 0, 0);
    if ( PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "WinTitle",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight) )
    {
      v15 = Font::Get(MAIN_MENU);
      v16 = PgWinText::CreateWin(uiLeft - v9, uiTop - v8 + 2, uiWidth, uiHeight, v15, (PgWin *)&v2->vfptr, 0, 0);
      v17 = v16->vfptr;
      pkTextWin = v16;
      v17[122].__vecDelDtor((NiRefObject *)v16, 5u);
      ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
      pkTexture8 = (NiSourceTexture *)&pkTextWin->vfptr[118];
      v18 = TextData::Get(0x244566A7u);
      ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkTexture8->vfptr)(pkTextWin, v18);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, pkTexture);
      PgWinSpr::CreateWin(uiLeft - v9, uiTop - v8, v19, (PgWin *)&v2->vfptr, 0, 0);
      if ( PgUtil::GetTriShapeRect(
             (NiAVObject *)&spNode.m_pObject->vfptr,
             "Tab01_On",
             &uiLeft,
             &uiTop,
             &uiWidth,
             &uiHeight) )
      {
        pkTextWin = (PgWinText *)PgSprData::Create(
                                   (NiAVObject *)&spNode.m_pObject->vfptr,
                                   "Tab01_Off",
                                   &uiLeft,
                                   &uiTop,
                                   pkTexture);
        PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Tab01_On");
        pkTexture8 = (NiSourceTexture *)ColumnBut::CreateWin(
                                          uiLeft - v9,
                                          uiTop - v8,
                                          (PgSprData *)pkTextWin,
                                          (PgWin *)&v2->vfptr,
                                          0xBu,
                                          0);
        std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
          (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_pkTabList,
          (const unsigned int *)&pkTexture8);
        (*v2->m_pkTabList._Myfirst)->m_bCheck = 1;
        v20 = Font::Get(0);
        v21 = PgWinText::CreateWin(uiLeft - v9, uiTop - v8 + 2, uiWidth, uiHeight, v20, (PgWin *)&v2->vfptr, 0, 0);
        v22 = v21->vfptr;
        pkTextWin = v21;
        v22[122].__vecDelDtor((NiRefObject *)v21, 5u);
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
        pkTexture8 = (NiSourceTexture *)&pkTextWin->vfptr[118];
        v23 = TextData::Get(0xF1F7FCF9);
        ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkTexture8->vfptr)(pkTextWin, v23);
        ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
        if ( PgUtil::GetTriShapeRect(
               (NiAVObject *)&spNode.m_pObject->vfptr,
               "Tab02_On",
               &uiLeft,
               &uiTop,
               &uiWidth,
               &uiHeight) )
        {
          pkTextWin = (PgWinText *)PgSprData::Create(
                                     (NiAVObject *)&spNode.m_pObject->vfptr,
                                     "Tab02_Off",
                                     &uiLeft,
                                     &uiTop,
                                     pkTexture);
          PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Tab02_On");
          pkTexture8 = (NiSourceTexture *)ColumnBut::CreateWin(
                                            uiLeft - v9,
                                            uiTop - v8,
                                            (PgSprData *)pkTextWin,
                                            (PgWin *)&v2->vfptr,
                                            0xCu,
                                            0);
          std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
            (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_pkTabList,
            (const unsigned int *)&pkTexture8);
          *(_BYTE *)(*((_DWORD *)v2->m_pkTabList._Myfirst + 1) + 380) = 0;
          v24 = Font::Get(0);
          v25 = PgWinText::CreateWin(uiLeft - v9, uiTop - v8 + 2, uiWidth, uiHeight, v24, (PgWin *)&v2->vfptr, 0, 0);
          v26 = v25->vfptr;
          pkTextWin = v25;
          v26[122].__vecDelDtor((NiRefObject *)v25, 5u);
          ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
          pkTexture8 = (NiSourceTexture *)&pkTextWin->vfptr[118];
          v27 = TextData::Get(0x97AF01E7);
          ((void (__thiscall *)(_DWORD, _DWORD))pkTexture8->vfptr)(pkTextWin, v27);
          ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
          if ( PgUtil::GetTriShapeRect(
                 (NiAVObject *)&spNode.m_pObject->vfptr,
                 "Tab03_On",
                 &uiLeft,
                 &uiTop,
                 &uiWidth,
                 &uiHeight) )
          {
            pkTextWin = (PgWinText *)PgSprData::Create(
                                       (NiAVObject *)&spNode.m_pObject->vfptr,
                                       "Tab03_Off",
                                       &uiLeft,
                                       &uiTop,
                                       pkTexture);
            PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Tab03_On");
            pkTexture8 = (NiSourceTexture *)ColumnBut::CreateWin(
                                              uiLeft - v9,
                                              uiTop - v8,
                                              (PgSprData *)pkTextWin,
                                              (PgWin *)&v2->vfptr,
                                              0xDu,
                                              0);
            std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
              (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_pkTabList,
              (const unsigned int *)&pkTexture8);
            *(_BYTE *)(*((_DWORD *)v2->m_pkTabList._Myfirst + 2) + 380) = 0;
            v28 = Font::Get(0);
            v29 = PgWinText::CreateWin(uiLeft - v9, uiTop - v8 + 2, uiWidth, uiHeight, v28, (PgWin *)&v2->vfptr, 0, 0);
            v30 = v29->vfptr;
            pkTextWin = v29;
            v30[122].__vecDelDtor((NiRefObject *)v29, 5u);
            ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
            pkTexture8 = (NiSourceTexture *)&pkTextWin->vfptr[118];
            v31 = TextData::Get(0x534A3742u);
            ((void (__thiscall *)(_DWORD, _DWORD))pkTexture8->vfptr)(pkTextWin, v31);
            ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
            v32 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane", &uiLeft, &uiTop, pkTexture);
            PgWinSpr::CreateWin(uiLeft - v9, uiTop - v8, v32, (PgWin *)&v2->vfptr, 0, 0);
            i = 0;
            v33 = v2->m_apkInvTextWin;
            while ( 1 )
            {
              pkTexture8 = (NiSourceTexture *)(i + 1);
              sprintf(acShapeName, "SlotBox%02d", i + 1);
              if ( !PgUtil::GetTriShapeRect(
                      (NiAVObject *)&spNode.m_pObject->vfptr,
                      acShapeName,
                      &uiLeft,
                      &uiTop,
                      &v64,
                      &v63) )
                break;
              v34 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, pkTexture);
              PgWinSpr::CreateWin(uiLeft - v9, uiTop - iOffY, v34, (PgWin *)&v2->vfptr, 0, 0);
              v35 = Font::Get(0);
              v36 = PgWinText::CreateWin(uiLeft - v9, uiTop - iOffY + 2, v64, v63, v35, (PgWin *)&v2->vfptr, 0, 0);
              *v33 = v36;
              v36->vfptr[122].__vecDelDtor((NiRefObject *)v36, 5u);
              v37 = i;
              pkTextWin = (PgWinText *)&(*v33)->vfptr[118];
              v38 = (char *)TextData::Get(0xECE5F444);
              v39 = fs(v38, v37);
              ((void (__thiscall *)(PgWinText *, char *))pkTextWin->vfptr)(*v33, v39);
              ((void (__stdcall *)(_DWORD))(*v33)->vfptr[60].__vecDelDtor)(0);
              sprintf(acShapeName, "SlotMap%02d", pkTexture8);
              if ( !PgUtil::GetTriShapeRect(
                      (NiAVObject *)&spNode.m_pObject->vfptr,
                      acShapeName,
                      &uiLeft,
                      &uiTop,
                      &v64,
                      &v63) )
                break;
              pkTextWin = (PgWinText *)PgSprData::Create(
                                         (NiAVObject *)&spNode.m_pObject->vfptr,
                                         acShapeName,
                                         &uiLeft,
                                         &uiTop,
                                         pkTexture);
              sprintf(acShapeName, "SlotMap%02dOver", pkTexture8);
              PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, acShapeName);
              PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, acShapeName);
              v33[48] = (PgWinText *)KeyRemappingBut::CreateWin(
                                       uiLeft - v9,
                                       uiTop - iOffY,
                                       (PgSprData *)pkTextWin,
                                       (PgWin *)&v2->vfptr,
                                       0x10u,
                                       0,
                                       0,
                                       i);
              v40 = Font::Get(0);
              v41 = PgWinText::CreateWin(uiLeft - v9, uiTop - iOffY + 2, v64, v63, v40, (PgWin *)&v2->vfptr, 0, 0);
              v33[24] = v41;
              v41->vfptr[122].__vecDelDtor((NiRefObject *)v41, 5u);
              pkTextWin = (PgWinText *)&v33[24]->vfptr[118];
              v42 = fs("%d", i);
              ((void (__thiscall *)(PgWinText *, char *))pkTextWin->vfptr)(v33[24], v42);
              ((void (__stdcall *)(_DWORD))v33[24]->vfptr[60].__vecDelDtor)(0);
              ++v33;
              i = (unsigned int)pkTexture8;
              if ( (unsigned int)pkTexture8 >= 0x18 )
              {
                v43 = PgSprData::Create(
                        (NiAVObject *)&spNode.m_pObject->vfptr,
                        "PrePageNor",
                        &uiLeft,
                        &uiTop,
                        pkTexture);
                PgSprData::Add(v43, (NiAVObject *)&spNode.m_pObject->vfptr, "PrePageClick");
                PgSprData::Add(v43, (NiAVObject *)&spNode.m_pObject->vfptr, "PrePageOver");
                v44 = PgWinBut::CreateWin(uiLeft - v9, uiTop - iOffY, v43, (PgWin *)&v2->vfptr, 0xEu, 0, 0);
                v45 = pkTexture;
                v46 = spNode.m_pObject;
                v2->m_pkPrePageBut = v44;
                v47 = PgSprData::Create((NiAVObject *)&v46->vfptr, "NextPageNor", &uiLeft, &uiTop, v45);
                PgSprData::Add(v47, (NiAVObject *)&spNode.m_pObject->vfptr, "NextPageClick");
                PgSprData::Add(v47, (NiAVObject *)&spNode.m_pObject->vfptr, "NextPageOver");
                v48 = v47;
                v49 = iOffY;
                v2->m_pkNextPageBut = PgWinBut::CreateWin(
                                        uiLeft - v9,
                                        uiTop - iOffY,
                                        v48,
                                        (PgWin *)&v2->vfptr,
                                        0xFu,
                                        0,
                                        0);
                UIUtil::UIUtil(&ui);
                LOBYTE(v76) = 1;
                UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
                UIUtil::SetOffset(&ui, v9, v49);
                UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
                v50 = UIUtil::CreateBtn(&ui, 0x11u, "ApplyNor", "ApplyOver", "ApplyClick", 0, 0);
                *(_QWORD *)&v51.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
                *(_QWORD *)&v51.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
                v52 = (char *)TextData::Get(0x9BF9F4F6);
                UIUtil::CreateAttachedText((PgWin *)&v50->vfptr, v52, v51, 5u);
                v53 = UIUtil::CreateBtn(&ui, 0x12u, "DefaultNor", "DefaultOver", "DefaultClick", 0, 0);
                *(_QWORD *)&v54.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
                *(_QWORD *)&v54.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
                v55 = (char *)TextData::Get(0x9005EDF9);
                UIUtil::CreateAttachedText((PgWin *)&v53->vfptr, v55, v54, 5u);
                v56 = UIUtil::CreateBtn(&ui, 0x13u, "CancelNor", "CancelOver", "CancelClick", 0, 0);
                *(_QWORD *)&v57.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
                *(_QWORD *)&v57.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
                v58 = (char *)TextData::Get(0x97E7FBF5);
                UIUtil::CreateAttachedText((PgWin *)&v56->vfptr, v58, v57, 5u);
                ((void (__thiscall *)(KeyRemappingWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
                  v2,
                  PgWin::ms_uiScreenWidth,
                  PgWin::ms_uiScreenHeight,
                  0.5,
                  0.5);
                if ( !CharSelectFrameWork::ms_bLoadKeyMappingOptionSuccess )
                {
                  KeyRemappingWin::SetSyncFromOpt(v2, 1);
                  v59 = &v2->m_keyMapping[0].keyValue;
                  v60 = 0;
                  do
                  {
                    byte_A76A72[v60] = *(v59 - 1);
                    byte_A76A73[v60] = *v59;
                    v60 += 2;
                    v59 += 258;
                  }
                  while ( v60 < 0xBE );
                  KeyRemappingWin::ReflashContents(v2);
                }
                LOBYTE(v76) = 0;
                UIUtil::~UIUtil(&ui);
                v61 = spNode.m_pObject;
                v76 = -1;
                if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v61 )
                  v61->vfptr->__vecDelDtor((NiRefObject *)v61, 1u);
                return 1;
              }
            }
          }
        }
      }
    }
    v76 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    result = 0;
  }
  else
  {
    v7 = spNode.m_pObject;
    v76 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A886CF: using guessed type bool CharSelectFrameWork::ms_bLoadKeyMappingOptionSuccess;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0053D090) --------------------------------------------------------
void __thiscall KeyRemappingWin::OnClose(KeyRemappingWin *this)
{
  KeyRemappingWin *v1; // esi@1
  char *v2; // eax@3
  char *v3; // ecx@3

  v1 = this;
  if ( this->m_bCheckRemaping )
  {
    ((void (__stdcall *)(_DWORD))this->m_apkKeyMappingBtn[this->m_uiSelectButIndex]->vfptr[60].__vecDelDtor)(1);
    v1->m_bCheckRemaping = 0;
  }
  KeyRemappingWin::SetSyncFromOpt(v1, 0);
  v2 = byte_A76A73;
  v3 = &v1->m_keyMapping[0].keyValue;
  do
  {
    *(v2 - 1) = *(v3 - 1);
    *v2 = *v3;
    v2 += 2;
    v3 += 258;
  }
  while ( (signed int)v2 < (signed int)&unk_A76B31 );
  KeyRemappingWin::ReflashContents(v1);
  PgWin::OnClose((PgWin *)&v1->vfptr);
}

//----- (0053D120) --------------------------------------------------------
void __thiscall KeyRemappingWin::SaveKeyMapping(KeyRemappingWin *this)
{
  KeyRemappingWin *v1; // ebx@1
  std::_List_nod<int,std::allocator<int> >::_Node *v2; // eax@1
  signed int v3; // edi@2
  int v4; // eax@3
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v5; // eax@5
  std::_List_nod<int,std::allocator<int> >::_Node *v6; // eax@8
  std::_List_nod<int,std::allocator<int> >::_Node *v7; // esi@9
  std::_List_nod<int,std::allocator<int> >::_Node *v8; // eax@10
  std::_List_nod<int,std::allocator<int> >::_Node *v9; // ecx@10
  std::_List_nod<int,std::allocator<int> >::_Node *v10; // esi@11
  std::exception pExceptionObject; // [sp+10h] [bp-2Ch]@14
  std::list<int,std::allocator<int> > lstChange; // [sp+1Ch] [bp-20h]@1
  char *_What; // [sp+28h] [bp-14h]@14
  int i; // [sp+2Ch] [bp-10h]@2
  int v15; // [sp+38h] [bp-4h]@2

  v1 = this;
  lstChange._Mysize = 0;
  v2 = (std::_List_nod<int,std::allocator<int> >::_Node *)operator new(0xCu);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  lstChange._Myhead = v2;
  v2->_Next = v2;
  lstChange._Myhead->_Prev = lstChange._Myhead;
  v3 = 0;
  v15 = 0;
  i = 0;
  do
  {
    v4 = LOWORD((&MachineOpt::m_keyMap)[v3]);
    if ( HIBYTE(word_B4F5BA[4 * v3]) != v1->m_keyMapping[v4].keyValue
      || LOBYTE(word_B4F5BA[4 * v3]) != v1->m_keyMapping[v4].modifier )
    {
      v5 = std::_List_val<char *,std::allocator<char *>>::_Buynode(
             (std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *)lstChange._Myhead,
             (std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *)lstChange._Myhead->_Prev,
             (ItemViewDummy *const *)&i);
      if ( 1073741822 - lstChange._Mysize < 1 )
        std::_Xlength_error("list<T> too long");
      ++lstChange._Mysize;
      lstChange._Myhead->_Prev = (std::_List_nod<int,std::allocator<int> >::_Node *)v5;
      v5->_Prev->_Next = v5;
    }
    i = ++v3;
  }
  while ( v3 < 95 );
  GameFrameWork::SendKeyRemappingReq((GameFrameWork *)v1->m_pkFrameWork, &lstChange);
  KeyRemappingWin::SetSyncToOpt(v1);
  v6 = lstChange._Myhead->_Next;
  lstChange._Myhead->_Next = lstChange._Myhead;
  lstChange._Myhead->_Prev = lstChange._Myhead;
  lstChange._Mysize = 0;
  if ( v6 != lstChange._Myhead )
  {
    do
    {
      v7 = v6->_Next;
      operator delete(v6);
      v6 = v7;
    }
    while ( v7 != lstChange._Myhead );
  }
  PgFrameWork::AddMsg(v1->m_pkFrameWork, 0x10Bu, 0, 0);
  v8 = lstChange._Myhead->_Next;
  lstChange._Myhead->_Next = lstChange._Myhead;
  lstChange._Myhead->_Prev = lstChange._Myhead;
  v9 = lstChange._Myhead;
  lstChange._Mysize = 0;
  if ( v8 != lstChange._Myhead )
  {
    do
    {
      v10 = v8->_Next;
      operator delete(v8);
      v9 = lstChange._Myhead;
      v8 = v10;
    }
    while ( v10 != lstChange._Myhead );
  }
  operator delete(v9);
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// B4F5B8: using guessed type struct MachineOpt::stKeyMapData *MachineOpt::m_keyMap;
// B4F5BA: using guessed type __int16 word_B4F5BA[];

//----- (0053D2D0) --------------------------------------------------------
void __thiscall KeyRemappingWin::OnCommand(KeyRemappingWin *this, unsigned int wParam, int lParam)
{
  unsigned int v3; // eax@5

  switch ( wParam )
  {
    case 0xBu:
      KeyRemappingWin::OnMainMenu(this);
      break;
    case 0xCu:
      KeyRemappingWin::OnGame(this);
      break;
    case 0xDu:
      KeyRemappingWin::OnShortCut(this);
      break;
    case 0xEu:
      v3 = this->m_uiCurPage;
      if ( v3 )
      {
        this->m_uiCurPage = v3 - 1;
        KeyRemappingWin::ReflashContents(this);
      }
      break;
    case 0xFu:
      KeyRemappingWin::OnNextPage(this);
      break;
    case 0x11u:
      KeyRemappingWin::SaveKeyMapping(this);
      break;
    case 0x12u:
      GameFrameWork::SendDefaultKeyRemappingReq((GameFrameWork *)this->m_pkFrameWork);
      break;
    case 0x10u:
      KeyRemappingWin::OnKeyRemapping(this, lParam);
      break;
    case 0x13u:
      KeyRemappingWin::OnCancel(this);
      break;
    case 0x14u:
      KeyRemappingWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (0053D390) --------------------------------------------------------
KeyRemappingBut *__thiscall KeyRemappingBut::`scalar deleting destructor'(KeyRemappingBut *this, unsigned int a2)
{
  KeyRemappingBut *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&KeyRemappingBut::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&KeyRemappingBut::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 992D90: using guessed type void (__thiscall *KeyRemappingBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 992DAC: using guessed type int (__thiscall *KeyRemappingBut::`vftable'{for `NiNode'})(void *p, char);

//----- (0053D3D0) --------------------------------------------------------
void __thiscall KeyMap::Remove(KeyMap *this, unsigned int uiMsg)
{
  NiTListItem<KeyMap::KeyNode *> *v2; // eax@1
  KeyMap::KeyNode *v3; // esi@2
  NiTListItem<KeyMap::KeyNode *> *v4; // eax@5
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *v5; // ecx@5
  KeyMap::KeyNode **v6; // edx@6
  unsigned int v7; // edi@6

  v2 = this->m_kList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      if ( v3->m_uiMsg == uiMsg )
        break;
      v2 = v2->m_pkNext;
      if ( !v2 )
        return;
    }
    v4 = this->m_kList.m_pkHead;
    v5 = (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&this->m_kList;
    if ( v4 )
    {
      while ( 1 )
      {
        v6 = &v4->m_element;
        v7 = (unsigned int)v4;
        v4 = v4->m_pkNext;
        if ( v3 == *v6 )
          break;
        if ( !v4 )
          goto LABEL_8;
      }
    }
    else
    {
LABEL_8:
      v7 = 0;
    }
    uiMsg = v7;
    if ( v7 )
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(v5, (void **)&uiMsg);
    operator delete(v3);
  }
}

//----- (0053D430) --------------------------------------------------------
void __thiscall std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~list<ItemViewDummy *,std::allocator<ItemViewDummy *>>(std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *this)
{
  std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *v1; // esi@1
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v2; // ecx@1
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v3; // eax@1
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v4; // edi@2

  v1 = this;
  v2 = this->_Myhead;
  v3 = v2->_Next;
  v2->_Next = v2;
  v1->_Myhead->_Prev = v1->_Myhead;
  v1->_Mysize = 0;
  if ( v3 != v1->_Myhead )
  {
    do
    {
      v4 = v3->_Next;
      operator delete(v3);
      v3 = v4;
    }
    while ( v4 != v1->_Myhead );
  }
  operator delete(v1->_Myhead);
}

//----- (0053D470) --------------------------------------------------------
KeyRemappingWin *__thiscall KeyRemappingWin::`vector deleting destructor'(KeyRemappingWin *this, unsigned int a2)
{
  KeyRemappingWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&KeyRemappingWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&KeyRemappingWin::`vftable'{for `IDirectMessenger'};
  if ( this->m_pkTabList._Myfirst )
    operator delete(this->m_pkTabList._Myfirst);
  v2->m_pkTabList._Myfirst = 0;
  v2->m_pkTabList._Mylast = 0;
  v2->m_pkTabList._Myend = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 992FE4: using guessed type void (__thiscall *KeyRemappingWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 993004: using guessed type int (__thiscall *KeyRemappingWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0053D4E0) --------------------------------------------------------
void __thiscall KQScoreWin::~KQScoreWin(KQScoreWin *this)
{
  KQScoreWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&KQScoreWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&KQScoreWin::`vftable'{for `IDirectMessenger'};
  `eh vector destructor iterator'(
    this->m_spScoreText,
    4u,
    2,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9932B0: using guessed type void (__thiscall *KQScoreWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9932CC: using guessed type int (__thiscall *KQScoreWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0053D560) --------------------------------------------------------
char __thiscall KQScoreWin::Create(KQScoreWin *this, PgFrameWork *pkFrameWork)
{
  KQScoreWin *v2; // edi@1
  NiTexturePalette *v3; // esi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  NiSourceTexture *v8; // eax@10
  PgWinSpr *v9; // eax@10
  PgWinSpr *v10; // eax@10
  D3DXCOLOR v11; // ST3C_16@10
  PgWinText *v12; // esi@10
  NiRefObjectVtbl *v13; // ebx@10
  PgFont *v14; // eax@10
  D3DXCOLOR v15; // ST3C_16@10
  PgWinText *v16; // esi@10
  NiRefObjectVtbl *v17; // ebx@10
  PgFont *v18; // eax@10
  PgWinSpr *v19; // eax@10
  PgWinSpr *v20; // eax@10
  D3DXCOLOR v21; // ST3C_16@10
  PgWinText *v22; // eax@10
  PgWinText *v23; // esi@10
  PgWinText *v24; // ebx@10
  NiRefObjectVtbl **v25; // ebx@17
  NiRefObjectVtbl *v26; // esi@17
  PgFont *v27; // eax@17
  D3DXCOLOR v28; // ST3C_16@17
  PgWinText *v29; // eax@17
  PgWinText *v30; // esi@17
  PgWinText *v31; // ebx@17
  NiRefObjectVtbl **v32; // ebx@24
  NiRefObjectVtbl *v33; // esi@24
  PgFont *v34; // eax@24
  NiNode *v35; // esi@25
  UIUtil ui; // [sp+60h] [bp-2Ch]@10
  int iLeft; // [sp+74h] [bp-18h]@1
  int iTop; // [sp+78h] [bp-14h]@1
  NiPointer<NiNode> spNode; // [sp+7Ch] [bp-10h]@1
  int v40; // [sp+88h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v40 = 0;
  iLeft = 0;
  iTop = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\KQScoreWin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iLeft, &iTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "KQScoreWin", 0) )
  {
    v6 = spNode.m_pObject;
    v40 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v40) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, 0, 0);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v8 = MenuTexMgr::GetTexture(0x13u);
  v9 = UIUtil::CreateSpr(&ui, "Theme", v8);
  v9->vfptr[60].__vecDelDtor((NiRefObject *)v9, 0);
  v10 = UIUtil::CreateSpr(&ui, "Panel02", 0);
  v10->vfptr[60].__vecDelDtor((NiRefObject *)v10, 0);
  *(_QWORD *)&v11.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v11.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v12 = UIUtil::CreateTextNoSpr(&ui, "Text01", "Team", v11, 5u);
  v13 = v12->vfptr;
  v14 = Font::Get(BOLD);
  v13[113].__vecDelDtor((NiRefObject *)v12, (unsigned int)v14);
  v12->vfptr[117].__vecDelDtor((NiRefObject *)v12, (unsigned int)&Color::m_kDxYellowColor);
  v12->vfptr[60].__vecDelDtor((NiRefObject *)v12, 0);
  *(_QWORD *)&v15.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v15.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v16 = UIUtil::CreateTextNoSpr(&ui, "Text02", "Score", v15, 5u);
  v17 = v16->vfptr;
  v18 = Font::Get(BOLD);
  v17[113].__vecDelDtor((NiRefObject *)v16, (unsigned int)v18);
  v16->vfptr[117].__vecDelDtor((NiRefObject *)v16, (unsigned int)&Color::m_kDxYellowColor);
  v16->vfptr[60].__vecDelDtor((NiRefObject *)v16, 0);
  v19 = UIUtil::CreateSpr(&ui, "GuildName01", 0);
  v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
  v20 = UIUtil::CreateSpr(&ui, "GuildName02", 0);
  v20->vfptr[60].__vecDelDtor((NiRefObject *)v20, 0);
  *(_QWORD *)&v21.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v21.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v22 = UIUtil::CreateTextNoSpr(&ui, "Score01", &byte_99324F, v21, 5u);
  v23 = v2->m_spScoreText[0].m_pObject;
  v24 = v22;
  if ( v23 != v22 )
  {
    if ( v23 && !InterlockedDecrement((volatile LONG *)&v23->m_uiRefCount) && v23 )
      v23->vfptr->__vecDelDtor((NiRefObject *)v23, 1u);
    v2->m_spScoreText[0].m_pObject = v24;
    if ( v24 )
      InterlockedIncrement((volatile LONG *)&v24->m_uiRefCount);
  }
  v25 = &v2->m_spScoreText[0].m_pObject->vfptr;
  v26 = *v25;
  v27 = Font::Get(BOLD);
  v26[113].__vecDelDtor((NiRefObject *)v25, (unsigned int)v27);
  ((void (__stdcall *)(D3DXCOLOR *))v2->m_spScoreText[0].m_pObject->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
  ((void (__stdcall *)(_DWORD))v2->m_spScoreText[0].m_pObject->vfptr[60].__vecDelDtor)(0);
  *(_QWORD *)&v28.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v28.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v29 = UIUtil::CreateTextNoSpr(&ui, "Score02", byte_993256, v28, 5u);
  v30 = v2->m_spScoreText[1].m_pObject;
  v31 = v29;
  if ( v30 != v29 )
  {
    if ( v30 && !InterlockedDecrement((volatile LONG *)&v30->m_uiRefCount) && v30 )
      v30->vfptr->__vecDelDtor((NiRefObject *)v30, 1u);
    v2->m_spScoreText[1].m_pObject = v31;
    if ( v31 )
      InterlockedIncrement((volatile LONG *)&v31->m_uiRefCount);
  }
  v32 = &v2->m_spScoreText[1].m_pObject->vfptr;
  v33 = *v32;
  v34 = Font::Get(BOLD);
  v33[113].__vecDelDtor((NiRefObject *)v32, (unsigned int)v34);
  ((void (__stdcall *)(struct D3DXCOLOR *))v2->m_spScoreText[1].m_pObject->vfptr[117].__vecDelDtor)(&Color::m_kDxBlueColor);
  ((void (__stdcall *)(_DWORD))v2->m_spScoreText[1].m_pObject->vfptr[60].__vecDelDtor)(0);
  ((void (__thiscall *)(KQScoreWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    1.0,
    0.5);
  LOBYTE(v40) = 0;
  UIUtil::~UIUtil(&ui);
  v40 = -1;
  if ( spNode.m_pObject )
  {
    v35 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v35 )
        v35->vfptr->__vecDelDtor((NiRefObject *)v35, 1u);
    }
  }
  return 1;
}
// A695F0: using guessed type struct D3DXCOLOR Color::m_kDxBlueColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0053D9D0) --------------------------------------------------------
void __thiscall KQScoreWin::SetScore(KQScoreWin *this, unsigned int uiTeam, unsigned int uiScore)
{
  PgWinText *v3; // esi@2
  NiRefObjectVtbl *v4; // edi@5
  char *v5; // eax@5

  if ( uiTeam < 2 )
  {
    v3 = this->m_spScoreText[uiTeam].m_pObject;
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
    if ( v3 )
    {
      v4 = v3->vfptr;
      v5 = fs("%d", uiScore);
      v4[118].__vecDelDtor((NiRefObject *)v3, (unsigned int)v5);
    }
    if ( v3 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
  }
}

//----- (0053DA80) --------------------------------------------------------
void __thiscall KQScoreWin::ResetScore(KQScoreWin *this)
{
  char *v1; // edi@1
  signed int v2; // ebx@1
  int v3; // esi@2

  v1 = (char *)this->m_spScoreText;
  v2 = 2;
  do
  {
    v3 = *(_DWORD *)v1;
    if ( *(_DWORD *)v1 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v3 + 4)) )
      {
        if ( v3 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v3)(v3, 1);
      }
      *(_DWORD *)v1 = 0;
    }
    v1 += 4;
    --v2;
  }
  while ( v2 );
}

//----- (0053DAD0) --------------------------------------------------------
void __thiscall KQScoreWin::KQScoreWin(KQScoreWin *this)
{
  KQScoreWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&KQScoreWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&KQScoreWin::`vftable'{for `IDirectMessenger'};
  `eh vector constructor iterator'(
    v1->m_spScoreText,
    4u,
    2,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  KQScoreWin::ResetScore(v1);
}
// 9932B0: using guessed type void (__thiscall *KQScoreWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9932CC: using guessed type int (__thiscall *KQScoreWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0053DB60) --------------------------------------------------------
KQScoreWin *__cdecl KQScoreWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  KQScoreWin *v2; // esi@1
  PgWin *v3; // edi@8
  KQScoreWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x160u);
  v2 = (KQScoreWin *)v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&KQScoreWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&KQScoreWin::`vftable'{for `IDirectMessenger'};
    `eh vector constructor iterator'(
      v2->m_spScoreText,
      4u,
      2,
      (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
      (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
    LOBYTE(v6) = 2;
    KQScoreWin::ResetScore(v2);
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 3;
  PgWinMgr::Add(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(KQScoreWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, (PgWin *)&v2->vfptr);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9932B0: using guessed type void (__thiscall *KQScoreWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9932CC: using guessed type int (__thiscall *KQScoreWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0053DCD0) --------------------------------------------------------
KQScoreWin *__thiscall KQScoreWin::`vector deleting destructor'(KQScoreWin *this, unsigned int a2)
{
  KQScoreWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&KQScoreWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&KQScoreWin::`vftable'{for `IDirectMessenger'};
  `eh vector destructor iterator'(
    this->m_spScoreText,
    4u,
    2,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9932B0: using guessed type void (__thiscall *KQScoreWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9932CC: using guessed type int (__thiscall *KQScoreWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0053DD60) --------------------------------------------------------
void __thiscall MainCharHPBarWin::MainCharHPBarWin(MainCharHPBarWin *this)
{
  MainCharHPBarWin *v1; // esi@1

  v1 = this;
  PgWinSpr::PgWinSpr((PgWinSpr *)&this->vfptr);
  v1->m_pkHPBarWin = 0;
  v1->m_bDrawTargetCharOption = 0;
  v1->m_pkLPBarBackWin = 0;
  v1->m_pkLPBarWin = 0;
  v1->vfptr = (NiRefObjectVtbl *)&MainCharHPBarWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MainCharHPBarWin::`vftable'{for `IDirectMessenger'};
  *(_WORD *)&v1->m_bIsMainCharHPBarWin = 1;
}
// 993540: using guessed type void (__thiscall *MainCharHPBarWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99355C: using guessed type int (__thiscall *MainCharHPBarWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0053DDA0) --------------------------------------------------------
void __thiscall MainCharHPBarWin::~MainCharHPBarWin(MainCharHPBarWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&MainCharHPBarWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MainCharHPBarWin::`vftable'{for `IDirectMessenger'};
  PgWinSpr::~PgWinSpr((PgWinSpr *)&this->vfptr);
}
// 993540: using guessed type void (__thiscall *MainCharHPBarWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99355C: using guessed type int (__thiscall *MainCharHPBarWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0053DDC0) --------------------------------------------------------
void __thiscall MainCharHPBarWin::SetMoveStop(MainCharHPBarWin *this, bool b)
{
  this->m_bMoveStop = b;
}

//----- (0053DDD0) --------------------------------------------------------
char __thiscall MainCharHPBarWin::Create(MainCharHPBarWin *this)
{
  MainCharHPBarWin *v1; // esi@1
  NiNode *v2; // esi@2
  LONG v3; // eax@3
  NiTexturePalette *v5; // edi@11
  const char *v6; // eax@13
  PgSprData *v7; // eax@14
  PgWinSpr *v8; // eax@14
  PgSprData *v9; // eax@14
  PgWinBar *v10; // eax@14
  PgSprData *v11; // ST1C_4@14
  int v12; // eax@14
  PgWinSpr *v13; // eax@14
  PgSprData *v14; // ST20_4@14
  int v15; // eax@14
  PgWinBar *v16; // eax@14
  PgSprData *v17; // ST1C_4@14
  int v18; // eax@14
  PgWinSpr *v19; // eax@14
  PgSprData *v20; // ST20_4@14
  int v21; // eax@14
  PgWinBar *v22; // eax@14
  NiRefObjectVtbl *v23; // edi@14
  int v24; // eax@14
  NiRefObjectVtbl *v25; // edi@14
  int v26; // eax@14
  NiNode *v27; // esi@15
  int uiLeft; // [sp+28h] [bp-18h]@14
  int uiTop; // [sp+2Ch] [bp-14h]@14
  NiPointer<NiNode> spNode; // [sp+30h] [bp-10h]@1
  int v31; // [sp+3Ch] [bp-4h]@1

  v1 = this;
  spNode.m_pObject = 0;
  v31 = 0;
  if ( !PgWin::Create((PgWin *)&this->vfptr, 0, 0, 1u, 1u, 0, 0, 0) )
  {
    v2 = spNode.m_pObject;
    v31 = -1;
    if ( spNode.m_pObject )
    {
      v3 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
      goto LABEL_4;
    }
    return 0;
  }
  if ( !MenuTexMgr::GetTexture(4u) )
  {
    v2 = spNode.m_pObject;
    v31 = -1;
    if ( spNode.m_pObject )
    {
      v3 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
LABEL_4:
      if ( !v3 )
      {
        if ( v2 )
          v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
      }
    }
    return 0;
  }
  v5 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = Folder::Merge(&Folder::m_acMenu, "Game\\PtyWin.nif");
  PgUtil::LoadNodeNifFile(v6, &spNode, v5);
  if ( !spNode.m_pObject )
    return 0;
  v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HPground01", &uiLeft, &uiTop, 0);
  v8 = PgWinSpr::CreateWin(0, 0, v7, (PgWin *)&v1->vfptr, 0, 0);
  v1->m_pkHPBarBackWin = v8;
  v8->vfptr[69].__vecDelDtor((NiRefObject *)v8, COERCE_UNSIGNED_INT(0.5));
  ((void (__stdcall *)(_DWORD))v1->m_pkHPBarBackWin->vfptr[60].__vecDelDtor)(0);
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_HP", &uiLeft, &uiTop, 0);
  v10 = PgWinBar::CreateWin(0, 0, v9, (PgWin *)&v1->vfptr, BGT_RIGHT);
  v1->m_pkHPBarWin = v10;
  v10->vfptr[60].__vecDelDtor((NiRefObject *)v10, 0);
  v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SPground01", &uiLeft, &uiTop, 0);
  v12 = ((int (*)(void))v1->m_pkHPBarWin->vfptr[37].__vecDelDtor)();
  v13 = PgWinSpr::CreateWin(0, v12, v11, (PgWin *)&v1->vfptr, 0, 0);
  v1->m_pkSPBarBackWin = v13;
  v13->vfptr[69].__vecDelDtor((NiRefObject *)v13, COERCE_UNSIGNED_INT(0.5));
  ((void (__stdcall *)(_DWORD))v1->m_pkSPBarBackWin->vfptr[60].__vecDelDtor)(0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_SP", &uiLeft, &uiTop, 0);
  v15 = ((int (*)(void))v1->m_pkHPBarWin->vfptr[37].__vecDelDtor)();
  v16 = PgWinBar::CreateWin(0, v15, v14, (PgWin *)&v1->vfptr, BGT_RIGHT);
  v1->m_pkSPBarWin = v16;
  v16->vfptr[60].__vecDelDtor((NiRefObject *)v16, 0);
  v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "LPground01", &uiLeft, &uiTop, 0);
  v18 = ((int (*)(void))v1->m_pkHPBarWin->vfptr[37].__vecDelDtor)();
  v19 = PgWinSpr::CreateWin(0, v18, v17, (PgWin *)&v1->vfptr, 0, 0);
  v1->m_pkLPBarBackWin = v19;
  v19->vfptr[69].__vecDelDtor((NiRefObject *)v19, COERCE_UNSIGNED_INT(0.5));
  ((void (__stdcall *)(_DWORD))v1->m_pkLPBarBackWin->vfptr[60].__vecDelDtor)(0);
  v20 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_LP", &uiLeft, &uiTop, 0);
  v21 = ((int (*)(void))v1->m_pkHPBarWin->vfptr[37].__vecDelDtor)();
  v22 = PgWinBar::CreateWin(0, v21, v20, (PgWin *)&v1->vfptr, BGT_RIGHT);
  v1->m_pkLPBarWin = v22;
  v22->vfptr[60].__vecDelDtor((NiRefObject *)v22, 0);
  v23 = v1->vfptr;
  v24 = ((int (*)(void))v1->m_pkHPBarWin->vfptr[36].__vecDelDtor)();
  v23[38].__vecDelDtor((NiRefObject *)v1, v24);
  v25 = v1->vfptr;
  v26 = ((int (*)(void))v1->m_pkHPBarWin->vfptr[37].__vecDelDtor)();
  v25[39].__vecDelDtor((NiRefObject *)v1, v26);
  v1->vfptr[60].__vecDelDtor((NiRefObject *)v1, 0);
  v31 = -1;
  if ( spNode.m_pObject )
  {
    v27 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v27 )
        v27->vfptr->__vecDelDtor((NiRefObject *)v27, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0053E140) --------------------------------------------------------
void __usercall MainCharHPBarWin::UpdatePosition(MainCharHPBarWin *this@<ecx>, int a2@<ebx>)
{
  MainCharHPBarWin *v2; // esi@1
  Char *v3; // ecx@3
  NiPoint3 *v4; // eax@2
  float v5; // ecx@6
  float v6; // edx@6
  _BYTE v7[12]; // ST0C_12@6
  float fScreenHeight; // ST08_4@6
  float fScreenWidth; // ST04_4@6
  Char *v10; // edi@10
  void *(__thiscall *v11)(NiRefObject *, unsigned int); // eax@14
  MainCharHPBarWin *v12; // ecx@14
  void *(__thiscall *v13)(NiRefObject *, unsigned int); // eax@18
  void *(__thiscall *v14)(NiRefObject *, unsigned int); // eax@18
  bool v15; // zf@18
  signed int v16; // [sp+14h] [bp-28h]@9
  NiPoint3 k2DOrthoPos; // [sp+20h] [bp-1Ch]@6
  NiPoint3 kWorldPos; // [sp+2Ch] [bp-10h]@2
  unsigned int v19; // [sp+38h] [bp-4h]@18

  v2 = this;
  if ( this->m_bIsMainCharHPBarWin )
  {
    v4 = Char::GetHeightPos(g_pkMainChar, a2, &kWorldPos);
    goto LABEL_6;
  }
  v3 = (Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1];
  if ( v3 && v3 != g_pkMainChar )
  {
    v4 = Char::GetHeightPos(v3, a2, &kWorldPos);
LABEL_6:
    v5 = v4->x;
    v6 = v4->y;
    kWorldPos.z = v4->z;
    kWorldPos.z = kWorldPos.z + 3.0;
    *(float *)v7 = v5;
    *(_QWORD *)&v7[4] = __PAIR__(LODWORD(kWorldPos.z), LODWORD(v6));
    fScreenHeight = (double)PgWin::ms_uiScreenHeight;
    fScreenWidth = (double)PgWin::ms_uiScreenWidth;
    if ( !PgUtil::Get2DOrthoPosFrom3DPos(pkWorldCamera, fScreenWidth, fScreenHeight, *(NiPoint3 *)v7, &k2DOrthoPos) )
    {
      v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 0);
      return;
    }
    if ( v2->m_bIsMainCharHPBarWin )
    {
      v16 = 1;
    }
    else
    {
      v10 = (Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1];
      if ( !v10 )
        goto LABEL_18;
      if ( ((int (__thiscall *)(unsigned int))v10->vfptr[2].~AbStateInfectee)(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1]) > 0
        && (unsigned __int8)((int (__thiscall *)(Char *))v10->vfptr[1].Affect)(v10)
        && !Char::IsNPC(v10) )
      {
        v11 = v2->vfptr[64].__vecDelDtor;
        v12 = v2;
        v16 = v2->m_bDrawTargetCharOption != 0;
LABEL_17:
        v11((NiRefObject *)&v12->vfptr, v16);
LABEL_18:
        v13 = v2->vfptr[36].__vecDelDtor;
        *(double *)&kWorldPos.y = k2DOrthoPos.x;
        v19 = (unsigned int)((int (__thiscall *)(MainCharHPBarWin *))v13)(v2) >> 1;
        v14 = v2->vfptr[37].__vecDelDtor;
        k2DOrthoPos.x = *(double *)&kWorldPos.y - (double)v19;
        *(double *)&kWorldPos.y = k2DOrthoPos.y;
        v19 = ((int (__thiscall *)(MainCharHPBarWin *))v14)(v2);
        v15 = v2->m_bMoveStop == 0;
        k2DOrthoPos.y = *(double *)&kWorldPos.y - (double)v19;
        if ( v15 )
          v2->vfptr[77].__vecDelDtor((NiRefObject *)v2, (signed int)(k2DOrthoPos.x + 0.5));
        return;
      }
      v16 = 0;
    }
    v11 = v2->vfptr[64].__vecDelDtor;
    v12 = v2;
    goto LABEL_17;
  }
}

//----- (0053E300) --------------------------------------------------------
void __thiscall MainCharHPBarWin::UpdateMeWin(MainCharHPBarWin *this, float fCurTime)
{
  MainCharHPBarWin *v2; // esi@1
  Mover *v3; // edi@2
  float v4; // ST08_4@20
  float fMaxVal; // ST04_4@20
  double v6; // st7@20
  float v7; // ST08_4@21
  float v8; // ST04_4@21
  float v9; // ST08_4@21
  float v10; // ST04_4@21
  PgWinBar *v11; // ecx@21
  Char *v12; // edi@22
  float v13; // ST04_4@24
  float v14; // ST00_4@24
  float v15; // ST04_4@24
  float v16; // ST04_4@26
  void *(__thiscall *v17)(NiRefObject *, unsigned int); // eax@26
  float fCurVal; // [sp+8h] [bp-10h]@20
  int v19; // [sp+Ch] [bp-Ch]@0

  v2 = this;
  if ( this->m_bIsMainCharHPBarWin )
  {
    v3 = g_pkMainChar->m_pkMover;
    if ( v3 && !Mover::IsSlotView(v3, g_pkMainChar->m_uiMoverSlot, 0) )
    {
      if ( v2->m_pkHPBarWin )
        ((void (__stdcall *)(_DWORD))v2->m_pkHPBarWin->vfptr[64].__vecDelDtor)(0);
      if ( v2->m_pkHPBarBackWin )
        ((void (__stdcall *)(_DWORD))v2->m_pkHPBarBackWin->vfptr[64].__vecDelDtor)(0);
      if ( v2->m_pkSPBarWin )
        ((void (__stdcall *)(_DWORD))v2->m_pkSPBarWin->vfptr[64].__vecDelDtor)(0);
      if ( v2->m_pkSPBarBackWin )
        ((void (__stdcall *)(_DWORD))v2->m_pkSPBarBackWin->vfptr[64].__vecDelDtor)(0);
      if ( v2->m_pkLPBarWin )
        ((void (__stdcall *)(_DWORD))v2->m_pkLPBarWin->vfptr[64].__vecDelDtor)(0);
      if ( v2->m_pkLPBarBackWin )
        ((void (__stdcall *)(_DWORD))v2->m_pkLPBarBackWin->vfptr[64].__vecDelDtor)(0);
      v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 0);
      return;
    }
    v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 1u);
    if ( !v3 || !Mover::IsAbility(v3) || g_pkMainChar->m_uiMoverSlot )
    {
      v7 = (double)(signed int)User::HP(&g_kUser);
      v8 = (double)(signed int)User::MaxHP(&g_kUser);
      PgWinBar::SetValue(v2->m_pkHPBarWin, v8, v7);
      v9 = (double)(signed int)User::SP(&g_kUser);
      v10 = (double)(signed int)User::MaxSP(&g_kUser);
      PgWinBar::SetValue(v2->m_pkSPBarWin, v10, v9);
      fCurVal = (double)(signed int)User::LP(&g_kUser);
      v6 = (double)(signed int)User::MaxLP(&g_kUser);
      v11 = v2->m_pkLPBarWin;
      goto LABEL_26;
    }
    v4 = (double)((int (__thiscall *)(Mover *))v3->vfptr[2].~AbStateInfectee)(v3);
    fMaxVal = (double)((int (__thiscall *)(Mover *))v3->vfptr[3].Deaffect)(v3);
    PgWinBar::SetValue(v2->m_pkHPBarWin, fMaxVal, v4);
    fCurVal = (double)((int (__thiscall *)(Mover *))v3->vfptr[3].SetAbStateProperty)(v3);
    v6 = (double)v3->vfptr[3].IsVisible((AbStateInfectee *)v3);
  }
  else
  {
    v12 = (Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1];
    if ( !v12 || v12 == g_pkMainChar )
    {
      ((void (__stdcall *)(_DWORD))this->vfptr[64].__vecDelDtor)(0);
      return;
    }
    LODWORD(fCurVal) = this->m_bDrawTargetCharOption != 0;
    ((void (*)(void))this->vfptr[64].__vecDelDtor)();
    v13 = (double)((int (__thiscall *)(Char *))v12->vfptr[2].~AbStateInfectee)(v12);
    v14 = (double)((int (__thiscall *)(Char *))v12->vfptr[3].Deaffect)(v12);
    PgWinBar::SetValue(v2->m_pkHPBarWin, v14, v13);
    v15 = (double)((int (__thiscall *)(Char *))v12->vfptr[3].SetAbStateProperty)(v12);
    v6 = (double)((int (__thiscall *)(Char *, _DWORD))v12->vfptr[3].IsVisible)(v12, LODWORD(v15));
  }
  v11 = v2->m_pkSPBarWin;
LABEL_26:
  v16 = v6;
  PgWinBar::SetValue(v11, v16, fCurVal);
  v17 = v2->m_pkHPBarWin->vfptr[64].__vecDelDtor;
  if ( byte_B4FF6B )
    ((void (__stdcall *)(signed int, int))v17)(1, v19);
  else
    ((void (__stdcall *)(_DWORD, int))v17)(0, v19);
  ((void (*)(void))v2->m_pkHPBarBackWin->vfptr[64].__vecDelDtor)();
  if ( byte_B4FF6C )
  {
    switch ( Char::GetClass(g_pkMainChar) )
    {
      case 0x1A:
      case 0x1B:
        ((void (__stdcall *)(signed int))v2->m_pkLPBarWin->vfptr[64].__vecDelDtor)(1);
        ((void (__stdcall *)(signed int))v2->m_pkLPBarBackWin->vfptr[64].__vecDelDtor)(1);
        ((void (__stdcall *)(_DWORD))v2->m_pkSPBarWin->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkSPBarBackWin->vfptr[64].__vecDelDtor)(0);
        break;
      default:
        ((void (__stdcall *)(_DWORD))v2->m_pkLPBarWin->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkLPBarBackWin->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(signed int))v2->m_pkSPBarWin->vfptr[64].__vecDelDtor)(1);
        ((void (__stdcall *)(signed int))v2->m_pkSPBarBackWin->vfptr[64].__vecDelDtor)(1);
        break;
    }
  }
  else
  {
    ((void (__stdcall *)(_DWORD))v2->m_pkSPBarWin->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkSPBarBackWin->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkLPBarWin->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkLPBarBackWin->vfptr[64].__vecDelDtor)(0);
  }
}
// B4FF6B: using guessed type char byte_B4FF6B;
// B4FF6C: using guessed type char byte_B4FF6C;

//----- (0053E730) --------------------------------------------------------
MainCharHPBarWin *__cdecl MainCharHPBarWin::CreateWin()
{
  PgWin *v0; // eax@1
  PgWin *v1; // esi@1
  PgWin *v2; // edi@8
  MainCharHPBarWin *v3; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v5; // [sp+20h] [bp-4h]@1

  v0 = (PgWin *)operator new(0x148u);
  v1 = v0;
  result.m_pObject = v0;
  v5 = 0;
  if ( v0 )
  {
    PgWinSpr::PgWinSpr((PgWinSpr *)v0);
    v1->vfptr = (NiRefObjectVtbl *)&MainCharHPBarWin::`vftable'{for `NiNode'};
    v1->vfptr = (IDirectMessengerVtbl *)&MainCharHPBarWin::`vftable'{for `IDirectMessenger'};
    v1[1].m_spControllers.m_pObject = 0;
    LOBYTE(v1[1].m_pcName) = 0;
    LOWORD(v1[1].m_kWorldBound.m_kCenter.x) = 1;
    v1[1].m_pkParent = 0;
    *(_DWORD *)&v1[1].m_uFlags = 0;
  }
  else
  {
    v1 = 0;
  }
  if ( v1 )
    InterlockedIncrement((volatile LONG *)&v1->m_uiRefCount);
  v5 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v1);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *))v1->vfptr[129].__vecDelDtor)(v1) )
  {
    ((void (__thiscall *)(PgWin *))v1->vfptr[89].__vecDelDtor)(v1);
    v5 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
      v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
    v3 = (MainCharHPBarWin *)v1;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v1);
    if ( result.m_pObject )
    {
      v2 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v2 )
          v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
      }
    }
    v5 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
      v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
    v3 = 0;
  }
  return v3;
}
// 993540: using guessed type void (__thiscall *MainCharHPBarWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99355C: using guessed type int (__thiscall *MainCharHPBarWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0053E890) --------------------------------------------------------
MainCharHPBarWin *__thiscall MainCharHPBarWin::`scalar deleting destructor'(MainCharHPBarWin *this, unsigned int a2)
{
  MainCharHPBarWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&MainCharHPBarWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MainCharHPBarWin::`vftable'{for `IDirectMessenger'};
  PgWinSpr::~PgWinSpr((PgWinSpr *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 993540: using guessed type void (__thiscall *MainCharHPBarWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99355C: using guessed type int (__thiscall *MainCharHPBarWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0053E8D0) --------------------------------------------------------
void __thiscall MainMenuWin::OnCmdChar(MainMenuWin *this)
{
  PgFrameWork *v1; // ecx@1

  v1 = this->m_pkFrameWork;
  if ( v1 )
    PgFrameWork::AddMsg(v1, 0xCu, 0, 0);
}

//----- (0053E8F0) --------------------------------------------------------
void __thiscall MainMenuWin::OnCmdInven(MainMenuWin *this)
{
  PgFrameWork *v1; // ecx@1

  v1 = this->m_pkFrameWork;
  if ( v1 )
    PgFrameWork::AddMsg(v1, 0xDu, 0, 0);
}

//----- (0053E910) --------------------------------------------------------
void __thiscall MainMenuWin::OnCmdSkill(MainMenuWin *this)
{
  PgFrameWork *v1; // ecx@1

  v1 = this->m_pkFrameWork;
  if ( v1 )
    PgFrameWork::AddMsg(v1, 0xEu, 0, 0);
}

//----- (0053E930) --------------------------------------------------------
void __thiscall MainMenuWin::OnCmdAction(MainMenuWin *this)
{
  PgFrameWork *v1; // ecx@1

  v1 = this->m_pkFrameWork;
  if ( v1 )
    PgFrameWork::AddMsg(v1, 0xFu, 0, 0);
}

//----- (0053E950) --------------------------------------------------------
void __thiscall MainMenuWin::OnCmdQuest(MainMenuWin *this)
{
  PgFrameWork *v1; // ecx@1

  v1 = this->m_pkFrameWork;
  if ( v1 )
    PgFrameWork::AddMsg(v1, 0x10u, 0, 0);
}

//----- (0053E970) --------------------------------------------------------
void __thiscall MainMenuWin::OnCmdFriend(MainMenuWin *this)
{
  PgFrameWork *v1; // ecx@1

  v1 = this->m_pkFrameWork;
  if ( v1 )
    PgFrameWork::AddMsg(v1, 0x12u, 0, 0);
}

//----- (0053E9A0) --------------------------------------------------------
void __thiscall MainMenuWin::OnCmdMiniHouse(MainMenuWin *this)
{
  PgFrameWork *v1; // ecx@1

  v1 = this->m_pkFrameWork;
  if ( v1 )
    PgFrameWork::AddMsg(v1, 0x13u, 0, 0);
}

//----- (0053E9C0) --------------------------------------------------------
void __thiscall MainMenuWin::OnCmdForum(MainMenuWin *this)
{
  PgFrameWork *v1; // ecx@1

  v1 = this->m_pkFrameWork;
  if ( v1 )
    PgFrameWork::AddMsg(v1, 0x15u, 0, 0);
}

//----- (0053E9E0) --------------------------------------------------------
void __thiscall MainMenuWin::OnCmdItemMall(MainMenuWin *this)
{
  PgFrameWork *v1; // ecx@1

  v1 = this->m_pkFrameWork;
  if ( v1 )
    PgFrameWork::AddMsg(v1, 0x14u, 0, 0);
}

//----- (0053EA00) --------------------------------------------------------
void __thiscall MainMenuWin::OnCmdSystem(MainMenuWin *this)
{
  PgFrameWork *v1; // ecx@1

  v1 = this->m_pkFrameWork;
  if ( v1 )
    PgFrameWork::AddMsg(v1, 0x16u, 0, 0);
}

//----- (0053EA20) --------------------------------------------------------
void __thiscall MainMenuWin::OnCmdHelp(MainMenuWin *this)
{
  PgFrameWork *v1; // ecx@1

  v1 = this->m_pkFrameWork;
  if ( v1 )
    PgFrameWork::AddMsg(v1, 0x11u, 0, 0);
}

//----- (0053EA40) --------------------------------------------------------
void __thiscall MainMenuWin::SetMainButToolTip(MainMenuWin *this, unsigned int uiMenu, char *pkStr)
{
  PgWin::SetToolTipWinText((PgWin *)&this->m_pkBut[uiMenu]->vfptr, pkStr);
}

//----- (0053EA60) --------------------------------------------------------
void __thiscall MainMenuWin::SetBlinkEffect(MainMenuWin *this, bool bActive, int iBlinkSlotType)
{
  MainMenuWin *v3; // ebx@1
  char *v4; // esi@1
  signed int v5; // edi@1
  double v6; // st7@3
  float bActivea; // [sp+18h] [bp+8h]@5

  v3 = this;
  this->m_bBlinkEffect = bActive;
  this->m_iBlinkSlotType = iBlinkSlotType;
  v4 = (char *)this->m_pkBut;
  v5 = 13;
  do
  {
    if ( v3->m_bBlinkEffect )
      v6 = 0.30000001;
    else
      v6 = 1.0;
    bActivea = v6;
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 276))(LODWORD(bActivea));
    v4 += 4;
    --v5;
  }
  while ( v5 );
}

//----- (0053EAC0) --------------------------------------------------------
void __thiscall MainMenuWin::ShowNewMark(MainMenuWin *this, int bShow)
{
  ((void (__stdcall *)(_DWORD))this->m_pkNewItem->vfptr[64].__vecDelDtor)(bShow);
}

//----- (0053EAE0) --------------------------------------------------------
void __thiscall MainMenuWin::~MainMenuWin(MainMenuWin *this)
{
  MainMenuWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&MainMenuWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MainMenuWin::`vftable'{for `IDirectMessenger'};
  `eh vector destructor iterator'(
    this->m_aspEffectNode,
    4u,
    13,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_kEffectManager,
    0x68u,
    13,
    (void (__thiscall *)(void *))MainMenuWin::_unnamed_type_m_kEffectManager_::~_unnamed_type_m_kEffectManager_);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 993BC0: using guessed type void (__thiscall *MainMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 993BDC: using guessed type int (__thiscall *MainMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0053EB70) --------------------------------------------------------
NiProperty *__cdecl GetMaterialProp(NiNode *pkMtrlNode, char *pcName)
{
  NiAVObject *v2; // eax@1

  v2 = (NiAVObject *)((int (__stdcall *)(_DWORD))pkMtrlNode->vfptr[18].__vecDelDtor)(pcName);
  return NiAVObject::GetProperty(v2, 3);
}

//----- (0053EB90) --------------------------------------------------------
void __thiscall MainMenuWin::ChangeMenuTab(MainMenuWin *this)
{
  MainMenuWin *v1; // esi@1
  MainMenuWin::MENU_TAB_MODE v2; // eax@1
  int v3; // eax@2
  MainMenuWin::MENU_TAB_MODE v4; // eax@7
  int v5; // eax@8
  int v6; // edi@10
  PgWinButExt *v7; // edi@12
  int v8; // ebx@12
  int v9; // edi@12
  int v10; // ebx@12
  int v11; // edi@12
  PgWinButExt *v12; // eax@12
  PgWinButExt *v13; // edi@13
  int v14; // ebx@13
  signed int v15; // edi@13
  int v16; // ebx@16
  int v17; // ST14_4@16
  PgWinButExt *v18; // eax@16
  char *v19; // edi@19
  int v20; // ebx@20
  int v21; // ST14_4@20
  int v22; // eax@20
  int posY; // [sp+Ch] [bp-8h]@10
  int offsetX; // [sp+10h] [bp-4h]@13
  int offsetXa; // [sp+10h] [bp-4h]@19

  v1 = this;
  v2 = this->m_tab;
  if ( v2 )
  {
    v3 = v2 - 1;
    if ( v3 )
    {
      if ( v3 == 1 )
        this->m_tab = 0;
    }
    else
    {
      this->m_tab = 2;
    }
  }
  else
  {
    this->m_tab = 1;
  }
  v4 = this->m_tab;
  if ( v4 == PGWM_TAB_0 )
  {
    v19 = (char *)this->m_pkBut;
    offsetXa = 13;
    do
    {
      v20 = *(_DWORD *)(*(_DWORD *)v19 + 340);
      v21 = *(_DWORD *)(*(_DWORD *)v19 + 344);
      (*(void (__stdcall **)(_DWORD, _DWORD))(**(_DWORD **)v19 + 308))(
        *(_DWORD *)(*(_DWORD *)v19 + 340),
        *(_DWORD *)(*(_DWORD *)v19 + 344));
      v22 = *(_DWORD *)v19;
      *(_DWORD *)(v22 + 348) = v20;
      *(_DWORD *)(v22 + 352) = v21;
      (*(void (__stdcall **)(signed int))(**(_DWORD **)v19 + 256))(1);
      v19 += 4;
      --offsetXa;
    }
    while ( offsetXa );
LABEL_21:
    v1->m_pkBut[12]->vfptr[64].__vecDelDtor((NiRefObject *)v1->m_pkBut[12], 0);
    return;
  }
  v5 = v4 - 1;
  if ( !v5 )
  {
    ((void (__stdcall *)(signed int))this->m_pkBut[0]->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v1->m_pkBut[1]->vfptr[64].__vecDelDtor)(0);
    v13 = v1->m_pkBut[2];
    v14 = ((int (*)(void))v1->m_pkBut[1]->vfptr[48].__vecDelDtor)();
    offsetX = ((int (__thiscall *)(PgWinButExt *))v13->vfptr[48].__vecDelDtor)(v13) - v14;
    v15 = 2;
    do
    {
      if ( v15 == 4 )
      {
        offsetX -= ((int (*)(void))v1->m_pkBut[4]->vfptr[36].__vecDelDtor)();
        ((void (__stdcall *)(_DWORD))v1->m_pkBut[4]->vfptr[64].__vecDelDtor)(0);
      }
      else
      {
        v16 = ((int (*)(void))v1->m_pkBut[v15]->vfptr[48].__vecDelDtor)() - offsetX;
        v17 = ((int (*)(void))v1->m_pkBut[v15]->vfptr[50].__vecDelDtor)();
        ((void (__stdcall *)(int, int))v1->m_pkBut[v15]->vfptr[77].__vecDelDtor)(v16, v17);
        v18 = v1->m_pkBut[v15];
        v18->defaultPosX = v16;
        v18->defaultPosY = v17;
        ((void (__stdcall *)(signed int))v1->m_pkBut[v15]->vfptr[64].__vecDelDtor)(1);
      }
      ++v15;
    }
    while ( v15 < 13 );
    goto LABEL_21;
  }
  if ( v5 == 1 )
  {
    ((void (__stdcall *)(signed int))this->m_pkBut[0]->vfptr[64].__vecDelDtor)(1);
    v6 = (int)&v1->m_pkBut[1];
    posY = 12;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v6 + 256))(0);
      v6 += 4;
      --posY;
    }
    while ( posY );
    v7 = v1->m_pkBut[12];
    v8 = ((int (*)(void))v1->m_pkBut[1]->vfptr[48].__vecDelDtor)();
    v9 = v1->maxButOffset + ((int (__thiscall *)(PgWinButExt *))v7->vfptr[48].__vecDelDtor)(v7) - v8;
    v10 = ((int (*)(void))v1->m_pkBut[12]->vfptr[48].__vecDelDtor)() - v9;
    v11 = ((int (*)(void))v1->m_pkBut[12]->vfptr[50].__vecDelDtor)();
    ((void (__stdcall *)(int, int))v1->m_pkBut[12]->vfptr[77].__vecDelDtor)(v10, v11);
    v12 = v1->m_pkBut[12];
    v12->defaultPosX = v10;
    v12->defaultPosY = v11;
    v1->m_pkBut[12]->vfptr[64].__vecDelDtor((NiRefObject *)v1->m_pkBut[12], 1u);
  }
}

//----- (0053EE10) --------------------------------------------------------
void __thiscall MainMenuWin::ProcessMeInput(MainMenuWin *this, bool *bHit)
{
  MainMenuWin *v2; // esi@1

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[78].__vecDelDtor)() )
  {
    if ( dword_B64790 )
      ++dword_B64790;
    PgWinFrame::ProcessMeInput((PgWinFrame *)&v2->vfptr, bHit);
    byte_B6478C = 0;
    if ( dword_B64790 )
      --dword_B64790;
  }
}
// B6478C: using guessed type char byte_B6478C;
// B64790: using guessed type int dword_B64790;

//----- (0053EE80) --------------------------------------------------------
void __thiscall MainMenuWin::StartParticle(MainMenuWin *this, int iIndex)
{
  MainMenuWin *v2; // edi@1
  NiNode *v3; // eax@1
  char *v4; // esi@2
  NiObjectNET *v5; // edx@2

  v2 = this;
  v3 = this->m_aspEffectNode[iIndex].m_pObject;
  if ( v3 )
  {
    v4 = (char *)this + 104 * iIndex;
    NsEffect::SetEffectNode((NsEffect *)(v4 + 408), (NiAVObject *)&v3->vfptr);
    NsEffect::Start((NsEffect *)(v4 + 408), Timer::ms_fCurTime);
    *((float *)v4 + 99) = *((float *)v4 + 105);
    CNSTimer_MarkCheck::ReSet((CNSTimer_MarkCheck *)v4 + 16, Timer::ms_fCurTime, OVER);
    v5 = (NiObjectNET *)*((_DWORD *)v4 + 114);
    v4[444] = 1;
    NiTimeController::StartAnimations(v5, Timer::ms_fCurTime);
    ((void (__stdcall *)(_DWORD, _DWORD))v2->m_pkBut[iIndex]->vfptr[29].__vecDelDtor)(
      v2->m_aspEffectNode[iIndex].m_pObject,
      1);
    ((void (__stdcall *)(_DWORD, _DWORD))v2->m_pkBut[iIndex]->vfptr[29].__vecDelDtor)(*((_DWORD *)v4 + 114), 0);
    NiAVObject::UpdateProperties((NiAVObject *)&v2->m_pkBut[iIndex]->vfptr);
    NiAVObject::UpdateEffects((NiAVObject *)&v2->m_pkBut[iIndex]->vfptr);
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0053EF60) --------------------------------------------------------
void __usercall MainMenuWin::UpdateBlinkEffect(MainMenuWin *this@<ecx>, double a2@<st0>)
{
  MainMenuWin *v2; // esi@1
  int v3; // eax@2
  double v4; // st6@5
  float v5; // ST08_4@6
  double v6; // st7@8
  float v7; // ST08_4@10
  float v8; // ST00_4@14
  float fBlinkAlpha; // [sp+8h] [bp-4h]@4

  v2 = this;
  if ( this->m_bBlinkEffect )
  {
    v3 = this->m_iBlinkSlotType;
    if ( v3 >= 0 && v3 < 13 )
    {
      ((void (*)(void))this->m_pkBut[v3]->vfptr[70].__vecDelDtor)();
      fBlinkAlpha = a2;
      if ( v2->m_bBlinkActive )
      {
        v4 = fBlinkAlpha;
        if ( fBlinkAlpha >= 0.5 )
        {
          v5 = v4 - Timer::ms_fDeltaTime;
          v4 = v5;
        }
        if ( v4 <= 0.5 )
        {
          v2->m_bBlinkActive = 0;
          v6 = (float)0.5;
LABEL_14:
          v8 = v6;
          ((void (__stdcall *)(_DWORD))v2->m_pkBut[v2->m_iBlinkSlotType]->vfptr[69].__vecDelDtor)(LODWORD(v8));
          return;
        }
      }
      else
      {
        v4 = fBlinkAlpha;
        if ( fBlinkAlpha <= 1.0 )
        {
          v7 = v4 + Timer::ms_fDeltaTime;
          v4 = v7;
        }
        if ( v4 >= 1.0 )
        {
          v2->m_bBlinkActive = 1;
          v6 = (float)1.0;
          goto LABEL_14;
        }
      }
      v6 = v4;
      goto LABEL_14;
    }
    this->m_bBlinkEffect = 0;
  }
}
// A8B980: using guessed type float Timer::ms_fDeltaTime;

//----- (0053F050) --------------------------------------------------------
char __thiscall MainMenuWin::Create(MainMenuWin *this, PgFrameWork *pkFrameWork)
{
  MainMenuWin *v2; // esi@1
  NiNode *v3; // edi@1
  NiTexturePalette *v5; // ebx@7
  const char *v6; // eax@9
  NiNode *v7; // esi@11
  NiTexturePalette *v8; // ebx@16
  const char *v9; // eax@18
  unsigned int v10; // ebx@21
  PgSprData *v11; // edi@23
  PgWinProxy *v12; // eax@23
  char *v13; // eax@23
  PgWinButExt *v14; // eax@23
  PgWinButExt *v15; // eax@23
  int v16; // eax@23
  PgWinButExt *v17; // edx@23
  int v18; // edi@23
  PgWinProxy *v19; // eax@23
  char *v20; // eax@23
  PgWinButExt *v21; // ecx@23
  unsigned int v22; // eax@23
  PgWinButExt *v23; // ecx@23
  unsigned int v24; // eax@23
  int v25; // ecx@23
  PgWinButExt *v26; // edx@23
  int v27; // edi@23
  PgWinProxy *v28; // eax@23
  PgSprData *v29; // ST34_4@23
  int v30; // ST30_4@23
  char *v31; // eax@23
  PgWinButExt *v32; // ecx@23
  unsigned int v33; // eax@23
  PgWinButExt *v34; // ecx@23
  unsigned int v35; // eax@23
  int v36; // eax@23
  PgWinButExt *v37; // edx@23
  int v38; // edi@23
  PgWinProxy *v39; // eax@23
  char *v40; // eax@23
  PgWinButExt *v41; // ecx@23
  PgWinButExt *v42; // ecx@23
  unsigned int v43; // eax@23
  int v44; // ecx@23
  PgWinButExt *v45; // edx@23
  int v46; // edi@23
  PgWinProxy *v47; // eax@23
  PgSprData *v48; // ST34_4@23
  int v49; // ST30_4@23
  char *v50; // eax@23
  PgWinButExt *v51; // ecx@23
  unsigned int v52; // eax@23
  PgWinButExt *v53; // ecx@23
  unsigned int v54; // eax@23
  int v55; // eax@23
  PgWinButExt *v56; // edx@23
  int v57; // edi@23
  PgWinProxy *v58; // eax@23
  char *v59; // eax@23
  PgWinButExt *v60; // ecx@23
  unsigned int v61; // eax@23
  PgWinButExt *v62; // ecx@23
  unsigned int v63; // eax@23
  int v64; // ecx@23
  PgWinButExt *v65; // edx@23
  PgFrameWork *v66; // edi@23
  PgWinProxy *v67; // eax@23
  PgSprData *v68; // ST34_4@23
  int v69; // ST30_4@23
  char *v70; // eax@23
  PgWinButExt *v71; // ecx@23
  unsigned int v72; // eax@23
  PgWinButExt *v73; // ecx@23
  unsigned int v74; // eax@23
  int v75; // ecx@23
  PgWinButExt *v76; // edx@23
  int v77; // edi@23
  PgSprData *v78; // eax@23
  PgWinSpr *v79; // eax@23
  PgWinProxy *v80; // eax@23
  char *v81; // eax@23
  PgWinButExt *v82; // ecx@23
  unsigned int v83; // eax@23
  PgWinButExt *v84; // ecx@23
  unsigned int v85; // eax@23
  int v86; // eax@23
  PgWinButExt *v87; // edx@23
  int v88; // edi@23
  PgWinProxy *v89; // eax@23
  PgSprData *v90; // ST34_4@23
  int v91; // ST30_4@23
  char *v92; // eax@23
  PgWinButExt *v93; // ecx@23
  unsigned int v94; // eax@23
  PgWinButExt *v95; // ecx@23
  int v96; // eax@23
  PgWinButExt *v97; // edx@23
  int v98; // edi@23
  PgWinProxy *v99; // eax@23
  char *v100; // eax@23
  PgWinButExt *v101; // ecx@23
  unsigned int v102; // eax@23
  PgWinButExt *v103; // ecx@23
  unsigned int v104; // eax@23
  int v105; // ecx@23
  PgWinButExt *v106; // edx@23
  int v107; // edi@23
  PgWinProxy *v108; // eax@23
  PgSprData *v109; // ST34_4@23
  int v110; // ST30_4@23
  char *v111; // eax@23
  PgWinButExt *v112; // ecx@23
  unsigned int v113; // eax@23
  PgWinButExt *v114; // ecx@23
  unsigned int v115; // eax@23
  int v116; // eax@23
  PgWinButExt *v117; // edx@23
  int v118; // edi@23
  int v119; // edi@23
  PgWinButExt *v120; // eax@23
  PgWinButExt *v121; // ecx@23
  unsigned int v122; // eax@23
  PgWinButExt *v123; // ecx@23
  unsigned int v124; // eax@23
  int v125; // eax@23
  PgWinButExt *v126; // edx@23
  PgSprData *v127; // ecx@23
  PgWinButExt *v128; // eax@23
  PgWinButExt *v129; // ecx@23
  unsigned int v130; // eax@23
  unsigned int v131; // ebx@23
  PgWinButExt *v132; // eax@23
  int v133; // eax@23
  PgWinButExt *v134; // edx@23
  char *v135; // eax@23
  char *v136; // eax@23
  int v137; // edx@23
  void *(__thiscall *v138)(NiRefObject *, unsigned int); // eax@23
  char *v139; // eax@23
  const char *v140; // eax@23
  NiNode *v141; // eax@23
  NiNode *v142; // edi@23
  NiShader *v143; // eax@26
  NiD3DDefaultShader *v144; // eax@26
  NiNode *v145; // eax@26
  float kPos; // ST5C_4@26
  float v147; // ecx@26
  PgFrameWork *fY; // ST48_4@26
  NiShader *v149; // eax@26
  NiD3DDefaultShader *v150; // eax@26
  NiNode *v151; // eax@26
  float v152; // ST5C_4@26
  float v153; // ecx@26
  PgFrameWork *v154; // ST48_4@26
  NiShader *v155; // eax@26
  NiD3DDefaultShader *v156; // eax@26
  NiNode *v157; // eax@26
  float v158; // ST5C_4@26
  float kPos_8; // ST64_4@26
  PgFrameWork *v160; // ST48_4@26
  NiShader *v161; // eax@26
  NiD3DDefaultShader *v162; // eax@26
  NiNode *v163; // eax@26
  float v164; // ST5C_4@26
  float v165; // ecx@26
  PgFrameWork *v166; // ST48_4@26
  NiShader *v167; // eax@26
  NiD3DDefaultShader *v168; // eax@26
  NiNode *v169; // eax@26
  float v170; // ST5C_4@26
  float v171; // ecx@26
  PgFrameWork *v172; // ST48_4@26
  NiShader *v173; // eax@26
  NiD3DDefaultShader *v174; // eax@26
  NiNode *v175; // eax@26
  float v176; // ST5C_4@26
  float v177; // ecx@26
  PgFrameWork *v178; // ST48_4@26
  NiShader *v179; // eax@26
  NiD3DDefaultShader *v180; // eax@26
  NiNode *v181; // eax@26
  float v182; // ST5C_4@26
  float v183; // ecx@26
  PgFrameWork *v184; // ST48_4@26
  NiShader *v185; // eax@26
  NiObject *v186; // eax@26
  NiD3DDefaultShader *v187; // eax@26
  NiNode *v188; // eax@26
  float v189; // ST5C_4@26
  float v190; // ecx@26
  PgFrameWork *v191; // ST48_4@26
  NiShader *v192; // eax@26
  NiD3DDefaultShader *v193; // eax@26
  NiNode *v194; // eax@26
  float v195; // ST5C_4@26
  float v196; // ecx@26
  PgFrameWork *v197; // ST48_4@26
  NiShader *v198; // eax@26
  NiD3DDefaultShader *v199; // eax@26
  NiNode *v200; // eax@26
  float v201; // ST5C_4@26
  float v202; // ecx@26
  PgFrameWork *v203; // ST48_4@26
  NiShader *v204; // eax@26
  NiObject *v205; // eax@26
  NiD3DDefaultShader *v206; // eax@26
  NiNode *v207; // eax@26
  float v208; // ST64_4@26
  void *(__thiscall *v209)(NiRefObject *, unsigned int); // eax@26
  NiObjectNET *v210; // eax@26
  NiD3DDefaultShader *v211; // eax@26
  NiObject *v212; // ebx@26
  NiPointer<NiD3DDefaultShader> *v213; // esi@29
  NiNode *v214; // eax@31
  NiD3DDefaultShader *v215; // eax@32
  NiD3DDefaultShader *v216; // eax@34
  NiSourceTexture *pkAddedTexture; // [sp+64h] [bp-54h]@10
  int ForumLeft; // [sp+68h] [bp-50h]@23
  int ForumTop; // [sp+6Ch] [bp-4Ch]@23
  NiSourceTexture *pkTextureForum; // [sp+70h] [bp-48h]@19
  int fixTop; // [sp+74h] [bp-44h]@21
  NiPointer<NiNode> spParticle; // [sp+78h] [bp-40h]@1
  NiPointer<NiNode> spAddedNode; // [sp+7Ch] [bp-3Ch]@16
  int uiTop; // [sp+80h] [bp-38h]@23
  unsigned int hilWidth; // [sp+84h] [bp-34h]@23
  unsigned int hilHeight; // [sp+88h] [bp-30h]@23
  unsigned int norWidth; // [sp+8Ch] [bp-2Ch]@21
  int norLeft; // [sp+90h] [bp-28h]@21
  int hilLeft; // [sp+94h] [bp-24h]@23
  int hilTop; // [sp+98h] [bp-20h]@23
  int norTop; // [sp+9Ch] [bp-1Ch]@21
  int uiLeft; // [sp+A0h] [bp-18h]@23
  unsigned int norHeight; // [sp+A4h] [bp-14h]@21
  NiPointer<NiNode> spNode; // [sp+A8h] [bp-10h]@1
  int v235; // [sp+B4h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v235 = 0;
  v3 = (NiNode *)MenuTexMgr::GetTexture(4u);
  spParticle.m_pObject = v3;
  if ( !v3 )
  {
    v235 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( spNode.m_pObject )
        spNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spNode.m_pObject, 1u);
    }
    return 0;
  }
  v5 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = Folder::Merge(&Folder::m_acMenu, "Game\\Menu.nif");
  PgUtil::LoadNodeNifFile(v6, &spNode, v5);
  if ( !spNode.m_pObject )
    return 0;
  pkAddedTexture = MenuTexMgr::GetTexture(0x12u);
  if ( pkAddedTexture )
  {
    spAddedNode.m_pObject = 0;
    v8 = pTexturePalette;
    LOBYTE(v235) = 1;
    if ( !Folder::m_bInit )
      Folder::Init();
    v9 = Folder::Merge(&Folder::m_acMenu, "Game\\Menu01.nif");
    PgUtil::LoadNodeNifFile(v9, &spAddedNode, v8);
    if ( !spAddedNode.m_pObject )
      goto LABEL_28;
    pkTextureForum = MenuTexMgr::GetTexture(0x1Fu);
    if ( !pkTextureForum || !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, 0, pkFrameWork, "MainMenuWin", 0) )
      goto LABEL_28;
    v10 = 0;
    fixTop = 0;
    if ( PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "SystemNor",
           &norLeft,
           &norTop,
           &norWidth,
           &norHeight) )
    {
      v10 = norHeight;
      fixTop = norTop;
    }
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "SystemOver",
      &hilLeft,
      &hilTop,
      &hilWidth,
      &hilHeight);
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SystemNor", &uiLeft, &uiTop, (NiSourceTexture *)v3);
    PgSprData::Add(v11, (NiAVObject *)&spNode.m_pObject->vfptr, "SystemNor");
    PgSprData::Add(v11, (NiAVObject *)&spNode.m_pObject->vfptr, "SystemOver");
    v12 = PgWinProxy::CreateWin((PgWin *)&v2->vfptr);
    v2->m_kEffectManager[0].pkProxy = (PgWin *)v12;
    v2->m_pkBut[0] = PgWinButExt::CreateWin(0, 0, v11, (PgWin *)&v12->vfptr, 0, 0, 0);
    v13 = (char *)TextData::Get(0xF3F7FCFE);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkBut[0]->vfptr, v13);
    v2->m_pkBut[0]->m_pkToolTipWin = g_pkToolTipWin;
    v2->m_pkBut[0]->m_bMainBtnMode = 1;
    v14 = v2->m_pkBut[0];
    v14->firstPosX = 0;
    v14->firstPosY = 0;
    v15 = v2->m_pkBut[0];
    v15->defaultPosX = 0;
    v15->defaultPosY = 0;
    v16 = hilTop - norTop;
    v17 = v2->m_pkBut[0];
    v17->hilOffsetX = hilLeft - norLeft;
    v17->hilOffsetY = v16;
    v18 = uiLeft;
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "MiniHouseNor",
      &norLeft,
      &norTop,
      &norWidth,
      &norHeight);
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "MiniHouseOver",
      &hilLeft,
      &hilTop,
      &hilWidth,
      &hilHeight);
    *(float *)&pkFrameWork = COERCE_FLOAT(PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MiniHouseNor", &uiLeft, &uiTop, (NiSourceTexture *)spParticle.m_pObject));
    PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "MiniHouseNor");
    PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "MiniHouseOver");
    v19 = PgWinProxy::CreateWin((PgWin *)&v2->vfptr);
    v2->m_kEffectManager[1].pkProxy = (PgWin *)v19;
    v2->m_pkBut[1] = PgWinButExt::CreateWin(
                       v18,
                       v10 - norHeight,
                       (PgSprData *)pkFrameWork,
                       (PgWin *)&v19->vfptr,
                       1u,
                       0,
                       0);
    v20 = (char *)TextData::Get(0xE539444E);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkBut[1]->vfptr, v20);
    v2->m_pkBut[1]->m_pkToolTipWin = g_pkToolTipWin;
    v2->m_pkBut[1]->m_bMainBtnMode = 1;
    v21 = v2->m_pkBut[1];
    v22 = v10 - norHeight;
    v21->firstPosX = v18;
    v21->firstPosY = v22;
    v23 = v2->m_pkBut[1];
    v24 = v10 - norHeight;
    v23->defaultPosX = v18;
    v23->defaultPosY = v24;
    v25 = hilLeft - norLeft;
    v26 = v2->m_pkBut[1];
    v26->hilOffsetY = hilTop - norTop;
    v26->hilOffsetX = v25;
    v27 = uiLeft + v18;
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "ActionNor",
      &norLeft,
      &norTop,
      &norWidth,
      &norHeight);
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "ActionOver",
      &hilLeft,
      &hilTop,
      &hilWidth,
      &hilHeight);
    *(float *)&pkFrameWork = COERCE_FLOAT(PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ActionNor", &uiLeft, &uiTop, (NiSourceTexture *)spParticle.m_pObject));
    PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "ActionNor");
    PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "ActionOver");
    v28 = PgWinProxy::CreateWin((PgWin *)&v2->vfptr);
    v29 = (PgSprData *)pkFrameWork;
    v30 = v10 - norHeight;
    v2->m_kEffectManager[2].pkProxy = (PgWin *)v28;
    v2->m_pkBut[2] = PgWinButExt::CreateWin(v27, v30, v29, (PgWin *)&v28->vfptr, 2u, 0, 0);
    v31 = (char *)TextData::Get(0xDEEFF1FF);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkBut[2]->vfptr, v31);
    v2->m_pkBut[2]->m_pkToolTipWin = g_pkToolTipWin;
    v2->m_pkBut[2]->m_bMainBtnMode = 1;
    v32 = v2->m_pkBut[2];
    v33 = v10 - norHeight;
    v32->firstPosX = v27;
    v32->firstPosY = v33;
    v34 = v2->m_pkBut[2];
    v35 = v10 - norHeight;
    v34->defaultPosX = v27;
    v34->defaultPosY = v35;
    v36 = hilTop - norTop;
    v37 = v2->m_pkBut[2];
    v37->hilOffsetX = hilLeft - norLeft;
    v37->hilOffsetY = v36;
    v38 = uiLeft + v27;
    PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "ComuNor", &norLeft, &norTop, &norWidth, &norHeight);
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "ComuOver",
      &hilLeft,
      &hilTop,
      &hilWidth,
      &hilHeight);
    *(float *)&pkFrameWork = COERCE_FLOAT(PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ComuNor", &uiLeft, &uiTop, (NiSourceTexture *)spParticle.m_pObject));
    PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "ComuNor");
    PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "ComuOver");
    v39 = PgWinProxy::CreateWin((PgWin *)&v2->vfptr);
    v2->m_kEffectManager[3].pkProxy = (PgWin *)v39;
    v2->m_pkBut[3] = PgWinButExt::CreateWin(
                       v38,
                       v10 - norHeight,
                       (PgSprData *)pkFrameWork,
                       (PgWin *)&v39->vfptr,
                       3u,
                       0,
                       0);
    v40 = (char *)TextData::Get(0xEA504941);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkBut[3]->vfptr, v40);
    v2->m_pkBut[3]->m_pkToolTipWin = g_pkToolTipWin;
    v2->m_pkBut[3]->m_bMainBtnMode = 1;
    v41 = v2->m_pkBut[3];
    v41->firstPosY = v10 - norHeight;
    v41->firstPosX = v38;
    v42 = v2->m_pkBut[3];
    v43 = v10 - norHeight;
    v42->defaultPosX = v38;
    v42->defaultPosY = v43;
    v44 = hilLeft - norLeft;
    v45 = v2->m_pkBut[3];
    v45->hilOffsetY = hilTop - norTop;
    v45->hilOffsetX = v44;
    v46 = uiLeft + v38;
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "QuestNor",
      &norLeft,
      &norTop,
      &norWidth,
      &norHeight);
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "QuestOver",
      &hilLeft,
      &hilTop,
      &hilWidth,
      &hilHeight);
    *(float *)&pkFrameWork = COERCE_FLOAT(PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "QuestNor", &uiLeft, &uiTop, (NiSourceTexture *)spParticle.m_pObject));
    PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "QuestNor");
    PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "QuestOver");
    v47 = PgWinProxy::CreateWin((PgWin *)&v2->vfptr);
    v48 = (PgSprData *)pkFrameWork;
    v49 = v10 - norHeight;
    v2->m_kEffectManager[4].pkProxy = (PgWin *)v47;
    v2->m_pkBut[4] = PgWinButExt::CreateWin(v46, v49, v48, (PgWin *)&v47->vfptr, 4u, 0, 0);
    v50 = (char *)TextData::Get(0xA204FBF0);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkBut[4]->vfptr, v50);
    v2->m_pkBut[4]->m_pkToolTipWin = g_pkToolTipWin;
    v2->m_pkBut[4]->m_bMainBtnMode = 1;
    v51 = v2->m_pkBut[4];
    v52 = v10 - norHeight;
    v51->firstPosX = v46;
    v51->firstPosY = v52;
    v53 = v2->m_pkBut[4];
    v54 = v10 - norHeight;
    v53->defaultPosX = v46;
    v53->defaultPosY = v54;
    v55 = hilTop - norTop;
    v56 = v2->m_pkBut[4];
    v56->hilOffsetX = hilLeft - norLeft;
    v56->hilOffsetY = v55;
    v57 = uiLeft + v46;
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "SkillNor",
      &norLeft,
      &norTop,
      &norWidth,
      &norHeight);
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "SkillOver",
      &hilLeft,
      &hilTop,
      &hilWidth,
      &hilHeight);
    *(float *)&pkFrameWork = COERCE_FLOAT(PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SkillNor", &uiLeft, &uiTop, (NiSourceTexture *)spParticle.m_pObject));
    PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "SkillNor");
    PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "SkillOver");
    v58 = PgWinProxy::CreateWin((PgWin *)&v2->vfptr);
    v2->m_kEffectManager[5].pkProxy = (PgWin *)v58;
    v2->m_pkBut[5] = PgWinButExt::CreateWin(
                       v57,
                       v10 - norHeight,
                       (PgSprData *)pkFrameWork,
                       (PgWin *)&v58->vfptr,
                       5u,
                       0,
                       0);
    v59 = (char *)TextData::Get(0x98FEF4F4);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkBut[5]->vfptr, v59);
    v2->m_pkBut[5]->m_pkToolTipWin = g_pkToolTipWin;
    v2->m_pkBut[5]->m_bMainBtnMode = 1;
    v60 = v2->m_pkBut[5];
    v61 = v10 - norHeight;
    v60->firstPosX = v57;
    v60->firstPosY = v61;
    v62 = v2->m_pkBut[5];
    v63 = v10 - norHeight;
    v62->defaultPosX = v57;
    v62->defaultPosY = v63;
    v64 = hilLeft - norLeft;
    v65 = v2->m_pkBut[5];
    v65->hilOffsetY = hilTop - norTop;
    v65->hilOffsetX = v64;
    v66 = (PgFrameWork *)(uiLeft + v57);
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "InventoryNor",
      &norLeft,
      &norTop,
      &norWidth,
      &norHeight);
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "InventoryOver",
      &hilLeft,
      &hilTop,
      &hilWidth,
      &hilHeight);
    *(float *)&pkFrameWork = COERCE_FLOAT(PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "InventoryNor", &uiLeft, &uiTop, (NiSourceTexture *)spParticle.m_pObject));
    PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "InventoryNor");
    PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "InventoryOver");
    v67 = PgWinProxy::CreateWin((PgWin *)&v2->vfptr);
    v68 = (PgSprData *)pkFrameWork;
    v69 = v10 - norHeight;
    v2->m_kEffectManager[6].pkProxy = (PgWin *)v67;
    v2->m_pkBut[6] = PgWinButExt::CreateWin((int)v66, v69, v68, (PgWin *)&v67->vfptr, 6u, 0, 0);
    v70 = (char *)TextData::Get(0xEF4F3F50);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkBut[6]->vfptr, v70);
    v2->m_pkBut[6]->m_pkToolTipWin = g_pkToolTipWin;
    v2->m_pkBut[6]->m_bMainBtnMode = 1;
    v71 = v2->m_pkBut[6];
    v72 = v10 - norHeight;
    v71->firstPosX = (int)v66;
    v71->firstPosY = v72;
    v73 = v2->m_pkBut[6];
    v74 = v10 - norHeight;
    v73->defaultPosX = (int)v66;
    v73->defaultPosY = v74;
    v75 = hilLeft - norLeft;
    v76 = v2->m_pkBut[6];
    v76->hilOffsetY = hilTop - norTop;
    v76->hilOffsetX = v75;
    pkFrameWork = v66;
    v77 = (int)v66 + uiLeft;
    v78 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NewItem", &uiLeft, &uiTop, 0);
    v79 = PgWinSpr::CreateWin((int)pkFrameWork - uiLeft, v10 - norHeight, v78, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkNewItem = v79;
    v79->vfptr[64].__vecDelDtor((NiRefObject *)v79, 0);
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "ItemMallNor",
      &norLeft,
      &norTop,
      &norWidth,
      &norHeight);
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "ItemMallOver",
      &hilLeft,
      &hilTop,
      &hilWidth,
      &hilHeight);
    *(float *)&pkFrameWork = COERCE_FLOAT(PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ItemMallNor", &uiLeft, &uiTop, (NiSourceTexture *)spParticle.m_pObject));
    PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "ItemMallNor");
    PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "ItemMallOver");
    v80 = PgWinProxy::CreateWin((PgWin *)&v2->vfptr);
    v2->m_kEffectManager[7].pkProxy = (PgWin *)v80;
    v2->m_pkBut[7] = PgWinButExt::CreateWin(
                       v77,
                       v10 - norHeight,
                       (PgSprData *)pkFrameWork,
                       (PgWin *)&v80->vfptr,
                       7u,
                       0,
                       0);
    v81 = (char *)TextData::Get(0xE2F5413C);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkBut[7]->vfptr, v81);
    v2->m_pkBut[7]->m_pkToolTipWin = g_pkToolTipWin;
    v2->m_pkBut[7]->m_bMainBtnMode = 1;
    v82 = v2->m_pkBut[7];
    v83 = v10 - norHeight;
    v82->firstPosX = v77;
    v82->firstPosY = v83;
    v84 = v2->m_pkBut[7];
    v85 = v10 - norHeight;
    v84->defaultPosX = v77;
    v84->defaultPosY = v85;
    v86 = hilTop - norTop;
    v87 = v2->m_pkBut[7];
    v87->hilOffsetX = hilLeft - norLeft;
    v87->hilOffsetY = v86;
    v88 = uiLeft + v77;
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "ForumNor",
      &norLeft,
      &norTop,
      &norWidth,
      &norHeight);
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "ForumOver",
      &hilLeft,
      &hilTop,
      &hilWidth,
      &hilHeight);
    ForumLeft = 0;
    ForumTop = 0;
    *(float *)&pkFrameWork = COERCE_FLOAT(PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ForumNor", &ForumLeft, &ForumTop, pkTextureForum));
    PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "ForumNor");
    PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "ForumOver");
    v89 = PgWinProxy::CreateWin((PgWin *)&v2->vfptr);
    v90 = (PgSprData *)pkFrameWork;
    v91 = v10 - norHeight;
    v2->m_kEffectManager[8].pkProxy = (PgWin *)v89;
    v2->m_pkBut[8] = PgWinButExt::CreateWin(v88, v91, v90, (PgWin *)&v89->vfptr, 8u, 0, 0);
    v92 = (char *)TextData3::Get(0x2A9293ABu);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkBut[8]->vfptr, v92);
    v2->m_pkBut[8]->m_pkToolTipWin = g_pkToolTipWin;
    v2->m_pkBut[8]->m_bMainBtnMode = 1;
    v93 = v2->m_pkBut[8];
    v94 = v10 - norHeight;
    v93->firstPosX = v88;
    v93->firstPosY = v94;
    v95 = v2->m_pkBut[8];
    v95->defaultPosY = v10 - norHeight;
    v95->defaultPosX = v88;
    v96 = hilTop - norTop;
    v97 = v2->m_pkBut[8];
    v97->hilOffsetX = hilLeft - norLeft;
    v97->hilOffsetY = v96;
    v98 = uiLeft + v88;
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "StatusNor",
      &norLeft,
      &norTop,
      &norWidth,
      &norHeight);
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "StatusOver",
      &hilLeft,
      &hilTop,
      &hilWidth,
      &hilHeight);
    *(float *)&pkFrameWork = COERCE_FLOAT(PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "StatusNor", &uiLeft, &uiTop, (NiSourceTexture *)spParticle.m_pObject));
    PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "StatusNor");
    PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "StatusOver");
    v99 = PgWinProxy::CreateWin((PgWin *)&v2->vfptr);
    v2->m_kEffectManager[10].pkProxy = (PgWin *)v99;
    v2->m_pkBut[10] = PgWinButExt::CreateWin(
                        v98,
                        v10 - norHeight,
                        (PgSprData *)pkFrameWork,
                        (PgWin *)&v99->vfptr,
                        0xAu,
                        0,
                        0);
    v100 = (char *)TextData::Get(0xD8353F40);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkBut[10]->vfptr, v100);
    v2->m_pkBut[10]->m_pkToolTipWin = g_pkToolTipWin;
    v2->m_pkBut[10]->m_bMainBtnMode = 1;
    v101 = v2->m_pkBut[10];
    v102 = v10 - norHeight;
    v101->firstPosX = v98;
    v101->firstPosY = v102;
    v103 = v2->m_pkBut[10];
    v104 = v10 - norHeight;
    v103->defaultPosX = v98;
    v103->defaultPosY = v104;
    v105 = hilLeft - norLeft;
    v106 = v2->m_pkBut[10];
    v106->hilOffsetY = hilTop - norTop;
    v106->hilOffsetX = v105;
    v107 = uiLeft + v98;
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spAddedNode.m_pObject->vfptr,
      "QuestionNor",
      &norLeft,
      &norTop,
      &norWidth,
      &norHeight);
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spAddedNode.m_pObject->vfptr,
      "QuestionOver",
      &hilLeft,
      &hilTop,
      &hilWidth,
      &hilHeight);
    *(float *)&pkFrameWork = COERCE_FLOAT(PgSprData::Create((NiAVObject *)&spAddedNode.m_pObject->vfptr, "QuestionNor", &uiLeft, &uiTop, pkAddedTexture));
    PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spAddedNode.m_pObject->vfptr, "QuestionNor");
    PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spAddedNode.m_pObject->vfptr, "QuestionOver");
    v108 = PgWinProxy::CreateWin((PgWin *)&v2->vfptr);
    v109 = (PgSprData *)pkFrameWork;
    v110 = v10 - norHeight;
    v2->m_kEffectManager[9].pkProxy = (PgWin *)v108;
    v2->m_pkBut[9] = PgWinButExt::CreateWin(v107, v110, v109, (PgWin *)&v108->vfptr, 9u, 0, 0);
    v111 = (char *)TextData::Get(0xD8DC563D);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkBut[9]->vfptr, v111);
    v2->m_pkBut[9]->m_pkToolTipWin = g_pkToolTipWin;
    v2->m_pkBut[9]->m_bMainBtnMode = 1;
    v112 = v2->m_pkBut[9];
    v113 = v10 - norHeight;
    v112->firstPosX = v107;
    v112->firstPosY = v113;
    v114 = v2->m_pkBut[9];
    v115 = v10 - norHeight;
    v114->defaultPosX = v107;
    v114->defaultPosY = v115;
    v116 = hilTop - norTop;
    v117 = v2->m_pkBut[9];
    v117->hilOffsetX = hilLeft - norLeft;
    v117->hilOffsetY = v116;
    v118 = uiLeft + v107;
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "PanelBtn01Nor",
      &norLeft,
      &norTop,
      &norWidth,
      &norHeight);
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "PanelBtn01Over",
      &hilLeft,
      &hilTop,
      &hilWidth,
      &hilHeight);
    *(float *)&pkFrameWork = COERCE_FLOAT(PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PanelBtn01Nor", &uiLeft, &uiTop, (NiSourceTexture *)spParticle.m_pObject));
    PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "PanelBtn01Nor");
    PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "PanelBtn01Over");
    v119 = v118 - uiLeft;
    v120 = PgWinButExt::CreateWin(v119, v10 - norHeight, (PgSprData *)pkFrameWork, (PgWin *)&v2->vfptr, 0xBu, 0, 0);
    v2->m_pkBut[11] = v120;
    v120->m_bMainBtnMode = 1;
    v121 = v2->m_pkBut[11];
    v122 = v10 - norHeight;
    v121->firstPosX = v119;
    v121->firstPosY = v122;
    v123 = v2->m_pkBut[11];
    v124 = v10 - norHeight;
    v123->defaultPosX = v119;
    v123->defaultPosY = v124;
    v125 = hilTop - norTop;
    v126 = v2->m_pkBut[11];
    v126->hilOffsetX = hilLeft - norLeft;
    v126->hilOffsetY = v125;
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "PanelBtn02Nor",
      &norLeft,
      &norTop,
      &norWidth,
      &norHeight);
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "PanelBtn02Over",
      &hilLeft,
      &hilTop,
      &hilWidth,
      &hilHeight);
    *(float *)&pkFrameWork = COERCE_FLOAT(PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PanelBtn02Nor", &uiLeft, &uiTop, (NiSourceTexture *)spParticle.m_pObject));
    PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "PanelBtn02Nor");
    PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "PanelBtn02Over");
    v127 = (PgSprData *)pkFrameWork;
    v2->maxButOffset = uiLeft;
    v128 = PgWinButExt::CreateWin(v119, v10 - norHeight, v127, (PgWin *)&v2->vfptr, 0xCu, 0, 0);
    v2->m_pkBut[12] = v128;
    v128->m_bMainBtnMode = 1;
    v129 = v2->m_pkBut[12];
    v130 = v10 - norHeight;
    v129->firstPosX = v119;
    v129->firstPosY = v130;
    v131 = v10 - norHeight;
    v132 = v2->m_pkBut[12];
    v132->defaultPosX = v119;
    v132->defaultPosY = v131;
    v133 = hilTop - norTop;
    v134 = v2->m_pkBut[12];
    v134->hilOffsetX = hilLeft - norLeft;
    v134->hilOffsetY = v133;
    ((void (__stdcall *)(_DWORD))v2->m_pkBut[12]->vfptr[64].__vecDelDtor)(0);
    v2->m_pkBut[11]->m_pkToolTipWin = g_pkToolTipWin;
    v135 = (char *)TextData2::Get(0xF5DBB444);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkBut[11]->vfptr, v135);
    v2->m_pkBut[12]->m_pkToolTipWin = g_pkToolTipWin;
    v136 = (char *)TextData2::Get(0xF5DBB444);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkBut[12]->vfptr, v136);
    v137 = fixTop;
    v138 = v2->vfptr[77].__vecDelDtor;
    v2->m_tab = 0;
    ((void (__thiscall *)(MainMenuWin *, unsigned int, unsigned int))v138)(
      v2,
      PgWin::ms_uiScreenWidth - 44,
      PgWin::ms_uiScreenHeight + v137 - 3);
    v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
    v139 = Folder::Menu();
    v140 = Folder::Merge(v139, "Game\\Menu_Particle.nif");
    v141 = (NiNode *)Ns_LoadNifFile(v140, 0);
    v142 = v141;
    spParticle.m_pObject = v141;
    if ( v141 )
      InterlockedIncrement((volatile LONG *)&v141->m_uiRefCount);
    LOBYTE(v235) = 2;
    if ( v142 )
    {
      v143 = (NiShader *)v142->vfptr[18].__vecDelDtor((NiRefObject *)v142, (unsigned int)"Dummy_System");
      v144 = (NiD3DDefaultShader *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v143);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)v2->m_aspEffectNode, v144);
      v145 = v2->m_aspEffectNode[0].m_pObject;
      kPos = v145->m_kLocal.m_Translate.x;
      v147 = v145->m_kLocal.m_Translate.z;
      *(float *)&pkFrameWork = v145->m_kLocal.m_Translate.y + 60.0;
      fY = pkFrameWork;
      *(float *)&pkFrameWork = kPos + 50.0;
      PgUtil::SetXYTranslate((NiAVObject *)&v145->vfptr, *(float *)&pkFrameWork, *(float *)&fY);
      v149 = (NiShader *)v142->vfptr[18].__vecDelDtor((NiRefObject *)v142, (unsigned int)"Dummy_Comu");
      v150 = (NiD3DDefaultShader *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v149);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_aspEffectNode[3], v150);
      v151 = v2->m_aspEffectNode[3].m_pObject;
      v152 = v151->m_kLocal.m_Translate.x;
      v153 = v151->m_kLocal.m_Translate.z;
      *(float *)&pkFrameWork = v151->m_kLocal.m_Translate.y + 60.0;
      v154 = pkFrameWork;
      *(float *)&pkFrameWork = v152 + 50.0;
      PgUtil::SetXYTranslate((NiAVObject *)&v151->vfptr, *(float *)&pkFrameWork, *(float *)&v154);
      v155 = (NiShader *)v142->vfptr[18].__vecDelDtor((NiRefObject *)v142, (unsigned int)"Dummy_MiniHouse");
      v156 = (NiD3DDefaultShader *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v155);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_aspEffectNode[1], v156);
      v157 = v2->m_aspEffectNode[1].m_pObject;
      v158 = v157->m_kLocal.m_Translate.x;
      kPos_8 = v157->m_kLocal.m_Translate.z;
      *(float *)&pkFrameWork = v157->m_kLocal.m_Translate.y + 60.0;
      v160 = pkFrameWork;
      *(float *)&pkFrameWork = v158 + 50.0;
      PgUtil::SetXYTranslate((NiAVObject *)&v157->vfptr, *(float *)&pkFrameWork, *(float *)&v160);
      v161 = (NiShader *)v142->vfptr[18].__vecDelDtor((NiRefObject *)v142, (unsigned int)"Dummy_Quest");
      v162 = (NiD3DDefaultShader *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v161);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_aspEffectNode[4], v162);
      v163 = v2->m_aspEffectNode[4].m_pObject;
      v164 = v163->m_kLocal.m_Translate.x;
      v165 = v163->m_kLocal.m_Translate.z;
      *(float *)&pkFrameWork = v163->m_kLocal.m_Translate.y + 60.0;
      v166 = pkFrameWork;
      *(float *)&pkFrameWork = v164 + 50.0;
      PgUtil::SetXYTranslate((NiAVObject *)&v163->vfptr, *(float *)&pkFrameWork, *(float *)&v166);
      v167 = (NiShader *)v142->vfptr[18].__vecDelDtor((NiRefObject *)v142, (unsigned int)"Dummy_Action");
      v168 = (NiD3DDefaultShader *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v167);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_aspEffectNode[2], v168);
      v169 = v2->m_aspEffectNode[2].m_pObject;
      v170 = v169->m_kLocal.m_Translate.x;
      v171 = v169->m_kLocal.m_Translate.z;
      *(float *)&pkFrameWork = v169->m_kLocal.m_Translate.y + 60.0;
      v172 = pkFrameWork;
      *(float *)&pkFrameWork = v170 + 50.0;
      PgUtil::SetXYTranslate((NiAVObject *)&v169->vfptr, *(float *)&pkFrameWork, *(float *)&v172);
      v173 = (NiShader *)v142->vfptr[18].__vecDelDtor((NiRefObject *)v142, (unsigned int)"Dummy_Skill");
      v174 = (NiD3DDefaultShader *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v173);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_aspEffectNode[5], v174);
      v175 = v2->m_aspEffectNode[5].m_pObject;
      v176 = v175->m_kLocal.m_Translate.x;
      v177 = v175->m_kLocal.m_Translate.z;
      *(float *)&pkFrameWork = v175->m_kLocal.m_Translate.y + 60.0;
      v178 = pkFrameWork;
      *(float *)&pkFrameWork = v176 + 50.0;
      PgUtil::SetXYTranslate((NiAVObject *)&v175->vfptr, *(float *)&pkFrameWork, *(float *)&v178);
      v179 = (NiShader *)v142->vfptr[18].__vecDelDtor((NiRefObject *)v142, (unsigned int)"Dummy_Inventory");
      v180 = (NiD3DDefaultShader *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v179);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_aspEffectNode[6], v180);
      v181 = v2->m_aspEffectNode[6].m_pObject;
      v182 = v181->m_kLocal.m_Translate.x;
      v183 = v181->m_kLocal.m_Translate.z;
      *(float *)&pkFrameWork = v181->m_kLocal.m_Translate.y + 60.0;
      v184 = pkFrameWork;
      *(float *)&pkFrameWork = v182 + 50.0;
      PgUtil::SetXYTranslate((NiAVObject *)&v181->vfptr, *(float *)&pkFrameWork, *(float *)&v184);
      v185 = (NiShader *)v142->vfptr[18].__vecDelDtor((NiRefObject *)v142, (unsigned int)"Dummy_Status");
      v186 = (NiObject *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v185);
      v187 = (NiD3DDefaultShader *)NiObject::Clone(v186);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_aspEffectNode[7], v187);
      v188 = v2->m_aspEffectNode[7].m_pObject;
      v189 = v188->m_kLocal.m_Translate.x;
      v190 = v188->m_kLocal.m_Translate.z;
      *(float *)&pkFrameWork = v188->m_kLocal.m_Translate.y + 60.0;
      v191 = pkFrameWork;
      *(float *)&pkFrameWork = v189 + 50.0;
      PgUtil::SetXYTranslate((NiAVObject *)&v188->vfptr, *(float *)&pkFrameWork, *(float *)&v191);
      v192 = (NiShader *)v142->vfptr[18].__vecDelDtor((NiRefObject *)v142, (unsigned int)"Dummy_Forum");
      v193 = (NiD3DDefaultShader *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v192);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_aspEffectNode[8], v193);
      v194 = v2->m_aspEffectNode[8].m_pObject;
      v195 = v194->m_kLocal.m_Translate.x;
      v196 = v194->m_kLocal.m_Translate.z;
      *(float *)&pkFrameWork = v194->m_kLocal.m_Translate.y + 60.0;
      v197 = pkFrameWork;
      *(float *)&pkFrameWork = v195 + 50.0;
      PgUtil::SetXYTranslate((NiAVObject *)&v194->vfptr, *(float *)&pkFrameWork, *(float *)&v197);
      v198 = (NiShader *)v142->vfptr[18].__vecDelDtor((NiRefObject *)v142, (unsigned int)"Dummy_Status");
      v199 = (NiD3DDefaultShader *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v198);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_aspEffectNode[10], v199);
      v200 = v2->m_aspEffectNode[10].m_pObject;
      v201 = v200->m_kLocal.m_Translate.x;
      v202 = v200->m_kLocal.m_Translate.z;
      *(float *)&pkFrameWork = v200->m_kLocal.m_Translate.y + 60.0;
      v203 = pkFrameWork;
      *(float *)&pkFrameWork = v201 + 50.0;
      PgUtil::SetXYTranslate((NiAVObject *)&v200->vfptr, *(float *)&pkFrameWork, *(float *)&v203);
      v204 = (NiShader *)v142->vfptr[18].__vecDelDtor((NiRefObject *)v142, (unsigned int)"Dummy_Status");
      v205 = (NiObject *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v204);
      v206 = (NiD3DDefaultShader *)NiObject::Clone(v205);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_aspEffectNode[9], v206);
      v207 = v2->m_aspEffectNode[9].m_pObject;
      v208 = v207->m_kLocal.m_Translate.z;
      PgUtil::SetXYTranslate((NiAVObject *)&v207->vfptr, v207->m_kLocal.m_Translate.x, v207->m_kLocal.m_Translate.y);
      *(float *)&pkFrameWork = 0.0;
      v209 = v142->vfptr[18].__vecDelDtor;
      LOBYTE(v235) = 3;
      v210 = (NiObjectNET *)v209((NiRefObject *)&v142->vfptr, (unsigned int)"dummy_noise");
      v211 = (NiD3DDefaultShader *)NiObjectNET::GetController(v210, &NiTransformController::m_RTTI);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&pkFrameWork, v211);
      v212 = (NiObject *)pkFrameWork;
      if ( *(float *)&pkFrameWork == 0.0 )
      {
        LOBYTE(v235) = 2;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkFrameWork);
        LOBYTE(v235) = 1;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spParticle);
LABEL_28:
        LOBYTE(v235) = 0;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spAddedNode);
        v235 = -1;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
        return 0;
      }
      v213 = (NiPointer<NiD3DDefaultShader> *)&v2->m_kEffectManager[0].spPosOffsetNode;
      fixTop = 13;
      do
      {
        if ( v213[-1].m_pObject )
        {
          LOBYTE(v213[-3].m_pObject) = 0;
          v214 = (NiNode *)operator new(0xE8u);
          LOBYTE(v235) = 4;
          if ( v214 )
            NiNode::NiNode(v214, 0);
          else
            v215 = 0;
          LOBYTE(v235) = 3;
          NiPointer<PopupMenuWin>::operator=(v213, v215);
          v216 = (NiD3DDefaultShader *)NiObject::Clone(v212);
          NiPointer<PopupMenuWin>::operator=(v213 - 2, v216);
          ((void (__stdcall *)(NiD3DDefaultShader *))v213[-2].m_pObject->vfptr[18].__vecDelDtor)(v213->m_pObject);
          LOWORD(v213[-2].m_pObject->m_pszName) = (unsigned int)v213[-2].m_pObject->m_pszName & 0xFFF7 | 1;
        }
        v213 += 26;
        --fixTop;
      }
      while ( fixTop );
      LOBYTE(v235) = 2;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkFrameWork);
    }
    LOBYTE(v235) = 1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spParticle);
    LOBYTE(v235) = 0;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spAddedNode);
    v235 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 1;
  }
  v7 = spNode.m_pObject;
  v235 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  return 0;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00540810) --------------------------------------------------------
void __thiscall MainMenuWin::OnCommand(MainMenuWin *this, unsigned int wParam, int lParam)
{
  MainMenuWin *v3; // esi@1

  v3 = this;
  switch ( wParam )
  {
    case 0xBu:
    case 0xCu:
      MainMenuWin::ChangeMenuTab(this);
      break;
    case 0xAu:
      MainMenuWin::OnCmdChar(this);
      MainMenuWin::StartParticle(v3, wParam);
      break;
    case 6u:
      MainMenuWin::OnCmdInven(this);
      MainMenuWin::StartParticle(v3, wParam);
      break;
    case 5u:
      MainMenuWin::OnCmdSkill(this);
      MainMenuWin::StartParticle(v3, wParam);
      break;
    case 2u:
      MainMenuWin::OnCmdAction(this);
      MainMenuWin::StartParticle(v3, wParam);
      break;
    case 4u:
      MainMenuWin::OnCmdQuest(this);
      MainMenuWin::StartParticle(v3, wParam);
      break;
    case 3u:
      MainMenuWin::OnCmdFriend(this);
      MainMenuWin::StartParticle(v3, wParam);
      break;
    case 1u:
      MainMenuWin::OnCmdMiniHouse(this);
      MainMenuWin::StartParticle(v3, wParam);
      break;
    case 7u:
      MainMenuWin::OnCmdItemMall(this);
      MainMenuWin::StartParticle(v3, wParam);
      break;
    case 8u:
      MainMenuWin::OnCmdForum(this);
      MainMenuWin::StartParticle(v3, wParam);
      break;
    case 0u:
      MainMenuWin::OnCmdSystem(this);
      MainMenuWin::StartParticle(v3, wParam);
      break;
    case 9u:
      MainMenuWin::OnCmdHelp(this);
      MainMenuWin::StartParticle(v3, wParam);
      break;
    default:
      if ( wParam <= 0xA )
        MainMenuWin::StartParticle(this, wParam);
      break;
  }
}

//----- (00540950) --------------------------------------------------------
void __userpurge MainMenuWin::UpdateMeWin(MainMenuWin *this@<ecx>, double a2@<st0>, float fCurTime)
{
  MainMenuWin *v3; // edi@1
  int v4; // esi@1
  int v5; // edi@1
  int v6; // eax@3
  void (__thiscall ***v7)(_DWORD, _DWORD); // edi@7
  int v8; // eax@11
  int kPos_4; // ST18_4@11
  int kPos_8; // ST1C_4@11
  bool v11; // zf@12
  int v12; // [sp+1Ch] [bp-Ch]@6
  int v13; // [sp+20h] [bp-8h]@1
  int v14; // [sp+24h] [bp-4h]@1

  v3 = this;
  MainMenuWin::UpdateBlinkEffect(this, a2);
  v4 = (int)&v3->m_kEffectManager[0].bLive;
  v5 = (int)v3->m_pkBut;
  v14 = v5;
  v13 = 13;
  do
  {
    if ( *(_BYTE *)v4 )
    {
      CNSTimer_MarkCheck::Update((CNSTimer_MarkCheck *)(v4 - 60), Timer::ms_fCurTime);
      if ( v6 == 1 && *(_DWORD *)(v5 - 56) && *(_DWORD *)v5 )
      {
        (*(void (__stdcall **)(int *, _DWORD))(**(_DWORD **)v5 + 120))(&v12, *(_DWORD *)(v5 - 56));
        if ( v12 )
        {
          v7 = (void (__thiscall ***)(_DWORD, _DWORD))v12;
          if ( !InterlockedDecrement((volatile LONG *)(v12 + 4)) )
          {
            if ( v7 )
              (**v7)(v7, 1);
          }
        }
        *(_BYTE *)v4 = 0;
      }
      v8 = *(_DWORD *)(v4 + 12);
      kPos_4 = *(_DWORD *)(v8 + 92);
      kPos_8 = *(_DWORD *)(v8 + 96);
      (*(void (__thiscall **)(_DWORD, signed int))(**(_DWORD **)(v4 + 8) + 308))(
        *(_DWORD *)(v4 + 8),
        (signed int)*(float *)(v8 + 88));
      v5 = v14;
    }
    v5 += 4;
    v4 += 104;
    v11 = v13-- == 1;
    v14 = v5;
  }
  while ( !v11 );
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00540A30) --------------------------------------------------------
void __thiscall MainMenuWin::MainMenuWin(MainMenuWin *this)
{
  MainMenuWin *v1; // esi@1
  NiNode **v2; // edi@1
  NiNode *v3; // ebx@2
  int v4; // ebx@7
  NiNode *v5; // ebx@12
  signed int v6; // [sp+14h] [bp-14h]@1
  NiPointer<NiNode> *v7; // [sp+18h] [bp-10h]@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&MainMenuWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MainMenuWin::`vftable'{for `IDirectMessenger'};
  `eh vector constructor iterator'(
    v1->m_kEffectManager,
    0x68u,
    13,
    (void (__thiscall *)(void *))MainMenuWin::_unnamed_type_m_kEffectManager_::_unnamed_type_m_kEffectManager_,
    (void (__thiscall *)(void *))MainMenuWin::_unnamed_type_m_kEffectManager_::~_unnamed_type_m_kEffectManager_);
  `eh vector constructor iterator'(
    v1->m_aspEffectNode,
    4u,
    13,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v7 = v1->m_aspEffectNode;
  v1->m_uiFrameWidth = 20;
  v1->m_tab = 0;
  v1->maxButOffset = 0;
  v1->m_iCurrParticleIndex = -1;
  v2 = &v1->m_kEffectManager[0].spPosOffsetNode.m_pObject;
  v6 = 13;
  do
  {
    *(v2 - 1) = 0;
    *((_BYTE *)v2 - 12) = 0;
    v3 = *v2;
    if ( *v2 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      *v2 = 0;
    }
    v4 = (int)*(v2 - 2);
    if ( v4 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v4 + 4)) && v4 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v4)(v4, 1);
      *(v2 - 2) = 0;
    }
    v5 = v7->m_pObject;
    if ( v7->m_pObject )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      v7->m_pObject = 0;
    }
    ++v7;
    v2 += 26;
    --v6;
  }
  while ( v6 );
  *(_WORD *)&v1->m_bBlinkEffect = 0;
  v1->m_pkNewItem = 0;
}
// 993BC0: using guessed type void (__thiscall *MainMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 993BDC: using guessed type int (__thiscall *MainMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00540BB0) --------------------------------------------------------
NiNode *__cdecl CloneWithSpecifiedMaterial(NiNode *pkSrc, NiNode *pkMtrlNode, char *pcMtrlNodeName)
{
  NiObject *v3; // edi@1
  NiRTTI *v4; // eax@2
  char v5; // al@5
  NiAVObject *v6; // esi@6
  NiAVObject *v7; // eax@7
  NiProperty *v8; // eax@7
  NiNode *result; // eax@7

  v3 = NiObject::Clone((NiObject *)&pkSrc->vfptr);
  if ( !v3 )
    goto LABEL_12;
  v4 = (NiRTTI *)((int (__thiscall *)(NiObject *))v3->vfptr[1].__vecDelDtor)(v3);
  if ( v4 )
  {
    while ( v4 != &NiNode::m_RTTI )
    {
      v4 = v4->m_pkBaseRTTI;
      if ( !v4 )
        goto LABEL_5;
    }
    v5 = 1;
  }
  else
  {
LABEL_5:
    v5 = 0;
  }
  v6 = (NiAVObject *)(v5 != 0 ? (unsigned int)v3 : 0);
  if ( v5 != 0 ? (unsigned int)v3 : 0 )
  {
    v7 = (NiAVObject *)((int (__stdcall *)(char *))pkMtrlNode->vfptr[18].__vecDelDtor)(pcMtrlNodeName);
    v8 = NiAVObject::GetProperty(v7, 3);
    NiAVObject::AttachProperty(v6, v8);
    result = (NiNode *)v6;
  }
  else
  {
LABEL_12:
    result = 0;
  }
  return result;
}

//----- (00540C20) --------------------------------------------------------
MainMenuWin *__cdecl MainMenuWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  MainMenuWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x728u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    MainMenuWin::MainMenuWin((MainMenuWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (MainMenuWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00540D50) --------------------------------------------------------
void __thiscall MainMenuWin::_unnamed_type_m_kEffectManager_::~_unnamed_type_m_kEffectManager_($F4A442FC7A9F530D11367FFDD3A3808C *this)
{
  $F4A442FC7A9F530D11367FFDD3A3808C *v1; // edi@1
  NiNode *v2; // esi@1
  NiTransformController *v3; // esi@5

  v1 = this;
  v2 = this->spPosOffsetNode.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->spTransformController.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  NsEffect::~NsEffect(&v1->kEffect);
  ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v1->kMarkCheck);
}

//----- (00540E00) --------------------------------------------------------
void __thiscall NiTimeController::SetAnimType(NiTimeController *this, NiTimeController::AnimType eType)
{
  unsigned __int16 v2; // ax@1

  v2 = eType | this->m_uFlags & 0xFFFE;
  this->m_uFlags = v2;
  if ( eType )
    this->m_uFlags = v2 & 0xFFF7;
  else
    this->m_uFlags = v2 | 8;
}

//----- (00540E40) --------------------------------------------------------
MainMenuWin *__thiscall MainMenuWin::`vector deleting destructor'(MainMenuWin *this, unsigned int a2)
{
  MainMenuWin *v2; // esi@1

  v2 = this;
  MainMenuWin::~MainMenuWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00540E70) --------------------------------------------------------
void __thiscall MainMenuWin::_unnamed_type_m_kEffectManager_::_unnamed_type_m_kEffectManager_($F4A442FC7A9F530D11367FFDD3A3808C *this)
{
  $F4A442FC7A9F530D11367FFDD3A3808C *v1; // esi@1

  v1 = this;
  CNSTimer_Interval::CNSTimer_Interval(&this->kTimerInterval);
  CNSTimer_MarkCheck::CNSTimer_MarkCheck(&v1->kMarkCheck);
  NsEffect::NsEffect(&v1->kEffect);
  v1->spTransformController.m_pObject = 0;
  v1->spPosOffsetNode.m_pObject = 0;
}

//----- (00540EE0) --------------------------------------------------------
void __thiscall KarisForgeSlotInvWin::KarisForgeSlotInvWin(KarisForgeSlotInvWin *this)
{
  KarisForgeSlotInvWin *v1; // esi@1

  v1 = this;
  ForgeSlotInvWin::ForgeSlotInvWin((ForgeSlotInvWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&KarisForgeSlotInvWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&KarisForgeSlotInvWin::`vftable'{for `IDirectMessenger'};
  v1->m_uiSenderType = -1;
  v1->m_uiSenderInvIndex = -1;
  v1->m_pkSender = 0;
  v1->m_uiInvIndex = -1;
  v1->m_uiInvType = 1;
  ItemIcon::SetItem((ItemIcon *)&v1->vfptr, 0, 1);
  v1->m_pkFrameWork = 0;
  v1->m_bLock = 0;
}
// 993F60: using guessed type void (__thiscall *KarisForgeSlotInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 993F7C: using guessed type int (__thiscall *KarisForgeSlotInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00540F80) --------------------------------------------------------
void __thiscall KarisForgeSlotInvWin::~KarisForgeSlotInvWin(KarisForgeSlotInvWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&KarisForgeSlotInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&KarisForgeSlotInvWin::`vftable'{for `IDirectMessenger'};
  ForgeSlotInvWin::~ForgeSlotInvWin((ForgeSlotInvWin *)&this->vfptr);
}
// 993F60: using guessed type void (__thiscall *KarisForgeSlotInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 993F7C: using guessed type int (__thiscall *KarisForgeSlotInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00540FA0) --------------------------------------------------------
char __thiscall KarisForgeSlotInvWin::Create(KarisForgeSlotInvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork)
{
  KarisForgeSlotInvWin *v6; // esi@1
  char result; // al@1

  v6 = this;
  this->m_pkFrameWork = pkFrameWork;
  result = ItemIcon::Create((ItemIcon *)&this->vfptr, iXPos, iYPos, pkParent);
  if ( result )
  {
    v6->m_uiInvIndex = uiInvIndex;
    result = 1;
  }
  return result;
}

//----- (00540FF0) --------------------------------------------------------
void __thiscall MakeKarisWin::OnShowWin(MakeKarisWin *this)
{
  this->m_eState = 0;
  PgWin::OnShowWin((PgWin *)&this->vfptr);
}

//----- (00541000) --------------------------------------------------------
KarisForgeSlotInvWin *__thiscall MakeKarisWin::GetInsertedOldSlot(MakeKarisWin *this, unsigned int _uiSlotNum)
{
  MakeKarisWin *v2; // esi@1
  KarisForgeSlotInvWin *v3; // ecx@1
  KarisForgeSlotInvWin *result; // eax@4
  KarisForgeSlotInvWin *v5; // edi@6

  v2 = this;
  v3 = this->m_apkSlotWin[0];
  if ( _uiSlotNum )
  {
    v5 = 0;
    if ( ItemIcon::GetItem((ItemIcon *)&v3->vfptr) )
      v5 = v2->m_apkSlotWin[0];
    result = v5;
  }
  else if ( v3 && ItemIcon::GetItem((ItemIcon *)&v3->vfptr) )
  {
    result = v2->m_apkSlotWin[0];
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00541060) --------------------------------------------------------
void MakeKarisWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "makekaris");
}

//----- (00541090) --------------------------------------------------------
void __thiscall MakeKarisWin::EnableSprSlot(MakeKarisWin *this, unsigned int uiSlotNum)
{
  MakeKarisWin *v2; // eax@1
  KarisForgeSlotInvWin *v3; // ecx@2
  NiRefObjectVtbl **v4; // esi@3
  NiRefObjectVtbl *v5; // edi@4
  Item *v6; // eax@4

  v2 = this;
  if ( uiSlotNum < 1 )
  {
    v3 = this->m_apkSlotWin[uiSlotNum];
    if ( v3 )
    {
      v4 = &v2->m_apkSprSlotWin[uiSlotNum]->vfptr;
      if ( v4 )
      {
        v5 = *v4;
        v6 = ItemIcon::GetItem((ItemIcon *)&v3->vfptr);
        v5[60].__vecDelDtor((NiRefObject *)v4, v6 == 0);
      }
    }
  }
}

//----- (005410F0) --------------------------------------------------------
void __thiscall KarisForgeSlotInvWin::OnFirstHitWin(KarisForgeSlotInvWin *this)
{
  KarisForgeSlotInvWin *v1; // esi@1
  PgWin *v2; // eax@5
  unsigned int v3; // ecx@6
  ItemIcon *v4; // ecx@7
  Item *v5; // eax@9
  ItemInfoWin *v6; // ecx@10

  v1 = this;
  if ( !this->m_bLock )
  {
    if ( ItemIcon::GetItem((ItemIcon *)&this->vfptr) )
      v1->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
    else
      v1->m_pkToolTipWin = g_pkToolTipWin;
    PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
    v2 = v1->m_pkSender;
    if ( v2 )
    {
      v3 = v1->m_uiSenderInvIndex;
      if ( v3 < 0xC0 )
      {
        v4 = (ItemIcon *)LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][v3 + 2]);
        if ( v4 )
        {
          if ( ItemIcon::GetItem(v4) )
          {
            v5 = ItemIcon::GetItem((ItemIcon *)&v1->vfptr);
            if ( v5 )
            {
              v6 = (ItemInfoWin *)v1->m_pkToolTipWin;
              if ( v6 )
              {
                ItemInfoWin::SetItemInfo(v6, v5);
                PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
              }
            }
          }
        }
      }
    }
  }
}

//----- (00541180) --------------------------------------------------------
void __thiscall MakeKarisWin::MakeKarisWin(MakeKarisWin *this)
{
  MakeKarisWin *v1; // esi@1
  int v2; // eax@1
  NiNode *v3; // ebx@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&MakeKarisWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MakeKarisWin::`vftable'{for `IDirectMessenger'};
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kTimerInterval);
  CNSTimer_MarkCheck::CNSTimer_MarkCheck(&v1->m_kMarkCheck);
  NsEffect::NsEffect(&v1->m_kEffect);
  v1->m_spEffect.m_pObject = 0;
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  v1->m_kDrop.m_pkSender = 0;
  v2 = (int)&v1->m_kDropContents;
  *(_DWORD *)v2 = &DropContents::`vftable';
  *(_WORD *)(v2 + 60) = -1;
  *(_DWORD *)(v2 + 64) = 0;
  v1->m_kDrop.m_pkContents = &v1->m_kDropContents;
  v1->m_apkSprSlotWin[0] = 0;
  v1->m_apkSlotWin[0] = 0;
  v3 = v1->m_spEffect.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spEffect.m_pObject = 0;
  }
  v1->m_pCurObject = 0;
  v1->m_fKarisSlotAlpha = 1.0;
  v1->m_pkKarisSlot = 0;
  v1->m_eState = 0;
  v1->m_pkKarisCount = 0;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9941EC: using guessed type void (__thiscall *MakeKarisWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99420C: using guessed type int (__thiscall *MakeKarisWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00541290) --------------------------------------------------------
void __thiscall MakeKarisWin::~MakeKarisWin(MakeKarisWin *this)
{
  MakeKarisWin *v1; // esi@1
  NiNode *v2; // edi@1
  NiNode *v3; // edi@6

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&MakeKarisWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MakeKarisWin::`vftable'{for `IDirectMessenger'};
  this->m_apkSprSlotWin[0] = 0;
  this->m_apkSlotWin[0] = 0;
  v2 = this->m_spEffect.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spEffect.m_pObject = 0;
  }
  v1->m_pCurObject = 0;
  v1->m_pkKarisSlot = 0;
  v1->m_pkKarisCount = 0;
  v1->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  v3 = v1->m_spEffect.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  NsEffect::~NsEffect(&v1->m_kEffect);
  ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v1->m_kMarkCheck);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9941EC: using guessed type void (__thiscall *MakeKarisWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99420C: using guessed type int (__thiscall *MakeKarisWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005413A0) --------------------------------------------------------
void __thiscall MakeKarisWin::OnSlotLClick(MakeKarisWin *this, unsigned int _uiSlotIndex)
{
  MakeKarisWin *v2; // esi@1
  KarisForgeSlotInvWin *v3; // edi@1
  Item *v4; // eax@2
  unsigned int v5; // ecx@3
  ItemIcon *v6; // ecx@4
  NiRefObjectVtbl **v7; // esi@5
  NiRefObjectVtbl *v8; // edi@6
  Item *v9; // eax@6

  v2 = this;
  v3 = this->m_apkSlotWin[_uiSlotIndex];
  if ( v3 )
  {
    v4 = ItemIcon::GetItem((ItemIcon *)&this->m_apkSlotWin[_uiSlotIndex]->vfptr);
    if ( v4 )
    {
      v2->m_kDropContents.m_eSenderType = v3->m_uiSenderType;
      v2->m_kDropContents.m_eType = 0;
      v5 = v3->m_uiSenderInvIndex;
      v2->m_kDropContents.m_apvParam[0] = v4;
      v2->m_kDropContents.m_uiSenderIndex = v5;
      v2->m_kDropContents.m_apvParam[1] = 0;
      v2->m_kDropContents.m_uiLot = ((int (__thiscall *)(_DWORD))v4->vfptr[3].__vecDelDtor)(v4);
      v2->m_kDrop.m_pkSender = v3->m_pkSender;
      PgCursor::ms_pkDrop = &v2->m_kDrop;
      ForgeSlotInvWin::ReSetSlot((ForgeSlotInvWin *)&v3->vfptr);
      if ( _uiSlotIndex < 1 )
      {
        v6 = (ItemIcon *)&v2->m_apkSlotWin[_uiSlotIndex]->vfptr;
        if ( v6 )
        {
          v7 = &v2->m_apkSprSlotWin[_uiSlotIndex]->vfptr;
          if ( v7 )
          {
            v8 = *v7;
            v9 = ItemIcon::GetItem(v6);
            v8[60].__vecDelDtor((NiRefObject *)v7, v9 == 0);
          }
        }
      }
    }
  }
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (00541460) --------------------------------------------------------
void __thiscall MakeKarisWin::OnCancel(MakeKarisWin *this)
{
  GameFrameWork::OnShowMakeKarisWin((GameFrameWork *)this->m_pkFrameWork, 0);
}

//----- (00541470) --------------------------------------------------------
void __thiscall MakeKarisWin::ClearSlot(MakeKarisWin *this)
{
  MakeKarisWin *v1; // esi@1
  KarisForgeSlotInvWin *v2; // ecx@1
  ForgeSlotInvWin *v3; // ecx@3
  ItemIcon *v4; // ecx@5
  NiRefObjectVtbl **v5; // esi@6
  NiRefObjectVtbl *v6; // edi@7
  Item *v7; // eax@7

  v1 = this;
  v2 = this->m_apkSlotWin[0];
  if ( v2 )
  {
    if ( ItemIcon::GetItem((ItemIcon *)&v2->vfptr) )
    {
      v3 = (ForgeSlotInvWin *)&v1->m_apkSlotWin[0]->vfptr;
      if ( v3 )
        ForgeSlotInvWin::ReSetSlot(v3);
    }
  }
  v4 = (ItemIcon *)&v1->m_apkSlotWin[0]->vfptr;
  if ( v4 )
  {
    v5 = &v1->m_apkSprSlotWin[0]->vfptr;
    if ( v5 )
    {
      v6 = *v5;
      v7 = ItemIcon::GetItem(v4);
      v6[60].__vecDelDtor((NiRefObject *)v5, v7 == 0);
    }
  }
}

//----- (005414D0) --------------------------------------------------------
void __thiscall MakeKarisWin::StartEffect(MakeKarisWin *this, NiAVObject *_pEffect)
{
  MakeKarisWin *v2; // esi@1
  PgWinSpr *v3; // ecx@1
  double v4; // st7@2
  PgWinSpr *v5; // ecx@4

  v2 = this;
  this->m_pCurObject = _pEffect;
  NsEffect::SetEffectNode(&this->m_kEffect, _pEffect);
  NsEffect::Start(&v2->m_kEffect, Timer::ms_fCurTime);
  v2->m_kMarkCheck.m_fMarkTime = v2->m_kEffect.m_fMaxTime;
  CNSTimer_MarkCheck::ReSet(&v2->m_kMarkCheck, Timer::ms_fCurTime, OVER);
  _pEffect->m_kLocal.m_Translate.x = -130.0;
  _pEffect->m_kLocal.m_Translate.y = -135.0;
  _pEffect->m_kLocal.m_Translate.z = 50.0;
  ((void (__stdcall *)(NiAVObject *, signed int))v2->m_apkSlotWin[0]->vfptr[29].__vecDelDtor)(_pEffect, 1);
  NiAVObject::UpdateProperties((NiAVObject *)&v2->m_apkSlotWin[0]->vfptr);
  NiAVObject::UpdateEffects((NiAVObject *)&v2->m_apkSlotWin[0]->vfptr);
  v3 = v2->m_pkKarisSlot;
  v2->m_eState = 1;
  ((void (__stdcall *)(signed int))v3->vfptr[64].__vecDelDtor)(1);
  if ( v2->m_kEffect.m_fMaxTime < 1.0 )
    v4 = 0.0099999998;
  else
    v4 = v2->m_kEffect.m_fMaxTime / 100.0;
  v5 = v2->m_pkKarisSlot;
  v2->m_fKarisSlotAlpha = v4;
  ((void (__stdcall *)(_DWORD))v5->vfptr[69].__vecDelDtor)(0.0);
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (005415E0) --------------------------------------------------------
void __thiscall MakeKarisWin::UpdateEffect(MakeKarisWin *this, float fTime)
{
  double v2; // st7@1
  MakeKarisWin *v3; // esi@1
  int v4; // eax@1
  PgWinSpr *v5; // ecx@9
  NiRefObjectVtbl *v6; // edi@9
  float v7; // ST18_4@9
  PgWinSpr *v8; // ecx@11
  NiRefObjectVtbl *v9; // edi@11
  float v10; // ST18_4@11
  NiPointer<HazeAccumulator> v11; // [sp+18h] [bp-4h]@6

  v2 = Timer::ms_fCurTime;
  v3 = this;
  CNSTimer_MarkCheck::Update(&this->m_kMarkCheck, Timer::ms_fCurTime);
  if ( v4 == -1 )
  {
    v8 = v3->m_pkKarisSlot;
    v9 = v8->vfptr;
    ((void (*)(void))v8->vfptr[70].__vecDelDtor)();
    v10 = v2 + v3->m_fKarisSlotAlpha;
    v9[69].__vecDelDtor((NiRefObject *)v3->m_pkKarisSlot, LODWORD(v10));
  }
  else if ( v4 )
  {
    if ( v4 == 1 && v3->m_eState && v3->m_pCurObject )
    {
      ((void (__stdcall *)(NiPointer<HazeAccumulator> *, NiAVObject *))v3->m_apkSlotWin[0]->vfptr[30].__vecDelDtor)(
        &v11,
        v3->m_pCurObject);
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>(&v11);
      v3->m_pCurObject = 0;
      PgWin::SendMsg((PgWin *)&v3->vfptr, 0xDu, 0, 0);
      ((void (*)(void))v3->m_pkKarisSlot->vfptr[70].__vecDelDtor)();
      if ( v2 < 0.800000011920929 )
        ((void (__stdcall *)(_DWORD))v3->m_pkKarisSlot->vfptr[69].__vecDelDtor)(0.80000001);
    }
  }
  else if ( (unsigned __int8)((int (*)(void))v3->m_pkKarisSlot->vfptr[65].__vecDelDtor)() == 1 )
  {
    v5 = v3->m_pkKarisSlot;
    v6 = v5->vfptr;
    ((void (*)(void))v5->vfptr[70].__vecDelDtor)();
    v7 = v2 - (v3->m_fKarisSlotAlpha + v3->m_fKarisSlotAlpha);
    v6[69].__vecDelDtor((NiRefObject *)v3->m_pkKarisSlot, LODWORD(v7));
    ((void (*)(void))v3->m_pkKarisSlot->vfptr[70].__vecDelDtor)();
    if ( v7 <= 0.0 )
      ((void (__stdcall *)(_DWORD))v3->m_pkKarisSlot->vfptr[64].__vecDelDtor)(0);
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00541760) --------------------------------------------------------
void __thiscall MakeKarisWin::ClearAll(MakeKarisWin *this)
{
  MakeKarisWin *v1; // esi@1

  v1 = this;
  MakeKarisWin::ClearSlot(this);
  v1->m_eState = 0;
}

//----- (00541780) --------------------------------------------------------
void __thiscall MakeKarisWin::SendPacket(MakeKarisWin *this)
{
  KarisForgeSlotInvWin *v1; // eax@1
  PgFrameWork *v2; // ecx@2

  v1 = this->m_apkSlotWin[0];
  if ( v1 )
  {
    v2 = this->m_pkFrameWork;
    GameFrameWork::OnSendNCItemDisMantleReq(LOBYTE(v1->m_uiSenderInvIndex));
  }
}

//----- (005417A0) --------------------------------------------------------
void __thiscall MakeKarisWin::OnClose(MakeKarisWin *this)
{
  MakeKarisWin *v1; // esi@1
  void (__thiscall ***v2)(_DWORD, _DWORD); // edi@3
  int v3; // [sp+4h] [bp-4h]@2

  v1 = this;
  if ( this->m_eState )
  {
    ((void (__stdcall *)(int *, NiAVObject *))this->m_apkSlotWin[0]->vfptr[30].__vecDelDtor)(&v3, this->m_pCurObject);
    if ( v3 )
    {
      v2 = (void (__thiscall ***)(_DWORD, _DWORD))v3;
      if ( !InterlockedDecrement((volatile LONG *)(v3 + 4)) )
      {
        if ( v2 )
          (**v2)(v2, 1);
      }
    }
    ((void (__stdcall *)(_DWORD))v1->m_pkKarisSlot->vfptr[64].__vecDelDtor)(0);
  }
  GameFrameWork::NcActEndOfTrade((GameFrameWork *)v1->m_pkFrameWork);
  MakeKarisWin::ClearSlot(v1);
  v1->m_eState = 0;
}

//----- (00541830) --------------------------------------------------------
void __thiscall MakeKarisWin::_ProcessMsg(MakeKarisWin *this, unsigned int Msg, unsigned int wParam, int lParam)
{
  KarisForgeSlotInvWin *v4; // eax@2
  PgFrameWork *v5; // ecx@3

  if ( Msg == 13 )
  {
    v4 = this->m_apkSlotWin[0];
    if ( v4 )
    {
      v5 = this->m_pkFrameWork;
      GameFrameWork::OnSendNCItemDisMantleReq(LOBYTE(v4->m_uiSenderInvIndex));
    }
  }
}

//----- (00541860) --------------------------------------------------------
void __thiscall KarisForgeSlotInvWin::DoAction(KarisForgeSlotInvWin *this)
{
  KarisForgeSlotInvWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiInvIndex);
}

//----- (00541890) --------------------------------------------------------
void __thiscall KarisForgeSlotInvWin::DoRAction(KarisForgeSlotInvWin *this)
{
  KarisForgeSlotInvWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiRCmdMsg, v1->m_uiInvIndex);
}

//----- (005418C0) --------------------------------------------------------
void __thiscall MakeKarisWin::UpdateMeWin(MakeKarisWin *this, float fCurTime)
{
  MakeKarisWin *v2; // esi@1

  v2 = this;
  MakeKarisWin::UpdateEffect(this, fCurTime);
  if ( !ItemIcon::GetItem((ItemIcon *)&v2->m_apkSlotWin[0]->vfptr) )
    ((void (__stdcall *)(_DWORD))v2->m_pkKarisCount->vfptr[118].__vecDelDtor)(&unk_993DFC);
}

//----- (00541900) --------------------------------------------------------
char __stdcall MakeKarisWin::CheckCanEnableUpgrade(KarisForgeSlotInvWin *pSlot)
{
  char result; // al@2
  Item *v3; // esi@3
  char v4; // al@5
  ItemDismantle *v5; // edi@5
  signed int v6; // edi@7

  if ( pSlot )
  {
    v3 = ItemIcon::GetItem((ItemIcon *)&pSlot->vfptr);
    if ( v3 )
    {
      v4 = ((int (__thiscall *)(_DWORD))v3->vfptr[9].__vecDelDtor)(v3);
      v5 = ItemDismantleTab::GetObjByGrade(v4);
      if ( !v5 )
        goto LABEL_14;
      switch ( (unsigned __int8)((int (__thiscall *)(_DWORD))v3->vfptr[1].__vecDelDtor)(v3) )
      {
        case 8u:
          v6 = v5->Armor[v3->m_pkInfo->Grade + 4];
          break;
        case 6u:
          v6 = *(_DWORD *)((char *)v5 + 4 * v3->m_pkInfo->Grade - 2);
          break;
        case 7u:
          v6 = v5->Boot[v3->m_pkInfo->Grade + 4];
          break;
        case 5u:
          v6 = v5->Shield[v3->m_pkInfo->Grade + 4];
          break;
        case 4u:
          v6 = v5->Weapon[v3->m_pkInfo->Grade + 4];
          break;
        default:
          goto LABEL_14;
      }
      if ( v6 > 0 )
        result = 1;
      else
LABEL_14:
        result = 0;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (005419D0) --------------------------------------------------------
char __thiscall MakeKarisWin::DropForgeSlot(MakeKarisWin *this, unsigned int uiReceiverInvIndex, PgWinDrop *pkDrop)
{
  KarisForgeSlotInvWin *v3; // edi@1
  char result; // al@2
  void *v5; // ebx@3
  Item *v6; // esi@5
  char v7; // al@6
  KarisForgeSlotInvWin *v8; // eax@8
  unsigned int v9; // edi@10
  NiRefObjectVtbl *v10; // esi@16
  char *v11; // eax@16
  char *v12; // eax@16
  MakeKarisWin *v13; // [sp+4h] [bp-8h]@1
  ItemDismantle *pkDismantle; // [sp+8h] [bp-4h]@6

  v3 = this->m_apkSlotWin[uiReceiverInvIndex];
  v13 = this;
  if ( v3 )
  {
    v5 = pkDrop->m_pkContents;
    if ( v5 )
    {
      v6 = (Item *)*((_DWORD *)v5 + 5);
      if ( v6
        && (v7 = ((int (__thiscall *)(_DWORD))v6->vfptr[9].__vecDelDtor)(*((_DWORD *)v5 + 5)),
            (pkDismantle = ItemDismantleTab::GetObjByGrade(v7)) != 0) )
      {
        v8 = MakeKarisWin::GetInsertedOldSlot(v13, uiReceiverInvIndex);
        if ( v8 )
          ForgeSlotInvWin::ReSetSlot((ForgeSlotInvWin *)&v8->vfptr);
        v3->m_uiSenderType = *((_DWORD *)v5 + 2);
        v3->m_uiSenderInvIndex = *((_DWORD *)v5 + 3);
        v3->m_pkSender = pkDrop->m_pkSender;
        ItemIcon::SetItem((ItemIcon *)&v3->vfptr, v6, 1);
        MakeKarisWin::EnableSprSlot(v13, uiReceiverInvIndex);
        ForgeSlotInvWin::SetSenderInvSlotLock((ForgeSlotInvWin *)&v3->vfptr, 1);
        v9 = 0;
        switch ( (unsigned __int8)((int (__thiscall *)(Item *))v6->vfptr[1].__vecDelDtor)(v6) )
        {
          case 8u:
            v9 = pkDismantle->Armor[v6->m_pkInfo->Grade + 4];
            break;
          case 6u:
            v9 = *(_DWORD *)((char *)pkDismantle + 4 * v6->m_pkInfo->Grade - 2);
            break;
          case 7u:
            v9 = pkDismantle->Boot[v6->m_pkInfo->Grade + 4];
            break;
          case 5u:
            v9 = pkDismantle->Shield[v6->m_pkInfo->Grade + 4];
            break;
          case 4u:
            v9 = pkDismantle->Weapon[v6->m_pkInfo->Grade + 4];
            break;
          default:
            break;
        }
        v10 = v13->m_pkKarisCount->vfptr;
        v11 = (char *)TextData::Get(0x403C7D83u);
        v12 = fs(v11, v9);
        v10[118].__vecDelDtor((NiRefObject *)v13->m_pkKarisCount, (unsigned int)v12);
        result = 1;
      }
      else
      {
        result = 0;
      }
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00541B50) --------------------------------------------------------
void __thiscall MakeKarisWin::StartEffectt(MakeKarisWin *this)
{
  MakeKarisWin *v1; // esi@1
  GameFrameWork *v2; // esi@8
  NiUnsharedGeometryGroup *v3; // eax@8
  unsigned int v4; // [sp-4h] [bp-8h]@5

  v1 = this;
  if ( this->m_eState )
  {
    v4 = 913670526;
  }
  else if ( ItemIcon::GetItem((ItemIcon *)&this->m_apkSlotWin[0]->vfptr) )
  {
    if ( MakeKarisWin::CheckCanEnableUpgrade(v1->m_apkSlotWin[0]) == 1 )
    {
      MakeKarisWin::StartEffect(v1, (NiAVObject *)&v1->m_spEffect.m_pObject->vfptr);
      return;
    }
    v4 = -1479362343;
  }
  else
  {
    v4 = 940845358;
  }
  v2 = (GameFrameWork *)v1->m_pkFrameWork;
  v3 = TextData::Get(v4);
  GameFrameWork::AddSysMsg(v2, (const char *)v3);
}

//----- (00541BC0) --------------------------------------------------------
void __thiscall MakeKarisWin::OnStart(MakeKarisWin *this)
{
  MakeKarisWin *v1; // esi@1
  char *v2; // eax@1
  MsgBox *v3; // edi@1
  PgFrameWork *v4; // eax@1
  int v5; // eax@2
  PgMsg::Frame kCancelMsg; // [sp+8h] [bp-2Ch]@1
  PgMsg::Frame kOkMsg; // [sp+1Ch] [bp-18h]@1

  v1 = this;
  v2 = (char *)TextData::Get(0x8FEFDECF);
  v3 = MsgBox::Modal(MSGBOX_OKCANCEL, v2);
  kCancelMsg.m_uiFrameMsg = 272;
  kOkMsg.m_uiFramelParam = 272;
  kOkMsg.m_uiFrameMsg = 271;
  v4 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  MsgBox::SetFrameWorkMsgOnClose(v3, v4, &kOkMsg, &kCancelMsg);
  if ( v1 )
    v5 = (int)&v1->vfptr;
  else
    v5 = 0;
  v3->vfptr->SetMsgHooker(&v3->vfptr, v5);
}

//----- (00541C50) --------------------------------------------------------
char __thiscall KarisForgeSlotInvWin::EatDropInstance(KarisForgeSlotInvWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  KarisForgeSlotInvWin *v4; // esi@1
  char result; // al@2
  _DWORD *v6; // eax@4
  int v7; // eax@6
  MakeKarisWin *v8; // eax@9
  GameFrameWork *v9; // esi@10
  NiUnsharedGeometryGroup *v10; // eax@10

  v4 = this;
  if ( this->m_bLock )
  {
    PgCursor::ms_bKeepDrop = 1;
    return 0;
  }
  if ( !*pkDrop )
    return 0;
  v6 = (*pkDrop)->m_pkContents;
  if ( v6[2] || v6[4] || (v7 = v6[5]) == 0 || this->m_uiInvType != 6 )
  {
    PgCursor::ms_bKeepDrop = 1;
    return 0;
  }
  if ( *(_BYTE *)(*(_DWORD *)(v7 + 112) + 240) )
  {
    v8 = (MakeKarisWin *)PgWin::GetParentWin((PgWin *)&this->vfptr);
    result = MakeKarisWin::DropForgeSlot(v8, v4->m_uiInvIndex, *pkDrop);
  }
  else
  {
    v9 = (GameFrameWork *)this->m_pkFrameWork;
    v10 = TextData::Get(0xA7D2B8D9);
    GameFrameWork::AddSysMsg(v9, (const char *)v10);
    result = 0;
  }
  return result;
}
// B648B8: using guessed type bool PgCursor::ms_bKeepDrop;

//----- (00541D00) --------------------------------------------------------
void __thiscall MakeKarisWin::OnCommand(MakeKarisWin *this, unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@5

  switch ( wParam )
  {
    case 0xCu:
      MakeKarisWin::OnStart(this);
      break;
    case 0xFu:
      GameFrameWork::OnShowMakeKarisWin((GameFrameWork *)this->m_pkFrameWork, 0);
      break;
    case 0x10u:
      MakeKarisWin::OnSlotLClick(this, lParam);
      break;
    case 0x11u:
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v3 )
        GameFrameWork::OpenPlayGuideSearchList(v3, "makekaris");
      break;
    default:
      return;
  }
}

//----- (00541D80) --------------------------------------------------------
KarisForgeSlotInvWin *__cdecl KarisForgeSlotInvWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent, PgFrameWork *pkFrameWork)
{
  PgWin *v5; // eax@1
  PgWin *v6; // eax@2
  PgWin *v7; // esi@2
  PgWin *v8; // edi@8
  KarisForgeSlotInvWin *v9; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v11; // [sp+20h] [bp-4h]@1

  v5 = (PgWin *)operator new(0x1DCu);
  result.m_pObject = v5;
  v11 = 0;
  if ( v5 )
  {
    KarisForgeSlotInvWin::KarisForgeSlotInvWin((KarisForgeSlotInvWin *)v5);
    v7 = v6;
  }
  else
  {
    v7 = 0;
  }
  if ( v7 )
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  v11 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v7);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, PgWin *, PgFrameWork *))v7->vfptr[154].__vecDelDtor)(
                          v7,
                          iXPos,
                          iYPos,
                          uiInvIndex,
                          pkParent,
                          pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v7->vfptr[89].__vecDelDtor)(v7);
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = (KarisForgeSlotInvWin *)v7;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v7);
    if ( result.m_pObject )
    {
      v8 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v8 )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      }
    }
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = 0;
  }
  return v9;
}

//----- (00541EC0) --------------------------------------------------------
MakeKarisWin *__cdecl MakeKarisWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  MakeKarisWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x228u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    MakeKarisWin::MakeKarisWin((MakeKarisWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (MakeKarisWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00541FF0) --------------------------------------------------------
char __thiscall MakeKarisWin::Create(MakeKarisWin *this, PgFrameWork *pkFrameWork)
{
  MakeKarisWin *v2; // esi@1
  const char *v3; // eax@3
  NiObjectNET *v4; // eax@3
  NiNode *v5; // edi@3
  NiNode *v6; // ebx@3
  NiTexturePalette *v7; // edi@10
  const char *v8; // eax@12
  PgSprData *v9; // eax@13
  NiNode *v10; // esi@14
  LONG v11; // eax@15
  char result; // al@19
  PgFont *v13; // eax@21
  PgWinText *v14; // edi@21
  NiRefObjectVtbl *v15; // ebx@21
  NiUnsharedGeometryGroup *v16; // eax@21
  PgSprData *v17; // eax@21
  PgSprData *v18; // eax@21
  PgSprData *v19; // eax@21
  PgWinSpr *v20; // eax@21
  PgSprData *v21; // eax@21
  PgSprData *v22; // eax@21
  PgWinSpr *v23; // eax@21
  unsigned int v24; // edi@21
  int v25; // ebx@22
  PgSprData *v26; // eax@22
  PgWinSpr *v27; // eax@22
  char *v28; // eax@22
  KarisForgeSlotInvWin *v29; // eax@22
  char *v30; // eax@23
  PgSprData *v31; // eax@28
  PgFont *v32; // eax@28
  PgWinText *v33; // edi@28
  NiRefObjectVtbl *v34; // ebx@28
  NiUnsharedGeometryGroup *v35; // eax@28
  NiNode *v36; // esi@29
  PgSprData *v37; // eax@33
  PgFont *v38; // eax@33
  PgWinText *v39; // eax@33
  PgSprData *v40; // edi@33
  NiSourceTexture *v41; // edi@33
  PgSprData *v42; // edi@34
  PgSprData *v43; // edi@35
  PgSprData::PgHitTester *v44; // eax@35
  unsigned int v45; // edi@35
  unsigned int v46; // ebx@35
  PgFont *v47; // eax@35
  PgWinText *v48; // edi@35
  NiRefObjectVtbl *v49; // ebx@35
  NiUnsharedGeometryGroup *v50; // eax@35
  PgSprData *v51; // edi@35
  NiPointer<PgSprData::PgHitTester> *v52; // edx@35
  unsigned int v53; // edi@35
  unsigned int v54; // ebx@35
  PgFont *v55; // eax@35
  PgWinText *v56; // edi@35
  NiRefObjectVtbl *v57; // ebx@35
  NiUnsharedGeometryGroup *v58; // eax@35
  NiNode *v59; // esi@36
  unsigned int uiHeight; // [sp+88h] [bp-50h]@1
  unsigned int uiWidth; // [sp+8Ch] [bp-4Ch]@1
  int iOffY; // [sp+90h] [bp-48h]@1
  int iOffX; // [sp+94h] [bp-44h]@1
  NiPointer<NiNode> spNode; // [sp+98h] [bp-40h]@1
  int iTop; // [sp+9Ch] [bp-3Ch]@1
  int iLeft; // [sp+A0h] [bp-38h]@1
  char acShapeName[33]; // [sp+A4h] [bp-34h]@22
  int v68; // [sp+D4h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v68 = 0;
  uiWidth = 0;
  uiHeight = 0;
  iTop = 0;
  iLeft = 0;
  iOffX = 0;
  iOffY = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v3 = Folder::Merge(&Folder::m_acEffect, "Karis_Effect01.nif");
  v4 = Ns_LoadNifFile(v3, 0);
  v5 = v2->m_spEffect.m_pObject;
  v6 = (NiNode *)v4;
  if ( (NiObjectNET *)v5 != v4 )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v2->m_spEffect.m_pObject = v6;
    if ( v6 )
      InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "Game\\makekaris.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iOffX, &iOffY, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "MakeKarisWin", 0)
    || !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &iLeft, &iTop, &uiWidth, &uiHeight) )
  {
    v10 = spNode.m_pObject;
    v68 = -1;
    if ( spNode.m_pObject )
    {
      v11 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
      goto LABEL_16;
    }
    return 0;
  }
  v13 = Font::Get(MAIN_MENU);
  v14 = PgWinText::CreateWin(iLeft - iOffX, iTop - iOffY, uiWidth, uiHeight, v13, (PgWin *)&v2->vfptr, 0, 0);
  v14->vfptr[122].__vecDelDtor((NiRefObject *)v14, 5u);
  v14->vfptr[117].__vecDelDtor((NiRefObject *)v14, (unsigned int)&Color::m_kDxWinTitleColor);
  v15 = v14->vfptr;
  v16 = TextData::Get(0x3F367F81u);
  v15[118].__vecDelDtor((NiRefObject *)v14, (unsigned int)v16);
  v14->vfptr[60].__vecDelDtor((NiRefObject *)v14, 0);
  v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft - iOffX, iTop - iOffY, v17, (PgWin *)&v2->vfptr, 0, 0);
  v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ImageBack01", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft - iOffX, iTop - iOffY, v18, (PgWin *)&v2->vfptr, 0, 0);
  v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &iLeft, &iTop, 0);
  v20 = PgWinSpr::CreateWin(iLeft - iOffX, iTop - iOffY, v19, (PgWin *)&v2->vfptr, 0, 0);
  v20->vfptr[60].__vecDelDtor((NiRefObject *)v20, 0);
  v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft - iOffX, iTop - iOffY, v21, (PgWin *)&v2->vfptr, 0, 0);
  v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ForgeSlot02", &iLeft, &iTop, 0);
  v23 = PgWinSpr::CreateWin(iLeft - iOffX, iTop - iOffY, v22, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkKarisSlot = v23;
  v23->vfptr[64].__vecDelDtor((NiRefObject *)v23, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkKarisSlot->vfptr[60].__vecDelDtor)(0);
  v24 = 0;
  do
  {
    v25 = v24 + 1;
    *(_DWORD *)acShapeName = 0;
    *(_DWORD *)&acShapeName[4] = 0;
    *(_DWORD *)&acShapeName[8] = 0;
    *(_DWORD *)&acShapeName[12] = 0;
    *(_DWORD *)&acShapeName[16] = 0;
    *(_DWORD *)&acShapeName[20] = 0;
    *(_DWORD *)&acShapeName[24] = 0;
    *(_DWORD *)&acShapeName[28] = 0;
    acShapeName[32] = 0;
    sprintf(acShapeName, "ForgeSlot%02d", v24 + 1);
    v26 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &iLeft, &iTop, 0);
    v27 = PgWinSpr::CreateWin(iLeft - iOffX, iTop - iOffY, v26, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_apkSprSlotWin[v24] = v27;
    v27->m_pkToolTipWin = g_pkToolTipWin;
    v28 = (char *)TextData2::Get(0x5B4D2295u);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_apkSprSlotWin[v24]->vfptr, v28);
    ((void (__stdcall *)(signed int))v2->m_apkSprSlotWin[v24]->vfptr[60].__vecDelDtor)(1);
    v29 = KarisForgeSlotInvWin::CreateWin(iLeft - iOffX, iTop - iOffY, v24, (PgWin *)&v2->vfptr, pkFrameWork);
    v2->m_apkSlotWin[v24] = v29;
    v29->vfptr[60].__vecDelDtor((NiRefObject *)v29, 1u);
    v2->m_apkSlotWin[v24]->m_eType = 1;
    IconWin::ShowFocus((IconWin *)&v2->m_apkSlotWin[v24]->vfptr, 1);
    ((void (__stdcall *)(signed int))v2->m_apkSlotWin[v24]->vfptr[64].__vecDelDtor)(1);
    if ( !v24 )
    {
      ((void (__stdcall *)(signed int))v2->m_apkSlotWin[0]->vfptr[129].__vecDelDtor)(16);
      ForgeSlotInvWin::SetSlotType((ForgeSlotInvWin *)&v2->m_apkSlotWin[0]->vfptr, 6u);
      v30 = (char *)TextData2::Get(0x8DF3F602);
      PgWin::SetToolTipWinText((PgWin *)&v2->m_apkSlotWin[0]->vfptr, v30);
      v2->m_apkSlotWin[0]->m_pkToolTipWin = g_pkToolTipWin;
    }
    ItemIcon::SetItem((ItemIcon *)&v2->m_apkSlotWin[v24++]->vfptr, 0, 1);
  }
  while ( v25 < 1 );
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "ForgeText01",
          &iLeft,
          &iTop,
          &uiWidth,
          &uiHeight) )
  {
    v10 = spNode.m_pObject;
    v68 = -1;
    if ( spNode.m_pObject )
    {
      v11 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
LABEL_16:
      if ( !v11 )
      {
        if ( v10 )
          v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
      }
      return 0;
    }
    return 0;
  }
  v31 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ForgeText01", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft - iOffX, iTop - iOffY, v31, (PgWin *)&v2->vfptr, 0, 0);
  v32 = Font::Get(MAIN_MENU);
  v33 = PgWinText::CreateWin(iLeft - iOffX, iTop - iOffY, uiWidth, uiHeight, v32, (PgWin *)&v2->vfptr, 0, 0);
  v33->vfptr[122].__vecDelDtor((NiRefObject *)v33, 5u);
  v33->vfptr[117].__vecDelDtor((NiRefObject *)v33, (unsigned int)&Color::m_kDxWinTitleColor);
  v34 = v33->vfptr;
  v35 = TextData::Get(0x847C8683);
  v34[118].__vecDelDtor((NiRefObject *)v33, (unsigned int)v35);
  v33->vfptr[60].__vecDelDtor((NiRefObject *)v33, 0);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "ForgeText", &iLeft, &iTop, &uiWidth, &uiHeight) )
  {
    v37 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ForgeText", &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft - iOffX, iTop - iOffY, v37, (PgWin *)&v2->vfptr, 0, 0);
    v38 = Font::Get(MAIN_MENU);
    v39 = PgWinText::CreateWin(iLeft - iOffX, iTop - iOffY, uiWidth, uiHeight, v38, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkKarisCount = v39;
    v39->vfptr[122].__vecDelDtor((NiRefObject *)v39, 5u);
    ((void (__stdcall *)(struct D3DXCOLOR *))v2->m_pkKarisCount->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
    ((void (__stdcall *)(void *))v2->m_pkKarisCount->vfptr[118].__vecDelDtor)(&unk_993DFD);
    ((void (__stdcall *)(_DWORD))v2->m_pkKarisCount->vfptr[60].__vecDelDtor)(0);
    v40 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &iLeft, &iTop, 0);
    PgSprData::Add(v40, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
    PgSprData::Add(v40, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
    PgWinCloseBut::CreateWin(iLeft - iOffX, iTop - iOffY, v40, (PgWin *)&v2->vfptr);
    v41 = MenuTexMgr::GetTexture(4u);
    if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
    {
      v42 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &iLeft, &iTop, v41);
      PgSprData::Add(v42, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
      PgSprData::Add(v42, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
      PgWinBut::CreateWin(iLeft - iOffX, iTop - iOffY, v42, (PgWin *)&v2->vfptr, 0x11u, 0, 0);
    }
    v43 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "OkNor", &iLeft, &iTop, 0);
    PgSprData::Add(v43, (NiAVObject *)&spNode.m_pObject->vfptr, "OkClick");
    PgSprData::Add(v43, (NiAVObject *)&spNode.m_pObject->vfptr, "OkOver");
    PgWinBut::CreateWin(iLeft - iOffX, iTop - iOffY, v43, (PgWin *)&v2->vfptr, 0xCu, 0, 0);
    v44 = v43->m_akHitTester.m_pBase->m_pObject;
    v45 = v44->m_uiHeight;
    v46 = v44->m_uiWidth;
    v47 = Font::Get(MAIN_MENU);
    v48 = PgWinText::CreateWin(iLeft - iOffX, iTop - iOffY, v46, v45, v47, (PgWin *)&v2->vfptr, 0, 0);
    v48->vfptr[122].__vecDelDtor((NiRefObject *)v48, 5u);
    v49 = v48->vfptr;
    v50 = TextData::Get(0x6D874F7Au);
    v49[118].__vecDelDtor((NiRefObject *)v48, (unsigned int)v50);
    v48->vfptr[60].__vecDelDtor((NiRefObject *)v48, 0);
    v51 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CancelNor", &iLeft, &iTop, 0);
    PgSprData::Add(v51, (NiAVObject *)&spNode.m_pObject->vfptr, "CancelClick");
    PgSprData::Add(v51, (NiAVObject *)&spNode.m_pObject->vfptr, "CancelOver");
    PgWinBut::CreateWin(iLeft - iOffX, iTop - iOffY, v51, (PgWin *)&v2->vfptr, 0xFu, 0, 0);
    v52 = v51->m_akHitTester.m_pBase;
    v53 = v52->m_pObject->m_uiHeight;
    v54 = v52->m_pObject->m_uiWidth;
    v55 = Font::Get(MAIN_MENU);
    v56 = PgWinText::CreateWin(iLeft - iOffX, iTop - iOffY, v54, v53, v55, (PgWin *)&v2->vfptr, 0, 0);
    v56->vfptr[122].__vecDelDtor((NiRefObject *)v56, 5u);
    v57 = v56->vfptr;
    v58 = TextData::Get(0x88A297E1);
    v57[118].__vecDelDtor((NiRefObject *)v56, (unsigned int)v58);
    v56->vfptr[60].__vecDelDtor((NiRefObject *)v56, 0);
    PgWin::InitPos((PgWin *)&v2->vfptr, PgWin::ms_uiScreenWidth, PgWin::ms_uiScreenHeight, 0.30000001, 0.5);
    v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 0);
    v68 = -1;
    if ( spNode.m_pObject )
    {
      v59 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v59 )
          v59->vfptr->__vecDelDtor((NiRefObject *)v59, 1u);
      }
    }
    result = 1;
  }
  else
  {
    v36 = spNode.m_pObject;
    v68 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v36 )
      return 0;
    v36->vfptr->__vecDelDtor((NiRefObject *)v36, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00542960) --------------------------------------------------------
KarisForgeSlotInvWin *__thiscall KarisForgeSlotInvWin::`vector deleting destructor'(KarisForgeSlotInvWin *this, unsigned int a2)
{
  KarisForgeSlotInvWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&KarisForgeSlotInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&KarisForgeSlotInvWin::`vftable'{for `IDirectMessenger'};
  ForgeSlotInvWin::~ForgeSlotInvWin((ForgeSlotInvWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 993F60: using guessed type void (__thiscall *KarisForgeSlotInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 993F7C: using guessed type int (__thiscall *KarisForgeSlotInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005429A0) --------------------------------------------------------
ItemDismantle *__cdecl ItemDismantleTab::GetObjByGrade(char byGrade)
{
  int v1; // eax@1
  unsigned int v2; // edi@2
  unsigned int v3; // esi@4
  ItemDismantle *result; // eax@7

  v1 = *(_DWORD *)(ITableBase<ItemDismantle,ItemDismantleTab>::ms_pkTable + 56);
  if ( v1 )
    v2 = *(_DWORD *)(v1 + 40);
  else
    v2 = 0;
  v3 = 0;
  if ( v2 )
  {
    while ( CDataReader::GetRecord((CDataReader *)(ITableBase<ItemDismantle,ItemDismantleTab>::ms_pkTable + 4), v3)[1] != byGrade )
    {
      if ( ++v3 >= v2 )
        goto LABEL_7;
    }
    result = (ItemDismantle *)CDataReader::GetRecord(
                                (CDataReader *)(ITableBase<ItemDismantle,ItemDismantleTab>::ms_pkTable + 4),
                                v3);
  }
  else
  {
LABEL_7:
    result = 0;
  }
  return result;
}
// A8C194: using guessed type int ITableBase<ItemDismantle,ItemDismantleTab>::ms_pkTable;

//----- (00542A00) --------------------------------------------------------
MakeKarisWin *__thiscall MakeKarisWin::`vector deleting destructor'(MakeKarisWin *this, unsigned int a2)
{
  MakeKarisWin *v2; // esi@1

  v2 = this;
  MakeKarisWin::~MakeKarisWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00542A30) --------------------------------------------------------
void __thiscall MapLinkGateWin::OnWinClose(MapLinkGateWin *this)
{
  this->m_bInputEnable = 0;
  GameFrameWork::CloseMapLinkGateWin((GameFrameWork *)this->m_pkFrameWork);
}

//----- (00542A50) --------------------------------------------------------
void __thiscall MapLinkGateWin::OnClose(MapLinkGateWin *this)
{
  MapLinkGateWin *v1; // esi@1
  GameFrameWork *v2; // ecx@1

  v1 = this;
  v2 = (GameFrameWork *)this->m_pkFrameWork;
  v1->m_bInputEnable = 0;
  GameFrameWork::NcActEndOfTrade(v2);
  v1->m_uiMapLinkPage = 0;
}

//----- (00542A80) --------------------------------------------------------
void __thiscall MapLinkGateWin::NoLinkMapData(MapLinkGateWin *this, int nCurrentDataCnt)
{
  char *v2; // esi@2
  char *v3; // edi@5
  NiImageConverter *v4; // eax@6
  NiPixelData *v5; // eax@6
  NiSourceTexture *v6; // eax@7
  NiTexture::FormatPrefs kPrefs; // [sp+0h] [bp-Ch]@7
  int nCurrentDataCnta; // [sp+14h] [bp+8h]@2

  if ( nCurrentDataCnt < 3 )
  {
    v2 = (char *)&this->m_apkBtns[nCurrentDataCnt];
    nCurrentDataCnta = 3 - nCurrentDataCnt;
    do
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      v3 = fs("%s\\TownPortal\\NoneMap.dds", &Folder::m_acMenu);
      if ( v3 )
      {
        v4 = NiImageConverter::GetImageConverter();
        v5 = (NiPixelData *)((int (__thiscall *)(_DWORD, _DWORD, _DWORD))v4->vfptr[2].__vecDelDtor)(v4, v3, 0);
        if ( v5 )
        {
          kPrefs.m_ePixelLayout = 6;
          kPrefs.m_eAlphaFmt = 3;
          kPrefs.m_eMipMapped = 0;
          v6 = NiSourceTexture::Create(v5, &kPrefs);
          if ( v6 )
          {
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 452))(v6);
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 240))(0);
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 256))(1);
          }
        }
      }
      v2 += 4;
      --nCurrentDataCnta;
    }
    while ( nCurrentDataCnta );
  }
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00542B50) --------------------------------------------------------
void __thiscall MapLinkGateWin::MapLinkGateWin(MapLinkGateWin *this)
{
  MapLinkGateWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&MapLinkGateWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MapLinkGateWin::`vftable'{for `IDirectMessenger'};
  v1->m_spMtrlProp.m_pObject = 0;
  v1->m_apkBtns[0] = 0;
  v1->m_apkTexts[0] = 0;
  v1->m_apkLevelTexts[0] = 0;
  v1->m_apkBtns[1] = 0;
  v1->m_apkTexts[1] = 0;
  v1->m_apkLevelTexts[1] = 0;
  v1->m_apkBtns[2] = 0;
  v1->m_apkTexts[2] = 0;
  v1->m_apkLevelTexts[2] = 0;
  v1->m_kAlphaControl.fTimeLeftToAppear = 1.0;
  v1->m_bInputEnable = 0;
  v1->m_pkCloseBtn = 0;
  v1->m_kAlphaControl.fAlphaValue = 0.0;
  v1->m_uiMapLinkPage = 0;
  v1->m_uiMaxPage = 0;
}
// 994620: using guessed type void (__thiscall *MapLinkGateWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99463C: using guessed type int (__thiscall *MapLinkGateWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00542BE0) --------------------------------------------------------
void __thiscall MapLinkGateWin::~MapLinkGateWin(MapLinkGateWin *this)
{
  MapLinkGateWin *v1; // esi@1
  NiMaterialProperty *v2; // edi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&MapLinkGateWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MapLinkGateWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spMtrlProp.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 994620: using guessed type void (__thiscall *MapLinkGateWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99463C: using guessed type int (__thiscall *MapLinkGateWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00542C70) --------------------------------------------------------
void __thiscall MapLinkGateWin::UpdateMeWin(MapLinkGateWin *this, float fCurTime)
{
  MapLinkGateWin *v2; // ebx@1
  double v3; // st7@2
  float v4; // ST10_4@3
  float v5; // ST10_4@6
  float v6; // ST10_4@6
  NiMaterialProperty *v7; // eax@7
  float v8; // ST10_4@7
  NiObjectNET **v9; // esi@9
  NiExtraData *v10; // eax@11
  unsigned int v11; // edi@12
  unsigned int v12; // eax@12
  void *(__thiscall *v13)(NiRefObject *, unsigned int); // edx@12
  PgWinBut *v14; // ecx@16
  float fSin; // [sp+4h] [bp-4h]@9

  v2 = this;
  if ( !unk_B6484C )
  {
    v3 = 1.0;
    if ( this->m_kAlphaControl.fAlphaValue >= 1.0 )
    {
      if ( !this->m_bInputEnable )
      {
        v9 = (NiObjectNET **)this->m_apkBtns;
        LODWORD(fSin) = 3;
        do
        {
          if ( *v9 )
          {
            v10 = NiObjectNET::GetExtraData(*v9, "MinLV");
            if ( v10 )
            {
              v11 = atoi((const char *)v10[1].vfptr);
              v12 = User::Lv(&g_kUser);
              v13 = (*v9)->vfptr[60].__vecDelDtor;
              if ( v12 >= v11 )
                ((void (__stdcall *)(signed int))v13)(1);
              else
                ((void (__stdcall *)(_DWORD))v13)(0);
            }
          }
          ++v9;
          --LODWORD(fSin);
        }
        while ( fSin != 0.0 );
        v14 = v2->m_pkCloseBtn;
        v2->m_bInputEnable = 1;
        ((void (__stdcall *)(signed int))v14->vfptr[60].__vecDelDtor)(1);
      }
    }
    else
    {
      v4 = this->m_kAlphaControl.fAlphaValue + Timer::ms_fDeltaTime;
      this->m_kAlphaControl.fAlphaValue = v4;
      if ( v4 > 1.0 )
        this->m_kAlphaControl.fAlphaValue = 1.0;
      if ( this->m_kAlphaControl.fAlphaValue < 1.0 )
      {
        v5 = this->m_kAlphaControl.fAlphaValue * NI_HALF_PI;
        v6 = sin(v5);
        v3 = v6;
      }
      v7 = this->m_spMtrlProp.m_pObject;
      v8 = v3;
      ++v7->m_uiRevID;
      v7->m_fAlpha = v8;
    }
  }
}
// A8B980: using guessed type float Timer::ms_fDeltaTime;
// B622D0: using guessed type const float NI_HALF_PI;

//----- (00542D90) --------------------------------------------------------
void __thiscall MapLinkGateWin::ShowLinkGate(MapLinkGateWin *this)
{
  MapLinkGateWin *v1; // esi@1
  char *v2; // ebx@1
  unsigned int v3; // edi@1
  Name3 *v4; // eax@3
  PgWinText **v5; // ebx@4
  NiObjectNET **v6; // esi@4
  char *v7; // eax@6
  char *v8; // eax@7
  char *v9; // edi@8
  char *v10; // edi@10
  NiImageConverter *v11; // eax@11
  NiPixelData *v12; // eax@11
  NiRefObjectVtbl *v13; // edi@13
  char *v14; // eax@13
  char *v15; // eax@13
  int v16; // edi@13
  char *v17; // edi@14
  unsigned int v18; // eax@14
  CDataReader *v19; // ecx@14
  char *v20; // edi@15
  char *v21; // edi@17
  NiImageConverter *v22; // eax@18
  NiPixelData *v23; // eax@18
  NiTexture::FormatPrefs *v24; // ecx@19
  char *v25; // edi@20
  char *v26; // edi@22
  NiImageConverter *v27; // eax@23
  NiSourceTexture *v28; // eax@25
  NiStringExtraData *v29; // eax@27
  NiStringExtraData *v30; // edi@27
  NiExtraData *v31; // eax@27
  char *v32; // eax@28
  NiObjectNET *v33; // ecx@29
  unsigned int v34; // edi@29
  const char *v35; // eax@30
  NiExtraData *v36; // eax@30
  NiObjectNET *v37; // ecx@32
  unsigned int v38; // eax@32
  NiRefObjectVtbl *v39; // edx@32
  char *v40; // eax@33
  char *v41; // eax@33
  PgWinBut *v42; // ecx@42
  Name3 result; // [sp+10h] [bp-68h]@3
  NiTexture::FormatPrefs kPrefs; // [sp+1Ch] [bp-5Ch]@12
  int v45; // [sp+28h] [bp-50h]@24
  int v46; // [sp+2Ch] [bp-4Ch]@24
  int v47; // [sp+30h] [bp-48h]@24
  NiTexture::FormatPrefs v48; // [sp+34h] [bp-44h]@19
  MapInfo *pkLoginMapInfo; // [sp+40h] [bp-38h]@3
  MapLinkGateWin *v50; // [sp+44h] [bp-34h]@1
  NiStringExtraData *v51; // [sp+48h] [bp-30h]@27
  const char *v52; // [sp+4Ch] [bp-2Ch]@1
  PgWinText **v53; // [sp+50h] [bp-28h]@4
  int iBtnCount; // [sp+54h] [bp-24h]@3
  unsigned int i; // [sp+58h] [bp-20h]@3
  char dest[4]; // [sp+5Ch] [bp-1Ch]@7
  int v57; // [sp+60h] [bp-18h]@7
  int v58; // [sp+64h] [bp-14h]@7
  int v59; // [sp+74h] [bp-4h]@27

  v1 = this;
  v2 = (char *)this->m_apkBtns;
  v50 = this;
  v52 = (const char *)this->m_apkBtns;
  v3 = 3;
  do
  {
    NiObjectNET::RemoveExtraData(*(NiObjectNET **)v2, "action");
    NiObjectNET::RemoveExtraData(*(NiObjectNET **)v2, "MinLV");
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 256))(0);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v2 + 3) + 256))(0);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v2 + 6) + 256))(0);
    v2 += 4;
    --v3;
  }
  while ( v3 );
  v4 = World::GetMapName(&g_kWorld, &result);
  pkLoginMapInfo = MapInfoTab::GetByMapName(v4);
  iBtnCount = 0;
  i = 0;
  if ( ITableBase<TownPortal,TownPortalInfoTable>::GetTotal() )
  {
    v5 = v1->m_apkLevelTexts;
    v53 = v1->m_apkTexts;
    v6 = (NiObjectNET **)v52;
    while ( 1 )
    {
      if ( iBtnCount >= 3 )
      {
LABEL_41:
        v1 = v50;
        goto LABEL_42;
      }
      v7 = CDataReader::GetRecord((CDataReader *)(ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable + 4), v3);
      if ( v50->m_uiMapLinkPage == (unsigned __int8)v7[2] )
        break;
LABEL_37:
      i = ++v3;
      if ( v3 >= ITableBase<TownPortal,TownPortalInfoTable>::GetTotal() )
      {
        if ( iBtnCount < 3 )
        {
          v1 = v50;
          goto LABEL_40;
        }
        goto LABEL_41;
      }
    }
    v8 = CDataReader::GetRecord((CDataReader *)(ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable + 4), v3);
    v58 = 0;
    v57 = 0;
    *(_DWORD *)dest = 0;
    strncpy(dest, v8 + 3, 0xCu);
    v52 = MapInfoTab::GetByMapName((Name3 *)dest)->Name;
    if ( !strcmp(pkLoginMapInfo->Name, v52) )
    {
      v9 = CDataReader::GetRecord((CDataReader *)(ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable + 4), i);
      if ( !Folder::m_bInit )
        Folder::Init();
      v10 = fs("%s\\TownPortal\\%s_disable.DDS", &Folder::m_acMenu, v9 + 3);
      if ( v10 )
      {
        v11 = NiImageConverter::GetImageConverter();
        v12 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v11->vfptr[2].__vecDelDtor)(
                               v11,
                               v10,
                               0);
        v10 = 0;
        if ( v12 )
        {
          kPrefs.m_ePixelLayout = 6;
          kPrefs.m_eAlphaFmt = 3;
          kPrefs.m_eMipMapped = 0;
          v10 = (char *)NiSourceTexture::Create(v12, &kPrefs);
        }
      }
      ((void (__stdcall *)(signed int))(*v53)->vfptr[64].__vecDelDtor)(1);
      ((void (__stdcall *)(char *))(*v6)->vfptr[113].__vecDelDtor)(v10);
      ((void (__stdcall *)(_DWORD))(*v6)->vfptr[60].__vecDelDtor)(0);
      ((void (__stdcall *)(signed int))(*v6)->vfptr[64].__vecDelDtor)(1);
      v13 = (*v5)->vfptr;
      v14 = (char *)TextData3::Get(0x7CA1DBE4u);
      v15 = fs(v14);
      v13[118].__vecDelDtor((NiRefObject *)*v5, (unsigned int)v15);
      ((void (__stdcall *)(signed int))(*v5)->vfptr[64].__vecDelDtor)(1);
      ((void (__stdcall *)(struct D3DXCOLOR *))(*v5)->vfptr[117].__vecDelDtor)(&Color::m_kDxBlueColor);
      v16 = (int)v53;
      ((void (__stdcall *)(const char *))(*v53)->vfptr[118].__vecDelDtor)(v52);
      (*(void (__stdcall **)(signed int))(**(_DWORD **)v16 + 256))(1);
      v53 = (PgWinText **)(v16 + 4);
LABEL_36:
      ++iBtnCount;
      v3 = i;
      ++v6;
      ++v5;
      goto LABEL_37;
    }
    v17 = CDataReader::GetRecord((CDataReader *)(ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable + 4), i);
    v18 = User::Lv(&g_kUser);
    v19 = (CDataReader *)(ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable + 4);
    if ( v18 >= (unsigned __int8)v17[1] )
    {
      v25 = CDataReader::GetRecord(v19, i);
      if ( !Folder::m_bInit )
        Folder::Init();
      v26 = fs("%s\\TownPortal\\%s.DDS", &Folder::m_acMenu, v25 + 3);
      if ( !v26 )
        goto LABEL_27;
      v27 = NiImageConverter::GetImageConverter();
      v23 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v27->vfptr[2].__vecDelDtor)(
                             v27,
                             v26,
                             0);
      if ( !v23 )
        goto LABEL_27;
      v45 = 6;
      v46 = 3;
      v47 = 0;
      v24 = (NiTexture::FormatPrefs *)&v45;
    }
    else
    {
      v20 = CDataReader::GetRecord(v19, i);
      if ( !Folder::m_bInit )
        Folder::Init();
      v21 = fs("%s\\TownPortal\\%s_disable.DDS", &Folder::m_acMenu, v20 + 3);
      if ( !v21 )
        goto LABEL_27;
      v22 = NiImageConverter::GetImageConverter();
      v23 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v22->vfptr[2].__vecDelDtor)(
                             v22,
                             v21,
                             0);
      if ( !v23 )
        goto LABEL_27;
      v48.m_ePixelLayout = 6;
      v48.m_eAlphaFmt = 3;
      v48.m_eMipMapped = 0;
      v24 = &v48;
    }
    v28 = NiSourceTexture::Create(v23, v24);
    if ( v28 )
      ((void (__stdcall *)(NiSourceTexture *))(*v6)->vfptr[113].__vecDelDtor)(v28);
LABEL_27:
    NiObjectNET::RemoveExtraData(*v6, "action");
    v29 = (NiStringExtraData *)operator new(0x10u);
    v30 = v29;
    v51 = v29;
    v31 = 0;
    v59 = 0;
    if ( v51 )
    {
      v32 = CDataReader::GetRecord((CDataReader *)(ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable + 4), i);
      NiStringExtraData::NiStringExtraData(v30, v32 + 3);
    }
    v33 = *v6;
    v59 = -1;
    NiObjectNET::AddExtraData(v33, "action", v31);
    NiObjectNET::RemoveExtraData(*v6, "MinLV");
    v34 = (unsigned __int8)CDataReader::GetRecord(
                             (CDataReader *)(ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable + 4),
                             i)[1];
    v51 = (NiStringExtraData *)operator new(0x10u);
    v59 = 1;
    if ( v51 )
    {
      v35 = fs("%d", v34);
      NiStringExtraData::NiStringExtraData(v51, v35);
    }
    else
    {
      v36 = 0;
    }
    v37 = *v6;
    v59 = -1;
    NiObjectNET::AddExtraData(v37, "MinLV", v36);
    ((void (__stdcall *)(signed int))(*v6)->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))(*v6)->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(const char *))(*v53)->vfptr[118].__vecDelDtor)(v52);
    ((void (__stdcall *)(signed int))(*v53)->vfptr[64].__vecDelDtor)(1);
    v38 = User::Lv(&g_kUser);
    v39 = (*v5)->vfptr;
    if ( v38 >= v34 )
    {
      ((void (__stdcall *)(_DWORD))v39[64].__vecDelDtor)(0);
    }
    else
    {
      ((void (__stdcall *)(D3DXCOLOR *))v39[117].__vecDelDtor)(&Color::m_kDxRedColor);
      v51 = (NiStringExtraData *)&(*v5)->vfptr[118];
      v40 = (char *)TextData2::Get(0xCA2B4841);
      v41 = fs(v40, v34);
      ((void (__thiscall *)(PgWinText *, char *))v51->vfptr)(*v5, v41);
      ((void (__stdcall *)(signed int))(*v5)->vfptr[64].__vecDelDtor)(1);
    }
    ++v53;
    goto LABEL_36;
  }
LABEL_40:
  MapLinkGateWin::NoLinkMapData(v1, iBtnCount);
LABEL_42:
  v42 = v1->m_pkCloseBtn;
  v1->m_bInputEnable = 0;
  ((void (__cdecl *)(_DWORD))v42->vfptr[60].__vecDelDtor)(0);
}
// 1E: found interdependent unknown calls
// A695F0: using guessed type struct D3DXCOLOR Color::m_kDxBlueColor;
// A8975C: using guessed type bool Folder::m_bInit;
// A8C198: using guessed type int ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable;

//----- (00543300) --------------------------------------------------------
char __thiscall MapLinkGateWin::Create(MapLinkGateWin *this, PgFrameWork *pkFrameWork)
{
  MapLinkGateWin *v2; // edi@1
  NiMaterialProperty *v3; // ebx@1
  NiTexturePalette *v4; // esi@1
  const char *v5; // eax@3
  NiMaterialProperty *v6; // eax@4
  NiMaterialProperty *v7; // eax@5
  NiMaterialProperty *v8; // esi@6
  NiMaterialProperty *v9; // eax@13
  NiMaterialProperty *v10; // eax@13
  float v11; // edx@13
  NiMaterialProperty *v12; // eax@13
  float v13; // ecx@13
  NiMaterialProperty *v14; // eax@13
  PgSprData *v15; // eax@13
  NiNode *v16; // esi@14
  PgSprData *v18; // esi@19
  PgWinBut *v19; // eax@19
  NiProperty *v20; // ST3C_4@19
  PgWinText **v21; // esi@19
  NiNode *v22; // ebx@20
  const char *v23; // eax@20
  PgSprData *v24; // ebx@20
  const char *v25; // eax@20
  const char *v26; // eax@20
  PgWinBut *v27; // eax@20
  NiAVObject *v28; // ebx@20
  D3DXCOLOR v29; // ST2C_16@25
  PgWinText *v30; // eax@25
  NiRefObjectVtbl *v31; // ebx@25
  PgFont *v32; // eax@25
  NiRefObjectVtbl *v33; // ebx@25
  unsigned int v34; // eax@25
  PgWinText *v35; // ecx@25
  int v36; // eax@25
  D3DXCOLOR v37; // ST2C_16@25
  PgWinText *v38; // eax@25
  NiRefObjectVtbl *v39; // ebx@25
  PgFont *v40; // eax@25
  PgWinText *v41; // ecx@25
  NiRefObjectVtbl *v42; // ebx@25
  int v43; // eax@25
  D3DXCOLOR v44; // ST2C_16@26
  char *v45; // eax@26
  PgWinText *v46; // esi@26
  NiRefObjectVtbl *v47; // ebx@26
  PgFont *v48; // eax@26
  D3DXCOLOR v49; // ST2C_16@26
  char *v50; // eax@26
  PgWinText *v51; // esi@26
  NiRefObjectVtbl *v52; // ebx@26
  PgFont *v53; // eax@26
  PgSprData *v54; // esi@26
  PgWinBut *v55; // eax@26
  PgSprData *v56; // esi@26
  PgWinBut *v57; // eax@26
  signed int v58; // ebx@26
  unsigned int v59; // esi@26
  NiNode *v60; // esi@32
  NiNode *v61; // esi@37
  LONG v62; // eax@38
  UIUtil ui; // [sp+50h] [bp-38h]@19
  unsigned int v64; // [sp+64h] [bp-24h]@4
  NiAVObject *pkObject; // [sp+68h] [bp-20h]@20
  int v66; // [sp+6Ch] [bp-1Ch]@19
  int uiLeft; // [sp+70h] [bp-18h]@13
  int uiTop; // [sp+74h] [bp-14h]@13
  NiPointer<NiNode> spNode; // [sp+78h] [bp-10h]@1
  int v70; // [sp+84h] [bp-4h]@1
  PgFrameWork *pkFrameWorka; // [sp+90h] [bp+8h]@19

  v2 = this;
  v3 = 0;
  spNode.m_pObject = 0;
  v4 = pTexturePalette;
  v70 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "Game\\MapLinkGate.nif");
  PgUtil::LoadNodeNifFile(v5, &spNode, v4);
  if ( !spNode.m_pObject )
    return 0;
  v6 = (NiMaterialProperty *)operator new(0x60u);
  v64 = (unsigned int)v6;
  LOBYTE(v70) = 1;
  if ( v6 )
  {
    NiMaterialProperty::NiMaterialProperty(v6);
    v3 = v7;
  }
  v8 = v2->m_spMtrlProp.m_pObject;
  LOBYTE(v70) = 0;
  if ( v8 != v3 )
  {
    if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v2->m_spMtrlProp.m_pObject = v3;
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
  v9 = v2->m_spMtrlProp.m_pObject;
  v9->m_amb = NiColor::WHITE;
  ++v9->m_uiRevID;
  v10 = v2->m_spMtrlProp.m_pObject;
  v10->m_diff.r = NiColor::WHITE.r;
  v10->m_diff.g = NiColor::WHITE.g;
  v11 = NiColor::WHITE.b;
  ++v10->m_uiRevID;
  v10->m_diff.b = v11;
  v12 = v2->m_spMtrlProp.m_pObject;
  v12->m_emit.r = NiColor::WHITE.r;
  v12->m_emit.g = NiColor::WHITE.g;
  v13 = NiColor::WHITE.b;
  ++v12->m_uiRevID;
  v12->m_emit.b = v13;
  v14 = v2->m_spMtrlProp.m_pObject;
  ++v14->m_uiRevID;
  v14->m_fAlpha = 1.0;
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v15, 0, pkFrameWork, "MapLinkGateWin", 0) )
  {
    v16 = spNode.m_pObject;
    v70 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v16 )
        v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
    }
    return 0;
  }
  NiAVObject::AttachProperty((NiAVObject *)&v2->vfptr, (NiProperty *)&v2->m_spMtrlProp.m_pObject->vfptr);
  UIUtil::UIUtil(&ui);
  LOBYTE(v70) = 2;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, uiLeft, uiTop);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  UIUtil::CreateSpr(&ui, "Panel02", 0);
  v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Cls_Nor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v18, (NiAVObject *)&spNode.m_pObject->vfptr, "Cls_Click");
  PgSprData::Add(v18, (NiAVObject *)&spNode.m_pObject->vfptr, "Cls_Over");
  v19 = PgWinBut::CreateWin(uiLeft, uiTop, v18, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v20 = (NiProperty *)&v2->m_spMtrlProp.m_pObject->vfptr;
  v2->m_pkCloseBtn = v19;
  NiAVObject::AttachProperty((NiAVObject *)&v19->vfptr, v20);
  pkFrameWorka = (PgFrameWork *)1;
  v21 = v2->m_apkTexts;
  v66 = 3;
  do
  {
    v22 = spNode.m_pObject;
    v23 = fs("MapSlot%.2d_Nor", pkFrameWorka);
    v24 = PgSprData::Create((NiAVObject *)&v22->vfptr, v23, &uiLeft, &uiTop, 0);
    pkObject = (NiAVObject *)spNode.m_pObject;
    v25 = fs("MapSlot%.2d_Click", pkFrameWorka);
    PgSprData::Add(v24, pkObject, v25);
    pkObject = (NiAVObject *)spNode.m_pObject;
    v26 = fs("MapSlot%.2d_Over", pkFrameWorka);
    PgSprData::Add(v24, pkObject, v26);
    v27 = PgWinBut::CreateWin(uiLeft, uiTop, v24, (PgWin *)&v2->vfptr, 2u, 0, 0);
    *(v21 - 3) = (PgWinText *)v27;
    v27->vfptr[130].__vecDelDtor((NiRefObject *)v27, (unsigned int)v27);
    v28 = (NiAVObject *)v2->m_spMtrlProp.m_pObject;
    v64 = (unsigned int)*(v21 - 3);
    pkObject = v28;
    if ( v28 )
      InterlockedIncrement((volatile LONG *)&v28->m_uiRefCount);
    LOBYTE(v70) = 3;
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(v64 + 156),
      (NiPointer<NiRoom> *)&pkObject);
    LOBYTE(v70) = 2;
    if ( v28 && !InterlockedDecrement((volatile LONG *)&v28->m_uiRefCount) )
      v28->vfptr->__vecDelDtor((NiRefObject *)v28, 1u);
    *(_QWORD *)&v29.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v29.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v30 = UIUtil::CreateAttachedText((PgWin *)&(*(v21 - 3))->vfptr, &byte_994449, v29, 5u);
    *v21 = v30;
    v31 = v30->vfptr;
    v32 = Font::Get(GTFONT);
    v31[113].__vecDelDtor((NiRefObject *)*v21, (unsigned int)v32);
    v33 = (*v21)->vfptr;
    v34 = ((int (*)(void))(*(v21 - 3))->vfptr[37].__vecDelDtor)();
    v35 = *v21;
    v64 = v34 / 3;
    v36 = ((int (*)(void))v35->vfptr[42].__vecDelDtor)();
    v33[44].__vecDelDtor((NiRefObject *)*v21, v64 + v36);
    ((void (__stdcall *)(_DWORD))(*v21)->vfptr[60].__vecDelDtor)(0);
    *(_QWORD *)&v37.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v37.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v38 = UIUtil::CreateAttachedText((PgWin *)&(*(v21 - 3))->vfptr, byte_99444A, v37, 5u);
    v21[3] = v38;
    v39 = v38->vfptr;
    v40 = Font::Get(GTFONT);
    v39[113].__vecDelDtor((NiRefObject *)v21[3], (unsigned int)v40);
    ((void (__stdcall *)(D3DXCOLOR *))v21[3]->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
    v41 = v21[3];
    v42 = v41->vfptr;
    v43 = ((int (*)(void))v41->vfptr[42].__vecDelDtor)();
    v42[44].__vecDelDtor((NiRefObject *)v21[3], v43 - 20);
    ((void (__stdcall *)(_DWORD))v21[3]->vfptr[60].__vecDelDtor)(0);
    pkFrameWorka = (PgFrameWork *)((char *)pkFrameWorka + 1);
    ++v21;
    --v66;
  }
  while ( v66 );
  *(_QWORD *)&v44.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v44.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v45 = (char *)TextData2::Get(0x7FA494E1u);
  v46 = UIUtil::CreateTextNoSpr(&ui, "Text01", v45, v44, 5u);
  v47 = v46->vfptr;
  v48 = Font::Get(MENU);
  v47[113].__vecDelDtor((NiRefObject *)v46, (unsigned int)v48);
  v46->vfptr[60].__vecDelDtor((NiRefObject *)v46, 0);
  *(_QWORD *)&v49.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v49.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v50 = (char *)TextData2::Get(0x6EF2EBE0u);
  v51 = UIUtil::CreateTextNoSpr(&ui, "Text02", v50, v49, 5u);
  v52 = v51->vfptr;
  v53 = Font::Get(MENU);
  v52[113].__vecDelDtor((NiRefObject *)v51, (unsigned int)v53);
  v51->vfptr[60].__vecDelDtor((NiRefObject *)v51, 0);
  ((void (__thiscall *)(MapLinkGateWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
  v54 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Page_Nor00", &uiLeft, &uiTop, 0);
  PgSprData::Add(v54, (NiAVObject *)&spNode.m_pObject->vfptr, "Page_Click00");
  PgSprData::Add(v54, (NiAVObject *)&spNode.m_pObject->vfptr, "Page_Over00");
  v55 = PgWinBut::CreateWin(uiLeft, uiTop, v54, (PgWin *)&v2->vfptr, 7u, 0, 0);
  v55->vfptr[64].__vecDelDtor((NiRefObject *)v55, 1u);
  v56 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Page_Nor01", &uiLeft, &uiTop, 0);
  PgSprData::Add(v56, (NiAVObject *)&spNode.m_pObject->vfptr, "Page_Click01");
  PgSprData::Add(v56, (NiAVObject *)&spNode.m_pObject->vfptr, "Page_Over01");
  v57 = PgWinBut::CreateWin(uiLeft, uiTop, v56, (PgWin *)&v2->vfptr, 6u, 0, 0);
  v57->vfptr[64].__vecDelDtor((NiRefObject *)v57, 1u);
  v58 = 0;
  v59 = 0;
  if ( !ITableBase<TownPortal,TownPortalInfoTable>::GetTotal() )
  {
LABEL_32:
    LOBYTE(v70) = 0;
    UIUtil::~UIUtil(&ui);
    v60 = spNode.m_pObject;
    v70 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v60 )
      v60->vfptr->__vecDelDtor((NiRefObject *)v60, 1u);
    return 1;
  }
  while ( 1 )
  {
    if ( v58 > 3 )
    {
      MessageBoxA(0, "Never Count Over 2! ", "MapLinkGateWin", 0);
      LOBYTE(v70) = 0;
      UIUtil::~UIUtil(&ui);
      v61 = spNode.m_pObject;
      v70 = -1;
      if ( !spNode.m_pObject )
        return 0;
      v62 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
      goto LABEL_39;
    }
    ++v58;
    if ( v2->m_uiMaxPage < (unsigned __int8)CDataReader::GetRecord(
                                              (CDataReader *)(ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable + 4),
                                              v59)[2] )
      break;
LABEL_31:
    if ( ++v59 >= ITableBase<TownPortal,TownPortalInfoTable>::GetTotal() )
      goto LABEL_32;
  }
  if ( (signed int)((unsigned __int8)CDataReader::GetRecord(
                                       (CDataReader *)(ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable + 4),
                                       v59)[2]
                  - v2->m_uiMaxPage) <= 1 )
  {
    v2->m_uiMaxPage = (unsigned __int8)CDataReader::GetRecord(
                                         (CDataReader *)(ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable + 4),
                                         v59)[2];
    v58 = 0;
    goto LABEL_31;
  }
  MessageBoxA(0, "MapLinkGateWin", "error", 0);
  LOBYTE(v70) = 0;
  UIUtil::~UIUtil(&ui);
  v61 = spNode.m_pObject;
  v70 = -1;
  if ( !spNode.m_pObject )
    return 0;
  v62 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
LABEL_39:
  if ( !v62 && v61 )
    v61->vfptr->__vecDelDtor((NiRefObject *)v61, 1u);
  return 0;
}
// A7D11C: using guessed type const struct NiColor NiColor::WHITE;
// A8975C: using guessed type bool Folder::m_bInit;
// A8C198: using guessed type int ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable;

//----- (00543AF0) --------------------------------------------------------
void __thiscall MapLinkGateWin::OnShowWin(MapLinkGateWin *this)
{
  MapLinkGateWin *v1; // esi@1

  v1 = this;
  MapLinkGateWin::ShowLinkGate(this);
  v1->m_kAlphaControl.fAlphaValue = 0.0;
}

//----- (00543B10) --------------------------------------------------------
bool __thiscall MapLinkGateWin::ChangePage(MapLinkGateWin *this, int nChangePage)
{
  bool result; // al@2
  unsigned int v3; // eax@5
  unsigned int v4; // eax@8

  if ( nChangePage >= 2 )
    return 0;
  if ( !nChangePage )
  {
    v4 = this->m_uiMapLinkPage;
    if ( !v4 )
    {
      this->m_uiMapLinkPage = this->m_uiMaxPage;
      MapLinkGateWin::ShowLinkGate(this);
      return 1;
    }
    this->m_uiMapLinkPage = v4 - 1;
    goto LABEL_11;
  }
  if ( nChangePage != 1 )
  {
LABEL_11:
    MapLinkGateWin::ShowLinkGate(this);
    return 1;
  }
  v3 = this->m_uiMapLinkPage;
  if ( v3 == this->m_uiMaxPage )
  {
    this->m_uiMapLinkPage = 0;
    MapLinkGateWin::ShowLinkGate(this);
    result = 1;
  }
  else
  {
    this->m_uiMapLinkPage = v3 + 1;
    MapLinkGateWin::ShowLinkGate(this);
    result = 1;
  }
  return result;
}

//----- (00543BA0) --------------------------------------------------------
void __thiscall MapLinkGateWin::OnCommand(MapLinkGateWin *this, unsigned int wParam, int lParam)
{
  MapLinkGateWin *v3; // ebx@1
  GameFrameWork *v4; // ecx@2
  NiExtraData *v5; // eax@4
  unsigned int v6; // edi@5
  GameFrameWork *v7; // ecx@12
  unsigned int v8; // eax@13
  unsigned int v9; // eax@16

  v3 = this;
  switch ( wParam )
  {
    case 1u:
      v4 = (GameFrameWork *)this->m_pkFrameWork;
      v3->m_bInputEnable = 0;
      GameFrameWork::CloseMapLinkGateWin(v4);
      break;
    case 2u:
      if ( lParam )
      {
        v5 = NiObjectNET::GetExtraData((NiObjectNET *)lParam, "action");
        if ( v5 )
        {
          lParam = (int)v5[1].vfptr;
          v6 = 0;
          if ( ITableBase<TownPortal,TownPortalInfoTable>::GetTotal() )
          {
            while ( strcmp(
                      CDataReader::GetRecord(
                        (CDataReader *)(ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable + 4),
                        v6)
                    + 3,
                      (const char *)lParam) )
            {
              if ( ++v6 >= ITableBase<TownPortal,TownPortalInfoTable>::GetTotal() )
                return;
            }
            BYTE3(wParam) = *CDataReader::GetRecord(
                               (CDataReader *)(ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable + 4),
                               v6);
            NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 6u, 0x1Au, (char *)&wParam + 3, 1);
            if ( v3->m_pkMsgHooker )
            {
              ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v3->m_pkMsgHooker->vfptr->SendDirectMessage)(
                36,
                0,
                &v3->vfptr);
              if ( v3->m_pkMsgHooker )
                ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v3->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                  36,
                  0,
                  &v3->vfptr);
            }
            v3->vfptr->DirectDispatchToParent((IDirectMessenger *)&v3->vfptr, 36, 0, (IDirectMessenger *)&v3->vfptr);
            v7 = (GameFrameWork *)v3->m_pkFrameWork;
            v3->m_bInputEnable = 0;
            GameFrameWork::CloseMapLinkGateWin(v7);
          }
        }
      }
      break;
    default:
      return;
    case 6u:
      v8 = this->m_uiMapLinkPage;
      if ( v8 )
      {
        this->m_uiMapLinkPage = v8 - 1;
        MapLinkGateWin::ShowLinkGate(this);
      }
      else
      {
        this->m_uiMapLinkPage = this->m_uiMaxPage;
        MapLinkGateWin::ShowLinkGate(this);
      }
      break;
    case 7u:
      v9 = this->m_uiMapLinkPage;
      if ( v9 == this->m_uiMaxPage )
      {
        this->m_uiMapLinkPage = 0;
        MapLinkGateWin::ShowLinkGate(this);
      }
      else
      {
        this->m_uiMapLinkPage = v9 + 1;
        MapLinkGateWin::ShowLinkGate(this);
      }
      break;
  }
}
// A8C198: using guessed type int ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable;

//----- (00543D60) --------------------------------------------------------
MapLinkGateWin *__cdecl MapLinkGateWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  MapLinkGateWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x198u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    MapLinkGateWin::MapLinkGateWin((MapLinkGateWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (MapLinkGateWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00543E90) --------------------------------------------------------
TownPortal *__cdecl ITableBase<TownPortal,TownPortalInfoTable>::GetByIndex(unsigned int uiIndex)
{
  return (TownPortal *)CDataReader::GetRecord(
                         (CDataReader *)(ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable + 4),
                         uiIndex);
}
// A8C198: using guessed type int ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable;

//----- (00543EB0) --------------------------------------------------------
unsigned int __cdecl ITableBase<TownPortal,TownPortalInfoTable>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C198: using guessed type int ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable;

//----- (00543ED0) --------------------------------------------------------
MapLinkGateWin *__thiscall MapLinkGateWin::`vector deleting destructor'(MapLinkGateWin *this, unsigned int a2)
{
  MapLinkGateWin *v2; // esi@1
  NiMaterialProperty *v3; // edi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&MapLinkGateWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MapLinkGateWin::`vftable'{for `IDirectMessenger'};
  v3 = this->m_spMtrlProp.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 994620: using guessed type void (__thiscall *MapLinkGateWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99463C: using guessed type int (__thiscall *MapLinkGateWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00543F70) --------------------------------------------------------
BOOL __thiscall MarketSearchItem::IsAvailable(MarketSearchItem *this)
{
  return this->m_hItem != -1;
}

//----- (00543F80) --------------------------------------------------------
unsigned __int64 __thiscall MarketSearchItem::GetPrice(MarketSearchItem *this)
{
  return this->m_nPrice;
}

//----- (00543F90) --------------------------------------------------------
unsigned int __thiscall MarketSearchItem::GetItemHandle(MarketSearchItem *this)
{
  return this->m_hItem;
}

//----- (00543FA0) --------------------------------------------------------
unsigned __int16 __thiscall MarketSearchItem::GetOwnerHandle(MarketSearchItem *this)
{
  return this->m_hOwner;
}

//----- (00543FB0) --------------------------------------------------------
int __stdcall MarketSearchWin::MarketSort::CompName(char *Name1, char *Name2, bool desc)
{
  int result; // eax@3

  if ( Name1 && Name2 )
  {
    result = strcmp(Name1, Name2);
    if ( !desc )
      result = -result;
  }
  else
  {
    result = -1;
  }
  return result;
}

//----- (00544000) --------------------------------------------------------
void __thiscall MarketSearchWin::SetSearchBooth(MarketSearchWin *this, unsigned __int16 hHandle)
{
  this->m_hFindBooth = hHandle;
}

//----- (00544020) --------------------------------------------------------
bool __thiscall MarketSearchWin::IsFindBooth(MarketSearchWin *this, unsigned __int16 hHandle)
{
  unsigned __int16 v2; // ax@1
  bool result; // al@2

  v2 = this->m_hFindBooth;
  if ( v2 == -1 )
    result = 0;
  else
    result = v2 == hHandle;
  return result;
}

//----- (00544050) --------------------------------------------------------
void __thiscall MarketSearchWin::SetCategoryFromBtn(MarketSearchWin *this, unsigned int PgBtnMsg)
{
  MarketSearchWin *v2; // esi@1
  NiRefObjectVtbl *v3; // edi@2
  int v4; // eax@2
  NiRefObjectVtbl *v5; // edi@3
  int v6; // eax@3
  NiRefObjectVtbl *v7; // edi@4
  int v8; // eax@4
  NiRefObjectVtbl *v9; // edi@5
  int v10; // eax@5
  NiRefObjectVtbl *v11; // edi@6
  int v12; // eax@6
  NiRefObjectVtbl *v13; // edi@7
  int v14; // eax@7
  NiRefObjectVtbl *v15; // edi@8
  int v16; // eax@8
  NiRefObjectVtbl *v17; // edi@9
  int v18; // eax@9

  v2 = this;
  switch ( PgBtnMsg )
  {
    case 2u:
      v3 = this->m_pkItemCategoryText[0]->vfptr;
      v4 = ((int (*)(void))this->m_pkItemCategoryText[3]->vfptr[121].__vecDelDtor)();
      v3[118].__vecDelDtor((NiRefObject *)v2->m_pkItemCategoryText[0], v4);
      v2->m_uiSelectCategory = 1;
      break;
    case 3u:
      v5 = this->m_pkItemCategoryText[0]->vfptr;
      v6 = ((int (*)(void))this->m_pkItemCategoryText[4]->vfptr[121].__vecDelDtor)();
      v5[118].__vecDelDtor((NiRefObject *)v2->m_pkItemCategoryText[0], v6);
      v2->m_uiSelectCategory = 2;
      break;
    case 4u:
      v7 = this->m_pkItemCategoryText[0]->vfptr;
      v8 = ((int (*)(void))this->m_pkItemCategoryText[5]->vfptr[121].__vecDelDtor)();
      v7[118].__vecDelDtor((NiRefObject *)v2->m_pkItemCategoryText[0], v8);
      v2->m_uiSelectCategory = 3;
      break;
    case 5u:
      v9 = this->m_pkItemCategoryText[0]->vfptr;
      v10 = ((int (*)(void))this->m_pkItemCategoryText[6]->vfptr[121].__vecDelDtor)();
      v9[118].__vecDelDtor((NiRefObject *)v2->m_pkItemCategoryText[0], v10);
      v2->m_uiSelectCategory = 4;
      break;
    case 6u:
      v11 = this->m_pkItemCategoryText[0]->vfptr;
      v12 = ((int (*)(void))this->m_pkItemCategoryText[7]->vfptr[121].__vecDelDtor)();
      v11[118].__vecDelDtor((NiRefObject *)v2->m_pkItemCategoryText[0], v12);
      v2->m_uiSelectCategory = 5;
      break;
    case 7u:
      v13 = this->m_pkItemCategoryText[0]->vfptr;
      v14 = ((int (*)(void))this->m_pkItemCategoryText[8]->vfptr[121].__vecDelDtor)();
      v13[118].__vecDelDtor((NiRefObject *)v2->m_pkItemCategoryText[0], v14);
      v2->m_uiSelectCategory = 6;
      break;
    case 8u:
      v15 = this->m_pkItemCategoryText[0]->vfptr;
      v16 = ((int (*)(void))this->m_pkItemCategoryText[9]->vfptr[121].__vecDelDtor)();
      v15[118].__vecDelDtor((NiRefObject *)v2->m_pkItemCategoryText[0], v16);
      v2->m_uiSelectCategory = 7;
      break;
    default:
      v17 = this->m_pkItemCategoryText[0]->vfptr;
      v18 = ((int (*)(void))this->m_pkItemCategoryText[2]->vfptr[121].__vecDelDtor)();
      v17[118].__vecDelDtor((NiRefObject *)v2->m_pkItemCategoryText[0], v18);
      v2->m_uiSelectCategory = 0;
      break;
  }
}

//----- (00544250) --------------------------------------------------------
void __thiscall MarketSearchWin::ShowWTCombo(MarketSearchWin *this, bool b)
{
  MarketSearchWin *v2; // ebx@1
  char *v3; // esi@1
  signed int v4; // edi@1

  v2 = this;
  v3 = (char *)&this->m_pkItemCategory[2];
  v4 = 8;
  if ( b == 1 )
  {
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 256))(1);
      v3 += 4;
      --v4;
    }
    while ( v4 );
    ((void (__stdcall *)(_DWORD))v2->m_pkChosenItemCategoryBG->vfptr[64].__vecDelDtor)(1);
  }
  else
  {
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 256))(0);
      v3 += 4;
      --v4;
    }
    while ( v4 );
    ((void (__stdcall *)(_DWORD))v2->m_pkChosenItemCategoryBG->vfptr[64].__vecDelDtor)(0);
  }
}

//----- (005442C0) --------------------------------------------------------
void __thiscall MarketSearchWin::SetSearchingMsgBox(MarketSearchWin *this, MsgBox *pkMsgBox)
{
  this->m_pkSearchingMsgBox = pkMsgBox;
}

//----- (005442D0) --------------------------------------------------------
void __thiscall MarketSearchWin::DirectMessage(MarketSearchWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  MarketSearchWin *v4; // esi@1

  v4 = this;
  if ( iMsgTag == 27 && pvBody && !*(_DWORD *)pvBody )
  {
    EffectMgr::RemoveClientEff(&g_kEffectMgr, 0);
    v4->m_ColumnWinName[5]._Myres = 0xFFFF;
  }
}

//----- (00544310) --------------------------------------------------------
void __thiscall MarketSearchWin::CloseSearchingMsgBox(MarketSearchWin *this)
{
  MarketSearchWin *v1; // esi@1
  MsgBox *v2; // ecx@1

  v1 = this;
  v2 = this->m_pkSearchingMsgBox;
  if ( v2 )
  {
    MsgBox::CloseWithOK(v2);
    *(_DWORD *)&v1->m_hFindBooth = 0xFFFF;
  }
  else
  {
    v1->m_hFindBooth = -1;
  }
}

//----- (00544350) --------------------------------------------------------
void __thiscall MarketSearchWin::OnSomeoneBoothOpen(MarketSearchWin *this, unsigned __int16 hBoothHandle)
{
  MarketSearchWin *v2; // esi@1
  MsgBox *v3; // ecx@2

  v2 = this;
  if ( this->m_hFindBooth == hBoothHandle )
  {
    v3 = this->m_pkSearchingMsgBox;
    if ( v3 )
    {
      MsgBox::CloseWithOK(v3);
      v2->m_pkSearchingMsgBox = 0;
    }
    v2->m_hFindBooth = -1;
  }
}

//----- (00544390) --------------------------------------------------------
void __thiscall MarketSearchItem::MarketSearchItem(MarketSearchItem *this)
{
  this->vfptr = (MarketSearchItemVtbl *)&MarketSearchItem::`vftable';
  this->m_pkItem.m_pObject = 0;
  LODWORD(this->m_nPrice) = -1;
  HIDWORD(this->m_nPrice) = -1;
  this->m_hItem = -1;
  this->m_hOwner = -1;
}
// 994BEC: using guessed type int (__thiscall *MarketSearchItem::`vftable')(void *p, char);

//----- (005443C0) --------------------------------------------------------
void __thiscall MarketSearchItem::~MarketSearchItem(MarketSearchItem *this)
{
  Item *v1; // esi@1

  this->vfptr = (MarketSearchItemVtbl *)&MarketSearchItem::`vftable';
  v1 = this->m_pkItem.m_pObject;
  if ( v1 && !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
  {
    if ( v1 )
      v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
  }
}
// 994BEC: using guessed type int (__thiscall *MarketSearchItem::`vftable')(void *p, char);

//----- (005443F0) --------------------------------------------------------
void __thiscall MarketSearchItem::Clear(MarketSearchItem *this)
{
  MarketSearchItem *v1; // esi@1
  Item *v2; // edi@1

  v1 = this;
  v2 = this->m_pkItem.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_pkItem.m_pObject = 0;
  }
  LODWORD(v1->m_nPrice) = -1;
  HIDWORD(v1->m_nPrice) = -1;
  v1->m_hItem = -1;
  v1->m_hOwner = -1;
}

//----- (00544440) --------------------------------------------------------
void __thiscall MarketSearchItem::Set(MarketSearchItem *this, BoothItemInfo *pkBoothItemInfo)
{
  MarketSearchItem *v2; // esi@1
  Item *v3; // eax@1
  Item *v4; // edi@1
  Item *v5; // ebx@1

  v2 = this;
  v3 = Item::Create(&pkBoothItemInfo->bii_ItemInfo);
  v4 = v2->m_pkItem.m_pObject;
  v5 = v3;
  if ( v4 != v3 )
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v2->m_pkItem.m_pObject = v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  }
  v2->m_nPrice = pkBoothItemInfo->bii_nUnitPrice;
  v2->m_hItem = pkBoothItemInfo->bii_nItemHandle;
  v2->m_hOwner = pkBoothItemInfo->bii_nOwnerHandle;
}

//----- (005444C0) --------------------------------------------------------
Item *__thiscall MarketSearchItem::GetItem(MarketSearchItem *this)
{
  return this->m_pkItem.m_pObject;
}

//----- (005444D0) --------------------------------------------------------
int __stdcall MarketSearchWin::MarketSort::CompLevel(int Level1, int Level2, bool desc)
{
  int result; // eax@1

  result = 0;
  if ( Level1 != Level2 )
  {
    if ( Level1 <= Level2 )
    {
      if ( Level1 < Level2 )
        result = 1;
    }
    else
    {
      result = -1;
    }
  }
  if ( desc )
    result = -result;
  return result;
}

//----- (00544500) --------------------------------------------------------
int __stdcall MarketSearchWin::MarketSort::CompMoney(unsigned __int64 Money1, unsigned __int64 Money2, bool desc)
{
  int result; // eax@1
  bool v5; // cf@2
  bool v6; // zf@2

  result = 0;
  if ( (_DWORD)Money1 == (_DWORD)Money2 )
  {
    v5 = HIDWORD(Money1) < HIDWORD(Money2);
    v6 = HIDWORD(Money1) == HIDWORD(Money2);
    if ( HIDWORD(Money1) == HIDWORD(Money2) )
      goto LABEL_11;
  }
  else
  {
    v5 = HIDWORD(Money1) < HIDWORD(Money2);
    v6 = HIDWORD(Money1) == HIDWORD(Money2);
  }
  if ( v5 || (v5 || v6) && (unsigned int)Money1 <= (unsigned int)Money2 )
  {
    if ( Money1 < Money2 )
      result = 1;
  }
  else
  {
    result = -1;
  }
LABEL_11:
  if ( desc )
    result = -result;
  return result;
}

//----- (00544550) --------------------------------------------------------
int __stdcall MarketSearchWin::MarketSort::CompSubGroup(Item *Item1, Item *Item2, bool desc)
{
  AuctionGroup v4; // edx@1
  AuctionGroup v5; // ecx@1
  int result; // eax@1

  v4 = Item2->m_pkInfo->ItemAuctionGroup;
  v5 = Item1->m_pkInfo->ItemAuctionGroup;
  result = 0;
  if ( v5 != v4 )
  {
    if ( v5 <= (unsigned int)v4 )
    {
      if ( v5 < (unsigned int)v4 )
        result = 1;
    }
    else
    {
      result = -1;
    }
  }
  if ( desc )
    result = -result;
  return result;
}

//----- (00544590) --------------------------------------------------------
int __stdcall MarketSearchWin::MarketSort::CompItemHandle(unsigned int Handle1, unsigned int Handle2, bool desc)
{
  int result; // eax@1

  result = 0;
  if ( Handle1 != Handle2 )
  {
    if ( Handle1 <= Handle2 )
    {
      if ( Handle1 < Handle2 )
        result = 1;
    }
    else
    {
      result = -1;
    }
  }
  if ( desc )
    result = -result;
  return result;
}

//----- (005445C0) --------------------------------------------------------
void __thiscall MarketSearchWin::MakeDefaultAll(MarketSearchWin *this)
{
  MarketSearchWin *v1; // esi@1
  NiRefObjectVtbl *v2; // edi@1
  int v3; // eax@1
  EditWinEx *v4; // ecx@1

  v1 = this;
  v2 = this->m_pkItemCategoryText[0]->vfptr;
  v3 = ((int (*)(void))this->m_pkItemCategoryText[2]->vfptr[121].__vecDelDtor)();
  v2[118].__vecDelDtor((NiRefObject *)v1->m_pkItemCategoryText[0], v3);
  v4 = v1->m_pkItemSearchInput;
  v1->m_uiSelectCategory = 0;
  ((void (__stdcall *)(_DWORD))v4->vfptr[115].__vecDelDtor)(&unk_994873);
  v1->m_pkMyClassViewBtn->m_bCheck = 1;
}

//----- (00544620) --------------------------------------------------------
BOOL __thiscall MarketSearchWin::DelayTimeCheck(MarketSearchWin *this)
{
  return Timer::ms_fCurTime - this->m_fCurrentDelayTime > 3.0;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00544650) --------------------------------------------------------
void __stdcall MarketSearchWin::GetItemFontTable(D3DXCOLOR *RetColor, GradeType eType)
{
  D3DXCOLOR *v3; // ecx@2
  float *v4; // edx@2
  float *v5; // esi@2
  double v6; // st7@2

  switch ( eType )
  {
    case 1:
      v3 = RetColor;
      RetColor->r = 0.0;
      v4 = &RetColor->g;
      v5 = &RetColor->b;
      RetColor->g = 255.0;
      v6 = 255.0;
      RetColor->b = 0.0;
      break;
    case 2:
      v3 = RetColor;
      RetColor->r = 13.0;
      v4 = &RetColor->g;
      v5 = &RetColor->b;
      RetColor->g = 194.0;
      RetColor->b = 254.0;
      v6 = 255.0;
      break;
    case 5:
      v3 = RetColor;
      RetColor->r = 120.0;
      v4 = &RetColor->g;
      RetColor->g = 120.0;
      v6 = 255.0;
      goto LABEL_11;
    case 3:
      v3 = RetColor;
      v6 = 255.0;
      RetColor->r = 255.0;
      v4 = &RetColor->g;
      v5 = &RetColor->b;
      RetColor->g = 228.0;
      RetColor->b = 0.0;
      break;
    case 4:
      v3 = RetColor;
      RetColor->r = 253.0;
      v4 = &RetColor->g;
      v5 = &RetColor->b;
      RetColor->g = 32.0;
      RetColor->b = 239.0;
      v6 = 255.0;
      break;
    case 8:
      v3 = RetColor;
      v6 = 255.0;
      RetColor->r = 255.0;
      v4 = &RetColor->g;
      RetColor->g = 255.0;
      v5 = &RetColor->b;
      RetColor->b = 0.0;
      break;
    case 6:
      v3 = RetColor;
      v6 = 225.0;
      RetColor->r = 225.0;
      v4 = &RetColor->g;
      v5 = &RetColor->b;
      RetColor->g = 128.0;
      RetColor->b = 0.0;
      break;
    case 7:
      v3 = RetColor;
      v6 = 225.0;
      RetColor->r = 225.0;
      v4 = &RetColor->g;
      v5 = &RetColor->b;
      RetColor->g = 0.0;
      RetColor->b = 255.0;
      break;
    default:
      v3 = RetColor;
      v6 = 255.0;
      v4 = &RetColor->g;
      RetColor->r = 255.0;
      RetColor->g = 255.0;
LABEL_11:
      v5 = &v3->b;
      v3->b = v6;
      break;
  }
  v3->a = v6;
  v3->r = (double)(unsigned __int8)(signed int)v3->r / 255.0;
  *v4 = (double)(unsigned __int8)(signed int)*v4 / 255.0;
  *v5 = (double)(unsigned __int8)(signed int)*v5 / 255.0;
  v3->a = (double)(unsigned __int8)(signed int)v3->a / 255.0;
}

//----- (00544860) --------------------------------------------------------
int __stdcall MarketSearchWin::MarketSort::CompMainGroup(Item *Item1, Item *Item2, bool desc)
{
  unsigned int v4; // esi@1
  unsigned int v5; // esi@3

  v4 = 0;
  if ( ITableBase<MarketSearchInfo,MarketSearchInfoTab>::GetTotal() )
  {
    do
      CDataReader::GetRecord((CDataReader *)(ITableBase<MarketSearchInfo,MarketSearchInfoTab>::ms_pkTable + 4), v4++);
    while ( v4 < ITableBase<MarketSearchInfo,MarketSearchInfoTab>::GetTotal() );
  }
  v5 = 0;
  if ( ITableBase<MarketSearchInfo,MarketSearchInfoTab>::GetTotal() )
  {
    do
      CDataReader::GetRecord((CDataReader *)(ITableBase<MarketSearchInfo,MarketSearchInfoTab>::ms_pkTable + 4), v5++);
    while ( v5 < ITableBase<MarketSearchInfo,MarketSearchInfoTab>::GetTotal() );
  }
  return 0;
}
// A8C254: using guessed type int ITableBase<MarketSearchInfo,MarketSearchInfoTab>::ms_pkTable;

//----- (005448C0) --------------------------------------------------------
bool __stdcall MarketSearchWin::SortByDefault::operator()(MarketSearchItem *pkMSItem1, MarketSearchItem *pkMSItem2)
{
  Item *v4; // esi@8
  Item *v5; // edi@8
  int v6; // eax@8
  AuctionGroup v7; // ecx@9
  AuctionGroup v8; // edx@9
  unsigned int v9; // edx@15
  unsigned int v10; // ecx@15

  if ( pkMSItem1->m_hItem == -1 )
  {
    if ( pkMSItem2->m_hItem == -1 || pkMSItem2->m_hItem != -1 )
      return 0;
  }
  else if ( pkMSItem2->m_hItem == -1 )
  {
    return 1;
  }
  v4 = pkMSItem1->m_pkItem.m_pObject;
  v5 = pkMSItem2->m_pkItem.m_pObject;
  v6 = MarketSearchWin::MarketSort::CompMainGroup(pkMSItem1->m_pkItem.m_pObject, pkMSItem2->m_pkItem.m_pObject, 0);
  if ( !v6 )
  {
    v7 = v4->m_pkInfo->ItemAuctionGroup;
    v8 = v5->m_pkInfo->ItemAuctionGroup;
    v6 = 0;
    if ( v7 != v8 )
    {
      if ( v7 <= (unsigned int)v8 )
      {
        if ( v7 < (unsigned int)v8 )
          v6 = 1;
      }
      else
      {
        v6 = -1;
      }
    }
    if ( !v6 )
    {
      v9 = pkMSItem1->m_hItem;
      v10 = pkMSItem2->m_hItem;
      v6 = 0;
      if ( v9 == v10 )
        return 0;
      if ( v9 > v10 )
        return 0;
      if ( v9 < v10 )
        v6 = 1;
    }
  }
  return v6 > 0;
}

//----- (00544980) --------------------------------------------------------
char __stdcall MarketSearchWin::SortByName::operator()(MarketSearchItem *pkMSItem1, MarketSearchItem *pkMSItem2)
{
  ItemInfo *v4; // esi@8
  Item *v5; // edi@8
  ItemInfo *v6; // ecx@8
  int v7; // eax@10
  signed int v8; // edx@11
  signed int v9; // esi@11
  unsigned int v10; // edx@19
  unsigned int v11; // ebx@19
  unsigned int v12; // esi@19
  unsigned int v13; // ecx@19
  bool v14; // cf@20
  bool v15; // zf@20
  AuctionGroup v16; // ecx@33
  AuctionGroup v17; // edx@33
  unsigned int v18; // ecx@39
  unsigned int v19; // edx@39
  Item *pkItem2; // [sp+8h] [bp-4h]@8

  if ( pkMSItem1->m_hItem == -1 )
  {
    if ( pkMSItem2->m_hItem == -1 || pkMSItem2->m_hItem != -1 )
      return 0;
  }
  else if ( pkMSItem2->m_hItem == -1 )
  {
    return 1;
  }
  v4 = pkMSItem2->m_pkItem.m_pObject->m_pkInfo;
  v5 = pkMSItem1->m_pkItem.m_pObject;
  v6 = v5->m_pkInfo;
  pkItem2 = pkMSItem2->m_pkItem.m_pObject;
  if ( v6 == (ItemInfo *)-34 || v4 == (ItemInfo *)-34 )
    return 0;
  v7 = -strcmp(v6->Name, v4->Name);
  if ( v7 )
    return v7 > 0;
  v8 = v4->DemandLv;
  v9 = v6->DemandLv;
  if ( v9 != v8 )
  {
    if ( v9 <= v8 )
    {
      if ( v9 < v8 )
        v7 = 1;
    }
    else
    {
      v7 = -1;
    }
  }
  if ( v7 )
    return v7 > 0;
  v10 = pkMSItem2->m_nPrice;
  v11 = HIDWORD(pkMSItem2->m_nPrice);
  v12 = pkMSItem1->m_nPrice;
  v13 = HIDWORD(pkMSItem1->m_nPrice);
  v7 = 0;
  if ( v12 == v10 )
  {
    v14 = v13 < v11;
    v15 = v13 == v11;
    if ( v13 == v11 )
      goto LABEL_31;
  }
  else
  {
    v14 = v13 < v11;
    v15 = v13 == v11;
  }
  if ( v14 || (v14 || v15) && v12 <= v10 )
  {
    if ( v13 <= v11 && (v13 < v11 || v12 < v10) )
      v7 = 1;
  }
  else
  {
    v7 = -1;
  }
LABEL_31:
  if ( !v7 )
  {
    v7 = MarketSearchWin::MarketSort::CompMainGroup(v5, pkItem2, 0);
    if ( !v7 )
    {
      v16 = v5->m_pkInfo->ItemAuctionGroup;
      v17 = pkItem2->m_pkInfo->ItemAuctionGroup;
      v7 = 0;
      if ( v16 != v17 )
      {
        if ( v16 <= (unsigned int)v17 )
        {
          if ( v16 < (unsigned int)v17 )
            v7 = 1;
        }
        else
        {
          v7 = -1;
        }
      }
      if ( !v7 )
      {
        v18 = pkMSItem2->m_hItem;
        v19 = pkMSItem1->m_hItem;
        v7 = 0;
        if ( v19 == v18 )
          return 0;
        if ( v19 > v18 )
          return 0;
        if ( v19 < v18 )
          v7 = 1;
      }
    }
  }
  return v7 > 0;
}

//----- (00544B10) --------------------------------------------------------
char __stdcall MarketSearchWin::SortByNameDesc::operator()(MarketSearchItem *pkMSItem1, MarketSearchItem *pkMSItem2)
{
  ItemInfo *v4; // esi@8
  Item *v5; // edi@8
  ItemInfo *v6; // ecx@8
  int v7; // eax@8
  int v8; // edx@8
  bool v9; // cf@10
  unsigned __int8 v10; // bl@12
  int v11; // eax@14
  signed int v12; // edx@16
  signed int v13; // esi@16
  unsigned int v14; // edx@25
  unsigned int v15; // ebx@25
  unsigned int v16; // esi@25
  unsigned int v17; // ecx@25
  signed int v18; // eax@25
  bool v19; // cf@26
  bool v20; // zf@26
  AuctionGroup v21; // ecx@39
  AuctionGroup v22; // edx@39
  signed int v23; // eax@39
  unsigned int v24; // ecx@45
  unsigned int v25; // edx@45
  signed int v26; // eax@45
  Item *pkItem2; // [sp+8h] [bp-4h]@8

  if ( pkMSItem1->m_hItem == -1 )
  {
    if ( pkMSItem2->m_hItem == -1 || pkMSItem2->m_hItem != -1 )
      return 0;
  }
  else if ( pkMSItem2->m_hItem == -1 )
  {
    return 1;
  }
  v4 = pkMSItem2->m_pkItem.m_pObject->m_pkInfo;
  v5 = pkMSItem1->m_pkItem.m_pObject;
  v6 = v5->m_pkInfo;
  pkItem2 = pkMSItem2->m_pkItem.m_pObject;
  v7 = (int)v6->Name;
  v8 = (int)v4->Name;
  if ( v6 == (ItemInfo *)-34 || v4 == (ItemInfo *)-34 )
    return 0;
  while ( 1 )
  {
    v9 = *(_BYTE *)v7 < *(_BYTE *)v8;
    if ( *(_BYTE *)v7 != *(_BYTE *)v8 )
      break;
    if ( !*(_BYTE *)v7 )
      goto LABEL_14;
    v10 = *(_BYTE *)(v7 + 1);
    v9 = v10 < *(_BYTE *)(v8 + 1);
    if ( v10 != *(_BYTE *)(v8 + 1) )
      break;
    v7 += 2;
    v8 += 2;
    if ( !v10 )
    {
LABEL_14:
      v11 = 0;
      goto LABEL_15;
    }
  }
  v11 = -v9 - (v9 - 1);
LABEL_15:
  if ( v11 )
    return v11 > 0;
  v12 = v4->DemandLv;
  v13 = v6->DemandLv;
  if ( v13 != v12 )
  {
    if ( v13 <= v12 )
    {
      if ( v13 < v12 )
        v11 = 1;
    }
    else
    {
      v11 = -1;
    }
  }
  v11 = -v11;
  if ( v11 )
    return v11 > 0;
  v14 = pkMSItem2->m_nPrice;
  v15 = HIDWORD(pkMSItem2->m_nPrice);
  v16 = pkMSItem1->m_nPrice;
  v17 = HIDWORD(pkMSItem1->m_nPrice);
  v18 = 0;
  if ( v16 == v14 )
  {
    v19 = v17 < v15;
    v20 = v17 == v15;
    if ( v17 == v15 )
      goto LABEL_37;
  }
  else
  {
    v19 = v17 < v15;
    v20 = v17 == v15;
  }
  if ( v19 || (v19 || v20) && v16 <= v14 )
  {
    if ( v17 <= v15 && (v17 < v15 || v16 < v14) )
      v18 = 1;
  }
  else
  {
    v18 = -1;
  }
LABEL_37:
  v11 = -v18;
  if ( !v11 )
  {
    v11 = MarketSearchWin::MarketSort::CompMainGroup(v5, pkItem2, 1);
    if ( !v11 )
    {
      v21 = v5->m_pkInfo->ItemAuctionGroup;
      v22 = pkItem2->m_pkInfo->ItemAuctionGroup;
      v23 = 0;
      if ( v21 != v22 )
      {
        if ( v21 <= (unsigned int)v22 )
        {
          if ( v21 < (unsigned int)v22 )
            v23 = 1;
        }
        else
        {
          v23 = -1;
        }
      }
      v11 = -v23;
      if ( !v11 )
      {
        v24 = pkMSItem2->m_hItem;
        v25 = pkMSItem1->m_hItem;
        v26 = 0;
        if ( v25 == v24 )
          return 0;
        if ( v25 > v24 )
          return 1;
        if ( v25 < v24 )
          v26 = 1;
        v11 = -v26;
      }
    }
  }
  return v11 > 0;
}

//----- (00544CB0) --------------------------------------------------------
char __stdcall MarketSearchWin::SortByLevel::operator()(MarketSearchItem *pkMSItem1, MarketSearchItem *pkMSItem2)
{
  ItemInfo *v4; // ebx@8
  Item *v5; // edi@8
  ItemInfo *v6; // ecx@8
  signed int v7; // edx@8
  signed int v8; // esi@8
  int v9; // eax@8
  unsigned int v10; // ecx@17
  unsigned int v11; // esi@17
  unsigned int v12; // edx@17
  unsigned int v13; // ebx@17
  bool v14; // cf@18
  bool v15; // zf@18
  AuctionGroup v16; // ecx@31
  AuctionGroup v17; // edx@31
  unsigned int v18; // ecx@37
  unsigned int v19; // edx@37
  Item *pkItem2; // [sp+8h] [bp-4h]@8

  if ( pkMSItem1->m_hItem == -1 )
  {
    if ( pkMSItem2->m_hItem == -1 || pkMSItem2->m_hItem != -1 )
      return 0;
  }
  else if ( pkMSItem2->m_hItem == -1 )
  {
    return 1;
  }
  v4 = pkMSItem2->m_pkItem.m_pObject->m_pkInfo;
  v5 = pkMSItem1->m_pkItem.m_pObject;
  v6 = v5->m_pkInfo;
  v7 = v4->DemandLv;
  v8 = v6->DemandLv;
  pkItem2 = pkMSItem2->m_pkItem.m_pObject;
  v9 = 0;
  if ( v8 != v7 )
  {
    if ( v8 <= v7 )
    {
      if ( v8 < v7 )
        v9 = 1;
    }
    else
    {
      v9 = -1;
    }
  }
  if ( !v9 )
  {
    if ( v6 == (ItemInfo *)-34 || v4 == (ItemInfo *)-34 )
      return 0;
    v9 = -strcmp(v6->Name, v4->Name);
    if ( !v9 )
    {
      v10 = pkMSItem2->m_nPrice;
      v11 = HIDWORD(pkMSItem2->m_nPrice);
      v12 = pkMSItem1->m_nPrice;
      v13 = HIDWORD(pkMSItem1->m_nPrice);
      v9 = 0;
      if ( v12 == v10 )
      {
        v14 = v13 < v11;
        v15 = v13 == v11;
        if ( v13 == v11 )
          goto LABEL_29;
      }
      else
      {
        v14 = v13 < v11;
        v15 = v13 == v11;
      }
      if ( v14 || (v14 || v15) && v12 <= v10 )
      {
        if ( v13 <= v11 && (v13 < v11 || v12 < v10) )
          v9 = 1;
      }
      else
      {
        v9 = -1;
      }
LABEL_29:
      if ( !v9 )
      {
        v9 = MarketSearchWin::MarketSort::CompMainGroup(v5, pkItem2, 0);
        if ( !v9 )
        {
          v16 = v5->m_pkInfo->ItemAuctionGroup;
          v17 = pkItem2->m_pkInfo->ItemAuctionGroup;
          v9 = 0;
          if ( v16 != v17 )
          {
            if ( v16 <= (unsigned int)v17 )
            {
              if ( v16 < (unsigned int)v17 )
                v9 = 1;
            }
            else
            {
              v9 = -1;
            }
          }
          if ( !v9 )
          {
            v18 = pkMSItem2->m_hItem;
            v19 = pkMSItem1->m_hItem;
            v9 = 0;
            if ( v19 == v18 )
              return 0;
            if ( v19 > v18 )
              return 0;
            if ( v19 < v18 )
              v9 = 1;
          }
        }
      }
      return v9 > 0;
    }
  }
  return v9 > 0;
}

//----- (00544E40) --------------------------------------------------------
char __stdcall MarketSearchWin::SortByLevelDesc::operator()(MarketSearchItem *pkMSItem1, MarketSearchItem *pkMSItem2)
{
  ItemInfo *v4; // ebx@8
  Item *v5; // edi@8
  ItemInfo *v6; // ecx@8
  signed int v7; // edx@8
  signed int v8; // esi@8
  signed int v9; // eax@8
  int v10; // eax@13
  int v11; // eax@14
  int v12; // edx@14
  bool v13; // cf@16
  unsigned __int8 v14; // bl@18
  unsigned int v15; // ecx@22
  unsigned int v16; // esi@22
  unsigned int v17; // edx@22
  unsigned int v18; // ebx@22
  signed int v19; // eax@22
  bool v20; // cf@23
  bool v21; // zf@23
  AuctionGroup v22; // ecx@38
  AuctionGroup v23; // edx@38
  signed int v24; // eax@38
  unsigned int v25; // ecx@44
  unsigned int v26; // edx@44
  signed int v27; // eax@44
  Item *pkItem2; // [sp+8h] [bp-4h]@8

  if ( pkMSItem1->m_hItem == -1 )
  {
    if ( pkMSItem2->m_hItem == -1 || pkMSItem2->m_hItem != -1 )
      return 0;
  }
  else if ( pkMSItem2->m_hItem == -1 )
  {
    return 1;
  }
  v4 = pkMSItem2->m_pkItem.m_pObject->m_pkInfo;
  v5 = pkMSItem1->m_pkItem.m_pObject;
  v6 = v5->m_pkInfo;
  v7 = v4->DemandLv;
  v8 = v6->DemandLv;
  pkItem2 = pkMSItem2->m_pkItem.m_pObject;
  v9 = 0;
  if ( v8 != v7 )
  {
    if ( v8 <= v7 )
    {
      if ( v8 < v7 )
        v9 = 1;
    }
    else
    {
      v9 = -1;
    }
  }
  v10 = -v9;
  if ( v10 )
    return v10 > 0;
  v11 = (int)v6->Name;
  v12 = (int)v4->Name;
  if ( v6 == (ItemInfo *)-34 || v4 == (ItemInfo *)-34 )
    return 0;
  while ( 1 )
  {
    v13 = *(_BYTE *)v11 < *(_BYTE *)v12;
    if ( *(_BYTE *)v11 != *(_BYTE *)v12 )
      break;
    if ( !*(_BYTE *)v11 )
      goto LABEL_20;
    v14 = *(_BYTE *)(v11 + 1);
    v13 = v14 < *(_BYTE *)(v12 + 1);
    if ( v14 != *(_BYTE *)(v12 + 1) )
      break;
    v11 += 2;
    v12 += 2;
    if ( !v14 )
    {
LABEL_20:
      v10 = 0;
      goto LABEL_21;
    }
  }
  v10 = -v13 - (v13 - 1);
LABEL_21:
  if ( v10 )
    return v10 > 0;
  v15 = pkMSItem2->m_nPrice;
  v16 = HIDWORD(pkMSItem2->m_nPrice);
  v17 = pkMSItem1->m_nPrice;
  v18 = HIDWORD(pkMSItem1->m_nPrice);
  v19 = 0;
  if ( v17 == v15 )
  {
    v20 = v18 < v16;
    v21 = v18 == v16;
    if ( v18 == v16 )
      goto LABEL_36;
  }
  else
  {
    v20 = v18 < v16;
    v21 = v18 == v16;
  }
  if ( v20 || (v20 || v21) && v17 <= v15 )
  {
    if ( v18 <= v16 && (v18 < v16 || v17 < v15) )
      v19 = 1;
  }
  else
  {
    v19 = -1;
  }
LABEL_36:
  v10 = -v19;
  if ( !v10 )
  {
    v10 = MarketSearchWin::MarketSort::CompMainGroup(v5, pkItem2, 1);
    if ( !v10 )
    {
      v22 = v5->m_pkInfo->ItemAuctionGroup;
      v23 = pkItem2->m_pkInfo->ItemAuctionGroup;
      v24 = 0;
      if ( v22 != v23 )
      {
        if ( v22 <= (unsigned int)v23 )
        {
          if ( v22 < (unsigned int)v23 )
            v24 = 1;
        }
        else
        {
          v24 = -1;
        }
      }
      v10 = -v24;
      if ( !v10 )
      {
        v25 = pkMSItem2->m_hItem;
        v26 = pkMSItem1->m_hItem;
        v27 = 0;
        if ( v26 == v25 )
          return 0;
        if ( v26 > v25 )
          return 1;
        if ( v26 < v25 )
          v27 = 1;
        v10 = -v27;
      }
    }
  }
  return v10 > 0;
}

//----- (00544FE0) --------------------------------------------------------
bool __stdcall MarketSearchWin::SortByMoney::operator()(MarketSearchItem *pkMSItem1, MarketSearchItem *pkMSItem2)
{
  unsigned int v4; // edx@8
  unsigned int v5; // ebx@8
  unsigned int v6; // esi@8
  Item *v7; // edi@8
  unsigned int v8; // ecx@8
  int v9; // eax@8
  bool v10; // cf@9
  bool v11; // zf@9
  signed int v12; // ecx@24
  signed int v13; // edx@24
  AuctionGroup v14; // ecx@31
  AuctionGroup v15; // edx@31
  unsigned int v16; // ecx@37
  unsigned int v17; // edx@37
  Item *pkItem2; // [sp+8h] [bp-4h]@8

  if ( pkMSItem1->m_hItem == -1 )
  {
    if ( pkMSItem2->m_hItem == -1 || pkMSItem2->m_hItem != -1 )
      return 0;
  }
  else if ( pkMSItem2->m_hItem == -1 )
  {
    return 1;
  }
  v4 = pkMSItem2->m_nPrice;
  v5 = HIDWORD(pkMSItem2->m_nPrice);
  v6 = pkMSItem1->m_nPrice;
  pkItem2 = pkMSItem2->m_pkItem.m_pObject;
  v7 = pkMSItem1->m_pkItem.m_pObject;
  v8 = HIDWORD(pkMSItem1->m_nPrice);
  v9 = 0;
  if ( v6 == v4 )
  {
    v10 = v8 < v5;
    v11 = v8 == v5;
    if ( v8 == v5 )
      goto LABEL_20;
  }
  else
  {
    v10 = v8 < v5;
    v11 = v8 == v5;
  }
  if ( v10 || (v10 || v11) && v6 <= v4 )
  {
    if ( v8 <= v5 && (v8 < v5 || v6 < v4) )
      v9 = 1;
  }
  else
  {
    v9 = -1;
  }
LABEL_20:
  if ( !v9 )
  {
    if ( v7->m_pkInfo == (ItemInfo *)-34 || pkItem2->m_pkInfo == (ItemInfo *)-34 )
      return 0;
    v9 = -strcmp(v7->m_pkInfo->Name, pkItem2->m_pkInfo->Name);
    if ( !v9 )
    {
      v12 = pkItem2->m_pkInfo->DemandLv;
      v13 = v7->m_pkInfo->DemandLv;
      v9 = 0;
      if ( v13 != v12 )
      {
        if ( v13 <= v12 )
        {
          if ( v13 < v12 )
            v9 = 1;
        }
        else
        {
          v9 = -1;
        }
      }
      if ( !v9 )
      {
        v9 = MarketSearchWin::MarketSort::CompMainGroup(v7, pkItem2, 0);
        if ( !v9 )
        {
          v14 = v7->m_pkInfo->ItemAuctionGroup;
          v15 = pkItem2->m_pkInfo->ItemAuctionGroup;
          v9 = 0;
          if ( v14 != v15 )
          {
            if ( v14 <= (unsigned int)v15 )
            {
              if ( v14 < (unsigned int)v15 )
                v9 = 1;
            }
            else
            {
              v9 = -1;
            }
          }
          if ( !v9 )
          {
            v16 = pkMSItem2->m_hItem;
            v17 = pkMSItem1->m_hItem;
            v9 = 0;
            if ( v17 == v16 )
              return 0;
            if ( v17 > v16 )
              return 0;
            if ( v17 < v16 )
              v9 = 1;
          }
        }
      }
    }
  }
  return v9 > 0;
}

//----- (00545170) --------------------------------------------------------
bool __stdcall MarketSearchWin::SortByMoneyDesc::operator()(MarketSearchItem *pkMSItem1, MarketSearchItem *pkMSItem2)
{
  unsigned int v4; // edx@8
  unsigned int v5; // ebx@8
  unsigned int v6; // esi@8
  Item *v7; // edi@8
  unsigned int v8; // ecx@8
  signed int v9; // eax@8
  bool v10; // cf@9
  bool v11; // zf@9
  int v12; // eax@20
  int v13; // edx@21
  int v14; // eax@21
  bool v15; // cf@23
  unsigned __int8 v16; // bl@25
  signed int v17; // ecx@29
  signed int v18; // edx@29
  signed int v19; // eax@29
  AuctionGroup v20; // ecx@39
  AuctionGroup v21; // edx@39
  signed int v22; // eax@39
  unsigned int v23; // ecx@45
  unsigned int v24; // edx@45
  signed int v25; // eax@45
  Item *pkItem2; // [sp+8h] [bp-4h]@8

  if ( pkMSItem1->m_hItem == -1 )
  {
    if ( pkMSItem2->m_hItem == -1 || pkMSItem2->m_hItem != -1 )
      return 0;
  }
  else if ( pkMSItem2->m_hItem == -1 )
  {
    return 1;
  }
  v4 = pkMSItem2->m_nPrice;
  v5 = HIDWORD(pkMSItem2->m_nPrice);
  v6 = pkMSItem1->m_nPrice;
  pkItem2 = pkMSItem2->m_pkItem.m_pObject;
  v7 = pkMSItem1->m_pkItem.m_pObject;
  v8 = HIDWORD(pkMSItem1->m_nPrice);
  v9 = 0;
  if ( v6 != v4 )
  {
    v10 = v8 < v5;
    v11 = v8 == v5;
    goto LABEL_12;
  }
  v10 = v8 < v5;
  v11 = v8 == v5;
  if ( v8 != v5 )
  {
LABEL_12:
    if ( v10 || (v10 || v11) && v6 <= v4 )
    {
      if ( v8 <= v5 && (v8 < v5 || v6 < v4) )
        v9 = 1;
    }
    else
    {
      v9 = -1;
    }
  }
  v12 = -v9;
  if ( !v12 )
  {
    v13 = (int)pkItem2->m_pkInfo->Name;
    v14 = (int)v7->m_pkInfo->Name;
    if ( v7->m_pkInfo == (ItemInfo *)-34 || pkItem2->m_pkInfo == (ItemInfo *)-34 )
      return 0;
    while ( 1 )
    {
      v15 = *(_BYTE *)v14 < *(_BYTE *)v13;
      if ( *(_BYTE *)v14 != *(_BYTE *)v13 )
        break;
      if ( !*(_BYTE *)v14 )
        goto LABEL_27;
      v16 = *(_BYTE *)(v14 + 1);
      v15 = v16 < *(_BYTE *)(v13 + 1);
      if ( v16 != *(_BYTE *)(v13 + 1) )
        break;
      v14 += 2;
      v13 += 2;
      if ( !v16 )
      {
LABEL_27:
        v12 = 0;
        goto LABEL_28;
      }
    }
    v12 = -v15 - (v15 - 1);
LABEL_28:
    if ( !v12 )
    {
      v17 = pkItem2->m_pkInfo->DemandLv;
      v18 = v7->m_pkInfo->DemandLv;
      v19 = 0;
      if ( v18 != v17 )
      {
        if ( v18 <= v17 )
        {
          if ( v18 < v17 )
            v19 = 1;
        }
        else
        {
          v19 = -1;
        }
      }
      v12 = -v19;
      if ( !v12 )
      {
        v12 = MarketSearchWin::MarketSort::CompMainGroup(v7, pkItem2, 1);
        if ( !v12 )
        {
          v20 = v7->m_pkInfo->ItemAuctionGroup;
          v21 = pkItem2->m_pkInfo->ItemAuctionGroup;
          v22 = 0;
          if ( v20 != v21 )
          {
            if ( v20 <= (unsigned int)v21 )
            {
              if ( v20 < (unsigned int)v21 )
                v22 = 1;
            }
            else
            {
              v22 = -1;
            }
          }
          v12 = -v22;
          if ( !v12 )
          {
            v23 = pkMSItem2->m_hItem;
            v24 = pkMSItem1->m_hItem;
            v25 = 0;
            if ( v24 == v23 )
              return 0;
            if ( v24 > v23 )
              return 1;
            if ( v24 < v23 )
              v25 = 1;
            v12 = -v25;
          }
        }
      }
    }
  }
  return v12 > 0;
}

//----- (00545310) --------------------------------------------------------
void __thiscall MarketSearchWin::InitItemSearchUI(MarketSearchWin *this, UIUtil *ui)
{
  MarketSearchWin *v2; // esi@1
  D3DXCOLOR v3; // ST0C_16@1
  char *v4; // eax@1
  ImeEditWinEx *v5; // eax@1
  ColumnBut *v6; // eax@1
  D3DXCOLOR v7; // ST0C_16@1
  char *v8; // eax@1
  PgWinAbbreviateText *v9; // eax@1
  D3DXCOLOR v10; // ST14_16@1
  char *v11; // eax@1
  char *v12; // eax@1
  D3DXCOLOR v13; // ST14_16@1
  char *v14; // eax@1

  v2 = this;
  *(_QWORD *)&v3.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v3.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v4 = (char *)TextData3::Get(0x638636Eu);
  UIUtil::CreateText(ui, "Text_ItemName", v4, 0, v3, 4u, 0, 0);
  v5 = UIUtil::CreateEditEx(ui, "Text_ItemNameInput", 33, NORMAL, 0, 0);
  v2->m_pkItemSearchInput = (EditWinEx *)v5;
  EditWinEx::SetFocusClear((EditWinEx *)&v5->vfptr, 1);
  ((void (__stdcall *)(_DWORD))v2->m_pkItemSearchInput->m_spEditWin.m_pObject->vfptr[13].__vecDelDtor)(1);
  v6 = UIUtil::CreateCheckButton(ui, 0xEu, "MyNmCh", 0, 2);
  v2->m_pkMyClassViewBtn = v6;
  v6->m_bCheck = 1;
  *(_QWORD *)&v7.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v7.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v8 = (char *)TextData3::Get(0xF1BE820u);
  v9 = UIUtil::CreateText(ui, "Text01", v8, 0, v7, 5u, 0, 0);
  v9->vfptr[122].__vecDelDtor((NiRefObject *)v9, 4u);
  v2->m_pkItemSearch = UIUtil::CreateButton(ui, 9u, "SearchBtn", 0, 3);
  *(_QWORD *)&v10.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v10.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v11 = (char *)TextData3::Get(0xE37156Cu);
  UIUtil::CreateAttachedText((PgWin *)&v2->m_pkItemSearch->vfptr, v11, v10, 5u);
  v2->m_pkStartSearchBtn = UIUtil::CreateButton(ui, 0xAu, "Btn01", 0, 3);
  v12 = (char *)TextData3::Get(0x738AA08Fu);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkStartSearchBtn->vfptr, v12);
  v2->m_pkStartSearchBtn->m_pkToolTipWin = g_pkToolTipWin;
  *(_QWORD *)&v13.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v13.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v14 = (char *)TextData3::Get(0x60C4ABE4u);
  UIUtil::CreateAttachedText((PgWin *)&v2->m_pkStartSearchBtn->vfptr, v14, v13, 5u);
}

//----- (00545510) --------------------------------------------------------
void __thiscall MarketSearchWin::InitCategoryComboBoxUI(MarketSearchWin *this, UIUtil *ui)
{
  MarketSearchWin *v2; // esi@1
  D3DXCOLOR v3; // ST0C_16@1
  char *v4; // eax@1
  PgWinBut *v5; // eax@1
  D3DXCOLOR v6; // ST14_16@1
  D3DXCOLOR v7; // ST14_16@1
  char *v8; // eax@1
  D3DXCOLOR v9; // ST14_16@1
  char *v10; // eax@1
  D3DXCOLOR v11; // ST14_16@1
  char *v12; // eax@1
  D3DXCOLOR v13; // ST14_16@1
  char *v14; // eax@1
  D3DXCOLOR v15; // ST14_16@1
  char *v16; // eax@1
  D3DXCOLOR v17; // ST14_16@1
  char *v18; // eax@1
  D3DXCOLOR v19; // ST14_16@1
  char *v20; // eax@1
  D3DXCOLOR v21; // ST14_16@1
  char *v22; // eax@1
  PgWinText *v23; // eax@1
  NiRefObjectVtbl **v24; // ecx@1
  NiRefObjectVtbl *v25; // edi@1
  int v26; // eax@1

  v2 = this;
  *(_QWORD *)&v3.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v3.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v4 = (char *)TextData3::Get(0x1E3E6371u);
  UIUtil::CreateText(ui, "Text_ItemGrade", v4, 0, v3, 4u, 0, 0);
  v2->m_pkChosenItemCategoryBG = UIUtil::CreateSpr(ui, "ItemGradePulldown", 0);
  v5 = UIUtil::CreateButton(ui, 0, "ItemGrade", 0, 3);
  v2->m_pkItemCategory[0] = v5;
  *(_QWORD *)&v6.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v6.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v2->m_pkItemCategoryText[0] = UIUtil::CreateAttachedText((PgWin *)&v5->vfptr, "-", v6, 5u);
  v2->m_pkItemCategory[1] = UIUtil::CreateButton(ui, 0, "ItemGrade01", 0, 3);
  v2->m_pkItemCategory[2] = UIUtil::CreateButton(ui, 1u, "Text_ItemGradeList01", 0, 3);
  *(_QWORD *)&v7.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v7.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v8 = (char *)TextData3::Get(0xA912160D);
  v2->m_pkItemCategoryText[2] = UIUtil::CreateAttachedText((PgWin *)&v2->m_pkItemCategory[2]->vfptr, v8, v7, 5u);
  v2->m_pkItemCategory[3] = UIUtil::CreateButton(ui, 2u, "Text_ItemGradeList02", 0, 3);
  *(_QWORD *)&v9.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v9.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v10 = (char *)TextData3::Get(0xA913160D);
  v2->m_pkItemCategoryText[3] = UIUtil::CreateAttachedText((PgWin *)&v2->m_pkItemCategory[3]->vfptr, v10, v9, 5u);
  v2->m_pkItemCategory[4] = UIUtil::CreateButton(ui, 3u, "Text_ItemGradeList03", 0, 3);
  *(_QWORD *)&v11.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v11.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v12 = (char *)TextData3::Get(0xA914160D);
  v2->m_pkItemCategoryText[4] = UIUtil::CreateAttachedText((PgWin *)&v2->m_pkItemCategory[4]->vfptr, v12, v11, 5u);
  v2->m_pkItemCategory[5] = UIUtil::CreateButton(ui, 4u, "Text_ItemGradeList04", 0, 3);
  *(_QWORD *)&v13.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v13.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v14 = (char *)TextData3::Get(0xA915160D);
  v2->m_pkItemCategoryText[5] = UIUtil::CreateAttachedText((PgWin *)&v2->m_pkItemCategory[5]->vfptr, v14, v13, 5u);
  v2->m_pkItemCategory[6] = UIUtil::CreateButton(ui, 5u, "Text_ItemGradeList05", 0, 3);
  *(_QWORD *)&v15.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v15.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v16 = (char *)TextData3::Get(0xA916160D);
  v2->m_pkItemCategoryText[6] = UIUtil::CreateAttachedText((PgWin *)&v2->m_pkItemCategory[6]->vfptr, v16, v15, 5u);
  v2->m_pkItemCategory[7] = UIUtil::CreateButton(ui, 6u, "Text_ItemGradeList06", 0, 3);
  *(_QWORD *)&v17.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v17.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v18 = (char *)TextData3::Get(0xA917160D);
  v2->m_pkItemCategoryText[7] = UIUtil::CreateAttachedText((PgWin *)&v2->m_pkItemCategory[7]->vfptr, v18, v17, 5u);
  v2->m_pkItemCategory[8] = UIUtil::CreateButton(ui, 7u, "Text_ItemGradeList07", 0, 3);
  *(_QWORD *)&v19.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v19.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v20 = (char *)TextData3::Get(0xA918160D);
  v2->m_pkItemCategoryText[8] = UIUtil::CreateAttachedText((PgWin *)&v2->m_pkItemCategory[8]->vfptr, v20, v19, 5u);
  v2->m_pkItemCategory[9] = UIUtil::CreateButton(ui, 8u, "Text_ItemGradeList08", 0, 3);
  *(_QWORD *)&v21.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v21.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v22 = (char *)TextData3::Get(0xA919160D);
  v23 = UIUtil::CreateAttachedText((PgWin *)&v2->m_pkItemCategory[9]->vfptr, v22, v21, 5u);
  v24 = &v2->m_pkItemCategoryText[0]->vfptr;
  v2->m_pkItemCategoryText[9] = v23;
  v25 = *v24;
  v26 = ((int (*)(void))v2->m_pkItemCategoryText[2]->vfptr[121].__vecDelDtor)();
  v25[118].__vecDelDtor((NiRefObject *)v2->m_pkItemCategoryText[0], v26);
  v2->m_uiSelectCategory = 0;
}

//----- (00545940) --------------------------------------------------------
void __thiscall MarketSearchWin::OnSearch(MarketSearchWin *this)
{
  MarketSearchWin *v1; // esi@1
  GameFrameWork *v2; // ecx@1
  PgWinBut *v3; // ecx@4
  int v4; // esi@5
  NiUnsharedGeometryGroup *v5; // edi@5

  v1 = this;
  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( Timer::ms_fCurTime - v1->m_fCurrentDelayTime <= 3.0 )
  {
    v4 = (int)&v1->vfptr;
    v5 = TextData3::Get(0xE9DFDC12);
    if ( *(_DWORD *)(v4 + 4) )
    {
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v4 + 4) + 4))(25, v5, v4);
      if ( *(_DWORD *)(v4 + 4) )
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v4 + 4) + 20))(25, v5, v4);
    }
    (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v4 + 20))(v4, 25, v5, v4);
  }
  else
  {
    v1->m_bSearching = 1;
    if ( v2 )
    {
      GameFrameWork::NcBoothSearchItemListCategorized(v2, v1->m_uiSelectCategory, v1->m_pkMyClassViewBtn->m_bCheck, 0);
      SlideListWin::RemoveAllList(v1->m_pkItemViewSlideListWin);
      SlideListWin::UpdateViewList(v1->m_pkItemViewSlideListWin);
    }
    v3 = v1->m_pkItemSearch;
    v1->m_fCurrentDelayTime = Timer::ms_fCurTime;
    ((void (__stdcall *)(_DWORD))v3->vfptr[60].__vecDelDtor)(0);
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00545A20) --------------------------------------------------------
void __thiscall MarketSearchWin::OnSearchBooth(MarketSearchWin *this)
{
  MarketSearchWin *v1; // esi@1
  GameFrameWork *v2; // ebx@1
  signed int v3; // eax@2
  int v4; // esi@3
  NiUnsharedGeometryGroup *v5; // edi@3
  MarketSearchItem *v6; // eax@7
  unsigned __int16 v7; // di@7

  v1 = this;
  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    v3 = SlideListWin::GetCurSelIndex(v1->m_pkItemViewSlideListWin);
    if ( v3 >= 0 )
    {
      v6 = v1->m_vecMarketSearchItem._Myfirst[v3];
      v7 = v6->m_hOwner;
      GameFrameWork::NcBoothSearchBoothPosition(v2, v6->m_hItem, v6->m_hOwner);
      v1->m_hFindBooth = v7;
    }
    else
    {
      v4 = (int)&v1->vfptr;
      v5 = TextData3::Get(0xF915577u);
      if ( *(_DWORD *)(v4 + 4) )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v4 + 4) + 4))(25, v5, v4);
        if ( *(_DWORD *)(v4 + 4) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v4 + 4) + 20))(25, v5, v4);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v4 + 20))(v4, 25, v5, v4);
    }
  }
}

//----- (00545AC0) --------------------------------------------------------
void __thiscall MarketSearchWin::OnShowWin(MarketSearchWin *this)
{
  MarketSearchWin *v1; // esi@1
  MsgBox *v2; // ecx@1
  GameFrameWork *v3; // eax@3

  v1 = this;
  v2 = this->m_pkSearchingMsgBox;
  if ( v2 )
  {
    MsgBox::CloseWithOK(v2);
    v1->m_pkSearchingMsgBox = 0;
  }
  v1->m_hFindBooth = -1;
  MarketSearchWin::MakeDefaultAll(v1);
  SlideListWin::RemoveAllList(v1->m_pkItemViewSlideListWin);
  v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v3 )
    GameFrameWork::NcBoothSearchItemListCategorized(v3, 0, 1, 1);
}

//----- (00545B20) --------------------------------------------------------
char __thiscall MarketSearchWin::SetListItem(MarketSearchWin *this, MarketSearchItem *pkMarketSearchItem)
{
  MarketSearchWin *v2; // esi@1
  char result; // al@2
  Item *v4; // eax@3
  ItemInfo *v5; // eax@4
  SlideListWin *v6; // ecx@5
  unsigned int v7; // ebx@5
  const char *v8; // eax@5
  __int64 v9; // rax@5
  const char *v10; // eax@5
  __int64 v11; // rax@5
  const char *v12; // eax@5
  __int64 v13; // rax@5
  const char *v14; // eax@5
  __int64 v15; // rax@5
  const char *v16; // eax@5
  D3DXCOLOR FontColor; // [sp+8h] [bp-18h]@5
  int v18; // [sp+18h] [bp-8h]@5
  ItemInfo *pkInfo; // [sp+1Ch] [bp-4h]@4

  v2 = this;
  if ( pkMarketSearchItem
    && (v4 = pkMarketSearchItem->m_pkItem.m_pObject) != 0
    && (v5 = v4->m_pkInfo, (pkInfo = v5) != 0) )
  {
    MarketSearchWin::GetItemFontTable(&FontColor, v5->ItemGradeType);
    FontColor.r = (double)(unsigned __int8)(signed int)(FontColor.r * 255.0);
    FontColor.g = (double)(unsigned __int8)(signed int)(FontColor.g * 255.0);
    v18 = (signed int)(255.0 * FontColor.b);
    v6 = v2->m_pkItemViewSlideListWin;
    FontColor.b = (double)(unsigned __int8)v18;
    v7 = SlideListWin::AddText(v6, &byte_994872);
    SlideListWin::SetText(v2->m_pkItemViewSlideListWin, v7, 1u, pkInfo->Name);
    SlideListWin::SetFontColor(
      v2->m_pkItemViewSlideListWin,
      v7,
      1u,
      (signed int)FontColor.r,
      (signed int)FontColor.g,
      (signed int)FontColor.b);
    v8 = fs("%d", pkInfo->DemandLv);
    SlideListWin::SetText(v2->m_pkItemViewSlideListWin, v7, 2u, v8);
    v9 = User::GetGem(pkMarketSearchItem->m_nPrice);
    v10 = fs("%d", v9);
    SlideListWin::SetText(v2->m_pkItemViewSlideListWin, v7, 3u, v10);
    v11 = User::GetGold(pkMarketSearchItem->m_nPrice);
    v12 = fs("%d", v11);
    SlideListWin::SetText(v2->m_pkItemViewSlideListWin, v7, 4u, v12);
    v13 = User::GetSilver(pkMarketSearchItem->m_nPrice);
    v14 = fs("%d", v13);
    SlideListWin::SetText(v2->m_pkItemViewSlideListWin, v7, 5u, v14);
    v15 = User::GetCopper(pkMarketSearchItem->m_nPrice);
    v16 = fs("%d", v15);
    SlideListWin::SetText(v2->m_pkItemViewSlideListWin, v7, 6u, v16);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00545D10) --------------------------------------------------------
char __thiscall MarketSearchWin::SetListIcon(MarketSearchWin *this, unsigned int uiIndex, Item *pkItem)
{
  char result; // al@2
  SlideListWin *v4; // eax@3
  ColumnBut *v5; // esi@4
  PgWin **v6; // ecx@5
  PgWin **v7; // eax@5
  int v8; // edi@6
  const char *v9; // eax@7
  ItemIcon *v10; // edi@11
  int v11; // esi@11
  int v12; // eax@11

  if ( pkItem )
  {
    v4 = this->m_pkItemViewSlideListWin;
    if ( (signed int)uiIndex < v4->m_vecButList._Mylast - v4->m_vecButList._Myfirst
      && (v5 = v4->m_vecButList._Myfirst[uiIndex]) != 0
      && (v6 = v5->m_vecAddWin._Myfirst, v7 = v5->m_vecAddWin._Mylast, v6 != v7)
      && (v8 = 0, v7 - v6) )
    {
      while ( 1 )
      {
        v9 = v5->m_vecAddWin._Myfirst[v8]->m_pcName;
        if ( v9 )
        {
          if ( !_strcmpi(v9, "InvItemSlot001_icon") )
            break;
        }
        if ( ++v8 >= (unsigned int)(v5->m_vecAddWin._Mylast - v5->m_vecAddWin._Myfirst) )
          goto LABEL_10;
      }
      v10 = (ItemIcon *)v5->m_vecAddWin._Myfirst[v8];
      ((void (__thiscall *)(ColumnBut *))v5->vfptr[41].__vecDelDtor)(v5);
      v11 = ((int (__thiscall *)(ColumnBut *))v5->vfptr[37].__vecDelDtor)(v5);
      v12 = ((int (__thiscall *)(ItemIcon *))v10->vfptr[37].__vecDelDtor)(v10);
      v10->vfptr[44].__vecDelDtor((NiRefObject *)v10, (unsigned int)(v11 - v12) >> 1);
      ItemIcon::SetItem(v10, pkItem, 1);
      ItemInfoWin::SetItemInfo(g_pkItemInfoWin, pkItem);
      result = 1;
    }
    else
    {
LABEL_10:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00545E10) --------------------------------------------------------
void __thiscall MarketSearchWin::UpdateMeWin(MarketSearchWin *this, float fCutTime)
{
  MarketSearchWin *v2; // esi@1

  v2 = this;
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
    GameFrameWork::UpdateUIScroll(v2->m_pkItemViewSlideListWin, v2->m_pkSlideBar);
  if ( !(unsigned __int8)((int (*)(void))v2->m_pkItemSearch->vfptr[61].__vecDelDtor)()
    && Timer::ms_fCurTime - v2->m_fCurrentDelayTime > 3.0 )
  {
    ((void (__stdcall *)(_DWORD))v2->m_pkItemSearch->vfptr[60].__vecDelDtor)(1);
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00545E80) --------------------------------------------------------
void __thiscall MarketSearchWin::RefreshItemViewList(MarketSearchWin *this)
{
  MarketSearchWin *v1; // edi@1
  SlideListWin *v2; // ecx@1
  int v3; // eax@1
  unsigned int v4; // esi@2
  unsigned int v5; // ebx@2
  int v6; // eax@3
  MarketSearchItem *v7; // eax@5
  Item *v8; // eax@7
  unsigned int ColumnNum; // [sp+4h] [bp-4h]@2

  v1 = this;
  v2 = this->m_pkItemViewSlideListWin;
  v3 = v2->m_nViewStartPos;
  if ( v3 >= 0 )
  {
    ColumnNum = 0;
    v4 = v3 + v2->m_vecButList._Mylast - v2->m_vecButList._Myfirst;
    v5 = v2->m_nViewStartPos;
    if ( v3 < v4 )
    {
      do
      {
        v6 = v1->m_vecMarketSearchItem._Mylast - v1->m_vecMarketSearchItem._Myfirst;
        if ( !v6 || v6 - 1 < v5 )
          break;
        v7 = v1->m_vecMarketSearchItem._Myfirst[v5];
        if ( v7->m_hItem == -1 )
        {
          ++v4;
        }
        else
        {
          v8 = v7->m_pkItem.m_pObject;
          if ( v8 )
            MarketSearchWin::SetListIcon(v1, ColumnNum++, v8);
          else
            ++v4;
        }
        ++v5;
      }
      while ( v5 < v4 );
    }
  }
  SlideListWin::UpdateViewList(v1->m_pkItemViewSlideListWin);
}

//----- (00545F20) --------------------------------------------------------
void __thiscall MarketSearchWin::RefreshItemViewSlide(MarketSearchWin *this)
{
  MarketSearchWin *v1; // esi@1
  SlideBar *v2; // ecx@1
  SlideListWin *v3; // eax@2

  v1 = this;
  v2 = this->m_pkSlideBar;
  if ( v2 )
  {
    v3 = v1->m_pkItemViewSlideListWin;
    if ( v3 )
    {
      SlideBar::SetSplitCnt(v2, v3->m_nSlideSplitCnt);
      v1->m_pkItemViewSlideListWin->m_nViewStartPos = v1->m_pkSlideBar->m_nCurPos;
      MarketSearchWin::RefreshItemViewList(v1);
    }
  }
}

//----- (00545F70) --------------------------------------------------------
void __thiscall MarketSearchWin::MarketSearchWin(MarketSearchWin *this)
{
  MarketSearchWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&MarketSearchWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MarketSearchWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkChosenItemCategoryBG = 0;
  `eh vector constructor iterator'(
    v1->m_ColumnWinName,
    0x1Cu,
    9,
    (void (__thiscall *)(void *))std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>,
    (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
  v1->m_pkMyClassViewBtn = 0;
  v1->m_pkItemSearch = 0;
  v1->m_pkStartSearchBtn = 0;
  v1->m_pkItemSearchInput = 0;
  v1->m_pkItemViewSlideListWin = 0;
  v1->m_pkSlideBar = 0;
  v1->m_vecMarketSearchItem._Myfirst = 0;
  v1->m_vecMarketSearchItem._Mylast = 0;
  v1->m_vecMarketSearchItem._Myend = 0;
  v1->m_fCurrentDelayTime = 0.0;
  v1->m_iVecLastIndex = 0;
  v1->m_bSearching = 0;
  v1->m_pkSearchingMsgBox = 0;
  v1->m_uiSortState = 0;
  v1->m_hFindBooth = -1;
  v1->m_pkItemCategory[0] = 0;
  v1->m_pkItemCategoryText[0] = 0;
  v1->m_pkItemCategory[1] = 0;
  v1->m_pkItemCategoryText[1] = 0;
  v1->m_pkItemCategory[2] = 0;
  v1->m_pkItemCategoryText[2] = 0;
  v1->m_pkItemCategory[3] = 0;
  v1->m_pkItemCategoryText[3] = 0;
  v1->m_pkItemCategory[4] = 0;
  v1->m_pkItemCategoryText[4] = 0;
  v1->m_pkItemCategory[5] = 0;
  v1->m_pkItemCategoryText[5] = 0;
  v1->m_pkItemCategory[6] = 0;
  v1->m_pkItemCategoryText[6] = 0;
  v1->m_pkItemCategory[7] = 0;
  v1->m_pkItemCategoryText[7] = 0;
  v1->m_pkItemCategory[8] = 0;
  v1->m_pkItemCategoryText[8] = 0;
  v1->m_pkItemCategory[9] = 0;
  v1->m_pkItemCategoryText[9] = 0;
  v1->m_uiSelectCategory = 0;
}
// 994C18: using guessed type void (__thiscall *MarketSearchWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 994C34: using guessed type int (__thiscall *MarketSearchWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005460D0) --------------------------------------------------------
void __thiscall MarketSearchWin::~MarketSearchWin(MarketSearchWin *this)
{
  MarketSearchWin *v1; // esi@1
  MarketSearchItem **v2; // eax@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&MarketSearchWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MarketSearchWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_vecMarketSearchItem._Myfirst;
  if ( v2 )
    operator delete(v2);
  v1->m_vecMarketSearchItem._Myfirst = 0;
  v1->m_vecMarketSearchItem._Mylast = 0;
  v1->m_vecMarketSearchItem._Myend = 0;
  `eh vector destructor iterator'(
    v1->m_ColumnWinName,
    0x1Cu,
    9,
    (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 994C18: using guessed type void (__thiscall *MarketSearchWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 994C34: using guessed type int (__thiscall *MarketSearchWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00546170) --------------------------------------------------------
char __thiscall MarketSearchWin::UpdateViewList(MarketSearchWin *this)
{
  MarketSearchWin *v1; // esi@1
  MarketSearchItem **v2; // ebx@1
  int v3; // edi@2

  v1 = this;
  SlideListWin::RemoveAllList(this->m_pkItemViewSlideListWin);
  v2 = v1->m_vecMarketSearchItem._Myfirst;
  if ( v2 != v1->m_vecMarketSearchItem._Mylast )
  {
    v3 = 0;
    do
    {
      if ( v1->m_vecMarketSearchItem._Myfirst[v3]->m_hItem != -1 )
        MarketSearchWin::SetListItem(v1, v1->m_vecMarketSearchItem._Myfirst[v3]);
      ++v2;
      ++v3;
    }
    while ( v2 != v1->m_vecMarketSearchItem._Mylast );
  }
  SlideListWin::AlignText(v1->m_pkItemViewSlideListWin, 1u, 4u);
  SlideListWin::AlignText(v1->m_pkItemViewSlideListWin, 2u, 5u);
  SlideListWin::AlignText(v1->m_pkItemViewSlideListWin, 3u, 6u);
  SlideListWin::AlignText(v1->m_pkItemViewSlideListWin, 4u, 6u);
  SlideListWin::AlignText(v1->m_pkItemViewSlideListWin, 5u, 6u);
  SlideListWin::AlignText(v1->m_pkItemViewSlideListWin, 6u, 6u);
  MarketSearchWin::RefreshItemViewList(v1);
  return 1;
}

//----- (00546220) --------------------------------------------------------
void __thiscall MarketSearchWin::RemoveAllList(MarketSearchWin *this)
{
  MarketSearchWin *v1; // edi@1
  MarketSearchItem **v2; // esi@1

  v1 = this;
  v2 = this->m_vecMarketSearchItem._Myfirst;
  if ( v2 != this->m_vecMarketSearchItem._Mylast )
  {
    do
    {
      ((void (*)(void))(*v2)->vfptr->Clear)();
      ++v2;
    }
    while ( v2 != v1->m_vecMarketSearchItem._Mylast );
  }
  v1->m_iVecLastIndex = 0;
}

//----- (00546260) --------------------------------------------------------
MarketSearchWin *__cdecl MarketSearchWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  MarketSearchWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x2F0u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    MarketSearchWin::MarketSearchWin((MarketSearchWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (MarketSearchWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00546390) --------------------------------------------------------
void __thiscall MarketSearchWin::OnClose(MarketSearchWin *this)
{
  MarketSearchWin *v1; // edi@1
  MarketSearchItem **v2; // esi@1

  v1 = this;
  v2 = this->m_vecMarketSearchItem._Myfirst;
  if ( v2 != this->m_vecMarketSearchItem._Mylast )
  {
    do
    {
      ((void (*)(void))(*v2)->vfptr->Clear)();
      ++v2;
    }
    while ( v2 != v1->m_vecMarketSearchItem._Mylast );
  }
  v1->m_iVecLastIndex = 0;
  v1->m_fCurrentDelayTime = Timer::ms_fCurTime;
  PrivateStoreWin::ms_bPrivateStoreWin = 0;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8D482: using guessed type bool PrivateStoreWin::ms_bPrivateStoreWin;

//----- (005463E0) --------------------------------------------------------
char __thiscall MarketSearchWin::SetListItems(MarketSearchWin *this, PROTO_NC_BOOTH_SEARCH_ITEM_LIST_CATEGORIZED_ACK *pkProto)
{
  PROTO_NC_BOOTH_SEARCH_ITEM_LIST_CATEGORIZED_ACK *v2; // ebx@1
  NiRefObjectVtbl *v4; // edx@4
  char *v5; // eax@4
  int v6; // esi@4
  int v7; // edi@4
  int v8; // edx@4
  int *v9; // eax@6
  int v10; // eax@7
  char *v11; // eax@9
  char *v12; // edx@9
  char v13; // cl@10
  int v14; // eax@11
  MarketSearchItem **j; // esi@17
  NiUnsharedGeometryGroup *v16; // ebx@19
  int v17; // edx@25
  unsigned int v18; // eax@25
  std::vector<CBaseObject *,std::allocator<CBaseObject *> > *v19; // esi@25
  unsigned int v20; // ecx@25
  _DWORD *v21; // eax@27
  char *v22; // edi@28
  unsigned int v23; // eax@30
  CBaseObject **v24; // edx@31
  MarketSearchItem **v25; // ecx@32
  signed int v26; // edi@32
  unsigned int v27; // eax@33
  unsigned int v28; // eax@34
  unsigned int v29; // ecx@34
  unsigned int v30; // ecx@36
  MarketSearchItem **v31; // eax@41
  MarketSearchItem **v32; // ecx@43
  unsigned int v33; // eax@44
  unsigned int v34; // eax@45
  unsigned int v35; // ecx@45
  unsigned int v36; // ecx@47
  _DWORD *v37; // eax@52
  int v38; // edx@55
  unsigned int v39; // ebx@55
  _DWORD *v40; // eax@56
  char *v41; // edi@57
  unsigned int v42; // eax@60
  CBaseObject **v43; // edx@61
  MarketSearchItem **v44; // ecx@62
  signed int v45; // edi@62
  unsigned int v46; // eax@63
  unsigned int v47; // eax@64
  unsigned int v48; // ecx@64
  unsigned int v49; // ecx@66
  MarketSearchItem **v50; // eax@71
  MarketSearchItem **v51; // ecx@73
  unsigned int v52; // eax@74
  unsigned int v53; // eax@75
  unsigned int v54; // ecx@75
  unsigned int v55; // ecx@77
  _DWORD *v56; // eax@82
  PROTO_NC_BOOTH_SEARCH_ITEM_LIST_CATEGORIZED_ACK *v57; // edi@85
  EditWinEx *v58; // ecx@87
  char *v59; // eax@87
  int v60; // esi@87
  int v61; // ebx@87
  int v62; // edx@87
  int *v63; // eax@89
  int v64; // eax@90
  char *v65; // eax@92
  char *v66; // edx@92
  char v67; // cl@93
  char *v68; // esi@94
  int v69; // eax@94
  MarketSearchItem *v70; // esi@96
  char *v71; // eax@96
  Item *v72; // ebx@96
  char *v73; // eax@101
  MarketSearchWin *v74; // [sp+8h] [bp-58h]@1
  unsigned int i; // [sp+Ch] [bp-54h]@3
  unsigned int ia; // [sp+Ch] [bp-54h]@26
  unsigned int ib; // [sp+Ch] [bp-54h]@55
  unsigned int nAddItemCnt; // [sp+10h] [bp-50h]@3
  unsigned int nAddItemCnta; // [sp+10h] [bp-50h]@26
  unsigned int nAddItemCntb; // [sp+10h] [bp-50h]@55
  unsigned int nAddItemCntc; // [sp+10h] [bp-50h]@86
  char *strSearchWord; // [sp+14h] [bp-4Ch]@4
  char datasize; // [sp+1Bh] [bp-45h]@4
  char strItemName[64]; // [sp+1Ch] [bp-44h]@9

  v74 = this;
  v2 = pkProto + 1;
  if ( pkProto == (PROTO_NC_BOOTH_SEARCH_ITEM_LIST_CATEGORIZED_ACK *)-3 )
    return 0;
  i = 0;
  nAddItemCnt = 0;
  if ( pkProto->nNumOfItems <= 0u )
  {
LABEL_15:
    if ( v74->m_bSearching == 1 )
    {
      if ( i )
      {
        if ( i )
        {
          MarketSearchWin::RemoveAllList(v74);
          v74->m_bSearching = 0;
        }
      }
      else
      {
        for ( j = v74->m_vecMarketSearchItem._Myfirst; j != v74->m_vecMarketSearchItem._Mylast; ++j )
          ((void (*)(void))(*j)->vfptr->Clear)();
        v74->m_iVecLastIndex = 0;
        v74->m_bSearching = 0;
        v16 = TextData3::Get(0xB0C5B5BF);
        if ( v74->m_pkMsgHooker )
        {
          ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v74->m_pkMsgHooker->vfptr->SendDirectMessage)(
            25,
            v16,
            &v74->vfptr);
          if ( v74->m_pkMsgHooker )
            ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v74->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
              25,
              v16,
              &v74->vfptr);
        }
        v74->vfptr->DirectDispatchToParent((IDirectMessenger *)&v74->vfptr, 25, v16, (IDirectMessenger *)&v74->vfptr);
      }
    }
    v17 = pkProto->nNumOfItems;
    v18 = v74->m_iVecLastIndex;
    v19 = (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&v74->m_vecMarketSearchItem;
    v20 = v74->m_vecMarketSearchItem._Myend - v74->m_vecMarketSearchItem._Myfirst;
    if ( v18 + v17 >= v20 )
    {
      nAddItemCnta = v17 + v18 - v20;
      ia = 0;
      if ( nAddItemCnta )
      {
        do
        {
          v21 = operator new(0x20u);
          if ( v21 )
          {
            *v21 = &MarketSearchItem::`vftable';
            v21[2] = 0;
            v21[4] = -1;
            v21[5] = -1;
            v21[6] = -1;
            *((_WORD *)v21 + 14) = -1;
            v22 = (char *)v21;
          }
          else
          {
            v22 = 0;
          }
          v23 = (unsigned int)v74->m_vecMarketSearchItem._Mylast;
          strSearchWord = v22;
          if ( (unsigned int)&strSearchWord >= v23
            || (v24 = v19->_Myfirst, v19->_Myfirst > (CBaseObject **)&strSearchWord) )
          {
            v32 = v74->m_vecMarketSearchItem._Myend;
            if ( (MarketSearchItem **)v23 == v32 )
            {
              v33 = (signed int)(v23 - (unsigned int)v19->_Myfirst) >> 2;
              if ( v33 > 0x3FFFFFFE )
LABEL_58:
                std::_Xlength_error("vector<T> too long");
              v34 = v33 + 1;
              v35 = ((char *)v32 - (char *)v19->_Myfirst) >> 2;
              if ( v34 > v35 )
              {
                if ( 0x3FFFFFFF - (v35 >> 1) >= v35 )
                  v36 = (v35 >> 1) + v35;
                else
                  v36 = 0;
                if ( v36 < v34 )
                  v36 = v34;
                std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v19, v36);
              }
            }
            v37 = v74->m_vecMarketSearchItem._Mylast;
            if ( v37 )
              *v37 = v22;
          }
          else
          {
            v25 = v74->m_vecMarketSearchItem._Myend;
            v26 = ((char *)&strSearchWord - (char *)v24) >> 2;
            if ( (MarketSearchItem **)v23 == v25 )
            {
              v27 = (signed int)(v23 - (_DWORD)v24) >> 2;
              if ( v27 > 0x3FFFFFFE )
                goto LABEL_58;
              v28 = v27 + 1;
              v29 = ((char *)v25 - (char *)v24) >> 2;
              if ( v28 > v29 )
              {
                if ( 0x3FFFFFFF - (v29 >> 1) >= v29 )
                  v30 = (v29 >> 1) + v29;
                else
                  v30 = 0;
                if ( v30 < v28 )
                  v30 = v28;
                std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v19, v30);
              }
            }
            v31 = v74->m_vecMarketSearchItem._Mylast;
            if ( v31 )
              *v31 = (MarketSearchItem *)v19->_Myfirst[v26];
          }
          ++v74->m_vecMarketSearchItem._Mylast;
          ++ia;
        }
        while ( ia < nAddItemCnta );
      }
      v38 = v74->m_vecMarketSearchItem._Mylast - v74->m_vecMarketSearchItem._Myfirst;
      v39 = v74->m_vecMarketSearchItem._Myend - v74->m_vecMarketSearchItem._Myfirst - v38;
      nAddItemCntb = v74->m_vecMarketSearchItem._Myend - v74->m_vecMarketSearchItem._Myfirst - v38;
      ib = 0;
      if ( v74->m_vecMarketSearchItem._Myend - v74->m_vecMarketSearchItem._Myfirst != v38 )
      {
        do
        {
          v40 = operator new(0x20u);
          if ( v40 )
          {
            *v40 = &MarketSearchItem::`vftable';
            v40[2] = 0;
            v40[4] = -1;
            v40[5] = -1;
            v40[6] = -1;
            *((_WORD *)v40 + 14) = -1;
            v41 = (char *)v40;
          }
          else
          {
            v41 = 0;
          }
          v42 = (unsigned int)v74->m_vecMarketSearchItem._Mylast;
          strSearchWord = v41;
          if ( (unsigned int)&strSearchWord >= v42
            || (v43 = v19->_Myfirst, v19->_Myfirst > (CBaseObject **)&strSearchWord) )
          {
            v51 = v74->m_vecMarketSearchItem._Myend;
            if ( (MarketSearchItem **)v42 == v51 )
            {
              v52 = (signed int)(v42 - (unsigned int)v19->_Myfirst) >> 2;
              if ( v52 > 0x3FFFFFFE )
                goto LABEL_58;
              v53 = v52 + 1;
              v54 = ((char *)v51 - (char *)v19->_Myfirst) >> 2;
              if ( v53 > v54 )
              {
                if ( 0x3FFFFFFF - (v54 >> 1) >= v54 )
                  v55 = (v54 >> 1) + v54;
                else
                  v55 = 0;
                if ( v55 < v53 )
                  v55 = v53;
                std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v19, v55);
                v39 = nAddItemCntb;
              }
            }
            v56 = v74->m_vecMarketSearchItem._Mylast;
            if ( v56 )
              *v56 = v41;
          }
          else
          {
            v44 = v74->m_vecMarketSearchItem._Myend;
            v45 = ((char *)&strSearchWord - (char *)v43) >> 2;
            if ( (MarketSearchItem **)v42 == v44 )
            {
              v46 = (signed int)(v42 - (_DWORD)v43) >> 2;
              if ( v46 > 0x3FFFFFFE )
                goto LABEL_58;
              v47 = v46 + 1;
              v48 = ((char *)v44 - (char *)v43) >> 2;
              if ( v47 > v48 )
              {
                if ( 0x3FFFFFFF - (v48 >> 1) >= v48 )
                  v49 = (v48 >> 1) + v48;
                else
                  v49 = 0;
                if ( v49 < v47 )
                  v49 = v47;
                std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v19, v49);
                v39 = nAddItemCntb;
              }
            }
            v50 = v74->m_vecMarketSearchItem._Mylast;
            if ( v50 )
              *v50 = (MarketSearchItem *)v19->_Myfirst[v45];
          }
          ++v74->m_vecMarketSearchItem._Mylast;
          ++ib;
        }
        while ( ib < v39 );
      }
    }
    v57 = pkProto + 1;
    if ( pkProto != (PROTO_NC_BOOTH_SEARCH_ITEM_LIST_CATEGORIZED_ACK *)-3 )
    {
      nAddItemCntc = 0;
      if ( !pkProto->nNumOfItems )
      {
LABEL_105:
        std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByDefault>(
          v74->m_vecMarketSearchItem._Myfirst,
          v74->m_vecMarketSearchItem._Mylast,
          v74->m_vecMarketSearchItem._Mylast - v74->m_vecMarketSearchItem._Myfirst,
          (MarketSearchWin::SortByDefault)strSearchWord);
        MarketSearchWin::UpdateViewList(v74);
        return 1;
      }
      while ( 1 )
      {
        v58 = v74->m_pkItemSearchInput;
        datasize = v57->nError;
        v59 = (char *)((int (*)(void))v58->vfptr[113].__vecDelDtor)();
        v60 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
        v61 = v57[5].nError;
        v62 = *(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
        strSearchWord = v59;
        if ( !(unsigned __int8)(*(int (__thiscall **)(int, int))(v62 + 16))(
                                 ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                                 v61) )
          break;
        if ( (unsigned __int16)v61 > *(_WORD *)(v60 + 200) )
          break;
        v63 = (int *)(*(_DWORD *)(v60 + 196) + 4 * v61);
        if ( !*v63 )
          break;
        v64 = *v63;
        if ( !v64 || !strSearchWord )
          break;
        v65 = (char *)(v64 + 34);
        v66 = (char *)(strItemName - v65);
        do
        {
          v67 = *v65;
          v65[(_DWORD)v66] = *v65;
          ++v65;
        }
        while ( v67 );
        v68 = strSearchWord;
        _strlwr(strSearchWord);
        _strlwr(strItemName);
        strstr(strItemName, v68);
        if ( v69 )
        {
          v70 = v74->m_vecMarketSearchItem._Myfirst[v74->m_iVecLastIndex];
          v71 = (char *)Item::Create((SHINE_ITEM_STRUCT *)&v57[5]);
          v72 = v70->m_pkItem.m_pObject;
          strSearchWord = v71;
          if ( (char *)v72 != v71 )
          {
            if ( v72 && !InterlockedDecrement((volatile LONG *)&v72->m_uiRefCount) && v72 )
              v72->vfptr->__vecDelDtor((NiRefObject *)v72, 1u);
            v73 = strSearchWord;
            v70->m_pkItem.m_pObject = (Item *)strSearchWord;
            if ( v73 )
              InterlockedIncrement((volatile LONG *)v73 + 1);
          }
          LODWORD(v70->m_nPrice) = *(_DWORD *)((char *)&v57[2].nError + 1);
          HIDWORD(v70->m_nPrice) = *(_DWORD *)&v57[3].nNumOfItems;
          v70->m_hItem = *(_DWORD *)((char *)&v57->nError + 1);
          v70->m_hOwner = *(_WORD *)&v57[1].nNumOfItems;
          ++v74->m_iVecLastIndex;
          v57 = (PROTO_NC_BOOTH_SEARCH_ITEM_LIST_CATEGORIZED_ACK *)((char *)v57 + (unsigned __int8)datasize + 1);
        }
        else
        {
          v57 = (PROTO_NC_BOOTH_SEARCH_ITEM_LIST_CATEGORIZED_ACK *)((char *)v57 + (unsigned __int8)datasize + 1);
        }
        if ( ++nAddItemCntc >= pkProto->nNumOfItems )
          goto LABEL_105;
      }
    }
  }
  else
  {
    while ( 1 )
    {
      v4 = v74->m_pkItemSearchInput->vfptr;
      datasize = v2->nError;
      v5 = (char *)((int (*)(void))v4[113].__vecDelDtor)();
      v6 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      v7 = v2[5].nError;
      v8 = *(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      strSearchWord = v5;
      if ( !(unsigned __int8)(*(int (__thiscall **)(int, int))(v8 + 16))(
                               ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                               v7) )
        break;
      if ( (unsigned __int16)v7 > *(_WORD *)(v6 + 200) )
        break;
      v9 = (int *)(*(_DWORD *)(v6 + 196) + 4 * v7);
      if ( !*v9 )
        break;
      v10 = *v9;
      if ( !v10 || !strSearchWord )
        break;
      v11 = (char *)(v10 + 34);
      v12 = (char *)(strItemName - v11);
      do
      {
        v13 = *v11;
        v11[(_DWORD)v12] = *v11;
        ++v11;
      }
      while ( v13 );
      _strlwr(strSearchWord);
      _strlwr(strItemName);
      strstr(strItemName, strSearchWord);
      if ( v14 )
      {
        ++i;
        v2 = (PROTO_NC_BOOTH_SEARCH_ITEM_LIST_CATEGORIZED_ACK *)((char *)v2 + (unsigned __int8)datasize + 1);
      }
      else
      {
        v2 = (PROTO_NC_BOOTH_SEARCH_ITEM_LIST_CATEGORIZED_ACK *)((char *)v2 + (unsigned __int8)datasize + 1);
      }
      if ( ++nAddItemCnt >= pkProto->nNumOfItems )
        goto LABEL_15;
    }
  }
  return 0;
}
// 994BEC: using guessed type int (__thiscall *MarketSearchItem::`vftable')(void *p, char);
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (00546A10) --------------------------------------------------------
bool __thiscall MarketSearchWin::Sort(MarketSearchWin *this, unsigned int uiMsg)
{
  MarketSearchWin *v2; // esi@1
  MarketSearchItem **v3; // ecx@4
  int v4; // ST08_4@5
  MarketSearchItem **v5; // ST04_4@5
  bool result; // al@5
  MarketSearchItem **v7; // ecx@7
  int v8; // ST08_4@8
  MarketSearchItem **v9; // ST04_4@8
  MarketSearchItem **v10; // eax@10
  MarketSearchItem **v11; // ecx@10
  int v12; // [sp-8h] [bp-Ch]@10

  v2 = this;
  if ( uiMsg == 11 )
  {
    v10 = this->m_vecMarketSearchItem._Mylast;
    v11 = this->m_vecMarketSearchItem._Myfirst;
    v12 = v10 - v11;
    if ( v2->m_uiSortState == 1 )
    {
      v2->m_uiSortState = 2;
      std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByName>(v11, v10, v12, (MarketSearchWin::SortByName)11);
      MarketSearchWin::UpdateViewList(v2);
      return 1;
    }
    v2->m_uiSortState = 1;
    std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByNameDesc>(
      v11,
      v10,
      v12,
      (MarketSearchWin::SortByNameDesc)11);
    goto LABEL_13;
  }
  if ( uiMsg != 12 )
  {
    if ( uiMsg == 13 )
    {
      v3 = this->m_vecMarketSearchItem._Myfirst;
      if ( v2->m_uiSortState == 5 )
      {
        v4 = v2->m_vecMarketSearchItem._Mylast - v3;
        v5 = v2->m_vecMarketSearchItem._Mylast;
        v2->m_uiSortState = 6;
        std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByMoney>(
          v3,
          v5,
          v4,
          (MarketSearchWin::SortByMoney)uiMsg);
        MarketSearchWin::UpdateViewList(v2);
        result = 1;
      }
      else
      {
        v2->m_uiSortState = 5;
        std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByMoneyDesc>(
          v3,
          v2->m_vecMarketSearchItem._Mylast,
          v2->m_vecMarketSearchItem._Mylast - v3,
          (MarketSearchWin::SortByMoneyDesc)uiMsg);
        MarketSearchWin::UpdateViewList(v2);
        result = 1;
      }
      return result;
    }
LABEL_13:
    MarketSearchWin::UpdateViewList(v2);
    return 1;
  }
  v7 = this->m_vecMarketSearchItem._Myfirst;
  if ( v2->m_uiSortState == 3 )
  {
    v8 = v2->m_vecMarketSearchItem._Mylast - v7;
    v9 = v2->m_vecMarketSearchItem._Mylast;
    v2->m_uiSortState = 4;
    std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByLevel>(v7, v9, v8, (MarketSearchWin::SortByLevel)12);
    MarketSearchWin::UpdateViewList(v2);
    result = 1;
  }
  else
  {
    v2->m_uiSortState = 3;
    std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByLevelDesc>(
      v7,
      v2->m_vecMarketSearchItem._Mylast,
      v2->m_vecMarketSearchItem._Mylast - v7,
      (MarketSearchWin::SortByLevelDesc)12);
    MarketSearchWin::UpdateViewList(v2);
    result = 1;
  }
  return result;
}

//----- (00546B80) --------------------------------------------------------
void __thiscall MarketSearchWin::OnCommand(MarketSearchWin *this, unsigned int wParam, int lParam)
{
  MarketSearchWin *v3; // esi@1
  char v4; // al@2
  char v5; // al@3

  v3 = this;
  switch ( wParam )
  {
    case 0u:
      v4 = ((int (*)(void))this->m_pkChosenItemCategoryBG->vfptr[65].__vecDelDtor)();
      MarketSearchWin::ShowWTCombo(v3, v4 == 0);
      break;
    case 1u:
    case 2u:
    case 3u:
    case 4u:
    case 5u:
    case 6u:
    case 7u:
    case 8u:
      MarketSearchWin::SetCategoryFromBtn(this, wParam);
      v5 = ((int (*)(void))v3->m_pkChosenItemCategoryBG->vfptr[65].__vecDelDtor)();
      MarketSearchWin::ShowWTCombo(v3, v5 == 0);
      break;
    case 0xBu:
    case 0xCu:
    case 0xDu:
      MarketSearchWin::Sort(this, wParam);
      break;
    case 0xFu:
      MarketSearchWin::RefreshItemViewSlide(this);
      break;
    case 0xEu:
      this->m_pkMyClassViewBtn->m_bCheck = this->m_pkMyClassViewBtn->m_bCheck == 0;
      break;
    case 9u:
      MarketSearchWin::OnSearch(this);
      break;
    case 0xAu:
      MarketSearchWin::OnSearchBooth(this);
      break;
    default:
      return;
  }
}

//----- (00546C70) --------------------------------------------------------
char __thiscall MarketSearchWin::Create(MarketSearchWin *this, PgFrameWork *pkFrameWork)
{
  MarketSearchWin *v2; // esi@1
  const char *v3; // eax@3
  NiNode *v4; // eax@3
  NiNode *v5; // esi@7
  PgSprData *v7; // eax@11
  NiNode *v8; // esi@12
  LONG v9; // eax@13
  NiSourceTexture *v10; // eax@18
  PgSprData *v11; // eax@19
  PgSprData *v12; // edi@22
  PgFont *v13; // eax@26
  PgWinText *v14; // edi@26
  NiUnsharedGeometryGroup *v15; // eax@26
  SLWCreateInfo::Item *v16; // edi@26
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *v17; // edi@26
  SLWCreateInfo::Item *v18; // edi@32
  SLWCreateInfo::Item *v19; // edi@34
  SLWCreateInfo::Item *v20; // edi@36
  SLWCreateInfo::Item *v21; // edi@38
  SLWCreateInfo::Item *v22; // edi@40
  SLWCreateInfo::Item *v23; // edi@42
  SLWCreateInfo::Item *v24; // edi@44
  PgSprData *v25; // eax@46
  SlideListWin *v26; // eax@46
  PgSprData *v27; // eax@46
  SlideBar *v28; // eax@46
  _DWORD *v29; // eax@47
  PgWinBut *v30; // edi@51
  D3DXCOLOR v31; // ST20_16@51
  char *v32; // eax@51
  PgWinBut *v33; // edi@51
  D3DXCOLOR v34; // ST20_16@51
  char *v35; // eax@51
  PgWinSpr *v36; // eax@51
  PgWinSpr *v37; // eax@51
  PgWinSpr *v38; // eax@51
  PgWinSpr *v39; // eax@51
  int v40; // edi@51
  NiNode *v41; // esi@55
  unsigned int uiHeight; // [sp+44h] [bp-78h]@23
  MarketSearchItem *pkMarketSearchItem; // [sp+48h] [bp-74h]@50
  unsigned int uiWidth; // [sp+4Ch] [bp-70h]@23
  SLWCreateInfo kCreateInfo; // [sp+50h] [bp-6Ch]@26
  UIUtil ui; // [sp+6Ch] [bp-50h]@21
  NiTexturePalette *pTexturePalette; // [sp+80h] [bp-3Ch]@1
  int iTop; // [sp+84h] [bp-38h]@11
  int iLeft; // [sp+88h] [bp-34h]@11
  NiPointer<NiNode> spNode; // [sp+8Ch] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+90h] [bp-2Ch]@26
  int v52; // [sp+B8h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v52 = 0;
  pTexturePalette = ::pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v3 = Folder::Merge(&Folder::m_acMenu, "Game\\MarketSearch.nif");
  PgUtil::LoadNodeNifFile(v3, &spNode, pTexturePalette);
  v4 = spNode.m_pObject;
  if ( !spNode.m_pObject )
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("Game\\MarketSearch.nif load fila", "LoadFail", 0);
      v4 = spNode.m_pObject;
    }
    v52 = -1;
    if ( v4 )
    {
      v5 = v4;
      if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    return 0;
  }
  iLeft = 0;
  iTop = 0;
  v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iLeft, &iTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v7, 0, pkFrameWork, "MarketSearchWin", 0) )
  {
    v8 = spNode.m_pObject;
    v52 = -1;
    if ( spNode.m_pObject )
    {
      v9 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
LABEL_14:
      if ( !v9 && v8 )
        v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      return 0;
    }
    return 0;
  }
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft, iTop, v11, (PgWin *)&v2->vfptr, 0, 0);
  UIUtil::UIUtil(&ui);
  LOBYTE(v52) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, 0, 0);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  UIUtil::CreateSpr(&ui, "Plane01", 0);
  UIUtil::CreateSpr(&ui, "Line01", 0);
  UIUtil::CreateCloseBtn(&ui, "ClsNor", "ClsOver", "ClsClick");
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &iLeft, &iTop, 0);
    PgSprData::Add(v12, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(v12, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(iLeft, iTop, v12, (PgWin *)&v2->vfptr, 0x10u, 0, 0);
  }
  uiWidth = 0;
  uiHeight = 0;
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &iLeft, &iTop, &uiWidth, &uiHeight) )
  {
    LOBYTE(v52) = 0;
    UIUtil::~UIUtil(&ui);
    v8 = spNode.m_pObject;
    v52 = -1;
    if ( spNode.m_pObject )
    {
      v9 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
      goto LABEL_14;
    }
    return 0;
  }
  v13 = Font::Get(MAIN_MENU);
  v14 = PgWinText::CreateWin(iLeft, iTop, uiWidth, uiHeight, v13, (PgWin *)&v2->vfptr, 0, 0);
  v14->vfptr[117].__vecDelDtor((NiRefObject *)v14, (unsigned int)&Color::m_kDxWinTitleColor);
  v14->vfptr[122].__vecDelDtor((NiRefObject *)v14, 1u);
  pTexturePalette = (NiTexturePalette *)&v14->vfptr[118];
  v15 = TextData3::Get(0x6865A7BCu);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pTexturePalette->vfptr)(v14, v15);
  v14->vfptr[60].__vecDelDtor((NiRefObject *)v14, 0);
  kCreateInfo.m_arrItem._Myfirst = 0;
  kCreateInfo.m_arrItem._Mylast = 0;
  kCreateInfo.m_arrItem._Myend = 0;
  kCreateInfo.m_bMakeData = 0;
  kCreateInfo.m_nOffX = 0;
  kCreateInfo.m_nOffY = 0;
  LOBYTE(v52) = 2;
  v16 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
  v16->nItemType = 1;
  v16->pNode = spNode.m_pObject;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarNor", 0xCu);
  v17 = &v16->vecNodeName;
  LOBYTE(v52) = 3;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v17,
    &_Val);
  LOBYTE(v52) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarClick", 0xEu);
  LOBYTE(v52) = 4;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v17,
    &_Val);
  LOBYTE(v52) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarOver", 0xDu);
  LOBYTE(v52) = 5;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v17,
    &_Val);
  LOBYTE(v52) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v18 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  v18->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column01", 8u);
  LOBYTE(v52) = 6;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &v18->vecNodeName,
    &_Val);
  LOBYTE(v52) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  SLWCreateInfo::Item::AddWin(v18, "InvItemSlot001_icon", ITEMICON);
  v18->pNode = spNode.m_pObject;
  v19 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  v19->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column02", 8u);
  LOBYTE(v52) = 7;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &v19->vecNodeName,
    &_Val);
  LOBYTE(v52) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v19->pNode = spNode.m_pObject;
  v19->bAbbreviatable = 1;
  v20 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  v20->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column03", 8u);
  LOBYTE(v52) = 8;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &v20->vecNodeName,
    &_Val);
  LOBYTE(v52) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v20->pNode = spNode.m_pObject;
  v21 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  v21->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "GemInput", 8u);
  LOBYTE(v52) = 9;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &v21->vecNodeName,
    &_Val);
  LOBYTE(v52) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v21->pNode = spNode.m_pObject;
  v22 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  v22->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "GoldInput", 9u);
  LOBYTE(v52) = 10;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &v22->vecNodeName,
    &_Val);
  LOBYTE(v52) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v22->pNode = spNode.m_pObject;
  v23 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  v23->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "SilverInput", 0xBu);
  LOBYTE(v52) = 11;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &v23->vecNodeName,
    &_Val);
  LOBYTE(v52) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v23->pNode = spNode.m_pObject;
  v24 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  v24->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "CopperInput", 0xBu);
  LOBYTE(v52) = 12;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &v24->vecNodeName,
    &_Val);
  LOBYTE(v52) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v24->pNode = spNode.m_pObject;
  SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
  v25 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ColumnBox", &iLeft, &iTop, 0);
  v26 = SlideListWin::CreateWin(iLeft, iTop, v25, (PgWin *)&v2->vfptr, &kCreateInfo, 1u, 0);
  v2->m_pkItemViewSlideListWin = v26;
  SlideListWin::UpdateViewList(v26);
  v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle", &iLeft, &iTop, 0);
  v28 = SlideBar::CreateWin(
          spNode.m_pObject,
          "SlideBar",
          "SlideBar_UpBtn",
          "SlideBar_DnBtn",
          v27,
          0,
          (PgWin *)&v2->vfptr);
  v2->m_pkSlideBar = v28;
  v28->m_uiClickMsg = 15;
  v2->m_pkSlideBar->m_eType = 1;
  NiObjectNET::SetName((NiObjectNET *)&v2->m_pkSlideBar->vfptr, "MarketSearchWinSlide");
  std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
    (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&v2->m_vecMarketSearchItem,
    0x64u);
  pTexturePalette = (NiTexturePalette *)100;
  do
  {
    v29 = operator new(0x20u);
    if ( v29 )
    {
      *v29 = &MarketSearchItem::`vftable';
      v29[2] = 0;
      v29[4] = -1;
      v29[5] = -1;
      v29[6] = -1;
      *((_WORD *)v29 + 14) = -1;
    }
    else
    {
      v29 = 0;
    }
    pkMarketSearchItem = (MarketSearchItem *)v29;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_vecMarketSearchItem,
      (const unsigned int *)&pkMarketSearchItem);
    pTexturePalette = (NiTexturePalette *)((char *)pTexturePalette - 1);
  }
  while ( pTexturePalette );
  v30 = UIUtil::CreateButton(&ui, 0xBu, "Title01", 0, 3);
  *(_QWORD *)&v31.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v31.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v32 = (char *)TextData3::Get(0x7278A2C2u);
  UIUtil::CreateAttachedText((PgWin *)&v30->vfptr, v32, v31, 5u);
  v33 = UIUtil::CreateButton(&ui, 0xCu, "Title02", 0, 3);
  *(_QWORD *)&v34.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v34.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v35 = (char *)TextData3::Get(0xBACB90B9);
  UIUtil::CreateAttachedText((PgWin *)&v33->vfptr, v35, v34, 5u);
  UIUtil::CreateButton(&ui, 0xDu, "Title03", 0, 3);
  v36 = UIUtil::CreateSpr(&ui, "GemBtn", 0);
  v36->vfptr[60].__vecDelDtor((NiRefObject *)v36, 0);
  v37 = UIUtil::CreateSpr(&ui, "GoldBtn", 0);
  v37->vfptr[60].__vecDelDtor((NiRefObject *)v37, 0);
  v38 = UIUtil::CreateSpr(&ui, "SilverBtn", 0);
  v38->vfptr[60].__vecDelDtor((NiRefObject *)v38, 0);
  v39 = UIUtil::CreateSpr(&ui, "CopperBtn", 0);
  v39->vfptr[60].__vecDelDtor((NiRefObject *)v39, 0);
  MarketSearchWin::InitItemSearchUI(v2, &ui);
  MarketSearchWin::InitCategoryComboBoxUI(v2, &ui);
  v40 = (int)&v2->m_pkItemCategory[2];
  pTexturePalette = (NiTexturePalette *)8;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v40 + 256))(0);
    v40 += 4;
    pTexturePalette = (NiTexturePalette *)((char *)pTexturePalette - 1);
  }
  while ( pTexturePalette );
  ((void (__stdcall *)(_DWORD))v2->m_pkChosenItemCategoryBG->vfptr[64].__vecDelDtor)(0);
  ((void (__thiscall *)(MarketSearchWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  LOBYTE(v52) = 1;
  if ( kCreateInfo.m_arrItem._Myfirst )
  {
    std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(
      kCreateInfo.m_arrItem._Myfirst,
      kCreateInfo.m_arrItem._Mylast);
    operator delete(kCreateInfo.m_arrItem._Myfirst);
  }
  kCreateInfo.m_arrItem._Myfirst = 0;
  kCreateInfo.m_arrItem._Mylast = 0;
  kCreateInfo.m_arrItem._Myend = 0;
  LOBYTE(v52) = 0;
  UIUtil::~UIUtil(&ui);
  v41 = spNode.m_pObject;
  v52 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v41 )
    v41->vfptr->__vecDelDtor((NiRefObject *)v41, 1u);
  return 1;
}
// 994BEC: using guessed type int (__thiscall *MarketSearchItem::`vftable')(void *p, char);
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00547610) --------------------------------------------------------
unsigned int __cdecl ITableBase<MarketSearchInfo,MarketSearchInfoTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<MarketSearchInfo,MarketSearchInfoTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C254: using guessed type int ITableBase<MarketSearchInfo,MarketSearchInfoTab>::ms_pkTable;

//----- (00547630) --------------------------------------------------------
MarketSearchItem *__thiscall MarketSearchItem::`vector deleting destructor'(MarketSearchItem *this, unsigned int a2)
{
  MarketSearchItem *v2; // edi@1
  Item *v3; // esi@1

  v2 = this;
  this->vfptr = (MarketSearchItemVtbl *)&MarketSearchItem::`vftable';
  v3 = this->m_pkItem.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 994BEC: using guessed type int (__thiscall *MarketSearchItem::`vftable')(void *p, char);

//----- (00547680) --------------------------------------------------------
void __cdecl std::_Insertion_sort1<MarketSearchItem * *,MarketSearchWin::SortByDefault,MarketSearchItem *>(MarketSearchItem **_First, MarketSearchItem **_Last)
{
  char *v2; // esi@1
  MarketSearchItem **i; // ebx@2
  MarketSearchItem *v4; // edi@3
  MarketSearchItem **v5; // esi@5
  MarketSearchItem *v6; // edx@6
  MarketSearchItem **_Next1; // [sp+4h] [bp-4h]@3

  v2 = (char *)_First;
  if ( _First != _Last )
  {
    for ( i = _First + 1; i != _Last; ++i )
    {
      v4 = *i;
      _Next1 = i;
      if ( MarketSearchWin::SortByDefault::operator()(*i, *(MarketSearchItem **)v2) )
      {
        memmove((char *)&i[-(((char *)i - v2) >> 2) + 1], v2, 4 * (((char *)i - v2) >> 2));
        *(_DWORD *)v2 = v4;
      }
      else
      {
        v5 = i - 1;
        if ( MarketSearchWin::SortByDefault::operator()(v4, *(i - 1)) )
        {
          do
          {
            *_Next1 = *v5;
            v6 = *(v5 - 1);
            _Next1 = v5;
            --v5;
          }
          while ( MarketSearchWin::SortByDefault::operator()(v4, v6) );
        }
        v2 = (char *)_First;
        *_Next1 = v4;
      }
    }
  }
}

//----- (00547730) --------------------------------------------------------
void __cdecl std::_Insertion_sort1<MarketSearchItem * *,MarketSearchWin::SortByName,MarketSearchItem *>(MarketSearchItem **_First, MarketSearchItem **_Last)
{
  char *v2; // esi@1
  MarketSearchItem **i; // ebx@2
  MarketSearchItem *v4; // edi@3
  MarketSearchItem **v5; // esi@5
  MarketSearchItem *v6; // edx@6
  MarketSearchItem **_Next1; // [sp+4h] [bp-4h]@3

  v2 = (char *)_First;
  if ( _First != _Last )
  {
    for ( i = _First + 1; i != _Last; ++i )
    {
      v4 = *i;
      _Next1 = i;
      if ( MarketSearchWin::SortByName::operator()(*i, *(MarketSearchItem **)v2) )
      {
        memmove((char *)&i[-(((char *)i - v2) >> 2) + 1], v2, 4 * (((char *)i - v2) >> 2));
        *(_DWORD *)v2 = v4;
      }
      else
      {
        v5 = i - 1;
        if ( MarketSearchWin::SortByName::operator()(v4, *(i - 1)) )
        {
          do
          {
            *_Next1 = *v5;
            v6 = *(v5 - 1);
            _Next1 = v5;
            --v5;
          }
          while ( MarketSearchWin::SortByName::operator()(v4, v6) );
        }
        v2 = (char *)_First;
        *_Next1 = v4;
      }
    }
  }
}

//----- (005477E0) --------------------------------------------------------
void __cdecl std::_Insertion_sort1<MarketSearchItem * *,MarketSearchWin::SortByNameDesc,MarketSearchItem *>(MarketSearchItem **_First, MarketSearchItem **_Last)
{
  char *v2; // esi@1
  MarketSearchItem **i; // ebx@2
  MarketSearchItem *v4; // edi@3
  MarketSearchItem **v5; // esi@5
  MarketSearchItem *v6; // edx@6
  MarketSearchItem **_Next1; // [sp+4h] [bp-4h]@3

  v2 = (char *)_First;
  if ( _First != _Last )
  {
    for ( i = _First + 1; i != _Last; ++i )
    {
      v4 = *i;
      _Next1 = i;
      if ( MarketSearchWin::SortByNameDesc::operator()(*i, *(MarketSearchItem **)v2) )
      {
        memmove((char *)&i[-(((char *)i - v2) >> 2) + 1], v2, 4 * (((char *)i - v2) >> 2));
        *(_DWORD *)v2 = v4;
      }
      else
      {
        v5 = i - 1;
        if ( MarketSearchWin::SortByNameDesc::operator()(v4, *(i - 1)) )
        {
          do
          {
            *_Next1 = *v5;
            v6 = *(v5 - 1);
            _Next1 = v5;
            --v5;
          }
          while ( MarketSearchWin::SortByNameDesc::operator()(v4, v6) );
        }
        v2 = (char *)_First;
        *_Next1 = v4;
      }
    }
  }
}

//----- (00547890) --------------------------------------------------------
void __cdecl std::_Insertion_sort1<MarketSearchItem * *,MarketSearchWin::SortByLevel,MarketSearchItem *>(MarketSearchItem **_First, MarketSearchItem **_Last)
{
  char *v2; // esi@1
  MarketSearchItem **i; // ebx@2
  MarketSearchItem *v4; // edi@3
  MarketSearchItem **v5; // esi@5
  MarketSearchItem *v6; // edx@6
  MarketSearchItem **_Next1; // [sp+4h] [bp-4h]@3

  v2 = (char *)_First;
  if ( _First != _Last )
  {
    for ( i = _First + 1; i != _Last; ++i )
    {
      v4 = *i;
      _Next1 = i;
      if ( MarketSearchWin::SortByLevel::operator()(*i, *(MarketSearchItem **)v2) )
      {
        memmove((char *)&i[-(((char *)i - v2) >> 2) + 1], v2, 4 * (((char *)i - v2) >> 2));
        *(_DWORD *)v2 = v4;
      }
      else
      {
        v5 = i - 1;
        if ( MarketSearchWin::SortByLevel::operator()(v4, *(i - 1)) )
        {
          do
          {
            *_Next1 = *v5;
            v6 = *(v5 - 1);
            _Next1 = v5;
            --v5;
          }
          while ( MarketSearchWin::SortByLevel::operator()(v4, v6) );
        }
        v2 = (char *)_First;
        *_Next1 = v4;
      }
    }
  }
}

//----- (00547940) --------------------------------------------------------
void __cdecl std::_Insertion_sort1<MarketSearchItem * *,MarketSearchWin::SortByLevelDesc,MarketSearchItem *>(MarketSearchItem **_First, MarketSearchItem **_Last)
{
  char *v2; // esi@1
  MarketSearchItem **i; // ebx@2
  MarketSearchItem *v4; // edi@3
  MarketSearchItem **v5; // esi@5
  MarketSearchItem *v6; // edx@6
  MarketSearchItem **_Next1; // [sp+4h] [bp-4h]@3

  v2 = (char *)_First;
  if ( _First != _Last )
  {
    for ( i = _First + 1; i != _Last; ++i )
    {
      v4 = *i;
      _Next1 = i;
      if ( MarketSearchWin::SortByLevelDesc::operator()(*i, *(MarketSearchItem **)v2) )
      {
        memmove((char *)&i[-(((char *)i - v2) >> 2) + 1], v2, 4 * (((char *)i - v2) >> 2));
        *(_DWORD *)v2 = v4;
      }
      else
      {
        v5 = i - 1;
        if ( MarketSearchWin::SortByLevelDesc::operator()(v4, *(i - 1)) )
        {
          do
          {
            *_Next1 = *v5;
            v6 = *(v5 - 1);
            _Next1 = v5;
            --v5;
          }
          while ( MarketSearchWin::SortByLevelDesc::operator()(v4, v6) );
        }
        v2 = (char *)_First;
        *_Next1 = v4;
      }
    }
  }
}

//----- (005479F0) --------------------------------------------------------
void __cdecl std::_Insertion_sort1<MarketSearchItem * *,MarketSearchWin::SortByMoney,MarketSearchItem *>(MarketSearchItem **_First, MarketSearchItem **_Last)
{
  char *v2; // esi@1
  MarketSearchItem **i; // ebx@2
  MarketSearchItem *v4; // edi@3
  MarketSearchItem **v5; // esi@5
  MarketSearchItem *v6; // edx@6
  MarketSearchItem **_Next1; // [sp+4h] [bp-4h]@3

  v2 = (char *)_First;
  if ( _First != _Last )
  {
    for ( i = _First + 1; i != _Last; ++i )
    {
      v4 = *i;
      _Next1 = i;
      if ( MarketSearchWin::SortByMoney::operator()(*i, *(MarketSearchItem **)v2) )
      {
        memmove((char *)&i[-(((char *)i - v2) >> 2) + 1], v2, 4 * (((char *)i - v2) >> 2));
        *(_DWORD *)v2 = v4;
      }
      else
      {
        v5 = i - 1;
        if ( MarketSearchWin::SortByMoney::operator()(v4, *(i - 1)) )
        {
          do
          {
            *_Next1 = *v5;
            v6 = *(v5 - 1);
            _Next1 = v5;
            --v5;
          }
          while ( MarketSearchWin::SortByMoney::operator()(v4, v6) );
        }
        v2 = (char *)_First;
        *_Next1 = v4;
      }
    }
  }
}

//----- (00547AA0) --------------------------------------------------------
void __cdecl std::_Insertion_sort1<MarketSearchItem * *,MarketSearchWin::SortByMoneyDesc,MarketSearchItem *>(MarketSearchItem **_First, MarketSearchItem **_Last)
{
  char *v2; // esi@1
  MarketSearchItem **i; // ebx@2
  MarketSearchItem *v4; // edi@3
  MarketSearchItem **v5; // esi@5
  MarketSearchItem *v6; // edx@6
  MarketSearchItem **_Next1; // [sp+4h] [bp-4h]@3

  v2 = (char *)_First;
  if ( _First != _Last )
  {
    for ( i = _First + 1; i != _Last; ++i )
    {
      v4 = *i;
      _Next1 = i;
      if ( MarketSearchWin::SortByMoneyDesc::operator()(*i, *(MarketSearchItem **)v2) )
      {
        memmove((char *)&i[-(((char *)i - v2) >> 2) + 1], v2, 4 * (((char *)i - v2) >> 2));
        *(_DWORD *)v2 = v4;
      }
      else
      {
        v5 = i - 1;
        if ( MarketSearchWin::SortByMoneyDesc::operator()(v4, *(i - 1)) )
        {
          do
          {
            *_Next1 = *v5;
            v6 = *(v5 - 1);
            _Next1 = v5;
            --v5;
          }
          while ( MarketSearchWin::SortByMoneyDesc::operator()(v4, v6) );
        }
        v2 = (char *)_First;
        *_Next1 = v4;
      }
    }
  }
}

//----- (00547B50) --------------------------------------------------------
void __cdecl std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByDefault>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last)
{
  MarketSearchItem *v3; // eax@2
  MarketSearchItem *v4; // eax@4
  MarketSearchItem *v5; // eax@6

  if ( MarketSearchWin::SortByDefault::operator()(*_Mid, *_First) )
  {
    v3 = *_Mid;
    *_Mid = *_First;
    *_First = v3;
  }
  if ( MarketSearchWin::SortByDefault::operator()(*_Last, *_Mid) )
  {
    v4 = *_Last;
    *_Last = *_Mid;
    *_Mid = v4;
  }
  if ( MarketSearchWin::SortByDefault::operator()(*_Mid, *_First) )
  {
    v5 = *_Mid;
    *_Mid = *_First;
    *_First = v5;
  }
}

//----- (00547BC0) --------------------------------------------------------
void __cdecl std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByName>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last)
{
  MarketSearchItem *v3; // eax@2
  MarketSearchItem *v4; // eax@4
  MarketSearchItem *v5; // eax@6

  if ( MarketSearchWin::SortByName::operator()(*_Mid, *_First) )
  {
    v3 = *_Mid;
    *_Mid = *_First;
    *_First = v3;
  }
  if ( MarketSearchWin::SortByName::operator()(*_Last, *_Mid) )
  {
    v4 = *_Last;
    *_Last = *_Mid;
    *_Mid = v4;
  }
  if ( MarketSearchWin::SortByName::operator()(*_Mid, *_First) )
  {
    v5 = *_Mid;
    *_Mid = *_First;
    *_First = v5;
  }
}

//----- (00547C30) --------------------------------------------------------
void __cdecl std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByNameDesc>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last)
{
  MarketSearchItem *v3; // eax@2
  MarketSearchItem *v4; // eax@4
  MarketSearchItem *v5; // eax@6

  if ( MarketSearchWin::SortByNameDesc::operator()(*_Mid, *_First) )
  {
    v3 = *_Mid;
    *_Mid = *_First;
    *_First = v3;
  }
  if ( MarketSearchWin::SortByNameDesc::operator()(*_Last, *_Mid) )
  {
    v4 = *_Last;
    *_Last = *_Mid;
    *_Mid = v4;
  }
  if ( MarketSearchWin::SortByNameDesc::operator()(*_Mid, *_First) )
  {
    v5 = *_Mid;
    *_Mid = *_First;
    *_First = v5;
  }
}

//----- (00547CA0) --------------------------------------------------------
void __cdecl std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByLevel>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last)
{
  MarketSearchItem *v3; // eax@2
  MarketSearchItem *v4; // eax@4
  MarketSearchItem *v5; // eax@6

  if ( MarketSearchWin::SortByLevel::operator()(*_Mid, *_First) )
  {
    v3 = *_Mid;
    *_Mid = *_First;
    *_First = v3;
  }
  if ( MarketSearchWin::SortByLevel::operator()(*_Last, *_Mid) )
  {
    v4 = *_Last;
    *_Last = *_Mid;
    *_Mid = v4;
  }
  if ( MarketSearchWin::SortByLevel::operator()(*_Mid, *_First) )
  {
    v5 = *_Mid;
    *_Mid = *_First;
    *_First = v5;
  }
}

//----- (00547D10) --------------------------------------------------------
void __cdecl std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByLevelDesc>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last)
{
  MarketSearchItem *v3; // eax@2
  MarketSearchItem *v4; // eax@4
  MarketSearchItem *v5; // eax@6

  if ( MarketSearchWin::SortByLevelDesc::operator()(*_Mid, *_First) )
  {
    v3 = *_Mid;
    *_Mid = *_First;
    *_First = v3;
  }
  if ( MarketSearchWin::SortByLevelDesc::operator()(*_Last, *_Mid) )
  {
    v4 = *_Last;
    *_Last = *_Mid;
    *_Mid = v4;
  }
  if ( MarketSearchWin::SortByLevelDesc::operator()(*_Mid, *_First) )
  {
    v5 = *_Mid;
    *_Mid = *_First;
    *_First = v5;
  }
}

//----- (00547D80) --------------------------------------------------------
void __cdecl std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByMoney>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last)
{
  MarketSearchItem *v3; // eax@2
  MarketSearchItem *v4; // eax@4
  MarketSearchItem *v5; // eax@6

  if ( MarketSearchWin::SortByMoney::operator()(*_Mid, *_First) )
  {
    v3 = *_Mid;
    *_Mid = *_First;
    *_First = v3;
  }
  if ( MarketSearchWin::SortByMoney::operator()(*_Last, *_Mid) )
  {
    v4 = *_Last;
    *_Last = *_Mid;
    *_Mid = v4;
  }
  if ( MarketSearchWin::SortByMoney::operator()(*_Mid, *_First) )
  {
    v5 = *_Mid;
    *_Mid = *_First;
    *_First = v5;
  }
}

//----- (00547DF0) --------------------------------------------------------
void __cdecl std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByMoneyDesc>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last)
{
  MarketSearchItem *v3; // eax@2
  MarketSearchItem *v4; // eax@4
  MarketSearchItem *v5; // eax@6

  if ( MarketSearchWin::SortByMoneyDesc::operator()(*_Mid, *_First) )
  {
    v3 = *_Mid;
    *_Mid = *_First;
    *_First = v3;
  }
  if ( MarketSearchWin::SortByMoneyDesc::operator()(*_Last, *_Mid) )
  {
    v4 = *_Last;
    *_Last = *_Mid;
    *_Mid = v4;
  }
  if ( MarketSearchWin::SortByMoneyDesc::operator()(*_Mid, *_First) )
  {
    v5 = *_Mid;
    *_Mid = *_First;
    *_First = v5;
  }
}

//----- (00547E60) --------------------------------------------------------
void __cdecl std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByDefault>(MarketSearchItem **_First, int _Hole, int _Top, MarketSearchItem **_Val)
{
  int v4; // ecx@1
  MarketSearchItem **v5; // esi@4
  MarketSearchItem *v6; // edx@4
  MarketSearchItem *v7; // edi@4
  Item *v8; // ebx@9
  unsigned int v9; // esi@9
  unsigned int v10; // esi@11
  AuctionGroup v11; // ecx@13
  AuctionGroup v12; // edx@13
  signed int v13; // eax@13
  signed int v14; // edx@18
  unsigned int v15; // eax@19
  unsigned int v16; // ecx@19
  MarketSearchItem *v17; // [sp+4h] [bp-Ch]@4
  Item *v18; // [sp+8h] [bp-8h]@9
  int _Idx; // [sp+Ch] [bp-4h]@1

  v4 = (_Hole - 1) / 2;
  _Idx = (_Hole - 1) / 2;
  if ( _Top < _Hole )
  {
    while ( 1 )
    {
      v5 = _First;
      v6 = _First[v4];
      v7 = *_Val;
      v17 = _First[v4];
      if ( v6->m_hItem == -1 )
      {
        if ( v7->m_hItem == -1 || v7->m_hItem != -1 )
          goto LABEL_27;
      }
      else if ( v7->m_hItem == -1 )
      {
        goto LABEL_26;
      }
      v8 = v6->m_pkItem.m_pObject;
      v18 = v7->m_pkItem.m_pObject;
      v9 = 0;
      if ( ITableBase<MarketSearchInfo,MarketSearchInfoTab>::GetTotal() )
      {
        do
          CDataReader::GetRecord(
            (CDataReader *)(ITableBase<MarketSearchInfo,MarketSearchInfoTab>::ms_pkTable + 4),
            v9++);
        while ( v9 < ITableBase<MarketSearchInfo,MarketSearchInfoTab>::GetTotal() );
      }
      v10 = 0;
      if ( ITableBase<MarketSearchInfo,MarketSearchInfoTab>::GetTotal() )
      {
        do
          CDataReader::GetRecord(
            (CDataReader *)(ITableBase<MarketSearchInfo,MarketSearchInfoTab>::ms_pkTable + 4),
            v10++);
        while ( v10 < ITableBase<MarketSearchInfo,MarketSearchInfoTab>::GetTotal() );
      }
      v11 = v8->m_pkInfo->ItemAuctionGroup;
      v12 = v18->m_pkInfo->ItemAuctionGroup;
      v13 = 0;
      if ( v11 != v12 )
      {
        if ( v11 <= (unsigned int)v12 )
        {
          if ( v11 < (unsigned int)v12 )
            v13 = 1;
        }
        else
        {
          v13 = -1;
        }
      }
      v14 = v13;
      if ( !v13 )
      {
        v15 = v7->m_hItem;
        v16 = v17->m_hItem;
        if ( v16 != v15 )
        {
          if ( v16 <= v15 )
          {
            if ( v16 < v15 )
              v14 = 1;
          }
          else
          {
            v14 = -1;
          }
        }
      }
      v5 = _First;
      if ( v14 <= 0 )
      {
LABEL_27:
        v5[_Hole] = *_Val;
        return;
      }
      v4 = _Idx;
LABEL_26:
      v5[_Hole] = v5[v4];
      _Hole = v4;
      _Idx = (v4 - 1) / 2;
      if ( _Top >= v4 )
        goto LABEL_27;
      v4 = (v4 - 1) / 2;
    }
  }
  _First[_Hole] = *_Val;
}
// A8C254: using guessed type int ITableBase<MarketSearchInfo,MarketSearchInfoTab>::ms_pkTable;

//----- (00547FC0) --------------------------------------------------------
void __cdecl std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByName>(MarketSearchItem **_First, int _Hole, int _Top, MarketSearchItem **_Val)
{
  int v4; // edx@1
  MarketSearchItem *v5; // ecx@4
  MarketSearchItem *v6; // ebx@4
  ItemInfo *v7; // esi@9
  ItemInfo *v8; // edi@9
  int v9; // eax@11
  signed int v10; // ecx@12
  signed int v11; // edx@12
  unsigned int v12; // edx@20
  unsigned int v13; // ecx@20
  unsigned int v14; // edi@20
  unsigned int v15; // esi@20
  bool v16; // cf@21
  bool v17; // zf@21
  AuctionGroup v18; // ecx@34
  AuctionGroup v19; // edx@34
  unsigned int v20; // ecx@40
  unsigned int v21; // edx@40
  Item *Item1; // [sp+0h] [bp-10h]@9
  Item *Item2; // [sp+4h] [bp-Ch]@9
  MarketSearchItem *v24; // [sp+8h] [bp-8h]@4
  int _Idx; // [sp+Ch] [bp-4h]@1

  v4 = (_Hole - 1) / 2;
  _Idx = (_Hole - 1) / 2;
  if ( _Top < _Hole )
  {
    while ( 1 )
    {
      v5 = _First[v4];
      v6 = *_Val;
      v24 = _First[v4];
      if ( v5->m_hItem == -1 )
      {
        if ( v6->m_hItem == -1 || v6->m_hItem != -1 )
          goto LABEL_48;
      }
      else if ( v6->m_hItem == -1 )
      {
        goto LABEL_47;
      }
      v7 = v5->m_pkItem.m_pObject->m_pkInfo;
      v8 = v6->m_pkItem.m_pObject->m_pkInfo;
      Item1 = v5->m_pkItem.m_pObject;
      Item2 = v6->m_pkItem.m_pObject;
      if ( v7 == (ItemInfo *)-34 || v8 == (ItemInfo *)-34 )
      {
        v9 = -1;
        goto LABEL_46;
      }
      v9 = -strcmp(v7->Name, v8->Name);
      if ( !v9 )
      {
        v10 = v8->DemandLv;
        v11 = v7->DemandLv;
        if ( v11 != v10 )
        {
          if ( v11 <= v10 )
          {
            if ( v11 < v10 )
              v9 = 1;
          }
          else
          {
            v9 = -1;
          }
        }
        if ( !v9 )
          break;
      }
LABEL_45:
      v4 = _Idx;
LABEL_46:
      if ( v9 <= 0 )
        goto LABEL_48;
LABEL_47:
      _First[_Hole] = _First[v4];
      _Hole = v4;
      _Idx = (v4 - 1) / 2;
      if ( _Top >= v4 )
        goto LABEL_48;
      v4 = (v4 - 1) / 2;
    }
    v12 = v24->m_nPrice;
    v13 = v6->m_nPrice;
    v14 = HIDWORD(v24->m_nPrice);
    v15 = HIDWORD(v6->m_nPrice);
    v9 = 0;
    if ( v12 == v13 )
    {
      v16 = v14 < v15;
      v17 = v14 == v15;
      if ( v14 == v15 )
      {
LABEL_32:
        if ( !v9 )
        {
          v9 = MarketSearchWin::MarketSort::CompMainGroup(Item1, Item2, 0);
          if ( !v9 )
          {
            v18 = Item1->m_pkInfo->ItemAuctionGroup;
            v19 = Item2->m_pkInfo->ItemAuctionGroup;
            v9 = 0;
            if ( v18 != v19 )
            {
              if ( v18 <= (unsigned int)v19 )
              {
                if ( v18 < (unsigned int)v19 )
                  v9 = 1;
              }
              else
              {
                v9 = -1;
              }
            }
            if ( !v9 )
            {
              v20 = v6->m_hItem;
              v21 = v24->m_hItem;
              if ( v21 != v20 )
              {
                if ( v21 <= v20 )
                {
                  if ( v21 < v20 )
                    v9 = 1;
                }
                else
                {
                  v9 = -1;
                }
              }
            }
          }
        }
        goto LABEL_45;
      }
    }
    else
    {
      v16 = v14 < v15;
      v17 = v14 == v15;
    }
    if ( v16 || (v16 || v17) && v12 <= v13 )
    {
      if ( v14 <= v15 && (v14 < v15 || v12 < v13) )
        v9 = 1;
    }
    else
    {
      v9 = -1;
    }
    goto LABEL_32;
  }
LABEL_48:
  _First[_Hole] = *_Val;
}

//----- (00548180) --------------------------------------------------------
void __cdecl std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByNameDesc>(MarketSearchItem **_First, int _Hole, int _Top, MarketSearchItem **_Val)
{
  int v4; // edx@1
  MarketSearchItem *v5; // ecx@4
  MarketSearchItem *v6; // ebx@4
  ItemInfo *v7; // esi@9
  ItemInfo *v8; // edi@9
  int v9; // eax@9
  int v10; // ecx@9
  bool v11; // cf@11
  unsigned __int8 v12; // dl@13
  int v13; // eax@15
  signed int v14; // ecx@17
  signed int v15; // edx@17
  unsigned int v16; // edx@26
  unsigned int v17; // ecx@26
  unsigned int v18; // edi@26
  unsigned int v19; // esi@26
  signed int v20; // eax@26
  bool v21; // cf@27
  bool v22; // zf@27
  AuctionGroup v23; // ecx@40
  AuctionGroup v24; // edx@40
  signed int v25; // eax@40
  unsigned int v26; // ecx@46
  unsigned int v27; // edx@46
  signed int v28; // eax@46
  Item *Item1; // [sp+0h] [bp-10h]@9
  Item *Item2; // [sp+4h] [bp-Ch]@9
  MarketSearchItem *v31; // [sp+8h] [bp-8h]@4
  int _Idx; // [sp+Ch] [bp-4h]@1

  v4 = (_Hole - 1) / 2;
  _Idx = (_Hole - 1) / 2;
  if ( _Top < _Hole )
  {
    while ( 1 )
    {
      v5 = _First[v4];
      v6 = *_Val;
      v31 = _First[v4];
      if ( v5->m_hItem == -1 )
      {
        if ( v6->m_hItem == -1 || v6->m_hItem != -1 )
          goto LABEL_55;
      }
      else if ( v6->m_hItem == -1 )
      {
        goto LABEL_54;
      }
      v7 = v5->m_pkItem.m_pObject->m_pkInfo;
      v8 = v6->m_pkItem.m_pObject->m_pkInfo;
      Item1 = v5->m_pkItem.m_pObject;
      v9 = (int)v7->Name;
      Item2 = v6->m_pkItem.m_pObject;
      v10 = (int)v8->Name;
      if ( v7 == (ItemInfo *)-34 || v8 == (ItemInfo *)-34 )
      {
        v13 = -1;
        goto LABEL_53;
      }
      while ( 1 )
      {
        v11 = *(_BYTE *)v9 < *(_BYTE *)v10;
        if ( *(_BYTE *)v9 != *(_BYTE *)v10 )
          break;
        if ( !*(_BYTE *)v9 )
          goto LABEL_15;
        v12 = *(_BYTE *)(v9 + 1);
        v11 = v12 < *(_BYTE *)(v10 + 1);
        if ( v12 != *(_BYTE *)(v10 + 1) )
          break;
        v9 += 2;
        v10 += 2;
        if ( !v12 )
        {
LABEL_15:
          v13 = 0;
          goto LABEL_16;
        }
      }
      v13 = -v11 - (v11 - 1);
LABEL_16:
      if ( !v13 )
      {
        v14 = v8->DemandLv;
        v15 = v7->DemandLv;
        if ( v15 != v14 )
        {
          if ( v15 <= v14 )
          {
            if ( v15 < v14 )
              v13 = 1;
          }
          else
          {
            v13 = -1;
          }
        }
        v13 = -v13;
        if ( !v13 )
          break;
      }
LABEL_52:
      v4 = _Idx;
LABEL_53:
      if ( v13 <= 0 )
        goto LABEL_55;
LABEL_54:
      _First[_Hole] = _First[v4];
      _Hole = v4;
      _Idx = (v4 - 1) / 2;
      if ( _Top >= v4 )
        goto LABEL_55;
      v4 = (v4 - 1) / 2;
    }
    v16 = v31->m_nPrice;
    v17 = v6->m_nPrice;
    v18 = HIDWORD(v31->m_nPrice);
    v19 = HIDWORD(v6->m_nPrice);
    v20 = 0;
    if ( v16 == v17 )
    {
      v21 = v18 < v19;
      v22 = v18 == v19;
      if ( v18 == v19 )
      {
LABEL_38:
        v13 = -v20;
        if ( !v13 )
        {
          v13 = MarketSearchWin::MarketSort::CompMainGroup(Item1, Item2, 1);
          if ( !v13 )
          {
            v23 = Item1->m_pkInfo->ItemAuctionGroup;
            v24 = Item2->m_pkInfo->ItemAuctionGroup;
            v25 = 0;
            if ( v23 != v24 )
            {
              if ( v23 <= (unsigned int)v24 )
              {
                if ( v23 < (unsigned int)v24 )
                  v25 = 1;
              }
              else
              {
                v25 = -1;
              }
            }
            v13 = -v25;
            if ( !v13 )
            {
              v26 = v6->m_hItem;
              v27 = v31->m_hItem;
              v28 = 0;
              if ( v27 != v26 )
              {
                if ( v27 <= v26 )
                {
                  if ( v27 < v26 )
                    v28 = 1;
                }
                else
                {
                  v28 = -1;
                }
              }
              v13 = -v28;
            }
          }
        }
        goto LABEL_52;
      }
    }
    else
    {
      v21 = v18 < v19;
      v22 = v18 == v19;
    }
    if ( v21 || (v21 || v22) && v16 <= v17 )
    {
      if ( v18 <= v19 && (v18 < v19 || v16 < v17) )
        v20 = 1;
    }
    else
    {
      v20 = -1;
    }
    goto LABEL_38;
  }
LABEL_55:
  _First[_Hole] = *_Val;
}

//----- (00548340) --------------------------------------------------------
void __cdecl std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByLevel>(MarketSearchItem **_First, int _Hole, int _Top, MarketSearchItem **_Val)
{
  int v4; // ecx@1
  MarketSearchItem **v5; // esi@4
  MarketSearchItem *v6; // edx@4
  MarketSearchItem *v7; // ebx@4
  Item *v8; // eax@9
  ItemInfo *v9; // edi@9
  ItemInfo *v10; // esi@9
  signed int v11; // edx@9
  signed int v12; // ecx@9
  signed int v13; // eax@9
  bool v14; // zf@14
  bool v15; // sf@14
  int v16; // eax@17
  unsigned int v17; // edx@18
  unsigned int v18; // ecx@18
  unsigned int v19; // edi@18
  unsigned int v20; // esi@18
  signed int v21; // eax@18
  bool v22; // cf@19
  bool v23; // zf@19
  int v24; // eax@31
  AuctionGroup v25; // ecx@32
  AuctionGroup v26; // edx@32
  unsigned int v27; // edx@38
  unsigned int v28; // ecx@38
  signed int v29; // eax@38
  Item *Item1; // [sp+4h] [bp-10h]@9
  Item *Item2; // [sp+8h] [bp-Ch]@9
  MarketSearchItem *v32; // [sp+Ch] [bp-8h]@4
  int _Idx; // [sp+10h] [bp-4h]@1

  v4 = (_Hole - 1) / 2;
  _Idx = (_Hole - 1) / 2;
  if ( _Top < _Hole )
  {
    while ( 1 )
    {
      v5 = _First;
      v6 = _First[v4];
      v7 = *_Val;
      v32 = _First[v4];
      if ( v6->m_hItem == -1 )
      {
        if ( v7->m_hItem == -1 || v7->m_hItem != -1 )
        {
LABEL_47:
          v5[_Hole] = *_Val;
          return;
        }
      }
      else if ( v7->m_hItem == -1 )
      {
        goto LABEL_46;
      }
      v8 = v6->m_pkItem.m_pObject;
      v9 = v8->m_pkInfo;
      v10 = v7->m_pkItem.m_pObject->m_pkInfo;
      v11 = v9->DemandLv;
      Item2 = v7->m_pkItem.m_pObject;
      v12 = v10->DemandLv;
      Item1 = v8;
      v13 = 0;
      if ( v11 != v12 )
      {
        if ( v11 <= v12 )
        {
          if ( v11 < v12 )
            v13 = 1;
        }
        else
        {
          v13 = -1;
        }
      }
      v14 = v13 == 0;
      v15 = v13 < 0;
      if ( !v13 )
      {
        if ( v9 == (ItemInfo *)-34 || v10 == (ItemInfo *)-34 )
          goto LABEL_40;
        v16 = -strcmp(v9->Name, v10->Name);
        v14 = v16 == 0;
        v15 = v16 < 0;
        if ( !v16 )
          break;
      }
LABEL_44:
      v5 = _First;
      if ( v15 || v14 )
        goto LABEL_47;
      v4 = _Idx;
LABEL_46:
      v5[_Hole] = v5[v4];
      _Hole = v4;
      _Idx = (v4 - 1) / 2;
      if ( _Top >= v4 )
        goto LABEL_47;
      v4 = (v4 - 1) / 2;
    }
    v17 = v32->m_nPrice;
    v18 = v7->m_nPrice;
    v19 = HIDWORD(v32->m_nPrice);
    v20 = HIDWORD(v7->m_nPrice);
    v21 = 0;
    if ( v17 == v18 )
    {
      v22 = v19 < v20;
      v23 = v19 == v20;
      if ( v19 == v20 )
        goto LABEL_30;
    }
    else
    {
      v22 = v19 < v20;
      v23 = v19 == v20;
    }
    if ( v22 || (v22 || v23) && v17 <= v18 )
    {
      if ( v19 <= v20 && (v19 < v20 || v17 < v18) )
        v21 = 1;
    }
    else
    {
      v21 = -1;
    }
LABEL_30:
    v14 = v21 == 0;
    v15 = v21 < 0;
    if ( v21 )
      goto LABEL_44;
    v24 = MarketSearchWin::MarketSort::CompMainGroup(Item1, Item2, 0);
    v14 = v24 == 0;
    v15 = v24 < 0;
    if ( v24 )
      goto LABEL_44;
    v25 = Item1->m_pkInfo->ItemAuctionGroup;
    v26 = Item2->m_pkInfo->ItemAuctionGroup;
    if ( v25 != v26 )
    {
      if ( v25 <= (unsigned int)v26 )
      {
        if ( v25 < (unsigned int)v26 )
          v24 = 1;
      }
      else
      {
        v24 = -1;
      }
    }
    v14 = v24 == 0;
    v15 = v24 < 0;
    if ( v24 )
      goto LABEL_44;
    v27 = v32->m_hItem;
    v28 = v7->m_hItem;
    v29 = 0;
    if ( v27 != v28 )
    {
      if ( v27 <= v28 )
      {
        if ( v27 < v28 )
          v29 = 1;
      }
      else
      {
LABEL_40:
        v29 = -1;
      }
    }
    v14 = v29 == 0;
    v15 = v29 < 0;
    goto LABEL_44;
  }
  _First[_Hole] = *_Val;
}

//----- (00548510) --------------------------------------------------------
void __cdecl std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByLevelDesc>(MarketSearchItem **_First, int _Hole, int _Top, MarketSearchItem **_Val)
{
  int v4; // ecx@1
  MarketSearchItem **v5; // esi@4
  MarketSearchItem *v6; // edx@4
  MarketSearchItem *v7; // ebx@4
  Item *v8; // eax@9
  ItemInfo *v9; // edi@9
  ItemInfo *v10; // esi@9
  signed int v11; // edx@9
  signed int v12; // ecx@9
  signed int v13; // eax@9
  int v14; // eax@14
  int v15; // eax@15
  int v16; // ecx@15
  bool v17; // cf@17
  unsigned __int8 v18; // dl@19
  int v19; // eax@21
  bool v20; // zf@22
  bool v21; // sf@22
  unsigned int v22; // edx@23
  unsigned int v23; // ecx@23
  unsigned int v24; // edi@23
  unsigned int v25; // esi@23
  signed int v26; // eax@23
  bool v27; // cf@24
  bool v28; // zf@24
  int v29; // eax@38
  AuctionGroup v30; // ecx@39
  AuctionGroup v31; // edx@39
  unsigned int v32; // edx@45
  unsigned int v33; // ecx@45
  signed int v34; // eax@45
  Item *Item1; // [sp+4h] [bp-10h]@9
  Item *Item2; // [sp+8h] [bp-Ch]@9
  MarketSearchItem *v37; // [sp+Ch] [bp-8h]@4
  int _Idx; // [sp+10h] [bp-4h]@1

  v4 = (_Hole - 1) / 2;
  _Idx = (_Hole - 1) / 2;
  if ( _Top < _Hole )
  {
    while ( 1 )
    {
      v5 = _First;
      v6 = _First[v4];
      v7 = *_Val;
      v37 = _First[v4];
      if ( v6->m_hItem == -1 )
      {
        if ( v7->m_hItem == -1 || v7->m_hItem != -1 )
        {
LABEL_55:
          v5[_Hole] = *_Val;
          return;
        }
      }
      else if ( v7->m_hItem == -1 )
      {
        goto LABEL_54;
      }
      v8 = v6->m_pkItem.m_pObject;
      v9 = v8->m_pkInfo;
      v10 = v7->m_pkItem.m_pObject->m_pkInfo;
      v11 = v9->DemandLv;
      Item2 = v7->m_pkItem.m_pObject;
      v12 = v10->DemandLv;
      Item1 = v8;
      v13 = 0;
      if ( v11 != v12 )
      {
        if ( v11 <= v12 )
        {
          if ( v11 < v12 )
            v13 = 1;
        }
        else
        {
          v13 = -1;
        }
      }
      v14 = -v13;
      if ( v14 )
        goto LABEL_51;
      v15 = (int)v9->Name;
      v16 = (int)v10->Name;
      if ( v9 == (ItemInfo *)-34 || v10 == (ItemInfo *)-34 )
      {
        v14 = -1;
LABEL_51:
        v20 = v14 == 0;
        v21 = v14 < 0;
        goto LABEL_52;
      }
      while ( 1 )
      {
        v17 = *(_BYTE *)v15 < *(_BYTE *)v16;
        if ( *(_BYTE *)v15 != *(_BYTE *)v16 )
          break;
        if ( !*(_BYTE *)v15 )
          goto LABEL_21;
        v18 = *(_BYTE *)(v15 + 1);
        v17 = v18 < *(_BYTE *)(v16 + 1);
        if ( v18 != *(_BYTE *)(v16 + 1) )
          break;
        v15 += 2;
        v16 += 2;
        if ( !v18 )
        {
LABEL_21:
          v19 = 0;
          goto LABEL_22;
        }
      }
      v19 = -v17 - (v17 - 1);
LABEL_22:
      v20 = v19 == 0;
      v21 = v19 < 0;
      if ( v19 )
        goto LABEL_52;
      v22 = v37->m_nPrice;
      v23 = v7->m_nPrice;
      v24 = HIDWORD(v37->m_nPrice);
      v25 = HIDWORD(v7->m_nPrice);
      v26 = 0;
      if ( v22 == v23 )
      {
        v27 = v24 < v25;
        v28 = v24 == v25;
        if ( v24 == v25 )
          goto LABEL_37;
      }
      else
      {
        v27 = v24 < v25;
        v28 = v24 == v25;
      }
      if ( v27 || (v27 || v28) && v22 <= v23 )
      {
        if ( v24 <= v25 && (v24 < v25 || v22 < v23) )
          v26 = 1;
      }
      else
      {
        v26 = -1;
      }
LABEL_37:
      v14 = -v26;
      if ( v14 )
        goto LABEL_51;
      v29 = MarketSearchWin::MarketSort::CompMainGroup(Item1, Item2, 1);
      v20 = v29 == 0;
      v21 = v29 < 0;
      if ( !v29 )
      {
        v30 = Item1->m_pkInfo->ItemAuctionGroup;
        v31 = Item2->m_pkInfo->ItemAuctionGroup;
        if ( v30 != v31 )
        {
          if ( v30 <= (unsigned int)v31 )
          {
            if ( v30 < (unsigned int)v31 )
              v29 = 1;
          }
          else
          {
            v29 = -1;
          }
        }
        v14 = -v29;
        if ( !v14 )
        {
          v32 = v37->m_hItem;
          v33 = v7->m_hItem;
          v34 = 0;
          if ( v32 != v33 )
          {
            if ( v32 <= v33 )
            {
              if ( v32 < v33 )
                v34 = 1;
            }
            else
            {
              v34 = -1;
            }
          }
          v14 = -v34;
        }
        goto LABEL_51;
      }
LABEL_52:
      v5 = _First;
      if ( v21 || v20 )
        goto LABEL_55;
      v4 = _Idx;
LABEL_54:
      v5[_Hole] = v5[v4];
      _Hole = v4;
      _Idx = (v4 - 1) / 2;
      if ( _Top >= v4 )
        goto LABEL_55;
      v4 = (v4 - 1) / 2;
    }
  }
  _First[_Hole] = *_Val;
}

//----- (005486E0) --------------------------------------------------------
void __cdecl std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByMoney>(MarketSearchItem **_First, int _Hole, int _Top, MarketSearchItem **_Val)
{
  int v4; // ecx@1
  MarketSearchItem **v5; // esi@4
  MarketSearchItem *v6; // edi@4
  MarketSearchItem *v7; // ebx@4
  unsigned int v8; // esi@9
  unsigned int v9; // ecx@9
  unsigned int v10; // edx@9
  unsigned int v11; // edi@9
  signed int v12; // eax@9
  bool v13; // cf@10
  bool v14; // zf@10
  bool v15; // zf@21
  bool v16; // sf@21
  int v17; // eax@24
  signed int v18; // ecx@25
  signed int v19; // edx@25
  signed int v20; // eax@25
  int v21; // eax@31
  AuctionGroup v22; // ecx@32
  AuctionGroup v23; // edx@32
  signed int v24; // eax@32
  unsigned int v25; // edx@38
  unsigned int v26; // ecx@38
  signed int v27; // eax@38
  MarketSearchItem *v28; // [sp+4h] [bp-10h]@4
  int _Idx; // [sp+8h] [bp-Ch]@1
  Item *Item1; // [sp+Ch] [bp-8h]@9
  Item *Item2; // [sp+10h] [bp-4h]@9

  v4 = (_Hole - 1) / 2;
  _Idx = (_Hole - 1) / 2;
  if ( _Top < _Hole )
  {
    while ( 1 )
    {
      v5 = _First;
      v6 = _First[v4];
      v7 = *_Val;
      v28 = _First[v4];
      if ( v6->m_hItem == -1 )
      {
        if ( v7->m_hItem == -1 || v7->m_hItem != -1 )
        {
LABEL_47:
          v5[_Hole] = *_Val;
          return;
        }
      }
      else if ( v7->m_hItem == -1 )
      {
        goto LABEL_46;
      }
      v8 = HIDWORD(v7->m_nPrice);
      Item1 = v6->m_pkItem.m_pObject;
      v9 = v7->m_nPrice;
      Item2 = v7->m_pkItem.m_pObject;
      v10 = v6->m_nPrice;
      v11 = HIDWORD(v6->m_nPrice);
      v12 = 0;
      if ( v10 == v9 )
      {
        v13 = v11 < v8;
        v14 = v11 == v8;
        if ( v11 == v8 )
          goto LABEL_21;
      }
      else
      {
        v13 = v11 < v8;
        v14 = v11 == v8;
      }
      if ( v13 || (v13 || v14) && v10 <= v9 )
      {
        if ( v11 <= v8 && (v11 < v8 || v10 < v9) )
          v12 = 1;
      }
      else
      {
        v12 = -1;
      }
LABEL_21:
      v15 = v12 == 0;
      v16 = v12 < 0;
      if ( !v12 )
      {
        if ( Item1->m_pkInfo == (ItemInfo *)-34 || Item2->m_pkInfo == (ItemInfo *)-34 )
        {
LABEL_40:
          v27 = -1;
        }
        else
        {
          v17 = -strcmp(Item1->m_pkInfo->Name, Item2->m_pkInfo->Name);
          v15 = v17 == 0;
          v16 = v17 < 0;
          if ( v17 )
            goto LABEL_44;
          v18 = Item2->m_pkInfo->DemandLv;
          v19 = Item1->m_pkInfo->DemandLv;
          v20 = 0;
          if ( v19 != v18 )
          {
            if ( v19 <= v18 )
            {
              if ( v19 < v18 )
                v20 = 1;
            }
            else
            {
              v20 = -1;
            }
          }
          v15 = v20 == 0;
          v16 = v20 < 0;
          if ( v20 )
            goto LABEL_44;
          v21 = MarketSearchWin::MarketSort::CompMainGroup(Item1, Item2, 0);
          v15 = v21 == 0;
          v16 = v21 < 0;
          if ( v21 )
            goto LABEL_44;
          v22 = Item1->m_pkInfo->ItemAuctionGroup;
          v23 = Item2->m_pkInfo->ItemAuctionGroup;
          v24 = 0;
          if ( v22 != v23 )
          {
            if ( v22 <= (unsigned int)v23 )
            {
              if ( v22 < (unsigned int)v23 )
                v24 = 1;
            }
            else
            {
              v24 = -1;
            }
          }
          v15 = v24 == 0;
          v16 = v24 < 0;
          if ( v24 )
            goto LABEL_44;
          v25 = v28->m_hItem;
          v26 = v7->m_hItem;
          v27 = 0;
          if ( v25 != v26 )
          {
            if ( v25 > v26 )
              goto LABEL_40;
            if ( v25 < v26 )
              v27 = 1;
          }
        }
        v15 = v27 == 0;
        v16 = v27 < 0;
      }
LABEL_44:
      v5 = _First;
      if ( v16 || v15 )
        goto LABEL_47;
      v4 = _Idx;
LABEL_46:
      v5[_Hole] = v5[v4];
      _Hole = v4;
      _Idx = (v4 - 1) / 2;
      if ( _Top >= v4 )
        goto LABEL_47;
      v4 = (v4 - 1) / 2;
    }
  }
  _First[_Hole] = *_Val;
}

//----- (005488C0) --------------------------------------------------------
void __cdecl std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByMoneyDesc>(MarketSearchItem **_First, int _Hole, int _Top, MarketSearchItem **_Val)
{
  int v4; // ecx@1
  MarketSearchItem **v5; // esi@4
  MarketSearchItem *v6; // edi@4
  MarketSearchItem *v7; // ebx@4
  unsigned int v8; // esi@9
  unsigned int v9; // ecx@9
  unsigned int v10; // edx@9
  unsigned int v11; // edi@9
  signed int v12; // eax@9
  bool v13; // cf@10
  bool v14; // zf@10
  int v15; // eax@21
  int v16; // ecx@22
  int v17; // eax@22
  bool v18; // cf@24
  unsigned __int8 v19; // dl@26
  int v20; // eax@28
  bool v21; // zf@29
  bool v22; // sf@29
  signed int v23; // ecx@30
  signed int v24; // edx@30
  signed int v25; // eax@30
  int v26; // eax@39
  AuctionGroup v27; // ecx@40
  AuctionGroup v28; // edx@40
  signed int v29; // eax@40
  unsigned int v30; // edx@46
  unsigned int v31; // ecx@46
  signed int v32; // eax@46
  MarketSearchItem *v33; // [sp+4h] [bp-10h]@4
  int _Idx; // [sp+8h] [bp-Ch]@1
  Item *Item1; // [sp+Ch] [bp-8h]@9
  Item *Item2; // [sp+10h] [bp-4h]@9

  v4 = (_Hole - 1) / 2;
  _Idx = (_Hole - 1) / 2;
  if ( _Top < _Hole )
  {
    while ( 1 )
    {
      v5 = _First;
      v6 = _First[v4];
      v7 = *_Val;
      v33 = _First[v4];
      if ( v6->m_hItem == -1 )
      {
        if ( v7->m_hItem == -1 || v7->m_hItem != -1 )
        {
LABEL_56:
          v5[_Hole] = *_Val;
          return;
        }
      }
      else if ( v7->m_hItem == -1 )
      {
        goto LABEL_55;
      }
      v8 = HIDWORD(v7->m_nPrice);
      Item1 = v6->m_pkItem.m_pObject;
      v9 = v7->m_nPrice;
      Item2 = v7->m_pkItem.m_pObject;
      v10 = v6->m_nPrice;
      v11 = HIDWORD(v6->m_nPrice);
      v12 = 0;
      if ( v10 == v9 )
      {
        v13 = v11 < v8;
        v14 = v11 == v8;
        if ( v11 == v8 )
          goto LABEL_21;
      }
      else
      {
        v13 = v11 < v8;
        v14 = v11 == v8;
      }
      if ( v13 || (v13 || v14) && v10 <= v9 )
      {
        if ( v11 <= v8 && (v11 < v8 || v10 < v9) )
          v12 = 1;
      }
      else
      {
        v12 = -1;
      }
LABEL_21:
      v15 = -v12;
      if ( v15 )
        goto LABEL_52;
      v16 = (int)Item2->m_pkInfo->Name;
      v17 = (int)Item1->m_pkInfo->Name;
      if ( Item1->m_pkInfo == (ItemInfo *)-34 || Item2->m_pkInfo == (ItemInfo *)-34 )
      {
        v15 = -1;
LABEL_52:
        v21 = v15 == 0;
        v22 = v15 < 0;
        goto LABEL_53;
      }
      while ( 1 )
      {
        v18 = *(_BYTE *)v17 < *(_BYTE *)v16;
        if ( *(_BYTE *)v17 != *(_BYTE *)v16 )
          break;
        if ( !*(_BYTE *)v17 )
          goto LABEL_28;
        v19 = *(_BYTE *)(v17 + 1);
        v18 = v19 < *(_BYTE *)(v16 + 1);
        if ( v19 != *(_BYTE *)(v16 + 1) )
          break;
        v17 += 2;
        v16 += 2;
        if ( !v19 )
        {
LABEL_28:
          v20 = 0;
          goto LABEL_29;
        }
      }
      v20 = -v18 - (v18 - 1);
LABEL_29:
      v21 = v20 == 0;
      v22 = v20 < 0;
      if ( v20 )
        goto LABEL_53;
      v23 = Item2->m_pkInfo->DemandLv;
      v24 = Item1->m_pkInfo->DemandLv;
      v25 = 0;
      if ( v24 != v23 )
      {
        if ( v24 <= v23 )
        {
          if ( v24 < v23 )
            v25 = 1;
        }
        else
        {
          v25 = -1;
        }
      }
      v15 = -v25;
      if ( v15 )
        goto LABEL_52;
      v26 = MarketSearchWin::MarketSort::CompMainGroup(Item1, Item2, 1);
      v21 = v26 == 0;
      v22 = v26 < 0;
      if ( !v26 )
      {
        v27 = Item1->m_pkInfo->ItemAuctionGroup;
        v28 = Item2->m_pkInfo->ItemAuctionGroup;
        v29 = 0;
        if ( v27 != v28 )
        {
          if ( v27 <= (unsigned int)v28 )
          {
            if ( v27 < (unsigned int)v28 )
              v29 = 1;
          }
          else
          {
            v29 = -1;
          }
        }
        v15 = -v29;
        if ( !v15 )
        {
          v30 = v33->m_hItem;
          v31 = v7->m_hItem;
          v32 = 0;
          if ( v30 != v31 )
          {
            if ( v30 <= v31 )
            {
              if ( v30 < v31 )
                v32 = 1;
            }
            else
            {
              v32 = -1;
            }
          }
          v15 = -v32;
        }
        goto LABEL_52;
      }
LABEL_53:
      v5 = _First;
      if ( v22 || v21 )
        goto LABEL_56;
      v4 = _Idx;
LABEL_55:
      v5[_Hole] = v5[v4];
      _Hole = v4;
      _Idx = (v4 - 1) / 2;
      if ( _Top >= v4 )
        goto LABEL_56;
      v4 = (v4 - 1) / 2;
    }
  }
  _First[_Hole] = *_Val;
}

//----- (00548AA0) --------------------------------------------------------
void __cdecl std::_Median<MarketSearchItem * *,MarketSearchWin::SortByDefault>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last)
{
  MarketSearchItem **v3; // esi@1
  signed int v4; // eax@1
  int v5; // eax@2
  unsigned int v6; // edi@2
  MarketSearchItem **v7; // ST4C_4@2
  MarketSearchItem **_Lasta; // [sp+18h] [bp+10h]@2

  v3 = _Last;
  v4 = _Last - _First;
  if ( v4 <= 40 )
  {
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByDefault>(_First, _Mid, _Last);
  }
  else
  {
    v5 = (v4 + 1) / 8;
    _Lasta = (MarketSearchItem **)(8 * v5);
    v6 = 4 * v5;
    v7 = &_First[v5];
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByDefault>(_First, v7, &_First[2 * v5]);
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByDefault>(&_Mid[-v6 / 4], _Mid, &_Mid[v6 / 4]);
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByDefault>(
      (MarketSearchItem **)((char *)v3 - (char *)_Lasta),
      &v3[-v6 / 4],
      v3);
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByDefault>(v7, _Mid, &v3[-v6 / 4]);
  }
}

//----- (00548B50) --------------------------------------------------------
void __cdecl std::_Median<MarketSearchItem * *,MarketSearchWin::SortByName>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last)
{
  MarketSearchItem **v3; // esi@1
  signed int v4; // eax@1
  int v5; // eax@2
  unsigned int v6; // edi@2
  MarketSearchItem **v7; // ST4C_4@2
  MarketSearchItem **_Lasta; // [sp+18h] [bp+10h]@2

  v3 = _Last;
  v4 = _Last - _First;
  if ( v4 <= 40 )
  {
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByName>(_First, _Mid, _Last);
  }
  else
  {
    v5 = (v4 + 1) / 8;
    _Lasta = (MarketSearchItem **)(8 * v5);
    v6 = 4 * v5;
    v7 = &_First[v5];
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByName>(_First, v7, &_First[2 * v5]);
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByName>(&_Mid[-v6 / 4], _Mid, &_Mid[v6 / 4]);
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByName>(
      (MarketSearchItem **)((char *)v3 - (char *)_Lasta),
      &v3[-v6 / 4],
      v3);
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByName>(v7, _Mid, &v3[-v6 / 4]);
  }
}

//----- (00548C00) --------------------------------------------------------
void __cdecl std::_Median<MarketSearchItem * *,MarketSearchWin::SortByNameDesc>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last)
{
  MarketSearchItem **v3; // esi@1
  signed int v4; // eax@1
  int v5; // eax@2
  unsigned int v6; // edi@2
  MarketSearchItem **v7; // ST4C_4@2
  MarketSearchItem **_Lasta; // [sp+18h] [bp+10h]@2

  v3 = _Last;
  v4 = _Last - _First;
  if ( v4 <= 40 )
  {
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByNameDesc>(_First, _Mid, _Last);
  }
  else
  {
    v5 = (v4 + 1) / 8;
    _Lasta = (MarketSearchItem **)(8 * v5);
    v6 = 4 * v5;
    v7 = &_First[v5];
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByNameDesc>(_First, v7, &_First[2 * v5]);
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByNameDesc>(&_Mid[-v6 / 4], _Mid, &_Mid[v6 / 4]);
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByNameDesc>(
      (MarketSearchItem **)((char *)v3 - (char *)_Lasta),
      &v3[-v6 / 4],
      v3);
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByNameDesc>(v7, _Mid, &v3[-v6 / 4]);
  }
}

//----- (00548CB0) --------------------------------------------------------
void __cdecl std::_Median<MarketSearchItem * *,MarketSearchWin::SortByLevel>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last)
{
  MarketSearchItem **v3; // esi@1
  signed int v4; // eax@1
  int v5; // eax@2
  unsigned int v6; // edi@2
  MarketSearchItem **v7; // ST4C_4@2
  MarketSearchItem **_Lasta; // [sp+18h] [bp+10h]@2

  v3 = _Last;
  v4 = _Last - _First;
  if ( v4 <= 40 )
  {
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByLevel>(_First, _Mid, _Last);
  }
  else
  {
    v5 = (v4 + 1) / 8;
    _Lasta = (MarketSearchItem **)(8 * v5);
    v6 = 4 * v5;
    v7 = &_First[v5];
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByLevel>(_First, v7, &_First[2 * v5]);
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByLevel>(&_Mid[-v6 / 4], _Mid, &_Mid[v6 / 4]);
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByLevel>(
      (MarketSearchItem **)((char *)v3 - (char *)_Lasta),
      &v3[-v6 / 4],
      v3);
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByLevel>(v7, _Mid, &v3[-v6 / 4]);
  }
}

//----- (00548D60) --------------------------------------------------------
void __cdecl std::_Median<MarketSearchItem * *,MarketSearchWin::SortByLevelDesc>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last)
{
  MarketSearchItem **v3; // esi@1
  signed int v4; // eax@1
  int v5; // eax@2
  unsigned int v6; // edi@2
  MarketSearchItem **v7; // ST4C_4@2
  MarketSearchItem **_Lasta; // [sp+18h] [bp+10h]@2

  v3 = _Last;
  v4 = _Last - _First;
  if ( v4 <= 40 )
  {
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByLevelDesc>(_First, _Mid, _Last);
  }
  else
  {
    v5 = (v4 + 1) / 8;
    _Lasta = (MarketSearchItem **)(8 * v5);
    v6 = 4 * v5;
    v7 = &_First[v5];
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByLevelDesc>(_First, v7, &_First[2 * v5]);
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByLevelDesc>(&_Mid[-v6 / 4], _Mid, &_Mid[v6 / 4]);
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByLevelDesc>(
      (MarketSearchItem **)((char *)v3 - (char *)_Lasta),
      &v3[-v6 / 4],
      v3);
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByLevelDesc>(v7, _Mid, &v3[-v6 / 4]);
  }
}

//----- (00548E10) --------------------------------------------------------
void __cdecl std::_Median<MarketSearchItem * *,MarketSearchWin::SortByMoney>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last)
{
  MarketSearchItem **v3; // esi@1
  signed int v4; // eax@1
  int v5; // eax@2
  unsigned int v6; // edi@2
  MarketSearchItem **v7; // ST4C_4@2
  MarketSearchItem **_Lasta; // [sp+18h] [bp+10h]@2

  v3 = _Last;
  v4 = _Last - _First;
  if ( v4 <= 40 )
  {
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByMoney>(_First, _Mid, _Last);
  }
  else
  {
    v5 = (v4 + 1) / 8;
    _Lasta = (MarketSearchItem **)(8 * v5);
    v6 = 4 * v5;
    v7 = &_First[v5];
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByMoney>(_First, v7, &_First[2 * v5]);
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByMoney>(&_Mid[-v6 / 4], _Mid, &_Mid[v6 / 4]);
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByMoney>(
      (MarketSearchItem **)((char *)v3 - (char *)_Lasta),
      &v3[-v6 / 4],
      v3);
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByMoney>(v7, _Mid, &v3[-v6 / 4]);
  }
}

//----- (00548EC0) --------------------------------------------------------
void __cdecl std::_Median<MarketSearchItem * *,MarketSearchWin::SortByMoneyDesc>(MarketSearchItem **_First, MarketSearchItem **_Mid, MarketSearchItem **_Last)
{
  MarketSearchItem **v3; // esi@1
  signed int v4; // eax@1
  int v5; // eax@2
  unsigned int v6; // edi@2
  MarketSearchItem **v7; // ST4C_4@2
  MarketSearchItem **_Lasta; // [sp+18h] [bp+10h]@2

  v3 = _Last;
  v4 = _Last - _First;
  if ( v4 <= 40 )
  {
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByMoneyDesc>(_First, _Mid, _Last);
  }
  else
  {
    v5 = (v4 + 1) / 8;
    _Lasta = (MarketSearchItem **)(8 * v5);
    v6 = 4 * v5;
    v7 = &_First[v5];
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByMoneyDesc>(_First, v7, &_First[2 * v5]);
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByMoneyDesc>(&_Mid[-v6 / 4], _Mid, &_Mid[v6 / 4]);
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByMoneyDesc>(
      (MarketSearchItem **)((char *)v3 - (char *)_Lasta),
      &v3[-v6 / 4],
      v3);
    std::_Med3<MarketSearchItem * *,MarketSearchWin::SortByMoneyDesc>(v7, _Mid, &v3[-v6 / 4]);
  }
}

//----- (00548F70) --------------------------------------------------------
void __cdecl std::_Adjust_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByDefault>(MarketSearchItem **_First, int _Hole, int _Bottom, MarketSearchItem **_Val)
{
  int v4; // eax@1
  int v5; // edi@1
  int v6; // esi@1
  bool v7; // zf@1

  v4 = _Bottom;
  v5 = _Hole;
  v6 = 2 * _Hole + 2;
  v7 = v6 == _Bottom;
  if ( v6 < _Bottom )
  {
    do
    {
      if ( MarketSearchWin::SortByDefault::operator()(_First[v6], _First[v6 - 1]) )
        --v6;
      _First[v5] = _First[v6];
      v5 = v6;
      v6 = 2 * v6 + 2;
    }
    while ( v6 < _Bottom );
    v4 = _Bottom;
    v7 = v6 == _Bottom;
  }
  if ( v7 )
  {
    _First[v5] = _First[v4 - 1];
    v5 = v4 - 1;
  }
  std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByDefault>(_First, v5, _Hole, _Val);
}

//----- (00548FF0) --------------------------------------------------------
void __cdecl std::_Adjust_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByName>(MarketSearchItem **_First, int _Hole, int _Bottom, MarketSearchItem **_Val)
{
  int v4; // eax@1
  int v5; // edi@1
  int v6; // esi@1
  bool v7; // zf@1

  v4 = _Bottom;
  v5 = _Hole;
  v6 = 2 * _Hole + 2;
  v7 = v6 == _Bottom;
  if ( v6 < _Bottom )
  {
    do
    {
      if ( MarketSearchWin::SortByName::operator()(_First[v6], _First[v6 - 1]) )
        --v6;
      _First[v5] = _First[v6];
      v5 = v6;
      v6 = 2 * v6 + 2;
    }
    while ( v6 < _Bottom );
    v4 = _Bottom;
    v7 = v6 == _Bottom;
  }
  if ( v7 )
  {
    _First[v5] = _First[v4 - 1];
    v5 = v4 - 1;
  }
  std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByName>(_First, v5, _Hole, _Val);
}

//----- (00549070) --------------------------------------------------------
void __cdecl std::_Adjust_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByNameDesc>(MarketSearchItem **_First, int _Hole, int _Bottom, MarketSearchItem **_Val)
{
  int v4; // eax@1
  int v5; // edi@1
  int v6; // esi@1
  bool v7; // zf@1

  v4 = _Bottom;
  v5 = _Hole;
  v6 = 2 * _Hole + 2;
  v7 = v6 == _Bottom;
  if ( v6 < _Bottom )
  {
    do
    {
      if ( MarketSearchWin::SortByNameDesc::operator()(_First[v6], _First[v6 - 1]) )
        --v6;
      _First[v5] = _First[v6];
      v5 = v6;
      v6 = 2 * v6 + 2;
    }
    while ( v6 < _Bottom );
    v4 = _Bottom;
    v7 = v6 == _Bottom;
  }
  if ( v7 )
  {
    _First[v5] = _First[v4 - 1];
    v5 = v4 - 1;
  }
  std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByNameDesc>(_First, v5, _Hole, _Val);
}

//----- (005490F0) --------------------------------------------------------
void __cdecl std::_Adjust_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByLevel>(MarketSearchItem **_First, int _Hole, int _Bottom, MarketSearchItem **_Val)
{
  int v4; // eax@1
  int v5; // edi@1
  int v6; // esi@1
  bool v7; // zf@1

  v4 = _Bottom;
  v5 = _Hole;
  v6 = 2 * _Hole + 2;
  v7 = v6 == _Bottom;
  if ( v6 < _Bottom )
  {
    do
    {
      if ( MarketSearchWin::SortByLevel::operator()(_First[v6], _First[v6 - 1]) )
        --v6;
      _First[v5] = _First[v6];
      v5 = v6;
      v6 = 2 * v6 + 2;
    }
    while ( v6 < _Bottom );
    v4 = _Bottom;
    v7 = v6 == _Bottom;
  }
  if ( v7 )
  {
    _First[v5] = _First[v4 - 1];
    v5 = v4 - 1;
  }
  std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByLevel>(_First, v5, _Hole, _Val);
}

//----- (00549170) --------------------------------------------------------
void __cdecl std::_Adjust_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByLevelDesc>(MarketSearchItem **_First, int _Hole, int _Bottom, MarketSearchItem **_Val)
{
  int v4; // eax@1
  int v5; // edi@1
  int v6; // esi@1
  bool v7; // zf@1

  v4 = _Bottom;
  v5 = _Hole;
  v6 = 2 * _Hole + 2;
  v7 = v6 == _Bottom;
  if ( v6 < _Bottom )
  {
    do
    {
      if ( MarketSearchWin::SortByLevelDesc::operator()(_First[v6], _First[v6 - 1]) )
        --v6;
      _First[v5] = _First[v6];
      v5 = v6;
      v6 = 2 * v6 + 2;
    }
    while ( v6 < _Bottom );
    v4 = _Bottom;
    v7 = v6 == _Bottom;
  }
  if ( v7 )
  {
    _First[v5] = _First[v4 - 1];
    v5 = v4 - 1;
  }
  std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByLevelDesc>(_First, v5, _Hole, _Val);
}

//----- (005491F0) --------------------------------------------------------
void __cdecl std::_Adjust_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByMoney>(MarketSearchItem **_First, int _Hole, int _Bottom, MarketSearchItem **_Val)
{
  int v4; // eax@1
  int v5; // edi@1
  int v6; // esi@1
  bool v7; // zf@1

  v4 = _Bottom;
  v5 = _Hole;
  v6 = 2 * _Hole + 2;
  v7 = v6 == _Bottom;
  if ( v6 < _Bottom )
  {
    do
    {
      if ( MarketSearchWin::SortByMoney::operator()(_First[v6], _First[v6 - 1]) )
        --v6;
      _First[v5] = _First[v6];
      v5 = v6;
      v6 = 2 * v6 + 2;
    }
    while ( v6 < _Bottom );
    v4 = _Bottom;
    v7 = v6 == _Bottom;
  }
  if ( v7 )
  {
    _First[v5] = _First[v4 - 1];
    v5 = v4 - 1;
  }
  std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByMoney>(_First, v5, _Hole, _Val);
}

//----- (00549270) --------------------------------------------------------
void __cdecl std::_Adjust_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByMoneyDesc>(MarketSearchItem **_First, int _Hole, int _Bottom, MarketSearchItem **_Val)
{
  int v4; // eax@1
  int v5; // edi@1
  int v6; // esi@1
  bool v7; // zf@1

  v4 = _Bottom;
  v5 = _Hole;
  v6 = 2 * _Hole + 2;
  v7 = v6 == _Bottom;
  if ( v6 < _Bottom )
  {
    do
    {
      if ( MarketSearchWin::SortByMoneyDesc::operator()(_First[v6], _First[v6 - 1]) )
        --v6;
      _First[v5] = _First[v6];
      v5 = v6;
      v6 = 2 * v6 + 2;
    }
    while ( v6 < _Bottom );
    v4 = _Bottom;
    v7 = v6 == _Bottom;
  }
  if ( v7 )
  {
    _First[v5] = _First[v4 - 1];
    v5 = v4 - 1;
  }
  std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByMoneyDesc>(_First, v5, _Hole, _Val);
}

//----- (005492F0) --------------------------------------------------------
std::pair<MarketSearchItem * *,MarketSearchItem * *> *__cdecl std::_Unguarded_partition<MarketSearchItem * *,MarketSearchWin::SortByDefault>(std::pair<MarketSearchItem * *,MarketSearchItem * *> *result, MarketSearchItem **_First, MarketSearchItem **_Last)
{
  MarketSearchItem **v3; // esi@1
  MarketSearchItem **v4; // edi@1
  MarketSearchItem **v5; // ebx@10
  MarketSearchItem **v6; // eax@14
  MarketSearchItem *v7; // ecx@14
  bool v8; // zf@16
  MarketSearchItem *v9; // eax@19
  MarketSearchItem *v10; // ecx@25
  MarketSearchItem **v11; // eax@26
  MarketSearchItem *v12; // ST1C_4@26
  MarketSearchItem *v13; // eax@29
  MarketSearchItem *v14; // ecx@30
  MarketSearchItem *v15; // eax@31
  std::pair<MarketSearchItem * *,MarketSearchItem * *> *v16; // eax@32
  MarketSearchItem **_Plast; // [sp+10h] [bp-4h]@1

  v3 = &_First[(_Last - _First) / 2];
  std::_Median<MarketSearchItem * *,MarketSearchWin::SortByDefault>(_First, &_First[(_Last - _First) / 2], _Last - 1);
  v4 = v3 + 1;
  for ( _Plast = v3 + 1; _First < v3; --v3 )
  {
    if ( MarketSearchWin::SortByDefault::operator()(*(v3 - 1), *v3) )
      break;
    if ( MarketSearchWin::SortByDefault::operator()(*v3, *(v3 - 1)) )
      break;
  }
  if ( v4 < _Last )
  {
    do
    {
      if ( MarketSearchWin::SortByDefault::operator()(*v4, *v3) )
        break;
      if ( MarketSearchWin::SortByDefault::operator()(*v3, *v4) )
        break;
      ++v4;
    }
    while ( v4 < _Last );
    _Plast = v4;
  }
  v5 = v3;
  while ( 1 )
  {
    while ( 1 )
    {
      for ( ; v4 < _Last; ++v4 )
      {
        if ( !MarketSearchWin::SortByDefault::operator()(*v3, *v4) )
        {
          if ( MarketSearchWin::SortByDefault::operator()(*v4, *v3) )
            break;
          v6 = _Plast;
          ++_Plast;
          v7 = *v6;
          *v6 = *v4;
          *v4 = v7;
        }
      }
      v8 = v5 == _First;
      if ( v5 > _First )
      {
        do
        {
          if ( !MarketSearchWin::SortByDefault::operator()(*(v5 - 1), *v3) )
          {
            if ( MarketSearchWin::SortByDefault::operator()(*v3, *(v5 - 1)) )
              break;
            v9 = *(v3 - 1);
            --v3;
            *v3 = *(v5 - 1);
            *(v5 - 1) = v9;
          }
          --v5;
        }
        while ( _First < v5 );
        v8 = v5 == _First;
      }
      if ( v8 )
        break;
      --v5;
      if ( v4 == _Last )
      {
        --v3;
        if ( v5 != v3 )
        {
          v13 = *v5;
          *v5 = *v3;
          *v3 = v13;
        }
        v14 = *v3;
        *v3 = *(_Plast - 1);
        --_Plast;
        *_Plast = v14;
      }
      else
      {
        v15 = *v4;
        *v4 = *v5;
        *v5 = v15;
        ++v4;
      }
    }
    if ( v4 == _Last )
      break;
    if ( _Plast != v4 )
    {
      v10 = *v3;
      *v3 = *_Plast;
      *_Plast = v10;
    }
    ++_Plast;
    v11 = v4;
    v12 = *v3;
    *v3 = *v4;
    ++v3;
    ++v4;
    *v11 = v12;
  }
  v16 = result;
  result->first = v3;
  result->second = _Plast;
  return v16;
}

//----- (005494B0) --------------------------------------------------------
std::pair<MarketSearchItem * *,MarketSearchItem * *> *__cdecl std::_Unguarded_partition<MarketSearchItem * *,MarketSearchWin::SortByName>(std::pair<MarketSearchItem * *,MarketSearchItem * *> *result, MarketSearchItem **_First, MarketSearchItem **_Last)
{
  MarketSearchItem **v3; // esi@1
  MarketSearchItem **v4; // edi@1
  MarketSearchItem **v5; // ebx@10
  MarketSearchItem **v6; // eax@14
  MarketSearchItem *v7; // ecx@14
  bool v8; // zf@16
  MarketSearchItem *v9; // eax@19
  MarketSearchItem *v10; // ecx@25
  MarketSearchItem **v11; // eax@26
  MarketSearchItem *v12; // ST1C_4@26
  MarketSearchItem *v13; // eax@29
  MarketSearchItem *v14; // ecx@30
  MarketSearchItem *v15; // eax@31
  std::pair<MarketSearchItem * *,MarketSearchItem * *> *v16; // eax@32
  MarketSearchItem **_Plast; // [sp+10h] [bp-4h]@1

  v3 = &_First[(_Last - _First) / 2];
  std::_Median<MarketSearchItem * *,MarketSearchWin::SortByName>(_First, &_First[(_Last - _First) / 2], _Last - 1);
  v4 = v3 + 1;
  for ( _Plast = v3 + 1; _First < v3; --v3 )
  {
    if ( MarketSearchWin::SortByName::operator()(*(v3 - 1), *v3) )
      break;
    if ( MarketSearchWin::SortByName::operator()(*v3, *(v3 - 1)) )
      break;
  }
  if ( v4 < _Last )
  {
    do
    {
      if ( MarketSearchWin::SortByName::operator()(*v4, *v3) )
        break;
      if ( MarketSearchWin::SortByName::operator()(*v3, *v4) )
        break;
      ++v4;
    }
    while ( v4 < _Last );
    _Plast = v4;
  }
  v5 = v3;
  while ( 1 )
  {
    while ( 1 )
    {
      for ( ; v4 < _Last; ++v4 )
      {
        if ( !MarketSearchWin::SortByName::operator()(*v3, *v4) )
        {
          if ( MarketSearchWin::SortByName::operator()(*v4, *v3) )
            break;
          v6 = _Plast;
          ++_Plast;
          v7 = *v6;
          *v6 = *v4;
          *v4 = v7;
        }
      }
      v8 = v5 == _First;
      if ( v5 > _First )
      {
        do
        {
          if ( !MarketSearchWin::SortByName::operator()(*(v5 - 1), *v3) )
          {
            if ( MarketSearchWin::SortByName::operator()(*v3, *(v5 - 1)) )
              break;
            v9 = *(v3 - 1);
            --v3;
            *v3 = *(v5 - 1);
            *(v5 - 1) = v9;
          }
          --v5;
        }
        while ( _First < v5 );
        v8 = v5 == _First;
      }
      if ( v8 )
        break;
      --v5;
      if ( v4 == _Last )
      {
        --v3;
        if ( v5 != v3 )
        {
          v13 = *v5;
          *v5 = *v3;
          *v3 = v13;
        }
        v14 = *v3;
        *v3 = *(_Plast - 1);
        --_Plast;
        *_Plast = v14;
      }
      else
      {
        v15 = *v4;
        *v4 = *v5;
        *v5 = v15;
        ++v4;
      }
    }
    if ( v4 == _Last )
      break;
    if ( _Plast != v4 )
    {
      v10 = *v3;
      *v3 = *_Plast;
      *_Plast = v10;
    }
    ++_Plast;
    v11 = v4;
    v12 = *v3;
    *v3 = *v4;
    ++v3;
    ++v4;
    *v11 = v12;
  }
  v16 = result;
  result->first = v3;
  result->second = _Plast;
  return v16;
}

//----- (00549670) --------------------------------------------------------
std::pair<MarketSearchItem * *,MarketSearchItem * *> *__cdecl std::_Unguarded_partition<MarketSearchItem * *,MarketSearchWin::SortByNameDesc>(std::pair<MarketSearchItem * *,MarketSearchItem * *> *result, MarketSearchItem **_First, MarketSearchItem **_Last)
{
  MarketSearchItem **v3; // esi@1
  MarketSearchItem **v4; // edi@1
  MarketSearchItem **v5; // ebx@10
  MarketSearchItem **v6; // eax@14
  MarketSearchItem *v7; // ecx@14
  bool v8; // zf@16
  MarketSearchItem *v9; // eax@19
  MarketSearchItem *v10; // ecx@25
  MarketSearchItem **v11; // eax@26
  MarketSearchItem *v12; // ST1C_4@26
  MarketSearchItem *v13; // eax@29
  MarketSearchItem *v14; // ecx@30
  MarketSearchItem *v15; // eax@31
  std::pair<MarketSearchItem * *,MarketSearchItem * *> *v16; // eax@32
  MarketSearchItem **_Plast; // [sp+10h] [bp-4h]@1

  v3 = &_First[(_Last - _First) / 2];
  std::_Median<MarketSearchItem * *,MarketSearchWin::SortByNameDesc>(_First, &_First[(_Last - _First) / 2], _Last - 1);
  v4 = v3 + 1;
  for ( _Plast = v3 + 1; _First < v3; --v3 )
  {
    if ( MarketSearchWin::SortByNameDesc::operator()(*(v3 - 1), *v3) )
      break;
    if ( MarketSearchWin::SortByNameDesc::operator()(*v3, *(v3 - 1)) )
      break;
  }
  if ( v4 < _Last )
  {
    do
    {
      if ( MarketSearchWin::SortByNameDesc::operator()(*v4, *v3) )
        break;
      if ( MarketSearchWin::SortByNameDesc::operator()(*v3, *v4) )
        break;
      ++v4;
    }
    while ( v4 < _Last );
    _Plast = v4;
  }
  v5 = v3;
  while ( 1 )
  {
    while ( 1 )
    {
      for ( ; v4 < _Last; ++v4 )
      {
        if ( !MarketSearchWin::SortByNameDesc::operator()(*v3, *v4) )
        {
          if ( MarketSearchWin::SortByNameDesc::operator()(*v4, *v3) )
            break;
          v6 = _Plast;
          ++_Plast;
          v7 = *v6;
          *v6 = *v4;
          *v4 = v7;
        }
      }
      v8 = v5 == _First;
      if ( v5 > _First )
      {
        do
        {
          if ( !MarketSearchWin::SortByNameDesc::operator()(*(v5 - 1), *v3) )
          {
            if ( MarketSearchWin::SortByNameDesc::operator()(*v3, *(v5 - 1)) )
              break;
            v9 = *(v3 - 1);
            --v3;
            *v3 = *(v5 - 1);
            *(v5 - 1) = v9;
          }
          --v5;
        }
        while ( _First < v5 );
        v8 = v5 == _First;
      }
      if ( v8 )
        break;
      --v5;
      if ( v4 == _Last )
      {
        --v3;
        if ( v5 != v3 )
        {
          v13 = *v5;
          *v5 = *v3;
          *v3 = v13;
        }
        v14 = *v3;
        *v3 = *(_Plast - 1);
        --_Plast;
        *_Plast = v14;
      }
      else
      {
        v15 = *v4;
        *v4 = *v5;
        *v5 = v15;
        ++v4;
      }
    }
    if ( v4 == _Last )
      break;
    if ( _Plast != v4 )
    {
      v10 = *v3;
      *v3 = *_Plast;
      *_Plast = v10;
    }
    ++_Plast;
    v11 = v4;
    v12 = *v3;
    *v3 = *v4;
    ++v3;
    ++v4;
    *v11 = v12;
  }
  v16 = result;
  result->first = v3;
  result->second = _Plast;
  return v16;
}

//----- (00549830) --------------------------------------------------------
std::pair<MarketSearchItem * *,MarketSearchItem * *> *__cdecl std::_Unguarded_partition<MarketSearchItem * *,MarketSearchWin::SortByLevel>(std::pair<MarketSearchItem * *,MarketSearchItem * *> *result, MarketSearchItem **_First, MarketSearchItem **_Last)
{
  MarketSearchItem **v3; // esi@1
  MarketSearchItem **v4; // edi@1
  MarketSearchItem **v5; // ebx@10
  MarketSearchItem **v6; // eax@14
  MarketSearchItem *v7; // ecx@14
  bool v8; // zf@16
  MarketSearchItem *v9; // eax@19
  MarketSearchItem *v10; // ecx@25
  MarketSearchItem **v11; // eax@26
  MarketSearchItem *v12; // ST1C_4@26
  MarketSearchItem *v13; // eax@29
  MarketSearchItem *v14; // ecx@30
  MarketSearchItem *v15; // eax@31
  std::pair<MarketSearchItem * *,MarketSearchItem * *> *v16; // eax@32
  MarketSearchItem **_Plast; // [sp+10h] [bp-4h]@1

  v3 = &_First[(_Last - _First) / 2];
  std::_Median<MarketSearchItem * *,MarketSearchWin::SortByLevel>(_First, &_First[(_Last - _First) / 2], _Last - 1);
  v4 = v3 + 1;
  for ( _Plast = v3 + 1; _First < v3; --v3 )
  {
    if ( MarketSearchWin::SortByLevel::operator()(*(v3 - 1), *v3) )
      break;
    if ( MarketSearchWin::SortByLevel::operator()(*v3, *(v3 - 1)) )
      break;
  }
  if ( v4 < _Last )
  {
    do
    {
      if ( MarketSearchWin::SortByLevel::operator()(*v4, *v3) )
        break;
      if ( MarketSearchWin::SortByLevel::operator()(*v3, *v4) )
        break;
      ++v4;
    }
    while ( v4 < _Last );
    _Plast = v4;
  }
  v5 = v3;
  while ( 1 )
  {
    while ( 1 )
    {
      for ( ; v4 < _Last; ++v4 )
      {
        if ( !MarketSearchWin::SortByLevel::operator()(*v3, *v4) )
        {
          if ( MarketSearchWin::SortByLevel::operator()(*v4, *v3) )
            break;
          v6 = _Plast;
          ++_Plast;
          v7 = *v6;
          *v6 = *v4;
          *v4 = v7;
        }
      }
      v8 = v5 == _First;
      if ( v5 > _First )
      {
        do
        {
          if ( !MarketSearchWin::SortByLevel::operator()(*(v5 - 1), *v3) )
          {
            if ( MarketSearchWin::SortByLevel::operator()(*v3, *(v5 - 1)) )
              break;
            v9 = *(v3 - 1);
            --v3;
            *v3 = *(v5 - 1);
            *(v5 - 1) = v9;
          }
          --v5;
        }
        while ( _First < v5 );
        v8 = v5 == _First;
      }
      if ( v8 )
        break;
      --v5;
      if ( v4 == _Last )
      {
        --v3;
        if ( v5 != v3 )
        {
          v13 = *v5;
          *v5 = *v3;
          *v3 = v13;
        }
        v14 = *v3;
        *v3 = *(_Plast - 1);
        --_Plast;
        *_Plast = v14;
      }
      else
      {
        v15 = *v4;
        *v4 = *v5;
        *v5 = v15;
        ++v4;
      }
    }
    if ( v4 == _Last )
      break;
    if ( _Plast != v4 )
    {
      v10 = *v3;
      *v3 = *_Plast;
      *_Plast = v10;
    }
    ++_Plast;
    v11 = v4;
    v12 = *v3;
    *v3 = *v4;
    ++v3;
    ++v4;
    *v11 = v12;
  }
  v16 = result;
  result->first = v3;
  result->second = _Plast;
  return v16;
}

//----- (005499F0) --------------------------------------------------------
std::pair<MarketSearchItem * *,MarketSearchItem * *> *__cdecl std::_Unguarded_partition<MarketSearchItem * *,MarketSearchWin::SortByLevelDesc>(std::pair<MarketSearchItem * *,MarketSearchItem * *> *result, MarketSearchItem **_First, MarketSearchItem **_Last)
{
  MarketSearchItem **v3; // esi@1
  MarketSearchItem **v4; // edi@1
  MarketSearchItem **v5; // ebx@10
  MarketSearchItem **v6; // eax@14
  MarketSearchItem *v7; // ecx@14
  bool v8; // zf@16
  MarketSearchItem *v9; // eax@19
  MarketSearchItem *v10; // ecx@25
  MarketSearchItem **v11; // eax@26
  MarketSearchItem *v12; // ST1C_4@26
  MarketSearchItem *v13; // eax@29
  MarketSearchItem *v14; // ecx@30
  MarketSearchItem *v15; // eax@31
  std::pair<MarketSearchItem * *,MarketSearchItem * *> *v16; // eax@32
  MarketSearchItem **_Plast; // [sp+10h] [bp-4h]@1

  v3 = &_First[(_Last - _First) / 2];
  std::_Median<MarketSearchItem * *,MarketSearchWin::SortByLevelDesc>(_First, &_First[(_Last - _First) / 2], _Last - 1);
  v4 = v3 + 1;
  for ( _Plast = v3 + 1; _First < v3; --v3 )
  {
    if ( MarketSearchWin::SortByLevelDesc::operator()(*(v3 - 1), *v3) )
      break;
    if ( MarketSearchWin::SortByLevelDesc::operator()(*v3, *(v3 - 1)) )
      break;
  }
  if ( v4 < _Last )
  {
    do
    {
      if ( MarketSearchWin::SortByLevelDesc::operator()(*v4, *v3) )
        break;
      if ( MarketSearchWin::SortByLevelDesc::operator()(*v3, *v4) )
        break;
      ++v4;
    }
    while ( v4 < _Last );
    _Plast = v4;
  }
  v5 = v3;
  while ( 1 )
  {
    while ( 1 )
    {
      for ( ; v4 < _Last; ++v4 )
      {
        if ( !MarketSearchWin::SortByLevelDesc::operator()(*v3, *v4) )
        {
          if ( MarketSearchWin::SortByLevelDesc::operator()(*v4, *v3) )
            break;
          v6 = _Plast;
          ++_Plast;
          v7 = *v6;
          *v6 = *v4;
          *v4 = v7;
        }
      }
      v8 = v5 == _First;
      if ( v5 > _First )
      {
        do
        {
          if ( !MarketSearchWin::SortByLevelDesc::operator()(*(v5 - 1), *v3) )
          {
            if ( MarketSearchWin::SortByLevelDesc::operator()(*v3, *(v5 - 1)) )
              break;
            v9 = *(v3 - 1);
            --v3;
            *v3 = *(v5 - 1);
            *(v5 - 1) = v9;
          }
          --v5;
        }
        while ( _First < v5 );
        v8 = v5 == _First;
      }
      if ( v8 )
        break;
      --v5;
      if ( v4 == _Last )
      {
        --v3;
        if ( v5 != v3 )
        {
          v13 = *v5;
          *v5 = *v3;
          *v3 = v13;
        }
        v14 = *v3;
        *v3 = *(_Plast - 1);
        --_Plast;
        *_Plast = v14;
      }
      else
      {
        v15 = *v4;
        *v4 = *v5;
        *v5 = v15;
        ++v4;
      }
    }
    if ( v4 == _Last )
      break;
    if ( _Plast != v4 )
    {
      v10 = *v3;
      *v3 = *_Plast;
      *_Plast = v10;
    }
    ++_Plast;
    v11 = v4;
    v12 = *v3;
    *v3 = *v4;
    ++v3;
    ++v4;
    *v11 = v12;
  }
  v16 = result;
  result->first = v3;
  result->second = _Plast;
  return v16;
}

//----- (00549BB0) --------------------------------------------------------
std::pair<MarketSearchItem * *,MarketSearchItem * *> *__cdecl std::_Unguarded_partition<MarketSearchItem * *,MarketSearchWin::SortByMoney>(std::pair<MarketSearchItem * *,MarketSearchItem * *> *result, MarketSearchItem **_First, MarketSearchItem **_Last)
{
  MarketSearchItem **v3; // esi@1
  MarketSearchItem **v4; // edi@1
  MarketSearchItem **v5; // ebx@10
  MarketSearchItem **v6; // eax@14
  MarketSearchItem *v7; // ecx@14
  bool v8; // zf@16
  MarketSearchItem *v9; // eax@19
  MarketSearchItem *v10; // ecx@25
  MarketSearchItem **v11; // eax@26
  MarketSearchItem *v12; // ST1C_4@26
  MarketSearchItem *v13; // eax@29
  MarketSearchItem *v14; // ecx@30
  MarketSearchItem *v15; // eax@31
  std::pair<MarketSearchItem * *,MarketSearchItem * *> *v16; // eax@32
  MarketSearchItem **_Plast; // [sp+10h] [bp-4h]@1

  v3 = &_First[(_Last - _First) / 2];
  std::_Median<MarketSearchItem * *,MarketSearchWin::SortByMoney>(_First, &_First[(_Last - _First) / 2], _Last - 1);
  v4 = v3 + 1;
  for ( _Plast = v3 + 1; _First < v3; --v3 )
  {
    if ( MarketSearchWin::SortByMoney::operator()(*(v3 - 1), *v3) )
      break;
    if ( MarketSearchWin::SortByMoney::operator()(*v3, *(v3 - 1)) )
      break;
  }
  if ( v4 < _Last )
  {
    do
    {
      if ( MarketSearchWin::SortByMoney::operator()(*v4, *v3) )
        break;
      if ( MarketSearchWin::SortByMoney::operator()(*v3, *v4) )
        break;
      ++v4;
    }
    while ( v4 < _Last );
    _Plast = v4;
  }
  v5 = v3;
  while ( 1 )
  {
    while ( 1 )
    {
      for ( ; v4 < _Last; ++v4 )
      {
        if ( !MarketSearchWin::SortByMoney::operator()(*v3, *v4) )
        {
          if ( MarketSearchWin::SortByMoney::operator()(*v4, *v3) )
            break;
          v6 = _Plast;
          ++_Plast;
          v7 = *v6;
          *v6 = *v4;
          *v4 = v7;
        }
      }
      v8 = v5 == _First;
      if ( v5 > _First )
      {
        do
        {
          if ( !MarketSearchWin::SortByMoney::operator()(*(v5 - 1), *v3) )
          {
            if ( MarketSearchWin::SortByMoney::operator()(*v3, *(v5 - 1)) )
              break;
            v9 = *(v3 - 1);
            --v3;
            *v3 = *(v5 - 1);
            *(v5 - 1) = v9;
          }
          --v5;
        }
        while ( _First < v5 );
        v8 = v5 == _First;
      }
      if ( v8 )
        break;
      --v5;
      if ( v4 == _Last )
      {
        --v3;
        if ( v5 != v3 )
        {
          v13 = *v5;
          *v5 = *v3;
          *v3 = v13;
        }
        v14 = *v3;
        *v3 = *(_Plast - 1);
        --_Plast;
        *_Plast = v14;
      }
      else
      {
        v15 = *v4;
        *v4 = *v5;
        *v5 = v15;
        ++v4;
      }
    }
    if ( v4 == _Last )
      break;
    if ( _Plast != v4 )
    {
      v10 = *v3;
      *v3 = *_Plast;
      *_Plast = v10;
    }
    ++_Plast;
    v11 = v4;
    v12 = *v3;
    *v3 = *v4;
    ++v3;
    ++v4;
    *v11 = v12;
  }
  v16 = result;
  result->first = v3;
  result->second = _Plast;
  return v16;
}

//----- (00549D70) --------------------------------------------------------
std::pair<MarketSearchItem * *,MarketSearchItem * *> *__cdecl std::_Unguarded_partition<MarketSearchItem * *,MarketSearchWin::SortByMoneyDesc>(std::pair<MarketSearchItem * *,MarketSearchItem * *> *result, MarketSearchItem **_First, MarketSearchItem **_Last)
{
  MarketSearchItem **v3; // esi@1
  MarketSearchItem **v4; // edi@1
  MarketSearchItem **v5; // ebx@10
  MarketSearchItem **v6; // eax@14
  MarketSearchItem *v7; // ecx@14
  bool v8; // zf@16
  MarketSearchItem *v9; // eax@19
  MarketSearchItem *v10; // ecx@25
  MarketSearchItem **v11; // eax@26
  MarketSearchItem *v12; // ST1C_4@26
  MarketSearchItem *v13; // eax@29
  MarketSearchItem *v14; // ecx@30
  MarketSearchItem *v15; // eax@31
  std::pair<MarketSearchItem * *,MarketSearchItem * *> *v16; // eax@32
  MarketSearchItem **_Plast; // [sp+10h] [bp-4h]@1

  v3 = &_First[(_Last - _First) / 2];
  std::_Median<MarketSearchItem * *,MarketSearchWin::SortByMoneyDesc>(_First, &_First[(_Last - _First) / 2], _Last - 1);
  v4 = v3 + 1;
  for ( _Plast = v3 + 1; _First < v3; --v3 )
  {
    if ( MarketSearchWin::SortByMoneyDesc::operator()(*(v3 - 1), *v3) )
      break;
    if ( MarketSearchWin::SortByMoneyDesc::operator()(*v3, *(v3 - 1)) )
      break;
  }
  if ( v4 < _Last )
  {
    do
    {
      if ( MarketSearchWin::SortByMoneyDesc::operator()(*v4, *v3) )
        break;
      if ( MarketSearchWin::SortByMoneyDesc::operator()(*v3, *v4) )
        break;
      ++v4;
    }
    while ( v4 < _Last );
    _Plast = v4;
  }
  v5 = v3;
  while ( 1 )
  {
    while ( 1 )
    {
      for ( ; v4 < _Last; ++v4 )
      {
        if ( !MarketSearchWin::SortByMoneyDesc::operator()(*v3, *v4) )
        {
          if ( MarketSearchWin::SortByMoneyDesc::operator()(*v4, *v3) )
            break;
          v6 = _Plast;
          ++_Plast;
          v7 = *v6;
          *v6 = *v4;
          *v4 = v7;
        }
      }
      v8 = v5 == _First;
      if ( v5 > _First )
      {
        do
        {
          if ( !MarketSearchWin::SortByMoneyDesc::operator()(*(v5 - 1), *v3) )
          {
            if ( MarketSearchWin::SortByMoneyDesc::operator()(*v3, *(v5 - 1)) )
              break;
            v9 = *(v3 - 1);
            --v3;
            *v3 = *(v5 - 1);
            *(v5 - 1) = v9;
          }
          --v5;
        }
        while ( _First < v5 );
        v8 = v5 == _First;
      }
      if ( v8 )
        break;
      --v5;
      if ( v4 == _Last )
      {
        --v3;
        if ( v5 != v3 )
        {
          v13 = *v5;
          *v5 = *v3;
          *v3 = v13;
        }
        v14 = *v3;
        *v3 = *(_Plast - 1);
        --_Plast;
        *_Plast = v14;
      }
      else
      {
        v15 = *v4;
        *v4 = *v5;
        *v5 = v15;
        ++v4;
      }
    }
    if ( v4 == _Last )
      break;
    if ( _Plast != v4 )
    {
      v10 = *v3;
      *v3 = *_Plast;
      *_Plast = v10;
    }
    ++_Plast;
    v11 = v4;
    v12 = *v3;
    *v3 = *v4;
    ++v3;
    ++v4;
    *v11 = v12;
  }
  v16 = result;
  result->first = v3;
  result->second = _Plast;
  return v16;
}

//----- (00549F30) --------------------------------------------------------
void __cdecl std::_Make_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByDefault>(MarketSearchItem **_First, MarketSearchItem **_Last, MarketSearchWin::SortByDefault _Pred)
{
  MarketSearchItem **v3; // edi@1
  signed int v4; // ecx@1
  int v5; // ebx@1
  int i; // esi@2
  MarketSearchItem *v7; // eax@4
  int v8; // esi@4
  bool v9; // zf@4
  int v10; // eax@7
  MarketSearchItem *v11; // edx@7
  MarketSearchItem *_Val; // [sp+8h] [bp-Ch]@4
  int v13; // [sp+Ch] [bp-8h]@3
  int v14; // [sp+10h] [bp-4h]@4
  int _Bottom; // [sp+1Ch] [bp+8h]@1
  int _Lasta; // [sp+20h] [bp+Ch]@4

  v3 = _First;
  v4 = _Last - _First;
  v5 = v4 / 2;
  _Bottom = _Last - _First;
  if ( v5 > 0 )
  {
    for ( i = 2 * v5 + 2; ; i = v13 )
    {
      v7 = v3[v5-- - 1];
      v8 = i - 2;
      v13 = v8;
      _Val = v7;
      LOBYTE(v14) = _Pred;
      _Lasta = v5;
      v9 = v8 == v4;
      if ( v8 < v4 )
      {
        do
        {
          if ( MarketSearchWin::SortByDefault::operator()(v3[v8], v3[v8 - 1]) )
            --v8;
          v10 = _Lasta;
          v11 = v3[v8];
          _Lasta = v8;
          v8 = 2 * v8 + 2;
          v3[v10] = v11;
        }
        while ( v8 < _Bottom );
        v4 = _Bottom;
        v9 = v8 == _Bottom;
      }
      if ( v9 )
      {
        v3[_Lasta] = v3[v4 - 1];
        _Lasta = v4 - 1;
      }
      std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByDefault>(v3, _Lasta, v5, &_Val);
      if ( v5 <= 0 )
        break;
      v4 = _Bottom;
    }
  }
}

//----- (00549FF0) --------------------------------------------------------
void __cdecl std::_Make_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByName>(MarketSearchItem **_First, MarketSearchItem **_Last, MarketSearchWin::SortByName _Pred)
{
  MarketSearchItem **v3; // edi@1
  signed int v4; // ecx@1
  int v5; // ebx@1
  int i; // esi@2
  MarketSearchItem *v7; // eax@4
  int v8; // esi@4
  bool v9; // zf@4
  int v10; // eax@7
  MarketSearchItem *v11; // edx@7
  MarketSearchItem *_Val; // [sp+8h] [bp-Ch]@4
  int v13; // [sp+Ch] [bp-8h]@3
  int v14; // [sp+10h] [bp-4h]@4
  int _Bottom; // [sp+1Ch] [bp+8h]@1
  int _Lasta; // [sp+20h] [bp+Ch]@4

  v3 = _First;
  v4 = _Last - _First;
  v5 = v4 / 2;
  _Bottom = _Last - _First;
  if ( v5 > 0 )
  {
    for ( i = 2 * v5 + 2; ; i = v13 )
    {
      v7 = v3[v5-- - 1];
      v8 = i - 2;
      v13 = v8;
      _Val = v7;
      LOBYTE(v14) = _Pred;
      _Lasta = v5;
      v9 = v8 == v4;
      if ( v8 < v4 )
      {
        do
        {
          if ( MarketSearchWin::SortByName::operator()(v3[v8], v3[v8 - 1]) )
            --v8;
          v10 = _Lasta;
          v11 = v3[v8];
          _Lasta = v8;
          v8 = 2 * v8 + 2;
          v3[v10] = v11;
        }
        while ( v8 < _Bottom );
        v4 = _Bottom;
        v9 = v8 == _Bottom;
      }
      if ( v9 )
      {
        v3[_Lasta] = v3[v4 - 1];
        _Lasta = v4 - 1;
      }
      std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByName>(v3, _Lasta, v5, &_Val);
      if ( v5 <= 0 )
        break;
      v4 = _Bottom;
    }
  }
}

//----- (0054A0B0) --------------------------------------------------------
void __cdecl std::_Make_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByNameDesc>(MarketSearchItem **_First, MarketSearchItem **_Last, MarketSearchWin::SortByNameDesc _Pred)
{
  MarketSearchItem **v3; // edi@1
  signed int v4; // ecx@1
  int v5; // ebx@1
  int i; // esi@2
  MarketSearchItem *v7; // eax@4
  int v8; // esi@4
  bool v9; // zf@4
  int v10; // eax@7
  MarketSearchItem *v11; // edx@7
  MarketSearchItem *_Val; // [sp+8h] [bp-Ch]@4
  int v13; // [sp+Ch] [bp-8h]@3
  int v14; // [sp+10h] [bp-4h]@4
  int _Bottom; // [sp+1Ch] [bp+8h]@1
  int _Lasta; // [sp+20h] [bp+Ch]@4

  v3 = _First;
  v4 = _Last - _First;
  v5 = v4 / 2;
  _Bottom = _Last - _First;
  if ( v5 > 0 )
  {
    for ( i = 2 * v5 + 2; ; i = v13 )
    {
      v7 = v3[v5-- - 1];
      v8 = i - 2;
      v13 = v8;
      _Val = v7;
      LOBYTE(v14) = _Pred;
      _Lasta = v5;
      v9 = v8 == v4;
      if ( v8 < v4 )
      {
        do
        {
          if ( MarketSearchWin::SortByNameDesc::operator()(v3[v8], v3[v8 - 1]) )
            --v8;
          v10 = _Lasta;
          v11 = v3[v8];
          _Lasta = v8;
          v8 = 2 * v8 + 2;
          v3[v10] = v11;
        }
        while ( v8 < _Bottom );
        v4 = _Bottom;
        v9 = v8 == _Bottom;
      }
      if ( v9 )
      {
        v3[_Lasta] = v3[v4 - 1];
        _Lasta = v4 - 1;
      }
      std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByNameDesc>(
        v3,
        _Lasta,
        v5,
        &_Val);
      if ( v5 <= 0 )
        break;
      v4 = _Bottom;
    }
  }
}

//----- (0054A170) --------------------------------------------------------
void __cdecl std::_Make_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByLevel>(MarketSearchItem **_First, MarketSearchItem **_Last, MarketSearchWin::SortByLevel _Pred)
{
  MarketSearchItem **v3; // edi@1
  signed int v4; // ecx@1
  int v5; // ebx@1
  int i; // esi@2
  MarketSearchItem *v7; // eax@4
  int v8; // esi@4
  bool v9; // zf@4
  int v10; // eax@7
  MarketSearchItem *v11; // edx@7
  MarketSearchItem *_Val; // [sp+8h] [bp-Ch]@4
  int v13; // [sp+Ch] [bp-8h]@3
  int v14; // [sp+10h] [bp-4h]@4
  int _Bottom; // [sp+1Ch] [bp+8h]@1
  int _Lasta; // [sp+20h] [bp+Ch]@4

  v3 = _First;
  v4 = _Last - _First;
  v5 = v4 / 2;
  _Bottom = _Last - _First;
  if ( v5 > 0 )
  {
    for ( i = 2 * v5 + 2; ; i = v13 )
    {
      v7 = v3[v5-- - 1];
      v8 = i - 2;
      v13 = v8;
      _Val = v7;
      LOBYTE(v14) = _Pred;
      _Lasta = v5;
      v9 = v8 == v4;
      if ( v8 < v4 )
      {
        do
        {
          if ( MarketSearchWin::SortByLevel::operator()(v3[v8], v3[v8 - 1]) )
            --v8;
          v10 = _Lasta;
          v11 = v3[v8];
          _Lasta = v8;
          v8 = 2 * v8 + 2;
          v3[v10] = v11;
        }
        while ( v8 < _Bottom );
        v4 = _Bottom;
        v9 = v8 == _Bottom;
      }
      if ( v9 )
      {
        v3[_Lasta] = v3[v4 - 1];
        _Lasta = v4 - 1;
      }
      std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByLevel>(v3, _Lasta, v5, &_Val);
      if ( v5 <= 0 )
        break;
      v4 = _Bottom;
    }
  }
}

//----- (0054A230) --------------------------------------------------------
void __cdecl std::_Make_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByLevelDesc>(MarketSearchItem **_First, MarketSearchItem **_Last, MarketSearchWin::SortByLevelDesc _Pred)
{
  MarketSearchItem **v3; // edi@1
  signed int v4; // ecx@1
  int v5; // ebx@1
  int i; // esi@2
  MarketSearchItem *v7; // eax@4
  int v8; // esi@4
  bool v9; // zf@4
  int v10; // eax@7
  MarketSearchItem *v11; // edx@7
  MarketSearchItem *_Val; // [sp+8h] [bp-Ch]@4
  int v13; // [sp+Ch] [bp-8h]@3
  int v14; // [sp+10h] [bp-4h]@4
  int _Bottom; // [sp+1Ch] [bp+8h]@1
  int _Lasta; // [sp+20h] [bp+Ch]@4

  v3 = _First;
  v4 = _Last - _First;
  v5 = v4 / 2;
  _Bottom = _Last - _First;
  if ( v5 > 0 )
  {
    for ( i = 2 * v5 + 2; ; i = v13 )
    {
      v7 = v3[v5-- - 1];
      v8 = i - 2;
      v13 = v8;
      _Val = v7;
      LOBYTE(v14) = _Pred;
      _Lasta = v5;
      v9 = v8 == v4;
      if ( v8 < v4 )
      {
        do
        {
          if ( MarketSearchWin::SortByLevelDesc::operator()(v3[v8], v3[v8 - 1]) )
            --v8;
          v10 = _Lasta;
          v11 = v3[v8];
          _Lasta = v8;
          v8 = 2 * v8 + 2;
          v3[v10] = v11;
        }
        while ( v8 < _Bottom );
        v4 = _Bottom;
        v9 = v8 == _Bottom;
      }
      if ( v9 )
      {
        v3[_Lasta] = v3[v4 - 1];
        _Lasta = v4 - 1;
      }
      std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByLevelDesc>(
        v3,
        _Lasta,
        v5,
        &_Val);
      if ( v5 <= 0 )
        break;
      v4 = _Bottom;
    }
  }
}

//----- (0054A2F0) --------------------------------------------------------
void __cdecl std::_Make_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByMoney>(MarketSearchItem **_First, MarketSearchItem **_Last, MarketSearchWin::SortByMoney _Pred)
{
  MarketSearchItem **v3; // edi@1
  signed int v4; // ecx@1
  int v5; // ebx@1
  int i; // esi@2
  MarketSearchItem *v7; // eax@4
  int v8; // esi@4
  bool v9; // zf@4
  int v10; // eax@7
  MarketSearchItem *v11; // edx@7
  MarketSearchItem *_Val; // [sp+8h] [bp-Ch]@4
  int v13; // [sp+Ch] [bp-8h]@3
  int v14; // [sp+10h] [bp-4h]@4
  int _Bottom; // [sp+1Ch] [bp+8h]@1
  int _Lasta; // [sp+20h] [bp+Ch]@4

  v3 = _First;
  v4 = _Last - _First;
  v5 = v4 / 2;
  _Bottom = _Last - _First;
  if ( v5 > 0 )
  {
    for ( i = 2 * v5 + 2; ; i = v13 )
    {
      v7 = v3[v5-- - 1];
      v8 = i - 2;
      v13 = v8;
      _Val = v7;
      LOBYTE(v14) = _Pred;
      _Lasta = v5;
      v9 = v8 == v4;
      if ( v8 < v4 )
      {
        do
        {
          if ( MarketSearchWin::SortByMoney::operator()(v3[v8], v3[v8 - 1]) )
            --v8;
          v10 = _Lasta;
          v11 = v3[v8];
          _Lasta = v8;
          v8 = 2 * v8 + 2;
          v3[v10] = v11;
        }
        while ( v8 < _Bottom );
        v4 = _Bottom;
        v9 = v8 == _Bottom;
      }
      if ( v9 )
      {
        v3[_Lasta] = v3[v4 - 1];
        _Lasta = v4 - 1;
      }
      std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByMoney>(v3, _Lasta, v5, &_Val);
      if ( v5 <= 0 )
        break;
      v4 = _Bottom;
    }
  }
}

//----- (0054A3B0) --------------------------------------------------------
void __cdecl std::_Make_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByMoneyDesc>(MarketSearchItem **_First, MarketSearchItem **_Last, MarketSearchWin::SortByMoneyDesc _Pred)
{
  MarketSearchItem **v3; // edi@1
  signed int v4; // ecx@1
  int v5; // ebx@1
  int i; // esi@2
  MarketSearchItem *v7; // eax@4
  int v8; // esi@4
  bool v9; // zf@4
  int v10; // eax@7
  MarketSearchItem *v11; // edx@7
  MarketSearchItem *_Val; // [sp+8h] [bp-Ch]@4
  int v13; // [sp+Ch] [bp-8h]@3
  int v14; // [sp+10h] [bp-4h]@4
  int _Bottom; // [sp+1Ch] [bp+8h]@1
  int _Lasta; // [sp+20h] [bp+Ch]@4

  v3 = _First;
  v4 = _Last - _First;
  v5 = v4 / 2;
  _Bottom = _Last - _First;
  if ( v5 > 0 )
  {
    for ( i = 2 * v5 + 2; ; i = v13 )
    {
      v7 = v3[v5-- - 1];
      v8 = i - 2;
      v13 = v8;
      _Val = v7;
      LOBYTE(v14) = _Pred;
      _Lasta = v5;
      v9 = v8 == v4;
      if ( v8 < v4 )
      {
        do
        {
          if ( MarketSearchWin::SortByMoneyDesc::operator()(v3[v8], v3[v8 - 1]) )
            --v8;
          v10 = _Lasta;
          v11 = v3[v8];
          _Lasta = v8;
          v8 = 2 * v8 + 2;
          v3[v10] = v11;
        }
        while ( v8 < _Bottom );
        v4 = _Bottom;
        v9 = v8 == _Bottom;
      }
      if ( v9 )
      {
        v3[_Lasta] = v3[v4 - 1];
        _Lasta = v4 - 1;
      }
      std::_Push_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByMoneyDesc>(
        v3,
        _Lasta,
        v5,
        &_Val);
      if ( v5 <= 0 )
        break;
      v4 = _Bottom;
    }
  }
}

//----- (0054A470) --------------------------------------------------------
void __thiscall std::pair<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::~pair<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>(std::pair<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > *this)
{
  std::pair<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > *v1; // esi@1

  v1 = this;
  if ( this->second._Myres >= 0x10 )
    operator delete(this->second._Bx._Ptr);
  v1->second._Myres = 15;
  v1->second._Mysize = 0;
  v1->second._Bx._Buf[0] = 0;
}

//----- (0054A4A0) --------------------------------------------------------
MarketSearchWin *__thiscall MarketSearchWin::`scalar deleting destructor'(MarketSearchWin *this, unsigned int a2)
{
  MarketSearchWin *v2; // esi@1

  v2 = this;
  MarketSearchWin::~MarketSearchWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0054A4D0) --------------------------------------------------------
void __cdecl std::_Sort_heap<MarketSearchItem * *,MarketSearchWin::SortByDefault>(MarketSearchItem **_First, MarketSearchItem **_Last)
{
  signed int v2; // eax@1
  MarketSearchItem *v3; // ecx@2
  int v4; // edi@2

  v2 = (char *)_Last - (char *)_First;
  if ( (signed int)(((char *)_Last - (char *)_First) & 0xFFFFFFFC) > 4 )
  {
    do
    {
      v3 = *_First;
      _Last = *(MarketSearchItem ***)((char *)_First + v2 - 4);
      *(MarketSearchItem **)((char *)_First + v2 - 4) = v3;
      v4 = v2 - 4;
      std::_Adjust_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByDefault>(
        _First,
        0,
        (v2 - 4) >> 2,
        (MarketSearchItem **)&_Last);
      v2 = v4;
    }
    while ( (signed int)(v4 & 0xFFFFFFFC) > 4 );
  }
}

//----- (0054A520) --------------------------------------------------------
void __cdecl std::_Sort_heap<MarketSearchItem * *,MarketSearchWin::SortByName>(MarketSearchItem **_First, MarketSearchItem **_Last)
{
  signed int v2; // eax@1
  MarketSearchItem *v3; // ecx@2
  int v4; // edi@2

  v2 = (char *)_Last - (char *)_First;
  if ( (signed int)(((char *)_Last - (char *)_First) & 0xFFFFFFFC) > 4 )
  {
    do
    {
      v3 = *_First;
      _Last = *(MarketSearchItem ***)((char *)_First + v2 - 4);
      *(MarketSearchItem **)((char *)_First + v2 - 4) = v3;
      v4 = v2 - 4;
      std::_Adjust_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByName>(
        _First,
        0,
        (v2 - 4) >> 2,
        (MarketSearchItem **)&_Last);
      v2 = v4;
    }
    while ( (signed int)(v4 & 0xFFFFFFFC) > 4 );
  }
}

//----- (0054A570) --------------------------------------------------------
void __cdecl std::_Sort_heap<MarketSearchItem * *,MarketSearchWin::SortByNameDesc>(MarketSearchItem **_First, MarketSearchItem **_Last)
{
  signed int v2; // eax@1
  MarketSearchItem *v3; // ecx@2
  int v4; // edi@2

  v2 = (char *)_Last - (char *)_First;
  if ( (signed int)(((char *)_Last - (char *)_First) & 0xFFFFFFFC) > 4 )
  {
    do
    {
      v3 = *_First;
      _Last = *(MarketSearchItem ***)((char *)_First + v2 - 4);
      *(MarketSearchItem **)((char *)_First + v2 - 4) = v3;
      v4 = v2 - 4;
      std::_Adjust_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByNameDesc>(
        _First,
        0,
        (v2 - 4) >> 2,
        (MarketSearchItem **)&_Last);
      v2 = v4;
    }
    while ( (signed int)(v4 & 0xFFFFFFFC) > 4 );
  }
}

//----- (0054A5C0) --------------------------------------------------------
void __cdecl std::_Sort_heap<MarketSearchItem * *,MarketSearchWin::SortByLevel>(MarketSearchItem **_First, MarketSearchItem **_Last)
{
  signed int v2; // eax@1
  MarketSearchItem *v3; // ecx@2
  int v4; // edi@2

  v2 = (char *)_Last - (char *)_First;
  if ( (signed int)(((char *)_Last - (char *)_First) & 0xFFFFFFFC) > 4 )
  {
    do
    {
      v3 = *_First;
      _Last = *(MarketSearchItem ***)((char *)_First + v2 - 4);
      *(MarketSearchItem **)((char *)_First + v2 - 4) = v3;
      v4 = v2 - 4;
      std::_Adjust_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByLevel>(
        _First,
        0,
        (v2 - 4) >> 2,
        (MarketSearchItem **)&_Last);
      v2 = v4;
    }
    while ( (signed int)(v4 & 0xFFFFFFFC) > 4 );
  }
}

//----- (0054A610) --------------------------------------------------------
void __cdecl std::_Sort_heap<MarketSearchItem * *,MarketSearchWin::SortByLevelDesc>(MarketSearchItem **_First, MarketSearchItem **_Last)
{
  signed int v2; // eax@1
  MarketSearchItem *v3; // ecx@2
  int v4; // edi@2

  v2 = (char *)_Last - (char *)_First;
  if ( (signed int)(((char *)_Last - (char *)_First) & 0xFFFFFFFC) > 4 )
  {
    do
    {
      v3 = *_First;
      _Last = *(MarketSearchItem ***)((char *)_First + v2 - 4);
      *(MarketSearchItem **)((char *)_First + v2 - 4) = v3;
      v4 = v2 - 4;
      std::_Adjust_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByLevelDesc>(
        _First,
        0,
        (v2 - 4) >> 2,
        (MarketSearchItem **)&_Last);
      v2 = v4;
    }
    while ( (signed int)(v4 & 0xFFFFFFFC) > 4 );
  }
}

//----- (0054A660) --------------------------------------------------------
void __cdecl std::_Sort_heap<MarketSearchItem * *,MarketSearchWin::SortByMoney>(MarketSearchItem **_First, MarketSearchItem **_Last)
{
  signed int v2; // eax@1
  MarketSearchItem *v3; // ecx@2
  int v4; // edi@2

  v2 = (char *)_Last - (char *)_First;
  if ( (signed int)(((char *)_Last - (char *)_First) & 0xFFFFFFFC) > 4 )
  {
    do
    {
      v3 = *_First;
      _Last = *(MarketSearchItem ***)((char *)_First + v2 - 4);
      *(MarketSearchItem **)((char *)_First + v2 - 4) = v3;
      v4 = v2 - 4;
      std::_Adjust_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByMoney>(
        _First,
        0,
        (v2 - 4) >> 2,
        (MarketSearchItem **)&_Last);
      v2 = v4;
    }
    while ( (signed int)(v4 & 0xFFFFFFFC) > 4 );
  }
}

//----- (0054A6B0) --------------------------------------------------------
void __cdecl std::_Sort_heap<MarketSearchItem * *,MarketSearchWin::SortByMoneyDesc>(MarketSearchItem **_First, MarketSearchItem **_Last)
{
  signed int v2; // eax@1
  MarketSearchItem *v3; // ecx@2
  int v4; // edi@2

  v2 = (char *)_Last - (char *)_First;
  if ( (signed int)(((char *)_Last - (char *)_First) & 0xFFFFFFFC) > 4 )
  {
    do
    {
      v3 = *_First;
      _Last = *(MarketSearchItem ***)((char *)_First + v2 - 4);
      *(MarketSearchItem **)((char *)_First + v2 - 4) = v3;
      v4 = v2 - 4;
      std::_Adjust_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByMoneyDesc>(
        _First,
        0,
        (v2 - 4) >> 2,
        (MarketSearchItem **)&_Last);
      v2 = v4;
    }
    while ( (signed int)(v4 & 0xFFFFFFFC) > 4 );
  }
}

//----- (0054A700) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned short>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *_Newnode)
{
  unsigned int v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v6; // edi@6
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v7; // edx@6
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v8; // edx@9
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v9; // edx@11
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v10; // eax@13
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v11; // edx@14
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v12; // esi@14
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v13; // esi@15
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v14; // edx@18
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v15; // esi@20
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v16; // esi@22
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v17; // edx@26
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v18; // esi@26
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v19; // edi@26
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v20; // edi@28
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v21; // edi@30
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v22; // esi@33
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v23; // edx@36
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v24; // esi@36
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v25; // esi@38
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v26; // esi@40
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v27; // edi@46
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v28; // edi@48
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v29; // ecx@54
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > > *v30; // eax@54

  v5 = this->_Mysize;
  if ( v5 >= 0x7FFFFFE )
  {
    if ( _Newnode->_Myval.first._Myres >= 0x10 )
      operator delete(_Newnode->_Myval.first._Bx._Ptr);
    _Newnode->_Myval.first._Myres = 15;
    _Newnode->_Myval.first._Mysize = 0;
    _Newnode->_Myval.first._Bx._Buf[0] = 0;
    operator delete(_Newnode);
    std::_Xlength_error("map/set<T> too long");
  }
  v6 = _Newnode;
  this->_Mysize = v5 + 1;
  _Newnode->_Parent = _Wherenode;
  v7 = this->_Myhead;
  if ( _Wherenode == v7 )
  {
    v7->_Parent = _Newnode;
    this->_Myhead->_Left = _Newnode;
    this->_Myhead->_Right = _Newnode;
  }
  else if ( _Addleft )
  {
    _Wherenode->_Left = _Newnode;
    v8 = this->_Myhead;
    if ( _Wherenode == v8->_Left )
      v8->_Left = _Newnode;
  }
  else
  {
    _Wherenode->_Right = _Newnode;
    v9 = this->_Myhead;
    if ( _Wherenode == v9->_Right )
      v9->_Right = _Newnode;
  }
  v10 = _Newnode;
  while ( !v10->_Parent->_Color )
  {
    v11 = v10->_Parent;
    v12 = v11->_Parent;
    if ( v11 == v12->_Left )
    {
      v13 = v12->_Right;
      if ( v13->_Color )
      {
        if ( v10 == v11->_Right )
        {
          v10 = v10->_Parent;
          v14 = v11->_Right;
          v10->_Right = v14->_Left;
          if ( !v14->_Left->_Isnil )
            v14->_Left->_Parent = v10;
          v14->_Parent = v10->_Parent;
          v15 = this->_Myhead;
          if ( v10 == v15->_Parent )
          {
            v15->_Parent = v14;
          }
          else
          {
            v16 = v10->_Parent;
            if ( v10 == v16->_Left )
              v16->_Left = v14;
            else
              v16->_Right = v14;
          }
          v14->_Left = v10;
          v10->_Parent = v14;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Left;
        v17->_Left = v17->_Left->_Right;
        v19 = v18->_Right;
        if ( !v19->_Isnil )
          v19->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v20 = this->_Myhead;
        if ( v17 == v20->_Parent )
        {
          v20->_Parent = v18;
          v18->_Right = v17;
        }
        else
        {
          v21 = v17->_Parent;
          if ( v17 == v21->_Right )
          {
            v21->_Right = v18;
            v18->_Right = v17;
          }
          else
          {
            v21->_Left = v18;
            v18->_Right = v17;
          }
        }
LABEL_52:
        v6 = _Newnode;
        v17->_Parent = v18;
        continue;
      }
      v11->_Color = 1;
      v13->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
    else
    {
      v22 = v12->_Left;
      if ( v22->_Color )
      {
        if ( v10 == v11->_Left )
        {
          v10 = v10->_Parent;
          v23 = v11->_Left;
          v10->_Left = v23->_Right;
          v24 = v23->_Right;
          if ( !v24->_Isnil )
            v24->_Parent = v10;
          v23->_Parent = v10->_Parent;
          v25 = this->_Myhead;
          if ( v10 == v25->_Parent )
          {
            v25->_Parent = v23;
          }
          else
          {
            v26 = v10->_Parent;
            if ( v10 == v26->_Right )
              v26->_Right = v23;
            else
              v26->_Left = v23;
          }
          v23->_Right = v10;
          v10->_Parent = v23;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Right;
        v17->_Right = v18->_Left;
        if ( !v18->_Left->_Isnil )
          v18->_Left->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v27 = this->_Myhead;
        if ( v17 == v27->_Parent )
        {
          v27->_Parent = v18;
        }
        else
        {
          v28 = v17->_Parent;
          if ( v17 == v28->_Left )
            v28->_Left = v18;
          else
            v28->_Right = v18;
        }
        v18->_Left = v17;
        goto LABEL_52;
      }
      v11->_Color = 1;
      v22->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
  }
  v29 = this->_Myhead->_Parent;
  v30 = result;
  result->_Ptr = v6;
  v29->_Color = 1;
  return v30;
}

//----- (0054A950) --------------------------------------------------------
void __cdecl std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByDefault>(MarketSearchItem **_First, MarketSearchItem **_Last, int _Ideal, MarketSearchWin::SortByDefault _Pred)
{
  MarketSearchItem **v4; // ebx@1
  MarketSearchItem **v5; // edi@1
  int v6; // eax@1
  signed int v7; // esi@2
  std::pair<MarketSearchItem * *,MarketSearchItem * *> _Mid; // [sp+Ch] [bp-8h]@4

  v4 = _First;
  v5 = _Last;
  v6 = _Last - _First;
  if ( v6 <= 32 )
    goto LABEL_8;
  v7 = _Ideal;
  while ( v7 > 0 )
  {
    std::_Unguarded_partition<MarketSearchItem * *,MarketSearchWin::SortByDefault>(&_Mid, v4, v5);
    v7 = v7 / 2 / 2 + v7 / 2;
    if ( (signed int)((unsigned int)((char *)_Mid.first - (char *)v4) & 0xFFFFFFFC) >= (signed int)(((char *)v5 - (char *)_Mid.second) & 0xFFFFFFFC) )
    {
      std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByDefault>(_Mid.second, v5, v7, _Pred);
      v5 = _Mid.first;
    }
    else
    {
      std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByDefault>(v4, _Mid.first, v7, _Pred);
      v4 = _Mid.second;
    }
    v6 = v5 - v4;
    if ( v6 <= 32 )
      goto LABEL_8;
  }
  if ( v6 <= 32 )
  {
LABEL_8:
    if ( v6 > 1 )
      std::_Insertion_sort1<MarketSearchItem * *,MarketSearchWin::SortByDefault,MarketSearchItem *>(v4, v5);
  }
  else
  {
    if ( (signed int)(((char *)v5 - (char *)v4) & 0xFFFFFFFC) > 4 )
      std::_Make_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByDefault>(v4, v5, _Pred);
    std::_Sort_heap<MarketSearchItem * *,MarketSearchWin::SortByDefault>(v4, v5);
  }
}

//----- (0054AA40) --------------------------------------------------------
void __cdecl std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByName>(MarketSearchItem **_First, MarketSearchItem **_Last, int _Ideal, MarketSearchWin::SortByName _Pred)
{
  MarketSearchItem **v4; // ebx@1
  MarketSearchItem **v5; // edi@1
  int v6; // eax@1
  signed int v7; // esi@2
  std::pair<MarketSearchItem * *,MarketSearchItem * *> _Mid; // [sp+Ch] [bp-8h]@4

  v4 = _First;
  v5 = _Last;
  v6 = _Last - _First;
  if ( v6 <= 32 )
    goto LABEL_8;
  v7 = _Ideal;
  while ( v7 > 0 )
  {
    std::_Unguarded_partition<MarketSearchItem * *,MarketSearchWin::SortByName>(&_Mid, v4, v5);
    v7 = v7 / 2 / 2 + v7 / 2;
    if ( (signed int)((unsigned int)((char *)_Mid.first - (char *)v4) & 0xFFFFFFFC) >= (signed int)(((char *)v5 - (char *)_Mid.second) & 0xFFFFFFFC) )
    {
      std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByName>(_Mid.second, v5, v7, _Pred);
      v5 = _Mid.first;
    }
    else
    {
      std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByName>(v4, _Mid.first, v7, _Pred);
      v4 = _Mid.second;
    }
    v6 = v5 - v4;
    if ( v6 <= 32 )
      goto LABEL_8;
  }
  if ( v6 <= 32 )
  {
LABEL_8:
    if ( v6 > 1 )
      std::_Insertion_sort1<MarketSearchItem * *,MarketSearchWin::SortByName,MarketSearchItem *>(v4, v5);
  }
  else
  {
    if ( (signed int)(((char *)v5 - (char *)v4) & 0xFFFFFFFC) > 4 )
      std::_Make_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByName>(v4, v5, _Pred);
    std::_Sort_heap<MarketSearchItem * *,MarketSearchWin::SortByName>(v4, v5);
  }
}

//----- (0054AB30) --------------------------------------------------------
void __cdecl std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByNameDesc>(MarketSearchItem **_First, MarketSearchItem **_Last, int _Ideal, MarketSearchWin::SortByNameDesc _Pred)
{
  MarketSearchItem **v4; // ebx@1
  MarketSearchItem **v5; // edi@1
  int v6; // eax@1
  signed int v7; // esi@2
  std::pair<MarketSearchItem * *,MarketSearchItem * *> _Mid; // [sp+Ch] [bp-8h]@4

  v4 = _First;
  v5 = _Last;
  v6 = _Last - _First;
  if ( v6 <= 32 )
    goto LABEL_8;
  v7 = _Ideal;
  while ( v7 > 0 )
  {
    std::_Unguarded_partition<MarketSearchItem * *,MarketSearchWin::SortByNameDesc>(&_Mid, v4, v5);
    v7 = v7 / 2 / 2 + v7 / 2;
    if ( (signed int)((unsigned int)((char *)_Mid.first - (char *)v4) & 0xFFFFFFFC) >= (signed int)(((char *)v5 - (char *)_Mid.second) & 0xFFFFFFFC) )
    {
      std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByNameDesc>(_Mid.second, v5, v7, _Pred);
      v5 = _Mid.first;
    }
    else
    {
      std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByNameDesc>(v4, _Mid.first, v7, _Pred);
      v4 = _Mid.second;
    }
    v6 = v5 - v4;
    if ( v6 <= 32 )
      goto LABEL_8;
  }
  if ( v6 <= 32 )
  {
LABEL_8:
    if ( v6 > 1 )
      std::_Insertion_sort1<MarketSearchItem * *,MarketSearchWin::SortByNameDesc,MarketSearchItem *>(v4, v5);
  }
  else
  {
    if ( (signed int)(((char *)v5 - (char *)v4) & 0xFFFFFFFC) > 4 )
      std::_Make_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByNameDesc>(v4, v5, _Pred);
    std::_Sort_heap<MarketSearchItem * *,MarketSearchWin::SortByNameDesc>(v4, v5);
  }
}

//----- (0054AC20) --------------------------------------------------------
void __cdecl std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByLevel>(MarketSearchItem **_First, MarketSearchItem **_Last, int _Ideal, MarketSearchWin::SortByLevel _Pred)
{
  MarketSearchItem **v4; // ebx@1
  MarketSearchItem **v5; // edi@1
  int v6; // eax@1
  signed int v7; // esi@2
  std::pair<MarketSearchItem * *,MarketSearchItem * *> _Mid; // [sp+Ch] [bp-8h]@4

  v4 = _First;
  v5 = _Last;
  v6 = _Last - _First;
  if ( v6 <= 32 )
    goto LABEL_8;
  v7 = _Ideal;
  while ( v7 > 0 )
  {
    std::_Unguarded_partition<MarketSearchItem * *,MarketSearchWin::SortByLevel>(&_Mid, v4, v5);
    v7 = v7 / 2 / 2 + v7 / 2;
    if ( (signed int)((unsigned int)((char *)_Mid.first - (char *)v4) & 0xFFFFFFFC) >= (signed int)(((char *)v5 - (char *)_Mid.second) & 0xFFFFFFFC) )
    {
      std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByLevel>(_Mid.second, v5, v7, _Pred);
      v5 = _Mid.first;
    }
    else
    {
      std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByLevel>(v4, _Mid.first, v7, _Pred);
      v4 = _Mid.second;
    }
    v6 = v5 - v4;
    if ( v6 <= 32 )
      goto LABEL_8;
  }
  if ( v6 <= 32 )
  {
LABEL_8:
    if ( v6 > 1 )
      std::_Insertion_sort1<MarketSearchItem * *,MarketSearchWin::SortByLevel,MarketSearchItem *>(v4, v5);
  }
  else
  {
    if ( (signed int)(((char *)v5 - (char *)v4) & 0xFFFFFFFC) > 4 )
      std::_Make_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByLevel>(v4, v5, _Pred);
    std::_Sort_heap<MarketSearchItem * *,MarketSearchWin::SortByLevel>(v4, v5);
  }
}

//----- (0054AD10) --------------------------------------------------------
void __cdecl std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByLevelDesc>(MarketSearchItem **_First, MarketSearchItem **_Last, int _Ideal, MarketSearchWin::SortByLevelDesc _Pred)
{
  MarketSearchItem **v4; // ebx@1
  MarketSearchItem **v5; // edi@1
  int v6; // eax@1
  signed int v7; // esi@2
  std::pair<MarketSearchItem * *,MarketSearchItem * *> _Mid; // [sp+Ch] [bp-8h]@4

  v4 = _First;
  v5 = _Last;
  v6 = _Last - _First;
  if ( v6 <= 32 )
    goto LABEL_8;
  v7 = _Ideal;
  while ( v7 > 0 )
  {
    std::_Unguarded_partition<MarketSearchItem * *,MarketSearchWin::SortByLevelDesc>(&_Mid, v4, v5);
    v7 = v7 / 2 / 2 + v7 / 2;
    if ( (signed int)((unsigned int)((char *)_Mid.first - (char *)v4) & 0xFFFFFFFC) >= (signed int)(((char *)v5 - (char *)_Mid.second) & 0xFFFFFFFC) )
    {
      std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByLevelDesc>(_Mid.second, v5, v7, _Pred);
      v5 = _Mid.first;
    }
    else
    {
      std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByLevelDesc>(v4, _Mid.first, v7, _Pred);
      v4 = _Mid.second;
    }
    v6 = v5 - v4;
    if ( v6 <= 32 )
      goto LABEL_8;
  }
  if ( v6 <= 32 )
  {
LABEL_8:
    if ( v6 > 1 )
      std::_Insertion_sort1<MarketSearchItem * *,MarketSearchWin::SortByLevelDesc,MarketSearchItem *>(v4, v5);
  }
  else
  {
    if ( (signed int)(((char *)v5 - (char *)v4) & 0xFFFFFFFC) > 4 )
      std::_Make_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByLevelDesc>(v4, v5, _Pred);
    std::_Sort_heap<MarketSearchItem * *,MarketSearchWin::SortByLevelDesc>(v4, v5);
  }
}

//----- (0054AE00) --------------------------------------------------------
void __cdecl std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByMoney>(MarketSearchItem **_First, MarketSearchItem **_Last, int _Ideal, MarketSearchWin::SortByMoney _Pred)
{
  MarketSearchItem **v4; // ebx@1
  MarketSearchItem **v5; // edi@1
  int v6; // eax@1
  signed int v7; // esi@2
  std::pair<MarketSearchItem * *,MarketSearchItem * *> _Mid; // [sp+Ch] [bp-8h]@4

  v4 = _First;
  v5 = _Last;
  v6 = _Last - _First;
  if ( v6 <= 32 )
    goto LABEL_8;
  v7 = _Ideal;
  while ( v7 > 0 )
  {
    std::_Unguarded_partition<MarketSearchItem * *,MarketSearchWin::SortByMoney>(&_Mid, v4, v5);
    v7 = v7 / 2 / 2 + v7 / 2;
    if ( (signed int)((unsigned int)((char *)_Mid.first - (char *)v4) & 0xFFFFFFFC) >= (signed int)(((char *)v5 - (char *)_Mid.second) & 0xFFFFFFFC) )
    {
      std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByMoney>(_Mid.second, v5, v7, _Pred);
      v5 = _Mid.first;
    }
    else
    {
      std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByMoney>(v4, _Mid.first, v7, _Pred);
      v4 = _Mid.second;
    }
    v6 = v5 - v4;
    if ( v6 <= 32 )
      goto LABEL_8;
  }
  if ( v6 <= 32 )
  {
LABEL_8:
    if ( v6 > 1 )
      std::_Insertion_sort1<MarketSearchItem * *,MarketSearchWin::SortByMoney,MarketSearchItem *>(v4, v5);
  }
  else
  {
    if ( (signed int)(((char *)v5 - (char *)v4) & 0xFFFFFFFC) > 4 )
      std::_Make_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByMoney>(v4, v5, _Pred);
    std::_Sort_heap<MarketSearchItem * *,MarketSearchWin::SortByMoney>(v4, v5);
  }
}

//----- (0054AEF0) --------------------------------------------------------
void __cdecl std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByMoneyDesc>(MarketSearchItem **_First, MarketSearchItem **_Last, int _Ideal, MarketSearchWin::SortByMoneyDesc _Pred)
{
  MarketSearchItem **v4; // ebx@1
  MarketSearchItem **v5; // edi@1
  int v6; // eax@1
  signed int v7; // esi@2
  std::pair<MarketSearchItem * *,MarketSearchItem * *> _Mid; // [sp+Ch] [bp-8h]@4

  v4 = _First;
  v5 = _Last;
  v6 = _Last - _First;
  if ( v6 <= 32 )
    goto LABEL_8;
  v7 = _Ideal;
  while ( v7 > 0 )
  {
    std::_Unguarded_partition<MarketSearchItem * *,MarketSearchWin::SortByMoneyDesc>(&_Mid, v4, v5);
    v7 = v7 / 2 / 2 + v7 / 2;
    if ( (signed int)((unsigned int)((char *)_Mid.first - (char *)v4) & 0xFFFFFFFC) >= (signed int)(((char *)v5 - (char *)_Mid.second) & 0xFFFFFFFC) )
    {
      std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByMoneyDesc>(_Mid.second, v5, v7, _Pred);
      v5 = _Mid.first;
    }
    else
    {
      std::_Sort<MarketSearchItem * *,int,MarketSearchWin::SortByMoneyDesc>(v4, _Mid.first, v7, _Pred);
      v4 = _Mid.second;
    }
    v6 = v5 - v4;
    if ( v6 <= 32 )
      goto LABEL_8;
  }
  if ( v6 <= 32 )
  {
LABEL_8:
    if ( v6 > 1 )
      std::_Insertion_sort1<MarketSearchItem * *,MarketSearchWin::SortByMoneyDesc,MarketSearchItem *>(v4, v5);
  }
  else
  {
    if ( (signed int)(((char *)v5 - (char *)v4) & 0xFFFFFFFC) > 4 )
      std::_Make_heap<MarketSearchItem * *,int,MarketSearchItem *,MarketSearchWin::SortByMoneyDesc>(v4, v5, _Pred);
    std::_Sort_heap<MarketSearchItem * *,MarketSearchWin::SortByMoneyDesc>(v4, v5);
  }
}

//----- (0054AFE0) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Node, bool _Leftish)
{
  std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *v4; // edx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v5; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v6; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v7; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v8; // edi@1
  bool v9; // cl@1
  unsigned int v10; // ebx@2
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v11; // ebx@10
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v12; // edx@12
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > >,bool> *v13; // eax@12
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v14; // ecx@15
  std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *v15; // [sp+Ch] [bp-4h]@1
  bool _Addleft; // [sp+1Ch] [bp+Ch]@1

  v4 = this;
  v5 = this->_Myhead;
  v6 = v5->_Parent;
  v7 = v5;
  v8 = _Node;
  v9 = 1;
  v15 = v4;
  _Addleft = 1;
  if ( !v6->_Isnil )
  {
    v10 = v8->_Myval.first;
    do
    {
      v7 = v6;
      if ( _Leftish )
        v9 = v6->_Myval.first >= v10;
      else
        v9 = v10 < v6->_Myval.first;
      _Addleft = v9;
      if ( v9 )
        v6 = v6->_Left;
      else
        v6 = v6->_Right;
    }
    while ( !v6->_Isnil );
  }
  v11 = v7;
  *(_DWORD *)&_Leftish = v7;
  if ( v9 )
  {
    if ( v7 == v4->_Myhead->_Left )
    {
      v12 = std::_Tree<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Insert(
              v4,
              (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *)&_Leftish,
              1,
              v7,
              v8)->_Ptr;
      v13 = result;
      result->first._Ptr = v12;
      result->second = 1;
      return v13;
    }
    std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,bool,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,bool>>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >,std::_Iterator_base0> *)&_Leftish);
    v11 = (std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)_Leftish;
    v4 = v15;
  }
  if ( v11->_Myval.first >= v8->_Myval.first )
  {
    if ( v8->_Myval.second._Myres >= 0x10 )
      operator delete(v8->_Myval.second._Bx._Ptr);
    v8->_Myval.second._Myres = 15;
    v8->_Myval.second._Mysize = 0;
    v8->_Myval.second._Bx._Buf[0] = 0;
    operator delete(v8);
    v13 = result;
    result->first._Ptr = v11;
    result->second = 0;
  }
  else
  {
    v14 = std::_Tree<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Insert(
            v4,
            (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *)&_Leftish,
            _Addleft,
            v7,
            v8)->_Ptr;
    v13 = result;
    result->first._Ptr = v14;
    result->second = 1;
  }
  return v13;
}

//----- (0054B0E0) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned int> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>(std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned int> >,0> > *this, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned int> *_Val)
{
  std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned int> >,0> > *v2; // esi@1
  void *v3; // edi@1
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned int> *v4; // ebx@3
  int v6; // [sp+0h] [bp-38h]@1
  std::exception pExceptionObject; // [sp+10h] [bp-28h]@5
  char *v8; // [sp+1Ch] [bp-1Ch]@2
  char *v9; // [sp+20h] [bp-18h]@2
  void *p; // [sp+24h] [bp-14h]@1
  int *v11; // [sp+28h] [bp-10h]@1
  int v12; // [sp+34h] [bp-4h]@2

  v11 = &v6;
  v2 = this;
  v3 = operator new(0x30u);
  p = v3;
  if ( !v3 )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  *(_DWORD *)v3 = v2->_Myhead;
  *((_DWORD *)v3 + 1) = v2->_Myhead;
  *((_DWORD *)v3 + 2) = v2->_Myhead;
  *((_WORD *)v3 + 22) = 0;
  v12 = 0;
  v9 = (char *)v3 + 12;
  v8 = (char *)v3 + 12;
  LOBYTE(v12) = 1;
  if ( v3 != (void *)-12 )
  {
    v4 = _Val;
    *((_DWORD *)v3 + 8) = 15;
    *((_DWORD *)v3 + 7) = 0;
    *((_BYTE *)v3 + 12) = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)v3 + 12),
      &v4->first,
      0,
      0xFFFFFFFF);
    *((_DWORD *)v3 + 10) = v4->second;
  }
  return (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned int> >,0> >::_Node *)v3;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0054B1C0) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Buynode<std::pair<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char>>> &>(std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::pair<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > *_Val)
{
  std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *v2; // edi@1
  void *v3; // eax@1
  void *v4; // esi@1
  unsigned int *v5; // eax@2
  std::pair<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > *v6; // edx@3
  int v7; // ecx@3
  int v9; // [sp+0h] [bp-38h]@1
  std::exception pExceptionObject; // [sp+10h] [bp-28h]@5
  char *v11; // [sp+1Ch] [bp-1Ch]@2
  char *v12; // [sp+20h] [bp-18h]@2
  void *p; // [sp+24h] [bp-14h]@1
  int *v14; // [sp+28h] [bp-10h]@1
  int v15; // [sp+34h] [bp-4h]@2

  v14 = &v9;
  v2 = this;
  v3 = operator new(0x30u);
  v4 = v3;
  p = v3;
  if ( !v3 )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  *(_DWORD *)v3 = v2->_Myhead;
  *((_DWORD *)v3 + 1) = v2->_Myhead;
  v5 = (unsigned int *)((char *)v3 + 12);
  *((_DWORD *)v4 + 2) = v2->_Myhead;
  *((_WORD *)v4 + 22) = 0;
  v15 = 0;
  v12 = (char *)v4 + 12;
  v11 = (char *)v4 + 12;
  LOBYTE(v15) = 1;
  if ( v4 != (void *)-12 )
  {
    v6 = _Val;
    *v5 = _Val->first;
    v7 = (int)v4 + 16;
    *(_DWORD *)(v7 + 20) = 15;
    *(_DWORD *)(v7 + 16) = 0;
    *(_BYTE *)v7 = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)v4 + 16),
      &v6->second,
      0,
      0xFFFFFFFF);
  }
  return (std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)v4;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0054B2A0) --------------------------------------------------------
char __thiscall SLWCreateInfo::Item::AddWin(SLWCreateInfo::Item *this, char *pcNodeName, SLWCreateInfo::SprDataType eType)
{
  SLWCreateInfo::Item *v3; // edi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v4; // eax@4
  char v5; // al@7
  SLWCreateInfo::Item *v6; // esi@10
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v7; // eax@10
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > >,bool> result; // [sp+10h] [bp-78h]@4
  SLWCreateInfo::Item *v9; // [sp+18h] [bp-70h]@1
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,enum SLWCreateInfo::SprDataType> addEle; // [sp+1Ch] [bp-6Ch]@2
  std::pair<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > addOrderEle; // [sp+3Ch] [bp-4Ch]@8
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Right; // [sp+5Ch] [bp-2Ch]@2
  int v13; // [sp+84h] [bp-4h]@2

  v3 = this;
  v9 = this;
  if ( !pcNodeName )
    return 0;
  addEle.first._Myres = 15;
  addEle.first._Mysize = 0;
  addEle.first._Bx._Buf[0] = 0;
  addEle.second = 0;
  _Right._Myres = 15;
  v13 = 0;
  _Right._Mysize = 0;
  _Right._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Right, pcNodeName, strlen(pcNodeName));
  LOBYTE(v13) = 1;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&addEle.first, &_Right);
  LOBYTE(v13) = 0;
  if ( _Right._Myres >= 0x10 )
    operator delete(_Right._Bx._Ptr);
  addEle.second = eType;
  v4 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>((std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned int> >,0> > *)&v3->mapSprDataWinState, (std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned int> *)&addEle);
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > *)&v3->mapSprDataWinState,
    &result,
    v4,
    0);
  if ( !result.second )
  {
    if ( addEle.first._Myres >= 0x10 )
      operator delete(addEle.first._Bx._Ptr);
    return 0;
  }
  addOrderEle.second._Myres = 15;
  addOrderEle.second._Mysize = 0;
  addOrderEle.second._Bx._Buf[0] = 0;
  addOrderEle.first = v9->mapSprDataWinState._Mysize - 1;
  LOBYTE(v13) = 2;
  _Right._Myres = 15;
  _Right._Mysize = 0;
  _Right._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Right, pcNodeName, strlen(pcNodeName));
  LOBYTE(v13) = 3;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&addOrderEle.second, &_Right);
  LOBYTE(v13) = 2;
  if ( _Right._Myres >= 0x10 )
    operator delete(_Right._Bx._Ptr);
  v6 = v9;
  v7 = std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Buynode<std::pair<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char>>> &>(
         (std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *)&v9->mapSprDataWinStateOrder.comp,
         &addOrderEle);
  std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *)&v6->mapSprDataWinStateOrder.comp,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > >,bool> *)&result,
    v7,
    0);
  if ( result.second )
  {
    if ( addOrderEle.second._Myres >= 0x10 )
      operator delete(addOrderEle.second._Bx._Ptr);
    addOrderEle.second._Myres = 15;
    addOrderEle.second._Mysize = 0;
    addOrderEle.second._Bx._Buf[0] = 0;
    if ( addEle.first._Myres >= 0x10 )
      operator delete(addEle.first._Bx._Ptr);
    v5 = 1;
  }
  else
  {
    if ( addOrderEle.second._Myres >= 0x10 )
      operator delete(addOrderEle.second._Bx._Ptr);
    addOrderEle.second._Myres = 15;
    addOrderEle.second._Mysize = 0;
    addOrderEle.second._Bx._Buf[0] = 0;
    if ( addEle.first._Myres < 0x10 )
      return 0;
    operator delete(addEle.first._Bx._Ptr);
    v5 = 0;
  }
  return v5;
}

//----- (0054B490) --------------------------------------------------------
void __thiscall MiniHouseInvWin::SetInvType(MiniHouseInvWin *this, unsigned int uiInvType)
{
  this->m_uiInvType = uiInvType;
}

//----- (0054B4A0) --------------------------------------------------------
void __thiscall MiniHouseInvWin::SetActive(MiniHouseInvWin *this, bool bActive)
{
  this->m_bActive = bActive;
}

//----- (0054B4B0) --------------------------------------------------------
bool __thiscall MiniHouseInvWin::GetActive(MiniHouseInvWin *this)
{
  return this->m_bActive;
}

//----- (0054B4C0) --------------------------------------------------------
bool __thiscall MiniHouseInvWin::IsLock(MiniHouseInvWin *this)
{
  return this->m_bLock;
}

//----- (0054B4D0) --------------------------------------------------------
void __thiscall MiniHouseInvTabButWin::MiniHouseInvTabButWin(MiniHouseInvTabButWin *this)
{
  MiniHouseInvTabButWin *v1; // esi@1

  v1 = this;
  PgWinBut::PgWinBut((PgWinBut *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&MiniHouseInvTabButWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MiniHouseInvTabButWin::`vftable'{for `IDirectMessenger'};
  v1->m_bDroppable = 1;
}
// 99502C: using guessed type void (__thiscall *MiniHouseInvTabButWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99504C: using guessed type int (__thiscall *MiniHouseInvTabButWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054B500) --------------------------------------------------------
void __thiscall MiniHouseInvTabButWin::~MiniHouseInvTabButWin(MiniHouseInvTabButWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&MiniHouseInvTabButWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MiniHouseInvTabButWin::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
}
// 99502C: using guessed type void (__thiscall *MiniHouseInvTabButWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99504C: using guessed type int (__thiscall *MiniHouseInvTabButWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054B520) --------------------------------------------------------
bool __thiscall MiniHouseInvTabButWin::Create(MiniHouseInvTabButWin *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg)
{
  return PgWinBut::Create((PgWinBut *)&this->vfptr, iXPos, iYPos, pkSprData, pkParent, uiCmdMsg, 0, 0) != 0;
}

//----- (0054B640) --------------------------------------------------------
void __thiscall MiniHouseInventoryWin::OnActivePage(MiniHouseInventoryWin *this, unsigned int uiIndex)
{
  MiniHouseInventoryWin *v2; // ebx@1
  char *v3; // esi@2
  signed int v4; // edi@2
  unsigned int v5; // esi@5
  signed int v6; // edi@5

  v2 = this;
  if ( uiIndex < 1 )
  {
    v3 = (char *)this->m_apkMiniHouseInvWin;
    v4 = 24;
    do
    {
      *(_BYTE *)(*(_DWORD *)v3 + 456) = 0;
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 324))(0.0);
      v3 += 4;
      --v4;
    }
    while ( v4 );
    v2->m_iActivePage = uiIndex;
    if ( 24 * uiIndex < 24 * uiIndex + 24 )
    {
      v5 = (unsigned int)&v2->m_apkMiniHouseInvWin[24 * uiIndex];
      v6 = 24;
      do
      {
        *(_BYTE *)(*(_DWORD *)v5 + 456) = 1;
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v5 + 324))(0.0);
        v5 += 4;
        --v6;
      }
      while ( v6 );
    }
  }
}

//----- (0054B700) --------------------------------------------------------
void MiniHouseInventoryWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "MinihouseInv");
}

//----- (0054B730) --------------------------------------------------------
void __thiscall MiniHouseInvWin::~MiniHouseInvWin(MiniHouseInvWin *this)
{
  MiniHouseInvWin *v1; // esi@1
  NiTexturingProperty *v2; // edi@1
  NiScreenElements *v3; // edi@5

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&MiniHouseInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MiniHouseInvWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spSubImageTexProp.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_spSubImagePlane.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  ItemIcon::~ItemIcon((ItemIcon *)&v1->vfptr);
}
// 995284: using guessed type void (__thiscall *MiniHouseInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9952A4: using guessed type int (__thiscall *MiniHouseInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054B7E0) --------------------------------------------------------
char __thiscall MiniHouseInvTabButWin::EatDropInstance(MiniHouseInvTabButWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  PgCursor::ms_bKeepDrop = 1;
  ((void (*)(void))this->vfptr[132].__vecDelDtor)();
  return 1;
}
// B648B8: using guessed type bool PgCursor::ms_bKeepDrop;

//----- (0054B800) --------------------------------------------------------
void __thiscall MiniHouseInventoryWin::MiniHouseInventoryWin(MiniHouseInventoryWin *this)
{
  MiniHouseInventoryWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&MiniHouseInventoryWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MiniHouseInventoryWin::`vftable'{for `IDirectMessenger'};
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  v1->m_kDrop.m_pkSender = 0;
  v1->m_kDropContents.m_uiLot = 0;
  v1->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v1->m_kDropContents.m_kItemID = -1;
  v1->m_kDrop.m_pkContents = &v1->m_kDropContents;
  v1->m_apkMiniHouseInvWin[0] = 0;
  v1->m_apkMiniHouseInvWin[1] = 0;
  v1->m_apkMiniHouseInvWin[2] = 0;
  v1->m_apkMiniHouseInvWin[3] = 0;
  v1->m_apkMiniHouseInvWin[4] = 0;
  v1->m_apkMiniHouseInvWin[5] = 0;
  v1->m_apkMiniHouseInvWin[6] = 0;
  v1->m_apkMiniHouseInvWin[7] = 0;
  v1->m_apkMiniHouseInvWin[8] = 0;
  v1->m_apkMiniHouseInvWin[9] = 0;
  v1->m_apkMiniHouseInvWin[10] = 0;
  v1->m_apkMiniHouseInvWin[11] = 0;
  v1->m_apkMiniHouseInvWin[12] = 0;
  v1->m_apkMiniHouseInvWin[13] = 0;
  v1->m_apkMiniHouseInvWin[14] = 0;
  v1->m_apkMiniHouseInvWin[15] = 0;
  v1->m_apkMiniHouseInvWin[16] = 0;
  v1->m_apkMiniHouseInvWin[17] = 0;
  v1->m_apkMiniHouseInvWin[18] = 0;
  v1->m_apkMiniHouseInvWin[19] = 0;
  v1->m_apkMiniHouseInvWin[20] = 0;
  v1->m_apkMiniHouseInvWin[21] = 0;
  v1->m_apkMiniHouseInvWin[22] = 0;
  v1->m_apkMiniHouseInvWin[23] = 0;
  v1->m_apkEquipWin[0] = 0;
  v1->m_apkEquipWin[1] = 0;
  v1->m_apkEquipWin[2] = 0;
  v1->m_apkEquipWin[3] = 0;
  v1->m_apkEquipWin[4] = 0;
  v1->m_apkEquipWin[5] = 0;
  v1->m_apkEquipWin[6] = 0;
  v1->m_apkEquipWin[7] = 0;
  v1->m_apkEquipWin[8] = 0;
  v1->m_apkEquipWin[9] = 0;
  v1->m_apkEquipWin[10] = 0;
  v1->m_iActivePage = 0;
  v1->m_PreEquipSkinItemID = -1;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 995514: using guessed type void (__thiscall *MiniHouseInventoryWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 995534: using guessed type int (__thiscall *MiniHouseInventoryWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054B940) --------------------------------------------------------
void __thiscall MiniHouseInventoryWin::~MiniHouseInventoryWin(MiniHouseInventoryWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&MiniHouseInventoryWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MiniHouseInventoryWin::`vftable'{for `IDirectMessenger'};
  this->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  this->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 995514: using guessed type void (__thiscall *MiniHouseInventoryWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 995534: using guessed type int (__thiscall *MiniHouseInventoryWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054B970) --------------------------------------------------------
void __thiscall MiniHouseInventoryWin::OnInvLClickNormalMode(MiniHouseInventoryWin *this, unsigned int uiInvIndex)
{
  MiniHouseInventoryWin *v2; // esi@1
  MiniHouseInvWin *v3; // ecx@1
  Item *v4; // eax@2

  v2 = this;
  v3 = this->m_apkMiniHouseInvWin[uiInvIndex];
  if ( !v3->m_bLock )
  {
    v4 = ItemIcon::GetItem((ItemIcon *)&v3->vfptr);
    if ( v4 )
    {
      v2->m_kDropContents.m_eSenderType = 10;
      v2->m_kDropContents.m_eType = 0;
      v2->m_kDropContents.m_apvParam[0] = v4;
      v2->m_kDropContents.m_apvParam[1] = 0;
      v2->m_kDropContents.m_uiSenderIndex = uiInvIndex;
      v2->m_kDropContents.m_uiLot = ((int (__thiscall *)(_DWORD))v4->vfptr[3].__vecDelDtor)(v4);
      v2->m_kDrop.m_pkSender = (PgWin *)v2;
      PgCursor::ms_pkDrop = &v2->m_kDrop;
    }
  }
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (0054B9F0) --------------------------------------------------------
void __thiscall MiniHouseInventoryWin::OnInvLClickShopMode(MiniHouseInventoryWin *this, unsigned int uiInvIndex)
{
  MiniHouseInventoryWin::OnInvLClickNormalMode(this, uiInvIndex);
}

//----- (0054BA00) --------------------------------------------------------
char __thiscall MiniHouseInventoryWin::DropOnInv(MiniHouseInventoryWin *this, DropContents *pkContents, unsigned int uiReceiverInvIndex)
{
  DropContents::SenderType v3; // esi@1
  MiniHouseInventoryWin *v4; // ebx@1
  char result; // al@3
  unsigned int v6; // edi@4
  void *v7; // eax@4
  InventoryWin *v8; // ecx@6

  v3 = pkContents->m_eSenderType;
  v4 = this;
  if ( v3 && v3 != 10 )
  {
    result = 0;
  }
  else
  {
    v6 = pkContents->m_uiSenderIndex;
    v7 = pkContents->m_apvParam[0];
    if ( v7 )
    {
      if ( (unsigned __int8)(*(int (__thiscall **)(void *))(*(_DWORD *)v7 + 4))(v7) == 18 )
      {
        v8 = (InventoryWin *)v4->m_pkFrameWork[19].m_BackFrameID;
        if ( v8 )
        {
          if ( v3 == ST_INV_CHAR )
            InventoryWin::OnInvRClick(v8, v6, 1u);
        }
      }
    }
    result = 1;
  }
  return result;
}

//----- (0054BA60) --------------------------------------------------------
void __thiscall MiniHouseInventoryWin::SetDefaultHouse(MiniHouseInventoryWin *this)
{
  MiniHouseInventoryWin *v1; // edi@1
  signed int v2; // ebx@1
  ItemIcon **v3; // esi@1
  ItemInfo *v4; // eax@3

  v1 = this;
  v2 = 0;
  v3 = (ItemIcon **)this->m_apkMiniHouseInvWin;
  do
  {
    if ( ItemIcon::GetItem(*v3) )
    {
      v4 = ItemIcon::GetItem(*v3)->m_pkInfo;
      if ( v4 )
      {
        if ( !_strcmpi("House_MushRoom", v4->InxName) )
          GameFrameWork::NcMiniHouseActivReq((GameFrameWork *)v1->m_pkFrameWork, v2 + 11);
      }
    }
    ++v2;
    ++v3;
  }
  while ( v2 < 24 );
}

//----- (0054BAC0) --------------------------------------------------------
void __thiscall MiniHouseInvWin::MiniHouseInvWin(MiniHouseInvWin *this)
{
  MiniHouseInvWin *v1; // esi@1

  v1 = this;
  ItemIcon::ItemIcon((ItemIcon *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&MiniHouseInvWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MiniHouseInvWin::`vftable'{for `IDirectMessenger'};
  v1->m_spSubImagePlane.m_pObject = 0;
  v1->m_spSubImageTexProp.m_pObject = 0;
  v1->m_pkLotText = 0;
  v1->m_uiInvIndex = -1;
  v1->m_uiInvType = 9;
  ItemIcon::SetItem((ItemIcon *)&v1->vfptr, 0, 1);
  *(_WORD *)&v1->m_bActive = 0;
}
// 995284: using guessed type void (__thiscall *MiniHouseInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9952A4: using guessed type int (__thiscall *MiniHouseInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054BB60) --------------------------------------------------------
void __thiscall MiniHouseInvWin::UpdateMeWin(MiniHouseInvWin *this, float fCurTime)
{
  MiniHouseInvWin *v2; // esi@1
  unsigned int v3; // eax@1
  Item *v4; // edi@2
  void *(__thiscall *v5)(NiRefObject *, unsigned int); // eax@7

  v2 = this;
  v3 = this->m_uiInvType;
  if ( v3 == 9 )
  {
    v4 = g_kInventory.m_aspMiniHouseInv[this->m_uiInvIndex].m_pObject;
  }
  else
  {
    if ( v3 != 8 )
      goto LABEL_7;
    v4 = g_kInventory.m_aspMiniHouseEquip[this->m_uiInvIndex].m_pObject;
  }
  if ( v4 != ItemIcon::GetItem((ItemIcon *)&this->vfptr) )
    ItemIcon::SetItem((ItemIcon *)&v2->vfptr, v4, 1);
LABEL_7:
  v5 = v2->vfptr[64].__vecDelDtor;
  if ( v2->m_bActive )
  {
    v5((NiRefObject *)&v2->vfptr, 1u);
    v2->m_bDroppable = 1;
    if ( !ItemIcon::GetItem((ItemIcon *)&v2->vfptr) )
      v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 0);
    IconWin::UpdateMeWin((IconWin *)&v2->vfptr, fCurTime);
  }
  else
  {
    v5((NiRefObject *)&v2->vfptr, 0);
    v2->m_bDroppable = 0;
  }
}

//----- (0054BC10) --------------------------------------------------------
void __thiscall MiniHouseInvWin::DoAction(MiniHouseInvWin *this)
{
  MiniHouseInvWin *v1; // esi@1
  PgWin *v2; // eax@2

  v1 = this;
  if ( !this->m_bLock )
  {
    v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
    if ( v2 )
      PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiInvIndex);
  }
}

//----- (0054BC40) --------------------------------------------------------
void __thiscall MiniHouseInvWin::DoRAction(MiniHouseInvWin *this)
{
  MiniHouseInvWin *v1; // esi@1
  PgWin *v2; // eax@2

  v1 = this;
  if ( !this->m_bLock )
  {
    v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
    if ( v2 )
      PgWin::PostCommandMsg(v2, v1->m_uiRCmdMsg, v1->m_uiInvIndex);
  }
}

//----- (0054BC70) --------------------------------------------------------
void __thiscall MiniHouseInvWin::OnFirstHitWin(MiniHouseInvWin *this)
{
  MiniHouseInvWin *v1; // esi@1
  Item *v2; // edi@1
  ItemInfoWin *v3; // ecx@4

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->vfptr[81].__vecDelDtor)(0.0);
  v2 = ItemIcon::GetItem((ItemIcon *)&v1->vfptr);
  if ( v2 && !v1->m_bLock && PgWin::GetParentWin((PgWin *)&v1->vfptr) )
  {
    v3 = (ItemInfoWin *)v1->m_pkToolTipWin;
    if ( v3 )
    {
      ItemInfoWin::SetItemInfo(v3, v2);
      PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
    }
  }
}

//----- (0054BCD0) --------------------------------------------------------
void __thiscall MiniHouseInventoryWin::UpdateMeWin(MiniHouseInventoryWin *this, float fCurTime)
{
  MiniHouseInventoryWin *v2; // esi@1
  Item *v3; // eax@1
  unsigned __int16 v4; // cx@2
  ItemViewInfo *v5; // eax@3
  MiniHouse *v6; // eax@4
  int v7; // ST10_4@5
  char *v8; // eax@5
  NiSourceTexture *v9; // eax@5
  char acFileName[260]; // [sp+4h] [bp-108h]@5

  v2 = this;
  v3 = ItemIcon::GetItem((ItemIcon *)&this->m_apkEquipWin[0]->vfptr);
  if ( v3 )
  {
    v4 = v3->m_kStruct.itemid;
    if ( v2->m_PreEquipSkinItemID != v4 )
    {
      v2->m_PreEquipSkinItemID = v4;
      v5 = v3->m_pkViewInfo;
      if ( v5 )
      {
        v6 = MiniHouseTable::GetByInxName(v5->InxName);
        if ( v6 )
        {
          v7 = (int)v6->Backimage;
          v8 = Folder::Menu();
          sprintf(acFileName, "%sgame\\MiniHouse\\%s.dds", v8, v7);
          v9 = PgUtil::LoadSourceTexture(acFileName);
          if ( v9 )
            PgSpr::SetTexture(v2->m_pkMiniHouseSprWin->m_spSpr.m_pObject, (NiTexture *)&v9->vfptr);
        }
      }
    }
  }
}

//----- (0054BD80) --------------------------------------------------------
bool __thiscall MiniHouseInventoryWin::Change(MiniHouseInventoryWin *this, unsigned int uiInvType, Item *pkItem, unsigned int uiInvIndex)
{
  MiniHouseInventoryWin *v4; // esi@1
  ItemIcon *v5; // ecx@2
  MiniHouseInvWin *v7; // ecx@4

  v4 = this;
  if ( uiInvIndex <= 0xA )
  {
    v7 = this->m_apkEquipWin[uiInvIndex];
    if ( v7 )
      ItemIcon::SetItem((ItemIcon *)&v7->vfptr, pkItem, 1);
    if ( !ItemIcon::GetItem((ItemIcon *)&v4->m_apkEquipWin[uiInvIndex]->vfptr) )
      MiniHouseInventoryWin::SetDefaultHouse(v4);
  }
  else
  {
    v5 = (ItemIcon *)*(&this->m_iDragOffY + uiInvIndex);
    if ( v5 )
    {
      ItemIcon::SetItem(v5, pkItem, 1);
      return 0;
    }
  }
  return 0;
}

//----- (0054BDF0) --------------------------------------------------------
void __thiscall MiniHouseInventoryWin::OnInvLClick(MiniHouseInventoryWin *this, unsigned int uiInvIndex)
{
  MiniHouseInventoryWin::OnInvLClickNormalMode(this, uiInvIndex);
}

//----- (0054BE00) --------------------------------------------------------
void __thiscall MiniHouseInventoryWin::OnInvShiftRClickNormalMode(MiniHouseInventoryWin *this, unsigned int uiInvIndex)
{
  MiniHouseInventoryWin *v2; // esi@1
  char *v3; // esi@2
  NiUnsharedGeometryGroup *v4; // edi@2

  v2 = this;
  if ( PrivateStoreWin::ms_bPrivateStoreWin )
  {
    v3 = (char *)&this->vfptr;
    v4 = TextData::Get(0x122CF41Au);
    if ( *((_DWORD *)v3 + 1) )
    {
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v3 + 1) + 4))(25, v4, v3);
      if ( *((_DWORD *)v3 + 1) )
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v3 + 1) + 20))(25, v4, v3);
    }
    (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v3 + 20))(v3, 25, v4, v3);
  }
  else if ( ItemIcon::GetItem((ItemIcon *)&this->m_apkMiniHouseInvWin[uiInvIndex]->vfptr) )
  {
    GameFrameWork::NcMiniHouseActivReq((GameFrameWork *)v2->m_pkFrameWork, uiInvIndex + 11);
  }
}
// A8D482: using guessed type bool PrivateStoreWin::ms_bPrivateStoreWin;

//----- (0054BE90) --------------------------------------------------------
char __thiscall MiniHouseInventoryWin::GetSkin(MiniHouseInventoryWin *this)
{
  Item *v1; // eax@1
  ItemViewInfo *v2; // eax@2
  char *v3; // eax@3
  char result; // al@4

  v1 = ItemIcon::GetItem((ItemIcon *)&this->m_apkEquipWin[0]->vfptr);
  if ( v1 && (v2 = v1->m_pkViewInfo) != 0 && (v3 = (char *)MiniHouseTable::GetByInxName(v2->InxName)) != 0 )
    result = *v3;
  else
    result = 0;
  return result;
}

//----- (0054BEC0) --------------------------------------------------------
void __thiscall MiniHouseInvWin::SetLock(MiniHouseInvWin *this, bool bLock)
{
  MiniHouseInvWin *v2; // ebx@1
  NiProperty *v3; // edi@2
  NiObjectNET *v4; // eax@3
  NiObjectNET *v5; // esi@3
  NiProperty *v6; // esi@7
  NiMaterialProperty *v7; // eax@8
  NiProperty *v8; // eax@9
  double v9; // st7@13
  NiTimeController *kColor; // ST14_4@15
  NiExtraData **kColor_4; // ST18_4@15
  unsigned int kColor_8; // ST1C_4@15

  v2 = this;
  if ( this->m_bLock != bLock )
  {
    v3 = NiAVObject::GetProperty((NiAVObject *)&this->vfptr, 9);
    if ( !v3 )
    {
      v4 = (NiObjectNET *)operator new(0x28u);
      v5 = v4;
      if ( v4 )
      {
        NiObjectNET::NiObjectNET(v4);
        v5->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
        LOWORD(v5[1].vfptr) = 0;
        v5[1].m_uiRefCount = 0;
        v5[1].m_pcName = (char *)1;
      }
      else
      {
        v5 = 0;
      }
      v3 = (NiProperty *)v5;
      NiAVObject::AttachProperty((NiAVObject *)&v2->vfptr, (NiProperty *)v5);
    }
    v6 = NiAVObject::GetProperty((NiAVObject *)&v2->vfptr, 3);
    if ( !v6 )
    {
      v7 = (NiMaterialProperty *)operator new(0x60u);
      if ( v7 )
        NiMaterialProperty::NiMaterialProperty(v7);
      else
        v8 = 0;
      v6 = v8;
      NiAVObject::AttachProperty((NiAVObject *)&v2->vfptr, v8);
    }
    v2->m_bLock = bLock;
    v3[1].m_uiRefCount = 0;
    v3[1].m_pcName = 0;
    ++v6[3].m_uiRefCount;
    if ( bLock )
      v9 = 0.40000001;
    else
      v9 = 1.0;
    *(float *)&kColor = v9;
    *(float *)&kColor_4 = v9;
    v6[2].m_spControllers.m_pObject = kColor;
    *(float *)&kColor_8 = v9;
    v6[2].m_ppkExtra = kColor_4;
    v6[2].m_uiExtraDataSize = kColor_8;
    NiAVObject::UpdateProperties((NiAVObject *)&v2->vfptr);
  }
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);

//----- (0054BFF0) --------------------------------------------------------
void __thiscall MiniHouseInventoryWin::OnInvRClick(MiniHouseInventoryWin *this, unsigned int uiInvIndex)
{
  MiniHouseInventoryWin::OnInvShiftRClickNormalMode(this, uiInvIndex);
}

//----- (0054C000) --------------------------------------------------------
char __thiscall MiniHouseInventoryWin::DropOnEquip(MiniHouseInventoryWin *this, DropContents *pkContents, unsigned int uiReceiverInvIndex)
{
  DropContents::SenderType v3; // esi@1
  MiniHouseInventoryWin *v4; // ebx@1
  unsigned int v6; // edi@4
  void *v7; // ecx@5
  InventoryWin *v8; // ecx@7
  NiUnsharedGeometryGroup *v9; // edi@13
  int v10; // eax@18

  v3 = pkContents->m_eSenderType;
  v4 = this;
  if ( v3 && v3 != 10 )
    return 0;
  v6 = pkContents->m_uiSenderIndex;
  if ( v6 >= 0xC0 )
    return 0;
  v7 = pkContents->m_apvParam[0];
  if ( v7 )
  {
    if ( (unsigned __int8)(*(int (**)(void))(*(_DWORD *)v7 + 4))() == 18 )
    {
      v8 = (InventoryWin *)v4->m_pkFrameWork[19].m_BackFrameID;
      if ( v8 )
      {
        if ( !uiReceiverInvIndex )
        {
          if ( v3 == ST_INV_CHAR )
          {
            InventoryWin::OnInvRClick(v8, v6, 1u);
            return 1;
          }
          if ( v3 == 10 )
          {
            if ( PrivateStoreWin::ms_bPrivateStoreWin )
            {
              v9 = TextData::Get(0x122CF41Au);
              if ( v4->m_pkMsgHooker )
              {
                ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v4->m_pkMsgHooker->vfptr->SendDirectMessage)(
                  25,
                  v9,
                  &v4->vfptr);
                if ( v4->m_pkMsgHooker )
                  ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v4->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                    25,
                    v9,
                    &v4->vfptr);
              }
              v4->vfptr->DirectDispatchToParent((IDirectMessenger *)&v4->vfptr, 25, v9, (IDirectMessenger *)&v4->vfptr);
              return 0;
            }
            v10 = g_pkMainChar->m_byMode;
            if ( v10 != 5 && v10 != 4 )
              MiniHouseInventoryWin::OnInvShiftRClickNormalMode(v4, v6);
          }
        }
      }
    }
  }
  return 1;
}
// A8D482: using guessed type bool PrivateStoreWin::ms_bPrivateStoreWin;

//----- (0054C110) --------------------------------------------------------
void __thiscall MiniHouseInventoryWin::LockAllItem(MiniHouseInventoryWin *this)
{
  char *v1; // ecx@1
  int v2; // edi@2
  NiProperty *v3; // ebx@3
  NiRoom *v4; // eax@4
  NiRoom *v5; // esi@4
  NiProperty *v6; // esi@12
  NiRoom *v7; // eax@13
  NiProperty *v8; // eax@14
  bool v9; // zf@22
  NiPointer<NiRoom> element; // [sp+1Ch] [bp-18h]@4
  int v11; // [sp+20h] [bp-14h]@1
  char *v12; // [sp+24h] [bp-10h]@1
  int v13; // [sp+30h] [bp-4h]@4

  v1 = (char *)this->m_apkMiniHouseInvWin;
  v12 = v1;
  v11 = 24;
  do
  {
    v2 = *(_DWORD *)v1;
    if ( *(_BYTE *)(*(_DWORD *)v1 + 457) != 1 )
    {
      v3 = NiAVObject::GetProperty((NiAVObject *)v2, 9);
      if ( !v3 )
      {
        v4 = (NiRoom *)operator new(0x28u);
        v5 = v4;
        element.m_pObject = v4;
        v13 = 0;
        if ( v4 )
        {
          NiObjectNET::NiObjectNET((NiObjectNET *)&v4->vfptr);
          v5->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
          v5->m_uFlags = 0;
          v5->m_pkParent = 0;
          LODWORD(v5->m_kWorldBound.m_kCenter.x) = 1;
        }
        else
        {
          v5 = 0;
        }
        v3 = (NiProperty *)v5;
        element.m_pObject = v5;
        if ( v5 )
          InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
        v13 = 1;
        NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(v2 + 156),
          &element);
        v13 = -1;
        if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
      v6 = NiAVObject::GetProperty((NiAVObject *)v2, 3);
      if ( !v6 )
      {
        v7 = (NiRoom *)operator new(0x60u);
        element.m_pObject = v7;
        v13 = 2;
        if ( v7 )
        {
          NiMaterialProperty::NiMaterialProperty((NiMaterialProperty *)v7);
          v6 = v8;
        }
        else
        {
          v6 = 0;
        }
        element.m_pObject = (NiRoom *)v6;
        if ( v6 )
          InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
        v13 = 3;
        NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(v2 + 156),
          &element);
        v13 = -1;
        if ( v6 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
            v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
        }
      }
      *(_BYTE *)(v2 + 457) = 1;
      v3[1].m_uiRefCount = 0;
      v3[1].m_pcName = 0;
      ++v6[3].m_uiRefCount;
      *(float *)&v6[2].m_spControllers.m_pObject = 0.40000001;
      *(float *)&v6[2].m_ppkExtra = 0.40000001;
      *(float *)&v6[2].m_uiExtraDataSize = 0.40000001;
      NiAVObject::UpdateProperties((NiAVObject *)v2);
    }
    v1 = v12 + 4;
    v9 = v11-- == 1;
    v12 += 4;
  }
  while ( !v9 );
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);

//----- (0054C2E0) --------------------------------------------------------
void __thiscall MiniHouseInventoryWin::UnLockAllItem(MiniHouseInventoryWin *this)
{
  char *v1; // ecx@1
  int v2; // edi@2
  NiProperty *v3; // ebx@3
  NiRoom *v4; // eax@4
  NiRoom *v5; // esi@4
  NiProperty *v6; // esi@12
  NiRoom *v7; // eax@13
  NiProperty *v8; // eax@14
  bool v9; // zf@22
  NiPointer<NiRoom> element; // [sp+1Ch] [bp-18h]@4
  int v11; // [sp+20h] [bp-14h]@1
  char *v12; // [sp+24h] [bp-10h]@1
  int v13; // [sp+30h] [bp-4h]@4

  v1 = (char *)this->m_apkMiniHouseInvWin;
  v12 = v1;
  v11 = 24;
  do
  {
    v2 = *(_DWORD *)v1;
    if ( *(_BYTE *)(*(_DWORD *)v1 + 457) )
    {
      v3 = NiAVObject::GetProperty((NiAVObject *)v2, 9);
      if ( !v3 )
      {
        v4 = (NiRoom *)operator new(0x28u);
        v5 = v4;
        element.m_pObject = v4;
        v13 = 0;
        if ( v4 )
        {
          NiObjectNET::NiObjectNET((NiObjectNET *)&v4->vfptr);
          v5->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
          v5->m_uFlags = 0;
          v5->m_pkParent = 0;
          LODWORD(v5->m_kWorldBound.m_kCenter.x) = 1;
        }
        else
        {
          v5 = 0;
        }
        v3 = (NiProperty *)v5;
        element.m_pObject = v5;
        if ( v5 )
          InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
        v13 = 1;
        NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(v2 + 156),
          &element);
        v13 = -1;
        if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
      v6 = NiAVObject::GetProperty((NiAVObject *)v2, 3);
      if ( !v6 )
      {
        v7 = (NiRoom *)operator new(0x60u);
        element.m_pObject = v7;
        v13 = 2;
        if ( v7 )
        {
          NiMaterialProperty::NiMaterialProperty((NiMaterialProperty *)v7);
          v6 = v8;
        }
        else
        {
          v6 = 0;
        }
        element.m_pObject = (NiRoom *)v6;
        if ( v6 )
          InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
        v13 = 3;
        NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(v2 + 156),
          &element);
        v13 = -1;
        if ( v6 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
            v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
        }
      }
      *(_BYTE *)(v2 + 457) = 0;
      v3[1].m_uiRefCount = 0;
      v3[1].m_pcName = 0;
      ++v6[3].m_uiRefCount;
      *(float *)&v6[2].m_spControllers.m_pObject = 1.0;
      *(float *)&v6[2].m_ppkExtra = 1.0;
      *(float *)&v6[2].m_uiExtraDataSize = 1.0;
      NiAVObject::UpdateProperties((NiAVObject *)v2);
    }
    v1 = v12 + 4;
    v9 = v11-- == 1;
    v12 += 4;
  }
  while ( !v9 );
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);

//----- (0054C4A0) --------------------------------------------------------
char __thiscall MiniHouseInvWin::EatDropInstance(MiniHouseInvWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  MiniHouseInvWin *v4; // edi@1
  char result; // al@2
  DropContents *v6; // esi@5
  DropContents::SenderType v7; // eax@5
  MiniHouseInventoryWin *v8; // ecx@8

  v4 = this;
  if ( !this->m_bLock && *pkDrop && this->m_bActive )
  {
    v6 = (DropContents *)(*pkDrop)->m_pkContents;
    v7 = v6->m_eSenderType;
    if ( v7 && v7 != 10 )
    {
      result = 0;
    }
    else
    {
      v8 = (MiniHouseInventoryWin *)PgWin::GetParentWin((PgWin *)&this->vfptr);
      if ( v4->m_uiInvType == 9 )
        result = MiniHouseInventoryWin::DropOnInv(v8, v6, v4->m_uiInvIndex);
      else
        result = MiniHouseInventoryWin::DropOnEquip(v8, v6, v4->m_uiInvIndex);
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0054C520) --------------------------------------------------------
void __thiscall MiniHouseInventoryWin::OnCommand(MiniHouseInventoryWin *this, unsigned int wParam, int lParam)
{
  int v3; // edx@1
  int v4; // eax@7
  int v5; // eax@9
  signed int v6; // eax@10
  GameFrameWork *v7; // eax@12

  v3 = g_pkMainChar->m_byMode;
  switch ( wParam )
  {
    case 3u:
      MiniHouseInventoryWin::OnInvLClickNormalMode(this, lParam);
      break;
    case 4u:
      if ( v3 != 5 && v3 != 4 && !PgCursor::ms_pkDrop )
        MiniHouseInventoryWin::OnInvShiftRClickNormalMode(this, lParam);
      break;
    case 8u:
      v4 = this->m_iActivePage;
      if ( v4 > 0 )
        MiniHouseInventoryWin::OnActivePage(this, v4 - 1);
      break;
    case 9u:
      v5 = this->m_iActivePage;
      if ( v5 >= 0 )
      {
        v6 = v5 + 1;
        if ( v6 < 1 )
          MiniHouseInventoryWin::OnActivePage(this, v6);
      }
      break;
    case 0xEu:
      v7 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v7 )
        GameFrameWork::OpenPlayGuideSearchList(v7, "MinihouseInv");
      break;
    default:
      return;
  }
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (0054C600) --------------------------------------------------------
MiniHouseInvWin *__cdecl MiniHouseInvWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent)
{
  PgWin *v4; // eax@1
  PgWin *v5; // eax@2
  PgWin *v6; // esi@2
  PgWin *v7; // edi@8
  MiniHouseInvWin *v8; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v10; // [sp+20h] [bp-4h]@1

  v4 = (PgWin *)operator new(0x1D4u);
  result.m_pObject = v4;
  v10 = 0;
  if ( v4 )
  {
    MiniHouseInvWin::MiniHouseInvWin((MiniHouseInvWin *)v4);
    v6 = v5;
  }
  else
  {
    v6 = 0;
  }
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v10 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v6);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, PgWin *))v6->vfptr[154].__vecDelDtor)(
                          v6,
                          iXPos,
                          iYPos,
                          uiInvIndex,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v6->vfptr[89].__vecDelDtor)(v6);
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = (MiniHouseInvWin *)v6;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v6);
    if ( result.m_pObject )
    {
      v7 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      }
    }
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = 0;
  }
  return v8;
}

//----- (0054C740) --------------------------------------------------------
MiniHouseInvTabButWin *__cdecl MiniHouseInvTabButWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg)
{
  PgWin *v5; // eax@1
  PgWin *v6; // esi@1
  PgWin *v7; // edi@8
  MiniHouseInvTabButWin *v8; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v10; // [sp+20h] [bp-4h]@1

  v5 = (PgWin *)operator new(0x144u);
  v6 = v5;
  result.m_pObject = v5;
  v10 = 0;
  if ( v5 )
  {
    PgWinBut::PgWinBut((PgWinBut *)v5);
    v6->vfptr = (NiRefObjectVtbl *)&MiniHouseInvTabButWin::`vftable'{for `NiNode'};
    v6->vfptr = (IDirectMessengerVtbl *)&MiniHouseInvTabButWin::`vftable'{for `IDirectMessenger'};
    v6->m_bDroppable = 1;
  }
  else
  {
    v6 = 0;
  }
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v10 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v6);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgSprData *, PgWin *, unsigned int))v6->vfptr[140].__vecDelDtor)(
                          v6,
                          iXPos,
                          iYPos,
                          pkSprData,
                          pkParent,
                          uiCmdMsg) )
  {
    ((void (__thiscall *)(PgWin *))v6->vfptr[89].__vecDelDtor)(v6);
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = (MiniHouseInvTabButWin *)v6;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v6);
    if ( result.m_pObject )
    {
      v7 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      }
    }
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = 0;
  }
  return v8;
}
// 99502C: using guessed type void (__thiscall *MiniHouseInvTabButWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99504C: using guessed type int (__thiscall *MiniHouseInvTabButWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054C8A0) --------------------------------------------------------
MiniHouseInventoryWin *__cdecl MiniHouseInventoryWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  MiniHouseInventoryWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x250u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    MiniHouseInventoryWin::MiniHouseInventoryWin((MiniHouseInventoryWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (MiniHouseInventoryWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (0054C9D0) --------------------------------------------------------
char __thiscall MiniHouseInventoryWin::Create(MiniHouseInventoryWin *this, PgFrameWork *pkFrameWork)
{
  MiniHouseInventoryWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  char result; // al@6
  const char *v6; // eax@9
  PgSprData *v7; // eax@10
  int v8; // ebx@11
  int v9; // edi@11
  NiSourceTexture *v10; // eax@11
  PgSprData *v11; // eax@12
  PgSprData *v12; // eax@16
  PgWinSpr *v13; // eax@16
  PgSprData *v14; // eax@16
  PgFont *v15; // eax@18
  PgWinText *v16; // edi@18
  NiUnsharedGeometryGroup *v17; // eax@18
  PgSprData *v18; // edi@18
  MiniHouseInvTabButWin *v19; // eax@18
  PgSprData *v20; // edi@18
  PgSprData *v21; // ST38_4@18
  int v22; // edi@18
  MiniHouseInvTabButWin *v23; // eax@18
  PgSprData *v24; // eax@18
  MiniHouse *v25; // eax@18
  int v26; // ST40_4@19
  char *v27; // ST3C_4@19
  char *v28; // ST3C_4@20
  NiSourceTexture *v29; // eax@21
  PgSprData *v30; // eax@22
  PgWinSpr *v31; // eax@22
  signed int v32; // edi@22
  PgSprData *v33; // eax@24
  MiniHouseInvWin *v34; // eax@26
  int v35; // edi@27
  int v36; // ebx@28
  int v37; // ecx@29
  int v38; // eax@30
  NiNode *v39; // esi@31
  unsigned int v40; // ebx@37
  IconWin **v41; // edi@37
  PgSprData *v42; // eax@39
  MiniHouseInvWin *v43; // eax@40
  int v44; // eax@40
  bool v45; // sf@40
  unsigned __int8 v46; // of@40
  NiNode *v47; // esi@42
  unsigned int uiWidth; // [sp+50h] [bp-220h]@16
  unsigned int uiHeight; // [sp+54h] [bp-21Ch]@16
  int iOffX; // [sp+58h] [bp-218h]@7
  int iOffY; // [sp+5Ch] [bp-214h]@11
  int i; // [sp+60h] [bp-210h]@14
  NiSourceTexture *pkTexture; // [sp+64h] [bp-20Ch]@1
  int j; // [sp+68h] [bp-208h]@14
  int uiLeft; // [sp+6Ch] [bp-204h]@10
  int uiTop; // [sp+70h] [bp-200h]@10
  NiPointer<NiNode> spNode; // [sp+74h] [bp-1FCh]@1
  int uiInvLeft[24]; // [sp+78h] [bp-1F8h]@29
  int uiInvTop[24]; // [sp+D8h] [bp-198h]@29
  char acFileName[260]; // [sp+138h] [bp-138h]@19
  char acShapeName[33]; // [sp+23Ch] [bp-34h]@23
  int v62; // [sp+26Ch] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v62 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  pkTexture = v3;
  if ( !v3 )
    goto LABEL_49;
  iOffX = (int)pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = Folder::Merge(&Folder::m_acMenu, "Game\\MinihouseInv.nif");
  PgUtil::LoadNodeNifFile(v6, &spNode, (NiTexturePalette *)iOffX);
  if ( !spNode.m_pObject )
    return 0;
  v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v7, 0, pkFrameWork, "MiniHouseInventoryWin", 0) )
  {
LABEL_49:
    v4 = spNode.m_pObject;
    v62 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
    return 0;
  }
  v8 = uiLeft;
  v9 = uiTop;
  iOffX = uiLeft;
  iOffY = uiTop;
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v11, (PgWin *)&v2->vfptr, 0, 0);
  j = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add((PgSprData *)j, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add((PgSprData *)j, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinCloseBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)j, (PgWin *)&v2->vfptr);
  i = (int)MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    j = (int)PgSprData::Create(
               (NiAVObject *)&spNode.m_pObject->vfptr,
               "HelpLinkNor",
               &uiLeft,
               &uiTop,
               (NiSourceTexture *)i);
    PgSprData::Add((PgSprData *)j, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add((PgSprData *)j, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)j, (PgWin *)&v2->vfptr, 0xEu, 0, 0);
  }
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
  v13 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, pkTexture);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v14, (PgWin *)&v2->vfptr, 0, 0);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight)
    && ((v15 = Font::Get(MAIN_MENU),
         v16 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9 + 2, uiWidth, uiHeight, v15, (PgWin *)&v2->vfptr, 0, 0),
         v16->vfptr[122].__vecDelDtor((NiRefObject *)v16, 1u),
         v16->vfptr[117].__vecDelDtor((NiRefObject *)v16, (unsigned int)&Color::m_kDxWinTitleColor),
         i = (int)&v16->vfptr[118],
         v17 = TextData::Get(0x96F8F4F0),
         (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))i)(v16, v17),
         v16->vfptr[60].__vecDelDtor((NiRefObject *)v16, 0),
         v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PrePageNor", &uiLeft, &uiTop, pkTexture),
         PgSprData::Add(v18, (NiAVObject *)&spNode.m_pObject->vfptr, "PrePageClick"),
         PgSprData::Add(v18, (NiAVObject *)&spNode.m_pObject->vfptr, "PrePageOver"),
         v19 = MiniHouseInvTabButWin::CreateWin(uiLeft - v8, uiTop - iOffY, v18, (PgWin *)&v2->vfptr, 8u),
         v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0),
         v20 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NextPageNor", &uiLeft, &uiTop, pkTexture),
         PgSprData::Add(v20, (NiAVObject *)&spNode.m_pObject->vfptr, "NextPageClick"),
         PgSprData::Add(v20, (NiAVObject *)&spNode.m_pObject->vfptr, "NextPageOver"),
         v21 = v20,
         v22 = iOffY,
         v23 = MiniHouseInvTabButWin::CreateWin(uiLeft - v8, uiTop - iOffY, v21, (PgWin *)&v2->vfptr, 9u),
         v23->vfptr[60].__vecDelDtor((NiRefObject *)v23, 0),
         v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, pkTexture),
         PgWinSpr::CreateWin(uiLeft - v8, uiTop - v22, v24, (PgWin *)&v2->vfptr, 0, 0),
         (v25 = MiniHouseTable::GetByHandle(0)) == 0) ? (v28 = Folder::Menu(),
                                                         sprintf(
                                                           acFileName,
                                                           "%sgame\\MiniHouse\\%s.dds",
                                                           v28,
                                                           "mushroom")) : (v26 = (int)v25->Backimage,
                                                                           v27 = Folder::Menu(),
                                                                           sprintf(
                                                                             acFileName,
                                                                             "%sgame\\MiniHouse\\%s.dds",
                                                                             v27,
                                                                             v26)),
        (v29 = PgUtil::LoadSourceTexture(acFileName)) != 0) )
  {
    v30 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane01", &uiLeft, &uiTop, v29);
    v31 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v22, v30, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkMiniHouseSprWin = v31;
    v31->vfptr[60].__vecDelDtor((NiRefObject *)v31, 0);
    v32 = 0;
    do
    {
      sprintf(acShapeName, "EquipSlot%02d", v32);
      if ( v32 )
        v33 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, pkTexture);
      else
        v33 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MinihouseSlot", &uiLeft, &uiTop, pkTexture);
      PgWinSpr::CreateWin(uiLeft - v8, uiTop - iOffY, v33, (PgWin *)&v2->vfptr, 0, 0);
      v34 = MiniHouseInvWin::CreateWin(uiLeft - v8 + 1, uiTop - iOffY + 1, v32, (PgWin *)&v2->vfptr);
      v2->m_apkEquipWin[v32] = v34;
      ItemIcon::SetItem((ItemIcon *)&v34->vfptr, 0, 1);
      ((void (__stdcall *)(signed int))v2->m_apkEquipWin[v32]->vfptr[129].__vecDelDtor)(5);
      ((void (__stdcall *)(signed int))v2->m_apkEquipWin[v32]->vfptr[140].__vecDelDtor)(6);
      v2->m_apkEquipWin[v32]->m_uiInvType = 8;
      v2->m_apkEquipWin[v32]->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
      v2->m_apkEquipWin[v32]->m_eType = 1;
      v2->m_apkEquipWin[v32]->m_bActive = 1;
      IconWin::ShowFocus((IconWin *)&v2->m_apkEquipWin[v32++]->vfptr, 1);
    }
    while ( v32 < 11 );
    v35 = 0;
    while ( 1 )
    {
      v36 = v35 + 1;
      sprintf(acShapeName, "InvItemSlot%03d", v35 + 1);
      if ( !PgUtil::GetTriShapeRect(
              (NiAVObject *)&spNode.m_pObject->vfptr,
              acShapeName,
              &uiLeft,
              &uiTop,
              &uiWidth,
              &uiHeight) )
        break;
      v37 = uiTop;
      uiInvLeft[v35] = uiLeft;
      uiInvTop[v35++] = v37;
      if ( v36 >= 24 )
      {
        v38 = 0;
        for ( j = 0; ; v38 = j )
        {
          v40 = 24 * v38;
          i = 0;
          v41 = (IconWin **)&v2->m_apkMiniHouseInvWin[24 * v38];
          do
          {
            if ( !v38 )
            {
              sprintf(acShapeName, "InvItemSlot%03d", i + 1);
              v42 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, pkTexture);
              PgWinSpr::CreateWin(uiLeft - iOffX, uiTop - iOffY, v42, (PgWin *)&v2->vfptr, 0, 0);
            }
            v43 = MiniHouseInvWin::CreateWin(
                    uiInvLeft[v40] - iOffX + 1,
                    uiInvTop[v40] - iOffY + 1,
                    v40,
                    (PgWin *)&v2->vfptr);
            *v41 = (IconWin *)v43;
            ItemIcon::SetItem((ItemIcon *)&v43->vfptr, 0, 1);
            ((void (__stdcall *)(signed int))(*v41)->vfptr[129].__vecDelDtor)(3);
            ((void (__stdcall *)(signed int))(*v41)->vfptr[140].__vecDelDtor)(4);
            LODWORD((*v41)[1].m_kLocal.m_Rotate.m_pEntry[1][2]) = 9;
            (*v41)->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
            (*v41)->m_eType = 1;
            IconWin::ShowFocus(*v41, 1);
            v44 = i + 1;
            ++v40;
            ++v41;
            i = v44;
            v46 = __OFSUB__(v44, 24);
            v45 = v44 - 24 < 0;
            v38 = j;
          }
          while ( v45 ^ v46 );
          if ( ++j >= 1 )
            break;
        }
        ((void (__thiscall *)(MiniHouseInventoryWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
          v2,
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          0.41999999,
          0.57999998);
        MiniHouseInventoryWin::OnActivePage(v2, 0);
        v47 = spNode.m_pObject;
        v62 = -1;
        if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v47 )
          v47->vfptr->__vecDelDtor((NiRefObject *)v47, 1u);
        return 1;
      }
    }
    v39 = spNode.m_pObject;
    v62 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v39 )
      v39->vfptr->__vecDelDtor((NiRefObject *)v39, 1u);
    result = 0;
  }
  else
  {
    v62 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0054D390) --------------------------------------------------------
char __thiscall MiniHouseInvWin::Create(MiniHouseInvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent)
{
  MiniHouseInvWin *v5; // esi@1
  char result; // al@1

  v5 = this;
  result = ItemIcon::Create((ItemIcon *)&this->vfptr, iXPos, iYPos, pkParent);
  if ( result )
  {
    v5->m_uiInvIndex = uiInvIndex;
    ItemIcon::ShowLotText((ItemIcon *)&v5->vfptr, 1);
    pkParent = (PgWin *)v5;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      &IconWin::ms_kCoolTimeIconList,
      (const unsigned int *)&pkParent);
    result = 1;
  }
  return result;
}

//----- (0054D3E0) --------------------------------------------------------
MiniHouseInvTabButWin *__thiscall MiniHouseInvTabButWin::`scalar deleting destructor'(MiniHouseInvTabButWin *this, unsigned int a2)
{
  MiniHouseInvTabButWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&MiniHouseInvTabButWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MiniHouseInvTabButWin::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 99502C: using guessed type void (__thiscall *MiniHouseInvTabButWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99504C: using guessed type int (__thiscall *MiniHouseInvTabButWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054D420) --------------------------------------------------------
MiniHouse *__cdecl MiniHouseTable::GetByHandle(unsigned __int16 wHandle)
{
  unsigned int v1; // esi@1
  MiniHouse *result; // eax@2

  v1 = 0;
  if ( ITableBase<MiniHouse,MiniHouseTable>::GetTotal() )
  {
    while ( 1 )
    {
      result = (MiniHouse *)CDataReader::GetRecord(
                              (CDataReader *)(ITableBase<MiniHouse,MiniHouseTable>::ms_pkTable + 4),
                              v1);
      if ( result->Handle == wHandle )
        break;
      if ( ++v1 >= ITableBase<MiniHouse,MiniHouseTable>::GetTotal() )
        goto LABEL_4;
    }
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}
// A8C184: using guessed type int ITableBase<MiniHouse,MiniHouseTable>::ms_pkTable;

//----- (0054D460) --------------------------------------------------------
MiniHouseInvWin *__thiscall MiniHouseInvWin::`scalar deleting destructor'(MiniHouseInvWin *this, unsigned int a2)
{
  MiniHouseInvWin *v2; // esi@1

  v2 = this;
  MiniHouseInvWin::~MiniHouseInvWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0054D490) --------------------------------------------------------
MiniHouseInventoryWin *__thiscall MiniHouseInventoryWin::`scalar deleting destructor'(MiniHouseInventoryWin *this, unsigned int a2)
{
  MiniHouseInventoryWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&MiniHouseInventoryWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MiniHouseInventoryWin::`vftable'{for `IDirectMessenger'};
  this->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  this->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 995514: using guessed type void (__thiscall *MiniHouseInventoryWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 995534: using guessed type int (__thiscall *MiniHouseInventoryWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054D4E0) --------------------------------------------------------
void __thiscall MiniHouseMenuWin::MiniHouseMenuWin(MiniHouseMenuWin *this)
{
  MiniHouseMenuWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_pkRestText = 0;
  v1->m_pkPrivateStoreText = 0;
  v1->m_pkPrivateStoreBut = 0;
  v1->m_pkRestBut = 0;
  v1->m_pkMHEnterText = 0;
  v1->vfptr = (NiRefObjectVtbl *)&MiniHouseMenuWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MiniHouseMenuWin::`vftable'{for `IDirectMessenger'};
}
// 9958E0: using guessed type void (__thiscall *MiniHouseMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9958FC: using guessed type int (__thiscall *MiniHouseMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054D520) --------------------------------------------------------
void __thiscall MiniHouseMenuWin::~MiniHouseMenuWin(MiniHouseMenuWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&MiniHouseMenuWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MiniHouseMenuWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9958E0: using guessed type void (__thiscall *MiniHouseMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9958FC: using guessed type int (__thiscall *MiniHouseMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054D5A0) --------------------------------------------------------
void __thiscall MiniHouseMenuWin::OnCancel(MiniHouseMenuWin *this)
{
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
}

//----- (0054D5B0) --------------------------------------------------------
void __thiscall MiniHouseMenuWin::SetMHJoinText(MiniHouseMenuWin *this, char *pStr)
{
  if ( pStr )
  {
    if ( this->m_pkMHEnterText )
      ((void (__stdcall *)(_DWORD))this->m_pkMHEnterText->vfptr[118].__vecDelDtor)(pStr);
  }
}

//----- (0054D5E0) --------------------------------------------------------
void MiniHouseMenuWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "MiniHouseMenu");
}

//----- (0054D610) --------------------------------------------------------
void __thiscall MiniHouseMenuWin::Show(MiniHouseMenuWin *this, bool b)
{
  if ( b )
    this->m_uFlags &= 0xFFFEu;
  else
    this->m_uFlags |= 1u;
}

//----- (0054D630) --------------------------------------------------------
char __thiscall MiniHouseMenuWin::Create(MiniHouseMenuWin *this, PgFrameWork *pkFrameWork)
{
  MiniHouseMenuWin *v2; // esi@1
  NiSourceTexture *v3; // eax@1
  NiTexturePalette *v4; // edi@1
  NiSourceTexture *v5; // ebx@1
  const char *v6; // eax@3
  PgSprData *v7; // eax@4
  NiNode *v8; // esi@5
  char result; // al@9
  int v10; // edi@10
  int v11; // ebx@10
  NiSourceTexture *v12; // eax@10
  PgSprData *v13; // eax@11
  PgSprData *v14; // eax@13
  PgSprData *v15; // eax@13
  NiNode *v16; // esi@16
  PgFont *v17; // eax@21
  unsigned int v18; // ST68_4@21
  NiUnsharedGeometryGroup *v19; // eax@21
  PgWinBut *v20; // eax@21
  int v21; // eax@21
  unsigned int v22; // ST68_4@21
  PgFont *v23; // eax@21
  PgWinText *v24; // eax@21
  NiUnsharedGeometryGroup *v25; // eax@21
  int v26; // eax@21
  PgWinBut *v27; // eax@21
  int v28; // eax@21
  unsigned int v29; // ST68_4@21
  PgFont *v30; // eax@21
  PgWinText *v31; // eax@21
  NiUnsharedGeometryGroup *v32; // eax@21
  PgWinBut *v33; // eax@21
  int v34; // eax@21
  unsigned int v35; // ST68_4@21
  PgFont *v36; // eax@21
  PgWinText *v37; // eax@21
  NiUnsharedGeometryGroup *v38; // eax@21
  NiPointer<PgSprData::PgHitTester> *v39; // ecx@21
  unsigned int v40; // ST68_4@21
  PgFont *v41; // eax@21
  unsigned int v42; // ST68_4@21
  NiUnsharedGeometryGroup *v43; // eax@21
  NiPointer<PgSprData::PgHitTester> *v44; // ecx@21
  unsigned int v45; // ST68_4@21
  PgFont *v46; // eax@21
  PgWinText *v47; // edi@21
  NiRefObjectVtbl *v48; // ebx@21
  NiUnsharedGeometryGroup *v49; // eax@21
  NiNode *v50; // esi@22
  unsigned int uiWidth; // [sp+6Ch] [bp-24h]@15
  unsigned int uiHeight; // [sp+70h] [bp-20h]@15
  NiSourceTexture *pkTexture; // [sp+74h] [bp-1Ch]@1
  int uiLeft; // [sp+78h] [bp-18h]@4
  int uiTop; // [sp+7Ch] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+80h] [bp-10h]@1
  int v57; // [sp+8Ch] [bp-4h]@1
  PgSprData *pkTextWina; // [sp+98h] [bp+8h]@13
  NiSourceTexture *pkTextWin; // [sp+98h] [bp+8h]@13
  PgSprData *pkTextWinb; // [sp+98h] [bp+8h]@14
  PgWinText *pkTextWinc; // [sp+98h] [bp+8h]@21
  PgWinText *pkTextWind; // [sp+98h] [bp+8h]@21
  PgWinText *pkTextWine; // [sp+98h] [bp+8h]@21
  PgWinText *pkTextWinf; // [sp+98h] [bp+8h]@21
  NiVBSet *pkTextWing; // [sp+98h] [bp+8h]@21
  PgWinText *pkTextWinh; // [sp+98h] [bp+8h]@21
  PgWinText *pkTextWini; // [sp+98h] [bp+8h]@21
  PgWinText *pkTextWinj; // [sp+98h] [bp+8h]@21
  PgWinText *pkTextWink; // [sp+98h] [bp+8h]@21
  PgWinText *pkTextWinl; // [sp+98h] [bp+8h]@21
  PgWinText *pkTextWinm; // [sp+98h] [bp+8h]@21
  PgSprData *pkTextWinn; // [sp+98h] [bp+8h]@21
  PgWinText *pkTextWino; // [sp+98h] [bp+8h]@21
  PgWinText *pkTextWinp; // [sp+98h] [bp+8h]@21
  PgSprData *pkTextWinq; // [sp+98h] [bp+8h]@21
  PgWinText *pkTextWinr; // [sp+98h] [bp+8h]@21

  v2 = this;
  spNode.m_pObject = 0;
  v57 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  v4 = pTexturePalette;
  v5 = v3;
  pkTexture = v3;
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = Folder::Merge(&Folder::m_acMenu, "Game\\MiniHouseMenu.nif");
  PgUtil::LoadNodeNifFile(v6, &spNode, v4);
  if ( !spNode.m_pObject )
    return 0;
  v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v5);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v7, 0, pkFrameWork, "MiniHouseMenuWin", 0) )
  {
    v8 = spNode.m_pObject;
    v57 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v8 )
        v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    }
    return 0;
  }
  v10 = uiLeft;
  v11 = uiTop;
  v12 = MenuTexMgr::GetTexture(0x13u);
  if ( v12 )
    v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v12);
  else
    v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft, uiTop, v13, (PgWin *)&v2->vfptr, 0, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop - v11, v14, (PgWin *)&v2->vfptr, 0, 0);
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, pkTexture);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop - v11, v15, (PgWin *)&v2->vfptr, 0, 0);
  pkTextWina = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(pkTextWina, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(pkTextWina, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinCloseBut::CreateWin(uiLeft - v10, uiTop - v11, pkTextWina, (PgWin *)&v2->vfptr);
  pkTextWin = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    pkTextWinb = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, pkTextWin);
    PgSprData::Add(pkTextWinb, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(pkTextWinb, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, pkTextWinb, (PgWin *)&v2->vfptr, 8u, 0, 0);
  }
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v17 = Font::Get(MAIN_MENU);
    pkTextWinc = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v17, (PgWin *)&v2->vfptr, 0, 0);
    pkTextWinc->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinc, 1u);
    ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinc->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
    v18 = (unsigned int)pkTextWinc->vfptr;
    v19 = TextData::Get(0xE539443F);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v18 + 472))(pkTextWinc, v19);
    ((void (__stdcall *)(_DWORD))pkTextWinc->vfptr[60].__vecDelDtor)(0);
    pkTextWind = (PgWinText *)PgSprData::Create(
                                (NiAVObject *)&spNode.m_pObject->vfptr,
                                "RestNor",
                                &uiLeft,
                                &uiTop,
                                pkTexture);
    PgSprData::Add((PgSprData *)pkTextWind, (NiAVObject *)&spNode.m_pObject->vfptr, "RestClick");
    PgSprData::Add((PgSprData *)pkTextWind, (NiAVObject *)&spNode.m_pObject->vfptr, "RestOver");
    v20 = PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, (PgSprData *)pkTextWind, (PgWin *)&v2->vfptr, 1u, 0, 0);
    v2->m_pkRestBut = v20;
    v20->m_pkToolTipWin = g_pkToolTipWin;
    v21 = *(_DWORD *)LODWORD(pkTextWind->m_kWorldBound.m_kCenter.x);
    pkTextWine = *(PgWinText **)(v21 + 24);
    v22 = *(_DWORD *)(v21 + 20);
    v23 = Font::Get(MAIN_MENU);
    v24 = PgWinText::CreateWin(
            uiLeft - v10,
            uiTop - v11 + 1,
            v22,
            (unsigned int)pkTextWine,
            v23,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v2->m_pkRestText = v24;
    v24->vfptr[122].__vecDelDtor((NiRefObject *)v24, 5u);
    pkTextWinf = (PgWinText *)v2->m_pkRestText->vfptr;
    v25 = TextData::Get(0x92B1FCEF);
    ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkTextWinf[1].m_kChildren.m_pBase)(
      v2->m_pkRestText,
      v25);
    ((void (__stdcall *)(_DWORD))v2->m_pkRestText->vfptr[60].__vecDelDtor)(0);
    pkTextWing = (NiVBSet *)v2->m_pkRestBut;
    Singleton<Tutorial>::getInstance();
    NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::SetAt(
      (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)(v26 + 164),
      0,
      pkTextWing);
    pkTextWinh = (PgWinText *)PgSprData::Create(
                                (NiAVObject *)&spNode.m_pObject->vfptr,
                                "PrivatStoreNor",
                                &uiLeft,
                                &uiTop,
                                pkTexture);
    PgSprData::Add((PgSprData *)pkTextWinh, (NiAVObject *)&spNode.m_pObject->vfptr, "PrivatStoreClick");
    PgSprData::Add((PgSprData *)pkTextWinh, (NiAVObject *)&spNode.m_pObject->vfptr, "PrivatStoreOver");
    v27 = PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, (PgSprData *)pkTextWinh, (PgWin *)&v2->vfptr, 2u, 0, 0);
    v2->m_pkPrivateStoreBut = v27;
    v27->m_pkToolTipWin = g_pkToolTipWin;
    v28 = *(_DWORD *)LODWORD(pkTextWinh->m_kWorldBound.m_kCenter.x);
    pkTextWini = *(PgWinText **)(v28 + 24);
    v29 = *(_DWORD *)(v28 + 20);
    v30 = Font::Get(MAIN_MENU);
    v31 = PgWinText::CreateWin(
            uiLeft - v10,
            uiTop - v11 + 1,
            v29,
            (unsigned int)pkTextWini,
            v30,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v2->m_pkPrivateStoreText = v31;
    v31->vfptr[122].__vecDelDtor((NiRefObject *)v31, 5u);
    pkTextWinj = (PgWinText *)v2->m_pkPrivateStoreText->vfptr;
    v32 = TextData::Get(0x9CE9FCEB);
    ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkTextWinj[1].m_kChildren.m_pBase)(
      v2->m_pkPrivateStoreText,
      v32);
    ((void (__stdcall *)(_DWORD))v2->m_pkPrivateStoreText->vfptr[60].__vecDelDtor)(0);
    pkTextWink = (PgWinText *)PgSprData::Create(
                                (NiAVObject *)&spNode.m_pObject->vfptr,
                                "EntanceNor",
                                &uiLeft,
                                &uiTop,
                                pkTexture);
    PgSprData::Add((PgSprData *)pkTextWink, (NiAVObject *)&spNode.m_pObject->vfptr, "EntanceClick");
    PgSprData::Add((PgSprData *)pkTextWink, (NiAVObject *)&spNode.m_pObject->vfptr, "EntanceOver");
    v33 = PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, (PgSprData *)pkTextWink, (PgWin *)&v2->vfptr, 3u, 0, 0);
    v2->m_pkEntanceBut = v33;
    v33->m_pkToolTipWin = g_pkToolTipWin;
    v34 = *(_DWORD *)LODWORD(pkTextWink->m_kWorldBound.m_kCenter.x);
    pkTextWinl = *(PgWinText **)(v34 + 24);
    v35 = *(_DWORD *)(v34 + 20);
    v36 = Font::Get(MAIN_MENU);
    v37 = PgWinText::CreateWin(
            uiLeft - v10,
            uiTop - v11 + 1,
            v35,
            (unsigned int)pkTextWinl,
            v36,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v2->m_pkMHEnterText = v37;
    v37->vfptr[122].__vecDelDtor((NiRefObject *)v37, 5u);
    pkTextWinm = (PgWinText *)v2->m_pkMHEnterText->vfptr;
    v38 = TextData::Get(0xFAF63B39);
    ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkTextWinm[1].m_kChildren.m_pBase)(
      v2->m_pkMHEnterText,
      v38);
    ((void (__stdcall *)(_DWORD))v2->m_pkMHEnterText->vfptr[60].__vecDelDtor)(0);
    pkTextWinn = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ChangeNor", &uiLeft, &uiTop, pkTexture);
    PgSprData::Add(pkTextWinn, (NiAVObject *)&spNode.m_pObject->vfptr, "ChangeClick");
    PgSprData::Add(pkTextWinn, (NiAVObject *)&spNode.m_pObject->vfptr, "ChangeOver");
    PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, pkTextWinn, (PgWin *)&v2->vfptr, 6u, 0, 0);
    v39 = pkTextWinn->m_akHitTester.m_pBase;
    pkTextWino = (PgWinText *)v39->m_pObject->m_uiHeight;
    v40 = v39->m_pObject->m_uiWidth;
    v41 = Font::Get(MAIN_MENU);
    pkTextWinp = PgWinText::CreateWin(
                   uiLeft - v10,
                   uiTop - v11 + 1,
                   v40,
                   (unsigned int)pkTextWino,
                   v41,
                   (PgWin *)&v2->vfptr,
                   0,
                   0);
    pkTextWinp->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinp, 5u);
    v42 = (unsigned int)pkTextWinp->vfptr;
    v43 = TextData::Get(0x798D9488u);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v42 + 472))(pkTextWinp, v43);
    ((void (__stdcall *)(_DWORD))pkTextWinp->vfptr[60].__vecDelDtor)(0);
    pkTextWinq = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "QuitNor", &uiLeft, &uiTop, pkTexture);
    PgSprData::Add(pkTextWinq, (NiAVObject *)&spNode.m_pObject->vfptr, "QuitClick");
    PgSprData::Add(pkTextWinq, (NiAVObject *)&spNode.m_pObject->vfptr, "QuitOver");
    PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, pkTextWinq, (PgWin *)&v2->vfptr, 7u, 0, 0);
    v44 = pkTextWinq->m_akHitTester.m_pBase;
    pkTextWinr = (PgWinText *)v44->m_pObject->m_uiHeight;
    v45 = v44->m_pObject->m_uiWidth;
    v46 = Font::Get(MAIN_MENU);
    v47 = PgWinText::CreateWin(
            uiLeft - v10,
            uiTop - v11 + 1,
            v45,
            (unsigned int)pkTextWinr,
            v46,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v47->vfptr[122].__vecDelDtor((NiRefObject *)v47, 5u);
    v48 = v47->vfptr;
    v49 = TextData::Get(0x3C359B91u);
    v48[118].__vecDelDtor((NiRefObject *)v47, (unsigned int)v49);
    v47->vfptr[60].__vecDelDtor((NiRefObject *)v47, 0);
    ((void (__thiscall *)(MiniHouseMenuWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    v57 = -1;
    if ( spNode.m_pObject )
    {
      v50 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v50 )
          v50->vfptr->__vecDelDtor((NiRefObject *)v50, 1u);
      }
    }
    result = 1;
  }
  else
  {
    v16 = spNode.m_pObject;
    v57 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v16 )
      v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0054DEF0) --------------------------------------------------------
void __thiscall MiniHouseMenuWin::OnCommand(MiniHouseMenuWin *this, unsigned int wParam, int lParam)
{
  MiniHouseMenuWin *v3; // esi@1
  PgFrameWork *v4; // ecx@3
  GameFrameWork *v5; // edi@8
  NiUnsharedGeometryGroup *v6; // eax@8
  unsigned int v7; // [sp-Ch] [bp-10h]@2

  v3 = this;
  switch ( wParam )
  {
    case 1u:
      v7 = 173;
      goto LABEL_3;
    case 7u:
      goto LABEL_5;
    case 2u:
      if ( nowState )
      {
        v5 = (GameFrameWork *)this->m_pkFrameWork;
        v6 = TextData::Get(0x87EBC3DC);
        GameFrameWork::AddSysMsg(v5, (const char *)v6);
        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
      }
      else
      {
        PgFrameWork::AddMsg(this->m_pkFrameWork, 0xA3u, 0, 0);
        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
      }
      return;
    case 3u:
      v4 = this->m_pkFrameWork;
      if ( nowState )
        v7 = 206;
      else
        v7 = 192;
      goto LABEL_4;
    case 4u:
      v7 = 219;
      goto LABEL_3;
    case 6u:
      v7 = 184;
LABEL_3:
      v4 = this->m_pkFrameWork;
LABEL_4:
      PgFrameWork::AddMsg(v4, v7, 0, 0);
LABEL_5:
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
      break;
    case 8u:
      MiniHouseMenuWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (0054E000) --------------------------------------------------------
void __userpurge MiniHouseMenuWin::EnablePrivateStoreBut(MiniHouseMenuWin *this@<ecx>, int a2@<edi>, int bEnable)
{
  MiniHouseMenuWin *v3; // esi@1
  void *(__thiscall *v4)(NiRefObject *, unsigned int); // edx@3
  int v5; // ST04_4@6
  NiRefObjectVtbl *v6; // edi@6
  NiUnsharedGeometryGroup *v7; // eax@6

  v3 = this;
  if ( this->m_pkPrivateStoreBut && this->m_pkPrivateStoreText )
  {
    ((void (__stdcall *)(int))this->m_pkPrivateStoreBut->vfptr[60].__vecDelDtor)(bEnable);
    v4 = v3->m_pkPrivateStoreText->vfptr[117].__vecDelDtor;
    if ( (_BYTE)bEnable )
      ((void (__cdecl *)(D3DXCOLOR *))v4)(&Color::m_kDxWhiteColor);
    else
      ((void (__cdecl *)(void *))v4)(&Color::m_kDxGrayColor);
    v5 = a2;
    v6 = v3->m_pkPrivateStoreText->vfptr;
    v7 = TextData::Get(0x9CE9FCEB);
    ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *, int))v6[118].__vecDelDtor)(
      v3->m_pkPrivateStoreText,
      v7,
      v5);
  }
}
// 54E000: could not find valid save-restore pair for edi

//----- (0054E080) --------------------------------------------------------
void __userpurge MiniHouseMenuWin::EnableRestBut(MiniHouseMenuWin *this@<ecx>, int a2@<edi>, int bEnable)
{
  MiniHouseMenuWin *v3; // esi@1
  void *(__thiscall *v4)(NiRefObject *, unsigned int); // edx@3
  int v5; // ST04_4@6
  NiRefObjectVtbl *v6; // edi@6
  NiUnsharedGeometryGroup *v7; // eax@6

  v3 = this;
  if ( this->m_pkRestBut && this->m_pkRestText )
  {
    ((void (__stdcall *)(int))this->m_pkRestBut->vfptr[60].__vecDelDtor)(bEnable);
    v4 = v3->m_pkRestText->vfptr[117].__vecDelDtor;
    if ( (_BYTE)bEnable )
      ((void (__cdecl *)(D3DXCOLOR *))v4)(&Color::m_kDxWhiteColor);
    else
      ((void (__cdecl *)(void *))v4)(&Color::m_kDxGrayColor);
    v5 = a2;
    v6 = v3->m_pkRestText->vfptr;
    v7 = TextData::Get(0x92B1FCEF);
    ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *, int))v6[118].__vecDelDtor)(v3->m_pkRestText, v7, v5);
  }
}
// 54E080: could not find valid save-restore pair for edi

//----- (0054E100) --------------------------------------------------------
void __userpurge MiniHouseMenuWin::UpdateMeWin(MiniHouseMenuWin *this@<ecx>, int a2@<edi>, float fCurTime)
{
  MiniHouseMenuWin *v3; // esi@1
  char v4; // al@2
  NiRefObjectVtbl *v5; // edi@5
  NiUnsharedGeometryGroup *v6; // eax@5
  NiRefObjectVtbl *v7; // edi@9
  NiUnsharedGeometryGroup *v8; // eax@9

  v3 = this;
  if ( g_pkMainChar )
  {
    v4 = g_pkMainChar->m_byMode;
    if ( v4 == 4 )
    {
      if ( this->m_pkPrivateStoreBut && this->m_pkPrivateStoreText )
      {
        ((void (__stdcall *)(_DWORD))this->m_pkPrivateStoreBut->vfptr[60].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v3->m_pkPrivateStoreText->vfptr[117].__vecDelDtor)(&Color::m_kDxGrayColor);
        v5 = v3->m_pkPrivateStoreText->vfptr;
        v6 = TextData::Get(0x9CE9FCEB);
        v5[118].__vecDelDtor((NiRefObject *)v3->m_pkPrivateStoreText, (unsigned int)v6);
      }
      if ( v3->m_pkRestBut )
        ((void (__stdcall *)(_DWORD))v3->m_pkRestBut->vfptr[60].__vecDelDtor)(1);
      if ( v3->m_pkRestText )
      {
        ((void (__stdcall *)(_DWORD))v3->m_pkRestText->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
        v7 = v3->m_pkRestText->vfptr;
        v8 = TextData::Get(0xE0F65B33);
        v7[118].__vecDelDtor((NiRefObject *)v3->m_pkRestText, (unsigned int)v8);
      }
    }
    else if ( v4 == 5 )
    {
      MiniHouseMenuWin::EnablePrivateStoreBut(this, a2, 0);
      MiniHouseMenuWin::EnableRestBut(v3, a2, 0);
    }
    else
    {
      MiniHouseMenuWin::EnablePrivateStoreBut(this, a2, 1);
      MiniHouseMenuWin::EnableRestBut(v3, a2, 1);
    }
  }
}

//----- (0054E210) --------------------------------------------------------
MiniHouseMenuWin *__cdecl MiniHouseMenuWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  MiniHouseMenuWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x170u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&MiniHouseMenuWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&MiniHouseMenuWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[2][0]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (MiniHouseMenuWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9958E0: using guessed type void (__thiscall *MiniHouseMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9958FC: using guessed type int (__thiscall *MiniHouseMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054E370) --------------------------------------------------------
void __thiscall NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::SetAt(NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *this, unsigned int key, NiVBSet *val)
{
  unsigned int v3; // ebx@1
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v4; // esi@1
  int v5; // eax@1
  NiTMapItem<unsigned int,NiVBSet *> *v6; // edi@1
  NiTMapItem<unsigned int,NiVBSet *> *v7; // edi@4
  unsigned int uiIndex; // [sp+14h] [bp+8h]@1

  v3 = key;
  v4 = this;
  v5 = ((int (__stdcall *)(_DWORD))this->vfptr->KeyToHashIndex)(key);
  v6 = v4->m_ppkHashTable[v5];
  uiIndex = v5;
  if ( v6 )
  {
    while ( !v4->vfptr->IsKeysEqual(v4, v3, v6->m_key) )
    {
      v6 = v6->m_pkNext;
      if ( !v6 )
        goto LABEL_4;
    }
    v4->vfptr->ClearValue(v4, v6);
    v4->vfptr->SetValue(v4, v6, v3, val);
  }
  else
  {
LABEL_4:
    v7 = v4->vfptr->NewItem(v4);
    v4->vfptr->SetValue(v4, v7, v3, val);
    v7->m_pkNext = v4->m_ppkHashTable[uiIndex];
    v4->m_ppkHashTable[uiIndex] = v7;
    ++v4->m_kAllocator.m_uiCount;
  }
}

//----- (0054E400) --------------------------------------------------------
MiniHouseMenuWin *__thiscall MiniHouseMenuWin::`scalar deleting destructor'(MiniHouseMenuWin *this, unsigned int a2)
{
  MiniHouseMenuWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&MiniHouseMenuWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MiniHouseMenuWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9958E0: using guessed type void (__thiscall *MiniHouseMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9958FC: using guessed type int (__thiscall *MiniHouseMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054E440) --------------------------------------------------------
void __thiscall NpcMarkWin::SetIconDrawRect(NpcMarkWin *this, tagRECT kRect)
{
  this->m_kIconDrawRect = kRect;
}

//----- (0054E470) --------------------------------------------------------
void __thiscall MiniMapMarkWin::MiniMapMarkWin(MiniMapMarkWin *this)
{
  MiniMapMarkWin *v1; // esi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&MiniMapMarkWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MiniMapMarkWin::`vftable'{for `IDirectMessenger'};
}
// 995DE0: using guessed type void (__thiscall *MiniMapMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 995DFC: using guessed type int (__thiscall *MiniMapMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054E490) --------------------------------------------------------
void __thiscall MiniMapMarkWin::~MiniMapMarkWin(MiniMapMarkWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&MiniMapMarkWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MiniMapMarkWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
}
// 995DE0: using guessed type void (__thiscall *MiniMapMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 995DFC: using guessed type int (__thiscall *MiniMapMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054E4B0) --------------------------------------------------------
PgWinSpr *__thiscall MiniMapMarkWin::GetMarkWin(MiniMapMarkWin *this)
{
  return this->m_pkMarkWin;
}

//----- (0054E4C0) --------------------------------------------------------
void __thiscall MainCharMarkWin::MainCharMarkWin(MainCharMarkWin *this)
{
  MainCharMarkWin *v1; // esi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&MainCharMarkWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MainCharMarkWin::`vftable'{for `IDirectMessenger'};
}
// 995FC8: using guessed type void (__thiscall *MainCharMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 995FE4: using guessed type int (__thiscall *MainCharMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054E4E0) --------------------------------------------------------
void __thiscall MainCharMarkWin::~MainCharMarkWin(MainCharMarkWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&MiniMapMarkWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MiniMapMarkWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
}
// 995DE0: using guessed type void (__thiscall *MiniMapMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 995DFC: using guessed type int (__thiscall *MiniMapMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054E500) --------------------------------------------------------
void __thiscall NpcMarkWin::NpcMarkWin(NpcMarkWin *this)
{
  NpcMarkWin *v1; // esi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->m_kCharHandle = -1;
  v1->m_pkQuestStateIngWin = 0;
  v1->m_pkQuestStateAbleWin = 0;
  v1->m_pkQuestStateRewardWin = 0;
  v1->m_pkQuestStateLowAbleWin = 0;
  v1->m_bIconDraw = 0;
  v1->m_pkAutoRunMark = 0;
  v1->vfptr = (NiRefObjectVtbl *)&NpcMarkWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&NpcMarkWin::`vftable'{for `IDirectMessenger'};
}
// 9961B0: using guessed type void (__thiscall *NpcMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9961CC: using guessed type int (__thiscall *NpcMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054E550) --------------------------------------------------------
void __thiscall NpcMarkWin::~NpcMarkWin(NpcMarkWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&MiniMapMarkWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MiniMapMarkWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
}
// 995DE0: using guessed type void (__thiscall *MiniMapMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 995DFC: using guessed type int (__thiscall *MiniMapMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054E570) --------------------------------------------------------
void __userpurge NpcMarkWin::ProcessMeInput(NpcMarkWin *this@<ecx>, unsigned int a2@<edi>, bool *bHit)
{
  NpcMarkWin *v3; // esi@1
  unsigned int v4; // edi@2
  unsigned int v5; // ebx@2
  int yPos; // [sp+4h] [bp-4h]@2

  v3 = this;
  PgWin::ProcessMeInput((PgWin *)&this->vfptr, bHit);
  if ( v3->m_pkAutoRunMark )
  {
    v4 = (unsigned int)v3->vfptr[36].__vecDelDtor((NiRefObject *)v3, a2) >> 1;
    v5 = (unsigned int)((int (__thiscall *)(_DWORD))v3->vfptr[37].__vecDelDtor)(v3) >> 1;
    ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v3->vfptr[53].__vecDelDtor)(v3, &bHit, &yPos);
    bHit -= PgWin::ms_iMsX;
    yPos -= PgWin::ms_iMsY;
    ((void (*)(void))v3->m_pkAutoRunMark->vfptr[64].__vecDelDtor)();
  }
}

//----- (0054E610) --------------------------------------------------------
void __userpurge NpcMarkWin::DrawIcon(NpcMarkWin *this@<ecx>, unsigned int a2@<ebx>, PgWinSpr *pkSprWin)
{
  NpcMarkWin *v3; // edi@1
  char *v4; // ebx@3
  int kRect; // ST0C_4@3
  int v6; // ebx@3
  int v7; // ebx@3
  int v8; // ebx@3
  int v9; // ebx@3
  int v10; // ebx@3
  int v11; // eax@3
  int kRect_4; // [sp+8h] [bp-Ch]@3
  int kRect_8; // [sp+Ch] [bp-8h]@3

  v3 = this;
  if ( this->m_bIconDraw && pkSprWin )
  {
    v4 = (char *)pkSprWin->vfptr[41].__vecDelDtor((NiRefObject *)pkSprWin, a2);
    kRect = (int)&v4[((int (__thiscall *)(_DWORD))v3->vfptr[41].__vecDelDtor)(v3)];
    v6 = ((int (__thiscall *)(_DWORD))pkSprWin->vfptr[42].__vecDelDtor)(pkSprWin);
    kRect_4 = ((int (__thiscall *)(_DWORD))v3->vfptr[42].__vecDelDtor)(v3) + v6;
    v7 = ((int (__thiscall *)(_DWORD))pkSprWin->vfptr[41].__vecDelDtor)(pkSprWin);
    v8 = ((int (__thiscall *)(_DWORD))pkSprWin->vfptr[36].__vecDelDtor)(pkSprWin) + v7;
    kRect_8 = v8 + ((int (__thiscall *)(_DWORD))v3->vfptr[41].__vecDelDtor)(v3);
    v9 = ((int (__thiscall *)(_DWORD))pkSprWin->vfptr[42].__vecDelDtor)(pkSprWin);
    v10 = ((int (__thiscall *)(_DWORD))pkSprWin->vfptr[37].__vecDelDtor)(pkSprWin) + v9;
    v11 = v10 + ((int (__thiscall *)(_DWORD))v3->vfptr[42].__vecDelDtor)(v3);
    if ( kRect <= v3->m_kIconDrawRect.left
      || kRect_4 <= v3->m_kIconDrawRect.top
      || kRect_8 >= v3->m_kIconDrawRect.right
      || v11 >= v3->m_kIconDrawRect.bottom )
    {
      ((void (__thiscall *)(_DWORD))pkSprWin->vfptr[64].__vecDelDtor)(pkSprWin);
    }
    else
    {
      ((void (__thiscall *)(_DWORD))pkSprWin->vfptr[64].__vecDelDtor)(pkSprWin);
    }
  }
}
// 54E610: could not find valid save-restore pair for esi

//----- (0054E720) --------------------------------------------------------
void __thiscall PartyMarkWin::PartyMarkWin(PartyMarkWin *this)
{
  PartyMarkWin *v1; // esi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&PartyMarkWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&PartyMarkWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkInfo = 0;
}
// 99639C: using guessed type void (__thiscall *PartyMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9963BC: using guessed type int (__thiscall *PartyMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054E750) --------------------------------------------------------
void __thiscall PartyMarkWin::~PartyMarkWin(PartyMarkWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&MiniMapMarkWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MiniMapMarkWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
}
// 995DE0: using guessed type void (__thiscall *MiniMapMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 995DFC: using guessed type int (__thiscall *MiniMapMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054E770) --------------------------------------------------------
void __thiscall PartyMarkWin::SetParty(PartyMarkWin *this, PartyMemberInfo *pkInfo)
{
  this->m_pkInfo = pkInfo;
}

//----- (0054E780) --------------------------------------------------------
PartyMemberInfo *__thiscall PartyMarkWin::GetParty(PartyMarkWin *this)
{
  return this->m_pkInfo;
}

//----- (0054E790) --------------------------------------------------------
void __thiscall RaidMarkWin::RaidMarkWin(RaidMarkWin *this)
{
  RaidMarkWin *v1; // esi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&RaidMarkWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&RaidMarkWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkInfo = 0;
}
// 996588: using guessed type void (__thiscall *RaidMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9965A4: using guessed type int (__thiscall *RaidMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054E7C0) --------------------------------------------------------
void __thiscall RaidMarkWin::~RaidMarkWin(RaidMarkWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&MiniMapMarkWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MiniMapMarkWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
}
// 995DE0: using guessed type void (__thiscall *MiniMapMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 995DFC: using guessed type int (__thiscall *MiniMapMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054E7E0) --------------------------------------------------------
void __thiscall RaidMarkWin::SetRaidMember(RaidMarkWin *this, RaidMemberInfo *pkInfo)
{
  this->m_pkInfo = pkInfo;
}

//----- (0054E7F0) --------------------------------------------------------
RaidMemberInfo *__thiscall RaidMarkWin::GetRaidMember(RaidMarkWin *this)
{
  return this->m_pkInfo;
}

//----- (0054E800) --------------------------------------------------------
void __thiscall QuestHelperMarkWin::ProcessMeInput(QuestHelperMarkWin *this, bool *bHit)
{
  QuestHelperMarkWin *v2; // esi@1
  int v3; // edi@3
  signed int v4; // eax@3
  int v5; // ebx@3
  int v6; // eax@3
  NiRefObjectVtbl *v7; // edi@3
  int v8; // eax@3
  bool *bHita; // [sp+Ch] [bp+8h]@3

  v2 = this;
  PgWin::ProcessMeInput((PgWin *)&this->vfptr, bHit);
  if ( v2->m_pkAutoRunMark )
  {
    if ( (unsigned __int8)((int (__thiscall *)(_DWORD, _DWORD, _DWORD))v2->vfptr[87].__vecDelDtor)(
                            v2,
                            PgWin::ms_iMsX,
                            PgWin::ms_iMsY) )
    {
      v3 = ((int (__thiscall *)(_DWORD))v2->vfptr[36].__vecDelDtor)(v2) / 2 + 5;
      v4 = ((int (__thiscall *)(_DWORD))v2->vfptr[37].__vecDelDtor)(v2);
      bHita = (bool *)v2->m_pkAutoRunMark->vfptr;
      v5 = v4 / 2 + 5;
      v6 = ((int (__thiscall *)(_DWORD))v2->vfptr[41].__vecDelDtor)(v2);
      (*((void (__thiscall **)(_DWORD, _DWORD))bHita + 43))(v2->m_pkAutoRunMark, v6 - v3);
      v7 = v2->m_pkAutoRunMark->vfptr;
      v8 = ((int (__thiscall *)(_DWORD))v2->vfptr[42].__vecDelDtor)(v2);
      v7[44].__vecDelDtor((NiRefObject *)v2->m_pkAutoRunMark, v8 - v5);
      ((void (__stdcall *)(_DWORD))v2->m_pkAutoRunMark->vfptr[64].__vecDelDtor)(1);
    }
    else
    {
      ((void (__stdcall *)(_DWORD))v2->m_pkAutoRunMark->vfptr[64].__vecDelDtor)(0);
    }
  }
}

//----- (0054E8F0) --------------------------------------------------------
void __thiscall QuestHelperMarkWin::SetQuestID(QuestHelperMarkWin *this, unsigned __int16 kQuestID)
{
  this->m_kQuestID = kQuestID;
}

//----- (0054E910) --------------------------------------------------------
void __thiscall QuestHelperMarkWin::SetMobID(QuestHelperMarkWin *this, unsigned __int16 Mob_ID)
{
  this->m_MobID = Mob_ID;
}

//----- (0054E930) --------------------------------------------------------
void __thiscall QuestHelperMarkWin::SetPos(QuestHelperMarkWin *this, NiPoint2 kPos)
{
  this->m_kPos = kPos;
}

//----- (0054E950) --------------------------------------------------------
void __thiscall QuestHelperMarkWin::SetQCID(QuestHelperMarkWin *this, unsigned __int16 QC_ID)
{
  this->m_QCID = QC_ID;
}

//----- (0054E970) --------------------------------------------------------
unsigned __int16 __thiscall QuestHelperMarkWin::GetQuestID(QuestHelperMarkWin *this)
{
  return this->m_kQuestID;
}

//----- (0054E980) --------------------------------------------------------
unsigned __int16 __thiscall QuestHelperMarkWin::GetMobID(QuestHelperMarkWin *this)
{
  return this->m_MobID;
}

//----- (0054E990) --------------------------------------------------------
unsigned __int16 __thiscall QuestHelperMarkWin::GetQCID(QuestHelperMarkWin *this)
{
  return this->m_QCID;
}

//----- (0054E9A0) --------------------------------------------------------
void __thiscall QuestHelperMarkWin::GetPos(QuestHelperMarkWin *this, NiPoint2 *kPos)
{
  kPos->x = this->m_kPos.x;
  kPos->y = this->m_kPos.y;
}

//----- (0054E9C0) --------------------------------------------------------
void __thiscall MobAreaMarkWin::~MobAreaMarkWin(MobAreaMarkWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&MiniMapMarkWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MiniMapMarkWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
}
// 995DE0: using guessed type void (__thiscall *MiniMapMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 995DFC: using guessed type int (__thiscall *MiniMapMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054E9E0) --------------------------------------------------------
void __thiscall MobAreaMarkWin::SetQuestID(MobAreaMarkWin *this, unsigned __int16 QuestID)
{
  this->m_QuestID = QuestID;
}

//----- (0054EA00) --------------------------------------------------------
void __thiscall MobAreaMarkWin::SetMobID(MobAreaMarkWin *this, unsigned __int16 MobID)
{
  this->m_MobID = MobID;
}

//----- (0054EA20) --------------------------------------------------------
void __thiscall MobAreaMarkWin::SetPos(MobAreaMarkWin *this, NiPoint2 kPos)
{
  this->m_kPos = kPos;
}

//----- (0054EA40) --------------------------------------------------------
unsigned __int16 __thiscall MobAreaMarkWin::GetQuestID(MobAreaMarkWin *this)
{
  return this->m_QuestID;
}

//----- (0054EA50) --------------------------------------------------------
unsigned __int16 __thiscall MobAreaMarkWin::GetMobID(MobAreaMarkWin *this)
{
  return this->m_MobID;
}

//----- (0054EA60) --------------------------------------------------------
void __thiscall MobAreaMarkWin::GetPos(MobAreaMarkWin *this, NiPoint2 *kPos)
{
  kPos->x = this->m_kPos.x;
  kPos->y = this->m_kPos.y;
}

//----- (0054EA80) --------------------------------------------------------
void __thiscall GTIScanMarkWin::GTIScanMarkWin(GTIScanMarkWin *this)
{
  GTIScanMarkWin *v1; // esi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GTIScanMarkWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GTIScanMarkWin::`vftable'{for `IDirectMessenger'};
}
// 996770: using guessed type void (__thiscall *GTIScanMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99678C: using guessed type int (__thiscall *GTIScanMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054EAA0) --------------------------------------------------------
void __thiscall GTIScanMarkWin::~GTIScanMarkWin(GTIScanMarkWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&MiniMapMarkWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MiniMapMarkWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
}
// 995DE0: using guessed type void (__thiscall *MiniMapMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 995DFC: using guessed type int (__thiscall *MiniMapMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054EAC0) --------------------------------------------------------
void __thiscall GTIScanMarkWin::SetEnemyPos(GTIScanMarkWin *this, ScanMemberInfo pkMemberInfo)
{
  this->m_EenemyPos = pkMemberInfo;
}

//----- (0054EAE0) --------------------------------------------------------
ScanMemberInfo *__thiscall GTIScanMarkWin::GetEnemyPos(GTIScanMarkWin *this)
{
  return &this->m_EenemyPos;
}

//----- (0054EAF0) --------------------------------------------------------
void __thiscall MapMarkWin::~MapMarkWin(MapMarkWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&MiniMapMarkWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MiniMapMarkWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
}
// 995DE0: using guessed type void (__thiscall *MiniMapMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 995DFC: using guessed type int (__thiscall *MiniMapMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054EB10) --------------------------------------------------------
void __thiscall MapMarkWin::SetLifeTime(MapMarkWin *this, float fTime)
{
  this->m_fLifeTime = fTime;
}

//----- (0054EB20) --------------------------------------------------------
BOOL __thiscall MapMarkWin::IsPassLifeTime(MapMarkWin *this, float fTime)
{
  return fTime > (double)this->m_fLifeTime;
}

//----- (0054EB50) --------------------------------------------------------
void __thiscall MapMarkWin::SetPos(MapMarkWin *this, NiPoint2 *kPos)
{
  this->m_kPos = *kPos;
}

//----- (0054EB70) --------------------------------------------------------
NiPoint2 *__thiscall MapMarkWin::GetPos(MapMarkWin *this)
{
  return &this->m_kPos;
}

//----- (0054EB80) --------------------------------------------------------
void __thiscall KQTeamMarkWin::KQTeamMarkWin(KQTeamMarkWin *this)
{
  KQTeamMarkWin *v1; // esi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&KQTeamMarkWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&KQTeamMarkWin::`vftable'{for `IDirectMessenger'};
}
// 996958: using guessed type void (__thiscall *KQTeamMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 996974: using guessed type int (__thiscall *KQTeamMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054EBA0) --------------------------------------------------------
void __thiscall KQTeamMarkWin::~KQTeamMarkWin(KQTeamMarkWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&MiniMapMarkWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MiniMapMarkWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
}
// 995DE0: using guessed type void (__thiscall *MiniMapMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 995DFC: using guessed type int (__thiscall *MiniMapMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054EBC0) --------------------------------------------------------
void __thiscall KQTeamMarkWin::SetCharHandle(KQTeamMarkWin *this, unsigned __int16 kCharHandle)
{
  this->m_kCharHandle = kCharHandle;
}

//----- (0054EBE0) --------------------------------------------------------
unsigned __int16 __thiscall KQTeamMarkWin::GetCharHandle(KQTeamMarkWin *this)
{
  return this->m_kCharHandle;
}

//----- (0054EBF0) --------------------------------------------------------
void __thiscall MiniMapWin::SetMapTexture(MiniMapWin *this, NiSourceTexture *pkTexture)
{
  MiniMapWin *v2; // esi@1
  double v3; // st7@2
  FullMapWin *v4; // ecx@4

  v2 = this;
  MaskedWin::SetBaseTexture(this->m_pkMiniMapWin, (NiTexture *)&pkTexture->vfptr);
  if ( pkTexture )
  {
    v2->m_fTextureWidth = (double)(unsigned int)((int (__thiscall *)(NiSourceTexture *))pkTexture->vfptr[15].__vecDelDtor)(pkTexture)
                        * v2->m_fMiniMapScale;
    v2->m_fTextureHeight = (double)(unsigned int)((int (__thiscall *)(NiSourceTexture *))pkTexture->vfptr[16].__vecDelDtor)(pkTexture)
                         * v2->m_fMiniMapScale;
    v3 = v2->m_fViewWidth / v2->m_fTextureWidth;
  }
  else
  {
    v2->m_fTextureWidth = 512.0;
    v2->m_fTextureHeight = 512.0;
    v3 = 0.3125;
  }
  v4 = v2->m_pkFullMapWin;
  v2->m_fMap2FullMapRate = v3;
  FullMapWin::ResetView(v4, 0);
}

//----- (0054ECA0) --------------------------------------------------------
void __thiscall MiniMapWin::SetMapShift(MiniMapWin *this, float fX, float fY)
{
  this->m_fShiftX = 0.0;
  this->m_fShiftY = 0.0;
}

//----- (0054ECC0) --------------------------------------------------------
void __thiscall MiniMapWin::SetMapScale(MiniMapWin *this, float fScale)
{
  this->m_fMiniMapScale = fScale;
  FullMapWin::SetMapScale(this->m_pkFullMapWin, fScale);
}

//----- (0054ED00) --------------------------------------------------------
void __thiscall MiniMapWin::SetFullModeTextureUVs(MiniMapWin *this)
{
  MiniMapWin *v1; // esi@1

  v1 = this;
  MaskedWin::SetBaseTextureMatrix(this->m_pkMiniMapWin, 0.0, 0.0, 1.0, 1.0);
  NiAVObject::Update((NiAVObject *)&v1->vfptr, 0.0, 0);
}

//----- (0054ED40) --------------------------------------------------------
void __thiscall MiniMapWin::SetZoomModeTextureUVs(MiniMapWin *this)
{
  MiniMapWin *v1; // esi@1
  double v2; // st7@2
  float fZoom; // ST28_4@4
  int v4; // eax@4
  float fViewWidth; // ST24_4@4
  float v6; // ST28_4@4
  float fUVTop; // ST18_4@4
  float fTexViewHeight; // ST14_4@4
  float v9; // ST24_4@4
  float v10; // ST28_4@4
  float fUVLeft; // ST20_4@4
  float v12; // ST20_4@4
  float fMapTop; // ST1C_4@4
  float v14; // ST1C_4@4
  double v15; // st5@4
  double v16; // st4@4
  float v17; // ST20_4@4
  float v18; // ST18_4@4
  double v19; // st7@4
  float v20; // ST14_4@4
  float v21; // ST14_4@4
  float v22; // ST14_4@4
  float fScaleY; // ST0C_4@4
  float v24; // ST14_4@4
  float v25; // ST14_4@4
  float v26; // ST14_4@4

  v1 = this;
  if ( this->m_eMode )
    v2 = 0.40000001;
  else
    v2 = 0.69999999;
  fZoom = v2;
  v4 = this->m_kMapViewRect.top;
  fViewWidth = (double)(this->m_kMapViewRect.right - this->m_kMapViewRect.left + 1);
  v6 = 0.001953125 * fViewWidth * fZoom;
  fUVTop = fViewWidth * this->m_fMiniMapScale;
  fTexViewHeight = (double)(this->m_kMapViewRect.bottom - v4 + 1) * this->m_fMiniMapScale;
  v9 = this->m_fViewWidth * v6;
  v10 = v6 * this->m_fViewHeight;
  fUVLeft = (double)this->m_kMapViewRect.left * this->m_fMiniMapScale;
  v12 = this->m_fMapCharX - v9 * 0.5 - fUVLeft;
  fMapTop = (double)v4 * this->m_fMiniMapScale;
  v14 = this->m_fTextureHeight - (fMapTop + this->m_fMapCharY) - 0.5 * v10;
  v15 = v12;
  v16 = fUVTop;
  v17 = v12 / fUVTop;
  v18 = v14 / fTexViewHeight;
  v19 = fTexViewHeight;
  v20 = v10 + v14;
  v21 = v20 / v19;
  v22 = v21 - v18;
  fScaleY = v22;
  v24 = v9 + v15;
  v25 = v24 / v16;
  v26 = v25 - v17;
  MaskedWin::SetBaseTextureMatrix(this->m_pkMiniMapWin, v17, v18, v26, fScaleY);
  NiAVObject::Update((NiAVObject *)&v1->vfptr, 0.0, 0);
}

//----- (0054EED0) --------------------------------------------------------
void __thiscall MiniMapWin::Add_KQ_MOB(MiniMapWin *this, PROTO_NC_BRIEFINFO_REGENMOB_CMD *pkProto)
{
  FullMapWin::Add_KQ_MOB(this->m_pkFullMapWin, pkProto);
}

//----- (0054EEE0) --------------------------------------------------------
void __thiscall MiniMapWin::Remove_KQ_MOB(MiniMapWin *this, bool b)
{
  FullMapWin::Remove_KQ_MOB(this->m_pkFullMapWin, b);
}

//----- (0054EEF0) --------------------------------------------------------
bool __thiscall MiniMapWin::GetWinPos(MiniMapWin *this, float fCharWorldX, float fCharWorldY, float *rfXPos, float *rfYPos)
{
  MiniMapWin *v5; // esi@1
  float v6; // ST10_4@4
  double v7; // st7@2
  float *v8; // edi@4
  double v9; // st7@4
  float v10; // ST08_4@4
  bool result; // al@5
  float v12; // ST08_4@6
  double v13; // st7@8
  float *v14; // ebx@10
  double v15; // st6@10
  int v16; // esi@10
  int v17; // edi@10
  int v18; // [sp-8h] [bp-14h]@0
  int v19; // [sp-4h] [bp-10h]@0
  float fMapCharY; // [sp+0h] [bp-Ch]@1
  float *v21; // [sp+4h] [bp-8h]@6
  float fMapCharX; // [sp+8h] [bp-4h]@4
  float fPlayerMiniMapGapa; // [sp+14h] [bp+8h]@7
  float fPlayerMiniMapGap; // [sp+14h] [bp+8h]@7
  float fPlayerMiniMapGapb; // [sp+14h] [bp+8h]@10
  float fZooma; // [sp+18h] [bp+Ch]@4
  float fZoomb; // [sp+18h] [bp+Ch]@4
  float fZoom; // [sp+18h] [bp+Ch]@4
  float *fZoomc; // [sp+18h] [bp+Ch]@10

  v5 = this;
  fMapCharY = 0.01999999955296516 * fCharWorldY;
  if ( this->m_eMode )
    v7 = 0.40000001;
  else
    v7 = 0.69999999;
  fZooma = v7;
  v8 = &this->m_fViewWidth;
  fZoomb = (double)(this->m_kMapViewRect.right - this->m_kMapViewRect.left + 1) * 0.001953125 * fZooma;
  v9 = fZoomb;
  v6 = fCharWorldX * 0.01999999955296516;
  fZoom = (v6 - this->m_fMapCharX) / fZoomb;
  fMapCharX = (fMapCharY - this->m_fMapCharY) / v9;
  v10 = fabs(fZoom);
  if ( v10 > this->m_fViewWidth * 0.5
    || (v21 = &this->m_fViewHeight, v12 = fabs(fMapCharX), v12 > 0.5 * this->m_fViewHeight) )
  {
    result = 0;
  }
  else
  {
    fPlayerMiniMapGapa = fCharWorldX
                       - *(float *)((int (__stdcall *)(int, int))g_pkMainChar->vfptr[6].Deaffect)(v18, v19);
    fPlayerMiniMapGap = fPlayerMiniMapGapa * 0.01999999955296516;
    if ( v5->m_eMode )
    {
      v13 = 0.5;
    }
    else
    {
      v13 = 0.5;
      fPlayerMiniMapGap = fPlayerMiniMapGap * 0.5;
    }
    v14 = &v5->m_fViewLeft;
    v15 = *v8 * v13 + v5->m_fViewLeft + fZoom;
    fZoomc = &v5->m_fViewTop;
    *rfXPos = v15 + fPlayerMiniMapGap;
    fPlayerMiniMapGapb = v13 + *v21 * v13 + v5->m_fViewTop - fMapCharX;
    *rfYPos = fPlayerMiniMapGapb;
    v16 = (signed int)*v8 / 2;
    v17 = (signed int)*rfXPos - (signed int)*v14 - v16;
    result = v17 * v17
           + ((signed int)fPlayerMiniMapGapb - (signed int)*v21 / 2 - (signed int)*fZoomc)
           * ((signed int)fPlayerMiniMapGapb - (signed int)*v21 / 2 - (signed int)*fZoomc) < v16 * v16 - 900;
  }
  return result;
}
// 54EEF0: could not find valid save-restore pair for ebx

//----- (0054F0B0) --------------------------------------------------------
void __thiscall MiniMapWin::SetMapViewRect(MiniMapWin *this, unsigned int dwLeft, unsigned int dwTop, unsigned int dwRight, unsigned int dwBottom)
{
  this->m_kMapViewRect.left = dwLeft;
  this->m_kMapViewRect.top = dwTop;
  this->m_kMapViewRect.right = dwRight;
  this->m_kMapViewRect.bottom = dwBottom;
  FullMapWin::SetMapViewRect(this->m_pkFullMapWin, dwLeft, dwTop, dwRight, dwBottom);
}

//----- (0054F0F0) --------------------------------------------------------
void __thiscall MiniMapWin::OnDestroy(MiniMapWin *this)
{
  MiniMapWin *v1; // esi@1

  v1 = this;
  PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkFullMapWin->vfptr);
  v1->m_pkFullMapWin = 0;
}

//----- (0054F110) --------------------------------------------------------
WorldMapWin *__thiscall MiniMapWin::GetWorldMap(MiniMapWin *this)
{
  return FullMapWin::GetWorldMap(this->m_pkFullMapWin);
}

//----- (0054F120) --------------------------------------------------------
void __thiscall MiniMapWin::OpenFullWorldMap(MiniMapWin *this)
{
  MiniMapWin *v1; // esi@1
  WorldMapWin *v2; // eax@1
  char v3; // al@2
  FullMapWin *v4; // ecx@2

  v1 = this;
  v2 = FullMapWin::GetWorldMap(this->m_pkFullMapWin);
  if ( v2 )
  {
    v3 = ((int (__thiscall *)(WorldMapWin *))v2->vfptr[65].__vecDelDtor)(v2);
    v4 = v1->m_pkFullMapWin;
    if ( v3 )
      FullMapWin::CloseWorldMap(v4);
    else
      FullMapWin::OpenWorldMap(v4);
  }
}

//----- (0054F160) --------------------------------------------------------
void __thiscall MiniMapWin::ShowGTQuit(MiniMapWin *this, bool b)
{
  MiniMapWin *v2; // esi@1
  void *(__thiscall *v3)(NiRefObject *, unsigned int); // edx@1
  int v4; // [sp+0h] [bp-4h]@0

  v2 = this;
  v3 = this->m_pkGTQuitBut->vfptr[64].__vecDelDtor;
  if ( b )
  {
    ((void (__stdcall *)(signed int, int))v3)(1, v4);
    ((void (__stdcall *)(signed int))v2->m_pkGTTQuitText->vfptr[64].__vecDelDtor)(1);
    ((void (__cdecl *)(signed int))v2->m_pkGTQuitPanel->vfptr[64].__vecDelDtor)(1);
  }
  else
  {
    ((void (__stdcall *)(_DWORD, int))v3)(0, v4);
    ((void (__stdcall *)(_DWORD))v2->m_pkGTTQuitText->vfptr[64].__vecDelDtor)(0);
    ((void (__cdecl *)(_DWORD))v2->m_pkGTQuitPanel->vfptr[64].__vecDelDtor)(0);
  }
}

//----- (0054F1D0) --------------------------------------------------------
void __stdcall MiniMapWin::DirectMessage(int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  CClientGuild *v4; // eax@4

  if ( iMsgTag == 27 && pvBody && !*(_DWORD *)pvBody )
  {
    v4 = GuildTask::GetGuild();
    if ( v4 )
    {
      BYTE3(iMsgTag) = v4->m_iGTObserverSeedNum;
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x1Du, 0xDBu, (char *)&iMsgTag + 3, 1);
    }
  }
}

//----- (0054F220) --------------------------------------------------------
void __thiscall MiniMapWin::AddQuestHelper(MiniMapWin *this)
{
  MiniMapWin *v1; // esi@1

  v1 = this;
  FullMapWin::ResetView(this->m_pkFullMapWin, 0);
  FullMapWin::AddQuestHelper(v1->m_pkFullMapWin);
}

//----- (0054F240) --------------------------------------------------------
bool __thiscall MiniMapMarkWin::HitTest(MiniMapMarkWin *this, int iSx, int iSy)
{
  MiniMapMarkWin *v3; // esi@1
  int v4; // eax@2
  int v5; // eax@4
  bool result; // al@5
  int v7; // [sp+4h] [bp-8h]@1
  int v8; // [sp+8h] [bp-4h]@1

  v3 = this;
  v7 = iSy + ((unsigned int)((int (*)(void))this->vfptr[37].__vecDelDtor)() >> 1);
  v8 = iSx + ((unsigned int)((int (__thiscall *)(MiniMapMarkWin *))v3->vfptr[36].__vecDelDtor)(v3) >> 1);
  ((void (__thiscall *)(MiniMapMarkWin *, int *, int *))v3->vfptr[56].__vecDelDtor)(v3, &v8, &v7);
  result = 0;
  if ( v8 >= 0 )
  {
    v4 = ((int (__thiscall *)(MiniMapMarkWin *))v3->vfptr[36].__vecDelDtor)(v3);
    if ( v8 < v4 && v7 >= 0 )
    {
      v5 = ((int (__thiscall *)(MiniMapMarkWin *))v3->vfptr[37].__vecDelDtor)(v3);
      if ( v7 < v5 )
        result = 1;
    }
  }
  return result;
}

//----- (0054F2D0) --------------------------------------------------------
void __userpurge NpcMarkWin::UpdateMeWin(NpcMarkWin *this@<ecx>, unsigned int a2@<ebx>, int a3@<edi>, float fCurTime)
{
  NpcMarkWin *v4; // esi@1
  Char *v5; // edi@2
  unsigned int v6; // ST10_4@3
  CClientQuest *v7; // eax@3
  CQuest *v8; // ebx@3
  unsigned int v9; // eax@3
  unsigned int v10; // ebx@3
  PgWinSpr *v11; // ecx@6
  PgWinSpr *v12; // ecx@7
  int v13; // [sp-4h] [bp-18h]@2
  CQuest::NPC_QUEST_STATUS kNpcState; // [sp+4h] [bp-10h]@3

  v4 = this;
  if ( this->m_pkQuestStateIngWin )
  {
    v13 = a3;
    ((void (__stdcall *)(_DWORD))this->m_pkQuestStateIngWin->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v4->m_pkQuestStateAbleWin->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v4->m_pkQuestStateRewardWin->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v4->m_pkQuestStateLowAbleWin->vfptr[64].__vecDelDtor)(0);
    v5 = CharMgr::GetChar(&g_kCharMgr, v4->m_kCharHandle);
    if ( v5 )
    {
      v6 = a2;
      v7 = QuestDataMgr::GetQuest();
      kNpcState.hID = v5->m_kCharShape.m_kMobID;
      v8 = (CQuest *)v7;
      v9 = User::Lv(&g_kUser);
      CQuest::GetQuestStatusWithNPC(v8, &kNpcState, PQS_ING, v9, 0);
      v10 = v6;
      if ( kNpcState.hID != -1 )
      {
        switch ( kNpcState.eResultState )
        {
          case 4:
          case 5:
          case 0x14:
            if ( !(unsigned __int8)((int (*)(void))v4->m_pkQuestStateRewardWin->vfptr[65].__vecDelDtor)() )
            {
              ((void (__stdcall *)(signed int, int))v4->m_pkQuestStateAbleWin->vfptr[64].__vecDelDtor)(1, v13);
              v11 = v4->m_pkQuestStateIngWin;
              goto LABEL_7;
            }
            break;
          case 8:
            ((void (__stdcall *)(signed int, int))v4->m_pkQuestStateRewardWin->vfptr[64].__vecDelDtor)(1, v13);
            ((void (__stdcall *)(_DWORD))v4->m_pkQuestStateIngWin->vfptr[64].__vecDelDtor)(0);
            v11 = v4->m_pkQuestStateAbleWin;
LABEL_7:
            ((void (__cdecl *)(_DWORD))v11->vfptr[64].__vecDelDtor)(0);
            v12 = v4->m_pkQuestStateLowAbleWin;
            goto LABEL_15;
          case 6:
            if ( !(unsigned __int8)((int (*)(void))v4->m_pkQuestStateRewardWin->vfptr[65].__vecDelDtor)()
              && !(unsigned __int8)((int (*)(void))v4->m_pkQuestStateAbleWin->vfptr[65].__vecDelDtor)()
              && !(unsigned __int8)((int (*)(void))v4->m_pkQuestStateLowAbleWin->vfptr[65].__vecDelDtor)() )
            {
              ((void (__stdcall *)(signed int))v4->m_pkQuestStateIngWin->vfptr[64].__vecDelDtor)(1);
            }
            break;
          case 9:
            if ( !(unsigned __int8)((int (*)(void))v4->m_pkQuestStateRewardWin->vfptr[65].__vecDelDtor)() )
            {
              ((void (__stdcall *)(signed int))v4->m_pkQuestStateLowAbleWin->vfptr[64].__vecDelDtor)(1);
              ((void (__stdcall *)(_DWORD))v4->m_pkQuestStateAbleWin->vfptr[64].__vecDelDtor)(0);
              v12 = v4->m_pkQuestStateIngWin;
LABEL_15:
              ((void (__stdcall *)(_DWORD))v12->vfptr[64].__vecDelDtor)(0);
            }
            break;
          default:
            break;
        }
        if ( PgWin::IsVisible((PgWin *)&v4->m_pkQuestStateIngWin->vfptr) )
        {
          NpcMarkWin::DrawIcon(v4, v10, v4->m_pkQuestStateIngWin);
        }
        else if ( PgWin::IsVisible((PgWin *)&v4->m_pkQuestStateAbleWin->vfptr) )
        {
          NpcMarkWin::DrawIcon(v4, v10, v4->m_pkQuestStateAbleWin);
        }
        else if ( PgWin::IsVisible((PgWin *)&v4->m_pkQuestStateRewardWin->vfptr) )
        {
          NpcMarkWin::DrawIcon(v4, v10, v4->m_pkQuestStateRewardWin);
        }
        else if ( PgWin::IsVisible((PgWin *)&v4->m_pkQuestStateLowAbleWin->vfptr) )
        {
          NpcMarkWin::DrawIcon(v4, v10, v4->m_pkQuestStateLowAbleWin);
        }
      }
    }
  }
}
// 54F2D0: could not find valid save-restore pair for ebx
// 54F2D0: could not find valid save-restore pair for edi

//----- (0054F570) --------------------------------------------------------
bool __thiscall NpcMarkWin::HitTest(NpcMarkWin *this, int iSx, int iSy)
{
  NpcMarkWin *v3; // esi@1
  int v4; // eax@2
  int v5; // eax@4
  bool result; // al@5
  int v7; // [sp+4h] [bp-8h]@1
  int v8; // [sp+8h] [bp-4h]@1

  v3 = this;
  v7 = iSy + ((int (*)(void))this->vfptr[37].__vecDelDtor)();
  v8 = iSx + ((int (__thiscall *)(NpcMarkWin *))v3->vfptr[36].__vecDelDtor)(v3);
  ((void (__thiscall *)(NpcMarkWin *, int *, int *))v3->vfptr[56].__vecDelDtor)(v3, &v8, &v7);
  result = 0;
  if ( v8 >= 0 )
  {
    v4 = ((int (__thiscall *)(NpcMarkWin *))v3->vfptr[36].__vecDelDtor)(v3);
    if ( v8 < v4 && v7 >= 0 )
    {
      v5 = ((int (__thiscall *)(NpcMarkWin *))v3->vfptr[37].__vecDelDtor)(v3);
      if ( v7 < v5 )
        result = 1;
    }
  }
  return result;
}

//----- (0054F5F0) --------------------------------------------------------
void __thiscall QuestHelperMarkWin::QuestHelperMarkWin(QuestHelperMarkWin *this)
{
  QuestHelperMarkWin *v1; // esi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->m_pkQuestHelperWin = 0;
  v1->m_pkAutoRunMark = 0;
  v1->vfptr = (NiRefObjectVtbl *)&QuestHelperMarkWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&QuestHelperMarkWin::`vftable'{for `IDirectMessenger'};
  v1->m_kQuestID = -1;
}
// 996B74: using guessed type void (__thiscall *QuestHelperMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 996B94: using guessed type int (__thiscall *QuestHelperMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054F630) --------------------------------------------------------
void __thiscall MobAreaMarkWin::MobAreaMarkWin(MobAreaMarkWin *this)
{
  MobAreaMarkWin *v1; // esi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&MobAreaMarkWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MobAreaMarkWin::`vftable'{for `IDirectMessenger'};
}
// 996D64: using guessed type void (__thiscall *MobAreaMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 996D84: using guessed type int (__thiscall *MobAreaMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054F650) --------------------------------------------------------
void __thiscall MapMarkWin::MapMarkWin(MapMarkWin *this)
{
  MapMarkWin *v1; // esi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&MapMarkWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MapMarkWin::`vftable'{for `IDirectMessenger'};
}
// 996F50: using guessed type void (__thiscall *MapMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 996F6C: using guessed type int (__thiscall *MapMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0054F670) --------------------------------------------------------
void __thiscall MiniMapWin::SetZoomButStateByMode(MiniMapWin *this)
{
  MiniMapWin *v1; // esi@1

  v1 = this;
  if ( this->m_eMode )
  {
    ((void (__stdcall *)(_DWORD))this->m_spZoomInBut.m_pObject->vfptr[60].__vecDelDtor)(0);
    v1->m_spZoomInBut.m_pObject->m_uFlags |= 1u;
    ((void (__stdcall *)(_DWORD))v1->m_spZoomOutBut.m_pObject->vfptr[60].__vecDelDtor)(1);
    v1->m_spZoomOutBut.m_pObject->m_uFlags &= 0xFFFEu;
  }
  else
  {
    ((void (__stdcall *)(_DWORD))this->m_spZoomOutBut.m_pObject->vfptr[60].__vecDelDtor)(0);
    v1->m_spZoomOutBut.m_pObject->m_uFlags |= 1u;
    ((void (__stdcall *)(_DWORD))v1->m_spZoomInBut.m_pObject->vfptr[60].__vecDelDtor)(1);
    v1->m_spZoomInBut.m_pObject->m_uFlags &= 0xFFFEu;
  }
}

//----- (0054F700) --------------------------------------------------------
void __thiscall MiniMapWin::OnSchedule(MiniMapWin *this)
{
  GameFrameWork::OpenKDQuestWin((GameFrameWork *)this->m_pkFrameWork, 1);
}

//----- (0054F710) --------------------------------------------------------
void __thiscall MiniMapWin::UpdateMainCharPos(MiniMapWin *this)
{
  MiniMapWin *v1; // esi@1
  int v2; // eax@1
  float v3; // ecx@1
  float v4; // edx@1
  int v5; // eax@1
  MainCharMarkWin *v6; // edi@1
  double v7; // st6@1
  double v8; // st7@1
  int v9; // [sp+0h] [bp-18h]@0

  v1 = this;
  v2 = ((int (__stdcall *)(int))g_pkMainChar->vfptr[6].Deaffect)(v9);
  v3 = *(float *)v2;
  v4 = *(float *)(v2 + 4);
  v5 = *(_DWORD *)(v2 + 8);
  v6 = v1->m_pkMainCharMarkWin;
  v1->m_fMainCharWorldX = v3;
  v1->m_fMainCharWorldY = v4;
  v1->m_fMapCharX = v3 * 0.01999999955296516;
  v1->m_fMapCharY = 0.01999999955296516 * v4;
  v7 = v1->m_fViewHeight * 0.5 + v1->m_fViewTop;
  v8 = 0.5 * v1->m_fViewWidth + v1->m_fViewLeft;
  ((void (__thiscall *)(MainCharMarkWin *))v6->vfptr[77].__vecDelDtor)(v6);
  MiniMapWin::SetZoomModeTextureUVs(v1);
}

//----- (0054F7E0) --------------------------------------------------------
void __thiscall MiniMapWin::UpdateMainCharDir(MiniMapWin *this)
{
  MiniMapWin *v1; // esi@1
  Mover *v2; // eax@1
  NiPoint3 kDir; // [sp+4h] [bp-34h]@2
  NiMatrix3 kMat; // [sp+10h] [bp-28h]@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[6].GetAbstateColor)(&kMat);
  v2 = g_pkMainChar->m_pkMover;
  if ( v2 )
    ((void (__thiscall *)(_DWORD, _DWORD))v2->vfptr[6].~AbStateInfectee)(v2, &kDir);
  else
    ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[6].~AbStateInfectee)(&kDir);
  kDir.y = -kDir.y;
  kDir.z = -kDir.z;
  NpNs_RotateModelZToVector(&kDir, &kMat);
  ((void (__stdcall *)(_DWORD))v1->m_pkMainCharMarkWin->vfptr[74].__vecDelDtor)(&kMat);
}

//----- (0054F880) --------------------------------------------------------
void __thiscall MiniMapWin::UpdatePartyPos(MiniMapWin *this)
{
  void **v1; // eax@1
  float *v2; // esi@4
  int v3; // edi@5
  _BYTE v4[20]; // ST00_20@8
  Char *v5; // eax@8
  Char *v6; // ebx@8
  double v7; // st7@10
  int v8; // ecx@13
  int v9; // edx@13
  int v10; // eax@13
  float v11; // edx@13
  NiPoint3 kPos; // [sp+1Ch] [bp-30h]@10
  float v13; // [sp+28h] [bp-24h]@13
  float v14; // [sp+2Ch] [bp-20h]@13
  float fYPos; // [sp+34h] [bp-18h]@12
  float fXPos; // [sp+38h] [bp-14h]@12
  MiniMapWin *v17; // [sp+3Ch] [bp-10h]@1
  void *kIter; // [sp+40h] [bp-Ch]@3
  float x; // [sp+44h] [bp-8h]@10
  float y; // [sp+48h] [bp-4h]@12

  v1 = (void **)&this->m_kPartyList.m_pkHead->m_pkNext;
  v17 = this;
  if ( v1 )
  {
    while ( 1 )
    {
      v2 = (float *)v1[2];
      kIter = *v1;
      if ( v2 )
      {
        v3 = *((_DWORD *)v2 + 73);
        if ( !v3 )
          return;
        if ( *(_BYTE *)(v3 + 64) )
        {
          *(_DWORD *)v4 = *(_DWORD *)v3;
          *(_QWORD *)&v4[4] = *(_QWORD *)(v3 + 4);
          *(_QWORD *)&v4[12] = *(_QWORD *)(v3 + 12);
          v5 = CharMgr::GetChar(&g_kCharMgr, *(Name5 *)v4);
          v6 = v5;
          if ( v5 && Char::IsUpdate(v5) )
          {
            ((void (__thiscall *)(Char *, NiPoint3 *))v6->vfptr[6].SetAbStateProperty)(v6, &kPos);
            x = kPos.x;
            v7 = kPos.y;
          }
          else
          {
            x = *(float *)(v3 + 56);
            v7 = *(float *)(v3 + 60);
          }
          y = v7;
          if ( MiniMapWin::GetWinPos(v17, x, y, &fXPos, &fYPos) == 1 )
          {
            (*(void (__thiscall **)(float *, signed int))(*(_DWORD *)v2 + 256))(v2, 1);
            v8 = *((_DWORD *)v2 + 22);
            v9 = *((_DWORD *)v2 + 23);
            v10 = *((_DWORD *)v2 + 24);
            v13 = fXPos;
            v14 = fYPos;
            v11 = fYPos;
            v2[22] = fXPos;
            v2[23] = v11;
            *((_DWORD *)v2 + 24) = v10;
          }
          else
          {
            (*(void (__thiscall **)(float *, _DWORD))(*(_DWORD *)v2 + 256))(v2, 0);
          }
        }
        else
        {
          (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v2 + 256))(v2, 0);
        }
      }
      if ( !kIter )
        break;
      v1 = (void **)kIter;
    }
  }
}

//----- (0054F9C0) --------------------------------------------------------
char __thiscall MiniMapWin::IsInNPC(MiniMapWin *this, unsigned __int16 kCharHandle)
{
  NiTListItem<NpcMarkWin *> *v2; // eax@1
  NpcMarkWin *v3; // ecx@2
  char result; // al@5

  v2 = this->m_kNpcList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      v2 = v2->m_pkNext;
      if ( v3 )
      {
        if ( v3->m_kCharHandle == kCharHandle )
          break;
      }
      if ( !v2 )
        goto LABEL_5;
    }
    result = 1;
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (0054FA00) --------------------------------------------------------
char __thiscall MiniMapWin::IsInParty(MiniMapWin *this, PartyMemberInfo *pkInfo)
{
  NiTListItem<PartyMarkWin *> *v2; // eax@1
  PartyMarkWin *v3; // ecx@2
  char result; // al@5

  v2 = this->m_kPartyList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      v2 = v2->m_pkNext;
      if ( v3 )
      {
        if ( v3->m_pkInfo == pkInfo )
          break;
      }
      if ( !v2 )
        goto LABEL_5;
    }
    result = 1;
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (0054FA40) --------------------------------------------------------
PartyMarkWin *__thiscall MiniMapWin::FindPartyWin(MiniMapWin *this, PartyMemberInfo *pkInfo)
{
  NiTListItem<PartyMarkWin *> *v2; // ecx@1
  PartyMarkWin *result; // eax@2

  v2 = this->m_kPartyList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      result = v2->m_element;
      v2 = v2->m_pkNext;
      if ( result )
      {
        if ( result->m_pkInfo == pkInfo )
          break;
      }
      if ( !v2 )
        goto LABEL_5;
    }
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (0054FA70) --------------------------------------------------------
void __thiscall MiniMapWin::UpdateNPCPos(MiniMapWin *this)
{
  MiniMapWin *v1; // esi@1
  NiTListItem<NpcMarkWin *> *v2; // eax@1
  NpcMarkWin *v3; // edi@4
  Char *v4; // eax@5
  int v5; // eax@6
  float kPos; // ST1C_4@11
  int kPos_8; // ST24_4@6
  float v8; // ST38_4@9
  float v9; // ST28_4@9
  double v10; // st7@7
  float v11; // ST44_4@9
  float v12; // ST44_4@9
  float v13; // ST28_4@9
  float v14; // ST28_4@10
  float v15; // ST28_4@11
  double v16; // st7@12
  double v17; // st7@14
  int v18; // esi@14
  int v19; // edi@14
  float v20; // ecx@17
  float v21; // edx@17
  float v22; // eax@17
  NiTListItem<NpcMarkWin *> *kIter; // [sp+20h] [bp-1Ch]@4
  NpcMarkWin *pkWin; // [sp+24h] [bp-18h]@4
  float *v25; // [sp+28h] [bp-14h]@10
  float fYPos; // [sp+2Ch] [bp-10h]@9
  float fYPosa; // [sp+2Ch] [bp-10h]@14
  float fXPos; // [sp+30h] [bp-Ch]@9
  float fXPosa; // [sp+30h] [bp-Ch]@14
  MiniMapWin *v30; // [sp+34h] [bp-8h]@1
  float v31; // [sp+38h] [bp-4h]@11

  v1 = this;
  v2 = this->m_kNpcList.m_pkHead;
  v30 = this;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      kIter = v2->m_pkNext;
      pkWin = v3;
      if ( v3 )
      {
        v4 = CharMgr::GetChar(&g_kCharMgr, v3->m_kCharHandle);
        if ( v4 )
        {
          v5 = ((int (__thiscall *)(Char *))v4->vfptr[6].Deaffect)(v4);
          kPos_8 = *(_DWORD *)(v5 + 8);
          if ( v1->m_eMode )
            v10 = 0.40000001;
          else
            v10 = 0.69999999;
          v11 = v10;
          v12 = (double)(v1->m_kMapViewRect.right - v1->m_kMapViewRect.left + 1) * 0.001953125 * v11;
          v8 = *(float *)v5 * 0.01999999955296516;
          fXPos = (v8 - v1->m_fMapCharX) / v12;
          v9 = 0.01999999955296516 * *(float *)(v5 + 4);
          fYPos = (v9 - v1->m_fMapCharY) / v12;
          v13 = fabs(fXPos);
          if ( v13 > v1->m_fViewWidth * 0.5 )
            goto LABEL_19;
          v25 = &v1->m_fViewHeight;
          v14 = fabs(fYPos);
          if ( v14 > 0.5 * v1->m_fViewHeight )
            goto LABEL_19;
          kPos = *(float *)v5;
          v15 = kPos - *(float *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
          v31 = v15 * 0.01999999955296516;
          if ( v1->m_eMode )
          {
            v16 = 0.5;
          }
          else
          {
            v16 = 0.5;
            v31 = v31 * 0.5;
          }
          fXPosa = v1->m_fViewWidth * v16 + v1->m_fViewLeft + fXPos + v31;
          fYPosa = v16 + *v25 * v16 + v1->m_fViewTop - fYPos;
          v17 = v1->m_fViewLeft;
          v18 = (signed int)v1->m_fViewWidth / 2;
          v19 = (signed int)fXPosa - (signed int)v17 - v18;
          if ( v19 * v19
             + ((signed int)fYPosa - (signed int)*v25 / 2 - (signed int)v30->m_fViewTop)
             * ((signed int)fYPosa - (signed int)*v25 / 2 - (signed int)v30->m_fViewTop) < v18 * v18 - 900 != 1 )
          {
            v3 = pkWin;
            v1 = v30;
LABEL_19:
            v3->vfptr[64].__vecDelDtor((NiRefObject *)v3, 0);
            goto LABEL_20;
          }
          if ( !(unsigned __int8)((int (__thiscall *)(NpcMarkWin *))pkWin->vfptr[65].__vecDelDtor)(pkWin) )
            pkWin->vfptr[64].__vecDelDtor((NiRefObject *)pkWin, 1u);
          v20 = pkWin->m_kLocal.m_Translate.x;
          v21 = pkWin->m_kLocal.m_Translate.y;
          v22 = pkWin->m_kLocal.m_Translate.z;
          pkWin->m_kLocal.m_Translate.x = fXPosa;
          pkWin->m_kLocal.m_Translate.y = fYPosa;
          pkWin->m_kLocal.m_Translate.z = v22;
          v1 = v30;
        }
      }
LABEL_20:
      if ( !kIter )
        return;
      v2 = kIter;
    }
  }
}

//----- (0054FD00) --------------------------------------------------------
char __thiscall MiniMapWin::IsInRaid(MiniMapWin *this, RaidMemberInfo *pkInfo)
{
  NiTListItem<RaidMarkWin *> *v2; // ecx@1
  RaidMarkWin *v3; // eax@2
  RaidMemberInfo *v4; // eax@3
  char result; // al@10

  v2 = this->m_kRaidList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      v2 = v2->m_pkNext;
      if ( v3 )
      {
        v4 = v3->m_pkInfo;
        if ( v4 )
        {
          if ( v4->m_kCharID.n5_code[0] == pkInfo->m_kCharID.n5_code[0]
            && v4->m_kCharID.n5_code[1] == pkInfo->m_kCharID.n5_code[1]
            && v4->m_kCharID.n5_code[2] == pkInfo->m_kCharID.n5_code[2]
            && v4->m_kCharID.n5_code[3] == pkInfo->m_kCharID.n5_code[3]
            && v4->m_kCharID.n5_code[4] == pkInfo->m_kCharID.n5_code[4] )
          {
            break;
          }
        }
      }
      if ( !v2 )
        goto LABEL_10;
    }
    result = 1;
  }
  else
  {
LABEL_10:
    result = 0;
  }
  return result;
}

//----- (0054FD60) --------------------------------------------------------
RaidMarkWin *__thiscall MiniMapWin::FindRaidWin(MiniMapWin *this, RaidMemberInfo *pkInfo)
{
  NiTListItem<RaidMarkWin *> *v2; // ecx@1
  RaidMarkWin *result; // eax@2

  v2 = this->m_kRaidList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      result = v2->m_element;
      v2 = v2->m_pkNext;
      if ( result )
      {
        if ( result->m_pkInfo == pkInfo )
          break;
      }
      if ( !v2 )
        goto LABEL_5;
    }
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (0054FD90) --------------------------------------------------------
void __thiscall MiniMapWin::UpdateRaidPos(MiniMapWin *this)
{
  void **v1; // eax@1
  float *v2; // esi@4
  int v3; // edi@5
  _BYTE v4[20]; // ST00_20@8
  Char *v5; // eax@8
  Char *v6; // ebx@8
  double v7; // st7@10
  int v8; // ecx@13
  int v9; // edx@13
  int v10; // eax@13
  float v11; // edx@13
  NiPoint3 kPos; // [sp+1Ch] [bp-30h]@10
  float v13; // [sp+28h] [bp-24h]@13
  float v14; // [sp+2Ch] [bp-20h]@13
  float fYPos; // [sp+34h] [bp-18h]@12
  float fXPos; // [sp+38h] [bp-14h]@12
  MiniMapWin *v17; // [sp+3Ch] [bp-10h]@1
  void *kIter; // [sp+40h] [bp-Ch]@3
  float x; // [sp+44h] [bp-8h]@10
  float y; // [sp+48h] [bp-4h]@12

  v1 = (void **)&this->m_kRaidList.m_pkHead->m_pkNext;
  v17 = this;
  if ( v1 )
  {
    while ( 1 )
    {
      v2 = (float *)v1[2];
      kIter = *v1;
      if ( v2 )
      {
        v3 = *((_DWORD *)v2 + 73);
        if ( !v3 )
          return;
        if ( *(_BYTE *)(v3 + 64) )
        {
          *(_DWORD *)v4 = *(_DWORD *)v3;
          *(_QWORD *)&v4[4] = *(_QWORD *)(v3 + 4);
          *(_QWORD *)&v4[12] = *(_QWORD *)(v3 + 12);
          v5 = CharMgr::GetChar(&g_kCharMgr, *(Name5 *)v4);
          v6 = v5;
          if ( v5 && Char::IsUpdate(v5) )
          {
            ((void (__thiscall *)(Char *, NiPoint3 *))v6->vfptr[6].SetAbStateProperty)(v6, &kPos);
            x = kPos.x;
            v7 = kPos.y;
          }
          else
          {
            x = *(float *)(v3 + 56);
            v7 = *(float *)(v3 + 60);
          }
          y = v7;
          if ( MiniMapWin::GetWinPos(v17, x, y, &fXPos, &fYPos) == 1 )
          {
            (*(void (__thiscall **)(float *, signed int))(*(_DWORD *)v2 + 256))(v2, 1);
            v8 = *((_DWORD *)v2 + 22);
            v9 = *((_DWORD *)v2 + 23);
            v10 = *((_DWORD *)v2 + 24);
            v13 = fXPos;
            v14 = fYPos;
            v11 = fYPos;
            v2[22] = fXPos;
            v2[23] = v11;
            *((_DWORD *)v2 + 24) = v10;
          }
          else
          {
            (*(void (__thiscall **)(float *, _DWORD))(*(_DWORD *)v2 + 256))(v2, 0);
          }
        }
        else
        {
          (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v2 + 256))(v2, 0);
        }
      }
      if ( !kIter )
        break;
      v1 = (void **)kIter;
    }
  }
}

//----- (0054FED0) --------------------------------------------------------
void __usercall MiniMapWin::UpdateGTEnemyPos(MiniMapWin *this@<ecx>, signed int a2@<ebx>)
{
  MiniMapWin *v2; // esi@1
  NiTListItem<GTIScanMarkWin *> *v3; // edi@1
  GTIScanMarkWin *v4; // ecx@3
  float v5; // ST2C_4@8
  float v6; // ST1C_4@8
  double v7; // st6@6
  float v8; // ST3C_4@8
  float v9; // ST3C_4@8
  float v10; // ST1C_4@8
  float v11; // ST1C_4@9
  float v12; // ST1C_4@10
  double v13; // st7@11
  double v14; // st7@13
  int v15; // esi@13
  int v16; // edi@13
  float v17; // eax@14
  float v18; // ecx@14
  float v19; // eax@14
  signed int v20; // [sp-4h] [bp-3Ch]@2
  GTIScanMarkWin *pkWin; // [sp+18h] [bp-20h]@3
  NiTListItem<GTIScanMarkWin *> *kIter; // [sp+1Ch] [bp-1Ch]@3
  float *v23; // [sp+20h] [bp-18h]@9
  float fYPos; // [sp+24h] [bp-14h]@8
  float fYPosa; // [sp+24h] [bp-14h]@13
  float fXPos; // [sp+28h] [bp-10h]@8
  float fXPosa; // [sp+28h] [bp-10h]@13
  float x; // [sp+2Ch] [bp-Ch]@5
  MiniMapWin *v29; // [sp+30h] [bp-8h]@1
  float v30; // [sp+34h] [bp-4h]@10

  v2 = this;
  v3 = this->m_kEnemyList.m_pkHead;
  v29 = this;
  if ( v3 )
  {
    v20 = a2;
    do
    {
      v4 = v3->m_element;
      v3 = v3->m_pkNext;
      kIter = v3;
      pkWin = v4;
      if ( v4 )
      {
        if ( v4 == (GTIScanMarkWin *)-292 )
          return;
        x = (double)v4->m_EenemyPos.loc.x;
        if ( v2->m_eMode )
          v7 = 0.40000001;
        else
          v7 = 0.69999999;
        v8 = v7;
        v9 = (double)(v2->m_kMapViewRect.right - v2->m_kMapViewRect.left + 1) * 0.001953125 * v8;
        v5 = x * 0.01999999955296516;
        fXPos = (v5 - v2->m_fMapCharX) / v9;
        v6 = 0.01999999955296516 * (double)v4->m_EenemyPos.loc.y;
        fYPos = (v6 - v2->m_fMapCharY) / v9;
        v10 = fabs(fXPos);
        if ( v2->m_fViewWidth * 0.5 < v10
          || (v23 = &v2->m_fViewHeight, v11 = fabs(fYPos), v11 > 0.5 * v2->m_fViewHeight) )
        {
          ((void (__stdcall *)(_DWORD))v4->vfptr[64].__vecDelDtor)(0);
        }
        else
        {
          v12 = x - *(float *)((int (__stdcall *)(signed int))g_pkMainChar->vfptr[6].Deaffect)(v20);
          v30 = v12 * 0.01999999955296516;
          if ( v2->m_eMode )
          {
            v13 = 0.5;
          }
          else
          {
            v13 = 0.5;
            v30 = v30 * 0.5;
          }
          fXPosa = v2->m_fViewWidth * v13 + v2->m_fViewLeft + fXPos + v30;
          fYPosa = v13 + *v23 * v13 + v2->m_fViewTop - fYPos;
          v14 = v2->m_fViewLeft;
          v15 = (signed int)v2->m_fViewWidth / 2;
          v16 = (signed int)fXPosa - (signed int)v14 - v15;
          if ( v16 * v16
             + ((signed int)fYPosa - (signed int)*v23 / 2 - (signed int)v29->m_fViewTop)
             * ((signed int)fYPosa - (signed int)*v23 / 2 - (signed int)v29->m_fViewTop) < v15 * v15 - 900 == 1 )
          {
            v20 = 1;
            ((void (__thiscall *)(GTIScanMarkWin *))pkWin->vfptr[64].__vecDelDtor)(pkWin);
            v17 = pkWin->m_kLocal.m_Translate.x;
            v18 = pkWin->m_kLocal.m_Translate.y;
            v3 = kIter;
            v19 = pkWin->m_kLocal.m_Translate.z;
            pkWin->m_kLocal.m_Translate.x = fXPosa;
            pkWin->m_kLocal.m_Translate.y = fYPosa;
            pkWin->m_kLocal.m_Translate.z = v19;
            v2 = v29;
          }
          else
          {
            v3 = kIter;
            v2 = v29;
            v20 = 0;
            ((void (*)(void))pkWin->vfptr[64].__vecDelDtor)();
          }
        }
      }
    }
    while ( v3 );
  }
}
// 54FED0: could not find valid save-restore pair for ebx

//----- (00550170) --------------------------------------------------------
void __thiscall MiniMapWin::StopScanEffect(MiniMapWin *this)
{
  SpEffect *v1; // eax@1

  v1 = this->m_pkScanEffect;
  if ( v1 )
  {
    if ( v1->m_bLive )
      v1->m_bLoop = 0;
  }
}

//----- (00550190) --------------------------------------------------------
void __thiscall MiniMapWin::ResetKQAlarm(MiniMapWin *this)
{
  NiTListItem<MiniMapWin::sKQAlarmInfo *> *v1; // esi@1
  char *v2; // edi@1
  NiTListItem<MiniMapWin::sKQAlarmInfo *> *v3; // ST00_4@2

  v1 = this->m_kKQAlarmInfos.m_pkHead;
  v2 = (char *)&this->m_kKQAlarmInfos;
  while ( v1 )
  {
    v3 = v1;
    v1 = v1->m_pkNext;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v2 + 8))(v2, v3);
  }
  *((_DWORD *)v2 + 3) = 0;
  *((_DWORD *)v2 + 1) = 0;
  *((_DWORD *)v2 + 2) = 0;
}

//----- (005501D0) --------------------------------------------------------
void __thiscall MiniMapWin::UpdateKQAlarm(MiniMapWin *this)
{
  MiniMapWin *v1; // esi@1
  NiTListItem<MiniMapWin::sKQAlarmInfo *> *v2; // eax@4
  MiniMapWin::sKQAlarmInfo *v3; // ecx@5
  int bShow; // [sp+4h] [bp-4h]@0

  v1 = this;
  if ( this->m_bKQListChanged )
  {
    if ( this->m_bKQStarted || this->m_bKQJoined )
    {
      ((void (__stdcall *)(_DWORD))this->m_spNewKQuest.m_pObject->vfptr[64].__vecDelDtor)(0);
      v1->m_bKQListChanged = 0;
    }
    else
    {
      v2 = this->m_kKQAlarmInfos.m_pkHead;
      LOBYTE(bShow) = 0;
      if ( v2 )
      {
        while ( 1 )
        {
          v3 = v2->m_element;
          v2 = v2->m_pkNext;
          if ( v3 )
          {
            if ( v3->m_bJoinable )
              break;
          }
          if ( !v2 )
            goto LABEL_10;
        }
        LOBYTE(bShow) = 1;
      }
LABEL_10:
      ((void (__stdcall *)(int))v1->m_spNewKQuest.m_pObject->vfptr[64].__vecDelDtor)(bShow);
      v1->m_bKQListChanged = 0;
    }
  }
}

//----- (00550260) --------------------------------------------------------
char __thiscall MiniMapWin::ConfirmKQAlarmInfo(MiniMapWin *this, unsigned int kHandle)
{
  NiTListItem<MiniMapWin::sKQAlarmInfo *> *v2; // eax@1
  unsigned int *v3; // ecx@2
  char result; // al@5

  v2 = this->m_kKQAlarmInfos.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = &v2->m_element->m_kHandle;
      v2 = v2->m_pkNext;
      if ( v3 )
      {
        if ( *v3 == kHandle )
          break;
      }
      if ( !v2 )
        goto LABEL_5;
    }
    result = 0;
  }
  else
  {
LABEL_5:
    result = 1;
  }
  return result;
}

//----- (00550290) --------------------------------------------------------
PgSprData *__thiscall MiniMapWin::GetMapIconSprData(MiniMapWin *this, unsigned int kIndex)
{
  PgSprData *result; // eax@4

  switch ( kIndex )
  {
    case 5u:
      result = this->m_spLinkSprData.m_pObject;
      break;
    case 0x10u:
      result = this->m_spRedPos.m_pObject;
      break;
    case 0x11u:
      result = this->m_spBluePos.m_pObject;
      break;
    default:
      result = this->m_spNpcSprData.m_pObject;
      break;
  }
  return result;
}

//----- (005502D0) --------------------------------------------------------
void __usercall MiniMapWin::UpdateKQTeamMark(MiniMapWin *this@<ecx>, signed int a2@<edi>)
{
  char *v2; // ebx@1
  unsigned int v3; // ecx@1
  unsigned int v4; // eax@1
  _DWORD *v5; // edx@2
  int v6; // eax@5
  int v7; // esi@6
  int v8; // eax@8
  int v9; // edi@8
  int v10; // eax@9
  unsigned int v11; // edx@9
  unsigned int v12; // eax@9
  int *v13; // ecx@10
  Char *v14; // eax@15
  int v15; // eax@16
  int kPos_8; // ST28_4@16
  int v17; // eax@17
  int v18; // ecx@17
  int v19; // eax@17
  float v20; // ecx@17
  signed int v21; // [sp+14h] [bp-34h]@7
  float fYPos; // [sp+38h] [bp-10h]@16
  float fXPos; // [sp+3Ch] [bp-Ch]@16
  MiniMapWin *v24; // [sp+40h] [bp-8h]@1
  int uiKey; // [sp+44h] [bp-4h]@8

  v2 = (char *)&this->m_KQTeamMarkWinMap;
  v24 = this;
  v3 = this->m_KQTeamMarkWinMap.m_uiHashSize;
  v4 = 0;
  if ( v3 )
  {
    v5 = (_DWORD *)*((_DWORD *)v2 + 2);
    while ( !*v5 )
    {
      ++v4;
      ++v5;
      if ( v4 >= v3 )
        goto LABEL_5;
    }
    v6 = *(_DWORD *)(*((_DWORD *)v2 + 2) + 4 * v4);
  }
  else
  {
LABEL_5:
    v6 = 0;
  }
  v7 = v6;
  if ( v6 )
  {
    v21 = a2;
    do
    {
      v8 = *(_WORD *)(v7 + 4);
      v9 = *(_DWORD *)(v7 + 8);
      v7 = *(_DWORD *)v7;
      uiKey = v8;
      if ( !v7 )
      {
        v10 = (*(int (__thiscall **)(char *, int))(*(_DWORD *)v2 + 4))(v2, v8);
        v11 = *((_DWORD *)v2 + 1);
        v12 = v10 + 1;
        if ( v12 >= v11 )
        {
LABEL_13:
          v7 = 0;
        }
        else
        {
          v13 = (int *)(*((_DWORD *)v2 + 2) + 4 * v12);
          while ( 1 )
          {
            v7 = *v13;
            if ( *v13 )
              break;
            ++v12;
            ++v13;
            if ( v12 >= v11 )
              goto LABEL_13;
          }
        }
      }
      if ( v9 )
      {
        v14 = CharMgr::GetChar(&g_kCharMgr, uiKey);
        if ( v14 )
        {
          v15 = ((int (__thiscall *)(Char *, signed int))v14->vfptr[6].Deaffect)(v14, v21);
          kPos_8 = *(_DWORD *)(v15 + 8);
          if ( MiniMapWin::GetWinPos(v24, *(float *)v15, *(float *)(v15 + 4), &fXPos, &fYPos) == 1 )
          {
            v21 = 1;
            (*(void (__thiscall **)(int))(*(_DWORD *)v9 + 256))(v9);
            v17 = *(_DWORD *)(v9 + 88);
            v18 = *(_DWORD *)(v9 + 92);
            v19 = *(_DWORD *)(v9 + 96);
            v20 = fYPos;
            *(float *)(v9 + 88) = fXPos;
            *(float *)(v9 + 92) = v20;
            *(_DWORD *)(v9 + 96) = v19;
          }
          else
          {
            v21 = 0;
            (*(void (__thiscall **)(int))(*(_DWORD *)v9 + 256))(v9);
          }
        }
      }
    }
    while ( v7 );
  }
}
// 5502D0: could not find valid save-restore pair for edi

//----- (00550410) --------------------------------------------------------
void __thiscall MiniMapWin::ShowSideWin(MiniMapWin *this, int b)
{
  ClientWin *v2; // ecx@1

  v2 = this->m_spSideWin.m_pObject;
  if ( v2 )
    ((void (__stdcall *)(_DWORD))v2->vfptr[64].__vecDelDtor)(b);
}

//----- (00550430) --------------------------------------------------------
char __thiscall MiniMapMarkWin::Create(MiniMapMarkWin *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent)
{
  MiniMapMarkWin *v5; // esi@1
  char result; // al@2

  v5 = this;
  if ( pkSprData )
  {
    PgWin::Create(
      (PgWin *)&this->vfptr,
      iXPos,
      iYPos,
      pkSprData->m_akHitTester.m_pBase->m_pObject->m_uiWidth,
      pkSprData->m_akHitTester.m_pBase->m_pObject->m_uiHeight,
      pkParent,
      0,
      0);
    v5->m_pkMarkWin = PgWinSpr::CreateWin(
                        -1 - (signed int)pkSprData->m_akHitTester.m_pBase->m_pObject->m_uiWidth / 2,
                        -1 - (signed int)pkSprData->m_akHitTester.m_pBase->m_pObject->m_uiHeight / 2,
                        pkSprData,
                        (PgWin *)&v5->vfptr,
                        0,
                        0);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (005504B0) --------------------------------------------------------
PgWinSpr *__cdecl CreateSprCenteredWin(PgSprData *pkSprData, int iXOff, int iYOff, PgWin *pkParent)
{
  return PgWinSpr::CreateWin(
           iXOff - (signed int)pkSprData->m_akHitTester.m_pBase->m_pObject->m_uiWidth / 2 - 1,
           iYOff - (signed int)pkSprData->m_akHitTester.m_pBase->m_pObject->m_uiHeight / 2 - 1,
           pkSprData,
           pkParent,
           0,
           0);
}

//----- (005504F0) --------------------------------------------------------
char __thiscall NpcMarkWin::Create(NpcMarkWin *this, int iXPos, int iYPos, PgSprData *pkSprData, QuestStateImage *pkImage, PgWin *pkParent, PgSprData *pkAutoSprData)
{
  NpcMarkWin *v7; // esi@1
  int v8; // edi@3
  PgWinSpr *v9; // eax@3
  NiPointer<MapNavigator> *v10; // eax@4
  PgWin *v11; // edi@4
  MapNavigator *v12; // ebx@4
  PgWinSpr *v13; // eax@11
  char result; // al@12

  v7 = this;
  if ( MiniMapMarkWin::Create((MiniMapMarkWin *)&this->vfptr, iXPos, iYPos, pkSprData, pkParent) )
  {
    if ( pkImage )
    {
      v8 = (signed int)(-2 * pkSprData->m_akHitTester.m_pBase->m_pObject->m_uiHeight) / 3;
      v7->m_pkQuestStateIngWin = PgWinSpr::CreateWin(
                                   -1
                                 - (signed int)pkImage->spIng.m_pObject->m_akHitTester.m_pBase->m_pObject->m_uiWidth / 2,
                                   v8
                                 - (signed int)pkImage->spIng.m_pObject->m_akHitTester.m_pBase->m_pObject->m_uiHeight
                                 / 2
                                 - 1,
                                   pkImage->spIng.m_pObject,
                                   (PgWin *)&v7->vfptr,
                                   0,
                                   0);
      v7->m_pkQuestStateAbleWin = PgWinSpr::CreateWin(
                                    -1
                                  - (signed int)pkImage->spAble.m_pObject->m_akHitTester.m_pBase->m_pObject->m_uiWidth
                                  / 2,
                                    v8
                                  - (signed int)pkImage->spAble.m_pObject->m_akHitTester.m_pBase->m_pObject->m_uiHeight
                                  / 2
                                  - 1,
                                    pkImage->spAble.m_pObject,
                                    (PgWin *)&v7->vfptr,
                                    0,
                                    0);
      v7->m_pkQuestStateRewardWin = PgWinSpr::CreateWin(
                                      -1
                                    - (signed int)pkImage->spReward.m_pObject->m_akHitTester.m_pBase->m_pObject->m_uiWidth
                                    / 2,
                                      v8
                                    - (signed int)pkImage->spReward.m_pObject->m_akHitTester.m_pBase->m_pObject->m_uiHeight
                                    / 2
                                    - 1,
                                      pkImage->spReward.m_pObject,
                                      (PgWin *)&v7->vfptr,
                                      0,
                                      0);
      v9 = PgWinSpr::CreateWin(
             -1 - (signed int)pkImage->spLowAble.m_pObject->m_akHitTester.m_pBase->m_pObject->m_uiWidth / 2,
             v8 - (signed int)pkImage->spLowAble.m_pObject->m_akHitTester.m_pBase->m_pObject->m_uiHeight / 2 - 1,
             pkImage->spLowAble.m_pObject,
             (PgWin *)&v7->vfptr,
             0,
             0);
      v7->m_pkQuestStateLowAbleWin = v9;
      v9->vfptr[64].__vecDelDtor((NiRefObject *)v9, 0);
      ((void (__stdcall *)(_DWORD))v7->m_pkQuestStateIngWin->vfptr[64].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v7->m_pkQuestStateAbleWin->vfptr[64].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v7->m_pkQuestStateRewardWin->vfptr[64].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v7->m_pkQuestStateIngWin->vfptr[60].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v7->m_pkQuestStateAbleWin->vfptr[60].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v7->m_pkQuestStateRewardWin->vfptr[60].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v7->m_pkQuestStateLowAbleWin->vfptr[60].__vecDelDtor)(0);
    }
    v10 = MapNavigator::GetMapNavigator((NiPointer<MapNavigator> *)&pkParent);
    v11 = pkParent;
    v12 = v10->m_pObject;
    if ( pkParent && !InterlockedDecrement((volatile LONG *)&pkParent->m_uiRefCount) && v11 )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    if ( pkAutoSprData && v12 )
    {
      if ( v12->m_bEnableAutoWay )
      {
        v13 = CreateSprCenteredWin(pkAutoSprData, 0, 0, (PgWin *)&v7->vfptr);
        v7->m_pkAutoRunMark = v13;
        v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
      }
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00550720) --------------------------------------------------------
void __thiscall QuestHelperMarkWin::OnClose(QuestHelperMarkWin *this)
{
  QuestHelperMarkWin *v1; // esi@1
  PgWinSpr *v2; // ecx@1
  PgWin *v3; // eax@2
  PgWin *v4; // edi@4
  NiPointer<PgWin> result; // [sp+4h] [bp-4h]@3

  v1 = this;
  v2 = this->m_pkAutoRunMark;
  if ( v2 )
  {
    v3 = PgWin::GetParentWin((PgWin *)&v2->vfptr);
    if ( v3 )
    {
      PgWin::DetachChildWin(v3, &result, (PgWin *)&v1->m_pkAutoRunMark->vfptr);
      if ( result.m_pObject )
      {
        v4 = result.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
        {
          if ( v4 )
            v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
        }
      }
      PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkAutoRunMark->vfptr);
      v1->m_pkAutoRunMark = 0;
    }
  }
}

//----- (005507A0) --------------------------------------------------------
char __thiscall QuestHelperMarkWin::Create(QuestHelperMarkWin *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, PgSprData *pkAutoSprData)
{
  QuestHelperMarkWin *v6; // edi@1
  MapNavigator *v7; // ebx@2
  PgSprData *v8; // esi@3
  PgWinSpr *v9; // eax@9
  char result; // al@10

  v6 = this;
  if ( MiniMapMarkWin::Create((MiniMapMarkWin *)&this->vfptr, iXPos, iYPos, pkSprData, pkParent) )
  {
    v7 = MapNavigator::GetMapNavigator((NiPointer<MapNavigator> *)&pkSprData)->m_pObject;
    if ( pkSprData )
    {
      v8 = pkSprData;
      if ( !InterlockedDecrement((volatile LONG *)&pkSprData->m_uiRefCount) )
      {
        if ( v8 )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      }
    }
    if ( pkAutoSprData && v7 )
    {
      if ( v7->m_bEnableAutoWay )
      {
        v9 = CreateSprCenteredWin(pkAutoSprData, 0, 0, pkParent);
        v6->m_pkAutoRunMark = v9;
        v9->vfptr[64].__vecDelDtor((NiRefObject *)v9, 0);
        ((void (__stdcall *)(_DWORD))v6->m_pkAutoRunMark->vfptr[60].__vecDelDtor)(0);
      }
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00550860) --------------------------------------------------------
void __thiscall QuestHelperMarkWin::DirectMessage(QuestHelperMarkWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  QuestHelperMarkWin *v4; // ebx@1
  unsigned int v5; // eax@2
  char *v6; // eax@2
  char *v7; // esi@2
  MapNavigator *v8; // edi@5
  int v9; // edx@9
  double v10; // st7@9
  Name3 *v11; // eax@11
  unsigned int v12; // edx@11
  int v13; // ecx@11
  int v14; // edx@11
  PgFrameWork *v15; // eax@11
  GTInformWin *v16; // edi@11
  MobInfo *v17; // eax@12
  D3DXCOLOR v18; // ST08_16@13
  int v19; // ST04_4@13
  char *v20; // eax@13
  char *v21; // eax@13
  Name3 v22; // [sp+18h] [bp-54h]@11
  NiPoint3 kDest; // [sp+24h] [bp-48h]@11
  NiPointer<MapNavigator> result; // [sp+30h] [bp-3Ch]@4
  NiPoint3 kPos; // [sp+38h] [bp-34h]@9
  MapNavigator *pkNavigater; // [sp+44h] [bp-28h]@4
  char acMapName[13]; // [sp+48h] [bp-24h]@11
  char acDestMapName[13]; // [sp+58h] [bp-14h]@11

  v4 = this;
  if ( iMsgTag == 3 )
  {
    v5 = MobCoordinateTab::GetRecordNum(HIWORD(this->m_kLocal.m_Rotate.m_pEntry[1][1]));
    v6 = CDataReader::GetRecord((CDataReader *)(ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable + 4), v5);
    v7 = v6;
    if ( v6 )
    {
      if ( *((_WORD *)v6 + 1) == HIWORD(v4->m_kLocal.m_Rotate.m_pEntry[1][1]) )
      {
        pkNavigater = MapNavigator::GetMapNavigator(&result)->m_pObject;
        if ( result.m_pObject )
        {
          v8 = result.m_pObject;
          if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
          {
            if ( v8 )
              v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
          }
        }
        if ( pkNavigater )
        {
          v9 = *((_DWORD *)v7 + 5);
          kPos.x = (double)*((unsigned int *)v7 + 4);
          v10 = (double)*((signed int *)v7 + 5);
          if ( v9 < 0 )
            v10 = v10 + 4294967300.0;
          kPos.y = v10;
          kPos.z = 0.0;
          kDest.y = kPos.y;
          kDest.x = kPos.x;
          kDest.z = 0.0;
          ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[6].SetAbStateProperty)(&kPos);
          v11 = World::GetMapName(&g_kWorld, &v22);
          *(_DWORD *)acMapName = v11->n3_code[0];
          *(_DWORD *)&acMapName[4] = v11->n3_code[1];
          v12 = v11->n3_code[2];
          v13 = *((_DWORD *)v7 + 2);
          *(_DWORD *)acDestMapName = *((_DWORD *)v7 + 1);
          *(_DWORD *)&acMapName[8] = v12;
          v14 = *((_DWORD *)v7 + 3);
          *(_DWORD *)&acDestMapName[4] = v13;
          acMapName[12] = 0;
          *(_DWORD *)&acDestMapName[8] = v14;
          acDestMapName[12] = 0;
          v15 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
          v16 = (GTInformWin *)v15[33].m_kMsgQ.m_uiHead;
          if ( v16 )
          {
            GTInformWin::Clear((GTInformWin *)v15[33].m_kMsgQ.m_uiHead);
            v17 = IIDTableBase<MobInfo,MobInfoTab,unsigned short>::GetByID(HIWORD(v4->m_kLocal.m_Rotate.m_pEntry[1][1]));
            if ( v17 )
            {
              *(_QWORD *)&v18.r = *(_QWORD *)&Color::m_kDxYellowColor.r;
              *(_QWORD *)&v18.b = *(_QWORD *)&Color::m_kDxYellowColor.b;
              v19 = (int)v17->Name;
              v20 = (char *)TextData2::Get(0x9F9CD2DC);
              v21 = fs(v20, v19);
              GTInformWin::AddText(v16, v21, v18, 0, 1000000.0);
            }
          }
          MapNavigator::FindPathAway(pkNavigater, &kPos, &kDest, acMapName, acDestMapName, *((_WORD *)v7 + 1));
        }
      }
    }
  }
}
// A8C27C: using guessed type int ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable;

//----- (00550A40) --------------------------------------------------------
void __thiscall MiniMapWin::OnZoomIn(MiniMapWin *this)
{
  MiniMapWin *v1; // esi@1

  v1 = this;
  if ( this->m_eMode != 1 )
  {
    this->m_eMode = 1;
    MiniMapWin::SetZoomModeTextureUVs(this);
    MiniMapWin::SetZoomButStateByMode(v1);
  }
}

//----- (00550A70) --------------------------------------------------------
void __thiscall MiniMapWin::OnZoomOut(MiniMapWin *this)
{
  MiniMapWin *v1; // esi@1

  v1 = this;
  if ( this->m_eMode )
  {
    this->m_eMode = 0;
    MiniMapWin::SetZoomModeTextureUVs(this);
    MiniMapWin::SetZoomButStateByMode(v1);
  }
}

//----- (00550AA0) --------------------------------------------------------
void __thiscall MiniMapWin::OnAllMap(MiniMapWin *this)
{
  MiniMapWin *v1; // esi@1
  Name3 *v2; // eax@1
  MapViewInfo *v3; // eax@1
  Name3 result; // [sp+4h] [bp-Ch]@1

  v1 = this;
  v2 = World::GetMapName(&g_kWorld, &result);
  v3 = MapViewInfoTab::GetByMapName(v2);
  if ( v1->m_pkFullMapWin && v3 && v3->MinimapView )
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkFullMapWin->vfptr);
  FullMapWin::ResetView(v1->m_pkFullMapWin, 0);
  FullMapWin::AddQuestHelper(v1->m_pkFullMapWin);
}

//----- (00550B00) --------------------------------------------------------
void __thiscall MiniMapWin::ClearWithOutMainChar(MiniMapWin *this)
{
  MiniMapWin *v1; // ebx@1
  NiTListItem<NpcMarkWin *> *v2; // esi@1
  PgWin *v3; // eax@2
  PgWin *v4; // edi@4
  NiTListItem<NpcMarkWin *> **v5; // esi@8
  NiTListItem<NpcMarkWin *> *v6; // ST04_4@9
  NiPointer<PgWin> result; // [sp+Ch] [bp-4h]@3

  v1 = this;
  v2 = this->m_kNpcList.m_pkHead;
  while ( v2 )
  {
    v3 = (PgWin *)&v2->m_element->vfptr;
    v2 = v2->m_pkNext;
    if ( v3 )
    {
      PgWin::DetachChildWin((PgWin *)&v1->m_pkClientWin->vfptr, &result, v3);
      if ( result.m_pObject )
      {
        v4 = result.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
        {
          if ( v4 )
            v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
        }
      }
    }
  }
  v5 = &v1->m_kNpcList.m_pkHead->m_pkNext;
  while ( v5 )
  {
    v6 = (NiTListItem<NpcMarkWin *> *)v5;
    v5 = (NiTListItem<NpcMarkWin *> **)*v5;
    v1->m_kNpcList.vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *> *)&v1->m_kNpcList, v6);
  }
  v1->m_kNpcList.m_kAllocator.m_uiCount = 0;
  v1->m_kNpcList.m_pkHead = 0;
  v1->m_kNpcList.m_pkTail = 0;
  FullMapWin::ClearWithOutMainChar(v1->m_pkFullMapWin);
}

//----- (00550BA0) --------------------------------------------------------
void __thiscall MiniMapWin::RemoveNPC(MiniMapWin *this, unsigned __int16 handle)
{
  unsigned __int16 v2; // si@1
  MiniMapWin *v3; // edi@1
  NiTListItem<NpcMarkWin *> *v4; // eax@2
  NpcMarkWin *v5; // ecx@3
  void (__thiscall ***v6)(_DWORD, _DWORD); // esi@8
  void *kCurrIter; // [sp+8h] [bp-4h]@3

  v2 = handle;
  v3 = this;
  FullMapWin::RemoveNPC(this->m_pkFullMapWin, handle);
  if ( CharMgr::GetChar(&g_kCharMgr, v2) )
  {
    v4 = v3->m_kNpcList.m_pkHead;
    if ( v4 )
    {
      while ( 1 )
      {
        v5 = v4->m_element;
        kCurrIter = v4;
        v4 = v4->m_pkNext;
        if ( v5 )
        {
          if ( v5->m_kCharHandle == v2 )
            break;
        }
        if ( !v4 )
          return;
      }
      PgWin::DetachChildWin((PgWin *)&v3->m_pkClientWin->vfptr, (NiPointer<PgWin> *)&handle, (PgWin *)&v5->vfptr);
      if ( handle )
      {
        v6 = (void (__thiscall ***)(_DWORD, _DWORD))handle;
        if ( !InterlockedDecrement((volatile LONG *)(handle + 4)) )
        {
          if ( v6 )
            (**v6)(v6, 1);
        }
      }
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&v3->m_kNpcList,
        &kCurrIter);
    }
  }
}

//----- (00550C40) --------------------------------------------------------
void __thiscall MiniMapWin::RemoveParty(MiniMapWin *this, PartyMemberInfo *pkParty)
{
  PartyMemberInfo *v2; // edi@1
  MiniMapWin *v3; // esi@1
  NiTListItem<PartyMarkWin *> *v4; // eax@1
  PgWin *v5; // ecx@2
  PartyMemberInfo *v6; // edi@7
  void *kCurrIter; // [sp+8h] [bp-4h]@2

  v2 = pkParty;
  v3 = this;
  FullMapWin::RemoveParty(this->m_pkFullMapWin, pkParty);
  v4 = v3->m_kPartyList.m_pkHead;
  if ( v4 )
  {
    while ( 1 )
    {
      v5 = (PgWin *)&v4->m_element->vfptr;
      kCurrIter = v4;
      v4 = v4->m_pkNext;
      if ( v5 )
      {
        if ( (PartyMemberInfo *)v5[1].m_uiRefCount == v2 )
          break;
      }
      if ( !v4 )
        return;
    }
    PgWin::DetachChildWin((PgWin *)&v3->m_pkClientWin->vfptr, (NiPointer<PgWin> *)&pkParty, v5);
    if ( pkParty )
    {
      v6 = pkParty;
      if ( !InterlockedDecrement((volatile LONG *)&pkParty->m_kCharID.n5_code[1]) )
      {
        if ( v6 )
          (*(void (__thiscall **)(_DWORD, _DWORD))v6->m_kCharID.n5_code[0])(v6, 1);
      }
    }
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&v3->m_kPartyList,
      &kCurrIter);
  }
}

//----- (00550CD0) --------------------------------------------------------
void __thiscall MiniMapWin::ClearParty(MiniMapWin *this)
{
  MiniMapWin *v1; // ebx@1
  NiTListItem<PartyMarkWin *> *v2; // eax@2
  NiTListItem<PartyMarkWin *> *v3; // ecx@2
  PgWin *v4; // edi@5
  PgWin *v5; // edi@7
  NiPointer<PgWin> result; // [sp+4h] [bp-4h]@6

  v1 = this;
  FullMapWin::ClearParty(this->m_pkFullMapWin);
  while ( v1->m_kPartyList.m_kAllocator.m_uiCount )
  {
    v2 = v1->m_kPartyList.m_pkHead;
    v3 = v2->m_pkNext;
    v1->m_kPartyList.m_pkHead = v2->m_pkNext;
    if ( v3 )
      v3->m_pkPrev = 0;
    else
      v1->m_kPartyList.m_pkTail = 0;
    v4 = (PgWin *)&v2->m_element->vfptr;
    v1->m_kPartyList.vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *> *)&v1->m_kPartyList,
      v2);
    --v1->m_kPartyList.m_kAllocator.m_uiCount;
    if ( v4 )
    {
      PgWin::DetachChildWin((PgWin *)&v1->m_pkClientWin->vfptr, &result, v4);
      if ( result.m_pObject )
      {
        v5 = result.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
        {
          if ( v5 )
            v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
        }
      }
    }
  }
}

//----- (00550D80) --------------------------------------------------------
void __thiscall MiniMapWin::OpenAllMap(MiniMapWin *this)
{
  MiniMapWin *v1; // esi@1

  v1 = this;
  if ( this->m_pkFullMapWin )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkFullMapWin->vfptr[65].__vecDelDtor)() )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkFullMapWin->vfptr);
    else
      MiniMapWin::OnAllMap(v1);
  }
}

//----- (00550DC0) --------------------------------------------------------
void __thiscall MiniMapWin::RemoveRaidMember(MiniMapWin *this, RaidMemberInfo *pkRaid)
{
  RaidMemberInfo *v2; // esi@1
  MiniMapWin *v3; // edi@1
  NiTListItem<RaidMarkWin *> *v4; // ecx@2
  PgWin *v5; // edx@3
  unsigned int v6; // eax@4
  RaidMemberInfo *v7; // esi@13
  void *kCurrIter; // [sp+8h] [bp-4h]@3

  v2 = pkRaid;
  v3 = this;
  if ( pkRaid )
  {
    FullMapWin::RemoveRaidMember(this->m_pkFullMapWin, pkRaid);
    v4 = v3->m_kRaidList.m_pkHead;
    if ( v4 )
    {
      while ( 1 )
      {
        v5 = (PgWin *)&v4->m_element->vfptr;
        kCurrIter = v4;
        v4 = v4->m_pkNext;
        if ( v5 )
        {
          v6 = v5[1].m_uiRefCount;
          if ( v6 )
          {
            if ( *(_DWORD *)v6 == v2->m_kCharID.n5_code[0]
              && *(_DWORD *)(v6 + 4) == v2->m_kCharID.n5_code[1]
              && *(_DWORD *)(v6 + 8) == v2->m_kCharID.n5_code[2]
              && *(_DWORD *)(v6 + 12) == v2->m_kCharID.n5_code[3]
              && *(_DWORD *)(v6 + 16) == v2->m_kCharID.n5_code[4] )
            {
              break;
            }
          }
        }
        if ( !v4 )
          return;
      }
      PgWin::DetachChildWin((PgWin *)&v3->m_pkClientWin->vfptr, (NiPointer<PgWin> *)&pkRaid, v5);
      if ( pkRaid )
      {
        v7 = pkRaid;
        if ( !InterlockedDecrement((volatile LONG *)&pkRaid->m_kCharID.n5_code[1]) )
        {
          if ( v7 )
            (*(void (__thiscall **)(_DWORD, _DWORD))v7->m_kCharID.n5_code[0])(v7, 1);
        }
      }
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&v3->m_kRaidList,
        &kCurrIter);
    }
  }
}

//----- (00550E90) --------------------------------------------------------
void __thiscall MiniMapWin::ClearRaidMember(MiniMapWin *this)
{
  MiniMapWin *v1; // ebx@1
  NiTListItem<RaidMarkWin *> *v2; // eax@2
  NiTListItem<RaidMarkWin *> *v3; // ecx@2
  PgWin *v4; // edi@5
  PgWin *v5; // edi@7
  NiPointer<PgWin> result; // [sp+4h] [bp-4h]@6

  v1 = this;
  FullMapWin::ClearRaidMember(this->m_pkFullMapWin);
  while ( v1->m_kRaidList.m_kAllocator.m_uiCount )
  {
    v2 = v1->m_kRaidList.m_pkHead;
    v3 = v2->m_pkNext;
    v1->m_kRaidList.m_pkHead = v2->m_pkNext;
    if ( v3 )
      v3->m_pkPrev = 0;
    else
      v1->m_kRaidList.m_pkTail = 0;
    v4 = (PgWin *)&v2->m_element->vfptr;
    v1->m_kRaidList.vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *> *)&v1->m_kRaidList,
      v2);
    --v1->m_kRaidList.m_kAllocator.m_uiCount;
    if ( v4 )
    {
      PgWin::DetachChildWin((PgWin *)&v1->m_pkClientWin->vfptr, &result, v4);
      if ( result.m_pObject )
      {
        v5 = result.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
        {
          if ( v5 )
            v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
        }
      }
    }
  }
}

//----- (00550F40) --------------------------------------------------------
void __thiscall MiniMapWin::ClearGTEnemyPos(MiniMapWin *this)
{
  MiniMapWin *v1; // ebx@1
  NiTListItem<GTIScanMarkWin *> *v2; // esi@1
  PgWin *v3; // ST04_4@2
  PgWin *v4; // ecx@2
  PgWin *v5; // edi@3
  void *kCurrIter; // [sp+8h] [bp-8h]@2
  NiPointer<PgWin> result; // [sp+Ch] [bp-4h]@2

  v1 = this;
  FullMapWin::ClearGTEnemyPos(this->m_pkFullMapWin);
  v2 = v1->m_kEnemyList.m_pkHead;
  while ( v2 )
  {
    v3 = (PgWin *)&v2->m_element->vfptr;
    v4 = (PgWin *)&v1->m_pkClientWin->vfptr;
    kCurrIter = v2;
    v2 = v2->m_pkNext;
    PgWin::DetachChildWin(v4, &result, v3);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&v1->m_kEnemyList,
      &kCurrIter);
  }
}

//----- (00550FC0) --------------------------------------------------------
void __thiscall MiniMapWin::StartScanEffect(MiniMapWin *this)
{
  MiniMapWin *v1; // esi@1
  NiNode *v2; // edi@2
  float v3; // ST0C_4@2
  int v4; // eax@2
  float v5; // ST10_4@2

  v1 = this;
  if ( this->m_pkScanEffect )
  {
    this->m_pkScanEffect->m_bLoop = 1;
    v2 = this->m_pkScanEffect->m_spEffect.m_pObject;
    v3 = (double)(((int (*)(void))this->m_pkMapNameTextWin->vfptr[41].__vecDelDtor)() - 86);
    v4 = ((int (*)(void))v1->m_pkMapNameTextWin->vfptr[42].__vecDelDtor)();
    v2->m_kLocal.m_Translate.x = v3;
    v5 = (double)(v4 - 18);
    v2->m_kLocal.m_Translate.y = v5;
    v2->m_kLocal.m_Translate.z = 0.0;
    SpEffect::Start(v1->m_pkScanEffect, (NiNode *)&v1->m_pkMapNameTextWin->vfptr);
  }
}

//----- (00551050) --------------------------------------------------------
void __thiscall MiniMapWin::AddKQAlarmInfo(MiniMapWin *this, MiniMapWin::sKQAlarmInfo *pkInfo)
{
  MiniMapWin *v2; // edi@1
  NiTListItem<MiniMapWin::sKQAlarmInfo *> *v3; // eax@1
  NiTListItem<MiniMapWin::sKQAlarmInfo *> **v4; // ecx@1

  v2 = this;
  v3 = this->m_kKQAlarmInfos.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *> *)&this->m_kKQAlarmInfos);
  v3->m_element = pkInfo;
  v3->m_pkNext = 0;
  v3->m_pkPrev = v2->m_kKQAlarmInfos.m_pkTail;
  v4 = &v2->m_kKQAlarmInfos.m_pkTail->m_pkNext;
  if ( v4 )
    *v4 = v3;
  else
    v2->m_kKQAlarmInfos.m_pkHead = v3;
  v2->m_kKQAlarmInfos.m_pkTail = v3;
  ++v2->m_kKQAlarmInfos.m_kAllocator.m_uiCount;
  v2->m_bKQListChanged = 1;
}

//----- (005510B0) --------------------------------------------------------
void __thiscall MiniMapWin::RemoveKQAlarmInfo(MiniMapWin *this, unsigned int kHandle)
{
  MiniMapWin *v2; // esi@1
  NiTListItem<MiniMapWin::sKQAlarmInfo *> *v3; // edi@1
  unsigned int *v4; // ecx@4
  NiTListItem<MiniMapWin::sKQAlarmInfo *> *v5; // eax@4
  NiTListItem<MiniMapWin::sKQAlarmInfo *> **v6; // ecx@6
  int v7; // esi@6
  NiTListItem<MiniMapWin::sKQAlarmInfo *> *v8; // eax@7
  void (__thiscall *v9)(int, NiTListItem<MiniMapWin::sKQAlarmInfo *> **); // edx@9
  NiTListItem<MiniMapWin::sKQAlarmInfo *> *v10; // ecx@10
  NiTListItem<MiniMapWin::sKQAlarmInfo *> **v11; // eax@11
  void (__thiscall *v12)(int, NiTListItem<MiniMapWin::sKQAlarmInfo *> *); // edx@13
  NiTListItem<MiniMapWin::sKQAlarmInfo *> **v13; // ecx@14
  NiTListItem<MiniMapWin::sKQAlarmInfo *> *v14; // edx@14
  MiniMapWin *v15; // [sp+Ch] [bp-4h]@1

  v2 = this;
  v3 = this->m_kKQAlarmInfos.m_pkHead;
  v15 = this;
  if ( v3 )
  {
    while ( 1 )
    {
      v4 = &v3->m_element->m_kHandle;
      v5 = v3;
      v3 = v3->m_pkNext;
      if ( v4 && *v4 == kHandle )
      {
        v6 = &v2->m_kKQAlarmInfos.m_pkHead->m_pkNext;
        v7 = (int)&v2->m_kKQAlarmInfos;
        if ( (NiTListItem<MiniMapWin::sKQAlarmInfo *> **)v5 == v6 )
        {
          v8 = *v6;
          *(_DWORD *)(v7 + 4) = *v6;
          if ( v8 )
          {
            v8->m_pkPrev = 0;
            (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v7 + 8))(v7, v6);
          }
          else
          {
            v9 = *(void (__thiscall **)(int, NiTListItem<MiniMapWin::sKQAlarmInfo *> **))(*(_DWORD *)v7 + 8);
            *(_DWORD *)(v7 + 8) = 0;
            v9(v7, v6);
          }
        }
        else
        {
          v10 = *(NiTListItem<MiniMapWin::sKQAlarmInfo *> **)(v7 + 8);
          if ( v5 == v10 )
          {
            v11 = &v10->m_pkPrev->m_pkNext;
            *(_DWORD *)(v7 + 8) = v11;
            if ( v11 )
            {
              *v11 = 0;
              (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v7 + 8))(v7, v10);
            }
            else
            {
              v12 = *(void (__thiscall **)(int, NiTListItem<MiniMapWin::sKQAlarmInfo *> *))(*(_DWORD *)v7 + 8);
              *(_DWORD *)(v7 + 4) = 0;
              v12(v7, v10);
            }
          }
          else
          {
            v13 = &v5->m_pkPrev->m_pkNext;
            v14 = v5->m_pkNext;
            if ( v13 )
              *v13 = v14;
            if ( v14 )
              v14->m_pkPrev = (NiTListItem<MiniMapWin::sKQAlarmInfo *> *)v13;
            (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v7 + 8))(v7, v5);
          }
        }
        --*(_DWORD *)(v7 + 12);
      }
      if ( !v3 )
        break;
      v2 = v15;
    }
    v15->m_bKQListChanged = 1;
  }
  else
  {
    this->m_bKQListChanged = 1;
  }
}

//----- (005511A0) --------------------------------------------------------
void __thiscall MiniMapWin::RemoveMapMark(MiniMapWin *this, unsigned int nGroup)
{
  MiniMapWin *v2; // esi@1
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v3; // ebx@1
  MapMarkWin *v4; // edi@1
  MapMarkWin *v5; // esi@3
  MapMarkWin *pkWin; // [sp+Ch] [bp-4h]@1

  v2 = this;
  v3 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_kMapMarkMap;
  pkWin = 0;
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_kMapMarkMap,
    nGroup,
    (NiVBSet **)&pkWin);
  v4 = pkWin;
  if ( pkWin )
  {
    PgWin::DetachChildWin((PgWin *)&v2->m_pkClientWin->vfptr, (NiPointer<PgWin> *)&pkWin, (PgWin *)&pkWin->vfptr);
    if ( pkWin )
    {
      v5 = pkWin;
      if ( !InterlockedDecrement((volatile LONG *)&pkWin->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v4->vfptr);
    NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::RemoveAt(v3, nGroup);
  }
}

//----- (00551220) --------------------------------------------------------
void __thiscall MiniMapWin::RemoveAllMapMark(MiniMapWin *this)
{
  MiniMapWin *v1; // ebx@1
  FullMapWin *v2; // ecx@1
  unsigned int v3; // ecx@3
  unsigned int v4; // eax@3
  NiTMapItem<unsigned int,MapMarkWin *> **v5; // edx@4
  NiTMapItem<unsigned int,MapMarkWin *> *v6; // eax@7
  NiTMapItem<unsigned int,MapMarkWin *> *v7; // esi@8
  PgWin *v8; // edi@9
  int v9; // eax@12
  unsigned int v10; // edx@12
  unsigned int v11; // eax@12
  NiTMapItem<unsigned int,MapMarkWin *> **v12; // ecx@13
  PgWin *v13; // edi@18
  MapMarkWin *pkWin; // [sp+8h] [bp-Ch]@9
  NiPointer<PgWin> result; // [sp+Ch] [bp-8h]@17

  v1 = this;
  v2 = this->m_pkFullMapWin;
  if ( v2 )
    FullMapWin::RemoveAllMapMark(v2);
  v3 = v1->m_kMapMarkMap.m_uiHashSize;
  v4 = 0;
  if ( v3 )
  {
    v5 = v1->m_kMapMarkMap.m_ppkHashTable;
    while ( !*v5 )
    {
      ++v4;
      ++v5;
      if ( v4 >= v3 )
        goto LABEL_7;
    }
    v6 = v1->m_kMapMarkMap.m_ppkHashTable[v4];
  }
  else
  {
LABEL_7:
    v6 = 0;
  }
  v7 = v6;
  while ( v7 )
  {
    v8 = (PgWin *)&v7->m_val->vfptr;
    pkWin = v7->m_val;
    if ( v7->m_pkNext )
    {
      v7 = v7->m_pkNext;
    }
    else
    {
      v9 = v1->m_kMapMarkMap.vfptr->KeyToHashIndex(
             (NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *> *)&v1->m_kMapMarkMap,
             v7->m_key);
      v10 = v1->m_kMapMarkMap.m_uiHashSize;
      v11 = v9 + 1;
      if ( v11 >= v10 )
      {
LABEL_16:
        v7 = 0;
      }
      else
      {
        v12 = &v1->m_kMapMarkMap.m_ppkHashTable[v11];
        while ( 1 )
        {
          v7 = *v12;
          if ( *v12 )
            break;
          ++v11;
          ++v12;
          if ( v11 >= v10 )
            goto LABEL_16;
        }
      }
    }
    PgWin::DetachChildWin((PgWin *)&v1->m_pkClientWin->vfptr, &result, v8);
    if ( result.m_pObject )
    {
      v13 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v13 )
          v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
      }
    }
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&pkWin->vfptr);
  }
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kMapMarkMap);
}

//----- (00551320) --------------------------------------------------------
void __thiscall MiniMapWin::UpdateMapMark(MiniMapWin *this)
{
  char *v1; // ebx@1
  unsigned int v2; // ecx@1
  unsigned int v3; // eax@1
  _DWORD *v4; // edx@2
  int v5; // eax@5
  int v6; // edi@6
  unsigned int v7; // eax@7
  int v8; // esi@7
  int v9; // eax@8
  unsigned int v10; // edx@8
  unsigned int v11; // eax@8
  int *v12; // ecx@9
  int v13; // ecx@18
  int v14; // edx@18
  int v15; // eax@18
  float v16; // edx@18
  float fYPos; // [sp+34h] [bp-10h]@17
  float fXPos; // [sp+38h] [bp-Ch]@17
  unsigned int nGroup; // [sp+3Ch] [bp-8h]@7
  MiniMapWin *v20; // [sp+40h] [bp-4h]@1

  v1 = (char *)&this->m_kMapMarkMap;
  v20 = this;
  v2 = this->m_kMapMarkMap.m_uiHashSize;
  v3 = 0;
  if ( v2 )
  {
    v4 = (_DWORD *)*((_DWORD *)v1 + 2);
    while ( !*v4 )
    {
      ++v3;
      ++v4;
      if ( v3 >= v2 )
        goto LABEL_5;
    }
    v5 = *(_DWORD *)(*((_DWORD *)v1 + 2) + 4 * v3);
  }
  else
  {
LABEL_5:
    v5 = 0;
  }
  v6 = v5;
  while ( v6 )
  {
    v7 = *(_DWORD *)(v6 + 4);
    v8 = *(_DWORD *)(v6 + 8);
    v6 = *(_DWORD *)v6;
    nGroup = v7;
    if ( !v6 )
    {
      v9 = (*(int (__thiscall **)(char *, unsigned int))(*(_DWORD *)v1 + 4))(v1, v7);
      v10 = *((_DWORD *)v1 + 1);
      v11 = v9 + 1;
      if ( v11 >= v10 )
      {
LABEL_12:
        v6 = 0;
      }
      else
      {
        v12 = (int *)(*((_DWORD *)v1 + 2) + 4 * v11);
        while ( 1 )
        {
          v6 = *v12;
          if ( *v12 )
            break;
          ++v11;
          ++v12;
          if ( v11 >= v10 )
            goto LABEL_12;
        }
      }
    }
    if ( v8 )
    {
      if ( Timer::ms_fCurTime <= (double)*(float *)(v8 + 304) )
      {
        if ( MiniMapWin::GetWinPos(v20, *(float *)(v8 + 292), *(float *)(v8 + 296), &fXPos, &fYPos) == 1 )
        {
          (*(void (__thiscall **)(int, signed int))(*(_DWORD *)v8 + 256))(v8, 1);
          v13 = *(_DWORD *)(v8 + 88);
          v14 = *(_DWORD *)(v8 + 92);
          v15 = *(_DWORD *)(v8 + 96);
          v16 = fYPos;
          *(float *)(v8 + 88) = fXPos;
          *(float *)(v8 + 92) = v16;
          *(_DWORD *)(v8 + 96) = v15;
        }
        else
        {
          (*(void (__thiscall **)(int, _DWORD))(*(_DWORD *)v8 + 256))(v8, 0);
        }
      }
      else
      {
        MiniMapWin::RemoveMapMark(v20, nGroup);
      }
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00551460) --------------------------------------------------------
void __thiscall MiniMapWin::RemoveKQTeamMark(MiniMapWin *this, int kCharHandle)
{
  MiniMapWin *v2; // esi@1
  FullMapWin *v3; // ecx@1
  NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *v4; // ebx@3
  KQTeamMarkWin *v5; // edi@3
  KQTeamMarkWin *v6; // esi@5
  KQTeamMarkWin *pkWin; // [sp+Ch] [bp-4h]@3

  v2 = this;
  v3 = this->m_pkFullMapWin;
  if ( v3 )
    FullMapWin::RemoveKQTeamMark(v3, kCharHandle);
  v4 = (NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *)&v2->m_KQTeamMarkWinMap.vfptr;
  pkWin = 0;
  NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::GetAt(
    (NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *)&v2->m_KQTeamMarkWinMap.vfptr,
    kCharHandle,
    &pkWin);
  v5 = pkWin;
  if ( pkWin )
  {
    PgWin::DetachChildWin((PgWin *)&v2->m_pkClientWin->vfptr, (NiPointer<PgWin> *)&pkWin, (PgWin *)&pkWin->vfptr);
    if ( pkWin )
    {
      v6 = pkWin;
      if ( !InterlockedDecrement((volatile LONG *)&pkWin->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v5->vfptr);
    NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::RemoveAt(v4, kCharHandle);
  }
}

//----- (00551500) --------------------------------------------------------
void __thiscall MiniMapWin::RemoveAllKQTeamMark(MiniMapWin *this)
{
  MiniMapWin *v1; // ebx@1
  FullMapWin *v2; // ecx@1
  unsigned int v3; // ecx@3
  unsigned int v4; // eax@3
  NiTMapItem<unsigned short,KQTeamMarkWin *> **v5; // edx@4
  NiTMapItem<unsigned short,KQTeamMarkWin *> *v6; // eax@7
  NiTMapItem<unsigned short,KQTeamMarkWin *> *v7; // esi@8
  PgWin *v8; // edi@9
  int v9; // eax@12
  unsigned int v10; // edx@12
  unsigned int v11; // eax@12
  NiTMapItem<unsigned short,KQTeamMarkWin *> **v12; // ecx@13
  PgWin *v13; // edi@18
  KQTeamMarkWin *pkWin; // [sp+8h] [bp-Ch]@9
  NiPointer<PgWin> result; // [sp+Ch] [bp-8h]@17

  v1 = this;
  v2 = this->m_pkFullMapWin;
  if ( v2 )
    FullMapWin::RemoveAllKQTeamMark(v2);
  v3 = v1->m_KQTeamMarkWinMap.m_uiHashSize;
  v4 = 0;
  if ( v3 )
  {
    v5 = v1->m_KQTeamMarkWinMap.m_ppkHashTable;
    while ( !*v5 )
    {
      ++v4;
      ++v5;
      if ( v4 >= v3 )
        goto LABEL_7;
    }
    v6 = v1->m_KQTeamMarkWinMap.m_ppkHashTable[v4];
  }
  else
  {
LABEL_7:
    v6 = 0;
  }
  v7 = v6;
  while ( v7 )
  {
    v8 = (PgWin *)&v7->m_val->vfptr;
    pkWin = v7->m_val;
    if ( v7->m_pkNext )
    {
      v7 = v7->m_pkNext;
    }
    else
    {
      v9 = v1->m_KQTeamMarkWinMap.vfptr->KeyToHashIndex(
             (NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *)&v1->m_KQTeamMarkWinMap,
             v7->m_key);
      v10 = v1->m_KQTeamMarkWinMap.m_uiHashSize;
      v11 = v9 + 1;
      if ( v11 >= v10 )
      {
LABEL_16:
        v7 = 0;
      }
      else
      {
        v12 = &v1->m_KQTeamMarkWinMap.m_ppkHashTable[v11];
        while ( 1 )
        {
          v7 = *v12;
          if ( *v12 )
            break;
          ++v11;
          ++v12;
          if ( v11 >= v10 )
            goto LABEL_16;
        }
      }
    }
    PgWin::DetachChildWin((PgWin *)&v1->m_pkClientWin->vfptr, &result, v8);
    if ( result.m_pObject )
    {
      v13 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v13 )
          v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
      }
    }
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&pkWin->vfptr);
  }
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_KQTeamMarkWinMap);
}

//----- (00551600) --------------------------------------------------------
void __thiscall MiniMapWin::RemoveInDunEffect(MiniMapWin *this)
{
  char *v1; // ebx@1
  int v2; // esi@2
  int v3; // edi@3
  signed int v4; // [sp+14h] [bp-10h]@1

  v1 = (char *)this->m_apkEffect;
  v4 = 3;
  do
  {
    v2 = *(_DWORD *)v1;
    if ( *(_DWORD *)v1 )
    {
      NsEffect::~NsEffect((NsEffect *)(v2 + 28));
      ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)(v2 + 4));
      v3 = *(_DWORD *)v2;
      if ( *(_DWORD *)v2 && !InterlockedDecrement((volatile LONG *)(v3 + 4)) )
      {
        if ( v3 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v3)(v3, 1);
      }
      operator delete((void *)v2);
      *(_DWORD *)v1 = 0;
    }
    v1 += 4;
    --v4;
  }
  while ( v4 );
}

//----- (005516B0) --------------------------------------------------------
void __thiscall MiniMapWin::ViewInDunLevelFlag(MiniMapWin *this, ID_LEVEL_TYPE eLevelType)
{
  MiniMapWin *v2; // edi@1
  SpEffect *v3; // ecx@3
  NiUnsharedGeometryGroup *v4; // eax@6
  NiUnsharedGeometryGroup *v5; // ecx@6
  char v6; // dl@7
  unsigned int v7; // eax@8
  NiUnsharedGeometryGroup *v8; // esi@8
  NiUnsharedGeometryGroup *v9; // edi@8
  char v10; // cl@9

  v2 = this;
  if ( (unsigned int)eLevelType <= 2 && this->m_pkHeroModeFlag )
  {
    v3 = this->m_apkEffect[eLevelType];
    if ( v3 )
      SpEffect::Start(v3, v2->m_pAttachEffect.m_pObject);
    v2->m_eInDunLevel = eLevelType;
    if ( eLevelType == 2 )
    {
      ((void (__stdcall *)(signed int))v2->m_pkHeroModeFlag->vfptr[64].__vecDelDtor)(1);
      ((void (__stdcall *)(signed int))v2->m_pkHeroModeFlag->vfptr[60].__vecDelDtor)(1);
      v4 = TextData3::Get(0x4026F785u);
      v5 = v4;
      do
      {
        v6 = (char)v4->vfptr;
        v4 = (NiUnsharedGeometryGroup *)((char *)v4 + 1);
      }
      while ( v6 );
      v7 = (char *)v4 - (char *)v5;
      v8 = v5;
      v9 = (NiUnsharedGeometryGroup *)((char *)&v2->m_pAttachEffect.m_pObject + 3);
      do
      {
        v10 = BYTE1(v9->vfptr);
        v9 = (NiUnsharedGeometryGroup *)((char *)v9 + 1);
      }
      while ( v10 );
      qmemcpy(v9, v8, v7);
    }
  }
}

//----- (00551750) --------------------------------------------------------
void __thiscall MiniMapWin::NotViewInDunLevelFlag(MiniMapWin *this)
{
  MiniMapWin *v1; // esi@1
  ID_LEVEL_TYPE v2; // eax@1
  Name3 *v3; // eax@6
  MapInfo *v4; // ebx@6
  Name3 result; // [sp+4h] [bp-Ch]@6

  v1 = this;
  v2 = this->m_eInDunLevel;
  if ( (signed int)v2 < 3 && (signed int)v2 >= 0 && this->m_pkHeroModeFlag )
  {
    if ( this->m_apkEffect[v2] )
      SpEffect::End(this->m_apkEffect[v2], this->m_pAttachEffect.m_pObject);
    v3 = World::GetMapName(&g_kWorld, &result);
    v4 = MapInfoTab::GetByMapName(v3);
    if ( v4 )
    {
      memset(v1->m_MapName, 0, 0x80u);
      strncpy(v1->m_MapName, v4->Name, 0x20u);
    }
    ((void (__stdcall *)(_DWORD))v1->m_pkHeroModeFlag->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v1->m_pkHeroModeFlag->vfptr[60].__vecDelDtor)(0);
  }
}

//----- (00551810) --------------------------------------------------------
void __thiscall QuestHelperMarkWin::~QuestHelperMarkWin(QuestHelperMarkWin *this)
{
  QuestHelperMarkWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&QuestHelperMarkWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&QuestHelperMarkWin::`vftable'{for `IDirectMessenger'};
  QuestHelperMarkWin::OnClose(this);
  v1->vfptr = (NiRefObjectVtbl *)&MiniMapMarkWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MiniMapMarkWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&v1->vfptr);
}
// 995DE0: using guessed type void (__thiscall *MiniMapMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 995DFC: using guessed type int (__thiscall *MiniMapMarkWin::`vftable'{for `NiNode'})(void *p, char);
// 996B74: using guessed type void (__thiscall *QuestHelperMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 996B94: using guessed type int (__thiscall *QuestHelperMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00551890) --------------------------------------------------------
void __thiscall MiniMapWin::~MiniMapWin(MiniMapWin *this)
{
  MiniMapWin *v1; // ebx@1
  NiTListItem<NpcMarkWin *> *v2; // edi@1
  NiTListItem<NpcMarkWin *> *v3; // ST0C_4@2
  SpEffect *v4; // edi@3
  NiNode *v5; // esi@4
  NiNode *v6; // edi@9
  ClientWin *v7; // edi@13
  NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>Vtbl **v8; // edi@17
  NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>Vtbl **v9; // edi@17
  PgWinSpr *v10; // edi@17
  int v11; // edi@21
  NiTListItem<MiniMapWin::sKQAlarmInfo *> **v12; // esi@21
  NiTListItem<MiniMapWin::sKQAlarmInfo *> **v13; // ST0C_4@22
  int v14; // edi@23
  NiTListItem<GTIScanMarkWin *> **v15; // esi@23
  NiTListItem<GTIScanMarkWin *> **v16; // ST0C_4@24
  PgSprData *v17; // esi@25
  PgSprData *v18; // esi@29
  int v19; // edi@33
  NiTListItem<PartyMarkWin *> **v20; // esi@33
  NiTListItem<PartyMarkWin *> **v21; // ST0C_4@34
  int v22; // esi@35
  NiTListItem<NpcMarkWin *> **v23; // edi@35
  NiTListItem<NpcMarkWin *> **v24; // ST0C_4@36
  int v25; // esi@37
  NiTListItem<RaidMarkWin *> **v26; // edi@37
  NiTListItem<RaidMarkWin *> **v27; // ST0C_4@38
  PgSprData *v28; // esi@39
  PgSprData *v29; // esi@43
  PgSprData *v30; // esi@47
  PgSprData *v31; // esi@51
  PgSprData *v32; // esi@55
  PgWinBut *v33; // esi@59
  PgWinSpr *v34; // esi@63
  PgWinBut *v35; // esi@67
  PgWinBut *v36; // esi@71

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&MiniMapWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MiniMapWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_kNpcList.m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->m_kNpcList.vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *> *)&v1->m_kNpcList, v3);
  }
  v1->m_kNpcList.m_kAllocator.m_uiCount = 0;
  v1->m_kNpcList.m_pkHead = 0;
  v1->m_kNpcList.m_pkTail = 0;
  v4 = v1->m_pkScanEffect;
  if ( v4 )
  {
    NsEffect::~NsEffect(&v4->m_kEffect);
    ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v4->m_kMarkCheck);
    v5 = v4->m_spEffect.m_pObject;
    if ( v4->m_spEffect.m_pObject && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    operator delete(v4);
  }
  MiniMapWin::RemoveAllMapMark(v1);
  MiniMapWin::RemoveAllKQTeamMark(v1);
  MiniMapWin::RemoveInDunEffect(v1);
  v6 = v1->m_pAttachEffect.m_pObject;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  v7 = v1->m_spSideWin.m_pObject;
  if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  v8 = &v1->m_KQTeamMarkWinMap.vfptr;
  *v8 = (NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>Vtbl *)&NiTMap<unsigned short,KQTeamMarkWin *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_KQTeamMarkWinMap);
  *v8 = (NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>Vtbl *)&NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_KQTeamMarkWinMap);
  operator delete[](v1->m_KQTeamMarkWinMap.m_ppkHashTable);
  v9 = &v1->m_kMapMarkMap.vfptr;
  *v9 = (NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>Vtbl *)&NiTMap<unsigned int,MapMarkWin *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kMapMarkMap);
  *v9 = (NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>Vtbl *)&NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kMapMarkMap);
  operator delete[](v1->m_kMapMarkMap.m_ppkHashTable);
  v10 = v1->m_spNewKQuest.m_pObject;
  if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
    v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
  v11 = (int)&v1->m_kKQAlarmInfos;
  v1->m_kKQAlarmInfos.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>Vtbl *)&PgTList<MiniMapWin::sKQAlarmInfo *>::`vftable';
  v12 = &v1->m_kKQAlarmInfos.m_pkHead->m_pkNext;
  while ( v12 )
  {
    v13 = v12;
    v12 = (NiTListItem<MiniMapWin::sKQAlarmInfo *> **)*v12;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v11 + 8))(&v1->m_kKQAlarmInfos, v13);
  }
  v1->m_kKQAlarmInfos.m_kAllocator.m_uiCount = 0;
  v1->m_kKQAlarmInfos.m_pkHead = 0;
  v1->m_kKQAlarmInfos.m_pkTail = 0;
  *(_DWORD *)v11 = &NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::`vftable';
  v14 = (int)&v1->m_kEnemyList;
  v1->m_kEnemyList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>Vtbl *)&PgTList<GTIScanMarkWin *>::`vftable';
  v15 = &v1->m_kEnemyList.m_pkHead->m_pkNext;
  while ( v15 )
  {
    v16 = v15;
    v15 = (NiTListItem<GTIScanMarkWin *> **)*v15;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v14 + 8))(&v1->m_kEnemyList, v16);
  }
  v1->m_kEnemyList.m_kAllocator.m_uiCount = 0;
  v1->m_kEnemyList.m_pkHead = 0;
  v1->m_kEnemyList.m_pkTail = 0;
  *(_DWORD *)v14 = &NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`vftable';
  v17 = v1->m_spBluePos.m_pObject;
  if ( v17 && !InterlockedDecrement((volatile LONG *)&v17->m_uiRefCount) && v17 )
    v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
  v18 = v1->m_spRedPos.m_pObject;
  if ( v18 && !InterlockedDecrement((volatile LONG *)&v18->m_uiRefCount) && v18 )
    v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
  v19 = (int)&v1->m_kPartyList;
  v1->m_kPartyList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>Vtbl *)&PgTList<PartyMarkWin *>::`vftable';
  v20 = &v1->m_kPartyList.m_pkHead->m_pkNext;
  while ( v20 )
  {
    v21 = v20;
    v20 = (NiTListItem<PartyMarkWin *> **)*v20;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v19 + 8))(&v1->m_kPartyList, v21);
  }
  v22 = (int)&v1->m_kNpcList;
  v1->m_kPartyList.m_kAllocator.m_uiCount = 0;
  v1->m_kPartyList.m_pkHead = 0;
  v1->m_kPartyList.m_pkTail = 0;
  *(_DWORD *)v19 = &NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`vftable';
  v1->m_kNpcList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>Vtbl *)&PgTList<NpcMarkWin *>::`vftable';
  v23 = &v1->m_kNpcList.m_pkHead->m_pkNext;
  while ( v23 )
  {
    v24 = v23;
    v23 = (NiTListItem<NpcMarkWin *> **)*v23;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v22 + 8))(&v1->m_kNpcList, v24);
  }
  v1->m_kNpcList.m_kAllocator.m_uiCount = 0;
  v1->m_kNpcList.m_pkHead = 0;
  v1->m_kNpcList.m_pkTail = 0;
  *(_DWORD *)v22 = &NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`vftable';
  v25 = (int)&v1->m_kRaidList;
  v1->m_kRaidList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>Vtbl *)&PgTList<RaidMarkWin *>::`vftable';
  v26 = &v1->m_kRaidList.m_pkHead->m_pkNext;
  while ( v26 )
  {
    v27 = v26;
    v26 = (NiTListItem<RaidMarkWin *> **)*v26;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v25 + 8))(&v1->m_kRaidList, v27);
  }
  v1->m_kRaidList.m_kAllocator.m_uiCount = 0;
  v1->m_kRaidList.m_pkHead = 0;
  v1->m_kRaidList.m_pkTail = 0;
  *(_DWORD *)v25 = &NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`vftable';
  v28 = v1->m_spNpcSprData.m_pObject;
  if ( v28 && !InterlockedDecrement((volatile LONG *)&v28->m_uiRefCount) && v28 )
    v28->vfptr->__vecDelDtor((NiRefObject *)v28, 1u);
  v29 = v1->m_spPartySprData.m_pObject;
  if ( v29 && !InterlockedDecrement((volatile LONG *)&v29->m_uiRefCount) && v29 )
    v29->vfptr->__vecDelDtor((NiRefObject *)v29, 1u);
  v30 = v1->m_spLinkDirSprData.m_pObject;
  if ( v30 && !InterlockedDecrement((volatile LONG *)&v30->m_uiRefCount) && v30 )
    v30->vfptr->__vecDelDtor((NiRefObject *)v30, 1u);
  v31 = v1->m_spLinkSprData.m_pObject;
  if ( v31 && !InterlockedDecrement((volatile LONG *)&v31->m_uiRefCount) && v31 )
    v31->vfptr->__vecDelDtor((NiRefObject *)v31, 1u);
  v32 = v1->m_spMainCharSprData.m_pObject;
  if ( v32 && !InterlockedDecrement((volatile LONG *)&v32->m_uiRefCount) && v32 )
    v32->vfptr->__vecDelDtor((NiRefObject *)v32, 1u);
  `eh vector destructor iterator'(
    v1->m_spSideBut,
    4u,
    4,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v33 = v1->m_spAllMapBut.m_pObject;
  if ( v33 && !InterlockedDecrement((volatile LONG *)&v33->m_uiRefCount) && v33 )
    v33->vfptr->__vecDelDtor((NiRefObject *)v33, 1u);
  v34 = v1->m_spZoomDisableSpr.m_pObject;
  if ( v34 && !InterlockedDecrement((volatile LONG *)&v34->m_uiRefCount) && v34 )
    v34->vfptr->__vecDelDtor((NiRefObject *)v34, 1u);
  v35 = v1->m_spZoomOutBut.m_pObject;
  if ( v35 && !InterlockedDecrement((volatile LONG *)&v35->m_uiRefCount) && v35 )
    v35->vfptr->__vecDelDtor((NiRefObject *)v35, 1u);
  v36 = v1->m_spZoomInBut.m_pObject;
  if ( v36 && !InterlockedDecrement((volatile LONG *)&v36->m_uiRefCount) && v36 )
    v36->vfptr->__vecDelDtor((NiRefObject *)v36, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 98BF8C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>::`vftable')(void *p, char);
// 98BF9C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>::`vftable')(void *p, char);
// 98BFBC: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>::`vftable')(void *p, char);
// 98BFCC: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>::`vftable')(void *p, char);
// 98BFDC: using guessed type int (__thiscall *NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>::`vftable')(void *p, char);
// 98BFFC: using guessed type int (__thiscall *NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::`vftable')(void *p, char);
// 98C0E4: using guessed type int (__thiscall *PgTList<NpcMarkWin *>::`vftable')(void *p, char);
// 98C0F4: using guessed type int (__thiscall *NiTMap<unsigned int,MapMarkWin *>::`vftable')(void *p, char);
// 98C114: using guessed type int (__thiscall *NiTMap<unsigned short,KQTeamMarkWin *>::`vftable')(void *p, char);
// 98C164: using guessed type int (__thiscall *PgTList<RaidMarkWin *>::`vftable')(void *p, char);
// 98C174: using guessed type int (__thiscall *PgTList<PartyMarkWin *>::`vftable')(void *p, char);
// 98C184: using guessed type int (__thiscall *PgTList<GTIScanMarkWin *>::`vftable')(void *p, char);
// 996B54: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::`vftable')(void *p, char);
// 997138: using guessed type int (__thiscall *PgTList<MiniMapWin::sKQAlarmInfo *>::`vftable')(void *p, char);
// 997148: using guessed type void (__thiscall *MiniMapWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 997164: using guessed type int (__thiscall *MiniMapWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00551D80) --------------------------------------------------------
void __thiscall MiniMapWin::SetMapZoomFlag(MiniMapWin *this, bool bZoomEnable)
{
  MiniMapWin *v2; // esi@1

  v2 = this;
  this->m_bZoomEnableFlag = bZoomEnable;
  if ( bZoomEnable )
  {
    MiniMapWin::SetZoomButStateByMode(this);
    ((void (__stdcall *)(_DWORD))v2->m_spZoomDisableSpr.m_pObject->vfptr[64].__vecDelDtor)(0);
  }
  else
  {
    if ( this->m_eMode != 1 )
    {
      this->m_eMode = 1;
      MiniMapWin::SetZoomModeTextureUVs(this);
      MiniMapWin::SetZoomButStateByMode(v2);
    }
    ((void (__stdcall *)(_DWORD))v2->m_spZoomOutBut.m_pObject->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_spZoomInBut.m_pObject->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_spZoomDisableSpr.m_pObject->vfptr[64].__vecDelDtor)(1);
  }
}

//----- (00551E00) --------------------------------------------------------
void __thiscall MiniMapWin::OnCommand(MiniMapWin *this, unsigned int wParam, int lParam)
{
  MiniMapWin *v3; // edi@1
  char *v4; // eax@8
  MsgBox *v5; // eax@8
  int v6; // esi@11
  PgFrameWork *v7; // eax@14
  SkillWin *v8; // esi@14

  v3 = this;
  switch ( wParam )
  {
    case 0u:
      MiniMapWin::OnZoomIn(this);
      break;
    case 1u:
      MiniMapWin::OnZoomOut(this);
      break;
    case 5u:
      GameFrameWork::OpenKDQuestWin((GameFrameWork *)this->m_pkFrameWork, 1);
      break;
    case 4u:
      MiniMapWin::OnAllMap(this);
      break;
    case 6u:
      GameFrameWork::ActivateCommunityWin((GameFrameWork *)this->m_pkFrameWork);
      break;
    case 8u:
      GameFrameWork::ActivateRaidWin((GameFrameWork *)this->m_pkFrameWork);
      break;
    case 7u:
      v4 = (char *)TextData2::Get(0x2B6E9B93u);
      v5 = MsgBox::Modeless(MSGBOX_OKCANCEL, v4);
      if ( v3 )
        ((void (__stdcall *)(_DWORD))v5->vfptr->SetMsgHooker)(&v3->vfptr);
      else
        ((void (__stdcall *)(_DWORD))v5->vfptr->SetMsgHooker)(0);
      break;
    case 9u:
      v6 = 29100;
      do
      {
        if ( Skill::IsLearnProdSkill(v6) )
          break;
        ++v6;
      }
      while ( v6 < 29105 );
      v7 = v3->m_pkFrameWork;
      v8 = (SkillWin *)v7[20].m_pkMsgHooker;
      if ( v8 )
      {
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)v7[20].m_pkMsgHooker);
        SkillWin::SelectByPageType(v8, 3u);
      }
      break;
    default:
      return;
  }
}

//----- (00551F20) --------------------------------------------------------
void __userpurge MiniMapWin::UpdateMeWin(MiniMapWin *this@<ecx>, signed int a2@<ebx>, signed int a3@<edi>, float fCurTime)
{
  MiniMapWin *v4; // esi@1
  ID_LEVEL_TYPE v5; // eax@1
  SpEffect *v6; // eax@3
  SpEffect *v7; // ecx@8
  NiTListItem<NpcMarkWin *> *v8; // esi@10
  NpcMarkWin *v9; // ecx@11
  GameFrameWork *v10; // eax@13

  v4 = this;
  v5 = this->m_eInDunLevel;
  if ( v5 != 3 )
  {
    if ( this->m_apkEffect[v5] )
    {
      v6 = this->m_apkEffect[v5];
      if ( v6->m_bLive )
        SpEffect::Update(v6, fCurTime);
    }
  }
  ((void (__stdcall *)(_DWORD))v4->m_pkMapNameTextWin->vfptr[118].__vecDelDtor)(v4->m_MapName);
  if ( RaidInfo::IsMeRaidMember(&g_kRaidinfo) )
    MiniMapWin::UpdateRaidPos(v4);
  else
    MiniMapWin::UpdatePartyPos(v4);
  MiniMapWin::UpdateNPCPos(v4);
  MiniMapWin::UpdateMainCharPos(v4);
  MiniMapWin::UpdateMainCharDir(v4);
  MiniMapWin::UpdateGTEnemyPos(v4, a2);
  v7 = v4->m_pkScanEffect;
  if ( v7 )
    SpEffect::Update(v7, fCurTime);
  MiniMapWin::UpdateKQAlarm(v4);
  MiniMapWin::UpdateMapMark(v4);
  MiniMapWin::UpdateKQTeamMark(v4, a3);
  v8 = v4->m_kNpcList.m_pkHead;
  while ( v8 )
  {
    v9 = v8->m_element;
    v8 = v8->m_pkNext;
    if ( v9
      && (unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD))v9->vfptr[83].__vecDelDtor)(
                            PgWin::ms_iMsX,
                            PgWin::ms_iMsY) )
    {
      v10 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v10 )
        GameFrameWork::OpenPlayGuideWin(v10, BIL_MAP_3);
    }
  }
}

//----- (00552030) --------------------------------------------------------
void __thiscall MiniMapWin::MiniMapWin(MiniMapWin *this)
{
  MiniMapWin *v1; // esi@1
  char *v2; // eax@1
  unsigned int v3; // ecx@1
  char *v4; // eax@1
  unsigned int v5; // ST08_4@1
  PgWinSpr *v6; // edi@1
  NiNode *v7; // edi@6

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&MiniMapWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MiniMapWin::`vftable'{for `IDirectMessenger'};
  v1->m_spZoomInBut.m_pObject = 0;
  v1->m_spZoomOutBut.m_pObject = 0;
  v1->m_spZoomDisableSpr.m_pObject = 0;
  v1->m_spAllMapBut.m_pObject = 0;
  `eh vector constructor iterator'(
    v1->m_spSideBut,
    4u,
    4,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_spMainCharSprData.m_pObject = 0;
  v1->m_spLinkSprData.m_pObject = 0;
  v1->m_spLinkDirSprData.m_pObject = 0;
  v1->m_spPartySprData.m_pObject = 0;
  v1->m_spNpcSprData.m_pObject = 0;
  v1->m_kRaidList.m_kAllocator.m_uiCount = 0;
  v1->m_kRaidList.m_pkHead = 0;
  v1->m_kRaidList.m_pkTail = 0;
  v1->m_kRaidList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,RaidMarkWin *>Vtbl *)&PgTList<RaidMarkWin *>::`vftable';
  v1->m_kNpcList.m_kAllocator.m_uiCount = 0;
  v1->m_kNpcList.m_pkHead = 0;
  v1->m_kNpcList.m_pkTail = 0;
  v1->m_kNpcList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NpcMarkWin *>Vtbl *)&PgTList<NpcMarkWin *>::`vftable';
  v1->m_kPartyList.m_kAllocator.m_uiCount = 0;
  v1->m_kPartyList.m_pkHead = 0;
  v1->m_kPartyList.m_pkTail = 0;
  v1->m_kPartyList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *>Vtbl *)&PgTList<PartyMarkWin *>::`vftable';
  v1->m_spRedPos.m_pObject = 0;
  v1->m_spBluePos.m_pObject = 0;
  v1->m_kEnemyList.m_kAllocator.m_uiCount = 0;
  v1->m_kEnemyList.m_pkHead = 0;
  v1->m_kEnemyList.m_pkTail = 0;
  v1->m_kEnemyList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *>Vtbl *)&PgTList<GTIScanMarkWin *>::`vftable';
  v1->m_kKQAlarmInfos.m_kAllocator.m_uiCount = 0;
  v1->m_kKQAlarmInfos.m_pkHead = 0;
  v1->m_kKQAlarmInfos.m_pkTail = 0;
  v1->m_kKQAlarmInfos.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>Vtbl *)&PgTList<MiniMapWin::sKQAlarmInfo *>::`vftable';
  v1->m_spNewKQuest.m_pObject = 0;
  v1->m_kMapMarkMap.vfptr = (NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>Vtbl *)&NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>::`vftable';
  v1->m_kMapMarkMap.m_uiHashSize = 37;
  v1->m_kMapMarkMap.m_kAllocator.m_uiCount = 0;
  v2 = (char *)operator new[](0x94u);
  v3 = v1->m_kMapMarkMap.m_uiHashSize;
  v1->m_kMapMarkMap.m_ppkHashTable = (NiTMapItem<unsigned int,MapMarkWin *> **)v2;
  memset(v2, 0, 4 * v3);
  v1->m_kMapMarkMap.vfptr = (NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>Vtbl *)&NiTMap<unsigned int,MapMarkWin *>::`vftable';
  v1->m_KQTeamMarkWinMap.vfptr = (NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>Vtbl *)&NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::`vftable';
  v1->m_KQTeamMarkWinMap.m_uiHashSize = 37;
  v1->m_KQTeamMarkWinMap.m_kAllocator.m_uiCount = 0;
  v4 = (char *)operator new[](0x94u);
  v5 = 4 * v1->m_KQTeamMarkWinMap.m_uiHashSize;
  v1->m_KQTeamMarkWinMap.m_ppkHashTable = (NiTMapItem<unsigned short,KQTeamMarkWin *> **)v4;
  memset(v4, 0, v5);
  v1->m_KQTeamMarkWinMap.vfptr = (NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>Vtbl *)&NiTMap<unsigned short,KQTeamMarkWin *>::`vftable';
  v1->m_spSideWin.m_pObject = 0;
  v1->m_pAttachEffect.m_pObject = 0;
  v1->m_fMap2FullMapRate = 0.34179688;
  v1->m_eMode = 1;
  v1->m_pkFullMapWin = 0;
  v1->m_fTextureWidth = 512.0;
  v1->m_pkScanEffect = 0;
  v1->m_fTextureHeight = 512.0;
  v1->m_fMainCharWorldX = -1.0;
  v1->m_fMainCharWorldY = -1.0;
  v1->m_fMapCharX = -0.02;
  v1->m_fMapCharY = -0.02;
  v1->m_fShiftX = 0.0;
  v1->m_fShiftY = 0.0;
  v1->m_fAlphaBlendValue = 1.0;
  v6 = v1->m_spNewKQuest.m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v1->m_spNewKQuest.m_pObject = 0;
  }
  *(_WORD *)&v1->m_bKQStarted = 0;
  v1->m_bKQListChanged = 0;
  v1->m_eInDunLevel = 1;
  v1->m_pkHeroModeFlag = 0;
  v7 = v1->m_pAttachEffect.m_pObject;
  if ( v7 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v1->m_pAttachEffect.m_pObject = 0;
  }
  v1->m_apkEffect[0] = 0;
  v1->m_apkEffect[1] = 0;
  v1->m_apkEffect[2] = 0;
  memset(v1->m_MapName, 0, 0x80u);
}
// 98BFDC: using guessed type int (__thiscall *NiTMapBase<DFALL<MapMarkWin *>,unsigned int,MapMarkWin *>::`vftable')(void *p, char);
// 98BFFC: using guessed type int (__thiscall *NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::`vftable')(void *p, char);
// 98C0E4: using guessed type int (__thiscall *PgTList<NpcMarkWin *>::`vftable')(void *p, char);
// 98C0F4: using guessed type int (__thiscall *NiTMap<unsigned int,MapMarkWin *>::`vftable')(void *p, char);
// 98C114: using guessed type int (__thiscall *NiTMap<unsigned short,KQTeamMarkWin *>::`vftable')(void *p, char);
// 98C164: using guessed type int (__thiscall *PgTList<RaidMarkWin *>::`vftable')(void *p, char);
// 98C174: using guessed type int (__thiscall *PgTList<PartyMarkWin *>::`vftable')(void *p, char);
// 98C184: using guessed type int (__thiscall *PgTList<GTIScanMarkWin *>::`vftable')(void *p, char);
// 997138: using guessed type int (__thiscall *PgTList<MiniMapWin::sKQAlarmInfo *>::`vftable')(void *p, char);
// 997148: using guessed type void (__thiscall *MiniMapWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 997164: using guessed type int (__thiscall *MiniMapWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00552350) --------------------------------------------------------
MainCharMarkWin *__cdecl MainCharMarkWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent)
{
  PgWin *v4; // eax@1
  PgWin *v5; // esi@1
  PgWin *v6; // edi@8
  MainCharMarkWin *v7; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v4 = (PgWin *)operator new(0x124u);
  v5 = v4;
  result.m_pObject = v4;
  v9 = 0;
  if ( v4 )
  {
    PgWin::PgWin(v4);
    v5->vfptr = (NiRefObjectVtbl *)&MainCharMarkWin::`vftable'{for `NiNode'};
    v5->vfptr = (IDirectMessengerVtbl *)&MainCharMarkWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v9 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v5);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgSprData *, PgWin *))v5->vfptr[113].__vecDelDtor)(
                          v5,
                          iXPos,
                          iYPos,
                          pkSprData,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v5->vfptr[89].__vecDelDtor)(v5);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = (MainCharMarkWin *)v5;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v5);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = 0;
  }
  return v7;
}
// 995FC8: using guessed type void (__thiscall *MainCharMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 995FE4: using guessed type int (__thiscall *MainCharMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005524A0) --------------------------------------------------------
NpcMarkWin *__cdecl NpcMarkWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, QuestStateImage *pkImage, PgWin *pkParent, PgSprData *pkAutoSprData)
{
  PgWin *v6; // eax@1
  PgWin *v7; // eax@2
  PgWin *v8; // esi@2
  PgWin *v9; // edi@8
  NpcMarkWin *v10; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v12; // [sp+20h] [bp-4h]@1

  v6 = (PgWin *)operator new(0x150u);
  result.m_pObject = v6;
  v12 = 0;
  if ( v6 )
  {
    NpcMarkWin::NpcMarkWin((NpcMarkWin *)v6);
    v8 = v7;
  }
  else
  {
    v8 = 0;
  }
  if ( v8 )
    InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  v12 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v8);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgSprData *, QuestStateImage *, PgWin *, PgSprData *))v8->vfptr[114].__vecDelDtor)(
                          v8,
                          iXPos,
                          iYPos,
                          pkSprData,
                          pkImage,
                          pkParent,
                          pkAutoSprData) )
  {
    ((void (__thiscall *)(PgWin *))v8->vfptr[89].__vecDelDtor)(v8);
    v12 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v10 = (NpcMarkWin *)v8;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v8);
    if ( result.m_pObject )
    {
      v9 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v9 )
          v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      }
    }
    v12 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v10 = 0;
  }
  return v10;
}

//----- (005525E0) --------------------------------------------------------
PartyMarkWin *__cdecl PartyMarkWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent)
{
  PgWin *v4; // eax@1
  PgWin *v5; // esi@1
  PgWin *v6; // edi@8
  PartyMarkWin *v7; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v4 = (PgWin *)operator new(0x128u);
  v5 = v4;
  result.m_pObject = v4;
  v9 = 0;
  if ( v4 )
  {
    PgWin::PgWin(v4);
    v5->vfptr = (NiRefObjectVtbl *)&PartyMarkWin::`vftable'{for `NiNode'};
    v5->vfptr = (IDirectMessengerVtbl *)&PartyMarkWin::`vftable'{for `IDirectMessenger'};
    v5[1].m_uiRefCount = 0;
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v9 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v5);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgSprData *, PgWin *))v5->vfptr[113].__vecDelDtor)(
                          v5,
                          iXPos,
                          iYPos,
                          pkSprData,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v5->vfptr[89].__vecDelDtor)(v5);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = (PartyMarkWin *)v5;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v5);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = 0;
  }
  return v7;
}
// 99639C: using guessed type void (__thiscall *PartyMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9963BC: using guessed type int (__thiscall *PartyMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00552730) --------------------------------------------------------
RaidMarkWin *__cdecl RaidMarkWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent)
{
  PgWin *v4; // eax@1
  PgWin *v5; // esi@1
  PgWin *v6; // edi@8
  RaidMarkWin *v7; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v4 = (PgWin *)operator new(0x128u);
  v5 = v4;
  result.m_pObject = v4;
  v9 = 0;
  if ( v4 )
  {
    PgWin::PgWin(v4);
    v5->vfptr = (NiRefObjectVtbl *)&RaidMarkWin::`vftable'{for `NiNode'};
    v5->vfptr = (IDirectMessengerVtbl *)&RaidMarkWin::`vftable'{for `IDirectMessenger'};
    v5[1].m_uiRefCount = 0;
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v9 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v5);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgSprData *, PgWin *))v5->vfptr[113].__vecDelDtor)(
                          v5,
                          iXPos,
                          iYPos,
                          pkSprData,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v5->vfptr[89].__vecDelDtor)(v5);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = (RaidMarkWin *)v5;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v5);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = 0;
  }
  return v7;
}
// 996588: using guessed type void (__thiscall *RaidMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9965A4: using guessed type int (__thiscall *RaidMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00552880) --------------------------------------------------------
QuestHelperMarkWin *__cdecl QuestHelperMarkWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, PgSprData *pkAutoSprData)
{
  PgWin *v5; // eax@1
  PgWin *v6; // esi@1
  PgWin *v7; // edi@8
  QuestHelperMarkWin *v8; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v10; // [sp+20h] [bp-4h]@1

  v5 = (PgWin *)operator new(0x13Cu);
  v6 = v5;
  result.m_pObject = v5;
  v10 = 0;
  if ( v5 )
  {
    PgWin::PgWin(v5);
    v6->vfptr = (NiRefObjectVtbl *)&QuestHelperMarkWin::`vftable'{for `NiNode'};
    v6->vfptr = (IDirectMessengerVtbl *)&QuestHelperMarkWin::`vftable'{for `IDirectMessenger'};
    v6[1].m_pcName = 0;
    LOWORD(v6[1].m_spControllers.m_pObject) = -1;
    v6[1].m_uiRefCount = 0;
  }
  else
  {
    v6 = 0;
  }
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v10 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v6);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgSprData *, PgWin *, PgSprData *))v6->vfptr[114].__vecDelDtor)(
                          v6,
                          iXPos,
                          iYPos,
                          pkSprData,
                          pkParent,
                          pkAutoSprData) )
  {
    ((void (__thiscall *)(PgWin *))v6->vfptr[89].__vecDelDtor)(v6);
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = (QuestHelperMarkWin *)v6;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v6);
    if ( result.m_pObject )
    {
      v7 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      }
    }
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = 0;
  }
  return v8;
}
// 996B74: using guessed type void (__thiscall *QuestHelperMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 996B94: using guessed type int (__thiscall *QuestHelperMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005529F0) --------------------------------------------------------
MobAreaMarkWin *__cdecl MobAreaMarkWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent)
{
  PgWin *v4; // eax@1
  PgWin *v5; // esi@1
  PgWin *v6; // edi@8
  MobAreaMarkWin *v7; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v4 = (PgWin *)operator new(0x134u);
  v5 = v4;
  result.m_pObject = v4;
  v9 = 0;
  if ( v4 )
  {
    PgWin::PgWin(v4);
    v5->vfptr = (NiRefObjectVtbl *)&MobAreaMarkWin::`vftable'{for `NiNode'};
    v5->vfptr = (IDirectMessengerVtbl *)&MobAreaMarkWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v9 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v5);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgSprData *, PgWin *))v5->vfptr[113].__vecDelDtor)(
                          v5,
                          iXPos,
                          iYPos,
                          pkSprData,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v5->vfptr[89].__vecDelDtor)(v5);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = (MobAreaMarkWin *)v5;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v5);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = 0;
  }
  return v7;
}
// 996D64: using guessed type void (__thiscall *MobAreaMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 996D84: using guessed type int (__thiscall *MobAreaMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00552B40) --------------------------------------------------------
GTIScanMarkWin *__cdecl GTIScanMarkWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent)
{
  PgWin *v4; // eax@1
  PgWin *v5; // esi@1
  PgWin *v6; // edi@8
  GTIScanMarkWin *v7; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v4 = (PgWin *)operator new(0x12Cu);
  v5 = v4;
  result.m_pObject = v4;
  v9 = 0;
  if ( v4 )
  {
    PgWin::PgWin(v4);
    v5->vfptr = (NiRefObjectVtbl *)&GTIScanMarkWin::`vftable'{for `NiNode'};
    v5->vfptr = (IDirectMessengerVtbl *)&GTIScanMarkWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v9 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v5);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgSprData *, PgWin *))v5->vfptr[113].__vecDelDtor)(
                          v5,
                          iXPos,
                          iYPos,
                          pkSprData,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v5->vfptr[89].__vecDelDtor)(v5);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = (GTIScanMarkWin *)v5;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v5);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = 0;
  }
  return v7;
}
// 996770: using guessed type void (__thiscall *GTIScanMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99678C: using guessed type int (__thiscall *GTIScanMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00552C90) --------------------------------------------------------
MapMarkWin *__cdecl MapMarkWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent)
{
  PgWin *v4; // eax@1
  PgWin *v5; // esi@1
  PgWin *v6; // edi@8
  MapMarkWin *v7; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v4 = (PgWin *)operator new(0x134u);
  v5 = v4;
  result.m_pObject = v4;
  v9 = 0;
  if ( v4 )
  {
    PgWin::PgWin(v4);
    v5->vfptr = (NiRefObjectVtbl *)&MapMarkWin::`vftable'{for `NiNode'};
    v5->vfptr = (IDirectMessengerVtbl *)&MapMarkWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v9 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v5);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgSprData *, PgWin *))v5->vfptr[113].__vecDelDtor)(
                          v5,
                          iXPos,
                          iYPos,
                          pkSprData,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v5->vfptr[89].__vecDelDtor)(v5);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = (MapMarkWin *)v5;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v5);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = 0;
  }
  return v7;
}
// 996F50: using guessed type void (__thiscall *MapMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 996F6C: using guessed type int (__thiscall *MapMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00552DE0) --------------------------------------------------------
KQTeamMarkWin *__cdecl KQTeamMarkWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent)
{
  PgWin *v4; // eax@1
  PgWin *v5; // esi@1
  PgWin *v6; // edi@8
  KQTeamMarkWin *v7; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v4 = (PgWin *)operator new(0x128u);
  v5 = v4;
  result.m_pObject = v4;
  v9 = 0;
  if ( v4 )
  {
    PgWin::PgWin(v4);
    v5->vfptr = (NiRefObjectVtbl *)&KQTeamMarkWin::`vftable'{for `NiNode'};
    v5->vfptr = (IDirectMessengerVtbl *)&KQTeamMarkWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v9 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v5);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgSprData *, PgWin *))v5->vfptr[113].__vecDelDtor)(
                          v5,
                          iXPos,
                          iYPos,
                          pkSprData,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v5->vfptr[89].__vecDelDtor)(v5);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = (KQTeamMarkWin *)v5;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v5);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = 0;
  }
  return v7;
}
// 996958: using guessed type void (__thiscall *KQTeamMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 996974: using guessed type int (__thiscall *KQTeamMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00552F30) --------------------------------------------------------
MiniMapWin *__cdecl MiniMapWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  MiniMapWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x328u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    MiniMapWin::MiniMapWin((MiniMapWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (MiniMapWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00553060) --------------------------------------------------------
char __thiscall MiniMapWin::CreateKoreaUI(MiniMapWin *this, PgFrameWork *pkFrameWork)
{
  MiniMapWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  char result; // al@7
  NiTexturePalette *v7; // ebx@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  PgSprData *v10; // edi@11
  PgSprData *v11; // ebx@11
  PgSprData *v12; // eax@18
  PgSprData *v13; // edi@18
  PgSprData *v14; // ebx@18
  PgSprData *v15; // eax@25
  PgSprData *v16; // edi@25
  PgSprData *v17; // ebx@25
  PgSprData *v18; // eax@32
  PgSprData *v19; // edi@32
  PgSprData *v20; // ebx@32
  PgSprData *v21; // eax@39
  PgSprData *v22; // edi@39
  PgSprData *v23; // ebx@39
  PgSprData *v24; // eax@46
  NiNode *v25; // esi@47
  int v26; // edi@52
  int v27; // ebx@52
  NiAVObject *v28; // eax@52
  NiTexturingProperty *v29; // eax@52
  NiTexturingProperty::Map *v30; // eax@54
  NiSourceTexture *v31; // eax@55
  PgSprData *v32; // eax@57
  PgWinSpr *v33; // eax@57
  ClientWin *v34; // eax@57
  PgSprData *v35; // eax@57
  NiShader *v36; // eax@57
  MaskedWin *v37; // eax@57
  NiTriShape *v38; // eax@57
  PgFrameWork *v39; // eax@58
  PgSprData *v40; // eax@60
  PgWinSpr *v41; // eax@60
  NiSourceTexture *z; // ST88_4@60
  NiNode *v43; // ecx@60
  PgSprData *v44; // eax@60
  double v45; // st7@61
  PgWin *v46; // ecx@61
  double v47; // st6@61
  PgSprData *v48; // eax@61
  NiD3DDefaultShader *v49; // eax@61
  NiNode *pkObject; // ST9C_4@62
  const char *v51; // eax@62
  PgSprData *v52; // eax@62
  NiD3DDefaultShader *v53; // eax@63
  char *v54; // eax@63
  NiSourceTexture *v55; // ST88_4@63
  NiD3DDefaultShader *v56; // eax@63
  char *v57; // eax@63
  NiSourceTexture *v58; // ST88_4@63
  PgSprData *v59; // eax@63
  NiD3DDefaultShader *v60; // eax@63
  PgWin *x; // ST80_4@63
  PgSprData *v62; // ST7C_4@63
  int (*v63)(void); // eax@63
  int v64; // ST78_4@63
  int v65; // eax@63
  char *v66; // eax@63
  NiSourceTexture *v67; // ST88_4@63
  NiD3DDefaultShader *v68; // eax@63
  char *v69; // eax@63
  NiD3DDefaultShader *v70; // eax@63
  char *v71; // eax@63
  NiSourceTexture *v72; // ST88_4@63
  PgSprData *v73; // eax@63
  NiD3DDefaultShader *v74; // eax@63
  NiD3DDefaultShader *v75; // eax@63
  char *v76; // eax@63
  NiD3DDefaultShader *v77; // eax@63
  char *v78; // eax@63
  NiD3DDefaultShader *v79; // eax@63
  char *v80; // eax@63
  PgWin *y; // ST84_4@63
  PgFont *v82; // eax@63
  PgWinAbbreviateText *v83; // eax@63
  PgFrameWork *v84; // eax@63
  PgWinSpr *v85; // eax@63
  void (__thiscall *v86)(IDirectMessenger *, IDirectMessenger *); // eax@63
  NiAVObject *v87; // edx@63
  NiAVObject *v88; // ST9C_4@63
  PgFont *v89; // eax@63
  PgWinText *v90; // eax@63
  NiUnsharedGeometryGroup *v91; // eax@63
  PgWinBut *v92; // eax@63
  NiD3DDefaultShader *v93; // eax@63
  NiD3DDefaultShader *v94; // eax@63
  const char *v95; // eax@65
  PgFrameWork *v96; // edi@65
  NiNode *v97; // eax@66
  SpEffect *v98; // eax@66
  PgWin *v99; // ecx@68
  PgWin *v100; // ST88_4@68
  PgSprData *v101; // eax@68
  NiNode *v102; // esi@69
  NiTexturingProperty *v103; // esi@73
  PgWinSpr *v104; // eax@78
  char *v105; // eax@80
  PgWinSpr *v106; // eax@80
  char *v107; // eax@82
  const char *v108; // eax@82
  PgFrameWork *v109; // edi@83
  NiNode *v110; // eax@84
  SpEffect *v111; // eax@84
  PgWinSpr *v112; // ecx@86
  int (*v113)(void); // eax@86
  signed int v114; // eax@86
  NiAVObject **v115; // ecx@86
  NiAVObject *v116; // ecx@87
  float v117; // ST84_4@87
  unsigned int uiWidth; // [sp+A0h] [bp-2Ch]@60
  unsigned int uiHeight; // [sp+A4h] [bp-28h]@60
  NiPointer<NiTexturingProperty> spTexProp; // [sp+A8h] [bp-24h]@52
  NiPointer<NiNode> pkNiNodePtr; // [sp+ACh] [bp-20h]@63
  NiSourceTexture *pkTexture; // [sp+B0h] [bp-1Ch]@1
  int uiLeft; // [sp+B4h] [bp-18h]@11
  int uiTop; // [sp+B8h] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+BCh] [bp-10h]@1
  int v126; // [sp+C8h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v126 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  pkTexture = v3;
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v126 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
    goto LABEL_5;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "Game\\Minimap.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ChrImg01", &uiLeft, &uiTop, v3);
  v10 = v2->m_spMainCharSprData.m_pObject;
  v11 = v9;
  if ( v10 != v9 )
  {
    if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    v2->m_spMainCharSprData.m_pObject = v11;
    if ( v11 )
      InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
  }
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "LinkImg", &uiLeft, &uiTop, pkTexture);
  v13 = v2->m_spLinkSprData.m_pObject;
  v14 = v12;
  if ( v13 != v12 )
  {
    if ( v13 && !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) && v13 )
      v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
    v2->m_spLinkSprData.m_pObject = v14;
    if ( v14 )
      InterlockedIncrement((volatile LONG *)&v14->m_uiRefCount);
  }
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "LinkDirImg", &uiLeft, &uiTop, pkTexture);
  v16 = v2->m_spLinkDirSprData.m_pObject;
  v17 = v15;
  if ( v16 != v15 )
  {
    if ( v16 && !InterlockedDecrement((volatile LONG *)&v16->m_uiRefCount) && v16 )
      v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
    v2->m_spLinkDirSprData.m_pObject = v17;
    if ( v17 )
      InterlockedIncrement((volatile LONG *)&v17->m_uiRefCount);
  }
  v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ParImg", &uiLeft, &uiTop, pkTexture);
  v19 = v2->m_spPartySprData.m_pObject;
  v20 = v18;
  if ( v19 != v18 )
  {
    if ( v19 && !InterlockedDecrement((volatile LONG *)&v19->m_uiRefCount) && v19 )
      v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
    v2->m_spPartySprData.m_pObject = v20;
    if ( v20 )
      InterlockedIncrement((volatile LONG *)&v20->m_uiRefCount);
  }
  v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NPCImg", &uiLeft, &uiTop, pkTexture);
  v22 = v2->m_spNpcSprData.m_pObject;
  v23 = v21;
  if ( v22 != v21 )
  {
    if ( v22 && !InterlockedDecrement((volatile LONG *)&v22->m_uiRefCount) && v22 )
      v22->vfptr->__vecDelDtor((NiRefObject *)v22, 1u);
    v2->m_spNpcSprData.m_pObject = v23;
    if ( v23 )
      InterlockedIncrement((volatile LONG *)&v23->m_uiRefCount);
  }
  v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, pkTexture);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v24, 0, pkFrameWork, "MiniMapWin", 0) )
  {
    v26 = uiLeft;
    v27 = uiTop;
    v28 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("EventPanel");
    v29 = (NiTexturingProperty *)NiAVObject::GetProperty(v28, 8);
    spTexProp.m_pObject = v29;
    if ( v29 )
    {
      InterlockedIncrement((volatile LONG *)&v29->m_uiRefCount);
      v29 = spTexProp.m_pObject;
    }
    v30 = *v29->m_kMaps.m_pBase;
    LOBYTE(v126) = 1;
    if ( !v30 )
      goto LABEL_91;
    v31 = (NiSourceTexture *)v30->m_spTexture.m_pObject;
    if ( !v31 )
      goto LABEL_91;
    v32 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "EventPanel", &uiLeft, &uiTop, v31);
    v33 = PgWinSpr::CreateWin(uiLeft - v26, uiTop - v27, v32, (PgWin *)&v2->vfptr, 0, 0);
    v33->vfptr[60].__vecDelDtor((NiRefObject *)v33, 0);
    v34 = ClientWin::CreateWin(0, 0, (PgWin *)&v2->vfptr);
    v2->m_pkClientWin = v34;
    v34->vfptr[60].__vecDelDtor((NiRefObject *)v34, 0);
    v35 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Map_Mask01", &uiLeft, &uiTop, pkTexture);
    PgWinSpr::CreateWin(uiLeft - v26, uiTop - v27, v35, (PgWin *)&v2->m_pkClientWin->vfptr, 0, 0);
    v36 = (NiShader *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Map_Mask");
    *(float *)&pkFrameWork = COERCE_FLOAT(CPostProcessEffect::DynamicCast(&NiTriShape::m_RTTI, v36));
    PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Map_Mask", &uiLeft, &uiTop, pkTexture);
    v37 = MaskedWin::CreateWin_MaskShaderNoAlphaBlend(
            uiLeft - v26,
            uiTop - v27,
            (NiTriShape *)pkFrameWork,
            (PgWin *)&v2->m_pkClientWin->vfptr);
    v2->m_pkMiniMapWin = v37;
    v37->vfptr[60].__vecDelDtor((NiRefObject *)v37, 0);
    v38 = MaskedWin::GetTriShape(v2->m_pkMiniMapWin);
    if ( v38 )
    {
      v39 = (PgFrameWork *)NiAVObject::GetProperty((NiAVObject *)&v38->vfptr, 8);
      pkFrameWork = v39;
      if ( v39 )
      {
        NiTexturingProperty::SetBaseFilterMode((NiTexturingProperty *)v39, FILTER_BILERP);
        NiTexturingProperty::SetBaseClampMode((NiTexturingProperty *)pkFrameWork, WRAP_S_WRAP_T);
      }
    }
    PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Map_Mask", &uiLeft, &uiTop, &uiWidth, &uiHeight);
    v40 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane01", &uiLeft, &uiTop, pkTexture);
    v41 = PgWinSpr::CreateWin(uiLeft - v26, uiTop - v27, v40, (PgWin *)&v2->m_pkClientWin->vfptr, 0, 0);
    v41->vfptr[60].__vecDelDtor((NiRefObject *)v41, 0);
    z = pkTexture;
    v43 = spNode.m_pObject;
    v2->m_fViewLeft = (double)uiLeft;
    v2->m_fViewTop = (double)uiTop;
    v44 = PgSprData::Create((NiAVObject *)&v43->vfptr, "Map_Coordinate", &uiLeft, &uiTop, z);
    if ( v44 )
    {
      *(float *)&pkFrameWork = (double)v44->m_akHitTester.m_pBase->m_pObject->m_uiWidth;
      v45 = *(float *)&pkFrameWork;
      v2->m_fViewWidth = *(float *)&pkFrameWork;
      pkFrameWork = (PgFrameWork *)v44->m_akHitTester.m_pBase->m_pObject->m_uiHeight;
      v46 = (PgWin *)&v2->m_pkClientWin->vfptr;
      *(float *)&pkFrameWork = (double)(unsigned int)pkFrameWork;
      v47 = *(float *)&pkFrameWork;
      v48 = v2->m_spMainCharSprData.m_pObject;
      v2->m_fViewHeight = *(float *)&pkFrameWork;
      v2->m_pkMainCharMarkWin = MainCharMarkWin::CreateWin(
                                  (signed int)(v45 * 0.5 + v2->m_fViewLeft),
                                  (signed int)(v47 * 0.5 + v2->m_fViewTop),
                                  v48,
                                  v46);
      v49 = (NiD3DDefaultShader *)ClientWin::CreateWin(0, 0, (PgWin *)&v2->vfptr);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spSideWin, v49);
      ((void (__stdcall *)(_DWORD))v2->m_spSideWin.m_pObject->vfptr[60].__vecDelDtor)(0);
      *(float *)&pkFrameWork = 0.0;
      do
      {
        pkObject = spNode.m_pObject;
        v51 = fs("Plane%02d", (char *)&pkFrameWork->vfptr + 2);
        v52 = PgSprData::Create((NiAVObject *)&pkObject->vfptr, v51, &uiLeft, &uiTop, 0);
        PgWinSpr::CreateWin(uiLeft - v26, uiTop - v27, v52, (PgWin *)&v2->m_spSideWin.m_pObject->vfptr, 0, 0);
        pkFrameWork = (PgFrameWork *)((char *)pkFrameWork + 1);
      }
      while ( (signed int)pkFrameWork < 4 );
      *(float *)&pkFrameWork = COERCE_FLOAT(PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MaxBtnNor", &uiLeft, &uiTop, pkTexture));
      PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "MaxBtnClick");
      PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "MaxBtnOver");
      v53 = (NiD3DDefaultShader *)PgWinBut::CreateWin(
                                    uiLeft - v26,
                                    uiTop - v27,
                                    (PgSprData *)pkFrameWork,
                                    (PgWin *)&v2->vfptr,
                                    0,
                                    0,
                                    0);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spZoomInBut, v53);
      pkFrameWork = (PgFrameWork *)v2->m_spZoomInBut.m_pObject;
      v54 = (char *)TextData::Get(0xF9FE2744);
      PgWin::SetToolTipWinText((PgWin *)pkFrameWork, v54);
      v55 = pkTexture;
      v2->m_spZoomInBut.m_pObject->m_pkToolTipWin = g_pkToolTipWin;
      *(float *)&pkFrameWork = COERCE_FLOAT(PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MinBtnNor", &uiLeft, &uiTop, v55));
      PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "MinBtnClick");
      PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "MinBtnOver");
      v56 = (NiD3DDefaultShader *)PgWinBut::CreateWin(
                                    uiLeft - v26,
                                    uiTop - v27,
                                    (PgSprData *)pkFrameWork,
                                    (PgWin *)&v2->vfptr,
                                    1u,
                                    0,
                                    0);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spZoomOutBut, v56);
      ((void (__stdcall *)(_DWORD))v2->m_spZoomOutBut.m_pObject->vfptr[60].__vecDelDtor)(0);
      v2->m_spZoomOutBut.m_pObject->m_uFlags |= 1u;
      pkFrameWork = (PgFrameWork *)v2->m_spZoomOutBut.m_pObject;
      v57 = (char *)TextData::Get(0xF9522E4A);
      PgWin::SetToolTipWinText((PgWin *)pkFrameWork, v57);
      v58 = pkTexture;
      v2->m_spZoomOutBut.m_pObject->m_pkToolTipWin = g_pkToolTipWin;
      v59 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MinBtnDisableBack", &uiLeft, &uiTop, v58);
      v60 = (NiD3DDefaultShader *)PgWinSpr::CreateWin(uiLeft - v26, uiTop - v27, v59, (PgWin *)&v2->vfptr, 0, 0);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spZoomDisableSpr, v60);
      ((void (__stdcall *)(_DWORD))v2->m_spZoomDisableSpr.m_pObject->vfptr[64].__vecDelDtor)(0);
      v62 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MinBtnDisable", &uiLeft, &uiTop, pkTexture);
      v63 = (int (*)(void))v2->m_spZoomDisableSpr.m_pObject->vfptr[42].__vecDelDtor;
      pkFrameWork = (PgFrameWork *)v2->m_spZoomDisableSpr.m_pObject;
      x = (PgWin *)pkFrameWork;
      v64 = uiTop - v27 - v63();
      v65 = ((int (*)(void))pkFrameWork->vfptr[6].DirectDispatchToParent)();
      *(float *)&pkFrameWork = COERCE_FLOAT(PgWinSpr::CreateWin(uiLeft - v26 - v65, v64, v62, x, 0, 0));
      v66 = (char *)TextData2::Get(0xB838864u);
      PgWin::SetToolTipWinText((PgWin *)pkFrameWork, v66);
      v67 = pkTexture;
      pkFrameWork[7].m_kMsgQ.m_uiHead = (unsigned int)g_pkToolTipWin;
      *(float *)&pkFrameWork = COERCE_FLOAT(PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "AllMapBtnNor", &uiLeft, &uiTop, v67));
      PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "AllMapBtnClick");
      PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "AllMapBtnOver");
      v68 = (NiD3DDefaultShader *)PgWinBut::CreateWin(
                                    uiLeft - v26,
                                    uiTop - v27,
                                    (PgSprData *)pkFrameWork,
                                    (PgWin *)&v2->vfptr,
                                    4u,
                                    0,
                                    0);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spAllMapBut, v68);
      pkFrameWork = (PgFrameWork *)v2->m_spAllMapBut.m_pObject;
      v69 = (char *)TextData::Get(0xF9FB2623);
      PgWin::SetToolTipWinText((PgWin *)pkFrameWork, v69);
      v2->m_spAllMapBut.m_pObject->m_pkToolTipWin = g_pkToolTipWin;
      *(float *)&pkFrameWork = COERCE_FLOAT(PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ScheduleBtnNor", &uiLeft, &uiTop, 0));
      PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "ScheduleBtnClick");
      PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "ScheduleBtnOver");
      v70 = (NiD3DDefaultShader *)PgWinBut::CreateWin(
                                    uiLeft - v26,
                                    uiTop - v27,
                                    (PgSprData *)pkFrameWork,
                                    (PgWin *)&v2->vfptr,
                                    5u,
                                    0,
                                    0);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)v2->m_spSideBut, v70);
      pkFrameWork = (PgFrameWork *)v2->m_spSideBut[0].m_pObject;
      v71 = (char *)TextData::Get(0xF5FB2F3F);
      PgWin::SetToolTipWinText((PgWin *)pkFrameWork, v71);
      v72 = pkTexture;
      v2->m_spSideBut[0].m_pObject->m_pkToolTipWin = g_pkToolTipWin;
      v73 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NewKQuest", &uiLeft, &uiTop, v72);
      v74 = (NiD3DDefaultShader *)PgWinSpr::CreateWin(uiLeft - v26, uiTop - v27, v73, (PgWin *)&v2->vfptr, 0, 0);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spNewKQuest, v74);
      ((void (__stdcall *)(_DWORD))v2->m_spNewKQuest.m_pObject->vfptr[64].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v2->m_spNewKQuest.m_pObject->vfptr[60].__vecDelDtor)(0);
      *(float *)&pkFrameWork = COERCE_FLOAT(PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ExpeditionNor", &uiLeft, &uiTop, 0));
      PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "ExpeditionClick");
      PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "ExpeditionOver");
      v75 = (NiD3DDefaultShader *)PgWinBut::CreateWin(
                                    uiLeft - v26,
                                    uiTop - v27,
                                    (PgSprData *)pkFrameWork,
                                    (PgWin *)&v2->vfptr,
                                    8u,
                                    0,
                                    0);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spSideBut[2], v75);
      pkFrameWork = (PgFrameWork *)v2->m_spSideBut[2].m_pObject;
      v76 = (char *)TextData2::Get(0xFDF7DB2E);
      PgWin::SetToolTipWinText((PgWin *)pkFrameWork, v76);
      v2->m_spSideBut[2].m_pObject->m_pkToolTipWin = g_pkToolTipWin;
      *(float *)&pkFrameWork = COERCE_FLOAT(PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PartyMatchingNor", &uiLeft, &uiTop, 0));
      PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "PartyMatchingClick");
      PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "PartyMatchingOver");
      v77 = (NiD3DDefaultShader *)PgWinBut::CreateWin(
                                    uiLeft - v26,
                                    uiTop - v27,
                                    (PgSprData *)pkFrameWork,
                                    (PgWin *)&v2->vfptr,
                                    6u,
                                    0,
                                    0);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spSideBut[1], v77);
      pkFrameWork = (PgFrameWork *)v2->m_spSideBut[1].m_pObject;
      v78 = (char *)TextData::Get(0x5D9FE8F1u);
      PgWin::SetToolTipWinText((PgWin *)pkFrameWork, v78);
      v2->m_spSideBut[1].m_pObject->m_pkToolTipWin = g_pkToolTipWin;
      *(float *)&pkFrameWork = COERCE_FLOAT(PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ProductNor", &uiLeft, &uiTop, 0));
      PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "ProductClick");
      PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "ProductOver");
      v79 = (NiD3DDefaultShader *)PgWinBut::CreateWin(
                                    uiLeft - v26,
                                    uiTop - v27,
                                    (PgSprData *)pkFrameWork,
                                    (PgWin *)&v2->vfptr,
                                    9u,
                                    0,
                                    0);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spSideBut[3], v79);
      pkFrameWork = (PgFrameWork *)v2->m_spSideBut[3].m_pObject;
      v80 = (char *)TextData::Get(0xE9E5F047);
      PgWin::SetToolTipWinText((PgWin *)pkFrameWork, v80);
      v2->m_spSideBut[3].m_pObject->m_pkToolTipWin = g_pkToolTipWin;
      PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight);
      y = g_pkToolTipWin;
      v82 = Font::Get(0);
      v83 = PgWinAbbreviateText::CreateWin(
              uiLeft - v26,
              uiTop - v27,
              uiWidth,
              uiHeight,
              v82,
              (PgWin *)&v2->vfptr,
              0,
              0,
              0,
              1,
              y,
              0xFFFFFFE2);
      v2->m_pkMapNameTextWin = (PgWinText *)v83;
      v83->vfptr[122].__vecDelDtor((NiRefObject *)v83, 1u);
      ((void (__stdcall *)(void *))v2->m_pkMapNameTextWin->vfptr[118].__vecDelDtor)(&unk_995B31);
      ((void (__stdcall *)(_DWORD))v2->m_pkMapNameTextWin->vfptr[60].__vecDelDtor)(0);
      ((void (__stdcall *)(struct D3DXCOLOR *))v2->m_pkMapNameTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
      v84 = (PgFrameWork *)PgSprData::Create(
                             (NiAVObject *)&spNode.m_pObject->vfptr,
                             "GuildQuitPanel",
                             &uiLeft,
                             &uiTop,
                             pkTexture);
      pkFrameWork = v84;
      v85 = PgWinSpr::CreateWin(uiLeft - v26, uiTop - v27, (PgSprData *)v84, (PgWin *)&v2->vfptr, 0, 0);
      v2->m_pkGTQuitPanel = v85;
      v85->vfptr[64].__vecDelDtor((NiRefObject *)v85, 0);
      v86 = pkFrameWork[1].vfptr->SetMsgHooker;
      v87 = (NiAVObject *)*((_DWORD *)v86 + 5);
      pkFrameWork = *((PgFrameWork **)v86 + 6);
      v88 = v87;
      v89 = Font::Get(MAIN_MENU);
      v90 = PgWinText::CreateWin(
              uiLeft - v26,
              uiTop - v27 + 1,
              (unsigned int)v88,
              (unsigned int)pkFrameWork,
              v89,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v2->m_pkGTTQuitText = v90;
      v90->vfptr[122].__vecDelDtor((NiRefObject *)v90, 5u);
      pkFrameWork = (PgFrameWork *)&v2->m_pkGTTQuitText->vfptr[118];
      v91 = TextData2::Get(0x9CB0FCF1);
      ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkFrameWork->vfptr)(v2->m_pkGTTQuitText, v91);
      ((void (__stdcall *)(_DWORD))v2->m_pkGTTQuitText->vfptr[60].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v2->m_pkGTTQuitText->vfptr[64].__vecDelDtor)(0);
      *(float *)&pkFrameWork = COERCE_FLOAT(PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, pkTexture));
      PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
      PgSprData::Add((PgSprData *)pkFrameWork, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
      v92 = PgWinBut::CreateWin(uiLeft - v26, uiTop - v27, (PgSprData *)pkFrameWork, (PgWin *)&v2->vfptr, 7u, 0, 0);
      v2->m_pkGTQuitBut = v92;
      v92->vfptr[64].__vecDelDtor((NiRefObject *)v92, 0);
      v2->m_eMode = 1;
      MiniMapWin::SetZoomButStateByMode(v2);
      v93 = (NiD3DDefaultShader *)PgSprData::Create(
                                    (NiAVObject *)&spNode.m_pObject->vfptr,
                                    "ForceRed",
                                    &uiLeft,
                                    &uiTop,
                                    0);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spRedPos, v93);
      v94 = (NiD3DDefaultShader *)PgSprData::Create(
                                    (NiAVObject *)&spNode.m_pObject->vfptr,
                                    "ForceBlue",
                                    &uiLeft,
                                    &uiTop,
                                    0);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spBluePos, v94);
      pkNiNodePtr.m_pObject = 0;
      LOBYTE(v126) = 2;
      if ( !Folder::m_bInit )
        Folder::Init();
      v95 = Folder::Merge(&Folder::m_acEffect, "Sta_GTI_Scan_UI.nif");
      PgUtil::LoadNodeNifFile(v95, &pkNiNodePtr, 0);
      v96 = (PgFrameWork *)operator new(0x44u);
      pkFrameWork = v96;
      LOBYTE(v126) = 3;
      if ( v96 )
      {
        v97 = (NiNode *)NiObject::Clone((NiObject *)&pkNiNodePtr.m_pObject->vfptr);
        SpEffect::SpEffect((SpEffect *)v96, v97);
      }
      else
      {
        v98 = 0;
      }
      v99 = (PgWin *)&v2->m_spSideWin.m_pObject->vfptr;
      v2->m_pkScanEffect = v98;
      v100 = (PgWin *)&v2->m_spSideBut[0].m_pObject->vfptr;
      LOBYTE(v126) = 2;
      PgWin::AttachChildWin(v99, v100);
      PgWin::AttachChildWin((PgWin *)&v2->m_spSideWin.m_pObject->vfptr, (PgWin *)&v2->m_spSideBut[1].m_pObject->vfptr);
      PgWin::AttachChildWin((PgWin *)&v2->m_spSideWin.m_pObject->vfptr, (PgWin *)&v2->m_spSideBut[2].m_pObject->vfptr);
      PgWin::AttachChildWin((PgWin *)&v2->m_spSideWin.m_pObject->vfptr, (PgWin *)&v2->m_spSideBut[3].m_pObject->vfptr);
      PgWin::AttachChildWin((PgWin *)&v2->m_spSideWin.m_pObject->vfptr, (PgWin *)&v2->m_spNewKQuest.m_pObject->vfptr);
      v101 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HardModeFlag", &uiLeft, &uiTop, 0);
      if ( !v101 )
      {
        v102 = pkNiNodePtr.m_pObject;
        LOBYTE(v126) = 1;
        if ( pkNiNodePtr.m_pObject
          && !InterlockedDecrement((volatile LONG *)&pkNiNodePtr.m_pObject->m_uiRefCount)
          && v102 )
        {
          v102->vfptr->__vecDelDtor((NiRefObject *)v102, 1u);
        }
        v103 = spTexProp.m_pObject;
        LOBYTE(v126) = 0;
        if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
          v103->vfptr->__vecDelDtor((NiRefObject *)v103, 1u);
        v4 = spNode.m_pObject;
        v126 = -1;
        if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
          return 0;
        v5 = v4 == 0;
LABEL_5:
        if ( !v5 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
        return 0;
      }
      v104 = PgWinSpr::CreateWin(uiLeft, uiTop, v101, (PgWin *)&v2->vfptr, 0, 0);
      v2->m_pkHeroModeFlag = v104;
      if ( !v104 )
        goto LABEL_92;
      v104->m_pkToolTipWin = g_pkToolTipWin;
      v105 = (char *)TextData3::Get(0xE705270E);
      PgWin::SetToolTipWinText((PgWin *)&v2->m_pkHeroModeFlag->vfptr, v105);
      ((void (__stdcall *)(signed int))v2->m_pkHeroModeFlag->vfptr[64].__vecDelDtor)(1);
      ((void (__stdcall *)(signed int))v2->m_pkHeroModeFlag->vfptr[60].__vecDelDtor)(1);
      v106 = PgWinSpr::CreateWin(0, 0, 1u, 1u, (PgWin *)&v2->vfptr, 0, 0);
      pkFrameWork = (PgFrameWork *)v106;
      if ( v106 )
        InterlockedIncrement((volatile LONG *)&v106->m_uiRefCount);
      LOBYTE(v126) = 4;
      NiPointer<NiActorManager>::operator=(
        (NiPointer<NiPixelData> *)&v2->m_pAttachEffect,
        (NiPointer<NiPixelData> *)&pkFrameWork);
      LOBYTE(v126) = 2;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkFrameWork);
      ((void (__thiscall *)(MiniMapWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
        v2,
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        0.30000001,
        0.5);
      v107 = Folder::Menu();
      v108 = Folder::Merge(v107, "Game\\HeroMode.nif");
      PgUtil::LoadNodeNifFile(v108, &pkNiNodePtr, 0);
      if ( !pkNiNodePtr.m_pObject )
      {
LABEL_92:
        LOBYTE(v126) = 1;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkNiNodePtr);
        LOBYTE(v126) = 0;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
        v126 = -1;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
        return 0;
      }
      v109 = (PgFrameWork *)operator new(0x44u);
      pkFrameWork = v109;
      LOBYTE(v126) = 5;
      if ( v109 )
      {
        v110 = (NiNode *)NiObject::Clone((NiObject *)&pkNiNodePtr.m_pObject->vfptr);
        SpEffect::SpEffect((SpEffect *)v109, v110);
      }
      else
      {
        v111 = 0;
      }
      v112 = v2->m_pkHeroModeFlag;
      v2->m_apkEffect[2] = v111;
      v113 = (int (*)(void))v112->vfptr[36].__vecDelDtor;
      LOBYTE(v126) = 2;
      v114 = v113();
      v115 = (NiAVObject **)v2->m_apkEffect[2];
      if ( v115 )
      {
        v116 = *v115;
        v117 = (double)uiTop;
        *(float *)&pkFrameWork = (double)(v114 / 2) + (double)uiLeft;
        NiAVObject::SetTranslate(v116, *(float *)&pkFrameWork, v117, 1000.0);
        v2->m_apkEffect[2]->m_bClamp = 1;
      }
      LOBYTE(v126) = 1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkNiNodePtr);
      LOBYTE(v126) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
      v126 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 1;
    }
    else
    {
LABEL_91:
      LOBYTE(v126) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
      v126 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 0;
    }
  }
  else
  {
    v25 = spNode.m_pObject;
    v126 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v25 )
      v25->vfptr->__vecDelDtor((NiRefObject *)v25, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00554210) --------------------------------------------------------
void __thiscall MiniMapWin::AddNPC(MiniMapWin *this, PROTO_NC_BRIEFINFO_REGENMOB_CMD *pkProto)
{
  MiniMapWin *v2; // esi@1
  Char *v3; // eax@2
  Char *v4; // ebx@2
  NpcMarkWin *v5; // eax@7
  NpcMarkWin *v6; // edi@9
  char *v7; // eax@13
  MobInfo *v8; // ecx@13
  int v9; // eax@16
  tagRECT v10; // ST08_16@16
  NiPoint3 kDir; // [sp+Ch] [bp-50h]@16
  PROTO_NC_BRIEFINFO_REGENMOB_CMD *v12; // [sp+18h] [bp-44h]@1
  NpcMarkWin *pkWin; // [sp+1Ch] [bp-40h]@9
  MobInfo *pkMobInfo; // [sp+20h] [bp-3Ch]@10
  NiMatrix3 kMat; // [sp+24h] [bp-38h]@16
  tagRECT kRect; // [sp+48h] [bp-14h]@16

  v2 = this;
  v12 = pkProto;
  if ( pkProto )
  {
    FullMapWin::AddNPC(this->m_pkFullMapWin, pkProto);
    v3 = CharMgr::GetChar(&g_kCharMgr, pkProto->handle);
    v4 = v3;
    if ( v3 )
    {
      if ( !MiniMapWin::IsInNPC(v2, v3->m_kHandle)
        && Char::IsNPC(v4)
        && MobViewInfoTab::GetByID(v4->m_kCharShape.m_kMobID)->MiniMapIcon != 22 )
      {
        v5 = Char::IsLinkGate(v4) ? NpcMarkWin::CreateWin(
                                      0,
                                      0,
                                      v2->m_spLinkSprData.m_pObject,
                                      0,
                                      (PgWin *)&v2->m_pkClientWin->vfptr,
                                      0) : NpcMarkWin::CreateWin(
                                             0,
                                             0,
                                             v2->m_spNpcSprData.m_pObject,
                                             0,
                                             (PgWin *)&v2->m_pkClientWin->vfptr,
                                             0);
        v6 = v5;
        pkWin = v5;
        if ( v5 )
        {
          pkMobInfo = IIDTableBase<MobInfo,MobInfoTab,unsigned short>::GetByID(v4->m_kCharShape.m_kMobID);
          if ( pkMobInfo && v6->m_pkMarkWin )
          {
            if ( Char::IsLinkGate(v4) )
            {
              pkMobInfo = (MobInfo *)v6->m_pkMarkWin;
              v7 = Char::GetLinkGateName(v4);
              v8 = pkMobInfo;
            }
            else
            {
              v8 = (MobInfo *)v6->m_pkMarkWin;
              v7 = pkMobInfo->Name;
            }
            PgWin::SetToolTipWinText((PgWin *)v8, v7);
            v6->m_pkMarkWin->m_pkToolTipWin = g_pkToolTipWin;
          }
          ((void (__thiscall *)(_DWORD, _DWORD))v4->vfptr[6].GetAbstateColor)(v4, &kMat);
          ((void (__thiscall *)(_DWORD, _DWORD))v4->vfptr[6].~AbStateInfectee)(v4, &kDir);
          kDir.y = -kDir.y;
          kDir.z = -kDir.z;
          NpNs_RotateModelZToVector(&kDir, &kMat);
          v6->vfptr[74].__vecDelDtor((NiRefObject *)v6, (unsigned int)&kMat);
          v6->m_kCharHandle = v12->handle;
          NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
            (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v2->m_kNpcList,
            (NiD3DXEffectParameter *const *)&pkWin);
          ((void (__stdcall *)(_DWORD))v2->m_pkMiniMapWin->vfptr[47].__vecDelDtor)(&kRect);
          kRect.left += ((int (*)(void))v2->m_pkMiniMapWin->vfptr[41].__vecDelDtor)();
          kRect.top += ((int (*)(void))v2->m_pkMiniMapWin->vfptr[42].__vecDelDtor)();
          kRect.right += ((int (*)(void))v2->m_pkMiniMapWin->vfptr[41].__vecDelDtor)();
          v9 = ((int (*)(void))v2->m_pkMiniMapWin->vfptr[42].__vecDelDtor)();
          v10.left = kRect.left;
          *(_QWORD *)&v10.top = *(_QWORD *)&kRect.top;
          v10.bottom = v9 + kRect.bottom;
          NpcMarkWin::SetIconDrawRect(v6, v10);
          v6->m_bIconDraw = 1;
        }
      }
    }
  }
}

//----- (00554450) --------------------------------------------------------
void __thiscall MiniMapWin::AddParty(MiniMapWin *this, PartyMemberInfo *pkParty)
{
  MiniMapWin *v2; // esi@1
  PartyMarkWin *v3; // eax@1
  PartyMarkWin *v4; // edi@1
  int v5; // eax@2
  _DWORD *v6; // ecx@2

  v2 = this;
  FullMapWin::AddParty(this->m_pkFullMapWin, pkParty);
  v3 = PartyMarkWin::CreateWin(0, 0, v2->m_spPartySprData.m_pObject, (PgWin *)&v2->m_pkClientWin->vfptr);
  v4 = v3;
  if ( v3 )
  {
    v3->m_pkInfo = pkParty;
    v5 = (int)v2->m_kPartyList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,PartyMarkWin *> *)&v2->m_kPartyList);
    *(_DWORD *)(v5 + 8) = v4;
    *(_DWORD *)v5 = 0;
    *(_DWORD *)(v5 + 4) = v2->m_kPartyList.m_pkTail;
    v6 = &v2->m_kPartyList.m_pkTail->m_pkNext;
    if ( v6 )
    {
      *v6 = v5;
      ++v2->m_kPartyList.m_kAllocator.m_uiCount;
      v2->m_kPartyList.m_pkTail = (NiTListItem<PartyMarkWin *> *)v5;
    }
    else
    {
      ++v2->m_kPartyList.m_kAllocator.m_uiCount;
      v2->m_kPartyList.m_pkHead = (NiTListItem<PartyMarkWin *> *)v5;
      v2->m_kPartyList.m_pkTail = (NiTListItem<PartyMarkWin *> *)v5;
    }
  }
}

//----- (005544F0) --------------------------------------------------------
void __thiscall MiniMapWin::AddRaidMember(MiniMapWin *this, RaidMemberInfo *pkRaid)
{
  MiniMapWin *v2; // edi@1
  Name5 *v3; // eax@1
  RaidMemberInfo *v4; // esi@1
  RaidMarkWin *v5; // eax@7

  v2 = this;
  v3 = User::GetMainCharID(&g_kUser);
  v4 = pkRaid;
  if ( pkRaid->m_kCharID.n5_code[0] != v3->n5_code[0]
    || pkRaid->m_kCharID.n5_code[1] != v3->n5_code[1]
    || pkRaid->m_kCharID.n5_code[2] != v3->n5_code[2]
    || pkRaid->m_kCharID.n5_code[3] != v3->n5_code[3]
    || pkRaid->m_kCharID.n5_code[4] != v3->n5_code[4] )
  {
    FullMapWin::AddRaidMember(v2->m_pkFullMapWin, pkRaid);
    if ( !MiniMapWin::IsInRaid(v2, v4) )
    {
      v5 = RaidMarkWin::CreateWin(0, 0, v2->m_spPartySprData.m_pObject, (PgWin *)&v2->m_pkClientWin->vfptr);
      pkRaid = (RaidMemberInfo *)v5;
      if ( v5 )
      {
        v5->m_pkInfo = v4;
        NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v2->m_kRaidList,
          (NiD3DXEffectParameter *const *)&pkRaid);
      }
    }
  }
}

//----- (00554580) --------------------------------------------------------
void __thiscall MiniMapWin::AddGTEnemyPos(MiniMapWin *this, SHINE_XY_TYPE pkMemberInfo)
{
  MiniMapWin *v2; // esi@1
  FullMapWin *v3; // ecx@1
  unsigned int v4; // edi@1
  PgSprData *v5; // eax@2
  unsigned int v6; // edi@3
  GTIScanMarkWin *v7; // eax@5
  GTIScanMarkWin *v8; // edi@5
  unsigned int v9; // ecx@6
  int v10; // eax@6
  _DWORD *v11; // ecx@6
  ScanMemberInfo kmemberInfo; // [sp+8h] [bp-8h]@1

  v2 = this;
  v3 = this->m_pkFullMapWin;
  kmemberInfo.loc = pkMemberInfo;
  FullMapWin::AddGTEnemyPos(v3, &kmemberInfo);
  v4 = g_pkMainChar->m_dwGuildRegNum;
  if ( GuildTask::GetGuildTournamentImprove()->m_BlueTeam == v4 )
  {
    v5 = v2->m_spRedPos.m_pObject;
  }
  else
  {
    v6 = g_pkMainChar->m_dwGuildRegNum;
    if ( GuildTask::GetGuildTournamentImprove()->m_RedTeam != v6 )
      return;
    v5 = v2->m_spBluePos.m_pObject;
  }
  v7 = GTIScanMarkWin::CreateWin(0, 0, v5, (PgWin *)&v2->m_pkClientWin->vfptr);
  v8 = v7;
  if ( v7 )
  {
    v9 = kmemberInfo.loc.y;
    v7->m_EenemyPos.loc.x = kmemberInfo.loc.x;
    v7->m_EenemyPos.loc.y = v9;
    v10 = (int)v2->m_kEnemyList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,GTIScanMarkWin *> *)&v2->m_kEnemyList);
    *(_DWORD *)(v10 + 8) = v8;
    *(_DWORD *)v10 = 0;
    *(_DWORD *)(v10 + 4) = v2->m_kEnemyList.m_pkTail;
    v11 = &v2->m_kEnemyList.m_pkTail->m_pkNext;
    if ( v11 )
    {
      *v11 = v10;
      ++v2->m_kEnemyList.m_kAllocator.m_uiCount;
      v2->m_kEnemyList.m_pkTail = (NiTListItem<GTIScanMarkWin *> *)v10;
    }
    else
    {
      ++v2->m_kEnemyList.m_kAllocator.m_uiCount;
      v2->m_kEnemyList.m_pkHead = (NiTListItem<GTIScanMarkWin *> *)v10;
      v2->m_kEnemyList.m_pkTail = (NiTListItem<GTIScanMarkWin *> *)v10;
    }
  }
}

//----- (00554670) --------------------------------------------------------
void __thiscall MiniMapWin::AddMapMark(MiniMapWin *this, PROTO_NC_SCENARIO_MAPMARK_CMD *kProto)
{
  MiniMapWin *v2; // esi@1
  FullMapWin *v3; // ecx@1
  PROTO_NC_SCENARIO_MAPMARK_CMD *v4; // edi@1
  PROTO_NC_SCENARIO_MAPMARK_CMD *v5; // ebx@4
  PgSprData *v6; // eax@8
  MapMarkWin *v7; // eax@12
  float kPos; // ST1C_4@13
  float kPos_4; // ST20_4@13
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v10; // esi@13
  NiTMapItem<unsigned int,NiVBSet *> *v11; // edi@13
  NiVBSet *pkWin; // [sp+10h] [bp-10h]@12
  unsigned int v13; // [sp+14h] [bp-Ch]@13
  int i; // [sp+18h] [bp-8h]@3
  MiniMapWin *v15; // [sp+1Ch] [bp-4h]@1

  v2 = this;
  v3 = this->m_pkFullMapWin;
  v4 = kProto;
  v15 = v2;
  if ( v3 )
    FullMapWin::AddMapMark(v3, kProto);
  i = 0;
  if ( kProto->nNum > 0u )
  {
    v5 = kProto + 2;
    do
    {
      switch ( LOBYTE(v5[4].nNum) )
      {
        case 5:
          v6 = v2->m_spLinkSprData.m_pObject;
          break;
        case 0x10:
          v6 = v2->m_spRedPos.m_pObject;
          break;
        case 0x11:
          v6 = v2->m_spBluePos.m_pObject;
          break;
        default:
          v6 = v2->m_spNpcSprData.m_pObject;
          break;
      }
      v7 = MapMarkWin::CreateWin(0, 0, v6, (PgWin *)&v2->m_pkClientWin->vfptr);
      pkWin = (NiVBSet *)v7;
      if ( v7 )
      {
        kPos_4 = (double)*(unsigned int *)&v5[2].nNum;
        kPos = (double)*(unsigned int *)&v5->nNum;
        v7->m_kPos.x = kPos;
        v7->m_kPos.y = kPos_4;
        v10 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v2->m_kMapMarkMap;
        v7->m_fLifeTime = (double)*(unsigned int *)((char *)&v5[4].nNum + 1) / 1000.0 + Timer::ms_fCurTime;
        v13 = v5[-1].nNum;
        v11 = v10->m_ppkHashTable[v10->vfptr->KeyToHashIndex(v10, v13)];
        if ( v11 )
        {
          while ( !v10->vfptr->IsKeysEqual(v10, v13, v11->m_key) )
          {
            v11 = v11->m_pkNext;
            if ( !v11 )
              goto LABEL_19;
          }
          if ( v11->m_val )
            MiniMapWin::RemoveMapMark(v15, v5[-1].nNum);
        }
LABEL_19:
        NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::SetAt(
          v10,
          v5[-1].nNum,
          pkWin);
        v4 = kProto;
        v2 = v15;
      }
      v5 = (PROTO_NC_SCENARIO_MAPMARK_CMD *)((char *)v5 + 15);
      ++i;
    }
    while ( i < v4->nNum );
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (005547E0) --------------------------------------------------------
void __thiscall MiniMapWin::AddKQTeamMark(MiniMapWin *this, int kCharHandle)
{
  MiniMapWin *v2; // esi@1
  FullMapWin *v3; // ecx@2
  Char *v4; // eax@4
  char v5; // al@5
  PgSprData *v6; // eax@6
  KQTeamMarkWin *v7; // ebx@10
  KQTeamMarkWin *pkDelWin; // [sp+8h] [bp-4h]@11

  v2 = this;
  if ( -1 != (_WORD)kCharHandle )
  {
    v3 = this->m_pkFullMapWin;
    if ( v3 )
      FullMapWin::AddKQTeamMark(v3, kCharHandle);
    v4 = CharMgr::GetChar(&g_kCharMgr, kCharHandle);
    if ( v4 )
    {
      v5 = v4->m_byKQTeamType;
      if ( v5 )
      {
        if ( v5 != 1 )
          return;
        v6 = v2->m_spBluePos.m_pObject;
      }
      else
      {
        v6 = v2->m_spRedPos.m_pObject;
      }
      if ( v6 )
      {
        v7 = KQTeamMarkWin::CreateWin(0, 0, v6, (PgWin *)&v2->m_pkClientWin->vfptr);
        if ( v7 )
        {
          pkDelWin = 0;
          NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::GetAt(
            (NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *)&v2->m_KQTeamMarkWinMap.vfptr,
            kCharHandle,
            &pkDelWin);
          if ( pkDelWin )
            MiniMapWin::RemoveKQTeamMark(v2, kCharHandle);
          NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *>::SetAt(
            (NiTMapBase<DFALL<KQTeamMarkWin *>,unsigned short,KQTeamMarkWin *> *)&v2->m_KQTeamMarkWinMap.vfptr,
            kCharHandle,
            v7);
        }
      }
    }
  }
}

//----- (005548A0) --------------------------------------------------------
char __thiscall MiniMapWin::Create(MiniMapWin *this, PgFrameWork *pkFrameWork)
{
  MiniMapWin *v2; // esi@1

  v2 = this;
  MiniMapWin::CreateKoreaUI(this, pkFrameWork);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    1.0,
    0.0);
  v2->m_pkFullMapWin = FullMapWin::CreateWin(v2, pkFrameWork);
  return 1;
}

//----- (005548F0) --------------------------------------------------------
void __thiscall MiniMapWin::AddNPC(MiniMapWin *this, PROTO_NC_BRIEFINFO_MOB_CMD *pkProto)
{
  MiniMapWin *v2; // edi@1
  bool v3; // zf@1
  PROTO_NC_BRIEFINFO_REGENMOB_CMD *v4; // esi@2
  Char *v5; // ebx@4
  NiTListItem<NpcMarkWin *> *v6; // eax@5
  NpcMarkWin *v7; // ecx@6
  NpcMarkWin *v8; // eax@12
  NpcMarkWin *v9; // esi@14
  char *v10; // eax@18
  int v11; // eax@21
  int v12; // edx@21
  int v13; // ebx@21
  int v14; // ecx@21
  int v15; // edx@23
  NiPoint3 vec; // [sp+Ch] [bp-54h]@21
  int i; // [sp+18h] [bp-48h]@1
  NiD3DXEffectParameter *element; // [sp+1Ch] [bp-44h]@14
  MobInfo *v19; // [sp+20h] [bp-40h]@15
  char *v20; // [sp+24h] [bp-3Ch]@2
  NiMatrix3 rot; // [sp+28h] [bp-38h]@21
  int v22; // [sp+4Ch] [bp-14h]@21
  int v23; // [sp+50h] [bp-10h]@21
  int v24; // [sp+54h] [bp-Ch]@21
  int v25; // [sp+58h] [bp-8h]@21

  v2 = this;
  FullMapWin::AddNPC(this->m_pkFullMapWin, pkProto);
  v3 = pkProto->mobnum == 0;
  i = 0;
  if ( !v3 )
  {
    v4 = (PROTO_NC_BRIEFINFO_REGENMOB_CMD *)&pkProto[1];
    v20 = &pkProto[1].mobnum;
    do
    {
      if ( v4 )
      {
        FullMapWin::AddNPC(v2->m_pkFullMapWin, v4);
        v5 = CharMgr::GetChar(&g_kCharMgr, v4->handle);
        if ( v5 )
        {
          v6 = v2->m_kNpcList.m_pkHead;
          if ( v6 )
          {
            while ( 1 )
            {
              v7 = v6->m_element;
              v6 = v6->m_pkNext;
              if ( v7 )
              {
                if ( v7->m_kCharHandle == v5->m_kHandle )
                  break;
              }
              if ( !v6 )
                goto LABEL_9;
            }
          }
          else
          {
LABEL_9:
            if ( Char::IsNPC(v5) && MobViewInfoTab::GetByID(v5->m_kCharShape.m_kMobID)->MiniMapIcon != 22 )
            {
              if ( Char::IsLinkGate(v5) )
                v8 = NpcMarkWin::CreateWin(
                       0,
                       0,
                       v2->m_spLinkSprData.m_pObject,
                       0,
                       (PgWin *)&v2->m_pkClientWin->vfptr,
                       0);
              else
                v8 = NpcMarkWin::CreateWin(0, 0, v2->m_spNpcSprData.m_pObject, 0, (PgWin *)&v2->m_pkClientWin->vfptr, 0);
              v9 = v8;
              element = (NiD3DXEffectParameter *)v8;
              if ( v8 )
              {
                v19 = IIDTableBase<MobInfo,MobInfoTab,unsigned short>::GetByID(v5->m_kCharShape.m_kMobID);
                if ( v19 && v9->m_pkMarkWin )
                {
                  if ( Char::IsLinkGate(v5) )
                  {
                    v19 = (MobInfo *)v9->m_pkMarkWin;
                    v10 = Char::GetLinkGateName(v5);
                    PgWin::SetToolTipWinText((PgWin *)v19, v10);
                  }
                  else
                  {
                    PgWin::SetToolTipWinText((PgWin *)&v9->m_pkMarkWin->vfptr, v19->Name);
                  }
                  v9->m_pkMarkWin->m_pkToolTipWin = g_pkToolTipWin;
                }
                ((void (__thiscall *)(Char *, NiMatrix3 *))v5->vfptr[6].GetAbstateColor)(v5, &rot);
                ((void (__thiscall *)(Char *, NiPoint3 *))v5->vfptr[6].~AbStateInfectee)(v5, &vec);
                vec.y = -vec.y;
                vec.z = -vec.z;
                NpNs_RotateModelZToVector(&vec, &rot);
                v9->vfptr[74].__vecDelDtor((NiRefObject *)v9, (unsigned int)&rot);
                v9->m_kCharHandle = *(_WORD *)v20;
                NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
                  (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v2->m_kNpcList,
                  &element);
                ((void (__stdcall *)(int *))v2->m_pkMiniMapWin->vfptr[47].__vecDelDtor)(&v22);
                v22 += ((int (*)(void))v2->m_pkMiniMapWin->vfptr[41].__vecDelDtor)();
                v23 += ((int (*)(void))v2->m_pkMiniMapWin->vfptr[42].__vecDelDtor)();
                v24 += ((int (*)(void))v2->m_pkMiniMapWin->vfptr[41].__vecDelDtor)();
                v11 = ((int (*)(void))v2->m_pkMiniMapWin->vfptr[42].__vecDelDtor)();
                v12 = v23;
                v13 = v24;
                v25 += v11;
                v14 = v25;
                v9->m_kIconDrawRect.left = v22;
                v9->m_kIconDrawRect.top = v12;
                v9->m_kIconDrawRect.right = v13;
                v9->m_kIconDrawRect.bottom = v14;
                v9->m_bIconDraw = 1;
              }
              v4 = (PROTO_NC_BRIEFINFO_REGENMOB_CMD *)v20;
            }
          }
        }
      }
      v15 = pkProto->mobnum;
      ++v4;
      ++i;
      v20 = (char *)v4;
    }
    while ( i < v15 );
  }
}

//----- (00554B90) --------------------------------------------------------
void __thiscall NpcMarkWin::DirectMessage(NpcMarkWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  char *v4; // esi@2
  signed int v5; // edi@2
  signed int v6; // ebx@2
  int v7; // eax@2
  int v8; // ecx@2
  bool v9; // bl@6
  Char *v10; // eax@8
  Char *v11; // esi@8
  NiPointer<MapNavigator> *v12; // eax@10
  MapNavigator *v13; // edi@10
  MapNavigator *v14; // ebx@10
  GTInformWin *v15; // edi@15
  const char *v16; // eax@17
  void *v17; // ecx@19
  D3DXCOLOR v18; // ST08_16@21
  void *v19; // ST04_4@21
  char *v20; // eax@21
  char *v21; // eax@21
  Name3 *v22; // eax@22
  unsigned __int16 fLifeTime; // ST1C_2@22
  Name3 v24; // [sp+20h] [bp-70h]@22
  NiPoint3 kPos; // [sp+2Ch] [bp-64h]@22
  NiPoint3 kDest; // [sp+38h] [bp-58h]@22
  NiPointer<MapNavigator> result; // [sp+44h] [bp-4Ch]@10
  NpcMarkWin *v28; // [sp+48h] [bp-48h]@1
  int xPos; // [sp+4Ch] [bp-44h]@2
  int yPos; // [sp+50h] [bp-40h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strName; // [sp+54h] [bp-3Ch]@16
  char acMapName[13]; // [sp+70h] [bp-20h]@22
  int v33; // [sp+8Ch] [bp-4h]@16

  v28 = this;
  if ( iMsgTag == 3 )
  {
    v4 = (char *)&this[-1].m_kWorld;
    v5 = (unsigned int)(*(int (__thiscall **)(NiTransform *))(LODWORD(this[-1].m_kWorld.m_Rotate.m_pEntry[0][0]) + 144))(&this[-1].m_kWorld) >> 1;
    v6 = (unsigned int)(*(int (__thiscall **)(char *))(*(_DWORD *)v4 + 148))(v4) >> 1;
    (*(void (__thiscall **)(char *, int *, int *))(*(_DWORD *)v4 + 212))(v4, &xPos, &yPos);
    v7 = xPos - PgWin::ms_iMsX;
    v8 = yPos - PgWin::ms_iMsY;
    xPos = v7;
    yPos -= PgWin::ms_iMsY;
    v9 = v7 >= -v5 && v7 < v5 && v8 >= -v6 && v8 < v6;
    v10 = CharMgr::GetChar(&g_kCharMgr, LOWORD(v28->m_kLocal.m_Rotate.m_pEntry[2][1]));
    v11 = v10;
    if ( v9 )
    {
      if ( v10 )
      {
        v12 = MapNavigator::GetMapNavigator(&result);
        v13 = result.m_pObject;
        v14 = v12->m_pObject;
        if ( result.m_pObject && !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) && v13 )
          v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
        if ( v14 )
        {
          v15 = (GTInformWin *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID)[33].m_kMsgQ.m_uiHead;
          if ( v15 )
          {
            strName._Myres = 15;
            strName._Mysize = 0;
            strName._Bx._Buf[0] = 0;
            v33 = 0;
            if ( Char::IsLinkGate(v11) )
              v16 = Char::GetLinkGateName(v11);
            else
              v16 = (const char *)((int (__thiscall *)(Char *))v11->vfptr[2].DeleteAbStateByAbstateIndex)(v11);
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator=(&strName, v16);
            GTInformWin::Clear(v15);
            v17 = strName._Bx._Ptr;
            if ( strName._Myres < 0x10 )
              v17 = &strName;
            *(_QWORD *)&v18.r = *(_QWORD *)&Color::m_kDxYellowColor.r;
            *(_QWORD *)&v18.b = *(_QWORD *)&Color::m_kDxYellowColor.b;
            v19 = v17;
            v20 = (char *)TextData2::Get(0x9F9CD2DC);
            v21 = fs(v20, v19);
            GTInformWin::AddText(v15, v21, v18, 0, 1000000.0);
            v33 = -1;
            std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&strName);
          }
          ((void (__thiscall *)(Char *, NiPoint3 *))v11->vfptr[6].SetAbStateProperty)(v11, &kDest);
          ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[6].SetAbStateProperty)(&kPos);
          v22 = World::GetMapName(&g_kWorld, &v24);
          *(_DWORD *)acMapName = v22->n3_code[0];
          *(_DWORD *)&acMapName[4] = v22->n3_code[1];
          fLifeTime = v11->m_kCharShape.m_kMobID;
          *(_DWORD *)&acMapName[8] = v22->n3_code[2];
          acMapName[12] = 0;
          MapNavigator::FindPathAway(v14, &kPos, &kDest, acMapName, acMapName, fLifeTime);
        }
      }
    }
  }
}

//----- (00554DF0) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::~NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>(NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::`vftable';
}
// 996B54: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::`vftable')(void *p, char);

//----- (00554E00) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 996B54: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::`vftable')(void *p, char);

//----- (00554E30) --------------------------------------------------------
KQTeamMarkWin *__thiscall GTIScanMarkWin::`scalar deleting destructor'(KQTeamMarkWin *this, unsigned int a2)
{
  KQTeamMarkWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&MiniMapMarkWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MiniMapMarkWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 995DE0: using guessed type void (__thiscall *MiniMapMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 995DFC: using guessed type int (__thiscall *MiniMapMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00554E70) --------------------------------------------------------
void __thiscall NiTPointerList<MiniMapWin::sKQAlarmInfo *>::~NiTPointerList<MiniMapWin::sKQAlarmInfo *>(NiTPointerList<MiniMapWin::sKQAlarmInfo *> *this)
{
  NiTPointerList<MiniMapWin::sKQAlarmInfo *> *v1; // edi@1
  NiTListItem<MiniMapWin::sKQAlarmInfo *> *v2; // esi@1
  NiTListItem<MiniMapWin::sKQAlarmInfo *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::`vftable';
}
// 996B54: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::`vftable')(void *p, char);
// 996B64: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::`vftable')(void *p, char);

//----- (00554EF0) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *> *v2; // edi@1
  NiTListItem<MiniMapWin::sKQAlarmInfo *> *v3; // esi@1
  NiTListItem<MiniMapWin::sKQAlarmInfo *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 996B54: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::`vftable')(void *p, char);
// 996B64: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::`vftable')(void *p, char);

//----- (00554F80) --------------------------------------------------------
void __thiscall PgTList<MiniMapWin::sKQAlarmInfo *>::~PgTList<MiniMapWin::sKQAlarmInfo *>(PgTList<MiniMapWin::sKQAlarmInfo *> *this)
{
  PgTList<MiniMapWin::sKQAlarmInfo *> *v1; // edi@1
  NiTListItem<MiniMapWin::sKQAlarmInfo *> *v2; // esi@1
  NiTListItem<MiniMapWin::sKQAlarmInfo *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>Vtbl *)&PgTList<MiniMapWin::sKQAlarmInfo *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::`vftable';
}
// 996B54: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::`vftable')(void *p, char);
// 997138: using guessed type int (__thiscall *PgTList<MiniMapWin::sKQAlarmInfo *>::`vftable')(void *p, char);

//----- (00555000) --------------------------------------------------------
MobCoordinate *__cdecl ITableBase<MobCoordinate,MobCoordinateTab>::GetByIndex(unsigned int uiIndex)
{
  return (MobCoordinate *)CDataReader::GetRecord(
                            (CDataReader *)(ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable + 4),
                            uiIndex);
}
// A8C27C: using guessed type int ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable;

//----- (00555020) --------------------------------------------------------
unsigned int __cdecl ITableBase<MobCoordinate,MobCoordinateTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C27C: using guessed type int ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable;

//----- (00555040) --------------------------------------------------------
unsigned int __cdecl MobCoordinateTab::GetRecordNum(unsigned __int16 Mob_ID)
{
  unsigned int v1; // esi@1

  v1 = 0;
  if ( ITableBase<MobCoordinate,MobCoordinateTab>::GetTotal() )
  {
    do
    {
      if ( *((_WORD *)CDataReader::GetRecord(
                        (CDataReader *)(ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable + 4),
                        v1)
           + 1) == Mob_ID )
        break;
      ++v1;
    }
    while ( v1 < ITableBase<MobCoordinate,MobCoordinateTab>::GetTotal() );
  }
  return v1;
}
// A8C27C: using guessed type int ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable;

//----- (00555080) --------------------------------------------------------
PgTList<MiniMapWin::sKQAlarmInfo *> *__thiscall PgTList<MiniMapWin::sKQAlarmInfo *>::`vector deleting destructor'(PgTList<MiniMapWin::sKQAlarmInfo *> *this, unsigned int a2)
{
  PgTList<MiniMapWin::sKQAlarmInfo *> *v2; // edi@1
  NiTListItem<MiniMapWin::sKQAlarmInfo *> *v3; // esi@1
  NiTListItem<MiniMapWin::sKQAlarmInfo *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>Vtbl *)&PgTList<MiniMapWin::sKQAlarmInfo *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 996B54: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MiniMapWin::sKQAlarmInfo *>::`vftable')(void *p, char);
// 997138: using guessed type int (__thiscall *PgTList<MiniMapWin::sKQAlarmInfo *>::`vftable')(void *p, char);

//----- (00555110) --------------------------------------------------------
QuestHelperMarkWin *__thiscall QuestHelperMarkWin::`vector deleting destructor'(QuestHelperMarkWin *this, unsigned int a2)
{
  QuestHelperMarkWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&QuestHelperMarkWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&QuestHelperMarkWin::`vftable'{for `IDirectMessenger'};
  QuestHelperMarkWin::OnClose(this);
  v2->vfptr = (NiRefObjectVtbl *)&MiniMapMarkWin::`vftable'{for `NiNode'};
  v2->vfptr = (IDirectMessengerVtbl *)&MiniMapMarkWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 995DE0: using guessed type void (__thiscall *MiniMapMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 995DFC: using guessed type int (__thiscall *MiniMapMarkWin::`vftable'{for `NiNode'})(void *p, char);
// 996B74: using guessed type void (__thiscall *QuestHelperMarkWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 996B94: using guessed type int (__thiscall *QuestHelperMarkWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005551A0) --------------------------------------------------------
MiniMapWin *__thiscall MiniMapWin::`vector deleting destructor'(MiniMapWin *this, unsigned int a2)
{
  MiniMapWin *v2; // esi@1

  v2 = this;
  MiniMapWin::~MiniMapWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005551D0) --------------------------------------------------------
void __thiscall MiniPartyWin::ProcessMeInput(MiniPartyWin *this, bool *bHit)
{
  PgWinFrame::ProcessMeInput((PgWinFrame *)&this->vfptr, bHit);
}

//----- (005551E0) --------------------------------------------------------
void __thiscall MiniPartyWin::ClearInfo(MiniPartyWin *this)
{
  MiniPartyWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkNameTextWin->vfptr[118].__vecDelDtor)(&unk_9973A1);
  v1->m_pkMemberInfo = 0;
}

//----- (00555210) --------------------------------------------------------
const char *__thiscall MiniPartyWin::GetMemberName(MiniPartyWin *this)
{
  MiniPartyWin *v1; // esi@1
  const char *result; // eax@2

  v1 = this;
  if ( this->m_pkNameTextWin )
  {
    ((void (*)(void))this->m_pkNameTextWin->vfptr[121].__vecDelDtor)();
    result = (const char *)((int (*)(void))v1->m_pkNameTextWin->vfptr[121].__vecDelDtor)();
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00555250) --------------------------------------------------------
void __thiscall MiniPartyWin::DirectMessage(MiniPartyWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  MiniPartyWin *v4; // esi@1
  signed int v5; // eax@2
  AbstateIcon *v6; // ecx@11
  void *(__thiscall *v7)(NiRefObject *, unsigned int); // eax@14
  void (__thiscall *v8)(NiPointer<AbstateIcon> *, void **, int *); // eax@19
  int v9; // ebx@19
  signed int v10; // eax@20
  int v11; // eax@22
  const char *v12; // eax@26
  unsigned int v13; // edi@26
  char *v14; // eax@31
  Char *v15; // eax@33
  int v16; // [sp+0h] [bp-Ch]@0
  int v17; // [sp+0h] [bp-Ch]@12
  int iSy; // [sp+8h] [bp-4h]@19

  v4 = this;
  if ( iMsgTag == 15 )
  {
    v5 = 0;
    switch ( *(_DWORD *)pvBody )
    {
      case 0x3F7:
        v5 = 1;
        break;
      case 0x3F8:
        v5 = 2;
        break;
      case 0x3F9:
        v5 = 4;
        break;
      case 0x3FA:
        v5 = 8;
        break;
      case 0x3FB:
        v5 = 16;
        break;
      default:
        break;
    }
    if ( *((_BYTE *)pvBody + 4) )
      LODWORD(this->m_kWorld.m_Rotate.m_pEntry[0][2]) |= v5;
    else
      LODWORD(this->m_kWorld.m_Rotate.m_pEntry[0][2]) &= ~v5;
    v6 = this->m_apkAbstateBufIconWin[3].m_pObject;
    if ( LOBYTE(v4->m_kWorld.m_Rotate.m_pEntry[0][2]) & 0x10 )
    {
      ((void (__stdcall *)(_DWORD, int))v6->vfptr[60].__vecDelDtor)(0, v16);
      v4->m_apkAbstateBufIconWin[3].m_pObject->m_uFlags |= 1u;
      ((void (__cdecl *)(_DWORD))v4->m_apkAbstateBufIconWin[3].m_pObject->vfptr[64].__vecDelDtor)(0);
    }
    else
    {
      ((void (__stdcall *)(signed int, int))v6->vfptr[60].__vecDelDtor)(1, v16);
      v4->m_apkAbstateBufIconWin[3].m_pObject->m_uFlags &= 0xFFFEu;
      ((void (__cdecl *)(signed int))v4->m_apkAbstateBufIconWin[3].m_pObject->vfptr[64].__vecDelDtor)(1);
    }
    v7 = v4->m_apkAbstateBufIconWin[2].m_pObject->vfptr[60].__vecDelDtor;
    if ( LOBYTE(v4->m_kWorld.m_Rotate.m_pEntry[0][2]) & 0xF )
    {
      ((void (__stdcall *)(_DWORD, int))v7)(0, v17);
      v4->m_apkAbstateBufIconWin[2].m_pObject->m_uFlags |= 1u;
    }
    else
    {
      ((void (__stdcall *)(signed int, int))v7)(1, v17);
      v4->m_apkAbstateBufIconWin[2].m_pObject->m_uFlags &= 0xFFFEu;
    }
    ((void (*)(void))v4->m_apkAbstateBufIconWin[2].m_pObject->vfptr[64].__vecDelDtor)();
  }
  if ( pkFrom )
  {
    v8 = (void (__thiscall *)(NiPointer<AbstateIcon> *, void **, int *))LODWORD(v4[-1].m_apkAbstateBufIconWin[5].m_pObject->m_kBound.m_kCenter.z);
    pvBody = (void *)PgWin::ms_iMsX;
    v9 = (int)&v4[-1].m_apkAbstateBufIconWin[5];
    iSy = PgWin::ms_iMsY;
    v8(&v4[-1].m_apkAbstateBufIconWin[5], &pvBody, &iSy);
    if ( (signed int)pvBody >= 0 )
    {
      v10 = (*(int (__thiscall **)(NiPointer<AbstateIcon> *))(*(_DWORD *)v9 + 144))(&v4[-1].m_apkAbstateBufIconWin[5]);
      if ( (signed int)pvBody < v10 && iSy >= 0 )
      {
        v11 = (*(int (__thiscall **)(NiPointer<AbstateIcon> *))(*(_DWORD *)v9 + 148))(&v4[-1].m_apkAbstateBufIconWin[5]);
        if ( iSy < v11 )
        {
          if ( iMsgTag == 3 )
          {
            if ( LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[2][0]) )
            {
              v14 = (char *)(*(int (**)(void))(*(_DWORD *)LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[2][0]) + 484))();
              if ( v14 )
              {
                if ( strcmp(v14, (const char *)&unk_9973A3) )
                {
                  v15 = CharMgr::GetChar(&g_kCharMgr, v14);
                  if ( v15 )
                    GameFrameWork::TargetCharReq((GameFrameWork *)LODWORD(v4->m_kLocal.m_Rotate.m_pEntry[1][0]), v15);
                }
              }
            }
          }
          else if ( iMsgTag == 6 )
          {
            if ( LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[2][0]) )
            {
              v12 = (const char *)(*(int (**)(void))(*(_DWORD *)LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[2][0]) + 484))();
              v13 = (unsigned int)v12;
              if ( v12 )
              {
                if ( strcmp(v12, (const char *)&unk_9973A2) )
                {
                  if ( (unsigned __int8)(*(int (__thiscall **)(NiPointer<AbstateIcon> *))(*(_DWORD *)v9 + 260))(&v4[-1].m_apkAbstateBufIconWin[5]) )
                    PgFrameWork::AddMsg((PgFrameWork *)LODWORD(v4->m_kLocal.m_Rotate.m_pEntry[1][0]), 0x80u, v13, 0);
                }
              }
            }
          }
        }
      }
    }
  }
}

//----- (005554E0) --------------------------------------------------------
void __thiscall MiniPartyWin::SetBuffUI(MiniPartyWin *this, Char *pkMember, StateType type, int *AbstateNums)
{
  MiniPartyWin *v4; // esi@1
  NiTListItem<AbStateInst *> *v5; // ecx@1
  signed int v6; // eax@1
  AbstateIcon **v7; // edi@2
  AbstateIcon **v8; // esi@2
  AbStateInst *v9; // ebx@5
  int v10; // eax@9
  bool v11; // zf@9
  AbnormalStateViewInfo **v12; // eax@9
  int v13; // eax@18
  int *v14; // eax@18
  int v15; // eax@19
  StateType v16; // eax@22
  int v17; // eax@27
  int *v18; // eax@27
  int v19; // eax@28
  int v20; // [sp+4h] [bp-14h]@5
  unsigned __int16 v21; // [sp+4h] [bp-14h]@16
  unsigned __int16 v22; // [sp+4h] [bp-14h]@25
  NiTListItem<AbStateInst *> *kIter; // [sp+8h] [bp-10h]@5
  unsigned __int16 pkInfo; // [sp+Ch] [bp-Ch]@5
  AbnormalStateViewInfo *pkInfoa; // [sp+Ch] [bp-Ch]@6
  AbnormalStateViewInfo *pkInfob; // [sp+Ch] [bp-Ch]@16
  AbnormalStateViewInfo *pkInfoc; // [sp+Ch] [bp-Ch]@25
  int v28; // [sp+10h] [bp-8h]@2
  int v29; // [sp+14h] [bp-4h]@2
  int i; // [sp+20h] [bp+8h]@1

  v4 = this;
  v5 = AbStateInfectee::GetAbStateList((AbStateInfectee *)&pkMember->vfptr)->m_pkHead;
  v6 = *AbstateNums;
  i = *AbstateNums;
  if ( v5 )
  {
    v28 = (int)&v4->m_apkAbstateBuffWin[v6];
    v7 = &v4->m_apkAbstateBufIconWin[v6].m_pObject;
    v29 = (int)&v4->m_apkAbstateDBuffWin[v6];
    v8 = &v4->m_apkAbstateDeBufIconWin[v6].m_pObject;
    while ( v6 < 15 )
    {
      v9 = v5->m_element;
      kIter = v5->m_pkNext;
      pkInfo = v9->kID;
      v20 = ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;
      if ( (unsigned __int8)(*(int (__stdcall **)(_DWORD))(*(_DWORD *)ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable
                                                         + 16))(v9->kID) )
      {
        if ( pkInfo <= *(_WORD *)(v20 + 200) )
        {
          v10 = *(_DWORD *)(v20 + 196);
          v11 = *(_DWORD *)(v10 + 4 * pkInfo) == 0;
          v12 = (AbnormalStateViewInfo **)(v10 + 4 * pkInfo);
          if ( v11 )
            pkInfoa = 0;
          else
            pkInfoa = *v12;
        }
        else
        {
          pkInfoa = 0;
        }
      }
      else
      {
        pkInfoa = 0;
      }
      if ( pkInfoa->View )
      {
        if ( type != 4 || pkInfoa->TypeSort != 4 )
        {
          v16 = pkInfoa->TypeSort;
          if ( v16 == type && v16 != 4 )
          {
            AbstateIcon::SetAbstate(*v7, v9->kID);
            PgWin::SetToolTipWinText((PgWin *)&(*v7)->vfptr, pkInfoa->Descript);
            (*v7)->m_pkToolTipWin = g_pkToolTipWin;
            ((void (__stdcall *)(signed int))(*v7)->vfptr[64].__vecDelDtor)(1);
            ((void (__stdcall *)(signed int))(*v7)->vfptr[60].__vecDelDtor)(1);
            ((void (__stdcall *)(signed int))(*v7)->vfptr[62].__vecDelDtor)(1);
            (*(void (__stdcall **)(signed int))(**(_DWORD **)v28 + 256))(1);
            ++i;
            v29 += 4;
            v28 += 4;
            ++v8;
            ++v7;
            if ( v9->uiSubStateStr )
            {
              v22 = v9->kID;
              pkInfoc = (AbnormalStateViewInfo *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
              if ( (unsigned __int8)(*(int (__stdcall **)(_DWORD))(*(_DWORD *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable
                                                                 + 16))(v9->kID) )
              {
                if ( v22 <= *(_WORD *)&pkInfoc->Descript[130] )
                {
                  v17 = *(_DWORD *)&pkInfoc->Descript[126];
                  v11 = *(_DWORD *)(v17 + 4 * v22) == 0;
                  v18 = (int *)(v17 + 4 * v22);
                  if ( !v11 )
                  {
                    v19 = *v18;
                    if ( v19 )
                    {
                      if ( *(_BYTE *)(v19 + 288) )
                      {
                        AbstateIcon::SetDuplicate(*v7, v9->uiSubStateStr);
                        ((void (__stdcall *)(signed int))(*v7)->vfptr[64].__vecDelDtor)(1);
                        ((void (__stdcall *)(signed int))(*v7)->vfptr[60].__vecDelDtor)(1);
                        ((void (__stdcall *)(signed int))(*v7)->vfptr[62].__vecDelDtor)(1);
                        (*(void (__stdcall **)(signed int))(**(_DWORD **)v28 + 256))(1);
                        ++i;
                        v29 += 4;
                        ++v8;
                        ++v7;
                        v28 += 4;
                      }
                    }
                  }
                }
              }
            }
          }
        }
        else
        {
          AbstateIcon::SetAbstate(*v8, v9->kID);
          PgWin::SetToolTipWinText((PgWin *)&(*v8)->vfptr, pkInfoa->Descript);
          (*v8)->m_pkToolTipWin = g_pkToolTipWin;
          ((void (__stdcall *)(signed int))(*v8)->vfptr[64].__vecDelDtor)(1);
          ((void (__stdcall *)(signed int))(*v8)->vfptr[60].__vecDelDtor)(1);
          ((void (__stdcall *)(signed int))(*v8)->vfptr[62].__vecDelDtor)(1);
          (*(void (__stdcall **)(signed int))(**(_DWORD **)v29 + 256))(1);
          ++i;
          v29 += 4;
          v28 += 4;
          ++v8;
          ++v7;
          if ( v9->uiSubStateStr )
          {
            v21 = v9->kID;
            pkInfob = (AbnormalStateViewInfo *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
            if ( (unsigned __int8)(*(int (__stdcall **)(_DWORD))(*(_DWORD *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable
                                                               + 16))(v9->kID) )
            {
              if ( v21 <= *(_WORD *)&pkInfob->Descript[130] )
              {
                v13 = *(_DWORD *)&pkInfob->Descript[126];
                v11 = *(_DWORD *)(v13 + 4 * v21) == 0;
                v14 = (int *)(v13 + 4 * v21);
                if ( !v11 )
                {
                  v15 = *v14;
                  if ( v15 )
                  {
                    if ( *(_BYTE *)(v15 + 288) )
                    {
                      AbstateIcon::SetDuplicate(*v8, v9->uiSubStateStr);
                      ((void (__stdcall *)(signed int))(*v8)->vfptr[64].__vecDelDtor)(1);
                      ((void (__stdcall *)(signed int))(*v8)->vfptr[60].__vecDelDtor)(1);
                      ((void (__stdcall *)(signed int))(*v8)->vfptr[62].__vecDelDtor)(1);
                      (*(void (__stdcall **)(signed int))(**(_DWORD **)v29 + 256))(1);
                      ++i;
                      ++v8;
                      ++v7;
                      v28 += 4;
                      v29 += 4;
                    }
                  }
                }
              }
            }
          }
        }
      }
      if ( !kIter )
      {
        *AbstateNums = i;
        return;
      }
      v5 = kIter;
      v6 = i;
    }
    *AbstateNums = v6;
  }
  else
  {
    *AbstateNums = v6;
  }
}
// A8C2A0: using guessed type int ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
// A8C2A4: using guessed type int ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;

//----- (00555880) --------------------------------------------------------
void __thiscall MiniPartyWin::SetOption(MiniPartyWin *this, unsigned int uiOpt)
{
  MiniPartyWin *v2; // esi@1
  char *v3; // edi@1
  int v4; // edi@4
  int v5; // edi@7
  int v6; // edi@10
  int v7; // edi@13
  PgWinBut *v8; // ecx@16
  void *(__thiscall *v9)(NiRefObject *, unsigned int); // eax@19
  int v10; // [sp+0h] [bp-14h]@0
  int v11; // [sp+0h] [bp-14h]@17
  DirectUserMsgBody_PopupMenuSetCheckBox kBody; // [sp+Ch] [bp-8h]@1

  v2 = this;
  v3 = (char *)&this->m_spPopupMenu.m_pObject->vfptr;
  kBody.iPopupMenuID = 1015;
  kBody.bCheck = uiOpt & 1;
  if ( *((_DWORD *)v3 + 1) )
  {
    (*(void (__stdcall **)(signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, char *))(**((_DWORD **)v3 + 1) + 4))(
      16,
      &kBody,
      v3);
    if ( *((_DWORD *)v3 + 1) )
      (*(void (__stdcall **)(signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, char *))(**((_DWORD **)v3 + 1) + 16))(
        16,
        &kBody,
        v3);
  }
  (*(void (__thiscall **)(char *, signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, char *))(*(_DWORD *)v3 + 16))(
    v3,
    16,
    &kBody,
    v3);
  v4 = (int)&v2->m_spPopupMenu.m_pObject->vfptr;
  kBody.iPopupMenuID = 1016;
  kBody.bCheck = (uiOpt >> 1) & 1;
  if ( *(_DWORD *)(v4 + 4) )
  {
    (*(void (__stdcall **)(signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, int))(**(_DWORD **)(v4 + 4) + 4))(
      16,
      &kBody,
      v4);
    if ( *(_DWORD *)(v4 + 4) )
      (*(void (__stdcall **)(signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, int))(**(_DWORD **)(v4 + 4) + 16))(
        16,
        &kBody,
        v4);
  }
  (*(void (__thiscall **)(int, signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, int))(*(_DWORD *)v4 + 16))(
    v4,
    16,
    &kBody,
    v4);
  v5 = (int)&v2->m_spPopupMenu.m_pObject->vfptr;
  kBody.iPopupMenuID = 1017;
  kBody.bCheck = (uiOpt >> 2) & 1;
  if ( *(_DWORD *)(v5 + 4) )
  {
    (*(void (__stdcall **)(signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, int))(**(_DWORD **)(v5 + 4) + 4))(
      16,
      &kBody,
      v5);
    if ( *(_DWORD *)(v5 + 4) )
      (*(void (__stdcall **)(signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, int))(**(_DWORD **)(v5 + 4) + 16))(
        16,
        &kBody,
        v5);
  }
  (*(void (__thiscall **)(int, signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, int))(*(_DWORD *)v5 + 16))(
    v5,
    16,
    &kBody,
    v5);
  v6 = (int)&v2->m_spPopupMenu.m_pObject->vfptr;
  kBody.iPopupMenuID = 1018;
  kBody.bCheck = (uiOpt >> 3) & 1;
  if ( *(_DWORD *)(v6 + 4) )
  {
    (*(void (__stdcall **)(signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, int))(**(_DWORD **)(v6 + 4) + 4))(
      16,
      &kBody,
      v6);
    if ( *(_DWORD *)(v6 + 4) )
      (*(void (__stdcall **)(signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, int))(**(_DWORD **)(v6 + 4) + 16))(
        16,
        &kBody,
        v6);
  }
  (*(void (__thiscall **)(int, signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, int))(*(_DWORD *)v6 + 16))(
    v6,
    16,
    &kBody,
    v6);
  v7 = (int)&v2->m_spPopupMenu.m_pObject->vfptr;
  kBody.iPopupMenuID = 1019;
  kBody.bCheck = (uiOpt >> 4) & 1;
  if ( *(_DWORD *)(v7 + 4) )
  {
    (*(void (__stdcall **)(signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, int))(**(_DWORD **)(v7 + 4) + 4))(
      16,
      &kBody,
      v7);
    if ( *(_DWORD *)(v7 + 4) )
      (*(void (__stdcall **)(signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, int))(**(_DWORD **)(v7 + 4) + 16))(
        16,
        &kBody,
        v7);
  }
  (*(void (__thiscall **)(int, signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, int))(*(_DWORD *)v7 + 16))(
    v7,
    16,
    &kBody,
    v7);
  v8 = v2->m_pkDeBufExtendBtn.m_pObject;
  v2->m_uiOption = uiOpt;
  if ( uiOpt & 0x10 )
  {
    ((void (__stdcall *)(_DWORD, int))v8->vfptr[60].__vecDelDtor)(0, v10);
    v2->m_pkDeBufExtendBtn.m_pObject->m_uFlags |= 1u;
    ((void (__cdecl *)(_DWORD))v2->m_pkDeBufExtendBtn.m_pObject->vfptr[64].__vecDelDtor)(0);
  }
  else
  {
    ((void (__stdcall *)(signed int, int))v8->vfptr[60].__vecDelDtor)(1, v10);
    v2->m_pkDeBufExtendBtn.m_pObject->m_uFlags &= 0xFFFEu;
    ((void (__cdecl *)(signed int))v2->m_pkDeBufExtendBtn.m_pObject->vfptr[64].__vecDelDtor)(1);
  }
  v9 = v2->m_pkBufExtendBtn.m_pObject->vfptr[60].__vecDelDtor;
  if ( v2->m_uiOption & 0xF )
  {
    ((void (__stdcall *)(_DWORD, int))v9)(0, v11);
    v2->m_pkBufExtendBtn.m_pObject->m_uFlags |= 1u;
  }
  else
  {
    ((void (__stdcall *)(signed int, int))v9)(1, v11);
    v2->m_pkBufExtendBtn.m_pObject->m_uFlags &= 0xFFFEu;
  }
  ((void (__thiscall *)(PgWinBut *))v2->m_pkBufExtendBtn.m_pObject->vfptr[64].__vecDelDtor)(v2->m_pkBufExtendBtn.m_pObject);
}

//----- (00555B10) --------------------------------------------------------
void __thiscall MiniPartyWin::OnCommand(MiniPartyWin *this, unsigned int wParam, int lParam)
{
  MiniPartyWin *v3; // esi@1

  v3 = this;
  if ( wParam )
  {
    if ( wParam == 1 )
    {
      this->m_uiOption |= 0x10u;
      MiniPartyWin::SetOption(this, this->m_uiOption);
      ((void (__stdcall *)(_DWORD))v3->m_pkDeBufExtendBtn.m_pObject->vfptr[60].__vecDelDtor)(0);
      v3->m_pkDeBufExtendBtn.m_pObject->m_uFlags |= 1u;
      ((void (__stdcall *)(_DWORD))v3->m_pkDeBufExtendBtn.m_pObject->vfptr[64].__vecDelDtor)(0);
    }
  }
  else
  {
    MiniPartyWin::SetOption(this, this->m_uiOption | 0xF);
    ((void (__stdcall *)(_DWORD))v3->m_pkBufExtendBtn.m_pObject->vfptr[60].__vecDelDtor)(0);
    v3->m_pkBufExtendBtn.m_pObject->m_uFlags |= 1u;
    ((void (__stdcall *)(_DWORD))v3->m_pkBufExtendBtn.m_pObject->vfptr[64].__vecDelDtor)(0);
  }
}

//----- (00555BB0) --------------------------------------------------------
void __thiscall MiniPartyWin::~MiniPartyWin(MiniPartyWin *this)
{
  MiniPartyWin *v1; // esi@1
  PgWinBut *v2; // edi@1
  PgWinBut *v3; // edi@5
  PopupMenuWin *v4; // edi@9

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&MiniPartyWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MiniPartyWin::`vftable'{for `IDirectMessenger'};
  PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&this->m_spPopupMenu.m_pObject->vfptr);
  v2 = v1->m_pkDeBufExtendBtn.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_pkBufExtendBtn.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  `eh vector destructor iterator'(
    v1->m_apkAbstateDBuffWin,
    4u,
    15,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_apkAbstateBuffWin,
    4u,
    15,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_apkAbstateDeBufIconWin,
    4u,
    15,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_apkAbstateBufIconWin,
    4u,
    15,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v4 = v1->m_spPopupMenu.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 99754C: using guessed type void (__thiscall *MiniPartyWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99756C: using guessed type int (__thiscall *MiniPartyWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00555D00) --------------------------------------------------------
char __thiscall MiniPartyWin::Create(MiniPartyWin *this, int iXPos, int iYPos, PgWin *pkParent, NiNode *pkNode, PgFrameWork *pkFrameWork)
{
  MiniPartyWin *v6; // esi@1
  NiSourceTexture *v7; // edi@1
  NiNode *v8; // esi@2
  const char *v10; // eax@9
  PgSprData *v11; // eax@10
  int v12; // edi@11
  int v13; // ebx@11
  NiAVObject *v14; // eax@11
  NiTexturingProperty *v15; // eax@11
  NiTexturingProperty::Map *v16; // eax@13
  NiSourceTexture *v17; // eax@14
  PgSprData *v18; // eax@15
  PgWinSpr *v19; // eax@15
  PgWinSpr *v20; // eax@15
  NiSourceTexture *v21; // ST40_4@15
  NiNode *v22; // edx@15
  PgSprData *v23; // eax@15
  PgWinSpr *v24; // eax@15
  PgSprData *v25; // eax@15
  PgWinBar *v26; // eax@15
  PgSprData *v27; // eax@15
  PgWinBar *v28; // eax@15
  PgSprData *v29; // eax@15
  PgWinBar *v30; // eax@15
  PgSprData *v31; // eax@15
  PgWinBar *v32; // eax@15
  PgSprData *v33; // eax@18
  PgWinBar *v34; // eax@18
  PgSprData *v35; // eax@19
  PgWinBar *v36; // eax@19
  PgSprData *v37; // eax@19
  PgWinBar *v38; // eax@19
  PgSprData *v39; // eax@19
  PgWinBar *v40; // eax@19
  PgSprData *v41; // eax@20
  PgWinBar *v42; // eax@20
  PgSprData *v43; // eax@22
  NiD3DDefaultShader *v44; // eax@22
  AbstateIcon *v45; // eax@22
  PgSprData *v46; // eax@22
  NiD3DDefaultShader *v47; // eax@22
  AbstateIcon *v48; // eax@22
  NiD3DDefaultShader *v49; // eax@23
  NiSourceTexture *v50; // ST40_4@23
  NiD3DDefaultShader *v51; // eax@23
  PgWin *v52; // ST3C_4@23
  PgFont *v53; // eax@23
  PgWinAbbreviateText *v54; // eax@23
  NiSourceTexture *v55; // ST10_4@23
  NiNode *v56; // edx@23
  PgSprData *v57; // eax@23
  PgWinSpr *v58; // eax@23
  PgSprData *v59; // eax@23
  NiSourceTexture *v60; // eax@23
  PgSprData *v61; // eax@23
  PgWinSpr *v62; // eax@23
  NiSourceTexture *v63; // eax@23
  NiD3DDefaultShader *v64; // eax@23
  char *v65; // eax@23
  PopupMenuTextCheck *v66; // eax@23
  char *v67; // eax@23
  PopupMenuTextCheck *v68; // eax@23
  char *v69; // eax@23
  PopupMenuTextCheck *v70; // eax@23
  char *v71; // eax@23
  PopupMenuTextCheck *v72; // eax@23
  char *v73; // eax@23
  PopupMenuTextCheck *v74; // eax@23
  UIUtil ui; // [sp+10h] [bp-88h]@15
  int i; // [sp+24h] [bp-74h]@7
  unsigned int uiWidth; // [sp+28h] [bp-70h]@15
  unsigned int uiHeight; // [sp+2Ch] [bp-6Ch]@15
  NiPointer<NiTexturingProperty> spTexProp; // [sp+30h] [bp-68h]@1
  NiSourceTexture *pkTexture; // [sp+34h] [bp-64h]@1
  PgSprData *pkSprData; // [sp+38h] [bp-60h]@20
  NiPointer<NiNode> spNode; // [sp+3Ch] [bp-5Ch]@1
  int uiTop; // [sp+40h] [bp-58h]@10
  int uiLeft; // [sp+44h] [bp-54h]@10
  char acShapeName[64]; // [sp+48h] [bp-50h]@21
  int v86; // [sp+94h] [bp-4h]@1

  spTexProp.m_pObject = (NiTexturingProperty *)pkFrameWork;
  v6 = this;
  spNode.m_pObject = 0;
  v86 = 0;
  v7 = MenuTexMgr::GetTexture(4u);
  pkTexture = v7;
  if ( !v7 )
    goto LABEL_26;
  i = (int)pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v10 = Folder::Merge(&Folder::m_acMenu, "Game\\PtyWin_Mini.nif");
  PgUtil::LoadNodeNifFile(v10, &spNode, (NiTexturePalette *)i);
  if ( !spNode.m_pObject )
    return 0;
  v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, v7);
  if ( !PgWinFrame::Create(
          (PgWinFrame *)&v6->vfptr,
          iXPos,
          iYPos,
          v11,
          pkParent,
          (PgFrameWork *)spTexProp.m_pObject,
          "PartyMemberWin",
          0) )
  {
LABEL_26:
    v8 = spNode.m_pObject;
    v86 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v8 )
        v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    }
    return 0;
  }
  v12 = uiLeft;
  v13 = uiTop;
  v14 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("EventPanel");
  v15 = (NiTexturingProperty *)NiAVObject::GetProperty(v14, 8);
  spTexProp.m_pObject = v15;
  if ( v15 )
  {
    InterlockedIncrement((volatile LONG *)&v15->m_uiRefCount);
    v15 = spTexProp.m_pObject;
  }
  v16 = *v15->m_kMaps.m_pBase;
  LOBYTE(v86) = 1;
  if ( v16 )
  {
    v17 = (NiSourceTexture *)v16->m_spTexture.m_pObject;
    if ( v17 )
    {
      v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "EventPanel", &uiLeft, &uiTop, v17);
      v19 = PgWinSpr::CreateWin(uiLeft, uiTop, v18, (PgWin *)&v6->vfptr, 0, 0);
      v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
      UIUtil::UIUtil(&ui);
      LOBYTE(v86) = 2;
      UIUtil::SetOffset(&ui, v12, v13);
      UIUtil::SetParent(&ui, (PgWin *)&v6->vfptr);
      UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
      v6->m_pkSPGround = UIUtil::CreateSpr(&ui, "SPground", 0);
      v20 = UIUtil::CreateSpr(&ui, "LPground", 0);
      v21 = pkTexture;
      v22 = spNode.m_pObject;
      v6->m_pkLPGround = v20;
      v23 = PgSprData::Create((NiAVObject *)&v22->vfptr, "Panel02", &uiLeft, &uiTop, v21);
      v24 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v23, (PgWin *)&v6->vfptr, 0, 0);
      v24->vfptr[60].__vecDelDtor((NiRefObject *)v24, 0);
      v25 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_HP_Start", &uiLeft, &uiTop, pkTexture);
      v26 = PgWinBar::CreateWin(uiLeft - v12, uiTop - v13, v25, (PgWin *)&v6->vfptr, BGT_RIGHT);
      v6->m_pkHPBarStartWin = (PgWinSpr *)v26;
      v26->vfptr[64].__vecDelDtor((NiRefObject *)v26, 0);
      ((void (__stdcall *)(_DWORD))v6->m_pkHPBarStartWin->vfptr[60].__vecDelDtor)(0);
      v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_SP_Start", &uiLeft, &uiTop, pkTexture);
      v28 = PgWinBar::CreateWin(uiLeft - v12, uiTop - v13, v27, (PgWin *)&v6->vfptr, BGT_RIGHT);
      v6->m_pkSPBarStartWin = (PgWinSpr *)v28;
      v28->vfptr[64].__vecDelDtor((NiRefObject *)v28, 0);
      ((void (__stdcall *)(_DWORD))v6->m_pkSPBarStartWin->vfptr[60].__vecDelDtor)(0);
      v29 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_HP_End", &uiLeft, &uiTop, pkTexture);
      v30 = PgWinBar::CreateWin(uiLeft - v12, uiTop - v13, v29, (PgWin *)&v6->vfptr, BGT_RIGHT);
      v6->m_pkHPBarEndWin = (PgWinSpr *)v30;
      v30->vfptr[64].__vecDelDtor((NiRefObject *)v30, 0);
      ((void (__stdcall *)(_DWORD))v6->m_pkHPBarEndWin->vfptr[60].__vecDelDtor)(0);
      v31 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_SP_End", &uiLeft, &uiTop, pkTexture);
      v32 = PgWinBar::CreateWin(uiLeft - v12, uiTop - v13, v31, (PgWin *)&v6->vfptr, BGT_RIGHT);
      v6->m_pkSPBarEndWin = (PgWinSpr *)v32;
      v32->vfptr[64].__vecDelDtor((NiRefObject *)v32, 0);
      ((void (__stdcall *)(_DWORD))v6->m_pkSPBarEndWin->vfptr[60].__vecDelDtor)(0);
      if ( PgUtil::GetTriShapeRect(
             (NiAVObject *)&spNode.m_pObject->vfptr,
             "Fill_HP",
             &uiLeft,
             &uiTop,
             &uiWidth,
             &uiHeight) )
      {
        v33 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_HP", &uiLeft, &uiTop, pkTexture);
        v34 = PgWinBar::CreateWin(uiLeft - v12, uiTop - v13, v33, (PgWin *)&v6->vfptr, BGT_RIGHT);
        v6->m_pkHPBarWin = v34;
        v34->vfptr[60].__vecDelDtor((NiRefObject *)v34, 0);
        if ( PgUtil::GetTriShapeRect(
               (NiAVObject *)&spNode.m_pObject->vfptr,
               "Fill_SP",
               &uiLeft,
               &uiTop,
               &uiWidth,
               &uiHeight) )
        {
          v35 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_SP", &uiLeft, &uiTop, pkTexture);
          v36 = PgWinBar::CreateWin(uiLeft - v12, uiTop - v13, v35, (PgWin *)&v6->vfptr, BGT_RIGHT);
          v6->m_pkSPBarWin = v36;
          v36->vfptr[60].__vecDelDtor((NiRefObject *)v36, 0);
          v37 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_LP_Start", &uiLeft, &uiTop, pkTexture);
          v38 = PgWinBar::CreateWin(uiLeft - v12, uiTop - v13, v37, (PgWin *)&v6->vfptr, BGT_RIGHT);
          v6->m_pkLPBarStartWin = (PgWinSpr *)v38;
          v38->vfptr[64].__vecDelDtor((NiRefObject *)v38, 0);
          ((void (__stdcall *)(_DWORD))v6->m_pkLPBarStartWin->vfptr[60].__vecDelDtor)(0);
          v39 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_LP_End", &uiLeft, &uiTop, pkTexture);
          v40 = PgWinBar::CreateWin(uiLeft - v12, uiTop - v13, v39, (PgWin *)&v6->vfptr, BGT_RIGHT);
          v6->m_pkLPBarEndWin = (PgWinSpr *)v40;
          v40->vfptr[64].__vecDelDtor((NiRefObject *)v40, 0);
          ((void (__stdcall *)(_DWORD))v6->m_pkLPBarEndWin->vfptr[60].__vecDelDtor)(0);
          if ( PgUtil::GetTriShapeRect(
                 (NiAVObject *)&spNode.m_pObject->vfptr,
                 "Fill_LP",
                 &uiLeft,
                 &uiTop,
                 &uiWidth,
                 &uiHeight) )
          {
            v41 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_LP", &uiLeft, &uiTop, pkTexture);
            v42 = PgWinBar::CreateWin(uiLeft - v12, uiTop - v13, v41, (PgWin *)&v6->vfptr, BGT_RIGHT);
            v6->m_pkLPBarWin = v42;
            v42->vfptr[60].__vecDelDtor((NiRefObject *)v42, 0);
            i = 0;
            pkSprData = (PgSprData *)v6->m_apkAbstateBufIconWin;
            while ( 1 )
            {
              sprintf(acShapeName, "CharBuffBox%02d", i);
              if ( !PgUtil::GetTriShapeRect(
                      (NiAVObject *)&spNode.m_pObject->vfptr,
                      acShapeName,
                      &uiLeft,
                      &uiTop,
                      &uiWidth,
                      &uiHeight) )
                break;
              v43 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, pkTexture);
              v44 = (NiD3DDefaultShader *)PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v43, (PgWin *)&v6->vfptr, 0, 0);
              NiPointer<PopupMenuWin>::operator=(
                (NiPointer<NiD3DDefaultShader> *)&pkSprData[1].m_akHitTester.m_pBase,
                v44);
              ((void (__stdcall *)(_DWORD))pkSprData[1].m_akHitTester.m_pBase->m_pObject[3].m_uiHeight)(0);
              ((void (__stdcall *)(_DWORD))LODWORD(pkSprData[1].m_akHitTester.m_pBase->m_pObject[3].m_akUVs[0].y))(0);
              v45 = AbstateIcon::CreateWin(uiLeft + 2, uiTop + 2, uiWidth - 4, uiHeight - 4, (PgWin *)&v6->vfptr, 0);
              NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)pkSprData, (NiD3DDefaultShader *)v45);
              (*((void (__stdcall **)(_DWORD))pkSprData->vfptr->__vecDelDtor + 60))(0);
              (*((void (__stdcall **)(_DWORD))pkSprData->vfptr->__vecDelDtor + 64))(0);
              sprintf(acShapeName, "CharDBuffBox%02d", i);
              v46 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, pkTexture);
              v47 = (NiD3DDefaultShader *)PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v46, (PgWin *)&v6->vfptr, 0, 0);
              NiPointer<PopupMenuWin>::operator=(
                (NiPointer<NiD3DDefaultShader> *)&pkSprData[2].m_akGeomData.m_pBase,
                v47);
              ((void (__stdcall *)(_DWORD))LODWORD(pkSprData[2].m_akGeomData.m_pBase->m_pObject[2].m_kBound.m_kCenter.x))(0);
              ((void (__stdcall *)(_DWORD))pkSprData[2].m_akGeomData.m_pBase->m_pObject[2].m_pkVertex)(0);
              v48 = AbstateIcon::CreateWin(uiLeft + 2, uiTop + 2, uiWidth - 4, uiHeight - 4, (PgWin *)&v6->vfptr, 0);
              NiPointer<PopupMenuWin>::operator=(
                (NiPointer<NiD3DDefaultShader> *)&pkSprData->m_akAlphaPropertyData,
                (NiD3DDefaultShader *)v48);
              (*((void (__stdcall **)(_DWORD))pkSprData->m_akAlphaPropertyData.vfptr->__vecDelDtor + 60))(0);
              (*((void (__stdcall **)(_DWORD))pkSprData->m_akAlphaPropertyData.vfptr->__vecDelDtor + 64))(0);
              pkSprData = (PgSprData *)((char *)pkSprData + 4);
              if ( ++i >= 15 )
              {
                pkSprData = PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "BuffExtendNor",
                              &uiLeft,
                              &uiTop,
                              pkTexture);
                PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "BuffExtendClick");
                PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "BuffExtendOver");
                v49 = (NiD3DDefaultShader *)PgWinBut::CreateWin(uiLeft, uiTop, pkSprData, (PgWin *)&v6->vfptr, 0, 0, 0);
                NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v6->m_pkBufExtendBtn, v49);
                PgWin::SetToolTipWinText((PgWin *)&v6->m_pkBufExtendBtn.m_pObject->vfptr, "Open");
                v50 = pkTexture;
                v6->m_pkBufExtendBtn.m_pObject->m_pkToolTipWin = g_pkToolTipWin;
                pkSprData = PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "DeBuffExtendNor",
                              &uiLeft,
                              &uiTop,
                              v50);
                PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "DeBuffExtendClick");
                PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "DeBuffExtendOver");
                v51 = (NiD3DDefaultShader *)PgWinBut::CreateWin(uiLeft, uiTop, pkSprData, (PgWin *)&v6->vfptr, 1u, 0, 0);
                NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v6->m_pkDeBufExtendBtn, v51);
                PgWin::SetToolTipWinText((PgWin *)&v6->m_pkDeBufExtendBtn.m_pObject->vfptr, "Open");
                v6->m_pkDeBufExtendBtn.m_pObject->m_pkToolTipWin = g_pkToolTipWin;
                ((void (__stdcall *)(_DWORD))v6->m_pkBufExtendBtn.m_pObject->vfptr[60].__vecDelDtor)(0);
                ((void (__stdcall *)(_DWORD))v6->m_pkDeBufExtendBtn.m_pObject->vfptr[60].__vecDelDtor)(0);
                v6->m_pkBufExtendBtn.m_pObject->m_uFlags |= 1u;
                v6->m_pkDeBufExtendBtn.m_pObject->m_uFlags |= 1u;
                ((void (__stdcall *)(_DWORD))v6->m_pkBufExtendBtn.m_pObject->vfptr[64].__vecDelDtor)(0);
                ((void (__stdcall *)(_DWORD))v6->m_pkDeBufExtendBtn.m_pObject->vfptr[64].__vecDelDtor)(0);
                PgUtil::GetTriShapeRect(
                  (NiAVObject *)&spNode.m_pObject->vfptr,
                  "CharName",
                  &uiLeft,
                  &uiTop,
                  &uiWidth,
                  &uiHeight);
                v52 = g_pkToolTipWin;
                v53 = Font::Get(0);
                v54 = PgWinAbbreviateText::CreateWin(
                        uiLeft - v12,
                        uiTop - v13,
                        uiWidth,
                        uiHeight,
                        v53,
                        (PgWin *)&v6->vfptr,
                        "2",
                        0,
                        0,
                        1,
                        v52,
                        0x1Eu);
                v55 = pkTexture;
                v56 = spNode.m_pObject;
                v6->m_pkNameTextWin = v54;
                v57 = PgSprData::Create((NiAVObject *)&v56->vfptr, "Chief_Party", &uiLeft, &uiTop, v55);
                v58 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v57, (PgWin *)&v6->vfptr, 0, 0);
                v6->m_pkPtyChiefWin = v58;
                v58->vfptr[64].__vecDelDtor((NiRefObject *)v58, 1u);
                v59 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel_job", &uiLeft, &uiTop, pkTexture);
                PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v59, (PgWin *)&v6->vfptr, 0, 0);
                v60 = MenuTexMgr::GetTexture(0x12u);
                v61 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Char_Job", &uiLeft, &uiTop, v60);
                v62 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v61, (PgWin *)&v6->vfptr, 0, 0);
                v6->m_pkPtyCharJob = v62;
                v62->m_pkToolTipWin = g_pkToolTipWin;
                v63 = MenuTexMgr::GetTexture(1u);
                v64 = (NiD3DDefaultShader *)PopupMenuWin::CreateWin(v63, 4u, 4u, 0);
                NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v6->m_spPopupMenu, v64);
                v6->m_spPopupMenu.m_pObject->vfptr->SetMsgHooker(&v6->m_spPopupMenu.m_pObject->vfptr, &v6->vfptr);
                PopupMenuWin::Clear(v6->m_spPopupMenu.m_pObject);
                v65 = (char *)TextData2::Get(0x3569283Du);
                v66 = PopupMenuTextCheck::CreateWin(v65, 0, 0, 0, 0, 0);
                v66->m_ePopupMenuID = 1015;
                PopupMenuWin::AddMenu(v6->m_spPopupMenu.m_pObject, v12, (PopupMenu *)&v66->vfptr);
                v67 = (char *)TextData2::Get(0x356C3181u);
                v68 = PopupMenuTextCheck::CreateWin(v67, 0, 0, 0, 0, 0);
                v68->m_ePopupMenuID = 1016;
                PopupMenuWin::AddMenu(v6->m_spPopupMenu.m_pObject, v12, (PopupMenu *)&v68->vfptr);
                v69 = (char *)TextData2::Get(0x3566338Fu);
                v70 = PopupMenuTextCheck::CreateWin(v69, 0, 0, 0, 0, 0);
                v70->m_ePopupMenuID = 1017;
                PopupMenuWin::AddMenu(v6->m_spPopupMenu.m_pObject, v12, (PopupMenu *)&v70->vfptr);
                v71 = (char *)TextData2::Get(0xDB1D2246);
                v72 = PopupMenuTextCheck::CreateWin(v71, 0, 0, 0, 0, 0);
                v72->m_ePopupMenuID = 1018;
                PopupMenuWin::AddMenu(v6->m_spPopupMenu.m_pObject, v12, (PopupMenu *)&v72->vfptr);
                v73 = (char *)TextData2::Get(0xDE13DBE2);
                v74 = PopupMenuTextCheck::CreateWin(v73, 0, 0, 0, 0, 0);
                v74->m_ePopupMenuID = 1019;
                PopupMenuWin::AddMenu(v6->m_spPopupMenu.m_pObject, v12, (PopupMenu *)&v74->vfptr);
                PopupMenuWin::FinishMenu(v6->m_spPopupMenu.m_pObject, 0);
                ((void (__stdcall *)(_DWORD))v6->m_spPopupMenu.m_pObject->vfptr[64].__vecDelDtor)(0);
                MiniPartyWin::SetOption(v6, 0xFFFFFFFF);
                v6->vfptr[60].__vecDelDtor((NiRefObject *)v6, 1u);
                v6->vfptr[130].__vecDelDtor((NiRefObject *)v6, 0);
                LOBYTE(v86) = 1;
                UIUtil::~UIUtil(&ui);
                LOBYTE(v86) = 0;
                NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
                v86 = -1;
                NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
                return 1;
              }
            }
          }
        }
      }
      LOBYTE(v86) = 1;
      UIUtil::~UIUtil(&ui);
    }
  }
  LOBYTE(v86) = 0;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
  v86 = -1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
  return 0;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00556930) --------------------------------------------------------
void __thiscall MiniPartyWin::UpdateMeWin(MiniPartyWin *this, float fCurTime)
{
  MiniPartyWin *v2; // edi@1
  int v3; // esi@4
  signed int v4; // ebx@4
  PartyMemberInfo *v5; // eax@6
  _BYTE v6[20]; // ST00_20@7
  Char *v7; // eax@7
  Char *v8; // esi@7
  bool v9; // zf@8
  int DBufNum; // [sp+Ch] [bp-8h]@3
  int BufNum; // [sp+10h] [bp-4h]@3

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[65].__vecDelDtor)() )
  {
    if ( v2->m_bOpenPopUp )
    {
      ((void (__thiscall *)(MiniPartyWin *, int *, int *))v2->vfptr[45].__vecDelDtor)(v2, &DBufNum, &BufNum);
      ((void (__stdcall *)(int, int))v2->m_spPopupMenu.m_pObject->vfptr[77].__vecDelDtor)(DBufNum, BufNum);
      PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr, (PgWin *)&v2->m_spPopupMenu.m_pObject->vfptr);
      v2->m_bOpenPopUp = 0;
    }
    v3 = (int)v2->m_apkAbstateBufIconWin;
    v4 = 15;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 256))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 240))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 248))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v3 + 60) + 256))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v3 + 60) + 240))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v3 + 60) + 248))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v3 + 120) + 256))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v3 + 180) + 256))(0);
      AbstateIcon::ClearDuplicateText(*(AbstateIcon **)v3);
      AbstateIcon::ClearDuplicateText(*(AbstateIcon **)(v3 + 60));
      v3 += 4;
      --v4;
    }
    while ( v4 );
    v5 = v2->m_pkMemberInfo;
    if ( v5 )
    {
      *(_DWORD *)v6 = v5->m_kCharID.n5_code[0];
      *(_QWORD *)&v6[4] = *(_QWORD *)&v5->m_kCharID.n5_code[1];
      *(_QWORD *)&v6[12] = *(_QWORD *)&v5->m_kCharID.n5_code[3];
      v7 = CharMgr::GetUserChar(&g_kCharMgr, *(Name5 *)v6);
      v8 = v7;
      if ( v7 )
      {
        AbStateInfectee::GetAbStateList((AbStateInfectee *)&v7->vfptr);
        v9 = (v2->m_uiOption & 1) == 0;
        DBufNum = 0;
        BufNum = 0;
        if ( !v9 )
          MiniPartyWin::SetBuffUI(v2, v8, Skill, &BufNum);
        if ( v2->m_uiOption & 2 )
          MiniPartyWin::SetBuffUI(v2, v8, Scroll, &BufNum);
        if ( v2->m_uiOption & 4 )
          MiniPartyWin::SetBuffUI(v2, v8, Potion, &BufNum);
        if ( v2->m_uiOption & 8 )
          MiniPartyWin::SetBuffUI(v2, v8, 0, &BufNum);
        if ( v2->m_uiOption & 0x10 )
          MiniPartyWin::SetBuffUI(v2, v8, Debuff, &DBufNum);
      }
    }
  }
}

//----- (00556B00) --------------------------------------------------------
void __thiscall MiniPartyWin::MiniPartyWin(MiniPartyWin *this)
{
  MiniPartyWin *v1; // esi@1
  PopupMenuWin *v2; // edi@1
  int v3; // edi@6
  int v4; // ebx@7
  int v5; // ebx@12
  int v6; // ebx@17
  int v7; // ebx@22
  signed int v8; // [sp+14h] [bp-10h]@6

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&MiniPartyWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MiniPartyWin::`vftable'{for `IDirectMessenger'};
  v1->m_spPopupMenu.m_pObject = 0;
  `eh vector constructor iterator'(
    v1->m_apkAbstateBufIconWin,
    4u,
    15,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_apkAbstateDeBufIconWin,
    4u,
    15,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_apkAbstateBuffWin,
    4u,
    15,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_apkAbstateDBuffWin,
    4u,
    15,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_pkBufExtendBtn.m_pObject = 0;
  v1->m_pkDeBufExtendBtn.m_pObject = 0;
  v2 = v1->m_spPopupMenu.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spPopupMenu.m_pObject = 0;
  }
  v1->m_bOpenPopUp = 0;
  v3 = (int)v1->m_apkAbstateDeBufIconWin;
  v8 = 15;
  do
  {
    v4 = *(_DWORD *)(v3 - 60);
    if ( v4 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v4 + 4)) && v4 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v4)(v4, 1);
      *(_DWORD *)(v3 - 60) = 0;
    }
    v5 = *(_DWORD *)v3;
    if ( *(_DWORD *)v3 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v5 + 4)) && v5 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v5)(v5, 1);
      *(_DWORD *)v3 = 0;
    }
    v6 = *(_DWORD *)(v3 + 60);
    if ( v6 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v6 + 4)) && v6 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v6)(v6, 1);
      *(_DWORD *)(v3 + 60) = 0;
    }
    v7 = *(_DWORD *)(v3 + 120);
    if ( v7 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v7 + 4)) && v7 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v7)(v7, 1);
      *(_DWORD *)(v3 + 120) = 0;
    }
    v3 += 4;
    --v8;
  }
  while ( v8 );
  v1->m_pkMemberInfo = 0;
  v1->m_pkLPBarWin = 0;
  v1->m_pkLPBarStartWin = 0;
  v1->m_pkLPBarEndWin = 0;
  v1->m_pkLPGround = 0;
  v1->m_pkSPGround = 0;
}
// 99754C: using guessed type void (__thiscall *MiniPartyWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99756C: using guessed type int (__thiscall *MiniPartyWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00556D10) --------------------------------------------------------
void __thiscall MiniPartyWin::SetInfo(MiniPartyWin *this, PartyMemberInfo *pkInfo)
{
  MiniPartyWin *v2; // esi@1
  PgWinAbbreviateText *v3; // ecx@2
  unsigned int v4; // eax@3
  unsigned int v5; // edx@3
  unsigned int v6; // ecx@3
  unsigned int v7; // eax@3
  PgWinAbbreviateText *v8; // ecx@3
  void *(__thiscall *v9)(NiRefObject *, unsigned int); // edx@3
  PgWinBar *v10; // ecx@6
  PgWinBar *v11; // ecx@7
  double v12; // st7@7
  void *(__thiscall *v13)(NiRefObject *, unsigned int); // eax@9
  int v14; // eax@12
  void *(__thiscall *v15)(NiRefObject *, unsigned int); // eax@17
  int v16; // eax@20
  PgWinSpr *v17; // ecx@23
  void *(__thiscall *v18)(NiRefObject *, unsigned int); // eax@24
  int v19; // eax@27
  char v20; // al@44
  unsigned int v21; // ebx@51
  int v22; // eax@58
  int v23; // edi@58
  float v24; // eax@58
  double v25; // st7@58
  int (__thiscall *v26)(int); // eax@58
  float v27; // eax@58
  double v28; // st7@58
  PgSpr *v29; // eax@58
  PgSprData *v30; // eax@59
  NiScreenElementsData *v31; // edi@61
  char *v32; // eax@61
  char *v33; // eax@62
  float fy; // [sp+Ch] [bp-48h]@58
  NiPoint2 kValue; // [sp+10h] [bp-44h]@61
  const float cHeightInTex; // [sp+18h] [bp-3Ch]@58
  float fx; // [sp+1Ch] [bp-38h]@51
  const float cWidthInTex; // [sp+20h] [bp-34h]@6
  Name5 kMasterID; // [sp+24h] [bp-30h]@33
  char acName[21]; // [sp+38h] [bp-1Ch]@3

  v2 = this;
  if ( pkInfo )
  {
    this->m_pkMemberInfo = pkInfo;
    v4 = pkInfo->m_kCharID.n5_code[0];
    v5 = pkInfo->m_kCharID.n5_code[2];
    *(_DWORD *)&acName[4] = pkInfo->m_kCharID.n5_code[1];
    v6 = pkInfo->m_kCharID.n5_code[4];
    *(_DWORD *)acName = v4;
    v7 = pkInfo->m_kCharID.n5_code[3];
    *(_DWORD *)&acName[16] = v6;
    v8 = v2->m_pkNameTextWin;
    *(_DWORD *)&acName[8] = v5;
    *(_DWORD *)&acName[12] = v7;
    acName[20] = 0;
    ((void (__stdcall *)(char *))v8->vfptr[118].__vecDelDtor)(acName);
    v9 = v2->m_pkNameTextWin->vfptr[117].__vecDelDtor;
    if ( pkInfo->m_ucStatus )
      ((void (__stdcall *)(D3DXCOLOR *))v9)(&Color::m_kDxWhiteColor);
    else
      ((void (__stdcall *)(void *))v9)(&Color::m_kDxGrayColor);
    v10 = v2->m_pkHPBarWin;
    cWidthInTex = (double)pkInfo->m_iMaxHP;
    v10->m_fCurValue = (double)pkInfo->m_iHP;
    v10->m_fMaxValue = cWidthInTex;
    PgWinBar::OnChangeValue(v10);
    switch ( pkInfo->m_byChrClass )
    {
      case 0x1A:
      case 0x1B:
        v11 = v2->m_pkLPBarWin;
        cWidthInTex = (double)pkInfo->m_iMaxLP;
        v12 = (double)pkInfo->m_iLP;
        break;
      default:
        v11 = v2->m_pkSPBarWin;
        cWidthInTex = (double)pkInfo->m_iMaxSP;
        v12 = (double)pkInfo->m_iSP;
        break;
    }
    v11->m_fCurValue = v12;
    v11->m_fMaxValue = cWidthInTex;
    PgWinBar::OnChangeValue(v11);
    ((void (__stdcall *)(signed int))v2->m_pkHPBarWin->vfptr[64].__vecDelDtor)(1);
    v13 = v2->m_pkHPBarStartWin->vfptr[64].__vecDelDtor;
    if ( pkInfo->m_iHP <= 0 )
      ((void (__stdcall *)(_DWORD))v13)(0);
    else
      ((void (__stdcall *)(signed int))v13)(1);
    v14 = pkInfo->m_iMaxHP;
    if ( pkInfo->m_iHP == v14 && v14 )
      ((void (__stdcall *)(signed int))v2->m_pkHPBarEndWin->vfptr[64].__vecDelDtor)(1);
    else
      ((void (__stdcall *)(_DWORD))v2->m_pkHPBarEndWin->vfptr[64].__vecDelDtor)(0);
    switch ( pkInfo->m_byChrClass )
    {
      case 0x1A:
      case 0x1B:
        ((void (__stdcall *)(signed int))v2->m_pkLPGround->vfptr[64].__vecDelDtor)(1);
        ((void (__stdcall *)(_DWORD))v2->m_pkSPGround->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkSPBarWin->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkSPBarEndWin->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkSPBarStartWin->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(signed int))v2->m_pkLPBarWin->vfptr[64].__vecDelDtor)(1);
        v15 = v2->m_pkLPBarStartWin->vfptr[64].__vecDelDtor;
        if ( pkInfo->m_iLP <= 0 )
          ((void (__stdcall *)(_DWORD))v15)(0);
        else
          ((void (__stdcall *)(signed int))v15)(1);
        v16 = pkInfo->m_iMaxLP;
        if ( pkInfo->m_iLP != v16 || !v16 )
        {
          v17 = v2->m_pkLPBarEndWin;
          goto LABEL_31;
        }
        ((void (__stdcall *)(signed int))v2->m_pkLPBarEndWin->vfptr[64].__vecDelDtor)(1);
        break;
      default:
        ((void (__stdcall *)(_DWORD))v2->m_pkLPGround->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(signed int))v2->m_pkSPGround->vfptr[64].__vecDelDtor)(1);
        ((void (__stdcall *)(_DWORD))v2->m_pkLPBarWin->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkLPBarEndWin->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkLPBarStartWin->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(signed int))v2->m_pkSPBarWin->vfptr[64].__vecDelDtor)(1);
        v18 = v2->m_pkSPBarStartWin->vfptr[64].__vecDelDtor;
        if ( pkInfo->m_iSP <= 0 )
          ((void (__stdcall *)(_DWORD))v18)(0);
        else
          ((void (__stdcall *)(signed int))v18)(1);
        v19 = pkInfo->m_iMaxSP;
        if ( pkInfo->m_iSP == v19 && v19 )
        {
          ((void (__stdcall *)(signed int))v2->m_pkSPBarEndWin->vfptr[64].__vecDelDtor)(1);
        }
        else
        {
          v17 = v2->m_pkSPBarEndWin;
LABEL_31:
          ((void (__stdcall *)(_DWORD))v17->vfptr[64].__vecDelDtor)(0);
        }
        break;
    }
    if ( RaidInfo::IsMeRaidMember(&g_kRaidinfo) )
    {
      if ( *(_QWORD *)&g_kRaidinfo.m_kRaidLeaderID.n5_name[0] != *(_QWORD *)&pkInfo->m_kCharID.n5_name[0]
        || *(_QWORD *)&g_kRaidinfo.m_kRaidLeaderID.n5_code[2] != *(_QWORD *)&pkInfo->m_kCharID.n5_code[2]
        || g_kRaidinfo.m_kRaidLeaderID.n5_code[4] != pkInfo->m_kCharID.n5_code[4] )
      {
        ((void (__stdcall *)(_DWORD))v2->m_pkPtyChiefWin->vfptr[64].__vecDelDtor)(0);
      }
      else
      {
        ((void (__stdcall *)(signed int))v2->m_pkPtyChiefWin->vfptr[64].__vecDelDtor)(1);
      }
    }
    else
    {
      Party::GetPartyMasterID(&g_kParty, &kMasterID);
      if ( *(_QWORD *)&kMasterID.n5_name[0] != *(_QWORD *)&pkInfo->m_kCharID.n5_name[0]
        || *(_QWORD *)&kMasterID.n5_code[2] != *(_QWORD *)&pkInfo->m_kCharID.n5_code[2]
        || kMasterID.n5_code[4] != pkInfo->m_kCharID.n5_code[4] )
      {
        ((void (__stdcall *)(_DWORD))v2->m_pkPtyChiefWin->vfptr[64].__vecDelDtor)(0);
      }
      else
      {
        ((void (__stdcall *)(signed int))v2->m_pkPtyChiefWin->vfptr[64].__vecDelDtor)(1);
      }
    }
    switch ( pkInfo->m_byChrClass )
    {
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
        v20 = 1;
        break;
      case 6:
      case 7:
      case 8:
      case 9:
      case 0xA:
        v20 = 6;
        break;
      case 0xB:
      case 0xC:
      case 0xD:
      case 0xE:
      case 0xF:
        v20 = 11;
        break;
      case 0x10:
      case 0x11:
      case 0x12:
      case 0x13:
      case 0x14:
        v20 = 16;
        break;
      case 0x15:
      case 0x16:
      case 0x17:
      case 0x18:
      case 0x19:
        v20 = 21;
        break;
      case 0x1A:
      case 0x1B:
        v20 = 26;
        break;
      default:
        v20 = 0;
        break;
    }
    fx = 0.0;
    v21 = (unsigned __int8)v20;
    switch ( v20 )
    {
      case 1:
        fx = 0.0;
        break;
      case 6:
        LODWORD(fx) = 1;
        break;
      case 0x10:
        LODWORD(fx) = 2;
        break;
      case 0xB:
        LODWORD(fx) = 3;
        break;
      case 0x15:
        LODWORD(fx) = 4;
        break;
      case 0x1A:
        LODWORD(fx) = 5;
        break;
      default:
        break;
    }
    v22 = ((int (*)(void))v2->m_pkPtyCharJob->vfptr[114].__vecDelDtor)();
    v23 = v22;
    v24 = COERCE_FLOAT((*(int (__thiscall **)(int))(*(_DWORD *)v22 + 60))(v22));
    cWidthInTex = v24;
    v25 = 16.0 / (double)LODWORD(v24);
    v26 = *(int (__thiscall **)(int))(*(_DWORD *)v23 + 64);
    cWidthInTex = v25;
    v27 = COERCE_FLOAT(v26(v23));
    cHeightInTex = v27;
    v28 = (double)LODWORD(v27);
    v29 = v2->m_pkPtyCharJob->m_spSpr.m_pObject;
    cHeightInTex = 16.0 / v28;
    fx = (double)SLODWORD(fx) * cWidthInTex;
    fy = cHeightInTex + cHeightInTex;
    if ( v29 )
      v30 = v29->m_spSprData.m_pObject;
    else
      v30 = 0;
    v31 = v30->m_akGeomData.m_pBase->m_pObject;
    kValue.x = fx;
    kValue.y = cHeightInTex + cHeightInTex;
    NiScreenElementsData::SetTexture(v31, 0, 0, 0, &kValue);
    kValue.x = fx;
    cHeightInTex = fy + cHeightInTex;
    kValue.y = cHeightInTex;
    NiScreenElementsData::SetTexture(v31, 0, 1, 0, &kValue);
    cWidthInTex = fx + cWidthInTex;
    kValue.x = cWidthInTex;
    kValue.y = cHeightInTex;
    NiScreenElementsData::SetTexture(v31, 0, 2, 0, &kValue);
    kValue.x = cWidthInTex;
    kValue.y = fy;
    NiScreenElementsData::SetTexture(v31, 0, 3, 0, &kValue);
    v32 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), v21);
    if ( v32 )
      v33 = v32 + 21;
    else
      v33 = (char *)&unk_96F8EB;
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkPtyCharJob->vfptr, v33);
    v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 1u);
  }
  else
  {
    v3 = this->m_pkNameTextWin;
    v2->m_pkMemberInfo = 0;
    ((void (__stdcall *)(void *))v3->vfptr[118].__vecDelDtor)(&unk_9973A1);
    v2->m_pkMemberInfo = 0;
    v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 0);
  }
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (00557350) --------------------------------------------------------
MiniPartyWin *__cdecl MiniPartyWin::CreateWin(int iXPos, int iYPos, PgWin *pkParent, NiNode *pkNode, PgFrameWork *pkFrameWork)
{
  PgWin *v5; // eax@1
  PgWin *v6; // eax@2
  PgWin *v7; // esi@2
  PgWin *v8; // edi@8
  MiniPartyWin *v9; // eax@14
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v11; // [sp+20h] [bp-4h]@1

  v5 = (PgWin *)operator new(0x29Cu);
  result.m_pObject = v5;
  v11 = 0;
  if ( v5 )
  {
    MiniPartyWin::MiniPartyWin((MiniPartyWin *)v5);
    v7 = v6;
  }
  else
  {
    v7 = 0;
  }
  if ( v7 )
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  v11 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v7);
  if ( MiniPartyWin::Create((MiniPartyWin *)v7, iXPos, iYPos, pkParent, pkNode, pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v7->vfptr[89].__vecDelDtor)(v7);
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = (MiniPartyWin *)v7;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v7);
    if ( result.m_pObject )
    {
      v8 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v8 )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      }
    }
    v11 = -1;
    if ( v7 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    }
    v9 = 0;
  }
  return v9;
}

//----- (00557490) --------------------------------------------------------
MiniPartyWin *__thiscall MiniPartyWin::`vector deleting destructor'(MiniPartyWin *this, unsigned int a2)
{
  MiniPartyWin *v2; // esi@1

  v2 = this;
  MiniPartyWin::~MiniPartyWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005574C0) --------------------------------------------------------
void __thiscall MoneyWin::MoneyWin(MoneyWin *this)
{
  MoneyWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_uiCurFoscus = 0;
  v1->m_apkTitleText = 0;
  v1->m_pkTitleText2 = 0;
  v1->vfptr = (NiRefObjectVtbl *)&MoneyWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MoneyWin::`vftable'{for `IDirectMessenger'};
}
// 997B08: using guessed type void (__thiscall *MoneyWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 997B24: using guessed type int (__thiscall *MoneyWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005574F0) --------------------------------------------------------
void __thiscall MoneyWin::~MoneyWin(MoneyWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&MoneyWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MoneyWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 997B08: using guessed type void (__thiscall *MoneyWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 997B24: using guessed type int (__thiscall *MoneyWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00557510) --------------------------------------------------------
void __thiscall MoneyWin::OnCmdCancel(MoneyWin *this)
{
  MoneyWin *v1; // esi@1

  v1 = this;
  PgWin::PostMsg(this->m_pkRevWin, 5u, this->m_uiCancelMsg, 0);
  PgWin::PostMsg((PgWin *)&v1->vfptr, 1u, 0, 0);
}

//----- (00557540) --------------------------------------------------------
void __thiscall MoneyWin::Open(MoneyWin *this, PgWin *pkRevWin, unsigned int uiOkMsg, unsigned int uiCancelMsg, char *pcText)
{
  MoneyWin *v5; // esi@1
  EditWin *v6; // ecx@1

  v5 = this;
  ((void (__stdcall *)(_DWORD))this->m_apkTitleText->vfptr[118].__vecDelDtor)(pcText);
  v5->m_pkRevWin = pkRevWin;
  v6 = v5->m_pkCopperEdit;
  v5->m_uiCancelMsg = uiCancelMsg;
  v5->m_uiOkMsg = uiOkMsg;
  ((void (__stdcall *)(_DWORD))v6->vfptr[116].__vecDelDtor)(&unk_9977A9);
  ((void (__stdcall *)(_DWORD))v5->m_pkSilverEdit->vfptr[116].__vecDelDtor)(&unk_9977AA);
  ((void (__stdcall *)(_DWORD))v5->m_pkGoldEdit->vfptr[116].__vecDelDtor)(&unk_9977AB);
  ((void (__stdcall *)(_DWORD))v5->m_pkGemEdit->vfptr[116].__vecDelDtor)(&unk_9977B2);
  MoneyWin::i64Money = 0i64;
  PgWinMgr::DoModal(&Pgg_kWinMgr, (PgWin *)&v5->vfptr, 0, 0, 0);
}

//----- (005575F0) --------------------------------------------------------
void __thiscall MoneyWin::SetEditFocus(MoneyWin *this, unsigned int uiFocus)
{
  MoneyWin *v2; // esi@1
  EditWin *v3; // ecx@1

  v2 = this;
  v3 = this->m_pkCopperEdit;
  if ( v3 )
  {
    v2->m_uiCurFoscus = uiFocus;
    switch ( uiFocus )
    {
      case 0u:
        ((void (__stdcall *)(_DWORD))v3->vfptr[121].__vecDelDtor)(1);
        ((void (__stdcall *)(_DWORD))v2->m_pkSilverEdit->vfptr[121].__vecDelDtor)(1);
        ((void (__stdcall *)(_DWORD))v2->m_pkGoldEdit->vfptr[121].__vecDelDtor)(1);
        ((void (__stdcall *)(_DWORD))v2->m_pkGemEdit->vfptr[121].__vecDelDtor)(1);
        break;
      case 2u:
        ((void (*)(void))v2->m_pkSilverEdit->vfptr[120].__vecDelDtor)();
        break;
      case 3u:
        ((void (*)(void))v2->m_pkGoldEdit->vfptr[120].__vecDelDtor)();
        break;
      case 4u:
        v3 = v2->m_pkGemEdit;
        goto LABEL_7;
      case 1u:
LABEL_7:
        ((void (*)(void))v3->vfptr[120].__vecDelDtor)();
        break;
      default:
        return;
    }
  }
}

//----- (005576C0) --------------------------------------------------------
void __thiscall MoneyWin::OnEditEnd(MoneyWin *this, unsigned int wParam, int lParam)
{
  MoneyWin *v3; // eax@1
  EditWin *v4; // ecx@8

  v3 = this;
  switch ( this->m_uiCurFoscus )
  {
    case 1u:
      if ( this->m_pkCopperEdit )
      {
        this->m_uiCurFoscus = 4;
        ((void (__thiscall *)(_DWORD))this->m_pkGemEdit->vfptr[120].__vecDelDtor)(this->m_pkGemEdit);
      }
      break;
    case 4u:
      if ( this->m_pkCopperEdit )
      {
        this->m_uiCurFoscus = 3;
        ((void (__thiscall *)(_DWORD))this->m_pkGoldEdit->vfptr[120].__vecDelDtor)(this->m_pkGoldEdit);
      }
      break;
    case 3u:
      if ( this->m_pkCopperEdit )
      {
        this->m_uiCurFoscus = 2;
        ((void (__thiscall *)(_DWORD))this->m_pkSilverEdit->vfptr[120].__vecDelDtor)(this->m_pkSilverEdit);
      }
      break;
    case 2u:
      v4 = this->m_pkCopperEdit;
      if ( v4 )
      {
        v3->m_uiCurFoscus = 1;
        ((void (*)(void))v4->vfptr[120].__vecDelDtor)();
      }
      break;
    default:
      return;
  }
}

//----- (00557790) --------------------------------------------------------
void __thiscall MoneyWin::SetTitle1(MoneyWin *this, char *pcTitle)
{
  if ( this->m_apkTitleText )
    ((void (__stdcall *)(_DWORD))this->m_apkTitleText->vfptr[118].__vecDelDtor)(pcTitle);
}

//----- (005577C0) --------------------------------------------------------
void __thiscall MoneyWin::SetTitle2(MoneyWin *this, char *pcTitle)
{
  if ( this->m_pkTitleText2 )
    ((void (__stdcall *)(_DWORD))this->m_pkTitleText2->vfptr[118].__vecDelDtor)(pcTitle);
}

//----- (00557810) --------------------------------------------------------
void __thiscall HolyRewardMoneyWin::SetTitle1(HolyRewardMoneyWin *this, char *pcTitle)
{
  if ( this->m_pkTitleText1 )
    ((void (__stdcall *)(_DWORD))this->m_pkTitleText1->vfptr[118].__vecDelDtor)(pcTitle);
}

//----- (00557840) --------------------------------------------------------
void __thiscall HolyRewardMoneyWin::SetTitle2(HolyRewardMoneyWin *this, char *pcTitle)
{
  if ( this->m_pkTitleText2 )
    ((void (__stdcall *)(_DWORD))this->m_pkTitleText2->vfptr[118].__vecDelDtor)(pcTitle);
}

//----- (00557870) --------------------------------------------------------
void __thiscall MoneyWin::OnShowWin(MoneyWin *this)
{
  MoneyWin *v1; // esi@1
  EditWin *v2; // ecx@1

  v1 = this;
  PgWin::OnShowWin((PgWin *)&this->vfptr);
  v2 = v1->m_pkCopperEdit;
  if ( v2 )
  {
    v1->m_uiCurFoscus = 1;
    ((void (*)(void))v2->vfptr[120].__vecDelDtor)();
  }
}

//----- (005578A0) --------------------------------------------------------
void __thiscall MoneyWin::OnClose(MoneyWin *this)
{
  MoneyWin *v1; // esi@1
  EditWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_pkCopperEdit;
  if ( v2 )
  {
    v1->m_uiCurFoscus = 0;
    ((void (__stdcall *)(_DWORD))v2->vfptr[121].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v1->m_pkSilverEdit->vfptr[121].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v1->m_pkGoldEdit->vfptr[121].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v1->m_pkGemEdit->vfptr[121].__vecDelDtor)(1);
  }
}

//----- (00557900) --------------------------------------------------------
void __thiscall HolyRewardMoneyWin::OnCmdOk(HolyRewardMoneyWin *this)
{
  HolyRewardMoneyWin *v1; // esi@1

  v1 = this;
  GameFrameWork::NcHolyPromiseWithDrawCenRewardReq((GameFrameWork *)this->m_pkFrameWork);
  PgWin::PostMsg((PgWin *)&v1->vfptr, 1u, 0, 0);
}

//----- (00557920) --------------------------------------------------------
void __thiscall HolyRewardMoneyWin::Open(HolyRewardMoneyWin *this, unsigned int uiOkMsg, unsigned int uiCancelMsg, char *pcText1, char *pcText2)
{
  HolyRewardMoneyWin *v5; // esi@1
  PgWinText *v6; // ecx@2
  PgWinText *v7; // ecx@5

  v5 = this;
  if ( pcText1 )
  {
    v6 = this->m_pkTitleText1;
    if ( v6 )
      ((void (__stdcall *)(_DWORD))v6->vfptr[118].__vecDelDtor)(pcText1);
  }
  if ( pcText2 )
  {
    v7 = v5->m_pkTitleText2;
    if ( v7 )
      ((void (__stdcall *)(_DWORD))v7->vfptr[118].__vecDelDtor)(pcText2);
  }
  v5->m_uiOkMsg = uiOkMsg;
  v5->m_uiCancelMsg = uiCancelMsg;
  PgWinMgr::DoModal(&Pgg_kWinMgr, (PgWin *)&v5->vfptr, 0, 0, 0);
}

//----- (00557990) --------------------------------------------------------
char __thiscall MoneyWin::Create(MoneyWin *this, PgFrameWork *pkFrameWork)
{
  MoneyWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // ebx@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  NiSourceTexture *v10; // eax@15
  PgSprData *v11; // eax@16
  PgSprData *v12; // ebx@18
  PgWinBut *v13; // ST38_4@18
  PgFont *v14; // ST34_4@18
  unsigned int v15; // ST30_4@18
  unsigned int v16; // eax@18
  PgWinText *v17; // ebx@18
  NiUnsharedGeometryGroup *v18; // eax@18
  PgSprData *v19; // ebx@18
  PgWinBut *v20; // ST38_4@18
  PgFont *v21; // ST34_4@18
  unsigned int v22; // ST30_4@18
  unsigned int v23; // eax@18
  PgWinText *v24; // ebx@18
  NiUnsharedGeometryGroup *v25; // eax@18
  PgSprData *v26; // eax@18
  char v27; // bl@20
  PgSprData *v28; // eax@20
  char v29; // bl@22
  PgSprData *v30; // eax@22
  char v31; // bl@24
  PgSprData *v32; // eax@24
  PgSprData *v33; // eax@26
  PgWinSpr *v34; // ebx@26
  PgFont *v35; // ST34_4@26
  unsigned int v36; // ST30_4@26
  unsigned int v37; // eax@26
  PgWinText *v38; // eax@26
  PgSprData *v39; // eax@26
  PgWinSpr *v40; // ST38_4@26
  PgFont *v41; // ST34_4@26
  unsigned int v42; // ST30_4@26
  unsigned int v43; // eax@26
  PgWinText *v44; // edi@26
  NiRefObjectVtbl *v45; // ebx@26
  NiUnsharedGeometryGroup *v46; // eax@26
  void *(__thiscall *v47)(NiRefObject *, unsigned int); // edx@26
  NiNode *v48; // esi@27
  UIUtil ui; // [sp+4Ch] [bp-34h]@18
  unsigned int uiWidth; // [sp+60h] [bp-20h]@18
  unsigned int uiHeight; // [sp+64h] [bp-1Ch]@18
  NiPointer<NiNode> spNode; // [sp+68h] [bp-18h]@1
  int uiLeft; // [sp+6Ch] [bp-14h]@11
  int uiTop; // [sp+70h] [bp-10h]@11
  int v55; // [sp+7Ch] [bp-4h]@1
  PgFrameWork *pkFrameWorka; // [sp+88h] [bp+8h]@18
  PgFrameWork *pkFrameWorkb; // [sp+88h] [bp+8h]@18

  v2 = this;
  spNode.m_pObject = 0;
  v55 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v55 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "Game\\Money.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane01", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "MoneyWin", 0) )
  {
    v4 = spNode.m_pObject;
    v55 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
    goto LABEL_5;
  }
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft, uiTop, v11, (PgWin *)&v2->vfptr, 0, 0);
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "OKNor", &uiLeft, &uiTop, v3);
  PgSprData::Add(v12, (NiAVObject *)&spNode.m_pObject->vfptr, "OKClick");
  PgSprData::Add(v12, (NiAVObject *)&spNode.m_pObject->vfptr, "OKOver");
  v13 = PgWinBut::CreateWin(uiLeft, uiTop, v12, (PgWin *)&v2->vfptr, 0, 0, 0);
  v14 = Font::Get(0);
  v15 = ((int (__thiscall *)(PgWinBut *))v13->vfptr[37].__vecDelDtor)(v13);
  v16 = ((int (__thiscall *)(PgWinBut *))v13->vfptr[36].__vecDelDtor)(v13);
  v17 = PgWinText::CreateWin(0, 1, v16, v15, v14, (PgWin *)&v13->vfptr, 0, 0);
  v17->vfptr[122].__vecDelDtor((NiRefObject *)v17, 5u);
  pkFrameWorka = (PgFrameWork *)v17->vfptr;
  v18 = TextData::Get(0x4F5F499Fu);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkFrameWorka[13].m_pkMsgHooker)(v17, v18);
  v17->vfptr[60].__vecDelDtor((NiRefObject *)v17, 0);
  v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CancelNor", &uiLeft, &uiTop, v3);
  PgSprData::Add(v19, (NiAVObject *)&spNode.m_pObject->vfptr, "CancelClick");
  PgSprData::Add(v19, (NiAVObject *)&spNode.m_pObject->vfptr, "CancelOver");
  v20 = PgWinBut::CreateWin(uiLeft, uiTop, v19, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v21 = Font::Get(0);
  v22 = ((int (__thiscall *)(PgWinBut *))v20->vfptr[37].__vecDelDtor)(v20);
  v23 = ((int (__thiscall *)(PgWinBut *))v20->vfptr[36].__vecDelDtor)(v20);
  v24 = PgWinText::CreateWin(0, 1, v23, v22, v21, (PgWin *)&v20->vfptr, 0, 0);
  v24->vfptr[122].__vecDelDtor((NiRefObject *)v24, 5u);
  pkFrameWorkb = (PgFrameWork *)v24->vfptr;
  v25 = TextData::Get(0x88A297E1);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkFrameWorkb[13].m_pkMsgHooker)(v24, v25);
  v24->vfptr[60].__vecDelDtor((NiRefObject *)v24, 0);
  UIUtil::UIUtil(&ui);
  LOBYTE(v55) = 1;
  UIUtil::SetOffset(&ui, 0, 0);
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v2->m_pkCopperBtn = UIUtil::CreateBtn(&ui, 0, "MyCopperBtn", "MyCopperBtn", "MyCopperBtn", "MyCopperBtn", v3);
  v2->m_pkSilverBtn = UIUtil::CreateBtn(&ui, 0, "MySilverBtn", "MySilverBtn", "MySilverBtn", "MySilverBtn", v3);
  v2->m_pkGoldBtn = UIUtil::CreateBtn(&ui, 0, "MyGoldBtn", "MyGoldBtn", "MyGoldBtn", "MyGoldBtn", v3);
  v2->m_pkGemBtn = UIUtil::CreateBtn(&ui, 0, "MyGemBtn", "MyGemBtn", "MyGemBtn", "MyGemBtn", v3);
  LOBYTE(v24) = PgUtil::GetTriShapeRect(
                  (NiAVObject *)&spNode.m_pObject->vfptr,
                  "MyCopperInput",
                  &uiLeft,
                  &uiTop,
                  &uiWidth,
                  &uiHeight);
  v26 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MyCopperInput", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft, uiTop, v26, (PgWin *)&v2->vfptr, 0, 0);
  if ( (_BYTE)v24 )
    v2->m_pkCopperEdit = EditWin::CreateWin(
                           uiLeft + 2,
                           uiTop + 4,
                           uiWidth,
                           uiHeight,
                           (PgWin *)&v2->vfptr,
                           NUMBER,
                           3u,
                           3u,
                           0,
                           0,
                           1);
  v27 = PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "MySilverInput",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight);
  v28 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MySilverInput", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft, uiTop, v28, (PgWin *)&v2->vfptr, 0, 0);
  if ( v27 )
    v2->m_pkSilverEdit = EditWin::CreateWin(
                           uiLeft + 2,
                           uiTop + 4,
                           uiWidth,
                           uiHeight,
                           (PgWin *)&v2->vfptr,
                           NUMBER,
                           3u,
                           3u,
                           0,
                           0,
                           1);
  v29 = PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "MyGoldInput",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight);
  v30 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MyGoldInput", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft, uiTop, v30, (PgWin *)&v2->vfptr, 0, 0);
  if ( v29 )
    v2->m_pkGoldEdit = EditWin::CreateWin(
                         uiLeft + 2,
                         uiTop + 4,
                         uiWidth,
                         uiHeight,
                         (PgWin *)&v2->vfptr,
                         NUMBER,
                         2u,
                         3u,
                         0,
                         0,
                         1);
  v31 = PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "MyGemInput",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight);
  v32 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MyGemInput", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft, uiTop, v32, (PgWin *)&v2->vfptr, 0, 0);
  if ( v31 )
    v2->m_pkGemEdit = EditWin::CreateWin(
                        uiLeft + 2,
                        uiTop + 4,
                        uiWidth,
                        uiHeight,
                        (PgWin *)&v2->vfptr,
                        NUMBER,
                        3u,
                        3u,
                        0,
                        0,
                        1);
  v33 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextBox", &uiLeft, &uiTop, v3);
  v34 = PgWinSpr::CreateWin(uiLeft, uiTop, v33, (PgWin *)&v2->vfptr, 0, 0);
  v34->vfptr[60].__vecDelDtor((NiRefObject *)v34, 0);
  v35 = Font::Get(0);
  v36 = ((int (__thiscall *)(PgWinSpr *))v34->vfptr[37].__vecDelDtor)(v34);
  v37 = ((int (__thiscall *)(PgWinSpr *))v34->vfptr[36].__vecDelDtor)(v34);
  v38 = PgWinText::CreateWin(0, 1, v37, v36, v35, (PgWin *)&v34->vfptr, 0, 0);
  v2->m_apkTitleText = v38;
  v38->vfptr[122].__vecDelDtor((NiRefObject *)v38, 5u);
  ((void (__stdcall *)(void *))v2->m_apkTitleText->vfptr[118].__vecDelDtor)(&unk_997797);
  ((void (__stdcall *)(_DWORD))v2->m_apkTitleText->vfptr[60].__vecDelDtor)(0);
  v39 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextBox01", &uiLeft, &uiTop, v3);
  v40 = PgWinSpr::CreateWin(uiLeft, uiTop, v39, (PgWin *)&v2->vfptr, 0, 0);
  v41 = Font::Get(0);
  v42 = ((int (__thiscall *)(PgWinSpr *))v40->vfptr[37].__vecDelDtor)(v40);
  v43 = ((int (__thiscall *)(PgWinSpr *))v40->vfptr[36].__vecDelDtor)(v40);
  v44 = PgWinText::CreateWin(0, 1, v43, v42, v41, (PgWin *)&v40->vfptr, 0, 0);
  v44->vfptr[122].__vecDelDtor((NiRefObject *)v44, 5u);
  v45 = v44->vfptr;
  v46 = TextData::Get(0x3B609389u);
  v45[118].__vecDelDtor((NiRefObject *)v44, (unsigned int)v46);
  v44->vfptr[60].__vecDelDtor((NiRefObject *)v44, 0);
  v47 = v2->vfptr[59].__vecDelDtor;
  v2->m_pkTitleText2 = v44;
  ((void (__thiscall *)(MoneyWin *, unsigned int, unsigned int, _DWORD, _DWORD))v47)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  LOBYTE(v55) = 0;
  UIUtil::~UIUtil(&ui);
  v55 = -1;
  if ( spNode.m_pObject )
  {
    v48 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v48 )
        v48->vfptr->__vecDelDtor((NiRefObject *)v48, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00558130) --------------------------------------------------------
void __thiscall MoneyWin::OnCmdOk(MoneyWin *this)
{
  MoneyWin *v1; // esi@1
  const char *v2; // eax@2
  int v3; // edi@2
  const char *v4; // eax@2
  int v5; // ebx@2
  const char *v6; // eax@2
  int iGold; // ST30_4@2
  const char *v8; // eax@2
  int v9; // eax@2
  __int64 v10; // rax@2
  int v11; // ecx@5
  char *v12; // eax@7

  v1 = this;
  if ( !this->m_pkRevWin )
    goto LABEL_6;
  v2 = (const char *)((int (*)(void))this->m_pkCopperEdit->vfptr[113].__vecDelDtor)();
  v3 = atoi(v2);
  v4 = (const char *)((int (*)(void))v1->m_pkSilverEdit->vfptr[113].__vecDelDtor)();
  v5 = atoi(v4);
  v6 = (const char *)((int (*)(void))v1->m_pkGoldEdit->vfptr[113].__vecDelDtor)();
  iGold = atoi(v6);
  v8 = (const char *)((int (*)(void))v1->m_pkGemEdit->vfptr[113].__vecDelDtor)();
  v9 = atoi(v8);
  v10 = User::ConvertMoney(v3, v5, iGold, v9);
  MoneyWin::i64Money = v10;
  if ( SHIDWORD(v10) >= 0 && (SHIDWORD(v10) > 0 || (_DWORD)v10) )
  {
    HIDWORD(v10) = v1->m_pkRevWin;
    v11 = (int)&v1->m_i64InputMoney;
    *(_DWORD *)v11 = v10;
    *(_DWORD *)(v11 + 4) = HIDWORD(MoneyWin::i64Money);
    PgWin::PostMsg((PgWin *)HIDWORD(v10), 5u, v1->m_uiOkMsg, (int)&v1->m_i64InputMoney);
LABEL_6:
    PgWin::PostMsg((PgWin *)&v1->vfptr, 1u, 0, 0);
    return;
  }
  v12 = (char *)TextData::Get(0x3BAFA08Du);
  MsgBox::Modal(MSGBOX_OK, v12);
}

//----- (00558240) --------------------------------------------------------
void __thiscall HolyRewardMoneyWin::HolyRewardMoneyWin(HolyRewardMoneyWin *this)
{
  HolyRewardMoneyWin *v1; // esi@1
  PgWinBut *v2; // edi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&HolyRewardMoneyWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&HolyRewardMoneyWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkOkBut.m_pObject = 0;
  v1->m_pkTitleText1 = 0;
  v1->m_pkTitleText2 = 0;
  v2 = v1->m_pkOkBut.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
    v1->m_pkOkBut.m_pObject = 0;
  }
}
// 997D48: using guessed type void (__thiscall *HolyRewardMoneyWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 997D64: using guessed type int (__thiscall *HolyRewardMoneyWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005582E0) --------------------------------------------------------
void __thiscall HolyRewardMoneyWin::~HolyRewardMoneyWin(HolyRewardMoneyWin *this)
{
  HolyRewardMoneyWin *v1; // esi@1
  PgWinBut *v2; // edi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&HolyRewardMoneyWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&HolyRewardMoneyWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_pkOkBut.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 997D48: using guessed type void (__thiscall *HolyRewardMoneyWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 997D64: using guessed type int (__thiscall *HolyRewardMoneyWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00558370) --------------------------------------------------------
char __thiscall HolyRewardMoneyWin::Create(HolyRewardMoneyWin *this, PgFrameWork *pkFrameWork)
{
  HolyRewardMoneyWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // ebx@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  NiSourceTexture *v10; // eax@15
  PgSprData *v11; // eax@16
  PgSprData *v12; // ebx@18
  NiD3DDefaultShader *v13; // eax@18
  PgWinBut *v14; // ebx@18
  PgWin *v15; // ST70_4@18
  PgFont *v16; // ST6C_4@18
  unsigned int v17; // ST68_4@18
  unsigned int v18; // eax@18
  PgWinText *v19; // ebx@18
  NiUnsharedGeometryGroup *v20; // eax@18
  PgSprData *v21; // ebx@18
  PgWinBut *v22; // ST70_4@18
  PgFont *v23; // ST6C_4@18
  unsigned int v24; // ST68_4@18
  unsigned int v25; // eax@18
  PgWinText *v26; // ebx@18
  NiUnsharedGeometryGroup *v27; // eax@18
  PgWinBut *v28; // eax@18
  PgWinBut *v29; // eax@18
  PgWinBut *v30; // eax@18
  PgWinBut *v31; // eax@18
  PgSprData *v32; // eax@18
  PgFont *v33; // eax@19
  PgWinText *v34; // eax@19
  char v35; // bl@20
  PgSprData *v36; // eax@20
  PgFont *v37; // eax@21
  PgWinText *v38; // eax@21
  char v39; // bl@22
  PgSprData *v40; // eax@22
  PgFont *v41; // eax@23
  PgWinText *v42; // eax@23
  char v43; // bl@24
  PgSprData *v44; // eax@24
  PgFont *v45; // eax@25
  PgWinText *v46; // eax@25
  PgSprData *v47; // eax@26
  PgWinSpr *v48; // ebx@26
  PgFont *v49; // ST6C_4@26
  unsigned int v50; // ST68_4@26
  unsigned int v51; // eax@26
  PgWinText *v52; // eax@26
  PgSprData *v53; // eax@26
  PgWinSpr *v54; // ST70_4@26
  PgFont *v55; // ST6C_4@26
  unsigned int v56; // ST68_4@26
  unsigned int v57; // eax@26
  PgWinText *v58; // eax@26
  NiRefObjectVtbl *v59; // edi@26
  NiUnsharedGeometryGroup *v60; // eax@26
  NiNode *v61; // esi@27
  UIUtil ui; // [sp+8Ch] [bp-34h]@18
  unsigned int uiWidth; // [sp+A0h] [bp-20h]@18
  unsigned int uiHeight; // [sp+A4h] [bp-1Ch]@18
  NiPointer<NiNode> spNode; // [sp+A8h] [bp-18h]@1
  int uiLeft; // [sp+ACh] [bp-14h]@11
  int uiTop; // [sp+B0h] [bp-10h]@11
  int v68; // [sp+BCh] [bp-4h]@1
  PgFrameWork *pkFrameWorka; // [sp+C8h] [bp+8h]@18
  PgFrameWork *pkFrameWorkb; // [sp+C8h] [bp+8h]@18

  v2 = this;
  spNode.m_pObject = 0;
  v68 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v68 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "Game\\HolyPReward.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane01", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "HolyRewardMoneyWin", 0) )
  {
    v4 = spNode.m_pObject;
    v68 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
    goto LABEL_5;
  }
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft, uiTop, v11, (PgWin *)&v2->vfptr, 0, 0);
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "OKNor", &uiLeft, &uiTop, v3);
  PgSprData::Add(v12, (NiAVObject *)&spNode.m_pObject->vfptr, "OKClick");
  PgSprData::Add(v12, (NiAVObject *)&spNode.m_pObject->vfptr, "OKOver");
  v13 = (NiD3DDefaultShader *)PgWinBut::CreateWin(uiLeft, uiTop, v12, (PgWin *)&v2->vfptr, 0, 0, 0);
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_pkOkBut, v13);
  v14 = v2->m_pkOkBut.m_pObject;
  v15 = (PgWin *)&v2->m_pkOkBut.m_pObject->vfptr;
  v16 = Font::Get(0);
  v17 = ((int (__thiscall *)(PgWinBut *))v14->vfptr[37].__vecDelDtor)(v14);
  v18 = ((int (__thiscall *)(PgWinBut *))v14->vfptr[36].__vecDelDtor)(v14);
  v19 = PgWinText::CreateWin(0, 1, v18, v17, v16, v15, 0, 0);
  v19->vfptr[122].__vecDelDtor((NiRefObject *)v19, 5u);
  pkFrameWorka = (PgFrameWork *)v19->vfptr;
  v20 = TextData2::Get(0x9BA4D1EF);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkFrameWorka[13].m_pkMsgHooker)(v19, v20);
  v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
  v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CancelNor", &uiLeft, &uiTop, v3);
  PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "CancelClick");
  PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "CancelOver");
  v22 = PgWinBut::CreateWin(uiLeft, uiTop, v21, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v23 = Font::Get(0);
  v24 = ((int (__thiscall *)(PgWinBut *))v22->vfptr[37].__vecDelDtor)(v22);
  v25 = ((int (__thiscall *)(PgWinBut *))v22->vfptr[36].__vecDelDtor)(v22);
  v26 = PgWinText::CreateWin(0, 1, v25, v24, v23, (PgWin *)&v22->vfptr, 0, 0);
  v26->vfptr[122].__vecDelDtor((NiRefObject *)v26, 5u);
  pkFrameWorkb = (PgFrameWork *)v26->vfptr;
  v27 = TextData2::Get(0xF23B3C34);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkFrameWorkb[13].m_pkMsgHooker)(v26, v27);
  v26->vfptr[60].__vecDelDtor((NiRefObject *)v26, 0);
  UIUtil::UIUtil(&ui);
  LOBYTE(v68) = 1;
  UIUtil::SetOffset(&ui, 0, 0);
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v28 = UIUtil::CreateBtn(&ui, 0, "MyCopperBtn", "MyCopperBtn", "MyCopperBtn", "MyCopperBtn", v3);
  v28->vfptr[60].__vecDelDtor((NiRefObject *)v28, 0);
  v29 = UIUtil::CreateBtn(&ui, 0, "MySilverBtn", "MySilverBtn", "MySilverBtn", "MySilverBtn", v3);
  v29->vfptr[60].__vecDelDtor((NiRefObject *)v29, 0);
  v30 = UIUtil::CreateBtn(&ui, 0, "MyGoldBtn", "MyGoldBtn", "MyGoldBtn", "MyGoldBtn", v3);
  v30->vfptr[60].__vecDelDtor((NiRefObject *)v30, 0);
  v31 = UIUtil::CreateBtn(&ui, 0, "MyGemBtn", "MyGemBtn", "MyGemBtn", "MyGemBtn", v3);
  v31->vfptr[60].__vecDelDtor((NiRefObject *)v31, 0);
  LOBYTE(v26) = PgUtil::GetTriShapeRect(
                  (NiAVObject *)&spNode.m_pObject->vfptr,
                  "MyCopperInput",
                  &uiLeft,
                  &uiTop,
                  &uiWidth,
                  &uiHeight);
  v32 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MyCopperInput", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft, uiTop, v32, (PgWin *)&v2->vfptr, 0, 0);
  if ( (_BYTE)v26 )
  {
    v33 = Font::Get(0);
    v34 = PgWinText::CreateWin(uiLeft + 2, uiTop + 4, uiWidth, uiHeight, v33, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkCopperText = v34;
    v34->vfptr[122].__vecDelDtor((NiRefObject *)v34, 5u);
    ((void (__stdcall *)(void *))v2->m_pkCopperText->vfptr[118].__vecDelDtor)(&unk_9977B3);
    ((void (__stdcall *)(_DWORD))v2->m_pkCopperText->vfptr[60].__vecDelDtor)(0);
  }
  v35 = PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "MySilverInput",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight);
  v36 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MySilverInput", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft, uiTop, v36, (PgWin *)&v2->vfptr, 0, 0);
  if ( v35 )
  {
    v37 = Font::Get(0);
    v38 = PgWinText::CreateWin(uiLeft + 2, uiTop + 4, uiWidth, uiHeight, v37, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkSilverText = v38;
    v38->vfptr[122].__vecDelDtor((NiRefObject *)v38, 5u);
    ((void (__stdcall *)(void *))v2->m_pkSilverText->vfptr[118].__vecDelDtor)(&unk_9977BA);
    ((void (__stdcall *)(_DWORD))v2->m_pkSilverText->vfptr[60].__vecDelDtor)(0);
  }
  v39 = PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "MyGoldInput",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight);
  v40 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MyGoldInput", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft, uiTop, v40, (PgWin *)&v2->vfptr, 0, 0);
  if ( v39 )
  {
    v41 = Font::Get(0);
    v42 = PgWinText::CreateWin(uiLeft + 2, uiTop + 4, uiWidth, uiHeight, v41, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkGoldText = v42;
    v42->vfptr[122].__vecDelDtor((NiRefObject *)v42, 5u);
    ((void (__stdcall *)(void *))v2->m_pkGoldText->vfptr[118].__vecDelDtor)(&unk_9977BB);
    ((void (__stdcall *)(_DWORD))v2->m_pkGoldText->vfptr[60].__vecDelDtor)(0);
  }
  v43 = PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "MyGemInput",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight);
  v44 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MyGemInput", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft, uiTop, v44, (PgWin *)&v2->vfptr, 0, 0);
  if ( v43 )
  {
    v45 = Font::Get(0);
    v46 = PgWinText::CreateWin(uiLeft + 2, uiTop + 4, uiWidth, uiHeight, v45, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkGemText = v46;
    v46->vfptr[122].__vecDelDtor((NiRefObject *)v46, 5u);
    ((void (__stdcall *)(void *))v2->m_pkGemText->vfptr[118].__vecDelDtor)(&unk_9977C2);
    ((void (__stdcall *)(_DWORD))v2->m_pkGemText->vfptr[60].__vecDelDtor)(0);
  }
  v47 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextBox01", &uiLeft, &uiTop, v3);
  v48 = PgWinSpr::CreateWin(uiLeft, uiTop, v47, (PgWin *)&v2->vfptr, 0, 0);
  v48->vfptr[60].__vecDelDtor((NiRefObject *)v48, 0);
  v49 = Font::Get(0);
  v50 = ((int (__thiscall *)(PgWinSpr *))v48->vfptr[37].__vecDelDtor)(v48);
  v51 = ((int (__thiscall *)(PgWinSpr *))v48->vfptr[36].__vecDelDtor)(v48);
  v52 = PgWinText::CreateWin(0, 1, v51, v50, v49, (PgWin *)&v48->vfptr, 0, 0);
  v2->m_pkTitleText1 = v52;
  v52->vfptr[122].__vecDelDtor((NiRefObject *)v52, 4u);
  ((void (__stdcall *)(void *))v2->m_pkTitleText1->vfptr[118].__vecDelDtor)(&unk_9977C3);
  ((void (__stdcall *)(_DWORD))v2->m_pkTitleText1->vfptr[60].__vecDelDtor)(0);
  v53 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextBox02", &uiLeft, &uiTop, v3);
  v54 = PgWinSpr::CreateWin(uiLeft, uiTop, v53, (PgWin *)&v2->vfptr, 0, 0);
  v55 = Font::Get(0);
  v56 = ((int (__thiscall *)(PgWinSpr *))v54->vfptr[37].__vecDelDtor)(v54);
  v57 = ((int (__thiscall *)(PgWinSpr *))v54->vfptr[36].__vecDelDtor)(v54);
  v58 = PgWinText::CreateWin(0, 1, v57, v56, v55, (PgWin *)&v54->vfptr, 0, 0);
  v2->m_pkTitleText2 = v58;
  v58->vfptr[122].__vecDelDtor((NiRefObject *)v58, 4u);
  v59 = v2->m_pkTitleText2->vfptr;
  v60 = TextData::Get(0x3B609389u);
  v59[118].__vecDelDtor((NiRefObject *)v2->m_pkTitleText2, (unsigned int)v60);
  ((void (__stdcall *)(_DWORD))v2->m_pkTitleText2->vfptr[60].__vecDelDtor)(0);
  ((void (__thiscall *)(HolyRewardMoneyWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  LOBYTE(v68) = 0;
  UIUtil::~UIUtil(&ui);
  v68 = -1;
  if ( spNode.m_pObject )
  {
    v61 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v61 )
        v61->vfptr->__vecDelDtor((NiRefObject *)v61, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00558C20) --------------------------------------------------------
void __thiscall HolyRewardMoneyWin::OnCmdCancel(HolyRewardMoneyWin *this)
{
  HolyRewardMoneyWin *v1; // esi@1
  GameFrameWork *v2; // edi@1
  NiUnsharedGeometryGroup *v3; // eax@1

  v1 = this;
  v2 = (GameFrameWork *)this->m_pkFrameWork;
  v3 = TextData2::Get(0x40A8555Au);
  GameFrameWork::AddSysMsg(v2, (const char *)v3);
  PgWin::PostMsg((PgWin *)&v1->vfptr, 1u, 0, 0);
}

//----- (00558C50) --------------------------------------------------------
void __thiscall MoneyWin::OnCommand(MoneyWin *this, unsigned int wParam, int lParam)
{
  MoneyWin *v3; // esi@1

  v3 = this;
  if ( wParam )
  {
    if ( wParam == 1 )
    {
      PgWin::PostMsg(this->m_pkRevWin, 5u, this->m_uiCancelMsg, 0);
      PgWin::PostMsg((PgWin *)&v3->vfptr, 1u, 0, 0);
    }
  }
  else
  {
    MoneyWin::OnCmdOk(this);
  }
}

//----- (00558CA0) --------------------------------------------------------
void __thiscall MoneyWin::UpdateMeWin(MoneyWin *this, float fCurTime)
{
  MoneyWin *v2; // edi@1

  v2 = this;
  if ( g_pkKeyboard->m_aucKeystate[0] & 2 )
  {
    BYTE3(PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID)[73].m_kMsgQ.m_uiAlloced) = 0;
    if ( PgWinMgr::IsIn(&Pgg_kWinMgr, (PgWin *)&this->vfptr) )
      PgTQueue<PgWinMgr::PgWinMsg>::Add(&stru_B6483C, (PgWinMgr::PgWinMsg)__PAIR__(1, (unsigned int)v2));
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (00558D00) --------------------------------------------------------
void __thiscall HolyRewardMoneyWin::OnCommand(HolyRewardMoneyWin *this, unsigned int wParam, int lParam)
{
  HolyRewardMoneyWin *v3; // esi@1
  GameFrameWork *v4; // edi@3
  NiUnsharedGeometryGroup *v5; // eax@3

  v3 = this;
  if ( wParam )
  {
    if ( wParam == 1 )
    {
      v4 = (GameFrameWork *)this->m_pkFrameWork;
      v5 = TextData2::Get(0x40A8555Au);
      GameFrameWork::AddSysMsg(v4, (const char *)v5);
      PgWin::PostMsg((PgWin *)&v3->vfptr, 1u, 0, 0);
    }
  }
  else
  {
    GameFrameWork::NcHolyPromiseWithDrawCenRewardReq((GameFrameWork *)this->m_pkFrameWork);
    PgWin::PostMsg((PgWin *)&v3->vfptr, 1u, 0, 0);
  }
}

//----- (00558D60) --------------------------------------------------------
void __thiscall HolyRewardMoneyWin::UpdateMeWin(HolyRewardMoneyWin *this, float fCurTime)
{
  HolyRewardMoneyWin *v2; // edi@1

  v2 = this;
  if ( g_pkKeyboard->m_aucKeystate[0] & 2 )
  {
    BYTE3(PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID)[73].m_kMsgQ.m_uiAlloced) = 0;
    if ( PgWinMgr::IsIn(&Pgg_kWinMgr, (PgWin *)&this->vfptr) )
      PgTQueue<PgWinMgr::PgWinMsg>::Add(&stru_B6483C, (PgWinMgr::PgWinMsg)__PAIR__(1, (unsigned int)v2));
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (00558DC0) --------------------------------------------------------
MoneyWin *__cdecl MoneyWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  MoneyWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1A0u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&MoneyWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&MoneyWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kWorld.m_Rotate.m_pEntry[1][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_fScale) = 0;
    LODWORD(v2[1].m_kWorld.m_Rotate.m_pEntry[0][0]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (MoneyWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 997B08: using guessed type void (__thiscall *MoneyWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 997B24: using guessed type int (__thiscall *MoneyWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00558F10) --------------------------------------------------------
HolyRewardMoneyWin *__cdecl HolyRewardMoneyWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  HolyRewardMoneyWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x188u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    HolyRewardMoneyWin::HolyRewardMoneyWin((HolyRewardMoneyWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (HolyRewardMoneyWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00559040) --------------------------------------------------------
MoneyWin *__thiscall MoneyWin::`vector deleting destructor'(MoneyWin *this, unsigned int a2)
{
  MoneyWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&MoneyWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MoneyWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 997B08: using guessed type void (__thiscall *MoneyWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 997B24: using guessed type int (__thiscall *MoneyWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00559080) --------------------------------------------------------
HolyRewardMoneyWin *__thiscall HolyRewardMoneyWin::`scalar deleting destructor'(HolyRewardMoneyWin *this, unsigned int a2)
{
  HolyRewardMoneyWin *v2; // esi@1
  PgWinBut *v3; // edi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&HolyRewardMoneyWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&HolyRewardMoneyWin::`vftable'{for `IDirectMessenger'};
  v3 = this->m_pkOkBut.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 997D48: using guessed type void (__thiscall *HolyRewardMoneyWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 997D64: using guessed type int (__thiscall *HolyRewardMoneyWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00559120) --------------------------------------------------------
void __thiscall MoveModeWin::MoveModeWin(MoveModeWin *this)
{
  MoveModeWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&MoveModeWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MoveModeWin::`vftable'{for `IDirectMessenger'};
}
// 997FFC: using guessed type void (__thiscall *MoveModeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99801C: using guessed type int (__thiscall *MoveModeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00559140) --------------------------------------------------------
void __thiscall MoveModeWin::~MoveModeWin(MoveModeWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&MoveModeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MoveModeWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 997FFC: using guessed type void (__thiscall *MoveModeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99801C: using guessed type int (__thiscall *MoveModeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00559160) --------------------------------------------------------
void __stdcall MoveModeWin::OnCommand(unsigned int wParam, int lParam)
{
  PgFrameWork *v3; // eax@2

  if ( !wParam )
  {
    v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v3 )
      ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD))v3->vfptr[2].SetMessageNum)(v3, 103, 0, 0);
  }
}

//----- (00559190) --------------------------------------------------------
char __thiscall MoveModeWin::Create(MoveModeWin *this, PgFrameWork *pkFrameWork)
{
  MoveModeWin *v2; // esi@1
  NiTexturePalette *v3; // ebx@1
  const char *v4; // eax@3
  NiNode *v5; // eax@3
  NiNode *v6; // esi@7
  volatile LONG *v7; // eax@7
  NiNode *v9; // ST08_4@12
  PgSprData *v10; // eax@12
  int v11; // ebx@15
  PgSprData *v12; // edi@15
  NiNode *v13; // esi@16
  int uiLeft; // [sp+18h] [bp-18h]@12
  int uiTop; // [sp+1Ch] [bp-14h]@12
  NiPointer<NiNode> spNode; // [sp+20h] [bp-10h]@1
  int v17; // [sp+2Ch] [bp-4h]@1
  int iOffY; // [sp+38h] [bp+8h]@15

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v17 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\RunButton.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = spNode.m_pObject;
  if ( !spNode.m_pObject )
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("Game\\RunButton.nif load fail", "LoadFail", 0);
      v5 = spNode.m_pObject;
    }
    v17 = -1;
    if ( !v5 )
      return 0;
    v6 = v5;
    v7 = (volatile LONG *)&v5->m_uiRefCount;
    goto LABEL_8;
  }
  v9 = spNode.m_pObject;
  v2->m_pkFrameWork = pkFrameWork;
  v10 = PgSprData::Create((NiAVObject *)&v9->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v10, 0, pkFrameWork, "MoveModeWin", 0) )
  {
    v6 = spNode.m_pObject;
    v17 = -1;
    if ( !spNode.m_pObject )
      return 0;
    v7 = (volatile LONG *)&spNode.m_pObject->m_uiRefCount;
LABEL_8:
    if ( !InterlockedDecrement(v7) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v11 = uiLeft;
  iOffY = uiTop;
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNormal", &uiLeft, &uiTop, 0);
  PgSprData::Add(v12, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick");
  PgSprData::Add(v12, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver");
  PgWinBut::CreateWin(uiLeft - v11, uiTop - iOffY, v12, (PgWin *)&v2->vfptr, 0, 0, 0);
  ((void (__thiscall *)(MoveModeWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.63999999,
    0.5);
  v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
  v17 = -1;
  if ( spNode.m_pObject )
  {
    v13 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v13 )
        v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
    }
  }
  return 1;
}
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00559390) --------------------------------------------------------
MoveModeWin *__cdecl MoveModeWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  MoveModeWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x158u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&MoveModeWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&MoveModeWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (MoveModeWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 997FFC: using guessed type void (__thiscall *MoveModeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99801C: using guessed type int (__thiscall *MoveModeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005594D0) --------------------------------------------------------
MoveModeWin *__thiscall MoveModeWin::`vector deleting destructor'(MoveModeWin *this, unsigned int a2)
{
  MoveModeWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&MoveModeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MoveModeWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 997FFC: using guessed type void (__thiscall *MoveModeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99801C: using guessed type int (__thiscall *MoveModeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00559510) --------------------------------------------------------
void __thiscall MysteryVaultWin::MysteryVaultWin(MysteryVaultWin *this)
{
  MysteryVaultWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_pkBut = 0;
  v1->m_apkEffect = 0;
  v1->m_pkHINumSpr = 0;
  v1->m_pkLowNumSpr = 0;
  v1->m_pkLevelSpr = 0;
  v1->m_bEffectStart = 0;
  v1->vfptr = (NiRefObjectVtbl *)&MysteryVaultWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MysteryVaultWin::`vftable'{for `IDirectMessenger'};
}
// 998350: using guessed type void (__thiscall *MysteryVaultWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99836C: using guessed type int (__thiscall *MysteryVaultWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00559560) --------------------------------------------------------
void __thiscall MysteryVaultWin::OnMysteryVaultBtnClick(MysteryVaultWin *this)
{
  MysteryVaultWin *v1; // edi@1
  GameFrameWork *v2; // esi@1

  v1 = this;
  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( User::Lv(&g_kUser) >= v1->m_ItemLV )
  {
    if ( !v2 )
      return;
    GameFrameWork::OpenInventoryWin(v2);
  }
  if ( v2 )
  {
    GameFrameWork::CloseMysteryVaultWin(v2);
    GameFrameWork::NcCharSaveUIStateSaveReq(v2, 0);
  }
}

//----- (005595B0) --------------------------------------------------------
void __thiscall MysteryVaultWin::OnCommand(MysteryVaultWin *this, unsigned int wParam, int lParam)
{
  MysteryVaultWin *v3; // edi@1
  GameFrameWork *v4; // esi@2

  v3 = this;
  if ( wParam == 1 )
  {
    v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( User::Lv(&g_kUser) >= v3->m_ItemLV )
    {
      if ( !v4 )
        return;
      GameFrameWork::OpenInventoryWin(v4);
    }
    if ( v4 )
    {
      GameFrameWork::CloseMysteryVaultWin(v4);
      GameFrameWork::NcCharSaveUIStateSaveReq(v4, 0);
    }
  }
}

//----- (00559610) --------------------------------------------------------
void __thiscall MysteryVaultWin::UpdateMeWin(MysteryVaultWin *this, float fCurTime)
{
  MysteryVaultWin *v2; // esi@1
  SpEffect *v3; // ecx@4

  v2 = this;
  if ( this->m_bEffectStart && this->m_ItemLV == User::Lv(&g_kUser) )
  {
    SoundMgr::PlayInterfaceSound(&g_kSoundMgr, MysteryVaultAlarm);
    SpEffect::Start(v2->m_apkEffect, (NiNode *)&v2->vfptr);
    v2->m_bEffectStart = 0;
  }
  v3 = v2->m_apkEffect;
  if ( v3->m_bLive )
    SpEffect::Update(v3, fCurTime);
}

//----- (00559670) --------------------------------------------------------
char __thiscall MysteryVaultWin::Create(MysteryVaultWin *this, PgFrameWork *pkFrameWork)
{
  MysteryVaultWin *v2; // edi@1
  NiSourceTexture *v3; // esi@1
  char result; // al@6
  const char *v5; // eax@9
  PgSprData *v6; // eax@10
  NiNode *v7; // esi@11
  PgSprData *v8; // esi@16
  PgSprData *v9; // esi@16
  PgWinSpr *v10; // eax@16
  PgSprData *v11; // esi@16
  PgWinSpr *v12; // eax@16
  PgSprData *v13; // eax@16
  PgWinSpr *v14; // eax@16
  NiTexturePalette *v15; // esi@16
  const char *v16; // eax@18
  SpEffect *v17; // esi@20
  NiNode *v18; // eax@21
  SpEffect *v19; // eax@21
  void *(__thiscall *v20)(NiRefObject *, unsigned int); // edx@23
  NiTexturePalette *pTexturePalette; // [sp+24h] [bp-20h]@7
  NiPointer<NiNode> pkNiNodePtr; // [sp+28h] [bp-1Ch]@16
  int uiLeft; // [sp+2Ch] [bp-18h]@10
  int uiTop; // [sp+30h] [bp-14h]@10
  NiPointer<NiNode> spNode; // [sp+34h] [bp-10h]@1
  int v26; // [sp+40h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v26 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  if ( !v3 )
  {
    v26 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( spNode.m_pObject )
        spNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spNode.m_pObject, 1u);
    }
    return 0;
  }
  pTexturePalette = ::pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "Game\\MysteryVault.nif");
  PgUtil::LoadNodeNifFile(v5, &spNode, pTexturePalette);
  if ( !spNode.m_pObject )
    return 0;
  v6 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane01", &uiLeft, &uiTop, v3);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v6, 0, pkFrameWork, "MysteryVaultWin", 0) )
  {
    v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn01_Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v8, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01_Click");
    PgSprData::Add(v8, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01_Over");
    v2->m_pkBut = PgWinBut::CreateWin(uiLeft, uiTop, v8, (PgWin *)&v2->vfptr, 1u, 0, 0);
    v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Num00", &uiLeft, &uiTop, 0);
    PgSprData::Add(v9, (NiAVObject *)&spNode.m_pObject->vfptr, "Num01");
    PgSprData::Add(v9, (NiAVObject *)&spNode.m_pObject->vfptr, "Num02");
    PgSprData::Add(v9, (NiAVObject *)&spNode.m_pObject->vfptr, "Num03");
    PgSprData::Add(v9, (NiAVObject *)&spNode.m_pObject->vfptr, "Num04");
    PgSprData::Add(v9, (NiAVObject *)&spNode.m_pObject->vfptr, "Num05");
    PgSprData::Add(v9, (NiAVObject *)&spNode.m_pObject->vfptr, "Num06");
    PgSprData::Add(v9, (NiAVObject *)&spNode.m_pObject->vfptr, "Num07");
    PgSprData::Add(v9, (NiAVObject *)&spNode.m_pObject->vfptr, "Num08");
    PgSprData::Add(v9, (NiAVObject *)&spNode.m_pObject->vfptr, "Num09");
    v10 = PgWinSpr::CreateWin(uiLeft, uiTop, v9, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkLowNumSpr = v10;
    v10->vfptr[60].__vecDelDtor((NiRefObject *)v10, 0);
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Num10", &uiLeft, &uiTop, 0);
    PgSprData::Add(v11, (NiAVObject *)&spNode.m_pObject->vfptr, "Num20");
    PgSprData::Add(v11, (NiAVObject *)&spNode.m_pObject->vfptr, "Num30");
    PgSprData::Add(v11, (NiAVObject *)&spNode.m_pObject->vfptr, "Num40");
    PgSprData::Add(v11, (NiAVObject *)&spNode.m_pObject->vfptr, "Num50");
    PgSprData::Add(v11, (NiAVObject *)&spNode.m_pObject->vfptr, "Num60");
    PgSprData::Add(v11, (NiAVObject *)&spNode.m_pObject->vfptr, "Num70");
    PgSprData::Add(v11, (NiAVObject *)&spNode.m_pObject->vfptr, "Num80");
    PgSprData::Add(v11, (NiAVObject *)&spNode.m_pObject->vfptr, "Num90");
    v12 = PgWinSpr::CreateWin(uiLeft, uiTop, v11, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkHINumSpr = v12;
    v12->vfptr[60].__vecDelDtor((NiRefObject *)v12, 0);
    v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane02", &uiLeft, &uiTop, 0);
    v14 = PgWinSpr::CreateWin(uiLeft, uiTop, v13, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkLevelSpr = v14;
    v14->vfptr[60].__vecDelDtor((NiRefObject *)v14, 0);
    pkNiNodePtr.m_pObject = 0;
    v15 = ::pTexturePalette;
    LOBYTE(v26) = 1;
    if ( !Folder::m_bInit )
      Folder::Init();
    v16 = Folder::Merge(&Folder::m_acMenu, "Game\\MysteryVaultEffect.nif");
    PgUtil::LoadNodeNifFile(v16, &pkNiNodePtr, v15);
    if ( pkNiNodePtr.m_pObject )
    {
      v17 = (SpEffect *)operator new(0x44u);
      LOBYTE(v26) = 2;
      if ( v17 )
      {
        v18 = (NiNode *)NiObject::Clone((NiObject *)&pkNiNodePtr.m_pObject->vfptr);
        SpEffect::SpEffect(v17, v18);
      }
      else
      {
        v19 = 0;
      }
      v20 = v2->vfptr[59].__vecDelDtor;
      v2->m_apkEffect = v19;
      LOBYTE(v26) = 1;
      ((void (__thiscall *)(MysteryVaultWin *))v20)(v2);
      v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
      LOBYTE(v26) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkNiNodePtr);
      v26 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 1;
    }
    else
    {
      LOBYTE(v26) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkNiNodePtr);
      v26 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 0;
    }
  }
  else
  {
    v7 = spNode.m_pObject;
    v26 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00559AE0) --------------------------------------------------------
void __thiscall MysteryVaultWin::~MysteryVaultWin(MysteryVaultWin *this)
{
  MysteryVaultWin *v1; // ebx@1
  SpEffect *v2; // esi@1
  NiNode *v3; // edi@2

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&MysteryVaultWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MysteryVaultWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_apkEffect;
  if ( v2 )
  {
    NsEffect::~NsEffect(&v2->m_kEffect);
    ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v2->m_kMarkCheck);
    v3 = v2->m_spEffect.m_pObject;
    if ( v2->m_spEffect.m_pObject && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    operator delete(v2);
  }
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 998350: using guessed type void (__thiscall *MysteryVaultWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99836C: using guessed type int (__thiscall *MysteryVaultWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00559BA0) --------------------------------------------------------
void __thiscall MysteryVaultWin::OnReachTheLevel(MysteryVaultWin *this, unsigned int curUserLV, unsigned int itemLV)
{
  MysteryVaultWin *v3; // edi@1
  PgWinSpr *v4; // ecx@3
  unsigned int v5; // edx@6
  NiRefObjectVtbl *v6; // eax@6
  PgFrameWork *v7; // eax@11
  GuildWarInformWin *v8; // esi@12
  D3DXCOLOR *v9; // eax@13
  char *v10; // eax@13
  D3DXCOLOR result; // [sp+4h] [bp-10h]@13

  v3 = this;
  if ( this->m_pkLowNumSpr )
  {
    if ( this->m_pkLevelSpr )
    {
      v4 = this->m_pkHINumSpr;
      if ( v4 )
      {
        if ( v3->m_pkBut )
        {
          if ( curUserLV >= itemLV )
          {
            if ( curUserLV == itemLV )
            {
              v7 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
              if ( v7 )
              {
                v8 = (GuildWarInformWin *)v7[31].m_kMsgQ.m_uiHead;
                if ( v8 )
                {
                  v9 = ColorInfoTable::GetDxColor(&result, blue);
                  GuildWarInformWin::SetColor(v8, v9);
                  v10 = (char *)TextData2::Get(0x314B3839u);
                  GuildWarInformWin::SetText(v8, v10);
                }
              }
              v3->m_bEffectStart = 1;
            }
            ((void (__stdcall *)(_DWORD))v3->m_pkHINumSpr->vfptr[64].__vecDelDtor)(0);
            ((void (__stdcall *)(_DWORD))v3->m_pkLowNumSpr->vfptr[64].__vecDelDtor)(0);
            ((void (__stdcall *)(_DWORD))v3->m_pkLevelSpr->vfptr[64].__vecDelDtor)(0);
            v3->m_ItemLV = itemLV;
          }
          else
          {
            v5 = (signed int)(itemLV - curUserLV) / 10 - 1;
            v6 = v4->vfptr;
            if ( v5 > 8 )
            {
              ((void (__stdcall *)(_DWORD))v6[64].__vecDelDtor)(0);
            }
            else
            {
              ((void (__stdcall *)(_DWORD))v6[123].__vecDelDtor)(v5);
              ((void (__stdcall *)(_DWORD))v3->m_pkHINumSpr->vfptr[64].__vecDelDtor)(1);
            }
            ((void (__stdcall *)(_DWORD))v3->m_pkLowNumSpr->vfptr[123].__vecDelDtor)((signed int)(itemLV - curUserLV) % 10);
            ((void (__stdcall *)(_DWORD))v3->m_pkLowNumSpr->vfptr[64].__vecDelDtor)(1);
            ((void (__stdcall *)(_DWORD))v3->m_pkLevelSpr->vfptr[64].__vecDelDtor)(1);
            v3->m_ItemLV = itemLV;
          }
        }
      }
    }
  }
}

//----- (00559D10) --------------------------------------------------------
MysteryVaultWin *__cdecl MysteryVaultWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  MysteryVaultWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x178u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&MysteryVaultWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&MysteryVaultWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[2][0]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[2][1]) = 0;
    LOBYTE(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (MysteryVaultWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 998350: using guessed type void (__thiscall *MysteryVaultWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99836C: using guessed type int (__thiscall *MysteryVaultWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00559E70) --------------------------------------------------------
MysteryVaultWin *__thiscall MysteryVaultWin::`scalar deleting destructor'(MysteryVaultWin *this, unsigned int a2)
{
  MysteryVaultWin *v2; // esi@1

  v2 = this;
  MysteryVaultWin::~MysteryVaultWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00559EA0) --------------------------------------------------------
void __thiscall ItemShopInvWin::~ItemShopInvWin(ItemShopInvWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ItemShopInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ItemShopInvWin::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
}
// 99877C: using guessed type void (__thiscall *ItemShopInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99879C: using guessed type int (__thiscall *ItemShopInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00559EC0) --------------------------------------------------------
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__thiscall ItemShopInvWin::GetItem(ItemShopInvWin *this)
{
  return this->m_pkSellInfo;
}

//----- (00559ED0) --------------------------------------------------------
void __userpurge ItemShopInvWin::SetItem(ItemShopInvWin *this@<ecx>, int a2@<ebx>, PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *pkInfo)
{
  ItemShopInvWin *v3; // esi@1

  v3 = this;
  ItemIcon::SetItemSellInfo((ItemIcon *)&this->vfptr, a2, (int)pkInfo, pkInfo);
  v3->m_pkSellInfo = pkInfo;
}

//----- (00559EF0) --------------------------------------------------------
ItemRepurchase *__thiscall ItemShopInvWin::GetRepurchaseItem(ItemShopInvWin *this)
{
  return this->m_pkRepurchaseItem;
}

//----- (00559F00) --------------------------------------------------------
char __thiscall ItemShopInvWin::Create(ItemShopInvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent)
{
  ItemShopInvWin *v5; // esi@1
  char result; // al@1

  v5 = this;
  result = ItemIcon::Create((ItemIcon *)&this->vfptr, iXPos, iYPos, pkParent);
  if ( result )
  {
    v5->m_uiInvIndex = uiInvIndex;
    result = 1;
  }
  return result;
}

//----- (00559F40) --------------------------------------------------------
void __thiscall ItemShopInvWin::OnFirstHitWin(ItemShopInvWin *this)
{
  ItemShopInvWin *v1; // esi@1
  ItemInfoWin *v2; // ecx@1
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v3; // eax@1
  Item **v4; // edx@1

  v1 = this;
  v2 = (ItemInfoWin *)this->m_pkToolTipWin;
  v3 = v1->m_pkSellInfo;
  v4 = &v1->m_pkRepurchaseItem->pItem;
  if ( v2 )
  {
    if ( v3 )
    {
      ItemInfoWin::SetBuyInfo(v2, v3);
      PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
    }
    else if ( v4 )
    {
      ItemInfoWin::SetRepurchaseInfo(v2, *v4);
      PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
    }
  }
}

//----- (00559FD0) --------------------------------------------------------
void NPCItemWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "NPCWTitle");
}

//----- (0055A000) --------------------------------------------------------
void __usercall ItemShopInvWin::ItemShopInvWin(ItemShopInvWin *this@<ecx>, int a2@<ebx>, int a3@<edi>)
{
  ItemShopInvWin *v3; // esi@1

  v3 = this;
  ItemIcon::ItemIcon((ItemIcon *)&this->vfptr);
  v3->vfptr = (NiRefObjectVtbl *)&ItemShopInvWin::`vftable'{for `NiNode'};
  v3->vfptr = (IDirectMessengerVtbl *)&ItemShopInvWin::`vftable'{for `IDirectMessenger'};
  v3->m_uiInvIndex = -1;
  ItemIcon::SetItemSellInfo((ItemIcon *)&v3->vfptr, a2, a3, 0);
  v3->m_pkSellInfo = 0;
  v3->m_pkRepurchaseItem = 0;
}
// 99877C: using guessed type void (__thiscall *ItemShopInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99879C: using guessed type int (__thiscall *ItemShopInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0055A080) --------------------------------------------------------
void __thiscall ItemShopInvWin::SetItemIcon(ItemShopInvWin *this, ItemRepurchase *pkItem)
{
  ItemShopInvWin *v2; // esi@1
  int v3; // eax@3
  ItemViewInfo *v4; // eax@4
  ItemViewInfo *v5; // edi@4
  NiRefObjectVtbl *v6; // ebx@5
  unsigned int v7; // ST04_4@5
  NiSourceTexture *v8; // eax@5
  unsigned int v9; // eax@5
  char *v10; // eax@6

  v2 = this;
  if ( pkItem && pkItem->pItem && (v3 = pkItem->pItem->m_kStruct.itemid, (_WORD)v3 != -1) )
  {
    v4 = IIDTableBase<ItemViewInfo,ItemViewInfoTab,unsigned short>::GetByID(v3);
    v5 = v4;
    if ( v4 )
    {
      v6 = v2->vfptr;
      v7 = v4->IconIndex;
      v8 = IconMgr::GetTexture(v4->IconFile);
      ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v6[146].__vecDelDtor)(v2, v8, v7, 32, 32);
      ItemIcon::SetSubIconImage((ItemIcon *)&v2->vfptr, v5->SubIconFile, v5->SubIconIndex, 0x20u, 0x20u);
      v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 1u);
      v2->vfptr[60].__vecDelDtor((NiRefObject *)v2, 1u);
      v9 = ((int (*)(void))pkItem->pItem->vfptr[3].__vecDelDtor)();
      if ( v9 <= 1 )
      {
        ItemIcon::SetLotText((ItemIcon *)&v2->vfptr, &byte_99858F);
      }
      else
      {
        v10 = fs("%d", v9);
        ItemIcon::SetLotText((ItemIcon *)&v2->vfptr, v10);
      }
    }
  }
  else
  {
    ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))this->vfptr[146].__vecDelDtor)(this, 0, -1, 32, 32);
    ItemIcon::SetSubIconImage((ItemIcon *)&v2->vfptr, 0, 0xFFFFFFFF, 0x20u, 0x20u);
    v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 0);
    v2->vfptr[60].__vecDelDtor((NiRefObject *)v2, 0);
    ((void (__stdcall *)(_DWORD))v2->m_pkLotText->vfptr[118].__vecDelDtor)(&unk_998590);
    ((void (__stdcall *)(_DWORD))v2->m_pkLotText->vfptr[64].__vecDelDtor)(1);
  }
}

//----- (0055A1C0) --------------------------------------------------------
void __thiscall ItemShopInvWin::SetRepurchaseItem(ItemShopInvWin *this, ItemRepurchase *pkItem)
{
  ItemShopInvWin *v2; // esi@1

  v2 = this;
  ItemShopInvWin::SetItemIcon(this, pkItem);
  v2->m_pkRepurchaseItem = pkItem;
}

//----- (0055A1E0) --------------------------------------------------------
void __thiscall NPCItemWin::OnInvLClick(NPCItemWin *this, unsigned int uiInvIndex)
{
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v2; // eax@2

  if ( !PgWin::ms_bShiftPressed )
  {
    v2 = this->m_apkInvWin[uiInvIndex]->m_pkSellInfo;
    if ( v2 )
    {
      this->m_kDropContents.m_eSenderType = 5;
      this->m_kDropContents.m_eType = 2;
      this->m_kDropContents.m_apvParam[0] = v2;
      this->m_kDrop.m_pkSender = (PgWin *)this;
      PgCursor::ms_pkDrop = &this->m_kDrop;
    }
  }
}
// B6474C: using guessed type bool PgWin::ms_bShiftPressed;
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (0055A230) --------------------------------------------------------
void __thiscall NPCItemWin::TabShow(NPCItemWin *this, NPCItemWin::TAPTYPE type, int _bTab)
{
  NPCItemWin *v3; // esi@1
  unsigned int v4; // edi@3
  unsigned int v5; // ebx@3
  unsigned int v6; // edi@6
  unsigned int v7; // ebx@6

  v3 = this;
  if ( type )
  {
    if ( type == 1 )
    {
      v4 = 0;
      v5 = this->m_pkItemTabList._Mylast - this->m_pkItemTabList._Myfirst;
      if ( v5 )
      {
        do
          ((void (__stdcall *)(_DWORD))v3->m_pkItemTabList._Myfirst[v4++]->vfptr[64].__vecDelDtor)(_bTab);
        while ( v4 < v5 );
      }
    }
  }
  else
  {
    v6 = 0;
    v7 = this->m_pkWTitleTabList._Mylast - this->m_pkWTitleTabList._Myfirst;
    if ( v7 )
    {
      do
        ((void (__stdcall *)(_DWORD))v3->m_pkWTitleTabList._Myfirst[v6++]->vfptr[64].__vecDelDtor)(_bTab);
      while ( v6 < v7 );
    }
  }
}

//----- (0055A2D0) --------------------------------------------------------
void __thiscall NPCItemWin::DeleteAllContents(NPCItemWin *this)
{
  ItemIcon **v1; // edi@1
  int v2; // ebx@2
  ItemIcon *v3; // esi@3
  ItemIcon *v4; // esi@3

  v1 = (ItemIcon **)this->m_apkInvWin;
  if ( this->m_apkInvWin[0] )
  {
    v2 = 42;
    do
    {
      v3 = *v1;
      ItemIcon::SetItemSellInfo(*v1, v2, (int)v1, 0);
      v3[1].vfptr = 0;
      v4 = *v1;
      ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))(*v1)->vfptr[146].__vecDelDtor)(*v1, 0, -1, 32, 32);
      ItemIcon::SetSubIconImage(v4, 0, 0xFFFFFFFF, 0x20u, 0x20u);
      v4->vfptr[64].__vecDelDtor((NiRefObject *)v4, 0);
      v4->vfptr[60].__vecDelDtor((NiRefObject *)v4, 0);
      ((void (__stdcall *)(_DWORD))v4->m_pkLotText->vfptr[118].__vecDelDtor)(&unk_998590);
      ((void (__stdcall *)(_DWORD))v4->m_pkLotText->vfptr[64].__vecDelDtor)(1);
      ++v1;
      --v2;
      v4[1].m_uiRefCount = 0;
    }
    while ( v2 );
  }
}

//----- (0055A390) --------------------------------------------------------
int (__thiscall **__thiscall NPCItemWin::GetSellItemNum(NPCItemWin *this))(void *p, char)
{
  unsigned int v1; // edx@1
  int (__thiscall **result)(void *, char); // eax@1
  NPCItemWin::PAGETYPE v3; // ecx@3
  __int32 v4; // ecx@7

  v1 = this->m_uiCurNPCType;
  result = 0;
  if ( v1 != 3 )
  {
    if ( v1 == 14 )
    {
      v3 = this->m_CurPageType;
      if ( v3 )
      {
        if ( v3 == 1 )
          result = (int (__thiscall **)(void *, char))Market::GetTotalEnchantItem();
      }
      else
      {
        result = (int (__thiscall **)(void *, char))Market::GetTotalWeapontitleItem();
      }
      return result;
    }
    return ItemMarket::GetItemSellInfoList()[3];
  }
  v4 = this->m_CurPageType - 2;
  if ( !v4 )
    return ItemMarket::GetItemSellInfoList()[3];
  if ( v4 == 1 )
    result = (int (__thiscall **)(void *, char))Market::GetTotalRepurchase();
  return result;
}

//----- (0055A3E0) --------------------------------------------------------
unsigned int __thiscall NPCItemWin::GetMaxPageNum(NPCItemWin *this)
{
  unsigned int v1; // eax@1
  NPCItemWin::PAGETYPE v2; // ecx@3
  int (__thiscall **v3)(void *, char); // eax@5
  __int32 v4; // ecx@7

  v1 = this->m_uiCurNPCType;
  if ( v1 == 3 )
  {
    v4 = this->m_CurPageType - 2;
    if ( v4 )
    {
      if ( v4 != 1 )
        return 1;
      v3 = (int (__thiscall **)(void *, char))Market::GetTotalRepurchase();
      goto LABEL_11;
    }
LABEL_10:
    v3 = ItemMarket::GetItemSellInfoList()[3];
    goto LABEL_11;
  }
  if ( v1 != 14 )
    goto LABEL_10;
  v2 = this->m_CurPageType;
  if ( v2 )
  {
    if ( v2 == 1 )
    {
      v3 = (int (__thiscall **)(void *, char))Market::GetTotalEnchantItem();
      goto LABEL_11;
    }
    return 1;
  }
  v3 = (int (__thiscall **)(void *, char))Market::GetTotalWeapontitleItem();
LABEL_11:
  if ( !v3 )
    return 1;
  return ((unsigned int)v3 - 1) / 0x2A + 1;
}

//----- (0055A450) --------------------------------------------------------
void __thiscall NPCItemWin::DeleteRepurchaseInv(NPCItemWin *this, unsigned __int16 nHandle)
{
  NPCItemWin *v2; // esi@1
  unsigned int v3; // ebx@1
  unsigned int v4; // eax@1
  int v5; // edi@1
  ItemShopInvWin *v6; // esi@5
  unsigned int v7; // [sp+Ch] [bp-8h]@1
  NPCItemWin *v8; // [sp+10h] [bp-4h]@1
  int nHandlea; // [sp+1Ch] [bp+8h]@2

  v2 = this;
  v8 = this;
  v3 = Market::FindRepurchase(nHandle);
  v4 = Market::GetTotalRepurchase();
  v5 = 0;
  v7 = v4 - v3;
  if ( v4 != v3 )
  {
    nHandlea = (int)&v2->m_apkInvWin[v3 + 1];
    do
    {
      if ( v2->m_CurPageType == 3 )
      {
        if ( v5 + v3 == 41 )
        {
          v6 = v2->m_apkInvWin[v5 + v3];
          ((void (__thiscall *)(ItemShopInvWin *, _DWORD, signed int, signed int, signed int))v6->vfptr[146].__vecDelDtor)(
            v6,
            0,
            -1,
            32,
            32);
          ItemIcon::SetSubIconImage((ItemIcon *)&v6->vfptr, 0, 0xFFFFFFFF, 0x20u, 0x20u);
          v6->vfptr[64].__vecDelDtor((NiRefObject *)v6, 0);
          v6->vfptr[60].__vecDelDtor((NiRefObject *)v6, 0);
          ((void (__stdcall *)(void *))v6->m_pkLotText->vfptr[118].__vecDelDtor)(&unk_998590);
          ((void (__stdcall *)(signed int))v6->m_pkLotText->vfptr[64].__vecDelDtor)(1);
          v2 = v8;
        }
        else
        {
          ItemShopInvWin::SetItemIcon(v2->m_apkInvWin[v5 + v3], *(ItemRepurchase **)(*(_DWORD *)nHandlea + 452));
        }
      }
      nHandlea += 4;
      ++v5;
    }
    while ( v5 < v7 );
  }
  Market::DeleteRepurchase(v3);
}

//----- (0055A560) --------------------------------------------------------
void __thiscall NPCItemWin::AddRepurchaseInv(NPCItemWin *this, PROTO_NC_ITEM_SELL_ITEM_INSERT_CMD *pkRepurItem)
{
  NPCItemWin *v2; // esi@1
  unsigned int v3; // eax@1
  unsigned int v4; // ebx@1
  Item **v5; // eax@1
  ItemRepurchase *v6; // eax@3
  ItemRepurchase *v7; // edi@3
  ItemShopInvWin *v8; // esi@4

  v2 = this;
  v3 = Market::GetTotalRepurchase();
  v4 = v3;
  v5 = &v2->m_apkInvWin[v3]->m_pkRepurchaseItem->pItem;
  if ( !v5 || !*v5 )
  {
    v6 = Market::AddRepurchase(pkRepurItem);
    v7 = v6;
    if ( v2->m_CurPageType == 3 )
    {
      v8 = v2->m_apkInvWin[v4];
      ItemShopInvWin::SetItemIcon(v8, v6);
      v8->m_pkRepurchaseItem = v7;
    }
  }
}

//----- (0055A5C0) --------------------------------------------------------
void __thiscall ItemShopInvWin::DoAction(ItemShopInvWin *this)
{
  ItemShopInvWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiInvIndex);
}

//----- (0055A5F0) --------------------------------------------------------
void __thiscall ItemShopInvWin::DoRAction(ItemShopInvWin *this)
{
  ItemShopInvWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiRCmdMsg, v1->m_uiInvIndex);
}

//----- (0055A620) --------------------------------------------------------
void __thiscall NPCItemWin::OnCancel(NPCItemWin *this)
{
  NPCItemWin *v1; // esi@1
  unsigned int v2; // ebx@1
  unsigned int v3; // edi@1
  unsigned int v4; // edi@3
  unsigned int v5; // ebx@3

  v1 = this;
  GameFrameWork::CloseItemShopWin((GameFrameWork *)this->m_pkFrameWork);
  v2 = 0;
  v3 = v1->m_pkWTitleTabList._Mylast - v1->m_pkWTitleTabList._Myfirst;
  if ( v3 )
  {
    do
      ((void (__stdcall *)(_DWORD))v1->m_pkWTitleTabList._Myfirst[v2++]->vfptr[64].__vecDelDtor)(0);
    while ( v2 < v3 );
  }
  v4 = 0;
  v5 = v1->m_pkItemTabList._Mylast - v1->m_pkItemTabList._Myfirst;
  if ( v5 )
  {
    do
      ((void (__stdcall *)(_DWORD))v1->m_pkItemTabList._Myfirst[v4++]->vfptr[64].__vecDelDtor)(0);
    while ( v4 < v5 );
  }
}

//----- (0055A6A0) --------------------------------------------------------
void __thiscall NPCItemWin::UpdatePageInfo(NPCItemWin *this)
{
  NPCItemWin *v1; // esi@1
  NiRefObjectVtbl *v2; // edi@2
  unsigned int v3; // eax@2
  char *v4; // eax@2

  v1 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[65].__vecDelDtor)() )
  {
    v2 = v1->m_pkPageText->vfptr;
    v3 = NPCItemWin::GetMaxPageNum(v1);
    v4 = fs("%d / %d", v1->m_uiCurPage + 1, v3);
    v2[118].__vecDelDtor((NiRefObject *)v1->m_pkPageText, (unsigned int)v4);
  }
}

//----- (0055A6F0) --------------------------------------------------------
void __thiscall NPCItemWin::ReSetItemMarket(NPCItemWin *this)
{
  NPCItemWin *v1; // ebx@1
  int v2; // edi@1
  int (__thiscall **v3)(void *, char); // esi@1
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v4; // edi@7
  ItemIcon *v5; // ebx@7
  NiRefObjectVtbl **v6; // esi@9
  NiRefObjectVtbl *v7; // edi@9
  unsigned int v8; // eax@9
  char *v9; // eax@9
  NPCItemWin *v10; // [sp+Ch] [bp-Ch]@1
  ItemIcon **v11; // [sp+10h] [bp-8h]@5
  int iSellInfoCount; // [sp+14h] [bp-4h]@5

  v1 = this;
  v10 = this;
  NPCItemWin::DeleteAllContents(this);
  v2 = 42 * v1->m_uiCurPage;
  v3 = ItemMarket::GetItemSellInfoList()[1];
  if ( v2 )
  {
    while ( 1 )
    {
      --v2;
      if ( !v3 )
        break;
      v3 = (int (__thiscall **)(void *, char))*v3;
      if ( !v2 )
        goto LABEL_4;
    }
  }
  else
  {
LABEL_4:
    if ( v3 )
    {
      iSellInfoCount = 0;
      v11 = (ItemIcon **)v1->m_apkInvWin;
      do
      {
        if ( iSellInfoCount >= 42 )
          break;
        v4 = (PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *)v3[2];
        v5 = *v11;
        v3 = (int (__thiscall **)(void *, char))*v3;
        ItemIcon::SetItemSellInfo(v5, (int)v5, (int)v4, v4);
        ++iSellInfoCount;
        ++v11;
        v5[1].vfptr = (NiRefObjectVtbl *)v4;
        v1 = v10;
      }
      while ( v3 );
      if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v1->vfptr[65].__vecDelDtor)(v1) )
      {
        v6 = &v1->m_pkPageText->vfptr;
        v7 = *v6;
        v8 = NPCItemWin::GetMaxPageNum(v1);
        v9 = fs("%d / %d", v1->m_uiCurPage + 1, v8);
        v7[118].__vecDelDtor((NiRefObject *)v6, (unsigned int)v9);
      }
    }
  }
}

//----- (0055A7C0) --------------------------------------------------------
void __thiscall NPCItemWin::OnShowWin(NPCItemWin *this)
{
  NPCItemWin *v1; // esi@1
  NiRefObjectVtbl *v2; // edi@2
  unsigned int v3; // eax@2
  char *v4; // eax@2

  v1 = this;
  PgWin::OnShowWin((PgWin *)&this->vfptr);
  if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v1->vfptr[65].__vecDelDtor)(v1) )
  {
    v2 = v1->m_pkPageText->vfptr;
    v3 = NPCItemWin::GetMaxPageNum(v1);
    v4 = fs("%d / %d", v1->m_uiCurPage + 1, v3);
    v2[118].__vecDelDtor((NiRefObject *)v1->m_pkPageText, (unsigned int)v4);
  }
}

//----- (0055A810) --------------------------------------------------------
void __thiscall NPCItemWin::ResetContents(NPCItemWin *this)
{
  NPCItemWin *v1; // esi@1
  unsigned int v2; // ebx@1
  unsigned int v3; // edi@1
  unsigned int v4; // edi@3
  unsigned int v5; // ebx@3
  unsigned int v6; // eax@5
  NPCItemWin *v7; // ecx@6
  NPCItemWin::PAGETYPE v8; // eax@7
  unsigned int v9; // edi@9
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v10; // eax@11
  ItemIcon *v11; // ebx@11
  NiRefObjectVtbl *v12; // esi@11
  unsigned int v13; // edi@13
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v14; // eax@15
  ItemIcon *v15; // ebx@15
  NiRefObjectVtbl *v16; // esi@15
  unsigned int v17; // edi@17
  unsigned int v18; // ebx@17
  unsigned int v19; // edi@21
  ItemRepurchase *v20; // eax@23
  ItemShopInvWin *v21; // ebx@23
  ItemRepurchase *v22; // esi@23
  unsigned int iStart; // [sp+Ch] [bp-8h]@1
  ItemIcon **iStarta; // [sp+Ch] [bp-8h]@10
  ItemIcon **iStartb; // [sp+Ch] [bp-8h]@14
  ItemShopInvWin **iStartc; // [sp+Ch] [bp-8h]@22
  unsigned int uiTotal; // [sp+10h] [bp-4h]@9
  unsigned int uiTotala; // [sp+10h] [bp-4h]@13
  unsigned int uiTotalb; // [sp+10h] [bp-4h]@21

  v1 = this;
  NPCItemWin::DeleteAllContents(this);
  v2 = 0;
  v3 = v1->m_pkItemTabList._Mylast - v1->m_pkItemTabList._Myfirst;
  iStart = 42 * v1->m_uiCurPage;
  if ( v3 )
  {
    do
      ((void (__stdcall *)(_DWORD))v1->m_pkItemTabList._Myfirst[v2++]->vfptr[64].__vecDelDtor)(0);
    while ( v2 < v3 );
  }
  v4 = 0;
  v5 = v1->m_pkWTitleTabList._Mylast - v1->m_pkWTitleTabList._Myfirst;
  if ( v5 )
  {
    do
      ((void (__stdcall *)(_DWORD))v1->m_pkWTitleTabList._Myfirst[v4++]->vfptr[64].__vecDelDtor)(0);
    while ( v4 < v5 );
  }
  v6 = v1->m_uiCurNPCType;
  if ( v6 != 3 )
  {
    v7 = v1;
    if ( v6 == 14 )
    {
      NPCItemWin::TabShow(v1, 0, 1);
      v8 = v1->m_CurPageType;
      if ( v8 )
      {
        if ( v8 == 1 )
        {
          v9 = iStart;
          uiTotal = Market::GetTotalEnchantItem();
          if ( iStart < uiTotal )
          {
            iStarta = (ItemIcon **)v1->m_apkInvWin;
            do
            {
              v10 = Market::GetEnchantItem(v9);
              v11 = *iStarta;
              v12 = (NiRefObjectVtbl *)v10;
              ItemIcon::SetItemSellInfo(v11, (int)v11, v9, v10);
              ++iStarta;
              ++v9;
              v11[1].vfptr = v12;
            }
            while ( v9 < uiTotal );
          }
        }
      }
      else
      {
        v13 = iStart;
        uiTotala = Market::GetTotalWeapontitleItem();
        if ( iStart < uiTotala )
        {
          iStartb = (ItemIcon **)v1->m_apkInvWin;
          do
          {
            v14 = Market::GetWeapontitleItem(v13);
            v15 = *iStartb;
            v16 = (NiRefObjectVtbl *)v14;
            ItemIcon::SetItemSellInfo(v15, (int)v15, v13, v14);
            ++iStartb;
            ++v13;
            v15[1].vfptr = v16;
          }
          while ( v13 < uiTotala );
        }
      }
      return;
    }
LABEL_26:
    NPCItemWin::ReSetItemMarket(v7);
    return;
  }
  v17 = 0;
  v18 = v1->m_pkItemTabList._Mylast - v1->m_pkItemTabList._Myfirst;
  if ( v18 )
  {
    do
      ((void (__stdcall *)(_DWORD))v1->m_pkItemTabList._Myfirst[v17++]->vfptr[64].__vecDelDtor)(1);
    while ( v17 < v18 );
  }
  if ( v1->m_CurPageType == 2 )
  {
    v7 = v1;
    goto LABEL_26;
  }
  if ( v1->m_CurPageType == 3 )
  {
    v19 = iStart;
    uiTotalb = Market::GetTotalRepurchase();
    if ( iStart < uiTotalb )
    {
      iStartc = v1->m_apkInvWin;
      do
      {
        v20 = Market::GetRepurchase(v19);
        v21 = *iStartc;
        v22 = v20;
        ItemShopInvWin::SetItemIcon(*iStartc, v20);
        ++iStartc;
        ++v19;
        v21->m_pkRepurchaseItem = v22;
      }
      while ( v19 < uiTotalb );
    }
  }
}

//----- (0055AA00) --------------------------------------------------------
void __thiscall NPCItemWin::OnTab(NPCItemWin *this, NPCItemWin::PAGETYPE index)
{
  if ( this->m_CurPageType != index )
  {
    this->m_CurPageType = index;
    this->m_uiCurPage = 0;
    NPCItemWin::ResetContents(this);
  }
}

//----- (0055AA30) --------------------------------------------------------
void __thiscall NPCItemWin::ResetPage(NPCItemWin *this, int NPCType)
{
  this->m_uiCurPage = 0;
  this->m_uiCurNPCType = NPCType;
  this->m_CurPageType = NPCType != 3 ? 0 : 2;
  NPCItemWin::ResetContents(this);
}

//----- (0055AA70) --------------------------------------------------------
ItemShopInvWin *__usercall ItemShopInvWin::CreateWin@<eax>(int a1@<ebx>, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent)
{
  PgWin *v5; // eax@1
  ItemIcon *v6; // esi@1
  PgWin *v7; // edi@8
  ItemShopInvWin *v8; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v10; // [sp+20h] [bp-4h]@1

  v5 = (PgWin *)operator new(0x1CCu);
  v6 = (ItemIcon *)v5;
  result.m_pObject = v5;
  v10 = 0;
  if ( v5 )
  {
    ItemIcon::ItemIcon((ItemIcon *)v5);
    LOBYTE(v10) = 1;
    v6->vfptr = (NiRefObjectVtbl *)&ItemShopInvWin::`vftable'{for `NiNode'};
    v6->vfptr = (IDirectMessengerVtbl *)&ItemShopInvWin::`vftable'{for `IDirectMessenger'};
    v6[1].m_pcName = (char *)-1;
    ItemIcon::SetItemSellInfo(v6, a1, 0, 0);
    v6[1].vfptr = 0;
    v6[1].m_uiRefCount = 0;
  }
  else
  {
    v6 = 0;
  }
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v10 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, (PgWin *)&v6->vfptr);
  if ( (unsigned __int8)((int (__thiscall *)(ItemIcon *, int, int, unsigned int, PgWin *))v6->vfptr[154].__vecDelDtor)(
                          v6,
                          iXPos,
                          iYPos,
                          uiInvIndex,
                          pkParent) )
  {
    ((void (__thiscall *)(ItemIcon *))v6->vfptr[89].__vecDelDtor)(v6);
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = (ItemShopInvWin *)v6;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, (PgWin *)&v6->vfptr);
    if ( result.m_pObject )
    {
      v7 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      }
    }
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = 0;
  }
  return v8;
}
// 99877C: using guessed type void (__thiscall *ItemShopInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99879C: using guessed type int (__thiscall *ItemShopInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0055ABE0) --------------------------------------------------------
void __thiscall NPCItemWin::NPCItemWin(NPCItemWin *this)
{
  NPCItemWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&NPCItemWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&NPCItemWin::`vftable'{for `IDirectMessenger'};
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  v1->m_kDrop.m_pkSender = 0;
  v1->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v1->m_kDropContents.m_uiLot = 0;
  v1->m_kDropContents.m_kItemID = -1;
  v1->m_pkWTitleTabList._Myfirst = 0;
  v1->m_pkWTitleTabList._Mylast = 0;
  v1->m_pkWTitleTabList._Myend = 0;
  v1->m_pkItemTabList._Myfirst = 0;
  v1->m_pkItemTabList._Mylast = 0;
  v1->m_pkItemTabList._Myend = 0;
  v1->m_kDrop.m_pkContents = &v1->m_kDropContents;
  v1->m_uiCurPage = 0;
  v1->m_pkTitleTextWin = 0;
  memset(v1->m_apkInvWin, 0, sizeof(v1->m_apkInvWin));
  v1->m_CurPageType = 0;
  v1->m_uiCurNPCType = 0;
  v1->m_pkPageText = 0;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 998A0C: using guessed type void (__thiscall *NPCItemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 998A2C: using guessed type int (__thiscall *NPCItemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0055AC90) --------------------------------------------------------
void __thiscall NPCItemWin::~NPCItemWin(NPCItemWin *this)
{
  NPCItemWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&NPCItemWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&NPCItemWin::`vftable'{for `IDirectMessenger'};
  if ( this->m_pkItemTabList._Myfirst )
    operator delete(this->m_pkItemTabList._Myfirst);
  v1->m_pkItemTabList._Myfirst = 0;
  v1->m_pkItemTabList._Mylast = 0;
  v1->m_pkItemTabList._Myend = 0;
  if ( v1->m_pkWTitleTabList._Myfirst )
    operator delete(v1->m_pkWTitleTabList._Myfirst);
  v1->m_pkWTitleTabList._Myfirst = 0;
  v1->m_pkWTitleTabList._Mylast = 0;
  v1->m_pkWTitleTabList._Myend = 0;
  v1->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 998A0C: using guessed type void (__thiscall *NPCItemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 998A2C: using guessed type int (__thiscall *NPCItemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0055AD10) --------------------------------------------------------
NPCItemWin *__cdecl NPCItemWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  NPCItemWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x290u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    NPCItemWin::NPCItemWin((NPCItemWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (NPCItemWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (0055AE40) --------------------------------------------------------
void __thiscall NPCItemWin::ResetPage(NPCItemWin *this)
{
  this->m_uiCurPage = 0;
  this->m_CurPageType = 0;
  NPCItemWin::ResetContents(this);
}

//----- (0055AE60) --------------------------------------------------------
void __thiscall NPCItemWin::OnPrevPage(NPCItemWin *this)
{
  unsigned int v1; // eax@1

  v1 = this->m_uiCurPage;
  if ( v1 )
    this->m_uiCurPage = v1 - 1;
  NPCItemWin::ResetContents(this);
}

//----- (0055AE80) --------------------------------------------------------
void __thiscall NPCItemWin::OnNextPage(NPCItemWin *this)
{
  NPCItemWin *v1; // esi@1
  unsigned int v2; // ecx@1
  int (__thiscall **v3)(void *, char); // eax@1
  NPCItemWin::PAGETYPE v4; // ecx@3
  unsigned int v5; // ecx@11

  v1 = this;
  v2 = this->m_uiCurNPCType;
  v3 = 0;
  if ( v2 != 3 )
  {
    if ( v2 == 14 )
    {
      v4 = v1->m_CurPageType;
      if ( v4 )
      {
        if ( v4 == 1 )
          v3 = (int (__thiscall **)(void *, char))Market::GetTotalEnchantItem();
      }
      else
      {
        v3 = (int (__thiscall **)(void *, char))Market::GetTotalWeapontitleItem();
      }
      goto LABEL_11;
    }
LABEL_10:
    v3 = ItemMarket::GetItemSellInfoList()[3];
    goto LABEL_11;
  }
  if ( v1->m_CurPageType == 2 )
    goto LABEL_10;
  if ( v1->m_CurPageType == 3 )
    v3 = (int (__thiscall **)(void *, char))Market::GetTotalRepurchase();
LABEL_11:
  v5 = v1->m_uiCurPage;
  if ( 42 * (v5 + 1) < (unsigned int)v3 )
    v1->m_uiCurPage = v5 + 1;
  NPCItemWin::ResetContents(v1);
}

//----- (0055AEF0) --------------------------------------------------------
char __thiscall NPCItemWin::Create(NPCItemWin *this, PgFrameWork *pkFrameWork)
{
  NPCItemWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  char result; // al@6
  const char *v6; // eax@9
  PgSprData *v7; // eax@10
  int v8; // edi@11
  int v9; // ebx@11
  NiSourceTexture *v10; // eax@11
  PgSprData *v11; // eax@12
  NiSourceTexture *v12; // eax@14
  NiRefObjectVtbl *v13; // edx@14
  PgSprData *v14; // eax@16
  PgWinSpr *v15; // eax@16
  PgSprData *v16; // eax@16
  PgFont *v17; // eax@18
  PgWinText *v18; // eax@18
  NiRefObjectVtbl *v19; // edx@18
  NiUnsharedGeometryGroup *v20; // eax@18
  PgSprData *v21; // eax@18
  PgSprData *v22; // eax@19
  NiRefObjectVtbl *v23; // eax@19
  PgWinText *v24; // eax@19
  PgWinText *v25; // ecx@19
  char *v26; // eax@20
  char *v27; // eax@20
  D3DXCOLOR v28; // ST34_16@20
  PgWinText *v29; // eax@20
  NiRefObjectVtbl *v30; // edx@20
  char *v31; // eax@20
  PgWinText *v32; // eax@20
  NiRefObjectVtbl *v33; // edx@20
  char *v34; // eax@20
  PgWinText *v35; // eax@20
  NiRefObjectVtbl *v36; // edx@20
  char *v37; // eax@20
  PgWinBut *v38; // eax@20
  PgWinText *v39; // edi@20
  void *(__thiscall *v40)(NiRefObject *, unsigned int); // eax@20
  char *v41; // eax@20
  NiNode *v42; // esi@21
  unsigned int uiWidth; // [sp+48h] [bp-6Ch]@16
  unsigned int uiHeight; // [sp+4Ch] [bp-68h]@16
  UIUtil ui; // [sp+50h] [bp-64h]@11
  NiSourceTexture *pkTexture10; // [sp+64h] [bp-50h]@19
  NiSourceTexture *pkTexture; // [sp+68h] [bp-4Ch]@1
  int i; // [sp+6Ch] [bp-48h]@7
  int uiTop; // [sp+70h] [bp-44h]@10
  int uiLeft; // [sp+74h] [bp-40h]@10
  NiPointer<NiNode> spNode; // [sp+78h] [bp-3Ch]@1
  PgWinText *pkTextWin; // [sp+7Ch] [bp-38h]@14
  char acShapeName[33]; // [sp+80h] [bp-34h]@19
  int v54; // [sp+B0h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v54 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  pkTexture = v3;
  if ( !v3 )
    goto LABEL_27;
  i = (int)pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = Folder::Merge(&Folder::m_acMenu, "Game\\NPCWTitle.nif");
  PgUtil::LoadNodeNifFile(v6, &spNode, (NiTexturePalette *)i);
  if ( !spNode.m_pObject )
    return 0;
  v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v7, 0, pkFrameWork, "NPCItemWin", 0) )
  {
LABEL_27:
    v4 = spNode.m_pObject;
    v54 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
    return 0;
  }
  v8 = uiLeft;
  v9 = uiTop;
  UIUtil::UIUtil(&ui);
  LOBYTE(v54) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, v8, v9);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v11, (PgWin *)&v2->vfptr, 0, 0);
  pkTextWin = (PgWinText *)PgSprData::Create(
                             (NiAVObject *)&spNode.m_pObject->vfptr,
                             "ClsNor",
                             &uiLeft,
                             &uiTop,
                             pkTexture);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 7u, 0, 0);
  v12 = MenuTexMgr::GetTexture(4u);
  v13 = spNode.m_pObject->vfptr;
  i = (int)v12;
  if ( ((int (__stdcall *)(const char *))v13[18].__vecDelDtor)("HelpLinkNor") )
  {
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "HelpLinkNor",
                               &uiLeft,
                               &uiTop,
                               (NiSourceTexture *)i);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xAu, 0, 0);
  }
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
  v15 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v14, (PgWin *)&v2->vfptr, 0, 0);
  v15->vfptr[60].__vecDelDtor((NiRefObject *)v15, 0);
  v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, pkTexture);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v16, (PgWin *)&v2->vfptr, 0, 0);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v17 = Font::Get(0);
    v18 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9 + 2, uiWidth, uiHeight, v17, (PgWin *)&v2->vfptr, 0, 0);
    v19 = v18->vfptr;
    pkTextWin = v18;
    v19[122].__vecDelDtor((NiRefObject *)v18, 5u);
    ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
    i = (int)&pkTextWin->vfptr[118];
    v20 = TextData::Get(0xF557442A);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))i)(pkTextWin, v20);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, pkTexture);
    PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v21, (PgWin *)&v2->vfptr, 0, 0);
    i = 0;
    pkTextWin = (PgWinText *)v2->m_apkInvWin;
    do
    {
      pkTexture10 = (NiSourceTexture *)(i + 1);
      sprintf(acShapeName, "IconSlot%03d", i + 1);
      v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, pkTexture);
      PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v22, (PgWin *)&v2->vfptr, 0, 0);
      v23 = (NiRefObjectVtbl *)ItemShopInvWin::CreateWin(v9, uiLeft - v8 + 1, uiTop - v9 + 1, i, (PgWin *)&v2->vfptr);
      pkTextWin->vfptr = v23;
      i = (int)v23;
      ItemIcon::SetItemSellInfo((ItemIcon *)v23, v9, v8, 0);
      v24 = pkTextWin;
      *(_DWORD *)(i + 448) = 0;
      (*((void (__stdcall **)(_DWORD))v24->vfptr->__vecDelDtor + 129))(0);
      (*((void (__stdcall **)(_DWORD))pkTextWin->vfptr->__vecDelDtor + 140))(1);
      v25 = pkTextWin;
      pkTextWin->vfptr[68].__vecDelDtor = (void *(__thiscall *)(NiRefObject *, unsigned int))g_pkItemInfoWin;
      i = (int)pkTexture10;
      pkTextWin = (PgWinText *)((char *)v25 + 4);
    }
    while ( (signed int)pkTexture10 < 42 );
    pkTexture10 = MenuTexMgr::GetTexture(0x1Cu);
    pkTextWin = (PgWinText *)UIUtil::CreateBtn(&ui, 4u, "PrePageNor", "PrePageClick", "PrePageOver", 0, pkTexture10);
    pkTextWin->m_pkToolTipWin = g_pkToolTipWin;
    v26 = (char *)TextData3::Get(0x6A8A9870u);
    PgWin::SetToolTipWinText((PgWin *)&pkTextWin->vfptr, v26);
    pkTextWin = (PgWinText *)UIUtil::CreateBtn(&ui, 5u, "NextPageNor", "NextPageClick", "NextPageOver", 0, pkTexture10);
    pkTextWin->m_pkToolTipWin = g_pkToolTipWin;
    v27 = (char *)TextData3::Get(0x25449D82u);
    PgWin::SetToolTipWinText((PgWin *)&pkTextWin->vfptr, v27);
    UIUtil::CreateSpr(&ui, "Number", 0);
    *(_QWORD *)&v28.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v28.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v2->m_pkPageText = UIUtil::CreateTextNoSpr(&ui, "Number01", byte_998591, v28, 5u);
    pkTexture = MenuTexMgr::GetTexture(0x1Du);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "WTitleNor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "WTitleClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "WTitleOver");
    v29 = (PgWinText *)PgWinBut::CreateWin(
                         uiLeft - v8,
                         uiTop - v9,
                         (PgSprData *)pkTextWin,
                         (PgWin *)&v2->vfptr,
                         2u,
                         0,
                         0);
    v30 = v29->vfptr;
    pkTextWin = v29;
    v30[130].__vecDelDtor((NiRefObject *)v29, 0);
    v31 = (char *)TextData2::Get(0xF602040C);
    PgWin::SetToolTipWinText((PgWin *)&pkTextWin->vfptr, v31);
    pkTextWin->m_pkToolTipWin = g_pkToolTipWin;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_pkWTitleTabList,
      (const unsigned int *)&pkTextWin);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "EnchantNor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "EnchantClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "EnchantOver");
    v32 = (PgWinText *)PgWinBut::CreateWin(
                         uiLeft - v8,
                         uiTop - v9,
                         (PgSprData *)pkTextWin,
                         (PgWin *)&v2->vfptr,
                         2u,
                         0,
                         0);
    v33 = v32->vfptr;
    pkTextWin = v32;
    v33[130].__vecDelDtor((NiRefObject *)v32, 1u);
    v34 = (char *)TextData2::Get(0x82B1C1C9);
    PgWin::SetToolTipWinText((PgWin *)&pkTextWin->vfptr, v34);
    pkTextWin->m_pkToolTipWin = g_pkToolTipWin;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_pkWTitleTabList,
      (const unsigned int *)&pkTextWin);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "GeneralNor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GeneralClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GeneralOver");
    v35 = (PgWinText *)PgWinBut::CreateWin(
                         uiLeft - v8,
                         uiTop - v9,
                         (PgSprData *)pkTextWin,
                         (PgWin *)&v2->vfptr,
                         3u,
                         0,
                         0);
    v36 = v35->vfptr;
    pkTextWin = v35;
    v36[130].__vecDelDtor((NiRefObject *)v35, 2u);
    v37 = (char *)TextData3::Get(0xAFF6D637);
    PgWin::SetToolTipWinText((PgWin *)&pkTextWin->vfptr, v37);
    pkTextWin->m_pkToolTipWin = g_pkToolTipWin;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_pkItemTabList,
      (const unsigned int *)&pkTextWin);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "RepurchaseNor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "RepurchaseClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "RepurchaseOver");
    v38 = PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 3u, 0, 0);
    v39 = (PgWinText *)v38;
    v40 = v38->vfptr[130].__vecDelDtor;
    pkTextWin = v39;
    v40((NiRefObject *)&v39->vfptr, 3u);
    v41 = (char *)TextData3::Get(0x2392E3Eu);
    PgWin::SetToolTipWinText((PgWin *)&v39->vfptr, v41);
    v39->m_pkToolTipWin = g_pkToolTipWin;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_pkItemTabList,
      (const unsigned int *)&pkTextWin);
    ((void (__thiscall *)(NPCItemWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    LOBYTE(v54) = 0;
    UIUtil::~UIUtil(&ui);
    v54 = -1;
    if ( spNode.m_pObject )
    {
      v42 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v42 )
          v42->vfptr->__vecDelDtor((NiRefObject *)v42, 1u);
      }
    }
    result = 1;
  }
  else
  {
    LOBYTE(v54) = 0;
    UIUtil::~UIUtil(&ui);
    v54 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0055B790) --------------------------------------------------------
void __thiscall NPCItemWin::OnInvRClick(NPCItemWin *this, unsigned int uiInvIndex)
{
  NPCItemWin *v2; // ebx@1
  ItemShopInvWin *v3; // eax@1
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v4; // ecx@1
  ItemRepurchase *v5; // esi@1
  int v6; // edi@2
  int v7; // esi@2
  int v8; // edi@3
  int v9; // edx@6
  int v10; // esi@9
  int v11; // ebx@9
  int *v12; // eax@11
  int v13; // eax@12
  ItemMoney *v14; // esi@13
  ItemInfo *v15; // eax@13
  GameFrameWork *v16; // esi@16
  NiUnsharedGeometryGroup *v17; // eax@16
  GameFrameWork *v18; // esi@18
  NiUnsharedGeometryGroup *v19; // eax@18
  unsigned int v20; // esi@22
  unsigned __int64 v21; // rax@22
  GameFrameWork *v22; // esi@29
  NiUnsharedGeometryGroup *v23; // eax@29
  CClientGuild *v24; // eax@32
  GameFrameWork *v25; // esi@34
  NiUnsharedGeometryGroup *v26; // eax@34
  unsigned int v27; // edi@36
  GameFrameWork *v28; // ebx@41
  char *v29; // eax@41
  unsigned int v30; // ST20_4@44
  GameFrameWork *v31; // ebx@45
  NiUnsharedGeometryGroup *v32; // eax@45
  signed int i64ReBuyPrice; // [sp+Ch] [bp-Ch]@9
  int i64ReBuyPrice_4; // [sp+10h] [bp-8h]@0
  PgWin *pkCallerWin; // [sp+14h] [bp-4h]@1
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *pkSellInfo; // [sp+20h] [bp+8h]@1

  v2 = this;
  v3 = this->m_apkInvWin[uiInvIndex];
  v4 = v3->m_pkSellInfo;
  v5 = v3->m_pkRepurchaseItem;
  pkCallerWin = (PgWin *)v2;
  pkSellInfo = v4;
  if ( v4 )
  {
    v6 = v4->item;
    v7 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v6) )
    {
      if ( (unsigned __int16)v6 <= *(_WORD *)(v7 + 200) )
      {
        v9 = *(_DWORD *)(v7 + 196);
        if ( *(_DWORD *)(v9 + 4 * v6) )
          v8 = *(_DWORD *)(v9 + 4 * v6);
        else
          v8 = 0;
      }
      else
      {
        v8 = 0;
      }
    }
    else
    {
      v8 = 0;
    }
    v10 = ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;
    v11 = *(_WORD *)v8;
    i64ReBuyPrice = *(_DWORD *)(v8 + 211);
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable
                                                          + 16))(
                            ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable,
                            v11) )
    {
      if ( (unsigned __int16)v11 <= *(_WORD *)(v10 + 200) )
      {
        v12 = (int *)(*(_DWORD *)(v10 + 196) + 4 * v11);
        if ( *v12 )
        {
          v13 = *v12;
          if ( v13 )
          {
            v14 = ItemMoneyTab::GetByInxName((char *)(v13 + 2));
            v15 = ItemMoneyTab::GetItemMoneyInfoByItemInx(v14->IM_ItemIDX);
            if ( v14 && v15 )
            {
              if ( v14->IM_MoneyLot > Inventory::GetItemLot(&g_kInventory, v15->ID) )
              {
                v16 = (GameFrameWork *)pkCallerWin[1].m_pcName;
                v17 = TextData3::Get(0x5083C8E4u);
                GameFrameWork::AddSysMsg(v16, (const char *)v17);
                return;
              }
            }
            else if ( (unsigned int)i64ReBuyPrice > (signed __int64)User::GetMoney(&g_kUser) )
            {
              v18 = (GameFrameWork *)pkCallerWin[1].m_pcName;
              v19 = TextData::Get(0xC1F9E727);
              goto LABEL_19;
            }
            if ( v14 && v14->IM_MoneyLot )
            {
              v20 = *(_DWORD *)(v8 + 106);
              HIDWORD(v21) = 0;
              goto LABEL_36;
            }
          }
        }
      }
    }
    if ( *(_DWORD *)(v8 + 224) )
    {
      v24 = GuildTask::GetGuild();
      if ( v24 )
      {
        v21 = v24->m_iGuildToken / *(_DWORD *)(v8 + 224);
        v20 = v21;
        if ( !v21 )
        {
          v25 = (GameFrameWork *)pkCallerWin[1].m_pcName;
          v26 = TextData2::Get(0xE1FC4A4C);
          GameFrameWork::AddSysMsg(v25, (const char *)v26);
          return;
        }
      }
      else
      {
        HIDWORD(v21) = i64ReBuyPrice_4;
        v20 = i64ReBuyPrice;
      }
      goto LABEL_36;
    }
    if ( !i64ReBuyPrice )
    {
      if ( *(_DWORD *)(v8 + 220) <= 0u )
      {
        if ( *(_DWORD *)(v8 + 228) <= 0u )
          return;
        v21 = User::Coin(&g_kUser) / *(_DWORD *)(v8 + 228);
        v20 = v21;
        if ( !v21 )
        {
          v22 = (GameFrameWork *)pkCallerWin[1].m_pcName;
          v23 = TextData2::Get(0x4B341F27u);
          GameFrameWork::AddSysMsg(v22, (const char *)v23);
          return;
        }
      }
      else
      {
        v20 = *(_DWORD *)(v8 + 106);
        HIDWORD(v21) = 0;
      }
      goto LABEL_36;
    }
    v21 = (signed __int64)User::GetMoney(&g_kUser) / (unsigned int)i64ReBuyPrice;
    v20 = v21;
    if ( v21 )
    {
LABEL_36:
      v27 = *(_DWORD *)(v8 + 106);
      if ( SHIDWORD(v21) >= 0 && (SHIDWORD(v21) > 0 || v20 >= v27) )
        v20 = v27;
      if ( g_pkKeyboard->m_aucKeystate[5] & 4 )
      {
        v28 = (GameFrameWork *)pkCallerWin[1].m_pcName;
        LOWORD(pkCallerWin[2].m_pkParent) = pkSellInfo->item;
        v29 = (char *)TextData::Get(0x4A344943u);
        GameFrameWork::OnOpenDivideWin(v28, pkCallerWin, 9u, v20, v29, 0);
        DivideWin::SetValueToEdit(*((DivideWin **)pkCallerWin[1].m_pcName + 185), 1u);
      }
      else
      {
        GameFrameWork::NcItemBuyReq((GameFrameWork *)pkCallerWin[1].m_pcName, pkSellInfo->item, v20);
      }
      return;
    }
    v18 = (GameFrameWork *)pkCallerWin[1].m_pcName;
    v19 = TextData::Get(0x354F412Fu);
LABEL_19:
    GameFrameWork::AddSysMsg(v18, (const char *)v19);
    return;
  }
  if ( v5 )
  {
    v30 = v5->pItem->m_pkInfo->SellPrice;
    if ( v30 <= (signed __int64)User::GetMoney(&g_kUser) )
    {
      GameFrameWork::NcItemRepurchaseReq((GameFrameWork *)v2->m_pkFrameWork, v5->nHandle);
    }
    else
    {
      v31 = (GameFrameWork *)v2->m_pkFrameWork;
      v32 = TextData::Get(0x304F413Du);
      GameFrameWork::AddSysMsg(v31, (const char *)v32);
    }
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
// A8C298: using guessed type int ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (0055BB00) --------------------------------------------------------
void __thiscall NPCItemWin::OnCommand(NPCItemWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0u:
      NPCItemWin::OnInvLClick(this, lParam);
      break;
    case 1u:
      NPCItemWin::OnInvRClick(this, lParam);
      break;
    case 4u:
      NPCItemWin::OnPrevPage(this);
      break;
    case 5u:
      NPCItemWin::OnNextPage(this);
      break;
    case 7u:
      NPCItemWin::OnCancel(this);
      break;
    case 9u:
      if ( lParam )
        GameFrameWork::NcItemBuyReq((GameFrameWork *)this->m_pkFrameWork, this->m_TargetItemID, lParam);
      break;
    case 0xAu:
      NPCItemWin::OnHelpLink();
      break;
    case 2u:
      NPCItemWin::OnTab(this, (NPCItemWin::PAGETYPE)lParam);
      break;
    case 3u:
      NPCItemWin::OnTab(this, (NPCItemWin::PAGETYPE)lParam);
      break;
    default:
      return;
  }
}

//----- (0055BBC0) --------------------------------------------------------
ItemShopInvWin *__thiscall ItemShopInvWin::`scalar deleting destructor'(ItemShopInvWin *this, unsigned int a2)
{
  ItemShopInvWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ItemShopInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ItemShopInvWin::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 99877C: using guessed type void (__thiscall *ItemShopInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99879C: using guessed type int (__thiscall *ItemShopInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0055BC00) --------------------------------------------------------
NPCItemWin *__thiscall NPCItemWin::`scalar deleting destructor'(NPCItemWin *this, unsigned int a2)
{
  NPCItemWin *v2; // esi@1

  v2 = this;
  NPCItemWin::~NPCItemWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0055BC30) --------------------------------------------------------
ItemInfo *__cdecl ItemMoneyTab::GetItemMoneyInfoByItemInx(char *pcInxName)
{
  unsigned int v1; // edi@3
  char *v2; // eax@5
  ItemInfo *result; // eax@7

  if ( pcInxName && *pcInxName )
  {
    v1 = 0;
    if ( ITableBase<ItemMoney,ItemMoneyTab>::GetTotal() )
    {
      while ( 1 )
      {
        if ( !strcmp(
                CDataReader::GetRecord((CDataReader *)(ITableBase<ItemMoney,ItemMoneyTab>::ms_pkTable + 4), v1),
                pcInxName) )
        {
          v2 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemMoney,ItemMoneyTab>::ms_pkTable + 4), v1);
          if ( v2 )
            break;
        }
        if ( ++v1 >= ITableBase<ItemMoney,ItemMoneyTab>::GetTotal() )
          goto LABEL_7;
      }
      result = ItemInfoTab::GetByInxName(v2 + 32);
    }
    else
    {
LABEL_7:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C140: using guessed type int ITableBase<ItemMoney,ItemMoneyTab>::ms_pkTable;

//----- (0055BCD0) --------------------------------------------------------
void __thiscall NPCSkillInvWin::~NPCSkillInvWin(NPCSkillInvWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&NPCSkillInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&NPCSkillInvWin::`vftable'{for `IDirectMessenger'};
  SkillIcon::~SkillIcon((SkillIcon *)&this->vfptr);
}
// 998E1C: using guessed type void (__thiscall *NPCSkillInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 998E3C: using guessed type int (__thiscall *NPCSkillInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0055BCF0) --------------------------------------------------------
unsigned __int16 __thiscall NPCSkillInvWin::GetSkill(NPCSkillInvWin *this)
{
  return this->m_kSkillID;
}

//----- (0055BD00) --------------------------------------------------------
char __thiscall NPCSkillInvWin::Create(NPCSkillInvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent)
{
  NPCSkillInvWin *v5; // esi@1
  char result; // al@1

  v5 = this;
  result = PgWinLRBut::Create((PgWinLRBut *)&this->vfptr, iXPos, iYPos, 0x20u, 0x20u, pkParent, 0, 0);
  if ( result )
  {
    v5->m_uiInvIndex = uiInvIndex;
    result = 1;
  }
  return result;
}

//----- (0055BD40) --------------------------------------------------------
void __thiscall NPCSkillInvWin::OnFirstHitWin(NPCSkillInvWin *this)
{
  NPCSkillInvWin *v1; // esi@1
  int v2; // edx@1
  SkillInfoWin *v3; // ecx@2
  unsigned int v4; // eax@3

  v1 = this;
  v2 = this->m_kSkillID;
  if ( (_WORD)v2 != -1 )
  {
    v3 = (SkillInfoWin *)this->m_pkToolTipWin;
    if ( v3 )
    {
      v4 = v1->m_uiSkillType;
      if ( v4 )
      {
        if ( v4 == 1 )
          SkillInfoWin::SetPassiveSkillBuyInfo(v3, v2, v1->m_uiPrice);
        PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
      }
      else
      {
        SkillInfoWin::SetSkillBuyInfo(v3, v2, v1->m_uiPrice);
        PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
      }
    }
  }
}

//----- (0055BDC0) --------------------------------------------------------
void NPCSkillWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "NPCSkill");
}

//----- (0055BDF0) --------------------------------------------------------
unsigned int __thiscall NPCSkillWin::GetSellItemNum(NPCSkillWin *this)
{
  unsigned int v1; // edx@1
  unsigned int result; // eax@1
  unsigned int v3; // ecx@2
  unsigned int v4; // ecx@15

  v1 = this->m_uiCurSkillType;
  result = 0;
  if ( v1 )
  {
    if ( v1 == 1 )
    {
      v4 = this->m_uiCurPageType;
      if ( v4 )
      {
        switch ( v4 )
        {
          case 1u:
            result = Market::GetTotalClePassiveSkill();
            break;
          case 2u:
            result = Market::GetTotalArcPassiveSkill();
            break;
          case 3u:
            result = Market::GetTotalMagPassiveSkill();
            break;
          case 4u:
            result = Market::GetTotalJokPassiveSkill();
            break;
          case 5u:
            result = Market::GetTotalSenPassiveSkill();
            break;
        }
      }
      else
      {
        result = Market::GetTotalFigPassiveSkill();
      }
    }
    else if ( v1 == 2 )
    {
      result = Market::GetTotalProdSkill();
    }
  }
  else
  {
    v3 = this->m_uiCurPageType;
    if ( v3 )
    {
      switch ( v3 )
      {
        case 1u:
          result = Market::GetTotalCleActiveSkill();
          break;
        case 2u:
          result = Market::GetTotalArcActiveSkill();
          break;
        case 3u:
          result = Market::GetTotalMagActiveSkill();
          break;
        case 4u:
          result = Market::GetTotalJokActiveSkill();
          break;
        case 5u:
          result = Market::GetTotalSenActiveSkill();
          break;
      }
    }
    else
    {
      result = Market::GetTotalFigActiveSkill();
    }
  }
  return result;
}

//----- (0055BE90) --------------------------------------------------------
unsigned int __thiscall NPCSkillWin::GetMaxPageNum(NPCSkillWin *this)
{
  unsigned int v1; // eax@1
  unsigned int result; // eax@2

  v1 = NPCSkillWin::GetSellItemNum(this);
  if ( v1 )
    result = (v1 - 1) / 0x24 + 1;
  else
    result = 1;
  return result;
}

//----- (0055BEB0) --------------------------------------------------------
NPCSkillInvWin *__thiscall NPCSkillWin::GetInvWin(NPCSkillWin *this, unsigned int uiIndex)
{
  NPCSkillInvWin *result; // eax@2

  if ( uiIndex < 0x24 )
    result = this->m_apkInvWin[uiIndex];
  else
    result = 0;
  return result;
}

//----- (0055BED0) --------------------------------------------------------
void __thiscall NPCSkillWin::~NPCSkillWin(NPCSkillWin *this)
{
  NPCSkillWin *v1; // esi@1
  NiD3DPass *v2; // ecx@1
  bool v3; // zf@2
  NiTexture *v4; // edi@4

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&NPCSkillWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&NPCSkillWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spPassOne.m_pObject;
  if ( v2 )
  {
    v3 = v2->m_uiRefCount-- == 1;
    if ( v3 )
      NiD3DPass::ReturnPassToPool(v2);
  }
  v4 = v1->m_spGrayTexture.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9990A8: using guessed type void (__thiscall *NPCSkillWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9990C4: using guessed type int (__thiscall *NPCSkillWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0055BF70) --------------------------------------------------------
void __thiscall NPCSkillWin::OnOk(NPCSkillWin *this)
{
  GameFrameWork::CloseSkillShopMenu((GameFrameWork *)this->m_pkFrameWork);
}

//----- (0055BF80) --------------------------------------------------------
void __thiscall NPCSkillWin::OnCancel(NPCSkillWin *this)
{
  GameFrameWork::CloseSkillShopMenu((GameFrameWork *)this->m_pkFrameWork);
}

//----- (0055BF90) --------------------------------------------------------
void __thiscall NPCSkillWin::UpdatePageInfo(NPCSkillWin *this)
{
  NPCSkillWin *v1; // esi@1
  unsigned int v2; // eax@2
  unsigned int v3; // edx@3
  NiRefObjectVtbl *v4; // edi@5
  char *v5; // eax@5

  v1 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[65].__vecDelDtor)() )
  {
    v2 = NPCSkillWin::GetSellItemNum(v1);
    if ( v2 )
      v3 = (v2 - 1) / 0x24 + 1;
    else
      v3 = 1;
    v4 = v1->m_pkPageText->vfptr;
    v5 = fs("%d / %d", v1->m_uiCurPage + 1, v3);
    v4[118].__vecDelDtor((NiRefObject *)v1->m_pkPageText, (unsigned int)v5);
  }
}

//----- (0055BFF0) --------------------------------------------------------
void __thiscall NPCSkillInvWin::DoAction(NPCSkillInvWin *this)
{
  NPCSkillInvWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiInvIndex);
}

//----- (0055C020) --------------------------------------------------------
void __thiscall NPCSkillInvWin::DoRAction(NPCSkillInvWin *this)
{
  NPCSkillInvWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiRCmdMsg, v1->m_uiInvIndex);
}

//----- (0055C050) --------------------------------------------------------
void __thiscall NPCSkillWin::NPCSkillWin(NPCSkillWin *this)
{
  NPCSkillWin *v1; // esi@1
  NiTexture *v2; // ebx@1
  NiD3DPass *v3; // ecx@6
  bool v4; // zf@7

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&NPCSkillWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&NPCSkillWin::`vftable'{for `IDirectMessenger'};
  v1->m_spGrayTexture.m_pObject = 0;
  v1->m_spPassOne.m_pObject = 0;
  v1->m_apkInvWin[0] = 0;
  v1->m_apkInvWin[1] = 0;
  v1->m_apkInvWin[2] = 0;
  v1->m_apkInvWin[3] = 0;
  v1->m_apkInvWin[4] = 0;
  v1->m_apkInvWin[5] = 0;
  v1->m_apkInvWin[6] = 0;
  v1->m_apkInvWin[7] = 0;
  v1->m_apkInvWin[8] = 0;
  v1->m_apkInvWin[9] = 0;
  v1->m_apkInvWin[10] = 0;
  v1->m_apkInvWin[11] = 0;
  v1->m_apkInvWin[12] = 0;
  v1->m_apkInvWin[13] = 0;
  v1->m_apkInvWin[14] = 0;
  v1->m_apkInvWin[15] = 0;
  v1->m_apkInvWin[16] = 0;
  v1->m_apkInvWin[17] = 0;
  v1->m_apkInvWin[18] = 0;
  v1->m_apkInvWin[19] = 0;
  v1->m_apkInvWin[20] = 0;
  v1->m_apkInvWin[21] = 0;
  v1->m_apkInvWin[22] = 0;
  v1->m_apkInvWin[23] = 0;
  v1->m_apkInvWin[24] = 0;
  v1->m_apkInvWin[25] = 0;
  v1->m_apkInvWin[26] = 0;
  v1->m_apkInvWin[27] = 0;
  v1->m_apkInvWin[28] = 0;
  v1->m_apkInvWin[29] = 0;
  v1->m_apkInvWin[30] = 0;
  v1->m_apkInvWin[31] = 0;
  v1->m_apkInvWin[32] = 0;
  v1->m_apkInvWin[33] = 0;
  v1->m_apkInvWin[34] = 0;
  v1->m_apkInvWin[35] = 0;
  v1->m_pkInfoWin = 0;
  v1->m_uiCurPageType = 0;
  v1->m_uiCurPage = 0;
  v1->m_uiCurSkillType = 0;
  v2 = v1->m_spGrayTexture.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spGrayTexture.m_pObject = 0;
  }
  v3 = v1->m_spPassOne.m_pObject;
  if ( v3 )
  {
    v4 = v3->m_uiRefCount-- == 1;
    if ( v4 )
      NiD3DPass::ReturnPassToPool(v3);
    v1->m_spPassOne.m_pObject = 0;
  }
  v1->m_pkPageText = 0;
}
// 9990A8: using guessed type void (__thiscall *NPCSkillWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9990C4: using guessed type int (__thiscall *NPCSkillWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0055C200) --------------------------------------------------------
void __thiscall NPCSkillWin::OnInvRClick(NPCSkillWin *this, unsigned int uiInvIndex)
{
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v2; // ebx@1
  int v3; // esi@2
  int v4; // edi@2
  int *v5; // eax@4
  int v6; // eax@5
  unsigned int v7; // edi@6
  GameFrameWork *v8; // esi@7
  NiUnsharedGeometryGroup *v9; // eax@7
  NPCSkillWin *v10; // [sp+4h] [bp-4h]@1

  v10 = this;
  v2 = this->m_apkInvWin[uiInvIndex]->m_pkSellInfo;
  if ( v2 )
  {
    v3 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    v4 = v2->item;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v4) )
    {
      if ( (unsigned __int16)v4 <= *(_WORD *)(v3 + 200) )
      {
        v5 = (int *)(*(_DWORD *)(v3 + 196) + 4 * v4);
        if ( *v5 )
        {
          v6 = *v5;
          if ( v6 )
          {
            v7 = *(_DWORD *)(v6 + 211);
            if ( v7 <= (signed __int64)User::GetMoney(&g_kUser) )
            {
              GameFrameWork::NcItemBuyReq((GameFrameWork *)v10->m_pkFrameWork, v2->item, 1u);
            }
            else
            {
              v8 = (GameFrameWork *)v10->m_pkFrameWork;
              v9 = TextData::Get(0x5B531F00u);
              GameFrameWork::AddSysMsg(v8, (const char *)v9);
            }
          }
        }
      }
    }
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0055C2D0) --------------------------------------------------------
void __thiscall NPCSkillInvWin::SetItem(NPCSkillInvWin *this, PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *pkInfo)
{
  NPCSkillInvWin *v2; // esi@1
  void *(__thiscall *v3)(NiRefObject *, unsigned int); // edx@2
  int v4; // ebx@3
  int v5; // edi@3
  int *v6; // eax@5
  int v7; // ebx@6
  ActiveSkillViewInfo *v8; // eax@7
  ActiveSkillViewInfo *v9; // edi@7
  float v10; // ST0C_4@8
  float green; // ST08_4@8
  float rad; // ST04_4@8
  float v13; // ST08_4@8
  NiSourceTexture *v14; // eax@8
  void *(__thiscall *v15)(NiRefObject *, unsigned int); // eax@8
  int v16; // eax@8
  int v17; // eax@8
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *pkInfoa; // [sp+28h] [bp+8h]@8

  v2 = this;
  this->m_pkSellInfo = pkInfo;
  if ( pkInfo )
  {
    v4 = pkInfo->item;
    v5 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v4) )
    {
      if ( (unsigned __int16)v4 <= *(_WORD *)(v5 + 200) )
      {
        v6 = (int *)(*(_DWORD *)(v5 + 196) + 4 * v4);
        if ( *v6 )
        {
          v7 = *v6;
          if ( *v6 )
          {
            v8 = ActSkillViewInfoTab::GetByInxName((char *)(v7 + 2));
            v9 = v8;
            if ( v8 )
            {
              rad = (double)v8->R;
              green = (double)v8->G;
              v10 = (double)v8->B;
              SkillIcon::SetBackPlaneColor((SkillIcon *)&v2->vfptr, rad, green, v10, 255.0);
              SkillIcon::SetTopPlaneColor((SkillIcon *)&v2->vfptr, 255.0, 0.0, 0.0, 0.0);
              v13 = *(float *)&v9->IconIndex;
              pkInfoa = (PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *)v2->vfptr;
              v14 = IconMgr::GetTexture(v9->IconFile);
              (*(void (__thiscall **)(NPCSkillInvWin *, NiSourceTexture *, _DWORD, signed int, signed int))((char *)&pkInfoa[194].item + 1))(
                v2,
                v14,
                LODWORD(v13),
                32,
                32);
              v15 = v2->vfptr[60].__vecDelDtor;
              v2->m_uFlags &= 0xFFFEu;
              v15((NiRefObject *)&v2->vfptr, 1u);
              v2->m_kSkillID = v9->ID;
              v2->m_uiPrice = *(_DWORD *)(v7 + 211);
              Singleton<Tutorial>::getInstance();
              v2->vfptr[60].__vecDelDtor((NiRefObject *)v2, *(_BYTE *)(v16 + 13) == 0);
              Singleton<Tutorial>::getInstance();
              IconWin::IconDisable((IconWin *)&v2->vfptr, *(_BYTE *)(v17 + 13));
            }
          }
        }
      }
    }
  }
  else
  {
    ((void (__stdcall *)(_DWORD, signed int, signed int, signed int))this->vfptr[146].__vecDelDtor)(0, -1, 32, 32);
    v3 = v2->vfptr[60].__vecDelDtor;
    v2->m_uFlags |= 1u;
    v3((NiRefObject *)&v2->vfptr, 0);
    v2->m_kSkillID = -1;
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0055C480) --------------------------------------------------------
void __thiscall NPCSkillInvWin::SetItem(NPCSkillInvWin *this, PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *pkInfo, unsigned int uiSkillType)
{
  NPCSkillInvWin *v3; // esi@1
  int v4; // eax@2
  int v5; // edi@3
  int v6; // ebx@3
  ItemInfo **v7; // eax@5
  ItemInfo *v8; // ebx@6
  ActiveSkillViewInfo *v9; // eax@8
  ActiveSkillViewInfo *v10; // edi@8
  float v11; // ST0C_4@9
  float green; // ST08_4@9
  float rad; // ST04_4@9
  float v14; // ST08_4@9
  NiSourceTexture *v15; // eax@9
  unsigned __int16 v16; // ax@9
  PassiveSkillViewInfo *v17; // eax@13
  PassiveSkillViewInfo *v18; // edi@13
  float v19; // ST0C_4@14
  float v20; // ST08_4@14
  float v21; // ST04_4@14
  NiRefObjectVtbl *v22; // ebx@14
  float v23; // ST08_4@14
  NiSourceTexture *v24; // eax@14
  unsigned __int16 v25; // ax@14
  NiRefObjectVtbl *v26; // eax@18
  int v27; // eax@18
  int v28; // eax@18
  void *(__thiscall *v29)(NiRefObject *, unsigned int); // eax@20
  ItemInfo *pkItemInfo; // [sp+2Ch] [bp+8h]@6
  ItemInfo *pkItemInfoa; // [sp+2Ch] [bp+8h]@9

  v3 = this;
  this->m_pkSellInfo = pkInfo;
  if ( !pkInfo || (v4 = pkInfo->item, (_WORD)v4 == -1) )
  {
    ((void (__thiscall *)(NPCSkillInvWin *, _DWORD, signed int, signed int, signed int))this->vfptr[146].__vecDelDtor)(
      this,
      0,
      -1,
      32,
      32);
    v29 = v3->vfptr[60].__vecDelDtor;
    v3->m_uFlags |= 1u;
    v29((NiRefObject *)&v3->vfptr, 0);
    v3->m_kSkillID = -1;
    return;
  }
  v5 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  v6 = pkInfo->item;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                          ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                          v4) )
  {
    if ( (unsigned __int16)v6 <= *(_WORD *)(v5 + 200) )
    {
      v7 = (ItemInfo **)(*(_DWORD *)(v5 + 196) + 4 * v6);
      if ( *v7 )
      {
        v8 = *v7;
        pkItemInfo = *v7;
        if ( *v7 )
        {
          if ( uiSkillType )
          {
            if ( uiSkillType == 1 )
            {
              v17 = PasSkillViewInfoTab::GetByInxName(v8->InxName);
              v18 = v17;
              if ( !v17 )
                return;
              v21 = (double)v17->R;
              v20 = (double)v17->G;
              v19 = (double)v17->B;
              SkillIcon::SetBackPlaneColor((SkillIcon *)&v3->vfptr, v21, v20, v19, 255.0);
              SkillIcon::SetTopPlaneColor((SkillIcon *)&v3->vfptr, 255.0, 0.0, 0.0, 0.0);
              v22 = v3->vfptr;
              v23 = *(float *)&v18->Icon;
              v24 = IconMgr::GetTexture(v18->IconFile);
              ((void (__thiscall *)(NPCSkillInvWin *, NiSourceTexture *, _DWORD, signed int, signed int))v22[146].__vecDelDtor)(
                v3,
                v24,
                LODWORD(v23),
                32,
                32);
              v25 = v18->ID;
              v3->m_kSkillID = v18->ID;
              if ( v25 < 0x4E20u )
                SkillIcon::UsingSkillAlphaProperty((SkillIcon *)&v3->vfptr);
              else
                SkillIcon::UsingItemAlphaProperty((SkillIcon *)&v3->vfptr);
              v8 = pkItemInfo;
            }
          }
          else
          {
            v9 = ActSkillViewInfoTab::GetByInxName(v8->InxName);
            v10 = v9;
            if ( !v9 )
              return;
            rad = (double)v9->R;
            green = (double)v9->G;
            v11 = (double)v9->B;
            SkillIcon::SetBackPlaneColor((SkillIcon *)&v3->vfptr, rad, green, v11, 255.0);
            SkillIcon::SetTopPlaneColor((SkillIcon *)&v3->vfptr, 255.0, 0.0, 0.0, 0.0);
            v14 = *(float *)&v10->IconIndex;
            pkItemInfoa = (ItemInfo *)v3->vfptr;
            v15 = IconMgr::GetTexture(v10->IconFile);
            (*(void (__thiscall **)(NPCSkillInvWin *, NiSourceTexture *, _DWORD, signed int, signed int))((char *)&pkItemInfoa[1].CrlTB + 3))(
              v3,
              v15,
              LODWORD(v14),
              32,
              32);
            v16 = v10->ID;
            v3->m_kSkillID = v10->ID;
            if ( v16 < 0x4E20u )
              SkillIcon::UsingSkillAlphaProperty((SkillIcon *)&v3->vfptr);
            else
              SkillIcon::UsingItemAlphaProperty((SkillIcon *)&v3->vfptr);
          }
          v26 = v3->vfptr;
          v3->m_uFlags &= 0xFFFEu;
          v26[60].__vecDelDtor((NiRefObject *)v3, 1u);
          v3->m_uiPrice = v8->BuyPrice;
          v3->m_uiSkillType = uiSkillType;
          Singleton<Tutorial>::getInstance();
          v3->vfptr[60].__vecDelDtor((NiRefObject *)v3, *(_BYTE *)(v27 + 13) == 0);
          Singleton<Tutorial>::getInstance();
          IconWin::IconDisable((IconWin *)&v3->vfptr, *(_BYTE *)(v28 + 13));
        }
      }
    }
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0055C750) --------------------------------------------------------
void __thiscall NPCSkillInvWin::SetItem(NPCSkillInvWin *this, PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *pkInfo, unsigned int uiSkillType, NiTexture *pkTexture, NiD3DPass *pkD3DPass)
{
  NPCSkillInvWin *v5; // esi@1
  int v6; // eax@2
  int v7; // edi@3
  int v8; // ebx@3
  ItemInfo **v9; // eax@5
  ItemInfo *v10; // eax@6
  ActiveSkillViewInfo *v11; // eax@8
  ActiveSkillViewInfo *v12; // edi@8
  float v13; // ST1C_4@9
  float green; // ST18_4@9
  float rad; // ST14_4@9
  NiRefObjectVtbl *v16; // ebx@9
  float v17; // ST18_4@9
  NiSourceTexture *v18; // eax@9
  int v19; // eax@9
  double v20; // st7@12
  double v21; // st7@15
  PassiveSkillViewInfo *v22; // eax@17
  PassiveSkillViewInfo *v23; // edi@17
  float v24; // ST1C_4@18
  float v25; // ST18_4@18
  float v26; // ST14_4@18
  NiRefObjectVtbl *v27; // ebx@18
  float v28; // ST18_4@18
  NiSourceTexture *v29; // eax@18
  int v30; // eax@18
  float alpha; // ST20_4@22
  float v32; // ST20_4@27
  void *(__thiscall *v33)(NiRefObject *, unsigned int); // eax@29
  int v34; // eax@29
  int v35; // eax@29
  void *(__thiscall *v36)(NiRefObject *, unsigned int); // eax@31
  ItemInfo *pkItemInfo; // [sp+3Ch] [bp+8h]@6

  v5 = this;
  this->m_pkSellInfo = pkInfo;
  if ( !pkInfo || (v6 = pkInfo->item, (_WORD)v6 == -1) )
  {
    ((void (__thiscall *)(NPCSkillInvWin *, _DWORD, signed int, signed int, signed int))this->vfptr[146].__vecDelDtor)(
      this,
      0,
      -1,
      32,
      32);
    v36 = v5->vfptr[60].__vecDelDtor;
    v5->m_uFlags |= 1u;
    v36((NiRefObject *)&v5->vfptr, 0);
    v5->m_kSkillID = -1;
    return;
  }
  v7 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  v8 = pkInfo->item;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                          ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                          v6) )
  {
    if ( (unsigned __int16)v8 <= *(_WORD *)(v7 + 200) )
    {
      v9 = (ItemInfo **)(*(_DWORD *)(v7 + 196) + 4 * v8);
      if ( *v9 )
      {
        v10 = *v9;
        pkItemInfo = v10;
        if ( v10 )
        {
          if ( uiSkillType )
          {
            if ( uiSkillType != 1 )
            {
LABEL_29:
              v33 = v5->vfptr[60].__vecDelDtor;
              v5->m_uFlags &= 0xFFFEu;
              v33((NiRefObject *)&v5->vfptr, 1u);
              v5->m_uiPrice = pkItemInfo->BuyPrice;
              v5->m_uiSkillType = uiSkillType;
              Singleton<Tutorial>::getInstance();
              v5->vfptr[60].__vecDelDtor((NiRefObject *)v5, *(_BYTE *)(v34 + 13) == 0);
              Singleton<Tutorial>::getInstance();
              IconWin::IconDisable((IconWin *)&v5->vfptr, *(_BYTE *)(v35 + 13));
              return;
            }
            v22 = PasSkillViewInfoTab::GetByInxName(v10->InxName);
            v23 = v22;
            if ( !v22 )
              return;
            v26 = (double)v22->R;
            v25 = (double)v22->G;
            v24 = (double)v22->B;
            SkillIcon::SetBackPlaneColor((SkillIcon *)&v5->vfptr, v26, v25, v24, 255.0);
            SkillIcon::SetTopPlaneColor((SkillIcon *)&v5->vfptr, 255.0, 0.0, 0.0, 0.0);
            v27 = v5->vfptr;
            v28 = *(float *)&v23->Icon;
            v29 = IconMgr::GetTexture(v23->IconFile);
            ((void (__thiscall *)(NPCSkillInvWin *, NiSourceTexture *, _DWORD, signed int, signed int))v27[146].__vecDelDtor)(
              v5,
              v29,
              LODWORD(v28),
              32,
              32);
            v30 = v23->ID;
            v5->m_kSkillID = v30;
            if ( (unsigned __int16)v30 >= 0x4E20u )
            {
              if ( !Skill::IsLearnProdSkill(v30) && !Skill::IsLearnPassiveSkill(v5->m_kSkillID) )
                goto LABEL_23;
              SkillIcon::SetBackPlaneColor((SkillIcon *)&v5->vfptr, 175.0, 175.0, 175.0, 155.0);
              v20 = 155.0;
              goto LABEL_22;
            }
            if ( Skill::IsLearnProdSkill(v30) || Skill::IsLearnPassiveSkill(v5->m_kSkillID) )
            {
              SkillIcon::SetBackPlaneColor((SkillIcon *)&v5->vfptr, 175.0, 175.0, 175.0, 155.0);
              v21 = 155.0;
              goto LABEL_27;
            }
          }
          else
          {
            v11 = ActSkillViewInfoTab::GetByInxName(v10->InxName);
            v12 = v11;
            if ( !v11 )
              return;
            rad = (double)v11->R;
            green = (double)v11->G;
            v13 = (double)v11->B;
            SkillIcon::SetBackPlaneColor((SkillIcon *)&v5->vfptr, rad, green, v13, 255.0);
            SkillIcon::SetTopPlaneColor((SkillIcon *)&v5->vfptr, 255.0, 0.0, 0.0, 0.0);
            v16 = v5->vfptr;
            v17 = *(float *)&v12->IconIndex;
            v18 = IconMgr::GetTexture(v12->IconFile);
            ((void (__thiscall *)(NPCSkillInvWin *, NiSourceTexture *, _DWORD, signed int, signed int))v16[146].__vecDelDtor)(
              v5,
              v18,
              LODWORD(v17),
              32,
              32);
            v19 = v12->ID;
            v5->m_kSkillID = v19;
            if ( (unsigned __int16)v19 >= 0x4E20u )
            {
              if ( !Skill::IsLearnProdSkill(v19) && !Skill::IsLearnSkill(v5->m_kSkillID) )
                goto LABEL_23;
              SkillIcon::SetBackPlaneColor((SkillIcon *)&v5->vfptr, 175.0, 175.0, 175.0, 160.0);
              v20 = 160.0;
LABEL_22:
              alpha = v20;
              SkillIcon::SetTopPlaneColor((SkillIcon *)&v5->vfptr, 175.0, 175.0, 175.0, alpha);
LABEL_23:
              SkillIcon::UsingItemAlphaProperty((SkillIcon *)&v5->vfptr);
              goto LABEL_29;
            }
            if ( Skill::IsLearnProdSkill(v19) || Skill::IsLearnSkill(v5->m_kSkillID) )
            {
              SkillIcon::SetBackPlaneColor((SkillIcon *)&v5->vfptr, 175.0, 175.0, 175.0, 160.0);
              v21 = 160.0;
LABEL_27:
              v32 = v21;
              SkillIcon::SetTopPlaneColor((SkillIcon *)&v5->vfptr, 175.0, 175.0, 175.0, v32);
              goto LABEL_28;
            }
          }
LABEL_28:
          SkillIcon::UsingSkillAlphaProperty((SkillIcon *)&v5->vfptr);
          goto LABEL_29;
        }
      }
    }
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0055CB80) --------------------------------------------------------
void __thiscall NPCSkillWin::ResetContents(NPCSkillWin *this)
{
  NPCSkillWin *v1; // esi@1
  NPCSkillInvWin **v2; // ebx@1
  int v3; // edi@3
  void (__thiscall *v4)(int, _DWORD, signed int, signed int, signed int); // eax@4
  void (__thiscall *v5)(int, _DWORD); // eax@4
  unsigned int v6; // eax@6
  unsigned int v7; // edi@6
  unsigned int v8; // eax@7
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v9; // eax@11
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v10; // eax@17
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v11; // eax@23
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v12; // eax@29
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v13; // eax@35
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v14; // eax@41
  unsigned int v15; // eax@44
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v16; // eax@48
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v17; // eax@54
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v18; // eax@60
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v19; // eax@66
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v20; // eax@72
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v21; // eax@78
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v22; // eax@84
  unsigned int v23; // eax@86
  unsigned int v24; // edx@87
  NiRefObjectVtbl *v25; // edi@89
  char *v26; // eax@89
  signed int v27; // [sp+8h] [bp-8h]@2
  unsigned int v28; // [sp+8h] [bp-8h]@9
  unsigned int v29; // [sp+8h] [bp-8h]@15
  unsigned int v30; // [sp+8h] [bp-8h]@21
  unsigned int v31; // [sp+8h] [bp-8h]@27
  unsigned int v32; // [sp+8h] [bp-8h]@33
  unsigned int v33; // [sp+8h] [bp-8h]@39
  unsigned int v34; // [sp+8h] [bp-8h]@46
  unsigned int v35; // [sp+8h] [bp-8h]@52
  unsigned int v36; // [sp+8h] [bp-8h]@58
  unsigned int v37; // [sp+8h] [bp-8h]@64
  unsigned int v38; // [sp+8h] [bp-8h]@70
  unsigned int v39; // [sp+8h] [bp-8h]@76
  unsigned int v40; // [sp+8h] [bp-8h]@82
  char *uiTotal; // [sp+Ch] [bp-4h]@2
  unsigned int uiTotala; // [sp+Ch] [bp-4h]@8
  unsigned int uiTotalb; // [sp+Ch] [bp-4h]@14
  unsigned int uiTotalc; // [sp+Ch] [bp-4h]@20
  unsigned int uiTotald; // [sp+Ch] [bp-4h]@26
  unsigned int uiTotale; // [sp+Ch] [bp-4h]@32
  unsigned int uiTotalf; // [sp+Ch] [bp-4h]@38
  unsigned int uiTotalg; // [sp+Ch] [bp-4h]@45
  unsigned int uiTotalh; // [sp+Ch] [bp-4h]@51
  unsigned int uiTotali; // [sp+Ch] [bp-4h]@57
  unsigned int uiTotalj; // [sp+Ch] [bp-4h]@63
  unsigned int uiTotalk; // [sp+Ch] [bp-4h]@69
  unsigned int uiTotall; // [sp+Ch] [bp-4h]@75
  unsigned int uiTotalm; // [sp+Ch] [bp-4h]@81

  v1 = this;
  v2 = this->m_apkInvWin;
  if ( this->m_apkInvWin[0] )
  {
    uiTotal = (char *)this->m_apkInvWin;
    v27 = 36;
    do
    {
      v3 = *(_DWORD *)uiTotal;
      if ( *(_DWORD *)uiTotal )
      {
        v4 = *(void (__thiscall **)(int, _DWORD, signed int, signed int, signed int))(*(_DWORD *)v3 + 584);
        *(_DWORD *)(v3 + 420) = 0;
        v4(v3, 0, -1, 32, 32);
        v5 = *(void (__thiscall **)(int, _DWORD))(*(_DWORD *)v3 + 240);
        *(_WORD *)(v3 + 28) |= 1u;
        v5(v3, 0);
        *(_WORD *)(v3 + 424) = -1;
      }
      uiTotal += 4;
      --v27;
    }
    while ( v27 );
    v6 = v1->m_uiCurSkillType;
    v7 = 36 * v1->m_uiCurPage;
    if ( v6 )
    {
      if ( v6 == 1 )
      {
        v15 = v1->m_uiCurPageType;
        if ( v15 )
        {
          switch ( v15 )
          {
            case 1u:
              uiTotalh = Market::GetTotalClePassiveSkill();
              if ( v7 < uiTotalh )
              {
                v35 = 0;
                do
                {
                  if ( v35 >= 0x24 )
                    break;
                  v17 = Market::GetClePasSkill(v7);
                  NPCSkillInvWin::SetItem(*v2, v17, 1u, v1->m_spGrayTexture.m_pObject, v1->m_spPassOne.m_pObject);
                  ++v35;
                  ++v7;
                  ++v2;
                }
                while ( v7 < uiTotalh );
              }
              break;
            case 2u:
              uiTotali = Market::GetTotalArcPassiveSkill();
              if ( v7 < uiTotali )
              {
                v36 = 0;
                do
                {
                  if ( v36 >= 0x24 )
                    break;
                  v18 = Market::GetArcPasSkill(v7);
                  NPCSkillInvWin::SetItem(*v2, v18, 1u, v1->m_spGrayTexture.m_pObject, v1->m_spPassOne.m_pObject);
                  ++v36;
                  ++v7;
                  ++v2;
                }
                while ( v7 < uiTotali );
              }
              break;
            case 3u:
              uiTotalj = Market::GetTotalMagPassiveSkill();
              if ( v7 < uiTotalj )
              {
                v37 = 0;
                do
                {
                  if ( v37 >= 0x24 )
                    break;
                  v19 = Market::GetMagPasSkill(v7);
                  NPCSkillInvWin::SetItem(*v2, v19, 1u, v1->m_spGrayTexture.m_pObject, v1->m_spPassOne.m_pObject);
                  ++v37;
                  ++v7;
                  ++v2;
                }
                while ( v7 < uiTotalj );
              }
              break;
            case 4u:
              uiTotalk = Market::GetTotalJokPassiveSkill();
              if ( v7 < uiTotalk )
              {
                v38 = 0;
                do
                {
                  if ( v38 >= 0x24 )
                    break;
                  v20 = Market::GetJokPasSkill(v7);
                  NPCSkillInvWin::SetItem(*v2, v20, 1u, v1->m_spGrayTexture.m_pObject, v1->m_spPassOne.m_pObject);
                  ++v38;
                  ++v7;
                  ++v2;
                }
                while ( v7 < uiTotalk );
              }
              break;
            case 5u:
              uiTotall = Market::GetTotalSenPassiveSkill();
              if ( v7 < uiTotall )
              {
                v39 = 0;
                do
                {
                  if ( v39 >= 0x24 )
                    break;
                  v21 = Market::GetSenPasSkill(v7);
                  NPCSkillInvWin::SetItem(*v2, v21, 1u, v1->m_spGrayTexture.m_pObject, v1->m_spPassOne.m_pObject);
                  ++v39;
                  ++v7;
                  ++v2;
                }
                while ( v7 < uiTotall );
              }
              break;
          }
        }
        else
        {
          uiTotalg = Market::GetTotalFigPassiveSkill();
          if ( v7 < uiTotalg )
          {
            v34 = 0;
            do
            {
              if ( v34 >= 0x24 )
                break;
              v16 = Market::GetFigPasSkill(v7);
              NPCSkillInvWin::SetItem(*v2, v16, 1u, v1->m_spGrayTexture.m_pObject, v1->m_spPassOne.m_pObject);
              ++v34;
              ++v7;
              ++v2;
            }
            while ( v7 < uiTotalg );
          }
        }
      }
      else if ( v6 == 2 )
      {
        uiTotalm = Market::GetTotalProdSkill();
        if ( v7 < uiTotalm )
        {
          v40 = 0;
          do
          {
            if ( v40 >= 0x24 )
              break;
            v22 = Market::GetProdSkill(v7);
            NPCSkillInvWin::SetItem(*v2, v22, 0, v1->m_spGrayTexture.m_pObject, v1->m_spPassOne.m_pObject);
            ++v40;
            ++v7;
            ++v2;
          }
          while ( v7 < uiTotalm );
        }
      }
    }
    else
    {
      v8 = v1->m_uiCurPageType;
      if ( v8 )
      {
        switch ( v8 )
        {
          case 1u:
            uiTotalb = Market::GetTotalCleActiveSkill();
            if ( v7 < uiTotalb )
            {
              v29 = 0;
              do
              {
                if ( v29 >= 0x24 )
                  break;
                v10 = Market::GetCleActSkill(v7);
                NPCSkillInvWin::SetItem(*v2, v10, 0, v1->m_spGrayTexture.m_pObject, v1->m_spPassOne.m_pObject);
                ++v29;
                ++v7;
                ++v2;
              }
              while ( v7 < uiTotalb );
            }
            break;
          case 2u:
            uiTotalc = Market::GetTotalArcActiveSkill();
            if ( v7 < uiTotalc )
            {
              v30 = 0;
              do
              {
                if ( v30 >= 0x24 )
                  break;
                v11 = Market::GetArcActSkill(v7);
                NPCSkillInvWin::SetItem(*v2, v11, 0, v1->m_spGrayTexture.m_pObject, v1->m_spPassOne.m_pObject);
                ++v30;
                ++v7;
                ++v2;
              }
              while ( v7 < uiTotalc );
            }
            break;
          case 3u:
            uiTotald = Market::GetTotalMagActiveSkill();
            if ( v7 < uiTotald )
            {
              v31 = 0;
              do
              {
                if ( v31 >= 0x24 )
                  break;
                v12 = Market::GetMagActSkill(v7);
                NPCSkillInvWin::SetItem(*v2, v12, 0, v1->m_spGrayTexture.m_pObject, v1->m_spPassOne.m_pObject);
                ++v31;
                ++v7;
                ++v2;
              }
              while ( v7 < uiTotald );
            }
            break;
          case 4u:
            uiTotale = Market::GetTotalJokActiveSkill();
            if ( v7 < uiTotale )
            {
              v32 = 0;
              do
              {
                if ( v32 >= 0x24 )
                  break;
                v13 = Market::GetJokActSkill(v7);
                NPCSkillInvWin::SetItem(*v2, v13, 0, v1->m_spGrayTexture.m_pObject, v1->m_spPassOne.m_pObject);
                ++v32;
                ++v7;
                ++v2;
              }
              while ( v7 < uiTotale );
            }
            break;
          case 5u:
            uiTotalf = Market::GetTotalSenActiveSkill();
            if ( v7 < uiTotalf )
            {
              v33 = 0;
              do
              {
                if ( v33 >= 0x24 )
                  break;
                v14 = Market::GetSenActSkill(v7);
                NPCSkillInvWin::SetItem(*v2, v14, 0, v1->m_spGrayTexture.m_pObject, v1->m_spPassOne.m_pObject);
                ++v33;
                ++v7;
                ++v2;
              }
              while ( v7 < uiTotalf );
            }
            break;
        }
      }
      else
      {
        uiTotala = Market::GetTotalFigActiveSkill();
        if ( v7 < uiTotala )
        {
          v28 = 0;
          do
          {
            if ( v28 >= 0x24 )
              break;
            v9 = Market::GetFigActSkill(v7);
            NPCSkillInvWin::SetItem(*v2, v9, 0, v1->m_spGrayTexture.m_pObject, v1->m_spPassOne.m_pObject);
            ++v28;
            ++v7;
            ++v2;
          }
          while ( v7 < uiTotala );
        }
      }
    }
    if ( (unsigned __int8)((int (__thiscall *)(NPCSkillWin *))v1->vfptr[65].__vecDelDtor)(v1) )
    {
      v23 = NPCSkillWin::GetSellItemNum(v1);
      if ( v23 )
        v24 = (v23 - 1) / 0x24 + 1;
      else
        v24 = 1;
      v25 = v1->m_pkPageText->vfptr;
      v26 = fs("%d / %d", v1->m_uiCurPage + 1, v24);
      v25[118].__vecDelDtor((NiRefObject *)v1->m_pkPageText, (unsigned int)v26);
    }
  }
}

//----- (0055D140) --------------------------------------------------------
void __thiscall NPCSkillWin::OnSetPage(NPCSkillWin *this, unsigned int uiPage)
{
  this->m_uiCurPage = uiPage;
  NPCSkillWin::ResetContents(this);
}

//----- (0055D160) --------------------------------------------------------
void __thiscall NPCSkillInvWin::NPCSkillInvWin(NPCSkillInvWin *this)
{
  NPCSkillInvWin *v1; // esi@1
  void *(__thiscall *v2)(NiRefObject *, unsigned int); // edx@1

  v1 = this;
  SkillIcon::SkillIcon((SkillIcon *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&NPCSkillInvWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&NPCSkillInvWin::`vftable'{for `IDirectMessenger'};
  v1->m_uiInvIndex = -1;
  v1->m_pkSellInfo = 0;
  IconWin::SetIconImg((IconWin *)&v1->vfptr, 0, 0xFFFFFFFF, 0x20u, 0x20u);
  v2 = v1->vfptr[60].__vecDelDtor;
  v1->m_uFlags |= 1u;
  ((void (__cdecl *)(_DWORD))v2)(0);
  v1->m_kSkillID = -1;
  v1->m_uiSkillType = 0;
}
// 998E1C: using guessed type void (__thiscall *NPCSkillInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 998E3C: using guessed type int (__thiscall *NPCSkillInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0055D210) --------------------------------------------------------
void __thiscall NPCSkillWin::ResetPage(NPCSkillWin *this)
{
  this->m_uiCurPage = 0;
  this->m_uiCurPageType = 0;
  NPCSkillWin::ResetContents(this);
}

//----- (0055D230) --------------------------------------------------------
void __thiscall NPCSkillWin::OnActiveSkill(NPCSkillWin *this)
{
  NPCSkillWin *v1; // esi@1
  Tutorial *v2; // eax@1
  Tutorial *v3; // eax@2

  v1 = this;
  v2 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v3 = (Tutorial *)operator new(0xB4u);
    if ( v3 )
      Tutorial::Tutorial(v3);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  if ( !v2->m_bLockSkillShopTab )
  {
    v1->m_uiCurSkillType = 0;
    v1->m_uiCurPage = 0;
    NPCSkillWin::ResetContents(v1);
  }
}

//----- (0055D2D0) --------------------------------------------------------
void __thiscall NPCSkillWin::OnPasssiveSkill(NPCSkillWin *this)
{
  NPCSkillWin *v1; // esi@1
  Tutorial *v2; // eax@1
  Tutorial *v3; // eax@2

  v1 = this;
  v2 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v3 = (Tutorial *)operator new(0xB4u);
    if ( v3 )
      Tutorial::Tutorial(v3);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  if ( !v2->m_bLockSkillShopTab )
  {
    v1->m_uiCurSkillType = 1;
    v1->m_uiCurPage = 0;
    NPCSkillWin::ResetContents(v1);
  }
}

//----- (0055D370) --------------------------------------------------------
void __thiscall NPCSkillWin::OnProductSkill(NPCSkillWin *this)
{
  NPCSkillWin *v1; // edi@1
  Tutorial *v2; // eax@1
  Tutorial *v3; // eax@2

  v1 = this;
  v2 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v3 = (Tutorial *)operator new(0xB4u);
    if ( v3 )
      Tutorial::Tutorial(v3);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  if ( !v2->m_bLockSkillShopTab )
  {
    if ( !Skill::AmILearnAnyProdBaseSkill() )
    {
      if ( v1->m_pkMsgHooker )
      {
        ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->SendDirectMessage)(55, 0, &v1->vfptr);
        if ( v1->m_pkMsgHooker )
          ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            55,
            0,
            &v1->vfptr);
      }
      v1->vfptr->DirectDispatchToParent((IDirectMessenger *)&v1->vfptr, 55, 0, (IDirectMessenger *)&v1->vfptr);
    }
    v1->m_uiCurSkillType = 2;
    v1->m_uiCurPage = 0;
    NPCSkillWin::ResetContents(v1);
  }
}

//----- (0055D450) --------------------------------------------------------
void __thiscall NPCSkillWin::OnPrevPage(NPCSkillWin *this)
{
  NPCSkillWin *v1; // esi@1
  Tutorial *v2; // eax@1
  Tutorial *v3; // eax@2
  unsigned int v4; // eax@7

  v1 = this;
  v2 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v3 = (Tutorial *)operator new(0xB4u);
    if ( v3 )
      Tutorial::Tutorial(v3);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  if ( !v2->m_bLockSkillShopTab )
  {
    v4 = v1->m_uiCurPage;
    if ( v4 )
    {
      v1->m_uiCurPage = v4 - 1;
      NPCSkillWin::ResetContents(v1);
    }
  }
}

//----- (0055D4E0) --------------------------------------------------------
void __thiscall NPCSkillWin::OnNextPage(NPCSkillWin *this)
{
  NPCSkillWin *v1; // esi@1
  Tutorial *v2; // eax@1
  Tutorial *v3; // eax@2
  unsigned int v4; // eax@7
  unsigned int v5; // ecx@7

  v1 = this;
  v2 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v3 = (Tutorial *)operator new(0xB4u);
    if ( v3 )
      Tutorial::Tutorial(v3);
    else
      v2 = 0;
    Singleton<Tutorial>::m_pInstance = v2;
  }
  if ( !v2->m_bLockSkillShopTab )
  {
    v4 = NPCSkillWin::GetSellItemNum(v1);
    v5 = v1->m_uiCurPage;
    if ( 4 * (9 * v5 + 9) < v4 )
    {
      v1->m_uiCurPage = v5 + 1;
      NPCSkillWin::ResetContents(v1);
    }
  }
}

//----- (0055D580) --------------------------------------------------------
void __thiscall NPCSkillWin::OnSelectJob(NPCSkillWin *this, unsigned int uiIndex)
{
  NPCSkillWin *v2; // edi@1
  Tutorial *v3; // eax@1
  Tutorial *v4; // eax@2
  signed int v5; // ebx@7
  int v6; // esi@8

  v2 = this;
  v3 = Singleton<Tutorial>::m_pInstance;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v4 = (Tutorial *)operator new(0xB4u);
    if ( v4 )
      Tutorial::Tutorial(v4);
    else
      v3 = 0;
    Singleton<Tutorial>::m_pInstance = v3;
  }
  if ( !v3->m_bLockSkillShopTab )
  {
    v5 = 6;
    if ( uiIndex < 6 )
    {
      v6 = (int)v2->m_apkActiveTabWinText;
      do
      {
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v6 - 24) + 256))(0);
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v6 + 468))(&Color::m_kDxWinTabColor);
        v6 += 4;
        --v5;
      }
      while ( v5 );
      ((void (__stdcall *)(_DWORD))v2->m_apkActiveTabWin[uiIndex]->vfptr[64].__vecDelDtor)(1);
      ((void (__stdcall *)(_DWORD))v2->m_apkActiveTabWinText[uiIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
      v2->m_uiCurPageType = uiIndex;
      v2->m_uiCurPage = 0;
      NPCSkillWin::ResetContents(v2);
    }
  }
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;

//----- (0055D680) --------------------------------------------------------
void __thiscall NPCSkillWin::SelectClassPage(NPCSkillWin *this, char kClass)
{
  char v2; // al@2

  switch ( kClass )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      v2 = 1;
      break;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      v2 = 6;
      break;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      v2 = 11;
      break;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      v2 = 16;
      break;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      v2 = 21;
      break;
    case 0x1A:
    case 0x1B:
      v2 = 26;
      break;
    default:
      v2 = 0;
      break;
  }
  switch ( v2 )
  {
    case 1:
      NPCSkillWin::OnSelectJob(this, 0);
      break;
    case 6:
      NPCSkillWin::OnSelectJob(this, 1u);
      break;
    case 0xB:
      NPCSkillWin::OnSelectJob(this, 2u);
      break;
    case 0x10:
      NPCSkillWin::OnSelectJob(this, 3u);
      break;
    case 0x15:
      NPCSkillWin::OnSelectJob(this, 4u);
      break;
    case 0x1A:
      NPCSkillWin::OnSelectJob(this, 5u);
      break;
    default:
      return;
  }
}

//----- (0055D7B0) --------------------------------------------------------
NPCSkillInvWin *__cdecl NPCSkillInvWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent)
{
  PgWin *v4; // eax@1
  PgWin *v5; // eax@2
  PgWin *v6; // esi@2
  PgWin *v7; // edi@8
  NPCSkillInvWin *v8; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v10; // [sp+20h] [bp-4h]@1

  v4 = (PgWin *)operator new(0x1B0u);
  result.m_pObject = v4;
  v10 = 0;
  if ( v4 )
  {
    NPCSkillInvWin::NPCSkillInvWin((NPCSkillInvWin *)v4);
    v6 = v5;
  }
  else
  {
    v6 = 0;
  }
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v10 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v6);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, PgWin *))v6->vfptr[153].__vecDelDtor)(
                          v6,
                          iXPos,
                          iYPos,
                          uiInvIndex,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v6->vfptr[89].__vecDelDtor)(v6);
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = (NPCSkillInvWin *)v6;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v6);
    if ( result.m_pObject )
    {
      v7 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      }
    }
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = 0;
  }
  return v8;
}

//----- (0055D8F0) --------------------------------------------------------
NPCSkillWin *__cdecl NPCSkillWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  NPCSkillWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x234u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    NPCSkillWin::NPCSkillWin((NPCSkillWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (NPCSkillWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (0055DA20) --------------------------------------------------------
char __thiscall NPCSkillWin::Create(NPCSkillWin *this, PgFrameWork *pkFrameWork)
{
  NPCSkillWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  LONG v5; // eax@3
  const char *v7; // eax@10
  PgSprData *v8; // eax@11
  int v9; // edi@12
  int v10; // ebx@12
  NiSourceTexture *v11; // eax@12
  PgSprData *v12; // eax@13
  PgSprData *v13; // eax@15
  PgWinSpr *v14; // eax@15
  PgSprData *v15; // eax@17
  PgWinSpr *v16; // eax@17
  PgSprData *v17; // eax@17
  PgFont *v18; // eax@19
  PgWinText *v19; // eax@19
  NiRefObjectVtbl *v20; // edx@19
  NiUnsharedGeometryGroup *v21; // eax@19
  PgSprData *v22; // eax@20
  NiRefObjectVtbl *v23; // eax@20
  NiRefObjectVtbl v24; // edx@20
  void (__stdcall *v25)(_DWORD); // eax@20
  PgWinText *v26; // eax@20
  PgWinText *v27; // ecx@20
  char *v28; // eax@21
  NiSourceTexture *v29; // ST74_4@21
  char *v30; // eax@21
  NiSourceTexture *v31; // ST74_4@21
  char *v32; // eax@21
  char *v33; // eax@21
  char *v34; // eax@21
  PgSprData *v35; // eax@21
  PgFont *v36; // eax@24
  PgWinText *v37; // eax@24
  const char *v38; // eax@25
  PgSprData *v39; // eax@25
  PgWinBut *v40; // eax@25
  const char *v41; // eax@25
  PgWinText *v42; // eax@25
  NiTexture *v43; // eax@25
  int v44; // eax@25
  PgWinText *v45; // edx@25
  PgFont *v46; // eax@25
  NiRefObjectVtbl *v47; // eax@25
  char *v48; // eax@26
  NiUnsharedGeometryGroup *v49; // eax@27
  char *v50; // eax@29
  NiUnsharedGeometryGroup *v51; // eax@30
  char *v52; // eax@32
  NiUnsharedGeometryGroup *v53; // eax@33
  char *v54; // eax@35
  NiUnsharedGeometryGroup *v55; // eax@36
  char *v56; // eax@38
  NiUnsharedGeometryGroup *v57; // eax@39
  char *v58; // eax@41
  NiUnsharedGeometryGroup *v59; // eax@42
  NiNode *v60; // esi@45
  unsigned int uiHeight; // [sp+88h] [bp-58h]@17
  unsigned int uiWidth; // [sp+8Ch] [bp-54h]@17
  NiSourceTexture *pkTexture8; // [sp+90h] [bp-50h]@8
  int i; // [sp+94h] [bp-4Ch]@19
  NiSourceTexture *pkTexture; // [sp+98h] [bp-48h]@1
  int uiTop; // [sp+9Ch] [bp-44h]@11
  int uiLeft; // [sp+A0h] [bp-40h]@11
  NiPointer<NiNode> spNode; // [sp+A4h] [bp-3Ch]@1
  PgWinText *pkTextWin; // [sp+A8h] [bp-38h]@15
  char acShapeName[33]; // [sp+ACh] [bp-34h]@20
  int v71; // [sp+DCh] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v71 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  pkTexture = v3;
  if ( !v3 )
    goto LABEL_51;
  pkTexture8 = (NiSourceTexture *)pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v7 = Folder::Merge(&Folder::m_acMenu, "Game\\NPCSkill.nif");
  PgUtil::LoadNodeNifFile(v7, &spNode, (NiTexturePalette *)pkTexture8);
  if ( !spNode.m_pObject )
    return 0;
  v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v8, 0, pkFrameWork, "NPCSkillWin", 0) )
  {
LABEL_51:
    v4 = spNode.m_pObject;
    v71 = -1;
    if ( spNode.m_pObject )
    {
      v5 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
      goto LABEL_4;
    }
    return 0;
  }
  v9 = uiLeft;
  v10 = uiTop;
  v11 = MenuTexMgr::GetTexture(0x13u);
  if ( v11 )
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v11);
  else
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, pkTexture);
  v14 = PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v13, (PgWin *)&v2->vfptr, 0, 0);
  v14->vfptr[60].__vecDelDtor((NiRefObject *)v14, 0);
  pkTextWin = (PgWinText *)PgSprData::Create(
                             (NiAVObject *)&spNode.m_pObject->vfptr,
                             "ClsNor",
                             &uiLeft,
                             &uiTop,
                             pkTexture);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xAu, 0, 0);
  pkTexture8 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "HelpLinkNor",
                               &uiLeft,
                               &uiTop,
                               pkTexture8);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xBu, 0, 0);
  }
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
  v16 = PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v15, (PgWin *)&v2->vfptr, 0, 0);
  v16->vfptr[60].__vecDelDtor((NiRefObject *)v16, 0);
  v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, pkTexture);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v17, (PgWin *)&v2->vfptr, 0, 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "WinTitle",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
  {
    v71 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  v18 = Font::Get(0);
  v19 = PgWinText::CreateWin(uiLeft - v9, uiTop - v10 + 1, uiWidth, uiHeight, v18, (PgWin *)&v2->vfptr, 0, 0);
  v20 = v19->vfptr;
  pkTextWin = v19;
  v20[122].__vecDelDtor((NiRefObject *)v19, 1u);
  ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
  pkTexture8 = (NiSourceTexture *)&pkTextWin->vfptr[118];
  v21 = TextData::Get(0x484D3C43u);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkTexture8->vfptr)(pkTextWin, v21);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  i = 0;
  pkTextWin = (PgWinText *)v2->m_apkInvWin;
  do
  {
    pkTexture8 = (NiSourceTexture *)(i + 1);
    sprintf(acShapeName, "IconSlot%03d", i + 1);
    v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, pkTexture);
    PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v22, (PgWin *)&v2->vfptr, 0, 0);
    v23 = (NiRefObjectVtbl *)NPCSkillInvWin::CreateWin(uiLeft - v9 + 1, uiTop - v10 + 1, i, (PgWin *)&v2->vfptr);
    pkTextWin->vfptr = v23;
    v24.__vecDelDtor = v23->__vecDelDtor;
    i = (int)v23;
    v23[105].__vecDelDtor = 0;
    (*((void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v24.__vecDelDtor + 146))(v23, 0, -1, 32, 32);
    v25 = *(void (__stdcall **)(_DWORD))(*(_DWORD *)i + 240);
    *(_WORD *)(i + 28) |= 1u;
    v25(0);
    v26 = pkTextWin;
    *(_WORD *)(i + 424) = -1;
    (*((void (__stdcall **)(_DWORD))v26->vfptr->__vecDelDtor + 129))(0);
    (*((void (__stdcall **)(_DWORD))pkTextWin->vfptr->__vecDelDtor + 140))(1);
    v27 = pkTextWin;
    pkTextWin->vfptr[68].__vecDelDtor = (void *(__thiscall *)(NiRefObject *, unsigned int))g_pkSkillInfoWin;
    i = (int)pkTexture8;
    pkTextWin = (PgWinText *)((char *)v27 + 4);
  }
  while ( (signed int)pkTexture8 < 36 );
  pkTextWin = (PgWinText *)PgSprData::Create(
                             (NiAVObject *)&spNode.m_pObject->vfptr,
                             "ActSkNor",
                             &uiLeft,
                             &uiTop,
                             pkTexture);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ActSkClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ActSkOver");
  pkTextWin = (PgWinText *)PgWinBut::CreateWin(
                             uiLeft - v9,
                             uiTop - v10,
                             (PgSprData *)pkTextWin,
                             (PgWin *)&v2->vfptr,
                             2u,
                             0,
                             0);
  v28 = (char *)TextData::Get(0xD6F6F1FB);
  PgWin::SetToolTipWinText((PgWin *)&pkTextWin->vfptr, v28);
  v29 = pkTexture;
  pkTextWin->m_pkToolTipWin = g_pkToolTipWin;
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PasSkNor", &uiLeft, &uiTop, v29);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "PasSkClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "PasSkOver");
  pkTextWin = (PgWinText *)PgWinBut::CreateWin(
                             uiLeft - v9,
                             uiTop - v10,
                             (PgSprData *)pkTextWin,
                             (PgWin *)&v2->vfptr,
                             3u,
                             0,
                             0);
  v30 = (char *)TextData::Get(0xE5F8FB3F);
  PgWin::SetToolTipWinText((PgWin *)&pkTextWin->vfptr, v30);
  v31 = pkTexture;
  pkTextWin->m_pkToolTipWin = g_pkToolTipWin;
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ProSkNor", &uiLeft, &uiTop, v31);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ProSkClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ProSkOver");
  pkTextWin = (PgWinText *)PgWinBut::CreateWin(
                             uiLeft - v9,
                             uiTop - v10,
                             (PgSprData *)pkTextWin,
                             (PgWin *)&v2->vfptr,
                             5u,
                             0,
                             0);
  v32 = (char *)TextData::Get(0xE7E5F043);
  PgWin::SetToolTipWinText((PgWin *)&pkTextWin->vfptr, v32);
  pkTextWin->m_pkToolTipWin = g_pkToolTipWin;
  pkTexture8 = MenuTexMgr::GetTexture(0x1Cu);
  pkTextWin = (PgWinText *)PgSprData::Create(
                             (NiAVObject *)&spNode.m_pObject->vfptr,
                             "PrePageNor",
                             &uiLeft,
                             &uiTop,
                             pkTexture8);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "PrePageClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "PrePageOver");
  pkTextWin = (PgWinText *)PgWinBut::CreateWin(
                             uiLeft - v9,
                             uiTop - v10,
                             (PgSprData *)pkTextWin,
                             (PgWin *)&v2->vfptr,
                             6u,
                             0,
                             0);
  pkTextWin->m_pkToolTipWin = g_pkToolTipWin;
  v33 = (char *)TextData3::Get(0x6A8A9870u);
  PgWin::SetToolTipWinText((PgWin *)&pkTextWin->vfptr, v33);
  pkTextWin = (PgWinText *)PgSprData::Create(
                             (NiAVObject *)&spNode.m_pObject->vfptr,
                             "NextPageNor",
                             &uiLeft,
                             &uiTop,
                             pkTexture8);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "NextPageClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "NextPageOver");
  pkTextWin = (PgWinText *)PgWinBut::CreateWin(
                             uiLeft - v9,
                             uiTop - v10,
                             (PgSprData *)pkTextWin,
                             (PgWin *)&v2->vfptr,
                             7u,
                             0,
                             0);
  pkTextWin->m_pkToolTipWin = g_pkToolTipWin;
  v34 = (char *)TextData3::Get(0x25449D82u);
  PgWin::SetToolTipWinText((PgWin *)&pkTextWin->vfptr, v34);
  v35 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Number", &uiLeft, &uiTop, pkTexture);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v35, (PgWin *)&v2->vfptr, 0, 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "Number01",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
  {
    v4 = spNode.m_pObject;
    v71 = -1;
    if ( spNode.m_pObject )
    {
      v5 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
LABEL_4:
      if ( !v5 )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
      return 0;
    }
    return 0;
  }
  v36 = Font::Get(0);
  v37 = PgWinText::CreateWin(uiLeft - v9, uiTop - v10, uiWidth, uiHeight, v36, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkPageText = v37;
  v37->vfptr[122].__vecDelDtor((NiRefObject *)v37, 5u);
  i = 0;
  pkTexture = (NiSourceTexture *)v2->m_apkActiveTabWinText;
  do
  {
    pkTextWin = (PgWinText *)spNode.m_pObject;
    pkTexture8 = (NiSourceTexture *)(i + 1);
    v38 = fs("JobTabOff%02d", i + 1);
    v39 = PgSprData::Create((NiAVObject *)&pkTextWin->vfptr, v38, &uiLeft, &uiTop, 0);
    v40 = PgWinBut::CreateWin(uiLeft - v9, uiTop - v10, v39, (PgWin *)&v2->vfptr, 8u, 0, 0);
    v40->vfptr[130].__vecDelDtor((NiRefObject *)v40, i);
    i = (int)spNode.m_pObject;
    v41 = fs("JobTabOn%02d", pkTexture8);
    v42 = (PgWinText *)PgSprData::Create((NiAVObject *)i, v41, &uiLeft, &uiTop, 0);
    pkTextWin = v42;
    v43 = (NiTexture *)PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, (PgSprData *)v42, (PgWin *)&v2->vfptr, 0, 0);
    pkTexture[-1].m_pkPrev = v43;
    v43->vfptr[60].__vecDelDtor((NiRefObject *)v43, 0);
    ((void (__stdcall *)(_DWORD))pkTexture[-1].m_pkPrev->vfptr[64].__vecDelDtor)(0);
    v44 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
    v45 = *(PgWinText **)(v44 + 20);
    i = *(_DWORD *)(v44 + 24);
    pkTextWin = v45;
    v46 = Font::Get(0);
    v47 = (NiRefObjectVtbl *)PgWinText::CreateWin(
                               uiLeft - v9 + 3,
                               uiTop - v10 + 4,
                               (unsigned int)pkTextWin,
                               i,
                               v46,
                               (PgWin *)&v2->vfptr,
                               0,
                               0);
    pkTexture->vfptr = v47;
    (*((void (__thiscall **)(_DWORD, _DWORD))v47->__vecDelDtor + 118))(v47, &unk_998C5E);
    (*((void (__stdcall **)(_DWORD))pkTexture->vfptr->__vecDelDtor + 117))(&Color::m_kDxWinTabColor);
    (*((void (__stdcall **)(_DWORD))pkTexture->vfptr->__vecDelDtor + 60))(0);
    pkTexture = (NiSourceTexture *)((char *)pkTexture + 4);
    i = (int)pkTexture8;
  }
  while ( (signed int)pkTexture8 < 6 );
  v48 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), 1u);
  if ( v48 )
    v49 = (NiUnsharedGeometryGroup *)(v48 + 21);
  else
    v49 = &unk_96F8EB;
  ((void (__stdcall *)(NiUnsharedGeometryGroup *))v2->m_apkActiveTabWinText[0]->vfptr[118].__vecDelDtor)(v49);
  v50 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), 6u);
  if ( v50 )
    v51 = (NiUnsharedGeometryGroup *)(v50 + 21);
  else
    v51 = &unk_96F8EB;
  ((void (__stdcall *)(NiUnsharedGeometryGroup *))v2->m_apkActiveTabWinText[1]->vfptr[118].__vecDelDtor)(v51);
  v52 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), 0xBu);
  if ( v52 )
    v53 = (NiUnsharedGeometryGroup *)(v52 + 21);
  else
    v53 = &unk_96F8EB;
  ((void (__stdcall *)(NiUnsharedGeometryGroup *))v2->m_apkActiveTabWinText[2]->vfptr[118].__vecDelDtor)(v53);
  v54 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), 0x10u);
  if ( v54 )
    v55 = (NiUnsharedGeometryGroup *)(v54 + 21);
  else
    v55 = &unk_96F8EB;
  ((void (__stdcall *)(NiUnsharedGeometryGroup *))v2->m_apkActiveTabWinText[3]->vfptr[118].__vecDelDtor)(v55);
  v56 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), 0x15u);
  if ( v56 )
    v57 = (NiUnsharedGeometryGroup *)(v56 + 21);
  else
    v57 = &unk_96F8EB;
  ((void (__stdcall *)(NiUnsharedGeometryGroup *))v2->m_apkActiveTabWinText[4]->vfptr[118].__vecDelDtor)(v57);
  v58 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), 0x1Au);
  if ( v58 )
    v59 = (NiUnsharedGeometryGroup *)(v58 + 21);
  else
    v59 = &unk_96F8EB;
  ((void (__stdcall *)(NiUnsharedGeometryGroup *))v2->m_apkActiveTabWinText[5]->vfptr[118].__vecDelDtor)(v59);
  ((void (__stdcall *)(signed int))v2->m_apkActiveTabWin[0]->vfptr[64].__vecDelDtor)(1);
  ((void (__thiscall *)(NPCSkillWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  v71 = -1;
  if ( spNode.m_pObject )
  {
    v60 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v60 )
        v60->vfptr->__vecDelDtor((NiRefObject *)v60, 1u);
    }
  }
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0055E510) --------------------------------------------------------
void __thiscall NPCSkillWin::OnCommand(NPCSkillWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 1u:
      NPCSkillWin::OnInvRClick(this, lParam);
      break;
    case 2u:
      NPCSkillWin::OnActiveSkill(this);
      break;
    case 3u:
      NPCSkillWin::OnPasssiveSkill(this);
      break;
    case 5u:
      NPCSkillWin::OnProductSkill(this);
      break;
    case 6u:
      NPCSkillWin::OnPrevPage(this);
      break;
    case 7u:
      NPCSkillWin::OnNextPage(this);
      break;
    case 8u:
      NPCSkillWin::OnSelectJob(this, lParam);
      break;
    case 9u:
    case 0xAu:
      GameFrameWork::CloseSkillShopMenu((GameFrameWork *)this->m_pkFrameWork);
      break;
    case 0xBu:
      NPCSkillWin::OnHelpLink();
      break;
    case 0xCu:
      this->m_uiCurPage = lParam;
      NPCSkillWin::ResetContents(this);
      break;
    default:
      return;
  }
}

//----- (0055E5D0) --------------------------------------------------------
NPCSkillInvWin *__thiscall NPCSkillInvWin::`vector deleting destructor'(NPCSkillInvWin *this, unsigned int a2)
{
  NPCSkillInvWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&NPCSkillInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&NPCSkillInvWin::`vftable'{for `IDirectMessenger'};
  SkillIcon::~SkillIcon((SkillIcon *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 998E1C: using guessed type void (__thiscall *NPCSkillInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 998E3C: using guessed type int (__thiscall *NPCSkillInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0055E610) --------------------------------------------------------
unsigned int __cdecl ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8CD58: using guessed type int ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::ms_pkTable;

//----- (0055E630) --------------------------------------------------------
PassiveSkillViewInfo *__cdecl PasSkillViewInfoTab::GetByInxName(char *pcInxName)
{
  unsigned int v1; // edi@3
  PassiveSkillViewInfo *result; // eax@6

  if ( pcInxName && *pcInxName )
  {
    v1 = 0;
    if ( ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::GetTotal() )
    {
      while ( strcmp(
                CDataReader::GetRecord(
                  (CDataReader *)(ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::ms_pkTable + 4),
                  v1)
              + 2,
                pcInxName) )
      {
        if ( ++v1 >= ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::GetTotal() )
          goto LABEL_6;
      }
      result = (PassiveSkillViewInfo *)CDataReader::GetRecord(
                                         (CDataReader *)(ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::ms_pkTable
                                                       + 4),
                                         v1);
    }
    else
    {
LABEL_6:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8CD58: using guessed type int ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::ms_pkTable;

//----- (0055E6C0) --------------------------------------------------------
NPCSkillWin *__thiscall NPCSkillWin::`vector deleting destructor'(NPCSkillWin *this, unsigned int a2)
{
  NPCSkillWin *v2; // esi@1

  v2 = this;
  NPCSkillWin::~NPCSkillWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0055E6F0) --------------------------------------------------------
void __thiscall NPCSoulInvWin::NPCSoulInvWin(NPCSoulInvWin *this)
{
  NPCSoulInvWin *v1; // esi@1

  v1 = this;
  PgWinLRBut::PgWinLRBut((PgWinLRBut *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&NPCSoulInvWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&NPCSoulInvWin::`vftable'{for `IDirectMessenger'};
  v1->m_uiInvIndex = -1;
}
// 999450: using guessed type void (__thiscall *NPCSoulInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99946C: using guessed type int (__thiscall *NPCSoulInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0055E720) --------------------------------------------------------
void __thiscall NPCSoulInvWin::~NPCSoulInvWin(NPCSoulInvWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&NPCSoulInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&NPCSoulInvWin::`vftable'{for `IDirectMessenger'};
  PgWinLRBut::~PgWinLRBut((PgWinLRBut *)&this->vfptr);
}
// 999450: using guessed type void (__thiscall *NPCSoulInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99946C: using guessed type int (__thiscall *NPCSoulInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0055E740) --------------------------------------------------------
char __thiscall NPCSoulInvWin::Create(NPCSoulInvWin *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiInvIndex)
{
  NPCSoulInvWin *v6; // esi@1
  char result; // al@1

  v6 = this;
  result = PgWinLRBut::Create((PgWinLRBut *)&this->vfptr, iXPos, iYPos, pkSprData, pkParent, 0, 0);
  if ( result )
  {
    v6->m_uiInvIndex = uiInvIndex;
    result = 1;
  }
  return result;
}

//----- (0055E780) --------------------------------------------------------
void __thiscall NPCSoulInvWin::OnFirstHitWin(NPCSoulInvWin *this)
{
  NPCSoulInvWin *v1; // edi@1
  SoulStoneInfoWin *v2; // esi@1
  unsigned int v3; // eax@2
  PROTO_NC_MENU_SHOPOPENSOULSTONE_CMD::SOULSTONEMENU *v4; // eax@3
  unsigned int v5; // ST08_4@4
  unsigned int v6; // ST04_4@4
  unsigned int v7; // eax@4
  PROTO_NC_MENU_SHOPOPENSOULSTONE_CMD::SOULSTONEMENU *v8; // eax@6
  unsigned int v9; // ST08_4@7
  unsigned int v10; // ST04_4@7
  unsigned int v11; // eax@7

  v1 = this;
  v2 = (SoulStoneInfoWin *)this->m_pkToolTipWin;
  if ( v2 )
  {
    v3 = this->m_uiInvIndex;
    if ( v3 )
    {
      if ( v3 == 1 )
      {
        v8 = Market::GetSPSoulStoneInfo();
        if ( v8 )
        {
          v9 = v8->price;
          v10 = v8->maxnum;
          v11 = User::SPStone(&g_kUser);
          SoulStoneInfoWin::SetSPBuyInfo(v2, v11, v10, v9);
        }
      }
    }
    else
    {
      v4 = Market::GetHPSoulStoneInfo();
      if ( v4 )
      {
        v5 = v4->price;
        v6 = v4->maxnum;
        v7 = User::HPStone(&g_kUser);
        SoulStoneInfoWin::SetHPBuyInfo(v2, v7, v6, v5);
        PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
        return;
      }
    }
    PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
  }
}

//----- (0055E800) --------------------------------------------------------
void __thiscall NPCSoulWin::NPCSoulWin(NPCSoulWin *this)
{
  NPCSoulWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_uiCurPage = 0;
  v1->m_uiCurPageType = 0;
  v1->m_pkTitleTextWin = 0;
  v1->m_apkInvWin[1] = 0;
  v1->m_apkInvWin[0] = 0;
  v1->vfptr = (NiRefObjectVtbl *)&NPCSoulWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&NPCSoulWin::`vftable'{for `IDirectMessenger'};
}
// 9996BC: using guessed type void (__thiscall *NPCSoulWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9996DC: using guessed type int (__thiscall *NPCSoulWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0055E840) --------------------------------------------------------
void __thiscall NPCSoulWin::~NPCSoulWin(NPCSoulWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&NPCSoulWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&NPCSoulWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9996BC: using guessed type void (__thiscall *NPCSoulWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9996DC: using guessed type int (__thiscall *NPCSoulWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0055E8D0) --------------------------------------------------------
void NPCSoulWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "NPCSoul");
}

//----- (0055E900) --------------------------------------------------------
void __thiscall NPCSoulWin::ResetPage(NPCSoulWin *this)
{
  this->m_uiCurPage = 0;
  this->m_uiCurPageType = 0;
}

//----- (0055E910) --------------------------------------------------------
void __thiscall NPCSoulWin::OnCancel(NPCSoulWin *this)
{
  GameFrameWork::CloseSoulStoneShopMenu((GameFrameWork *)this->m_pkFrameWork);
}

//----- (0055E920) --------------------------------------------------------
void __thiscall NPCSoulWin::OnBuyHPOk(NPCSoulWin *this, unsigned int uiLot)
{
  GameFrameWork::NcSoulStoneHPBuyReq((GameFrameWork *)this->m_pkFrameWork, uiLot);
}

//----- (0055E930) --------------------------------------------------------
void __thiscall NPCSoulWin::OnBuySPOk(NPCSoulWin *this, unsigned int uiLot)
{
  GameFrameWork::NcSoulStoneSPBuyReq((GameFrameWork *)this->m_pkFrameWork, uiLot);
}

//----- (0055E940) --------------------------------------------------------
void __thiscall NPCSoulInvWin::DoAction(NPCSoulInvWin *this)
{
  NPCSoulInvWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiInvIndex);
}

//----- (0055E970) --------------------------------------------------------
void __thiscall NPCSoulInvWin::DoRAction(NPCSoulInvWin *this)
{
  NPCSoulInvWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiRCmdMsg, v1->m_uiInvIndex);
}

//----- (0055E9A0) --------------------------------------------------------
void __thiscall NPCSoulWin::OnInvLClick(NPCSoulWin *this, unsigned int uiInvIndex)
{
  NPCSoulWin *v2; // edi@1
  PROTO_NC_MENU_SHOPOPENSOULSTONE_CMD::SOULSTONEMENU *v3; // eax@2
  PROTO_NC_MENU_SHOPOPENSOULSTONE_CMD::SOULSTONEMENU *v4; // esi@2
  GameFrameWork *v5; // edi@6
  NiUnsharedGeometryGroup *v6; // eax@6
  PROTO_NC_MENU_SHOPOPENSOULSTONE_CMD::SOULSTONEMENU *v7; // eax@11
  PROTO_NC_MENU_SHOPOPENSOULSTONE_CMD::SOULSTONEMENU *v8; // esi@11
  unsigned int v9; // [sp-4h] [bp-Ch]@5

  v2 = this;
  if ( uiInvIndex )
  {
    if ( uiInvIndex == 1 )
    {
      v7 = Market::GetSPSoulStoneInfo();
      v8 = v7;
      if ( v7 )
      {
        if ( v7->price )
        {
          if ( !((unsigned int)User::GetMoney(&g_kUser) / v7->price) )
            goto LABEL_5;
          if ( User::SPStone(&g_kUser) >= (signed int)v8->maxnum )
            goto LABEL_8;
          GameFrameWork::NcSoulStoneSPBuyReq((GameFrameWork *)v2->m_pkFrameWork, 1u);
        }
      }
    }
  }
  else
  {
    v3 = Market::GetHPSoulStoneInfo();
    v4 = v3;
    if ( v3 && v3->price )
    {
      if ( !((unsigned int)User::GetMoney(&g_kUser) / v3->price) )
      {
LABEL_5:
        v9 = 978272565;
LABEL_6:
        v5 = (GameFrameWork *)v2->m_pkFrameWork;
        v6 = TextData::Get(v9);
        GameFrameWork::AddSysMsg(v5, (const char *)v6);
        return;
      }
      if ( User::HPStone(&g_kUser) >= (signed int)v4->maxnum )
      {
LABEL_8:
        v9 = 1677983971;
        goto LABEL_6;
      }
      GameFrameWork::NcSoulStoneHPBuyReq((GameFrameWork *)v2->m_pkFrameWork, 1u);
    }
  }
}

//----- (0055EA70) --------------------------------------------------------
void __thiscall NPCSoulWin::OnInvRClick(NPCSoulWin *this, unsigned int uiInvIndex)
{
  NPCSoulWin *v2; // edi@1
  PROTO_NC_MENU_SHOPOPENSOULSTONE_CMD::SOULSTONEMENU *v3; // eax@2
  PROTO_NC_MENU_SHOPOPENSOULSTONE_CMD::SOULSTONEMENU *v4; // esi@2
  unsigned int v5; // ebx@4
  GameFrameWork *v6; // edi@6
  NiUnsharedGeometryGroup *v7; // eax@6
  unsigned int v8; // esi@9
  GameFrameWork *v9; // ebx@12
  char *v10; // eax@12
  GameFrameWork *v11; // ecx@13
  PROTO_NC_MENU_SHOPOPENSOULSTONE_CMD::SOULSTONEMENU *v12; // eax@17
  PROTO_NC_MENU_SHOPOPENSOULSTONE_CMD::SOULSTONEMENU *v13; // esi@17
  unsigned int v14; // ebx@19
  unsigned int v15; // esi@21
  GameFrameWork *v16; // ebx@24
  char *v17; // eax@24
  GameFrameWork *v18; // ecx@25
  unsigned int v19; // [sp-4h] [bp-10h]@5

  v2 = this;
  if ( uiInvIndex )
  {
    if ( uiInvIndex == 1 )
    {
      v12 = Market::GetSPSoulStoneInfo();
      v13 = v12;
      if ( v12 )
      {
        if ( v12->price )
        {
          v14 = (unsigned int)User::GetMoney(&g_kUser) / v12->price;
          if ( !v14 )
            goto LABEL_5;
          if ( User::SPStone(&g_kUser) >= (signed int)v13->maxnum )
            goto LABEL_8;
          v15 = v13->maxnum - User::SPStone(&g_kUser);
          if ( v14 < v15 )
            v15 = v14;
          if ( g_pkKeyboard->m_aucKeystate[5] & 4 )
          {
            v16 = (GameFrameWork *)v2->m_pkFrameWork;
            v17 = (char *)TextData::Get(0xEDD6FCE1);
            GameFrameWork::OnOpenDivideWin(v16, (PgWin *)&v2->vfptr, 0xAu, v15, v17, 0);
          }
          else
          {
            v18 = (GameFrameWork *)v2->m_pkFrameWork;
            if ( g_pkKeyboard->m_aucKeystate[3] & 0x20 )
              GameFrameWork::NcSoulStoneSPBuyReq(v18, v15);
            else
              GameFrameWork::NcSoulStoneSPBuyReq(v18, 1u);
          }
        }
      }
    }
  }
  else
  {
    v3 = Market::GetHPSoulStoneInfo();
    v4 = v3;
    if ( v3 && v3->price )
    {
      v5 = (unsigned int)User::GetMoney(&g_kUser) / v3->price;
      if ( !v5 )
      {
LABEL_5:
        v19 = 978272565;
LABEL_6:
        v6 = (GameFrameWork *)v2->m_pkFrameWork;
        v7 = TextData::Get(v19);
        GameFrameWork::AddSysMsg(v6, (const char *)v7);
        return;
      }
      if ( User::HPStone(&g_kUser) >= (signed int)v4->maxnum )
      {
LABEL_8:
        v19 = 1677983971;
        goto LABEL_6;
      }
      v8 = v4->maxnum - User::HPStone(&g_kUser);
      if ( v5 < v8 )
        v8 = v5;
      if ( g_pkKeyboard->m_aucKeystate[5] & 4 )
      {
        v9 = (GameFrameWork *)v2->m_pkFrameWork;
        v10 = (char *)TextData::Get(0xEDCBFCE1);
        GameFrameWork::OnOpenDivideWin(v9, (PgWin *)&v2->vfptr, 9u, v8, v10, 0);
      }
      else
      {
        v11 = (GameFrameWork *)v2->m_pkFrameWork;
        if ( g_pkKeyboard->m_aucKeystate[3] & 0x20 )
          GameFrameWork::NcSoulStoneHPBuyReq(v11, v8);
        else
          GameFrameWork::NcSoulStoneHPBuyReq(v11, 1u);
      }
    }
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (0055EC20) --------------------------------------------------------
void __thiscall NPCSoulWin::OnCommand(NPCSoulWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0u:
      NPCSoulWin::OnInvLClick(this, lParam);
      break;
    case 1u:
      NPCSoulWin::OnInvRClick(this, lParam);
      break;
    case 8u:
      GameFrameWork::CloseSoulStoneShopMenu((GameFrameWork *)this->m_pkFrameWork);
      break;
    case 9u:
      GameFrameWork::NcSoulStoneHPBuyReq((GameFrameWork *)this->m_pkFrameWork, lParam);
      break;
    case 0xAu:
      GameFrameWork::NcSoulStoneSPBuyReq((GameFrameWork *)this->m_pkFrameWork, lParam);
      break;
    case 0xBu:
      NPCSoulWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (0055ECC0) --------------------------------------------------------
NPCSoulInvWin *__cdecl NPCSoulInvWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiInvIndex)
{
  PgWin *v5; // eax@1
  PgWin *v6; // esi@1
  PgWin *v7; // edi@8
  NPCSoulInvWin *v8; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v10; // [sp+20h] [bp-4h]@1

  v5 = (PgWin *)operator new(0x150u);
  v6 = v5;
  result.m_pObject = v5;
  v10 = 0;
  if ( v5 )
  {
    PgWinLRBut::PgWinLRBut((PgWinLRBut *)v5);
    v6->vfptr = (NiRefObjectVtbl *)&NPCSoulInvWin::`vftable'{for `NiNode'};
    v6->vfptr = (IDirectMessengerVtbl *)&NPCSoulInvWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v6[1].m_kWorldBound.m_kCenter.z) = -1;
  }
  else
  {
    v6 = 0;
  }
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v10 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v6);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgSprData *, PgWin *, unsigned int))v6->vfptr[146].__vecDelDtor)(
                          v6,
                          iXPos,
                          iYPos,
                          pkSprData,
                          pkParent,
                          uiInvIndex) )
  {
    ((void (__thiscall *)(PgWin *))v6->vfptr[89].__vecDelDtor)(v6);
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = (NPCSoulInvWin *)v6;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v6);
    if ( result.m_pObject )
    {
      v7 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      }
    }
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = 0;
  }
  return v8;
}
// 999450: using guessed type void (__thiscall *NPCSoulInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99946C: using guessed type int (__thiscall *NPCSoulInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0055EE20) --------------------------------------------------------
NPCSoulWin *__cdecl NPCSoulWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  NPCSoulWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x16Cu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&NPCSoulWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&NPCSoulWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][1]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (NPCSoulWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9996BC: using guessed type void (__thiscall *NPCSoulWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9996DC: using guessed type int (__thiscall *NPCSoulWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0055EF80) --------------------------------------------------------
char __thiscall NPCSoulWin::Create(NPCSoulWin *this, PgFrameWork *pkFrameWork)
{
  PgSprData *v2; // ebx@1
  NPCSoulWin *v3; // esi@1
  NiTexturePalette *v4; // edi@1
  const char *v5; // eax@3
  PgSprData *v6; // eax@4
  PgSprData *v7; // eax@6
  PgSprData *v8; // eax@8
  NiNode *v9; // esi@15
  int v11; // edi@20
  int v12; // ebx@20
  NiSourceTexture *v13; // eax@20
  PgSprData *v14; // eax@21
  PgSprData *v15; // eax@23
  NiSourceTexture *v16; // eax@23
  NiRefObjectVtbl *v17; // edx@23
  PgSprData *v18; // eax@25
  PgWinSpr *v19; // eax@25
  PgSprData *v20; // eax@25
  PgSprData *v21; // esi@26
  PgSprData *v22; // esi@29
  NiNode *v23; // esi@32
  PgFont *v24; // eax@36
  PgWinText *v25; // eax@36
  NiRefObjectVtbl *v26; // edx@36
  NiUnsharedGeometryGroup *v27; // eax@36
  PgSprData *v28; // eax@37
  NPCSoulInvWin *v29; // eax@38
  NPCSoulInvWin *v30; // eax@38
  NPCSoulInvWin *v31; // eax@40
  char *v32; // eax@43
  PgSprData *v33; // esi@43
  PgSprData *v34; // esi@46
  NiNode *v35; // esi@49
  unsigned int uiHeight; // [sp+38h] [bp-58h]@25
  unsigned int uiWidth; // [sp+3Ch] [bp-54h]@25
  void (__thiscall **v38)(_DWORD, _DWORD); // [sp+40h] [bp-50h]@36
  NiPointer<PgSprData> spHPSprData; // [sp+44h] [bp-4Ch]@1
  NiPointer<PgSprData> spSPSprData; // [sp+48h] [bp-48h]@1
  int uiTop; // [sp+4Ch] [bp-44h]@4
  int uiLeft; // [sp+50h] [bp-40h]@4
  int i; // [sp+54h] [bp-3Ch]@1
  NiPointer<NiNode> spNode; // [sp+58h] [bp-38h]@1
  char acShapeName[33]; // [sp+5Ch] [bp-34h]@37
  int v46; // [sp+8Ch] [bp-4h]@1

  v2 = 0;
  v3 = this;
  i = (int)pkFrameWork;
  spNode.m_pObject = 0;
  v46 = 0;
  spHPSprData.m_pObject = 0;
  spSPSprData.m_pObject = 0;
  v4 = pTexturePalette;
  LOBYTE(v46) = 2;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "Game\\NPCSoul.nif");
  PgUtil::LoadNodeNifFile(v5, &spNode, v4);
  if ( !spNode.m_pObject )
    return 0;
  v6 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HPSoulNor", &uiLeft, &uiTop, 0);
  if ( v6 )
  {
    spHPSprData.m_pObject = v6;
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  }
  v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SPSoulNor", &uiLeft, &uiTop, 0);
  if ( v7 )
  {
    spSPSprData.m_pObject = v7;
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
    v2 = spSPSprData.m_pObject;
  }
  v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v3->vfptr, 0, 0, v8, 0, (PgFrameWork *)i, "NPCSoulWin", 0) )
  {
    LOBYTE(v46) = 1;
    if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    LOBYTE(v46) = 0;
    if ( spHPSprData.m_pObject && !InterlockedDecrement((volatile LONG *)&spHPSprData.m_pObject->m_uiRefCount) )
      spHPSprData.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spHPSprData.m_pObject, 1u);
    v9 = spNode.m_pObject;
    v46 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v9 )
        v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    }
    return 0;
  }
  v11 = uiLeft;
  v12 = uiTop;
  v13 = MenuTexMgr::GetTexture(0x13u);
  if ( v13 )
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v13);
  else
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v11, uiTop - v12, v14, (PgWin *)&v3->vfptr, 0, 0);
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v11, uiTop - v12, v15, (PgWin *)&v3->vfptr, 0, 0);
  i = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinBut::CreateWin(uiLeft - v11, uiTop - v12, (PgSprData *)i, (PgWin *)&v3->vfptr, 8u, 0, 0);
  v16 = MenuTexMgr::GetTexture(4u);
  v17 = spNode.m_pObject->vfptr;
  i = (int)v16;
  if ( ((int (__stdcall *)(const char *))v17[18].__vecDelDtor)("HelpLinkNor") )
  {
    i = (int)PgSprData::Create(
               (NiAVObject *)&spNode.m_pObject->vfptr,
               "HelpLinkNor",
               &uiLeft,
               &uiTop,
               (NiSourceTexture *)i);
    PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v11, uiTop - v12, (PgSprData *)i, (PgWin *)&v3->vfptr, 0xBu, 0, 0);
  }
  v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  v19 = PgWinSpr::CreateWin(uiLeft - v11, uiTop - v12, v18, (PgWin *)&v3->vfptr, 0, 0);
  v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
  v20 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v11, uiTop - v12, v20, (PgWin *)&v3->vfptr, 0, 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "WinTitle",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
  {
    v21 = spSPSprData.m_pObject;
    LOBYTE(v46) = 1;
    if ( spSPSprData.m_pObject && !InterlockedDecrement((volatile LONG *)&spSPSprData.m_pObject->m_uiRefCount) )
      v21->vfptr->__vecDelDtor((NiRefObject *)v21, 1u);
    v22 = spHPSprData.m_pObject;
    LOBYTE(v46) = 0;
    if ( spHPSprData.m_pObject && !InterlockedDecrement((volatile LONG *)&spHPSprData.m_pObject->m_uiRefCount) )
      v22->vfptr->__vecDelDtor((NiRefObject *)v22, 1u);
    v23 = spNode.m_pObject;
    v46 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v23 )
    {
      v23->vfptr->__vecDelDtor((NiRefObject *)v23, 1u);
      return 0;
    }
    return 0;
  }
  v24 = Font::Get(0);
  v25 = PgWinText::CreateWin(uiLeft - v11, uiTop - v12, uiWidth, uiHeight, v24, (PgWin *)&v3->vfptr, 0, 0);
  v26 = v25->vfptr;
  i = (int)v25;
  v26[122].__vecDelDtor((NiRefObject *)v25, 1u);
  (*(void (__stdcall **)(struct D3DXCOLOR *))(*(_DWORD *)i + 468))(&Color::m_kDxWinTitleColor);
  v38 = (void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)i + 472);
  v27 = TextData::Get(0xA5998A9A);
  (*v38)(i, v27);
  (*(void (__stdcall **)(_DWORD))(*(_DWORD *)i + 240))(0);
  i = 0;
  do
  {
    v38 = (void (__thiscall **)(_DWORD, _DWORD))(i + 1);
    sprintf(acShapeName, "IconSlot%03d", i + 1);
    v28 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v11, uiTop - v12, v28, (PgWin *)&v3->vfptr, 0, 0);
    if ( i )
    {
      if ( i != 1 )
        goto LABEL_42;
      v31 = NPCSoulInvWin::CreateWin(uiLeft - v11 + 1, uiTop - v12 + 1, spSPSprData.m_pObject, (PgWin *)&v3->vfptr, 1u);
      v3->m_apkInvWin[1] = v31;
      v31->vfptr[129].__vecDelDtor((NiRefObject *)v31, 0);
      ((void (__stdcall *)(signed int))v3->m_apkInvWin[1]->vfptr[140].__vecDelDtor)(1);
      v30 = v3->m_apkInvWin[1];
    }
    else
    {
      v29 = NPCSoulInvWin::CreateWin(uiLeft - v11 + 1, uiTop - v12 + 1, spHPSprData.m_pObject, (PgWin *)&v3->vfptr, 0);
      v3->m_apkInvWin[0] = v29;
      v29->vfptr[129].__vecDelDtor((NiRefObject *)v29, 0);
      ((void (__stdcall *)(signed int))v3->m_apkInvWin[0]->vfptr[140].__vecDelDtor)(1);
      v30 = v3->m_apkInvWin[0];
    }
    v30->m_pkToolTipWin = g_pkSoulStoneInfoWin;
LABEL_42:
    i = (int)v38;
  }
  while ( (signed int)v38 < 42 );
  i = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PwrSoulNor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "PwrSoulClick");
  PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "PwrSoulOver");
  i = (int)PgWinBut::CreateWin(uiLeft - v11, uiTop - v12, (PgSprData *)i, (PgWin *)&v3->vfptr, 2u, 0, 0);
  v32 = (char *)TextData::Get(0xA7F7F6F2);
  PgWin::SetToolTipWinText((PgWin *)i, v32);
  *(_DWORD *)(i + 272) = g_pkToolTipWin;
  i = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PrePageNor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "PrePageClick");
  PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "PrePageOver");
  PgWinBut::CreateWin(uiLeft - v11, uiTop - v12, (PgSprData *)i, (PgWin *)&v3->vfptr, 5u, 0, 0);
  i = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NextPageNor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "NextPageClick");
  PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "NextPageOver");
  PgWinBut::CreateWin(uiLeft - v11, uiTop - v12, (PgSprData *)i, (PgWin *)&v3->vfptr, 6u, 0, 0);
  ((void (__thiscall *)(NPCSoulWin *, unsigned int, unsigned int, _DWORD, _DWORD))v3->vfptr[59].__vecDelDtor)(
    v3,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  v33 = spSPSprData.m_pObject;
  LOBYTE(v46) = 1;
  if ( spSPSprData.m_pObject && !InterlockedDecrement((volatile LONG *)&spSPSprData.m_pObject->m_uiRefCount) )
    v33->vfptr->__vecDelDtor((NiRefObject *)v33, 1u);
  v34 = spHPSprData.m_pObject;
  LOBYTE(v46) = 0;
  if ( spHPSprData.m_pObject && !InterlockedDecrement((volatile LONG *)&spHPSprData.m_pObject->m_uiRefCount) )
    v34->vfptr->__vecDelDtor((NiRefObject *)v34, 1u);
  v35 = spNode.m_pObject;
  v46 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v35 )
    v35->vfptr->__vecDelDtor((NiRefObject *)v35, 1u);
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0055F6F0) --------------------------------------------------------
NPCSoulInvWin *__thiscall NPCSoulInvWin::`vector deleting destructor'(NPCSoulInvWin *this, unsigned int a2)
{
  NPCSoulInvWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&NPCSoulInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&NPCSoulInvWin::`vftable'{for `IDirectMessenger'};
  PgWinLRBut::~PgWinLRBut((PgWinLRBut *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 999450: using guessed type void (__thiscall *NPCSoulInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99946C: using guessed type int (__thiscall *NPCSoulInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0055F730) --------------------------------------------------------
NPCSoulWin *__thiscall NPCSoulWin::`vector deleting destructor'(NPCSoulWin *this, unsigned int a2)
{
  NPCSoulWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&NPCSoulWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&NPCSoulWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9996BC: using guessed type void (__thiscall *NPCSoulWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9996DC: using guessed type int (__thiscall *NPCSoulWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0055F770) --------------------------------------------------------
void __thiscall PartyJoinProposeWin::OnBut1(PartyJoinProposeWin *this)
{
  PartyJoinProposeWin *v1; // esi@1
  Name5 *v2; // eax@1
  _BYTE v3[20]; // ST00_20@1
  GameFrameWork *v4; // eax@1
  Name5 result; // [sp+4h] [bp-14h]@1

  v1 = this;
  v2 = Party::GetJoinProposeCharID(&g_kParty, &result);
  *(_DWORD *)v3 = v2->n5_code[0];
  *(_QWORD *)&v3[4] = *(_QWORD *)&v2->n5_code[1];
  *(_QWORD *)&v3[12] = *(_QWORD *)&v2->n5_code[3];
  GameFrameWork::NcPartyJoinProposeAllowAck((GameFrameWork *)v1->m_pkFrameWork, *(Name5 *)v3);
  Party::ClearJoinProposeData(&g_kParty);
  PgWin::PostMsg((PgWin *)&v1->vfptr, 2u, 0, 0);
  v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v4 )
    GameFrameWork::OpenPlayGuideWin(v4, BIL_PARTY_1);
}

//----- (0055F800) --------------------------------------------------------
void __thiscall PartyJoinProposeWin::OnBut2(PartyJoinProposeWin *this)
{
  PartyJoinProposeWin *v1; // esi@1
  Name5 *v2; // eax@1
  _BYTE v3[20]; // ST00_20@1
  GameFrameWork *v4; // eax@1
  Name5 result; // [sp+4h] [bp-14h]@1

  v1 = this;
  v2 = Party::GetJoinProposeCharID(&g_kParty, &result);
  *(_DWORD *)v3 = v2->n5_code[0];
  *(_QWORD *)&v3[4] = *(_QWORD *)&v2->n5_code[1];
  *(_QWORD *)&v3[12] = *(_QWORD *)&v2->n5_code[3];
  GameFrameWork::NcPartyJoinProposeRejectAck((GameFrameWork *)v1->m_pkFrameWork, *(Name5 *)v3);
  Party::ClearJoinProposeData(&g_kParty);
  PgWin::PostMsg((PgWin *)&v1->vfptr, 2u, 0, 0);
  v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v4 )
    GameFrameWork::OpenPlayGuideWin(v4, BIL_PARTY_1);
}

//----- (0055F890) --------------------------------------------------------
void __thiscall PartyJoinProposeWin::SetMsg(PartyJoinProposeWin *this, char *pcText)
{
  char *v2; // edi@1
  char *v3; // esi@1
  signed int v4; // ebx@1
  char *v5; // esi@5
  int v6; // eax@7
  int v7; // eax@7
  int v8; // ecx@7
  int v9; // edi@7
  signed int v10; // esi@10
  HDC__ *hDC; // [sp+Ch] [bp-110h]@5
  char *v12; // [sp+10h] [bp-10Ch]@1
  char *psrc; // [sp+14h] [bp-108h]@1
  char acStr[256]; // [sp+18h] [bp-104h]@7

  v2 = (char *)this->m_apkTextWin;
  psrc = pcText;
  v12 = (char *)this->m_apkTextWin;
  v3 = (char *)this->m_apkTextWin;
  v4 = 2;
  do
  {
    (*(void (__stdcall **)(void *))(**(_DWORD **)v3 + 472))(&unk_999932);
    v3 += 4;
    --v4;
  }
  while ( v4 );
  if ( pcText && *pcText )
  {
    hDC = *(HDC__ **)((*(int (**)(void))(**(_DWORD **)v2 + 456))() + 192);
    v5 = v2;
    do
    {
      if ( !*psrc )
        break;
      v6 = (*(int (**)(void))(**(_DWORD **)v5 + 144))();
      v7 = PgUtil::StringPixelCopy(acStr, psrc, hDC, v6);
      v8 = *(_DWORD *)v5;
      v9 = v7;
      acStr[v7] = 0;
      (*(void (__stdcall **)(char *))(*(_DWORD *)v8 + 472))(acStr);
      psrc += v9;
      v2 = v12;
      ++v4;
      v5 += 4;
    }
    while ( v4 < 2 );
    if ( v4 == 1 )
    {
      (*(void (__thiscall **)(_DWORD, signed int))(**(_DWORD **)v2 + 488))(*(_DWORD *)v2, 1);
    }
    else
    {
      v10 = 2;
      do
      {
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 488))(0);
        v2 += 4;
        --v10;
      }
      while ( v10 );
    }
  }
}

//----- (0055F9D0) --------------------------------------------------------
void __thiscall PartyJoinProposeWin::OnTimer(PartyJoinProposeWin *this)
{
  PartyJoinProposeWin::OnBut2((PartyJoinProposeWin *)((char *)this - 344));
}

//----- (0055F9E0) --------------------------------------------------------
void __thiscall PartyJoinProposeWin::UpdateMeWin(PartyJoinProposeWin *this, float fCurTime)
{
  if ( g_pkKeyboard->m_aucKeystate[0] & 2 )
  {
    BYTE3(PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID)[73].m_kMsgQ.m_uiAlloced) = 0;
    PartyJoinProposeWin::OnBut2(this);
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (0055FA20) --------------------------------------------------------
void __thiscall PartyJoinProposeWin::~PartyJoinProposeWin(PartyJoinProposeWin *this)
{
  PartyJoinProposeWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&PartyJoinProposeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PartyJoinProposeWin::`vftable'{for `IDirectMessenger'};
  this->vfptr = (ITimerVtbl *)&PartyJoinProposeWin::`vftable';
  `eh vector destructor iterator'(
    this->m_apkTextWin,
    4u,
    2,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  ITimer::~ITimer((ITimer *)&v1->vfptr);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 999988: using guessed type int (__stdcall *PartyJoinProposeWin::`vftable')(int);
// 999994: using guessed type void (__thiscall *PartyJoinProposeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9999B4: using guessed type int (__thiscall *PartyJoinProposeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0055FAB0) --------------------------------------------------------
char __thiscall PartyJoinProposeWin::Create(PartyJoinProposeWin *this, PgFrameWork *pkFrameWork)
{
  PartyJoinProposeWin *v2; // esi@1
  NiTexturePalette *v3; // ebx@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  NiSourceTexture *v8; // eax@10
  PgSprData *v9; // eax@11
  PgWinSpr *v10; // eax@13
  PgFont *v11; // eax@15
  unsigned int v12; // edi@17
  PgFont *v13; // ST1C_4@17
  unsigned int v14; // ST18_4@17
  int v15; // eax@17
  PgWinText *v16; // eax@17
  PgWinText *v17; // edi@17
  PgWinText *v18; // ebx@17
  PgSprData *v19; // edi@25
  PgWinBut *v20; // ST20_4@25
  PgWinBut *v21; // edi@25
  PgFont *v22; // ST1C_4@25
  unsigned int v23; // ST18_4@25
  unsigned int v24; // eax@25
  PgWinText *v25; // eax@25
  NiRefObjectVtbl *v26; // edi@25
  NiUnsharedGeometryGroup *v27; // eax@25
  PgSprData *v28; // edi@25
  PgWinBut *v29; // ST20_4@25
  PgWinBut *v30; // edi@25
  PgFont *v31; // ST1C_4@25
  unsigned int v32; // ST18_4@25
  unsigned int v33; // eax@25
  PgWinText *v34; // eax@25
  int v35; // edi@25
  NiUnsharedGeometryGroup *v36; // eax@25
  Name5 *v37; // eax@25
  NiUnsharedGeometryGroup *v38; // eax@25
  NiNode *v39; // esi@26
  Name5 result; // [sp+3Ch] [bp-17Ch]@25
  PgFont *pkFont; // [sp+50h] [bp-168h]@15
  int i; // [sp+54h] [bp-164h]@15
  NiPointer<PgWinText> *v43; // [sp+58h] [bp-160h]@15
  int uiTop; // [sp+5Ch] [bp-15Ch]@4
  int uiLeft; // [sp+60h] [bp-158h]@4
  NiPointer<NiNode> spNode; // [sp+64h] [bp-154h]@1
  char acStr[256]; // [sp+68h] [bp-150h]@25
  char acName[64]; // [sp+168h] [bp-50h]@25
  int v49; // [sp+1B4h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v49 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\MessageWin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "PartyJoinProposeWin", 0) )
  {
    v6 = spNode.m_pObject;
    v49 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = MenuTexMgr::GetTexture(0x13u);
  if ( v8 )
    v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v8);
  else
    v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  v10 = PgWinSpr::CreateWin(uiLeft, uiTop, v9, (PgWin *)&v2->vfptr, 0, 0);
  if ( v10 )
    v10->vfptr[60].__vecDelDtor((NiRefObject *)v10, 0);
  v11 = Font::Get(0);
  pkFont = v11;
  i = 0;
  v43 = v2->m_apkTextWin;
  while ( 1 )
  {
    v12 = v11->m_uiDefHeight;
    v13 = v11;
    v14 = v11->m_uiDefHeight;
    v15 = ((int (__thiscall *)(PartyJoinProposeWin *))v2->vfptr[36].__vecDelDtor)(v2);
    v16 = PgWinText::CreateWin(8, i * (v12 + 1) + 8, v15 - 16, v14, v13, (PgWin *)&v2->vfptr, 0, 0);
    v17 = v43->m_pObject;
    v18 = v16;
    if ( v43->m_pObject != v16 )
    {
      if ( v17 && !InterlockedDecrement((volatile LONG *)&v17->m_uiRefCount) && v17 )
        v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
      v43->m_pObject = v18;
      if ( v18 )
        InterlockedIncrement((volatile LONG *)&v18->m_uiRefCount);
    }
    ((void (__stdcall *)(_DWORD))v43->m_pObject->vfptr[60].__vecDelDtor)(0);
    ++v43;
    if ( ++i >= 2 )
      break;
    v11 = pkFont;
  }
  v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor02", &uiLeft, &uiTop, 0);
  PgSprData::Add(v19, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick02");
  PgSprData::Add(v19, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver02");
  v20 = PgWinBut::CreateWin(uiLeft, uiTop, v19, (PgWin *)&v2->vfptr, 0, 0, 0);
  v2->m_apkButWin[1] = v20;
  v21 = v20;
  v22 = Font::Get(0);
  v23 = ((int (__thiscall *)(PgWinBut *))v21->vfptr[37].__vecDelDtor)(v21);
  v24 = ((int (__thiscall *)(PgWinBut *))v21->vfptr[36].__vecDelDtor)(v21);
  v25 = PgWinText::CreateWin(0, 0, v24, v23, v22, (PgWin *)&v20->vfptr, 0, 0);
  v2->m_apkButTextWin[1] = v25;
  v25->vfptr[122].__vecDelDtor((NiRefObject *)v25, 5u);
  v26 = v2->m_apkButTextWin[1]->vfptr;
  v27 = TextData::Get(0xE7F0EDE7);
  v26[118].__vecDelDtor((NiRefObject *)v2->m_apkButTextWin[1], (unsigned int)v27);
  ((void (__stdcall *)(_DWORD))v2->m_apkButTextWin[1]->vfptr[60].__vecDelDtor)(0);
  v28 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor03", &uiLeft, &uiTop, 0);
  PgSprData::Add(v28, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick03");
  PgSprData::Add(v28, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver03");
  v29 = PgWinBut::CreateWin(uiLeft, uiTop, v28, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v2->m_apkButTextWin[0] = (PgWinText *)v29;
  v30 = v29;
  v31 = Font::Get(0);
  v32 = ((int (__thiscall *)(PgWinBut *))v30->vfptr[37].__vecDelDtor)(v30);
  v33 = ((int (__thiscall *)(PgWinBut *))v30->vfptr[36].__vecDelDtor)(v30);
  v34 = PgWinText::CreateWin(0, 0, v33, v32, v31, (PgWin *)&v29->vfptr, 0, 0);
  *(_DWORD *)&v2->m_aucReply[0] = v34;
  v34->vfptr[122].__vecDelDtor((NiRefObject *)v34, 5u);
  v35 = **(_DWORD **)&v2->m_aucReply[0];
  v36 = TextData::Get(0xE9F4EDEE);
  (*(void (__thiscall **)(_DWORD, NiUnsharedGeometryGroup *))(v35 + 472))(*(_DWORD *)&v2->m_aucReply[0], v36);
  (*(void (__stdcall **)(_DWORD))(**(_DWORD **)&v2->m_aucReply[0] + 240))(0);
  ((void (__thiscall *)(PartyJoinProposeWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.2);
  v37 = Party::GetJoinProposeCharID(&g_kParty, &result);
  *(_DWORD *)acName = v37->n5_code[0];
  *(_DWORD *)&acName[4] = v37->n5_code[1];
  *(_DWORD *)&acName[8] = v37->n5_code[2];
  *(_DWORD *)&acName[12] = v37->n5_code[3];
  *(_DWORD *)&acName[16] = v37->n5_code[4];
  *(_WORD *)&acName[19] = 0;
  v38 = TextData::Get(0xD5EDEEEB);
  sprintf(acStr, (const char *)v38, acName);
  PartyJoinProposeWin::SetMsg(v2, acStr);
  v49 = -1;
  if ( spNode.m_pObject )
  {
    v39 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v39 )
        v39->vfptr->__vecDelDtor((NiRefObject *)v39, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0055FFB0) --------------------------------------------------------
void __thiscall PartyJoinProposeWin::OnCommand(PartyJoinProposeWin *this, unsigned int wParam, int lParam)
{
  if ( wParam )
  {
    if ( wParam == 1 )
      PartyJoinProposeWin::OnBut2(this);
  }
  else
  {
    PartyJoinProposeWin::OnBut1(this);
  }
}

//----- (0055FFD0) --------------------------------------------------------
void __thiscall PartyJoinProposeWin::PartyJoinProposeWin(PartyJoinProposeWin *this)
{
  PartyJoinProposeWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  ITimer::ITimer((ITimer *)&v1->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&PartyJoinProposeWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&PartyJoinProposeWin::`vftable'{for `IDirectMessenger'};
  v1->vfptr = (ITimerVtbl *)&PartyJoinProposeWin::`vftable';
  `eh vector constructor iterator'(
    v1->m_apkTextWin,
    4u,
    2,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
}
// 999988: using guessed type int (__stdcall *PartyJoinProposeWin::`vftable')(int);
// 999994: using guessed type void (__thiscall *PartyJoinProposeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9999B4: using guessed type int (__thiscall *PartyJoinProposeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00560060) --------------------------------------------------------
PartyJoinProposeWin *__cdecl PartyJoinProposeWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  PartyJoinProposeWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x190u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    PartyJoinProposeWin::PartyJoinProposeWin((PartyJoinProposeWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (PartyJoinProposeWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00560190) --------------------------------------------------------
PartyJoinProposeWin *__thiscall PartyJoinProposeWin::`vector deleting destructor'(char *this, unsigned int a2)
{
  return PartyJoinProposeWin::`scalar deleting destructor'((PartyJoinProposeWin *)(this - 344), a2);
}

//----- (005601A0) --------------------------------------------------------
PartyJoinProposeWin *__thiscall PartyJoinProposeWin::`scalar deleting destructor'(PartyJoinProposeWin *this, unsigned int a2)
{
  PartyJoinProposeWin *v2; // esi@1

  v2 = this;
  PartyJoinProposeWin::~PartyJoinProposeWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005601E0) --------------------------------------------------------
void PartyLootSetupWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "PartyRootOption");
}

//----- (00560210) --------------------------------------------------------
void __thiscall PartyLootSelectWin::PartyLootSelectWin(PartyLootSelectWin *this)
{
  PartyLootSelectWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&PartyLootSelectWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&PartyLootSelectWin::`vftable'{for `IDirectMessenger'};
}
// 999EE0: using guessed type void (__thiscall *PartyLootSelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 999EFC: using guessed type int (__thiscall *PartyLootSelectWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00560230) --------------------------------------------------------
void __thiscall PartyLootSelectWin::~PartyLootSelectWin(PartyLootSelectWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&PartyLootSelectWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PartyLootSelectWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 999EE0: using guessed type void (__thiscall *PartyLootSelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 999EFC: using guessed type int (__thiscall *PartyLootSelectWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00560250) --------------------------------------------------------
void __thiscall PartyLootSelectWin::OnSlideBtnUp(PartyLootSelectWin *this)
{
  SlideBar::OnClick1(this->m_pkSlideBarEx);
}

//----- (00560260) --------------------------------------------------------
void PartyLootSelectWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "RaidRootSelect");
}

//----- (00560290) --------------------------------------------------------
void __thiscall PartyLootSetupWin::SetLooterName(PartyLootSetupWin *this, const char *name)
{
  if ( name )
    ((void (__stdcall *)(_DWORD))this->m_spText[2].m_pObject->vfptr[118].__vecDelDtor)(name);
}

//----- (005602B0) --------------------------------------------------------
void __thiscall PartyLootSelectWin::UpdateMeWin(PartyLootSelectWin *this, float fCurTime)
{
  PartyLootSelectWin *v2; // esi@1
  Name5 *v3; // eax@1
  unsigned int v4; // eax@4
  PartyMemberInfo *v5; // eax@7
  unsigned int v6; // ecx@7
  unsigned int v7; // esi@7
  unsigned int v8; // edi@7
  unsigned int v9; // ebx@7
  unsigned int v10; // eax@7
  Name5 *v11; // eax@7
  unsigned int v12; // eax@11
  unsigned int j; // [sp+4h] [bp-78h]@6
  PartyLootSelectWin *v14; // [sp+8h] [bp-74h]@1
  Name5 result; // [sp+Ch] [bp-70h]@7
  Name5 kTargetID; // [sp+20h] [bp-5Ch]@1
  Name5 kMasterID; // [sp+34h] [bp-48h]@1
  char acstr[21]; // [sp+48h] [bp-34h]@7
  char acName[21]; // [sp+60h] [bp-1Ch]@1

  v2 = this;
  v14 = this;
  SlideListWin::RemoveAllList(this->m_pSeletMemberList);
  Party::GetPartyMasterID(&g_kParty, &kMasterID);
  *(Name5 *)acName = kMasterID;
  acName[20] = 0;
  v3 = Party::GetLooterID(&g_kParty, &kTargetID);
  if ( *(_QWORD *)&kMasterID.n5_name[0] != *(_QWORD *)&v3->n5_code[0]
    || *(_QWORD *)&kMasterID.n5_code[2] != *(_QWORD *)&v3->n5_code[2]
    || kMasterID.n5_code[4] != v3->n5_code[4] )
  {
    SlideListWin::AddText(v2->m_pSeletMemberList, acName);
  }
  else
  {
    v4 = SlideListWin::AddText(v2->m_pSeletMemberList, acName);
    SlideListWin::SetFontColor(v2->m_pSeletMemberList, v4, 0, 255, 255, 0);
  }
  j = 0;
  if ( g_kParty.m_uiTotalMember )
  {
    do
    {
      v5 = Party::GetMemberInfo(&g_kParty, j);
      v6 = v5->m_kCharID.n5_code[3];
      v7 = v5->m_kCharID.n5_code[0];
      v8 = v5->m_kCharID.n5_code[1];
      v9 = v5->m_kCharID.n5_code[2];
      v10 = v5->m_kCharID.n5_code[4];
      *(_QWORD *)&kTargetID.n5_code[3] = __PAIR__(v10, v6);
      *(_DWORD *)&acstr[12] = v6;
      *(_DWORD *)acstr = v7;
      *(_DWORD *)&acstr[4] = v8;
      *(_DWORD *)&acstr[8] = v9;
      *(_DWORD *)&acstr[16] = v10;
      acstr[20] = 0;
      v11 = Party::GetLooterID(&g_kParty, &result);
      if ( v7 != v11->n5_code[0]
        || v8 != v11->n5_code[1]
        || __PAIR__(kTargetID.n5_code[3], v9) != *(_QWORD *)&v11->n5_code[2]
        || kTargetID.n5_code[4] != v11->n5_code[4] )
      {
        SlideListWin::AddText(v14->m_pSeletMemberList, acstr);
      }
      else
      {
        v12 = SlideListWin::AddText(v14->m_pSeletMemberList, acstr);
        SlideListWin::SetFontColor(v14->m_pSeletMemberList, v12, 0, 255, 255, 0);
      }
      ++j;
    }
    while ( j < g_kParty.m_uiTotalMember );
    v2 = v14;
  }
  SlideListWin::UpdateViewList(v2->m_pSeletMemberList);
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
    GameFrameWork::UpdateUIScroll(v2->m_pSeletMemberList, v2->m_pkSlideBarEx);
}

//----- (00560490) --------------------------------------------------------
void __thiscall PartyLootSelectWin::OnSlideBar(PartyLootSelectWin *this)
{
  PartyLootSelectWin *v1; // esi@1
  SlideListWin *v2; // eax@1
  SlideBar *v3; // ecx@2

  v1 = this;
  v2 = this->m_pSeletMemberList;
  if ( v2 )
  {
    v3 = this->m_pkSlideBarEx;
    if ( v3 )
    {
      SlideBar::SetSplitCnt(v3, v2->m_nSlideSplitCnt);
      v1->m_pSeletMemberList->m_nViewStartPos = v1->m_pkSlideBarEx->m_nCurPos;
      SlideListWin::UpdateViewList(v1->m_pSeletMemberList);
    }
  }
}

//----- (005604E0) --------------------------------------------------------
void __thiscall PartyLootSetupWin::~PartyLootSetupWin(PartyLootSetupWin *this)
{
  PartyLootSetupWin *v1; // esi@1
  NiPointer<PgWinText> *v2; // ebx@1
  PgWinText *v3; // edi@2
  PgWinText *v4; // edi@7
  PgWinText *v5; // edi@13
  PgWinText *v6; // edi@18
  PopupMenuWin *v7; // edi@22
  PopupMenuWin *v8; // edi@26
  PopupMenuWin *v9; // edi@30
  PopupMenuWin *v10; // edi@34
  signed int v11; // [sp+14h] [bp-10h]@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&PartyLootSetupWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PartyLootSetupWin::`vftable'{for `IDirectMessenger'};
  PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&this->m_spPopupMenu.m_pObject->vfptr);
  PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_spItemGradePopupMenu.m_pObject->vfptr);
  PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_spLooterPopupMenu.m_pObject->vfptr);
  v2 = v1->m_spText;
  v11 = 3;
  do
  {
    v3 = v2[-3].m_pObject;
    if ( v3 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      v2[-3].m_pObject = 0;
    }
    v4 = v2->m_pObject;
    if ( v2->m_pObject )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      v2->m_pObject = 0;
    }
    ++v2;
    --v11;
  }
  while ( v11 );
  v5 = v1->m_spLootName.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spLootName.m_pObject = 0;
  }
  v6 = v1->m_spLootName.m_pObject;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  v7 = v1->m_spLooterPopupMenu.m_pObject;
  if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  v8 = v1->m_spItemGradePopupMenu.m_pObject;
  if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
    v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
  `eh vector destructor iterator'(
    v1->m_spText,
    4u,
    3,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_spBtn,
    4u,
    3,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v9 = v1->m_spPopupMenu.m_pObject;
  if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
    v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
  v10 = v1->m_spDicePopupMenu.m_pObject;
  if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
    v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 99A120: using guessed type void (__thiscall *PartyLootSetupWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99A13C: using guessed type int (__thiscall *PartyLootSetupWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00560700) --------------------------------------------------------
char __thiscall PartyLootSetupWin::Create(PartyLootSetupWin *this, PgFrameWork *pkFrameWork)
{
  PartyLootSetupWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiAVObject *v5; // eax@4
  NiTexturingProperty *v6; // eax@4
  NiTexturingProperty *v7; // edi@4
  NiTexturingProperty::Map *v8; // eax@6
  NiSourceTexture *v9; // eax@7
  NiNode *v10; // esi@10
  char result; // al@14
  PgSprData *v12; // eax@15
  NiNode *v13; // esi@18
  int v14; // edi@22
  int v15; // ebx@22
  NiSourceTexture *v16; // eax@22
  PgSprData *v17; // eax@23
  D3DXCOLOR v18; // ST30_16@25
  char *v19; // eax@25
  PgWinText *v20; // eax@25
  D3DXCOLOR v21; // ST30_16@25
  char *v22; // eax@25
  PgWinText *v23; // eax@25
  D3DXCOLOR v24; // ST30_16@25
  char *v25; // eax@25
  PgWinText *v26; // eax@25
  D3DXCOLOR v27; // ST30_16@25
  char *v28; // eax@25
  PgWinText *v29; // eax@25
  NiD3DDefaultShader *v30; // eax@25
  NiD3DDefaultShader *v31; // eax@25
  NiD3DDefaultShader *v32; // eax@25
  D3DXCOLOR v33; // ST30_16@25
  int v34; // edi@25
  char *v35; // eax@25
  NiD3DDefaultShader *v36; // eax@25
  D3DXCOLOR v37; // ST30_16@25
  char *v38; // eax@25
  NiD3DDefaultShader *v39; // eax@25
  D3DXCOLOR v40; // ST30_16@25
  NiD3DDefaultShader *v41; // eax@25
  signed int v42; // ebx@25
  NiSourceTexture *v43; // edi@27
  NiSourceTexture *v44; // eax@29
  PopupMenuWin *v45; // eax@29
  PopupMenuWin *v46; // edi@29
  PopupMenuWin *v47; // ebx@29
  int v48; // edi@36
  char *v49; // eax@36
  PopupMenuText *v50; // eax@36
  char *v51; // eax@36
  PopupMenuText *v52; // eax@36
  char *v53; // eax@36
  PopupMenuText *v54; // eax@36
  char *v55; // eax@36
  PopupMenuText *v56; // eax@36
  NiSourceTexture *v57; // eax@36
  PopupMenuWin *v58; // eax@36
  PopupMenuWin *v59; // ebx@36
  char *v60; // eax@44
  PopupMenuText *v61; // eax@44
  char *v62; // eax@44
  PopupMenuText *v63; // eax@44
  char *v64; // eax@44
  PopupMenuText *v65; // eax@44
  char *v66; // eax@44
  PopupMenuText *v67; // eax@44
  NiSourceTexture *v68; // eax@44
  PopupMenuWin *v69; // eax@44
  PopupMenuWin *v70; // ebx@44
  NiTexturingProperty *v71; // esi@52
  NiNode *v72; // esi@54
  UIUtil ui; // [sp+54h] [bp-30h]@25
  NiPointer<NiTexturingProperty> spTexProp; // [sp+68h] [bp-1Ch]@4
  int uiLeft; // [sp+6Ch] [bp-18h]@15
  int uiTop; // [sp+70h] [bp-14h]@15
  NiPointer<NiNode> spNode; // [sp+74h] [bp-10h]@1
  int v78; // [sp+80h] [bp-4h]@1
  PgFrameWork *pkFrameWorka; // [sp+8Ch] [bp+8h]@36
  PgFrameWork *pkFrameWorkb; // [sp+8Ch] [bp+8h]@44

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v78 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\PartyRootOption.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Frame");
  v6 = (NiTexturingProperty *)NiAVObject::GetProperty(v5, 8);
  v7 = v6;
  spTexProp.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v8 = *v7->m_kMaps.m_pBase;
  LOBYTE(v78) = 1;
  if ( !v8 || (v9 = (NiSourceTexture *)v8->m_spTexture.m_pObject) == 0 )
  {
    LOBYTE(v78) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v10 = spNode.m_pObject;
    v78 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
    return 0;
  }
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v9);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v12, 0, pkFrameWork, "PartyLootSetupWin", 0) )
  {
    v14 = uiLeft;
    v15 = uiTop;
    v16 = MenuTexMgr::GetTexture(0x13u);
    if ( v16 )
      v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v16);
    else
      v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v17, (PgWin *)&v2->vfptr, 0, 0);
    UIUtil::UIUtil(&ui);
    LOBYTE(v78) = 2;
    UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
    UIUtil::SetOffset(&ui, v14, v15);
    UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
    UIUtil::CreateSpr(&ui, "Panel01", 0);
    UIUtil::CreateSpr(&ui, "Panel02", 0);
    *(_QWORD *)&v18.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v18.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v19 = (char *)TextData2::Get(0xBC907078);
    v20 = UIUtil::CreateTextNoSpr(&ui, "WinTitle", v19, v18, 5u);
    v20->vfptr[122].__vecDelDtor((NiRefObject *)v20, 1u);
    UIUtil::CreateBtn(&ui, 0, "ClsNor", "ClsClick", "ClsOver", 0, 0);
    *(_QWORD *)&v21.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v21.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v22 = (char *)TextData3::Get(0x949172F1);
    v23 = UIUtil::CreateTextNoSpr(&ui, "GainMethod", v22, v21, 5u);
    v23->vfptr[122].__vecDelDtor((NiRefObject *)v23, 4u);
    *(_QWORD *)&v24.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v24.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v25 = (char *)TextData3::Get(0xCF47F72D);
    v26 = UIUtil::CreateTextNoSpr(&ui, "ItemGrade", v25, v24, 5u);
    v26->vfptr[122].__vecDelDtor((NiRefObject *)v26, 4u);
    *(_QWORD *)&v27.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v27.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v28 = (char *)TextData2::Get(0x64462634u);
    v29 = UIUtil::CreateTextNoSpr(&ui, "RootSelect", v28, v27, 5u);
    v29->vfptr[122].__vecDelDtor((NiRefObject *)v29, 4u);
    v30 = (NiD3DDefaultShader *)UIUtil::CreateBtn(&ui, 1u, "GainMethodNor", "GainMethodClick", "GainMethodOver", 0, 0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)v2->m_spBtn, v30);
    v31 = (NiD3DDefaultShader *)UIUtil::CreateBtn(&ui, 2u, "ItemGradeNor", "ItemGradeClick", "ItemGradeOver", 0, 0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spBtn[1], v31);
    v32 = (NiD3DDefaultShader *)UIUtil::CreateBtn(&ui, 3u, "RootSelectNor", "RootSelectClick", "RootSelectOver", 0, 0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spBtn[2], v32);
    *(_QWORD *)&v33.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v33.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v34 = (int)v2->m_spText;
    v35 = (char *)TextData::Get(0xE54F4142);
    v36 = (NiD3DDefaultShader *)UIUtil::CreateTextNoSpr(&ui, "GainMethod_Text", v35, v33, 5u);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)v2->m_spText, v36);
    *(_QWORD *)&v37.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v37.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v38 = (char *)TextData3::Get(0xD77667Au);
    v39 = (NiD3DDefaultShader *)UIUtil::CreateTextNoSpr(&ui, "ItemGrade_Text", v38, v37, 5u);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spText[1], v39);
    *(_QWORD *)&v40.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v40.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v41 = (NiD3DDefaultShader *)UIUtil::CreateTextNoSpr(&ui, "RootSelect_Text", byte_999BED, v40, 5u);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spText[2], v41);
    v42 = 3;
    do
    {
      (*(void (__stdcall **)(signed int))(**(_DWORD **)v34 + 488))(4);
      v34 += 4;
      --v42;
    }
    while ( v42 );
    v2->m_eLootType = 0;
    v2->m_eItemType = 0;
    v43 = MenuTexMgr::GetTexture(4u);
    if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
      UIUtil::CreateBtn(&ui, 5u, "HelpLinkNor", "HelpLinkClick", "HelpLinkOver", 0, v43);
    v44 = MenuTexMgr::GetTexture(1u);
    v45 = PopupMenuWin::CreateWin(v44, 4u, 4u, 0);
    v46 = v2->m_spPopupMenu.m_pObject;
    v47 = v45;
    if ( v46 != v45 )
    {
      if ( v46 && !InterlockedDecrement((volatile LONG *)&v46->m_uiRefCount) && v46 )
        v46->vfptr->__vecDelDtor((NiRefObject *)v46, 1u);
      v2->m_spPopupMenu.m_pObject = v47;
      if ( v47 )
        InterlockedIncrement((volatile LONG *)&v47->m_uiRefCount);
    }
    v48 = (int)&v2->vfptr;
    v2->m_spPopupMenu.m_pObject->vfptr->SetMsgHooker(&v2->m_spPopupMenu.m_pObject->vfptr, &v2->vfptr);
    PopupMenuWin::Clear(v2->m_spPopupMenu.m_pObject);
    v49 = (char *)TextData::Get(0xE54F4142);
    v50 = PopupMenuText::CreateWin(v49, 0, 0, 0, 0, 0, 0);
    v50->m_ePopupMenuID = 1028;
    PopupMenuWin::AddMenu(v2->m_spPopupMenu.m_pObject, (int)&v2->vfptr, (PopupMenu *)&v50->vfptr);
    v51 = (char *)TextData::Get(0x78A8A1CFu);
    v52 = PopupMenuText::CreateWin(v51, 0, 0, 0, 0, 0, 0);
    v52->m_ePopupMenuID = 1029;
    PopupMenuWin::AddMenu(v2->m_spPopupMenu.m_pObject, (int)&v2->vfptr, (PopupMenu *)&v52->vfptr);
    v53 = (char *)TextData2::Get(0x799878B4u);
    v54 = PopupMenuText::CreateWin(v53, 0, 0, 0, 0, 0, 0);
    v54->m_ePopupMenuID = 1030;
    PopupMenuWin::AddMenu(v2->m_spPopupMenu.m_pObject, (int)&v2->vfptr, (PopupMenu *)&v54->vfptr);
    v55 = (char *)TextData2::Get(0x2C518D68u);
    v56 = PopupMenuText::CreateWin(v55, 0, 0, 0, 0, 0, 0);
    v56->m_ePopupMenuID = 1032;
    PopupMenuWin::AddMenu(v2->m_spPopupMenu.m_pObject, (int)&v2->vfptr, (PopupMenu *)&v56->vfptr);
    PopupMenuWin::FinishMenu(v2->m_spPopupMenu.m_pObject, 0);
    ((void (__stdcall *)(_DWORD))v2->m_spPopupMenu.m_pObject->vfptr[64].__vecDelDtor)(0);
    v57 = MenuTexMgr::GetTexture(1u);
    v58 = PopupMenuWin::CreateWin(v57, 4u, 4u, 0);
    v59 = v2->m_spItemGradePopupMenu.m_pObject;
    pkFrameWorka = (PgFrameWork *)v58;
    if ( v59 != v58 )
    {
      if ( v59 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v59->m_uiRefCount) && v59 )
          v59->vfptr->__vecDelDtor((NiRefObject *)v59, 1u);
        v58 = (PopupMenuWin *)pkFrameWorka;
      }
      v2->m_spItemGradePopupMenu.m_pObject = v58;
      if ( v58 )
        InterlockedIncrement((volatile LONG *)&v58->m_uiRefCount);
    }
    v2->m_spItemGradePopupMenu.m_pObject->vfptr->SetMsgHooker(&v2->m_spItemGradePopupMenu.m_pObject->vfptr, &v2->vfptr);
    PopupMenuWin::Clear(v2->m_spItemGradePopupMenu.m_pObject);
    v60 = (char *)TextData3::Get(0xD77667Au);
    v61 = PopupMenuText::CreateWin(v60, 0, 0, 0, 0, 0, 0);
    v61->m_ePopupMenuID = 1038;
    PopupMenuWin::AddMenu(v2->m_spItemGradePopupMenu.m_pObject, v48, (PopupMenu *)&v61->vfptr);
    v62 = (char *)TextData3::Get(0xD78667Au);
    v63 = PopupMenuText::CreateWin(v62, 0, 0, 0, 0, 0, 0);
    v63->m_ePopupMenuID = 1039;
    PopupMenuWin::AddMenu(v2->m_spItemGradePopupMenu.m_pObject, v48, (PopupMenu *)&v63->vfptr);
    v64 = (char *)TextData3::Get(0xD79667Au);
    v65 = PopupMenuText::CreateWin(v64, 0, 0, 0, 0, 0, 0);
    v65->m_ePopupMenuID = 1040;
    PopupMenuWin::AddMenu(v2->m_spItemGradePopupMenu.m_pObject, v48, (PopupMenu *)&v65->vfptr);
    v66 = (char *)TextData3::Get(0xD7A667Au);
    v67 = PopupMenuText::CreateWin(v66, 0, 0, 0, 0, 0, 0);
    v67->m_ePopupMenuID = 1041;
    PopupMenuWin::AddMenu(v2->m_spItemGradePopupMenu.m_pObject, v48, (PopupMenu *)&v67->vfptr);
    PopupMenuWin::FinishMenu(v2->m_spItemGradePopupMenu.m_pObject, 0);
    ((void (__stdcall *)(_DWORD))v2->m_spItemGradePopupMenu.m_pObject->vfptr[64].__vecDelDtor)(0);
    v68 = MenuTexMgr::GetTexture(1u);
    v69 = PopupMenuWin::CreateWin(v68, 4u, 4u, 0);
    v70 = v2->m_spLooterPopupMenu.m_pObject;
    pkFrameWorkb = (PgFrameWork *)v69;
    if ( v70 != v69 )
    {
      if ( v70 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v70->m_uiRefCount) && v70 )
          v70->vfptr->__vecDelDtor((NiRefObject *)v70, 1u);
        v69 = (PopupMenuWin *)pkFrameWorkb;
      }
      v2->m_spLooterPopupMenu.m_pObject = v69;
      if ( v69 )
        InterlockedIncrement((volatile LONG *)&v69->m_uiRefCount);
    }
    v2->m_spLooterPopupMenu.m_pObject->vfptr->SetMsgHooker(&v2->m_spLooterPopupMenu.m_pObject->vfptr, &v2->vfptr);
    ((void (__thiscall *)(PartyLootSetupWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    LOBYTE(v78) = 1;
    UIUtil::~UIUtil(&ui);
    v71 = spTexProp.m_pObject;
    LOBYTE(v78) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
      v71->vfptr->__vecDelDtor((NiRefObject *)v71, 1u);
    v72 = spNode.m_pObject;
    v78 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v72 )
      v72->vfptr->__vecDelDtor((NiRefObject *)v72, 1u);
    result = 1;
  }
  else
  {
    LOBYTE(v78) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v13 = spNode.m_pObject;
    v78 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v13 )
      return 0;
    ((void (__thiscall *)(NiNode *))v13->vfptr->__vecDelDtor)(v13);
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00561070) --------------------------------------------------------
void __thiscall PartyLootSetupWin::UpdateLooterList(PartyLootSetupWin *this)
{
  PartyLootSetupWin *v1; // edi@1
  PgWinText *v2; // ecx@1
  PopupMenuText *v3; // eax@1
  unsigned int i; // esi@1
  PartyMemberInfo *v5; // eax@2
  int v6; // edx@2
  unsigned int v7; // ecx@2
  int kTargetID_8; // ST30_4@2
  int v9; // ebx@2
  int v10; // eax@2
  PopupMenuText *v11; // eax@2
  Name5 kMasterID; // [sp+20h] [bp-74h]@1
  Name5 kLooterID; // [sp+34h] [bp-60h]@1
  char acName[21]; // [sp+48h] [bp-4Ch]@1
  char acstr[21]; // [sp+60h] [bp-34h]@1
  char pcText[4]; // [sp+78h] [bp-1Ch]@2
  int v17; // [sp+7Ch] [bp-18h]@2
  int v18; // [sp+80h] [bp-14h]@2
  int v19; // [sp+84h] [bp-10h]@2
  int v20; // [sp+88h] [bp-Ch]@2
  char v21; // [sp+8Ch] [bp-8h]@2

  v1 = this;
  PopupMenuWin::Clear(this->m_spLooterPopupMenu.m_pObject);
  Party::GetLooterID(&g_kParty, &kLooterID);
  *(Name5 *)acName = kLooterID;
  v2 = v1->m_spText[2].m_pObject;
  acName[20] = 0;
  ((void (__stdcall *)(char *))v2->vfptr[118].__vecDelDtor)(acName);
  Party::GetPartyMasterID(&g_kParty, &kMasterID);
  *(Name5 *)acstr = kMasterID;
  acstr[20] = 0;
  v3 = PopupMenuText::CreateWin(acstr, 0, 0, 0, 0, 0, 0);
  v3->m_ePopupMenuID = 1042;
  PopupMenuWin::AddMenu(v1->m_spLooterPopupMenu.m_pObject, (int)v1, (PopupMenu *)&v3->vfptr);
  for ( i = 0; i < g_kParty.m_uiTotalMember; ++i )
  {
    v5 = Party::GetMemberInfo(&g_kParty, i);
    v6 = v5->m_kCharID.n5_code[1];
    v7 = v5->m_kCharID.n5_code[0];
    kTargetID_8 = v5->m_kCharID.n5_code[2];
    v9 = v5->m_kCharID.n5_code[3];
    v10 = v5->m_kCharID.n5_code[4];
    v19 = v9;
    v20 = v10;
    v17 = v6;
    *(_DWORD *)pcText = v7;
    v18 = kTargetID_8;
    v21 = 0;
    v11 = PopupMenuText::CreateWin(pcText, 0, 0, 0, 0, 0, 0);
    v11->m_ePopupMenuID = i + 1043;
    PopupMenuWin::AddMenu(v1->m_spLooterPopupMenu.m_pObject, (int)v1, (PopupMenu *)&v11->vfptr);
  }
  PopupMenuWin::FinishMenu(v1->m_spLooterPopupMenu.m_pObject, 0);
  v1->m_spLooterPopupMenu.m_pObject->vfptr[64].__vecDelDtor((NiRefObject *)v1->m_spLooterPopupMenu.m_pObject, 0);
}

//----- (005611E0) --------------------------------------------------------
void __thiscall PartyLootSetupWin::ChangeLooter(PartyLootSetupWin *this, unsigned int index)
{
  PartyMemberInfo *v2; // eax@2
  _BYTE v3[20]; // ST00_20@4
  PartyLootSetupWin *v4; // [sp+Ch] [bp-1Ch]@1
  Name5 result; // [sp+10h] [bp-18h]@2

  v4 = this;
  if ( index )
    v2 = Party::GetMemberInfo(&g_kParty, index - 1);
  else
    v2 = (PartyMemberInfo *)Party::GetPartyMasterID(&g_kParty, &result);
  *(_DWORD *)v3 = v2->m_kCharID.n5_code[0];
  *(_QWORD *)&v3[4] = *(_QWORD *)&v2->m_kCharID.n5_code[1];
  *(_QWORD *)&v3[12] = *(_QWORD *)&v2->m_kCharID.n5_code[3];
  GameFrameWork::NcPartySetLooterReq((GameFrameWork *)v4->m_pkFrameWork, *(Name5 *)v3);
}

//----- (00561260) --------------------------------------------------------
void __userpurge PartyLootSetupWin::OnCommand(PartyLootSetupWin *this@<ecx>, int a2@<edi>, unsigned int wParam, int lParam)
{
  PartyLootSetupWin *v4; // esi@1
  PgWinBut *v5; // edi@6
  NiRefObjectVtbl *v6; // ST14_4@6
  int v7; // ebx@6
  int v8; // ebx@6
  int v9; // ST08_4@6
  int v10; // edi@6
  int v11; // eax@6
  int v12; // edi@6
  int v13; // eax@6
  PgWinBut *v14; // edi@10
  NiRefObjectVtbl *v15; // ST14_4@10
  int v16; // ebx@10
  int v17; // ebx@10
  int v18; // ST08_4@10
  int v19; // edi@10
  int v20; // eax@10
  int v21; // edi@10
  int v22; // eax@10
  PgWinBut *v23; // edi@14
  NiRefObjectVtbl *v24; // ST14_4@14
  int v25; // ebx@14
  int v26; // ebx@14
  int v27; // ST08_4@14
  int v28; // edi@14
  int v29; // eax@14
  int v30; // edi@14
  int v31; // eax@14
  GameFrameWork *v32; // eax@15
  unsigned int wParama; // [sp+10h] [bp+8h]@6
  NiRefObjectVtbl **wParamb; // [sp+10h] [bp+8h]@10
  NiRefObjectVtbl **wParamc; // [sp+10h] [bp+8h]@14

  v4 = this;
  switch ( wParam )
  {
    case 0u:
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
      break;
    case 1u:
      if ( (unsigned __int8)Party::IsMePartyMaster(&g_kParty) )
      {
        if ( (unsigned __int8)((int (__stdcall *)(int))v4->m_spPopupMenu.m_pObject->vfptr[65].__vecDelDtor)(a2) )
        {
          PgWinMgr::ClosePopupWin(&Pgg_kWinMgr, (PgWin *)&v4->m_spPopupMenu.m_pObject->vfptr);
        }
        else
        {
          v5 = v4->m_spBtn[0].m_pObject;
          wParama = (unsigned int)v4->m_spPopupMenu.m_pObject;
          v6 = v4->m_spPopupMenu.m_pObject->vfptr + 77;
          v7 = ((int (__thiscall *)(PgWinBut *))v5->vfptr[42].__vecDelDtor)(v4->m_spBtn[0].m_pObject);
          v8 = ((int (__thiscall *)(PgWinBut *))v5->vfptr[37].__vecDelDtor)(v5) + v7;
          v9 = v8 + ((int (__thiscall *)(PartyLootSetupWin *))v4->vfptr[42].__vecDelDtor)(v4);
          v10 = ((int (__thiscall *)(PgWinBut *))v5->vfptr[41].__vecDelDtor)(v5);
          v11 = ((int (__thiscall *)(PartyLootSetupWin *))v4->vfptr[41].__vecDelDtor)(v4);
          v6->__vecDelDtor(wParama, v11 + v10);
          v12 = ((int (*)(void))v4->m_spBtn[0].m_pObject->vfptr[36].__vecDelDtor)();
          v13 = ((int (*)(void))v4->m_spPopupMenu.m_pObject->vfptr[37].__vecDelDtor)();
          ((void (__stdcall *)(int, int))v4->m_spPopupMenu.m_pObject->vfptr[135].__vecDelDtor)(v12 - 22, v13);
          PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v4->m_spPopupMenu.m_pObject->vfptr);
          v4->m_spPopupMenu.m_pObject->vfptr[130].__vecDelDtor((NiRefObject *)v4->m_spPopupMenu.m_pObject, 0);
        }
      }
      break;
    case 2u:
      if ( (unsigned __int8)Party::IsMePartyMaster(&g_kParty) )
      {
        if ( (unsigned __int8)((int (__stdcall *)(int))v4->m_spItemGradePopupMenu.m_pObject->vfptr[65].__vecDelDtor)(a2) )
        {
          PgWinMgr::ClosePopupWin(&Pgg_kWinMgr, (PgWin *)&v4->m_spItemGradePopupMenu.m_pObject->vfptr);
        }
        else
        {
          v14 = v4->m_spBtn[1].m_pObject;
          wParamb = &v4->m_spItemGradePopupMenu.m_pObject->vfptr;
          v15 = *wParamb + 77;
          v16 = ((int (__thiscall *)(PgWinBut *))v14->vfptr[42].__vecDelDtor)(v4->m_spBtn[1].m_pObject);
          v17 = ((int (__thiscall *)(PgWinBut *))v14->vfptr[37].__vecDelDtor)(v14) + v16;
          v18 = v17 + ((int (__thiscall *)(PartyLootSetupWin *))v4->vfptr[42].__vecDelDtor)(v4);
          v19 = ((int (__thiscall *)(PgWinBut *))v14->vfptr[41].__vecDelDtor)(v14);
          v20 = ((int (__thiscall *)(PartyLootSetupWin *))v4->vfptr[41].__vecDelDtor)(v4);
          v15->__vecDelDtor(wParamb, v20 + v19);
          v21 = ((int (*)(void))v4->m_spBtn[1].m_pObject->vfptr[36].__vecDelDtor)();
          v22 = ((int (*)(void))v4->m_spItemGradePopupMenu.m_pObject->vfptr[37].__vecDelDtor)();
          ((void (__stdcall *)(int, int))v4->m_spItemGradePopupMenu.m_pObject->vfptr[135].__vecDelDtor)(v21 - 22, v22);
          ((void (__stdcall *)(_DWORD))v4->m_spItemGradePopupMenu.m_pObject->vfptr[130].__vecDelDtor)(0);
          PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v4->m_spItemGradePopupMenu.m_pObject->vfptr);
        }
      }
      break;
    case 3u:
      if ( (unsigned __int8)Party::IsMePartyMaster(&g_kParty) )
      {
        if ( (unsigned __int8)((int (__stdcall *)(int))v4->m_spLooterPopupMenu.m_pObject->vfptr[65].__vecDelDtor)(a2) )
        {
          PgWinMgr::ClosePopupWin(&Pgg_kWinMgr, (PgWin *)&v4->m_spLooterPopupMenu.m_pObject->vfptr);
        }
        else
        {
          PartyLootSetupWin::UpdateLooterList(v4);
          v23 = v4->m_spBtn[2].m_pObject;
          wParamc = &v4->m_spLooterPopupMenu.m_pObject->vfptr;
          v24 = *wParamc + 77;
          v25 = ((int (__thiscall *)(PgWinBut *))v23->vfptr[37].__vecDelDtor)(v4->m_spBtn[2].m_pObject);
          v26 = ((int (__thiscall *)(PgWinBut *))v23->vfptr[42].__vecDelDtor)(v23) + v25;
          v27 = v26 + ((int (__thiscall *)(_DWORD))v4->vfptr[42].__vecDelDtor)(v4);
          v28 = ((int (__thiscall *)(PgWinBut *))v23->vfptr[41].__vecDelDtor)(v23);
          v29 = ((int (__thiscall *)(_DWORD))v4->vfptr[41].__vecDelDtor)(v4);
          v24->__vecDelDtor(wParamc, v29 + v28);
          v30 = ((int (*)(void))v4->m_spBtn[2].m_pObject->vfptr[36].__vecDelDtor)();
          v31 = ((int (*)(void))v4->m_spLooterPopupMenu.m_pObject->vfptr[37].__vecDelDtor)();
          ((void (__stdcall *)(int, int))v4->m_spLooterPopupMenu.m_pObject->vfptr[135].__vecDelDtor)(v30 - 22, v31);
          ((void (__stdcall *)(_DWORD))v4->m_spLooterPopupMenu.m_pObject->vfptr[130].__vecDelDtor)(0);
          PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v4->m_spLooterPopupMenu.m_pObject->vfptr);
        }
      }
      break;
    case 5u:
      v32 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v32 )
        GameFrameWork::OpenPlayGuideSearchList(v32, "PartyRootOption");
      break;
    default:
      return;
  }
}
// 561260: could not find valid save-restore pair for edi

//----- (00561610) --------------------------------------------------------
void __thiscall PartyLootSetupWin::DirectMessage(PartyLootSetupWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  if ( iMsgTag == 15 )
  {
    switch ( *(_DWORD *)pvBody )
    {
      case 0x404:
        GameFrameWork::NcPartyItemLootingSet(
          (GameFrameWork *)LODWORD(this->m_kLocal.m_Rotate.m_pEntry[1][0]),
          0,
          LOBYTE(this->m_kWorld.m_fScale));
        break;
      case 0x405:
        GameFrameWork::NcPartyItemLootingSet(
          (GameFrameWork *)LODWORD(this->m_kLocal.m_Rotate.m_pEntry[1][0]),
          LOOTING_TYPE_ORDER,
          LOBYTE(this->m_kWorld.m_fScale));
        break;
      case 0x406:
        GameFrameWork::NcPartyItemLootingSet(
          (GameFrameWork *)LODWORD(this->m_kLocal.m_Rotate.m_pEntry[1][0]),
          LOOTING_TYPE_LOOTER,
          LOBYTE(this->m_kWorld.m_fScale));
        break;
      case 0x408:
        GameFrameWork::NcPartyItemLootingSet(
          (GameFrameWork *)LODWORD(this->m_kLocal.m_Rotate.m_pEntry[1][0]),
          LOOTING_TYPE_DICE,
          LOBYTE(this->m_kWorld.m_fScale));
        break;
      case 0x40E:
        GameFrameWork::NcPartyItemLootingSet(
          (GameFrameWork *)LODWORD(this->m_kLocal.m_Rotate.m_pEntry[1][0]),
          SLODWORD(this->m_kWorld.m_Translate.z),
          0);
        break;
      case 0x40F:
        GameFrameWork::NcPartyItemLootingSet(
          (GameFrameWork *)LODWORD(this->m_kLocal.m_Rotate.m_pEntry[1][0]),
          SLODWORD(this->m_kWorld.m_Translate.z),
          1);
        break;
      case 0x410:
        GameFrameWork::NcPartyItemLootingSet(
          (GameFrameWork *)LODWORD(this->m_kLocal.m_Rotate.m_pEntry[1][0]),
          SLODWORD(this->m_kWorld.m_Translate.z),
          2);
        break;
      case 0x411:
        GameFrameWork::NcPartyItemLootingSet(
          (GameFrameWork *)LODWORD(this->m_kLocal.m_Rotate.m_pEntry[1][0]),
          SLODWORD(this->m_kWorld.m_Translate.z),
          3);
        break;
      case 0x412:
        PartyLootSetupWin::ChangeLooter((PartyLootSetupWin *)((char *)this - 232), 0);
        break;
      case 0x413:
        PartyLootSetupWin::ChangeLooter((PartyLootSetupWin *)((char *)this - 232), 1u);
        break;
      case 0x414:
        PartyLootSetupWin::ChangeLooter((PartyLootSetupWin *)((char *)this - 232), 2u);
        break;
      case 0x415:
        PartyLootSetupWin::ChangeLooter((PartyLootSetupWin *)((char *)this - 232), 3u);
        break;
      case 0x416:
        PartyLootSetupWin::ChangeLooter((PartyLootSetupWin *)((char *)this - 232), 4u);
        break;
      default:
        return;
    }
  }
}

//----- (00561790) --------------------------------------------------------
void __thiscall PartyLootSetupWin::SetLootingType(PartyLootSetupWin *this, char nLootingType)
{
  PartyLootSetupWin *v2; // esi@1
  PgWinText *v3; // ebx@2
  NiRefObjectVtbl *v4; // edi@2
  NiUnsharedGeometryGroup *v5; // eax@2
  PgWinText *v6; // ebx@3
  NiRefObjectVtbl *v7; // edi@3
  NiUnsharedGeometryGroup *v8; // eax@3
  PgWinText *v9; // ebx@4
  NiRefObjectVtbl *v10; // edi@4
  NiUnsharedGeometryGroup *v11; // eax@4

  v2 = this;
  switch ( nLootingType )
  {
    case 0:
      v3 = this->m_spText[0].m_pObject;
      v4 = v3->vfptr;
      v5 = TextData::Get(0xE54F4142);
      v4[118].__vecDelDtor((NiRefObject *)v3, (unsigned int)v5);
      v2->m_eLootType = (unsigned __int8)nLootingType;
      return;
    case 1:
      v6 = this->m_spText[0].m_pObject;
      v7 = v6->vfptr;
      v8 = TextData::Get(0x78A8A1CFu);
      goto LABEL_6;
    case 2:
      v9 = this->m_spText[0].m_pObject;
      v10 = v9->vfptr;
      v11 = TextData2::Get(0x799878B4u);
      v10[118].__vecDelDtor((NiRefObject *)v9, (unsigned int)v11);
      v2->m_eLootType = (unsigned __int8)nLootingType;
      return;
    case 3:
      v6 = this->m_spText[0].m_pObject;
      v7 = v6->vfptr;
      v8 = TextData2::Get(0x2C518D68u);
LABEL_6:
      v7[118].__vecDelDtor((NiRefObject *)v6, (unsigned int)v8);
      break;
    default:
      break;
  }
  v2->m_eLootType = (unsigned __int8)nLootingType;
}

//----- (00561870) --------------------------------------------------------
void __thiscall PartyLootSetupWin::SetItemGrade(PartyLootSetupWin *this, char nItemGrade)
{
  PartyLootSetupWin *v2; // esi@1
  PgWinText *v3; // ebx@5
  NiRefObjectVtbl *v4; // edi@5
  NiUnsharedGeometryGroup *v5; // eax@5
  PgWinText *v6; // ebx@7
  NiRefObjectVtbl *v7; // edi@7
  NiUnsharedGeometryGroup *v8; // eax@7
  unsigned int v9; // [sp-Ch] [bp-10h]@2
  unsigned int v10; // [sp-Ch] [bp-10h]@3

  v2 = this;
  switch ( nItemGrade )
  {
    case 0:
      v9 = 225928826;
      goto LABEL_5;
    case 1:
      v10 = 225994362;
      goto LABEL_7;
    case 2:
      v9 = 226059898;
LABEL_5:
      v3 = this->m_spText[1].m_pObject;
      v4 = v3->vfptr;
      v5 = TextData3::Get(v9);
      v4[118].__vecDelDtor((NiRefObject *)v3, (unsigned int)v5);
      v2->m_eItemType = (unsigned __int8)nItemGrade;
      return;
    case 3:
      v10 = 226125434;
LABEL_7:
      v6 = this->m_spText[1].m_pObject;
      v7 = v6->vfptr;
      v8 = TextData3::Get(v10);
      v7[118].__vecDelDtor((NiRefObject *)v6, (unsigned int)v8);
      break;
    default:
      break;
  }
  v2->m_eItemType = (unsigned __int8)nItemGrade;
}

//----- (00561910) --------------------------------------------------------
void __thiscall PartyLootSetupWin::PartyLootSetupWin(PartyLootSetupWin *this)
{
  PartyLootSetupWin *v1; // esi@1
  PopupMenuWin *v2; // edi@1
  PopupMenuWin *v3; // edi@6
  PopupMenuWin *v4; // edi@11
  PopupMenuWin *v5; // edi@16

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&PartyLootSetupWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&PartyLootSetupWin::`vftable'{for `IDirectMessenger'};
  v1->m_spDicePopupMenu.m_pObject = 0;
  v1->m_spPopupMenu.m_pObject = 0;
  `eh vector constructor iterator'(
    v1->m_spBtn,
    4u,
    3,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spText,
    4u,
    3,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_spItemGradePopupMenu.m_pObject = 0;
  v1->m_spLooterPopupMenu.m_pObject = 0;
  v1->m_spLootName.m_pObject = 0;
  v2 = v1->m_spPopupMenu.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spPopupMenu.m_pObject = 0;
  }
  v3 = v1->m_spDicePopupMenu.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spDicePopupMenu.m_pObject = 0;
  }
  v4 = v1->m_spItemGradePopupMenu.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spItemGradePopupMenu.m_pObject = 0;
  }
  v5 = v1->m_spLooterPopupMenu.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
    {
      if ( v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
    v1->m_spLooterPopupMenu.m_pObject = 0;
  }
}
// 99A120: using guessed type void (__thiscall *PartyLootSetupWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99A13C: using guessed type int (__thiscall *PartyLootSetupWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00561A80) --------------------------------------------------------
PartyLootSetupWin *__cdecl PartyLootSetupWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  PartyLootSetupWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x190u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    PartyLootSetupWin::PartyLootSetupWin((PartyLootSetupWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (PartyLootSetupWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00561BB0) --------------------------------------------------------
PartyLootSelectWin *__cdecl PartyLootSelectWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  PartyLootSelectWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x160u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&PartyLootSelectWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&PartyLootSelectWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (PartyLootSelectWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 999EE0: using guessed type void (__thiscall *PartyLootSelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 999EFC: using guessed type int (__thiscall *PartyLootSelectWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00561CF0) --------------------------------------------------------
void __thiscall PartyLootSelectWin::OnCommand(PartyLootSelectWin *this, unsigned int wParam, int lParam)
{
  PartyLootSelectWin *v3; // esi@1
  signed int v4; // eax@4
  char *v5; // eax@5
  const char *v6; // eax@5
  GameFrameWork *v7; // eax@8
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strText; // [sp+8h] [bp-54h]@5
  Name5 kCharID; // [sp+24h] [bp-38h]@7
  PROTO_NC_PARTY_SET_LOOTER_REQ kProto; // [sp+38h] [bp-24h]@7
  int v11; // [sp+58h] [bp-4h]@5

  v3 = this;
  switch ( wParam )
  {
    case 0u:
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
      PgWin::OnClose((PgWin *)&v3->vfptr);
      break;
    case 3u:
      PartyLootSelectWin::OnSlideBar(this);
      break;
    case 4u:
      v4 = SlideListWin::GetCurSelIndex(this->m_pSeletMemberList);
      if ( v4 >= 0 )
      {
        v5 = SlideListWin::GetText(v3->m_pSeletMemberList, v4, 0);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
          &strText,
          v5);
        v6 = strText._Bx._Ptr;
        v11 = 0;
        if ( strText._Myres < 0x10 )
          v6 = (const char *)&strText;
        Name5::Name5(&kCharID, v6);
        *(_QWORD *)&kProto.sNewLooterCharID.n5_code[1] = *(_QWORD *)&kCharID.n5_code[1];
        kProto.sNewLooterCharID.n5_code[0] = kCharID.n5_code[0];
        *(_QWORD *)&kProto.sNewLooterCharID.n5_code[3] = *(_QWORD *)&kCharID.n5_code[3];
        NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0xEu, 0x5Au, &kProto, 20);
        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
        PgWin::OnClose((PgWin *)&v3->vfptr);
        std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&strText);
      }
      break;
    case 5u:
      v7 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v7 )
        GameFrameWork::OpenPlayGuideSearchList(v7, "RaidRootSelect");
      break;
    default:
      return;
  }
}

//----- (00561E40) --------------------------------------------------------
char __thiscall PartyLootSelectWin::Create(PartyLootSelectWin *this, PgFrameWork *pkFrameWork)
{
  PartyLootSelectWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiAVObject *v5; // eax@4
  NiTexturingProperty *v6; // eax@4
  NiTexturingProperty *v7; // edi@4
  NiTexturingProperty::Map *v8; // eax@6
  NiSourceTexture *v9; // eax@7
  NiNode *v10; // edi@10
  char result; // al@14
  PgSprData *v12; // eax@15
  NiNode *v13; // edi@18
  int v14; // edi@22
  NiSourceTexture *v15; // eax@22
  PgSprData *v16; // eax@23
  D3DXCOLOR v17; // ST1C_16@25
  char *v18; // eax@25
  PgWinText *v19; // eax@25
  SLWCreateInfo::Item *v20; // edi@25
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *v21; // edi@25
  SLWCreateInfo::Item *v22; // edi@31
  NiSourceTexture *v23; // edi@33
  PgSprData *v24; // eax@33
  SlideListWin *v25; // eax@33
  PgSprData *v26; // eax@33
  SlideBar *v27; // eax@33
  SlideBar *v28; // edi@33
  int v29; // eax@33
  int v30; // eax@33
  NiSourceTexture *v31; // esi@33
  NiTexturingProperty *v32; // esi@35
  NiNode *v33; // esi@37
  SLWCreateInfo kCreateInfo; // [sp+28h] [bp-78h]@25
  UIUtil ui; // [sp+44h] [bp-5Ch]@25
  NiPointer<NiTexturingProperty> spTexProp; // [sp+58h] [bp-48h]@4
  NiSourceTexture *pkTexture; // [sp+5Ch] [bp-44h]@7
  int iOffX; // [sp+60h] [bp-40h]@22
  int iOffY; // [sp+64h] [bp-3Ch]@1
  int uiTop; // [sp+68h] [bp-38h]@15
  int uiLeft; // [sp+6Ch] [bp-34h]@15
  NiPointer<NiNode> spNode; // [sp+70h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+74h] [bp-2Ch]@25
  int v44; // [sp+9Ch] [bp-4h]@1

  v2 = this;
  iOffY = (int)pkFrameWork;
  spNode.m_pObject = 0;
  this->m_pkFrameWork = pkFrameWork;
  v3 = pTexturePalette;
  v44 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\RaidRootSelect.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Frame");
  v6 = (NiTexturingProperty *)NiAVObject::GetProperty(v5, 8);
  v7 = v6;
  spTexProp.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v8 = *v7->m_kMaps.m_pBase;
  LOBYTE(v44) = 1;
  if ( !v8 || (v9 = (NiSourceTexture *)v8->m_spTexture.m_pObject, (pkTexture = v9) == 0) )
  {
    LOBYTE(v44) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v10 = spNode.m_pObject;
    v44 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
    return 0;
  }
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v9);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v12, 0, (PgFrameWork *)iOffY, "ExpeditionLootSelectWin", 0) )
  {
    v14 = uiLeft;
    iOffX = uiLeft;
    iOffY = uiTop;
    v15 = MenuTexMgr::GetTexture(0x13u);
    if ( v15 )
      v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v15);
    else
      v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v14, uiTop - iOffY, v16, (PgWin *)&v2->vfptr, 0, 0);
    UIUtil::UIUtil(&ui);
    LOBYTE(v44) = 2;
    UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
    UIUtil::SetOffset(&ui, v14, iOffY);
    UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
    UIUtil::CreateSpr(&ui, "Panel01", 0);
    UIUtil::CreateSpr(&ui, "Panel02", 0);
    *(_QWORD *)&v17.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v17.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v18 = (char *)TextData2::Get(0x64462634u);
    v19 = UIUtil::CreateTextNoSpr(&ui, "WinTitle", v18, v17, 5u);
    v19->vfptr[122].__vecDelDtor((NiRefObject *)v19, 1u);
    kCreateInfo.m_arrItem._Myfirst = 0;
    kCreateInfo.m_arrItem._Mylast = 0;
    kCreateInfo.m_arrItem._Myend = 0;
    kCreateInfo.m_bMakeData = 0;
    kCreateInfo.m_nOffX = 0;
    kCreateInfo.m_nOffY = 0;
    LOBYTE(v44) = 3;
    v20 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
    v20->nItemType = 1;
    v20->pNode = spNode.m_pObject;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarNor", 0xCu);
    v21 = &v20->vecNodeName;
    LOBYTE(v44) = 4;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      v21,
      &_Val);
    LOBYTE(v44) = 3;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarOver", 0xDu);
    LOBYTE(v44) = 5;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      v21,
      &_Val);
    LOBYTE(v44) = 3;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarClick", 0xEu);
    LOBYTE(v44) = 6;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      v21,
      &_Val);
    LOBYTE(v44) = 3;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    v22 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    v22->nItemType = 2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column", 6u);
    LOBYTE(v44) = 7;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      &v22->vecNodeName,
      &_Val);
    LOBYTE(v44) = 3;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    v22->pNode = spNode.m_pObject;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    kCreateInfo.m_nOffX = 3;
    kCreateInfo.m_nOffY = 0;
    SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
    v23 = pkTexture;
    v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Textbox", &uiLeft, &uiTop, pkTexture);
    v25 = SlideListWin::CreateWin(uiLeft - iOffX, uiTop - iOffY, v24, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
    v2->m_pSeletMemberList = v25;
    v25->m_uiLClickMsg = 4;
    SlideListWin::AlignText(v2->m_pSeletMemberList, 0);
    SlideListWin::UpdateViewList(v2->m_pSeletMemberList);
    v26 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle", &uiLeft, &uiTop, v23);
    v27 = SlideBar::CreateWin(
            spNode.m_pObject,
            "SlideBar",
            "SlideBar_UpBtn",
            "SlideBar_DnBtn",
            v26,
            0,
            (PgWin *)&v2->vfptr);
    v2->m_pkSlideBarEx = v27;
    v27->m_uiClickMsg = 3;
    v2->m_pkSlideBarEx->m_eType = 1;
    v28 = v2->m_pkSlideBarEx;
    iOffX = (int)v2->m_pkSlideBarEx->vfptr;
    v29 = (*(int (__thiscall **)(SlideBar *))(iOffX + 168))(v28);
    v30 = (int)v28->vfptr[41].__vecDelDtor((NiRefObject *)v28, v29);
    (*(void (__thiscall **)(SlideBar *, int))(iOffX + 308))(v2->m_pkSlideBarEx, v30);
    SlideBar::SetSplitCnt(v2->m_pkSlideBarEx, v2->m_pSeletMemberList->m_nSlideSplitCnt);
    UIUtil::CreateBtn(&ui, 0, "ClsNor", "ClsClick", "ClsOver", 0, 0);
    ((void (__thiscall *)(PartyLootSelectWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.69999999,
      0.1);
    v31 = MenuTexMgr::GetTexture(4u);
    if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
      UIUtil::CreateBtn(&ui, 5u, "HelpLinkNor", "HelpLinkClick", "HelpLinkOver", 0, v31);
    LOBYTE(v44) = 2;
    SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
    LOBYTE(v44) = 1;
    UIUtil::~UIUtil(&ui);
    v32 = spTexProp.m_pObject;
    LOBYTE(v44) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
      v32->vfptr->__vecDelDtor((NiRefObject *)v32, 1u);
    v33 = spNode.m_pObject;
    v44 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v33 )
      v33->vfptr->__vecDelDtor((NiRefObject *)v33, 1u);
    result = 1;
  }
  else
  {
    LOBYTE(v44) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v13 = spNode.m_pObject;
    v44 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v13 )
      return 0;
    v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00562440) --------------------------------------------------------
PartyLootSelectWin *__thiscall PartyLootSelectWin::`vector deleting destructor'(PartyLootSelectWin *this, unsigned int a2)
{
  PartyLootSelectWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&PartyLootSelectWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PartyLootSelectWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 999EE0: using guessed type void (__thiscall *PartyLootSelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 999EFC: using guessed type int (__thiscall *PartyLootSelectWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00562480) --------------------------------------------------------
PartyLootSetupWin *__thiscall PartyLootSetupWin::`scalar deleting destructor'(PartyLootSetupWin *this, unsigned int a2)
{
  PartyLootSetupWin *v2; // esi@1

  v2 = this;
  PartyLootSetupWin::~PartyLootSetupWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005624B0) --------------------------------------------------------
void __thiscall CPartyMatchWin::AddPartyInfo(CPartyMatchWin *this, PROTO_NC_PARTY_FINDER_INFO *pkInfo)
{
  CPartyFinder *v2; // ecx@1

  v2 = this->m_pkPartyFinder;
  if ( v2 )
    CPartyFinder::Add(v2, pkInfo);
}

//----- (005624D0) --------------------------------------------------------
void __thiscall CPartyMatchWin::DelPartyInfo(CPartyMatchWin *this, Name5 *psCharID)
{
  CPartyFinder *v2; // ecx@1

  v2 = this->m_pkPartyFinder;
  if ( v2 )
    CPartyFinder::Del(v2, psCharID);
}

//----- (005624F0) --------------------------------------------------------
void __stdcall CPartyMatchWin::AbbreviateText(char *pResult, char *pTarget, int nAbbreviationSize)
{
  char *v4; // edi@1
  int v5; // eax@1
  int v6; // ebx@3
  char *v7; // esi@3
  char *v8; // esi@8
  char v9; // al@9

  v4 = pTarget;
  v5 = strlen(pTarget);
  if ( v5 && v5 >= nAbbreviationSize )
  {
    v6 = 0;
    v7 = pResult;
    while ( v6 < nAbbreviationSize )
    {
      if ( IsDBCSLeadByte(*v4) )
      {
        *v7 = *v4;
        v6 += 2;
        v7[1] = v4[1];
        v4 += 2;
        v7 += 2;
      }
      else
      {
        ++v6;
        *v7++ = *v4++;
      }
    }
    v8 = v7 - 1;
    do
      v9 = (v8++)[1];
    while ( v9 );
    *(_DWORD *)v8 = 3026478;
  }
  else
  {
    strcpy(pResult, pTarget);
  }
}

//----- (00562580) --------------------------------------------------------
CPartyFinder::PARTY_FINDER_INFO_LIST *__thiscall CPartyMatchWin::FindList(CPartyMatchWin *this, int nIndexNum)
{
  CPartyFinder *v2; // eax@1
  CPartyFinder::PARTY_FINDER_INFO_LIST *result; // eax@2
  int i; // ecx@4

  v2 = this->m_pkPartyFinder;
  if ( v2 && nIndexNum < v2->m_NumOfInfo )
  {
    result = v2->m_pListTop;
    for ( i = 0; result; ++i )
    {
      if ( i >= nIndexNum )
        break;
      result = result->pLinkDn;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (005625C0) --------------------------------------------------------
void __thiscall CPartyMatchWin::ClearList(CPartyMatchWin *this)
{
  CPartyFinder *v1; // ecx@1

  v1 = this->m_pkPartyFinder;
  if ( v1 )
    CPartyFinder::Clear(v1);
}

//----- (005625D0) --------------------------------------------------------
void CPartyMatchWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "PartyMatching");
}

//----- (00562600) --------------------------------------------------------
void __thiscall CPartyMatchWin::UpdateMeWin(CPartyMatchWin *this, float fCurTime)
{
  CPartyMatchWin *v2; // esi@1
  DWORD v3; // edi@4
  unsigned int v4; // eax@4
  PgWinBut *v5; // ecx@6
  unsigned int v6; // eax@8
  bool v7; // zf@10
  PgWinBut *v8; // ecx@11
  unsigned int v9; // eax@13
  PgWinBut *v10; // ecx@15

  v2 = this;
  if ( !(this->m_uFlags & 1) )
  {
    if ( CNSTimer_Interval::IsRun_GetCount(&this->m_kTimer, fCurTime) )
      GameFrameWork::NcPartyFinderListReq((GameFrameWork *)v2->m_pkFrameWork, v2->m_nPageNum, 0x14u);
    v3 = timeGetTime();
    v4 = v2->m_dwTimer_BtnEnroll;
    if ( v4 )
    {
      if ( v3 - v4 > 0xBB8 )
      {
        v5 = v2->m_pkBtnAddComment;
        v2->m_dwTimer_BtnEnroll = 0;
        if ( v5 )
          ((void (__stdcall *)(_DWORD))v5->vfptr[60].__vecDelDtor)(1);
      }
    }
    v6 = v2->m_dwTimer_BtnDelete;
    if ( v6 )
    {
      if ( v3 - v6 > 0xBB8 )
      {
        v7 = v2->m_bCommentEnrolled == 0;
        v2->m_dwTimer_BtnDelete = 0;
        if ( !v7 )
        {
          v8 = v2->m_pkBtnDelComment;
          if ( v8 )
            ((void (__stdcall *)(_DWORD))v8->vfptr[60].__vecDelDtor)(1);
        }
      }
    }
    v9 = v2->m_dwTimer_BtnInvite;
    if ( v9 && v3 - v9 > 0xBB8 )
    {
      v10 = v2->m_pkBtnApplyParty;
      v2->m_dwTimer_BtnInvite = 0;
      if ( v10 )
        ((void (__stdcall *)(_DWORD))v10->vfptr[60].__vecDelDtor)(1);
    }
  }
}

//----- (00562700) --------------------------------------------------------
void __thiscall CPartyMatchWin::OnWinClose(CPartyMatchWin *this)
{
  CPartyMatchWin *v1; // esi@1

  v1 = this;
  if ( this == (CPartyMatchWin *)g_pkToolTipWin->m_pkToolTipParentWin )
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
  GameFrameWork::CloseCommunityWin((GameFrameWork *)v1->m_pkFrameWork);
}

//----- (00562730) --------------------------------------------------------
void __thiscall CPartyMatchWin::OnChangeTab(CPartyMatchWin *this, DirectUserMsgBody_CommunityTabChanged::TabEnum eTab)
{
  char *v2; // esi@1

  v2 = (char *)&this->vfptr;
  if ( this->m_pkMsgHooker )
  {
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))this->m_pkMsgHooker->vfptr->SendDirectMessage)(40, &eTab, v2);
    if ( *((_DWORD *)v2 + 1) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v2 + 1) + 20))(40, &eTab, v2);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v2 + 20))(v2, 40, &eTab, v2);
}

//----- (00562790) --------------------------------------------------------
void __thiscall CPartyMatchWin::UpdateList(CPartyMatchWin *this)
{
  CPartyMatchWin *v1; // edi@1
  SlideListWin *v2; // ecx@1
  char *v3; // eax@3
  char v4; // cl@4
  int v5; // ebx@7
  CPartyFinder *v6; // ecx@8
  CPartyFinder::PARTY_FINDER_INFO_LIST *v7; // esi@10
  signed int v8; // eax@10
  SlideListWin *v9; // ecx@15
  unsigned int v10; // ebx@15
  SlideListWin *v11; // ecx@18
  CPartyFinder *v12; // eax@20
  CPartyFinder::PARTY_FINDER_INFO_LIST *v13; // eax@22
  int v14; // ecx@22
  unsigned int v15; // edx@27
  unsigned int v16; // ecx@27
  unsigned int v17; // edx@27
  unsigned int v18; // eax@27
  Name5 *v19; // eax@27
  unsigned int v20; // ecx@27
  unsigned int v21; // edx@27
  unsigned int v22; // esi@27
  unsigned int v23; // ebx@27
  unsigned int v24; // eax@27
  int nPrevSelectedIndex; // [sp+18h] [bp-C4h]@7
  signed int i; // [sp+1Ch] [bp-C0h]@7
  bool bNeedCheck; // [sp+23h] [bp-B9h]@3
  char acStr[129]; // [sp+24h] [bp-B8h]@18
  char acID[21]; // [sp+A8h] [bp-34h]@27
  char acname[21]; // [sp+C0h] [bp-1Ch]@15

  v1 = this;
  v2 = this->m_pkListWin;
  if ( v2 && v1->m_pkPartyFinder )
  {
    SlideListWin::RemoveAllList(v2);
    v3 = v1->m_chSelectedID;
    bNeedCheck = 0;
    do
      v4 = *v3++;
    while ( v4 );
    if ( v3 != &v1->m_chSelectedID[1] )
      bNeedCheck = 1;
    v5 = 20;
    nPrevSelectedIndex = 20;
    i = 0;
    do
    {
      v6 = v1->m_pkPartyFinder;
      if ( !v6 )
        break;
      if ( (unsigned __int16)i >= v6->m_NumOfInfo )
        break;
      v7 = v6->m_pListTop;
      v8 = 0;
      if ( !v7 )
        break;
      while ( v8 < (unsigned __int16)i )
      {
        v7 = v7->pLinkDn;
        ++v8;
        if ( !v7 )
          goto LABEL_19;
      }
      if ( !v7 )
        break;
      *(_DWORD *)acname = v7->Info.sCharID.n5_code[0];
      *(_DWORD *)&acname[4] = v7->Info.sCharID.n5_code[1];
      *(_DWORD *)&acname[8] = v7->Info.sCharID.n5_code[2];
      *(_DWORD *)&acname[12] = v7->Info.sCharID.n5_code[3];
      *(_DWORD *)&acname[16] = v7->Info.sCharID.n5_code[4];
      v9 = v1->m_pkListWin;
      acname[20] = 0;
      v10 = SlideListWin::AddText(v9, acname);
      if ( bNeedCheck == 1 && !strcmp(acname, v1->m_chSelectedID) )
        nPrevSelectedIndex = i;
      strncpy(acStr, v7->Info.sMsg, 0x80u);
      v11 = v1->m_pkListWin;
      acStr[128] = 0;
      SlideListWin::SetText(v11, v10, 1u, acStr);
      SlideListWin::SetData(v1->m_pkListWin, v10, (unsigned __int16)i);
      SlideListWin::SetToolTipWinText(v1->m_pkListWin, i, acStr);
      v5 = nPrevSelectedIndex;
      ++i;
    }
    while ( i < 20 );
LABEL_19:
    if ( v5 == 20 )
    {
      if ( bNeedCheck == 1 )
        memset(v1->m_chSelectedID, 0, 0x100u);
    }
    else
    {
      SlideListWin::SetCurSelIndex(v1->m_pkListWin, v5);
      v12 = v1->m_pkPartyFinder;
      if ( !v12 )
        goto LABEL_33;
      if ( v5 >= v12->m_NumOfInfo )
        goto LABEL_33;
      v13 = v12->m_pListTop;
      v14 = 0;
      if ( !v13 )
        goto LABEL_33;
      while ( v14 < v5 )
      {
        v13 = v13->pLinkDn;
        ++v14;
        if ( !v13 )
          goto LABEL_33;
      }
      if ( !v13 )
        goto LABEL_33;
      v15 = v13->Info.sCharID.n5_code[1];
      *(_DWORD *)acname = v13->Info.sCharID.n5_code[0];
      v16 = v13->Info.sCharID.n5_code[2];
      *(_DWORD *)&acname[4] = v15;
      v17 = v13->Info.sCharID.n5_code[3];
      v18 = v13->Info.sCharID.n5_code[4];
      *(_DWORD *)&acname[8] = v16;
      *(_DWORD *)&acname[12] = v17;
      *(_DWORD *)&acname[16] = v18;
      acname[20] = 0;
      v19 = User::GetMainCharID(&g_kUser);
      v20 = v19->n5_code[0];
      v21 = v19->n5_code[1];
      v22 = v19->n5_code[2];
      v23 = v19->n5_code[3];
      v24 = v19->n5_code[4];
      *(_DWORD *)acID = v20;
      *(_DWORD *)&acID[16] = v24;
      *(_DWORD *)&acID[4] = v21;
      *(_DWORD *)&acID[8] = v22;
      *(_DWORD *)&acID[12] = v23;
      acID[20] = 0;
      if ( !strcmp(acID, acname) )
      {
        ((void (__stdcall *)(_DWORD))v1->m_pkBtnApplyParty->vfptr[60].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v1->m_pkBtnWhisper->vfptr[60].__vecDelDtor)(0);
LABEL_33:
        SlideListWin::AlignText(v1->m_pkListWin, 0, 4u);
        SlideListWin::AlignText(v1->m_pkListWin, 1u, 4u);
        SlideListWin::UpdateViewList(v1->m_pkListWin);
        CNSTimer_Interval::ReSet(&v1->m_kTimer, Timer::ms_fCurTime);
        v1->m_kTimer.m_fCheckTime = 10.0;
        return;
      }
    }
    ((void (__stdcall *)(signed int))v1->m_pkBtnWhisper->vfptr[60].__vecDelDtor)(1);
    if ( !v1->m_dwTimer_BtnInvite )
      ((void (__stdcall *)(signed int))v1->m_pkBtnApplyParty->vfptr[60].__vecDelDtor)(1);
    goto LABEL_33;
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00562AD0) --------------------------------------------------------
void __thiscall CPartyMatchWin::ChangeUserName(CPartyMatchWin *this, Name5 *OldName, Name5 *NewName)
{
  CPartyMatchWin *v3; // esi@1
  CPartyFinder *v4; // ecx@1
  CPartyFinder::PARTY_FINDER_INFO_LIST *v5; // eax@2

  v3 = this;
  v4 = this->m_pkPartyFinder;
  if ( v4 )
  {
    v5 = CPartyFinder::Find(v4, OldName);
    if ( v5 )
    {
      *(_QWORD *)&v5->Info.sCharID.n5_name[0] = *(_QWORD *)&NewName->n5_code[0];
      *(_QWORD *)&v5->Info.sCharID.n5_code[2] = *(_QWORD *)&NewName->n5_code[2];
      v5->Info.sCharID.n5_code[4] = NewName->n5_code[4];
      CPartyMatchWin::UpdateList(v3);
    }
  }
}

//----- (00562B20) --------------------------------------------------------
void __thiscall CPartyMatchWin::CPartyMatchWin(CPartyMatchWin *this)
{
  CPartyMatchWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&CPartyMatchWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CPartyMatchWin::`vftable'{for `IDirectMessenger'};
  v1->m_spEdit.m_pObject = 0;
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kTimer);
  v1->m_pkListWin = 0;
  v1->m_pkPartyFinder = 0;
  v1->m_pkBtnAddComment = 0;
  v1->m_pkBtnDelComment = 0;
  v1->m_pkBtnApplyParty = 0;
  v1->m_pkBtnWhisper = 0;
}
// 99A734: using guessed type void (__thiscall *CPartyMatchWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99A754: using guessed type int (__thiscall *CPartyMatchWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00562BB0) --------------------------------------------------------
void __thiscall CPartyMatchWin::~CPartyMatchWin(CPartyMatchWin *this)
{
  CPartyMatchWin *v1; // esi@1
  CPartyFinder *v2; // edi@1
  EditWin *v3; // edi@3
  EditWin *v4; // edi@8

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&CPartyMatchWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CPartyMatchWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_pkPartyFinder;
  if ( v2 )
  {
    CPartyFinder::~CPartyFinder(v2);
    operator delete(v2);
    v1->m_pkPartyFinder = 0;
  }
  v3 = v1->m_spEdit.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spEdit.m_pObject = 0;
  }
  v1->m_pkBtnAddComment = 0;
  v1->m_pkBtnDelComment = 0;
  v1->m_pkBtnApplyParty = 0;
  v1->m_pkBtnWhisper = 0;
  v4 = v1->m_spEdit.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 99A734: using guessed type void (__thiscall *CPartyMatchWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99A754: using guessed type int (__thiscall *CPartyMatchWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00562CB0) --------------------------------------------------------
void __thiscall CPartyMatchWin::OnCommand(CPartyMatchWin *this, unsigned int wParam, int lParam)
{
  CPartyMatchWin *v3; // esi@1
  signed int v4; // eax@8
  CPartyFinder::PARTY_FINDER_INFO_LIST *v5; // eax@9
  Name5 *v6; // eax@10
  unsigned int v7; // ecx@10
  unsigned int v8; // edx@10
  int v9; // eax@14
  int v10; // eax@15
  SlideListWin *v11; // ecx@16
  int v12; // eax@18
  int v13; // eax@19
  EditWin *v14; // ecx@20
  char *v15; // eax@24
  ProcessingString *v16; // eax@24
  DWORD v17; // eax@24
  PgWinBut *v18; // ecx@24
  DWORD v19; // eax@26
  PgWinBut *v20; // ecx@26
  signed int v21; // eax@27
  CPartyFinder::PARTY_FINDER_INFO_LIST *v22; // eax@28
  GameFrameWork *v23; // ecx@30
  DWORD v24; // eax@30
  PgWinBut *v25; // ecx@30
  char *v26; // eax@23
  signed int v27; // eax@33
  CPartyFinder::PARTY_FINDER_INFO_LIST *v28; // eax@34
  int v29; // edi@35
  GameFrameWork *v30; // ecx@35
  Name5 id; // [sp+4h] [bp-4Ch]@10
  unsigned int dwTargetIndex; // [sp+18h] [bp-38h]@9
  char acname[21]; // [sp+1Ch] [bp-34h]@10
  char acID[21]; // [sp+34h] [bp-1Ch]@10

  v3 = this;
  switch ( wParam )
  {
    case 0xBu:
      CPartyMatchWin::OnWinClose(this);
      break;
    case 0x14u:
      CPartyMatchWin::OnChangeTab(this, 0);
      break;
    case 0x15u:
      CPartyMatchWin::OnChangeTab(this, TE_GUILD);
      break;
    case 0x16u:
      CPartyMatchWin::OnChangeTab(this, TE_WEDDING);
      break;
    case 0x17u:
      CPartyMatchWin::OnChangeTab(this, TE_HOLYPROMISE);
      break;
    case 0x18u:
      CPartyMatchWin::OnChangeTab(this, TE_GUILDACADEMY);
      break;
    case 0xEu:
    case 0xFu:
      v4 = SlideListWin::GetCurSelIndex(this->m_pkListWin);
      if ( v4 >= 0 )
      {
        SlideListWin::GetData(v3->m_pkListWin, v4, &dwTargetIndex);
        v5 = CPartyMatchWin::FindList(v3, dwTargetIndex);
        if ( v5 )
        {
          Name5::n_string(&v5->Info.sCharID, acname);
          acname[20] = 0;
          strcpy(v3->m_chSelectedID, acname);
          v6 = User::GetMainCharID(&g_kUser);
          v7 = v6->n5_code[1];
          id.n5_code[0] = v6->n5_code[0];
          v8 = v6->n5_code[2];
          id.n5_code[1] = v7;
          *(_QWORD *)&id.n5_code[2] = __PAIR__(v6->n5_code[3], v8);
          id.n5_code[4] = v6->n5_code[4];
          Name5::n_string(&id, acID);
          acID[20] = 0;
          if ( !strcmp(acID, acname) )
          {
            ((void (__stdcall *)(_DWORD))v3->m_pkBtnApplyParty->vfptr[60].__vecDelDtor)(0);
            ((void (__stdcall *)(_DWORD))v3->m_pkBtnWhisper->vfptr[60].__vecDelDtor)(0);
          }
          else
          {
            ((void (__stdcall *)(_DWORD))v3->m_pkBtnWhisper->vfptr[60].__vecDelDtor)(1);
            if ( !v3->m_dwTimer_BtnInvite )
              ((void (__stdcall *)(_DWORD))v3->m_pkBtnApplyParty->vfptr[60].__vecDelDtor)(1);
          }
        }
      }
      break;
    case 0xCu:
      v9 = this->m_nPageNum;
      if ( v9 )
      {
        v10 = v9 - 1;
        this->m_nPageNum = v10;
        GameFrameWork::NcPartyFinderListReq((GameFrameWork *)this->m_pkFrameWork, v10, 0x14u);
        goto LABEL_16;
      }
      break;
    case 0xDu:
      v12 = this->m_nPageNum;
      if ( this->m_nMaxPage - 1 > v12 )
      {
        v13 = v12 + 1;
        this->m_nPageNum = v13;
        GameFrameWork::NcPartyFinderListReq((GameFrameWork *)this->m_pkFrameWork, v13, 0x14u);
LABEL_16:
        v11 = v3->m_pkListWin;
        if ( v11 )
          SlideListWin::RemoveAllList(v11);
      }
      break;
    case 0x10u:
      v14 = this->m_spEdit.m_pObject;
      if ( v14 && !v3->m_dwTimer_BtnEnroll )
      {
        if ( !strlen((const char *)((int (*)(void))v14->vfptr[113].__vecDelDtor)()) )
        {
          v26 = (char *)TextData::Get(0x888F8FA9);
          goto LABEL_32;
        }
        v15 = (char *)((int (*)(void))v3->m_spEdit.m_pObject->vfptr[113].__vecDelDtor)();
        v16 = TextFilterTable::FilterSlander(v15);
        GameFrameWork::NcPartyFinderAddCommentReq((GameFrameWork *)v3->m_pkFrameWork, v16->m_acSource);
        ((void (*)(void))v3->m_spEdit.m_pObject->vfptr[117].__vecDelDtor)();
        v17 = timeGetTime();
        v18 = v3->m_pkBtnAddComment;
        v3->m_dwTimer_BtnEnroll = v17;
        ((void (__stdcall *)(_DWORD))v18->vfptr[60].__vecDelDtor)(0);
      }
      break;
    case 0x11u:
      if ( !this->m_dwTimer_BtnDelete )
      {
        GameFrameWork::NcPartyFinderDelCommentReq((GameFrameWork *)this->m_pkFrameWork);
        v19 = timeGetTime();
        v20 = v3->m_pkBtnDelComment;
        v3->m_dwTimer_BtnDelete = v19;
        ((void (__stdcall *)(_DWORD))v20->vfptr[60].__vecDelDtor)(0);
      }
      break;
    case 0x13u:
      v21 = SlideListWin::GetCurSelIndex(this->m_pkListWin);
      if ( v21 < 0 )
        goto LABEL_31;
      SlideListWin::GetData(v3->m_pkListWin, v21, &dwTargetIndex);
      v22 = CPartyMatchWin::FindList(v3, (unsigned __int16)dwTargetIndex);
      if ( v22 && !v3->m_dwTimer_BtnInvite )
      {
        Name5::n_string(&v22->Info.sCharID, acID);
        v23 = (GameFrameWork *)v3->m_pkFrameWork;
        acID[20] = 0;
        GameFrameWork::NcPartyJoinReq(v23, acID);
        v24 = timeGetTime();
        v25 = v3->m_pkBtnApplyParty;
        v3->m_dwTimer_BtnInvite = v24;
        ((void (__stdcall *)(_DWORD))v25->vfptr[60].__vecDelDtor)(0);
      }
      break;
    case 0x12u:
      v27 = SlideListWin::GetCurSelIndex(this->m_pkListWin);
      if ( v27 < 0 )
      {
LABEL_31:
        v26 = (char *)TextData::Get(0xCCE7EB31);
LABEL_32:
        MsgBox::Modal(MSGBOX_OK, v26);
      }
      else
      {
        SlideListWin::GetData(v3->m_pkListWin, v27, &dwTargetIndex);
        v28 = CPartyMatchWin::FindList(v3, (unsigned __int16)dwTargetIndex);
        if ( v28 )
        {
          v29 = (int)&v28->Info.sCharID;
          Name5::n_string(&v28->Info.sCharID, acID);
          *(_QWORD *)&GameFrameWork::m_kWhisperCharID.n5_name[0] = *(_QWORD *)v29;
          *(_QWORD *)&GameFrameWork::m_kWhisperCharID.n5_code[2] = *(_QWORD *)(v29 + 8);
          GameFrameWork::m_kWhisperCharID.n5_code[4] = *(_DWORD *)(v29 + 16);
          v30 = (GameFrameWork *)v3->m_pkFrameWork;
          acID[20] = 0;
          GameFrameWork::OnWhisperChatStart(v30, acID);
        }
      }
      break;
    case 0x19u:
      CPartyMatchWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (005631A0) --------------------------------------------------------
bool __userpurge CPartyMatchWin::SetListBriefInfo@<al>(CPartyMatchWin *this@<ecx>, int a2@<edi>, unsigned __int16 wCurrPageNo, unsigned __int16 wMaxPages, bool bHaveOwnInfo)
{
  CPartyMatchWin *v5; // esi@1
  bool v6; // zf@1
  NiRefObjectVtbl *v7; // edi@3
  NiUnsharedGeometryGroup *v8; // eax@3
  NiRefObjectVtbl *v9; // edi@4
  NiUnsharedGeometryGroup *v10; // eax@4
  int v12; // [sp-4h] [bp-Ch]@2

  v5 = this;
  v6 = this->m_pkBtnAddComment == 0;
  this->m_nMaxPage = wMaxPages;
  this->m_nPageNum = wCurrPageNo;
  this->m_bCommentEnrolled = bHaveOwnInfo;
  if ( !v6 )
  {
    v12 = a2;
    if ( bHaveOwnInfo )
    {
      v7 = this->m_pkBtnTxt->vfptr;
      v8 = TextData::Get(0x8F8F799B);
      ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *, int))v7[118].__vecDelDtor)(v5->m_pkBtnTxt, v8, v12);
    }
    else
    {
      v9 = this->m_pkBtnTxt->vfptr;
      v10 = TextData::Get(0x818D7FA9);
      ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *, int))v9[118].__vecDelDtor)(v5->m_pkBtnTxt, v10, v12);
    }
    ((void (*)(void))v5->m_pkBtnDelComment->vfptr[60].__vecDelDtor)();
  }
  return wCurrPageNo == v5->m_nPageNum;
}
// 5631A0: could not find valid save-restore pair for edi

//----- (00563240) --------------------------------------------------------
void __thiscall CPartyMatchWin::OnShowWin(CPartyMatchWin *this)
{
  char v1; // bl@1
  CPartyMatchWin *v2; // esi@1
  NiRefObjectVtbl *v3; // edi@2
  NiUnsharedGeometryGroup *v4; // eax@2
  SlideListWin *v5; // ecx@3
  EditWin *v6; // ecx@5
  NiRefObjectVtbl **v7; // ebx@6
  NiRefObjectVtbl *v8; // edi@6
  NiUnsharedGeometryGroup *v9; // eax@6

  v1 = 0;
  v2 = this;
  this->m_dwTimer_BtnEnroll = 0;
  this->m_dwTimer_BtnDelete = 0;
  this->m_dwTimer_BtnInvite = 0;
  this->m_nPageNum = 0;
  this->m_nMaxPage = 0;
  this->m_bCommentEnrolled = 0;
  if ( this->m_pkBtnAddComment )
  {
    v3 = this->m_pkBtnTxt->vfptr;
    v4 = TextData::Get(0x818D7FA9);
    v3[118].__vecDelDtor((NiRefObject *)v2->m_pkBtnTxt, (unsigned int)v4);
    ((void (__stdcall *)(_DWORD))v2->m_pkBtnDelComment->vfptr[60].__vecDelDtor)(0);
  }
  ((void (__stdcall *)(_DWORD))v2->m_pkBtnAddComment->vfptr[60].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v2->m_pkBtnApplyParty->vfptr[60].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v2->m_pkBtnWhisper->vfptr[60].__vecDelDtor)(1);
  v5 = v2->m_pkListWin;
  if ( v5 )
  {
    SlideListWin::RemoveAllList(v5);
    GameFrameWork::NcPartyFinderListReq((GameFrameWork *)v2->m_pkFrameWork, v2->m_nPageNum, 0x14u);
  }
  v6 = v2->m_spEdit.m_pObject;
  if ( v6 )
  {
    ((void (*)(void))v6->vfptr[117].__vecDelDtor)();
    v7 = &v2->m_spEdit.m_pObject->vfptr;
    v8 = *v7;
    v9 = TextData2::Get(0xBBAE8B7D);
    v8[116].__vecDelDtor((NiRefObject *)v7, (unsigned int)v9);
    v1 = 0;
  }
  memset(v2->m_chSelectedID, v1, 0x100u);
  PgWin::OnShowWin((PgWin *)&v2->vfptr);
}

//----- (00563360) --------------------------------------------------------
CPartyMatchWin *__cdecl CPartyMatchWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  CPartyMatchWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x2ACu);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    CPartyMatchWin::CPartyMatchWin((CPartyMatchWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (CPartyMatchWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00563490) --------------------------------------------------------
char __thiscall CPartyMatchWin::Create(CPartyMatchWin *this, PgFrameWork *pkFrameWork)
{
  CPartyMatchWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiAVObject *v5; // eax@4
  NiTexturingProperty *v6; // eax@4
  NiTexturingProperty *v7; // edi@4
  NiTexturingProperty::Map *v8; // eax@6
  NiSourceTexture *v9; // eax@7
  NiNode *v10; // esi@10
  PgSprData *v12; // eax@15
  NiNode *v13; // esi@18
  int v14; // edi@22
  int v15; // ebx@22
  NiSourceTexture *v16; // eax@22
  PgSprData *v17; // eax@23
  PgSprData *v18; // eax@25
  PgSprData *v19; // eax@25
  PgWinSpr *v20; // eax@25
  PgSprData *v21; // eax@25
  PgFont *v22; // eax@26
  PgWinText *v23; // eax@26
  NiRefObjectVtbl *v24; // edx@26
  NiUnsharedGeometryGroup *v25; // eax@26
  PgFont *v26; // eax@28
  PgWinText *v27; // eax@28
  NiRefObjectVtbl *v28; // edx@28
  NiUnsharedGeometryGroup *v29; // eax@28
  PgFont *v30; // eax@28
  NiUnsharedGeometryGroup *v31; // eax@28
  SLWCreateInfo::Item *v32; // eax@28
  NiSourceTexture *v33; // eax@28
  NiSourceTexture *v34; // eax@28
  NiSourceTexture *v35; // eax@28
  NiSourceTexture *v36; // eax@28
  PgSprData *v37; // eax@28
  SlideListWin *v38; // eax@28
  NiSourceTexture *v39; // eax@28
  CPartyFinder *v40; // eax@29
  NiSourceTexture *v41; // STD4_4@31
  NiNode *v42; // edx@31
  PgSprData::PgHitTester *v43; // eax@31
  PgWinText *v44; // edx@31
  PgFont *v45; // eax@31
  PgWinText *v46; // eax@31
  NiRefObjectVtbl *v47; // edx@31
  NiUnsharedGeometryGroup *v48; // eax@31
  NiPointer<PgSprData::PgHitTester> *v49; // ecx@31
  PgWinText *v50; // eax@31
  PgFont *v51; // eax@31
  PgWinText *v52; // eax@31
  NiRefObjectVtbl *v53; // edx@31
  NiUnsharedGeometryGroup *v54; // eax@31
  PgSprData *v55; // eax@31
  char *v56; // eax@31
  char *v57; // eax@31
  char *v58; // eax@31
  char *v59; // eax@31
  char *v60; // eax@31
  char *v61; // eax@31
  PgSprData::PgHitTester *v62; // eax@31
  PgWinText *v63; // edx@31
  PgFont *v64; // eax@31
  PgWinText *v65; // eax@31
  NiRefObjectVtbl *v66; // edx@31
  NiUnsharedGeometryGroup *v67; // eax@31
  PgSprData::PgHitTester *v68; // eax@31
  PgWinText *v69; // edx@31
  PgFont *v70; // eax@31
  PgWinText *v71; // eax@31
  NiRefObjectVtbl *v72; // edx@31
  NiUnsharedGeometryGroup *v73; // eax@31
  PgSprData::PgHitTester *v74; // eax@31
  PgWinText *v75; // edx@31
  PgFont *v76; // eax@31
  PgWinText *v77; // eax@31
  NiRefObjectVtbl *v78; // edx@31
  NiUnsharedGeometryGroup *v79; // eax@31
  PgSprData::PgHitTester *v80; // eax@31
  PgWinText *v81; // edx@31
  PgFont *v82; // eax@31
  PgWinText *v83; // eax@31
  NiRefObjectVtbl *v84; // edx@31
  NiUnsharedGeometryGroup *v85; // eax@31
  PgSprData::PgHitTester *v86; // eax@31
  PgWinText *v87; // edx@31
  PgFont *v88; // eax@31
  PgWinText *v89; // eax@31
  NiRefObjectVtbl *v90; // edx@31
  NiUnsharedGeometryGroup *v91; // eax@31
  PgSprData::PgHitTester *v92; // eax@31
  PgWinText *v93; // edx@31
  PgFont *v94; // eax@31
  PgWinText *v95; // eax@31
  NiRefObjectVtbl *v96; // edx@31
  NiUnsharedGeometryGroup *v97; // eax@31
  NiPointer<PgSprData::PgHitTester> *v98; // ecx@31
  PgWinText *v99; // eax@31
  PgFont *v100; // eax@31
  PgWinText *v101; // eax@31
  NiRefObjectVtbl *v102; // edx@31
  NiUnsharedGeometryGroup *v103; // eax@31
  PgSprData *v104; // eax@31
  PgFont *v105; // eax@34
  EditWin *v106; // eax@34
  PgWinBut *v107; // eax@34
  PgWinText *v108; // edx@34
  int v109; // eax@34
  PgWinText *v110; // edx@34
  PgFont *v111; // eax@34
  PgWinText *v112; // eax@34
  NiUnsharedGeometryGroup *v113; // eax@34
  NiSourceTexture *v114; // eax@34
  char *v115; // eax@34
  int v116; // eax@34
  PgWinText *v117; // edx@34
  PgFont *v118; // eax@34
  PgWinText *v119; // eax@34
  NiRefObjectVtbl *v120; // edx@34
  NiUnsharedGeometryGroup *v121; // eax@34
  PgWinBut *v122; // eax@34
  PgWinText *v123; // ecx@34
  int v124; // eax@34
  PgWinText *v125; // edx@34
  PgFont *v126; // eax@34
  PgWinText *v127; // eax@34
  NiRefObjectVtbl *v128; // edx@34
  NiUnsharedGeometryGroup *v129; // eax@34
  NiSourceTexture *v130; // eax@34
  char *v131; // eax@34
  int v132; // eax@34
  NiSourceTexture *v133; // edx@34
  PgFont *v134; // eax@34
  PgWinText *v135; // edi@34
  NiRefObjectVtbl *v136; // ebx@34
  NiUnsharedGeometryGroup *v137; // eax@34
  SLWCreateInfo kCreateInfo; // [sp+E8h] [bp-6Ch]@28
  NiPointer<NiTexturingProperty> spTexProp; // [sp+104h] [bp-50h]@4
  unsigned int uiWidth; // [sp+108h] [bp-4Ch]@25
  unsigned int uiHeight; // [sp+10Ch] [bp-48h]@25
  NiSourceTexture *pkTexture; // [sp+110h] [bp-44h]@7
  int uiTop; // [sp+114h] [bp-40h]@15
  int uiLeft; // [sp+118h] [bp-3Ch]@15
  NiPointer<NiNode> spNode; // [sp+11Ch] [bp-38h]@1
  NiSourceTexture *pkTexture8; // [sp+120h] [bp-34h]@26
  PgWinText *pkTextWin; // [sp+124h] [bp-30h]@26
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+128h] [bp-2Ch]@28
  int v149; // [sp+150h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  this->m_pkFrameWork = pkFrameWork;
  v3 = pTexturePalette;
  v149 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\PartyMatching.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Frame");
  v6 = (NiTexturingProperty *)NiAVObject::GetProperty(v5, 8);
  v7 = v6;
  spTexProp.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v8 = *v7->m_kMaps.m_pBase;
  LOBYTE(v149) = 1;
  if ( !v8 || (v9 = (NiSourceTexture *)v8->m_spTexture.m_pObject, (pkTexture = v9) == 0) )
  {
    LOBYTE(v149) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v10 = spNode.m_pObject;
    v149 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
    return 0;
  }
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v9);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v12, 0, pkFrameWork, "FriendWin", 0) )
  {
    v14 = uiLeft;
    v15 = uiTop;
    v16 = MenuTexMgr::GetTexture(0x13u);
    if ( v16 )
      v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v16);
    else
      v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v17, (PgWin *)&v2->vfptr, 0, 0);
    v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
    PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v18, (PgWin *)&v2->vfptr, 0, 0);
    v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, pkTexture);
    v20 = PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v19, (PgWin *)&v2->vfptr, 0, 0);
    v20->vfptr[60].__vecDelDtor((NiRefObject *)v20, 0);
    v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, pkTexture);
    PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v21, (PgWin *)&v2->vfptr, 0, 0);
    if ( PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "WinTitle",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight) )
    {
      v22 = Font::Get(MAIN_MENU);
      v23 = PgWinText::CreateWin(uiLeft - v14, uiTop - v15, uiWidth, uiHeight, v22, (PgWin *)&v2->vfptr, 0, 0);
      v24 = v23->vfptr;
      pkTextWin = v23;
      v24[122].__vecDelDtor((NiRefObject *)v23, 1u);
      ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v25 = TextData::Get(0xE3504941);
      (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))&pkTexture8[6].m_bStatic)(pkTextWin, v25);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "ClsNor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xBu, 0, 0);
      pkTexture8 = MenuTexMgr::GetTexture(4u);
      if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
      {
        pkTextWin = (PgWinText *)PgSprData::Create(
                                   (NiAVObject *)&spNode.m_pObject->vfptr,
                                   "HelpLinkNor",
                                   &uiLeft,
                                   &uiTop,
                                   pkTexture8);
        PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
        PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
        PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x19u, 0, 0);
      }
      PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text02", &uiLeft, &uiTop, 0);
      v26 = Font::Get(TITLEBOLD);
      v27 = PgWinText::CreateWin(uiLeft - v14, uiTop - v15, uiWidth, uiHeight, v26, (PgWin *)&v2->vfptr, 0, 0);
      v28 = v27->vfptr;
      pkTextWin = v27;
      v28[122].__vecDelDtor((NiRefObject *)v27, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v29 = TextData::Get(0x1C4B503Eu);
      (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))&pkTexture8[6].m_bStatic)(pkTextWin, v29);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Category", &uiLeft, &uiTop, 0);
      v30 = Font::Get(TITLEBOLD);
      pkTextWin = PgWinText::CreateWin(uiLeft - v14, uiTop - v15, uiWidth, uiHeight, v30, (PgWin *)&v2->vfptr, 0, 0);
      pkTextWin->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWin, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v31 = TextData3::Get(0x2E4A1B0Bu);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v31);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      kCreateInfo.m_arrItem._Myfirst = 0;
      kCreateInfo.m_arrItem._Mylast = 0;
      kCreateInfo.m_arrItem._Myend = 0;
      kCreateInfo.m_bMakeData = 0;
      kCreateInfo.m_nOffX = 0;
      kCreateInfo.m_nOffY = 0;
      LOBYTE(v149) = 2;
      v32 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
      v32->nItemType = 1;
      v32->pNode = spNode.m_pObject;
      pkTexture8 = (NiSourceTexture *)v32;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "ColumnBarNor");
      LOBYTE(v149) = 3;
      pkTexture8 = (NiSourceTexture *)((char *)pkTexture8 + 72);
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkTexture8,
        &_Val);
      LOBYTE(v149) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "ColumnBarClick");
      LOBYTE(v149) = 4;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkTexture8,
        &_Val);
      LOBYTE(v149) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "ColumnBarOver");
      LOBYTE(v149) = 5;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkTexture8,
        &_Val);
      LOBYTE(v149) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      v33 = (NiSourceTexture *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkTexture8 = v33;
      v33->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "CharName01");
      LOBYTE(v149) = 6;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTexture8[1].m_uiRefCount,
        &_Val);
      LOBYTE(v149) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      v34 = pkTexture8;
      pkTexture8->m_uiRefCount = (unsigned int)spNode.m_pObject;
      LOBYTE(v34[1].m_uiExtraDataSize) = 1;
      v35 = (NiSourceTexture *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkTexture8 = v35;
      v35->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Title01");
      LOBYTE(v149) = 7;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTexture8[1].m_uiRefCount,
        &_Val);
      LOBYTE(v149) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      v36 = pkTexture8;
      pkTexture8->m_uiRefCount = (unsigned int)spNode.m_pObject;
      LOBYTE(v36[1].m_uiExtraDataSize) = 1;
      kCreateInfo.m_nOffX = 3;
      kCreateInfo.m_nOffY = 0;
      SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
      v37 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &uiLeft, &uiTop, pkTexture);
      v38 = SlideListWin::CreateWin(uiLeft - v14, uiTop - v15, v37, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
      v2->m_pkListWin = v38;
      v38->m_uiLClickMsg = 14;
      v2->m_pkListWin->m_uiRClickMsg = 15;
      SlideListWin::UpdateViewList(v2->m_pkListWin);
      SlideListWin::SetToolTipWin(v2->m_pkListWin, g_pkToolTipWin);
      v39 = (NiSourceTexture *)operator new(0xCu);
      pkTexture8 = v39;
      LOBYTE(v149) = 8;
      if ( v39 )
        CPartyFinder::CPartyFinder((CPartyFinder *)v39);
      else
        v40 = 0;
      v41 = pkTexture;
      v42 = spNode.m_pObject;
      v2->m_pkPartyFinder = v40;
      LOBYTE(v149) = 2;
      v43 = PgSprData::Create((NiAVObject *)&v42->vfptr, "CharName", &uiLeft, &uiTop, v41)->m_akHitTester.m_pBase->m_pObject;
      v44 = (PgWinText *)v43->m_uiWidth;
      pkTexture8 = (NiSourceTexture *)v43->m_uiHeight;
      pkTextWin = v44;
      v45 = Font::Get(MAIN_MENU);
      v46 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v45,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v47 = v46->vfptr;
      pkTextWin = v46;
      v47[122].__vecDelDtor((NiRefObject *)v46, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v48 = TextData::Get(0x4EA49695u);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v48);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      v49 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title", &uiLeft, &uiTop, pkTexture)->m_akHitTester.m_pBase;
      v50 = (PgWinText *)v49->m_pObject->m_uiWidth;
      pkTexture8 = (NiSourceTexture *)v49->m_pObject->m_uiHeight;
      pkTextWin = v50;
      v51 = Font::Get(MAIN_MENU);
      v52 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v51,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v53 = v52->vfptr;
      pkTextWin = v52;
      v53[122].__vecDelDtor((NiRefObject *)v52, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v54 = TextData::Get(0xE5E1C0D9);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v54);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      v55 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Base", &uiLeft, &uiTop, 0);
      PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v55, (PgWin *)&v2->vfptr, 0, 0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "FriendNor",
                                 &uiLeft,
                                 &uiTop,
                                 0);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "FriendClick");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "FriendOver");
      pkTexture8 = (NiSourceTexture *)PgWinBut::CreateWin(
                                        uiLeft - v14,
                                        uiTop - v15,
                                        (PgSprData *)pkTextWin,
                                        (PgWin *)&v2->vfptr,
                                        0x14u,
                                        0,
                                        0);
      v56 = (char *)TextData::Get(0xDCF3EDF4);
      PgWin::SetToolTipWinText((PgWin *)pkTexture8, v56);
      pkTexture8[4].vfptr = (NiRefObjectVtbl *)g_pkToolTipWin;
      pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GuildNor", &uiLeft, &uiTop, 0);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GuildClick");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GuildOver");
      pkTexture8 = (NiSourceTexture *)PgWinBut::CreateWin(
                                        uiLeft - v14,
                                        uiTop - v15,
                                        (PgSprData *)pkTextWin,
                                        (PgWin *)&v2->vfptr,
                                        0x15u,
                                        0,
                                        0);
      v57 = (char *)TextData::Get(0x9BEAF4F4);
      PgWin::SetToolTipWinText((PgWin *)pkTexture8, v57);
      pkTexture8[4].vfptr = (NiRefObjectVtbl *)g_pkToolTipWin;
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "MasterNor",
                                 &uiLeft,
                                 &uiTop,
                                 0);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "MasterClick");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "MasterOver");
      pkTexture8 = (NiSourceTexture *)PgWinBut::CreateWin(
                                        uiLeft - v14,
                                        uiTop - v15,
                                        (PgSprData *)pkTextWin,
                                        (PgWin *)&v2->vfptr,
                                        0x17u,
                                        0,
                                        0);
      v58 = (char *)TextData::Get(0xF44C3A3C);
      PgWin::SetToolTipWinText((PgWin *)pkTexture8, v58);
      pkTexture8[4].vfptr = (NiRefObjectVtbl *)g_pkToolTipWin;
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "WeddingNor",
                                 &uiLeft,
                                 &uiTop,
                                 0);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "WeddingClick");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "WeddingOver");
      pkTexture8 = (NiSourceTexture *)PgWinBut::CreateWin(
                                        uiLeft - v14,
                                        uiTop - v15,
                                        (PgSprData *)pkTextWin,
                                        (PgWin *)&v2->vfptr,
                                        0x16u,
                                        0,
                                        0);
      v59 = (char *)TextData::Get(0xC8F53F44);
      PgWin::SetToolTipWinText((PgWin *)pkTexture8, v59);
      pkTexture8[4].vfptr = (NiRefObjectVtbl *)g_pkToolTipWin;
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "PartyMatchNor",
                                 &uiLeft,
                                 &uiTop,
                                 0);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "PartyMatchClick");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "PartyMatchOver");
      pkTexture8 = (NiSourceTexture *)PgWinBut::CreateWin(
                                        uiLeft - v14,
                                        uiTop - v15,
                                        (PgSprData *)pkTextWin,
                                        (PgWin *)&v2->vfptr,
                                        0xAu,
                                        0,
                                        0);
      v60 = (char *)TextData::Get(0x1C4B503Eu);
      PgWin::SetToolTipWinText((PgWin *)pkTexture8, v60);
      pkTexture8[4].vfptr = (NiRefObjectVtbl *)g_pkToolTipWin;
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "GuildAcademyNor",
                                 &uiLeft,
                                 &uiTop,
                                 0);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GuildAcademyClick");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GuildAcademyOver");
      pkTexture8 = (NiSourceTexture *)PgWinBut::CreateWin(
                                        uiLeft - v14,
                                        uiTop - v15,
                                        (PgSprData *)pkTextWin,
                                        (PgWin *)&v2->vfptr,
                                        0x18u,
                                        0,
                                        0);
      v61 = (char *)TextData::Get(0x253B184Cu);
      PgWin::SetToolTipWinText((PgWin *)pkTexture8, v61);
      pkTexture8[4].vfptr = (NiRefObjectVtbl *)g_pkToolTipWin;
      v62 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Friend", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
      v63 = (PgWinText *)v62->m_uiWidth;
      pkTexture8 = (NiSourceTexture *)v62->m_uiHeight;
      pkTextWin = v63;
      v64 = Font::Get(TITLEBOLD);
      v65 = PgWinText::CreateWin(
              uiLeft,
              uiTop,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v64,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v66 = v65->vfptr;
      pkTextWin = v65;
      v66[122].__vecDelDtor((NiRefObject *)v65, 1u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v67 = TextData::Get(0xDCF3EDF4);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v67);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      v68 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HolyPromise", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
      v69 = (PgWinText *)v68->m_uiWidth;
      pkTexture8 = (NiSourceTexture *)v68->m_uiHeight;
      pkTextWin = v69;
      v70 = Font::Get(TITLEBOLD);
      v71 = PgWinText::CreateWin(
              uiLeft,
              uiTop,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v70,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v72 = v71->vfptr;
      pkTextWin = v71;
      v72[122].__vecDelDtor((NiRefObject *)v71, 1u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v73 = TextData::Get(0xF44C3A3C);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v73);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      v74 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Guild", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
      v75 = (PgWinText *)v74->m_uiWidth;
      pkTexture8 = (NiSourceTexture *)v74->m_uiHeight;
      pkTextWin = v75;
      v76 = Font::Get(TITLEBOLD);
      v77 = PgWinText::CreateWin(
              uiLeft,
              uiTop,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v76,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v78 = v77->vfptr;
      pkTextWin = v77;
      v78[122].__vecDelDtor((NiRefObject *)v77, 1u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v79 = TextData::Get(0x9BEAF4F4);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v79);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      v80 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GuildAcademy", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
      v81 = (PgWinText *)v80->m_uiWidth;
      pkTexture8 = (NiSourceTexture *)v80->m_uiHeight;
      pkTextWin = v81;
      v82 = Font::Get(TITLEBOLD);
      v83 = PgWinText::CreateWin(
              uiLeft,
              uiTop,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v82,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v84 = v83->vfptr;
      pkTextWin = v83;
      v84[122].__vecDelDtor((NiRefObject *)v83, 1u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v85 = TextData::Get(0x253B184Cu);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v85);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      v86 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Wedding", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
      v87 = (PgWinText *)v86->m_uiWidth;
      pkTexture8 = (NiSourceTexture *)v86->m_uiHeight;
      pkTextWin = v87;
      v88 = Font::Get(TITLEBOLD);
      v89 = PgWinText::CreateWin(
              uiLeft,
              uiTop,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v88,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v90 = v89->vfptr;
      pkTextWin = v89;
      v90[122].__vecDelDtor((NiRefObject *)v89, 1u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v91 = TextData::Get(0xC8F53F44);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v91);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      v92 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PartyMatch", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
      v93 = (PgWinText *)v92->m_uiWidth;
      pkTexture8 = (NiSourceTexture *)v92->m_uiHeight;
      pkTextWin = v93;
      v94 = Font::Get(TITLEBOLD);
      v95 = PgWinText::CreateWin(
              uiLeft,
              uiTop,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v94,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v96 = v95->vfptr;
      pkTextWin = v95;
      v96[122].__vecDelDtor((NiRefObject *)v95, 1u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v97 = TextData::Get(0x1C4B503Eu);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v97);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "PrePageNor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "PrePageClick");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "PrePageOver");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xCu, 0, 0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "NextPageNor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "NextPageClick");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "NextPageOver");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xDu, 0, 0);
      v98 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextInput", &uiLeft, &uiTop, pkTexture)->m_akHitTester.m_pBase;
      v99 = (PgWinText *)v98->m_pObject->m_uiWidth;
      pkTexture8 = (NiSourceTexture *)v98->m_pObject->m_uiHeight;
      pkTextWin = v99;
      v100 = Font::Get(MAIN_MENU);
      v101 = PgWinText::CreateWin(
               uiLeft - v14,
               uiTop - v15 + 1,
               (unsigned int)pkTextWin,
               (unsigned int)pkTexture8,
               v100,
               (PgWin *)&v2->vfptr,
               0,
               0);
      v102 = v101->vfptr;
      pkTextWin = v101;
      v102[122].__vecDelDtor((NiRefObject *)v101, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v103 = TextData::Get(0xE3E7F54C);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v103);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      v104 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextInput01", &uiLeft, &uiTop, pkTexture);
      pkTexture8 = (NiSourceTexture *)PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v104, (PgWin *)&v2->vfptr, 0, 0);
      if ( PgUtil::GetTriShapeRect(
             (NiAVObject *)&spNode.m_pObject->vfptr,
             "TextInput01",
             &uiLeft,
             &uiTop,
             &uiWidth,
             &uiHeight) )
      {
        v105 = Font::Get(0);
        v106 = EditWin::CreateWin(
                 uiLeft,
                 uiTop + (v105->m_uiDefHeight >> 1),
                 uiWidth,
                 uiHeight,
                 (PgWin *)pkTexture8,
                 NORMAL,
                 0x2Eu,
                 4u,
                 1,
                 0,
                 1);
        NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spEdit, (NiD3DDefaultShader *)v106);
        EditWin::SetImeStatus(v2->m_spEdit.m_pObject, IS_KOREAN);
        pkTextWin = (PgWinText *)PgSprData::Create(
                                   (NiAVObject *)&spNode.m_pObject->vfptr,
                                   "Btn01Nor",
                                   &uiLeft,
                                   &uiTop,
                                   pkTexture);
        PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
        PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
        PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Disable");
        v107 = PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x10u, 0, 0);
        v108 = pkTextWin;
        v2->m_pkBtnAddComment = v107;
        v109 = *(_DWORD *)LODWORD(v108->m_kWorldBound.m_kCenter.x);
        v110 = *(PgWinText **)(v109 + 20);
        pkTexture8 = *(NiSourceTexture **)(v109 + 24);
        pkTextWin = v110;
        v111 = Font::Get(MAIN_MENU);
        v112 = PgWinText::CreateWin(
                 uiLeft - v14,
                 uiTop - v15 + 1,
                 (unsigned int)pkTextWin,
                 (unsigned int)pkTexture8,
                 v111,
                 (PgWin *)&v2->vfptr,
                 0,
                 0);
        v2->m_pkBtnTxt = v112;
        v112->vfptr[122].__vecDelDtor((NiRefObject *)v112, 5u);
        pkTexture8 = (NiSourceTexture *)v2->m_pkBtnTxt->vfptr;
        v113 = TextData::Get(0x818D7FA9);
        (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(v2->m_pkBtnTxt, v113);
        ((void (__stdcall *)(_DWORD))v2->m_pkBtnTxt->vfptr[60].__vecDelDtor)(0);
        pkTextWin = (PgWinText *)PgSprData::Create(
                                   (NiAVObject *)&spNode.m_pObject->vfptr,
                                   "Btn02Nor",
                                   &uiLeft,
                                   &uiTop,
                                   pkTexture);
        PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Click");
        PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Over");
        PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Disable");
        v114 = (NiSourceTexture *)PgWinBut::CreateWin(
                                    uiLeft - v14,
                                    uiTop - v15,
                                    (PgSprData *)pkTextWin,
                                    (PgWin *)&v2->vfptr,
                                    0x11u,
                                    0,
                                    0);
        v2->m_pkBtnDelComment = (PgWinBut *)v114;
        pkTexture8 = v114;
        v114[4].vfptr = (NiRefObjectVtbl *)g_pkToolTipWin;
        v115 = (char *)TextData2::Get(0xDDF50F1C);
        PgWin::SetToolTipWinText((PgWin *)pkTexture8, v115);
        v116 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
        v117 = *(PgWinText **)(v116 + 20);
        pkTexture8 = *(NiSourceTexture **)(v116 + 24);
        pkTextWin = v117;
        v118 = Font::Get(MAIN_MENU);
        v119 = PgWinText::CreateWin(
                 uiLeft - v14,
                 uiTop - v15 + 1,
                 (unsigned int)pkTextWin,
                 (unsigned int)pkTexture8,
                 v118,
                 (PgWin *)&v2->vfptr,
                 0,
                 0);
        v120 = v119->vfptr;
        pkTextWin = v119;
        v120[122].__vecDelDtor((NiRefObject *)v119, 5u);
        pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
        v121 = TextData::Get(0x748473A5u);
        (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v121);
        ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
        pkTextWin = (PgWinText *)PgSprData::Create(
                                   (NiAVObject *)&spNode.m_pObject->vfptr,
                                   "Btn03Nor",
                                   &uiLeft,
                                   &uiTop,
                                   pkTexture);
        PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Click");
        PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Over");
        PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Disable");
        v122 = PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x12u, 0, 0);
        v123 = pkTextWin;
        v2->m_pkBtnWhisper = v122;
        v124 = *(_DWORD *)LODWORD(v123->m_kWorldBound.m_kCenter.x);
        v125 = *(PgWinText **)(v124 + 20);
        pkTexture8 = *(NiSourceTexture **)(v124 + 24);
        pkTextWin = v125;
        v126 = Font::Get(MAIN_MENU);
        v127 = PgWinText::CreateWin(
                 uiLeft - v14,
                 uiTop - v15 + 1,
                 (unsigned int)pkTextWin,
                 (unsigned int)pkTexture8,
                 v126,
                 (PgWin *)&v2->vfptr,
                 0,
                 0);
        v128 = v127->vfptr;
        pkTextWin = v127;
        v128[122].__vecDelDtor((NiRefObject *)v127, 5u);
        pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
        v129 = TextData::Get(0x32648786u);
        (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v129);
        ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
        pkTextWin = (PgWinText *)PgSprData::Create(
                                   (NiAVObject *)&spNode.m_pObject->vfptr,
                                   "Btn04Nor",
                                   &uiLeft,
                                   &uiTop,
                                   pkTexture);
        PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn04Click");
        PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn04Over");
        PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn04Disable");
        v130 = (NiSourceTexture *)PgWinBut::CreateWin(
                                    uiLeft - v14,
                                    uiTop - v15,
                                    (PgSprData *)pkTextWin,
                                    (PgWin *)&v2->vfptr,
                                    0x13u,
                                    0,
                                    0);
        v2->m_pkBtnApplyParty = (PgWinBut *)v130;
        pkTexture8 = v130;
        v130[4].vfptr = (NiRefObjectVtbl *)g_pkToolTipWin;
        v131 = (char *)TextData2::Get(0x404C6D5u);
        PgWin::SetToolTipWinText((PgWin *)pkTexture8, v131);
        v132 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
        v133 = *(NiSourceTexture **)(v132 + 20);
        pkTexture = *(NiSourceTexture **)(v132 + 24);
        pkTexture8 = v133;
        v134 = Font::Get(MAIN_MENU);
        v135 = PgWinText::CreateWin(
                 uiLeft - v14,
                 uiTop - v15 + 1,
                 (unsigned int)pkTexture8,
                 (unsigned int)pkTexture,
                 v134,
                 (PgWin *)&v2->vfptr,
                 0,
                 0);
        v135->vfptr[122].__vecDelDtor((NiRefObject *)v135, 5u);
        v136 = v135->vfptr;
        v137 = TextData::Get(0x353D9AAAu);
        v136[118].__vecDelDtor((NiRefObject *)v135, (unsigned int)v137);
        v135->vfptr[60].__vecDelDtor((NiRefObject *)v135, 0);
        ((void (__thiscall *)(CPartyMatchWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
          v2,
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          0.40000001,
          0.5);
        LOBYTE(v149) = 1;
        SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
        LOBYTE(v149) = 0;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
        v149 = -1;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
        return 1;
      }
      LOBYTE(v149) = 1;
      SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
    }
    LOBYTE(v149) = 0;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
    v149 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  LOBYTE(v149) = 0;
  if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  v13 = spNode.m_pObject;
  v149 = -1;
  if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v13 )
    return 0;
  v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
  return 0;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00564AA0) --------------------------------------------------------
CPartyMatchWin *__thiscall CPartyMatchWin::`scalar deleting destructor'(CPartyMatchWin *this, unsigned int a2)
{
  CPartyMatchWin *v2; // esi@1

  v2 = this;
  CPartyMatchWin::~CPartyMatchWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00564AD0) --------------------------------------------------------
void __thiscall PartyWin::ProcessMeInput(PartyWin *this, bool *bHit)
{
  PgWinFrame::ProcessMeInput((PgWinFrame *)&this->vfptr, bHit);
}

//----- (00564AE0) --------------------------------------------------------
void __thiscall PartyWin::ClearInfo(PartyWin *this)
{
  PartyWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkLvTextWin->vfptr[118].__vecDelDtor)(&unk_99A99B);
  ((void (__stdcall *)(_DWORD))v1->m_pkNameTextWin->vfptr[118].__vecDelDtor)(&unk_99A9A7);
  v1->m_pkMemberInfo = 0;
}

//----- (00564B20) --------------------------------------------------------
const char *__thiscall PartyWin::GetMemberName(PartyWin *this)
{
  PartyWin *v1; // esi@1
  const char *result; // eax@2

  v1 = this;
  if ( this->m_pkNameTextWin )
  {
    ((void (*)(void))this->m_pkNameTextWin->vfptr[121].__vecDelDtor)();
    result = (const char *)((int (*)(void))v1->m_pkNameTextWin->vfptr[121].__vecDelDtor)();
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00564B60) --------------------------------------------------------
void __thiscall PartyWin::~PartyWin(PartyWin *this)
{
  PartyWin *v1; // esi@1
  PgWinBut *v2; // edi@1
  PgWinBut *v3; // edi@5
  PopupMenuWin *v4; // edi@9

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&PartyWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PartyWin::`vftable'{for `IDirectMessenger'};
  PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&this->m_spPopupMenu.m_pObject->vfptr);
  v2 = v1->m_pkDeBufExtendBtn.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_pkBufExtendBtn.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  `eh vector destructor iterator'(
    v1->m_apkAbstateDBuffWin,
    4u,
    15,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_apkAbstateBuffWin,
    4u,
    15,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_apkAbstateDeBufIconWin,
    4u,
    15,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_apkAbstateBufIconWin,
    4u,
    15,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v4 = v1->m_spPopupMenu.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 99AB98: using guessed type void (__thiscall *PartyWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99ABB4: using guessed type int (__thiscall *PartyWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00564CB0) --------------------------------------------------------
void __thiscall PartyWin::DirectMessage(PartyWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  PartyWin *v4; // esi@1
  signed int v5; // eax@2
  AbstateIcon *v6; // ecx@11
  void *(__thiscall *v7)(NiRefObject *, unsigned int); // eax@14
  void (__thiscall *v8)(NiPointer<AbstateIcon> *, void **, int *); // eax@19
  int v9; // ebx@19
  signed int v10; // eax@20
  int v11; // eax@22
  const char *v12; // eax@26
  unsigned int v13; // edi@26
  char *v14; // eax@31
  Char *v15; // eax@33
  int v16; // [sp+0h] [bp-Ch]@0
  int v17; // [sp+0h] [bp-Ch]@12
  int iSy; // [sp+8h] [bp-4h]@19

  v4 = this;
  if ( iMsgTag == 15 )
  {
    v5 = 0;
    switch ( *(_DWORD *)pvBody )
    {
      case 0x3F7:
        v5 = 1;
        break;
      case 0x3F8:
        v5 = 2;
        break;
      case 0x3F9:
        v5 = 4;
        break;
      case 0x3FA:
        v5 = 8;
        break;
      case 0x3FB:
        v5 = 16;
        break;
      default:
        break;
    }
    if ( *((_BYTE *)pvBody + 4) )
      LODWORD(this->m_kWorld.m_Rotate.m_pEntry[0][2]) |= v5;
    else
      LODWORD(this->m_kWorld.m_Rotate.m_pEntry[0][2]) &= ~v5;
    v6 = this->m_apkAbstateBufIconWin[3].m_pObject;
    if ( LOBYTE(v4->m_kWorld.m_Rotate.m_pEntry[0][2]) & 0x10 )
    {
      ((void (__stdcall *)(_DWORD, int))v6->vfptr[60].__vecDelDtor)(0, v16);
      v4->m_apkAbstateBufIconWin[3].m_pObject->m_uFlags |= 1u;
      ((void (__cdecl *)(_DWORD))v4->m_apkAbstateBufIconWin[3].m_pObject->vfptr[64].__vecDelDtor)(0);
    }
    else
    {
      ((void (__stdcall *)(signed int, int))v6->vfptr[60].__vecDelDtor)(1, v16);
      v4->m_apkAbstateBufIconWin[3].m_pObject->m_uFlags &= 0xFFFEu;
      ((void (__cdecl *)(signed int))v4->m_apkAbstateBufIconWin[3].m_pObject->vfptr[64].__vecDelDtor)(1);
    }
    v7 = v4->m_apkAbstateBufIconWin[2].m_pObject->vfptr[60].__vecDelDtor;
    if ( LOBYTE(v4->m_kWorld.m_Rotate.m_pEntry[0][2]) & 0xF )
    {
      ((void (__stdcall *)(_DWORD, int))v7)(0, v17);
      v4->m_apkAbstateBufIconWin[2].m_pObject->m_uFlags |= 1u;
    }
    else
    {
      ((void (__stdcall *)(signed int, int))v7)(1, v17);
      v4->m_apkAbstateBufIconWin[2].m_pObject->m_uFlags &= 0xFFFEu;
    }
    ((void (*)(void))v4->m_apkAbstateBufIconWin[2].m_pObject->vfptr[64].__vecDelDtor)();
  }
  if ( pkFrom )
  {
    v8 = (void (__thiscall *)(NiPointer<AbstateIcon> *, void **, int *))LODWORD(v4[-1].m_apkAbstateBufIconWin[5].m_pObject->m_kBound.m_kCenter.z);
    pvBody = (void *)PgWin::ms_iMsX;
    v9 = (int)&v4[-1].m_apkAbstateBufIconWin[5];
    iSy = PgWin::ms_iMsY;
    v8(&v4[-1].m_apkAbstateBufIconWin[5], &pvBody, &iSy);
    if ( (signed int)pvBody >= 0 )
    {
      v10 = (*(int (__thiscall **)(NiPointer<AbstateIcon> *))(*(_DWORD *)v9 + 144))(&v4[-1].m_apkAbstateBufIconWin[5]);
      if ( (signed int)pvBody < v10 && iSy >= 0 )
      {
        v11 = (*(int (__thiscall **)(NiPointer<AbstateIcon> *))(*(_DWORD *)v9 + 148))(&v4[-1].m_apkAbstateBufIconWin[5]);
        if ( iSy < v11 )
        {
          if ( iMsgTag == 3 )
          {
            if ( LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[2][1]) )
            {
              v14 = (char *)(*(int (**)(void))(*(_DWORD *)LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[2][1]) + 484))();
              if ( v14 )
              {
                if ( strcmp(v14, (const char *)&unk_99A9BD) )
                {
                  v15 = CharMgr::GetChar(&g_kCharMgr, v14);
                  if ( v15 )
                    GameFrameWork::TargetCharReq((GameFrameWork *)LODWORD(v4->m_kLocal.m_Rotate.m_pEntry[1][0]), v15);
                }
              }
            }
          }
          else if ( iMsgTag == 6 )
          {
            if ( LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[2][1]) )
            {
              v12 = (const char *)(*(int (**)(void))(*(_DWORD *)LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[2][1]) + 484))();
              v13 = (unsigned int)v12;
              if ( v12 )
              {
                if ( strcmp(v12, (const char *)&unk_99A9B3) )
                {
                  if ( (unsigned __int8)(*(int (__thiscall **)(NiPointer<AbstateIcon> *))(*(_DWORD *)v9 + 260))(&v4[-1].m_apkAbstateBufIconWin[5]) )
                    PgFrameWork::AddMsg((PgFrameWork *)LODWORD(v4->m_kLocal.m_Rotate.m_pEntry[1][0]), 0x80u, v13, 0);
                }
              }
            }
          }
        }
      }
    }
  }
}

//----- (00564F40) --------------------------------------------------------
void __thiscall PartyWin::SetBuffUI(PartyWin *this, Char *pkMember, StateType type, int *AbstateNums)
{
  PartyWin *v4; // esi@1
  NiTListItem<AbStateInst *> *v5; // ecx@1
  signed int v6; // eax@1
  AbstateIcon **v7; // edi@2
  AbstateIcon **v8; // esi@2
  AbStateInst *v9; // ebx@5
  int v10; // eax@9
  bool v11; // zf@9
  AbnormalStateViewInfo **v12; // eax@9
  int v13; // eax@18
  int *v14; // eax@18
  int v15; // eax@19
  StateType v16; // eax@22
  int v17; // eax@27
  int *v18; // eax@27
  int v19; // eax@28
  int v20; // [sp+4h] [bp-14h]@5
  unsigned __int16 v21; // [sp+4h] [bp-14h]@16
  unsigned __int16 v22; // [sp+4h] [bp-14h]@25
  NiTListItem<AbStateInst *> *kIter; // [sp+8h] [bp-10h]@5
  unsigned __int16 pkInfo; // [sp+Ch] [bp-Ch]@5
  AbnormalStateViewInfo *pkInfoa; // [sp+Ch] [bp-Ch]@6
  AbnormalStateViewInfo *pkInfob; // [sp+Ch] [bp-Ch]@16
  AbnormalStateViewInfo *pkInfoc; // [sp+Ch] [bp-Ch]@25
  int v28; // [sp+10h] [bp-8h]@2
  int v29; // [sp+14h] [bp-4h]@2
  int i; // [sp+20h] [bp+8h]@1

  v4 = this;
  v5 = AbStateInfectee::GetAbStateList((AbStateInfectee *)&pkMember->vfptr)->m_pkHead;
  v6 = *AbstateNums;
  i = *AbstateNums;
  if ( v5 )
  {
    v28 = (int)&v4->m_apkAbstateBuffWin[v6];
    v7 = &v4->m_apkAbstateBufIconWin[v6].m_pObject;
    v29 = (int)&v4->m_apkAbstateDBuffWin[v6];
    v8 = &v4->m_apkAbstateDeBufIconWin[v6].m_pObject;
    while ( v6 < 15 )
    {
      v9 = v5->m_element;
      kIter = v5->m_pkNext;
      pkInfo = v9->kID;
      v20 = ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;
      if ( (unsigned __int8)(*(int (__stdcall **)(_DWORD))(*(_DWORD *)ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable
                                                         + 16))(v9->kID) )
      {
        if ( pkInfo <= *(_WORD *)(v20 + 200) )
        {
          v10 = *(_DWORD *)(v20 + 196);
          v11 = *(_DWORD *)(v10 + 4 * pkInfo) == 0;
          v12 = (AbnormalStateViewInfo **)(v10 + 4 * pkInfo);
          if ( v11 )
            pkInfoa = 0;
          else
            pkInfoa = *v12;
        }
        else
        {
          pkInfoa = 0;
        }
      }
      else
      {
        pkInfoa = 0;
      }
      if ( pkInfoa->View )
      {
        if ( type != 4 || pkInfoa->TypeSort != 4 )
        {
          v16 = pkInfoa->TypeSort;
          if ( v16 == type && v16 != 4 )
          {
            AbstateIcon::SetAbstate(*v7, v9->kID);
            PgWin::SetToolTipWinText((PgWin *)&(*v7)->vfptr, pkInfoa->Descript);
            (*v7)->m_pkToolTipWin = g_pkToolTipWin;
            ((void (__stdcall *)(signed int))(*v7)->vfptr[64].__vecDelDtor)(1);
            ((void (__stdcall *)(signed int))(*v7)->vfptr[60].__vecDelDtor)(1);
            ((void (__stdcall *)(signed int))(*v7)->vfptr[62].__vecDelDtor)(1);
            (*(void (__stdcall **)(signed int))(**(_DWORD **)v28 + 256))(1);
            ++i;
            v29 += 4;
            v28 += 4;
            ++v8;
            ++v7;
            if ( v9->uiSubStateStr )
            {
              v22 = v9->kID;
              pkInfoc = (AbnormalStateViewInfo *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
              if ( (unsigned __int8)(*(int (__stdcall **)(_DWORD))(*(_DWORD *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable
                                                                 + 16))(v9->kID) )
              {
                if ( v22 <= *(_WORD *)&pkInfoc->Descript[130] )
                {
                  v17 = *(_DWORD *)&pkInfoc->Descript[126];
                  v11 = *(_DWORD *)(v17 + 4 * v22) == 0;
                  v18 = (int *)(v17 + 4 * v22);
                  if ( !v11 )
                  {
                    v19 = *v18;
                    if ( v19 )
                    {
                      if ( *(_BYTE *)(v19 + 288) )
                      {
                        AbstateIcon::SetDuplicate(*v7, v9->uiSubStateStr);
                        ((void (__stdcall *)(signed int))(*v7)->vfptr[64].__vecDelDtor)(1);
                        ((void (__stdcall *)(signed int))(*v7)->vfptr[60].__vecDelDtor)(1);
                        ((void (__stdcall *)(signed int))(*v7)->vfptr[62].__vecDelDtor)(1);
                        (*(void (__stdcall **)(signed int))(**(_DWORD **)v28 + 256))(1);
                        ++i;
                        v29 += 4;
                        ++v8;
                        ++v7;
                        v28 += 4;
                      }
                    }
                  }
                }
              }
            }
          }
        }
        else
        {
          AbstateIcon::SetAbstate(*v8, v9->kID);
          PgWin::SetToolTipWinText((PgWin *)&(*v8)->vfptr, pkInfoa->Descript);
          (*v8)->m_pkToolTipWin = g_pkToolTipWin;
          ((void (__stdcall *)(signed int))(*v8)->vfptr[64].__vecDelDtor)(1);
          ((void (__stdcall *)(signed int))(*v8)->vfptr[60].__vecDelDtor)(1);
          ((void (__stdcall *)(signed int))(*v8)->vfptr[62].__vecDelDtor)(1);
          (*(void (__stdcall **)(signed int))(**(_DWORD **)v29 + 256))(1);
          ++i;
          v29 += 4;
          v28 += 4;
          ++v8;
          ++v7;
          if ( v9->uiSubStateStr )
          {
            v21 = v9->kID;
            pkInfob = (AbnormalStateViewInfo *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
            if ( (unsigned __int8)(*(int (__stdcall **)(_DWORD))(*(_DWORD *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable
                                                               + 16))(v9->kID) )
            {
              if ( v21 <= *(_WORD *)&pkInfob->Descript[130] )
              {
                v13 = *(_DWORD *)&pkInfob->Descript[126];
                v11 = *(_DWORD *)(v13 + 4 * v21) == 0;
                v14 = (int *)(v13 + 4 * v21);
                if ( !v11 )
                {
                  v15 = *v14;
                  if ( v15 )
                  {
                    if ( *(_BYTE *)(v15 + 288) )
                    {
                      AbstateIcon::SetDuplicate(*v8, v9->uiSubStateStr);
                      ((void (__stdcall *)(signed int))(*v8)->vfptr[64].__vecDelDtor)(1);
                      ((void (__stdcall *)(signed int))(*v8)->vfptr[60].__vecDelDtor)(1);
                      ((void (__stdcall *)(signed int))(*v8)->vfptr[62].__vecDelDtor)(1);
                      (*(void (__stdcall **)(signed int))(**(_DWORD **)v29 + 256))(1);
                      ++i;
                      ++v8;
                      ++v7;
                      v28 += 4;
                      v29 += 4;
                    }
                  }
                }
              }
            }
          }
        }
      }
      if ( !kIter )
      {
        *AbstateNums = i;
        return;
      }
      v5 = kIter;
      v6 = i;
    }
    *AbstateNums = v6;
  }
  else
  {
    *AbstateNums = v6;
  }
}
// A8C2A0: using guessed type int ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
// A8C2A4: using guessed type int ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;

//----- (005652E0) --------------------------------------------------------
void __thiscall PartyWin::SetOption(PartyWin *this, unsigned int uiOpt)
{
  PartyWin *v2; // esi@1
  char *v3; // edi@1
  int v4; // edi@4
  int v5; // edi@7
  int v6; // edi@10
  int v7; // edi@13
  PgWinBut *v8; // ecx@16
  void *(__thiscall *v9)(NiRefObject *, unsigned int); // eax@19
  int v10; // [sp+0h] [bp-14h]@0
  int v11; // [sp+0h] [bp-14h]@17
  DirectUserMsgBody_PopupMenuSetCheckBox kBody; // [sp+Ch] [bp-8h]@1

  v2 = this;
  v3 = (char *)&this->m_spPopupMenu.m_pObject->vfptr;
  kBody.iPopupMenuID = 1015;
  kBody.bCheck = uiOpt & 1;
  if ( *((_DWORD *)v3 + 1) )
  {
    (*(void (__stdcall **)(signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, char *))(**((_DWORD **)v3 + 1) + 4))(
      16,
      &kBody,
      v3);
    if ( *((_DWORD *)v3 + 1) )
      (*(void (__stdcall **)(signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, char *))(**((_DWORD **)v3 + 1) + 16))(
        16,
        &kBody,
        v3);
  }
  (*(void (__thiscall **)(char *, signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, char *))(*(_DWORD *)v3 + 16))(
    v3,
    16,
    &kBody,
    v3);
  v4 = (int)&v2->m_spPopupMenu.m_pObject->vfptr;
  kBody.iPopupMenuID = 1016;
  kBody.bCheck = (uiOpt >> 1) & 1;
  if ( *(_DWORD *)(v4 + 4) )
  {
    (*(void (__stdcall **)(signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, int))(**(_DWORD **)(v4 + 4) + 4))(
      16,
      &kBody,
      v4);
    if ( *(_DWORD *)(v4 + 4) )
      (*(void (__stdcall **)(signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, int))(**(_DWORD **)(v4 + 4) + 16))(
        16,
        &kBody,
        v4);
  }
  (*(void (__thiscall **)(int, signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, int))(*(_DWORD *)v4 + 16))(
    v4,
    16,
    &kBody,
    v4);
  v5 = (int)&v2->m_spPopupMenu.m_pObject->vfptr;
  kBody.iPopupMenuID = 1017;
  kBody.bCheck = (uiOpt >> 2) & 1;
  if ( *(_DWORD *)(v5 + 4) )
  {
    (*(void (__stdcall **)(signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, int))(**(_DWORD **)(v5 + 4) + 4))(
      16,
      &kBody,
      v5);
    if ( *(_DWORD *)(v5 + 4) )
      (*(void (__stdcall **)(signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, int))(**(_DWORD **)(v5 + 4) + 16))(
        16,
        &kBody,
        v5);
  }
  (*(void (__thiscall **)(int, signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, int))(*(_DWORD *)v5 + 16))(
    v5,
    16,
    &kBody,
    v5);
  v6 = (int)&v2->m_spPopupMenu.m_pObject->vfptr;
  kBody.iPopupMenuID = 1018;
  kBody.bCheck = (uiOpt >> 3) & 1;
  if ( *(_DWORD *)(v6 + 4) )
  {
    (*(void (__stdcall **)(signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, int))(**(_DWORD **)(v6 + 4) + 4))(
      16,
      &kBody,
      v6);
    if ( *(_DWORD *)(v6 + 4) )
      (*(void (__stdcall **)(signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, int))(**(_DWORD **)(v6 + 4) + 16))(
        16,
        &kBody,
        v6);
  }
  (*(void (__thiscall **)(int, signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, int))(*(_DWORD *)v6 + 16))(
    v6,
    16,
    &kBody,
    v6);
  v7 = (int)&v2->m_spPopupMenu.m_pObject->vfptr;
  kBody.iPopupMenuID = 1019;
  kBody.bCheck = (uiOpt >> 4) & 1;
  if ( *(_DWORD *)(v7 + 4) )
  {
    (*(void (__stdcall **)(signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, int))(**(_DWORD **)(v7 + 4) + 4))(
      16,
      &kBody,
      v7);
    if ( *(_DWORD *)(v7 + 4) )
      (*(void (__stdcall **)(signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, int))(**(_DWORD **)(v7 + 4) + 16))(
        16,
        &kBody,
        v7);
  }
  (*(void (__thiscall **)(int, signed int, DirectUserMsgBody_PopupMenuSetCheckBox *, int))(*(_DWORD *)v7 + 16))(
    v7,
    16,
    &kBody,
    v7);
  v8 = v2->m_pkDeBufExtendBtn.m_pObject;
  v2->m_uiOption = uiOpt;
  if ( uiOpt & 0x10 )
  {
    ((void (__stdcall *)(_DWORD, int))v8->vfptr[60].__vecDelDtor)(0, v10);
    v2->m_pkDeBufExtendBtn.m_pObject->m_uFlags |= 1u;
    ((void (__cdecl *)(_DWORD))v2->m_pkDeBufExtendBtn.m_pObject->vfptr[64].__vecDelDtor)(0);
  }
  else
  {
    ((void (__stdcall *)(signed int, int))v8->vfptr[60].__vecDelDtor)(1, v10);
    v2->m_pkDeBufExtendBtn.m_pObject->m_uFlags &= 0xFFFEu;
    ((void (__cdecl *)(signed int))v2->m_pkDeBufExtendBtn.m_pObject->vfptr[64].__vecDelDtor)(1);
  }
  v9 = v2->m_pkBufExtendBtn.m_pObject->vfptr[60].__vecDelDtor;
  if ( v2->m_uiOption & 0xF )
  {
    ((void (__stdcall *)(_DWORD, int))v9)(0, v11);
    v2->m_pkBufExtendBtn.m_pObject->m_uFlags |= 1u;
  }
  else
  {
    ((void (__stdcall *)(signed int, int))v9)(1, v11);
    v2->m_pkBufExtendBtn.m_pObject->m_uFlags &= 0xFFFEu;
  }
  ((void (__thiscall *)(PgWinBut *))v2->m_pkBufExtendBtn.m_pObject->vfptr[64].__vecDelDtor)(v2->m_pkBufExtendBtn.m_pObject);
}

//----- (00565570) --------------------------------------------------------
void __thiscall PartyWin::OnCommand(PartyWin *this, unsigned int wParam, int lParam)
{
  PartyWin *v3; // esi@1

  v3 = this;
  if ( wParam )
  {
    if ( wParam == 1 )
    {
      this->m_uiOption |= 0x10u;
      PartyWin::SetOption(this, this->m_uiOption);
      ((void (__stdcall *)(_DWORD))v3->m_pkDeBufExtendBtn.m_pObject->vfptr[60].__vecDelDtor)(0);
      v3->m_pkDeBufExtendBtn.m_pObject->m_uFlags |= 1u;
      ((void (__stdcall *)(_DWORD))v3->m_pkDeBufExtendBtn.m_pObject->vfptr[64].__vecDelDtor)(0);
    }
  }
  else
  {
    PartyWin::SetOption(this, this->m_uiOption | 0xF);
    ((void (__stdcall *)(_DWORD))v3->m_pkBufExtendBtn.m_pObject->vfptr[60].__vecDelDtor)(0);
    v3->m_pkBufExtendBtn.m_pObject->m_uFlags |= 1u;
    ((void (__stdcall *)(_DWORD))v3->m_pkBufExtendBtn.m_pObject->vfptr[64].__vecDelDtor)(0);
  }
}

//----- (00565610) --------------------------------------------------------
void __thiscall PartyWin::PartyWin(PartyWin *this)
{
  PartyWin *v1; // esi@1
  PopupMenuWin *v2; // edi@1
  int v3; // edi@6
  int v4; // ebx@7
  int v5; // ebx@12
  int v6; // ebx@17
  int v7; // ebx@22
  signed int v8; // [sp+14h] [bp-10h]@6

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&PartyWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&PartyWin::`vftable'{for `IDirectMessenger'};
  v1->m_spPopupMenu.m_pObject = 0;
  `eh vector constructor iterator'(
    v1->m_apkAbstateBufIconWin,
    4u,
    15,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_apkAbstateDeBufIconWin,
    4u,
    15,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_apkAbstateBuffWin,
    4u,
    15,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_apkAbstateDBuffWin,
    4u,
    15,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_pkBufExtendBtn.m_pObject = 0;
  v1->m_pkDeBufExtendBtn.m_pObject = 0;
  v2 = v1->m_spPopupMenu.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spPopupMenu.m_pObject = 0;
  }
  v1->m_bOpenPopUp = 0;
  v3 = (int)v1->m_apkAbstateDeBufIconWin;
  v8 = 15;
  do
  {
    v4 = *(_DWORD *)(v3 - 60);
    if ( v4 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v4 + 4)) && v4 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v4)(v4, 1);
      *(_DWORD *)(v3 - 60) = 0;
    }
    v5 = *(_DWORD *)v3;
    if ( *(_DWORD *)v3 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v5 + 4)) && v5 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v5)(v5, 1);
      *(_DWORD *)v3 = 0;
    }
    v6 = *(_DWORD *)(v3 + 60);
    if ( v6 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v6 + 4)) && v6 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v6)(v6, 1);
      *(_DWORD *)(v3 + 60) = 0;
    }
    v7 = *(_DWORD *)(v3 + 120);
    if ( v7 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v7 + 4)) && v7 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v7)(v7, 1);
      *(_DWORD *)(v3 + 120) = 0;
    }
    v3 += 4;
    --v8;
  }
  while ( v8 );
  v1->m_pkMemberInfo = 0;
  v1->m_pkLPBarWin = 0;
  v1->m_pkLPBarStartWin = 0;
  v1->m_pkLPBarEndWin = 0;
  v1->m_pkLPGround = 0;
  v1->m_pkSPGround = 0;
}
// 99AB98: using guessed type void (__thiscall *PartyWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99ABB4: using guessed type int (__thiscall *PartyWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00565820) --------------------------------------------------------
char __thiscall PartyWin::Create(PartyWin *this, int iXPos, int iYPos, PgWin *pkParent, NiNode *pkNode, PgFrameWork *pkFrameWork)
{
  PartyWin *v6; // esi@1
  NiSourceTexture *v7; // edi@1
  NiNode *v8; // esi@2
  const char *v10; // eax@9
  PgSprData *v11; // eax@10
  int v12; // edi@11
  int v13; // ebx@11
  NiAVObject *v14; // eax@11
  NiTexturingProperty *v15; // eax@11
  NiTexturingProperty::Map *v16; // eax@13
  NiSourceTexture *v17; // eax@14
  PgSprData *v18; // eax@15
  PgWinSpr *v19; // eax@15
  PgWinSpr *v20; // eax@15
  PgWinSpr *v21; // eax@15
  PgWinSpr *v22; // eax@15
  NiShader *v23; // eax@15
  NiTriShape *v24; // eax@15
  NiSourceTexture *v25; // eax@15
  PgSprData *v26; // eax@15
  PgWinSpr *v27; // eax@15
  PgSprData *v28; // eax@15
  PgWinSpr *v29; // eax@15
  PgSprData *v30; // eax@15
  PgWinSpr *v31; // eax@15
  PgSprData *v32; // eax@15
  PgWinSpr *v33; // eax@15
  PgSprData *v34; // eax@15
  PgWinSpr *v35; // eax@15
  PgSprData *v36; // eax@15
  PgWinBar *v37; // eax@15
  PgSprData *v38; // eax@15
  PgWinBar *v39; // eax@15
  PgSprData *v40; // eax@15
  PgWinBar *v41; // eax@15
  PgSprData *v42; // eax@15
  PgWinBar *v43; // eax@15
  PgSprData *v44; // eax@18
  PgWinBar *v45; // eax@18
  PgSprData *v46; // eax@19
  PgWinBar *v47; // eax@19
  PgSprData *v48; // eax@19
  PgWinBar *v49; // eax@19
  PgSprData *v50; // eax@19
  PgWinBar *v51; // eax@19
  PgSprData *v52; // eax@19
  PgWinBar *v53; // eax@19
  PgWin *v54; // ST3C_4@19
  PgFont *v55; // eax@19
  PgWinAbbreviateText *v56; // eax@19
  NiSourceTexture *v57; // ST10_4@19
  PgSprData *v58; // eax@19
  PgWinSpr *v59; // eax@19
  NiPointer<PgSprData::PgHitTester> *v60; // ecx@19
  PgSprData *v61; // eax@19
  PgFont *v62; // eax@19
  PgWinText *v63; // eax@19
  PgSprData *v64; // eax@21
  NiD3DDefaultShader *v65; // eax@21
  AbstateIcon *v66; // eax@21
  PgSprData *v67; // eax@21
  NiD3DDefaultShader *v68; // eax@21
  AbstateIcon *v69; // eax@21
  NiD3DDefaultShader *v70; // eax@22
  NiSourceTexture *v71; // ST40_4@22
  NiD3DDefaultShader *v72; // eax@22
  PgSprData *v73; // eax@22
  NiSourceTexture *v74; // eax@22
  PgSprData *v75; // eax@22
  PgWinSpr *v76; // eax@22
  NiSourceTexture *v77; // eax@22
  NiD3DDefaultShader *v78; // eax@22
  char *v79; // eax@22
  PopupMenuTextCheck *v80; // eax@22
  char *v81; // eax@22
  PopupMenuTextCheck *v82; // eax@22
  char *v83; // eax@22
  PopupMenuTextCheck *v84; // eax@22
  char *v85; // eax@22
  PopupMenuTextCheck *v86; // eax@22
  char *v87; // eax@22
  PopupMenuTextCheck *v88; // eax@22
  NiTexturingProperty *v89; // esi@22
  NiNode *v90; // esi@24
  UIUtil ui; // [sp+10h] [bp-88h]@15
  unsigned int uiWidth; // [sp+24h] [bp-74h]@15
  unsigned int uiHeight; // [sp+28h] [bp-70h]@15
  int i; // [sp+2Ch] [bp-6Ch]@7
  NiPointer<NiTexturingProperty> spTexProp; // [sp+30h] [bp-68h]@1
  NiSourceTexture *pkTexture; // [sp+34h] [bp-64h]@1
  PgSprData *pkSprData; // [sp+38h] [bp-60h]@19
  NiPointer<NiNode> spNode; // [sp+3Ch] [bp-5Ch]@1
  int uiTop; // [sp+40h] [bp-58h]@10
  int uiLeft; // [sp+44h] [bp-54h]@10
  char acShapeName[64]; // [sp+48h] [bp-50h]@20
  int v102; // [sp+94h] [bp-4h]@1

  spTexProp.m_pObject = (NiTexturingProperty *)pkFrameWork;
  v6 = this;
  spNode.m_pObject = 0;
  v102 = 0;
  v7 = MenuTexMgr::GetTexture(4u);
  pkTexture = v7;
  if ( !v7 )
    goto LABEL_31;
  i = (int)pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v10 = Folder::Merge(&Folder::m_acMenu, "Game\\PtyWin.nif");
  PgUtil::LoadNodeNifFile(v10, &spNode, (NiTexturePalette *)i);
  if ( !spNode.m_pObject )
    return 0;
  v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel03", &uiLeft, &uiTop, v7);
  if ( !PgWinFrame::Create(
          (PgWinFrame *)&v6->vfptr,
          iXPos,
          iYPos,
          v11,
          pkParent,
          (PgFrameWork *)spTexProp.m_pObject,
          "PartyMemberWin",
          0) )
  {
LABEL_31:
    v8 = spNode.m_pObject;
    v102 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v8 )
        v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    }
    return 0;
  }
  v12 = uiLeft;
  v13 = uiTop;
  v14 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("EventPanel");
  v15 = (NiTexturingProperty *)NiAVObject::GetProperty(v14, 8);
  spTexProp.m_pObject = v15;
  if ( v15 )
  {
    InterlockedIncrement((volatile LONG *)&v15->m_uiRefCount);
    v15 = spTexProp.m_pObject;
  }
  v16 = *v15->m_kMaps.m_pBase;
  LOBYTE(v102) = 1;
  if ( v16 )
  {
    v17 = (NiSourceTexture *)v16->m_spTexture.m_pObject;
    if ( v17 )
    {
      v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "EventPanel", &uiLeft, &uiTop, v17);
      v19 = PgWinSpr::CreateWin(uiLeft, uiTop, v18, (PgWin *)&v6->vfptr, 0, 0);
      v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
      UIUtil::UIUtil(&ui);
      LOBYTE(v102) = 2;
      UIUtil::SetParent(&ui, (PgWin *)&v6->vfptr);
      UIUtil::SetOffset(&ui, v12, v13);
      UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
      v20 = UIUtil::CreateSpr(&ui, "SPground", 0);
      v6->m_pkSPGround = v20;
      v20->vfptr[60].__vecDelDtor((NiRefObject *)v20, 0);
      v21 = UIUtil::CreateSpr(&ui, "LPground", 0);
      v6->m_pkLPGround = v21;
      v21->vfptr[60].__vecDelDtor((NiRefObject *)v21, 0);
      v22 = UIUtil::CreateSpr(&ui, "HPground", 0);
      v22->vfptr[60].__vecDelDtor((NiRefObject *)v22, 0);
      v23 = (NiShader *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("FaceCut_Mask");
      v24 = (NiTriShape *)CPostProcessEffect::DynamicCast(&NiTriShape::m_RTTI, v23);
      v6->m_pkPortrait = MaskedWin::CreateWin(0, 0, v24, (PgWin *)&v6->vfptr);
      v25 = PortraitTextureBuffer::GetBlackTexture();
      MaskedWin::SetBaseTexture(v6->m_pkPortrait, (NiTexture *)&v25->vfptr);
      v26 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "FaceCut_Mon", &uiLeft, &uiTop, 0);
      v27 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v26, (PgWin *)&v6->vfptr, 0, 0);
      v6->m_pkMobPortrait = v27;
      v27->vfptr[64].__vecDelDtor((NiRefObject *)v27, 0);
      v28 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "FaceCut_OtherMap", &uiLeft, &uiTop, 0);
      v29 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v28, (PgWin *)&v6->vfptr, 0, 0);
      v6->m_pkOutofMyZone = v29;
      v29->vfptr[60].__vecDelDtor((NiRefObject *)v29, 0);
      ((void (__stdcall *)(_DWORD))v6->m_pkOutofMyZone->vfptr[64].__vecDelDtor)(0);
      v30 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "FaceCut_LogOff", &uiLeft, &uiTop, 0);
      v31 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v30, (PgWin *)&v6->vfptr, 0, 0);
      v6->m_pkDisconnected = v31;
      v31->vfptr[60].__vecDelDtor((NiRefObject *)v31, 0);
      ((void (__stdcall *)(_DWORD))v6->m_pkDisconnected->vfptr[64].__vecDelDtor)(0);
      v32 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "FaceCut_MiniHouse", &uiLeft, &uiTop, 0);
      v33 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v32, (PgWin *)&v6->vfptr, 0, 0);
      v6->m_pkMiniHouseMode = v33;
      v33->vfptr[60].__vecDelDtor((NiRefObject *)v33, 0);
      ((void (__stdcall *)(_DWORD))v6->m_pkMiniHouseMode->vfptr[64].__vecDelDtor)(0);
      v34 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel04", &uiLeft, &uiTop, pkTexture);
      v35 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v34, (PgWin *)&v6->vfptr, 0, 0);
      v35->vfptr[60].__vecDelDtor((NiRefObject *)v35, 0);
      v36 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_HP_Start", &uiLeft, &uiTop, pkTexture);
      v37 = PgWinBar::CreateWin(uiLeft - v12, uiTop - v13, v36, (PgWin *)&v6->vfptr, BGT_RIGHT);
      v6->m_pkHPBarStartWin = (PgWinSpr *)v37;
      v37->vfptr[64].__vecDelDtor((NiRefObject *)v37, 0);
      ((void (__stdcall *)(_DWORD))v6->m_pkHPBarStartWin->vfptr[60].__vecDelDtor)(0);
      v38 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_SP_Start", &uiLeft, &uiTop, pkTexture);
      v39 = PgWinBar::CreateWin(uiLeft - v12, uiTop - v13, v38, (PgWin *)&v6->vfptr, BGT_RIGHT);
      v6->m_pkSPBarStartWin = (PgWinSpr *)v39;
      v39->vfptr[64].__vecDelDtor((NiRefObject *)v39, 0);
      ((void (__stdcall *)(_DWORD))v6->m_pkSPBarStartWin->vfptr[60].__vecDelDtor)(0);
      v40 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_HP_End", &uiLeft, &uiTop, pkTexture);
      v41 = PgWinBar::CreateWin(uiLeft - v12, uiTop - v13, v40, (PgWin *)&v6->vfptr, BGT_RIGHT);
      v6->m_pkHPBarEndWin = (PgWinSpr *)v41;
      v41->vfptr[64].__vecDelDtor((NiRefObject *)v41, 0);
      ((void (__stdcall *)(_DWORD))v6->m_pkHPBarEndWin->vfptr[60].__vecDelDtor)(0);
      v42 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_SP_End", &uiLeft, &uiTop, pkTexture);
      v43 = PgWinBar::CreateWin(uiLeft - v12, uiTop - v13, v42, (PgWin *)&v6->vfptr, BGT_RIGHT);
      v6->m_pkSPBarEndWin = (PgWinSpr *)v43;
      v43->vfptr[64].__vecDelDtor((NiRefObject *)v43, 0);
      ((void (__stdcall *)(_DWORD))v6->m_pkSPBarEndWin->vfptr[60].__vecDelDtor)(0);
      if ( PgUtil::GetTriShapeRect(
             (NiAVObject *)&spNode.m_pObject->vfptr,
             "Fill_HP",
             &uiLeft,
             &uiTop,
             &uiWidth,
             &uiHeight) )
      {
        v44 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_HP", &uiLeft, &uiTop, pkTexture);
        v45 = PgWinBar::CreateWin(uiLeft - v12, uiTop - v13, v44, (PgWin *)&v6->vfptr, BGT_RIGHT);
        v6->m_pkHPBarWin = v45;
        v45->vfptr[60].__vecDelDtor((NiRefObject *)v45, 0);
        if ( PgUtil::GetTriShapeRect(
               (NiAVObject *)&spNode.m_pObject->vfptr,
               "Fill_SP",
               &uiLeft,
               &uiTop,
               &uiWidth,
               &uiHeight) )
        {
          v46 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_SP", &uiLeft, &uiTop, pkTexture);
          v47 = PgWinBar::CreateWin(uiLeft - v12, uiTop - v13, v46, (PgWin *)&v6->vfptr, BGT_RIGHT);
          v6->m_pkSPBarWin = v47;
          v47->vfptr[60].__vecDelDtor((NiRefObject *)v47, 0);
          v48 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_LP_Start", &uiLeft, &uiTop, pkTexture);
          v49 = PgWinBar::CreateWin(uiLeft - v12, uiTop - v13, v48, (PgWin *)&v6->vfptr, BGT_RIGHT);
          v6->m_pkLPBarStartWin = (PgWinSpr *)v49;
          v49->vfptr[64].__vecDelDtor((NiRefObject *)v49, 0);
          ((void (__stdcall *)(_DWORD))v6->m_pkLPBarStartWin->vfptr[60].__vecDelDtor)(0);
          v50 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_LP_End", &uiLeft, &uiTop, pkTexture);
          v51 = PgWinBar::CreateWin(uiLeft - v12, uiTop - v13, v50, (PgWin *)&v6->vfptr, BGT_RIGHT);
          v6->m_pkLPBarEndWin = (PgWinSpr *)v51;
          v51->vfptr[64].__vecDelDtor((NiRefObject *)v51, 0);
          ((void (__stdcall *)(_DWORD))v6->m_pkLPBarEndWin->vfptr[60].__vecDelDtor)(0);
          v52 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_LP", &uiLeft, &uiTop, pkTexture);
          v53 = PgWinBar::CreateWin(uiLeft - v12, uiTop - v13, v52, (PgWin *)&v6->vfptr, BGT_RIGHT);
          v6->m_pkLPBarWin = v53;
          v53->vfptr[60].__vecDelDtor((NiRefObject *)v53, 0);
          PgUtil::GetTriShapeRect(
            (NiAVObject *)&spNode.m_pObject->vfptr,
            "CharName",
            &uiLeft,
            &uiTop,
            &uiWidth,
            &uiHeight);
          v54 = g_pkToolTipWin;
          v55 = Font::Get(0);
          v56 = PgWinAbbreviateText::CreateWin(
                  uiLeft - v12,
                  uiTop - v13,
                  uiWidth,
                  uiHeight,
                  v55,
                  (PgWin *)&v6->vfptr,
                  "2",
                  0,
                  0,
                  1,
                  v54,
                  0x1Eu);
          v57 = pkTexture;
          v6->m_pkNameTextWin = v56;
          v58 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Chief_Party", &uiLeft, &uiTop, v57);
          pkSprData = v58;
          v59 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v58, (PgWin *)&v6->vfptr, 0, 0);
          v6->m_pkPtyChiefWin = v59;
          v59->vfptr[60].__vecDelDtor((NiRefObject *)v59, 0);
          PgUtil::GetTriShapeRect(
            (NiAVObject *)&spNode.m_pObject->vfptr,
            "Num_Level",
            &uiLeft,
            &uiTop,
            &uiWidth,
            &uiHeight);
          v60 = pkSprData->m_akHitTester.m_pBase;
          v61 = (PgSprData *)v60->m_pObject->m_uiWidth;
          i = v60->m_pObject->m_uiHeight;
          pkSprData = v61;
          v62 = Font::Get(0);
          v63 = PgWinText::CreateWin(
                  uiLeft - v12,
                  uiTop - v13,
                  (unsigned int)pkSprData,
                  i,
                  v62,
                  (PgWin *)&v6->vfptr,
                  0,
                  0);
          v6->m_pkLvTextWin = v63;
          v63->vfptr[122].__vecDelDtor((NiRefObject *)v63, 5u);
          ((void (__stdcall *)(const char *))v6->m_pkLvTextWin->vfptr[118].__vecDelDtor)("?");
          ((void (__stdcall *)(_DWORD))v6->m_pkLvTextWin->vfptr[60].__vecDelDtor)(0);
          i = 0;
          pkSprData = (PgSprData *)v6->m_apkAbstateBufIconWin;
          while ( 1 )
          {
            sprintf(acShapeName, "CharBuffBox%02d", i);
            if ( !PgUtil::GetTriShapeRect(
                    (NiAVObject *)&spNode.m_pObject->vfptr,
                    acShapeName,
                    &uiLeft,
                    &uiTop,
                    &uiWidth,
                    &uiHeight) )
              break;
            v64 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, pkTexture);
            v65 = (NiD3DDefaultShader *)PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v64, (PgWin *)&v6->vfptr, 0, 0);
            NiPointer<PopupMenuWin>::operator=(
              (NiPointer<NiD3DDefaultShader> *)&pkSprData[1].m_akHitTester.m_pBase,
              v65);
            ((void (__stdcall *)(_DWORD))pkSprData[1].m_akHitTester.m_pBase->m_pObject[3].m_uiHeight)(0);
            ((void (__stdcall *)(_DWORD))LODWORD(pkSprData[1].m_akHitTester.m_pBase->m_pObject[3].m_akUVs[0].y))(0);
            v66 = AbstateIcon::CreateWin(uiLeft + 2, uiTop + 2, uiWidth - 4, uiHeight - 4, (PgWin *)&v6->vfptr, 0);
            NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)pkSprData, (NiD3DDefaultShader *)v66);
            (*((void (__stdcall **)(_DWORD))pkSprData->vfptr->__vecDelDtor + 60))(0);
            (*((void (__stdcall **)(_DWORD))pkSprData->vfptr->__vecDelDtor + 64))(0);
            sprintf(acShapeName, "CharDBuffBox%02d", i);
            v67 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, pkTexture);
            v68 = (NiD3DDefaultShader *)PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v67, (PgWin *)&v6->vfptr, 0, 0);
            NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&pkSprData[2].m_akGeomData.m_pBase, v68);
            ((void (__stdcall *)(_DWORD))LODWORD(pkSprData[2].m_akGeomData.m_pBase->m_pObject[2].m_kBound.m_kCenter.x))(0);
            ((void (__stdcall *)(_DWORD))pkSprData[2].m_akGeomData.m_pBase->m_pObject[2].m_pkVertex)(0);
            v69 = AbstateIcon::CreateWin(uiLeft + 2, uiTop + 2, uiWidth - 4, uiHeight - 4, (PgWin *)&v6->vfptr, 0);
            NiPointer<PopupMenuWin>::operator=(
              (NiPointer<NiD3DDefaultShader> *)&pkSprData->m_akAlphaPropertyData,
              (NiD3DDefaultShader *)v69);
            (*((void (__stdcall **)(_DWORD))pkSprData->m_akAlphaPropertyData.vfptr->__vecDelDtor + 60))(0);
            (*((void (__stdcall **)(_DWORD))pkSprData->m_akAlphaPropertyData.vfptr->__vecDelDtor + 64))(0);
            pkSprData = (PgSprData *)((char *)pkSprData + 4);
            if ( ++i >= 15 )
            {
              pkSprData = PgSprData::Create(
                            (NiAVObject *)&spNode.m_pObject->vfptr,
                            "BuffExtendNor",
                            &uiLeft,
                            &uiTop,
                            pkTexture);
              PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "BuffExtendClick");
              PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "BuffExtendOver");
              v70 = (NiD3DDefaultShader *)PgWinBut::CreateWin(uiLeft, uiTop, pkSprData, (PgWin *)&v6->vfptr, 0, 0, 0);
              NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v6->m_pkBufExtendBtn, v70);
              PgWin::SetToolTipWinText((PgWin *)&v6->m_pkBufExtendBtn.m_pObject->vfptr, "Open");
              v71 = pkTexture;
              v6->m_pkBufExtendBtn.m_pObject->m_pkToolTipWin = g_pkToolTipWin;
              pkSprData = PgSprData::Create(
                            (NiAVObject *)&spNode.m_pObject->vfptr,
                            "DeBuffExtendNor",
                            &uiLeft,
                            &uiTop,
                            v71);
              PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "DeBuffExtendClick");
              PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "DeBuffExtendOver");
              v72 = (NiD3DDefaultShader *)PgWinBut::CreateWin(uiLeft, uiTop, pkSprData, (PgWin *)&v6->vfptr, 1u, 0, 0);
              NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v6->m_pkDeBufExtendBtn, v72);
              PgWin::SetToolTipWinText((PgWin *)&v6->m_pkDeBufExtendBtn.m_pObject->vfptr, "Open");
              v6->m_pkDeBufExtendBtn.m_pObject->m_pkToolTipWin = g_pkToolTipWin;
              ((void (__stdcall *)(_DWORD))v6->m_pkBufExtendBtn.m_pObject->vfptr[60].__vecDelDtor)(0);
              ((void (__stdcall *)(_DWORD))v6->m_pkDeBufExtendBtn.m_pObject->vfptr[60].__vecDelDtor)(0);
              v6->m_pkBufExtendBtn.m_pObject->m_uFlags |= 1u;
              v6->m_pkDeBufExtendBtn.m_pObject->m_uFlags |= 1u;
              ((void (__stdcall *)(_DWORD))v6->m_pkBufExtendBtn.m_pObject->vfptr[64].__vecDelDtor)(0);
              ((void (__stdcall *)(_DWORD))v6->m_pkDeBufExtendBtn.m_pObject->vfptr[64].__vecDelDtor)(0);
              v73 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel_job", &uiLeft, &uiTop, pkTexture);
              PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v73, (PgWin *)&v6->vfptr, 0, 0);
              v74 = MenuTexMgr::GetTexture(0x12u);
              v75 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Char_Job", &uiLeft, &uiTop, v74);
              v76 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v75, (PgWin *)&v6->vfptr, 0, 0);
              v6->m_pkPtyCharJob = v76;
              v76->m_pkToolTipWin = g_pkToolTipWin;
              v77 = MenuTexMgr::GetTexture(1u);
              v78 = (NiD3DDefaultShader *)PopupMenuWin::CreateWin(v77, 4u, 4u, 0);
              NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v6->m_spPopupMenu, v78);
              v6->m_spPopupMenu.m_pObject->vfptr->SetMsgHooker(&v6->m_spPopupMenu.m_pObject->vfptr, &v6->vfptr);
              PopupMenuWin::Clear(v6->m_spPopupMenu.m_pObject);
              v79 = (char *)TextData2::Get(0x3569283Du);
              v80 = PopupMenuTextCheck::CreateWin(v79, 0, 0, 0, 0, 0);
              v80->m_ePopupMenuID = 1015;
              PopupMenuWin::AddMenu(v6->m_spPopupMenu.m_pObject, v12, (PopupMenu *)&v80->vfptr);
              v81 = (char *)TextData2::Get(0x356C3181u);
              v82 = PopupMenuTextCheck::CreateWin(v81, 0, 0, 0, 0, 0);
              v82->m_ePopupMenuID = 1016;
              PopupMenuWin::AddMenu(v6->m_spPopupMenu.m_pObject, v12, (PopupMenu *)&v82->vfptr);
              v83 = (char *)TextData2::Get(0x3566338Fu);
              v84 = PopupMenuTextCheck::CreateWin(v83, 0, 0, 0, 0, 0);
              v84->m_ePopupMenuID = 1017;
              PopupMenuWin::AddMenu(v6->m_spPopupMenu.m_pObject, v12, (PopupMenu *)&v84->vfptr);
              v85 = (char *)TextData2::Get(0xDB1D2246);
              v86 = PopupMenuTextCheck::CreateWin(v85, 0, 0, 0, 0, 0);
              v86->m_ePopupMenuID = 1018;
              PopupMenuWin::AddMenu(v6->m_spPopupMenu.m_pObject, v12, (PopupMenu *)&v86->vfptr);
              v87 = (char *)TextData2::Get(0xDE13DBE2);
              v88 = PopupMenuTextCheck::CreateWin(v87, 0, 0, 0, 0, 0);
              v88->m_ePopupMenuID = 1019;
              PopupMenuWin::AddMenu(v6->m_spPopupMenu.m_pObject, v12, (PopupMenu *)&v88->vfptr);
              PopupMenuWin::FinishMenu(v6->m_spPopupMenu.m_pObject, 0);
              ((void (__stdcall *)(_DWORD))v6->m_spPopupMenu.m_pObject->vfptr[64].__vecDelDtor)(0);
              PartyWin::SetOption(v6, 0xFFFFFFFF);
              v6->vfptr[60].__vecDelDtor((NiRefObject *)v6, 1u);
              v6->vfptr[130].__vecDelDtor((NiRefObject *)v6, 0);
              LOBYTE(v102) = 1;
              UIUtil::~UIUtil(&ui);
              v89 = spTexProp.m_pObject;
              LOBYTE(v102) = 0;
              if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
                v89->vfptr->__vecDelDtor((NiRefObject *)v89, 1u);
              v90 = spNode.m_pObject;
              v102 = -1;
              if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v90 )
                v90->vfptr->__vecDelDtor((NiRefObject *)v90, 1u);
              return 1;
            }
          }
        }
      }
      LOBYTE(v102) = 1;
      UIUtil::~UIUtil(&ui);
    }
  }
  LOBYTE(v102) = 0;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
  v102 = -1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
  return 0;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005666C0) --------------------------------------------------------
void __thiscall PartyWin::UpdateMeWin(PartyWin *this, float fCurTime)
{
  PartyWin *v2; // esi@1
  int v3; // edi@4
  signed int v4; // ebx@4
  PartyMemberInfo *v5; // eax@6
  _BYTE v6[20]; // ST00_20@7
  Char *v7; // eax@7
  Char *v8; // edi@7
  bool v9; // zf@8
  PartyMemberInfo *v10; // eax@18
  _BYTE v11[20]; // ST00_20@21
  Char *v12; // eax@21
  Char *v13; // edi@21
  PgSpr *v14; // ebx@25
  NiSourceTexture *v15; // eax@25
  NiSourceTexture *v16; // eax@26
  int v17; // [sp+0h] [bp-14h]@0
  int DBufNum; // [sp+Ch] [bp-8h]@3
  int BufNum; // [sp+10h] [bp-4h]@3

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[65].__vecDelDtor)() )
  {
    if ( v2->m_bOpenPopUp )
    {
      ((void (__thiscall *)(PartyWin *, int *, int *))v2->vfptr[45].__vecDelDtor)(v2, &DBufNum, &BufNum);
      ((void (__stdcall *)(int, int))v2->m_spPopupMenu.m_pObject->vfptr[77].__vecDelDtor)(DBufNum, BufNum);
      PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr, (PgWin *)&v2->m_spPopupMenu.m_pObject->vfptr);
      v2->m_bOpenPopUp = 0;
    }
    v3 = (int)v2->m_apkAbstateBufIconWin;
    v4 = 15;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 256))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 240))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 248))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v3 + 60) + 256))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v3 + 60) + 240))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v3 + 60) + 248))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v3 + 120) + 256))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v3 + 180) + 256))(0);
      AbstateIcon::ClearDuplicateText(*(AbstateIcon **)v3);
      AbstateIcon::ClearDuplicateText(*(AbstateIcon **)(v3 + 60));
      v3 += 4;
      --v4;
    }
    while ( v4 );
    v5 = v2->m_pkMemberInfo;
    if ( v5 )
    {
      *(_DWORD *)v6 = v5->m_kCharID.n5_code[0];
      *(_QWORD *)&v6[4] = *(_QWORD *)&v5->m_kCharID.n5_code[1];
      *(_QWORD *)&v6[12] = *(_QWORD *)&v5->m_kCharID.n5_code[3];
      v7 = CharMgr::GetUserChar(&g_kCharMgr, *(Name5 *)v6);
      v8 = v7;
      if ( v7 )
      {
        AbStateInfectee::GetAbStateList((AbStateInfectee *)&v7->vfptr);
        v9 = (v2->m_uiOption & 1) == 0;
        DBufNum = 0;
        BufNum = 0;
        if ( !v9 )
          PartyWin::SetBuffUI(v2, v8, Skill, &BufNum);
        if ( v2->m_uiOption & 2 )
          PartyWin::SetBuffUI(v2, v8, Scroll, &BufNum);
        if ( v2->m_uiOption & 4 )
          PartyWin::SetBuffUI(v2, v8, Potion, &BufNum);
        if ( v2->m_uiOption & 8 )
          PartyWin::SetBuffUI(v2, v8, 0, &BufNum);
        if ( v2->m_uiOption & 0x10 )
          PartyWin::SetBuffUI(v2, v8, Debuff, &DBufNum);
      }
      v10 = v2->m_pkMemberInfo;
      if ( !v10->m_ucStatus )
      {
        ((void (__stdcall *)(_DWORD))v2->m_pkPortrait->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkMobPortrait->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(signed int))v2->m_pkDisconnected->vfptr[64].__vecDelDtor)(1);
        ((void (__stdcall *)(_DWORD))v2->m_pkOutofMyZone->vfptr[64].__vecDelDtor)(0);
        v2->m_pkMiniHouseMode->vfptr[64].__vecDelDtor((NiRefObject *)v2->m_pkMiniHouseMode, 0);
        return;
      }
      if ( !v10->m_bShow
        || (*(_DWORD *)v11 = v10->m_kCharID.n5_code[0],
            *(_QWORD *)&v11[4] = *(_QWORD *)&v10->m_kCharID.n5_code[1],
            *(_QWORD *)&v11[12] = *(_QWORD *)&v10->m_kCharID.n5_code[3],
            v12 = CharMgr::GetUserChar(&g_kCharMgr, *(Name5 *)v11),
            (v13 = v12) == 0) )
      {
        ((void (__stdcall *)(_DWORD, int))v2->m_pkPortrait->vfptr[64].__vecDelDtor)(0, v17);
        ((void (__stdcall *)(_DWORD))v2->m_pkMobPortrait->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkDisconnected->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(signed int))v2->m_pkOutofMyZone->vfptr[64].__vecDelDtor)(1);
        goto LABEL_30;
      }
      if ( (unsigned __int8)((int (__thiscall *)(Char *))v12->vfptr[1].AddAbStateByAbstateIndex)(v12) )
      {
        ((void (__stdcall *)(_DWORD, int))v2->m_pkPortrait->vfptr[64].__vecDelDtor)(0, v17);
        ((void (__stdcall *)(_DWORD))v2->m_pkMobPortrait->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkDisconnected->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkOutofMyZone->vfptr[64].__vecDelDtor)(0);
LABEL_30:
        ((void (__thiscall *)(PgWinSpr *))v2->m_pkMiniHouseMode->vfptr[64].__vecDelDtor)(v2->m_pkMiniHouseMode);
        return;
      }
      if ( (unsigned __int8)((int (__thiscall *)(Char *))v13->vfptr[20].Deaffect)(v13) )
      {
        v14 = v2->m_pkMobPortrait->m_spSpr.m_pObject;
        v15 = PortraitTextureBuffer::GetOtherCharPortrait(v13);
        PgSpr::SetTexture(v14, (NiTexture *)&v15->vfptr);
        ((void (__cdecl *)(_DWORD))v2->m_pkPortrait->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(signed int))v2->m_pkMobPortrait->vfptr[64].__vecDelDtor)(1);
        ((void (__stdcall *)(_DWORD))v2->m_pkDisconnected->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkOutofMyZone->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkMiniHouseMode->vfptr[64].__vecDelDtor)(0);
        return;
      }
      v16 = PortraitTextureBuffer::GetOtherCharPortrait(v13);
      MaskedWin::SetBaseTexture(v2->m_pkPortrait, (NiTexture *)&v16->vfptr);
      ((void (__stdcall *)(signed int))v2->m_pkPortrait->vfptr[64].__vecDelDtor)(1);
      ((void (__stdcall *)(_DWORD))v2->m_pkMobPortrait->vfptr[64].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v2->m_pkDisconnected->vfptr[64].__vecDelDtor)(0);
    }
    else
    {
      ((void (__stdcall *)(_DWORD, _DWORD))v2->m_pkPortrait->vfptr[64].__vecDelDtor)(0, v17);
      ((void (__stdcall *)(_DWORD))v2->m_pkMobPortrait->vfptr[64].__vecDelDtor)(0);
      ((void (__stdcall *)(signed int))v2->m_pkDisconnected->vfptr[64].__vecDelDtor)(1);
    }
    ((void (__stdcall *)(_DWORD))v2->m_pkOutofMyZone->vfptr[64].__vecDelDtor)(0);
    goto LABEL_30;
  }
}

//----- (00566AF0) --------------------------------------------------------
void __thiscall PartyWin::SetInfo(PartyWin *this, PartyMemberInfo *pkInfo)
{
  int v2; // ebx@1
  PartyWin *v3; // esi@1
  PgWinText *v4; // ecx@2
  unsigned int v5; // eax@3
  unsigned int v6; // edx@3
  unsigned int v7; // ecx@3
  unsigned int v8; // eax@3
  PgWinAbbreviateText *v9; // ecx@3
  void *(__thiscall *v10)(NiRefObject *, unsigned int); // edx@3
  PgWinBar *v11; // ecx@6
  void *(__thiscall *v12)(NiRefObject *, unsigned int); // edx@6
  int v13; // eax@9
  int v14; // eax@13
  PgWinBar *v15; // ecx@16
  int v16; // eax@16
  PgWinSpr *v17; // ecx@19
  PgWinBar *v18; // ecx@20
  int v19; // eax@20
  char v20; // al@40
  unsigned int v21; // ebx@47
  int v22; // eax@54
  int v23; // edi@54
  unsigned int v24; // eax@54
  double v25; // st7@54
  int (__thiscall *v26)(int); // eax@54
  float v27; // eax@54
  double v28; // st7@54
  PgSpr *v29; // eax@54
  PgSprData *v30; // eax@55
  NiScreenElementsData *v31; // edi@57
  char *v32; // eax@57
  char *v33; // eax@58
  float fy; // [sp+Ch] [bp-4Ch]@54
  NiPoint2 kValue; // [sp+10h] [bp-48h]@57
  const float cHeightInTex; // [sp+18h] [bp-40h]@54
  float fx; // [sp+1Ch] [bp-3Ch]@13
  Name5 kMasterID; // [sp+20h] [bp-38h]@29
  char acName[21]; // [sp+34h] [bp-24h]@3
  float acTemp[2]; // [sp+4Ch] [bp-Ch]@6

  v2 = 0;
  v3 = this;
  if ( !pkInfo )
  {
    v4 = this->m_pkLvTextWin;
    v3->m_pkMemberInfo = 0;
    ((void (__stdcall *)(void *))v4->vfptr[118].__vecDelDtor)(&unk_99A99B);
    ((void (__stdcall *)(void *))v3->m_pkNameTextWin->vfptr[118].__vecDelDtor)(&unk_99A9A7);
    v3->m_pkMemberInfo = 0;
    v3->vfptr[64].__vecDelDtor((NiRefObject *)v3, 0);
    return;
  }
  this->m_pkMemberInfo = pkInfo;
  v5 = pkInfo->m_kCharID.n5_code[0];
  v6 = pkInfo->m_kCharID.n5_code[2];
  *(_DWORD *)&acName[4] = pkInfo->m_kCharID.n5_code[1];
  v7 = pkInfo->m_kCharID.n5_code[4];
  *(_DWORD *)acName = v5;
  v8 = pkInfo->m_kCharID.n5_code[3];
  *(_DWORD *)&acName[16] = v7;
  v9 = v3->m_pkNameTextWin;
  *(_DWORD *)&acName[8] = v6;
  *(_DWORD *)&acName[12] = v8;
  acName[20] = 0;
  ((void (__stdcall *)(char *))v9->vfptr[118].__vecDelDtor)(acName);
  v10 = v3->m_pkNameTextWin->vfptr[117].__vecDelDtor;
  if ( pkInfo->m_ucStatus )
    ((void (__stdcall *)(D3DXCOLOR *))v10)(&Color::m_kDxWhiteColor);
  else
    ((void (__stdcall *)(void *))v10)(&Color::m_kDxGrayColor);
  ((void (__stdcall *)(signed int))v3->m_pkHPBarWin->vfptr[64].__vecDelDtor)(1);
  v11 = v3->m_pkHPBarWin;
  acTemp[0] = (double)pkInfo->m_iMaxHP;
  v11->m_fCurValue = (double)pkInfo->m_iHP;
  v11->m_fMaxValue = acTemp[0];
  PgWinBar::OnChangeValue(v11);
  v12 = v3->m_pkHPBarStartWin->vfptr[64].__vecDelDtor;
  if ( pkInfo->m_iHP <= 0 )
    ((void (__stdcall *)(_DWORD))v12)(0);
  else
    ((void (__stdcall *)(signed int))v12)(1);
  v13 = pkInfo->m_iMaxHP;
  if ( pkInfo->m_iHP == v13 && v13 )
    ((void (__stdcall *)(signed int))v3->m_pkHPBarEndWin->vfptr[64].__vecDelDtor)(1);
  else
    ((void (__stdcall *)(_DWORD))v3->m_pkHPBarEndWin->vfptr[64].__vecDelDtor)(0);
  v14 = pkInfo->m_byChrClass;
  LOBYTE(fx) = 0;
  switch ( v14 )
  {
    case 26:
    case 27:
      LOBYTE(fx) = 1;
      break;
    default:
      break;
  }
  ((void (__stdcall *)(_DWORD))v3->m_pkLPGround->vfptr[64].__vecDelDtor)(LODWORD(fx));
  LOBYTE(v2) = LOBYTE(fx) == 0;
  ((void (__stdcall *)(int))v3->m_pkSPGround->vfptr[64].__vecDelDtor)(v2);
  if ( LOBYTE(fx) )
  {
    ((void (__stdcall *)(int))v3->m_pkSPBarWin->vfptr[64].__vecDelDtor)(v2);
    ((void (__stdcall *)(int))v3->m_pkSPBarStartWin->vfptr[64].__vecDelDtor)(v2);
    ((void (__stdcall *)(int))v3->m_pkSPBarEndWin->vfptr[64].__vecDelDtor)(v2);
    ((void (__stdcall *)(_DWORD))v3->m_pkLPBarWin->vfptr[64].__vecDelDtor)(LODWORD(fx));
    v15 = v3->m_pkLPBarWin;
    acTemp[0] = (double)pkInfo->m_iMaxLP;
    v15->m_fCurValue = (double)pkInfo->m_iLP;
    v15->m_fMaxValue = acTemp[0];
    PgWinBar::OnChangeValue(v15);
    ((void (__stdcall *)(_DWORD))v3->m_pkLPBarStartWin->vfptr[64].__vecDelDtor)(pkInfo->m_iLP > 0);
    v16 = pkInfo->m_iMaxLP;
    if ( pkInfo->m_iLP == v16 && v16 )
    {
      ((void (__stdcall *)(signed int))v3->m_pkLPBarEndWin->vfptr[64].__vecDelDtor)(1);
      goto LABEL_25;
    }
    v17 = v3->m_pkLPBarEndWin;
  }
  else
  {
    ((void (__stdcall *)(_DWORD))v3->m_pkLPBarWin->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v3->m_pkLPBarStartWin->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v3->m_pkLPBarEndWin->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(signed int))v3->m_pkSPBarWin->vfptr[64].__vecDelDtor)(1);
    v18 = v3->m_pkSPBarWin;
    acTemp[0] = (double)pkInfo->m_iMaxSP;
    v18->m_fCurValue = (double)pkInfo->m_iSP;
    v18->m_fMaxValue = acTemp[0];
    PgWinBar::OnChangeValue(v18);
    ((void (__stdcall *)(_DWORD))v3->m_pkSPBarStartWin->vfptr[64].__vecDelDtor)(pkInfo->m_iSP > 0);
    v19 = pkInfo->m_iMaxSP;
    if ( pkInfo->m_iSP == v19 && v19 )
    {
      ((void (__stdcall *)(signed int))v3->m_pkSPBarEndWin->vfptr[64].__vecDelDtor)(1);
      goto LABEL_25;
    }
    v17 = v3->m_pkSPBarEndWin;
  }
  ((void (__stdcall *)(_DWORD))v17->vfptr[64].__vecDelDtor)(0);
LABEL_25:
  if ( pkInfo->m_bShow )
  {
    _itoa(pkInfo->m_iLv, (char *)acTemp, 10);
    ((void (__stdcall *)(float *))v3->m_pkLvTextWin->vfptr[118].__vecDelDtor)(acTemp);
  }
  else
  {
    ((void (__stdcall *)(const char *))v3->m_pkLvTextWin->vfptr[118].__vecDelDtor)("?");
  }
  if ( RaidInfo::IsMeRaidMember(&g_kRaidinfo) )
  {
    if ( *(_QWORD *)&g_kRaidinfo.m_kRaidLeaderID.n5_name[0] != *(_QWORD *)&pkInfo->m_kCharID.n5_name[0]
      || *(_QWORD *)&g_kRaidinfo.m_kRaidLeaderID.n5_code[2] != *(_QWORD *)&pkInfo->m_kCharID.n5_code[2]
      || g_kRaidinfo.m_kRaidLeaderID.n5_code[4] != pkInfo->m_kCharID.n5_code[4] )
    {
      ((void (__stdcall *)(_DWORD))v3->m_pkPtyChiefWin->vfptr[64].__vecDelDtor)(0);
    }
    else
    {
      ((void (__stdcall *)(signed int))v3->m_pkPtyChiefWin->vfptr[64].__vecDelDtor)(1);
    }
  }
  else
  {
    Party::GetPartyMasterID(&g_kParty, &kMasterID);
    if ( *(_QWORD *)&kMasterID.n5_name[0] != *(_QWORD *)&pkInfo->m_kCharID.n5_name[0]
      || *(_QWORD *)&kMasterID.n5_code[2] != *(_QWORD *)&pkInfo->m_kCharID.n5_code[2]
      || kMasterID.n5_code[4] != pkInfo->m_kCharID.n5_code[4] )
    {
      ((void (__stdcall *)(_DWORD))v3->m_pkPtyChiefWin->vfptr[64].__vecDelDtor)(0);
    }
    else
    {
      ((void (__stdcall *)(signed int))v3->m_pkPtyChiefWin->vfptr[64].__vecDelDtor)(1);
    }
  }
  switch ( pkInfo->m_byChrClass )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      v20 = 1;
      break;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      v20 = 6;
      break;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      v20 = 11;
      break;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      v20 = 16;
      break;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      v20 = 21;
      break;
    case 0x1A:
    case 0x1B:
      v20 = 26;
      break;
    default:
      v20 = 0;
      break;
  }
  v21 = (unsigned __int8)v20;
  fx = 0.0;
  switch ( v20 )
  {
    case 1:
      fx = 0.0;
      break;
    case 6:
      LODWORD(fx) = 1;
      break;
    case 0x10:
      LODWORD(fx) = 2;
      break;
    case 0xB:
      LODWORD(fx) = 3;
      break;
    case 0x15:
      LODWORD(fx) = 4;
      break;
    case 0x1A:
      LODWORD(fx) = 5;
      break;
    default:
      break;
  }
  v22 = ((int (*)(void))v3->m_pkPtyCharJob->vfptr[114].__vecDelDtor)();
  v23 = v22;
  v24 = (*(int (__thiscall **)(int))(*(_DWORD *)v22 + 60))(v22);
  LODWORD(acTemp[0]) = v24;
  v25 = 16.0 / (double)v24;
  v26 = *(int (__thiscall **)(int))(*(_DWORD *)v23 + 64);
  acTemp[0] = v25;
  v27 = COERCE_FLOAT(v26(v23));
  cHeightInTex = v27;
  v28 = (double)LODWORD(v27);
  v29 = v3->m_pkPtyCharJob->m_spSpr.m_pObject;
  cHeightInTex = 16.0 / v28;
  fx = (double)SLODWORD(fx) * acTemp[0];
  fy = cHeightInTex + cHeightInTex;
  if ( v29 )
    v30 = v29->m_spSprData.m_pObject;
  else
    v30 = 0;
  v31 = v30->m_akGeomData.m_pBase->m_pObject;
  kValue.x = fx;
  kValue.y = cHeightInTex + cHeightInTex;
  NiScreenElementsData::SetTexture(v31, 0, 0, 0, &kValue);
  kValue.x = fx;
  cHeightInTex = fy + cHeightInTex;
  kValue.y = cHeightInTex;
  NiScreenElementsData::SetTexture(v31, 0, 1, 0, &kValue);
  acTemp[0] = fx + acTemp[0];
  kValue.x = acTemp[0];
  kValue.y = cHeightInTex;
  NiScreenElementsData::SetTexture(v31, 0, 2, 0, &kValue);
  kValue.x = acTemp[0];
  kValue.y = fy;
  NiScreenElementsData::SetTexture(v31, 0, 3, 0, &kValue);
  v32 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), v21);
  if ( v32 )
    v33 = v32 + 21;
  else
    v33 = (char *)&unk_96F8EB;
  PgWin::SetToolTipWinText((PgWin *)&v3->m_pkPtyCharJob->vfptr, v33);
  v3->vfptr[64].__vecDelDtor((NiRefObject *)v3, 1u);
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (00567160) --------------------------------------------------------
PartyWin *__cdecl PartyWin::CreateWin(int iXPos, int iYPos, PgWin *pkParent, NiNode *pkNode, PgFrameWork *pkFrameWork)
{
  PgWin *v5; // eax@1
  PgWin *v6; // eax@2
  PgWin *v7; // esi@2
  PgWin *v8; // edi@8
  PartyWin *v9; // eax@14
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v11; // [sp+20h] [bp-4h]@1

  v5 = (PgWin *)operator new(0x2B4u);
  result.m_pObject = v5;
  v11 = 0;
  if ( v5 )
  {
    PartyWin::PartyWin((PartyWin *)v5);
    v7 = v6;
  }
  else
  {
    v7 = 0;
  }
  if ( v7 )
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  v11 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v7);
  if ( PartyWin::Create((PartyWin *)v7, iXPos, iYPos, pkParent, pkNode, pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v7->vfptr[89].__vecDelDtor)(v7);
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = (PartyWin *)v7;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v7);
    if ( result.m_pObject )
    {
      v8 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v8 )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      }
    }
    v11 = -1;
    if ( v7 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    }
    v9 = 0;
  }
  return v9;
}

//----- (005672A0) --------------------------------------------------------
PartyWin *__thiscall PartyWin::`vector deleting destructor'(PartyWin *this, unsigned int a2)
{
  PartyWin *v2; // esi@1

  v2 = this;
  PartyWin::~PartyWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005672D0) --------------------------------------------------------
void __thiscall PartyWinInterface::PartyWinInterface(PartyWinInterface *this)
{
  this->isMiniPartyWinShow = 0;
  this->m_apkPartyWin[0] = 0;
  this->m_apkPartyWin[1] = 0;
  this->m_apkPartyWin[2] = 0;
  this->m_apkPartyWin[3] = 0;
  this->m_apkMiniPartyWin[0] = 0;
  this->m_apkMiniPartyWin[1] = 0;
  this->m_apkMiniPartyWin[2] = 0;
  this->m_apkMiniPartyWin[3] = 0;
}

//----- (00567300) --------------------------------------------------------
void __thiscall PartyWinInterface::CreatePartyWin(PartyWinInterface *this, PgFrameWork *pkFrameWork)
{
  signed int v2; // esi@1
  PartyWinInterface *v3; // edi@1
  int v4; // ebx@1
  PartyMemberInfo *v5; // eax@4
  int offsetX; // [sp+18h] [bp-10Ch]@1
  int m_uiMemberWinHeight; // [sp+1Ch] [bp-108h]@1
  char partyWinName[255]; // [sp+20h] [bp-104h]@4

  v2 = 0;
  v3 = this;
  m_uiMemberWinHeight = 0;
  offsetX = 0;
  v4 = 0;
  do
  {
    v3->m_apkPartyWin[v2] = PartyWin::CreateWin(offsetX, v4, 0, 0, pkFrameWork);
    if ( !v2 )
    {
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v3->m_apkPartyWin[0]->vfptr[59].__vecDelDtor)(
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        0.0,
        0.33000001);
      offsetX = ((int (*)(void))v3->m_apkPartyWin[0]->vfptr[41].__vecDelDtor)();
      v4 = ((int (*)(void))v3->m_apkPartyWin[0]->vfptr[42].__vecDelDtor)();
      m_uiMemberWinHeight = ((int (*)(void))v3->m_apkPartyWin[0]->vfptr[37].__vecDelDtor)();
    }
    v4 += m_uiMemberWinHeight;
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_apkPartyWin[v2]->vfptr);
    sprintf(partyWinName, "PartyWinName%i", v2);
    NiObjectNET::SetName((NiObjectNET *)&v3->m_apkPartyWin[v2]->vfptr, partyWinName);
    v5 = Party::GetMemberInfo(&g_kParty, v2);
    PartyWin::SetInfo(v3->m_apkPartyWin[v2++], v5);
  }
  while ( v2 < 4 );
}

//----- (00567430) --------------------------------------------------------
void __thiscall PartyWinInterface::DestoryPartyWin(PartyWinInterface *this)
{
  PgWin **v1; // esi@1
  signed int v2; // edi@1

  v1 = (PgWin **)this->m_apkPartyWin;
  v2 = 4;
  do
  {
    if ( *v1 )
    {
      MachineOpt::RegistereWinPostion(*v1);
      PgWinMgr::DestroyWin(&Pgg_kWinMgr, *v1);
      *v1 = 0;
    }
    ++v1;
    --v2;
  }
  while ( v2 );
}

//----- (00567470) --------------------------------------------------------
void __thiscall PartyWinInterface::CreateMiniPartyWin(PartyWinInterface *this, PgFrameWork *pkFrameWork)
{
  signed int v2; // esi@1
  PartyWinInterface *v3; // edi@1
  int v4; // ebx@1
  PartyMemberInfo *v5; // eax@4
  int offsetX; // [sp+18h] [bp-10Ch]@1
  int m_uiMemberWinHeight; // [sp+1Ch] [bp-108h]@1
  char miniPartyWinName[255]; // [sp+20h] [bp-104h]@4

  v2 = 0;
  v3 = this;
  m_uiMemberWinHeight = 0;
  offsetX = 0;
  v4 = 0;
  do
  {
    v3->m_apkMiniPartyWin[v2] = MiniPartyWin::CreateWin(offsetX, v4, 0, 0, pkFrameWork);
    if ( !v2 )
    {
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v3->m_apkMiniPartyWin[0]->vfptr[59].__vecDelDtor)(
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        0.0,
        0.33000001);
      offsetX = ((int (*)(void))v3->m_apkMiniPartyWin[0]->vfptr[41].__vecDelDtor)();
      v4 = ((int (*)(void))v3->m_apkMiniPartyWin[0]->vfptr[42].__vecDelDtor)();
      m_uiMemberWinHeight = ((int (*)(void))v3->m_apkMiniPartyWin[0]->vfptr[37].__vecDelDtor)();
    }
    v4 += m_uiMemberWinHeight;
    sprintf(miniPartyWinName, "MiniPartyWinName%i", v2);
    NiObjectNET::SetName((NiObjectNET *)&v3->m_apkMiniPartyWin[v2]->vfptr, miniPartyWinName);
    v5 = Party::GetMemberInfo(&g_kParty, v2);
    MiniPartyWin::SetInfo(v3->m_apkMiniPartyWin[v2++], v5);
  }
  while ( v2 < 4 );
}

//----- (00567590) --------------------------------------------------------
void __thiscall PartyWinInterface::DestoryMiniPartyWin(PartyWinInterface *this)
{
  PgWin **v1; // esi@1
  signed int v2; // edi@1

  v1 = (PgWin **)this->m_apkMiniPartyWin;
  v2 = 4;
  do
  {
    if ( *v1 )
    {
      MachineOpt::RegistereWinPostion(*v1);
      PgWinMgr::DestroyWin(&Pgg_kWinMgr, *v1);
      *v1 = 0;
    }
    ++v1;
    --v2;
  }
  while ( v2 );
}

//----- (005675D0) --------------------------------------------------------
void __thiscall PartyWinInterface::SetPartyWinMachineOpt(PartyWinInterface *this)
{
  PgWin **v1; // esi@1
  signed int v2; // edi@1

  v1 = (PgWin **)this->m_apkPartyWin;
  v2 = 4;
  do
  {
    if ( *v1 )
      MachineOpt::SetWinPostion(*v1);
    ++v1;
    --v2;
  }
  while ( v2 );
}

//----- (00567600) --------------------------------------------------------
void __thiscall PartyWinInterface::SetMiniPartyWinMachineOpt(PartyWinInterface *this)
{
  PgWin **v1; // esi@1
  signed int v2; // edi@1

  v1 = (PgWin **)this->m_apkMiniPartyWin;
  v2 = 4;
  do
  {
    if ( *v1 )
      MachineOpt::SetWinPostion(*v1);
    ++v1;
    --v2;
  }
  while ( v2 );
}

//----- (00567630) --------------------------------------------------------
void __thiscall PartyWinInterface::Create(PartyWinInterface *this, PgFrameWork *pkFrameWork)
{
  PartyWinInterface *v2; // esi@1

  v2 = this;
  PartyWinInterface::CreatePartyWin(this, pkFrameWork);
  PartyWinInterface::CreateMiniPartyWin(v2, pkFrameWork);
}

//----- (00567660) --------------------------------------------------------
void __thiscall PartyWinInterface::UpdatePartyWin(PartyWinInterface *this)
{
  PartyWin **v1; // edi@1
  PartyWin **v2; // esi@2
  signed int v3; // ebx@2
  unsigned int v4; // ebx@4
  unsigned int v5; // esi@4
  PartyMemberInfo *v6; // eax@5

  v1 = this->m_apkPartyWin;
  if ( this->m_apkPartyWin[0] )
  {
    v2 = this->m_apkPartyWin;
    v3 = 4;
    do
    {
      PartyWin::SetInfo(*v2, 0);
      ++v2;
      --v3;
    }
    while ( v3 );
    v4 = g_kParty.m_uiTotalMember;
    v5 = 0;
    if ( g_kParty.m_uiTotalMember )
    {
      do
      {
        v6 = Party::GetMemberInfo(&g_kParty, v5);
        PartyWin::SetInfo(*v1, v6);
        ++v5;
        ++v1;
      }
      while ( v5 < v4 );
    }
  }
}

//----- (005676B0) --------------------------------------------------------
void __thiscall PartyWinInterface::UpdateMiniPartyWin(PartyWinInterface *this)
{
  MiniPartyWin **v1; // edi@1
  MiniPartyWin **v2; // esi@1
  signed int v3; // ebx@1
  unsigned int v4; // ebx@3
  unsigned int v5; // esi@3
  PartyMemberInfo *v6; // eax@4

  v1 = this->m_apkMiniPartyWin;
  v2 = this->m_apkMiniPartyWin;
  v3 = 4;
  do
  {
    MiniPartyWin::SetInfo(*v2, 0);
    ++v2;
    --v3;
  }
  while ( v3 );
  v4 = g_kParty.m_uiTotalMember;
  v5 = 0;
  if ( g_kParty.m_uiTotalMember )
  {
    do
    {
      v6 = Party::GetMemberInfo(&g_kParty, v5);
      MiniPartyWin::SetInfo(*v1, v6);
      ++v5;
      ++v1;
    }
    while ( v5 < v4 );
  }
}

//----- (00567700) --------------------------------------------------------
void __thiscall PartyWinInterface::SetWindowCull(PartyWinInterface *this, bool bIsCull)
{
  char *v2; // ecx@3
  unsigned int v3; // esi@5
  int v4; // eax@6
  char *v5; // ecx@12
  unsigned int v6; // esi@14
  int v7; // eax@15

  if ( g_kParty.m_uiTotalMember )
  {
    if ( this->isMiniPartyWinShow )
    {
      v2 = (char *)this->m_apkMiniPartyWin;
      if ( *(_DWORD *)v2 && g_kParty.m_uiTotalMember )
      {
        v3 = g_kParty.m_uiTotalMember;
        do
        {
          v4 = *(_DWORD *)v2;
          if ( *(_DWORD *)v2 )
          {
            if ( bIsCull )
              *(_WORD *)(v4 + 28) |= 1u;
            else
              *(_WORD *)(v4 + 28) &= 0xFFFEu;
          }
          v2 += 4;
          --v3;
        }
        while ( v3 );
      }
    }
    else
    {
      v5 = (char *)this->m_apkPartyWin;
      if ( *(_DWORD *)v5 && g_kParty.m_uiTotalMember )
      {
        v6 = g_kParty.m_uiTotalMember;
        do
        {
          v7 = *(_DWORD *)v5;
          if ( *(_DWORD *)v5 )
          {
            if ( bIsCull )
              *(_WORD *)(v7 + 28) |= 1u;
            else
              *(_WORD *)(v7 + 28) &= 0xFFFEu;
          }
          v5 += 4;
          --v6;
        }
        while ( v6 );
      }
    }
  }
}

//----- (005677A0) --------------------------------------------------------
void __thiscall PartyWinInterface::TogglePartyWin(PartyWinInterface *this)
{
  PartyWinInterface *v1; // ebx@1
  signed int v2; // edi@3
  int v3; // esi@4
  PgWin **v4; // esi@7
  PartyWin **v5; // esi@10
  bool v6; // zf@10
  signed int v7; // edi@11
  unsigned int v8; // ebx@13
  unsigned int v9; // esi@13
  PartyWin **v10; // edi@14
  PartyMemberInfo *v11; // eax@15
  signed int v12; // [sp+4h] [bp-8h]@2
  PartyWinInterface *v13; // [sp+8h] [bp-4h]@1

  v1 = this;
  v13 = this;
  if ( this->m_apkPartyWin[0] )
  {
    v12 = 4;
    do
    {
      v2 = 4;
      if ( v1->isMiniPartyWinShow )
      {
        v3 = (int)v1->m_apkPartyWin;
        do
        {
          PgWinMgr::CloseWin(&Pgg_kWinMgr, *(PgWin **)(v3 + 16));
          PgWinMgr::ShowWin(&Pgg_kWinMgr, *(PgWin **)v3);
          PartyWin::SetOption(*(PartyWin **)v3, *(_DWORD *)(*(_DWORD *)(v3 + 16) + 344));
          v3 += 4;
          --v2;
        }
        while ( v2 );
      }
      else
      {
        v4 = (PgWin **)v1->m_apkMiniPartyWin;
        do
        {
          PgWinMgr::CloseWin(&Pgg_kWinMgr, *(v4 - 4));
          PgWinMgr::ShowWin(&Pgg_kWinMgr, *v4);
          MiniPartyWin::SetOption((MiniPartyWin *)*v4, LODWORD((*(v4 - 4))[1].m_kLocal.m_Rotate.m_pEntry[0][1]));
          ++v4;
          --v2;
        }
        while ( v2 );
      }
      --v12;
    }
    while ( v12 );
    v5 = v1->m_apkPartyWin;
    v6 = v1->m_apkPartyWin[0] == 0;
    v1->isMiniPartyWinShow = v1->isMiniPartyWinShow == 0;
    if ( !v6 )
    {
      v7 = 4;
      do
      {
        PartyWin::SetInfo(*v5, 0);
        ++v5;
        --v7;
      }
      while ( v7 );
      v8 = g_kParty.m_uiTotalMember;
      v9 = 0;
      if ( g_kParty.m_uiTotalMember )
      {
        v10 = v13->m_apkPartyWin;
        do
        {
          v11 = Party::GetMemberInfo(&g_kParty, v9);
          PartyWin::SetInfo(*v10, v11);
          ++v9;
          ++v10;
        }
        while ( v9 < v8 );
      }
      v1 = v13;
    }
    PartyWinInterface::UpdateMiniPartyWin(v1);
  }
}

//----- (005678A0) --------------------------------------------------------
void __thiscall PkKqRankingWin::PkKqRankingWin(PkKqRankingWin *this)
{
  PkKqRankingWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_dwBaseScore = 0;
  v1->m_iPkRankingSortColumn = 0;
  v1->vfptr = (NiRefObjectVtbl *)&PkKqRankingWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&PkKqRankingWin::`vftable'{for `IDirectMessenger'};
}
// 99B0A4: using guessed type void (__thiscall *PkKqRankingWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99B0C4: using guessed type int (__thiscall *PkKqRankingWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005678D0) --------------------------------------------------------
void __thiscall PkKqRankingWin::~PkKqRankingWin(PkKqRankingWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&PkKqRankingWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PkKqRankingWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 99B0A4: using guessed type void (__thiscall *PkKqRankingWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99B0C4: using guessed type int (__thiscall *PkKqRankingWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005678F0) --------------------------------------------------------
void __thiscall PkKqRankingWin::Clear(PkKqRankingWin *this)
{
  PkKqRankingWin *v1; // esi@1

  v1 = this;
  SlideListWin::RemoveAllList(this->m_pkListWin);
  v1->m_iPkRankingSortColumn = 0;
}

//----- (00567910) --------------------------------------------------------
void __thiscall PkKqRankingWin::OnCmdClose(PkKqRankingWin *this)
{
  PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
}

//----- (00567930) --------------------------------------------------------
void __thiscall PkKqRankingWin::SetBaseScore(PkKqRankingWin *this, unsigned int dwBaseScore)
{
  this->m_dwBaseScore = dwBaseScore;
}

//----- (00567940) --------------------------------------------------------
void __thiscall PkKqRankingWin::SortListBy(PkKqRankingWin *this, int iIndex)
{
  PkKqRankingWin *v2; // esi@1
  SlideListWin *v3; // ecx@1

  v2 = this;
  v3 = this->m_pkListWin;
  if ( v3 )
  {
    v2->m_iPkRankingSortColumn = iIndex;
    SlideListWin::Sort(v3, iIndex, 0, 0);
    SlideListWin::UpdateViewList(v2->m_pkListWin);
  }
}

//----- (00567980) --------------------------------------------------------
void PkKqRankingWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "RankingWin");
}

//----- (005679B0) --------------------------------------------------------
void __thiscall PkKqRankingWin::AddRanking(PkKqRankingWin *this, char *pcName, unsigned int dwKillPoint, unsigned int dwDownPoint, unsigned int dwContribute, char byMedal, char byGender, char byChrCls, unsigned int dwScore)
{
  PkKqRankingWin *v9; // esi@1
  char *v10; // ebx@1
  unsigned int v11; // edi@1
  char *v12; // ST0C_4@2
  char *v13; // eax@2
  const char *v14; // eax@3
  const char *v15; // eax@3
  const char *v16; // eax@3
  const char *v17; // eax@3
  const char *v18; // eax@3
  char *pcNamea; // [sp+14h] [bp+8h]@2

  v9 = this;
  v10 = pcName;
  v11 = SlideListWin::AddText(this->m_pkListWin, 0);
  if ( !v11 )
  {
    v12 = pcName;
    pcNamea = (char *)v9->m_pkWinnerText->vfptr;
    v13 = fs("\" %s \"", v12);
    (*((void (__thiscall **)(_DWORD, _DWORD))pcNamea + 118))(v9->m_pkWinnerText, v13);
  }
  v14 = fs("%d", v11 + 1);
  SlideListWin::SetText(v9->m_pkListWin, v11, 0, v14);
  SlideListWin::SetText(v9->m_pkListWin, v11, 1u, v10);
  v15 = fs("%d", dwKillPoint);
  SlideListWin::SetText(v9->m_pkListWin, v11, 2u, v15);
  v16 = fs("%d", -dwDownPoint);
  SlideListWin::SetText(v9->m_pkListWin, v11, 3u, v16);
  v17 = fs("%d", dwContribute);
  SlideListWin::SetText(v9->m_pkListWin, v11, 4u, v17);
  v18 = fs("%d", dwScore);
  SlideListWin::SetText(v9->m_pkListWin, v11, 5u, v18);
  if ( !strcmp((const char *)((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)(), v10) )
    SlideListWin::SetFontColor(v9->m_pkListWin, v11, 128, 245, 122);
  SlideListWin::AlignText(v9->m_pkListWin, 5u);
  SlideListWin::UpdateViewList(v9->m_pkListWin);
  SlideBar::SetSplitCnt(v9->m_pkSlideBar, v9->m_pkListWin->m_nSlideSplitCnt);
}

//----- (00567B30) --------------------------------------------------------
void __thiscall PkKqRankingWin::OnCmdSlide(PkKqRankingWin *this)
{
  this->m_pkListWin->m_nViewStartPos = this->m_pkSlideBar->m_nCurPos;
  SlideListWin::UpdateViewList(this->m_pkListWin);
}

//----- (00567B60) --------------------------------------------------------
void __thiscall PkKqRankingWin::OnCommand(PkKqRankingWin *this, unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@4

  switch ( wParam )
  {
    case 4u:
      PkKqRankingWin::OnCmdSlide(this);
      break;
    case 1u:
      PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
      break;
    case 0xBu:
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v3 )
        GameFrameWork::OpenPlayGuideSearchList(v3, "RankingWin");
      break;
    default:
      return;
  }
}

//----- (00567BE0) --------------------------------------------------------
char __thiscall PkKqRankingWin::Create(PkKqRankingWin *this, PgFrameWork *pkFrameWork)
{
  PkKqRankingWin *v2; // esi@1
  const char *v3; // eax@3
  PgSprData *v4; // eax@4
  NiNode *v5; // esi@5
  char result; // al@9
  NiSourceTexture *v7; // eax@10
  PgSprData *v8; // eax@11
  D3DXCOLOR v9; // ST1C_16@13
  char *v10; // eax@13
  NiNode *v11; // esi@14
  PgFont *v12; // eax@19
  PgWinText *v13; // edi@19
  NiUnsharedGeometryGroup *v14; // eax@19
  PgFont *v15; // eax@21
  PgWinText *v16; // eax@21
  PgWinBut *v17; // edi@21
  D3DXCOLOR v18; // ST1C_16@21
  char *v19; // eax@21
  NiSourceTexture *v20; // edi@21
  SLWCreateInfo::Item *v21; // eax@23
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *v22; // edi@23
  SLWCreateInfo::Item *v23; // eax@23
  SLWCreateInfo::Item *v24; // edi@23
  SLWCreateInfo::Item *v25; // eax@23
  SLWCreateInfo::Item *v26; // edi@23
  SLWCreateInfo::Item *v27; // eax@23
  SLWCreateInfo::Item *v28; // edi@23
  SLWCreateInfo::Item *v29; // eax@23
  SLWCreateInfo::Item *v30; // edi@23
  SLWCreateInfo::Item *v31; // eax@23
  SLWCreateInfo::Item *v32; // edi@23
  SLWCreateInfo::Item *v33; // eax@23
  SLWCreateInfo::Item *v34; // edi@23
  PgSprData *v35; // eax@23
  SlideListWin *v36; // eax@23
  PgSprData *v37; // eax@23
  SlideBar *v38; // eax@23
  SlideBar *v39; // eax@23
  NiRefObjectVtbl *v40; // ebx@23
  SlideBar *v41; // edi@23
  int v42; // eax@23
  int v43; // eax@23
  PgWinBut *v44; // esi@23
  D3DXCOLOR v45; // ST1C_16@23
  char *v46; // eax@23
  PgWinBut *v47; // esi@23
  D3DXCOLOR v48; // ST1C_16@23
  char *v49; // eax@23
  PgWinBut *v50; // esi@23
  D3DXCOLOR v51; // ST1C_16@23
  char *v52; // eax@23
  PgWinBut *v53; // esi@23
  D3DXCOLOR v54; // ST1C_16@23
  char *v55; // eax@23
  PgWinBut *v56; // esi@23
  D3DXCOLOR v57; // ST1C_16@23
  char *v58; // eax@23
  PgWinBut *v59; // esi@23
  D3DXCOLOR v60; // ST1C_16@23
  char *v61; // eax@23
  SLWCreateInfo kCreateInfo; // [sp+10h] [bp-84h]@23
  NiTexturePalette *pTexturePalette; // [sp+2Ch] [bp-68h]@1
  int uiTop; // [sp+30h] [bp-64h]@13
  int uiLeft; // [sp+34h] [bp-60h]@13
  unsigned int uiHeight; // [sp+38h] [bp-5Ch]@13
  unsigned int uiWidth; // [sp+3Ch] [bp-58h]@13
  int iXOff; // [sp+40h] [bp-54h]@4
  int iYOff; // [sp+44h] [bp-50h]@4
  UIUtil ui; // [sp+48h] [bp-4Ch]@10
  int iTop; // [sp+5Ch] [bp-38h]@11
  int iLeft; // [sp+60h] [bp-34h]@11
  NiPointer<NiNode> spNode; // [sp+64h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+68h] [bp-2Ch]@23
  int v75; // [sp+90h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v75 = 0;
  pTexturePalette = ::pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v3 = Folder::Merge(&Folder::m_acMenu, "Game\\RankingWin.nif");
  PgUtil::LoadNodeNifFile(v3, &spNode, pTexturePalette);
  if ( !spNode.m_pObject )
    return 0;
  v4 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iXOff, &iYOff, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v4, 0, pkFrameWork, "PkKqRankingWin", 0) )
  {
    v5 = spNode.m_pObject;
    v75 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
    return 0;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v75) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, iXOff, iYOff);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  UIUtil::CreateSpr(&ui, "Panel01", 0);
  v7 = MenuTexMgr::GetTexture(0x13u);
  if ( v7 )
    v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, v7);
  else
    v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft, iTop, v8, (PgWin *)&v2->vfptr, 0, 0);
  UIUtil::CreateSpr(&ui, "IconSlot", 0);
  *(_QWORD *)&v9.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v9.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v10 = (char *)TextData::Get(0x99F8F4F3);
  UIUtil::CreateTextNoSpr(&ui, "WinTitle", v10, v9, 5u);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Txt02", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v12 = Font::Get(BOLD);
    v13 = PgWinText::CreateWin(
            uiLeft - iXOff + 20,
            uiTop - iYOff - 13,
            uiWidth,
            uiHeight,
            v12,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v13->vfptr[122].__vecDelDtor((NiRefObject *)v13, 5u);
    v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
    SpScreenText::SetShadowOffset((SpScreenText *)&v13->m_spTextGeom.m_pObject->vfptr, 1u);
    pTexturePalette = (NiTexturePalette *)v13->vfptr;
    v14 = TextData::Get(0xE0F43441);
    ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pTexturePalette[59].vfptr)(v13, v14);
    SpScreenText::SetVerticalGap((SpScreenText *)&v13->m_spTextGeom.m_pObject->vfptr, 3);
    if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Txt01", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
    {
      v15 = Font::Get(LARGE);
      v16 = PgWinText::CreateWin(
              uiLeft - iXOff + 20,
              uiTop - iYOff - 10,
              uiWidth,
              uiHeight,
              v15,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v2->m_pkWinnerText = v16;
      v16->vfptr[122].__vecDelDtor((NiRefObject *)v16, 5u);
      ((void (__stdcall *)(_DWORD))v2->m_pkWinnerText->vfptr[60].__vecDelDtor)(0);
      ((void (__stdcall *)(signed int, signed int, signed int, signed int))v2->m_pkWinnerText->vfptr[116].__vecDelDtor)(
        255,
        255,
        128,
        255);
      v17 = UIUtil::CreateBtn(&ui, 1u, "Btn01Nor", "Btn01Over", "Btn01Click", 0, 0);
      *(_QWORD *)&v18.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v18.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v19 = (char *)TextData::Get(0xD6FBEFFF);
      UIUtil::CreateAttachedText((PgWin *)&v17->vfptr, v19, v18, 5u);
      UIUtil::CreateCloseBtn(&ui, "ClsNor", "ClsOver", "ClsClick");
      v20 = MenuTexMgr::GetTexture(4u);
      if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
        UIUtil::CreateBtn(&ui, 0xBu, "HelpLinkNor", "HelpLinkOver", "HelpLinkClick", 0, v20);
      kCreateInfo.m_arrItem._Myfirst = 0;
      kCreateInfo.m_arrItem._Mylast = 0;
      kCreateInfo.m_arrItem._Myend = 0;
      kCreateInfo.m_bMakeData = 0;
      kCreateInfo.m_nOffX = 0;
      kCreateInfo.m_nOffY = 0;
      LOBYTE(v75) = 2;
      v21 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
      v22 = (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)v21;
      v21->nItemType = 1;
      v21->pNode = spNode.m_pObject;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "ColumnBarNor");
      v22 = (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)((char *)v22 + 72);
      LOBYTE(v75) = 3;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        v22,
        &_Val);
      LOBYTE(v75) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "ColumnBarClick");
      LOBYTE(v75) = 4;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        v22,
        &_Val);
      LOBYTE(v75) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "ColumnBarOver");
      LOBYTE(v75) = 5;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        v22,
        &_Val);
      LOBYTE(v75) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      v23 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      v24 = v23;
      v23->nItemType = 2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column01");
      LOBYTE(v75) = 6;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        &v24->vecNodeName,
        &_Val);
      LOBYTE(v75) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      v24->pNode = spNode.m_pObject;
      v25 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      v26 = v25;
      v25->nItemType = 2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column02");
      LOBYTE(v75) = 7;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        &v26->vecNodeName,
        &_Val);
      LOBYTE(v75) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      v26->pNode = spNode.m_pObject;
      v26->bAbbreviatable = 1;
      v27 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      v28 = v27;
      v27->nItemType = 2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column03");
      LOBYTE(v75) = 8;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        &v28->vecNodeName,
        &_Val);
      LOBYTE(v75) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      v28->pNode = spNode.m_pObject;
      v29 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      v30 = v29;
      v29->nItemType = 2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column04");
      LOBYTE(v75) = 9;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        &v30->vecNodeName,
        &_Val);
      LOBYTE(v75) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      v30->pNode = spNode.m_pObject;
      v31 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      v32 = v31;
      v31->nItemType = 2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column05");
      LOBYTE(v75) = 10;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        &v32->vecNodeName,
        &_Val);
      LOBYTE(v75) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      v32->pNode = spNode.m_pObject;
      v33 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      v34 = v33;
      v33->nItemType = 2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column06");
      LOBYTE(v75) = 11;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        &v34->vecNodeName,
        &_Val);
      LOBYTE(v75) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      v34->pNode = spNode.m_pObject;
      SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
      v35 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &iLeft, &iTop, 0);
      v36 = SlideListWin::CreateWin(iLeft - iXOff, iTop - iYOff, v35, (PgWin *)&v2->vfptr, &kCreateInfo, 3u, 0);
      v2->m_pkListWin = v36;
      v36->m_uiRClickMsg = 2;
      v2->m_pkListWin->m_uiLClickMsg = 3;
      SlideListWin::UpdateViewList(v2->m_pkListWin);
      v37 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle", &iLeft, &iTop, 0);
      v38 = SlideBar::CreateWin(
              spNode.m_pObject,
              "SlideBar",
              "SlideBar_UpBtn",
              "SlideBar_DnBtn",
              v37,
              0,
              (PgWin *)&v2->vfptr);
      v2->m_pkSlideBar = v38;
      v38->m_uiClickMsg = 4;
      v2->m_pkSlideBar->m_eType = 1;
      v39 = v2->m_pkSlideBar;
      v40 = v39->vfptr;
      v41 = v2->m_pkSlideBar;
      v42 = ((int (__thiscall *)(SlideBar *))v39->vfptr[42].__vecDelDtor)(v2->m_pkSlideBar);
      v43 = (int)v41->vfptr[41].__vecDelDtor((NiRefObject *)v41, v42);
      v40[77].__vecDelDtor((NiRefObject *)v2->m_pkSlideBar, v43 - 20);
      v44 = UIUtil::CreateBtn(&ui, 5u, "Title01Nor", "Title01Over", "Title01Over", 0, 0);
      *(_QWORD *)&v45.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v45.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v46 = (char *)TextData::Get(0x91B1F3ED);
      UIUtil::CreateAttachedText((PgWin *)&v44->vfptr, v46, v45, 5u);
      v47 = UIUtil::CreateBtn(&ui, 6u, "Title02Nor", "Title02Over", "Title02Over", 0, 0);
      *(_QWORD *)&v48.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v48.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v49 = (char *)TextData::Get(0xE4023F31);
      UIUtil::CreateAttachedText((PgWin *)&v47->vfptr, v49, v48, 5u);
      v50 = UIUtil::CreateBtn(&ui, 7u, "Title03Nor", "Title03Over", "Title03Over", 0, 0);
      *(_QWORD *)&v51.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v51.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v52 = (char *)TextData::Get(0xE84E4234);
      UIUtil::CreateAttachedText((PgWin *)&v50->vfptr, v52, v51, 5u);
      v53 = UIUtil::CreateBtn(&ui, 8u, "Title04Nor", "Title04Over", "Title04Over", 0, 0);
      *(_QWORD *)&v54.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v54.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v55 = (char *)TextData::Get(0xEE47443F);
      UIUtil::CreateAttachedText((PgWin *)&v53->vfptr, v55, v54, 5u);
      v56 = UIUtil::CreateBtn(&ui, 9u, "Title05Nor", "Title05Over", "Title05Over", 0, 0);
      *(_QWORD *)&v57.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v57.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v58 = (char *)TextData::Get(0x2D48512Fu);
      UIUtil::CreateAttachedText((PgWin *)&v56->vfptr, v58, v57, 5u);
      v59 = UIUtil::CreateBtn(&ui, 0xAu, "Title06Nor", "Title06Over", "Title06Over", 0, 0);
      *(_QWORD *)&v60.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v60.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v61 = (char *)TextData::Get(0x9FFFE9F3);
      UIUtil::CreateAttachedText((PgWin *)&v59->vfptr, v61, v60, 5u);
      LOBYTE(v75) = 1;
      SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
      LOBYTE(v75) = 0;
      UIUtil::~UIUtil(&ui);
      v75 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 1;
    }
    else
    {
      LOBYTE(v75) = 0;
      UIUtil::~UIUtil(&ui);
      v75 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 0;
    }
  }
  else
  {
    LOBYTE(v75) = 0;
    UIUtil::~UIUtil(&ui);
    v11 = spNode.m_pObject;
    v75 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v11 )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005685A0) --------------------------------------------------------
PkKqRankingWin *__cdecl PkKqRankingWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  PkKqRankingWin *v4; // eax@14
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x16Cu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&PkKqRankingWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&PkKqRankingWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][2]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( PkKqRankingWin::Create((PkKqRankingWin *)v2, pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (PkKqRankingWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( v2 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
    v4 = 0;
  }
  return v4;
}
// 99B0A4: using guessed type void (__thiscall *PkKqRankingWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99B0C4: using guessed type int (__thiscall *PkKqRankingWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005686F0) --------------------------------------------------------
PkKqRankingWin *__thiscall PkKqRankingWin::`vector deleting destructor'(PkKqRankingWin *this, unsigned int a2)
{
  PkKqRankingWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&PkKqRankingWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PkKqRankingWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 99B0A4: using guessed type void (__thiscall *PkKqRankingWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99B0C4: using guessed type int (__thiscall *PkKqRankingWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00568730) --------------------------------------------------------
BOOL __cdecl PkRealTiemRankWin::RankInfo::greater_Score(PkRealTiemRankWin::RankInfo *lhw, PkRealTiemRankWin::RankInfo *rhw)
{
  return rhw->m_unScore < lhw->m_unScore;
}

//----- (00568750) --------------------------------------------------------
BOOL __cdecl GTStatusWin::RankInfo::High_DieCount(PkRealTiemRankWin::RankInfo *lhw, PkRealTiemRankWin::RankInfo *rhw)
{
  return rhw->m_unDown < lhw->m_unDown;
}

//----- (00568770) --------------------------------------------------------
void PkRealTiemRankWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "KDScoreRealTime");
}

//----- (005687A0) --------------------------------------------------------
char __thiscall PkRealTiemRankWin::Open(PkRealTiemRankWin *this)
{
  char result; // al@2

  if ( this->m_vecRankInfos._Mylast - this->m_vecRankInfos._Myfirst )
  {
    ((void (__stdcall *)(_DWORD))this->vfptr[64].__vecDelDtor)(1);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (005687E0) --------------------------------------------------------
void __thiscall PkRealTiemRankWin::minimizeWindow(PkRealTiemRankWin *this, int btrue)
{
  PkRealTiemRankWin *v2; // ebx@1
  PgWin *v3; // eax@1
  unsigned int v4; // edi@2
  PgWin *v5; // esi@7
  NiRTTI *v6; // eax@8
  unsigned int Pos; // [sp+4h] [bp-4h]@1

  v2 = this;
  this->m_bNotMinimize = btrue;
  Pos = 0;
  v3 = PgWin::GetNextChildWin((PgWin *)&this->vfptr, &Pos);
  if ( v3 )
  {
    v4 = Pos;
    while ( 1 )
    {
      if ( (PgWin *)v2->m_pkMinimizeButton != v3 && v2->m_pWinTitleText != v3 )
        v3->vfptr[64].__vecDelDtor((NiRefObject *)v3, btrue);
      if ( v4 >= v2->m_kChildren.m_uiSize )
        break;
      while ( 1 )
      {
        v5 = (PgWin *)v2->m_kChildren.m_pBase[v4].m_pObject;
        if ( v5 )
        {
          v6 = (NiRTTI *)((int (__thiscall *)(_DWORD))v5->vfptr[1].__vecDelDtor)(v5);
          if ( v6 )
            break;
        }
LABEL_11:
        if ( ++v4 >= v2->m_kChildren.m_uiSize )
          return;
      }
      while ( v6 != &PgWin::m_RTTI )
      {
        v6 = v6->m_pkBaseRTTI;
        if ( !v6 )
          goto LABEL_11;
      }
      ++v4;
      v3 = v5;
    }
  }
}

//----- (00568890) --------------------------------------------------------
char __thiscall PkRealTiemRankWin::AddRankPlayerInfo(PkRealTiemRankWin *this, PkRealTiemRankWin::RankInfo *rInfo)
{
  PkRealTiemRankWin *v2; // edi@1
  const char *v3; // eax@1
  unsigned int v4; // ST0C_4@1
  unsigned int v5; // ebx@1
  const char *v6; // eax@2
  unsigned int v7; // eax@4
  const char *v8; // edx@5
  unsigned int v9; // esi@7
  const char *v10; // ecx@9
  int v11; // ecx@13
  int v12; // eax@14
  int v13; // ecx@14
  unsigned int v15; // [sp+10h] [bp-B0h]@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strMainName; // [sp+14h] [bp-ACh]@1
  char Name[128]; // [sp+30h] [bp-90h]@1
  int v18; // [sp+BCh] [bp-4h]@1

  v2 = this;
  v3 = (const char *)((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)();
  strMainName._Myres = 15;
  strMainName._Mysize = 0;
  strMainName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strMainName, v3, strlen(v3));
  v4 = rInfo->m_unRank;
  v18 = 0;
  sprintf(Name, "%d", v4);
  v5 = SlideListWin::AddText(v2->m_pkSkillListWin, Name);
  sprintf(Name, "%d", rInfo->m_unScore);
  SlideListWin::SetText(v2->m_pkSkillListWin, v5, 1u, Name);
  if ( rInfo->m_strName._Myres < 0x10 )
    v6 = (const char *)rInfo;
  else
    v6 = rInfo->m_strName._Bx._Ptr;
  SlideListWin::SetText(v2->m_pkSkillListWin, v5, 2u, v6);
  sprintf(Name, "%d", rInfo->m_unKill);
  SlideListWin::SetText(v2->m_pkSkillListWin, v5, 3u, Name);
  sprintf(Name, "%d", rInfo->m_unDown);
  SlideListWin::SetText(v2->m_pkSkillListWin, v5, 4u, Name);
  v7 = rInfo->m_strName._Mysize;
  v15 = rInfo->m_strName._Mysize;
  if ( rInfo->m_strName._Myres < 0x10 )
    v8 = (const char *)rInfo;
  else
    v8 = rInfo->m_strName._Bx._Ptr;
  v9 = strMainName._Mysize;
  if ( strMainName._Mysize < v7 )
    v7 = strMainName._Mysize;
  v10 = strMainName._Bx._Ptr;
  if ( strMainName._Myres < 0x10 )
    v10 = (const char *)&strMainName;
  if ( std::char_traits<char>::compare(v10, v8, v7) || v9 < v15 || (v11 = v9 != v15) != 0 )
  {
    v12 = 255;
    v13 = 0;
  }
  else
  {
    v12 = v11 + 102;
    v13 = v11 + 51;
  }
  SlideListWin::SetFontColor(v2->m_pkSkillListWin, v5, v12, 255, v13);
  if ( strMainName._Myres >= 0x10 )
    operator delete(strMainName._Bx._Ptr);
  return 1;
}

//----- (00568AA0) --------------------------------------------------------
char __thiscall PkRealTiemRankWin::DisplayInfoSetting(PkRealTiemRankWin *this)
{
  PkRealTiemRankWin *v1; // edi@1
  signed int v2; // ecx@1
  const char *v3; // eax@3
  signed int v4; // ecx@3
  PkRealTiemRankWin::RankInfo *v5; // esi@5
  unsigned int v6; // ebx@5
  const char *v7; // edx@6
  unsigned int v8; // ecx@8
  const char *v9; // eax@10
  PkRealTiemRankWin::RankInfo *v10; // ebx@19
  int v11; // ecx@20
  unsigned int v12; // edx@22
  void *v13; // esi@24
  signed int v14; // eax@30
  int v15; // eax@37
  unsigned int v16; // eax@41
  signed int nMaxLine; // [sp+10h] [bp-38h]@1
  unsigned int i; // [sp+14h] [bp-34h]@3
  unsigned int ia; // [sp+14h] [bp-34h]@18
  PkRealTiemRankWin::RankInfo *rInfo; // [sp+18h] [bp-30h]@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strMainName; // [sp+1Ch] [bp-2Ch]@3
  int v23; // [sp+44h] [bp-4h]@3

  v1 = this;
  v2 = (char *)this->m_vecRankInfos._Mylast - (char *)this->m_vecRankInfos._Myfirst;
  nMaxLine = 9;
  if ( (unsigned int)(v2 / 44) <= 9 )
    nMaxLine = v2 / 44;
  SlideListWin::RemoveAllList(v1->m_pkSkillListWin);
  v3 = (const char *)((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)();
  strMainName._Myres = 15;
  strMainName._Mysize = 0;
  strMainName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strMainName, v3, strlen(v3));
  v4 = (char *)v1->m_vecRankInfos._Mylast - (char *)v1->m_vecRankInfos._Myfirst;
  v23 = 0;
  i = 0;
  if ( v4 / 44 )
  {
    rInfo = 0;
    do
    {
      v5 = (PkRealTiemRankWin::RankInfo *)((char *)rInfo + (unsigned int)v1->m_vecRankInfos._Myfirst);
      v6 = v5->m_strName._Mysize;
      if ( v5->m_strName._Myres < 0x10 )
        v7 = &rInfo->m_strName._Bx._Buf[(unsigned int)v1->m_vecRankInfos._Myfirst];
      else
        v7 = v5->m_strName._Bx._Ptr;
      v8 = strMainName._Mysize;
      if ( strMainName._Mysize >= v6 )
        v8 = v5->m_strName._Mysize;
      v9 = strMainName._Bx._Ptr;
      if ( strMainName._Myres < 0x10 )
        v9 = (const char *)&strMainName;
      if ( !std::char_traits<char>::compare(v9, v7, v8) && strMainName._Mysize >= v6 && strMainName._Mysize == v6 )
        PkRealTiemRankWin::AddRankPlayerInfo(v1, v5);
      ++rInfo;
      ++i;
    }
    while ( i < v1->m_vecRankInfos._Mylast - v1->m_vecRankInfos._Myfirst );
  }
  if ( nMaxLine > 0 )
  {
    ia = 0;
    do
    {
      v10 = &v1->m_vecRankInfos._Myfirst[ia];
      if ( v10->m_strName._Myres < 0x10 )
        v11 = (int)&v1->m_vecRankInfos._Myfirst[ia];
      else
        v11 = (int)v10->m_strName._Bx._Ptr;
      v12 = strMainName._Mysize;
      if ( strMainName._Mysize >= v10->m_strName._Mysize )
        v12 = v10->m_strName._Mysize;
      v13 = strMainName._Bx._Ptr;
      if ( strMainName._Myres < 0x10 )
        v13 = &strMainName;
      if ( v12 < 4 )
      {
LABEL_29:
        if ( !v12 )
          goto LABEL_39;
      }
      else
      {
        while ( *(_DWORD *)v13 == *(_DWORD *)v11 )
        {
          v12 -= 4;
          v11 += 4;
          v13 = (char *)v13 + 4;
          if ( v12 < 4 )
            goto LABEL_29;
        }
      }
      v14 = *(_BYTE *)v13 - *(_BYTE *)v11;
      if ( *(_BYTE *)v13 != *(_BYTE *)v11 )
        goto LABEL_37;
      if ( v12 > 1 )
      {
        v14 = *((_BYTE *)v13 + 1) - *(_BYTE *)(v11 + 1);
        if ( *((_BYTE *)v13 + 1) != *(_BYTE *)(v11 + 1) )
          goto LABEL_37;
        if ( v12 > 2 )
        {
          v14 = *((_BYTE *)v13 + 2) - *(_BYTE *)(v11 + 2);
          if ( *((_BYTE *)v13 + 2) != *(_BYTE *)(v11 + 2) )
            goto LABEL_37;
          if ( v12 > 3 )
          {
            v14 = *((_BYTE *)v13 + 3) - *(_BYTE *)(v11 + 3);
LABEL_37:
            v10 = &v1->m_vecRankInfos._Myfirst[ia];
            v15 = (v14 >> 31) | 1;
            goto LABEL_40;
          }
        }
      }
      v10 = &v1->m_vecRankInfos._Myfirst[ia];
LABEL_39:
      v15 = 0;
LABEL_40:
      if ( v15 || (v16 = v10->m_strName._Mysize, strMainName._Mysize < v16) || strMainName._Mysize != v16 )
        PkRealTiemRankWin::AddRankPlayerInfo(v1, v10);
      ++ia;
      --nMaxLine;
    }
    while ( nMaxLine );
  }
  SlideListWin::AlignText(v1->m_pkSkillListWin, 2u, 4u);
  SlideListWin::UpdateViewList(v1->m_pkSkillListWin);
  if ( strMainName._Myres >= 0x10 )
    operator delete(strMainName._Bx._Ptr);
  return 1;
}

//----- (00568D20) --------------------------------------------------------
void __thiscall PkRealTiemRankWin::PkRealTiemRankWin(PkRealTiemRankWin *this)
{
  PkRealTiemRankWin *v1; // esi@1
  int v2; // edi@1
  void *v3; // eax@1
  boost::detail::function::any_pointer (__cdecl *v4)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // ebx@1
  boost::detail::function::any_pointer (__cdecl *v5)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // edx@4
  void *v6; // edx@4
  char v7; // [sp+10h] [bp-1Ch]@3
  int (__cdecl *v8)(boost::detail::function::any_pointer, GuildListWin::GuildInfo *, GuildListWin::GuildInfo *); // [sp+18h] [bp-14h]@1
  PkRealTiemRankWin *v9; // [sp+1Ch] [bp-10h]@1
  int v10; // [sp+28h] [bp-4h]@1

  v1 = this;
  v9 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&PkRealTiemRankWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&PkRealTiemRankWin::`vftable'{for `IDirectMessenger'};
  v1->m_strPlayerName._Myres = 15;
  v1->m_strPlayerName._Mysize = 0;
  v10 = 0;
  v1->m_strPlayerName._Bx._Buf[0] = 0;
  v1->m_vecRankInfos._Myfirst = 0;
  v1->m_vecRankInfos._Mylast = 0;
  v1->m_vecRankInfos._Myend = 0;
  v2 = (int)&v1->m_SortPradicationFunc;
  *(_DWORD *)v2 = 0;
  *(_DWORD *)(v2 + 4) = 0;
  *(_DWORD *)(v2 + 8) = 0;
  v3 = 0;
  v4 = 0;
  LOBYTE(v10) = 3;
  v1->m_iFontHeight = 14;
  v8 = 0;
  if ( PkRealTiemRankWin::RankInfo::greater_Score )
  {
    v8 = boost::detail::function::function_invoker2<bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),bool,GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &>::invoke;
    v4 = boost::detail::function::functor_manager<bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>::manage;
    v3 = boost::detail::function::functor_manager<bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>::manage(
           (boost::detail::function::any_pointer)PkRealTiemRankWin::RankInfo::greater_Score,
           0).obj_ptr;
  }
  if ( (char *)v2 != &v7 )
  {
    v5 = v4;
    v4 = *(boost::detail::function::any_pointer (__cdecl **)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type))v2;
    *(_DWORD *)v2 = v5;
    v6 = v3;
    v3 = v1->m_SortPradicationFunc.functor.obj_ptr;
    v1->m_SortPradicationFunc.functor.obj_ptr = v6;
    v1->m_SortPradicationFunc.invoker = (bool (__cdecl *)(boost::detail::function::any_pointer, PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *))v8;
  }
  if ( v4 )
    ((void (__cdecl *)(void *, signed int))v4)(v3, 1);
  PkRealTiemRankWin::minimizeWindow(v1, 1);
}
// 99B3D4: using guessed type void (__thiscall *PkRealTiemRankWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99B3F4: using guessed type int (__thiscall *PkRealTiemRankWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00568E20) --------------------------------------------------------
void __thiscall PkRealTiemRankWin::~PkRealTiemRankWin(PkRealTiemRankWin *this)
{
  PkRealTiemRankWin *v1; // esi@1
  PkRealTiemRankWin::RankInfo *v2; // eax@3

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&PkRealTiemRankWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PkRealTiemRankWin::`vftable'{for `IDirectMessenger'};
  if ( this->m_SortPradicationFunc.manager )
    this->m_SortPradicationFunc.functor.obj_ptr = (void *)((int (__cdecl *)(_DWORD, _DWORD))this->m_SortPradicationFunc.manager)(
                                                            this->m_SortPradicationFunc.functor.obj_ptr,
                                                            1);
  v1->m_SortPradicationFunc.manager = 0;
  v1->m_SortPradicationFunc.invoker = 0;
  v2 = v1->m_vecRankInfos._Myfirst;
  if ( v2 )
  {
    std::_Destroy_range<std::allocator<PkRealTiemRankWin::RankInfo>>(v2, v1->m_vecRankInfos._Mylast);
    operator delete(v1->m_vecRankInfos._Myfirst);
  }
  v1->m_vecRankInfos._Myfirst = 0;
  v1->m_vecRankInfos._Mylast = 0;
  v1->m_vecRankInfos._Myend = 0;
  if ( v1->m_strPlayerName._Myres >= 0x10 )
    operator delete(v1->m_strPlayerName._Bx._Ptr);
  v1->m_strPlayerName._Myres = 15;
  v1->m_strPlayerName._Mysize = 0;
  v1->m_strPlayerName._Bx._Buf[0] = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 99B3D4: using guessed type void (__thiscall *PkRealTiemRankWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99B3F4: using guessed type int (__thiscall *PkRealTiemRankWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00568F30) --------------------------------------------------------
PkRealTiemRankWin *__cdecl PkRealTiemRankWin::CreateWin(PgFrameWork *pFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  PkRealTiemRankWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1B8u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    PkRealTiemRankWin::PkRealTiemRankWin((PkRealTiemRankWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (PkRealTiemRankWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00569060) --------------------------------------------------------
char __thiscall PkRealTiemRankWin::Clear(PkRealTiemRankWin *this)
{
  PkRealTiemRankWin *v1; // esi@1
  PkRealTiemRankWin::RankInfo *v2; // eax@1
  PkRealTiemRankWin::RankInfo *v3; // ecx@1
  PkRealTiemRankWin::RankInfo *v4; // edi@2

  v1 = this;
  v2 = this->m_vecRankInfos._Mylast;
  v3 = this->m_vecRankInfos._Myfirst;
  if ( v3 != v2 )
  {
    v4 = std::_Move<PkRealTiemRankWin::RankInfo *,PkRealTiemRankWin::RankInfo *>(v2, v2, v3);
    std::_Destroy_range<std::allocator<PkRealTiemRankWin::RankInfo>>(v4, v1->m_vecRankInfos._Mylast);
    v1->m_vecRankInfos._Mylast = v4;
  }
  SlideListWin::RemoveAllList(v1->m_pkSkillListWin);
  SlideListWin::UpdateViewList(v1->m_pkSkillListWin);
  return 1;
}

//----- (005690D0) --------------------------------------------------------
char __thiscall PkRealTiemRankWin::Close(PkRealTiemRankWin *this, bool bReset)
{
  PkRealTiemRankWin *v2; // esi@1

  v2 = this;
  if ( bReset )
    PkRealTiemRankWin::Clear(this);
  v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 0);
  return 1;
}

//----- (00569100) --------------------------------------------------------
char __thiscall PkRealTiemRankWin::SetRankInfo(PkRealTiemRankWin *this, const char *pkName, unsigned int unScore, unsigned int Down, unsigned int Kill)
{
  PkRealTiemRankWin *v5; // edi@1
  unsigned int v6; // ebx@1
  std::vector<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo> > *v7; // esi@1
  PkRealTiemRankWin::RankInfo *v8; // edi@1
  signed int v9; // ecx@1
  int v10; // edi@3
  const char *v11; // edx@3
  unsigned int v12; // ecx@5
  const char *v13; // eax@8
  unsigned int v14; // eax@11
  PkRealTiemRankWin::RankInfo *v15; // ecx@14
  unsigned int v16; // edx@17
  PkRealTiemRankWin::RankInfo *v17; // ecx@17
  unsigned int v18; // edi@17
  int v19; // ebx@18
  PkRealTiemRankWin *v20; // edi@20
  boost::detail::function::any_pointer (__cdecl *v22)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp-Ch] [bp-64h]@20
  int v23; // [sp-8h] [bp-60h]@20
  bool (__cdecl *v24)(boost::detail::function::any_pointer, PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *); // [sp-4h] [bp-5Ch]@20
  PkRealTiemRankWin *v25; // [sp+10h] [bp-48h]@1
  char *v26; // [sp+14h] [bp-44h]@2
  bool bEqualData; // [sp+1Bh] [bp-3Dh]@1
  PkRealTiemRankWin::RankInfo info; // [sp+1Ch] [bp-3Ch]@1
  int v29; // [sp+54h] [bp-4h]@1

  v5 = this;
  v6 = 0;
  v25 = this;
  info.m_strName._Myres = 15;
  info.m_strName._Mysize = 0;
  info.m_strName._Bx._Buf[0] = 0;
  v29 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&info.m_strName, pkName, strlen(pkName));
  v7 = &v5->m_vecRankInfos;
  v8 = v5->m_vecRankInfos._Myfirst;
  info.m_unScore = unScore;
  info.m_unDown = Down;
  v9 = (char *)v7->_Mylast - (char *)v8;
  info.m_unKill = Kill;
  info.m_unRank = 0;
  bEqualData = 0;
  if ( !(v9 / 44) )
    goto LABEL_28;
  v26 = 0;
  if ( (unsigned int)(v9 / 44) <= 0 )
    std::_Xout_of_range("invalid vector<T> subscript");
  do
  {
    v10 = (int)v8 + (_DWORD)v26;
    v11 = info.m_strName._Bx._Ptr;
    if ( info.m_strName._Myres < 0x10 )
      v11 = (const char *)&info;
    v12 = info.m_strName._Mysize;
    if ( *(_DWORD *)(v10 + 16) < info.m_strName._Mysize )
      v12 = *(_DWORD *)(v10 + 16);
    if ( *(_DWORD *)(v10 + 20) < 0x10u )
      v13 = (const char *)v10;
    else
      v13 = *(const char **)v10;
    if ( !std::char_traits<char>::compare(v13, v11, v12) )
    {
      v14 = *(_DWORD *)(v10 + 16);
      if ( v14 >= info.m_strName._Mysize && v14 == info.m_strName._Mysize )
      {
        bEqualData = 1;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v10,
          &info.m_strName,
          v14 != info.m_strName._Mysize,
          0xFFFFFFFF);
        *(_DWORD *)(v10 + 28) = info.m_unScore;
        *(_DWORD *)(v10 + 32) = info.m_unKill;
        *(_DWORD *)(v10 + 36) = info.m_unDown;
        *(_DWORD *)(v10 + 40) = info.m_unRank;
      }
    }
    v8 = v7->_Myfirst;
    v15 = v7->_Mylast;
    v26 += 44;
    ++v6;
  }
  while ( v15 - v8 > v6 );
  if ( !bEqualData )
LABEL_28:
    std::vector<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo>>::push_back(v7, &info);
  v16 = (signed int)((unsigned __int64)(780903145i64
                                      * (unsigned int)((char *)v25->m_vecRankInfos._Mylast - (char *)v7->_Myfirst)) >> 32) >> 3;
  std::_Sort<PkRealTiemRankWin::RankInfo *,int,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &)>(
    v7->_Myfirst,
    v25->m_vecRankInfos._Mylast,
    v16 + (v16 >> 31),
    (bool (__cdecl *)(PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *))PkRealTiemRankWin::RankInfo::greater_Score);
  v17 = v7->_Myfirst;
  v18 = 0;
  if ( v7->_Mylast - v7->_Myfirst )
  {
    v19 = 0;
    do
    {
      v17[v19].m_unRank = ++v18;
      v17 = v7->_Myfirst;
      ++v19;
    }
    while ( v18 < v7->_Mylast - v7->_Myfirst );
  }
  v20 = v25;
  v22 = 0;
  v23 = 0;
  v24 = 0;
  v26 = (char *)&v22;
  if ( v25->m_SortPradicationFunc.manager )
  {
    v24 = v25->m_SortPradicationFunc.invoker;
    v22 = v25->m_SortPradicationFunc.manager;
    v23 = ((int (__cdecl *)(void *, _DWORD))v25->m_SortPradicationFunc.manager)(
            v25->m_SortPradicationFunc.functor.obj_ptr,
            0);
  }
  std::sort<std::_Vector_iterator<std::_Vector_val<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo>>>,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(
    (std::_Vector_iterator<std::_Vector_val<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo> > >)v7->_Myfirst,
    (std::_Vector_iterator<std::_Vector_val<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo> > >)v20->m_vecRankInfos._Mylast,
    *(boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > *)&v22);
  PkRealTiemRankWin::DisplayInfoSetting(v20);
  v20->vfptr[64].__vecDelDtor((NiRefObject *)v20, 1u);
  if ( info.m_strName._Myres >= 0x10 )
    operator delete(info.m_strName._Bx._Ptr);
  return 1;
}

//----- (00569380) --------------------------------------------------------
void __thiscall PkRealTiemRankWin::OnCommand(PkRealTiemRankWin *this, unsigned int wParam, int lParam)
{
  PkRealTiemRankWin *v3; // esi@1
  boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > v4; // [sp-Ch] [bp-14h]@4
  bool (__cdecl *v5)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *); // [sp-4h] [bp-Ch]@3

  v3 = this;
  switch ( wParam )
  {
    case 0u:
      PkRealTiemRankWin::minimizeWindow(this, this->m_bNotMinimize == 0);
      return;
    case 1u:
      v5 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))PkRealTiemRankWin::RankInfo::Less_Rank;
      goto LABEL_4;
    case 2u:
      v5 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))PkRealTiemRankWin::RankInfo::greater_Score;
      goto LABEL_4;
    case 3u:
      v5 = GuildListWin::GuildInfo::Low_GuildName;
      goto LABEL_4;
    case 4u:
      v5 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))GTStatusWin::RankInfo::High_DecreaseScore;
      goto LABEL_4;
    case 5u:
      v5 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))GTStatusWin::RankInfo::High_DieCount;
LABEL_4:
      boost::function<bool __cdecl (GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void>>::operator=<bool (__cdecl *)(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &)>(
        (boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *)&this->m_SortPradicationFunc,
        v5);
      boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>(
        (boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *)&v4,
        (boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *)&v3->m_SortPradicationFunc);
      std::sort<std::_Vector_iterator<std::_Vector_val<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo>>>,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(
        (std::_Vector_iterator<std::_Vector_val<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo> > >)v3->m_vecRankInfos._Myfirst,
        (std::_Vector_iterator<std::_Vector_val<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo> > >)v3->m_vecRankInfos._Mylast,
        v4);
      PkRealTiemRankWin::DisplayInfoSetting(v3);
      break;
    case 6u:
      PkRealTiemRankWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (00569440) --------------------------------------------------------
char __thiscall PkRealTiemRankWin::Create(PkRealTiemRankWin *this, PgFrameWork *pkFrameWork)
{
  PkRealTiemRankWin *v2; // edi@1
  const char *v3; // eax@3
  PgSprData *v4; // eax@4
  NiNode *v5; // esi@5
  NiSourceTexture *v7; // eax@10
  D3DXCOLOR v8; // ST1C_16@10
  char *v9; // eax@10
  NiSourceTexture *v10; // esi@10
  unsigned int v11; // esi@12
  PgWinBut *v12; // eax@13
  char *v13; // edi@13
  char v14; // cl@14
  int v15; // edi@15
  D3DXCOLOR v16; // ST1C_16@15
  bool v17; // zf@15
  SLWCreateInfo::Item *v18; // esi@16
  NiTexturePalette *v19; // edi@18
  SLWCreateInfo::Item *v20; // esi@19
  PgSprData *v21; // eax@24
  PgWin *v22; // edi@24
  PkRealTiemRankWin::RankInfo *v23; // eax@24
  PkRealTiemRankWin::RankInfo *v24; // ecx@24
  PgWin *v25; // eax@25
  NiTexturePalette *v26; // ecx@25
  PgWin *i; // esi@25
  NiNode *v28; // esi@32
  int uiHeight; // [sp+10h] [bp-184h]@24
  SLWCreateInfo kCreateInfo; // [sp+14h] [bp-180h]@16
  UIUtil ui; // [sp+30h] [bp-164h]@10
  int uiTop; // [sp+44h] [bp-150h]@4
  char **v33; // [sp+48h] [bp-14Ch]@12
  int uiLeft; // [sp+4Ch] [bp-148h]@4
  PgWinBut **v35; // [sp+50h] [bp-144h]@12
  int uiWidth; // [sp+54h] [bp-140h]@24
  PgWin *pkParent; // [sp+58h] [bp-13Ch]@1
  NiTexturePalette *pTexturePalette; // [sp+5Ch] [bp-138h]@1
  NiPointer<NiNode> spNode; // [sp+60h] [bp-134h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+64h] [bp-130h]@12
  char szDatabuff[260]; // [sp+80h] [bp-114h]@13
  int v42; // [sp+190h] [bp-4h]@1

  v2 = this;
  pkParent = (PgWin *)this;
  spNode.m_pObject = 0;
  this->m_pkFrameWork = pkFrameWork;
  v42 = 0;
  pTexturePalette = ::pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v3 = Folder::Merge(&Folder::m_acMenu, "Game\\KDScoreRealTime.nif");
  PgUtil::LoadNodeNifFile(v3, &spNode, pTexturePalette);
  if ( !spNode.m_pObject )
    return 0;
  v4 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v4, 0, pkFrameWork, "PkRealTiemRankWin", 0) )
  {
    v5 = spNode.m_pObject;
    v42 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
    return 0;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v42) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, uiLeft, uiTop);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v7 = MenuTexMgr::GetTexture(0x13u);
  UIUtil::CreateSpr(&ui, "Theme", v7);
  UIUtil::CreateSpr(&ui, "Plane", 0);
  *(_QWORD *)&v8.r = *(_QWORD *)&Color::m_kDxWinTitleColor.r;
  *(_QWORD *)&v8.b = *(_QWORD *)&Color::m_kDxWinTitleColor.b;
  v9 = (char *)TextData2::Get(0x9E876F93);
  v2->m_pWinTitleText = (PgWin *)UIUtil::CreateTextNoSpr(&ui, "WinTitle", v9, v8, 5u);
  v2->m_pkMinimizeButton = UIUtil::CreateButton(&ui, 0, off_99B334, 0, 3);
  v10 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
    UIUtil::CreateBtn(&ui, 6u, "HelpLinkNor", "HelpLinkOver", "HelpLinkClick", 0, v10);
  *(_DWORD *)&_Val._Bx._Alias[8] = TextData::Get(0x91B1F3ED);
  *(_DWORD *)&_Val._Bx._Alias[12] = TextData2::Get(0x98B19897);
  _Val._Mysize = (unsigned int)TextData2::Get(0x9EB18EEB);
  _Val._Myres = (unsigned int)&unk_99B2F9;
  *(_DWORD *)&_Val._Alval.0 = &unk_99B2FA;
  v11 = 1;
  v33 = (char **)&_Val._Bx._Alias[8];
  v35 = v2->m_pkTitleButton;
  pTexturePalette = (NiTexturePalette *)5;
  do
  {
    szDatabuff[0] = 0;
    memset(&szDatabuff[1], 0, 0x103u);
    sprintf(szDatabuff, "Title%02d", v11);
    v12 = UIUtil::CreateButton(&ui, v11, szDatabuff, 0, 3);
    *v35 = v12;
    v13 = (char *)(&_Val._Alval + 3);
    do
      v14 = (v13++)[1];
    while ( v14 );
    *(_DWORD *)v13 = 7499598;
    v15 = (int)v33;
    *(_QWORD *)&v16.r = *(_QWORD *)&Color::m_kDxGreenColor.r;
    *(_QWORD *)&v16.b = *(_QWORD *)&Color::m_kDxGreenColor.b;
    UIUtil::CreateAttachedText((PgWin *)&v12->vfptr, *v33, v16, 5u);
    ++v35;
    ++v11;
    v17 = pTexturePalette == (NiTexturePalette *)1;
    pTexturePalette = (NiTexturePalette *)((char *)pTexturePalette - 1);
    v33 = (char **)(v15 + 4);
  }
  while ( !v17 );
  UIUtil::CreateSpr(&ui, off_99B380, 0);
  UIUtil::CreateSpr(&ui, "Lose", 0);
  kCreateInfo.m_arrItem._Myfirst = 0;
  kCreateInfo.m_arrItem._Mylast = 0;
  kCreateInfo.m_arrItem._Myend = 0;
  kCreateInfo.m_bMakeData = 0;
  kCreateInfo.m_nOffX = 0;
  kCreateInfo.m_nOffY = 0;
  LOBYTE(v42) = 2;
  v18 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
  v18->nItemType = 1;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarNor", 0xCu);
  LOBYTE(v42) = 3;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &v18->vecNodeName,
    &_Val);
  LOBYTE(v42) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v18->pNode = spNode.m_pObject;
  v19 = 0;
  do
  {
    szDatabuff[0] = 0;
    memset(&szDatabuff[1], 0, 0x103u);
    pTexturePalette = (NiTexturePalette *)((char *)v19 + 1);
    sprintf(szDatabuff, "Column%02d", (char *)&v19->vfptr + 1);
    v20 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    v20->nItemType = 2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, szDatabuff, strlen(szDatabuff));
    LOBYTE(v42) = 4;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      &v20->vecNodeName,
      &_Val);
    LOBYTE(v42) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    v20->pNode = spNode.m_pObject;
    if ( v19 == (NiTexturePalette *)2 )
      v20->bAbbreviatable = 1;
    v19 = pTexturePalette;
  }
  while ( (unsigned int)pTexturePalette < 5 );
  SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
  v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane01", &uiWidth, &uiHeight, 0);
  v22 = pkParent;
  LODWORD(v22[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = SlideListWin::CreateWin(
                                                       uiWidth - uiLeft,
                                                       uiHeight - uiTop - 2,
                                                       v21,
                                                       pkParent,
                                                       &kCreateInfo,
                                                       1u,
                                                       0);
  v23 = (PkRealTiemRankWin::RankInfo *)LODWORD(v22[1].m_kWorld.m_Rotate.m_pEntry[2][0]);
  v24 = (PkRealTiemRankWin::RankInfo *)LODWORD(v22[1].m_kWorld.m_Rotate.m_pEntry[1][2]);
  if ( v24 != v23 )
  {
    v25 = (PgWin *)std::_Move<PkRealTiemRankWin::RankInfo *,PkRealTiemRankWin::RankInfo *>(v23, v23, v24);
    v26 = (NiTexturePalette *)LODWORD(v22[1].m_kWorld.m_Rotate.m_pEntry[2][0]);
    pkParent = v25;
    pTexturePalette = v26;
    for ( i = v25; (NiTexturePalette *)i != v26; i = (PgWin *)((char *)i + 44) )
    {
      if ( i->m_uiExtraDataSize >= 0x10 )
      {
        operator delete(i->vfptr);
        v25 = pkParent;
        v26 = pTexturePalette;
      }
      i->m_uiExtraDataSize = 15;
      i->m_ppkExtra = 0;
      LOBYTE(i->vfptr) = 0;
    }
    LODWORD(v22[1].m_kWorld.m_Rotate.m_pEntry[2][0]) = v25;
  }
  SlideListWin::RemoveAllList((SlideListWin *)LODWORD(v22[1].m_kLocal.m_Rotate.m_pEntry[0][1]));
  SlideListWin::UpdateViewList((SlideListWin *)LODWORD(v22[1].m_kLocal.m_Rotate.m_pEntry[0][1]));
  LOBYTE(v42) = 1;
  if ( kCreateInfo.m_arrItem._Myfirst )
  {
    std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(
      kCreateInfo.m_arrItem._Myfirst,
      kCreateInfo.m_arrItem._Mylast);
    operator delete(kCreateInfo.m_arrItem._Myfirst);
  }
  kCreateInfo.m_arrItem._Myfirst = 0;
  kCreateInfo.m_arrItem._Mylast = 0;
  kCreateInfo.m_arrItem._Myend = 0;
  LOBYTE(v42) = 0;
  UIUtil::~UIUtil(&ui);
  v28 = spNode.m_pObject;
  v42 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v28 )
    v28->vfptr->__vecDelDtor((NiRefObject *)v28, 1u);
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00569AD0) --------------------------------------------------------
int __cdecl boost::detail::function::function_invoker2<bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),bool,GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &>::invoke(boost::detail::function::any_pointer function_ptr, GuildListWin::GuildInfo *a0, GuildListWin::GuildInfo *a1)
{
  return ((int (__cdecl *)(_DWORD, _DWORD))function_ptr.obj_ptr)(a0, a1);
}

//----- (00569AF0) --------------------------------------------------------
void __thiscall boost::function<void __cdecl (char const *),std::allocator<void>>::~function<void __cdecl (char const *),std::allocator<void>>(boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *this)
{
  boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *v1; // esi@1

  v1 = this;
  if ( this->manager )
    this->functor.obj_ptr = (void *)((int (__cdecl *)(_DWORD, _DWORD))this->manager)(this->functor.obj_ptr, 1);
  v1->invoker = 0;
  v1->manager = 0;
}

//----- (00569B20) --------------------------------------------------------
PkRealTiemRankWin::RankInfo *__stdcall std::allocator<PkRealTiemRankWin::RankInfo>::allocate(unsigned int _Count)
{
  PkRealTiemRankWin::RankInfo *result; // eax@1
  std::exception pExceptionObject; // [sp+0h] [bp-Ch]@4

  result = 0;
  if ( _Count )
  {
    if ( _Count > 0x5D1745D || (result = (PkRealTiemRankWin::RankInfo *)operator new(44 * _Count)) == 0 )
    {
      _Count = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&_Count);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
  }
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00569B80) --------------------------------------------------------
void __thiscall boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>(boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *this, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *f)
{
  this->manager = 0;
  this->functor.obj_ptr = 0;
  this->invoker = 0;
  if ( f->manager )
  {
    this->invoker = f->invoker;
    this->manager = f->manager;
    this->functor.obj_ptr = (void *)((int (__cdecl *)(_DWORD, _DWORD))f->manager)(f->functor.obj_ptr, 0);
  }
}

//----- (00569BC0) --------------------------------------------------------
void __cdecl std::_Dest_val<std::allocator<SlideListWin::ListItem::ColumnData>,SlideListWin::ListItem::ColumnData>(std::allocator<SlideListWin::ListItem::ColumnData> *_Alval, SlideListWin::ListItem::ColumnData *_Pdest)
{
  if ( _Pdest->m_strColumnText._Myres >= 0x10 )
    operator delete(_Pdest->m_strColumnText._Bx._Ptr);
  _Pdest->m_strColumnText._Myres = 15;
  _Pdest->m_strColumnText._Mysize = 0;
  _Pdest->m_strColumnText._Bx._Buf[0] = 0;
}

//----- (00569BF0) --------------------------------------------------------
PkRealTiemRankWin::RankInfo *__cdecl std::_Move<PkRealTiemRankWin::RankInfo *,PkRealTiemRankWin::RankInfo *>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, PkRealTiemRankWin::RankInfo *_Dest)
{
  PkRealTiemRankWin::RankInfo *v3; // edi@2
  char *v4; // esi@2
  unsigned int v5; // ecx@3
  PkRealTiemRankWin::RankInfo *result; // eax@4

  if ( _First == _Last )
  {
    result = _Dest;
  }
  else
  {
    v3 = _Dest;
    v4 = (char *)&_First->m_unKill;
    do
    {
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v3->m_strName,
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)(v4 - 32),
        0,
        0xFFFFFFFF);
      v3->m_unScore = *((_DWORD *)v4 - 1);
      v3->m_unKill = *(_DWORD *)v4;
      v3->m_unDown = *((_DWORD *)v4 + 1);
      v5 = *((_DWORD *)v4 + 2);
      v4 += 44;
      v3->m_unRank = v5;
      ++v3;
    }
    while ( (PkRealTiemRankWin::RankInfo *)(v4 - 32) != _Last );
    result = v3;
  }
  return result;
}

//----- (00569C50) --------------------------------------------------------
void __cdecl std::_Destroy_range<std::allocator<PkRealTiemRankWin::RankInfo>>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last)
{
  PkRealTiemRankWin::RankInfo *i; // esi@1

  for ( i = _First; i != _Last; ++i )
  {
    if ( i->m_strName._Myres >= 0x10 )
      operator delete(i->m_strName._Bx._Ptr);
    i->m_strName._Myres = 15;
    i->m_strName._Mysize = 0;
    i->m_strName._Bx._Buf[0] = 0;
  }
}

//----- (00569C90) --------------------------------------------------------
void __cdecl std::swap<PkRealTiemRankWin::RankInfo>(PkRealTiemRankWin::RankInfo *_Left, PkRealTiemRankWin::RankInfo *_Right)
{
  unsigned int v2; // ecx@1
  unsigned int v3; // edx@1
  unsigned int v4; // eax@1
  bool v5; // cf@1
  unsigned int v6; // ecx@1
  unsigned int v7; // edx@1
  unsigned int v8; // eax@1
  PkRealTiemRankWin::RankInfo _Tmp; // [sp+Ch] [bp-3Ch]@1
  int v10; // [sp+44h] [bp-4h]@1

  _Tmp.m_strName._Myres = 15;
  _Tmp.m_strName._Mysize = 0;
  _Tmp.m_strName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_Tmp.m_strName,
    &_Left->m_strName,
    0,
    0xFFFFFFFF);
  v2 = _Left->m_unKill;
  v3 = _Left->m_unDown;
  _Tmp.m_unScore = _Left->m_unScore;
  v4 = _Left->m_unRank;
  _Tmp.m_unKill = v2;
  _Tmp.m_unDown = v3;
  _Tmp.m_unRank = v4;
  v10 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_Left->m_strName,
    &_Right->m_strName,
    0,
    0xFFFFFFFF);
  _Left->m_unScore = _Right->m_unScore;
  _Left->m_unKill = _Right->m_unKill;
  _Left->m_unDown = _Right->m_unDown;
  _Left->m_unRank = _Right->m_unRank;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_Right->m_strName,
    &_Tmp.m_strName,
    0,
    0xFFFFFFFF);
  v5 = _Tmp.m_strName._Myres < 0x10;
  v6 = _Tmp.m_unKill;
  v7 = _Tmp.m_unDown;
  _Right->m_unScore = _Tmp.m_unScore;
  v8 = _Tmp.m_unRank;
  _Right->m_unKill = v6;
  _Right->m_unDown = v7;
  _Right->m_unRank = v8;
  if ( !v5 )
    operator delete(_Tmp.m_strName._Bx._Ptr);
}

//----- (00569D80) --------------------------------------------------------
void __cdecl std::_Push_heap<PkRealTiemRankWin::RankInfo *,int,PkRealTiemRankWin::RankInfo,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &)>(PkRealTiemRankWin::RankInfo *_First, int _Hole, int _Top, PkRealTiemRankWin::RankInfo *_Val, bool (__cdecl *_Pred)(PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *))
{
  int v5; // edi@1
  int i; // ebx@1
  PkRealTiemRankWin::RankInfo *v7; // esi@2
  PkRealTiemRankWin::RankInfo *v8; // edi@3
  PkRealTiemRankWin::RankInfo *v9; // edi@4

  v5 = _Hole;
  for ( i = (_Hole - 1) / 2; _Top < v5; i = (i - 1) / 2 )
  {
    v7 = &_First[i];
    if ( !_Pred(&_First[i], _Val) )
      break;
    v8 = &_First[v5];
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v8->m_strName,
      &v7->m_strName,
      0,
      0xFFFFFFFF);
    v8->m_unScore = v7->m_unScore;
    v8->m_unKill = v7->m_unKill;
    v8->m_unDown = v7->m_unDown;
    v8->m_unRank = v7->m_unRank;
    v5 = i;
  }
  v9 = &_First[v5];
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &v9->m_strName,
    &_Val->m_strName,
    0,
    0xFFFFFFFF);
  v9->m_unScore = _Val->m_unScore;
  v9->m_unKill = _Val->m_unKill;
  v9->m_unDown = _Val->m_unDown;
  v9->m_unRank = _Val->m_unRank;
}

//----- (00569E20) --------------------------------------------------------
PkRealTiemRankWin::RankInfo *__cdecl std::_Move_backward<PkRealTiemRankWin::RankInfo *,PkRealTiemRankWin::RankInfo *>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, PkRealTiemRankWin::RankInfo *_Dest)
{
  PkRealTiemRankWin::RankInfo *v3; // edi@2
  char *v4; // esi@2
  PkRealTiemRankWin::RankInfo *result; // eax@4

  if ( _First == _Last )
  {
    result = _Dest;
  }
  else
  {
    v3 = _Dest;
    v4 = (char *)&_Last->m_unKill;
    do
    {
      v4 -= 44;
      --v3;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v3->m_strName,
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)(v4 - 32),
        0,
        0xFFFFFFFF);
      v3->m_unScore = *((_DWORD *)v4 - 1);
      v3->m_unKill = *(_DWORD *)v4;
      v3->m_unDown = *((_DWORD *)v4 + 1);
      v3->m_unRank = *((_DWORD *)v4 + 2);
    }
    while ( (PkRealTiemRankWin::RankInfo *)(v4 - 32) != _First );
    result = v3;
  }
  return result;
}

//----- (00569E80) --------------------------------------------------------
void __cdecl std::_Push_heap<PkRealTiemRankWin::RankInfo *,int,PkRealTiemRankWin::RankInfo,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(PkRealTiemRankWin::RankInfo *_First, int _Hole, int _Top, PkRealTiemRankWin::RankInfo *_Val, boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > _Pred)
{
  int v5; // edi@1
  int v6; // ebx@1
  PkRealTiemRankWin::RankInfo *v7; // esi@3
  PkRealTiemRankWin::RankInfo *v8; // edi@4
  PkRealTiemRankWin::RankInfo *v9; // esi@5
  PkRealTiemRankWin::RankInfo *v10; // edi@5
  std::exception v11; // [sp+10h] [bp-18h]@8
  int i; // [sp+24h] [bp-4h]@1

  v5 = _Hole;
  v6 = (_Hole - 1) / 2;
  for ( i = 0; _Top < v5; v6 = (v6 - 1) / 2 )
  {
    if ( !_Pred.manager )
    {
      _Hole = (int)"call to empty boost::function";
      std::exception::exception(&v11, (const char *const *)&_Hole);
      v11.vfptr = (std::exceptionVtbl *)&boost::bad_function_call::`vftable';
      LOBYTE(i) = 1;
      boost::throw_exception<boost::bad_function_call>((boost::bad_function_call *)&v11);
    }
    v7 = &_First[v6];
    if ( !(unsigned __int8)((int (__cdecl *)(void *, PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *))_Pred.invoker)(
                             _Pred.functor.obj_ptr,
                             &_First[v6],
                             _Val) )
      break;
    v8 = &_First[v5];
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v8->m_strName,
      &v7->m_strName,
      0,
      0xFFFFFFFF);
    v8->m_unScore = v7->m_unScore;
    v8->m_unKill = v7->m_unKill;
    v8->m_unDown = v7->m_unDown;
    v8->m_unRank = v7->m_unRank;
    v5 = v6;
  }
  v9 = _Val;
  v10 = &_First[v5];
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &v10->m_strName,
    &_Val->m_strName,
    0,
    0xFFFFFFFF);
  v10->m_unScore = v9->m_unScore;
  v10->m_unKill = v9->m_unKill;
  v10->m_unDown = v9->m_unDown;
  v10->m_unRank = v9->m_unRank;
  i = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}
// 98CD40: using guessed type int (__thiscall *boost::bad_function_call::`vftable')(void *p, char);

//----- (00569FB0) --------------------------------------------------------
PkRealTiemRankWin::RankInfo *__cdecl std::_Uninit_move<PkRealTiemRankWin::RankInfo *,PkRealTiemRankWin::RankInfo *,std::allocator<PkRealTiemRankWin::RankInfo>,PkRealTiemRankWin::RankInfo>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, PkRealTiemRankWin::RankInfo *_Dest)
{
  PkRealTiemRankWin::RankInfo *v3; // esi@1
  PkRealTiemRankWin::RankInfo *v4; // edi@1
  int v6; // [sp+0h] [bp-24h]@1
  PkRealTiemRankWin::RankInfo *_Next; // [sp+10h] [bp-14h]@1
  int *v8; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v8 = &v6;
  v3 = _Dest;
  v4 = _First;
  _Next = _Dest;
  v9 = 0;
  while ( v4 != _Last )
  {
    LOBYTE(v9) = 1;
    if ( v3 )
    {
      v3->m_strName._Myres = 15;
      v3->m_strName._Mysize = 0;
      v3->m_strName._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v3->m_strName,
        &v4->m_strName,
        0,
        0xFFFFFFFF);
      v3->m_unScore = v4->m_unScore;
      v3->m_unKill = v4->m_unKill;
      v3->m_unDown = v4->m_unDown;
      v3->m_unRank = v4->m_unRank;
    }
    ++v3;
    LOBYTE(v9) = 0;
    ++v4;
  }
  return v3;
}

//----- (0056A080) --------------------------------------------------------
void __cdecl std::_Adjust_heap<PkRealTiemRankWin::RankInfo *,int,PkRealTiemRankWin::RankInfo,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &)>(PkRealTiemRankWin::RankInfo *_First, int _Hole, int _Bottom, PkRealTiemRankWin::RankInfo *_Val, bool (__cdecl *_Pred)(PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *))
{
  int v5; // ebx@1
  int v6; // edi@1
  int v7; // esi@1
  bool v8; // zf@1
  PkRealTiemRankWin::RankInfo *v9; // ebx@4
  PkRealTiemRankWin::RankInfo *v10; // edi@4
  PkRealTiemRankWin::RankInfo *v11; // esi@7
  PkRealTiemRankWin::RankInfo *v12; // ebx@7

  v5 = _Hole;
  v6 = _Bottom;
  v7 = 2 * _Hole + 2;
  v8 = v7 == _Bottom;
  if ( v7 < _Bottom )
  {
    do
    {
      if ( _Pred(&_First[v7], &_First[v7 - 1]) )
        --v7;
      v9 = &_First[v5];
      v10 = &_First[v7];
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v9->m_strName,
        &v10->m_strName,
        0,
        0xFFFFFFFF);
      v9->m_unScore = v10->m_unScore;
      v9->m_unKill = v10->m_unKill;
      v9->m_unDown = v10->m_unDown;
      v9->m_unRank = v10->m_unRank;
      v5 = v7;
      v7 = 2 * v7 + 2;
    }
    while ( v7 < _Bottom );
    v6 = _Bottom;
    v8 = v7 == _Bottom;
  }
  if ( v8 )
  {
    v11 = &_First[v6 - 1];
    v12 = &_First[v5];
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v12->m_strName,
      &v11->m_strName,
      0,
      0xFFFFFFFF);
    v12->m_unScore = v11->m_unScore;
    v12->m_unKill = v11->m_unKill;
    v12->m_unDown = v11->m_unDown;
    v12->m_unRank = v11->m_unRank;
    v5 = v6 - 1;
  }
  std::_Push_heap<PkRealTiemRankWin::RankInfo *,int,PkRealTiemRankWin::RankInfo,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &)>(
    _First,
    v5,
    _Hole,
    _Val,
    _Pred);
}

//----- (0056A150) --------------------------------------------------------
void __cdecl std::_Med3<PkRealTiemRankWin::RankInfo *,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Mid, PkRealTiemRankWin::RankInfo *_Last, boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > _Pred)
{
  std::exception v4; // [sp+10h] [bp-1Ch]@2
  char *_What; // [sp+1Ch] [bp-10h]@2
  int v6; // [sp+28h] [bp-4h]@1

  v6 = 0;
  if ( !_Pred.manager )
  {
    _What = "call to empty boost::function";
    std::exception::exception(&v4, (const char *const *)&_What);
    v4.vfptr = (std::exceptionVtbl *)&boost::bad_function_call::`vftable';
    LOBYTE(v6) = 1;
    boost::throw_exception<boost::bad_function_call>((boost::bad_function_call *)&v4);
  }
  if ( (unsigned __int8)((int (__cdecl *)(void *, PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *))_Pred.invoker)(
                          _Pred.functor.obj_ptr,
                          _Mid,
                          _First) )
    std::swap<PkRealTiemRankWin::RankInfo>(_Mid, _First);
  if ( !_Pred.manager )
  {
    _What = "call to empty boost::function";
    std::exception::exception(&v4, (const char *const *)&_What);
    v4.vfptr = (std::exceptionVtbl *)&boost::bad_function_call::`vftable';
    LOBYTE(v6) = 2;
    boost::throw_exception<boost::bad_function_call>((boost::bad_function_call *)&v4);
  }
  if ( (unsigned __int8)((int (__cdecl *)(void *, PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *))_Pred.invoker)(
                          _Pred.functor.obj_ptr,
                          _Last,
                          _Mid) )
    std::swap<PkRealTiemRankWin::RankInfo>(_Last, _Mid);
  if ( !_Pred.manager )
  {
    _What = "call to empty boost::function";
    std::exception::exception(&v4, (const char *const *)&_What);
    v4.vfptr = (std::exceptionVtbl *)&boost::bad_function_call::`vftable';
    LOBYTE(v6) = 3;
    boost::throw_exception<boost::bad_function_call>((boost::bad_function_call *)&v4);
  }
  if ( (unsigned __int8)((int (__cdecl *)(_DWORD, _DWORD, _DWORD))_Pred.invoker)(_Pred.functor.obj_ptr, _Mid, _First) )
    std::swap<PkRealTiemRankWin::RankInfo>(_Mid, _First);
  v6 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}
// 98CD40: using guessed type int (__thiscall *boost::bad_function_call::`vftable')(void *p, char);

//----- (0056A290) --------------------------------------------------------
void __cdecl std::_Adjust_heap<PkRealTiemRankWin::RankInfo *,int,PkRealTiemRankWin::RankInfo,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(PkRealTiemRankWin::RankInfo *_First, int _Hole, int _Bottom, PkRealTiemRankWin::RankInfo *_Val, boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > _Pred)
{
  int v5; // ebx@1
  int v6; // edi@1
  int v7; // esi@1
  bool v8; // zf@1
  PkRealTiemRankWin::RankInfo *v9; // ebx@5
  PkRealTiemRankWin::RankInfo *v10; // edi@5
  PkRealTiemRankWin::RankInfo *v11; // esi@8
  PkRealTiemRankWin::RankInfo *v12; // ebx@8
  boost::detail::function::any_pointer (__cdecl *v13)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp-Ch] [bp-38h]@9
  int v14; // [sp-8h] [bp-34h]@9
  bool (__cdecl *v15)(boost::detail::function::any_pointer, PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *); // [sp-4h] [bp-30h]@9
  std::exception v16; // [sp+10h] [bp-1Ch]@14
  int _Top; // [sp+1Ch] [bp-10h]@1
  int v18; // [sp+28h] [bp-4h]@1

  v5 = _Hole;
  v6 = _Bottom;
  v7 = 2 * _Hole + 2;
  v18 = 0;
  _Top = _Hole;
  v8 = v7 == _Bottom;
  if ( v7 < _Bottom )
  {
    do
    {
      if ( !_Pred.manager )
      {
        _Hole = (int)"call to empty boost::function";
        std::exception::exception(&v16, (const char *const *)&_Hole);
        v16.vfptr = (std::exceptionVtbl *)&boost::bad_function_call::`vftable';
        LOBYTE(v18) = 1;
        boost::throw_exception<boost::bad_function_call>((boost::bad_function_call *)&v16);
      }
      if ( (unsigned __int8)((int (__cdecl *)(void *, PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *))_Pred.invoker)(
                              _Pred.functor.obj_ptr,
                              &_First[v7],
                              &_First[v7 - 1]) )
        --v7;
      v9 = &_First[v5];
      v10 = &_First[v7];
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v9->m_strName,
        &v10->m_strName,
        0,
        0xFFFFFFFF);
      v9->m_unScore = v10->m_unScore;
      v9->m_unKill = v10->m_unKill;
      v9->m_unDown = v10->m_unDown;
      v9->m_unRank = v10->m_unRank;
      v5 = v7;
      v7 = 2 * v7 + 2;
    }
    while ( v7 < _Bottom );
    v6 = _Bottom;
    v8 = v7 == _Bottom;
  }
  if ( v8 )
  {
    v11 = &_First[v6 - 1];
    v12 = &_First[v5];
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v12->m_strName,
      &v11->m_strName,
      0,
      0xFFFFFFFF);
    v12->m_unScore = v11->m_unScore;
    v12->m_unKill = v11->m_unKill;
    v12->m_unDown = v11->m_unDown;
    v12->m_unRank = v11->m_unRank;
    v5 = v6 - 1;
  }
  v13 = 0;
  v14 = 0;
  v15 = 0;
  _Bottom = (int)&v13;
  if ( _Pred.manager )
  {
    v15 = _Pred.invoker;
    v13 = _Pred.manager;
    v14 = ((int (__cdecl *)(void *, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
  }
  std::_Push_heap<PkRealTiemRankWin::RankInfo *,int,PkRealTiemRankWin::RankInfo,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(
    _First,
    v5,
    _Top,
    _Val,
    *(boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > *)&v13);
  v18 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}
// 98CD40: using guessed type int (__thiscall *boost::bad_function_call::`vftable')(void *p, char);

//----- (0056A410) --------------------------------------------------------
void __cdecl std::_Pop_heap<PkRealTiemRankWin::RankInfo *,int,PkRealTiemRankWin::RankInfo,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, PkRealTiemRankWin::RankInfo *_Dest, PkRealTiemRankWin::RankInfo *_Val, boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > _Pred)
{
  boost::detail::function::any_pointer (__cdecl *v5)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp-Ch] [bp-24h]@1
  int v6; // [sp-8h] [bp-20h]@1
  bool (__cdecl *v7)(boost::detail::function::any_pointer, PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *); // [sp-4h] [bp-1Ch]@1
  int v8; // [sp+14h] [bp-4h]@1

  v8 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_Dest->m_strName,
    &_First->m_strName,
    0,
    0xFFFFFFFF);
  _Dest->m_unScore = _First->m_unScore;
  _Dest->m_unKill = _First->m_unKill;
  _Dest->m_unDown = _First->m_unDown;
  _Dest->m_unRank = _First->m_unRank;
  v5 = 0;
  v6 = 0;
  v7 = 0;
  if ( _Pred.manager )
  {
    v7 = _Pred.invoker;
    v5 = _Pred.manager;
    v6 = ((int (__cdecl *)(void *, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
  }
  std::_Adjust_heap<PkRealTiemRankWin::RankInfo *,int,PkRealTiemRankWin::RankInfo,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(
    _First,
    0,
    _Last - _First,
    _Val,
    *(boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > *)&v5);
  v8 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}

//----- (0056A500) --------------------------------------------------------
void __cdecl std::_Median<PkRealTiemRankWin::RankInfo *,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &)>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Mid, PkRealTiemRankWin::RankInfo *_Last, bool (__cdecl *_Pred)(PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *))
{
  signed int v4; // eax@1
  int v5; // eax@2
  unsigned int v6; // edi@2
  PkRealTiemRankWin::RankInfo *v7; // eax@14
  PkRealTiemRankWin::RankInfo *v8; // edi@14
  int v9; // [sp+Ch] [bp-8h]@2
  PkRealTiemRankWin::RankInfo *_Left; // [sp+10h] [bp-4h]@2
  PkRealTiemRankWin::RankInfo *_Firsta; // [sp+1Ch] [bp+8h]@8
  PkRealTiemRankWin::RankInfo *_Firstb; // [sp+1Ch] [bp+8h]@14

  v4 = _Last - _First;
  if ( v4 <= 40 )
  {
    if ( _Pred(_Mid, _First) )
      std::swap<PkRealTiemRankWin::RankInfo>(_Mid, _First);
    if ( _Pred(_Last, _Mid) )
      std::swap<PkRealTiemRankWin::RankInfo>(_Last, _Mid);
    if ( _Pred(_Mid, _First) )
      std::swap<PkRealTiemRankWin::RankInfo>(_Mid, _First);
  }
  else
  {
    v5 = (v4 + 1) / 8;
    v6 = 44 * v5;
    v9 = 2 * v5;
    _Left = &_First[v5];
    if ( _Pred(_Left, _First) )
      std::swap<PkRealTiemRankWin::RankInfo>(_Left, _First);
    if ( _Pred(&_First[v9], _Left) )
      std::swap<PkRealTiemRankWin::RankInfo>(&_First[v9], _Left);
    if ( _Pred(_Left, _First) )
      std::swap<PkRealTiemRankWin::RankInfo>(_Left, _First);
    _Firsta = &_Mid[-v6 / 0x2C];
    if ( _Pred(_Mid, &_Mid[-v6 / 0x2C]) )
      std::swap<PkRealTiemRankWin::RankInfo>(_Mid, _Firsta);
    if ( _Pred(&_Mid[v6 / 0x2C], _Mid) )
      std::swap<PkRealTiemRankWin::RankInfo>(&_Mid[v6 / 0x2C], _Mid);
    if ( _Pred(_Mid, _Firsta) )
      std::swap<PkRealTiemRankWin::RankInfo>(_Mid, _Firsta);
    v7 = &_Last[-v6 / 0x2C];
    v8 = &_Last[-(v9 * 44) / 0x2Cu];
    _Firstb = v7;
    if ( _Pred(v7, &_Last[-(v9 * 44) / 0x2Cu]) )
      std::swap<PkRealTiemRankWin::RankInfo>(_Firstb, v8);
    if ( _Pred(_Last, _Firstb) )
      std::swap<PkRealTiemRankWin::RankInfo>(_Last, _Firstb);
    if ( _Pred(_Firstb, v8) )
      std::swap<PkRealTiemRankWin::RankInfo>(_Firstb, v8);
    if ( _Pred(_Mid, _Left) )
      std::swap<PkRealTiemRankWin::RankInfo>(_Mid, _Left);
    if ( _Pred(_Firstb, _Mid) )
      std::swap<PkRealTiemRankWin::RankInfo>(_Firstb, _Mid);
    if ( _Pred(_Mid, _Left) )
      std::swap<PkRealTiemRankWin::RankInfo>(_Mid, _Left);
  }
}

//----- (0056A700) --------------------------------------------------------
void __cdecl std::_Make_heap<PkRealTiemRankWin::RankInfo *,int,PkRealTiemRankWin::RankInfo,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &)>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, bool (__cdecl *_Pred)(PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *))
{
  int v3; // edi@1
  char *v4; // esi@2
  unsigned int v5; // eax@3
  unsigned int v6; // ecx@3
  unsigned int v7; // edx@3
  PkRealTiemRankWin::RankInfo _Val; // [sp+18h] [bp-3Ch]@3
  int v9; // [sp+50h] [bp-4h]@3

  v3 = (_Last - _First) / 2;
  if ( v3 > 0 )
  {
    v4 = (char *)&_First[v3].m_unKill;
    do
    {
      v4 -= 44;
      --v3;
      _Val.m_strName._Myres = 15;
      _Val.m_strName._Mysize = 0;
      _Val.m_strName._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &_Val.m_strName,
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)(v4 - 32),
        0,
        0xFFFFFFFF);
      v5 = *(_DWORD *)v4;
      v6 = *((_DWORD *)v4 + 1);
      _Val.m_unScore = *((_DWORD *)v4 - 1);
      v7 = *((_DWORD *)v4 + 2);
      _Val.m_unKill = v5;
      _Val.m_unDown = v6;
      _Val.m_unRank = v7;
      v9 = 0;
      std::_Adjust_heap<PkRealTiemRankWin::RankInfo *,int,PkRealTiemRankWin::RankInfo,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &)>(
        _First,
        v3,
        _Last - _First,
        &_Val,
        _Pred);
      v9 = -1;
      if ( _Val.m_strName._Myres >= 0x10 )
        operator delete(_Val.m_strName._Bx._Ptr);
    }
    while ( v3 > 0 );
  }
}

//----- (0056A800) --------------------------------------------------------
void __cdecl std::_Insertion_sort1<PkRealTiemRankWin::RankInfo *,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),PkRealTiemRankWin::RankInfo>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, bool (__cdecl *_Pred)(PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *))
{
  PkRealTiemRankWin::RankInfo *v3; // esi@1
  PkRealTiemRankWin::RankInfo *i; // ebx@2
  PkRealTiemRankWin::RankInfo *v5; // edi@3
  unsigned int v6; // edx@3
  unsigned int v7; // eax@3
  unsigned int v8; // ecx@3
  unsigned int v9; // ecx@4
  unsigned int v10; // edx@4
  unsigned int v11; // eax@4
  int j; // esi@5
  unsigned int v13; // eax@7
  unsigned int v14; // ecx@7
  unsigned int v15; // edx@7
  PkRealTiemRankWin::RankInfo _Val; // [sp+18h] [bp-3Ch]@3
  int v17; // [sp+50h] [bp-4h]@3

  v3 = _First;
  if ( _First != _Last )
  {
    for ( i = _First + 1; i != _Last; ++i )
    {
      v5 = i;
      _Val.m_strName._Myres = 15;
      _Val.m_strName._Mysize = 0;
      _Val.m_strName._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &_Val.m_strName,
        &i->m_strName,
        0,
        0xFFFFFFFF);
      v6 = i->m_unKill;
      v7 = i->m_unDown;
      _Val.m_unScore = i->m_unScore;
      v8 = i->m_unRank;
      _Val.m_unKill = v6;
      _Val.m_unDown = v7;
      _Val.m_unRank = v8;
      v17 = 0;
      if ( _Pred(&_Val, v3) )
      {
        std::_Move_backward<PkRealTiemRankWin::RankInfo *,PkRealTiemRankWin::RankInfo *>(v3, i, i + 1);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &v3->m_strName,
          &_Val.m_strName,
          0,
          0xFFFFFFFF);
        v9 = _Val.m_unKill;
        v10 = _Val.m_unDown;
        v3->m_unScore = _Val.m_unScore;
        v11 = _Val.m_unRank;
        v3->m_unKill = v9;
        v3->m_unDown = v10;
        v3->m_unRank = v11;
      }
      else
      {
        for ( j = (int)&i[-1]; _Pred(&_Val, (PkRealTiemRankWin::RankInfo *)j); j -= 44 )
        {
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
            &v5->m_strName,
            (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)j,
            0,
            0xFFFFFFFF);
          v5->m_unScore = *(_DWORD *)(j + 28);
          v5->m_unKill = *(_DWORD *)(j + 32);
          v5->m_unDown = *(_DWORD *)(j + 36);
          v5->m_unRank = *(_DWORD *)(j + 40);
          v5 = (PkRealTiemRankWin::RankInfo *)j;
        }
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &v5->m_strName,
          &_Val.m_strName,
          0,
          0xFFFFFFFF);
        v13 = _Val.m_unKill;
        v14 = _Val.m_unDown;
        v3 = _First;
        v5->m_unScore = _Val.m_unScore;
        v15 = _Val.m_unRank;
        v5->m_unKill = v13;
        v5->m_unDown = v14;
        v5->m_unRank = v15;
      }
      v17 = -1;
      if ( _Val.m_strName._Myres >= 0x10 )
        operator delete(_Val.m_strName._Bx._Ptr);
    }
  }
}

//----- (0056A9A0) --------------------------------------------------------
#error "56AB65: positive sp value has been found (funcsize=180)"

//----- (0056AB70) --------------------------------------------------------
void __cdecl std::_Make_heap<PkRealTiemRankWin::RankInfo *,int,PkRealTiemRankWin::RankInfo,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > _Pred)
{
  int v3; // ebx@1
  char *v4; // esi@2
  unsigned int v5; // eax@3
  unsigned int v6; // ecx@3
  unsigned int v7; // edx@3
  boost::detail::function::any_pointer (__cdecl *v8)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp-Ch] [bp-64h]@3
  int v9; // [sp-8h] [bp-60h]@3
  bool (__cdecl *v10)(boost::detail::function::any_pointer, PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *); // [sp-4h] [bp-5Ch]@3
  boost::detail::function::any_pointer (__cdecl **v11)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp+10h] [bp-48h]@3
  int _Bottom; // [sp+14h] [bp-44h]@1
  PkRealTiemRankWin::RankInfo *v13; // [sp+18h] [bp-40h]@1
  PkRealTiemRankWin::RankInfo _Val; // [sp+1Ch] [bp-3Ch]@3
  int v15; // [sp+54h] [bp-4h]@1

  v13 = _First;
  _Bottom = _Last - _First;
  v3 = _Bottom / 2;
  v15 = 0;
  if ( _Bottom / 2 > 0 )
  {
    v4 = (char *)&_First[v3].m_unKill;
    do
    {
      v4 -= 44;
      --v3;
      _Val.m_strName._Myres = 15;
      _Val.m_strName._Mysize = 0;
      _Val.m_strName._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &_Val.m_strName,
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)(v4 - 32),
        0,
        0xFFFFFFFF);
      v5 = *(_DWORD *)v4;
      v6 = *((_DWORD *)v4 + 1);
      _Val.m_unScore = *((_DWORD *)v4 - 1);
      v7 = *((_DWORD *)v4 + 2);
      _Val.m_unKill = v5;
      _Val.m_unDown = v6;
      _Val.m_unRank = v7;
      v8 = 0;
      v9 = 0;
      v10 = 0;
      LOBYTE(v15) = 1;
      v11 = &v8;
      if ( _Pred.manager )
      {
        v10 = _Pred.invoker;
        v8 = _Pred.manager;
        v9 = ((int (__cdecl *)(void *, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
      }
      std::_Adjust_heap<PkRealTiemRankWin::RankInfo *,int,PkRealTiemRankWin::RankInfo,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(
        v13,
        v3,
        _Bottom,
        &_Val,
        *(boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > *)&v8);
      LOBYTE(v15) = 0;
      if ( _Val.m_strName._Myres >= 0x10 )
        operator delete(_Val.m_strName._Bx._Ptr);
      _Val.m_strName._Myres = 15;
      _Val.m_strName._Mysize = 0;
      _Val.m_strName._Bx._Buf[0] = 0;
    }
    while ( v3 > 0 );
  }
  v15 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}

//----- (0056ACD0) --------------------------------------------------------
void __cdecl std::_Insertion_sort1<PkRealTiemRankWin::RankInfo *,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>,PkRealTiemRankWin::RankInfo>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > _Pred)
{
  PkRealTiemRankWin::RankInfo *v3; // edi@1
  PkRealTiemRankWin::RankInfo *i; // ebx@2
  int v5; // esi@3
  unsigned int v6; // ecx@3
  unsigned int v7; // edx@3
  unsigned int v8; // eax@3
  unsigned int v9; // ecx@5
  unsigned int v10; // edx@5
  unsigned int v11; // eax@5
  int j; // edi@6
  unsigned int v13; // eax@10
  unsigned int v14; // ecx@10
  unsigned int v15; // edx@10
  std::exception v16; // [sp+10h] [bp-60h]@19
  std::exception v17; // [sp+1Ch] [bp-54h]@17
  PkRealTiemRankWin::RankInfo *v18; // [sp+28h] [bp-48h]@1
  char *_What; // [sp+2Ch] [bp-44h]@17
  char *v20; // [sp+30h] [bp-40h]@19
  PkRealTiemRankWin::RankInfo _Val; // [sp+34h] [bp-3Ch]@3
  int v22; // [sp+6Ch] [bp-4h]@1

  v3 = _First;
  v18 = _First;
  v22 = 0;
  if ( _First != _Last )
  {
    for ( i = _First + 1; i != _Last; _Val.m_strName._Bx._Buf[0] = 0 )
    {
      v5 = (int)i;
      _Val.m_strName._Myres = 15;
      _Val.m_strName._Mysize = 0;
      _Val.m_strName._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &_Val.m_strName,
        &i->m_strName,
        0,
        0xFFFFFFFF);
      v6 = i->m_unKill;
      v7 = i->m_unDown;
      _Val.m_unScore = i->m_unScore;
      v8 = i->m_unRank;
      _Val.m_unKill = v6;
      _Val.m_unDown = v7;
      _Val.m_unRank = v8;
      LOBYTE(v22) = 1;
      if ( !_Pred.manager )
      {
        _What = "call to empty boost::function";
        std::exception::exception(&v17, (const char *const *)&_What);
        v17.vfptr = (std::exceptionVtbl *)&boost::bad_function_call::`vftable';
        LOBYTE(v22) = 2;
        boost::throw_exception<boost::bad_function_call>((boost::bad_function_call *)&v17);
      }
      if ( (unsigned __int8)((int (__cdecl *)(void *, PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *))_Pred.invoker)(
                              _Pred.functor.obj_ptr,
                              &_Val,
                              v3) )
      {
        std::_Move_backward<PkRealTiemRankWin::RankInfo *,PkRealTiemRankWin::RankInfo *>(v3, i, i + 1);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &v3->m_strName,
          &_Val.m_strName,
          0,
          0xFFFFFFFF);
        v9 = _Val.m_unKill;
        v10 = _Val.m_unDown;
        v3->m_unScore = _Val.m_unScore;
        v11 = _Val.m_unRank;
        v3->m_unKill = v9;
        v3->m_unDown = v10;
        v3->m_unRank = v11;
      }
      else
      {
        for ( j = (int)&i->m_unKill; ; v5 = j - 32 )
        {
          j -= 44;
          if ( !_Pred.manager )
          {
            v20 = "call to empty boost::function";
            std::exception::exception(&v16, (const char *const *)&v20);
            v16.vfptr = (std::exceptionVtbl *)&boost::bad_function_call::`vftable';
            LOBYTE(v22) = 3;
            boost::throw_exception<boost::bad_function_call>((boost::bad_function_call *)&v16);
          }
          if ( !(unsigned __int8)((int (__cdecl *)(void *, PkRealTiemRankWin::RankInfo *, int))_Pred.invoker)(
                                   _Pred.functor.obj_ptr,
                                   &_Val,
                                   j - 32) )
            break;
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
            (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v5,
            (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)(j - 32),
            0,
            0xFFFFFFFF);
          *(_DWORD *)(v5 + 28) = *(_DWORD *)(j - 4);
          *(_DWORD *)(v5 + 32) = *(_DWORD *)j;
          *(_DWORD *)(v5 + 36) = *(_DWORD *)(j + 4);
          *(_DWORD *)(v5 + 40) = *(_DWORD *)(j + 8);
        }
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v5,
          &_Val.m_strName,
          0,
          0xFFFFFFFF);
        v13 = _Val.m_unKill;
        v14 = _Val.m_unDown;
        v3 = v18;
        *(_DWORD *)(v5 + 28) = _Val.m_unScore;
        v15 = _Val.m_unRank;
        *(_DWORD *)(v5 + 32) = v13;
        *(_DWORD *)(v5 + 36) = v14;
        *(_DWORD *)(v5 + 40) = v15;
      }
      LOBYTE(v22) = 0;
      if ( _Val.m_strName._Myres >= 0x10 )
        operator delete(_Val.m_strName._Bx._Ptr);
      ++i;
      _Val.m_strName._Myres = 15;
      _Val.m_strName._Mysize = 0;
    }
  }
  v22 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}
// 98CD40: using guessed type int (__thiscall *boost::bad_function_call::`vftable')(void *p, char);

//----- (0056AEF0) --------------------------------------------------------
void __cdecl std::_Pop_heap_0<PkRealTiemRankWin::RankInfo *,PkRealTiemRankWin::RankInfo,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &)>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, bool (__cdecl *_Pred)(PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *))
{
  PkRealTiemRankWin::RankInfo *v3; // esi@1
  unsigned int v4; // edx@1
  unsigned int v5; // eax@1
  unsigned int v6; // ecx@1
  PkRealTiemRankWin::RankInfo _Val; // [sp+14h] [bp-3Ch]@1
  int v8; // [sp+4Ch] [bp-4h]@1

  v3 = _Last - 1;
  _Val.m_strName._Myres = 15;
  _Val.m_strName._Mysize = 0;
  _Val.m_strName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_Val.m_strName,
    &_Last[-1].m_strName,
    0,
    0xFFFFFFFF);
  v4 = _Last[-1].m_unKill;
  v5 = _Last[-1].m_unDown;
  _Val.m_unScore = _Last[-1].m_unScore;
  v6 = _Last[-1].m_unRank;
  _Val.m_unKill = v4;
  _Val.m_unDown = v5;
  _Val.m_unRank = v6;
  v8 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_Last[-1].m_strName,
    &_First->m_strName,
    0,
    0xFFFFFFFF);
  v3->m_unScore = _First->m_unScore;
  v3->m_unKill = _First->m_unKill;
  v3->m_unDown = _First->m_unDown;
  v3->m_unRank = _First->m_unRank;
  std::_Adjust_heap<PkRealTiemRankWin::RankInfo *,int,PkRealTiemRankWin::RankInfo,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &)>(
    _First,
    0,
    ((char *)_Last - (char *)_First - 44) / 44,
    &_Val,
    _Pred);
  if ( _Val.m_strName._Myres >= 0x10 )
    operator delete(_Val.m_strName._Bx._Ptr);
}

//----- (0056AFF0) --------------------------------------------------------
void __cdecl std::_Pop_heap_0<PkRealTiemRankWin::RankInfo *,PkRealTiemRankWin::RankInfo,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > _Pred)
{
  unsigned int v3; // edx@1
  unsigned int v4; // eax@1
  unsigned int v5; // ecx@1
  boost::detail::function::any_pointer (__cdecl *v6)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp-10h] [bp-64h]@1
  int v7; // [sp-Ch] [bp-60h]@1
  bool (__cdecl *v8)(boost::detail::function::any_pointer, PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *); // [sp-8h] [bp-5Ch]@1
  int v9; // [sp-4h] [bp-58h]@1
  boost::detail::function::any_pointer (__cdecl **v10)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp+10h] [bp-44h]@1
  PkRealTiemRankWin::RankInfo *v11; // [sp+14h] [bp-40h]@1
  PkRealTiemRankWin::RankInfo _Val; // [sp+18h] [bp-3Ch]@1
  int v13; // [sp+50h] [bp-4h]@1

  v11 = _First;
  v13 = 0;
  _Val.m_strName._Myres = 15;
  _Val.m_strName._Mysize = 0;
  _Val.m_strName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_Val.m_strName,
    &_Last[-1].m_strName,
    0,
    0xFFFFFFFF);
  v3 = _Last[-1].m_unKill;
  v4 = _Last[-1].m_unDown;
  _Val.m_unScore = _Last[-1].m_unScore;
  v5 = _Last[-1].m_unRank;
  _Val.m_unKill = v3;
  _Val.m_unDown = v4;
  _Val.m_unRank = v5;
  v9 = 0;
  v6 = 0;
  v7 = 0;
  v8 = 0;
  LOBYTE(v13) = 1;
  v10 = &v6;
  if ( _Pred.manager )
  {
    v8 = _Pred.invoker;
    v6 = _Pred.manager;
    v7 = ((int (__cdecl *)(void *, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
  }
  std::_Pop_heap<PkRealTiemRankWin::RankInfo *,int,PkRealTiemRankWin::RankInfo,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(
    v11,
    _Last - 1,
    _Last - 1,
    &_Val,
    *(boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > *)&v6);
  if ( _Val.m_strName._Myres >= 0x10 )
    operator delete(_Val.m_strName._Bx._Ptr);
  _Val.m_strName._Myres = 15;
  _Val.m_strName._Mysize = 0;
  _Val.m_strName._Bx._Buf[0] = 0;
  v13 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}

//----- (0056B100) --------------------------------------------------------
std::pair<PkRealTiemRankWin::RankInfo *,PkRealTiemRankWin::RankInfo *> *__cdecl std::_Unguarded_partition<PkRealTiemRankWin::RankInfo *,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &)>(std::pair<PkRealTiemRankWin::RankInfo *,PkRealTiemRankWin::RankInfo *> *result, PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, bool (__cdecl *_Pred)(PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *))
{
  PkRealTiemRankWin::RankInfo *v4; // esi@1
  PkRealTiemRankWin::RankInfo *v5; // ebx@1
  unsigned int v6; // eax@10
  PkRealTiemRankWin::RankInfo *v7; // edi@10
  PkRealTiemRankWin::RankInfo *v8; // ST08_4@14
  bool v9; // zf@17
  PkRealTiemRankWin::RankInfo *v10; // ebx@18
  PkRealTiemRankWin::RankInfo *v11; // ST0C_4@28
  PkRealTiemRankWin::RankInfo *v12; // ST08_4@28
  PkRealTiemRankWin::RankInfo *v13; // eax@29
  std::pair<PkRealTiemRankWin::RankInfo *,PkRealTiemRankWin::RankInfo *> *v14; // eax@34
  PkRealTiemRankWin::RankInfo *_Plast; // [sp+Ch] [bp-8h]@1
  PkRealTiemRankWin::RankInfo *_Glast; // [sp+10h] [bp-4h]@2
  PkRealTiemRankWin::RankInfo *_Glasta; // [sp+10h] [bp-4h]@10

  v4 = &_First[(_Last - _First) / 2];
  std::_Median<PkRealTiemRankWin::RankInfo *,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &)>(
    _First,
    &_First[(_Last - _First) / 2],
    _Last - 1,
    _Pred);
  v5 = v4 + 1;
  _Plast = v4 + 1;
  if ( _First < v4 )
  {
    do
    {
      _Glast = v4 - 1;
      if ( _Pred(v4 - 1, v4) )
        break;
      if ( _Pred(v4, _Glast) )
        break;
      --v4;
    }
    while ( _First < _Glast );
  }
  if ( v5 < _Last )
  {
    do
    {
      if ( _Pred(v5, v4) )
        break;
      if ( _Pred(v4, v5) )
        break;
      ++v5;
    }
    while ( v5 < _Last );
    _Plast = v5;
  }
  v6 = (unsigned int)v4;
  v7 = v5;
  for ( _Glasta = v4; ; v6 = (unsigned int)_Glasta )
  {
    while ( 1 )
    {
      if ( v7 < _Last )
      {
        do
        {
          if ( !_Pred(v4, v7) )
          {
            if ( _Pred(v7, v4) )
              break;
            v8 = v5;
            ++v5;
            std::swap<PkRealTiemRankWin::RankInfo>(v8, v7);
          }
          ++v7;
        }
        while ( v7 < _Last );
        v6 = (unsigned int)_Glasta;
        _Plast = v5;
      }
      v9 = v6 == (_DWORD)_First;
      if ( v6 > (unsigned int)_First )
      {
        v10 = (PkRealTiemRankWin::RankInfo *)(v6 - 44);
        do
        {
          if ( !_Pred(v10, v4) )
          {
            if ( _Pred(v4, v10) )
              break;
            --v4;
            std::swap<PkRealTiemRankWin::RankInfo>(v4, v10);
          }
          --v10;
          --_Glasta;
        }
        while ( _First < _Glasta );
        v6 = (unsigned int)_Glasta;
        v5 = _Plast;
        v9 = _Glasta == _First;
      }
      if ( v9 )
        break;
      v13 = (PkRealTiemRankWin::RankInfo *)(v6 - 44);
      _Glasta = v13;
      if ( v7 == _Last )
      {
        --v4;
        if ( v13 != v4 )
          std::swap<PkRealTiemRankWin::RankInfo>(v13, v4);
        --v5;
        _Plast = v5;
        std::swap<PkRealTiemRankWin::RankInfo>(v4, v5);
        v6 = (unsigned int)_Glasta;
      }
      else
      {
        std::swap<PkRealTiemRankWin::RankInfo>(v7, v13);
        v6 = (unsigned int)_Glasta;
        ++v7;
      }
    }
    if ( v7 == _Last )
      break;
    if ( v5 != v7 )
      std::swap<PkRealTiemRankWin::RankInfo>(v4, v5);
    v11 = v7;
    ++v5;
    v12 = v4;
    _Plast = v5;
    ++v4;
    ++v7;
    std::swap<PkRealTiemRankWin::RankInfo>(v12, v11);
  }
  v14 = result;
  result->first = v4;
  result->second = v5;
  return v14;
}

//----- (0056B2C0) --------------------------------------------------------
#error "56B69A: positive sp value has been found (funcsize=332)"

//----- (0056B6A0) --------------------------------------------------------
void __cdecl std::make_heap<PkRealTiemRankWin::RankInfo *,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > _Pred)
{
  boost::detail::function::any_pointer (__cdecl *v3)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp-14h] [bp-30h]@2
  int v4; // [sp-10h] [bp-2Ch]@2
  bool (__cdecl *v5)(boost::detail::function::any_pointer, PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *); // [sp-Ch] [bp-28h]@2
  int v6; // [sp-8h] [bp-24h]@2
  int v7; // [sp-4h] [bp-20h]@2
  int v8; // [sp+18h] [bp-4h]@1

  v8 = 0;
  if ( _Last - _First > 1 )
  {
    v7 = 0;
    v6 = 0;
    v3 = 0;
    v4 = 0;
    v5 = 0;
    if ( _Pred.manager )
    {
      v5 = _Pred.invoker;
      v3 = _Pred.manager;
      v4 = ((int (__cdecl *)(void *, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
    }
    std::_Make_heap<PkRealTiemRankWin::RankInfo *,int,PkRealTiemRankWin::RankInfo,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(
      _First,
      _Last,
      *(boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > *)&v3);
  }
  v8 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}

//----- (0056B760) --------------------------------------------------------
void __cdecl std::_Insertion_sort<PkRealTiemRankWin::RankInfo *,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > _Pred)
{
  boost::detail::function::any_pointer (__cdecl *v3)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp-10h] [bp-28h]@1
  int v4; // [sp-Ch] [bp-24h]@1
  bool (__cdecl *v5)(boost::detail::function::any_pointer, PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *); // [sp-8h] [bp-20h]@1
  int v6; // [sp-4h] [bp-1Ch]@1
  boost::detail::function::any_pointer (__cdecl **v7)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp+8h] [bp-10h]@1
  int v8; // [sp+14h] [bp-4h]@1

  v6 = 0;
  v3 = 0;
  v4 = 0;
  v5 = 0;
  v8 = 0;
  v7 = &v3;
  if ( _Pred.manager )
  {
    v5 = _Pred.invoker;
    v3 = _Pred.manager;
    v4 = ((int (__cdecl *)(void *, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
  }
  std::_Insertion_sort1<PkRealTiemRankWin::RankInfo *,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>,PkRealTiemRankWin::RankInfo>(
    _First,
    _Last,
    *(boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > *)&v3);
  v8 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}

//----- (0056B810) --------------------------------------------------------
void __thiscall std::vector<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo>>::~vector<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo>>(std::vector<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo> > *this)
{
  std::vector<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo> > *v1; // esi@1

  v1 = this;
  if ( this->_Myfirst )
  {
    std::_Destroy_range<std::allocator<PkRealTiemRankWin::RankInfo>>(this->_Myfirst, this->_Mylast);
    operator delete(v1->_Myfirst);
  }
  v1->_Myfirst = 0;
  v1->_Mylast = 0;
  v1->_Myend = 0;
}

//----- (0056B860) --------------------------------------------------------
void __thiscall std::vector<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo>>::reserve(std::vector<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo> > *this, unsigned int _Count)
{
  std::vector<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo> > *v2; // esi@1
  PkRealTiemRankWin::RankInfo *v3; // eax@4
  PkRealTiemRankWin::RankInfo *v4; // ST04_4@4
  PkRealTiemRankWin::RankInfo *v5; // ST00_4@4
  unsigned int v6; // edx@4
  int v7; // edi@4
  PkRealTiemRankWin::RankInfo *v8; // ecx@6
  PkRealTiemRankWin::RankInfo *v9; // edi@6
  int v10; // [sp+0h] [bp-24h]@1
  PkRealTiemRankWin::RankInfo *_Ptr; // [sp+10h] [bp-14h]@4
  int *v12; // [sp+14h] [bp-10h]@1
  int v13; // [sp+20h] [bp-4h]@4

  v12 = &v10;
  v2 = this;
  if ( _Count > 0x5D1745D )
    std::_Xlength_error("vector<T> too long");
  if ( this->_Myend - this->_Myfirst < _Count )
  {
    v3 = std::allocator<PkRealTiemRankWin::RankInfo>::allocate(_Count);
    v4 = v2->_Mylast;
    v5 = v2->_Myfirst;
    _Ptr = v3;
    v13 = 0;
    std::_Uninit_move<PkRealTiemRankWin::RankInfo *,PkRealTiemRankWin::RankInfo *,std::allocator<PkRealTiemRankWin::RankInfo>,PkRealTiemRankWin::RankInfo>(
      v5,
      v4,
      v3);
    v6 = (signed int)((unsigned __int64)(780903145i64 * (unsigned int)((char *)v2->_Mylast - (char *)v2->_Myfirst)) >> 32) >> 3;
    v7 = v6 + (v6 >> 31);
    if ( v2->_Myfirst )
    {
      std::_Destroy_range<std::allocator<PkRealTiemRankWin::RankInfo>>(v2->_Myfirst, v2->_Mylast);
      operator delete(v2->_Myfirst);
    }
    v8 = _Ptr;
    v9 = &_Ptr[v7];
    v2->_Myend = &_Ptr[_Count];
    v2->_Mylast = v9;
    v2->_Myfirst = v8;
  }
}

//----- (0056B970) --------------------------------------------------------
void __cdecl std::_Sort_heap<PkRealTiemRankWin::RankInfo *,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &)>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, bool (__cdecl *_Pred)(PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *))
{
  PkRealTiemRankWin::RankInfo *v3; // esi@1
  signed int i; // edi@1

  v3 = _Last;
  for ( i = (char *)_Last - (char *)_First; i / 44 > 1; --v3 )
  {
    std::_Pop_heap_0<PkRealTiemRankWin::RankInfo *,PkRealTiemRankWin::RankInfo,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &)>(
      _First,
      v3,
      _Pred);
    i -= 44;
  }
}

//----- (0056B9D0) --------------------------------------------------------
void __cdecl std::_Sort_heap<PkRealTiemRankWin::RankInfo *,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > _Pred)
{
  int v3; // ebx@3
  boost::detail::function::any_pointer (__cdecl *v4)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // edi@3
  unsigned int v5; // edx@9
  boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > v6; // [sp-10h] [bp-40h]@5
  int v7; // [sp-Ch] [bp-3Ch]@5
  bool (__cdecl *v8)(boost::detail::function::any_pointer, PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *); // [sp-8h] [bp-38h]@5
  int v9; // [sp-4h] [bp-34h]@5
  boost::detail::function::any_pointer (__cdecl *v10)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp+10h] [bp-20h]@3
  int v11; // [sp+14h] [bp-1Ch]@3
  bool (__cdecl *v12)(boost::detail::function::any_pointer, PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *); // [sp+18h] [bp-18h]@3
  boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > *v13; // [sp+1Ch] [bp-14h]@5
  int v14; // [sp+20h] [bp-10h]@2
  int v15; // [sp+2Ch] [bp-4h]@1

  v15 = 0;
  if ( _Last - _First > 1 )
  {
    v14 = (char *)_Last - (char *)_First;
    do
    {
      v3 = 0;
      v4 = 0;
      v10 = 0;
      v11 = 0;
      v12 = 0;
      if ( _Pred.manager )
      {
        v4 = _Pred.manager;
        v12 = _Pred.invoker;
        v10 = _Pred.manager;
        v3 = ((int (__cdecl *)(void *, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
        v11 = v3;
      }
      v9 = 0;
      LOBYTE(v15) = 1;
      v13 = &v6;
      v6.manager = 0;
      v7 = 0;
      v8 = 0;
      if ( v4 )
      {
        v8 = v12;
        v6.manager = v4;
        v7 = ((int (__cdecl *)(int, _DWORD))v4)(v3, 0);
      }
      std::_Pop_heap_0<PkRealTiemRankWin::RankInfo *,PkRealTiemRankWin::RankInfo,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(
        _First,
        _Last,
        v6);
      LOBYTE(v15) = 0;
      if ( v4 )
        v11 = ((int (__cdecl *)(int, signed int))v4)(v3, 1);
      --_Last;
      v5 = (signed int)((unsigned __int64)(780903145i64 * (v14 - 44)) >> 32) >> 3;
      v14 -= 44;
      v10 = 0;
      v12 = 0;
    }
    while ( (signed int)(v5 + (v5 >> 31)) > 1 );
  }
  v15 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}

//----- (0056BB00) --------------------------------------------------------
void __thiscall std::vector<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo>>::_Reserve(std::vector<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo> > *this, unsigned int _Count)
{
  unsigned int v2; // esi@1
  unsigned int v3; // esi@3
  unsigned int v4; // eax@3
  unsigned int v5; // eax@5

  v2 = this->_Mylast - this->_Myfirst;
  if ( 97612893 - _Count < v2 )
    std::_Xlength_error("vector<T> too long");
  v3 = _Count + v2;
  v4 = this->_Myend - this->_Myfirst;
  if ( v3 > v4 )
  {
    if ( 97612893 - (v4 >> 1) >= v4 )
      v5 = (v4 >> 1) + v4;
    else
      v5 = 0;
    if ( v5 < v3 )
      v5 = v3;
    std::vector<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo>>::reserve(this, v5);
  }
}

//----- (0056BB80) --------------------------------------------------------
#error "56BC1E: positive sp value has been found (funcsize=52)"

//----- (0056BC20) --------------------------------------------------------
PkRealTiemRankWin *__thiscall PkRealTiemRankWin::`scalar deleting destructor'(PkRealTiemRankWin *this, unsigned int a2)
{
  PkRealTiemRankWin *v2; // esi@1

  v2 = this;
  PkRealTiemRankWin::~PkRealTiemRankWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0056BC50) --------------------------------------------------------
void __thiscall std::vector<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo>>::push_back(std::vector<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo> > *this, PkRealTiemRankWin::RankInfo *_Val)
{
  std::vector<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo> > *v2; // ebx@1
  PkRealTiemRankWin::RankInfo *v3; // ecx@1
  unsigned int v4; // edx@3
  int v5; // esi@3
  PkRealTiemRankWin::RankInfo *v6; // edi@5
  int v7; // esi@5
  PkRealTiemRankWin::RankInfo *v8; // edi@9

  v2 = this;
  v3 = this->_Mylast;
  if ( _Val >= v3 || v2->_Myfirst > _Val )
  {
    if ( v3 == v2->_Myend )
      std::vector<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo>>::_Reserve(v2, 1u);
    v8 = v2->_Mylast;
    if ( v8 )
    {
      v8->m_strName._Myres = 15;
      v8->m_strName._Mysize = 0;
      v8->m_strName._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v8->m_strName,
        &_Val->m_strName,
        0,
        0xFFFFFFFF);
      v8->m_unScore = _Val->m_unScore;
      v8->m_unKill = _Val->m_unKill;
      v8->m_unDown = _Val->m_unDown;
      v8->m_unRank = _Val->m_unRank;
    }
  }
  else
  {
    v4 = (signed int)((unsigned __int64)(780903145i64 * ((char *)_Val - (char *)v2->_Myfirst)) >> 32) >> 3;
    v5 = v4 + (v4 >> 31);
    if ( v3 == v2->_Myend )
      std::vector<PkRealTiemRankWin::RankInfo,std::allocator<PkRealTiemRankWin::RankInfo>>::_Reserve(v2, 1u);
    v6 = v2->_Mylast;
    v7 = (int)&v2->_Myfirst[v5];
    if ( v6 )
    {
      v6->m_strName._Myres = 15;
      v6->m_strName._Mysize = 0;
      v6->m_strName._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v6->m_strName,
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v7,
        0,
        0xFFFFFFFF);
      v6->m_unScore = *(_DWORD *)(v7 + 28);
      v6->m_unKill = *(_DWORD *)(v7 + 32);
      v6->m_unDown = *(_DWORD *)(v7 + 36);
      v6->m_unRank = *(_DWORD *)(v7 + 40);
    }
  }
  ++v2->_Mylast;
}

//----- (0056BD60) --------------------------------------------------------
void __cdecl std::_Sort<PkRealTiemRankWin::RankInfo *,int,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &)>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, int _Ideal, bool (__cdecl *_Pred)(PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *))
{
  PkRealTiemRankWin::RankInfo *v4; // ebx@1
  PkRealTiemRankWin::RankInfo *v5; // edi@1
  int v6; // eax@1
  signed int v7; // esi@2
  std::pair<PkRealTiemRankWin::RankInfo *,PkRealTiemRankWin::RankInfo *> _Mid; // [sp+Ch] [bp-8h]@4

  v4 = _First;
  v5 = _Last;
  v6 = _Last - _First;
  if ( v6 <= 32 )
    goto LABEL_8;
  v7 = _Ideal;
  while ( v7 > 0 )
  {
    std::_Unguarded_partition<PkRealTiemRankWin::RankInfo *,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &)>(
      &_Mid,
      v4,
      v5,
      _Pred);
    v7 = v7 / 2 / 2 + v7 / 2;
    if ( _Mid.first - v4 >= v5 - _Mid.second )
    {
      std::_Sort<PkRealTiemRankWin::RankInfo *,int,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &)>(
        _Mid.second,
        v5,
        v7,
        _Pred);
      v5 = _Mid.first;
    }
    else
    {
      std::_Sort<PkRealTiemRankWin::RankInfo *,int,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &)>(
        v4,
        _Mid.first,
        v7,
        _Pred);
      v4 = _Mid.second;
    }
    v6 = v5 - v4;
    if ( v6 <= 32 )
      goto LABEL_8;
  }
  if ( v6 <= 32 )
  {
LABEL_8:
    if ( v6 > 1 )
      std::_Insertion_sort1<PkRealTiemRankWin::RankInfo *,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),PkRealTiemRankWin::RankInfo>(
        v4,
        v5,
        _Pred);
  }
  else
  {
    if ( v5 - v4 > 1 )
      std::_Make_heap<PkRealTiemRankWin::RankInfo *,int,PkRealTiemRankWin::RankInfo,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &)>(
        v4,
        v5,
        _Pred);
    std::_Sort_heap<PkRealTiemRankWin::RankInfo *,bool (__cdecl *)(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &)>(
      v4,
      v5,
      _Pred);
  }
}

//----- (0056BEA0) --------------------------------------------------------
void __cdecl std::_Sort<PkRealTiemRankWin::RankInfo *,int,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(PkRealTiemRankWin::RankInfo *_First, PkRealTiemRankWin::RankInfo *_Last, int _Ideal, boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > _Pred)
{
  PkRealTiemRankWin::RankInfo *v4; // edi@1
  PkRealTiemRankWin::RankInfo *v5; // ebx@1
  int v6; // eax@1
  signed int v7; // esi@2
  boost::detail::function::any_pointer (__cdecl *v8)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp-Ch] [bp-30h]@4
  int v9; // [sp-8h] [bp-2Ch]@4
  bool (__cdecl *v10)(boost::detail::function::any_pointer, PkRealTiemRankWin::RankInfo *, PkRealTiemRankWin::RankInfo *); // [sp-4h] [bp-28h]@4
  std::pair<PkRealTiemRankWin::RankInfo *,PkRealTiemRankWin::RankInfo *> _Mid; // [sp+10h] [bp-14h]@6
  int v12; // [sp+20h] [bp-4h]@1

  v4 = _Last;
  v5 = _First;
  v6 = _Last - _First;
  v12 = 0;
  if ( v6 <= 32 )
    goto LABEL_14;
  v7 = _Ideal;
  while ( v7 > 0 )
  {
    v8 = 0;
    v9 = 0;
    v10 = 0;
    if ( _Pred.manager )
    {
      v10 = _Pred.invoker;
      v8 = _Pred.manager;
      v9 = ((int (__cdecl *)(void *, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
    }
    std::_Unguarded_partition<PkRealTiemRankWin::RankInfo *,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(
      &_Mid,
      v5,
      v4,
      *(boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > *)&v8);
    v7 = v7 / 2 / 2 + v7 / 2;
    v8 = 0;
    v9 = 0;
    v10 = 0;
    if ( _Mid.first - v5 >= v4 - _Mid.second )
    {
      if ( _Pred.manager )
      {
        v10 = _Pred.invoker;
        v8 = _Pred.manager;
        v9 = ((int (__cdecl *)(void *, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
      }
      std::_Sort<PkRealTiemRankWin::RankInfo *,int,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(
        _Mid.second,
        v4,
        v7,
        *(boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > *)&v8);
      v4 = _Mid.first;
    }
    else
    {
      if ( _Pred.manager )
      {
        v10 = _Pred.invoker;
        v8 = _Pred.manager;
        v9 = ((int (__cdecl *)(_DWORD, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
      }
      std::_Sort<PkRealTiemRankWin::RankInfo *,int,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(
        v5,
        _Mid.first,
        v7,
        *(boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > *)&v8);
      v5 = _Mid.second;
    }
    v6 = v4 - v5;
    if ( v6 <= 32 )
      goto LABEL_14;
  }
  if ( v6 <= 32 )
  {
LABEL_14:
    if ( v6 > 1 )
    {
      v8 = 0;
      v9 = 0;
      v10 = 0;
      if ( _Pred.manager )
      {
        v10 = _Pred.invoker;
        v8 = _Pred.manager;
        v9 = ((int (__cdecl *)(_DWORD, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
      }
      std::_Insertion_sort<PkRealTiemRankWin::RankInfo *,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(
        v5,
        v4,
        *(boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > *)&v8);
    }
  }
  else
  {
    v8 = 0;
    v9 = 0;
    v10 = 0;
    if ( _Pred.manager )
    {
      v10 = _Pred.invoker;
      v8 = _Pred.manager;
      v9 = ((int (__cdecl *)(_DWORD, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
    }
    std::make_heap<PkRealTiemRankWin::RankInfo *,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(
      v5,
      v4,
      *(boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > *)&v8);
    v8 = 0;
    v9 = 0;
    v10 = 0;
    if ( _Pred.manager )
    {
      v10 = _Pred.invoker;
      v8 = _Pred.manager;
      v9 = ((int (__cdecl *)(_DWORD, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
    }
    std::sort_heap<PkRealTiemRankWin::RankInfo *,boost::function<bool __cdecl (PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void>>>(
      v5,
      v4,
      *(boost::function<bool __cdecl(PkRealTiemRankWin::RankInfo const &,PkRealTiemRankWin::RankInfo const &),std::allocator<void> > *)&v8);
  }
  v12 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}

//----- (0056C100) --------------------------------------------------------
#error "56C1B6: positive sp value has been found (funcsize=63)"

//----- (0056C1C0) --------------------------------------------------------
void __thiscall PlayGuideMinWin::PlayGuideMinWin(PlayGuideMinWin *this)
{
  PlayGuideMinWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&PlayGuideMinWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&PlayGuideMinWin::`vftable'{for `IDirectMessenger'};
}
// 99B878: using guessed type void (__thiscall *PlayGuideMinWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99B894: using guessed type int (__thiscall *PlayGuideMinWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0056C1E0) --------------------------------------------------------
void __thiscall PlayGuideMinWin::~PlayGuideMinWin(PlayGuideMinWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&PlayGuideMinWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PlayGuideMinWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 99B878: using guessed type void (__thiscall *PlayGuideMinWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99B894: using guessed type int (__thiscall *PlayGuideMinWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0056C200) --------------------------------------------------------
void __thiscall PlayGuideMinWin::OnCommand(PlayGuideMinWin *this, unsigned int wParam, int lParam)
{
  if ( !wParam )
    ((void (*)(void))this->vfptr[136].__vecDelDtor)();
}

//----- (0056C220) --------------------------------------------------------
bool __thiscall PlayGuideWin::sTextList::Close(PlayGuideWin::sTextList *this)
{
  PlayGuideWin::sTextList *v1; // esi@1
  int v2; // edi@1
  int v3; // eax@1
  int v4; // edx@1
  PgWinBut *v5; // ecx@2
  int v6; // eax@2

  v1 = this;
  v2 = 2 * ((int (*)(void))this->m_pkButWin->vfptr[37].__vecDelDtor)();
  v3 = ((int (*)(void))v1->m_pkButWin->vfptr[42].__vecDelDtor)();
  v4 = v1->m_iDefaultYPos;
  if ( v3 > v4 )
  {
    v5 = v1->m_pkButWin;
    v6 = v3 - v2;
    if ( v6 < v4 )
      goto LABEL_3;
LABEL_6:
    ((void (__stdcall *)(int))v5->vfptr[44].__vecDelDtor)(v6);
    return ((int (*)(void))v1->m_pkButWin->vfptr[42].__vecDelDtor)() == v1->m_iDefaultYPos;
  }
  if ( v3 >= v4 )
    return ((int (*)(void))v1->m_pkButWin->vfptr[42].__vecDelDtor)() == v1->m_iDefaultYPos;
  v5 = v1->m_pkButWin;
  v6 = v2 + v3;
  if ( v6 <= v4 )
    goto LABEL_6;
LABEL_3:
  ((void (__stdcall *)(int))v5->vfptr[44].__vecDelDtor)(v1->m_iDefaultYPos);
  return ((int (*)(void))v1->m_pkButWin->vfptr[42].__vecDelDtor)() == v1->m_iDefaultYPos;
}

//----- (0056C290) --------------------------------------------------------
bool __thiscall PlayGuideWin::sTextList::Up(PlayGuideWin::sTextList *this, const int iTopYPos)
{
  PlayGuideWin::sTextList *v2; // esi@1
  int v3; // edi@1
  int v4; // eax@1
  PgWinBut *v5; // ecx@2
  int v6; // eax@2

  v2 = this;
  v3 = 2 * ((int (*)(void))this->m_pkButWin->vfptr[37].__vecDelDtor)();
  v4 = ((int (*)(void))v2->m_pkButWin->vfptr[42].__vecDelDtor)();
  if ( v4 > iTopYPos )
  {
    v5 = v2->m_pkButWin;
    v6 = v4 - v3;
    if ( v6 >= iTopYPos )
      ((void (__stdcall *)(int))v5->vfptr[44].__vecDelDtor)(v6);
    else
      ((void (__stdcall *)(const int))v5->vfptr[44].__vecDelDtor)(iTopYPos);
  }
  return ((int (*)(void))v2->m_pkButWin->vfptr[42].__vecDelDtor)() == iTopYPos;
}

//----- (0056C300) --------------------------------------------------------
bool __thiscall PlayGuideWin::sTextList::Down(PlayGuideWin::sTextList *this, const int iBottomYPos)
{
  PlayGuideWin::sTextList *v2; // esi@1
  int v3; // edi@1
  int v4; // eax@1
  PgWinBut *v5; // ecx@2
  int v6; // eax@2

  v2 = this;
  v3 = 2 * ((int (*)(void))this->m_pkButWin->vfptr[37].__vecDelDtor)();
  v4 = ((int (*)(void))v2->m_pkButWin->vfptr[42].__vecDelDtor)();
  if ( v4 < iBottomYPos )
  {
    v5 = v2->m_pkButWin;
    v6 = v3 + v4;
    if ( v6 <= iBottomYPos )
      ((void (__stdcall *)(int))v5->vfptr[44].__vecDelDtor)(v6);
    else
      ((void (__stdcall *)(const int))v5->vfptr[44].__vecDelDtor)(iBottomYPos);
  }
  return ((int (*)(void))v2->m_pkButWin->vfptr[42].__vecDelDtor)() == iBottomYPos;
}

//----- (0056C370) --------------------------------------------------------
void __thiscall PlayGuideWin::sTextList::Reset(PlayGuideWin::sTextList *this)
{
  PlayGuideWin::sTextList *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkButWin->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkButWin->vfptr[60].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkButWin->vfptr[44].__vecDelDtor)(v1->m_iDefaultYPos);
}

//----- (0056C3B0) --------------------------------------------------------
void __thiscall PlayGuideWin::OnClose(PlayGuideWin *this)
{
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))this->vfptr[59].__vecDelDtor)(
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    1.0,
    0.5);
}

//----- (0056C3E0) --------------------------------------------------------
void PlayGuideWin::AdjustFocus()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::AdjustFocus(v1);
}

//----- (0056C400) --------------------------------------------------------
void __thiscall PlayGuideMinWin::OnClick(PlayGuideMinWin *this)
{
  GameFrameWork *v1; // esi@1
  PlayGuideWin *v2; // ecx@2

  v1 = (GameFrameWork *)this->m_pkFrameWork;
  if ( v1 )
  {
    v2 = v1->m_pkPlayGuideWin;
    if ( v2 )
    {
      if ( (unsigned __int8)((int (*)(void))v2->vfptr[65].__vecDelDtor)() )
        GameFrameWork::ClosePlayGuideWin(v1);
      else
        GameFrameWork::OpenPlayGuideWin(v1);
    }
  }
}

//----- (0056C440) --------------------------------------------------------
void __thiscall PlayGuideWin::OnWinClose(PlayGuideWin *this)
{
  GameFrameWork::ClosePlayGuideWin((GameFrameWork *)this->m_pkFrameWork);
}

//----- (0056C450) --------------------------------------------------------
void __thiscall PlayGuideWin::UpdateScroll(PlayGuideWin *this)
{
  PlayGuideWin *v1; // ebx@1
  unsigned int v2; // esi@3
  unsigned int v3; // edi@3

  v1 = this;
  if ( (PgWin *)this == PgWinMgr::GetTopWin(&Pgg_kWinMgr) )
  {
    if ( v1->m_eState )
    {
      v2 = v1->m_kTextList._Mylast - v1->m_kTextList._Myfirst;
      v3 = 0;
      if ( v2 )
      {
        do
        {
          if ( (unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD))v1->m_kTextList._Myfirst[v3]->m_pkButWin->vfptr[83].__vecDelDtor)(
                                  PgWin::ms_iMsX,
                                  PgWin::ms_iMsY) )
          {
            if ( PgWin::ms_iMsDeltaZ <= 0 )
            {
              if ( PgWin::ms_iMsDeltaZ < 0 )
                SlideBar::OnClick2(v1->m_pkSlideBar);
            }
            else
            {
              SlideBar::OnClick1(v1->m_pkSlideBar);
            }
          }
          ++v3;
        }
        while ( v3 < v2 );
      }
    }
  }
}

//----- (0056C4E0) --------------------------------------------------------
char __userpurge PageWinSpr::HitTest@<al>(PageWinSpr *this@<ecx>, int a2@<ebx>, double a3@<st0>, int iSx, int iSy)
{
  PageWinSpr *v5; // edi@1
  char result; // al@3
  char **v7; // eax@4
  PgWin *v8; // esi@4
  void *(__thiscall *v9)(NiRefObject *, unsigned int); // eax@6

  v5 = this;
  if ( PgWinSpr::HitTest((PgWinSpr *)&this->vfptr, a2, (int)this, a3, iSx, iSy) )
  {
    if ( v5->m_kToolTip._Mysize )
    {
      v7 = &v5->m_kToolTip._Bx._Ptr;
      v8 = v5->m_pkToolTipWin;
      if ( v5->m_kToolTip._Myres >= 0x10 )
        v7 = (char **)*v7;
      v8->vfptr[107].__vecDelDtor((NiRefObject *)v8, (unsigned int)v7);
      v8->vfptr[64].__vecDelDtor((NiRefObject *)v8, 1u);
      v9 = v8->vfptr[109].__vecDelDtor;
      v8->m_pkToolTipParentWin = v5->m_pkToolTipParentWin;
      ((void (__thiscall *)(PgWin *))v9)(v8);
      ((void (__thiscall *)(PgWin *))v8->vfptr[108].__vecDelDtor)(v8);
      PgWinMgr::SetTopWin(&Pgg_kWinMgr, v8);
      unk_B64880 = v8;
      result = 1;
    }
    else
    {
      result = 1;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0056C590) --------------------------------------------------------
char __thiscall PlayGuideMinWin::Create(PlayGuideMinWin *this, PgFrameWork *pkFrameWork)
{
  PlayGuideMinWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiSourceTexture *v5; // edi@4
  NiNode *v6; // esi@5
  char result; // al@9
  PgSprData *v8; // eax@10
  NiNode *v9; // esi@11
  PgSprData *v10; // edi@16
  NiNode *v11; // esi@17
  int iLeft; // [sp+14h] [bp-18h]@10
  int iTop; // [sp+18h] [bp-14h]@10
  NiPointer<NiNode> spNode; // [sp+1Ch] [bp-10h]@1
  int v15; // [sp+28h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v15 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\PlayGuideMin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = MenuTexMgr::GetTexture(0x18u);
  if ( !v5 )
  {
    v6 = spNode.m_pObject;
    v15 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MinimumNor", &iLeft, &iTop, v5);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v8, 0, pkFrameWork, "PlayGuideMinWin", 0) )
  {
    v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MinimumNor", &iLeft, &iTop, v5);
    PgSprData::Add(v10, (NiAVObject *)&spNode.m_pObject->vfptr, "MinimumClick");
    PgSprData::Add(v10, (NiAVObject *)&spNode.m_pObject->vfptr, "MinimumOver");
    PgWinBut::CreateWin(iLeft, iTop, v10, (PgWin *)&v2->vfptr, 0, 0, 0);
    ((void (__thiscall *)(PlayGuideMinWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.89999998,
      0.66000003);
    v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
    v15 = -1;
    if ( spNode.m_pObject )
    {
      v11 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v11 )
          v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
      }
    }
    result = 1;
  }
  else
  {
    v9 = spNode.m_pObject;
    v15 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v9 )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0056C7A0) --------------------------------------------------------
void __thiscall PlayGuideWin::InitPos(PlayGuideWin *this, unsigned int uiScreenWidth, unsigned int uiScreenHeight, float fXPosRate, float fYPosRate)
{
  PgWin::InitPos((PgWin *)&this->vfptr, uiScreenWidth, uiScreenHeight, fXPosRate, fYPosRate);
}

//----- (0056C7D0) --------------------------------------------------------
void __thiscall PlayGuideWin::OnTextList(PlayGuideWin *this, const unsigned int uiIndex)
{
  PlayGuideWin *v2; // esi@1
  bool v3; // zf@1
  BasicInfoLink *v4; // eax@2
  BasicInfoLinkType v5; // eax@5
  BasicInfoLink *v6; // eax@5
  int v7; // eax@8
  int v8; // ecx@10
  int v9; // eax@12
  SlideBar *v10; // ecx@12

  v2 = this;
  v3 = this->m_bWordSearch == 0;
  this->m_iViewIndex = uiIndex;
  this->m_iPrevIndex = uiIndex - 1;
  this->m_iNextIndex = uiIndex + 1;
  if ( v3 )
  {
    this->m_eBasicInfoCategory = uiIndex;
    v4 = BasicInfoLinkTab::GetByCategory((BasicInfoCategory)uiIndex);
    if ( v4 )
      v2->m_eBasicInfoLinkType = v4->BIL_GuideType;
  }
  else if ( this->m_vecGuideInfoList._Mylast - this->m_vecGuideInfoList._Myfirst > uiIndex )
  {
    v5 = this->m_vecGuideInfoList._Myfirst[uiIndex]->BIL_GuideType;
    this->m_eBasicInfoLinkType = v5;
    v6 = BasicInfoLinkTab::GetByType(v5);
    if ( v6 )
      v2->m_eBasicInfoCategory = v6->BIL_Category;
  }
  if ( uiIndex )
    v7 = v2->m_iPrevIndex;
  else
    v7 = 0;
  v8 = v2->m_iSplitCnt;
  v2->m_iCurPos = v7;
  if ( v7 > v8 )
    v7 = v8 - 1;
  v9 = v7 < 0 ? 0 : v7;
  v10 = v2->m_pkSlideBar;
  v2->m_iCurPos = v9;
  if ( v10 )
    SlideBar::SetCurPos(v10, v9);
  *(_WORD *)&v2->m_bOpenTextList = 1;
}

//----- (0056C8B0) --------------------------------------------------------
void __thiscall PlayGuideWin::UpdateTextList(PlayGuideWin *this)
{
  PlayGuideWin *v1; // esi@1
  PlayGuideWin::eState v2; // eax@1
  unsigned int v3; // ebx@1
  unsigned int v4; // edi@3
  int v5; // ebx@5
  char *v6; // eax@5
  BasicInfoFind **v7; // ecx@10
  unsigned int v8; // eax@10
  unsigned int v9; // ebx@12
  void (*v10)(void); // edx@13
  BasicInfoLink *v11; // eax@14
  char *v12; // eax@21
  PlayGuideWin::sTextList **v13; // ecx@21
  unsigned int v14; // edi@26
  unsigned int v15; // ebx@26
  char *v16; // eax@28
  int v17; // edi@30
  PlayGuideWin::sTextList *v18; // ecx@32
  int v19; // ecx@33
  BasicInfoFind **v20; // edx@33
  BasicInfoLink *v21; // edi@33
  PlayGuideWin::sTextList **v22; // eax@37
  unsigned int v23; // edi@42
  unsigned int v24; // ebx@42
  BasicInfoFind **v25; // eax@44
  unsigned int v26; // ecx@44
  BasicInfoLink *v27; // eax@45
  void *v28; // [sp+0h] [bp-10h]@0
  unsigned int bBottomEnable; // [sp+Ch] [bp-4h]@1

  v1 = this;
  v2 = this->m_eState;
  v3 = this->m_kTextList._Mylast - this->m_kTextList._Myfirst;
  bBottomEnable = this->m_kTextList._Mylast - this->m_kTextList._Myfirst;
  if ( v2 )
  {
    if ( v2 != 1 )
      return;
    v4 = 0;
    if ( !this->m_bWordSearch )
    {
      if ( v3 )
      {
        do
        {
          v5 = v4 + v1->m_iCurPos;
          v6 = CDataReader::GetRecord(
                 (CDataReader *)(ITableBase<BasicInfoTitle,BasicInfoTitleTab>::ms_pkTable + 4),
                 v4 + v1->m_iCurPos);
          if ( v6 )
          {
            ((void (__stdcall *)(char *))v1->m_kTextList._Myfirst[v4]->m_pkTextWin->vfptr[118].__vecDelDtor)(v6 + 4);
            ((void (__stdcall *)(int))v1->m_kTextList._Myfirst[v4]->m_pkButWin->vfptr[130].__vecDelDtor)(v5);
            ((void (__stdcall *)(signed int))v1->m_kTextList._Myfirst[v4]->m_pkButWin->vfptr[60].__vecDelDtor)(1);
            ((void (__stdcall *)(signed int))v1->m_kTextList._Myfirst[v4]->m_pkButWin->vfptr[64].__vecDelDtor)(1);
          }
          ++v4;
        }
        while ( v4 < bBottomEnable );
        v1->m_pkSlideBar->vfptr[60].__vecDelDtor((NiRefObject *)v1->m_pkSlideBar, 1u);
        return;
      }
LABEL_19:
      v1->m_pkSlideBar->vfptr[60].__vecDelDtor((NiRefObject *)v1->m_pkSlideBar, 1u);
      return;
    }
    if ( !v3 )
      goto LABEL_19;
    while ( 1 )
    {
      v7 = v1->m_vecGuideInfoList._Myfirst;
      v8 = v1->m_vecGuideInfoList._Mylast - v7;
      if ( v4 < v8 )
        break;
      ((void (__stdcall *)(signed int))v1->m_kTextList._Myfirst[v4]->m_pkButWin->vfptr[64].__vecDelDtor)(1);
      ((void (__stdcall *)(_DWORD))v1->m_kTextList._Myfirst[v4]->m_pkButWin->vfptr[60].__vecDelDtor)(0);
      ((void (__stdcall *)(void *))v1->m_kTextList._Myfirst[v4]->m_pkTextWin->vfptr[118].__vecDelDtor)(&unk_99B653);
LABEL_18:
      if ( ++v4 >= v3 )
        goto LABEL_19;
    }
    v9 = v4 + v1->m_iCurPos;
    if ( v8 > v9 )
    {
      v11 = BasicInfoLinkTab::GetByType(v7[v9]->BIL_GuideType);
      if ( !v11 )
      {
LABEL_17:
        v3 = bBottomEnable;
        goto LABEL_18;
      }
      ((void (__stdcall *)(char *, void *))v1->m_kTextList._Myfirst[v4]->m_pkTextWin->vfptr[118].__vecDelDtor)(
        v11->BIL_GuideTypeName,
        v28);
      ((void (__stdcall *)(unsigned int))v1->m_kTextList._Myfirst[v4]->m_pkButWin->vfptr[130].__vecDelDtor)(v9);
      ((void (__stdcall *)(signed int))v1->m_kTextList._Myfirst[v4]->m_pkButWin->vfptr[60].__vecDelDtor)(1);
      v10 = (void (*)(void))v1->m_kTextList._Myfirst[v4]->m_pkButWin->vfptr[64].__vecDelDtor;
      v28 = (void *)1;
    }
    else
    {
      ((void (__stdcall *)(signed int, void *))v1->m_kTextList._Myfirst[v4]->m_pkButWin->vfptr[64].__vecDelDtor)(1, v28);
      ((void (__stdcall *)(_DWORD))v1->m_kTextList._Myfirst[v4]->m_pkButWin->vfptr[60].__vecDelDtor)(0);
      v10 = (void (*)(void))v1->m_kTextList._Myfirst[v4]->m_pkTextWin->vfptr[118].__vecDelDtor;
      v28 = &unk_99B661;
    }
    v10();
    goto LABEL_17;
  }
  if ( !this->m_bWordSearch )
  {
    v12 = CDataReader::GetRecord(
            (CDataReader *)(ITableBase<BasicInfoTitle,BasicInfoTitleTab>::ms_pkTable + 4),
            this->m_iPrevIndex);
    v13 = v1->m_kTextList._Myfirst;
    LOBYTE(bBottomEnable) = v1->m_iPrevIndex >= 0;
    if ( !(v1->m_kTextList._Mylast - v13) )
      return;
    if ( v1->m_iPrevIndex >= 0 && v12 )
      ((void (__stdcall *)(char *))(*v13)->m_pkTextWin->vfptr[118].__vecDelDtor)(v12 + 4);
    else
      ((void (__stdcall *)(_DWORD))(*v13)->m_pkTextWin->vfptr[118].__vecDelDtor)(0);
    (*(void (__stdcall **)(int))(***(_DWORD ***)v1->m_kTextList._Myfirst + 520))(v1->m_iPrevIndex);
    (*(void (__stdcall **)(unsigned int))(***(_DWORD ***)v1->m_kTextList._Myfirst + 240))(bBottomEnable);
    v14 = 1;
    v15 = v3 - 1;
    if ( v15 > 1 )
    {
      do
      {
        ((void (__stdcall *)(_DWORD))v1->m_kTextList._Myfirst[v14]->m_pkButWin->vfptr[60].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v1->m_kTextList._Myfirst[v14++]->m_pkButWin->vfptr[64].__vecDelDtor)(0);
      }
      while ( v14 < v15 );
    }
    v16 = CDataReader::GetRecord(
            (CDataReader *)(ITableBase<BasicInfoTitle,BasicInfoTitleTab>::ms_pkTable + 4),
            v1->m_iNextIndex);
    LOBYTE(bBottomEnable) = v1->m_iNextIndex < 36;
    if ( v16 && v1->m_iNextIndex < 36 )
    {
      v17 = v14;
      ((void (__stdcall *)(char *))v1->m_kTextList._Myfirst[v17]->m_pkTextWin->vfptr[118].__vecDelDtor)(v16 + 4);
    }
    else
    {
      v17 = v14;
      ((void (__stdcall *)(_DWORD))v1->m_kTextList._Myfirst[v17]->m_pkTextWin->vfptr[118].__vecDelDtor)(0);
    }
    ((void (__stdcall *)(int))v1->m_kTextList._Myfirst[v17]->m_pkButWin->vfptr[130].__vecDelDtor)(v1->m_iNextIndex);
    v18 = v1->m_kTextList._Myfirst[v17];
    goto LABEL_49;
  }
  v19 = this->m_iPrevIndex;
  v20 = v1->m_vecGuideInfoList._Myfirst;
  LOBYTE(bBottomEnable) = v19 >= 0;
  v21 = 0;
  if ( v1->m_vecGuideInfoList._Mylast - v20 > (unsigned int)v19 && v19 >= 0 && v20[v19] )
    v21 = BasicInfoLinkTab::GetByType(v20[v19]->BIL_GuideType);
  v22 = v1->m_kTextList._Myfirst;
  if ( v1->m_kTextList._Mylast - v22 )
  {
    if ( (_BYTE)bBottomEnable && v21 )
      ((void (__stdcall *)(char *))(*v22)->m_pkTextWin->vfptr[118].__vecDelDtor)(v21->BIL_GuideTypeName);
    else
      ((void (__stdcall *)(_DWORD))(*v22)->m_pkTextWin->vfptr[118].__vecDelDtor)(0);
    (*(void (__stdcall **)(int))(***(_DWORD ***)v1->m_kTextList._Myfirst + 520))(v1->m_iPrevIndex);
    (*(void (__stdcall **)(unsigned int))(***(_DWORD ***)v1->m_kTextList._Myfirst + 240))(bBottomEnable);
    v23 = 1;
    v24 = v3 - 1;
    if ( v24 > 1 )
    {
      do
      {
        ((void (__stdcall *)(_DWORD))v1->m_kTextList._Myfirst[v23]->m_pkButWin->vfptr[60].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v1->m_kTextList._Myfirst[v23++]->m_pkButWin->vfptr[64].__vecDelDtor)(0);
      }
      while ( v23 < v24 );
    }
    v25 = v1->m_vecGuideInfoList._Myfirst;
    v26 = v1->m_iNextIndex;
    LOBYTE(bBottomEnable) = v26 < v1->m_vecGuideInfoList._Mylast - v25;
    if ( (_BYTE)bBottomEnable )
    {
      v27 = BasicInfoLinkTab::GetByType(v25[v26]->BIL_GuideType);
      if ( v27 )
        ((void (__stdcall *)(char *))v1->m_kTextList._Myfirst[v23]->m_pkTextWin->vfptr[118].__vecDelDtor)(v27->BIL_GuideTypeName);
    }
    else
    {
      ((void (__stdcall *)(_DWORD))v1->m_kTextList._Myfirst[v23]->m_pkTextWin->vfptr[118].__vecDelDtor)(0);
    }
    ((void (__stdcall *)(int))v1->m_kTextList._Myfirst[v23]->m_pkButWin->vfptr[130].__vecDelDtor)(v1->m_iNextIndex);
    v18 = v1->m_kTextList._Myfirst[v23];
LABEL_49:
    ((void (__stdcall *)(unsigned int))v18->m_pkButWin->vfptr[60].__vecDelDtor)(bBottomEnable);
    v1->m_pkSlideBar->vfptr[60].__vecDelDtor((NiRefObject *)v1->m_pkSlideBar, 0);
  }
}
// A8C1F4: using guessed type int ITableBase<BasicInfoTitle,BasicInfoTitleTab>::ms_pkTable;

//----- (0056CE10) --------------------------------------------------------
void __thiscall PlayGuideWin::Reset(PlayGuideWin *this)
{
  PlayGuideWin *v1; // ebx@1
  unsigned int v2; // edi@1
  PlayGuideWin::sTextList *v3; // esi@2
  SlideBar *v4; // ecx@3
  unsigned int uiTextListSize; // [sp+8h] [bp-4h]@1

  v1 = this;
  v2 = 0;
  uiTextListSize = this->m_kTextList._Mylast - this->m_kTextList._Myfirst;
  if ( uiTextListSize )
  {
    do
    {
      v3 = v1->m_kTextList._Myfirst[v2];
      ((void (__stdcall *)(_DWORD))v3->m_pkButWin->vfptr[64].__vecDelDtor)(1);
      ((void (__stdcall *)(_DWORD))v3->m_pkButWin->vfptr[60].__vecDelDtor)(1);
      ((void (__stdcall *)(_DWORD))v3->m_pkButWin->vfptr[44].__vecDelDtor)(v3->m_iDefaultYPos);
      ++v2;
    }
    while ( v2 < uiTextListSize );
  }
  v4 = v1->m_pkSlideBar;
  if ( v4 )
  {
    SlideBar::SetCurPos(v4, 0);
    v1->m_iCurPos = v1->m_pkSlideBar->m_nCurPos;
  }
  v1->m_eState = 1;
  PlayGuideWin::UpdateTextList(v1);
  *(_WORD *)&v1->m_bOpenTextList = 256;
}

//----- (0056CEB0) --------------------------------------------------------
char __thiscall PlayGuideWin::UpdatePageContents(PlayGuideWin *this, BasicInfoLink *pkBasicInfoLink)
{
  BasicInfoLink *v2; // esi@1
  signed int v3; // ebx@1
  PlayGuideWin *v4; // edi@1
  char result; // al@2
  BasicInfoLink *v6; // eax@3
  int v7; // eax@5
  unsigned int v8; // ebx@6
  unsigned int v9; // esi@8
  char *v10; // eax@9
  const char *v11; // eax@25
  NiSourceTexture *v12; // eax@25
  char *v13; // eax@27
  const char *v14; // eax@27
  BasicInfoLink *kFirstGuideType; // [sp+Ch] [bp-58h]@3
  int CurPage; // [sp+14h] [bp-50h]@3
  int MaxPage; // [sp+18h] [bp-4Ch]@3
  int CurType; // [sp+1Ch] [bp-48h]@4
  char acPageText[64]; // [sp+20h] [bp-44h]@27

  v2 = pkBasicInfoLink;
  v3 = 0;
  v4 = this;
  if ( pkBasicInfoLink )
  {
    MaxPage = 0;
    CurPage = 0;
    v6 = BasicInfoLinkTab::GetByCategory(this->m_eBasicInfoCategory);
    kFirstGuideType = v6;
    if ( v6 )
    {
      CurType = v6->BIL_GuideType;
      if ( CurType < 197 )
      {
        while ( 1 )
        {
          v7 = *(_DWORD *)(ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable + 56);
          if ( v7 )
            v8 = *(_DWORD *)(v7 + 40);
          else
            v8 = 0;
          v9 = 0;
          if ( v8 )
          {
            while ( 1 )
            {
              v10 = CDataReader::GetRecord(
                      (CDataReader *)(ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable + 4),
                      v9);
              if ( v10 )
              {
                if ( *((_DWORD *)v10 + 1) == CurType )
                  break;
              }
              if ( ++v9 >= v8 )
                goto LABEL_12;
            }
            if ( *(_DWORD *)v10 != kFirstGuideType->BIL_Category )
            {
LABEL_17:
              v3 = CurPage;
              v2 = pkBasicInfoLink;
              break;
            }
            ++CurType;
            ++MaxPage;
            if ( *((_DWORD *)v10 + 1) == pkBasicInfoLink->BIL_GuideType )
              CurPage = MaxPage;
          }
          else
          {
LABEL_12:
            ++CurType;
          }
          if ( CurType >= 197 )
            goto LABEL_17;
        }
      }
    }
    if ( v4->m_pkGuideTitleTextWin )
    {
      ((void (__stdcall *)(signed int))v4->m_pkGuideTitleTextWin->vfptr[64].__vecDelDtor)(1);
      ((void (__stdcall *)(char *))v4->m_pkGuideTitleTextWin->vfptr[118].__vecDelDtor)(v2->BIL_GuideTypeName);
    }
    if ( v4->m_pkGuideExplanationTextWin )
    {
      ((void (__stdcall *)(signed int))v4->m_pkGuideExplanationTextWin->vfptr[64].__vecDelDtor)(1);
      ((void (__stdcall *)(char *))v4->m_pkGuideExplanationTextWin->vfptr[118].__vecDelDtor)(v2->BIL_Desc);
    }
    if ( v4->m_pkGuideImageSprWin )
    {
      ((void (__stdcall *)(signed int))v4->m_pkGuideImageSprWin->vfptr[64].__vecDelDtor)(1);
      if ( !Folder::m_bInit )
        Folder::Init();
      v11 = fs("%s\\playguide\\%s.png", &Folder::m_acMenu, v2->BIL_GuideTypeFile);
      v12 = PgUtil::LoadSourceTexture(v11);
      ((void (__stdcall *)(NiSourceTexture *))v4->m_pkGuideImageSprWin->vfptr[113].__vecDelDtor)(v12);
    }
    if ( v4->m_pkGuidePageNumTextWin )
    {
      v13 = (char *)TextData3::Get(0x1E390354u);
      v14 = fs(v13, v3, MaxPage);
      sprintf(acPageText, v14);
      ((void (__stdcall *)(char *))v4->m_pkGuidePageNumTextWin->vfptr[118].__vecDelDtor)(acPageText);
      ((void (__stdcall *)(signed int))v4->m_pkGuidePageNumTextWin->vfptr[64].__vecDelDtor)(1);
    }
    if ( v4->m_pkGuidePageLeftButWin )
      ((void (__stdcall *)(_DWORD))v4->m_pkGuidePageLeftButWin->vfptr[64].__vecDelDtor)(v3 > 1);
    if ( v4->m_pkGuidePageRightButWin )
      v4->m_pkGuidePageRightButWin->vfptr[64].__vecDelDtor((NiRefObject *)v4->m_pkGuidePageRightButWin, MaxPage > v3);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;
// A8C1F8: using guessed type int ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable;

//----- (0056D100) --------------------------------------------------------
void __thiscall PlayGuideWin::EraseAllSpace(PlayGuideWin *this, char *acString)
{
  int v2; // edi@3
  char *v3; // esi@4
  char *v4; // eax@8
  int v5; // edx@8
  char v6; // cl@9
  NiRefObjectVtbl *v7; // esi@12
  NiUnsharedGeometryGroup *v8; // eax@12
  PlayGuideWin *v9; // [sp+4h] [bp-4h]@1

  v9 = this;
  if ( acString && this->m_pkGuideSearchTextEditWin )
  {
    v2 = 0;
    if ( *acString )
    {
      v3 = acString;
      do
      {
        if ( *v3 == 32 || *v3 == 10 )
        {
          v4 = &acString[v2 + 1];
          v5 = v3 - v4;
          do
          {
            v6 = *v4;
            v4[v5] = *v4;
            ++v4;
          }
          while ( v6 );
        }
        else
        {
          ++v2;
          ++v3;
        }
      }
      while ( *v3 );
    }
    if ( strlen(acString) )
    {
      ((void (__stdcall *)(char *))v9->m_pkGuideSearchTextEditWin->vfptr[115].__vecDelDtor)(acString);
    }
    else
    {
      v7 = v9->m_pkGuideSearchTextEditWin->vfptr;
      v8 = TextData3::Get(0x8095BCC4);
      v7[115].__vecDelDtor((NiRefObject *)v9->m_pkGuideSearchTextEditWin, (unsigned int)v8);
    }
  }
}

//----- (0056D1C0) --------------------------------------------------------
void __thiscall PlayGuideWin::OnSlideBar(PlayGuideWin *this)
{
  SlideBar *v1; // eax@1

  v1 = this->m_pkSlideBar;
  if ( v1 )
  {
    this->m_iCurPos = v1->m_nCurPos;
    PlayGuideWin::UpdateTextList(this);
  }
}

//----- (0056D1E0) --------------------------------------------------------
void __thiscall PlayGuideWin::UpdateSelectedPage(PlayGuideWin *this)
{
  PlayGuideWin *v1; // esi@1
  PlayGuideWin::eState v2; // eax@2
  PgWinSpr *v3; // ecx@4
  PgWinText *v4; // ecx@6
  PgWinText *v5; // ecx@8
  PgWinSpr *v6; // ecx@10
  PgWinText *v7; // ecx@12
  PgWinBut *v8; // ecx@14
  PgWinBut *v9; // ecx@16
  char *v10; // eax@18
  int v11; // ecx@19
  unsigned int v12; // ebx@20
  unsigned int v13; // edi@22
  BasicInfoFind **v14; // edi@27
  BasicInfoFind **v15; // ecx@27
  unsigned int v16; // edx@28
  PgWinSpr *v17; // ecx@30
  SlideBar *v18; // ecx@32

  v1 = this;
  if ( PgWin::IsVisible((PgWin *)&this->vfptr) )
  {
    v2 = v1->m_eState;
    if ( v2 )
    {
      if ( v2 == 1 )
      {
        v3 = v1->m_pkThemeSprWin;
        if ( v3 )
          ((void (__stdcall *)(_DWORD))v3->vfptr[64].__vecDelDtor)(0);
        v4 = v1->m_pkGuideTitleTextWin;
        if ( v4 )
          ((void (__stdcall *)(_DWORD))v4->vfptr[64].__vecDelDtor)(0);
        v5 = v1->m_pkGuideExplanationTextWin;
        if ( v5 )
          ((void (__stdcall *)(_DWORD))v5->vfptr[64].__vecDelDtor)(0);
        v6 = v1->m_pkGuideImageSprWin;
        if ( v6 )
          ((void (__stdcall *)(_DWORD))v6->vfptr[64].__vecDelDtor)(0);
        v7 = v1->m_pkGuidePageNumTextWin;
        if ( v7 )
          ((void (__stdcall *)(_DWORD))v7->vfptr[64].__vecDelDtor)(0);
        v8 = v1->m_pkGuidePageLeftButWin;
        if ( v8 )
          ((void (__stdcall *)(_DWORD))v8->vfptr[64].__vecDelDtor)(0);
        v9 = v1->m_pkGuidePageRightButWin;
        if ( v9 )
          ((void (__stdcall *)(_DWORD))v9->vfptr[64].__vecDelDtor)(0);
      }
    }
    else
    {
      v10 = 0;
      if ( v1->m_bWordSearch )
      {
        v14 = v1->m_vecGuideInfoList._Myfirst;
        v15 = v1->m_vecGuideInfoList._Mylast;
        if ( v14 != v15 )
        {
          v16 = v1->m_iViewIndex;
          if ( v15 - v14 > v16 )
            v10 = (char *)BasicInfoLinkTab::GetByType(v14[v16]->BIL_GuideType);
        }
      }
      else
      {
        v11 = *(_DWORD *)(ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable + 56);
        if ( v11 )
          v12 = *(_DWORD *)(v11 + 40);
        else
          v12 = 0;
        v13 = 0;
        if ( v12 )
        {
          do
          {
            v10 = CDataReader::GetRecord(
                    (CDataReader *)(ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable + 4),
                    v13);
            if ( v10 && *((_DWORD *)v10 + 1) == v1->m_eBasicInfoLinkType )
              break;
            ++v13;
          }
          while ( v13 < v12 );
        }
      }
      PlayGuideWin::UpdatePageContents(v1, (BasicInfoLink *)v10);
      v17 = v1->m_pkThemeSprWin;
      if ( v17 )
        ((void (__stdcall *)(signed int))v17->vfptr[64].__vecDelDtor)(1);
      v18 = v1->m_pkSlideBar;
      if ( v18 )
      {
        v1->m_iOldSlidePos = v1->m_iCurPos;
        v1->m_iCurPos = 0;
        SlideBar::SetSplitCnt(v18, 0);
      }
    }
  }
}
// A8C1F8: using guessed type int ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable;

//----- (0056D370) --------------------------------------------------------
void __thiscall PlayGuideWin::OnPageBtn(PlayGuideWin *this, bool IsBtnLeft)
{
  signed int v2; // ebx@1
  int v3; // eax@7
  unsigned int v4; // edi@8
  unsigned int v5; // esi@10
  char *v6; // eax@11
  PlayGuideWin *v7; // [sp+Ch] [bp-4h]@1

  v2 = this->m_eBasicInfoLinkType;
  v7 = this;
LABEL_2:
  while ( 1 )
  {
    if ( IsBtnLeft == 1 )
      --v2;
    else
      ++v2;
    if ( v2 < 0 || v2 >= 197 )
      break;
    this->m_eBasicInfoLinkType = v2;
    v3 = *(_DWORD *)(ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable + 56);
    if ( v3 )
      v4 = *(_DWORD *)(v3 + 40);
    else
      v4 = 0;
    v5 = 0;
    if ( v4 )
    {
      while ( 1 )
      {
        v6 = CDataReader::GetRecord((CDataReader *)(ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable + 4), v5);
        if ( v6 )
        {
          if ( *((_DWORD *)v6 + 1) == v2 )
            break;
        }
        if ( ++v5 >= v4 )
        {
          this = v7;
          goto LABEL_2;
        }
      }
      PlayGuideWin::UpdatePageContents(v7, (BasicInfoLink *)v6);
      return;
    }
  }
}
// A8C1F8: using guessed type int ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable;

//----- (0056D3F0) --------------------------------------------------------
void __thiscall PlayGuideWin::UpdateMeWin(PlayGuideWin *this, float fCurTime)
{
  PlayGuideWin *v2; // edi@1
  int v3; // ebx@2
  int v4; // eax@2
  int v5; // esi@2
  PgWinBut **v6; // esi@3
  int v7; // eax@3
  int v8; // eax@4
  PgWinBut *v9; // ecx@4
  PgWinBut **v10; // esi@10
  int v11; // eax@10
  int v12; // eax@11
  PgWinBut *v13; // ecx@11
  PlayGuideWin::sTextList *v14; // esi@20
  int v15; // ebx@20
  int v16; // eax@20
  int v17; // edx@20
  PgWinBut *v18; // ecx@21
  int v19; // eax@21
  unsigned int uiSize; // [sp+Ch] [bp-1Ch]@2
  unsigned int uiSizea; // [sp+Ch] [bp-1Ch]@10
  unsigned int uiSizeb; // [sp+Ch] [bp-1Ch]@19
  int iUpIndex; // [sp+10h] [bp-18h]@2
  int v24; // [sp+14h] [bp-14h]@3
  int iBottomYPos; // [sp+18h] [bp-10h]@2
  int iTopYPos; // [sp+1Ch] [bp-Ch]@2
  signed int i; // [sp+20h] [bp-8h]@2
  signed int ia; // [sp+20h] [bp-8h]@9
  unsigned int ib; // [sp+20h] [bp-8h]@19
  char bAllStop; // [sp+26h] [bp-2h]@2
  char bAllStopa; // [sp+26h] [bp-2h]@19
  char bTopAllStop; // [sp+27h] [bp-1h]@2

  v2 = this;
  if ( this->m_bOpenTextList )
  {
    v3 = this->m_kTextList._Mylast - this->m_kTextList._Myfirst - 1;
    iTopYPos = (*(int (**)(void))(***(_DWORD ***)this->m_kTextList._Myfirst + 168))();
    iBottomYPos = ((int (*)(void))v2->m_kTextList._Myfirst[v3]->m_pkButWin->vfptr[42].__vecDelDtor)();
    v4 = v2->m_iViewIndex - v2->m_iCurPos;
    bTopAllStop = 1;
    v5 = v4 + 1;
    iUpIndex = v2->m_iViewIndex - v2->m_iCurPos;
    uiSize = v4 + 1;
    bAllStop = 1;
    i = 0;
    if ( v4 > 0 )
    {
      do
      {
        v6 = &v2->m_kTextList._Myfirst[i]->m_pkButWin;
        v24 = 2 * ((int (*)(void))(*v6)->vfptr[37].__vecDelDtor)();
        v7 = ((int (*)(void))(*v6)->vfptr[42].__vecDelDtor)();
        if ( v7 > iTopYPos )
        {
          v8 = v7 - v24;
          v9 = *v6;
          if ( v8 >= iTopYPos )
            ((void (__stdcall *)(_DWORD))v9->vfptr[44].__vecDelDtor)(v8);
          else
            ((void (__stdcall *)(_DWORD))v9->vfptr[44].__vecDelDtor)(iTopYPos);
        }
        bTopAllStop &= ((int (__thiscall *)(_DWORD))(*v6)->vfptr[42].__vecDelDtor)(*v6) == iTopYPos;
        ++i;
      }
      while ( i < iUpIndex );
      v5 = uiSize;
    }
    for ( ia = v5; ia < v3; ++ia )
    {
      v10 = &v2->m_kTextList._Myfirst[ia]->m_pkButWin;
      uiSizea = 2 * ((int (*)(void))(*v10)->vfptr[37].__vecDelDtor)();
      v11 = ((int (*)(void))(*v10)->vfptr[42].__vecDelDtor)();
      if ( v11 < iBottomYPos )
      {
        v12 = uiSizea + v11;
        v13 = *v10;
        if ( v12 <= iBottomYPos )
          ((void (__stdcall *)(_DWORD))v13->vfptr[44].__vecDelDtor)(v12);
        else
          ((void (__stdcall *)(_DWORD))v13->vfptr[44].__vecDelDtor)(iBottomYPos);
      }
      bAllStop &= ((int (__thiscall *)(_DWORD))(*v10)->vfptr[42].__vecDelDtor)(*v10) == iBottomYPos;
    }
    if ( bTopAllStop && bAllStop )
    {
      v2->m_bOpenTextList = 0;
      v2->m_eState = 0;
      PlayGuideWin::UpdateTextList(v2);
      PlayGuideWin::UpdateSelectedPage(v2);
    }
  }
  if ( !v2->m_bCloseTextList )
    goto LABEL_30;
  bAllStopa = 1;
  uiSizeb = v2->m_kTextList._Mylast - v2->m_kTextList._Myfirst;
  ib = 0;
  if ( !uiSizeb )
    goto LABEL_29;
  do
  {
    v14 = v2->m_kTextList._Myfirst[ib];
    v15 = 2 * ((int (*)(void))v14->m_pkButWin->vfptr[37].__vecDelDtor)();
    v16 = ((int (*)(void))v14->m_pkButWin->vfptr[42].__vecDelDtor)();
    v17 = v14->m_iDefaultYPos;
    if ( v16 <= v17 )
    {
      if ( v16 >= v17 )
        goto LABEL_27;
      v18 = v14->m_pkButWin;
      v19 = v15 + v16;
      if ( v19 > v17 )
      {
        ((void (__stdcall *)(_DWORD))v18->vfptr[44].__vecDelDtor)(v14->m_iDefaultYPos);
        goto LABEL_27;
      }
    }
    else
    {
      v18 = v14->m_pkButWin;
      v19 = v16 - v15;
      if ( v19 < v17 )
      {
        ((void (__stdcall *)(_DWORD))v18->vfptr[44].__vecDelDtor)(v14->m_iDefaultYPos);
        goto LABEL_27;
      }
    }
    ((void (__stdcall *)(_DWORD))v18->vfptr[44].__vecDelDtor)(v19);
LABEL_27:
    bAllStopa &= ((int (*)(void))v14->m_pkButWin->vfptr[42].__vecDelDtor)() == v14->m_iDefaultYPos;
    ++ib;
  }
  while ( ib < uiSizeb );
  if ( bAllStopa )
  {
LABEL_29:
    v2->m_bCloseTextList = 0;
    PlayGuideWin::UpdateSelectedPage(v2);
  }
LABEL_30:
  PlayGuideWin::UpdateScroll(v2);
}

//----- (0056D670) --------------------------------------------------------
PageWinSpr *__cdecl PageWinSpr::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, char *pcName, unsigned int uiExtStyle)
{
  PgWin *v6; // eax@1
  PgWin *v7; // esi@1
  PgWin *v8; // edi@8
  PageWinSpr *v9; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v11; // [sp+20h] [bp-4h]@1

  v6 = (PgWin *)operator new(0x144u);
  v7 = v6;
  result.m_pObject = v6;
  v11 = 0;
  if ( v6 )
  {
    PgWinSpr::PgWinSpr((PgWinSpr *)v6);
    v7->vfptr = (NiRefObjectVtbl *)&PageWinSpr::`vftable'{for `NiNode'};
    v7->vfptr = (IDirectMessengerVtbl *)&PageWinSpr::`vftable'{for `IDirectMessenger'};
    *(_DWORD *)&v7[1].m_uFlags = 15;
    v7[1].m_uiMaxSize = 0;
    LOBYTE(v7[1].m_pcName) = 0;
  }
  else
  {
    v7 = 0;
  }
  if ( v7 )
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  v11 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v7);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgSprData *, PgWin *, char *, unsigned int))v7->vfptr[127].__vecDelDtor)(
                          v7,
                          iXPos,
                          iYPos,
                          pkSprData,
                          pkParent,
                          pcName,
                          uiExtStyle) )
  {
    ((void (__thiscall *)(PgWin *))v7->vfptr[89].__vecDelDtor)(v7);
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = (PageWinSpr *)v7;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v7);
    if ( result.m_pObject )
    {
      v8 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v8 )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      }
    }
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = 0;
  }
  return v9;
}
// 99BABC: using guessed type void (__thiscall *PageWinSpr::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99BADC: using guessed type int (__thiscall *PageWinSpr::`vftable'{for `NiNode'})(void *p, char);

//----- (0056D7E0) --------------------------------------------------------
PlayGuideMinWin *__cdecl PlayGuideMinWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  PlayGuideMinWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x158u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&PlayGuideMinWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&PlayGuideMinWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (PlayGuideMinWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 99B878: using guessed type void (__thiscall *PlayGuideMinWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99B894: using guessed type int (__thiscall *PlayGuideMinWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0056D920) --------------------------------------------------------
void __thiscall PlayGuideWin::PlayGuideWin(PlayGuideWin *this)
{
  PlayGuideWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_iWebXPos = 0;
  v1->m_iWebYPos = 0;
  v1->m_iPlaneWebXPos = 0;
  v1->m_iPlaneWebYPos = 0;
  v1->m_uiWebWidth = 0;
  v1->m_uiWebHeight = 0;
  v1->m_uiPlaneWebWidth = 0;
  v1->m_uiPlaneWebHeight = 0;
  v1->m_iViewIndex = 0;
  v1->m_iPrevIndex = 0;
  v1->m_iNextIndex = 0;
  v1->m_iCurPos = 0;
  *(_WORD *)&v1->m_bOpenTextList = 0;
  v1->vfptr = (NiRefObjectVtbl *)&PlayGuideWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&PlayGuideWin::`vftable'{for `IDirectMessenger'};
  v1->m_kTextList._Myfirst = 0;
  v1->m_kTextList._Mylast = 0;
  v1->m_kTextList._Myend = 0;
  v1->m_vecGuideInfoList._Myfirst = 0;
  v1->m_vecGuideInfoList._Mylast = 0;
  v1->m_vecGuideInfoList._Myend = 0;
  v1->m_bWordSearch = 0;
  v1->m_iSplitCnt = 0;
  v1->m_iOldSlidePos = 0;
  v1->m_eBasicInfoCategory = 0;
  v1->m_eBasicInfoLinkType = 0;
  v1->m_acPrevSearchText[0] = 0;
  v1->m_eState = 1;
}
// 99BCE8: using guessed type void (__thiscall *PlayGuideWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99BD04: using guessed type int (__thiscall *PlayGuideWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0056D9E0) --------------------------------------------------------
void __thiscall PlayGuideWin::~PlayGuideWin(PlayGuideWin *this)
{
  PlayGuideWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&PlayGuideWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PlayGuideWin::`vftable'{for `IDirectMessenger'};
  if ( this->m_vecGuideInfoList._Myfirst )
    operator delete(this->m_vecGuideInfoList._Myfirst);
  v1->m_vecGuideInfoList._Myfirst = 0;
  v1->m_vecGuideInfoList._Mylast = 0;
  v1->m_vecGuideInfoList._Myend = 0;
  if ( v1->m_kTextList._Myfirst )
    operator delete(v1->m_kTextList._Myfirst);
  v1->m_kTextList._Myfirst = 0;
  v1->m_kTextList._Mylast = 0;
  v1->m_kTextList._Myend = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 99BCE8: using guessed type void (__thiscall *PlayGuideWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99BD04: using guessed type int (__thiscall *PlayGuideWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0056DA50) --------------------------------------------------------
PlayGuideWin *__cdecl PlayGuideWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  PlayGuideWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x230u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    PlayGuideWin::PlayGuideWin((PlayGuideWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (PlayGuideWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (0056DB80) --------------------------------------------------------
void __thiscall PlayGuideWin::SetInfo(PlayGuideWin *this, BasicInfoLinkType eType)
{
  PlayGuideWin *v2; // esi@1
  int v3; // eax@1
  unsigned int v4; // ebx@2
  unsigned int v5; // edi@4
  char *v6; // eax@5
  __int32 v7; // eax@9
  char *v8; // ecx@10
  char *v9; // edi@10
  SlideBar *v10; // ecx@12
  int v11; // eax@12
  NiUnsharedGeometryGroup *v12; // eax@14
  int v13; // edx@14
  char v14; // cl@15
  int v15; // eax@17

  v2 = this;
  this->m_eBasicInfoLinkType = eType;
  v3 = *(_DWORD *)(ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable + 56);
  if ( v3 )
    v4 = *(_DWORD *)(v3 + 40);
  else
    v4 = 0;
  v5 = 0;
  if ( v4 )
  {
    while ( 1 )
    {
      v6 = CDataReader::GetRecord((CDataReader *)(ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable + 4), v5);
      if ( v6 )
      {
        if ( *((_DWORD *)v6 + 1) == eType )
          break;
      }
      if ( ++v5 >= v4 )
        goto LABEL_10;
    }
    v7 = *(_DWORD *)v6;
    v2->m_eBasicInfoCategory = v7;
    v2->m_iViewIndex = v7;
    v2->m_iPrevIndex = v7 - 1;
    v2->m_iNextIndex = v2->m_iViewIndex + 1;
  }
LABEL_10:
  v8 = (char *)v2->m_vecGuideInfoList._Mylast;
  v9 = (char *)v2->m_vecGuideInfoList._Myfirst;
  if ( v9 != v8 )
  {
    memmove(v9, v8, 0);
    v2->m_vecGuideInfoList._Mylast = (BasicInfoFind **)v9;
  }
  v10 = v2->m_pkSlideBar;
  v11 = 37 - (v2->m_kTextList._Mylast - v2->m_kTextList._Myfirst) <= 0 ? 0 : 37
                                                                           - (v2->m_kTextList._Mylast
                                                                            - v2->m_kTextList._Myfirst);
  v2->m_iSplitCnt = v11;
  if ( v10 )
    SlideBar::SetSplitCnt(v10, v11);
  v2->m_bWordSearch = 0;
  v12 = TextData3::Get(0x8095BCC4);
  v13 = v2->m_acPrevSearchText - (char *)v12;
  do
  {
    v14 = (char)v12->vfptr;
    *((_BYTE *)&v12->vfptr + v13) = v12->vfptr;
    v12 = (NiUnsharedGeometryGroup *)((char *)v12 + 1);
  }
  while ( v14 );
  if ( v2->m_iViewIndex )
    v15 = v2->m_iPrevIndex;
  else
    v15 = 0;
  SlideBar::SetCurPos(v2->m_pkSlideBar, v15);
  v2->m_iCurPos = v2->m_pkSlideBar->m_nCurPos;
  *(_WORD *)&v2->m_bOpenTextList = 1;
}
// A8C1F8: using guessed type int ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable;

//----- (0056DCD0) --------------------------------------------------------
void __thiscall PlayGuideWin::OnSearchBtn(PlayGuideWin *this)
{
  PlayGuideWin *v1; // esi@1
  EditWinEx *v2; // ecx@1
  char *v3; // ebx@3
  NiUnsharedGeometryGroup *v4; // eax@4
  NiUnsharedGeometryGroup *v5; // eax@7
  GameFrameWork *v6; // edi@10
  NiUnsharedGeometryGroup *v7; // eax@11
  char **v8; // edi@13
  BasicInfoFindWord **v9; // ecx@13
  unsigned int v10; // eax@13
  unsigned int v11; // ebx@13
  char *v12; // ebx@17
  char *v13; // eax@23
  BasicInfoFind **v14; // edi@23
  GameFrameWork *v15; // edi@24
  NiUnsharedGeometryGroup *v16; // eax@25
  char *v17; // eax@27
  int v18; // edx@27
  char v19; // cl@28
  int v20; // ecx@30
  char v21; // al@31
  NiUnsharedGeometryGroup *v22; // eax@33
  GameFrameWork *v23; // edi@36
  NiUnsharedGeometryGroup *v24; // eax@37
  int v25; // eax@39
  SlideBar *v26; // ecx@42
  int v27; // ST10_4@42
  std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *> > kBasicInfoFindWordVector; // [sp+10h] [bp-F0h]@13
  char *SearchWord; // [sp+20h] [bp-E0h]@3
  unsigned int i; // [sp+24h] [bp-DCh]@13
  bool bTypeCheck[197]; // [sp+28h] [bp-D8h]@13
  int v32; // [sp+FCh] [bp-4h]@13

  v1 = this;
  v2 = this->m_pkGuideSearchTextEditWin;
  if ( !v2 || !v1->m_pkSlideBar )
    return;
  v3 = (char *)((int (*)(void))v2->vfptr[113].__vecDelDtor)();
  SearchWord = v3;
  if ( !_mbscmp(v1->m_acPrevSearchText, v3) )
  {
    v22 = TextData3::Get(0x8095BCC4);
    if ( _mbsnbcmp(v3, (const char *)v22, 0x10u) )
    {
      if ( _mbsnbcmp(v3, &byte_99B637, 0x10u) )
      {
        if ( v1->m_vecGuideInfoList._Myfirst == v1->m_vecGuideInfoList._Mylast )
        {
          v23 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
          if ( v23 )
          {
            v24 = TextData3::Get(0x487D7DCCu);
            GameFrameWork::AddSysMsg(v23, (const char *)v24);
          }
        }
      }
    }
    if ( v1->m_eState )
      v25 = 0;
    else
      v25 = v1->m_iOldSlidePos;
    v1->m_iCurPos = v25;
    goto LABEL_42;
  }
  v4 = TextData3::Get(0x8095BCC4);
  if ( _mbsnbcmp(v3, (const char *)v4, 0x10u) && _mbsnbcmp(v3, &byte_99B62A, 0x10u) )
    PlayGuideWin::EraseAllSpace(v1, v3);
  v5 = TextData3::Get(0x8095BCC4);
  if ( !_mbsnbcmp(v3, (const char *)v5, 0x10u) || !_mbsnbcmp(v3, &byte_99B62B, 0x10u) )
  {
    std::vector<unsigned long,std::allocator<unsigned long>>::clear(&v1->m_vecGuideInfoList);
    v1->m_iSplitCnt = 37 - (v1->m_kTextList._Mylast - v1->m_kTextList._Myfirst);
    v1->m_bWordSearch = 0;
    v20 = v1->m_acPrevSearchText - v3;
    do
    {
      v21 = *v3;
      v3[v20] = *v3;
      ++v3;
    }
    while ( v21 );
    v1->m_iCurPos = 0;
LABEL_42:
    v26 = v1->m_pkSlideBar;
    v27 = v1->m_iSplitCnt <= 0 ? 0 : v1->m_iSplitCnt;
    v1->m_iSplitCnt = v27;
    SlideBar::SetSplitCnt(v26, v27);
    SlideBar::SetCurPos(v1->m_pkSlideBar, v1->m_iCurPos);
    v1->m_eState = 1;
    PlayGuideWin::UpdateTextList(v1);
    *(_WORD *)&v1->m_bOpenTextList = 256;
    v1->m_pkGuideSearchTextEditWin->vfptr[121].__vecDelDtor((NiRefObject *)v1->m_pkGuideSearchTextEditWin, 1u);
    return;
  }
  if ( strlen(v3) > 2 )
  {
    v8 = (char **)&v1->m_vecGuideInfoList;
    std::vector<unsigned long,std::allocator<unsigned long>>::clear(&v1->m_vecGuideInfoList);
    kBasicInfoFindWordVector._Myfirst = 0;
    kBasicInfoFindWordVector._Mylast = 0;
    kBasicInfoFindWordVector._Myend = 0;
    v32 = 0;
    BasicInfoFindWordTab::GetListByWord(v3, &kBasicInfoFindWordVector);
    bTypeCheck[0] = 0;
    memset((char *)&bTypeCheck[1], 0, 0xC4u);
    v9 = kBasicInfoFindWordVector._Myfirst;
    v10 = 0;
    v11 = kBasicInfoFindWordVector._Mylast - kBasicInfoFindWordVector._Myfirst;
    i = 0;
    if ( v11 )
    {
      do
      {
        if ( v9[v10] )
        {
          BasicInfoFindTab::GetListByFindType(v9[v10]->BIL_GuideFind, &v1->m_vecGuideInfoList, bTypeCheck);
          v10 = i;
          v9 = kBasicInfoFindWordVector._Myfirst;
        }
        i = ++v10;
      }
      while ( v10 < v11 );
    }
    v12 = *v8;
    if ( *v8 != (char *)v1->m_vecGuideInfoList._Mylast )
    {
      i = (unsigned int)(v12 + 4);
      do
      {
        if ( BasicInfoLinkTab::GetByType(**(BasicInfoLinkType **)v12) )
        {
          v12 += 4;
          i += 4;
        }
        else
        {
          memmove(v12, (char *)i, 4 * ((signed int)((signed int)v1->m_vecGuideInfoList._Mylast - i) >> 2));
          --v1->m_vecGuideInfoList._Mylast;
        }
      }
      while ( v12 != (char *)v1->m_vecGuideInfoList._Mylast );
    }
    v13 = *v8;
    v14 = v1->m_vecGuideInfoList._Mylast;
    if ( (BasicInfoFind **)v13 == v14 )
    {
      v1->m_iSplitCnt = 37 - (v1->m_kTextList._Mylast - v1->m_kTextList._Myfirst);
      v1->m_bWordSearch = 0;
      v15 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v15 )
      {
        v16 = TextData3::Get(0x487D7DCCu);
        GameFrameWork::AddSysMsg(v15, (const char *)v16);
      }
    }
    else
    {
      v1->m_iSplitCnt = (((char *)v14 - v13) >> 2) - (v1->m_kTextList._Mylast - v1->m_kTextList._Myfirst) + 1;
      v1->m_bWordSearch = 1;
    }
    v17 = SearchWord;
    v18 = v1->m_acPrevSearchText - SearchWord;
    do
    {
      v19 = *v17;
      v17[v18] = *v17;
      ++v17;
    }
    while ( v19 );
    v32 = -1;
    std::vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>::~vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>((std::vector<HeightMapMaker::TriangleIndex *,std::allocator<HeightMapMaker::TriangleIndex *> > *)&kBasicInfoFindWordVector);
    v1->m_iCurPos = 0;
    goto LABEL_42;
  }
  v6 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v6 )
  {
    v7 = TextData3::Get(0x4B70D6D2u);
    GameFrameWork::AddSysMsg(v6, (const char *)v7);
  }
  ((void (__stdcall *)(signed int))v1->m_pkGuideSearchTextEditWin->vfptr[121].__vecDelDtor)(1);
}

//----- (0056E100) --------------------------------------------------------
void __thiscall PlayGuideWin::OpenPlayGuideSearchList(PlayGuideWin *this, char *acUIFile)
{
  PlayGuideWin *v2; // esi@1
  BasicInfoFindUI *v3; // eax@2
  BasicInfoFindWord *v4; // eax@3
  GameFrameWork *v5; // eax@6

  v2 = this;
  if ( acUIFile
    && (v3 = BasicInfoFindUITab::GetByUIFile(acUIFile)) != 0
    && (v4 = BasicInfoFindWordTab::GetByFindType(v3->BIL_GuideFind)) != 0
    && v2->m_pkGuideSearchTextEditWin )
  {
    ((void (__stdcall *)(_DWORD))v2->m_pkGuideSearchTextEditWin->vfptr[115].__vecDelDtor)(v4->BIL_FindWord);
    PlayGuideWin::OnSearchBtn(v2);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
  }
  else
  {
    v5 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v5 )
      GameFrameWork::OpenHelpWin(v5);
  }
}

//----- (0056E180) --------------------------------------------------------
void __thiscall PlayGuideWin::OnEditEnd(PlayGuideWin *this, unsigned int wParam, int lParam)
{
  PlayGuideWin::OnSearchBtn(this);
}

//----- (0056E190) --------------------------------------------------------
void __thiscall PageWinSpr::SetToolTip(PageWinSpr *this, const char *pcText)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&this->m_kToolTip, pcText, strlen(pcText));
}

//----- (0056E1C0) --------------------------------------------------------
char __thiscall PlayGuideWin::Create(PlayGuideWin *this, PgFrameWork *pkFrameWork)
{
  PlayGuideWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiAVObject *v5; // eax@4
  NiTexturingProperty *v6; // eax@4
  NiTexturingProperty *v7; // edi@4
  NiTexturingProperty::Map *v8; // eax@6
  PgSprData *v9; // eax@9
  NiNode *v10; // esi@12
  char result; // al@16
  int v12; // edi@17
  int v13; // ebx@17
  NiNode *v14; // esi@20
  PgFont *v15; // eax@24
  PgWinText *v16; // eax@24
  void *(__thiscall *v17)(NiRefObject *, unsigned int); // edx@24
  NiUnsharedGeometryGroup *v18; // eax@24
  PgSprData *v19; // eax@24
  PgWinSpr *v20; // eax@24
  PgSprData *v21; // eax@24
  PgSprData *v22; // eax@24
  PgWinSpr *v23; // eax@24
  NiSourceTexture *v24; // ST4C_4@24
  NiNode *v25; // ecx@24
  PgWinText *v26; // eax@26
  D3DXCOLOR *v27; // eax@26
  PgWinText *v28; // eax@27
  PgTextGeometry *v29; // ecx@27
  PgSprData *v30; // eax@29
  PgWinSpr *v31; // eax@29
  PgWinText *v32; // eax@30
  PgTextGeometry *v33; // eax@30
  PgWinBut *v34; // eax@32
  PgWinBut *v35; // eax@32
  EditWinEx *v36; // eax@33
  NiUnsharedGeometryGroup *v37; // eax@33
  EditWinEx *v38; // ecx@33
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v39; // eax@33
  NiUnsharedGeometryGroup *v40; // eax@33
  NiUnsharedGeometryGroup *v41; // eax@33
  int v42; // ecx@33
  char v43; // dl@34
  PgWinBut *v44; // eax@35
  unsigned int v45; // ecx@35
  int v46; // edx@35
  unsigned int v47; // edi@35
  unsigned int v48; // ebx@35
  PgWin *v49; // ST5C_4@35
  PgFont *v50; // eax@35
  PgWinText *v51; // edi@35
  NiRefObjectVtbl *v52; // ebx@35
  NiUnsharedGeometryGroup *v53; // eax@35
  NiRefObjectVtbl *v54; // edi@35
  NiNode *v55; // ebx@35
  char *v56; // eax@35
  PlayGuideWin::sTextList *v57; // eax@36
  PlayGuideWin::sTextList *v58; // edi@37
  NiNode *v59; // ebx@39
  const char *v60; // eax@39
  PgSprData *v61; // ebx@39
  const char *v62; // eax@39
  const char *v63; // eax@39
  PgWinBut *v64; // eax@39
  unsigned int v65; // ecx@39
  PgSprData::PgHitTester *v66; // eax@39
  unsigned int v67; // ebx@39
  PgWin *v68; // ST5C_4@39
  PgFont *v69; // eax@39
  PgWinText *v70; // eax@39
  NiRefObjectVtbl *v71; // edi@39
  NiNode *v72; // ebx@39
  char *v73; // eax@39
  PgSprData *v74; // eax@40
  SlideBar *v75; // eax@40
  int v76; // edx@40
  D3DXCOLOR kColor; // [sp+78h] [bp-84h]@24
  UIUtil ui; // [sp+88h] [bp-74h]@24
  int iOffY; // [sp+9Ch] [bp-60h]@17
  int iOffX; // [sp+A0h] [bp-5Ch]@17
  unsigned int i; // [sp+A4h] [bp-58h]@24
  NiSourceTexture *pkTexture; // [sp+A8h] [bp-54h]@7
  NiPointer<NiTexturingProperty> spTexProp; // [sp+ACh] [bp-50h]@4
  PlayGuideWin::sTextList *pkTextList; // [sp+B0h] [bp-4Ch]@1
  unsigned int uiWidth; // [sp+B4h] [bp-48h]@17
  PgFont *pkFont; // [sp+B8h] [bp-44h]@24
  unsigned int uiHeight; // [sp+BCh] [bp-40h]@17
  const unsigned int uiControlIndex; // [sp+C0h] [bp-3Ch]@24
  int iTop; // [sp+C4h] [bp-38h]@9
  int iLeft; // [sp+C8h] [bp-34h]@9
  NiPointer<NiNode> spNode; // [sp+CCh] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v92; // [sp+D0h] [bp-2Ch]@26
  int v93; // [sp+F8h] [bp-4h]@1

  v2 = this;
  pkTextList = (PlayGuideWin::sTextList *)pkFrameWork;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v93 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\PlayGuideWin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Panel01");
  v6 = (NiTexturingProperty *)NiAVObject::GetProperty(v5, 8);
  v7 = v6;
  spTexProp.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v8 = *v7->m_kMaps.m_pBase;
  LOBYTE(v93) = 1;
  if ( v8 )
    pkTexture = (NiSourceTexture *)v8->m_spTexture.m_pObject;
  else
    pkTexture = 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iLeft, &iTop, pkTexture);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, (PgFrameWork *)pkTextList, "PlayGuideContent", 0) )
  {
    LOBYTE(v93) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v10 = spNode.m_pObject;
    v93 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
    return 0;
  }
  v12 = iLeft;
  v13 = iTop;
  iOffX = iLeft;
  iOffY = iTop;
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &iLeft, &iTop, &uiWidth, &uiHeight) )
  {
    v15 = Font::Get(0);
    kColor.g = Color::m_kDxWinTitleColor.g;
    pkFont = v15;
    kColor.r = Color::m_kDxWinTitleColor.r;
    kColor.a = Color::m_kDxWinTitleColor.a;
    kColor.b = Color::m_kDxWinTitleColor.b;
    v16 = PgWinText::CreateWin(iLeft - v12, iTop - v13, uiWidth, uiHeight, v15, (PgWin *)&v2->vfptr, 0, 0);
    v17 = v16->vfptr[117].__vecDelDtor;
    uiControlIndex = (const unsigned int)v16;
    v17((NiRefObject *)&v16->vfptr, (unsigned int)&kColor);
    (*(void (__stdcall **)(signed int))(*(_DWORD *)uiControlIndex + 488))(1);
    pkTextList = (PlayGuideWin::sTextList *)(*(_DWORD *)uiControlIndex + 472);
    v18 = TextData2::Get(0xE0EC2B54);
    ((void (__thiscall *)(const unsigned int, NiUnsharedGeometryGroup *))pkTextList->m_pkButWin)(uiControlIndex, v18);
    (*(void (__stdcall **)(_DWORD))(*(_DWORD *)uiControlIndex + 240))(0);
    v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, 0);
    v20 = PgWinSpr::CreateWin(iLeft - v12, iTop - v13, v19, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkThemeSprWin = v20;
    v20->vfptr[64].__vecDelDtor((NiRefObject *)v20, 0);
    v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iLeft, &iTop, pkTexture);
    PgWinSpr::CreateWin(iLeft - v12, iTop - v13, v21, (PgWin *)&v2->vfptr, 0, 0);
    v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &iLeft, &iTop, pkTexture);
    v23 = PgWinSpr::CreateWin(iLeft - v12, iTop - v13, v22, (PgWin *)&v2->vfptr, 0, 0);
    v24 = pkTexture;
    v25 = spNode.m_pObject;
    v2->m_pkListPanel = v23;
    uiControlIndex = (const unsigned int)PgSprData::Create((NiAVObject *)&v25->vfptr, "ClsNor", &iLeft, &iTop, v24);
    PgSprData::Add((PgSprData *)uiControlIndex, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
    PgSprData::Add((PgSprData *)uiControlIndex, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
    PgWinBut::CreateWin(iLeft - v12, iTop - v13, (PgSprData *)uiControlIndex, (PgWin *)&v2->vfptr, 2u, 0, 0);
    MenuTexMgr::GetTexture(0x18u);
    UIUtil::UIUtil(&ui);
    LOBYTE(v93) = 2;
    UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
    UIUtil::SetOffset(&ui, 0, 0);
    UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
    i = (unsigned int)UIUtil::AddOutLineFromFontType(GTFONT, 1u);
    if ( !PgUtil::GetTriShapeRect(
            (NiAVObject *)&spNode.m_pObject->vfptr,
            "GuideTitle",
            &iLeft,
            &iTop,
            &uiWidth,
            &uiHeight) )
      goto LABEL_43;
    v26 = PgWinText::CreateWin(iLeft - v12, iTop - v13, uiWidth, uiHeight, (PgFont *)i, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkGuideTitleTextWin = v26;
    v26->vfptr[122].__vecDelDtor((NiRefObject *)v26, 1u);
    pkTextList = (PlayGuideWin::sTextList *)&v2->m_pkGuideTitleTextWin->vfptr[117];
    v27 = Color::GetDxColor((D3DXCOLOR *)&v92._Bx._Alias[12], -4, -114, 0, -1);
    ((void (__thiscall *)(PgWinText *, D3DXCOLOR *))pkTextList->m_pkButWin)(v2->m_pkGuideTitleTextWin, v27);
    ((void (__stdcall *)(_DWORD))v2->m_pkGuideTitleTextWin->vfptr[64].__vecDelDtor)(0);
    if ( !PgUtil::GetTriShapeRect(
            (NiAVObject *)&spNode.m_pObject->vfptr,
            "GuideExplanation",
            &iLeft,
            &iTop,
            &uiWidth,
            &uiHeight) )
      goto LABEL_43;
    v28 = PgWinText::CreateWin(iLeft - v12, iTop - v13, uiWidth, uiHeight, pkFont, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkGuideExplanationTextWin = v28;
    v28->vfptr[64].__vecDelDtor((NiRefObject *)v28, 0);
    v29 = v2->m_pkGuideExplanationTextWin->m_spTextGeom.m_pObject;
    if ( v29 )
    {
      *(_WORD *)&v29->m_bAutoWordWrap = 257;
      SpScreenText::SetVerticalGap((SpScreenText *)&v29->vfptr, 4);
    }
    v30 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GuideImage", &iLeft, &iTop, 0);
    v31 = PgWinSpr::CreateWin(iLeft - v12, iTop - v13, v30, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkGuideImageSprWin = v31;
    v31->vfptr[64].__vecDelDtor((NiRefObject *)v31, 0);
    if ( !PgUtil::GetTriShapeRect(
            (NiAVObject *)&spNode.m_pObject->vfptr,
            "GuidePageNumText",
            &iLeft,
            &iTop,
            &uiWidth,
            &uiHeight) )
      goto LABEL_43;
    v32 = PgWinText::CreateWin(iLeft - v12, iTop - v13, uiWidth, uiHeight, (PgFont *)i, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkGuidePageNumTextWin = v32;
    v32->vfptr[122].__vecDelDtor((NiRefObject *)v32, 1u);
    ((void (__stdcall *)(_DWORD))v2->m_pkGuidePageNumTextWin->vfptr[64].__vecDelDtor)(0);
    v33 = v2->m_pkGuidePageNumTextWin->m_spTextGeom.m_pObject;
    if ( v33 )
      v33->m_bTextCmdOn = 1;
    uiControlIndex = (const unsigned int)PgSprData::Create(
                                           (NiAVObject *)&spNode.m_pObject->vfptr,
                                           "GuidePage_Nor00",
                                           &iLeft,
                                           &iTop,
                                           0);
    PgSprData::Add((PgSprData *)uiControlIndex, (NiAVObject *)&spNode.m_pObject->vfptr, "GuidePage_Click00");
    PgSprData::Add((PgSprData *)uiControlIndex, (NiAVObject *)&spNode.m_pObject->vfptr, "GuidePage_Over00");
    v34 = PgWinBut::CreateWin(iLeft - v12, iTop - v13, (PgSprData *)uiControlIndex, (PgWin *)&v2->vfptr, 3u, 0, 0);
    v2->m_pkGuidePageLeftButWin = v34;
    v34->vfptr[64].__vecDelDtor((NiRefObject *)v34, 0);
    uiControlIndex = (const unsigned int)PgSprData::Create(
                                           (NiAVObject *)&spNode.m_pObject->vfptr,
                                           "GuidePage_Nor01",
                                           &iLeft,
                                           &iTop,
                                           0);
    PgSprData::Add((PgSprData *)uiControlIndex, (NiAVObject *)&spNode.m_pObject->vfptr, "GuidePage_Click01");
    PgSprData::Add((PgSprData *)uiControlIndex, (NiAVObject *)&spNode.m_pObject->vfptr, "GuidePage_Over01");
    v35 = PgWinBut::CreateWin(iLeft - v12, iTop - v13, (PgSprData *)uiControlIndex, (PgWin *)&v2->vfptr, 4u, 0, 0);
    v2->m_pkGuidePageRightButWin = v35;
    v35->vfptr[64].__vecDelDtor((NiRefObject *)v35, 0);
    if ( PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "GuideSerchText",
           &iLeft,
           &iTop,
           &uiWidth,
           &uiHeight) )
    {
      v36 = EditWinEx::CreateWin(
              iLeft - v12,
              iTop - v13,
              uiWidth,
              uiHeight,
              (PgWin *)&v2->vfptr,
              NORMAL,
              0x10u,
              1u,
              0,
              0,
              1);
      v2->m_pkGuideSearchTextEditWin = v36;
      EditWinEx::SetFocusClear(v36, 1);
      v37 = TextData3::Get(0x8095BCC4);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &v92,
        (const char *)v37);
      v38 = v2->m_pkGuideSearchTextEditWin;
      LOBYTE(v93) = 3;
      EditWinEx::SetDefaultStr(v38, v39);
      LOBYTE(v93) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v92);
      pkFont = (PgFont *)&v2->m_pkGuideSearchTextEditWin->vfptr[115];
      v40 = TextData3::Get(0x8095BCC4);
      ((void (__thiscall *)(EditWinEx *, NiUnsharedGeometryGroup *))pkFont->vfptr)(v2->m_pkGuideSearchTextEditWin, v40);
      v41 = TextData3::Get(0x8095BCC4);
      v42 = v2->m_acPrevSearchText - (char *)v41;
      do
      {
        v43 = (char)v41->vfptr;
        *((_BYTE *)&v41->vfptr + v42) = v41->vfptr;
        v41 = (NiUnsharedGeometryGroup *)((char *)v41 + 1);
      }
      while ( v43 );
      uiControlIndex = (const unsigned int)PgSprData::Create(
                                             (NiAVObject *)&spNode.m_pObject->vfptr,
                                             "ListBtnNor",
                                             &iLeft,
                                             &iTop,
                                             0);
      PgSprData::Add((PgSprData *)uiControlIndex, (NiAVObject *)&spNode.m_pObject->vfptr, "ListBtnClick");
      PgSprData::Add((PgSprData *)uiControlIndex, (NiAVObject *)&spNode.m_pObject->vfptr, "ListBtnOver");
      v44 = PgWinBut::CreateWin(iLeft - v12, iTop - v13, (PgSprData *)uiControlIndex, (PgWin *)&v2->vfptr, 5u, 0, 0);
      v45 = uiControlIndex;
      v2->m_pkListButWin = v44;
      v46 = *(_DWORD *)(v45 + 36);
      v47 = *(_DWORD *)(*(_DWORD *)v46 + 24);
      v48 = *(_DWORD *)(*(_DWORD *)v46 + 20);
      v49 = (PgWin *)v44;
      v50 = Font::Get(BOLD);
      v51 = PgWinText::CreateWin(0, 0, v48, v47, v50, v49, 0, 0);
      v51->vfptr[122].__vecDelDtor((NiRefObject *)v51, 5u);
      v52 = v51->vfptr;
      v53 = TextData3::Get(0xBED5D4DE);
      v52[118].__vecDelDtor((NiRefObject *)v51, (unsigned int)v53);
      v51->vfptr[60].__vecDelDtor((NiRefObject *)v51, 0);
      v54 = spNode.m_pObject->vfptr;
      i = 0;
      uiControlIndex = 0;
      v55 = spNode.m_pObject;
      v56 = fs("TextList%02dNor", 0);
      if ( v54[18].__vecDelDtor((NiRefObject *)v55, (unsigned int)v56) )
      {
        do
        {
          v57 = (PlayGuideWin::sTextList *)operator new(0xCu);
          if ( v57 )
          {
            v57->m_pkButWin = 0;
            v57->m_pkTextWin = 0;
            v57->m_iDefaultYPos = 0;
            v58 = v57;
          }
          else
          {
            v58 = 0;
          }
          v59 = spNode.m_pObject;
          pkTextList = v58;
          v60 = fs("TextList%02dNor", uiControlIndex);
          v61 = PgSprData::Create((NiAVObject *)&v59->vfptr, v60, &iLeft, &iTop, 0);
          pkFont = (PgFont *)spNode.m_pObject;
          v62 = fs("TextList%02dClick", uiControlIndex);
          PgSprData::Add(v61, (NiAVObject *)pkFont, v62);
          pkFont = (PgFont *)spNode.m_pObject;
          v63 = fs("TextList%02dOver", uiControlIndex);
          PgSprData::Add(v61, (NiAVObject *)pkFont, v63);
          v64 = PgWinBut::CreateWin(iLeft - iOffX, iTop - iOffY, v61, (PgWin *)&v2->vfptr, 0, 0, 0);
          v65 = i;
          v58->m_pkButWin = v64;
          v64->vfptr[130].__vecDelDtor((NiRefObject *)v64, v65);
          v66 = v61->m_akHitTester.m_pBase->m_pObject;
          v67 = v66->m_uiHeight;
          v68 = (PgWin *)&v58->m_pkButWin->vfptr;
          pkFont = (PgFont *)v66->m_uiWidth;
          v69 = Font::Get(BOLD);
          v70 = PgWinText::CreateWin(0, 0, (unsigned int)pkFont, v67, v69, v68, 0, 0);
          v58->m_pkTextWin = v70;
          v70->vfptr[122].__vecDelDtor((NiRefObject *)v70, 5u);
          ((void (__stdcall *)(_DWORD))v58->m_pkTextWin->vfptr[60].__vecDelDtor)(0);
          v58->m_iDefaultYPos = ((int (*)(void))v58->m_pkButWin->vfptr[42].__vecDelDtor)();
          std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
            (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_kTextList,
            (const unsigned int *)&pkTextList);
          v71 = spNode.m_pObject->vfptr;
          uiControlIndex = ++i;
          v72 = spNode.m_pObject;
          v73 = fs("TextList%02dNor", i);
        }
        while ( v71[18].__vecDelDtor((NiRefObject *)v72, (unsigned int)v73) );
      }
      v74 = PgSprData::Create(
              (NiAVObject *)&spNode.m_pObject->vfptr,
              "SlideBar_SlideBtnMiddle",
              &iLeft,
              &iTop,
              pkTexture);
      v75 = SlideBar::CreateWin(
              spNode.m_pObject,
              "SlideBar",
              "SlideBar_UpBtn",
              "SlideBar_DnBtn",
              v74,
              0,
              (PgWin *)&v2->vfptr);
      v2->m_pkSlideBar = v75;
      v75->m_uiClickMsg = 1;
      v2->m_pkSlideBar->m_eType = 1;
      v76 = v2->m_kTextList._Mylast - v2->m_kTextList._Myfirst;
      SlideBar::SetSplitCnt(v2->m_pkSlideBar, (37 - v76) & ((37 - v76 <= 0) - 1));
      v2->m_iSplitCnt = v2->m_pkSlideBar->m_nSplitCnt;
      ((void (__thiscall *)(PlayGuideWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
        v2,
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        1.0,
        0.5);
      LOBYTE(v93) = 1;
      UIUtil::~UIUtil(&ui);
      LOBYTE(v93) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
      v93 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 1;
    }
    else
    {
LABEL_43:
      LOBYTE(v93) = 1;
      UIUtil::~UIUtil(&ui);
      LOBYTE(v93) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
      v93 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 0;
    }
  }
  else
  {
    LOBYTE(v93) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
      spTexProp.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spTexProp.m_pObject, 1u);
    v14 = spNode.m_pObject;
    v93 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v14 )
      return 0;
    v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0056ECD0) --------------------------------------------------------
void __thiscall PlayGuideWin::OnCommand(PlayGuideWin *this, unsigned int wParam, int lParam)
{
  SlideBar *v3; // eax@3

  switch ( wParam )
  {
    case 0u:
      PlayGuideWin::OnTextList(this, lParam);
      break;
    case 1u:
      v3 = this->m_pkSlideBar;
      if ( v3 )
      {
        this->m_iCurPos = v3->m_nCurPos;
        PlayGuideWin::UpdateTextList(this);
      }
      break;
    case 2u:
      GameFrameWork::ClosePlayGuideWin((GameFrameWork *)this->m_pkFrameWork);
      break;
    case 5u:
      PlayGuideWin::OnSearchBtn(this);
      break;
    case 3u:
      PlayGuideWin::OnPageBtn(this, 1);
      break;
    case 4u:
      PlayGuideWin::OnPageBtn(this, 0);
      break;
    default:
      return;
  }
}

//----- (0056ED60) --------------------------------------------------------
PlayGuideMinWin *__thiscall PlayGuideMinWin::`vector deleting destructor'(PlayGuideMinWin *this, unsigned int a2)
{
  PlayGuideMinWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&PlayGuideMinWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PlayGuideMinWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 99B878: using guessed type void (__thiscall *PlayGuideMinWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99B894: using guessed type int (__thiscall *PlayGuideMinWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0056EDA0) --------------------------------------------------------
BasicInfoLink *__cdecl BasicInfoLinkTab::GetByType(BasicInfoLinkType eType)
{
  int v1; // eax@1
  unsigned int v2; // edi@2
  unsigned int v3; // esi@4
  BasicInfoLink *result; // eax@5

  v1 = *(_DWORD *)(ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable + 56);
  if ( v1 )
    v2 = *(_DWORD *)(v1 + 40);
  else
    v2 = 0;
  v3 = 0;
  if ( v2 )
  {
    while ( 1 )
    {
      result = (BasicInfoLink *)CDataReader::GetRecord(
                                  (CDataReader *)(ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable + 4),
                                  v3);
      if ( result )
      {
        if ( result->BIL_GuideType == eType )
          break;
      }
      if ( ++v3 >= v2 )
        goto LABEL_8;
    }
  }
  else
  {
LABEL_8:
    result = 0;
  }
  return result;
}
// A8C1F8: using guessed type int ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable;

//----- (0056EDF0) --------------------------------------------------------
BasicInfoLink *__cdecl BasicInfoLinkTab::GetByCategory(BasicInfoCategory eCategory)
{
  int v1; // eax@1
  unsigned int v2; // edi@2
  unsigned int v3; // esi@4
  BasicInfoLink *result; // eax@5

  v1 = *(_DWORD *)(ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable + 56);
  if ( v1 )
    v2 = *(_DWORD *)(v1 + 40);
  else
    v2 = 0;
  v3 = 0;
  if ( v2 )
  {
    while ( 1 )
    {
      result = (BasicInfoLink *)CDataReader::GetRecord(
                                  (CDataReader *)(ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable + 4),
                                  v3);
      if ( result )
      {
        if ( result->BIL_Category == eCategory )
          break;
      }
      if ( ++v3 >= v2 )
        goto LABEL_8;
    }
  }
  else
  {
LABEL_8:
    result = 0;
  }
  return result;
}
// A8C1F8: using guessed type int ITableBase<BasicInfoLink,BasicInfoLinkTab>::ms_pkTable;

//----- (0056EE40) --------------------------------------------------------
BasicInfoFindWord *__cdecl BasicInfoFindWordTab::GetByFindType(BasicInfoFindType eType)
{
  int v1; // eax@1
  unsigned int v2; // edi@2
  unsigned int v3; // esi@4
  BasicInfoFindWord *result; // eax@5

  v1 = *(_DWORD *)(ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::ms_pkTable + 56);
  if ( v1 )
    v2 = *(_DWORD *)(v1 + 40);
  else
    v2 = 0;
  v3 = 0;
  if ( v2 )
  {
    while ( 1 )
    {
      result = (BasicInfoFindWord *)CDataReader::GetRecord(
                                      (CDataReader *)(ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::ms_pkTable + 4),
                                      v3);
      if ( result )
      {
        if ( result->BIL_GuideFind == eType )
          break;
      }
      if ( ++v3 >= v2 )
        goto LABEL_8;
    }
  }
  else
  {
LABEL_8:
    result = 0;
  }
  return result;
}
// A8C20C: using guessed type int ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::ms_pkTable;

//----- (0056EE90) --------------------------------------------------------
PageWinSpr *__thiscall PageWinSpr::`scalar deleting destructor'(PageWinSpr *this, unsigned int a2)
{
  PageWinSpr *v2; // esi@1

  v2 = this;
  if ( this->m_kToolTip._Myres >= 0x10 )
    operator delete(this->m_kToolTip._Bx._Ptr);
  v2->m_kToolTip._Myres = 15;
  v2->m_kToolTip._Mysize = 0;
  v2->m_kToolTip._Bx._Buf[0] = 0;
  PgWinSpr::~PgWinSpr((PgWinSpr *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0056EEF0) --------------------------------------------------------
void __cdecl BasicInfoFindTab::GetListByFindType(BasicInfoFindType eType, std::vector<BasicInfoFind *,std::allocator<BasicInfoFind *> > *pkBasicInfoFindVector, bool *pabTypeCheck)
{
  int v3; // eax@3
  unsigned int v4; // edi@4
  unsigned int v5; // esi@6
  char *v6; // eax@7
  BasicInfoFind *pkData; // [sp+8h] [bp-D0h]@7
  bool bSameCheck[197]; // [sp+Ch] [bp-CCh]@11

  if ( pkBasicInfoFindVector && pabTypeCheck )
  {
    v3 = *(_DWORD *)(ITableBase<BasicInfoFind,BasicInfoFindTab>::ms_pkTable + 56);
    v4 = v3 ? *(_DWORD *)(v3 + 40) : 0;
    v5 = 0;
    if ( v4 )
    {
      do
      {
        v6 = CDataReader::GetRecord((CDataReader *)(ITableBase<BasicInfoFind,BasicInfoFindTab>::ms_pkTable + 4), v5);
        pkData = (BasicInfoFind *)v6;
        if ( v6 && *(_DWORD *)v6 < 197 && *((_DWORD *)v6 + 1) == eType && !pabTypeCheck[*(_DWORD *)v6] )
        {
          pabTypeCheck[*(_DWORD *)v6] = 1;
          bSameCheck[*(_DWORD *)v6] = 1;
          std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
            (std::vector<unsigned long,std::allocator<unsigned long> > *)pkBasicInfoFindVector,
            (const unsigned int *)&pkData);
        }
        ++v5;
      }
      while ( v5 < v4 );
    }
  }
}
// A8C204: using guessed type int ITableBase<BasicInfoFind,BasicInfoFindTab>::ms_pkTable;

//----- (0056EFB0) --------------------------------------------------------
void __cdecl BasicInfoFindWordTab::GetListByWord(char *FindWord, std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *> > *BasicInfoFindWordVector)
{
  int v2; // eax@3
  unsigned int v3; // ebx@4
  unsigned int v4; // edi@6
  char *v5; // eax@7
  char *v6; // esi@7
  char *v7; // eax@8
  char v8; // cl@9
  std::vector<unsigned long,std::allocator<unsigned long> > *v9; // ecx@13
  BasicInfoFindWord *pkData; // [sp+0h] [bp-16Ch]@7
  std::vector<unsigned long,std::allocator<unsigned long> > *v11; // [sp+4h] [bp-168h]@1
  char *string; // [sp+8h] [bp-164h]@1
  char BIL_Word[256]; // [sp+Ch] [bp-160h]@9
  bool bTypeCheck[90]; // [sp+10Ch] [bp-60h]@6

  string = FindWord;
  v11 = (std::vector<unsigned long,std::allocator<unsigned long> > *)BasicInfoFindWordVector;
  if ( BasicInfoFindWordVector && FindWord )
  {
    v2 = *(_DWORD *)(ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::ms_pkTable + 56);
    v3 = v2 ? *(_DWORD *)(v2 + 40) : 0;
    bTypeCheck[0] = 0;
    memset((char *)&bTypeCheck[1], 0, 0x59u);
    v4 = 0;
    if ( v3 )
    {
      do
      {
        v5 = CDataReader::GetRecord(
               (CDataReader *)(ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::ms_pkTable + 4),
               v4);
        v6 = v5;
        pkData = (BasicInfoFindWord *)v5;
        if ( v5 )
        {
          v7 = v5 + 4;
          do
          {
            v8 = *v7;
            v7[BIL_Word - (v6 + 4)] = *v7;
            ++v7;
          }
          while ( v8 );
          _strlwr(string);
          _strlwr(BIL_Word);
          if ( *(_DWORD *)v6 < 90 )
          {
            if ( _mbsstr(BIL_Word, string) )
            {
              if ( !bTypeCheck[*(_DWORD *)v6] )
              {
                v9 = v11;
                bTypeCheck[*(_DWORD *)v6] = 1;
                std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(v9, (const unsigned int *)&pkData);
              }
            }
          }
        }
        ++v4;
      }
      while ( v4 < v3 );
    }
  }
}
// A8C20C: using guessed type int ITableBase<BasicInfoFindWord,BasicInfoFindWordTab>::ms_pkTable;

//----- (0056F0D0) --------------------------------------------------------
PlayGuideWin *__thiscall PlayGuideWin::`scalar deleting destructor'(PlayGuideWin *this, unsigned int a2)
{
  PlayGuideWin *v2; // esi@1

  v2 = this;
  PlayGuideWin::~PlayGuideWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0056F100) --------------------------------------------------------
void __cdecl PopupMenuTemplate::Terminate()
{
  PgWin *v0; // esi@2
  PgWin *v1; // esi@6
  PgWin *v2; // esi@11
  PgWin *v3; // esi@16
  PgWin *v4; // esi@21
  PgWin *v5; // esi@26
  PgWin *v6; // esi@31
  PopupMenuWin *v7; // esi@36
  NiD3DDefaultShader *v8; // esi@41
  NiD3DDefaultShader *v9; // esi@46
  NiD3DDefaultShader *v10; // esi@51
  NiD3DDefaultShader *v11; // esi@56
  PgWin *v12; // esi@61
  PgWin *v13; // esi@66
  void (__thiscall ***v14)(_DWORD, _DWORD); // esi@71
  PgWin *v15; // esi@76
  void (__thiscall ***v16)(_DWORD, _DWORD); // esi@81
  void (__thiscall ***v17)(_DWORD, _DWORD); // esi@86
  void (__thiscall ***v18)(_DWORD, _DWORD); // esi@91
  void (__thiscall ***v19)(_DWORD, _DWORD); // esi@96
  void (__thiscall ***v20)(_DWORD, _DWORD); // esi@101
  void (__thiscall ***v21)(_DWORD, _DWORD); // esi@106
  void (__thiscall ***v22)(_DWORD, _DWORD); // esi@111
  void (__thiscall ***v23)(_DWORD, _DWORD); // esi@116
  void (__thiscall ***v24)(_DWORD, _DWORD); // esi@121
  void (__thiscall ***v25)(_DWORD, _DWORD); // esi@126
  void (__thiscall ***v26)(_DWORD, _DWORD); // esi@131
  void (__thiscall ***v27)(_DWORD, _DWORD); // esi@136
  void (__thiscall ***v28)(_DWORD, _DWORD); // esi@141
  PgWin *v29; // esi@146
  void (__thiscall ***v30)(_DWORD, _DWORD); // esi@151
  PgWin *v31; // esi@156
  PgWin *v32; // esi@161
  PgWin *v33; // esi@166
  PgWin *v34; // esi@171
  PgWin *v35; // esi@176
  PgWin *v36; // esi@181
  PgWin *v37; // esi@186
  PgWin *v38; // esi@191
  PgWin *v39; // esi@196
  PgWin *v40; // esi@201
  PgWin *v41; // esi@206
  PgWin *v42; // esi@211

  if ( PopupMenuTemplate::ms_spProposeTradeMenu )
  {
    v0 = PopupMenuTemplate::ms_spProposeTradeMenu;
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spProposeTradeMenu->m_uiRefCount) && v0 )
      v0->vfptr->__vecDelDtor((NiRefObject *)v0, 1u);
    PopupMenuTemplate::ms_spProposeTradeMenu = 0;
  }
  v1 = PopupMenuTemplate::ms_spInvitePartyMenu;
  if ( PopupMenuTemplate::ms_spInvitePartyMenu )
  {
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spInvitePartyMenu->m_uiRefCount) && v1 )
      v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
    PopupMenuTemplate::ms_spInvitePartyMenu = 0;
  }
  v2 = PopupMenuTemplate::ms_spInviteGuildMenu;
  if ( PopupMenuTemplate::ms_spInviteGuildMenu )
  {
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spInviteGuildMenu->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    PopupMenuTemplate::ms_spInviteGuildMenu = 0;
  }
  v3 = PopupMenuTemplate::ms_spCancelMenu;
  if ( PopupMenuTemplate::ms_spCancelMenu )
  {
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spCancelMenu->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    PopupMenuTemplate::ms_spCancelMenu = 0;
  }
  v4 = PopupMenuTemplate::ms_spDelegatePartyMenu;
  if ( PopupMenuTemplate::ms_spDelegatePartyMenu )
  {
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spDelegatePartyMenu->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    PopupMenuTemplate::ms_spDelegatePartyMenu = 0;
  }
  v5 = PopupMenuTemplate::ms_spQuitPartyMenu;
  if ( PopupMenuTemplate::ms_spQuitPartyMenu )
  {
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spQuitPartyMenu->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    PopupMenuTemplate::ms_spQuitPartyMenu = 0;
  }
  v6 = PopupMenuTemplate::ms_spFirePartyMemberMenu;
  if ( PopupMenuTemplate::ms_spFirePartyMemberMenu )
  {
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spFirePartyMemberMenu->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    PopupMenuTemplate::ms_spFirePartyMemberMenu = 0;
  }
  v7 = PopupMenuTemplate::ms_spPartyMasterLootSetupSubMenuWin;
  if ( PopupMenuTemplate::ms_spPartyMasterLootSetupSubMenuWin )
  {
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spPartyMasterLootSetupSubMenuWin->m_uiRefCount)
      && v7 )
    {
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    }
    PopupMenuTemplate::ms_spPartyMasterLootSetupSubMenuWin = 0;
  }
  v8 = PopupMenuTemplate::ms_spPartyMasterLootFreeSetupMenu.m_pObject;
  if ( PopupMenuTemplate::ms_spPartyMasterLootFreeSetupMenu.m_pObject )
  {
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spPartyMasterLootFreeSetupMenu.m_pObject->m_uiRefCount)
      && v8 )
    {
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    }
    PopupMenuTemplate::ms_spPartyMasterLootFreeSetupMenu.m_pObject = 0;
  }
  v9 = PopupMenuTemplate::ms_spPartyMasterLootSequentialSetupMenu.m_pObject;
  if ( PopupMenuTemplate::ms_spPartyMasterLootSequentialSetupMenu.m_pObject )
  {
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spPartyMasterLootSequentialSetupMenu.m_pObject->m_uiRefCount)
      && v9 )
    {
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    }
    PopupMenuTemplate::ms_spPartyMasterLootSequentialSetupMenu.m_pObject = 0;
  }
  v10 = PopupMenuTemplate::ms_spPartyMemberLootFreeSetupMenu.m_pObject;
  if ( PopupMenuTemplate::ms_spPartyMemberLootFreeSetupMenu.m_pObject )
  {
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spPartyMemberLootFreeSetupMenu.m_pObject->m_uiRefCount)
      && v10 )
    {
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
    PopupMenuTemplate::ms_spPartyMemberLootFreeSetupMenu.m_pObject = 0;
  }
  v11 = PopupMenuTemplate::ms_spPartyMemberLootSequentialSetupMenu.m_pObject;
  if ( PopupMenuTemplate::ms_spPartyMemberLootSequentialSetupMenu.m_pObject )
  {
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spPartyMemberLootSequentialSetupMenu.m_pObject->m_uiRefCount)
      && v11 )
    {
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    }
    PopupMenuTemplate::ms_spPartyMemberLootSequentialSetupMenu.m_pObject = 0;
  }
  v12 = PopupMenuTemplate::ms_spPartyLootSetupMenu;
  if ( PopupMenuTemplate::ms_spPartyLootSetupMenu )
  {
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spPartyLootSetupMenu->m_uiRefCount) && v12 )
      v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
    PopupMenuTemplate::ms_spPartyLootSetupMenu = 0;
  }
  v13 = PopupMenuTemplate::ms_spWhisper;
  if ( PopupMenuTemplate::ms_spWhisper )
  {
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spWhisper->m_uiRefCount) && v13 )
      v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
    PopupMenuTemplate::ms_spWhisper = 0;
  }
  v14 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spFollowCharMenu;
  if ( PopupMenuTemplate::ms_spFollowCharMenu )
  {
    if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spFollowCharMenu + 4)) && v14 )
      (**v14)(v14, 1);
    PopupMenuTemplate::ms_spFollowCharMenu = 0;
  }
  v15 = PopupMenuTemplate::ms_spConfigRoom;
  if ( PopupMenuTemplate::ms_spConfigRoom )
  {
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spConfigRoom->m_uiRefCount) && v15 )
      v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
    PopupMenuTemplate::ms_spConfigRoom = 0;
  }
  v16 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spShowBlog;
  if ( PopupMenuTemplate::ms_spShowBlog )
  {
    if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spShowBlog + 4)) && v16 )
      (**v16)(v16, 1);
    PopupMenuTemplate::ms_spShowBlog = 0;
  }
  v17 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spChangeBlogAddr;
  if ( PopupMenuTemplate::ms_spChangeBlogAddr )
  {
    if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spChangeBlogAddr + 4)) && v17 )
      (**v17)(v17, 1);
    PopupMenuTemplate::ms_spChangeBlogAddr = 0;
  }
  v18 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spKickGuest;
  if ( PopupMenuTemplate::ms_spKickGuest )
  {
    if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spKickGuest + 4)) && v18 )
      (**v18)(v18, 1);
    PopupMenuTemplate::ms_spKickGuest = 0;
  }
  v19 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spSetArrModeOn;
  if ( PopupMenuTemplate::ms_spSetArrModeOn )
  {
    if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spSetArrModeOn + 4)) && v19 )
      (**v19)(v19, 1);
    PopupMenuTemplate::ms_spSetArrModeOn = 0;
  }
  v20 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spSetArrModeOff;
  if ( PopupMenuTemplate::ms_spSetArrModeOff )
  {
    if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spSetArrModeOff + 4)) && v20 )
      (**v20)(v20, 1);
    PopupMenuTemplate::ms_spSetArrModeOff = 0;
  }
  v21 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spReturnToInvMHItem;
  if ( PopupMenuTemplate::ms_spReturnToInvMHItem )
  {
    if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spReturnToInvMHItem + 4)) && v21 )
      (**v21)(v21, 1);
    PopupMenuTemplate::ms_spReturnToInvMHItem = 0;
  }
  v22 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spArrToInvMHItem;
  if ( PopupMenuTemplate::ms_spArrToInvMHItem )
  {
    if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spArrToInvMHItem + 4)) && v22 )
      (**v22)(v22, 1);
    PopupMenuTemplate::ms_spArrToInvMHItem = 0;
  }
  v23 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spDeleteMHItem;
  if ( PopupMenuTemplate::ms_spDeleteMHItem )
  {
    if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spDeleteMHItem + 4)) && v23 )
      (**v23)(v23, 1);
    PopupMenuTemplate::ms_spDeleteMHItem = 0;
  }
  v24 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spObjName;
  if ( PopupMenuTemplate::ms_spObjName )
  {
    if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spObjName + 4)) && v24 )
      (**v24)(v24, 1);
    PopupMenuTemplate::ms_spObjName = 0;
  }
  v25 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spObjAction;
  if ( PopupMenuTemplate::ms_spObjAction )
  {
    if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spObjAction + 4)) && v25 )
      (**v25)(v25, 1);
    PopupMenuTemplate::ms_spObjAction = 0;
  }
  v26 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spMHObjEndure;
  if ( PopupMenuTemplate::ms_spMHObjEndure )
  {
    if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spMHObjEndure + 4)) && v26 )
      (**v26)(v26, 1);
    PopupMenuTemplate::ms_spMHObjEndure = 0;
  }
  v27 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spMHObjEndurePercentage;
  if ( PopupMenuTemplate::ms_spMHObjEndurePercentage )
  {
    if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spMHObjEndurePercentage + 4)) && v27 )
      (**v27)(v27, 1);
    PopupMenuTemplate::ms_spMHObjEndurePercentage = 0;
  }
  v28 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::m_spReArrange;
  if ( PopupMenuTemplate::m_spReArrange )
  {
    if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::m_spReArrange + 4)) && v28 )
      (**v28)(v28, 1);
    PopupMenuTemplate::m_spReArrange = 0;
  }
  v29 = PopupMenuTemplate::ms_spHighHolyPromise;
  if ( PopupMenuTemplate::ms_spHighHolyPromise )
  {
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spHighHolyPromise->m_uiRefCount) && v29 )
      v29->vfptr->__vecDelDtor((NiRefObject *)v29, 1u);
    PopupMenuTemplate::ms_spHighHolyPromise = 0;
  }
  v30 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spTargetCharName;
  if ( PopupMenuTemplate::ms_spTargetCharName )
  {
    if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spTargetCharName + 4)) && v30 )
      (**v30)(v30, 1);
    PopupMenuTemplate::ms_spTargetCharName = 0;
  }
  v31 = PopupMenuTemplate::ms_spBuffUIMenu;
  if ( PopupMenuTemplate::ms_spBuffUIMenu )
  {
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spBuffUIMenu->m_uiRefCount) && v31 )
      v31->vfptr->__vecDelDtor((NiRefObject *)v31, 1u);
    PopupMenuTemplate::ms_spBuffUIMenu = 0;
  }
  v32 = PopupMenuTemplate::ms_spRaidSelect;
  if ( PopupMenuTemplate::ms_spRaidSelect )
  {
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spRaidSelect->m_uiRefCount) && v32 )
      v32->vfptr->__vecDelDtor((NiRefObject *)v32, 1u);
    PopupMenuTemplate::ms_spRaidSelect = 0;
  }
  v33 = PopupMenuTemplate::ms_spRaidInvite;
  if ( PopupMenuTemplate::ms_spRaidInvite )
  {
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spRaidInvite->m_uiRefCount) && v33 )
      v33->vfptr->__vecDelDtor((NiRefObject *)v33, 1u);
    PopupMenuTemplate::ms_spRaidInvite = 0;
  }
  v34 = PopupMenuTemplate::ms_spRaidVanish;
  if ( PopupMenuTemplate::ms_spRaidVanish )
  {
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spRaidVanish->m_uiRefCount) && v34 )
      v34->vfptr->__vecDelDtor((NiRefObject *)v34, 1u);
    PopupMenuTemplate::ms_spRaidVanish = 0;
  }
  v35 = PopupMenuTemplate::ms_spRaidLeave;
  if ( PopupMenuTemplate::ms_spRaidLeave )
  {
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spRaidLeave->m_uiRefCount) && v35 )
      v35->vfptr->__vecDelDtor((NiRefObject *)v35, 1u);
    PopupMenuTemplate::ms_spRaidLeave = 0;
  }
  v36 = PopupMenuTemplate::ms_spChangeRaidLeader;
  if ( PopupMenuTemplate::ms_spChangeRaidLeader )
  {
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spChangeRaidLeader->m_uiRefCount) && v36 )
      v36->vfptr->__vecDelDtor((NiRefObject *)v36, 1u);
    PopupMenuTemplate::ms_spChangeRaidLeader = 0;
  }
  v37 = PopupMenuTemplate::ms_spChangeRaidLooter;
  if ( PopupMenuTemplate::ms_spChangeRaidLooter )
  {
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spChangeRaidLooter->m_uiRefCount) && v37 )
      v37->vfptr->__vecDelDtor((NiRefObject *)v37, 1u);
    PopupMenuTemplate::ms_spChangeRaidLooter = 0;
  }
  v38 = PopupMenuTemplate::ms_spRaidSubLeaderUp;
  if ( PopupMenuTemplate::ms_spRaidSubLeaderUp )
  {
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spRaidSubLeaderUp->m_uiRefCount) && v38 )
      v38->vfptr->__vecDelDtor((NiRefObject *)v38, 1u);
    PopupMenuTemplate::ms_spRaidSubLeaderUp = 0;
  }
  v39 = PopupMenuTemplate::ms_spRaidSubLeaderDown;
  if ( PopupMenuTemplate::ms_spRaidSubLeaderDown )
  {
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spRaidSubLeaderDown->m_uiRefCount) && v39 )
      v39->vfptr->__vecDelDtor((NiRefObject *)v39, 1u);
    PopupMenuTemplate::ms_spRaidSubLeaderDown = 0;
  }
  v40 = PopupMenuTemplate::ms_spCollectOpen;
  if ( PopupMenuTemplate::ms_spCollectOpen )
  {
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spCollectOpen->m_uiRefCount) && v40 )
      v40->vfptr->__vecDelDtor((NiRefObject *)v40, 1u);
    PopupMenuTemplate::ms_spCollectOpen = 0;
  }
  v41 = PopupMenuTemplate::ms_spInviteFriend;
  if ( PopupMenuTemplate::ms_spInviteFriend )
  {
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spInviteFriend->m_uiRefCount) && v41 )
      v41->vfptr->__vecDelDtor((NiRefObject *)v41, 1u);
    PopupMenuTemplate::ms_spInviteFriend = 0;
  }
  v42 = PopupMenuTemplate::ms_spRideOn;
  if ( PopupMenuTemplate::ms_spRideOn )
  {
    if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spRideOn->m_uiRefCount) )
    {
      if ( v42 )
        v42->vfptr->__vecDelDtor((NiRefObject *)v42, 1u);
    }
    PopupMenuTemplate::ms_spRideOn = 0;
  }
}
// A8D390: using guessed type int PopupMenuTemplate::ms_spFollowCharMenu;
// A8D3F0: using guessed type int PopupMenuTemplate::ms_spTargetCharName;
// A8D410: using guessed type int PopupMenuTemplate::ms_spShowBlog;
// A8D414: using guessed type int PopupMenuTemplate::ms_spChangeBlogAddr;
// A8D418: using guessed type int PopupMenuTemplate::ms_spKickGuest;
// A8D41C: using guessed type int PopupMenuTemplate::ms_spSetArrModeOn;
// A8D420: using guessed type int PopupMenuTemplate::ms_spSetArrModeOff;
// A8D424: using guessed type int PopupMenuTemplate::ms_spReturnToInvMHItem;
// A8D428: using guessed type int PopupMenuTemplate::ms_spArrToInvMHItem;
// A8D42C: using guessed type int PopupMenuTemplate::ms_spDeleteMHItem;
// A8D430: using guessed type int PopupMenuTemplate::ms_spObjAction;
// A8D434: using guessed type int PopupMenuTemplate::ms_spObjName;
// A8D438: using guessed type int PopupMenuTemplate::ms_spMHObjEndure;
// A8D43C: using guessed type int PopupMenuTemplate::ms_spMHObjEndurePercentage;
// A8D440: using guessed type int PopupMenuTemplate::m_spReArrange;

//----- (0056F7D0) --------------------------------------------------------
NiD3DDefaultShader *__cdecl PopupMenuTemplate::GetResolutionMenu(unsigned int uiParam)
{
  NiD3DDefaultShader *v1; // eax@2
  NiD3DDefaultShader *result; // eax@2
  NiD3DDefaultShader *v3; // eax@3
  NiD3DDefaultShader *v4; // eax@4
  NiD3DDefaultShader *v5; // eax@5
  NiD3DDefaultShader *v6; // eax@6
  NiD3DDefaultShader *v7; // eax@7
  NiD3DDefaultShader *v8; // eax@8
  NiD3DDefaultShader *v9; // eax@9
  NiD3DDefaultShader *v10; // eax@10
  NiD3DDefaultShader *v11; // eax@11
  NiD3DDefaultShader *v12; // eax@12
  NiD3DDefaultShader *v13; // eax@13
  NiD3DDefaultShader *v14; // eax@14
  NiD3DDefaultShader *v15; // eax@15
  NiD3DDefaultShader *v16; // eax@16
  NiD3DDefaultShader *v17; // eax@17
  NiD3DDefaultShader *v18; // eax@18
  NiD3DDefaultShader *v19; // eax@19
  NiD3DDefaultShader *v20; // eax@20
  NiD3DDefaultShader *v21; // eax@21

  switch ( uiParam )
  {
    case 0u:
      v1 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("800x600", 0x8Eu, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu0, v1);
      result = PopupMenuTemplate::ms_spResolutionMenu0.m_pObject;
      break;
    case 1u:
      v3 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1024x768", 0x8Fu, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu1, v3);
      result = PopupMenuTemplate::ms_spResolutionMenu1.m_pObject;
      break;
    case 2u:
      v4 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1280x768(wide)", 0x90u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu2, v4);
      result = PopupMenuTemplate::ms_spResolutionMenu2.m_pObject;
      break;
    case 3u:
      v5 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1280x960", 0x91u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu3, v5);
      result = PopupMenuTemplate::ms_spResolutionMenu3.m_pObject;
      break;
    case 4u:
      v6 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1280x1024", 0x92u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu4, v6);
      result = PopupMenuTemplate::ms_spResolutionMenu4.m_pObject;
      break;
    case 5u:
      v7 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1400x1050", 0x93u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu5, v7);
      result = PopupMenuTemplate::ms_spResolutionMenu5.m_pObject;
      break;
    case 6u:
      v8 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1600x1200", 0x94u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu6, v8);
      result = PopupMenuTemplate::ms_spResolutionMenu6.m_pObject;
      break;
    case 7u:
      v9 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1600x900(wide)", 0x95u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu7, v9);
      result = PopupMenuTemplate::ms_spResolutionMenu7.m_pObject;
      break;
    case 8u:
      v10 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1920x1440", 0x96u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu8, v10);
      result = PopupMenuTemplate::ms_spResolutionMenu8.m_pObject;
      break;
    case 9u:
      v11 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1920x1200(wide)", 0x97u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu9, v11);
      result = PopupMenuTemplate::ms_spResolutionMenu9.m_pObject;
      break;
    case 0xAu:
      v12 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1680x1050(wide)", 0x98u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu10, v12);
      result = PopupMenuTemplate::ms_spResolutionMenu10.m_pObject;
      break;
    case 0xBu:
      v13 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1280x800(wide)", 0x99u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu11, v13);
      result = PopupMenuTemplate::ms_spResolutionMenu11.m_pObject;
      break;
    case 0xCu:
      v14 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1600x900(wide)", 0x9Au, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu12, v14);
      result = PopupMenuTemplate::ms_spResolutionMenu12.m_pObject;
      break;
    case 0xDu:
      v15 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1440x900(wide)", 0x9Bu, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu13, v15);
      result = PopupMenuTemplate::ms_spResolutionMenu13.m_pObject;
      break;
    case 0xEu:
      v16 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1920x1080(wide)", 0x9Cu, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu14, v16);
      result = PopupMenuTemplate::ms_spResolutionMenu14.m_pObject;
      break;
    case 0xFu:
      v17 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("2560x1440", 0x9Du, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu15, v17);
      result = PopupMenuTemplate::ms_spResolutionMenu15.m_pObject;
      break;
    case 0x10u:
      v18 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("2560x1600(wide)", 0x9Eu, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu16, v18);
      result = PopupMenuTemplate::ms_spResolutionMenu16.m_pObject;
      break;
    case 0x11u:
      v19 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("3840x2160(wide)", 0x9Fu, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu17, v19);
      result = PopupMenuTemplate::ms_spResolutionMenu17.m_pObject;
      break;
    case 0x12u:
      v20 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1366x768", 0xA0u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu18, v20);
      result = PopupMenuTemplate::ms_spResolutionMenu18.m_pObject;
      break;
    case 0x13u:
      v21 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("3440x1440(wide)", 0xA1u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu19, v21);
      result = PopupMenuTemplate::ms_spResolutionMenu19.m_pObject;
      break;
    default:
      result = 0;
      break;
  }
  return result;
}

//----- (0056FBE0) --------------------------------------------------------
NiD3DDefaultShader *__cdecl PopupMenuTemplate::AccountFrameGetResolutionMenu(unsigned int uiParam)
{
  NiD3DDefaultShader *v1; // eax@2
  NiD3DDefaultShader *result; // eax@2
  NiD3DDefaultShader *v3; // eax@3
  NiD3DDefaultShader *v4; // eax@4
  NiD3DDefaultShader *v5; // eax@5
  NiD3DDefaultShader *v6; // eax@6
  NiD3DDefaultShader *v7; // eax@7
  NiD3DDefaultShader *v8; // eax@8
  NiD3DDefaultShader *v9; // eax@9
  NiD3DDefaultShader *v10; // eax@10
  NiD3DDefaultShader *v11; // eax@11
  NiD3DDefaultShader *v12; // eax@12
  NiD3DDefaultShader *v13; // eax@13
  NiD3DDefaultShader *v14; // eax@14
  NiD3DDefaultShader *v15; // eax@15
  NiD3DDefaultShader *v16; // eax@16
  NiD3DDefaultShader *v17; // eax@17
  NiD3DDefaultShader *v18; // eax@18
  NiD3DDefaultShader *v19; // eax@19
  NiD3DDefaultShader *v20; // eax@20
  NiD3DDefaultShader *v21; // eax@21

  switch ( uiParam )
  {
    case 0u:
      v1 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("800x600", 0x16u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu0, v1);
      result = PopupMenuTemplate::ms_spResolutionMenu0.m_pObject;
      break;
    case 1u:
      v3 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1024x768", 0x17u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu1, v3);
      result = PopupMenuTemplate::ms_spResolutionMenu1.m_pObject;
      break;
    case 2u:
      v4 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1280x768(wide)", 0x18u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu2, v4);
      result = PopupMenuTemplate::ms_spResolutionMenu2.m_pObject;
      break;
    case 3u:
      v5 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1280x960", 0x19u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu3, v5);
      result = PopupMenuTemplate::ms_spResolutionMenu3.m_pObject;
      break;
    case 4u:
      v6 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1280x1024", 0x1Au, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu4, v6);
      result = PopupMenuTemplate::ms_spResolutionMenu4.m_pObject;
      break;
    case 5u:
      v7 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1400x1050", 0x1Bu, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu5, v7);
      result = PopupMenuTemplate::ms_spResolutionMenu5.m_pObject;
      break;
    case 6u:
      v8 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1600x1200", 0x1Cu, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu6, v8);
      result = PopupMenuTemplate::ms_spResolutionMenu6.m_pObject;
      break;
    case 7u:
      v9 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1600x900(wide)", 0x1Du, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu7, v9);
      result = PopupMenuTemplate::ms_spResolutionMenu7.m_pObject;
      break;
    case 8u:
      v10 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1920x1440", 0x1Eu, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu8, v10);
      result = PopupMenuTemplate::ms_spResolutionMenu8.m_pObject;
      break;
    case 9u:
      v11 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1920x1200(wide)", 0x1Fu, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu9, v11);
      result = PopupMenuTemplate::ms_spResolutionMenu9.m_pObject;
      break;
    case 0xAu:
      v12 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1680x1050(wide)", 0x20u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu10, v12);
      result = PopupMenuTemplate::ms_spResolutionMenu10.m_pObject;
      break;
    case 0xBu:
      v13 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1280x800(wide)", 0x21u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu11, v13);
      result = PopupMenuTemplate::ms_spResolutionMenu11.m_pObject;
      break;
    case 0xCu:
      v14 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1600x900(wide)", 0x22u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu12, v14);
      result = PopupMenuTemplate::ms_spResolutionMenu12.m_pObject;
      break;
    case 0xDu:
      v15 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1440x900(wide)", 0x23u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu13, v15);
      result = PopupMenuTemplate::ms_spResolutionMenu13.m_pObject;
      break;
    case 0xEu:
      v16 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1920x1080(wide)", 0x24u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu14, v16);
      result = PopupMenuTemplate::ms_spResolutionMenu14.m_pObject;
      break;
    case 0xFu:
      v17 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("2560x1440", 0x25u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu15, v17);
      result = PopupMenuTemplate::ms_spResolutionMenu15.m_pObject;
      break;
    case 0x10u:
      v18 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("2560x1600(wide)", 0x26u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu16, v18);
      result = PopupMenuTemplate::ms_spResolutionMenu16.m_pObject;
      break;
    case 0x11u:
      v19 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("3840x2160(wide)", 0x27u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu17, v19);
      result = PopupMenuTemplate::ms_spResolutionMenu17.m_pObject;
      break;
    case 0x12u:
      v20 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("1366x768", 0x28u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu18, v20);
      result = PopupMenuTemplate::ms_spResolutionMenu18.m_pObject;
      break;
    case 0x13u:
      v21 = (NiD3DDefaultShader *)PopupMenuText::CreateWin("3440x1440(wide)", 0x29u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spResolutionMenu19, v21);
      result = PopupMenuTemplate::ms_spResolutionMenu19.m_pObject;
      break;
    default:
      result = 0;
      break;
  }
  return result;
}

//----- (0056FFB0) --------------------------------------------------------
NiD3DDefaultShader *__cdecl PopupMenuTemplate::GetWingStonePositionList(unsigned int uiParam, char *pcText, unsigned __int16 id)
{
  NiD3DDefaultShader *v3; // eax@2
  NiD3DDefaultShader *result; // eax@2
  NiD3DDefaultShader *v5; // eax@3
  NiD3DDefaultShader *v6; // eax@4
  NiD3DDefaultShader *v7; // eax@5
  NiD3DDefaultShader *v8; // eax@6

  switch ( uiParam )
  {
    case 0u:
      v3 = (NiD3DDefaultShader *)PopupMenuText::CreateWin(pcText, 0xEDu, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spPlaceMemory0, v3);
      strcpy((char *)&PopupMenuTemplate::ms_acChoiceMapNameSlot0, pcText);
      PopupMenuTemplate::ms_smiMapID0 = id;
      result = PopupMenuTemplate::ms_spPlaceMemory0.m_pObject;
      PopupMenuTemplate::ms_uiWingStoneMemorySlot0 = 0;
      break;
    case 1u:
      v5 = (NiD3DDefaultShader *)PopupMenuText::CreateWin(pcText, 0xEEu, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spPlaceMemory1, v5);
      strcpy((char *)&PopupMenuTemplate::ms_acChoiceMapNameSlot1, pcText);
      result = PopupMenuTemplate::ms_spPlaceMemory1.m_pObject;
      PopupMenuTemplate::ms_uiWingStoneMemorySlot1 = 1;
      PopupMenuTemplate::ms_smiMapID1 = id;
      break;
    case 2u:
      v6 = (NiD3DDefaultShader *)PopupMenuText::CreateWin(pcText, 0xEFu, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spPlaceMemory2, v6);
      strcpy((char *)&PopupMenuTemplate::ms_acChoiceMapNameSlot2, pcText);
      result = PopupMenuTemplate::ms_spPlaceMemory2.m_pObject;
      PopupMenuTemplate::ms_uiWingStoneMemorySlot2 = 2;
      PopupMenuTemplate::ms_smiMapID2 = id;
      break;
    case 3u:
      v7 = (NiD3DDefaultShader *)PopupMenuText::CreateWin(pcText, 0xF0u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spPlaceMemory3, v7);
      strcpy((char *)&PopupMenuTemplate::ms_acChoiceMapNameSlot3, pcText);
      PopupMenuTemplate::ms_smiMapID3 = id;
      result = PopupMenuTemplate::ms_spPlaceMemory3.m_pObject;
      PopupMenuTemplate::ms_uiWingStoneMemorySlot3 = 3;
      break;
    case 4u:
      v8 = (NiD3DDefaultShader *)PopupMenuText::CreateWin(pcText, 0xF1u, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(&PopupMenuTemplate::ms_spPlaceMemory4, v8);
      strcpy((char *)&PopupMenuTemplate::ms_acChoiceMapNameSlot4, pcText);
      result = PopupMenuTemplate::ms_spPlaceMemory4.m_pObject;
      PopupMenuTemplate::ms_uiWingStoneMemorySlot4 = 4;
      PopupMenuTemplate::ms_smiMapID4 = id;
      break;
    default:
      result = 0;
      break;
  }
  return result;
}
// A710A8: using guessed type unsigned int PopupMenuTemplate::ms_uiWingStoneMemorySlot0;
// A710AC: using guessed type unsigned int PopupMenuTemplate::ms_uiWingStoneMemorySlot1;
// A710B0: using guessed type unsigned int PopupMenuTemplate::ms_uiWingStoneMemorySlot2;
// A710B4: using guessed type unsigned int PopupMenuTemplate::ms_uiWingStoneMemorySlot3;
// A710B8: using guessed type unsigned int PopupMenuTemplate::ms_uiWingStoneMemorySlot4;
// A710BC: using guessed type unsigned __int16 PopupMenuTemplate::ms_smiMapID0;
// A710C0: using guessed type unsigned __int16 PopupMenuTemplate::ms_smiMapID1;
// A710C4: using guessed type unsigned __int16 PopupMenuTemplate::ms_smiMapID2;
// A710C8: using guessed type unsigned __int16 PopupMenuTemplate::ms_smiMapID3;
// A710CC: using guessed type unsigned __int16 PopupMenuTemplate::ms_smiMapID4;
// A8CE60: using guessed type char *PopupMenuTemplate::ms_acChoiceMapNameSlot4;
// A8CF60: using guessed type char *PopupMenuTemplate::ms_acChoiceMapNameSlot3;
// A8D060: using guessed type char *PopupMenuTemplate::ms_acChoiceMapNameSlot2;
// A8D160: using guessed type char *PopupMenuTemplate::ms_acChoiceMapNameSlot1;
// A8D260: using guessed type char *PopupMenuTemplate::ms_acChoiceMapNameSlot0;

//----- (005701A0) --------------------------------------------------------
PopupMenuText *__cdecl PopupMenuTemplate::GetmhUI_FocusObjCancel()
{
  PopupMenuText *v0; // esi@1
  PopupMenuText *result; // eax@1
  void (__thiscall ***v2)(_DWORD, _DWORD); // edi@3

  v0 = PopupMenuText::CreateWin("-G1¼±ÅÃÃë¼Ò", 0xE2u, 0, 0, 0, 0, 0);
  result = (PopupMenuText *)PopupMenuTemplate::m_spSelectCancel;
  if ( (PopupMenuText *)PopupMenuTemplate::m_spSelectCancel != v0 )
  {
    if ( PopupMenuTemplate::m_spSelectCancel )
    {
      v2 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::m_spSelectCancel;
      if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::m_spSelectCancel + 4)) )
      {
        if ( v2 )
          (**v2)(v2, 1);
      }
    }
    result = v0;
    PopupMenuTemplate::m_spSelectCancel = (int)v0;
    if ( v0 )
    {
      InterlockedIncrement((volatile LONG *)&v0->m_uiRefCount);
      result = (PopupMenuText *)PopupMenuTemplate::m_spSelectCancel;
    }
  }
  return result;
}
// A8D444: using guessed type int PopupMenuTemplate::m_spSelectCancel;

//----- (00570210) --------------------------------------------------------
PopupMenu *__cdecl PopupMenuTemplate::GetTargetCharName(unsigned int uiParam)
{
  PopupMenuText *v1; // eax@1
  int v2; // ecx@1
  int v3; // esi@1
  void (__thiscall ***v4)(_DWORD, _DWORD); // edi@3

  strcpy(PopupMenuTemplate::ms_acCharName, (const char *)uiParam);
  v1 = PopupMenuText::CreateWin(PopupMenuTemplate::ms_acCharName, 0, 0, 0, 0, 0, 1);
  v2 = PopupMenuTemplate::ms_spTargetCharName;
  v3 = (int)v1;
  if ( (PopupMenuText *)PopupMenuTemplate::ms_spTargetCharName != v1 )
  {
    if ( PopupMenuTemplate::ms_spTargetCharName )
    {
      v4 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spTargetCharName;
      if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spTargetCharName + 4)) )
      {
        if ( v4 )
          (**v4)(v4, 1);
      }
    }
    v2 = v3;
    PopupMenuTemplate::ms_spTargetCharName = v3;
    if ( v3 )
    {
      InterlockedIncrement((volatile LONG *)(v3 + 4));
      v2 = PopupMenuTemplate::ms_spTargetCharName;
    }
  }
  (*(void (__stdcall **)(char *))(*(_DWORD *)v2 + 520))(PopupMenuTemplate::ms_acCharName);
  *(_DWORD *)(PopupMenuTemplate::ms_spTargetCharName + 336) = PopupMenuTemplate::ms_acCharName;
  return (PopupMenu *)PopupMenuTemplate::ms_spTargetCharName;
}
// A8D3F0: using guessed type int PopupMenuTemplate::ms_spTargetCharName;

//----- (005702C0) --------------------------------------------------------
PgWin *__cdecl PopupMenuTemplate::GetProposeTradeMenu(unsigned int uiParam)
{
  PgWin *v1; // ecx@1
  bool v2; // ST18_1@2
  PgWin *v3; // ST14_4@2
  char *v4; // ST10_4@2
  PgWin *v5; // ST0C_4@2
  PgWin *v6; // ST08_4@2
  char *v7; // eax@2
  PopupMenuText *v8; // esi@2
  PgWin *v9; // eax@2
  PgWin *v10; // edi@4

  v1 = PopupMenuTemplate::ms_spProposeTradeMenu;
  if ( !PopupMenuTemplate::ms_spProposeTradeMenu )
  {
    v2 = (char)PopupMenuTemplate::ms_spProposeTradeMenu;
    v3 = PopupMenuTemplate::ms_spProposeTradeMenu;
    v4 = (char *)PopupMenuTemplate::ms_spProposeTradeMenu;
    v5 = PopupMenuTemplate::ms_spProposeTradeMenu;
    v6 = PopupMenuTemplate::ms_spProposeTradeMenu;
    v7 = (char *)TextData::Get(0xF44C4B3B);
    v8 = PopupMenuText::CreateWin(v7, 0x79u, (unsigned int)v6, v5, v4, (unsigned int)v3, v2);
    v9 = PopupMenuTemplate::ms_spProposeTradeMenu;
    if ( (PopupMenuText *)PopupMenuTemplate::ms_spProposeTradeMenu != v8 )
    {
      if ( PopupMenuTemplate::ms_spProposeTradeMenu )
      {
        v10 = PopupMenuTemplate::ms_spProposeTradeMenu;
        if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spProposeTradeMenu->m_uiRefCount) )
        {
          if ( v10 )
            v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
        }
      }
      v9 = (PgWin *)v8;
      PopupMenuTemplate::ms_spProposeTradeMenu = (PgWin *)v8;
      if ( v8 )
      {
        InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
        v9 = PopupMenuTemplate::ms_spProposeTradeMenu;
      }
    }
    LODWORD(v9[1].m_kWorldBound.m_kCenter.z) = 1;
    v1 = PopupMenuTemplate::ms_spProposeTradeMenu;
  }
  ((void (__stdcall *)(_DWORD))v1->vfptr[130].__vecDelDtor)(uiParam);
  LODWORD(PopupMenuTemplate::ms_spProposeTradeMenu[1].m_kWorldBound.m_fRadius) = uiParam;
  return PopupMenuTemplate::ms_spProposeTradeMenu;
}

//----- (00570370) --------------------------------------------------------
PopupMenu *__cdecl PopupMenuTemplate::GetMainCharUnMetamorphosis()
{
  PopupMenu *result; // eax@1
  bool v1; // ST18_1@2
  PgWin *v2; // ST14_4@2
  char *v3; // ST10_4@2
  PgWin *v4; // ST0C_4@2
  PgWin *v5; // ST08_4@2
  char *v6; // eax@2
  PopupMenuText *v7; // esi@2
  PgWin *v8; // eax@2
  PgWin *v9; // edi@4

  result = (PopupMenu *)PopupMenuTemplate::ms_spMainCharUnMetamorphosis;
  if ( !PopupMenuTemplate::ms_spMainCharUnMetamorphosis )
  {
    v1 = (char)PopupMenuTemplate::ms_spMainCharUnMetamorphosis;
    v2 = PopupMenuTemplate::ms_spMainCharUnMetamorphosis;
    v3 = (char *)PopupMenuTemplate::ms_spMainCharUnMetamorphosis;
    v4 = PopupMenuTemplate::ms_spMainCharUnMetamorphosis;
    v5 = PopupMenuTemplate::ms_spMainCharUnMetamorphosis;
    v6 = (char *)TextData::Get(0x4E427E7Cu);
    v7 = PopupMenuText::CreateWin(v6, 0x79u, (unsigned int)v5, v4, v3, (unsigned int)v2, v1);
    v8 = PopupMenuTemplate::ms_spMainCharUnMetamorphosis;
    if ( (PopupMenuText *)PopupMenuTemplate::ms_spMainCharUnMetamorphosis != v7 )
    {
      if ( PopupMenuTemplate::ms_spMainCharUnMetamorphosis )
      {
        v9 = PopupMenuTemplate::ms_spMainCharUnMetamorphosis;
        if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spMainCharUnMetamorphosis->m_uiRefCount) )
        {
          if ( v9 )
            v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
        }
      }
      v8 = (PgWin *)v7;
      PopupMenuTemplate::ms_spMainCharUnMetamorphosis = (PgWin *)v7;
      if ( v7 )
      {
        InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
        v8 = PopupMenuTemplate::ms_spMainCharUnMetamorphosis;
      }
    }
    LODWORD(v8[1].m_kWorldBound.m_kCenter.z) = 8;
    result = (PopupMenu *)PopupMenuTemplate::ms_spMainCharUnMetamorphosis;
  }
  return result;
}

//----- (00570400) --------------------------------------------------------
PgWin *__cdecl PopupMenuTemplate::GetInvitePartyMenu(unsigned int uiParam)
{
  PgWin *v1; // ecx@1
  bool v2; // ST18_1@2
  PgWin *v3; // ST14_4@2
  char *v4; // ST10_4@2
  PgWin *v5; // ST0C_4@2
  PgWin *v6; // ST08_4@2
  char *v7; // eax@2
  PopupMenuText *v8; // esi@2
  PgWin *v9; // eax@2
  PgWin *v10; // edi@4

  v1 = PopupMenuTemplate::ms_spInvitePartyMenu;
  if ( !PopupMenuTemplate::ms_spInvitePartyMenu )
  {
    v2 = (char)PopupMenuTemplate::ms_spInvitePartyMenu;
    v3 = PopupMenuTemplate::ms_spInvitePartyMenu;
    v4 = (char *)PopupMenuTemplate::ms_spInvitePartyMenu;
    v5 = PopupMenuTemplate::ms_spInvitePartyMenu;
    v6 = PopupMenuTemplate::ms_spInvitePartyMenu;
    v7 = (char *)TextData::Get(0x353D9AAAu);
    v8 = PopupMenuText::CreateWin(v7, 0x7Au, (unsigned int)v6, v5, v4, (unsigned int)v3, v2);
    v9 = PopupMenuTemplate::ms_spInvitePartyMenu;
    if ( (PopupMenuText *)PopupMenuTemplate::ms_spInvitePartyMenu != v8 )
    {
      if ( PopupMenuTemplate::ms_spInvitePartyMenu )
      {
        v10 = PopupMenuTemplate::ms_spInvitePartyMenu;
        if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spInvitePartyMenu->m_uiRefCount) )
        {
          if ( v10 )
            v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
        }
      }
      v9 = (PgWin *)v8;
      PopupMenuTemplate::ms_spInvitePartyMenu = (PgWin *)v8;
      if ( v8 )
      {
        InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
        v9 = PopupMenuTemplate::ms_spInvitePartyMenu;
      }
    }
    LODWORD(v9[1].m_kWorldBound.m_kCenter.z) = 2;
    v1 = PopupMenuTemplate::ms_spInvitePartyMenu;
  }
  ((void (__stdcall *)(_DWORD))v1->vfptr[130].__vecDelDtor)(uiParam);
  LODWORD(PopupMenuTemplate::ms_spInvitePartyMenu[1].m_kWorldBound.m_fRadius) = uiParam;
  return PopupMenuTemplate::ms_spInvitePartyMenu;
}

//----- (005704B0) --------------------------------------------------------
PopupMenu *__cdecl PopupMenuTemplate::GetCancelMenu()
{
  PopupMenu *result; // eax@1
  bool v1; // ST18_1@2
  PgWin *v2; // ST14_4@2
  char *v3; // ST10_4@2
  PgWin *v4; // ST0C_4@2
  PgWin *v5; // ST08_4@2
  char *v6; // eax@2
  PopupMenuText *v7; // esi@2
  PgWin *v8; // eax@2
  PgWin *v9; // edi@4

  result = (PopupMenu *)PopupMenuTemplate::ms_spCancelMenu;
  if ( !PopupMenuTemplate::ms_spCancelMenu )
  {
    v1 = (char)PopupMenuTemplate::ms_spCancelMenu;
    v2 = PopupMenuTemplate::ms_spCancelMenu;
    v3 = (char *)PopupMenuTemplate::ms_spCancelMenu;
    v4 = PopupMenuTemplate::ms_spCancelMenu;
    v5 = PopupMenuTemplate::ms_spCancelMenu;
    v6 = (char *)TextData::Get(0xDDE7EBEF);
    v7 = PopupMenuText::CreateWin(v6, 0x7Fu, (unsigned int)v5, v4, v3, (unsigned int)v2, v1);
    v8 = PopupMenuTemplate::ms_spCancelMenu;
    if ( (PopupMenuText *)PopupMenuTemplate::ms_spCancelMenu != v7 )
    {
      if ( PopupMenuTemplate::ms_spCancelMenu )
      {
        v9 = PopupMenuTemplate::ms_spCancelMenu;
        if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spCancelMenu->m_uiRefCount) )
        {
          if ( v9 )
            v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
        }
      }
      v8 = (PgWin *)v7;
      PopupMenuTemplate::ms_spCancelMenu = (PgWin *)v7;
      if ( v7 )
      {
        InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
        v8 = PopupMenuTemplate::ms_spCancelMenu;
      }
    }
    LODWORD(v8[1].m_kWorldBound.m_kCenter.z) = 9;
    result = (PopupMenu *)PopupMenuTemplate::ms_spCancelMenu;
  }
  return result;
}

//----- (00570540) --------------------------------------------------------
PgWin *__cdecl PopupMenuTemplate::GetFirePartyMemberMenu(unsigned int uiParam)
{
  PgWin *v1; // ecx@1
  bool v2; // ST18_1@2
  PgWin *v3; // ST14_4@2
  char *v4; // ST10_4@2
  PgWin *v5; // ST0C_4@2
  PgWin *v6; // ST08_4@2
  PgWin *v7; // ST04_4@2
  char *v8; // eax@2
  PopupMenuText *v9; // esi@2
  PgWin *v10; // eax@2
  PgWin *v11; // edi@4

  v1 = PopupMenuTemplate::ms_spFirePartyMemberMenu;
  if ( !PopupMenuTemplate::ms_spFirePartyMemberMenu )
  {
    v2 = (char)PopupMenuTemplate::ms_spFirePartyMemberMenu;
    v3 = PopupMenuTemplate::ms_spFirePartyMemberMenu;
    v4 = (char *)PopupMenuTemplate::ms_spFirePartyMemberMenu;
    v5 = PopupMenuTemplate::ms_spFirePartyMemberMenu;
    v6 = PopupMenuTemplate::ms_spFirePartyMemberMenu;
    v7 = PopupMenuTemplate::ms_spFirePartyMemberMenu;
    v8 = (char *)TextData::Get(0xF2D4CFE7);
    v9 = PopupMenuText::CreateWin(v8, (unsigned int)v7, (unsigned int)v6, v5, v4, (unsigned int)v3, v2);
    v10 = PopupMenuTemplate::ms_spFirePartyMemberMenu;
    if ( (PopupMenuText *)PopupMenuTemplate::ms_spFirePartyMemberMenu != v9 )
    {
      if ( PopupMenuTemplate::ms_spFirePartyMemberMenu )
      {
        v11 = PopupMenuTemplate::ms_spFirePartyMemberMenu;
        if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spFirePartyMemberMenu->m_uiRefCount) )
        {
          if ( v11 )
            v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
        }
      }
      v10 = (PgWin *)v9;
      PopupMenuTemplate::ms_spFirePartyMemberMenu = (PgWin *)v9;
      if ( v9 )
      {
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
        v10 = PopupMenuTemplate::ms_spFirePartyMemberMenu;
      }
    }
    LODWORD(v10[1].m_kWorldBound.m_kCenter.z) = 3;
    v1 = PopupMenuTemplate::ms_spFirePartyMemberMenu;
  }
  ((void (__stdcall *)(_DWORD))v1->vfptr[130].__vecDelDtor)(uiParam);
  LODWORD(PopupMenuTemplate::ms_spFirePartyMemberMenu[1].m_kWorldBound.m_fRadius) = uiParam;
  return PopupMenuTemplate::ms_spFirePartyMemberMenu;
}

//----- (005705F0) --------------------------------------------------------
PopupMenu *__cdecl PopupMenuTemplate::GetInviteGuildMenu(unsigned int uiParam)
{
  bool v1; // ST18_1@2
  PgWin *v2; // ST14_4@2
  char *v3; // ST10_4@2
  PgWin *v4; // ST0C_4@2
  PgWin *v5; // ST08_4@2
  PgWin *v6; // ST04_4@2
  char *v7; // eax@2
  PopupMenuText *v8; // esi@2
  PgWin *v9; // eax@2
  PgWin *v10; // edi@4
  PopupMenu *result; // eax@9

  if ( PopupMenuTemplate::ms_spInviteGuildMenu )
  {
    LODWORD(PopupMenuTemplate::ms_spInviteGuildMenu[1].m_kWorldBound.m_fRadius) = uiParam;
    result = (PopupMenu *)PopupMenuTemplate::ms_spInviteGuildMenu;
  }
  else
  {
    v1 = (char)PopupMenuTemplate::ms_spInviteGuildMenu;
    v2 = PopupMenuTemplate::ms_spInviteGuildMenu;
    v3 = (char *)PopupMenuTemplate::ms_spInviteGuildMenu;
    v4 = PopupMenuTemplate::ms_spInviteGuildMenu;
    v5 = PopupMenuTemplate::ms_spInviteGuildMenu;
    v6 = PopupMenuTemplate::ms_spInviteGuildMenu;
    v7 = (char *)TextData::Get(0x2C517CA2u);
    v8 = PopupMenuText::CreateWin(v7, (unsigned int)v6, (unsigned int)v5, v4, v3, (unsigned int)v2, v1);
    v9 = PopupMenuTemplate::ms_spInviteGuildMenu;
    if ( (PopupMenuText *)PopupMenuTemplate::ms_spInviteGuildMenu != v8 )
    {
      if ( PopupMenuTemplate::ms_spInviteGuildMenu )
      {
        v10 = PopupMenuTemplate::ms_spInviteGuildMenu;
        if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spInviteGuildMenu->m_uiRefCount) )
        {
          if ( v10 )
            v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
        }
      }
      v9 = (PgWin *)v8;
      PopupMenuTemplate::ms_spInviteGuildMenu = (PgWin *)v8;
      if ( v8 )
      {
        InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
        v9 = PopupMenuTemplate::ms_spInviteGuildMenu;
      }
    }
    LODWORD(v9[1].m_kWorldBound.m_kCenter.z) = 10;
    LODWORD(PopupMenuTemplate::ms_spInviteGuildMenu[1].m_kWorldBound.m_fRadius) = uiParam;
    result = (PopupMenu *)PopupMenuTemplate::ms_spInviteGuildMenu;
  }
  return result;
}

//----- (005706A0) --------------------------------------------------------
PgWin *__cdecl PopupMenuTemplate::GetDelegatePartyChiefMenu(unsigned int uiParam)
{
  PgWin *v1; // ecx@1
  bool v2; // ST18_1@2
  PgWin *v3; // ST14_4@2
  char *v4; // ST10_4@2
  PgWin *v5; // ST0C_4@2
  PgWin *v6; // ST08_4@2
  char *v7; // eax@2
  PopupMenuText *v8; // esi@2
  PgWin *v9; // eax@2
  PgWin *v10; // edi@4

  v1 = PopupMenuTemplate::ms_spDelegatePartyMenu;
  if ( !PopupMenuTemplate::ms_spDelegatePartyMenu )
  {
    v2 = (char)PopupMenuTemplate::ms_spDelegatePartyMenu;
    v3 = PopupMenuTemplate::ms_spDelegatePartyMenu;
    v4 = (char *)PopupMenuTemplate::ms_spDelegatePartyMenu;
    v5 = PopupMenuTemplate::ms_spDelegatePartyMenu;
    v6 = PopupMenuTemplate::ms_spDelegatePartyMenu;
    v7 = (char *)TextData::Get(0xC1DDF228);
    v8 = PopupMenuText::CreateWin(v7, 0x7Cu, (unsigned int)v6, v5, v4, (unsigned int)v3, v2);
    v9 = PopupMenuTemplate::ms_spDelegatePartyMenu;
    if ( (PopupMenuText *)PopupMenuTemplate::ms_spDelegatePartyMenu != v8 )
    {
      if ( PopupMenuTemplate::ms_spDelegatePartyMenu )
      {
        v10 = PopupMenuTemplate::ms_spDelegatePartyMenu;
        if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spDelegatePartyMenu->m_uiRefCount) )
        {
          if ( v10 )
            v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
        }
      }
      v9 = (PgWin *)v8;
      PopupMenuTemplate::ms_spDelegatePartyMenu = (PgWin *)v8;
      if ( v8 )
      {
        InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
        v9 = PopupMenuTemplate::ms_spDelegatePartyMenu;
      }
    }
    LODWORD(v9[1].m_kWorldBound.m_kCenter.z) = 4;
    v1 = PopupMenuTemplate::ms_spDelegatePartyMenu;
  }
  ((void (__stdcall *)(_DWORD))v1->vfptr[130].__vecDelDtor)(uiParam);
  LODWORD(PopupMenuTemplate::ms_spDelegatePartyMenu[1].m_kWorldBound.m_fRadius) = uiParam;
  return PopupMenuTemplate::ms_spDelegatePartyMenu;
}

//----- (00570750) --------------------------------------------------------
PopupMenu *__cdecl PopupMenuTemplate::GetQuitPartyMenu()
{
  PopupMenu *result; // eax@1
  bool v1; // ST18_1@2
  PgWin *v2; // ST14_4@2
  char *v3; // ST10_4@2
  PgWin *v4; // ST0C_4@2
  PgWin *v5; // ST08_4@2
  char *v6; // eax@2
  PopupMenuText *v7; // esi@2
  PgWin *v8; // eax@2
  PgWin *v9; // edi@4

  result = (PopupMenu *)PopupMenuTemplate::ms_spQuitPartyMenu;
  if ( !PopupMenuTemplate::ms_spQuitPartyMenu )
  {
    v1 = (char)PopupMenuTemplate::ms_spQuitPartyMenu;
    v2 = PopupMenuTemplate::ms_spQuitPartyMenu;
    v3 = (char *)PopupMenuTemplate::ms_spQuitPartyMenu;
    v4 = PopupMenuTemplate::ms_spQuitPartyMenu;
    v5 = PopupMenuTemplate::ms_spQuitPartyMenu;
    v6 = (char *)TextData::Get(0x48423F8Bu);
    v7 = PopupMenuText::CreateWin(v6, 0x7Du, (unsigned int)v5, v4, v3, (unsigned int)v2, v1);
    v8 = PopupMenuTemplate::ms_spQuitPartyMenu;
    if ( (PopupMenuText *)PopupMenuTemplate::ms_spQuitPartyMenu != v7 )
    {
      if ( PopupMenuTemplate::ms_spQuitPartyMenu )
      {
        v9 = PopupMenuTemplate::ms_spQuitPartyMenu;
        if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spQuitPartyMenu->m_uiRefCount) )
        {
          if ( v9 )
            v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
        }
      }
      v8 = (PgWin *)v7;
      PopupMenuTemplate::ms_spQuitPartyMenu = (PgWin *)v7;
      if ( v7 )
      {
        InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
        v8 = PopupMenuTemplate::ms_spQuitPartyMenu;
      }
    }
    LODWORD(v8[1].m_kWorldBound.m_kCenter.z) = 5;
    result = (PopupMenu *)PopupMenuTemplate::ms_spQuitPartyMenu;
  }
  return result;
}

//----- (005707E0) --------------------------------------------------------
NiD3DDefaultShader *__usercall PopupMenuTemplate::GetPartyMasterLootSetupMenu@<eax>(int a1@<edi>, PARTY_ITEM_LOOTING_TYPE eDistType)
{
  NiSourceTexture *v2; // eax@2
  PopupMenuWin *v3; // esi@2
  char *v4; // eax@2
  PopupMenuText *v5; // eax@2
  char *v6; // eax@2
  PopupMenuText *v7; // eax@2
  PopupMenuWin *v8; // edi@4
  char *v9; // eax@12
  PopupMenuSubMenu *v10; // esi@12
  NiD3DDefaultShader *result; // eax@13
  char *v12; // eax@15
  PopupMenuSubMenu *v13; // esi@15

  if ( !PopupMenuTemplate::ms_spPartyMasterLootSetupSubMenuWin )
  {
    v2 = MenuTexMgr::GetTexture(1u);
    v3 = PopupMenuWin::CreateWin(v2, 5u, 5u, 0);
    v4 = (char *)TextData::Get(0xE54F4142);
    v5 = PopupMenuText::CreateWin(v4, 0, 0, 0, 0, 0, 0);
    v5->m_ePopupMenuID = 15;
    PopupMenuWin::AddMenu(v3, a1, (PopupMenu *)&v5->vfptr);
    v6 = (char *)TextData::Get(0x78A8A1CFu);
    v7 = PopupMenuText::CreateWin(v6, 0, 0, 0, 0, 0, 0);
    v7->m_ePopupMenuID = 16;
    PopupMenuWin::AddMenu(v3, a1, (PopupMenu *)&v7->vfptr);
    PopupMenuWin::FinishMenu(v3, 0);
    if ( PopupMenuTemplate::ms_spPartyMasterLootSetupSubMenuWin != v3 )
    {
      if ( PopupMenuTemplate::ms_spPartyMasterLootSetupSubMenuWin )
      {
        v8 = PopupMenuTemplate::ms_spPartyMasterLootSetupSubMenuWin;
        if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spPartyMasterLootSetupSubMenuWin->m_uiRefCount) )
        {
          if ( v8 )
            v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
        }
      }
      PopupMenuTemplate::ms_spPartyMasterLootSetupSubMenuWin = v3;
      if ( v3 )
        InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
    }
  }
  if ( eDistType )
  {
    if ( eDistType == 1 )
    {
      if ( !PopupMenuTemplate::ms_spPartyMasterLootSequentialSetupMenu.m_pObject )
      {
        v9 = (char *)TextData::Get(0x78A8A1CFu);
        v10 = (PopupMenuSubMenu *)PopupMenuSubMenu::CreateWin(v9, 0, 0, 0, 0, 0);
        PopupMenuSubMenu::SetPopupMenu(v10, PopupMenuTemplate::ms_spPartyMasterLootSetupSubMenuWin);
        NiPointer<PopupMenuWin>::operator=(
          &PopupMenuTemplate::ms_spPartyMasterLootSequentialSetupMenu,
          (NiD3DDefaultShader *)v10);
      }
      result = PopupMenuTemplate::ms_spPartyMasterLootSequentialSetupMenu.m_pObject;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    if ( !PopupMenuTemplate::ms_spPartyMasterLootFreeSetupMenu.m_pObject )
    {
      v12 = (char *)TextData::Get(0xE54F4142);
      v13 = (PopupMenuSubMenu *)PopupMenuSubMenu::CreateWin(v12, 0, 0, 0, 0, 0);
      PopupMenuSubMenu::SetPopupMenu(v13, PopupMenuTemplate::ms_spPartyMasterLootSetupSubMenuWin);
      NiPointer<PopupMenuWin>::operator=(
        &PopupMenuTemplate::ms_spPartyMasterLootFreeSetupMenu,
        (NiD3DDefaultShader *)v13);
    }
    result = PopupMenuTemplate::ms_spPartyMasterLootFreeSetupMenu.m_pObject;
  }
  return result;
}

//----- (00570960) --------------------------------------------------------
NiD3DDefaultShader *__cdecl PopupMenuTemplate::GetPartyMemberLootSetupMenu(PARTY_ITEM_LOOTING_TYPE eDistType)
{
  NiD3DDefaultShader *result; // eax@1
  char *v2; // eax@4
  PgWin *v3; // eax@4
  char *v4; // eax@7
  PgWin *v5; // eax@7

  result = 0;
  if ( eDistType )
  {
    if ( eDistType == 1 )
    {
      if ( !PopupMenuTemplate::ms_spPartyMemberLootSequentialSetupMenu.m_pObject )
      {
        v2 = (char *)TextData::Get(0x78A8A1CFu);
        v3 = PopupMenuSubMenu::CreateWin(v2, 0, 0, 0, 0, 0);
        NiPointer<PopupMenuWin>::operator=(
          &PopupMenuTemplate::ms_spPartyMemberLootSequentialSetupMenu,
          (NiD3DDefaultShader *)v3);
      }
      result = PopupMenuTemplate::ms_spPartyMemberLootSequentialSetupMenu.m_pObject;
    }
  }
  else
  {
    if ( !PopupMenuTemplate::ms_spPartyMemberLootFreeSetupMenu.m_pObject )
    {
      v4 = (char *)TextData::Get(0xE54F4142);
      v5 = PopupMenuSubMenu::CreateWin(v4, 0, 0, 0, 0, 0);
      NiPointer<PopupMenuWin>::operator=(
        &PopupMenuTemplate::ms_spPartyMemberLootFreeSetupMenu,
        (NiD3DDefaultShader *)v5);
    }
    result = PopupMenuTemplate::ms_spPartyMemberLootFreeSetupMenu.m_pObject;
  }
  return result;
}

//----- (005709E0) --------------------------------------------------------
PopupMenu *__cdecl PopupMenuTemplate::GetFollowCharMenu(unsigned int uiParam)
{
  PopupMenu *result; // eax@1
  ActionViewInfo *v2; // eax@2
  PopupMenuText *v3; // eax@3
  int v4; // esi@5
  int v5; // eax@5
  void (__thiscall ***v6)(_DWORD, _DWORD); // edi@7

  strcpy(PopupMenuTemplate::ms_acCharName, (const char *)uiParam);
  result = (PopupMenu *)PopupMenuTemplate::ms_spFollowCharMenu;
  if ( !PopupMenuTemplate::ms_spFollowCharMenu )
  {
    v2 = ActionViewTable::GetByInxName("stick");
    if ( v2 )
      v3 = PopupMenuText::CreateWin(v2->ActionName, 0, 0, 0, 0, 0, 0);
    else
      v3 = PopupMenuText::CreateWin("Stick", 0, 0, 0, 0, 0, 0);
    v4 = (int)v3;
    v5 = PopupMenuTemplate::ms_spFollowCharMenu;
    if ( PopupMenuTemplate::ms_spFollowCharMenu != v4 )
    {
      if ( PopupMenuTemplate::ms_spFollowCharMenu )
      {
        v6 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spFollowCharMenu;
        if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spFollowCharMenu + 4)) )
        {
          if ( v6 )
            (**v6)(v6, 1);
        }
      }
      v5 = v4;
      PopupMenuTemplate::ms_spFollowCharMenu = v4;
      if ( v4 )
      {
        InterlockedIncrement((volatile LONG *)(v4 + 4));
        v5 = PopupMenuTemplate::ms_spFollowCharMenu;
      }
    }
    *(_DWORD *)(v5 + 332) = 6;
    (*(void (__stdcall **)(char *))(*(_DWORD *)PopupMenuTemplate::ms_spFollowCharMenu + 520))(PopupMenuTemplate::ms_acCharName);
    *(_DWORD *)(PopupMenuTemplate::ms_spFollowCharMenu + 336) = PopupMenuTemplate::ms_acCharName;
    result = (PopupMenu *)PopupMenuTemplate::ms_spFollowCharMenu;
  }
  return result;
}
// A8D390: using guessed type int PopupMenuTemplate::ms_spFollowCharMenu;

//----- (00570AC0) --------------------------------------------------------
PopupMenu *__cdecl PopupMenuTemplate::GetChatWhisperMenu(unsigned int uiParam)
{
  PopupMenu *result; // eax@1
  bool v2; // ST18_1@2
  PgWin *v3; // ST14_4@2
  char *v4; // ST10_4@2
  PgWin *v5; // ST0C_4@2
  PgWin *v6; // ST08_4@2
  PgWin *v7; // ST04_4@2
  char *v8; // eax@2
  PopupMenuText *v9; // esi@2
  PgWin *v10; // eax@2
  PgWin *v11; // edi@4

  strcpy(PopupMenuTemplate::ms_acCharName, (const char *)uiParam);
  result = (PopupMenu *)PopupMenuTemplate::ms_spWhisper;
  if ( !PopupMenuTemplate::ms_spWhisper )
  {
    v2 = (char)PopupMenuTemplate::ms_spWhisper;
    v3 = PopupMenuTemplate::ms_spWhisper;
    v4 = (char *)PopupMenuTemplate::ms_spWhisper;
    v5 = PopupMenuTemplate::ms_spWhisper;
    v6 = PopupMenuTemplate::ms_spWhisper;
    v7 = PopupMenuTemplate::ms_spWhisper;
    v8 = (char *)TextData::Get(0xBEEF0012);
    v9 = PopupMenuText::CreateWin(v8, (unsigned int)v7, (unsigned int)v6, v5, v4, (unsigned int)v3, v2);
    v10 = PopupMenuTemplate::ms_spWhisper;
    if ( (PopupMenuText *)PopupMenuTemplate::ms_spWhisper != v9 )
    {
      if ( PopupMenuTemplate::ms_spWhisper )
      {
        v11 = PopupMenuTemplate::ms_spWhisper;
        if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spWhisper->m_uiRefCount) )
        {
          if ( v11 )
            v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
        }
      }
      v10 = (PgWin *)v9;
      PopupMenuTemplate::ms_spWhisper = (PgWin *)v9;
      if ( v9 )
      {
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
        v10 = PopupMenuTemplate::ms_spWhisper;
      }
    }
    LODWORD(v10[1].m_kWorldBound.m_kCenter.z) = 7;
    ((void (__stdcall *)(char *))PopupMenuTemplate::ms_spWhisper->vfptr[130].__vecDelDtor)(PopupMenuTemplate::ms_acCharName);
    LODWORD(PopupMenuTemplate::ms_spWhisper[1].m_kWorldBound.m_fRadius) = PopupMenuTemplate::ms_acCharName;
    result = (PopupMenu *)PopupMenuTemplate::ms_spWhisper;
  }
  return result;
}

//----- (00570B90) --------------------------------------------------------
PopupMenuText *__cdecl PopupMenuTemplate::GetmhUI_Endure(int iEndure)
{
  char *v1; // eax@3
  char *v2; // eax@3
  PopupMenuText *v3; // esi@6
  PopupMenuText *result; // eax@6
  void (__thiscall ***v5)(_DWORD, _DWORD); // edi@8

  if ( iEndure == 100000 )
  {
    v2 = (char *)TextData2::Get(0xA5CAE523);
  }
  else if ( iEndure == 200000 )
  {
    v2 = (char *)TextData2::Get(0xDF1C7F5A);
  }
  else
  {
    v1 = (char *)TextData2::Get(0x51819BC5u);
    v2 = fs(v1, iEndure);
  }
  v3 = PopupMenuText::CreateWin(v2, 0x7Fu, 0, 0, 0, 0, 0);
  result = (PopupMenuText *)PopupMenuTemplate::ms_spMHObjEndure;
  if ( (PopupMenuText *)PopupMenuTemplate::ms_spMHObjEndure != v3 )
  {
    if ( PopupMenuTemplate::ms_spMHObjEndure )
    {
      v5 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spMHObjEndure;
      if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spMHObjEndure + 4)) )
      {
        if ( v5 )
          (**v5)(v5, 1);
      }
    }
    result = v3;
    PopupMenuTemplate::ms_spMHObjEndure = (int)v3;
    if ( v3 )
    {
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
      result = (PopupMenuText *)PopupMenuTemplate::ms_spMHObjEndure;
    }
  }
  return result;
}
// A8D438: using guessed type int PopupMenuTemplate::ms_spMHObjEndure;

//----- (00570C40) --------------------------------------------------------
PopupMenuText *__cdecl PopupMenuTemplate::GetmhUI_EndurePercentage(int iEndurePer)
{
  char *v1; // eax@1
  char *v2; // eax@1
  PopupMenuText *v3; // esi@1
  PopupMenuText *result; // eax@1
  void (__thiscall ***v5)(_DWORD, _DWORD); // edi@3

  v1 = (char *)TextData2::Get(0x606EA4BDu);
  v2 = fs(v1, iEndurePer);
  v3 = PopupMenuText::CreateWin(v2, 0x7Fu, 0, 0, 0, 0, 0);
  result = (PopupMenuText *)PopupMenuTemplate::ms_spMHObjEndurePercentage;
  if ( (PopupMenuText *)PopupMenuTemplate::ms_spMHObjEndurePercentage != v3 )
  {
    if ( PopupMenuTemplate::ms_spMHObjEndurePercentage )
    {
      v5 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spMHObjEndurePercentage;
      if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spMHObjEndurePercentage + 4)) )
      {
        if ( v5 )
          (**v5)(v5, 1);
      }
    }
    result = v3;
    PopupMenuTemplate::ms_spMHObjEndurePercentage = (int)v3;
    if ( v3 )
    {
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
      result = (PopupMenuText *)PopupMenuTemplate::ms_spMHObjEndurePercentage;
    }
  }
  return result;
}
// A8D43C: using guessed type int PopupMenuTemplate::ms_spMHObjEndurePercentage;

//----- (00570CC0) --------------------------------------------------------
PopupMenuText *__cdecl PopupMenuTemplate::GetmhUI_GuestListConfigRoomMenu()
{
  PopupMenuText *result; // eax@1
  bool v1; // ST18_1@2
  PgWin *v2; // ST14_4@2
  char *v3; // ST10_4@2
  PgWin *v4; // ST0C_4@2
  PgWin *v5; // ST08_4@2
  char *v6; // eax@2
  PopupMenuText *v7; // esi@2
  PgWin *v8; // edi@4

  result = (PopupMenuText *)PopupMenuTemplate::ms_spConfigRoom;
  if ( !PopupMenuTemplate::ms_spConfigRoom )
  {
    v1 = (char)PopupMenuTemplate::ms_spConfigRoom;
    v2 = PopupMenuTemplate::ms_spConfigRoom;
    v3 = (char *)PopupMenuTemplate::ms_spConfigRoom;
    v4 = PopupMenuTemplate::ms_spConfigRoom;
    v5 = PopupMenuTemplate::ms_spConfigRoom;
    v6 = (char *)TextData2::Get(0xD3C92430);
    v7 = PopupMenuText::CreateWin(v6, 0xC0u, (unsigned int)v5, v4, v3, (unsigned int)v2, v1);
    result = (PopupMenuText *)PopupMenuTemplate::ms_spConfigRoom;
    if ( (PopupMenuText *)PopupMenuTemplate::ms_spConfigRoom != v7 )
    {
      if ( PopupMenuTemplate::ms_spConfigRoom )
      {
        v8 = PopupMenuTemplate::ms_spConfigRoom;
        if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spConfigRoom->m_uiRefCount) )
        {
          if ( v8 )
            v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
        }
      }
      result = v7;
      PopupMenuTemplate::ms_spConfigRoom = (PgWin *)v7;
      if ( v7 )
      {
        InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
        result = (PopupMenuText *)PopupMenuTemplate::ms_spConfigRoom;
      }
    }
  }
  return result;
}

//----- (00570D40) --------------------------------------------------------
PopupMenuText *__cdecl PopupMenuTemplate::GetmhUI_GuestListShowBlogMenu()
{
  char *v0; // eax@1
  PopupMenuText *v1; // esi@1
  PopupMenuText *result; // eax@1
  void (__thiscall ***v3)(_DWORD, _DWORD); // edi@3

  v0 = (char *)TextData2::Get(0x999D9181);
  v1 = PopupMenuText::CreateWin(v0, 0xC1u, 0, 0, 0, 0, 0);
  result = (PopupMenuText *)PopupMenuTemplate::ms_spShowBlog;
  if ( (PopupMenuText *)PopupMenuTemplate::ms_spShowBlog != v1 )
  {
    if ( PopupMenuTemplate::ms_spShowBlog )
    {
      v3 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spShowBlog;
      if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spShowBlog + 4)) )
      {
        if ( v3 )
          (**v3)(v3, 1);
      }
    }
    result = v1;
    PopupMenuTemplate::ms_spShowBlog = (int)v1;
    if ( v1 )
    {
      InterlockedIncrement((volatile LONG *)&v1->m_uiRefCount);
      result = (PopupMenuText *)PopupMenuTemplate::ms_spShowBlog;
    }
  }
  return result;
}
// A8D410: using guessed type int PopupMenuTemplate::ms_spShowBlog;

//----- (00570DC0) --------------------------------------------------------
PopupMenuText *__cdecl PopupMenuTemplate::GetmhUI_GuestListChangeBlogAddrMenu()
{
  char *v0; // eax@1
  PopupMenuText *v1; // esi@1
  PopupMenuText *result; // eax@1
  void (__thiscall ***v3)(_DWORD, _DWORD); // edi@3

  v0 = (char *)TextData2::Get(0x1B33685Cu);
  v1 = PopupMenuText::CreateWin(v0, 0xC2u, 0, 0, 0, 0, 0);
  result = (PopupMenuText *)PopupMenuTemplate::ms_spChangeBlogAddr;
  if ( (PopupMenuText *)PopupMenuTemplate::ms_spChangeBlogAddr != v1 )
  {
    if ( PopupMenuTemplate::ms_spChangeBlogAddr )
    {
      v3 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spChangeBlogAddr;
      if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spChangeBlogAddr + 4)) )
      {
        if ( v3 )
          (**v3)(v3, 1);
      }
    }
    result = v1;
    PopupMenuTemplate::ms_spChangeBlogAddr = (int)v1;
    if ( v1 )
    {
      InterlockedIncrement((volatile LONG *)&v1->m_uiRefCount);
      result = (PopupMenuText *)PopupMenuTemplate::ms_spChangeBlogAddr;
    }
  }
  return result;
}
// A8D414: using guessed type int PopupMenuTemplate::ms_spChangeBlogAddr;

//----- (00570E40) --------------------------------------------------------
PopupMenuText *__cdecl PopupMenuTemplate::GetmhUI_GuestListKickGuestMenu()
{
  char *v0; // eax@1
  PopupMenuText *v1; // esi@1
  PopupMenuText *result; // eax@1
  void (__thiscall ***v3)(_DWORD, _DWORD); // edi@3

  v0 = (char *)TextData2::Get(0x46424637u);
  v1 = PopupMenuText::CreateWin(v0, 0xC3u, 0, 0, 0, 0, 0);
  result = (PopupMenuText *)PopupMenuTemplate::ms_spKickGuest;
  if ( (PopupMenuText *)PopupMenuTemplate::ms_spKickGuest != v1 )
  {
    if ( PopupMenuTemplate::ms_spKickGuest )
    {
      v3 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spKickGuest;
      if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spKickGuest + 4)) )
      {
        if ( v3 )
          (**v3)(v3, 1);
      }
    }
    result = v1;
    PopupMenuTemplate::ms_spKickGuest = (int)v1;
    if ( v1 )
    {
      InterlockedIncrement((volatile LONG *)&v1->m_uiRefCount);
      result = (PopupMenuText *)PopupMenuTemplate::ms_spKickGuest;
    }
  }
  return result;
}
// A8D418: using guessed type int PopupMenuTemplate::ms_spKickGuest;

//----- (00570EC0) --------------------------------------------------------
PopupMenuText *__cdecl PopupMenuTemplate::GetmhUI_GuestListSetArrangeModeOnMenu()
{
  char *v0; // eax@1
  PopupMenuText *v1; // esi@1
  PopupMenuText *result; // eax@1
  void (__thiscall ***v3)(_DWORD, _DWORD); // edi@3

  v0 = (char *)TextData2::Get(0xE82F1F1D);
  v1 = PopupMenuText::CreateWin(v0, 0xC4u, 0, 0, 0, 0, 0);
  result = (PopupMenuText *)PopupMenuTemplate::ms_spSetArrModeOn;
  if ( (PopupMenuText *)PopupMenuTemplate::ms_spSetArrModeOn != v1 )
  {
    if ( PopupMenuTemplate::ms_spSetArrModeOn )
    {
      v3 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spSetArrModeOn;
      if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spSetArrModeOn + 4)) )
      {
        if ( v3 )
          (**v3)(v3, 1);
      }
    }
    result = v1;
    PopupMenuTemplate::ms_spSetArrModeOn = (int)v1;
    if ( v1 )
    {
      InterlockedIncrement((volatile LONG *)&v1->m_uiRefCount);
      result = (PopupMenuText *)PopupMenuTemplate::ms_spSetArrModeOn;
    }
  }
  return result;
}
// A8D41C: using guessed type int PopupMenuTemplate::ms_spSetArrModeOn;

//----- (00570F40) --------------------------------------------------------
PopupMenuText *__cdecl PopupMenuTemplate::GetmhUI_GuestListSetArrangeModeOffMenu()
{
  char *v0; // eax@1
  PopupMenuText *v1; // esi@1
  PopupMenuText *result; // eax@1
  void (__thiscall ***v3)(_DWORD, _DWORD); // edi@3

  v0 = (char *)TextData2::Get(0x2D2F636Bu);
  v1 = PopupMenuText::CreateWin(v0, 0xC4u, 0, 0, 0, 0, 0);
  result = (PopupMenuText *)PopupMenuTemplate::ms_spSetArrModeOff;
  if ( (PopupMenuText *)PopupMenuTemplate::ms_spSetArrModeOff != v1 )
  {
    if ( PopupMenuTemplate::ms_spSetArrModeOff )
    {
      v3 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spSetArrModeOff;
      if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spSetArrModeOff + 4)) )
      {
        if ( v3 )
          (**v3)(v3, 1);
      }
    }
    result = v1;
    PopupMenuTemplate::ms_spSetArrModeOff = (int)v1;
    if ( v1 )
    {
      InterlockedIncrement((volatile LONG *)&v1->m_uiRefCount);
      result = (PopupMenuText *)PopupMenuTemplate::ms_spSetArrModeOff;
    }
  }
  return result;
}
// A8D420: using guessed type int PopupMenuTemplate::ms_spSetArrModeOff;

//----- (00570FC0) --------------------------------------------------------
PopupMenu *__cdecl PopupMenuTemplate::GetmhUI_ReturnToInvMHItem(bool ClickInv)
{
  char *v1; // eax@4
  PopupMenuText *v2; // esi@4
  int v3; // eax@4
  void (__thiscall ***v4)(_DWORD, _DWORD); // edi@6
  unsigned int v6; // [sp-18h] [bp-20h]@2

  if ( ClickInv == 1 )
    v6 = 197;
  else
    v6 = 228;
  v1 = (char *)TextData2::Get(0x5599F7CBu);
  v2 = PopupMenuText::CreateWin(v1, v6, 0, 0, 0, 0, 0);
  v3 = PopupMenuTemplate::ms_spReturnToInvMHItem;
  if ( (PopupMenuText *)PopupMenuTemplate::ms_spReturnToInvMHItem != v2 )
  {
    if ( PopupMenuTemplate::ms_spReturnToInvMHItem )
    {
      v4 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spReturnToInvMHItem;
      if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spReturnToInvMHItem + 4)) )
      {
        if ( v4 )
          (**v4)(v4, 1);
      }
    }
    v3 = (int)v2;
    PopupMenuTemplate::ms_spReturnToInvMHItem = (int)v2;
    if ( v2 )
    {
      InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
      v3 = PopupMenuTemplate::ms_spReturnToInvMHItem;
    }
  }
  *(_DWORD *)(v3 + 332) = 1000;
  return (PopupMenu *)PopupMenuTemplate::ms_spReturnToInvMHItem;
}
// A8D424: using guessed type int PopupMenuTemplate::ms_spReturnToInvMHItem;

//----- (00571060) --------------------------------------------------------
PopupMenuText *__cdecl PopupMenuTemplate::GetmhUI_ArrToInvMHItem()
{
  char *v0; // eax@1
  PopupMenuText *v1; // esi@1
  PopupMenuText *result; // eax@1
  void (__thiscall ***v3)(_DWORD, _DWORD); // edi@3

  v0 = (char *)TextData2::Get(0x666EEAB1u);
  v1 = PopupMenuText::CreateWin(v0, 0xC6u, 0, 0, 0, 0, 0);
  result = (PopupMenuText *)PopupMenuTemplate::ms_spArrToInvMHItem;
  if ( (PopupMenuText *)PopupMenuTemplate::ms_spArrToInvMHItem != v1 )
  {
    if ( PopupMenuTemplate::ms_spArrToInvMHItem )
    {
      v3 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spArrToInvMHItem;
      if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spArrToInvMHItem + 4)) )
      {
        if ( v3 )
          (**v3)(v3, 1);
      }
    }
    result = v1;
    PopupMenuTemplate::ms_spArrToInvMHItem = (int)v1;
    if ( v1 )
    {
      InterlockedIncrement((volatile LONG *)&v1->m_uiRefCount);
      result = (PopupMenuText *)PopupMenuTemplate::ms_spArrToInvMHItem;
    }
  }
  return result;
}
// A8D428: using guessed type int PopupMenuTemplate::ms_spArrToInvMHItem;

//----- (005710E0) --------------------------------------------------------
PopupMenuText *__cdecl PopupMenuTemplate::GetmhUI_DeleteMHItem()
{
  char *v0; // eax@1
  PopupMenuText *v1; // esi@1
  PopupMenuText *result; // eax@1
  void (__thiscall ***v3)(_DWORD, _DWORD); // edi@3

  v0 = (char *)TextData2::Get(0x48828BCDu);
  v1 = PopupMenuText::CreateWin(v0, 0xC7u, 0, 0, 0, 0, 0);
  result = (PopupMenuText *)PopupMenuTemplate::ms_spDeleteMHItem;
  if ( (PopupMenuText *)PopupMenuTemplate::ms_spDeleteMHItem != v1 )
  {
    if ( PopupMenuTemplate::ms_spDeleteMHItem )
    {
      v3 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spDeleteMHItem;
      if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spDeleteMHItem + 4)) )
      {
        if ( v3 )
          (**v3)(v3, 1);
      }
    }
    result = v1;
    PopupMenuTemplate::ms_spDeleteMHItem = (int)v1;
    if ( v1 )
    {
      InterlockedIncrement((volatile LONG *)&v1->m_uiRefCount);
      result = (PopupMenuText *)PopupMenuTemplate::ms_spDeleteMHItem;
    }
  }
  return result;
}
// A8D42C: using guessed type int PopupMenuTemplate::ms_spDeleteMHItem;

//----- (00571160) --------------------------------------------------------
PopupMenuText *__cdecl PopupMenuTemplate::GetmhUI_ObjAction()
{
  char *v0; // eax@1
  PopupMenuText *v1; // esi@1
  PopupMenuText *result; // eax@1
  void (__thiscall ***v3)(_DWORD, _DWORD); // edi@3

  v0 = (char *)TextData2::Get(0xE4EAF2C1);
  v1 = PopupMenuText::CreateWin(v0, 0xDCu, 0, 0, 0, 0, 0);
  result = (PopupMenuText *)PopupMenuTemplate::ms_spObjAction;
  if ( (PopupMenuText *)PopupMenuTemplate::ms_spObjAction != v1 )
  {
    if ( PopupMenuTemplate::ms_spObjAction )
    {
      v3 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spObjAction;
      if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spObjAction + 4)) )
      {
        if ( v3 )
          (**v3)(v3, 1);
      }
    }
    result = v1;
    PopupMenuTemplate::ms_spObjAction = (int)v1;
    if ( v1 )
    {
      InterlockedIncrement((volatile LONG *)&v1->m_uiRefCount);
      result = (PopupMenuText *)PopupMenuTemplate::ms_spObjAction;
    }
  }
  return result;
}
// A8D430: using guessed type int PopupMenuTemplate::ms_spObjAction;

//----- (005711E0) --------------------------------------------------------
PopupMenuText *__cdecl PopupMenuTemplate::GetmhUI_ReArrange()
{
  char *v0; // eax@1
  PopupMenuText *v1; // esi@1
  PopupMenuText *result; // eax@1
  void (__thiscall ***v3)(_DWORD, _DWORD); // edi@3

  v0 = (char *)TextData2::Get(0x2B4A44A7u);
  v1 = PopupMenuText::CreateWin(v0, 0xDEu, 0, 0, 0, 0, 0);
  result = (PopupMenuText *)PopupMenuTemplate::m_spReArrange;
  if ( (PopupMenuText *)PopupMenuTemplate::m_spReArrange != v1 )
  {
    if ( PopupMenuTemplate::m_spReArrange )
    {
      v3 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::m_spReArrange;
      if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::m_spReArrange + 4)) )
      {
        if ( v3 )
          (**v3)(v3, 1);
      }
    }
    result = v1;
    PopupMenuTemplate::m_spReArrange = (int)v1;
    if ( v1 )
    {
      InterlockedIncrement((volatile LONG *)&v1->m_uiRefCount);
      result = (PopupMenuText *)PopupMenuTemplate::m_spReArrange;
    }
  }
  return result;
}
// A8D440: using guessed type int PopupMenuTemplate::m_spReArrange;

//----- (00571260) --------------------------------------------------------
PopupMenu *__cdecl PopupMenuTemplate::GetInviteHighHolyPromise(unsigned int uiParam)
{
  PopupMenu *result; // eax@1
  bool v2; // ST18_1@2
  PgWin *v3; // ST14_4@2
  char *v4; // ST10_4@2
  PgWin *v5; // ST0C_4@2
  PgWin *v6; // ST08_4@2
  PgWin *v7; // ST04_4@2
  char *v8; // eax@2
  PopupMenuText *v9; // esi@2
  PgWin *v10; // eax@2
  PgWin *v11; // edi@4

  strcpy(PopupMenuTemplate::ms_acCharName, (const char *)uiParam);
  result = (PopupMenu *)PopupMenuTemplate::ms_spHighHolyPromise;
  if ( !PopupMenuTemplate::ms_spHighHolyPromise )
  {
    v2 = (char)PopupMenuTemplate::ms_spHighHolyPromise;
    v3 = PopupMenuTemplate::ms_spHighHolyPromise;
    v4 = (char *)PopupMenuTemplate::ms_spHighHolyPromise;
    v5 = PopupMenuTemplate::ms_spHighHolyPromise;
    v6 = PopupMenuTemplate::ms_spHighHolyPromise;
    v7 = PopupMenuTemplate::ms_spHighHolyPromise;
    v8 = (char *)TextData::Get(0xD937143F);
    v9 = PopupMenuText::CreateWin(v8, (unsigned int)v7, (unsigned int)v6, v5, v4, (unsigned int)v3, v2);
    v10 = PopupMenuTemplate::ms_spHighHolyPromise;
    if ( (PopupMenuText *)PopupMenuTemplate::ms_spHighHolyPromise != v9 )
    {
      if ( PopupMenuTemplate::ms_spHighHolyPromise )
      {
        v11 = PopupMenuTemplate::ms_spHighHolyPromise;
        if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spHighHolyPromise->m_uiRefCount) )
        {
          if ( v11 )
            v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
        }
      }
      v10 = (PgWin *)v9;
      PopupMenuTemplate::ms_spHighHolyPromise = (PgWin *)v9;
      if ( v9 )
      {
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
        v10 = PopupMenuTemplate::ms_spHighHolyPromise;
      }
    }
    LODWORD(v10[1].m_kWorldBound.m_kCenter.z) = 1005;
    ((void (__stdcall *)(char *))PopupMenuTemplate::ms_spHighHolyPromise->vfptr[130].__vecDelDtor)(PopupMenuTemplate::ms_acCharName);
    LODWORD(PopupMenuTemplate::ms_spHighHolyPromise[1].m_kWorldBound.m_fRadius) = PopupMenuTemplate::ms_acCharName;
    result = (PopupMenu *)PopupMenuTemplate::ms_spHighHolyPromise;
  }
  return result;
}

//----- (00571330) --------------------------------------------------------
PopupMenu *__cdecl PopupMenuTemplate::GetPartyBuffMenu(unsigned int uiParam)
{
  PopupMenu *result; // eax@1
  bool v2; // ST18_1@2
  PgWin *v3; // ST14_4@2
  char *v4; // ST10_4@2
  PgWin *v5; // ST0C_4@2
  PgWin *v6; // ST08_4@2
  PgWin *v7; // ST04_4@2
  char *v8; // eax@2
  PopupMenuText *v9; // esi@2
  PgWin *v10; // eax@2
  PgWin *v11; // edi@4

  strcpy(PopupMenuTemplate::ms_acCharName, (const char *)uiParam);
  result = (PopupMenu *)PopupMenuTemplate::ms_spBuffUIMenu;
  if ( !PopupMenuTemplate::ms_spBuffUIMenu )
  {
    v2 = (char)PopupMenuTemplate::ms_spBuffUIMenu;
    v3 = PopupMenuTemplate::ms_spBuffUIMenu;
    v4 = (char *)PopupMenuTemplate::ms_spBuffUIMenu;
    v5 = PopupMenuTemplate::ms_spBuffUIMenu;
    v6 = PopupMenuTemplate::ms_spBuffUIMenu;
    v7 = PopupMenuTemplate::ms_spBuffUIMenu;
    v8 = (char *)TextData2::Get(0x4F9E7082u);
    v9 = PopupMenuText::CreateWin(v8, (unsigned int)v7, (unsigned int)v6, v5, v4, (unsigned int)v3, v2);
    v10 = PopupMenuTemplate::ms_spBuffUIMenu;
    if ( (PopupMenuText *)PopupMenuTemplate::ms_spBuffUIMenu != v9 )
    {
      if ( PopupMenuTemplate::ms_spBuffUIMenu )
      {
        v11 = PopupMenuTemplate::ms_spBuffUIMenu;
        if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spBuffUIMenu->m_uiRefCount) )
        {
          if ( v11 )
            v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
        }
      }
      v10 = (PgWin *)v9;
      PopupMenuTemplate::ms_spBuffUIMenu = (PgWin *)v9;
      if ( v9 )
      {
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
        v10 = PopupMenuTemplate::ms_spBuffUIMenu;
      }
    }
    LODWORD(v10[1].m_kWorldBound.m_kCenter.z) = 1014;
    ((void (__stdcall *)(char *))PopupMenuTemplate::ms_spBuffUIMenu->vfptr[130].__vecDelDtor)(PopupMenuTemplate::ms_acCharName);
    LODWORD(PopupMenuTemplate::ms_spBuffUIMenu[1].m_kWorldBound.m_fRadius) = PopupMenuTemplate::ms_acCharName;
    result = (PopupMenu *)PopupMenuTemplate::ms_spBuffUIMenu;
  }
  return result;
}

//----- (00571400) --------------------------------------------------------
PgWin *__cdecl PopupMenuTemplate::GetRaidMemberSelectMenu(unsigned int uiParam)
{
  PgWin *v1; // ecx@1
  bool v2; // ST18_1@2
  PgWin *v3; // ST14_4@2
  char *v4; // ST10_4@2
  PgWin *v5; // ST0C_4@2
  PgWin *v6; // ST08_4@2
  PgWin *v7; // ST04_4@2
  char *v8; // eax@2
  PopupMenuText *v9; // esi@2
  PgWin *v10; // eax@2
  PgWin *v11; // edi@4

  v1 = PopupMenuTemplate::ms_spRaidSelect;
  if ( !PopupMenuTemplate::ms_spRaidSelect )
  {
    v2 = (char)PopupMenuTemplate::ms_spRaidSelect;
    v3 = PopupMenuTemplate::ms_spRaidSelect;
    v4 = (char *)PopupMenuTemplate::ms_spRaidSelect;
    v5 = PopupMenuTemplate::ms_spRaidSelect;
    v6 = PopupMenuTemplate::ms_spRaidSelect;
    v7 = PopupMenuTemplate::ms_spRaidSelect;
    v8 = (char *)TextData2::Get(0x8C936CB2);
    v9 = PopupMenuText::CreateWin(v8, (unsigned int)v7, (unsigned int)v6, v5, v4, (unsigned int)v3, v2);
    v10 = PopupMenuTemplate::ms_spRaidSelect;
    if ( (PopupMenuText *)PopupMenuTemplate::ms_spRaidSelect != v9 )
    {
      if ( PopupMenuTemplate::ms_spRaidSelect )
      {
        v11 = PopupMenuTemplate::ms_spRaidSelect;
        if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spRaidSelect->m_uiRefCount) )
        {
          if ( v11 )
            v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
        }
      }
      v10 = (PgWin *)v9;
      PopupMenuTemplate::ms_spRaidSelect = (PgWin *)v9;
      if ( v9 )
      {
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
        v10 = PopupMenuTemplate::ms_spRaidSelect;
      }
    }
    LODWORD(v10[1].m_kWorldBound.m_kCenter.z) = 1020;
    v1 = PopupMenuTemplate::ms_spRaidSelect;
  }
  ((void (__stdcall *)(_DWORD))v1->vfptr[130].__vecDelDtor)(uiParam);
  LODWORD(PopupMenuTemplate::ms_spRaidSelect[1].m_kWorldBound.m_fRadius) = uiParam;
  return PopupMenuTemplate::ms_spRaidSelect;
}

//----- (005714B0) --------------------------------------------------------
PgWin *__cdecl PopupMenuTemplate::GetRaidMemberInviteMenu(unsigned int uiParam)
{
  PgWin *v1; // ecx@1
  bool v2; // ST18_1@2
  PgWin *v3; // ST14_4@2
  char *v4; // ST10_4@2
  PgWin *v5; // ST0C_4@2
  PgWin *v6; // ST08_4@2
  PgWin *v7; // ST04_4@2
  char *v8; // eax@2
  PopupMenuText *v9; // esi@2
  PgWin *v10; // eax@2
  PgWin *v11; // edi@4

  v1 = PopupMenuTemplate::ms_spRaidInvite;
  if ( !PopupMenuTemplate::ms_spRaidInvite )
  {
    v2 = (char)PopupMenuTemplate::ms_spRaidInvite;
    v3 = PopupMenuTemplate::ms_spRaidInvite;
    v4 = (char *)PopupMenuTemplate::ms_spRaidInvite;
    v5 = PopupMenuTemplate::ms_spRaidInvite;
    v6 = PopupMenuTemplate::ms_spRaidInvite;
    v7 = PopupMenuTemplate::ms_spRaidInvite;
    v8 = (char *)TextData2::Get(0xFAF92532);
    v9 = PopupMenuText::CreateWin(v8, (unsigned int)v7, (unsigned int)v6, v5, v4, (unsigned int)v3, v2);
    v10 = PopupMenuTemplate::ms_spRaidInvite;
    if ( (PopupMenuText *)PopupMenuTemplate::ms_spRaidInvite != v9 )
    {
      if ( PopupMenuTemplate::ms_spRaidInvite )
      {
        v11 = PopupMenuTemplate::ms_spRaidInvite;
        if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spRaidInvite->m_uiRefCount) )
        {
          if ( v11 )
            v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
        }
      }
      v10 = (PgWin *)v9;
      PopupMenuTemplate::ms_spRaidInvite = (PgWin *)v9;
      if ( v9 )
      {
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
        v10 = PopupMenuTemplate::ms_spRaidInvite;
      }
    }
    LODWORD(v10[1].m_kWorldBound.m_kCenter.z) = 1021;
    v1 = PopupMenuTemplate::ms_spRaidInvite;
  }
  ((void (__stdcall *)(_DWORD))v1->vfptr[130].__vecDelDtor)(uiParam);
  LODWORD(PopupMenuTemplate::ms_spRaidInvite[1].m_kWorldBound.m_fRadius) = uiParam;
  return PopupMenuTemplate::ms_spRaidInvite;
}

//----- (00571560) --------------------------------------------------------
PgWin *__cdecl PopupMenuTemplate::GetRaidMemberVanishMenu(unsigned int uiParam)
{
  PgWin *v1; // ecx@1
  bool v2; // ST18_1@2
  PgWin *v3; // ST14_4@2
  char *v4; // ST10_4@2
  PgWin *v5; // ST0C_4@2
  PgWin *v6; // ST08_4@2
  PgWin *v7; // ST04_4@2
  char *v8; // eax@2
  PopupMenuText *v9; // esi@2
  PgWin *v10; // eax@2
  PgWin *v11; // edi@4

  v1 = PopupMenuTemplate::ms_spRaidVanish;
  if ( !PopupMenuTemplate::ms_spRaidVanish )
  {
    v2 = (char)PopupMenuTemplate::ms_spRaidVanish;
    v3 = PopupMenuTemplate::ms_spRaidVanish;
    v4 = (char *)PopupMenuTemplate::ms_spRaidVanish;
    v5 = PopupMenuTemplate::ms_spRaidVanish;
    v6 = PopupMenuTemplate::ms_spRaidVanish;
    v7 = PopupMenuTemplate::ms_spRaidVanish;
    v8 = (char *)TextData2::Get(0xFAF11B2A);
    v9 = PopupMenuText::CreateWin(v8, (unsigned int)v7, (unsigned int)v6, v5, v4, (unsigned int)v3, v2);
    v10 = PopupMenuTemplate::ms_spRaidVanish;
    if ( (PopupMenuText *)PopupMenuTemplate::ms_spRaidVanish != v9 )
    {
      if ( PopupMenuTemplate::ms_spRaidVanish )
      {
        v11 = PopupMenuTemplate::ms_spRaidVanish;
        if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spRaidVanish->m_uiRefCount) )
        {
          if ( v11 )
            v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
        }
      }
      v10 = (PgWin *)v9;
      PopupMenuTemplate::ms_spRaidVanish = (PgWin *)v9;
      if ( v9 )
      {
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
        v10 = PopupMenuTemplate::ms_spRaidVanish;
      }
    }
    LODWORD(v10[1].m_kWorldBound.m_kCenter.z) = 1022;
    v1 = PopupMenuTemplate::ms_spRaidVanish;
  }
  ((void (__stdcall *)(_DWORD))v1->vfptr[130].__vecDelDtor)(uiParam);
  LODWORD(PopupMenuTemplate::ms_spRaidVanish[1].m_kWorldBound.m_fRadius) = uiParam;
  return PopupMenuTemplate::ms_spRaidVanish;
}

//----- (00571610) --------------------------------------------------------
PgWin *__cdecl PopupMenuTemplate::GetRaidMemberLeaveMenu(unsigned int uiParam)
{
  PgWin *v1; // ecx@1
  bool v2; // ST18_1@2
  PgWin *v3; // ST14_4@2
  char *v4; // ST10_4@2
  PgWin *v5; // ST0C_4@2
  PgWin *v6; // ST08_4@2
  PgWin *v7; // ST04_4@2
  char *v8; // eax@2
  PopupMenuText *v9; // esi@2
  PgWin *v10; // eax@2
  PgWin *v11; // edi@4

  v1 = PopupMenuTemplate::ms_spRaidLeave;
  if ( !PopupMenuTemplate::ms_spRaidLeave )
  {
    v2 = (char)PopupMenuTemplate::ms_spRaidLeave;
    v3 = PopupMenuTemplate::ms_spRaidLeave;
    v4 = (char *)PopupMenuTemplate::ms_spRaidLeave;
    v5 = PopupMenuTemplate::ms_spRaidLeave;
    v6 = PopupMenuTemplate::ms_spRaidLeave;
    v7 = PopupMenuTemplate::ms_spRaidLeave;
    v8 = (char *)TextData2::Get(0x7E4D726u);
    v9 = PopupMenuText::CreateWin(v8, (unsigned int)v7, (unsigned int)v6, v5, v4, (unsigned int)v3, v2);
    v10 = PopupMenuTemplate::ms_spRaidLeave;
    if ( (PopupMenuText *)PopupMenuTemplate::ms_spRaidLeave != v9 )
    {
      if ( PopupMenuTemplate::ms_spRaidLeave )
      {
        v11 = PopupMenuTemplate::ms_spRaidLeave;
        if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spRaidLeave->m_uiRefCount) )
        {
          if ( v11 )
            v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
        }
      }
      v10 = (PgWin *)v9;
      PopupMenuTemplate::ms_spRaidLeave = (PgWin *)v9;
      if ( v9 )
      {
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
        v10 = PopupMenuTemplate::ms_spRaidLeave;
      }
    }
    LODWORD(v10[1].m_kWorldBound.m_kCenter.z) = 1023;
    v1 = PopupMenuTemplate::ms_spRaidLeave;
  }
  ((void (__stdcall *)(_DWORD))v1->vfptr[130].__vecDelDtor)(uiParam);
  LODWORD(PopupMenuTemplate::ms_spRaidLeave[1].m_kWorldBound.m_fRadius) = uiParam;
  return PopupMenuTemplate::ms_spRaidLeave;
}

//----- (005716C0) --------------------------------------------------------
PgWin *__cdecl PopupMenuTemplate::GetChangeRaidLeaderMenu(unsigned int uiParam)
{
  PgWin *v1; // ecx@1
  bool v2; // ST18_1@2
  PgWin *v3; // ST14_4@2
  char *v4; // ST10_4@2
  PgWin *v5; // ST0C_4@2
  PgWin *v6; // ST08_4@2
  PgWin *v7; // ST04_4@2
  char *v8; // eax@2
  PopupMenuText *v9; // esi@2
  PgWin *v10; // eax@2
  PgWin *v11; // edi@4

  v1 = PopupMenuTemplate::ms_spChangeRaidLeader;
  if ( !PopupMenuTemplate::ms_spChangeRaidLeader )
  {
    v2 = (char)PopupMenuTemplate::ms_spChangeRaidLeader;
    v3 = PopupMenuTemplate::ms_spChangeRaidLeader;
    v4 = (char *)PopupMenuTemplate::ms_spChangeRaidLeader;
    v5 = PopupMenuTemplate::ms_spChangeRaidLeader;
    v6 = PopupMenuTemplate::ms_spChangeRaidLeader;
    v7 = PopupMenuTemplate::ms_spChangeRaidLeader;
    v8 = (char *)TextData2::Get(0x54386E79u);
    v9 = PopupMenuText::CreateWin(v8, (unsigned int)v7, (unsigned int)v6, v5, v4, (unsigned int)v3, v2);
    v10 = PopupMenuTemplate::ms_spChangeRaidLeader;
    if ( (PopupMenuText *)PopupMenuTemplate::ms_spChangeRaidLeader != v9 )
    {
      if ( PopupMenuTemplate::ms_spChangeRaidLeader )
      {
        v11 = PopupMenuTemplate::ms_spChangeRaidLeader;
        if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spChangeRaidLeader->m_uiRefCount) )
        {
          if ( v11 )
            v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
        }
      }
      v10 = (PgWin *)v9;
      PopupMenuTemplate::ms_spChangeRaidLeader = (PgWin *)v9;
      if ( v9 )
      {
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
        v10 = PopupMenuTemplate::ms_spChangeRaidLeader;
      }
    }
    LODWORD(v10[1].m_kWorldBound.m_kCenter.z) = 1024;
    v1 = PopupMenuTemplate::ms_spChangeRaidLeader;
  }
  ((void (__stdcall *)(_DWORD))v1->vfptr[130].__vecDelDtor)(uiParam);
  LODWORD(PopupMenuTemplate::ms_spChangeRaidLeader[1].m_kWorldBound.m_fRadius) = uiParam;
  return PopupMenuTemplate::ms_spChangeRaidLeader;
}

//----- (00571770) --------------------------------------------------------
PgWin *__cdecl PopupMenuTemplate::GetChangeRaidLooterMenu(unsigned int uiParam)
{
  PgWin *v1; // ecx@1
  bool v2; // ST18_1@2
  PgWin *v3; // ST14_4@2
  char *v4; // ST10_4@2
  PgWin *v5; // ST0C_4@2
  PgWin *v6; // ST08_4@2
  PgWin *v7; // ST04_4@2
  char *v8; // eax@2
  PopupMenuText *v9; // esi@2
  PgWin *v10; // eax@2
  PgWin *v11; // edi@4

  v1 = PopupMenuTemplate::ms_spChangeRaidLooter;
  if ( !PopupMenuTemplate::ms_spChangeRaidLooter )
  {
    v2 = (char)PopupMenuTemplate::ms_spChangeRaidLooter;
    v3 = PopupMenuTemplate::ms_spChangeRaidLooter;
    v4 = (char *)PopupMenuTemplate::ms_spChangeRaidLooter;
    v5 = PopupMenuTemplate::ms_spChangeRaidLooter;
    v6 = PopupMenuTemplate::ms_spChangeRaidLooter;
    v7 = PopupMenuTemplate::ms_spChangeRaidLooter;
    v8 = (char *)TextData2::Get(0x64462634u);
    v9 = PopupMenuText::CreateWin(v8, (unsigned int)v7, (unsigned int)v6, v5, v4, (unsigned int)v3, v2);
    v10 = PopupMenuTemplate::ms_spChangeRaidLooter;
    if ( (PopupMenuText *)PopupMenuTemplate::ms_spChangeRaidLooter != v9 )
    {
      if ( PopupMenuTemplate::ms_spChangeRaidLooter )
      {
        v11 = PopupMenuTemplate::ms_spChangeRaidLooter;
        if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spChangeRaidLooter->m_uiRefCount) )
        {
          if ( v11 )
            v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
        }
      }
      v10 = (PgWin *)v9;
      PopupMenuTemplate::ms_spChangeRaidLooter = (PgWin *)v9;
      if ( v9 )
      {
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
        v10 = PopupMenuTemplate::ms_spChangeRaidLooter;
      }
    }
    LODWORD(v10[1].m_kWorldBound.m_kCenter.z) = 1025;
    v1 = PopupMenuTemplate::ms_spChangeRaidLooter;
  }
  ((void (__stdcall *)(_DWORD))v1->vfptr[130].__vecDelDtor)(uiParam);
  LODWORD(PopupMenuTemplate::ms_spChangeRaidLooter[1].m_kWorldBound.m_fRadius) = uiParam;
  return PopupMenuTemplate::ms_spChangeRaidLooter;
}

//----- (00571820) --------------------------------------------------------
PgWin *__cdecl PopupMenuTemplate::GetUpRaidSubLeaderMenu(unsigned int uiParam)
{
  PgWin *v1; // ecx@1
  bool v2; // ST18_1@2
  PgWin *v3; // ST14_4@2
  char *v4; // ST10_4@2
  PgWin *v5; // ST0C_4@2
  PgWin *v6; // ST08_4@2
  PgWin *v7; // ST04_4@2
  char *v8; // eax@2
  PopupMenuText *v9; // esi@2
  PgWin *v10; // eax@2
  PgWin *v11; // edi@4

  v1 = PopupMenuTemplate::ms_spRaidSubLeaderUp;
  if ( !PopupMenuTemplate::ms_spRaidSubLeaderUp )
  {
    v2 = (char)PopupMenuTemplate::ms_spRaidSubLeaderUp;
    v3 = PopupMenuTemplate::ms_spRaidSubLeaderUp;
    v4 = (char *)PopupMenuTemplate::ms_spRaidSubLeaderUp;
    v5 = PopupMenuTemplate::ms_spRaidSubLeaderUp;
    v6 = PopupMenuTemplate::ms_spRaidSubLeaderUp;
    v7 = PopupMenuTemplate::ms_spRaidSubLeaderUp;
    v8 = (char *)TextData2::Get(0xA17D6DD2);
    v9 = PopupMenuText::CreateWin(v8, (unsigned int)v7, (unsigned int)v6, v5, v4, (unsigned int)v3, v2);
    v10 = PopupMenuTemplate::ms_spRaidSubLeaderUp;
    if ( (PopupMenuText *)PopupMenuTemplate::ms_spRaidSubLeaderUp != v9 )
    {
      if ( PopupMenuTemplate::ms_spRaidSubLeaderUp )
      {
        v11 = PopupMenuTemplate::ms_spRaidSubLeaderUp;
        if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spRaidSubLeaderUp->m_uiRefCount) )
        {
          if ( v11 )
            v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
        }
      }
      v10 = (PgWin *)v9;
      PopupMenuTemplate::ms_spRaidSubLeaderUp = (PgWin *)v9;
      if ( v9 )
      {
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
        v10 = PopupMenuTemplate::ms_spRaidSubLeaderUp;
      }
    }
    LODWORD(v10[1].m_kWorldBound.m_kCenter.z) = 1026;
    v1 = PopupMenuTemplate::ms_spRaidSubLeaderUp;
  }
  ((void (__stdcall *)(_DWORD))v1->vfptr[130].__vecDelDtor)(uiParam);
  LODWORD(PopupMenuTemplate::ms_spRaidSubLeaderUp[1].m_kWorldBound.m_fRadius) = uiParam;
  return PopupMenuTemplate::ms_spRaidSubLeaderUp;
}

//----- (005718D0) --------------------------------------------------------
PgWin *__cdecl PopupMenuTemplate::GetDownRaidSubLeaderMenu(unsigned int uiParam)
{
  PgWin *v1; // ecx@1
  bool v2; // ST18_1@2
  PgWin *v3; // ST14_4@2
  char *v4; // ST10_4@2
  PgWin *v5; // ST0C_4@2
  PgWin *v6; // ST08_4@2
  PgWin *v7; // ST04_4@2
  char *v8; // eax@2
  PopupMenuText *v9; // esi@2
  PgWin *v10; // eax@2
  PgWin *v11; // edi@4

  v1 = PopupMenuTemplate::ms_spRaidSubLeaderDown;
  if ( !PopupMenuTemplate::ms_spRaidSubLeaderDown )
  {
    v2 = (char)PopupMenuTemplate::ms_spRaidSubLeaderDown;
    v3 = PopupMenuTemplate::ms_spRaidSubLeaderDown;
    v4 = (char *)PopupMenuTemplate::ms_spRaidSubLeaderDown;
    v5 = PopupMenuTemplate::ms_spRaidSubLeaderDown;
    v6 = PopupMenuTemplate::ms_spRaidSubLeaderDown;
    v7 = PopupMenuTemplate::ms_spRaidSubLeaderDown;
    v8 = (char *)TextData2::Get(0x32F1B1Au);
    v9 = PopupMenuText::CreateWin(v8, (unsigned int)v7, (unsigned int)v6, v5, v4, (unsigned int)v3, v2);
    v10 = PopupMenuTemplate::ms_spRaidSubLeaderDown;
    if ( (PopupMenuText *)PopupMenuTemplate::ms_spRaidSubLeaderDown != v9 )
    {
      if ( PopupMenuTemplate::ms_spRaidSubLeaderDown )
      {
        v11 = PopupMenuTemplate::ms_spRaidSubLeaderDown;
        if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spRaidSubLeaderDown->m_uiRefCount) )
        {
          if ( v11 )
            v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
        }
      }
      v10 = (PgWin *)v9;
      PopupMenuTemplate::ms_spRaidSubLeaderDown = (PgWin *)v9;
      if ( v9 )
      {
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
        v10 = PopupMenuTemplate::ms_spRaidSubLeaderDown;
      }
    }
    LODWORD(v10[1].m_kWorldBound.m_kCenter.z) = 1027;
    v1 = PopupMenuTemplate::ms_spRaidSubLeaderDown;
  }
  ((void (__stdcall *)(_DWORD))v1->vfptr[130].__vecDelDtor)(uiParam);
  LODWORD(PopupMenuTemplate::ms_spRaidSubLeaderDown[1].m_kWorldBound.m_fRadius) = uiParam;
  return PopupMenuTemplate::ms_spRaidSubLeaderDown;
}

//----- (00571980) --------------------------------------------------------
PopupMenu *__cdecl PopupMenuTemplate::GetPartyLootSetupMenu()
{
  PopupMenu *result; // eax@1
  bool v1; // ST18_1@2
  PgWin *v2; // ST14_4@2
  char *v3; // ST10_4@2
  PgWin *v4; // ST0C_4@2
  PgWin *v5; // ST08_4@2
  char *v6; // eax@2
  PopupMenuText *v7; // esi@2
  PgWin *v8; // eax@2
  PgWin *v9; // edi@4

  result = (PopupMenu *)PopupMenuTemplate::ms_spPartyLootSetupMenu;
  if ( !PopupMenuTemplate::ms_spPartyLootSetupMenu )
  {
    v1 = (char)PopupMenuTemplate::ms_spPartyLootSetupMenu;
    v2 = PopupMenuTemplate::ms_spPartyLootSetupMenu;
    v3 = (char *)PopupMenuTemplate::ms_spPartyLootSetupMenu;
    v4 = PopupMenuTemplate::ms_spPartyLootSetupMenu;
    v5 = PopupMenuTemplate::ms_spPartyLootSetupMenu;
    v6 = (char *)TextData2::Get(0x104B1C2Fu);
    v7 = PopupMenuText::CreateWin(v6, 0x7Eu, (unsigned int)v5, v4, v3, (unsigned int)v2, v1);
    v8 = PopupMenuTemplate::ms_spPartyLootSetupMenu;
    if ( (PopupMenuText *)PopupMenuTemplate::ms_spPartyLootSetupMenu != v7 )
    {
      if ( PopupMenuTemplate::ms_spPartyLootSetupMenu )
      {
        v9 = PopupMenuTemplate::ms_spPartyLootSetupMenu;
        if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spPartyLootSetupMenu->m_uiRefCount) )
        {
          if ( v9 )
            v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
        }
      }
      v8 = (PgWin *)v7;
      PopupMenuTemplate::ms_spPartyLootSetupMenu = (PgWin *)v7;
      if ( v7 )
      {
        InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
        v8 = PopupMenuTemplate::ms_spPartyLootSetupMenu;
      }
    }
    LODWORD(v8[1].m_kWorldBound.m_kCenter.z) = 1031;
    result = (PopupMenu *)PopupMenuTemplate::ms_spPartyLootSetupMenu;
  }
  return result;
}

//----- (00571A10) --------------------------------------------------------
PgWin *__cdecl PopupMenuTemplate::GetCollectOpenMenu(unsigned int uiParam)
{
  PgWin *v1; // ecx@1
  bool v2; // ST18_1@2
  PgWin *v3; // ST14_4@2
  char *v4; // ST10_4@2
  PgWin *v5; // ST0C_4@2
  PgWin *v6; // ST08_4@2
  PgWin *v7; // ST04_4@2
  char *v8; // eax@2
  PopupMenuText *v9; // esi@2
  PgWin *v10; // eax@2
  PgWin *v11; // edi@4

  v1 = PopupMenuTemplate::ms_spCollectOpen;
  if ( !PopupMenuTemplate::ms_spCollectOpen )
  {
    v2 = (char)PopupMenuTemplate::ms_spCollectOpen;
    v3 = PopupMenuTemplate::ms_spCollectOpen;
    v4 = (char *)PopupMenuTemplate::ms_spCollectOpen;
    v5 = PopupMenuTemplate::ms_spCollectOpen;
    v6 = PopupMenuTemplate::ms_spCollectOpen;
    v7 = PopupMenuTemplate::ms_spCollectOpen;
    v8 = (char *)TextData2::Get(0xED457D64);
    v9 = PopupMenuText::CreateWin(v8, (unsigned int)v7, (unsigned int)v6, v5, v4, (unsigned int)v3, v2);
    v10 = PopupMenuTemplate::ms_spCollectOpen;
    if ( (PopupMenuText *)PopupMenuTemplate::ms_spCollectOpen != v9 )
    {
      if ( PopupMenuTemplate::ms_spCollectOpen )
      {
        v11 = PopupMenuTemplate::ms_spCollectOpen;
        if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spCollectOpen->m_uiRefCount) )
        {
          if ( v11 )
            v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
        }
      }
      v10 = (PgWin *)v9;
      PopupMenuTemplate::ms_spCollectOpen = (PgWin *)v9;
      if ( v9 )
      {
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
        v10 = PopupMenuTemplate::ms_spCollectOpen;
      }
    }
    LODWORD(v10[1].m_kWorldBound.m_kCenter.z) = 1034;
    v1 = PopupMenuTemplate::ms_spCollectOpen;
  }
  ((void (__stdcall *)(_DWORD))v1->vfptr[130].__vecDelDtor)(uiParam);
  LODWORD(PopupMenuTemplate::ms_spCollectOpen[1].m_kWorldBound.m_fRadius) = uiParam;
  return PopupMenuTemplate::ms_spCollectOpen;
}

//----- (00571AC0) --------------------------------------------------------
PgWin *__cdecl PopupMenuTemplate::GetInviteFriendMenu(unsigned int uiParam)
{
  PgWin *v1; // ecx@1
  bool v2; // ST18_1@2
  PgWin *v3; // ST14_4@2
  char *v4; // ST10_4@2
  PgWin *v5; // ST0C_4@2
  PgWin *v6; // ST08_4@2
  PgWin *v7; // ST04_4@2
  char *v8; // eax@2
  PopupMenuText *v9; // esi@2
  PgWin *v10; // eax@2
  PgWin *v11; // edi@4

  v1 = PopupMenuTemplate::ms_spInviteFriend;
  if ( !PopupMenuTemplate::ms_spInviteFriend )
  {
    v2 = (char)PopupMenuTemplate::ms_spInviteFriend;
    v3 = PopupMenuTemplate::ms_spInviteFriend;
    v4 = (char *)PopupMenuTemplate::ms_spInviteFriend;
    v5 = PopupMenuTemplate::ms_spInviteFriend;
    v6 = PopupMenuTemplate::ms_spInviteFriend;
    v7 = PopupMenuTemplate::ms_spInviteFriend;
    v8 = (char *)TextData::Get(0x1B50368Cu);
    v9 = PopupMenuText::CreateWin(v8, (unsigned int)v7, (unsigned int)v6, v5, v4, (unsigned int)v3, v2);
    v10 = PopupMenuTemplate::ms_spInviteFriend;
    if ( (PopupMenuText *)PopupMenuTemplate::ms_spInviteFriend != v9 )
    {
      if ( PopupMenuTemplate::ms_spInviteFriend )
      {
        v11 = PopupMenuTemplate::ms_spInviteFriend;
        if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spInviteFriend->m_uiRefCount) )
        {
          if ( v11 )
            v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
        }
      }
      v10 = (PgWin *)v9;
      PopupMenuTemplate::ms_spInviteFriend = (PgWin *)v9;
      if ( v9 )
      {
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
        v10 = PopupMenuTemplate::ms_spInviteFriend;
      }
    }
    LODWORD(v10[1].m_kWorldBound.m_kCenter.z) = 1035;
    v1 = PopupMenuTemplate::ms_spInviteFriend;
  }
  ((void (__stdcall *)(_DWORD))v1->vfptr[130].__vecDelDtor)(uiParam);
  LODWORD(PopupMenuTemplate::ms_spInviteFriend[1].m_kWorldBound.m_fRadius) = uiParam;
  return PopupMenuTemplate::ms_spInviteFriend;
}

//----- (00571B70) --------------------------------------------------------
PgWin *__cdecl PopupMenuTemplate::GetRideOnMenu(unsigned int uiParam)
{
  PgWin *v1; // ecx@1
  bool v2; // ST18_1@2
  PgWin *v3; // ST14_4@2
  char *v4; // ST10_4@2
  PgWin *v5; // ST0C_4@2
  PgWin *v6; // ST08_4@2
  PgWin *v7; // ST04_4@2
  char *v8; // eax@2
  PopupMenuText *v9; // esi@2
  PgWin *v10; // eax@2
  PgWin *v11; // edi@4

  v1 = PopupMenuTemplate::ms_spRideOn;
  if ( !PopupMenuTemplate::ms_spRideOn )
  {
    v2 = (char)PopupMenuTemplate::ms_spRideOn;
    v3 = PopupMenuTemplate::ms_spRideOn;
    v4 = (char *)PopupMenuTemplate::ms_spRideOn;
    v5 = PopupMenuTemplate::ms_spRideOn;
    v6 = PopupMenuTemplate::ms_spRideOn;
    v7 = PopupMenuTemplate::ms_spRideOn;
    v8 = (char *)TextData2::Get(0x2240866Bu);
    v9 = PopupMenuText::CreateWin(v8, (unsigned int)v7, (unsigned int)v6, v5, v4, (unsigned int)v3, v2);
    v10 = PopupMenuTemplate::ms_spRideOn;
    if ( (PopupMenuText *)PopupMenuTemplate::ms_spRideOn != v9 )
    {
      if ( PopupMenuTemplate::ms_spRideOn )
      {
        v11 = PopupMenuTemplate::ms_spRideOn;
        if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spRideOn->m_uiRefCount) )
        {
          if ( v11 )
            v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
        }
      }
      v10 = (PgWin *)v9;
      PopupMenuTemplate::ms_spRideOn = (PgWin *)v9;
      if ( v9 )
      {
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
        v10 = PopupMenuTemplate::ms_spRideOn;
      }
    }
    LODWORD(v10[1].m_kWorldBound.m_kCenter.z) = 1036;
    v1 = PopupMenuTemplate::ms_spRideOn;
  }
  ((void (__stdcall *)(_DWORD))v1->vfptr[130].__vecDelDtor)(uiParam);
  LODWORD(PopupMenuTemplate::ms_spRideOn[1].m_kWorldBound.m_fRadius) = uiParam;
  return PopupMenuTemplate::ms_spRideOn;
}

//----- (00571C20) --------------------------------------------------------
PgWin *__cdecl PopupMenuTemplate::GetVoteMenu(unsigned int uiParam)
{
  PgWin *v1; // ecx@1
  bool v2; // ST18_1@2
  PgWin *v3; // ST14_4@2
  char *v4; // ST10_4@2
  PgWin *v5; // ST0C_4@2
  PgWin *v6; // ST08_4@2
  PgWin *v7; // ST04_4@2
  char *v8; // eax@2
  PopupMenuText *v9; // esi@2
  PgWin *v10; // eax@2
  PgWin *v11; // edi@4

  v1 = PopupMenuTemplate::ms_spVote;
  if ( !PopupMenuTemplate::ms_spVote )
  {
    v2 = (char)PopupMenuTemplate::ms_spVote;
    v3 = PopupMenuTemplate::ms_spVote;
    v4 = (char *)PopupMenuTemplate::ms_spVote;
    v5 = PopupMenuTemplate::ms_spVote;
    v6 = PopupMenuTemplate::ms_spVote;
    v7 = PopupMenuTemplate::ms_spVote;
    v8 = (char *)TextData2::Get(0x93958BA1);
    v9 = PopupMenuText::CreateWin(v8, (unsigned int)v7, (unsigned int)v6, v5, v4, (unsigned int)v3, v2);
    v10 = PopupMenuTemplate::ms_spVote;
    if ( (PopupMenuText *)PopupMenuTemplate::ms_spVote != v9 )
    {
      if ( PopupMenuTemplate::ms_spVote )
      {
        v11 = PopupMenuTemplate::ms_spVote;
        if ( !InterlockedDecrement((volatile LONG *)&PopupMenuTemplate::ms_spVote->m_uiRefCount) )
        {
          if ( v11 )
            v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
        }
      }
      v10 = (PgWin *)v9;
      PopupMenuTemplate::ms_spVote = (PgWin *)v9;
      if ( v9 )
      {
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
        v10 = PopupMenuTemplate::ms_spVote;
      }
    }
    LODWORD(v10[1].m_kWorldBound.m_kCenter.z) = 1037;
    v1 = PopupMenuTemplate::ms_spVote;
  }
  ((void (__stdcall *)(_DWORD))v1->vfptr[130].__vecDelDtor)(uiParam);
  LODWORD(PopupMenuTemplate::ms_spVote[1].m_kWorldBound.m_fRadius) = uiParam;
  return PopupMenuTemplate::ms_spVote;
}

//----- (00571CD0) --------------------------------------------------------
PopupMenu *__cdecl PopupMenuTemplate::GetmhUI_ObjName(char *pObjName)
{
  char *v1; // eax@1
  unsigned int v2; // eax@3
  void *v3; // ecx@3
  char *v4; // eax@7
  PopupMenuText *v5; // esi@9
  int v6; // eax@9
  void (__thiscall ***v7)(_DWORD, _DWORD); // edi@11
  int v8; // esi@16
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > ObjNameMenu; // [sp+Ch] [bp-2Ch]@1
  int v11; // [sp+34h] [bp-4h]@1

  ObjNameMenu._Myres = 15;
  ObjNameMenu._Mysize = 0;
  ObjNameMenu._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&ObjNameMenu, "<", 1u);
  v11 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&ObjNameMenu, pObjName, strlen(pObjName));
  v1 = ObjNameMenu._Bx._Ptr;
  if ( ObjNameMenu._Myres < 0x10 )
    v1 = (char *)&ObjNameMenu;
  v2 = (unsigned int)&v1[ObjNameMenu._Mysize];
  v3 = ObjNameMenu._Bx._Ptr;
  if ( ObjNameMenu._Myres < 0x10 )
    v3 = &ObjNameMenu;
  if ( v2 )
    v2 -= (unsigned int)v3;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::insert(&ObjNameMenu, v2, 1u, 62);
  v4 = ObjNameMenu._Bx._Ptr;
  if ( ObjNameMenu._Myres < 0x10 )
    v4 = (char *)&ObjNameMenu;
  v5 = PopupMenuText::CreateWin(v4, 0, 0, 0, 0, 0, 0);
  v6 = PopupMenuTemplate::ms_spObjName;
  if ( (PopupMenuText *)PopupMenuTemplate::ms_spObjName != v5 )
  {
    if ( PopupMenuTemplate::ms_spObjName )
    {
      v7 = (void (__thiscall ***)(_DWORD, _DWORD))PopupMenuTemplate::ms_spObjName;
      if ( !InterlockedDecrement((volatile LONG *)(PopupMenuTemplate::ms_spObjName + 4)) )
      {
        if ( v7 )
          (**v7)(v7, 1);
      }
    }
    v6 = (int)v5;
    PopupMenuTemplate::ms_spObjName = (int)v5;
    if ( v5 )
    {
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
      v6 = PopupMenuTemplate::ms_spObjName;
    }
  }
  v8 = v6;
  if ( ObjNameMenu._Myres >= 0x10 )
    operator delete(ObjNameMenu._Bx._Ptr);
  return (PopupMenu *)v8;
}
// A8D434: using guessed type int PopupMenuTemplate::ms_spObjName;

//----- (00571E10) --------------------------------------------------------
void __thiscall PopupMenuSubMenu::SetPopupMenu(PopupMenuSubMenu *this, PopupMenuWin *pkPopupMenuWin)
{
  PopupMenuSubMenu *v2; // ebx@1
  PopupMenuWin *v3; // esi@1

  v2 = this;
  v3 = this->m_spSubMenu.m_pObject;
  if ( v3 != pkPopupMenuWin )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spSubMenu.m_pObject = pkPopupMenuWin;
    if ( pkPopupMenuWin )
      InterlockedIncrement((volatile LONG *)&pkPopupMenuWin->m_uiRefCount);
  }
}

//----- (00571E60) --------------------------------------------------------
void __thiscall PopupMenu::PopupMenu(PopupMenu *this)
{
  PopupMenu *v1; // esi@1

  v1 = this;
  PgWinBut::PgWinBut((PgWinBut *)&this->vfptr);
  v1->m_kClickEvent.iMsg = 0;
  v1->m_kClickEvent.pvMsgBody = 0;
  v1->m_ePopupMenuID = 0;
  v1->m_uiExtraData = 0;
  v1->vfptr = (NiRefObjectVtbl *)&PopupMenu::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&PopupMenu::`vftable'{for `IDirectMessenger'};
}
// 99C1B0: using guessed type void (__thiscall *PopupMenu::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99C1CC: using guessed type int (__thiscall *PopupMenu::`vftable'{for `NiNode'})(void *p, char);

//----- (00571EA0) --------------------------------------------------------
void __thiscall PopupMenu::~PopupMenu(PopupMenu *this)
{
  PopupMenu *v1; // esi@1
  void *v2; // ST00_4@1

  v1 = this;
  v2 = this->m_kClickEvent.pvMsgBody;
  this->vfptr = (NiRefObjectVtbl *)&PopupMenu::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PopupMenu::`vftable'{for `IDirectMessenger'};
  operator delete(v2);
  PgWinBut::~PgWinBut((PgWinBut *)&v1->vfptr);
}
// 99C1B0: using guessed type void (__thiscall *PopupMenu::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99C1CC: using guessed type int (__thiscall *PopupMenu::`vftable'{for `NiNode'})(void *p, char);

//----- (00571ED0) --------------------------------------------------------
void __thiscall PopupMenu::SetClickEvent(PopupMenu *this, int iMsg, void *pvMsgBody)
{
  PopupMenu *v3; // esi@1

  v3 = this;
  operator delete(this->m_kClickEvent.pvMsgBody);
  v3->m_kClickEvent.iMsg = iMsg;
  v3->m_kClickEvent.pvMsgBody = pvMsgBody;
}

//----- (00571F00) --------------------------------------------------------
void __thiscall PopupMenuText::Resize(PopupMenuText *this, unsigned int dwWidth, unsigned int dwHeight)
{
  PopupMenuText *v3; // esi@1

  v3 = this;
  ((void (__stdcall *)(_DWORD))this->vfptr[117].__vecDelDtor)(dwWidth);
  v3->vfptr[118].__vecDelDtor((NiRefObject *)v3, dwHeight);
  ((void (__thiscall *)(_DWORD))v3->vfptr[119].__vecDelDtor)(v3);
  ((void (__thiscall *)(_DWORD))v3->vfptr[120].__vecDelDtor)(v3);
}

//----- (00571F50) --------------------------------------------------------
void __thiscall PopupMenuText::GetExtent(PopupMenuText *this, unsigned int *rdwWidth, unsigned int *rdwHeight)
{
  PopupMenuText *v3; // esi@1

  v3 = this;
  *rdwWidth = ((int (*)(void))this->vfptr[36].__vecDelDtor)();
  *rdwHeight = ((int (__thiscall *)(_DWORD))v3->vfptr[37].__vecDelDtor)(v3);
}

//----- (00571F80) --------------------------------------------------------
void __thiscall PopupMenuText::OnChangeButShow(PopupMenuText *this, PgWinBut::ButShow eShow)
{
  if ( eShow )
  {
    if ( eShow == 1 )
    {
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))this->m_pkText->vfptr[116].__vecDelDtor)(0, 255, 204, 255);
    }
    else if ( eShow == 2 )
    {
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))this->m_pkText->vfptr[116].__vecDelDtor)(54, 255, 0, 255);
    }
  }
  else
  {
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))this->m_pkText->vfptr[116].__vecDelDtor)(255, 255, 255, 255);
  }
}

//----- (00572000) --------------------------------------------------------
void __thiscall PopupMenuTextCheck::Resize(PopupMenuTextCheck *this, unsigned int dwWidth, unsigned int dwHeight)
{
  PopupMenuTextCheck *v3; // esi@1

  v3 = this;
  ((void (__stdcall *)(_DWORD))this->vfptr[117].__vecDelDtor)(dwWidth);
  v3->vfptr[118].__vecDelDtor((NiRefObject *)v3, dwHeight);
  ((void (__thiscall *)(_DWORD))v3->vfptr[119].__vecDelDtor)(v3);
  ((void (__thiscall *)(_DWORD))v3->vfptr[120].__vecDelDtor)(v3);
}

//----- (00572050) --------------------------------------------------------
void __thiscall PopupMenuTextCheck::GetExtent(PopupMenuTextCheck *this, unsigned int *rdwWidth, unsigned int *rdwHeight)
{
  PopupMenuTextCheck *v3; // esi@1

  v3 = this;
  *rdwWidth = ((int (*)(void))this->vfptr[36].__vecDelDtor)();
  *rdwHeight = ((int (__thiscall *)(_DWORD))v3->vfptr[37].__vecDelDtor)(v3);
}

//----- (00572080) --------------------------------------------------------
void __thiscall PopupMenuTextCheck::OnCommand(PopupMenuTextCheck *this, unsigned int wParam, int lParam)
{
  if ( wParam == 100 )
    ((void (*)(void))this->vfptr[132].__vecDelDtor)();
}

//----- (005720A0) --------------------------------------------------------
char __thiscall PopupMenuWin::Create(PopupMenuWin *this, NiSourceTexture *pkTexture, unsigned int uiEdgeWidth, unsigned int uiEdgeHeight, PgFrameWork *pkFrameWork)
{
  PopupMenuWin *v5; // esi@1
  char result; // al@1

  v5 = this;
  result = FrameBoxWin::Create((FrameBoxWin *)&this->vfptr, pkTexture, uiEdgeWidth, uiEdgeHeight, 0, 0, 0, pkFrameWork);
  if ( result )
  {
    ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v5->vfptr[135].__vecDelDtor)(
      v5,
      2 * v5->m_uiEdgeWidth + 128,
      2 * v5->m_uiEdgeHeight + 12);
    result = 1;
  }
  return result;
}

//----- (00572100) --------------------------------------------------------
void __thiscall PopupMenuWin::OnCommand(PopupMenuWin *this, unsigned int wParam, int lParam)
{
  if ( this->m_pkFrameWork )
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))this->m_pkFrameWork->vfptr[2].SetMessageNum)(wParam, lParam, 0);
}

//----- (00572130) --------------------------------------------------------
void __thiscall PopupMenuWin::SetReceiver(PopupMenuWin *this, PgWin *pkReceiver)
{
  this->m_pkReceiver = pkReceiver;
}

//----- (00572140) --------------------------------------------------------
char __thiscall PopupMenuText::Create(PopupMenuText *this, unsigned int uiWidth, unsigned int uiHeight, char *pcText, PgWin *pkParent, unsigned int uiCmdMsg, char *pcName, unsigned int uiExtStyle, bool bBold)
{
  PopupMenuText *v9; // edi@1
  PgFont *v10; // eax@1
  PgWinText *v11; // eax@1
  PgWinText *v12; // esi@1
  char result; // al@2
  char bRet_3; // [sp+2Fh] [bp+23h]@1

  v9 = this;
  bRet_3 = PgWinBut::Create((PgWinBut *)&this->vfptr, 5, 5, uiWidth, uiHeight, pkParent, uiCmdMsg, pcName, uiExtStyle);
  v10 = Font::Get((Font::Type)(bBold != 0));
  v11 = PgWinText::CreateWin(5, 5, uiWidth, uiHeight, v10, (PgWin *)&v9->vfptr, 0, 0);
  v12 = v11;
  if ( v11 )
  {
    v11->vfptr[122].__vecDelDtor((NiRefObject *)v11, 5u);
    v12->vfptr[117].__vecDelDtor((NiRefObject *)v12, (unsigned int)&Color::m_kDxWhiteColor);
    v12->vfptr[118].__vecDelDtor((NiRefObject *)v12, (unsigned int)pcText);
    v12->vfptr[60].__vecDelDtor((NiRefObject *)v12, 0);
    result = bRet_3;
    v9->m_pkText = v12;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00572200) --------------------------------------------------------
void __thiscall PopupMenuTextCheck::DirectMessage(PopupMenuTextCheck *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  if ( iMsgTag == 16 && LODWORD(this->m_kLocal.m_fScale) == *(_DWORD *)pvBody )
    *(_BYTE *)(LODWORD(this->m_kWorld.m_Rotate.m_pEntry[0][1]) + 380) = *((_BYTE *)pvBody + 4);
}

//----- (00572230) --------------------------------------------------------
char __thiscall PopupMenuWin::IsMenuIDShow(PopupMenuWin *this, PopupMenuID eID)
{
  PopupMenuWin *v2; // ebx@1
  signed int v3; // edi@1
  char *v4; // esi@1

  v2 = this;
  v3 = 0;
  v4 = (char *)this->m_aspMenu;
  while ( 1 )
  {
    if ( !*(_DWORD *)v4 )
      return 0;
    if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[65].__vecDelDtor)(v2) == 1
      && *(_DWORD *)(*(_DWORD *)v4 + 332) == eID )
    {
      break;
    }
    ++v3;
    v4 += 4;
    if ( v3 >= 20 )
      return 0;
  }
  return 1;
}

//----- (00572280) --------------------------------------------------------
void __thiscall PopupMenuWin::FinishMenu(PopupMenuWin *this, unsigned int uiMinimumWidth)
{
  unsigned int v2; // edi@1
  PopupMenuWin *v3; // esi@1
  char *v4; // ebx@2
  unsigned int v5; // edi@10
  int v6; // ebx@11
  unsigned int dwHeight; // [sp+Ch] [bp-14h]@4
  unsigned int dwWidth; // [sp+10h] [bp-10h]@4
  unsigned int uiCy; // [sp+14h] [bp-Ch]@1
  unsigned int uiMaxCy; // [sp+18h] [bp-8h]@1
  unsigned int uiMaxCx; // [sp+1Ch] [bp-4h]@1

  v2 = 0;
  v3 = this;
  uiMaxCx = 0;
  uiMaxCy = 0;
  uiCy = 0;
  if ( this->m_dwMenuCount )
  {
    v4 = (char *)this->m_aspMenu;
    do
    {
      if ( *(_DWORD *)v4 )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD))(**(_DWORD **)v4 + 560))(&dwWidth, &dwHeight);
        if ( dwWidth > uiMaxCx )
          uiMaxCx = dwWidth;
        if ( dwHeight > uiMaxCy )
          uiMaxCy = dwHeight;
        uiCy += dwHeight + 4;
      }
      ++v2;
      v4 += 4;
    }
    while ( v2 < v3->m_dwMenuCount );
  }
  v5 = 0;
  if ( v3->m_dwMenuCount )
  {
    v6 = (int)v3->m_aspMenu;
    do
    {
      if ( *(_DWORD *)v6 )
        (*(void (__stdcall **)(_DWORD, _DWORD))(**(_DWORD **)v6 + 564))(uiMaxCx, uiMaxCy);
      ++v5;
      v6 += 4;
    }
    while ( v5 < v3->m_dwMenuCount );
  }
  if ( uiMaxCx < uiMinimumWidth )
    uiMaxCx = uiMinimumWidth;
  if ( uiMaxCx )
    ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v3->vfptr[135].__vecDelDtor)(
      v3,
      uiMaxCx + 2 * v3->m_uiEdgeWidth + 10,
      uiCy + 2 * v3->m_uiEdgeHeight + 10);
}

//----- (00572360) --------------------------------------------------------
void __thiscall PopupMenu::DoAction(PopupMenu *this)
{
  PopupMenu *v1; // edi@1
  PgWin *v2; // eax@1
  int v3; // eax@3
  void *v4; // ebx@4
  bool v5; // zf@8
  int v6; // ecx@8
  unsigned int v7; // edx@8
  int v8; // [sp+8h] [bp-14h]@3
  DirectUserMsgBody_PopupMenuClicked kBody; // [sp+Ch] [bp-10h]@8

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiCmdMsgParam);
  v3 = v1->m_kClickEvent.iMsg;
  v8 = v3;
  if ( v3 )
  {
    v4 = v1->m_kClickEvent.pvMsgBody;
    if ( v1->m_pkMsgHooker )
    {
      ((void (__stdcall *)(int, void *, IDirectMessengerVtbl **))v1->m_pkMsgHooker->vfptr->SendDirectMessage)(
        v3,
        v4,
        &v1->vfptr);
      v3 = v8;
      if ( v1->m_pkMsgHooker )
      {
        ((void (__stdcall *)(int, void *, IDirectMessengerVtbl **))v1->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          v8,
          v4,
          &v1->vfptr);
        v3 = v8;
      }
    }
    v1->vfptr->DirectDispatchToParent((IDirectMessenger *)&v1->vfptr, v3, v4, (IDirectMessenger *)&v1->vfptr);
  }
  v5 = v1->m_pkMsgHooker == 0;
  v6 = v1->m_ePopupMenuID;
  v7 = v1->m_uiExtraData;
  kBody.bCheck = 0;
  kBody.iPopupMenuID = v6;
  kBody.uiExtraData = v7;
  if ( !v5 )
  {
    ((void (__stdcall *)(signed int, DirectUserMsgBody_PopupMenuClicked *, IDirectMessengerVtbl **))v1->m_pkMsgHooker->vfptr->SendDirectMessage)(
      15,
      &kBody,
      &v1->vfptr);
    if ( v1->m_pkMsgHooker )
      ((void (__stdcall *)(signed int, DirectUserMsgBody_PopupMenuClicked *, IDirectMessengerVtbl **))v1->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
        15,
        &kBody,
        &v1->vfptr);
  }
  v1->vfptr->DirectDispatchToParent((IDirectMessenger *)&v1->vfptr, 15, &kBody, (IDirectMessenger *)&v1->vfptr);
  PgWinMgr::ClosePopupWin(&Pgg_kWinMgr, 0);
}

//----- (00572470) --------------------------------------------------------
char __thiscall PopupMenuTextCheck::Create(PopupMenuTextCheck *this, unsigned int uiWidth, unsigned int uiHeight, char *pcText, PgWin *pkParent, unsigned int uiCmdMsg, char *pcName, unsigned int uiExtStyle)
{
  PopupMenuTextCheck *v8; // ebx@1
  PgFont *v9; // eax@1
  char result; // al@2
  NiTexturePalette *v11; // esi@3
  const char *v12; // eax@5
  PgSprData *v13; // edi@6
  NiPointer<PgSprData::PgHitTester> *v14; // ecx@6
  unsigned int v15; // esi@6
  int v16; // eax@10
  PgFont *v17; // eax@12
  PgWinText *v18; // esi@12
  ColumnBut *v19; // eax@13
  int kButtonSize_4; // [sp+14h] [bp-28h]@6
  tagSIZE kTextSize; // [sp+18h] [bp-24h]@3
  int iLeft; // [sp+20h] [bp-1Ch]@6
  int iTop; // [sp+24h] [bp-18h]@6
  NiNode *v24; // [sp+28h] [bp-14h]@7
  NiPointer<NiNode> spNode; // [sp+2Ch] [bp-10h]@3
  int v26; // [sp+38h] [bp-4h]@3
  char bRet_3; // [sp+5Fh] [bp+23h]@12

  v8 = this;
  v9 = Font::Get(0);
  if ( !v9 )
    goto LABEL_16;
  PgFont::GetTextSize(v9, pcText, strlen(pcText), &kTextSize);
  spNode.m_pObject = 0;
  v11 = pTexturePalette;
  v26 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v12 = Folder::Merge(&Folder::m_acMenu, "Game\\Option_Graphic.nif");
  PgUtil::LoadNodeNifFile(v12, &spNode, v11);
  if ( !spNode.m_pObject )
    goto LABEL_16;
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ChrOlineChNor", &iLeft, &iTop, 0);
  PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "ChrOlineChClick");
  v14 = v13->m_akHitTester.m_pBase;
  v15 = v14->m_pObject->m_uiWidth;
  kButtonSize_4 = v14->m_pObject->m_uiHeight;
  v26 = -1;
  if ( spNode.m_pObject )
  {
    v24 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v24 )
        ((void (__stdcall *)(signed int))v24->vfptr->__vecDelDtor)(1);
    }
  }
  v16 = kTextSize.cy;
  if ( kTextSize.cy <= kButtonSize_4 )
    v16 = kButtonSize_4;
  bRet_3 = PgWinBut::Create(
             (PgWinBut *)&v8->vfptr,
             5,
             5,
             v15 + kTextSize.cx,
             v16,
             pkParent,
             uiCmdMsg,
             pcName,
             uiExtStyle);
  v17 = Font::Get(0);
  v18 = PgWinText::CreateWin(v15 + 5, 5, kTextSize.cx, kTextSize.cy, v17, (PgWin *)&v8->vfptr, 0, 0);
  if ( v18 )
  {
    ((void (__thiscall *)(PgWinText *))v18->vfptr[122].__vecDelDtor)(v18);
    ((void (__thiscall *)(PgWinText *))v18->vfptr[117].__vecDelDtor)(v18);
    ((void (__thiscall *)(PgWinText *))v18->vfptr[118].__vecDelDtor)(v18);
    ((void (__thiscall *)(PgWinText *))v18->vfptr[60].__vecDelDtor)(v18);
    v19 = ColumnBut::CreateWin(5, 5, v13, (PgWin *)&v8->vfptr, 0x64u, 0);
    v8->m_pkCheckBox = v19;
    result = v19 != 0 ? bRet_3 : 0;
  }
  else
  {
LABEL_16:
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00572660) --------------------------------------------------------
void __thiscall PopupMenuTextCheck::DoAction(PopupMenuTextCheck *this)
{
  PopupMenuTextCheck *v1; // esi@1
  PgWin *v2; // eax@1
  bool v3; // al@3
  int v4; // ecx@3
  unsigned int v5; // edx@3
  int v6; // esi@3
  bool v7; // zf@3
  DirectUserMsgBody_PopupMenuClicked kBody; // [sp+4h] [bp-10h]@3

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiCmdMsgParam);
  v1->m_pkCheckBox->m_bCheck = v1->m_pkCheckBox->m_bCheck == 0;
  v3 = v1->m_pkCheckBox->m_bCheck;
  v4 = v1->m_ePopupMenuID;
  v5 = v1->m_uiExtraData;
  v6 = (int)&v1->vfptr;
  v7 = *(_DWORD *)(v6 + 4) == 0;
  kBody.bCheck = v3;
  kBody.iPopupMenuID = v4;
  kBody.uiExtraData = v5;
  if ( !v7 )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v6 + 4) + 4))(15, &kBody, v6);
    if ( *(_DWORD *)(v6 + 4) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v6 + 4) + 20))(15, &kBody, v6);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v6 + 20))(v6, 15, &kBody, v6);
}

//----- (00572720) --------------------------------------------------------
void __thiscall PopupMenuSubMenu::DoAction(PopupMenuSubMenu *this)
{
  PopupMenuSubMenu *v1; // esi@1
  PgWin *v2; // eax@1
  bool v3; // zf@3
  int v4; // eax@3
  PgWin *v5; // edi@7
  int v6; // ebx@8
  int v7; // ebx@8
  void *(__thiscall *v8)(NiRefObject *, unsigned int); // eax@8
  PgWin *v9; // ST04_4@8
  PgWin *v10; // eax@8
  int y; // [sp+8h] [bp-18h]@8
  int x; // [sp+Ch] [bp-14h]@8
  DirectUserMsgBody_PopupMenuClicked kBody; // [sp+10h] [bp-10h]@3

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiCmdMsgParam);
  v3 = v1->m_pkMsgHooker == 0;
  v4 = v1->m_ePopupMenuID;
  kBody.bCheck = 0;
  kBody.iPopupMenuID = v4;
  if ( !v3 )
  {
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->SendDirectMessage)(15, &kBody, &v1->vfptr);
    if ( v1->m_pkMsgHooker )
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
        15,
        &kBody,
        &v1->vfptr);
  }
  v1->vfptr->DirectDispatchToParent((IDirectMessenger *)&v1->vfptr, 15, &kBody, (IDirectMessenger *)&v1->vfptr);
  if ( v1->m_spSubMenu.m_pObject )
  {
    v5 = PgWin::GetParentWin((PgWin *)&v1->vfptr);
    if ( v5 )
    {
      v6 = ((int (__thiscall *)(_DWORD))v5->vfptr[36].__vecDelDtor)(v5);
      v7 = v6 - ((int (__thiscall *)(_DWORD))v1->vfptr[41].__vecDelDtor)(v1);
      v8 = v1->vfptr[55].__vecDelDtor;
      x = v7;
      y = 0;
      ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v8)(v1, &x, &y);
      ((void (__stdcall *)(_DWORD, _DWORD))v1->m_spSubMenu.m_pObject->vfptr[77].__vecDelDtor)(x, y);
      ((void (__stdcall *)(_DWORD))v1->m_spSubMenu.m_pObject->vfptr[129].__vecDelDtor)(v5[1].m_pcName);
      v9 = (PgWin *)&v1->m_spSubMenu.m_pObject->vfptr;
      v10 = PgWin::GetParentWin((PgWin *)&v1->vfptr);
      PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, v10, v9);
    }
  }
}

//----- (00572860) --------------------------------------------------------
void __thiscall PopupMenuWin::~PopupMenuWin(PopupMenuWin *this)
{
  PopupMenuWin *v1; // ebx@1
  char *v2; // edi@1
  int v3; // esi@2
  signed int v4; // [sp+14h] [bp-10h]@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&PopupMenuWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PopupMenuWin::`vftable'{for `IDirectMessenger'};
  v2 = (char *)this->m_aspMenu;
  v4 = 20;
  do
  {
    v3 = *(_DWORD *)v2;
    if ( *(_DWORD *)v2 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v3 + 4)) && v3 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v3)(v3, 1);
      *(_DWORD *)v2 = 0;
    }
    v2 += 4;
    --v4;
  }
  while ( v4 );
  `eh vector destructor iterator'(
    v1->m_aspMenu,
    4u,
    20,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  FrameBoxWin::~FrameBoxWin((FrameBoxWin *)&v1->vfptr);
}
// 99C8C4: using guessed type void (__thiscall *PopupMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99C8E4: using guessed type int (__thiscall *PopupMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00572920) --------------------------------------------------------
void __thiscall PopupMenuWin::Clear(PopupMenuWin *this)
{
  PopupMenuWin *v1; // ebx@1
  PgWin **v2; // edi@2
  PgWin *v3; // esi@4
  PgWin *v4; // esi@7
  NiPointer<PgWin> result; // [sp+4h] [bp-8h]@3
  unsigned int i; // [sp+8h] [bp-4h]@1

  v1 = this;
  i = 0;
  if ( this->m_dwMenuCount )
  {
    v2 = (PgWin **)this->m_aspMenu;
    do
    {
      PgWin::DetachChildWin((PgWin *)&v1->vfptr, &result, *v2);
      if ( result.m_pObject )
      {
        v3 = result.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
        {
          if ( v3 )
            v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
        }
      }
      v4 = *v2;
      if ( *v2 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
        {
          if ( v4 )
            v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
        }
        *v2 = 0;
      }
      ++v2;
      ++i;
    }
    while ( i < v1->m_dwMenuCount );
    v1->m_dwMenuCount = 0;
  }
  else
  {
    this->m_dwMenuCount = 0;
  }
}

//----- (005729D0) --------------------------------------------------------
char __userpurge PopupMenuWin::AddMenu@<al>(PopupMenuWin *this@<ecx>, int a2@<edi>, PopupMenu *pkMenu)
{
  PopupMenuWin *v3; // esi@1
  PopupMenu *v4; // edi@2
  unsigned int v5; // eax@2
  int v6; // ebx@3
  int v7; // ST04_4@3
  unsigned int v8; // ecx@5
  PopupMenu *v9; // ebx@5
  char result; // al@11
  int v11; // [sp-8h] [bp-Ch]@2
  PopupMenu *pkMenua; // [sp+Ch] [bp+8h]@5

  v3 = this;
  if ( this->m_dwMenuCount >= 0x14 )
  {
    result = 0;
  }
  else
  {
    v11 = a2;
    v4 = pkMenu;
    PgWin::AttachChildWin((PgWin *)&this->vfptr, (PgWin *)&pkMenu->vfptr);
    v5 = v3->m_dwMenuCount;
    if ( v5 )
    {
      v6 = (*(int (__stdcall **)(int))(**((_DWORD **)&v3->m_dwMenuCount + v5) + 168))(v11);
      v7 = v6 + (*(int (**)(void))(**((_DWORD **)&v3->m_dwMenuCount + v3->m_dwMenuCount) + 148))() + 4;
    }
    else
    {
      ((void (__thiscall *)(PopupMenu *, signed int, int))pkMenu->vfptr[43].__vecDelDtor)(pkMenu, 5, v11);
    }
    ((void (__thiscall *)(PopupMenu *))pkMenu->vfptr[44].__vecDelDtor)(pkMenu);
    v8 = v3->m_dwMenuCount;
    v9 = v3->m_aspMenu[v8].m_pObject;
    pkMenua = (PopupMenu *)&v3->m_aspMenu[v8].m_pObject;
    if ( v9 != v4 )
    {
      if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
      {
        if ( v9 )
          v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      }
      pkMenua->vfptr = (NiRefObjectVtbl *)v4;
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
    }
    ++v3->m_dwMenuCount;
    result = 1;
  }
  return result;
}
// 5729D0: could not find valid save-restore pair for edi

//----- (00572AB0) --------------------------------------------------------
void __thiscall PopupMenuWin::PopupMenuWin(PopupMenuWin *this)
{
  PopupMenuWin *v1; // esi@1
  NiPointer<PopupMenu> *v2; // ebx@1
  PopupMenu *v3; // edi@2
  signed int v4; // [sp+14h] [bp-10h]@1

  v1 = this;
  FrameBoxWin::FrameBoxWin((FrameBoxWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&PopupMenuWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&PopupMenuWin::`vftable'{for `IDirectMessenger'};
  `eh vector constructor iterator'(
    v1->m_aspMenu,
    4u,
    20,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v2 = v1->m_aspMenu;
  v4 = 20;
  do
  {
    v3 = v2->m_pObject;
    if ( v2->m_pObject )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      v2->m_pObject = 0;
    }
    ++v2;
    --v4;
  }
  while ( v4 );
  v1->m_dwMenuCount = 0;
  v1->m_pkReceiver = 0;
}
// 99C8C4: using guessed type void (__thiscall *PopupMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99C8E4: using guessed type int (__thiscall *PopupMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00572B80) --------------------------------------------------------
void __thiscall PopupMenuWin::UpdateMeWin(PopupMenuWin *this, float fCurTime)
{
  PopupMenuWin *v2; // edi@1

  v2 = this;
  if ( g_pkKeyboard->m_aucKeystate[0] & 2 )
  {
    BYTE3(PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID)[73].m_kMsgQ.m_uiAlloced) = 0;
    if ( PgWinMgr::IsIn(&Pgg_kWinMgr, (PgWin *)&this->vfptr) )
      PgTQueue<PgWinMgr::PgWinMsg>::Add(&stru_B6483C, (PgWinMgr::PgWinMsg)__PAIR__(1, (unsigned int)v2));
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (00572BE0) --------------------------------------------------------
PopupMenuText *__cdecl PopupMenuText::CreateWin(char *pcText, unsigned int uiCmdMsg, unsigned int uiCmdParam, PgWin *pkParent, char *pcName, unsigned int uiExtStyle, bool bBold)
{
  PgFont *v7; // eax@2
  PopupMenuText *v8; // eax@5
  PopupMenuText *v9; // esi@5
  void (__thiscall ***v10)(_DWORD, _DWORD); // edi@12
  tagSIZE kSize; // [sp+10h] [bp-18h]@5
  NiPointer<PopupMenuText> pkWin; // [sp+18h] [bp-10h]@5
  int v14; // [sp+24h] [bp-4h]@5

  if ( bBold )
    v7 = Font::Get(BOLD);
  else
    v7 = Font::Get(0);
  if ( !v7 )
    return 0;
  PgFont::GetTextSize(v7, pcText, strlen(pcText), &kSize);
  v8 = (PopupMenuText *)operator new(0x158u);
  v9 = v8;
  pkWin.m_pObject = v8;
  v14 = 0;
  if ( v8 )
  {
    PgWinBut::PgWinBut((PgWinBut *)&v8->vfptr);
    v9->m_kClickEvent.iMsg = 0;
    v9->m_kClickEvent.pvMsgBody = 0;
    v9->m_ePopupMenuID = 0;
    v9->m_uiExtraData = 0;
    v9->vfptr = (NiRefObjectVtbl *)&PopupMenuText::`vftable'{for `NiNode'};
    v9->vfptr = (IDirectMessengerVtbl *)&PopupMenuText::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v9 = 0;
  }
  pkWin.m_pObject = v9;
  if ( v9 )
    InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  v14 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, (PgWin *)&v9->vfptr);
  if ( !(unsigned __int8)((int (__thiscall *)(PopupMenuText *, int, int, char *, PgWin *, unsigned int, char *, unsigned int, _DWORD))v9->vfptr[142].__vecDelDtor)(
                           v9,
                           kSize.cx,
                           kSize.cy,
                           pcText,
                           pkParent,
                           uiCmdMsg,
                           pcName,
                           uiExtStyle,
                           bBold) )
  {
    v9->vfptr[130].__vecDelDtor((NiRefObject *)v9, uiCmdParam);
    PgWinMgr::Remove(&Pgg_kWinMgr, (NiPointer<PgWin> *)&bBold, (PgWin *)&v9->vfptr);
    if ( bBold )
    {
      v10 = (void (__thiscall ***)(_DWORD, _DWORD))bBold;
      if ( !InterlockedDecrement((volatile LONG *)(bBold + 4)) )
      {
        if ( v10 )
          (**v10)(v10, 1);
      }
    }
    v14 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    return 0;
  }
  ((void (__thiscall *)(PopupMenuText *))v9->vfptr[89].__vecDelDtor)(v9);
  v14 = -1;
  if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
    v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
  return v9;
}
// 99C408: using guessed type void (__thiscall *PopupMenuText::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99C424: using guessed type int (__thiscall *PopupMenuText::`vftable'{for `NiNode'})(void *p, char);

//----- (00572DA0) --------------------------------------------------------
PopupMenuTextCheck *__cdecl PopupMenuTextCheck::CreateWin(char *pcText, unsigned int uiCmdMsg, unsigned int uiCmdParam, PgWin *pkParent, char *pcName, unsigned int uiExtStyle)
{
  PgWin *v6; // eax@1
  PgWin *v7; // esi@1
  PgWin *v8; // edi@8
  PopupMenuTextCheck *v9; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v11; // [sp+20h] [bp-4h]@1

  v6 = (PgWin *)operator new(0x158u);
  v7 = v6;
  result.m_pObject = v6;
  v11 = 0;
  if ( v6 )
  {
    PgWinBut::PgWinBut((PgWinBut *)v6);
    LODWORD(v7[1].m_kWorldBound.m_kCenter.x) = 0;
    LODWORD(v7[1].m_kWorldBound.m_kCenter.y) = 0;
    LODWORD(v7[1].m_kWorldBound.m_kCenter.z) = 0;
    LODWORD(v7[1].m_kWorldBound.m_fRadius) = 0;
    v7->vfptr = (NiRefObjectVtbl *)&PopupMenuTextCheck::`vftable'{for `NiNode'};
    v7->vfptr = (IDirectMessengerVtbl *)&PopupMenuTextCheck::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v7 = 0;
  }
  if ( v7 )
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  v11 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v7);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, _DWORD, _DWORD, char *, PgWin *, unsigned int, char *, unsigned int))v7->vfptr[142].__vecDelDtor)(
                          v7,
                          0,
                          0,
                          pcText,
                          pkParent,
                          uiCmdMsg,
                          pcName,
                          uiExtStyle) )
  {
    ((void (__thiscall *)(PgWin *))v7->vfptr[89].__vecDelDtor)(v7);
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = (PopupMenuTextCheck *)v7;
  }
  else
  {
    v7->vfptr[130].__vecDelDtor((NiRefObject *)v7, uiCmdParam);
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v7);
    if ( result.m_pObject )
    {
      v8 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v8 )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      }
    }
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = 0;
  }
  return v9;
}
// 99C664: using guessed type void (__thiscall *PopupMenuTextCheck::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99C684: using guessed type int (__thiscall *PopupMenuTextCheck::`vftable'{for `NiNode'})(void *p, char);

//----- (00572F20) --------------------------------------------------------
PopupMenuWin *__cdecl PopupMenuWin::CreateWin(NiSourceTexture *pkTexture, unsigned int uiEdgeHeight, unsigned int uiEdgeWidth, PgFrameWork *pkFrameWork)
{
  PgWin *v4; // eax@1
  PgWin *v5; // eax@2
  PgWin *v6; // esi@2
  PgWin *v7; // edi@8
  PopupMenuWin *v8; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v10; // [sp+20h] [bp-4h]@1

  v4 = (PgWin *)operator new(0x1F8u);
  result.m_pObject = v4;
  v10 = 0;
  if ( v4 )
  {
    PopupMenuWin::PopupMenuWin((PopupMenuWin *)v4);
    v6 = v5;
  }
  else
  {
    v6 = 0;
  }
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v10 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v6);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, NiSourceTexture *, unsigned int, unsigned int, PgFrameWork *))v6->vfptr[137].__vecDelDtor)(
                          v6,
                          pkTexture,
                          uiEdgeHeight,
                          uiEdgeWidth,
                          pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v6->vfptr[89].__vecDelDtor)(v6);
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = (PopupMenuWin *)v6;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v6);
    if ( result.m_pObject )
    {
      v7 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      }
    }
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = 0;
  }
  return v8;
}

//----- (00573060) --------------------------------------------------------
PgWin *__cdecl PopupMenuSubMenu::CreateWin(char *pcText, unsigned int uiCmdMsg, unsigned int uiCmdParam, PgWin *pkParent, char *pcName, unsigned int uiExtStyle)
{
  PgFont *v6; // ecx@1
  PgWin *v7; // eax@2
  PgWin *v8; // esi@2
  PgWin *v9; // edi@9
  tagSIZE kSize; // [sp+10h] [bp-1Ch]@2
  NiPointer<PopupMenuSubMenu> pkWin; // [sp+18h] [bp-14h]@5
  NiPointer<PgWin> result; // [sp+1Ch] [bp-10h]@2
  int v14; // [sp+28h] [bp-4h]@2

  v6 = Font::Get(0);
  if ( !v6 )
    return 0;
  PgFont::GetTextSize(v6, pcText, strlen(pcText), &kSize);
  v7 = (PgWin *)operator new(0x15Cu);
  v8 = v7;
  result.m_pObject = v7;
  v14 = 0;
  if ( v7 )
  {
    PgWinBut::PgWinBut((PgWinBut *)v7);
    LODWORD(v8[1].m_kWorldBound.m_kCenter.x) = 0;
    LODWORD(v8[1].m_kWorldBound.m_kCenter.y) = 0;
    LODWORD(v8[1].m_kWorldBound.m_kCenter.z) = 0;
    LODWORD(v8[1].m_kWorldBound.m_fRadius) = 0;
    v8->vfptr = (NiRefObjectVtbl *)&PopupMenuSubMenu::`vftable'{for `NiNode'};
    v8->vfptr = (IDirectMessengerVtbl *)&PopupMenuSubMenu::`vftable'{for `IDirectMessenger'};
    LODWORD(v8[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
  }
  else
  {
    v8 = 0;
  }
  pkWin.m_pObject = (PopupMenuSubMenu *)v8;
  if ( v8 )
    InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  v14 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v8);
  if ( !(unsigned __int8)((int (__thiscall *)(PgWin *, int, int, char *, PgWin *, unsigned int, char *, unsigned int, _DWORD))v8->vfptr[142].__vecDelDtor)(
                           v8,
                           kSize.cx,
                           kSize.cy,
                           pcText,
                           pkParent,
                           uiCmdMsg,
                           pcName,
                           uiExtStyle,
                           0) )
  {
    v8->vfptr[130].__vecDelDtor((NiRefObject *)v8, uiCmdParam);
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v8);
    if ( result.m_pObject )
    {
      v9 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v9 )
          v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      }
    }
    v14 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    return 0;
  }
  ((void (__thiscall *)(PgWin *))v8->vfptr[89].__vecDelDtor)(v8);
  v14 = -1;
  if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
    v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
  return v8;
}
// 99CB10: using guessed type void (__thiscall *PopupMenuSubMenu::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99CB2C: using guessed type int (__thiscall *PopupMenuSubMenu::`vftable'{for `NiNode'})(void *p, char);

//----- (00573210) --------------------------------------------------------
void __thiscall PopupMenuText::~PopupMenuText(PopupMenuText *this)
{
  PopupMenuText *v1; // esi@1
  void *v2; // ST00_4@1

  v1 = this;
  v2 = this->m_kClickEvent.pvMsgBody;
  this->vfptr = (NiRefObjectVtbl *)&PopupMenu::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PopupMenu::`vftable'{for `IDirectMessenger'};
  operator delete(v2);
  PgWinBut::~PgWinBut((PgWinBut *)&v1->vfptr);
}
// 99C1B0: using guessed type void (__thiscall *PopupMenu::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99C1CC: using guessed type int (__thiscall *PopupMenu::`vftable'{for `NiNode'})(void *p, char);

//----- (00573240) --------------------------------------------------------
PopupMenuTextCheck *__thiscall PopupMenuTextCheck::`vector deleting destructor'(PopupMenuTextCheck *this, unsigned int a2)
{
  PopupMenuTextCheck *v2; // esi@1
  void *v3; // ST00_4@1

  v2 = this;
  v3 = this->m_kClickEvent.pvMsgBody;
  this->vfptr = (NiRefObjectVtbl *)&PopupMenu::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PopupMenu::`vftable'{for `IDirectMessenger'};
  operator delete(v3);
  PgWinBut::~PgWinBut((PgWinBut *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 99C1B0: using guessed type void (__thiscall *PopupMenu::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99C1CC: using guessed type int (__thiscall *PopupMenu::`vftable'{for `NiNode'})(void *p, char);

//----- (00573290) --------------------------------------------------------
void __thiscall PopupMenuSubMenu::~PopupMenuSubMenu(PopupMenuSubMenu *this)
{
  PopupMenuSubMenu *v1; // edi@1
  PopupMenuWin *v2; // esi@1
  void *v3; // ST00_4@5

  v1 = this;
  v2 = this->m_spSubMenu.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_kClickEvent.pvMsgBody;
  v1->vfptr = (NiRefObjectVtbl *)&PopupMenu::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&PopupMenu::`vftable'{for `IDirectMessenger'};
  operator delete(v3);
  PgWinBut::~PgWinBut((PgWinBut *)&v1->vfptr);
}
// 99C1B0: using guessed type void (__thiscall *PopupMenu::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99C1CC: using guessed type int (__thiscall *PopupMenu::`vftable'{for `NiNode'})(void *p, char);

//----- (00573330) --------------------------------------------------------
PopupMenuWin *__thiscall PopupMenuWin::`vector deleting destructor'(PopupMenuWin *this, unsigned int a2)
{
  PopupMenuWin *v2; // esi@1

  v2 = this;
  PopupMenuWin::~PopupMenuWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00573360) --------------------------------------------------------
PopupMenuSubMenu *__thiscall PopupMenuSubMenu::`vector deleting destructor'(PopupMenuSubMenu *this, unsigned int a2)
{
  PopupMenuSubMenu *v2; // esi@1

  v2 = this;
  PopupMenuSubMenu::~PopupMenuSubMenu(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00573390) --------------------------------------------------------
void __thiscall PrisonTimeWin::PrisonTimeWin(PrisonTimeWin *this)
{
  PrisonTimeWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&PrisonTimeWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&PrisonTimeWin::`vftable'{for `IDirectMessenger'};
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kTimer);
}
// 99CDD0: using guessed type void (__thiscall *PrisonTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99CDEC: using guessed type int (__thiscall *PrisonTimeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00573400) --------------------------------------------------------
void __thiscall PrisonTimeWin::~PrisonTimeWin(PrisonTimeWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&PrisonTimeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PrisonTimeWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 99CDD0: using guessed type void (__thiscall *PrisonTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99CDEC: using guessed type int (__thiscall *PrisonTimeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00573440) --------------------------------------------------------
void __thiscall PrisonTimeWin::UpdateMeWin(PrisonTimeWin *this, float fCurTime)
{
  PrisonTimeWin *v2; // edi@1
  unsigned int v3; // esi@3
  char *v4; // eax@3
  NiRefObjectVtbl *v5; // ebx@3
  char *v6; // eax@3
  PgWinText *v7; // edi@4
  void *(__thiscall *v8)(NiRefObject *, unsigned int); // edx@4
  PgWinText *v9; // ecx@4
  PgWinText *v10; // edi@7
  float fCurTimea; // [sp+10h] [bp+8h]@3

  v2 = this;
  if ( CNSTimer_Interval::IsRun_GetCount(&this->m_kTimer, fCurTime) )
  {
    v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 1u);
    --PrisonTimeWin::m_second;
  }
  ((void (__stdcall *)(_DWORD))v2->m_minuteTxtWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  v3 = PrisonTimeWin::m_second / 0x3C / 0x3C;
  fCurTimea = COERCE_FLOAT(v2->m_minuteTxtWin->vfptr);
  v4 = fs("%02d:%02d:%02d", v3 % 0x3C, PrisonTimeWin::m_second / 0x3C % 0x3C, PrisonTimeWin::m_second % 0x3C);
  (*(void (__thiscall **)(_DWORD, _DWORD))(LODWORD(fCurTimea) + 472))(v2->m_minuteTxtWin, v4);
  v5 = v2->m_DayTxtWin->vfptr;
  v6 = fs("%02d", v3 % 0x5A0);
  v5[118].__vecDelDtor((NiRefObject *)v2->m_DayTxtWin, (unsigned int)v6);
  if ( PrisonTimeWin::m_second >= 0x3C )
  {
    if ( PrisonTimeWin::m_second >= 0x12C )
      goto LABEL_9;
    v10 = v2->m_minuteTxtWin;
    v8 = v10->vfptr[117].__vecDelDtor;
    v9 = v10;
  }
  else
  {
    v7 = v2->m_minuteTxtWin;
    v8 = v7->vfptr[117].__vecDelDtor;
    v9 = v7;
    if ( !(PrisonTimeWin::m_second & 1) )
    {
      v8((NiRefObject *)&v7->vfptr, (unsigned int)&Color::m_kDxWhiteColor);
      goto LABEL_9;
    }
  }
  v8((NiRefObject *)&v9->vfptr, (unsigned int)&Color::m_kDxRedColor);
LABEL_9:
  if ( PrisonTimeWin::m_second == 60 )
    SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_KQLast);
}
// A8D47C: using guessed type unsigned int PrisonTimeWin::m_second;

//----- (005735A0) --------------------------------------------------------
void __thiscall PrisonTimeWin::ResetTime(PrisonTimeWin *this, unsigned int second)
{
  PrisonTimeWin *v2; // esi@1

  v2 = this;
  PrisonTimeWin::m_second = second;
  CNSTimer_Interval::ReSet(&this->m_kTimer, Timer::ms_fCurTime);
  v2->m_kTimer.m_fCheckTime = 1.0;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8D47C: using guessed type unsigned int PrisonTimeWin::m_second;

//----- (005735D0) --------------------------------------------------------
char __thiscall PrisonTimeWin::Create(PrisonTimeWin *this, PgFrameWork *pkFrameWork)
{
  PrisonTimeWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // ebx@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  PgSprData *v10; // eax@15
  PgSprData *v11; // edi@15
  PgWinSpr *v12; // eax@15
  NiPointer<PgSprData::PgHitTester> *v13; // ecx@15
  unsigned int v14; // edi@15
  unsigned int v15; // ebx@15
  PgFont *v16; // eax@15
  PgWinText *v17; // eax@15
  NiRefObjectVtbl *v18; // edi@15
  PgFont *v19; // eax@15
  PgFont *v20; // eax@17
  PgWinText *v21; // eax@17
  NiRefObjectVtbl *v22; // edi@17
  PgFont *v23; // ST24_4@17
  NiRefObjectVtbl *v24; // edi@17
  int v25; // eax@17
  unsigned int uiWidth; // [sp+3Ch] [bp-20h]@15
  unsigned int uiHeight; // [sp+40h] [bp-1Ch]@15
  int uiLeft; // [sp+44h] [bp-18h]@11
  int uiTop; // [sp+48h] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+4Ch] [bp-10h]@1
  int v31; // [sp+58h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v31 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v31 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
    goto LABEL_5;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "\\Game\\PrisonTime.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "PrisonTimeWin", 0) )
  {
    v4 = spNode.m_pObject;
    v31 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Time", &uiLeft, &uiTop, v3);
  v11 = v10;
  v12 = PgWinSpr::CreateWin(uiLeft, uiTop, v10, (PgWin *)&v2->vfptr, 0, 0);
  v12->vfptr[60].__vecDelDtor((NiRefObject *)v12, 0);
  v13 = v11->m_akHitTester.m_pBase;
  v14 = v13->m_pObject->m_uiHeight;
  v15 = v13->m_pObject->m_uiWidth;
  v16 = Font::Get(0);
  v17 = PgWinText::CreateWin(uiLeft, uiTop + 2, v15, v14, v16, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_minuteTxtWin = v17;
  v17->vfptr[122].__vecDelDtor((NiRefObject *)v17, 5u);
  v18 = v2->m_minuteTxtWin->vfptr;
  v19 = Font::Get(LARGEBOLD);
  v18[113].__vecDelDtor((NiRefObject *)v2->m_minuteTxtWin, (unsigned int)v19);
  ((void (__stdcall *)(const char *))v2->m_minuteTxtWin->vfptr[118].__vecDelDtor)("00:00:00");
  ((void (__stdcall *)(_DWORD))v2->m_minuteTxtWin->vfptr[60].__vecDelDtor)(0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          off_99CDAC,
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
  {
    v31 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  v20 = Font::Get(0);
  v21 = PgWinText::CreateWin(uiLeft, uiTop + 2, uiWidth, uiHeight, v20, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_DayTxtWin = v21;
  ((void (__thiscall *)(PgWinText *))v21->vfptr[122].__vecDelDtor)(v21);
  v22 = v2->m_DayTxtWin->vfptr;
  v23 = Font::Get(SMALL);
  ((void (__thiscall *)(PgWinText *))v22[113].__vecDelDtor)(v2->m_DayTxtWin);
  ((void (__cdecl *)(void *, PgFont *, signed int))v2->m_DayTxtWin->vfptr[118].__vecDelDtor)(&unk_99CDB0, v23, 5);
  ((void (__cdecl *)(_DWORD))v2->m_DayTxtWin->vfptr[60].__vecDelDtor)(0);
  ((void (__thiscall *)(PrisonTimeWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    1.0,
    0.0);
  v24 = v2->vfptr;
  v25 = (int)v2->vfptr[41].__vecDelDtor((NiRefObject *)v2, 160u);
  v24[77].__vecDelDtor((NiRefObject *)v2, v25);
  v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 1u);
  v31 = -1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005738F0) --------------------------------------------------------
PrisonTimeWin *__cdecl PrisonTimeWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  PrisonTimeWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x17Cu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    LOBYTE(v6) = 1;
    v2->vfptr = (NiRefObjectVtbl *)&PrisonTimeWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&PrisonTimeWin::`vftable'{for `IDirectMessenger'};
    CNSTimer_Interval::CNSTimer_Interval((CNSTimer_Interval *)v2[1].m_kLocal.m_Rotate.m_pEntry[1]);
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (PrisonTimeWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 99CDD0: using guessed type void (__thiscall *PrisonTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99CDEC: using guessed type int (__thiscall *PrisonTimeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00573A40) --------------------------------------------------------
PrisonTimeWin *__thiscall PrisonTimeWin::`vector deleting destructor'(PrisonTimeWin *this, unsigned int a2)
{
  PrisonTimeWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&PrisonTimeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PrisonTimeWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 99CDD0: using guessed type void (__thiscall *PrisonTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99CDEC: using guessed type int (__thiscall *PrisonTimeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00573A80) --------------------------------------------------------
void __thiscall PrivateStoreInvWin::PrivateStoreInvWin(PrivateStoreInvWin *this)
{
  PrivateStoreInvWin *v1; // esi@1

  v1 = this;
  ItemIcon::ItemIcon((ItemIcon *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&PrivateStoreInvWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&PrivateStoreInvWin::`vftable'{for `IDirectMessenger'};
  v1->m_uiInvIndex = -1;
  v1->m_uiInvType = 0;
  LODWORD(v1->i64SellMoney) = 0;
  HIDWORD(v1->i64SellMoney) = 0;
  IconWin::ShowFocus((IconWin *)&v1->vfptr, 1);
  v1->m_BuySloatItemCount = 0;
}
// 99D2C0: using guessed type void (__thiscall *PrivateStoreInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99D2DC: using guessed type int (__thiscall *PrivateStoreInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00573B10) --------------------------------------------------------
char __thiscall PrivateStoreInvWin::Create(PrivateStoreInvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent)
{
  PrivateStoreInvWin *v5; // esi@1
  char result; // al@1

  v5 = this;
  result = ItemIcon::Create((ItemIcon *)&this->vfptr, iXPos, iYPos, pkParent);
  if ( result )
  {
    v5->m_uiInvIndex = uiInvIndex;
    result = 1;
  }
  return result;
}

//----- (00573B50) --------------------------------------------------------
void __thiscall PrivateStoreInvWin::SetInvType(PrivateStoreInvWin *this, unsigned int uiInvType)
{
  this->m_uiInvType = uiInvType;
}

//----- (00573B60) --------------------------------------------------------
void __thiscall PrivateStoreInvWin::OnFirstHitWin(PrivateStoreInvWin *this)
{
  PrivateStoreInvWin *v1; // esi@1
  Item *v2; // eax@1
  ItemInfoWin *v3; // ecx@2

  v1 = this;
  v2 = ItemIcon::GetItem((ItemIcon *)&this->vfptr);
  if ( v2 )
  {
    v3 = (ItemInfoWin *)v1->m_pkToolTipWin;
    if ( v3 )
    {
      if ( PrivateStoreWin::ms_uiPrivateStoreMode == 2 || PrivateStoreWin::ms_uiPrivateStoreMode == 3 )
      {
        ItemInfoWin::SetPrivateStoreBuyInfo(v3, v2, v1->i64SellMoney, v1->m_BuySloatItemCount, 0);
        PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
      }
      else
      {
        ItemInfoWin::SetPrivateStoreSellInfo(v3, v2, v1->i64SellMoney, 0);
        PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
      }
    }
  }
}
// A71180: using guessed type unsigned int PrivateStoreWin::ms_uiPrivateStoreMode;

//----- (00573BD0) --------------------------------------------------------
void __thiscall PrivateStoreInvWin::SetLotText(PrivateStoreInvWin *this, unsigned int uiLot)
{
  PrivateStoreInvWin *v2; // esi@1
  NiRefObjectVtbl *v3; // edi@1
  char *v4; // eax@1

  v2 = this;
  v3 = this->m_pkLotText->vfptr;
  v4 = fs("%d", uiLot);
  v3[118].__vecDelDtor((NiRefObject *)v2->m_pkLotText, (unsigned int)v4);
}

//----- (00573C10) --------------------------------------------------------
void __thiscall PrivateStoreWin::PrivateStoreWin(PrivateStoreWin *this)
{
  PrivateStoreWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&PrivateStoreWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&PrivateStoreWin::`vftable'{for `IDirectMessenger'};
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kTimerInterval);
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kEnableReflashButTimer);
  v1->m_bPrivateStoreOpen = 0;
  *(_DWORD *)&v1->signboard.signboard[0] = 0;
  *(_DWORD *)&v1->signboard.signboard[4] = 0;
  *(_DWORD *)&v1->signboard.signboard[8] = 0;
  *(_DWORD *)&v1->signboard.signboard[12] = 0;
  *(_DWORD *)&v1->signboard.signboard[16] = 0;
  *(_DWORD *)&v1->signboard.signboard[20] = 0;
  *(_DWORD *)&v1->signboard.signboard[24] = 0;
  *(_WORD *)&v1->signboard.signboard[28] = 0;
  v1->m_uiCurInvIndex = 0;
  v1->m_pkMoneyWin = 0;
  LODWORD(v1->i64PrivateStoreStartMyMoney) = 0;
  HIDWORD(v1->i64PrivateStoreStartMyMoney) = 0;
}
// 99D54C: using guessed type void (__thiscall *PrivateStoreWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99D56C: using guessed type int (__thiscall *PrivateStoreWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00573CD0) --------------------------------------------------------
void __thiscall PrivateStoreWin::~PrivateStoreWin(PrivateStoreWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&PrivateStoreWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PrivateStoreWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 99D54C: using guessed type void (__thiscall *PrivateStoreWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99D56C: using guessed type int (__thiscall *PrivateStoreWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00573CF0) --------------------------------------------------------
void __thiscall PrivateStoreWin::OnBuyItem(PrivateStoreWin *this, unsigned int uiLot)
{
  GameFrameWork::NcBoothItemTradeReq(
    (GameFrameWork *)this->m_pkFrameWork,
    PrivateStoreWin::ms_BoothHandle,
    this->m_uiCurInvIndex,
    uiLot);
}
// A8D480: using guessed type unsigned __int16 PrivateStoreWin::ms_BoothHandle;

//----- (00573D20) --------------------------------------------------------
void __thiscall PrivateStoreWin::OnCmdCancel(PrivateStoreWin *this)
{
  PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
}

//----- (00573D30) --------------------------------------------------------
void __thiscall PrivateStoreWin::OnShowWin(PrivateStoreWin *this)
{
  PrivateStoreWin *v1; // esi@1
  GameFrameWork *v2; // eax@1

  v1 = this;
  PgWin::OnShowWin((PgWin *)&this->vfptr);
  EditWin::SetEnable(v1->m_pkStoreNameInputEdit, 1);
  ((void (__stdcall *)(_DWORD))v1->m_pkRegulateModeText->vfptr[64].__vecDelDtor)(0);
  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
    GameFrameWork::OpenPlayGuideWin(v2, BIL_MINIHOUSE_11);
}

//----- (00573D90) --------------------------------------------------------
void __thiscall PrivateStoreWin::OnSellMoneyOK(PrivateStoreWin *this)
{
  PrivateStoreWin *v1; // ebx@1
  __int64 v2; // kr00_8@2
  int iCopper; // ST4C_4@2
  int iSilver; // ST50_4@2
  int iGold; // ST54_4@2
  int v6; // eax@2

  v1 = this;
  if ( ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[this->m_uiCurInvIndex]->vfptr) )
  {
    v2 = MoneyWin::i64Money;
    iCopper = User::GetCopper(MoneyWin::i64Money);
    iSilver = User::GetSilver(v2);
    iGold = User::GetGold(v2);
    v6 = User::GetGem(v2);
    v1->m_apkInvWin[v1->m_uiCurInvIndex]->i64SellMoney = User::ConvertMoney(iCopper, iSilver, iGold, v6);
  }
}

//----- (00573E20) --------------------------------------------------------
void __thiscall PrivateStoreWin::ClearItems(PrivateStoreWin *this)
{
  ItemIcon **v1; // esi@1
  signed int v2; // edi@1

  v1 = (ItemIcon **)this->m_apkInvWin;
  v2 = 20;
  do
  {
    ItemIcon::SetItem(*v1, 0, 1);
    ++v1;
    --v2;
  }
  while ( v2 );
}

//----- (00573E50) --------------------------------------------------------
void __stdcall PrivateStoreWin::SetBoothSize(char bySize)
{
  PrivateStoreWin::ms_byBoothSize = bySize;
}
// A71184: using guessed type unsigned __int8 PrivateStoreWin::ms_byBoothSize;

//----- (00573E60) --------------------------------------------------------
void PrivateStoreWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "PrivateStore");
}

//----- (00573E90) --------------------------------------------------------
void __thiscall PrivateStoreInvWin::~PrivateStoreInvWin(PrivateStoreInvWin *this)
{
  PrivateStoreInvWin *v1; // esi@1
  Item *v2; // edi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&PrivateStoreInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PrivateStoreInvWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spItem.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spItem.m_pObject = 0;
  }
  ItemIcon::~ItemIcon((ItemIcon *)&v1->vfptr);
}
// 99D2C0: using guessed type void (__thiscall *PrivateStoreInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99D2DC: using guessed type int (__thiscall *PrivateStoreInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00573F20) --------------------------------------------------------
void __thiscall PrivateStoreInvWin::UpdateMeWin(PrivateStoreInvWin *this, float fCurTime)
{
  PrivateStoreInvWin *v2; // esi@1
  Item *v3; // ecx@3
  NiRefObjectVtbl *v4; // edi@6
  int v5; // eax@6
  char *v6; // eax@6

  v2 = this;
  if ( PrivateStoreWin::ms_uiPrivateStoreMode != 2 && PrivateStoreWin::ms_uiPrivateStoreMode != 3 )
  {
    v3 = this->m_spItem.m_pObject;
    if ( v3 )
    {
      if ( (unsigned int)((int (*)(void))v3->vfptr[4].__vecDelDtor)() <= 1 )
      {
        if ( v2->m_pkLotText )
        {
          ((void (__stdcall *)(_DWORD))v2->m_pkLotText->vfptr[118].__vecDelDtor)(&unk_99D00F);
          ((void (__stdcall *)(_DWORD))v2->m_pkLotText->vfptr[64].__vecDelDtor)(0);
        }
      }
      else if ( v2->m_pkLotText )
      {
        v4 = v2->m_pkLotText->vfptr;
        v5 = ((int (*)(void))v2->m_spItem.m_pObject->vfptr[3].__vecDelDtor)();
        v6 = fs("%d", v5);
        v4[118].__vecDelDtor((NiRefObject *)v2->m_pkLotText, (unsigned int)v6);
        ((void (__stdcall *)(_DWORD))v2->m_pkLotText->vfptr[64].__vecDelDtor)(1);
      }
    }
  }
}
// A71180: using guessed type unsigned int PrivateStoreWin::ms_uiPrivateStoreMode;

//----- (00573FE0) --------------------------------------------------------
void __thiscall PrivateStoreWin::OnClose(PrivateStoreWin *this)
{
  PrivateStoreWin *v1; // esi@1
  unsigned int v2; // eax@2
  ItemIcon **v3; // edi@7
  signed int v4; // ebx@7
  _DWORD *v5; // ecx@9
  unsigned int v6; // eax@10
  InvWin *v7; // ecx@11
  ItemIcon **v8; // edi@18
  signed int v9; // ebx@18
  _DWORD *v10; // ecx@20
  unsigned int v11; // eax@21
  InvWin *v12; // ecx@22

  v1 = this;
  if ( g_pkMainChar )
  {
    v2 = PrivateStoreWin::ms_uiPrivateStoreMode;
    if ( (PrivateStoreWin::ms_uiPrivateStoreMode == 1 || PrivateStoreWin::ms_uiPrivateStoreMode == 3)
      && g_pkMainChar->m_byMode == 5 )
    {
      GameFrameWork::NcBoothCloseReq((GameFrameWork *)this->m_pkFrameWork);
      v2 = PrivateStoreWin::ms_uiPrivateStoreMode;
    }
    InventoryWin::ms_uiMode = 0;
    if ( v2 == 1 )
    {
      v3 = (ItemIcon **)v1->m_apkInvWin;
      v4 = 20;
      do
      {
        if ( ItemIcon::GetItem(*v3) )
        {
          v5 = v1->m_pkFrameWork[19].m_BackFrameID;
          if ( v5 )
          {
            v6 = (unsigned int)(*v3)[1].m_pcName;
            if ( v6 < 0xC0 )
              v7 = (InvWin *)v5[v6 + 87];
            else
              v7 = 0;
            InvWin::SetLock(v7, 0);
          }
          ItemIcon::SetItem(*v3, 0, 1);
        }
        ++v3;
        --v4;
      }
      while ( v4 );
    }
    else if ( v2 == 3 )
    {
      v8 = (ItemIcon **)v1->m_apkInvWin;
      v9 = 20;
      do
      {
        if ( ItemIcon::GetItem(*v8) )
        {
          v10 = v1->m_pkFrameWork[19].m_BackFrameID;
          if ( v10 )
          {
            v11 = (unsigned int)(*v8)[1].m_pcName;
            if ( v11 < 0xC0 )
              v12 = (InvWin *)v10[v11 + 87];
            else
              v12 = 0;
            InvWin::SetLock(v12, 0);
          }
          ItemIcon::SetItem(*v8, 0, 1);
        }
        ++v8;
        --v9;
      }
      while ( v9 );
    }
    ((void (__stdcall *)(void *))v1->m_pkStoreNameInputEdit->vfptr[115].__vecDelDtor)(&unk_99D033);
    ((void (__stdcall *)(void *))v1->m_pkCopperText->vfptr[118].__vecDelDtor)(&unk_99D04A);
    ((void (__stdcall *)(void *))v1->m_pkSilverText->vfptr[118].__vecDelDtor)(&unk_99D04B);
    ((void (__stdcall *)(void *))v1->m_pkGoldText->vfptr[118].__vecDelDtor)(&unk_99D052);
    ((void (__stdcall *)(void *))v1->m_pkGemText->vfptr[118].__vecDelDtor)(&unk_99D053);
    ((void (__stdcall *)(signed int))v1->m_pkOk->vfptr[60].__vecDelDtor)(1);
    EditWin::SetEnable(v1->m_pkStoreNameInputEdit, 0);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMoneyWin->vfptr);
    ((void (__stdcall *)(_DWORD))v1->m_pkRegulateModeText->vfptr[64].__vecDelDtor)(0);
    PrivateStoreWin::ms_bPrivateStoreWin = 0;
  }
}
// A71180: using guessed type unsigned int PrivateStoreWin::ms_uiPrivateStoreMode;
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;
// A8D482: using guessed type bool PrivateStoreWin::ms_bPrivateStoreWin;

//----- (005741A0) --------------------------------------------------------
void __thiscall PrivateStoreWin::UpdateMeWin(PrivateStoreWin *this, float fCurTime)
{
  unsigned int v2; // eax@1
  PrivateStoreWin *v3; // esi@1
  unsigned __int64 v4; // rax@3
  unsigned int v5; // edi@3
  unsigned int v6; // ebx@3
  __int64 v7; // rax@3
  __int64 v8; // rax@3
  __int64 v9; // rax@3
  __int64 v10; // rax@3
  ItemIcon **v11; // edi@3
  signed int v12; // ebx@3
  unsigned int v13; // eax@5
  ItemIcon *v14; // eax@6
  Item *v15; // eax@8
  ItemIcon *v16; // ecx@8
  __int64 v17; // rax@15
  __int64 v18; // rax@15
  __int64 v19; // rax@15
  __int64 v20; // rax@15
  __int64 v21; // rax@15
  __int64 v22; // rax@15
  __int64 v23; // rax@15
  __int64 v24; // rax@15
  ItemIcon **v25; // edi@15
  signed int v26; // ebx@15
  ItemIcon **v27; // edi@26
  signed int v28; // ebx@26
  unsigned int pkItemNum; // [sp+14h] [bp-88h]@15
  unsigned int pkItemNuma; // [sp+14h] [bp-88h]@26
  char acStr[128]; // [sp+18h] [bp-84h]@3

  v2 = PrivateStoreWin::ms_uiPrivateStoreMode;
  v3 = this;
  if ( this->m_bPrivateStoreOpen && PrivateStoreWin::ms_uiPrivateStoreMode == 1 )
  {
    v4 = User::GetMoney(&g_kUser);
    v5 = v4 - LODWORD(v3->i64PrivateStoreStartMyMoney);
    v6 = (v4 - v3->i64PrivateStoreStartMyMoney) >> 32;
    v7 = User::GetGem(v4 - v3->i64PrivateStoreStartMyMoney);
    sprintf(acStr, "%I64d", v7);
    ((void (__stdcall *)(_DWORD))v3->m_pkGemText->vfptr[118].__vecDelDtor)(acStr);
    v8 = User::GetGold(__PAIR__(v6, v5));
    sprintf(acStr, "%I64d", v8);
    ((void (__stdcall *)(_DWORD))v3->m_pkGoldText->vfptr[118].__vecDelDtor)(acStr);
    v9 = User::GetSilver(__PAIR__(v6, v5));
    sprintf(acStr, "%I64d", v9);
    ((void (__stdcall *)(_DWORD))v3->m_pkSilverText->vfptr[118].__vecDelDtor)(acStr);
    v10 = User::GetCopper(__PAIR__(v6, v5));
    sprintf(acStr, "%I64d", v10);
    ((void (__stdcall *)(_DWORD))v3->m_pkCopperText->vfptr[118].__vecDelDtor)(acStr);
    v11 = (ItemIcon **)v3->m_apkInvWin;
    v12 = 20;
    do
    {
      if ( ItemIcon::GetItem(*v11) )
      {
        v13 = (unsigned int)(*v11)[1].m_pcName;
        if ( v13 < 0xC0 )
          v14 = (ItemIcon *)*((_DWORD *)v3->m_pkFrameWork[19].m_BackFrameID + v13 + 87);
        else
          v14 = 0;
        v15 = ItemIcon::GetItem(v14);
        v16 = *v11;
        if ( v15 )
          ItemIcon::SetItem(v16, v15, 1);
        else
          ItemIcon::SetItem(v16, 0, 1);
      }
      ++v11;
      --v12;
    }
    while ( v12 );
    goto LABEL_32;
  }
  if ( !PrivateStoreWin::ms_uiPrivateStoreMode )
  {
    if ( CNSTimer_Interval::IsRun_GetCount(&this->m_kTimerInterval, fCurTime) )
    {
      v17 = User::GetMoney(&g_kUser);
      v18 = User::GetGem(v17);
      sprintf(acStr, "%I64d", v18);
      ((void (__stdcall *)(_DWORD))v3->m_pkGemText->vfptr[118].__vecDelDtor)(acStr);
      v19 = User::GetMoney(&g_kUser);
      v20 = User::GetGold(v19);
      sprintf(acStr, "%I64d", v20);
      ((void (__stdcall *)(_DWORD))v3->m_pkGoldText->vfptr[118].__vecDelDtor)(acStr);
      v21 = User::GetMoney(&g_kUser);
      v22 = User::GetSilver(v21);
      sprintf(acStr, "%I64d", v22);
      ((void (__stdcall *)(_DWORD))v3->m_pkSilverText->vfptr[118].__vecDelDtor)(acStr);
      v23 = User::GetMoney(&g_kUser);
      v24 = User::GetCopper(v23);
      sprintf(acStr, "%I64d", v24);
      ((void (__stdcall *)(_DWORD))v3->m_pkCopperText->vfptr[118].__vecDelDtor)(acStr);
      pkItemNum = 0;
      v25 = (ItemIcon **)v3->m_apkInvWin;
      v26 = 20;
      do
      {
        if ( ItemIcon::GetItem(*v25) )
          ++pkItemNum;
        ++v25;
        --v26;
      }
      while ( v26 );
      if ( pkItemNum > 0 )
        GameFrameWork::NcBoothReflashReq((GameFrameWork *)v3->m_pkFrameWork, PrivateStoreWin::ms_BoothHandle);
      goto LABEL_32;
    }
    v2 = PrivateStoreWin::ms_uiPrivateStoreMode;
  }
  if ( (!v3->m_bPrivateStoreOpen || v2 != 3)
    && v2 == 2
    && CNSTimer_Interval::IsRun_GetCount(&v3->m_kTimerInterval, fCurTime) )
  {
    pkItemNuma = 0;
    v27 = (ItemIcon **)v3->m_apkInvWin;
    v28 = 20;
    do
    {
      if ( ItemIcon::GetItem(*v27) )
        ++pkItemNuma;
      ++v27;
      --v28;
    }
    while ( v28 );
    if ( pkItemNuma > 0 )
      GameFrameWork::NcBoothReflashReq((GameFrameWork *)v3->m_pkFrameWork, PrivateStoreWin::ms_BoothHandle);
  }
LABEL_32:
  if ( !(unsigned __int8)((int (*)(void))v3->m_pkOk->vfptr[61].__vecDelDtor)()
    && (!PrivateStoreWin::ms_uiPrivateStoreMode
     && CNSTimer_Interval::IsRun_GetCount(&v3->m_kEnableReflashButTimer, fCurTime)
     || PrivateStoreWin::ms_uiPrivateStoreMode == 2
     && CNSTimer_Interval::IsRun_GetCount(&v3->m_kEnableReflashButTimer, fCurTime)) )
  {
    ((void (__stdcall *)(_DWORD))v3->m_pkOk->vfptr[60].__vecDelDtor)(1);
    CNSTimer_Interval::ReSet(&v3->m_kEnableReflashButTimer, Timer::ms_fCurTime);
    v3->m_kEnableReflashButTimer.m_fCheckTime = 1.0;
  }
}
// A71180: using guessed type unsigned int PrivateStoreWin::ms_uiPrivateStoreMode;
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8D480: using guessed type unsigned __int16 PrivateStoreWin::ms_BoothHandle;

//----- (00574580) --------------------------------------------------------
void __thiscall PrivateStoreWin::OnSellMoneyCancel(PrivateStoreWin *this)
{
  PrivateStoreWin *v1; // esi@1
  unsigned int v2; // eax@2
  InvWin *v3; // ecx@3
  PrivateStoreInvWin *v4; // esi@5

  v1 = this;
  if ( ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[this->m_uiCurInvIndex]->vfptr) )
  {
    v2 = v1->m_apkInvWin[v1->m_uiCurInvIndex]->m_uiSenderInvIndex;
    if ( v2 < 0xC0 )
      v3 = (InvWin *)*((_DWORD *)v1->m_pkFrameWork[19].m_BackFrameID + v2 + 87);
    else
      v3 = 0;
    InvWin::SetLock(v3, 0);
    ItemIcon::SetItem((ItemIcon *)&v1->m_apkInvWin[v1->m_uiCurInvIndex]->vfptr, 0, 1);
    v4 = v1->m_apkInvWin[v1->m_uiCurInvIndex];
    LODWORD(v4->i64SellMoney) = 0;
    HIDWORD(v4->i64SellMoney) = 0;
  }
}

//----- (00574610) --------------------------------------------------------
void __thiscall PrivateStoreWin::OnBuyMoneyCancel(PrivateStoreWin *this)
{
  PrivateStoreWin *v1; // esi@1
  unsigned int v2; // eax@2
  InvWin *v3; // ecx@3
  PrivateStoreInvWin *v4; // esi@5

  v1 = this;
  if ( ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[this->m_uiCurInvIndex]->vfptr) )
  {
    v2 = v1->m_apkInvWin[v1->m_uiCurInvIndex]->m_uiSenderInvIndex;
    if ( v2 < 0xC0 )
      v3 = (InvWin *)*((_DWORD *)v1->m_pkFrameWork[19].m_BackFrameID + v2 + 87);
    else
      v3 = 0;
    InvWin::SetLock(v3, 0);
    ItemIcon::SetItem((ItemIcon *)&v1->m_apkInvWin[v1->m_uiCurInvIndex]->vfptr, 0, 1);
    v4 = v1->m_apkInvWin[v1->m_uiCurInvIndex];
    LODWORD(v4->i64SellMoney) = 0;
    HIDWORD(v4->i64SellMoney) = 0;
  }
}

//----- (005746A0) --------------------------------------------------------
void __thiscall PrivateStoreInvWin::DoAction(PrivateStoreInvWin *this)
{
  PrivateStoreInvWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiInvIndex);
}

//----- (005746D0) --------------------------------------------------------
void __thiscall PrivateStoreInvWin::DoRAction(PrivateStoreInvWin *this)
{
  PrivateStoreInvWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiRCmdMsg, v1->m_uiInvIndex);
}

//----- (00574700) --------------------------------------------------------
void __thiscall PrivateStoreWin::OnCmdInvRClick(PrivateStoreWin *this, unsigned int uiInvIndex)
{
  PrivateStoreWin *v2; // esi@1
  unsigned int v3; // eax@4
  Item *v4; // edi@9
  GameFrameWork *v5; // ebx@11
  char *v6; // ST0C_4@11
  unsigned int v7; // eax@11
  InvWin *v8; // ecx@16
  PrivateStoreInvWin *v9; // esi@17

  v2 = this;
  this->m_uiCurInvIndex = uiInvIndex;
  if ( PrivateStoreWin::ms_uiPrivateStoreMode == 1 )
  {
    if ( !this->m_bPrivateStoreOpen && ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[uiInvIndex]->vfptr) )
    {
      v3 = v2->m_apkInvWin[uiInvIndex]->m_uiSenderInvIndex;
      if ( v3 < 0xC0 )
        InvWin::SetLock(*((InvWin **)v2->m_pkFrameWork[19].m_BackFrameID + v3 + 87), 0);
      else
        InvWin::SetLock(0, 0);
      goto LABEL_17;
    }
  }
  else if ( PrivateStoreWin::ms_uiPrivateStoreMode )
  {
    if ( PrivateStoreWin::ms_uiPrivateStoreMode == 3
      && !this->m_bPrivateStoreOpen
      && ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[uiInvIndex]->vfptr) )
    {
      v8 = InventoryWin::GetInvWin(
             (InventoryWin *)v2->m_pkFrameWork[19].m_BackFrameID,
             v2->m_apkInvWin[uiInvIndex]->m_uiSenderInvIndex);
      InvWin::SetLock(v8, 0);
LABEL_17:
      ItemIcon::SetItem((ItemIcon *)&v2->m_apkInvWin[uiInvIndex]->vfptr, 0, 1);
      v9 = v2->m_apkInvWin[uiInvIndex];
      HIDWORD(v9->i64SellMoney) = 0;
      LODWORD(v9->i64SellMoney) = 0;
      return;
    }
  }
  else if ( InventoryWin::ms_bBuyPrivateStoreActionReady )
  {
    v4 = ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[uiInvIndex]->vfptr);
    if ( v4 )
    {
      if ( (unsigned int)((int (__thiscall *)(_DWORD))v4->vfptr[3].__vecDelDtor)(v4) <= 1 )
      {
        PrivateStoreWin::OnBuyItem(v2, 1u);
      }
      else
      {
        v5 = (GameFrameWork *)v2->m_pkFrameWork;
        v6 = (char *)TextData::Get(0x37494293u);
        v7 = ((int (__thiscall *)(_DWORD))v4->vfptr[3].__vecDelDtor)(v4);
        GameFrameWork::OnOpenDivideWin(v5, (PgWin *)&v2->vfptr, 4u, v7, v6, 0);
      }
    }
  }
}
// A70798: using guessed type bool InventoryWin::ms_bBuyPrivateStoreActionReady;
// A71180: using guessed type unsigned int PrivateStoreWin::ms_uiPrivateStoreMode;

//----- (00574860) --------------------------------------------------------
void __thiscall PrivateStoreWin::OnCmdInvLClick(PrivateStoreWin *this, unsigned int uiInvIndex)
{
  PrivateStoreWin *v2; // esi@1
  GameFrameWork *v3; // edi@4
  char *v4; // ST10_4@4
  char *v5; // eax@4

  v2 = this;
  if ( (PrivateStoreWin::ms_uiPrivateStoreMode == 1 || PrivateStoreWin::ms_uiPrivateStoreMode == 3)
    && !this->m_bPrivateStoreOpen )
  {
    v3 = (GameFrameWork *)this->m_pkFrameWork;
    this->m_uiCurInvIndex = uiInvIndex;
    v4 = (char *)TextData::Get(0x3B609389u);
    v5 = (char *)TextData::Get(0x9B9A90D3);
    GameFrameWork::OnOpenMoneyWin(v3, (PgWin *)&v2->vfptr, 0xFu, 0x10u, v5, v4);
  }
}
// A71180: using guessed type unsigned int PrivateStoreWin::ms_uiPrivateStoreMode;

//----- (005748C0) --------------------------------------------------------
void __thiscall PrivateStoreWin::OnCmdOk(PrivateStoreWin *this)
{
  PrivateStoreWin *v1; // edi@1
  ItemIcon **v2; // esi@5
  signed int v3; // ebx@5
  char *v4; // eax@10
  char *v5; // eax@11
  int v6; // esi@13
  char *v7; // eax@13
  GameFrameWork *v8; // ecx@15
  ItemIcon **v9; // ebx@19
  ItemIcon *v10; // esi@20
  char *v11; // eax@26
  int v12; // esi@27
  char *v13; // eax@27
  __int64 nTotalNeedMoney; // [sp+14h] [bp-10h]@19
  signed int v15; // [sp+1Ch] [bp-8h]@19
  bool bItemOk; // [sp+23h] [bp-1h]@5
  bool bItemOka; // [sp+23h] [bp-1h]@19

  v1 = this;
  if ( PrivateStoreWin::ms_uiPrivateStoreMode == 1 )
  {
    if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[20].Deaffect)() )
      return;
    if ( v1->m_bPrivateStoreOpen )
      goto LABEL_4;
    bItemOk = 0;
    v2 = (ItemIcon **)v1->m_apkInvWin;
    v3 = 20;
    do
    {
      if ( ItemIcon::GetItem(*v2) )
        bItemOk = 1;
      ++v2;
      --v3;
    }
    while ( v3 );
    if ( bItemOk )
    {
      v4 = (char *)((int (*)(void))v1->m_pkStoreNameInputEdit->vfptr[113].__vecDelDtor)();
      if ( TextFilterTable::IsBadName(v4) )
      {
LABEL_11:
        v5 = (char *)TextData::Get(0x329D7E83u);
LABEL_12:
        MsgBox::Modeless(MSGBOX_OK, v5);
        return;
      }
      v6 = (int)&v1->signboard;
      *(_DWORD *)v6 = 0;
      *(_DWORD *)(v6 + 4) = 0;
      *(_DWORD *)(v6 + 8) = 0;
      *(_DWORD *)(v6 + 12) = 0;
      *(_DWORD *)(v6 + 16) = 0;
      *(_DWORD *)(v6 + 20) = 0;
      *(_DWORD *)(v6 + 24) = 0;
      *(_WORD *)(v6 + 28) = 0;
      v7 = (char *)((int (*)(void))v1->m_pkStoreNameInputEdit->vfptr[113].__vecDelDtor)();
      memcpy(v1->signboard.signboard, v7, strlen(v7));
      GameFrameWork::NcBoothOpenReq((GameFrameWork *)v1->m_pkFrameWork, 1);
    }
  }
  else if ( PrivateStoreWin::ms_uiPrivateStoreMode )
  {
    if ( PrivateStoreWin::ms_uiPrivateStoreMode == 3 )
    {
      if ( !(unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[20].Deaffect)() )
      {
        if ( v1->m_bPrivateStoreOpen )
        {
LABEL_4:
          GameFrameWork::NcBoothInterioStartReq((GameFrameWork *)v1->m_pkFrameWork);
          return;
        }
        bItemOka = 0;
        nTotalNeedMoney = 0i64;
        v9 = (ItemIcon **)v1->m_apkInvWin;
        v15 = 20;
        do
        {
          v10 = *v9;
          if ( ItemIcon::GetItem(*v9) )
          {
            bItemOka = 1;
            nTotalNeedMoney += LOWORD(v10[1].m_uiMaxSize) * *(_QWORD *)&v10[1].m_ppkExtra;
          }
          ++v9;
          --v15;
        }
        while ( v15 );
        if ( nTotalNeedMoney > (signed __int64)User::GetMoney(&g_kUser) )
        {
          v5 = (char *)TextData::Get(0x304F413Du);
          goto LABEL_12;
        }
        if ( bItemOka )
        {
          v11 = (char *)((int (*)(void))v1->m_pkStoreNameInputEdit->vfptr[113].__vecDelDtor)();
          if ( TextFilterTable::IsBadName(v11) )
            goto LABEL_11;
          *(_DWORD *)&v1->signboard.signboard[0] = 0;
          v12 = (int)&v1->signboard;
          *(_DWORD *)(v12 + 4) = 0;
          *(_DWORD *)(v12 + 8) = 0;
          *(_DWORD *)(v12 + 12) = 0;
          *(_DWORD *)(v12 + 16) = 0;
          *(_DWORD *)(v12 + 20) = 0;
          *(_DWORD *)(v12 + 24) = 0;
          *(_WORD *)(v12 + 28) = 0;
          v13 = (char *)((int (*)(void))v1->m_pkStoreNameInputEdit->vfptr[113].__vecDelDtor)();
          if ( v13 )
            memcpy(v1->signboard.signboard, v13, strlen(v13));
          GameFrameWork::NcBoothOpenReq((GameFrameWork *)v1->m_pkFrameWork, 0);
        }
      }
    }
    else if ( PrivateStoreWin::ms_uiPrivateStoreMode == 2 )
    {
      ((void (__stdcall *)(_DWORD))this->m_pkOk->vfptr[60].__vecDelDtor)(0);
      CNSTimer_Interval::ReSet(&v1->m_kEnableReflashButTimer, Timer::ms_fCurTime);
      v1->m_kEnableReflashButTimer.m_fCheckTime = 1.0;
      GameFrameWork::NcBoothReflashReq((GameFrameWork *)v1->m_pkFrameWork, PrivateStoreWin::ms_BoothHandle);
    }
  }
  else
  {
    ((void (__stdcall *)(_DWORD))this->m_pkOk->vfptr[60].__vecDelDtor)(0);
    CNSTimer_Interval::ReSet(&v1->m_kEnableReflashButTimer, Timer::ms_fCurTime);
    v8 = (GameFrameWork *)v1->m_pkFrameWork;
    v1->m_kEnableReflashButTimer.m_fCheckTime = 1.0;
    GameFrameWork::NcBoothReflashReq(v8, PrivateStoreWin::ms_BoothHandle);
  }
}
// A71180: using guessed type unsigned int PrivateStoreWin::ms_uiPrivateStoreMode;
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8D480: using guessed type unsigned __int16 PrivateStoreWin::ms_BoothHandle;

//----- (00574BB0) --------------------------------------------------------
void __thiscall PrivateStoreWin::SetPrivateStoreOpen(PrivateStoreWin *this, bool bRes)
{
  PrivateStoreWin *v2; // esi@1
  bool v3; // bl@2
  NiRefObjectVtbl *v4; // edi@7
  NiUnsharedGeometryGroup *v5; // eax@7
  ItemIcon **v6; // edi@10
  signed int v7; // ebx@10
  unsigned int v8; // eax@12
  InvWin *v9; // eax@13
  NiRefObjectVtbl *v10; // edi@23
  NiUnsharedGeometryGroup *v11; // eax@23
  ItemIcon **v12; // edi@26
  signed int v13; // ebx@26
  unsigned int v14; // eax@28
  InvWin *v15; // eax@29
  NiRefObjectVtbl *v16; // edi@33
  NiUnsharedGeometryGroup *v17; // eax@33
  InventoryWin *pInvenWin; // [sp+Ch] [bp-4h]@10
  InventoryWin *pInvenWina; // [sp+Ch] [bp-4h]@26

  v2 = this;
  if ( PrivateStoreWin::ms_uiPrivateStoreMode == 1 )
  {
    v3 = bRes;
    if ( bRes )
    {
      this->i64PrivateStoreStartMyMoney = User::GetMoney(&g_kUser);
      InventoryWin::ms_uiMode = 0;
      EditWin::SetEnable(v2->m_pkStoreNameInputEdit, 0);
      ((void (__stdcall *)(_DWORD))v2->m_pkCopperText->vfptr[118].__vecDelDtor)("0");
      ((void (__stdcall *)(_DWORD))v2->m_pkSilverText->vfptr[118].__vecDelDtor)("0");
      ((void (__stdcall *)(_DWORD))v2->m_pkGoldText->vfptr[118].__vecDelDtor)("0");
      ((void (__stdcall *)(_DWORD))v2->m_pkGemText->vfptr[118].__vecDelDtor)("0");
      InventoryWin::LockAllItem((InventoryWin *)v2->m_pkFrameWork[19].m_BackFrameID);
    }
    else
    {
      InventoryWin::UnLockAllItem((InventoryWin *)this->m_pkFrameWork[19].m_BackFrameID);
    }
    ((void (__stdcall *)(_DWORD))v2->m_pkOk->vfptr[60].__vecDelDtor)(1);
    if ( !v2->m_bPrivateStoreOpen && bRes == 1 )
    {
      v4 = v2->m_pkOkTextWin->vfptr;
      v5 = TextData2::Get(0xEEC4C250);
      v4[118].__vecDelDtor((NiRefObject *)v2->m_pkOkTextWin, (unsigned int)v5);
    }
    ((void (__stdcall *)(_DWORD))v2->m_pkRegulateModeText->vfptr[64].__vecDelDtor)(0);
    if ( v2->m_bPrivateStoreOpen != 1 || bRes )
      goto LABEL_34;
    pInvenWin = (InventoryWin *)v2->m_pkFrameWork[19].m_BackFrameID;
    v6 = (ItemIcon **)v2->m_apkInvWin;
    v7 = 20;
    do
    {
      if ( ItemIcon::GetItem(*v6) )
      {
        v8 = (unsigned int)(*v6)[1].m_pcName;
        if ( v8 < 0xC0 )
          v9 = pInvenWin->m_apkInvWin[v8];
        else
          v9 = 0;
        InvWin::SetLock(v9, 1);
      }
      ++v6;
      --v7;
    }
    while ( v7 );
    goto LABEL_33;
  }
  if ( PrivateStoreWin::ms_uiPrivateStoreMode != 3 )
    return;
  v3 = bRes;
  if ( bRes )
  {
    this->i64PrivateStoreStartMyMoney = User::GetMoney(&g_kUser);
    InventoryWin::ms_uiMode = 0;
    EditWin::SetEnable(v2->m_pkStoreNameInputEdit, 0);
    ((void (__stdcall *)(_DWORD))v2->m_pkCopperText->vfptr[118].__vecDelDtor)("0");
    ((void (__stdcall *)(_DWORD))v2->m_pkSilverText->vfptr[118].__vecDelDtor)("0");
    ((void (__stdcall *)(_DWORD))v2->m_pkGoldText->vfptr[118].__vecDelDtor)("0");
    ((void (__stdcall *)(_DWORD))v2->m_pkGemText->vfptr[118].__vecDelDtor)("0");
  }
  InventoryWin::UnLockAllItem((InventoryWin *)v2->m_pkFrameWork[19].m_BackFrameID);
  ((void (__stdcall *)(_DWORD))v2->m_pkOk->vfptr[60].__vecDelDtor)(1);
  if ( !v2->m_bPrivateStoreOpen && bRes == 1 )
  {
    v10 = v2->m_pkOkTextWin->vfptr;
    v11 = TextData2::Get(0xEEC4C250);
    v10[118].__vecDelDtor((NiRefObject *)v2->m_pkOkTextWin, (unsigned int)v11);
  }
  ((void (__stdcall *)(_DWORD))v2->m_pkRegulateModeText->vfptr[64].__vecDelDtor)(0);
  if ( v2->m_bPrivateStoreOpen == 1 && !bRes )
  {
    pInvenWina = (InventoryWin *)v2->m_pkFrameWork[19].m_BackFrameID;
    v12 = (ItemIcon **)v2->m_apkInvWin;
    v13 = 20;
    do
    {
      if ( ItemIcon::GetItem(*v12) )
      {
        v14 = (unsigned int)(*v12)[1].m_pcName;
        if ( v14 < 0xC0 )
          v15 = pInvenWina->m_apkInvWin[v14];
        else
          v15 = 0;
        InvWin::SetLock(v15, 1);
      }
      ++v12;
      --v13;
    }
    while ( v13 );
LABEL_33:
    EditWin::SetEnable(v2->m_pkStoreNameInputEdit, 1);
    v16 = v2->m_pkOkTextWin->vfptr;
    v17 = TextData2::Get(0x31240238u);
    v16[118].__vecDelDtor((NiRefObject *)v2->m_pkOkTextWin, (unsigned int)v17);
    ((void (__stdcall *)(_DWORD))v2->m_pkRegulateModeText->vfptr[64].__vecDelDtor)(1);
    v3 = bRes;
  }
LABEL_34:
  v2->m_bPrivateStoreOpen = v3;
}
// A71180: using guessed type unsigned int PrivateStoreWin::ms_uiPrivateStoreMode;
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (00574F00) --------------------------------------------------------
char __thiscall PrivateStoreWin::DropOnMyInv(PrivateStoreWin *this, DropContents *pkContents, unsigned int uiReceiverInvIndex)
{
  PrivateStoreWin *v3; // esi@1
  DropContents *v4; // ebx@2
  unsigned int v6; // edi@9
  unsigned int v7; // edi@12
  InvWin *v8; // eax@13
  Item *v9; // ebx@15
  ItemInfo *v10; // edi@16
  SHINE_PUT_ON_BELONGED_ITEM v11; // eax@19
  SHINE_PUT_ON_BELONGED_ITEM v12; // eax@22
  SHINE_PUT_ON_BELONGED_ITEM v13; // eax@23
  _DWORD *v14; // eax@26
  int v15; // eax@27
  Item *v16; // eax@30
  unsigned int v17; // eax@31
  InvWin *v18; // eax@31
  GameFrameWork *v19; // edi@31
  char *v20; // ST10_4@31
  char *v21; // eax@31
  Item *v22; // ebx@33
  ItemInfo *v23; // edi@34
  SHINE_PUT_ON_BELONGED_ITEM v24; // eax@37
  SHINE_PUT_ON_BELONGED_ITEM v25; // eax@40
  SHINE_PUT_ON_BELONGED_ITEM v26; // eax@41
  _DWORD *v27; // eax@44
  int v28; // eax@45
  GameFrameWork *v29; // esi@48
  NiUnsharedGeometryGroup *v30; // eax@48
  InvWin *v31; // eax@49
  Item *v32; // eax@49
  Item *v33; // edi@49
  GameFrameWork *v34; // ebx@50
  char *v35; // ST0C_4@50
  unsigned int v36; // eax@50
  unsigned int v37; // [sp-8h] [bp-18h]@11
  unsigned int dwValue; // [sp+8h] [bp-8h]@10
  unsigned int uiSenderInvIndex; // [sp+Ch] [bp-4h]@9

  v3 = this;
  if ( PrivateStoreWin::ms_uiPrivateStoreMode == 3 )
  {
    v4 = pkContents;
    if ( !*(_DWORD *)(*((_DWORD *)pkContents->m_apvParam[0] + 28) + 98) )
      return 0;
  }
  else
  {
    if ( !PrivateStoreWin::ms_uiPrivateStoreMode || PrivateStoreWin::ms_uiPrivateStoreMode == 2 )
      return 0;
    v4 = pkContents;
  }
  if ( this->m_bPrivateStoreOpen || v4->m_eSenderType )
    return 0;
  v6 = v4->m_uiSenderIndex;
  uiSenderInvIndex = v6;
  if ( v6 >= 0x30 )
  {
    ChargedItemList::GetTotalEffectingValue(EE_MOREINVENTORY, &dwValue);
    if ( dwValue + 2 <= v6 / 0x18 )
    {
      v37 = 1704690796;
LABEL_48:
      v29 = (GameFrameWork *)v3->m_pkFrameWork;
      v30 = TextData::Get(v37);
      GameFrameWork::AddSysMsg(v29, (const char *)v30);
      return 0;
    }
  }
  ((void (__stdcall *)(signed int))v3->m_pkStoreNameInputEdit->vfptr[121].__vecDelDtor)(1);
  v7 = uiReceiverInvIndex;
  if ( ItemIcon::GetItem((ItemIcon *)&v3->m_apkInvWin[uiReceiverInvIndex]->vfptr) )
  {
    v8 = InventoryWin::GetInvWin(
           (InventoryWin *)v3->m_pkFrameWork[19].m_BackFrameID,
           v3->m_apkInvWin[uiReceiverInvIndex]->m_uiSenderInvIndex);
    InvWin::SetLock(v8, 0);
  }
  if ( PrivateStoreWin::ms_uiPrivateStoreMode == 1 )
  {
    v9 = (Item *)v4->m_apvParam[0];
    if ( !v9 )
      goto LABEL_30;
    v10 = v9->m_pkInfo;
    if ( v10 )
    {
      if ( CItemAuthorityBase::IA_IsDataAccBelonged(&g_kItemAuthority, v10->BT_Inx)
        || CItemAuthorityBase::IA_IsDataChrBelonged(&g_kItemAuthority, v10->BT_Inx) )
      {
        if ( CItemAuthorityBase::IA_IsDataPutOnBelonged(&g_kItemAuthority, v10->BT_Inx) != 1 )
          goto LABEL_20;
        v12 = Item::GetPutOnBelongState(v9);
        if ( CItemAuthorityBase::IA_IsWorkAccBelonged(&g_kItemAuthority, v10->BT_Inx, v12) )
          goto LABEL_20;
        v13 = Item::GetPutOnBelongState(v9);
        if ( CItemAuthorityBase::IA_IsWorkChrBelonged(&g_kItemAuthority, v10->BT_Inx, v13) )
          goto LABEL_20;
      }
      else
      {
        v11 = Item::GetPutOnBelongState(v9);
        if ( !CItemAuthorityBase::IA_CanPlayerTrade(&g_kItemAuthority, v10->BT_Inx, v11) )
          goto LABEL_20;
      }
      if ( CItemAuthorityBase::IA_IsDataPutOnBelonged(&g_kItemAuthority, v10->BT_Inx)
        && Item::GetPutOnBelongState(v9) == 1 )
      {
        goto LABEL_20;
      }
    }
    v14 = (_DWORD *)((int (__thiscall *)(Item *))v9->vfptr[11].__vecDelDtor)(v9);
    if ( !v14 || (v15 = *v14 & 0xFF) == 0 || v15 == 255 )
    {
      v7 = uiReceiverInvIndex;
LABEL_30:
      v16 = Item::Create((SHINE_ITEM_STRUCT *)((char *)pkContents->m_apvParam[0] + 8));
      if ( v16 )
      {
        ItemIcon::SetItem((ItemIcon *)&v3->m_apkInvWin[v7]->vfptr, v16, 1);
        v17 = uiSenderInvIndex;
        v3->m_apkInvWin[v7]->m_uiSenderInvIndex = uiSenderInvIndex;
        v18 = InventoryWin::GetInvWin((InventoryWin *)v3->m_pkFrameWork[19].m_BackFrameID, v17);
        InvWin::SetLock(v18, 1);
        v3->m_uiCurInvIndex = v7;
        v19 = (GameFrameWork *)v3->m_pkFrameWork;
        v20 = (char *)TextData::Get(0x3B609389u);
        v21 = (char *)TextData::Get(0x9B9A90D3);
        GameFrameWork::OnOpenMoneyWin(v19, (PgWin *)&v3->vfptr, 0xFu, 0x10u, v21, v20);
        return 1;
      }
      return 1;
    }
LABEL_47:
    v37 = -1634432127;
    goto LABEL_48;
  }
  if ( PrivateStoreWin::ms_uiPrivateStoreMode == 3 )
  {
    v22 = (Item *)v4->m_apvParam[0];
    if ( v22 )
    {
      v23 = v22->m_pkInfo;
      if ( v23 )
      {
        if ( CItemAuthorityBase::IA_IsDataAccBelonged(&g_kItemAuthority, v23->BT_Inx)
          || CItemAuthorityBase::IA_IsDataChrBelonged(&g_kItemAuthority, v23->BT_Inx) )
        {
          if ( CItemAuthorityBase::IA_IsDataPutOnBelonged(&g_kItemAuthority, v23->BT_Inx) != 1 )
            goto LABEL_20;
          v25 = Item::GetPutOnBelongState(v22);
          if ( CItemAuthorityBase::IA_IsWorkAccBelonged(&g_kItemAuthority, v23->BT_Inx, v25) )
            goto LABEL_20;
          v26 = Item::GetPutOnBelongState(v22);
          if ( CItemAuthorityBase::IA_IsWorkChrBelonged(&g_kItemAuthority, v23->BT_Inx, v26) )
            goto LABEL_20;
        }
        else
        {
          v24 = Item::GetPutOnBelongState(v22);
          if ( !CItemAuthorityBase::IA_CanPlayerTrade(&g_kItemAuthority, v23->BT_Inx, v24) )
          {
            v37 = -2086507545;
            goto LABEL_48;
          }
        }
        if ( CItemAuthorityBase::IA_IsDataPutOnBelonged(&g_kItemAuthority, v23->BT_Inx)
          && Item::GetPutOnBelongState(v22) == 1 )
        {
LABEL_20:
          v37 = -857857511;
          goto LABEL_48;
        }
      }
      v27 = (_DWORD *)((int (__thiscall *)(Item *))v22->vfptr[11].__vecDelDtor)(v22);
      if ( v27 )
      {
        v28 = *v27 & 0xFF;
        if ( v28 )
        {
          if ( v28 != 255 )
            goto LABEL_47;
        }
      }
    }
    v31 = InventoryWin::GetInvWin((InventoryWin *)v3->m_pkFrameWork[19].m_BackFrameID, uiSenderInvIndex);
    InvWin::SetLock(v31, 1);
    v32 = Item::Create((SHINE_ITEM_STRUCT *)((char *)pkContents->m_apvParam[0] + 8));
    v33 = v32;
    if ( v32 )
    {
      ItemIcon::SetItem((ItemIcon *)&v3->m_apkInvWin[uiReceiverInvIndex]->vfptr, v32, 1);
      v3->m_apkInvWin[uiReceiverInvIndex]->m_uiSenderInvIndex = uiSenderInvIndex;
      v3->m_uiCurInvIndex = uiReceiverInvIndex;
      v34 = (GameFrameWork *)v3->m_pkFrameWork;
      v35 = (char *)TextData::Get(0x37494293u);
      v36 = ((int (__thiscall *)(Item *))v33->vfptr[4].__vecDelDtor)(v33);
      GameFrameWork::OnOpenDivideWin(v34, (PgWin *)&v3->vfptr, 5u, v36, v35, 0);
    }
  }
  return 1;
}
// A71180: using guessed type unsigned int PrivateStoreWin::ms_uiPrivateStoreMode;

//----- (00575340) --------------------------------------------------------
void __thiscall PrivateStoreWin::OnBuyMoneyOK(PrivateStoreWin *this)
{
  PrivateStoreWin *v1; // esi@1
  unsigned int v2; // ebx@2
  unsigned int v3; // edi@2
  unsigned __int16 iGold; // ST58_2@2
  char *v5; // eax@3
  unsigned int v6; // eax@3
  InvWin *v7; // eax@4
  PrivateStoreInvWin *v8; // esi@6
  int iCopper; // ST50_4@7
  int iSilver; // ST54_4@7
  int v11; // ST58_4@7
  int v12; // eax@7

  v1 = this;
  if ( ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[this->m_uiCurInvIndex]->vfptr) )
  {
    v2 = HIDWORD(MoneyWin::i64Money);
    v3 = MoneyWin::i64Money;
    iGold = v1->m_apkInvWin[v1->m_uiCurInvIndex]->m_BuySloatItemCount;
    if ( (signed __int64)(iGold * __PAIR__(v2, v3)) <= (signed __int64)User::GetMoney(&g_kUser) )
    {
      iCopper = User::GetCopper(__PAIR__(v2, v3));
      iSilver = User::GetSilver(__PAIR__(v2, v3));
      v11 = User::GetGold(__PAIR__(v2, v3));
      v12 = User::GetGem(__PAIR__(v2, v3));
      v1->m_apkInvWin[v1->m_uiCurInvIndex]->i64SellMoney = User::ConvertMoney(iCopper, iSilver, v11, v12);
    }
    else
    {
      v5 = (char *)TextData::Get(0x304F413Du);
      MsgBox::Modeless(MSGBOX_OK, v5);
      v6 = v1->m_apkInvWin[v1->m_uiCurInvIndex]->m_uiSenderInvIndex;
      if ( v6 < 0xC0 )
        v7 = (InvWin *)*((_DWORD *)v1->m_pkFrameWork[19].m_BackFrameID + v6 + 87);
      else
        v7 = 0;
      InvWin::SetLock(v7, 0);
      ItemIcon::SetItem((ItemIcon *)&v1->m_apkInvWin[v1->m_uiCurInvIndex]->vfptr, 0, 1);
      v8 = v1->m_apkInvWin[v1->m_uiCurInvIndex];
      LODWORD(v8->i64SellMoney) = 0;
      HIDWORD(v8->i64SellMoney) = 0;
    }
  }
}

//----- (005754B0) --------------------------------------------------------
void __thiscall PrivateStoreWin::SetPrivateStoreMode(PrivateStoreWin *this, unsigned int uiMode)
{
  PrivateStoreWin *v2; // esi@1
  NiRefObjectVtbl *v3; // edi@2
  NiUnsharedGeometryGroup *v4; // eax@2
  NiRefObjectVtbl *v5; // edi@2
  NiUnsharedGeometryGroup *v6; // eax@2
  NiRefObjectVtbl *v7; // edi@2
  NiUnsharedGeometryGroup *v8; // eax@2
  NiRefObjectVtbl *v9; // edi@2
  NiUnsharedGeometryGroup *v10; // eax@2
  signed int v11; // edi@2
  IconWin **v12; // esi@2
  void *(__thiscall *v13)(NiRefObject *, unsigned int); // eax@3
  NiRefObjectVtbl *v14; // edi@9
  NiUnsharedGeometryGroup *v15; // eax@9
  NiRefObjectVtbl *v16; // edi@9
  NiUnsharedGeometryGroup *v17; // eax@9
  NiRefObjectVtbl *v18; // edi@9
  NiUnsharedGeometryGroup *v19; // eax@9
  NiRefObjectVtbl *v20; // edi@9
  NiUnsharedGeometryGroup *v21; // eax@9
  IconWin **v22; // esi@9
  signed int v23; // edi@9
  NiRefObjectVtbl *v24; // edi@13
  NiUnsharedGeometryGroup *v25; // eax@13
  NiRefObjectVtbl *v26; // edi@13
  NiUnsharedGeometryGroup *v27; // eax@13
  NiRefObjectVtbl *v28; // edi@13
  NiUnsharedGeometryGroup *v29; // eax@13
  signed int v30; // edi@13
  IconWin **v31; // esi@13
  void *(__thiscall *v32)(NiRefObject *, unsigned int); // eax@14
  NiRefObjectVtbl *v33; // edi@20
  NiUnsharedGeometryGroup *v34; // eax@20
  NiRefObjectVtbl *v35; // edi@20
  NiUnsharedGeometryGroup *v36; // eax@20
  NiRefObjectVtbl *v37; // edi@20
  NiUnsharedGeometryGroup *v38; // eax@20
  IconWin **v39; // esi@20
  signed int v40; // edi@20

  v2 = this;
  PrivateStoreWin::ms_uiPrivateStoreMode = uiMode;
  if ( uiMode == 1 )
  {
    ((void (__stdcall *)(_DWORD))this->m_pkTitleText->vfptr[117].__vecDelDtor)(&Color::m_kDxGreenColor);
    v3 = v2->m_pkTitleText->vfptr;
    v4 = TextData::Get(0xF5D4F4D7);
    v3[118].__vecDelDtor((NiRefObject *)v2->m_pkTitleText, (unsigned int)v4);
    EditWin::SetEnable(v2->m_pkStoreNameInputEdit, 1);
    v5 = v2->m_pkStoreNameInputEdit->vfptr;
    v6 = TextData2::Get(0x65A68581u);
    v5[116].__vecDelDtor((NiRefObject *)v2->m_pkStoreNameInputEdit, (unsigned int)v6);
    ((void (__stdcall *)(_DWORD))v2->m_pkText2->vfptr[64].__vecDelDtor)(0);
    v7 = v2->m_pkMoneyText->vfptr;
    v8 = TextData::Get(0x4D427C91u);
    v7[118].__vecDelDtor((NiRefObject *)v2->m_pkMoneyText, (unsigned int)v8);
    ((void (__stdcall *)(_DWORD))v2->m_pkMoneyText->vfptr[64].__vecDelDtor)(1);
    v9 = v2->m_pkOkTextWin->vfptr;
    v10 = TextData::Get(0x385F4540u);
    v9[118].__vecDelDtor((NiRefObject *)v2->m_pkOkTextWin, (unsigned int)v10);
    v11 = 0;
    v12 = (IconWin **)v2->m_apkInvWin;
    do
    {
      v13 = v12[20]->vfptr[64].__vecDelDtor;
      if ( v11 >= PrivateStoreWin::ms_byBoothSize )
      {
        ((void (__stdcall *)(_DWORD))v13)(0);
        (*v12)->m_bDroppable = 0;
        IconWin::ShowFocus(*v12, 0);
      }
      else
      {
        ((void (__stdcall *)(_DWORD))v13)(1);
        (*v12)->m_bDroppable = 1;
        IconWin::ShowFocus(*v12, 1);
      }
      ++v11;
      ++v12;
    }
    while ( v11 < 20 );
  }
  else if ( uiMode )
  {
    if ( uiMode == 3 )
    {
      ((void (__stdcall *)(_DWORD))this->m_pkTitleText->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
      v24 = v2->m_pkTitleText->vfptr;
      v25 = TextData::Get(0xA9E104C6);
      v24[118].__vecDelDtor((NiRefObject *)v2->m_pkTitleText, (unsigned int)v25);
      EditWin::SetEnable(v2->m_pkStoreNameInputEdit, 1);
      v26 = v2->m_pkStoreNameInputEdit->vfptr;
      v27 = TextData2::Get(0xAAE2DED2);
      v26[116].__vecDelDtor((NiRefObject *)v2->m_pkStoreNameInputEdit, (unsigned int)v27);
      ((void (__stdcall *)(_DWORD))v2->m_pkText2->vfptr[64].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v2->m_pkMoneyText->vfptr[118].__vecDelDtor)(&unk_99D05D);
      ((void (__stdcall *)(_DWORD))v2->m_pkMoneyText->vfptr[64].__vecDelDtor)(0);
      v28 = v2->m_pkOkTextWin->vfptr;
      v29 = TextData::Get(0x385F4540u);
      v28[118].__vecDelDtor((NiRefObject *)v2->m_pkOkTextWin, (unsigned int)v29);
      v30 = 0;
      v31 = (IconWin **)v2->m_apkInvWin;
      do
      {
        v32 = v31[20]->vfptr[64].__vecDelDtor;
        if ( v30 >= PrivateStoreWin::ms_byBoothSize )
        {
          ((void (__stdcall *)(_DWORD))v32)(0);
          (*v31)->m_bDroppable = 0;
          IconWin::ShowFocus(*v31, 0);
        }
        else
        {
          ((void (__stdcall *)(_DWORD))v32)(1);
          (*v31)->m_bDroppable = 1;
          IconWin::ShowFocus(*v31, 1);
        }
        ++v30;
        ++v31;
      }
      while ( v30 < 20 );
    }
    else if ( uiMode == 2 )
    {
      ((void (__stdcall *)(_DWORD))this->m_pkTitleText->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
      v33 = v2->m_pkTitleText->vfptr;
      v34 = TextData::Get(0xA9E104C6);
      v33[118].__vecDelDtor((NiRefObject *)v2->m_pkTitleText, (unsigned int)v34);
      EditWin::SetEnable(v2->m_pkStoreNameInputEdit, 0);
      ((void (__stdcall *)(_DWORD))v2->m_pkText2->vfptr[64].__vecDelDtor)(1);
      v35 = v2->m_pkText2->vfptr;
      v36 = TextData::Get(0xEEF50750);
      v35[118].__vecDelDtor((NiRefObject *)v2->m_pkText2, (unsigned int)v36);
      ((void (__stdcall *)(_DWORD))v2->m_pkMoneyText->vfptr[118].__vecDelDtor)(&unk_99D05E);
      ((void (__stdcall *)(_DWORD))v2->m_pkMoneyText->vfptr[64].__vecDelDtor)(0);
      v37 = v2->m_pkOkTextWin->vfptr;
      v38 = TextData::Get(0xDC41502D);
      v37[118].__vecDelDtor((NiRefObject *)v2->m_pkOkTextWin, (unsigned int)v38);
      v39 = (IconWin **)v2->m_apkInvWin;
      v40 = 20;
      do
      {
        ((void (__stdcall *)(_DWORD))v39[20]->vfptr[64].__vecDelDtor)(1);
        (*v39)->m_bDroppable = 1;
        IconWin::ShowFocus(*v39, 1);
        ++v39;
        --v40;
      }
      while ( v40 );
    }
  }
  else
  {
    ((void (__stdcall *)(_DWORD))this->m_pkTitleText->vfptr[117].__vecDelDtor)(&Color::m_kDxGreenColor);
    v14 = v2->m_pkTitleText->vfptr;
    v15 = TextData::Get(0xF5D4F4D7);
    v14[118].__vecDelDtor((NiRefObject *)v2->m_pkTitleText, (unsigned int)v15);
    EditWin::SetEnable(v2->m_pkStoreNameInputEdit, 0);
    v16 = v2->m_pkText2->vfptr;
    v17 = TextData::Get(0xE3F7DDDB);
    v16[118].__vecDelDtor((NiRefObject *)v2->m_pkText2, (unsigned int)v17);
    ((void (__stdcall *)(_DWORD))v2->m_pkText2->vfptr[64].__vecDelDtor)(1);
    v18 = v2->m_pkMoneyText->vfptr;
    v19 = TextData::Get(0x3C969088u);
    v18[118].__vecDelDtor((NiRefObject *)v2->m_pkMoneyText, (unsigned int)v19);
    ((void (__stdcall *)(_DWORD))v2->m_pkMoneyText->vfptr[64].__vecDelDtor)(1);
    v20 = v2->m_pkOkTextWin->vfptr;
    v21 = TextData::Get(0xDC41502D);
    v20[118].__vecDelDtor((NiRefObject *)v2->m_pkOkTextWin, (unsigned int)v21);
    v22 = (IconWin **)v2->m_apkInvWin;
    v23 = 20;
    do
    {
      ((void (__stdcall *)(_DWORD))v22[20]->vfptr[64].__vecDelDtor)(1);
      (*v22)->m_bDroppable = 1;
      IconWin::ShowFocus(*v22, 1);
      ++v22;
      --v23;
    }
    while ( v23 );
  }
}
// A71180: using guessed type unsigned int PrivateStoreWin::ms_uiPrivateStoreMode;
// A71184: using guessed type unsigned __int8 PrivateStoreWin::ms_byBoothSize;

//----- (00575950) --------------------------------------------------------
void __thiscall PrivateStoreWin::OnInputBuyItemCount(PrivateStoreWin *this, unsigned int uiBuyLot)
{
  PrivateStoreWin *v2; // esi@1
  unsigned int v3; // ecx@2
  unsigned int v4; // eax@3
  InvWin *v5; // ecx@4
  PrivateStoreInvWin *v6; // edi@7
  NiRefObjectVtbl **v7; // edx@7
  NiRefObjectVtbl *v8; // ebx@7
  char *v9; // eax@7
  GameFrameWork *v10; // edi@7
  char *v11; // ST10_4@7
  char *v12; // eax@7

  v2 = this;
  if ( ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[this->m_uiCurInvIndex]->vfptr) )
  {
    v3 = v2->m_uiCurInvIndex;
    if ( uiBuyLot )
    {
      v6 = v2->m_apkInvWin[v3];
      v7 = &v6->m_pkLotText->vfptr;
      v6->m_BuySloatItemCount = uiBuyLot;
      v8 = *v7;
      v9 = fs("%d", uiBuyLot);
      v8[118].__vecDelDtor((NiRefObject *)v6->m_pkLotText, (unsigned int)v9);
      v10 = (GameFrameWork *)v2->m_pkFrameWork;
      v11 = (char *)TextData::Get(0x90A2F2E2);
      v12 = (char *)TextData::Get(0x8CAB9C90);
      GameFrameWork::OnOpenMoneyWin(v10, (PgWin *)&v2->vfptr, 0x11u, 0x12u, v12, v11);
    }
    else
    {
      v4 = v2->m_apkInvWin[v3]->m_uiSenderInvIndex;
      if ( v4 < 0xC0 )
        v5 = (InvWin *)*((_DWORD *)v2->m_pkFrameWork[19].m_BackFrameID + v4 + 87);
      else
        v5 = 0;
      InvWin::SetLock(v5, 0);
      ItemIcon::SetItem((ItemIcon *)&v2->m_apkInvWin[v2->m_uiCurInvIndex]->vfptr, 0, 1);
    }
  }
}

//----- (00575A40) --------------------------------------------------------
char __thiscall PrivateStoreInvWin::EatDropInstance(PrivateStoreInvWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  PrivateStoreInvWin *v4; // esi@1
  DropContents *v6; // edi@3
  void *v7; // ecx@4
  NiUnsharedGeometryGroup *v8; // eax@6
  int v9; // esi@7
  NiUnsharedGeometryGroup *v10; // edi@7
  DropContents::SenderType v11; // eax@13
  PrivateStoreWin *v12; // eax@16

  v4 = this;
  if ( !*pkDrop )
    return 0;
  v6 = (DropContents *)(*pkDrop)->m_pkContents;
  if ( PrivateStoreWin::ms_uiPrivateStoreMode == 3 )
  {
    v7 = v6->m_apvParam[0];
    if ( !v7 || (unsigned __int8)(*(int (**)(void))(*(_DWORD *)v7 + 4))() == 24 )
      goto LABEL_21;
  }
  if ( v6->m_eType )
    goto LABEL_21;
  v11 = v6->m_eSenderType;
  if ( v11 == 21 )
  {
    v8 = TextData2::Get(0x95F0EBD5);
    goto LABEL_7;
  }
  if ( v11 )
    goto LABEL_21;
  v12 = (PrivateStoreWin *)PgWin::GetParentWin((PgWin *)&v4->vfptr);
  if ( v4->m_uiInvType )
    return 0;
  if ( !PrivateStoreWin::DropOnMyInv(v12, v6, v4->m_uiInvIndex) )
  {
LABEL_21:
    v8 = TextData::Get(0x83A26BE7);
LABEL_7:
    v9 = (int)&v4->vfptr;
    v10 = v8;
    if ( *(_DWORD *)(v9 + 4) )
    {
      (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v9 + 4) + 4))(25, v8, v9);
      if ( *(_DWORD *)(v9 + 4) )
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v9 + 4) + 20))(25, v10, v9);
    }
    (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v9 + 20))(v9, 25, v10, v9);
    return 0;
  }
  return 1;
}
// A71180: using guessed type unsigned int PrivateStoreWin::ms_uiPrivateStoreMode;

//----- (00575B20) --------------------------------------------------------
void __thiscall PrivateStoreWin::OnCommand(PrivateStoreWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0xCu:
      PrivateStoreWin::OnCmdOk(this);
      break;
    case 0xDu:
    case 0xEu:
      PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
      break;
    case 0xAu:
      PrivateStoreWin::OnCmdInvLClick(this, lParam);
      break;
    case 0xBu:
      PrivateStoreWin::OnCmdInvRClick(this, lParam);
      break;
    case 0xFu:
      PrivateStoreWin::OnSellMoneyOK(this);
      break;
    case 0x10u:
      PrivateStoreWin::OnSellMoneyCancel(this);
      break;
    case 4u:
      if ( lParam )
        PrivateStoreWin::OnBuyItem(this, lParam);
      break;
    case 5u:
      PrivateStoreWin::OnInputBuyItemCount(this, lParam);
      break;
    case 0x11u:
      PrivateStoreWin::OnBuyMoneyOK(this);
      break;
    case 0x12u:
      PrivateStoreWin::OnBuyMoneyCancel(this);
      break;
    case 0x13u:
      PrivateStoreWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (00575C00) --------------------------------------------------------
PrivateStoreInvWin *__cdecl PrivateStoreInvWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent)
{
  PgWin *v4; // eax@1
  PgWin *v5; // eax@2
  PgWin *v6; // esi@2
  PgWin *v7; // edi@8
  PrivateStoreInvWin *v8; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v10; // [sp+20h] [bp-4h]@1

  v4 = (PgWin *)operator new(0x1E0u);
  result.m_pObject = v4;
  v10 = 0;
  if ( v4 )
  {
    PrivateStoreInvWin::PrivateStoreInvWin((PrivateStoreInvWin *)v4);
    v6 = v5;
  }
  else
  {
    v6 = 0;
  }
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v10 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v6);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, PgWin *))v6->vfptr[154].__vecDelDtor)(
                          v6,
                          iXPos,
                          iYPos,
                          uiInvIndex,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v6->vfptr[89].__vecDelDtor)(v6);
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = (PrivateStoreInvWin *)v6;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v6);
    if ( result.m_pObject )
    {
      v7 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      }
    }
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = 0;
  }
  return v8;
}

//----- (00575D40) --------------------------------------------------------
PrivateStoreWin *__cdecl PrivateStoreWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  PrivateStoreWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x2A8u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    PrivateStoreWin::PrivateStoreWin((PrivateStoreWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (PrivateStoreWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00575E70) --------------------------------------------------------
char __thiscall PrivateStoreWin::Create(PrivateStoreWin *this, PgFrameWork *pkFrameWork)
{
  PrivateStoreWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  const char *v6; // eax@9
  PgSprData *v7; // eax@10
  int v8; // ebx@11
  NiSourceTexture *v9; // eax@11
  PgSprData *v10; // eax@12
  PgSprData *v11; // eax@14
  PgSprData *v12; // eax@16
  PgWinSpr *v13; // eax@16
  PgFont *v14; // eax@17
  PgWinText *v15; // eax@17
  NiUnsharedGeometryGroup *v16; // eax@17
  PgFont *v17; // eax@18
  NiUnsharedGeometryGroup *v18; // eax@18
  PgSprData *v19; // eax@21
  EditWin *v20; // eax@21
  PgSprData *v21; // eax@22
  PgWinSpr *v22; // eax@22
  char *v23; // eax@22
  NiRefObjectVtbl *v24; // eax@22
  PgSprData *v25; // ecx@22
  bool v26; // zf@22
  bool v27; // sf@22
  unsigned __int8 v28; // of@22
  PgSprData *v29; // ecx@22
  IconWin **v30; // eax@23
  PgFont *v31; // eax@26
  PgWinText *v32; // eax@26
  NiUnsharedGeometryGroup *v33; // eax@26
  PgFont *v34; // eax@27
  PgWinText *v35; // eax@27
  NiUnsharedGeometryGroup *v36; // eax@27
  PgFont *v37; // eax@28
  PgWinText *v38; // eax@28
  NiUnsharedGeometryGroup *v39; // eax@28
  NiPointer<PgSprData::PgHitTester> *v40; // ecx@28
  int v41; // eax@28
  PgFont *v42; // eax@28
  PgWinText *v43; // eax@28
  NiUnsharedGeometryGroup *v44; // eax@28
  NiPointer<PgSprData::PgHitTester> *v45; // ecx@28
  int v46; // eax@28
  PgFont *v47; // eax@28
  PgWinText *v48; // ebx@28
  NiUnsharedGeometryGroup *v49; // eax@28
  D3DXCOLOR v50; // ST58_16@28
  D3DXCOLOR v51; // ST58_16@28
  D3DXCOLOR v52; // ST58_16@28
  D3DXCOLOR v53; // ST58_16@28
  UIUtil ui; // [sp+84h] [bp-6Ch]@18
  unsigned int uiWidth; // [sp+98h] [bp-58h]@16
  unsigned int uiHeight; // [sp+9Ch] [bp-54h]@16
  unsigned int v57; // [sp+A0h] [bp-50h]@22
  int i; // [sp+A4h] [bp-4Ch]@7
  int iOffY; // [sp+A8h] [bp-48h]@11
  PgSprData *pkSprData; // [sp+ACh] [bp-44h]@14
  int uiTop; // [sp+B0h] [bp-40h]@10
  int uiLeft; // [sp+B4h] [bp-3Ch]@10
  NiPointer<NiNode> spNode; // [sp+B8h] [bp-38h]@1
  char acShapeName[33]; // [sp+BCh] [bp-34h]@22
  int v65; // [sp+ECh] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v65 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  if ( !v3 )
    goto LABEL_31;
  i = (int)pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = Folder::Merge(&Folder::m_acMenu, "Game\\PrivateStore.nif");
  PgUtil::LoadNodeNifFile(v6, &spNode, (NiTexturePalette *)i);
  if ( !spNode.m_pObject )
    return 0;
  v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v7, 0, pkFrameWork, "PrivateStoreWin", 0) )
  {
LABEL_31:
    v4 = spNode.m_pObject;
    v65 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
    return 0;
  }
  v8 = uiLeft;
  iOffY = uiTop;
  v9 = MenuTexMgr::GetTexture(0x13u);
  if ( v9 )
    v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v9);
  else
    v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - iOffY, v10, (PgWin *)&v2->vfptr, 0, 0);
  v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - iOffY, v11, (PgWin *)&v2->vfptr, 0, 0);
  pkSprData = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, v3);
  PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  v2->m_pkCloseBtn = PgWinBut::CreateWin(uiLeft - v8, uiTop - iOffY, pkSprData, (PgWin *)&v2->vfptr, 0xEu, 0, 0);
  i = (int)MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    pkSprData = PgSprData::Create(
                  (NiAVObject *)&spNode.m_pObject->vfptr,
                  "HelpLinkNor",
                  &uiLeft,
                  &uiTop,
                  (NiSourceTexture *)i);
    PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - iOffY, pkSprData, (PgWin *)&v2->vfptr, 0x13u, 0, 0);
  }
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, v3);
  v13 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - iOffY, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "WinTitle",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
    goto LABEL_20;
  v14 = Font::Get(0);
  v15 = PgWinText::CreateWin(uiLeft - v8, uiTop - iOffY + 1, uiWidth, uiHeight, v14, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkTitleText = v15;
  v15->vfptr[122].__vecDelDtor((NiRefObject *)v15, 1u);
  ((void (__stdcall *)(struct D3DXCOLOR *))v2->m_pkTitleText->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
  i = (int)&v2->m_pkTitleText->vfptr[118];
  v16 = TextData::Get(0xF5D4F4D7);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))i)(v2->m_pkTitleText, v16);
  ((void (__stdcall *)(_DWORD))v2->m_pkTitleText->vfptr[60].__vecDelDtor)(0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "StoreName",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
    goto LABEL_20;
  v17 = Font::Get(0);
  i = (int)PgWinText::CreateWin(uiLeft - v8, uiTop - iOffY, uiWidth, uiHeight, v17, (PgWin *)&v2->vfptr, 0, 0);
  pkSprData = (PgSprData *)(*(_DWORD *)i + 472);
  v18 = TextData::Get(0x48443B44u);
  ((void (__thiscall *)(int, NiUnsharedGeometryGroup *))pkSprData->vfptr)(i, v18);
  UIUtil::UIUtil(&ui);
  LOBYTE(v65) = 1;
  UIUtil::SetOffset(&ui, v8, iOffY + 2);
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "StoreNameInput",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
    goto LABEL_32;
  v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "StoreNameInput", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - iOffY, v19, (PgWin *)&v2->vfptr, 0, 0);
  v20 = EditWin::CreateWin(
          uiLeft - v8 + 2,
          uiTop - iOffY + 2,
          uiWidth,
          uiHeight,
          (PgWin *)&v2->vfptr,
          NORMAL,
          0x1Du,
          1u,
          0,
          0,
          1);
  v2->m_pkStoreNameInputEdit = v20;
  EditWin::SetImeStatus(v20, IS_ENGLISH);
  i = 0;
  pkSprData = (PgSprData *)v2->m_apkInvWin;
  do
  {
    v57 = i + 1;
    sprintf(acShapeName, "Slot%03d", i + 1);
    v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, v3);
    v22 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - iOffY, v21, (PgWin *)&v2->vfptr, 0, 0);
    pkSprData->m_akAlphaPropertyData.m_uiGrowBy = (unsigned int)v22;
    v22->m_pkToolTipWin = g_pkToolTipWin;
    v23 = (char *)TextData2::Get(0x614D7B88u);
    PgWin::SetToolTipWinText((PgWin *)pkSprData->m_akAlphaPropertyData.m_uiGrowBy, v23);
    v24 = (NiRefObjectVtbl *)PrivateStoreInvWin::CreateWin(uiLeft - v8 + 1, uiTop - iOffY + 1, i, (PgWin *)&v2->vfptr);
    pkSprData->vfptr = v24;
    ItemIcon::SetItem((ItemIcon *)v24, 0, 1);
    v25 = pkSprData;
    pkSprData->vfptr[113].__vecDelDtor = 0;
    (*((void (__stdcall **)(_DWORD))v25->vfptr->__vecDelDtor + 129))(10);
    (*((void (__stdcall **)(_DWORD))pkSprData->vfptr->__vecDelDtor + 140))(11);
    v28 = __OFSUB__(i, 4);
    v26 = i == 4;
    v27 = i - 4 < 0;
    v29 = pkSprData;
    pkSprData->vfptr[68].__vecDelDtor = (void *(__thiscall *)(NiRefObject *, unsigned int))g_pkItemInfoWin;
    if ( !((unsigned __int8)(v27 ^ v28) | v26) )
    {
      (*(void (__stdcall **)(_DWORD))(*(_DWORD *)v29->m_akAlphaPropertyData.m_uiGrowBy + 256))(0);
      v30 = (IconWin **)pkSprData;
      BYTE2(pkSprData->vfptr[63].__vecDelDtor) = 0;
      IconWin::ShowFocus(*v30, 0);
    }
    pkSprData = (PgSprData *)((char *)pkSprData + 4);
    i = v57;
  }
  while ( (signed int)v57 < 20 );
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "text01", &uiLeft, &uiTop, &uiWidth, &uiHeight)
    || (v31 = Font::Get(0),
        v32 = PgWinText::CreateWin(uiLeft - v8, uiTop - iOffY, uiWidth, uiHeight, v31, (PgWin *)&v2->vfptr, 0, 0),
        v2->m_pkText2 = v32,
        v57 = (unsigned int)&v32->vfptr[118],
        v33 = TextData::Get(0xE3F7DDDB),
        (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))v57)(v2->m_pkText2, v33),
        ((void (__stdcall *)(_DWORD))v2->m_pkText2->vfptr[64].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "text03", &uiLeft, &uiTop, &uiWidth, &uiHeight))
    || (v34 = Font::Get(0),
        v35 = PgWinText::CreateWin(uiLeft - v8, uiTop - iOffY, uiWidth, uiHeight, v34, (PgWin *)&v2->vfptr, 0, 0),
        v2->m_pkRegulateModeText = v35,
        v57 = (unsigned int)&v35->vfptr[118],
        v36 = TextData2::Get(0x3D836EA9u),
        (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))v57)(v2->m_pkRegulateModeText, v36),
        ((void (__stdcall *)(D3DXCOLOR *))v2->m_pkRegulateModeText->vfptr[117].__vecDelDtor)(&Color::m_kDxGreenColor),
        ((void (__stdcall *)(_DWORD))v2->m_pkRegulateModeText->vfptr[64].__vecDelDtor)(0),
        ((void (__stdcall *)(signed int))v2->m_pkRegulateModeText->vfptr[122].__vecDelDtor)(5),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "PriceMy",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight)) )
  {
LABEL_32:
    LOBYTE(v65) = 0;
    UIUtil::~UIUtil(&ui);
LABEL_20:
    v65 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  v37 = Font::Get(0);
  v38 = PgWinText::CreateWin(uiLeft - v8, uiTop - iOffY, uiWidth, uiHeight, v37, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkMoneyText = v38;
  v57 = (unsigned int)&v38->vfptr[118];
  v39 = TextData::Get(0x4D427C91u);
  (*(void (__thiscall **)(_DWORD, _DWORD))v57)(v2->m_pkMoneyText, v39);
  ((void (__stdcall *)(_DWORD))v2->m_pkMoneyText->vfptr[64].__vecDelDtor)(0);
  pkSprData = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "OkNor", &uiLeft, &uiTop, v3);
  PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "OkClick");
  PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "OkOver");
  v2->m_pkOk = PgWinBut::CreateWin(uiLeft - v8, uiTop - iOffY, pkSprData, (PgWin *)&v2->vfptr, 0xCu, 0, 0);
  v40 = pkSprData->m_akHitTester.m_pBase;
  v41 = v40->m_pObject->m_uiWidth;
  v57 = v40->m_pObject->m_uiHeight;
  i = v41;
  v42 = Font::Get(0);
  v43 = PgWinText::CreateWin(uiLeft - v8, uiTop - iOffY, i, v57, v42, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkOkTextWin = v43;
  v43->vfptr[122].__vecDelDtor((NiRefObject *)v43, 5u);
  v57 = (unsigned int)&v2->m_pkOkTextWin->vfptr[118];
  v44 = TextData::Get(0x385F4540u);
  (*(void (__thiscall **)(_DWORD, _DWORD))v57)(v2->m_pkOkTextWin, v44);
  ((void (__stdcall *)(_DWORD))v2->m_pkOkTextWin->vfptr[60].__vecDelDtor)(0);
  pkSprData = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CancelNor", &uiLeft, &uiTop, v3);
  PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "CancelClick");
  PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "CancelOver");
  v2->m_pkCancel = PgWinBut::CreateWin(uiLeft - v8, uiTop - iOffY, pkSprData, (PgWin *)&v2->vfptr, 0xDu, 0, 0);
  v45 = pkSprData->m_akHitTester.m_pBase;
  v46 = v45->m_pObject->m_uiWidth;
  v57 = v45->m_pObject->m_uiHeight;
  i = v46;
  v47 = Font::Get(0);
  v48 = PgWinText::CreateWin(uiLeft - v8, uiTop - iOffY, i, v57, v47, (PgWin *)&v2->vfptr, 0, 0);
  v48->vfptr[122].__vecDelDtor((NiRefObject *)v48, 5u);
  v57 = (unsigned int)&v48->vfptr[118];
  v49 = TextData::Get(0x4D364F8Eu);
  (*(void (__thiscall **)(_DWORD, _DWORD))v57)(v48, v49);
  v48->vfptr[60].__vecDelDtor((NiRefObject *)v48, 0);
  v2->m_pkCopperBtn = UIUtil::CreateBtn(&ui, 0, "CopperBtn01", "CopperBtn01", "CopperBtn01", "CopperBtn01", v3);
  v2->m_pkSilverBtn = UIUtil::CreateBtn(&ui, 0, "SilverBtn01", "SilverBtn01", "SilverBtn01", "SilverBtn01", v3);
  v2->m_pkGoldBtn = UIUtil::CreateBtn(&ui, 0, "GoldBtn01", "GoldBtn01", "GoldBtn01", "GoldBtn01", v3);
  v2->m_pkGemBtn = UIUtil::CreateBtn(&ui, 0, "GemBtn01", "GemBtn01", "GemBtn01", "GemBtn01", v3);
  *(_QWORD *)&v50.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v50.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v2->m_pkCopperText = (PgWinText *)UIUtil::CreateText(&ui, "CopperInput01", &byte_99D013, 0, v50, 6u, v3, 0);
  *(_QWORD *)&v51.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v51.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v2->m_pkSilverText = (PgWinText *)UIUtil::CreateText(&ui, "SilverInput01", &byte_99D02A, 0, v51, 6u, v3, 0);
  *(_QWORD *)&v52.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v52.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v2->m_pkGoldText = (PgWinText *)UIUtil::CreateText(&ui, "GoldInput01", &byte_99D02B, 0, v52, 6u, v3, 0);
  *(_QWORD *)&v53.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v53.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v2->m_pkGemText = (PgWinText *)UIUtil::CreateText(&ui, "GemInput01", &byte_99D032, 0, v53, 6u, v3, 0);
  ((void (__thiscall *)(PrivateStoreWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  CNSTimer_Interval::ReSet(&v2->m_kTimerInterval, Timer::ms_fCurTime);
  v2->m_kTimerInterval.m_fCheckTime = 1.0;
  LOBYTE(v65) = 0;
  UIUtil::~UIUtil(&ui);
  v65 = -1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00576A40) --------------------------------------------------------
PrivateStoreWin *__thiscall PrivateStoreWin::`vector deleting destructor'(PrivateStoreWin *this, unsigned int a2)
{
  PrivateStoreWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&PrivateStoreWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PrivateStoreWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 99D54C: using guessed type void (__thiscall *PrivateStoreWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99D56C: using guessed type int (__thiscall *PrivateStoreWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00576A80) --------------------------------------------------------
PrivateStoreInvWin *__thiscall PrivateStoreInvWin::`vector deleting destructor'(PrivateStoreInvWin *this, unsigned int a2)
{
  PrivateStoreInvWin *v2; // esi@1

  v2 = this;
  PrivateStoreInvWin::~PrivateStoreInvWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00576AB0) --------------------------------------------------------
void __userpurge MaterialItemIcon::SetItemAsMaterial(MaterialItemIcon *this@<ecx>, int a2@<edi>, unsigned int dwNeededMaterialLot, int itemid, unsigned int dwLot)
{
  MaterialItemIcon *v5; // esi@1
  void *(__thiscall *v6)(NiRefObject *, unsigned int); // eax@2
  NiRefObjectVtbl *v7; // edi@5
  char *v8; // eax@5

  v5 = this;
  ItemIcon::SetItemAsID((ItemIcon *)&this->vfptr, a2, itemid);
  if ( v5->m_pkLotText )
  {
    v6 = v5->m_pkLotText->vfptr[116].__vecDelDtor;
    if ( dwLot >= dwNeededMaterialLot )
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v6)(255, 255, 255, 255);
    else
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v6)(255, 0, 0, 255);
    v7 = v5->m_pkLotText->vfptr;
    v8 = fs("%d", dwLot);
    v7[118].__vecDelDtor((NiRefObject *)v5->m_pkLotText, (unsigned int)v8);
    ((void (__stdcall *)(_DWORD))v5->m_pkLotText->vfptr[64].__vecDelDtor)(1);
  }
}

//----- (00576B40) --------------------------------------------------------
bool __thiscall MaterialItemIcon::Create(MaterialItemIcon *this, int iXPos, int iYPos, PgWin *pkParent)
{
  return ItemIcon::Create((ItemIcon *)&this->vfptr, iXPos, iYPos, pkParent) != 0;
}

//----- (00576B60) --------------------------------------------------------
void __thiscall ProductionWin::ProductionWin(ProductionWin *this)
{
  ProductionWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_uiProductableItemCount = 0;
  v1->m_uiProduceItemCount = 0;
  v1->m_eProduceBtnState = 0;
  v1->m_bIsProducing = 0;
  v1->m_bReserved = 0;
  v1->vfptr = (NiRefObjectVtbl *)&ProductionWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ProductionWin::`vftable'{for `IDirectMessenger'};
}
// 99DD1C: using guessed type void (__thiscall *ProductionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99DD3C: using guessed type int (__thiscall *ProductionWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00576BA0) --------------------------------------------------------
void __thiscall ProductionWin::~ProductionWin(ProductionWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ProductionWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ProductionWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 99DD1C: using guessed type void (__thiscall *ProductionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99DD3C: using guessed type int (__thiscall *ProductionWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00576BC0) --------------------------------------------------------
int __cdecl GetNeedExpForProduceSkillGrade(int iLevel)
{
  int result; // eax@2

  switch ( iLevel )
  {
    case 1:
      result = 1000;
      break;
    case 2:
      result = 12000;
      break;
    case 3:
      result = 35000;
      break;
    case 4:
      result = 100000;
      break;
    default:
      result = 0;
      break;
  }
  return result;
}

//----- (00576C10) --------------------------------------------------------
int __cdecl GetProduceSkillGradeByExp(unsigned int dwExp)
{
  int result; // eax@2

  if ( dwExp >= 0x3E8 )
  {
    if ( dwExp >= 0x2EE0 )
    {
      if ( dwExp >= 0x88B8 )
        result = 4 - (dwExp < 0x186A0);
      else
        result = 2;
    }
    else
    {
      result = 1;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00576C50) --------------------------------------------------------
void __thiscall ProductionWin::OnQuit(ProductionWin *this)
{
  PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
}

//----- (00576C80) --------------------------------------------------------
void ProductionWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "ProductWin");
}

//----- (00576CB0) --------------------------------------------------------
void __thiscall ProductionWin::UpdateMeWin(ProductionWin *this, float fCurTime)
{
  ProductionWin *v2; // esi@1
  NiRefObjectVtbl *v3; // edi@3
  char *v4; // eax@3

  v2 = this;
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
    GameFrameWork::UpdateUIScroll(v2->m_pkSkillListWin, v2->m_pkSkillSlideBar);
  v3 = v2->m_pkProduceItemCountText->vfptr;
  v4 = fs("%d", v2->m_uiProduceItemCount);
  v3[118].__vecDelDtor((NiRefObject *)v2->m_pkProduceItemCountText, (unsigned int)v4);
}

//----- (00576D10) --------------------------------------------------------
void __thiscall ProductionWin::OnClose(ProductionWin *this)
{
  char *v1; // esi@2

  if ( this->m_bIsProducing )
  {
    v1 = (char *)&this->vfptr;
    if ( this->m_pkMsgHooker )
    {
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))this->m_pkMsgHooker->vfptr->SendDirectMessage)(35, 0, v1);
      if ( *((_DWORD *)v1 + 1) )
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v1 + 1) + 20))(35, 0, v1);
    }
    (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v1 + 20))(v1, 35, 0, v1);
  }
}

//----- (00576D60) --------------------------------------------------------
unsigned int __cdecl GetProduceSkillExp(TotalMasteryType eType)
{
  unsigned int v1; // ebx@1
  Skill::LearnProdSkillInfo *v2; // eax@2
  unsigned __int16 v3; // di@2
  unsigned int v4; // esi@3
  char *v5; // eax@4
  unsigned int result; // eax@10
  unsigned int totalNum; // [sp+4h] [bp-Ch]@1
  Skill::LearnProdSkillInfo *pkInfo; // [sp+8h] [bp-8h]@2
  unsigned int uiExp; // [sp+Ch] [bp-4h]@1

  v1 = 0;
  totalNum = Skill::GetTotalLearnProductSkill();
  uiExp = 0;
  if ( totalNum )
  {
    do
    {
      v2 = Skill::GetLearnProductSkill(v1);
      v3 = v2->kSkillID;
      pkInfo = v2;
      if ( v2->kSkillID != -1 )
      {
        v4 = 0;
        if ( ITableBase<ProduceInfo,ProduceInfoTable>::GetTotal() )
        {
          while ( 1 )
          {
            v5 = CDataReader::GetRecord((CDataReader *)(ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable + 4), v4);
            if ( *(_WORD *)v5 == v3 )
              break;
            if ( ++v4 >= ITableBase<ProduceInfo,ProduceInfoTable>::GetTotal() )
              goto LABEL_9;
          }
          if ( *(_DWORD *)(v5 + 422) == eType )
            uiExp += pkInfo->kSkillExp;
        }
      }
LABEL_9:
      ++v1;
    }
    while ( v1 < totalNum );
    result = uiExp;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C16C: using guessed type int ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable;

//----- (00576DF0) --------------------------------------------------------
int __cdecl GetProduceSkillGrade(unsigned __int16 id)
{
  ProduceInfo *v1; // eax@1
  int result; // eax@2
  unsigned int v3; // eax@3

  v1 = ProduceInfoTable::GetByID(id);
  if ( !v1 )
    return -1;
  v3 = v1->NeededMasteryGain;
  if ( v3 > 0x2EE0 )
  {
    if ( v3 == 35000 )
    {
      result = 3;
    }
    else
    {
      if ( v3 != 100000 )
        return -1;
      result = 4;
    }
  }
  else if ( v3 == 12000 )
  {
    result = 2;
  }
  else
  {
    if ( v3 )
    {
      if ( v3 == 1000 )
        return 1;
      return -1;
    }
    result = 0;
  }
  return result;
}

//----- (00576E50) --------------------------------------------------------
void __thiscall ProductionWin::ProduceStartCurrentSelected(ProductionWin *this)
{
  ProductionWin *v1; // esi@1
  signed int v2; // edi@1
  bool v3; // zf@5
  NiRefObjectVtbl **v4; // eax@8
  NiRefObjectVtbl *v5; // edi@8
  NiUnsharedGeometryGroup *v6; // eax@8
  int v7; // esi@9
  NiUnsharedGeometryGroup *v8; // edi@9
  unsigned int dwData; // [sp+8h] [bp-8h]@3
  DirectUserMsgBody_StartProducing kBody; // [sp+Ch] [bp-4h]@5

  v1 = this;
  v2 = SlideListWin::GetCurSelIndex(this->m_pkSkillListWin);
  if ( v2 >= 0 && v2 < SlideListWin::GetItemSize(v1->m_pkSkillListWin) )
  {
    SlideListWin::GetData(v1->m_pkSkillListWin, v2, &dwData);
    if ( dwData != -1 )
    {
      if ( Skill::GetLearnProductSkill(dwData) )
      {
        v3 = v1->m_pkMsgHooker == 0;
        kBody.skillID = dwData;
        if ( !v3 )
        {
          ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->SendDirectMessage)(
            34,
            &kBody,
            &v1->vfptr);
          if ( v1->m_pkMsgHooker )
            ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
              34,
              &kBody,
              &v1->vfptr);
        }
        v1->vfptr->DirectDispatchToParent((IDirectMessenger *)&v1->vfptr, 34, &kBody, (IDirectMessenger *)&v1->vfptr);
        v4 = &v1->m_pkProduceBtnText->vfptr;
        v1->m_bIsProducing = 1;
        v5 = *v4;
        v6 = TextData::Get(0xA4B2F8FA);
        v5[118].__vecDelDtor((NiRefObject *)v1->m_pkProduceBtnText, (unsigned int)v6);
        ((void (__stdcall *)(_DWORD))v1->m_pkSkillListWin->vfptr[63].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v1->m_pkSkillSlideBar->vfptr[63].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v1->m_pkSkillSlideBar->vfptr[60].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v1->m_pkProductCountDecBtn->vfptr[60].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v1->m_pkProductCountIncBtn->vfptr[60].__vecDelDtor)(0);
      }
      else
      {
        v7 = (int)&v1->vfptr;
        v8 = TextData::Get(0x2534818Cu);
        if ( *(_DWORD *)(v7 + 4) )
        {
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v7 + 4) + 4))(25, v8, v7);
          if ( *(_DWORD *)(v7 + 4) )
            (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v7 + 4) + 20))(25, v8, v7);
        }
        (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v7 + 20))(v7, 25, v8, v7);
      }
    }
  }
}

//----- (00576FE0) --------------------------------------------------------
void __thiscall ProductionWin::ProduceStop(ProductionWin *this)
{
  ProductionWin *v1; // esi@1
  PgWinText *v2; // eax@1
  NiRefObjectVtbl *v3; // edi@1
  NiUnsharedGeometryGroup *v4; // eax@1

  v1 = this;
  v2 = this->m_pkProduceBtnText;
  this->m_bIsProducing = 0;
  v3 = v2->vfptr;
  v4 = TextData::Get(0xD8FAF1F6);
  v3[118].__vecDelDtor((NiRefObject *)v1->m_pkProduceBtnText, (unsigned int)v4);
  ((void (__stdcall *)(_DWORD))v1->m_pkSkillListWin->vfptr[63].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkSkillSlideBar->vfptr[63].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkSkillSlideBar->vfptr[60].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkProductCountDecBtn->vfptr[60].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkProductCountIncBtn->vfptr[60].__vecDelDtor)(1);
}

//----- (00577070) --------------------------------------------------------
char __thiscall ProductionWin::ProduceComplete(ProductionWin *this)
{
  bool v1; // zf@1
  char result; // al@2

  v1 = this->m_uiProduceItemCount-- == 1;
  if ( v1 )
  {
    ProductionWin::ProduceStop(this);
    result = 0;
  }
  else
  {
    ProductionWin::ProduceStartCurrentSelected(this);
    result = 1;
  }
  return result;
}

//----- (00577090) --------------------------------------------------------
MaterialItemIcon *__cdecl MaterialItemIcon::CreateWin(int iXPos, int iYPos, PgWin *pkParent)
{
  PgWin *v3; // eax@1
  PgWin *v4; // esi@1
  PgWin *v5; // edi@8
  MaterialItemIcon *v6; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x1C0u);
  v4 = v3;
  result.m_pObject = v3;
  v8 = 0;
  if ( v3 )
  {
    ItemIcon::ItemIcon((ItemIcon *)v3);
    v4->vfptr = (NiRefObjectVtbl *)&MaterialItemIcon::`vftable'{for `NiNode'};
    v4->vfptr = (IDirectMessengerVtbl *)&MaterialItemIcon::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v8 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v4);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgWin *))v4->vfptr[153].__vecDelDtor)(
                          v4,
                          iXPos,
                          iYPos,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v4->vfptr[89].__vecDelDtor)(v4);
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = (MaterialItemIcon *)v4;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v4);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = 0;
  }
  return v6;
}
// 99DA90: using guessed type void (__thiscall *MaterialItemIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99DAAC: using guessed type int (__thiscall *MaterialItemIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (005771E0) --------------------------------------------------------
ProductionWin *__cdecl ProductionWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  ProductionWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x21Cu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&ProductionWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&ProductionWin::`vftable'{for `IDirectMessenger'};
    v2[1].m_pkMsgHooker = 0;
    v2[1].m_uiMessageNum = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LOBYTE(v2[1].m_iWidth) = 0;
    LOBYTE(v2[1].m_iHeight) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (ProductionWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 99DD1C: using guessed type void (__thiscall *ProductionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99DD3C: using guessed type int (__thiscall *ProductionWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00577340) --------------------------------------------------------
int __cdecl GetNeededMaterialInfo(ProduceInfo *pkProduceInfo, NeededMaterialInfo *pkMaterialInfo)
{
  signed int v2; // ebx@1
  ItemInfo *v3; // eax@2
  unsigned __int16 v4; // cx@3
  ItemInfo *v5; // eax@4
  unsigned __int16 v6; // cx@5
  ItemInfo *v7; // eax@6
  unsigned __int16 v8; // cx@7
  ItemInfo *v9; // eax@8
  unsigned __int16 v10; // cx@9
  ItemInfo *v11; // eax@10
  unsigned __int16 v12; // cx@11
  ItemInfo *v13; // eax@12
  unsigned __int16 v14; // cx@13
  ItemInfo *v15; // eax@14
  unsigned __int16 v16; // cx@15
  ItemInfo *v17; // eax@16

  v2 = 0;
  if ( pkProduceInfo->Raw0[0] != 45 )
  {
    v3 = ItemInfoTab::GetByInxName(pkProduceInfo->Raw0);
    if ( v3 )
    {
      v4 = v3->ID;
      pkMaterialInfo->pcName = v3->Name;
      pkMaterialInfo->ID = v4;
      pkMaterialInfo->dwQuantity = pkProduceInfo->Quantity0;
      v2 = 1;
      if ( pkProduceInfo->Raw1[0] != 45 )
      {
        v5 = ItemInfoTab::GetByInxName(pkProduceInfo->Raw1);
        if ( v5 )
        {
          v6 = v5->ID;
          pkMaterialInfo[1].pcName = v5->Name;
          pkMaterialInfo[1].ID = v6;
          pkMaterialInfo[1].dwQuantity = pkProduceInfo->Quantity1;
          v2 = 2;
          if ( pkProduceInfo->Raw2[0] != 45 )
          {
            v7 = ItemInfoTab::GetByInxName(pkProduceInfo->Raw2);
            if ( v7 )
            {
              v8 = v7->ID;
              pkMaterialInfo[2].pcName = v7->Name;
              pkMaterialInfo[2].ID = v8;
              pkMaterialInfo[2].dwQuantity = pkProduceInfo->Quantity2;
              v2 = 3;
              if ( pkProduceInfo->Raw3[0] != 45 )
              {
                v9 = ItemInfoTab::GetByInxName(pkProduceInfo->Raw3);
                if ( v9 )
                {
                  v10 = v9->ID;
                  pkMaterialInfo[3].pcName = v9->Name;
                  pkMaterialInfo[3].ID = v10;
                  pkMaterialInfo[3].dwQuantity = pkProduceInfo->Quantity3;
                  v2 = 4;
                  if ( pkProduceInfo->Raw4[0] != 45 )
                  {
                    v11 = ItemInfoTab::GetByInxName(pkProduceInfo->Raw4);
                    if ( v11 )
                    {
                      v12 = v11->ID;
                      pkMaterialInfo[4].pcName = v11->Name;
                      pkMaterialInfo[4].ID = v12;
                      pkMaterialInfo[4].dwQuantity = pkProduceInfo->Quantity4;
                      v2 = 5;
                      if ( pkProduceInfo->Raw5[0] != 45 )
                      {
                        v13 = ItemInfoTab::GetByInxName(pkProduceInfo->Raw5);
                        if ( v13 )
                        {
                          v14 = v13->ID;
                          pkMaterialInfo[5].pcName = v13->Name;
                          pkMaterialInfo[5].ID = v14;
                          pkMaterialInfo[5].dwQuantity = pkProduceInfo->Quantity5;
                          v2 = 6;
                          if ( pkProduceInfo->Raw6[0] != 45 )
                          {
                            v15 = ItemInfoTab::GetByInxName(pkProduceInfo->Raw6);
                            if ( v15 )
                            {
                              v16 = v15->ID;
                              pkMaterialInfo[6].pcName = v15->Name;
                              pkMaterialInfo[6].ID = v16;
                              pkMaterialInfo[6].dwQuantity = pkProduceInfo->Quantity6;
                              v2 = 7;
                              if ( pkProduceInfo->Raw7[0] != 45 )
                              {
                                v17 = ItemInfoTab::GetByInxName(pkProduceInfo->Raw7);
                                if ( v17 )
                                {
                                  pkMaterialInfo[7].ID = v17->ID;
                                  pkMaterialInfo[7].pcName = v17->Name;
                                  pkMaterialInfo[7].dwQuantity = pkProduceInfo->Quantity7;
                                  v2 = 8;
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  return v2;
}

//----- (00577520) --------------------------------------------------------
ItemInfo *__cdecl GetItemNameByInxName(char *pcInxName)
{
  ItemInfo *result; // eax@1

  result = ItemInfoTab::GetByInxName(pcInxName);
  if ( result )
    result = (ItemInfo *)((char *)result + 34);
  return result;
}

//----- (00577540) --------------------------------------------------------
char __cdecl AddProductSkillTextInList(ProduceInfo *pkProduce, SlideListWin *pkListWin, bool bMyGradeIsLow, TotalMasteryType eType)
{
  ProduceInfo *v4; // ebx@1
  ItemInfo *v5; // eax@1
  int v6; // esi@2
  const char *v8; // eax@4
  unsigned int v9; // edi@4
  const char *v10; // eax@4
  int v11; // [sp-Ch] [bp-14h]@8
  int v12; // [sp-8h] [bp-10h]@8
  Skill::LearnProdSkillInfo *pkLearnSkillInfo; // [sp+10h] [bp+8h]@4

  v4 = pkProduce;
  v5 = ItemInfoTab::GetByInxName(pkProduce->Product);
  if ( !v5 )
    return 0;
  v6 = (int)v5->Name;
  if ( v5 == (ItemInfo *)-34 )
    return 0;
  pkLearnSkillInfo = Skill::GetLearnProductSkill(pkProduce->ProductID);
  v8 = fs(off_99D790, v6);
  v9 = SlideListWin::AddText(pkListWin, v8);
  v10 = fs(" %6d", v4->NeededMasteryGain);
  SlideListWin::SetText(pkListWin, v9, 1u, v10);
  if ( bMyGradeIsLow )
    goto LABEL_9;
  if ( !pkLearnSkillInfo )
  {
    if ( GetProduceSkillExp(eType) >= v4->NeededMasteryGain )
    {
      v12 = 128;
      v11 = 255;
LABEL_10:
      SlideListWin::SetFontColor(pkListWin, v9, 255, v11, v12);
      goto LABEL_11;
    }
LABEL_9:
    v12 = 128;
    v11 = 128;
    goto LABEL_10;
  }
  SlideListWin::SetFontColor(pkListWin, v9, 128, 128, 255);
LABEL_11:
  SlideListWin::SetData(pkListWin, v9, v4->ProductID);
  return 1;
}

//----- (00577620) --------------------------------------------------------
unsigned int __cdecl AddProductSkillTextInListByType(TotalMasteryType eType, unsigned int iGrade, SlideListWin *pkListWin, bool bMyGradeIsLow)
{
  unsigned int v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,ProduceInfo *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,ProduceInfo *> >,1> >::_Node *v5; // eax@1
  int v6; // eax@2
  unsigned int v7; // edi@3
  char *v8; // eax@6
  unsigned int v9; // edx@8
  int v10; // ecx@9
  std::_Tree_nod<std::_Tmap_traits<unsigned long,ProduceInfo *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,ProduceInfo *> >,1> >::_Node *v11; // eax@19
  std::_Tree_nod<std::_Tmap_traits<unsigned long,ProduceInfo *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,ProduceInfo *> >,1> >::_Node *i; // esi@19
  std::_Tree_nod<std::_Tmap_traits<unsigned long,ProduceInfo *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,ProduceInfo *> >,1> >::_Node *v13; // eax@23
  std::_Tree_nod<std::_Tmap_traits<unsigned long,ProduceInfo *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,ProduceInfo *> >,1> >::_Node *k; // eax@24
  std::_Tree_nod<std::_Tmap_traits<unsigned long,ProduceInfo *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,ProduceInfo *> >,1> >::_Node *j; // eax@27
  std::_Tree_nod<std::_Tmap_traits<unsigned long,ProduceInfo *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,ProduceInfo *> >,1> >::_Node *v16; // edi@32
  std::_Tree_nod<std::_Tmap_traits<unsigned long,ProduceInfo *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,ProduceInfo *> >,1> >::_Node *v17; // esi@32
  std::_Tree_nod<std::_Tmap_traits<unsigned long,ProduceInfo *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,ProduceInfo *> >,1> >::_Node *v18; // ST08_4@36
  std::multimap<unsigned long,ProduceInfo *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,ProduceInfo *> > > mapPInfo; // [sp+10h] [bp-40h]@1
  std::exception pExceptionObject; // [sp+20h] [bp-30h]@37
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > >,bool> result; // [sp+2Ch] [bp-24h]@16
  std::pair<unsigned int,Effect *> _Val; // [sp+34h] [bp-1Ch]@16
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v24; // [sp+3Ch] [bp-14h]@36
  unsigned int uiAdded; // [sp+40h] [bp-10h]@1
  int v26; // [sp+4Ch] [bp-4h]@2

  v4 = 0;
  uiAdded = 0;
  mapPInfo._Mysize = 0;
  v5 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,ProduceInfo *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,ProduceInfo *> >,1> >::_Node *)operator new(0x18u);
  if ( !v5 )
  {
    v24._Ptr = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&v24);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  mapPInfo._Myhead = v5;
  v5->_Left = v5;
  mapPInfo._Myhead->_Parent = mapPInfo._Myhead;
  mapPInfo._Myhead->_Right = mapPInfo._Myhead;
  mapPInfo._Myhead->_Color = 1;
  mapPInfo._Myhead->_Isnil = 1;
  v6 = *(_DWORD *)(ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable + 56);
  v26 = 0;
  if ( v6 )
    v7 = *(_DWORD *)(v6 + 40);
  else
    v7 = 0;
  if ( v7 > 0 )
  {
    do
    {
      v8 = CDataReader::GetRecord((CDataReader *)(ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable + 4), v4);
      if ( v8 && *(_DWORD *)(v8 + 422) == eType )
      {
        v9 = *(_DWORD *)(v8 + 434);
        if ( v9 >= 0x3E8 )
        {
          if ( v9 >= 0x2EE0 )
            v10 = v9 >= 0x88B8 ? 4 - (v9 < 0x186A0) : 2;
          else
            v10 = 1;
        }
        else
        {
          v10 = 0;
        }
        if ( v10 == iGrade )
        {
          _Val.first = *(_DWORD *)(v8 + 434);
          _Val.second = (Effect *)v8;
          std::_Tree<std::_Tmap_traits<unsigned long,ProduceInfo *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,ProduceInfo *>>,1>>::insert<std::pair<unsigned long const,ProduceInfo *>>(
            (std::_Tree<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > *)&mapPInfo,
            &result,
            &_Val);
        }
      }
      ++v4;
    }
    while ( v4 < v7 );
  }
  if ( mapPInfo._Mysize )
  {
    v11 = mapPInfo._Myhead;
    for ( i = mapPInfo._Myhead->_Left; i != mapPInfo._Myhead; v11 = mapPInfo._Myhead )
    {
      if ( AddProductSkillTextInList(i->_Myval.second, pkListWin, bMyGradeIsLow, eType) )
        ++uiAdded;
      if ( !i->_Isnil )
      {
        v13 = i->_Right;
        if ( v13->_Isnil )
        {
          for ( j = i->_Parent; !j->_Isnil; j = j->_Parent )
          {
            if ( i != j->_Right )
              break;
            i = j;
          }
          i = j;
        }
        else
        {
          i = i->_Right;
          for ( k = v13->_Left; !k->_Isnil; k = k->_Left )
            i = k;
        }
      }
    }
    v16 = v11->_Parent;
    v17 = v11->_Parent;
    if ( !v16->_Isnil )
    {
      do
      {
        std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Erase(
          (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&mapPInfo,
          (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v17->_Right);
        v17 = v17->_Left;
        operator delete(v16);
        v16 = v17;
      }
      while ( !v17->_Isnil );
      v11 = mapPInfo._Myhead;
    }
    v11->_Parent = v11;
    mapPInfo._Myhead->_Left = mapPInfo._Myhead;
    mapPInfo._Myhead->_Right = mapPInfo._Myhead;
    mapPInfo._Mysize = 0;
  }
  v18 = mapPInfo._Myhead->_Left;
  v26 = 1;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&mapPInfo,
    &v24,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >)v18,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >)mapPInfo._Myhead);
  operator delete(mapPInfo._Myhead);
  return uiAdded;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// A8C16C: using guessed type int ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable;

//----- (00577840) --------------------------------------------------------
void __userpurge ProductionWin::SetCurrentProduction(ProductionWin *this@<ecx>, D3DXCOLOR *a2@<edi>, ProduceInfo *pkInfo, bool bFirstTime)
{
  ItemInfo *v4; // eax@1
  unsigned __int16 *v5; // esi@1
  int v6; // edi@2
  int *v7; // eax@4
  int v8; // edi@5
  Item *v9; // eax@6
  ProductionWin *v10; // esi@6
  int v11; // eax@6
  char *v12; // edi@7
  int v13; // ebx@7
  signed int v14; // esi@8
  bool v15; // cf@8
  Item *v16; // ecx@10
  char *v17; // edi@16
  PgWinText **v18; // esi@16
  NiRefObjectVtbl *v19; // ebx@17
  char *v20; // eax@17
  void *(__thiscall *v21)(NiRefObject *, unsigned int); // edx@17
  int v22; // esi@23
  int v23; // edi@23
  int v24; // ebx@26
  ItemIcon **v25; // edi@26
  signed int v26; // esi@26
  int v27; // eax@28
  ItemIcon **v28; // esi@29
  NeededMaterialInfo *v29; // edi@29
  int v30; // ebx@29
  Item *v31; // eax@30
  signed int v32; // esi@32
  char *v33; // ecx@33
  int v34; // edi@33
  D3DXCOLOR *v35; // [sp-4h] [bp-C0h]@2
  int iMaterialCount; // [sp+Ch] [bp-B0h]@6
  int v37; // [sp+10h] [bp-ACh]@2
  int v38; // [sp+10h] [bp-ACh]@16
  ProductionWin *v39; // [sp+14h] [bp-A8h]@1
  NeededMaterialInfo akMaterialInfo[10]; // [sp+18h] [bp-A4h]@6

  v39 = this;
  v4 = ItemInfoTab::GetByInxName(pkInfo->Product);
  v5 = (unsigned __int16 *)v4;
  if ( v4 )
  {
    v35 = a2;
    v6 = ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;
    v37 = v4->ID;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable
                                                          + 16))(
                            ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable,
                            v37) )
    {
      if ( (unsigned __int16)v37 <= *(_WORD *)(v6 + 200) )
      {
        v7 = (int *)(*(_DWORD *)(v6 + 196) + 4 * (unsigned __int16)v37);
        if ( *v7 )
        {
          v8 = *v7;
          if ( *v7 )
          {
            ((void (__stdcall *)(unsigned __int16 *))v39->m_pkProductionName->vfptr[118].__vecDelDtor)(v5 + 17);
            ((void (__stdcall *)(int))v39->m_pkProductionDesc->vfptr[118].__vecDelDtor)(v8 + 380);
            v9 = Item::Create(*v5);
            v10 = v39;
            ItemIcon::SetItem(v39->m_pkProductItemIcon, v9, 1);
            ((void (__stdcall *)(signed int))v39->m_pkProductItemIcon->vfptr[64].__vecDelDtor)(1);
            v11 = GetNeededMaterialInfo(pkInfo, akMaterialInfo);
            iMaterialCount = v11;
            if ( v11 > 0 )
            {
              v12 = (char *)&akMaterialInfo[0].dwOwnedQuantity;
              v13 = v11;
              do
              {
                v14 = 0;
                *(_DWORD *)v12 = 0;
                v15 = 1;
                do
                {
                  if ( v15 )
                  {
                    v16 = g_kInventory.m_aspInv[v14].m_pObject;
                    if ( v16 )
                    {
                      if ( v16->m_kStruct.itemid == *((_WORD *)v12 - 6) )
                      {
                        *(_DWORD *)v12 += ((int (*)(void))v16->vfptr[3].__vecDelDtor)();
                        v11 = iMaterialCount;
                      }
                    }
                  }
                  v15 = (unsigned int)++v14 < 0xC0;
                }
                while ( v14 < 192 );
                v12 += 16;
                --v13;
              }
              while ( v13 );
              v10 = v39;
              if ( v11 > 0 )
              {
                v17 = (char *)&akMaterialInfo[0].dwQuantity;
                v18 = v39->m_pkMaterialLot;
                v38 = v11;
                do
                {
                  ((void (__stdcall *)(_DWORD, D3DXCOLOR *))(*(v18 - 10))->vfptr[118].__vecDelDtor)(
                    *((_DWORD *)v17 - 1),
                    v35);
                  v19 = (*v18)->vfptr;
                  v20 = fs("%d/%d", *((_DWORD *)v17 + 1), *(_DWORD *)v17);
                  ((void (__stdcall *)(char *))v19[118].__vecDelDtor)(v20);
                  v21 = (*(v18 - 10))->vfptr[117].__vecDelDtor;
                  if ( *((_DWORD *)v17 + 1) >= *(_DWORD *)v17 )
                  {
                    ((void (__stdcall *)(D3DXCOLOR *))v21)(&Color::m_kDxWhiteColor);
                    v35 = &Color::m_kDxWhiteColor;
                  }
                  else
                  {
                    ((void (__stdcall *)(D3DXCOLOR *))v21)(&Color::m_kDxRedColor);
                    v35 = &Color::m_kDxRedColor;
                  }
                  ((void (*)(void))(*v18)->vfptr[117].__vecDelDtor)();
                  ++v18;
                  v17 += 16;
                  --v38;
                }
                while ( v38 );
                v10 = v39;
                v11 = iMaterialCount;
              }
            }
            if ( v11 < 10 )
            {
              v22 = (int)&v10->m_pkMaterialLot[v11];
              v23 = 10 - v11;
              do
              {
                (*(void (__stdcall **)(void *))(**(_DWORD **)(v22 - 40) + 472))(&unk_99D7B7);
                (*(void (__stdcall **)(void *))(**(_DWORD **)v22 + 472))(&unk_99D7C6);
                v22 += 4;
                --v23;
              }
              while ( v23 );
              v10 = v39;
            }
            v24 = (int)v10->m_apkMaterialIcon;
            v25 = (ItemIcon **)v10->m_apkMaterialIcon;
            v26 = 10;
            do
            {
              ItemIcon::SetItem(*v25, 0, 1);
              ((void (__stdcall *)(_DWORD))(*v25)->vfptr[64].__vecDelDtor)(0);
              ++v25;
              --v26;
            }
            while ( v26 );
            v27 = iMaterialCount;
            if ( iMaterialCount > 0 )
            {
              v28 = (ItemIcon **)v24;
              v29 = akMaterialInfo;
              v30 = iMaterialCount;
              do
              {
                v31 = Item::Create(v29->ID);
                ItemIcon::SetItem(*v28, v31, 1);
                ((void (__stdcall *)(signed int))(*v28)->vfptr[64].__vecDelDtor)(1);
                ++v28;
                ++v29;
                --v30;
              }
              while ( v30 );
              v27 = iMaterialCount;
            }
            v32 = 999999999;
            if ( v27 > 0 )
            {
              v33 = (char *)&akMaterialInfo[0].dwOwnedQuantity;
              v34 = v27;
              do
              {
                if ( *(_DWORD *)v33 / *((_DWORD *)v33 - 1) < v32 )
                  v32 = *(_DWORD *)v33 / *((_DWORD *)v33 - 1);
                v33 += 16;
                --v34;
              }
              while ( v34 );
            }
            v39->m_uiProductableItemCount = v32;
            if ( bFirstTime )
              v39->m_uiProduceItemCount = v32;
          }
        }
      }
    }
  }
}
// 577840: could not find valid save-restore pair for edi
// A8C298: using guessed type int ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;

//----- (00577B70) --------------------------------------------------------
void __thiscall ProductionWin::RefreshProductSkillList(ProductionWin *this)
{
  ProductionWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  signed int v3; // edi@1
  ProduceViewInfo *v4; // eax@5
  int v5; // edi@13
  unsigned int v6; // eax@13
  unsigned int v7; // ebx@13
  const char *v8; // eax@26
  unsigned int v9; // eax@26
  NiRefObjectVtbl *v10; // edi@26
  char *v11; // eax@26
  void *(__thiscall *v12)(NiRefObject *, unsigned int); // edx@28
  unsigned int v13; // edi@28
  NiUnsharedGeometryGroup *v14; // eax@29
  const char *v15; // eax@29
  unsigned int v16; // ebx@29
  SlideListWin *v17; // ecx@29
  int iSelIndex; // [sp+Ch] [bp-20h]@1
  bool bMyGradeIsLow_4; // [sp+14h] [bp-18h]@29
  unsigned int dwData; // [sp+18h] [bp-14h]@3
  ProduceInfo *pkSelectedInfo; // [sp+1Ch] [bp-10h]@1
  unsigned int v22; // [sp+20h] [bp-Ch]@14
  TotalMasteryType eType; // [sp+24h] [bp-8h]@7
  float fGaugeWidth; // [sp+28h] [bp-4h]@21

  v1 = this;
  v2 = this->m_pkSkillListWin;
  pkSelectedInfo = 0;
  v3 = SlideListWin::GetCurSelIndex(v2);
  iSelIndex = v3;
  if ( v3 >= 0 && v3 < SlideListWin::GetItemSize(v1->m_pkSkillListWin) )
  {
    SlideListWin::GetData(v1->m_pkSkillListWin, v3, &dwData);
    if ( dwData != -1 )
      pkSelectedInfo = ProduceInfoTable::GetByID(dwData);
  }
  SlideListWin::RemoveAllList(v1->m_pkSkillListWin);
  v4 = ProduceViewInfoTable::GetByID(v1->m_kCurrProduceBaseSkillID);
  if ( v4 )
  {
    switch ( v4->MasteryType )
    {
      case 1:
        eType = 1;
        goto LABEL_13;
      case 2:
        eType = 2;
        goto LABEL_13;
      case 0:
        eType = 0;
        goto LABEL_13;
      case 3:
        eType = 3;
        goto LABEL_13;
      case 4:
        eType = 4;
        goto LABEL_13;
      case 5:
        eType = 5;
LABEL_13:
        v5 = (int)v4->Name;
        ((void (__stdcall *)(_DWORD))v1->m_pkProductSkillName->vfptr[118].__vecDelDtor)(v4->Name);
        v6 = GetProduceSkillExp(eType);
        v7 = v6;
        if ( v6 >= 0x3E8 )
        {
          if ( v6 >= 0x2EE0 )
          {
            if ( v6 >= 0x88B8 )
              v22 = 4 - (v6 < 0x186A0);
            else
              v22 = 2;
          }
          else
          {
            v22 = 1;
          }
        }
        else
        {
          v22 = 0;
        }
        switch ( v22 + 1 )
        {
          case 1u:
            LODWORD(fGaugeWidth) = 1000;
            break;
          case 2u:
            LODWORD(fGaugeWidth) = 12000;
            break;
          case 3u:
            LODWORD(fGaugeWidth) = 35000;
            break;
          case 4u:
            LODWORD(fGaugeWidth) = 100000;
            break;
          default:
            fGaugeWidth = 0.0;
            break;
        }
        v8 = fs("%s", v5);
        v9 = SlideListWin::AddText(v1->m_pkSkillListWin, v8);
        SlideListWin::SetData(v1->m_pkSkillListWin, v9, 0xFFFFFFFF);
        v10 = v1->m_pkSkillValue->vfptr;
        v11 = fs("( %d/%d )", v7, fGaugeWidth);
        v10[118].__vecDelDtor((NiRefObject *)v1->m_pkSkillValue, (unsigned int)v11);
        fGaugeWidth = (double)v7 / (double)LODWORD(fGaugeWidth);
        if ( fGaugeWidth > 1.0 )
          fGaugeWidth = 1.0;
        v12 = v1->m_pkLearnGauge->vfptr[117].__vecDelDtor;
        fGaugeWidth = (double)v1->m_uiGaugeWidth * fGaugeWidth;
        ((void (__stdcall *)(_DWORD))v12)((signed __int64)fGaugeWidth);
        v13 = 0;
        break;
      default:
        return;
    }
    while ( 1 )
    {
      LODWORD(fGaugeWidth) = v13 + 1;
      v14 = TextData::Get(0xA2EBECEC);
      v15 = fs("  %d%s", v13 + 1, v14);
      v16 = SlideListWin::AddText(v1->m_pkSkillListWin, v15);
      SlideListWin::SetData(v1->m_pkSkillListWin, v16, 0xFFFFFFFF);
      v17 = v1->m_pkSkillListWin;
      bMyGradeIsLow_4 = v13 > v22;
      if ( v13 > v22 == 1 )
        goto LABEL_32;
      SlideListWin::SetFontColor(v17, v16, 128, 128, 255);
      if ( !AddProductSkillTextInListByType(eType, v13, v1->m_pkSkillListWin, bMyGradeIsLow_4) )
        break;
LABEL_33:
      v13 = LODWORD(fGaugeWidth);
      if ( LODWORD(fGaugeWidth) >= 5 )
      {
        if ( pkSelectedInfo )
          ProductionWin::SetCurrentProduction(v1, (D3DXCOLOR *)LODWORD(fGaugeWidth), pkSelectedInfo, 0);
        if ( iSelIndex >= 0 )
          SlideListWin::SetCurSelIndex(v1->m_pkSkillListWin, iSelIndex);
        SlideListWin::AlignText(v1->m_pkSkillListWin, 4u);
        SlideListWin::UpdateViewList(v1->m_pkSkillListWin);
        SlideBar::SetSplitCnt(v1->m_pkSkillSlideBar, v1->m_pkSkillListWin->m_nSlideSplitCnt);
        return;
      }
    }
    v17 = v1->m_pkSkillListWin;
LABEL_32:
    SlideListWin::RemoveItem(v17, v16);
    goto LABEL_33;
  }
}

//----- (00577ED0) --------------------------------------------------------
void __thiscall ProductionWin::OnSelChange(ProductionWin *this)
{
  ProductionWin *v1; // esi@1
  D3DXCOLOR *v2; // edi@1
  unsigned __int16 v3; // ax@3
  ProduceInfo *v4; // eax@5
  unsigned int dwData; // [sp+8h] [bp-4h]@3

  v1 = this;
  v2 = (D3DXCOLOR *)SlideListWin::GetCurSelIndex(this->m_pkSkillListWin);
  if ( (signed int)v2 >= 0 && (signed int)v2 < SlideListWin::GetItemSize(v1->m_pkSkillListWin) )
  {
    SlideListWin::GetData(v1->m_pkSkillListWin, (unsigned int)v2, &dwData);
    v3 = dwData;
    if ( dwData != -1
      || (v2 = (D3DXCOLOR *)((char *)v2 + 1),
          SlideListWin::SetCurSelIndex(v1->m_pkSkillListWin, (int)v2),
          SlideListWin::UpdateViewList(v1->m_pkSkillListWin),
          SlideListWin::GetData(v1->m_pkSkillListWin, (unsigned int)v2, &dwData),
          v3 = dwData,
          dwData != -1) )
    {
      v4 = ProduceInfoTable::GetByID(v3);
      ProductionWin::SetCurrentProduction(v1, v2, v4, 1);
    }
  }
}

//----- (00577F60) --------------------------------------------------------
void __thiscall ProductionWin::OnCommand(ProductionWin *this, unsigned int wParam, int lParam)
{
  ProductionWin *v3; // esi@1
  unsigned int v4; // eax@3
  unsigned int v5; // eax@5
  char *v6; // esi@10
  NiUnsharedGeometryGroup *v7; // eax@18
  int v8; // esi@19
  NiUnsharedGeometryGroup *v9; // edi@19

  v3 = this;
  switch ( wParam )
  {
    case 6u:
      PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
      return;
    case 2u:
      v4 = this->m_uiProduceItemCount;
      if ( v4 )
        this->m_uiProduceItemCount = v4 - 1;
      return;
    case 3u:
      v5 = this->m_uiProduceItemCount;
      if ( v5 < this->m_uiProductableItemCount )
        this->m_uiProduceItemCount = v5 + 1;
      return;
    case 4u:
      this->m_pkSkillListWin->m_nViewStartPos = this->m_pkSkillSlideBar->m_nCurPos;
      SlideListWin::UpdateViewList(this->m_pkSkillListWin);
      return;
    case 5u:
      ProductionWin::OnSelChange(this);
      return;
    case 1u:
      if ( this->m_bIsProducing )
      {
        v6 = (char *)&this->vfptr;
        if ( this->m_pkMsgHooker )
        {
          ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))this->m_pkMsgHooker->vfptr->SendDirectMessage)(
            35,
            0,
            &this->vfptr);
          if ( *((_DWORD *)v6 + 1) )
            (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v6 + 1) + 20))(35, 0, v6);
        }
        (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v6 + 20))(v6, 35, 0, v6);
      }
      else
      {
        if ( this->m_uiProduceItemCount )
        {
          if ( Char::IsActGathering(g_pkMainChar) )
            return;
          if ( !(unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[1].AddAbStateByAbstateIndex)() )
          {
            ProductionWin::ProduceStartCurrentSelected(v3);
            return;
          }
          v7 = TextData::Get(0xB312958u);
        }
        else
        {
          v7 = TextData::Get(0x29313778u);
        }
        v8 = (int)&v3->vfptr;
        v9 = v7;
        if ( *(_DWORD *)(v8 + 4) )
        {
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v8 + 4) + 4))(25, v7, v8);
          if ( *(_DWORD *)(v8 + 4) )
            (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v8 + 4) + 20))(25, v9, v8);
        }
        (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v8 + 20))(v8, 25, v9, v8);
      }
      return;
    case 7u:
      ProductionWin::OnHelpLink();
      return;
    default:
      return;
  }
}

//----- (00578100) --------------------------------------------------------
void __thiscall ProductionWin::RefreshProductItemState(ProductionWin *this)
{
  if ( !this->m_bIsProducing )
    ProductionWin::OnSelChange(this);
}

//----- (00578110) --------------------------------------------------------
void __thiscall ProductionWin::OpenDialog(ProductionWin *this, unsigned __int16 kSkillID)
{
  ProductionWin *v2; // esi@1

  v2 = this;
  this->m_kCurrProduceBaseSkillID = kSkillID;
  ProductionWin::ms_kCurrProduceBaseSkillID = kSkillID;
  ProductionWin::RefreshProductSkillList(this);
  v2->m_pkSkillListWin->m_nViewStartPos = 0;
  SlideListWin::SetCurSelIndex(v2->m_pkSkillListWin, 1);
  SlideListWin::UpdateViewList(v2->m_pkSkillListWin);
  if ( !v2->m_bIsProducing )
    ProductionWin::OnSelChange(v2);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
}
// A8D484: using guessed type unsigned __int16 ProductionWin::ms_kCurrProduceBaseSkillID;

//----- (00578180) --------------------------------------------------------
void __thiscall ProductionWin::OnShowWin(ProductionWin *this)
{
  ProductionWin *v1; // esi@1

  v1 = this;
  this->m_pkSkillListWin->m_nViewStartPos = 0;
  ProductionWin::RefreshProductSkillList(this);
  SlideListWin::SetCurSelIndex(v1->m_pkSkillListWin, 1);
  SlideListWin::UpdateViewList(v1->m_pkSkillListWin);
  if ( !v1->m_bIsProducing )
    ProductionWin::OnSelChange(v1);
  NiAVObject::Update((NiAVObject *)&v1->vfptr, 0.0, 1);
}

//----- (005781E0) --------------------------------------------------------
char __thiscall ProductionWin::Create(ProductionWin *this, PgFrameWork *pkFrameWork)
{
  ProductionWin *v2; // esi@1
  NiTexturePalette *v3; // ebx@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  NiSourceTexture *v8; // eax@10
  PgSprData *v9; // eax@13
  PgWinSpr *v10; // eax@13
  PgWinText *v11; // eax@13
  char *v12; // eax@13
  char *v13; // eax@13
  PgWinAbbreviateText *v14; // eax@13
  PgWinAbbreviateText *v15; // eax@13
  PgTextGeometry *v16; // eax@13
  PgWinBut *v17; // edi@13
  char *v18; // eax@13
  NiSourceTexture *v19; // edi@13
  PgWinBut *v20; // edi@15
  char *v21; // eax@15
  PgWinText *v22; // eax@15
  PgWinBut *v23; // eax@15
  char *v24; // eax@15
  PgWinSpr *v25; // eax@15
  PgWinText *v26; // eax@15
  PgWinSpr *v27; // ecx@15
  int v28; // eax@15
  PgWinSpr *v29; // ecx@15
  PgSprData *v30; // eax@15
  PgWinSpr *v31; // eax@15
  ItemIcon *v32; // eax@15
  signed int v33; // ebx@15
  ItemIcon **v34; // edi@15
  const char *v35; // eax@16
  PgSprData *v36; // eax@16
  PgWinSpr *v37; // eax@16
  MaterialItemIcon *v38; // eax@16
  ItemIcon *v39; // eax@16
  char *v40; // eax@16
  PgWinAbbreviateText *v41; // eax@16
  char *v42; // eax@16
  SLWCreateInfo::Item *v43; // edi@17
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *v44; // edi@17
  SLWCreateInfo::Item *v45; // eax@23
  SLWCreateInfo::Item *v46; // edi@23
  SLWCreateInfo::Item *v47; // eax@25
  SLWCreateInfo::Item *v48; // edi@25
  PgSprData *v49; // eax@27
  SlideListWin *v50; // eax@27
  PgSprData *v51; // eax@27
  SlideBar *v52; // eax@27
  SlideBar *v53; // eax@27
  NiNode *v54; // esi@29
  D3DXCOLOR v55; // [sp-4h] [bp-A4h]@13
  D3DXCOLOR v56; // [sp+4h] [bp-9Ch]@11
  NiSourceTexture *v57; // [sp+14h] [bp-8Ch]@11
  SLWCreateInfo kCreateInfo; // [sp+28h] [bp-78h]@17
  int v59; // [sp+44h] [bp-5Ch]@15
  NiAVObject *pkObject; // [sp+48h] [bp-58h]@16
  UIUtil ui; // [sp+4Ch] [bp-54h]@10
  int iYOff; // [sp+60h] [bp-40h]@4
  int iXOff; // [sp+64h] [bp-3Ch]@4
  int iLeft; // [sp+68h] [bp-38h]@11
  int iTop; // [sp+6Ch] [bp-34h]@11
  NiPointer<NiNode> spNode; // [sp+70h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+74h] [bp-2Ch]@17
  int v68; // [sp+9Ch] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v68 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\ProductWin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iXOff, &iYOff, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "ProductionWin", 0) )
  {
    v6 = spNode.m_pObject;
    v68 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v68) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, iXOff, iYOff);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v8 = MenuTexMgr::GetTexture(0x13u);
  if ( v8 )
  {
    v57 = v8;
    LODWORD(v56.a) = &iTop;
    LODWORD(v56.b) = &iLeft;
    LODWORD(v56.g) = "Theme";
  }
  else
  {
    *(float *)&v57 = 0.0;
    LODWORD(v56.a) = &iTop;
    LODWORD(v56.b) = &iLeft;
    LODWORD(v56.g) = "Theme";
  }
  v9 = PgSprData::Create(
         (NiAVObject *)&spNode.m_pObject->vfptr,
         (const char *)LODWORD(v56.g),
         (int *)LODWORD(v56.b),
         (int *)LODWORD(v56.a),
         v57);
  PgWinSpr::CreateWin(iLeft - iXOff, iTop - iYOff, v9, (PgWin *)&v2->vfptr, 0, 0);
  UIUtil::CreateSpr(&ui, "Panel01", 0);
  UIUtil::CreateSpr(&ui, "IconSlot", 0);
  v10 = UIUtil::CreateSpr(&ui, "ProductSkill", 0);
  v11 = UIUtil::CreateAttachedText((PgWin *)&v10->vfptr, "ProductSkill", Color::m_kDxWhiteColor, 5u);
  *(float *)&v57 = 0.0;
  LODWORD(v56.a) = 0;
  v2->m_pkProductSkillName = v11;
  v55 = Color::m_kDxWhiteColor;
  v12 = (char *)TextData::Get(0xD8FAF1F6);
  UIUtil::CreateText(&ui, "Product", v12, 0, v55, 5u, (NiSourceTexture *)LODWORD(v56.a), (bool)v57);
  v55 = Color::m_kDxWhiteColor;
  v13 = (char *)TextData::Get(0xE7063C41);
  UIUtil::CreateText(&ui, "Material", v13, 0, v55, 5u, 0, 0);
  v14 = UIUtil::CreateText(&ui, "ProductName", &byte_99D78F, 0, Color::m_kDxWhiteColor, 5u, 0, 0);
  *(float *)&v57 = 0.0;
  *(_QWORD *)&v56.b = 0i64;
  v2->m_pkProductionName = (PgWinText *)v14;
  v15 = UIUtil::CreateText(
          &ui,
          "ProductItemIntro",
          &byte_99D799,
          1u,
          Color::m_kDxWhiteColor,
          LODWORD(v56.b),
          (NiSourceTexture *)LODWORD(v56.a),
          (bool)v57);
  *(float *)&v57 = 0.0;
  LODWORD(v56.a) = 0;
  LODWORD(v56.b) = "ClsClick";
  LODWORD(v56.g) = "ClsOver";
  v2->m_pkProductionDesc = (PgWinText *)v15;
  v16 = v15->m_spTextGeom.m_pObject;
  LODWORD(v56.r) = "ClsNor";
  LODWORD(v55.g) = 6;
  v16->m_bAutoWordWrap = 1;
  UIUtil::CreateBtn(
    &ui,
    LODWORD(v55.g),
    (char *)LODWORD(v56.r),
    (char *)LODWORD(v56.g),
    (char *)LODWORD(v56.b),
    (char *)LODWORD(v56.a),
    v57);
  v17 = UIUtil::CreateBtn(&ui, 6u, "CancelNor", "CancelOver", "CancelClick", 0, 0);
  v56 = Color::m_kDxWhiteColor;
  v18 = (char *)TextData::Get(0x9EA4A8EF);
  UIUtil::CreateAttachedText((PgWin *)&v17->vfptr, v18, v56, 5u);
  v19 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
    UIUtil::CreateBtn(&ui, 7u, "HelpLinkNor", "HelpLinkOver", "HelpLinkClick", 0, v19);
  v20 = UIUtil::CreateBtn(&ui, 1u, "ProductNor", "ProductOver", "ProductClick", 0, 0);
  v56 = Color::m_kDxWhiteColor;
  v21 = (char *)TextData::Get(0xD8FAF1F6);
  v22 = UIUtil::CreateAttachedText((PgWin *)&v20->vfptr, v21, v56, 5u);
  *(float *)&v57 = 0.0;
  LODWORD(v56.a) = 0;
  LODWORD(v56.b) = "NextNumClick";
  LODWORD(v56.g) = "NextNumOver";
  LODWORD(v56.r) = "NextNumNor";
  LODWORD(v55.g) = 3;
  v2->m_pkProduceBtnText = v22;
  v23 = UIUtil::CreateBtn(
          &ui,
          LODWORD(v55.g),
          (char *)LODWORD(v56.r),
          (char *)LODWORD(v56.g),
          (char *)LODWORD(v56.b),
          (char *)LODWORD(v56.a),
          v57);
  *(float *)&v57 = 0.0;
  LODWORD(v56.a) = 0;
  LODWORD(v56.b) = "PreNumClick";
  LODWORD(v56.g) = "PreNumOver";
  LODWORD(v56.r) = "PreNumNor";
  LODWORD(v55.g) = 2;
  v2->m_pkProductCountIncBtn = v23;
  v2->m_pkProductCountDecBtn = UIUtil::CreateBtn(
                                 &ui,
                                 LODWORD(v55.g),
                                 (char *)LODWORD(v56.r),
                                 (char *)LODWORD(v56.g),
                                 (char *)LODWORD(v56.b),
                                 (char *)LODWORD(v56.a),
                                 v57);
  v56 = Color::m_kDxWinTitleColor;
  v24 = (char *)TextData::Get(0xE9E5F047);
  UIUtil::CreateTextNoSpr(&ui, "WinTitle", v24, v56, 5u);
  UIUtil::CreateSpr(&ui, "Fill_Skill_Panel", 0);
  UIUtil::CreateSpr(&ui, "Fill_Skill_Back", 0);
  v25 = UIUtil::CreateSpr(&ui, "Fill_Skill", 0);
  v57 = (NiSourceTexture *)5;
  v2->m_pkLearnGauge = v25;
  v26 = UIUtil::CreateAttachedText((PgWin *)&v25->vfptr, "Fill_Skill", Color::m_kDxYellowColor, (unsigned int)v57);
  v27 = v2->m_pkLearnGauge;
  v2->m_pkSkillValue = v26;
  v28 = ((int (*)(void))v27->vfptr[36].__vecDelDtor)();
  v29 = v2->m_pkLearnGauge;
  v2->m_uiGaugeWidth = v28;
  ((void (__stdcall *)(_DWORD))v29->vfptr[117].__vecDelDtor)(0);
  v30 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TargetSlot", &iLeft, &iTop, 0);
  v31 = PgWinSpr::CreateWin(iLeft - iXOff, iTop - iYOff, v30, (PgWin *)&v2->vfptr, 0, 0);
  v32 = ItemIcon::CreateWin(3, 3, (PgWin *)&v31->vfptr);
  v2->m_pkProductItemIcon = v32;
  v32->vfptr[64].__vecDelDtor((NiRefObject *)v32, 0);
  ItemIcon::ShowLotText(v2->m_pkProductItemIcon, 0);
  v2->m_pkProductItemIcon->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
  v33 = 1;
  v34 = (ItemIcon **)v2->m_apkMaterialIcon;
  v59 = 10;
  do
  {
    *(float *)&v57 = 0.0;
    LODWORD(v56.a) = &iTop;
    *(_QWORD *)&v56.g = __PAIR__(&iLeft, v33);
    pkObject = (NiAVObject *)spNode.m_pObject;
    v35 = fs("MaterialSlot%02d", v33);
    v36 = PgSprData::Create(pkObject, v35, (int *)LODWORD(v56.b), (int *)LODWORD(v56.a), v57);
    v37 = PgWinSpr::CreateWin(iLeft - iXOff, iTop - iYOff, v36, (PgWin *)&v2->vfptr, 0, 0);
    v38 = MaterialItemIcon::CreateWin(1, 1, (PgWin *)&v37->vfptr);
    *v34 = (ItemIcon *)v38;
    v38->vfptr[64].__vecDelDtor((NiRefObject *)v38, 0);
    ItemIcon::ShowLotText(*v34, 0);
    v39 = *v34;
    v57 = (NiSourceTexture *)1;
    *(_QWORD *)&v56.b = 0i64;
    v39->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
    v55 = Color::m_kDxWhiteColor;
    v40 = fs("MaterialIntro%02d", v33);
    v41 = UIUtil::CreateText(
            &ui,
            v40,
            &byte_99D79A,
            1u,
            v55,
            LODWORD(v56.b),
            (NiSourceTexture *)LODWORD(v56.a),
            (bool)v57);
    *(float *)&v57 = 0.0;
    *(_QWORD *)&v56.b = 0i64;
    *(v34 - 26) = (ItemIcon *)v41;
    v55 = Color::m_kDxWhiteColor;
    v42 = fs("MaterialIntroNum%02d", v33);
    *(v34 - 16) = (ItemIcon *)UIUtil::CreateText(
                                &ui,
                                v42,
                                &byte_99D79B,
                                1u,
                                v55,
                                LODWORD(v56.b),
                                (NiSourceTexture *)LODWORD(v56.a),
                                (bool)v57);
    ++v34;
    ++v33;
    --v59;
  }
  while ( v59 );
  v2->m_pkProduceItemCountText = (PgWinText *)UIUtil::CreateText(
                                                &ui,
                                                off_99D9C0,
                                                &byte_99D7B6,
                                                0,
                                                Color::m_kDxWhiteColor,
                                                5u,
                                                0,
                                                0);
  kCreateInfo.m_arrItem._Myfirst = 0;
  kCreateInfo.m_arrItem._Mylast = 0;
  kCreateInfo.m_arrItem._Myend = 0;
  kCreateInfo.m_bMakeData = 0;
  kCreateInfo.m_nOffX = 0;
  kCreateInfo.m_nOffY = 0;
  LOBYTE(v68) = 2;
  v43 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
  v43->nItemType = 1;
  v57 = (NiSourceTexture *)12;
  LODWORD(v56.a) = "ColumnBarNor";
  v43->pNode = spNode.m_pObject;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_Val,
    (const char *)LODWORD(v56.a),
    (unsigned int)v57);
  v44 = &v43->vecNodeName;
  LOBYTE(v68) = 3;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v44,
    &_Val);
  LOBYTE(v68) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarClick", 0xEu);
  LOBYTE(v68) = 4;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v44,
    &_Val);
  LOBYTE(v68) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarOver", 0xDu);
  LOBYTE(v68) = 5;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v44,
    &_Val);
  LOBYTE(v68) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v45 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  v57 = (NiSourceTexture *)6;
  v46 = v45;
  LODWORD(v56.a) = "Column";
  v45->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_Val,
    (const char *)LODWORD(v56.a),
    (unsigned int)v57);
  LOBYTE(v68) = 6;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &v46->vecNodeName,
    &_Val);
  LOBYTE(v68) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v57 = (NiSourceTexture *)2;
  v46->pNode = spNode.m_pObject;
  v47 = SLWCreateInfo::AddItemInfo(&kCreateInfo, (int)v57);
  v57 = (NiSourceTexture *)15;
  v48 = v47;
  LODWORD(v56.a) = "ProductSkillTab";
  v47->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_Val,
    (const char *)LODWORD(v56.a),
    (unsigned int)v57);
  LOBYTE(v68) = 7;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &v48->vecNodeName,
    &_Val);
  LOBYTE(v68) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  *(float *)&v57 = 0.0;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  v48->pNode = spNode.m_pObject;
  SLWCreateInfo::MakeTempData(&kCreateInfo, v57);
  v49 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ColumnBox", &iLeft, &iTop, 0);
  v50 = SlideListWin::CreateWin(iLeft - iXOff, iTop - iYOff, v49, (PgWin *)&v2->vfptr, &kCreateInfo, 1u, 0);
  v2->m_pkSkillListWin = v50;
  v50->m_uiLClickMsg = 5;
  v51 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle", &iLeft, &iTop, 0);
  v52 = SlideBar::CreateWin(
          spNode.m_pObject,
          "SlideBar",
          "SlideBar_UpBtn",
          "SlideBar_DnBtn",
          v51,
          0,
          (PgWin *)&v2->vfptr);
  v2->m_pkSkillSlideBar = v52;
  *(float *)&v57 = 0.5;
  v52->m_uiClickMsg = 4;
  v53 = v2->m_pkSkillSlideBar;
  v56.a = 0.0;
  v53->m_eType = 1;
  ((void (__thiscall *)(ProductionWin *, unsigned int, unsigned int, _DWORD, NiSourceTexture *))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    LODWORD(v56.a),
    v57);
  LOBYTE(v68) = 1;
  if ( kCreateInfo.m_arrItem._Myfirst )
  {
    v57 = (NiSourceTexture *)pkObject;
    LODWORD(v56.a) = (char *)&kCreateInfo + 12;
    std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(
      kCreateInfo.m_arrItem._Myfirst,
      kCreateInfo.m_arrItem._Mylast);
    operator delete(kCreateInfo.m_arrItem._Myfirst);
  }
  kCreateInfo.m_arrItem._Myfirst = 0;
  kCreateInfo.m_arrItem._Mylast = 0;
  kCreateInfo.m_arrItem._Myend = 0;
  LOBYTE(v68) = 0;
  UIUtil::~UIUtil(&ui);
  v54 = spNode.m_pObject;
  v68 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v54 )
    v54->vfptr->__vecDelDtor((NiRefObject *)v54, 1u);
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00578C10) --------------------------------------------------------
ProductionWin *__thiscall ProductionWin::`vector deleting destructor'(ProductionWin *this, unsigned int a2)
{
  ProductionWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ProductionWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ProductionWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 99DD1C: using guessed type void (__thiscall *ProductionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99DD3C: using guessed type int (__thiscall *ProductionWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00578C50) --------------------------------------------------------
ProduceViewInfo *__cdecl ProduceViewInfoTable::GetByID(unsigned __int16 kSkillID)
{
  ProduceViewInfo *result; // eax@2
  unsigned int v2; // esi@3

  if ( kSkillID == -1 )
  {
    result = 0;
  }
  else
  {
    v2 = 0;
    if ( ITableBase<ProduceViewInfo,ProduceViewInfoTable>::GetTotal() )
    {
      while ( 1 )
      {
        result = (ProduceViewInfo *)CDataReader::GetRecord(
                                      (CDataReader *)(ITableBase<ProduceViewInfo,ProduceViewInfoTable>::ms_pkTable + 4),
                                      v2);
        if ( result->ID == kSkillID )
          break;
        if ( ++v2 >= ITableBase<ProduceViewInfo,ProduceViewInfoTable>::GetTotal() )
          goto LABEL_6;
      }
    }
    else
    {
LABEL_6:
      result = 0;
    }
  }
  return result;
}
// A8C178: using guessed type int ITableBase<ProduceViewInfo,ProduceViewInfoTable>::ms_pkTable;

//----- (00578CA0) --------------------------------------------------------
void ProductSkillSelectWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "ProductSkillSelect");
}

//----- (00578CD0) --------------------------------------------------------
void __thiscall ProductSkillSelectWin::ProductSkillSelectWin(ProductSkillSelectWin *this)
{
  ProductSkillSelectWin *v1; // esi@1
  int v2; // eax@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ProductSkillSelectWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ProductSkillSelectWin::`vftable'{for `IDirectMessenger'};
  v2 = (int)&v1->m_kDropContents;
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  v1->m_kDrop.m_pkSender = 0;
  *(_DWORD *)v2 = &DropContents::`vftable';
  *(_WORD *)(v2 + 60) = -1;
  *(_DWORD *)(v2 + 64) = 0;
  v1->m_kDrop.m_pkContents = &v1->m_kDropContents;
  v1->m_pkMsgBox = 0;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 99E1EC: using guessed type void (__thiscall *ProductSkillSelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99E20C: using guessed type int (__thiscall *ProductSkillSelectWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00578D30) --------------------------------------------------------
void __thiscall ProductSkillSelectWin::~ProductSkillSelectWin(ProductSkillSelectWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ProductSkillSelectWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ProductSkillSelectWin::`vftable'{for `IDirectMessenger'};
  this->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  this->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 99E1EC: using guessed type void (__thiscall *ProductSkillSelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99E20C: using guessed type int (__thiscall *ProductSkillSelectWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00578D60) --------------------------------------------------------
char __thiscall ProductSkillSelectWin::Create(ProductSkillSelectWin *this, PgFrameWork *pkFrameWork)
{
  ProductSkillSelectWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  char result; // al@9
  NiSourceTexture *v8; // eax@10
  PgSprData *v9; // eax@11
  D3DXCOLOR v10; // ST48_16@13
  char *v11; // eax@13
  PgWinBut *v12; // edi@13
  D3DXCOLOR v13; // ST48_16@13
  char *v14; // eax@13
  PgWinBut *v15; // edi@13
  D3DXCOLOR v16; // ST48_16@13
  char *v17; // eax@13
  NiSourceTexture *v18; // edi@13
  NiNode *v19; // esi@16
  D3DXCOLOR v20; // ST40_16@21
  D3DXCOLOR v21; // ST40_16@23
  SkillIcon *v22; // edi@24
  ProduceViewInfo *v23; // eax@24
  D3DXCOLOR v24; // ST40_16@25
  D3DXCOLOR v25; // ST40_16@26
  char *v26; // eax@26
  SkillIcon *v27; // edi@27
  ProduceViewInfo *v28; // eax@27
  D3DXCOLOR v29; // ST40_16@28
  D3DXCOLOR v30; // ST40_16@29
  char *v31; // eax@29
  SkillIcon *v32; // edi@30
  ProduceViewInfo *v33; // eax@30
  D3DXCOLOR v34; // ST40_16@31
  D3DXCOLOR v35; // ST40_16@32
  char *v36; // eax@32
  SkillIcon *v37; // edi@33
  ProduceViewInfo *v38; // eax@33
  D3DXCOLOR v39; // ST40_16@34
  D3DXCOLOR v40; // ST40_16@35
  char *v41; // eax@35
  SkillIcon *v42; // edi@36
  ProduceViewInfo *v43; // eax@36
  D3DXCOLOR v44; // ST40_16@37
  D3DXCOLOR v45; // ST40_16@38
  char *v46; // eax@38
  UIUtil ui; // [sp+6Ch] [bp-3Ch]@10
  unsigned int uiWidth; // [sp+80h] [bp-28h]@15
  unsigned int uiHeight; // [sp+84h] [bp-24h]@15
  int iXOff; // [sp+88h] [bp-20h]@4
  int iYOff; // [sp+8Ch] [bp-1Ch]@4
  int iLeft; // [sp+90h] [bp-18h]@11
  int iTop; // [sp+94h] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+98h] [bp-10h]@1
  int v55; // [sp+A4h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v55 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\ProductSkillSelect.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iXOff, &iYOff, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "ProductSelectWin", 0) )
  {
    v6 = spNode.m_pObject;
    v55 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v55) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, iXOff, iYOff);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  UIUtil::CreateSpr(&ui, "Panel01", 0);
  v8 = MenuTexMgr::GetTexture(0x13u);
  if ( v8 )
    v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, v8);
  else
    v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft - iXOff, iTop - iYOff, v9, (PgWin *)&v2->vfptr, 0, 0);
  UIUtil::CreateSpr(&ui, "IconSlot", 0);
  UIUtil::CreateSpr(&ui, "Plane", 0);
  *(_QWORD *)&v10.r = *(_QWORD *)&Color::m_kDxWinTitleColor.r;
  *(_QWORD *)&v10.b = *(_QWORD *)&Color::m_kDxWinTitleColor.b;
  v11 = (char *)TextData::Get(0xE90AF0F0);
  UIUtil::CreateTextNoSpr(&ui, "WinTitle", v11, v10, 5u);
  UIUtil::CreateSpr(&ui, "IconSlotBox01", 0);
  UIUtil::CreateSpr(&ui, "IconSlotBox02", 0);
  UIUtil::CreateSpr(&ui, "IconSlotBox03", 0);
  UIUtil::CreateSpr(&ui, "IconSlotBox04", 0);
  UIUtil::CreateSpr(&ui, "IconSlotBox05", 0);
  UIUtil::CreateSpr(&ui, "IconSlotBox06", 0);
  UIUtil::CreateSpr(&ui, "IconSlotBox07", 0);
  UIUtil::CreateSpr(&ui, "IconSlotBox08", 0);
  UIUtil::CreateCloseBtn(&ui, "ClsNor", "ClsOver", "ClsClick");
  v12 = UIUtil::CreateBtn(&ui, 1u, "Btn01Nor", "Btn01Over", "Btn01Click", 0, 0);
  *(_QWORD *)&v13.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v13.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v14 = (char *)TextData::Get(0x4F5F499Fu);
  UIUtil::CreateAttachedText((PgWin *)&v12->vfptr, v14, v13, 5u);
  v15 = UIUtil::CreateBtn(&ui, 2u, "Btn02Nor", "Btn02Over", "Btn02Click", 0, 0);
  *(_QWORD *)&v16.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v16.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v17 = (char *)TextData::Get(0x88A297E1);
  UIUtil::CreateAttachedText((PgWin *)&v15->vfptr, v17, v16, 5u);
  v18 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
    UIUtil::CreateBtn(&ui, 5u, "HelpLinkNor", "HelpLinkOver", "HelpLinkClick", 0, v18);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot00", &iLeft, &iTop, &uiWidth, &uiHeight) )
  {
    v2->m_akSelectedSkill[0].pkSlot = IconSlotWin::CreateWin(iLeft - iXOff, iTop - iYOff, (PgWin *)&v2->vfptr);
    *(_QWORD *)&v20.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v20.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v2->m_akSelectedSkill[0].pkTitle = (PgWinText *)UIUtil::CreateText(&ui, "IconTxt01", &byte_99DF7E, 0, v20, 5u, 0, 0);
    if ( !PgUtil::GetTriShapeRect(
            (NiAVObject *)&spNode.m_pObject->vfptr,
            "IconSlot01",
            &iLeft,
            &iTop,
            &uiWidth,
            &uiHeight) )
      goto LABEL_41;
    v2->m_akSelectedSkill[1].pkSlot = IconSlotWin::CreateWin(iLeft - iXOff, iTop - iYOff, (PgWin *)&v2->vfptr);
    *(_QWORD *)&v21.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v21.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v2->m_akSelectedSkill[1].pkTitle = (PgWinText *)UIUtil::CreateText(&ui, "IconTxt02", &byte_99DF7F, 0, v21, 5u, 0, 0);
    if ( !PgUtil::GetTriShapeRect(
            (NiAVObject *)&spNode.m_pObject->vfptr,
            "IconSlot02",
            &iLeft,
            &iTop,
            &uiWidth,
            &uiHeight) )
      goto LABEL_41;
    v22 = SkillIcon::CreateWin(iLeft - iXOff, iTop - iYOff, (PgWin *)&v2->vfptr);
    v22->vfptr[129].__vecDelDtor((NiRefObject *)v22, 3u);
    v22->vfptr[140].__vecDelDtor((NiRefObject *)v22, 4u);
    v22->vfptr[130].__vecDelDtor((NiRefObject *)v22, 29100u);
    v22->vfptr[141].__vecDelDtor((NiRefObject *)v22, 29100u);
    SkillIcon::SetSkill(v22, 0x71ACu);
    v23 = ProduceViewInfoTable::GetByID(0x71ACu);
    if ( v23 )
    {
      *(_QWORD *)&v24.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v24.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      UIUtil::CreateText(&ui, "IconTxt03", v23->Name, 0, v24, 5u, 0, 0);
    }
    *(_QWORD *)&v25.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v25.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v26 = (char *)TextData::Get(0x86FAC9DE);
    UIUtil::CreateText(&ui, "IconTxt03_", v26, 0, v25, 1u, 0, 0);
    if ( !PgUtil::GetTriShapeRect(
            (NiAVObject *)&spNode.m_pObject->vfptr,
            "IconSlot03",
            &iLeft,
            &iTop,
            &uiWidth,
            &uiHeight) )
      goto LABEL_41;
    v27 = SkillIcon::CreateWin(iLeft - iXOff, iTop - iYOff, (PgWin *)&v2->vfptr);
    v27->vfptr[129].__vecDelDtor((NiRefObject *)v27, 3u);
    v27->vfptr[140].__vecDelDtor((NiRefObject *)v27, 4u);
    v27->vfptr[130].__vecDelDtor((NiRefObject *)v27, 29101u);
    v27->vfptr[141].__vecDelDtor((NiRefObject *)v27, 29101u);
    SkillIcon::SetSkill(v27, 0x71ADu);
    v28 = ProduceViewInfoTable::GetByID(0x71ADu);
    if ( v28 )
    {
      *(_QWORD *)&v29.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v29.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      UIUtil::CreateText(&ui, "IconTxt04", v28->Name, 0, v29, 5u, 0, 0);
    }
    *(_QWORD *)&v30.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v30.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v31 = (char *)TextData::Get(0x81B1C2E3);
    UIUtil::CreateText(&ui, "IconTxt04_", v31, 0, v30, 1u, 0, 0);
    if ( !PgUtil::GetTriShapeRect(
            (NiAVObject *)&spNode.m_pObject->vfptr,
            "IconSlot04",
            &iLeft,
            &iTop,
            &uiWidth,
            &uiHeight) )
      goto LABEL_41;
    v32 = SkillIcon::CreateWin(iLeft - iXOff, iTop - iYOff, (PgWin *)&v2->vfptr);
    v32->vfptr[129].__vecDelDtor((NiRefObject *)v32, 3u);
    v32->vfptr[140].__vecDelDtor((NiRefObject *)v32, 4u);
    v32->vfptr[130].__vecDelDtor((NiRefObject *)v32, 29102u);
    v32->vfptr[141].__vecDelDtor((NiRefObject *)v32, 29102u);
    SkillIcon::SetSkill(v32, 0x71AEu);
    v33 = ProduceViewInfoTable::GetByID(0x71AEu);
    if ( v33 )
    {
      *(_QWORD *)&v34.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v34.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      UIUtil::CreateText(&ui, "IconTxt05", v33->Name, 0, v34, 5u, 0, 0);
    }
    *(_QWORD *)&v35.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v35.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v36 = (char *)TextData::Get(0x84ECC9E4);
    UIUtil::CreateText(&ui, "IconTxt05_", v36, 0, v35, 1u, 0, 0);
    if ( !PgUtil::GetTriShapeRect(
            (NiAVObject *)&spNode.m_pObject->vfptr,
            "IconSlot05",
            &iLeft,
            &iTop,
            &uiWidth,
            &uiHeight) )
      goto LABEL_41;
    v37 = SkillIcon::CreateWin(iLeft - iXOff, iTop - iYOff, (PgWin *)&v2->vfptr);
    v37->vfptr[129].__vecDelDtor((NiRefObject *)v37, 3u);
    v37->vfptr[140].__vecDelDtor((NiRefObject *)v37, 4u);
    v37->vfptr[130].__vecDelDtor((NiRefObject *)v37, 29104u);
    v37->vfptr[141].__vecDelDtor((NiRefObject *)v37, 29104u);
    SkillIcon::SetSkill(v37, 0x71B0u);
    v38 = ProduceViewInfoTable::GetByID(0x71B0u);
    if ( v38 )
    {
      *(_QWORD *)&v39.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v39.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      UIUtil::CreateText(&ui, "IconTxt06", v38->Name, 0, v39, 5u, 0, 0);
    }
    *(_QWORD *)&v40.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v40.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v41 = (char *)TextData::Get(0xCD01BC29);
    UIUtil::CreateText(&ui, "IconTxt06_", v41, 0, v40, 1u, 0, 0);
    if ( PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "IconSlot06",
           &iLeft,
           &iTop,
           &uiWidth,
           &uiHeight) )
    {
      v42 = SkillIcon::CreateWin(iLeft - iXOff, iTop - iYOff, (PgWin *)&v2->vfptr);
      v42->vfptr[129].__vecDelDtor((NiRefObject *)v42, 3u);
      v42->vfptr[140].__vecDelDtor((NiRefObject *)v42, 4u);
      v42->vfptr[130].__vecDelDtor((NiRefObject *)v42, 29105u);
      v42->vfptr[141].__vecDelDtor((NiRefObject *)v42, 29105u);
      SkillIcon::SetSkill(v42, 0x71B1u);
      v43 = ProduceViewInfoTable::GetByID(0x71B1u);
      if ( v43 )
      {
        *(_QWORD *)&v44.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
        *(_QWORD *)&v44.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
        UIUtil::CreateText(&ui, "IconTxt07", v43->Name, 0, v44, 5u, 0, 0);
      }
      *(_QWORD *)&v45.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v45.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v46 = (char *)TextData::Get(0xCAF8C8E4);
      UIUtil::CreateText(&ui, "IconTxt07_", v46, 0, v45, 1u, 0, 0);
      ((void (__thiscall *)(ProductSkillSelectWin *))v2->vfptr[59].__vecDelDtor)(v2);
      LOBYTE(v55) = 0;
      UIUtil::~UIUtil(&ui);
      v55 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 1;
    }
    else
    {
LABEL_41:
      LOBYTE(v55) = 0;
      UIUtil::~UIUtil(&ui);
      v55 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 0;
    }
  }
  else
  {
    LOBYTE(v55) = 0;
    UIUtil::~UIUtil(&ui);
    v19 = spNode.m_pObject;
    v55 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v19 )
      v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00579840) --------------------------------------------------------
void __thiscall ProductSkillSelectWin::DirectMessage(ProductSkillSelectWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  ProductSkillSelectWin *v4; // esi@1
  unsigned int *v5; // eax@5
  IconSlotWin *v6; // ecx@9
  unsigned __int16 v7; // di@9
  unsigned __int16 v8; // bx@9
  IconSlotWin *v9; // ecx@11
  signed int v10; // edi@18
  char *v11; // ecx@19
  char *v12; // eax@24
  int v13; // eax@30
  ProduceViewInfo *v14; // eax@32
  signed int v15; // edi@34
  char *v16; // ecx@35
  char *v17; // eax@40
  int *v18; // esi@48
  int v19; // edi@48
  NiUnsharedGeometryGroup *v20; // eax@48

  v4 = this;
  switch ( iMsgTag )
  {
    case 3:
      v15 = -1;
      if ( pkFrom )
        v16 = (char *)&pkFrom[-20].m_uiMessageNum;
      else
        v16 = 0;
      if ( (char *)LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[1][0]) == v16 )
        v15 = 0;
      if ( pkFrom )
        v17 = (char *)&pkFrom[-20].m_uiMessageNum;
      else
        v17 = 0;
      if ( (char *)LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[1][2]) == v17 )
      {
        v15 = 1;
      }
      else if ( v15 < 0 || v15 >= 2 )
      {
        return;
      }
      if ( IconSlotWin::GetSkill((IconSlotWin *)LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[1][2 * v15])) != -1
        && *(_BYTE *)(LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[1][2 * v15]) + 254) )
      {
        LODWORD(v4->m_kWorld.m_fScale) = 12;
        v4->m_kPropertyList.m_pkHead = (NiTListItem<NiPointer<NiProperty> > *)1;
        v4->m_kPropertyList.m_pkTail = (NiTListItem<NiPointer<NiProperty> > *)IconSlotWin::GetSkill((IconSlotWin *)LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[1][2 * v15]));
        v4->m_kPropertyList.vfptr = 0;
        LODWORD(v4->m_kWorld.m_Translate.x) = (char *)v4 - 232;
        PgCursor::ms_pkDrop = (struct PgWinDrop *)&v4->m_kWorld.m_Rotate.m_pEntry[2][1];
        IconSlotWin::Clear((IconSlotWin *)LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[1][2 * v15]));
        v18 = (int *)LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[0][2 * v15 + 2]);
        v19 = *v18;
        v20 = TextData::Get(0x7DEEC8DDu);
        (*(void (__thiscall **)(int *, NiUnsharedGeometryGroup *))(v19 + 472))(v18, v20);
      }
      break;
    case 22:
      v10 = -1;
      if ( pkFrom )
        v11 = (char *)&pkFrom[-20].m_uiMessageNum;
      else
        v11 = 0;
      if ( (char *)LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[1][0]) == v11 )
        v10 = 0;
      if ( pkFrom )
        v12 = (char *)&pkFrom[-20].m_uiMessageNum;
      else
        v12 = 0;
      if ( (char *)LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[1][2]) == v12 )
      {
        v10 = 1;
      }
      else if ( v10 < 0 || v10 >= 2 )
      {
        return;
      }
      v13 = *(_DWORD *)pvBody;
      if ( *(_DWORD *)(*(_DWORD *)pvBody + 8) == 12 && *(_DWORD *)(v13 + 16) == 1 )
      {
        *((_BYTE *)pvBody + 12) = 1;
        v14 = ProduceViewInfoTable::GetByID(*(_DWORD *)(v13 + 20));
        if ( v14 )
          (*(void (__stdcall **)(char *))(*(_DWORD *)LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[0][2 * v10 + 2]) + 472))(v14->Name);
      }
      break;
    case 27:
      v5 = pkFrom ? &pkFrom[-20].m_uiMessageNum : 0;
      if ( v5 == (unsigned int *)LODWORD(this->m_kWorld.m_Rotate.m_pEntry[2][0]) )
      {
        if ( !*(_DWORD *)pvBody )
        {
          v6 = (IconSlotWin *)LODWORD(this->m_kWorld.m_Rotate.m_pEntry[1][0]);
          v7 = -1;
          v8 = -1;
          if ( v6->m_bDroppable )
            v7 = IconSlotWin::GetSkill(v6);
          v9 = (IconSlotWin *)LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[1][2]);
          if ( v9->m_bDroppable )
            v8 = IconSlotWin::GetSkill(v9);
          if ( v7 != -1 )
          {
            LOWORD(pkFrom) = v7;
            NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x12u, 0x22u, &pkFrom, 2);
          }
          if ( v8 != -1 )
          {
            LOWORD(pkFrom) = v8;
            NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x12u, 0x22u, &pkFrom, 2);
          }
        }
        PgWin::PostMsg((PgWin *)&v4[-1].m_kBound, 1u, 0, 0);
      }
      break;
  }
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (00579A80) --------------------------------------------------------
void __thiscall ProductSkillSelectWin::OnCommand(ProductSkillSelectWin *this, unsigned int wParam, int lParam)
{
  ProductSkillSelectWin *v3; // esi@1
  IconSlotWin *v4; // ecx@3
  IconSlotWin *v5; // ecx@6
  IconSlotWin *v6; // ecx@9
  unsigned __int16 v7; // bx@9
  unsigned __int16 v8; // di@9
  IconSlotWin *v9; // ecx@11
  char *v10; // ST0C_4@15
  ProduceViewInfo *v11; // eax@15
  char *v12; // eax@17
  char *v13; // edx@17
  char v14; // cl@18
  char *v15; // eax@20
  char *v16; // edx@20
  char v17; // cl@21
  int v18; // ST0C_4@22
  char *v19; // eax@22
  MsgBox *v20; // eax@22
  GameFrameWork *v21; // eax@26
  char acSkill[128]; // [sp+4h] [bp-84h]@9

  v3 = this;
  switch ( wParam )
  {
    case 3u:
      this->m_kDropContents.m_eSenderType = 12;
      this->m_kDropContents.m_eType = 1;
      this->m_kDropContents.m_apvParam[0] = (void *)(unsigned __int16)lParam;
      this->m_kDropContents.m_uiSenderIndex = 0;
      this->m_kDrop.m_pkSender = (PgWin *)this;
      PgCursor::ms_pkDrop = &this->m_kDrop;
      return;
    case 4u:
      v4 = this->m_akSelectedSkill[0].pkSlot;
      if ( v4->m_bDroppable && IconSlotWin::GetSkill(v4) == -1 )
      {
        IconSlotWin::SetSkill(v3->m_akSelectedSkill[0].pkSlot, lParam);
      }
      else
      {
        v5 = v3->m_akSelectedSkill[1].pkSlot;
        if ( v5->m_bDroppable )
        {
          if ( IconSlotWin::GetSkill(v5) == -1 )
            IconSlotWin::SetSkill(v3->m_akSelectedSkill[1].pkSlot, lParam);
        }
      }
      return;
    case 1u:
      v6 = this->m_akSelectedSkill[0].pkSlot;
      acSkill[0] = 0;
      v7 = -1;
      v8 = -1;
      if ( v6->m_bDroppable )
        v7 = IconSlotWin::GetSkill(v6);
      v9 = v3->m_akSelectedSkill[1].pkSlot;
      if ( v9->m_bDroppable )
        v8 = IconSlotWin::GetSkill(v9);
      if ( v7 != -1 )
      {
        if ( v8 == -1 )
        {
          v15 = ProduceViewInfoTable::GetByID(v7)->Name;
          v16 = (char *)(acSkill - v15);
          do
          {
            v17 = *v15;
            v15[(_DWORD)v16] = *v15;
            ++v15;
          }
          while ( v17 );
        }
        else
        {
          v10 = ProduceViewInfoTable::GetByID(v8)->Name;
          v11 = ProduceViewInfoTable::GetByID(v7);
          sprintf(acSkill, "%s, %s", v11->Name, v10);
        }
LABEL_22:
        v18 = ((int (__stdcall *)(_DWORD))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)(acSkill);
        v19 = (char *)TextData::Get(0x73B8DCE0u);
        v20 = MsgBox::Modeless(MSGBOX_OKCANCEL, v19, v18);
        v3->m_pkMsgBox = v20;
        ((void (__cdecl *)(_DWORD))v20->vfptr->SetMsgHooker)(&v3->vfptr);
        return;
      }
      if ( v8 != -1 )
      {
        v12 = ProduceViewInfoTable::GetByID(v8)->Name;
        v13 = (char *)(acSkill - v12);
        do
        {
          v14 = *v12;
          v12[(_DWORD)v13] = *v12;
          ++v12;
        }
        while ( v14 );
        goto LABEL_22;
      }
      PgWin::PostMsg((PgWin *)&v3->vfptr, 1u, 0, 0);
      return;
    case 2u:
      PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
      return;
    case 5u:
      v21 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v21 )
        GameFrameWork::OpenPlayGuideSearchList(v21, "ProductSkillSelect");
      return;
    default:
      return;
  }
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (00579D20) --------------------------------------------------------
void __thiscall ProductSkillSelectWin::OnShowWin(ProductSkillSelectWin *this)
{
  char *v1; // esi@1
  signed int v2; // ebx@1
  int v3; // edi@2
  NiUnsharedGeometryGroup *v4; // eax@2
  signed int v5; // esi@3
  char *v6; // ebx@3
  __int16 v7; // di@4
  unsigned int v8; // esi@7
  char *v9; // eax@8
  GameFrameWork *v10; // eax@14
  char *v11; // [sp+Ch] [bp-Ch]@1
  int i; // [sp+10h] [bp-8h]@3
  int iBaseSkillCount; // [sp+14h] [bp-4h]@3

  v1 = (char *)this->m_akSelectedSkill;
  v11 = (char *)this->m_akSelectedSkill;
  v2 = 2;
  do
  {
    *(_BYTE *)(*((_DWORD *)v1 + 1) + 254) = 1;
    IconSlotWin::Clear(*((IconSlotWin **)v1 + 1));
    v3 = **(_DWORD **)v1;
    v4 = TextData::Get(0x7DEEC8DDu);
    (*(void (__thiscall **)(_DWORD, NiUnsharedGeometryGroup *))(v3 + 472))(*(_DWORD *)v1, v4);
    v1 += 8;
    --v2;
  }
  while ( v2 );
  v5 = 29100;
  iBaseSkillCount = 0;
  v6 = v11;
  i = 29100;
  do
  {
    v7 = v5;
    if ( Skill::IsLearnProdSkill((unsigned __int16)v5) )
    {
      if ( iBaseSkillCount >= 2 )
        break;
      IconSlotWin::SetSkill(*((IconSlotWin **)v6 + 1), v5);
      *(_BYTE *)(*((_DWORD *)v6 + 1) + 254) = 0;
      if ( (_WORD)v5 != -1 )
      {
        v8 = 0;
        if ( ITableBase<ProduceViewInfo,ProduceViewInfoTable>::GetTotal() )
        {
          while ( 1 )
          {
            v9 = CDataReader::GetRecord(
                   (CDataReader *)(ITableBase<ProduceViewInfo,ProduceViewInfoTable>::ms_pkTable + 4),
                   v8);
            if ( *(_WORD *)v9 == v7 )
              break;
            if ( ++v8 >= ITableBase<ProduceViewInfo,ProduceViewInfoTable>::GetTotal() )
              goto LABEL_12;
          }
          (*(void (__stdcall **)(char *))(**(_DWORD **)v6 + 472))(v9 + 34);
        }
      }
LABEL_12:
      ++iBaseSkillCount;
      v5 = i;
      v6 += 8;
    }
    i = ++v5;
  }
  while ( v5 < 29200 );
  v10 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v10 )
    GameFrameWork::OpenPlayGuideWin(v10, BIL_PRODUCTION_1);
}
// A8C178: using guessed type int ITableBase<ProduceViewInfo,ProduceViewInfoTable>::ms_pkTable;

//----- (00579E40) --------------------------------------------------------
ProductSkillSelectWin *__cdecl ProductSkillSelectWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  ProductSkillSelectWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1C0u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    ProductSkillSelectWin::ProductSkillSelectWin((ProductSkillSelectWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (ProductSkillSelectWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00579F70) --------------------------------------------------------
ProductSkillSelectWin *__thiscall ProductSkillSelectWin::`vector deleting destructor'(ProductSkillSelectWin *this, unsigned int a2)
{
  ProductSkillSelectWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ProductSkillSelectWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ProductSkillSelectWin::`vftable'{for `IDirectMessenger'};
  this->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  this->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 99E1EC: using guessed type void (__thiscall *ProductSkillSelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99E20C: using guessed type int (__thiscall *ProductSkillSelectWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00579FC0) --------------------------------------------------------
void __thiscall RebirthMenuWin::SetAutoRevieTime(RebirthMenuWin *this, char auMin)
{
  this->m_fAutoReviveTime = (double)(unsigned __int8)auMin * 60.0;
}

//----- (00579FE0) --------------------------------------------------------
void __thiscall RebirthMenuWin::SetDeadTime(RebirthMenuWin *this, float fTime)
{
  this->m_fDeadTime = fTime;
}

//----- (00579FF0) --------------------------------------------------------
void __thiscall RebirthMenuWin::OnTimer(RebirthMenuWin *this)
{
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this[-1].m_kWorldBound.m_fRadius);
}

//----- (0057A010) --------------------------------------------------------
void __thiscall RebirthMenuWin::OnCancel(RebirthMenuWin *this)
{
  GameFrameWork *v1; // eax@1
  GameFrameWork *v2; // esi@1

  PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  v2 = v1;
  if ( v1 )
  {
    GameFrameWork::OnOpenReviveMenuWin(v1, 1);
    GameFrameWork::NcCharRebirthRejectCmd(v2);
  }
}

//----- (0057A050) --------------------------------------------------------
void RebirthMenuWin::OnOk()
{
  GameFrameWork *v1; // eax@1
  GameFrameWork *v2; // esi@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  v2 = v1;
  if ( v1 )
  {
    GameFrameWork::NcCharRebirthCmd(v1);
    InventoryWin::UnLockAllItem(v2->m_pkInventoryWin);
    InventoryWin::UnLockAllEquipItem(v2->m_pkInventoryWin);
  }
}

//----- (0057A090) --------------------------------------------------------
void __thiscall RebirthMenuWin::~RebirthMenuWin(RebirthMenuWin *this)
{
  RebirthMenuWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&RebirthMenuWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&RebirthMenuWin::`vftable'{for `IDirectMessenger'};
  this->vfptr = (ITimerVtbl *)&RebirthMenuWin::`vftable';
  `eh vector destructor iterator'(
    this->m_apkTextWin,
    4u,
    3,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  ITimer::~ITimer((ITimer *)&v1->vfptr);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 99E4B4: using guessed type int (__stdcall *RebirthMenuWin::`vftable')(int);
// 99E4C0: using guessed type void (__thiscall *RebirthMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99E4DC: using guessed type int (__thiscall *RebirthMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0057A120) --------------------------------------------------------
char __thiscall RebirthMenuWin::Create(RebirthMenuWin *this, PgFrameWork *pkFrameWork)
{
  RebirthMenuWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  NiSourceTexture *v8; // eax@10
  PgSprData *v9; // eax@11
  PgWinSpr *v10; // eax@13
  PgFont *v11; // eax@15
  int v12; // edi@15
  unsigned int v13; // ebx@17
  PgFont *v14; // ST24_4@17
  unsigned int v15; // ST20_4@17
  int v16; // eax@17
  PgWinText *v17; // eax@17
  int v18; // ebx@17
  NiRefObjectVtbl **v19; // ebx@26
  NiRefObjectVtbl *v20; // edi@26
  NiUnsharedGeometryGroup *v21; // eax@26
  PgSprData *v22; // edi@26
  PgWinBut *v23; // ST28_4@26
  PgWinBut *v24; // edi@26
  PgFont *v25; // ST24_4@26
  unsigned int v26; // ST20_4@26
  unsigned int v27; // eax@26
  PgWinText *v28; // eax@26
  NiRefObjectVtbl *v29; // edi@26
  NiUnsharedGeometryGroup *v30; // eax@26
  PgSprData *v31; // edi@26
  PgWinBut *v32; // ST28_4@26
  PgWinBut *v33; // edi@26
  PgFont *v34; // ST24_4@26
  unsigned int v35; // ST20_4@26
  unsigned int v36; // eax@26
  PgWinText *v37; // eax@26
  NiRefObjectVtbl *v38; // edi@26
  NiUnsharedGeometryGroup *v39; // eax@26
  NiNode *v40; // esi@27
  PgFont *pkFont; // [sp+44h] [bp-20h]@15
  PgWinText *v42; // [sp+48h] [bp-1Ch]@17
  int uiLeft; // [sp+4Ch] [bp-18h]@4
  int uiTop; // [sp+50h] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+54h] [bp-10h]@1
  int v46; // [sp+60h] [bp-4h]@1
  int i; // [sp+6Ch] [bp+8h]@15

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v46 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\MessageWin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "RebirthMenuWin", 0) )
  {
    v6 = spNode.m_pObject;
    v46 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = MenuTexMgr::GetTexture(0x13u);
  if ( v8 )
    v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v8);
  else
    v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  v10 = PgWinSpr::CreateWin(uiLeft, uiTop, v9, (PgWin *)&v2->vfptr, 0, 0);
  if ( v10 )
    v10->vfptr[60].__vecDelDtor((NiRefObject *)v10, 0);
  v11 = Font::Get(0);
  pkFont = v11;
  i = 0;
  v12 = (int)v2->m_apkTextWin;
  while ( 1 )
  {
    v13 = v11->m_uiDefHeight;
    v14 = v11;
    v15 = v11->m_uiDefHeight;
    v16 = ((int (__thiscall *)(RebirthMenuWin *))v2->vfptr[36].__vecDelDtor)(v2);
    v17 = PgWinText::CreateWin(8, i * (v13 + 1) + 8, v16 - 16, v15, v14, (PgWin *)&v2->vfptr, 0, 0);
    v18 = *(_DWORD *)v12;
    v42 = v17;
    if ( *(PgWinText **)v12 != v17 )
    {
      if ( v18 )
      {
        if ( !InterlockedDecrement((volatile LONG *)(v18 + 4)) && v18 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v18)(v18, 1);
        v17 = v42;
      }
      *(_DWORD *)v12 = v17;
      if ( v17 )
        InterlockedIncrement((volatile LONG *)&v17->m_uiRefCount);
    }
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v12 + 240))(0);
    (*(void (__stdcall **)(signed int))(**(_DWORD **)v12 + 488))(1);
    v12 += 4;
    if ( ++i >= 3 )
      break;
    v11 = pkFont;
  }
  v19 = &v2->m_apkTextWin[0].m_pObject->vfptr;
  v20 = *v19;
  v21 = TextData2::Get(0x4C507573u);
  v20[118].__vecDelDtor((NiRefObject *)v19, (unsigned int)v21);
  v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor02", &uiLeft, &uiTop, 0);
  PgSprData::Add(v22, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick02");
  PgSprData::Add(v22, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver02");
  v23 = PgWinBut::CreateWin(uiLeft, uiTop, v22, (PgWin *)&v2->vfptr, 0, 0, 0);
  v2->m_apkButWin[0] = v23;
  v24 = v23;
  v25 = Font::Get(0);
  v26 = ((int (__thiscall *)(PgWinBut *))v24->vfptr[37].__vecDelDtor)(v24);
  v27 = ((int (__thiscall *)(PgWinBut *))v24->vfptr[36].__vecDelDtor)(v24);
  v28 = PgWinText::CreateWin(0, 0, v27, v26, v25, (PgWin *)&v23->vfptr, 0, 0);
  v2->m_apkButTextWin[0] = v28;
  v28->vfptr[122].__vecDelDtor((NiRefObject *)v28, 5u);
  v29 = v2->m_apkButTextWin[0]->vfptr;
  v30 = TextData::Get(0x4F5F499Fu);
  v29[118].__vecDelDtor((NiRefObject *)v2->m_apkButTextWin[0], (unsigned int)v30);
  ((void (__stdcall *)(_DWORD))v2->m_apkButTextWin[0]->vfptr[60].__vecDelDtor)(0);
  v31 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor03", &uiLeft, &uiTop, 0);
  PgSprData::Add(v31, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick03");
  PgSprData::Add(v31, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver03");
  v32 = PgWinBut::CreateWin(uiLeft, uiTop, v31, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v2->m_apkButWin[1] = v32;
  v33 = v32;
  v34 = Font::Get(0);
  v35 = ((int (__thiscall *)(PgWinBut *))v33->vfptr[37].__vecDelDtor)(v33);
  v36 = ((int (__thiscall *)(PgWinBut *))v33->vfptr[36].__vecDelDtor)(v33);
  v37 = PgWinText::CreateWin(0, 0, v36, v35, v34, (PgWin *)&v32->vfptr, 0, 0);
  v2->m_apkButTextWin[1] = v37;
  v37->vfptr[122].__vecDelDtor((NiRefObject *)v37, 5u);
  v38 = v2->m_apkButTextWin[1]->vfptr;
  v39 = TextData::Get(0x88A297E1);
  v38[118].__vecDelDtor((NiRefObject *)v2->m_apkButTextWin[1], (unsigned int)v39);
  ((void (__stdcall *)(_DWORD))v2->m_apkButTextWin[1]->vfptr[60].__vecDelDtor)(0);
  ((void (__thiscall *)(RebirthMenuWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.2);
  v46 = -1;
  if ( spNode.m_pObject )
  {
    v40 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v40 )
        v40->vfptr->__vecDelDtor((NiRefObject *)v40, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0057A560) --------------------------------------------------------
void __thiscall RebirthMenuWin::UpdateMeWin(RebirthMenuWin *this, float fCurTime)
{
  RebirthMenuWin *v2; // esi@1
  float v3; // ST20_4@1
  double v4; // st7@1
  double v5; // st7@3
  char *v6; // eax@4
  const char *v7; // eax@4
  NiUnsharedGeometryGroup *v8; // eax@5
  GameFrameWork *v9; // eax@7
  GameFrameWork *v10; // esi@7
  int v11; // [sp-4h] [bp-114h]@0
  float fPastTime; // [sp+8h] [bp-108h]@1
  char acStr[256]; // [sp+Ch] [bp-104h]@4

  v2 = this;
  v3 = fCurTime - this->m_fDeadTime;
  v4 = v3;
  fPastTime = this->m_fAutoReviveTime - v3;
  if ( this->m_fAutoReviveTime > v4 )
  {
    v5 = fPastTime;
    if ( fPastTime < 60.0 )
    {
      v8 = TextData::Get(0x7795949Cu);
      sprintf(acStr, (const char *)v8, (unsigned int)(signed __int64)v5);
    }
    else
    {
      v6 = (char *)TextData::Get(0x82998E9C);
      v7 = fs(v6, (unsigned int)(signed __int64)v5 / 0x3C % 0x3C, (unsigned int)(signed __int64)v5 % 0x3C);
      sprintf(acStr, v7);
    }
    ((void (__stdcall *)(char *, int))v2->m_apkTextWin[2].m_pObject->vfptr[118].__vecDelDtor)(acStr, v11);
    ((void (__stdcall *)(signed int))v2->m_apkTextWin[2].m_pObject->vfptr[122].__vecDelDtor)(1);
    if ( g_pkKeyboard->m_aucKeystate[0] & 2 )
    {
      BYTE3(PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID)[73].m_kMsgQ.m_uiAlloced) = 0;
      PgWin::PostMsg((PgWin *)&v2->vfptr, 1u, 0, 0);
      v9 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      v10 = v9;
      if ( v9 )
      {
        GameFrameWork::OnOpenReviveMenuWin(v9, 1);
        GameFrameWork::NcCharRebirthRejectCmd(v10);
      }
    }
  }
  else
  {
    PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (0057A720) --------------------------------------------------------
void __thiscall RebirthMenuWin::OnCommand(RebirthMenuWin *this, unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@3
  GameFrameWork *v4; // esi@3
  GameFrameWork *v5; // eax@5
  GameFrameWork *v6; // esi@5

  if ( wParam )
  {
    if ( wParam == 1 )
    {
      PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      v4 = v3;
      if ( v3 )
      {
        GameFrameWork::OnOpenReviveMenuWin(v3, 1);
        GameFrameWork::NcCharRebirthRejectCmd(v4);
      }
    }
  }
  else
  {
    v5 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v6 = v5;
    if ( v5 )
    {
      GameFrameWork::NcCharRebirthCmd(v5);
      InventoryWin::UnLockAllItem(v6->m_pkInventoryWin);
      InventoryWin::UnLockAllEquipItem(v6->m_pkInventoryWin);
    }
  }
}

//----- (0057A7A0) --------------------------------------------------------
void __thiscall RebirthMenuWin::RebirthMenuWin(RebirthMenuWin *this)
{
  RebirthMenuWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  ITimer::ITimer((ITimer *)&v1->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&RebirthMenuWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&RebirthMenuWin::`vftable'{for `IDirectMessenger'};
  v1->vfptr = (ITimerVtbl *)&RebirthMenuWin::`vftable';
  `eh vector constructor iterator'(
    v1->m_apkTextWin,
    4u,
    3,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
}
// 99E4B4: using guessed type int (__stdcall *RebirthMenuWin::`vftable')(int);
// 99E4C0: using guessed type void (__thiscall *RebirthMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99E4DC: using guessed type int (__thiscall *RebirthMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0057A830) --------------------------------------------------------
RebirthMenuWin *__cdecl RebirthMenuWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  RebirthMenuWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x188u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    RebirthMenuWin::RebirthMenuWin((RebirthMenuWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (RebirthMenuWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (0057A960) --------------------------------------------------------
RebirthMenuWin *__thiscall RebirthMenuWin::`vector deleting destructor'(char *this, unsigned int a2)
{
  return RebirthMenuWin::`scalar deleting destructor'((RebirthMenuWin *)(this - 344), a2);
}

//----- (0057A970) --------------------------------------------------------
RebirthMenuWin *__thiscall RebirthMenuWin::`scalar deleting destructor'(RebirthMenuWin *this, unsigned int a2)
{
  RebirthMenuWin *v2; // esi@1

  v2 = this;
  RebirthMenuWin::~RebirthMenuWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0057A9A0) --------------------------------------------------------
void __thiscall ReportWin::ReportWin(ReportWin *this)
{
  ReportWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_uiCurFoscus = 0;
  v1->m_pkCharNameInputEdit = 0;
  v1->vfptr = (NiRefObjectVtbl *)&ReportWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ReportWin::`vftable'{for `IDirectMessenger'};
}
// 99E880: using guessed type void (__thiscall *ReportWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99E89C: using guessed type int (__thiscall *ReportWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0057A9D0) --------------------------------------------------------
void __thiscall ReportWin::~ReportWin(ReportWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ReportWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ReportWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 99E880: using guessed type void (__thiscall *ReportWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99E89C: using guessed type int (__thiscall *ReportWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0057A9F0) --------------------------------------------------------
void __thiscall ReportWin::OnCmdCancel(ReportWin *this)
{
  PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
}

//----- (0057AA20) --------------------------------------------------------
void __thiscall ReportWin::SetCharName(ReportWin *this, const char *name)
{
  if ( this->m_pkCharNameInputEdit )
    ((void (__stdcall *)(_DWORD))this->m_pkCharNameInputEdit->vfptr[116].__vecDelDtor)(name);
}

//----- (0057AA50) --------------------------------------------------------
void __thiscall ReportWin::SetProcessText(ReportWin *this, const char *text)
{
  ((void (__stdcall *)(_DWORD))this->m_pkProcessWinTxt->vfptr[118].__vecDelDtor)(text);
}

//----- (0057AA70) --------------------------------------------------------
void __thiscall ReportWin::SetRegID(ReportWin *this, int iRegID)
{
  ReportWin *v2; // esi@1
  char temp[1024]; // [sp+4h] [bp-404h]@1

  v2 = this;
  this->m_uiRegId = iRegID;
  sprintf(temp, "%i", iRegID);
  ((void (__stdcall *)(_DWORD))v2->m_pkCharNameInputEdit->vfptr[116].__vecDelDtor)(temp);
}

//----- (0057AAD0) --------------------------------------------------------
void __thiscall ReportWin::SetReportInfoInput(ReportWin *this, const char *text)
{
  ((void (__stdcall *)(_DWORD))this->m_pkReportInfoInput->vfptr[116].__vecDelDtor)(text);
}

//----- (0057AAF0) --------------------------------------------------------
void __thiscall ReportWin::SetOKButText(ReportWin *this, const char *text)
{
  ((void (__stdcall *)(_DWORD))this->m_pkOkTextWin->vfptr[118].__vecDelDtor)(text);
}

//----- (0057AB10) --------------------------------------------------------
void __thiscall ReportWin::ShowOKButton(ReportWin *this, int bShow)
{
  ReportWin *v2; // esi@1

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkOkTextWin->vfptr[64].__vecDelDtor)(bShow);
  ((void (__stdcall *)(_DWORD))v2->m_pkOk->vfptr[64].__vecDelDtor)(bShow);
}

//----- (0057AB50) --------------------------------------------------------
void ReportWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "ReportWin");
}

//----- (0057AB90) --------------------------------------------------------
char __thiscall ReportWin::Create(ReportWin *this, PgFrameWork *pkFrameWork)
{
  ReportWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // ebx@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  int v10; // edi@15
  int v11; // ebx@15
  NiSourceTexture *v12; // eax@15
  PgSprData *v13; // eax@16
  PgSprData *v14; // eax@20
  PgWinSpr *v15; // eax@20
  PgFont *v16; // eax@21
  PgWinText *v17; // eax@21
  NiUnsharedGeometryGroup *v18; // eax@21
  PgFont *v19; // eax@22
  PgWinText *v20; // eax@22
  NiUnsharedGeometryGroup *v21; // eax@22
  PgFont *v22; // eax@23
  NiUnsharedGeometryGroup *v23; // eax@23
  EditWin *v24; // eax@23
  NiNode *v25; // edx@23
  PgSprData *v26; // eax@23
  PgFont *v27; // eax@28
  NiUnsharedGeometryGroup *v28; // eax@28
  PgSprData *v29; // eax@28
  PgFont *v30; // eax@31
  NiUnsharedGeometryGroup *v31; // eax@31
  PgFont *v32; // eax@32
  PgWinText *v33; // eax@32
  PgFont *v34; // ST4C_4@32
  NiSourceTexture *v35; // ecx@32
  int v36; // eax@32
  PgFont *v37; // eax@32
  PgWinText *v38; // eax@32
  NiUnsharedGeometryGroup *v39; // ST44_4@32
  NiPointer<PgSprData::PgHitTester> *v40; // ecx@32
  PgFont *v41; // eax@32
  PgWinText *v42; // edi@32
  NiRefObjectVtbl *v43; // ebx@32
  NiUnsharedGeometryGroup *v44; // eax@32
  UIUtil ui; // [sp+60h] [bp-3Ch]@23
  unsigned int v46; // [sp+74h] [bp-28h]@23
  NiSourceTexture *pkTexture; // [sp+78h] [bp-24h]@1
  unsigned int uiWidth; // [sp+7Ch] [bp-20h]@20
  unsigned int uiHeight; // [sp+80h] [bp-1Ch]@20
  int uiLeft; // [sp+84h] [bp-18h]@11
  int uiTop; // [sp+88h] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+8Ch] [bp-10h]@1
  int v53; // [sp+98h] [bp-4h]@1
  PgSprData *pkTexture8a; // [sp+A4h] [bp+8h]@18
  NiSourceTexture *pkTexture8; // [sp+A4h] [bp+8h]@18
  PgSprData *pkTexture8b; // [sp+A4h] [bp+8h]@19
  NiSourceTexture *pkTexture8c; // [sp+A4h] [bp+8h]@21
  NiSourceTexture *pkTexture8d; // [sp+A4h] [bp+8h]@22
  unsigned int *pkTexture8e; // [sp+A4h] [bp+8h]@23
  unsigned int *pkTexture8f; // [sp+A4h] [bp+8h]@28
  unsigned int *pkTexture8g; // [sp+A4h] [bp+8h]@31
  NiSourceTexture *pkTexture8h; // [sp+A4h] [bp+8h]@32
  NiSourceTexture *pkTexture8i; // [sp+A4h] [bp+8h]@32
  NiSourceTexture *pkTexture8j; // [sp+A4h] [bp+8h]@32
  NiSourceTexture *pkTexture8k; // [sp+A4h] [bp+8h]@32
  PgSprData *pkTexture8l; // [sp+A4h] [bp+8h]@32
  NiSourceTexture *pkTexture8m; // [sp+A4h] [bp+8h]@32

  v2 = this;
  spNode.m_pObject = 0;
  v53 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  pkTexture = v3;
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v53 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
    goto LABEL_5;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "Game\\ReportWin.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "PrivateStoreWin", 0) )
  {
    v4 = spNode.m_pObject;
    v53 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v10 = uiLeft;
  v11 = uiTop;
  v12 = MenuTexMgr::GetTexture(0x13u);
  if ( v12 )
    v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v12);
  else
    v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop - v11, v13, (PgWin *)&v2->vfptr, 0, 0);
  pkTexture8a = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(pkTexture8a, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(pkTexture8a, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, pkTexture8a, (PgWin *)&v2->vfptr, 0xCu, 0, 0);
  pkTexture8 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    pkTexture8b = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, pkTexture8);
    PgSprData::Add(pkTexture8b, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(pkTexture8b, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, pkTexture8b, (PgWin *)&v2->vfptr, 0xDu, 0, 0);
  }
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
  v15 = PgWinSpr::CreateWin(uiLeft - v10, uiTop - v11, v14, (PgWin *)&v2->vfptr, 0, 0);
  v15->vfptr[60].__vecDelDtor((NiRefObject *)v15, 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "WinTitle",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight)
    || (v16 = Font::Get(0),
        v17 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11 + 1, uiWidth, uiHeight, v16, (PgWin *)&v2->vfptr, 0, 0),
        v2->m_pkTitleText = v17,
        v17->vfptr[122].__vecDelDtor((NiRefObject *)v17, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))v2->m_pkTitleText->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        pkTexture8c = (NiSourceTexture *)v2->m_pkTitleText->vfptr,
        v18 = TextData::Get(0xED05F83B),
        (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))&pkTexture8c[6].m_bStatic)(
          v2->m_pkTitleText,
          v18),
        ((void (__stdcall *)(_DWORD))v2->m_pkTitleText->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "CharName",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v19 = Font::Get(0),
        v20 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v19, (PgWin *)&v2->vfptr, 0, 0),
        v2->m_pkCharRegIDNameText = v20,
        pkTexture8d = (NiSourceTexture *)&v20->vfptr[118],
        v21 = TextData::Get(0xECF14A2E),
        ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkTexture8d->vfptr)(
          v2->m_pkCharRegIDNameText,
          v21),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "ReportText",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight)) )
  {
LABEL_27:
    v53 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  v22 = Font::Get(0);
  pkTexture8e = (unsigned int *)PgWinText::CreateWin(
                                  uiLeft - v10,
                                  uiTop - v11,
                                  uiWidth,
                                  uiHeight,
                                  v22,
                                  (PgWin *)&v2->vfptr,
                                  0,
                                  0);
  (*(void (__thiscall **)(unsigned int *, signed int))(*pkTexture8e + 488))(pkTexture8e, 1);
  SpScreenText::SetVerticalGap((SpScreenText *)pkTexture8e[72], 5);
  v46 = *pkTexture8e;
  v23 = TextData::Get(0x383F4141u);
  (*(void (__thiscall **)(unsigned int *, NiUnsharedGeometryGroup *))(v46 + 472))(pkTexture8e, v23);
  UIUtil::UIUtil(&ui);
  LOBYTE(v53) = 1;
  UIUtil::SetOffset(&ui, v10, v11 + 2);
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v24 = UIUtil::CreateEdit(&ui, "CharNameInput", 14, NORMAL, pkTexture, 0);
  v25 = spNode.m_pObject;
  v2->m_pkCharNameInputEdit = v24;
  BYTE3(pkTexture8e) = PgUtil::GetTriShapeRect(
                         (NiAVObject *)&v25->vfptr,
                         "ReportInfoInput",
                         &uiLeft,
                         &uiTop,
                         &uiWidth,
                         &uiHeight);
  v26 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ReportInfoInput", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop - v11, v26, (PgWin *)&v2->vfptr, 0, 0);
  if ( BYTE3(pkTexture8e) )
    v2->m_pkReportInfoInput = EditWin::CreateWin(
                                uiLeft - v10,
                                uiTop - v11,
                                uiWidth,
                                uiHeight,
                                (PgWin *)&v2->vfptr,
                                MULTILINE,
                                0x100u,
                                4u,
                                0,
                                0,
                                1);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "ReportType",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
    goto LABEL_35;
  v27 = Font::Get(0);
  pkTexture8f = (unsigned int *)PgWinText::CreateWin(
                                  uiLeft - v10,
                                  uiTop - v11,
                                  uiWidth,
                                  uiHeight,
                                  v27,
                                  (PgWin *)&v2->vfptr,
                                  0,
                                  0);
  v46 = *pkTexture8f;
  v28 = TextData::Get(0x9A8FD7D6);
  (*(void (__thiscall **)(unsigned int *, NiUnsharedGeometryGroup *))(v46 + 472))(pkTexture8f, v28);
  BYTE3(pkTexture8f) = PgUtil::GetTriShapeRect(
                         (NiAVObject *)&spNode.m_pObject->vfptr,
                         "ReportTypeInput",
                         &uiLeft,
                         &uiTop,
                         &uiWidth,
                         &uiHeight);
  v29 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ReportTypeInput", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop - v11, v29, (PgWin *)&v2->vfptr, 0, 0);
  if ( BYTE3(pkTexture8f) )
    v2->m_pkReportTypeInput = EditWin::CreateWin(
                                uiLeft - v10,
                                uiTop - v11,
                                uiWidth,
                                uiHeight,
                                (PgWin *)&v2->vfptr,
                                MULTILINE,
                                0x100u,
                                4u,
                                0,
                                0,
                                1);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "ReportInfo",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight)
    || (v30 = Font::Get(0),
        pkTexture8g = (unsigned int *)PgWinText::CreateWin(
                                        uiLeft - v10,
                                        uiTop - v11,
                                        uiWidth,
                                        uiHeight,
                                        v30,
                                        (PgWin *)&v2->vfptr,
                                        0,
                                        0),
        v46 = *pkTexture8g,
        v31 = TextData::Get(0xF2F74733),
        (*(void (__thiscall **)(_DWORD, _DWORD))(v46 + 472))(pkTexture8g, v31),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "ReportProcess",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight)) )
  {
LABEL_35:
    LOBYTE(v53) = 0;
    UIUtil::~UIUtil(&ui);
    goto LABEL_27;
  }
  v32 = Font::Get(0);
  v33 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v32, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkProcessWinTxt = v33;
  pkTexture8h = (NiSourceTexture *)&v33->vfptr[113];
  v34 = Font::Get(LARGEBOLD);
  ((void (__thiscall *)(PgWinText *))pkTexture8h->vfptr)(v2->m_pkProcessWinTxt);
  v35 = pkTexture;
  v2->m_pkProcessWinTxt->m_uFlags |= 1u;
  pkTexture8i = (NiSourceTexture *)PgSprData::Create(
                                     (NiAVObject *)&spNode.m_pObject->vfptr,
                                     "OkNor",
                                     &uiLeft,
                                     &uiTop,
                                     v35);
  PgSprData::Add((PgSprData *)pkTexture8i, (NiAVObject *)&spNode.m_pObject->vfptr, "OkClick");
  PgSprData::Add((PgSprData *)pkTexture8i, (NiAVObject *)&spNode.m_pObject->vfptr, "OkOver");
  v2->m_pkOk = PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, (PgSprData *)pkTexture8i, (PgWin *)&v2->vfptr, 0xAu, 0, 0);
  v36 = *(_DWORD *)pkTexture8i->m_kFormatPrefs.m_eMipMapped;
  pkTexture8j = *(NiSourceTexture **)(v36 + 24);
  v46 = *(_DWORD *)(v36 + 20);
  v37 = Font::Get(0);
  v38 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, v46, (unsigned int)pkTexture8j, v37, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkOkTextWin = v38;
  ((void (__thiscall *)(PgWinText *))v38->vfptr[122].__vecDelDtor)(v38);
  pkTexture8k = (NiSourceTexture *)v2->m_pkOkTextWin->vfptr;
  v39 = TextData::Get(0xE9013C3B);
  (*(void (__thiscall **)(PgWinText *))&pkTexture8k[6].m_bStatic)(v2->m_pkOkTextWin);
  ((void (__cdecl *)(_DWORD, NiUnsharedGeometryGroup *, signed int, PgFont *))v2->m_pkOkTextWin->vfptr[60].__vecDelDtor)(
    0,
    v39,
    5,
    v34);
  pkTexture8l = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CancelNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(pkTexture8l, (NiAVObject *)&spNode.m_pObject->vfptr, "CancelClick");
  PgSprData::Add(pkTexture8l, (NiAVObject *)&spNode.m_pObject->vfptr, "CancelOver");
  v2->m_pkCancel = PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, pkTexture8l, (PgWin *)&v2->vfptr, 0xBu, 0, 0);
  v40 = pkTexture8l->m_akHitTester.m_pBase;
  pkTexture8m = (NiSourceTexture *)v40->m_pObject->m_uiHeight;
  v46 = v40->m_pObject->m_uiWidth;
  v41 = Font::Get(0);
  v42 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, v46, (unsigned int)pkTexture8m, v41, (PgWin *)&v2->vfptr, 0, 0);
  v42->vfptr[122].__vecDelDtor((NiRefObject *)v42, 5u);
  v43 = v42->vfptr;
  v44 = TextData::Get(0xF0364B3C);
  v43[118].__vecDelDtor((NiRefObject *)v42, (unsigned int)v44);
  v42->vfptr[60].__vecDelDtor((NiRefObject *)v42, 0);
  ((void (__thiscall *)(ReportWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  LOBYTE(v53) = 0;
  UIUtil::~UIUtil(&ui);
  v53 = -1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0057B520) --------------------------------------------------------
void __thiscall ReportWin::OnCmdOk(ReportWin *this)
{
  ReportWin *v1; // esi@1
  unsigned int v2; // eax@1
  const char *v3; // edi@2
  const char *v4; // ebx@2
  const char *v5; // eax@2
  char *v6; // eax@5
  int v7; // eax@10
  EditWin *v8; // ecx@10
  int v9; // eax@10
  EditWin *v10; // ecx@10
  const char *v11; // eax@10
  Name5 v12; // [sp-1Ch] [bp-2Ch]@10
  char *v13; // [sp-8h] [bp-18h]@10
  char *v14; // [sp-4h] [bp-14h]@4
  Name5 *v15; // [sp+Ch] [bp-4h]@10

  v1 = this;
  v2 = this->m_uiMode;
  if ( v2 )
  {
    if ( v2 == 1 )
      GameFrameWork::NcReportCancelReq((GameFrameWork *)this->m_pkFrameWork, this->m_uiRegId);
  }
  else
  {
    v3 = (const char *)((int (*)(void))this->m_pkCharNameInputEdit->vfptr[113].__vecDelDtor)();
    v4 = (const char *)((int (*)(void))v1->m_pkReportInfoInput->vfptr[113].__vecDelDtor)();
    v5 = (const char *)((int (*)(void))v1->m_pkReportTypeInput->vfptr[113].__vecDelDtor)();
    if ( !v3 )
      return;
    if ( !strlen(v3) )
    {
      v14 = (char *)-2037871133;
LABEL_5:
      v6 = (char *)TextData::Get((unsigned int)v14);
      MsgBox::Modeless(MSGBOX_OK, v6);
      return;
    }
    if ( !strlen(v5) )
    {
      v14 = (char *)-1294866470;
      goto LABEL_5;
    }
    if ( !strlen(v4) )
    {
      v14 = (char *)-1601070202;
      goto LABEL_5;
    }
    v7 = ((int (*)(void))v1->m_pkReportInfoInput->vfptr[113].__vecDelDtor)();
    v8 = v1->m_pkReportTypeInput;
    v14 = (char *)v7;
    v9 = ((int (*)(void))v8->vfptr[113].__vecDelDtor)();
    v10 = v1->m_pkCharNameInputEdit;
    v13 = (char *)v9;
    v11 = (const char *)((int (*)(void))v10->vfptr[113].__vecDelDtor)();
    v15 = &v12;
    Name5::Name5(&v12, v11);
    GameFrameWork::NcReportAddReq((GameFrameWork *)v1->m_pkFrameWork, v12, v13, v14);
  }
}

//----- (0057B650) --------------------------------------------------------
void __thiscall ReportWin::SetMode(ReportWin *this, ReportWin::REPORT_MODE eMode)
{
  ReportWin *v2; // esi@1
  NiRefObjectVtbl *v3; // edi@3
  NiUnsharedGeometryGroup *v4; // eax@3

  v2 = this;
  this->m_uiMode = eMode;
  if ( eMode )
  {
    if ( eMode == 1 )
    {
      ((void (__stdcall *)(_DWORD))this->m_pkCharNameInputEdit->vfptr[116].__vecDelDtor)(&unk_99E72E);
      ((void (__stdcall *)(_DWORD))v2->m_pkReportInfoInput->vfptr[115].__vecDelDtor)(&unk_99E72F);
      ((void (__stdcall *)(_DWORD))v2->m_pkReportTypeInput->vfptr[115].__vecDelDtor)(&unk_99E736);
      ((void (__stdcall *)(_DWORD))v2->m_pkReportInfoInput->vfptr[64].__vecDelDtor)(0);
      v3 = v2->m_pkProcessWinTxt->vfptr;
      v4 = TextData::Get(0x49433B8Fu);
      v3[118].__vecDelDtor((NiRefObject *)v2->m_pkProcessWinTxt, (unsigned int)v4);
      v2->m_pkProcessWinTxt->m_uFlags &= 0xFFFEu;
    }
  }
  else
  {
    ((void (__stdcall *)(_DWORD))this->m_pkCharNameInputEdit->vfptr[116].__vecDelDtor)(&unk_99E70F);
    ((void (__stdcall *)(_DWORD))v2->m_pkReportInfoInput->vfptr[115].__vecDelDtor)(&unk_99E716);
    ((void (__stdcall *)(_DWORD))v2->m_pkReportTypeInput->vfptr[115].__vecDelDtor)(&unk_99E717);
    ((void (__stdcall *)(_DWORD))v2->m_pkReportInfoInput->vfptr[64].__vecDelDtor)(1);
    v2->m_pkProcessWinTxt->m_uFlags |= 1u;
  }
}

//----- (0057B760) --------------------------------------------------------
void __thiscall ReportWin::SetReportAdd(ReportWin *this, int nRegNum)
{
  ReportWin *v2; // esi@1
  NiUnsharedGeometryGroup *v3; // eax@1
  NiUnsharedGeometryGroup *v4; // eax@1
  NiUnsharedGeometryGroup *v5; // eax@1
  char string; // [sp+4h] [bp-404h]@1

  v2 = this;
  this->m_uiRegId = nRegNum;
  sprintf(&string, "%i", nRegNum);
  ((void (__stdcall *)(_DWORD))v2->m_pkCharNameInputEdit->vfptr[116].__vecDelDtor)(&string);
  v3 = TextData::Get(0xE9444134);
  ((void (__stdcall *)(_DWORD))v2->m_pkCharRegIDNameText->vfptr[118].__vecDelDtor)(v3);
  v4 = TextData::Get(0x343D8D8Eu);
  ((void (__stdcall *)(_DWORD))v2->m_pkProcessWinTxt->vfptr[118].__vecDelDtor)(v4);
  v5 = TextData::Get(0x31363B3Bu);
  ((void (__stdcall *)(_DWORD))v2->m_pkOkTextWin->vfptr[118].__vecDelDtor)(v5);
  ((void (__stdcall *)(_DWORD))v2->m_pkReportInfoInput->vfptr[60].__vecDelDtor)(0);
}

//----- (0057B830) --------------------------------------------------------
void __thiscall ReportWin::SetReportAddErr(ReportWin *this)
{
  ReportWin *v1; // esi@1
  NiUnsharedGeometryGroup *v2; // eax@1
  NiUnsharedGeometryGroup *v3; // eax@1

  v1 = this;
  ReportWin::SetMode(this, REPORT_PROCESS);
  v2 = TextData::Get(0x8799869A);
  ((void (__stdcall *)(_DWORD))v1->m_pkProcessWinTxt->vfptr[118].__vecDelDtor)(v2);
  v3 = TextData::Get(0xECF14A2E);
  ((void (__stdcall *)(_DWORD))v1->m_pkCharRegIDNameText->vfptr[118].__vecDelDtor)(v3);
}

//----- (0057B880) --------------------------------------------------------
void __thiscall ReportWin::OnCommand(ReportWin *this, unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@4

  switch ( wParam )
  {
    case 0xAu:
      ReportWin::OnCmdOk(this);
      break;
    case 0xBu:
    case 0xCu:
      PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
      break;
    case 0xDu:
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v3 )
        GameFrameWork::OpenPlayGuideSearchList(v3, "ReportWin");
      break;
    default:
      return;
  }
}

//----- (0057B8F0) --------------------------------------------------------
ReportWin *__cdecl ReportWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  ReportWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x194u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&ReportWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&ReportWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[2][0]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (ReportWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 99E880: using guessed type void (__thiscall *ReportWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99E89C: using guessed type int (__thiscall *ReportWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0057BA40) --------------------------------------------------------
ReportWin *__thiscall ReportWin::`vector deleting destructor'(ReportWin *this, unsigned int a2)
{
  ReportWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ReportWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ReportWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 99E880: using guessed type void (__thiscall *ReportWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99E89C: using guessed type int (__thiscall *ReportWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0057BA80) --------------------------------------------------------
void __thiscall ReviveMenuWin::SetDeadTime(ReviveMenuWin *this, float fTime)
{
  this->m_fDeadTime = fTime;
}

//----- (0057BA90) --------------------------------------------------------
void __thiscall ReviveMenuWin::SetAutoRevieTime(ReviveMenuWin *this, char auMin)
{
  this->m_fAutoReviveTime = (double)(unsigned __int8)auMin * 60.0;
}

//----- (0057BAB0) --------------------------------------------------------
void __thiscall ReviveMenuWin::SetAutoRevieTimeSec(ReviveMenuWin *this, char auSec)
{
  this->m_fAutoReviveTime = (double)(unsigned __int8)auSec;
}

//----- (0057BAD0) --------------------------------------------------------
void __thiscall ReviveMenuWin::SetCanReviveItem(ReviveMenuWin *this, char bCanReviveItem)
{
  this->m_bCanReviveItem = bCanReviveItem != 0;
}

//----- (0057BAF0) --------------------------------------------------------
void ReviveMenuWin::OnItemMall()
{
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
    GameFrameWork::NcMiscItemShopUrlReq();
}

//----- (0057BB10) --------------------------------------------------------
void __thiscall ReviveMenuWin::SetBtnText(ReviveMenuWin *this, ReviveMenuWin::BtnIndex e, const char *Text)
{
  ((void (__stdcall *)(_DWORD))this->m_BtnText[e]->vfptr[118].__vecDelDtor)(Text);
}

//----- (0057BB30) --------------------------------------------------------
void __thiscall ReviveMenuWin::SetPriority(ReviveMenuWin *this, char byPriority)
{
  this->m_byPriority = byPriority;
}

//----- (0057BB40) --------------------------------------------------------
char __thiscall ReviveMenuWin::GetPriority(ReviveMenuWin *this)
{
  return this->m_byPriority;
}

//----- (0057BB50) --------------------------------------------------------
void ReviveMenuWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "RevivalMenu");
}

//----- (0057BB80) --------------------------------------------------------
void __thiscall ReviveMenuWin::OnRevive(ReviveMenuWin *this)
{
  ReviveMenuWin *v1; // esi@1

  v1 = this;
  GameFrameWork::NcCharReviveCmd((GameFrameWork *)this->m_pkFrameWork);
  PgWin::PostMsg((PgWin *)&v1->vfptr, 1u, 0, 0);
}

//----- (0057BBA0) --------------------------------------------------------
void __thiscall ReviveMenuWin::EnableBtns(ReviveMenuWin *this, ReviveMenuWin::BtnIndex e, int state)
{
  ReviveMenuWin *v3; // esi@1
  char *v4; // esi@6
  signed int v5; // edi@6
  void (__stdcall *v6)(D3DXCOLOR *); // edx@7

  v3 = this;
  if ( e == 4 )
  {
    v4 = (char *)this->m_BtnText;
    v5 = 4;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v4 - 4) + 240))(state);
      v6 = *(void (__stdcall **)(D3DXCOLOR *))(**(_DWORD **)v4 + 468);
      if ( (_BYTE)state == 1 )
        v6(&Color::m_kDxWhiteColor);
      else
        v6((D3DXCOLOR *)&Color::m_kDxGrayColor);
      v4 += 4;
      --v5;
    }
    while ( v5 );
  }
  else
  {
    ((void (__stdcall *)(_DWORD))this->m_Btn[e]->vfptr[60].__vecDelDtor)(state);
    if ( (_BYTE)state == 1 )
      v3->m_BtnText[e]->vfptr[117].__vecDelDtor((NiRefObject *)v3->m_BtnText[e], (unsigned int)&Color::m_kDxWhiteColor);
    else
      v3->m_BtnText[e]->vfptr[117].__vecDelDtor((NiRefObject *)v3->m_BtnText[e], (unsigned int)&Color::m_kDxGrayColor);
    ((void (__stdcall *)(_DWORD))v3->m_Btn[1]->vfptr[60].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v3->m_BtnText[1]->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  }
}

//----- (0057BC70) --------------------------------------------------------
void __thiscall ReviveMenuWin::ReviveMenuWin(ReviveMenuWin *this)
{
  ReviveMenuWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ReviveMenuWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ReviveMenuWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkTextWin.m_pObject = 0;
  v1->m_pkTextWin2.m_pObject = 0;
  v1->m_fAutoReviveTime = 300.0;
  v1->m_byPriority = 0;
  v1->m_bCanReviveItem = 1;
}
// 99EBF8: using guessed type void (__thiscall *ReviveMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99EC14: using guessed type int (__thiscall *ReviveMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0057BCC0) --------------------------------------------------------
void __thiscall ReviveMenuWin::~ReviveMenuWin(ReviveMenuWin *this)
{
  ReviveMenuWin *v1; // esi@1
  PgWinText *v2; // edi@1
  PgWinText *v3; // edi@5

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ReviveMenuWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ReviveMenuWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_pkTextWin2.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_pkTextWin.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 99EBF8: using guessed type void (__thiscall *ReviveMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99EC14: using guessed type int (__thiscall *ReviveMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0057BD70) --------------------------------------------------------
char __thiscall ReviveMenuWin::Create(ReviveMenuWin *this, PgFrameWork *pkFrameWork)
{
  ReviveMenuWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // ebx@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  PgSprData *v10; // eax@15
  NiSourceTexture *v11; // eax@15
  PgSprData *v12; // eax@16
  NiSourceTexture *v13; // eax@17
  PgWinSpr *v14; // eax@18
  PgSprData *v15; // eax@20
  PgFont *v16; // ebx@20
  unsigned int v17; // ST3C_4@20
  int v18; // eax@20
  NiD3DDefaultShader *v19; // eax@20
  unsigned int v20; // ST3C_4@20
  int v21; // eax@20
  NiD3DDefaultShader *v22; // eax@20
  PgSprData *v23; // ebx@20
  PgWinBut *v24; // ST44_4@20
  PgWinBut *v25; // ebx@20
  PgFont *v26; // ST40_4@20
  unsigned int v27; // ST3C_4@20
  unsigned int v28; // eax@20
  PgWinText *v29; // eax@20
  int v30; // ebx@20
  char *v31; // eax@20
  char *v32; // eax@20
  PgWinBut *v33; // ST44_4@20
  PgFont *v34; // ST40_4@20
  unsigned int v35; // ST3C_4@20
  unsigned int v36; // eax@20
  PgWinText *v37; // eax@20
  NiUnsharedGeometryGroup *v38; // eax@20
  PgWinBut *v39; // ST44_4@20
  PgFont *v40; // ST40_4@20
  unsigned int v41; // ST3C_4@20
  unsigned int v42; // eax@20
  PgWinText *v43; // eax@20
  char *v44; // eax@20
  char *v45; // eax@20
  PgSprData *v46; // edi@20
  PgWinBut *v47; // ST44_4@20
  PgWinBut *v48; // edi@20
  PgFont *v49; // ST40_4@20
  unsigned int v50; // ST3C_4@20
  unsigned int v51; // eax@20
  PgWinText *v52; // eax@20
  NiRefObjectVtbl *v53; // edi@20
  NiUnsharedGeometryGroup *v54; // eax@20
  signed int v55; // edi@20
  NiSourceTexture *v56; // edi@22
  PgSprData *v57; // edi@23
  NiNode *v58; // esi@24
  unsigned int uiWidth; // [sp+60h] [bp-20h]@15
  unsigned int uiHeight; // [sp+64h] [bp-1Ch]@15
  int uiLeft; // [sp+68h] [bp-18h]@11
  int uiTop; // [sp+6Ch] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+70h] [bp-10h]@1
  int v64; // [sp+7Ch] [bp-4h]@1
  PgSprData *pkSprData; // [sp+88h] [bp+8h]@20
  PgSprData *pkSprDataa; // [sp+88h] [bp+8h]@20
  PgSprData *pkSprDatab; // [sp+88h] [bp+8h]@20
  PgSprData *pkSprDatac; // [sp+88h] [bp+8h]@20
  PgSprData *pkSprDatad; // [sp+88h] [bp+8h]@20

  v2 = this;
  spNode.m_pObject = 0;
  v64 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v64 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "Common\\RevivalMenu.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "ReviveMenuWin", 0) )
  {
    v4 = spNode.m_pObject;
    v64 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
    goto LABEL_5;
  }
  PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight);
  v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft - 3, uiTop - 1, v10, (PgWin *)&v2->vfptr, 0, 0);
  v11 = MenuTexMgr::GetTexture(0x13u);
  if ( v11 )
  {
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v11);
  }
  else
  {
    v13 = MenuTexMgr::GetTexture(0x14u);
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v13);
  }
  v14 = PgWinSpr::CreateWin(uiLeft - 3, uiTop - 1, v12, (PgWin *)&v2->vfptr, 0, 0);
  if ( v14 )
    v14->vfptr[60].__vecDelDtor((NiRefObject *)v14, 0);
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft - 3, uiTop - 1, v15, (PgWin *)&v2->vfptr, 0, 0);
  PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextBox", &uiLeft, &uiTop, v3);
  v16 = Font::Get(0);
  v17 = v16->m_uiDefHeight;
  v18 = ((int (__thiscall *)(ReviveMenuWin *))v2->vfptr[36].__vecDelDtor)(v2);
  v19 = (NiD3DDefaultShader *)PgWinText::CreateWin(uiLeft - 6, uiTop + 8, v18 - 16, v17, v16, (PgWin *)&v2->vfptr, 0, 0);
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_pkTextWin, v19);
  ((void (__stdcall *)(_DWORD))v2->m_pkTextWin.m_pObject->vfptr[60].__vecDelDtor)(0);
  v20 = v16->m_uiDefHeight;
  v21 = ((int (__thiscall *)(ReviveMenuWin *))v2->vfptr[36].__vecDelDtor)(v2);
  v22 = (NiD3DDefaultShader *)PgWinText::CreateWin(8, 23, v21 - 16, v20, v16, (PgWin *)&v2->vfptr, 0, 0);
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_pkTextWin2, v22);
  ((void (__stdcall *)(_DWORD))v2->m_pkTextWin2.m_pObject->vfptr[60].__vecDelDtor)(0);
  v23 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Nor", &uiLeft, &uiTop, v3);
  PgSprData::Add(v23, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
  PgSprData::Add(v23, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
  v24 = PgWinBut::CreateWin(uiLeft, uiTop, v23, (PgWin *)&v2->vfptr, 0, 0, 0);
  v2->m_Btn[0] = v24;
  v25 = v24;
  v26 = Font::Get(0);
  v27 = ((int (__thiscall *)(PgWinBut *))v25->vfptr[37].__vecDelDtor)(v25);
  v28 = ((int (__thiscall *)(PgWinBut *))v25->vfptr[36].__vecDelDtor)(v25);
  v29 = PgWinText::CreateWin(0, 0, v28, v27, v26, (PgWin *)&v24->vfptr, 0, 0);
  v30 = (int)v2->m_BtnText;
  v2->m_BtnText[0] = v29;
  v29->vfptr[122].__vecDelDtor((NiRefObject *)v29, 5u);
  pkSprData = (PgSprData *)&v2->m_BtnText[0]->vfptr[118];
  v31 = (char *)TextData2::Get(0xE8FACDDB);
  v32 = fs(v31);
  ((void (__thiscall *)(PgWinText *, char *))pkSprData->vfptr)(v2->m_BtnText[0], v32);
  ((void (__stdcall *)(_DWORD))v2->m_BtnText[0]->vfptr[60].__vecDelDtor)(0);
  pkSprDataa = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Nor", &uiLeft, &uiTop, v3);
  PgSprData::Add(pkSprDataa, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Click");
  PgSprData::Add(pkSprDataa, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Over");
  v33 = PgWinBut::CreateWin(uiLeft, uiTop, pkSprDataa, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v2->m_Btn[1] = v33;
  v34 = Font::Get(0);
  v35 = ((int (*)(void))v33->vfptr[37].__vecDelDtor)();
  v36 = ((int (*)(void))v33->vfptr[36].__vecDelDtor)();
  v37 = PgWinText::CreateWin(0, 0, v36, v35, v34, (PgWin *)&v33->vfptr, 0, 0);
  v2->m_BtnText[1] = v37;
  v37->vfptr[122].__vecDelDtor((NiRefObject *)v37, 5u);
  pkSprDatab = (PgSprData *)&v2->m_BtnText[1]->vfptr[118];
  v38 = TextData::Get(0x7C9CDAE8u);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkSprDatab->vfptr)(v2->m_BtnText[1], v38);
  ((void (__stdcall *)(_DWORD))v2->m_BtnText[1]->vfptr[60].__vecDelDtor)(0);
  pkSprDatac = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Nor", &uiLeft, &uiTop, v3);
  PgSprData::Add(pkSprDatac, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Click");
  PgSprData::Add(pkSprDatac, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Over");
  v39 = PgWinBut::CreateWin(uiLeft, uiTop, pkSprDatac, (PgWin *)&v2->vfptr, 2u, 0, 0);
  v2->m_Btn[2] = v39;
  v40 = Font::Get(0);
  v41 = ((int (*)(void))v39->vfptr[37].__vecDelDtor)();
  v42 = ((int (*)(void))v39->vfptr[36].__vecDelDtor)();
  v43 = PgWinText::CreateWin(0, 0, v42, v41, v40, (PgWin *)&v39->vfptr, 0, 0);
  v2->m_BtnText[2] = v43;
  v43->vfptr[122].__vecDelDtor((NiRefObject *)v43, 5u);
  pkSprDatad = (PgSprData *)&v2->m_BtnText[2]->vfptr[118];
  v44 = (char *)TextData2::Get(0x475B8382u);
  v45 = fs(v44, 0);
  ((void (__thiscall *)(PgWinText *, char *))pkSprDatad->vfptr)(v2->m_BtnText[2], v45);
  ((void (__stdcall *)(_DWORD))v2->m_BtnText[2]->vfptr[60].__vecDelDtor)(0);
  v46 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn04Nor", &uiLeft, &uiTop, v3);
  PgSprData::Add(v46, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn04Click");
  PgSprData::Add(v46, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn04Over");
  v47 = PgWinBut::CreateWin(uiLeft, uiTop, v46, (PgWin *)&v2->vfptr, 3u, 0, 0);
  v2->m_Btn[3] = v47;
  v48 = v47;
  v49 = Font::Get(0);
  v50 = ((int (__thiscall *)(PgWinBut *))v48->vfptr[37].__vecDelDtor)(v48);
  v51 = ((int (__thiscall *)(PgWinBut *))v48->vfptr[36].__vecDelDtor)(v48);
  v52 = PgWinText::CreateWin(0, 0, v51, v50, v49, (PgWin *)&v47->vfptr, 0, 0);
  v2->m_BtnText[3] = v52;
  v52->vfptr[122].__vecDelDtor((NiRefObject *)v52, 5u);
  v53 = v2->m_BtnText[3]->vfptr;
  v54 = TextData2::Get(0xFD07302D);
  v53[118].__vecDelDtor((NiRefObject *)v2->m_BtnText[3], (unsigned int)v54);
  ((void (__stdcall *)(_DWORD))v2->m_BtnText[3]->vfptr[60].__vecDelDtor)(0);
  v55 = 4;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v30 - 16) + 240))(0);
    (*(void (__stdcall **)(void *))(**(_DWORD **)v30 + 468))(&Color::m_kDxGrayColor);
    v30 += 4;
    --v55;
  }
  while ( v55 );
  v56 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    v57 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, v56);
    PgSprData::Add(v57, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(v57, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft, uiTop, v57, (PgWin *)&v2->vfptr, 4u, 0, 0);
  }
  ((void (__thiscall *)(ReviveMenuWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  v58 = spNode.m_pObject;
  v64 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v58 )
    v58->vfptr->__vecDelDtor((NiRefObject *)v58, 1u);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0057C4F0) --------------------------------------------------------
void __userpurge ReviveMenuWin::UpdateMeWin(ReviveMenuWin *this@<ecx>, int a2@<esi>, float fCurTime)
{
  ReviveMenuWin *v3; // esi@1
  double v4; // st7@1
  double v5; // st7@3
  char *v6; // eax@4
  const char *v7; // eax@4
  NiUnsharedGeometryGroup *v8; // eax@5
  PgWinText *v9; // edx@6
  int v10; // [sp-4h] [bp-114h]@1
  PgWinText *TextWinArray[2]; // [sp+0h] [bp-110h]@4
  float fPastTime; // [sp+8h] [bp-108h]@1
  char acStr[256]; // [sp+Ch] [bp-104h]@4

  v10 = a2;
  v3 = this;
  fPastTime = fCurTime - this->m_fDeadTime;
  v4 = fPastTime;
  fPastTime = this->m_fAutoReviveTime - fPastTime;
  if ( this->m_fAutoReviveTime > v4 )
  {
    v5 = fPastTime;
    if ( fPastTime < 60.0 )
    {
      *(_QWORD *)TextWinArray = (signed __int64)v5;
      v8 = TextData::Get(0x7795949Cu);
      sprintf(acStr, (const char *)v8, (unsigned int)(signed __int64)v5);
    }
    else
    {
      *(_QWORD *)TextWinArray = (signed __int64)v5;
      v6 = (char *)TextData::Get(0x82998E9C);
      v7 = fs(v6, (unsigned int)(signed __int64)v5 / 0x3C % 0x3C, (unsigned int)(signed __int64)v5 % 0x3C);
      sprintf(acStr, v7);
    }
    ((void (__stdcall *)(void *, int))v3->m_pkTextWin.m_pObject->vfptr[118].__vecDelDtor)(&unk_99EAD3, v10);
    ((void (__cdecl *)(void *, PgWinText *, PgWinText *))v3->m_pkTextWin2.m_pObject->vfptr[118].__vecDelDtor)(
      &unk_99EADA,
      TextWinArray[0],
      TextWinArray[1]);
    v9 = v3->m_pkTextWin2.m_pObject;
    TextWinArray[0] = v3->m_pkTextWin.m_pObject;
    TextWinArray[1] = v9;
    PgWinText::SetArrayText(TextWinArray, 2u, acStr);
  }
  else
  {
    GameFrameWork::NcCharReviveCmd((GameFrameWork *)this->m_pkFrameWork);
    PgWin::PostMsg((PgWin *)&v3->vfptr, 1u, 0, 0);
  }
}
// 57C4F0: could not find valid save-restore pair for esi

//----- (0057C6A0) --------------------------------------------------------
void __thiscall ReviveMenuWin::OnClose(ReviveMenuWin *this)
{
  ReviveMenuWin *v1; // esi@1
  int v2; // esi@1
  signed int v3; // edi@1

  v1 = this;
  InventoryWin::UnLockAllItem((InventoryWin *)this->m_pkFrameWork[19].m_BackFrameID);
  InventoryWin::UnLockAllEquipItem((InventoryWin *)v1->m_pkFrameWork[19].m_BackFrameID);
  v2 = (int)v1->m_BtnText;
  v3 = 4;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v2 - 16) + 240))(0);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 468))(&Color::m_kDxGrayColor);
    v2 += 4;
    --v3;
  }
  while ( v3 );
}

//----- (0057C700) --------------------------------------------------------
void __thiscall ReviveMenuWin::OnReviveFromItem(ReviveMenuWin *this)
{
  ReviveMenuWin *v1; // esi@1

  v1 = this;
  GameFrameWork::On_NC_ITEM_REVIVEITEMUSE_CMD((GameFrameWork *)this->m_pkFrameWork);
  ((void (__stdcall *)(_DWORD))v1->m_Btn[2]->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_BtnText[2]->vfptr[117].__vecDelDtor)(&Color::m_kDxGrayColor);
  ((void (__stdcall *)(_DWORD))v1->m_Btn[1]->vfptr[60].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_BtnText[1]->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
}

//----- (0057C760) --------------------------------------------------------
void __thiscall ReviveMenuWin::OnReviveFromCleric(ReviveMenuWin *this)
{
  ReviveMenuWin *v1; // esi@1

  v1 = this;
  GameFrameWork::On_NC_SKILL_REPLYREVIVE_CMD((GameFrameWork *)this->m_pkFrameWork);
  ((void (__stdcall *)(_DWORD))v1->m_Btn[3]->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_BtnText[3]->vfptr[117].__vecDelDtor)(&Color::m_kDxGrayColor);
  ((void (__stdcall *)(_DWORD))v1->m_Btn[1]->vfptr[60].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_BtnText[1]->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
}

//----- (0057C7C0) --------------------------------------------------------
void __thiscall ReviveMenuWin::SetReviveBtn(ReviveMenuWin *this, unsigned int Count)
{
  ReviveMenuWin *v2; // esi@1
  char *v3; // eax@3
  char *v4; // eax@3

  v2 = this;
  if ( this->m_bCanReviveItem )
    ReviveMenuWin::EnableBtns(this, BTN_INDEX_REVIVE_FROM_ITEM, Count != 0);
  v3 = (char *)TextData2::Get(0x475B8382u);
  v4 = fs(v3, Count);
  ((void (__stdcall *)(_DWORD))v2->m_BtnText[2]->vfptr[118].__vecDelDtor)(v4);
}

//----- (0057C820) --------------------------------------------------------
void __thiscall ReviveMenuWin::OnCommand(ReviveMenuWin *this, unsigned int wParam, int lParam)
{
  ReviveMenuWin *v3; // esi@1
  GameFrameWork *v4; // eax@7
  int v5; // esi@10
  signed int v6; // edi@10

  v3 = this;
  switch ( wParam )
  {
    case 0u:
      GameFrameWork::NcCharReviveCmd((GameFrameWork *)this->m_pkFrameWork);
      PgWin::PostMsg((PgWin *)&v3->vfptr, 1u, 0, 0);
      goto LABEL_10;
    case 1u:
      if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
        GameFrameWork::NcMiscItemShopUrlReq();
      break;
    case 2u:
      ReviveMenuWin::OnReviveFromItem(this);
      break;
    case 3u:
      ReviveMenuWin::OnReviveFromCleric(this);
      break;
    case 4u:
      v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v4 )
        GameFrameWork::OpenPlayGuideSearchList(v4, "RevivalMenu");
      break;
    default:
      if ( !wParam )
      {
LABEL_10:
        v5 = (int)v3->m_BtnText;
        v6 = 4;
        do
        {
          (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v5 - 16) + 240))(0);
          (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v5 + 468))(&Color::m_kDxGrayColor);
          v5 += 4;
          --v6;
        }
        while ( v6 );
      }
      break;
  }
}

//----- (0057C910) --------------------------------------------------------
ReviveMenuWin *__cdecl ReviveMenuWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  ReviveMenuWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x190u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&ReviveMenuWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&ReviveMenuWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = 0;
    v2[1].m_kLocal.m_Rotate.m_pEntry[1][1] = 300.0;
    LOBYTE(v2[1].m_kWorld.m_Rotate.m_pEntry[0][1]) = 0;
    LOBYTE(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 1;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (ReviveMenuWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 99EBF8: using guessed type void (__thiscall *ReviveMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99EC14: using guessed type int (__thiscall *ReviveMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0057CA70) --------------------------------------------------------
ReviveMenuWin *__thiscall ReviveMenuWin::`scalar deleting destructor'(ReviveMenuWin *this, unsigned int a2)
{
  ReviveMenuWin *v2; // esi@1

  v2 = this;
  ReviveMenuWin::~ReviveMenuWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0057CAA0) --------------------------------------------------------
char __thiscall RewardInvWin::Create(RewardInvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent)
{
  RewardInvWin *v5; // esi@1
  char result; // al@1

  v5 = this;
  result = PgWinLRBut::Create((PgWinLRBut *)&this->vfptr, iXPos, iYPos, 0x20u, 0x20u, pkParent, 0, 0);
  if ( result )
  {
    v5->m_uiInvIndex = uiInvIndex;
    result = 1;
  }
  return result;
}

//----- (0057CAE0) --------------------------------------------------------
void __thiscall RewardWin::RewardWin(RewardWin *this)
{
  RewardWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_pkTitleTextWin = 0;
  v1->vfptr = (NiRefObjectVtbl *)&RewardWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&RewardWin::`vftable'{for `IDirectMessenger'};
  v1->m_apkInvWin[0] = 0;
  v1->m_apkInvWin[1] = 0;
  v1->m_apkInvWin[2] = 0;
  v1->m_apkInvWin[3] = 0;
  v1->m_apkInvWin[4] = 0;
  v1->m_apkInvWin[5] = 0;
  v1->m_apkInvWin[6] = 0;
  v1->m_apkInvWin[7] = 0;
  v1->m_apkInvWin[8] = 0;
  v1->m_apkInvWin[9] = 0;
  v1->m_apkSelectInvWin[0] = 0;
  v1->m_apkSelectInvWin[1] = 0;
  v1->m_apkSelectInvWin[2] = 0;
  v1->m_apkSelectInvWin[3] = 0;
  v1->m_apkSelectInvWin[4] = 0;
  v1->m_apkSelectInvWin[5] = 0;
  v1->m_apkSelectInvWin[6] = 0;
  v1->m_apkSelectInvWin[7] = 0;
  v1->m_apkSelectInvWin[8] = 0;
  v1->m_apkSelectInvWin[9] = 0;
  *(_WORD *)&v1->m_bHaveSelectRewardQuest = 0;
  v1->m_kCurrQuestID = -1;
  v1->m_iSelectedReward = -1;
}
// 99EEF4: using guessed type void (__thiscall *RewardWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99EF14: using guessed type int (__thiscall *RewardWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0057CBA0) --------------------------------------------------------
void __thiscall RewardWin::~RewardWin(RewardWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&RewardWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&RewardWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 99EEF4: using guessed type void (__thiscall *RewardWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99EF14: using guessed type int (__thiscall *RewardWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0057CBC0) --------------------------------------------------------
void __thiscall RewardWin::OnInvLClick(RewardWin *this, unsigned int uiInvIndex)
{
  if ( this->m_iSelectedReward != uiInvIndex )
  {
    if ( this->m_bIsNpcReward )
      this->m_iSelectedReward = uiInvIndex;
  }
}

//----- (0057CC20) --------------------------------------------------------
char __stdcall RewardWin::HasSelectableReward(unsigned __int16 qID)
{
  CClientQuest *v2; // eax@1
  char result; // al@2
  CQuestData *v4; // edi@3
  QUEST_DATA *v5; // eax@4
  signed int v6; // ecx@4
  QUEST_DATA::QUEST_REWARD *v7; // eax@4

  v2 = QuestDataMgr::GetQuest();
  if ( v2 )
  {
    v4 = v2->m_pQuestData;
    if ( v4 )
    {
      CQuest::GetQuestInfo((CQuest *)&v2->vfptr, qID);
      v5 = CQuestData::GetQuestData(v4, qID);
      v6 = 0;
      v7 = v5->Reward;
      while ( !v7->Use || v7->Use != 2 )
      {
        ++v6;
        ++v7;
        if ( v6 >= 12 )
          goto LABEL_8;
      }
      result = 1;
    }
    else
    {
LABEL_8:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0057CC80) --------------------------------------------------------
int __thiscall RewardWin::GetRealSelectReword(RewardWin *this)
{
  RewardWin *v1; // esi@1
  CClientQuest *v2; // eax@1
  int result; // eax@2
  CQuestData *v4; // edi@3
  QUEST_DATA *v5; // eax@4
  int v6; // esi@4
  QUEST_DATA *v7; // ecx@4
  QUEST_DATA::QUEST_REWARD *v8; // edx@5

  v1 = this;
  v2 = QuestDataMgr::GetQuest();
  if ( v2 )
  {
    v4 = v2->m_pQuestData;
    if ( v4 )
    {
      CQuest::GetQuestInfo((CQuest *)&v2->vfptr, v1->m_kCurrQuestID);
      v5 = CQuestData::GetQuestData(v4, v1->m_kCurrQuestID);
      v6 = v1->m_iSelectedReward;
      v7 = v5;
      if ( v6 >= 0 )
      {
        result = 0;
        v8 = v7->Reward;
        do
        {
          if ( v8->Use && v8->Use == 2 )
          {
            if ( !v6 )
              return result;
            --v6;
          }
          ++result;
          ++v8;
        }
        while ( result < 12 );
      }
    }
    result = -1;
  }
  else
  {
    result = -1;
  }
  return result;
}

//----- (0057CCF0) --------------------------------------------------------
void __thiscall RewardWin::SetNpcRewardMode(RewardWin *this, bool b)
{
  RewardWin *v2; // ebx@1
  IconWin **v3; // esi@1
  signed int v4; // edi@1

  v2 = this;
  this->m_bIsNpcReward = b;
  v3 = (IconWin **)this->m_apkSelectInvWin;
  v4 = 10;
  do
  {
    IconWin::ShowFocus(*v3, v2->m_bIsNpcReward != 0);
    ++v3;
    --v4;
  }
  while ( v4 );
}

//----- (0057CD40) --------------------------------------------------------
void __thiscall RewardWin::ShowSelectInvWin(RewardWin *this, int b)
{
  RewardWin *v2; // esi@1
  int v3; // esi@1
  signed int v4; // ebx@1

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkRewardTextWin->vfptr[64].__vecDelDtor)(b);
  v3 = (int)v2->m_apkSelectInvWin;
  v4 = 10;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v3 + 52) + 256))(b);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 256))(b);
    v3 += 4;
    --v4;
  }
  while ( v4 );
}

//----- (0057CDA0) --------------------------------------------------------
int __stdcall RewardWin::GetRewardItemCount(unsigned __int16 qID)
{
  CClientQuest *v2; // eax@1
  CQuestData *v4; // ecx@3
  QUEST_DATA *v5; // eax@4
  int v6; // ecx@5
  int v7; // esi@5
  char v8; // bl@5
  signed int v9; // edi@5

  v2 = QuestDataMgr::GetQuest();
  if ( !v2 )
    return 0;
  v4 = v2->m_pQuestData;
  if ( !v4 )
    return 0;
  v5 = CQuestData::GetQuestData(v4, qID);
  if ( !v5 )
    return 0;
  v6 = (int)&v5->Reward[1].Type;
  v7 = 0;
  v8 = 0;
  v9 = 2;
  do
  {
    if ( v6 != 13 && *(_BYTE *)(v6 - 12) == 2 )
    {
      if ( *(_BYTE *)(v6 - 13) != 2 )
        goto LABEL_11;
      if ( !v8 )
      {
        v8 = 1;
LABEL_11:
        ++v7;
        goto LABEL_12;
      }
    }
LABEL_12:
    if ( v6 == 1 || *(_BYTE *)v6 != 2 )
      goto LABEL_18;
    if ( *(_BYTE *)(v6 - 1) == 2 )
    {
      if ( v8 )
        goto LABEL_18;
      v8 = 1;
    }
    ++v7;
LABEL_18:
    if ( v6 != -11 && *(_BYTE *)(v6 + 12) == 2 )
    {
      if ( *(_BYTE *)(v6 + 11) != 2 )
        goto LABEL_23;
      if ( !v8 )
      {
        v8 = 1;
LABEL_23:
        ++v7;
        goto LABEL_24;
      }
    }
LABEL_24:
    if ( v6 == -23 || *(_BYTE *)(v6 + 24) != 2 )
      goto LABEL_30;
    if ( *(_BYTE *)(v6 + 23) == 2 )
    {
      if ( v8 )
        goto LABEL_30;
      v8 = 1;
    }
    ++v7;
LABEL_30:
    if ( v6 != -35 && *(_BYTE *)(v6 + 36) == 2 )
    {
      if ( *(_BYTE *)(v6 + 35) != 2 )
        goto LABEL_35;
      if ( !v8 )
      {
        v8 = 1;
LABEL_35:
        ++v7;
        goto LABEL_36;
      }
    }
LABEL_36:
    if ( v6 != -47 && *(_BYTE *)(v6 + 48) == 2 )
    {
      if ( *(_BYTE *)(v6 + 47) == 2 )
      {
        if ( v8 )
          goto LABEL_42;
        v8 = 1;
      }
      ++v7;
    }
LABEL_42:
    v6 += 72;
    --v9;
  }
  while ( v9 );
  return v7;
}

//----- (0057CE80) --------------------------------------------------------
void __thiscall RewardInvWin::OnFirstHitWin(RewardInvWin *this)
{
  RewardInvWin *v1; // esi@1
  RewardInvItem *v2; // eax@1
  ItemInfoWin *v3; // ecx@2
  Item *v4; // eax@6

  v1 = this;
  v2 = this->m_spRewardInvItem.m_pObject;
  if ( v2 )
  {
    v3 = (ItemInfoWin *)this->m_pkToolTipWin;
    if ( v3 )
    {
      switch ( v2->m_eItemType )
      {
        case 0:
          ItemInfoWin::SetItemExpInfo(v3, v2->m_i64Exp);
          PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
          break;
        case 1:
          ItemInfoWin::SetItemMoneyInfo(v3, v2->m_i64Money);
          PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
          break;
        case 2:
          v4 = v2->m_spItem.m_pObject;
          if ( !v4 )
            goto LABEL_9;
          ItemInfoWin::SetItemInfo(v3, v4);
          PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
          break;
        case 4:
          ItemInfoWin::SetItemFameInfo(v3, v2->m_iFameVal);
          goto LABEL_9;
        default:
LABEL_9:
          PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
          break;
      }
    }
  }
}

//----- (0057CF10) --------------------------------------------------------
void __thiscall RewardInvWin::ShowSelected(RewardInvWin *this, bool b)
{
  bool v2; // zf@1
  NiAVObject *v3; // ecx@1

  v2 = this->m_spRewardInvItem.m_pObject == 0;
  v3 = this->m_spClickGeom.m_pObject;
  if ( v2 || !b )
    v3->m_uFlags |= 1u;
  else
    v3->m_uFlags &= 0xFFFEu;
}

//----- (0057CF40) --------------------------------------------------------
void __thiscall RewardWin::OnCommand(RewardWin *this, unsigned int wParam, int lParam)
{
  if ( wParam == 10 && this->m_iSelectedReward != lParam )
  {
    if ( this->m_bIsNpcReward )
      this->m_iSelectedReward = lParam;
  }
}

//----- (0057CF70) --------------------------------------------------------
RewardInvWin *__thiscall RewardWin::GetFreeSlot(RewardWin *this)
{
  unsigned int v1; // eax@1
  char *v2; // edx@1

  v1 = 0;
  v2 = (char *)this->m_apkInvWin;
  while ( *(_DWORD *)(*(_DWORD *)v2 + 380) )
  {
    ++v1;
    v2 += 4;
    if ( v1 >= 0xA )
      return 0;
  }
  return this->m_apkInvWin[v1];
}

//----- (0057CFB0) --------------------------------------------------------
RewardInvWin *__thiscall RewardWin::GetFreeSelectSlot(RewardWin *this)
{
  unsigned int v1; // eax@1
  char *v2; // edx@1

  v1 = 0;
  v2 = (char *)this->m_apkSelectInvWin;
  while ( *(_DWORD *)(*(_DWORD *)v2 + 380) )
  {
    ++v1;
    v2 += 4;
    if ( v1 >= 0xA )
      return 0;
  }
  return this->m_apkSelectInvWin[v1];
}

//----- (0057CFF0) --------------------------------------------------------
void __thiscall RewardWin::UpdateMeWin(RewardWin *this, float fCurTime)
{
  signed int v2; // edi@2
  char *v3; // edx@2
  int v4; // eax@3
  bool v5; // zf@4
  int v6; // eax@4
  int v7; // eax@8
  int v8; // eax@9
  int v9; // eax@13
  int v10; // eax@14
  int v11; // eax@18
  int v12; // eax@19
  int v13; // eax@23
  int v14; // eax@24

  if ( this->m_bHaveSelectRewardQuest )
  {
    v2 = 2;
    v3 = (char *)&this->m_apkSelectInvWin[1];
    do
    {
      v4 = *((_DWORD *)v3 - 1);
      if ( v2 - 2 == this->m_iSelectedReward )
      {
        v5 = *(_DWORD *)(v4 + 380) == 0;
        v6 = *(_DWORD *)(v4 + 356);
        if ( !v5 )
        {
          *(_WORD *)(v6 + 28) &= 0xFFFEu;
          goto LABEL_8;
        }
      }
      else
      {
        v5 = *(_DWORD *)(v4 + 380) == 0;
        v6 = *(_DWORD *)(v4 + 356);
      }
      *(_WORD *)(v6 + 28) |= 1u;
LABEL_8:
      v7 = *(_DWORD *)v3;
      if ( v2 - 1 == this->m_iSelectedReward )
      {
        v5 = *(_DWORD *)(v7 + 380) == 0;
        v8 = *(_DWORD *)(v7 + 356);
        if ( !v5 )
        {
          *(_WORD *)(v8 + 28) &= 0xFFFEu;
          goto LABEL_13;
        }
      }
      else
      {
        v5 = *(_DWORD *)(v7 + 380) == 0;
        v8 = *(_DWORD *)(v7 + 356);
      }
      *(_WORD *)(v8 + 28) |= 1u;
LABEL_13:
      v9 = *((_DWORD *)v3 + 1);
      if ( v2 == this->m_iSelectedReward )
      {
        v5 = *(_DWORD *)(v9 + 380) == 0;
        v10 = *(_DWORD *)(v9 + 356);
        if ( !v5 )
        {
          *(_WORD *)(v10 + 28) &= 0xFFFEu;
          goto LABEL_18;
        }
      }
      else
      {
        v5 = *(_DWORD *)(v9 + 380) == 0;
        v10 = *(_DWORD *)(v9 + 356);
      }
      *(_WORD *)(v10 + 28) |= 1u;
LABEL_18:
      v11 = *((_DWORD *)v3 + 2);
      if ( v2 + 1 == this->m_iSelectedReward )
      {
        v5 = *(_DWORD *)(v11 + 380) == 0;
        v12 = *(_DWORD *)(v11 + 356);
        if ( !v5 )
        {
          *(_WORD *)(v12 + 28) &= 0xFFFEu;
          goto LABEL_23;
        }
      }
      else
      {
        v5 = *(_DWORD *)(v11 + 380) == 0;
        v12 = *(_DWORD *)(v11 + 356);
      }
      *(_WORD *)(v12 + 28) |= 1u;
LABEL_23:
      v13 = *((_DWORD *)v3 + 3);
      if ( v2 + 2 != this->m_iSelectedReward )
      {
        v5 = *(_DWORD *)(v13 + 380) == 0;
        v14 = *(_DWORD *)(v13 + 356);
LABEL_27:
        *(_WORD *)(v14 + 28) |= 1u;
        goto LABEL_28;
      }
      v5 = *(_DWORD *)(v13 + 380) == 0;
      v14 = *(_DWORD *)(v13 + 356);
      if ( v5 )
        goto LABEL_27;
      *(_WORD *)(v14 + 28) &= 0xFFFEu;
LABEL_28:
      v2 += 5;
      v3 += 20;
    }
    while ( v2 - 2 < 10 );
  }
}

//----- (0057D150) --------------------------------------------------------
void __thiscall RewardInvItem::RewardInvItem(RewardInvItem *this, QUEST_DATA::QUEST_REWARD_TYPE eType)
{
  RewardInvItem *v2; // esi@1
  Item *v3; // edi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v2->vfptr = (NiRefObjectVtbl *)&RewardInvItem::`vftable';
  v2->m_spItem.m_pObject = 0;
  v2->m_eItemType = eType;
  v3 = v2->m_spItem.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spItem.m_pObject = 0;
  }
  LODWORD(v2->m_i64Money) = 0;
  HIDWORD(v2->m_i64Money) = 0;
  LODWORD(v2->m_i64Exp) = 0;
  HIDWORD(v2->m_i64Exp) = 0;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 99F138: using guessed type int (__thiscall *RewardInvItem::`vftable')(void *p, char);

//----- (0057D1F0) --------------------------------------------------------
void __thiscall RewardInvItem::~RewardInvItem(RewardInvItem *this)
{
  RewardInvItem *v1; // edi@1
  Item *v2; // esi@1
  Item *v3; // esi@6

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&RewardInvItem::`vftable';
  v2 = this->m_spItem.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spItem.m_pObject = 0;
  }
  v3 = v1->m_spItem.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v1->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 99F138: using guessed type int (__thiscall *RewardInvItem::`vftable')(void *p, char);

//----- (0057D2A0) --------------------------------------------------------
void __thiscall RewardInvWin::~RewardInvWin(RewardInvWin *this)
{
  RewardInvWin *v1; // esi@1
  RewardInvItem *v2; // edi@1
  RewardInvItem *v3; // edi@6

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&RewardInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&RewardInvWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spRewardInvItem.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spRewardInvItem.m_pObject = 0;
  }
  v3 = v1->m_spRewardInvItem.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  IconWin::~IconWin((IconWin *)&v1->vfptr);
}
// 99F140: using guessed type void (__thiscall *RewardInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99F15C: using guessed type int (__thiscall *RewardInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0057D360) --------------------------------------------------------
void __thiscall RewardInvWin::DoAction(RewardInvWin *this)
{
  RewardInvWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiInvIndex);
}

//----- (0057D390) --------------------------------------------------------
void __thiscall RewardInvWin::DoRAction(RewardInvWin *this)
{
  RewardInvWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiRCmdMsg, v1->m_uiInvIndex);
}

//----- (0057D3C0) --------------------------------------------------------
void __thiscall RewardInvWin::SetRewardInvItem(RewardInvWin *this, RewardInvItem *pkRewardItem)
{
  RewardInvWin *v2; // esi@1
  RewardInvItem *v3; // edi@1
  NiRefObjectVtbl *v4; // edi@11
  NiSourceTexture *v5; // eax@11
  NiRefObjectVtbl *v6; // edx@11
  Item *v7; // eax@13
  ItemViewInfo *v8; // eax@14
  void *(__thiscall *v9)(NiRefObject *, unsigned int); // eax@20
  char *v10; // [sp-10h] [bp-1Ch]@10
  signed int v11; // [sp-Ch] [bp-18h]@10

  v2 = this;
  v3 = this->m_spRewardInvItem.m_pObject;
  if ( v3 != pkRewardItem )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spRewardInvItem.m_pObject = pkRewardItem;
    if ( pkRewardItem )
      InterlockedIncrement((volatile LONG *)&pkRewardItem->m_uiRefCount);
  }
  if ( v2->m_spRewardInvItem.m_pObject )
  {
    switch ( pkRewardItem->m_eItemType )
    {
      case 0:
        v11 = 9;
        v10 = "VarItem000";
        goto LABEL_11;
      case 1:
        v11 = 10;
        v10 = "VarItem000";
        goto LABEL_11;
      case 2:
        v7 = pkRewardItem->m_spItem.m_pObject;
        if ( !v7 )
          goto LABEL_20;
        v8 = IIDTableBase<ItemViewInfo,ItemViewInfoTab,unsigned short>::GetByID(v7->m_kStruct.itemid);
        v11 = v8->IconIndex;
        v10 = v8->IconFile;
        goto LABEL_11;
      case 3:
        v11 = 24;
        v10 = "VarItem000";
        goto LABEL_11;
      case 4:
        v11 = 22;
        v10 = "VarItem000";
        goto LABEL_11;
      case 5:
        v11 = 23;
        v10 = "VarItem000";
        goto LABEL_11;
      case 6:
        v11 = 26;
        v10 = "VarItem000";
        goto LABEL_11;
      case 7:
        v11 = 25;
        v10 = "VarItem000";
LABEL_11:
        v4 = v2->vfptr;
        v5 = IconMgr::GetTexture(v10);
        ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v4[146].__vecDelDtor)(v2, v5, v11, 32, 32);
        v6 = v2->vfptr;
        v2->m_uFlags &= 0xFFFEu;
        v6[60].__vecDelDtor((NiRefObject *)v2, 1u);
        break;
      default:
        return;
    }
  }
  else
  {
LABEL_20:
    ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v2->vfptr[146].__vecDelDtor)(v2, 0, -1, 32, 32);
    v9 = v2->vfptr[60].__vecDelDtor;
    v2->m_uFlags |= 1u;
    v9((NiRefObject *)&v2->vfptr, 0);
  }
}

//----- (0057D530) --------------------------------------------------------
void __thiscall RewardWin::ResetContents(RewardWin *this)
{
  int v1; // esi@2
  int v2; // edi@2
  int v3; // edi@10
  NiSourceTexture *v4; // eax@10
  ItemViewInfo *v5; // eax@13
  RewardInvWin **v6; // esi@22
  signed int v7; // edi@22
  char *v8; // [sp-10h] [bp-28h]@9
  signed int v9; // [sp-Ch] [bp-24h]@9
  signed int v10; // [sp+0h] [bp-18h]@0
  RewardWin *v11; // [sp+Ch] [bp-Ch]@1
  signed int v12; // [sp+10h] [bp-8h]@1
  char *v13; // [sp+14h] [bp-4h]@1

  v11 = this;
  v13 = (char *)this->m_apkInvWin;
  v12 = 10;
  do
  {
    v1 = *(_DWORD *)v13;
    v2 = *(_DWORD *)(*(_DWORD *)v13 + 380);
    if ( v2 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v2 + 4)) && v2 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v2)(v2, 1);
      *(_DWORD *)(v1 + 380) = 0;
    }
    if ( *(_DWORD *)(v1 + 380) )
    {
      switch ( ::v8 )
      {
        case 0u:
          v9 = 9;
          v8 = "VarItem000";
          goto LABEL_10;
        case 1u:
          v9 = 10;
          v8 = "VarItem000";
          goto LABEL_10;
        case 2u:
          if ( !vC )
            goto LABEL_19;
          v5 = IIDTableBase<ItemViewInfo,ItemViewInfoTab,unsigned short>::GetByID(*(_WORD *)(vC + 8));
          v9 = v5->IconIndex;
          v8 = v5->IconFile;
          goto LABEL_10;
        case 3u:
          v9 = 24;
          v8 = "VarItem000";
          goto LABEL_10;
        case 4u:
          v9 = 22;
          v8 = "VarItem000";
          goto LABEL_10;
        case 5u:
          v9 = 23;
          v8 = "VarItem000";
          goto LABEL_10;
        case 6u:
          v9 = 26;
          v8 = "VarItem000";
          goto LABEL_10;
        case 7u:
          v9 = 25;
          v8 = "VarItem000";
LABEL_10:
          v3 = *(_DWORD *)v1;
          v4 = IconMgr::GetTexture(v8);
          (*(void (__thiscall **)(int, NiSourceTexture *, signed int, signed int, signed int, signed int))(v3 + 584))(
            v1,
            v4,
            v9,
            32,
            32,
            v10);
          *(_WORD *)(v1 + 28) &= 0xFFFEu;
          v10 = 1;
          goto LABEL_20;
        default:
          break;
      }
    }
    else
    {
LABEL_19:
      (*(void (__thiscall **)(int, _DWORD, signed int, signed int, signed int, signed int))(*(_DWORD *)v1 + 584))(
        v1,
        0,
        -1,
        32,
        32,
        v10);
      *(_WORD *)(v1 + 28) |= 1u;
      v10 = 0;
LABEL_20:
      (*(void (__thiscall **)(int))(*(_DWORD *)v1 + 240))(v1);
    }
    v13 += 4;
    --v12;
  }
  while ( v12 );
  v6 = v11->m_apkSelectInvWin;
  v7 = 10;
  do
  {
    RewardInvWin::SetRewardInvItem(*v6, 0);
    ++v6;
    --v7;
  }
  while ( v7 );
}

//----- (0057D6D0) --------------------------------------------------------
void __thiscall RewardWin::UpdateReward(RewardWin *this, unsigned __int16 qID)
{
  RewardWin *v2; // ebx@1
  CClientQuest *v3; // eax@1
  CQuestData *v4; // edi@2
  QUEST_DATA *v5; // eax@3
  unsigned __int16 *v6; // edi@3
  unsigned __int8 v7; // al@4
  int v8; // eax@6
  RewardInvWin *v9; // esi@8
  RewardInvItem *v10; // eax@9
  int v11; // eax@10
  RewardInvWin *v12; // esi@13
  RewardInvItem *v13; // eax@14
  int v14; // eax@15
  int v15; // eax@18
  RewardInvWin *v16; // esi@20
  RewardInvItem *v17; // eax@21
  int v18; // eax@22
  RewardInvWin *v19; // esi@25
  RewardInvItem *v20; // eax@26
  int v21; // eax@27
  NiTimeController *v22; // ebx@30
  int v23; // ecx@33
  RewardInvWin *v24; // edi@33
  RewardInvItem *v25; // eax@34
  NiObjectNET *v26; // eax@36
  NiObjectNET *v27; // esi@36
  int v28; // eax@45
  RewardInvWin *v29; // esi@47
  RewardInvItem *v30; // eax@48
  RewardInvItem *v31; // eax@49
  RewardInvWin *v32; // esi@52
  RewardInvItem *v33; // eax@53
  RewardInvItem *v34; // eax@54
  int i; // [sp+14h] [bp-14h]@3
  RewardWin *v36; // [sp+18h] [bp-10h]@1
  int qIDa; // [sp+30h] [bp+8h]@3

  v2 = this;
  v36 = this;
  RewardWin::ResetContents(this);
  v2->m_bHaveSelectRewardQuest = 0;
  v2->m_iSelectedReward = -1;
  v3 = QuestDataMgr::GetQuest();
  if ( v3 )
  {
    v4 = v3->m_pQuestData;
    if ( v4 )
    {
      CQuest::GetQuestInfo((CQuest *)&v3->vfptr, qID);
      v2->m_kCurrQuestID = qID;
      v5 = CQuestData::GetQuestData(v4, qID);
      v6 = (unsigned __int16 *)&v5->Reward[0].Value;
      i = 0;
      qIDa = (int)&v5->Reward[0].Value;
      do
      {
        v7 = *((_BYTE *)v6 - 4);
        if ( v7 )
        {
          switch ( *((_BYTE *)v6 - 3) )
          {
            case 0:
              v8 = v7 - 1;
              if ( v8 )
              {
                if ( v8 == 1 )
                {
                  v9 = RewardWin::GetFreeSelectSlot(v2);
                  if ( v9 )
                  {
                    v2->m_bHaveSelectRewardQuest = 1;
                    v10 = (RewardInvItem *)operator new(0x28u);
                    if ( v10 )
                      RewardInvItem::RewardInvItem(v10, 0);
                    else
                      v11 = 0;
                    *(_DWORD *)(v11 + 24) = *(_DWORD *)v6;
                    *(_DWORD *)(v11 + 28) = 0;
                    RewardInvWin::SetRewardInvItem(v9, (RewardInvItem *)v11);
                  }
                }
              }
              else
              {
                v12 = RewardWin::GetFreeSlot(v2);
                if ( v12 )
                {
                  v13 = (RewardInvItem *)operator new(0x28u);
                  if ( v13 )
                    RewardInvItem::RewardInvItem(v13, 0);
                  else
                    v14 = 0;
                  *(_DWORD *)(v14 + 24) = *(_DWORD *)v6;
                  *(_DWORD *)(v14 + 28) = 0;
                  RewardInvWin::SetRewardInvItem(v12, (RewardInvItem *)v14);
                }
              }
              break;
            case 1:
              v15 = v7 - 1;
              if ( v15 )
              {
                if ( v15 == 1 )
                {
                  v16 = RewardWin::GetFreeSelectSlot(v2);
                  if ( v16 )
                  {
                    v2->m_bHaveSelectRewardQuest = 1;
                    v17 = (RewardInvItem *)operator new(0x28u);
                    if ( v17 )
                      RewardInvItem::RewardInvItem(v17, QRT_MONEY);
                    else
                      v18 = 0;
                    *(_DWORD *)(v18 + 16) = *(_DWORD *)v6;
                    *(_DWORD *)(v18 + 20) = 0;
                    RewardInvWin::SetRewardInvItem(v16, (RewardInvItem *)v18);
                  }
                }
              }
              else
              {
                v19 = RewardWin::GetFreeSlot(v2);
                if ( v19 )
                {
                  v20 = (RewardInvItem *)operator new(0x28u);
                  if ( v20 )
                    RewardInvItem::RewardInvItem(v20, QRT_MONEY);
                  else
                    v21 = 0;
                  *(_DWORD *)(v21 + 16) = *(_DWORD *)v6;
                  *(_DWORD *)(v21 + 20) = 0;
                  RewardInvWin::SetRewardInvItem(v19, (RewardInvItem *)v21);
                }
              }
              break;
            case 2:
              v22 = (NiTimeController *)Item::Create(*v6);
              if ( !v22 )
                return;
              if ( *((_BYTE *)v6 - 4) == 1 )
              {
                v24 = RewardWin::GetFreeSlot(v36);
                if ( !v24 )
                  goto LABEL_39;
                v25 = (RewardInvItem *)operator new(0x28u);
                goto LABEL_35;
              }
              if ( *((_BYTE *)v6 - 4) != 2 )
                goto LABEL_40;
              v24 = RewardWin::GetFreeSelectSlot(v36);
              if ( v24 )
              {
                *(_BYTE *)(v23 + 430) = 1;
                v25 = (RewardInvItem *)operator new(0x28u);
LABEL_35:
                if ( v25 )
                {
                  RewardInvItem::RewardInvItem(v25, QRT_ITEM);
                  v27 = v26;
                }
                else
                {
                  v27 = 0;
                }
                RewardInvItem::SetItem(v27, v22);
                RewardInvWin::SetRewardInvItem(v24, (RewardInvItem *)v27);
              }
LABEL_39:
              v6 = (unsigned __int16 *)qIDa;
LABEL_40:
              v2 = v36;
              break;
            default:
              break;
            case 4:
              v28 = v7 - 1;
              if ( v28 )
              {
                if ( v28 == 1 )
                {
                  v29 = RewardWin::GetFreeSelectSlot(v2);
                  if ( v29 )
                  {
                    v2->m_bHaveSelectRewardQuest = 1;
                    v30 = (RewardInvItem *)operator new(0x28u);
                    if ( v30 )
                      RewardInvItem::RewardInvItem(v30, QRT_FAME);
                    else
                      v31 = 0;
                    v31->m_iFameVal = *(_DWORD *)v6;
                    RewardInvWin::SetRewardInvItem(v29, v31);
                  }
                }
              }
              else
              {
                v32 = RewardWin::GetFreeSlot(v2);
                if ( v32 )
                {
                  v33 = (RewardInvItem *)operator new(0x28u);
                  if ( v33 )
                    RewardInvItem::RewardInvItem(v33, QRT_FAME);
                  else
                    v34 = 0;
                  v34->m_iFameVal = *(_DWORD *)v6;
                  RewardInvWin::SetRewardInvItem(v32, v34);
                }
              }
              break;
          }
        }
        v6 += 6;
        ++i;
        qIDa = (int)v6;
      }
      while ( i < 12 );
    }
  }
}

//----- (0057DA80) --------------------------------------------------------
void __thiscall RewardInvWin::RewardInvWin(RewardInvWin *this)
{
  RewardInvWin *v1; // esi@1
  RewardInvItem *v2; // edi@1

  v1 = this;
  IconWin::IconWin((IconWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&RewardInvWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&RewardInvWin::`vftable'{for `IDirectMessenger'};
  v1->m_spRewardInvItem.m_pObject = 0;
  v1->m_uiInvIndex = -1;
  IconWin::CreateGeometry((IconWin *)&v1->vfptr, 0x20u, 0x20u);
  RewardInvWin::SetRewardInvItem(v1, 0);
  v2 = v1->m_spRewardInvItem.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
    v1->m_spRewardInvItem.m_pObject = 0;
  }
}
// 99F140: using guessed type void (__thiscall *RewardInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99F15C: using guessed type int (__thiscall *RewardInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0057DB50) --------------------------------------------------------
RewardInvWin *__cdecl RewardInvWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent)
{
  PgWin *v4; // eax@1
  PgWin *v5; // eax@2
  PgWin *v6; // esi@2
  PgWin *v7; // edi@8
  RewardInvWin *v8; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v10; // [sp+20h] [bp-4h]@1

  v4 = (PgWin *)operator new(0x184u);
  result.m_pObject = v4;
  v10 = 0;
  if ( v4 )
  {
    RewardInvWin::RewardInvWin((RewardInvWin *)v4);
    v6 = v5;
  }
  else
  {
    v6 = 0;
  }
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v10 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v6);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, PgWin *))v6->vfptr[152].__vecDelDtor)(
                          v6,
                          iXPos,
                          iYPos,
                          uiInvIndex,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v6->vfptr[89].__vecDelDtor)(v6);
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = (RewardInvWin *)v6;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v6);
    if ( result.m_pObject )
    {
      v7 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      }
    }
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = 0;
  }
  return v8;
}

//----- (0057DC90) --------------------------------------------------------
RewardWin *__cdecl RewardWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  RewardWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1E0u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    RewardWin::RewardWin((RewardWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (RewardWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (0057DDC0) --------------------------------------------------------
char __thiscall RewardWin::Create(RewardWin *this, PgFrameWork *pkFrameWork)
{
  RewardWin *v2; // esi@1
  NiSourceTexture *v3; // ebx@1
  NiNode *v4; // esi@2
  NiTexturePalette *v6; // ST44_4@9
  const char *v7; // eax@9
  PgSprData *v8; // eax@10
  int v9; // ebx@11
  NiRefObjectVtbl *v10; // edi@11
  PgSprData *v11; // eax@12
  RewardInvWin *v12; // eax@12
  int *v13; // edi@12
  int v14; // eax@12
  int v15; // edi@13
  PgSprData *v16; // eax@14
  PgWinSpr *v17; // eax@14
  int v18; // edx@14
  int v19; // ecx@14
  RewardInvWin *v20; // eax@14
  PgFont *v21; // eax@16
  PgWinText *v22; // edi@16
  PgFont *v23; // eax@16
  NiUnsharedGeometryGroup *v24; // eax@16
  PgFont *v25; // eax@18
  PgWinText *v26; // eax@18
  NiRefObjectVtbl *v27; // edi@18
  PgFont *v28; // eax@18
  NiRefObjectVtbl *v29; // edi@18
  NiUnsharedGeometryGroup *v30; // eax@18
  NiNode *v31; // esi@19
  NiSourceTexture *pkTexture; // [sp+40h] [bp-58h]@1
  unsigned int uiHeight; // [sp+44h] [bp-54h]@15
  unsigned int uiWidth; // [sp+48h] [bp-50h]@15
  int iOffY; // [sp+4Ch] [bp-4Ch]@11
  NiRefObjectVtbl *v36; // [sp+50h] [bp-48h]@12
  NiPointer<NiNode> spNode; // [sp+54h] [bp-44h]@1
  int i; // [sp+58h] [bp-40h]@7
  int uiTop; // [sp+5Ch] [bp-3Ch]@10
  int uiLeft; // [sp+60h] [bp-38h]@10
  char acShapeName[33]; // [sp+64h] [bp-34h]@12
  int v42; // [sp+94h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v42 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  pkTexture = v3;
  if ( !v3 )
    goto LABEL_26;
  i = (int)pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = (NiTexturePalette *)i;
  v7 = Folder::Merge(&Folder::m_acMenu, "Game\\RewardWin.nif");
  PgUtil::LoadNodeNifFile(v7, &spNode, v6);
  if ( !spNode.m_pObject )
    return 0;
  v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v8, 0, pkFrameWork, "RewardWin", 0) )
  {
LABEL_26:
    v4 = spNode.m_pObject;
    v42 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
    return 0;
  }
  v9 = uiLeft;
  iOffY = uiTop;
  v10 = 0;
  i = (int)v2->m_apkInvWin;
  do
  {
    v36 = (NiRefObjectVtbl *)((char *)v10 + 1);
    sprintf(acShapeName, "IconSlot%03d", (char *)&v10->__vecDelDtor + 1);
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, pkTexture);
    PgWinSpr::CreateWin(uiLeft - v9, uiTop - iOffY, v11, (PgWin *)&v2->vfptr, 0, 0);
    v12 = RewardInvWin::CreateWin(uiLeft - v9 + 1, uiTop - iOffY + 1, (unsigned int)v10, (PgWin *)&v2->vfptr);
    v13 = (int *)i;
    *(_DWORD *)i = v12;
    RewardInvWin::SetRewardInvItem(v12, 0);
    v14 = *v13;
    v10 = v36;
    i += 4;
    *(_DWORD *)(v14 + 272) = g_pkItemInfoWin;
  }
  while ( (signed int)v10 < 10 );
  i = 0;
  v15 = (int)v2->m_apkSelectInvWin;
  do
  {
    v36 = (NiRefObjectVtbl *)(i + 1);
    sprintf(acShapeName, "SelectIconSlot%03d", i + 1);
    v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, pkTexture);
    v17 = PgWinSpr::CreateWin(uiLeft - v9, uiTop - iOffY, v16, (PgWin *)&v2->vfptr, 0, 0);
    v18 = uiTop - iOffY;
    v19 = i;
    *(_DWORD *)(v15 + 52) = v17;
    v20 = RewardInvWin::CreateWin(uiLeft - v9 + 1, v18 + 1, v19, (PgWin *)&v2->vfptr);
    *(_DWORD *)v15 = v20;
    RewardInvWin::SetRewardInvItem(v20, 0);
    (*(void (__stdcall **)(signed int))(**(_DWORD **)v15 + 516))(10);
    (*(void (__stdcall **)(signed int))(**(_DWORD **)v15 + 560))(11);
    *(_DWORD *)(*(_DWORD *)v15 + 272) = g_pkItemInfoWin;
    v15 += 4;
    i = (int)v36;
  }
  while ( (signed int)v36 < 10 );
  if ( PgUtil::GetTriShapeRect(
         (NiAVObject *)&spNode.m_pObject->vfptr,
         "RewardTxt",
         &uiLeft,
         &uiTop,
         &uiWidth,
         &uiHeight) )
  {
    v21 = Font::Get(0);
    v22 = PgWinText::CreateWin(uiLeft - v9, uiTop - iOffY, uiWidth, uiHeight, v21, (PgWin *)&v2->vfptr, 0, 0);
    v22->vfptr[122].__vecDelDtor((NiRefObject *)v22, 0);
    v36 = v22->vfptr + 113;
    v23 = Font::Get(MENU);
    v36->__vecDelDtor(v22, v23);
    v22->vfptr[60].__vecDelDtor((NiRefObject *)v22, 0);
    v36 = v22->vfptr + 118;
    v24 = TextData::Get(0x3D403A6Eu);
    v36->__vecDelDtor(v22, v24);
  }
  if ( PgUtil::GetTriShapeRect(
         (NiAVObject *)&spNode.m_pObject->vfptr,
         "RewardSelectTxt",
         &uiLeft,
         &uiTop,
         &uiWidth,
         &uiHeight) )
  {
    v25 = Font::Get(0);
    v26 = PgWinText::CreateWin(uiLeft - v9, uiTop - iOffY, uiWidth, uiHeight, v25, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkRewardTextWin = v26;
    v26->vfptr[122].__vecDelDtor((NiRefObject *)v26, 0);
    v27 = v2->m_pkRewardTextWin->vfptr;
    v28 = Font::Get(MENU);
    v27[113].__vecDelDtor((NiRefObject *)v2->m_pkRewardTextWin, (unsigned int)v28);
    ((void (__stdcall *)(_DWORD))v2->m_pkRewardTextWin->vfptr[60].__vecDelDtor)(0);
    v29 = v2->m_pkRewardTextWin->vfptr;
    v30 = TextData::Get(0x1F483544u);
    v29[118].__vecDelDtor((NiRefObject *)v2->m_pkRewardTextWin, (unsigned int)v30);
  }
  ((void (__thiscall *)(RewardWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  v31 = spNode.m_pObject;
  v42 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v31 )
    v31->vfptr->__vecDelDtor((NiRefObject *)v31, 1u);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0057E200) --------------------------------------------------------
RewardWin *__thiscall RewardWin::`scalar deleting destructor'(RewardWin *this, unsigned int a2)
{
  RewardWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&RewardWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&RewardWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 99EEF4: using guessed type void (__thiscall *RewardWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99EF14: using guessed type int (__thiscall *RewardWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0057E240) --------------------------------------------------------
RewardInvItem *__thiscall RewardInvItem::`vector deleting destructor'(RewardInvItem *this, unsigned int a2)
{
  RewardInvItem *v2; // esi@1

  v2 = this;
  RewardInvItem::~RewardInvItem(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0057E270) --------------------------------------------------------
RewardInvWin *__thiscall RewardInvWin::`scalar deleting destructor'(RewardInvWin *this, unsigned int a2)
{
  RewardInvWin *v2; // esi@1

  v2 = this;
  RewardInvWin::~RewardInvWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0057E2A0) --------------------------------------------------------
void __thiscall RidePetWin::DirectMessage(RidePetWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  char *v4; // esi@2
  void (__thiscall *v5)(float *, IDirectMessenger **, int *); // eax@2
  signed int v6; // eax@3
  int iSy; // [sp+0h] [bp-4h]@1

  iSy = (int)this;
  if ( pkFrom )
  {
    v4 = (char *)&this[-1].m_kBound.m_kCenter.y;
    pkFrom = (IDirectMessenger *)PgWin::ms_iMsX;
    v5 = *(void (__thiscall **)(float *, IDirectMessenger **, int *))(LODWORD(this[-1].m_kBound.m_kCenter.y) + 224);
    iSy = PgWin::ms_iMsY;
    v5(&this[-1].m_kBound.m_kCenter.y, &pkFrom, &iSy);
    if ( (signed int)pkFrom >= 0 )
    {
      v6 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v4 + 144))(v4);
      if ( (signed int)pkFrom < v6 && iSy >= 0 )
        (*(void (__thiscall **)(_DWORD))(*(_DWORD *)v4 + 148))(v4);
    }
  }
}

//----- (0057E310) --------------------------------------------------------
void __thiscall RidePetWin::RidePetWin(RidePetWin *this)
{
  RidePetWin *v1; // esi@1
  NiSourceTexture *v2; // edi@1
  NiSourceTexture *v3; // edi@6
  NiSourceTexture *v4; // edi@11

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&RidePetWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&RidePetWin::`vftable'{for `IDirectMessenger'};
  CNSTimer_MarkCheck::CNSTimer_MarkCheck(&v1->m_kMarkCheck);
  v1->m_spNormalTexture.m_pObject = 0;
  v1->m_spHungryTexture.m_pObject = 0;
  v1->m_spEatTexture.m_pObject = 0;
  v1->m_pkFrameWork = 0;
  v1->m_uiMaxHP = 0;
  v1->m_nHungryPoint = 0;
  v2 = v1->m_spNormalTexture.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spNormalTexture.m_pObject = 0;
  }
  v3 = v1->m_spHungryTexture.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spHungryTexture.m_pObject = 0;
  }
  v4 = v1->m_spEatTexture.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spEatTexture.m_pObject = 0;
  }
  v1->m_nMoverSpeed = 0;
  v1->m_bNormalize = 1;
  v1->m_pkDescriptSpr = 0;
  v1->m_bNeedFeed = 1;
}
// 99F58C: using guessed type void (__thiscall *RidePetWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99F5AC: using guessed type int (__thiscall *RidePetWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0057E440) --------------------------------------------------------
void __thiscall RidePetWin::~RidePetWin(RidePetWin *this)
{
  RidePetWin *v1; // esi@1
  NiSourceTexture *v2; // edi@1
  NiSourceTexture *v3; // edi@5
  NiSourceTexture *v4; // edi@9

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&RidePetWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&RidePetWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spEatTexture.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_spHungryTexture.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v4 = v1->m_spNormalTexture.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v1->m_kMarkCheck);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 99F58C: using guessed type void (__thiscall *RidePetWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99F5AC: using guessed type int (__thiscall *RidePetWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0057E530) --------------------------------------------------------
void __thiscall RidePetWin::EnablePetFaceAni(RidePetWin *this)
{
  RidePetWin *v1; // esi@1
  PgWinSpr *v2; // ecx@1

  v1 = this;
  v2 = this->m_pkPetFaceCutWin;
  if ( v2 )
  {
    ((void (__stdcall *)(_DWORD))v2->vfptr[113].__vecDelDtor)(v1->m_spEatTexture.m_pObject);
    v1->m_kMarkCheck.m_fMarkTime = 2.0;
    CNSTimer_MarkCheck::ReSet(&v1->m_kMarkCheck, Timer::ms_fCurTime, OVER);
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0057E580) --------------------------------------------------------
void __thiscall RidePetWin::UpdateFaceCut(RidePetWin *this)
{
  void *(__thiscall *v1)(NiRefObject *, unsigned int); // edx@2

  if ( this->m_pkPetFaceCutWin )
  {
    v1 = this->m_pkPetFaceCutWin->vfptr[113].__vecDelDtor;
    if ( this->m_nHungryPoint )
      ((void (__stdcall *)(_DWORD))v1)(this->m_spNormalTexture.m_pObject);
    else
      ((void (__stdcall *)(_DWORD))v1)(this->m_spHungryTexture.m_pObject);
  }
}

//----- (0057E5C0) --------------------------------------------------------
void __thiscall RidePetWin::SetHungryPoint(RidePetWin *this, int nCur)
{
  RidePetWin *v2; // esi@1
  bool v3; // zf@5
  char szPoint[256]; // [sp+4h] [bp-104h]@5

  v2 = this;
  if ( this->m_pkHPBarWin && this->m_pkHPBarStartWin && this->m_pkHPBarEndWin && this->m_pkNum_Hungry )
  {
    sprintf(szPoint, "%d/%d", nCur, this->m_uiMaxHP);
    v3 = v2->m_kMarkCheck.m_TimeStateCur == -1;
    v2->m_nHungryPoint = nCur;
    if ( !v3 )
      RidePetWin::UpdateFaceCut(v2);
  }
}

//----- (0057E650) --------------------------------------------------------
void __thiscall RidePetWin::Normalize(RidePetWin *this, int b)
{
  RidePetWin *v2; // esi@1
  PgWinText *v3; // ecx@1

  v2 = this;
  v3 = this->m_pkNameTextWin;
  v2->m_bNormalize = b;
  ((void (__stdcall *)(_DWORD))v3->vfptr[64].__vecDelDtor)(b);
  ((void (__stdcall *)(_DWORD))v2->m_pkNum_Hungry->vfptr[64].__vecDelDtor)(v2->m_bNormalize);
  ((void (__stdcall *)(_DWORD))v2->m_pkMoverSpeed->vfptr[64].__vecDelDtor)(v2->m_bNormalize);
  ((void (__stdcall *)(_DWORD))v2->m_pkHPBarWin->vfptr[64].__vecDelDtor)(v2->m_bNormalize);
  ((void (__stdcall *)(_DWORD))v2->m_pkHPBarStartWin->vfptr[64].__vecDelDtor)(v2->m_bNormalize);
  ((void (__stdcall *)(_DWORD))v2->m_pkHPBarEndWin->vfptr[64].__vecDelDtor)(v2->m_bNormalize);
  ((void (__stdcall *)(_DWORD))v2->m_pkPanel[0]->vfptr[64].__vecDelDtor)(v2->m_bNormalize);
  ((void (__stdcall *)(_DWORD))v2->m_pkPanel[1]->vfptr[64].__vecDelDtor)(v2->m_bNormalize);
  if ( v2->m_bNormalize == 1 )
    RidePetWin::SetHungryPoint(v2, v2->m_nHungryPoint);
  ((void (__stdcall *)(_DWORD))v2->m_pkDescriptSpr->vfptr[60].__vecDelDtor)(v2->m_bNormalize);
  if ( v2->m_bNeedFeed == 1 )
    v2->m_pkToolTipWin = (PgWin *)(v2->m_bNormalize != 0 ? 0 : (unsigned int)g_pkToolTipWin);
}

//----- (0057E770) --------------------------------------------------------
char __thiscall RidePetWin::Create(RidePetWin *this, PgFrameWork *pkFrameWork)
{
  RidePetWin *v2; // esi@1
  PgFrameWork *v3; // ebx@1
  NiSourceTexture *v4; // edi@1
  NiNode *v5; // esi@2
  const char *v7; // eax@9
  PgSprData *v8; // eax@10
  void *(__thiscall *v9)(NiRefObject *, unsigned int); // eax@11
  int v10; // edi@11
  PgFrameWork *v11; // ebx@11
  PgSprData *v12; // eax@11
  PgWinSpr *v13; // eax@11
  const char *v14; // eax@13
  NiSourceTexture *v15; // eax@13
  const char *v16; // eax@16
  PgSprData *v17; // eax@17
  PgWinSpr *v18; // eax@17
  PgSprData *v19; // eax@17
  PgWinSpr *v20; // eax@17
  PgSprData *v21; // eax@17
  PgWinSpr *v22; // eax@17
  PgSprData *v23; // eax@17
  PgWinBar *v24; // eax@17
  PgSprData *v25; // eax@17
  PgWinBar *v26; // eax@17
  PgSprData *v27; // eax@17
  PgWinBar *v28; // eax@17
  PgWin *fXPosRate; // ST44_4@17
  PgFont *v30; // eax@17
  PgWinAbbreviateText *v31; // eax@17
  PgFont *v32; // eax@17
  PgWinText *v33; // eax@17
  PgFont *v34; // eax@17
  PgWinText *v35; // eax@17
  PgWinSpr *v36; // eax@18
  NiNode *v37; // esi@19
  NiTexturePalette *pkPetTexture; // [sp+5Ch] [bp-24h]@7
  NiSourceTexture *pkPetTexturea; // [sp+5Ch] [bp-24h]@13
  NiSourceTexture *pkTexture; // [sp+60h] [bp-20h]@1
  unsigned int uiWidth; // [sp+64h] [bp-1Ch]@17
  unsigned int uiHeight; // [sp+68h] [bp-18h]@17
  NiPointer<NiNode> spNode; // [sp+6Ch] [bp-14h]@1
  int uiLeft; // [sp+70h] [bp-10h]@10
  int v45; // [sp+7Ch] [bp-4h]@1

  v2 = this;
  v3 = pkFrameWork;
  this->m_pkFrameWork = pkFrameWork;
  spNode.m_pObject = 0;
  v45 = 0;
  v4 = MenuTexMgr::GetTexture(4u);
  pkTexture = v4;
  if ( !v4 )
    goto LABEL_26;
  pkPetTexture = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v7 = Folder::Merge(&Folder::m_acMenu, "Game\\PetFace.nif");
  PgUtil::LoadNodeNifFile(v7, &spNode, pkPetTexture);
  if ( !spNode.m_pObject )
    return 0;
  v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, (int *)&pkFrameWork, v4);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v8, 0, v3, "RidePetWin", 0) )
  {
LABEL_26:
    v5 = spNode.m_pObject;
    v45 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
    return 0;
  }
  v9 = v2->vfptr[60].__vecDelDtor;
  v2->m_bDroppable = 1;
  v9((NiRefObject *)&v2->vfptr, 1u);
  v10 = uiLeft;
  v11 = pkFrameWork;
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel03", &uiLeft, (int *)&pkFrameWork, pkTexture);
  v13 = PgWinSpr::CreateWin(uiLeft, (int)pkFrameWork, v12, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkPanel[1] = v13;
  v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
  if ( !Folder::m_bInit )
    Folder::Init();
  v14 = fs("%sgame\\MobPortrait\\%s.png", &Folder::m_acMenu, "coll01");
  v15 = PgUtil::LoadSourceTexture(v14);
  pkPetTexturea = v15;
  if ( !v15 )
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    v16 = fs("%sgame\\MobPortrait\\%s.tga", &Folder::m_acMenu, "coll01");
    v15 = PgUtil::LoadSourceTexture(v16);
    pkPetTexturea = v15;
  }
  v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "FaceCut_Mon", &uiLeft, (int *)&pkFrameWork, v15);
  v18 = PgWinSpr::CreateWin(uiLeft - v10, (char *)pkFrameWork - (char *)v11, v17, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkPetFaceCutWin = v18;
  v18->vfptr[60].__vecDelDtor((NiRefObject *)v18, 0);
  ((void (__stdcall *)(NiSourceTexture *))v2->m_pkPetFaceCutWin->vfptr[113].__vecDelDtor)(pkPetTexturea);
  v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel04", &uiLeft, (int *)&pkFrameWork, pkTexture);
  v20 = PgWinSpr::CreateWin(uiLeft, (int)pkFrameWork, v19, (PgWin *)&v2->vfptr, 0, 0);
  v20->vfptr[60].__vecDelDtor((NiRefObject *)v20, 0);
  v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, (int *)&pkFrameWork, pkTexture);
  v22 = PgWinSpr::CreateWin(uiLeft, (int)pkFrameWork, v21, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkPanel[0] = v22;
  v22->vfptr[60].__vecDelDtor((NiRefObject *)v22, 0);
  v23 = PgSprData::Create(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "Fill_HP_Start",
          &uiLeft,
          (int *)&pkFrameWork,
          pkTexture);
  v24 = PgWinBar::CreateWin(uiLeft - v10, (char *)pkFrameWork - (char *)v11, v23, (PgWin *)&v2->vfptr, BGT_RIGHT);
  v2->m_pkHPBarStartWin = (PgWinSpr *)v24;
  v24->vfptr[64].__vecDelDtor((NiRefObject *)v24, 1u);
  ((void (__stdcall *)(_DWORD))v2->m_pkHPBarStartWin->vfptr[60].__vecDelDtor)(0);
  v25 = PgSprData::Create(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "Fill_HP_End",
          &uiLeft,
          (int *)&pkFrameWork,
          pkTexture);
  v26 = PgWinBar::CreateWin(uiLeft - v10, (char *)pkFrameWork - (char *)v11, v25, (PgWin *)&v2->vfptr, BGT_RIGHT);
  v2->m_pkHPBarEndWin = (PgWinSpr *)v26;
  v26->vfptr[64].__vecDelDtor((NiRefObject *)v26, 1u);
  ((void (__stdcall *)(_DWORD))v2->m_pkHPBarEndWin->vfptr[60].__vecDelDtor)(0);
  v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_HP", &uiLeft, (int *)&pkFrameWork, pkTexture);
  v28 = PgWinBar::CreateWin(uiLeft - v10, (char *)pkFrameWork - (char *)v11, v27, (PgWin *)&v2->vfptr, BGT_RIGHT);
  v2->m_pkHPBarWin = v28;
  v28->vfptr[60].__vecDelDtor((NiRefObject *)v28, 0);
  PgUtil::GetTriShapeRect(
    (NiAVObject *)&spNode.m_pObject->vfptr,
    "CharName",
    &uiLeft,
    (int *)&pkFrameWork,
    &uiWidth,
    &uiHeight);
  fXPosRate = g_pkToolTipWin;
  v30 = Font::Get(0);
  v31 = PgWinAbbreviateText::CreateWin(
          uiLeft - v10,
          (char *)pkFrameWork - (char *)v11,
          uiWidth,
          uiHeight,
          v30,
          (PgWin *)&v2->vfptr,
          "2",
          0,
          0,
          1,
          fXPosRate,
          0x1Eu);
  v2->m_pkNameTextWin = (PgWinText *)v31;
  v31->vfptr[122].__vecDelDtor((NiRefObject *)v31, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkNameTextWin->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(const char *))v2->m_pkNameTextWin->vfptr[118].__vecDelDtor)("TestName");
  PgUtil::GetTriShapeRect(
    (NiAVObject *)&spNode.m_pObject->vfptr,
    "Num_Hungry",
    &uiLeft,
    (int *)&pkFrameWork,
    &uiWidth,
    &uiHeight);
  v32 = Font::Get(0);
  v33 = PgWinText::CreateWin(
          uiLeft - v10,
          (char *)pkFrameWork - (char *)v11,
          uiWidth,
          uiHeight,
          v32,
          (PgWin *)&v2->vfptr,
          "2",
          0);
  v2->m_pkNum_Hungry = v33;
  v33->vfptr[60].__vecDelDtor((NiRefObject *)v33, 0);
  PgUtil::GetTriShapeRect(
    (NiAVObject *)&spNode.m_pObject->vfptr,
    "Num_Velocity",
    &uiLeft,
    (int *)&pkFrameWork,
    &uiWidth,
    &uiHeight);
  v34 = Font::Get(0);
  v35 = PgWinText::CreateWin(
          uiLeft - v10,
          (char *)pkFrameWork - (char *)v11,
          uiWidth,
          uiHeight,
          v34,
          (PgWin *)&v2->vfptr,
          "2",
          0);
  v2->m_pkMoverSpeed = v35;
  v35->vfptr[60].__vecDelDtor((NiRefObject *)v35, 0);
  ((void (__stdcall *)(const char *))v2->m_pkMoverSpeed->vfptr[118].__vecDelDtor)("-");
  PgWin::InitPos((PgWin *)&v2->vfptr, PgWin::ms_uiScreenWidth, PgWin::ms_uiScreenHeight, 0.0, 0.23);
  if ( PgUtil::GetTriShapeRect(
         (NiAVObject *)&spNode.m_pObject->vfptr,
         "Picking01",
         &uiLeft,
         (int *)&pkFrameWork,
         &uiWidth,
         &uiHeight) )
  {
    v36 = PgWinSpr::CreateWin(uiLeft, (int)pkFrameWork, uiWidth, uiHeight, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkDescriptSpr = v36;
    v36->vfptr[60].__vecDelDtor((NiRefObject *)v36, 1u);
    v2->m_pkDescriptSpr->m_pkToolTipWin = g_pkToolTipWin;
  }
  v2->m_pkToolTipWin = 0;
  v37 = spNode.m_pObject;
  v45 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v37 )
    v37->vfptr->__vecDelDtor((NiRefObject *)v37, 1u);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0057ED50) --------------------------------------------------------
void __thiscall RidePetWin::ProcessMeInput(RidePetWin *this, bool *bHit)
{
  RidePetWin *v2; // esi@1
  bool v3; // bl@1

  v2 = this;
  v3 = PgWin::ms_kbRbutReleased.m_iBool >= 1;
  if ( (unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD))this->m_pkPetFaceCutWin->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY)
    && v3 )
  {
    RidePetWin::Normalize(v2, v2->m_bNormalize == 0);
  }
  PgWinFrame::ProcessMeInput((PgWinFrame *)&v2->vfptr, bHit);
}

//----- (0057EDB0) --------------------------------------------------------
void __thiscall RidePetWin::SetPetID(RidePetWin *this, unsigned int uiPetID)
{
  RidePetWin *v2; // ebx@1
  unsigned int v3; // esi@1
  char *v4; // eax@2
  PgWinText *v5; // ecx@5
  unsigned int v6; // edi@6
  unsigned int v7; // esi@6
  char *v8; // esi@12
  NiSourceTexture *v9; // edi@13
  NiImageConverter *v10; // eax@14
  NiPixelData *v11; // eax@14
  NiSourceTexture *v12; // esi@17
  char *v13; // esi@26
  NiSourceTexture *v14; // edi@27
  NiImageConverter *v15; // eax@28
  NiPixelData *v16; // eax@28
  NiSourceTexture *v17; // esi@31
  char *v18; // esi@40
  NiSourceTexture *v19; // edi@41
  NiImageConverter *v20; // eax@42
  NiPixelData *v21; // eax@42
  NiSourceTexture *v22; // esi@45
  const char *v23; // eax@55
  NiSourceTexture *v24; // eax@55
  NiSourceTexture *v25; // esi@55
  NiSourceTexture *v26; // edi@55
  const char *v27; // eax@65
  NiSourceTexture *v28; // eax@65
  NiSourceTexture *v29; // esi@65
  NiSourceTexture *v30; // edi@65
  const char *v31; // eax@75
  NiSourceTexture *v32; // eax@75
  NiSourceTexture *v33; // esi@75
  NiSourceTexture *v34; // edi@75
  int v35; // eax@82
  PgWinSpr *v36; // ecx@82
  PgWinSpr *v37; // ecx@85
  NiTexture::FormatPrefs kPrefs; // [sp+Ch] [bp-Ch]@16
  char *uiPetIDa; // [sp+20h] [bp+8h]@7

  v2 = this;
  this->m_uiPetID = uiPetID;
  v3 = 0;
  if ( ITableBase<RIDING,RidePetTable>::GetTotal() )
  {
    while ( 1 )
    {
      v4 = CDataReader::GetRecord((CDataReader *)(ITableBase<RIDING,RidePetTable>::ms_pkTable + 4), v3);
      if ( *(_WORD *)v4 == uiPetID )
        break;
      if ( ++v3 >= ITableBase<RIDING,RidePetTable>::GetTotal() )
        goto LABEL_6;
    }
    v5 = v2->m_pkNameTextWin;
    v2->m_uiMaxHP = *((_WORD *)v4 + 99);
    ((void (__stdcall *)(_DWORD))v5->vfptr[118].__vecDelDtor)(v4 + 34);
  }
LABEL_6:
  v6 = v2->m_uiPetID;
  v7 = 0;
  if ( ITableBase<RIDING,RidePetTable>::GetTotal() )
  {
    while ( 1 )
    {
      uiPetIDa = CDataReader::GetRecord((CDataReader *)(ITableBase<RIDING,RidePetTable>::ms_pkTable + 4), v7);
      if ( *(_WORD *)uiPetIDa == v6 )
        break;
      if ( ++v7 >= ITableBase<RIDING,RidePetTable>::GetTotal() )
        return;
    }
    if ( !Folder::m_bInit )
      Folder::Init();
    v8 = fs("%sgame\\MobPortrait\\%s.png", &Folder::m_acMenu, uiPetIDa + 234);
    if ( v8 )
    {
      v10 = NiImageConverter::GetImageConverter();
      v11 = (NiPixelData *)((int (__thiscall *)(_DWORD, _DWORD, _DWORD))v10->vfptr[2].__vecDelDtor)(v10, v8, 0);
      if ( v11 )
      {
        kPrefs.m_ePixelLayout = 6;
        kPrefs.m_eAlphaFmt = 3;
        kPrefs.m_eMipMapped = 0;
        v9 = NiSourceTexture::Create(v11, &kPrefs);
      }
      else
      {
        v9 = 0;
      }
    }
    else
    {
      v9 = 0;
    }
    v12 = v2->m_spNormalTexture.m_pObject;
    if ( v12 != v9 )
    {
      if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
        v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
      v2->m_spNormalTexture.m_pObject = v9;
      if ( v9 )
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
    }
    if ( !Folder::m_bInit )
      Folder::Init();
    v13 = fs("%sgame\\MobPortrait\\%s.png", &Folder::m_acMenu, uiPetIDa + 250);
    if ( v13 )
    {
      v15 = NiImageConverter::GetImageConverter();
      v16 = (NiPixelData *)((int (__thiscall *)(_DWORD, _DWORD, _DWORD))v15->vfptr[2].__vecDelDtor)(v15, v13, 0);
      if ( v16 )
      {
        kPrefs.m_ePixelLayout = 6;
        kPrefs.m_eAlphaFmt = 3;
        kPrefs.m_eMipMapped = 0;
        v14 = NiSourceTexture::Create(v16, &kPrefs);
      }
      else
      {
        v14 = 0;
      }
    }
    else
    {
      v14 = 0;
    }
    v17 = v2->m_spHungryTexture.m_pObject;
    if ( v17 != v14 )
    {
      if ( v17 && !InterlockedDecrement((volatile LONG *)&v17->m_uiRefCount) && v17 )
        v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
      v2->m_spHungryTexture.m_pObject = v14;
      if ( v14 )
        InterlockedIncrement((volatile LONG *)&v14->m_uiRefCount);
    }
    if ( !Folder::m_bInit )
      Folder::Init();
    v18 = fs("%sgame\\MobPortrait\\%s.png", &Folder::m_acMenu, uiPetIDa + 266);
    if ( v18 )
    {
      v20 = NiImageConverter::GetImageConverter();
      v21 = (NiPixelData *)((int (__thiscall *)(_DWORD, _DWORD, _DWORD))v20->vfptr[2].__vecDelDtor)(v20, v18, 0);
      if ( v21 )
      {
        kPrefs.m_ePixelLayout = 6;
        kPrefs.m_eAlphaFmt = 3;
        kPrefs.m_eMipMapped = 0;
        v19 = NiSourceTexture::Create(v21, &kPrefs);
      }
      else
      {
        v19 = 0;
      }
    }
    else
    {
      v19 = 0;
    }
    v22 = v2->m_spEatTexture.m_pObject;
    if ( v22 != v19 )
    {
      if ( v22 && !InterlockedDecrement((volatile LONG *)&v22->m_uiRefCount) && v22 )
        v22->vfptr->__vecDelDtor((NiRefObject *)v22, 1u);
      v2->m_spEatTexture.m_pObject = v19;
      if ( v19 )
        InterlockedIncrement((volatile LONG *)&v19->m_uiRefCount);
    }
    if ( !v2->m_spNormalTexture.m_pObject )
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      v23 = fs("%sgame\\MobPortrait\\%s.tga", &Folder::m_acMenu, uiPetIDa + 234);
      v24 = PgUtil::LoadSourceTexture(v23);
      v25 = v2->m_spNormalTexture.m_pObject;
      v26 = v24;
      if ( v25 != v24 )
      {
        if ( v25 && !InterlockedDecrement((volatile LONG *)&v25->m_uiRefCount) && v25 )
          v25->vfptr->__vecDelDtor((NiRefObject *)v25, 1u);
        v2->m_spNormalTexture.m_pObject = v26;
        if ( v26 )
          InterlockedIncrement((volatile LONG *)&v26->m_uiRefCount);
      }
    }
    if ( !v2->m_spHungryTexture.m_pObject )
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      v27 = fs("%sgame\\MobPortrait\\%s.tga", &Folder::m_acMenu, uiPetIDa + 250);
      v28 = PgUtil::LoadSourceTexture(v27);
      v29 = v2->m_spHungryTexture.m_pObject;
      v30 = v28;
      if ( v29 != v28 )
      {
        if ( v29 && !InterlockedDecrement((volatile LONG *)&v29->m_uiRefCount) && v29 )
          v29->vfptr->__vecDelDtor((NiRefObject *)v29, 1u);
        v2->m_spHungryTexture.m_pObject = v30;
        if ( v30 )
          InterlockedIncrement((volatile LONG *)&v30->m_uiRefCount);
      }
    }
    if ( !v2->m_spEatTexture.m_pObject )
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      v31 = fs("%sgame\\MobPortrait\\%s.tga", &Folder::m_acMenu, uiPetIDa + 266);
      v32 = PgUtil::LoadSourceTexture(v31);
      v33 = v2->m_spEatTexture.m_pObject;
      v34 = v32;
      if ( v33 != v32 )
      {
        if ( v33 && !InterlockedDecrement((volatile LONG *)&v33->m_uiRefCount) && v33 )
          v33->vfptr->__vecDelDtor((NiRefObject *)v33, 1u);
        v2->m_spEatTexture.m_pObject = v34;
        if ( v34 )
          InterlockedIncrement((volatile LONG *)&v34->m_uiRefCount);
      }
    }
    v2->m_nHungryPoint = 0;
    v35 = strcmp(uiPetIDa + 132, "-");
    v36 = v2->m_pkDescriptSpr;
    if ( v35 )
    {
      v2->m_bNeedFeed = 1;
      v36->m_pkToolTipWin = g_pkToolTipWin;
    }
    else
    {
      v2->m_bNeedFeed = 0;
      v36->m_pkToolTipWin = 0;
    }
    v37 = v2->m_pkPetFaceCutWin;
    v2->m_pkToolTipWin = 0;
    if ( v37 )
    {
      if ( v2->m_nHungryPoint )
        ((void (__stdcall *)(_DWORD))v37->vfptr[113].__vecDelDtor)(v2->m_spNormalTexture.m_pObject);
      else
        ((void (__stdcall *)(_DWORD))v37->vfptr[113].__vecDelDtor)(v2->m_spHungryTexture.m_pObject);
    }
  }
}
// A8975C: using guessed type bool Folder::m_bInit;
// A8C278: using guessed type int ITableBase<RIDING,RidePetTable>::ms_pkTable;

//----- (0057F290) --------------------------------------------------------
RidePetWin *__cdecl RidePetWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  RidePetWin *v5; // eax@14
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1C4u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    RidePetWin::RidePetWin((RidePetWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( RidePetWin::Create((RidePetWin *)v3, pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (RidePetWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( v3 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
    v5 = 0;
  }
  return v5;
}

//----- (0057F3C0) --------------------------------------------------------
char __userpurge RidePetWin::EatDropInstance@<al>(RidePetWin *this@<ecx>, int a2@<edi>, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  RidePetWin *v5; // esi@1
  void *v7; // ebx@3
  int v8; // edi@6
  RIDING *v9; // eax@9
  const char *v10; // esi@11
  GameFrameWork *v11; // esi@13
  NiUnsharedGeometryGroup *v12; // eax@13
  ItemUseTask *v13; // esi@18
  PgFrameWork *v14; // ST00_4@18
  int v15; // [sp-8h] [bp-10h]@6
  RidePetWin *v16; // [sp+4h] [bp-4h]@1

  v5 = this;
  v16 = this;
  if ( !*pkDrop )
    return 0;
  v7 = (*pkDrop)->m_pkContents;
  if ( *((_DWORD *)v7 + 2) || *((_DWORD *)v7 + 4) )
  {
    PgCursor::ms_bKeepDrop = 1;
    return 0;
  }
  v15 = a2;
  v8 = *((_DWORD *)v7 + 5);
  if ( !v8 )
  {
    PgCursor::ms_bKeepDrop = 1;
    return 0;
  }
  if ( (unsigned __int8)(*(int (__thiscall **)(_DWORD, int))(*(_DWORD *)v8 + 4))(*((_DWORD *)v7 + 5), v15) != 22 )
    return 0;
  v9 = RidePetTable::GetByID(v5->m_uiPetID);
  if ( !v9 )
    goto LABEL_18;
  if ( v9->UseTime )
  {
LABEL_15:
    v11 = (GameFrameWork *)v5->m_pkFrameWork;
    v12 = TextData::Get(0x71A9AB9Au);
    goto LABEL_16;
  }
  v10 = v9->FeedType;
  if ( !strcmp(v9->FeedType, "-") )
  {
    v5 = v16;
    goto LABEL_15;
  }
  if ( strcmp((const char *)(*(_DWORD *)(v8 + 112) + 2), v10) )
  {
    v11 = (GameFrameWork *)v16->m_pkFrameWork;
    v12 = TextData::Get(0xBBEEADED);
LABEL_16:
    GameFrameWork::AddSysMsg(v11, (const char *)v12);
    return 0;
  }
LABEL_18:
  v13 = ISingletonTask<ItemUseTask>::Run();
  ItemUseTask::SetInventoryIndex(v13, *((_DWORD *)v7 + 3));
  v14 = v16->m_pkFrameWork;
  ((void (__thiscall *)(IDirectMessengerVtbl **))v13->vfptr->SetMsgHooker)(&v13->vfptr);
  return 1;
}
// 57F3C0: could not find valid save-restore pair for edi
// B648B8: using guessed type bool PgCursor::ms_bKeepDrop;

//----- (0057F520) --------------------------------------------------------
void __thiscall RidePetWin::UpdateMeWin(RidePetWin *this, float fCurTime)
{
  RidePetWin *v2; // esi@1
  int v3; // eax@1
  PgWinSpr *v4; // ecx@3
  RIDING *v5; // eax@7
  ItemInfo *v6; // edi@8
  int v7; // ST08_4@8
  char *v8; // eax@8
  char *v9; // ST08_4@8
  char *v10; // eax@8
  char *v11; // eax@8
  char *v12; // edi@8

  v2 = this;
  CNSTimer_MarkCheck::Update(&this->m_kMarkCheck, Timer::ms_fCurTime);
  if ( v3 == 1 && v2->m_pkPetFaceCutWin )
  {
    v4 = v2->m_pkPetFaceCutWin;
    if ( v2->m_nHungryPoint )
      ((void (__stdcall *)(NiSourceTexture *))v4->vfptr[113].__vecDelDtor)(v2->m_spNormalTexture.m_pObject);
    else
      ((void (__stdcall *)(NiSourceTexture *))v4->vfptr[113].__vecDelDtor)(v2->m_spHungryTexture.m_pObject);
  }
  if ( v2->m_bNeedFeed == 1 )
  {
    v5 = RidePetTable::GetByID(v2->m_uiPetID);
    if ( v5 )
    {
      v6 = ItemInfoTab::GetByInxName(v5->FeedType);
      v7 = Inventory::GetItemCnt(&g_kInventory, v6->ID);
      v8 = (char *)TextData2::Get(0x2939242Bu);
      v9 = fs(v8, v7);
      v10 = (char *)TextData2::Get(0xEFF2282E);
      v11 = fs(v10, v6->Name);
      v12 = fs("%s\n%s", v11, v9);
      PgWin::SetToolTipWinText((PgWin *)&v2->m_pkDescriptSpr->vfptr, v12);
      PgWin::SetToolTipWinText((PgWin *)&v2->vfptr, v12);
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0057F620) --------------------------------------------------------
RIDING *__cdecl RidePetTable::GetByID(unsigned int nActionID)
{
  unsigned int v1; // esi@1
  RIDING *result; // eax@2

  v1 = 0;
  if ( ITableBase<RIDING,RidePetTable>::GetTotal() )
  {
    while ( 1 )
    {
      result = (RIDING *)CDataReader::GetRecord((CDataReader *)(ITableBase<RIDING,RidePetTable>::ms_pkTable + 4), v1);
      if ( result->Handle == nActionID )
        break;
      if ( ++v1 >= ITableBase<RIDING,RidePetTable>::GetTotal() )
        goto LABEL_4;
    }
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}
// A8C278: using guessed type int ITableBase<RIDING,RidePetTable>::ms_pkTable;

//----- (0057F660) --------------------------------------------------------
RidePetWin *__thiscall RidePetWin::`vector deleting destructor'(RidePetWin *this, unsigned int a2)
{
  RidePetWin *v2; // esi@1

  v2 = this;
  RidePetWin::~RidePetWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0057F690) --------------------------------------------------------
void RoarWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "Roar");
}

//----- (0057F6C0) --------------------------------------------------------
void __thiscall RoarWin::OnCmdCancel(RoarWin *this)
{
  RoarWin *v1; // esi@1

  v1 = this;
  InvWin::SetLock(*((InvWin **)this->m_pkFrameWork[19].m_BackFrameID + this->m_uiLockInvPos + 87), 0);
  PgWin::PostMsg((PgWin *)&v1->vfptr, 1u, 0, 0);
}

//----- (0057F700) --------------------------------------------------------
void __thiscall RoarWin::SetLockInvPos(RoarWin *this, unsigned int uiInvPos)
{
  this->m_uiLockInvPos = uiInvPos;
  InvWin::SetLock(*((InvWin **)this->m_pkFrameWork[19].m_BackFrameID + uiInvPos + 87), 1);
}

//----- (0057F730) --------------------------------------------------------
void __thiscall RoarWin::UpdateMeWin(RoarWin *this, float fCurTime)
{
  RoarWin *v2; // esi@1
  int v3; // ebx@4
  int v4; // eax@4
  BYTE *v5; // edi@4
  signed int v6; // eax@4
  const char *v7; // edx@5
  const char *v8; // ecx@12
  BYTE *v9; // edx@12
  char v10; // al@13
  NiRefObjectVtbl *v11; // edi@15
  char *v12; // eax@15
  BYTE *v13; // edi@18
  BYTE v14; // al@18
  int i; // ebx@18
  const char *v16; // ecx@23
  char *v17; // edx@23
  char v18; // al@24
  BYTE *v19; // edi@27
  BYTE v20; // al@27
  int j; // ebx@27
  const char *v22; // ecx@32
  char *v23; // edx@32
  char v24; // al@33
  NiRefObjectVtbl *v25; // edi@35
  char *v26; // eax@35
  BYTE *v27; // edi@37
  BYTE v28; // al@37
  int v29; // ebx@37
  char *v30; // edx@43
  char *v31; // ecx@44
  Item *v32; // eax@45
  ItemIcon *v33; // ecx@45
  char *v34; // eax@47
  ItemIcon *v35; // esi@47
  char *v36; // [sp-8h] [bp-20h]@14
  char *v37; // [sp-8h] [bp-20h]@34
  unsigned int v38; // [sp-4h] [bp-1Ch]@14
  unsigned int v39; // [sp-4h] [bp-1Ch]@34
  float _fAccumTime; // [sp+0h] [bp-18h]@14
  float _fAccumTimea; // [sp+0h] [bp-18h]@34
  int c1; // [sp+14h] [bp-4h]@4
  const char *c3; // [sp+20h] [bp+8h]@4

  v2 = this;
  if ( !(this->m_uFlags & 1) && CNSTimer_Interval::IsRun_GetCount(&this->m_kTimerInterval, fCurTime) )
    v2->m_bDuplication = 0;
  v3 = 0;
  c1 = 0;
  v4 = ((int (*)(void))v2->m_spEdit.m_pObject->vfptr[113].__vecDelDtor)();
  c3 = (const char *)v4;
  v5 = (BYTE *)v4;
  v6 = strlen((const char *)((int (*)(void))v2->m_spEdit.m_pObject->vfptr[113].__vecDelDtor)());
  if ( v6 <= 0 )
  {
    if ( !v6 )
    {
      v27 = v2->m_pcOldText;
      v28 = *v27;
      v29 = 0;
      if ( !*v27 )
        goto LABEL_50;
      do
      {
        if ( IsDBCSLeadByte(v28) )
          v27 += 2;
        else
          ++v27;
        v28 = *v27;
        ++v29;
      }
      while ( *v27 );
      if ( v29 != 1 )
      {
LABEL_50:
        v31 = v2->m_pcOldText;
        v2->m_uiLimitText = 0;
        *v31 = 0;
        _fAccumTime = *(float *)&v2->m_uiLimitTextLength;
        v38 = v2->m_uiLimitText;
        v36 = "%d/%d";
LABEL_15:
        v11 = v2->m_pLimitTextWin->vfptr;
        v12 = fs(v36, v38, _fAccumTime);
LABEL_16:
        v11[118].__vecDelDtor((NiRefObject *)v2->m_pLimitTextWin, (unsigned int)v12);
        return;
      }
      v30 = v2->m_pcOldText;
      --v2->m_uiLimitText;
      *v30 = 0;
      _fAccumTimea = *(float *)&v2->m_uiLimitTextLength;
      v39 = v2->m_uiLimitText;
      v37 = "%d/%d";
      goto LABEL_35;
    }
  }
  else
  {
    v7 = c3;
    if ( *c3 )
    {
      do
      {
        if ( IsDBCSLeadByte(*v5) )
          v5 += 2;
        else
          ++v5;
        ++v3;
      }
      while ( *v5 );
      v7 = c3;
      c1 = v3;
    }
    v5 = v2->m_pcOldText;
    if ( !strlen(v2->m_pcOldText) )
    {
      v2->m_uiLimitText += v3;
      v8 = v7;
      v9 = v5;
      do
      {
        v10 = *v8;
        *v9++ = *v8++;
      }
      while ( v10 );
      _fAccumTime = *(float *)&v2->m_uiLimitTextLength;
      v38 = v2->m_uiLimitText;
      v36 = "%d/%d";
      goto LABEL_15;
    }
    if ( _strcmpi(v5, v7) < 0 )
    {
      v13 = v2->m_pcOldText;
      v14 = *v13;
      for ( i = 0; *v13; ++i )
      {
        if ( IsDBCSLeadByte(v14) )
          v13 += 2;
        else
          ++v13;
        v14 = *v13;
      }
      v16 = c3;
      v17 = v2->m_pcOldText;
      v2->m_uiLimitText += c1 - i;
      do
      {
        v18 = *v16;
        *v17++ = *v16++;
      }
      while ( v18 );
      v11 = v2->m_pLimitTextWin->vfptr;
      v12 = fs("%d/%d", v2->m_uiLimitText, v2->m_uiLimitTextLength);
      goto LABEL_16;
    }
    if ( _strcmpi(v2->m_pcOldText, c3) > 0 )
    {
      v19 = v2->m_pcOldText;
      v20 = *v19;
      for ( j = 0; *v19; ++j )
      {
        if ( IsDBCSLeadByte(v20) )
          v19 += 2;
        else
          ++v19;
        v20 = *v19;
      }
      v22 = c3;
      v23 = v2->m_pcOldText;
      v2->m_uiLimitText += c1 - j;
      do
      {
        v24 = *v22;
        *v23++ = *v22++;
      }
      while ( v24 );
      _fAccumTimea = *(float *)&v2->m_uiLimitTextLength;
      v39 = v2->m_uiLimitText;
      v37 = "%d/%d";
LABEL_35:
      v25 = v2->m_pLimitTextWin->vfptr;
      v26 = fs(v37, v39, _fAccumTimea);
      v25[118].__vecDelDtor((NiRefObject *)v2->m_pLimitTextWin, (unsigned int)v26);
      return;
    }
  }
  v32 = Inventory::GetItemByID(&g_kInventory, v2->m_pkItemInfo->ID);
  v33 = v2->m_pkItemIconWin;
  if ( v32 )
  {
    ItemIcon::SetItem(v33, v32, 1);
  }
  else
  {
    ItemIcon::SetItemAsID(v33, (int)v5, 30069);
    v34 = fs("%d\n", 0);
    v35 = v2->m_pkItemIconWin;
    ((void (__stdcall *)(char *))v35->m_pkLotText->vfptr[118].__vecDelDtor)(v34);
    ((void (__stdcall *)(signed int))v35->m_pkLotText->vfptr[64].__vecDelDtor)(1);
  }
}

//----- (0057FA60) --------------------------------------------------------
void __thiscall RoarWin::OnEditEnd(RoarWin *this, unsigned int wParam, int lParam)
{
  ((void (*)(void))this->m_spEdit.m_pObject->vfptr[120].__vecDelDtor)();
}

//----- (0057FA80) --------------------------------------------------------
void __thiscall RoarWin::RoarWin(RoarWin *this)
{
  RoarWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&RoarWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&RoarWin::`vftable'{for `IDirectMessenger'};
  v1->m_spEdit.m_pObject = 0;
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kTimerInterval);
  v1->m_uiLimitTextLength = 65;
  v1->m_uiLockInvPos = 0;
  v1->m_uiLimitText = 0;
  v1->m_pLimitTextWin = 0;
  v1->m_pcOldText = 0;
  v1->m_bDuplication = 0;
  v1->m_pkItemIconWin = 0;
  v1->m_pkItemInfo = 0;
}
// 99F99C: using guessed type void (__thiscall *RoarWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99F9BC: using guessed type int (__thiscall *RoarWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0057FB20) --------------------------------------------------------
void __thiscall RoarWin::~RoarWin(RoarWin *this)
{
  RoarWin *v1; // esi@1
  EditWin *v2; // edi@1
  char *v3; // eax@6
  EditWin *v4; // edi@8

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&RoarWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&RoarWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spEdit.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spEdit.m_pObject = 0;
  }
  v3 = v1->m_pcOldText;
  v1->m_pLimitTextWin = 0;
  if ( v3 )
  {
    operator delete[](v3);
    v1->m_pcOldText = 0;
  }
  v4 = v1->m_spEdit.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 99F99C: using guessed type void (__thiscall *RoarWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99F9BC: using guessed type int (__thiscall *RoarWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0057FC00) --------------------------------------------------------
char __thiscall RoarWin::Create(RoarWin *this, PgFrameWork *pkFrameWork)
{
  RoarWin *v2; // esi@1
  NiSourceTexture *v3; // ebx@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // edi@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  int v10; // edi@15
  NiSourceTexture *v11; // eax@15
  PgSprData *v12; // eax@16
  PgSprData *v13; // eax@18
  PgSprData *v14; // eax@18
  PgFont *v15; // eax@20
  PgWinText *v16; // edi@20
  NiRefObjectVtbl *v17; // ebx@20
  NiUnsharedGeometryGroup *v18; // eax@20
  PgSprData *v19; // eax@20
  ItemInfo *v20; // eax@20
  Item *v21; // edi@20
  char *v22; // eax@20
  EditWin *v23; // eax@23
  PgSprData *v24; // edi@23
  PgWinBut *v25; // edi@23
  PgFont *v26; // ST44_4@23
  unsigned int v27; // ST40_4@23
  unsigned int v28; // eax@23
  PgWinText *v29; // edi@23
  NiRefObjectVtbl *v30; // ebx@23
  NiUnsharedGeometryGroup *v31; // eax@23
  PgSprData *v32; // edi@23
  PgWinBut *v33; // edi@23
  PgFont *v34; // ST44_4@23
  unsigned int v35; // ST40_4@23
  unsigned int v36; // eax@23
  PgWinText *v37; // edi@23
  NiRefObjectVtbl *v38; // ebx@23
  NiUnsharedGeometryGroup *v39; // eax@23
  NiSourceTexture *v40; // edi@23
  PgSprData *v41; // edi@24
  PgSprData *v42; // eax@25
  PgSprData *v43; // edi@25
  PgWinSpr *v44; // eax@25
  NiPointer<PgSprData::PgHitTester> *v45; // ecx@25
  unsigned int v46; // edi@25
  unsigned int v47; // ebx@25
  PgFont *v48; // eax@25
  PgWinText *v49; // edi@25
  NiRefObjectVtbl *v50; // ebx@27
  NiUnsharedGeometryGroup *v51; // eax@27
  PgSprData *v52; // eax@28
  PgSprData *v53; // edi@28
  PgWinSpr *v54; // eax@28
  NiPointer<PgSprData::PgHitTester> *v55; // ecx@28
  unsigned int v56; // edi@28
  unsigned int v57; // ebx@28
  PgFont *v58; // eax@28
  PgWinText *v59; // eax@28
  NiRefObjectVtbl *v60; // edi@28
  char *v61; // eax@28
  int v62; // ecx@29
  NiRefObjectVtbl **v63; // ebx@30
  NiRefObjectVtbl *v64; // edi@30
  NiUnsharedGeometryGroup *v65; // eax@30
  NiUnsharedGeometryGroup *v66; // eax@30
  int v67; // edi@30
  char v68; // dl@31
  char *v69; // eax@32
  NiSourceTexture *pkTexture; // [sp+64h] [bp-24h]@1
  unsigned int uiWidth; // [sp+68h] [bp-20h]@18
  unsigned int uiHeight; // [sp+6Ch] [bp-1Ch]@18
  NiPointer<NiNode> spNode; // [sp+70h] [bp-18h]@1
  int uiLeft; // [sp+74h] [bp-14h]@11
  int uiTop; // [sp+78h] [bp-10h]@11
  int v76; // [sp+84h] [bp-4h]@1
  int iYOff; // [sp+90h] [bp+8h]@15

  v2 = this;
  spNode.m_pObject = 0;
  v76 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  pkTexture = v3;
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v76 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
    goto LABEL_5;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "Game\\Roar.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "RoarWin", 0) )
  {
    v4 = spNode.m_pObject;
    v76 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v10 = uiLeft;
  iYOff = uiTop;
  v11 = MenuTexMgr::GetTexture(0x13u);
  if ( v11 )
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v11);
  else
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop - iYOff, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop, v13, (PgWin *)&v2->vfptr, 0, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop, v14, (PgWin *)&v2->vfptr, 0, 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "WinTitle",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
    goto LABEL_35;
  v15 = Font::Get(MAIN_MENU);
  v16 = PgWinText::CreateWin(uiLeft, uiTop, uiWidth, uiHeight, v15, (PgWin *)&v2->vfptr, 0, 0);
  v16->vfptr[122].__vecDelDtor((NiRefObject *)v16, 5u);
  v16->vfptr[117].__vecDelDtor((NiRefObject *)v16, (unsigned int)&Color::m_kDxWinTitleColor);
  v17 = v16->vfptr;
  v18 = TextData::Get(0xEE4B1720);
  v17[118].__vecDelDtor((NiRefObject *)v16, (unsigned int)v18);
  v16->vfptr[60].__vecDelDtor((NiRefObject *)v16, 0);
  PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Slot00", &uiLeft, &uiTop, &uiWidth, &uiHeight);
  v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Slot00", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft, uiTop, v19, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkItemIconWin = ItemIcon::CreateWin(uiLeft, uiTop, (PgWin *)&v2->vfptr);
  v20 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(30069);
  v2->m_pkItemInfo = v20;
  v21 = Inventory::GetItemByID(&g_kInventory, v20->ID);
  ItemIcon::SetItemAsID(v2->m_pkItemIconWin, (int)v21, 30069);
  v22 = fs("%d\n", 0);
  ItemIcon::SetLotText(v2->m_pkItemIconWin, v22);
  if ( v21 )
    ItemIcon::SetItem(v2->m_pkItemIconWin, v21, 1);
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "TestBox", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
LABEL_35:
    v76 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  v23 = EditWin::CreateWin(uiLeft, uiTop - 2, uiWidth, uiHeight, (PgWin *)&v2->vfptr, NORMAL, 0x41u, 1u, 1, 0, 1);
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spEdit, (NiD3DDefaultShader *)v23);
  EditWin::SetImeStatus(v2->m_spEdit.m_pObject, IS_KOREAN);
  v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(v24, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick");
  PgSprData::Add(v24, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver");
  v25 = PgWinBut::CreateWin(uiLeft, uiTop, v24, (PgWin *)&v2->vfptr, 0, 0, 0);
  v26 = Font::Get(0);
  v27 = ((int (__thiscall *)(PgWinBut *))v25->vfptr[37].__vecDelDtor)(v25);
  v28 = ((int (__thiscall *)(PgWinBut *))v25->vfptr[36].__vecDelDtor)(v25);
  v29 = PgWinText::CreateWin(0, 1, v28, v27, v26, (PgWin *)&v25->vfptr, 0, 0);
  v29->vfptr[122].__vecDelDtor((NiRefObject *)v29, 5u);
  v30 = v29->vfptr;
  v31 = TextData::Get(0x4F5F499Fu);
  v30[118].__vecDelDtor((NiRefObject *)v29, (unsigned int)v31);
  v29->vfptr[60].__vecDelDtor((NiRefObject *)v29, 0);
  v32 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor01", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(v32, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick01");
  PgSprData::Add(v32, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver01");
  v33 = PgWinBut::CreateWin(uiLeft, uiTop, v32, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v34 = Font::Get(0);
  v35 = ((int (__thiscall *)(PgWinBut *))v33->vfptr[37].__vecDelDtor)(v33);
  v36 = ((int (__thiscall *)(PgWinBut *))v33->vfptr[36].__vecDelDtor)(v33);
  v37 = PgWinText::CreateWin(0, 1, v36, v35, v34, (PgWin *)&v33->vfptr, 0, 0);
  v37->vfptr[122].__vecDelDtor((NiRefObject *)v37, 5u);
  v38 = v37->vfptr;
  v39 = TextData::Get(0x88A297E1);
  v38[118].__vecDelDtor((NiRefObject *)v37, (unsigned int)v39);
  v37->vfptr[60].__vecDelDtor((NiRefObject *)v37, 0);
  v40 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    v41 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, v40);
    PgSprData::Add(v41, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(v41, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft, uiTop, v41, (PgWin *)&v2->vfptr, 2u, 0, 0);
  }
  v42 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TestBox01", &uiLeft, &uiTop, 0);
  v43 = v42;
  v44 = PgWinSpr::CreateWin(uiLeft, uiTop, v42, (PgWin *)&v2->vfptr, 0, 0);
  v44->vfptr[69].__vecDelDtor((NiRefObject *)v44, COERCE_UNSIGNED_INT(0.0));
  v45 = v43->m_akHitTester.m_pBase;
  v46 = v45->m_pObject->m_uiHeight;
  v47 = v45->m_pObject->m_uiWidth;
  v48 = Font::Get(0);
  v49 = PgWinText::CreateWin(uiLeft, uiTop, v47, v46, v48, (PgWin *)&v2->vfptr, 0, 0);
  v49->vfptr[122].__vecDelDtor((NiRefObject *)v49, 5u);
  if ( LOBYTE(TextData::Get(0x59487899u)->vfptr) )
  {
    v50 = v49->vfptr;
    v51 = TextData::Get(0x59487899u);
    v50[118].__vecDelDtor((NiRefObject *)v49, (unsigned int)v51);
  }
  else
  {
    v49->vfptr[118].__vecDelDtor((NiRefObject *)v49, (unsigned int)"Unknown Use String");
  }
  v49->vfptr[60].__vecDelDtor((NiRefObject *)v49, 0);
  v52 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TestBox_count", &uiLeft, &uiTop, 0);
  v53 = v52;
  v54 = PgWinSpr::CreateWin(uiLeft, uiTop, v52, (PgWin *)&v2->vfptr, 0, 0);
  v54->vfptr[69].__vecDelDtor((NiRefObject *)v54, COERCE_UNSIGNED_INT(0.0));
  v55 = v53->m_akHitTester.m_pBase;
  v56 = v55->m_pObject->m_uiHeight;
  v57 = v55->m_pObject->m_uiWidth;
  v58 = Font::Get(0);
  v59 = PgWinText::CreateWin(uiLeft, uiTop, v57, v56, v58, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pLimitTextWin = v59;
  v59->vfptr[122].__vecDelDtor((NiRefObject *)v59, 5u);
  v60 = v2->m_pLimitTextWin->vfptr;
  v61 = fs("%d/%d", v2->m_uiLimitText, 50);
  v60[118].__vecDelDtor((NiRefObject *)v2->m_pLimitTextWin, (unsigned int)v61);
  ((void (__stdcall *)(_DWORD))v2->m_pLimitTextWin->vfptr[60].__vecDelDtor)(0);
  ((void (__thiscall *)(RoarWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  if ( LOBYTE(TextData::Get(0xFA051E34)->vfptr) )
  {
    v63 = &v2->m_spEdit.m_pObject->vfptr;
    v64 = *v63;
    v65 = TextData::Get(0xFA051E34);
    v64[116].__vecDelDtor((NiRefObject *)v63, (unsigned int)v65);
    v66 = TextData::Get(0xFA051E34);
    v62 = (int)v2->m_acRoarNoticeClone;
    v67 = v2->m_acRoarNoticeClone - (char *)v66;
    do
    {
      v68 = (char)v66->vfptr;
      *((_BYTE *)&v66->vfptr + v67) = v66->vfptr;
      v66 = (NiUnsharedGeometryGroup *)((char *)v66 + 1);
    }
    while ( v68 );
  }
  else
  {
    ((void (__stdcall *)(const char *))v2->m_spEdit.m_pObject->vfptr[116].__vecDelDtor)("Unknown Notice");
    *(_DWORD *)&v2->m_acRoarNoticeClone[0] = 1852534357;
    v62 = (int)v2->m_acRoarNoticeClone;
    *(_DWORD *)(v62 + 4) = 544110447;
    *(_DWORD *)(v62 + 8) = 1769238350;
    *(_WORD *)(v62 + 12) = 25955;
    *(_BYTE *)(v62 + 14) = 0;
  }
  v2->m_uiRoarNoticeLength = strlen((const char *)v62);
  v69 = (char *)operator new[](0x78u);
  v2->m_pcOldText = v69;
  *v69 = 0;
  v76 = -1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00580450) --------------------------------------------------------
ProcessingString *__stdcall RoarWin::FilterRemoveEnter(char *pcStr)
{
  TextFilterReplace *v2; // eax@4
  TextFilter *v3; // eax@5
  char str[3]; // [sp+Ch] [bp-10h]@4
  int v6; // [sp+18h] [bp-4h]@2

  if ( !(_S3_5 & 1) )
  {
    _S3_5 |= 1u;
    unk_A8D494 = 0;
    unk_A8D48C = 0;
    unk_A8D490 = 0;
    s_kTextFilterSet_1.m_kTextFilterList.vfptr = (NiTListBase<DFALL<TextFilter *>,TextFilter *>Vtbl *)&NiTList<TextFilter *>::`vftable';
    ProcessingString::ProcessingString(&stru_A8D498);
    atexit(RoarWin::FilterRemoveEnter_::_2_::_dynamic_atexit_destructor_for__s_kTextFilterSet__);
    v6 = -1;
  }
  if ( !s_bInit_2 )
  {
    s_bInit_2 = 1;
    strcpy(str, "\r\n");
    v2 = (TextFilterReplace *)operator new(0xCu);
    v6 = 2;
    if ( v2 )
      TextFilterReplace::TextFilterReplace(v2, str, " ");
    else
      v3 = 0;
    v6 = -1;
    TextFilterSet::AddFilter(&s_kTextFilterSet_1, v3);
  }
  return TextFilterSet::Filter(&s_kTextFilterSet_1, pcStr, 1);
}
// 978440: using guessed type int (__thiscall *NiTList<TextFilter *>::`vftable')(void *p, char);

//----- (00580550) --------------------------------------------------------
RoarWin *__cdecl RoarWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  RoarWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x29Cu);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    RoarWin::RoarWin((RoarWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (RoarWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00580680) --------------------------------------------------------
void __thiscall RoarWin::OnCmdOk(RoarWin *this)
{
  RoarWin *v1; // ebx@1
  NiUnsharedGeometryGroup *v2; // edi@7
  NiUnsharedGeometryGroup *v3; // edi@17
  const char *v4; // eax@21
  const char *v5; // esi@21
  signed int v6; // edi@22
  char v7; // al@23
  char v8; // al@26
  char *v9; // ecx@26
  signed int v10; // edx@27
  BYTE *v11; // esi@34
  unsigned int v12; // edi@34
  NiUnsharedGeometryGroup *v13; // eax@38
  ProcessingString *v14; // esi@50
  NiUnsharedGeometryGroup *v15; // eax@51
  char *v16; // eax@55
  ProcessingString *v17; // eax@55
  NiUnsharedGeometryGroup *v18; // eax@47
  NiUnsharedGeometryGroup *v19; // edi@63
  char *pcText; // [sp+14h] [bp-8Ch]@21
  char acToken[128]; // [sp+1Ch] [bp-84h]@24

  v1 = this;
  if ( AnnounceWin::m_bNoticing )
  {
    if ( LOBYTE(TextData::Get(0xD8F8002B)->vfptr) )
    {
      v2 = TextData::Get(0xD8F8002B);
      if ( v1->m_pkMsgHooker )
      {
        ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v1->m_pkMsgHooker->vfptr->SendDirectMessage)(
          25,
          v2,
          &v1->vfptr);
        if ( v1->m_pkMsgHooker )
          ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v1->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            25,
            v2,
            &v1->vfptr);
      }
      v1->vfptr->DirectDispatchToParent((IDirectMessenger *)&v1->vfptr, 25, v2, (IDirectMessenger *)&v1->vfptr);
    }
    else
    {
      if ( v1->m_pkMsgHooker )
      {
        ((void (__stdcall *)(signed int, const char *, IDirectMessengerVtbl **))v1->m_pkMsgHooker->vfptr->SendDirectMessage)(
          25,
          "Error - Global Notice",
          &v1->vfptr);
        if ( v1->m_pkMsgHooker )
          ((void (__stdcall *)(signed int, const char *, IDirectMessengerVtbl **))v1->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            25,
            "Error - Global Notice",
            &v1->vfptr);
      }
      v1->vfptr->DirectDispatchToParent(
        (IDirectMessenger *)&v1->vfptr,
        25,
        "Error - Global Notice",
        (IDirectMessenger *)&v1->vfptr);
    }
    return;
  }
  if ( this->m_bDuplication == 1 )
  {
    if ( LOBYTE(TextData::Get(0xDC4F373E)->vfptr) )
    {
      v3 = TextData::Get(0xDC4F373E);
      if ( v1->m_pkMsgHooker )
      {
        ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v1->m_pkMsgHooker->vfptr->SendDirectMessage)(
          25,
          v3,
          &v1->vfptr);
        if ( v1->m_pkMsgHooker )
          ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v1->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            25,
            v3,
            &v1->vfptr);
      }
      v1->vfptr->DirectDispatchToParent((IDirectMessenger *)&v1->vfptr, 25, v3, (IDirectMessenger *)&v1->vfptr);
    }
    else
    {
      if ( v1->m_pkMsgHooker )
      {
        ((void (__stdcall *)(_DWORD, const char *, _DWORD))v1->m_pkMsgHooker->vfptr->SendDirectMessage)(
          25,
          "Error - CollTime",
          &v1->vfptr);
        if ( v1->m_pkMsgHooker )
          ((void (__stdcall *)(_DWORD, const char *, _DWORD))v1->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            25,
            "Error - CollTime",
            &v1->vfptr);
      }
      v1->vfptr->DirectDispatchToParent(
        (IDirectMessenger *)&v1->vfptr,
        25,
        "Error - CollTime",
        (IDirectMessenger *)&v1->vfptr);
    }
    return;
  }
  v4 = (const char *)((int (*)(void))this->m_spEdit.m_pObject->vfptr[113].__vecDelDtor)();
  v5 = v4;
  pcText = (char *)v4;
  if ( !v4 )
    return;
  v6 = strlen(v4);
  if ( !*v5 )
  {
LABEL_34:
    v11 = pcText;
    v12 = 0;
    if ( strlen(pcText) && *pcText )
    {
      do
      {
        if ( IsDBCSLeadByte(*v11) )
          v11 += 2;
        else
          ++v11;
        ++v12;
      }
      while ( *v11 );
    }
    if ( v12 <= v1->m_uiLimitTextLength )
    {
      if ( v12 && strcmp(pcText, (const char *)TextData::Get(0xFA051E34)) )
      {
        v14 = TextFilterTable::FilterSlander(pcText);
        if ( !strcmp(pcText, v14->m_acSource) )
        {
          if ( strlen((const char *)((int (*)(void))v1->m_spEdit.m_pObject->vfptr[113].__vecDelDtor)()) )
          {
            if ( !(unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[1].DeleteAbStateByAbstateIndex)() )
              InvWin::SetLock(*((InvWin **)v1->m_pkFrameWork[19].m_BackFrameID + v1->m_uiLockInvPos + 87), 0);
            v16 = (char *)((int (*)(void))v1->m_spEdit.m_pObject->vfptr[113].__vecDelDtor)();
            v17 = RoarWin::FilterRemoveEnter(v16);
            ((void (__stdcall *)(ProcessingString *))v1->m_spEdit.m_pObject->vfptr[116].__vecDelDtor)(v17);
            GameFrameWork::On_NC_ACT_ROAR_REQ((GameFrameWork *)v1->m_pkFrameWork);
            PgWin::PostMsg((PgWin *)&v1->vfptr, 1u, 0, 0);
            if ( !(unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[1].DeleteAbStateByAbstateIndex)() )
            {
              CNSTimer_Interval::ReSet(&v1->m_kTimerInterval, Timer::ms_fCurTime);
              v1->m_kTimerInterval.m_fCheckTime = 5.0;
              v1->m_bDuplication = 1;
            }
          }
        }
        else
        {
          v15 = TextData::Get(0x24663F86u);
          GameFrameWork::AddSysMsg((GameFrameWork *)v1->m_pkFrameWork, (const char *)v15);
          ((void (__stdcall *)(ProcessingString *))v1->m_spEdit.m_pObject->vfptr[116].__vecDelDtor)(v14);
        }
        return;
      }
      if ( !LOBYTE(TextData::Get(0x820DE0EB)->vfptr) )
      {
        if ( v1->m_pkMsgHooker )
        {
          ((void (__stdcall *)(_DWORD, const char *, _DWORD))v1->m_pkMsgHooker->vfptr->SendDirectMessage)(
            25,
            "Error - Not Input",
            &v1->vfptr);
          if ( v1->m_pkMsgHooker )
            ((void (__stdcall *)(_DWORD, const char *, _DWORD))v1->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
              25,
              "Error - Not Input",
              &v1->vfptr);
        }
        v1->vfptr->DirectDispatchToParent(
          (IDirectMessenger *)&v1->vfptr,
          25,
          "Error - Not Input",
          (IDirectMessenger *)&v1->vfptr);
        return;
      }
      v18 = TextData::Get(0x820DE0EB);
    }
    else
    {
      if ( !LOBYTE(TextData::Get(0x89B5F6C7)->vfptr) )
      {
        if ( v1->m_pkMsgHooker )
        {
          ((void (__stdcall *)(_DWORD, const char *, _DWORD))v1->m_pkMsgHooker->vfptr->SendDirectMessage)(
            25,
            "Error - String Over",
            &v1->vfptr);
          if ( v1->m_pkMsgHooker )
            ((void (__stdcall *)(_DWORD, const char *, _DWORD))v1->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
              25,
              "Error - String Over",
              &v1->vfptr);
        }
        v1->vfptr->DirectDispatchToParent(
          (IDirectMessenger *)&v1->vfptr,
          25,
          "Error - String Over",
          (IDirectMessenger *)&v1->vfptr);
        return;
      }
      v18 = TextData::Get(0x89B5F6C7);
    }
    v19 = v18;
    if ( v1->m_pkMsgHooker )
    {
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->SendDirectMessage)(25, v18, &v1->vfptr);
      if ( v1->m_pkMsgHooker )
        ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          25,
          v19,
          &v1->vfptr);
    }
    v1->vfptr->DirectDispatchToParent((IDirectMessenger *)&v1->vfptr, 25, v19, (IDirectMessenger *)&v1->vfptr);
    return;
  }
  while ( 1 )
  {
    v7 = *v5++;
    if ( v7 == 123 )
    {
      acToken[0] = 0;
      memset(&acToken[1], 0, 0x7Fu);
      for ( ; *v5 == 32; ++v5 )
        ;
      v8 = *v5;
      v9 = acToken;
      if ( *v5 )
      {
        v10 = 0;
        do
        {
          if ( v10 >= v6 )
            break;
          if ( v8 != 32 )
          {
            *v9++ = v8;
            ++v10;
          }
          v8 = (v5++)[1];
        }
        while ( v8 );
      }
      *v9 = 0;
      if ( !_strnicmp(acToken, "color,", 6u) )
        break;
    }
    if ( !*v5 )
      goto LABEL_34;
  }
  InvWin::SetLock(*((InvWin **)v1->m_pkFrameWork[19].m_BackFrameID + v1->m_uiLockInvPos + 87), 0);
  v13 = TextData3::Get(0xE012BCE5);
  GameFrameWork::AddSysMsg((GameFrameWork *)v1->m_pkFrameWork, (const char *)v13);
  PgWin::PostMsg((PgWin *)&v1->vfptr, 1u, 0, 0);
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8CB24: using guessed type bool AnnounceWin::m_bNoticing;

//----- (00580C50) --------------------------------------------------------
void __thiscall RoarWin::OnCommand(RoarWin *this, unsigned int wParam, int lParam)
{
  RoarWin *v3; // esi@1
  GameFrameWork *v4; // eax@4

  v3 = this;
  if ( wParam )
  {
    if ( wParam == 1 )
    {
      InvWin::SetLock(*((InvWin **)this->m_pkFrameWork[19].m_BackFrameID + this->m_uiLockInvPos + 87), 0);
      PgWin::PostMsg((PgWin *)&v3->vfptr, 1u, 0, 0);
    }
    else if ( wParam == 2 )
    {
      v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v4 )
        GameFrameWork::OpenPlayGuideSearchList(v4, "Roar");
    }
  }
  else
  {
    RoarWin::OnCmdOk(this);
  }
}

//----- (00580CD0) --------------------------------------------------------
RoarWin *__thiscall RoarWin::`scalar deleting destructor'(RoarWin *this, unsigned int a2)
{
  RoarWin *v2; // esi@1

  v2 = this;
  RoarWin::~RoarWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00580D00) --------------------------------------------------------
void __thiscall RollingDiceWin::RollingDiceWin(RollingDiceWin *this)
{
  RollingDiceWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&RollingDiceWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&RollingDiceWin::`vftable'{for `IDirectMessenger'};
  v1->m_fTimeWhenCasted = 3.4028235e38;
  v1->m_pkCastingProgress = 0;
  v1->m_bCloseWhenFinished = 1;
  v1->m_fCastingTime = 0.0;
  *(_DWORD *)&v1->m_kItemHandle = -1;
  v1->m_fMax = 0.94999999;
}
// 99FD98: using guessed type void (__thiscall *RollingDiceWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99FDB4: using guessed type int (__thiscall *RollingDiceWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00580D60) --------------------------------------------------------
void __thiscall RollingDiceWin::~RollingDiceWin(RollingDiceWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&RollingDiceWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&RollingDiceWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 99FD98: using guessed type void (__thiscall *RollingDiceWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99FDB4: using guessed type int (__thiscall *RollingDiceWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00580D80) --------------------------------------------------------
void __userpurge RollingDiceWin::OnCommand(RollingDiceWin *this@<ecx>, int a2@<edi>, unsigned int wParam, int lParam)
{
  RollingDiceWin *v4; // esi@1
  unsigned int *v5; // [sp-8h] [bp-Ch]@3

  v4 = this;
  if ( wParam == 1 )
  {
    LOWORD(wParam) = this->m_kItemHandle;
    BYTE2(wParam) = 0;
    v5 = &wParam;
  }
  else
  {
    if ( wParam != 2 )
      return;
    LOWORD(wParam) = this->m_kItemHandle;
    BYTE2(wParam) = 1;
    v5 = &wParam;
  }
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x3Cu, v5, 3);
  ItemIcon::SetItemAsID(v4->m_pkItemIconWin, a2, 0xFFFF);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v4->vfptr);
}

//----- (00580E00) --------------------------------------------------------
void __thiscall RollingDiceWin::Stop(RollingDiceWin *this)
{
  this->m_fCastingTime = 0.0;
}

//----- (00580E10) --------------------------------------------------------
void __thiscall RollingDiceMsgWin::RollingDiceMsgWin(RollingDiceMsgWin *this)
{
  RollingDiceMsgWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&RollingDiceMsgWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&RollingDiceMsgWin::`vftable'{for `IDirectMessenger'};
  *(_DWORD *)&v1->m_kItemID = -1;
}
// 99FFD8: using guessed type void (__thiscall *RollingDiceMsgWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99FFF4: using guessed type int (__thiscall *RollingDiceMsgWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00580E40) --------------------------------------------------------
void __thiscall RollingDiceMsgWin::~RollingDiceMsgWin(RollingDiceMsgWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&RollingDiceMsgWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&RollingDiceMsgWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 99FFD8: using guessed type void (__thiscall *RollingDiceMsgWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99FFF4: using guessed type int (__thiscall *RollingDiceMsgWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00580E60) --------------------------------------------------------
void __thiscall RollingDiceMsgWin::OnCommand(RollingDiceMsgWin *this, unsigned int wParam, int lParam)
{
  RollingDiceMsgWin *v3; // esi@1
  GameFrameWork *v4; // eax@4

  v3 = this;
  if ( wParam == 1 )
  {
    v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v4 )
    {
      GameFrameWork::NcItemPickReq(v4, v3->m_kItemHandle);
      v3->m_kItemHandle = -1;
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
    }
  }
  else if ( wParam == 2 )
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
  }
}

//----- (00580EC0) --------------------------------------------------------
void __userpurge RollingDiceMsgWin::SetItemInfo(RollingDiceMsgWin *this@<ecx>, int a2@<edi>, int kItemID, unsigned __int16 kItemHandle)
{
  this->m_kItemID = kItemID;
  this->m_kItemHandle = kItemHandle;
  ItemIcon::SetItemAsID(this->m_pkItemIconWin, a2, kItemID);
}

//----- (00580F00) --------------------------------------------------------
void __thiscall RollingDiceMsgWin::UpdateMeWin(RollingDiceMsgWin *this, float fCurTime)
{
  RollingDiceMsgWin *v2; // esi@1
  Item *v3; // eax@2
  ItemInfoWin *v4; // ecx@2

  v2 = this;
  if ( (unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD))this->m_pkItemIconWin->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY) )
  {
    v3 = Item::Create(v2->m_kItemID);
    v4 = (ItemInfoWin *)v2->m_pkItemIconWin->m_pkToolTipWin;
    if ( v4 )
    {
      if ( v3 )
        ItemInfoWin::SetItemInfo(v4, v3);
    }
  }
}

//----- (00580F60) --------------------------------------------------------
char __thiscall RollingDiceWin::Create(RollingDiceWin *this, PgFrameWork *pkFrameWork)
{
  RollingDiceWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // ebx@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  int v10; // edi@15
  int v11; // ebx@15
  NiSourceTexture *v12; // eax@15
  PgSprData *v13; // eax@16
  PgSprData *v14; // eax@18
  ItemIcon *v15; // eax@18
  int v16; // eax@18
  PgFont *v17; // eax@18
  PgWinText *v18; // eax@18
  NiPointer<PgSprData::PgHitTester> *v19; // ecx@18
  PgFont *v20; // eax@18
  NiUnsharedGeometryGroup *v21; // eax@18
  PgSprData *v22; // eax@18
  PgSprData *v23; // eax@18
  PgWinBar *v24; // eax@18
  PgSprData *v25; // eax@18
  PgWinBar *v26; // eax@18
  PgSprData *v27; // eax@18
  PgWinBar *v28; // eax@18
  int v29; // eax@18
  PgFont *v30; // eax@18
  NiUnsharedGeometryGroup *v31; // eax@18
  NiPointer<PgSprData::PgHitTester> *v32; // ecx@18
  PgFont *v33; // eax@18
  PgWinText *v34; // edi@18
  NiRefObjectVtbl *v35; // ebx@18
  NiUnsharedGeometryGroup *v36; // eax@18
  NiNode *v37; // esi@19
  unsigned int uiWidth; // [sp+54h] [bp-28h]@18
  unsigned int uiHeight; // [sp+58h] [bp-24h]@18
  unsigned int v40; // [sp+5Ch] [bp-20h]@18
  NiSourceTexture *pkTexture; // [sp+60h] [bp-1Ch]@1
  NiPointer<NiNode> spNode; // [sp+64h] [bp-18h]@1
  int uiLeft; // [sp+68h] [bp-14h]@11
  int uiTop; // [sp+6Ch] [bp-10h]@11
  int v45; // [sp+78h] [bp-4h]@1
  PgWinText *pkTextWin; // [sp+84h] [bp+8h]@18
  PgWinText *pkTextWina; // [sp+84h] [bp+8h]@18
  PgSprData *pkTextWinb; // [sp+84h] [bp+8h]@18
  PgWinText *pkTextWinc; // [sp+84h] [bp+8h]@18
  PgWinText *pkTextWind; // [sp+84h] [bp+8h]@18
  PgWinText *pkTextWine; // [sp+84h] [bp+8h]@18
  PgWinText *pkTextWinf; // [sp+84h] [bp+8h]@18
  PgWinText *pkTextWing; // [sp+84h] [bp+8h]@18
  PgSprData *pkTextWinh; // [sp+84h] [bp+8h]@18
  PgWinText *pkTextWini; // [sp+84h] [bp+8h]@18

  v2 = this;
  spNode.m_pObject = 0;
  v45 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  pkTexture = v3;
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v45 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "Game\\BelongDiceMain.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "RollingDiceWin", 0) )
  {
    v4 = spNode.m_pObject;
    v45 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
    goto LABEL_5;
  }
  v10 = uiLeft;
  v11 = uiTop;
  v12 = MenuTexMgr::GetTexture(0x13u);
  if ( v12 )
    v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v12);
  else
    v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop - v11, v13, (PgWin *)&v2->vfptr, 0, 0);
  PgUtil::GetTriShapeRect(
    (NiAVObject *)&spNode.m_pObject->vfptr,
    "InvItemSlot001",
    &uiLeft,
    &uiTop,
    &uiWidth,
    &uiHeight);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "InvItemSlot001", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft, uiTop, v14, (PgWin *)&v2->vfptr, 0, 0);
  v15 = ItemIcon::CreateWin(uiLeft, uiTop, (PgWin *)&v2->vfptr);
  v2->m_pkItemIconWin = v15;
  v15->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextBox01", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft, uiTop, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0, 0);
  v16 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
  pkTextWina = *(PgWinText **)(v16 + 24);
  v40 = *(_DWORD *)(v16 + 20);
  v17 = Font::Get(0);
  v18 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, v40, (unsigned int)pkTextWina, v17, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkItemName = v18;
  v18->vfptr[122].__vecDelDtor((NiRefObject *)v18, 5u);
  ((void (__stdcall *)(void *))v2->m_pkItemName->vfptr[118].__vecDelDtor)(&unk_99FC0B);
  ((void (__stdcall *)(_DWORD))v2->m_pkItemName->vfptr[60].__vecDelDtor)(0);
  pkTextWinb = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextBox02", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft, uiTop, pkTextWinb, (PgWin *)&v2->vfptr, 0, 0);
  v19 = pkTextWinb->m_akHitTester.m_pBase;
  pkTextWinc = (PgWinText *)v19->m_pObject->m_uiHeight;
  v40 = v19->m_pObject->m_uiWidth;
  v20 = Font::Get(0);
  pkTextWind = PgWinText::CreateWin(
                 uiLeft - v10,
                 uiTop - v11,
                 v40,
                 (unsigned int)pkTextWinc,
                 v20,
                 (PgWin *)&v2->vfptr,
                 0,
                 0);
  pkTextWind->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWind, 5u);
  pkTextWind->m_spTextGeom.m_pObject->m_bTextCmdOn = 1;
  v40 = (unsigned int)pkTextWind->vfptr;
  v21 = TextData2::Get(0x1CA58C64u);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v40 + 472))(pkTextWind, v21);
  ((void (__stdcall *)(_DWORD))pkTextWind->vfptr[60].__vecDelDtor)(0);
  v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_Skill_Panel", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop - v11, v22, (PgWin *)&v2->vfptr, 0, 0);
  v23 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_Skill", &uiLeft, &uiTop, 0);
  v24 = PgWinBar::CreateWin(uiLeft - v10, uiTop - v11, v23, (PgWin *)&v2->vfptr, BGT_RIGHT);
  v2->m_pkCastingProgress = v24;
  v24->vfptr[60].__vecDelDtor((NiRefObject *)v24, 0);
  v25 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_Skill_Start", &uiLeft, &uiTop, 0);
  v26 = PgWinBar::CreateWin(uiLeft - v10, uiTop - v11, v25, (PgWin *)&v2->vfptr, BGT_RIGHT);
  v2->m_pkCastingBarStart = (PgWinSpr *)v26;
  v26->vfptr[60].__vecDelDtor((NiRefObject *)v26, 0);
  v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_Skill_End", &uiLeft, &uiTop, 0);
  v28 = PgWinBar::CreateWin(uiLeft - v10, uiTop - v11, v27, (PgWin *)&v2->vfptr, BGT_RIGHT);
  v2->m_pkCastingBarEnd = (PgWinSpr *)v28;
  v28->vfptr[60].__vecDelDtor((NiRefObject *)v28, 0);
  pkTextWine = (PgWinText *)PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "BtnNor02",
                              &uiLeft,
                              &uiTop,
                              pkTexture);
  PgSprData::Add((PgSprData *)pkTextWine, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick02");
  PgSprData::Add((PgSprData *)pkTextWine, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver02");
  PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, (PgSprData *)pkTextWine, (PgWin *)&v2->vfptr, 2u, 0, 0);
  v29 = *(_DWORD *)LODWORD(pkTextWine->m_kWorldBound.m_kCenter.x);
  pkTextWinf = *(PgWinText **)(v29 + 24);
  v40 = *(_DWORD *)(v29 + 20);
  v30 = Font::Get(MAIN_MENU);
  pkTextWing = PgWinText::CreateWin(
                 uiLeft - v10,
                 uiTop - v11 + 1,
                 v40,
                 (unsigned int)pkTextWinf,
                 v30,
                 (PgWin *)&v2->vfptr,
                 0,
                 0);
  pkTextWing->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWing, 5u);
  v40 = (unsigned int)pkTextWing->vfptr;
  v31 = TextData2::Get(0x32518C68u);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v40 + 472))(pkTextWing, v31);
  ((void (__stdcall *)(_DWORD))pkTextWing->vfptr[60].__vecDelDtor)(0);
  pkTextWinh = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor03", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(pkTextWinh, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick03");
  PgSprData::Add(pkTextWinh, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver03");
  PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, pkTextWinh, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v32 = pkTextWinh->m_akHitTester.m_pBase;
  pkTextWini = (PgWinText *)v32->m_pObject->m_uiHeight;
  v40 = v32->m_pObject->m_uiWidth;
  v33 = Font::Get(MAIN_MENU);
  v34 = PgWinText::CreateWin(
          uiLeft - v10,
          uiTop - v11 + 1,
          v40,
          (unsigned int)pkTextWini,
          v33,
          (PgWin *)&v2->vfptr,
          0,
          0);
  v34->vfptr[122].__vecDelDtor((NiRefObject *)v34, 5u);
  v35 = v34->vfptr;
  v36 = TextData2::Get(0x27513972u);
  v35[118].__vecDelDtor((NiRefObject *)v34, (unsigned int)v36);
  v34->vfptr[60].__vecDelDtor((NiRefObject *)v34, 0);
  ((void (__thiscall *)(RollingDiceWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.80000001);
  v45 = -1;
  if ( spNode.m_pObject )
  {
    v37 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v37 )
        v37->vfptr->__vecDelDtor((NiRefObject *)v37, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005815E0) --------------------------------------------------------
char __thiscall RollingDiceMsgWin::Create(RollingDiceMsgWin *this, PgFrameWork *pkFrameWork)
{
  RollingDiceMsgWin *v2; // esi@1
  NiSourceTexture *v3; // ebx@1
  char result; // al@6
  NiTexturePalette *v5; // edi@7
  const char *v6; // eax@9
  PgSprData *v7; // eax@10
  NiNode *v8; // esi@11
  int v9; // ebx@16
  NiSourceTexture *v10; // eax@16
  PgSprData *v11; // eax@17
  PgSprData *v12; // eax@19
  ItemIcon *v13; // eax@19
  PgSprData *v14; // edi@19
  NiPointer<PgSprData::PgHitTester> *v15; // ecx@19
  unsigned int v16; // edi@19
  PgFont *v17; // eax@19
  PgWinText *v18; // eax@19
  NiRefObjectVtbl *v19; // edi@19
  NiUnsharedGeometryGroup *v20; // eax@19
  PgSprData *v21; // edi@19
  NiPointer<PgSprData::PgHitTester> *v22; // edx@19
  unsigned int v23; // edi@19
  PgFont *v24; // eax@19
  unsigned int *v25; // edi@19
  NiUnsharedGeometryGroup *v26; // eax@19
  PgSprData *v27; // edi@19
  PgSprData::PgHitTester *v28; // eax@19
  unsigned int v29; // edi@19
  PgFont *v30; // eax@19
  PgWinText *v31; // edi@19
  NiRefObjectVtbl *v32; // ebx@19
  NiUnsharedGeometryGroup *v33; // eax@19
  NiNode *v34; // esi@20
  unsigned int uiWidth; // [sp+40h] [bp-28h]@19
  unsigned int uiHeight; // [sp+44h] [bp-24h]@19
  unsigned int v37; // [sp+48h] [bp-20h]@19
  NiSourceTexture *pkTexture; // [sp+4Ch] [bp-1Ch]@1
  NiPointer<NiNode> spNode; // [sp+50h] [bp-18h]@1
  int uiLeft; // [sp+54h] [bp-14h]@10
  int uiTop; // [sp+58h] [bp-10h]@10
  int v42; // [sp+64h] [bp-4h]@1
  int iYOff; // [sp+70h] [bp+8h]@16

  v2 = this;
  spNode.m_pObject = 0;
  v42 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  pkTexture = v3;
  if ( !v3 )
  {
    v42 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( spNode.m_pObject )
        spNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spNode.m_pObject, 1u);
    }
    return 0;
  }
  v5 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = Folder::Merge(&Folder::m_acMenu, "Game\\BelongDiceMsg.nif");
  PgUtil::LoadNodeNifFile(v6, &spNode, v5);
  if ( !spNode.m_pObject )
    return 0;
  v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, v3);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, uiLeft, uiTop, v7, 0, pkFrameWork, "RollingDiceMsgWin", 0) )
  {
    v9 = uiLeft;
    iYOff = uiTop;
    v10 = MenuTexMgr::GetTexture(0x13u);
    if ( v10 )
      v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
    else
      v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft, uiTop, v11, (PgWin *)&v2->vfptr, 0, 0);
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "InvItemSlot001",
      &uiLeft,
      &uiTop,
      &uiWidth,
      &uiHeight);
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "InvItemSlot001", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft, uiTop, v12, (PgWin *)&v2->vfptr, 0, 0);
    v13 = ItemIcon::CreateWin(uiLeft, uiTop, (PgWin *)&v2->vfptr);
    v2->m_pkItemIconWin = v13;
    v13->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextBox", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft, uiTop, v14, (PgWin *)&v2->vfptr, 0, 0);
    v15 = v14->m_akHitTester.m_pBase;
    v16 = v15->m_pObject->m_uiHeight;
    v37 = v15->m_pObject->m_uiWidth;
    v17 = Font::Get(0);
    v18 = PgWinText::CreateWin(uiLeft - v9, uiTop - iYOff, v37, v16, v17, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkItemName = v18;
    v18->vfptr[122].__vecDelDtor((NiRefObject *)v18, 5u);
    v2->m_pkItemName->m_spTextGeom.m_pObject->m_bTextCmdOn = 1;
    ((void (__stdcall *)(void *))v2->m_pkItemName->vfptr[118].__vecDelDtor)(&unk_99FC12);
    v19 = v2->m_pkItemName->vfptr;
    v20 = TextData2::Get(0x1A341301u);
    v19[118].__vecDelDtor((NiRefObject *)v2->m_pkItemName, (unsigned int)v20);
    ((void (__stdcall *)(_DWORD))v2->m_pkItemName->vfptr[60].__vecDelDtor)(0);
    v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor02", &uiLeft, &uiTop, pkTexture);
    PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick02");
    PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver02");
    PgWinBut::CreateWin(uiLeft - v9, uiTop - iYOff, v21, (PgWin *)&v2->vfptr, 1u, 0, 0);
    v22 = v21->m_akHitTester.m_pBase;
    v23 = v22->m_pObject->m_uiHeight;
    v37 = v22->m_pObject->m_uiWidth;
    v24 = Font::Get(MAIN_MENU);
    v25 = (unsigned int *)PgWinText::CreateWin(uiLeft - v9, uiTop - iYOff + 1, v37, v23, v24, (PgWin *)&v2->vfptr, 0, 0);
    (*(void (__thiscall **)(unsigned int *, signed int))(*v25 + 488))(v25, 5);
    v37 = *v25;
    v26 = TextData2::Get(0x32518C68u);
    (*(void (__thiscall **)(unsigned int *, NiUnsharedGeometryGroup *))(v37 + 472))(v25, v26);
    (*(void (__thiscall **)(unsigned int *, _DWORD))(*v25 + 240))(v25, 0);
    v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor03", &uiLeft, &uiTop, pkTexture);
    PgSprData::Add(v27, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick03");
    PgSprData::Add(v27, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver03");
    PgWinBut::CreateWin(uiLeft - v9, uiTop - iYOff, v27, (PgWin *)&v2->vfptr, 2u, 0, 0);
    v28 = v27->m_akHitTester.m_pBase->m_pObject;
    v29 = v28->m_uiHeight;
    v37 = v28->m_uiWidth;
    v30 = Font::Get(MAIN_MENU);
    v31 = PgWinText::CreateWin(uiLeft - v9, uiTop - iYOff + 1, v37, v29, v30, (PgWin *)&v2->vfptr, 0, 0);
    v31->vfptr[122].__vecDelDtor((NiRefObject *)v31, 5u);
    v32 = v31->vfptr;
    v33 = TextData2::Get(0x27513972u);
    v32[118].__vecDelDtor((NiRefObject *)v31, (unsigned int)v33);
    v31->vfptr[60].__vecDelDtor((NiRefObject *)v31, 0);
    ((void (__thiscall *)(RollingDiceMsgWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.60000002);
    v42 = -1;
    if ( spNode.m_pObject )
    {
      v34 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v34 )
          v34->vfptr->__vecDelDtor((NiRefObject *)v34, 1u);
      }
    }
    result = 1;
  }
  else
  {
    v8 = spNode.m_pObject;
    v42 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v8 )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00581AC0) --------------------------------------------------------
void __thiscall RollingDiceWin::SetDiceInfo(RollingDiceWin *this, unsigned __int16 kItemHandle, int iTimeSec)
{
  RollingDiceWin *v3; // esi@1
  PgWinBar *v4; // ecx@1
  DropItem *v5; // eax@4
  DropItem *v6; // edi@4
  ItemIcon *v7; // ecx@5
  NiRefObjectVtbl *v8; // ebx@5
  char *v9; // eax@5

  v3 = this;
  v4 = this->m_pkCastingProgress;
  v3->m_fCastingTime = (double)iTimeSec;
  v3->m_kItemHandle = kItemHandle;
  v3->m_fTimeWhenCasted = Timer::ms_fCurTime;
  if ( 0.0 != v4->m_fMaxValue || 0.0 != v4->m_fCurValue )
  {
    v4->m_fMaxValue = 0.0;
    v4->m_fCurValue = 0.0;
    PgWinBar::OnChangeValue(v4);
  }
  ((void (__stdcall *)(_DWORD))v3->m_pkCastingBarStart->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v3->m_pkCastingBarEnd->vfptr[64].__vecDelDtor)(0);
  v5 = DropItemMgr::GetByHandle(&g_kDropItemMgr, v3->m_kItemHandle);
  v6 = v5;
  if ( v5 )
  {
    v7 = v3->m_pkItemIconWin;
    v3->m_kItemID = v5->m_kItemID;
    ItemIcon::SetItemAsID(v7, (int)v5, v5->m_kItemID);
    v8 = v3->m_pkItemName->vfptr;
    v9 = DropItem::GetItemName(v6);
    v8[118].__vecDelDtor((NiRefObject *)v3->m_pkItemName, (unsigned int)v9);
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00581BB0) --------------------------------------------------------
void __thiscall RollingDiceWin::UpdateMeWin(RollingDiceWin *this, float fCurTime)
{
  RollingDiceWin *v2; // esi@1
  double v3; // st5@2
  double v4; // st7@7
  PgWinBar *v5; // ecx@12
  Item *v6; // eax@17
  ItemInfoWin *v7; // ecx@17
  float fValuea; // [sp+14h] [bp+8h]@2
  float fValue; // [sp+14h] [bp+8h]@5
  float fValueb; // [sp+14h] [bp+8h]@9

  v2 = this;
  if ( this->m_fCastingTime <= 0.0 )
  {
    v5 = this->m_pkCastingProgress;
    if ( 0.0 == v5->m_fMaxValue && 0.0 == v5->m_fCurValue )
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
    }
    else
    {
      v5->m_fMaxValue = 0.0;
      v5->m_fCurValue = 0.0;
      PgWinBar::OnChangeValue(v5);
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
    }
  }
  else
  {
    fValuea = (fCurTime - this->m_fTimeWhenCasted) / this->m_fCastingTime;
    v3 = fValuea;
    if ( fValuea > 1.0 )
    {
      if ( this->m_bCloseWhenFinished )
      {
        PgWinBar::SetValue(this->m_pkCastingProgress, 0.0, 0.0);
        v2->m_fCastingTime = 0.0;
        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
        return;
      }
    }
    else if ( 1.0 == v3 )
    {
      PgWinBar::SetValue(this->m_pkCastingProgress, 0.0, 0.0);
    }
    else
    {
      fValue = this->m_fMax - v3;
      if ( fValue < 0.0 )
        fValue = 0.0;
      v4 = 0.0;
      if ( v3 < 1.0 )
        v4 = fValue;
      fValueb = v4;
      PgWinBar::SetValue(this->m_pkCastingProgress, 0.94999999, fValueb);
    }
  }
  if ( (unsigned __int8)((int (__stdcall *)(unsigned int, int))v2->m_pkItemIconWin->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY) )
  {
    v6 = Item::Create(v2->m_kItemID);
    v7 = (ItemInfoWin *)v2->m_pkItemIconWin->m_pkToolTipWin;
    if ( v7 )
    {
      if ( v6 )
        ItemInfoWin::SetItemInfo(v7, v6);
    }
  }
}

//----- (00581D50) --------------------------------------------------------
RollingDiceWin *__cdecl RollingDiceWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  RollingDiceWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x180u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    RollingDiceWin::RollingDiceWin((RollingDiceWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (RollingDiceWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00581E80) --------------------------------------------------------
RollingDiceMsgWin *__cdecl RollingDiceMsgWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  RollingDiceMsgWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x164u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&RollingDiceMsgWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&RollingDiceMsgWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = -1;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (RollingDiceMsgWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 99FFD8: using guessed type void (__thiscall *RollingDiceMsgWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99FFF4: using guessed type int (__thiscall *RollingDiceMsgWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00581FD0) --------------------------------------------------------
RollingDiceWin *__thiscall RollingDiceWin::`vector deleting destructor'(RollingDiceWin *this, unsigned int a2)
{
  RollingDiceWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&RollingDiceWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&RollingDiceWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 99FD98: using guessed type void (__thiscall *RollingDiceWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99FDB4: using guessed type int (__thiscall *RollingDiceWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00582010) --------------------------------------------------------
RollingDiceMsgWin *__thiscall RollingDiceMsgWin::`vector deleting destructor'(RollingDiceMsgWin *this, unsigned int a2)
{
  RollingDiceMsgWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&RollingDiceMsgWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&RollingDiceMsgWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 99FFD8: using guessed type void (__thiscall *RollingDiceMsgWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 99FFF4: using guessed type int (__thiscall *RollingDiceMsgWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00582050) --------------------------------------------------------
void __thiscall ScreenWin::ScreenWin(ScreenWin *this)
{
  ScreenWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ScreenWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ScreenWin::`vftable'{for `IDirectMessenger'};
}
// 9A0224: using guessed type void (__thiscall *ScreenWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A0244: using guessed type int (__thiscall *ScreenWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00582070) --------------------------------------------------------
void __thiscall ScreenWin::~ScreenWin(ScreenWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ScreenWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ScreenWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9A0224: using guessed type void (__thiscall *ScreenWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A0244: using guessed type int (__thiscall *ScreenWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00582090) --------------------------------------------------------
char __thiscall ScreenWin::Create(ScreenWin *this, PgFrameWork *pkFrameWork)
{
  ScreenWin *v2; // esi@1
  char result; // al@1

  v2 = this;
  result = PgWinFrame::Create((PgWinFrame *)&this->vfptr, 0, 0, 0, pkFrameWork, "ScreenWin", 0);
  if ( result )
  {
    v2->vfptr[38].__vecDelDtor((NiRefObject *)v2, PgWin::ms_uiScreenWidth);
    v2->vfptr[39].__vecDelDtor((NiRefObject *)v2, PgWin::ms_uiScreenHeight);
    result = 1;
  }
  return result;
}

//----- (005820F0) --------------------------------------------------------
void __thiscall ScreenWin::UpdateMeWin(ScreenWin *this, float fCurTime)
{
  ScreenWin *v2; // esi@1

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->vfptr[38].__vecDelDtor)(PgWin::ms_uiScreenWidth);
  v2->vfptr[39].__vecDelDtor((NiRefObject *)v2, PgWin::ms_uiScreenHeight);
}

//----- (00582120) --------------------------------------------------------
void __thiscall ScreenWin::ProcessMeInput(ScreenWin *this, bool *bHit)
{
  ScreenWin *v2; // esi@1

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[78].__vecDelDtor)() )
  {
    if ( dword_B64790 )
      ++dword_B64790;
    PgWinFrame::ProcessMeInput((PgWinFrame *)&v2->vfptr, bHit);
    byte_B6478C = 0;
    if ( dword_B64790 )
      --dword_B64790;
  }
}
// B6478C: using guessed type char byte_B6478C;
// B64790: using guessed type int dword_B64790;

//----- (00582170) --------------------------------------------------------
bool __stdcall ScreenWin::EatDropReference(PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  return *pkDrop != 0;
}

//----- (00582180) --------------------------------------------------------
ScreenWin *__cdecl ScreenWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  ScreenWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x158u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&ScreenWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&ScreenWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (ScreenWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9A0224: using guessed type void (__thiscall *ScreenWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A0244: using guessed type int (__thiscall *ScreenWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005822C0) --------------------------------------------------------
ScreenWin *__thiscall ScreenWin::`scalar deleting destructor'(ScreenWin *this, unsigned int a2)
{
  ScreenWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ScreenWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ScreenWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A0224: using guessed type void (__thiscall *ScreenWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A0244: using guessed type int (__thiscall *ScreenWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00582300) --------------------------------------------------------
void __thiscall ServerMenuWin::SetPriority(ServerMenuWin *this, char byPriority)
{
  this->m_byPriority = byPriority;
}

//----- (00582310) --------------------------------------------------------
char __thiscall ServerMenuWin::GetPriority(ServerMenuWin *this)
{
  return this->m_byPriority;
}

//----- (00582320) --------------------------------------------------------
void __thiscall ServerMenuWin::OnBut0(ServerMenuWin *this)
{
  ServerMenuWin *v1; // esi@1

  v1 = this;
  GameFrameWork::NcMenuServerMenuAck((GameFrameWork *)this->m_pkFrameWork, this->m_aucReply[0]);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}

//----- (00582350) --------------------------------------------------------
void __thiscall ServerMenuWin::OnBut1(ServerMenuWin *this)
{
  ServerMenuWin *v1; // esi@1

  v1 = this;
  GameFrameWork::NcMenuServerMenuAck((GameFrameWork *)this->m_pkFrameWork, this->m_aucReply[1]);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}

//----- (00582380) --------------------------------------------------------
void __thiscall ServerMenuWin::OnBut2(ServerMenuWin *this)
{
  ServerMenuWin *v1; // esi@1

  v1 = this;
  GameFrameWork::NcMenuServerMenuAck((GameFrameWork *)this->m_pkFrameWork, this->m_aucReply[2]);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}

//----- (005823B0) --------------------------------------------------------
void __thiscall ServerMenuWin::OnBut3(ServerMenuWin *this)
{
  ServerMenuWin *v1; // esi@1

  v1 = this;
  GameFrameWork::NcMenuServerMenuAck((GameFrameWork *)this->m_pkFrameWork, this->m_aucReply[3]);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}

//----- (005823E0) --------------------------------------------------------
void __thiscall ServerMenuWin::OnBut4(ServerMenuWin *this)
{
  ServerMenuWin *v1; // esi@1

  v1 = this;
  GameFrameWork::NcMenuServerMenuAck((GameFrameWork *)this->m_pkFrameWork, this->m_aucReply[4]);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}

//----- (00582410) --------------------------------------------------------
void __thiscall ServerMenuWin::SetMsg(ServerMenuWin *this, char *pcText)
{
  char *v2; // ebx@1
  char *v3; // esi@1
  signed int v4; // edi@1
  char *v5; // edi@5
  int v6; // eax@7
  int v7; // eax@7
  int v8; // esi@7
  signed int v9; // eax@7
  char *v10; // eax@11
  char *v11; // esi@16
  signed int v12; // edi@16
  HDC__ *hDC; // [sp+Ch] [bp-110h]@5
  int iLineNum; // [sp+10h] [bp-10Ch]@5
  char *v15; // [sp+14h] [bp-108h]@1
  char acStr[256]; // [sp+18h] [bp-104h]@7

  v2 = pcText;
  v15 = (char *)this->m_apkTextWin;
  v3 = (char *)this->m_apkTextWin;
  v4 = 5;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 472))(&unk_9A048E);
    v3 += 4;
    --v4;
  }
  while ( v4 );
  if ( pcText && *pcText )
  {
    v5 = v15;
    hDC = *(HDC__ **)((*(int (**)(void))(**(_DWORD **)v15 + 456))() + 192);
    iLineNum = 0;
    do
    {
      if ( !*v2 )
        break;
      v6 = (*(int (**)(void))(**(_DWORD **)v5 + 144))();
      v7 = PgUtil::StringPixelCopy(acStr, v2, hDC, v6);
      v8 = v7;
      acStr[v7] = 0;
      v9 = 0;
      if ( acStr[0] == 32 )
      {
        do
        {
          if ( !acStr[v9] )
            break;
          if ( v9 >= 255 )
            break;
          ++v9;
        }
        while ( acStr[v9] == 32 );
      }
      v10 = &acStr[v9];
      if ( v10 )
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v5 + 472))(v10);
      v2 += v8;
      v5 += 4;
      ++iLineNum;
    }
    while ( iLineNum < 5 );
    if ( iLineNum == 1 )
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v15 + 488))(1);
    }
    else
    {
      v11 = v15;
      v12 = 5;
      do
      {
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v11 + 488))(0);
        v11 += 4;
        --v12;
      }
      while ( v12 );
    }
  }
}

//----- (00582590) --------------------------------------------------------
void __thiscall ServerMenuWin::~ServerMenuWin(ServerMenuWin *this)
{
  ServerMenuWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ServerMenuWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ServerMenuWin::`vftable'{for `IDirectMessenger'};
  `eh vector destructor iterator'(
    this->m_apkTextWin,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9A0558: using guessed type void (__thiscall *ServerMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A0574: using guessed type int (__thiscall *ServerMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00582610) --------------------------------------------------------
char __thiscall ServerMenuWin::Create(ServerMenuWin *this, PgFrameWork *pkFrameWork)
{
  ServerMenuWin *v2; // esi@1
  NiSourceTexture *v3; // ebx@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // edi@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  NiSourceTexture *v10; // eax@15
  PgSprData *v11; // eax@16
  PgWinSpr *v12; // eax@18
  PgFont *v13; // eax@20
  unsigned int v14; // edi@22
  PgFont *v15; // ST40_4@22
  unsigned int v16; // ST3C_4@22
  int v17; // eax@22
  PgWinText *v18; // eax@22
  IDirectMessengerVtbl *v19; // edi@22
  PgSprData *v20; // edi@31
  PgWinBut *v21; // eax@31
  PgWin *v22; // ST44_4@31
  PgWinBut *v23; // edi@31
  PgFont *v24; // ST40_4@31
  unsigned int v25; // ST3C_4@31
  unsigned int v26; // eax@31
  PgWinText *v27; // eax@31
  NiRefObjectVtbl *v28; // edi@31
  NiUnsharedGeometryGroup *v29; // eax@31
  PgSprData *v30; // edi@31
  PgWinBut *v31; // eax@31
  PgWin *v32; // ST44_4@31
  PgWinBut *v33; // edi@31
  PgFont *v34; // ST40_4@31
  unsigned int v35; // ST3C_4@31
  unsigned int v36; // eax@31
  PgWinText *v37; // eax@31
  NiRefObjectVtbl *v38; // edi@31
  NiUnsharedGeometryGroup *v39; // eax@31
  PgSprData *v40; // edi@31
  PgWinBut *v41; // eax@31
  PgWin *v42; // ST44_4@31
  PgWinBut *v43; // edi@31
  PgFont *v44; // ST40_4@31
  unsigned int v45; // ST3C_4@31
  unsigned int v46; // eax@31
  PgWinText *v47; // eax@31
  NiRefObjectVtbl *v48; // edi@31
  NiUnsharedGeometryGroup *v49; // eax@31
  PgSprData *v50; // edi@31
  PgWinBut *v51; // eax@31
  PgWin *v52; // ST44_4@31
  PgWinBut *v53; // edi@31
  PgFont *v54; // ST40_4@31
  unsigned int v55; // ST3C_4@31
  unsigned int v56; // eax@31
  PgWinText *v57; // eax@31
  NiRefObjectVtbl *v58; // edi@31
  NiUnsharedGeometryGroup *v59; // eax@31
  PgSprData *v60; // edi@31
  PgWinBut *v61; // eax@31
  PgWin *v62; // ST44_4@31
  PgWinBut *v63; // edi@31
  PgFont *v64; // ST40_4@31
  unsigned int v65; // ST3C_4@31
  unsigned int v66; // eax@31
  PgWinText *v67; // eax@31
  NiRefObjectVtbl *v68; // edi@31
  NiUnsharedGeometryGroup *v69; // eax@31
  NiNode *v70; // eax@31
  NiNode *v71; // esi@32
  PgFont *pkFont; // [sp+60h] [bp-24h]@20
  PgWinText *v73; // [sp+64h] [bp-20h]@22
  int i; // [sp+68h] [bp-1Ch]@20
  int uiLeft; // [sp+6Ch] [bp-18h]@11
  int uiTop; // [sp+70h] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+74h] [bp-10h]@1
  int v78; // [sp+80h] [bp-4h]@1
  PgFrameWork *pkFrameWorka; // [sp+8Ch] [bp+8h]@20

  v2 = this;
  spNode.m_pObject = 0;
  v78 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v78 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "Game\\MessageWin.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "ServerMenuWin", 0) )
  {
    v4 = spNode.m_pObject;
    v78 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
    goto LABEL_5;
  }
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  v12 = PgWinSpr::CreateWin(uiLeft, uiTop, v11, (PgWin *)&v2->vfptr, 0, 0);
  if ( v12 )
    v12->vfptr[60].__vecDelDtor((NiRefObject *)v12, 0);
  v13 = Font::Get(0);
  pkFont = v13;
  i = 0;
  pkFrameWorka = (PgFrameWork *)v2->m_apkTextWin;
  while ( 1 )
  {
    v14 = v13->m_uiDefHeight;
    v15 = v13;
    v16 = v13->m_uiDefHeight;
    v17 = ((int (__thiscall *)(ServerMenuWin *))v2->vfptr[36].__vecDelDtor)(v2);
    v18 = PgWinText::CreateWin(8, i * (v14 + 1) + 8, v17 - 16, v16, v15, (PgWin *)&v2->vfptr, 0, 0);
    v19 = pkFrameWorka->vfptr;
    v73 = v18;
    if ( (PgWinText *)pkFrameWorka->vfptr != v18 )
    {
      if ( v19 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v19->SendDirectMessage) && v19 )
          (*(void (__thiscall **)(IDirectMessengerVtbl *, signed int))v19->SetMsgHooker)(v19, 1);
        v18 = v73;
      }
      pkFrameWorka->vfptr = (IDirectMessengerVtbl *)v18;
      if ( v18 )
        InterlockedIncrement((volatile LONG *)&v18->m_uiRefCount);
    }
    (*((void (__stdcall **)(_DWORD))pkFrameWorka->vfptr->SetMsgHooker + 60))(0);
    pkFrameWorka = (PgFrameWork *)((char *)pkFrameWorka + 4);
    if ( ++i >= 5 )
      break;
    v13 = pkFont;
  }
  v20 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor01", &uiLeft, &uiTop, v3);
  PgSprData::Add(v20, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick01");
  PgSprData::Add(v20, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver01");
  v21 = PgWinBut::CreateWin(uiLeft, uiTop, v20, (PgWin *)&v2->vfptr, 0, 0, 0);
  v22 = (PgWin *)v21;
  v2->m_apkButWin[0] = v21;
  v23 = v21;
  v24 = Font::Get(0);
  v25 = ((int (__thiscall *)(PgWinBut *))v23->vfptr[37].__vecDelDtor)(v23);
  v26 = ((int (__thiscall *)(PgWinBut *))v23->vfptr[36].__vecDelDtor)(v23);
  v27 = PgWinText::CreateWin(0, 0, v26, v25, v24, v22, 0, 0);
  v2->m_apkButTextWin[0] = v27;
  v27->vfptr[122].__vecDelDtor((NiRefObject *)v27, 5u);
  v28 = v2->m_apkButTextWin[0]->vfptr;
  v29 = TextData::Get(0x4F5F499Fu);
  v28[118].__vecDelDtor((NiRefObject *)v2->m_apkButTextWin[0], (unsigned int)v29);
  ((void (__stdcall *)(_DWORD))v2->m_apkButTextWin[0]->vfptr[60].__vecDelDtor)(0);
  v30 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor02", &uiLeft, &uiTop, v3);
  PgSprData::Add(v30, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick02");
  PgSprData::Add(v30, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver02");
  v31 = PgWinBut::CreateWin(uiLeft, uiTop, v30, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v32 = (PgWin *)v31;
  v2->m_apkButWin[1] = v31;
  v33 = v31;
  v34 = Font::Get(0);
  v35 = ((int (__thiscall *)(PgWinBut *))v33->vfptr[37].__vecDelDtor)(v33);
  v36 = ((int (__thiscall *)(PgWinBut *))v33->vfptr[36].__vecDelDtor)(v33);
  v37 = PgWinText::CreateWin(0, 0, v36, v35, v34, v32, 0, 0);
  v2->m_apkButTextWin[1] = v37;
  v37->vfptr[122].__vecDelDtor((NiRefObject *)v37, 5u);
  v38 = v2->m_apkButTextWin[1]->vfptr;
  v39 = TextData::Get(0x4F5F499Fu);
  v38[118].__vecDelDtor((NiRefObject *)v2->m_apkButTextWin[1], (unsigned int)v39);
  ((void (__stdcall *)(_DWORD))v2->m_apkButTextWin[1]->vfptr[60].__vecDelDtor)(0);
  v40 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor03", &uiLeft, &uiTop, v3);
  PgSprData::Add(v40, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick03");
  PgSprData::Add(v40, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver03");
  v41 = PgWinBut::CreateWin(uiLeft, uiTop, v40, (PgWin *)&v2->vfptr, 2u, 0, 0);
  v42 = (PgWin *)v41;
  v2->m_apkButWin[2] = v41;
  v43 = v41;
  v44 = Font::Get(0);
  v45 = ((int (__thiscall *)(PgWinBut *))v43->vfptr[37].__vecDelDtor)(v43);
  v46 = ((int (__thiscall *)(PgWinBut *))v43->vfptr[36].__vecDelDtor)(v43);
  v47 = PgWinText::CreateWin(0, 0, v46, v45, v44, v42, 0, 0);
  v2->m_apkButTextWin[2] = v47;
  v47->vfptr[122].__vecDelDtor((NiRefObject *)v47, 5u);
  v48 = v2->m_apkButTextWin[2]->vfptr;
  v49 = TextData::Get(0x88A297E1);
  v48[118].__vecDelDtor((NiRefObject *)v2->m_apkButTextWin[2], (unsigned int)v49);
  ((void (__stdcall *)(_DWORD))v2->m_apkButTextWin[2]->vfptr[60].__vecDelDtor)(0);
  v50 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor04", &uiLeft, &uiTop, v3);
  PgSprData::Add(v50, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick04");
  PgSprData::Add(v50, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver04");
  v51 = PgWinBut::CreateWin(uiLeft, uiTop, v50, (PgWin *)&v2->vfptr, 3u, 0, 0);
  v52 = (PgWin *)v51;
  v2->m_apkButWin[3] = v51;
  v53 = v51;
  v54 = Font::Get(0);
  v55 = ((int (__thiscall *)(PgWinBut *))v53->vfptr[37].__vecDelDtor)(v53);
  v56 = ((int (__thiscall *)(PgWinBut *))v53->vfptr[36].__vecDelDtor)(v53);
  v57 = PgWinText::CreateWin(0, 0, v56, v55, v54, v52, 0, 0);
  v2->m_apkButTextWin[3] = v57;
  v57->vfptr[122].__vecDelDtor((NiRefObject *)v57, 5u);
  v58 = v2->m_apkButTextWin[3]->vfptr;
  v59 = TextData::Get(0x88A297E1);
  v58[118].__vecDelDtor((NiRefObject *)v2->m_apkButTextWin[3], (unsigned int)v59);
  ((void (__stdcall *)(_DWORD))v2->m_apkButTextWin[3]->vfptr[60].__vecDelDtor)(0);
  v60 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor05", &uiLeft, &uiTop, v3);
  PgSprData::Add(v60, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick05");
  PgSprData::Add(v60, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver05");
  v61 = PgWinBut::CreateWin(uiLeft, uiTop, v60, (PgWin *)&v2->vfptr, 4u, 0, 0);
  v62 = (PgWin *)v61;
  v2->m_apkButWin[4] = v61;
  v63 = v61;
  v64 = Font::Get(0);
  v65 = ((int (__thiscall *)(PgWinBut *))v63->vfptr[37].__vecDelDtor)(v63);
  v66 = ((int (__thiscall *)(PgWinBut *))v63->vfptr[36].__vecDelDtor)(v63);
  v67 = PgWinText::CreateWin(0, 0, v66, v65, v64, v62, 0, 0);
  v2->m_apkButTextWin[4] = v67;
  v67->vfptr[122].__vecDelDtor((NiRefObject *)v67, 5u);
  v68 = v2->m_apkButTextWin[4]->vfptr;
  v69 = TextData::Get(0x88A297E1);
  v68[118].__vecDelDtor((NiRefObject *)v2->m_apkButTextWin[4], (unsigned int)v69);
  ((void (__stdcall *)(_DWORD))v2->m_apkButTextWin[4]->vfptr[60].__vecDelDtor)(0);
  ((void (__thiscall *)(ServerMenuWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.2);
  v70 = spNode.m_pObject;
  v2->m_hMenuHandle = -1;
  v78 = -1;
  if ( v70 )
  {
    v71 = v70;
    if ( !InterlockedDecrement((volatile LONG *)&v70->m_uiRefCount) )
    {
      if ( v71 )
        v71->vfptr->__vecDelDtor((NiRefObject *)v71, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00582D20) --------------------------------------------------------
char __thiscall ServerMenuWin::SetServerMenu(ServerMenuWin *this, PROTO_NC_MENU_SERVERMENU_REQ *pkProto)
{
  PROTO_NC_MENU_SERVERMENU_REQ *v2; // edi@1
  ServerMenuWin *v3; // esi@1
  char result; // al@2
  char *v5; // ebx@5
  char v6; // al@7
  PgWinText *v7; // ecx@8
  PgWinText *v8; // ecx@8
  PgWinText *v9; // ecx@10
  float v10; // ST10_4@12
  float v11; // ST14_4@12
  PROTO_NC_MENU_SERVERMENU_REQ *pkProtoa; // [sp+1Ch] [bp+8h]@5

  v2 = pkProto;
  v3 = this;
  if ( pkProto )
  {
    if ( pkProto->menunum > 3u )
      pkProto->menunum = 3;
    v5 = (char *)this->m_apkButWin;
    pkProtoa = (PROTO_NC_MENU_SERVERMENU_REQ *)5;
    do
    {
      *(_WORD *)(*(_DWORD *)v5 + 28) |= 1u;
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v5 + 240))(0);
      v5 += 4;
      pkProtoa = (PROTO_NC_MENU_SERVERMENU_REQ *)((char *)pkProtoa - 1);
    }
    while ( pkProtoa );
    v6 = v2->menunum;
    if ( v6 == 3 )
    {
      v3->m_apkButWin[0]->m_uFlags &= 0xFFFEu;
      ((void (__stdcall *)(signed int))v3->m_apkButWin[0]->vfptr[60].__vecDelDtor)(1);
      v3->m_apkButWin[3]->m_uFlags &= 0xFFFEu;
      ((void (__stdcall *)(signed int))v3->m_apkButWin[3]->vfptr[60].__vecDelDtor)(1);
      v3->m_apkButWin[4]->m_uFlags &= 0xFFFEu;
      ((void (__stdcall *)(signed int))v3->m_apkButWin[4]->vfptr[60].__vecDelDtor)(1);
      ((void (__stdcall *)(char *))v3->m_apkButTextWin[4]->vfptr[118].__vecDelDtor)(&v2[1].title[1]);
      v7 = v3->m_apkButTextWin[0];
      v3->m_aucReply[4] = v2[1].title[0];
      ((void (__stdcall *)(char *))v7->vfptr[118].__vecDelDtor)(&v2[1].title[34]);
      v8 = v3->m_apkButTextWin[3];
      v3->m_aucReply[0] = v2[1].title[33];
      ((void (__stdcall *)(char *))v8->vfptr[118].__vecDelDtor)(&v2[1].title[67]);
      v3->m_aucReply[3] = v2[1].title[66];
    }
    else if ( v6 == 2 )
    {
      v3->m_apkButWin[1]->m_uFlags &= 0xFFFEu;
      ((void (__stdcall *)(signed int))v3->m_apkButWin[1]->vfptr[60].__vecDelDtor)(1);
      v3->m_apkButWin[2]->m_uFlags &= 0xFFFEu;
      ((void (__stdcall *)(signed int))v3->m_apkButWin[2]->vfptr[60].__vecDelDtor)(1);
      ((void (__stdcall *)(char *))v3->m_apkButTextWin[1]->vfptr[118].__vecDelDtor)(&v2[1].title[1]);
      v9 = v3->m_apkButTextWin[2];
      v3->m_aucReply[1] = v2[1].title[0];
      ((void (__stdcall *)(char *))v9->vfptr[118].__vecDelDtor)(&v2[1].title[34]);
      v3->m_aucReply[2] = v2[1].title[33];
    }
    else
    {
      v3->m_apkButWin[0]->m_uFlags &= 0xFFFEu;
      ((void (__stdcall *)(signed int))v3->m_apkButWin[0]->vfptr[60].__vecDelDtor)(1);
      ((void (__stdcall *)(char *))v3->m_apkButTextWin[0]->vfptr[118].__vecDelDtor)(&v2[1].title[1]);
      v3->m_aucReply[0] = v2[1].title[0];
    }
    v3->m_hMenuHandle = v2->npcHandle;
    v11 = (double)v2->npcPosition.y;
    v10 = (double)v2->npcPosition.x;
    v3->m_kMenuPos.x = v10;
    v3->m_kMenuPos.y = v11;
    v3->m_kMenuPos.z = 0.0;
    v3->m_limitRange = v2->limitRange;
    ServerMenuWin::SetMsg(v3, v2->title);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00582FB0) --------------------------------------------------------
void __thiscall ServerMenuWin::OnCommand(ServerMenuWin *this, unsigned int wParam, int lParam)
{
  ServerMenuWin *v3; // esi@1
  char v4; // cl@3

  v3 = this;
  switch ( wParam )
  {
    case 0u:
      GameFrameWork::NcMenuServerMenuAck((GameFrameWork *)this->m_pkFrameWork, this->m_aucReply[0]);
      goto LABEL_8;
    case 1u:
      v4 = this->m_aucReply[1];
      goto LABEL_7;
    case 2u:
      GameFrameWork::NcMenuServerMenuAck((GameFrameWork *)this->m_pkFrameWork, this->m_aucReply[2]);
      goto LABEL_8;
    case 3u:
      GameFrameWork::NcMenuServerMenuAck((GameFrameWork *)this->m_pkFrameWork, this->m_aucReply[3]);
      goto LABEL_8;
    case 4u:
      v4 = this->m_aucReply[4];
LABEL_7:
      GameFrameWork::NcMenuServerMenuAck((GameFrameWork *)v3->m_pkFrameWork, v4);
LABEL_8:
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
      break;
    default:
      return;
  }
}

//----- (00583030) --------------------------------------------------------
void __thiscall ServerMenuWin::UpdateMeWin(ServerMenuWin *this, float fCurTime)
{
  ServerMenuWin *v2; // esi@1
  double v3; // st7@3
  double v4; // st7@3
  double v5; // st5@3
  char v6; // dl@4
  Char *v7; // eax@5
  MapNavigator *v8; // edi@7
  NiPoint3 UserPos; // [sp+4h] [bp-1Ch]@3
  char v10[12]; // [sp+10h] [bp-10h]@3
  NiPointer<MapNavigator> result; // [sp+1Ch] [bp-4h]@3

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[65].__vecDelDtor)() && v2->m_hMenuHandle != -1 )
  {
    ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[6].SetAbStateProperty)(&UserPos);
    *(float *)v10 = UserPos.x - v2->m_kMenuPos.x;
    UserPos = *(NiPoint3 *)v10;
    v3 = UserPos.y - v2->m_kMenuPos.y;
    result.m_pObject = (MapNavigator *)v2->m_limitRange;
    *(float *)&v10[4] = v3;
    *(float *)&v10[8] = 0.0 - v2->m_kMenuPos.z;
    v4 = *(float *)&v10[4];
    v5 = *(float *)&v10[8];
    *(double *)&v10[4] = (double)(signed int)result.m_pObject;
    *(float *)&result.m_pObject = v4 * v4 + *(float *)v10 * *(float *)v10 + v5 * v5;
    *(float *)&result.m_pObject = sqrt(*(float *)&result.m_pObject);
    if ( *(float *)&result.m_pObject > *(double *)&v10[4] )
    {
      v6 = v2->m_aucReply[2];
      v2->m_hMenuHandle = -1;
      GameFrameWork::NcMenuServerMenuAck((GameFrameWork *)v2->m_pkFrameWork, v6);
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
    }
    v7 = CharMgr::GetChar(&g_kCharMgr, v2->m_hMenuHandle);
    if ( v7 )
    {
      if ( Char::IsLinkGate(v7) )
      {
        v8 = MapNavigator::GetMapNavigator(&result)->m_pObject;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&result);
        if ( v8 )
        {
          if ( v8->m_eDotState == 2 )
          {
            v2->m_hMenuHandle = -1;
            ServerMenuWin::CancelServerMenuWin(v2);
          }
        }
      }
    }
  }
}

//----- (00583180) --------------------------------------------------------
void __thiscall ServerMenuWin::ServerMenuWin(ServerMenuWin *this)
{
  ServerMenuWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ServerMenuWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ServerMenuWin::`vftable'{for `IDirectMessenger'};
  `eh vector constructor iterator'(
    v1->m_apkTextWin,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_byPriority = 0;
}
// 9A0558: using guessed type void (__thiscall *ServerMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A0574: using guessed type int (__thiscall *ServerMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00583200) --------------------------------------------------------
ServerMenuWin *__cdecl ServerMenuWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  ServerMenuWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1C4u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    LOBYTE(v6) = 1;
    v2->vfptr = (NiRefObjectVtbl *)&ServerMenuWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&ServerMenuWin::`vftable'{for `IDirectMessenger'};
    `eh vector constructor iterator'(
      &v2[1].m_kWorld.m_Rotate.m_pEntry[1][2],
      4u,
      5,
      (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
      (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
    LOBYTE(v2[1].m_kWorld.m_Translate.y) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (ServerMenuWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9A0558: using guessed type void (__thiscall *ServerMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A0574: using guessed type int (__thiscall *ServerMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00583360) --------------------------------------------------------
ServerMenuWin *__thiscall ServerMenuWin::`scalar deleting destructor'(ServerMenuWin *this, unsigned int a2)
{
  ServerMenuWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ServerMenuWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ServerMenuWin::`vftable'{for `IDirectMessenger'};
  `eh vector destructor iterator'(
    this->m_apkTextWin,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A0558: using guessed type void (__thiscall *ServerMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A0574: using guessed type int (__thiscall *ServerMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005833F0) --------------------------------------------------------
void __thiscall ServerTimeWin::ServerTimeWin(ServerTimeWin *this)
{
  ServerTimeWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_bEnableServerTime = 0;
  v1->m_pkServerTimeText = 0;
  v1->vfptr = (NiRefObjectVtbl *)&ServerTimeWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ServerTimeWin::`vftable'{for `IDirectMessenger'};
}
// 9A0830: using guessed type void (__thiscall *ServerTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A084C: using guessed type int (__thiscall *ServerTimeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00583420) --------------------------------------------------------
void __thiscall ServerTimeWin::~ServerTimeWin(ServerTimeWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ServerTimeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ServerTimeWin::`vftable'{for `IDirectMessenger'};
  this->m_bEnableServerTime = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9A0830: using guessed type void (__thiscall *ServerTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A084C: using guessed type int (__thiscall *ServerTimeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00583440) --------------------------------------------------------
void __thiscall ServerTimeWin::EnableServerTime(ServerTimeWin *this, bool b)
{
  this->m_bEnableServerTime = b;
}

//----- (00583450) --------------------------------------------------------
void __thiscall ServerTimeWin::UpdateMeWin(ServerTimeWin *this, float fCurTime)
{
  ServerTimeWin *v2; // ebx@1
  char *v3; // edx@4
  unsigned int v4; // eax@4
  char *v5; // edi@4
  char v6; // cl@5
  char v7; // cl@8
  _LARGE_INTEGER freq; // [sp+4h] [bp-224h]@3
  _LARGE_INTEGER ed; // [sp+Ch] [bp-21Ch]@3
  __int64 v10; // [sp+14h] [bp-214h]@3
  tm timeptr; // [sp+1Ch] [bp-20Ch]@10
  tm kCorrectionTime; // [sp+40h] [bp-1E8h]@3
  char acTooltip[128]; // [sp+64h] [bp-1C4h]@4
  char acTime[256]; // [sp+E4h] [bp-144h]@3
  char acGMT[64]; // [sp+1E4h] [bp-44h]@4

  v2 = this;
  if ( this->m_bEnableServerTime && this->m_pkServerTimeText )
  {
    QueryPerformanceCounter(&ed);
    QueryPerformanceFrequency(&freq);
    v10 = ed.QuadPart - Timer::ms_StartQPC.QuadPart;
    qmemcpy(&kCorrectionTime, &Timer::ms_dLastServerTime, sizeof(kCorrectionTime));
    kCorrectionTime.tm_sec += (signed int)((double)(ed.QuadPart - Timer::ms_StartQPC.QuadPart) / (double)freq.QuadPart);
    strftime(acTime, 0x100u, "%H:%M", &kCorrectionTime);
    if ( Timer::ms_cTimeZone >= 0 )
    {
      sprintf(acGMT, " {color,yellow,GMT(+%d)}", Timer::ms_cTimeZone);
      v3 = acGMT;
      v4 = strlen(acGMT) + 1;
      v5 = &acTooltip[127];
      do
        v7 = (v5++)[1];
      while ( v7 );
    }
    else
    {
      sprintf(acGMT, " {color,yellow,GMT(-%d)}", Timer::ms_cTimeZone);
      v3 = acGMT;
      v4 = strlen(acGMT) + 1;
      v5 = &acTooltip[127];
      do
        v6 = (v5++)[1];
      while ( v6 );
    }
    qmemcpy(v5, v3, v4);
    ((void (__stdcall *)(char *))v2->m_pkServerTimeText->vfptr[118].__vecDelDtor)(acTime);
    if ( (unsigned __int8)((int (__thiscall *)(ServerTimeWin *))v2->vfptr[83].__vecDelDtor)(v2) )
    {
      qmemcpy(&timeptr, &Timer::ms_dLastServerTime, sizeof(timeptr));
      strftime(acTooltip, 0x80u, "%Y-%m-%d (%a)", &timeptr);
      PgWin::SetToolTipWinText((PgWin *)&v2->vfptr, acTooltip);
    }
  }
}
// 583450: could not find valid save-restore pair for edi
// 583450: could not find valid save-restore pair for esi
// A8B98C: using guessed type char Timer::ms_cTimeZone;

//----- (00583620) --------------------------------------------------------
void __thiscall ServerTimeWin::OnCommand(ServerTimeWin *this, unsigned int wParam, int lParam)
{
  ServerTimeWin *v3; // esi@1
  void *(__thiscall *v4)(NiRefObject *, unsigned int); // eax@2

  v3 = this;
  if ( !wParam )
  {
    v4 = this->vfptr[130].__vecDelDtor;
    if ( this->m_pkCheckBox->m_bCheck )
    {
      ((void (__stdcall *)(_DWORD))v4)(1);
      v3->m_pkCheckBox->m_bCheck = 0;
    }
    else
    {
      ((void (__stdcall *)(_DWORD))v4)(0);
      v3->m_pkCheckBox->m_bCheck = 1;
    }
  }
}

//----- (00583670) --------------------------------------------------------
char __thiscall ServerTimeWin::Create(ServerTimeWin *this, PgFrameWork *pkFrameWork)
{
  ServerTimeWin *v2; // esi@1
  NiNode *v3; // esi@2
  NiTexturePalette *v5; // edi@7
  const char *v6; // eax@9
  PgSprData *v7; // edi@10
  NiPointer<PgSprData::PgHitTester> *v8; // edx@11
  unsigned int v9; // edi@11
  unsigned int v10; // ebx@11
  PgFont *v11; // eax@11
  PgWinText *v12; // eax@11
  PgSprData *v13; // edi@11
  NiNode *v14; // esi@12
  NiSourceTexture *pkTexture; // [sp+24h] [bp-1Ch]@1
  int uiLeft; // [sp+28h] [bp-18h]@10
  int uiTop; // [sp+2Ch] [bp-14h]@10
  NiPointer<NiNode> spNode; // [sp+30h] [bp-10h]@1
  int v19; // [sp+3Ch] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v19 = 0;
  pkTexture = MenuTexMgr::GetTexture(4u);
  if ( !pkTexture )
    goto LABEL_18;
  v5 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = Folder::Merge(&Folder::m_acMenu, "Game\\Timeserver.nif");
  PgUtil::LoadNodeNifFile(v6, &spNode, v5);
  if ( !spNode.m_pObject )
    return 0;
  v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v7, 0, pkFrameWork, "ServerTimeWin", 0) )
  {
LABEL_18:
    v3 = spNode.m_pObject;
    v19 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
    return 0;
  }
  v2->m_pkToolTipWin = g_pkToolTipWin;
  v8 = v7->m_akHitTester.m_pBase;
  v9 = v8->m_pObject->m_uiHeight;
  v10 = v8->m_pObject->m_uiWidth;
  v11 = Font::Get(BOLD);
  v12 = PgWinText::CreateWin(uiLeft - 10, uiTop + 2, v10, v9, v11, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkServerTimeText = v12;
  v12->vfptr[122].__vecDelDtor((NiRefObject *)v12, 5u);
  ((void (__stdcall *)(void *))v2->m_pkServerTimeText->vfptr[118].__vecDelDtor)(&unk_9A07BE);
  ((void (__stdcall *)(_DWORD))v2->m_pkServerTimeText->vfptr[60].__vecDelDtor)(0);
  v2->m_pkServerTimeText->m_spTextGeom.m_pObject->m_bTextCmdOn = 1;
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TimeLockNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "TimeLockLock");
  v2->m_pkCheckBox = ColumnBut::CreateWin(uiLeft, uiTop, v13, (PgWin *)&v2->vfptr, 0, 0);
  ((void (__thiscall *)(ServerTimeWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.0,
    0.64999998);
  v19 = -1;
  if ( spNode.m_pObject )
  {
    v14 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v14 )
        v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005838B0) --------------------------------------------------------
ServerTimeWin *__cdecl ServerTimeWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  ServerTimeWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x168u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&ServerTimeWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&ServerTimeWin::`vftable'{for `IDirectMessenger'};
    LOBYTE(v2[1].m_kLocal.m_Rotate.m_pEntry[1][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (ServerTimeWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9A0830: using guessed type void (__thiscall *ServerTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A084C: using guessed type int (__thiscall *ServerTimeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00583A00) --------------------------------------------------------
ServerTimeWin *__thiscall ServerTimeWin::`vector deleting destructor'(ServerTimeWin *this, unsigned int a2)
{
  ServerTimeWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ServerTimeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ServerTimeWin::`vftable'{for `IDirectMessenger'};
  this->m_bEnableServerTime = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A0830: using guessed type void (__thiscall *ServerTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A084C: using guessed type int (__thiscall *ServerTimeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00583A50) --------------------------------------------------------
void __thiscall ShopWin::ReGenPos(ShopWin *this)
{
  ShopWin *v1; // esi@1
  int v2; // eax@1
  unsigned int v3; // ecx@1

  v1 = this;
  v1->m_uiWebXPos = v1->m_uiPlaneWebXPos + ((int (*)(void))this->vfptr[41].__vecDelDtor)();
  v2 = ((int (__thiscall *)(_DWORD))v1->vfptr[42].__vecDelDtor)(v1);
  v3 = v1->m_uiPlaneWebHeight;
  v1->m_uiWebYPos = v1->m_uiPlaneWebYPos + v2;
  v1->m_uiWebWidth = v1->m_uiPlaneWebWidth;
  v1->m_uiWebHeight = v3;
}

//----- (00583AA0) --------------------------------------------------------
int __stdcall _std_view_proc(HWND__ *hDlg, unsigned int message, unsigned int wParam, int lParam)
{
  return DefWindowProcA(hDlg, message, wParam, lParam);
}

//----- (00583AB0) --------------------------------------------------------
void __thiscall ShopWin::OnPopShopWin(ShopWin *this)
{
  ShopWin *v1; // esi@1
  char *v2; // eax@1
  char v3; // cl@2
  int v4; // [sp+0h] [bp-61Ch]@0
  IBindCtx *pbc; // [sp+4h] [bp-618h]@1
  tagBIND_OPTS bop; // [sp+8h] [bp-614h]@1
  char acWebString[1024]; // [sp+18h] [bp-604h]@2
  wchar_t wszString[256]; // [sp+418h] [bp-204h]@3

  v1 = this;
  CreateBindCtx(0, &pbc);
  bop.cbStruct = 16;
  bop.grfFlags = 1;
  bop.grfMode = 0x8000000;
  bop.dwTickCountDeadline = 0;
  ((void (__stdcall *)(IBindCtx *))pbc->lpVtbl[2].QueryInterface)(pbc);
  v2 = (char *)v1->m_acWebUrl[1];
  do
  {
    v3 = *v2;
    v2[acWebString - (char *)v1->m_acWebUrl[1]] = *v2;
    ++v2;
  }
  while ( v3 );
  MultiByteToWideChar(0, 0, acWebString, strlen(acWebString) + 1, wszString, 256);
  HlinkSimpleNavigateToString(wszString, 0, 0, 0, pbc, 0, 2u, 0);
  ((void (__stdcall *)(IBindCtx *, int))pbc->lpVtbl->Release)(pbc, v4);
  SetFocus(g_hMainWnd);
}

//----- (00583BB0) --------------------------------------------------------
void __thiscall ShopWin::UpdateWebPos(ShopWin *this)
{
  ShopWin *v1; // esi@1
  tagRECT rect; // [sp+4h] [bp-14h]@3

  v1 = this;
  if ( IsWindow(this->m_hWebWindow) )
  {
    if ( v1->m_bOpen )
    {
      ShopWin::ReGenPos(v1);
      GetWindowRect(g_hMainWnd, &rect);
      MoveWindow(
        v1->m_hWebWindow,
        rect.left + v1->m_uiWebXPos,
        rect.top + v1->m_uiWebYPos,
        v1->m_uiWebWidth,
        v1->m_uiWebHeight,
        1);
    }
  }
}

//----- (00583C40) --------------------------------------------------------
void __thiscall ShopWin::ClearWebKeyParameter(ShopWin *this)
{
  *(_DWORD *)&this->m_acWebKeyParameter[0] = 0;
  *(_DWORD *)&this->m_acWebKeyParameter[4] = 0;
  *(_DWORD *)&this->m_acWebKeyParameter[8] = 0;
  *(_DWORD *)&this->m_acWebKeyParameter[12] = 0;
  *(_DWORD *)&this->m_acWebKeyParameter[16] = 0;
  *(_DWORD *)&this->m_acWebKeyParameter[20] = 0;
  *(_DWORD *)&this->m_acWebKeyParameter[24] = 0;
  *(_DWORD *)&this->m_acWebKeyParameter[28] = 0;
  this->m_acWebKeyParameter[32] = 0;
}

//----- (00583C80) --------------------------------------------------------
void __thiscall ShopWin::SetWebKeyParameter(ShopWin *this, char *pbParam, char byLoginType)
{
  qmemcpy(this->m_acWebKeyParameter, pbParam, 0x20u);
  this->m_acWebKeyParameter[32] = 0;
}

//----- (00583CB0) --------------------------------------------------------
void ShopWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "ItemMall");
}

//----- (00583CE0) --------------------------------------------------------
void __thiscall ShopWin::OnWinClose(ShopWin *this)
{
  ShopWin *v1; // esi@1
  HWND__ *v2; // ST0C_4@1
  GameFrameWork *v3; // ecx@3

  v1 = this;
  v2 = this->m_hWebWindow;
  this->m_bOpen = 0;
  if ( !DestroyWindow(v2) )
    MessageBoxA(0, "Error", "ÇÚµéÆÄ±« ½ÇÆÐ", 0);
  DestroyWindow(v1->m_hPopWebWindow);
  v3 = (GameFrameWork *)v1->m_pkFrameWork;
  v1->m_hWebWindow = 0;
  GameFrameWork::CloseShopWin(v3);
}

//----- (00583D30) --------------------------------------------------------
void __thiscall ShopWin::UpdateMeWin(ShopWin *this, float fCurTime)
{
  ShopWin::UpdateWebPos(this);
}

//----- (00583D40) --------------------------------------------------------
char ShopWin::LoadWebUrl()
{
  char result; // al@9
  _WIN32_FIND_DATAA FindData; // [sp+0h] [bp-2C8h]@5
  char acPathName[260]; // [sp+140h] [bp-188h]@1
  char acName[128]; // [sp+244h] [bp-84h]@5

  memset(acPathName, 0, 0x104u);
  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acPathName, "%sItemMall.hb", &Folder::m_acMain);
  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acName, "%sItemMall.ini", &Folder::m_acMain);
  if ( FindFirstFileA(acName, &FindData) != (HANDLE)-1 && !strcmp(FindData.cFileName, "ItemMall.ini") )
  {
    if ( !DeleteFileA(acName) )
      DeleteFileA(acName);
    result = 1;
  }
  else
  {
    result = 1;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00583E50) --------------------------------------------------------
char __thiscall ShopWin::Create(ShopWin *this, PgFrameWork *pkFrameWork)
{
  ShopWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiAVObject *v5; // eax@4
  NiTexturingProperty *v6; // eax@4
  NiTexturingProperty *v7; // edi@4
  NiTexturingProperty::Map *v8; // eax@6
  PgSprData *v9; // eax@9
  NiNode *v10; // esi@12
  char result; // al@16
  int v12; // ebx@17
  NiNode *v13; // esi@20
  PgFont *v14; // eax@24
  PgWinText *v15; // edi@24
  NiRefObjectVtbl *v16; // ST3C_4@24
  NiUnsharedGeometryGroup *v17; // eax@24
  NiSourceTexture *v18; // edi@26
  PgSprData *v19; // eax@26
  PgWinSpr *v20; // eax@26
  PgSprData *v21; // eax@26
  PgWinSpr *v22; // eax@26
  PgSprData *v23; // edi@26
  NiSourceTexture *v24; // edi@26
  PgSprData *v25; // edi@27
  unsigned int uiWidth; // [sp+3Ch] [bp-28h]@17
  unsigned int uiHeight; // [sp+40h] [bp-24h]@17
  NiPointer<NiTexturingProperty> spTexProp; // [sp+44h] [bp-20h]@4
  NiSourceTexture *pkTexture; // [sp+48h] [bp-1Ch]@7
  int uiLeft; // [sp+4Ch] [bp-18h]@9
  int uiTop; // [sp+50h] [bp-14h]@9
  NiPointer<NiNode> spNode; // [sp+54h] [bp-10h]@1
  int v33; // [sp+60h] [bp-4h]@1
  int iOffY; // [sp+6Ch] [bp+8h]@17

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v33 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\ItemMall.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Panel01");
  v6 = (NiTexturingProperty *)NiAVObject::GetProperty(v5, 8);
  v7 = v6;
  spTexProp.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v8 = *v7->m_kMaps.m_pBase;
  LOBYTE(v33) = 1;
  if ( v8 )
    pkTexture = (NiSourceTexture *)v8->m_spTexture.m_pObject;
  else
    pkTexture = 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, pkTexture);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "ShopWin", 0) )
  {
    LOBYTE(v33) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v10 = spNode.m_pObject;
    v33 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
    return 0;
  }
  v12 = uiLeft;
  iOffY = uiTop;
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v14 = Font::Get(0);
    v15 = PgWinText::CreateWin(uiLeft - v12, uiTop - iOffY, uiWidth, uiHeight, v14, (PgWin *)&v2->vfptr, 0, 0);
    v15->vfptr[122].__vecDelDtor((NiRefObject *)v15, 1u);
    v15->vfptr[117].__vecDelDtor((NiRefObject *)v15, (unsigned int)&Color::m_kDxWinTitleColor);
    v16 = v15->vfptr;
    v17 = TextData::Get(0xE2F5413C);
    v16[118].__vecDelDtor((NiRefObject *)v15, (unsigned int)v17);
    v15->vfptr[60].__vecDelDtor((NiRefObject *)v15, 0);
    if ( PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Panel01",
           &v2->m_uiPlaneWebXPos,
           &v2->m_uiPlaneWebYPos,
           &v2->m_uiPlaneWebWidth,
           &v2->m_uiPlaneWebHeight) )
    {
      v18 = pkTexture;
      v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
      v20 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - iOffY, v19, (PgWin *)&v2->vfptr, 0, 0);
      v20->vfptr[60].__vecDelDtor((NiRefObject *)v20, 1u);
      v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, v18);
      v22 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - iOffY, v21, (PgWin *)&v2->vfptr, 0, 0);
      v22->vfptr[60].__vecDelDtor((NiRefObject *)v22, 1u);
      v23 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, v18);
      PgSprData::Add(v23, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
      PgSprData::Add(v23, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
      PgWinBut::CreateWin(uiLeft - v12, uiTop - iOffY, v23, (PgWin *)&v2->vfptr, 1u, 0, 0);
      v24 = MenuTexMgr::GetTexture(4u);
      if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
      {
        v25 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, v24);
        PgSprData::Add(v25, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
        PgSprData::Add(v25, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
        PgWinBut::CreateWin(uiLeft - v12, uiTop - iOffY, v25, (PgWin *)&v2->vfptr, 0x401u, 0, 0);
      }
      ((void (__thiscall *)(ShopWin *))v2->vfptr[59].__vecDelDtor)(v2);
      v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
      ShopWin::ReGenPos(v2);
      LOBYTE(v33) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
      v33 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 1;
    }
    else
    {
      LOBYTE(v33) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
      v33 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 0;
    }
  }
  else
  {
    LOBYTE(v33) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v13 = spNode.m_pObject;
    v33 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v13 )
      return 0;
    ((void (__thiscall *)(NiNode *))v13->vfptr->__vecDelDtor)(v13);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005842C0) --------------------------------------------------------
void __thiscall ShopWin::OnCommand(ShopWin *this, unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@4
  MainApp *v4; // eax@6

  switch ( wParam )
  {
    case 1u:
      ShopWin::OnWinClose(this);
      break;
    case 2u:
      ShopWin::OnPopShopWin(this);
      v4 = MainApp::GetMainAppInstance();
      if ( v4 )
        MainApp::SetWinMinimized(v4);
      break;
    case 0x401u:
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v3 )
        GameFrameWork::OpenPlayGuideSearchList(v3, "ItemMall");
      break;
  }
}

//----- (00584320) --------------------------------------------------------
void __thiscall ShopWin::ShopWin(ShopWin *this)
{
  ShopWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ShopWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ShopWin::`vftable'{for `IDirectMessenger'};
  v1->m_ItemShopUrl._Mysize = 0;
  v1->m_ItemShopUrl._Myres = 15;
  v1->m_ItemShopUrl._Bx._Buf[0] = 0;
  *(_WORD *)&v1->m_bOpen = 0;
  v1->uicheck = 0;
  *(_DWORD *)&v1->m_acWebKeyParameter[0] = 0;
  *(_DWORD *)&v1->m_acWebKeyParameter[4] = 0;
  *(_DWORD *)&v1->m_acWebKeyParameter[8] = 0;
  *(_DWORD *)&v1->m_acWebKeyParameter[12] = 0;
  *(_DWORD *)&v1->m_acWebKeyParameter[16] = 0;
  *(_DWORD *)&v1->m_acWebKeyParameter[20] = 0;
  *(_DWORD *)&v1->m_acWebKeyParameter[24] = 0;
  *(_DWORD *)&v1->m_acWebKeyParameter[28] = 0;
  v1->m_acWebKeyParameter[32] = 0;
}
// 9A0B7C: using guessed type void (__thiscall *ShopWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A0B9C: using guessed type int (__thiscall *ShopWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005843A0) --------------------------------------------------------
void __thiscall ShopWin::~ShopWin(ShopWin *this)
{
  ShopWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ShopWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ShopWin::`vftable'{for `IDirectMessenger'};
  if ( this->m_ItemShopUrl._Myres >= 0x10 )
    operator delete(this->m_ItemShopUrl._Bx._Ptr);
  v1->m_ItemShopUrl._Myres = 15;
  v1->m_ItemShopUrl._Mysize = 0;
  v1->m_ItemShopUrl._Bx._Buf[0] = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9A0B7C: using guessed type void (__thiscall *ShopWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A0B9C: using guessed type int (__thiscall *ShopWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005843F0) --------------------------------------------------------
void __thiscall ShopWin::OnShowWin(ShopWin *this)
{
  unsigned int v1; // ebx@1
  ShopWin *v2; // esi@1
  int v3; // edi@1
  const char *v4; // eax@2
  HWND v5; // edi@4
  void *(__thiscall *v6)(NiRefObject *, unsigned int); // edx@11
  unsigned int v7; // edx@11
  unsigned int nHeight; // [sp+18h] [bp-2Ch]@1
  NiRect<int> kRect; // [sp+1Ch] [bp-28h]@11
  unsigned int uiPosY; // [sp+2Ch] [bp-18h]@11
  tagRECT WindowRect; // [sp+30h] [bp-14h]@1

  v1 = 0;
  v2 = this;
  v3 = this->m_uiWebWidth;
  nHeight = this->m_uiWebHeight;
  WindowRect.bottom = this->m_uiWebHeight;
  WindowRect.left = 0;
  WindowRect.right = v3;
  WindowRect.top = 0;
  AdjustWindowRectEx(&WindowRect, 0x40000000u, 0, 0);
  v2->m_hWebWindow = 0;
  if ( v2->m_ItemShopUrl._Mysize )
  {
    v4 = v2->m_ItemShopUrl._Bx._Buf;
    if ( v2->m_ItemShopUrl._Myres >= 0x10 )
      v4 = *(const char **)v4;
    v5 = CreateWindowExA(0, "WebCtrl32", v4, 0x90000000, 0, 0, v3, nHeight, g_hMainWnd, 0, g_hMainInstance, 0);
    ShowWindow(v5, 5);
    v2->m_hWebWindow = v5;
  }
  else if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
  {
    GameFrameWork::NcMiscItemShopUrlReq();
    return;
  }
  if ( IsWindow(v2->m_hWebWindow) )
  {
    ShowWindow(v2->m_hWebWindow, 5);
  }
  else if ( NiMessageBox::ms_pfnMessageBox )
  {
    NiMessageBox::ms_pfnMessageBox("CreateWindow Fail", byte_9A0A7E, 0);
  }
  v6 = v2->vfptr[52].__vecDelDtor;
  v2->m_bOpen = 1;
  kRect.m_left = 0;
  kRect.m_right = 0;
  kRect.m_top = 0;
  kRect.m_bottom = 0;
  v6((NiRefObject *)&v2->vfptr, (unsigned int)&kRect);
  v7 = kRect.m_bottom - kRect.m_top;
  uiPosY = 0;
  if ( PgWin::ms_uiScreenWidth >= kRect.m_right - kRect.m_left && PgWin::ms_uiScreenHeight >= v7 )
  {
    v1 = (PgWin::ms_uiScreenWidth - (kRect.m_right - kRect.m_left)) >> 1;
    uiPosY = (PgWin::ms_uiScreenHeight - v7) >> 1;
  }
  v2->vfptr[43].__vecDelDtor((NiRefObject *)v2, v1);
  v2->vfptr[44].__vecDelDtor((NiRefObject *)v2, uiPosY);
  SetFocus(g_hMainWnd);
}
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);

//----- (00584590) --------------------------------------------------------
ShopWin *__cdecl ShopWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  ShopWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x3EB60u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    ShopWin::ShopWin((ShopWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (ShopWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (005846C0) --------------------------------------------------------
void __thiscall ShopWin::SetItemShopUrl(ShopWin *this, char *pkStr, unsigned __int16 nLen)
{
  bool v3; // cf@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v4; // edi@2
  char *v5; // eax@3
  signed int v6; // esi@5

  if ( pkStr )
  {
    v3 = this->m_ItemShopUrl._Myres < 0x10;
    v4 = &this->m_ItemShopUrl;
    this->m_ItemShopUrl._Mysize = 0;
    if ( v3 )
      v5 = this->m_ItemShopUrl._Bx._Buf;
    else
      v5 = v4->_Bx._Ptr;
    v6 = 0;
    for ( *v5 = 0; v6 < nLen; ++v6 )
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(v4, 1u, pkStr[v6]);
  }
}

//----- (00584720) --------------------------------------------------------
ShopWin *__thiscall ShopWin::`scalar deleting destructor'(ShopWin *this, unsigned int a2)
{
  ShopWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ShopWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ShopWin::`vftable'{for `IDirectMessenger'};
  if ( this->m_ItemShopUrl._Myres >= 0x10 )
    operator delete(this->m_ItemShopUrl._Bx._Ptr);
  v2->m_ItemShopUrl._Myres = 15;
  v2->m_ItemShopUrl._Mysize = 0;
  v2->m_ItemShopUrl._Bx._Buf[0] = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A0B7C: using guessed type void (__thiscall *ShopWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A0B9C: using guessed type int (__thiscall *ShopWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00584790) --------------------------------------------------------
void __thiscall ShortCutIconWin::Show(ShortCutIconWin *this, int b)
{
  ShortCutIconWin *v2; // esi@1

  v2 = this;
  SkillIcon::Show((SkillIcon *)&this->vfptr, b);
  if ( v2->m_pkLotText )
  {
    ((void (__stdcall *)(_DWORD))v2->m_pkLotText->vfptr[64].__vecDelDtor)(b);
    if ( !v2->m_bDisplayLotText )
      ((void (__stdcall *)(_DWORD))v2->m_pkLotText->vfptr[64].__vecDelDtor)(0);
  }
}

//----- (005847E0) --------------------------------------------------------
void __thiscall ShortCutIconWin::UpdateEffect(ShortCutIconWin *this, float ftime)
{
  SpEffect *v2; // ecx@1

  v2 = this->m_pkToggleEffect;
  if ( v2 )
    SpEffect::Update(v2, ftime);
}

//----- (00584800) --------------------------------------------------------
bool __thiscall ShortCutIconWin::IsEnalbeToggleEffect(ShortCutIconWin *this)
{
  return this->m_bEnableToggle && this->m_pkToggleEffect;
}

//----- (00584820) --------------------------------------------------------
void __thiscall ShortCutWin::SetPageTextWin(ShortCutWin *this)
{
  ShortCutWin *v1; // esi@1
  char acStr[32]; // [sp+4h] [bp-24h]@1

  v1 = this;
  sprintf(acStr, "%u", this->m_uiCurPage + 1);
  ((void (__stdcall *)(_DWORD))v1->m_pkPageNumTextWin->vfptr[118].__vecDelDtor)(acStr);
}

//----- (00584870) --------------------------------------------------------
void __thiscall ShortCutWin::OnCmdShortCutRClick(ShortCutWin *this, unsigned int uiIndex)
{
  PgFrameWork::AddMsg(this->m_pkFrameWork, 0x5Du, uiIndex + 18 * this->m_uiCurPage, 1u);
}

//----- (005848A0) --------------------------------------------------------
void __thiscall ShortCutWin::ResetIconWin(ShortCutWin *this)
{
  PgFrameWork *v1; // ecx@1

  v1 = this->m_pkFrameWork;
  if ( v1 )
    PgFrameWork::AddMsg(v1, 0x8Bu, 0, 0);
}

//----- (005848C0) --------------------------------------------------------
void __thiscall ShortCutWin::OnCmdPanelTurn(ShortCutWin *this)
{
  ShortCutWin *v1; // eax@1
  PgFrameWork *v2; // ecx@1

  v1 = this;
  v2 = this->m_pkFrameWork;
  if ( v2 )
  {
    if ( v1->m_bVerticalMode )
    {
      if ( v1->m_bMainWinMode )
        PgFrameWork::AddMsg(v2, 0x88u, 0, 0);
      else
        PgFrameWork::AddMsg(v2, 0x8Au, v1->m_iSubTabLevel, 0);
    }
    else if ( v1->m_bMainWinMode )
    {
      PgFrameWork::AddMsg(v2, 0x87u, 0, 0);
    }
    else
    {
      PgFrameWork::AddMsg(v2, 0x89u, v1->m_iSubTabLevel, 0);
    }
  }
}

//----- (00584930) --------------------------------------------------------
void __thiscall ShortCutWin::OnCmdSubPanel(ShortCutWin *this)
{
  ShortCutWin *v1; // eax@1
  PgFrameWork *v2; // ecx@1

  v1 = this;
  v2 = this->m_pkFrameWork;
  if ( v2 )
    PgFrameWork::AddMsg(v2, 0x86u, v1->m_iSubTabLevel, 0);
}

//----- (00584960) --------------------------------------------------------
void __thiscall ShortCutWin::SizeBtnPosToStatus(ShortCutWin *this)
{
  ShortCutWin *v1; // esi@1
  NiRefObjectVtbl *v2; // edi@1
  NiRefObjectVtbl *v3; // edx@1
  int v4; // eax@2
  int v5; // eax@3

  v1 = this;
  v2 = this->m_pkSizeBtn->vfptr;
  v3 = this->m_apkIconWin[(unsigned __int8)byte_B4FFA0[3 * this->m_uiShortCutStatusIndex]]->vfptr;
  if ( this->m_bVerticalMode )
  {
    v4 = ((int (*)(void))v3[42].__vecDelDtor)();
    v2[44].__vecDelDtor((NiRefObject *)v1->m_pkSizeBtn, v4 - 3);
  }
  else
  {
    v5 = ((int (*)(void))v3[41].__vecDelDtor)();
    v2[43].__vecDelDtor((NiRefObject *)v1->m_pkSizeBtn, v5 - 2);
  }
}

//----- (005849D0) --------------------------------------------------------
void __thiscall ShortCutWin::DirectMessage(ShortCutWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  if ( iMsgTag == 27 && pvBody )
  {
    if ( *(_DWORD *)pvBody )
    {
      if ( *(_DWORD *)pvBody == 1 )
      {
        this->m_apkIconWinBack3[6] = 0;
        this->m_apkIconWinBack3[5] = 0;
        BYTE3(this->m_apkIconWinBack3[3]) = 0;
      }
    }
    else
    {
      BYTE3(this->m_apkIconWinBack3[3]) = 1;
    }
  }
}

//----- (00584A10) --------------------------------------------------------
void __thiscall ShortCutWin::IsStartCollTime(ShortCutWin *this, unsigned __int16 kID)
{
  SkillIcon **v2; // esi@1
  signed int v3; // edi@1
  unsigned __int16 v4; // ax@2

  v2 = (SkillIcon **)this->m_apkIconWin;
  v3 = 18;
  do
  {
    v4 = SkillIcon::GetSkill(*v2);
    if ( v4 != -1 && v4 == kID && IconWin::IsStartCoolTime((IconWin *)&(*v2)->vfptr) )
      IconWin::CooltimeDecrease((IconWin *)&(*v2)->vfptr, kID);
    ++v2;
    --v3;
  }
  while ( v3 );
}

//----- (00584A60) --------------------------------------------------------
void __thiscall ShortCutIconWin::ShortCutIconWin(ShortCutIconWin *this)
{
  ShortCutIconWin *v1; // esi@1

  v1 = this;
  SkillIcon::SkillIcon((SkillIcon *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ShortCutIconWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ShortCutIconWin::`vftable'{for `IDirectMessenger'};
  v1->m_spShortCut.m_pObject = 0;
  v1->m_bProtected = 0;
  v1->m_pkLotText = 0;
  *(_WORD *)&v1->m_bDisplayLotText = 0;
  v1->m_pkToggleEffect = 0;
  v1->m_bEnableToggle = 0;
  v1->m_kSkillID = -1;
}
// 9A12D8: using guessed type void (__thiscall *ShortCutIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A12F4: using guessed type int (__thiscall *ShortCutIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00584AB0) --------------------------------------------------------
void __thiscall ShortCutIconWin::ProcessMeInput(ShortCutIconWin *this, bool *bHit)
{
  ShortCutIconWin *v2; // esi@1

  v2 = this;
  if ( PgWin::IsVisible((PgWin *)&this->vfptr) )
  {
    IconWin::ProcessMeInput((IconWin *)&v2->vfptr, bHit);
  }
  else
  {
    *bHit = 0;
    v2->m_spClickGeom.m_pObject->m_uFlags |= 1u;
    v2->m_spOverGeom.m_pObject->m_uFlags |= 1u;
  }
}

//----- (00584B00) --------------------------------------------------------
ShortCut *__thiscall ShortCutIconWin::GetShortCut(ShortCutIconWin *this)
{
  return this->m_spShortCut.m_pObject;
}

//----- (00584B10) --------------------------------------------------------
void __thiscall ShortCutIconWin::SetSkillIcon(ShortCutIconWin *this)
{
  ShortCutIconWin *v1; // esi@1
  PgWinText *v2; // ecx@1
  ShortCut *v3; // ecx@1
  ShortCut *v4; // eax@4
  unsigned __int16 v5; // di@5

  v1 = this;
  IconWin::SetCoolTimeID((IconWin *)&this->vfptr, 0xFFFFu);
  IconWin::SetCoolTimeIDByItemAction((IconWin *)&v1->vfptr, 0xFFFFu);
  v2 = v1->m_pkLotText;
  v1->m_bDisplayLotText = 0;
  ((void (__stdcall *)(_DWORD))v2->vfptr[64].__vecDelDtor)(0);
  v3 = v1->m_spShortCut.m_pObject;
  if ( v3 )
  {
    if ( ((int (*)(void))v3->vfptr[1].__vecDelDtor)() == 1 )
    {
      v4 = v1->m_spShortCut.m_pObject;
      if ( v4 )
      {
        v5 = (unsigned __int16)v4[1].vfptr;
        SkillIcon::SetSkill((SkillIcon *)&v1->vfptr, (unsigned __int16)v4[1].vfptr);
        IconWin::SetCoolTimeID((IconWin *)&v1->vfptr, v5);
      }
    }
    SkillIcon::ShowSkillPowerBar((SkillIcon *)&v1->vfptr, 1);
  }
  else
  {
    v1->vfptr[150].__vecDelDtor((NiRefObject *)v1, 0);
  }
}

//----- (00584BA0) --------------------------------------------------------
void __thiscall ShortCutIconWin::SetActionIcon(ShortCutIconWin *this)
{
  ShortCutIconWin *v1; // esi@1
  PgWinText *v2; // ecx@1
  ShortCut *v3; // eax@1
  NiRefObjectVtbl *v4; // ebx@3
  int v5; // edi@3
  int *v6; // eax@5
  int v7; // edi@6
  NiRefObjectVtbl *v8; // ebx@7
  float green; // ST0C_4@7
  NiSourceTexture *v10; // eax@7
  void *(__thiscall *v11)(NiRefObject *, unsigned int); // eax@7

  v1 = this;
  IconWin::SetCoolTimeID((IconWin *)&this->vfptr, 0xFFFFu);
  IconWin::SetCoolTimeIDByItemAction((IconWin *)&v1->vfptr, 0xFFFFu);
  v2 = v1->m_pkLotText;
  v1->m_bDisplayLotText = 0;
  ((void (__stdcall *)(_DWORD))v2->vfptr[64].__vecDelDtor)(0);
  v3 = v1->m_spShortCut.m_pObject;
  if ( v3 )
  {
    v4 = v3[1].vfptr;
    v5 = ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, NiRefObjectVtbl *))(*(_DWORD *)ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable
                                                                        + 16))(
                            ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable,
                            v3[1].vfptr) )
    {
      if ( (unsigned __int16)v4 <= *(_WORD *)(v5 + 200) )
      {
        v6 = (int *)(*(_DWORD *)(v5 + 196) + 4 * (unsigned __int16)v4);
        if ( *v6 )
        {
          v7 = *v6;
          if ( *v6 )
          {
            SkillIcon::SetBackPlaneColor((SkillIcon *)&v1->vfptr, 0.0, 0.0, 0.0, 0.0);
            SkillIcon::SetTopPlaneColor((SkillIcon *)&v1->vfptr, 0.0, 0.0, 0.0, 0.0);
            v8 = v1->vfptr;
            LODWORD(green) = *(_WORD *)(v7 + 99);
            v10 = IconMgr::GetTexture((char *)(v7 + 67));
            ((void (__thiscall *)(ShortCutIconWin *, NiSourceTexture *, _DWORD, signed int, signed int))v8[146].__vecDelDtor)(
              v1,
              v10,
              LODWORD(green),
              32,
              32);
            v11 = v1->vfptr[60].__vecDelDtor;
            v1->m_uFlags &= 0xFFFEu;
            v11((NiRefObject *)&v1->vfptr, 1u);
          }
        }
      }
    }
    SkillIcon::ShowSkillPowerBar((SkillIcon *)&v1->vfptr, 0);
  }
  else
  {
    v1->vfptr[150].__vecDelDtor((NiRefObject *)v1, 0);
  }
}
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;

//----- (00584CB0) --------------------------------------------------------
void __thiscall ShortCutIconWin::SetSoulStoneIcon(ShortCutIconWin *this)
{
  ((void (__stdcall *)(_DWORD))this->vfptr[150].__vecDelDtor)(0);
}

//----- (00584CC0) --------------------------------------------------------
void __thiscall ShortCutIconWin::StopToggleEffect(ShortCutIconWin *this)
{
  SpEffect *v1; // eax@1

  v1 = this->m_pkToggleEffect;
  if ( v1 )
  {
    if ( v1->m_bLive )
      v1->m_bLoop = 0;
  }
}

//----- (00584CF0) --------------------------------------------------------
void __thiscall ShortCutWin::UpdateMeWin(ShortCutWin *this, float fCurTime)
{
  char *v2; // esi@2
  signed int v3; // edi@2
  SpEffect *v4; // ecx@3

  if ( this->m_bShowFlag )
  {
    v2 = (char *)this->m_apkIconWin;
    v3 = 18;
    do
    {
      v4 = *(SpEffect **)(*(_DWORD *)v2 + 432);
      if ( v4 )
        SpEffect::Update(v4, fCurTime);
      v2 += 4;
      --v3;
    }
    while ( v3 );
  }
}

//----- (00584D40) --------------------------------------------------------
void __thiscall ShortCutWin::Show(ShortCutWin *this, bool b)
{
  this->m_bShowFlag = b;
  if ( b )
    this->m_uFlags &= 0xFFFEu;
  else
    this->m_uFlags |= 1u;
}

//----- (00584D70) --------------------------------------------------------
void __thiscall ShortCutWin::StartHpStonCoolTime(ShortCutWin *this)
{
  char *v1; // ecx@1
  int v2; // ebx@2
  int v3; // esi@4
  int v4; // edi@4
  int *v5; // eax@6
  int v6; // eax@7
  bool v7; // zf@11
  signed int v8; // [sp+1Ch] [bp-8h]@1
  IconWin **v9; // [sp+20h] [bp-4h]@1

  v1 = (char *)this->m_apkIconWin;
  v9 = (IconWin **)v1;
  v8 = 18;
  do
  {
    v2 = *(_DWORD *)(*(_DWORD *)v1 + 412);
    if ( v2 )
    {
      if ( (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v2 + 4))(*(_DWORD *)(*(_DWORD *)v1 + 412)) == 2 )
      {
        v3 = ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;
        v4 = *(_DWORD *)(v2 + 8);
        if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable
                                                                 + 16))(
                                ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable,
                                *(_DWORD *)(v2 + 8)) )
        {
          if ( (unsigned __int16)v4 <= *(_WORD *)(v3 + 200) )
          {
            v5 = (int *)(*(_DWORD *)(v3 + 196) + 4 * (unsigned __int16)v4);
            if ( *v5 )
            {
              v6 = *v5;
              if ( v6 )
              {
                if ( !*(_DWORD *)(v6 + 101) && *(_DWORD *)(v2 + 16) == 8 )
                  IconWin::StartCoolTime(*v9, Timer::ms_fCurTime, 7.0, 0.0);
              }
            }
          }
        }
      }
    }
    v1 = (char *)(v9 + 1);
    v7 = v8-- == 1;
    ++v9;
  }
  while ( !v7 );
}
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00584E30) --------------------------------------------------------
void __thiscall ShortCutWin::StartSpStonCoolTime(ShortCutWin *this)
{
  char *v1; // ecx@1
  int v2; // ebx@2
  int v3; // esi@4
  int v4; // edi@4
  int *v5; // eax@6
  int v6; // eax@7
  bool v7; // zf@11
  signed int v8; // [sp+1Ch] [bp-8h]@1
  IconWin **v9; // [sp+20h] [bp-4h]@1

  v1 = (char *)this->m_apkIconWin;
  v9 = (IconWin **)v1;
  v8 = 18;
  do
  {
    v2 = *(_DWORD *)(*(_DWORD *)v1 + 412);
    if ( v2 )
    {
      if ( (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v2 + 4))(*(_DWORD *)(*(_DWORD *)v1 + 412)) == 2 )
      {
        v3 = ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;
        v4 = *(_DWORD *)(v2 + 8);
        if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable
                                                                 + 16))(
                                ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable,
                                *(_DWORD *)(v2 + 8)) )
        {
          if ( (unsigned __int16)v4 <= *(_WORD *)(v3 + 200) )
          {
            v5 = (int *)(*(_DWORD *)(v3 + 196) + 4 * (unsigned __int16)v4);
            if ( *v5 )
            {
              v6 = *v5;
              if ( v6 )
              {
                if ( !*(_DWORD *)(v6 + 101) && *(_DWORD *)(v2 + 16) == 9 )
                  IconWin::StartCoolTime(*v9, Timer::ms_fCurTime, 7.0, 0.0);
              }
            }
          }
        }
      }
    }
    v1 = (char *)(v9 + 1);
    v7 = v8-- == 1;
    ++v9;
  }
  while ( !v7 );
}
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00584EF0) --------------------------------------------------------
void __thiscall ShortCutWin::SetShortCutInvPosWinLock(ShortCutWin *this, unsigned __int16 invPos)
{
  char *v2; // esi@1
  signed int v3; // edi@1
  int v4; // ecx@2

  v2 = (char *)this->m_apkIconWin;
  v3 = 18;
  do
  {
    v4 = *(_DWORD *)(*(_DWORD *)v2 + 412);
    if ( v4 )
    {
      if ( (*(int (**)(void))(*(_DWORD *)v4 + 4))() == 5 )
        *(_BYTE *)(*(_DWORD *)v2 + 429) = 1;
    }
    v2 += 4;
    --v3;
  }
  while ( v3 );
}

//----- (00584F30) --------------------------------------------------------
void __thiscall ShortCutWin::SetShortCutInvPosWinUnLock(ShortCutWin *this)
{
  char *v1; // esi@1
  signed int v2; // edi@1
  int v3; // ecx@2

  v1 = (char *)this->m_apkIconWin;
  v2 = 18;
  do
  {
    v3 = *(_DWORD *)(*(_DWORD *)v1 + 412);
    if ( v3 )
    {
      if ( (*(int (**)(void))(*(_DWORD *)v3 + 4))() == 5 )
        *(_BYTE *)(*(_DWORD *)v1 + 429) = 0;
    }
    v1 += 4;
    --v2;
  }
  while ( v2 );
}

//----- (00584F70) --------------------------------------------------------
void __thiscall ShortCutWin::StopEffect(ShortCutWin *this)
{
  char *v1; // edx@1
  signed int v2; // esi@1
  int v3; // eax@2
  int v4; // eax@4
  int v5; // eax@7
  int v6; // eax@9
  int v7; // eax@12
  int v8; // eax@14
  int v9; // eax@17
  int v10; // eax@19
  int v11; // eax@22
  int v12; // eax@24
  int v13; // eax@27
  int v14; // eax@29

  v1 = (char *)&this->m_apkIconWin[1];
  v2 = 3;
  do
  {
    v3 = *((_DWORD *)v1 - 1);
    if ( *(_BYTE *)(v3 + 438) )
    {
      if ( *(_DWORD *)(v3 + 432) )
      {
        v4 = *(_DWORD *)(v3 + 432);
        if ( v4 )
        {
          if ( *(_BYTE *)(v4 + 64) )
            *(_BYTE *)(v4 + 65) = 0;
        }
      }
    }
    v5 = *(_DWORD *)v1;
    if ( *(_BYTE *)(*(_DWORD *)v1 + 438) )
    {
      if ( *(_DWORD *)(v5 + 432) )
      {
        v6 = *(_DWORD *)(v5 + 432);
        if ( v6 )
        {
          if ( *(_BYTE *)(v6 + 64) )
            *(_BYTE *)(v6 + 65) = 0;
        }
      }
    }
    v7 = *((_DWORD *)v1 + 1);
    if ( *(_BYTE *)(v7 + 438) )
    {
      if ( *(_DWORD *)(v7 + 432) )
      {
        v8 = *(_DWORD *)(v7 + 432);
        if ( v8 )
        {
          if ( *(_BYTE *)(v8 + 64) )
            *(_BYTE *)(v8 + 65) = 0;
        }
      }
    }
    v9 = *((_DWORD *)v1 + 2);
    if ( *(_BYTE *)(v9 + 438) )
    {
      if ( *(_DWORD *)(v9 + 432) )
      {
        v10 = *(_DWORD *)(v9 + 432);
        if ( v10 )
        {
          if ( *(_BYTE *)(v10 + 64) )
            *(_BYTE *)(v10 + 65) = 0;
        }
      }
    }
    v11 = *((_DWORD *)v1 + 3);
    if ( *(_BYTE *)(v11 + 438) )
    {
      if ( *(_DWORD *)(v11 + 432) )
      {
        v12 = *(_DWORD *)(v11 + 432);
        if ( v12 )
        {
          if ( *(_BYTE *)(v12 + 64) )
            *(_BYTE *)(v12 + 65) = 0;
        }
      }
    }
    v13 = *((_DWORD *)v1 + 4);
    if ( *(_BYTE *)(v13 + 438) )
    {
      if ( *(_DWORD *)(v13 + 432) )
      {
        v14 = *(_DWORD *)(v13 + 432);
        if ( v14 )
        {
          if ( *(_BYTE *)(v14 + 64) )
            *(_BYTE *)(v14 + 65) = 0;
        }
      }
    }
    v1 += 24;
    --v2;
  }
  while ( v2 );
}

//----- (00585070) --------------------------------------------------------
void __thiscall ShortCutIconWin::DoAction(ShortCutIconWin *this)
{
  ShortCutIconWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiIndex);
}

//----- (005850A0) --------------------------------------------------------
void __thiscall ShortCutIconWin::DoRAction(ShortCutIconWin *this)
{
  ShortCutIconWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiRCmdMsg, v1->m_uiIndex);
}

//----- (005850D0) --------------------------------------------------------
void __thiscall ShortCutIconWin::OnFirstHitWin(ShortCutIconWin *this)
{
  ShortCutIconWin *v1; // esi@1
  ShortCut *v2; // ecx@1
  int v3; // eax@3
  ShortCut *v4; // eax@4
  unsigned __int16 v5; // ax@5
  Item *v6; // eax@6
  ItemInfoWin *v7; // ecx@7
  ShortCut *v8; // eax@11
  unsigned int v9; // eax@12
  Item *v10; // eax@13
  ItemInfoWin *v11; // ecx@14
  ShortCut *v12; // eax@17
  unsigned __int16 v13; // ax@18
  SkillInfoWin *v14; // ecx@18
  ShortCut *v15; // edi@22
  ActionViewInfo *v16; // eax@23
  unsigned int v17; // edi@25
  Item *v18; // edi@26
  ItemInfoWin *v19; // ecx@27

  v1 = this;
  v2 = this->m_spShortCut.m_pObject;
  if ( !v2 )
  {
    PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
    return;
  }
  v3 = ((int (*)(void))v2->vfptr[1].__vecDelDtor)();
  switch ( v3 )
  {
    case 4:
      v4 = v1->m_spShortCut.m_pObject;
      if ( v4 )
      {
        v5 = v4[1].m_uiRefCount;
        if ( v5 != -1 )
        {
          v6 = Inventory::GetItemByID(&g_kInventory, v5);
          if ( !v6 )
          {
            v1->m_pkToolTipWin = 0;
            return;
          }
          v7 = g_pkItemInfoWin;
          v1->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
          if ( v7 )
          {
            ItemInfoWin::SetItemInfo(v7, v6);
            PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
            return;
          }
        }
      }
      break;
    case 5:
      v8 = v1->m_spShortCut.m_pObject;
      if ( v8 )
      {
        v9 = (unsigned int)v8[1].vfptr;
        if ( v9 < 0xC0 )
        {
          v10 = g_kInventory.m_aspInv[v9].m_pObject;
          if ( v10 )
          {
            v11 = g_pkItemInfoWin;
            v1->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
            if ( v11 )
            {
              ItemInfoWin::SetItemInfo(v11, v10);
              PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
              return;
            }
          }
        }
      }
      break;
    case 1:
      v12 = v1->m_spShortCut.m_pObject;
      if ( v12 )
      {
        v13 = (unsigned __int16)v12[1].vfptr;
        v14 = (SkillInfoWin *)g_pkSkillInfoWin;
        v1->m_pkToolTipWin = g_pkSkillInfoWin;
        if ( v14 )
        {
          if ( v13 != -1 )
          {
            SkillInfoWin::SetSkillInfo(v14, v13, 1, 0, 0);
            PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
            return;
          }
        }
      }
      break;
    case 2:
      v15 = v1->m_spShortCut.m_pObject;
      if ( v15 )
      {
        v16 = IIDTableBase<ActionViewInfo,ActionViewTable,unsigned short>::GetByID((int)v15[1].vfptr);
        if ( v16 )
        {
          if ( v16->eActionType == 2 )
          {
            v17 = (unsigned int)v15[2].vfptr;
            if ( v17 < 0x2A )
            {
              v18 = g_kInventory.m_aspPremiumActionInv[v17].m_pObject;
              if ( v18 )
              {
                v19 = g_pkItemInfoWin;
                v1->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
                if ( v19 )
                {
                  ItemInfoWin::SetItemInfo(v19, v18);
                  PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
                  return;
                }
              }
            }
          }
          else
          {
            v1->m_pkToolTipWin = g_pkToolTipWin;
            PgWin::SetToolTipWinText((PgWin *)&v1->vfptr, v16->ActionName);
          }
        }
      }
      break;
  }
  PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
}

//----- (00585270) --------------------------------------------------------
void __thiscall ShortCutIconWin::RefreshEffect(ShortCutIconWin *this)
{
  ShortCutIconWin *v1; // esi@1
  SpEffect *v2; // eax@2

  v1 = this;
  if ( SkillIcon::GetSkill((SkillIcon *)&this->vfptr) == -1 )
  {
    v2 = v1->m_pkToggleEffect;
    if ( v2 )
    {
      if ( v2->m_bLive )
        v2->m_bLoop = 0;
    }
  }
}

//----- (005852A0) --------------------------------------------------------
void __thiscall ShortCutIconWin::StartToggleEffect(ShortCutIconWin *this)
{
  ShortCutIconWin *v1; // esi@1
  NiNode *v2; // edi@2
  float v3; // ST0C_4@2
  float v4; // ST10_4@2

  v1 = this;
  if ( this->m_pkToggleEffect )
  {
    this->m_pkToggleEffect->m_bLoop = 1;
    v2 = this->m_pkToggleEffect->m_spEffect.m_pObject;
    v3 = (double)((unsigned int)((int (__thiscall *)(ShortCutIconWin *))this->vfptr[36].__vecDelDtor)(this) >> 1);
    v4 = (double)((unsigned int)((int (__thiscall *)(ShortCutIconWin *))v1->vfptr[36].__vecDelDtor)(v1) >> 1);
    v2->m_kLocal.m_Translate.x = v3;
    v2->m_kLocal.m_Translate.y = v4;
    v2->m_kLocal.m_Translate.z = 0.0;
    SpEffect::Start(v1->m_pkToggleEffect, (NiNode *)&v1->vfptr);
  }
}

//----- (00585330) --------------------------------------------------------
void __thiscall ShortCutWin::OnCmdPrev(ShortCutWin *this)
{
  ShortCutWin *v1; // esi@1
  unsigned int v2; // eax@1
  PgFrameWork *v3; // ecx@4
  char string; // [sp+4h] [bp-24h]@6

  v1 = this;
  v2 = this->m_uiCurPage;
  if ( v2 )
    this->m_uiCurPage = v2 - 1;
  else
    this->m_uiCurPage = 4;
  ShortCutWin::StopEffect(this);
  v3 = v1->m_pkFrameWork;
  if ( v3 )
    PgFrameWork::AddMsg(v3, 0x8Bu, 0, 0);
  sprintf(&string, "%u", v1->m_uiCurPage + 1);
  ((void (__stdcall *)(_DWORD))v1->m_pkPageNumTextWin->vfptr[118].__vecDelDtor)(&string);
}

//----- (005853C0) --------------------------------------------------------
void __thiscall ShortCutWin::OnCmdNext(ShortCutWin *this)
{
  ShortCutWin *v1; // esi@1
  PgFrameWork *v2; // ecx@3
  char string; // [sp+4h] [bp-24h]@5

  v1 = this;
  ++v1->m_uiCurPage;
  if ( this->m_uiCurPage >= 5 )
    this->m_uiCurPage = 0;
  ShortCutWin::StopEffect(this);
  v2 = v1->m_pkFrameWork;
  if ( v2 )
    PgFrameWork::AddMsg(v2, 0x8Bu, 0, 0);
  sprintf(&string, "%u", v1->m_uiCurPage + 1);
  ((void (__stdcall *)(_DWORD))v1->m_pkPageNumTextWin->vfptr[118].__vecDelDtor)(&string);
}

//----- (00585450) --------------------------------------------------------
char __thiscall ShortCutWin::SetDropContents(ShortCutWin *this, ShortCut *pkShortCut, unsigned int uiSenderIndex)
{
  ShortCutWin *v3; // esi@1
  NiRefObjectVtbl *v4; // ecx@3
  char result; // al@5
  NiRefObjectVtbl *v6; // eax@6
  Item *v7; // edi@7
  NiRefObjectVtbl *v8; // ebx@8
  NiRefObjectVtbl *v9; // ecx@9
  NiRefObjectVtbl *v10; // eax@13

  v3 = this;
  if ( pkShortCut )
  {
    switch ( ((int (__thiscall *)(_DWORD))pkShortCut->vfptr[1].__vecDelDtor)(pkShortCut) )
    {
      case 0:
        v3->m_kDropContents.m_eType = 0;
        v4 = pkShortCut[1].vfptr;
        if ( v4 )
        {
          v3->m_kDropContents.m_uiSenderIndex = uiSenderIndex;
          v3->m_kDropContents.m_apvParam[0] = v4;
          v3->m_kDropContents.m_apvParam[1] = 0;
          v3->m_kDropContents.m_uiLot = (*((int (**)(void))v4->__vecDelDtor + 3))();
        }
        v3->m_kDropContents.m_kItemID = pkShortCut[1].m_uiRefCount;
        SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_CLICK);
        result = 1;
        break;
      case 5:
        v3->m_kDropContents.m_eType = 6;
        v6 = pkShortCut[1].vfptr;
        if ( (unsigned int)v6 >= 0xC0 )
          goto LABEL_14;
        v7 = g_kInventory.m_aspInv[(_DWORD)v6].m_pObject;
        if ( !v7 )
          goto LABEL_14;
        v3->m_kDropContents.m_uiSenderIndex = uiSenderIndex;
        v3->m_kDropContents.m_apvParam[0] = v7;
        v3->m_kDropContents.m_apvParam[1] = 0;
        v3->m_kDropContents.m_uiLot = ((int (__thiscall *)(_DWORD))v7->vfptr[3].__vecDelDtor)(v7);
        v3->m_kDropContents.m_kItemID = v7->m_kStruct.itemid;
        v8 = pkShortCut[1].vfptr;
        v3->m_kDropContents.ui_InvType = 4;
        v3->m_kDropContents.ui_InvIndex = (unsigned int)v8;
        SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_CLICK);
        result = 1;
        break;
      case 4:
        v3->m_kDropContents.m_eType = 6;
        v9 = pkShortCut[1].vfptr;
        if ( v9 )
        {
          v3->m_kDropContents.m_uiSenderIndex = uiSenderIndex;
          v3->m_kDropContents.m_apvParam[0] = v9;
          v3->m_kDropContents.m_apvParam[1] = 0;
          v3->m_kDropContents.m_uiLot = (*((int (**)(void))v9->__vecDelDtor + 3))();
        }
        v3->m_kDropContents.m_kItemID = pkShortCut[1].m_uiRefCount;
        SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_CLICK);
        result = 1;
        break;
      case 1:
        v3->m_kDropContents.m_eType = 1;
        v3->m_kDropContents.m_apvParam[0] = (void *)LOWORD(pkShortCut[1].vfptr);
        v3->m_kDropContents.m_uiSenderIndex = uiSenderIndex;
        SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_CLICK);
        result = 1;
        break;
      case 2:
        v3->m_kDropContents.m_eType = 3;
        v10 = pkShortCut[2].vfptr;
        v3->m_kDropContents.m_uiSenderIndex = uiSenderIndex;
        v3->m_kDropContents.m_apvParam[0] = v10;
        SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_CLICK);
        result = 1;
        break;
      default:
        goto LABEL_14;
    }
  }
  else
  {
LABEL_14:
    result = 0;
  }
  return result;
}

//----- (00585630) --------------------------------------------------------
void __thiscall ShortCutWin::SetHotKeyWin(ShortCutWin *this, unsigned int index, const char *meshName)
{
  ShortCutWin *v3; // esi@1
  unsigned int v4; // edi@2
  PgWinSpr *v5; // ecx@2
  int v6; // eax@4
  PgWinSpr *v7; // ecx@4
  PgSprData *v8; // ebx@4
  NiAVObject *v9; // eax@5
  PgWinSpr *v10; // eax@6
  void (__thiscall ***v11)(_DWORD, _DWORD); // esi@7
  unsigned int uiWidth; // [sp+10h] [bp-28h]@6
  unsigned int uiHeight; // [sp+14h] [bp-24h]@6
  int uiLeft; // [sp+18h] [bp-20h]@4
  int uiTop; // [sp+1Ch] [bp-1Ch]@4
  int xPos; // [sp+20h] [bp-18h]@4
  int iX; // [sp+24h] [bp-14h]@6
  int yPos; // [sp+28h] [bp-10h]@4
  int v19; // [sp+34h] [bp-4h]@4

  v3 = this;
  if ( this->m_spNumberNode.m_pObject )
  {
    v4 = index;
    v5 = this->m_apkHotKeyWin[index];
    if ( v5 )
    {
      if ( (unsigned __int8)((int (*)(void))v5->vfptr[65].__vecDelDtor)() )
      {
        v6 = ((int (*)(void))v3->m_apkIconWinBack[v4]->vfptr[41].__vecDelDtor)();
        v7 = v3->m_apkIconWinBack[v4];
        xPos = v6;
        yPos = ((int (*)(void))v7->vfptr[42].__vecDelDtor)();
        PgWin::DetachChildWin((PgWin *)&v3->vfptr, (NiPointer<PgWin> *)&index, (PgWin *)&v3->m_apkHotKeyWin[v4]->vfptr);
        v19 = 0;
        PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)index);
        v3->m_apkHotKeyWin[v4] = 0;
        v8 = PgSprData::Create(
               (NiAVObject *)&v3->m_spNumberNode.m_pObject->vfptr,
               meshName,
               &uiLeft,
               &uiTop,
               v3->m_pkNumberTexture);
        if ( v8 )
        {
          v9 = (NiAVObject *)&v3->m_spNumberPosNode.m_pObject->vfptr;
          if ( v9 )
          {
            PgUtil::GetTriShapeRect(v9, meshName, &iX, (int *)&meshName, &uiWidth, &uiHeight);
            v10 = PgWinSpr::CreateWin(iX + xPos + 25, (int)&meshName[yPos + 4], v8, (PgWin *)&v3->vfptr, 0, 0);
            v3->m_apkHotKeyWin[v4] = v10;
            v10->vfptr[60].__vecDelDtor((NiRefObject *)v10, 0);
          }
        }
        v11 = (void (__thiscall ***)(_DWORD, _DWORD))index;
        v19 = -1;
        if ( index && !InterlockedDecrement((volatile LONG *)(index + 4)) )
        {
          if ( v11 )
            (**v11)(v11, 1);
        }
      }
    }
  }
}

//----- (005857B0) --------------------------------------------------------
void __thiscall ShortCutWin::SetHotKeyPlusWin(ShortCutWin *this, unsigned int index, const char *meshName)
{
  ShortCutWin *v3; // esi@1
  unsigned int v4; // edi@2
  PgWinSpr *v5; // ecx@2
  PgSprData *v6; // ebx@4
  int v7; // eax@4
  PgWinSpr *v8; // ecx@4
  PgWinSpr *v9; // eax@5
  void (__thiscall ***v10)(_DWORD, _DWORD); // esi@6
  int uiLeft; // [sp+10h] [bp-18h]@4
  int uiTop; // [sp+14h] [bp-14h]@4
  int xPos; // [sp+18h] [bp-10h]@4
  int v14; // [sp+24h] [bp-4h]@4

  v3 = this;
  if ( this->m_spNumberNode.m_pObject )
  {
    v4 = index;
    v5 = this->m_apkHotKeyPlusWin[index];
    if ( v5 )
    {
      if ( (unsigned __int8)((int (*)(void))v5->vfptr[65].__vecDelDtor)() )
      {
        v6 = PgSprData::Create(
               (NiAVObject *)&v3->m_spNumberNode.m_pObject->vfptr,
               meshName,
               &uiLeft,
               &uiTop,
               v3->m_pkNumberTexture);
        v7 = ((int (*)(void))v3->m_apkHotKeyPlusWin[v4]->vfptr[41].__vecDelDtor)();
        v8 = v3->m_apkHotKeyPlusWin[v4];
        xPos = v7;
        meshName = (const char *)((int (*)(void))v8->vfptr[42].__vecDelDtor)();
        PgWin::DetachChildWin(
          (PgWin *)&v3->vfptr,
          (NiPointer<PgWin> *)&index,
          (PgWin *)&v3->m_apkHotKeyPlusWin[v4]->vfptr);
        v14 = 0;
        PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)index);
        v3->m_apkHotKeyPlusWin[v4] = 0;
        if ( v6 )
        {
          v9 = PgWinSpr::CreateWin(xPos, (int)meshName, v6, (PgWin *)&v3->vfptr, 0, 0);
          v3->m_apkHotKeyPlusWin[v4] = v9;
          v9->vfptr[60].__vecDelDtor((NiRefObject *)v9, 0);
        }
        v10 = (void (__thiscall ***)(_DWORD, _DWORD))index;
        v14 = -1;
        if ( index && !InterlockedDecrement((volatile LONG *)(index + 4)) )
        {
          if ( v10 )
            (**v10)(v10, 1);
        }
      }
    }
  }
}

//----- (00585900) --------------------------------------------------------
void __thiscall ShortCutWin::SetPremiumItemInfo(ShortCutWin *this, unsigned int uiInvPos, Item *pkItem)
{
  ShortCutWin *v3; // edi@1
  ShortCutAction *v4; // eax@1
  ShortCut *v5; // eax@2
  ShortCut *v6; // esi@2
  ActionViewInfo *v7; // eax@4
  PgFrameWork *v8; // ecx@6

  v3 = this;
  v4 = (ShortCutAction *)operator new(0x14u);
  if ( v4 )
  {
    ShortCutAction::ShortCutAction(v4);
    v6 = v5;
  }
  else
  {
    v6 = 0;
  }
  v6[2].vfptr = (NiRefObjectVtbl *)uiInvPos;
  v6[1].m_uiRefCount = 0;
  v7 = ActionViewTable::GetByInxName(pkItem->m_pkInfo->InxName);
  if ( v7 )
    v6[1].vfptr = (NiRefObjectVtbl *)v7->nIndex;
  ShortCutMgr::SetShortCut(&g_kShortCutMgr, v6, v3->m_uiRevIndex, 1);
  v8 = v3->m_pkFrameWork;
  if ( v8 )
    PgFrameWork::AddMsg(v8, 0x8Bu, 0, 0);
  SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_CLICK);
  v3->m_bPremiumActive = 0;
}

//----- (005859D0) --------------------------------------------------------
char __thiscall ShortCutWin::IsToggleOn(ShortCutWin *this, unsigned __int16 kCastingID)
{
  unsigned __int16 *v2; // edx@1
  unsigned int v3; // eax@1
  unsigned int v4; // ecx@2
  char result; // al@6

  v2 = this->m_vecToggleSkillID._Myfirst;
  v3 = this->m_vecToggleSkillID._Mylast - v2;
  if ( v3 && (v4 = 0, v3) )
  {
    if ( v3 <= 0 )
      std::_Xout_of_range("invalid vector<T> subscript");
    while ( *v2 != kCastingID )
    {
      ++v4;
      ++v2;
      if ( v3 <= v4 )
        goto LABEL_6;
    }
    result = 1;
  }
  else
  {
LABEL_6:
    result = 0;
  }
  return result;
}

//----- (00585A20) --------------------------------------------------------
void __thiscall ShortCutWin::ReFreshToggleEffect(ShortCutWin *this)
{
  SkillIcon **v1; // edi@1
  signed int v2; // ebx@1
  SkillIcon *v3; // esi@2
  unsigned int v4; // eax@3

  v1 = (SkillIcon **)this->m_apkIconWin;
  v2 = 18;
  do
  {
    v3 = *v1;
    if ( SkillIcon::GetSkill(*v1) == -1 )
    {
      v4 = v3[1].m_uiExtraDataSize;
      if ( v4 )
      {
        if ( *(_BYTE *)(v4 + 64) )
          *(_BYTE *)(v4 + 65) = 0;
      }
    }
    ++v1;
    --v2;
  }
  while ( v2 );
}

//----- (00585A70) --------------------------------------------------------
void __thiscall ShortCutIconWin::~ShortCutIconWin(ShortCutIconWin *this)
{
  ShortCutIconWin *v1; // esi@1
  ShortCut *v2; // edi@1
  SpEffect *v3; // edi@6
  NiNode *v4; // ebx@7
  ShortCut *v5; // edi@12

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ShortCutIconWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ShortCutIconWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spShortCut.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spShortCut.m_pObject = 0;
  }
  v3 = v1->m_pkToggleEffect;
  if ( v3 )
  {
    NsEffect::~NsEffect(&v3->m_kEffect);
    ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v3->m_kMarkCheck);
    v4 = v3->m_spEffect.m_pObject;
    if ( v3->m_spEffect.m_pObject && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    operator delete(v3);
    v1->m_pkToggleEffect = 0;
  }
  v5 = v1->m_spShortCut.m_pObject;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  SkillIcon::~SkillIcon((SkillIcon *)&v1->vfptr);
}
// 9A12D8: using guessed type void (__thiscall *ShortCutIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A12F4: using guessed type int (__thiscall *ShortCutIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00585B90) --------------------------------------------------------
void __thiscall ShortCutIconWin::CreateToggleEffect(ShortCutIconWin *this)
{
  ShortCutIconWin *v1; // esi@1
  const char *v2; // eax@5
  SpEffect *v3; // edi@5
  NiNode *v4; // eax@6
  SpEffect *v5; // eax@6
  NiNode *v6; // eax@8
  NiNode *v7; // esi@9
  NiPointer<NiNode> pkNiNodePtr; // [sp+10h] [bp-10h]@3
  int v9; // [sp+1Ch] [bp-4h]@3

  v1 = this;
  if ( this->m_pkToggleEffect )
  {
    ShortCutIconWin::StartToggleEffect(this);
  }
  else
  {
    pkNiNodePtr.m_pObject = 0;
    v9 = 0;
    if ( !Folder::m_bInit )
      Folder::Init();
    v2 = Folder::Merge(&Folder::m_acEffect, "Toggle_SkillOn.nif");
    PgUtil::LoadNodeNifFile(v2, &pkNiNodePtr, 0);
    v3 = (SpEffect *)operator new(0x44u);
    LOBYTE(v9) = 1;
    if ( v3 )
    {
      v4 = (NiNode *)NiObject::Clone((NiObject *)&pkNiNodePtr.m_pObject->vfptr);
      SpEffect::SpEffect(v3, v4);
    }
    else
    {
      v5 = 0;
    }
    LOBYTE(v9) = 0;
    v1->m_pkToggleEffect = v5;
    ShortCutIconWin::StartToggleEffect(v1);
    v6 = pkNiNodePtr.m_pObject;
    v1->m_bEnableToggle = 1;
    v9 = -1;
    if ( v6 )
    {
      v7 = v6;
      if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      {
        if ( v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      }
    }
  }
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00585CA0) --------------------------------------------------------
void __thiscall ShortCutWin::ReflashHotKey(ShortCutWin *this)
{
  ShortCutWin *v1; // edi@1
  signed int v2; // esi@1
  signed int v3; // eax@5
  int v4; // ebx@6
  unsigned __int8 v5; // al@6
  const char *v6; // [sp-4h] [bp-114h]@3
  char numberResMeshName[256]; // [sp+Ch] [bp-104h]@4

  v1 = this;
  v2 = 0;
  do
  {
    if ( v2 > 11 )
    {
      ShortCutWin::SetHotKeyWin(v1, v2, "SmallNumTrans02");
      v6 = "SmallNumTrans01";
LABEL_19:
      ShortCutWin::SetHotKeyPlusWin(v1, v2, v6);
      goto LABEL_20;
    }
    numberResMeshName[0] = 0;
    memset(&numberResMeshName[1], 0, 0xFFu);
    switch ( v1->m_uiCurPage )
    {
      case 0u:
        v3 = 47;
        break;
      case 1u:
        v3 = 59;
        break;
      case 2u:
        v3 = 71;
        break;
      case 3u:
        v3 = 83;
        break;
      default:
        ShortCutWin::SetHotKeyWin(v1, v2, "SmallNumTrans02");
        v6 = "SmallNumTrans01";
        goto LABEL_19;
    }
    v4 = v3 + v2;
    v5 = HIBYTE(word_B4F5BA[4 * (v3 + v2)]);
    if ( !v5 )
    {
      ShortCutWin::SetHotKeyWin(v1, v2, "SmallNumTrans02");
      v6 = "SmallNumTrans01";
      goto LABEL_19;
    }
    sprintf(numberResMeshName, "%i", v5);
    ShortCutWin::SetHotKeyWin(v1, v2, numberResMeshName);
    if ( LOBYTE(word_B4F5BA[4 * v4]) == 16 )
    {
      v6 = "ShiftPlus";
      goto LABEL_19;
    }
    if ( LOBYTE(word_B4F5BA[4 * v4]) == 17 )
    {
      v6 = "CtrlPlus";
      goto LABEL_19;
    }
    if ( LOBYTE(word_B4F5BA[4 * v4]) == 18 )
      ShortCutWin::SetHotKeyPlusWin(v1, v2, "AltPlus");
    else
      ShortCutWin::SetHotKeyPlusWin(v1, v2, "SmallNumTrans01");
LABEL_20:
    ++v2;
  }
  while ( v2 < 18 );
}
// B4F5BA: using guessed type __int16 word_B4F5BA[];

//----- (00585DF0) --------------------------------------------------------
void __thiscall ShortCutWin::SetMHActionState(ShortCutWin *this, bool bMHEmotionStart)
{
  ShortCutWin *v2; // edi@1
  int v3; // esi@3
  IconWin **v4; // ebx@3
  NiNode *v5; // ecx@5
  unsigned int v6; // eax@7
  int v7; // eax@8
  int v8; // esi@9
  int v9; // edi@9
  char **v10; // eax@11
  char *v11; // eax@12
  double v12; // st7@17
  float fB; // ST0C_4@19
  float fG; // ST08_4@19
  float fR; // ST04_4@19
  unsigned __int16 *Info_8; // [sp+24h] [bp-10h]@3
  ShortCutWin *v17; // [sp+28h] [bp-Ch]@1
  int i; // [sp+2Ch] [bp-8h]@3
  int bEnable; // [sp+30h] [bp-4h]@0
  MHEmotion *pkEmotion; // [sp+3Ch] [bp+8h]@3

  v2 = this;
  v17 = this;
  LOBYTE(bEnable) = 0;
  if ( !bMHEmotionStart )
    LOBYTE(bEnable) = 1;
  v3 = 0;
  Info_8 = (unsigned __int16 *)unk_A99560;
  pkEmotion = 0;
  i = 0;
  v4 = (IconWin **)this->m_apkIconWin;
  while ( 1 )
  {
    v5 = (*v4)[1].m_pkParent;
    if ( v5 )
    {
      if ( ((int (*)(void))v5->vfptr[1].__vecDelDtor)() == 2 )
      {
        v6 = v3 + 18 * v2->m_uiCurPage;
        if ( v6 < 0x64 )
        {
          v7 = (int)*(&ptr + v6);
          if ( v7 )
          {
            v8 = ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;
            v9 = *(_DWORD *)(v7 + 8);
            if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable
                                                                  + 16))(
                                    ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable,
                                    v9) )
            {
              if ( (unsigned __int16)v9 <= *(_WORD *)(v8 + 200) )
              {
                v10 = (char **)(*(_DWORD *)(v8 + 196) + 4 * (unsigned __int16)v9);
                if ( *v10 )
                {
                  v11 = *v10;
                  if ( v11 )
                  {
                    if ( Info_8 )
                      pkEmotion = MiniHouseEmotionTab::GetNonMenuEmotion(*Info_8, *v11);
                    if ( !pkEmotion )
                    {
                      if ( (_BYTE)bEnable )
                        v12 = 1.0;
                      else
                        v12 = 0.44999999;
                      fB = v12;
                      fG = v12;
                      fR = v12;
                      IconWin::IconDisable(*v4, fR, fG, fB);
                      ((void (__stdcall *)(int))(*v4)->vfptr[60].__vecDelDtor)(bEnable);
                      LOBYTE((*v4)[1].m_kWorldBound.m_kCenter.y) = bEnable;
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
    v3 = i + 1;
    ++v4;
    i = v3;
    if ( v3 >= 18 )
      break;
    v2 = v17;
  }
}
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;

//----- (00585F40) --------------------------------------------------------
ShortCutIconWin *__cdecl ShortCutIconWin::CreateWin(int iXPos, int iYPos, unsigned int uiIndex, PgWin *pkParent)
{
  PgWin *v4; // eax@1
  PgWin *v5; // eax@2
  PgWin *v6; // esi@2
  PgWin *v7; // edi@8
  ShortCutIconWin *v8; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v10; // [sp+20h] [bp-4h]@1

  v4 = (PgWin *)operator new(0x1B8u);
  result.m_pObject = v4;
  v10 = 0;
  if ( v4 )
  {
    ShortCutIconWin::ShortCutIconWin((ShortCutIconWin *)v4);
    v6 = v5;
  }
  else
  {
    v6 = 0;
  }
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v10 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v6);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, PgWin *))v6->vfptr[153].__vecDelDtor)(
                          v6,
                          iXPos,
                          iYPos,
                          uiIndex,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v6->vfptr[89].__vecDelDtor)(v6);
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = (ShortCutIconWin *)v6;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v6);
    if ( result.m_pObject )
    {
      v7 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      }
    }
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = 0;
  }
  return v8;
}

//----- (00586080) --------------------------------------------------------
void __thiscall ShortCutWin::ShortCutWin(ShortCutWin *this)
{
  ShortCutWin *v1; // esi@1
  int v2; // eax@1
  signed int v3; // ecx@1
  int v4; // eax@1
  NiNode *v5; // edi@3
  char *v6; // ecx@8
  char *v7; // edi@8

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ShortCutWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ShortCutWin::`vftable'{for `IDirectMessenger'};
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  v1->m_kDrop.m_pkSender = 0;
  v2 = (int)&v1->m_kDropContents;
  *(_DWORD *)v2 = &DropContents::`vftable';
  *(_WORD *)(v2 + 60) = -1;
  *(_DWORD *)(v2 + 64) = 0;
  v1->m_spNumberNode.m_pObject = 0;
  v1->m_spNumberPosNode.m_pObject = 0;
  v1->m_vecToggleSkillID._Myfirst = 0;
  v1->m_vecToggleSkillID._Mylast = 0;
  v1->m_vecToggleSkillID._Myend = 0;
  v1->m_kDrop.m_pkContents = &v1->m_kDropContents;
  v1->m_uiCurPage = 0;
  *(_WORD *)&v1->m_bVerticalMode = 256;
  v1->m_pkSizeBtn = 0;
  v1->m_pkPanelTrunBut = 0;
  v1->m_pkSubPanelBut = 0;
  v1->m_iSubTabLevel = -1;
  v3 = 0;
  v4 = (int)v1->m_apkIconWinBack2;
  do
  {
    *(_DWORD *)(v4 - 72) = 0;
    *(_DWORD *)v4 = 0;
    *(_DWORD *)(v4 + 72) = 0;
    *(_DWORD *)(v4 + 144) = 0;
    *(_DWORD *)(v4 + 228) = 0;
    v1->m_bShowHotkey[v3++] = 1;
    v4 += 4;
  }
  while ( v3 < 18 );
  v1->m_bShowFlag = 0;
  v1->m_uiShortCutStatusIndex = 0;
  v5 = v1->m_spNumberPosNode.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spNumberPosNode.m_pObject = 0;
  }
  v1->m_pkDropcontents = 0;
  v1->m_uiRevIndex = 0;
  v1->m_bPremiumActive = 0;
  v6 = (char *)v1->m_vecToggleSkillID._Mylast;
  v7 = (char *)v1->m_vecToggleSkillID._Myfirst;
  if ( v7 != v6 )
  {
    memmove(v7, v6, 0);
    v1->m_vecToggleSkillID._Mylast = (unsigned __int16 *)v7;
  }
  v1->m_bToggleOn = 0;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9A1560: using guessed type void (__thiscall *ShortCutWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A157C: using guessed type int (__thiscall *ShortCutWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00586210) --------------------------------------------------------
void __thiscall ShortCutWin::~ShortCutWin(ShortCutWin *this)
{
  ShortCutWin *v1; // ebx@1
  int v2; // esi@2
  int v3; // edi@3
  DropContents *v4; // ecx@9
  char *v5; // ecx@12
  char *v6; // esi@12
  NiNode *v7; // esi@16
  NiNode *v8; // esi@20
  signed int v9; // [sp+18h] [bp-14h]@1
  char *v10; // [sp+1Ch] [bp-10h]@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ShortCutWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ShortCutWin::`vftable'{for `IDirectMessenger'};
  v10 = (char *)this->m_apkCoolTimeOverEffect;
  v9 = 18;
  do
  {
    v2 = *(_DWORD *)v10;
    if ( *(_DWORD *)v10 )
    {
      NsEffect::~NsEffect((NsEffect *)(v2 + 28));
      ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)(v2 + 4));
      v3 = *(_DWORD *)v2;
      if ( *(_DWORD *)v2 && !InterlockedDecrement((volatile LONG *)(v3 + 4)) && v3 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v3)(v3, 1);
      operator delete((void *)v2);
    }
    v10 += 4;
    --v9;
  }
  while ( v9 );
  v4 = v1->m_pkDropcontents;
  if ( v4 )
    ((void (__stdcall *)(signed int))v4->vfptr->__vecDelDtor)(1);
  v1->m_bPremiumActive = 0;
  if ( ((char *)v1->m_vecToggleSkillID._Mylast - (char *)v1->m_vecToggleSkillID._Myfirst) & 0xFFFFFFFE )
  {
    v5 = (char *)v1->m_vecToggleSkillID._Mylast;
    v6 = (char *)v1->m_vecToggleSkillID._Myfirst;
    if ( v6 != v5 )
    {
      memmove(v6, v5, 0);
      v1->m_vecToggleSkillID._Mylast = (unsigned __int16 *)v6;
    }
  }
  if ( v1->m_vecToggleSkillID._Myfirst )
    operator delete(v1->m_vecToggleSkillID._Myfirst);
  v1->m_vecToggleSkillID._Myfirst = 0;
  v1->m_vecToggleSkillID._Mylast = 0;
  v1->m_vecToggleSkillID._Myend = 0;
  v7 = v1->m_spNumberPosNode.m_pObject;
  if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  v8 = v1->m_spNumberNode.m_pObject;
  if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
    v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
  v1->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9A1560: using guessed type void (__thiscall *ShortCutWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A157C: using guessed type int (__thiscall *ShortCutWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005863D0) --------------------------------------------------------
ShortCutWin *__cdecl ShortCutWin::CreateWin(PgFrameWork *pkFrameWork, int bVertical)
{
  PgWin *v2; // eax@1
  PgWin *v3; // eax@2
  PgWin *v4; // esi@2
  PgWin *v5; // edi@8
  ShortCutWin *v6; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v2 = (PgWin *)operator new(0x468u);
  result.m_pObject = v2;
  v8 = 0;
  if ( v2 )
  {
    ShortCutWin::ShortCutWin((ShortCutWin *)v2);
    v4 = v3;
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v8 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v4);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, PgFrameWork *, int, signed int, signed int))v4->vfptr[135].__vecDelDtor)(
                          v4,
                          pkFrameWork,
                          bVertical,
                          1,
                          -1) )
  {
    ((void (__thiscall *)(PgWin *))v4->vfptr[89].__vecDelDtor)(v4);
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = (ShortCutWin *)v4;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v4);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = 0;
  }
  return v6;
}

//----- (00586510) --------------------------------------------------------
ShortCutWin *__cdecl ShortCutWin::CreateSubWin(PgFrameWork *pkFrameWork, int bVertical, int tabLevel)
{
  PgWin *v3; // eax@1
  PgWin *v4; // eax@2
  PgWin *v5; // esi@2
  PgWin *v6; // edi@8
  ShortCutWin *v7; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x468u);
  result.m_pObject = v3;
  v9 = 0;
  if ( v3 )
  {
    ShortCutWin::ShortCutWin((ShortCutWin *)v3);
    v5 = v4;
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v9 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v5);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, PgFrameWork *, int, _DWORD, int))v5->vfptr[135].__vecDelDtor)(
                          v5,
                          pkFrameWork,
                          bVertical,
                          0,
                          tabLevel) )
  {
    ((void (__thiscall *)(PgWin *))v5->vfptr[89].__vecDelDtor)(v5);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = (ShortCutWin *)v5;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v5);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = 0;
  }
  return v7;
}

//----- (00586650) --------------------------------------------------------
void __thiscall ShortCutWin::OffToggleKey(ShortCutWin *this, unsigned __int16 kOffID)
{
  ShortCutWin *v2; // edi@1
  unsigned __int16 *v3; // ecx@1
  unsigned int v4; // eax@1
  unsigned int v5; // edx@2
  SkillIcon **v6; // esi@5
  signed int v7; // ebx@5
  unsigned __int16 v8; // ax@6
  unsigned int v9; // eax@8
  unsigned int i; // [sp+4h] [bp-4h]@2

  v2 = this;
  this->m_bToggleOn = 0;
  v3 = this->m_vecToggleSkillID._Myfirst;
  v4 = v2->m_vecToggleSkillID._Mylast - v3;
  if ( v4 )
  {
    v5 = 0;
    i = 0;
    if ( v4 )
    {
      if ( v4 <= 0 )
        std::_Xout_of_range("invalid vector<T> subscript");
      do
      {
        if ( v3[v5] == kOffID )
        {
          v6 = (SkillIcon **)v2->m_apkIconWin;
          v7 = 18;
          do
          {
            v8 = SkillIcon::GetSkill(*v6);
            if ( v8 != -1 && v8 == kOffID )
            {
              v9 = (*v6)[1].m_uiExtraDataSize;
              if ( v9 )
              {
                if ( *(_BYTE *)(v9 + 64) )
                  *(_BYTE *)(v9 + 65) = 0;
              }
            }
            ++v6;
            --v7;
          }
          while ( v7 );
          memmove(
            (char *)&v2->m_vecToggleSkillID._Myfirst[i],
            (char *)&v2->m_vecToggleSkillID._Myfirst[i + 1],
            2 * (v2->m_vecToggleSkillID._Mylast - &v2->m_vecToggleSkillID._Myfirst[i + 1]));
          v5 = i;
          --v2->m_vecToggleSkillID._Mylast;
        }
        v3 = v2->m_vecToggleSkillID._Myfirst;
        i = ++v5;
      }
      while ( v2->m_vecToggleSkillID._Mylast - v3 > v5 );
    }
  }
}

//----- (00586740) --------------------------------------------------------
void __thiscall ShortCutIconWin::UpdateMeWin(ShortCutIconWin *this, float fCurTime)
{
  ShortCutIconWin *v2; // edi@1
  ShortCut *v3; // ecx@1
  int v4; // ebx@3
  ActiveSkillInfo *v5; // esi@6
  signed int v6; // eax@9
  int v7; // eax@13
  SkillIcon *v8; // ecx@15
  double v9; // st7@16
  signed int v10; // eax@17
  ShortCut *v11; // eax@23
  unsigned __int16 v12; // ax@24
  ShortCut *v13; // eax@28
  NiRefObjectVtbl *v14; // eax@29
  ShortCut *v15; // esi@31
  ActionViewInfo *v16; // eax@32
  ActionType v17; // eax@33
  unsigned int v18; // esi@35
  NiRefObjectVtbl *v19; // esi@38
  int v20; // eax@39
  char v21; // al@43
  float rad; // ST00_4@48
  float green; // [sp+4h] [bp-40h]@16
  float v24; // [sp+8h] [bp-3Ch]@16
  float fCurTimea; // [sp+Ch] [bp-38h]@16
  std::list<enum ABSTATEINDEX,std::allocator<enum ABSTATEINDEX> > tempList; // [sp+20h] [bp-24h]@11
  int iSP; // [sp+2Ch] [bp-18h]@6
  Skill::EmpowerInfo kEmpowerInfo; // [sp+30h] [bp-14h]@12
  GameFrameWork *pkGame; // [sp+34h] [bp-10h]@7
  int v30; // [sp+40h] [bp-4h]@11

  v2 = this;
  IconWin::UpdateMeWin((IconWin *)&this->vfptr, fCurTime);
  v3 = v2->m_spShortCut.m_pObject;
  if ( !v3 )
    return;
  if ( ((int (*)(void))v3->vfptr[1].__vecDelDtor)() != 1 )
  {
    if ( ((int (*)(void))v2->m_spShortCut.m_pObject->vfptr[1].__vecDelDtor)() == 4 )
    {
      v11 = v2->m_spShortCut.m_pObject;
      if ( !v11 )
        return;
      v12 = v11[1].m_uiRefCount;
      if ( v12 != -1 )
      {
        if ( Inventory::GetItemByID(&g_kInventory, v12) )
          return;
        goto LABEL_26;
      }
    }
    else if ( ((int (*)(void))v2->m_spShortCut.m_pObject->vfptr[1].__vecDelDtor)() == 5 )
    {
      v13 = v2->m_spShortCut.m_pObject;
      if ( !v13 )
        return;
      v14 = v13[1].vfptr;
    }
    else
    {
      if ( ((int (*)(void))v2->m_spShortCut.m_pObject->vfptr[1].__vecDelDtor)() != 2 )
        return;
      v15 = v2->m_spShortCut.m_pObject;
      if ( !v15 )
        return;
      v16 = IIDTableBase<ActionViewInfo,ActionViewTable,unsigned short>::GetByID((int)v15[1].vfptr);
      if ( !v16 )
        return;
      v17 = v16->eActionType;
      if ( v17 )
      {
        if ( v17 != 2 )
          return;
        v18 = (unsigned int)v15[2].vfptr;
        if ( v18 >= 0x2A || !g_kInventory.m_aspPremiumActionInv[v18].m_pObject )
        {
          fCurTimea = 128.0;
          v9 = 0.0;
          goto LABEL_46;
        }
      }
      else
      {
        v19 = v15[2].vfptr;
        if ( v19 == (NiRefObjectVtbl *)8 )
        {
          v20 = User::HPStone(&g_kUser);
          v8 = (SkillIcon *)v2;
          if ( v20 )
          {
            v9 = 0.0;
            fCurTimea = 0.0;
            v24 = 0.0;
            green = 0.0;
          }
          else
          {
            fCurTimea = 128.0;
            v9 = 0.0;
            v24 = 0.0;
            green = 0.0;
          }
          goto LABEL_48;
        }
        if ( v19 != (NiRefObjectVtbl *)9 )
          return;
        v21 = User::GetMainCharClass(&g_kUser);
        if ( CharClass::GetBaseClassID(v21) != 26 && !User::SPStone(&g_kUser) )
          goto LABEL_26;
      }
    }
    v9 = 0.0;
    fCurTimea = 0.0;
    goto LABEL_46;
  }
  v4 = LOWORD(v2->m_spShortCut.m_pObject[1].vfptr);
  if ( (_WORD)v4 == -1 )
    return;
  if ( (unsigned __int8)Skill::IsProduceBaseSkill((unsigned __int16)v2->m_spShortCut.m_pObject[1].vfptr) == 1
    && !Skill::IsLearnProdSkill(v4) )
  {
LABEL_26:
    fCurTimea = 128.0;
    v9 = 0.0;
LABEL_46:
    v24 = v9;
    green = v9;
    goto LABEL_47;
  }
  iSP = User::SP(&g_kUser);
  v5 = IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::GetByID(v4);
  if ( !v5 )
    return;
  pkGame = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( pkGame )
  {
    if ( !AbStateInfectee::IsInList((AbStateInfectee *)&g_pkMainChar->vfptr, STA_SOULFREE) )
    {
      BYTE3(fCurTime) = v5->DemandSoul;
      v6 = GameFrameWork::GetSoulCount(pkGame);
      if ( v6 < BYTE3(fCurTime) )
      {
        if ( BYTE3(fCurTime) )
        {
LABEL_21:
          fCurTimea = 128.0;
          v24 = 0.0;
          green = 0.0;
          v9 = 255.0;
LABEL_47:
          v8 = (SkillIcon *)v2;
          goto LABEL_48;
        }
      }
    }
    std::list<enum  ABSTATEINDEX,std::allocator<enum  ABSTATEINDEX>>::list<enum  ABSTATEINDEX,std::allocator<enum  ABSTATEINDEX>>(&tempList);
    v30 = 0;
    LODWORD(fCurTime) = 349;
    std::list<enum  ABSTATEINDEX,std::allocator<enum  ABSTATEINDEX>>::push_back(&tempList, (ABSTATEINDEX *)&fCurTime);
    LODWORD(fCurTime) = 346;
    std::list<enum  ABSTATEINDEX,std::allocator<enum  ABSTATEINDEX>>::push_back(&tempList, (ABSTATEINDEX *)&fCurTime);
    v30 = -1;
    std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~list<ItemViewDummy *,std::allocator<ItemViewDummy *>>((std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)&tempList);
  }
  fCurTime = *(float *)&v5->SP;
  Skill::GetAccumulatedEmpowerInfo(&kEmpowerInfo, v4);
  if ( kEmpowerInfo.cSmallSp )
    v7 = LODWORD(fCurTime) - v5->nT0[kEmpowerInfo.cSmallSp + 4];
  else
    v7 = LODWORD(fCurTime);
  v8 = (SkillIcon *)v2;
  if ( iSP < v7
    || (SkillIcon::SetTopPlaneColor((SkillIcon *)&v2->vfptr, 255.0, 0.0, 0.0, 0.0),
        v10 = User::LP(&g_kUser),
        v8 = (SkillIcon *)v2,
        v10 < (signed int)v5->LP) )
  {
    fCurTimea = 128.0;
    v24 = 0.0;
    green = 0.0;
    v9 = 255.0;
LABEL_48:
    rad = v9;
    SkillIcon::SetTopPlaneColor(v8, rad, green, v24, fCurTimea);
    return;
  }
  SkillIcon::SetTopPlaneColor((SkillIcon *)&v2->vfptr, 255.0, 0.0, 0.0, 0.0);
  Char::GetEquipWeaponType(g_pkMainChar);
  if ( !Inventory::IsDemandType(&g_kInventory, v5->DemandType)
    || AbStateInfectee::IsInList((AbStateInfectee *)&g_pkMainChar->vfptr, STA_REVERSEORDER)
    || AbStateInfectee::IsInList((AbStateInfectee *)&g_pkMainChar->vfptr, STA_GTIREVERSEORDER) )
  {
    goto LABEL_21;
  }
}

//----- (00586B30) --------------------------------------------------------
void __thiscall ShortCutWin::OnToggleKey(ShortCutWin *this, unsigned __int16 kOnID)
{
  ShortCutWin *v2; // ebx@1
  std::vector<unsigned short,std::allocator<unsigned short> > *v3; // esi@1
  unsigned __int16 *v4; // edi@1
  unsigned int v5; // eax@1
  unsigned int v6; // ecx@2
  unsigned int v7; // eax@8
  unsigned __int16 *v8; // edx@9
  unsigned __int16 *v9; // ecx@10
  int v10; // edi@10
  unsigned int v11; // eax@11
  unsigned int v12; // eax@14
  unsigned int v13; // ecx@14
  unsigned int v14; // ecx@16
  unsigned __int16 *v15; // eax@21
  unsigned __int16 *v16; // ecx@24
  unsigned int v17; // eax@25
  unsigned int v18; // eax@27
  unsigned int v19; // ecx@27
  unsigned int v20; // ecx@29
  unsigned __int16 *v21; // eax@34
  SkillIcon **v22; // esi@38
  signed int v23; // edi@38
  unsigned __int16 v24; // ax@39
  ShortCutWin *v25; // [sp+Ch] [bp-4h]@1

  v2 = this;
  v3 = &this->m_vecToggleSkillID;
  v4 = this->m_vecToggleSkillID._Myfirst;
  v5 = this->m_vecToggleSkillID._Mylast - v4;
  v25 = this;
  if ( !v5 )
  {
    std::vector<unsigned short,std::allocator<unsigned short>>::push_back(&this->m_vecToggleSkillID, &kOnID);
LABEL_38:
    v2->m_bToggleOn = 1;
    v22 = (SkillIcon **)v2->m_apkIconWin;
    v23 = 18;
    do
    {
      v24 = SkillIcon::GetSkill(*v22);
      if ( v24 != -1 && v24 == kOnID )
        ShortCutIconWin::CreateToggleEffect((ShortCutIconWin *)*v22);
      ++v22;
      --v23;
    }
    while ( v23 );
    return;
  }
  v6 = 0;
  if ( !v5 )
  {
LABEL_8:
    v7 = (unsigned int)v3->_Mylast;
    if ( (unsigned int)&kOnID >= v7 || (v8 = v3->_Myfirst, v3->_Myfirst > &kOnID) )
    {
      v16 = v3->_Myend;
      if ( (unsigned __int16 *)v7 == v16 )
      {
        v17 = (signed int)(v7 - (unsigned int)v3->_Myfirst) >> 1;
        if ( v17 > 0x7FFFFFFE )
          std::_Xlength_error("vector<T> too long");
        v18 = v17 + 1;
        v19 = v16 - v3->_Myfirst;
        if ( v18 > v19 )
        {
          if ( 0x7FFFFFFF - (v19 >> 1) >= v19 )
            v20 = (v19 >> 1) + v19;
          else
            v20 = 0;
          if ( v20 < v18 )
            v20 = v18;
          std::vector<unsigned short,std::allocator<unsigned short>>::reserve(v3, v20);
        }
      }
      v21 = v3->_Mylast;
      if ( v21 )
        *v21 = kOnID;
      ++v3->_Mylast;
    }
    else
    {
      v9 = v3->_Myend;
      v10 = &kOnID - v8;
      if ( (unsigned __int16 *)v7 == v9 )
      {
        v11 = (signed int)(v7 - (_DWORD)v8) >> 1;
        if ( v11 > 0x7FFFFFFE )
          std::_Xlength_error("vector<T> too long");
        v12 = v11 + 1;
        v13 = v9 - v8;
        if ( v12 > v13 )
        {
          if ( 0x7FFFFFFF - (v13 >> 1) >= v13 )
            v14 = (v13 >> 1) + v13;
          else
            v14 = 0;
          if ( v14 < v12 )
            v14 = v12;
          std::vector<unsigned short,std::allocator<unsigned short>>::reserve(v3, v14);
          v2 = v25;
        }
      }
      v15 = v3->_Mylast;
      if ( v15 )
        *v15 = v3->_Myfirst[v10];
      ++v3->_Mylast;
    }
    goto LABEL_38;
  }
  if ( v5 <= 0 )
    std::_Xout_of_range("invalid vector<T> subscript");
  while ( *v4 == -1 || kOnID != *v4 )
  {
    ++v6;
    ++v4;
    if ( v5 <= v6 )
    {
      v2 = v25;
      goto LABEL_8;
    }
  }
}

//----- (00586CB0) --------------------------------------------------------
char __thiscall ShortCutIconWin::Create(ShortCutIconWin *this, int iXPos, int iYPos, unsigned int uiIndex, PgWin *pkParent)
{
  ShortCutIconWin *v5; // esi@1
  char result; // al@1
  PgFont *v7; // eax@2
  PgWinText *v8; // eax@2

  v5 = this;
  result = SkillIcon::Create((SkillIcon *)&this->vfptr, iXPos, iYPos, pkParent);
  if ( result )
  {
    v5->m_uiIndex = uiIndex;
    v7 = Font::Get(0);
    v8 = PgWinText::CreateWin(18, 20, 0xEu, 0xCu, v7, (PgWin *)&v5->vfptr, 0, 0);
    v5->m_pkLotText = v8;
    v8->vfptr[122].__vecDelDtor((NiRefObject *)v8, 2u);
    pkParent = (PgWin *)v5;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      &IconWin::ms_kCoolTimeIconList,
      (const unsigned int *)&pkParent);
    result = 1;
  }
  return result;
}

//----- (00586D30) --------------------------------------------------------
char __thiscall ShortCutWin::OnDrop(ShortCutWin *this, DropContents *pkContents, unsigned int uiRevIndex)
{
  DropContents::SenderType v3; // eax@2
  unsigned int v4; // ebx@8
  _DWORD *v5; // edi@11
  int v6; // eax@13
  ItemUseTask *v7; // edi@15
  int v8; // eax@16
  DropContents *v9; // eax@19
  char result; // al@24
  ShortCutInvPosItem *v11; // eax@26
  ShortCut *v12; // eax@27
  ShortCutItem *v13; // eax@29
  ShortCutItem *v14; // eax@31
  ShortCutItem *v15; // edi@31
  Item *v16; // ST38_4@33
  ShortCutItem *v17; // eax@35
  ShortCutItem *v18; // eax@36
  ShortCutItem *v19; // edi@36
  Item *v20; // ST38_4@38
  ShortCut *v21; // eax@42
  void *v22; // ecx@44
  ShortCutInvPosItem *v23; // eax@46
  unsigned int v24; // ecx@47
  ShortCutAction *v25; // eax@51
  ShortCut *v26; // eax@58
  unsigned int v27; // esi@61
  Item *v28; // ecx@62
  ShortCutInvPosItem *v29; // eax@64
  ShortCut *v30; // eax@70
  ShortCutSkill *v31; // eax@72
  int v32; // eax@73
  __int16 v33; // dx@75
  TutorialMgr *v34; // eax@75
  int v35; // eax@75
  CClientQuest *v36; // eax@75
  ActiveSkillInfo *v37; // ebx@75
  unsigned __int16 *v38; // ecx@75
  int v39; // edi@75
  unsigned int v40; // eax@75
  int v41; // eax@77
  ActiveSkillInfo *v42; // eax@78
  ActiveSkillInfo *v43; // esi@78
  ShortCut *v44; // eax@89
  ShortCutAction *v45; // eax@91
  PgFrameWork *v46; // ecx@97
  unsigned int v47; // [sp-8h] [bp-434h]@27
  bool v48; // [sp-4h] [bp-430h]@27
  ShortCutWin *v49; // [sp+10h] [bp-41Ch]@1
  char acConversionData2[256]; // [sp+1Ch] [bp-410h]@80
  char acConversionData1[256]; // [sp+11Ch] [bp-310h]@80
  char acSkillName2[256]; // [sp+21Ch] [bp-210h]@80
  char acSkillName[256]; // [sp+31Ch] [bp-110h]@80
  int v54; // [sp+428h] [bp-4h]@26

  v49 = this;
  if ( !pkContents || (v3 = pkContents->m_eSenderType) != 0 && v3 != 1 && v3 != 2 && v3 != 4 && v3 != 9 && v3 != 21 )
  {
LABEL_24:
    result = 0;
  }
  else
  {
    v4 = pkContents->m_uiSenderIndex;
    switch ( pkContents->m_eType )
    {
      case 0:
        if ( pkContents->m_apvParam[1] == (void *)1 )
          goto LABEL_24;
        if ( v3 == ST_INV_CHAR )
        {
          v5 = pkContents->m_apvParam[0];
          if ( !v5 )
            goto LABEL_24;
          if ( (unsigned __int8)(*(int (__thiscall **)(void *))(*v5 + 4))(pkContents->m_apvParam[0]) == 27 )
          {
            v6 = v5[28];
            if ( !v6 )
              goto LABEL_24;
            if ( *(_DWORD *)(v6 + 98) == 1 )
            {
              v7 = ISingletonTask<ItemUseTask>::Run();
              ItemUseTask::SetInventoryIndex(v7, v4);
              if ( v49 )
                v8 = (int)&v49->vfptr;
              else
                v8 = 0;
              v7->vfptr->SetMsgHooker(&v7->vfptr, v8);
              if ( !v49->m_pkDropcontents )
              {
                v9 = (DropContents *)operator new(0x48u);
                if ( v9 )
                {
                  v9->vfptr = (DropContentsVtbl *)&DropContents::`vftable';
                  *(_DWORD *)&v9->m_kItemID = 0xFFFF;
                }
                else
                {
                  v9 = 0;
                }
                v49->m_pkDropcontents = v9;
              }
              v49->m_pkDropcontents = pkContents;
              v49->m_uiRevIndex = uiRevIndex;
              goto LABEL_24;
            }
          }
          if ( (unsigned __int8)(*(int (__thiscall **)(_DWORD *))(*v5 + 4))(v5) != 24 )
          {
            v13 = (ShortCutItem *)operator new(0x10u);
            v54 = 1;
            goto LABEL_30;
          }
          v11 = (ShortCutInvPosItem *)operator new(0xCu);
          v54 = 0;
          if ( v11 )
          {
            ShortCutInvPosItem::ShortCutInvPosItem(v11);
            v48 = 1;
            v12[1].vfptr = (NiRefObjectVtbl *)v4;
            v47 = uiRevIndex;
          }
          else
          {
            v12 = 0;
            v48 = 1;
            ::v8 = v4;
            v47 = uiRevIndex;
          }
          goto LABEL_96;
        }
        if ( v3 == 1 )
        {
          v17 = (ShortCutItem *)operator new(0x10u);
          v54 = 2;
          if ( v17 )
          {
            ShortCutItem::ShortCutItem(v17);
            v19 = v18;
          }
          else
          {
            v19 = 0;
          }
          v20 = (Item *)pkContents->m_apvParam[0];
          v54 = -1;
          ShortCutItem::SetItem(v19, v20);
          ShortCutMgr::SetShortCut(&g_kShortCutMgr, (ShortCut *)&v19->vfptr, uiRevIndex, 1);
          goto LABEL_97;
        }
        if ( v3 == 2 )
          goto LABEL_24;
        if ( v3 != 4 )
        {
          if ( v3 != 21 )
            goto LABEL_97;
          v25 = (ShortCutAction *)operator new(0x14u);
          v54 = 5;
          if ( v25 )
            ShortCutAction::ShortCutAction(v25);
          else
            v12 = 0;
          v12[2].vfptr = (NiRefObjectVtbl *)pkContents->m_apvParam[2];
          v12[1].m_uiRefCount = 0;
          v48 = 1;
          v12[1].vfptr = (NiRefObjectVtbl *)pkContents->nTableIndexNum;
          v47 = uiRevIndex;
          goto LABEL_96;
        }
        if ( uiRevIndex < 0x64 )
        {
          v21 = (ShortCut *)*(&ptr + uiRevIndex);
          if ( v21 )
            ShortCutMgr::SetShortCut(&g_kShortCutMgr, v21, v4, 1);
        }
        v22 = pkContents->m_apvParam[0];
        if ( !v22 )
          goto LABEL_24;
        if ( (unsigned __int8)(*(int (**)(void))(*(_DWORD *)v22 + 4))() != 24 )
        {
          v13 = (ShortCutItem *)operator new(0x10u);
          v54 = 4;
          goto LABEL_30;
        }
        v23 = (ShortCutInvPosItem *)operator new(0xCu);
        v54 = 3;
        if ( v23 )
        {
          ShortCutInvPosItem::ShortCutInvPosItem(v23);
          v24 = pkContents->ui_InvIndex;
          v48 = 1;
          v47 = v4;
        }
        else
        {
          v24 = pkContents->ui_InvIndex;
          v48 = 1;
          v12 = 0;
          v47 = v4;
        }
        goto LABEL_95;
      case 6:
        if ( pkContents->m_apvParam[1] == (void *)1 || v3 != 4 )
          goto LABEL_24;
        if ( uiRevIndex < 0x64 )
        {
          v26 = (ShortCut *)*(&ptr + uiRevIndex);
          if ( v26 )
            ShortCutMgr::SetShortCut(&g_kShortCutMgr, v26, v4, 1);
        }
        if ( (unsigned __int8)(*(int (**)(void))(*(_DWORD *)pkContents->m_apvParam[0] + 4))() == 24 )
        {
          v27 = pkContents->ui_InvIndex;
          if ( v27 >= 0xC0 )
            goto LABEL_24;
          v28 = g_kInventory.m_aspInv[v27].m_pObject;
          if ( !v28 || (unsigned __int8)((int (*)(void))v28->vfptr[1].__vecDelDtor)() != 24 )
            goto LABEL_24;
          v29 = (ShortCutInvPosItem *)operator new(0xCu);
          v54 = 6;
          if ( v29 )
          {
            ShortCutInvPosItem::ShortCutInvPosItem(v29);
            v48 = 1;
            v12[1].vfptr = (NiRefObjectVtbl *)v27;
            v47 = uiRevIndex;
          }
          else
          {
            v12 = 0;
            v48 = 1;
            ::v8 = v27;
            v47 = uiRevIndex;
          }
LABEL_96:
          v54 = -1;
          ShortCutMgr::SetShortCut(&g_kShortCutMgr, v12, v47, v48);
        }
        else
        {
          v13 = (ShortCutItem *)operator new(0x10u);
          v54 = 7;
LABEL_30:
          if ( v13 )
          {
            ShortCutItem::ShortCutItem(v13);
            v15 = v14;
          }
          else
          {
            v15 = 0;
          }
          v16 = (Item *)pkContents->m_apvParam[0];
          v54 = -1;
          ShortCutItem::SetItem(v15, v16);
          ShortCutMgr::SetShortCut(&g_kShortCutMgr, (ShortCut *)&v15->vfptr, uiRevIndex, 1);
        }
        goto LABEL_97;
      case 1:
        if ( v3 == 4 && uiRevIndex < 0x64 )
        {
          v30 = (ShortCut *)*(&ptr + uiRevIndex);
          if ( v30 )
            ShortCutMgr::SetShortCut(&g_kShortCutMgr, v30, v4, 1);
        }
        v31 = (ShortCutSkill *)operator new(0xCu);
        v54 = 8;
        if ( v31 )
          ShortCutSkill::ShortCutSkill(v31);
        else
          v32 = 0;
        v33 = (__int16)pkContents->m_apvParam[0];
        v54 = -1;
        *(_WORD *)(v32 + 8) = v33;
        ShortCutMgr::SetShortCut(&g_kShortCutMgr, (ShortCut *)v32, uiRevIndex, 1);
        v34 = TutorialMgr::GetTutorialMgr();
        TutorialMgr::OnShortCutSkill(v34);
        Singleton<Tutorial>::getInstance();
        *(_BYTE *)(v35 + 10) = 1;
        v36 = QuestDataMgr::GetQuest();
        CQuest::Send_NC_QUEST_CLIENT_SCENARIO_DONE_REQ((CQuest *)&v36->vfptr, 9);
        v37 = IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::GetByID((int)pkContents->m_apvParam[0]);
        v38 = v49->m_vecToggleSkillID._Myfirst;
        v39 = 0;
        v40 = v49->m_vecToggleSkillID._Mylast - v38;
        if ( !v40 )
          goto LABEL_97;
        if ( v40 <= 0 )
          std::_Xout_of_range("invalid vector<T> subscript");
        return result;
      case 3:
        if ( v3 == 4 && uiRevIndex < 0x64 )
        {
          v44 = (ShortCut *)*(&ptr + uiRevIndex);
          if ( v44 )
            ShortCutMgr::SetShortCut(&g_kShortCutMgr, v44, v4, 1);
        }
        v45 = (ShortCutAction *)operator new(0x14u);
        v54 = 9;
        if ( v45 )
          ShortCutAction::ShortCutAction(v45);
        else
          v12 = 0;
        v12[2].vfptr = (NiRefObjectVtbl *)pkContents->m_apvParam[0];
        v12[1].m_uiRefCount = pkContents->m_uiSenderIndex;
        v24 = pkContents->nTableIndexNum;
        v48 = 1;
        v47 = uiRevIndex;
LABEL_95:
        v12[1].vfptr = (NiRefObjectVtbl *)v24;
        goto LABEL_96;
      default:
        goto LABEL_97;
    }
    while ( 1 )
    {
      v41 = v38[v39];
      if ( (_WORD)v41 != -1 )
      {
        v42 = IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::GetByID(v41);
        v43 = v42;
        if ( v37 )
        {
          if ( v42 )
          {
            acSkillName[0] = 0;
            memset(&acSkillName[1], 0, 0xFFu);
            acConversionData1[0] = 0;
            memset(&acConversionData1[1], 0, 0xFFu);
            acSkillName2[0] = 0;
            memset(&acSkillName2[1], 0, 0xFFu);
            acConversionData2[0] = 0;
            memset(&acConversionData2[1], 0, 0xFFu);
            sprintf(acSkillName, "%s", v37->InxName);
            strncpy(acConversionData1, acSkillName, strlen(acSkillName) - 2);
            sprintf(acSkillName2, "%s", v43->InxName);
            strncpy(acConversionData2, acSkillName2, strlen(acSkillName2) - 2);
            if ( !strcmp(acConversionData1, acConversionData2) )
              break;
          }
        }
      }
      v38 = v49->m_vecToggleSkillID._Myfirst;
      if ( v49->m_vecToggleSkillID._Mylast - v38 <= (unsigned int)++v39 )
        goto LABEL_97;
    }
    if ( uiRevIndex <= 0x12 )
      ShortCutIconWin::CreateToggleEffect(v49->m_apkIconWin[uiRevIndex]);
    else
      ShortCutIconWin::CreateToggleEffect(*((ShortCutIconWin **)&v49->m_pcToolTipWinText + uiRevIndex));
LABEL_97:
    v46 = v49->m_pkFrameWork;
    if ( v46 )
      PgFrameWork::AddMsg(v46, 0x8Bu, 0, 0);
    SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_CLICK);
    result = 1;
  }
  return result;
}
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);

//----- (00587490) --------------------------------------------------------
void __thiscall ShortCutIconWin::SetItemIcon(ShortCutIconWin *this)
{
  ShortCutIconWin *v1; // esi@1
  ShortCut *v2; // ecx@1
  int v3; // eax@3
  ShortCut *v4; // eax@4
  unsigned int v5; // ebx@5
  ItemViewInfo *v6; // eax@6
  NiRefObjectVtbl *v7; // edi@7
  float v8; // ST04_4@7
  NiSourceTexture *v9; // eax@7
  Item *v10; // edi@7
  NiRefObjectVtbl **v11; // eax@9
  NiRefObjectVtbl *v12; // ST24_4@10
  char *v13; // eax@10
  PgWinText *v14; // ecx@11
  ActiveSkillInfo *v15; // eax@13
  ActionEffectItem *v16; // eax@15
  ItemAction *v17; // eax@16
  PgWinText *v18; // ecx@18
  ShortCut *v19; // eax@22
  unsigned int v20; // eax@23
  Item *v21; // edi@24
  PgWinText *v22; // ecx@25
  int v23; // ebx@27
  PgWinText *v24; // ecx@29
  ItemViewInfo *v25; // eax@31
  NiRefObjectVtbl *v26; // ebx@32
  float v27; // ST04_4@32
  NiSourceTexture *v28; // eax@32
  NiRefObjectVtbl **v29; // eax@33
  NiRefObjectVtbl *v30; // ebx@34
  char *v31; // eax@34
  PgWinText *v32; // ecx@35
  ActiveSkillInfo *v33; // eax@37
  PgWinText *v34; // ecx@39
  float rad; // [sp+0h] [bp-54h]@28
  float green; // [sp+4h] [bp-50h]@28
  float v37; // [sp+8h] [bp-4Ch]@28
  float alpha; // [sp+Ch] [bp-48h]@28
  int v39; // [sp+10h] [bp-44h]@0
  int iLot; // [sp+20h] [bp-34h]@7
  int v41; // [sp+24h] [bp-30h]@32
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strUseSkillName; // [sp+28h] [bp-2Ch]@15
  int v43; // [sp+50h] [bp-4h]@15

  v1 = this;
  this->m_bDisplayLotText = 1;
  IconWin::SetCoolTimeID((IconWin *)&this->vfptr, 0xFFFFu);
  IconWin::SetCoolTimeIDByItemAction((IconWin *)&v1->vfptr, 0xFFFFu);
  v2 = v1->m_spShortCut.m_pObject;
  if ( !v2 )
  {
    ((void (__thiscall *)(ShortCutIconWin *, _DWORD, signed int, signed int, signed int))v1->vfptr[146].__vecDelDtor)(
      v1,
      0,
      -1,
      32,
      32);
    return;
  }
  v3 = ((int (*)(void))v2->vfptr[1].__vecDelDtor)();
  if ( v3 != 4 )
  {
    if ( v3 == 5 && !v1->m_bLock )
    {
      v19 = v1->m_spShortCut.m_pObject;
      if ( !v19 )
      {
        ShortCutIconWin::SetShortCut(v1, 0);
        v34 = v1->m_pkLotText;
        if ( v34 )
        {
          ((void (__stdcall *)(void *))v34->vfptr[118].__vecDelDtor)(&unk_9A0DC7);
          ((void (__stdcall *)(_DWORD))v1->m_pkLotText->vfptr[64].__vecDelDtor)(0);
        }
        goto LABEL_41;
      }
      v20 = (unsigned int)v19[1].vfptr;
      if ( v20 < 0xC0 && (v21 = g_kInventory.m_aspInv[v20].m_pObject) != 0 )
      {
        v23 = v21->m_kStruct.itemid;
        if ( (_WORD)v23 == -1 )
          return;
        alpha = 0.0;
        v37 = 0.0;
        green = 0.0;
        rad = 0.0;
        if ( (unsigned __int8)((int (__thiscall *)(Item *))v21->vfptr[1].__vecDelDtor)(v21) == 24 )
        {
          SkillIcon::SetBackPlaneColor((SkillIcon *)&v1->vfptr, rad, green, v37, alpha);
          SkillIcon::SetTopPlaneColor((SkillIcon *)&v1->vfptr, 0.0, 0.0, 0.0, 0.0);
          v25 = IIDTableBase<ItemViewInfo,ItemViewInfoTab,unsigned short>::GetByID(v23);
          if ( !v25 )
            return;
          v26 = v1->vfptr;
          v27 = *(float *)&v25->IconIndex;
          v28 = IconMgr::GetTexture(v25->IconFile);
          ((void (__thiscall *)(ShortCutIconWin *, NiSourceTexture *, _DWORD, signed int, signed int))v26[146].__vecDelDtor)(
            v1,
            v28,
            LODWORD(v27),
            32,
            32);
          v41 = ((int (__thiscall *)(Item *))v21->vfptr[3].__vecDelDtor)(v21);
          if ( (unsigned int)((int (__thiscall *)(Item *))v21->vfptr[4].__vecDelDtor)(v21) <= 1 )
          {
            v32 = v1->m_pkLotText;
            if ( v32 )
            {
              ((void (__stdcall *)(void *, int))v32->vfptr[118].__vecDelDtor)(&unk_9A0DC5, v39);
              ((void (__cdecl *)(_DWORD))v1->m_pkLotText->vfptr[64].__vecDelDtor)(0);
            }
          }
          else
          {
            v29 = &v1->m_pkLotText->vfptr;
            if ( v29 )
            {
              v30 = *v29;
              v31 = fs("%d", v41);
              v30[118].__vecDelDtor((NiRefObject *)v1->m_pkLotText, (unsigned int)v31);
              ((void (__cdecl *)(signed int))v1->m_pkLotText->vfptr[64].__vecDelDtor)(1);
            }
          }
          v33 = ActSkillInfoTab::GetByInxName(v21->m_pkInfo->ItemUseSkill);
          if ( v33 )
            IconWin::SetCoolTimeID((IconWin *)&v1->vfptr, v33->ID);
          goto LABEL_41;
        }
        SkillIcon::SetBackPlaneColor((SkillIcon *)&v1->vfptr, rad, green, v37, alpha);
        SkillIcon::SetTopPlaneColor((SkillIcon *)&v1->vfptr, 0.0, 0.0, 0.0, 0.0);
        ShortCutMgr::InitShortCutFromInventory(&g_kShortCutMgr);
        ShortCutIconWin::SetShortCut(v1, 0);
        v24 = v1->m_pkLotText;
        if ( v24 )
        {
          ((void (__stdcall *)(void *))v24->vfptr[118].__vecDelDtor)(&unk_9A0DC4);
          v1->m_pkLotText->vfptr[64].__vecDelDtor((NiRefObject *)v1->m_pkLotText, 0);
        }
      }
      else
      {
        SkillIcon::SetBackPlaneColor((SkillIcon *)&v1->vfptr, 0.0, 0.0, 0.0, 0.0);
        SkillIcon::SetTopPlaneColor((SkillIcon *)&v1->vfptr, 0.0, 0.0, 0.0, 0.0);
        ShortCutMgr::InitShortCutFromInventory(&g_kShortCutMgr);
        ShortCutIconWin::SetShortCut(v1, 0);
        v22 = v1->m_pkLotText;
        if ( v22 )
        {
          ((void (__stdcall *)(void *))v22->vfptr[118].__vecDelDtor)(&unk_9A0DC3);
          v1->m_pkLotText->vfptr[64].__vecDelDtor((NiRefObject *)v1->m_pkLotText, 0);
        }
      }
      return;
    }
LABEL_41:
    SkillIcon::ShowSkillPowerBar((SkillIcon *)&v1->vfptr, 0);
    return;
  }
  v4 = v1->m_spShortCut.m_pObject;
  if ( !v4 )
    goto LABEL_41;
  v5 = LOWORD(v4[1].m_uiRefCount);
  if ( (_WORD)v5 != -1 )
  {
    SkillIcon::SetBackPlaneColor((SkillIcon *)&v1->vfptr, 0.0, 0.0, 0.0, 0.0);
    SkillIcon::SetTopPlaneColor((SkillIcon *)&v1->vfptr, 0.0, 0.0, 0.0, 0.0);
    v6 = IIDTableBase<ItemViewInfo,ItemViewInfoTab,unsigned short>::GetByID(v5);
    if ( v6 )
    {
      v7 = v1->vfptr;
      v8 = *(float *)&v6->IconIndex;
      v9 = IconMgr::GetTexture(v6->IconFile);
      ((void (__thiscall *)(ShortCutIconWin *, NiSourceTexture *, _DWORD, signed int, signed int))v7[146].__vecDelDtor)(
        v1,
        v9,
        LODWORD(v8),
        32,
        32);
      v10 = Inventory::GetItemByID(&g_kInventory, v5);
      iLot = Inventory::GetItemLot(&g_kInventory, v5);
      if ( v10 )
      {
        if ( (unsigned int)((int (__thiscall *)(Item *))v10->vfptr[4].__vecDelDtor)(v10) <= 1 )
        {
          v14 = v1->m_pkLotText;
          if ( v14 )
          {
            ((void (__stdcall *)(void *, int))v14->vfptr[118].__vecDelDtor)(&unk_9A0DBF, v39);
            ((void (__cdecl *)(_DWORD))v1->m_pkLotText->vfptr[64].__vecDelDtor)(0);
          }
        }
        else
        {
          v11 = &v1->m_pkLotText->vfptr;
          if ( v11 )
          {
            v12 = *v11;
            v13 = fs("%d", iLot);
            v12[118].__vecDelDtor((NiRefObject *)v1->m_pkLotText, (unsigned int)v13);
            ((void (__cdecl *)(signed int))v1->m_pkLotText->vfptr[64].__vecDelDtor)(1);
          }
        }
        v15 = ActSkillInfoTab::GetByInxName(v10->m_pkInfo->ItemUseSkill);
        if ( v15 )
        {
          IconWin::SetCoolTimeID((IconWin *)&v1->vfptr, v15->ID);
        }
        else
        {
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
            &strUseSkillName,
            v10->m_pkInfo->ItemUseSkill);
          v43 = 0;
          std::operator!=<char,std::char_traits<char>,std::allocator<char>>(&strUseSkillName, "-");
          v16 = ActionEffectItemTab::GetByItemID(v5);
          if ( v16 )
          {
            v17 = ItemActionTab::GetByItemActionID(v16->ItemActionID);
            IconWin::SetCoolTimeIDByItemAction((IconWin *)&v1->vfptr, v17->ItemActionID);
          }
          v43 = -1;
          std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&strUseSkillName);
        }
      }
      else
      {
        v18 = v1->m_pkLotText;
        if ( v18 )
        {
          ((void (__stdcall *)(void *))v18->vfptr[118].__vecDelDtor)(&unk_9A0DC2);
          ((void (__stdcall *)(_DWORD))v1->m_pkLotText->vfptr[64].__vecDelDtor)(0);
        }
      }
      goto LABEL_41;
    }
  }
}

//----- (00587980) --------------------------------------------------------
char __thiscall ShortCutIconWin::EatDropReference(ShortCutIconWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  ShortCutIconWin *v4; // esi@1
  char result; // al@2
  DropContents *v6; // edi@4
  ShortCutWin *v7; // eax@4

  v4 = this;
  if ( this->m_bProtected || !*pkDrop )
  {
    result = 0;
  }
  else
  {
    v6 = (DropContents *)(*pkDrop)->m_pkContents;
    v7 = (ShortCutWin *)PgWin::GetParentWin((PgWin *)&this->vfptr);
    if ( v7 )
      result = ShortCutWin::OnDrop(v7, v6, v4->m_uiIndex + 18 * v7->m_uiCurPage);
    else
      result = 0;
  }
  return result;
}

//----- (005879E0) --------------------------------------------------------
void __thiscall ShortCutIconWin::SetIcon(ShortCutIconWin *this)
{
  ShortCutIconWin *v1; // esi@1
  ShortCut *v2; // ecx@1

  v1 = this;
  v2 = this->m_spShortCut.m_pObject;
  if ( v2 )
  {
    switch ( ((int (*)(void))v2->vfptr[1].__vecDelDtor)() )
    {
      case 0:
      case 4:
      case 5:
        ShortCutIconWin::SetItemIcon(v1);
        SkillIcon::UsingItemAlphaProperty((SkillIcon *)&v1->vfptr);
        break;
      case 1:
        ShortCutIconWin::SetSkillIcon(v1);
        SkillIcon::UsingSkillAlphaProperty((SkillIcon *)&v1->vfptr);
        break;
      case 2:
        ShortCutIconWin::SetActionIcon(v1);
        SkillIcon::UsingItemAlphaProperty((SkillIcon *)&v1->vfptr);
        break;
      case 3:
        ShortCutIconWin::SetSkillIcon(v1);
        break;
      default:
        break;
    }
    v1->vfptr[64].__vecDelDtor((NiRefObject *)v1, 1u);
    v1->vfptr[60].__vecDelDtor((NiRefObject *)v1, 1u);
  }
  else
  {
    v1->vfptr[150].__vecDelDtor((NiRefObject *)v1, 0);
    v1->vfptr[64].__vecDelDtor((NiRefObject *)v1, 0);
    v1->vfptr[60].__vecDelDtor((NiRefObject *)v1, 0);
  }
}

//----- (00587AA0) --------------------------------------------------------
void __thiscall ShortCutIconWin::SetShortCut(ShortCutIconWin *this, ShortCut *pkShortCut)
{
  ShortCutIconWin *v2; // edi@1
  ShortCut *v3; // esi@1
  ShortCut *v4; // ecx@8
  ShortCut *v5; // edi@10
  ActionViewInfo *v6; // eax@11
  ActionViewInfo *v7; // ebx@11
  int v8; // esi@13
  bool v9; // cf@13
  Item *v10; // eax@15
  ItemInfo *v11; // eax@16

  v2 = this;
  v3 = this->m_spShortCut.m_pObject;
  if ( v3 != pkShortCut )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spShortCut.m_pObject = pkShortCut;
    if ( pkShortCut )
      InterlockedIncrement((volatile LONG *)&pkShortCut->m_uiRefCount);
  }
  ShortCutIconWin::SetIcon(v2);
  v4 = v2->m_spShortCut.m_pObject;
  if ( v4 )
  {
    if ( ((int (*)(void))v4->vfptr[1].__vecDelDtor)() == 2 )
    {
      v5 = v2->m_spShortCut.m_pObject;
      if ( v5 )
      {
        v6 = IIDTableBase<ActionViewInfo,ActionViewTable,unsigned short>::GetByID((int)v5[1].vfptr);
        v7 = v6;
        if ( v6 )
        {
          if ( v6->eActionType == 2 )
          {
            v8 = 0;
            v9 = 1;
            do
            {
              if ( v9 )
              {
                v10 = g_kInventory.m_aspPremiumActionInv[v8].m_pObject;
                if ( v10 )
                {
                  v11 = v10->m_pkInfo;
                  if ( !v11 )
                    return;
                  if ( !strcmp(v11->InxName, v7->InxName) )
                    ShortCutMgr::SyncShortCutAndActionWinKey(&g_kShortCutMgr, (int)v5[1].vfptr, v8);
                }
              }
              v9 = (unsigned int)++v8 < 0x2A;
            }
            while ( v8 < 42 );
          }
        }
      }
    }
  }
}

//----- (00587BA0) --------------------------------------------------------
void __thiscall ShortCutWin::ReflashShortCutWin(ShortCutWin *this)
{
  ShortCutWin *v1; // edi@1
  unsigned int v2; // esi@1
  SkillIcon **v3; // ebx@1
  unsigned int v4; // eax@4
  ShortCut *v5; // eax@5
  unsigned int v6; // eax@7
  int v7; // esi@8
  unsigned __int16 v8; // ax@14
  ActiveSkillInfo *v9; // eax@14
  unsigned __int16 *v10; // ecx@14
  unsigned int v11; // ebx@14
  unsigned int v12; // eax@14
  int v13; // eax@16
  ActiveSkillInfo *v14; // eax@17
  ActiveSkillInfo *v15; // esi@17
  ActionViewInfo *v16; // eax@23
  ActionType v17; // eax@24
  int v18; // eax@25
  int v19; // esi@35
  int v20; // ebx@36
  PgWinButExt *v21; // ecx@36
  ActiveSkillInfo *v22; // ST54_4@37
  int v23; // eax@37
  int v24; // ecx@37
  int v25; // ebx@55
  int v26; // eax@55
  int v27; // ebx@55
  int v28; // eax@55
  void (__stdcall *v29)(signed int); // edx@55
  int v30; // ebx@58
  int v31; // eax@58
  int v32; // ebx@58
  int v33; // ebx@58
  int v34; // eax@58
  void (__stdcall *v35)(signed int); // edx@58
  ActiveSkillInfo *v36; // ST54_4@61
  int v37; // eax@61
  int v38; // ecx@61
  int v39; // ebx@68
  int v40; // eax@68
  int v41; // ebx@68
  int v42; // eax@68
  void (__stdcall *v43)(signed int); // edx@68
  int v44; // ebx@74
  int v45; // eax@74
  int v46; // ebx@74
  int v47; // ebx@74
  int v48; // eax@74
  void (__stdcall *v49)(signed int); // edx@74
  PgWinButExt *v50; // eax@82
  NiRefObjectVtbl *v51; // esi@83
  ActiveSkillInfo *v52; // ST54_4@83
  PgWinButExt *v53; // ebx@83
  int v54; // eax@83
  int v55; // eax@83
  PgWinButExt *v56; // eax@84
  NiRefObjectVtbl *v57; // esi@85
  ActiveSkillInfo *v58; // ST54_4@85
  PgWinButExt *v59; // ebx@85
  int v60; // eax@85
  int v61; // eax@85
  PgWinButExt *v62; // ecx@87
  NiRefObjectVtbl *v63; // esi@87
  PgWinButExt *v64; // ebx@87
  ActiveSkillInfo *v65; // ST54_4@87
  int v66; // eax@87
  int v67; // eax@87
  PgWinButExt *v68; // ecx@89
  PgWinButExt *v69; // ebx@89
  ActiveSkillInfo *v70; // ST54_4@89
  int v71; // eax@89
  ActiveSkillInfo *v72; // ST54_4@91
  SkillIcon **v73; // [sp+44h] [bp-414h]@1
  unsigned int i; // [sp+48h] [bp-410h]@1
  unsigned int ia; // [sp+48h] [bp-410h]@35
  bool bCheckedIndex; // [sp+4Fh] [bp-409h]@35
  ActiveSkillInfo *pkContentsIsToggle; // [sp+50h] [bp-408h]@14
  char acConversionData2[256]; // [sp+54h] [bp-404h]@19
  char acConversionData1[256]; // [sp+154h] [bp-304h]@19
  char acSkillName2[256]; // [sp+254h] [bp-204h]@19
  char acSkillName[256]; // [sp+354h] [bp-104h]@19

  v1 = this;
  v2 = 0;
  v3 = (SkillIcon **)this->m_apkIconWin;
  i = 0;
  v73 = (SkillIcon **)this->m_apkIconWin;
  do
  {
    if ( *v3 )
      SkillIcon::SetEmpowerInfo(*v3, 0);
    v4 = v2 + 18 * v1->m_uiCurPage;
    if ( v4 < 0x64 )
      v5 = (ShortCut *)*(&ptr + v4);
    else
      v5 = 0;
    ShortCutIconWin::SetShortCut((ShortCutIconWin *)*v3, v5);
    v6 = v2 + 18 * v1->m_uiCurPage;
    if ( v6 < 0x64 && (v7 = (int)*(&ptr + v6)) != 0 )
    {
      switch ( (*(int (__thiscall **)(int))(*(_DWORD *)v7 + 4))(v7) )
      {
        case 0:
        case 4:
          ((void (__stdcall *)(signed int))(*v3)->vfptr[140].__vecDelDtor)(9);
          break;
        case 5:
          ((void (__stdcall *)(signed int))(*v3)->vfptr[140].__vecDelDtor)(10);
          break;
        case 1:
          ((void (__stdcall *)(signed int))(*v3)->vfptr[140].__vecDelDtor)(4);
          if ( v1->m_bToggleOn )
          {
            if ( v1->m_bShowFlag )
            {
              v8 = SkillIcon::GetSkill(*v73);
              v9 = IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::GetByID(v8);
              v10 = v1->m_vecToggleSkillID._Myfirst;
              pkContentsIsToggle = v9;
              v11 = 0;
              v12 = v1->m_vecToggleSkillID._Mylast - v10;
              if ( v12 )
              {
                if ( v12 <= 0 )
                  std::_Xout_of_range("invalid vector<T> subscript");
                do
                {
                  v13 = v10[v11];
                  if ( (_WORD)v13 != -1 )
                  {
                    v14 = IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::GetByID(v13);
                    v15 = v14;
                    if ( pkContentsIsToggle )
                    {
                      if ( v14 )
                      {
                        acSkillName[0] = 0;
                        memset(&acSkillName[1], 0, 0xFFu);
                        acConversionData1[0] = 0;
                        memset(&acConversionData1[1], 0, 0xFFu);
                        acSkillName2[0] = 0;
                        memset(&acSkillName2[1], 0, 0xFFu);
                        acConversionData2[0] = 0;
                        memset(&acConversionData2[1], 0, 0xFFu);
                        sprintf(acSkillName, "%s", pkContentsIsToggle->InxName);
                        strncpy(acConversionData1, acSkillName, strlen(acSkillName) - 2);
                        sprintf(acSkillName2, "%s", v15->InxName);
                        strncpy(acConversionData2, acSkillName2, strlen(acSkillName2) - 2);
                        if ( !strcmp(acConversionData1, acConversionData2) )
                          ShortCutIconWin::CreateToggleEffect((ShortCutIconWin *)*v73);
                      }
                    }
                  }
                  v10 = v1->m_vecToggleSkillID._Myfirst;
                  ++v11;
                }
                while ( v1->m_vecToggleSkillID._Mylast - v10 > v11 );
              }
            }
          }
          break;
        case 2:
          v16 = IIDTableBase<ActionViewInfo,ActionViewTable,unsigned short>::GetByID(*(_DWORD *)(v7 + 8));
          if ( v16 )
          {
            v17 = v16->eActionType;
            if ( v17 )
            {
              v18 = v17 - 1;
              if ( v18 )
              {
                if ( v18 == 1 )
                  ((void (__stdcall *)(signed int))(*v3)->vfptr[140].__vecDelDtor)(11);
              }
              else
              {
                ((void (__stdcall *)(signed int))(*v3)->vfptr[140].__vecDelDtor)(8);
              }
            }
            else
            {
              ((void (__stdcall *)(signed int))(*v3)->vfptr[140].__vecDelDtor)(7);
            }
          }
          break;
        default:
          break;
      }
    }
    else
    {
      ((void (__stdcall *)(signed int))(*v3)->vfptr[140].__vecDelDtor)(4);
    }
    v2 = i + 1;
    v3 = v73 + 1;
    i = v2;
    ++v73;
  }
  while ( v2 < 0x12 );
  if ( v1->m_pkSizeBtn )
  {
    if ( v1->m_bShowFlag )
      byte_B4FFA1[3 * v1->m_uiShortCutStatusIndex] = v1->m_uiCurPage;
    bCheckedIndex = 0;
    ia = 0;
    v19 = (int)v1->m_apkIconWin;
    do
    {
      v20 = *(_DWORD *)(v19 + 352);
      v21 = v1->m_pkSizeBtn;
      if ( v1->m_bVerticalMode )
      {
        v22 = (ActiveSkillInfo *)(((int (*)(void))v21->vfptr[42].__vecDelDtor)() - 3);
        v23 = (*(int (__thiscall **)(int))(*(_DWORD *)v20 + 168))(v20);
        v24 = *(_DWORD *)(v19 + 352);
        if ( v23 <= (signed int)v22 )
        {
          (*(void (__stdcall **)(signed int))(*(_DWORD *)v24 + 256))(1);
          if ( *(_DWORD *)(v19 + 652) && v1->m_bShowHotkey[ia] )
            (*(void (__stdcall **)(signed int))(**(_DWORD **)(v19 + 652) + 256))(1);
          if ( *(_DWORD *)(v19 + 568) && v1->m_bShowHotkey[ia] )
            (*(void (__stdcall **)(signed int))(**(_DWORD **)(v19 + 568) + 256))(1);
          *(_BYTE *)(*(_DWORD *)v19 + 420) = 0;
          if ( *(_DWORD *)(*(_DWORD *)v19 + 412) )
          {
            (*(void (__stdcall **)(signed int))(**(_DWORD **)v19 + 256))(1);
            *(_WORD *)(*(_DWORD *)v19 + 28) &= 0xFFFEu;
            IconWin::ShowFocus(*(IconWin **)v19, 1);
            *(_BYTE *)(*(_DWORD *)(v19 + 72) + 304) = 1;
          }
          (*(void (__stdcall **)(signed int))(**(_DWORD **)v19 + 240))(1);
        }
        else
        {
          (*(void (__stdcall **)(_DWORD))(*(_DWORD *)v24 + 256))(0);
          if ( *(_DWORD *)(v19 + 652) )
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v19 + 652) + 256))(0);
          if ( *(_DWORD *)(v19 + 568) )
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v19 + 568) + 256))(0);
          *(_BYTE *)(*(_DWORD *)v19 + 420) = 1;
          (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v19 + 256))(0);
          IconWin::ShowFocus(*(IconWin **)v19, 0);
          *(_BYTE *)(*(_DWORD *)(v19 + 72) + 304) = 0;
          (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v19 + 240))(0);
          if ( !bCheckedIndex )
          {
            bCheckedIndex = 1;
            if ( v1->m_bShowFlag )
              byte_B4FFA0[3 * v1->m_uiShortCutStatusIndex] = ia;
          }
        }
        v25 = *(_DWORD *)(v19 + 496);
        v26 = (*(int (**)(void))(**(_DWORD **)(v19 + 352) + 168))();
        v27 = (*(int (__thiscall **)(int))(*(_DWORD *)v25 + 148))(v25) + v26;
        v28 = ((int (*)(void))v1->m_pkSizeBtn->vfptr[42].__vecDelDtor)();
        v29 = *(void (__stdcall **)(signed int))(**(_DWORD **)(v19 + 424) + 256);
        if ( v27 <= v28 )
          v29(1);
        else
          v29(0);
        v30 = *(_DWORD *)(v19 + 496);
        v31 = (*(int (**)(void))(**(_DWORD **)(v19 + 424) + 148))();
        v32 = (*(int (__thiscall **)(int))(*(_DWORD *)v30 + 148))(v30) + v31;
        v33 = (*(int (**)(void))(**(_DWORD **)(v19 + 352) + 168))() + v32;
        v34 = ((int (*)(void))v1->m_pkSizeBtn->vfptr[42].__vecDelDtor)();
        v35 = *(void (__stdcall **)(signed int))(**(_DWORD **)(v19 + 496) + 256);
        if ( v33 <= v34 )
          v35(1);
        else
          v35(0);
      }
      else
      {
        v36 = (ActiveSkillInfo *)(((int (*)(void))v21->vfptr[41].__vecDelDtor)() - 3);
        v37 = (*(int (__thiscall **)(int))(*(_DWORD *)v20 + 164))(v20);
        v38 = *(_DWORD *)(v19 + 352);
        if ( v37 <= (signed int)v36 )
        {
          (*(void (__stdcall **)(signed int))(*(_DWORD *)v38 + 256))(1);
          *(_BYTE *)(*(_DWORD *)v19 + 420) = 0;
          *(_WORD *)(*(_DWORD *)v19 + 28) &= 0xFFFEu;
          if ( *(_DWORD *)(*(_DWORD *)v19 + 412) )
          {
            (*(void (__stdcall **)(signed int))(**(_DWORD **)v19 + 256))(1);
            IconWin::ShowFocus(*(IconWin **)v19, 1);
            *(_BYTE *)(*(_DWORD *)(v19 + 72) + 304) = 1;
          }
          (*(void (__stdcall **)(signed int))(**(_DWORD **)v19 + 240))(1);
        }
        else
        {
          (*(void (__stdcall **)(_DWORD))(*(_DWORD *)v38 + 256))(0);
          *(_BYTE *)(*(_DWORD *)v19 + 420) = 1;
          (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v19 + 256))(0);
          IconWin::ShowFocus(*(IconWin **)v19, 0);
          *(_BYTE *)(*(_DWORD *)(v19 + 72) + 304) = 0;
          (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v19 + 240))(0);
          if ( !bCheckedIndex )
          {
            bCheckedIndex = 1;
            if ( v1->m_bShowFlag )
              byte_B4FFA0[3 * v1->m_uiShortCutStatusIndex] = ia;
          }
        }
        v39 = *(_DWORD *)(v19 + 352);
        v40 = (*(int (**)(void))(**(_DWORD **)(v19 + 496) + 144))();
        v41 = (*(int (__thiscall **)(int))(*(_DWORD *)v39 + 164))(v39) + v40;
        v42 = ((int (*)(void))v1->m_pkSizeBtn->vfptr[41].__vecDelDtor)();
        v43 = *(void (__stdcall **)(signed int))(**(_DWORD **)(v19 + 424) + 256);
        if ( v41 <= v42 - 3 )
        {
          v43(1);
          if ( *(_DWORD *)(v19 + 652) && v1->m_bShowHotkey[ia] )
            (*(void (__stdcall **)(signed int))(**(_DWORD **)(v19 + 652) + 256))(1);
        }
        else
        {
          v43(0);
          if ( *(_DWORD *)(v19 + 652) )
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v19 + 652) + 256))(0);
        }
        v44 = *(_DWORD *)(v19 + 424);
        v45 = (*(int (**)(void))(**(_DWORD **)(v19 + 496) + 144))();
        v46 = (*(int (__thiscall **)(int))(*(_DWORD *)v44 + 144))(v44) + v45;
        v47 = (*(int (**)(void))(**(_DWORD **)(v19 + 352) + 164))() + v46;
        v48 = ((int (*)(void))v1->m_pkSizeBtn->vfptr[41].__vecDelDtor)();
        v49 = *(void (__stdcall **)(signed int))(**(_DWORD **)(v19 + 496) + 256);
        if ( v47 <= v48 - 3 )
        {
          v49(1);
          if ( *(_DWORD *)(v19 + 568) && v1->m_bShowHotkey[ia] )
            (*(void (__stdcall **)(signed int))(**(_DWORD **)(v19 + 568) + 256))(1);
        }
        else
        {
          v49(0);
          if ( *(_DWORD *)(v19 + 568) )
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v19 + 568) + 256))(0);
        }
      }
      v19 += 4;
      ++ia;
    }
    while ( ia < 0x12 );
    if ( v1->m_bVerticalMode )
    {
      v50 = v1->m_pkPanelTrunBut;
      if ( v50 )
      {
        v51 = v50->vfptr;
        v52 = (ActiveSkillInfo *)v50->orgTopOffset;
        v53 = v1->m_pkPanelTrunBut;
        v54 = ((int (*)(void))v1->m_pkSizeBtn->vfptr[42].__vecDelDtor)();
        v55 = (int)v53->vfptr[41].__vecDelDtor((NiRefObject *)v53, (unsigned int)v52 + v54);
        v51[77].__vecDelDtor((NiRefObject *)v1->m_pkPanelTrunBut, v55);
      }
      v56 = v1->m_pkSubPanelBut;
      if ( !v56 )
        goto LABEL_91;
      v57 = v56->vfptr;
      v58 = (ActiveSkillInfo *)v56->orgTopOffset;
      v59 = v1->m_pkSubPanelBut;
      v60 = ((int (*)(void))v1->m_pkSizeBtn->vfptr[42].__vecDelDtor)();
      v61 = (int)v59->vfptr[41].__vecDelDtor((NiRefObject *)v59, (unsigned int)v58 + v60);
    }
    else
    {
      if ( v1->m_pkPanelTrunBut )
      {
        v62 = v1->m_pkPanelTrunBut;
        v63 = v62->vfptr;
        v64 = v1->m_pkSizeBtn;
        v65 = (ActiveSkillInfo *)v62->orgLeftOffset;
        v66 = ((int (*)(void))v62->vfptr[42].__vecDelDtor)();
        v67 = (int)v64->vfptr[41].__vecDelDtor((NiRefObject *)v64, v66);
        v63[77].__vecDelDtor((NiRefObject *)v1->m_pkPanelTrunBut, (unsigned int)v65 + v67);
      }
      if ( !v1->m_pkSubPanelBut )
        goto LABEL_91;
      v68 = v1->m_pkSubPanelBut;
      v57 = v68->vfptr;
      v69 = v1->m_pkSizeBtn;
      v70 = (ActiveSkillInfo *)v68->orgLeftOffset;
      v71 = ((int (*)(void))v68->vfptr[42].__vecDelDtor)();
      v61 = (int)v70 + (int)v69->vfptr[41].__vecDelDtor((NiRefObject *)v69, v71);
    }
    v57[77].__vecDelDtor((NiRefObject *)v1->m_pkSubPanelBut, v61);
LABEL_91:
    *(float *)&v72 = Timer::ms_fCurTime;
    v1->vfptr[81].__vecDelDtor((NiRefObject *)v1, LODWORD(Timer::ms_fCurTime));
    PgWin::UpdateChildWin((PgWin *)&v1->vfptr, *(float *)&v72);
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00588550) --------------------------------------------------------
void __thiscall ShortCutWin::OnCmdShortCutLClick(ShortCutWin *this, unsigned int uiIndex)
{
  ShortCutWin *v2; // esi@1
  ShortCut *v3; // ebx@2
  unsigned int v4; // eax@7
  Item *v5; // ecx@8
  ShortCutIconWin *v6; // esi@14
  SpEffect *v7; // esi@18
  unsigned int uiInvPos; // [sp+8h] [bp-108h]@7
  char temp[256]; // [sp+Ch] [bp-104h]@13

  v2 = this;
  if ( !this->m_pkSizeBtn->m_bIsDrag )
  {
    v3 = this->m_apkIconWin[uiIndex]->m_spShortCut.m_pObject;
    if ( v3 )
    {
      this->m_kDropContents.m_eSenderType = 4;
      this->m_kDrop.m_pkSender = (PgWin *)this;
      if ( ((int (__thiscall *)(_DWORD))v3->vfptr[1].__vecDelDtor)(v3) == 2 )
      {
        v2->m_kDropContents.nTableIndexNum = (unsigned int)v3[1].vfptr;
      }
      else if ( ((int (__thiscall *)(_DWORD))v3->vfptr[1].__vecDelDtor)(v3) != 4
             && ((int (__thiscall *)(_DWORD))v3->vfptr[1].__vecDelDtor)(v3) == 5 )
      {
        v4 = (unsigned int)v3[1].vfptr;
        uiInvPos = v4;
        if ( v4 >= 0xC0 )
          return;
        v5 = g_kInventory.m_aspInv[v4].m_pObject;
        if ( !v5 )
          return;
        if ( (unsigned __int8)((int (*)(void))v5->vfptr[1].__vecDelDtor)() == 24 )
        {
          v2->m_kDropContents.m_eSenderType = 4;
          v2->m_kDropContents.ui_InvType = 4;
          v2->m_kDropContents.ui_InvIndex = uiInvPos;
        }
      }
      if ( ShortCutWin::SetDropContents(v2, v3, uiIndex + 18 * v2->m_uiCurPage) == 1 )
        PgCursor::ms_pkDrop = &v2->m_kDrop;
      ShortCutIconWin::SetShortCut(v2->m_apkIconWin[uiIndex], 0);
      ShortCutMgr::SetShortCut(&g_kShortCutMgr, 0, uiIndex + 18 * v2->m_uiCurPage, 1);
      ShortCutWin::ReflashShortCutWin(v2);
      temp[0] = 0;
      memset(&temp[1], 0, 0xFFu);
      sprintf(temp, "OnCmdShortCutLClick : POS = %d\n", uiIndex);
      OutputDebugStringA(temp);
      if ( uiIndex <= 0x12 )
      {
        SkillIcon::SetSkill((SkillIcon *)&v2->m_apkIconWin[uiIndex]->vfptr, 0xFFFFu);
        v6 = v2->m_apkIconWin[uiIndex];
      }
      else
      {
        SkillIcon::SetSkill(*((SkillIcon **)&v2->m_pcToolTipWinText + uiIndex), 0xFFFFu);
        v6 = (ShortCutIconWin *)*((_DWORD *)&v2->m_pcToolTipWinText + uiIndex);
      }
      if ( v6->m_bEnableToggle )
      {
        if ( v6->m_pkToggleEffect )
        {
          v7 = v6->m_pkToggleEffect;
          if ( v7 )
          {
            if ( v7->m_bLive )
              v7->m_bLoop = 0;
          }
        }
      }
    }
  }
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (00588720) --------------------------------------------------------
char __thiscall ShortCutWin::CreatHorizontalWin(ShortCutWin *this, PgFrameWork *pkFrameWork, NiPointer<NiNode> *spNode, NiSourceTexture *pkTexture, bool pkMainWin)
{
  ShortCutWin *v5; // esi@1
  NiNode *v6; // ST34_4@1
  PgSprData *v7; // eax@1
  char v8; // al@2
  char result; // al@4
  PgSprData *v10; // eax@6
  int v11; // ebx@6
  NiNode *v12; // eax@6
  NiSourceTexture *v13; // eax@6
  NiTexturePalette *v14; // ST44_4@9
  const char *v15; // eax@9
  NiTexturePalette *v16; // ST44_4@12
  const char *v17; // eax@12
  int v18; // edi@13
  PgSprData *v19; // eax@14
  PgWinSpr *v20; // eax@14
  PgSprData *v21; // eax@14
  PgWinSpr *v22; // eax@14
  PgSprData *v23; // eax@14
  PgWinSpr *v24; // eax@14
  ShortCutIconWin *v25; // eax@14
  ClockShadowWin *v26; // eax@14
  NiNode *v27; // ebx@14
  NiNode *v28; // eax@16
  int v29; // eax@16
  PgSprData *v30; // eax@19
  int v31; // edx@19
  int v32; // ebx@19
  unsigned int v33; // eax@19
  int (__thiscall *v34)(int); // edx@19
  int v35; // eax@19
  int v36; // ebx@19
  PgWinSpr *v37; // eax@19
  PgSprData *v38; // eax@19
  PgWinSpr *v39; // eax@19
  int v40; // eax@19
  NiAVObject **v41; // edi@22
  NiAVObject *v42; // eax@22
  PgSprData *v43; // eax@23
  PgWinButExt *v44; // eax@23
  int v45; // ecx@23
  PgWinButExt *v46; // eax@23
  PgSprData *v47; // eax@23
  NiAVObject *v48; // ecx@23
  PgWinButExt *v49; // eax@23
  int v50; // edx@23
  int v51; // ecx@23
  int v52; // edx@23
  PgWinButExt *v53; // eax@23
  char *v54; // eax@23
  PgSprData *v55; // eax@24
  PgWinButExt *v56; // eax@24
  int v57; // ecx@24
  int v58; // ecx@24
  PgWinButExt *v59; // eax@24
  PgSprData *v60; // eax@25
  NiAVObject *v61; // edx@25
  PgWinButExt *v62; // eax@25
  int v63; // edx@25
  int v64; // ecx@25
  PgWinButExt *v65; // eax@25
  int v66; // ebx@25
  char *v67; // eax@25
  NiSourceTexture *v68; // ebx@25
  PgSprData *v69; // eax@25
  PgSprData *v70; // eax@25
  PgSprData *v71; // eax@26
  PgFont *v72; // eax@26
  PgWinText *v73; // eax@26
  int v74; // eax@28
  NiRefObjectVtbl *v75; // ebx@28
  int v76; // edi@28
  int v77; // eax@28
  int v78; // eax@28
  bool v79; // zf@29
  NiRefObjectVtbl *v80; // edi@31
  int v81; // eax@31
  float v82; // [sp+38h] [bp-84h]@27
  float v83; // [sp+3Ch] [bp-80h]@27
  unsigned int qSlot01_3Width; // [sp+48h] [bp-74h]@6
  int orgOffsetY; // [sp+4Ch] [bp-70h]@25
  int orgOffsetX; // [sp+50h] [bp-6Ch]@25
  unsigned int qSlot01_2Width; // [sp+54h] [bp-68h]@6
  int tempLeft; // [sp+58h] [bp-64h]@6
  unsigned int qSlot01_1Width; // [sp+5Ch] [bp-60h]@6
  int tempTop; // [sp+60h] [bp-5Ch]@6
  int uiLeftOffset; // [sp+64h] [bp-58h]@6
  NiAVObject **v92; // [sp+68h] [bp-54h]@1
  unsigned int numberOffsetX; // [sp+6Ch] [bp-50h]@19
  unsigned int uiWidth; // [sp+70h] [bp-4Ch]@6
  unsigned int uiHeight; // [sp+74h] [bp-48h]@6
  NiSourceTexture *v96; // [sp+78h] [bp-44h]@1
  PgSprData *pkSprData; // [sp+7Ch] [bp-40h]@15
  int i; // [sp+80h] [bp-3Ch]@1
  int uiLeft; // [sp+84h] [bp-38h]@1
  int uiTop; // [sp+88h] [bp-34h]@1
  char string; // [sp+8Ch] [bp-30h]@26
  int v102; // [sp+B8h] [bp-4h]@15

  v5 = this;
  i = (int)pkFrameWork;
  v6 = spNode->m_pObject;
  v92 = (NiAVObject **)spNode;
  v96 = pkTexture;
  v7 = PgSprData::Create((NiAVObject *)&v6->vfptr, "Frame01", &uiLeft, &uiTop, pkTexture);
  if ( v5->m_bMainWinMode )
    v8 = PgWinFrame::Create((PgWinFrame *)&v5->vfptr, 0, 0, v7, 0, (PgFrameWork *)i, "ShortCutHorizontalWin", 0);
  else
    v8 = PgWinFrame::Create((PgWinFrame *)&v5->vfptr, 0, 0, v7, 0, (PgFrameWork *)i, "ShortCutHorizontalSubWin", 0);
  if ( !v8 )
    goto LABEL_34;
  v10 = PgSprData::Create((NiAVObject *)&spNode->m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
  PgWinSpr::CreateWin(uiLeft, uiTop, v10, (PgWin *)&v5->vfptr, 0, 0);
  PgUtil::GetTriShapeRect((NiAVObject *)&spNode->m_pObject->vfptr, "Panel01", &tempLeft, &tempTop, &uiWidth, &uiHeight);
  v11 = uiLeft + uiWidth;
  v12 = spNode->m_pObject;
  uiLeftOffset = uiLeft + uiWidth;
  PgUtil::GetTriShapeRect((NiAVObject *)&v12->vfptr, "QSlot01_1", &tempLeft, &tempTop, &qSlot01_1Width, &uiHeight);
  v5->m_iIconWinSizeWidth = qSlot01_1Width;
  PgUtil::GetTriShapeRect(
    (NiAVObject *)&spNode->m_pObject->vfptr,
    "QSlot01_2",
    &tempLeft,
    &tempTop,
    &qSlot01_2Width,
    &uiHeight);
  v5->m_iIconWinSizeWidth += qSlot01_2Width;
  PgUtil::GetTriShapeRect(
    (NiAVObject *)&spNode->m_pObject->vfptr,
    "QSlot01_3",
    &tempLeft,
    &tempTop,
    &qSlot01_3Width,
    &uiHeight);
  v5->m_iIconWinSizeWidth += qSlot01_3Width;
  v13 = MenuTexMgr::GetTexture(0xEu);
  v5->m_pkNumberTexture = v13;
  if ( !v13 )
    goto LABEL_34;
  i = (int)pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v14 = (NiTexturePalette *)i;
  v15 = Folder::Merge(&Folder::m_acMenu, "Game\\MainNumber.nif");
  PgUtil::LoadNodeNifFile(v15, &v5->m_spNumberNode, v14);
  if ( !v5->m_spNumberNode.m_pObject )
    goto LABEL_34;
  i = (int)pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v16 = (NiTexturePalette *)i;
  v17 = Folder::Merge(&Folder::m_acMenu, "Game\\MainNumber.nif");
  PgUtil::LoadNodeNifFile(v17, &v5->m_spNumberPosNode, v16);
  if ( !v5->m_spNumberPosNode.m_pObject )
    goto LABEL_34;
  i = 0;
  v18 = (int)v5->m_apkIconWin;
  do
  {
    v19 = PgSprData::Create(*v92, "QSlot01_1", &uiLeft, &uiTop, v96);
    v20 = PgWinSpr::CreateWin(v11, uiTop, v19, (PgWin *)&v5->vfptr, 0, 0);
    *(_DWORD *)(v18 + 352) = v20;
    v20->vfptr[60].__vecDelDtor((NiRefObject *)v20, 0);
    v21 = PgSprData::Create(*v92, "QSlot01_2", &uiLeft, &uiTop, v96);
    v22 = PgWinSpr::CreateWin(qSlot01_1Width, 0, v21, *(PgWin **)(v18 + 352), 0, 0);
    *(_DWORD *)(v18 + 424) = v22;
    v22->vfptr[60].__vecDelDtor((NiRefObject *)v22, 0);
    v23 = PgSprData::Create(*v92, "QSlot01_3", &uiLeft, &uiTop, v96);
    v24 = PgWinSpr::CreateWin(qSlot01_1Width + qSlot01_2Width, 0, v23, *(PgWin **)(v18 + 352), 0, 0);
    *(_DWORD *)(v18 + 496) = v24;
    v24->vfptr[60].__vecDelDtor((NiRefObject *)v24, 0);
    v25 = ShortCutIconWin::CreateWin(v11 + 3, uiTop + 4, i, (PgWin *)&v5->vfptr);
    *(_DWORD *)v18 = v25;
    v25->vfptr[129].__vecDelDtor((NiRefObject *)v25, 3u);
    (*(void (__stdcall **)(signed int))(**(_DWORD **)v18 + 560))(4);
    *(_DWORD *)(*(_DWORD *)v18 + 304) = 1;
    ShortCutIconWin::SetShortCut(*(ShortCutIconWin **)v18, 0);
    IconWin::ShowFocus(*(IconWin **)v18, 1);
    v26 = ClockShadowWin::CreateWin(v11 + 2, uiTop + 4, (PgWin *)&v5->vfptr);
    *(_DWORD *)(v18 + 72) = v26;
    v26->m_uFlags |= 1u;
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v18 + 72) + 240))(0);
    v27 = EffectMgr::GetEffectNode(&g_kEffectMgr, "WeaponTitle");
    if ( v27 )
    {
      pkSprData = (PgSprData *)operator new(0x44u);
      v102 = 0;
      if ( pkSprData )
      {
        v28 = (NiNode *)NiObject::Clone((NiObject *)&v27->vfptr);
        SpEffect::SpEffect((SpEffect *)pkSprData, v28);
        v102 = -1;
        *(_DWORD *)(v18 + 164) = v29;
      }
      else
      {
        v102 = -1;
        *(_DWORD *)(v18 + 164) = 0;
      }
    }
    else
    {
      *(_DWORD *)(v18 + 164) = 0;
    }
    v30 = PgSprData::Create(
            (NiAVObject *)&v5->m_spNumberNode.m_pObject->vfptr,
            "ShiftPlus",
            &uiLeft,
            &uiTop,
            v5->m_pkNumberTexture);
    v31 = **(_DWORD **)(v18 + 352);
    v32 = *(_DWORD *)(v18 + 424);
    pkSprData = v30;
    v33 = (*(int (**)(void))(v31 + 144))();
    v34 = *(int (__thiscall **)(int))(*(_DWORD *)v32 + 144);
    numberOffsetX = v33;
    v35 = v34(v32);
    v36 = uiLeftOffset;
    numberOffsetX += v35 + 3;
    v37 = PgWinSpr::CreateWin(uiLeftOffset + 5, uiTop + 4, pkSprData, (PgWin *)&v5->vfptr, 0, 0);
    *(_DWORD *)(v18 + 652) = v37;
    v37->vfptr[60].__vecDelDtor((NiRefObject *)v37, 0);
    v38 = PgSprData::Create(
            (NiAVObject *)&v5->m_spNumberNode.m_pObject->vfptr,
            "48",
            &uiLeft,
            &uiTop,
            v5->m_pkNumberTexture);
    v39 = PgWinSpr::CreateWin(numberOffsetX + v36 - 7, uiTop + 4, v38, (PgWin *)&v5->vfptr, 0, 0);
    *(_DWORD *)(v18 + 568) = v39;
    v39->vfptr[60].__vecDelDtor((NiRefObject *)v39, 0);
    v11 = v5->m_iIconWinSizeWidth + v36;
    v40 = i;
    uiLeftOffset = v11;
    if ( i > 11 )
    {
      ShortCutWin::SetHotKeyWin(v5, i, "SmallNumTrans02");
      ShortCutWin::SetHotKeyPlusWin(v5, i, "SmallNumTrans01");
      v40 = i;
    }
    v18 += 4;
    i = v40 + 1;
  }
  while ( v40 + 1 < 18 );
  v41 = v92;
  v42 = *v92;
  if ( v5->m_bMainWinMode )
  {
    v43 = PgSprData::Create(v42, "MovePanelBtn01", &uiLeft, &uiTop, v96);
    v44 = PgWinButExt::CreateWin(v11, uiTop, v43, (PgWin *)&v5->vfptr, 0, 0, 0);
    v45 = uiTop;
    v5->m_pkSizeBtn = v44;
    v44->firstPosY = v45;
    v44->firstPosX = v11;
    v46 = v5->m_pkSizeBtn;
    v46->defaultPosY = uiTop;
    v46->defaultPosX = v11;
    v5->m_pkSizeBtn->shortCutSizeMode = 1;
    v5->m_pkSizeBtn->m_bIsVerticalMode = 0;
    PgUtil::GetTriShapeRect(*v41, "SubPanelBtnNor01", (int *)&numberOffsetX, &uiLeftOffset, &uiWidth, &uiHeight);
    v47 = PgSprData::Create(*v41, "SubPanelBtnNor01", &uiLeft, &uiTop, v96);
    v48 = *v41;
    pkSprData = v47;
    PgSprData::Add(v47, v48, "SubPanelBtnNor01");
    PgSprData::Add(pkSprData, *v41, "SubPanelBtnOver01");
    v49 = PgWinButExt::CreateWin(v11 + uiLeft, uiTop, pkSprData, (PgWin *)&v5->vfptr, 6u, 0, 0);
    v50 = uiLeft;
    v51 = uiTop;
    v5->m_pkSubPanelBut = v49;
    v49->firstPosX = v11 + v50;
    v49->firstPosY = v51;
    v52 = uiLeft;
    v53 = v5->m_pkSubPanelBut;
    v53->defaultPosY = uiTop;
    v53->defaultPosX = v11 + v52;
    v5->m_pkSubPanelBut->orgLeftOffset = numberOffsetX;
    v5->m_pkSubPanelBut->orgTopOffset = uiLeftOffset;
    v5->m_pkSubPanelBut->m_pkToolTipWin = g_pkToolTipWin;
    v54 = (char *)TextData2::Get(0x669A82A9u);
    PgWin::SetToolTipWinText((PgWin *)&v5->m_pkSubPanelBut->vfptr, v54);
  }
  else
  {
    v55 = PgSprData::Create(v42, "MovePanel01", &uiLeft, &uiTop, v96);
    v56 = PgWinButExt::CreateWin(v11, uiTop, v55, (PgWin *)&v5->vfptr, 0, 0, 0);
    v57 = uiTop;
    v5->m_pkSizeBtn = v56;
    v56->firstPosX = v11;
    v56->firstPosY = v57;
    v58 = uiTop;
    v59 = v5->m_pkSizeBtn;
    v59->defaultPosX = v11;
    v59->defaultPosY = v58;
    v5->m_pkSizeBtn->shortCutSizeMode = 1;
    v5->m_pkSizeBtn->m_bIsVerticalMode = 0;
  }
  PgUtil::GetTriShapeRect(*v41, "PanelTurnBtnNor01", &orgOffsetX, &orgOffsetY, &uiWidth, &uiHeight);
  v60 = PgSprData::Create(*v41, "PanelTurnBtnNor01", &uiLeft, &uiTop, v96);
  v61 = *v41;
  pkSprData = v60;
  PgSprData::Add(v60, v61, "PanelTurnBtnNor01");
  PgSprData::Add(pkSprData, *v41, "PanelTurnBtnOver01");
  v62 = PgWinButExt::CreateWin(v11 + uiLeft, uiTop, pkSprData, (PgWin *)&v5->vfptr, 5u, 0, 0);
  v63 = uiLeft;
  v64 = uiTop;
  v5->m_pkPanelTrunBut = v62;
  v62->firstPosY = v64;
  v62->firstPosX = v11 + v63;
  v65 = v5->m_pkPanelTrunBut;
  v66 = uiLeft + v11;
  v65->defaultPosY = uiTop;
  v65->defaultPosX = v66;
  v5->m_pkPanelTrunBut->orgLeftOffset = orgOffsetX;
  v5->m_pkPanelTrunBut->orgTopOffset = orgOffsetY;
  v5->m_pkPanelTrunBut->m_pkToolTipWin = g_pkToolTipWin;
  v67 = (char *)TextData2::Get(0xAF9A80F7);
  PgWin::SetToolTipWinText((PgWin *)&v5->m_pkPanelTrunBut->vfptr, v67);
  v68 = v96;
  v69 = PgSprData::Create(*v41, "PrePanelNor01", &uiLeft, &uiTop, v96);
  PgWinBut::CreateWin(uiLeft, uiTop, v69, (PgWin *)&v5->vfptr, 1u, 0, 0);
  v70 = PgSprData::Create(*v41, "NextPanelNor01", &uiLeft, &uiTop, v68);
  PgWinBut::CreateWin(uiLeft, uiTop, v70, (PgWin *)&v5->vfptr, 2u, 0, 0);
  if ( PgUtil::GetTriShapeRect(*v41, "PageNum01", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v71 = PgSprData::Create(*v41, "PageNum01", &uiLeft, &uiTop, v68);
    PgWinSpr::CreateWin(uiLeft, uiTop, v71, (PgWin *)&v5->vfptr, 0, 0);
    v72 = Font::Get(SMALL);
    v73 = PgWinText::CreateWin(uiLeft, uiTop + 2, uiWidth, uiHeight, v72, (PgWin *)&v5->vfptr, 0, 0);
    v5->m_pkPageNumTextWin = v73;
    v73->vfptr[122].__vecDelDtor((NiRefObject *)v73, 1u);
    ((void (__stdcall *)(struct D3DXCOLOR *))v5->m_pkPageNumTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
    ((void (__stdcall *)(_DWORD))v5->m_pkPageNumTextWin->vfptr[60].__vecDelDtor)(0);
    sprintf(&string, "%u", v5->m_uiCurPage + 1);
    ((void (__stdcall *)(char *))v5->m_pkPageNumTextWin->vfptr[118].__vecDelDtor)(&string);
    if ( v5->m_bMainWinMode )
    {
      v83 = 1.0;
      v82 = 0.0;
      ((void (__thiscall *)(ShortCutWin *, unsigned int, unsigned int))v5->vfptr[59].__vecDelDtor)(
        v5,
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight);
    }
    else
    {
      v83 = 0.92500001;
      v82 = 0.0;
      ((void (__thiscall *)(ShortCutWin *, unsigned int, unsigned int))v5->vfptr[59].__vecDelDtor)(
        v5,
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight);
      v74 = ((int (__thiscall *)(ShortCutWin *))v5->vfptr[37].__vecDelDtor)(v5);
      v75 = v5->vfptr;
      v76 = v5->m_iSubTabLevel * v74;
      v77 = ((int (__thiscall *)(ShortCutWin *))v5->vfptr[42].__vecDelDtor)(v5);
      v78 = (int)v5->vfptr[41].__vecDelDtor((NiRefObject *)v5, v77 - v76);
      v75[77].__vecDelDtor((NiRefObject *)v5, v78);
      v5->m_uiCurPage = v5->m_iSubTabLevel + 1;
      ShortCutWin::SetPageTextWin(v5);
    }
    v5->vfptr[130].__vecDelDtor((NiRefObject *)v5, 1u);
    v79 = v5->m_bMainWinMode == 0;
    v5->m_uiShortCutStatusIndex = 0;
    if ( v79 )
      v5->m_uiShortCutStatusIndex = v5->m_iSubTabLevel + 1;
    v80 = v5->m_pkSizeBtn->vfptr;
    v81 = ((int (__cdecl *)(_DWORD, _DWORD))v5->m_apkIconWin[(unsigned __int8)byte_B4FFA0[3
                                                                                        * v5->m_uiShortCutStatusIndex]]->vfptr[41].__vecDelDtor)(
            LODWORD(v82),
            LODWORD(v83));
    v80[43].__vecDelDtor((NiRefObject *)v5->m_pkSizeBtn, v81 - 2);
    ShortCutWin::ReflashShortCutWin(v5);
    result = 1;
  }
  else
  {
LABEL_34:
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00589160) --------------------------------------------------------
char __thiscall ShortCutWin::CreatVerticalWin(ShortCutWin *this, PgFrameWork *pkFrameWork, NiPointer<NiNode> *spNode, NiSourceTexture *pkTexture, bool pkMainWinMode)
{
  ShortCutWin *v5; // esi@1
  NiNode *v6; // ST34_4@1
  PgSprData *v7; // eax@1
  char v8; // al@2
  char result; // al@4
  NiNode *v10; // eax@6
  PgSprData *v11; // eax@6
  NiSourceTexture *v12; // eax@6
  NiTexturePalette *v13; // ST44_4@9
  const char *v14; // eax@9
  NiTexturePalette *v15; // ST44_4@12
  const char *v16; // eax@12
  int v17; // edi@13
  PgSprData *v18; // eax@14
  PgWinSpr *v19; // eax@14
  PgSprData *v20; // eax@14
  PgWinSpr *v21; // eax@14
  PgSprData *v22; // eax@14
  PgWinSpr *v23; // eax@14
  ShortCutIconWin *v24; // eax@14
  ClockShadowWin *v25; // eax@14
  NiNode *v26; // eax@16
  int v27; // eax@16
  PgSprData *v28; // eax@19
  PgWinSpr *v29; // eax@19
  PgSprData *v30; // eax@19
  PgWinSpr *v31; // eax@19
  int v32; // eax@19
  NiNode *v33; // eax@22
  PgSprData *v34; // eax@23
  int v35; // edi@23
  PgWinButExt *v36; // eax@23
  int v37; // ecx@23
  PgWinButExt *v38; // eax@23
  PgSprData *v39; // eax@23
  NiNode *v40; // edx@23
  PgWinButExt *v41; // eax@23
  int v42; // ecx@23
  int v43; // edx@23
  int v44; // ecx@23
  PgWinButExt *v45; // eax@23
  char *v46; // eax@23
  PgSprData *v47; // eax@24
  PgWinButExt *v48; // eax@24
  int v49; // ecx@24
  PgWinButExt *v50; // eax@24
  PgSprData *v51; // eax@25
  NiNode *v52; // edx@25
  PgWinButExt *v53; // eax@25
  int v54; // edx@25
  int v55; // edi@25
  PgWinButExt *v56; // eax@25
  char *v57; // eax@25
  NiSourceTexture *v58; // edi@25
  PgSprData *v59; // eax@25
  PgSprData *v60; // eax@25
  PgSprData *v61; // eax@26
  PgFont *v62; // eax@26
  PgWinText *v63; // eax@26
  NiRefObjectVtbl *v64; // edi@27
  int v65; // eax@27
  NiRefObjectVtbl *v66; // edi@28
  int v67; // eax@28
  int v68; // eax@28
  NiRefObjectVtbl *v69; // ebx@28
  int v70; // edi@28
  int v71; // eax@28
  NiRefObjectVtbl *v72; // edi@31
  int v73; // eax@31
  float v74; // [sp+38h] [bp-80h]@27
  unsigned int qSlot02_3Height; // [sp+48h] [bp-70h]@6
  int orgOffsetX; // [sp+4Ch] [bp-6Ch]@25
  int orgOffsetY; // [sp+50h] [bp-68h]@25
  unsigned int qSlot02_2Height; // [sp+54h] [bp-64h]@6
  NiNode *pkEffect; // [sp+58h] [bp-60h]@14
  unsigned int qSlot02_1Height; // [sp+5Ch] [bp-5Ch]@6
  SpEffect *v81; // [sp+60h] [bp-58h]@15
  int tempLeft; // [sp+64h] [bp-54h]@6
  int tempTop; // [sp+68h] [bp-50h]@6
  unsigned int uiHeight; // [sp+6Ch] [bp-4Ch]@6
  unsigned int uiWidth; // [sp+70h] [bp-48h]@6
  NiSourceTexture *v86; // [sp+74h] [bp-44h]@1
  int uiTopOffset; // [sp+78h] [bp-40h]@6
  int i; // [sp+7Ch] [bp-3Ch]@1
  int uiTop; // [sp+80h] [bp-38h]@1
  int uiLeft; // [sp+84h] [bp-34h]@1
  char string; // [sp+88h] [bp-30h]@26
  int v92; // [sp+B4h] [bp-4h]@15

  v5 = this;
  i = (int)pkFrameWork;
  v6 = spNode->m_pObject;
  v86 = pkTexture;
  v7 = PgSprData::Create((NiAVObject *)&v6->vfptr, "Frame02", &uiLeft, &uiTop, pkTexture);
  if ( pkMainWinMode )
    v8 = PgWinFrame::Create((PgWinFrame *)&v5->vfptr, 0, 0, v7, 0, (PgFrameWork *)i, "ShortCutVerticalWin", 0);
  else
    v8 = PgWinFrame::Create((PgWinFrame *)&v5->vfptr, 0, 0, v7, 0, (PgFrameWork *)i, "ShortCutVerticalSubWin", 0);
  if ( !v8 )
    goto LABEL_34;
  PgUtil::GetTriShapeRect((NiAVObject *)&spNode->m_pObject->vfptr, "Panel02", &tempLeft, &tempTop, &uiWidth, &uiHeight);
  v10 = spNode->m_pObject;
  uiTopOffset = uiHeight + tempTop;
  v11 = PgSprData::Create((NiAVObject *)&v10->vfptr, "Panel02", &uiLeft, &uiTop, pkTexture);
  PgWinSpr::CreateWin(uiLeft, uiTop, v11, (PgWin *)&v5->vfptr, 0, 0);
  PgUtil::GetTriShapeRect(
    (NiAVObject *)&spNode->m_pObject->vfptr,
    "QSlot02_1",
    &tempLeft,
    &tempTop,
    &uiWidth,
    &qSlot02_1Height);
  v5->m_iIconWinSizeHeight = qSlot02_1Height;
  PgUtil::GetTriShapeRect(
    (NiAVObject *)&spNode->m_pObject->vfptr,
    "QSlot02_2",
    &tempLeft,
    &tempTop,
    &uiWidth,
    &qSlot02_2Height);
  v5->m_iIconWinSizeHeight += qSlot02_2Height;
  PgUtil::GetTriShapeRect(
    (NiAVObject *)&spNode->m_pObject->vfptr,
    "QSlot02_3",
    &tempLeft,
    &tempTop,
    &uiWidth,
    &qSlot02_3Height);
  v5->m_iIconWinSizeHeight += qSlot02_3Height;
  v12 = MenuTexMgr::GetTexture(0xEu);
  v5->m_pkNumberTexture = v12;
  if ( !v12 )
    goto LABEL_34;
  i = (int)pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v13 = (NiTexturePalette *)i;
  v14 = Folder::Merge(&Folder::m_acMenu, "Game\\MainNumber.nif");
  PgUtil::LoadNodeNifFile(v14, &v5->m_spNumberPosNode, v13);
  if ( !v5->m_spNumberPosNode.m_pObject )
    goto LABEL_34;
  i = (int)pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v15 = (NiTexturePalette *)i;
  v16 = Folder::Merge(&Folder::m_acMenu, "Game\\MainNumber.nif");
  PgUtil::LoadNodeNifFile(v16, &v5->m_spNumberNode, v15);
  if ( !v5->m_spNumberNode.m_pObject )
    goto LABEL_34;
  i = 0;
  v17 = (int)v5->m_apkIconWin;
  do
  {
    v18 = PgSprData::Create((NiAVObject *)&spNode->m_pObject->vfptr, "QSlot02_1", &uiLeft, &uiTop, v86);
    v19 = PgWinSpr::CreateWin(uiLeft, uiTopOffset, v18, (PgWin *)&v5->vfptr, 0, 0);
    *(_DWORD *)(v17 + 352) = v19;
    v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
    v20 = PgSprData::Create((NiAVObject *)&spNode->m_pObject->vfptr, "QSlot02_2", &uiLeft, &uiTop, v86);
    v21 = PgWinSpr::CreateWin(0, qSlot02_1Height, v20, *(PgWin **)(v17 + 352), 0, 0);
    *(_DWORD *)(v17 + 424) = v21;
    v21->vfptr[60].__vecDelDtor((NiRefObject *)v21, 0);
    v22 = PgSprData::Create((NiAVObject *)&spNode->m_pObject->vfptr, "QSlot02_3", &uiLeft, &uiTop, v86);
    v23 = PgWinSpr::CreateWin(0, qSlot02_1Height + qSlot02_2Height, v22, *(PgWin **)(v17 + 352), 0, 0);
    *(_DWORD *)(v17 + 496) = v23;
    v23->vfptr[60].__vecDelDtor((NiRefObject *)v23, 0);
    v24 = ShortCutIconWin::CreateWin(uiLeft + 4, uiTopOffset + 3, i, (PgWin *)&v5->vfptr);
    *(_DWORD *)v17 = v24;
    v24->vfptr[129].__vecDelDtor((NiRefObject *)v24, 3u);
    (*(void (__stdcall **)(signed int))(**(_DWORD **)v17 + 560))(4);
    *(_DWORD *)(*(_DWORD *)v17 + 304) = 1;
    ShortCutIconWin::SetShortCut(*(ShortCutIconWin **)v17, 0);
    IconWin::ShowFocus(*(IconWin **)v17, 1);
    v25 = ClockShadowWin::CreateWin(uiLeft + 4, uiTopOffset + 3, (PgWin *)&v5->vfptr);
    *(_DWORD *)(v17 + 72) = v25;
    v25->m_uFlags |= 1u;
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v17 + 72) + 240))(0);
    pkEffect = EffectMgr::GetEffectNode(&g_kEffectMgr, "WeaponTitle");
    if ( pkEffect )
    {
      v81 = (SpEffect *)operator new(0x44u);
      v92 = 0;
      if ( v81 )
      {
        v26 = (NiNode *)NiObject::Clone((NiObject *)&pkEffect->vfptr);
        SpEffect::SpEffect(v81, v26);
        v92 = -1;
        *(_DWORD *)(v17 + 164) = v27;
      }
      else
      {
        v92 = -1;
        *(_DWORD *)(v17 + 164) = 0;
      }
    }
    else
    {
      *(_DWORD *)(v17 + 164) = 0;
    }
    v28 = PgSprData::Create(
            (NiAVObject *)&v5->m_spNumberNode.m_pObject->vfptr,
            "ShiftPlus",
            &uiLeft,
            &uiTop,
            v5->m_pkNumberTexture);
    v29 = PgWinSpr::CreateWin(6, uiTopOffset + 4, v28, (PgWin *)&v5->vfptr, 0, 0);
    *(_DWORD *)(v17 + 652) = v29;
    v29->vfptr[60].__vecDelDtor((NiRefObject *)v29, 0);
    v30 = PgSprData::Create(
            (NiAVObject *)&v5->m_spNumberNode.m_pObject->vfptr,
            "48",
            &uiLeft,
            &uiTop,
            v5->m_pkNumberTexture);
    v31 = PgWinSpr::CreateWin(25, uiTopOffset + 2, v30, (PgWin *)&v5->vfptr, 0, 0);
    *(_DWORD *)(v17 + 568) = v31;
    v31->vfptr[60].__vecDelDtor((NiRefObject *)v31, 0);
    v32 = i;
    uiTopOffset += v5->m_iIconWinSizeHeight;
    if ( i > 11 )
    {
      ShortCutWin::SetHotKeyWin(v5, i, "SmallNumTrans02");
      ShortCutWin::SetHotKeyPlusWin(v5, i, "SmallNumTrans01");
      v32 = i;
    }
    v17 += 4;
    i = v32 + 1;
  }
  while ( v32 + 1 < 18 );
  v33 = spNode->m_pObject;
  if ( pkMainWinMode )
  {
    v34 = PgSprData::Create((NiAVObject *)&v33->vfptr, "MovePanelBtn02", &uiLeft, &uiTop, v86);
    v35 = uiTopOffset;
    v36 = PgWinButExt::CreateWin(uiLeft, uiTopOffset, v34, (PgWin *)&v5->vfptr, 0, 0, 0);
    v37 = uiLeft;
    v5->m_pkSizeBtn = v36;
    v36->firstPosX = v37;
    v36->firstPosY = v35;
    v38 = v5->m_pkSizeBtn;
    v38->defaultPosX = uiLeft;
    v38->defaultPosY = v35;
    v5->m_pkSizeBtn->shortCutSizeMode = 1;
    v5->m_pkSizeBtn->m_bIsVerticalMode = 1;
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode->m_pObject->vfptr,
      "SubPanelBtnNor02",
      (int *)&v81,
      (int *)&pkEffect,
      &uiWidth,
      &uiHeight);
    v39 = PgSprData::Create((NiAVObject *)&spNode->m_pObject->vfptr, "SubPanelBtnNor02", &uiLeft, &uiTop, v86);
    v40 = spNode->m_pObject;
    i = (int)v39;
    PgSprData::Add(v39, (NiAVObject *)&v40->vfptr, "SubPanelBtnNor02");
    PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode->m_pObject->vfptr, "SubPanelBtnOver02");
    v41 = PgWinButExt::CreateWin(uiLeft, v35 + uiTop, (PgSprData *)i, (PgWin *)&v5->vfptr, 6u, 0, 0);
    v42 = v35 + uiTop;
    v43 = uiLeft;
    v5->m_pkSubPanelBut = v41;
    v41->firstPosY = v42;
    v41->firstPosX = v43;
    v44 = v35 + uiTop;
    v45 = v5->m_pkSubPanelBut;
    v45->defaultPosX = uiLeft;
    v45->defaultPosY = v44;
    v5->m_pkSubPanelBut->orgLeftOffset = (int)v81;
    v5->m_pkSubPanelBut->orgTopOffset = (int)pkEffect;
    v5->m_pkSubPanelBut->m_pkToolTipWin = g_pkToolTipWin;
    v46 = (char *)TextData2::Get(0x669A82A9u);
    PgWin::SetToolTipWinText((PgWin *)&v5->m_pkSubPanelBut->vfptr, v46);
  }
  else
  {
    v47 = PgSprData::Create((NiAVObject *)&v33->vfptr, "MovePanel02", &uiLeft, &uiTop, v86);
    v35 = uiTopOffset;
    v48 = PgWinButExt::CreateWin(uiLeft, uiTopOffset, v47, (PgWin *)&v5->vfptr, 0, 0, 0);
    v49 = uiLeft;
    v5->m_pkSizeBtn = v48;
    v48->firstPosX = v49;
    v48->firstPosY = v35;
    v50 = v5->m_pkSizeBtn;
    v50->defaultPosX = uiLeft;
    v50->defaultPosY = v35;
    v5->m_pkSizeBtn->shortCutSizeMode = 1;
    v5->m_pkSizeBtn->m_bIsVerticalMode = 1;
  }
  PgUtil::GetTriShapeRect(
    (NiAVObject *)&spNode->m_pObject->vfptr,
    "PanelTurnBtnNor02",
    &orgOffsetX,
    &orgOffsetY,
    &uiWidth,
    &uiHeight);
  v51 = PgSprData::Create((NiAVObject *)&spNode->m_pObject->vfptr, "PanelTurnBtnNor02", &uiLeft, &uiTop, v86);
  v52 = spNode->m_pObject;
  i = (int)v51;
  PgSprData::Add(v51, (NiAVObject *)&v52->vfptr, "PanelTurnBtnNor02");
  PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode->m_pObject->vfptr, "PanelTurnBtnOver02");
  v53 = PgWinButExt::CreateWin(uiLeft, v35 + uiTop, (PgSprData *)i, (PgWin *)&v5->vfptr, 5u, 0, 0);
  v54 = uiTop;
  v5->m_pkPanelTrunBut = v53;
  v53->firstPosX = uiLeft;
  v53->firstPosY = v35 + v54;
  v55 = uiTop + v35;
  v56 = v5->m_pkPanelTrunBut;
  v56->defaultPosX = uiLeft;
  v56->defaultPosY = v55;
  v5->m_pkPanelTrunBut->orgLeftOffset = orgOffsetX;
  v5->m_pkPanelTrunBut->orgTopOffset = orgOffsetY;
  v5->m_pkPanelTrunBut->m_pkToolTipWin = g_pkToolTipWin;
  v57 = (char *)TextData2::Get(0xAF9A80F7);
  PgWin::SetToolTipWinText((PgWin *)&v5->m_pkPanelTrunBut->vfptr, v57);
  v58 = v86;
  v59 = PgSprData::Create((NiAVObject *)&spNode->m_pObject->vfptr, "PrePanelNor02", &uiLeft, &uiTop, v86);
  PgWinBut::CreateWin(uiLeft, uiTop, v59, (PgWin *)&v5->vfptr, 1u, 0, 0);
  v60 = PgSprData::Create((NiAVObject *)&spNode->m_pObject->vfptr, "NextPanelNor02", &uiLeft, &uiTop, v58);
  PgWinBut::CreateWin(uiLeft, uiTop, v60, (PgWin *)&v5->vfptr, 2u, 0, 0);
  if ( PgUtil::GetTriShapeRect(
         (NiAVObject *)&spNode->m_pObject->vfptr,
         "PageNum02",
         &uiLeft,
         &uiTop,
         &uiWidth,
         &uiHeight) )
  {
    v61 = PgSprData::Create((NiAVObject *)&spNode->m_pObject->vfptr, "PageNum02", &uiLeft, &uiTop, v58);
    PgWinSpr::CreateWin(uiLeft, uiTop, v61, (PgWin *)&v5->vfptr, 0, 0);
    v62 = Font::Get(SMALL);
    v63 = PgWinText::CreateWin(uiLeft, uiTop + 2, uiWidth, uiHeight, v62, (PgWin *)&v5->vfptr, 0, 0);
    v5->m_pkPageNumTextWin = v63;
    v63->vfptr[122].__vecDelDtor((NiRefObject *)v63, 1u);
    ((void (__stdcall *)(struct D3DXCOLOR *))v5->m_pkPageNumTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
    ((void (__stdcall *)(_DWORD))v5->m_pkPageNumTextWin->vfptr[60].__vecDelDtor)(0);
    sprintf(&string, "%u", v5->m_uiCurPage + 1);
    ((void (__stdcall *)(char *))v5->m_pkPageNumTextWin->vfptr[118].__vecDelDtor)(&string);
    if ( pkMainWinMode )
    {
      v74 = 1.0;
      ((void (__thiscall *)(ShortCutWin *, unsigned int, unsigned int))v5->vfptr[59].__vecDelDtor)(
        v5,
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight);
      v64 = v5->vfptr;
      v65 = (int)v5->vfptr[41].__vecDelDtor((NiRefObject *)v5, 160u);
      v64[77].__vecDelDtor((NiRefObject *)v5, v65);
    }
    else
    {
      v74 = 0.94499999;
      ((void (__thiscall *)(ShortCutWin *, unsigned int, unsigned int))v5->vfptr[59].__vecDelDtor)(
        v5,
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight);
      v66 = v5->vfptr;
      v67 = (int)v5->vfptr[41].__vecDelDtor((NiRefObject *)v5, 160u);
      v66[77].__vecDelDtor((NiRefObject *)v5, v67);
      v68 = ((int (__thiscall *)(ShortCutWin *))v5->vfptr[36].__vecDelDtor)(v5);
      v69 = v5->vfptr;
      v70 = v5->m_iSubTabLevel * v68;
      v71 = (int)v5->vfptr[41].__vecDelDtor((NiRefObject *)v5, 160u);
      v69[77].__vecDelDtor((NiRefObject *)v5, v71 - v70);
      v5->m_uiCurPage = v5->m_iSubTabLevel + 1;
      ShortCutWin::SetPageTextWin(v5);
    }
    v5->vfptr[130].__vecDelDtor((NiRefObject *)v5, 1u);
    v5->m_uiShortCutStatusIndex = 0;
    if ( !pkMainWinMode )
      v5->m_uiShortCutStatusIndex = v5->m_iSubTabLevel + 1;
    v72 = v5->m_pkSizeBtn->vfptr;
    v73 = ((int (__cdecl *)(_DWORD, _DWORD))v5->m_apkIconWin[(unsigned __int8)byte_B4FFA0[3
                                                                                        * v5->m_uiShortCutStatusIndex]]->vfptr[42].__vecDelDtor)(
            LODWORD(v74),
            0.0);
    v72[44].__vecDelDtor((NiRefObject *)v5->m_pkSizeBtn, v73 - 3);
    ShortCutWin::ReflashShortCutWin(v5);
    result = 1;
  }
  else
  {
LABEL_34:
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00589B70) --------------------------------------------------------
void __userpurge ShortCutWin::ProcessMeInput(ShortCutWin *this@<ecx>, int a2@<ebx>, bool *bHit)
{
  ShortCutWin *v3; // esi@1
  int v4; // eax@2
  NiRefObjectVtbl *v5; // edi@5
  int v6; // eax@5
  NiRefObjectVtbl *v7; // edi@6
  int v8; // eax@6
  PgWinButExt *v9; // edx@11
  NiRefObjectVtbl *v10; // ebx@15
  unsigned int v11; // edi@15
  int v12; // eax@15
  void *(__thiscall *v13)(NiRefObject *, unsigned int); // edx@15
  NiRefObjectVtbl *v14; // ebx@18
  PgWinButExt *v15; // edi@21
  int v16; // ebx@21
  ShortCutIconWin *v17; // ecx@22
  NiRefObjectVtbl *v18; // edi@23
  void *(__thiscall *v19)(NiRefObject *, unsigned int); // edx@23
  PgWinButExt *v20; // edi@24
  int v21; // ebx@24
  ShortCutIconWin *v22; // edi@26
  int v23; // ebx@26
  ShortCutIconWin *v24; // ecx@27
  ShortCutIconWin *v25; // edi@28
  int v26; // ebx@28
  NiRefObjectVtbl *v27; // edi@30
  int v28; // [sp-8h] [bp-Ch]@12

  v3 = this;
  PgWinFrame::ProcessMeInput((PgWinFrame *)&this->vfptr, bHit);
  if ( v3->m_pkSizeBtn )
  {
    v4 = (unsigned __int8)byte_B4FFA0[3 * v3->m_uiShortCutStatusIndex];
    if ( !ShortCutWin::ms_bShortCutSizeFinish && !g_pkMouse->m_akButtons[0].m_bPressed )
    {
      ShortCutWin::ms_bShortCutSizeFinish = 1;
      if ( v3->m_bVerticalMode )
      {
        v5 = v3->m_pkSizeBtn->vfptr;
        v6 = ((int (*)(void))v3->m_apkIconWin[v4]->vfptr[42].__vecDelDtor)();
        v5[44].__vecDelDtor((NiRefObject *)v3->m_pkSizeBtn, v6 - 3);
      }
      else
      {
        v7 = v3->m_pkSizeBtn->vfptr;
        v8 = ((int (*)(void))v3->m_apkIconWin[v4]->vfptr[41].__vecDelDtor)();
        v7[43].__vecDelDtor((NiRefObject *)v3->m_pkSizeBtn, v8 - 2);
      }
      ShortCutWin::ReflashShortCutWin(v3);
    }
    if ( v3->m_pkSizeBtn->m_bIsDrag )
    {
      if ( !g_pkMouse->m_akButtons[0].m_bPressed )
        return;
      ShortCutWin::ms_bShortCutSizeFinish = 0;
    }
    v9 = v3->m_pkSizeBtn;
    if ( v9->m_bIsDrag )
    {
      v28 = a2;
      if ( v3->m_bVerticalMode )
      {
        if ( PgWin::ms_iMsDeltaY < 0 || PgWin::ms_iMsDeltaY > 0 )
        {
          v10 = v9->vfptr;
          v11 = PgWin::ms_iMsY - ((unsigned int)((int (__stdcall *)(int))v9->vfptr[37].__vecDelDtor)(v28) >> 1);
          v12 = ((int (__thiscall *)(ShortCutWin *))v3->vfptr[42].__vecDelDtor)(v3);
          v13 = v10[44].__vecDelDtor;
LABEL_19:
          v28 = v11 - v12;
          ((void (__thiscall *)(PgWinButExt *))v13)(v3->m_pkSizeBtn);
          goto LABEL_20;
        }
      }
      else if ( PgWin::ms_iMsDeltaX < 0 || PgWin::ms_iMsDeltaX > 0 )
      {
        v14 = v9->vfptr;
        v11 = PgWin::ms_iMsX - ((unsigned int)((int (__stdcall *)(int))v9->vfptr[36].__vecDelDtor)(v28) >> 1);
        v12 = ((int (__thiscall *)(ShortCutWin *))v3->vfptr[41].__vecDelDtor)(v3);
        v13 = v14[43].__vecDelDtor;
        goto LABEL_19;
      }
LABEL_20:
      if ( v3->m_bVerticalMode )
      {
        v15 = v3->m_pkSizeBtn;
        v16 = ((int (*)(void))v3->m_apkIconWin[1]->vfptr[42].__vecDelDtor)();
        if ( ((int (__thiscall *)(PgWinButExt *))v15->vfptr[42].__vecDelDtor)(v15) < v16 )
        {
          v17 = v3->m_apkIconWin[1];
LABEL_23:
          v18 = v3->m_pkSizeBtn->vfptr;
          ((void (__stdcall *)(int))v17->vfptr[42].__vecDelDtor)(v28);
          v19 = v18[44].__vecDelDtor;
LABEL_31:
          ((void (__thiscall *)(PgWinButExt *))v19)(v3->m_pkSizeBtn);
          goto LABEL_32;
        }
        v20 = v3->m_pkSizeBtn;
        v21 = ((int (*)(void))v3->m_apkIconWin[17]->vfptr[42].__vecDelDtor)();
        if ( ((int (__thiscall *)(PgWinButExt *))v20->vfptr[42].__vecDelDtor)(v20) > v21 )
        {
          v17 = v3->m_apkIconWin[17];
          goto LABEL_23;
        }
LABEL_32:
        ShortCutWin::ReflashShortCutWin(v3);
        return;
      }
      v22 = v3->m_apkIconWin[1];
      v23 = ((int (*)(void))v3->m_pkSizeBtn->vfptr[41].__vecDelDtor)();
      if ( v23 >= ((int (__thiscall *)(ShortCutIconWin *))v22->vfptr[41].__vecDelDtor)(v22) )
      {
        v25 = v3->m_apkIconWin[17];
        v26 = ((int (*)(void))v3->m_pkSizeBtn->vfptr[41].__vecDelDtor)();
        if ( v26 <= ((int (__thiscall *)(ShortCutIconWin *))v25->vfptr[41].__vecDelDtor)(v25) )
          goto LABEL_32;
        v24 = v3->m_apkIconWin[17];
      }
      else
      {
        v24 = v3->m_apkIconWin[1];
      }
      v27 = v3->m_pkSizeBtn->vfptr;
      ((void (__stdcall *)(int))v24->vfptr[41].__vecDelDtor)(v28);
      v19 = v27[43].__vecDelDtor;
      goto LABEL_31;
    }
  }
}
// 589B70: could not find valid save-restore pair for ebx
// A8C4A8: using guessed type struct NiInputMouse *g_pkMouse;
// A8E09C: using guessed type bool ShortCutWin::ms_bShortCutSizeFinish;

//----- (00589E10) --------------------------------------------------------
void __thiscall ShortCutWin::OnCommand(ShortCutWin *this, unsigned int wParam, int lParam)
{
  ShortCutWin *v3; // esi@1
  unsigned int v4; // eax@8
  int v5; // eax@9
  PgMsg::Frame *v6; // ecx@11
  unsigned int v7; // eax@14
  int v8; // eax@15
  PgMsg::Frame *v9; // ecx@17
  unsigned int v10; // eax@20
  ShortCutItem *v11; // ebx@21
  unsigned __int16 v12; // ax@22
  Item *v13; // edi@23
  signed int v14; // eax@24
  bool v15; // cf@24
  Item *v16; // ecx@26
  ActionEffectItem *v17; // eax@31
  ItemActionEffectDesc *v18; // eax@32
  unsigned int v19; // eax@35
  ShortCutInvPosItem *v20; // eax@36
  unsigned int v21; // ecx@37
  Item *v22; // ecx@38
  unsigned int v23; // eax@41
  int v24; // eax@42
  PremiumActionWin *v25; // ecx@43

  v3 = this;
  switch ( wParam )
  {
    case 1u:
      ShortCutWin::OnCmdPrev(this);
      ShortCutWin::ReflashHotKey(v3);
      break;
    case 2u:
      ShortCutWin::OnCmdNext(this);
      ShortCutWin::ReflashHotKey(v3);
      break;
    case 3u:
      ShortCutWin::OnCmdShortCutLClick(this, lParam);
      break;
    case 4u:
      ShortCutWin::OnCmdShortCutRClick(this, lParam);
      break;
    case 5u:
      ShortCutWin::OnCmdPanelTurn(this);
      ShortCutMgr::SetShortCutSizeChanged(&g_kShortCutMgr, 1);
      break;
    case 6u:
      ShortCutMgr::SetShortCutSizeChanged(&g_kShortCutMgr, 1);
      ShortCutWin::OnCmdSubPanel(v3);
      break;
    case 7u:
      v4 = lParam + 18 * this->m_uiCurPage;
      if ( v4 < 0x64 )
        v5 = (int)*(&ptr + v4);
      else
        v5 = 0;
      v6 = this->m_pkFrameWork[21].m_kMsgQ.m_pBase;
      if ( v6 )
      {
        if ( v5 )
          ActionWin::OnDefaultAction((ActionWin *)v6, *(_DWORD *)(v5 + 16));
      }
      break;
    case 8u:
      v7 = lParam + 18 * this->m_uiCurPage;
      if ( v7 < 0x64 )
        v8 = (int)*(&ptr + v7);
      else
        v8 = 0;
      v9 = this->m_pkFrameWork[21].m_kMsgQ.m_pBase;
      if ( v9 && v8 )
        ActionWin::OnEmotionAction((ActionWin *)v9, *(_DWORD *)(v8 + 16));
      break;
    case 9u:
      v10 = lParam + 18 * this->m_uiCurPage;
      if ( v10 < 0x64 )
      {
        v11 = *(&ptr + v10);
        if ( v11 )
        {
          v12 = v11->m_kItemID;
          if ( v12 != -1 )
          {
            v13 = Inventory::GetItemByID(&g_kInventory, v12);
            if ( v13 )
            {
              v14 = 0;
              v15 = 1;
              while ( 1 )
              {
                if ( v15 )
                {
                  v16 = g_kInventory.m_aspEquip[v14].m_pObject;
                  if ( v16 )
                  {
                    if ( v13->m_kStruct.itemid == v16->m_kStruct.itemid )
                      break;
                  }
                }
                v15 = (unsigned int)++v14 < 0x1E;
                if ( v14 >= 30 )
                {
                  GameFrameWork::OnShortCutRClickItemNormalMode((GameFrameWork *)v3->m_pkFrameWork, v13, v11, 1u);
                  return;
                }
              }
              v17 = ActionEffectItemTab::GetByItemID(v13->m_kStruct.itemid);
              if ( v17 )
              {
                v18 = ItemActionEffectDescTab::GetByItemActionID(v17->ItemActionID);
                if ( v18 )
                {
                  if ( v18->UseItem )
                    GameFrameWork::OnShortCutRClickItemUseMode((GameFrameWork *)v3->m_pkFrameWork, v13, v11, 1u);
                }
              }
            }
          }
        }
      }
      break;
    case 0xAu:
      v19 = lParam + 18 * this->m_uiCurPage;
      if ( v19 < 0x64 )
      {
        v20 = (ShortCutInvPosItem *)*(&ptr + v19);
        if ( v20 )
        {
          v21 = v20->m_uiInvPos;
          if ( v21 < 0xC0 )
          {
            v22 = g_kInventory.m_aspInv[v21].m_pObject;
            if ( v22 )
            {
              if ( v22->m_kStruct.itemid != -1 )
                GameFrameWork::OnShortCutRClickItemNormalMode((GameFrameWork *)v3->m_pkFrameWork, v22, v20, 1u);
            }
          }
        }
      }
      break;
    case 0xBu:
      v23 = lParam + 18 * this->m_uiCurPage;
      if ( v23 < 0x64 )
      {
        v24 = (int)*(&ptr + v23);
        if ( v24 )
        {
          v25 = (PremiumActionWin *)this->m_pkFrameWork[21].m_kMsgQ.m_pBase[29].m_uiDumy[1];
          if ( v25 )
            PremiumActionWin::OnEmotionAction(v25, *(_DWORD *)(v24 + 16));
        }
      }
      break;
    default:
      return;
  }
}

//----- (0058A0C0) --------------------------------------------------------
char __thiscall ShortCutWin::Create(ShortCutWin *this, PgFrameWork *pkFrameWork, bool bVertical, bool bMainWin, int tabLevel)
{
  ShortCutWin *v5; // esi@1
  bool v6; // bl@1
  bool v7; // cl@1
  NiSourceTexture *v8; // edi@1
  void (__thiscall ***v9)(_DWORD, _DWORD); // esi@2
  NiTexturePalette *v11; // ST0C_4@9
  const char *v12; // eax@9
  char v13; // al@11
  char v14; // bl@13
  void (__thiscall ***v15)(_DWORD, _DWORD); // esi@14
  bool v16; // [sp-4h] [bp-20h]@10

  v5 = this;
  v6 = bVertical;
  v7 = bMainWin;
  v5->m_iSubTabLevel = tabLevel;
  v5->m_bVerticalMode = v6;
  v5->m_bMainWinMode = v7;
  *(_DWORD *)&bVertical = 0;
  v8 = MenuTexMgr::GetTexture(4u);
  if ( !v8 )
  {
    v9 = (void (__thiscall ***)(_DWORD, _DWORD))bVertical;
    if ( bVertical && !InterlockedDecrement((volatile LONG *)(bVertical + 4)) )
    {
      if ( v9 )
        (**v9)(v9, 1);
    }
    return 0;
  }
  *(_DWORD *)&bMainWin = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v11 = (NiTexturePalette *)bMainWin;
  v12 = Folder::Merge(&Folder::m_acMenu, "Game\\QuickSlot.nif");
  PgUtil::LoadNodeNifFile(v12, (NiPointer<NiNode> *)&bVertical, v11);
  if ( !bVertical )
    return 0;
  *(_DWORD *)&v5->m_abClockShadowWinActive[0] = 0;
  *(_DWORD *)&v5->m_abClockShadowWinActive[4] = 0;
  *(_DWORD *)&v5->m_abClockShadowWinActive[8] = 0;
  *(_DWORD *)&v5->m_abClockShadowWinActive[12] = 0;
  *(_WORD *)&v5->m_abClockShadowWinActive[16] = 0;
  v16 = v5->m_bMainWinMode;
  if ( v6 )
    v13 = ShortCutWin::CreatVerticalWin(v5, pkFrameWork, (NiPointer<NiNode> *)&bVertical, v8, v16);
  else
    v13 = ShortCutWin::CreatHorizontalWin(v5, pkFrameWork, (NiPointer<NiNode> *)&bVertical, v8, v16);
  v14 = v13;
  if ( bVertical )
  {
    v15 = (void (__thiscall ***)(_DWORD, _DWORD))bVertical;
    if ( !InterlockedDecrement((volatile LONG *)(bVertical + 4)) )
    {
      if ( v15 )
        (**v15)(v15, 1);
    }
  }
  return v14;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0058A230) --------------------------------------------------------
char __thiscall ShortCutMgr::SetShortCut(ShortCutMgr *this, ShortCut *pkShortCut, unsigned int uiIndex, bool bSave)
{
  char result; // al@2
  ShortCut *v5; // edi@3
  int v6; // eax@12
  ShortCutMgr *v7; // [sp+8h] [bp-108h]@1
  char temp[256]; // [sp+Ch] [bp-104h]@10

  v7 = this;
  if ( uiIndex < 0x64 )
  {
    v5 = this->m_aspShortCut[uiIndex].m_pObject;
    if ( v5 != pkShortCut )
    {
      if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      v7->m_aspShortCut[uiIndex].m_pObject = pkShortCut;
      if ( pkShortCut )
        InterlockedIncrement((volatile LONG *)&pkShortCut->m_uiRefCount);
    }
    temp[0] = 0;
    memset(&temp[1], 0, 0xFFu);
    if ( pkShortCut )
    {
      v6 = ((int (__thiscall *)(_DWORD))pkShortCut->vfptr[1].__vecDelDtor)(pkShortCut);
      sprintf(temp, "SetShortCut : Type = %d. To = %d\n", v6, uiIndex);
    }
    else
    {
      sprintf(temp, "SetShortCut : Type = NULL. To = %d\n", uiIndex);
    }
    OutputDebugStringA(temp);
    v7->m_bShortCutChanged = 1;
    if ( bSave == 1 )
      ShortCutMgr::ChangeIndex(v7, uiIndex);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0058A340) --------------------------------------------------------
void __thiscall PgWin::UpdateChildWin(PgWin *this, float fCurTime)
{
  PgWin *v2; // ebx@1
  PgWin *v3; // esi@1
  unsigned int i; // edi@2
  NiPointer<NiAVObject> *v5; // ecx@4
  NiRTTI *v6; // eax@5
  unsigned int uiPos; // [sp+14h] [bp-4h]@1

  v2 = this;
  uiPos = 0;
  v3 = PgWin::GetNextChildWin(this, &uiPos);
  if ( v3 )
  {
    for ( i = uiPos; ; ++i )
    {
      v3->vfptr[81].__vecDelDtor((NiRefObject *)v3, LODWORD(fCurTime));
      PgWin::UpdateChildWin(v3, fCurTime);
      if ( i >= v2->m_kChildren.m_uiSize )
        break;
      while ( 1 )
      {
        v5 = v2->m_kChildren.m_pBase;
        v3 = (PgWin *)v5[i].m_pObject;
        if ( v3 )
        {
          v6 = (NiRTTI *)((int (__thiscall *)(_DWORD))v3->vfptr[1].__vecDelDtor)(v5[i].m_pObject);
          if ( v6 )
            break;
        }
LABEL_8:
        if ( ++i >= v2->m_kChildren.m_uiSize )
          return;
      }
      while ( v6 != &PgWin::m_RTTI )
      {
        v6 = v6->m_pkBaseRTTI;
        if ( !v6 )
          goto LABEL_8;
      }
    }
  }
}

//----- (0058A3E0) --------------------------------------------------------
ItemAction *__cdecl ItemActionTab::GetByItemActionID(unsigned int uiIndex)
{
  unsigned int v1; // esi@1
  char *v2; // eax@2
  ItemAction *result; // eax@5

  v1 = 0;
  if ( ItemActionTab::GetTotal() )
  {
    while ( 1 )
    {
      v2 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemAction,ItemActionTab>::ms_pkTable + 4), v1);
      if ( v2 )
      {
        if ( *(_WORD *)v2 == uiIndex )
          break;
      }
      if ( ++v1 >= ItemActionTab::GetTotal() )
        goto LABEL_5;
    }
    result = (ItemAction *)CDataReader::GetRecord(
                             (CDataReader *)(ITableBase<ItemAction,ItemActionTab>::ms_pkTable + 4),
                             v1);
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}
// A8C1AC: using guessed type int ITableBase<ItemAction,ItemActionTab>::ms_pkTable;

//----- (0058A430) --------------------------------------------------------
ShortCutIconWin *__thiscall ShortCutIconWin::`vector deleting destructor'(ShortCutIconWin *this, unsigned int a2)
{
  ShortCutIconWin *v2; // esi@1

  v2 = this;
  ShortCutIconWin::~ShortCutIconWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0058A460) --------------------------------------------------------
ShortCutWin *__thiscall ShortCutWin::`vector deleting destructor'(ShortCutWin *this, unsigned int a2)
{
  ShortCutWin *v2; // esi@1

  v2 = this;
  ShortCutWin::~ShortCutWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0058A490) --------------------------------------------------------
void __thiscall SkillInfoWin::HideAllMoneyWin(SkillInfoWin *this)
{
  SkillInfoWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkGemIcon->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkGoldIcon->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkSilverIcon->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkCopperIcon->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkGemText->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkGoldText->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkSilverText->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkCopperText->vfptr[64].__vecDelDtor)(0);
}

//----- (0058A530) --------------------------------------------------------
BOOL __thiscall SkillInfoWin::IsMoneyShow(SkillInfoWin *this)
{
  SkillInfoWin *v1; // esi@1

  v1 = this;
  return (unsigned __int8)((int (*)(void))this->m_pkGemIcon->vfptr[65].__vecDelDtor)()
      || (unsigned __int8)((int (*)(void))v1->m_pkGoldIcon->vfptr[65].__vecDelDtor)()
      || (unsigned __int8)((int (*)(void))v1->m_pkSilverIcon->vfptr[65].__vecDelDtor)()
      || (unsigned __int8)((int (*)(void))v1->m_pkCopperIcon->vfptr[65].__vecDelDtor)();
}

//----- (0058A590) --------------------------------------------------------
int __thiscall SkillInfoWin::GetMoneyWinWidth(SkillInfoWin *this)
{
  SkillInfoWin *v1; // esi@1
  int v2; // edi@1
  int result; // eax@8

  v1 = this;
  v2 = 0;
  if ( (unsigned __int8)((int (*)(void))this->m_pkGemIcon->vfptr[65].__vecDelDtor)() )
    v2 = ((int (*)(void))v1->m_pkGemText->vfptr[36].__vecDelDtor)() + v1->m_uiIconWidth + 2;
  if ( (unsigned __int8)((int (*)(void))v1->m_pkGoldIcon->vfptr[65].__vecDelDtor)() )
    v2 += v1->m_uiIconWidth + ((int (*)(void))v1->m_pkGoldText->vfptr[36].__vecDelDtor)() + 2;
  if ( (unsigned __int8)((int (*)(void))v1->m_pkSilverIcon->vfptr[65].__vecDelDtor)() )
    v2 += v1->m_uiIconWidth + ((int (*)(void))v1->m_pkSilverText->vfptr[36].__vecDelDtor)() + 2;
  if ( (unsigned __int8)((int (*)(void))v1->m_pkCopperIcon->vfptr[65].__vecDelDtor)() )
    result = v2 + v1->m_uiIconWidth + ((int (*)(void))v1->m_pkCopperText->vfptr[36].__vecDelDtor)() + 2;
  else
    result = v2;
  return result;
}

//----- (0058A660) --------------------------------------------------------
void __thiscall SkillInfoWin::ShowMoneyWin(SkillInfoWin *this, int iXPos, int iYPos, __int64 i64Money)
{
  SkillInfoWin *v4; // esi@1
  __int64 v5; // kr00_8@1
  int v6; // edi@2
  int v7; // edi@2
  int v8; // edi@5
  int v9; // edi@7
  int v10; // edi@9
  int v11; // edi@11
  __int64 i64Val; // [sp+Ch] [bp-2Ch]@4
  __int64 i64Vala; // [sp+Ch] [bp-2Ch]@6
  __int64 i64Valb; // [sp+Ch] [bp-2Ch]@8
  char acMoneyStr[32]; // [sp+14h] [bp-24h]@2

  v4 = this;
  v5 = User::GetGem(i64Money);
  if ( v5 )
  {
    ((void (__stdcall *)(_DWORD))v4->m_pkGemText->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v4->m_pkGemText->vfptr[77].__vecDelDtor)(iXPos, iYPos + 3);
    sprintf(acMoneyStr, "%I64d", v5);
    ((void (__stdcall *)(_DWORD))v4->m_pkGemText->vfptr[125].__vecDelDtor)(acMoneyStr);
    v6 = iXPos + ((int (*)(void))v4->m_pkGemText->vfptr[36].__vecDelDtor)() + 1;
    ((void (__stdcall *)(_DWORD))v4->m_pkGemIcon->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v4->m_pkGemIcon->vfptr[77].__vecDelDtor)(v6, iYPos);
    v7 = v6 + v4->m_uiIconWidth + 1;
  }
  else
  {
    v7 = iXPos;
  }
  i64Val = User::GetGold(i64Money);
  if ( i64Val )
  {
    ((void (__stdcall *)(_DWORD))v4->m_pkGoldText->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v4->m_pkGoldText->vfptr[77].__vecDelDtor)(v7, iYPos + 3);
    sprintf(acMoneyStr, "%I64d", i64Val);
    ((void (__stdcall *)(_DWORD))v4->m_pkGoldText->vfptr[125].__vecDelDtor)(acMoneyStr);
    v8 = v7 + ((int (*)(void))v4->m_pkGoldText->vfptr[36].__vecDelDtor)() + 1;
    ((void (__stdcall *)(_DWORD))v4->m_pkGoldIcon->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v4->m_pkGoldIcon->vfptr[77].__vecDelDtor)(v8, iYPos);
    v7 = v8 + v4->m_uiIconWidth + 1;
  }
  i64Vala = User::GetSilver(i64Money);
  if ( i64Vala )
  {
    ((void (__stdcall *)(_DWORD))v4->m_pkSilverText->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v4->m_pkSilverText->vfptr[77].__vecDelDtor)(v7, iYPos + 3);
    sprintf(acMoneyStr, "%I64d", i64Vala);
    ((void (__stdcall *)(_DWORD))v4->m_pkSilverText->vfptr[125].__vecDelDtor)(acMoneyStr);
    v9 = v7 + ((int (*)(void))v4->m_pkSilverText->vfptr[36].__vecDelDtor)() + 1;
    ((void (__stdcall *)(_DWORD))v4->m_pkSilverIcon->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v4->m_pkSilverIcon->vfptr[77].__vecDelDtor)(v9, iYPos);
    v7 = v9 + v4->m_uiIconWidth + 1;
  }
  i64Valb = User::GetCopper(i64Money);
  if ( i64Valb )
  {
    ((void (__stdcall *)(_DWORD))v4->m_pkCopperText->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v4->m_pkCopperText->vfptr[77].__vecDelDtor)(v7, iYPos + 3);
    sprintf(acMoneyStr, "%I64d", i64Valb);
    ((void (__stdcall *)(_DWORD))v4->m_pkCopperText->vfptr[125].__vecDelDtor)(acMoneyStr);
    v10 = v7 + ((int (*)(void))v4->m_pkCopperText->vfptr[36].__vecDelDtor)() + 1;
    ((void (__stdcall *)(_DWORD))v4->m_pkCopperIcon->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v4->m_pkCopperIcon->vfptr[77].__vecDelDtor)(v10, iYPos);
    v7 = v10 + v4->m_uiIconWidth + 1;
  }
  if ( !i64Money )
  {
    ((void (__stdcall *)(_DWORD))v4->m_pkCopperText->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v4->m_pkCopperText->vfptr[77].__vecDelDtor)(v7, iYPos + 3);
    sprintf(acMoneyStr, "%d", 0);
    ((void (__stdcall *)(_DWORD))v4->m_pkCopperText->vfptr[125].__vecDelDtor)(acMoneyStr);
    v11 = v7 + ((int (*)(void))v4->m_pkCopperText->vfptr[36].__vecDelDtor)() + 1;
    ((void (__stdcall *)(_DWORD))v4->m_pkCopperIcon->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v4->m_pkCopperIcon->vfptr[77].__vecDelDtor)(v11, iYPos);
  }
}

//----- (0058AA10) --------------------------------------------------------
void __thiscall SkillInfoWin::AdjustSizeIfIamToolTipWin(SkillInfoWin *this)
{
  SkillInfoWin *v1; // esi@1
  int (*v2)(void); // edx@1
  int v3; // eax@1
  PgFont *v4; // edi@1
  unsigned int v5; // ebx@2
  char *v6; // eax@3
  unsigned int v7; // eax@12
  tagSIZE kSize; // [sp+8h] [bp-18h]@4
  SkillInfoWin *v9; // [sp+10h] [bp-10h]@1
  int v10; // [sp+14h] [bp-Ch]@2
  PgWinText **v11; // [sp+18h] [bp-8h]@2
  unsigned int uiCy; // [sp+1Ch] [bp-4h]@2

  v1 = this;
  v2 = (int (*)(void))this->m_apkTextWin[1]->vfptr[114].__vecDelDtor;
  v9 = this;
  v3 = v2();
  v4 = (PgFont *)v3;
  if ( v3 )
  {
    SelectObject(*(HDC *)(v3 + 192), *(HGDIOBJ *)(v3 + 184));
    v5 = 0;
    uiCy = 0;
    v11 = v1->m_apkTextWin;
    v10 = 60;
    do
    {
      v6 = (char *)((int (*)(void))(*v11)->vfptr[121].__vecDelDtor)();
      if ( v6 )
      {
        PgFont::GetTextSize(v4, v6, strlen(v6), &kSize);
        if ( kSize.cx > v5 )
          v5 = kSize.cx;
        v1 = v9;
        uiCy += kSize.cy + 2;
      }
      ++v11;
      --v10;
    }
    while ( v10 );
    if ( (unsigned __int8)((int (*)(void))v1->m_pkGemIcon->vfptr[65].__vecDelDtor)()
      || (unsigned __int8)((int (*)(void))v1->m_pkGoldIcon->vfptr[65].__vecDelDtor)()
      || (unsigned __int8)((int (*)(void))v1->m_pkSilverIcon->vfptr[65].__vecDelDtor)()
      || (unsigned __int8)((int (*)(void))v1->m_pkCopperIcon->vfptr[65].__vecDelDtor)() )
    {
      uiCy += v1->m_uiIconHeight + 2;
      v7 = SkillInfoWin::GetMoneyWinWidth(v1);
      if ( v7 > v5 )
        v5 = v7;
    }
    if ( v5 )
      ((void (__thiscall *)(SkillInfoWin *, unsigned int, unsigned int))v1->vfptr[135].__vecDelDtor)(
        v1,
        v5 + 2 * v1->m_uiEdgeWidth,
        uiCy + 2 * v1->m_uiEdgeHeight);
  }
}

//----- (0058AB60) --------------------------------------------------------
char __thiscall SkillInfoWin::Create(SkillInfoWin *this, NiSourceTexture *pkTexture, unsigned int uiEdgeWidth, unsigned int uiEdgeHeight)
{
  SkillInfoWin *v4; // esi@1
  char result; // al@2
  PgFont *v6; // eax@3
  PgFont *v7; // ebx@3
  signed int v8; // edi@4
  PgFont *v9; // eax@6
  NiTexturePalette *v10; // edi@10
  const char *v11; // eax@12
  PgSprData *v12; // eax@13
  PgWinSpr *v13; // eax@13
  NiAVObject *v14; // edx@13
  PgSprData *v15; // eax@13
  PgWinSpr *v16; // eax@13
  NiAVObject *v17; // edx@13
  PgSprData *v18; // eax@13
  PgWinSpr *v19; // eax@13
  NiAVObject *v20; // edx@13
  PgSprData *v21; // eax@13
  PgWinSpr *v22; // eax@13
  PgWinSpr *v23; // ecx@13
  int v24; // eax@13
  PgWinSpr *v25; // ecx@13
  PgFont *v26; // eax@13
  PgFont *v27; // eax@13
  PgFont *v28; // eax@13
  PgFont *v29; // eax@13
  void (__thiscall ***v30)(_DWORD, _DWORD); // esi@14
  int uiLeft; // [sp+10h] [bp-10h]@13
  int v32; // [sp+1Ch] [bp-4h]@9

  v4 = this;
  if ( !FrameBoxWin::Create((FrameBoxWin *)&this->vfptr, pkTexture, uiEdgeWidth, uiEdgeHeight, 0, 0, 0, 0) )
    goto LABEL_20;
  v6 = Font::Get(0);
  v7 = v6;
  if ( !v6 )
    goto LABEL_20;
  v4->m_iFontHeight = v6->m_uiDefHeight;
  v8 = 0;
  do
  {
    if ( v8 )
    {
      v4->m_apkTextWin[v8] = PgWinText::CreateWin(
                               v4->m_uiEdgeWidth,
                               v8 * (v4->m_iFontHeight + 2) + v4->m_uiEdgeHeight + 2,
                               0x100u,
                               v4->m_iFontHeight + 4,
                               v7,
                               (PgWin *)&v4->vfptr,
                               0,
                               0);
    }
    else
    {
      v9 = Font::Get(BOLD);
      v4->m_apkTextWin[0] = PgWinText::CreateWin(
                              v4->m_uiEdgeWidth,
                              v4->m_uiEdgeHeight + 2,
                              0x100u,
                              v4->m_iFontHeight + 4,
                              v9,
                              (PgWin *)&v4->vfptr,
                              0,
                              0);
    }
    ((void (__stdcall *)(_DWORD))v4->m_apkTextWin[v8++]->vfptr[60].__vecDelDtor)(0);
  }
  while ( v8 < 60 );
  ((void (__thiscall *)(SkillInfoWin *, unsigned int, unsigned int))v4->vfptr[135].__vecDelDtor)(
    v4,
    2 * v4->m_uiEdgeWidth + 173,
    v4->m_iFontHeight + 2 * v4->m_uiEdgeHeight);
  v4->vfptr[64].__vecDelDtor((NiRefObject *)v4, 0);
  uiEdgeHeight = 0;
  v32 = 0;
  if ( !pkTexture )
    goto LABEL_20;
  v10 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v11 = Folder::Merge(&Folder::m_acMenu, "Game\\Money.nif");
  PgUtil::LoadNodeNifFile(v11, (NiPointer<NiNode> *)&uiEdgeHeight, v10);
  if ( uiEdgeHeight )
  {
    v12 = PgSprData::Create((NiAVObject *)uiEdgeHeight, "MyGemBtn", &uiLeft, (int *)&uiEdgeWidth, 0);
    v13 = PgWinSpr::CreateWin(0, 0, v12, (PgWin *)&v4->vfptr, 0, 0);
    v14 = (NiAVObject *)uiEdgeHeight;
    v4->m_pkGemIcon = v13;
    v15 = PgSprData::Create(v14, "MyGoldBtn", &uiLeft, (int *)&uiEdgeWidth, 0);
    v16 = PgWinSpr::CreateWin(0, 0, v15, (PgWin *)&v4->vfptr, 0, 0);
    v17 = (NiAVObject *)uiEdgeHeight;
    v4->m_pkGoldIcon = v16;
    v18 = PgSprData::Create(v17, "MySilverBtn", &uiLeft, (int *)&uiEdgeWidth, 0);
    v19 = PgWinSpr::CreateWin(0, 0, v18, (PgWin *)&v4->vfptr, 0, 0);
    v20 = (NiAVObject *)uiEdgeHeight;
    v4->m_pkSilverIcon = v19;
    v21 = PgSprData::Create(v20, "MyCopperBtn", &uiLeft, (int *)&uiEdgeWidth, 0);
    v22 = PgWinSpr::CreateWin(0, 0, v21, (PgWin *)&v4->vfptr, 0, 0);
    v23 = v4->m_pkGemIcon;
    v4->m_pkCopperIcon = v22;
    v24 = ((int (*)(void))v23->vfptr[36].__vecDelDtor)();
    v25 = v4->m_pkGemIcon;
    v4->m_uiIconWidth = v24;
    v4->m_uiIconHeight = ((int (*)(void))v25->vfptr[37].__vecDelDtor)();
    v26 = Font::Get(SMALL);
    v4->m_pkGemText = AutoSizingTextWin::CreateWin(0, 0, v26, (PgWin *)&v4->vfptr);
    v27 = Font::Get(SMALL);
    v4->m_pkGoldText = AutoSizingTextWin::CreateWin(0, 0, v27, (PgWin *)&v4->vfptr);
    v28 = Font::Get(SMALL);
    v4->m_pkSilverText = AutoSizingTextWin::CreateWin(0, 0, v28, (PgWin *)&v4->vfptr);
    v29 = Font::Get(SMALL);
    v4->m_pkCopperText = AutoSizingTextWin::CreateWin(0, 0, v29, (PgWin *)&v4->vfptr);
    SkillInfoWin::HideAllMoneyWin(v4);
    v32 = -1;
    if ( uiEdgeHeight )
    {
      v30 = (void (__thiscall ***)(_DWORD, _DWORD))uiEdgeHeight;
      if ( !InterlockedDecrement((volatile LONG *)(uiEdgeHeight + 4)) )
      {
        if ( v30 )
          (**v30)(v30, 1);
      }
    }
    result = 1;
  }
  else
  {
LABEL_20:
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0058AE90) --------------------------------------------------------
char *__cdecl GetTimeStr(int iTime)
{
  NiUnsharedGeometryGroup *v1; // eax@2
  unsigned int v2; // eax@2
  char *v3; // edi@2
  char v4; // cl@3
  NiUnsharedGeometryGroup *v5; // eax@6
  unsigned int v6; // eax@6
  char *v7; // edi@6
  char v8; // cl@7
  NiUnsharedGeometryGroup *v9; // eax@10
  unsigned int v10; // eax@10
  char *v11; // edi@10
  char v12; // cl@11
  float v14; // [sp+14h] [bp-28h]@1
  char acTmp[32]; // [sp+18h] [bp-24h]@2

  acStr_0[0] = 0;
  v14 = (double)iTime / 1000.0
      - (double)(60 * (iTime / 1000 / 60 - 60 * (iTime / 1000 / 3600)))
      - (double)(3600 * (iTime / 1000 / 3600));
  if ( iTime / 1000 / 3600 )
  {
    v1 = TextData::Get(0x9CB3EDF8);
    sprintf(acTmp, (const char *)v1, iTime / 1000 / 3600);
    v2 = strlen(acTmp) + 1;
    v3 = &acStr_0[-1];
    do
      v4 = (v3++)[1];
    while ( v4 );
    qmemcpy(v3, acTmp, v2);
  }
  if ( iTime / 1000 / 60 != 60 * (iTime / 1000 / 3600) )
  {
    v5 = TextData::Get(0x9CACA8F9);
    sprintf(acTmp, (const char *)v5, " ", iTime / 1000 / 60 - 60 * (iTime / 1000 / 3600));
    v6 = strlen(acTmp) + 1;
    v7 = &acStr_0[-1];
    do
      v8 = (v7++)[1];
    while ( v8 );
    qmemcpy(v7, acTmp, v6);
  }
  if ( 0.0 != v14 )
  {
    v9 = TextData::Get(0x98B2A8EE);
    sprintf(acTmp, (const char *)v9, " ", v14);
    v10 = strlen(acTmp) + 1;
    v11 = &acStr_0[-1];
    do
      v12 = (v11++)[1];
    while ( v12 );
    qmemcpy(v11, acTmp, v10);
  }
  return acStr_0;
}

//----- (0058B040) --------------------------------------------------------
bool __stdcall SkillInfoWin::IsPassiveEffect(unsigned __int16 kActiveID, char *pEffectRate)
{
  int v3; // esi@1
  ActiveSkillInfo **v4; // eax@3
  unsigned int v5; // edi@5
  char *v6; // eax@6
  char *v7; // esi@6
  PassiveSkillInfo *v8; // eax@8
  PassiveSkillInfo *v9; // esi@8
  bool result; // al@13
  ActiveSkillInfo *pkActiveSkillInfo; // [sp+Ch] [bp-20Ch]@4
  char acConversionData1[256]; // [sp+14h] [bp-204h]@10
  char acSkillName[256]; // [sp+114h] [bp-104h]@10

  v3 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                           + 16))(
                          ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                          kActiveID)
    && kActiveID <= *(_WORD *)(v3 + 200)
    && (v4 = (ActiveSkillInfo **)(*(_DWORD *)(v3 + 196) + 4 * kActiveID), *v4)
    && (pkActiveSkillInfo = *v4) != 0
    && (v5 = 0, ActiveSkillGroupTab::GetTotal()) )
  {
    while ( 1 )
    {
      v6 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::ms_pkTable + 4), v5);
      v7 = v6;
      if ( v6 )
      {
        if ( !strcmp(pkActiveSkillInfo->InxName, v6) )
        {
          v8 = PasSkillInfoTab::GetByActiveSkillGroupIndex(*((ActiveSkillGroupIndex *)v7 + 8));
          v9 = v8;
          if ( v8 )
          {
            if ( Skill::IsLearnPassiveSkill(v8->ID) )
            {
              acSkillName[0] = 0;
              memset(&acSkillName[1], 0, 0xFFu);
              acConversionData1[0] = 0;
              memset(&acConversionData1[1], 0, 0xFFu);
              sprintf(acSkillName, "%s", v9->InxName);
              strncpy(acConversionData1, acSkillName, strlen(acSkillName) - 2);
              if ( !strcmp(acConversionData1, "HealReinforce") )
              {
                sprintf(pEffectRate, "%d%%", v9->HealUPRate / 10);
                return 1;
              }
              if ( !strcmp(acConversionData1, "BiffTimeIncrease") )
                break;
            }
          }
        }
      }
      if ( ++v5 >= ActiveSkillGroupTab::GetTotal() )
        goto LABEL_13;
    }
    sprintf(pEffectRate, "%d%%", v9->KeepTimeBuffUPRate / 10);
    result = 1;
  }
  else
  {
LABEL_13:
    result = 0;
  }
  return result;
}
// A8C1E0: using guessed type int ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::ms_pkTable;
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (0058B2D0) --------------------------------------------------------
int __stdcall SkillInfoWin::FindPassiveEffect(unsigned __int16 kActiveID, char *pEffectRate)
{
  int v3; // esi@1
  ActiveSkillInfo **v4; // eax@3
  ActiveSkillInfo *v5; // edi@4
  unsigned int v6; // esi@5
  char *v7; // eax@6
  char *v8; // esi@6
  PassiveSkillInfo *v9; // eax@8
  PassiveSkillInfo *v10; // esi@8
  signed __int16 v11; // bx@9
  signed int j; // esi@10
  char *v13; // eax@12
  PassiveSkillInfo *v14; // edi@14
  PassiveSkillInfo *v15; // esi@18
  PassiveSkillInfo *pkPassiveSkillInfo; // [sp+Ch] [bp-414h]@8
  ActiveSkillInfo *pkActiveSkillInfo; // [sp+10h] [bp-410h]@4
  unsigned int i; // [sp+18h] [bp-408h]@5
  char acConversionData3[256]; // [sp+1Ch] [bp-404h]@10
  char acSkillName[256]; // [sp+11Ch] [bp-304h]@21
  char acFirstSkill[256]; // [sp+21Ch] [bp-204h]@10
  char acConversionData1[256]; // [sp+31Ch] [bp-104h]@21

  v3 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  if ( !(unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                            + 16))(
                           ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                           kActiveID) )
    return 0;
  if ( kActiveID > *(_WORD *)(v3 + 200) )
    return 0;
  v4 = (ActiveSkillInfo **)(*(_DWORD *)(v3 + 196) + 4 * kActiveID);
  if ( !*v4 )
    return 0;
  v5 = *v4;
  pkActiveSkillInfo = *v4;
  if ( !*v4 )
    return 0;
  v6 = 0;
  i = 0;
  if ( !ActiveSkillGroupTab::GetTotal() )
    return 0;
  while ( 1 )
  {
    v7 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::ms_pkTable + 4), v6);
    v8 = v7;
    if ( !v7 )
      goto LABEL_24;
    if ( strcmp(v5->InxName, v7) )
      goto LABEL_24;
    v9 = PasSkillInfoTab::GetByActiveSkillGroupIndex(*((ActiveSkillGroupIndex *)v8 + 8));
    v10 = v9;
    pkPassiveSkillInfo = v9;
    if ( !v9 )
      goto LABEL_24;
    v11 = -1;
    if ( !Skill::IsLearnPassiveSkill(v9->ID) )
      goto LABEL_24;
    acFirstSkill[0] = 0;
    memset(&acFirstSkill[1], 0, 0xFFu);
    acConversionData3[0] = 0;
    memset(&acConversionData3[1], 0, 0xFFu);
    sprintf(acFirstSkill, "%s", v10->InxName);
    strncpy(acConversionData3, acFirstSkill, strlen(acFirstSkill) - 2);
    for ( j = 2; ; ++j )
    {
      v13 = j >= 10 ? fs("%s%d", acConversionData3, j) : fs("%s0%d", acConversionData3, j);
      v14 = PasSkillInfoTab::GetByInxName(v13);
      if ( !v14 || !Skill::IsLearnPassiveSkill(v14->ID) )
        break;
      v11 = v14->ID;
    }
    if ( v11 == -1 )
    {
      v15 = pkPassiveSkillInfo;
    }
    else
    {
      v15 = PasSkillInfoTab::GetByID(v11);
      if ( !v15 )
        return 0;
    }
    acSkillName[0] = 0;
    memset(&acSkillName[1], 0, 0xFFu);
    acConversionData1[0] = 0;
    memset(&acConversionData1[1], 0, 0xFFu);
    sprintf(acSkillName, "%s", v15->InxName);
    strncpy(acConversionData1, acSkillName, strlen(acSkillName) - 2);
    if ( !strcmp(acConversionData1, "HealReinforce") )
    {
      sprintf(pEffectRate, "%d%%", v15->HealUPRate / 10);
      return 1;
    }
    if ( !strcmp(acConversionData1, "BiffTimeIncrease") )
      break;
    v5 = pkActiveSkillInfo;
LABEL_24:
    v6 = ++i;
    if ( i >= ActiveSkillGroupTab::GetTotal() )
      return 0;
  }
  sprintf(pEffectRate, "%d%%", v15->KeepTimeBuffUPRate / 10);
  return 2;
}
// A8C1E0: using guessed type int ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::ms_pkTable;
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (0058B660) --------------------------------------------------------
int __thiscall SkillInfoWin::SetPassiveEffect(SkillInfoWin *this, unsigned __int16 kActiveID, int index)
{
  int v3; // edi@1
  SkillInfoWin *v4; // ebx@1
  ActiveSkillInfo **v5; // eax@3
  char *v6; // eax@6
  char *v7; // edi@6
  PassiveSkillInfo *v8; // eax@8
  PassiveSkillInfo *v9; // edi@8
  char *v11; // ecx@14
  char *v12; // eax@14
  int v13; // edi@14
  char v14; // dl@15
  NiRefObjectVtbl *v15; // edi@16
  char *v16; // eax@16
  char *v17; // eax@16
  NiRefObjectVtbl *v18; // edi@16
  char *v19; // eax@16
  char *v20; // eax@16
  char *v21; // ecx@17
  char *v22; // eax@17
  int v23; // edi@17
  char v24; // dl@18
  NiRefObjectVtbl *v25; // edi@19
  char *v26; // eax@19
  char *v27; // eax@19
  NiRefObjectVtbl *v28; // edi@19
  char *v29; // eax@19
  char *v30; // eax@19
  unsigned int i; // [sp+Ch] [bp-50Ch]@5
  ActiveSkillInfo *pkActiveSkillInfo; // [sp+10h] [bp-508h]@4
  char acConversionData[256]; // [sp+14h] [bp-504h]@10
  char acPassiveInxName[256]; // [sp+114h] [bp-404h]@10
  char acConversionData1[256]; // [sp+214h] [bp-304h]@10
  char acSkillName[256]; // [sp+314h] [bp-204h]@10
  char acPassiveSkillName[256]; // [sp+414h] [bp-104h]@14

  v3 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  v4 = this;
  if ( !(unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                            + 16))(
                           ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                           kActiveID) )
    return index;
  if ( kActiveID > *(_WORD *)(v3 + 200) )
    return index;
  v5 = (ActiveSkillInfo **)(*(_DWORD *)(v3 + 196) + 4 * kActiveID);
  if ( !*v5 )
    return index;
  pkActiveSkillInfo = *v5;
  if ( !*v5 )
    return index;
  i = 0;
  if ( !ActiveSkillGroupTab::GetTotal() )
    return index;
  while ( 1 )
  {
    v6 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::ms_pkTable + 4), i);
    v7 = v6;
    if ( !v6 )
      goto LABEL_12;
    if ( strcmp(pkActiveSkillInfo->InxName, v6) )
      goto LABEL_12;
    v8 = PasSkillInfoTab::GetByActiveSkillGroupIndex(*((ActiveSkillGroupIndex *)v7 + 8));
    v9 = v8;
    if ( !v8 || !Skill::IsLearnPassiveSkill(v8->ID) )
      goto LABEL_12;
    acPassiveInxName[0] = 0;
    memset(&acPassiveInxName[1], 0, 0xFFu);
    acConversionData[0] = 0;
    memset(&acConversionData[1], 0, 0xFFu);
    sprintf(acPassiveInxName, "%s", v9->InxName);
    strncpy(acConversionData, acPassiveInxName, strlen(acPassiveInxName) - 2);
    acSkillName[0] = 0;
    memset(&acSkillName[1], 0, 0xFFu);
    acConversionData1[0] = 0;
    memset(&acConversionData1[1], 0, 0xFFu);
    if ( !strcmp(acConversionData, "HealReinforce") )
      break;
    if ( !strcmp(acConversionData, "BiffTimeIncrease") )
    {
      acPassiveSkillName[0] = 0;
      memset(&acPassiveSkillName[1], 0, 0xFFu);
      v21 = v9->Name;
      v22 = v9->Name;
      v23 = (int)&v9->Name[1];
      do
        v24 = *v22++;
      while ( v24 );
      strncpy(acPassiveSkillName, v21, (unsigned int)&v22[-v23 - 4]);
      ((void (__stdcall *)(D3DXCOLOR *))v4->m_apkTextWin[index]->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
      v25 = v4->m_apkTextWin[index]->vfptr;
      v26 = (char *)TextData2::Get(0x39A46A8Cu);
      v27 = fs(v26, acPassiveSkillName);
      v25[118].__vecDelDtor((NiRefObject *)v4->m_apkTextWin[index], (unsigned int)v27);
      sprintf(acSkillName, "%s", pkActiveSkillInfo->Name);
      strncpy(acConversionData1, acSkillName, strlen(acSkillName) - 4);
      ((void (__stdcall *)(D3DXCOLOR *))v4->m_apkTextWin[index + 1]->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
      v28 = v4->m_apkTextWin[index + 1]->vfptr;
      v29 = (char *)TextData2::Get(0x4053368Cu);
      v30 = fs(v29, acConversionData1);
      v28[118].__vecDelDtor((NiRefObject *)v4->m_apkTextWin[index + 1], (unsigned int)v30);
      ((void (__stdcall *)(const char *))v4->m_apkTextWin[index + 2]->vfptr[118].__vecDelDtor)(" ");
      return index + 3;
    }
LABEL_12:
    if ( ++i >= ActiveSkillGroupTab::GetTotal() )
      return index;
  }
  acPassiveSkillName[0] = 0;
  memset(&acPassiveSkillName[1], 0, 0xFFu);
  v11 = v9->Name;
  v12 = v9->Name;
  v13 = (int)&v9->Name[1];
  do
    v14 = *v12++;
  while ( v14 );
  strncpy(acPassiveSkillName, v11, (unsigned int)&v12[-v13 - 4]);
  ((void (__stdcall *)(D3DXCOLOR *))v4->m_apkTextWin[index]->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
  v15 = v4->m_apkTextWin[index]->vfptr;
  v16 = (char *)TextData2::Get(0x39A46A8Cu);
  v17 = fs(v16, acPassiveSkillName);
  v15[118].__vecDelDtor((NiRefObject *)v4->m_apkTextWin[index], (unsigned int)v17);
  sprintf(acSkillName, "%s", pkActiveSkillInfo->Name);
  strncpy(acConversionData1, acSkillName, strlen(acSkillName) - 4);
  ((void (__stdcall *)(D3DXCOLOR *))v4->m_apkTextWin[index + 1]->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
  v18 = v4->m_apkTextWin[index + 1]->vfptr;
  v19 = (char *)TextData2::Get(0xFAEFB4EF);
  v20 = fs(v19, acConversionData1);
  v18[118].__vecDelDtor((NiRefObject *)v4->m_apkTextWin[index + 1], (unsigned int)v20);
  ((void (__stdcall *)(const char *))v4->m_apkTextWin[index + 2]->vfptr[118].__vecDelDtor)(" ");
  return index + 3;
}
// A8C1E0: using guessed type int ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::ms_pkTable;
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (0058BB70) --------------------------------------------------------
int __thiscall SkillInfoWin::SetMinMaxWCRate(SkillInfoWin *this, ActiveSkillInfo *pkInfo, int iIndex)
{
  unsigned int v3; // ecx@1
  char v4; // al@1
  char *v5; // ebx@1
  const char *v6; // esi@1
  unsigned int v7; // edx@2
  unsigned int v8; // ST08_4@4
  unsigned int v9; // ST04_4@4
  char *v10; // eax@4
  char *v11; // eax@4
  unsigned int v12; // ST08_4@5
  char *v13; // eax@5
  unsigned int v14; // ecx@7
  unsigned int v15; // edx@8
  char *v16; // eax@11
  char *v17; // eax@12
  char *v18; // ST04_4@17
  int result; // eax@21
  unsigned int v20; // eax@23
  char *v21; // edi@23
  char v22; // cl@24
  unsigned int v23; // [sp-8h] [bp-18h]@10
  unsigned int v24; // [sp-4h] [bp-14h]@10
  unsigned int v25; // [sp-4h] [bp-14h]@13
  SkillInfoWin *v26; // [sp+Ch] [bp-4h]@1

  v26 = this;
  v3 = pkInfo->MinWCRate;
  v4 = 0;
  v5 = 0;
  v6 = 0;
  if ( v3 )
  {
    v7 = pkInfo->MaxWCRate;
    if ( v3 != v7 && v7 )
    {
      v8 = v7 / 0xA;
      v9 = v3 / 0xA;
      v10 = (char *)TextData2::Get(0x82B122Au);
      v11 = fs(v10, v9, v8);
    }
    else
    {
      v12 = v3 / 0xA;
      v13 = (char *)TextData2::Get(0x92B122Au);
      v11 = fs(v13, v12);
    }
    v5 = v11;
    v4 = 1;
  }
  v14 = pkInfo->MinWC;
  if ( v14 )
  {
    v15 = pkInfo->MaxWC;
    if ( v14 == v15 )
    {
      v25 = pkInfo->MinWC;
      if ( v4 )
      {
        v16 = fs(" + %d", v25);
        goto LABEL_18;
      }
    }
    else
    {
      if ( v15 )
      {
        v24 = pkInfo->MaxWC;
        v23 = pkInfo->MinWC;
        if ( v4 )
        {
          v16 = fs(" + %d~%d", v14, v24);
        }
        else
        {
          v17 = (char *)TextData2::Get(0xA2B122Au);
          v16 = fs(v17, v23, v24);
        }
        goto LABEL_18;
      }
      v25 = pkInfo->MinWC;
      if ( v4 )
      {
        v16 = fs(" + %d", v25);
LABEL_18:
        v6 = v16;
        goto LABEL_19;
      }
    }
    v18 = (char *)TextData2::Get(0xB2B122Au);
    v16 = fs(v18, v25);
    goto LABEL_18;
  }
LABEL_19:
  if ( v5 )
  {
    if ( v6 )
    {
      v20 = strlen(v6) + 1;
      v21 = v5 - 1;
      do
        v22 = (v21++)[1];
      while ( v22 );
      qmemcpy(v21, v6, v20);
      ((void (__stdcall *)(char *))v26->m_apkTextWin[iIndex]->vfptr[118].__vecDelDtor)(v5);
      result = iIndex + 1;
    }
    else
    {
      ((void (__stdcall *)(char *))v26->m_apkTextWin[iIndex]->vfptr[118].__vecDelDtor)(v5);
      result = iIndex + 1;
    }
  }
  else if ( v6 )
  {
    ((void (__stdcall *)(const char *))v26->m_apkTextWin[iIndex]->vfptr[118].__vecDelDtor)(v6);
    result = iIndex + 1;
  }
  else
  {
    result = iIndex;
  }
  return result;
}

//----- (0058BD10) --------------------------------------------------------
int __thiscall SkillInfoWin::SetMinMaxMARate(SkillInfoWin *this, ActiveSkillInfo *pkInfo, int iIndex)
{
  unsigned int v3; // ecx@1
  char v4; // al@1
  char *v5; // ebx@1
  const char *v6; // esi@1
  unsigned int v7; // edx@2
  unsigned int v8; // ST08_4@4
  unsigned int v9; // ST04_4@4
  char *v10; // eax@4
  char *v11; // eax@4
  unsigned int v12; // ST08_4@5
  char *v13; // eax@5
  unsigned int v14; // ecx@7
  unsigned int v15; // edx@8
  char *v16; // eax@11
  char *v17; // eax@12
  char *v18; // ST04_4@17
  int result; // eax@21
  unsigned int v20; // eax@23
  char *v21; // edi@23
  char v22; // cl@24
  unsigned int v23; // [sp-8h] [bp-18h]@10
  unsigned int v24; // [sp-4h] [bp-14h]@10
  unsigned int v25; // [sp-4h] [bp-14h]@13
  SkillInfoWin *v26; // [sp+Ch] [bp-4h]@1

  v26 = this;
  v3 = pkInfo->MinMARate;
  v4 = 0;
  v5 = 0;
  v6 = 0;
  if ( v3 )
  {
    v7 = pkInfo->MaxMARate;
    if ( v3 != v7 && v7 )
    {
      v8 = v7 / 0xA;
      v9 = v3 / 0xA;
      v10 = (char *)TextData2::Get(0x8130F2Au);
      v11 = fs(v10, v9, v8);
    }
    else
    {
      v12 = v3 / 0xA;
      v13 = (char *)TextData2::Get(0x9130F2Au);
      v11 = fs(v13, v12);
    }
    v5 = v11;
    v4 = 1;
  }
  v14 = pkInfo->MinMA;
  if ( v14 )
  {
    v15 = pkInfo->MaxMA;
    if ( v14 == v15 )
    {
      v25 = pkInfo->MinMA;
      if ( v4 )
      {
        v16 = fs(" + %d", v25);
        goto LABEL_18;
      }
    }
    else
    {
      if ( v15 )
      {
        v24 = pkInfo->MaxMA;
        v23 = pkInfo->MinMA;
        if ( v4 )
        {
          v16 = fs(" + %d~%d", v14, v24);
        }
        else
        {
          v17 = (char *)TextData2::Get(0xA130F2Au);
          v16 = fs(v17, v23, v24);
        }
        goto LABEL_18;
      }
      v25 = pkInfo->MinMA;
      if ( v4 )
      {
        v16 = fs(" + %d", v25);
LABEL_18:
        v6 = v16;
        goto LABEL_19;
      }
    }
    v18 = (char *)TextData2::Get(0xB130F2Au);
    v16 = fs(v18, v25);
    goto LABEL_18;
  }
LABEL_19:
  if ( v5 )
  {
    if ( v6 )
    {
      v20 = strlen(v6) + 1;
      v21 = v5 - 1;
      do
        v22 = (v21++)[1];
      while ( v22 );
      qmemcpy(v21, v6, v20);
      ((void (__stdcall *)(char *))v26->m_apkTextWin[iIndex]->vfptr[118].__vecDelDtor)(v5);
      result = iIndex + 1;
    }
    else
    {
      ((void (__stdcall *)(char *))v26->m_apkTextWin[iIndex]->vfptr[118].__vecDelDtor)(v5);
      result = iIndex + 1;
    }
  }
  else if ( v6 )
  {
    ((void (__stdcall *)(const char *))v26->m_apkTextWin[iIndex]->vfptr[118].__vecDelDtor)(v6);
    result = iIndex + 1;
  }
  else
  {
    result = iIndex;
  }
  return result;
}

//----- (0058BEB0) --------------------------------------------------------
void __thiscall SkillInfoWin::WordrapSetText(SkillInfoWin *this, const char *pkTextData, int *nIndex, int nMaxPixcel)
{
  SkillInfoWin *v4; // ebx@1
  int v5; // edi@2
  unsigned int v6; // eax@3
  HDC__ *hDC; // [sp+10h] [bp-134h]@1
  char *pcStr; // [sp+14h] [bp-130h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strbuf; // [sp+18h] [bp-12Ch]@3
  char acStr[256]; // [sp+34h] [bp-110h]@1
  int v11; // [sp+140h] [bp-4h]@3

  v4 = this;
  hDC = *(HDC__ **)(((int (*)(void))this->m_apkTextWin[0]->vfptr[114].__vecDelDtor)() + 192);
  pcStr = (char *)pkTextData;
  acStr[0] = 0;
  memset(&acStr[1], 0, 0xFFu);
  while ( *nIndex < 60 )
  {
    v5 = PgUtil::StringPixelCopy(acStr, pcStr, hDC, nMaxPixcel);
    if ( !v5 )
      break;
    strbuf._Myres = 15;
    strbuf._Mysize = 0;
    strbuf._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strbuf, acStr, strlen(acStr));
    v11 = 0;
    v6 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::find(&strbuf, "\n", 0, 1u);
    if ( v6 == -1 )
    {
      acStr[v5] = 0;
    }
    else
    {
      acStr[v6] = 0;
      v5 = v6 + 1;
    }
    pcStr += v5;
    ((void (__stdcall *)(char *))v4->m_apkTextWin[*nIndex]->vfptr[118].__vecDelDtor)(acStr);
    if ( !((int (*)(void))v4->m_apkTextWin[*nIndex]->vfptr[121].__vecDelDtor)() )
      ((void (__stdcall *)(const char *))v4->m_apkTextWin[*nIndex]->vfptr[118].__vecDelDtor)(" ");
    ++*nIndex;
    v11 = -1;
    if ( strbuf._Myres >= 0x10 )
      operator delete(strbuf._Bx._Ptr);
  }
}

//----- (0058C070) --------------------------------------------------------
void __thiscall SkillInfoWin::SetTextBeginNewLine(SkillInfoWin *this, const char *pkTextData, int *nIndex, D3DXCOLOR *kColor)
{
  SkillInfoWin *v4; // edi@1
  void *(__thiscall *v5)(NiRefObject *, unsigned int); // edx@1
  int v6; // ebx@4
  unsigned int v7; // eax@5
  void *(__thiscall *v8)(NiRefObject *, unsigned int); // eax@8
  tagSIZE kSize; // [sp+10h] [bp-144h]@1
  HDC__ *hDC; // [sp+18h] [bp-13Ch]@3
  D3DXCOLOR *v11; // [sp+1Ch] [bp-138h]@1
  int nMaxPixcel; // [sp+20h] [bp-134h]@1
  const char *pcStr; // [sp+24h] [bp-130h]@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strbuf; // [sp+28h] [bp-12Ch]@5
  char acStr[256]; // [sp+44h] [bp-110h]@3
  int v16; // [sp+150h] [bp-4h]@5

  v4 = this;
  v5 = this->m_apkTextWin[0]->vfptr[123].__vecDelDtor;
  v11 = kColor;
  ((void (__stdcall *)(tagSIZE *))v5)(&kSize);
  nMaxPixcel = kSize.cx;
  if ( kSize.cx <= 300 )
    nMaxPixcel = 300;
  hDC = *(HDC__ **)(((int (*)(void))v4->m_apkTextWin[*nIndex]->vfptr[114].__vecDelDtor)() + 192);
  pcStr = pkTextData;
  memset(acStr, 0, 0x100u);
  while ( *nIndex < 60 )
  {
    v6 = PgUtil::StringPixelCopy(acStr, (char *)pcStr, hDC, nMaxPixcel);
    if ( !v6 )
      break;
    strbuf._Myres = 15;
    strbuf._Mysize = 0;
    strbuf._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strbuf, acStr, strlen(acStr));
    v16 = 0;
    v7 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::find(&strbuf, "\n", 0, 1u);
    if ( v7 == -1 )
    {
      acStr[v6] = 0;
    }
    else
    {
      acStr[v7] = 0;
      v6 = v7 + 1;
    }
    v8 = v4->m_apkTextWin[*nIndex]->vfptr[118].__vecDelDtor;
    pcStr += v6;
    ((void (__stdcall *)(char *))v8)(acStr);
    ((void (__stdcall *)(D3DXCOLOR *))v4->m_apkTextWin[*nIndex]->vfptr[117].__vecDelDtor)(v11);
    if ( !((int (*)(void))v4->m_apkTextWin[*nIndex]->vfptr[121].__vecDelDtor)() )
      ((void (__stdcall *)(const char *))v4->m_apkTextWin[*nIndex]->vfptr[118].__vecDelDtor)(" ");
    ++*nIndex;
    v16 = -1;
    if ( strbuf._Myres >= 0x10 )
      operator delete(strbuf._Bx._Ptr);
    memset(acStr, 0, 0x100u);
  }
}

//----- (0058C2A0) --------------------------------------------------------
int __thiscall SkillInfoWin::SetPassiveSkillInfo(SkillInfoWin *this, unsigned __int16 kSkillID, bool bBuy)
{
  SkillInfoWin *v3; // edi@1
  int v4; // esi@1
  signed int v5; // ebx@1
  unsigned int v6; // esi@4
  int v7; // esi@8
  _DWORD *v8; // eax@13
  NiRefObjectVtbl *v9; // esi@20
  NiUnsharedGeometryGroup *v10; // eax@20
  signed int v11; // esi@20
  NiRefObjectVtbl *v12; // ebx@24
  NiUnsharedGeometryGroup *v13; // eax@24
  void *(__thiscall *v14)(NiRefObject *, unsigned int); // edx@27
  NiRefObjectVtbl *v15; // ebx@28
  char *v16; // eax@28
  char *v17; // eax@28
  unsigned int v18; // ST0C_4@30
  NiUnsharedGeometryGroup *v19; // eax@30
  void *(__thiscall *v20)(NiRefObject *, unsigned int); // eax@30
  int v21; // esi@33
  void *(__thiscall *v22)(NiRefObject *, unsigned int); // eax@35
  int result; // eax@38
  __int64 kWhoEquip; // [sp+Ch] [bp-120h]@18
  PassiveSkillViewInfo *pkViewInfo; // [sp+18h] [bp-114h]@9
  bool bLevelSatisfied; // [sp+1Fh] [bp-10Dh]@18
  int iIndex; // [sp+20h] [bp-10Ch]@7
  bool bClassSatisfied; // [sp+27h] [bp-105h]@18
  char acStr[256]; // [sp+28h] [bp-104h]@20

  v3 = this;
  SkillInfoWin::HideAllMoneyWin(this);
  v4 = (int)v3->m_apkTextWin;
  v5 = 60;
  do
  {
    (*(void (__stdcall **)(void *))(**(_DWORD **)v4 + 472))(&unk_9A17BD);
    (*(void (__stdcall **)(D3DXCOLOR *))(**(_DWORD **)v4 + 468))(&Color::m_kDxWhiteColor);
    v4 += 4;
    --v5;
  }
  while ( v5 );
  if ( kSkillID == -1 )
    goto LABEL_42;
  v6 = 0;
  if ( ITableBase<PassiveSkillInfo,PasSkillInfoTab>::GetTotal() )
  {
    while ( *(_WORD *)CDataReader::GetRecord(
                        (CDataReader *)(ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ms_pkTable + 4),
                        v6) != kSkillID )
    {
      if ( ++v6 >= ITableBase<PassiveSkillInfo,PasSkillInfoTab>::GetTotal() )
        goto LABEL_7;
    }
    iIndex = (int)CDataReader::GetRecord(
                    (CDataReader *)(ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ms_pkTable + 4),
                    v6);
  }
  else
  {
LABEL_7:
    iIndex = 0;
  }
  v7 = ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::ms_pkTable
                                                           + 16))(
                          ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::ms_pkTable,
                          kSkillID) )
  {
    if ( kSkillID <= *(_WORD *)(v7 + 200) )
    {
      v8 = (_DWORD *)(*(_DWORD *)(v7 + 196) + 4 * kSkillID);
      pkViewInfo = (PassiveSkillViewInfo *)(*v8 ? *v8 : 0);
    }
    else
    {
      pkViewInfo = 0;
    }
  }
  else
  {
    pkViewInfo = 0;
  }
  if ( iIndex && pkViewInfo )
  {
    bLevelSatisfied = (signed int)pkViewInfo->DemandLv <= (signed int)User::Lv(&g_kUser);
    kWhoEquip = CharClass::GetBitbyClassType(pkViewInfo->UseClass);
    bClassSatisfied = 1;
    if ( !(kWhoEquip & (1i64 << User::GetMainCharClass(&g_kUser))) )
      bClassSatisfied = 0;
    sprintf(acStr, "%s", iIndex + 34);
    ((void (__stdcall *)(char *))v3->m_apkTextWin[0]->vfptr[118].__vecDelDtor)(acStr);
    ((void (__stdcall *)(D3DXCOLOR *))v3->m_apkTextWin[0]->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
    v9 = v3->m_apkTextWin[1]->vfptr;
    v10 = TextData::Get(0x3597A68Cu);
    v9[118].__vecDelDtor((NiRefObject *)v3->m_apkTextWin[1], (unsigned int)v10);
    v11 = 2;
    if ( strcmp((const char *)((int (*)(void))v3->m_apkTextWin[1]->vfptr[121].__vecDelDtor)(), " ") )
    {
      v11 = 3;
      ((void (__stdcall *)(const char *))v3->m_apkTextWin[2]->vfptr[118].__vecDelDtor)(" ");
    }
    if ( Skill::IsLearnPassiveSkill(kSkillID) && bBuy )
    {
      v12 = v3->m_apkTextWin[v11]->vfptr;
      v13 = TextData::Get(0xA3420FF4);
      v12[118].__vecDelDtor((NiRefObject *)v3->m_apkTextWin[v11], (unsigned int)v13);
      ((void (__stdcall *)(D3DXCOLOR *))v3->m_apkTextWin[v11++]->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
    }
    if ( v11 > 0 && strcmp((const char *)(*(int (**)(void))(**((_DWORD **)&v3->m_bLock + v11) + 484))(), " ") )
    {
      v14 = v3->m_apkTextWin[v11++]->vfptr[118].__vecDelDtor;
      ((void (__stdcall *)(const char *))v14)(" ");
    }
    CharClass::GetEquipableClassSortStr(kWhoEquip, acStr, 0x100u);
    v15 = v3->m_apkTextWin[v11]->vfptr;
    v16 = (char *)TextData::Get(0x9FF5FBEC);
    v17 = fs(v16, acStr);
    v15[118].__vecDelDtor((NiRefObject *)v3->m_apkTextWin[v11], (unsigned int)v17);
    if ( !bClassSatisfied )
      ((void (__stdcall *)(D3DXCOLOR *))v3->m_apkTextWin[v11]->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
    v18 = pkViewInfo->DemandLv;
    v19 = TextData::Get(0x98F7ED01);
    sprintf(acStr, (const char *)v19, v18);
    ((void (__stdcall *)(char *))v3->m_apkTextWin[v11 + 1]->vfptr[118].__vecDelDtor)(acStr);
    v20 = v3->m_apkTextWin[v11 + 1]->vfptr[117].__vecDelDtor;
    if ( bLevelSatisfied )
      ((void (__stdcall *)(D3DXCOLOR *))v20)(&Color::m_kDxWhiteColor);
    else
      ((void (__stdcall *)(D3DXCOLOR *))v20)(&Color::m_kDxRedColor);
    v21 = v11 + 2;
    iIndex = v21;
    if ( v21 > 0 && strcmp((const char *)(*(int (**)(void))(**((_DWORD **)&v3->m_bLock + v21) + 484))(), " ") )
    {
      v22 = v3->m_apkTextWin[v21++]->vfptr[118].__vecDelDtor;
      iIndex = v21;
      ((void (__stdcall *)(const char *))v22)(" ");
    }
    if ( pkViewInfo->Descript[0] != 45 )
    {
      SkillInfoWin::SetTextBeginNewLine(v3, pkViewInfo->Descript, &iIndex, &Color::m_kDxWhiteColor);
      v21 = iIndex;
    }
    result = v21;
  }
  else
  {
LABEL_42:
    result = 0;
  }
  return result;
}
// A8CAAC: using guessed type int ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ms_pkTable;
// A8CD58: using guessed type int ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::ms_pkTable;

//----- (0058C750) --------------------------------------------------------
void __thiscall SkillInfoWin::SetPassiveSkillBuyInfo(SkillInfoWin *this, unsigned __int16 kSkillID, unsigned int uiPrice)
{
  SkillInfoWin *v3; // esi@1
  int v4; // edi@1

  v3 = this;
  v4 = SkillInfoWin::SetPassiveSkillInfo(this, kSkillID, 1);
  ((void (__stdcall *)(_DWORD))v3->m_apkTextWin[v4]->vfptr[118].__vecDelDtor)(" ");
  SkillInfoWin::ShowMoneyWin(
    v3,
    v3->m_uiEdgeWidth,
    (v4 + 1) * (v3->m_iFontHeight + 2) + v3->m_uiEdgeHeight + 2,
    uiPrice);
}

//----- (0058C7B0) --------------------------------------------------------
void __thiscall SkillInfoWin::SetSetItemDesc(SkillInfoWin *this, int *iIndex)
{
  SkillInfoWin *v2; // esi@1
  signed int v3; // ecx@2
  int v4; // eax@4
  int v5; // ecx@4
  unsigned int v6; // edx@4
  unsigned int v7; // eax@4
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *v8; // eax@6
  std::_Tree_nod<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v9; // ebx@6
  PgWinText *v10; // ecx@7
  void *v11; // eax@7
  NiRefObjectVtbl *v12; // ebx@9
  void *v13; // ST08_4@9
  char *v14; // eax@9
  char *v15; // eax@9
  ItemActionEffect *v16; // eax@12
  signed int v17; // ecx@15
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > result; // [sp+10h] [bp-48h]@6
  ItemAction itrAction; // [sp+14h] [bp-44h]@4
  ItemActionEffectDesc *pkDesc; // [sp+20h] [bp-38h]@5
  unsigned int i; // [sp+24h] [bp-34h]@2
  unsigned int v22; // [sp+28h] [bp-30h]@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strSetName; // [sp+2Ch] [bp-2Ch]@7
  int v24; // [sp+54h] [bp-4h]@7

  v2 = this;
  if ( *iIndex < 60 )
  {
    v3 = (char *)this->m_svItemAction._Mylast - (char *)this->m_svItemAction._Myfirst;
    i = 0;
    if ( v3 / 12 )
    {
      v22 = 0;
      do
      {
        v4 = (int)&v2->m_svItemAction._Myfirst[v22 / 0xC];
        v5 = *(_DWORD *)v4;
        v6 = *(_DWORD *)(v4 + 4);
        v7 = *(_DWORD *)(v4 + 8);
        *(_DWORD *)&itrAction.ItemActionID = v5;
        *(_QWORD *)&itrAction.EffectID = __PAIR__(v7, v6);
        if ( (_WORD)v5 )
        {
          pkDesc = ItemActionEffectDescTab::GetByItemActionID((unsigned __int16)v5);
          if ( pkDesc )
          {
            v8 = std::_Tree<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::find(
                   (std::_Tree<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *)&v2->m_svSetItemName.comp,
                   &result,
                   &itrAction.ItemActionID);
            v9 = v8->_Ptr;
            if ( v8->_Ptr != v2->m_svSetItemName._Myhead )
            {
              v10 = v2->m_apkTextWin[(*iIndex)++];
              ((void (__stdcall *)(const char *))v10->vfptr[118].__vecDelDtor)(" ");
              strSetName._Myres = 15;
              strSetName._Mysize = 0;
              strSetName._Bx._Buf[0] = 0;
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                &strSetName,
                &v9->_Myval.second,
                0,
                0xFFFFFFFF);
              v11 = strSetName._Bx._Ptr;
              v24 = 0;
              if ( strSetName._Myres < 0x10 )
                v11 = &strSetName;
              v12 = v2->m_apkTextWin[*iIndex]->vfptr;
              v13 = v11;
              v14 = (char *)TextData2::Get(0xCEF3EEEE);
              v15 = fs(v14, v13);
              v12[118].__vecDelDtor((NiRefObject *)v2->m_apkTextWin[*iIndex], (unsigned int)v15);
              ((void (__stdcall *)(D3DXCOLOR *))v2->m_apkTextWin[*iIndex]->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
              ++*iIndex;
              v24 = -1;
              if ( strSetName._Myres >= 0x10 )
                operator delete(strSetName._Bx._Ptr);
              strSetName._Myres = 15;
              strSetName._Mysize = 0;
              strSetName._Bx._Buf[0] = 0;
            }
            v16 = ItemActionEffectTab::GetByEffectID(itrAction.EffectID);
            if ( pkDesc->ItemActionDesc[0] != 45 )
            {
              if ( v16 )
                SkillInfoWin::SetTextBeginNewLine(v2, pkDesc->ItemActionDesc, iIndex, &Color::m_kDxYellowColor);
            }
          }
        }
        v17 = (char *)v2->m_svItemAction._Mylast - (char *)v2->m_svItemAction._Myfirst;
        v22 += 12;
        ++i;
      }
      while ( i < v17 / 12 );
    }
  }
}

//----- (0058C9B0) --------------------------------------------------------
void __thiscall SkillInfoWin::SetGTSkillInfo(SkillInfoWin *this, unsigned int uiIndex)
{
  SkillInfoWin *v2; // esi@1
  unsigned int v3; // edi@1
  unsigned int v4; // ebx@4
  char *v5; // eax@8
  const char *v6; // edi@9

  v2 = this;
  v3 = 10;
  do
  {
    ((void (__stdcall *)(_DWORD))v2->m_apkTextWin[0]->vfptr[118].__vecDelDtor)(" ");
    ((void (__stdcall *)(_DWORD))v2->m_apkTextWin[0]->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
    --v3;
  }
  while ( v3 );
  if ( ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::GetTotal() )
  {
    v4 = uiIndex;
    while ( *((_WORD *)CDataReader::GetRecord(
                         (CDataReader *)(ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::ms_pkTable
                                       + 4),
                         v3)
            + 1) != v4 )
    {
      if ( ++v3 >= ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::GetTotal() )
        return;
    }
    v5 = CDataReader::GetRecord(
           (CDataReader *)(ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::ms_pkTable + 4),
           v3);
    if ( v5 )
    {
      v6 = v5 + 72;
      if ( v5[72] != 45 )
      {
        ((void (__stdcall *)(_DWORD))v2->m_apkTextWin[0]->vfptr[118].__vecDelDtor)(v5 + 40);
        ((void (__stdcall *)(_DWORD))v2->m_apkTextWin[1]->vfptr[118].__vecDelDtor)(" ");
        uiIndex = 2;
        SkillInfoWin::SetTextBeginNewLine(v2, v6, (int *)&uiIndex, &Color::m_kDxWhiteColor);
        ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v2->vfptr[135].__vecDelDtor)(
          v2,
          2 * v2->m_uiEdgeWidth + 10,
          2 * v2->m_uiEdgeHeight + 16);
      }
    }
  }
}
// A8C1B8: using guessed type int ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::ms_pkTable;

//----- (0058CAB0) --------------------------------------------------------
int __thiscall SkillInfoWin::SetNeedFame(SkillInfoWin *this, int kSkillID, int index)
{
  int v3; // esi@1
  SkillInfoWin *v4; // edi@1
  _DWORD *v5; // eax@3
  int result; // eax@5
  char *v7; // esi@6
  ItemInfo *v8; // ebx@6
  ItemViewInfo *v9; // eax@6
  int v10; // esi@8
  bool v11; // cf@10
  void *(__thiscall *v12)(NiRefObject *, unsigned int); // eax@10
  unsigned int v13; // ST08_4@13
  NiUnsharedGeometryGroup *v14; // eax@13
  char *v15; // eax@13
  int indexa; // [sp+18h] [bp+Ch]@13

  v3 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  v4 = this;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                          kSkillID)
    && (unsigned __int16)kSkillID <= *(_WORD *)(v3 + 200)
    && (v5 = (_DWORD *)(*(_DWORD *)(v3 + 196) + 4 * (unsigned __int16)kSkillID), *v5)
    && *v5
    && (v7 = (char *)(*v5 + 2), v8 = ItemInfoTab::GetByInxName(v7), v9 = ItemViewInfoTab::GetByInxName(v7), v8)
    && v9 )
  {
    v10 = index;
    if ( v8->BuyFame )
    {
      ((void (__stdcall *)(void *))v4->m_apkTextWin[index]->vfptr[118].__vecDelDtor)(&unk_9A17BE);
      v10 = index + 1;
      if ( !v8->BuyGToken )
      {
        v11 = v8->BuyFame < User::GetMainCharBaseData(&g_kUser)->fame;
        v12 = v4->m_apkTextWin[v10]->vfptr[117].__vecDelDtor;
        if ( v11 )
          ((void (__stdcall *)(D3DXCOLOR *))v12)(&Color::m_kDxWhiteColor);
        else
          ((void (__stdcall *)(D3DXCOLOR *))v12)(&Color::m_kDxRedColor);
        v13 = v8->BuyFame;
        indexa = (int)v4->m_apkTextWin[v10]->vfptr;
        v14 = TextData::Get(0x9BAE96E8);
        v15 = fs("%s: %d", v14, v13);
        (*(void (__thiscall **)(PgWinText *, char *))(indexa + 472))(v4->m_apkTextWin[v10], v15);
        v4->m_apkTextWin[v10 + 1]->vfptr[118].__vecDelDtor((NiRefObject *)v4->m_apkTextWin[v10 + 1], (unsigned int)" ");
        v10 += 2;
      }
    }
    result = v10;
  }
  else
  {
    result = index;
  }
  return result;
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (0058CBF0) --------------------------------------------------------
void __thiscall SkillInfoWin::~SkillInfoWin(SkillInfoWin *this)
{
  SkillInfoWin *v1; // esi@1
  char *v2; // edi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v3; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > v4; // ST04_4@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > result; // [sp+10h] [bp-18h]@1
  std::map<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > > *v6; // [sp+14h] [bp-14h]@1
  SkillInfoWin *v7; // [sp+18h] [bp-10h]@1
  int v8; // [sp+24h] [bp-4h]@1

  v1 = this;
  v7 = this;
  this->vfptr = (NiRefObjectVtbl *)&SkillInfoWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SkillInfoWin::`vftable'{for `IDirectMessenger'};
  v8 = 0;
  v2 = (char *)&this->m_svSetItemName;
  v6 = &this->m_svSetItemName;
  v3 = this->m_svSetItemName._Myhead;
  v4._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)v3->_Left;
  LOBYTE(v8) = 2;
  std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *)&this->m_svSetItemName,
    &result,
    v4,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > >)v3);
  operator delete(*((void **)v2 + 1));
  if ( v1->m_svItemAction._Myfirst )
    operator delete(v1->m_svItemAction._Myfirst);
  v1->m_svItemAction._Myfirst = 0;
  v1->m_svItemAction._Mylast = 0;
  v1->m_svItemAction._Myend = 0;
  v8 = -1;
  FrameBoxWin::~FrameBoxWin((FrameBoxWin *)&v1->vfptr);
}
// 9A1B2C: using guessed type void (__thiscall *SkillInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A1B4C: using guessed type int (__thiscall *SkillInfoWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0058CCB0) --------------------------------------------------------
void __thiscall SkillInfoWin::SkillInfoWin(SkillInfoWin *this)
{
  SkillInfoWin *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v2; // eax@1
  std::exception pExceptionObject; // [sp+Ch] [bp-20h]@3
  SkillInfoWin *v4; // [sp+18h] [bp-14h]@1
  char *_What; // [sp+1Ch] [bp-10h]@3
  int v6; // [sp+28h] [bp-4h]@1

  v1 = this;
  v4 = this;
  FrameBoxWin::FrameBoxWin((FrameBoxWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&SkillInfoWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&SkillInfoWin::`vftable'{for `IDirectMessenger'};
  v6 = 0;
  v1->m_svItemAction._Myfirst = 0;
  v1->m_svItemAction._Mylast = 0;
  v1->m_svItemAction._Myend = 0;
  LOBYTE(v6) = 1;
  v1->m_svSetItemName._Mysize = 0;
  v2 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)operator new(0x30u);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_svSetItemName._Myhead = v2;
  v2->_Left = v2;
  v1->m_svSetItemName._Myhead->_Parent = v1->m_svSetItemName._Myhead;
  v1->m_svSetItemName._Myhead->_Right = v1->m_svSetItemName._Myhead;
  v1->m_svSetItemName._Myhead->_Color = 1;
  v1->m_svSetItemName._Myhead->_Isnil = 1;
  v1->m_iFontHeight = 14;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9A1B2C: using guessed type void (__thiscall *SkillInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A1B4C: using guessed type int (__thiscall *SkillInfoWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0058CD90) --------------------------------------------------------
SkillInfoWin *__cdecl SkillInfoWin::CreateWin(NiSourceTexture *pkTexture, unsigned int uiEdgeHeight, unsigned int uiEdgeWidth)
{
  PgWin *v3; // eax@1
  PgWin *v4; // eax@2
  PgWin *v5; // esi@2
  PgWin *v6; // edi@8
  SkillInfoWin *v7; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x2DCu);
  result.m_pObject = v3;
  v9 = 0;
  if ( v3 )
  {
    SkillInfoWin::SkillInfoWin((SkillInfoWin *)v3);
    v5 = v4;
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v9 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v5);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, NiSourceTexture *, unsigned int, unsigned int))v5->vfptr[137].__vecDelDtor)(
                          v5,
                          pkTexture,
                          uiEdgeHeight,
                          uiEdgeWidth) )
  {
    ((void (__thiscall *)(PgWin *))v5->vfptr[89].__vecDelDtor)(v5);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = (SkillInfoWin *)v5;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v5);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = 0;
  }
  return v7;
}

//----- (0058CED0) --------------------------------------------------------
void __thiscall SkillInfoWin::SetSetItem(SkillInfoWin *this, unsigned __int16 kSkillID)
{
  SkillInfoWin *v2; // esi@1
  int v3; // ebx@2
  ActiveSkillInfo **v4; // eax@6
  ItemAction *v5; // edx@9
  ItemAction *v6; // ecx@9
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v9; // edx@13
  int v10; // esi@13
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> >::_Node *v11; // eax@13
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v12; // eax@14
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *v13; // ST0C_4@15
  Item *v14; // eax@17
  int v15; // esi@18
  int v16; // ebx@18
  int v17; // edx@20
  int v18; // eax@21
  const char *v19; // ecx@22
  char *v20; // eax@23
  char v21; // dl@24
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> >::_Node *v22; // eax@25
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> >::_Node *v23; // eax@26
  ActionEffectItem *v24; // eax@31
  ItemAction *v25; // eax@32
  ItemAction *v26; // esi@32
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *v27; // eax@33
  unsigned int v28; // ecx@34
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> >::_Node *v29; // edi@36
  unsigned int v30; // ebx@39
  char *v31; // eax@40
  char *v32; // ebx@40
  unsigned int v33; // edx@41
  char **v34; // eax@41
  void *v35; // esi@45
  char **v36; // ecx@47
  signed int v37; // eax@51
  int v38; // eax@58
  bool v39; // zf@61
  unsigned int v40; // eax@62
  signed int v41; // eax@63
  unsigned int v42; // ST0C_4@68
  NiTListItem<ItemAction *> *v43; // esi@68
  NiTListItem<ItemAction *> *v44; // edi@68
  ItemAction *v45; // eax@69
  int v46; // edx@70
  unsigned int v47; // ecx@70
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v48; // eax@70
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v49; // esi@70
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v50; // ecx@70
  unsigned __int16 v51; // di@71
  const char *v52; // eax@78
  unsigned __int16 v53; // ax@78
  std::_Tree<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *v54; // esi@78
  std::_Tree_nod<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v55; // eax@78
  NiTListItem<ItemAction *> *v56; // ST0C_4@85
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> >::_Node *v57; // ecx@92
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> >::_Node *v58; // eax@93
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> >::_Node *j; // eax@96
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v60; // esi@105
  ActiveSkillGroup *v61; // eax@106
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v62; // ebx@108
  unsigned int v63; // eax@109
  unsigned int v64; // ecx@109
  unsigned int v65; // esi@109
  char *v66; // eax@110
  char *v67; // eax@113
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v68; // ecx@118
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v69; // eax@119
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *k; // eax@123
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v71; // ST08_4@130
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> >::_Node *v72; // ST08_4@130
  std::exception pExceptionObject; // [sp+10h] [bp-110h]@132
  std::pair<unsigned short,ItemAction> _Val; // [sp+1Ch] [bp-104h]@70
  char *_What; // [sp+2Ch] [bp-F4h]@132
  std::vector<NiPoint3,std::allocator<NiPoint3> > *v76; // [sp+30h] [bp-F0h]@9
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> > >,bool> result; // [sp+34h] [bp-ECh]@26
  NiTList<ItemAction *> kListItemAction; // [sp+3Ch] [bp-E4h]@68
  ItemAction kAction; // [sp+4Ch] [bp-D4h]@34
  ActiveSkillGroup *pkSkillGroup; // [sp+5Ch] [bp-C4h]@13
  std::multimap<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> > > m_mapItemAction; // [sp+60h] [bp-C0h]@14
  ActiveSkillInfo *pkInfo; // [sp+70h] [bp-B0h]@3
  unsigned int i; // [sp+74h] [bp-ACh]@34
  void *kIter; // [sp+78h] [bp-A8h]@25
  std::multimap<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> > > m_mapItemEffect; // [sp+7Ch] [bp-A4h]@13
  int NumPiece; // [sp+8Ch] [bp-94h]@17
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > v87; // [sp+90h] [bp-90h]@33
  int iEquip; // [sp+94h] [bp-8Ch]@15
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strSetName; // [sp+98h] [bp-88h]@78
  std::pair<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > v90; // [sp+B4h] [bp-6Ch]@78
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v91; // [sp+D4h] [bp-4Ch]@26
  signed int v92; // [sp+F0h] [bp-30h]@26
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strItemIndex; // [sp+F4h] [bp-2Ch]@23
  int v94; // [sp+11Ch] [bp-4h]@14

  v2 = this;
  if ( kSkillID != -1 )
  {
    v3 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                             + 16))(
                            ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                            kSkillID) )
    {
      if ( kSkillID <= *(_WORD *)(v3 + 200) )
      {
        v4 = (ActiveSkillInfo **)(*(_DWORD *)(v3 + 196) + 4 * kSkillID);
        if ( *v4 )
          pkInfo = *v4;
        else
          pkInfo = 0;
      }
      else
      {
        pkInfo = 0;
      }
    }
    else
    {
      pkInfo = 0;
    }
    v5 = v2->m_svItemAction._Mylast;
    v6 = v2->m_svItemAction._Myfirst;
    v76 = (std::vector<NiPoint3,std::allocator<NiPoint3> > *)&v2->m_svItemAction;
    if ( v6 != v5 )
      v2->m_svItemAction._Mylast = v6;
    std::vector<ItemAction,std::allocator<ItemAction>>::resize(&v2->m_svItemAction, 0);
    v9 = (std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)v2->m_svSetItemName._Myhead->_Parent;
    v10 = (int)&v2->m_svSetItemName;
    pkSkillGroup = (ActiveSkillGroup *)v10;
    std::_Tree<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Erase(
      (std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *)v10,
      v9);
    *(_DWORD *)(*(_DWORD *)(v10 + 4) + 4) = *(_DWORD *)(v10 + 4);
    **(_DWORD **)(v10 + 4) = *(_DWORD *)(v10 + 4);
    *(_DWORD *)(*(_DWORD *)(v10 + 4) + 8) = *(_DWORD *)(v10 + 4);
    *(_DWORD *)(v10 + 8) = 0;
    m_mapItemEffect._Mysize = 0;
    v11 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> >::_Node *)operator new(0x30u);
    if ( !v11 )
    {
      kIter = 0;
      std::exception::exception((std::exception *)&kAction, (const char *const *)&kIter);
      *(_DWORD *)&kAction.ItemActionID = &std::bad_alloc::`vftable';
      _CxxThrowException(&kAction, &_TI2_AVbad_alloc_std__);
    }
    m_mapItemEffect._Myhead = v11;
    v11->_Left = v11;
    m_mapItemEffect._Myhead->_Parent = m_mapItemEffect._Myhead;
    m_mapItemEffect._Myhead->_Right = m_mapItemEffect._Myhead;
    m_mapItemEffect._Myhead->_Color = 1;
    m_mapItemEffect._Myhead->_Isnil = 1;
    v94 = 0;
    m_mapItemAction._Mysize = 0;
    v12 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *)operator new(0x1Cu);
    if ( !v12 )
    {
      _What = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&_What);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
    m_mapItemAction._Myhead = v12;
    v12->_Left = v12;
    m_mapItemAction._Myhead->_Parent = m_mapItemAction._Myhead;
    m_mapItemAction._Myhead->_Right = m_mapItemAction._Myhead;
    m_mapItemAction._Myhead->_Color = 1;
    m_mapItemAction._Myhead->_Isnil = 1;
    v13 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *)m_mapItemEffect._Myhead->_Parent;
    LOBYTE(v94) = 1;
    std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::_Erase(
      (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > *)&m_mapItemEffect,
      v13);
    m_mapItemEffect._Myhead->_Parent = m_mapItemEffect._Myhead;
    m_mapItemEffect._Myhead->_Left = m_mapItemEffect._Myhead;
    m_mapItemEffect._Myhead->_Right = m_mapItemEffect._Myhead;
    m_mapItemEffect._Mysize = 0;
    iEquip = 0;
    do
    {
      if ( (unsigned int)iEquip < 0x1E )
      {
        v14 = g_kInventory.m_aspEquip[iEquip].m_pObject;
        NumPiece = (int)v14;
        if ( v14 )
        {
          v15 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
          v16 = v14->m_kStruct.itemid;
          if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                                + 16))(
                                  ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                                  v16) )
          {
            if ( (unsigned __int16)v16 <= *(_WORD *)(v15 + 200) )
            {
              v17 = *(_DWORD *)(v15 + 196);
              if ( *(_DWORD *)(v17 + 4 * v16) )
              {
                v18 = *(_DWORD *)(v17 + 4 * v16);
                if ( v18 )
                {
                  v19 = (const char *)(v18 + 342);
                  if ( *(_BYTE *)(v18 + 342) != 45 )
                  {
                    v20 = (char *)(v18 + 342);
                    strItemIndex._Myres = 15;
                    strItemIndex._Mysize = 0;
                    strItemIndex._Bx._Buf[0] = 0;
                    do
                      v21 = *v20++;
                    while ( v21 );
                    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                      &strItemIndex,
                      v19,
                      v20 - (v19 + 1));
                    LOBYTE(v94) = 2;
                    v22 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> >::_Node *)std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::find((std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *)&m_mapItemEffect, (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > *)&kIter, &strItemIndex)->_Ptr;
                    if ( v22 == m_mapItemEffect._Myhead )
                    {
                      v91._Myres = 15;
                      v91._Mysize = 0;
                      v91._Bx._Buf[0] = 0;
                      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                        &v91,
                        &strItemIndex,
                        0,
                        0xFFFFFFFF);
                      v92 = 1;
                      LOBYTE(v94) = 3;
                      v23 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> >::_Node *)std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,CAbstractProperty *>>,0>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>>((std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > *)&m_mapItemEffect, (std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v91);
                      std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::_Linsert(
                        (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> > *)&m_mapItemEffect.comp,
                        &result,
                        v23,
                        0);
                      if ( v91._Myres >= 0x10 )
                        operator delete(v91._Bx._Ptr);
                    }
                    else
                    {
                      ++v22->_Myval.second;
                    }
                    LOBYTE(v94) = 1;
                    if ( strItemIndex._Myres >= 0x10 )
                      operator delete(strItemIndex._Bx._Ptr);
                  }
                  v24 = ActionEffectItemTab::GetByItemID(*(_WORD *)(NumPiece + 8));
                  if ( v24 )
                  {
                    v25 = ItemActionTab::GetByItemActionID(v24->ItemActionID);
                    v26 = v25;
                    if ( v25 )
                    {
                      v27 = std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::find(
                              (std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *)&m_mapItemAction.comp,
                              &v87,
                              &v25->ItemActionID);
                      if ( v27->_Ptr == m_mapItemAction._Myhead )
                      {
                        v28 = *(_DWORD *)&v26->EffectID;
                        *(_DWORD *)&kAction.ConditionID = *(_DWORD *)&v26->ItemActionID;
                        kAction.CoolTime = v28;
                        kAction.ItemActionID = kAction.ConditionID;
                        *(_DWORD *)&kAction.CoolGroupActionID = *(unsigned int *)((char *)&v26->CoolTime + 2);
                        std::multimap<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>>::insert<std::pair<unsigned short,ItemAction>>(
                          &m_mapItemAction,
                          (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *)&i,
                          (std::pair<unsigned short,ItemAction> *)&kAction);
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
      ++iEquip;
    }
    while ( iEquip < 30 );
    v29 = m_mapItemEffect._Myhead->_Left;
    iEquip = (int)v29;
    if ( v29 != m_mapItemEffect._Myhead )
    {
      while ( 1 )
      {
        *(_DWORD *)&v91._Alval.0 = 15;
        v91._Myres = 0;
        v91._Bx._Buf[4] = 0;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)&v91 + 4),
          &v29->_Myval.first,
          0,
          0xFFFFFFFF);
        LOBYTE(v94) = 4;
        NumPiece = 1;
        if ( v29->_Myval.second >= 1 )
          break;
LABEL_91:
        if ( !v29->_Isnil )
        {
          v57 = v29->_Right;
          if ( v57->_Isnil )
          {
            for ( j = v29->_Parent; !j->_Isnil; j = j->_Parent )
            {
              if ( v29 != j->_Right )
                break;
              v29 = j;
            }
            v29 = j;
          }
          else
          {
            v58 = v57->_Left;
            if ( !v57->_Left->_Isnil )
            {
              do
              {
                v57 = v58;
                v58 = v58->_Left;
              }
              while ( !v58->_Isnil );
            }
            v29 = v57;
          }
          iEquip = (int)v29;
        }
        LOBYTE(v94) = 1;
        if ( *(_DWORD *)&v91._Alval.0 >= 0x10u )
          operator delete(*(void **)&v91._Bx._Alias[4]);
        if ( v29 == m_mapItemEffect._Myhead )
          goto LABEL_104;
      }
      while ( 1 )
      {
        i = 0;
        if ( SetEffectTab::GetTotal() )
          break;
LABEL_90:
        if ( ++NumPiece > v29->_Myval.second )
          goto LABEL_91;
      }
      v30 = i;
      while ( 1 )
      {
        v31 = CDataReader::GetRecord((CDataReader *)(ITableBase<SetEffect,SetEffectTab>::ms_pkTable + 4), v30);
        v32 = v31;
        if ( v31 )
          break;
LABEL_89:
        v30 = ++i;
        if ( v30 >= SetEffectTab::GetTotal() )
          goto LABEL_90;
      }
      strItemIndex._Myres = 15;
      strItemIndex._Mysize = 0;
      strItemIndex._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strItemIndex, v31, strlen(v31));
      v33 = v29->_Myval.first._Mysize;
      v34 = &v29->_Myval.first._Bx._Ptr;
      if ( v29->_Myval.first._Myres >= 0x10 )
        v34 = (char **)*v34;
      if ( strItemIndex._Mysize < v33 )
        v33 = strItemIndex._Mysize;
      v35 = strItemIndex._Bx._Ptr;
      if ( strItemIndex._Myres < 0x10 )
        v35 = &strItemIndex;
      v36 = v34;
      if ( v33 < 4 )
      {
LABEL_50:
        if ( !v33 )
        {
LABEL_60:
          v38 = 0;
          goto LABEL_61;
        }
      }
      else
      {
        while ( *(char **)v35 == *v36 )
        {
          v33 -= 4;
          ++v36;
          v35 = (char *)v35 + 4;
          if ( v33 < 4 )
            goto LABEL_50;
        }
      }
      v37 = *(_BYTE *)v35 - *(_BYTE *)v36;
      if ( *(_BYTE *)v35 == *(_BYTE *)v36 )
      {
        if ( v33 <= 1 )
          goto LABEL_59;
        v37 = *((_BYTE *)v35 + 1) - *((_BYTE *)v36 + 1);
        if ( *((_BYTE *)v35 + 1) != *((_BYTE *)v36 + 1) )
          goto LABEL_58;
        if ( v33 <= 2 )
        {
LABEL_59:
          v29 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> >::_Node *)iEquip;
          goto LABEL_60;
        }
        v37 = *((_BYTE *)v35 + 2) - *((_BYTE *)v36 + 2);
        if ( *((_BYTE *)v35 + 2) == *((_BYTE *)v36 + 2) )
        {
          if ( v33 > 3 )
          {
            v37 = *((_BYTE *)v35 + 3) - *((_BYTE *)v36 + 3);
            goto LABEL_58;
          }
          goto LABEL_59;
        }
      }
LABEL_58:
      v29 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> >::_Node *)iEquip;
      v38 = (v37 >> 31) | 1;
LABEL_61:
      v39 = v38 == 0;
      if ( !v38 )
      {
        v40 = v29->_Myval.first._Mysize;
        if ( strItemIndex._Mysize >= v40 )
          v41 = strItemIndex._Mysize != v40;
        else
          v41 = -1;
        v39 = v41 == 0;
      }
      if ( v39 && (unsigned __int8)v32[32] == NumPiece )
      {
        kListItemAction.m_kAllocator.m_uiCount = 0;
        kListItemAction.m_pkHead = 0;
        kListItemAction.m_pkTail = 0;
        kListItemAction.vfptr = (NiTListBase<DFALL<ItemAction *>,ItemAction *>Vtbl *)&NiTList<ItemAction *>::`vftable';
        v42 = *(_WORD *)(v32 + 33);
        LOBYTE(v94) = 6;
        ItemActionTab::GetListByItemActionID(&kListItemAction, v42);
        v43 = kListItemAction.m_pkHead;
        v44 = kListItemAction.m_pkHead;
        if ( kListItemAction.m_pkHead )
        {
          do
          {
            v45 = v44->m_element;
            v44 = v44->m_pkNext;
            kIter = v44;
            if ( v45 )
            {
              v46 = *(_DWORD *)&v45->ItemActionID;
              _Val.first = *(_WORD *)(v32 + 33);
              v47 = *(_DWORD *)&v45->EffectID;
              *(_DWORD *)&_Val.second.ItemActionID = v46;
              *(_QWORD *)&_Val.second.EffectID = __PAIR__(*(unsigned int *)((char *)&v45->CoolTime + 2), v47);
              v48 = std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Buynode<std::pair<unsigned short,ItemAction>>(
                      (std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *)&m_mapItemAction.comp,
                      &_Val);
              v49 = m_mapItemAction._Myhead;
              v50 = m_mapItemAction._Myhead->_Parent;
              v39 = v50->_Isnil == 0;
              LOBYTE(v87._Ptr) = 1;
              if ( v39 )
              {
                v51 = v48->_Myval.first;
                do
                {
                  v49 = v50;
                  LOBYTE(v87._Ptr) = v51 < v50->_Myval.first;
                  if ( LOBYTE(v87._Ptr) )
                    v50 = v50->_Left;
                  else
                    v50 = v50->_Right;
                }
                while ( !v50->_Isnil );
                v44 = (NiTListItem<ItemAction *> *)kIter;
              }
              std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Insert(
                (std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *)&m_mapItemAction.comp,
                (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *)&result.second,
                (bool)v87._Ptr,
                v49,
                v48);
              if ( SetItemNameTab::GetByInxName(v32) )
              {
                v52 = SetItemNameTab::GetByInxName(v32)->SetName;
                strSetName._Myres = 15;
                strSetName._Mysize = 0;
                strSetName._Bx._Buf[0] = 0;
                std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                  &strSetName,
                  v52,
                  strlen(v52));
                v53 = *(_WORD *)(v32 + 33);
                LOBYTE(v94) = 7;
                v90.first = v53;
                v90.second._Myres = 15;
                v90.second._Mysize = 0;
                v90.second._Bx._Buf[0] = 0;
                std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                  &v90.second,
                  &strSetName,
                  0,
                  0xFFFFFFFF);
                v54 = (std::_Tree<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *)pkSkillGroup;
                LOBYTE(v94) = 8;
                v55 = std::_Tree_val<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Buynode<std::pair<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>(
                        (std::_Tree_val<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *)pkSkillGroup,
                        &v90);
                std::_Tree<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Linsert(
                  v54,
                  (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > >,bool> *)&kAction.EffectID,
                  v55,
                  0);
                if ( v90.second._Myres >= 0x10 )
                  operator delete(v90.second._Bx._Ptr);
                LOBYTE(v94) = 6;
                if ( strSetName._Myres >= 0x10 )
                  operator delete(strSetName._Bx._Ptr);
              }
            }
          }
          while ( v44 );
          v43 = kListItemAction.m_pkHead;
        }
        kListItemAction.vfptr = (NiTListBase<DFALL<ItemAction *>,ItemAction *>Vtbl *)&NiTPointerListBase<DFALL<ItemAction *>,ItemAction *>::`vftable';
        LOBYTE(v94) = 9;
        while ( v43 )
        {
          v56 = v43;
          v43 = v43->m_pkNext;
          kListItemAction.vfptr->DeleteItem((NiTListBase<DFALL<ItemAction *>,ItemAction *> *)&kListItemAction, v56);
        }
        v29 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> >::_Node *)iEquip;
        kListItemAction.m_kAllocator.m_uiCount = 0;
        kListItemAction.m_pkHead = 0;
        kListItemAction.m_pkTail = 0;
        kListItemAction.vfptr = (NiTListBase<DFALL<ItemAction *>,ItemAction *>Vtbl *)&NiTListBase<DFALL<ItemAction *>,ItemAction *>::`vftable';
      }
      LOBYTE(v94) = 4;
      if ( strItemIndex._Myres >= 0x10 )
        operator delete(strItemIndex._Bx._Ptr);
      goto LABEL_89;
    }
LABEL_104:
    if ( m_mapItemAction._Mysize )
    {
      v60 = 0;
      v87._Ptr = 0;
      if ( ActiveSkillGroupTab::GetTotal() )
      {
        do
        {
          v61 = (ActiveSkillGroup *)CDataReader::GetRecord(
                                      (CDataReader *)(ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::ms_pkTable + 4),
                                      (unsigned int)v60);
          pkSkillGroup = v61;
          if ( v61 )
          {
            if ( !strcmp(v61->InxName, pkInfo->InxName) )
            {
              v62 = m_mapItemAction._Myhead->_Left;
              if ( m_mapItemAction._Myhead->_Left != m_mapItemAction._Myhead )
              {
                do
                {
                  v63 = *(_DWORD *)&v62->_Myval.second.EffectID;
                  v64 = *(unsigned int *)((char *)&v62->_Myval.second.CoolTime + 2);
                  *(_DWORD *)&kAction.ItemActionID = *(_DWORD *)&v62->_Myval.second.ItemActionID;
                  *(_QWORD *)&kAction.EffectID = __PAIR__(v64, v63);
                  v65 = 0;
                  if ( ITableBase<ItemActionCondition,ItemActionConditionTab>::GetTotal() )
                  {
                    while ( 1 )
                    {
                      v66 = CDataReader::GetRecord(
                              (CDataReader *)(ITableBase<ItemActionCondition,ItemActionConditionTab>::ms_pkTable + 4),
                              v65);
                      if ( v66 )
                      {
                        if ( *(_WORD *)v66 == kAction.ConditionID )
                          break;
                      }
                      if ( ++v65 >= ITableBase<ItemActionCondition,ItemActionConditionTab>::GetTotal() )
                        goto LABEL_113;
                    }
                    v67 = CDataReader::GetRecord(
                            (CDataReader *)(ITableBase<ItemActionCondition,ItemActionConditionTab>::ms_pkTable + 4),
                            v65);
                  }
                  else
                  {
LABEL_113:
                    v67 = 0;
                  }
                  if ( *(_DWORD *)(v67 + 18) == 7 && pkSkillGroup->ActiveSkillGroupIndex == *(_DWORD *)(v67 + 22) )
                    std::vector<ItemAction,std::allocator<ItemAction>>::push_back(v76, (NiPoint3 *)&v62->_Myval.second);
                  if ( !v62->_Isnil )
                  {
                    v68 = v62->_Right;
                    if ( v68->_Isnil )
                    {
                      for ( k = v62->_Parent; !k->_Isnil; k = k->_Parent )
                      {
                        if ( v62 != k->_Right )
                          break;
                        v62 = k;
                      }
                      v62 = k;
                    }
                    else
                    {
                      v69 = v68->_Left;
                      if ( !v68->_Left->_Isnil )
                      {
                        do
                        {
                          v68 = v69;
                          v69 = v69->_Left;
                        }
                        while ( !v69->_Isnil );
                      }
                      v62 = v68;
                    }
                  }
                }
                while ( v62 != m_mapItemAction._Myhead );
                v60 = v87._Ptr;
              }
            }
          }
          v60 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *)((char *)v60 + 1);
          v87._Ptr = v60;
        }
        while ( (unsigned int)v60 < ActiveSkillGroupTab::GetTotal() );
      }
    }
    v71 = m_mapItemAction._Myhead->_Left;
    LOBYTE(v94) = 10;
    std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::erase(
      (std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *)&m_mapItemAction.comp,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *)&result.second,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > >)v71,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > >)m_mapItemAction._Myhead);
    operator delete(m_mapItemAction._Myhead);
    v72 = m_mapItemEffect._Myhead->_Left;
    v94 = 11;
    std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::erase(
      (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > *)&m_mapItemEffect,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > *)&result.second,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > >)v72,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > >)m_mapItemEffect._Myhead);
    operator delete(m_mapItemEffect._Myhead);
  }
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9A1AFC: using guessed type int (__thiscall *NiTListBase<DFALL<ItemAction *>,ItemAction *>::`vftable')(void *p, char);
// 9A1B0C: using guessed type int (__thiscall *NiTPointerListBase<DFALL<ItemAction *>,ItemAction *>::`vftable')(void *p, char);
// 9A1B1C: using guessed type int (__thiscall *NiTList<ItemAction *>::`vftable')(void *p, char);
// A8C1A4: using guessed type int ITableBase<SetEffect,SetEffectTab>::ms_pkTable;
// A8C1B4: using guessed type int ITableBase<ItemActionCondition,ItemActionConditionTab>::ms_pkTable;
// A8C1E0: using guessed type int ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::ms_pkTable;
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (0058D960) --------------------------------------------------------
int __thiscall SkillInfoWin::SetSkillInfo(SkillInfoWin *this, unsigned __int16 kSkillID, bool bViewEmpowerPointApplied, Skill::EmpowerInfo *pkVirtualValue, bool bBuy)
{
  SkillInfoWin *v5; // esi@1
  int v6; // ebx@1
  int v7; // ebx@4
  int v8; // ebx@5
  int v9; // edx@8
  int (__stdcall *v10)(_DWORD); // edx@11
  _DWORD *v11; // eax@15
  NiRefObjectVtbl *v12; // edi@22
  signed int v13; // ebx@22
  NiUnsharedGeometryGroup *v14; // eax@22
  NiRefObjectVtbl *v15; // edi@24
  NiUnsharedGeometryGroup *v16; // eax@24
  ProduceInfo *v17; // ecx@24
  bool v18; // zf@25
  ProduceInfo *v19; // eax@25
  NiUnsharedGeometryGroup *v20; // eax@26
  void *(__thiscall *v21)(NiRefObject *, unsigned int); // eax@30
  NiRefObjectVtbl *v22; // edi@33
  NiUnsharedGeometryGroup *v23; // eax@33
  void *(__thiscall *v24)(NiRefObject *, unsigned int); // edx@36
  signed int v25; // edi@37
  NiUnsharedGeometryGroup *v26; // eax@38
  void *(__thiscall *v27)(NiRefObject *, unsigned int); // edx@38
  void *(__thiscall *v28)(NiRefObject *, unsigned int); // edx@43
  unsigned int v29; // eax@44
  NiUnsharedGeometryGroup *v30; // eax@45
  ProduceInfo *v31; // eax@46
  ProduceInfo *v32; // ecx@46
  char v33; // dl@47
  char v34; // al@47
  char v35; // dl@47
  char v36; // al@47
  char v37; // dl@47
  char v38; // cl@47
  Skill::LearnProdSkillInfo *v39; // eax@49
  unsigned __int16 v40; // bx@49
  unsigned int v41; // edi@50
  char *v42; // eax@51
  ProduceInfo **v43; // edi@59
  unsigned int v44; // ST6C_4@59
  char *v45; // eax@59
  char *v46; // eax@59
  Skill::EmpowerInfo *v48; // eax@64
  __int64 v49; // rax@67
  int v50; // edi@67
  signed __int64 v51; // rax@67
  bool v52; // al@69
  NiRefObjectVtbl *v53; // edx@69
  NiRefObjectVtbl **v54; // ebx@69
  NiRefObjectVtbl *v55; // edi@69
  NiUnsharedGeometryGroup *v56; // eax@69
  signed int v57; // ebx@69
  NiRefObjectVtbl *v58; // edi@73
  NiUnsharedGeometryGroup *v59; // eax@73
  void *(__thiscall *v60)(NiRefObject *, unsigned int); // edx@76
  NiRefObjectVtbl *v61; // edi@77
  char *v62; // eax@77
  char *v63; // eax@77
  unsigned int v64; // ST6C_4@79
  NiUnsharedGeometryGroup *v65; // eax@79
  void *(__thiscall *v66)(NiRefObject *, unsigned int); // eax@79
  WeaponDemandType v67; // eax@82
  int v68; // ebx@82
  NiRefObjectVtbl *v69; // edi@84
  NiUnsharedGeometryGroup *v70; // eax@84
  ProduceInfo *v71; // ecx@84
  NiRefObjectVtbl *v72; // edi@86
  NiUnsharedGeometryGroup *v73; // eax@86
  ProduceInfo *v74; // ecx@86
  ItemAction *v75; // edi@116
  ItemAction *v76; // ecx@116
  ItemActionEffect *v77; // eax@118
  unsigned int v78; // edx@121
  ItemAction *v79; // ecx@122
  const char *v80; // edi@124
  ProduceInfo *v81; // ST6C_4@126
  unsigned int v82; // ST68_4@126
  char *v83; // eax@126
  char *v84; // eax@126
  unsigned int v85; // ST6C_4@128
  char *v86; // eax@128
  const char *v87; // esi@130
  unsigned int v88; // edx@130
  char *v89; // edi@130
  char v90; // cl@131
  unsigned int v91; // edx@136
  NiRefObjectVtbl *v92; // edi@137
  unsigned __int64 v93; // ST68_8@137
  char *v94; // eax@137
  char *v95; // eax@137
  NiRefObjectVtbl *v96; // edi@140
  unsigned int v97; // ST6C_4@140
  char *v98; // eax@140
  char *v99; // eax@140
  unsigned int v100; // ecx@141
  NiRefObjectVtbl *v101; // edi@142
  unsigned int v102; // ST6C_4@142
  char *v103; // eax@142
  char *v104; // eax@142
  unsigned int v105; // ecx@143
  NiRefObjectVtbl *v106; // edi@144
  unsigned int v107; // ST6C_4@144
  char *v108; // eax@144
  char *v109; // eax@144
  NiRefObjectVtbl *v110; // edi@146
  unsigned int v111; // ST6C_4@146
  char *v112; // eax@146
  char *v113; // eax@146
  char v114; // cl@147
  NiRefObjectVtbl *v115; // edi@148
  int v116; // ST6C_4@148
  char *v117; // eax@148
  char *v118; // eax@148
  void *(__thiscall *v119)(NiRefObject *, unsigned int); // edx@151
  int v120; // eax@152
  int v121; // ebx@152
  ItemAction *v122; // edi@153
  signed int v123; // ecx@153
  unsigned int v124; // ebx@153
  ItemActionEffect *v125; // eax@155
  unsigned int v126; // ecx@157
  ItemAction *v127; // ecx@160
  unsigned int v128; // edx@160
  NiUnsharedGeometryGroup *v129; // eax@162
  NiUnsharedGeometryGroup *v130; // ecx@162
  int v131; // edi@162
  char v132; // dl@163
  char v133; // dl@166
  char *v134; // eax@169
  char *v135; // edi@171
  char *v136; // eax@172
  char *v137; // eax@175
  char *v138; // eax@179
  char *v139; // edx@186
  char v140; // cl@187
  unsigned int v141; // eax@188
  char *v142; // edi@188
  char v143; // cl@189
  char *v144; // eax@192
  char *v145; // eax@195
  char *v146; // ecx@195
  char v147; // dl@196
  char *v148; // esi@197
  char v149; // cl@198
  char *v150; // eax@202
  char *v151; // ecx@202
  char v152; // dl@203
  char v153; // cl@205
  char *v154; // eax@208
  char *v155; // eax@210
  char v156; // cl@211
  char v157; // cl@213
  ItemAction *v158; // edi@216
  signed int v159; // ecx@216
  unsigned int v160; // ebx@216
  unsigned int v161; // edi@218
  char *v162; // eax@219
  char *v163; // eax@223
  unsigned int v164; // edx@226
  ItemAction *v165; // ecx@227
  char *v166; // eax@230
  char v167; // cl@231
  char *v168; // eax@234
  char *v169; // edi@236
  NiUnsharedGeometryGroup *v170; // ST64_4@238
  double v171; // ST5C_8@238
  NiUnsharedGeometryGroup *v172; // eax@238
  char *v173; // eax@238
  NiUnsharedGeometryGroup *v174; // ST68_4@239
  double v175; // ST60_8@239
  NiUnsharedGeometryGroup *v176; // eax@239
  char *v177; // edx@240
  char v178; // cl@241
  unsigned int v179; // eax@242
  char *v180; // edi@242
  char v181; // cl@243
  NiUnsharedGeometryGroup *v182; // eax@246
  char *v183; // eax@246
  char v184; // cl@247
  char v185; // cl@249
  NiUnsharedGeometryGroup *v186; // eax@251
  char *v187; // eax@251
  char v188; // cl@252
  char v189; // cl@254
  char *v190; // eax@258
  char v191; // cl@259
  NiUnsharedGeometryGroup *v192; // ST68_4@262
  double v193; // ST60_8@262
  NiUnsharedGeometryGroup *v194; // eax@262
  char *v195; // eax@262
  char *v196; // ecx@262
  char v197; // dl@263
  unsigned int v198; // eax@264
  char *v199; // esi@264
  char *v200; // edi@264
  char v201; // cl@265
  NiUnsharedGeometryGroup *v202; // ST6C_4@267
  double v203; // ST64_8@267
  NiUnsharedGeometryGroup *v204; // eax@267
  char *v205; // eax@267
  char *v206; // ecx@267
  char v207; // dl@268
  unsigned int v208; // eax@269
  char *v209; // esi@269
  char *v210; // edi@269
  char v211; // cl@270
  NiUnsharedGeometryGroup *v212; // eax@273
  char *v213; // eax@273
  char v214; // cl@274
  char v215; // cl@276
  char *v216; // edi@279
  char v217; // al@280
  unsigned int v218; // ebx@281
  void *(__thiscall *v219)(NiRefObject *, unsigned int); // eax@288
  unsigned int v220; // eax@289
  NiRefObjectVtbl *v221; // edi@290
  void *v222; // eax@290
  ProduceInfo *v223; // ecx@290
  void *(__thiscall *v224)(NiRefObject *, unsigned int); // edx@290
  double v225; // ST68_8@291
  NiUnsharedGeometryGroup *v226; // eax@291
  unsigned int v227; // eax@292
  int v228; // ebx@292
  NiUnsharedGeometryGroup *v229; // ST64_4@293
  double v230; // ST68_8@294
  NiUnsharedGeometryGroup *v231; // ST64_4@294
  ItemAction *v232; // edi@297
  ItemAction *v233; // ecx@297
  unsigned int v234; // edi@299
  char *v235; // eax@300
  char *v236; // eax@304
  unsigned int v237; // edx@307
  ItemAction *v238; // ecx@308
  char *v239; // eax@311
  const char *v240; // esi@313
  char *v241; // eax@314
  char *v242; // ST6C_4@314
  char *v243; // ST68_4@314
  char *v244; // eax@314
  char *v245; // eax@314
  char *v246; // ST6C_4@315
  char *v247; // eax@315
  unsigned int v248; // edx@316
  char *v249; // edi@316
  char v250; // cl@317
  NiRefObjectVtbl **v251; // eax@320
  NiRefObjectVtbl *v252; // edi@320
  char *v253; // eax@321
  char *v254; // ST6C_4@321
  char *v255; // ST68_4@321
  char *v256; // eax@321
  char *v257; // ST6C_4@321
  int v258; // ST6C_4@322
  char *v259; // ST6C_4@322
  char *v260; // eax@322
  char *v261; // eax@322
  TargetType v262; // eax@323
  signed int v263; // ebx@323
  ProduceInfo *v264; // eax@324
  int v265; // edi@324
  NiUnsharedGeometryGroup *v266; // ST6C_4@324
  NiUnsharedGeometryGroup *v267; // eax@324
  char *v268; // eax@324
  ProduceInfo *v269; // eax@325
  int v270; // edi@325
  NiUnsharedGeometryGroup *v271; // ST6C_4@325
  NiUnsharedGeometryGroup *v272; // eax@325
  char *v273; // eax@325
  ProduceInfo *v274; // ecx@325
  ProduceInfo *v275; // eax@326
  int v276; // edi@326
  NiUnsharedGeometryGroup *v277; // ST6C_4@326
  NiUnsharedGeometryGroup *v278; // eax@326
  char *v279; // eax@326
  ProduceInfo *v280; // eax@327
  NiUnsharedGeometryGroup *v281; // ST6C_4@328
  NiUnsharedGeometryGroup *v282; // eax@328
  NiUnsharedGeometryGroup *v283; // ST6C_4@329
  NiUnsharedGeometryGroup *v284; // eax@329
  char *v285; // eax@329
  ProduceInfo *v286; // eax@330
  NiUnsharedGeometryGroup *v287; // ST6C_4@330
  NiUnsharedGeometryGroup *v288; // eax@330
  ProduceInfo *v289; // eax@331
  int v290; // edi@331
  NiUnsharedGeometryGroup *v291; // ST6C_4@331
  NiUnsharedGeometryGroup *v292; // eax@331
  char *v293; // eax@331
  ProduceInfo *v294; // eax@332
  NiUnsharedGeometryGroup *v295; // ST6C_4@332
  NiUnsharedGeometryGroup *v296; // eax@332
  void *(__thiscall *v297)(NiRefObject *, unsigned int); // eax@336
  double v298; // [sp+68h] [bp-2B8h]@233
  bool bLevelSatisfied; // [sp+83h] [bp-29Dh]@67
  ActiveSkillViewInfo *pkViewInfo; // [sp+84h] [bp-29Ch]@12
  __int64 kClassMask; // [sp+88h] [bp-298h]@67
  Skill::LearnProdSkillInfo *kClassMask_4; // [sp+8Ch] [bp-294h]@49
  int kClassMask_4a; // [sp+8Ch] [bp-294h]@116
  int kClassMask_4b; // [sp+8Ch] [bp-294h]@153
  float kClassMask_4c; // [sp+8Ch] [bp-294h]@216
  unsigned int kClassMask_4d; // [sp+8Ch] [bp-294h]@297
  SkillInfoWin *i; // [sp+90h] [bp-290h]@1
  unsigned int ia; // [sp+90h] [bp-290h]@48
  unsigned int totalNum; // [sp+98h] [bp-288h]@48
  unsigned int totalNuma; // [sp+98h] [bp-288h]@116
  unsigned int totalNumb; // [sp+98h] [bp-288h]@218
  signed int totalNumc; // [sp+98h] [bp-288h]@297
  unsigned int uiExp; // [sp+9Ch] [bp-284h]@46
  unsigned int uiExpa; // [sp+9Ch] [bp-284h]@63
  unsigned int uiExpb; // [sp+9Ch] [bp-284h]@299
  ActiveSkillInfo *pkInfo; // [sp+A0h] [bp-280h]@11
  unsigned int dwDlyTime; // [sp+A4h] [bp-27Ch]@22
  bool bSetItemAttackPower; // [sp+AAh] [bp-276h]@37
  bool bNeedToViewEmpower; // [sp+ABh] [bp-275h]@69
  ProduceInfo *pkProduceInfo; // [sp+ACh] [bp-274h]@1
  char acStr[256]; // [sp+B0h] [bp-270h]@38
  char acRate[256]; // [sp+1B0h] [bp-170h]@171
  char acEmpowerApplyDesc[64]; // [sp+2B0h] [bp-70h]@153
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strAttackInfoExplanation; // [sp+2F0h] [bp-30h]@47
  int v325; // [sp+30Ch] [bp-14h]@47
  int v326; // [sp+31Ch] [bp-4h]@161

  v5 = this;
  i = this;
  SkillInfoWin::HideAllMoneyWin(this);
  v6 = (int)v5->m_apkTextWin;
  pkProduceInfo = (ProduceInfo *)60;
  do
  {
    (*(void (__stdcall **)(void *))(**(_DWORD **)v6 + 472))(&unk_9A17B3);
    (*(void (__stdcall **)(D3DXCOLOR *))(**(_DWORD **)v6 + 468))(&Color::m_kDxWhiteColor);
    v6 += 4;
    pkProduceInfo = (ProduceInfo *)((char *)pkProduceInfo - 1);
  }
  while ( pkProduceInfo );
  if ( kSkillID == -1 )
    return 0;
  SkillInfoWin::SetSetItem(v5, kSkillID);
  v7 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                           + 16))(
                          ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                          kSkillID) )
  {
    if ( kSkillID <= *(_WORD *)(v7 + 200) )
    {
      v9 = *(_DWORD *)(v7 + 196);
      v8 = *(_DWORD *)(v9 + 4 * kSkillID) ? *(_DWORD *)(v9 + 4 * kSkillID) : 0;
    }
    else
    {
      v8 = 0;
    }
  }
  else
  {
    v8 = 0;
  }
  v10 = *(int (__stdcall **)(_DWORD))(*(_DWORD *)ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable + 16);
  pkInfo = (ActiveSkillInfo *)v8;
  pkProduceInfo = (ProduceInfo *)ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable;
  if ( (unsigned __int8)v10(kSkillID) )
  {
    if ( kSkillID <= *(_WORD *)&pkProduceInfo->Raw1[30] )
    {
      v11 = (_DWORD *)(*(_DWORD *)&pkProduceInfo->Raw1[26] + 4 * kSkillID);
      pkViewInfo = (ActiveSkillViewInfo *)(*v11 ? *v11 : 0);
    }
    else
    {
      pkViewInfo = 0;
    }
  }
  else
  {
    pkViewInfo = 0;
  }
  if ( !v8 || !pkViewInfo )
    return 0;
  if ( kSkillID < 0x4E20u )
  {
    uiExpa = 0;
    if ( bViewEmpowerPointApplied )
    {
      v48 = pkVirtualValue;
      if ( !pkVirtualValue )
        v48 = Skill::GetAccumulatedEmpowerInfo((Skill::EmpowerInfo *)&pkProduceInfo, kSkillID);
      LOBYTE(uiExpa) = v48->cDamageUp;
      BYTE1(uiExpa) = v48->cSmallSp;
      BYTE3(uiExpa) = v48->cShortCoolTime;
      BYTE2(uiExpa) = v48->cLongKeepTime;
    }
    bLevelSatisfied = (signed int)pkViewInfo->uiDemandLv <= (signed int)User::Lv(&g_kUser);
    v49 = CharClass::GetBitbyClassType((UseClassType)*(_DWORD *)(v8 + 267));
    v50 = v49;
    kClassMask = v49;
    v51 = 1i64 << User::GetMainCharClass(&g_kUser);
    bSetItemAttackPower = 1;
    if ( !__PAIR__(HIDWORD(kClassMask) & HIDWORD(v51), v50 & (unsigned int)v51) )
      bSetItemAttackPower = 0;
    v52 = Inventory::IsDemandType(&g_kInventory, *(WeaponDemandType *)(v8 + 110));
    v53 = v5->m_apkTextWin[0]->vfptr;
    bNeedToViewEmpower = v52;
    ((void (__stdcall *)(int))v53[118].__vecDelDtor)(v8 + 34);
    ((void (__stdcall *)(D3DXCOLOR *))v5->m_apkTextWin[0]->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
    v54 = &v5->m_apkTextWin[1]->vfptr;
    v55 = *v54;
    v56 = TextData::Get(0x244190AAu);
    v55[118].__vecDelDtor((NiRefObject *)v54, (unsigned int)v56);
    v57 = 2;
    if ( strcmp((const char *)((int (*)(void))v5->m_apkTextWin[1]->vfptr[121].__vecDelDtor)(), " ") )
    {
      v57 = 3;
      ((void (__stdcall *)(const char *))v5->m_apkTextWin[2]->vfptr[118].__vecDelDtor)(" ");
    }
    if ( Skill::IsLearnSkill(kSkillID) && bBuy )
    {
      v58 = v5->m_apkTextWin[v57]->vfptr;
      pkProduceInfo = (ProduceInfo *)v5->m_apkTextWin[v57];
      v59 = TextData::Get(0xA3420FF4);
      v58[118].__vecDelDtor((NiRefObject *)pkProduceInfo, (unsigned int)v59);
      ((void (__stdcall *)(D3DXCOLOR *))v5->m_apkTextWin[v57++]->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
    }
    if ( v57 > 0 && strcmp((const char *)(*(int (**)(void))(**((_DWORD **)&v5->m_bLock + v57) + 484))(), " ") )
    {
      v60 = v5->m_apkTextWin[v57++]->vfptr[118].__vecDelDtor;
      ((void (__stdcall *)(const char *))v60)(" ");
    }
    CharClass::GetEquipableClassSortStr(kClassMask, acStr, 0x100u);
    v61 = v5->m_apkTextWin[v57]->vfptr;
    pkProduceInfo = (ProduceInfo *)v5->m_apkTextWin[v57];
    v62 = (char *)TextData::Get(0x9FF5FBEC);
    v63 = fs(v62, acStr);
    v61[118].__vecDelDtor((NiRefObject *)pkProduceInfo, (unsigned int)v63);
    if ( !bSetItemAttackPower )
      ((void (__stdcall *)(D3DXCOLOR *))v5->m_apkTextWin[v57]->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
    v64 = pkViewInfo->uiDemandLv;
    v65 = TextData::Get(0x98F7ED01);
    sprintf(acStr, (const char *)v65, v64);
    ((void (__stdcall *)(char *))v5->m_apkTextWin[v57 + 1]->vfptr[118].__vecDelDtor)(acStr);
    v66 = v5->m_apkTextWin[v57 + 1]->vfptr[117].__vecDelDtor;
    if ( bLevelSatisfied )
      ((void (__stdcall *)(D3DXCOLOR *))v66)(&Color::m_kDxWhiteColor);
    else
      ((void (__stdcall *)(D3DXCOLOR *))v66)(&Color::m_kDxRedColor);
    v67 = pkInfo->DemandType;
    v68 = v57 + 2;
    if ( v67 == 2 )
    {
LABEL_114:
      pkProduceInfo = 0;
      if ( BYTE1(uiExpa) )
        pkProduceInfo = (ProduceInfo *)pkInfo->nT0[SBYTE1(uiExpa) + 4];
      v75 = v5->m_svItemAction._Myfirst;
      v76 = v5->m_svItemAction._Mylast;
      kClassMask_4a = 0;
      bSetItemAttackPower = 0;
      totalNuma = 0;
      if ( !(v76 - v75) )
        goto LABEL_343;
      dwDlyTime = 0;
      do
      {
        v77 = ItemActionEffectTab::GetByEffectID(*(unsigned __int16 *)((char *)&v75->EffectID + dwDlyTime));
        if ( v77 && v77->EffectActivity == 5 && v77->EffectActivityValue == 3 )
        {
          v78 = (signed int)((unsigned __int64)(1717986919i64 * (1000 - v77->Value)) >> 32) >> 2;
          kClassMask_4a += v78 + (v78 >> 31);
          bSetItemAttackPower = 1;
        }
        v75 = v5->m_svItemAction._Myfirst;
        v79 = v5->m_svItemAction._Mylast;
        ++totalNuma;
        dwDlyTime += 12;
      }
      while ( totalNuma < v79 - v75 );
      if ( !bSetItemAttackPower )
      {
LABEL_343:
        if ( !pkProduceInfo )
        {
          if ( pkInfo->SP )
          {
            v96 = v5->m_apkTextWin[v68]->vfptr;
            v97 = pkInfo->SP;
            pkProduceInfo = (ProduceInfo *)v5->m_apkTextWin[v68++];
            v98 = (char *)TextData::Get(0xF6070722);
            v99 = fs(v98, v97);
            v96[118].__vecDelDtor((NiRefObject *)pkProduceInfo, (unsigned int)v99);
          }
LABEL_141:
          v100 = pkInfo->SPRate;
          if ( v100 )
          {
            v101 = v5->m_apkTextWin[v68]->vfptr;
            pkProduceInfo = (ProduceInfo *)v5->m_apkTextWin[v68];
            v102 = v100 / 0xA;
            v103 = (char *)TextData2::Get(0x385D879Au);
            v104 = fs(v103, v102);
            v101[118].__vecDelDtor((NiRefObject *)pkProduceInfo, (unsigned int)v104);
            ++v68;
          }
          v105 = pkInfo->HPRate;
          if ( v105 )
          {
            v106 = v5->m_apkTextWin[v68]->vfptr;
            pkProduceInfo = (ProduceInfo *)v5->m_apkTextWin[v68];
            v107 = v105 / 0xA;
            v108 = (char *)TextData2::Get(0x385D878Fu);
            v109 = fs(v108, v107);
            v106[118].__vecDelDtor((NiRefObject *)pkProduceInfo, (unsigned int)v109);
            ++v68;
          }
          if ( pkInfo->LP )
          {
            v110 = v5->m_apkTextWin[v68]->vfptr;
            v111 = pkInfo->LP;
            pkProduceInfo = (ProduceInfo *)v5->m_apkTextWin[v68++];
            v112 = (char *)TextData3::Get(0x8CA9D6E2);
            v113 = fs(v112, v111);
            v110[118].__vecDelDtor((NiRefObject *)pkProduceInfo, (unsigned int)v113);
          }
          v114 = pkInfo->DemandSoul;
          if ( v114 )
          {
            v115 = v5->m_apkTextWin[v68]->vfptr;
            v116 = (unsigned __int8)v114;
            pkProduceInfo = (ProduceInfo *)v5->m_apkTextWin[v68++];
            v117 = (char *)TextData2::Get(0xF6F0E3F1);
            v118 = fs(v117, v116);
            v115[118].__vecDelDtor((NiRefObject *)pkProduceInfo, (unsigned int)v118);
          }
          if ( v68 > 0 && strcmp((const char *)(*(int (**)(void))(**((_DWORD **)&v5->m_bLock + v68) + 484))(), " ") )
          {
            v119 = v5->m_apkTextWin[v68++]->vfptr[118].__vecDelDtor;
            ((void (__stdcall *)(const char *))v119)(" ");
          }
          v120 = SkillInfoWin::SetMinMaxWCRate(v5, pkInfo, v68);
          v121 = SkillInfoWin::SetMinMaxMARate(v5, pkInfo, v120);
          v18 = pkViewInfo->Function[0] == 45;
          dwDlyTime = v121;
          if ( v18 )
            goto LABEL_286;
          SkillInfoWin::SetTextBeginNewLine(v5, pkViewInfo->Function, (int *)&dwDlyTime, &Color::m_kDxWhiteColor);
          v122 = v5->m_svItemAction._Myfirst;
          *(_DWORD *)&acEmpowerApplyDesc[4] = 673194016;
          acEmpowerApplyDesc[8] = 0;
          v123 = (char *)v5->m_svItemAction._Mylast - (char *)v122;
          *(_DWORD *)acEmpowerApplyDesc = 538976288;
          v124 = 0;
          bNeedToViewEmpower = 0;
          kClassMask_4b = 0;
          bSetItemAttackPower = 0;
          if ( v123 / 12 )
          {
            pkProduceInfo = 0;
            do
            {
              v125 = ItemActionEffectTab::GetByEffectID(*(unsigned __int16 *)((char *)&v122->EffectID
                                                                            + (_DWORD)pkProduceInfo));
              if ( v125 )
              {
                if ( v125->EffectActivity == 5 )
                {
                  v126 = v125->EffectActivityValue;
                  if ( !v126 || v126 == 11 )
                  {
                    kClassMask_4b += (v125->Value - 1000) / 10;
                    bSetItemAttackPower = 1;
                  }
                }
              }
              v122 = v5->m_svItemAction._Myfirst;
              v127 = v5->m_svItemAction._Mylast;
              pkProduceInfo = (ProduceInfo *)((char *)pkProduceInfo + 12);
              v128 = (signed int)((unsigned __int64)(715827883i64 * ((char *)v127 - (char *)v122)) >> 32) >> 1;
              ++v124;
            }
            while ( v124 < v128 + (v128 >> 31) );
          }
          *(_DWORD *)&strAttackInfoExplanation._Alval.0 = 15;
          strAttackInfoExplanation._Myres = 0;
          strAttackInfoExplanation._Bx._Buf[4] = 0;
          v18 = pkInfo->EffectType == 5;
          v326 = 0;
          if ( v18 )
          {
            v129 = TextData2::Get(0x275B438Du);
            v130 = v129;
            v131 = (int)&v129->vfptr + 1;
            do
            {
              v132 = (char)v130->vfptr;
              v130 = (NiUnsharedGeometryGroup *)((char *)v130 + 1);
            }
            while ( v132 );
          }
          else
          {
            v129 = TextData::Get(0x49328BA3u);
            v130 = v129;
            v131 = (int)&v129->vfptr + 1;
            do
            {
              v133 = (char)v130->vfptr;
              v130 = (NiUnsharedGeometryGroup *)((char *)v130 + 1);
            }
            while ( v133 );
          }
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
            (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)&strAttackInfoExplanation
                                                                                   + 4),
            (const char *)v129,
            (unsigned int)v130 - v131);
          if ( bSetItemAttackPower )
          {
            if ( kClassMask_4b <= 0 )
              v134 = fs("%d%%", kClassMask_4b);
            else
              v134 = fs("+%d%%", kClassMask_4b);
            v135 = v134;
            acRate[0] = 0;
            if ( (_BYTE)uiExpa )
            {
              memset(&acRate[1], 0, 0xFFu);
              v18 = SkillInfoWin::IsPassiveEffect(kSkillID, acRate) == 0;
              v136 = *(char **)&strAttackInfoExplanation._Bx._Alias[4];
              if ( v18 )
              {
                if ( *(_DWORD *)&strAttackInfoExplanation._Alval.0 < 0x10u )
                  v136 = &strAttackInfoExplanation._Bx._Buf[4];
                v137 = fs("%s +%d %s", v136, pkInfo->nIMPT[(char)uiExpa + 3], v135);
              }
              else
              {
                if ( *(_DWORD *)&strAttackInfoExplanation._Alval.0 < 0x10u )
                  v136 = &strAttackInfoExplanation._Bx._Buf[4];
                v137 = fs("%s +%d %s +%s", v136, pkInfo->nIMPT[(char)uiExpa + 3], v135, acRate);
              }
            }
            else
            {
              memset(&acRate[1], 0, 0xFFu);
              v18 = SkillInfoWin::IsPassiveEffect(kSkillID, acRate) == 0;
              v138 = *(char **)&strAttackInfoExplanation._Bx._Alias[4];
              if ( v18 )
              {
                if ( *(_DWORD *)&strAttackInfoExplanation._Alval.0 < 0x10u )
                  v138 = &strAttackInfoExplanation._Bx._Buf[4];
                v137 = fs("%s %s", v138, v135);
              }
              else
              {
                if ( *(_DWORD *)&strAttackInfoExplanation._Alval.0 < 0x10u )
                  v138 = &strAttackInfoExplanation._Bx._Buf[4];
                v137 = fs("%s %s +%s", v138, v135, acRate);
              }
            }
            v139 = v137;
            do
              v140 = *v137++;
            while ( v140 );
            v141 = v137 - v139;
            v142 = &acRate[255];
            do
              v143 = (v142++)[1];
            while ( v143 );
          }
          else
          {
            acRate[0] = 0;
            if ( (_BYTE)uiExpa )
            {
              memset(&acRate[1], 0, 0xFFu);
              v18 = SkillInfoWin::IsPassiveEffect(kSkillID, acRate) == 0;
              v144 = *(char **)&strAttackInfoExplanation._Bx._Alias[4];
              if ( v18 )
              {
                if ( *(_DWORD *)&strAttackInfoExplanation._Alval.0 < 0x10u )
                  v144 = &strAttackInfoExplanation._Bx._Buf[4];
                v150 = fs("%s +%d", v144, pkInfo->nIMPT[(char)uiExpa + 3]);
                v151 = v150;
                do
                  v152 = *v150++;
                while ( v152 );
                v141 = v150 - v151;
                v148 = v151;
                v142 = &acRate[255];
                do
                  v153 = (v142++)[1];
                while ( v153 );
              }
              else
              {
                if ( *(_DWORD *)&strAttackInfoExplanation._Alval.0 < 0x10u )
                  v144 = &strAttackInfoExplanation._Bx._Buf[4];
                v145 = fs("%s +%d +%s", v144, pkInfo->nIMPT[(char)uiExpa + 3], acRate);
                v146 = v145;
                do
                  v147 = *v145++;
                while ( v147 );
                v141 = v145 - v146;
                v148 = v146;
                v142 = &acRate[255];
                do
                  v149 = (v142++)[1];
                while ( v149 );
              }
              goto LABEL_215;
            }
            memset(&acRate[1], 0, 0xFFu);
            if ( SkillInfoWin::FindPassiveEffect(kSkillID, acRate) != 1 )
            {
LABEL_216:
              v158 = v5->m_svItemAction._Myfirst;
              kClassMask_4c = 0.0;
              v159 = (char *)v5->m_svItemAction._Mylast - (char *)v158;
              v160 = 0;
              bSetItemAttackPower = 0;
              if ( !(v159 / 12) )
                goto LABEL_344;
              pkProduceInfo = 0;
              do
              {
                totalNumb = *(unsigned __int16 *)((char *)&v158->EffectID + (_DWORD)pkProduceInfo);
                v161 = 0;
                if ( ITableBase<ItemActionEffect,ItemActionEffectTab>::GetTotal() )
                {
                  while ( 1 )
                  {
                    v162 = CDataReader::GetRecord(
                             (CDataReader *)(ITableBase<ItemActionEffect,ItemActionEffectTab>::ms_pkTable + 4),
                             v161);
                    if ( v162 )
                    {
                      if ( *(_WORD *)v162 == totalNumb )
                        break;
                    }
                    if ( ++v161 >= ITableBase<ItemActionEffect,ItemActionEffectTab>::GetTotal() )
                      goto LABEL_227;
                  }
                  v163 = CDataReader::GetRecord(
                           (CDataReader *)(ITableBase<ItemActionEffect,ItemActionEffectTab>::ms_pkTable + 4),
                           v161);
                  if ( v163 && *(_DWORD *)(v163 + 10) == 5 && *(_DWORD *)(v163 + 14) == 2 )
                  {
                    v164 = (signed int)((unsigned __int64)(1717986919i64 * (*((_WORD *)v163 + 9) - 1000)) >> 32) >> 2;
                    bSetItemAttackPower = 1;
                    kClassMask_4c = (double)(signed int)(v164 + (v164 >> 31)) + kClassMask_4c;
                  }
                }
LABEL_227:
                v158 = v5->m_svItemAction._Myfirst;
                v165 = v5->m_svItemAction._Mylast;
                pkProduceInfo = (ProduceInfo *)((char *)pkProduceInfo + 12);
                ++v160;
              }
              while ( v160 < v165 - v158 );
              if ( bSetItemAttackPower )
              {
                if ( bNeedToViewEmpower )
                {
                  v166 = &acRate[255];
                  do
                    v167 = (v166++)[1];
                  while ( v167 );
                  *(_WORD *)v166 = 11296;
                  v166[2] = 0;
                }
                v298 = kClassMask_4c;
                if ( kClassMask_4c <= 0.0 )
                  v168 = fs(" %.1f%%", v298);
                else
                  v168 = fs(" +%.1f%%", v298);
                v169 = v168;
                acRate[0] = 0;
                if ( BYTE2(uiExpa) )
                {
                  memset(&acRate[1], 0, 0xFFu);
                  if ( SkillInfoWin::IsPassiveEffect(kSkillID, acRate) )
                  {
                    v170 = TextData::Get(0x535F8C99u);
                    v171 = (double)pkInfo->nT1[SBYTE2(uiExpa) + 4] / 1000.0;
                    v172 = TextData::Get(0xEC4E4539);
                    v173 = fs("%s +%.1f%s %s +%s", v172, v171, v170, v169, acRate);
                  }
                  else
                  {
                    v174 = TextData::Get(0x535F8C99u);
                    v175 = (double)pkInfo->nT1[SBYTE2(uiExpa) + 4] / 1000.0;
                    v176 = TextData::Get(0xEC4E4539);
                    v173 = fs("%s +%.1f%s %s", v176, v175, v174, v169);
                  }
                  v177 = v173;
                  do
                    v178 = *v173++;
                  while ( v178 );
                  v179 = v173 - v177;
                  v180 = &acRate[255];
                  do
                    v181 = (v180++)[1];
                  while ( v181 );
                }
                else
                {
                  memset(&acRate[1], 0, 0xFFu);
                  if ( SkillInfoWin::IsPassiveEffect(kSkillID, acRate) )
                  {
                    v182 = TextData::Get(0xEC4E4539);
                    v183 = fs("%s %s +%s", v182, v169, acRate);
                    v177 = v183;
                    do
                      v184 = *v183++;
                    while ( v184 );
                    v179 = v183 - v177;
                    v180 = &acRate[255];
                    do
                      v185 = (v180++)[1];
                    while ( v185 );
                  }
                  else
                  {
                    v186 = TextData::Get(0xEC4E4539);
                    v187 = fs("%s %s", v186, v169);
                    v177 = v187;
                    do
                      v188 = *v187++;
                    while ( v188 );
                    v179 = v187 - v177;
                    v180 = &acRate[255];
                    do
                      v189 = (v180++)[1];
                    while ( v189 );
                  }
                }
              }
              else
              {
LABEL_344:
                if ( BYTE2(uiExpa) )
                {
                  if ( bNeedToViewEmpower )
                  {
                    v190 = &acRate[255];
                    do
                      v191 = (v190++)[1];
                    while ( v191 );
                    *(_WORD *)v190 = 11296;
                    v190[2] = 0;
                  }
                  acRate[0] = 0;
                  memset(&acRate[1], 0, 0xFFu);
                  if ( SkillInfoWin::IsPassiveEffect(kSkillID, acRate) )
                  {
                    v192 = TextData::Get(0x535F8C99u);
                    v193 = (double)pkInfo->nT1[SBYTE2(uiExpa) + 4] / 1000.0;
                    v194 = TextData::Get(0xEC4E4539);
                    v195 = fs("%s +%.1f%s +%s", v194, v193, v192, acRate);
                    v196 = v195;
                    do
                      v197 = *v195++;
                    while ( v197 );
                    v198 = v195 - v196;
                    v199 = v196;
                    v200 = &acRate[255];
                    do
                      v201 = (v200++)[1];
                    while ( v201 );
                    qmemcpy(v200, v199, v198);
                  }
                  else
                  {
                    v202 = TextData::Get(0x535F8C99u);
                    v203 = (double)pkInfo->nT1[SBYTE2(uiExpa) + 4] / 1000.0;
                    v204 = TextData::Get(0xEC4E4539);
                    v205 = fs("%s +%.1f%s", v204, v203, v202);
                    v206 = v205;
                    do
                      v207 = *v205++;
                    while ( v207 );
                    v208 = v205 - v206;
                    v209 = v206;
                    v210 = &acRate[255];
                    do
                      v211 = (v210++)[1];
                    while ( v211 );
                    qmemcpy(v210, v209, v208);
                  }
                  goto LABEL_279;
                }
                acRate[0] = 0;
                memset(&acRate[1], 0, 0xFFu);
                if ( SkillInfoWin::FindPassiveEffect(kSkillID, acRate) != 2 )
                {
                  if ( !bNeedToViewEmpower )
                  {
                    v121 = dwDlyTime;
LABEL_283:
                    v326 = -1;
                    if ( *(_DWORD *)&strAttackInfoExplanation._Alval.0 >= 0x10u )
                      operator delete(*(void **)&strAttackInfoExplanation._Bx._Alias[4]);
                    v5 = i;
                    *(_DWORD *)&strAttackInfoExplanation._Alval.0 = 15;
                    strAttackInfoExplanation._Myres = 0;
                    strAttackInfoExplanation._Bx._Buf[4] = 0;
LABEL_286:
                    if ( v121 > 0
                      && strcmp(
                           (const char *)(*(int (**)(void))(**((_DWORD **)&v5->m_bLock + v121) + 484))(),
                           (const char *)&unk_9A1910) )
                    {
                      v219 = v5->m_apkTextWin[v121++]->vfptr[118].__vecDelDtor;
                      ((void (__stdcall *)(void *))v219)(&unk_9A1914);
                    }
                    v220 = pkInfo->CastTime;
                    if ( v220 )
                    {
                      *(float *)&pkProduceInfo = (double)v220 / 1000.0;
                      v225 = *(float *)&pkProduceInfo;
                      v226 = TextData::Get(0x2B3FA092u);
                      sprintf(acStr, (const char *)v226, v225);
                      v223 = (ProduceInfo *)v5->m_apkTextWin[v121];
                      v224 = *(void *(__thiscall **)(NiRefObject *, unsigned int))(*(_DWORD *)&v223->ProductID + 472);
                      v222 = acStr;
                    }
                    else
                    {
                      v221 = v5->m_apkTextWin[v121]->vfptr;
                      pkProduceInfo = (ProduceInfo *)v5->m_apkTextWin[v121];
                      v222 = TextData::Get(0x7674F4E5u);
                      v223 = pkProduceInfo;
                      v224 = v221[118].__vecDelDtor;
                    }
                    v224((NiRefObject *)v223, (unsigned int)v222);
                    v227 = pkInfo->Range;
                    v228 = v121 + 1;
                    if ( v227 )
                    {
                      pkProduceInfo = (ProduceInfo *)pkInfo->Range;
                      v230 = (double)v227 / 50.0 * 1.5;
                      v231 = TextData::Get(0x2382A293u);
                      sprintf(acStr, "%s%.1fm", v231, v230);
                    }
                    else
                    {
                      v229 = TextData::Get(0x2382A293u);
                      sprintf(acStr, "%s%.1fm", v229, 1.5);
                    }
                    ((void (__stdcall *)(char *))v5->m_apkTextWin[v228]->vfptr[118].__vecDelDtor)(acStr);
                    dwDlyTime = 0;
                    if ( BYTE3(uiExpa) )
                      dwDlyTime = pkInfo->nT2[SBYTE3(uiExpa) + 4];
                    v232 = v5->m_svItemAction._Myfirst;
                    v233 = v5->m_svItemAction._Mylast;
                    totalNumc = 0;
                    bSetItemAttackPower = 0;
                    kClassMask_4d = 0;
                    if ( !(v233 - v232) )
                      goto LABEL_345;
                    pkProduceInfo = 0;
                    do
                    {
                      uiExpb = *(unsigned __int16 *)((char *)&v232->EffectID + (_DWORD)pkProduceInfo);
                      v234 = 0;
                      if ( ITableBase<ItemActionEffect,ItemActionEffectTab>::GetTotal() )
                      {
                        while ( 1 )
                        {
                          v235 = CDataReader::GetRecord(
                                   (CDataReader *)(ITableBase<ItemActionEffect,ItemActionEffectTab>::ms_pkTable + 4),
                                   v234);
                          if ( v235 )
                          {
                            if ( *(_WORD *)v235 == uiExpb )
                              break;
                          }
                          if ( ++v234 >= ITableBase<ItemActionEffect,ItemActionEffectTab>::GetTotal() )
                            goto LABEL_308;
                        }
                        v236 = CDataReader::GetRecord(
                                 (CDataReader *)(ITableBase<ItemActionEffect,ItemActionEffectTab>::ms_pkTable + 4),
                                 v234);
                        if ( v236 && *(_DWORD *)(v236 + 10) == 5 && *(_DWORD *)(v236 + 14) == 1 )
                        {
                          v237 = (signed int)((unsigned __int64)(1717986919i64 * (*((_WORD *)v236 + 9) - 1000)) >> 32) >> 2;
                          totalNumc += v237 + (v237 >> 31);
                          bSetItemAttackPower = 1;
                        }
                      }
LABEL_308:
                      v232 = v5->m_svItemAction._Myfirst;
                      v238 = v5->m_svItemAction._Mylast;
                      ++kClassMask_4d;
                      pkProduceInfo = (ProduceInfo *)((char *)pkProduceInfo + 12);
                    }
                    while ( kClassMask_4d < v238 - v232 );
                    if ( bSetItemAttackPower )
                    {
                      if ( totalNumc <= 0 )
                        v239 = fs(" %d%%", totalNumc);
                      else
                        v239 = fs(" +%d%%", totalNumc);
                      v240 = v239;
                      if ( dwDlyTime )
                      {
                        v241 = GetTimeStr(dwDlyTime);
                        v242 = fs("%s", v241);
                        v243 = GetTimeStr(pkInfo->DlyTime);
                        v244 = (char *)TextData::Get(0x909880BC);
                        v245 = fs(v244, v243, v242);
                      }
                      else
                      {
                        v246 = GetTimeStr(pkInfo->DlyTime);
                        v247 = (char *)TextData::Get(0x909880BD);
                        v245 = fs(v247, v246);
                      }
                      v248 = strlen(v240) + 1;
                      v249 = v245 - 1;
                      do
                        v250 = (v249++)[1];
                      while ( v250 );
                      qmemcpy(v249, v240, v248);
                      v5 = i;
                      ((void (__stdcall *)(char *))i->m_apkTextWin[v228 + 1]->vfptr[118].__vecDelDtor)(v245);
                    }
                    else
                    {
LABEL_345:
                      v251 = &v5->m_apkTextWin[v228 + 1]->vfptr;
                      v252 = *v251;
                      if ( !dwDlyTime )
                      {
                        v258 = pkInfo->DlyTime;
                        pkProduceInfo = (ProduceInfo *)v5->m_apkTextWin[v228 + 1];
                        v259 = GetTimeStr(v258);
                        v260 = (char *)TextData::Get(0x909880BD);
                        v261 = fs(v260, v259);
                        v252[118].__vecDelDtor((NiRefObject *)pkProduceInfo, (unsigned int)v261);
                        goto LABEL_323;
                      }
                      pkProduceInfo = (ProduceInfo *)v5->m_apkTextWin[v228 + 1];
                      v253 = GetTimeStr(dwDlyTime);
                      v254 = fs("%s", v253);
                      v255 = GetTimeStr(pkInfo->DlyTime);
                      v256 = (char *)TextData::Get(0x909880BC);
                      v257 = fs(v256, v255, v254);
                      ((void (__stdcall *)(char *))v252[118].__vecDelDtor)(v257);
                    }
                    v5->m_apkTextWin[v228 + 1]->vfptr[117].__vecDelDtor(
                      (NiRefObject *)v5->m_apkTextWin[v228 + 1],
                      (unsigned int)&Color::m_kDxYellowColor);
LABEL_323:
                    v262 = pkInfo->First;
                    v263 = v228 + 2;
                    dwDlyTime = v263;
                    switch ( v262 )
                    {
                      case 0:
                        v264 = (ProduceInfo *)v5->m_apkTextWin[v263];
                        v265 = *(_DWORD *)&v264->ProductID;
                        ++v263;
                        pkProduceInfo = v264;
                        dwDlyTime = v263;
                        v266 = TextData::Get(0xE744472E);
                        v267 = TextData::Get(0xF1402B45);
                        v268 = fs("%s: %s", v267, v266);
                        (*(void (__thiscall **)(ProduceInfo *, char *))(v265 + 472))(pkProduceInfo, v268);
                        break;
                      case 1:
                        v269 = (ProduceInfo *)v5->m_apkTextWin[v263];
                        v270 = *(_DWORD *)&v269->ProductID;
                        ++v263;
                        pkProduceInfo = v269;
                        dwDlyTime = v263;
                        v271 = TextData::Get(0xDEF3FAE9);
                        v272 = TextData::Get(0xF1402B45);
                        v273 = fs("%s: %s", v272, v271);
                        v274 = pkProduceInfo;
                        goto LABEL_333;
                      case 2:
                        v275 = (ProduceInfo *)v5->m_apkTextWin[v263];
                        v276 = *(_DWORD *)&v275->ProductID;
                        ++v263;
                        pkProduceInfo = v275;
                        dwDlyTime = v263;
                        v277 = TextData::Get(0xDA4F4E3B);
                        v278 = TextData::Get(0xF1402B45);
                        v279 = fs("%s: %s", v278, v277);
                        (*(void (__thiscall **)(ProduceInfo *, char *))(v276 + 472))(pkProduceInfo, v279);
                        break;
                      case 3:
                        v18 = strcmp(pkInfo->InxName, "Revival01") == 0;
                        v280 = (ProduceInfo *)v5->m_apkTextWin[v263];
                        v270 = *(_DWORD *)&v280->ProductID;
                        if ( v18 )
                        {
                          ++v263;
                          pkProduceInfo = v280;
                          dwDlyTime = v263;
                          v281 = TextData::Get(0xD1C0E7DA);
                          v282 = TextData::Get(0xF1402B45);
                          v273 = fs("%s: %s", v282, v281);
                          v274 = pkProduceInfo;
LABEL_333:
                          (*(void (__thiscall **)(ProduceInfo *, char *))(v270 + 472))(v274, v273);
                        }
                        else
                        {
                          ++v263;
                          pkProduceInfo = v280;
                          dwDlyTime = v263;
                          v283 = TextData::Get(0x2F3A3F32u);
                          v284 = TextData::Get(0xF1402B45);
                          v285 = fs("%s: %s", v284, v283);
                          (*(void (__thiscall **)(ProduceInfo *, char *))(v270 + 472))(pkProduceInfo, v285);
                        }
                        break;
                      case 4:
                        v286 = (ProduceInfo *)v5->m_apkTextWin[v263];
                        v270 = *(_DWORD *)&v286->ProductID;
                        ++v263;
                        pkProduceInfo = v286;
                        dwDlyTime = v263;
                        v287 = TextData::Get(0xE9F94E38);
                        v288 = TextData::Get(0xF1402B45);
                        v273 = fs("%s: %s", v288, v287);
                        v274 = pkProduceInfo;
                        goto LABEL_333;
                      case 5:
                        v289 = (ProduceInfo *)v5->m_apkTextWin[v263];
                        v290 = *(_DWORD *)&v289->ProductID;
                        ++v263;
                        pkProduceInfo = v289;
                        dwDlyTime = v263;
                        v291 = TextData::Get(0xE5E7FA35);
                        v292 = TextData::Get(0xF1402B45);
                        v293 = fs("%s: %s", v292, v291);
                        (*(void (__thiscall **)(ProduceInfo *, char *))(v290 + 472))(pkProduceInfo, v293);
                        break;
                      case 7:
                        v294 = (ProduceInfo *)v5->m_apkTextWin[v263];
                        v270 = *(_DWORD *)&v294->ProductID;
                        ++v263;
                        pkProduceInfo = v294;
                        dwDlyTime = v263;
                        v295 = TextData::Get(0x3C968C7Fu);
                        v296 = TextData::Get(0xF1402B45);
                        v273 = fs("%s: %s", v296, v295);
                        v274 = pkProduceInfo;
                        goto LABEL_333;
                      default:
                        break;
                    }
                    if ( v263 > 0
                      && strcmp((const char *)(*(int (**)(void))(**((_DWORD **)&v5->m_bLock + v263) + 484))(), " ") )
                    {
                      v297 = v5->m_apkTextWin[v263]->vfptr[118].__vecDelDtor;
                      dwDlyTime = v263 + 1;
                      ((void (__stdcall *)(const char *))v297)(" ");
                    }
                    if ( pkViewInfo->Descript[0] != 45 )
                      SkillInfoWin::SetTextBeginNewLine(
                        v5,
                        pkViewInfo->Descript,
                        (int *)&dwDlyTime,
                        &Color::m_kDxWhiteColor);
                    SkillInfoWin::SetSetItemDesc(v5, (int *)&dwDlyTime);
                    return SkillInfoWin::SetPassiveEffect(v5, kSkillID, dwDlyTime);
                  }
LABEL_279:
                  v216 = &acRate[255];
                  do
                    v217 = (v216++)[1];
                  while ( v217 );
                  v218 = dwDlyTime;
                  *(_WORD *)v216 = 41;
                  ((void (__stdcall *)(char *))i->m_apkTextWin[v218]->vfptr[118].__vecDelDtor)(acEmpowerApplyDesc);
                  ((void (__stdcall *)(D3DXCOLOR *))i->m_apkTextWin[v218]->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
                  v121 = v218 + 1;
                  goto LABEL_283;
                }
                v212 = TextData::Get(0xEC4E4539);
                v213 = fs("%s +%s", v212, acRate);
                v177 = v213;
                do
                  v214 = *v213++;
                while ( v214 );
                v179 = v213 - v177;
                v180 = &acRate[255];
                do
                  v215 = (v180++)[1];
                while ( v215 );
              }
              qmemcpy(v180, v177, v179);
              goto LABEL_279;
            }
            v154 = *(char **)&strAttackInfoExplanation._Bx._Alias[4];
            if ( *(_DWORD *)&strAttackInfoExplanation._Alval.0 < 0x10u )
              v154 = &strAttackInfoExplanation._Bx._Buf[4];
            v155 = fs("%s +%s", v154, acRate);
            v139 = v155;
            do
              v156 = *v155++;
            while ( v156 );
            v141 = v155 - v139;
            v142 = &acRate[255];
            do
              v157 = (v142++)[1];
            while ( v157 );
          }
          v148 = v139;
LABEL_215:
          qmemcpy(v142, v148, v141);
          v5 = i;
          bNeedToViewEmpower = 1;
          goto LABEL_216;
        }
        v91 = pkInfo->SP;
        if ( v91 )
        {
          v92 = v5->m_apkTextWin[v68]->vfptr;
          v93 = __PAIR__((unsigned int)pkProduceInfo, v91);
          pkProduceInfo = (ProduceInfo *)v5->m_apkTextWin[v68];
          v94 = (char *)TextData::Get(0xF6070721);
          v95 = fs(v94, v93);
          v92[118].__vecDelDtor((NiRefObject *)pkProduceInfo, (unsigned int)v95);
        }
LABEL_138:
        ((void (__stdcall *)(D3DXCOLOR *))v5->m_apkTextWin[v68++]->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
        goto LABEL_141;
      }
      v80 = fs("  -%d%%", kClassMask_4a);
      if ( pkProduceInfo )
      {
        if ( !pkInfo->SP )
          goto LABEL_133;
        v81 = pkProduceInfo;
        v82 = pkInfo->SP;
        v83 = (char *)TextData::Get(0xF6070721);
        v84 = fs(v83, v82, v81);
      }
      else
      {
        if ( !pkInfo->SP )
          goto LABEL_133;
        v85 = pkInfo->SP;
        v86 = (char *)TextData::Get(0xF6070722);
        v84 = fs(v86, v85);
      }
      if ( v84 )
      {
        v87 = v80;
        v88 = strlen(v80) + 1;
        v89 = v84 - 1;
        do
          v90 = (v89++)[1];
        while ( v90 );
        qmemcpy(v89, v87, v88);
        v5 = i;
        goto LABEL_134;
      }
LABEL_133:
      v84 = (char *)v80;
LABEL_134:
      v5->m_apkTextWin[v68]->vfptr[118].__vecDelDtor((NiRefObject *)v5->m_apkTextWin[v68], (unsigned int)v84);
      goto LABEL_138;
    }
    if ( v67 == DT_ONEHAND )
    {
      v69 = v5->m_apkTextWin[v68]->vfptr;
      pkProduceInfo = (ProduceInfo *)v5->m_apkTextWin[v68];
      v70 = TextData::Get(0x88A58CD1);
      v71 = pkProduceInfo;
      goto LABEL_111;
    }
    if ( v67 == 1 )
    {
      v72 = v5->m_apkTextWin[v68]->vfptr;
      pkProduceInfo = (ProduceInfo *)v5->m_apkTextWin[v68];
      v73 = TextData::Get(0x91AA8CDB);
      v74 = pkProduceInfo;
      goto LABEL_87;
    }
    if ( v67 == 3 )
    {
      v69 = v5->m_apkTextWin[v68]->vfptr;
      pkProduceInfo = (ProduceInfo *)v5->m_apkTextWin[v68];
      v70 = TextData::Get(0xE605F8EC);
      v71 = pkProduceInfo;
      goto LABEL_111;
    }
    if ( v67 == 4 )
    {
      v72 = v5->m_apkTextWin[v68]->vfptr;
      pkProduceInfo = (ProduceInfo *)v5->m_apkTextWin[v68];
      v73 = TextData::Get(0xE6ECF5F8);
      v74 = pkProduceInfo;
      goto LABEL_87;
    }
    if ( v67 == 5 )
    {
      v69 = v5->m_apkTextWin[v68]->vfptr;
      pkProduceInfo = (ProduceInfo *)v5->m_apkTextWin[v68];
      v70 = TextData::Get(0x94ACEDEE);
      v71 = pkProduceInfo;
      goto LABEL_111;
    }
    if ( v67 == 7 )
    {
      v72 = v5->m_apkTextWin[v68]->vfptr;
      pkProduceInfo = (ProduceInfo *)v5->m_apkTextWin[v68];
      v73 = TextData::Get(0xDFFEEDF4);
      v74 = pkProduceInfo;
      goto LABEL_87;
    }
    if ( v67 == 8 )
    {
      v69 = v5->m_apkTextWin[v68]->vfptr;
      pkProduceInfo = (ProduceInfo *)v5->m_apkTextWin[v68];
      v70 = TextData::Get(0xA2A1A802);
      v71 = pkProduceInfo;
      goto LABEL_111;
    }
    if ( v67 == 9 )
    {
      v72 = v5->m_apkTextWin[v68]->vfptr;
      pkProduceInfo = (ProduceInfo *)v5->m_apkTextWin[v68];
      v73 = TextData::Get(0xE7F55249);
      v74 = pkProduceInfo;
      goto LABEL_87;
    }
    if ( v67 == 10 )
    {
      v69 = v5->m_apkTextWin[v68]->vfptr;
      pkProduceInfo = (ProduceInfo *)v5->m_apkTextWin[v68];
      v70 = TextData::Get(0xA7F8EEEC);
      v71 = pkProduceInfo;
      goto LABEL_111;
    }
    if ( v67 == 11 )
    {
      v72 = v5->m_apkTextWin[v68]->vfptr;
      pkProduceInfo = (ProduceInfo *)v5->m_apkTextWin[v68];
      v73 = TextData::Get(0x94B6ECF9);
      v74 = pkProduceInfo;
    }
    else
    {
      if ( v67 == 12 )
      {
        v69 = v5->m_apkTextWin[v68]->vfptr;
        pkProduceInfo = (ProduceInfo *)v5->m_apkTextWin[v68];
        v70 = TextData2::Get(0x9FA2FFEC);
        v71 = pkProduceInfo;
LABEL_111:
        v69[118].__vecDelDtor((NiRefObject *)v71, (unsigned int)v70);
        if ( !bNeedToViewEmpower )
          ((void (__stdcall *)(D3DXCOLOR *))v5->m_apkTextWin[v68]->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
LABEL_113:
        ++v68;
        goto LABEL_114;
      }
      if ( v67 != 13 )
      {
        if ( v67 != 14 )
          goto LABEL_114;
        v69 = v5->m_apkTextWin[v68]->vfptr;
        pkProduceInfo = (ProduceInfo *)v5->m_apkTextWin[v68];
        v70 = TextData3::Get(0x7E9FC4E0u);
        v71 = pkProduceInfo;
        goto LABEL_111;
      }
      v72 = v5->m_apkTextWin[v68]->vfptr;
      pkProduceInfo = (ProduceInfo *)v5->m_apkTextWin[v68];
      v73 = TextData2::Get(0xEAF5F702);
      v74 = pkProduceInfo;
    }
LABEL_87:
    v72[118].__vecDelDtor((NiRefObject *)v74, (unsigned int)v73);
    if ( !bNeedToViewEmpower )
      ((void (__stdcall *)(D3DXCOLOR *))v5->m_apkTextWin[v68]->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
    goto LABEL_113;
  }
  ((void (__stdcall *)(int))v5->m_apkTextWin[0]->vfptr[118].__vecDelDtor)(v8 + 34);
  if ( !Skill::IsRideSkill(kSkillID) )
  {
    if ( (unsigned __int8)Skill::IsGatherSkill(kSkillID) )
    {
      v15 = v5->m_apkTextWin[1]->vfptr;
      v13 = 2;
      pkProduceInfo = (ProduceInfo *)v5->m_apkTextWin[1];
      dwDlyTime = 2;
      v16 = TextData::Get(0x2F368FAAu);
      v17 = pkProduceInfo;
    }
    else
    {
      v18 = Skill::IsBuildMiniRoomSkill(kSkillID) == 0;
      v19 = (ProduceInfo *)v5->m_apkTextWin[1];
      v15 = *(NiRefObjectVtbl **)&v19->ProductID;
      v13 = 2;
      dwDlyTime = 2;
      if ( !v18 )
      {
        pkProduceInfo = v19;
        v20 = TextData::Get(0x8AA98793);
        v15[118].__vecDelDtor((NiRefObject *)pkProduceInfo, (unsigned int)v20);
        goto LABEL_29;
      }
      pkProduceInfo = v19;
      v16 = TextData::Get(0x33A39797u);
      v17 = pkProduceInfo;
    }
    v15[118].__vecDelDtor((NiRefObject *)v17, (unsigned int)v16);
    goto LABEL_29;
  }
  v12 = v5->m_apkTextWin[1]->vfptr;
  v13 = 2;
  pkProduceInfo = (ProduceInfo *)v5->m_apkTextWin[1];
  dwDlyTime = 2;
  v14 = TextData::Get(0x3B5C363Au);
  v12[118].__vecDelDtor((NiRefObject *)pkProduceInfo, (unsigned int)v14);
LABEL_29:
  if ( strcmp((const char *)((int (*)(void))v5->m_apkTextWin[1]->vfptr[121].__vecDelDtor)(), " ") )
  {
    v21 = v5->m_apkTextWin[2]->vfptr[118].__vecDelDtor;
    v13 = 3;
    dwDlyTime = 3;
    ((void (__stdcall *)(const char *))v21)(" ");
  }
  if ( Skill::IsLearnProdSkill(kSkillID) && bBuy )
  {
    v22 = v5->m_apkTextWin[v13]->vfptr;
    pkProduceInfo = (ProduceInfo *)v5->m_apkTextWin[v13];
    v23 = TextData::Get(0xA3420FF4);
    v22[118].__vecDelDtor((NiRefObject *)pkProduceInfo, (unsigned int)v23);
    ((void (__stdcall *)(D3DXCOLOR *))v5->m_apkTextWin[v13++]->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
    dwDlyTime = v13;
  }
  if ( v13 > 0 && strcmp((const char *)(*(int (**)(void))(**((_DWORD **)&v5->m_bLock + v13) + 484))(), " ") )
  {
    v24 = v5->m_apkTextWin[v13++]->vfptr[118].__vecDelDtor;
    dwDlyTime = v13;
    ((void (__stdcall *)(const char *))v24)(" ");
  }
  v25 = pkViewInfo->uiDemandLv;
  bSetItemAttackPower = v25 <= (signed int)User::Lv(&g_kUser);
  if ( v25 )
  {
    v26 = TextData::Get(0x98F7ED01);
    sprintf(acStr, (const char *)v26, v25);
    ((void (__stdcall *)(char *))v5->m_apkTextWin[v13]->vfptr[118].__vecDelDtor)(acStr);
    v27 = v5->m_apkTextWin[v13]->vfptr[117].__vecDelDtor;
    if ( bSetItemAttackPower )
      ((void (__stdcall *)(D3DXCOLOR *))v27)(&Color::m_kDxWhiteColor);
    else
      ((void (__stdcall *)(D3DXCOLOR *))v27)(&Color::m_kDxRedColor);
    dwDlyTime = ++v13;
    if ( v13 > 0 )
    {
      if ( strcmp((const char *)(*(int (**)(void))(**((_DWORD **)&v5->m_bLock + v13) + 484))(), " ") )
      {
        v28 = v5->m_apkTextWin[v13++]->vfptr[118].__vecDelDtor;
        dwDlyTime = v13;
        ((void (__stdcall *)(const char *))v28)(" ");
      }
    }
  }
  v29 = pkInfo->CastTime;
  if ( v29 )
  {
    *(float *)&pkProduceInfo = (double)v29 / 1000.0;
    v30 = TextData::Get(0x2B3FA092u);
    sprintf(acStr, (const char *)v30, pkProduceInfo);
    ((void (__stdcall *)(char *))v5->m_apkTextWin[v13++]->vfptr[118].__vecDelDtor)(acStr);
    dwDlyTime = v13;
  }
  uiExp = 0;
  v31 = ProduceInfoTable::GetByID(kSkillID);
  v32 = v31;
  pkProduceInfo = v31;
  if ( v31 )
  {
    v33 = v31->ProduceIndex[0];
    *(_QWORD *)&strAttackInfoExplanation._Bx._Buf[0] = 0i64;
    *(_QWORD *)&strAttackInfoExplanation._Bx._Alias[8] = 0i64;
    strAttackInfoExplanation._Mysize = 0;
    strAttackInfoExplanation._Myres = 0;
    *(_DWORD *)&strAttackInfoExplanation._Alval.0 = 0;
    v325 = 0;
    *(_DWORD *)&strAttackInfoExplanation._Bx._Buf[1] = v31->ProduceIndex[1];
    v34 = v31->ProduceIndex[3];
    strAttackInfoExplanation._Bx._Buf[0] = v33;
    v35 = v32->ProduceIndex[2];
    strAttackInfoExplanation._Bx._Buf[3] = v34;
    v36 = v32->ProduceIndex[5];
    strAttackInfoExplanation._Bx._Buf[2] = v35;
    v37 = v32->ProduceIndex[4];
    v38 = v32->ProduceIndex[6];
    strAttackInfoExplanation._Bx._Buf[5] = v36;
    strAttackInfoExplanation._Bx._Buf[4] = v37;
    strAttackInfoExplanation._Bx._Buf[6] = v38;
    if ( !strcmp(strAttackInfoExplanation._Bx._Buf, "Recipe_") )
    {
      totalNum = Skill::GetTotalLearnProductSkill();
      ia = 0;
      if ( totalNum )
      {
        do
        {
          v39 = Skill::GetLearnProductSkill(ia);
          v40 = v39->kSkillID;
          kClassMask_4 = v39;
          if ( v39->kSkillID != -1 )
          {
            v41 = 0;
            if ( ITableBase<ProduceInfo,ProduceInfoTable>::GetTotal() )
            {
              while ( 1 )
              {
                v42 = CDataReader::GetRecord(
                        (CDataReader *)(ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable + 4),
                        v41);
                if ( *(_WORD *)v42 == v40 )
                  break;
                if ( ++v41 >= ITableBase<ProduceInfo,ProduceInfoTable>::GetTotal() )
                  goto LABEL_56;
              }
              if ( pkProduceInfo->MasteryType == *(_DWORD *)(v42 + 422) )
                uiExp += kClassMask_4->kSkillExp;
            }
          }
LABEL_56:
          ++ia;
        }
        while ( ia < totalNum );
      }
      if ( pkProduceInfo->NeededMasteryGain > uiExp )
        ((void (__stdcall *)(D3DXCOLOR *))v5->m_apkTextWin[dwDlyTime]->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
      v43 = (ProduceInfo **)v5->m_apkTextWin[dwDlyTime];
      v44 = pkProduceInfo->NeededMasteryGain;
      pkProduceInfo = *v43;
      v45 = (char *)TextData::Get(0x957C6FFD);
      v46 = fs(v45, v44);
      (*(void (__thiscall **)(ProduceInfo **, char *))&pkProduceInfo[1].Name[0])(v43, v46);
      v13 = ++dwDlyTime;
    }
  }
  if ( pkViewInfo->Descript[0] != 45 )
  {
    SkillInfoWin::SetTextBeginNewLine(v5, pkViewInfo->Descript, (int *)&dwDlyTime, &Color::m_kDxWhiteColor);
    v13 = dwDlyTime;
  }
  return v13;
}
// A8C16C: using guessed type int ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable;
// A8C1B0: using guessed type int ITableBase<ItemActionEffect,ItemActionEffectTab>::ms_pkTable;
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
// A8CAA0: using guessed type int ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable;

//----- (0058FC00) --------------------------------------------------------
void __thiscall SkillInfoWin::SetSkillBuyInfo(SkillInfoWin *this, int kSkillID, unsigned int uiPrice)
{
  SkillInfoWin *v3; // esi@1
  int v4; // edi@1

  v3 = this;
  v4 = SkillInfoWin::SetSkillInfo(this, kSkillID, 0, 0, 1);
  ((void (__stdcall *)(_DWORD))v3->m_apkTextWin[v4++]->vfptr[118].__vecDelDtor)(" ");
  SkillInfoWin::ShowMoneyWin(v3, v3->m_uiEdgeWidth, v4 * (v3->m_iFontHeight + 2) + v3->m_uiEdgeHeight + 2, uiPrice);
  SkillInfoWin::SetNeedFame(v3, kSkillID, v4);
}

//----- (0058FC70) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiAmbientLight>>>,0>>::_Min(std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *_Pnode)
{
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v2; // ecx@1

  result = _Pnode;
  v2 = _Pnode->_Left;
  if ( !_Pnode->_Left->_Isnil )
  {
    do
    {
      result = v2;
      v2 = v2->_Left;
    }
    while ( !v2->_Isnil );
  }
  return result;
}

//----- (0058FC90) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Max(std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *_Pnode)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *i; // ecx@1

  result = _Pnode;
  for ( i = _Pnode->_Right; !i->_Isnil; i = i->_Right )
    result = i;
  return result;
}

//----- (0058FCB0) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Min(std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *_Pnode)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v2; // ecx@1

  result = _Pnode;
  v2 = _Pnode->_Left;
  if ( !_Pnode->_Left->_Isnil )
  {
    do
    {
      result = v2;
      v2 = v2->_Left;
    }
    while ( !v2->_Isnil );
  }
  return result;
}

//----- (0058FCD0) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<ItemAction *>,ItemAction *>::~NiTListBase<DFALL<ItemAction *>,ItemAction *>(NiTListBase<DFALL<ItemAction *>,ItemAction *> *this)
{
  this->vfptr = (NiTListBase<DFALL<ItemAction *>,ItemAction *>Vtbl *)&NiTListBase<DFALL<ItemAction *>,ItemAction *>::`vftable';
}
// 9A1AFC: using guessed type int (__thiscall *NiTListBase<DFALL<ItemAction *>,ItemAction *>::`vftable')(void *p, char);

//----- (0058FCE0) --------------------------------------------------------
NiTListBase<DFALL<ItemAction *>,ItemAction *> *__thiscall NiTListBase<DFALL<ItemAction *>,ItemAction *>::`vector deleting destructor'(NiTListBase<DFALL<ItemAction *>,ItemAction *> *this, unsigned int a2)
{
  NiTListBase<DFALL<ItemAction *>,ItemAction *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<ItemAction *>,ItemAction *>Vtbl *)&NiTListBase<DFALL<ItemAction *>,ItemAction *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9A1AFC: using guessed type int (__thiscall *NiTListBase<DFALL<ItemAction *>,ItemAction *>::`vftable')(void *p, char);

//----- (0058FD10) --------------------------------------------------------
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,bool,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,bool>>,0>>,std::_Iterator_base0>::operator--(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >,std::_Iterator_base0> *this)
{
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >,std::_Iterator_base0> *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v2; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *i; // edx@3
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v4; // ecx@4
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v5; // edx@5

  result = this;
  v2 = this->_Ptr;
  if ( v2->_Isnil )
  {
    result->_Ptr = v2->_Right;
    return result;
  }
  i = v2->_Left;
  if ( !v2->_Left->_Isnil )
  {
    v4 = i->_Right;
    if ( !v4->_Isnil )
    {
      do
      {
        v5 = v4;
        v4 = v4->_Right;
      }
      while ( !v4->_Isnil );
      result->_Ptr = v5;
      return result;
    }
LABEL_11:
    result->_Ptr = i;
    return result;
  }
  for ( i = v2->_Parent; !i->_Isnil; i = i->_Parent )
  {
    if ( result->_Ptr != i->_Left )
      break;
    result->_Ptr = i;
  }
  if ( !result->_Ptr->_Isnil )
    goto LABEL_11;
  return result;
}

//----- (0058FD70) --------------------------------------------------------
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiAmbientLight>>>,0>>,std::_Iterator_base0>::operator++(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >,std::_Iterator_base0> *this)
{
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >,std::_Iterator_base0> *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v2; // edx@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v3; // ecx@2
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v4; // edx@3
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *i; // edx@6

  result = this;
  v2 = this->_Ptr;
  if ( !this->_Ptr->_Isnil )
  {
    v3 = v2->_Right;
    if ( v3->_Isnil )
    {
      for ( i = v2->_Parent; !i->_Isnil; i = i->_Parent )
      {
        if ( result->_Ptr != i->_Right )
          break;
        result->_Ptr = i;
      }
      result->_Ptr = i;
    }
    else
    {
      v4 = v3->_Left;
      if ( !v3->_Left->_Isnil )
      {
        do
        {
          v3 = v4;
          v4 = v4->_Left;
        }
        while ( !v4->_Isnil );
      }
      result->_Ptr = v3;
    }
  }
  return result;
}

//----- (0058FDC0) --------------------------------------------------------
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>,std::_Iterator_base0>::operator++(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >,std::_Iterator_base0> *this)
{
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >,std::_Iterator_base0> *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v2; // edx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v3; // ecx@2
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v4; // edx@3
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *i; // edx@6

  result = this;
  v2 = this->_Ptr;
  if ( !this->_Ptr->_Isnil )
  {
    v3 = v2->_Right;
    if ( v3->_Isnil )
    {
      for ( i = v2->_Parent; !i->_Isnil; i = i->_Parent )
      {
        if ( result->_Ptr != i->_Right )
          break;
        result->_Ptr = i;
      }
      result->_Ptr = i;
    }
    else
    {
      v4 = v3->_Left;
      if ( !v3->_Left->_Isnil )
      {
        do
        {
          v3 = v4;
          v4 = v4->_Left;
        }
        while ( !v4->_Isnil );
      }
      result->_Ptr = v3;
    }
  }
  return result;
}

//----- (0058FE10) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Lrotate(std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *_Wherenode)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v3; // ecx@3
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v4; // ecx@5

  v2 = _Wherenode->_Right;
  _Wherenode->_Right = v2->_Left;
  if ( !v2->_Left->_Isnil )
    v2->_Left->_Parent = _Wherenode;
  v2->_Parent = _Wherenode->_Parent;
  v3 = this->_Myhead;
  if ( _Wherenode == v3->_Parent )
  {
    v3->_Parent = v2;
    v2->_Left = _Wherenode;
    _Wherenode->_Parent = v2;
  }
  else
  {
    v4 = _Wherenode->_Parent;
    if ( _Wherenode == v4->_Left )
    {
      v4->_Left = v2;
      v2->_Left = _Wherenode;
      _Wherenode->_Parent = v2;
    }
    else
    {
      v4->_Right = v2;
      v2->_Left = _Wherenode;
      _Wherenode->_Parent = v2;
    }
  }
}

//----- (0058FE70) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Rrotate(std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *_Wherenode)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v4; // ecx@3
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v5; // ecx@5

  v2 = _Wherenode->_Left;
  _Wherenode->_Left = _Wherenode->_Left->_Right;
  v3 = v2->_Right;
  if ( !v3->_Isnil )
    v3->_Parent = _Wherenode;
  v2->_Parent = _Wherenode->_Parent;
  v4 = this->_Myhead;
  if ( _Wherenode == v4->_Parent )
  {
    v4->_Parent = v2;
    v2->_Right = _Wherenode;
    _Wherenode->_Parent = v2;
  }
  else
  {
    v5 = _Wherenode->_Parent;
    if ( _Wherenode == v5->_Right )
    {
      v5->_Right = v2;
      v2->_Right = _Wherenode;
      _Wherenode->_Parent = v2;
    }
    else
    {
      v5->_Left = v2;
      v2->_Right = _Wherenode;
      _Wherenode->_Parent = v2;
    }
  }
}

//----- (0058FED0) --------------------------------------------------------
unsigned int __cdecl ITableBase<ItemActionEffect,ItemActionEffectTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<ItemActionEffect,ItemActionEffectTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C1B0: using guessed type int ITableBase<ItemActionEffect,ItemActionEffectTab>::ms_pkTable;

//----- (0058FEF0) --------------------------------------------------------
unsigned int __cdecl ITableBase<ItemActionCondition,ItemActionConditionTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<ItemActionCondition,ItemActionConditionTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C1B4: using guessed type int ITableBase<ItemActionCondition,ItemActionConditionTab>::ms_pkTable;

//----- (0058FF10) --------------------------------------------------------
unsigned int __cdecl ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C1B8: using guessed type int ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::ms_pkTable;

//----- (0058FF30) --------------------------------------------------------
void __cdecl ItemActionTab::GetListByItemActionID(NiTList<ItemAction *> *kItemActionList, unsigned int uiIndex)
{
  unsigned int v2; // ebx@1
  char *v3; // eax@2
  char *v4; // edi@4
  NiTListItem<ItemAction *> *v5; // eax@4
  NiTListItem<ItemAction *> *v6; // ecx@4

  v2 = 0;
  if ( ItemActionTab::GetTotal() )
  {
    do
    {
      v3 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemAction,ItemActionTab>::ms_pkTable + 4), v2);
      if ( v3 && *(_WORD *)v3 == uiIndex )
      {
        v4 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemAction,ItemActionTab>::ms_pkTable + 4), v2);
        v5 = kItemActionList->vfptr->NewItem((NiTListBase<DFALL<ItemAction *>,ItemAction *> *)kItemActionList);
        v5->m_element = (ItemAction *)v4;
        v5->m_pkNext = 0;
        v5->m_pkPrev = kItemActionList->m_pkTail;
        v6 = kItemActionList->m_pkTail;
        if ( v6 )
          v6->m_pkNext = v5;
        else
          kItemActionList->m_pkHead = v5;
        ++kItemActionList->m_kAllocator.m_uiCount;
        kItemActionList->m_pkTail = v5;
      }
      ++v2;
    }
    while ( v2 < ItemActionTab::GetTotal() );
  }
}
// A8C1AC: using guessed type int ITableBase<ItemAction,ItemActionTab>::ms_pkTable;

//----- (0058FFB0) --------------------------------------------------------
ItemActionEffect *__cdecl ItemActionEffectTab::GetByEffectID(unsigned int uiIndex)
{
  unsigned int v1; // esi@1
  char *v2; // eax@2
  ItemActionEffect *result; // eax@5

  v1 = 0;
  if ( ITableBase<ItemActionEffect,ItemActionEffectTab>::GetTotal() )
  {
    while ( 1 )
    {
      v2 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemActionEffect,ItemActionEffectTab>::ms_pkTable + 4), v1);
      if ( v2 )
      {
        if ( *(_WORD *)v2 == uiIndex )
          break;
      }
      if ( ++v1 >= ITableBase<ItemActionEffect,ItemActionEffectTab>::GetTotal() )
        goto LABEL_5;
    }
    result = (ItemActionEffect *)CDataReader::GetRecord(
                                   (CDataReader *)(ITableBase<ItemActionEffect,ItemActionEffectTab>::ms_pkTable + 4),
                                   v1);
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}
// A8C1B0: using guessed type int ITableBase<ItemActionEffect,ItemActionEffectTab>::ms_pkTable;

//----- (00590000) --------------------------------------------------------
PassiveSkillInfo *__cdecl PasSkillInfoTab::GetByActiveSkillGroupIndex(ActiveSkillGroupIndex kIndex)
{
  unsigned int v1; // esi@1
  PassiveSkillInfo *result; // eax@4

  v1 = 0;
  if ( ITableBase<PassiveSkillInfo,PasSkillInfoTab>::GetTotal() )
  {
    while ( *((_DWORD *)CDataReader::GetRecord(
                          (CDataReader *)(ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ms_pkTable + 4),
                          v1)
            + 62) != kIndex )
    {
      if ( ++v1 >= ITableBase<PassiveSkillInfo,PasSkillInfoTab>::GetTotal() )
        goto LABEL_4;
    }
    result = (PassiveSkillInfo *)CDataReader::GetRecord(
                                   (CDataReader *)(ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ms_pkTable + 4),
                                   v1);
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}
// A8CAAC: using guessed type int ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ms_pkTable;

//----- (00590050) --------------------------------------------------------
PassiveSkillInfo *__cdecl PasSkillInfoTab::GetByInxName(char *pcInxName)
{
  unsigned int v1; // edi@1
  PassiveSkillInfo *result; // eax@4

  v1 = 0;
  if ( ITableBase<PassiveSkillInfo,PasSkillInfoTab>::GetTotal() )
  {
    while ( strcmp(
              CDataReader::GetRecord((CDataReader *)(ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ms_pkTable + 4), v1)
            + 2,
              pcInxName) )
    {
      if ( ++v1 >= ITableBase<PassiveSkillInfo,PasSkillInfoTab>::GetTotal() )
        goto LABEL_4;
    }
    result = (PassiveSkillInfo *)CDataReader::GetRecord(
                                   (CDataReader *)(ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ms_pkTable + 4),
                                   v1);
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}
// A8CAAC: using guessed type int ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ms_pkTable;

//----- (005900D0) --------------------------------------------------------
GUILD_TOURNAMENT_SKILLDESC *__cdecl GuildTournamentStateDescTab::GetIndex(const unsigned int uiIndex)
{
  unsigned int v1; // esi@1
  GUILD_TOURNAMENT_SKILLDESC *result; // eax@4

  v1 = 0;
  if ( ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::GetTotal() )
  {
    while ( *((_WORD *)CDataReader::GetRecord(
                         (CDataReader *)(ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::ms_pkTable
                                       + 4),
                         v1)
            + 1) != uiIndex )
    {
      if ( ++v1 >= ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::GetTotal() )
        goto LABEL_4;
    }
    result = (GUILD_TOURNAMENT_SKILLDESC *)CDataReader::GetRecord(
                                             (CDataReader *)(ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::ms_pkTable
                                                           + 4),
                                             v1);
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}
// A8C1B8: using guessed type int ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::ms_pkTable;

//----- (00590120) --------------------------------------------------------
unsigned int __cdecl ActiveSkillGroupTab::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C1E0: using guessed type int ITableBase<ActiveSkillGroup,ActiveSkillGroupTab>::ms_pkTable;

//----- (00590140) --------------------------------------------------------
void __thiscall NiTList<ItemAction *>::~NiTList<ItemAction *>(NiTList<ItemAction *> *this)
{
  NiTList<ItemAction *> *v1; // edi@1
  NiTListItem<ItemAction *> *v2; // esi@1
  NiTListItem<ItemAction *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<DFALL<ItemAction *>,ItemAction *>Vtbl *)&NiTPointerListBase<DFALL<ItemAction *>,ItemAction *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<DFALL<ItemAction *>,ItemAction *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<DFALL<ItemAction *>,ItemAction *>Vtbl *)&NiTListBase<DFALL<ItemAction *>,ItemAction *>::`vftable';
}
// 9A1AFC: using guessed type int (__thiscall *NiTListBase<DFALL<ItemAction *>,ItemAction *>::`vftable')(void *p, char);
// 9A1B0C: using guessed type int (__thiscall *NiTPointerListBase<DFALL<ItemAction *>,ItemAction *>::`vftable')(void *p, char);

//----- (005901C0) --------------------------------------------------------
NiTPointerListBase<DFALL<ItemAction *>,ItemAction *> *__thiscall NiTPointerListBase<DFALL<ItemAction *>,ItemAction *>::`vector deleting destructor'(NiTPointerListBase<DFALL<ItemAction *>,ItemAction *> *this, unsigned int a2)
{
  NiTPointerListBase<DFALL<ItemAction *>,ItemAction *> *v2; // edi@1
  NiTListItem<ItemAction *> *v3; // esi@1
  NiTListItem<ItemAction *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<ItemAction *>,ItemAction *>Vtbl *)&NiTPointerListBase<DFALL<ItemAction *>,ItemAction *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<DFALL<ItemAction *>,ItemAction *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<ItemAction *>,ItemAction *>Vtbl *)&NiTListBase<DFALL<ItemAction *>,ItemAction *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A1AFC: using guessed type int (__thiscall *NiTListBase<DFALL<ItemAction *>,ItemAction *>::`vftable')(void *p, char);
// 9A1B0C: using guessed type int (__thiscall *NiTPointerListBase<DFALL<ItemAction *>,ItemAction *>::`vftable')(void *p, char);

//----- (00590250) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::erase(std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > _Where)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v4; // edi@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v5; // eax@7
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v6; // esi@8
  std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *v7; // ecx@10
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v8; // eax@10
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v9; // eax@17
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v10; // ecx@20
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v11; // ecx@29
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v12; // ecx@31
  char v13; // cl@34
  std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *i; // ecx@36
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v15; // eax@38
  unsigned int v16; // eax@59
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *v17; // eax@61
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *_Erasednode; // [sp+10h] [bp-8h]@3
  std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *v19; // [sp+14h] [bp-4h]@1

  v3 = _Where._Ptr;
  v19 = this;
  if ( _Where._Ptr->_Isnil )
    std::_Xout_of_range("invalid map/set<T> iterator");
  _Erasednode = _Where._Ptr;
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >,std::_Iterator_base0> *)&_Where._Ptr);
  if ( v3->_Left->_Isnil )
  {
    v4 = v3->_Right;
LABEL_8:
    v6 = v3->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v7 = v19;
    v8 = v19->_Myhead;
    if ( v8->_Parent == v3 )
    {
      v8->_Parent = v4;
    }
    else if ( v6->_Left == v3 )
    {
      v6->_Left = v4;
    }
    else
    {
      v6->_Right = v4;
    }
    if ( v19->_Myhead->_Left == v3 )
    {
      if ( v4->_Isnil )
      {
        v9 = v6;
      }
      else
      {
        v9 = std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Min(v4);
        v7 = v19;
      }
      v7->_Myhead->_Left = v9;
    }
    v10 = v7->_Myhead;
    if ( v10->_Right == v3 )
    {
      if ( v4->_Isnil )
        v10->_Right = v6;
      else
        v10->_Right = std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Max(v4);
    }
    goto LABEL_35;
  }
  if ( v3->_Right->_Isnil )
  {
    v4 = v3->_Left;
    goto LABEL_8;
  }
  v5 = _Where._Ptr;
  v4 = _Where._Ptr->_Right;
  if ( _Where._Ptr == v3 )
    goto LABEL_8;
  v3->_Left->_Parent = _Where._Ptr;
  v5->_Left = v3->_Left;
  if ( v5 == v3->_Right )
  {
    v6 = v5;
  }
  else
  {
    v6 = v5->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v6->_Left = v4;
    v5->_Right = v3->_Right;
    v3->_Right->_Parent = v5;
  }
  v11 = v19->_Myhead;
  if ( v11->_Parent == v3 )
  {
    v11->_Parent = v5;
  }
  else
  {
    v12 = v3->_Parent;
    if ( v12->_Left == v3 )
      v12->_Left = v5;
    else
      v12->_Right = v5;
  }
  v5->_Parent = v3->_Parent;
  v13 = v5->_Color;
  v5->_Color = v3->_Color;
  v3->_Color = v13;
LABEL_35:
  if ( _Erasednode->_Color == 1 )
  {
    for ( i = v19; v4 != i->_Myhead->_Parent; v6 = v6->_Parent )
    {
      if ( v4->_Color != 1 )
        break;
      v15 = v6->_Left;
      if ( v4 == v6->_Left )
      {
        v15 = v6->_Right;
        if ( !v15->_Color )
        {
          v15->_Color = 1;
          v6->_Color = 0;
          std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Lrotate(
            i,
            v6);
          v15 = v6->_Right;
          i = v19;
        }
        if ( v15->_Isnil )
          goto LABEL_53;
        if ( v15->_Left->_Color != 1 || v15->_Right->_Color != 1 )
        {
          if ( v15->_Right->_Color == 1 )
          {
            v15->_Left->_Color = 1;
            v15->_Color = 0;
            std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Rrotate(
              i,
              v15);
            v15 = v6->_Right;
            i = v19;
          }
          v15->_Color = v6->_Color;
          v6->_Color = 1;
          v15->_Right->_Color = 1;
          std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Lrotate(
            i,
            v6);
          break;
        }
      }
      else
      {
        if ( !v15->_Color )
        {
          v15->_Color = 1;
          v6->_Color = 0;
          std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Rrotate(
            i,
            v6);
          v15 = v6->_Left;
          i = v19;
        }
        if ( v15->_Isnil )
          goto LABEL_53;
        if ( v15->_Right->_Color != 1 || v15->_Left->_Color != 1 )
        {
          if ( v15->_Left->_Color == 1 )
          {
            v15->_Right->_Color = 1;
            v15->_Color = 0;
            std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Lrotate(
              i,
              v15);
            v15 = v6->_Left;
            i = v19;
          }
          v15->_Color = v6->_Color;
          v6->_Color = 1;
          v15->_Left->_Color = 1;
          std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Rrotate(
            i,
            v6);
          break;
        }
      }
      v15->_Color = 0;
LABEL_53:
      v4 = v6;
    }
    v4->_Color = 1;
  }
  operator delete(_Erasednode);
  v16 = v19->_Mysize;
  if ( v16 )
    v19->_Mysize = v16 - 1;
  v17 = result;
  result->_Ptr = _Where._Ptr;
  return v17;
}

//----- (005904A0) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Erase(std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *_Rootnode)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v2; // edi@1
  std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *i; // esi@1

  v2 = _Rootnode;
  v3 = this;
  for ( i = _Rootnode; !i->_Isnil; v2 = i )
  {
    std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Erase(
      v3,
      i->_Right);
    i = i->_Left;
    operator delete(v2);
  }
}

//----- (005904E0) --------------------------------------------------------
void __cdecl std::_Uninit_def_fill_n<ItemAction *,unsigned int,ItemAction,std::allocator<ItemAction>,ItemAction>(ItemAction *_First, unsigned int _Count)
{
  unsigned int v2; // edx@1
  ItemAction *v3; // eax@2

  v2 = _Count;
  if ( _Count )
  {
    v3 = _First;
    do
    {
      if ( v3 )
      {
        *(_DWORD *)&v3->ItemActionID = 0;
        *(_DWORD *)&v3->EffectID = 0;
        *(unsigned int *)((char *)&v3->CoolTime + 2) = 0;
      }
      ++v3;
      --v2;
    }
    while ( v2 );
  }
}

//----- (00590510) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Insert(std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *_Newnode)
{
  unsigned int v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v6; // edi@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v7; // edx@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v8; // edx@7
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v9; // edx@9
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v10; // eax@11
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v11; // edx@12
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v12; // esi@12
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v13; // esi@13
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v14; // edx@16
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v15; // esi@18
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v16; // esi@20
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v17; // edx@24
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v18; // esi@24
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v19; // edi@24
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v20; // edi@26
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v21; // edi@28
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v22; // esi@31
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v23; // edx@34
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v24; // esi@34
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v25; // esi@36
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v26; // esi@38
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v27; // edi@44
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v28; // edi@46
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v29; // ecx@52
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *v30; // eax@52

  v5 = this->_Mysize;
  if ( v5 >= 0x12492491 )
  {
    operator delete(_Newnode);
    std::_Xlength_error("map/set<T> too long");
  }
  this->_Mysize = v5 + 1;
  v6 = _Newnode;
  _Newnode->_Parent = _Wherenode;
  v7 = this->_Myhead;
  if ( _Wherenode == v7 )
  {
    v7->_Parent = _Newnode;
    this->_Myhead->_Left = _Newnode;
    this->_Myhead->_Right = _Newnode;
  }
  else if ( _Addleft )
  {
    _Wherenode->_Left = _Newnode;
    v8 = this->_Myhead;
    if ( _Wherenode == v8->_Left )
      v8->_Left = _Newnode;
  }
  else
  {
    _Wherenode->_Right = _Newnode;
    v9 = this->_Myhead;
    if ( _Wherenode == v9->_Right )
      v9->_Right = _Newnode;
  }
  v10 = _Newnode;
  while ( !v10->_Parent->_Color )
  {
    v11 = v10->_Parent;
    v12 = v11->_Parent;
    if ( v11 == v12->_Left )
    {
      v13 = v12->_Right;
      if ( v13->_Color )
      {
        if ( v10 == v11->_Right )
        {
          v10 = v10->_Parent;
          v14 = v11->_Right;
          v10->_Right = v14->_Left;
          if ( !v14->_Left->_Isnil )
            v14->_Left->_Parent = v10;
          v14->_Parent = v10->_Parent;
          v15 = this->_Myhead;
          if ( v10 == v15->_Parent )
          {
            v15->_Parent = v14;
          }
          else
          {
            v16 = v10->_Parent;
            if ( v10 == v16->_Left )
              v16->_Left = v14;
            else
              v16->_Right = v14;
          }
          v14->_Left = v10;
          v10->_Parent = v14;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Left;
        v17->_Left = v17->_Left->_Right;
        v19 = v18->_Right;
        if ( !v19->_Isnil )
          v19->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v20 = this->_Myhead;
        if ( v17 == v20->_Parent )
        {
          v20->_Parent = v18;
          v18->_Right = v17;
        }
        else
        {
          v21 = v17->_Parent;
          if ( v17 == v21->_Right )
          {
            v21->_Right = v18;
            v18->_Right = v17;
          }
          else
          {
            v21->_Left = v18;
            v18->_Right = v17;
          }
        }
LABEL_50:
        v6 = _Newnode;
        v17->_Parent = v18;
        continue;
      }
      v11->_Color = 1;
      v13->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
    else
    {
      v22 = v12->_Left;
      if ( v22->_Color )
      {
        if ( v10 == v11->_Left )
        {
          v10 = v10->_Parent;
          v23 = v11->_Left;
          v10->_Left = v23->_Right;
          v24 = v23->_Right;
          if ( !v24->_Isnil )
            v24->_Parent = v10;
          v23->_Parent = v10->_Parent;
          v25 = this->_Myhead;
          if ( v10 == v25->_Parent )
          {
            v25->_Parent = v23;
          }
          else
          {
            v26 = v10->_Parent;
            if ( v10 == v26->_Right )
              v26->_Right = v23;
            else
              v26->_Left = v23;
          }
          v23->_Right = v10;
          v10->_Parent = v23;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Right;
        v17->_Right = v18->_Left;
        if ( !v18->_Left->_Isnil )
          v18->_Left->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v27 = this->_Myhead;
        if ( v17 == v27->_Parent )
        {
          v27->_Parent = v18;
        }
        else
        {
          v28 = v17->_Parent;
          if ( v17 == v28->_Left )
            v28->_Left = v18;
          else
            v28->_Right = v18;
        }
        v18->_Left = v17;
        goto LABEL_50;
      }
      v11->_Color = 1;
      v22->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
  }
  v29 = this->_Myhead->_Parent;
  v30 = result;
  result->_Ptr = v6;
  v29->_Color = 1;
  return v30;
}

//----- (00590740) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::clear(std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *this)
{
  std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *v1; // edi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v4; // esi@1

  v1 = this;
  v2 = this->_Myhead;
  v3 = v2->_Parent;
  v4 = v2->_Parent;
  if ( !v3->_Isnil )
  {
    do
    {
      std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Erase(
        v1,
        v4->_Right);
      v4 = v4->_Left;
      operator delete(v3);
      v3 = v4;
    }
    while ( !v4->_Isnil );
  }
  v1->_Myhead->_Parent = v1->_Myhead;
  v1->_Myhead->_Left = v1->_Myhead;
  v1->_Myhead->_Right = v1->_Myhead;
  v1->_Mysize = 0;
}

//----- (00590790) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::find(std::_Tree<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *result, const unsigned __int16 *_Keyval)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v3; // edx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v4; // eax@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *v5; // eax@8

  v3 = this->_Myhead;
  v4 = v3->_Parent;
  while ( !v4->_Isnil )
  {
    if ( v4->_Myval.first >= *_Keyval )
    {
      v3 = v4;
      v4 = v4->_Left;
    }
    else
    {
      v4 = v4->_Right;
    }
  }
  if ( v3 == this->_Myhead || *_Keyval < v3->_Myval.first )
  {
    v5 = result;
    result->_Ptr = this->_Myhead;
  }
  else
  {
    v5 = result;
    result->_Ptr = v3;
  }
  return v5;
}

//----- (00590800) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::find(std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *result, const unsigned __int16 *_Keyval)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v3; // edx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v4; // eax@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *v5; // eax@8

  v3 = this->_Myhead;
  v4 = v3->_Parent;
  while ( !v4->_Isnil )
  {
    if ( v4->_Myval.first >= *_Keyval )
    {
      v3 = v4;
      v4 = v4->_Left;
    }
    else
    {
      v4 = v4->_Right;
    }
  }
  if ( v3 == this->_Myhead || *_Keyval < v3->_Myval.first )
  {
    v5 = result;
    result->_Ptr = this->_Myhead;
  }
  else
  {
    v5 = result;
    result->_Ptr = v3;
  }
  return v5;
}

//----- (00590870) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::erase(std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > _Last)
{
  std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v6; // ecx@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *v7; // eax@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > v8; // edx@5
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v9; // eax@6
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v10; // ecx@7
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *j; // eax@7
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *i; // eax@10
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > v13; // [sp+4h] [bp-4h]@14

  v4 = this;
  v5 = this->_Myhead;
  v6 = _First._Ptr;
  if ( _First._Ptr != v5->_Left || _Last._Ptr != v5 )
  {
    for ( ; _First._Ptr != _Last._Ptr; v6 = _First._Ptr )
    {
      v8._Ptr = v6;
      if ( !v6->_Isnil )
      {
        v9 = v6->_Right;
        if ( v9->_Isnil )
        {
          for ( i = v6->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v6 != i->_Right )
              break;
            v6 = i;
          }
          _First._Ptr = i;
        }
        else
        {
          v10 = v6->_Right;
          for ( j = v9->_Left; !j->_Isnil; j = j->_Left )
            v10 = j;
          _First._Ptr = v10;
        }
      }
      std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::erase(
        v4,
        &v13,
        v8);
    }
    v7 = result;
    result->_Ptr = v6;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::clear(v4);
    v7 = result;
    result->_Ptr = v4->_Myhead->_Left;
  }
  return v7;
}

//----- (00590910) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Buynode<std::pair<unsigned short,ItemAction>>(std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *this, std::pair<unsigned short,ItemAction> *_Val)
{
  std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *result; // eax@1
  std::pair<unsigned short,ItemAction> *v4; // ecx@3
  std::exception pExceptionObject; // [sp+4h] [bp-Ch]@5

  v2 = this;
  result = (std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *)operator new(0x1Cu);
  if ( !result )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  result->_Left = v2->_Myhead;
  result->_Parent = v2->_Myhead;
  result->_Right = v2->_Myhead;
  *(_WORD *)&result->_Color = 0;
  if ( result != (std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *)-12 )
  {
    v4 = _Val;
    result->_Myval.first = _Val->first;
    *(_DWORD *)&result->_Myval.second.ItemActionID = *(_DWORD *)&v4->second.ItemActionID;
    *(_DWORD *)&result->_Myval.second.EffectID = *(_DWORD *)&v4->second.EffectID;
    *(unsigned int *)((char *)&result->_Myval.second.CoolTime + 2) = *(unsigned int *)((char *)&v4->second.CoolTime + 2);
  }
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00590990) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *__thiscall std::multimap<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>>::insert<std::pair<unsigned short,ItemAction>>(std::multimap<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> > > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *result, std::pair<unsigned short,ItemAction> *_Val)
{
  std::multimap<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> > > *v3; // edi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v4; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v5; // ecx@1
  bool v6; // zf@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v7; // esi@1
  unsigned __int16 v8; // bx@2
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v9; // ecx@7
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *v10; // eax@7

  v3 = this;
  v4 = std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Buynode<std::pair<unsigned short,ItemAction>>(
         (std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *)&this->comp,
         _Val);
  v5 = v3->_Myhead->_Parent;
  v6 = v5->_Isnil == 0;
  v7 = v3->_Myhead;
  LOBYTE(_Val) = 1;
  if ( v6 )
  {
    v8 = v4->_Myval.first;
    do
    {
      v7 = v5;
      LOBYTE(_Val) = v8 < v5->_Myval.first;
      if ( (_BYTE)_Val )
        v5 = v5->_Left;
      else
        v5 = v5->_Right;
    }
    while ( !v5->_Isnil );
  }
  v9 = std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::_Insert(
         (std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *)&v3->comp,
         (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > *)&_Val,
         (bool)_Val,
         v7,
         v4)->_Ptr;
  v10 = result;
  result->_Ptr = v9;
  return v10;
}

//----- (00590A00) --------------------------------------------------------
void __thiscall std::multimap<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>>::~multimap<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>>(std::multimap<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> > > *this)
{
  std::multimap<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> > > *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> >::_Node *v2; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > v3; // ST04_4@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > > result; // [sp+8h] [bp-14h]@1
  std::multimap<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> > > *v5; // [sp+Ch] [bp-10h]@1
  int v6; // [sp+18h] [bp-4h]@1

  v1 = this;
  v5 = this;
  v2 = this->_Myhead;
  v3._Ptr = v2->_Left;
  v6 = 0;
  std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,ItemAction>>,1>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > *)&this->comp,
    &result,
    v3,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,ItemAction,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,ItemAction> >,1> > >)v2);
  operator delete(v1->_Myhead);
}

//----- (00590A60) --------------------------------------------------------
void __thiscall std::vector<ItemAction,std::allocator<ItemAction>>::resize(std::vector<ItemAction,std::allocator<ItemAction> > *this, unsigned int _Newsize)
{
  std::vector<ItemAction,std::allocator<ItemAction> > *v2; // esi@1
  ItemAction *v3; // ecx@1
  unsigned int v4; // eax@1
  unsigned int v5; // edx@2

  v2 = this;
  v3 = this->_Mylast;
  v4 = v3 - v2->_Myfirst;
  if ( v4 <= _Newsize )
  {
    if ( v4 >= _Newsize )
      return;
    std::vector<ItemAction,std::allocator<ItemAction>>::_Reserve(
      (std::vector<NiPoint3,std::allocator<NiPoint3> > *)v2,
      _Newsize - v4);
    std::_Uninit_def_fill_n<ItemAction *,unsigned int,ItemAction,std::allocator<ItemAction>,ItemAction>(
      v2->_Mylast,
      _Newsize - (v2->_Mylast - v2->_Myfirst));
    v5 = (unsigned int)&v2->_Mylast[_Newsize - (v2->_Mylast - v2->_Myfirst)].ItemActionID;
  }
  else
  {
    v5 = (unsigned int)&v2->_Myfirst[_Newsize].ItemActionID;
    if ( (ItemAction *)v5 == v3 )
      return;
  }
  v2->_Mylast = (ItemAction *)v5;
}

//----- (00590B30) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Newnode)
{
  unsigned int v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v6; // edi@6
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v7; // edx@6
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v8; // edx@9
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v9; // edx@11
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v10; // eax@13
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v11; // edx@14
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v12; // esi@14
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v13; // esi@15
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v14; // edx@18
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v15; // esi@20
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v16; // esi@22
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v17; // edx@26
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v18; // esi@26
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v19; // edi@26
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v20; // edi@28
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v21; // edi@30
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v22; // esi@33
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v23; // edx@36
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v24; // esi@36
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v25; // esi@38
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v26; // esi@40
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v27; // edi@46
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v28; // edi@48
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v29; // ecx@54
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *v30; // eax@54

  v5 = this->_Mysize;
  if ( v5 >= 0x7FFFFFE )
  {
    if ( _Newnode->_Myval.second._Myres >= 0x10 )
      operator delete(_Newnode->_Myval.second._Bx._Ptr);
    _Newnode->_Myval.second._Myres = 15;
    _Newnode->_Myval.second._Mysize = 0;
    _Newnode->_Myval.second._Bx._Buf[0] = 0;
    operator delete(_Newnode);
    std::_Xlength_error("map/set<T> too long");
  }
  v6 = _Newnode;
  this->_Mysize = v5 + 1;
  _Newnode->_Parent = _Wherenode;
  v7 = this->_Myhead;
  if ( _Wherenode == v7 )
  {
    v7->_Parent = _Newnode;
    this->_Myhead->_Left = _Newnode;
    this->_Myhead->_Right = _Newnode;
  }
  else if ( _Addleft )
  {
    _Wherenode->_Left = _Newnode;
    v8 = this->_Myhead;
    if ( _Wherenode == v8->_Left )
      v8->_Left = _Newnode;
  }
  else
  {
    _Wherenode->_Right = _Newnode;
    v9 = this->_Myhead;
    if ( _Wherenode == v9->_Right )
      v9->_Right = _Newnode;
  }
  v10 = _Newnode;
  while ( !v10->_Parent->_Color )
  {
    v11 = v10->_Parent;
    v12 = v11->_Parent;
    if ( v11 == v12->_Left )
    {
      v13 = v12->_Right;
      if ( v13->_Color )
      {
        if ( v10 == v11->_Right )
        {
          v10 = v10->_Parent;
          v14 = v11->_Right;
          v10->_Right = v14->_Left;
          if ( !v14->_Left->_Isnil )
            v14->_Left->_Parent = v10;
          v14->_Parent = v10->_Parent;
          v15 = this->_Myhead;
          if ( v10 == v15->_Parent )
          {
            v15->_Parent = v14;
          }
          else
          {
            v16 = v10->_Parent;
            if ( v10 == v16->_Left )
              v16->_Left = v14;
            else
              v16->_Right = v14;
          }
          v14->_Left = v10;
          v10->_Parent = v14;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Left;
        v17->_Left = v17->_Left->_Right;
        v19 = v18->_Right;
        if ( !v19->_Isnil )
          v19->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v20 = this->_Myhead;
        if ( v17 == v20->_Parent )
        {
          v20->_Parent = v18;
          v18->_Right = v17;
        }
        else
        {
          v21 = v17->_Parent;
          if ( v17 == v21->_Right )
          {
            v21->_Right = v18;
            v18->_Right = v17;
          }
          else
          {
            v21->_Left = v18;
            v18->_Right = v17;
          }
        }
LABEL_52:
        v6 = _Newnode;
        v17->_Parent = v18;
        continue;
      }
      v11->_Color = 1;
      v13->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
    else
    {
      v22 = v12->_Left;
      if ( v22->_Color )
      {
        if ( v10 == v11->_Left )
        {
          v10 = v10->_Parent;
          v23 = v11->_Left;
          v10->_Left = v23->_Right;
          v24 = v23->_Right;
          if ( !v24->_Isnil )
            v24->_Parent = v10;
          v23->_Parent = v10->_Parent;
          v25 = this->_Myhead;
          if ( v10 == v25->_Parent )
          {
            v25->_Parent = v23;
          }
          else
          {
            v26 = v10->_Parent;
            if ( v10 == v26->_Right )
              v26->_Right = v23;
            else
              v26->_Left = v23;
          }
          v23->_Right = v10;
          v10->_Parent = v23;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Right;
        v17->_Right = v18->_Left;
        if ( !v18->_Left->_Isnil )
          v18->_Left->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v27 = this->_Myhead;
        if ( v17 == v27->_Parent )
        {
          v27->_Parent = v18;
        }
        else
        {
          v28 = v17->_Parent;
          if ( v17 == v28->_Left )
            v28->_Left = v18;
          else
            v28->_Right = v18;
        }
        v18->_Left = v17;
        goto LABEL_52;
      }
      v11->_Color = 1;
      v22->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
  }
  v29 = this->_Myhead->_Parent;
  v30 = result;
  result->_Ptr = v6;
  v29->_Color = 1;
  return v30;
}

//----- (00590D80) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Erase(std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Rootnode)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v2; // esi@1
  std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *i; // edi@1

  v2 = _Rootnode;
  v3 = this;
  for ( i = _Rootnode; !i->_Isnil; v2 = i )
  {
    std::_Tree<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Erase(
      v3,
      i->_Right);
    i = i->_Left;
    if ( v2->_Myval.second._Myres >= 0x10 )
      operator delete(v2->_Myval.second._Bx._Ptr);
    v2->_Myval.second._Myres = 15;
    v2->_Myval.second._Mysize = 0;
    v2->_Myval.second._Bx._Buf[0] = 0;
    operator delete(v2);
  }
}

//----- (00590DE0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::erase(std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > _Where)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v4; // edi@4
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v5; // eax@7
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v6; // esi@8
  std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *v7; // ecx@10
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v8; // eax@10
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v9; // eax@17
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v10; // ecx@20
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v11; // ecx@29
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v12; // ecx@31
  char v13; // cl@34
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v14; // eax@35
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *v15; // ecx@36
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v16; // eax@38
  unsigned int v17; // eax@61
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *v18; // eax@63
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Erasednode; // [sp+10h] [bp-8h]@3
  std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *v20; // [sp+14h] [bp-4h]@1

  v3 = _Where._Ptr;
  v20 = this;
  if ( _Where._Ptr->_Isnil )
    std::_Xout_of_range("invalid map/set<T> iterator");
  _Erasednode = _Where._Ptr;
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiAmbientLight>>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >,std::_Iterator_base0> *)&_Where);
  if ( v3->_Left->_Isnil )
  {
    v4 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v3->_Right;
LABEL_8:
    v6 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v3->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v7 = v20;
    v8 = v20->_Myhead;
    if ( v8->_Parent == v3 )
    {
      v8->_Parent = (std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)v4;
    }
    else if ( (std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)v6->_Left == v3 )
    {
      v6->_Left = v4;
    }
    else
    {
      v6->_Right = v4;
    }
    if ( v20->_Myhead->_Left == v3 )
    {
      if ( v4->_Isnil )
      {
        v9 = v6;
      }
      else
      {
        v9 = std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiAmbientLight>>>,0>>::_Min(v4);
        v7 = v20;
      }
      v7->_Myhead->_Left = (std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)v9;
    }
    v10 = v7->_Myhead;
    if ( v10->_Right == v3 )
    {
      if ( v4->_Isnil )
        v10->_Right = (std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)v6;
      else
        v10->_Right = (std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::_Max(v4);
    }
    goto LABEL_35;
  }
  if ( v3->_Right->_Isnil )
  {
    v4 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v3->_Left;
    goto LABEL_8;
  }
  v5 = _Where._Ptr;
  v4 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)_Where._Ptr->_Right;
  if ( _Where._Ptr == v3 )
    goto LABEL_8;
  v3->_Left->_Parent = _Where._Ptr;
  v5->_Left = v3->_Left;
  if ( v5 == v3->_Right )
  {
    v6 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v5;
  }
  else
  {
    v6 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v5->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v6->_Left = v4;
    v5->_Right = v3->_Right;
    v3->_Right->_Parent = v5;
  }
  v11 = v20->_Myhead;
  if ( v11->_Parent == v3 )
  {
    v11->_Parent = v5;
  }
  else
  {
    v12 = v3->_Parent;
    if ( v12->_Left == v3 )
      v12->_Left = v5;
    else
      v12->_Right = v5;
  }
  v5->_Parent = v3->_Parent;
  v13 = v5->_Color;
  v5->_Color = v3->_Color;
  v3->_Color = v13;
LABEL_35:
  v14 = _Erasednode;
  if ( _Erasednode->_Color == 1 )
  {
    v15 = (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *)v20;
    if ( v4 != (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v20->_Myhead->_Parent )
    {
      do
      {
        if ( v4->_Color != 1 )
          break;
        v16 = v6->_Left;
        if ( v4 == v6->_Left )
        {
          v16 = v6->_Right;
          if ( !v16->_Color )
          {
            v16->_Color = 1;
            v6->_Color = 0;
            std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::_Lrotate(
              v15,
              v6);
            v16 = v6->_Right;
            v15 = (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *)v20;
          }
          if ( v16->_Isnil )
            goto LABEL_53;
          if ( v16->_Left->_Color != 1 || v16->_Right->_Color != 1 )
          {
            if ( v16->_Right->_Color == 1 )
            {
              v16->_Left->_Color = 1;
              v16->_Color = 0;
              std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>,0>>::_Rrotate(
                v15,
                v16);
              v16 = v6->_Right;
              v15 = (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *)v20;
            }
            v16->_Color = v6->_Color;
            v6->_Color = 1;
            v16->_Right->_Color = 1;
            std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::_Lrotate(
              v15,
              v6);
            break;
          }
        }
        else
        {
          if ( !v16->_Color )
          {
            v16->_Color = 1;
            v6->_Color = 0;
            std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>,0>>::_Rrotate(
              v15,
              v6);
            v16 = v6->_Left;
            v15 = (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *)v20;
          }
          if ( v16->_Isnil )
            goto LABEL_53;
          if ( v16->_Right->_Color != 1 || v16->_Left->_Color != 1 )
          {
            if ( v16->_Left->_Color == 1 )
            {
              v16->_Right->_Color = 1;
              v16->_Color = 0;
              std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::_Lrotate(
                v15,
                v16);
              v16 = v6->_Left;
              v15 = (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *)v20;
            }
            v16->_Color = v6->_Color;
            v6->_Color = 1;
            v16->_Left->_Color = 1;
            std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>,0>>::_Rrotate(
              v15,
              v6);
            break;
          }
        }
        v16->_Color = 0;
LABEL_53:
        v4 = v6;
        v6 = v6->_Parent;
      }
      while ( v4 != v15->_Myhead->_Parent );
    }
    v14 = _Erasednode;
    v4->_Color = 1;
  }
  if ( v14->_Myval.second._Myres >= 0x10 )
    operator delete(v14->_Myval.second._Bx._Ptr);
  _Erasednode->_Myval.second._Myres = 15;
  _Erasednode->_Myval.second._Mysize = 0;
  _Erasednode->_Myval.second._Bx._Buf[0] = 0;
  operator delete(_Erasednode);
  v17 = v20->_Mysize;
  if ( v17 )
    v20->_Mysize = v17 - 1;
  v18 = result;
  result->_Ptr = _Where._Ptr;
  return v18;
}

//----- (00591060) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Node, bool _Leftish)
{
  std::_Tree<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *v4; // edx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v5; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v6; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v7; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v8; // edi@1
  bool v9; // cl@1
  unsigned __int16 v10; // bx@2
  std::_Tree_nod<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v11; // ebx@10
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v12; // edx@12
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > >,bool> *v13; // eax@12
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v14; // ecx@15
  std::_Tree<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *v15; // [sp+Ch] [bp-4h]@1
  bool _Addleft; // [sp+1Ch] [bp+Ch]@1

  v4 = this;
  v5 = this->_Myhead;
  v6 = v5->_Parent;
  v7 = (std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)v5;
  v8 = _Node;
  v9 = 1;
  v15 = v4;
  _Addleft = 1;
  if ( !v6->_Isnil )
  {
    v10 = v8->_Myval.first;
    do
    {
      v7 = (std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)v6;
      if ( _Leftish )
        v9 = v6->_Myval.first >= v10;
      else
        v9 = v10 < v6->_Myval.first;
      _Addleft = v9;
      if ( v9 )
        v6 = v6->_Left;
      else
        v6 = v6->_Right;
    }
    while ( !v6->_Isnil );
  }
  v11 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)v7;
  *(_DWORD *)&_Leftish = v7;
  if ( v9 )
  {
    if ( (std::_Tree_nod<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)v7 == v4->_Myhead->_Left )
    {
      v12 = std::_Tree<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Insert(
              (std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *)v4,
              (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *)&_Leftish,
              1,
              v7,
              (std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)v8)->_Ptr;
      v13 = result;
      result->first._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)v12;
      result->second = 1;
      return v13;
    }
    std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,bool,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,bool>>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >,std::_Iterator_base0> *)&_Leftish);
    v11 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)_Leftish;
    v4 = v15;
  }
  if ( v11->_Myval.first >= v8->_Myval.first )
  {
    if ( v8->_Myval.second._Myres >= 0x10 )
      operator delete(v8->_Myval.second._Bx._Ptr);
    v8->_Myval.second._Myres = 15;
    v8->_Myval.second._Mysize = 0;
    v8->_Myval.second._Bx._Buf[0] = 0;
    operator delete(v8);
    v13 = result;
    result->first._Ptr = v11;
    result->second = 0;
  }
  else
  {
    v14 = std::_Tree<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Insert(
            (std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *)v4,
            (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *)&_Leftish,
            _Addleft,
            v7,
            (std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)v8)->_Ptr;
    v13 = result;
    result->first._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)v14;
    result->second = 1;
  }
  return v13;
}

//----- (00591160) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::_Linsert(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> >::_Node *_Node, bool _Leftish)
{
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v4; // eax@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v5; // edx@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> >::_Node *v6; // ebx@1
  unsigned int v7; // ecx@2
  const char *v8; // eax@4
  const char *v9; // edx@6
  unsigned int v10; // esi@8
  unsigned int v11; // ecx@8
  int v12; // eax@12
  bool v13; // sf@12
  bool v14; // al@14
  unsigned int v15; // edi@17
  unsigned int v16; // esi@19
  unsigned int v17; // edx@21
  char *v18; // ecx@24
  int v19; // eax@26
  bool v20; // sf@26
  signed int v21; // eax@28
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v22; // ecx@37
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> > >,bool> *v23; // eax@37
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> >::_Node *_Wherenode; // [sp+4h] [bp-14h]@4
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> > *v25; // [sp+8h] [bp-10h]@1
  unsigned int v26; // [sp+Ch] [bp-Ch]@2
  unsigned int v27; // [sp+10h] [bp-8h]@2
  bool _Addleft; // [sp+14h] [bp-4h]@1

  v4 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)this->_Myhead;
  v5 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)_Node;
  v6 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> >::_Node *)v4->_Parent;
  v25 = this;
  _Addleft = 1;
  if ( !v6->_Isnil )
  {
    v7 = _Node->_Myval.first._Mysize;
    v27 = _Node->_Myval.first._Mysize;
    v26 = _Node->_Myval.first._Myres;
    while ( 1 )
    {
      _Wherenode = v6;
      v8 = v6->_Myval.first._Bx._Buf;
      if ( _Leftish )
      {
        if ( v26 < 0x10 )
          v9 = v5->_Myval.first._Bx._Buf;
        else
          v9 = v5->_Myval.first._Bx._Ptr;
        v10 = v6->_Myval.first._Mysize;
        v11 = v6->_Myval.first._Mysize;
        if ( v10 >= v27 )
          v11 = v27;
        if ( v6->_Myval.first._Myres >= 0x10 )
          v8 = *(const char **)v8;
        v12 = std::char_traits<char>::compare(v8, v9, v11);
        v13 = v12 < 0;
        if ( !v12 )
        {
          if ( v10 < v27 )
          {
            v14 = 0;
            goto LABEL_32;
          }
          v13 = (v10 != v27) < 0;
        }
        v14 = !v13;
      }
      else
      {
        v15 = v6->_Myval.first._Mysize;
        if ( v6->_Myval.first._Myres >= 0x10 )
          v8 = *(const char **)v8;
        v16 = v5->_Myval.first._Mysize;
        if ( v7 < v16 )
          v16 = v7;
        v17 = v16;
        if ( v16 >= v15 )
          v17 = v6->_Myval.first._Mysize;
        if ( v26 < 0x10 )
          v18 = _Node->_Myval.first._Bx._Buf;
        else
          v18 = _Node->_Myval.first._Bx._Ptr;
        v19 = std::char_traits<char>::compare(v18, v8, v17);
        v20 = v19 < 0;
        if ( !v19 )
        {
          if ( v16 >= v15 )
            v21 = v16 != v15;
          else
            v21 = -1;
          v20 = v21 < 0;
        }
        v14 = v20;
      }
LABEL_32:
      _Addleft = v14;
      if ( v14 )
        v6 = v6->_Left;
      else
        v6 = v6->_Right;
      v5 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)_Node;
      if ( v6->_Isnil )
      {
        this = v25;
        v4 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)_Wherenode;
        break;
      }
      v7 = v27;
    }
  }
  v22 = std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned short>>,0>>::_Insert(
          (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > *)this,
          (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > > *)&_Leftish,
          _Addleft,
          v4,
          v5)->_Ptr;
  v23 = result;
  result->first._Ptr = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,int> >,1> >::_Node *)v22;
  result->second = 1;
  return v23;
}

//----- (00591290) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::erase(std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > _Last)
{
  std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v6; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node **v7; // ecx@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *v8; // eax@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > v9; // edx@5
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v10; // eax@6
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v11; // ecx@7
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *j; // eax@7
  std::_Tree_nod<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *i; // eax@10
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > v14; // [sp+4h] [bp-4h]@14

  v4 = this;
  v5 = this->_Myhead;
  v6 = _First._Ptr;
  if ( _First._Ptr != v5->_Left || _Last._Ptr != v5 )
  {
    for ( ; _First._Ptr != _Last._Ptr; v6 = _First._Ptr )
    {
      v9._Ptr = v6;
      if ( !v6->_Isnil )
      {
        v10 = v6->_Right;
        if ( v10->_Isnil )
        {
          for ( i = v6->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v6 != i->_Right )
              break;
            v6 = i;
          }
          _First._Ptr = i;
        }
        else
        {
          v11 = v6->_Right;
          for ( j = v10->_Left; !j->_Isnil; j = j->_Left )
            v11 = j;
          _First._Ptr = v11;
        }
      }
      std::_Tree<std::_Tmap_traits<unsigned int,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::erase(
        v4,
        &v14,
        v9);
    }
    v8 = result;
    result->_Ptr = v6;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Erase(
      v4,
      v5->_Parent);
    v4->_Myhead->_Parent = v4->_Myhead;
    v4->_Myhead->_Left = v4->_Myhead;
    v4->_Myhead->_Right = v4->_Myhead;
    v7 = &v4->_Myhead->_Left;
    v8 = result;
    v4->_Mysize = 0;
    result->_Ptr = *v7;
  }
  return v8;
}

//----- (00591350) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Buynode<std::pair<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>(std::_Tree_val<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::pair<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > *_Val)
{
  std::_Tree_val<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *v2; // edi@1
  void *v3; // eax@1
  void *v4; // esi@1
  unsigned __int16 *v5; // eax@2
  std::pair<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > *v6; // edx@3
  int v7; // ecx@3
  int v9; // [sp+0h] [bp-38h]@1
  std::exception pExceptionObject; // [sp+10h] [bp-28h]@5
  char *v11; // [sp+1Ch] [bp-1Ch]@2
  char *v12; // [sp+20h] [bp-18h]@2
  void *p; // [sp+24h] [bp-14h]@1
  int *v14; // [sp+28h] [bp-10h]@1
  int v15; // [sp+34h] [bp-4h]@2

  v14 = &v9;
  v2 = this;
  v3 = operator new(0x30u);
  v4 = v3;
  p = v3;
  if ( !v3 )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  *(_DWORD *)v3 = v2->_Myhead;
  *((_DWORD *)v3 + 1) = v2->_Myhead;
  v5 = (unsigned __int16 *)((char *)v3 + 12);
  *((_DWORD *)v4 + 2) = v2->_Myhead;
  *((_WORD *)v4 + 22) = 0;
  v15 = 0;
  v12 = (char *)v4 + 12;
  v11 = (char *)v4 + 12;
  LOBYTE(v15) = 1;
  if ( v4 != (void *)-12 )
  {
    v6 = _Val;
    *v5 = _Val->first;
    v7 = (int)v4 + 16;
    *(_DWORD *)(v7 + 20) = 15;
    *(_DWORD *)(v7 + 16) = 0;
    *(_BYTE *)v7 = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)v4 + 16),
      &v6->second);
  }
  return (std::_Tree_nod<std::_Tmap_traits<unsigned short,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)v4;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00591430) --------------------------------------------------------
SkillInfoWin *__thiscall SkillInfoWin::`scalar deleting destructor'(SkillInfoWin *this, unsigned int a2)
{
  SkillInfoWin *v2; // esi@1

  v2 = this;
  SkillInfoWin::~SkillInfoWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00591460) --------------------------------------------------------
void CSkillInitWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "ProductSkillReload");
}

//----- (00591490) --------------------------------------------------------
void __thiscall CSkillInitWin::CSkillInitWin(CSkillInitWin *this)
{
  CSkillInitWin *v1; // esi@1
  int v2; // eax@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&CSkillInitWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CSkillInitWin::`vftable'{for `IDirectMessenger'};
  v2 = (int)&v1->m_kDropContents;
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  v1->m_kDrop.m_pkSender = 0;
  *(_DWORD *)v2 = &DropContents::`vftable';
  *(_WORD *)(v2 + 60) = -1;
  *(_DWORD *)(v2 + 64) = 0;
  v1->m_kDrop.m_pkContents = &v1->m_kDropContents;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9A1EC8: using guessed type void (__thiscall *CSkillInitWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A1EE4: using guessed type int (__thiscall *CSkillInitWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005914E0) --------------------------------------------------------
void __thiscall CSkillInitWin::~CSkillInitWin(CSkillInitWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&CSkillInitWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CSkillInitWin::`vftable'{for `IDirectMessenger'};
  this->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  this->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9A1EC8: using guessed type void (__thiscall *CSkillInitWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A1EE4: using guessed type int (__thiscall *CSkillInitWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00591510) --------------------------------------------------------
char __thiscall CSkillInitWin::Create(CSkillInitWin *this, PgFrameWork *pkFrameWork)
{
  CSkillInitWin *v2; // edi@1
  NiTexturePalette *v3; // esi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  char result; // al@9
  NiSourceTexture *v8; // eax@10
  PgSprData *v9; // eax@11
  D3DXCOLOR v10; // ST18_16@13
  char *v11; // eax@13
  NiNode *v12; // esi@14
  EditWin *v13; // esi@19
  NiRefObjectVtbl *v14; // ebx@19
  NiUnsharedGeometryGroup *v15; // eax@19
  PgWinBut *v16; // esi@19
  D3DXCOLOR v17; // ST18_16@19
  char *v18; // eax@19
  PgWinBut *v19; // esi@19
  D3DXCOLOR v20; // ST18_16@19
  char *v21; // eax@19
  NiSourceTexture *v22; // esi@19
  D3DXCOLOR v23; // ST10_16@23
  UIUtil ui; // [sp+20h] [bp-3Ch]@10
  unsigned int uiWidth; // [sp+34h] [bp-28h]@13
  unsigned int uiHeight; // [sp+38h] [bp-24h]@13
  int iXOff; // [sp+3Ch] [bp-20h]@4
  int iYOff; // [sp+40h] [bp-1Ch]@4
  int iLeft; // [sp+44h] [bp-18h]@11
  int iTop; // [sp+48h] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+4Ch] [bp-10h]@1
  int v32; // [sp+58h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v32 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\ProductSkillReload.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iXOff, &iYOff, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "ProductInitWin", 0) )
  {
    v6 = spNode.m_pObject;
    v32 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v32) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, iXOff, iYOff);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  UIUtil::CreateSpr(&ui, "Panel01", 0);
  v8 = MenuTexMgr::GetTexture(0x13u);
  if ( v8 )
    v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, v8);
  else
    v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft - iXOff, iTop - iYOff, v9, (PgWin *)&v2->vfptr, 0, 0);
  UIUtil::CreateSpr(&ui, "IconSlot", 0);
  UIUtil::CreateSpr(&ui, "Plane", 0);
  *(_QWORD *)&v10.r = *(_QWORD *)&Color::m_kDxWinTitleColor.r;
  *(_QWORD *)&v10.b = *(_QWORD *)&Color::m_kDxWinTitleColor.b;
  v11 = (char *)TextData::Get(0xE90AE6F0);
  UIUtil::CreateTextNoSpr(&ui, "WinTitle", v11, v10, 5u);
  UIUtil::CreateSpr(&ui, "IconSlotBox01", 0);
  UIUtil::CreateCloseBtn(&ui, "ClsNor", "ClsOver", "ClsClick");
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "IconTxt01_", &iLeft, &iTop, &uiWidth, &uiHeight) )
  {
    v13 = EditWin::CreateWin(iLeft, iTop + 4, uiWidth, uiHeight, (PgWin *)&v2->vfptr, MULTILINE, 0x64u, 1u, 1, 0, 1);
    EditWin::SetImeStatus(v13, IS_KOREAN);
    v14 = v13->vfptr;
    v15 = TextData::Get(0xD60A3048);
    v14[115].__vecDelDtor((NiRefObject *)v13, (unsigned int)v15);
    EditWin::SetEnable(v13, 0);
    v16 = UIUtil::CreateBtn(&ui, 1u, "Btn01Nor", "Btn01Over", "Btn01Click", 0, 0);
    *(_QWORD *)&v17.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v17.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v18 = (char *)TextData::Get(0x9912DBF5);
    UIUtil::CreateAttachedText((PgWin *)&v16->vfptr, v18, v17, 5u);
    v19 = UIUtil::CreateBtn(&ui, 2u, "Btn02Nor", "Btn02Over", "Btn02Click", 0, 0);
    *(_QWORD *)&v20.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v20.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v21 = (char *)TextData::Get(0x88A297E1);
    UIUtil::CreateAttachedText((PgWin *)&v19->vfptr, v21, v20, 5u);
    v22 = MenuTexMgr::GetTexture(4u);
    if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
      UIUtil::CreateBtn(&ui, 3u, "HelpLinkNor", "HelpLinkOver", "HelpLinkClick", 0, v22);
    if ( PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "IconSlot01",
           &iLeft,
           &iTop,
           &uiWidth,
           &uiHeight) )
    {
      v2->m_akSelectedSkill.pkSlot = IconSlotWin::CreateWin(iLeft - iXOff, iTop - iYOff, (PgWin *)&v2->vfptr);
      *(_QWORD *)&v23.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v23.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v2->m_akSelectedSkill.pkTitle = (PgWinText *)UIUtil::CreateText(&ui, "IconTxt01", byte_9A1D96, 0, v23, 5u, 0, 0);
      ((void (__thiscall *)(CSkillInitWin *))v2->vfptr[59].__vecDelDtor)(v2);
      LOBYTE(v32) = 0;
      UIUtil::~UIUtil(&ui);
      v32 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 1;
    }
    else
    {
      LOBYTE(v32) = 0;
      UIUtil::~UIUtil(&ui);
      v32 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 0;
    }
  }
  else
  {
    LOBYTE(v32) = 0;
    UIUtil::~UIUtil(&ui);
    v12 = spNode.m_pObject;
    v32 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v12 )
      v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005919E0) --------------------------------------------------------
void __thiscall CSkillInitWin::DirectMessage(CSkillInitWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  CSkillInitWin *v4; // esi@1
  unsigned __int16 v5; // ax@9
  unsigned __int16 v6; // ax@12
  ProduceViewInfo *v7; // eax@13

  v4 = this;
  if ( iMsgTag == 22 )
  {
    if ( *(_DWORD *)(*(_DWORD *)pvBody + 16) == 1 )
    {
      v6 = *(_WORD *)(*(_DWORD *)pvBody + 20);
      if ( (unsigned __int16)(v6 - 29100) <= 0x64u )
      {
        *((_BYTE *)pvBody + 12) = 1;
        v7 = ProduceViewInfoTable::GetByID(v6);
        if ( v7 )
          (*(void (__stdcall **)(_DWORD))(*(_DWORD *)LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[0][2]) + 472))(v7->Name);
      }
    }
  }
  else if ( iMsgTag == 27 && pvBody )
  {
    if ( *(_DWORD *)pvBody )
    {
      if ( *(_DWORD *)pvBody == 1 )
      {
        if ( LOBYTE(this->m_kEffectList.m_kAllocator.m_uiCount) )
        {
          IconSlotWin::GetSkill((IconSlotWin *)LODWORD(this->m_kWorld.m_Rotate.m_pEntry[1][0]));
          v5 = IconSlotWin::GetSkill((IconSlotWin *)LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[1][0]));
          if ( ProduceViewInfoTable::GetByID(v5) )
            LOBYTE(v4->m_kEffectList.m_kAllocator.m_uiCount) = 0;
        }
      }
    }
    else if ( LOBYTE(this->m_kEffectList.m_kAllocator.m_uiCount) )
    {
      *(_WORD *)((char *)&pvBody + 1) = IconSlotWin::GetSkill((IconSlotWin *)LODWORD(this->m_kWorld.m_Rotate.m_pEntry[1][0]));
      LOBYTE(pvBody) = v4->m_kEffectList.m_pkTail;
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x12u, 0x24u, &pvBody, 3);
      LOBYTE(v4->m_kEffectList.m_kAllocator.m_uiCount) = 0;
      PgWin::PostMsg((PgWin *)&v4[-1].m_kBound, 1u, 0, 0);
    }
  }
}

//----- (00591AE0) --------------------------------------------------------
void __thiscall CSkillInitWin::OnCommand(CSkillInitWin *this, unsigned int wParam, int lParam)
{
  CSkillInitWin *v3; // esi@1
  GameFrameWork *v4; // eax@4
  IconSlotWin *v5; // ecx@9
  unsigned __int16 v6; // ax@9
  ProduceViewInfo *v7; // eax@9
  int v8; // ST0C_4@10
  char *v9; // eax@10
  char *v10; // eax@10
  MsgBox *v11; // eax@10

  v3 = this;
  switch ( wParam )
  {
    case 1u:
      if ( IconSlotWin::GetSkill(this->m_akSelectedSkill.pkSlot) != -1 && v3->m_byItemSlot != 0xFFFF )
      {
        v5 = v3->m_akSelectedSkill.pkSlot;
        v3->m_bReloadAgree = 1;
        v6 = IconSlotWin::GetSkill(v5);
        v7 = ProduceViewInfoTable::GetByID(v6);
        if ( v7 )
        {
          v8 = (int)v7->Name;
          v9 = (char *)TextData::Get(0x4DA87B87u);
          v10 = fs(v9, v8);
          v11 = MsgBox::Modeless(MSGBOX_OKCANCEL, v10);
          ((void (__stdcall *)(_DWORD))v11->vfptr->SetMsgHooker)(&v3->vfptr);
        }
      }
      break;
    case 2u:
      PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
      break;
    case 3u:
      v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v4 )
        GameFrameWork::OpenPlayGuideSearchList(v4, "ProductSkillReload");
      break;
  }
}

//----- (00591BB0) --------------------------------------------------------
void __thiscall CSkillInitWin::OnShowWin(CSkillInitWin *this)
{
  CSkillInitWin *v1; // esi@1
  IconSlotWin *v2; // eax@1
  NiRefObjectVtbl *v3; // edi@1
  NiUnsharedGeometryGroup *v4; // eax@1

  v1 = this;
  v2 = this->m_akSelectedSkill.pkSlot;
  this->m_byItemSlot = 255;
  v2->m_bDroppable = 1;
  IconSlotWin::Clear(this->m_akSelectedSkill.pkSlot);
  v3 = v1->m_akSelectedSkill.pkTitle->vfptr;
  v4 = TextData::Get(0x7DEEC8DDu);
  v3[118].__vecDelDtor((NiRefObject *)v1->m_akSelectedSkill.pkTitle, (unsigned int)v4);
}

//----- (00591C00) --------------------------------------------------------
CSkillInitWin *__cdecl CSkillInitWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  int v3; // eax@2
  PgWin *v4; // edi@8
  CSkillInitWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1C0u);
  v2 = v1;
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&CSkillInitWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&CSkillInitWin::`vftable'{for `IDirectMessenger'};
    v3 = (int)&v2[1].m_kLocal.m_Rotate.m_pEntry[2][1];
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = &PgWinDrop::`vftable';
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][2]) = 0;
    *(_DWORD *)v3 = &DropContents::`vftable';
    *(_WORD *)(v3 + 60) = -1;
    *(_DWORD *)(v3 + 64) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][1]) = (char *)v2 + 368;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v5 = (CSkillInitWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v5 = 0;
  }
  return v5;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9A1EC8: using guessed type void (__thiscall *CSkillInitWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A1EE4: using guessed type int (__thiscall *CSkillInitWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00591D70) --------------------------------------------------------
CSkillInitWin *__thiscall CSkillInitWin::`vector deleting destructor'(CSkillInitWin *this, unsigned int a2)
{
  CSkillInitWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&CSkillInitWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CSkillInitWin::`vftable'{for `IDirectMessenger'};
  this->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  this->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9A1EC8: using guessed type void (__thiscall *CSkillInitWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A1EE4: using guessed type int (__thiscall *CSkillInitWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00591DC0) --------------------------------------------------------
void __thiscall PointPool::Init(PointPool *this, int iPoint, int iAntiPoint)
{
  this->m_iTotalPoint = iPoint;
  this->m_iAntiTotalPoint = iAntiPoint;
}

//----- (00591DE0) --------------------------------------------------------
int __thiscall PointPool::GetPoint(PointPool *this)
{
  return this->m_iTotalPoint;
}

//----- (00591DF0) --------------------------------------------------------
int __thiscall PointPool::GetAntiPoint(PointPool *this)
{
  return this->m_iAntiTotalPoint;
}

//----- (00591E00) --------------------------------------------------------
void __thiscall PointOccupier::PointOccupier(PointOccupier *this)
{
  this->m_pkPool = 0;
  this->m_iPoint = 0;
  this->m_iLowerLimit = 0;
  this->m_iUpperLimit = 20000;
  this->m_iPointCount = 0;
}

//----- (00591E20) --------------------------------------------------------
void __thiscall PointOccupier::SetPool(PointOccupier *this, PointPool *pkPool)
{
  this->m_pkPool = pkPool;
}

//----- (00591E30) --------------------------------------------------------
void __thiscall PointOccupier::Init(PointOccupier *this, int iLowerLimit, int iUpperLimit)
{
  this->m_iLowerLimit = iLowerLimit;
  this->m_iPoint = iLowerLimit;
  this->m_iUpperLimit = iUpperLimit;
}

//----- (00591E50) --------------------------------------------------------
void __thiscall PointOccupier::Inc(PointOccupier *this)
{
  PointPool *v1; // edx@1

  v1 = this->m_pkPool;
  if ( v1->m_iTotalPoint > 0 && this->m_iPoint < this->m_iUpperLimit )
  {
    if ( this->m_iPoint < this->m_iLowerLimit )
      ++v1->m_iAntiTotalPoint;
    --this->m_pkPool->m_iTotalPoint;
    ++this->m_iPoint;
    ++this->m_iPointCount;
  }
}

//----- (00591E80) --------------------------------------------------------
void __thiscall PointOccupier::Dec(PointOccupier *this)
{
  int v1; // eax@1
  bool v2; // zf@2
  bool v3; // sf@2
  unsigned __int8 v4; // of@2
  PointPool *v5; // eax@2

  v1 = this->m_iPoint;
  if ( this->m_iPoint > 0 )
  {
    v4 = __OFSUB__(v1, this->m_iLowerLimit);
    v2 = v1 == this->m_iLowerLimit;
    v3 = v1 - this->m_iLowerLimit < 0;
    v5 = this->m_pkPool;
    if ( (unsigned __int8)(v3 ^ v4) | v2 )
    {
      if ( v5->m_iAntiTotalPoint > 0 )
      {
        ++v5->m_iTotalPoint;
        --this->m_pkPool->m_iAntiTotalPoint;
        --this->m_iPoint;
        --this->m_iPointCount;
      }
    }
    else
    {
      ++v5->m_iTotalPoint;
      --this->m_iPoint;
      --this->m_iPointCount;
    }
  }
}

//----- (00591EB0) --------------------------------------------------------
int __thiscall PointOccupier::GetPoint(PointOccupier *this)
{
  return this->m_iPoint;
}

//----- (00591EC0) --------------------------------------------------------
int __thiscall PointOccupier::GetPointCount(PointOccupier *this)
{
  return this->m_iPointCount;
}

//----- (00591ED0) --------------------------------------------------------
void __thiscall PointOccupier::ReSetPointCount(PointOccupier *this)
{
  this->m_iPointCount = 0;
}

//----- (00591EE0) --------------------------------------------------------
int __thiscall PointOccupier::GetUpperLimit(PointOccupier *this)
{
  return this->m_iUpperLimit;
}

//----- (00591EF0) --------------------------------------------------------
void __thiscall SkillPowerIconWin::SkillPowerIconWin(SkillPowerIconWin *this)
{
  SkillPowerIconWin *v1; // esi@1

  v1 = this;
  SkillIcon::SkillIcon((SkillIcon *)&this->vfptr);
  v1->m_kSkillID = -1;
  v1->vfptr = (NiRefObjectVtbl *)&SkillPowerIconWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&SkillPowerIconWin::`vftable'{for `IDirectMessenger'};
}
// 9A2468: using guessed type void (__thiscall *SkillPowerIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A2484: using guessed type int (__thiscall *SkillPowerIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00591F20) --------------------------------------------------------
void __thiscall SkillPowerIconWin::~SkillPowerIconWin(SkillPowerIconWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&SkillPowerIconWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SkillPowerIconWin::`vftable'{for `IDirectMessenger'};
  SkillIcon::~SkillIcon((SkillIcon *)&this->vfptr);
}
// 9A2468: using guessed type void (__thiscall *SkillPowerIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A2484: using guessed type int (__thiscall *SkillPowerIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00591F40) --------------------------------------------------------
void __thiscall SkillPowerIconWin::UpdateMeWin(SkillPowerIconWin *this, float fCurTime)
{
  IconWin::UpdateMeWin((IconWin *)&this->vfptr, fCurTime);
}

//----- (00591F60) --------------------------------------------------------
bool __thiscall SkillPowerIconWin::Create(SkillPowerIconWin *this, int iXPos, int iYPos, PgWin *pkParent)
{
  return SkillIcon::Create((SkillIcon *)&this->vfptr, iXPos, iYPos, pkParent) != 0;
}

//----- (00591F80) --------------------------------------------------------
unsigned __int16 __thiscall SkillPowerIconWin::GetSkillID(SkillPowerIconWin *this)
{
  return this->m_kSkillID;
}

//----- (00591F90) --------------------------------------------------------
void __thiscall SkillPowerIconWin::OnFirstHitWin(SkillPowerIconWin *this)
{
  SkillPowerIconWin *v1; // esi@1
  Skill::EmpowerInfo *v2; // ST08_4@1
  unsigned __int16 v3; // ST00_2@1
  SkillInfoWin *v4; // ecx@1

  v1 = this;
  v2 = &this->m_kEmpowerInfo;
  v3 = this->m_kSkillID;
  v4 = (SkillInfoWin *)g_pkSkillInfoWin;
  v1->m_pkToolTipWin = g_pkSkillInfoWin;
  SkillInfoWin::SetSkillInfo(v4, v3, 1, v2, 0);
  PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
}

//----- (00591FC0) --------------------------------------------------------
void __thiscall SkillPowerListItemWin::SkillPowerListItemWin(SkillPowerListItemWin *this)
{
  SkillPowerListItemWin *v1; // esi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&SkillPowerListItemWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&SkillPowerListItemWin::`vftable'{for `IDirectMessenger'};
  v1->m_kCurrPoint.m_pkPool = 0;
  v1->m_kCurrPoint.m_iPoint = 0;
  v1->m_kCurrPoint.m_iLowerLimit = 0;
  v1->m_kCurrPoint.m_iPointCount = 0;
  v1->m_kCurrPoint.m_iUpperLimit = 20000;
  v1->m_pkIconWin = 0;
}
// 9A26EC: using guessed type void (__thiscall *SkillPowerListItemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A270C: using guessed type int (__thiscall *SkillPowerListItemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00592010) --------------------------------------------------------
void __thiscall SkillPowerListItemWin::~SkillPowerListItemWin(SkillPowerListItemWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&SkillPowerListItemWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SkillPowerListItemWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
}
// 9A26EC: using guessed type void (__thiscall *SkillPowerListItemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A270C: using guessed type int (__thiscall *SkillPowerListItemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00592030) --------------------------------------------------------
void __thiscall SkillPowerListItemWin::OnCommand(SkillPowerListItemWin *this, unsigned int wParam, int lParam)
{
  int v3; // eax@4
  bool v4; // zf@5
  bool v5; // sf@5
  unsigned __int8 v6; // of@5
  PointPool *v7; // eax@5
  PointPool *v8; // edx@10
  int v9; // eax@11

  if ( wParam == 9 )
  {
    if ( this->m_kCurrPoint.m_iPoint < 5 )
    {
      v8 = this->m_kCurrPoint.m_pkPool;
      if ( v8->m_iTotalPoint > 0 )
      {
        v9 = this->m_kCurrPoint.m_iPoint;
        if ( v9 < this->m_kCurrPoint.m_iUpperLimit )
        {
          if ( v9 < this->m_kCurrPoint.m_iLowerLimit )
            ++v8->m_iAntiTotalPoint;
          --this->m_kCurrPoint.m_pkPool->m_iTotalPoint;
          ++this->m_kCurrPoint.m_iPoint;
          ++this->m_kCurrPoint.m_iPointCount;
        }
      }
    }
  }
  else if ( wParam == 10 && this->m_kCurrPoint.m_iPoint > 0 )
  {
    v3 = this->m_kCurrPoint.m_iPoint;
    if ( v3 > 0 )
    {
      v6 = __OFSUB__(v3, this->m_kCurrPoint.m_iLowerLimit);
      v4 = v3 == this->m_kCurrPoint.m_iLowerLimit;
      v5 = v3 - this->m_kCurrPoint.m_iLowerLimit < 0;
      v7 = this->m_kCurrPoint.m_pkPool;
      if ( (unsigned __int8)(v5 ^ v6) | v4 )
      {
        if ( v7->m_iAntiTotalPoint > 0 )
        {
          ++v7->m_iTotalPoint;
          --this->m_kCurrPoint.m_pkPool->m_iAntiTotalPoint;
          --this->m_kCurrPoint.m_iPoint;
          --this->m_kCurrPoint.m_iPointCount;
        }
      }
      else
      {
        ++v7->m_iTotalPoint;
        --this->m_kCurrPoint.m_iPoint;
        --this->m_kCurrPoint.m_iPointCount;
      }
    }
  }
}

//----- (005920F0) --------------------------------------------------------
void __thiscall SkillPowerListItemWin::SetPoint(SkillPowerListItemWin *this, int iPoint, int iMaxPoint)
{
  this->m_kCurrPoint.m_iLowerLimit = iPoint;
  this->m_kCurrPoint.m_iPoint = iPoint;
  this->m_kCurrPoint.m_iUpperLimit = iMaxPoint;
}

//----- (00592110) --------------------------------------------------------
PointOccupier *__thiscall SkillPowerListItemWin::GetPointOccupier(SkillPowerListItemWin *this)
{
  return &this->m_kCurrPoint;
}

//----- (00592120) --------------------------------------------------------
int __thiscall SkillPowerListItemWin::GetPoint(SkillPowerListItemWin *this)
{
  return this->m_kCurrPoint.m_iPoint;
}

//----- (00592130) --------------------------------------------------------
void __thiscall SkillPowerListItemWin::CheckPossibleEmpower(SkillPowerListItemWin *this, bool b)
{
  bool v2; // zf@2
  IconWin *v3; // ecx@2

  if ( b )
  {
    v2 = this->m_kCurrPoint.m_iUpperLimit == 0;
    v3 = this->m_pkIconWin;
    if ( v2 )
    {
      IconWin::IconDisable(v3, 1);
      return;
    }
  }
  else
  {
    v3 = this->m_pkIconWin;
  }
  IconWin::IconDisable(v3, 0);
}

//----- (00592170) --------------------------------------------------------
void __thiscall SkillPowerWin::SkillPowerWin(SkillPowerWin *this)
{
  SkillPowerWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&SkillPowerWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&SkillPowerWin::`vftable'{for `IDirectMessenger'};
  v1->m_apkListItemWin[0] = 0;
  v1->m_apkListItemWin[1] = 0;
  v1->m_apkListItemWin[2] = 0;
  v1->m_apkListItemWin[3] = 0;
  v1->m_pkSkillIconWin = 0;
  v1->m_pkSkillNameText = 0;
  v1->m_bSkillPowerSuccess = 0;
}
// 9A28D8: using guessed type void (__thiscall *SkillPowerWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A28F4: using guessed type int (__thiscall *SkillPowerWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005921C0) --------------------------------------------------------
void __thiscall SkillPowerWin::~SkillPowerWin(SkillPowerWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&SkillPowerWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SkillPowerWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9A28D8: using guessed type void (__thiscall *SkillPowerWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A28F4: using guessed type int (__thiscall *SkillPowerWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005921E0) --------------------------------------------------------
void __thiscall SkillPowerWin::OnCancel(SkillPowerWin *this)
{
  SkillPowerWin *v1; // esi@1
  unsigned int v2; // eax@1
  int v3; // ecx@1
  int v4; // esi@1
  signed int v5; // edi@1

  v1 = this;
  this->m_kInitialEmpowerValue.m_iRestPoint = Skill::GetRestEmpowerPoint();
  v2 = Inventory::GetSkillEmpowerInitialPoint(&g_kInventory);
  v3 = v1->m_kInitialEmpowerValue.m_iRestPoint;
  v1->m_kPointPool.m_iAntiTotalPoint = v2;
  v1->m_kPointPool.m_iTotalPoint = v3;
  ((void (__stdcall *)(_DWORD))v1->m_pkSkillIconWin->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkSkillNameText->vfptr[118].__vecDelDtor)(&unk_9A211B);
  v4 = (int)v1->m_apkListItemWin;
  v5 = 4;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 248))(0);
    IconWin::IconDisable(*(IconWin **)(*(_DWORD *)v4 + 316), 0);
    v4 += 4;
    --v5;
  }
  while ( v5 );
}

//----- (00592270) --------------------------------------------------------
void __thiscall SkillPowerWin::OnClose(SkillPowerWin *this)
{
  SkillPowerWin *v1; // esi@1
  int v2; // esi@1
  signed int v3; // edi@1

  v1 = this;
  PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
  v2 = (int)v1->m_apkListItemWin;
  v3 = 4;
  do
  {
    IconWin::IconDisable(*(IconWin **)(*(_DWORD *)v2 + 316), 0);
    v2 += 4;
    --v3;
  }
  while ( v3 );
}

//----- (005922C0) --------------------------------------------------------
void __thiscall SkillPowerWin::OnShowWin(SkillPowerWin *this)
{
  SkillPowerWin *v1; // esi@1
  unsigned int v2; // eax@1
  int v3; // ecx@1
  int v4; // esi@1
  signed int v5; // edi@1

  v1 = this;
  PgWin::OnShowWin((PgWin *)&this->vfptr);
  v1->m_kInitialEmpowerValue.m_iRestPoint = Skill::GetRestEmpowerPoint();
  v2 = Inventory::GetSkillEmpowerInitialPoint(&g_kInventory);
  v3 = v1->m_kInitialEmpowerValue.m_iRestPoint;
  v1->m_kPointPool.m_iAntiTotalPoint = v2;
  v1->m_kPointPool.m_iTotalPoint = v3;
  ((void (__stdcall *)(_DWORD))v1->m_pkSkillIconWin->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkSkillNameText->vfptr[118].__vecDelDtor)(&unk_9A2132);
  v4 = (int)v1->m_apkListItemWin;
  v5 = 4;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 248))(0);
    v4 += 4;
    --v5;
  }
  while ( v5 );
}

//----- (00592340) --------------------------------------------------------
void __thiscall SkillPowerWin::SetSkillPowerSuccess(SkillPowerWin *this, bool b)
{
  this->m_bSkillPowerSuccess = b;
  this->m_apkListItemWin[0]->m_kCurrPoint.m_iPointCount = 0;
  this->m_apkListItemWin[1]->m_kCurrPoint.m_iPointCount = 0;
  this->m_apkListItemWin[2]->m_kCurrPoint.m_iPointCount = 0;
  this->m_apkListItemWin[3]->m_kCurrPoint.m_iPointCount = 0;
}

//----- (00592390) --------------------------------------------------------
void SkillPowerWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "ChrSkillPwr");
}

//----- (005923C0) --------------------------------------------------------
void __thiscall SkillPowerWin::OnReset(SkillPowerWin *this)
{
  SkillPowerWin *v1; // esi@1
  int v2; // ebx@2
  int v3; // edi@2
  int *v4; // eax@4
  int v5; // eax@5
  char v6; // cl@6
  char v7; // dl@6
  char v8; // bl@6
  char v9; // al@6
  SkillIcon *v10; // ecx@6
  char v11; // dl@6
  char v12; // al@6
  char v13; // bl@6
  unsigned int v14; // eax@6
  int v15; // edx@6
  int v16; // ecx@6
  SkillPowerListItemWin *v17; // eax@6
  int v18; // ecx@6
  SkillPowerListItemWin *v19; // eax@6
  int v20; // ecx@6
  SkillPowerListItemWin *v21; // eax@6
  int v22; // edx@6
  int v23; // eax@6
  SkillPowerListItemWin *v24; // esi@6
  Skill::EmpowerInfo kEmpowerInfo; // [sp+4h] [bp-8h]@6
  Skill::EmpowerInfo kMaxEmpowerInfo; // [sp+8h] [bp-4h]@6

  v1 = this;
  if ( (unsigned __int8)((int (*)(void))this->m_pkSkillIconWin->vfptr[65].__vecDelDtor)() )
  {
    v2 = v1->m_pkSkillIconWin->m_kSkillID;
    v3 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                          + 16))(
                            ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                            v2) )
    {
      if ( (unsigned __int16)v2 <= *(_WORD *)(v3 + 200) )
      {
        v4 = (int *)(*(_DWORD *)(v3 + 196) + 4 * v2);
        if ( *v4 )
        {
          v5 = *v4;
          if ( v5 )
          {
            v6 = *(_BYTE *)(v5 + 431);
            v7 = *(_BYTE *)(v5 + 435);
            v8 = *(_BYTE *)(v5 + 439);
            v9 = *(_BYTE *)(v5 + 443);
            kMaxEmpowerInfo.cDamageUp = v6;
            v10 = (SkillIcon *)&v1->m_pkSkillIconWin->vfptr;
            kMaxEmpowerInfo.cSmallSp = v7;
            kMaxEmpowerInfo.cShortCoolTime = v9;
            SkillIcon::GetTotalAccumulatedEmpowerInfo(v10, &kEmpowerInfo);
            v11 = v1->m_kInitialEmpowerValue.m_kEmpower.cSmallSp + kMaxEmpowerInfo.cSmallSp - kEmpowerInfo.cSmallSp;
            v12 = v1->m_kInitialEmpowerValue.m_kEmpower.cShortCoolTime
                + kMaxEmpowerInfo.cShortCoolTime
                - kEmpowerInfo.cShortCoolTime;
            v13 = v1->m_kInitialEmpowerValue.m_kEmpower.cLongKeepTime + v8 - kEmpowerInfo.cLongKeepTime;
            kMaxEmpowerInfo.cDamageUp = v1->m_kInitialEmpowerValue.m_kEmpower.cDamageUp
                                      + kMaxEmpowerInfo.cDamageUp
                                      - kEmpowerInfo.cDamageUp;
            kMaxEmpowerInfo.cSmallSp = v11;
            kMaxEmpowerInfo.cShortCoolTime = v12;
            v14 = Inventory::GetSkillEmpowerInitialPoint(&g_kInventory);
            v1->m_kPointPool.m_iTotalPoint = v1->m_kInitialEmpowerValue.m_iRestPoint;
            v15 = kMaxEmpowerInfo.cSmallSp;
            v1->m_kPointPool.m_iAntiTotalPoint = v14;
            v16 = v1->m_kInitialEmpowerValue.m_kEmpower.cDamageUp;
            v17 = v1->m_apkListItemWin[0];
            v17->m_kCurrPoint.m_iLowerLimit = v16;
            v17->m_kCurrPoint.m_iPoint = v16;
            v17->m_kCurrPoint.m_iUpperLimit = kMaxEmpowerInfo.cDamageUp;
            v18 = v1->m_kInitialEmpowerValue.m_kEmpower.cSmallSp;
            v19 = v1->m_apkListItemWin[1];
            v19->m_kCurrPoint.m_iLowerLimit = v18;
            v19->m_kCurrPoint.m_iPoint = v18;
            v19->m_kCurrPoint.m_iUpperLimit = v15;
            v20 = v1->m_kInitialEmpowerValue.m_kEmpower.cLongKeepTime;
            v21 = v1->m_apkListItemWin[2];
            v22 = kMaxEmpowerInfo.cShortCoolTime;
            v21->m_kCurrPoint.m_iLowerLimit = v20;
            v21->m_kCurrPoint.m_iPoint = v20;
            v21->m_kCurrPoint.m_iUpperLimit = v13;
            v23 = v1->m_kInitialEmpowerValue.m_kEmpower.cShortCoolTime;
            v24 = v1->m_apkListItemWin[3];
            v24->m_kCurrPoint.m_iLowerLimit = v23;
            v24->m_kCurrPoint.m_iPoint = v23;
            v24->m_kCurrPoint.m_iUpperLimit = v22;
          }
        }
      }
    }
  }
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (00592550) --------------------------------------------------------
void __thiscall SkillPowerWin::UpdateMeWin(SkillPowerWin *this, float fCurTime)
{
  SkillPowerWin *v2; // esi@1
  Skill::EmpowerInfo kInfo; // [sp+4h] [bp-4h]@0

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->m_apkListItemWin[0]->vfptr[61].__vecDelDtor)() )
    kInfo.cDamageUp = v2->m_apkListItemWin[0]->m_kCurrPoint.m_iPoint;
  if ( (unsigned __int8)((int (*)(void))v2->m_apkListItemWin[1]->vfptr[61].__vecDelDtor)() )
    kInfo.cSmallSp = v2->m_apkListItemWin[1]->m_kCurrPoint.m_iPoint;
  if ( (unsigned __int8)((int (*)(void))v2->m_apkListItemWin[2]->vfptr[61].__vecDelDtor)() )
    kInfo.cLongKeepTime = v2->m_apkListItemWin[2]->m_kCurrPoint.m_iPoint;
  if ( (unsigned __int8)((int (*)(void))v2->m_apkListItemWin[3]->vfptr[61].__vecDelDtor)() )
    kInfo.cShortCoolTime = v2->m_apkListItemWin[3]->m_kCurrPoint.m_iPoint;
  Skill::SetRestEmpowerPointInEdit(v2->m_kPointPool.m_iTotalPoint);
  Skill::SetAntiEmpowerPointInEdit(v2->m_kPointPool.m_iAntiTotalPoint);
  if ( v2->m_bSkillPowerSuccess )
  {
    ((void (__stdcall *)(_DWORD))v2->m_pkSkillIconWin->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkSkillNameText->vfptr[118].__vecDelDtor)(&unk_9A2133);
  }
  SkillIcon::SetEmpowerInfo((SkillIcon *)&v2->m_pkSkillIconWin->vfptr, kInfo);
}

//----- (00592650) --------------------------------------------------------
void __thiscall SkillPowerWin::OnSlideBarContent(SkillPowerWin *this)
{
  SkillPowerWin *v1; // esi@1

  v1 = this;
  this->m_pListWinContent->m_nViewStartPos = this->m_pSlideBar->m_nCurPos;
  SlideListWin::UpdateViewList(this->m_pListWinContent);
  SlideBar::SetSplitCnt(v1->m_pSlideBar, v1->m_pListWinContent->m_nSlideSplitCnt);
}

//----- (00592690) --------------------------------------------------------
char __thiscall SkillPowerIconWin::SetSkill(SkillPowerIconWin *this, int SkillID)
{
  SkillPowerIconWin *v2; // edi@1
  int v3; // esi@1
  unsigned __int16 v4; // ax@4
  PgWin *v5; // eax@5
  char result; // al@5

  v2 = this;
  this->m_kSkillID = SkillID;
  v3 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                              + 16))(
                          ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                          SkillID)
    && (unsigned __int16)SkillID <= *(_WORD *)(v3 + 200)
    && *(_DWORD *)(*(_DWORD *)(v3 + 196) + 4 * (unsigned __int16)SkillID)
    && (v4 = v2->m_kSkillID, v4 < 0x4E20u) )
  {
    SkillIcon::SetSkill((SkillIcon *)&v2->vfptr, v4);
    v5 = PgWin::GetParentWin((PgWin *)&v2->vfptr);
    PgWin::PostCommandMsg(v5, 0xCu, 0);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (00592710) --------------------------------------------------------
char __thiscall SkillPowerIconWin::EatDropReference(SkillPowerIconWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  SkillPowerIconWin *v4; // esi@1
  void *v5; // eax@2
  int v6; // eax@4
  PgWin *v7; // eax@6
  char result; // al@6

  v4 = this;
  if ( *pkDrop
    && (v5 = (*pkDrop)->m_pkContents) != 0
    && *((_DWORD *)v5 + 2) == 2
    && (v6 = *((_DWORD *)v5 + 5),
        this->m_kSkillID = v6,
        IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::GetByID(v6))
    && v4->m_kSkillID < 0x4E20u )
  {
    SkillPowerIconWin::SetSkill(v4, v4->m_kSkillID);
    v7 = PgWin::GetParentWin((PgWin *)&v4->vfptr);
    PgWin::PostCommandMsg(v7, 0xCu, 0);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00592780) --------------------------------------------------------
char __thiscall SkillPowerListItemWin::Create(SkillPowerListItemWin *this, NiAVObject *pkGeom, int iXPos, int iYPos, unsigned int uiListIndex, SkillPowerListItemWin::CreateSpec *rkSpec, PgWin *pkParent)
{
  SkillPowerListItemWin *v7; // edi@1
  char result; // al@1
  char *v9; // ecx@3
  D3DXCOLOR v10; // ST30_16@5
  char *v11; // ecx@5
  D3DXCOLOR v12; // ST30_16@7
  PgSprData *v13; // eax@7
  PgWinSpr *v14; // ebx@7
  IconWin *v15; // eax@7
  unsigned int v16; // ST38_4@7
  UIUtil ui; // [sp+10h] [bp-24h]@2
  int uiLeft; // [sp+24h] [bp-10h]@7
  int v19; // [sp+30h] [bp-4h]@2

  v7 = this;
  result = PgWin::Create((PgWin *)&this->vfptr, 0, 0, 0x20u, 0x20u, pkParent, 0, 0);
  if ( result )
  {
    UIUtil::UIUtil(&ui);
    v19 = 0;
    UIUtil::SetParent(&ui, (PgWin *)&v7->vfptr);
    UIUtil::SetOffset(&ui, iXPos, iYPos);
    UIUtil::SetUIGeom(&ui, pkGeom);
    UIUtil::CreateBtn(
      &ui,
      9u,
      rkSpec->kInterface.pcUpNor,
      rkSpec->kInterface.pcUpFocus,
      rkSpec->kInterface.pcUpClick,
      0,
      0);
    UIUtil::CreateBtn(
      &ui,
      0xAu,
      rkSpec->kInterface.pcDownNor,
      rkSpec->kInterface.pcDownFocus,
      rkSpec->kInterface.pcDownClick,
      0,
      0);
    if ( rkSpec->kSkillPowerInfo.kDesc1._Myres < 0x10 )
      v9 = rkSpec->kSkillPowerInfo.kDesc1._Bx._Buf;
    else
      v9 = rkSpec->kSkillPowerInfo.kDesc1._Bx._Ptr;
    *(_QWORD *)&v10.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v10.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    UIUtil::CreateTextNoSpr(&ui, rkSpec->kInterface.pcDesc1, v9, v10, 0);
    v11 = rkSpec->kSkillPowerInfo.kDesc2._Bx._Buf;
    if ( rkSpec->kSkillPowerInfo.kDesc2._Myres >= 0x10 )
      v11 = *(char **)v11;
    *(_QWORD *)&v12.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v12.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    UIUtil::CreateTextNoSpr(&ui, rkSpec->kInterface.pcDesc2, v11, v12, 0);
    v13 = PgSprData::Create(pkGeom, rkSpec->kInterface.pcIcon, &uiLeft, (int *)&pkParent, 0);
    v14 = PgWinSpr::CreateWin(uiLeft - iXPos, (int)pkParent - iYPos, v13, (PgWin *)&v7->vfptr, 0, 0);
    MenuTexMgr::GetTexture(6u);
    v15 = IconWin::CreateWin(3, 3, 32, 32, (PgWin *)&v14->vfptr);
    v7->m_pkIconWin = v15;
    v16 = rkSpec->kSkillPowerInfo.uiIconImageIndex;
    ((void (__thiscall *)(IconWin *))v15->vfptr[146].__vecDelDtor)(v15);
    v7->m_kCurrPoint.m_pkPool = rkSpec->pkPointPool;
    v7->m_uiListIndex = uiListIndex;
    v19 = -1;
    UIUtil::~UIUtil(&ui);
    result = 1;
  }
  return result;
}

//----- (00592970) --------------------------------------------------------
void __thiscall SkillPowerWin::OnSkillDroped(SkillPowerWin *this)
{
  SkillPowerWin *v1; // esi@1
  int v2; // edi@1
  signed int v3; // ebx@1
  int v4; // ebx@3
  int v5; // edi@3
  int v6; // edx@5
  int v7; // eax@6
  Skill::EmpowerInfo *v8; // eax@9
  char v9; // cl@9
  char v10; // dl@9
  char v11; // bl@9
  int v12; // esi@9
  signed int v13; // edi@9
  Skill::EmpowerInfo result; // [sp+Ch] [bp-8h]@9
  SkillPowerListItemWin **v15; // [sp+10h] [bp-4h]@1

  v1 = this;
  ((void (__stdcall *)(signed int))this->m_pkSkillIconWin->vfptr[64].__vecDelDtor)(1);
  v2 = (int)v1->m_apkListItemWin;
  v15 = v1->m_apkListItemWin;
  v3 = 4;
  do
  {
    (*(void (__stdcall **)(signed int))(**(_DWORD **)v2 + 248))(1);
    v2 += 4;
    --v3;
  }
  while ( v3 );
  v4 = v1->m_pkSkillIconWin->m_kSkillID;
  v5 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                          v4)
    && (unsigned __int16)v4 <= *(_WORD *)(v5 + 200)
    && (v6 = *(_DWORD *)(v5 + 196), *(_DWORD *)(v6 + 4 * v4))
    && (v7 = *(_DWORD *)(v6 + 4 * v4)) != 0 )
  {
    ((void (__stdcall *)(int))v1->m_pkSkillNameText->vfptr[118].__vecDelDtor)(v7 + 34);
    v1->m_bSkillPowerSuccess = 0;
  }
  else
  {
    ((void (__stdcall *)(void *))v1->m_pkSkillNameText->vfptr[118].__vecDelDtor)(&unk_9A211A);
  }
  v8 = Skill::GetAccumulatedEmpowerInfo(&result, v1->m_pkSkillIconWin->m_kSkillID);
  v9 = v8->cDamageUp;
  v10 = v8->cLongKeepTime;
  v11 = v8->cShortCoolTime;
  LOBYTE(v8) = v8->cSmallSp;
  v1->m_kInitialEmpowerValue.m_kEmpower.cDamageUp = v9;
  v1->m_kInitialEmpowerValue.m_kEmpower.cLongKeepTime = v10;
  v1->m_kInitialEmpowerValue.m_kEmpower.cShortCoolTime = v11;
  v1->m_kInitialEmpowerValue.m_kEmpower.cSmallSp = (char)v8;
  v1->m_kInitialEmpowerValue.m_iRestPoint = Skill::GetRestEmpowerPoint();
  SkillPowerWin::OnReset(v1);
  v12 = (int)v15;
  v13 = 4;
  do
  {
    IconWin::IconDisable(*(IconWin **)(*(_DWORD *)v12 + 316), *(_DWORD *)(*(_DWORD *)v12 + 308) == 0);
    v12 += 4;
    --v13;
  }
  while ( v13 );
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (00592AB0) --------------------------------------------------------
void __thiscall SkillPowerWin::OnOk(SkillPowerWin *this)
{
  SkillPowerWin *v1; // esi@1
  __int16 v2; // cx@2
  char v3; // dl@2
  Skill::EmpowerInfo *v4; // eax@2
  signed int v5; // edx@2
  int v6; // edi@2
  char v7; // dl@7
  int v8; // esi@9
  NiUnsharedGeometryGroup *v9; // edi@9
  char v10; // dl@14
  char v11; // al@17
  char v12; // dl@20
  __int16 v13; // dx@25
  __int16 v14; // dx@25
  PgFrameWork *v15; // ecx@25
  PROTO_NC_SKILL_EMPOWALLOC_REQ kProto; // [sp+4h] [bp-18h]@2
  Skill::EmpowerInfo kEmpInfo; // [sp+Ch] [bp-10h]@2
  Skill::EmpowerInfo kMinusInfo; // [sp+10h] [bp-Ch]@2
  Skill::EmpowerInfo kPlusInfo; // [sp+14h] [bp-8h]@2
  char v20; // [sp+1Bh] [bp-1h]@20

  v1 = this;
  if ( (unsigned __int8)((int (*)(void))this->m_pkSkillIconWin->vfptr[65].__vecDelDtor)() )
  {
    v4 = SkillIcon::GetEmpowerInfo((SkillIcon *)&v1->m_pkSkillIconWin->vfptr, (Skill::EmpowerInfo *)&kProto.plus);
    LOBYTE(v2) = v4->cDamageUp;
    kEmpInfo.cLongKeepTime = v4->cLongKeepTime;
    v3 = v4->cShortCoolTime;
    LOBYTE(v4) = v4->cSmallSp;
    kEmpInfo.cShortCoolTime = v3;
    v5 = 0;
    kPlusInfo = 0;
    kMinusInfo = 0;
    *(_DWORD *)&kProto.skill = 0;
    v6 = (int)v1->m_apkListItemWin;
    while ( 1 )
    {
      if ( !*(_DWORD *)(*(_DWORD *)v6 + 312) )
        ++*(_DWORD *)&kProto.skill;
      if ( *(_DWORD *)&kProto.skill == 4 )
        break;
      ++v5;
      v6 += 4;
      if ( v5 >= 4 )
      {
        v7 = v1->m_kInitialEmpowerValue.m_kEmpower.cDamageUp;
        if ( (char)v2 <= v7 )
          kMinusInfo.cDamageUp = v7 - v2;
        else
          kPlusInfo.cDamageUp = v2 - v7;
        v10 = v1->m_kInitialEmpowerValue.m_kEmpower.cSmallSp;
        if ( (char)v4 <= v10 )
          kMinusInfo.cSmallSp = v10 - (_BYTE)v4;
        else
          kPlusInfo.cSmallSp = (_BYTE)v4 - v10;
        v11 = v1->m_kInitialEmpowerValue.m_kEmpower.cLongKeepTime;
        if ( kEmpInfo.cLongKeepTime <= v11 )
        {
          LOBYTE(v4) = (_BYTE)v4 - kEmpInfo.cLongKeepTime;
          LOBYTE(v2) = kPlusInfo.cLongKeepTime;
          kMinusInfo.cLongKeepTime = (char)v4;
        }
        else
        {
          LOBYTE(v2) = kEmpInfo.cLongKeepTime - (_BYTE)v4;
          LOBYTE(v4) = kMinusInfo.cLongKeepTime;
          kPlusInfo.cLongKeepTime = v2;
        }
        v12 = v1->m_kInitialEmpowerValue.m_kEmpower.cShortCoolTime;
        v20 = v12;
        if ( kEmpInfo.cShortCoolTime <= v12 )
          kMinusInfo.cShortCoolTime = v12 - kEmpInfo.cShortCoolTime;
        else
          kPlusInfo.cShortCoolTime = kEmpInfo.cShortCoolTime - v12;
        if ( *(_DWORD *)&kPlusInfo || *(_DWORD *)&kMinusInfo )
        {
          kProto.skill = v1->m_pkSkillIconWin->m_kSkillID;
          v13 = v2 & 0xF;
          LOBYTE(v2) = kPlusInfo.cSmallSp & 0xF;
          kProto.plus = (SKILL_EMPOWER)(kPlusInfo.cDamageUp & 0xF | 16
                                                                  * ((kPlusInfo.cShortCoolTime << 8) | (v2 | 16 * v13) & 0xFF));
          v14 = (unsigned __int8)v4 & 0xF;
          LOBYTE(v4) = kMinusInfo.cSmallSp & 0xF;
          v15 = v1->m_pkFrameWork;
          kProto.minus = (SKILL_EMPOWER)(kMinusInfo.cDamageUp & 0xF | 16
                                                                    * ((kMinusInfo.cShortCoolTime << 8) | ((unsigned __int16)v4 | 16 * v14) & 0xFF));
          GameFrameWork::NcSkillEmpowallocReq(&kProto);
        }
        return;
      }
    }
    v8 = (int)&v1->vfptr;
    v9 = TextData::Get(0x8BB8CFEE);
    if ( *(_DWORD *)(v8 + 4) )
    {
      (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v8 + 4) + 4))(25, v9, v8);
      if ( *(_DWORD *)(v8 + 4) )
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v8 + 4) + 20))(25, v9, v8);
    }
    (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v8 + 20))(v8, 25, v9, v8);
  }
}

//----- (00592CA0) --------------------------------------------------------
void __thiscall SkillPowerWin::SetEmpowerSkill(SkillPowerWin *this, int SkillID)
{
  SkillPowerIconWin *v2; // ecx@1

  v2 = this->m_pkSkillIconWin;
  if ( v2 )
    SkillPowerIconWin::SetSkill(v2, SkillID);
}

//----- (00592CC0) --------------------------------------------------------
void __thiscall SkillPowerWin::OnCommand(SkillPowerWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 9u:
      SkillPowerWin::OnOk(this);
      break;
    case 0xDu:
      SkillPowerWin::OnCancel(this);
      break;
    case 0xBu:
      SkillPowerWin::OnReset(this);
      break;
    case 0xCu:
      SkillPowerWin::OnSkillDroped(this);
      break;
    case 0xAu:
      ((void (*)(void))this->vfptr[90].__vecDelDtor)();
      break;
    case 0xEu:
      SkillPowerWin::OnSlideBarContent(this);
      break;
    case 0xFu:
      SkillPowerWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (00592D40) --------------------------------------------------------
SkillPowerIconWin *__cdecl SkillPowerIconWin::CreateWin(int iXPos, int iYPos, PgWin *pkParent)
{
  PgWin *v3; // eax@1
  PgWin *v4; // esi@1
  PgWin *v5; // edi@8
  SkillPowerIconWin *v6; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x1A0u);
  v4 = v3;
  result.m_pObject = v3;
  v8 = 0;
  if ( v3 )
  {
    SkillIcon::SkillIcon((SkillIcon *)v3);
    v4->vfptr = (NiRefObjectVtbl *)&SkillPowerIconWin::`vftable'{for `NiNode'};
    v4->vfptr = (IDirectMessengerVtbl *)&SkillPowerIconWin::`vftable'{for `IDirectMessenger'};
    LOWORD(v4[1].m_kWorld.m_Rotate.m_pEntry[1][2]) = -1;
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v8 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v4);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgWin *))v4->vfptr[152].__vecDelDtor)(
                          v4,
                          iXPos,
                          iYPos,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v4->vfptr[89].__vecDelDtor)(v4);
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = (SkillPowerIconWin *)v4;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v4);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = 0;
  }
  return v6;
}
// 9A2468: using guessed type void (__thiscall *SkillPowerIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A2484: using guessed type int (__thiscall *SkillPowerIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00592E90) --------------------------------------------------------
SkillPowerListItemWin *__cdecl SkillPowerListItemWin::CreateWin(NiAVObject *pkGeom, int iXPos, int iYPos, unsigned int uiListIndex, SkillPowerListItemWin::CreateSpec *rkSpec, PgWin *pkParent)
{
  PgWin *v6; // eax@1
  PgWin *v7; // esi@1
  PgWin *v8; // edi@8
  SkillPowerListItemWin *v9; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v11; // [sp+20h] [bp-4h]@1

  v6 = (PgWin *)operator new(0x140u);
  v7 = v6;
  result.m_pObject = v6;
  v11 = 0;
  if ( v6 )
  {
    PgWin::PgWin(v6);
    v7->vfptr = (NiRefObjectVtbl *)&SkillPowerListItemWin::`vftable'{for `NiNode'};
    v7->vfptr = (IDirectMessengerVtbl *)&SkillPowerListItemWin::`vftable'{for `IDirectMessenger'};
    v7[1].m_spControllers.m_pObject = 0;
    v7[1].m_pcName = 0;
    v7[1].m_ppkExtra = 0;
    v7[1].m_uiExtraDataSize = 20000;
    v7[1].m_uiMaxSize = 0;
    *(_DWORD *)&v7[1].m_uFlags = 0;
  }
  else
  {
    v7 = 0;
  }
  if ( v7 )
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  v11 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v7);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, NiAVObject *, int, int, unsigned int, SkillPowerListItemWin::CreateSpec *, PgWin *))v7->vfptr[113].__vecDelDtor)(
                          v7,
                          pkGeom,
                          iXPos,
                          iYPos,
                          uiListIndex,
                          rkSpec,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v7->vfptr[89].__vecDelDtor)(v7);
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = (SkillPowerListItemWin *)v7;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v7);
    if ( result.m_pObject )
    {
      v8 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v8 )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      }
    }
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = 0;
  }
  return v9;
}
// 9A26EC: using guessed type void (__thiscall *SkillPowerListItemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A270C: using guessed type int (__thiscall *SkillPowerListItemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00593010) --------------------------------------------------------
SkillPowerWin *__cdecl SkillPowerWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  SkillPowerWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x18Cu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&SkillPowerWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&SkillPowerWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[2][0]) = 0;
    LOBYTE(v2[1].m_kLocal.m_Translate.x) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (SkillPowerWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9A28D8: using guessed type void (__thiscall *SkillPowerWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A28F4: using guessed type int (__thiscall *SkillPowerWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00593180) --------------------------------------------------------
char __thiscall SkillPowerWin::Create(SkillPowerWin *this, PgFrameWork *pkFrameWork)
{
  SkillPowerWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  char result; // al@6
  const char *v5; // eax@9
  PgSprData *v6; // eax@10
  NiNode *v7; // esi@11
  NiSourceTexture *v8; // eax@16
  PgSprData *v9; // eax@17
  D3DXCOLOR v10; // ST20_16@19
  PgWinAbbreviateText *v11; // eax@19
  NiRefObjectVtbl *v12; // edi@19
  int v13; // eax@19
  PgWinBut *v14; // edi@19
  D3DXCOLOR v15; // ST28_16@19
  char *v16; // eax@19
  PgWinBut *v17; // edi@19
  D3DXCOLOR v18; // ST28_16@19
  char *v19; // eax@19
  NiSourceTexture *v20; // edi@19
  D3DXCOLOR v21; // ST28_16@21
  char *v22; // eax@21
  PgSprData *v23; // eax@21
  NiUnsharedGeometryGroup *v24; // edi@21
  NiUnsharedGeometryGroup *v25; // edi@21
  NiUnsharedGeometryGroup *v26; // eax@21
  NiUnsharedGeometryGroup *v27; // ecx@21
  char v28; // dl@22
  NiUnsharedGeometryGroup *v29; // eax@23
  NiUnsharedGeometryGroup *v30; // ecx@23
  char v31; // dl@24
  NiUnsharedGeometryGroup *v32; // eax@25
  NiUnsharedGeometryGroup *v33; // ecx@25
  char v34; // dl@26
  NiUnsharedGeometryGroup *v35; // eax@27
  NiUnsharedGeometryGroup *v36; // ecx@27
  char v37; // dl@28
  NiUnsharedGeometryGroup *v38; // eax@29
  NiUnsharedGeometryGroup *v39; // ecx@29
  char v40; // dl@30
  NiUnsharedGeometryGroup *v41; // eax@31
  NiUnsharedGeometryGroup *v42; // ecx@31
  char v43; // dl@32
  SLWCreateInfo::Item *v44; // edi@33
  SLWCreateInfo::Item *v45; // edi@35
  SLWCreateInfo::Item *v46; // edi@37
  PgSprData *v47; // eax@39
  PgFrameWork *v48; // edi@39
  char v49; // al@40
  const char *v50; // eax@43
  _BYTE *v51; // eax@45
  PgFrameWork *v52; // eax@49
  const char *v53; // eax@50
  PgSprData *v54; // eax@53
  SlideBar *v55; // eax@53
  SlideBar *v56; // edi@53
  void *(__thiscall *v57)(NiRefObject *, unsigned int); // edx@53
  SlideBar *v58; // ecx@53
  int v59; // eax@53
  int v60; // eax@53
  NiNode *v61; // esi@54
  SLWCreateInfo kCreateInfo; // [sp+28h] [bp-E0h]@33
  UIUtil ui; // [sp+44h] [bp-C4h]@19
  NiSourceTexture *pkTexture; // [sp+58h] [bp-B0h]@1
  PgFrameWork *v65; // [sp+5Ch] [bp-ACh]@1
  int uiLeft; // [sp+60h] [bp-A8h]@17
  int uiXOff; // [sp+64h] [bp-A4h]@10
  int uiYOff; // [sp+68h] [bp-A0h]@10
  int uiTop; // [sp+6Ch] [bp-9Ch]@17
  NiTexturePalette *c; // [sp+70h] [bp-98h]@7
  NiPointer<NiNode> spNode; // [sp+74h] [bp-94h]@1
  SkillPowerListItemWin::CreateSpec kSpec; // [sp+78h] [bp-90h]@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strQuestDesc; // [sp+DCh] [bp-2Ch]@33
  int v74; // [sp+104h] [bp-4h]@1

  v2 = this;
  v65 = pkFrameWork;
  spNode.m_pObject = 0;
  v74 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  pkTexture = v3;
  if ( !v3 )
  {
    v74 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( spNode.m_pObject )
        spNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spNode.m_pObject, 1u);
    }
    return 0;
  }
  c = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "Game\\ChrSkillPwr.nif");
  PgUtil::LoadNodeNifFile(v5, &spNode, c);
  if ( !spNode.m_pObject )
    return 0;
  v6 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane01", &uiXOff, &uiYOff, v3);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v6, 0, v65, "SkillPowerWin", 0) )
  {
    v8 = MenuTexMgr::GetTexture(0x13u);
    if ( v8 )
      v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v8);
    else
      v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - uiXOff, uiTop - uiYOff, v9, (PgWin *)&v2->vfptr, 0, 0);
    UIUtil::UIUtil(&ui);
    LOBYTE(v74) = 1;
    UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
    UIUtil::SetOffset(&ui, uiXOff, uiYOff);
    UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
    UIUtil::CreateSpr(&ui, "Plane02", 0);
    UIUtil::CreateSpr(&ui, "Plane03", 0);
    *(_QWORD *)&v10.r = *(_QWORD *)&Color::m_kDxWinTitleColor.r;
    *(_QWORD *)&v10.b = *(_QWORD *)&Color::m_kDxWinTitleColor.b;
    v11 = UIUtil::CreateText(&ui, "SelectionName", &byte_9A2119, 0, v10, 4u, 0, 0);
    v2->m_pkSkillNameText = (PgWinText *)v11;
    v12 = v11->vfptr;
    v13 = ((int (__thiscall *)(PgWinAbbreviateText *))v11->vfptr[41].__vecDelDtor)(v11);
    v12[43].__vecDelDtor((NiRefObject *)v2->m_pkSkillNameText, v13 + 3);
    v14 = UIUtil::CreateBtn(&ui, 9u, "OkNor", "OkOver", "OkClick", 0, 0);
    *(_QWORD *)&v15.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v15.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v16 = (char *)TextData::Get(0xA2A3EDF2);
    UIUtil::CreateAttachedText((PgWin *)&v14->vfptr, v16, v15, 5u);
    v17 = UIUtil::CreateBtn(&ui, 0xDu, "CancelNor", "CancelOver", "CancelClick", 0, 0);
    *(_QWORD *)&v18.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v18.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v19 = (char *)TextData::Get(0x88A297E1);
    UIUtil::CreateAttachedText((PgWin *)&v17->vfptr, v19, v18, 5u);
    UIUtil::CreateBtn(&ui, 0xAu, "ClsNor", "ClsClick", "ClsOver", 0, 0);
    v20 = MenuTexMgr::GetTexture(4u);
    if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
      UIUtil::CreateBtn(&ui, 0xFu, "HelpLinkNor", "HelpLinkClick", "HelpLinkOver", 0, v20);
    *(_QWORD *)&v21.r = *(_QWORD *)&Color::m_kDxWinTitleColor.r;
    *(_QWORD *)&v21.b = *(_QWORD *)&Color::m_kDxWinTitleColor.b;
    v22 = (char *)TextData::Get(0x4255438Fu);
    UIUtil::CreateTextNoSpr(&ui, "WinTitle", v22, v21, 5u);
    v23 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PwrTgetSlot", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - uiXOff, uiTop - uiYOff, v23, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkSkillIconWin = SkillPowerIconWin::CreateWin(uiLeft - uiXOff + 3, uiTop - uiYOff + 3, (PgWin *)&v2->vfptr);
    kSpec.kSkillPowerInfo.kDesc1._Myres = 15;
    kSpec.kSkillPowerInfo.kDesc1._Mysize = 0;
    kSpec.kSkillPowerInfo.kDesc1._Bx._Buf[0] = 0;
    kSpec.kSkillPowerInfo.kDesc2._Myres = 15;
    kSpec.kSkillPowerInfo.kDesc2._Mysize = 0;
    kSpec.kSkillPowerInfo.kDesc2._Bx._Buf[0] = 0;
    LOBYTE(v74) = 2;
    kSpec.kInterface.pcIcon = "PwrSlot1";
    kSpec.kInterface.pcUpNor = "PwrUpNor01";
    kSpec.kInterface.pcUpFocus = "PwrUpOver01";
    kSpec.kInterface.pcUpClick = "PwrUpClick01";
    kSpec.kInterface.pcDownNor = "PwrDnNor01";
    kSpec.kInterface.pcDownFocus = "PwrDnOver01";
    kSpec.kInterface.pcDownClick = "PwrDnClick01";
    kSpec.kInterface.pcDesc1 = "Title1Name";
    kSpec.kInterface.pcDesc2 = "Title1Desc";
    kSpec.kSkillPowerInfo.uiIconImageIndex = 0;
    v24 = TextData::Get(0x7B8D83C5u);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kSpec.kSkillPowerInfo.kDesc1,
      (const char *)v24,
      strlen((const char *)v24));
    v25 = TextData::Get(0x7B8D83C6u);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kSpec.kSkillPowerInfo.kDesc2,
      (const char *)v25,
      strlen((const char *)v25));
    kSpec.pkPointPool = &v2->m_kPointPool;
    v2->m_apkListItemWin[0] = SkillPowerListItemWin::CreateWin(
                                (NiAVObject *)&spNode.m_pObject->vfptr,
                                uiXOff,
                                uiYOff,
                                0,
                                &kSpec,
                                (PgWin *)&v2->vfptr);
    kSpec.kInterface.pcIcon = "PwrSlot2";
    kSpec.kInterface.pcUpNor = "PwrUpNor02";
    kSpec.kInterface.pcUpFocus = "PwrUpOver02";
    kSpec.kInterface.pcUpClick = "PwrUpClick02";
    kSpec.kInterface.pcDownNor = "PwrDnNor02";
    kSpec.kInterface.pcDownFocus = "PwrDnOver02";
    kSpec.kInterface.pcDownClick = "PwrDnClick02";
    kSpec.kInterface.pcDesc1 = "Title2Name";
    kSpec.kInterface.pcDesc2 = "Title2Desc";
    kSpec.kSkillPowerInfo.uiIconImageIndex = 3;
    v26 = TextData::Get(0x74A0977Du);
    v27 = v26;
    c = (NiTexturePalette *)((char *)&v26->vfptr + 1);
    do
    {
      v28 = (char)v27->vfptr;
      v27 = (NiUnsharedGeometryGroup *)((char *)v27 + 1);
    }
    while ( v28 );
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kSpec.kSkillPowerInfo.kDesc1,
      (const char *)v26,
      (char *)v27 - (char *)c);
    v29 = TextData::Get(0x75A0977Du);
    v30 = v29;
    c = (NiTexturePalette *)((char *)&v29->vfptr + 1);
    do
    {
      v31 = (char)v30->vfptr;
      v30 = (NiUnsharedGeometryGroup *)((char *)v30 + 1);
    }
    while ( v31 );
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kSpec.kSkillPowerInfo.kDesc2,
      (const char *)v29,
      (char *)v30 - (char *)c);
    kSpec.pkPointPool = &v2->m_kPointPool;
    v2->m_apkListItemWin[1] = SkillPowerListItemWin::CreateWin(
                                (NiAVObject *)&spNode.m_pObject->vfptr,
                                uiXOff,
                                uiYOff,
                                1u,
                                &kSpec,
                                (PgWin *)&v2->vfptr);
    kSpec.kInterface.pcIcon = "PwrSlot3";
    kSpec.kInterface.pcUpNor = "PwrUpNor03";
    kSpec.kInterface.pcUpFocus = "PwrUpOver03";
    kSpec.kInterface.pcUpClick = "PwrUpClick03";
    kSpec.kInterface.pcDownNor = "PwrDnNor03";
    kSpec.kInterface.pcDownFocus = "PwrDnOver03";
    kSpec.kInterface.pcDownClick = "PwrDnClick03";
    kSpec.kInterface.pcDesc1 = "Title3Name";
    kSpec.kInterface.pcDesc2 = "Title3Desc";
    kSpec.kSkillPowerInfo.uiIconImageIndex = 2;
    v32 = TextData::Get(0xE3F2C6F5);
    v33 = v32;
    c = (NiTexturePalette *)((char *)&v32->vfptr + 1);
    do
    {
      v34 = (char)v33->vfptr;
      v33 = (NiUnsharedGeometryGroup *)((char *)v33 + 1);
    }
    while ( v34 );
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kSpec.kSkillPowerInfo.kDesc1,
      (const char *)v32,
      (char *)v33 - (char *)c);
    v35 = TextData::Get(0xE3F2C6F6);
    v36 = v35;
    c = (NiTexturePalette *)((char *)&v35->vfptr + 1);
    do
    {
      v37 = (char)v36->vfptr;
      v36 = (NiUnsharedGeometryGroup *)((char *)v36 + 1);
    }
    while ( v37 );
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kSpec.kSkillPowerInfo.kDesc2,
      (const char *)v35,
      (char *)v36 - (char *)c);
    kSpec.pkPointPool = &v2->m_kPointPool;
    v2->m_apkListItemWin[2] = SkillPowerListItemWin::CreateWin(
                                (NiAVObject *)&spNode.m_pObject->vfptr,
                                uiXOff,
                                uiYOff,
                                2u,
                                &kSpec,
                                (PgWin *)&v2->vfptr);
    kSpec.kInterface.pcIcon = "PwrSlot4";
    kSpec.kInterface.pcUpNor = "PwrUpNor04";
    kSpec.kInterface.pcUpFocus = "PwrUpOver04";
    kSpec.kInterface.pcUpClick = "PwrUpClick04";
    kSpec.kInterface.pcDownNor = "PwrDnNor04";
    kSpec.kInterface.pcDownFocus = "PwrDnOver04";
    kSpec.kInterface.pcDownClick = "PwrDnClick04";
    kSpec.kInterface.pcDesc1 = "Title4Name";
    kSpec.kInterface.pcDesc2 = "Title4Desc";
    kSpec.kSkillPowerInfo.uiIconImageIndex = 1;
    v38 = TextData::Get(0xDEE7072C);
    v39 = v38;
    c = (NiTexturePalette *)((char *)&v38->vfptr + 1);
    do
    {
      v40 = (char)v39->vfptr;
      v39 = (NiUnsharedGeometryGroup *)((char *)v39 + 1);
    }
    while ( v40 );
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kSpec.kSkillPowerInfo.kDesc1,
      (const char *)v38,
      (char *)v39 - (char *)c);
    v41 = TextData::Get(0xDEE7082C);
    v42 = v41;
    c = (NiTexturePalette *)((char *)&v41->vfptr + 1);
    do
    {
      v43 = (char)v42->vfptr;
      v42 = (NiUnsharedGeometryGroup *)((char *)v42 + 1);
    }
    while ( v43 );
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kSpec.kSkillPowerInfo.kDesc2,
      (const char *)v41,
      (char *)v42 - (char *)c);
    kSpec.pkPointPool = &v2->m_kPointPool;
    v2->m_apkListItemWin[3] = SkillPowerListItemWin::CreateWin(
                                (NiAVObject *)&spNode.m_pObject->vfptr,
                                uiXOff,
                                uiYOff,
                                3u,
                                &kSpec,
                                (PgWin *)&v2->vfptr);
    kCreateInfo.m_arrItem._Myfirst = 0;
    kCreateInfo.m_arrItem._Mylast = 0;
    kCreateInfo.m_arrItem._Myend = 0;
    kCreateInfo.m_bMakeData = 0;
    kCreateInfo.m_nOffX = 0;
    kCreateInfo.m_nOffY = 0;
    LOBYTE(v74) = 3;
    v44 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
    v44->nItemType = 1;
    v44->pNode = spNode.m_pObject;
    strQuestDesc._Myres = 15;
    strQuestDesc._Mysize = 0;
    strQuestDesc._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strQuestDesc, "ColumnBarNor01", 0xEu);
    LOBYTE(v74) = 4;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      &v44->vecNodeName,
      &strQuestDesc);
    LOBYTE(v74) = 3;
    if ( strQuestDesc._Myres >= 0x10 )
      operator delete(strQuestDesc._Bx._Ptr);
    v45 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    v45->nItemType = 2;
    strQuestDesc._Myres = 15;
    strQuestDesc._Mysize = 0;
    strQuestDesc._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strQuestDesc, "Column01", 8u);
    LOBYTE(v74) = 5;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      &v45->vecNodeName,
      &strQuestDesc);
    LOBYTE(v74) = 3;
    if ( strQuestDesc._Myres >= 0x10 )
      operator delete(strQuestDesc._Bx._Ptr);
    v45->pNode = spNode.m_pObject;
    v46 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    v46->nItemType = 2;
    strQuestDesc._Myres = 15;
    strQuestDesc._Mysize = 0;
    strQuestDesc._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strQuestDesc, "Column02", 8u);
    LOBYTE(v74) = 6;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      &v46->vecNodeName,
      &strQuestDesc);
    LOBYTE(v74) = 3;
    if ( strQuestDesc._Myres >= 0x10 )
      operator delete(strQuestDesc._Bx._Ptr);
    v46->pNode = spNode.m_pObject;
    SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
    v47 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Help", &uiLeft, &uiTop, pkTexture);
    v2->m_pListWinContent = SlideListWin::CreateWin(
                              uiLeft + 4,
                              uiTop - 8,
                              v47,
                              (PgWin *)&v2->vfptr,
                              &kCreateInfo,
                              4u,
                              0);
    v48 = (PgFrameWork *)TextData2::Get(0x96897A90);
    if ( v48 )
    {
      strQuestDesc._Myres = 15;
      strQuestDesc._Mysize = 0;
      strQuestDesc._Bx._Buf[0] = 0;
      LOBYTE(v74) = 7;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strQuestDesc, "   ", 3u);
      v49 = (char)v48->vfptr;
      LOBYTE(c) = v49;
      if ( v49 )
      {
        v65 = v48;
        do
        {
          if ( v49 == 10 )
          {
            v50 = strQuestDesc._Bx._Ptr;
            if ( strQuestDesc._Myres < 0x10 )
              v50 = (const char *)&strQuestDesc;
            SlideListWin::AddText(v2->m_pListWinContent, v50);
            v51 = strQuestDesc._Bx._Ptr;
            strQuestDesc._Mysize = 0;
            if ( strQuestDesc._Myres < 0x10 )
              v51 = &strQuestDesc;
            *v51 = 0;
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strQuestDesc, "   ", 3u);
          }
          else
          {
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strQuestDesc, 1u, (char)c);
          }
          v52 = (PgFrameWork *)((char *)v65 + 1);
          v65 = v52;
          v49 = (char)v52->vfptr;
          LOBYTE(c) = v49;
        }
        while ( v49 );
      }
      v53 = strQuestDesc._Bx._Ptr;
      if ( strQuestDesc._Myres < 0x10 )
        v53 = (const char *)&strQuestDesc;
      SlideListWin::AddText(v2->m_pListWinContent, v53);
      SlideListWin::AlignText(v2->m_pListWinContent, 4u);
      LOBYTE(v74) = 3;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&strQuestDesc);
    }
    SlideListWin::UpdateViewList(v2->m_pListWinContent);
    v54 = PgSprData::Create(
            (NiAVObject *)&spNode.m_pObject->vfptr,
            "SlideBar_SlideBtnMiddle",
            &uiLeft,
            &uiTop,
            pkTexture);
    v55 = SlideBar::CreateWin(
            spNode.m_pObject,
            "SlideBar",
            "SlideBar_UpBtn",
            "SlideBar_DnBtn",
            v54,
            0,
            (PgWin *)&v2->vfptr);
    v2->m_pSlideBar = v55;
    v55->m_uiClickMsg = 14;
    v2->m_pSlideBar->m_eType = 1;
    v56 = v2->m_pSlideBar;
    v57 = v2->m_pSlideBar->vfptr[42].__vecDelDtor;
    v58 = v2->m_pSlideBar;
    pkTexture = (NiSourceTexture *)v2->m_pSlideBar->vfptr;
    v59 = ((int (__thiscall *)(SlideBar *))v57)(v58);
    v60 = (int)v56->vfptr[41].__vecDelDtor((NiRefObject *)v56, v59 - 8);
    ((void (__thiscall *)(SlideBar *, int))pkTexture[4].m_kFormatPrefs.m_eMipMapped)(v2->m_pSlideBar, v60 - 10);
    ((void (__thiscall *)(SkillPowerWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    LOBYTE(v74) = 2;
    SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
    SkillPowerListItemWin::CreateSpec::~CreateSpec(&kSpec);
    LOBYTE(v74) = 0;
    UIUtil::~UIUtil(&ui);
    v74 = -1;
    if ( spNode.m_pObject )
    {
      v61 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v61 )
          v61->vfptr->__vecDelDtor((NiRefObject *)v61, 1u);
      }
    }
    result = 1;
  }
  else
  {
    v7 = spNode.m_pObject;
    v74 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00593D50) --------------------------------------------------------
SkillPowerIconWin *__thiscall SkillPowerIconWin::`scalar deleting destructor'(SkillPowerIconWin *this, unsigned int a2)
{
  SkillPowerIconWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&SkillPowerIconWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SkillPowerIconWin::`vftable'{for `IDirectMessenger'};
  SkillIcon::~SkillIcon((SkillIcon *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A2468: using guessed type void (__thiscall *SkillPowerIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A2484: using guessed type int (__thiscall *SkillPowerIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00593D90) --------------------------------------------------------
SkillPowerListItemWin *__thiscall SkillPowerListItemWin::`scalar deleting destructor'(SkillPowerListItemWin *this, unsigned int a2)
{
  SkillPowerListItemWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&SkillPowerListItemWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SkillPowerListItemWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A26EC: using guessed type void (__thiscall *SkillPowerListItemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A270C: using guessed type int (__thiscall *SkillPowerListItemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00593DD0) --------------------------------------------------------
SkillPowerWin *__thiscall SkillPowerWin::`scalar deleting destructor'(SkillPowerWin *this, unsigned int a2)
{
  SkillPowerWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&SkillPowerWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SkillPowerWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A28D8: using guessed type void (__thiscall *SkillPowerWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A28F4: using guessed type int (__thiscall *SkillPowerWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00593E10) --------------------------------------------------------
void __thiscall SkillPowerListItemWin::CreateSpec::~CreateSpec(SkillPowerListItemWin::CreateSpec *this)
{
  SkillPowerListItemWin::CreateSpec *v1; // esi@1

  v1 = this;
  if ( this->kSkillPowerInfo.kDesc2._Myres >= 0x10 )
    operator delete(this->kSkillPowerInfo.kDesc2._Bx._Ptr);
  v1->kSkillPowerInfo.kDesc2._Myres = 15;
  v1->kSkillPowerInfo.kDesc2._Mysize = 0;
  v1->kSkillPowerInfo.kDesc2._Bx._Buf[0] = 0;
  if ( v1->kSkillPowerInfo.kDesc1._Myres >= 0x10 )
    operator delete(v1->kSkillPowerInfo.kDesc1._Bx._Ptr);
  v1->kSkillPowerInfo.kDesc1._Mysize = 0;
  v1->kSkillPowerInfo.kDesc1._Myres = 15;
  v1->kSkillPowerInfo.kDesc1._Bx._Buf[0] = 0;
}

//----- (00593E60) --------------------------------------------------------
void __thiscall PosInfoWinBut::PosInfoWinBut(PosInfoWinBut *this)
{
  PosInfoWinBut *v1; // esi@1

  v1 = this;
  PgWinBut::PgWinBut((PgWinBut *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&PosInfoWinBut::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&PosInfoWinBut::`vftable'{for `IDirectMessenger'};
  v1->m_Pos = 0;
}
// 9A2E40: using guessed type void (__thiscall *PosInfoWinBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A2E5C: using guessed type int (__thiscall *PosInfoWinBut::`vftable'{for `NiNode'})(void *p, char);

//----- (00593E90) --------------------------------------------------------
void __thiscall PosInfoWinBut::~PosInfoWinBut(PosInfoWinBut *this)
{
  this->vfptr = (NiRefObjectVtbl *)&PosInfoWinBut::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PosInfoWinBut::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
}
// 9A2E40: using guessed type void (__thiscall *PosInfoWinBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A2E5C: using guessed type int (__thiscall *PosInfoWinBut::`vftable'{for `NiNode'})(void *p, char);

//----- (00593EB0) --------------------------------------------------------
void __thiscall LevelSelectWinBut::LevelSelectWinBut(LevelSelectWinBut *this)
{
  LevelSelectWinBut *v1; // esi@1

  v1 = this;
  PgWinBut::PgWinBut((PgWinBut *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&LevelSelectWinBut::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&LevelSelectWinBut::`vftable'{for `IDirectMessenger'};
  v1->m_uiInvIndex = -1;
  v1->maxLevel = 0;
}
// 9A3094: using guessed type void (__thiscall *LevelSelectWinBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A30B4: using guessed type int (__thiscall *LevelSelectWinBut::`vftable'{for `NiNode'})(void *p, char);

//----- (00593EE0) --------------------------------------------------------
void __thiscall LevelSelectWinBut::~LevelSelectWinBut(LevelSelectWinBut *this)
{
  this->vfptr = (NiRefObjectVtbl *)&LevelSelectWinBut::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&LevelSelectWinBut::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
}
// 9A3094: using guessed type void (__thiscall *LevelSelectWinBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A30B4: using guessed type int (__thiscall *LevelSelectWinBut::`vftable'{for `NiNode'})(void *p, char);

//----- (00593F00) --------------------------------------------------------
void __thiscall SkillInvWin::~SkillInvWin(SkillInvWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&SkillInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SkillInvWin::`vftable'{for `IDirectMessenger'};
  SkillIcon::~SkillIcon((SkillIcon *)&this->vfptr);
}
// 9A32EC: using guessed type void (__thiscall *SkillInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A330C: using guessed type int (__thiscall *SkillInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00593F20) --------------------------------------------------------
char __thiscall SkillInvWin::Create(SkillInvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent)
{
  SkillInvWin *v5; // esi@1
  char result; // al@1

  v5 = this;
  result = SkillIcon::Create((SkillIcon *)&this->vfptr, iXPos, iYPos, pkParent);
  if ( result )
  {
    v5->m_uiInvIndex = uiInvIndex;
    result = 1;
  }
  return result;
}

//----- (00593F60) --------------------------------------------------------
void __thiscall SkillInvWin::OnFirstHitWin(SkillInvWin *this)
{
  SkillInvWin *v1; // esi@1
  unsigned __int16 v2; // dx@3
  SkillInfoWin *v3; // ecx@4
  unsigned int v4; // eax@5

  v1 = this;
  if ( this->m_bGTSkill )
  {
    SkillInfoWin::SetGTSkillInfo((SkillInfoWin *)this->m_pkToolTipWin, this->m_iStaNum);
    PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
  }
  v2 = v1->m_kSkillID;
  if ( v2 != -1 )
  {
    v3 = (SkillInfoWin *)v1->m_pkToolTipWin;
    if ( v3 )
    {
      v4 = v1->m_uiSkillType;
      if ( v4 )
      {
        if ( v4 == 1 )
          SkillInfoWin::SetPassiveSkillInfo(v3, v2, 0);
        PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
      }
      else
      {
        SkillInfoWin::SetSkillInfo(v3, v2, 1, 0, 0);
        PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
      }
    }
  }
}

//----- (00593FE0) --------------------------------------------------------
void __thiscall SkillWin::OnEmpowerWinShow(SkillWin *this, int b)
{
  char *v2; // esi@1
  signed int v3; // edi@1
  SkillWin *v4; // [sp+Ch] [bp-4h]@1

  v4 = this;
  v2 = (char *)this->m_apkEmpowerWin;
  v3 = 8;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 256))(b);
    v2 += 4;
    --v3;
  }
  while ( v3 );
  if ( (_BYTE)b )
  {
    ((void (__stdcall *)(_DWORD))v4->m_pkSkillEmpowerNotice->vfptr[64].__vecDelDtor)(1);
  }
  else
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkSkillPowerWin->vfptr);
    ((void (__stdcall *)(_DWORD))v4->m_pkSkillEmpowerNotice->vfptr[64].__vecDelDtor)(0);
  }
}

//----- (00594070) --------------------------------------------------------
void __thiscall SkillWin::OnCommboSkill(SkillWin *this)
{
  SkillWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkSkillEmpowerPointText->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkSkillEmpowerAntiPointText->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkSkillEmpowerAntiTitleText->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkSkillEmpowerTitleText->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkEmpowerDescSpr->vfptr[64].__vecDelDtor)(1);
  SkillWin::OnEmpowerWinShow(v1, 0);
}

//----- (005940E0) --------------------------------------------------------
void __thiscall SkillWin::OnSkillPowerReset(SkillWin *this)
{
  GameFrameWork::NcSkillEmpowResetReq((GameFrameWork *)this->m_pkFrameWork);
}

//----- (005940F0) --------------------------------------------------------
void __thiscall SkillWin::OnInvRClick(SkillWin *this, unsigned int uiInvIndex)
{
  SkillWin *v2; // esi@1
  unsigned __int16 v3; // ax@1
  unsigned __int16 v4; // di@1

  v2 = this;
  v3 = SkillIcon::GetSkill((SkillIcon *)&this->m_apkInvWin[uiInvIndex]->vfptr);
  v4 = v3;
  if ( v2->m_uiCurPageType == 3 )
  {
    if ( (unsigned __int8)Skill::IsProduceBaseSkill(v3) )
    {
      LOWORD(uiInvIndex) = v4;
      ITask::DirectDispatchAll(33, &uiInvIndex);
    }
  }
}

//----- (00594140) --------------------------------------------------------
void __thiscall SkillWin::OnClose(SkillWin *this)
{
  SkillWin *v1; // esi@1

  v1 = this;
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkSkillPowerWin->vfptr);
  PgWin::OnClose((PgWin *)&v1->vfptr);
}

//----- (00594160) --------------------------------------------------------
void __thiscall SkillWin::OpenProduceSkillSelectWin(SkillWin *this)
{
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkProductSkillSelectWin->vfptr);
}

//----- (00594180) --------------------------------------------------------
void __thiscall SkillWin::SetSkillPowerSuccess(SkillWin *this, bool b)
{
  SkillPowerWin::SetSkillPowerSuccess(this->m_pkSkillPowerWin, b);
}

//----- (00594190) --------------------------------------------------------
void __thiscall SkillWin::CloseProduceSkillSelectWin(SkillWin *this)
{
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkProductSkillSelectWin->vfptr);
}

//----- (005941B0) --------------------------------------------------------
void __thiscall SkillWin::OpenProduceSkillInitWin(SkillWin *this, char bySlotIndex)
{
  SkillWin *v2; // esi@1

  v2 = this;
  if ( this->m_pkProductSkillInitWin )
  {
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkProductSkillInitWin->vfptr);
    v2->m_pkProductSkillInitWin->m_byItemSlot = (unsigned __int8)bySlotIndex;
  }
}

//----- (005941E0) --------------------------------------------------------
ProductSkillSelectWin *__thiscall SkillWin::GetProductSkillSelectWin(SkillWin *this)
{
  return this->m_pkProductSkillSelectWin;
}

//----- (005941F0) --------------------------------------------------------
void SkillWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "ChrSkill");
}

//----- (00594220) --------------------------------------------------------
void __thiscall SkillInvWin::SetSkill(SkillInvWin *this, unsigned __int16 kSkillID, unsigned int uiSkillType)
{
  unsigned __int16 v3; // bx@1
  SkillInvWin *v4; // esi@1
  void *(__thiscall *v5)(NiRefObject *, unsigned int); // eax@2
  int v6; // edi@4
  int *v7; // eax@6
  int v8; // edi@7
  float v9; // ST0C_4@8
  float green; // ST08_4@8
  float rad; // ST04_4@8
  float v12; // ST08_4@8
  NiSourceTexture *v13; // eax@8
  void *(__thiscall *v14)(NiRefObject *, unsigned int); // eax@8
  NiScreenElements *v15; // eax@8
  int v16; // edi@11
  int *v17; // eax@13
  int v18; // edi@14
  float v19; // ST0C_4@15
  float v20; // ST08_4@15
  float v21; // ST04_4@15
  float v22; // ST08_4@15
  NiSourceTexture *v23; // eax@15
  void *(__thiscall *v24)(NiRefObject *, unsigned int); // eax@15
  unsigned int v25; // ecx@16

  v3 = kSkillID;
  v4 = this;
  if ( kSkillID == -1 )
  {
    ((void (__stdcall *)(_DWORD, signed int, signed int, signed int))this->vfptr[146].__vecDelDtor)(0, -1, 32, 32);
    v5 = v4->vfptr[60].__vecDelDtor;
    v4->m_uFlags |= 1u;
    v5((NiRefObject *)&v4->vfptr, 0);
  }
  else if ( uiSkillType )
  {
    v16 = ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::ms_pkTable
                                                             + 16))(
                            ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::ms_pkTable,
                            kSkillID) )
    {
      if ( v3 <= *(_WORD *)(v16 + 200) )
      {
        v17 = (int *)(*(_DWORD *)(v16 + 196) + 4 * v3);
        if ( *v17 )
        {
          v18 = *v17;
          if ( *v17 )
          {
            SkillIcon::SetEmpowerInfo((SkillIcon *)&v4->vfptr, 0);
            v21 = (double)*(unsigned int *)(v18 + 70);
            v20 = (double)*(unsigned int *)(v18 + 74);
            v19 = (double)*(unsigned int *)(v18 + 78);
            SkillIcon::SetBackPlaneColor((SkillIcon *)&v4->vfptr, v21, v20, v19, 255.0);
            v22 = *(float *)(v18 + 34);
            *(_DWORD *)&kSkillID = v4->vfptr;
            v23 = IconMgr::GetTexture((char *)(v18 + 38));
            (*(void (__thiscall **)(SkillInvWin *, NiSourceTexture *, _DWORD, signed int, signed int))(kSkillID + 584))(
              v4,
              v23,
              LODWORD(v22),
              32,
              32);
            v24 = v4->vfptr[60].__vecDelDtor;
            v4->m_uFlags &= 0xFFFEu;
            v24((NiRefObject *)&v4->vfptr, 1u);
          }
        }
      }
    }
  }
  else
  {
    v6 = ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable
                                                             + 16))(
                            ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable,
                            kSkillID) )
    {
      if ( v3 <= *(_WORD *)(v6 + 200) )
      {
        v7 = (int *)(*(_DWORD *)(v6 + 196) + 4 * v3);
        if ( *v7 )
        {
          v8 = *v7;
          if ( *v7 )
          {
            rad = (double)*(unsigned int *)(v8 + 75);
            green = (double)*(unsigned int *)(v8 + 79);
            v9 = (double)*(unsigned int *)(v8 + 83);
            SkillIcon::SetBackPlaneColor((SkillIcon *)&v4->vfptr, rad, green, v9, 255.0);
            v12 = *(float *)(v8 + 39);
            *(_DWORD *)&kSkillID = v4->vfptr;
            v13 = IconMgr::GetTexture((char *)(v8 + 43));
            (*(void (__thiscall **)(SkillInvWin *, NiSourceTexture *, _DWORD, signed int, signed int))(kSkillID + 584))(
              v4,
              v13,
              LODWORD(v12),
              32,
              32);
            v14 = v4->vfptr[60].__vecDelDtor;
            v4->m_uFlags &= 0xFFFEu;
            v14((NiRefObject *)&v4->vfptr, 1u);
            v15 = v4->m_spBackPlane.m_pObject;
            if ( v3 < 0x4E20u )
            {
              v15->m_uFlags &= 0xFFFEu;
              SkillIcon::UsingSkillAlphaProperty((SkillIcon *)&v4->vfptr);
              Skill::GetAccumulatedEmpowerInfo((Skill::EmpowerInfo *)&kSkillID, v3);
              SkillIcon::SetEmpowerInfo((SkillIcon *)&v4->vfptr, (Skill::EmpowerInfo)kSkillID);
            }
            else
            {
              v15->m_uFlags |= 1u;
              SkillIcon::SetEmpowerInfo((SkillIcon *)&v4->vfptr, 0);
              SkillIcon::UsingItemAlphaProperty((SkillIcon *)&v4->vfptr);
            }
          }
        }
      }
    }
  }
  v25 = uiSkillType;
  v4->m_kSkillID = v3;
  v4->m_uiSkillType = v25;
}
// A8CAA0: using guessed type int ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable;
// A8CD58: using guessed type int ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::ms_pkTable;

//----- (00594490) --------------------------------------------------------
void __thiscall SkillWin::OnOpenPowerWindow(SkillWin *this)
{
  SkillWin *v1; // esi@1

  v1 = this;
  if ( this->m_uiCurPageType == 3 )
  {
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkProductSkillSelectWin->vfptr);
  }
  else
  {
    if ( !this->m_pkSkillPowerWin )
      this->m_pkSkillPowerWin = SkillPowerWin::CreateWin(this->m_pkFrameWork);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkSkillPowerWin->vfptr);
  }
}

//----- (005944E0) --------------------------------------------------------
void __thiscall SkillWin::OnInvLClick(SkillWin *this, unsigned int uiInvIndex)
{
  SkillWin *v2; // esi@1
  void *v3; // edi@1

  v2 = this;
  v3 = (void *)SkillIcon::GetSkill((SkillIcon *)&this->m_apkInvWin[uiInvIndex]->vfptr);
  if ( (_WORD)v3 != -1
    && ((unsigned __int16)v3 < 0x4E20u || (unsigned __int8)Skill::IsProduceBaseSkill((unsigned __int16)v3)) )
  {
    v2->m_kDropContents.m_eSenderType = 2;
    v2->m_kDropContents.m_eType = 1;
    v2->m_kDropContents.m_apvParam[0] = v3;
    v2->m_kDropContents.m_uiSenderIndex = uiInvIndex;
    v2->m_kDrop.m_pkSender = (PgWin *)v2;
    PgCursor::ms_pkDrop = &v2->m_kDrop;
  }
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (00594560) --------------------------------------------------------
void __thiscall SkillWin::UpdateMeWin(SkillWin *this, float fCurTime)
{
  SkillWin *v2; // esi@1
  NiRefObjectVtbl *v3; // edi@3
  unsigned int v4; // eax@3
  char *v5; // eax@3
  NiRefObjectVtbl *v6; // edi@3
  unsigned int v7; // ST08_4@3
  NiRefObjectVtbl *v8; // edi@4
  unsigned int v9; // eax@4
  char *v10; // eax@4
  unsigned int v11; // ST08_4@4

  v2 = this;
  if ( this->m_pkSkillPowerWin && (unsigned __int8)((int (*)(void))this->m_pkSkillPowerWin->vfptr[65].__vecDelDtor)() )
  {
    v3 = v2->m_pkSkillEmpowerPointText->vfptr;
    v4 = Skill::GetRestEmpowerPointInEdit();
    v5 = fs(off_9A2E0C, v4);
    v3[118].__vecDelDtor((NiRefObject *)v2->m_pkSkillEmpowerPointText, (unsigned int)v5);
    v6 = v2->m_pkSkillEmpowerAntiPointText->vfptr;
    v7 = Skill::GetAntiEmpowerPointInEdit();
    fs((char *)&off_9A2E10, v7);
  }
  else
  {
    v8 = v2->m_pkSkillEmpowerPointText->vfptr;
    v9 = Skill::GetRestEmpowerPoint();
    v10 = fs(off_9A2E14, v9);
    v8[118].__vecDelDtor((NiRefObject *)v2->m_pkSkillEmpowerPointText, (unsigned int)v10);
    v6 = v2->m_pkSkillEmpowerAntiPointText->vfptr;
    v11 = Inventory::GetSkillEmpowerInitialPoint(&g_kInventory);
    fs(off_9A2E18, v11);
  }
  ((void (__thiscall *)(_DWORD))v6[118].__vecDelDtor)(v2->m_pkSkillEmpowerAntiPointText);
}
// 9A2E10: using guessed type void *off_9A2E10;

//----- (00594620) --------------------------------------------------------
char __thiscall PosInfoWinBut::Create(PosInfoWinBut *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, int Pos, char *pcName, unsigned int uiExtStyle)
{
  PosInfoWinBut *v9; // esi@1
  char result; // al@1
  void *(__thiscall *v11)(NiRefObject *, unsigned int); // edx@2

  v9 = this;
  result = PgWinSpr::Create((PgWinSpr *)&this->vfptr, iXPos, iYPos, pkSprData, pkParent, pcName, uiExtStyle);
  if ( result )
  {
    v9->vfptr[138].__vecDelDtor((NiRefObject *)v9, 0);
    v11 = v9->vfptr[129].__vecDelDtor;
    v9->m_uiButNum = pkSprData->m_akGeomData.m_uiSize;
    v11((NiRefObject *)&v9->vfptr, uiCmdMsg);
    v9->m_Pos = Pos;
    result = 1;
  }
  return result;
}

//----- (00594690) --------------------------------------------------------
void __thiscall PosInfoWinBut::DoAction(PosInfoWinBut *this)
{
  PosInfoWinBut *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_Pos);
}

//----- (005946C0) --------------------------------------------------------
char __thiscall LevelSelectWinBut::Create(LevelSelectWinBut *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, char *pcName, unsigned int uiExtStyle, unsigned int uiInvIndex)
{
  LevelSelectWinBut *v9; // esi@1
  char result; // al@1
  void *(__thiscall *v11)(NiRefObject *, unsigned int); // edx@2

  v9 = this;
  result = PgWinSpr::Create((PgWinSpr *)&this->vfptr, iXPos, iYPos, pkSprData, pkParent, pcName, uiExtStyle);
  if ( result )
  {
    v9->vfptr[138].__vecDelDtor((NiRefObject *)v9, 0);
    v11 = v9->vfptr[129].__vecDelDtor;
    v9->m_uiButNum = pkSprData->m_akGeomData.m_uiSize;
    v11((NiRefObject *)&v9->vfptr, uiCmdMsg);
    v9->m_uiInvIndex = uiInvIndex;
    result = 1;
  }
  return result;
}

//----- (00594730) --------------------------------------------------------
void __thiscall LevelSelectWinBut::DoAction(LevelSelectWinBut *this)
{
  LevelSelectWinBut *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiInvIndex);
}

//----- (00594760) --------------------------------------------------------
void __thiscall SkillInvWin::SkillInvWin(SkillInvWin *this)
{
  SkillInvWin *v1; // esi@1

  v1 = this;
  SkillIcon::SkillIcon((SkillIcon *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&SkillInvWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&SkillInvWin::`vftable'{for `IDirectMessenger'};
  v1->m_uiInvIndex = -1;
  SkillInvWin::SetSkill(v1, 0xFFFFu, 0);
  v1->m_iStaNum = -1;
  v1->m_bGTSkill = 0;
  v1->m_uiMapType = -1;
}
// 9A32EC: using guessed type void (__thiscall *SkillInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A330C: using guessed type int (__thiscall *SkillInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005947F0) --------------------------------------------------------
void __thiscall SkillInvWin::DoAction(SkillInvWin *this)
{
  SkillInvWin *v1; // esi@1
  PgWin *v2; // eax@2

  v1 = this;
  if ( !this->m_uiSkillType )
  {
    v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
    if ( v2 )
      PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiInvIndex);
  }
}

//----- (00594820) --------------------------------------------------------
void __thiscall SkillInvWin::DoRAction(SkillInvWin *this)
{
  SkillInvWin *v1; // esi@1
  PgWin *v2; // eax@2

  v1 = this;
  if ( !this->m_uiSkillType )
  {
    v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
    if ( v2 )
      PgWin::PostCommandMsg(v2, v1->m_uiRCmdMsg, v1->m_uiInvIndex);
  }
}

//----- (00594850) --------------------------------------------------------
int __thiscall SkillInvWin::SetSkill(SkillInvWin *this, int uiRecordIndex, unsigned int uiBuffType)
{
  unsigned int v3; // edi@1
  SkillInvWin *v4; // esi@1
  void *(__thiscall *v5)(NiRefObject *, unsigned int); // edx@2
  int result; // eax@2
  char *v7; // ebx@7
  unsigned int v8; // edi@8
  char *v9; // eax@11
  NiRefObjectVtbl *v10; // edi@20
  int v11; // ST04_4@20
  NiSourceTexture *v12; // eax@20
  NiRefObjectVtbl *v13; // edx@20
  int i; // [sp+Ch] [bp-4h]@1

  v3 = 0;
  v4 = this;
  i = 0;
  if ( GuildTournamentStateTab::GetTotal() )
  {
    while ( 1 )
    {
      if ( v3 >= GuildTournamentStateTab::GetTotal() )
      {
LABEL_7:
        v7 = 0;
      }
      else
      {
        while ( !CDataReader::GetRecord(
                   (CDataReader *)(ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ms_pkTable + 4),
                   v3) )
        {
          if ( ++v3 >= GuildTournamentStateTab::GetTotal() )
            goto LABEL_7;
        }
        v7 = CDataReader::GetRecord(
               (CDataReader *)(ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ms_pkTable + 4),
               v3);
      }
      v8 = i;
      if ( i >= ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::GetTotal() )
      {
LABEL_11:
        v9 = 0;
      }
      else
      {
        while ( !CDataReader::GetRecord(
                   (CDataReader *)(ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::ms_pkTable + 4),
                   v8) )
        {
          if ( ++v8 >= ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::GetTotal() )
            goto LABEL_11;
        }
        v9 = CDataReader::GetRecord(
               (CDataReader *)(ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::ms_pkTable + 4),
               v8);
      }
      if ( uiBuffType == *(_DWORD *)(v7 + 38)
        && uiRecordIndex < i
        && *(_WORD *)v7 == *(_WORD *)v9
        && *((_WORD *)v7 + 1) == *((_WORD *)v9 + 1) )
      {
        break;
      }
      if ( ++i >= GuildTournamentStateTab::GetTotal() )
        goto LABEL_2;
      v3 = i;
    }
    v10 = v4->vfptr;
    v11 = *((_DWORD *)v9 + 1);
    v12 = IconMgr::GetTexture(v9 + 8);
    ((void (__thiscall *)(SkillInvWin *, NiSourceTexture *, int, signed int, signed int))v10[146].__vecDelDtor)(
      v4,
      v12,
      v11,
      32,
      32);
    v13 = v4->vfptr;
    v4->m_uFlags &= 0xFFFEu;
    v13[60].__vecDelDtor((NiRefObject *)v4, 1u);
    result = i;
    v4->m_iStaNum = *((_WORD *)v7 + 1);
    v4->m_uiMapType = *(_WORD *)v7;
    v4->m_bGTSkill = 1;
  }
  else
  {
LABEL_2:
    ((void (__thiscall *)(SkillInvWin *, _DWORD, signed int, signed int, signed int))v4->vfptr[146].__vecDelDtor)(
      v4,
      0,
      -1,
      32,
      32);
    v5 = v4->vfptr[60].__vecDelDtor;
    v4->m_uFlags |= 1u;
    v5((NiRefObject *)&v4->vfptr, 0);
    result = -1;
  }
  return result;
}
// A8C1B8: using guessed type int ITableBase<GUILD_TOURNAMENT_SKILLDESC,GuildTournamentStateDescTab>::ms_pkTable;
// A8C1BC: using guessed type int ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ms_pkTable;

//----- (005949C0) --------------------------------------------------------
void __thiscall SkillWin::OnEmpowerClick(SkillWin *this, unsigned int uiIndex)
{
  SkillWin *v2; // esi@1
  SkillInvWin *v3; // ecx@1
  unsigned __int16 v4; // ax@3
  GameFrameWork *v5; // eax@3

  v2 = this;
  v3 = this->m_apkInvWin[uiIndex];
  if ( v3 && SkillIcon::GetSkill((SkillIcon *)&v3->vfptr) != -1 )
  {
    SkillWin::OnOpenPowerWindow(v2);
    v4 = SkillIcon::GetSkill((SkillIcon *)&v2->m_apkInvWin[uiIndex]->vfptr);
    SkillPowerWin::SetEmpowerSkill(v2->m_pkSkillPowerWin, v4);
    v5 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v5 )
      GameFrameWork::OpenPlayGuideWin(v5, BIL_IMPOWER_1);
  }
}

//----- (00594A30) --------------------------------------------------------
void __thiscall SkillWin::~SkillWin(SkillWin *this)
{
  SkillWin *v1; // ebx@1
  bool v2; // zf@1
  PgFont *v3; // eax@2
  PgFont *v4; // esi@3
  PgFont *v5; // esi@8
  int v6; // edi@12
  NiTListItem<NiPointer<PgFont> > **v7; // esi@12
  NiTListItem<NiPointer<PgFont> > **v8; // ST00_4@13
  NiPointer<PgFont> spFont; // [sp+18h] [bp-10h]@2
  int v10; // [sp+24h] [bp-4h]@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&SkillWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SkillWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_kCustomFontList.m_kAllocator.m_uiCount == 0;
  v10 = 3;
  if ( !v2 )
  {
    do
    {
      NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::RemoveHead(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *)&v1->m_kCustomFontList,
        (NiPointer<PgWin> *)&spFont);
      v3 = spFont.m_pObject;
      LOBYTE(v10) = 4;
      if ( spFont.m_pObject )
      {
        v4 = spFont.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&spFont.m_pObject->m_uiRefCount) && v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
        v3 = 0;
        spFont.m_pObject = 0;
      }
      LOBYTE(v10) = 3;
      if ( v3 )
      {
        v5 = v3;
        if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
        {
          if ( v5 )
            v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
        }
      }
    }
    while ( v1->m_kCustomFontList.m_kAllocator.m_uiCount );
  }
  v6 = (int)&v1->m_kCustomFontList;
  v1->m_kCustomFontList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> >Vtbl *)&PgTList<NiPointer<PgFont>>::`vftable';
  v7 = &v1->m_kCustomFontList.m_pkHead->m_pkNext;
  LOBYTE(v10) = 5;
  while ( v7 )
  {
    v8 = v7;
    v7 = (NiTListItem<NiPointer<PgFont> > **)*v7;
    (*(void (__thiscall **)(PgTList<NiPointer<PgFont> > *, NiTListItem<NiPointer<PgFont> > **))(*(_DWORD *)v6 + 8))(
      &v1->m_kCustomFontList,
      v8);
  }
  v1->m_kCustomFontList.m_kAllocator.m_uiCount = 0;
  v1->m_kCustomFontList.m_pkHead = 0;
  v1->m_kCustomFontList.m_pkTail = 0;
  *(_DWORD *)v6 = &NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::`vftable';
  v1->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  v10 = -1;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9A3578: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::`vftable')(void *p, char);
// 9A3598: using guessed type int (__thiscall *PgTList<NiPointer<PgFont>>::`vftable')(void *p, char);
// 9A35A8: using guessed type void (__thiscall *SkillWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A35C4: using guessed type int (__thiscall *SkillWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00594B60) --------------------------------------------------------
void __thiscall SkillWin::SkillWin(SkillWin *this)
{
  SkillWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&SkillWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&SkillWin::`vftable'{for `IDirectMessenger'};
  v1->m_kDrop.m_pkSender = 0;
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  v1->m_kDropContents.m_uiLot = 0;
  v1->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v1->m_kDropContents.m_kItemID = -1;
  v1->m_kCustomFontList.m_kAllocator.m_uiCount = 0;
  v1->m_kCustomFontList.m_pkHead = 0;
  v1->m_kCustomFontList.m_pkTail = 0;
  v1->m_kCustomFontList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> >Vtbl *)&PgTList<NiPointer<PgFont>>::`vftable';
  v1->m_kDrop.m_pkContents = &v1->m_kDropContents;
  v1->m_apkInvWin[0] = 0;
  v1->m_apkEmpowerWin[0] = 0;
  v1->m_apkInvWin[1] = 0;
  v1->m_apkEmpowerWin[1] = 0;
  v1->m_apkInvWin[2] = 0;
  v1->m_apkEmpowerWin[2] = 0;
  v1->m_apkInvWin[3] = 0;
  v1->m_apkEmpowerWin[3] = 0;
  v1->m_apkInvWin[4] = 0;
  v1->m_apkEmpowerWin[4] = 0;
  v1->m_apkInvWin[5] = 0;
  v1->m_apkEmpowerWin[5] = 0;
  v1->m_apkInvWin[6] = 0;
  v1->m_apkEmpowerWin[6] = 0;
  v1->m_apkInvWin[7] = 0;
  v1->m_apkEmpowerWin[7] = 0;
  v1->m_pkSkillEmpowerNotice = 0;
  v1->m_pkInfoWin = 0;
  v1->m_uiCurPageType = 0;
  v1->m_uiCurPage = 0;
  v1->m_pkSkillPowerWin = 0;
  v1->m_pkSkillEmpowerResetBtn = 0;
  v1->m_pkEmpowerDescSpr = 0;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9A3598: using guessed type int (__thiscall *PgTList<NiPointer<PgFont>>::`vftable')(void *p, char);
// 9A35A8: using guessed type void (__thiscall *SkillWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A35C4: using guessed type int (__thiscall *SkillWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00594C60) --------------------------------------------------------
PosInfoWinBut *__cdecl PosInfoWinBut::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, int Pos, char *pcName, unsigned int uiExtStyle)
{
  PgWin *v8; // eax@1
  PgWin *v9; // esi@1
  PgWin *v10; // edi@8
  PosInfoWinBut *v11; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v13; // [sp+20h] [bp-4h]@1

  v8 = (PgWin *)operator new(0x148u);
  v9 = v8;
  result.m_pObject = v8;
  v13 = 0;
  if ( v8 )
  {
    PgWinBut::PgWinBut((PgWinBut *)v8);
    v9->vfptr = (NiRefObjectVtbl *)&PosInfoWinBut::`vftable'{for `NiNode'};
    v9->vfptr = (IDirectMessengerVtbl *)&PosInfoWinBut::`vftable'{for `IDirectMessenger'};
    LODWORD(v9[1].m_kWorldBound.m_kCenter.x) = 0;
  }
  else
  {
    v9 = 0;
  }
  if ( v9 )
    InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  v13 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v9);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgSprData *, PgWin *, unsigned int, int, char *, unsigned int))v9->vfptr[140].__vecDelDtor)(
                          v9,
                          iXPos,
                          iYPos,
                          pkSprData,
                          pkParent,
                          uiCmdMsg,
                          Pos,
                          pcName,
                          uiExtStyle) )
  {
    ((void (__thiscall *)(PgWin *))v9->vfptr[89].__vecDelDtor)(v9);
    v13 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v11 = (PosInfoWinBut *)v9;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v9);
    if ( result.m_pObject )
    {
      v10 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v10 )
          v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
      }
    }
    v13 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v11 = 0;
  }
  return v11;
}
// 9A2E40: using guessed type void (__thiscall *PosInfoWinBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A2E5C: using guessed type int (__thiscall *PosInfoWinBut::`vftable'{for `NiNode'})(void *p, char);

//----- (00594DC0) --------------------------------------------------------
LevelSelectWinBut *__cdecl LevelSelectWinBut::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, char *pcName, unsigned int uiExtStyle, unsigned int uiInvIndex)
{
  PgWin *v8; // eax@1
  PgWin *v9; // esi@1
  PgWin *v10; // edi@8
  LevelSelectWinBut *v11; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v13; // [sp+20h] [bp-4h]@1

  v8 = (PgWin *)operator new(0x14Cu);
  v9 = v8;
  result.m_pObject = v8;
  v13 = 0;
  if ( v8 )
  {
    PgWinBut::PgWinBut((PgWinBut *)v8);
    v9->vfptr = (NiRefObjectVtbl *)&LevelSelectWinBut::`vftable'{for `NiNode'};
    v9->vfptr = (IDirectMessengerVtbl *)&LevelSelectWinBut::`vftable'{for `IDirectMessenger'};
    LODWORD(v9[1].m_kWorldBound.m_kCenter.x) = -1;
    LOBYTE(v9[1].m_kWorldBound.m_kCenter.y) = 0;
  }
  else
  {
    v9 = 0;
  }
  if ( v9 )
    InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  v13 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v9);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgSprData *, PgWin *, unsigned int, char *, unsigned int, unsigned int))v9->vfptr[140].__vecDelDtor)(
                          v9,
                          iXPos,
                          iYPos,
                          pkSprData,
                          pkParent,
                          uiCmdMsg,
                          pcName,
                          uiExtStyle,
                          uiInvIndex) )
  {
    ((void (__thiscall *)(PgWin *))v9->vfptr[89].__vecDelDtor)(v9);
    v13 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v11 = (LevelSelectWinBut *)v9;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v9);
    if ( result.m_pObject )
    {
      v10 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v10 )
          v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
      }
    }
    v13 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v11 = 0;
  }
  return v11;
}
// 9A3094: using guessed type void (__thiscall *LevelSelectWinBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A30B4: using guessed type int (__thiscall *LevelSelectWinBut::`vftable'{for `NiNode'})(void *p, char);

//----- (00594F30) --------------------------------------------------------
SkillInvWin *__cdecl SkillInvWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent)
{
  PgWin *v4; // eax@1
  PgWin *v5; // eax@2
  PgWin *v6; // esi@2
  PgWin *v7; // edi@8
  SkillInvWin *v8; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v10; // [sp+20h] [bp-4h]@1

  v4 = (PgWin *)operator new(0x1B0u);
  result.m_pObject = v4;
  v10 = 0;
  if ( v4 )
  {
    SkillInvWin::SkillInvWin((SkillInvWin *)v4);
    v6 = v5;
  }
  else
  {
    v6 = 0;
  }
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v10 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v6);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, PgWin *))v6->vfptr[153].__vecDelDtor)(
                          v6,
                          iXPos,
                          iYPos,
                          uiInvIndex,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v6->vfptr[89].__vecDelDtor)(v6);
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = (SkillInvWin *)v6;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v6);
    if ( result.m_pObject )
    {
      v7 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      }
    }
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = 0;
  }
  return v8;
}

//----- (00595070) --------------------------------------------------------
SkillWin *__cdecl SkillWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  SkillWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x2B8u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    SkillWin::SkillWin((SkillWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (SkillWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (005951A0) --------------------------------------------------------
char __thiscall SkillWin::Create(SkillWin *this, PgFrameWork *pkFrameWork)
{
  SkillWin *v2; // edi@1
  NiTexturePalette *v4; // ebx@7
  const char *v5; // eax@9
  PgSprData *v6; // eax@10
  NiNode *v7; // esi@11
  int v8; // esi@16
  int v9; // ebx@16
  NiSourceTexture *v10; // eax@16
  PgSprData *v11; // eax@17
  PgSprData *v12; // eax@21
  PgWinSpr *v13; // eax@21
  PgSprData *v14; // eax@21
  PgSprData *v15; // eax@21
  PgFont *v16; // eax@22
  PgWinText *v17; // esi@22
  NiUnsharedGeometryGroup *v18; // eax@22
  NiSourceTexture *v19; // esi@22
  PgSprData *v20; // eax@22
  NiPointer<PgSprData::PgHitTester> *v21; // ecx@27
  unsigned int v22; // esi@27
  PgFont *v23; // eax@27
  PgWinText *v24; // eax@27
  NiRefObjectVtbl *v25; // esi@27
  NiUnsharedGeometryGroup *v26; // eax@27
  PgFont *v27; // eax@27
  int v28; // esi@27
  PgSprData *v29; // eax@28
  SkillInvWin *v30; // eax@28
  PgFont *v31; // edx@28
  PgWinText *v32; // eax@28
  PosInfoWinBut *v33; // eax@28
  char *v34; // eax@28
  PgFont *v35; // eax@28
  PgWinText *v36; // eax@28
  LevelSelectWinBut *v37; // eax@28
  char *v38; // eax@28
  LevelSelectWinBut *v39; // eax@28
  char *v40; // eax@28
  PgSprData *v41; // esi@29
  PgSprData *v42; // ST54_4@29
  int v43; // esi@29
  char *v44; // eax@29
  NiSourceTexture *v45; // ST64_4@29
  char *v46; // eax@29
  NiSourceTexture *v47; // ST64_4@29
  char *v48; // eax@29
  char *v49; // eax@29
  char *v50; // eax@29
  PgSprData *v51; // eax@29
  PgFont *v52; // eax@32
  PgWinText *v53; // eax@32
  D3DXCOLOR v54; // ST54_16@32
  char *v55; // eax@32
  D3DXCOLOR v56; // ST54_16@32
  PgFont *v57; // eax@32
  D3DXCOLOR v58; // ST54_16@32
  char *v59; // eax@32
  D3DXCOLOR v60; // ST54_16@32
  PgFont *v61; // eax@32
  PgSprData *v62; // eax@32
  PgWinSpr *v63; // eax@32
  CSkillInitWin *v64; // eax@32
  void *(__thiscall *v65)(NiRefObject *, unsigned int); // edx@32
  int EmpowerTop; // [sp+78h] [bp-D4h]@24
  unsigned int NextLevelHeight; // [sp+7Ch] [bp-D0h]@25
  unsigned int EmpowerWidth; // [sp+80h] [bp-CCh]@24
  unsigned int NextLevelWidth; // [sp+84h] [bp-C8h]@25
  unsigned int PreLevelWidth; // [sp+88h] [bp-C4h]@26
  int EmpowerLeft; // [sp+8Ch] [bp-C0h]@24
  unsigned int PreLevelHeight; // [sp+90h] [bp-BCh]@26
  unsigned int EmpowerHeight; // [sp+94h] [bp-B8h]@24
  unsigned int IconTxtHeight; // [sp+98h] [bp-B4h]@22
  unsigned int IconLevWidth; // [sp+9Ch] [bp-B0h]@23
  int IconSlotTop; // [sp+A0h] [bp-ACh]@22
  int IconLevLeft; // [sp+A4h] [bp-A8h]@23
  int IconSlot00Left; // [sp+A8h] [bp-A4h]@22
  int NextLevelTop; // [sp+ACh] [bp-A0h]@25
  int PreLevelLeft; // [sp+B0h] [bp-9Ch]@26
  int IconLevTop; // [sp+B4h] [bp-98h]@23
  int PreLevelTop; // [sp+B8h] [bp-94h]@26
  unsigned int IconTxtWidth; // [sp+BCh] [bp-90h]@22
  int NextLevelLeft; // [sp+C0h] [bp-8Ch]@25
  unsigned int IconLevHeight; // [sp+C4h] [bp-88h]@23
  UIUtil ui; // [sp+C8h] [bp-84h]@27
  int IconTxtTop; // [sp+DCh] [bp-70h]@22
  int IconTxtLeft; // [sp+E0h] [bp-6Ch]@22
  unsigned int uiHeight; // [sp+E4h] [bp-68h]@21
  NiSourceTexture *pkTexture10; // [sp+E8h] [bp-64h]@28
  unsigned int uiWidth; // [sp+ECh] [bp-60h]@21
  int tempTop; // [sp+F0h] [bp-5Ch]@28
  unsigned int i; // [sp+F4h] [bp-58h]@27
  int tempLeft; // [sp+F8h] [bp-54h]@19
  int iOffY; // [sp+FCh] [bp-50h]@16
  NiSourceTexture *pkTexture; // [sp+100h] [bp-4Ch]@1
  NiPointer<PgFont> pkFont; // [sp+104h] [bp-48h]@1
  PgWinBut *pkBut; // [sp+108h] [bp-44h]@19
  int uiTop; // [sp+10Ch] [bp-40h]@10
  int uiLeft; // [sp+110h] [bp-3Ch]@10
  NiPointer<NiNode> spNode; // [sp+114h] [bp-38h]@1
  char acShapeName[33]; // [sp+118h] [bp-34h]@28
  int v103; // [sp+148h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v103 = 0;
  pkFont.m_pObject = 0;
  LOBYTE(v103) = 1;
  pkTexture = MenuTexMgr::GetTexture(4u);
  if ( !pkTexture )
  {
    v103 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( spNode.m_pObject )
        spNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spNode.m_pObject, 1u);
    }
    return 0;
  }
  v4 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "Game\\ChrSkill.nif");
  PgUtil::LoadNodeNifFile(v5, &spNode, v4);
  if ( !spNode.m_pObject )
    return 0;
  v6 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v6, 0, pkFrameWork, "SkillWin", 0) )
  {
    v8 = uiTop;
    v9 = uiLeft;
    iOffY = uiTop;
    v10 = MenuTexMgr::GetTexture(0x13u);
    if ( v10 )
      v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
    else
      v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v9, uiTop - v8, v11, (PgWin *)&v2->vfptr, 0, 0);
    pkBut = (PgWinBut *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, pkTexture);
    PgSprData::Add((PgSprData *)pkBut, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
    PgSprData::Add((PgSprData *)pkBut, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
    PgWinCloseBut::CreateWin(uiLeft - v9, uiTop - v8, (PgSprData *)pkBut, (PgWin *)&v2->vfptr);
    tempLeft = (int)MenuTexMgr::GetTexture(4u);
    if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
    {
      pkBut = (PgWinBut *)PgSprData::Create(
                            (NiAVObject *)&spNode.m_pObject->vfptr,
                            "HelpLinkNor",
                            &uiLeft,
                            &uiTop,
                            (NiSourceTexture *)tempLeft);
      PgSprData::Add((PgSprData *)pkBut, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
      PgSprData::Add((PgSprData *)pkBut, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
      PgWinBut::CreateWin(uiLeft - v9, uiTop - v8, (PgSprData *)pkBut, (PgWin *)&v2->vfptr, 0x16u, 0, 0);
    }
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
    v13 = PgWinSpr::CreateWin(uiLeft - v9, uiTop - v8, v12, (PgWin *)&v2->vfptr, 0, 0);
    v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, pkTexture);
    PgWinSpr::CreateWin(uiLeft - v9, uiTop - v8, v14, (PgWin *)&v2->vfptr, 0, 0);
    v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnBack", &uiLeft, &uiTop, pkTexture);
    PgWinSpr::CreateWin(uiLeft - v9, uiTop - v8, v15, (PgWin *)&v2->vfptr, 0, 0);
    if ( PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "WinTitle",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight) )
    {
      v16 = Font::Get(MAIN_MENU);
      v17 = PgWinText::CreateWin(uiLeft - v9, uiTop - v8 + 2, uiWidth, uiHeight, v16, (PgWin *)&v2->vfptr, 0, 0);
      v17->vfptr[122].__vecDelDtor((NiRefObject *)v17, 5u);
      v17->vfptr[117].__vecDelDtor((NiRefObject *)v17, (unsigned int)&Color::m_kDxWinTitleColor);
      tempLeft = (int)&v17->vfptr[118];
      v18 = TextData::Get(0x9EFEF4E8);
      (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))tempLeft)(v17, v18);
      v17->vfptr[60].__vecDelDtor((NiRefObject *)v17, 0);
      v19 = pkTexture;
      v20 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, pkTexture);
      PgWinSpr::CreateWin(uiLeft - v9, uiTop - iOffY, v20, (PgWin *)&v2->vfptr, 0, 0);
      PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot00", &IconSlot00Left, &IconSlotTop, v19);
      if ( PgUtil::GetTriShapeRect(
             (NiAVObject *)&spNode.m_pObject->vfptr,
             "IconTxtPro",
             &IconTxtLeft,
             &IconTxtTop,
             &IconTxtWidth,
             &IconTxtHeight) )
      {
        if ( PgUtil::GetTriShapeRect(
               (NiAVObject *)&spNode.m_pObject->vfptr,
               "IconLevelPro",
               &IconLevLeft,
               &IconLevTop,
               &IconLevWidth,
               &IconLevHeight)
          && PgUtil::GetTriShapeRect(
               (NiAVObject *)&spNode.m_pObject->vfptr,
               "ImPowerNor",
               &EmpowerLeft,
               &EmpowerTop,
               &EmpowerWidth,
               &EmpowerHeight)
          && PgUtil::GetTriShapeRect(
               (NiAVObject *)&spNode.m_pObject->vfptr,
               "NextLevelNor",
               &NextLevelLeft,
               &NextLevelTop,
               &NextLevelWidth,
               &NextLevelHeight)
          && PgUtil::GetTriShapeRect(
               (NiAVObject *)&spNode.m_pObject->vfptr,
               "PreLevelNor",
               &PreLevelLeft,
               &PreLevelTop,
               &PreLevelWidth,
               &PreLevelHeight) )
        {
          v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &uiLeft, &uiTop, v19)->m_akHitTester.m_pBase;
          v22 = v21->m_pObject->m_uiHeight;
          tempLeft = v21->m_pObject->m_uiWidth;
          v23 = Font::Get(MAIN_MENU);
          v24 = PgWinText::CreateWin(uiLeft, uiTop, tempLeft, v22, v23, (PgWin *)&v2->vfptr, 0, 0);
          v2->m_pkSkillEmpowerNotice = v24;
          v24->vfptr[122].__vecDelDtor((NiRefObject *)v24, 2u);
          v25 = v2->m_pkSkillEmpowerNotice->vfptr;
          v26 = TextData2::Get(0xE0E1D5D8);
          v25[118].__vecDelDtor((NiRefObject *)v2->m_pkSkillEmpowerNotice, (unsigned int)v26);
          ((void (__stdcall *)(_DWORD))v2->m_pkSkillEmpowerNotice->vfptr[60].__vecDelDtor)(0);
          UIUtil::UIUtil(&ui);
          LOBYTE(v103) = 2;
          UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
          UIUtil::SetOffset(&ui, v9, iOffY);
          UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
          v27 = UIUtil::AddOutLineFromFontType(MAIN_MENU, 0);
          NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&pkFont, (NiD3DDefaultShader *)v27);
          NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(
            (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *)&v2->m_kCustomFontList,
            (NiPointer<NiDX92DBufferData> *)&pkFont);
          i = 0;
          v28 = (int)v2->m_apkInvTextWin;
          do
          {
            pkTexture10 = (NiSourceTexture *)(i + 1);
            sprintf(acShapeName, "IconSlotBox%02d", i + 1);
            v29 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, pkTexture);
            PgWinSpr::CreateWin(uiLeft - v9, uiTop - iOffY, v29, (PgWin *)&v2->vfptr, 0, 0);
            PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot00", &tempLeft, &tempTop, pkTexture);
            v30 = SkillInvWin::CreateWin(
                    uiLeft + IconSlot00Left - v9,
                    uiTop + IconSlotTop - iOffY,
                    i,
                    (PgWin *)&v2->vfptr);
            *(_DWORD *)(v28 - 32) = v30;
            SkillInvWin::SetSkill(v30, 0xFFFFu, 0);
            (*(void (__stdcall **)(signed int))(**(_DWORD **)(v28 - 32) + 516))(9);
            (*(void (__stdcall **)(signed int))(**(_DWORD **)(v28 - 32) + 560))(10);
            v31 = pkFont.m_pObject;
            *(_DWORD *)(*(_DWORD *)(v28 - 32) + 272) = g_pkSkillInfoWin;
            v32 = PgWinText::CreateWin(
                    uiLeft + IconTxtLeft - v9,
                    uiTop + IconTxtTop - iOffY,
                    IconTxtWidth,
                    IconTxtHeight,
                    v31,
                    (PgWin *)&v2->vfptr,
                    0,
                    0);
            *(_DWORD *)v28 = v32;
            v32->vfptr[117].__vecDelDtor((NiRefObject *)v32, (unsigned int)&Color::m_kDxGreenColor);
            (*(void (__stdcall **)(signed int))(**(_DWORD **)v28 + 488))(5);
            (*(void (__stdcall **)(void *))(**(_DWORD **)v28 + 472))(&unk_9A2B26);
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v28 + 240))(0);
            pkBut = (PgWinBut *)PgSprData::Create(
                                  (NiAVObject *)&spNode.m_pObject->vfptr,
                                  "ImPowerNor",
                                  &tempLeft,
                                  &tempTop,
                                  0);
            PgSprData::Add((PgSprData *)pkBut, (NiAVObject *)&spNode.m_pObject->vfptr, "ImPowerClick");
            PgSprData::Add((PgSprData *)pkBut, (NiAVObject *)&spNode.m_pObject->vfptr, "ImPowerOver");
            v33 = PosInfoWinBut::CreateWin(
                    uiLeft + IconTxtLeft - v9,
                    IconTxtTop - iOffY + uiTop + 3,
                    (PgSprData *)pkBut,
                    (PgWin *)&v2->vfptr,
                    0x15u,
                    i,
                    0,
                    0);
            *(_DWORD *)(v28 + 236) = v33;
            v33->m_pkToolTipWin = g_pkToolTipWin;
            v34 = (char *)TextData2::Get(0xADE6D0ED);
            PgWin::SetToolTipWinText(*(PgWin **)(v28 + 236), v34);
            v35 = Font::Get(MAIN_MENU);
            v36 = PgWinText::CreateWin(
                    uiLeft + IconLevLeft - v9,
                    uiTop + IconLevTop - iOffY,
                    IconLevWidth,
                    IconLevHeight,
                    v35,
                    (PgWin *)&v2->vfptr,
                    0,
                    0);
            *(_DWORD *)(v28 + 32) = v36;
            v36->vfptr[122].__vecDelDtor((NiRefObject *)v36, 5u);
            (*(void (__stdcall **)(void *))(**(_DWORD **)(v28 + 32) + 472))(&unk_9A2B27);
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v28 + 32) + 240))(0);
            pkBut = (PgWinBut *)PgSprData::Create(
                                  (NiAVObject *)&spNode.m_pObject->vfptr,
                                  "NextLevelNor",
                                  &tempLeft,
                                  &tempTop,
                                  pkTexture);
            PgSprData::Add((PgSprData *)pkBut, (NiAVObject *)&spNode.m_pObject->vfptr, "NextLevelClick");
            PgSprData::Add((PgSprData *)pkBut, (NiAVObject *)&spNode.m_pObject->vfptr, "NextLevelOver");
            v37 = LevelSelectWinBut::CreateWin(
                    uiLeft + NextLevelLeft - v9,
                    uiTop + NextLevelTop - iOffY,
                    (PgSprData *)pkBut,
                    (PgWin *)&v2->vfptr,
                    0x13u,
                    0,
                    0,
                    i);
            *(_DWORD *)(v28 + 64) = v37;
            v37->m_pkToolTipWin = g_pkToolTipWin;
            v38 = (char *)TextData2::Get(0xFD01F2Cu);
            PgWin::SetToolTipWinText(*(PgWin **)(v28 + 64), v38);
            pkBut = (PgWinBut *)PgSprData::Create(
                                  (NiAVObject *)&spNode.m_pObject->vfptr,
                                  "PreLevelNor",
                                  &tempLeft,
                                  &tempTop,
                                  pkTexture);
            PgSprData::Add((PgSprData *)pkBut, (NiAVObject *)&spNode.m_pObject->vfptr, "PreLevelClick");
            PgSprData::Add((PgSprData *)pkBut, (NiAVObject *)&spNode.m_pObject->vfptr, "PreLevelOver");
            v39 = LevelSelectWinBut::CreateWin(
                    uiLeft + PreLevelLeft - v9,
                    uiTop + PreLevelTop - iOffY,
                    (PgSprData *)pkBut,
                    (PgWin *)&v2->vfptr,
                    0x14u,
                    0,
                    0,
                    i);
            *(_DWORD *)(v28 + 96) = v39;
            v39->m_pkToolTipWin = g_pkToolTipWin;
            v40 = (char *)TextData2::Get(0x5D271E1Bu);
            PgWin::SetToolTipWinText(*(PgWin **)(v28 + 96), v40);
            v28 += 4;
            i = (unsigned int)pkTexture10;
          }
          while ( (unsigned int)pkTexture10 < 8 );
          v41 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ActSkNor", &uiLeft, &uiTop, pkTexture);
          PgSprData::Add(v41, (NiAVObject *)&spNode.m_pObject->vfptr, "ActSkClick");
          PgSprData::Add(v41, (NiAVObject *)&spNode.m_pObject->vfptr, "ActSkOver");
          v42 = v41;
          v43 = iOffY;
          pkBut = PgWinBut::CreateWin(uiLeft - v9, uiTop - iOffY, v42, (PgWin *)&v2->vfptr, 0xBu, 0, 0);
          v44 = (char *)TextData::Get(0xDBF6F1F3);
          PgWin::SetToolTipWinText((PgWin *)&pkBut->vfptr, v44);
          v45 = pkTexture;
          pkBut->m_pkToolTipWin = g_pkToolTipWin;
          pkBut = (PgWinBut *)PgSprData::Create(
                                (NiAVObject *)&spNode.m_pObject->vfptr,
                                "PasSkNor",
                                &uiLeft,
                                &uiTop,
                                v45);
          PgSprData::Add((PgSprData *)pkBut, (NiAVObject *)&spNode.m_pObject->vfptr, "PasSkClick");
          PgSprData::Add((PgSprData *)pkBut, (NiAVObject *)&spNode.m_pObject->vfptr, "PasSkOver");
          pkBut = PgWinBut::CreateWin(uiLeft - v9, uiTop - v43, (PgSprData *)pkBut, (PgWin *)&v2->vfptr, 0xCu, 0, 0);
          v46 = (char *)TextData::Get(0xEAF8FB37);
          PgWin::SetToolTipWinText((PgWin *)&pkBut->vfptr, v46);
          v47 = pkTexture;
          pkBut->m_pkToolTipWin = g_pkToolTipWin;
          pkBut = (PgWinBut *)PgSprData::Create(
                                (NiAVObject *)&spNode.m_pObject->vfptr,
                                "ProSkNor",
                                &uiLeft,
                                &uiTop,
                                v47);
          PgSprData::Add((PgSprData *)pkBut, (NiAVObject *)&spNode.m_pObject->vfptr, "ProSkClick");
          PgSprData::Add((PgSprData *)pkBut, (NiAVObject *)&spNode.m_pObject->vfptr, "ProSkOver");
          pkBut = PgWinBut::CreateWin(uiLeft - v9, uiTop - v43, (PgSprData *)pkBut, (PgWin *)&v2->vfptr, 0xEu, 0, 0);
          v48 = (char *)TextData::Get(0xF2E5F03B);
          PgWin::SetToolTipWinText((PgWin *)&pkBut->vfptr, v48);
          pkBut->m_pkToolTipWin = g_pkToolTipWin;
          pkTexture10 = MenuTexMgr::GetTexture(0x1Cu);
          pkBut = (PgWinBut *)PgSprData::Create(
                                (NiAVObject *)&spNode.m_pObject->vfptr,
                                "PrePageNor",
                                &uiLeft,
                                &uiTop,
                                pkTexture10);
          PgSprData::Add((PgSprData *)pkBut, (NiAVObject *)&spNode.m_pObject->vfptr, "PrePageClick");
          PgSprData::Add((PgSprData *)pkBut, (NiAVObject *)&spNode.m_pObject->vfptr, "PrePageOver");
          pkBut = PgWinBut::CreateWin(uiLeft - v9, uiTop - v43, (PgSprData *)pkBut, (PgWin *)&v2->vfptr, 0xFu, 0, 0);
          pkBut->m_pkToolTipWin = g_pkToolTipWin;
          v49 = (char *)TextData3::Get(0x6A8A9870u);
          PgWin::SetToolTipWinText((PgWin *)&pkBut->vfptr, v49);
          pkBut = (PgWinBut *)PgSprData::Create(
                                (NiAVObject *)&spNode.m_pObject->vfptr,
                                "NextPageNor",
                                &uiLeft,
                                &uiTop,
                                pkTexture10);
          PgSprData::Add((PgSprData *)pkBut, (NiAVObject *)&spNode.m_pObject->vfptr, "NextPageClick");
          PgSprData::Add((PgSprData *)pkBut, (NiAVObject *)&spNode.m_pObject->vfptr, "NextPageOver");
          pkBut = PgWinBut::CreateWin(uiLeft - v9, uiTop - v43, (PgSprData *)pkBut, (PgWin *)&v2->vfptr, 0x10u, 0, 0);
          pkBut->m_pkToolTipWin = g_pkToolTipWin;
          v50 = (char *)TextData3::Get(0x25449D82u);
          PgWin::SetToolTipWinText((PgWin *)&pkBut->vfptr, v50);
          v51 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Number", &uiLeft, &uiTop, pkTexture);
          PgWinSpr::CreateWin(uiLeft - v9, uiTop - v43, v51, (PgWin *)&v2->vfptr, 0, 0);
          if ( PgUtil::GetTriShapeRect(
                 (NiAVObject *)&spNode.m_pObject->vfptr,
                 "Number01",
                 &uiLeft,
                 &uiTop,
                 &uiWidth,
                 &uiHeight) )
          {
            v52 = Font::Get(0);
            v53 = PgWinText::CreateWin(uiLeft - v9, uiTop - v43, uiWidth, uiHeight, v52, (PgWin *)&v2->vfptr, 0, 0);
            v2->m_pkPageText = v53;
            v53->vfptr[122].__vecDelDtor((NiRefObject *)v53, 5u);
            *(_QWORD *)&v54.r = *(_QWORD *)&Color::m_kDxWinTitleColor.r;
            *(_QWORD *)&v54.b = *(_QWORD *)&Color::m_kDxWinTitleColor.b;
            v55 = (char *)TextData::Get(0x4B47438Cu);
            v2->m_pkSkillEmpowerTitleText = UIUtil::CreateTextNoSpr(&ui, "SPwrPt", v55, v54, 6u);
            *(_QWORD *)&v56.r = *(_QWORD *)&Color::m_kDxWinTitleColor.r;
            *(_QWORD *)&v56.b = *(_QWORD *)&Color::m_kDxWinTitleColor.b;
            v2->m_pkSkillEmpowerPointText = UIUtil::CreateTextNoSpr(&ui, "SPwrPtBox", "0", v56, 4u);
            v57 = UIUtil::AddOutLineFromFontType(SMALL, 0);
            NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&pkFont, (NiD3DDefaultShader *)v57);
            ((void (__stdcall *)(PgFont *))v2->m_pkSkillEmpowerPointText->vfptr[113].__vecDelDtor)(pkFont.m_pObject);
            ((void (__stdcall *)(D3DXCOLOR *))v2->m_pkSkillEmpowerPointText->vfptr[117].__vecDelDtor)(&Color::m_kDxGreenColor);
            NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(
              (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *)&v2->m_kCustomFontList,
              (NiPointer<NiDX92DBufferData> *)&pkFont);
            *(_QWORD *)&v58.r = *(_QWORD *)&Color::m_kDxWinTitleColor.r;
            *(_QWORD *)&v58.b = *(_QWORD *)&Color::m_kDxWinTitleColor.b;
            v59 = (char *)TextData::Get(0x36602732u);
            v2->m_pkSkillEmpowerAntiTitleText = UIUtil::CreateTextNoSpr(&ui, "SPwrPt01", v59, v58, 6u);
            *(_QWORD *)&v60.r = *(_QWORD *)&Color::m_kDxWinTitleColor.r;
            *(_QWORD *)&v60.b = *(_QWORD *)&Color::m_kDxWinTitleColor.b;
            v2->m_pkSkillEmpowerAntiPointText = UIUtil::CreateTextNoSpr(&ui, "SPwrPtBox01", "0", v60, 4u);
            v61 = UIUtil::AddOutLineFromFontType(SMALL, 0);
            NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&pkFont, (NiD3DDefaultShader *)v61);
            ((void (__stdcall *)(PgFont *))v2->m_pkSkillEmpowerAntiPointText->vfptr[113].__vecDelDtor)(pkFont.m_pObject);
            ((void (__stdcall *)(D3DXCOLOR *))v2->m_pkSkillEmpowerAntiPointText->vfptr[117].__vecDelDtor)(&Color::m_kDxGreenColor);
            NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(
              (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *)&v2->m_kCustomFontList,
              (NiPointer<NiDX92DBufferData> *)&pkFont);
            v62 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PBtn", &uiLeft, &uiTop, pkTexture);
            v63 = PgWinSpr::CreateWin(uiLeft, uiTop, v62, (PgWin *)&v2->vfptr, 0, 0);
            v2->m_pkEmpowerDescSpr = v63;
            v63->vfptr[64].__vecDelDtor((NiRefObject *)v63, 1u);
            v2->m_pkProductSkillSelectWin = ProductSkillSelectWin::CreateWin(0);
            v64 = CSkillInitWin::CreateWin(0);
            v65 = v2->vfptr[59].__vecDelDtor;
            v2->m_pkProductSkillInitWin = v64;
            ((void (__thiscall *)(SkillWin *, unsigned int, unsigned int, _DWORD, _DWORD))v65)(
              v2,
              PgWin::ms_uiScreenWidth,
              PgWin::ms_uiScreenHeight,
              0.5,
              0.5);
            LOBYTE(v103) = 1;
            UIUtil::~UIUtil(&ui);
            LOBYTE(v103) = 0;
            NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkFont);
            v103 = -1;
            NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
            return 1;
          }
          LOBYTE(v103) = 1;
          UIUtil::~UIUtil(&ui);
        }
      }
    }
    LOBYTE(v103) = 0;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkFont);
    v103 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  v7 = spNode.m_pObject;
  v103 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  return 0;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00596110) --------------------------------------------------------
void __thiscall SkillWin::SetLevel(SkillWin *this, unsigned int InvIndex, char curLevel)
{
  SkillWin *v3; // ebx@1
  bool v4; // zf@1
  unsigned int v5; // eax@2
  unsigned int v6; // ecx@2
  int v7; // edi@5
  int v8; // esi@5
  int (__thiscall *v9)(int, int); // eax@5
  int *v10; // eax@7
  int v11; // eax@8
  const char *v12; // ecx@9
  unsigned int v13; // edi@9
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v14; // eax@9
  bool v15; // cf@9
  bool v16; // bl@11
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v17; // eax@14
  bool v18; // bl@16
  SkillWin *v19; // edi@19
  unsigned int v20; // ebx@19
  unsigned int totalNum; // [sp+10h] [bp-68h]@2
  Skill::EmpowerInfo kInfo; // [sp+14h] [bp-64h]@19
  unsigned int v23; // [sp+18h] [bp-60h]@1
  SkillWin *v24; // [sp+1Ch] [bp-5Ch]@1
  int kSkillID; // [sp+20h] [bp-58h]@5
  unsigned int i; // [sp+24h] [bp-54h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+28h] [bp-50h]@9
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > str; // [sp+44h] [bp-34h]@9
  char levInfoTxt[6]; // [sp+60h] [bp-18h]@19
  int v30; // [sp+74h] [bp-4h]@9

  v3 = this;
  v4 = this->m_uiCurPageType == 0;
  v24 = this;
  v23 = InvIndex;
  if ( v4 )
  {
    v5 = Skill::GetTotalLearnActSkill();
    v6 = 0;
    totalNum = v5;
    i = 0;
    if ( v5 )
    {
      while ( 1 )
      {
        v7 = Skill::GetLearnActSkillInfo(v6)->kSkillID;
        v8 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
        v9 = *(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 16);
        kSkillID = v7;
        if ( (unsigned __int8)v9(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable, v7) )
        {
          if ( (unsigned __int16)v7 <= *(_WORD *)(v8 + 200) )
          {
            v10 = (int *)(*(_DWORD *)(v8 + 196) + 4 * (unsigned __int16)v7);
            if ( *v10 )
            {
              v11 = *v10;
              if ( v11 )
              {
                v12 = (const char *)(v11 + 34);
                v13 = strlen((const char *)(v11 + 34));
                str._Myres = 15;
                str._Mysize = 0;
                str._Bx._Buf[0] = 0;
                std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&str, v12, strlen(v12));
                v30 = 0;
                v14 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(
                        &str,
                        &result,
                        0,
                        v13 - 4);
                v15 = v14->_Myres < 0x10;
                LOBYTE(v30) = 1;
                if ( !v15 )
                  v14 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v14->_Bx._Ptr;
                v16 = strcmp(
                        (const char *)((int (*)(void))v3->m_apkInvTextWin[v23]->vfptr[121].__vecDelDtor)(),
                        v14->_Bx._Buf) == 0;
                LOBYTE(v30) = 0;
                if ( result._Myres >= 0x10 )
                  operator delete(result._Bx._Ptr);
                if ( v16 )
                {
                  v17 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(
                          &str,
                          &result,
                          v13 - 3,
                          2u);
                  if ( v17->_Myres >= 0x10 )
                    v17 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v17->_Bx._Ptr;
                  v18 = (unsigned __int8)curLevel == atoi(v17->_Bx._Buf);
                  if ( result._Myres >= 0x10 )
                    operator delete(result._Bx._Ptr);
                  if ( v18 )
                  {
                    v19 = v24;
                    v20 = v23;
                    SkillInvWin::SetSkill(v24->m_apkInvWin[v23], kSkillID, 0);
                    sprintf(levInfoTxt, "%02d/%02d", (unsigned __int8)curLevel, v19->m_apkInvLevNextBtn[v20]->maxLevel);
                    ((void (__stdcall *)(char *))v19->m_apkInvLevWin[v20]->vfptr[118].__vecDelDtor)(levInfoTxt);
                    Skill::GetAccumulatedEmpowerInfo(&kInfo, kSkillID);
                    SkillIcon::SetEmpowerInfo((SkillIcon *)&v19->m_apkInvWin[v20]->vfptr, kInfo);
                  }
                }
                v30 = -1;
                if ( str._Myres >= 0x10 )
                  operator delete(str._Bx._Ptr);
              }
            }
          }
        }
        v6 = i + 1;
        i = v6;
        if ( v6 >= totalNum )
          break;
        v3 = v24;
      }
    }
  }
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (00596390) --------------------------------------------------------
unsigned int __thiscall SkillWin::GetLearnSkillNum(SkillWin *this)
{
  unsigned int v1; // eax@1
  SkillData **v2; // ebx@2
  unsigned int v3; // eax@2
  unsigned int v4; // ecx@2
  Skill::LearnSkillInfo *v5; // eax@5
  int v6; // edi@5
  int v7; // esi@5
  int *v8; // eax@7
  int v9; // eax@8
  const char *v10; // ecx@9
  char *v11; // eax@10
  char *v12; // esi@11
  int v13; // edi@13
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v14; // eax@13
  bool v15; // bl@15
  SkillData *v16; // eax@19
  SkillData *v17; // ebx@20
  char *v18; // esi@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v19; // eax@21
  bool v20; // bl@23
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v21; // eax@26
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v22; // eax@31
  const char *v23; // edx@32
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v24; // eax@36
  SkillData **v25; // edi@40
  SkillData **v26; // edx@40
  int v27; // esi@42
  unsigned int v28; // eax@43
  unsigned int v29; // eax@44
  unsigned int v30; // ecx@44
  unsigned int v31; // ecx@46
  unsigned int v32; // eax@54
  unsigned int v33; // eax@55
  unsigned int v34; // ecx@55
  unsigned int v35; // ecx@57
  SkillData **v36; // esi@68
  const char *v38; // ecx@75
  SkillData **v39; // edi@75
  SkillData *v40; // eax@76
  SkillData *v41; // esi@77
  int v42; // edi@79
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v43; // eax@79
  bool v44; // bl@81
  SkillData **v45; // eax@86
  SkillData **v46; // ebx@87
  char *v47; // esi@88
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v48; // eax@88
  bool v49; // bl@90
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v50; // eax@93
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v51; // eax@98
  bool v52; // cf@98
  const char *v53; // edx@99
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v54; // eax@103
  SkillData **v55; // edx@107
  int v56; // esi@109
  unsigned int v57; // eax@110
  unsigned int v58; // eax@111
  unsigned int v59; // ecx@111
  unsigned int v60; // ecx@113
  unsigned int v61; // eax@121
  unsigned int v62; // eax@122
  unsigned int v63; // ecx@122
  unsigned int v64; // ecx@124
  SkillData **v65; // esi@135
  unsigned int totalNum; // [sp+10h] [bp-70h]@2
  unsigned int totalNuma; // [sp+10h] [bp-70h]@74
  unsigned __int16 kSkillID; // [sp+14h] [bp-6Ch]@5
  signed __int16 kSkillIDa; // [sp+14h] [bp-6Ch]@75
  unsigned int uiTotal; // [sp+18h] [bp-68h]@1
  unsigned int i; // [sp+1Ch] [bp-64h]@2
  unsigned int ia; // [sp+1Ch] [bp-64h]@74
  std::vector<SkillData *,std::allocator<SkillData *> > m_listExcelData; // [sp+20h] [bp-60h]@2
  SkillData *data; // [sp+30h] [bp-50h]@9
  std::_Vector_iterator<std::_Vector_val<SkillData *,std::allocator<SkillData *> > > iterCur; // [sp+34h] [bp-4Ch]@9
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > str; // [sp+38h] [bp-48h]@9
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+54h] [bp-2Ch]@13
  int v78; // [sp+7Ch] [bp-4h]@2

  v1 = this->m_uiCurPageType;
  uiTotal = 0;
  if ( !v1 )
  {
    v2 = 0;
    m_listExcelData._Myfirst = 0;
    m_listExcelData._Mylast = 0;
    m_listExcelData._Myend = 0;
    v78 = 0;
    v3 = Skill::GetTotalLearnActSkill();
    v4 = 0;
    totalNum = v3;
    i = 0;
    if ( v3 > 0 )
    {
      while ( 1 )
      {
        v5 = Skill::GetLearnActSkillInfo(v4);
        v6 = v5->kSkillID;
        v7 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
        kSkillID = v5->kSkillID;
        if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                              + 16))(
                                ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                                v6) )
        {
          if ( (unsigned __int16)v6 <= *(_WORD *)(v7 + 200) )
          {
            v8 = (int *)(*(_DWORD *)(v7 + 196) + 4 * (unsigned __int16)v6);
            if ( *v8 )
            {
              v9 = *v8;
              if ( v9 )
              {
                v10 = (const char *)(v9 + 34);
                iterCur._Ptr = (SkillData **)strlen((const char *)(v9 + 34));
                str._Myres = 15;
                str._Mysize = 0;
                str._Bx._Buf[0] = 0;
                std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&str, v10, strlen(v10));
                LOBYTE(v78) = 1;
                data = (SkillData *)v2;
                if ( v2 == m_listExcelData._Mylast )
                {
LABEL_19:
                  v16 = (SkillData *)operator new(0x20u);
                  if ( v16 )
                  {
                    v16->skillName._Myres = 15;
                    v16->skillName._Mysize = 0;
                    v16->skillName._Bx._Buf[0] = 0;
                    v17 = v16;
                  }
                  else
                  {
                    v17 = 0;
                  }
                  data = v17;
                  v22 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(
                          &str,
                          &result,
                          0,
                          (unsigned int)(iterCur._Ptr - 1));
                  LOBYTE(v78) = 2;
                  if ( v22->_Myres < 0x10 )
                    v23 = (const char *)v22;
                  else
                    v23 = v22->_Bx._Ptr;
                  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                    &v17->skillName,
                    v23,
                    strlen(v23));
                  LOBYTE(v78) = 1;
                  if ( result._Myres >= 0x10 )
                    operator delete(result._Bx._Ptr);
                  v24 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(
                          &str,
                          &result,
                          (unsigned int)iterCur._Ptr - 3,
                          2u);
                  if ( v24->_Myres >= 0x10 )
                    v24 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v24->_Bx._Ptr;
                  v17->skillLv = atoi(v24->_Bx._Buf);
                  if ( result._Myres >= 0x10 )
                    operator delete(result._Bx._Ptr);
                  v25 = m_listExcelData._Mylast;
                  v26 = m_listExcelData._Myfirst;
                  v17->id = kSkillID;
                  if ( &data >= v25 || v26 > &data )
                  {
                    if ( v25 == m_listExcelData._Myend )
                    {
                      v32 = v25 - v26;
                      if ( v32 > 0x3FFFFFFE )
                        goto LABEL_72;
                      v33 = v32 + 1;
                      v34 = m_listExcelData._Myend - v26;
                      if ( v33 > v34 )
                      {
                        if ( 0x3FFFFFFF - (v34 >> 1) >= v34 )
                          v35 = (v34 >> 1) + v34;
                        else
                          v35 = 0;
                        if ( v35 < v33 )
                          v35 = v33;
                        std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
                          (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&m_listExcelData,
                          v35);
                        v25 = m_listExcelData._Mylast;
                      }
                    }
                    if ( v25 )
                      *v25 = v17;
                  }
                  else
                  {
                    v27 = &data - v26;
                    if ( v25 == m_listExcelData._Myend )
                    {
                      v28 = v25 - v26;
                      if ( v28 > 0x3FFFFFFE )
                        goto LABEL_72;
                      v29 = v28 + 1;
                      v30 = m_listExcelData._Myend - v26;
                      if ( v29 > v30 )
                      {
                        if ( 0x3FFFFFFF - (v30 >> 1) >= v30 )
                          v31 = (v30 >> 1) + v30;
                        else
                          v31 = 0;
                        if ( v31 < v29 )
                          v31 = v29;
                        std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
                          (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&m_listExcelData,
                          v31);
                        v25 = m_listExcelData._Mylast;
                        v26 = m_listExcelData._Myfirst;
                      }
                    }
                    if ( v25 )
                      *v25 = v26[v27];
                  }
                  ++uiTotal;
                  m_listExcelData._Mylast = v25 + 1;
                }
                else
                {
                  while ( 1 )
                  {
                    v11 = data->skillName._Bx._Ptr;
                    if ( *((_DWORD *)data->skillName._Bx._Ptr + 5) < 0x10u )
                      v12 = data->skillName._Bx._Ptr;
                    else
                      v12 = *(char **)v11;
                    v13 = (unsigned __int8)v11[28];
                    v14 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(
                            &str,
                            &result,
                            0,
                            (unsigned int)(iterCur._Ptr - 1));
                    if ( v14->_Myres >= 0x10 )
                      v14 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v14->_Bx._Ptr;
                    v15 = strcmp(v12, v14->_Bx._Buf) == 0;
                    if ( result._Myres >= 0x10 )
                      operator delete(result._Bx._Ptr);
                    if ( v15 )
                      break;
                    data = (SkillData *)((char *)data + 4);
                    if ( data == (SkillData *)m_listExcelData._Mylast )
                      goto LABEL_19;
                  }
                  v18 = (char *)iterCur._Ptr - 3;
                  v19 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(
                          &str,
                          &result,
                          (unsigned int)iterCur._Ptr - 3,
                          2u);
                  if ( v19->_Myres >= 0x10 )
                    v19 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v19->_Bx._Ptr;
                  v20 = v13 < atoi(v19->_Bx._Buf);
                  if ( result._Myres >= 0x10 )
                    operator delete(result._Bx._Ptr);
                  if ( v20 )
                  {
                    v21 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(
                            &str,
                            &result,
                            (unsigned int)v18,
                            2u);
                    if ( v21->_Myres >= 0x10 )
                      v21 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v21->_Bx._Ptr;
                    data->skillName._Bx._Ptr[28] = atoi(v21->_Bx._Buf);
                    if ( result._Myres >= 0x10 )
                      operator delete(result._Bx._Ptr);
                  }
                }
                LOBYTE(v78) = 0;
                if ( str._Myres >= 0x10 )
                  operator delete(str._Bx._Ptr);
              }
            }
          }
        }
        v4 = i + 1;
        i = v4;
        if ( v4 >= totalNum )
          break;
        v2 = m_listExcelData._Myfirst;
      }
      v36 = m_listExcelData._Myfirst;
      if ( m_listExcelData._Myfirst != m_listExcelData._Mylast )
        memmove((char *)m_listExcelData._Myfirst, (char *)m_listExcelData._Mylast, 0);
      if ( v36 )
      {
        operator delete(v36);
        return uiTotal;
      }
    }
    return uiTotal;
  }
  if ( v1 == 1 )
  {
    m_listExcelData._Myfirst = 0;
    m_listExcelData._Mylast = 0;
    m_listExcelData._Myend = 0;
    v78 = 3;
    totalNuma = Skill::GetTotalLearnPassiveSkill();
    ia = 0;
    if ( totalNuma > 0 )
    {
      do
      {
        kSkillIDa = Skill::GetLearnPassiveSkillInfo(ia);
        v38 = PasSkillInfoTab::GetByID(kSkillIDa)->Name;
        data = (SkillData *)strlen(v38);
        str._Myres = 15;
        str._Mysize = 0;
        str._Bx._Buf[0] = 0;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&str, v38, strlen(v38));
        v39 = m_listExcelData._Myfirst;
        LOBYTE(v78) = 4;
        iterCur._Ptr = m_listExcelData._Myfirst;
        if ( m_listExcelData._Myfirst == m_listExcelData._Mylast )
          goto LABEL_86;
        do
        {
          v40 = *iterCur._Ptr;
          if ( (*iterCur._Ptr)->skillName._Myres < 0x10 )
            v41 = *iterCur._Ptr;
          else
            v41 = (SkillData *)v40->skillName._Bx._Ptr;
          v42 = v40->skillLv;
          v43 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(
                  &str,
                  &result,
                  0,
                  (unsigned int)&data[-1].skillLv);
          if ( v43->_Myres >= 0x10 )
            v43 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v43->_Bx._Ptr;
          v44 = strcmp(v41->skillName._Bx._Buf, v43->_Bx._Buf) == 0;
          if ( result._Myres >= 0x10 )
            operator delete(result._Bx._Ptr);
          if ( v44 )
          {
            v47 = &data[-1].skillLv + 1;
            v48 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(
                    &str,
                    &result,
                    (unsigned int)(&data[-1].skillLv + 1),
                    2u);
            if ( v48->_Myres >= 0x10 )
              v48 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v48->_Bx._Ptr;
            v49 = v42 < atoi(v48->_Bx._Buf);
            if ( result._Myres >= 0x10 )
              operator delete(result._Bx._Ptr);
            if ( v49 )
            {
              v50 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(
                      &str,
                      &result,
                      (unsigned int)v47,
                      2u);
              if ( v50->_Myres >= 0x10 )
                v50 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v50->_Bx._Ptr;
              (*iterCur._Ptr)->skillLv = atoi(v50->_Bx._Buf);
              if ( result._Myres >= 0x10 )
                operator delete(result._Bx._Ptr);
            }
            goto LABEL_132;
          }
          ++iterCur._Ptr;
        }
        while ( iterCur._Ptr != m_listExcelData._Mylast );
        v39 = m_listExcelData._Myfirst;
LABEL_86:
        v45 = (SkillData **)operator new(0x20u);
        if ( v45 )
        {
          v45[5] = (SkillData *)15;
          v45[4] = 0;
          *(_BYTE *)v45 = 0;
          v46 = v45;
        }
        else
        {
          v46 = 0;
        }
        iterCur._Ptr = v46;
        v51 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(
                &str,
                &result,
                0,
                (unsigned int)&data[-1].skillLv);
        v52 = v51->_Myres < 0x10;
        LOBYTE(v78) = 5;
        if ( v52 )
          v53 = (const char *)v51;
        else
          v53 = v51->_Bx._Ptr;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v46,
          v53,
          strlen(v53));
        LOBYTE(v78) = 4;
        if ( result._Myres >= 0x10 )
          operator delete(result._Bx._Ptr);
        v54 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(
                &str,
                &result,
                (unsigned int)(&data[-1].skillLv + 1),
                2u);
        if ( v54->_Myres >= 0x10 )
          v54 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v54->_Bx._Ptr;
        *((_BYTE *)v46 + 28) = atoi(v54->_Bx._Buf);
        if ( result._Myres >= 0x10 )
          operator delete(result._Bx._Ptr);
        v55 = m_listExcelData._Mylast;
        *((_WORD *)v46 + 15) = kSkillIDa;
        if ( &iterCur >= (std::_Vector_iterator<std::_Vector_val<SkillData *,std::allocator<SkillData *> > > *)v55
          || v39 > (SkillData **)&iterCur )
        {
          if ( v55 == m_listExcelData._Myend )
          {
            v61 = v55 - v39;
            if ( v61 > 0x3FFFFFFE )
LABEL_72:
              std::_Xlength_error("vector<T> too long");
            v62 = v61 + 1;
            v63 = m_listExcelData._Myend - v39;
            if ( v62 > v63 )
            {
              if ( 0x3FFFFFFF - (v63 >> 1) >= v63 )
                v64 = (v63 >> 1) + v63;
              else
                v64 = 0;
              if ( v64 < v62 )
                v64 = v62;
              std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
                (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&m_listExcelData,
                v64);
              v55 = m_listExcelData._Mylast;
            }
          }
          if ( v55 )
            *v55 = (SkillData *)v46;
          goto LABEL_131;
        }
        v56 = ((char *)&iterCur - (char *)v39) >> 2;
        if ( v55 != m_listExcelData._Myend )
          goto LABEL_118;
        v57 = v55 - v39;
        if ( v57 > 0x3FFFFFFE )
          goto LABEL_72;
        v58 = v57 + 1;
        v59 = m_listExcelData._Myend - v39;
        if ( v58 > v59 )
        {
          if ( 0x3FFFFFFF - (v59 >> 1) >= v59 )
            v60 = (v59 >> 1) + v59;
          else
            v60 = 0;
          if ( v60 < v58 )
            v60 = v58;
          std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
            (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&m_listExcelData,
            v60);
          v55 = m_listExcelData._Mylast;
          v39 = m_listExcelData._Myfirst;
        }
LABEL_118:
        if ( v55 )
          *v55 = v39[v56];
LABEL_131:
        ++uiTotal;
        m_listExcelData._Mylast = v55 + 1;
LABEL_132:
        LOBYTE(v78) = 3;
        if ( str._Myres >= 0x10 )
          operator delete(str._Bx._Ptr);
        ++ia;
      }
      while ( ia < totalNuma );
      v65 = m_listExcelData._Myfirst;
      if ( m_listExcelData._Myfirst != m_listExcelData._Mylast )
        memmove((char *)m_listExcelData._Myfirst, (char *)m_listExcelData._Mylast, 0);
      if ( v65 )
      {
        operator delete(v65);
        return uiTotal;
      }
    }
    return uiTotal;
  }
  if ( v1 == 3 )
    return Skill::GetTotalLearnProductSkill();
  return -1;
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (00596B80) --------------------------------------------------------
unsigned int __thiscall SkillWin::GetMaxPageNum(SkillWin *this)
{
  unsigned int v1; // eax@1
  unsigned int result; // eax@2

  v1 = SkillWin::GetLearnSkillNum(this);
  if ( v1 )
    result = ((v1 - 1) >> 3) + 1;
  else
    result = 1;
  return result;
}

//----- (00596BA0) --------------------------------------------------------
void __thiscall SkillWin::OnLevelNext(SkillWin *this, unsigned int InvIndex)
{
  SkillWin *v2; // edi@1
  const char *v3; // eax@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v4; // eax@2
  char v5; // bl@4
  char maxLevel; // [sp+1Bh] [bp-49h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+1Ch] [bp-48h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > curLevelStr; // [sp+38h] [bp-2Ch]@2
  int v9; // [sp+60h] [bp-4h]@2

  v2 = this;
  maxLevel = this->m_apkInvLevNextBtn[InvIndex]->maxLevel;
  if ( maxLevel )
  {
    v3 = (const char *)((int (*)(void))this->m_apkInvLevWin[InvIndex]->vfptr[121].__vecDelDtor)();
    curLevelStr._Myres = 15;
    curLevelStr._Mysize = 0;
    curLevelStr._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&curLevelStr, v3, strlen(v3));
    v9 = 0;
    v4 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(&curLevelStr, &result, 0, 2u);
    if ( v4->_Myres >= 0x10 )
      v4 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v4->_Bx._Ptr;
    v5 = atoi(v4->_Bx._Buf);
    if ( result._Myres >= 0x10 )
      operator delete(result._Bx._Ptr);
    if ( v5 == maxLevel )
      SkillWin::SetLevel(v2, InvIndex, 1);
    else
      SkillWin::SetLevel(v2, InvIndex, v5 + 1);
    if ( curLevelStr._Myres >= 0x10 )
      operator delete(curLevelStr._Bx._Ptr);
  }
}

//----- (00596CB0) --------------------------------------------------------
void __thiscall SkillWin::OnLevelPre(SkillWin *this, unsigned int InvIndex)
{
  SkillWin *v2; // edi@1
  const char *v3; // eax@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v4; // eax@2
  char v5; // bl@4
  char maxLevel; // [sp+1Bh] [bp-49h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+1Ch] [bp-48h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > curLevelStr; // [sp+38h] [bp-2Ch]@2
  int v9; // [sp+60h] [bp-4h]@2

  v2 = this;
  maxLevel = this->m_apkInvLevNextBtn[InvIndex]->maxLevel;
  if ( maxLevel )
  {
    v3 = (const char *)((int (*)(void))this->m_apkInvLevWin[InvIndex]->vfptr[121].__vecDelDtor)();
    curLevelStr._Myres = 15;
    curLevelStr._Mysize = 0;
    curLevelStr._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&curLevelStr, v3, strlen(v3));
    v9 = 0;
    v4 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(&curLevelStr, &result, 0, 2u);
    if ( v4->_Myres >= 0x10 )
      v4 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v4->_Bx._Ptr;
    v5 = atoi(v4->_Bx._Buf);
    if ( result._Myres >= 0x10 )
      operator delete(result._Bx._Ptr);
    if ( v5 == 1 )
      SkillWin::SetLevel(v2, InvIndex, maxLevel);
    else
      SkillWin::SetLevel(v2, InvIndex, v5 - 1);
    if ( curLevelStr._Myres >= 0x10 )
      operator delete(curLevelStr._Bx._Ptr);
  }
}

//----- (00596DC0) --------------------------------------------------------
void __thiscall SkillWin::UpdatePageInfo(SkillWin *this)
{
  SkillWin *v1; // esi@1
  unsigned int v2; // eax@2
  unsigned int v3; // eax@3
  NiRefObjectVtbl *v4; // edi@5
  char *v5; // eax@5

  v1 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[65].__vecDelDtor)() )
  {
    v2 = SkillWin::GetLearnSkillNum(v1);
    if ( v2 )
      v3 = ((v2 - 1) >> 3) + 1;
    else
      v3 = 1;
    v4 = v1->m_pkPageText->vfptr;
    v5 = fs("%d / %d", v1->m_uiCurPage + 1, v3);
    v4[118].__vecDelDtor((NiRefObject *)v1->m_pkPageText, (unsigned int)v5);
  }
}

//----- (00596E20) --------------------------------------------------------
void __thiscall SkillWin::ResetContents(SkillWin *this)
{
  SkillWin *v1; // edi@1
  char *v2; // esi@2
  SkillData **v3; // ebx@2
  int v4; // eax@3
  unsigned int v5; // eax@4
  Skill::EmpowerInfo v6; // eax@5
  unsigned int v7; // ecx@5
  Skill::LearnSkillInfo *v8; // eax@6
  int v9; // esi@6
  int v10; // edx@6
  int v11; // eax@8
  bool v12; // zf@8
  ActiveSkillInfo **v13; // eax@8
  ActiveSkillInfo *v14; // eax@9
  const char *v15; // ebx@10
  const char *v16; // eax@11
  const char *v17; // esi@12
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v18; // eax@14
  bool v19; // bl@16
  _DWORD *v20; // eax@21
  unsigned int v21; // esi@22
  char *v22; // esi@23
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v23; // eax@23
  int v24; // eax@25
  bool v25; // bl@25
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v26; // eax@28
  char v27; // al@30
  unsigned int v28; // esi@30
  char *v29; // edx@43
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v30; // eax@44
  bool v31; // cf@44
  const char *v32; // edx@45
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v33; // eax@50
  SkillData **v34; // ebx@54
  SkillData **v35; // edx@54
  int v36; // esi@56
  unsigned int v37; // eax@57
  unsigned int v38; // eax@58
  unsigned int v39; // ecx@58
  unsigned int v40; // ecx@60
  unsigned int v41; // eax@68
  unsigned int v42; // eax@69
  unsigned int v43; // ecx@69
  unsigned int v44; // ecx@71
  unsigned int v45; // esi@82
  unsigned int v46; // ebx@83
  SkillData *v47; // eax@85
  signed __int16 v48; // di@96
  unsigned int v49; // esi@96
  char *v50; // eax@101
  Skill::EmpowerInfo v51; // edi@101
  const char *v52; // ebx@102
  char *v53; // eax@102
  char v54; // cl@103
  char *v55; // eax@104
  char v56; // dl@105
  char *v57; // eax@107
  char *v58; // esi@108
  int v59; // edi@110
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v60; // eax@110
  bool v61; // bl@112
  SkillData *v62; // eax@117
  SkillData *v63; // esi@118
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v64; // eax@119
  bool v65; // bl@121
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v66; // eax@124
  char v67; // al@126
  SkillData *v68; // esi@126
  char *v69; // edx@139
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v70; // eax@140
  const char *v71; // edx@141
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v72; // eax@146
  SkillData **v73; // edi@150
  SkillData **v74; // edx@150
  int v75; // esi@152
  unsigned int v76; // eax@153
  unsigned int v77; // eax@154
  unsigned int v78; // ecx@154
  unsigned int v79; // ecx@156
  unsigned int v80; // eax@164
  unsigned int v81; // eax@165
  unsigned int v82; // ecx@165
  unsigned int v83; // ecx@167
  unsigned int v84; // esi@179
  unsigned int v85; // ebx@180
  SkillData *v86; // eax@182
  char v87; // al@184
  NiRefObjectVtbl *v88; // ecx@184
  unsigned int v89; // esi@189
  char *v90; // edi@189
  unsigned int v91; // ebx@189
  int v92; // ebx@195
  int v93; // esi@195
  int *v94; // eax@197
  int v95; // ebx@198
  SkillData *v96; // eax@199
  SkillData *v97; // esi@200
  const char *v98; // ecx@202
  char *v99; // eax@202
  int v100; // ebx@202
  char v101; // dl@203
  int v102; // edx@206
  unsigned int v103; // eax@206
  unsigned __int16 v104; // cx@206
  SkillData **v105; // edx@206
  int v106; // esi@208
  unsigned int v107; // eax@209
  unsigned int v108; // eax@210
  unsigned int v109; // ecx@210
  unsigned int v110; // ecx@212
  unsigned int v111; // eax@220
  unsigned int v112; // eax@221
  unsigned int v113; // ecx@221
  unsigned int v114; // ecx@223
  char *v115; // esi@233
  unsigned int v116; // edi@235
  int v117; // ebx@236
  int v118; // esi@236
  int *v119; // eax@238
  int v120; // ebx@239
  _DWORD *v121; // eax@240
  Skill::EmpowerInfo v122; // esi@241
  const char *v123; // ecx@243
  char *v124; // eax@243
  int v125; // ebx@243
  char v126; // dl@244
  int v127; // edx@247
  __int16 v128; // ax@247
  void *v129; // esi@250
  SkillWin *v130; // ebx@256
  unsigned int v131; // esi@256
  int v132; // eax@259
  int v133; // eax@263
  ProduceInfo *v134; // eax@267
  signed int v135; // edi@269
  unsigned int v136; // ebx@275
  char *v137; // eax@276
  int v138; // eax@281
  char *v139; // [sp-8h] [bp-BCh]@89
  ActiveSkillInfo *pkInfo; // [sp+10h] [bp-A4h]@9
  unsigned int totalNum; // [sp+14h] [bp-A0h]@10
  unsigned int totalNuma; // [sp+14h] [bp-A0h]@95
  SkillWin *v143; // [sp+18h] [bp-9Ch]@1
  int kSkillID; // [sp+1Ch] [bp-98h]@6
  unsigned int i; // [sp+20h] [bp-94h]@5
  unsigned int skillDataBankCount; // [sp+24h] [bp-90h]@4
  unsigned int maxsize; // [sp+28h] [bp-8Ch]@10
  std::vector<SkillData *,std::allocator<SkillData *> > m_listExcelData; // [sp+2Ch] [bp-88h]@5
  SkillData *data; // [sp+3Ch] [bp-78h]@10
  std::vector<unsigned short,std::allocator<unsigned short> > vecTemp1; // [sp+40h] [bp-74h]@10
  char *src; // [sp+50h] [bp-64h]@10
  unsigned int v152; // [sp+54h] [bp-60h]@10
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v153; // [sp+5Ch] [bp-58h]@35
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+78h] [bp-3Ch]@14
  char levInfoTxt[6]; // [sp+94h] [bp-20h]@14
  Skill::EmpowerInfo kInfo; // [sp+9Ch] [bp-18h]@5
  int v157; // [sp+B0h] [bp-4h]@5

  v1 = this;
  v143 = this;
  if ( !this->m_apkInvWin[0] )
    return;
  v2 = (char *)this->m_apkInvTextWin;
  v3 = (SkillData **)8;
  do
  {
    SkillInvWin::SetSkill(*((SkillInvWin **)v2 - 8), 0xFFFFu, 0);
    (*(void (__stdcall **)(void *))(**(_DWORD **)v2 + 472))(&unk_9A2B2E);
    (*(void (__stdcall **)(void *))(**((_DWORD **)v2 + 8) + 472))(&unk_9A2B2F);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v2 + 16) + 256))(0);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v2 + 24) + 256))(0);
    *(_BYTE *)(*((_DWORD *)v2 + 16) + 328) = 0;
    v4 = *((_DWORD *)v2 + 24);
    v2 += 4;
    v3 = (SkillData **)((char *)v3 - 1);
    *(_BYTE *)(v4 + 328) = 0;
  }
  while ( v3 );
  v5 = v1->m_uiCurPageType;
  skillDataBankCount = 0;
  if ( !v5 )
  {
    m_listExcelData._Myfirst = 0;
    m_listExcelData._Mylast = 0;
    m_listExcelData._Myend = 0;
    v157 = 0;
    v6 = (Skill::EmpowerInfo)Skill::GetTotalLearnActSkill();
    v7 = 0;
    kInfo = v6;
    i = 0;
    while ( v7 < *(_DWORD *)&kInfo )
    {
      v8 = Skill::GetLearnActSkillInfo(v7);
      v9 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
      v10 = *(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
      kSkillID = v8->kSkillID;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(v10 + 16))(
                              ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                              kSkillID) )
      {
        if ( (unsigned __int16)kSkillID <= *(_WORD *)(v9 + 200) )
        {
          v11 = *(_DWORD *)(v9 + 196);
          v12 = *(_DWORD *)(v11 + 4 * (unsigned __int16)kSkillID) == 0;
          v13 = (ActiveSkillInfo **)(v11 + 4 * (unsigned __int16)kSkillID);
          if ( !v12 )
          {
            v14 = *v13;
            pkInfo = v14;
            if ( v14 )
            {
              v15 = v14->Name;
              totalNum = (unsigned int)v14->Name;
              data = (SkillData *)strlen(v14->Name);
              LOBYTE(vecTemp1._Myfirst) = 0;
              v152 = 15;
              src = 0;
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&vecTemp1,
                v15,
                strlen(v15));
              LOBYTE(v157) = 1;
              maxsize = (unsigned int)m_listExcelData._Myfirst;
              if ( m_listExcelData._Myfirst == m_listExcelData._Mylast )
                goto LABEL_21;
              do
              {
                v16 = *(const char **)maxsize;
                if ( *(_DWORD *)(*(_DWORD *)maxsize + 20) < 0x10u )
                  v17 = *(const char **)maxsize;
                else
                  v17 = *(const char **)v16;
                *(_DWORD *)levInfoTxt = v16[28];
                v18 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(
                        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&vecTemp1,
                        &result,
                        0,
                        (unsigned int)&data[-1].skillLv);
                if ( v18->_Myres >= 0x10 )
                  v18 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v18->_Bx._Ptr;
                v19 = strcmp(v17, v18->_Bx._Buf) == 0;
                if ( result._Myres >= 0x10 )
                  operator delete(result._Bx._Ptr);
                if ( v19 )
                {
                  v22 = &data[-1].skillLv + 1;
                  v23 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(
                          (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&vecTemp1,
                          &result,
                          (unsigned int)(&data[-1].skillLv + 1),
                          2u);
                  if ( v23->_Myres >= 0x10 )
                    v23 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v23->_Bx._Ptr;
                  v24 = atoi(v23->_Bx._Buf);
                  v25 = *(_DWORD *)levInfoTxt < v24;
                  if ( result._Myres >= 0x10 )
                    operator delete(result._Bx._Ptr);
                  if ( v25 )
                  {
                    v26 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(
                            (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&vecTemp1,
                            &result,
                            (unsigned int)v22,
                            2u);
                    if ( v26->_Myres >= 0x10 )
                      v26 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v26->_Bx._Ptr;
                    v27 = atoi(v26->_Bx._Buf);
                    v28 = maxsize;
                    *(_BYTE *)(*(_DWORD *)maxsize + 28) = v27;
                    if ( result._Myres >= 0x10 )
                      operator delete(result._Bx._Ptr);
                    *(_WORD *)(*(_DWORD *)v28 + 30) = kSkillID;
                  }
                  goto LABEL_79;
                }
                maxsize += 4;
              }
              while ( (SkillData **)maxsize != m_listExcelData._Mylast );
              v15 = (const char *)totalNum;
LABEL_21:
              v20 = operator new(0x20u);
              if ( v20 )
              {
                v20[5] = 15;
                v20[4] = 0;
                *(_BYTE *)v20 = 0;
                v21 = (unsigned int)v20;
              }
              else
              {
                v21 = 0;
              }
              maxsize = v21;
              if ( !strcmp(pkInfo->InxName, "SummonMate01") )
              {
                v153._Mysize = 0;
                v153._Bx._Buf[0] = 0;
                v153._Myres = 15;
                std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v153, v15, strlen(v15));
                if ( (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v21 != &v153 )
                {
                  if ( *(_DWORD *)(v21 + 20) >= 0x10u )
                    operator delete(*(void **)v21);
                  *(_DWORD *)(v21 + 20) = 15;
                  *(_DWORD *)(v21 + 16) = 0;
                  *(_BYTE *)v21 = 0;
                  if ( v153._Myres >= 0x10 )
                  {
                    *(_DWORD *)v21 = v153._Bx._Ptr;
                    v153._Bx._Ptr = 0;
                  }
                  else
                  {
                    memmove((char *)v21, v153._Bx._Buf, v153._Mysize + 1);
                  }
                  *(_DWORD *)(v21 + 16) = v153._Mysize;
                  *(_DWORD *)(v21 + 20) = v153._Myres;
                  v153._Myres = 15;
                  v153._Mysize = 0;
                  v153._Bx._Buf[0] = 0;
                }
                LOBYTE(v157) = 1;
                if ( v153._Myres >= 0x10 )
                {
                  v29 = v153._Bx._Ptr;
                  goto LABEL_49;
                }
              }
              else
              {
                v30 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(
                        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&vecTemp1,
                        &result,
                        0,
                        (unsigned int)&data[-1].skillLv);
                v31 = v30->_Myres < 0x10;
                LOBYTE(v157) = 3;
                if ( v31 )
                  v32 = (const char *)v30;
                else
                  v32 = v30->_Bx._Ptr;
                std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                  (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v21,
                  v32,
                  strlen(v32));
                LOBYTE(v157) = 1;
                if ( result._Myres >= 0x10 )
                {
                  v29 = result._Bx._Ptr;
LABEL_49:
                  operator delete(v29);
                }
              }
              v33 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(
                      (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&vecTemp1,
                      &result,
                      (unsigned int)(&data[-1].skillLv + 1),
                      2u);
              if ( v33->_Myres >= 0x10 )
                v33 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v33->_Bx._Ptr;
              *(_BYTE *)(v21 + 28) = atoi(v33->_Bx._Buf);
              if ( result._Myres >= 0x10 )
                operator delete(result._Bx._Ptr);
              v34 = m_listExcelData._Mylast;
              v35 = m_listExcelData._Myfirst;
              *(_WORD *)(v21 + 30) = kSkillID;
              if ( &maxsize >= (unsigned int *)v34 || v35 > (SkillData **)&maxsize )
              {
                if ( v34 != m_listExcelData._Myend )
                {
LABEL_76:
                  if ( v34 )
                    *v34 = (SkillData *)v21;
                  goto LABEL_78;
                }
                v41 = v34 - v35;
                if ( v41 <= 0x3FFFFFFE )
                {
                  v42 = v41 + 1;
                  v43 = m_listExcelData._Myend - v35;
                  if ( v42 > v43 )
                  {
                    if ( 0x3FFFFFFF - (v43 >> 1) >= v43 )
                      v44 = (v43 >> 1) + v43;
                    else
                      v44 = 0;
                    if ( v44 < v42 )
                      v44 = v42;
                    std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
                      (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&m_listExcelData,
                      v44);
                    v34 = m_listExcelData._Mylast;
                  }
                  goto LABEL_76;
                }
LABEL_93:
                std::_Xlength_error("vector<T> too long");
              }
              v36 = ((char *)&maxsize - (char *)v35) >> 2;
              if ( v34 != m_listExcelData._Myend )
                goto LABEL_65;
              v37 = v34 - v35;
              if ( v37 > 0x3FFFFFFE )
                goto LABEL_93;
              v38 = v37 + 1;
              v39 = m_listExcelData._Myend - v35;
              if ( v38 > v39 )
              {
                if ( 0x3FFFFFFF - (v39 >> 1) >= v39 )
                  v40 = (v39 >> 1) + v39;
                else
                  v40 = 0;
                if ( v40 < v38 )
                  v40 = v38;
                std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
                  (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&m_listExcelData,
                  v40);
                v34 = m_listExcelData._Mylast;
                v35 = m_listExcelData._Myfirst;
              }
LABEL_65:
              if ( v34 )
                *v34 = v35[v36];
LABEL_78:
              ++skillDataBankCount;
              m_listExcelData._Mylast = v34 + 1;
LABEL_79:
              LOBYTE(v157) = 0;
              if ( v152 >= 0x10 )
                operator delete(vecTemp1._Myfirst);
            }
          }
        }
      }
      v7 = i + 1;
      i = v7;
    }
    v45 = 8 * v1->m_uiCurPage;
    if ( v45 < skillDataBankCount )
    {
      v46 = 0;
      do
      {
        if ( v46 >= 8 )
          break;
        SkillInvWin::SetSkill(
          (SkillInvWin *)(&v1->vfptr)[v45 + 8 * (11 - v1->m_uiCurPage)],
          m_listExcelData._Myfirst[v45]->id,
          0);
        v47 = m_listExcelData._Myfirst[v45];
        if ( v47->skillName._Myres >= 0x10 )
          v47 = (SkillData *)v47->skillName._Bx._Ptr;
        (*((void (__stdcall **)(_DWORD))(&v1->vfptr)[v45 + 8 * (12 - v1->m_uiCurPage)]->__vecDelDtor + 118))(v47);
        Skill::GetAccumulatedEmpowerInfo(&kInfo, m_listExcelData._Myfirst[v45]->id);
        SkillIcon::SetEmpowerInfo((SkillIcon *)(&v1->vfptr)[v45 + 8 * (11 - v1->m_uiCurPage)], kInfo);
        sprintf(levInfoTxt, "%02d/%02d", m_listExcelData._Myfirst[v45]->skillLv, m_listExcelData._Myfirst[v45]->skillLv);
        (*((void (__stdcall **)(_DWORD))(&v1->vfptr)[v45 + 8 * (13 - v1->m_uiCurPage)]->__vecDelDtor + 118))(levInfoTxt);
        LOBYTE((&v1->vfptr)[v45 + 8 * (14 - v1->m_uiCurPage)][82].__vecDelDtor) = m_listExcelData._Myfirst[v45]->skillLv;
        (*((void (__stdcall **)(_DWORD))(&v1->vfptr)[v45 + 8 * (14 - v1->m_uiCurPage)]->__vecDelDtor + 64))(1);
        (*((void (__stdcall **)(_DWORD))(&v1->vfptr)[v45++ + 8 * (15 - v1->m_uiCurPage)]->__vecDelDtor + 64))(1);
        ++v46;
      }
      while ( v45 < skillDataBankCount );
    }
    if ( m_listExcelData._Myfirst == m_listExcelData._Mylast )
      goto LABEL_91;
    v139 = (char *)m_listExcelData._Mylast;
    goto LABEL_90;
  }
  if ( v5 != 1 )
  {
    if ( v5 != 2 && v5 == 3 )
    {
      v89 = 0;
      v90 = 0;
      m_listExcelData._Myfirst = 0;
      m_listExcelData._Mylast = 0;
      m_listExcelData._Myend = 0;
      v157 = 8;
      v91 = Skill::GetTotalLearnProductSkill();
      *(_DWORD *)&vecTemp1._Alval.0 = 0;
      src = 0;
      v152 = 0;
      *(_DWORD *)&v153._Bx._Alias[12] = 0;
      v153._Mysize = 0;
      v153._Myres = 0;
      LOBYTE(v157) = 10;
      if ( v91 )
      {
        do
        {
          kSkillID = Skill::GetLearnProductSkill(v89)->kSkillID;
          if ( (unsigned __int8)Skill::IsProduceBaseSkill(kSkillID) )
            std::vector<unsigned short,std::allocator<unsigned short>>::push_back(
              (std::vector<unsigned short,std::allocator<unsigned short> > *)((char *)&vecTemp1 + 12),
              (const unsigned __int16 *)&kSkillID);
          else
            std::vector<unsigned short,std::allocator<unsigned short>>::push_back(
              (std::vector<unsigned short,std::allocator<unsigned short> > *)&v153._Bx._Alias[12],
              (const unsigned __int16 *)&kSkillID);
          ++v89;
        }
        while ( v89 < v91 );
      }
      i = 0;
      maxsize = (signed int)&src[-*(_DWORD *)&vecTemp1._Alval.0] >> 1;
      if ( maxsize )
      {
        do
        {
          v92 = *(_WORD *)(*(_DWORD *)&vecTemp1._Alval.0 + 2 * i);
          v93 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
          if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                                + 16))(
                                  ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                                  v92) )
          {
            if ( (unsigned __int16)v92 <= *(_WORD *)(v93 + 200) )
            {
              v94 = (int *)(*(_DWORD *)(v93 + 196) + 4 * v92);
              if ( *v94 )
              {
                v95 = *v94;
                if ( *v94 )
                {
                  v96 = (SkillData *)operator new(0x20u);
                  if ( v96 )
                  {
                    v96->skillName._Myres = 15;
                    v96->skillName._Mysize = 0;
                    v96->skillName._Bx._Buf[0] = 0;
                    v97 = v96;
                  }
                  else
                  {
                    v97 = 0;
                  }
                  v98 = (const char *)(v95 + 34);
                  v99 = (char *)(v95 + 34);
                  data = v97;
                  result._Myres = 15;
                  result._Mysize = 0;
                  result._Bx._Buf[0] = 0;
                  v100 = v95 + 35;
                  do
                    v101 = *v99++;
                  while ( v101 );
                  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                    &result,
                    v98,
                    (unsigned int)&v99[-v100]);
                  LOBYTE(v157) = 11;
                  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v97->skillName, &result);
                  LOBYTE(v157) = 10;
                  if ( result._Myres >= 0x10 )
                    operator delete(result._Bx._Ptr);
                  v102 = *(_DWORD *)&vecTemp1._Alval.0;
                  v103 = i;
                  v97->skillLv = 0;
                  v104 = *(_WORD *)(v102 + 2 * v103);
                  v105 = m_listExcelData._Mylast;
                  v97->id = v104;
                  if ( &data >= v105 || v90 > (char *)&data )
                  {
                    if ( v105 == m_listExcelData._Myend )
                    {
                      v111 = ((char *)v105 - v90) >> 2;
                      if ( v111 > 0x3FFFFFFE )
                        goto LABEL_93;
                      v112 = v111 + 1;
                      v113 = ((char *)m_listExcelData._Myend - v90) >> 2;
                      if ( v112 > v113 )
                      {
                        if ( 0x3FFFFFFF - (v113 >> 1) >= v113 )
                          v114 = (v113 >> 1) + v113;
                        else
                          v114 = 0;
                        if ( v114 < v112 )
                          v114 = v112;
                        std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
                          (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&m_listExcelData,
                          v114);
                        v105 = m_listExcelData._Mylast;
                        v90 = (char *)m_listExcelData._Myfirst;
                      }
                    }
                    if ( v105 )
                      *v105 = v97;
                  }
                  else
                  {
                    v106 = ((char *)&data - v90) >> 2;
                    if ( v105 == m_listExcelData._Myend )
                    {
                      v107 = ((char *)v105 - v90) >> 2;
                      if ( v107 > 0x3FFFFFFE )
                        goto LABEL_93;
                      v108 = v107 + 1;
                      v109 = ((char *)m_listExcelData._Myend - v90) >> 2;
                      if ( v108 > v109 )
                      {
                        if ( 0x3FFFFFFF - (v109 >> 1) >= v109 )
                          v110 = (v109 >> 1) + v109;
                        else
                          v110 = 0;
                        if ( v110 < v108 )
                          v110 = v108;
                        std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
                          (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&m_listExcelData,
                          v110);
                        v105 = m_listExcelData._Mylast;
                        v90 = (char *)m_listExcelData._Myfirst;
                      }
                    }
                    if ( v105 )
                      *v105 = *(SkillData **)&v90[4 * v106];
                  }
                  ++skillDataBankCount;
                  m_listExcelData._Mylast = v105 + 1;
                }
              }
            }
          }
          ++i;
        }
        while ( i < maxsize );
      }
      if ( *(char **)&vecTemp1._Alval.0 != src )
      {
        v115 = *(char **)&vecTemp1._Alval.0;
        memmove(*(char **)&vecTemp1._Alval.0, src, 0);
        src = v115;
      }
      i = 0;
      maxsize = (signed int)(v153._Mysize - *(_DWORD *)&v153._Bx._Alias[12]) >> 1;
      if ( maxsize )
      {
        v116 = i;
        do
        {
          v117 = *(_WORD *)(*(_DWORD *)&v153._Bx._Alias[12] + 2 * v116);
          v118 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
          if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                                + 16))(
                                  ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                                  v117) )
          {
            if ( (unsigned __int16)v117 <= *(_WORD *)(v118 + 200) )
            {
              v119 = (int *)(*(_DWORD *)(v118 + 196) + 4 * v117);
              if ( *v119 )
              {
                v120 = *v119;
                if ( *v119 )
                {
                  v121 = operator new(0x20u);
                  if ( v121 )
                  {
                    v121[5] = 15;
                    v121[4] = 0;
                    *(_BYTE *)v121 = 0;
                    v122 = (Skill::EmpowerInfo)v121;
                  }
                  else
                  {
                    v122 = 0;
                  }
                  v123 = (const char *)(v120 + 34);
                  v124 = (char *)(v120 + 34);
                  kInfo = v122;
                  result._Myres = 15;
                  result._Mysize = 0;
                  result._Bx._Buf[0] = 0;
                  v125 = v120 + 35;
                  do
                    v126 = *v124++;
                  while ( v126 );
                  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                    &result,
                    v123,
                    (unsigned int)&v124[-v125]);
                  LOBYTE(v157) = 12;
                  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                    *(std::basic_string<char,std::char_traits<char>,std::allocator<char> > **)&v122,
                    &result);
                  LOBYTE(v157) = 10;
                  if ( result._Myres >= 0x10 )
                    operator delete(result._Bx._Ptr);
                  v127 = *(_DWORD *)&v153._Bx._Alias[12];
                  *(_BYTE *)(*(_DWORD *)&v122 + 28) = 0;
                  v128 = *(_WORD *)(v127 + 2 * v116);
                  result._Myres = 15;
                  result._Mysize = 0;
                  result._Bx._Buf[0] = 0;
                  *(_WORD *)(*(_DWORD *)&v122 + 30) = v128;
                  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
                    (std::vector<unsigned long,std::allocator<unsigned long> > *)&m_listExcelData,
                    (const unsigned int *)&kInfo);
                  ++skillDataBankCount;
                }
              }
            }
          }
          ++v116;
        }
        while ( v116 < maxsize );
        v90 = (char *)m_listExcelData._Myfirst;
      }
      v129 = *(void **)&v153._Bx._Alias[12];
      if ( *(_DWORD *)&v153._Bx._Alias[12] != v153._Mysize )
        memmove(*(char **)&v153._Bx._Alias[12], (char *)v153._Mysize, 0);
      if ( v129 )
        operator delete(v129);
      LOBYTE(v157) = 8;
      if ( *(_DWORD *)&vecTemp1._Alval.0 )
        operator delete(*(void **)&vecTemp1._Alval.0);
      v130 = v143;
      v131 = 8 * v143->m_uiCurPage;
      if ( v131 < skillDataBankCount )
      {
        data = 0;
        do
        {
          if ( (unsigned int)data >= 8 )
            break;
          SkillInvWin::SetSkill(
            (SkillInvWin *)(&v130->vfptr)[v131 + 8 * (11 - v130->m_uiCurPage)],
            *(_WORD *)(*(_DWORD *)&v90[4 * v131] + 30),
            0);
          v12 = (unsigned __int8)Skill::IsProduceBaseSkill(*(_WORD *)(*(_DWORD *)&v90[4 * v131] + 30)) == 0;
          v132 = *(_DWORD *)&v90[4 * v131];
          if ( v12 )
          {
            v12 = (unsigned __int8)Skill::IsGatherSkill(*(_WORD *)(v132 + 30)) == 0;
            v133 = *(_DWORD *)&v90[4 * v131];
            if ( v12 )
            {
              v134 = ProduceInfoTable::GetByID(*(_WORD *)(v133 + 30));
              if ( v134 )
              {
                switch ( v134->MasteryType )
                {
                  case 2:
                    v135 = 2;
                    break;
                  case 0:
                    v135 = 0;
                    break;
                  case 3:
                    v135 = 3;
                    break;
                  case 4:
                    v135 = 4;
                    break;
                  case 5:
                    v135 = 5;
                    break;
                  default:
                    v135 = 1;
                    break;
                }
                v136 = 0;
                if ( ITableBase<ProduceViewInfo,ProduceViewInfoTable>::GetTotal() )
                {
                  while ( 1 )
                  {
                    v137 = CDataReader::GetRecord(
                             (CDataReader *)(ITableBase<ProduceViewInfo,ProduceViewInfoTable>::ms_pkTable + 4),
                             v136);
                    if ( *(_DWORD *)(v137 + 134) == v135 )
                      break;
                    if ( ++v136 >= ITableBase<ProduceViewInfo,ProduceViewInfoTable>::GetTotal() )
                      goto LABEL_280;
                  }
                  (*((void (__stdcall **)(_DWORD))(&v143->vfptr)[v131 + 8 * (12 - v143->m_uiCurPage)]->__vecDelDtor + 118))(v137 + 34);
                }
LABEL_280:
                v90 = (char *)m_listExcelData._Myfirst;
              }
              v138 = *(_DWORD *)&v90[4 * v131];
              if ( *(_DWORD *)(v138 + 20) >= 0x10u )
                v138 = *(_DWORD *)v138;
              (*((void (__stdcall **)(_DWORD))(&v143->vfptr)[v131 + 8 * (12 - v143->m_uiCurPage)]->__vecDelDtor + 118))(v138);
              v130 = v143;
            }
            else
            {
              if ( *(_DWORD *)(v133 + 20) >= 0x10u )
                v133 = *(_DWORD *)v133;
              (*((void (__stdcall **)(_DWORD))(&v130->vfptr)[v131 + 8 * (12 - v130->m_uiCurPage)]->__vecDelDtor + 118))(v133);
              (*((void (__stdcall **)(_DWORD))(&v130->vfptr)[v131 + 8 * (13 - v130->m_uiCurPage)]->__vecDelDtor + 118))(&unk_9A2B3A);
            }
          }
          else
          {
            if ( *(_DWORD *)(v132 + 20) >= 0x10u )
              v132 = *(_DWORD *)v132;
            (*((void (__stdcall **)(_DWORD))(&v130->vfptr)[v131 + 8 * (12 - v130->m_uiCurPage)]->__vecDelDtor + 118))(v132);
            (*((void (__stdcall **)(_DWORD))(&v130->vfptr)[v131 + 8 * (13 - v130->m_uiCurPage)]->__vecDelDtor + 118))(&unk_9A2B39);
          }
          data = (SkillData *)((char *)data + 1);
          ++v131;
        }
        while ( v131 < skillDataBankCount );
      }
      if ( v90 != (char *)m_listExcelData._Mylast )
        memmove(v90, (char *)m_listExcelData._Mylast, 0);
      v157 = -1;
      if ( v90 )
        operator delete(v90);
    }
LABEL_289:
    SkillWin::UpdatePageInfo(v143);
    return;
  }
  m_listExcelData._Myfirst = 0;
  m_listExcelData._Mylast = 0;
  m_listExcelData._Myend = 0;
  v157 = 4;
  totalNuma = Skill::GetTotalLearnPassiveSkill();
  i = 0;
  if ( totalNuma <= 0 )
  {
LABEL_179:
    v84 = 8 * v143->m_uiCurPage;
    if ( v84 < skillDataBankCount )
    {
      v85 = 0;
      do
      {
        if ( v85 >= 8 )
          break;
        Skill::GetLearnPassiveSkillInfo(v84);
        SkillInvWin::SetSkill(
          (SkillInvWin *)(&v143->vfptr)[v84 + 8 * (11 - v143->m_uiCurPage)],
          m_listExcelData._Myfirst[v84]->id,
          1u);
        v86 = m_listExcelData._Myfirst[v84];
        if ( v86->skillName._Myres >= 0x10 )
          v86 = (SkillData *)v86->skillName._Bx._Ptr;
        (*((void (__stdcall **)(_DWORD))(&v143->vfptr)[v84 + 8 * (12 - v143->m_uiCurPage)]->__vecDelDtor + 118))(v86);
        sprintf((char *)&kInfo, "%02d", m_listExcelData._Myfirst[v84]->skillLv);
        (*((void (__stdcall **)(_DWORD))(&v143->vfptr)[v84 + 8 * (13 - v143->m_uiCurPage)]->__vecDelDtor + 118))(&kInfo);
        v87 = m_listExcelData._Myfirst[v84]->skillLv;
        ++v85;
        v88 = (&v143->vfptr)[v84++ + 8 * (14 - v143->m_uiCurPage)];
        LOBYTE(v88[82].__vecDelDtor) = v87;
      }
      while ( v84 < skillDataBankCount );
    }
    if ( m_listExcelData._Myfirst == m_listExcelData._Mylast )
      goto LABEL_91;
    v139 = (char *)m_listExcelData._Mylast;
LABEL_90:
    memmove((char *)m_listExcelData._Myfirst, v139, 0);
LABEL_91:
    v157 = -1;
    if ( m_listExcelData._Myfirst )
      operator delete(m_listExcelData._Myfirst);
    goto LABEL_289;
  }
  while ( 1 )
  {
    v48 = Skill::GetLearnPassiveSkillInfo(i);
    kSkillID = (unsigned __int16)v48;
    v49 = 0;
    if ( !ITableBase<PassiveSkillInfo,PasSkillInfoTab>::GetTotal() )
      break;
    while ( *(_WORD *)CDataReader::GetRecord(
                        (CDataReader *)(ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ms_pkTable + 4),
                        v49) != v48 )
    {
      if ( ++v49 >= ITableBase<PassiveSkillInfo,PasSkillInfoTab>::GetTotal() )
        goto LABEL_99;
    }
    v50 = CDataReader::GetRecord((CDataReader *)(ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ms_pkTable + 4), v49);
    v51 = (Skill::EmpowerInfo)v50;
    kInfo = (Skill::EmpowerInfo)v50;
    if ( (SkillData **)v50 == v3 )
      break;
    v52 = v50 + 34;
    v53 = v50 + 34;
    *(_DWORD *)levInfoTxt = *(_DWORD *)&v51 + 34;
    do
      v54 = *v53++;
    while ( v54 );
    maxsize = (unsigned int)&v53[-*(_DWORD *)&v51 - 35];
    v55 = (char *)(*(_DWORD *)&v51 + 34);
    LOBYTE(vecTemp1._Myfirst) = 0;
    v152 = 15;
    src = 0;
    do
      v56 = *v55++;
    while ( v56 );
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&vecTemp1,
      (const char *)(*(_DWORD *)&v51 + 34),
      (unsigned int)&v55[-*(_DWORD *)&v51 - 35]);
    LOBYTE(v157) = 5;
    data = (SkillData *)m_listExcelData._Myfirst;
    if ( m_listExcelData._Myfirst == m_listExcelData._Mylast )
    {
LABEL_117:
      v62 = (SkillData *)operator new(0x20u);
      if ( v62 )
      {
        v62->skillName._Myres = 15;
        v62->skillName._Mysize = 0;
        v62->skillName._Bx._Buf[0] = 0;
        v63 = v62;
      }
      else
      {
        v63 = 0;
      }
      data = v63;
      if ( !strcmp((const char *)(*(_DWORD *)&v51 + 2), "PowerofLove01") )
      {
        v153._Myres = 15;
        v153._Mysize = 0;
        v153._Bx._Buf[0] = 0;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v153, v52, strlen(v52));
        if ( (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v63 != &v153 )
        {
          if ( v63->skillName._Myres >= 0x10 )
            operator delete(v63->skillName._Bx._Ptr);
          v63->skillName._Myres = 15;
          v63->skillName._Mysize = 0;
          v63->skillName._Bx._Buf[0] = 0;
          if ( v153._Myres >= 0x10 )
          {
            v63->skillName._Bx._Ptr = v153._Bx._Ptr;
            v153._Bx._Ptr = 0;
          }
          else
          {
            memmove(v63->skillName._Bx._Buf, v153._Bx._Buf, v153._Mysize + 1);
          }
          v63->skillName._Mysize = v153._Mysize;
          v63->skillName._Myres = v153._Myres;
          v153._Myres = 15;
          v153._Mysize = 0;
          v153._Bx._Buf[0] = 0;
        }
        LOBYTE(v157) = 5;
        if ( v153._Myres >= 0x10 )
        {
          v69 = v153._Bx._Ptr;
          goto LABEL_145;
        }
      }
      else
      {
        v70 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(
                (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&vecTemp1,
                &result,
                0,
                maxsize - 4);
        v31 = v70->_Myres < 0x10;
        LOBYTE(v157) = 7;
        if ( v31 )
          v71 = (const char *)v70;
        else
          v71 = v70->_Bx._Ptr;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v63->skillName, v71, strlen(v71));
        LOBYTE(v157) = 5;
        if ( result._Myres >= 0x10 )
        {
          v69 = result._Bx._Ptr;
LABEL_145:
          operator delete(v69);
        }
      }
      v72 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(
              (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&vecTemp1,
              &result,
              maxsize - 3,
              2u);
      if ( v72->_Myres >= 0x10 )
        v72 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v72->_Bx._Ptr;
      v63->skillLv = atoi(v72->_Bx._Buf);
      if ( result._Myres >= 0x10 )
        operator delete(result._Bx._Ptr);
      v73 = m_listExcelData._Mylast;
      v74 = m_listExcelData._Myfirst;
      v63->id = kSkillID;
      if ( &data >= v73 || v74 > &data )
      {
        if ( v73 == m_listExcelData._Myend )
        {
          v80 = v73 - v74;
          if ( v80 > 0x3FFFFFFE )
            goto LABEL_93;
          v81 = v80 + 1;
          v82 = m_listExcelData._Myend - v74;
          if ( v81 > v82 )
          {
            if ( 0x3FFFFFFF - (v82 >> 1) >= v82 )
              v83 = (v82 >> 1) + v82;
            else
              v83 = 0;
            if ( v83 < v81 )
              v83 = v81;
            std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
              (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&m_listExcelData,
              v83);
            v73 = m_listExcelData._Mylast;
          }
        }
        if ( v73 )
          *v73 = v63;
      }
      else
      {
        v75 = &data - v74;
        if ( v73 == m_listExcelData._Myend )
        {
          v76 = v73 - v74;
          if ( v76 > 0x3FFFFFFE )
            goto LABEL_93;
          v77 = v76 + 1;
          v78 = m_listExcelData._Myend - v74;
          if ( v77 > v78 )
          {
            if ( 0x3FFFFFFF - (v78 >> 1) >= v78 )
              v79 = (v78 >> 1) + v78;
            else
              v79 = 0;
            if ( v79 < v77 )
              v79 = v77;
            std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
              (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&m_listExcelData,
              v79);
            v73 = m_listExcelData._Mylast;
            v74 = m_listExcelData._Myfirst;
          }
        }
        if ( v73 )
          *v73 = v74[v75];
      }
      ++skillDataBankCount;
      m_listExcelData._Mylast = v73 + 1;
      goto LABEL_175;
    }
    while ( 1 )
    {
      v57 = data->skillName._Bx._Ptr;
      if ( *((_DWORD *)data->skillName._Bx._Ptr + 5) < 0x10u )
        v58 = data->skillName._Bx._Ptr;
      else
        v58 = *(char **)v57;
      v59 = (unsigned __int8)v57[28];
      v60 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(
              (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&vecTemp1,
              &result,
              0,
              maxsize - 4);
      if ( v60->_Myres >= 0x10 )
        v60 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v60->_Bx._Ptr;
      v61 = strcmp(v58, v60->_Bx._Buf) == 0;
      if ( result._Myres >= 0x10 )
        operator delete(result._Bx._Ptr);
      if ( v61 )
        break;
      data = (SkillData *)((char *)data + 4);
      if ( data == (SkillData *)m_listExcelData._Mylast )
      {
        v51 = kInfo;
        v52 = *(const char **)levInfoTxt;
        goto LABEL_117;
      }
    }
    v64 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(
            (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&vecTemp1,
            &result,
            maxsize - 3,
            2u);
    if ( v64->_Myres >= 0x10 )
      v64 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v64->_Bx._Ptr;
    v65 = v59 < atoi(v64->_Bx._Buf);
    if ( result._Myres >= 0x10 )
      operator delete(result._Bx._Ptr);
    if ( v65 )
    {
      v66 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(
              (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&vecTemp1,
              &result,
              maxsize - 3,
              2u);
      if ( v66->_Myres >= 0x10 )
        v66 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v66->_Bx._Ptr;
      v67 = atoi(v66->_Bx._Buf);
      v68 = data;
      data->skillName._Bx._Ptr[28] = v67;
      if ( result._Myres >= 0x10 )
        operator delete(result._Bx._Ptr);
      *((_WORD *)v68->skillName._Bx._Ptr + 15) = kSkillID;
    }
LABEL_175:
    LOBYTE(v157) = 4;
    if ( v152 >= 0x10 )
      operator delete(vecTemp1._Myfirst);
    if ( ++i >= totalNuma )
      goto LABEL_179;
    v3 = 0;
  }
LABEL_99:
  if ( m_listExcelData._Myfirst != v3 )
    operator delete(m_listExcelData._Myfirst);
}
// A8C178: using guessed type int ITableBase<ProduceViewInfo,ProduceViewInfoTable>::ms_pkTable;
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
// A8CAAC: using guessed type int ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ms_pkTable;

//----- (00598210) --------------------------------------------------------
void __thiscall SkillWin::ResetPage(SkillWin *this)
{
  this->m_uiCurPage = 0;
  this->m_uiCurPageType = 0;
  SkillWin::ResetContents(this);
}

//----- (00598230) --------------------------------------------------------
void __thiscall SkillWin::OnActiveSkill(SkillWin *this)
{
  SkillWin *v1; // esi@1
  int v2; // edi@1
  signed int v3; // ebx@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkSkillEmpowerPointText->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkSkillEmpowerAntiPointText->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkSkillEmpowerAntiTitleText->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkSkillEmpowerTitleText->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkEmpowerDescSpr->vfptr[64].__vecDelDtor)(1);
  v1->m_uiCurPage = 0;
  v1->m_uiCurPageType = 0;
  SkillWin::ResetContents(v1);
  v2 = (int)v1->m_apkEmpowerWin;
  v3 = 8;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 256))(1);
    v2 += 4;
    --v3;
  }
  while ( v3 );
  ((void (__stdcall *)(_DWORD))v1->m_pkSkillEmpowerNotice->vfptr[64].__vecDelDtor)(1);
}

//----- (005982E0) --------------------------------------------------------
void __thiscall SkillWin::OnPasssiveSkill(SkillWin *this)
{
  SkillWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkSkillEmpowerPointText->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkSkillEmpowerAntiPointText->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkSkillEmpowerAntiTitleText->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkSkillEmpowerTitleText->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkEmpowerDescSpr->vfptr[64].__vecDelDtor)(0);
  v1->m_uiCurPage = 0;
  v1->m_uiCurPageType = 1;
  SkillWin::ResetContents(v1);
  SkillWin::OnEmpowerWinShow(v1, 0);
}

//----- (00598370) --------------------------------------------------------
void __thiscall SkillWin::OnProductSkill(SkillWin *this)
{
  SkillWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkSkillEmpowerPointText->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkSkillEmpowerAntiPointText->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkSkillEmpowerAntiTitleText->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkSkillEmpowerTitleText->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkEmpowerDescSpr->vfptr[64].__vecDelDtor)(0);
  if ( Skill::GetCountOfILearnAnyProdBaseSkill() < 2 )
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkProductSkillSelectWin->vfptr);
  v1->m_uiCurPage = 0;
  v1->m_uiCurPageType = 3;
  SkillWin::ResetContents(v1);
  SkillWin::OnEmpowerWinShow(v1, 0);
}

//----- (00598410) --------------------------------------------------------
void __thiscall SkillWin::OnPrevPage(SkillWin *this)
{
  unsigned int v1; // eax@1

  v1 = this->m_uiCurPage;
  if ( v1 )
  {
    this->m_uiCurPage = v1 - 1;
    SkillWin::ResetContents(this);
  }
}

//----- (00598430) --------------------------------------------------------
void __thiscall SkillWin::OnNextPage(SkillWin *this)
{
  SkillWin *v1; // esi@1
  unsigned int v2; // eax@1
  unsigned int v3; // ecx@1

  v1 = this;
  v2 = SkillWin::GetLearnSkillNum(this);
  v3 = v1->m_uiCurPage;
  if ( 8 * v3 + 8 < v2 )
  {
    v1->m_uiCurPage = v3 + 1;
    SkillWin::ResetContents(v1);
  }
}

//----- (00598460) --------------------------------------------------------
void __thiscall SkillWin::SelectByPageType(SkillWin *this, unsigned int Type)
{
  switch ( Type )
  {
    case 1u:
      SkillWin::OnPasssiveSkill(this);
      break;
    case 2u:
      SkillWin::OnCommboSkill(this);
      break;
    case 3u:
      SkillWin::OnProductSkill(this);
      break;
    default:
      SkillWin::OnActiveSkill(this);
      break;
  }
}

//----- (005984B0) --------------------------------------------------------
void __thiscall SkillWin::OnCommand(SkillWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 9u:
      SkillWin::OnInvLClick(this, lParam);
      break;
    case 0xAu:
      SkillWin::OnInvRClick(this, lParam);
      break;
    case 0xBu:
      SkillWin::OnActiveSkill(this);
      break;
    case 0xCu:
      SkillWin::OnPasssiveSkill(this);
      break;
    case 0xDu:
      SkillWin::OnCommboSkill(this);
      break;
    case 0xEu:
      SkillWin::OnProductSkill(this);
      break;
    case 0xFu:
      SkillWin::OnPrevPage(this);
      break;
    case 0x10u:
      SkillWin::OnNextPage(this);
      break;
    case 0x11u:
      SkillWin::OnOpenPowerWindow(this);
      break;
    case 0x12u:
      GameFrameWork::NcSkillEmpowResetReq((GameFrameWork *)this->m_pkFrameWork);
      break;
    case 0x13u:
      SkillWin::OnLevelNext(this, lParam);
      break;
    case 0x14u:
      SkillWin::OnLevelPre(this, lParam);
      break;
    case 0x15u:
      SkillWin::OnEmpowerClick(this, lParam);
      break;
    case 0x16u:
      SkillWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (005985A0) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::~NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> > *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::`vftable';
}
// 9A3578: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::`vftable')(void *p, char);

//----- (005985B0) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> > *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> > *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> > *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9A3578: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::`vftable')(void *p, char);

//----- (005985E0) --------------------------------------------------------
PosInfoWinBut *__thiscall PosInfoWinBut::`vector deleting destructor'(PosInfoWinBut *this, unsigned int a2)
{
  PosInfoWinBut *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&PosInfoWinBut::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&PosInfoWinBut::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A2E40: using guessed type void (__thiscall *PosInfoWinBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A2E5C: using guessed type int (__thiscall *PosInfoWinBut::`vftable'{for `NiNode'})(void *p, char);

//----- (00598620) --------------------------------------------------------
LevelSelectWinBut *__thiscall LevelSelectWinBut::`scalar deleting destructor'(LevelSelectWinBut *this, unsigned int a2)
{
  LevelSelectWinBut *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&LevelSelectWinBut::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&LevelSelectWinBut::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A3094: using guessed type void (__thiscall *LevelSelectWinBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A30B4: using guessed type int (__thiscall *LevelSelectWinBut::`vftable'{for `NiNode'})(void *p, char);

//----- (00598660) --------------------------------------------------------
SkillInvWin *__thiscall SkillInvWin::`scalar deleting destructor'(SkillInvWin *this, unsigned int a2)
{
  SkillInvWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&SkillInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SkillInvWin::`vftable'{for `IDirectMessenger'};
  SkillIcon::~SkillIcon((SkillIcon *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A32EC: using guessed type void (__thiscall *SkillInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A330C: using guessed type int (__thiscall *SkillInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005986A0) --------------------------------------------------------
NiPointer<PgWin> *__thiscall NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::RemoveHead(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *this, NiPointer<PgWin> *result)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *v2; // esi@1
  NiTListItem<NiPointer<PgWin> > *v3; // edi@1
  NiTListItem<NiPointer<PgWin> > *v4; // eax@1
  PgWin *v5; // eax@4

  v2 = this;
  v3 = this->m_pkHead;
  v4 = v3->m_pkNext;
  this->m_pkHead = v3->m_pkNext;
  if ( v4 )
    v4->m_pkPrev = 0;
  else
    this->m_pkTail = 0;
  v5 = v3->m_element.m_pObject;
  result->m_pObject = v5;
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  ((void (__thiscall *)(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *))v2->vfptr->DeleteItem)(v2);
  --v2->m_kAllocator.m_uiCount;
  return result;
}

//----- (00598730) --------------------------------------------------------
unsigned int __cdecl GuildTournamentStateTab::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C1BC: using guessed type int ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ms_pkTable;

//----- (00598750) --------------------------------------------------------
void __thiscall NiTPointerList<NiPointer<PgFont>>::~NiTPointerList<NiPointer<PgFont>>(NiTPointerList<NiPointer<PgFont> > *this)
{
  NiTPointerList<NiPointer<PgFont> > *v1; // edi@1
  NiTListItem<NiPointer<PgFont> > *v2; // esi@1
  NiTListItem<NiPointer<PgFont> > *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> >Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> > *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::`vftable';
}
// 9A3578: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::`vftable')(void *p, char);
// 9A3588: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::`vftable')(void *p, char);

//----- (005987D0) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> > *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> > *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> > *v2; // edi@1
  NiTListItem<NiPointer<PgFont> > *v3; // esi@1
  NiTListItem<NiPointer<PgFont> > *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> >Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> > *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A3578: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::`vftable')(void *p, char);
// 9A3588: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::`vftable')(void *p, char);

//----- (00598860) --------------------------------------------------------
void __thiscall PgTList<NiPointer<PgFont>>::~PgTList<NiPointer<PgFont>>(PgTList<NiPointer<PgFont> > *this)
{
  PgTList<NiPointer<PgFont> > *v1; // edi@1
  NiTListItem<NiPointer<PgFont> > *v2; // esi@1
  NiTListItem<NiPointer<PgFont> > *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> >Vtbl *)&PgTList<NiPointer<PgFont>>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> > *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::`vftable';
}
// 9A3578: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::`vftable')(void *p, char);
// 9A3598: using guessed type int (__thiscall *PgTList<NiPointer<PgFont>>::`vftable')(void *p, char);

//----- (005988E0) --------------------------------------------------------
PgTList<NiPointer<PgFont> > *__thiscall PgTList<NiPointer<PgFont>>::`scalar deleting destructor'(PgTList<NiPointer<PgFont> > *this, unsigned int a2)
{
  PgTList<NiPointer<PgFont> > *v2; // edi@1
  NiTListItem<NiPointer<PgFont> > *v3; // esi@1
  NiTListItem<NiPointer<PgFont> > *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> >Vtbl *)&PgTList<NiPointer<PgFont>>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> > *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A3578: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgFont>>::`vftable')(void *p, char);
// 9A3598: using guessed type int (__thiscall *PgTList<NiPointer<PgFont>>::`vftable')(void *p, char);

//----- (00598970) --------------------------------------------------------
SkillWin *__thiscall SkillWin::`vector deleting destructor'(SkillWin *this, unsigned int a2)
{
  SkillWin *v2; // esi@1

  v2 = this;
  SkillWin::~SkillWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005989A0) --------------------------------------------------------
void __thiscall SoulStoneInfoWin::SoulStoneInfoWin(SoulStoneInfoWin *this)
{
  SoulStoneInfoWin *v1; // esi@1

  v1 = this;
  FrameBoxWin::FrameBoxWin((FrameBoxWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&SoulStoneInfoWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&SoulStoneInfoWin::`vftable'{for `IDirectMessenger'};
}
// 9A3854: using guessed type void (__thiscall *SoulStoneInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A3874: using guessed type int (__thiscall *SoulStoneInfoWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005989C0) --------------------------------------------------------
void __thiscall SoulStoneInfoWin::~SoulStoneInfoWin(SoulStoneInfoWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&SoulStoneInfoWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SoulStoneInfoWin::`vftable'{for `IDirectMessenger'};
  FrameBoxWin::~FrameBoxWin((FrameBoxWin *)&this->vfptr);
}
// 9A3854: using guessed type void (__thiscall *SoulStoneInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A3874: using guessed type int (__thiscall *SoulStoneInfoWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005989E0) --------------------------------------------------------
void __thiscall SoulStoneInfoWin::HideAllMoneyWin(SoulStoneInfoWin *this)
{
  SoulStoneInfoWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkGemIcon->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkGoldIcon->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkSilverIcon->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkCopperIcon->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkGemText->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkGoldText->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkSilverText->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkCopperText->vfptr[64].__vecDelDtor)(0);
}

//----- (00598A80) --------------------------------------------------------
BOOL __thiscall SoulStoneInfoWin::IsMoneyShow(SoulStoneInfoWin *this)
{
  SoulStoneInfoWin *v1; // esi@1

  v1 = this;
  return (unsigned __int8)((int (*)(void))this->m_pkGemIcon->vfptr[65].__vecDelDtor)()
      || (unsigned __int8)((int (*)(void))v1->m_pkGoldIcon->vfptr[65].__vecDelDtor)()
      || (unsigned __int8)((int (*)(void))v1->m_pkSilverIcon->vfptr[65].__vecDelDtor)()
      || (unsigned __int8)((int (*)(void))v1->m_pkCopperIcon->vfptr[65].__vecDelDtor)();
}

//----- (00598AE0) --------------------------------------------------------
int __thiscall SoulStoneInfoWin::GetMoneyWinWidth(SoulStoneInfoWin *this)
{
  SoulStoneInfoWin *v1; // esi@1
  int v2; // edi@1
  int result; // eax@8

  v1 = this;
  v2 = 0;
  if ( (unsigned __int8)((int (*)(void))this->m_pkGemIcon->vfptr[65].__vecDelDtor)() )
    v2 = ((int (*)(void))v1->m_pkGemText->vfptr[36].__vecDelDtor)() + v1->m_uiIconWidth + 2;
  if ( (unsigned __int8)((int (*)(void))v1->m_pkGoldIcon->vfptr[65].__vecDelDtor)() )
    v2 += v1->m_uiIconWidth + ((int (*)(void))v1->m_pkGoldText->vfptr[36].__vecDelDtor)() + 2;
  if ( (unsigned __int8)((int (*)(void))v1->m_pkSilverIcon->vfptr[65].__vecDelDtor)() )
    v2 += v1->m_uiIconWidth + ((int (*)(void))v1->m_pkSilverText->vfptr[36].__vecDelDtor)() + 2;
  if ( (unsigned __int8)((int (*)(void))v1->m_pkCopperIcon->vfptr[65].__vecDelDtor)() )
    result = v2 + v1->m_uiIconWidth + ((int (*)(void))v1->m_pkCopperText->vfptr[36].__vecDelDtor)() + 2;
  else
    result = v2;
  return result;
}

//----- (00598BB0) --------------------------------------------------------
void __thiscall SoulStoneInfoWin::ShowMoneyWin(SoulStoneInfoWin *this, int iXPos, int iYPos, __int64 i64Money)
{
  SoulStoneInfoWin *v4; // esi@1
  __int64 v5; // kr00_8@1
  int v6; // edi@2
  int v7; // edi@2
  int v8; // edi@5
  int v9; // edi@7
  int v10; // edi@9
  int v11; // edi@11
  __int64 i64Val; // [sp+Ch] [bp-2Ch]@4
  __int64 i64Vala; // [sp+Ch] [bp-2Ch]@6
  __int64 i64Valb; // [sp+Ch] [bp-2Ch]@8
  char acMoneyStr[32]; // [sp+14h] [bp-24h]@2

  v4 = this;
  v5 = User::GetGem(i64Money);
  if ( v5 )
  {
    ((void (__stdcall *)(_DWORD))v4->m_pkGemText->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v4->m_pkGemText->vfptr[77].__vecDelDtor)(iXPos, iYPos + 3);
    sprintf(acMoneyStr, "%I64d", v5);
    ((void (__stdcall *)(_DWORD))v4->m_pkGemText->vfptr[125].__vecDelDtor)(acMoneyStr);
    v6 = iXPos + ((int (*)(void))v4->m_pkGemText->vfptr[36].__vecDelDtor)() + 1;
    ((void (__stdcall *)(_DWORD))v4->m_pkGemIcon->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v4->m_pkGemIcon->vfptr[77].__vecDelDtor)(v6, iYPos);
    v7 = v6 + v4->m_uiIconWidth + 1;
  }
  else
  {
    v7 = iXPos;
  }
  i64Val = User::GetGold(i64Money);
  if ( i64Val )
  {
    ((void (__stdcall *)(_DWORD))v4->m_pkGoldText->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v4->m_pkGoldText->vfptr[77].__vecDelDtor)(v7, iYPos + 3);
    sprintf(acMoneyStr, "%I64d", i64Val);
    ((void (__stdcall *)(_DWORD))v4->m_pkGoldText->vfptr[125].__vecDelDtor)(acMoneyStr);
    v8 = v7 + ((int (*)(void))v4->m_pkGoldText->vfptr[36].__vecDelDtor)() + 1;
    ((void (__stdcall *)(_DWORD))v4->m_pkGoldIcon->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v4->m_pkGoldIcon->vfptr[77].__vecDelDtor)(v8, iYPos);
    v7 = v8 + v4->m_uiIconWidth + 1;
  }
  i64Vala = User::GetSilver(i64Money);
  if ( i64Vala )
  {
    ((void (__stdcall *)(_DWORD))v4->m_pkSilverText->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v4->m_pkSilverText->vfptr[77].__vecDelDtor)(v7, iYPos + 3);
    sprintf(acMoneyStr, "%I64d", i64Vala);
    ((void (__stdcall *)(_DWORD))v4->m_pkSilverText->vfptr[125].__vecDelDtor)(acMoneyStr);
    v9 = v7 + ((int (*)(void))v4->m_pkSilverText->vfptr[36].__vecDelDtor)() + 1;
    ((void (__stdcall *)(_DWORD))v4->m_pkSilverIcon->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v4->m_pkSilverIcon->vfptr[77].__vecDelDtor)(v9, iYPos);
    v7 = v9 + v4->m_uiIconWidth + 1;
  }
  i64Valb = User::GetCopper(i64Money);
  if ( i64Valb )
  {
    ((void (__stdcall *)(_DWORD))v4->m_pkCopperText->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v4->m_pkCopperText->vfptr[77].__vecDelDtor)(v7, iYPos + 3);
    sprintf(acMoneyStr, "%I64d", i64Valb);
    ((void (__stdcall *)(_DWORD))v4->m_pkCopperText->vfptr[125].__vecDelDtor)(acMoneyStr);
    v10 = v7 + ((int (*)(void))v4->m_pkCopperText->vfptr[36].__vecDelDtor)() + 1;
    ((void (__stdcall *)(_DWORD))v4->m_pkCopperIcon->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v4->m_pkCopperIcon->vfptr[77].__vecDelDtor)(v10, iYPos);
    v7 = v10 + v4->m_uiIconWidth + 1;
  }
  if ( !i64Money )
  {
    ((void (__stdcall *)(_DWORD))v4->m_pkCopperText->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v4->m_pkCopperText->vfptr[77].__vecDelDtor)(v7, iYPos + 3);
    sprintf(acMoneyStr, "%d", 0);
    ((void (__stdcall *)(_DWORD))v4->m_pkCopperText->vfptr[125].__vecDelDtor)(acMoneyStr);
    v11 = v7 + ((int (*)(void))v4->m_pkCopperText->vfptr[36].__vecDelDtor)() + 1;
    ((void (__stdcall *)(_DWORD))v4->m_pkCopperIcon->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD, _DWORD))v4->m_pkCopperIcon->vfptr[77].__vecDelDtor)(v11, iYPos);
  }
}

//----- (00598F50) --------------------------------------------------------
void __thiscall SoulStoneInfoWin::AdjustSizeIfIamToolTipWin(SoulStoneInfoWin *this)
{
  char *v1; // esi@1
  int v2; // eax@1
  PgFont *v3; // edi@1
  unsigned int v4; // ebx@2
  char *v5; // eax@3
  bool v6; // zf@7
  SoulStoneInfoWin *v7; // esi@8
  unsigned int v8; // edi@12
  unsigned int v9; // eax@12
  tagSIZE kSize; // [sp+8h] [bp-18h]@4
  SoulStoneInfoWin *v11; // [sp+10h] [bp-10h]@1
  int v12; // [sp+14h] [bp-Ch]@2
  char *v13; // [sp+18h] [bp-8h]@2
  unsigned int uiCy; // [sp+1Ch] [bp-4h]@2

  v1 = (char *)this->m_apkTextWin;
  v11 = this;
  v2 = ((int (*)(void))this->m_apkTextWin[0]->vfptr[114].__vecDelDtor)();
  v3 = (PgFont *)v2;
  if ( v2 )
  {
    SelectObject(*(HDC *)(v2 + 192), *(HGDIOBJ *)(v2 + 184));
    v4 = 0;
    uiCy = 0;
    v13 = v1;
    v12 = 20;
    do
    {
      v5 = (char *)(*(int (**)(void))(**(_DWORD **)v1 + 484))();
      if ( v5 )
      {
        PgFont::GetTextSize(v3, v5, strlen(v5), &kSize);
        if ( kSize.cx > v4 )
          v4 = kSize.cx;
        uiCy += kSize.cy + 2;
      }
      v1 = v13 + 4;
      v6 = v12-- == 1;
      v13 += 4;
    }
    while ( !v6 );
    v7 = v11;
    if ( (unsigned __int8)((int (*)(void))v11->m_pkGemIcon->vfptr[65].__vecDelDtor)()
      || (unsigned __int8)((int (*)(void))v7->m_pkGoldIcon->vfptr[65].__vecDelDtor)()
      || (unsigned __int8)((int (*)(void))v7->m_pkSilverIcon->vfptr[65].__vecDelDtor)()
      || (unsigned __int8)((int (*)(void))v7->m_pkCopperIcon->vfptr[65].__vecDelDtor)() )
    {
      v8 = uiCy + v7->m_uiIconHeight + 2;
      v9 = SoulStoneInfoWin::GetMoneyWinWidth(v7);
      if ( v9 > v4 )
        v4 = v9;
    }
    else
    {
      v8 = uiCy;
    }
    if ( v4 )
      ((void (__thiscall *)(SoulStoneInfoWin *, unsigned int, unsigned int))v7->vfptr[135].__vecDelDtor)(
        v7,
        v4 + 2 * v7->m_uiEdgeWidth,
        v8 + 2 * v7->m_uiEdgeHeight);
  }
}

//----- (00599090) --------------------------------------------------------
char __thiscall SoulStoneInfoWin::Create(SoulStoneInfoWin *this, NiSourceTexture *pkTexture, unsigned int uiEdgeWidth, unsigned int uiEdgeHeight)
{
  SoulStoneInfoWin *v4; // esi@1
  signed int v5; // edi@2
  PgWinText **v6; // ebx@2
  PgFont *v7; // eax@3
  PgWinText *v8; // eax@3
  void (__thiscall ***v9)(_DWORD, _DWORD); // esi@5
  NiTexturePalette *v11; // edi@10
  const char *v12; // eax@12
  PgSprData *v13; // eax@13
  PgWinSpr *v14; // eax@13
  NiAVObject *v15; // ecx@13
  PgSprData *v16; // eax@13
  PgWinSpr *v17; // eax@13
  NiAVObject *v18; // ecx@13
  PgSprData *v19; // eax@13
  PgWinSpr *v20; // eax@13
  NiAVObject *v21; // ecx@13
  PgSprData *v22; // eax@13
  PgWinSpr *v23; // eax@13
  PgWinSpr *v24; // ecx@13
  int v25; // eax@13
  PgWinSpr *v26; // ecx@13
  PgFont *v27; // eax@13
  PgFont *v28; // eax@13
  PgFont *v29; // eax@13
  PgFont *v30; // eax@13
  void (__thiscall ***v31)(_DWORD, _DWORD); // esi@14
  int uiLeft; // [sp+10h] [bp-10h]@13
  int v33; // [sp+1Ch] [bp-4h]@4

  v4 = this;
  if ( !FrameBoxWin::Create((FrameBoxWin *)&this->vfptr, pkTexture, uiEdgeWidth, uiEdgeHeight, 0, 0, 0, 0) )
    return 0;
  v5 = 0;
  v6 = v4->m_apkTextWin;
  do
  {
    v7 = Font::Get(0);
    v8 = PgWinText::CreateWin(
           v4->m_uiEdgeWidth,
           v5 + v4->m_uiEdgeHeight + 2,
           0x100u,
           0x10u,
           v7,
           (PgWin *)&v4->vfptr,
           0,
           0);
    *v6 = v8;
    v8->vfptr[60].__vecDelDtor((NiRefObject *)v8, 0);
    v5 += 14;
    ++v6;
  }
  while ( v5 < 280 );
  ((void (__thiscall *)(SoulStoneInfoWin *, unsigned int, unsigned int))v4->vfptr[135].__vecDelDtor)(
    v4,
    2 * v4->m_uiEdgeWidth + 128,
    2 * v4->m_uiEdgeHeight + 12);
  v4->vfptr[64].__vecDelDtor((NiRefObject *)v4, 0);
  uiEdgeHeight = 0;
  v33 = 0;
  MenuTexMgr::GetTexture(4u);
  if ( !pkTexture )
  {
    v9 = (void (__thiscall ***)(_DWORD, _DWORD))uiEdgeHeight;
    v33 = -1;
    if ( uiEdgeHeight && !InterlockedDecrement((volatile LONG *)(uiEdgeHeight + 4)) )
    {
      if ( v9 )
        (**v9)(v9, 1);
    }
    return 0;
  }
  v11 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v12 = Folder::Merge(&Folder::m_acMenu, "Game\\Money.nif");
  PgUtil::LoadNodeNifFile(v12, (NiPointer<NiNode> *)&uiEdgeHeight, v11);
  if ( !uiEdgeHeight )
    return 0;
  v13 = PgSprData::Create((NiAVObject *)uiEdgeHeight, "MyGemBtn", &uiLeft, (int *)&uiEdgeWidth, 0);
  v14 = PgWinSpr::CreateWin(0, 0, v13, (PgWin *)&v4->vfptr, 0, 0);
  v15 = (NiAVObject *)uiEdgeHeight;
  v4->m_pkGemIcon = v14;
  v16 = PgSprData::Create(v15, "MyGoldBtn", &uiLeft, (int *)&uiEdgeWidth, 0);
  v17 = PgWinSpr::CreateWin(0, 0, v16, (PgWin *)&v4->vfptr, 0, 0);
  v18 = (NiAVObject *)uiEdgeHeight;
  v4->m_pkGoldIcon = v17;
  v19 = PgSprData::Create(v18, "MySilverBtn", &uiLeft, (int *)&uiEdgeWidth, 0);
  v20 = PgWinSpr::CreateWin(0, 0, v19, (PgWin *)&v4->vfptr, 0, 0);
  v21 = (NiAVObject *)uiEdgeHeight;
  v4->m_pkSilverIcon = v20;
  v22 = PgSprData::Create(v21, "MyCopperBtn", &uiLeft, (int *)&uiEdgeWidth, 0);
  v23 = PgWinSpr::CreateWin(0, 0, v22, (PgWin *)&v4->vfptr, 0, 0);
  v24 = v4->m_pkGemIcon;
  v4->m_pkCopperIcon = v23;
  v25 = ((int (*)(void))v24->vfptr[36].__vecDelDtor)();
  v26 = v4->m_pkGemIcon;
  v4->m_uiIconWidth = v25;
  v4->m_uiIconHeight = ((int (*)(void))v26->vfptr[37].__vecDelDtor)();
  v27 = Font::Get(SMALL);
  v4->m_pkGemText = AutoSizingTextWin::CreateWin(0, 0, v27, (PgWin *)&v4->vfptr);
  v28 = Font::Get(SMALL);
  v4->m_pkGoldText = AutoSizingTextWin::CreateWin(0, 0, v28, (PgWin *)&v4->vfptr);
  v29 = Font::Get(SMALL);
  v4->m_pkSilverText = AutoSizingTextWin::CreateWin(0, 0, v29, (PgWin *)&v4->vfptr);
  v30 = Font::Get(SMALL);
  v4->m_pkCopperText = AutoSizingTextWin::CreateWin(0, 0, v30, (PgWin *)&v4->vfptr);
  SoulStoneInfoWin::HideAllMoneyWin(v4);
  v33 = -1;
  if ( uiEdgeHeight )
  {
    v31 = (void (__thiscall ***)(_DWORD, _DWORD))uiEdgeHeight;
    if ( !InterlockedDecrement((volatile LONG *)(uiEdgeHeight + 4)) )
    {
      if ( v31 )
        (**v31)(v31, 1);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00599390) --------------------------------------------------------
int __thiscall SoulStoneInfoWin::SetHPInfo(SoulStoneInfoWin *this, unsigned int dwCur, unsigned int dwMax)
{
  SoulStoneInfoWin *v3; // esi@1
  int v4; // edi@1
  NiRefObjectVtbl *v5; // edi@3
  NiUnsharedGeometryGroup *v6; // eax@3
  NiUnsharedGeometryGroup *v7; // eax@3
  NiUnsharedGeometryGroup *v8; // eax@3
  signed int v9; // edi@3
  char *v10; // ebx@3
  PgWinText **v11; // esi@3
  int v12; // eax@4
  PgWinText *v13; // ecx@5
  HDC__ *hDC; // [sp+Ch] [bp-108h]@1
  HDC__ *hDCa; // [sp+Ch] [bp-108h]@3
  char acStr[256]; // [sp+10h] [bp-104h]@3

  v3 = this;
  SoulStoneInfoWin::HideAllMoneyWin(this);
  v4 = (int)v3->m_apkTextWin;
  hDC = (HDC__ *)20;
  do
  {
    (*(void (__stdcall **)(void *))(**(_DWORD **)v4 + 472))(&unk_9A37F3);
    (*(void (__stdcall **)(D3DXCOLOR *))(**(_DWORD **)v4 + 468))(&Color::m_kDxWhiteColor);
    v4 += 4;
    hDC = (HDC__ *)((char *)hDC - 1);
  }
  while ( hDC );
  v5 = v3->m_apkTextWin[0]->vfptr;
  v6 = TextData::Get(0x474A93A0u);
  v5[118].__vecDelDtor((NiRefObject *)v3->m_apkTextWin[0], (unsigned int)v6);
  v7 = TextData::Get(0xE9F80745);
  sprintf(acStr, (const char *)v7, dwCur);
  ((void (__stdcall *)(char *))v3->m_apkTextWin[1]->vfptr[118].__vecDelDtor)(acStr);
  v8 = TextData::Get(0xD502074B);
  sprintf(acStr, (const char *)v8, dwMax);
  ((void (__stdcall *)(char *))v3->m_apkTextWin[2]->vfptr[118].__vecDelDtor)(acStr);
  ((void (__stdcall *)(const char *))v3->m_apkTextWin[3]->vfptr[118].__vecDelDtor)(" ");
  v9 = 4;
  hDCa = *(HDC__ **)(((int (*)(void))v3->m_apkTextWin[0]->vfptr[114].__vecDelDtor)() + 192);
  v10 = (char *)TextData::Get(0x2D4F563Cu);
  v11 = &v3->m_apkTextWin[4];
  do
  {
    v12 = PgUtil::StringPixelCopy(acStr, v10, hDCa, 200);
    if ( !v12 )
      break;
    v13 = *v11;
    acStr[v12] = 0;
    v10 += v12;
    ((void (__stdcall *)(char *))v13->vfptr[118].__vecDelDtor)(acStr);
    ++v9;
    ++v11;
  }
  while ( v9 < 20 );
  return v9;
}

//----- (00599530) --------------------------------------------------------
int __thiscall SoulStoneInfoWin::SetSPInfo(SoulStoneInfoWin *this, unsigned int dwCur, unsigned int dwMax)
{
  SoulStoneInfoWin *v3; // esi@1
  int v4; // edi@1
  NiRefObjectVtbl *v5; // edi@3
  NiUnsharedGeometryGroup *v6; // eax@3
  NiUnsharedGeometryGroup *v7; // eax@3
  NiUnsharedGeometryGroup *v8; // eax@3
  signed int v9; // edi@3
  char *v10; // ebx@3
  PgWinText **v11; // esi@3
  int v12; // eax@4
  PgWinText *v13; // ecx@5
  HDC__ *hDC; // [sp+Ch] [bp-108h]@1
  HDC__ *hDCa; // [sp+Ch] [bp-108h]@3
  char acStr[256]; // [sp+10h] [bp-104h]@3

  v3 = this;
  SoulStoneInfoWin::HideAllMoneyWin(this);
  v4 = (int)v3->m_apkTextWin;
  hDC = (HDC__ *)20;
  do
  {
    (*(void (__stdcall **)(void *))(**(_DWORD **)v4 + 472))(&unk_9A37FD);
    (*(void (__stdcall **)(D3DXCOLOR *))(**(_DWORD **)v4 + 468))(&Color::m_kDxWhiteColor);
    v4 += 4;
    hDC = (HDC__ *)((char *)hDC - 1);
  }
  while ( hDC );
  v5 = v3->m_apkTextWin[0]->vfptr;
  v6 = TextData::Get(0x475593A0u);
  v5[118].__vecDelDtor((NiRefObject *)v3->m_apkTextWin[0], (unsigned int)v6);
  v7 = TextData::Get(0xE9F80745);
  sprintf(acStr, (const char *)v7, dwCur);
  ((void (__stdcall *)(char *))v3->m_apkTextWin[1]->vfptr[118].__vecDelDtor)(acStr);
  v8 = TextData::Get(0xD502074B);
  sprintf(acStr, (const char *)v8, dwMax);
  ((void (__stdcall *)(char *))v3->m_apkTextWin[2]->vfptr[118].__vecDelDtor)(acStr);
  ((void (__stdcall *)(const char *))v3->m_apkTextWin[3]->vfptr[118].__vecDelDtor)(" ");
  v9 = 4;
  hDCa = *(HDC__ **)(((int (*)(void))v3->m_apkTextWin[0]->vfptr[114].__vecDelDtor)() + 192);
  v10 = (char *)TextData::Get(0x2D5A563Cu);
  v11 = &v3->m_apkTextWin[4];
  do
  {
    v12 = PgUtil::StringPixelCopy(acStr, v10, hDCa, 200);
    if ( !v12 )
      break;
    v13 = *v11;
    acStr[v12] = 0;
    v10 += v12;
    ((void (__stdcall *)(char *))v13->vfptr[118].__vecDelDtor)(acStr);
    ++v9;
    ++v11;
  }
  while ( v9 < 20 );
  return v9;
}

//----- (005996D0) --------------------------------------------------------
void __thiscall SoulStoneInfoWin::SetHPBuyInfo(SoulStoneInfoWin *this, unsigned int dwCur, unsigned int dwMax, unsigned int dwPrice)
{
  SoulStoneInfoWin *v4; // esi@1
  int v5; // eax@1

  v4 = this;
  v5 = SoulStoneInfoWin::SetHPInfo(this, dwCur, dwMax);
  SoulStoneInfoWin::ShowMoneyWin(v4, v4->m_uiEdgeWidth, v4->m_uiEdgeHeight + 14 * v5 + 2, dwPrice);
}

//----- (00599720) --------------------------------------------------------
void __thiscall SoulStoneInfoWin::SetSPBuyInfo(SoulStoneInfoWin *this, unsigned int dwCur, unsigned int dwMax, unsigned int dwPrice)
{
  SoulStoneInfoWin *v4; // esi@1
  int v5; // eax@1

  v4 = this;
  v5 = SoulStoneInfoWin::SetSPInfo(this, dwCur, dwMax);
  SoulStoneInfoWin::ShowMoneyWin(v4, v4->m_uiEdgeWidth, v4->m_uiEdgeHeight + 14 * v5 + 2, dwPrice);
}

//----- (00599770) --------------------------------------------------------
SoulStoneInfoWin *__cdecl SoulStoneInfoWin::CreateWin(NiSourceTexture *pkTexture, unsigned int uiEdgeHeight, unsigned int uiEdgeWidth)
{
  PgWin *v3; // eax@1
  PgWin *v4; // esi@1
  PgWin *v5; // edi@8
  SoulStoneInfoWin *v6; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x218u);
  v4 = v3;
  result.m_pObject = v3;
  v8 = 0;
  if ( v3 )
  {
    FrameBoxWin::FrameBoxWin((FrameBoxWin *)v3);
    v4->vfptr = (NiRefObjectVtbl *)&SoulStoneInfoWin::`vftable'{for `NiNode'};
    v4->vfptr = (IDirectMessengerVtbl *)&SoulStoneInfoWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v8 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v4);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, NiSourceTexture *, unsigned int, unsigned int))v4->vfptr[137].__vecDelDtor)(
                          v4,
                          pkTexture,
                          uiEdgeHeight,
                          uiEdgeWidth) )
  {
    ((void (__thiscall *)(PgWin *))v4->vfptr[89].__vecDelDtor)(v4);
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = (SoulStoneInfoWin *)v4;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v4);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = 0;
  }
  return v6;
}
// 9A3854: using guessed type void (__thiscall *SoulStoneInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A3874: using guessed type int (__thiscall *SoulStoneInfoWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005998C0) --------------------------------------------------------
SoulStoneInfoWin *__thiscall SoulStoneInfoWin::`scalar deleting destructor'(SoulStoneInfoWin *this, unsigned int a2)
{
  SoulStoneInfoWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&SoulStoneInfoWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SoulStoneInfoWin::`vftable'{for `IDirectMessenger'};
  FrameBoxWin::~FrameBoxWin((FrameBoxWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A3854: using guessed type void (__thiscall *SoulStoneInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A3874: using guessed type int (__thiscall *SoulStoneInfoWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00599900) --------------------------------------------------------
void __thiscall SoulStoneWin::SoulStoneWin(SoulStoneWin *this)
{
  SoulStoneWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_fLastHPUsedTime = -1.0;
  v1->vfptr = (NiRefObjectVtbl *)&SoulStoneWin::`vftable'{for `NiNode'};
  v1->m_fLastSPUsedTime = -1.0;
  v1->vfptr = (IDirectMessengerVtbl *)&SoulStoneWin::`vftable'{for `IDirectMessenger'};
}
// 9A3B44: using guessed type void (__thiscall *SoulStoneWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A3B64: using guessed type int (__thiscall *SoulStoneWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00599930) --------------------------------------------------------
void __thiscall SoulStoneWin::~SoulStoneWin(SoulStoneWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&SoulStoneWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SoulStoneWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9A3B44: using guessed type void (__thiscall *SoulStoneWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A3B64: using guessed type int (__thiscall *SoulStoneWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00599970) --------------------------------------------------------
void __thiscall SoulStoneWin::UpdateMeWin(SoulStoneWin *this, float fCurTime)
{
  SoulStoneWin *v2; // esi@1
  int v3; // eax@1
  int v4; // eax@1
  char acStr[256]; // [sp+4h] [bp-104h]@1

  v2 = this;
  v3 = User::HPStone(&g_kUser);
  sprintf(acStr, "%d", v3);
  ((void (__stdcall *)(_DWORD))v2->m_pkHPDarkText->vfptr[118].__vecDelDtor)(acStr);
  ((void (__stdcall *)(_DWORD))v2->m_pkHPText->vfptr[118].__vecDelDtor)(acStr);
  v4 = User::SPStone(&g_kUser);
  sprintf(acStr, "%d", v4);
  ((void (__stdcall *)(_DWORD))v2->m_pkSPDarkText->vfptr[118].__vecDelDtor)(acStr);
  ((void (__stdcall *)(_DWORD))v2->m_pkSPText->vfptr[118].__vecDelDtor)(acStr);
}

//----- (00599A40) --------------------------------------------------------
void __thiscall SoulStoneWin::UseHPSoulStone(SoulStoneWin *this)
{
  SoulStoneWin *v1; // esi@1
  GameFrameWork *v2; // ecx@1

  v1 = this;
  v2 = (GameFrameWork *)this->m_pkFrameWork;
  v1->m_fLastHPUsedTime = Timer::ms_fCurTime;
  GameFrameWork::NcSoulStoneHPUseReq(v2);
  ClockShadowWin::Start(v1->m_apkClockShadowWin[0], Timer::ms_fCurTime, 1.0, 0.0);
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00599A80) --------------------------------------------------------
void __thiscall SoulStoneWin::UseSPSoulStone(SoulStoneWin *this)
{
  SoulStoneWin *v1; // esi@1
  GameFrameWork *v2; // ecx@1

  v1 = this;
  v2 = (GameFrameWork *)this->m_pkFrameWork;
  v1->m_fLastSPUsedTime = Timer::ms_fCurTime;
  GameFrameWork::NcSoulStoneSPUseReq(v2);
  ClockShadowWin::Start(v1->m_apkClockShadowWin[1], Timer::ms_fCurTime, 1.0, 0.0);
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00599AC0) --------------------------------------------------------
char __thiscall SoulStoneWin::Create(SoulStoneWin *this, PgFrameWork *pkFrameWork)
{
  SoulStoneWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // ebx@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  PgSprData *v10; // eax@15
  PgSprData *v11; // eax@15
  PgSprData *v12; // eax@15
  PgSprData *v13; // eax@15
  PgSprData *v14; // eax@15
  char *v15; // eax@15
  ClockShadowWin *v16; // eax@15
  NiNode *v17; // ecx@15
  PgSprData *v18; // eax@15
  char *v19; // eax@15
  PgSprData *v20; // eax@15
  char *v21; // eax@15
  PgSprData *v22; // eax@15
  char *v23; // eax@15
  PgFont *v24; // eax@17
  PgWinText *v25; // eax@17
  PgFont *v26; // eax@17
  PgWinText *v27; // eax@17
  PgFont *v28; // eax@18
  PgWinText *v29; // eax@18
  PgFont *v30; // eax@18
  PgWinText *v31; // eax@18
  unsigned int uiWidth; // [sp+50h] [bp-20h]@15
  unsigned int uiHeight; // [sp+54h] [bp-1Ch]@15
  NiPointer<NiNode> spNode; // [sp+58h] [bp-18h]@1
  int uiLeft; // [sp+5Ch] [bp-14h]@11
  int uiTop; // [sp+60h] [bp-10h]@11
  int v37; // [sp+6Ch] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v37 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v37 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
    goto LABEL_5;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "Game\\SoulPanel.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "SoulStoneWin", 0) )
  {
    v4 = spNode.m_pObject;
    v37 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft, uiTop, v10, (PgWin *)&v2->vfptr, 0, 0);
  v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Object01", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft, uiTop, v11, (PgWin *)&v2->vfptr, 0, 0);
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PreSoul", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft, uiTop, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NextSoul", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft, uiTop, v13, (PgWin *)&v2->vfptr, 0, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HPSoul", &uiLeft, &uiTop, v3);
  v2->m_pkHPButWin = PgWinBut::CreateWin(uiLeft, uiTop, v14, (PgWin *)&v2->vfptr, 0, 0, 0);
  v15 = (char *)TextData::Get(0xE5FE4B2C);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkHPButWin->vfptr, v15);
  v2->m_pkHPButWin->m_pkToolTipWin = g_pkToolTipWin;
  v16 = ClockShadowWin::CreateWin(uiLeft, uiTop, (PgWin *)&v2->vfptr);
  v17 = spNode.m_pObject;
  v2->m_apkClockShadowWin[0] = v16;
  v18 = PgSprData::Create((NiAVObject *)&v17->vfptr, "SPSoul", &uiLeft, &uiTop, v3);
  v2->m_pkSPButWin = PgWinBut::CreateWin(uiLeft, uiTop, v18, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v19 = (char *)TextData::Get(0xE5094B2C);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkSPButWin->vfptr, v19);
  v2->m_pkSPButWin->m_pkToolTipWin = g_pkToolTipWin;
  v2->m_apkClockShadowWin[1] = ClockShadowWin::CreateWin(uiLeft, uiTop, (PgWin *)&v2->vfptr);
  v20 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PwrSoul", &uiLeft, &uiTop, v3);
  v2->m_pkPWButWin = PgWinBut::CreateWin(uiLeft, uiTop, v20, (PgWin *)&v2->vfptr, 2u, 0, 0);
  v21 = (char *)TextData::Get(0xE3F7FF40);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkPWButWin->vfptr, v21);
  v2->m_pkPWButWin->m_pkToolTipWin = g_pkToolTipWin;
  v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GrdSoul", &uiLeft, &uiTop, v3);
  v2->m_pkGRButWin = PgWinBut::CreateWin(uiLeft, uiTop, v22, (PgWin *)&v2->vfptr, 3u, 0, 0);
  v23 = (char *)TextData::Get(0xE9E00C2A);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkGRButWin->vfptr, v23);
  v2->m_pkGRButWin->m_pkToolTipWin = g_pkToolTipWin;
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "SoulLot01",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight)
    || (v24 = Font::Get(MENU),
        v25 = PgWinText::CreateWin(uiLeft - 1, uiTop - 4, uiWidth, uiHeight + 4, v24, (PgWin *)&v2->vfptr, 0, 0),
        v2->m_pkHPDarkText = v25,
        v25->vfptr[118].__vecDelDtor((NiRefObject *)v25, (unsigned int)"0"),
        ((void (__stdcall *)(signed int))v2->m_pkHPDarkText->vfptr[122].__vecDelDtor)(2),
        ((void (__stdcall *)(D3DXCOLOR *))v2->m_pkHPDarkText->vfptr[117].__vecDelDtor)(&Color::m_kDxBlackColor),
        ((void (__stdcall *)(_DWORD))v2->m_pkHPDarkText->vfptr[60].__vecDelDtor)(0),
        v26 = Font::Get(MENU),
        v27 = PgWinText::CreateWin(uiLeft, uiTop - 3, uiWidth, uiHeight + 4, v26, (PgWin *)&v2->vfptr, 0, 0),
        v2->m_pkHPText = v27,
        v27->vfptr[118].__vecDelDtor((NiRefObject *)v27, (unsigned int)"0"),
        ((void (__stdcall *)(signed int))v2->m_pkHPText->vfptr[122].__vecDelDtor)(2),
        ((void (__stdcall *)(_DWORD))v2->m_pkHPText->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "SoulLot02",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight)) )
  {
    v37 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  v28 = Font::Get(MENU);
  v29 = PgWinText::CreateWin(uiLeft - 1, uiTop - 4, uiWidth, uiHeight + 4, v28, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkSPDarkText = v29;
  ((void (__thiscall *)(PgWinText *))v29->vfptr[118].__vecDelDtor)(v29);
  ((void (__cdecl *)(signed int, const char *))v2->m_pkSPDarkText->vfptr[122].__vecDelDtor)(2, "0");
  ((void (__cdecl *)(D3DXCOLOR *))v2->m_pkSPDarkText->vfptr[117].__vecDelDtor)(&Color::m_kDxBlackColor);
  ((void (__cdecl *)(_DWORD))v2->m_pkSPDarkText->vfptr[60].__vecDelDtor)(0);
  v30 = Font::Get(MENU);
  v31 = PgWinText::CreateWin(uiLeft, uiTop - 3, uiWidth, uiHeight + 4, v30, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkSPText = v31;
  v31->vfptr[118].__vecDelDtor((NiRefObject *)v31, (unsigned int)"0");
  ((void (__stdcall *)(signed int))v2->m_pkSPText->vfptr[122].__vecDelDtor)(2);
  ((void (__stdcall *)(_DWORD))v2->m_pkSPText->vfptr[60].__vecDelDtor)(0);
  ((void (__thiscall *)(SoulStoneWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.32600001,
    0.0);
  v37 = -1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0059A0B0) --------------------------------------------------------
char __thiscall SoulStoneWin::TryHPSoulStoneUse(SoulStoneWin *this)
{
  SoulStoneWin *v1; // esi@1
  NiUnsharedGeometryGroup *v2; // eax@2
  char result; // al@2
  NiUnsharedGeometryGroup *v4; // eax@4

  v1 = this;
  if ( this->m_fLastHPUsedTime + 1.0 <= Timer::ms_fCurTime )
  {
    if ( User::HPStone(&g_kUser) )
    {
      result = 1;
    }
    else
    {
      v4 = TextData::Get(0x3A4B3F5Cu);
      GameFrameWork::AddSysMsg((GameFrameWork *)v1->m_pkFrameWork, (const char *)v4);
      result = 0;
    }
  }
  else
  {
    v2 = TextData::Get(0xD9132D2D);
    GameFrameWork::AddSysMsg((GameFrameWork *)v1->m_pkFrameWork, (const char *)v2);
    result = 0;
  }
  return result;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0059A120) --------------------------------------------------------
char __thiscall SoulStoneWin::TrySPSoulStoneUse(SoulStoneWin *this)
{
  SoulStoneWin *v1; // esi@1
  NiUnsharedGeometryGroup *v2; // eax@2
  char result; // al@2
  NiUnsharedGeometryGroup *v4; // eax@4

  v1 = this;
  if ( this->m_fLastSPUsedTime + 1.0 <= Timer::ms_fCurTime )
  {
    if ( User::SPStone(&g_kUser) )
    {
      result = 1;
    }
    else
    {
      v4 = TextData::Get(0x3A4B4A5Cu);
      GameFrameWork::AddSysMsg((GameFrameWork *)v1->m_pkFrameWork, (const char *)v4);
      result = 0;
    }
  }
  else
  {
    v2 = TextData::Get(0xE4132D2D);
    GameFrameWork::AddSysMsg((GameFrameWork *)v1->m_pkFrameWork, (const char *)v2);
    result = 0;
  }
  return result;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0059A190) --------------------------------------------------------
void __thiscall SoulStoneWin::OnCmdHPSoul(SoulStoneWin *this)
{
  SoulStoneWin *v1; // esi@1
  GameFrameWork *v2; // ecx@2

  v1 = this;
  if ( SoulStoneWin::TryHPSoulStoneUse(this) )
  {
    v2 = (GameFrameWork *)v1->m_pkFrameWork;
    v1->m_fLastHPUsedTime = Timer::ms_fCurTime;
    GameFrameWork::NcSoulStoneHPUseReq(v2);
    ClockShadowWin::Start(v1->m_apkClockShadowWin[0], Timer::ms_fCurTime, 1.0, 0.0);
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0059A1E0) --------------------------------------------------------
void __thiscall SoulStoneWin::OnCmdSPSoul(SoulStoneWin *this)
{
  SoulStoneWin *v1; // esi@1
  GameFrameWork *v2; // ecx@2

  v1 = this;
  if ( SoulStoneWin::TrySPSoulStoneUse(this) )
  {
    v2 = (GameFrameWork *)v1->m_pkFrameWork;
    v1->m_fLastSPUsedTime = Timer::ms_fCurTime;
    GameFrameWork::NcSoulStoneSPUseReq(v2);
    ClockShadowWin::Start(v1->m_apkClockShadowWin[1], Timer::ms_fCurTime, 1.0, 0.0);
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0059A230) --------------------------------------------------------
void __thiscall SoulStoneWin::OnCommand(SoulStoneWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0u:
      SoulStoneWin::OnCmdHPSoul(this);
      break;
    case 1u:
      SoulStoneWin::OnCmdSPSoul(this);
      break;
    default:
      return;
  }
}

//----- (0059A270) --------------------------------------------------------
SoulStoneWin *__cdecl SoulStoneWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  SoulStoneWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x190u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2[1].m_kLocal.m_Translate.z = -1.0;
    v2->vfptr = (NiRefObjectVtbl *)&SoulStoneWin::`vftable'{for `NiNode'};
    v2[1].m_kLocal.m_fScale = -1.0;
    v2->vfptr = (IDirectMessengerVtbl *)&SoulStoneWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (SoulStoneWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9A3B44: using guessed type void (__thiscall *SoulStoneWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A3B64: using guessed type int (__thiscall *SoulStoneWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0059A3C0) --------------------------------------------------------
SoulStoneWin *__thiscall SoulStoneWin::`vector deleting destructor'(SoulStoneWin *this, unsigned int a2)
{
  SoulStoneWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&SoulStoneWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SoulStoneWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A3B44: using guessed type void (__thiscall *SoulStoneWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A3B64: using guessed type int (__thiscall *SoulStoneWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0059A400) --------------------------------------------------------
void __thiscall StatTitleListItemWin::StatTitleListItemWin(StatTitleListItemWin *this)
{
  StatTitleListItemWin *v1; // esi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&StatTitleListItemWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&StatTitleListItemWin::`vftable'{for `IDirectMessenger'};
}
// 9A3FC8: using guessed type void (__thiscall *StatTitleListItemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A3FE4: using guessed type int (__thiscall *StatTitleListItemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0059A420) --------------------------------------------------------
void __thiscall StatTitleListItemWin::~StatTitleListItemWin(StatTitleListItemWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&StatTitleListItemWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&StatTitleListItemWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
}
// 9A3FC8: using guessed type void (__thiscall *StatTitleListItemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A3FE4: using guessed type int (__thiscall *StatTitleListItemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0059A460) --------------------------------------------------------
void __thiscall StatTitleWin::StatTitleWin(StatTitleWin *this)
{
  StatTitleWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_iListCount = 0;
  v1->vfptr = (NiRefObjectVtbl *)&StatTitleWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&StatTitleWin::`vftable'{for `IDirectMessenger'};
  v1->m_apkListItemWin[0] = 0;
  v1->m_apkListItemWin[1] = 0;
  v1->m_apkListItemWin[2] = 0;
  v1->m_apkListItemWin[3] = 0;
  v1->m_pkStatTitleIconWin = 0;
}
// 9A41B0: using guessed type void (__thiscall *StatTitleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A41CC: using guessed type int (__thiscall *StatTitleWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0059A4B0) --------------------------------------------------------
void __thiscall StatTitleWin::~StatTitleWin(StatTitleWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&StatTitleWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&StatTitleWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9A41B0: using guessed type void (__thiscall *StatTitleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A41CC: using guessed type int (__thiscall *StatTitleWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0059A4D0) --------------------------------------------------------
void __thiscall StatTitleWin::OnOk(StatTitleWin *this)
{
  PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
}

//----- (0059A4E0) --------------------------------------------------------
void __thiscall StatTitleWin::OnCancel(StatTitleWin *this)
{
  PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
}

//----- (0059A500) --------------------------------------------------------
void __thiscall StatTitleWin::AddStatTitle(StatTitleWin *this)
{
  ++this->m_iListCount;
}

//----- (0059A510) --------------------------------------------------------
void __thiscall StatTitleWin::ClearStatTitle(StatTitleWin *this)
{
  this->m_iListCount = 0;
}

//----- (0059A530) --------------------------------------------------------
char __thiscall StatTitleListItemWin::Create(StatTitleListItemWin *this, NiAVObject *pkGeom, int iXPos, int iYPos, unsigned int uiListIndex, StatTitleListItemWin::CreateSpec *rkSpec, PgWin *pkParent)
{
  StatTitleListItemWin *v7; // esi@1
  char result; // al@1
  D3DXCOLOR v9; // ST08_16@2
  D3DXCOLOR v10; // ST08_16@2
  D3DXCOLOR v11; // ST08_16@2
  D3DXCOLOR v12; // ST08_16@2
  D3DXCOLOR v13; // ST08_16@2
  PgWinSpr *v14; // eax@2
  UIUtil ui; // [sp+10h] [bp-20h]@2
  int v16; // [sp+2Ch] [bp-4h]@2

  v7 = this;
  result = PgWin::Create((PgWin *)&this->vfptr, iXPos, iYPos, 0x20u, 0x20u, pkParent, 0, 0);
  if ( result )
  {
    UIUtil::UIUtil(&ui);
    v16 = 0;
    UIUtil::SetParent(&ui, (PgWin *)&v7->vfptr);
    UIUtil::SetOffset(&ui, iXPos, iYPos);
    UIUtil::SetUIGeom(&ui, pkGeom);
    *(_QWORD *)&v9.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v9.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    UIUtil::CreateTextNoSpr(&ui, rkSpec->kInterface.pcName, &byte_9A3D88, v9, 4u);
    *(_QWORD *)&v10.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v10.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    UIUtil::CreateTextNoSpr(&ui, rkSpec->kInterface.pcRank, &byte_9A3D89, v10, 4u);
    *(_QWORD *)&v11.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v11.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    UIUtil::CreateTextNoSpr(&ui, rkSpec->kInterface.pcDesc, &byte_9A3D8A, v11, 4u);
    *(_QWORD *)&v12.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v12.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    UIUtil::CreateTextNoSpr(&ui, rkSpec->kInterface.pcNextTxt, &byte_9A3D8B, v12, 4u);
    *(_QWORD *)&v13.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v13.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    UIUtil::CreateTextNoSpr(&ui, rkSpec->kInterface.pcNextDesc, &byte_9A3D8C, v13, 4u);
    v14 = UIUtil::CreateSpr(&ui, rkSpec->kInterface.pcIcon, 0);
    IconWin::CreateWin(3, 3, 32, 32, (PgWin *)&v14->vfptr);
    v16 = -1;
    UIUtil::~UIUtil(&ui);
    result = 1;
  }
  return result;
}

//----- (0059A730) --------------------------------------------------------
void __thiscall StatTitleWin::OnCommand(StatTitleWin *this, unsigned int wParam, int lParam)
{
  if ( wParam == 9 || wParam == 10 )
    PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
}

//----- (0059A760) --------------------------------------------------------
StatTitleListItemWin *__cdecl StatTitleListItemWin::CreateWin(NiAVObject *pkGeom, int iXPos, int iYPos, unsigned int uiListIndex, StatTitleListItemWin::CreateSpec *rkSpec, PgWin *pkParent)
{
  PgWin *v6; // eax@1
  PgWin *v7; // esi@1
  PgWin *v8; // edi@8
  StatTitleListItemWin *v9; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v11; // [sp+20h] [bp-4h]@1

  v6 = (PgWin *)operator new(0x120u);
  v7 = v6;
  result.m_pObject = v6;
  v11 = 0;
  if ( v6 )
  {
    PgWin::PgWin(v6);
    v7->vfptr = (NiRefObjectVtbl *)&StatTitleListItemWin::`vftable'{for `NiNode'};
    v7->vfptr = (IDirectMessengerVtbl *)&StatTitleListItemWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v7 = 0;
  }
  if ( v7 )
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  v11 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v7);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, NiAVObject *, int, int, unsigned int, StatTitleListItemWin::CreateSpec *, PgWin *))v7->vfptr[113].__vecDelDtor)(
                          v7,
                          pkGeom,
                          iXPos,
                          iYPos,
                          uiListIndex,
                          rkSpec,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v7->vfptr[89].__vecDelDtor)(v7);
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = (StatTitleListItemWin *)v7;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v7);
    if ( result.m_pObject )
    {
      v8 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v8 )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      }
    }
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = 0;
  }
  return v9;
}
// 9A3FC8: using guessed type void (__thiscall *StatTitleListItemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A3FE4: using guessed type int (__thiscall *StatTitleListItemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0059A8B0) --------------------------------------------------------
StatTitleWin *__cdecl StatTitleWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  StatTitleWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x174u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&StatTitleWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&StatTitleWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[2][0]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (StatTitleWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9A41B0: using guessed type void (__thiscall *StatTitleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A41CC: using guessed type int (__thiscall *StatTitleWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0059AA10) --------------------------------------------------------
char __thiscall StatTitleWin::Create(StatTitleWin *this, PgFrameWork *pkFrameWork)
{
  StatTitleWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  D3DXCOLOR v8; // ST2C_16@10
  PgWinBut *v9; // edi@10
  D3DXCOLOR v10; // ST34_16@10
  char *v11; // eax@10
  PgWinBut *v12; // edi@10
  D3DXCOLOR v13; // ST34_16@10
  char *v14; // eax@10
  D3DXCOLOR v15; // ST34_16@10
  char *v16; // eax@10
  PgSprData *v17; // eax@10
  StatTitleListItemWin *v18; // eax@10
  int v19; // ecx@10
  NiNode *v20; // edx@10
  StatTitleListItemWin *v21; // eax@10
  int v22; // ecx@10
  int v23; // edx@10
  StatTitleListItemWin *v24; // eax@10
  int v25; // edx@10
  NiNode *v26; // ecx@10
  StatTitleListItemWin *v27; // eax@10
  void *(__thiscall *v28)(NiRefObject *, unsigned int); // edx@10
  NiNode *v29; // esi@11
  StatTitleListItemWin::CreateSpec kSpec; // [sp+14h] [bp-4Ch]@10
  UIUtil ui; // [sp+2Ch] [bp-34h]@10
  int uiLeft; // [sp+40h] [bp-20h]@10
  int uiTop; // [sp+44h] [bp-1Ch]@10
  int uiXOff; // [sp+48h] [bp-18h]@4
  int uiYOff; // [sp+4Ch] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+50h] [bp-10h]@1
  int v37; // [sp+5Ch] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v37 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\StatTitle.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane01", &uiXOff, &uiYOff, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "StatTitleWin", 0) )
  {
    v6 = spNode.m_pObject;
    v37 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v37) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, uiXOff, uiYOff);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  UIUtil::CreateSpr(&ui, "Plane02", 0);
  UIUtil::CreateBtnNoSpr(&ui, 0xBu, "SelectionName");
  *(_QWORD *)&v8.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v8.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v2->m_pkSelectedStatTitle = (PgWinText *)UIUtil::CreateText(&ui, "SelectionName", byte_9A3D8D, 0, v8, 5u, 0, 0);
  v9 = UIUtil::CreateBtn(&ui, 9u, "OkNor", "OkOver", "OkClick", 0, 0);
  *(_QWORD *)&v10.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v10.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v11 = (char *)TextData::Get(0xA6B4A8DA);
  UIUtil::CreateAttachedText((PgWin *)&v9->vfptr, v11, v10, 5u);
  v12 = UIUtil::CreateBtn(&ui, 0xAu, "CancelNor", "CancelOver", "CancelClick", 0, 0);
  *(_QWORD *)&v13.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v13.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v14 = (char *)TextData::Get(0xE0E7EBE3);
  UIUtil::CreateAttachedText((PgWin *)&v12->vfptr, v14, v13, 5u);
  UIUtil::CreateBtn(&ui, 0xAu, "ClsNor", "ClsOver", "ClsClick", 0, 0);
  *(_QWORD *)&v15.r = *(_QWORD *)&Color::m_kDxWinTitleColor.r;
  *(_QWORD *)&v15.b = *(_QWORD *)&Color::m_kDxWinTitleColor.b;
  v16 = (char *)TextData::Get(0x31554C23u);
  UIUtil::CreateTextNoSpr(&ui, "WinTitle", v16, v15, 5u);
  v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SelectIcon", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft, uiTop, v17, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkStatTitleIconWin = IconWin::CreateWin(uiLeft + 3, uiTop + 3, 32, 32, (PgWin *)&v2->vfptr);
  kSpec.kInterface.pcIcon = "Title1Icon";
  kSpec.kInterface.pcName = "Title1Name";
  kSpec.kInterface.pcRank = "Title1Rank";
  kSpec.kInterface.pcDesc = "Title1Desc";
  kSpec.kInterface.pcNextTxt = "Title1NextTxt";
  kSpec.kInterface.pcNextDesc = "Title1NextDesc";
  v18 = StatTitleListItemWin::CreateWin(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          uiXOff,
          uiYOff,
          0,
          &kSpec,
          (PgWin *)&v2->vfptr);
  v19 = uiXOff;
  v20 = spNode.m_pObject;
  v2->m_apkListItemWin[0] = v18;
  kSpec.kInterface.pcIcon = "Title2Icon";
  kSpec.kInterface.pcName = "Title2Name01";
  kSpec.kInterface.pcRank = "Title2Rank01";
  kSpec.kInterface.pcDesc = "Title2Desc01";
  kSpec.kInterface.pcNextTxt = "Title2NextTxt01";
  kSpec.kInterface.pcNextDesc = "Title2NextDesc01";
  v21 = StatTitleListItemWin::CreateWin((NiAVObject *)&v20->vfptr, v19, uiYOff, 1u, &kSpec, (PgWin *)&v2->vfptr);
  v22 = uiYOff;
  v23 = uiXOff;
  v2->m_apkListItemWin[1] = v21;
  kSpec.kInterface.pcIcon = "Title3Icon";
  kSpec.kInterface.pcName = "Title3Name02";
  kSpec.kInterface.pcRank = "Title3Rank02";
  kSpec.kInterface.pcDesc = "Title3Desc02";
  kSpec.kInterface.pcNextTxt = "Title3NextTxt02";
  kSpec.kInterface.pcNextDesc = "Title3NextDesc02";
  v24 = StatTitleListItemWin::CreateWin(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          v23,
          v22,
          2u,
          &kSpec,
          (PgWin *)&v2->vfptr);
  v25 = uiYOff;
  v26 = spNode.m_pObject;
  v2->m_apkListItemWin[2] = v24;
  kSpec.kInterface.pcIcon = "Title4Icon";
  kSpec.kInterface.pcName = "Title4Name03";
  kSpec.kInterface.pcRank = "Title4Rank03";
  kSpec.kInterface.pcDesc = "Title4Desc03";
  kSpec.kInterface.pcNextTxt = "Title4NextTxt03";
  kSpec.kInterface.pcNextDesc = "Title4NextDesc03";
  v27 = StatTitleListItemWin::CreateWin((NiAVObject *)&v26->vfptr, uiXOff, v25, 3u, &kSpec, (PgWin *)&v2->vfptr);
  v28 = v2->vfptr[59].__vecDelDtor;
  v2->m_apkListItemWin[3] = v27;
  ((void (__thiscall *)(StatTitleWin *, unsigned int, unsigned int, _DWORD, _DWORD))v28)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.79000002,
    0.5);
  LOBYTE(v37) = 0;
  UIUtil::~UIUtil(&ui);
  v37 = -1;
  if ( spNode.m_pObject )
  {
    v29 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v29 )
        v29->vfptr->__vecDelDtor((NiRefObject *)v29, 1u);
    }
  }
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0059AEA0) --------------------------------------------------------
StatTitleListItemWin *__thiscall StatTitleListItemWin::`vector deleting destructor'(StatTitleListItemWin *this, unsigned int a2)
{
  StatTitleListItemWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&StatTitleListItemWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&StatTitleListItemWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A3FC8: using guessed type void (__thiscall *StatTitleListItemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A3FE4: using guessed type int (__thiscall *StatTitleListItemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0059AEE0) --------------------------------------------------------
StatTitleWin *__thiscall StatTitleWin::`vector deleting destructor'(StatTitleWin *this, unsigned int a2)
{
  StatTitleWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&StatTitleWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&StatTitleWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A41B0: using guessed type void (__thiscall *StatTitleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A41CC: using guessed type int (__thiscall *StatTitleWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0059AF20) --------------------------------------------------------
void __thiscall StatusWin::StatusWin(StatusWin *this)
{
  StatusWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&StatusWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&StatusWin::`vftable'{for `IDirectMessenger'};
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kHpTimer);
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kSpTimer);
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kHPStoneAlarmTimer);
  v1->m_fStoneAlarmRate = 0.30000001;
  *(_WORD *)&v1->m_bHPStoneAlarmTimer = 256;
  v1->m_uiStoneAlarmLevel = 5;
  v1->m_fLastHPUsedTime = -1.0;
  v1->m_pkNameText = 0;
  v1->m_fLastSPUsedTime = -1.0;
  *(_DWORD *)&v1->m_bHpTimer = 0;
  v1->m_pkPortrait = 0;
  v1->m_pkHPGauge_kr = 0;
  v1->m_pkSPGauge_kr = 0;
  v1->m_pkEXPGauge_kr = 0;
  v1->m_pkHPCoolTimeGauge_kr = 0;
  v1->m_pkSPCoolTimeGauge_kr = 0;
  v1->m_pkHPBarStart = 0;
  v1->m_pkHPBarEnd = 0;
  v1->m_pkSPBarStart = 0;
  v1->m_pkSPBarEnd = 0;
  v1->m_pkLPBarStart = 0;
  v1->m_pkLPBarEnd = 0;
  v1->m_pkLPGauge = 0;
  v1->m_pkLPGauge_kr = 0;
  v1->m_pkLPText = 0;
  v1->m_bUseLP = 0;
}
// 9A4620: using guessed type void (__thiscall *StatusWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A463C: using guessed type int (__thiscall *StatusWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0059B040) --------------------------------------------------------
void __thiscall StatusWin::~StatusWin(StatusWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&StatusWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&StatusWin::`vftable'{for `IDirectMessenger'};
  this->m_pkPortrait = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9A4620: using guessed type void (__thiscall *StatusWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A463C: using guessed type int (__thiscall *StatusWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0059B060) --------------------------------------------------------
void __thiscall StatusWin::OnMouseEvent(StatusWin *this, PgWin::PG_MOUSE_EVENT eMouseEvent, PgWin *pkWin)
{
  StatusWin *v3; // esi@1
  unsigned int v4; // eax@3

  v3 = this;
  if ( eMouseEvent == 4 )
  {
    if ( g_pkMainChar )
    {
      v4 = ((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)();
      PgFrameWork::AddMsg(v3->m_pkFrameWork, 0x80u, v4, 0);
    }
  }
  else if ( eMouseEvent == 2
         && g_pkMainChar
         && (unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD))this->m_pkPortrait->vfptr[83].__vecDelDtor)(
                               PgWin::ms_iMsX,
                               PgWin::ms_iMsY) )
  {
    GameFrameWork::TargetCharReq((GameFrameWork *)v3->m_pkFrameWork, g_pkMainChar);
  }
}

//----- (0059B0E0) --------------------------------------------------------
void __thiscall StatusWin::UseHPSoulStone(StatusWin *this)
{
  GameFrameWork::NcSoulStoneHPUseReq((GameFrameWork *)this->m_pkFrameWork);
}

//----- (0059B0F0) --------------------------------------------------------
void __thiscall StatusWin::UseSPSoulStone(StatusWin *this)
{
  GameFrameWork::NcSoulStoneSPUseReq((GameFrameWork *)this->m_pkFrameWork);
}

//----- (0059B100) --------------------------------------------------------
void __thiscall StatusWin::SetStoneAlarmEnable(StatusWin *this, const bool bEnable)
{
  this->m_bStoneAlarmEnable = bEnable;
}

//----- (0059B110) --------------------------------------------------------
void __thiscall StatusWin::ApplyCharInfo(StatusWin *this)
{
  StatusWin *v1; // esi@1
  NiSourceTexture *v2; // eax@1
  Name5 *v3; // eax@1
  PgWinText *v4; // ecx@1
  char acName[21]; // [sp+4h] [bp-1Ch]@1

  v1 = this;
  v2 = PortraitTextureBuffer::GetMainCharPortrait(g_pkMainChar);
  MaskedWin::SetBaseTexture(v1->m_pkPortrait, (NiTexture *)&v2->vfptr);
  v3 = User::GetMainCharID(&g_kUser);
  *(_DWORD *)acName = v3->n5_code[0];
  *(_DWORD *)&acName[4] = v3->n5_code[1];
  *(_DWORD *)&acName[8] = v3->n5_code[2];
  v4 = v1->m_pkNameText;
  *(_DWORD *)&acName[12] = v3->n5_code[3];
  *(_DWORD *)&acName[16] = v3->n5_code[4];
  acName[20] = 0;
  ((void (__stdcall *)(_DWORD))v4->vfptr[118].__vecDelDtor)(acName);
}

//----- (0059B190) --------------------------------------------------------
void __thiscall StatusWin::HPSoulStoneCoolTimeStart(StatusWin *this)
{
  StatusWin *v1; // esi@1
  PgWinCircleGauge *v2; // ecx@1

  v1 = this;
  v2 = this->m_pkHPCoolTimeGauge_kr;
  v1->m_fLastHPUsedTime = Timer::ms_fCurTime;
  ((void (__stdcall *)(_DWORD))v2->vfptr[64].__vecDelDtor)(1);
  PgWinCircleGauge::SetValue(v1->m_pkHPCoolTimeGauge_kr, 1.0, 0.0);
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0059B1D0) --------------------------------------------------------
void __thiscall StatusWin::SPSoulStoneCoolTimeStart(StatusWin *this)
{
  StatusWin *v1; // esi@1
  bool v2; // zf@1

  v1 = this;
  v2 = this->m_bUseLP == 0;
  this->m_fLastSPUsedTime = Timer::ms_fCurTime;
  if ( v2 )
  {
    ((void (__stdcall *)(_DWORD))this->m_pkSPCoolTimeGauge_kr->vfptr[64].__vecDelDtor)(1);
    PgWinCircleGauge::SetValue(v1->m_pkSPCoolTimeGauge_kr, 1.0, 0.0);
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0059B220) --------------------------------------------------------
void __thiscall StatusWin::UpdateStoneAlarm(StatusWin *this, float fCurTime)
{
  StatusWin *v2; // ebx@1
  double v3; // ST10_8@2
  int v4; // esi@4
  signed int v5; // edi@4
  PgWinText **v6; // esi@10
  NiRefObjectVtbl *v7; // edi@11
  char v8; // al@11
  float fCurTimea; // [sp+24h] [bp+8h]@10

  v2 = this;
  if ( User::Lv(&g_kUser) <= this->m_uiStoneAlarmLevel )
  {
    v3 = (double)(signed int)User::HP(&g_kUser);
    if ( v2->m_fStoneAlarmRate > v3 / (double)(signed int)User::MaxHP(&g_kUser) )
    {
      if ( !v2->m_bHPStoneAlarmTimer )
      {
        CNSTimer_Interval::ReSet(&v2->m_kHPStoneAlarmTimer, fCurTime);
        v2->m_kHPStoneAlarmTimer.m_fCheckTime = 1.0;
        v2->m_bHPStoneAlarmTimer = 1;
      }
      if ( CNSTimer_Interval::IsRun_GetCount(&v2->m_kHPStoneAlarmTimer, fCurTime) )
      {
        v6 = v2->m_pkHPStoneAlarmText;
        LODWORD(fCurTimea) = 2;
        do
        {
          v7 = (*v6)->vfptr;
          v8 = ((int (*)(void))(*v6)->vfptr[65].__vecDelDtor)();
          v7[64].__vecDelDtor((NiRefObject *)*v6, v8 == 0);
          if ( v2->m_bStoneAlarmEnable )
            ((void (*)(void))(*v6)->vfptr[67].__vecDelDtor)();
          ++v6;
          --LODWORD(fCurTimea);
        }
        while ( fCurTimea != 0.0 );
      }
    }
    else if ( v2->m_bHPStoneAlarmTimer == 1 )
    {
      v2->m_bHPStoneAlarmTimer = 0;
      v4 = (int)v2->m_pkHPStoneAlarmText;
      v5 = 2;
      do
      {
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 256))(0);
        v4 += 4;
        --v5;
      }
      while ( v5 );
    }
  }
}

//----- (0059B350) --------------------------------------------------------
char __thiscall StatusWin::CreateKoreaMainGauge(StatusWin *this, PgFrameWork *pkFrameWork)
{
  StatusWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  const char *v5; // eax@9
  PgSprData *v6; // eax@10
  NiNode *v7; // esi@11
  NiRefObjectVtbl *v8; // edx@16
  int v9; // ebx@16
  NiAVObject *v10; // eax@16
  NiTexturingProperty *v11; // eax@16
  NiTexturingProperty::Map *v12; // eax@18
  NiSourceTexture *v13; // eax@19
  PgSprData *v14; // eax@20
  PgWinSpr *v15; // eax@20
  PgSprData *v16; // eax@20
  NiShader *v17; // eax@20
  NiTriShape *v18; // eax@20
  MaskedWin *v19; // eax@20
  NiNode *v20; // ecx@20
  PgSprData *v21; // eax@20
  PgWinSpr *v22; // eax@20
  char v23; // al@20
  PgSprData *v24; // eax@22
  PgWinSpr *v25; // eax@22
  PgFont *v26; // eax@25
  PgWinText *v27; // eax@25
  PgFont *v28; // eax@26
  PgWinText *v29; // eax@26
  int v30; // eax@26
  const char *v31; // eax@27
  PgSprData *v32; // eax@27
  NiRefObjectVtbl *v33; // eax@27
  PgSprData *v34; // ecx@27
  NiShader *v35; // eax@28
  NiTriShape *v36; // eax@28
  PgWinCircleGauge *v37; // eax@28
  NiNode *v38; // ecx@28
  PgSprData *v39; // eax@28
  PgSprData *v40; // eax@28
  PgSprData *v41; // eax@31
  char *v42; // eax@31
  PgWinSpr *v43; // eax@33
  NiNode *v44; // ecx@33
  NiShader *v45; // eax@33
  NiTriShape *v46; // eax@33
  PgWinCircleGauge *v47; // eax@33
  PgWin *fOrgAngle; // ST50_4@33
  PgFont *v49; // ST4C_4@33
  unsigned int v50; // ST48_4@33
  unsigned int v51; // eax@33
  PgWinText *v52; // eax@33
  PgSprData *v53; // eax@34
  PgSprData *v54; // eax@34
  char *v55; // eax@34
  PgSprData *v56; // eax@34
  PgWinSpr *v57; // eax@34
  NiShader *v58; // eax@34
  NiTriShape *v59; // eax@34
  PgWinCircleGauge *v60; // eax@34
  PgWin *v61; // ST50_4@34
  PgFont *v62; // ST4C_4@34
  unsigned int v63; // ST48_4@34
  unsigned int v64; // eax@34
  PgWinText *v65; // eax@34
  PgSprData *v66; // eax@34
  PgSprData *v67; // eax@34
  PgWinBar *v68; // eax@34
  PgSprData *v69; // eax@34
  PgWinBar *v70; // eax@34
  PgSprData *v71; // eax@34
  PgWinBar *v72; // eax@34
  PgSprData *v73; // eax@34
  PgWinBar *v74; // eax@34
  NiShader *v75; // eax@34
  PgSprData *v76; // eax@34
  PgWinBar *v77; // eax@34
  NiNode *v78; // ecx@34
  NiShader *v79; // eax@34
  PgSprData *v80; // eax@34
  PgWinBar *v81; // eax@34
  NiNode *v82; // ecx@34
  PgSprData *v83; // eax@34
  PgWinBar *v84; // eax@34
  PgSprData *v85; // eax@34
  PgWinBar *v86; // eax@34
  NiShader *v87; // eax@34
  PgSprData *v88; // eax@34
  PgFont *v89; // eax@35
  PgFont *v90; // eax@35
  PgWinText *v91; // eax@35
  PgWinText *v92; // ecx@35
  PgFont *v93; // eax@36
  PgWinText *v94; // eax@36
  int v95; // eax@36
  PgWinText *v96; // ecx@36
  int v97; // eax@36
  bool v98; // zf@36
  int v99; // eax@37
  PgWinText *v100; // ecx@37
  signed int v101; // eax@38
  bool v102; // sf@38
  void *(__thiscall *v103)(NiRefObject *, unsigned int); // eax@38
  signed int v104; // eax@41
  void *(__thiscall *v105)(NiRefObject *, unsigned int); // eax@41
  unsigned int v106; // edi@44
  void *(__thiscall *v107)(NiRefObject *, unsigned int); // eax@44
  unsigned int v108; // edi@47
  void *(__thiscall *v109)(NiRefObject *, unsigned int); // eax@47
  PgWinBut *v110; // edi@50
  PgWin *v111; // ST50_4@50
  PgFont *v112; // ST4C_4@50
  unsigned int v113; // ST48_4@50
  unsigned int v114; // ST44_4@50
  int v115; // ST40_4@50
  int v116; // eax@50
  PgWinText *v117; // eax@50
  PgWinBut *v118; // edi@50
  PgWin *v119; // ST50_4@50
  PgFont *v120; // ST4C_4@50
  unsigned int v121; // ST48_4@50
  unsigned int v122; // ST44_4@50
  int v123; // ST40_4@50
  int v124; // eax@50
  PgWinText *v125; // eax@50
  NiRefObjectVtbl *v126; // edi@50
  NiUnsharedGeometryGroup *v127; // eax@50
  unsigned int v128; // eax@50
  NiRefObjectVtbl *v129; // edi@50
  unsigned int v130; // ST58_4@50
  unsigned int v131; // eax@50
  char *v132; // eax@50
  unsigned int v133; // eax@50
  NiRefObjectVtbl *v134; // edi@50
  unsigned int v135; // ST58_4@50
  unsigned int v136; // eax@50
  char *v137; // eax@50
  NiRefObjectVtbl *v138; // edi@50
  unsigned int v139; // ST58_4@50
  unsigned int v140; // eax@50
  char *v141; // eax@50
  tagSIZE kSize; // [sp+6Ch] [bp-7Ch]@50
  NiAVObject *pkObject; // [sp+74h] [bp-74h]@27
  int v144; // [sp+78h] [bp-70h]@27
  UIUtil ui; // [sp+7Ch] [bp-6Ch]@20
  NiPointer<NiTexturingProperty> spTexProp; // [sp+90h] [bp-58h]@16
  unsigned int uiHeight; // [sp+94h] [bp-54h]@22
  unsigned int uiWidth; // [sp+98h] [bp-50h]@22
  int iOffY; // [sp+9Ch] [bp-4Ch]@16
  PgSprData *pkSprData; // [sp+A0h] [bp-48h]@7
  int uiOrgX; // [sp+A4h] [bp-44h]@10
  int uiOrgY; // [sp+A8h] [bp-40h]@10
  NiPointer<NiNode> spNode; // [sp+ACh] [bp-3Ch]@1
  int uiTop; // [sp+B0h] [bp-38h]@20
  int uiLeft; // [sp+B4h] [bp-34h]@20
  char acText[32]; // [sp+B8h] [bp-30h]@50
  int v157; // [sp+E4h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v157 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  if ( !v3 )
  {
    v157 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( spNode.m_pObject )
        spNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spNode.m_pObject, 1u);
    }
    return 0;
  }
  pkSprData = (PgSprData *)pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "Game\\MainGauge.nif");
  PgUtil::LoadNodeNifFile(v5, &spNode, (NiTexturePalette *)pkSprData);
  if ( !spNode.m_pObject )
    return 0;
  v6 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiOrgX, &uiOrgY, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, uiOrgX, uiOrgY, v6, 0, pkFrameWork, "StatusWin", 0) )
  {
    v7 = spNode.m_pObject;
    v157 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    return 0;
  }
  v8 = spNode.m_pObject->vfptr;
  v9 = uiOrgX;
  iOffY = uiOrgY;
  v10 = (NiAVObject *)((int (__stdcall *)(const char *))v8[18].__vecDelDtor)("EventPanel");
  v11 = (NiTexturingProperty *)NiAVObject::GetProperty(v10, 8);
  spTexProp.m_pObject = v11;
  if ( v11 )
  {
    InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
    v11 = spTexProp.m_pObject;
  }
  v12 = *v11->m_kMaps.m_pBase;
  LOBYTE(v157) = 1;
  if ( !v12 || (v13 = (NiSourceTexture *)v12->m_spTexture.m_pObject) == 0 )
  {
LABEL_24:
    LOBYTE(v157) = 0;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
    v157 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "EventPanel", &uiLeft, &uiTop, v13);
  v15 = PgWinSpr::CreateWin(uiLeft - v9, uiTop - iOffY, v14, (PgWin *)&v2->vfptr, 0, 0);
  v15->vfptr[60].__vecDelDtor((NiRefObject *)v15, 0);
  v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Face_panel", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(-uiOrgX, -uiOrgY, v16, (PgWin *)&v2->vfptr, 0, 0);
  v17 = (NiShader *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("FaceCut_Mask");
  v18 = (NiTriShape *)CPostProcessEffect::DynamicCast(&NiTriShape::m_RTTI, v17);
  v19 = MaskedWin::CreateWin(-uiOrgX, -uiOrgY, v18, (PgWin *)&v2->vfptr);
  v20 = spNode.m_pObject;
  v2->m_pkPortrait = v19;
  v21 = PgSprData::Create((NiAVObject *)&v20->vfptr, "FaceCut_Mon", &uiLeft, &uiTop, v3);
  v22 = PgWinSpr::CreateWin(uiLeft - v9, uiTop - iOffY, v21, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkMobPortrait = v22;
  v22->vfptr[64].__vecDelDtor((NiRefObject *)v22, 0);
  pkSprData = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, v3);
  UIUtil::UIUtil(&ui);
  LOBYTE(v157) = 2;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, uiOrgX, uiOrgY);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v23 = User::GetMainCharClass(&g_kUser);
  if ( CharClass::GetBaseClassID(v23) == 26 )
    v2->m_bUseLP = 1;
  PgWinBut::CreateWin(uiLeft - v9, uiTop - iOffY, pkSprData, (PgWin *)&v2->vfptr, 0xBu, 0, 0);
  PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "LPground", &uiLeft, &uiTop, 0);
  v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Chief_Party", &uiLeft, &uiTop, v3);
  v25 = PgWinSpr::CreateWin(uiLeft - uiOrgX, uiTop - uiOrgY, v24, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkPtyChiefWin = v25;
  v25->vfptr[64].__vecDelDtor((NiRefObject *)v25, 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "Num_Level",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
    goto LABEL_53;
  v26 = Font::Get(SMALL);
  v27 = PgWinText::CreateWin(uiLeft - uiOrgX, uiTop - uiOrgY - 2, uiWidth, uiHeight, v26, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkLevelText = v27;
  v27->vfptr[118].__vecDelDtor((NiRefObject *)v27, (unsigned int)&unk_9A4403);
  ((void (__stdcall *)(signed int))v2->m_pkLevelText->vfptr[122].__vecDelDtor)(5);
  ((void (__stdcall *)(_DWORD))v2->m_pkLevelText->vfptr[60].__vecDelDtor)(0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "CharName",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
    goto LABEL_53;
  v28 = Font::Get(SMALL);
  v29 = PgWinText::CreateWin(uiLeft - uiOrgX, uiTop - uiOrgY - 2, uiWidth, uiHeight, v28, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkNameText = v29;
  v29->vfptr[118].__vecDelDtor((NiRefObject *)v29, (unsigned int)&unk_9A440A);
  ((void (__stdcall *)(signed int))v2->m_pkNameText->vfptr[122].__vecDelDtor)(5);
  ((void (__stdcall *)(_DWORD))v2->m_pkNameText->vfptr[60].__vecDelDtor)(0);
  v30 = 0;
  pkSprData = (PgSprData *)v2->m_apkHigherExpWin;
  do
  {
    pkObject = (NiAVObject *)spNode.m_pObject;
    v144 = v30 + 1;
    v31 = fs("Exp%02d", v30 + 1);
    v32 = PgSprData::Create(pkObject, v31, &uiLeft, &uiTop, v3);
    v33 = (NiRefObjectVtbl *)PgWinSpr::CreateWin(uiLeft - uiOrgX, uiTop - uiOrgY, v32, (PgWin *)&v2->vfptr, 0, 0);
    pkSprData->vfptr = v33;
    (*((void (__thiscall **)(_DWORD, _DWORD))v33->__vecDelDtor + 64))(v33, 1);
    PgWin::SetToolTipWinText((PgWin *)pkSprData->vfptr, &byte_9A440B);
    v34 = pkSprData;
    pkSprData->vfptr[68].__vecDelDtor = (void *(__thiscall *)(NiRefObject *, unsigned int))g_pkToolTipWin;
    v30 = v144;
    pkSprData = (PgSprData *)((char *)v34 + 4);
  }
  while ( v144 < 9 );
  v35 = (NiShader *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Fill_Exp");
  v36 = (NiTriShape *)CPostProcessEffect::DynamicCast(&NiTriShape::m_RTTI, v35);
  v37 = PgWinCircleGauge::CreateWin(-uiOrgX, -uiOrgY, v36, 0, 0.0, 360.0, (PgWin *)&v2->vfptr);
  v38 = spNode.m_pObject;
  v2->m_pkEXPGauge_kr = v37;
  v39 = PgSprData::Create((NiAVObject *)&v38->vfptr, "Panel05", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft - uiOrgX, uiTop - uiOrgY, v39, (PgWin *)&v2->vfptr, 0, 0);
  v40 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel03", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft - uiOrgX, uiTop - uiOrgY, v40, (PgWin *)&v2->vfptr, 0, 0);
  if ( v2->m_bUseLP )
    UIUtil::CreateSpr(&ui, "LPground", 0);
  else
    UIUtil::CreateSpr(&ui, "SPground", 0);
  v41 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SP_Panel", &uiLeft, &uiTop, v3);
  v2->m_pkSPStonBut = PgWinBut::CreateWin(uiLeft - uiOrgX, uiTop - uiOrgY, v41, (PgWin *)&v2->vfptr, 0xAu, 0, 0);
  v42 = (char *)TextData::Get(0xF206404F);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkSPStonBut->vfptr, v42);
  v2->m_pkSPStonBut->m_pkToolTipWin = g_pkToolTipWin;
  if ( v2->m_bUseLP )
  {
    v2->m_apkLPLight = UIUtil::CreateSpr(&ui, "LPLight", 0);
  }
  else
  {
    v43 = UIUtil::CreateSpr(&ui, "SPLight", 0);
    v44 = spNode.m_pObject;
    v2->m_apkSPLight = v43;
    v45 = (NiShader *)((int (__stdcall *)(const char *))v44->vfptr[18].__vecDelDtor)("SPCoolTime");
    v46 = (NiTriShape *)CPostProcessEffect::DynamicCast(&NiTriShape::m_RTTI, v45);
    v47 = PgWinCircleGauge::CreateWin(-uiLeft, -uiTop, v46, 0, 0.0, 360.0, (PgWin *)&v2->m_pkSPStonBut->vfptr);
    v2->m_pkSPCoolTimeGauge_kr = v47;
    v47->vfptr[64].__vecDelDtor((NiRefObject *)v47, 0);
    ((void (__stdcall *)(_DWORD))v2->m_pkSPCoolTimeGauge_kr->vfptr[60].__vecDelDtor)(0);
    pkSprData = (PgSprData *)v2->m_pkSPStonBut;
    fOrgAngle = (PgWin *)pkSprData;
    v49 = Font::Get(MENU);
    v50 = ((int (*)(void))pkSprData->vfptr[37].__vecDelDtor)();
    v51 = ((int (*)(void))pkSprData->vfptr[36].__vecDelDtor)();
    v52 = PgWinText::CreateWin(0, 0, v51, v50, v49, fOrgAngle, 0, 0);
    v2->m_pkSPSoulStoneText = v52;
    v52->vfptr[122].__vecDelDtor((NiRefObject *)v52, 5u);
    SpScreenText::SetShadowOffset((SpScreenText *)&v2->m_pkSPSoulStoneText->m_spTextGeom.m_pObject->vfptr, 1u);
    ((void (__stdcall *)(_DWORD))v2->m_pkSPSoulStoneText->vfptr[60].__vecDelDtor)(0);
  }
  v53 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel04", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft - uiOrgX, uiTop - uiOrgY, v53, (PgWin *)&v2->vfptr, 0, 0);
  v54 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HP_Panel", &uiLeft, &uiTop, v3);
  v2->m_pkHPStonBut = PgWinBut::CreateWin(uiLeft - uiOrgX, uiTop - uiOrgY, v54, (PgWin *)&v2->vfptr, 9u, 0, 0);
  v55 = (char *)TextData::Get(0xF2FB404F);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkHPStonBut->vfptr, v55);
  v2->m_pkHPStonBut->m_pkToolTipWin = g_pkToolTipWin;
  v56 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HPLight", &uiLeft, &uiTop, v3);
  v57 = PgWinSpr::CreateWin(0, 0, v56, (PgWin *)&v2->m_pkHPStonBut->vfptr, 0, 0);
  v2->m_apkHPLight = v57;
  v57->vfptr[64].__vecDelDtor((NiRefObject *)v57, 0);
  v58 = (NiShader *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HPCoolTime");
  v59 = (NiTriShape *)CPostProcessEffect::DynamicCast(&NiTriShape::m_RTTI, v58);
  v60 = PgWinCircleGauge::CreateWin(-uiLeft, -uiTop, v59, 0, 0.0, 360.0, (PgWin *)&v2->m_pkHPStonBut->vfptr);
  v2->m_pkHPCoolTimeGauge_kr = v60;
  v60->vfptr[64].__vecDelDtor((NiRefObject *)v60, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkHPCoolTimeGauge_kr->vfptr[60].__vecDelDtor)(0);
  pkSprData = (PgSprData *)v2->m_pkHPStonBut;
  v61 = (PgWin *)pkSprData;
  v62 = Font::Get(MENU);
  v63 = ((int (*)(void))pkSprData->vfptr[37].__vecDelDtor)();
  v64 = ((int (*)(void))pkSprData->vfptr[36].__vecDelDtor)();
  v65 = PgWinText::CreateWin(0, 0, v64, v63, v62, v61, 0, 0);
  v2->m_pkHPSoulStoneText = v65;
  v65->vfptr[122].__vecDelDtor((NiRefObject *)v65, 5u);
  SpScreenText::SetShadowOffset((SpScreenText *)&v2->m_pkHPSoulStoneText->m_spTextGeom.m_pObject->vfptr, 1u);
  ((void (__stdcall *)(_DWORD))v2->m_pkHPSoulStoneText->vfptr[60].__vecDelDtor)(0);
  v66 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft - uiOrgX, uiTop - uiOrgY, v66, (PgWin *)&v2->vfptr, 0, 0);
  v67 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_SP_03", &uiLeft, &uiTop, v3);
  v68 = PgWinBar::CreateWin(uiLeft - v9, uiTop - iOffY, v67, (PgWin *)&v2->vfptr, BGT_RIGHT);
  v2->m_pkSPBarEnd = (PgWinSpr *)v68;
  v68->vfptr[64].__vecDelDtor((NiRefObject *)v68, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkSPBarEnd->vfptr[60].__vecDelDtor)(0);
  v69 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_SP_01", &uiLeft, &uiTop, v3);
  v70 = PgWinBar::CreateWin(uiLeft - v9, uiTop - iOffY, v69, (PgWin *)&v2->vfptr, BGT_RIGHT);
  v2->m_pkSPBarStart = (PgWinSpr *)v70;
  v70->vfptr[64].__vecDelDtor((NiRefObject *)v70, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkSPBarStart->vfptr[60].__vecDelDtor)(0);
  v71 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_HP_01", &uiLeft, &uiTop, v3);
  v72 = PgWinBar::CreateWin(uiLeft - v9, uiTop - iOffY, v71, (PgWin *)&v2->vfptr, BGT_RIGHT);
  v2->m_pkHPBarStart = (PgWinSpr *)v72;
  v72->vfptr[64].__vecDelDtor((NiRefObject *)v72, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkHPBarStart->vfptr[60].__vecDelDtor)(0);
  v73 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_HP_03", &uiLeft, &uiTop, v3);
  v74 = PgWinBar::CreateWin(uiLeft - v9, uiTop - iOffY, v73, (PgWin *)&v2->vfptr, BGT_RIGHT);
  v2->m_pkHPBarEnd = (PgWinSpr *)v74;
  v74->vfptr[64].__vecDelDtor((NiRefObject *)v74, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkHPBarEnd->vfptr[60].__vecDelDtor)(0);
  v75 = (NiShader *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Fill_SP");
  CPostProcessEffect::DynamicCast(&NiTriShape::m_RTTI, v75);
  v76 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_SP_02", &uiLeft, &uiTop, 0);
  v77 = PgWinBar::CreateWin(uiLeft - uiOrgX, uiTop - uiOrgY, v76, (PgWin *)&v2->vfptr, BGT_RIGHT);
  v78 = spNode.m_pObject;
  v2->m_pkSPGauge_kr = v77;
  v79 = (NiShader *)((int (__stdcall *)(const char *))v78->vfptr[18].__vecDelDtor)("Fill_HP");
  CPostProcessEffect::DynamicCast(&NiTriShape::m_RTTI, v79);
  v80 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_HP_02", &uiLeft, &uiTop, 0);
  v81 = PgWinBar::CreateWin(uiLeft - uiOrgX, uiTop - uiOrgY, v80, (PgWin *)&v2->vfptr, BGT_RIGHT);
  v82 = spNode.m_pObject;
  v2->m_pkHPGauge_kr = v81;
  v83 = PgSprData::Create((NiAVObject *)&v82->vfptr, "Fill_LP_03", &uiLeft, &uiTop, v3);
  v84 = PgWinBar::CreateWin(uiLeft - v9, uiTop - iOffY, v83, (PgWin *)&v2->vfptr, BGT_RIGHT);
  v2->m_pkLPBarEnd = (PgWinSpr *)v84;
  v84->vfptr[64].__vecDelDtor((NiRefObject *)v84, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkLPBarEnd->vfptr[60].__vecDelDtor)(0);
  v85 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_LP_01", &uiLeft, &uiTop, v3);
  v86 = PgWinBar::CreateWin(uiLeft - v9, uiTop - iOffY, v85, (PgWin *)&v2->vfptr, BGT_RIGHT);
  v2->m_pkLPBarStart = (PgWinSpr *)v86;
  v86->vfptr[64].__vecDelDtor((NiRefObject *)v86, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkLPBarStart->vfptr[60].__vecDelDtor)(0);
  v87 = (NiShader *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Fill_LP");
  CPostProcessEffect::DynamicCast(&NiTriShape::m_RTTI, v87);
  v88 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_LP_02", &uiLeft, &uiTop, 0);
  v2->m_pkLPGauge_kr = PgWinBar::CreateWin(uiLeft - uiOrgX, uiTop - uiOrgY, v88, (PgWin *)&v2->vfptr, BGT_RIGHT);
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Num_SP", &uiLeft, &uiTop, &uiWidth, &uiHeight)
    || (v89 = Font::Get(SMALL),
        v2->m_pkSPText = PgWinText::CreateWin(
                           uiLeft - uiOrgX,
                           uiTop - uiOrgY - 2,
                           uiWidth,
                           uiHeight,
                           v89,
                           (PgWin *)&v2->vfptr,
                           0,
                           0),
        v90 = Font::Get(SMALL),
        v91 = PgWinText::CreateWin(
                uiLeft - uiOrgX,
                uiTop - uiOrgY - 2,
                uiWidth,
                uiHeight,
                v90,
                (PgWin *)&v2->vfptr,
                0,
                0),
        v92 = v2->m_pkSPText,
        v2->m_pkLPText = v91,
        ((void (__stdcall *)(signed int))v92->vfptr[122].__vecDelDtor)(5),
        ((void (__stdcall *)(D3DXCOLOR *))v2->m_pkSPText->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor),
        ((void (__stdcall *)(signed int))v2->m_pkLPText->vfptr[122].__vecDelDtor)(5),
        ((void (__stdcall *)(struct D3DXCOLOR *))v2->m_pkLPText->vfptr[117].__vecDelDtor)(&Color::m_kDxLPTextColor),
        !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Num_HP", &uiLeft, &uiTop, &uiWidth, &uiHeight)) )
  {
LABEL_53:
    LOBYTE(v157) = 1;
    UIUtil::~UIUtil(&ui);
    goto LABEL_24;
  }
  v93 = Font::Get(SMALL);
  v94 = PgWinText::CreateWin(uiLeft - uiOrgX, uiTop - uiOrgY - 2, uiWidth, uiHeight, v93, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkHPText = v94;
  v94->vfptr[122].__vecDelDtor((NiRefObject *)v94, 5u);
  ((void (__stdcall *)(D3DXCOLOR *))v2->m_pkHPText->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
  v95 = ((int (*)(void))v2->m_pkHPSoulStoneText->vfptr[41].__vecDelDtor)();
  v96 = v2->m_pkHPSoulStoneText;
  v2->m_bHpTextPosX = v95;
  v97 = ((int (*)(void))v96->vfptr[42].__vecDelDtor)();
  v98 = v2->m_bUseLP == 0;
  v2->m_bHpTextPosY = v97;
  if ( v98 )
  {
    v99 = ((int (*)(void))v2->m_pkSPSoulStoneText->vfptr[41].__vecDelDtor)();
    v100 = v2->m_pkSPSoulStoneText;
    v2->m_bSpTextPosX = v99;
    v2->m_bSpTextPosY = ((int (*)(void))v100->vfptr[42].__vecDelDtor)();
  }
  v101 = User::HP(&g_kUser);
  v98 = v101 == 0;
  v102 = v101 < 0;
  v103 = v2->m_pkHPBarStart->vfptr[64].__vecDelDtor;
  if ( v102 || v98 )
    ((void (__stdcall *)(_DWORD))v103)(0);
  else
    ((void (__stdcall *)(signed int))v103)(1);
  v104 = User::SP(&g_kUser);
  v98 = v104 == 0;
  v102 = v104 < 0;
  v105 = v2->m_pkSPBarStart->vfptr[64].__vecDelDtor;
  if ( v102 || v98 )
    ((void (__stdcall *)(_DWORD))v105)(0);
  else
    ((void (__stdcall *)(signed int))v105)(1);
  v106 = User::HP(&g_kUser);
  v98 = v106 == User::MaxHP(&g_kUser);
  v107 = v2->m_pkHPBarEnd->vfptr[64].__vecDelDtor;
  if ( v98 )
    ((void (__stdcall *)(signed int))v107)(1);
  else
    ((void (__stdcall *)(_DWORD))v107)(0);
  v108 = User::SP(&g_kUser);
  v98 = v108 == User::MaxSP(&g_kUser);
  v109 = v2->m_pkSPBarEnd->vfptr[64].__vecDelDtor;
  if ( v98 )
    ((void (__stdcall *)(signed int))v109)(1);
  else
    ((void (__stdcall *)(_DWORD))v109)(0);
  v110 = v2->m_pkHPStonBut;
  v111 = (PgWin *)&v2->m_pkHPStonBut->vfptr;
  v112 = Font::Get(LARGEBOLD);
  v113 = ((int (__thiscall *)(PgWinBut *))v110->vfptr[37].__vecDelDtor)(v110);
  v114 = ((int (__thiscall *)(PgWinBut *))v110->vfptr[36].__vecDelDtor)(v110);
  v115 = ((int (__thiscall *)(PgWinBut *))v110->vfptr[37].__vecDelDtor)(v110);
  v116 = ((int (__thiscall *)(PgWinBut *))v110->vfptr[36].__vecDelDtor)(v110);
  v117 = PgWinText::CreateWin(v116, v115, v114, v113, v112, v111, 0, 0);
  v2->m_pkHPStoneAlarmText[0] = v117;
  v117->vfptr[118].__vecDelDtor((NiRefObject *)v117, (unsigned int)&unk_9A4416);
  ((void (__stdcall *)(D3DXCOLOR *))v2->m_pkHPStoneAlarmText[0]->vfptr[117].__vecDelDtor)(&Color::m_kDxGreenColor);
  ((void (__stdcall *)(signed int))v2->m_pkHPStoneAlarmText[0]->vfptr[122].__vecDelDtor)(8);
  ((void (__stdcall *)(_DWORD))v2->m_pkHPStoneAlarmText[0]->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkHPStoneAlarmText[0]->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(tagSIZE *))v2->m_pkHPStoneAlarmText[0]->vfptr[123].__vecDelDtor)(&kSize);
  v118 = v2->m_pkHPStonBut;
  v119 = (PgWin *)&v2->m_pkHPStonBut->vfptr;
  v120 = Font::Get(GTFONT);
  v121 = ((int (__thiscall *)(PgWinBut *))v118->vfptr[37].__vecDelDtor)(v118);
  v122 = ((int (__thiscall *)(PgWinBut *))v118->vfptr[36].__vecDelDtor)(v118);
  v123 = ((int (__thiscall *)(PgWinBut *))v118->vfptr[37].__vecDelDtor)(v118);
  v124 = ((int (__thiscall *)(PgWinBut *))v118->vfptr[36].__vecDelDtor)(v118);
  v125 = PgWinText::CreateWin(kSize.cx + v124, v123, v122, v121, v120, v119, 0, 0);
  v2->m_pkHPStoneAlarmText[1] = v125;
  v126 = v125->vfptr;
  v127 = TextData2::Get(0x30553DAEu);
  v126[118].__vecDelDtor((NiRefObject *)v2->m_pkHPStoneAlarmText[1], (unsigned int)v127);
  ((void (__stdcall *)(D3DXCOLOR *))v2->m_pkHPStoneAlarmText[1]->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
  ((void (__stdcall *)(signed int))v2->m_pkHPStoneAlarmText[1]->vfptr[122].__vecDelDtor)(8);
  ((void (__stdcall *)(_DWORD))v2->m_pkHPStoneAlarmText[1]->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkHPStoneAlarmText[1]->vfptr[64].__vecDelDtor)(0);
  v128 = User::HP(&g_kUser);
  sprintf(acText, "%u", v128);
  v129 = v2->m_pkHPText->vfptr;
  v130 = User::MaxHP(&g_kUser);
  v131 = User::HP(&g_kUser);
  v132 = fs("%d/%d", v131, v130);
  v129[118].__vecDelDtor((NiRefObject *)v2->m_pkHPText, (unsigned int)v132);
  v133 = User::SP(&g_kUser);
  sprintf(acText, "%u", v133);
  v134 = v2->m_pkSPText->vfptr;
  v135 = User::MaxSP(&g_kUser);
  v136 = User::SP(&g_kUser);
  v137 = fs("%d/%d", v136, v135);
  v134[118].__vecDelDtor((NiRefObject *)v2->m_pkSPText, (unsigned int)v137);
  v138 = v2->m_pkLPText->vfptr;
  v139 = User::MaxLP(&g_kUser);
  v140 = User::LP(&g_kUser);
  v141 = fs("%d/%d", v140, v139);
  v138[118].__vecDelDtor((NiRefObject *)v2->m_pkLPText, (unsigned int)v141);
  LOBYTE(v157) = 1;
  UIUtil::~UIUtil(&ui);
  LOBYTE(v157) = 0;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
  v157 = -1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
  return 1;
}
// A69680: using guessed type struct D3DXCOLOR Color::m_kDxLPTextColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0059C500) --------------------------------------------------------
void __thiscall StatusWin::ProcessMeInput(StatusWin *this, bool *bHit)
{
  StatusWin *v2; // esi@1
  PgWin **v3; // esi@6
  unsigned __int64 v4; // rax@8
  signed __int64 v5; // kr00_8@8
  unsigned __int64 v6; // rax@8
  unsigned __int64 v7; // kr08_8@8
  double v8; // st7@9
  float fExpRate; // ST30_4@11
  char *v10; // eax@11
  char *v11; // eax@11
  bool v12; // zf@13
  signed int v13; // [sp+14h] [bp-8h]@6
  bool *bHita; // [sp+24h] [bp+8h]@6

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[78].__vecDelDtor)() )
  {
    if ( dword_B64790 )
      ++dword_B64790;
    if ( PgWin::ms_kbRbutPressed.m_iBool )
      ++PgWin::ms_kbRbutPressed.m_iBool;
    PgWinFrame::ProcessMeInput((PgWinFrame *)&v2->vfptr, bHit);
    v3 = (PgWin **)v2->m_apkHigherExpWin;
    bHita = (bool *)v3;
    v13 = 9;
    do
    {
      if ( (unsigned __int8)((int (__stdcall *)(unsigned int, int))(*v3)->vfptr[83].__vecDelDtor)(
                              PgWin::ms_iMsX,
                              PgWin::ms_iMsY) )
      {
        v4 = User::NextExp(&g_kUser);
        v5 = v4 - User::PrevExp(&g_kUser);
        v6 = User::CurExp(&g_kUser);
        v7 = v6 - User::PrevExp(&g_kUser);
        if ( __PAIR__(v5, HIDWORD(v5)) )
          v8 = (double)((signed __int64)(100 * v7) / v5);
        else
          v8 = 0.0;
        fExpRate = v8;
        v10 = (char *)TextData2::Get(0x124B393Cu);
        v11 = fs(v10, (signed int)fExpRate);
        PgWin::SetToolTipWinText(*(PgWin **)bHita, v11);
        v3 = (PgWin **)bHita;
      }
      else
      {
        PgWin::SetToolTipWinText(*v3, &byte_9A4417);
      }
      ++v3;
      v12 = v13-- == 1;
      bHita = (bool *)v3;
    }
    while ( !v12 );
    PgWin::ms_kbRbutPressed.m_bReserveFalse = 0;
    if ( PgWin::ms_kbRbutPressed.m_iBool )
      --PgWin::ms_kbRbutPressed.m_iBool;
    byte_B6478C = 0;
    if ( dword_B64790 )
      --dword_B64790;
  }
}
// B6478C: using guessed type char byte_B6478C;
// B64790: using guessed type int dword_B64790;

//----- (0059C670) --------------------------------------------------------
void __thiscall StatusWin::UpdateMeWin_kr(StatusWin *this, float fCurTime)
{
  StatusWin *v2; // esi@1
  unsigned int v3; // eax@1
  unsigned __int64 v4; // rax@1
  unsigned __int64 v5; // rax@1
  unsigned __int64 v6; // kr08_8@1
  float v7; // ST5C_4@2
  float v8; // ST58_4@8
  long double v9; // st7@5
  unsigned int v10; // ebx@5
  float v11; // ST58_4@8
  unsigned int v12; // eax@8
  int v13; // edi@9
  int v14; // edi@13
  int v15; // ebx@13
  PgSpr *v16; // edi@16
  NiSourceTexture *v17; // eax@16
  NiSourceTexture *v18; // eax@17
  Name5 *v19; // eax@18
  PgWinText *v20; // ecx@18
  int v21; // eax@19
  PgWinSpr *v22; // ecx@19
  PgWinSpr *v23; // ecx@23
  bool v24; // al@23
  void *(__thiscall *v25)(NiRefObject *, unsigned int); // edx@23
  int v26; // eax@24
  int v27; // eax@25
  int v28; // eax@29
  PgWinSpr *v29; // ecx@29
  PgWinSpr *v30; // ecx@33
  bool v31; // al@33
  void *(__thiscall *v32)(NiRefObject *, unsigned int); // edx@33
  int v33; // eax@34
  int v34; // eax@35
  Name5 *v35; // eax@41
  PgWinCircleGauge *v36; // ecx@48
  float v37; // ST58_4@49
  float v38; // ST58_4@53
  int v39; // [sp+40h] [bp-70h]@0
  int v40; // [sp+40h] [bp-70h]@16
  unsigned __int64 fExpRateTmp; // [sp+54h] [bp-5Ch]@1
  float fExpRateTmp_4; // [sp+58h] [bp-58h]@47
  float fExpRateTmp_4a; // [sp+58h] [bp-58h]@48
  float fExpRateTmp_4b; // [sp+58h] [bp-58h]@52
  float fExpRate; // [sp+5Ch] [bp-54h]@2
  float fExpRatea; // [sp+5Ch] [bp-54h]@9
  Name5 kMasterID; // [sp+60h] [bp-50h]@37
  char acName[21]; // [sp+74h] [bp-3Ch]@18
  char acText[32]; // [sp+8Ch] [bp-24h]@1

  v2 = this;
  v3 = User::Lv(&g_kUser);
  sprintf(acText, "%u", v3);
  ((void (__stdcall *)(char *))v2->m_pkLevelText->vfptr[118].__vecDelDtor)(acText);
  v4 = User::NextExp(&g_kUser);
  fExpRateTmp = v4 - User::PrevExp(&g_kUser);
  v5 = User::CurExp(&g_kUser);
  v6 = v5 - User::PrevExp(&g_kUser);
  if ( fExpRateTmp )
  {
    v7 = (double)(signed __int64)v6 * 100.0;
    fExpRate = v7 / (double)(signed __int64)fExpRateTmp;
  }
  else
  {
    fExpRate = 0.0;
  }
  if ( fExpRate > 0.0 )
  {
    v9 = 10.0;
    v10 = (signed __int64)(fExpRate / 10.0);
    if ( v10 > 9 )
      v10 = 9;
  }
  else
  {
    v9 = 10.0;
    v10 = 0;
  }
  v8 = fExpRate + 0.0;
  v11 = fmod(v8, v9);
  PgWinCircleGauge::SetValue(v2->m_pkEXPGauge_kr, 10.0, v11);
  v12 = 0;
  if ( v10 )
  {
    v13 = (int)v2->m_apkHigherExpWin;
    fExpRatea = *(float *)&v10;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v13 + 276))(1.0);
      v13 += 4;
      --LODWORD(fExpRatea);
    }
    while ( fExpRatea != 0.0 );
    if ( v10 >= 9 )
      goto LABEL_15;
    v12 = v10;
  }
  v14 = (int)&v2->m_apkHigherExpWin[v12];
  v15 = 9 - v12;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v14 + 276))(0.0);
    v14 += 4;
    --v15;
  }
  while ( v15 );
LABEL_15:
  if ( (unsigned __int8)((int (__stdcall *)(int))g_pkMainChar->vfptr[20].Deaffect)(v39) )
  {
    v16 = v2->m_pkMobPortrait->m_spSpr.m_pObject;
    v17 = PortraitTextureBuffer::GetMainCharPortrait(g_pkMainChar);
    PgSpr::SetTexture(v16, (NiTexture *)&v17->vfptr);
    ((void (__stdcall *)(signed int))v2->m_pkMobPortrait->vfptr[64].__vecDelDtor)(1);
    ((void (__cdecl *)(_DWORD))v2->m_pkPortrait->vfptr[64].__vecDelDtor)(0);
  }
  else
  {
    v18 = PortraitTextureBuffer::GetMainCharPortrait(g_pkMainChar);
    MaskedWin::SetBaseTexture(v2->m_pkPortrait, (NiTexture *)&v18->vfptr);
    ((void (__stdcall *)(_DWORD))v2->m_pkMobPortrait->vfptr[64].__vecDelDtor)(0);
    ((void (__cdecl *)(signed int))v2->m_pkPortrait->vfptr[64].__vecDelDtor)(1);
  }
  v19 = User::GetMainCharID(&g_kUser);
  *(_DWORD *)acName = v19->n5_code[0];
  *(_DWORD *)&acName[4] = v19->n5_code[1];
  *(_DWORD *)&acName[8] = v19->n5_code[2];
  v20 = v2->m_pkNameText;
  *(_DWORD *)&acName[12] = v19->n5_code[3];
  *(_DWORD *)&acName[16] = v19->n5_code[4];
  acName[20] = 0;
  ((void (__stdcall *)(char *))v20->vfptr[118].__vecDelDtor)(acName);
  if ( User::HPStone(&g_kUser) <= 1 )
  {
    if ( !v2->m_bHpTimerStart )
    {
      CNSTimer_Interval::ReSet(&v2->m_kHpTimer, Timer::ms_fCurTime);
      v2->m_kHpTimer.m_fCheckTime = 0.5;
      v2->m_bHpTimerStart = 1;
    }
    if ( CNSTimer_Interval::IsRun_GetCount(&v2->m_kHpTimer, fCurTime) )
    {
      v23 = v2->m_apkHPLight;
      v24 = v2->m_bHpTimer == 0;
      v2->m_bHpTimer = v24;
      v25 = v23->vfptr[64].__vecDelDtor;
      if ( v24 )
      {
        ((void (__stdcall *)(signed int, int))v25)(1, v40);
        v26 = User::HPStone(&g_kUser);
        sprintf(acText, "%d", v26);
        ((void (__stdcall *)(D3DXCOLOR *))v2->m_pkHPSoulStoneText->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
      }
      else
      {
        ((void (__stdcall *)(_DWORD, int))v25)(0, v40);
        v27 = User::HPStone(&g_kUser);
        sprintf(acText, "%d", v27);
        ((void (__stdcall *)(D3DXCOLOR *))v2->m_pkHPSoulStoneText->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
      }
      SpScreenText::SetShadowOffset((SpScreenText *)&v2->m_pkHPSoulStoneText->m_spTextGeom.m_pObject->vfptr, 1u);
      ((void (__cdecl *)(char *))v2->m_pkHPSoulStoneText->vfptr[118].__vecDelDtor)(acText);
    }
  }
  else
  {
    v21 = User::HPStone(&g_kUser);
    sprintf(acText, "%d", v21);
    ((void (__stdcall *)(D3DXCOLOR *, int))v2->m_pkHPSoulStoneText->vfptr[117].__vecDelDtor)(
      &Color::m_kDxWhiteColor,
      v40);
    SpScreenText::SetShadowOffset((SpScreenText *)&v2->m_pkHPSoulStoneText->m_spTextGeom.m_pObject->vfptr, 1u);
    ((void (__stdcall *)(char *))v2->m_pkHPSoulStoneText->vfptr[118].__vecDelDtor)(acText);
    ((void (__stdcall *)(int))v2->m_pkHPSoulStoneText->vfptr[43].__vecDelDtor)(v2->m_bHpTextPosX);
    ((void (__stdcall *)(int))v2->m_pkHPSoulStoneText->vfptr[44].__vecDelDtor)(v2->m_bHpTextPosY);
    v22 = v2->m_apkHPLight;
    v2->m_bHpTimerStart = 0;
    ((void (__cdecl *)(_DWORD))v22->vfptr[64].__vecDelDtor)(0);
  }
  if ( !v2->m_bUseLP )
  {
    if ( User::SPStone(&g_kUser) <= 1 )
    {
      if ( !v2->m_bSpTimerStart )
      {
        CNSTimer_Interval::ReSet(&v2->m_kSpTimer, Timer::ms_fCurTime);
        v2->m_kSpTimer.m_fCheckTime = 0.5;
        v2->m_bSpTimerStart = 1;
      }
      if ( CNSTimer_Interval::IsRun_GetCount(&v2->m_kSpTimer, fCurTime) )
      {
        v30 = v2->m_apkSPLight;
        v31 = v2->m_bSpTimer == 0;
        v2->m_bSpTimer = v31;
        v32 = v30->vfptr[64].__vecDelDtor;
        if ( v31 )
        {
          ((void (__stdcall *)(signed int, int))v32)(1, v40);
          v33 = User::SPStone(&g_kUser);
          sprintf(acText, "%d", v33);
          SpScreenText::SetShadowOffset((SpScreenText *)&v2->m_pkSPSoulStoneText->m_spTextGeom.m_pObject->vfptr, 1u);
          ((void (__stdcall *)(D3DXCOLOR *))v2->m_pkSPSoulStoneText->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
        }
        else
        {
          ((void (__stdcall *)(_DWORD, int))v32)(0, v40);
          v34 = User::SPStone(&g_kUser);
          sprintf(acText, "%d", v34);
          SpScreenText::SetShadowOffset((SpScreenText *)&v2->m_pkSPSoulStoneText->m_spTextGeom.m_pObject->vfptr, 1u);
          ((void (__stdcall *)(D3DXCOLOR *))v2->m_pkSPSoulStoneText->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
        }
        ((void (__cdecl *)(char *))v2->m_pkSPSoulStoneText->vfptr[118].__vecDelDtor)(acText);
      }
    }
    else
    {
      v28 = User::SPStone(&g_kUser);
      sprintf(acText, "%d", v28);
      ((void (__stdcall *)(D3DXCOLOR *, int))v2->m_pkSPSoulStoneText->vfptr[117].__vecDelDtor)(
        &Color::m_kDxWhiteColor,
        v40);
      SpScreenText::SetShadowOffset((SpScreenText *)&v2->m_pkSPSoulStoneText->m_spTextGeom.m_pObject->vfptr, 1u);
      ((void (__stdcall *)(char *))v2->m_pkSPSoulStoneText->vfptr[118].__vecDelDtor)(acText);
      ((void (__stdcall *)(int))v2->m_pkSPSoulStoneText->vfptr[43].__vecDelDtor)(v2->m_bHpTextPosX);
      ((void (__stdcall *)(int))v2->m_pkSPSoulStoneText->vfptr[44].__vecDelDtor)(v2->m_bHpTextPosY);
      v29 = v2->m_apkSPLight;
      v2->m_bSpTimerStart = 0;
      ((void (__cdecl *)(_DWORD))v29->vfptr[64].__vecDelDtor)(0);
    }
  }
  StatusWin::UpdateStoneAlarm(v2, fCurTime);
  Party::GetPartyMasterID(&g_kParty, &kMasterID);
  if ( g_kRaidinfo.m_bIsMeRaidLeader )
  {
    ((void (__stdcall *)(signed int))v2->m_pkPtyChiefWin->vfptr[64].__vecDelDtor)(1);
  }
  else if ( !g_kParty.m_uiTotalMember
         || RaidInfo::IsMeRaidMember(&g_kRaidinfo)
         || (v35 = User::GetMainCharID(&g_kUser), *(_QWORD *)&kMasterID.n5_name[0] != *(_QWORD *)&v35->n5_code[0])
         || *(_QWORD *)&kMasterID.n5_code[2] != *(_QWORD *)&v35->n5_code[2]
         || kMasterID.n5_code[4] != v35->n5_code[4] )
  {
    ((void (__stdcall *)(_DWORD))v2->m_pkPtyChiefWin->vfptr[64].__vecDelDtor)(0);
  }
  else
  {
    ((void (__stdcall *)(signed int))v2->m_pkPtyChiefWin->vfptr[64].__vecDelDtor)(1);
  }
  if ( !v2->m_bUseLP )
  {
    fExpRateTmp_4 = Timer::ms_fCurTime;
    if ( (unsigned __int8)((int (*)(void))v2->m_pkSPCoolTimeGauge_kr->vfptr[65].__vecDelDtor)() )
    {
      v36 = v2->m_pkSPCoolTimeGauge_kr;
      fExpRateTmp_4a = (fExpRateTmp_4 - v2->m_fLastSPUsedTime) / 7.0;
      if ( fExpRateTmp_4a > 1.0 )
      {
        ((void (__stdcall *)(_DWORD))v36->vfptr[64].__vecDelDtor)(0);
      }
      else
      {
        v37 = 1.0 - fExpRateTmp_4a;
        PgWinCircleGauge::SetValue(v36, 1.0, v37);
      }
    }
  }
  if ( (unsigned __int8)((int (*)(void))v2->m_pkHPCoolTimeGauge_kr->vfptr[65].__vecDelDtor)() )
  {
    fExpRateTmp_4b = (fCurTime - v2->m_fLastHPUsedTime) / 7.0;
    if ( fExpRateTmp_4b > 1.0 )
    {
      v2->m_pkHPCoolTimeGauge_kr->vfptr[64].__vecDelDtor((NiRefObject *)v2->m_pkHPCoolTimeGauge_kr, 0);
    }
    else
    {
      v38 = 1.0 - fExpRateTmp_4b;
      PgWinCircleGauge::SetValue(v2->m_pkHPCoolTimeGauge_kr, 1.0, v38);
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0059CDC0) --------------------------------------------------------
char __thiscall StatusWin::TryHPSoulStoneUse(StatusWin *this)
{
  StatusWin *v1; // esi@1
  signed int v2; // edi@3
  NiUnsharedGeometryGroup *v3; // eax@5
  char result; // al@6
  NiUnsharedGeometryGroup *v5; // eax@8

  v1 = this;
  if ( Char::CheckActState(g_pkMainChar, 500000) )
    return 0;
  if ( g_pkMainChar->m_bWillDead )
    return 0;
  v2 = User::HP(&g_kUser);
  if ( v2 >= (signed int)User::MaxHP(&g_kUser) )
    return 0;
  if ( v1->m_fLastHPUsedTime + 7.0 - 2.0 > Timer::ms_fCurTime )
  {
    v3 = TextData::Get(0xD9132D26);
    GameFrameWork::AddSysMsg((GameFrameWork *)v1->m_pkFrameWork, (const char *)v3);
    return 0;
  }
  if ( User::HPStone(&g_kUser) )
  {
    result = 1;
  }
  else
  {
    v5 = TextData::Get(0x3A4B3F55u);
    GameFrameWork::AddSysMsg((GameFrameWork *)v1->m_pkFrameWork, (const char *)v5);
    result = 0;
  }
  return result;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0059CE70) --------------------------------------------------------
char __thiscall StatusWin::TrySPSoulStoneUse(StatusWin *this)
{
  StatusWin *v1; // esi@1
  signed int v2; // edi@3
  NiUnsharedGeometryGroup *v3; // eax@5
  char result; // al@6
  NiUnsharedGeometryGroup *v5; // eax@8

  v1 = this;
  if ( Char::CheckActState(g_pkMainChar, 500000) )
    return 0;
  if ( g_pkMainChar->m_bWillDead )
    return 0;
  v2 = User::SP(&g_kUser);
  if ( v2 >= (signed int)User::MaxSP(&g_kUser) )
    return 0;
  if ( v1->m_fLastSPUsedTime + 7.0 - 2.0 > Timer::ms_fCurTime )
  {
    v3 = TextData::Get(0xE4132D26);
    GameFrameWork::AddSysMsg((GameFrameWork *)v1->m_pkFrameWork, (const char *)v3);
    return 0;
  }
  if ( User::SPStone(&g_kUser) )
  {
    result = 1;
  }
  else
  {
    v5 = TextData::Get(0x4F4C4F99u);
    GameFrameWork::AddSysMsg((GameFrameWork *)v1->m_pkFrameWork, (const char *)v5);
    result = 0;
  }
  return result;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0059CF20) --------------------------------------------------------
void __thiscall StatusWin::OnCmdHPSoul(StatusWin *this)
{
  StatusWin *v1; // esi@1

  v1 = this;
  if ( StatusWin::TryHPSoulStoneUse(this) )
    GameFrameWork::NcSoulStoneHPUseReq((GameFrameWork *)v1->m_pkFrameWork);
}

//----- (0059CF40) --------------------------------------------------------
void __thiscall StatusWin::OnCmdSPSoul(StatusWin *this)
{
  StatusWin *v1; // esi@1

  v1 = this;
  if ( StatusWin::TrySPSoulStoneUse(this) )
    GameFrameWork::NcSoulStoneSPUseReq((GameFrameWork *)v1->m_pkFrameWork);
}

//----- (0059CF60) --------------------------------------------------------
void __thiscall StatusWin::OnCommand(StatusWin *this, unsigned int wParam, int lParam)
{
  StatusWin *v3; // esi@1

  v3 = this;
  switch ( wParam )
  {
    case 9u:
      if ( StatusWin::TryHPSoulStoneUse(this) )
        GameFrameWork::NcSoulStoneHPUseReq((GameFrameWork *)v3->m_pkFrameWork);
      break;
    case 0xAu:
      if ( StatusWin::TrySPSoulStoneUse(this) )
        GameFrameWork::NcSoulStoneSPUseReq((GameFrameWork *)v3->m_pkFrameWork);
      break;
    case 0xBu:
      GameFrameWork::TargetCharReq((GameFrameWork *)this->m_pkFrameWork, g_pkMainChar);
      break;
  }
}

//----- (0059CFC0) --------------------------------------------------------
void __thiscall StatusWin::SetStoneAlarmShortcutText(StatusWin *this, const char *pcText)
{
  StatusWin *v2; // esi@1
  NiRefObjectVtbl *v3; // edi@1
  char *v4; // eax@1
  char *v5; // eax@1
  NiRefObjectVtbl *v6; // edi@1
  int v7; // eax@1
  tagSIZE kSize; // [sp+8h] [bp-8h]@1

  v2 = this;
  v3 = this->m_pkHPStoneAlarmText[0]->vfptr;
  v4 = (char *)TextData2::Get(0x31947EAFu);
  v5 = fs(v4, pcText);
  v3[118].__vecDelDtor((NiRefObject *)v2->m_pkHPStoneAlarmText[0], (unsigned int)v5);
  ((void (__stdcall *)(_DWORD))v2->m_pkHPStoneAlarmText[0]->vfptr[123].__vecDelDtor)(&kSize);
  v6 = v2->m_pkHPStoneAlarmText[1]->vfptr;
  v7 = ((int (*)(void))v2->m_pkHPStonBut->vfptr[36].__vecDelDtor)();
  v6[43].__vecDelDtor((NiRefObject *)v2->m_pkHPStoneAlarmText[1], kSize.cx + v7);
}

//----- (0059D050) --------------------------------------------------------
char __thiscall StatusWin::Create(StatusWin *this, PgFrameWork *pkFrameWork)
{
  StatusWin::CreateKoreaMainGauge(this, pkFrameWork);
  return 1;
}

//----- (0059D070) --------------------------------------------------------
void __thiscall StatusWin::UpdateMeWin(StatusWin *this, float fCurTime)
{
  StatusWin::UpdateMeWin_kr(this, fCurTime);
}

//----- (0059D090) --------------------------------------------------------
void __thiscall StatusWin::UpdateBars(StatusWin *this)
{
  StatusWin *v1; // esi@1
  unsigned int v2; // ST08_4@1
  unsigned int v3; // eax@1
  unsigned int v4; // ST08_4@1
  unsigned int v5; // eax@1
  unsigned int v6; // ST08_4@1
  unsigned int v7; // eax@1
  NiRefObjectVtbl *v8; // edi@1
  unsigned int v9; // ST08_4@1
  unsigned int v10; // eax@1
  char *v11; // eax@1
  signed int v12; // eax@3
  bool v13; // zf@3
  bool v14; // sf@3
  void *(__thiscall *v15)(NiRefObject *, unsigned int); // eax@3
  unsigned int v16; // edi@6
  void *(__thiscall *v17)(NiRefObject *, unsigned int); // eax@6
  bool v18; // bl@9
  signed int v19; // eax@12
  void *(__thiscall *v20)(NiRefObject *, unsigned int); // eax@12
  unsigned int v21; // edi@15
  void *(__thiscall *v22)(NiRefObject *, unsigned int); // eax@15
  NiRefObjectVtbl *v23; // edi@20
  unsigned int v24; // ST08_4@20
  unsigned int v25; // eax@20
  char *v26; // eax@20
  signed int v27; // eax@21
  void *(__thiscall *v28)(NiRefObject *, unsigned int); // edx@21
  unsigned int v29; // edi@24
  unsigned int v30; // eax@24
  void *(__thiscall *v31)(NiRefObject *, unsigned int); // edx@24
  NiRefObjectVtbl *v32; // edi@27
  unsigned int v33; // ST08_4@27
  unsigned int v34; // eax@27
  char *v35; // eax@27
  int bUseLP; // [sp+Ch] [bp-4h]@0

  v1 = this;
  v2 = User::HP(&g_kUser);
  v3 = User::MaxHP(&g_kUser);
  StatusWin::SetHP(v1, v3, v2);
  v4 = User::SP(&g_kUser);
  v5 = User::MaxSP(&g_kUser);
  StatusWin::SetSP(v1, v5, v4);
  v6 = User::LP(&g_kUser);
  v7 = User::MaxLP(&g_kUser);
  StatusWin::SetLP(v1, v7, v6);
  v8 = v1->m_pkHPText->vfptr;
  v9 = User::MaxHP(&g_kUser);
  v10 = User::HP(&g_kUser);
  v11 = fs("%d/%d", v10, v9);
  v8[118].__vecDelDtor((NiRefObject *)v1->m_pkHPText, (unsigned int)v11);
  LOBYTE(bUseLP) = 0;
  switch ( Char::GetClass(g_pkMainChar) )
  {
    case 0x1A:
    case 0x1B:
      LOBYTE(bUseLP) = 1;
      break;
    default:
      break;
  }
  v12 = User::HP(&g_kUser);
  v13 = v12 == 0;
  v14 = v12 < 0;
  v15 = v1->m_pkHPBarStart->vfptr[64].__vecDelDtor;
  if ( v14 || v13 )
    ((void (__stdcall *)(_DWORD))v15)(0);
  else
    ((void (__stdcall *)(signed int))v15)(1);
  v16 = User::HP(&g_kUser);
  v13 = v16 == User::MaxHP(&g_kUser);
  v17 = v1->m_pkHPBarEnd->vfptr[64].__vecDelDtor;
  if ( v13 )
    ((void (__stdcall *)(signed int))v17)(1);
  else
    ((void (__stdcall *)(_DWORD))v17)(0);
  ((void (__stdcall *)(int))v1->m_pkLPGauge_kr->vfptr[60].__vecDelDtor)(bUseLP);
  ((void (__stdcall *)(int))v1->m_pkLPGauge_kr->vfptr[64].__vecDelDtor)(bUseLP);
  ((void (__stdcall *)(int))v1->m_pkLPBarStart->vfptr[60].__vecDelDtor)(bUseLP);
  ((void (__stdcall *)(int))v1->m_pkLPBarStart->vfptr[64].__vecDelDtor)(bUseLP);
  ((void (__stdcall *)(int))v1->m_pkLPBarEnd->vfptr[60].__vecDelDtor)(bUseLP);
  ((void (__stdcall *)(int))v1->m_pkLPBarEnd->vfptr[64].__vecDelDtor)(bUseLP);
  v18 = (_BYTE)bUseLP == 0;
  ((void (__stdcall *)(bool))v1->m_pkSPGauge_kr->vfptr[60].__vecDelDtor)((_BYTE)bUseLP == 0);
  ((void (__stdcall *)(bool))v1->m_pkSPGauge_kr->vfptr[64].__vecDelDtor)((_BYTE)bUseLP == 0);
  ((void (__stdcall *)(bool))v1->m_pkSPBarStart->vfptr[60].__vecDelDtor)((_BYTE)bUseLP == 0);
  ((void (__stdcall *)(bool))v1->m_pkSPBarStart->vfptr[64].__vecDelDtor)((_BYTE)bUseLP == 0);
  ((void (__stdcall *)(bool))v1->m_pkSPBarEnd->vfptr[60].__vecDelDtor)((_BYTE)bUseLP == 0);
  ((void (__stdcall *)(bool))v1->m_pkSPBarEnd->vfptr[64].__vecDelDtor)((_BYTE)bUseLP == 0);
  ((void (__stdcall *)(bool))v1->m_pkSPStonBut->vfptr[60].__vecDelDtor)((_BYTE)bUseLP == 0);
  ((void (__stdcall *)(bool))v1->m_pkSPStonBut->vfptr[64].__vecDelDtor)((_BYTE)bUseLP == 0);
  if ( !v1->m_bUseLP )
  {
    ((void (__stdcall *)(bool))v1->m_pkSPCoolTimeGauge_kr->vfptr[60].__vecDelDtor)(v18);
    ((void (__stdcall *)(bool))v1->m_pkSPCoolTimeGauge_kr->vfptr[64].__vecDelDtor)(v18);
  }
  ((void (__stdcall *)(bool))v1->m_pkSPText->vfptr[60].__vecDelDtor)(v18);
  ((void (__stdcall *)(bool))v1->m_pkSPText->vfptr[64].__vecDelDtor)(v18);
  ((void (__stdcall *)(int))v1->m_pkLPText->vfptr[60].__vecDelDtor)(bUseLP);
  ((void (__stdcall *)(int))v1->m_pkLPText->vfptr[64].__vecDelDtor)(bUseLP);
  if ( (_BYTE)bUseLP )
  {
    v19 = User::LP(&g_kUser);
    v13 = v19 == 0;
    v14 = v19 < 0;
    v20 = v1->m_pkLPBarStart->vfptr[64].__vecDelDtor;
    if ( v14 || v13 )
      ((void (__stdcall *)(_DWORD))v20)(0);
    else
      ((void (__stdcall *)(signed int))v20)(1);
    v21 = User::LP(&g_kUser);
    v13 = v21 == User::MaxLP(&g_kUser);
    v22 = v1->m_pkLPBarEnd->vfptr[64].__vecDelDtor;
    if ( v13 )
      ((void (__stdcall *)(signed int))v22)(1);
    else
      ((void (__stdcall *)(_DWORD))v22)(0);
    if ( !v1->m_bUseLP )
    {
      ((void (__stdcall *)(bool))v1->m_pkSPSoulStoneText->vfptr[60].__vecDelDtor)(v18);
      ((void (__stdcall *)(bool))v1->m_pkSPSoulStoneText->vfptr[64].__vecDelDtor)(v18);
    }
    v23 = v1->m_pkLPText->vfptr;
    v24 = User::MaxLP(&g_kUser);
    v25 = User::LP(&g_kUser);
    v26 = fs("%d/%d", v25, v24);
    v23[118].__vecDelDtor((NiRefObject *)v1->m_pkLPText, (unsigned int)v26);
  }
  else
  {
    v27 = User::SP(&g_kUser);
    v28 = v1->m_pkSPBarStart->vfptr[64].__vecDelDtor;
    if ( v27 <= 0 )
      ((void (__stdcall *)(_DWORD))v28)(0);
    else
      ((void (__stdcall *)(signed int))v28)(1);
    v29 = User::SP(&g_kUser);
    v30 = User::MaxSP(&g_kUser);
    v31 = v1->m_pkSPBarEnd->vfptr[64].__vecDelDtor;
    if ( v29 == v30 )
      ((void (__stdcall *)(signed int))v31)(1);
    else
      ((void (__stdcall *)(_DWORD))v31)(0);
    v32 = v1->m_pkSPText->vfptr;
    v33 = User::MaxSP(&g_kUser);
    v34 = User::SP(&g_kUser);
    v35 = fs("%d/%d", v34, v33);
    v32[118].__vecDelDtor((NiRefObject *)v1->m_pkSPText, (unsigned int)v35);
  }
}

//----- (0059D490) --------------------------------------------------------
StatusWin *__cdecl StatusWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  StatusWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x288u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    StatusWin::StatusWin((StatusWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (StatusWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (0059D5C0) --------------------------------------------------------
void __thiscall PgWinCircleGauge::SetValue(PgWinCircleGauge *this, float fMaxVal, float fCurVal)
{
  double v3; // st6@1
  double v4; // st7@4
  float fCurVala; // [sp+Ch] [bp+Ch]@8

  v3 = fMaxVal;
  if ( fMaxVal < 0.0 )
    v3 = (float)0.0;
  if ( fCurVal >= 0.0 )
    v4 = fCurVal;
  else
    v4 = (float)0.0;
  if ( v3 != this->m_fMaxValue || v4 != this->m_fCurValue )
  {
    if ( v3 < v4 )
    {
      fCurVala = v3;
      v4 = fCurVala;
    }
    this->m_fMaxValue = v3;
    this->m_fCurValue = v4;
    PgWinCircleGauge::OnChangeValue(this);
  }
}

//----- (0059D650) --------------------------------------------------------
StatusWin *__thiscall StatusWin::`scalar deleting destructor'(StatusWin *this, unsigned int a2)
{
  StatusWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&StatusWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&StatusWin::`vftable'{for `IDirectMessenger'};
  this->m_pkPortrait = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A4620: using guessed type void (__thiscall *StatusWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A463C: using guessed type int (__thiscall *StatusWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0059D690) --------------------------------------------------------
void __thiscall StatusWin::SetHP(StatusWin *this, unsigned int uiMax, unsigned int uiCur)
{
  PgWinBar *v3; // ecx@1
  double v4; // st7@3
  float uiMaxa; // [sp+8h] [bp+8h]@1
  float uiCura; // [sp+Ch] [bp+Ch]@1

  v3 = this->m_pkHPGauge_kr;
  uiMaxa = (double)uiMax;
  uiCura = (double)uiCur;
  if ( uiMaxa != v3->m_fMaxValue || uiCura != v3->m_fCurValue )
  {
    v4 = uiCura;
    v3->m_fMaxValue = uiMaxa;
    v3->m_fCurValue = *(float *)&v4;
    PgWinBar::OnChangeValue(v3);
  }
}

//----- (0059D710) --------------------------------------------------------
void __thiscall StatusWin::SetSP(StatusWin *this, unsigned int uiMax, unsigned int uiCur)
{
  PgWinBar *v3; // ecx@1
  double v4; // st7@3
  float uiMaxa; // [sp+8h] [bp+8h]@1
  float uiCura; // [sp+Ch] [bp+Ch]@1

  v3 = this->m_pkSPGauge_kr;
  uiMaxa = (double)uiMax;
  uiCura = (double)uiCur;
  if ( uiMaxa != v3->m_fMaxValue || uiCura != v3->m_fCurValue )
  {
    v4 = uiCura;
    v3->m_fMaxValue = uiMaxa;
    v3->m_fCurValue = *(float *)&v4;
    PgWinBar::OnChangeValue(v3);
  }
}

//----- (0059D790) --------------------------------------------------------
void __thiscall StatusWin::SetLP(StatusWin *this, unsigned int uiMax, unsigned int uiCur)
{
  PgWinBar *v3; // ecx@1
  double v4; // st7@3
  float uiMaxa; // [sp+8h] [bp+8h]@1
  float uiCura; // [sp+Ch] [bp+Ch]@1

  v3 = this->m_pkLPGauge_kr;
  uiMaxa = (double)uiMax;
  uiCura = (double)uiCur;
  if ( uiMaxa != v3->m_fMaxValue || uiCura != v3->m_fCurValue )
  {
    v4 = uiCura;
    v3->m_fMaxValue = uiMaxa;
    v3->m_fCurValue = *(float *)&v4;
    PgWinBar::OnChangeValue(v3);
  }
}

//----- (0059D810) --------------------------------------------------------
void __thiscall StorageTabButWin::StorageTabButWin(StorageTabButWin *this)
{
  StorageTabButWin *v1; // esi@1

  v1 = this;
  PgWinBut::PgWinBut((PgWinBut *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&StorageTabButWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&StorageTabButWin::`vftable'{for `IDirectMessenger'};
  v1->m_bDroppable = 1;
}
// 9A4AE0: using guessed type void (__thiscall *StorageTabButWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A4AFC: using guessed type int (__thiscall *StorageTabButWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0059D840) --------------------------------------------------------
void __thiscall StorageTabButWin::~StorageTabButWin(StorageTabButWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&StorageTabButWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&StorageTabButWin::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
}
// 9A4AE0: using guessed type void (__thiscall *StorageTabButWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A4AFC: using guessed type int (__thiscall *StorageTabButWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0059D860) --------------------------------------------------------
bool __thiscall StorageTabButWin::Create(StorageTabButWin *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg)
{
  return PgWinBut::Create((PgWinBut *)&this->vfptr, iXPos, iYPos, pkSprData, pkParent, uiCmdMsg, 0, 0) != 0;
}

//----- (0059D890) --------------------------------------------------------
void __thiscall StorageInvWin::StorageInvWin(StorageInvWin *this)
{
  StorageInvWin *v1; // esi@1

  v1 = this;
  ItemIcon::ItemIcon((ItemIcon *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&StorageInvWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&StorageInvWin::`vftable'{for `IDirectMessenger'};
  v1->m_uiInvIndex = -1;
  ItemIcon::SetItem((ItemIcon *)&v1->vfptr, 0, 1);
}
// 9A4D34: using guessed type void (__thiscall *StorageInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A4D54: using guessed type int (__thiscall *StorageInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0059D900) --------------------------------------------------------
void __thiscall StorageInvWin::~StorageInvWin(StorageInvWin *this)
{
  StorageInvWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&StorageInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&StorageInvWin::`vftable'{for `IDirectMessenger'};
  Bank::RemoveExtraInv();
  ItemIcon::~ItemIcon((ItemIcon *)&v1->vfptr);
}
// 9A4D34: using guessed type void (__thiscall *StorageInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A4D54: using guessed type int (__thiscall *StorageInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0059D970) --------------------------------------------------------
char __thiscall StorageInvWin::Create(StorageInvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent)
{
  StorageInvWin *v5; // esi@1
  char result; // al@1

  v5 = this;
  result = ItemIcon::Create((ItemIcon *)&this->vfptr, iXPos, iYPos, pkParent);
  if ( result )
  {
    v5->m_uiInvIndex = uiInvIndex;
    result = 1;
  }
  return result;
}

//----- (0059D9B0) --------------------------------------------------------
void __thiscall StorageInvWin::OnFirstHitWin(StorageInvWin *this)
{
  StorageInvWin *v1; // esi@1
  ItemInfoWin *v2; // edi@2
  Item *v3; // eax@3

  v1 = this;
  if ( ItemIcon::GetItem((ItemIcon *)&this->vfptr) )
  {
    v2 = (ItemInfoWin *)v1->m_pkToolTipWin;
    if ( v2 )
    {
      v3 = ItemIcon::GetItem((ItemIcon *)&v1->vfptr);
      ItemInfoWin::SetItemInfo(v2, v3);
      PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
    }
  }
}

//----- (0059DA30) --------------------------------------------------------
void __stdcall StorageWin::OnDrawingMoneyWinOk(__int64 i64Money)
{
  PROTO_NC_ITEM_WITHDRAW_REQ kProto; // [sp+0h] [bp-8h]@1

  kProto.cen = i64Money;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x1Eu, &kProto, 8);
}

//----- (0059DA60) --------------------------------------------------------
void __stdcall StorageWin::OnDepositMoneyWinOk(__int64 i64Money)
{
  PROTO_NC_ITEM_DEPOSIT_REQ kProto; // [sp+0h] [bp-8h]@1

  kProto.cen = i64Money;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x1Cu, &kProto, 8);
}

//----- (0059DA90) --------------------------------------------------------
void __thiscall StorageWin::ResetContents(StorageWin *this)
{
  StorageWin *v1; // ebx@1
  ItemIcon **v2; // esi@1
  signed int v3; // edi@2
  unsigned int v4; // esi@4
  ItemIcon **v5; // edi@4
  Item *v6; // eax@5

  v1 = this;
  v2 = (ItemIcon **)this->m_apkInvWin;
  if ( this->m_apkInvWin[0] )
  {
    v3 = 36;
    do
    {
      ItemIcon::SetItem(*v2, 0, 1);
      ++v2;
      --v3;
    }
    while ( v3 );
    v4 = 0;
    v5 = (ItemIcon **)v1->m_apkInvWin;
    do
    {
      v6 = Bank::Get(v4 + 36 * v1->m_uiCurPage);
      ItemIcon::SetItem(*v5, v6, 1);
      ++v4;
      ++v5;
    }
    while ( v4 < 0x24 );
  }
}

//----- (0059DB00) --------------------------------------------------------
void StorageWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "NPCBank");
}

//----- (0059DB30) --------------------------------------------------------
char __thiscall StorageTabButWin::EatDropInstance(StorageTabButWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  PgCursor::ms_bKeepDrop = 1;
  ((void (*)(void))this->vfptr[132].__vecDelDtor)();
  return 1;
}
// B648B8: using guessed type bool PgCursor::ms_bKeepDrop;

//----- (0059DB50) --------------------------------------------------------
void __thiscall StorageWin::StorageWin(StorageWin *this)
{
  StorageWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&StorageWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&StorageWin::`vftable'{for `IDirectMessenger'};
  v1->m_kDrop.m_pkSender = 0;
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  v1->m_kDropContents.m_uiLot = 0;
  v1->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v1->m_kDropContents.m_kItemID = -1;
  v1->m_uiCurPage = 0;
  v1->m_pkTitleTextWin = 0;
  v1->m_pkMoneyWin = 0;
  v1->m_kDrop.m_pkContents = &v1->m_kDropContents;
  v1->m_apkInvWin[0] = 0;
  v1->m_apkInvWin[1] = 0;
  v1->m_apkInvWin[2] = 0;
  v1->m_apkInvWin[3] = 0;
  v1->m_apkInvWin[4] = 0;
  v1->m_apkInvWin[5] = 0;
  v1->m_apkInvWin[6] = 0;
  v1->m_apkInvWin[7] = 0;
  v1->m_apkInvWin[8] = 0;
  v1->m_apkInvWin[9] = 0;
  v1->m_apkInvWin[10] = 0;
  v1->m_apkInvWin[11] = 0;
  v1->m_apkInvWin[12] = 0;
  v1->m_apkInvWin[13] = 0;
  v1->m_apkInvWin[14] = 0;
  v1->m_apkInvWin[15] = 0;
  v1->m_apkInvWin[16] = 0;
  v1->m_apkInvWin[17] = 0;
  v1->m_apkInvWin[18] = 0;
  v1->m_apkInvWin[19] = 0;
  v1->m_apkInvWin[20] = 0;
  v1->m_apkInvWin[21] = 0;
  v1->m_apkInvWin[22] = 0;
  v1->m_apkInvWin[23] = 0;
  v1->m_apkInvWin[24] = 0;
  v1->m_apkInvWin[25] = 0;
  v1->m_apkInvWin[26] = 0;
  v1->m_apkInvWin[27] = 0;
  v1->m_apkInvWin[28] = 0;
  v1->m_apkInvWin[29] = 0;
  v1->m_apkInvWin[30] = 0;
  v1->m_apkInvWin[31] = 0;
  v1->m_apkInvWin[32] = 0;
  v1->m_apkInvWin[33] = 0;
  v1->m_apkInvWin[34] = 0;
  v1->m_apkInvWin[35] = 0;
  v1->m_pkCopperText = 0;
  v1->m_pkSilverText = 0;
  v1->m_pkGoldText = 0;
  v1->m_pkGemText = 0;
  v1->m_uiCurServerTab = 0;
  v1->m_pkServerNumText = 0;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9A4FC4: using guessed type void (__thiscall *StorageWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A4FE4: using guessed type int (__thiscall *StorageWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0059DCC0) --------------------------------------------------------
void __thiscall StorageWin::~StorageWin(StorageWin *this)
{
  StorageWin *v1; // esi@1
  MoneyWin *v2; // eax@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&StorageWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&StorageWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_pkMoneyWin;
  if ( v2 )
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
  v1->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9A4FC4: using guessed type void (__thiscall *StorageWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A4FE4: using guessed type int (__thiscall *StorageWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0059DD50) --------------------------------------------------------
void __thiscall StorageWin::ResetPage(StorageWin *this)
{
  this->m_uiCurPage = 0;
  this->m_uiCurServerTab = 0;
  StorageWin::ResetContents(this);
}

//----- (0059DD70) --------------------------------------------------------
void __thiscall StorageWin::OnOk(StorageWin *this)
{
  GameFrameWork::CloseStorageMenu((GameFrameWork *)this->m_pkFrameWork);
}

//----- (0059DD80) --------------------------------------------------------
void __thiscall StorageWin::OnCancel(StorageWin *this)
{
  GameFrameWork::CloseStorageMenu((GameFrameWork *)this->m_pkFrameWork);
}

//----- (0059DD90) --------------------------------------------------------
void __thiscall StorageWin::OnTab1(StorageWin *this)
{
  StorageWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_apkTabOnSpr[0]->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_apkTabOnSpr[1]->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_apkTabOnSpr[2]->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_apkTabOnSpr[3]->vfptr[64].__vecDelDtor)(0);
  v1->m_uiCurPage = 0;
  StorageWin::ResetContents(v1);
}

//----- (0059DDF0) --------------------------------------------------------
void __thiscall StorageWin::OnTab2(StorageWin *this)
{
  StorageWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_apkTabOnSpr[0]->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_apkTabOnSpr[1]->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_apkTabOnSpr[2]->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_apkTabOnSpr[3]->vfptr[64].__vecDelDtor)(0);
  v1->m_uiCurPage = 1;
  StorageWin::ResetContents(v1);
}

//----- (0059DE50) --------------------------------------------------------
void __thiscall StorageWin::OnTab3(StorageWin *this)
{
  StorageWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_apkTabOnSpr[0]->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_apkTabOnSpr[1]->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_apkTabOnSpr[2]->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_apkTabOnSpr[3]->vfptr[64].__vecDelDtor)(0);
  v1->m_uiCurPage = 2;
  StorageWin::ResetContents(v1);
}

//----- (0059DEB0) --------------------------------------------------------
void __thiscall StorageWin::OnTab4(StorageWin *this)
{
  StorageWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_apkTabOnSpr[0]->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_apkTabOnSpr[1]->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_apkTabOnSpr[2]->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_apkTabOnSpr[3]->vfptr[64].__vecDelDtor)(1);
  v1->m_uiCurPage = 3;
  StorageWin::ResetContents(v1);
}

//----- (0059DF20) --------------------------------------------------------
void __thiscall StorageInvWin::DoAction(StorageInvWin *this)
{
  StorageInvWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiInvIndex);
}

//----- (0059DF50) --------------------------------------------------------
void __thiscall StorageInvWin::DoRAction(StorageInvWin *this)
{
  StorageInvWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiRCmdMsg, v1->m_uiInvIndex);
}

//----- (0059DF80) --------------------------------------------------------
void __thiscall StorageWin::RefreshPage(StorageWin *this, char byTargetPage)
{
  StorageWin *v2; // esi@1
  int v3; // eax@5

  v2 = this;
  if ( !(unsigned __int8)((int (*)(void))this->vfptr[65].__vecDelDtor)() )
  {
    v2->m_uiCurPage = 0;
    v2->m_uiCurServerTab = 0;
LABEL_3:
    StorageWin::ResetContents(v2);
    return;
  }
  if ( (unsigned __int8)byTargetPage < 4u )
    goto LABEL_3;
  v3 = byTargetPage & 3;
  if ( v3 < 0 )
    v3 = (((_BYTE)v3 - 1) | 0xFFFFFFFC) + 1;
  switch ( v3 )
  {
    case 0:
      StorageWin::OnTab1(v2);
      break;
    case 1:
      StorageWin::OnTab2(v2);
      break;
    case 2:
      StorageWin::OnTab3(v2);
      break;
    case 3:
      StorageWin::OnTab4(v2);
      break;
    default:
      return;
  }
}

//----- (0059E010) --------------------------------------------------------
void __thiscall StorageWin::OnInvShiftLClick(StorageWin *this, unsigned int uiInvIndex)
{
  StorageWin *v2; // esi@1
  Item *v3; // edi@1
  GameFrameWork *v4; // ebx@3
  char *v5; // ST0C_4@3
  int v6; // eax@3

  v2 = this;
  v3 = ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[uiInvIndex]->vfptr);
  if ( v3 )
  {
    if ( (unsigned int)((int (__thiscall *)(_DWORD))v3->vfptr[3].__vecDelDtor)(v3) > 1 )
    {
      StorageWin::ms_kFrom.Inven = StorageWin::ms_kFrom.Inven & 0x3FF | 0x1800;
      StorageWin::ms_kFrom.Inven ^= (StorageWin::ms_kFrom.Inven ^ (uiInvIndex
                                                                 + 36
                                                                 * (LOWORD(v2->m_uiCurPage)
                                                                  + 4 * LOWORD(v2->m_uiCurServerTab)))) & 0x3FF;
      v4 = (GameFrameWork *)v2->m_pkFrameWork;
      v5 = (char *)TextData::Get(0xFBF1412E);
      v6 = ((int (__thiscall *)(_DWORD))v3->vfptr[3].__vecDelDtor)(v3);
      GameFrameWork::OnOpenDivideWin(v4, (PgWin *)&v2->vfptr, 0x19u, v6 - 1, v5, 2u);
    }
  }
}
// A8E0EC: using guessed type union ITEM_INVEN StorageWin::ms_kFrom;

//----- (0059E0D0) --------------------------------------------------------
void __thiscall StorageWin::OnInvRClick(StorageWin *this, unsigned int uiInvIndex)
{
  StorageWin *v2; // edi@1
  Item *v3; // eax@1
  int v4; // ebx@3
  int v5; // esi@3
  unsigned int v6; // eax@6
  NiUnsharedGeometryGroup *v7; // eax@7
  __int16 v8; // cx@8
  Item *pkItem; // [sp+4h] [bp-Ch]@1
  ITEM_INVEN kTo; // [sp+8h] [bp-8h]@8
  ITEM_INVEN kFrom; // [sp+Ch] [bp-4h]@8

  v2 = this;
  v3 = ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[uiInvIndex]->vfptr);
  pkItem = v3;
  if ( v3 )
  {
    if ( !PgCursor::ms_pkDrop )
    {
      v4 = v3->m_kStruct.itemid;
      v5 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v4) )
      {
        if ( (unsigned __int16)v4 <= *(_WORD *)(v5 + 200) && *(_DWORD *)(*(_DWORD *)(v5 + 196) + 4 * v4) )
        {
          v6 = Inventory::GetInvIdxLotIsNotMax(&g_kInventory, pkItem);
          if ( v6 == -1 )
          {
            v7 = TextData::Get(0x91A8CDCE);
            GameFrameWork::AddSysMsg((GameFrameWork *)v2->m_pkFrameWork, (const char *)v7);
          }
          else
          {
            v8 = (uiInvIndex + 36 * (LOWORD(v2->m_uiCurPage) + 4 * LOWORD(v2->m_uiCurServerTab))) & 0x3FF;
            kTo.Inven = v6 & 0x3FF | 0x2400;
            kFrom.Inven = v8 | 0x1800;
            if ( (kTo.Inven & 0x3FF) != -1 )
            {
              GameFrameWork::NcItemRelocReq((GameFrameWork *)v2->m_pkFrameWork, &kFrom, &kTo);
              SoundMgr::PlayItemPutSound(pkItem->m_kStruct.itemid);
            }
          }
        }
      }
    }
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (0059E200) --------------------------------------------------------
void __thiscall StorageWin::OnDeposit(StorageWin *this)
{
  StorageWin *v1; // esi@1
  MoneyWin *v2; // ecx@1
  char *v3; // eax@2
  char *v4; // eax@2

  v1 = this;
  v2 = this->m_pkMoneyWin;
  if ( v2 )
  {
    MoneyWin::Open(v2, (PgWin *)&v1->vfptr, 0x16u, 0, &byte_9A4877);
    v3 = (char *)TextData::Get(0x2CB89180u);
    MoneyWin::SetTitle1(v1->m_pkMoneyWin, v3);
    v4 = (char *)TextData::Get(0x382C423Du);
    MoneyWin::SetTitle2(v1->m_pkMoneyWin, v4);
  }
}

//----- (0059E250) --------------------------------------------------------
void __thiscall StorageWin::OnDrawing(StorageWin *this)
{
  StorageWin *v1; // esi@1
  MoneyWin *v2; // ecx@1
  char *v3; // eax@2
  char *v4; // eax@2

  v1 = this;
  v2 = this->m_pkMoneyWin;
  if ( v2 )
  {
    MoneyWin::Open(v2, (PgWin *)&v1->vfptr, 0x17u, 0, &byte_9A4883);
    v3 = (char *)TextData::Get(0x89B68F88);
    MoneyWin::SetTitle1(v1->m_pkMoneyWin, v3);
    v4 = (char *)TextData::Get(0xD5F0EF45);
    MoneyWin::SetTitle2(v1->m_pkMoneyWin, v4);
  }
}

//----- (0059E2A0) --------------------------------------------------------
char __thiscall StorageWin::DropOnInv(StorageWin *this, DropContents *pkContents, unsigned int uiReceiverInvIndex)
{
  DropContents::SenderType v3; // edx@1
  StorageWin *v4; // edi@1
  char *v5; // esi@2
  NiUnsharedGeometryGroup *v6; // ebx@2
  unsigned int v8; // esi@9
  __int16 v9; // bx@9
  unsigned __int16 v10; // bx@10
  PgFrameWork *v11; // eax@12
  DivideWin *v12; // ecx@12
  InventoryWin *v13; // eax@15
  InvWin *v14; // eax@16
  ItemIcon *v15; // ecx@17
  Item *v16; // eax@19
  __int16 v17; // dx@19
  __int16 v18; // ax@24
  Item *v19; // ebx@25
  ItemInfo *v20; // eax@26
  E_BelongType v21; // ST10_4@27
  GameFrameWork *v22; // edi@30
  NiUnsharedGeometryGroup *v23; // eax@30
  SHINE_PUT_ON_BELONGED_ITEM v24; // eax@31
  _DWORD *v25; // eax@35
  int v26; // eax@36
  Item *v27; // esi@40
  Item *v28; // eax@43
  unsigned int v29; // [sp-4h] [bp-24h]@29
  DivideWin *pkDivideWin; // [sp+Ch] [bp-14h]@12
  DropContents::SenderType eSenderType; // [sp+10h] [bp-10h]@1
  Item *pkTargetItem; // [sp+14h] [bp-Ch]@19
  ITEM_INVEN kTo; // [sp+18h] [bp-8h]@24
  ITEM_INVEN kFrom; // [sp+1Ch] [bp-4h]@9
  ItemInfo *pkInfo; // [sp+28h] [bp+8h]@26

  v3 = pkContents->m_eSenderType;
  v4 = this;
  eSenderType = v3;
  if ( v3 == 21 )
  {
    v5 = (char *)&this->vfptr;
    v6 = TextData2::Get(0x91F6E0D8);
    if ( v4->m_pkMsgHooker )
    {
      ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v4->m_pkMsgHooker->vfptr->SendDirectMessage)(
        25,
        v6,
        &v4->vfptr);
      if ( v4->m_pkMsgHooker )
        ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v4->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          25,
          v6,
          &v4->vfptr);
    }
    (*(void (__thiscall **)(IDirectMessengerVtbl **, signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))(*(_DWORD *)v5 + 20))(
      &v4->vfptr,
      25,
      v6,
      &v4->vfptr);
    return 0;
  }
  if ( v3 && v3 != 6 )
    return 0;
  v8 = pkContents->m_uiSenderIndex;
  v9 = kFrom.Inven & 0x3FF;
  if ( v3 )
    v10 = v9 | 0x1800;
  else
    v10 = v9 | 0x2400;
  v11 = this->m_pkFrameWork;
  kFrom.Inven = v10;
  v12 = (DivideWin *)v11[20].m_kMsgQ.m_uiHead;
  pkDivideWin = v12;
  if ( !v12 || !v12->m_uiResultValue )
    goto LABEL_24;
  if ( (kFrom.Inven & 0xFC00) != 9216 )
  {
    v15 = (ItemIcon *)&v4->m_apkInvWin[v8 % 0x24]->vfptr;
LABEL_19:
    v16 = ItemIcon::GetItem(v15);
    pkTargetItem = v16;
    v17 = (kFrom.Inven ^ v8) & 0x3FF;
    v10 = v17 ^ kFrom.Inven;
    kFrom.Inven ^= v17;
    if ( v16 )
    {
      if ( (unsigned int)((int (__thiscall *)(Item *))v16->vfptr[3].__vecDelDtor)(v16) > 1 )
      {
        LOWORD(uiReceiverInvIndex) = (uiReceiverInvIndex
                                    + 36 * (LOWORD(v4->m_uiCurPage) + 4 * LOWORD(v4->m_uiCurServerTab))) & 0x3FF | 0x1800;
        GameFrameWork::NcItemSplitReq(
          (GameFrameWork *)v4->m_pkFrameWork,
          &kFrom,
          (ITEM_INVEN *)&uiReceiverInvIndex,
          pkDivideWin->m_uiResultValue);
        SoundMgr::PlayItemPutSound(pkTargetItem->m_kStruct.itemid);
        return 1;
      }
      v10 = kFrom.Inven;
    }
    goto LABEL_23;
  }
  v13 = (InventoryWin *)v11[19].m_BackFrameID;
  if ( !v13 )
    goto LABEL_24;
  v14 = InventoryWin::GetInvWin(v13, v8);
  if ( v14 )
  {
    v15 = (ItemIcon *)v14;
    goto LABEL_19;
  }
LABEL_23:
  v3 = eSenderType;
LABEL_24:
  v18 = LOWORD(v4->m_uiCurPage) + 4 * LOWORD(v4->m_uiCurServerTab);
  kFrom.Inven = (kFrom.Inven ^ v8) & 0x3FF ^ v10;
  kTo.Inven = (uiReceiverInvIndex + 36 * v18) & 0x3FF | 0x1800;
  if ( v3 )
  {
    if ( v3 == 6 )
    {
      v28 = ItemIcon::GetItem((ItemIcon *)&v4->m_apkInvWin[v8 % 0x24]->vfptr);
      if ( v28 )
        SoundMgr::PlayItemPutSound(v28->m_kStruct.itemid);
    }
  }
  else
  {
    v19 = (Item *)pkContents->m_apvParam[0];
    if ( v19 )
    {
      v20 = v19->m_pkInfo;
      pkInfo = v20;
      if ( v20 )
      {
        v21 = v20->BT_Inx;
        uiReceiverInvIndex = 0;
        if ( CItemAuthorityBase::IA_IsDataChrBelonged(&g_kItemAuthority, v21) )
        {
          if ( Item::GetPutOnBelongState(v19) == 1 )
          {
LABEL_29:
            v29 = -857857511;
LABEL_30:
            v22 = (GameFrameWork *)v4->m_pkFrameWork;
            v23 = TextData::Get(v29);
            GameFrameWork::AddSysMsg(v22, (const char *)v23);
            return 0;
          }
        }
        else
        {
          v24 = Item::GetPutOnBelongState(v19);
          if ( !CItemAuthorityBase::IA_CanInvenReloc(
                  &g_kItemAuthority,
                  pkInfo->BT_Inx,
                  v24,
                  kFrom.Inven >> 10,
                  kTo.Inven >> 10,
                  (E_RELOC_ERR *)&uiReceiverInvIndex) )
          {
            if ( Item::GetPutOnBelongState(v19) == 1 )
              goto LABEL_29;
            if ( !uiReceiverInvIndex )
            {
              v29 = -2102363671;
              goto LABEL_30;
            }
          }
        }
      }
      v25 = (_DWORD *)((int (__thiscall *)(Item *))v19->vfptr[11].__vecDelDtor)(v19);
      if ( v25 )
      {
        v26 = *v25 & 0xFF;
        if ( v26 )
        {
          if ( v26 != 255 )
          {
            v29 = -1634432127;
            goto LABEL_30;
          }
        }
      }
    }
    if ( v8 < 0xC0 )
    {
      v27 = g_kInventory.m_aspInv[v8].m_pObject;
      if ( v27 )
        SoundMgr::PlayItemPutSound(v27->m_kStruct.itemid);
    }
  }
  if ( !((*(_DWORD *)&kFrom.Inven ^ *(_DWORD *)&kTo.Inven) & 0xFC00)
    && !((*(_DWORD *)&kFrom.Inven ^ *(_DWORD *)&kTo.Inven) & 0x3FF) )
  {
    return 0;
  }
  GameFrameWork::NcItemRelocReq((GameFrameWork *)v4->m_pkFrameWork, &kFrom, &kTo);
  return 1;
}

//----- (0059E640) --------------------------------------------------------
void __thiscall StorageWin::UpdateMeWin(StorageWin *this, float fCurTime)
{
  StorageWin *v2; // ebx@1
  __int64 v3; // rax@1
  __int64 v4; // rax@1
  __int64 v5; // rax@1
  __int64 v6; // rax@1
  __int64 v7; // rax@1
  __int64 v8; // rax@1
  __int64 v9; // rax@1
  __int64 v10; // rax@1
  signed int v11; // edi@1
  int *v12; // eax@1
  PgWin **v13; // esi@3
  void *(__thiscall *v14)(NiRefObject *, unsigned int); // edx@4
  char *v15; // eax@8
  int v16; // [sp+Ch] [bp-94h]@1
  unsigned int dwValue; // [sp+10h] [bp-90h]@1
  int iUsing; // [sp+14h] [bp-8Ch]@1
  int nMaxPage; // [sp+18h] [bp-88h]@1
  char acStr[128]; // [sp+1Ch] [bp-84h]@1

  v2 = this;
  v3 = Bank::GetMoney();
  v4 = User::GetGem(v3);
  sprintf(acStr, "%I64d", v4);
  ((void (__stdcall *)(char *))v2->m_pkGemText->vfptr[118].__vecDelDtor)(acStr);
  v5 = Bank::GetMoney();
  v6 = User::GetGold(v5);
  sprintf(acStr, "%I64d", v6);
  ((void (__stdcall *)(char *))v2->m_pkGoldText->vfptr[118].__vecDelDtor)(acStr);
  v7 = Bank::GetMoney();
  v8 = User::GetSilver(v7);
  sprintf(acStr, "%I64d", v8);
  ((void (__stdcall *)(char *))v2->m_pkSilverText->vfptr[118].__vecDelDtor)(acStr);
  v9 = Bank::GetMoney();
  v10 = User::GetCopper(v9);
  sprintf(acStr, "%I64d", v10);
  ((void (__stdcall *)(char *))v2->m_pkCopperText->vfptr[118].__vecDelDtor)(acStr);
  ChargedItemList::GetTotalEffectingValue(EE_MORESTORAGE, &dwValue);
  iUsing = dwValue - 4 * v2->m_uiCurServerTab + 2;
  v11 = 0;
  nMaxPage = Bank::GetMaxPage() - 4 * v2->m_uiCurServerTab;
  v16 = 0;
  v12 = &v16;
  if ( nMaxPage >= 0 )
    v12 = &nMaxPage;
  nMaxPage = *v12;
  v13 = (PgWin **)v2->m_apkTabBtn;
  do
  {
    ((void (__stdcall *)(_DWORD))v13[8]->vfptr[64].__vecDelDtor)(v11 >= iUsing);
    v14 = (*v13)->vfptr[64].__vecDelDtor;
    if ( nMaxPage > v11 )
    {
      ((void (__stdcall *)(signed int))v14)(1);
    }
    else
    {
      ((void (__stdcall *)(_DWORD))v14)(0);
      ((void (__stdcall *)(_DWORD))v13[8]->vfptr[64].__vecDelDtor)(0);
    }
    if ( v11 < iUsing )
    {
      if ( v11 == v2->m_uiCurPage )
      {
        if ( v11 < 2 )
          v15 = (char *)TextData::Get(0x4142947Cu);
        else
          v15 = (char *)TextData::Get(0x32537F78u);
      }
      else if ( v11 < 2 )
      {
        v15 = (char *)TextData::Get(0xE4F8E933);
      }
      else
      {
        v15 = (char *)TextData::Get(0xE0E9FA1E);
      }
    }
    else
    {
      v15 = (char *)TextData::Get(0xE3F5403A);
    }
    PgWin::SetToolTipWinText(*v13, v15);
    ++v11;
    ++v13;
  }
  while ( v11 < 4 );
}

//----- (0059E860) --------------------------------------------------------
char __thiscall StorageInvWin::EatDropInstance(StorageInvWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  StorageInvWin *v4; // edi@1
  char result; // al@2
  DropContents *v6; // esi@3
  StorageWin *v7; // eax@5

  v4 = this;
  if ( *pkDrop )
  {
    v6 = (DropContents *)(*pkDrop)->m_pkContents;
    if ( v6 )
    {
      v7 = (StorageWin *)PgWin::GetParentWin((PgWin *)&this->vfptr);
      result = StorageWin::DropOnInv(v7, v6, v4->m_uiInvIndex);
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0059E8A0) --------------------------------------------------------
void __thiscall StorageWin::OnInvLClick(StorageWin *this, unsigned int uiInvIndex)
{
  StorageWin *v2; // esi@1
  Item *v3; // eax@3
  Item *v4; // edi@3
  int v5; // edx@4

  v2 = this;
  if ( g_pkKeyboard->m_aucKeystate[5] & 4 )
  {
    StorageWin::OnInvShiftLClick(this, uiInvIndex);
  }
  else
  {
    v3 = ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[uiInvIndex]->vfptr);
    v4 = v3;
    if ( v3 )
    {
      v5 = 9 * (v2->m_uiCurPage + 4 * v2->m_uiCurServerTab);
      v2->m_kDropContents.m_eType = 0;
      v2->m_kDropContents.m_eSenderType = 6;
      v2->m_kDropContents.m_apvParam[1] = 0;
      v2->m_kDropContents.m_apvParam[0] = v3;
      v2->m_kDropContents.m_uiSenderIndex = uiInvIndex + 4 * v5;
      v2->m_kDropContents.m_uiLot = ((int (__thiscall *)(_DWORD))v3->vfptr[3].__vecDelDtor)(v3);
      v2->m_kDrop.m_pkSender = (PgWin *)v2;
      PgCursor::ms_pkDrop = &v2->m_kDrop;
      SoundMgr::PlayItemPutSound(v4->m_kStruct.itemid);
    }
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (0059E950) --------------------------------------------------------
void __thiscall StorageWin::OnCommand(StorageWin *this, unsigned int wParam, int lParam)
{
  StorageWin *v3; // esi@1
  char v4; // di@6
  Item *v5; // eax@27
  int v6; // ecx@28

  v3 = this;
  switch ( wParam )
  {
    case 0xAu:
      StorageWin::OnInvLClick(this, lParam);
      return;
    case 0xBu:
      StorageWin::OnInvRClick(this, lParam);
      return;
    case 0xEu:
    case 0xFu:
      GameFrameWork::CloseStorageMenu((GameFrameWork *)this->m_pkFrameWork);
      return;
    case 0x10u:
      if ( this->m_uiCurServerTab )
      {
        v4 = 4 * LOBYTE(this->m_uiCurServerTab);
        if ( !Bank::IsPageDataExist(4 * LOBYTE(this->m_uiCurServerTab)) )
          goto LABEL_21;
        this = v3;
      }
      StorageWin::OnTab1(this);
      return;
    case 0x11u:
      if ( this->m_uiCurServerTab )
      {
        v4 = 4 * LOBYTE(this->m_uiCurServerTab) + 1;
        if ( !Bank::IsPageDataExist(v4) )
          goto LABEL_21;
        this = v3;
      }
      StorageWin::OnTab2(this);
      return;
    case 0x12u:
      if ( this->m_uiCurServerTab )
      {
        v4 = 4 * LOBYTE(this->m_uiCurServerTab) + 2;
        if ( !Bank::IsPageDataExist(v4) )
          goto LABEL_21;
        this = v3;
      }
      StorageWin::OnTab3(this);
      return;
    case 0x13u:
      if ( !this->m_uiCurServerTab )
        goto LABEL_20;
      v4 = 4 * LOBYTE(this->m_uiCurServerTab) + 3;
      if ( Bank::IsPageDataExist(v4) )
      {
        this = v3;
LABEL_20:
        StorageWin::OnTab4(this);
      }
      else
      {
LABEL_21:
        GameFrameWork::NcItemOpenStoragePageReq((GameFrameWork *)v3->m_pkFrameWork, v4);
      }
      break;
    case 0x14u:
      StorageWin::OnDeposit(this);
      break;
    case 0x15u:
      StorageWin::OnDrawing(this);
      break;
    case 0x16u:
      StorageWin::OnDepositMoneyWinOk(*(_QWORD *)lParam);
      break;
    case 0x17u:
      StorageWin::OnDrawingMoneyWinOk(*(_QWORD *)lParam);
      break;
    case 0x19u:
      if ( lParam )
      {
        v5 = ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[(StorageWin::ms_kFrom.Inven & 0x3FF) % 36]->vfptr);
        if ( v5 )
        {
          v3->m_kDropContents.m_eSenderType = 6;
          v3->m_kDropContents.m_eType = 0;
          v6 = StorageWin::ms_kFrom.Inven & 0x3FF;
          v3->m_kDropContents.m_apvParam[0] = v5;
          v3->m_kDropContents.m_uiSenderIndex = v6;
          v3->m_kDropContents.m_apvParam[1] = 0;
          ((void (__thiscall *)(_DWORD))v5->vfptr[3].__vecDelDtor)(v5);
          v3->m_kDropContents.m_uiLot = lParam;
          v3->m_kDrop.m_pkSender = (PgWin *)v3;
          PgCursor::ms_pkDrop = &v3->m_kDrop;
        }
      }
      break;
    default:
      return;
    case 0x1Au:
      StorageWin::OnHelpLink();
      break;
  }
}
// A8E0EC: using guessed type union ITEM_INVEN StorageWin::ms_kFrom;
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (0059EBA0) --------------------------------------------------------
StorageTabButWin *__cdecl StorageTabButWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg)
{
  PgWin *v5; // eax@1
  PgWin *v6; // esi@1
  PgWin *v7; // edi@8
  StorageTabButWin *v8; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v10; // [sp+20h] [bp-4h]@1

  v5 = (PgWin *)operator new(0x144u);
  v6 = v5;
  result.m_pObject = v5;
  v10 = 0;
  if ( v5 )
  {
    PgWinBut::PgWinBut((PgWinBut *)v5);
    v6->vfptr = (NiRefObjectVtbl *)&StorageTabButWin::`vftable'{for `NiNode'};
    v6->vfptr = (IDirectMessengerVtbl *)&StorageTabButWin::`vftable'{for `IDirectMessenger'};
    v6->m_bDroppable = 1;
  }
  else
  {
    v6 = 0;
  }
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v10 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v6);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgSprData *, PgWin *, unsigned int))v6->vfptr[140].__vecDelDtor)(
                          v6,
                          iXPos,
                          iYPos,
                          pkSprData,
                          pkParent,
                          uiCmdMsg) )
  {
    ((void (__thiscall *)(PgWin *))v6->vfptr[89].__vecDelDtor)(v6);
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = (StorageTabButWin *)v6;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v6);
    if ( result.m_pObject )
    {
      v7 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      }
    }
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = 0;
  }
  return v8;
}
// 9A4AE0: using guessed type void (__thiscall *StorageTabButWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A4AFC: using guessed type int (__thiscall *StorageTabButWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0059ED00) --------------------------------------------------------
StorageInvWin *__cdecl StorageInvWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent)
{
  PgWin *v4; // eax@1
  ItemIcon *v5; // esi@1
  PgWin *v6; // edi@8
  StorageInvWin *v7; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v4 = (PgWin *)operator new(0x1C4u);
  v5 = (ItemIcon *)v4;
  result.m_pObject = v4;
  v9 = 0;
  if ( v4 )
  {
    ItemIcon::ItemIcon((ItemIcon *)v4);
    LOBYTE(v9) = 1;
    v5->vfptr = (NiRefObjectVtbl *)&StorageInvWin::`vftable'{for `NiNode'};
    v5->vfptr = (IDirectMessengerVtbl *)&StorageInvWin::`vftable'{for `IDirectMessenger'};
    v5[1].vfptr = (NiRefObjectVtbl *)-1;
    ItemIcon::SetItem(v5, 0, 1);
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v9 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, (PgWin *)&v5->vfptr);
  if ( (unsigned __int8)((int (__thiscall *)(ItemIcon *, int, int, unsigned int, PgWin *))v5->vfptr[154].__vecDelDtor)(
                          v5,
                          iXPos,
                          iYPos,
                          uiInvIndex,
                          pkParent) )
  {
    ((void (__thiscall *)(ItemIcon *))v5->vfptr[89].__vecDelDtor)(v5);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = (StorageInvWin *)v5;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, (PgWin *)&v5->vfptr);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = 0;
  }
  return v7;
}
// 9A4D34: using guessed type void (__thiscall *StorageInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A4D54: using guessed type int (__thiscall *StorageInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0059EE60) --------------------------------------------------------
StorageWin *__cdecl StorageWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  StorageWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x2A0u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    StorageWin::StorageWin((StorageWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (StorageWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (0059EF90) --------------------------------------------------------
char __thiscall StorageWin::Create(StorageWin *this, PgFrameWork *pkFrameWork)
{
  StorageWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  char result; // al@6
  const char *v6; // eax@9
  PgSprData *v7; // eax@10
  int v8; // edi@11
  int v9; // ebx@11
  NiSourceTexture *v10; // eax@11
  PgSprData *v11; // eax@12
  PgSprData *v12; // eax@16
  PgWinSpr *v13; // eax@16
  PgSprData *v14; // eax@16
  PgFont *v15; // eax@18
  PgWinText *v16; // eax@18
  NiRefObjectVtbl *v17; // edx@18
  NiUnsharedGeometryGroup *v18; // eax@18
  PgSprData *v19; // eax@18
  PgSprData *v20; // eax@19
  NiRefObjectVtbl *v21; // eax@19
  IconWin **v22; // ecx@19
  PgSprData *v23; // eax@20
  StorageTabButWin *v24; // eax@20
  NiSourceTexture *v25; // edx@20
  PgSprData *v26; // eax@20
  PgWinSpr *v27; // eax@20
  PgSprData *v28; // eax@20
  PgWinSpr *v29; // eax@20
  PgSprData *v30; // eax@20
  PgWinSpr *v31; // eax@20
  PgSprData *v32; // eax@20
  StorageTabButWin *v33; // eax@20
  NiSourceTexture *v34; // edx@20
  PgSprData *v35; // eax@20
  PgWinSpr *v36; // eax@20
  PgSprData *v37; // eax@20
  PgWinSpr *v38; // eax@20
  PgSprData *v39; // eax@20
  PgWinSpr *v40; // eax@20
  PgSprData *v41; // eax@20
  StorageTabButWin *v42; // eax@20
  NiSourceTexture *v43; // edx@20
  PgSprData *v44; // eax@20
  PgWinSpr *v45; // eax@20
  PgSprData *v46; // eax@20
  PgWinSpr *v47; // eax@20
  PgSprData *v48; // eax@20
  PgWinSpr *v49; // eax@20
  PgSprData *v50; // eax@20
  StorageTabButWin *v51; // eax@20
  NiSourceTexture *v52; // edx@20
  PgSprData *v53; // eax@20
  PgWinSpr *v54; // eax@20
  PgSprData *v55; // eax@20
  PgWinSpr *v56; // eax@20
  PgSprData *v57; // eax@20
  PgWinSpr *v58; // eax@20
  PgWinText *v59; // STB8_4@20
  PgFont *v60; // STB4_4@20
  unsigned int v61; // STB0_4@20
  unsigned int v62; // eax@20
  PgWinText *v63; // eax@20
  NiRefObjectVtbl *v64; // edx@20
  NiUnsharedGeometryGroup *v65; // eax@20
  PgWinText *v66; // STB8_4@20
  PgFont *v67; // STB4_4@20
  unsigned int v68; // STB0_4@20
  unsigned int v69; // eax@20
  PgWinText *v70; // eax@20
  NiRefObjectVtbl *v71; // edx@20
  NiUnsharedGeometryGroup *v72; // eax@20
  PgSprData *v73; // eax@20
  PgWinText *v74; // STB8_4@20
  PgFont *v75; // STB4_4@20
  unsigned int v76; // STB0_4@20
  unsigned int v77; // eax@20
  PgWinText *v78; // eax@20
  NiRefObjectVtbl *v79; // edx@20
  NiSourceTexture *v80; // STC0_4@20
  NiNode *v81; // edx@20
  PgSprData *v82; // eax@20
  PgWinText *v83; // STB8_4@20
  PgFont *v84; // STB4_4@20
  unsigned int v85; // STB0_4@20
  unsigned int v86; // eax@20
  PgWinText *v87; // eax@20
  NiRefObjectVtbl *v88; // edx@20
  NiSourceTexture *v89; // STC0_4@20
  NiNode *v90; // edx@20
  PgSprData *v91; // eax@20
  PgWinText *v92; // STB8_4@20
  PgFont *v93; // STB4_4@20
  unsigned int v94; // STB0_4@20
  unsigned int v95; // eax@20
  PgWinText *v96; // eax@20
  NiRefObjectVtbl *v97; // edx@20
  NiSourceTexture *v98; // STC0_4@20
  NiNode *v99; // edx@20
  PgSprData *v100; // eax@20
  PgWinText *v101; // STB8_4@20
  PgFont *v102; // STB4_4@20
  unsigned int v103; // STB0_4@20
  unsigned int v104; // eax@20
  PgWinText *v105; // eax@20
  NiRefObjectVtbl *v106; // edx@20
  NiSourceTexture *v107; // STC0_4@20
  NiNode *v108; // edx@20
  NiNode *v109; // esi@21
  unsigned int uiHeight; // [sp+D4h] [bp-5Ch]@16
  unsigned int uiWidth; // [sp+D8h] [bp-58h]@16
  PgFrameWork *v112; // [sp+DCh] [bp-54h]@1
  NiRefObjectVtbl *v113; // [sp+E0h] [bp-50h]@19
  int i; // [sp+E4h] [bp-4Ch]@7
  NiSourceTexture *pkTexture; // [sp+E8h] [bp-48h]@1
  NiPointer<NiNode> spNode; // [sp+ECh] [bp-44h]@1
  int uiTop; // [sp+F0h] [bp-40h]@10
  int uiLeft; // [sp+F4h] [bp-3Ch]@10
  PgWinText *pkTextWin; // [sp+F8h] [bp-38h]@14
  char acShapeName[33]; // [sp+FCh] [bp-34h]@19
  int v121; // [sp+12Ch] [bp-4h]@1

  v2 = this;
  v112 = pkFrameWork;
  spNode.m_pObject = 0;
  v121 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  pkTexture = v3;
  if ( !v3 )
    goto LABEL_27;
  i = (int)pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = Folder::Merge(&Folder::m_acMenu, "Game\\NPCBank.nif");
  PgUtil::LoadNodeNifFile(v6, &spNode, (NiTexturePalette *)i);
  if ( !spNode.m_pObject )
    return 0;
  v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v7, 0, pkFrameWork, "NPCBankWin", 0) )
  {
LABEL_27:
    v4 = spNode.m_pObject;
    v121 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
    return 0;
  }
  v8 = uiLeft;
  v9 = uiTop;
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v11, (PgWin *)&v2->vfptr, 0, 0);
  pkTextWin = (PgWinText *)PgSprData::Create(
                             (NiAVObject *)&spNode.m_pObject->vfptr,
                             "ClsNor",
                             &uiLeft,
                             &uiTop,
                             pkTexture);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xFu, 0, 0);
  i = (int)MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "HelpLinkNor",
                               &uiLeft,
                               &uiTop,
                               (NiSourceTexture *)i);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x1Au, 0, 0);
  }
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
  v13 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, pkTexture);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v14, (PgWin *)&v2->vfptr, 0, 0);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v15 = Font::Get(0);
    v16 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9 + 2, uiWidth, uiHeight, v15, (PgWin *)&v2->vfptr, 0, 0);
    v17 = v16->vfptr;
    pkTextWin = v16;
    v17[122].__vecDelDtor((NiRefObject *)v16, 5u);
    ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
    i = (int)&pkTextWin->vfptr[118];
    v18 = TextData::Get(0x378CA581u);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))i)(pkTextWin, v18);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, pkTexture);
    PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v19, (PgWin *)&v2->vfptr, 0, 0);
    i = 0;
    pkTextWin = (PgWinText *)v2->m_apkInvWin;
    do
    {
      v113 = (NiRefObjectVtbl *)(i + 1);
      sprintf(acShapeName, "IconSlot%03d", i + 1);
      v20 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, pkTexture);
      PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v20, (PgWin *)&v2->vfptr, 0, 0);
      v21 = (NiRefObjectVtbl *)StorageInvWin::CreateWin(uiLeft - v8 + 1, uiTop - v9 + 1, i, (PgWin *)&v2->vfptr);
      pkTextWin->vfptr = v21;
      ItemIcon::SetItem((ItemIcon *)v21, 0, 1);
      (*((void (__stdcall **)(_DWORD))pkTextWin->vfptr->__vecDelDtor + 129))(10);
      (*((void (__stdcall **)(_DWORD))pkTextWin->vfptr->__vecDelDtor + 140))(11);
      v22 = (IconWin **)pkTextWin;
      pkTextWin->vfptr[68].__vecDelDtor = (void *(__thiscall *)(NiRefObject *, unsigned int))g_pkItemInfoWin;
      IconWin::ShowFocus(*v22, 1);
      pkTextWin = (PgWinText *)((char *)pkTextWin + 4);
      i = (int)v113;
    }
    while ( (signed int)v113 < 36 );
    v23 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab01_Off", &uiLeft, &uiTop, pkTexture);
    v24 = StorageTabButWin::CreateWin(uiLeft - v8, uiTop - v9, v23, (PgWin *)&v2->vfptr, 0x10u);
    v25 = pkTexture;
    v2->m_apkTabBtn[0] = (PgWinBut *)v24;
    v24->m_pkToolTipWin = g_pkToolTipWin;
    v26 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab01_Dis", &uiLeft, &uiTop, v25);
    v27 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v26, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_apkTabDisableSpr[0] = v27;
    v27->vfptr[60].__vecDelDtor((NiRefObject *)v27, 0);
    ((void (__stdcall *)(_DWORD))v2->m_apkTabDisableSpr[0]->vfptr[64].__vecDelDtor)(0);
    v28 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab01_On", &uiLeft, &uiTop, pkTexture);
    v29 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v28, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_apkTabOnSpr[0] = v29;
    v29->vfptr[60].__vecDelDtor((NiRefObject *)v29, 0);
    ((void (__stdcall *)(_DWORD))v2->m_apkTabOnSpr[0]->vfptr[64].__vecDelDtor)(0);
    v30 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Num01", &uiLeft, &uiTop, 0);
    v31 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v30, (PgWin *)&v2->vfptr, 0, 0);
    v31->vfptr[60].__vecDelDtor((NiRefObject *)v31, 0);
    v32 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab02_Off", &uiLeft, &uiTop, pkTexture);
    v33 = StorageTabButWin::CreateWin(uiLeft - v8, uiTop - v9, v32, (PgWin *)&v2->vfptr, 0x11u);
    v34 = pkTexture;
    v2->m_apkTabBtn[1] = (PgWinBut *)v33;
    v33->m_pkToolTipWin = g_pkToolTipWin;
    v35 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab02_Dis", &uiLeft, &uiTop, v34);
    v36 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v35, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_apkTabDisableSpr[1] = v36;
    v36->vfptr[60].__vecDelDtor((NiRefObject *)v36, 0);
    ((void (__stdcall *)(_DWORD))v2->m_apkTabDisableSpr[1]->vfptr[64].__vecDelDtor)(0);
    v37 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab02_On", &uiLeft, &uiTop, pkTexture);
    v38 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v37, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_apkTabOnSpr[1] = v38;
    v38->vfptr[60].__vecDelDtor((NiRefObject *)v38, 0);
    ((void (__stdcall *)(_DWORD))v2->m_apkTabOnSpr[1]->vfptr[64].__vecDelDtor)(0);
    v39 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Num02", &uiLeft, &uiTop, 0);
    v40 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v39, (PgWin *)&v2->vfptr, 0, 0);
    v40->vfptr[60].__vecDelDtor((NiRefObject *)v40, 0);
    v41 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab03_Off", &uiLeft, &uiTop, pkTexture);
    v42 = StorageTabButWin::CreateWin(uiLeft - v8, uiTop - v9, v41, (PgWin *)&v2->vfptr, 0x12u);
    v43 = pkTexture;
    v2->m_apkTabBtn[2] = (PgWinBut *)v42;
    v42->m_pkToolTipWin = g_pkToolTipWin;
    v44 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab03_Dis", &uiLeft, &uiTop, v43);
    v45 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v44, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_apkTabDisableSpr[2] = v45;
    v45->vfptr[60].__vecDelDtor((NiRefObject *)v45, 0);
    ((void (__stdcall *)(_DWORD))v2->m_apkTabDisableSpr[2]->vfptr[64].__vecDelDtor)(0);
    v46 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab03_On", &uiLeft, &uiTop, pkTexture);
    v47 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v46, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_apkTabOnSpr[2] = v47;
    v47->vfptr[60].__vecDelDtor((NiRefObject *)v47, 0);
    ((void (__stdcall *)(_DWORD))v2->m_apkTabOnSpr[2]->vfptr[64].__vecDelDtor)(0);
    v48 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Num03", &uiLeft, &uiTop, 0);
    v49 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v48, (PgWin *)&v2->vfptr, 0, 0);
    v49->vfptr[60].__vecDelDtor((NiRefObject *)v49, 0);
    v50 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab04_Off", &uiLeft, &uiTop, pkTexture);
    v51 = StorageTabButWin::CreateWin(uiLeft - v8, uiTop - v9, v50, (PgWin *)&v2->vfptr, 0x13u);
    v52 = pkTexture;
    v2->m_apkTabBtn[3] = (PgWinBut *)v51;
    v51->m_pkToolTipWin = g_pkToolTipWin;
    v53 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab04_Dis", &uiLeft, &uiTop, v52);
    v54 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v53, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_apkTabDisableSpr[3] = v54;
    v54->vfptr[60].__vecDelDtor((NiRefObject *)v54, 0);
    ((void (__stdcall *)(_DWORD))v2->m_apkTabDisableSpr[3]->vfptr[64].__vecDelDtor)(0);
    v55 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab04_On", &uiLeft, &uiTop, pkTexture);
    v56 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v55, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_apkTabOnSpr[3] = v56;
    v56->vfptr[60].__vecDelDtor((NiRefObject *)v56, 0);
    ((void (__stdcall *)(_DWORD))v2->m_apkTabOnSpr[3]->vfptr[64].__vecDelDtor)(0);
    v57 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Num04", &uiLeft, &uiTop, 0);
    v58 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v57, (PgWin *)&v2->vfptr, 0, 0);
    v58->vfptr[60].__vecDelDtor((NiRefObject *)v58, 0);
    ((void (__stdcall *)(signed int))v2->m_apkTabOnSpr[0]->vfptr[64].__vecDelDtor)(1);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "DrawNor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "DrawClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "DrawOver");
    v59 = (PgWinText *)PgWinBut::CreateWin(
                         uiLeft - v8,
                         uiTop - v9,
                         (PgSprData *)pkTextWin,
                         (PgWin *)&v2->vfptr,
                         0x15u,
                         0,
                         0);
    pkTextWin = v59;
    v60 = Font::Get(0);
    v61 = ((int (*)(void))pkTextWin->vfptr[37].__vecDelDtor)();
    v62 = ((int (*)(void))pkTextWin->vfptr[36].__vecDelDtor)();
    v63 = PgWinText::CreateWin(0, 1, v62, v61, v60, (PgWin *)&v59->vfptr, 0, 0);
    v64 = v63->vfptr;
    pkTextWin = v63;
    v64[122].__vecDelDtor((NiRefObject *)v63, 5u);
    v113 = pkTextWin->vfptr + 118;
    v65 = TextData::Get(0x89B68F88);
    v113->__vecDelDtor(pkTextWin, v65);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "PayNor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "PayClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "PayOver");
    v66 = (PgWinText *)PgWinBut::CreateWin(
                         uiLeft - v8,
                         uiTop - v9,
                         (PgSprData *)pkTextWin,
                         (PgWin *)&v2->vfptr,
                         0x14u,
                         0,
                         0);
    pkTextWin = v66;
    v67 = Font::Get(0);
    v68 = ((int (*)(void))pkTextWin->vfptr[37].__vecDelDtor)();
    v69 = ((int (*)(void))pkTextWin->vfptr[36].__vecDelDtor)();
    v70 = PgWinText::CreateWin(0, 1, v69, v68, v67, (PgWin *)&v66->vfptr, 0, 0);
    v71 = v70->vfptr;
    pkTextWin = v70;
    v71[122].__vecDelDtor((NiRefObject *)v70, 5u);
    v113 = pkTextWin->vfptr + 118;
    v72 = TextData::Get(0x2CB89180u);
    v113->__vecDelDtor(pkTextWin, v72);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v73 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GemInput", &uiLeft, &uiTop, pkTexture);
    v74 = (PgWinText *)PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v73, (PgWin *)&v2->vfptr, 0, 0);
    pkTextWin = v74;
    v75 = Font::Get(0);
    v76 = ((int (*)(void))pkTextWin->vfptr[37].__vecDelDtor)();
    v77 = ((int (*)(void))pkTextWin->vfptr[36].__vecDelDtor)();
    v78 = PgWinText::CreateWin(0, 1, v77, v76, v75, (PgWin *)&v74->vfptr, 0, 0);
    v79 = v78->vfptr;
    pkTextWin = v78;
    v79[122].__vecDelDtor((NiRefObject *)v78, 6u);
    ((void (__stdcall *)(void *))pkTextWin->vfptr[118].__vecDelDtor)(&unk_9A486D);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v80 = pkTexture;
    v81 = spNode.m_pObject;
    v2->m_pkGemText = pkTextWin;
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&v81->vfptr, "GemBtn", &uiLeft, &uiTop, v80);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GemBtn");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GemBtn");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0, 0, 0);
    v82 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GoldInput", &uiLeft, &uiTop, pkTexture);
    v83 = (PgWinText *)PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v82, (PgWin *)&v2->vfptr, 0, 0);
    pkTextWin = v83;
    v84 = Font::Get(0);
    v85 = ((int (*)(void))pkTextWin->vfptr[37].__vecDelDtor)();
    v86 = ((int (*)(void))pkTextWin->vfptr[36].__vecDelDtor)();
    v87 = PgWinText::CreateWin(0, 1, v86, v85, v84, (PgWin *)&v83->vfptr, 0, 0);
    v88 = v87->vfptr;
    pkTextWin = v87;
    v88[122].__vecDelDtor((NiRefObject *)v87, 6u);
    ((void (__stdcall *)(void *))pkTextWin->vfptr[118].__vecDelDtor)(&unk_9A486E);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v89 = pkTexture;
    v90 = spNode.m_pObject;
    v2->m_pkGoldText = pkTextWin;
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&v90->vfptr, "GoldBtn", &uiLeft, &uiTop, v89);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GoldBtn");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GoldBtn");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0, 0, 0);
    v91 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SilverInput", &uiLeft, &uiTop, pkTexture);
    v92 = (PgWinText *)PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v91, (PgWin *)&v2->vfptr, 0, 0);
    pkTextWin = v92;
    v93 = Font::Get(0);
    v94 = ((int (*)(void))pkTextWin->vfptr[37].__vecDelDtor)();
    v95 = ((int (*)(void))pkTextWin->vfptr[36].__vecDelDtor)();
    v96 = PgWinText::CreateWin(0, 1, v95, v94, v93, (PgWin *)&v92->vfptr, 0, 0);
    v97 = v96->vfptr;
    pkTextWin = v96;
    v97[122].__vecDelDtor((NiRefObject *)v96, 6u);
    ((void (__stdcall *)(void *))pkTextWin->vfptr[118].__vecDelDtor)(&unk_9A486F);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v98 = pkTexture;
    v99 = spNode.m_pObject;
    v2->m_pkSilverText = pkTextWin;
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&v99->vfptr, "SilverBtn", &uiLeft, &uiTop, v98);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "SilverBtn");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "SilverBtn");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0, 0, 0);
    v100 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CopperInput", &uiLeft, &uiTop, pkTexture);
    v101 = (PgWinText *)PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v100, (PgWin *)&v2->vfptr, 0, 0);
    pkTextWin = v101;
    v102 = Font::Get(0);
    v103 = ((int (*)(void))pkTextWin->vfptr[37].__vecDelDtor)();
    v104 = ((int (*)(void))pkTextWin->vfptr[36].__vecDelDtor)();
    v105 = PgWinText::CreateWin(0, 1, v104, v103, v102, (PgWin *)&v101->vfptr, 0, 0);
    v106 = v105->vfptr;
    pkTextWin = v105;
    v106[122].__vecDelDtor((NiRefObject *)v105, 6u);
    ((void (__stdcall *)(void *))pkTextWin->vfptr[118].__vecDelDtor)(&unk_9A4876);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v107 = pkTexture;
    v108 = spNode.m_pObject;
    v2->m_pkCopperText = pkTextWin;
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&v108->vfptr, "CopperBtn", &uiLeft, &uiTop, v107);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "CopperBtn");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "CopperBtn");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0, 0, 0);
    ((void (__thiscall *)(StorageWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    v2->m_pkMoneyWin = MoneyWin::CreateWin(v112);
    v121 = -1;
    if ( spNode.m_pObject )
    {
      v109 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v109 )
          v109->vfptr->__vecDelDtor((NiRefObject *)v109, 1u);
      }
    }
    result = 1;
  }
  else
  {
    v121 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0059FF40) --------------------------------------------------------
StorageTabButWin *__thiscall StorageTabButWin::`vector deleting destructor'(StorageTabButWin *this, unsigned int a2)
{
  StorageTabButWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&StorageTabButWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&StorageTabButWin::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A4AE0: using guessed type void (__thiscall *StorageTabButWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A4AFC: using guessed type int (__thiscall *StorageTabButWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0059FF80) --------------------------------------------------------
StorageInvWin *__thiscall StorageInvWin::`scalar deleting destructor'(StorageInvWin *this, unsigned int a2)
{
  StorageInvWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&StorageInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&StorageInvWin::`vftable'{for `IDirectMessenger'};
  Bank::RemoveExtraInv();
  ItemIcon::~ItemIcon((ItemIcon *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A4D34: using guessed type void (__thiscall *StorageInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A4D54: using guessed type int (__thiscall *StorageInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A0000) --------------------------------------------------------
StorageWin *__thiscall StorageWin::`scalar deleting destructor'(StorageWin *this, unsigned int a2)
{
  StorageWin *v2; // esi@1
  MoneyWin *v3; // eax@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&StorageWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&StorageWin::`vftable'{for `IDirectMessenger'};
  v3 = this->m_pkMoneyWin;
  if ( v3 )
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
  v2->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v2->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9A4FC4: using guessed type void (__thiscall *StorageWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A4FE4: using guessed type int (__thiscall *StorageWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A00A0) --------------------------------------------------------
bool SysMsgDisplayWin::IsAutoHideOptionSetted()
{
  return 0;
}

//----- (005A00B0) --------------------------------------------------------
void __thiscall SysMsgDisplayWin::DirectMessage(SysMsgDisplayWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  SysMsgDisplayWin *v4; // esi@1
  signed int v5; // ecx@3
  ChatDisplayWin *v6; // ecx@7
  unsigned int v7; // [sp-4h] [bp-8h]@7

  v4 = this;
  if ( iMsgTag == 15 )
  {
    v5 = 0;
    if ( *(_DWORD *)pvBody == 25 )
    {
      v5 = 4;
    }
    else if ( *(_DWORD *)pvBody == 26 )
    {
      v5 = 256;
    }
    v7 = v5;
    v6 = (ChatDisplayWin *)&v4[-1].m_pkActiveChatBD;
    if ( *((_BYTE *)pvBody + 4) )
      ChatDisplayWin::AddOption(v6, v7);
    else
      ChatDisplayWin::RemoveOption(v6, v7);
    MachineOpt::SetSysMsgWinFilter(*(_DWORD *)(LODWORD(v4->m_kWorld.m_Translate.x) + 512));
  }
  else
  {
    ChatDisplayWin::DirectMessage((ChatDisplayWin *)&this->vfptr, iMsgTag, pvBody, pkFrom);
  }
}

//----- (005A0120) --------------------------------------------------------
char __thiscall SysMsgDisplayWin::Create(SysMsgDisplayWin *this, PgFrameWork *pkFrameWork)
{
  SysMsgDisplayWin *v2; // esi@1
  NiMaterialProperty *v3; // ebx@1
  NiTexturePalette *v4; // edi@1
  const char *v5; // eax@3
  EditWin *v6; // edi@4
  NiMaterialProperty *v7; // eax@9
  NiMaterialProperty *v8; // eax@10
  NiMaterialProperty *v9; // edi@11
  NiMaterialProperty *v10; // eax@18
  NiMaterialProperty *v11; // eax@18
  float v12; // edx@18
  NiMaterialProperty *v13; // eax@18
  float v14; // ecx@18
  NiMaterialProperty *v15; // eax@18
  NiMaterialProperty *v16; // eax@18
  int v17; // eax@19
  NiMaterialProperty *v18; // edi@21
  NiMaterialProperty *v19; // eax@29
  float v20; // ecx@29
  NiMaterialProperty *v21; // eax@29
  float v22; // edx@29
  NiMaterialProperty *v23; // eax@29
  float v24; // ecx@29
  NiMaterialProperty *v25; // eax@29
  PgSprData *v26; // eax@29
  NiNode *v27; // esi@30
  char result; // al@34
  int v29; // ebx@35
  NiNode *v30; // esi@36
  unsigned int v31; // edx@41
  NiSourceTexture *v32; // eax@41
  FrameBoxWin *v33; // eax@41
  float fYPosRate; // ST38_4@41
  unsigned int v35; // ecx@41
  PgFont *v36; // eax@41
  unsigned int v37; // eax@43
  FrameBoxWin *v38; // ecx@43
  FrameBoxWin *v39; // edi@44
  int v40; // eax@44
  unsigned int v41; // ecx@44
  FrameBoxWin *v42; // edi@44
  unsigned int v43; // ebx@44
  int v44; // eax@44
  unsigned int v45; // ecx@44
  FrameBoxWin *v46; // edi@44
  FrameBoxWin *v47; // eax@44
  unsigned int v48; // ST50_4@44
  unsigned int v49; // ST4C_4@44
  PgFont *v50; // ST30_4@44
  int v51; // ST24_4@44
  int v52; // eax@44
  ChatBoardFlex *v53; // eax@44
  ChatBoardFlex *v54; // ebx@44
  bool v55; // zf@52
  int v56; // edi@53
  int v57; // eax@53
  PgWinProxy *v58; // eax@53
  int v59; // edi@53
  int v60; // ebx@53
  ColumnBut *v61; // eax@53
  NiProperty *v62; // ST38_4@53
  char *v63; // eax@53
  int v64; // ST2C_4@53
  int v65; // eax@53
  PgWinProxy *v66; // eax@53
  int v67; // edi@53
  int v68; // ebx@53
  PgWinBut *v69; // eax@53
  NiProperty *v70; // ST38_4@53
  PgWinBut *v71; // eax@53
  NiProperty *v72; // ST38_4@53
  PgWinBut *v73; // eax@53
  NiProperty *v74; // ST38_4@53
  char *v75; // eax@53
  NiSourceTexture *v76; // eax@53
  PopupMenuWin *v77; // eax@53
  int v78; // edi@53
  PopupMenuWin *v79; // ebx@53
  char *v80; // eax@60
  PopupMenuTextCheck *v81; // eax@60
  char *v82; // eax@60
  PopupMenuTextCheck *v83; // eax@60
  NiNode *v84; // esi@61
  int iOrgX; // [sp+54h] [bp-30h]@35
  signed int v86; // [sp+58h] [bp-2Ch]@43
  ChatBoardFlex **v87; // [sp+5Ch] [bp-28h]@43
  unsigned int uiWidth; // [sp+60h] [bp-24h]@35
  unsigned int uiHeight; // [sp+64h] [bp-20h]@35
  int iOrgY; // [sp+68h] [bp-1Ch]@19
  int uiLeft; // [sp+6Ch] [bp-18h]@29
  int uiTop; // [sp+70h] [bp-14h]@29
  NiPointer<NiNode> spNode; // [sp+74h] [bp-10h]@1
  int v94; // [sp+80h] [bp-4h]@1
  PgSprData *pkSprDataa; // [sp+8Ch] [bp+8h]@44
  PgSprData *pkSprData; // [sp+8Ch] [bp+8h]@44
  PgSprData *pkSprDatab; // [sp+8Ch] [bp+8h]@53
  PgSprData *pkSprDatac; // [sp+8Ch] [bp+8h]@53
  PgSprData *pkSprDatad; // [sp+8Ch] [bp+8h]@53
  PgSprData *pkSprDatae; // [sp+8Ch] [bp+8h]@53
  PgSprData *pkSprDataf; // [sp+8Ch] [bp+8h]@53

  v2 = this;
  v3 = 0;
  spNode.m_pObject = 0;
  v4 = pTexturePalette;
  v94 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "Game\\SystemMessage.nif");
  PgUtil::LoadNodeNifFile(v5, &spNode, v4);
  if ( !spNode.m_pObject )
    return 0;
  v2->m_pkChatEditBox = 0;
  v2->m_pkFilterBtn = 0;
  v6 = v2->m_spEdit.m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v2->m_spEdit.m_pObject = 0;
  }
  v2->m_pkChatKorMode = 0;
  v2->m_pkChatEngMode = 0;
  v2->m_pkTabText = 0;
  v2->m_pkTabBtn = 0;
  v7 = (NiMaterialProperty *)operator new(0x60u);
  LOBYTE(v94) = 1;
  if ( v7 )
  {
    NiMaterialProperty::NiMaterialProperty(v7);
    v3 = v8;
  }
  v9 = v2->m_spMtrlProp.m_pObject;
  LOBYTE(v94) = 0;
  if ( v9 != v3 )
  {
    if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v2->m_spMtrlProp.m_pObject = v3;
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
  v10 = v2->m_spMtrlProp.m_pObject;
  v10->m_amb = NiColor::WHITE;
  ++v10->m_uiRevID;
  v11 = v2->m_spMtrlProp.m_pObject;
  v11->m_diff.r = NiColor::WHITE.r;
  v11->m_diff.g = NiColor::WHITE.g;
  v12 = NiColor::WHITE.b;
  ++v11->m_uiRevID;
  v11->m_diff.b = v12;
  v13 = v2->m_spMtrlProp.m_pObject;
  v13->m_emit.r = NiColor::WHITE.r;
  v13->m_emit.g = NiColor::WHITE.g;
  v14 = NiColor::WHITE.b;
  ++v13->m_uiRevID;
  v13->m_emit.b = v14;
  v15 = v2->m_spMtrlProp.m_pObject;
  ++v15->m_uiRevID;
  v15->m_fAlpha = 1.0;
  v16 = (NiMaterialProperty *)operator new(0x60u);
  LOBYTE(v94) = 2;
  if ( v16 )
  {
    NiMaterialProperty::NiMaterialProperty(v16);
    iOrgY = v17;
  }
  else
  {
    iOrgY = 0;
    v17 = 0;
  }
  v18 = v2->m_spFixedMtrlProp.m_pObject;
  LOBYTE(v94) = 0;
  if ( v18 != (NiMaterialProperty *)v17 )
  {
    if ( v18 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v18->m_uiRefCount) && v18 )
        v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
      v17 = iOrgY;
    }
    v2->m_spFixedMtrlProp.m_pObject = (NiMaterialProperty *)v17;
    if ( v17 )
      InterlockedIncrement((volatile LONG *)(v17 + 4));
  }
  v19 = v2->m_spFixedMtrlProp.m_pObject;
  v19->m_amb.r = NiColor::WHITE.r;
  v19->m_amb.g = NiColor::WHITE.g;
  v20 = NiColor::WHITE.b;
  ++v19->m_uiRevID;
  v19->m_amb.b = v20;
  v21 = v2->m_spFixedMtrlProp.m_pObject;
  v21->m_diff.r = NiColor::WHITE.r;
  v21->m_diff.g = NiColor::WHITE.g;
  v22 = NiColor::WHITE.b;
  ++v21->m_uiRevID;
  v21->m_diff.b = v22;
  v23 = v2->m_spFixedMtrlProp.m_pObject;
  v23->m_emit.r = NiColor::WHITE.r;
  v23->m_emit.g = NiColor::WHITE.g;
  v24 = NiColor::WHITE.b;
  ++v23->m_uiRevID;
  v23->m_emit.b = v24;
  v25 = v2->m_spFixedMtrlProp.m_pObject;
  ++v25->m_uiRevID;
  v25->m_fAlpha = 1.0;
  v26 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, uiLeft, uiTop, v26, 0, pkFrameWork, "SysMsgDisplayWin", 0) )
  {
    v27 = spNode.m_pObject;
    v94 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v27 )
        v27->vfptr->__vecDelDtor((NiRefObject *)v27, 1u);
    }
    return 0;
  }
  NiAVObject::AttachProperty((NiAVObject *)&v2->vfptr, (NiProperty *)&v2->m_spMtrlProp.m_pObject->vfptr);
  v29 = uiLeft;
  iOrgY = uiTop;
  iOrgX = uiLeft;
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "ChaBox", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v31 = uiHeight;
    v2->m_uiDefaultWidth = uiWidth;
    v2->m_uiDefaultHeight = v31;
    v32 = MenuTexMgr::GetTexture(0xBu);
    v33 = FrameBoxWin::CreateWin(v32, 7u, 7u, uiLeft - v29, uiTop - iOrgY, (PgWin *)&v2->vfptr, pkFrameWork);
    fYPosRate = *(float *)&uiHeight;
    v35 = uiWidth;
    v2->m_pkChattingBox = v33;
    ((void (__thiscall *)(FrameBoxWin *, unsigned int, _DWORD))v33->vfptr[135].__vecDelDtor)(
      v33,
      v35,
      LODWORD(fYPosRate));
    ((void (__stdcall *)(_DWORD))v2->m_pkChattingBox->vfptr[130].__vecDelDtor)(0);
    v2->m_pkChattingBox->m_bSizeDraggable = 1;
    ((void (__stdcall *)(signed int))v2->m_pkChattingBox->vfptr[64].__vecDelDtor)(1);
    v36 = Font::Get(BOLD);
    if ( v36 )
    {
      v37 = v36->m_dwFontSizeInPixel;
      v38 = v2->m_pkChattingBox;
      v38->m_iSizeDragMinHeight = 4 * v37 + 8;
      v38->m_iSizeDragMaxHeight = 40 * v37 + 88;
      ((void (__stdcall *)(_DWORD))v2->m_pkChattingBox->vfptr[60].__vecDelDtor)(0);
      v87 = (ChatBoardFlex **)v2->m_aspChatBD;
      v86 = 4;
      do
      {
        v39 = v2->m_pkChattingBox;
        v40 = ((int (__thiscall *)(FrameBoxWin *))v39->vfptr[37].__vecDelDtor)(v2->m_pkChattingBox);
        v41 = v39->m_uiEdgeHeight;
        v42 = v2->m_pkChattingBox;
        v43 = v40 - 2 * v41;
        v44 = ((int (__thiscall *)(FrameBoxWin *))v42->vfptr[36].__vecDelDtor)(v2->m_pkChattingBox);
        v45 = v42->m_uiEdgeWidth;
        v46 = v2->m_pkChattingBox;
        pkSprDataa = (PgSprData *)(v44 - 2 * v45);
        v47 = v2->m_pkChattingBox;
        v48 = v47->m_uiEdgeHeight;
        v49 = v47->m_uiEdgeWidth;
        v50 = Font::Get(BOLD);
        v51 = v48 + ((int (__thiscall *)(FrameBoxWin *))v46->vfptr[42].__vecDelDtor)(v46);
        v52 = ((int (__thiscall *)(FrameBoxWin *))v46->vfptr[41].__vecDelDtor)(v46);
        v53 = ChatBoardFlex::CreateWin(v49 + v52, v51, (unsigned int)pkSprDataa, v43, v50, 0, (PgWin *)&v2->vfptr);
        v54 = *v87;
        pkSprData = (PgSprData *)v53;
        if ( *v87 != v53 )
        {
          if ( v54 )
          {
            if ( !InterlockedDecrement((volatile LONG *)&v54->m_uiRefCount) && v54 )
              v54->vfptr->__vecDelDtor((NiRefObject *)v54, 1u);
            v53 = (ChatBoardFlex *)pkSprData;
          }
          *v87 = v53;
          if ( v53 )
            InterlockedIncrement((volatile LONG *)&v53->m_uiRefCount);
        }
        ChatBoardFlex::SetMaxTextLine(*v87, 100);
        (*v87)->m_MaxTextViewLine = 100;
        ((void (__stdcall *)(_DWORD))(*v87)->vfptr[60].__vecDelDtor)(0);
        v55 = v86-- == 1;
        ++v87;
      }
      while ( !v55 );
      ChatDisplayWin::OnActive((ChatDisplayWin *)&v2->vfptr, 0);
      v56 = ((int (*)(void))v2->m_pkChattingBox->vfptr[36].__vecDelDtor)();
      v57 = ((int (__thiscall *)(SysMsgDisplayWin *))v2->vfptr[36].__vecDelDtor)(v2);
      v58 = PgWinProxy::CreateWin(v57 - v56, 0, 0, 0, (PgWin *)&v2->vfptr);
      v2->m_pkLTSocketWin = v58;
      v59 = iOrgX + ((int (__thiscall *)(PgWinProxy *))v58->vfptr[41].__vecDelDtor)(v58);
      v60 = iOrgY + ((int (*)(void))v2->m_pkLTSocketWin->vfptr[42].__vecDelDtor)();
      pkSprDatab = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "UnlockNor", &uiLeft, &uiTop, 0);
      PgSprData::Add(pkSprDatab, (NiAVObject *)&spNode.m_pObject->vfptr, "lockNor");
      v61 = ColumnBut::CreateWin(uiLeft - v59, uiTop - v60, pkSprDatab, (PgWin *)&v2->m_pkLTSocketWin->vfptr, 0x13u, 0);
      v62 = (NiProperty *)&v2->m_spFixedMtrlProp.m_pObject->vfptr;
      v2->m_pkCheckBox = v61;
      NiAVObject::AttachProperty((NiAVObject *)&v61->vfptr, v62);
      v2->m_pkCheckBox->m_pkToolTipWin = g_pkToolTipWin;
      v63 = (char *)TextData2::Get(0x10D7C7C8u);
      PgWin::SetToolTipWinText((PgWin *)&v2->m_pkCheckBox->vfptr, v63);
      v64 = ((int (*)(void))v2->m_pkChattingBox->vfptr[37].__vecDelDtor)();
      v65 = ((int (__thiscall *)(SysMsgDisplayWin *))v2->vfptr[36].__vecDelDtor)(v2);
      v66 = PgWinProxy::CreateWin(v65, v64, 0, 0, (PgWin *)&v2->vfptr);
      v2->m_pkRBSocketWin = v66;
      v67 = iOrgX + ((int (__thiscall *)(PgWinProxy *))v66->vfptr[41].__vecDelDtor)(v66);
      v68 = iOrgY + ((int (*)(void))v2->m_pkRBSocketWin->vfptr[42].__vecDelDtor)();
      pkSprDatac = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PreUpNor", &uiLeft, &uiTop, 0);
      PgSprData::Add(pkSprDatac, (NiAVObject *)&spNode.m_pObject->vfptr, "PreUpOver");
      PgSprData::Add(pkSprDatac, (NiAVObject *)&spNode.m_pObject->vfptr, "PreUpClick");
      v69 = PgWinBut::CreateWin(uiLeft - v67, uiTop - v68, pkSprDatac, (PgWin *)&v2->m_pkRBSocketWin->vfptr, 0, 0, 0);
      v70 = (NiProperty *)&v2->m_spFixedMtrlProp.m_pObject->vfptr;
      v2->m_pkScrollUpBtn = v69;
      NiAVObject::AttachProperty((NiAVObject *)&v69->vfptr, v70);
      pkSprDatad = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NextDownNor", &uiLeft, &uiTop, 0);
      PgSprData::Add(pkSprDatad, (NiAVObject *)&spNode.m_pObject->vfptr, "NextDownOver");
      PgSprData::Add(pkSprDatad, (NiAVObject *)&spNode.m_pObject->vfptr, "NextDownClick");
      v71 = PgWinBut::CreateWin(uiLeft - v67, uiTop - v68, pkSprDatad, (PgWin *)&v2->m_pkRBSocketWin->vfptr, 1u, 0, 0);
      v72 = (NiProperty *)&v2->m_spFixedMtrlProp.m_pObject->vfptr;
      v2->m_pkScrollDnBtn = v71;
      NiAVObject::AttachProperty((NiAVObject *)&v71->vfptr, v72);
      pkSprDatae = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "DownNor", &uiLeft, &uiTop, 0);
      PgSprData::Add(pkSprDatae, (NiAVObject *)&spNode.m_pObject->vfptr, "DownOver");
      PgSprData::Add(pkSprDatae, (NiAVObject *)&spNode.m_pObject->vfptr, "DownClick");
      v73 = PgWinBut::CreateWin(uiLeft - v67, uiTop - v68, pkSprDatae, (PgWin *)&v2->m_pkRBSocketWin->vfptr, 2u, 0, 0);
      v74 = (NiProperty *)&v2->m_spFixedMtrlProp.m_pObject->vfptr;
      v2->m_pkScrollMostDnBtn = v73;
      NiAVObject::AttachProperty((NiAVObject *)&v73->vfptr, v74);
      pkSprDataf = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "FillterNor", &uiLeft, &uiTop, 0);
      PgSprData::Add(pkSprDataf, (NiAVObject *)&spNode.m_pObject->vfptr, "FillterOver");
      PgSprData::Add(pkSprDataf, (NiAVObject *)&spNode.m_pObject->vfptr, "FillterClick");
      v2->m_pkFilterBtn = PgWinBut::CreateWin(
                            uiLeft - v67,
                            uiTop - v68,
                            pkSprDataf,
                            (PgWin *)&v2->m_pkRBSocketWin->vfptr,
                            8u,
                            0,
                            0);
      v75 = (char *)TextData::Get(0xD812DC42);
      PgWin::SetToolTipWinText((PgWin *)&v2->m_pkFilterBtn->vfptr, v75);
      v2->m_pkFilterBtn->m_pkToolTipWin = g_pkToolTipWin;
      v76 = MenuTexMgr::GetTexture(1u);
      v77 = PopupMenuWin::CreateWin(v76, 4u, 4u, 0);
      v78 = (int)v2->m_spChatFilterPopupMenu.m_pObject;
      v79 = v77;
      if ( (PopupMenuWin *)v78 != v77 )
      {
        if ( v78 && !InterlockedDecrement((volatile LONG *)(v78 + 4)) && v78 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v78)(v78, 1);
        v2->m_spChatFilterPopupMenu.m_pObject = v79;
        if ( v79 )
          InterlockedIncrement((volatile LONG *)&v79->m_uiRefCount);
      }
      v2->m_spChatFilterPopupMenu.m_pObject->vfptr->SetMsgHooker(
        &v2->m_spChatFilterPopupMenu.m_pObject->vfptr,
        &v2->vfptr);
      PopupMenuWin::Clear(v2->m_spChatFilterPopupMenu.m_pObject);
      v80 = (char *)TextData::Get(0xF6063034);
      v81 = PopupMenuTextCheck::CreateWin(v80, 0, 0, 0, 0, 0);
      v81->m_ePopupMenuID = 25;
      PopupMenuWin::AddMenu(v2->m_spChatFilterPopupMenu.m_pObject, v78, (PopupMenu *)&v81->vfptr);
      v82 = (char *)TextData::Get(0xF607102A);
      v83 = PopupMenuTextCheck::CreateWin(v82, 0, 0, 0, 0, 0);
      v83->m_ePopupMenuID = 26;
      PopupMenuWin::AddMenu(v2->m_spChatFilterPopupMenu.m_pObject, v78, (PopupMenu *)&v83->vfptr);
      PopupMenuWin::FinishMenu(v2->m_spChatFilterPopupMenu.m_pObject, 0);
      ((void (__stdcall *)(_DWORD))v2->m_spChatFilterPopupMenu.m_pObject->vfptr[64].__vecDelDtor)(0);
      PgWin::InitPosRightTop((PgWin *)&v2->vfptr, PgWin::ms_uiScreenWidth, PgWin::ms_uiScreenHeight, 1.0, 0.80000001);
      v94 = -1;
      if ( spNode.m_pObject )
      {
        v84 = spNode.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
        {
          if ( v84 )
            v84->vfptr->__vecDelDtor((NiRefObject *)v84, 1u);
        }
      }
      result = 1;
    }
    else
    {
      v94 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 0;
    }
  }
  else
  {
    v30 = spNode.m_pObject;
    v94 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v30 )
      v30->vfptr->__vecDelDtor((NiRefObject *)v30, 1u);
    result = 0;
  }
  return result;
}
// A7D11C: using guessed type const struct NiColor NiColor::WHITE;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005A0B70) --------------------------------------------------------
SysMsgDisplayWin *__cdecl SysMsgDisplayWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  SysMsgDisplayWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x26Cu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    ChatDisplayWin::ChatDisplayWin((ChatDisplayWin *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&SysMsgDisplayWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&SysMsgDisplayWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[136].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (SysMsgDisplayWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9A52F0: using guessed type void (__thiscall *SysMsgDisplayWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A530C: using guessed type int (__thiscall *SysMsgDisplayWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A0CB0) --------------------------------------------------------
unsigned int __thiscall FrameBoxWin::GetClientWidth(FrameBoxWin *this)
{
  return ((int (*)(void))this->vfptr[36].__vecDelDtor)() - 2 * this->m_uiEdgeWidth;
}

//----- (005A0CD0) --------------------------------------------------------
unsigned int __thiscall FrameBoxWin::GetClientHeight(FrameBoxWin *this)
{
  return ((int (*)(void))this->vfptr[37].__vecDelDtor)() - 2 * this->m_uiEdgeHeight;
}

//----- (005A0CF0) --------------------------------------------------------
void __thiscall SystemWin::SystemWin(SystemWin *this)
{
  SystemWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&SystemWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&SystemWin::`vftable'{for `IDirectMessenger'};
}
// 9A5748: using guessed type void (__thiscall *SystemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A5764: using guessed type int (__thiscall *SystemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A0D10) --------------------------------------------------------
void __thiscall SystemWin::~SystemWin(SystemWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&SystemWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SystemWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9A5748: using guessed type void (__thiscall *SystemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A5764: using guessed type int (__thiscall *SystemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A0D30) --------------------------------------------------------
void __thiscall SystemWin::OnCmdOption(SystemWin *this)
{
  PgFrameWork *v1; // ecx@1

  v1 = this->m_pkFrameWork;
  if ( v1 )
    PgFrameWork::AddMsg(v1, 0x17u, 0, 0);
}

//----- (005A0D50) --------------------------------------------------------
void __thiscall SystemWin::OnCmdGoCharSelect(SystemWin *this)
{
  PgFrameWork *v1; // ecx@1

  v1 = this->m_pkFrameWork;
  if ( v1 )
    PgFrameWork::AddMsg(v1, 0x19u, 0, 0);
}

//----- (005A0D70) --------------------------------------------------------
void __thiscall SystemWin::OnCmdLogout(SystemWin *this)
{
  PgFrameWork *v1; // ecx@1

  v1 = this->m_pkFrameWork;
  if ( v1 )
    PgFrameWork::AddMsg(v1, 0x18u, 0, 0);
}

//----- (005A0D90) --------------------------------------------------------
void __thiscall SystemWin::OnCmdExit(SystemWin *this)
{
  PgFrameWork *v1; // ecx@1

  v1 = this->m_pkFrameWork;
  if ( v1 )
    PgFrameWork::AddMsg(v1, 0x1Au, 0, 0);
}

//----- (005A0DB0) --------------------------------------------------------
void __thiscall SystemWin::OnCancel(SystemWin *this)
{
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
}

//----- (005A0DC0) --------------------------------------------------------
void SystemWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "SystemWin");
}

//----- (005A0DF0) --------------------------------------------------------
void __thiscall SystemWin::OnCommand(SystemWin *this, unsigned int wParam, int lParam)
{
  PgFrameWork *v3; // ecx@2
  PgFrameWork *v4; // ecx@4
  PgFrameWork *v5; // ecx@6

  switch ( wParam )
  {
    case 6u:
      v3 = this->m_pkFrameWork;
      if ( v3 )
        PgFrameWork::AddMsg(v3, 0x19u, 0, 0);
      break;
    case 7u:
      v4 = this->m_pkFrameWork;
      if ( v4 )
        PgFrameWork::AddMsg(v4, 0x18u, 0, 0);
      break;
    case 8u:
      v5 = this->m_pkFrameWork;
      if ( v5 )
        PgFrameWork::AddMsg(v5, 0x1Au, 0, 0);
      break;
    case 9u:
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
      break;
    case 3u:
      GameFrameWork::OpenGraphicOptionWin((GameFrameWork *)this->m_pkFrameWork);
      break;
    case 2u:
      GameFrameWork::OpenGameOptionWin((GameFrameWork *)this->m_pkFrameWork);
      break;
    case 4u:
      GameFrameWork::OpenSoundOptionWin((GameFrameWork *)this->m_pkFrameWork);
      break;
    case 5u:
      GameFrameWork::OpenKeyRemappingOptionWin((GameFrameWork *)this->m_pkFrameWork);
      break;
    case 1u:
      GameFrameWork::OpenHelpWin((GameFrameWork *)this->m_pkFrameWork);
      break;
    case 0xAu:
      SystemWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (005A0EF0) --------------------------------------------------------
char __thiscall SystemWin::Create(SystemWin *this, PgFrameWork *pkFrameWork)
{
  SystemWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  char result; // al@9
  int v8; // ebx@10
  int v9; // edi@10
  NiSourceTexture *v10; // eax@10
  PgSprData *v11; // eax@11
  PgSprData *v12; // eax@13
  PgSprData *v13; // eax@13
  PgSprData *v14; // ebx@13
  NiSourceTexture *v15; // ebx@13
  PgSprData *v16; // ebx@14
  NiNode *v17; // esi@16
  PgFont *v18; // eax@21
  PgWinText *v19; // ebx@21
  NiUnsharedGeometryGroup *v20; // eax@21
  PgSprData *v21; // ebx@21
  NiPointer<PgSprData::PgHitTester> *v22; // edx@21
  unsigned int v23; // ebx@21
  PgFont *v24; // eax@21
  PgWinText *v25; // ebx@21
  NiUnsharedGeometryGroup *v26; // eax@21
  PgSprData *v27; // ebx@21
  NiPointer<PgSprData::PgHitTester> *v28; // edx@21
  unsigned int v29; // ebx@21
  PgFont *v30; // eax@21
  PgWinText *v31; // ebx@21
  NiUnsharedGeometryGroup *v32; // eax@21
  PgSprData *v33; // ebx@21
  PgWinBut *v34; // eax@21
  NiPointer<PgSprData::PgHitTester> *v35; // ecx@23
  unsigned int v36; // ebx@23
  PgFont *v37; // eax@23
  PgWinText *v38; // ebx@23
  NiUnsharedGeometryGroup *v39; // eax@23
  PgSprData *v40; // ebx@23
  NiPointer<PgSprData::PgHitTester> *v41; // edx@23
  unsigned int v42; // ebx@23
  PgFont *v43; // eax@23
  PgWinText *v44; // ebx@23
  NiUnsharedGeometryGroup *v45; // eax@23
  PgSprData *v46; // ebx@23
  NiPointer<PgSprData::PgHitTester> *v47; // edx@23
  unsigned int v48; // ebx@23
  PgFont *v49; // eax@23
  PgWinText *v50; // ebx@23
  NiUnsharedGeometryGroup *v51; // eax@23
  PgSprData *v52; // ebx@23
  PgWinBut *v53; // eax@23
  NiPointer<PgSprData::PgHitTester> *v54; // ecx@23
  unsigned int v55; // ebx@23
  PgFont *v56; // eax@23
  PgWinText *v57; // ebx@23
  NiUnsharedGeometryGroup *v58; // eax@23
  PgSprData *v59; // ebx@23
  NiPointer<PgSprData::PgHitTester> *v60; // edx@23
  unsigned int v61; // ebx@23
  PgFont *v62; // eax@23
  PgWinText *v63; // ebx@23
  NiUnsharedGeometryGroup *v64; // eax@23
  PgSprData *v65; // ebx@23
  NiPointer<PgSprData::PgHitTester> *v66; // edx@23
  unsigned int v67; // ebx@23
  PgFont *v68; // eax@23
  PgWinText *v69; // ebx@23
  NiUnsharedGeometryGroup *v70; // eax@23
  PgSprData *v71; // ebx@23
  NiPointer<PgSprData::PgHitTester> *v72; // edx@23
  unsigned int v73; // ebx@23
  PgFont *v74; // eax@23
  PgWinText *v75; // edi@23
  NiRefObjectVtbl *v76; // ebx@23
  NiUnsharedGeometryGroup *v77; // eax@23
  NiNode *v78; // esi@24
  unsigned int uiWidth; // [sp+A0h] [bp-20h]@15
  unsigned int uiHeight; // [sp+A4h] [bp-1Ch]@15
  int uiLeft; // [sp+A8h] [bp-18h]@4
  int uiTop; // [sp+ACh] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+B0h] [bp-10h]@1
  int v84; // [sp+BCh] [bp-4h]@1
  int iYOff; // [sp+C8h] [bp+8h]@10
  int iYOffa; // [sp+C8h] [bp+8h]@21
  int iYOffb; // [sp+C8h] [bp+8h]@21
  int iYOffc; // [sp+C8h] [bp+8h]@21
  int iYOffd; // [sp+C8h] [bp+8h]@21
  int iYOffe; // [sp+C8h] [bp+8h]@21
  int iYOfff; // [sp+C8h] [bp+8h]@23
  int iYOffg; // [sp+C8h] [bp+8h]@23
  int iYOffh; // [sp+C8h] [bp+8h]@23
  int iYOffi; // [sp+C8h] [bp+8h]@23
  int iYOffj; // [sp+C8h] [bp+8h]@23
  int iYOffk; // [sp+C8h] [bp+8h]@23
  int iYOffl; // [sp+C8h] [bp+8h]@23
  int iYOffm; // [sp+C8h] [bp+8h]@23
  int iYOffn; // [sp+C8h] [bp+8h]@23
  int iYOffo; // [sp+C8h] [bp+8h]@23
  int iYOffp; // [sp+C8h] [bp+8h]@23
  int iYOffq; // [sp+C8h] [bp+8h]@23
  int iYOffr; // [sp+C8h] [bp+8h]@23

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v84 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\SystemWin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "SystemWin", 0) )
  {
    v6 = spNode.m_pObject;
    v84 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = uiTop;
  v9 = uiLeft;
  iYOff = uiTop;
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v8, v11, (PgWin *)&v2->vfptr, 0, 0);
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop, v13, (PgWin *)&v2->vfptr, 0, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinCloseBut::CreateWin(uiLeft - v9, uiTop - iYOff, v14, (PgWin *)&v2->vfptr);
  v15 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, v15);
    PgSprData::Add(v16, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(v16, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v9, uiTop - iYOff, v16, (PgWin *)&v2->vfptr, 0xAu, 0, 0);
  }
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v18 = Font::Get(MAIN_MENU);
    v19 = PgWinText::CreateWin(uiLeft - v9, uiTop, uiWidth, uiHeight, v18, (PgWin *)&v2->vfptr, 0, 0);
    v19->vfptr[122].__vecDelDtor((NiRefObject *)v19, 1u);
    v19->vfptr[117].__vecDelDtor((NiRefObject *)v19, (unsigned int)&Color::m_kDxWinTitleColor);
    iYOffa = (int)v19->vfptr;
    v20 = TextData::Get(0xF1FDF101);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(iYOffa + 472))(v19, v20);
    v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
    v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpNor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpClick");
    PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpOver");
    PgWinBut::CreateWin(uiLeft - v9, uiTop, v21, (PgWin *)&v2->vfptr, 1u, 0, 0);
    v22 = v21->m_akHitTester.m_pBase;
    v23 = v22->m_pObject->m_uiHeight;
    iYOffb = v22->m_pObject->m_uiWidth;
    v24 = Font::Get(MAIN_MENU);
    v25 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOffb, v23, v24, (PgWin *)&v2->vfptr, 0, 0);
    v25->vfptr[122].__vecDelDtor((NiRefObject *)v25, 5u);
    iYOffc = (int)v25->vfptr;
    v26 = TextData::Get(0x98A7F8F9);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(iYOffc + 472))(v25, v26);
    v25->vfptr[60].__vecDelDtor((NiRefObject *)v25, 0);
    v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GameNor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v27, (NiAVObject *)&spNode.m_pObject->vfptr, "GameClick");
    PgSprData::Add(v27, (NiAVObject *)&spNode.m_pObject->vfptr, "GameOver");
    PgWinBut::CreateWin(uiLeft - v9, uiTop, v27, (PgWin *)&v2->vfptr, 2u, 0, 0);
    v28 = v27->m_akHitTester.m_pBase;
    v29 = v28->m_pObject->m_uiHeight;
    iYOffd = v28->m_pObject->m_uiWidth;
    v30 = Font::Get(MAIN_MENU);
    v31 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOffd, v29, v30, (PgWin *)&v2->vfptr, 0, 0);
    v31->vfptr[122].__vecDelDtor((NiRefObject *)v31, 5u);
    iYOffe = (int)v31->vfptr;
    v32 = TextData::Get(0xD9F94C4E);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(iYOffe + 472))(v31, v32);
    v31->vfptr[60].__vecDelDtor((NiRefObject *)v31, 0);
    v33 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GraphicNor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v33, (NiAVObject *)&spNode.m_pObject->vfptr, "GraphicClick");
    PgSprData::Add(v33, (NiAVObject *)&spNode.m_pObject->vfptr, "GraphicOver");
    v34 = PgWinBut::CreateWin(uiLeft - v9, uiTop, v33, (PgWin *)&v2->vfptr, 3u, 0, 0);
    if ( GameFrameWork::ms_bSpawnApps == 1 )
      v34->vfptr[60].__vecDelDtor((NiRefObject *)v34, 0);
    v35 = v33->m_akHitTester.m_pBase;
    v36 = v35->m_pObject->m_uiHeight;
    iYOfff = v35->m_pObject->m_uiWidth;
    v37 = Font::Get(MAIN_MENU);
    v38 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOfff, v36, v37, (PgWin *)&v2->vfptr, 0, 0);
    v38->vfptr[122].__vecDelDtor((NiRefObject *)v38, 5u);
    iYOffg = (int)v38->vfptr;
    v39 = TextData::Get(0x33414E85u);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(iYOffg + 472))(v38, v39);
    v38->vfptr[60].__vecDelDtor((NiRefObject *)v38, 0);
    v40 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SoundNor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v40, (NiAVObject *)&spNode.m_pObject->vfptr, "SoundClick");
    PgSprData::Add(v40, (NiAVObject *)&spNode.m_pObject->vfptr, "SoundOver");
    PgWinBut::CreateWin(uiLeft - v9, uiTop, v40, (PgWin *)&v2->vfptr, 4u, 0, 0);
    v41 = v40->m_akHitTester.m_pBase;
    v42 = v41->m_pObject->m_uiHeight;
    iYOffh = v41->m_pObject->m_uiWidth;
    v43 = Font::Get(MAIN_MENU);
    v44 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOffh, v42, v43, (PgWin *)&v2->vfptr, 0, 0);
    v44->vfptr[122].__vecDelDtor((NiRefObject *)v44, 5u);
    iYOffi = (int)v44->vfptr;
    v45 = TextData::Get(0xE7495556);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(iYOffi + 472))(v44, v45);
    v44->vfptr[60].__vecDelDtor((NiRefObject *)v44, 0);
    v46 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "KeyRemappingNor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v46, (NiAVObject *)&spNode.m_pObject->vfptr, "KeyRemappingClick");
    PgSprData::Add(v46, (NiAVObject *)&spNode.m_pObject->vfptr, "KeyRemappingOver");
    PgWinBut::CreateWin(uiLeft - v9, uiTop, v46, (PgWin *)&v2->vfptr, 5u, 0, 0);
    v47 = v46->m_akHitTester.m_pBase;
    v48 = v47->m_pObject->m_uiHeight;
    iYOffj = v47->m_pObject->m_uiWidth;
    v49 = Font::Get(MAIN_MENU);
    v50 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOffj, v48, v49, (PgWin *)&v2->vfptr, 0, 0);
    v50->vfptr[122].__vecDelDtor((NiRefObject *)v50, 5u);
    iYOffk = (int)v50->vfptr;
    v51 = TextData::Get(0x2C4566AEu);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(iYOffk + 472))(v50, v51);
    v50->vfptr[60].__vecDelDtor((NiRefObject *)v50, 0);
    v52 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SelectCharNor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v52, (NiAVObject *)&spNode.m_pObject->vfptr, "SelectCharClick");
    PgSprData::Add(v52, (NiAVObject *)&spNode.m_pObject->vfptr, "SelectCharOver");
    v53 = PgWinBut::CreateWin(uiLeft - v9, uiTop, v52, (PgWin *)&v2->vfptr, 6u, 0, 0);
    v53->vfptr[60].__vecDelDtor((NiRefObject *)v53, 1u);
    v54 = v52->m_akHitTester.m_pBase;
    v55 = v54->m_pObject->m_uiHeight;
    iYOffl = v54->m_pObject->m_uiWidth;
    v56 = Font::Get(MAIN_MENU);
    v57 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOffl, v55, v56, (PgWin *)&v2->vfptr, 0, 0);
    v57->vfptr[122].__vecDelDtor((NiRefObject *)v57, 5u);
    iYOffm = (int)v57->vfptr;
    v58 = TextData::Get(0x9F808694);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(iYOffm + 472))(v57, v58);
    v57->vfptr[60].__vecDelDtor((NiRefObject *)v57, 0);
    v59 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "LogoutNor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v59, (NiAVObject *)&spNode.m_pObject->vfptr, "LogoutClick");
    PgSprData::Add(v59, (NiAVObject *)&spNode.m_pObject->vfptr, "LogoutOver");
    PgWinBut::CreateWin(uiLeft - v9, uiTop, v59, (PgWin *)&v2->vfptr, 7u, 0, 0);
    v60 = v59->m_akHitTester.m_pBase;
    v61 = v60->m_pObject->m_uiHeight;
    iYOffn = v60->m_pObject->m_uiWidth;
    v62 = Font::Get(MAIN_MENU);
    v63 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOffn, v61, v62, (PgWin *)&v2->vfptr, 0, 0);
    v63->vfptr[122].__vecDelDtor((NiRefObject *)v63, 5u);
    iYOffo = (int)v63->vfptr;
    v64 = TextData::Get(0xE9F54255);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(iYOffo + 472))(v63, v64);
    v63->vfptr[60].__vecDelDtor((NiRefObject *)v63, 0);
    v65 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "QuitNor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v65, (NiAVObject *)&spNode.m_pObject->vfptr, "QuitClick");
    PgSprData::Add(v65, (NiAVObject *)&spNode.m_pObject->vfptr, "QuitOver");
    PgWinBut::CreateWin(uiLeft - v9, uiTop, v65, (PgWin *)&v2->vfptr, 8u, 0, 0);
    v66 = v65->m_akHitTester.m_pBase;
    v67 = v66->m_pObject->m_uiHeight;
    iYOffp = v66->m_pObject->m_uiWidth;
    v68 = Font::Get(MAIN_MENU);
    v69 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOffp, v67, v68, (PgWin *)&v2->vfptr, 0, 0);
    v69->vfptr[122].__vecDelDtor((NiRefObject *)v69, 5u);
    iYOffq = (int)v69->vfptr;
    v70 = TextData::Get(0xE2EB4C3E);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(iYOffq + 472))(v69, v70);
    v69->vfptr[60].__vecDelDtor((NiRefObject *)v69, 0);
    v71 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CancelNor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v71, (NiAVObject *)&spNode.m_pObject->vfptr, "CancelClick");
    PgSprData::Add(v71, (NiAVObject *)&spNode.m_pObject->vfptr, "CancelOver");
    PgWinBut::CreateWin(uiLeft - v9, uiTop, v71, (PgWin *)&v2->vfptr, 9u, 0, 0);
    v72 = v71->m_akHitTester.m_pBase;
    v73 = v72->m_pObject->m_uiHeight;
    iYOffr = v72->m_pObject->m_uiWidth;
    v74 = Font::Get(MAIN_MENU);
    v75 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOffr, v73, v74, (PgWin *)&v2->vfptr, 0, 0);
    v75->vfptr[122].__vecDelDtor((NiRefObject *)v75, 5u);
    v76 = v75->vfptr;
    v77 = TextData::Get(0x9FE7FBFC);
    v76[118].__vecDelDtor((NiRefObject *)v75, (unsigned int)v77);
    v75->vfptr[60].__vecDelDtor((NiRefObject *)v75, 0);
    ((void (__thiscall *)(SystemWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    v84 = -1;
    if ( spNode.m_pObject )
    {
      v78 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v78 )
          v78->vfptr->__vecDelDtor((NiRefObject *)v78, 1u);
      }
    }
    result = 1;
  }
  else
  {
    v17 = spNode.m_pObject;
    v84 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v17 )
      v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;
// A8CB04: using guessed type bool GameFrameWork::ms_bSpawnApps;

//----- (005A19E0) --------------------------------------------------------
SystemWin *__cdecl SystemWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  SystemWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x158u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&SystemWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&SystemWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (SystemWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9A5748: using guessed type void (__thiscall *SystemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A5764: using guessed type int (__thiscall *SystemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A1B20) --------------------------------------------------------
SystemWin *__thiscall SystemWin::`scalar deleting destructor'(SystemWin *this, unsigned int a2)
{
  SystemWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&SystemWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SystemWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A5748: using guessed type void (__thiscall *SystemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A5764: using guessed type int (__thiscall *SystemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A1B60) --------------------------------------------------------
void __thiscall MobIconWin::MobIconWin(MobIconWin *this)
{
  MobIconWin *v1; // esi@1

  v1 = this;
  IconWin::IconWin((IconWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&MobIconWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MobIconWin::`vftable'{for `IDirectMessenger'};
  IconWin::CreateGeometry((IconWin *)&v1->vfptr, 0x10u, 0x10u);
}
// 9A5D3C: using guessed type void (__thiscall *MobIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A5D5C: using guessed type int (__thiscall *MobIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A1BD0) --------------------------------------------------------
void __thiscall MobIconWin::~MobIconWin(MobIconWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&MobIconWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MobIconWin::`vftable'{for `IDirectMessenger'};
  IconWin::~IconWin((IconWin *)&this->vfptr);
}
// 9A5D3C: using guessed type void (__thiscall *MobIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A5D5C: using guessed type int (__thiscall *MobIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A1BF0) --------------------------------------------------------
bool __thiscall MobIconWin::Create(MobIconWin *this, int iXPos, int iYPos, PgWin *pkParent)
{
  return PgWinLRBut::Create((PgWinLRBut *)&this->vfptr, iXPos, iYPos, 0x10u, 0x10u, pkParent, 0, 0) != 0;
}

//----- (005A1C20) --------------------------------------------------------
void __thiscall AbStateIconWin::AbStateIconWin(AbStateIconWin *this)
{
  AbStateIconWin *v1; // esi@1

  v1 = this;
  IconWin::IconWin((IconWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&AbStateIconWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&AbStateIconWin::`vftable'{for `IDirectMessenger'};
  IconWin::CreateGeometry((IconWin *)&v1->vfptr, 0x14u, 0x14u);
}
// 9A5FC4: using guessed type void (__thiscall *AbStateIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A5FE4: using guessed type int (__thiscall *AbStateIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A1C90) --------------------------------------------------------
void __thiscall AbStateIconWin::~AbStateIconWin(AbStateIconWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&AbStateIconWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&AbStateIconWin::`vftable'{for `IDirectMessenger'};
  IconWin::~IconWin((IconWin *)&this->vfptr);
}
// 9A5FC4: using guessed type void (__thiscall *AbStateIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A5FE4: using guessed type int (__thiscall *AbStateIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A1CB0) --------------------------------------------------------
bool __thiscall AbStateIconWin::Create(AbStateIconWin *this, int iXPos, int iYPos, PgWin *pkParent)
{
  return PgWinLRBut::Create((PgWinLRBut *)&this->vfptr, iXPos, iYPos, 0x14u, 0x14u, pkParent, 0, 0) != 0;
}

//----- (005A1CE0) --------------------------------------------------------
void __thiscall TargetWin::ShowTOT(TargetWin *this)
{
  if ( this->m_bEnableTOT )
    ((void (__stdcall *)(_DWORD))this->m_pkTargetOfTheTargetWin->vfptr[64].__vecDelDtor)(1);
}

//----- (005A1D20) --------------------------------------------------------
void __thiscall TargetWin::SetSoulDefault(TargetWin *this, bool bShowCount)
{
  int v2; // edi@2
  signed int v3; // esi@2
  char *i; // ebx@2
  TargetWin *v5; // [sp+0h] [bp-4h]@1

  v5 = this;
  if ( this->m_apkSoulWin[0][0] )
  {
    v2 = 0;
    v3 = 0;
    for ( i = (char *)this->m_apkSoulWin; ; i = (char *)v5->m_apkSoulWin )
    {
      while ( 1 )
      {
        if ( v2 || bShowCount != 1 )
          ((void (__stdcall *)(_DWORD))this->m_apkSoulWin[0][v3 + 7 * v2]->vfptr[64].__vecDelDtor)(0);
        else
          (*(void (__stdcall **)(signed int))(**(_DWORD **)i + 256))(1);
        ++v3;
        i += 4;
        if ( v3 >= 7 )
          break;
        this = v5;
      }
      if ( ++v2 >= 2 )
        break;
      this = v5;
      v3 = 0;
    }
  }
}

//----- (005A1DB0) --------------------------------------------------------
int __thiscall TargetWin::GetSouldCount(TargetWin *this)
{
  signed int v1; // esi@1
  char *v2; // edi@1

  v1 = 0;
  v2 = (char *)this->m_apkSoulWin[1];
  do
  {
    if ( !(unsigned __int8)(*(int (**)(void))(**(_DWORD **)v2 + 260))() )
      break;
    ++v1;
    v2 += 4;
  }
  while ( v1 < 7 );
  return v1;
}

//----- (005A1DE0) --------------------------------------------------------
void __thiscall TargetOfTheTargetWin::TargetOfTheTargetWin(TargetOfTheTargetWin *this)
{
  TargetOfTheTargetWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_pkLevelOver = 0;
  v1->m_pkLevelText = 0;
  v1->m_pkCharNameText = 0;
  v1->m_bEnable = 0;
  v1->vfptr = (NiRefObjectVtbl *)&TargetOfTheTargetWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&TargetOfTheTargetWin::`vftable'{for `IDirectMessenger'};
  v1->m_iLevel = -1;
}
// 9A624C: using guessed type void (__thiscall *TargetOfTheTargetWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A626C: using guessed type int (__thiscall *TargetOfTheTargetWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A1E20) --------------------------------------------------------
void __thiscall TargetOfTheTargetWin::~TargetOfTheTargetWin(TargetOfTheTargetWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&TargetOfTheTargetWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&TargetOfTheTargetWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9A624C: using guessed type void (__thiscall *TargetOfTheTargetWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A626C: using guessed type int (__thiscall *TargetOfTheTargetWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A1E40) --------------------------------------------------------
void __thiscall TargetOfTheTargetWin::SetTargetLv(TargetOfTheTargetWin *this, int iLv)
{
  this->m_iLevel = iLv;
}

//----- (005A1E50) --------------------------------------------------------
void __stdcall TargetOfTheTargetWin::AbbreviateText(char *pResult, char *pTarget, int nAbbreviationSize)
{
  char *v4; // edi@1
  int v5; // eax@1
  int v6; // ebx@3
  char *v7; // esi@3
  char *v8; // esi@8
  char v9; // al@9

  v4 = pTarget;
  v5 = strlen(pTarget);
  if ( v5 && v5 >= nAbbreviationSize )
  {
    v6 = 0;
    v7 = pResult;
    while ( v6 < nAbbreviationSize )
    {
      if ( IsDBCSLeadByte(*v4) )
      {
        *v7 = *v4;
        v6 += 2;
        v7[1] = v4[1];
        v4 += 2;
        v7 += 2;
      }
      else
      {
        ++v6;
        *v7++ = *v4++;
      }
    }
    v8 = v7 - 1;
    do
      v9 = (v8++)[1];
    while ( v9 );
    *(_DWORD *)v8 = 3026478;
  }
  else
  {
    strcpy(pResult, pTarget);
  }
}

//----- (005A1EF0) --------------------------------------------------------
void __thiscall TargetOfTheTargetWin::SetEnable(TargetOfTheTargetWin *this, bool b)
{
  this->m_bEnable = b;
}

//----- (005A1F00) --------------------------------------------------------
void __thiscall TargetWin::ShowBarWin(TargetWin *this, int b)
{
  TargetWin *v2; // esi@1

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkHPBar->vfptr[64].__vecDelDtor)(b);
  ((void (__stdcall *)(_DWORD))v2->m_pkCbResWin->vfptr[64].__vecDelDtor)(b);
  ((void (__stdcall *)(_DWORD))v2->m_pkMobGradeWin->vfptr[64].__vecDelDtor)(b);
  if ( (_BYTE)b )
  {
    switch ( v2->m_kTargetClassID )
    {
      case 0x1A:
      case 0x1B:
        ((void (__stdcall *)(_DWORD))v2->m_pkLPBar->vfptr[64].__vecDelDtor)(b);
        ((void (__stdcall *)(_DWORD))v2->m_pkLPGround->vfptr[64].__vecDelDtor)(b);
        ((void (__stdcall *)(_DWORD))v2->m_pkSPGround->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkSPText->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkSPBar->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkSPBarStart->vfptr[64].__vecDelDtor)(0);
        v2->m_pkSPBarEnd->vfptr[64].__vecDelDtor((NiRefObject *)v2->m_pkSPBarEnd, 0);
        break;
      default:
        ((void (__stdcall *)(_DWORD))v2->m_pkLPText->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkLPBar->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkLPBarStart->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkLPBarEnd->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkLPGround->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkSPGround->vfptr[64].__vecDelDtor)(b);
        v2->m_pkSPBar->vfptr[64].__vecDelDtor((NiRefObject *)v2->m_pkSPBar, b);
        break;
    }
  }
  else
  {
    ((void (__stdcall *)(_DWORD))v2->m_pkLPGround->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkSPGround->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkSPBar->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkSPBarStart->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkSPBarEnd->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkLPBar->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkLPBarStart->vfptr[64].__vecDelDtor)(0);
    v2->m_pkLPBarEnd->vfptr[64].__vecDelDtor((NiRefObject *)v2->m_pkLPBarEnd, 0);
  }
}

//----- (005A2130) --------------------------------------------------------
void __thiscall TargetWin::OnMouseEvent(TargetWin *this, PgWin::PG_MOUSE_EVENT eMouseEvent, PgWin *pkWin)
{
  TargetWin *v3; // esi@1
  unsigned int v4; // ecx@2
  unsigned int v5; // eax@4

  v3 = this;
  if ( eMouseEvent == 4 )
  {
    v4 = g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1];
    if ( v4 )
    {
      if ( *(_BYTE *)(v4 + 2664) )
      {
        v5 = (*(int (**)(void))(*(_DWORD *)v4 + 84))();
        PgFrameWork::AddMsg(v3->m_pkFrameWork, 0x80u, v5, 0);
      }
    }
  }
}

//----- (005A2180) --------------------------------------------------------
void __thiscall TargetWin::Show(TargetWin *this, bool b)
{
  if ( b )
    this->m_uFlags &= 0xFFFEu;
  else
    this->m_uFlags |= 1u;
}

//----- (005A21A0) --------------------------------------------------------
void __thiscall TargetWin::SetTOTLv(TargetWin *this, int iLv)
{
  this->m_pkTargetOfTheTargetWin->m_iLevel = iLv;
}

//----- (005A21C0) --------------------------------------------------------
void __thiscall TargetWin::SetSoulCount(TargetWin *this, int Count, int bShow, bool bShowEff)
{
  TargetWin *v4; // esi@1
  char *v5; // ebx@1
  signed int v6; // edi@1
  int v7; // ebx@4
  char *v8; // esi@5
  SpEffect **v9; // esi@11
  int v10; // ebx@11
  SpEffect **v11; // esi@16
  int v12; // edi@16
  TargetWin *v13; // [sp+Ch] [bp-8h]@1
  char *v14; // [sp+10h] [bp-4h]@1

  v4 = this;
  v5 = (char *)this->m_apkSoulWin[1];
  v13 = this;
  v6 = 0;
  v14 = (char *)this->m_apkSoulWin[1];
  do
  {
    if ( !(unsigned __int8)(*(int (**)(void))(**(_DWORD **)v5 + 260))() )
      break;
    ++v6;
    v5 += 4;
  }
  while ( v6 < 7 );
  TargetWin::SetSoulDefault(v4, bShow);
  v7 = Count;
  if ( Count > 0 )
  {
    v8 = v14;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v8 - 7) + 256))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v8 + 256))(bShow);
      v8 += 4;
      --Count;
    }
    while ( Count );
    v4 = v13;
  }
  if ( (_BYTE)bShow == 1 && bShowEff == 1 )
  {
    if ( v6 >= v7 )
    {
      if ( v6 > v7 && v7 < v6 )
      {
        v11 = (SpEffect **)((char *)v4->m_apkSoulWinEffect + 4 * v7);
        v12 = v6 - v7;
        do
        {
          SpEffect::Start(*v11, (NiNode *)&(*(v11 - 14))->m_spEffect.m_pObject);
          ++v11;
          --v12;
        }
        while ( v12 );
      }
    }
    else
    {
      v9 = &v4->m_apkSoulWinEffect[1][v6];
      v10 = v7 - v6;
      do
      {
        SpEffect::Start(*v9, (NiNode *)&(*(v9 - 14))->m_spEffect.m_pObject);
        ++v9;
        --v10;
      }
      while ( v10 );
    }
  }
}

//----- (005A22A0) --------------------------------------------------------
void __thiscall TargetWin::OnMinButClick(TargetWin *this)
{
  TargetWin *v1; // esi@1
  PgFrameWork *v2; // eax@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkMinButton->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkMaxButton->vfptr[64].__vecDelDtor)(1);
  v2 = v1->m_pkFrameWork;
  v1->m_bEnableTOT = 0;
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)v2[17].m_kMsgQ.m_uiTail);
  MachineOpt::ms_kUserLoginOption.bTargetOfTerget = v1->m_bEnableTOT;
}

//----- (005A2300) --------------------------------------------------------
void __thiscall TargetWin::OnMaxButClick(TargetWin *this)
{
  TargetWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkMinButton->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkMaxButton->vfptr[64].__vecDelDtor)(0);
  v1->m_bEnableTOT = 1;
  if ( CharMgr::GetChar(&g_kCharMgr, g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[7].dwEffectIndex[1]) )
  {
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)v1->m_pkFrameWork[17].m_kMsgQ.m_uiTail);
    MachineOpt::ms_kUserLoginOption.bTargetOfTerget = v1->m_bEnableTOT;
  }
  else
  {
    MachineOpt::ms_kUserLoginOption.bTargetOfTerget = v1->m_bEnableTOT;
  }
}

//----- (005A2380) --------------------------------------------------------
void __thiscall TargetWin::ReSetTOT(TargetWin *this, bool bTOT)
{
  if ( bTOT == 1 )
    TargetWin::OnMaxButClick(this);
  else
    TargetWin::OnMinButClick(this);
}

//----- (005A23A0) --------------------------------------------------------
void __thiscall TargetWin::PlayerTargetBaseTexture(TargetWin *this, Char *pkTargetChar)
{
  TargetWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1

  v2 = this;
  v3 = PortraitTextureBuffer::GetOtherCharPortrait(pkTargetChar);
  if ( (unsigned __int8)((int (__thiscall *)(_DWORD))pkTargetChar->vfptr[20].Deaffect)(pkTargetChar) )
  {
    PgSpr::SetTexture(v2->m_pkMobPortrait->m_spSpr.m_pObject, (NiTexture *)&v3->vfptr);
    ((void (__stdcall *)(_DWORD))v2->m_pkMobPortrait->vfptr[64].__vecDelDtor)(1);
    ((void (__cdecl *)(_DWORD))v2->m_pkPortrait->vfptr[64].__vecDelDtor)(0);
  }
  else
  {
    MaskedWin::SetBaseTexture(v2->m_pkPortrait, (NiTexture *)&v3->vfptr);
    ((void (__stdcall *)(_DWORD))v2->m_pkMobPortrait->vfptr[64].__vecDelDtor)(0);
    ((void (__cdecl *)(_DWORD))v2->m_pkPortrait->vfptr[64].__vecDelDtor)(1);
  }
}

//----- (005A2430) --------------------------------------------------------
void __thiscall TargetWin::OnCommand(TargetWin *this, unsigned int wParam, int lParam)
{
  if ( wParam == 10001 )
  {
    TargetWin::OnMinButClick(this);
  }
  else if ( wParam == 10002 )
  {
    TargetWin::OnMaxButClick(this);
  }
}

//----- (005A2460) --------------------------------------------------------
char __thiscall TargetOfTheTargetWin::Create(TargetOfTheTargetWin *this, PgFrameWork *pkFrameWork)
{
  TargetOfTheTargetWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  LONG v5; // eax@3
  NiTexturePalette *v7; // ebx@11
  const char *v8; // eax@13
  PgSprData *v9; // eax@14
  NiAVObject *v10; // eax@15
  NiProperty *v11; // ebx@15
  NiRefObjectVtbl *v12; // eax@17
  NiSourceTexture *v13; // eax@18
  PgSprData *v14; // eax@21
  PgWinSpr *v15; // eax@21
  PgSprData *v16; // eax@21
  NiShader *v17; // eax@21
  NiTriShape *v18; // ebx@21
  MaskedWin *v19; // eax@21
  NiNode *v20; // ecx@21
  PgSprData *v21; // eax@21
  PgWinSpr *v22; // eax@21
  PgSprData *v23; // eax@21
  PgWinSpr *v24; // eax@21
  PgSprData *v25; // eax@23
  PgWinSpr *v26; // eax@23
  PgSprData *v27; // eax@25
  PgWinSpr *v28; // eax@25
  PgSprData *v29; // eax@28
  PgWinBar *v30; // eax@28
  PgSprData *v31; // eax@28
  PgWinBar *v32; // eax@28
  PgSprData *v33; // eax@28
  PgWinBar *v34; // eax@28
  PgFont *v35; // eax@28
  PgWinText *v36; // eax@28
  PgWin *v37; // ST28_4@28
  PgFont *v38; // eax@28
  PgWinAbbreviateText *v39; // eax@28
  PgSprData *v40; // eax@28
  NiSourceTexture *pkMainTexture; // [sp+10h] [bp-24h]@8
  unsigned int uiWidth; // [sp+14h] [bp-20h]@27
  unsigned int uiHeight; // [sp+18h] [bp-1Ch]@27
  NiPointer<NiNode> spNode; // [sp+1Ch] [bp-18h]@1
  int uiLeft; // [sp+20h] [bp-14h]@14
  int uiTop; // [sp+24h] [bp-10h]@14
  int v47; // [sp+30h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v47 = 0;
  v3 = MenuTexMgr::GetTexture(0x12u);
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v47 = -1;
    if ( spNode.m_pObject )
    {
      v5 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
      goto LABEL_4;
    }
    return 0;
  }
  pkMainTexture = MenuTexMgr::GetTexture(4u);
  if ( !pkMainTexture )
  {
    v4 = spNode.m_pObject;
    v47 = -1;
    if ( spNode.m_pObject )
    {
      v5 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
LABEL_4:
      if ( !v5 )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    return 0;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "Game\\TargetOppositeWin.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "TargetOfTheTargetWin", 0) )
  {
LABEL_20:
    v47 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  v10 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("EventPanel");
  v11 = NiAVObject::GetProperty(v10, 8);
  pkFrameWork = (PgFrameWork *)v11;
  if ( v11 )
    InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
  v12 = v11[1].m_spControllers.m_pObject->vfptr;
  LOBYTE(v47) = 1;
  if ( !v12 )
    goto LABEL_31;
  v13 = (NiSourceTexture *)v12[1].__vecDelDtor;
  if ( !v13 )
    goto LABEL_31;
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "EventPanel", &uiLeft, &uiTop, v13);
  v15 = PgWinSpr::CreateWin(uiLeft, uiTop, v14, (PgWin *)&v2->vfptr, 0, 0);
  v15->vfptr[60].__vecDelDtor((NiRefObject *)v15, 0);
  v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Face_Mask", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft, uiTop, v16, (PgWin *)&v2->vfptr, 0, 0);
  v17 = (NiShader *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("FaceCut_Mask");
  v18 = (NiTriShape *)CPostProcessEffect::DynamicCast(&NiTriShape::m_RTTI, v17);
  PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "FaceCut_Mask", &uiLeft, &uiTop, 0);
  v19 = MaskedWin::CreateWin(uiLeft, uiTop, v18, (PgWin *)&v2->vfptr);
  v20 = spNode.m_pObject;
  v2->m_pkPortrait = v19;
  v21 = PgSprData::Create((NiAVObject *)&v20->vfptr, "FaceCut_Mon", &uiLeft, &uiTop, 0);
  v22 = PgWinSpr::CreateWin(uiLeft, uiTop, v21, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkMobPortrait = v22;
  v22->vfptr[64].__vecDelDtor((NiRefObject *)v22, 0);
  v23 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, v3);
  v24 = PgWinSpr::CreateWin(uiLeft, uiTop, v23, (PgWin *)&v2->vfptr, 0, 0);
  if ( v24 )
    v24->vfptr[60].__vecDelDtor((NiRefObject *)v24, 0);
  v25 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, v3);
  v26 = PgWinSpr::CreateWin(uiLeft, uiTop, v25, (PgWin *)&v2->vfptr, 0, 0);
  if ( v26 )
    v26->vfptr[60].__vecDelDtor((NiRefObject *)v26, 0);
  v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel03", &uiLeft, &uiTop, v3);
  v28 = PgWinSpr::CreateWin(uiLeft, uiTop, v27, (PgWin *)&v2->vfptr, 0, 0);
  if ( v28 )
    v28->vfptr[60].__vecDelDtor((NiRefObject *)v28, 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "Fill_HP_02",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
  {
LABEL_31:
    LOBYTE(v47) = 0;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkFrameWork);
    goto LABEL_20;
  }
  v29 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_HP_02", &uiLeft, &uiTop, v3);
  v30 = PgWinBar::CreateWin(uiLeft, uiTop, v29, (PgWin *)&v2->vfptr, BGT_RIGHT);
  v2->m_pkHPBar = v30;
  ((void (__thiscall *)(PgWinBar *))v30->vfptr[60].__vecDelDtor)(v30);
  v31 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_HP_01", &uiLeft, &uiTop, v3);
  v32 = PgWinBar::CreateWin(uiLeft, uiTop, v31, (PgWin *)&v2->vfptr, BGT_RIGHT);
  v2->m_pkHPBarEnd = (PgWinSpr *)v32;
  ((void (__thiscall *)(PgWinBar *))v32->vfptr[64].__vecDelDtor)(v32);
  ((void (__cdecl *)(_DWORD, signed int, _DWORD))v2->m_pkHPBarEnd->vfptr[60].__vecDelDtor)(0, 1, 0);
  v33 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_HP_03", &uiLeft, &uiTop, v3);
  v34 = PgWinBar::CreateWin(uiLeft, uiTop, v33, (PgWin *)&v2->vfptr, BGT_RIGHT);
  v2->m_pkHPBarStart = (PgWinSpr *)v34;
  ((void (__thiscall *)(PgWinBar *))v34->vfptr[64].__vecDelDtor)(v34);
  ((void (__stdcall *)(_DWORD))v2->m_pkHPBarStart->vfptr[60].__vecDelDtor)(0);
  PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Level", &uiLeft, &uiTop, 0);
  v35 = Font::Get(SMALL);
  v36 = PgWinText::CreateWin(uiLeft - 5, uiTop, uiWidth, uiHeight, v35, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkLevelText = v36;
  v36->vfptr[122].__vecDelDtor((NiRefObject *)v36, 4u);
  PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CharName", &uiLeft, &uiTop, 0);
  v37 = g_pkToolTipWin;
  v38 = Font::Get(SMALL);
  v39 = PgWinAbbreviateText::CreateWin(
          uiLeft,
          uiTop + 2,
          uiWidth,
          uiHeight,
          v38,
          (PgWin *)&v2->vfptr,
          0,
          0,
          0,
          1,
          v37,
          0x1Eu);
  v2->m_pkCharNameText = v39;
  v39->vfptr[122].__vecDelDtor((NiRefObject *)v39, 4u);
  v40 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Level_over", &uiLeft, &uiTop, pkMainTexture);
  v2->m_pkLevelOver = PgWinSpr::CreateWin(uiLeft, uiTop, v40, (PgWin *)&v2->vfptr, 0, 0);
  LOBYTE(v47) = 0;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkFrameWork);
  v47 = -1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005A29C0) --------------------------------------------------------
void __thiscall TargetOfTheTargetWin::PlayerTargetBaseTexture(TargetOfTheTargetWin *this, Char *pkTargetChar)
{
  TargetOfTheTargetWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1

  v2 = this;
  v3 = PortraitTextureBuffer::GetOtherCharPortrait(pkTargetChar);
  if ( (unsigned __int8)((int (__thiscall *)(_DWORD))pkTargetChar->vfptr[20].Deaffect)(pkTargetChar) )
  {
    PgSpr::SetTexture(v2->m_pkMobPortrait->m_spSpr.m_pObject, (NiTexture *)&v3->vfptr);
    ((void (__stdcall *)(_DWORD))v2->m_pkMobPortrait->vfptr[64].__vecDelDtor)(1);
    ((void (__cdecl *)(_DWORD))v2->m_pkPortrait->vfptr[64].__vecDelDtor)(0);
  }
  else
  {
    MaskedWin::SetBaseTexture(v2->m_pkPortrait, (NiTexture *)&v3->vfptr);
    ((void (__stdcall *)(_DWORD))v2->m_pkMobPortrait->vfptr[64].__vecDelDtor)(0);
    ((void (__cdecl *)(_DWORD))v2->m_pkPortrait->vfptr[64].__vecDelDtor)(1);
  }
}

//----- (005A2A50) --------------------------------------------------------
void __userpurge TargetWin::SetTargetClassInfo(TargetWin *this@<ecx>, int a2@<ebx>, Char *pkTargetChar)
{
  Char *v3; // edi@1
  TargetWin *v4; // esi@1
  int v5; // ST10_4@2
  signed int v6; // ebx@2
  int v7; // edi@3
  int *v8; // eax@5
  int v9; // edi@6
  char *v10; // eax@8
  char *v11; // eax@9
  char *v12; // eax@10
  char *v13; // eax@11
  char *v14; // eax@12
  char *v15; // eax@15
  char *v16; // eax@23
  bool v17; // zf@28
  void *(__thiscall *v18)(NiRefObject *, unsigned int); // eax@28
  unsigned int v19; // eax@31
  char v20; // al@37
  char v21; // al@37
  NiSourceTexture *v22; // edi@47
  int v23; // [sp+8h] [bp-8h]@3
  int iMGIndex; // [sp+Ch] [bp-4h]@2
  int nDiffLV; // [sp+18h] [bp+8h]@31

  v3 = pkTargetChar;
  v4 = this;
  if ( pkTargetChar )
  {
    v5 = a2;
    v6 = 54;
    iMGIndex = 54;
    ((void (__stdcall *)(signed int, int))this->m_pkMobGradeWin->vfptr[60].__vecDelDtor)(1, v5);
    ((void (__stdcall *)(signed int))v4->m_pkCbResWin->vfptr[60].__vecDelDtor)(1);
    if ( (unsigned __int8)((int (__thiscall *)(Char *))pkTargetChar->vfptr[1].Affect)(pkTargetChar) )
    {
      v7 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
      v23 = pkTargetChar->m_kCharShape.m_kMobID;
      if ( !(unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 16))(
                               ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                               v23) )
        goto LABEL_47;
      if ( (unsigned __int16)v23 > *(_WORD *)(v7 + 200) )
        goto LABEL_47;
      v8 = (int *)(*(_DWORD *)(v7 + 196) + 4 * (unsigned __int16)v23);
      if ( !*v8 )
        goto LABEL_47;
      v9 = *v8;
      if ( !*v8 )
        goto LABEL_47;
      switch ( *(_DWORD *)(v9 + 95) )
      {
        case 0:
          iMGIndex = 16;
          v10 = (char *)TextData::Get(0x23B3846u);
          PgWin::SetToolTipWinText((PgWin *)&v4->m_pkMobGradeWin->vfptr, v10);
          break;
        case 4:
          iMGIndex = 17;
          v11 = (char *)TextData::Get(0xFF2B4B41);
          PgWin::SetToolTipWinText((PgWin *)&v4->m_pkMobGradeWin->vfptr, v11);
          break;
        case 3:
          iMGIndex = 18;
          v12 = (char *)TextData::Get(0xE606394C);
          PgWin::SetToolTipWinText((PgWin *)&v4->m_pkMobGradeWin->vfptr, v12);
          break;
        case 1:
          iMGIndex = 19;
          v13 = (char *)TextData::Get(0xFB2A3C41);
          PgWin::SetToolTipWinText((PgWin *)&v4->m_pkMobGradeWin->vfptr, v13);
          break;
        case 2:
          iMGIndex = 20;
          v14 = (char *)TextData::Get(0xF0003D4D);
          PgWin::SetToolTipWinText((PgWin *)&v4->m_pkMobGradeWin->vfptr, v14);
          break;
        default:
          ((void (__stdcall *)(_DWORD))v4->m_pkMobGradeWin->vfptr[60].__vecDelDtor)(0);
          break;
      }
      switch ( *(_DWORD *)(v9 + 99) )
      {
        case 5:
          v6 = 0;
          v15 = (char *)TextData::Get(0xE6F5EDEF);
          goto LABEL_46;
        case 0:
          v6 = 1;
          v15 = (char *)TextData::Get(0xA9F5E9F8);
          goto LABEL_46;
        case 3:
          v6 = 2;
          v15 = (char *)TextData::Get(0x99F5FBEC);
          goto LABEL_46;
        case 4:
          v6 = 3;
          v15 = (char *)TextData::Get(0xEE353644);
          goto LABEL_46;
        case 1:
          v6 = 4;
          v15 = (char *)TextData::Get(0xE134373B);
          goto LABEL_46;
        case 2:
          v6 = 5;
          v15 = (char *)TextData::Get(0xF8FBFAF4);
          goto LABEL_46;
        case 0x10:
          v6 = 8;
          v15 = (char *)TextData2::Get(0x99EFF101);
          goto LABEL_46;
        case 6:
          if ( Char::IsNPC(pkTargetChar) == 1 )
          {
            v6 = 7;
            v16 = (char *)TextData2::Get(0xF3FA0730);
            PgWin::SetToolTipWinText((PgWin *)&v4->m_pkCbResWin->vfptr, v16);
            v4->m_kTargetClassID = 0;
          }
          goto LABEL_47;
        case 8:
        case 9:
        case 0xA:
        case 0x15:
        case 0x16:
          v6 = 6;
          v15 = (char *)TextData2::Get(0xE6062C4C);
          goto LABEL_46;
        default:
          break;
      }
    }
    else
    {
      if ( !(unsigned __int8)((int (__thiscall *)(Char *))pkTargetChar->vfptr[20].AddAbStateByAbstateIndex)(pkTargetChar) )
      {
        v17 = (unsigned __int8)((int (__thiscall *)(Char *))pkTargetChar->vfptr[20].DeleteAbStateByAbstateIndex)(pkTargetChar) == 0;
        v18 = v4->m_pkMobGradeWin->vfptr[60].__vecDelDtor;
        if ( v17 )
        {
          ((void (__cdecl *)(_DWORD))v18)(0);
          if ( v4->m_kTempLV )
          {
            v19 = User::Lv(&g_kUser);
            nDiffLV = v19 - v4->m_kTempLV;
            if ( v19 != v4->m_kTempLV )
            {
              ((void (__stdcall *)(signed int))v4->m_pkMobGradeWin->vfptr[64].__vecDelDtor)(1);
              if ( nDiffLV >= -20 )
              {
                if ( nDiffLV >= -2 )
                  iMGIndex = ((unsigned int)(nDiffLV - 3) > 0x11) + 51;
                else
                  iMGIndex = 48;
              }
              else
              {
                iMGIndex = 49;
              }
            }
          }
          v20 = Char::GetClass(v3);
          v21 = CharClass::GetBaseClassID(v20);
          v4->m_kTargetClassID = v21;
          switch ( v21 )
          {
            case 1:
              v6 = 32;
              break;
            case 6:
              v6 = 33;
              break;
            case 0x10:
              v6 = 34;
              break;
            case 0xB:
              v6 = 35;
              break;
            case 0x15:
              v6 = 36;
              break;
            case 0x1A:
              v6 = 37;
              break;
            default:
              ((void (__stdcall *)(_DWORD))v4->m_pkCbResWin->vfptr[60].__vecDelDtor)(0);
              break;
          }
          v15 = (char *)CharClass::GetLocalName(v4->m_kTargetClassID);
        }
        else
        {
          ((void (__cdecl *)(_DWORD))v18)(0);
          v6 = 10;
          v15 = (char *)TextData3::Get(0xA9AFA8FB);
        }
LABEL_46:
        PgWin::SetToolTipWinText((PgWin *)&v4->m_pkCbResWin->vfptr, v15);
        goto LABEL_47;
      }
      ((void (__stdcall *)(_DWORD))v4->m_pkMobGradeWin->vfptr[60].__vecDelDtor)(0);
    }
    ((void (__stdcall *)(_DWORD))v4->m_pkCbResWin->vfptr[60].__vecDelDtor)(0);
LABEL_47:
    v4->m_pkMobGradeWin->m_pkToolTipWin = g_pkToolTipWin;
    v4->m_pkCbResWin->m_pkToolTipWin = g_pkToolTipWin;
    v22 = MenuTexMgr::GetTexture(0x12u);
    ((void (__stdcall *)(NiSourceTexture *, int, signed int))v4->m_pkMobGradeWin->vfptr[146].__vecDelDtor)(
      v22,
      iMGIndex,
      16);
    ((void (__stdcall *)(NiSourceTexture *, signed int, signed int, signed int))v4->m_pkCbResWin->vfptr[146].__vecDelDtor)(
      v22,
      v6,
      16,
      16);
  }
}
// 5A2A50: could not find valid save-restore pair for ebx
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;

//----- (005A2F10) --------------------------------------------------------
void __thiscall TargetOfTheTargetWin::UpdateMeWin(TargetOfTheTargetWin *this, float fCurTime)
{
  TargetOfTheTargetWin *v2; // esi@1
  Char *v3; // edi@1
  Char *v4; // eax@4
  Char *v5; // ebx@4
  MobInfo *v6; // eax@5
  MobType v7; // eax@6
  NiRefObjectVtbl *v8; // ebx@13
  int v9; // eax@13
  unsigned int v10; // ebx@13
  char *v11; // eax@17
  float fCurVal; // ST1C_4@21
  unsigned int v13; // eax@21
  float fMaxVal; // ST18_4@21
  signed int v15; // eax@21
  bool v16; // zf@21
  bool v17; // sf@21
  void *(__thiscall *v18)(NiRefObject *, unsigned int); // eax@21
  unsigned int v19; // ebx@24
  unsigned int v20; // eax@25
  void *(__thiscall *v21)(NiRefObject *, unsigned int); // eax@26
  signed int v22; // eax@28
  AbStateInfecteeVtbl *v23; // edx@28
  float v24; // ST1C_4@28
  signed int v25; // eax@28
  float v26; // ST18_4@28
  int v27; // eax@28
  void *(__thiscall *v28)(NiRefObject *, unsigned int); // eax@28
  int v29; // ebx@31
  MobViewInfo *v30; // eax@36
  unsigned int v31; // eax@37
  CharNPC_ViewInfo *v32; // ebx@38
  NiSourceTexture *v33; // eax@40
  NiSourceTexture *v34; // eax@41
  NiSourceTexture *v35; // eax@43
  NiTexture *v36; // ebx@45
  NiSourceTexture *v37; // eax@50
  PROTO_NC_BAT_TARGET_REQ kProto; // [sp+2Ch] [bp-4h]@10

  v2 = this;
  v3 = CharMgr::GetChar(&g_kCharMgr, g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[7].dwEffectIndex[1]);
  if ( (unsigned __int8)((int (__stdcall *)(unsigned int, int))v2->m_pkPortrait->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY) )
  {
    if ( !g_pkMouse->m_akButtons[0].m_bPressed )
    {
      if ( g_pkMouse->m_akButtons[0].m_bLastPressed )
      {
        v4 = CharMgr::GetChar(
               &g_kCharMgr,
               g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[7].dwEffectIndex[1]);
        v5 = v4;
        if ( v4 )
        {
          v6 = Char::GetMobInfo(v4);
          if ( !v6 || (v7 = v6->Type, v7 != 12) && v7 != 27 && v7 != 29 && v7 != 13 )
          {
            MainChar::SetTargetChar((MainChar *)g_pkMainChar, v5);
            kProto.target = g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[7].dwEffectIndex[1];
            NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 9u, 1u, &kProto, 2);
          }
          return;
        }
      }
    }
  }
  if ( !v3 || Char::IsLinkGate(v3) )
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
    return;
  }
  v8 = v2->m_pkCharNameText->vfptr;
  v9 = ((int (__thiscall *)(Char *))v3->vfptr[2].DeleteAbStateByAbstateIndex)(v3);
  v8[118].__vecDelDtor((NiRefObject *)v2->m_pkCharNameText, v9);
  v10 = v2->m_iLevel;
  if ( User::Lv(&g_kUser) + 10 >= v10 )
  {
    if ( v10 )
    {
      *(_DWORD *)&kProto.target = v2->m_pkLevelText->vfptr;
      v11 = fs("%d", v10);
      (*(void (__thiscall **)(PgWinText *, char *))(*(_DWORD *)&kProto.target + 472))(v2->m_pkLevelText, v11);
    }
    else
    {
      ((void (__stdcall *)(const char *))v2->m_pkLevelText->vfptr[118].__vecDelDtor)("-");
    }
    ((void (__stdcall *)(signed int))v2->m_pkLevelText->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v2->m_pkLevelOver->vfptr[64].__vecDelDtor)(0);
  }
  else
  {
    ((void (__stdcall *)(_DWORD))v2->m_pkLevelText->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(void *))v2->m_pkLevelText->vfptr[118].__vecDelDtor)(&unk_9A59AA);
    ((void (__stdcall *)(signed int))v2->m_pkLevelOver->vfptr[64].__vecDelDtor)(1);
  }
  if ( v2->m_pkHPBar )
  {
    if ( g_pkMainChar->m_kHandle == LOWORD(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[7].dwEffectIndex[1]) )
    {
      fCurVal = (double)(signed int)User::HP(&g_kUser);
      v13 = User::MaxHP(&g_kUser);
      *(_DWORD *)&kProto.target = v13;
      fMaxVal = (double)(signed int)v13;
      PgWinBar::SetValue(v2->m_pkHPBar, fMaxVal, fCurVal);
      v15 = User::HP(&g_kUser);
      v16 = v15 == 0;
      v17 = v15 < 0;
      v18 = v2->m_pkHPBarEnd->vfptr[64].__vecDelDtor;
      if ( v17 || v16 )
        ((void (__stdcall *)(_DWORD))v18)(0);
      else
        ((void (__stdcall *)(signed int))v18)(1);
      v19 = User::MaxHP(&g_kUser);
      if ( v19 == User::HP(&g_kUser) )
      {
        v20 = User::MaxHP(&g_kUser);
        goto LABEL_26;
      }
    }
    else
    {
      v22 = ((int (__thiscall *)(Char *))v3->vfptr[5].SetAbStateProperty)(v3);
      v23 = v3->vfptr;
      *(_DWORD *)&kProto.target = v22;
      v24 = (double)v22;
      v25 = v23[5].IsVisible((AbStateInfectee *)v3);
      *(_DWORD *)&kProto.target = v25;
      v26 = (double)v25;
      PgWinBar::SetValue(v2->m_pkHPBar, v26, v24);
      v27 = ((int (__thiscall *)(Char *))v3->vfptr[5].SetAbStateProperty)(v3);
      v16 = v27 == 0;
      v17 = v27 < 0;
      v28 = v2->m_pkHPBarEnd->vfptr[64].__vecDelDtor;
      if ( v17 || v16 )
        ((void (__stdcall *)(_DWORD))v28)(0);
      else
        ((void (__stdcall *)(signed int))v28)(1);
      v29 = v3->vfptr[5].IsVisible((AbStateInfectee *)v3);
      if ( ((int (__thiscall *)(_DWORD))v3->vfptr[5].SetAbStateProperty)(v3) == v29 )
      {
        v20 = v3->vfptr[5].IsVisible((AbStateInfectee *)v3);
LABEL_26:
        v16 = v20 == 0;
        v21 = v2->m_pkHPBarStart->vfptr[64].__vecDelDtor;
        if ( !v16 )
        {
          ((void (__stdcall *)(signed int))v21)(1);
          goto LABEL_35;
        }
LABEL_34:
        ((void (__stdcall *)(_DWORD))v21)(0);
        goto LABEL_35;
      }
    }
    v21 = v2->m_pkHPBarStart->vfptr[64].__vecDelDtor;
    goto LABEL_34;
  }
LABEL_35:
  if ( (unsigned __int8)((int (__thiscall *)(Char *))v3->vfptr[1].Affect)(v3) )
  {
    ((void (__stdcall *)(_DWORD))v2->m_pkPortrait->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkMobPortrait->vfptr[64].__vecDelDtor)(0);
    v30 = MobViewInfoTab::GetByID(v3->m_kCharShape.m_kMobID);
    if ( v30 && (v31 = v30->NpcViewIndex, (_WORD)v31) )
    {
      v32 = NPCViewInfoTab::GetByID(v31);
      if ( v32->Class == 5 )
      {
        ((void (__stdcall *)(signed int))v2->m_pkMobPortrait->vfptr[64].__vecDelDtor)(1);
        v33 = PortraitTextureBuffer::GetMobPortrait(v32->Gender);
        PgSpr::SetTexture(v2->m_pkMobPortrait->m_spSpr.m_pObject, (NiTexture *)&v33->vfptr);
      }
      else
      {
        ((void (__stdcall *)(signed int))v2->m_pkPortrait->vfptr[64].__vecDelDtor)(1);
        TargetOfTheTargetWin::PlayerTargetBaseTexture(v2, v3);
      }
    }
    else
    {
      ((void (__stdcall *)(signed int))v2->m_pkMobPortrait->vfptr[64].__vecDelDtor)(1);
      v34 = PortraitTextureBuffer::GetMobPortrait(v3->m_kCharShape.m_kMobID);
      PgSpr::SetTexture(v2->m_pkMobPortrait->m_spSpr.m_pObject, (NiTexture *)&v34->vfptr);
    }
  }
  else
  {
    if ( v3 == g_pkMainChar )
      v35 = PortraitTextureBuffer::GetOtherCharPortrait(g_pkMainChar);
    else
      v35 = PortraitTextureBuffer::GetOtherCharPortrait(v3);
    v36 = (NiTexture *)v35;
    if ( (unsigned __int8)((int (__thiscall *)(Char *))v3->vfptr[20].Deaffect)(v3) )
    {
      PgSpr::SetTexture(v2->m_pkMobPortrait->m_spSpr.m_pObject, v36);
      ((void (__stdcall *)(_DWORD))v2->m_pkMobPortrait->vfptr[64].__vecDelDtor)(1);
      ((void (__cdecl *)(_DWORD))v2->m_pkPortrait->vfptr[64].__vecDelDtor)(0);
    }
    else
    {
      MaskedWin::SetBaseTexture(v2->m_pkPortrait, v36);
      ((void (__stdcall *)(_DWORD))v2->m_pkMobPortrait->vfptr[64].__vecDelDtor)(0);
      ((void (__cdecl *)(signed int))v2->m_pkPortrait->vfptr[64].__vecDelDtor)(1);
    }
  }
  if ( PgWin::IsVisible((PgWin *)&v2->vfptr) && Char::IsLinkGate(v3) )
  {
    ((void (__stdcall *)(_DWORD))v2->m_pkMobPortrait->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(signed int))v2->m_pkPortrait->vfptr[64].__vecDelDtor)(1);
    v37 = PortraitTextureBuffer::GetDefaultTexture();
    MaskedWin::SetBaseTexture(v2->m_pkPortrait, (NiTexture *)&v37->vfptr);
  }
}
// A8C4A8: using guessed type struct NiInputMouse *g_pkMouse;

//----- (005A3430) --------------------------------------------------------
MobIconWin *__cdecl MobIconWin::CreateWin(int iXPos, int iYPos, PgWin *pkParent)
{
  PgWin *v3; // eax@1
  IconWin *v4; // esi@1
  PgWin *v5; // edi@8
  MobIconWin *v6; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x17Cu);
  v4 = (IconWin *)v3;
  result.m_pObject = v3;
  v8 = 0;
  if ( v3 )
  {
    IconWin::IconWin((IconWin *)v3);
    LOBYTE(v8) = 1;
    v4->vfptr = (NiRefObjectVtbl *)&MobIconWin::`vftable'{for `NiNode'};
    v4->vfptr = (IDirectMessengerVtbl *)&MobIconWin::`vftable'{for `IDirectMessenger'};
    IconWin::CreateGeometry(v4, 0x10u, 0x10u);
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v8 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, (PgWin *)&v4->vfptr);
  if ( (unsigned __int8)((int (__thiscall *)(IconWin *, int, int, PgWin *))v4->vfptr[152].__vecDelDtor)(
                          v4,
                          iXPos,
                          iYPos,
                          pkParent) )
  {
    ((void (__thiscall *)(IconWin *))v4->vfptr[89].__vecDelDtor)(v4);
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = (MobIconWin *)v4;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, (PgWin *)&v4->vfptr);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = 0;
  }
  return v6;
}
// 9A5D3C: using guessed type void (__thiscall *MobIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A5D5C: using guessed type int (__thiscall *MobIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A3590) --------------------------------------------------------
AbStateIconWin *__cdecl AbStateIconWin::CreateWin(int iXPos, int iYPos, PgWin *pkParent)
{
  PgWin *v3; // eax@1
  IconWin *v4; // esi@1
  PgWin *v5; // edi@8
  AbStateIconWin *v6; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x17Cu);
  v4 = (IconWin *)v3;
  result.m_pObject = v3;
  v8 = 0;
  if ( v3 )
  {
    IconWin::IconWin((IconWin *)v3);
    LOBYTE(v8) = 1;
    v4->vfptr = (NiRefObjectVtbl *)&AbStateIconWin::`vftable'{for `NiNode'};
    v4->vfptr = (IDirectMessengerVtbl *)&AbStateIconWin::`vftable'{for `IDirectMessenger'};
    IconWin::CreateGeometry(v4, 0x14u, 0x14u);
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v8 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, (PgWin *)&v4->vfptr);
  if ( (unsigned __int8)((int (__thiscall *)(IconWin *, int, int, PgWin *))v4->vfptr[152].__vecDelDtor)(
                          v4,
                          iXPos,
                          iYPos,
                          pkParent) )
  {
    ((void (__thiscall *)(IconWin *))v4->vfptr[89].__vecDelDtor)(v4);
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = (AbStateIconWin *)v4;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, (PgWin *)&v4->vfptr);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = 0;
  }
  return v6;
}
// 9A5FC4: using guessed type void (__thiscall *AbStateIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A5FE4: using guessed type int (__thiscall *AbStateIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A36F0) --------------------------------------------------------
void __thiscall TargetWin::TargetWin(TargetWin *this)
{
  TargetWin *v1; // esi@1
  std::_List_nod<TargetWin::AbStateData,std::allocator<TargetWin::AbStateData> >::_Node *v2; // eax@1
  int v3; // edi@2
  int v4; // eax@3
  int v5; // eax@8
  int v6; // eax@13
  int v7; // eax@18
  SpEffect *(*v8)[7]; // eax@24
  signed int v9; // edx@24
  signed int v10; // ecx@25
  std::exception pExceptionObject; // [sp+10h] [bp-24h]@29
  TargetWin *v12; // [sp+1Ch] [bp-18h]@1
  char *_What; // [sp+20h] [bp-14h]@3
  int v14; // [sp+24h] [bp-10h]@2
  int v15; // [sp+30h] [bp-4h]@1

  v1 = this;
  v12 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&TargetWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&TargetWin::`vftable'{for `IDirectMessenger'};
  v15 = 0;
  v1->m_kAbStateList._Mysize = 0;
  v2 = (std::_List_nod<TargetWin::AbStateData,std::allocator<TargetWin::AbStateData> >::_Node *)operator new(0x10u);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_kAbStateList._Myhead = v2;
  v2->_Next = v2;
  v1->m_kAbStateList._Myhead->_Prev = v1->m_kAbStateList._Myhead;
  `eh vector constructor iterator'(
    v1->m_apkAbstateBufIconWin,
    4u,
    15,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v3 = (int)v1->m_apkAbstateDeBufIconWin;
  `eh vector constructor iterator'(
    v1->m_apkAbstateDeBufIconWin,
    4u,
    15,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_apkAbstateBuffWin,
    4u,
    15,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_apkAbstateDBuffWin,
    4u,
    15,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  LOBYTE(v15) = 5;
  v1->m_pkHPBar = 0;
  v1->m_pkHPCircleGauge = 0;
  v1->m_pkLevelText = 0;
  v1->m_pkMinButton = 0;
  v1->m_pkMaxButton = 0;
  v1->m_bEnableTOT = 1;
  v1->m_bShowMobHP = 0;
  v14 = 15;
  do
  {
    v4 = *(_DWORD *)(v3 - 60);
    _What = (char *)v4;
    if ( v4 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v4 + 4)) && _What )
        (**(void (__stdcall ***)(_DWORD))_What)(1);
      *(_DWORD *)(v3 - 60) = 0;
    }
    v5 = *(_DWORD *)v3;
    _What = (char *)v5;
    if ( v5 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v5 + 4)) && _What )
        (**(void (__stdcall ***)(_DWORD))_What)(1);
      *(_DWORD *)v3 = 0;
    }
    v6 = *(_DWORD *)(v3 + 60);
    _What = (char *)v6;
    if ( v6 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v6 + 4)) && _What )
        (**(void (__stdcall ***)(_DWORD))_What)(1);
      *(_DWORD *)(v3 + 60) = 0;
    }
    v7 = *(_DWORD *)(v3 + 120);
    _What = (char *)v7;
    if ( v7 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v7 + 4)) && _What )
        (**(void (__stdcall ***)(_DWORD))_What)(1);
      *(_DWORD *)(v3 + 120) = 0;
    }
    v3 += 4;
    --v14;
  }
  while ( v14 );
  v8 = v1->m_apkSoulWinEffect;
  v9 = 2;
  do
  {
    v10 = 7;
    do
    {
      (*v8)[-14] = 0;
      (*v8)[0] = 0;
      v8 = (SpEffect *(*)[7])((char *)v8 + 4);
      --v10;
    }
    while ( v10 );
    --v9;
  }
  while ( v9 );
  v1->m_pkLPBar = 0;
  v1->m_pkLPCircleGauge = 0;
  v1->m_pkLPBarStart = 0;
  v1->m_pkLPBarEnd = 0;
  v1->m_kTargetClassID = 0;
  v1->m_pkLPGround = 0;
  v1->m_pkSPGround = 0;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9A6490: using guessed type void (__thiscall *TargetWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A64AC: using guessed type int (__thiscall *TargetWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A3950) --------------------------------------------------------
void __thiscall TargetWin::~TargetWin(TargetWin *this)
{
  TargetWin *v1; // ebx@1
  char *v2; // eax@1
  int v3; // esi@3
  int v4; // edi@4
  bool v5; // zf@9
  void **v6; // eax@11
  std::_List_nod<TargetWin::AbStateData,std::allocator<TargetWin::AbStateData> >::_Node *v7; // ecx@11
  std::_List_nod<TargetWin::AbStateData,std::allocator<TargetWin::AbStateData> >::_Node *v8; // esi@12
  signed int v9; // [sp+18h] [bp-18h]@1
  signed int v10; // [sp+1Ch] [bp-14h]@2
  char *v11; // [sp+20h] [bp-10h]@2

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&TargetWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&TargetWin::`vftable'{for `IDirectMessenger'};
  v2 = (char *)this->m_apkSoulWinEffect;
  v9 = 2;
  do
  {
    v11 = v2;
    v10 = 7;
    do
    {
      v3 = *(_DWORD *)v2;
      if ( *(_DWORD *)v2 )
      {
        NsEffect::~NsEffect((NsEffect *)(v3 + 28));
        ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)(v3 + 4));
        v4 = *(_DWORD *)v3;
        if ( *(_DWORD *)v3 && !InterlockedDecrement((volatile LONG *)(v4 + 4)) && v4 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v4)(v4, 1);
        operator delete((void *)v3);
        *(_DWORD *)v11 = 0;
        v2 = v11;
      }
      v2 += 4;
      v5 = v10-- == 1;
      v11 = v2;
    }
    while ( !v5 );
    --v9;
  }
  while ( v9 );
  `eh vector destructor iterator'(
    v1->m_apkAbstateDBuffWin,
    4u,
    15,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_apkAbstateBuffWin,
    4u,
    15,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_apkAbstateDeBufIconWin,
    4u,
    15,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_apkAbstateBufIconWin,
    4u,
    15,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v6 = (void **)&v1->m_kAbStateList._Myhead->_Next;
  v7 = (std::_List_nod<TargetWin::AbStateData,std::allocator<TargetWin::AbStateData> >::_Node *)*v6;
  *v6 = v6;
  v1->m_kAbStateList._Myhead->_Prev = v1->m_kAbStateList._Myhead;
  v1->m_kAbStateList._Mysize = 0;
  if ( v7 != v1->m_kAbStateList._Myhead )
  {
    do
    {
      v8 = v7->_Next;
      operator delete(v7);
      v7 = v8;
    }
    while ( v8 != v1->m_kAbStateList._Myhead );
  }
  operator delete(v1->m_kAbStateList._Myhead);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9A6490: using guessed type void (__thiscall *TargetWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A64AC: using guessed type int (__thiscall *TargetWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A3AF0) --------------------------------------------------------
TargetWin *__cdecl TargetWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  TargetWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x34Cu);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    TargetWin::TargetWin((TargetWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (TargetWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (005A3C20) --------------------------------------------------------
char __thiscall TargetWin::CreateKoreaUI(TargetWin *this, PgFrameWork *pkFrameWork)
{
  TargetWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  char result; // al@6
  const char *v5; // eax@9
  PgSprData *v6; // eax@10
  NiNode *v7; // esi@11
  int v8; // edi@16
  int v9; // ebx@16
  NiAVObject *v10; // eax@16
  NiTexturingProperty *v11; // eax@16
  NiTexturingProperty::Map *v12; // eax@18
  NiSourceTexture *v13; // eax@19
  PgSprData *v14; // eax@20
  PgWinSpr *v15; // eax@20
  PgSprData *v16; // eax@20
  NiShader *v17; // eax@20
  MaskedWin *v18; // eax@20
  NiSourceTexture *v19; // edx@20
  PgSprData *v20; // eax@20
  PgWinSpr *v21; // eax@20
  PgSprData *v22; // eax@20
  PgWinSpr *v23; // eax@20
  PgSprData *v24; // eax@20
  PgWinSpr *v25; // eax@20
  PgSprData *v26; // eax@20
  PgWinSpr *v27; // eax@20
  PgSprData *v28; // eax@20
  PgWinSpr *v29; // eax@20
  PgSprData *v30; // eax@20
  PgWinSpr *v31; // eax@20
  PgSprData *v32; // eax@20
  PgWinSpr *v33; // eax@20
  NiSourceTexture *v34; // edx@20
  PgSprData *v35; // eax@20
  PgWinBar *v36; // eax@20
  PgSprData *v37; // eax@20
  PgWinBar *v38; // eax@20
  PgSprData *v39; // eax@20
  PgWinBar *v40; // eax@20
  PgSprData *v41; // eax@20
  PgWinBar *v42; // eax@20
  PgSprData *v43; // eax@20
  PgWinBar *v44; // eax@20
  PgSprData *v45; // eax@20
  PgWinBar *v46; // eax@20
  PgSprData *v47; // eax@23
  PgWinBar *v48; // eax@23
  PgFont *v49; // eax@23
  PgWinText *v50; // eax@23
  PgSprData *v51; // eax@24
  PgWinBar *v52; // eax@24
  PgSprData *v53; // eax@24
  PgWinBar *v54; // eax@24
  PgFont *v55; // eax@24
  PgFont *v56; // eax@24
  PgWinText *v57; // eax@24
  PgWinText *v58; // ecx@24
  PgSprData *v59; // eax@26
  NiD3DDefaultShader *v60; // eax@26
  AbstateIcon *v61; // eax@26
  PgSprData *v62; // eax@26
  NiD3DDefaultShader *v63; // eax@26
  AbstateIcon *v64; // eax@26
  PgFont *v65; // eax@28
  PgWinText *v66; // eax@28
  MobIconWin *v67; // eax@30
  MobIconWin *v68; // eax@31
  NiPointer<PgSprData::PgHitTester> *v69; // ecx@31
  NiNode *v70; // eax@31
  PgFont *v71; // eax@31
  PgWinText *v72; // eax@31
  PgWinBut *v73; // eax@31
  char *v74; // eax@31
  PgWinBut *v75; // eax@31
  char *v76; // eax@31
  PgSprData *v77; // eax@31
  PgWinSpr *v78; // eax@31
  char *v79; // eax@31
  const char *v80; // eax@31
  char *v81; // eax@31
  const char *v82; // eax@31
  NiNode *v83; // eax@31
  PgSprData *v84; // ecx@31
  NiTriShape *v85; // ebx@33
  PgWin **v86; // edi@33
  PgSprData *v87; // eax@38
  PgWinSpr *v88; // eax@38
  char *v89; // eax@38
  SpEffect *v90; // eax@41
  SpEffect *v91; // ebx@42
  NiNode *v92; // eax@43
  int v93; // eax@43
  NiNode *v94; // eax@46
  SpEffect *v95; // eax@46
  NiTexturingProperty *v96; // esi@52
  NiNode *v97; // esi@54
  int v98; // [sp+E8h] [bp-D0h]@35
  int v99; // [sp+FCh] [bp-BCh]@33
  UIUtil ui; // [sp+100h] [bp-B8h]@20
  NiNode *SoulUse; // [sp+114h] [bp-A4h]@31
  SpEffect *v102; // [sp+118h] [bp-A0h]@42
  NiNode *SoulAdd; // [sp+11Ch] [bp-9Ch]@31
  NiPointer<NiTexturingProperty> spTexProp; // [sp+120h] [bp-98h]@16
  NiTriShape *pkTriShape; // [sp+124h] [bp-94h]@7
  int i; // [sp+128h] [bp-90h]@24
  unsigned int uiHeight; // [sp+12Ch] [bp-8Ch]@20
  unsigned int uiWidth; // [sp+130h] [bp-88h]@20
  NiSourceTexture *pkTexture; // [sp+134h] [bp-84h]@1
  PgSprData *pkSprData; // [sp+138h] [bp-80h]@24
  NiPointer<NiNode> spNode; // [sp+13Ch] [bp-7Ch]@1
  int uiTop; // [sp+140h] [bp-78h]@10
  int uiLeft; // [sp+144h] [bp-74h]@10
  char acShapeName[64]; // [sp+148h] [bp-70h]@25
  char string; // [sp+188h] [bp-30h]@33
  int v116; // [sp+189h] [bp-2Fh]@33
  int v117; // [sp+18Dh] [bp-2Bh]@33
  int v118; // [sp+191h] [bp-27h]@33
  int v119; // [sp+195h] [bp-23h]@33
  int v120; // [sp+199h] [bp-1Fh]@33
  int v121; // [sp+19Dh] [bp-1Bh]@33
  int v122; // [sp+1A1h] [bp-17h]@33
  __int16 v123; // [sp+1A5h] [bp-13h]@33
  char v124; // [sp+1A7h] [bp-11h]@33
  int v125; // [sp+1B4h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v125 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  pkTexture = v3;
  if ( !v3 )
  {
    v125 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( spNode.m_pObject )
        spNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spNode.m_pObject, 1u);
    }
    return 0;
  }
  pkTriShape = (NiTriShape *)pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "Game\\TargetWin.nif");
  PgUtil::LoadNodeNifFile(v5, &spNode, (NiTexturePalette *)pkTriShape);
  if ( !spNode.m_pObject )
    return 0;
  v6 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, uiLeft, uiTop, v6, 0, pkFrameWork, "TargetWin", 0) )
  {
    v8 = uiLeft;
    v9 = uiTop;
    v10 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("EventPanel");
    v11 = (NiTexturingProperty *)NiAVObject::GetProperty(v10, 8);
    spTexProp.m_pObject = v11;
    if ( v11 )
    {
      InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
      v11 = spTexProp.m_pObject;
    }
    v12 = *v11->m_kMaps.m_pBase;
    LOBYTE(v125) = 1;
    if ( v12 )
    {
      v13 = (NiSourceTexture *)v12->m_spTexture.m_pObject;
      if ( v13 )
      {
        v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "EventPanel", &uiLeft, &uiTop, v13);
        v15 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v14, (PgWin *)&v2->vfptr, 0, 0);
        v15->vfptr[60].__vecDelDtor((NiRefObject *)v15, 0);
        v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Face_Mask", &uiLeft, &uiTop, pkTexture);
        PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v16, (PgWin *)&v2->vfptr, 0, 0);
        v17 = (NiShader *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("FaceCut_Mask");
        pkTriShape = (NiTriShape *)CPostProcessEffect::DynamicCast(&NiTriShape::m_RTTI, v17);
        PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "FaceCut_Mask", &uiLeft, &uiTop, pkTexture);
        v18 = MaskedWin::CreateWin(uiLeft - v8, uiTop - v9 - 2, pkTriShape, (PgWin *)&v2->vfptr);
        v19 = pkTexture;
        v2->m_pkPortrait = v18;
        v20 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MonLevelYellow", &uiLeft, &uiTop, v19);
        v21 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v20, (PgWin *)&v2->vfptr, 0, 0);
        v2->m_pkMobLevYellow = v21;
        v21->vfptr[60].__vecDelDtor((NiRefObject *)v21, 0);
        ((void (__stdcall *)(_DWORD))v2->m_pkMobLevYellow->vfptr[64].__vecDelDtor)(0);
        v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MonLevelOrange", &uiLeft, &uiTop, pkTexture);
        v23 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v22, (PgWin *)&v2->vfptr, 0, 0);
        v2->m_pkMobLevOrange = v23;
        v23->vfptr[60].__vecDelDtor((NiRefObject *)v23, 0);
        ((void (__stdcall *)(_DWORD))v2->m_pkMobLevOrange->vfptr[64].__vecDelDtor)(0);
        v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MonLevelRed", &uiLeft, &uiTop, pkTexture);
        v25 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v24, (PgWin *)&v2->vfptr, 0, 0);
        v2->m_pkMobLevRed = v25;
        v25->vfptr[60].__vecDelDtor((NiRefObject *)v25, 0);
        ((void (__stdcall *)(_DWORD))v2->m_pkMobLevRed->vfptr[64].__vecDelDtor)(0);
        v26 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MonLevelGreen", &uiLeft, &uiTop, pkTexture);
        v27 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v26, (PgWin *)&v2->vfptr, 0, 0);
        v2->m_pkMobLevGreen = v27;
        v27->vfptr[60].__vecDelDtor((NiRefObject *)v27, 0);
        ((void (__stdcall *)(_DWORD))v2->m_pkMobLevGreen->vfptr[64].__vecDelDtor)(0);
        v28 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MonLevelGray", &uiLeft, &uiTop, pkTexture);
        v29 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v28, (PgWin *)&v2->vfptr, 0, 0);
        v2->m_pkMobLevGray = v29;
        v29->vfptr[60].__vecDelDtor((NiRefObject *)v29, 0);
        ((void (__stdcall *)(_DWORD))v2->m_pkMobLevGray->vfptr[64].__vecDelDtor)(0);
        v30 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "FaceCut_Mon", &uiLeft, &uiTop, 0);
        v31 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v30, (PgWin *)&v2->vfptr, 0, 0);
        v2->m_pkMobPortrait = v31;
        v31->vfptr[64].__vecDelDtor((NiRefObject *)v31, 0);
        v32 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
        PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v32, (PgWin *)&v2->vfptr, 0, 0);
        UIUtil::UIUtil(&ui);
        LOBYTE(v125) = 2;
        UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
        UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
        UIUtil::SetOffset(&ui, v8, v9);
        UIUtil::CreateSpr(&ui, "Panel02", 0);
        v2->m_pkSPGround = UIUtil::CreateSpr(&ui, "SPground", 0);
        v33 = UIUtil::CreateSpr(&ui, "LPground", 0);
        v34 = pkTexture;
        v2->m_pkLPGround = v33;
        v35 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_SP_03", &uiLeft, &uiTop, v34);
        v36 = PgWinBar::CreateWin(uiLeft - v8, uiTop - v9, v35, (PgWin *)&v2->vfptr, BGT_RIGHT);
        v2->m_pkSPBarStart = (PgWinSpr *)v36;
        v36->vfptr[64].__vecDelDtor((NiRefObject *)v36, 0);
        ((void (__stdcall *)(_DWORD))v2->m_pkSPBarStart->vfptr[60].__vecDelDtor)(0);
        v37 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_LP_03", &uiLeft, &uiTop, 0);
        v38 = PgWinBar::CreateWin(uiLeft - v8, uiTop - v9, v37, (PgWin *)&v2->vfptr, BGT_RIGHT);
        v2->m_pkLPBarStart = (PgWinSpr *)v38;
        v38->vfptr[64].__vecDelDtor((NiRefObject *)v38, 0);
        ((void (__stdcall *)(_DWORD))v2->m_pkLPBarStart->vfptr[60].__vecDelDtor)(0);
        v39 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_SP_01", &uiLeft, &uiTop, pkTexture);
        v40 = PgWinBar::CreateWin(uiLeft - v8, uiTop - v9, v39, (PgWin *)&v2->vfptr, BGT_RIGHT);
        v2->m_pkSPBarEnd = (PgWinSpr *)v40;
        v40->vfptr[64].__vecDelDtor((NiRefObject *)v40, 0);
        ((void (__stdcall *)(_DWORD))v2->m_pkSPBarEnd->vfptr[60].__vecDelDtor)(0);
        v41 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_LP_01", &uiLeft, &uiTop, 0);
        v42 = PgWinBar::CreateWin(uiLeft - v8, uiTop - v9, v41, (PgWin *)&v2->vfptr, BGT_RIGHT);
        v2->m_pkLPBarEnd = (PgWinSpr *)v42;
        v42->vfptr[64].__vecDelDtor((NiRefObject *)v42, 0);
        ((void (__stdcall *)(_DWORD))v2->m_pkLPBarEnd->vfptr[60].__vecDelDtor)(0);
        v43 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_HP_01", &uiLeft, &uiTop, pkTexture);
        v44 = PgWinBar::CreateWin(uiLeft - v8, uiTop - v9, v43, (PgWin *)&v2->vfptr, BGT_RIGHT);
        v2->m_pkHPBarStart = (PgWinSpr *)v44;
        v44->vfptr[64].__vecDelDtor((NiRefObject *)v44, 0);
        ((void (__stdcall *)(_DWORD))v2->m_pkHPBarStart->vfptr[60].__vecDelDtor)(0);
        v45 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_HP_03", &uiLeft, &uiTop, pkTexture);
        v46 = PgWinBar::CreateWin(uiLeft - v8, uiTop - v9, v45, (PgWin *)&v2->vfptr, BGT_RIGHT);
        v2->m_pkHPBarEnd = (PgWinSpr *)v46;
        v46->vfptr[64].__vecDelDtor((NiRefObject *)v46, 0);
        ((void (__stdcall *)(_DWORD))v2->m_pkHPBarEnd->vfptr[60].__vecDelDtor)(0);
        if ( PgUtil::GetTriShapeRect(
               (NiAVObject *)&spNode.m_pObject->vfptr,
               "Fill_HP_02",
               &uiLeft,
               &uiTop,
               &uiWidth,
               &uiHeight) )
        {
          v47 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_HP_02", &uiLeft, &uiTop, pkTexture);
          v48 = PgWinBar::CreateWin(uiLeft - v8, uiTop - v9, v47, (PgWin *)&v2->vfptr, 0);
          v2->m_pkHPBar = v48;
          v48->vfptr[60].__vecDelDtor((NiRefObject *)v48, 0);
          v49 = Font::Get(SMALL);
          v50 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9, uiWidth, uiHeight, v49, (PgWin *)&v2->vfptr, 0, 0);
          v2->m_pkHPText = v50;
          v50->vfptr[122].__vecDelDtor((NiRefObject *)v50, 5u);
          ((void (__stdcall *)(D3DXCOLOR *))v2->m_pkHPText->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
          ((void (__stdcall *)(const char *))v2->m_pkHPText->vfptr[118].__vecDelDtor)("0/0");
          if ( PgUtil::GetTriShapeRect(
                 (NiAVObject *)&spNode.m_pObject->vfptr,
                 "Fill_SP_02",
                 &uiLeft,
                 &uiTop,
                 &uiWidth,
                 &uiHeight) )
          {
            v51 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_SP_02", &uiLeft, &uiTop, pkTexture);
            v52 = PgWinBar::CreateWin(uiLeft - v8, uiTop - v9, v51, (PgWin *)&v2->vfptr, BGT_RIGHT);
            v2->m_pkSPBar = v52;
            v52->vfptr[60].__vecDelDtor((NiRefObject *)v52, 0);
            ((void (__stdcall *)(_DWORD))v2->m_pkSPBar->vfptr[64].__vecDelDtor)(0);
            v53 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Fill_LP_02", &uiLeft, &uiTop, 0);
            v54 = PgWinBar::CreateWin(uiLeft - v8, uiTop - v9, v53, (PgWin *)&v2->vfptr, BGT_RIGHT);
            v2->m_pkLPBar = v54;
            v54->vfptr[60].__vecDelDtor((NiRefObject *)v54, 0);
            ((void (__stdcall *)(_DWORD))v2->m_pkLPBar->vfptr[64].__vecDelDtor)(0);
            v55 = Font::Get(SMALL);
            v2->m_pkSPText = PgWinText::CreateWin(
                               uiLeft - v8,
                               uiTop - v9,
                               uiWidth,
                               uiHeight,
                               v55,
                               (PgWin *)&v2->vfptr,
                               0,
                               0);
            v56 = Font::Get(SMALL);
            v57 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9, uiWidth, uiHeight, v56, (PgWin *)&v2->vfptr, 0, 0);
            v58 = v2->m_pkSPText;
            v2->m_pkLPText = v57;
            ((void (__stdcall *)(signed int))v58->vfptr[122].__vecDelDtor)(5);
            ((void (__stdcall *)(D3DXCOLOR *))v2->m_pkSPText->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
            ((void (__stdcall *)(const char *))v2->m_pkSPText->vfptr[118].__vecDelDtor)("0/0");
            ((void (__stdcall *)(signed int))v2->m_pkLPText->vfptr[122].__vecDelDtor)(5);
            ((void (__stdcall *)(struct D3DXCOLOR *))v2->m_pkLPText->vfptr[117].__vecDelDtor)(&Color::m_kDxLPTextColor);
            ((void (__stdcall *)(const char *))v2->m_pkLPText->vfptr[118].__vecDelDtor)("0/0");
            i = 0;
            pkSprData = (PgSprData *)v2->m_apkAbstateBufIconWin;
            while ( 1 )
            {
              sprintf(acShapeName, "CharBuffBox%02d", i);
              if ( !PgUtil::GetTriShapeRect(
                      (NiAVObject *)&spNode.m_pObject->vfptr,
                      acShapeName,
                      &uiLeft,
                      &uiTop,
                      &uiWidth,
                      &uiHeight) )
                break;
              v59 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, pkTexture);
              v60 = (NiD3DDefaultShader *)PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v59, (PgWin *)&v2->vfptr, 0, 0);
              NiPointer<PopupMenuWin>::operator=(
                (NiPointer<NiD3DDefaultShader> *)&pkSprData[1].m_akHitTester.m_pBase,
                v60);
              ((void (__stdcall *)(_DWORD))pkSprData[1].m_akHitTester.m_pBase->m_pObject[3].m_uiHeight)(0);
              ((void (__stdcall *)(_DWORD))LODWORD(pkSprData[1].m_akHitTester.m_pBase->m_pObject[3].m_akUVs[0].y))(0);
              v61 = AbstateIcon::CreateWin(uiLeft + 2, uiTop + 2, uiWidth - 4, uiHeight - 4, (PgWin *)&v2->vfptr, 0);
              NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)pkSprData, (NiD3DDefaultShader *)v61);
              (*((void (__stdcall **)(_DWORD))pkSprData->vfptr->__vecDelDtor + 60))(0);
              (*((void (__stdcall **)(_DWORD))pkSprData->vfptr->__vecDelDtor + 64))(0);
              sprintf(acShapeName, "CharDBuffBox%02d", i);
              v62 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, pkTexture);
              v63 = (NiD3DDefaultShader *)PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v62, (PgWin *)&v2->vfptr, 0, 0);
              NiPointer<PopupMenuWin>::operator=(
                (NiPointer<NiD3DDefaultShader> *)&pkSprData[2].m_akGeomData.m_pBase,
                v63);
              ((void (__stdcall *)(_DWORD))LODWORD(pkSprData[2].m_akGeomData.m_pBase->m_pObject[2].m_kBound.m_kCenter.x))(0);
              ((void (__stdcall *)(_DWORD))pkSprData[2].m_akGeomData.m_pBase->m_pObject[2].m_pkVertex)(0);
              v64 = AbstateIcon::CreateWin(uiLeft + 2, uiTop + 2, uiWidth - 4, uiHeight - 4, (PgWin *)&v2->vfptr, 0);
              NiPointer<PopupMenuWin>::operator=(
                (NiPointer<NiD3DDefaultShader> *)&pkSprData->m_akAlphaPropertyData,
                (NiD3DDefaultShader *)v64);
              (*((void (__stdcall **)(_DWORD))pkSprData->m_akAlphaPropertyData.vfptr->__vecDelDtor + 60))(0);
              (*((void (__stdcall **)(_DWORD))pkSprData->m_akAlphaPropertyData.vfptr->__vecDelDtor + 64))(0);
              pkSprData = (PgSprData *)((char *)pkSprData + 4);
              if ( ++i >= 15 )
              {
                if ( PgUtil::GetTriShapeRect(
                       (NiAVObject *)&spNode.m_pObject->vfptr,
                       "CharName",
                       &uiLeft,
                       &uiTop,
                       &uiWidth,
                       &uiHeight) )
                {
                  v65 = Font::Get(0);
                  v66 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9, uiWidth, uiHeight, v65, (PgWin *)&v2->vfptr, 0, 0);
                  v2->m_pkCharNameTextWin = v66;
                  v66->vfptr[122].__vecDelDtor((NiRefObject *)v66, 1u);
                  ((void (__stdcall *)(_DWORD))v2->m_pkCharNameTextWin->vfptr[60].__vecDelDtor)(0);
                }
                if ( PgUtil::GetTriShapeRect(
                       (NiAVObject *)&spNode.m_pObject->vfptr,
                       "MonLev_Mask",
                       &uiLeft,
                       &uiTop,
                       &uiWidth,
                       &uiHeight) )
                {
                  v67 = MobIconWin::CreateWin(uiLeft - v8, uiTop - v9, (PgWin *)&v2->vfptr);
                  v2->m_pkMobGradeWin = v67;
                  v67->vfptr[60].__vecDelDtor((NiRefObject *)v67, 0);
                  ((void (__stdcall *)(_DWORD))v2->m_pkMobGradeWin->vfptr[60].__vecDelDtor)(0);
                  if ( PgUtil::GetTriShapeRect(
                         (NiAVObject *)&spNode.m_pObject->vfptr,
                         "MonClass_Mask",
                         &uiLeft,
                         &uiTop,
                         &uiWidth,
                         &uiHeight) )
                  {
                    v68 = MobIconWin::CreateWin(uiLeft - v8, uiTop - v9, (PgWin *)&v2->vfptr);
                    v2->m_pkCbResWin = v68;
                    v68->vfptr[60].__vecDelDtor((NiRefObject *)v68, 0);
                    v69 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Level", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
                    v70 = (NiNode *)v69->m_pObject->m_uiWidth;
                    pkTriShape = (NiTriShape *)v69->m_pObject->m_uiHeight;
                    SoulAdd = v70;
                    v71 = Font::Get(BOLD);
                    v72 = PgWinText::CreateWin(
                            uiLeft,
                            uiTop,
                            (unsigned int)SoulAdd,
                            (unsigned int)pkTriShape,
                            v71,
                            (PgWin *)&v2->vfptr,
                            0,
                            0);
                    v2->m_pkLevelText = v72;
                    v72->vfptr[122].__vecDelDtor((NiRefObject *)v72, 5u);
                    pkSprData = PgSprData::Create(
                                  (NiAVObject *)&spNode.m_pObject->vfptr,
                                  "MinBtnNor",
                                  &uiLeft,
                                  &uiTop,
                                  pkTexture);
                    PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "MinBtnClick");
                    PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "MinBtnOver");
                    v73 = PgWinBut::CreateWin(uiLeft, uiTop, pkSprData, (PgWin *)&v2->vfptr, 0x2711u, 0, 0);
                    v2->m_pkMinButton = v73;
                    v73->m_pkToolTipWin = g_pkToolTipWin;
                    v74 = (char *)TextData2::Get(0xB8A2C5E9);
                    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkMinButton->vfptr, v74);
                    pkSprData = PgSprData::Create(
                                  (NiAVObject *)&spNode.m_pObject->vfptr,
                                  "MaxBtnNor",
                                  &uiLeft,
                                  &uiTop,
                                  pkTexture);
                    PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "MaxBtnClick");
                    PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "MaxBtnOver");
                    v75 = PgWinBut::CreateWin(uiLeft, uiTop, pkSprData, (PgWin *)&v2->vfptr, 0x2712u, 0, 0);
                    v2->m_pkMaxButton = v75;
                    v75->vfptr[64].__vecDelDtor((NiRefObject *)v75, 0);
                    v2->m_pkMaxButton->m_pkToolTipWin = g_pkToolTipWin;
                    v76 = (char *)TextData2::Get(0xB8A2C5E9);
                    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkMaxButton->vfptr, v76);
                    v77 = PgSprData::Create(
                            (NiAVObject *)&spNode.m_pObject->vfptr,
                            "Level_over",
                            &uiLeft,
                            &uiTop,
                            pkTexture);
                    v78 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v77, (PgWin *)&v2->vfptr, 0, 0);
                    v2->m_pkLevelOver = v78;
                    v78->vfptr[64].__vecDelDtor((NiRefObject *)v78, 0);
                    v79 = Folder::Effect();
                    v80 = Folder::Merge(v79, "Soul_Add.nif");
                    SoulAdd = (NiNode *)Ns_LoadNifFile(v80, 0);
                    v81 = Folder::Effect();
                    v82 = Folder::Merge(v81, "Soul_Use.nif");
                    v83 = (NiNode *)Ns_LoadNifFile(v82, 0);
                    v84 = 0;
                    SoulUse = v83;
                    for ( pkSprData = 0; ; v84 = pkSprData )
                    {
                      v116 = 0;
                      v117 = 0;
                      v118 = 0;
                      v119 = 0;
                      v120 = 0;
                      v121 = 0;
                      v122 = 0;
                      v123 = 0;
                      v124 = 0;
                      v85 = 0;
                      string = 0;
                      v99 = 7 * (_DWORD)v84;
                      i = (int)v2->m_apkSoulWinEffect;
                      v86 = (PgWin **)v2->m_apkSoulWin[(_DWORD)v84];
                      while ( 1 )
                      {
                        pkTriShape = (NiTriShape *)((char *)v85 + 1);
                        v98 = (int)&v85->vfptr + 1;
                        if ( v84 )
                          sprintf(&string, "SoulOn%02d", v98);
                        else
                          sprintf(&string, "SoulOff%02d", v98);
                        v87 = PgSprData::Create(
                                (NiAVObject *)&spNode.m_pObject->vfptr,
                                &string,
                                &uiLeft,
                                &uiTop,
                                pkTexture);
                        v88 = PgWinSpr::CreateWin(uiLeft, uiTop, v87, (PgWin *)&v2->vfptr, 0, 0);
                        *v86 = (PgWin *)v88;
                        v88->vfptr[60].__vecDelDtor((NiRefObject *)v88, 1u);
                        (*v86)->m_pkToolTipWin = g_pkToolTipWin;
                        v89 = (char *)TextData2::Get(0x5E50304Au);
                        PgWin::SetToolTipWinText(*v86, v89);
                        if ( SoulUse && SoulAdd && *v86 )
                        {
                          v90 = (SpEffect *)operator new(0x44u);
                          if ( pkSprData )
                          {
                            v102 = v90;
                            LOBYTE(v125) = 4;
                            if ( v90 )
                            {
                              v94 = (NiNode *)NiObject::Clone((NiObject *)&SoulAdd->vfptr);
                              SpEffect::SpEffect(v102, v94);
                            }
                            else
                            {
                              v95 = 0;
                            }
                            v2->m_apkSoulWinEffect[0][(_DWORD)v85 + v99] = v95;
                          }
                          else
                          {
                            v91 = v90;
                            v102 = v90;
                            LOBYTE(v125) = 3;
                            if ( v90 )
                            {
                              v92 = (NiNode *)NiObject::Clone((NiObject *)&SoulUse->vfptr);
                              SpEffect::SpEffect(v91, v92);
                              *(_DWORD *)i = v93;
                            }
                            else
                            {
                              *(_DWORD *)i = 0;
                            }
                          }
                          LOBYTE(v125) = 2;
                        }
                        v85 = pkTriShape;
                        i += 4;
                        ++v86;
                        if ( (signed int)pkTriShape >= 7 )
                          break;
                        v84 = pkSprData;
                      }
                      pkSprData = (PgSprData *)((char *)pkSprData + 1);
                      if ( (signed int)pkSprData >= 2 )
                        break;
                    }
                    TargetWin::SetSoulDefault(v2, 1);
                    TargetWin::ShowBarWin(v2, 0);
                    ((void (__thiscall *)(TargetWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
                      v2,
                      PgWin::ms_uiScreenWidth,
                      PgWin::ms_uiScreenHeight,
                      0.52999997,
                      0.0);
                    LOBYTE(v125) = 1;
                    UIUtil::~UIUtil(&ui);
                    v96 = spTexProp.m_pObject;
                    LOBYTE(v125) = 0;
                    if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
                      v96->vfptr->__vecDelDtor((NiRefObject *)v96, 1u);
                    v97 = spNode.m_pObject;
                    v125 = -1;
                    if ( spNode.m_pObject
                      && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount)
                      && v97 )
                    {
                      v97->vfptr->__vecDelDtor((NiRefObject *)v97, 1u);
                    }
                    return 1;
                  }
                }
                break;
              }
            }
          }
        }
        LOBYTE(v125) = 1;
        UIUtil::~UIUtil(&ui);
      }
    }
    LOBYTE(v125) = 0;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
    v125 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    result = 0;
  }
  else
  {
    v7 = spNode.m_pObject;
    v125 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    result = 0;
  }
  return result;
}
// A69680: using guessed type struct D3DXCOLOR Color::m_kDxLPTextColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005A4E30) --------------------------------------------------------
TargetOfTheTargetWin *__cdecl TargetOfTheTargetWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  TargetOfTheTargetWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x180u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&TargetOfTheTargetWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&TargetOfTheTargetWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Translate.x) = -1;
    LOBYTE(v2[1].m_kLocal.m_Translate.y) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (TargetOfTheTargetWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9A624C: using guessed type void (__thiscall *TargetOfTheTargetWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A626C: using guessed type int (__thiscall *TargetOfTheTargetWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A4F90) --------------------------------------------------------
char __thiscall TargetWin::Create(TargetWin *this, PgFrameWork *pkFrameWork)
{
  TargetWin *v2; // esi@1

  v2 = this;
  TargetWin::CreateKoreaUI(this, pkFrameWork);
  v2->m_kTempLV = 0;
  return 1;
}

//----- (005A4FB0) --------------------------------------------------------
void __thiscall TargetWin::SetBuffUI(TargetWin *this, Char *pkMember, StateType type, int *AbstateNums)
{
  TargetWin *v4; // esi@1
  void **v5; // eax@1
  signed int v6; // ecx@1
  AbstateIcon **v7; // edi@2
  AbstateIcon **v8; // esi@2
  void *v9; // ebx@5
  int v10; // edx@5
  int (__stdcall *v11)(std::list<TargetWin::AbStateData,std::allocator<TargetWin::AbStateData> > *); // eax@5
  int v12; // eax@9
  bool v13; // zf@9
  _DWORD *v14; // eax@9
  unsigned __int16 v15; // ax@14
  std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *v16; // ST04_4@14
  std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *v17; // eax@14
  unsigned int v18; // ecx@14
  int v19; // edx@17
  int (__stdcall *v20)(std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *); // eax@17
  unsigned int v21; // eax@19
  int *v22; // eax@19
  int v23; // eax@20
  int v24; // ebx@22
  int v25; // eax@24
  std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *v26; // ST04_4@24
  std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *v27; // eax@24
  unsigned int v28; // ecx@24
  int v29; // edx@27
  int (__stdcall *v30)(std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *); // eax@27
  unsigned int v31; // eax@29
  int *v32; // eax@29
  int v33; // eax@30
  int v34; // ebx@32
  GameFrameWork::AttackedMsg::AttackedFrom _Val; // [sp+4h] [bp-2Ch]@24
  TargetWin::AbStateData kD; // [sp+Ch] [bp-24h]@14
  std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *v37; // [sp+14h] [bp-1Ch]@14
  void *kIter; // [sp+18h] [bp-18h]@3
  std::list<TargetWin::AbStateData,std::allocator<TargetWin::AbStateData> > *v39; // [sp+1Ch] [bp-14h]@5
  TargetWin *v40; // [sp+20h] [bp-10h]@1
  NiPointer<PgWinSpr> *v41; // [sp+24h] [bp-Ch]@2
  NiPointer<PgWinSpr> *v42; // [sp+28h] [bp-8h]@2
  AbnormalStateViewInfo *pkInfo; // [sp+2Ch] [bp-4h]@5
  int i; // [sp+38h] [bp+8h]@1

  v4 = this;
  v40 = this;
  v5 = (void **)&AbStateInfectee::GetAbStateList((AbStateInfectee *)&pkMember->vfptr)->m_pkHead->m_pkNext;
  v6 = *AbstateNums;
  i = *AbstateNums;
  if ( v5 )
  {
    v41 = &v4->m_apkAbstateBuffWin[v6];
    v7 = &v4->m_apkAbstateBufIconWin[v6].m_pObject;
    v42 = &v4->m_apkAbstateDBuffWin[v6];
    v8 = &v4->m_apkAbstateDeBufIconWin[v6].m_pObject;
    while ( v6 < 15 )
    {
      v9 = v5[2];
      v10 = *(_DWORD *)ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;
      kIter = *v5;
      v39 = (std::list<TargetWin::AbStateData,std::allocator<TargetWin::AbStateData> > *)*((_WORD *)v9 + 10);
      v11 = *(int (__stdcall **)(std::list<TargetWin::AbStateData,std::allocator<TargetWin::AbStateData> > *))(v10 + 16);
      pkInfo = (AbnormalStateViewInfo *)ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;
      if ( (unsigned __int8)v11(v39) )
      {
        if ( (unsigned __int16)v39 <= *(_WORD *)&pkInfo->Descript[130] )
        {
          v12 = *(_DWORD *)&pkInfo->Descript[126];
          v13 = *(_DWORD *)(v12 + 4 * (unsigned __int16)v39) == 0;
          v14 = (_DWORD *)(v12 + 4 * (unsigned __int16)v39);
          pkInfo = (AbnormalStateViewInfo *)(v13 ? 0 : *v14);
        }
        else
        {
          pkInfo = 0;
        }
      }
      else
      {
        pkInfo = 0;
      }
      if ( type != 4 || pkInfo->TypeSort != 4 )
      {
        if ( pkInfo->TypeSort == type )
        {
          v25 = *((_DWORD *)v9 + 28);
          LOWORD(_Val.m_fAttackedTime) = *((_WORD *)v9 + 10);
          *(_DWORD *)&_Val.m_kAttacker = v25;
          v26 = (std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *)v40->m_kAbStateList._Myhead->_Prev;
          v37 = (std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *)v40->m_kAbStateList._Myhead;
          v27 = std::_List_val<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>::_Buynode(
                  v37,
                  v26,
                  &_Val);
          v39 = &v40->m_kAbStateList;
          v28 = v40->m_kAbStateList._Mysize;
          if ( 536870910 - v28 < 1 )
LABEL_35:
            std::_Xlength_error("list<T> too long");
          v39->_Mysize = v28 + 1;
          v37->_Prev = v27;
          v27->_Prev->_Next = v27;
          if ( pkInfo->View )
          {
            AbstateIcon::SetAbstate(*v7, *((_WORD *)v9 + 10));
            PgWin::SetToolTipWinText((PgWin *)&(*v7)->vfptr, pkInfo->Descript);
            (*v7)->m_pkToolTipWin = g_pkToolTipWin;
            ((void (__stdcall *)(signed int))(*v7)->vfptr[64].__vecDelDtor)(1);
            ((void (__stdcall *)(signed int))(*v7)->vfptr[60].__vecDelDtor)(1);
            ((void (__stdcall *)(signed int))v41->m_pObject->vfptr[64].__vecDelDtor)(1);
            ++i;
            ++v42;
            ++v41;
            ++v8;
            ++v7;
            if ( *((_DWORD *)v9 + 28) )
            {
              v29 = *(_DWORD *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
              v37 = (std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *)*((_WORD *)v9 + 10);
              v30 = *(int (__stdcall **)(std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *))(v29 + 16);
              v39 = (std::list<TargetWin::AbStateData,std::allocator<TargetWin::AbStateData> > *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
              if ( (unsigned __int8)v30(v37) )
              {
                if ( (unsigned __int16)v37 <= *(_WORD *)&v39[16]._Alnod.0 )
                {
                  v31 = v39[16]._Mysize;
                  v13 = *(_DWORD *)(v31 + 4 * (unsigned __int16)v37) == 0;
                  v32 = (int *)(v31 + 4 * (unsigned __int16)v37);
                  if ( !v13 )
                  {
                    v33 = *v32;
                    if ( v33 )
                    {
                      if ( *(_BYTE *)(v33 + 288) )
                      {
                        AbstateIcon::SetDuplicate(*v7, *((_DWORD *)v9 + 28));
                        ((void (__stdcall *)(signed int))(*v7)->vfptr[64].__vecDelDtor)(1);
                        ((void (__stdcall *)(signed int))(*v7)->vfptr[60].__vecDelDtor)(1);
                        ((void (__stdcall *)(signed int))(*v7)->vfptr[62].__vecDelDtor)(1);
                        v34 = (int)v41;
                        ((void (__stdcall *)(signed int))v41->m_pObject->vfptr[64].__vecDelDtor)(1);
                        ++i;
                        ++v42;
                        ++v8;
                        ++v7;
                        v41 = (NiPointer<PgWinSpr> *)(v34 + 4);
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
      else
      {
        v15 = *((_WORD *)v9 + 10);
        kD.uiStr = *((_DWORD *)v9 + 28);
        kD.kID = v15;
        v16 = (std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *)v40->m_kAbStateList._Myhead->_Prev;
        v37 = (std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *)v40->m_kAbStateList._Myhead;
        v17 = std::_List_val<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>::_Buynode(
                v37,
                v16,
                (GameFrameWork::AttackedMsg::AttackedFrom *)&kD);
        v39 = &v40->m_kAbStateList;
        v18 = v40->m_kAbStateList._Mysize;
        if ( 536870910 - v18 < 1 )
          goto LABEL_35;
        v39->_Mysize = v18 + 1;
        v37->_Prev = v17;
        v17->_Prev->_Next = v17;
        if ( pkInfo->View )
        {
          AbstateIcon::SetAbstate(*v8, *((_WORD *)v9 + 10));
          PgWin::SetToolTipWinText((PgWin *)&(*v8)->vfptr, pkInfo->Descript);
          (*v8)->m_pkToolTipWin = g_pkToolTipWin;
          ((void (__stdcall *)(signed int))(*v8)->vfptr[64].__vecDelDtor)(1);
          ((void (__stdcall *)(signed int))(*v8)->vfptr[60].__vecDelDtor)(1);
          ((void (__stdcall *)(signed int))v42->m_pObject->vfptr[64].__vecDelDtor)(1);
          ++i;
          ++v42;
          ++v41;
          ++v8;
          ++v7;
          if ( *((_DWORD *)v9 + 28) )
          {
            v19 = *(_DWORD *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
            v37 = (std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *)*((_WORD *)v9 + 10);
            v20 = *(int (__stdcall **)(std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *))(v19 + 16);
            v39 = (std::list<TargetWin::AbStateData,std::allocator<TargetWin::AbStateData> > *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
            if ( (unsigned __int8)v20(v37) )
            {
              if ( (unsigned __int16)v37 <= *(_WORD *)&v39[16]._Alnod.0 )
              {
                v21 = v39[16]._Mysize;
                v13 = *(_DWORD *)(v21 + 4 * (unsigned __int16)v37) == 0;
                v22 = (int *)(v21 + 4 * (unsigned __int16)v37);
                if ( !v13 )
                {
                  v23 = *v22;
                  if ( v23 )
                  {
                    if ( *(_BYTE *)(v23 + 288) )
                    {
                      AbstateIcon::SetDuplicate(*v8, *((_DWORD *)v9 + 28));
                      ((void (__stdcall *)(signed int))(*v8)->vfptr[64].__vecDelDtor)(1);
                      ((void (__stdcall *)(signed int))(*v8)->vfptr[60].__vecDelDtor)(1);
                      ((void (__stdcall *)(signed int))(*v8)->vfptr[62].__vecDelDtor)(1);
                      v24 = (int)v42;
                      ((void (__stdcall *)(signed int))v42->m_pObject->vfptr[64].__vecDelDtor)(1);
                      ++i;
                      ++v8;
                      ++v7;
                      ++v41;
                      v42 = (NiPointer<PgWinSpr> *)(v24 + 4);
                    }
                  }
                }
              }
            }
          }
        }
      }
      v6 = i;
      if ( !kIter )
        break;
      v5 = (void **)kIter;
    }
  }
  *AbstateNums = v6;
}
// A8C2A0: using guessed type int ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
// A8C2A4: using guessed type int ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;

//----- (005A53F0) --------------------------------------------------------
void __thiscall TargetWin::UpdateKoreaUI(TargetWin *this, float fCurTime)
{
  int v2; // ebx@1
  TargetWin *v3; // esi@1
  SpEffect **v4; // edi@1
  unsigned int v5; // ecx@8
  MobInfo *v6; // edi@13
  float v7; // ST1C_4@18
  int v8; // eax@18
  float v9; // ST18_4@18
  signed int v10; // eax@18
  bool v11; // zf@18
  bool v12; // sf@18
  void *(__thiscall *v13)(NiRefObject *, unsigned int); // eax@18
  unsigned int v14; // edi@21
  void *(__thiscall *v15)(NiRefObject *, unsigned int); // eax@21
  float v16; // ST1C_4@25
  int v17; // eax@25
  float v18; // ST18_4@25
  signed int v19; // eax@25
  void *(__thiscall *v20)(NiRefObject *, unsigned int); // eax@25
  unsigned int v21; // edi@28
  void *(__thiscall *v22)(NiRefObject *, unsigned int); // eax@29
  float v23; // ST1C_4@34
  int v24; // eax@34
  float v25; // ST18_4@34
  signed int v26; // eax@34
  void *(__thiscall *v27)(NiRefObject *, unsigned int); // eax@34
  unsigned int v28; // edi@37
  void *(__thiscall *v29)(NiRefObject *, unsigned int); // eax@37
  unsigned int v30; // eax@40
  NiRefObjectVtbl *v31; // edi@40
  unsigned int v32; // eax@40
  char *v33; // eax@40
  unsigned int v34; // eax@40
  NiRefObjectVtbl *v35; // edi@40
  unsigned int v36; // eax@40
  char *v37; // eax@40
  unsigned int v38; // eax@40
  NiRefObjectVtbl *v39; // edi@40
  unsigned int v40; // eax@40
  char *v41; // eax@40
  NiRefObjectVtbl *v42; // edi@43
  unsigned int v43; // eax@43
  char *v44; // eax@43
  float v45; // ST1C_4@45
  float v46; // ST18_4@45
  int v47; // eax@45
  void *(__thiscall *v48)(NiRefObject *, unsigned int); // edx@45
  int v49; // edi@48
  float v50; // ST1C_4@54
  float v51; // ST18_4@54
  int v52; // eax@54
  void *(__thiscall *v53)(NiRefObject *, unsigned int); // edx@54
  int v54; // edi@57
  int v55; // eax@58
  void *(__thiscall *v56)(NiRefObject *, unsigned int); // edx@58
  float v57; // ST1C_4@63
  float v58; // ST18_4@63
  int v59; // eax@63
  void *(__thiscall *v60)(NiRefObject *, unsigned int); // edx@63
  int v61; // edi@66
  int v62; // eax@67
  void *(__thiscall *v63)(NiRefObject *, unsigned int); // edx@67
  char v64; // al@71
  PgWinText *v65; // ecx@71
  int v66; // eax@74
  NiRefObjectVtbl *v67; // edi@74
  int v68; // eax@74
  char *v69; // eax@74
  int v70; // eax@74
  NiRefObjectVtbl *v71; // edi@74
  int v72; // eax@74
  char *v73; // eax@74
  int v74; // eax@74
  NiRefObjectVtbl *v75; // edi@74
  int v76; // eax@74
  char *v77; // eax@74
  bool v78; // cf@74
  void *(__thiscall *v79)(NiRefObject *, unsigned int); // eax@74
  char v80; // al@77
  PgWinText *v81; // ecx@77
  NiRefObjectVtbl *v82; // edi@79
  char *v83; // eax@79
  void *(__thiscall *v84)(NiRefObject *, unsigned int); // eax@81
  MobViewInfo *v85; // eax@81
  MobViewInfo *v86; // edi@81
  CharNPC_ViewInfo *v87; // eax@83
  void *(__thiscall *v88)(NiRefObject *, unsigned int); // eax@86
  NiSourceTexture *v89; // ST1C_4@87
  NiSourceTexture *v90; // eax@88
  std::_Tree<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > *v91; // eax@89
  std::_Tree<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > *v92; // edi@89
  int v93; // edi@90
  NiRefObjectVtbl *v94; // edi@93
  D3DXCOLOR *v95; // eax@93
  NiRefObjectVtbl *v96; // edi@104
  D3DXCOLOR *v97; // eax@104
  int v98; // eax@107
  PgWinSpr *v99; // edi@108
  D3DXCOLOR *v100; // eax@108
  PgWinText *v101; // ecx@113
  PgSpr *v102; // edi@116
  NiSourceTexture *v103; // eax@116
  PgSpr *v104; // edi@118
  NiSourceTexture *v105; // eax@118
  NiRefObjectVtbl *v106; // edi@121
  D3DXCOLOR *v107; // eax@121
  CClientGuild *v108; // eax@121
  NiRefObjectVtbl *v109; // edi@125
  D3DXCOLOR *v110; // eax@125
  char v111; // al@126
  void *(__thiscall *v112)(NiRefObject *, unsigned int); // edx@126
  NiTList<AbStateInst *> *v113; // eax@130
  NiTListItem<AbStateInst *> *v114; // eax@131
  std::_List_nod<TargetWin::AbStateData,std::allocator<TargetWin::AbStateData> >::_Node *v115; // ecx@131
  AbStateInst *v116; // edx@133
  void **v117; // ecx@137
  std::_List_nod<TargetWin::AbStateData,std::allocator<TargetWin::AbStateData> >::_Node *v118; // eax@137
  std::_List_nod<TargetWin::AbStateData,std::allocator<TargetWin::AbStateData> >::_Node *v119; // edi@138
  int v120; // edi@139
  NiRefObjectVtbl *v121; // edi@142
  int v122; // eax@142
  double v123; // st7@143
  PgWinBar *v124; // ecx@143
  PgWinBar *v125; // ecx@146
  PgWinBar *v126; // ecx@148
  NiSourceTexture *v127; // eax@150
  char v128; // [sp+10h] [bp-9Ch]@101
  char v129; // [sp+10h] [bp-9Ch]@120
  char v130; // [sp+14h] [bp-98h]@101
  char v131; // [sp+14h] [bp-98h]@120
  char fMaxVal; // [sp+18h] [bp-94h]@101
  char fMaxVala; // [sp+18h] [bp-94h]@120
  char fTime; // [sp+1Ch] [bp-90h]@101
  char fTimea; // [sp+1Ch] [bp-90h]@119
  float fTimeb; // [sp+1Ch] [bp-90h]@150
  char v137; // [sp+2Ch] [bp-80h]@109
  char v138; // [sp+3Ch] [bp-70h]@110
  char v139; // [sp+4Ch] [bp-60h]@111
  D3DXCOLOR result; // [sp+5Ch] [bp-50h]@108
  D3DXCOLOR kTextColor; // [sp+6Ch] [bp-40h]@93
  int BufNum; // [sp+7Ch] [bp-30h]@2
  bool bHaveCharFace; // [sp+83h] [bp-29h]@81
  int DBufNum; // [sp+84h] [bp-28h]@1
  char acText[32]; // [sp+88h] [bp-24h]@40

  v2 = g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1];
  v3 = this;
  v4 = (SpEffect **)this->m_apkSoulWinEffect;
  DBufNum = 2;
  do
  {
    BufNum = 7;
    do
    {
      if ( (*v4)->m_bLive )
        SpEffect::Update(*v4, fCurTime);
      ++v4;
      --BufNum;
    }
    while ( BufNum );
    --DBufNum;
  }
  while ( DBufNum );
  if ( !(unsigned __int8)((int (__thiscall *)(TargetWin *))v3->vfptr[65].__vecDelDtor)(v3) )
  {
    v5 = v3->m_pkFrameWork[17].m_kMsgQ.m_uiTail;
    if ( v5 )
    {
      if ( (unsigned __int8)(*(int (**)(void))(*(_DWORD *)v5 + 260))() )
      {
        MainChar::SetTOTChar((MainChar *)g_pkMainChar, 0xFFFFu);
        (*(void (__stdcall **)(_DWORD))(*(_DWORD *)v3->m_pkFrameWork[17].m_kMsgQ.m_uiTail + 256))(0);
      }
    }
  }
  ((void (__stdcall *)(void *))v3->m_pkLevelText->vfptr[118].__vecDelDtor)(&unk_9A5997);
  if ( !PgWin::IsVisible((PgWin *)&v3->vfptr) )
  {
    if ( !v2 || Char::IsLinkGate((Char *)v2) )
      return;
    LODWORD(fTimeb) = 1;
LABEL_154:
    v3->vfptr[64].__vecDelDtor((NiRefObject *)v3, LODWORD(fTimeb));
    return;
  }
  if ( !v2 || (v6 = Char::GetMobInfo((Char *)v2), Char::IsLinkGate((Char *)v2)) || v6 && v6->Type == 29 )
  {
    ((void (__stdcall *)(void *))v3->m_pkCharNameTextWin->vfptr[118].__vecDelDtor)(&unk_9A599E);
    v123 = 0.0;
    v124 = v3->m_pkHPBar;
    if ( v124 && 0.0 != v124->m_fCurValue )
    {
      v124->m_fCurValue = 0.0;
      PgWinBar::OnChangeValue(v124);
      v123 = 0.0;
    }
    v125 = v3->m_pkSPBar;
    if ( v123 != v125->m_fCurValue )
    {
      v125->m_fCurValue = v123;
      PgWinBar::OnChangeValue(v125);
      v123 = 0.0;
    }
    v126 = v3->m_pkLPBar;
    if ( v123 != v126->m_fCurValue )
    {
      v126->m_fCurValue = v123;
      PgWinBar::OnChangeValue(v126);
    }
    ((void (__stdcall *)(_DWORD))v3->m_pkMobPortrait->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(signed int))v3->m_pkPortrait->vfptr[64].__vecDelDtor)(1);
    v127 = PortraitTextureBuffer::GetDefaultTexture();
    MaskedWin::SetBaseTexture(v3->m_pkPortrait, (NiTexture *)&v127->vfptr);
    fTimeb = 0.0;
    goto LABEL_154;
  }
  if ( (Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1] == g_pkMainChar )
  {
    if ( v3->m_pkHPBar )
    {
      v7 = (double)(signed int)User::HP(&g_kUser);
      v8 = User::MaxHP(&g_kUser);
      DBufNum = v8;
      v9 = (double)v8;
      PgWinBar::SetValue(v3->m_pkHPBar, v9, v7);
      v10 = User::HP(&g_kUser);
      v11 = v10 == 0;
      v12 = v10 < 0;
      v13 = v3->m_pkHPBarEnd->vfptr[64].__vecDelDtor;
      if ( v12 || v11 )
        ((void (__stdcall *)(_DWORD))v13)(0);
      else
        ((void (__stdcall *)(signed int))v13)(1);
      v14 = User::HP(&g_kUser);
      v11 = v14 == User::MaxHP(&g_kUser);
      v15 = v3->m_pkHPBarStart->vfptr[64].__vecDelDtor;
      if ( v11 )
        ((void (__stdcall *)(signed int))v15)(1);
      else
        ((void (__stdcall *)(_DWORD))v15)(0);
    }
    if ( !v3->m_pkLPBar )
      goto LABEL_33;
    v16 = (double)(signed int)User::LP(&g_kUser);
    v17 = User::MaxLP(&g_kUser);
    DBufNum = v17;
    v18 = (double)v17;
    PgWinBar::SetValue(v3->m_pkLPBar, v18, v16);
    v19 = User::LP(&g_kUser);
    v11 = v19 == 0;
    v12 = v19 < 0;
    v20 = v3->m_pkLPBarEnd->vfptr[64].__vecDelDtor;
    if ( v12 || v11 )
      ((void (__stdcall *)(_DWORD))v20)(0);
    else
      ((void (__stdcall *)(signed int))v20)(1);
    v21 = User::LP(&g_kUser);
    if ( v21 == User::MaxLP(&g_kUser) )
    {
      v11 = User::MaxLP(&g_kUser) == 0;
      v22 = v3->m_pkLPBarStart->vfptr[64].__vecDelDtor;
      if ( !v11 )
      {
        ((void (__stdcall *)(signed int))v22)(1);
LABEL_33:
        if ( v3->m_pkSPBar )
        {
          v23 = (double)(signed int)User::SP(&g_kUser);
          v24 = User::MaxSP(&g_kUser);
          DBufNum = v24;
          v25 = (double)v24;
          PgWinBar::SetValue(v3->m_pkSPBar, v25, v23);
          v26 = User::SP(&g_kUser);
          v11 = v26 == 0;
          v12 = v26 < 0;
          v27 = v3->m_pkSPBarEnd->vfptr[64].__vecDelDtor;
          if ( v12 || v11 )
            ((void (__stdcall *)(_DWORD))v27)(0);
          else
            ((void (__stdcall *)(signed int))v27)(1);
          v28 = User::SP(&g_kUser);
          v11 = v28 == User::MaxSP(&g_kUser);
          v29 = v3->m_pkSPBarStart->vfptr[64].__vecDelDtor;
          if ( v11 )
            ((void (__stdcall *)(signed int))v29)(1);
          else
            ((void (__stdcall *)(_DWORD))v29)(0);
        }
        ((void (__stdcall *)(signed int))v3->m_pkHPText->vfptr[64].__vecDelDtor)(1);
        ((void (__stdcall *)(signed int))v3->m_pkSPText->vfptr[64].__vecDelDtor)(1);
        v30 = User::HP(&g_kUser);
        sprintf(acText, "%u", v30);
        v31 = v3->m_pkHPText->vfptr;
        v32 = User::MaxHP(&g_kUser);
        v33 = fs("%s/%d", acText, v32);
        v31[118].__vecDelDtor((NiRefObject *)v3->m_pkHPText, (unsigned int)v33);
        v34 = User::SP(&g_kUser);
        sprintf(acText, "%u", v34);
        v35 = v3->m_pkSPText->vfptr;
        v36 = User::MaxSP(&g_kUser);
        v37 = fs("%s/%d", acText, v36);
        v35[118].__vecDelDtor((NiRefObject *)v3->m_pkSPText, (unsigned int)v37);
        ((void (__stdcall *)(signed int))v3->m_pkLPText->vfptr[64].__vecDelDtor)(1);
        v38 = User::LP(&g_kUser);
        sprintf(acText, "%u", v38);
        v39 = v3->m_pkLPText->vfptr;
        v40 = User::MaxLP(&g_kUser);
        v41 = fs("%s/%d", acText, v40);
        v39[118].__vecDelDtor((NiRefObject *)v3->m_pkLPText, (unsigned int)v41);
        ((void (__stdcall *)(_DWORD))v3->m_pkLevelOver->vfptr[64].__vecDelDtor)(0);
        if ( v3->m_pkLevelText )
        {
          ((void (__stdcall *)(signed int))v3->m_pkLevelText->vfptr[64].__vecDelDtor)(1);
          if ( User::Lv(&g_kUser) )
          {
            v42 = v3->m_pkLevelText->vfptr;
            v43 = User::Lv(&g_kUser);
            v44 = fs("%d", v43);
            v42[118].__vecDelDtor((NiRefObject *)v3->m_pkLevelText, (unsigned int)v44);
          }
          else
          {
            ((void (__stdcall *)(const char *))v3->m_pkLevelText->vfptr[118].__vecDelDtor)("-");
          }
        }
        goto LABEL_80;
      }
    }
    else
    {
      v22 = v3->m_pkLPBarStart->vfptr[64].__vecDelDtor;
    }
    ((void (__stdcall *)(_DWORD))v22)(0);
    goto LABEL_33;
  }
  if ( v3->m_pkHPBar )
  {
    DBufNum = (*(int (__thiscall **)(int))(*(_DWORD *)v2 + 92))(v2);
    v45 = (double)DBufNum;
    DBufNum = (*(int (__thiscall **)(int))(*(_DWORD *)v2 + 100))(v2);
    v46 = (double)DBufNum;
    PgWinBar::SetValue(v3->m_pkHPBar, v46, v45);
    v47 = (*(int (__thiscall **)(int))(*(_DWORD *)v2 + 92))(v2);
    v48 = v3->m_pkHPBarEnd->vfptr[64].__vecDelDtor;
    if ( v47 <= 0 )
      ((void (__stdcall *)(_DWORD))v48)(0);
    else
      ((void (__stdcall *)(signed int))v48)(1);
    v49 = (*(int (__thiscall **)(int))(*(_DWORD *)v2 + 100))(v2);
    if ( (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v2 + 92))(v2) != v49
      || (unsigned __int8)(*(int (__thiscall **)(int))(*(_DWORD *)v2 + 32))(v2)
      && !(*(int (__thiscall **)(_DWORD))(*(_DWORD *)v2 + 100))(v2) )
    {
      ((void (__stdcall *)(_DWORD))v3->m_pkHPBarStart->vfptr[64].__vecDelDtor)(0);
    }
    else
    {
      ((void (__stdcall *)(signed int))v3->m_pkHPBarStart->vfptr[64].__vecDelDtor)(1);
    }
  }
  if ( v3->m_pkLPBar )
  {
    DBufNum = (*(int (__thiscall **)(int))(*(_DWORD *)v2 + 120))(v2);
    v50 = (double)DBufNum;
    DBufNum = (*(int (__thiscall **)(int))(*(_DWORD *)v2 + 124))(v2);
    v51 = (double)DBufNum;
    PgWinBar::SetValue(v3->m_pkLPBar, v51, v50);
    v52 = (*(int (__thiscall **)(int))(*(_DWORD *)v2 + 120))(v2);
    v53 = v3->m_pkLPBarEnd->vfptr[64].__vecDelDtor;
    if ( v52 <= 0 )
      ((void (__stdcall *)(_DWORD))v53)(0);
    else
      ((void (__stdcall *)(signed int))v53)(1);
    v54 = (*(int (__thiscall **)(int))(*(_DWORD *)v2 + 124))(v2);
    if ( (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v2 + 120))(v2) == v54 )
    {
      v55 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v2 + 124))(v2);
      v56 = v3->m_pkLPBarStart->vfptr[64].__vecDelDtor;
      if ( v55 )
      {
        ((void (__stdcall *)(signed int))v56)(1);
        goto LABEL_62;
      }
    }
    else
    {
      v56 = v3->m_pkLPBarStart->vfptr[64].__vecDelDtor;
    }
    ((void (__stdcall *)(_DWORD))v56)(0);
  }
LABEL_62:
  if ( !v3->m_pkSPBar )
    goto LABEL_71;
  DBufNum = (*(int (__thiscall **)(int))(*(_DWORD *)v2 + 104))(v2);
  v57 = (double)DBufNum;
  DBufNum = (*(int (__thiscall **)(int))(*(_DWORD *)v2 + 108))(v2);
  v58 = (double)DBufNum;
  PgWinBar::SetValue(v3->m_pkSPBar, v58, v57);
  v59 = (*(int (__thiscall **)(int))(*(_DWORD *)v2 + 104))(v2);
  v60 = v3->m_pkSPBarEnd->vfptr[64].__vecDelDtor;
  if ( v59 <= 0 )
    ((void (__stdcall *)(_DWORD))v60)(0);
  else
    ((void (__stdcall *)(signed int))v60)(1);
  v61 = (*(int (__thiscall **)(int))(*(_DWORD *)v2 + 108))(v2);
  if ( (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v2 + 104))(v2) == v61 )
  {
    v62 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v2 + 108))(v2);
    v63 = v3->m_pkSPBarStart->vfptr[64].__vecDelDtor;
    if ( v62 )
    {
      ((void (__stdcall *)(signed int))v63)(1);
      goto LABEL_71;
    }
  }
  else
  {
    v63 = v3->m_pkSPBarStart->vfptr[64].__vecDelDtor;
  }
  ((void (__stdcall *)(_DWORD))v63)(0);
LABEL_71:
  v64 = (*(int (__thiscall **)(int))(*(_DWORD *)v2 + 32))(v2);
  v65 = v3->m_pkHPText;
  if ( v64 )
  {
    ((void (__stdcall *)(_DWORD))v65->vfptr[64].__vecDelDtor)(v3->m_bShowMobHP);
    ((void (__stdcall *)(_DWORD))v3->m_pkSPText->vfptr[64].__vecDelDtor)(v3->m_bShowMobHP);
    ((void (__stdcall *)(_DWORD))v3->m_pkLPText->vfptr[64].__vecDelDtor)(v3->m_bShowMobHP);
  }
  else
  {
    ((void (__stdcall *)(_DWORD))v65->vfptr[64].__vecDelDtor)(v3->m_bShowMobHP == 0);
    ((void (__stdcall *)(_DWORD))v3->m_pkSPText->vfptr[64].__vecDelDtor)(v3->m_bShowMobHP == 0);
    ((void (__stdcall *)(_DWORD))v3->m_pkLPText->vfptr[64].__vecDelDtor)(v3->m_bShowMobHP == 0);
  }
  v66 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v2 + 92))(v2);
  sprintf(acText, "%u", v66);
  v67 = v3->m_pkHPText->vfptr;
  v68 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v2 + 100))(v2);
  v69 = fs("%s/%d", acText, v68);
  v67[118].__vecDelDtor((NiRefObject *)v3->m_pkHPText, (unsigned int)v69);
  v70 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v2 + 104))(v2);
  sprintf(acText, "%u", v70);
  v71 = v3->m_pkSPText->vfptr;
  v72 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v2 + 108))(v2);
  v73 = fs("%s/%d", acText, v72);
  v71[118].__vecDelDtor((NiRefObject *)v3->m_pkSPText, (unsigned int)v73);
  v74 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v2 + 120))(v2);
  sprintf(acText, "%u", v74);
  v75 = v3->m_pkLPText->vfptr;
  v76 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v2 + 124))(v2);
  v77 = fs("%s/%d", acText, v76);
  v75[118].__vecDelDtor((NiRefObject *)v3->m_pkLPText, (unsigned int)v77);
  v78 = User::Lv(&g_kUser) + 10 < v3->m_kTempLV;
  v79 = v3->m_pkLevelOver->vfptr[64].__vecDelDtor;
  if ( v78 )
  {
    ((void (__stdcall *)(signed int))v79)(1);
    ((void (__stdcall *)(_DWORD))v3->m_pkLevelText->vfptr[64].__vecDelDtor)(0);
    v3->m_pkLevelText->vfptr[118].__vecDelDtor((NiRefObject *)v3->m_pkLevelText, (unsigned int)&unk_9A599F);
  }
  else
  {
    ((void (__stdcall *)(_DWORD))v79)(0);
    ((void (__stdcall *)(signed int))v3->m_pkLevelText->vfptr[64].__vecDelDtor)(1);
    if ( v3->m_pkLevelText )
    {
      v80 = v3->m_kTempLV;
      v81 = v3->m_pkLevelText;
      if ( v80 )
      {
        v82 = v81->vfptr;
        v83 = fs("%d", (unsigned __int8)v80);
        v82[118].__vecDelDtor((NiRefObject *)v3->m_pkLevelText, (unsigned int)v83);
      }
      else
      {
        v81->vfptr[118].__vecDelDtor((NiRefObject *)v81, (unsigned int)"-");
      }
    }
  }
LABEL_80:
  ((void (__stdcall *)(_DWORD))v3->m_pkMobLevYellow->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v3->m_pkMobLevOrange->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v3->m_pkMobLevRed->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v3->m_pkMobLevGreen->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v3->m_pkMobLevGray->vfptr[64].__vecDelDtor)(0);
  TargetWin::SetTargetClassInfo(v3, v2, (Char *)v2);
  if ( !(unsigned __int8)(*(int (__thiscall **)(_DWORD))(*(_DWORD *)v2 + 32))(v2) )
  {
    if ( (unsigned __int8)(*(int (__thiscall **)(int))(*(_DWORD *)v2 + 656))(v2) )
    {
      ((void (__stdcall *)(_DWORD))v3->m_pkPortrait->vfptr[64].__vecDelDtor)(0);
      ((void (__stdcall *)(signed int))v3->m_pkMobPortrait->vfptr[64].__vecDelDtor)(1);
      v102 = v3->m_pkMobPortrait->m_spSpr.m_pObject;
      v103 = PortraitTextureBuffer::GetMoverPortrait(*(_DWORD *)(v2 + 2956));
      PgSpr::SetTexture(v102, (NiTexture *)&v103->vfptr);
      TargetWin::ShowBarWin(v3, 1);
      goto LABEL_130;
    }
    if ( (unsigned __int8)(*(int (__thiscall **)(int))(*(_DWORD *)v2 + 660))(v2) )
    {
      ((void (__stdcall *)(_DWORD))v3->m_pkPortrait->vfptr[64].__vecDelDtor)(0);
      ((void (__stdcall *)(signed int))v3->m_pkMobPortrait->vfptr[64].__vecDelDtor)(1);
      v104 = v3->m_pkMobPortrait->m_spSpr.m_pObject;
      v105 = PortraitTextureBuffer::GetPetPortrait(*(_DWORD *)(v2 + 2940));
      PgSpr::SetTexture(v104, (NiTexture *)&v105->vfptr);
      TargetWin::ShowBarWin(v3, 1);
      goto LABEL_130;
    }
    fTimea = -1;
    if ( (Char *)v2 == g_pkMainChar )
    {
      fMaxVala = 31;
      v131 = -58;
      v129 = -31;
    }
    else
    {
      v106 = v3->m_pkCharNameTextWin->vfptr;
      v107 = Color::GetDxColor((D3DXCOLOR *)&acText[16], -1, -1, -1, -1);
      v106[117].__vecDelDtor((NiRefObject *)v3->m_pkCharNameTextWin, (unsigned int)v107);
      v108 = GuildTask::GetGuild();
      if ( !v108 || v108->m_GttEnemyInfo.uiStatus != 2 || g_pkMainChar->m_dwGuildRegNum == *(_DWORD *)(v2 + 680) )
      {
LABEL_126:
        TargetWin::ShowBarWin(v3, 1);
        v111 = (*(int (__thiscall **)(int))(*(_DWORD *)v2 + 48))(v2);
        v112 = v3->m_pkMobPortrait->vfptr[64].__vecDelDtor;
        if ( v111 )
        {
          ((void (__stdcall *)(_DWORD))v112)(0);
          ((void (__cdecl *)(_DWORD))v3->m_pkPortrait->vfptr[64].__vecDelDtor)(0);
        }
        else
        {
          ((void (__stdcall *)(_DWORD))v112)(0);
          ((void (__cdecl *)(signed int))v3->m_pkPortrait->vfptr[64].__vecDelDtor)(1);
        }
        TargetWin::PlayerTargetBaseTexture(v3, (Char *)v2);
        goto LABEL_130;
      }
      fTimea = -1;
      fMaxVala = 0;
      v131 = 0;
      v129 = -1;
    }
    v109 = v3->m_pkCharNameTextWin->vfptr;
    v110 = Color::GetDxColor((D3DXCOLOR *)&acText[16], v129, v131, fMaxVala, fTimea);
    v109[117].__vecDelDtor((NiRefObject *)v3->m_pkCharNameTextWin, (unsigned int)v110);
    goto LABEL_126;
  }
  TargetWin::ShowBarWin(v3, 1);
  v84 = v3->m_pkPortrait->vfptr[64].__vecDelDtor;
  bHaveCharFace = 0;
  ((void (__stdcall *)(_DWORD))v84)(0);
  ((void (__stdcall *)(_DWORD))v3->m_pkMobPortrait->vfptr[64].__vecDelDtor)(0);
  v85 = MobViewInfoTab::GetByID(*(_WORD *)(v2 + 946));
  v86 = v85;
  if ( v85 && v85->NpcViewIndex )
  {
    v87 = NPCViewInfoTab::GetByID(v85->NpcViewIndex);
    v11 = v87->Class == 5;
    DBufNum = (int)v87;
    if ( v11 )
    {
      ((void (__stdcall *)(_DWORD))v3->m_pkMobPortrait->vfptr[64].__vecDelDtor)(1);
      v89 = PortraitTextureBuffer::GetMobPortrait(*(_WORD *)(DBufNum + 6));
      PgSpr::SetTexture(v3->m_pkMobPortrait->m_spSpr.m_pObject, (NiTexture *)&v89->vfptr);
      goto LABEL_89;
    }
    if ( v86->SpectralGlow != 1 || v86->NpcViewIndex )
    {
      v88 = v3->m_pkPortrait->vfptr[64].__vecDelDtor;
      bHaveCharFace = 1;
      ((void (__stdcall *)(signed int))v88)(1);
      TargetWin::PlayerTargetBaseTexture(v3, (Char *)v2);
      goto LABEL_89;
    }
  }
  ((void (__stdcall *)(_DWORD))v3->m_pkMobPortrait->vfptr[64].__vecDelDtor)(1);
  v90 = PortraitTextureBuffer::GetMobPortrait(*(_WORD *)(v2 + 946));
  PgSpr::SetTexture(v3->m_pkMobPortrait->m_spSpr.m_pObject, (NiTexture *)&v90->vfptr);
LABEL_89:
  DBufNum = *(_WORD *)(v2 + 552);
  CGuildMonster::GetInstance();
  v92 = v91;
  std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,long>>,0>>::find(
    v91,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > > *)&BufNum,
    (const unsigned __int16 *)&DBufNum);
  if ( (std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *)BufNum == v92->_Myhead )
    v93 = 0;
  else
    v93 = *(_DWORD *)(BufNum + 16);
  DBufNum = (int)GuildTask::GetGuild();
  if ( Char::IsNPC((Char *)v2) )
  {
    v94 = v3->m_pkCharNameTextWin->vfptr;
    v95 = Color::GetDxColor(&kTextColor, -1, -13, 50, -1);
  }
  else
  {
    if ( !v93 || v93 != g_pkMainChar->m_dwGuildRegNum )
    {
      if ( DBufNum && *(_DWORD *)(DBufNum + 2700) == 2 )
      {
        if ( g_pkMainChar->m_dwGuildRegNum == *(_DWORD *)(v2 + 680) )
          goto LABEL_130;
        fTime = -1;
        fMaxVal = 0;
        v130 = 0;
        v128 = -1;
      }
      else
      {
        if ( !Char::IsResource((Char *)v2) )
        {
          if ( Char::GetMobInfo((Char *)v2)->Type == 25 )
          {
            ((void (__stdcall *)(D3DXCOLOR *))v3->m_pkCharNameTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
          }
          else
          {
            v98 = (*(int (__thiscall **)(int))(*(_DWORD *)v2 + 164))(v2);
            switch ( Char::GetLvGapIndex(g_pkMainChar, v98) )
            {
              case 0:
                v99 = v3->m_pkMobLevRed;
                v100 = Color::GetDxColor(&result, -66, 37, 29, -1);
                break;
              case 1:
                v99 = v3->m_pkMobLevOrange;
                v100 = Color::GetDxColor((D3DXCOLOR *)&v137, -1, -96, 37, -1);
                break;
              case 2:
                v99 = v3->m_pkMobLevYellow;
                v100 = Color::GetDxColor((D3DXCOLOR *)&v138, -1, -13, 50, -1);
                break;
              case 3:
                v99 = v3->m_pkMobLevGreen;
                v100 = Color::GetDxColor((D3DXCOLOR *)&v139, 90, -25, 86, -1);
                break;
              default:
                v99 = v3->m_pkMobLevGray;
                v100 = Color::GetDxColor((D3DXCOLOR *)&acText[16], -64, -64, -64, -1);
                break;
            }
            kTextColor.r = v100->r;
            kTextColor.g = v100->g;
            v101 = v3->m_pkCharNameTextWin;
            kTextColor.b = v100->b;
            kTextColor.a = v100->a;
            ((void (__stdcall *)(D3DXCOLOR *))v101->vfptr[117].__vecDelDtor)(&kTextColor);
            if ( !bHaveCharFace )
              v99->vfptr[64].__vecDelDtor((NiRefObject *)v99, 1u);
          }
          goto LABEL_130;
        }
        fTime = -1;
        fMaxVal = -18;
        v130 = -126;
        v128 = -18;
      }
      v96 = v3->m_pkCharNameTextWin->vfptr;
      v97 = Color::GetDxColor(&kTextColor, v128, v130, fMaxVal, fTime);
      v96[117].__vecDelDtor((NiRefObject *)v3->m_pkCharNameTextWin, (unsigned int)v97);
      goto LABEL_130;
    }
    v94 = v3->m_pkCharNameTextWin->vfptr;
    v95 = Color::GetDxColor(&kTextColor, -1, -1, -1, -1);
  }
  v94[117].__vecDelDtor((NiRefObject *)v3->m_pkCharNameTextWin, (unsigned int)v95);
LABEL_130:
  v113 = AbStateInfectee::GetAbStateList((AbStateInfectee *)v2);
  if ( v3->m_kAbStateList._Mysize == v113->m_kAllocator.m_uiCount )
  {
    v114 = v113->m_pkHead;
    v115 = v3->m_kAbStateList._Myhead->_Next;
    if ( v114 )
    {
      while ( v115 != v3->m_kAbStateList._Myhead )
      {
        v116 = v114->m_element;
        v114 = v114->m_pkNext;
        if ( v116->kID != (unsigned __int16)*(_DWORD *)&v115->_Myval.kID || v116->uiSubStateStr != v115->_Myval.uiStr )
          goto LABEL_137;
        v115 = v115->_Next;
        if ( !v114 )
          break;
      }
    }
  }
  else
  {
LABEL_137:
    v117 = (void **)&v3->m_kAbStateList._Myhead->_Next;
    v118 = (std::_List_nod<TargetWin::AbStateData,std::allocator<TargetWin::AbStateData> >::_Node *)*v117;
    *v117 = v117;
    v3->m_kAbStateList._Myhead->_Prev = v3->m_kAbStateList._Myhead;
    v3->m_kAbStateList._Mysize = 0;
    if ( v118 != v3->m_kAbStateList._Myhead )
    {
      do
      {
        v119 = v118->_Next;
        operator delete(v118);
        v118 = v119;
      }
      while ( v119 != v3->m_kAbStateList._Myhead );
    }
    v120 = (int)v3->m_apkAbstateBufIconWin;
    DBufNum = 15;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v120 + 256))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v120 + 60) + 256))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v120 + 120) + 256))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v120 + 180) + 256))(0);
      AbstateIcon::ClearDuplicateText(*(AbstateIcon **)v120);
      AbstateIcon::ClearDuplicateText(*(AbstateIcon **)(v120 + 60));
      v120 += 4;
      --DBufNum;
    }
    while ( DBufNum );
    DBufNum = 0;
    BufNum = 0;
    TargetWin::SetBuffUI(v3, (Char *)v2, Skill, &BufNum);
    TargetWin::SetBuffUI(v3, (Char *)v2, Scroll, &BufNum);
    TargetWin::SetBuffUI(v3, (Char *)v2, Potion, &BufNum);
    TargetWin::SetBuffUI(v3, (Char *)v2, 0, &BufNum);
    TargetWin::SetBuffUI(v3, (Char *)v2, Debuff, &DBufNum);
  }
  v121 = v3->m_pkCharNameTextWin->vfptr;
  v122 = (*(int (__thiscall **)(int))(*(_DWORD *)v2 + 84))(v2);
  v121[118].__vecDelDtor((NiRefObject *)v3->m_pkCharNameTextWin, v122);
}

//----- (005A64C0) --------------------------------------------------------
void __thiscall TargetWin::UpdateMeWin(TargetWin *this, float fCurTime)
{
  Char *v2; // esi@1

  v2 = (Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1];
  TargetWin::UpdateKoreaUI(this, fCurTime);
  if ( v2
    && (!v2->vfptr->IsVisible((AbStateInfectee *)v2)
     || (unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[1].Affect)(v2) && Char::CheckActState(v2, 500000)) )
  {
    MainChar::SetTargetChar((MainChar *)g_pkMainChar, 0);
  }
}

//----- (005A6520) --------------------------------------------------------
unsigned int __cdecl ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C148: using guessed type int ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::ms_pkTable;

//----- (005A6540) --------------------------------------------------------
MobIconWin *__thiscall MobIconWin::`scalar deleting destructor'(MobIconWin *this, unsigned int a2)
{
  MobIconWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&MobIconWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MobIconWin::`vftable'{for `IDirectMessenger'};
  IconWin::~IconWin((IconWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A5D3C: using guessed type void (__thiscall *MobIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A5D5C: using guessed type int (__thiscall *MobIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A6580) --------------------------------------------------------
AbStateIconWin *__thiscall AbStateIconWin::`vector deleting destructor'(AbStateIconWin *this, unsigned int a2)
{
  AbStateIconWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&AbStateIconWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&AbStateIconWin::`vftable'{for `IDirectMessenger'};
  IconWin::~IconWin((IconWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A5FC4: using guessed type void (__thiscall *AbStateIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A5FE4: using guessed type int (__thiscall *AbStateIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A65C0) --------------------------------------------------------
TargetOfTheTargetWin *__thiscall TargetOfTheTargetWin::`scalar deleting destructor'(TargetOfTheTargetWin *this, unsigned int a2)
{
  TargetOfTheTargetWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&TargetOfTheTargetWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&TargetOfTheTargetWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A624C: using guessed type void (__thiscall *TargetOfTheTargetWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A626C: using guessed type int (__thiscall *TargetOfTheTargetWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A6600) --------------------------------------------------------
CharNPC_ViewInfo *__cdecl NPCViewInfoTab::GetByID(unsigned int dwTypeIndex)
{
  CharNPC_ViewInfo *result; // eax@2
  unsigned int v2; // esi@3

  if ( dwTypeIndex )
  {
    v2 = 0;
    if ( ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::GetTotal() )
    {
      while ( 1 )
      {
        result = (CharNPC_ViewInfo *)CDataReader::GetRecord(
                                       (CDataReader *)(ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::ms_pkTable + 4),
                                       v2);
        if ( result->TypeIndex == dwTypeIndex )
          break;
        if ( ++v2 >= ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::GetTotal() )
          goto LABEL_6;
      }
    }
    else
    {
LABEL_6:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C148: using guessed type int ITableBase<CharNPC_ViewInfo,NPCViewInfoTab>::ms_pkTable;

//----- (005A6650) --------------------------------------------------------
std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *__stdcall std::_List_val<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>::_Buynode(std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *_Next, std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *_Prev, GameFrameWork::AttackedMsg::AttackedFrom *_Val)
{
  std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *result; // eax@1
  std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *v5; // edx@2
  std::exception pExceptionObject; // [sp+0h] [bp-Ch]@5

  result = (std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *)operator new(0x10u);
  if ( !result )
  {
    _Next = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Next);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v5 = _Prev;
  result->_Next = _Next;
  result->_Prev = v5;
  if ( result != (std::_List_nod<GameFrameWork::AttackedMsg::AttackedFrom,std::allocator<GameFrameWork::AttackedMsg::AttackedFrom> >::_Node *)-8 )
    result->_Myval = *_Val;
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (005A66C0) --------------------------------------------------------
TargetWin *__thiscall TargetWin::`vector deleting destructor'(TargetWin *this, unsigned int a2)
{
  TargetWin *v2; // esi@1

  v2 = this;
  TargetWin::~TargetWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005A66F0) --------------------------------------------------------
void __thiscall ToolTipWin::ToolTipWin(ToolTipWin *this)
{
  ToolTipWin *v1; // esi@1

  v1 = this;
  FrameBoxWin::FrameBoxWin((FrameBoxWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ToolTipWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ToolTipWin::`vftable'{for `IDirectMessenger'};
  v1->m_bMultiLine = 0;
}
// 9A66D4: using guessed type void (__thiscall *ToolTipWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A66F4: using guessed type int (__thiscall *ToolTipWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A6720) --------------------------------------------------------
void __thiscall ToolTipWin::~ToolTipWin(ToolTipWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ToolTipWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ToolTipWin::`vftable'{for `IDirectMessenger'};
  FrameBoxWin::~FrameBoxWin((FrameBoxWin *)&this->vfptr);
}
// 9A66D4: using guessed type void (__thiscall *ToolTipWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A66F4: using guessed type int (__thiscall *ToolTipWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A6740) --------------------------------------------------------
void __thiscall ToolTipWin::ClearTipText(ToolTipWin *this)
{
  char *v1; // esi@1
  signed int v2; // edi@1

  v1 = (char *)this->m_apkTextWin;
  v2 = 20;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v1 + 472))(&unk_9A66CC);
    v1 += 4;
    --v2;
  }
  while ( v2 );
}

//----- (005A6770) --------------------------------------------------------
void __thiscall ToolTipWin::SetTipText(ToolTipWin *this, char *pcText)
{
  char *v2; // ebx@1
  char *v3; // esi@1
  signed int v4; // edi@1

  v2 = (char *)this->m_apkTextWin;
  v3 = (char *)this->m_apkTextWin;
  v4 = 20;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 472))(&unk_9A66CD);
    v3 += 4;
    --v4;
  }
  while ( v4 );
  if ( pcText )
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 472))(pcText);
}

//----- (005A67C0) --------------------------------------------------------
char __thiscall ToolTipWin::SetTipText(ToolTipWin *this, int nLine, char *pcText, int r, int g, int b, Font::Type font)
{
  ToolTipWin *v7; // esi@1
  char result; // al@2
  NiRefObjectVtbl *v9; // ebx@3
  PgFont *v10; // eax@3

  v7 = this;
  if ( nLine < 20 )
  {
    v9 = this->m_apkTextWin[nLine]->vfptr;
    v10 = Font::Get(font);
    v9[113].__vecDelDtor((NiRefObject *)v7->m_apkTextWin[nLine], (unsigned int)v10);
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v7->m_apkTextWin[nLine]->vfptr[116].__vecDelDtor)(r, g, b, 255);
    ((void (__stdcall *)(_DWORD))v7->m_apkTextWin[nLine]->vfptr[118].__vecDelDtor)(pcText);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (005A6840) --------------------------------------------------------
void __thiscall ToolTipWin::AdjustSizeIfIamToolTipWin(ToolTipWin *this)
{
  char *v1; // edi@1
  int v2; // eax@1
  CSpFont *v3; // esi@1
  unsigned int v4; // ebx@2
  char *v5; // eax@3
  bool v6; // zf@7
  tagSIZE kSize; // [sp+8h] [bp-18h]@4
  ToolTipWin *v8; // [sp+10h] [bp-10h]@1
  int v9; // [sp+14h] [bp-Ch]@2
  char *v10; // [sp+18h] [bp-8h]@2
  unsigned int uiCy; // [sp+1Ch] [bp-4h]@2

  v1 = (char *)this->m_apkTextWin;
  v8 = this;
  v2 = ((int (*)(void))this->m_apkTextWin[0]->vfptr[114].__vecDelDtor)();
  v3 = (CSpFont *)v2;
  if ( v2 )
  {
    SelectObject(*(HDC *)(v2 + 192), *(HGDIOBJ *)(v2 + 184));
    v4 = 0;
    uiCy = 0;
    v10 = v1;
    v9 = 20;
    do
    {
      v5 = (char *)(*(int (**)(void))(**(_DWORD **)v1 + 484))();
      if ( v5 )
      {
        CSpFont::GetTextSize(v3, v5, strlen(v5), &kSize, 0, 0, 1, 0);
        if ( kSize.cx > v4 )
          v4 = kSize.cx;
        uiCy += kSize.cy + 2;
      }
      v1 = v10 + 4;
      v6 = v9-- == 1;
      v10 += 4;
    }
    while ( !v6 );
    if ( v4 )
      ((void (__stdcall *)(unsigned int, unsigned int))v8->vfptr[135].__vecDelDtor)(
        v4 + 2 * v8->m_uiEdgeWidth,
        uiCy + 2 * v8->m_uiEdgeHeight);
  }
}

//----- (005A6920) --------------------------------------------------------
void __thiscall ToolTipWin::ShowToolTip(ToolTipWin *this, PgWin *pkParent)
{
  ToolTipWin *v2; // esi@1
  void *(__thiscall *v3)(NiRefObject *, unsigned int); // edx@2

  v2 = this;
  if ( pkParent )
  {
    ((void (__stdcall *)(_DWORD))this->vfptr[64].__vecDelDtor)(1);
    v3 = v2->vfptr[109].__vecDelDtor;
    v2->m_pkToolTipParentWin = pkParent;
    ((void (__thiscall *)(_DWORD))v3)(v2);
    PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
    unk_B64880 = v2;
  }
}

//----- (005A6970) --------------------------------------------------------
void __thiscall ToolTipWin::ShowToolTip(ToolTipWin *this)
{
  ToolTipWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->vfptr[64].__vecDelDtor)(1);
  ((void (__thiscall *)(_DWORD))v1->vfptr[109].__vecDelDtor)(v1);
  PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
  unk_B64880 = v1;
}

//----- (005A69A0) --------------------------------------------------------
char __thiscall ToolTipWin::Create(ToolTipWin *this, NiSourceTexture *pkTexture, unsigned int uiEdgeWidth, unsigned int uiEdgeHeight)
{
  ToolTipWin *v4; // esi@1
  char result; // al@1
  signed int v6; // ebx@2
  int v7; // edi@2
  PgFont *v8; // eax@3
  PgWinText *v9; // eax@3
  int v10; // eax@3

  v4 = this;
  result = FrameBoxWin::Create((FrameBoxWin *)&this->vfptr, pkTexture, uiEdgeWidth, uiEdgeHeight, 0, 0, 0, 0);
  if ( result )
  {
    v6 = 0;
    v7 = (int)v4->m_apkTextWin;
    do
    {
      v8 = Font::Get(0);
      v9 = PgWinText::CreateWin(
             v4->m_uiEdgeWidth,
             v4->m_uiEdgeHeight + v6 + 2,
             0x100u,
             0x10u,
             v8,
             (PgWin *)&v4->vfptr,
             0,
             0);
      *(_DWORD *)v7 = v9;
      v9->vfptr[60].__vecDelDtor((NiRefObject *)v9, 0);
      v10 = *(_DWORD *)(*(_DWORD *)v7 + 288);
      if ( v10 )
        *(_BYTE *)(v10 + 285) = 1;
      v6 += 14;
      v7 += 4;
    }
    while ( v6 < 280 );
    ((void (__thiscall *)(ToolTipWin *, unsigned int, unsigned int))v4->vfptr[135].__vecDelDtor)(
      v4,
      2 * v4->m_uiEdgeWidth + 128,
      2 * v4->m_uiEdgeHeight + 12);
    result = 1;
  }
  return result;
}

//----- (005A6A70) --------------------------------------------------------
ToolTipWin *__cdecl ToolTipWin::CreateWin(NiSourceTexture *pkTexture, unsigned int uiEdgeHeight, unsigned int uiEdgeWidth)
{
  PgWin *v3; // eax@1
  PgWin *v4; // esi@1
  PgWin *v5; // edi@8
  ToolTipWin *v6; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x1F4u);
  v4 = v3;
  result.m_pObject = v3;
  v8 = 0;
  if ( v3 )
  {
    FrameBoxWin::FrameBoxWin((FrameBoxWin *)v3);
    v4->vfptr = (NiRefObjectVtbl *)&ToolTipWin::`vftable'{for `NiNode'};
    v4->vfptr = (IDirectMessengerVtbl *)&ToolTipWin::`vftable'{for `IDirectMessenger'};
    LOBYTE(v4[1].m_kEffectList.m_pkTail) = 0;
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v8 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v4);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, NiSourceTexture *, unsigned int, unsigned int))v4->vfptr[140].__vecDelDtor)(
                          v4,
                          pkTexture,
                          uiEdgeHeight,
                          uiEdgeWidth) )
  {
    ((void (__thiscall *)(PgWin *))v4->vfptr[89].__vecDelDtor)(v4);
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = (ToolTipWin *)v4;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v4);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = 0;
  }
  return v6;
}
// 9A66D4: using guessed type void (__thiscall *ToolTipWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A66F4: using guessed type int (__thiscall *ToolTipWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A6BC0) --------------------------------------------------------
ToolTipWin *__thiscall ToolTipWin::`scalar deleting destructor'(ToolTipWin *this, unsigned int a2)
{
  ToolTipWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ToolTipWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ToolTipWin::`vftable'{for `IDirectMessenger'};
  FrameBoxWin::~FrameBoxWin((FrameBoxWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A66D4: using guessed type void (__thiscall *ToolTipWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A66F4: using guessed type int (__thiscall *ToolTipWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A6C00) --------------------------------------------------------
void __thiscall UserTradeInvWin::UserTradeInvWin(UserTradeInvWin *this)
{
  UserTradeInvWin *v1; // esi@1

  v1 = this;
  ItemIcon::ItemIcon((ItemIcon *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&UserTradeInvWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&UserTradeInvWin::`vftable'{for `IDirectMessenger'};
  v1->m_uiInvIndex = -1;
  v1->m_uiInvType = 1;
  ItemIcon::SetItem((ItemIcon *)&v1->vfptr, 0, 1);
}
// 9A6D44: using guessed type void (__thiscall *UserTradeInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A6D64: using guessed type int (__thiscall *UserTradeInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A6C80) --------------------------------------------------------
void __thiscall UserTradeInvWin::~UserTradeInvWin(UserTradeInvWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&UserTradeInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&UserTradeInvWin::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
}
// 9A6D44: using guessed type void (__thiscall *UserTradeInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A6D64: using guessed type int (__thiscall *UserTradeInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A6CA0) --------------------------------------------------------
void __thiscall UserTradeInvWin::UpdateMeWin(UserTradeInvWin *this, float fCurTime)
{
  UserTradeInvWin *v2; // esi@1
  unsigned int v3; // eax@1
  Item *v4; // edi@1
  Item *v5; // eax@2

  v2 = this;
  v3 = this->m_uiInvType;
  v4 = 0;
  if ( v3 )
  {
    if ( v3 != 1 )
      goto LABEL_6;
    v5 = UserTrade::GetMy(this->m_uiInvIndex);
  }
  else
  {
    v5 = UserTrade::GetOpp(this->m_uiInvIndex);
  }
  v4 = v5;
LABEL_6:
  if ( v4 != ItemIcon::GetItem((ItemIcon *)&v2->vfptr) )
    ItemIcon::SetItem((ItemIcon *)&v2->vfptr, v4, 1);
  IconWin::UpdateMeWin((IconWin *)&v2->vfptr, fCurTime);
}

//----- (005A6D00) --------------------------------------------------------
char __thiscall UserTradeInvWin::Create(UserTradeInvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent)
{
  UserTradeInvWin *v5; // esi@1
  char result; // al@1

  v5 = this;
  result = ItemIcon::Create((ItemIcon *)&this->vfptr, iXPos, iYPos, pkParent);
  if ( result )
  {
    v5->m_uiInvIndex = uiInvIndex;
    result = 1;
  }
  return result;
}

//----- (005A6D40) --------------------------------------------------------
void __thiscall UserTradeInvWin::SetInvType(UserTradeInvWin *this, unsigned int uiInvType)
{
  this->m_uiInvType = uiInvType;
}

//----- (005A6D50) --------------------------------------------------------
void __thiscall UserTradeInvWin::OnFirstHitWin(UserTradeInvWin *this)
{
  UserTradeInvWin *v1; // esi@1
  Item *v2; // eax@1
  ItemInfoWin *v3; // ecx@2

  v1 = this;
  v2 = ItemIcon::GetItem((ItemIcon *)&this->vfptr);
  if ( v2 )
  {
    v3 = (ItemInfoWin *)v1->m_pkToolTipWin;
    if ( v3 )
    {
      ItemInfoWin::SetItemInfo(v3, v2);
      PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
    }
  }
}

//----- (005A6D80) --------------------------------------------------------
void __thiscall UserTradeWin::SetOtherLock(UserTradeWin *this, int b)
{
  ((void (__stdcall *)(_DWORD))this->m_pkOtherLock->vfptr[60].__vecDelDtor)(b);
}

//----- (005A6DA0) --------------------------------------------------------
void __thiscall UserTradeWin::SetOtherOk(UserTradeWin *this, int b)
{
  ((void (__stdcall *)(_DWORD))this->m_pkOtherOk->vfptr[60].__vecDelDtor)(b);
}

//----- (005A6DC0) --------------------------------------------------------
void __thiscall UserTradeWin::SetOtherName(UserTradeWin *this, char *pkName)
{
  ((void (__stdcall *)(_DWORD))this->m_pkOtherNameWin->vfptr[118].__vecDelDtor)(pkName);
}

//----- (005A6DE0) --------------------------------------------------------
void __thiscall UserTradeWin::SetMyName(UserTradeWin *this, char *pkName)
{
  ((void (__stdcall *)(_DWORD))this->m_pkMyNameWin->vfptr[118].__vecDelDtor)(pkName);
}

//----- (005A6E10) --------------------------------------------------------
void __thiscall UserTradeWin::OnCmdOk(UserTradeWin *this)
{
  UserTradeWin *v1; // esi@1

  v1 = this;
  GameFrameWork::NcTradeDecideReq((GameFrameWork *)this->m_pkFrameWork);
  ((void (__stdcall *)(_DWORD))v1->m_pkMyOk->vfptr[60].__vecDelDtor)(0);
}

//----- (005A6E40) --------------------------------------------------------
void __thiscall UserTradeWin::OnCmdCancel(UserTradeWin *this)
{
  UserTradeWin *v1; // esi@1

  v1 = this;
  GameFrameWork::NcTradeCancelReq((GameFrameWork *)this->m_pkFrameWork);
  PgWin::PostMsg((PgWin *)&v1->vfptr, 1u, 0, 0);
}

//----- (005A6E60) --------------------------------------------------------
void __thiscall UserTradeWin::OnClose(UserTradeWin *this)
{
  UserTradeWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkMyCopperEdit->vfptr[115].__vecDelDtor)(&unk_9A693B);
  ((void (__stdcall *)(_DWORD))v1->m_pkMySilverEdit->vfptr[115].__vecDelDtor)(&unk_9A6942);
  ((void (__stdcall *)(_DWORD))v1->m_pkMyGoldEdit->vfptr[115].__vecDelDtor)(&unk_9A6943);
  ((void (__stdcall *)(_DWORD))v1->m_pkMyGemEdit->vfptr[115].__vecDelDtor)(&unk_9A6951);
  ((void (__stdcall *)(_DWORD))v1->m_pkMyCopperEdit->vfptr[121].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkMySilverEdit->vfptr[121].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkMyGoldEdit->vfptr[121].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkMyGemEdit->vfptr[121].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkOtherCopperText->vfptr[118].__vecDelDtor)("0");
  ((void (__stdcall *)(_DWORD))v1->m_pkOtherSilverText->vfptr[118].__vecDelDtor)("0");
  ((void (__stdcall *)(_DWORD))v1->m_pkOtherGoldText->vfptr[118].__vecDelDtor)("0");
  ((void (__stdcall *)(_DWORD))v1->m_pkOtherGemText->vfptr[118].__vecDelDtor)("0");
  EditWin::SetEnable(v1->m_pkMyCopperEdit, 1);
  EditWin::SetEnable(v1->m_pkMyGemEdit, 1);
  EditWin::SetEnable(v1->m_pkMyGoldEdit, 1);
  EditWin::SetEnable(v1->m_pkMySilverEdit, 1);
  ((void (__stdcall *)(_DWORD))v1->m_pkMyLock->vfptr[60].__vecDelDtor)(1);
}

//----- (005A6FA0) --------------------------------------------------------
void __thiscall UserTradeWin::SetOtherMoney(UserTradeWin *this, __int64 i64Money)
{
  UserTradeWin *v2; // esi@1
  int iCopper; // ST38_4@1
  int iSilver; // ST40_4@1
  int iGold; // ST3C_4@1
  int v6; // edi@1
  char acTemp[64]; // [sp+18h] [bp-44h]@1

  v2 = this;
  iCopper = User::GetCopper(i64Money);
  iSilver = User::GetSilver(i64Money);
  iGold = User::GetGold(i64Money);
  v6 = User::GetGem(i64Money);
  _itoa(iCopper, acTemp, 10);
  ((void (__stdcall *)(_DWORD))v2->m_pkOtherCopperText->vfptr[118].__vecDelDtor)(acTemp);
  _itoa(iSilver, acTemp, 10);
  ((void (__stdcall *)(_DWORD))v2->m_pkOtherSilverText->vfptr[118].__vecDelDtor)(acTemp);
  _itoa(iGold, acTemp, 10);
  ((void (__stdcall *)(_DWORD))v2->m_pkOtherGoldText->vfptr[118].__vecDelDtor)(acTemp);
  _itoa(v6, acTemp, 10);
  ((void (__stdcall *)(_DWORD))v2->m_pkOtherGemText->vfptr[118].__vecDelDtor)(acTemp);
}

//----- (005A7090) --------------------------------------------------------
void __thiscall UserTradeWin::UnlockMyLock(UserTradeWin *this)
{
  UserTradeWin *v1; // esi@1
  EditWin *v2; // ecx@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkMyLock->vfptr[60].__vecDelDtor)(1);
  v2 = v1->m_pkMyCopperEdit;
  v1->m_bBothLocked = 0;
  EditWin::SetEnable(v2, 1);
  EditWin::SetEnable(v1->m_pkMyGemEdit, 1);
  EditWin::SetEnable(v1->m_pkMyGoldEdit, 1);
  EditWin::SetEnable(v1->m_pkMySilverEdit, 1);
}

//----- (005A7100) --------------------------------------------------------
void __thiscall UserTradeWin::OnShowWin(UserTradeWin *this)
{
  UserTradeWin *v1; // esi@1
  GameFrameWork *v2; // eax@1

  v1 = this;
  PgWin::OnShowWin((PgWin *)&this->vfptr);
  v1->m_bBothLocked = 0;
  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
    GameFrameWork::OpenPlayGuideWin(v2, BIL_ITEM_18);
}

//----- (005A7140) --------------------------------------------------------
__int64 __thiscall UserTradeWin::GetInputMoney(UserTradeWin *this, bool *bBounded)
{
  UserTradeWin *v2; // esi@1
  const char *v3; // eax@1
  const char *v4; // eax@1
  const char *v5; // eax@1
  const char *v6; // eax@1
  int v7; // ebx@1
  __int64 v8; // rax@1
  __int64 v9; // rax@1
  __int64 v10; // rax@1
  __int64 v11; // rax@1
  int v12; // eax@1
  int iRealSilver; // [sp+Ch] [bp-3Ch]@1
  int iRealCopper; // [sp+10h] [bp-38h]@1
  int iRealGold; // [sp+14h] [bp-34h]@1
  int iGold; // [sp+18h] [bp-30h]@1
  int iCopper; // [sp+1Ch] [bp-2Ch]@1
  int iSilver; // [sp+20h] [bp-28h]@1
  char acTemp[32]; // [sp+24h] [bp-24h]@3

  v2 = this;
  v3 = (const char *)((int (*)(void))this->m_pkMyCopperEdit->vfptr[113].__vecDelDtor)();
  iCopper = atoi(v3);
  v4 = (const char *)((int (*)(void))v2->m_pkMySilverEdit->vfptr[113].__vecDelDtor)();
  iSilver = atoi(v4);
  v5 = (const char *)((int (*)(void))v2->m_pkMyGoldEdit->vfptr[113].__vecDelDtor)();
  iGold = atoi(v5);
  v6 = (const char *)((int (*)(void))v2->m_pkMyGemEdit->vfptr[113].__vecDelDtor)();
  v7 = atoi(v6);
  v8 = User::GetMoney(&g_kUser);
  iRealCopper = User::GetCopper(v8);
  v9 = User::GetMoney(&g_kUser);
  iRealSilver = User::GetSilver(v9);
  v10 = User::GetMoney(&g_kUser);
  iRealGold = User::GetGold(v10);
  v11 = User::GetMoney(&g_kUser);
  v12 = User::GetGem(v11);
  if ( v7 >= v12 )
  {
    if ( v7 != v12 )
    {
      v7 = v12;
      _itoa(v12, acTemp, 10);
      ((void (__stdcall *)(char *))v2->m_pkMyGemEdit->vfptr[115].__vecDelDtor)(acTemp);
      *bBounded = 1;
    }
    if ( iGold >= iRealGold )
    {
      if ( iGold != iRealGold )
      {
        iGold = iRealGold;
        _itoa(iRealGold, acTemp, 10);
        ((void (__stdcall *)(char *))v2->m_pkMyGoldEdit->vfptr[115].__vecDelDtor)(acTemp);
        *bBounded = 1;
      }
      if ( iSilver >= iRealSilver )
      {
        if ( iSilver != iRealSilver )
        {
          iSilver = iRealSilver;
          _itoa(iRealSilver, acTemp, 10);
          ((void (__stdcall *)(char *))v2->m_pkMySilverEdit->vfptr[115].__vecDelDtor)(acTemp);
          *bBounded = 1;
        }
        if ( iCopper >= iRealCopper && iCopper != iRealCopper )
        {
          iCopper = iRealCopper;
          _itoa(iRealCopper, acTemp, 10);
          v2->m_pkMyCopperEdit->vfptr[116].__vecDelDtor((NiRefObject *)v2->m_pkMyCopperEdit, (unsigned int)acTemp);
          *bBounded = 1;
        }
      }
    }
  }
  return User::ConvertMoney(iCopper, iSilver, iGold, v7);
}

//----- (005A7330) --------------------------------------------------------
void UserTradeWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "UserTrade");
}

//----- (005A7360) --------------------------------------------------------
void __thiscall UserTradeWin::UserTradeWin(UserTradeWin *this)
{
  UserTradeWin *v1; // esi@1
  int v2; // eax@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&UserTradeWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&UserTradeWin::`vftable'{for `IDirectMessenger'};
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  v1->m_kDrop.m_pkSender = 0;
  v2 = (int)&v1->m_kDropContents;
  *(_DWORD *)v2 = &DropContents::`vftable';
  *(_DWORD *)(v2 + 64) = 0;
  *(_WORD *)(v2 + 60) = -1;
  v1->m_kDrop.m_pkContents = &v1->m_kDropContents;
  v1->m_kCenboardingPacket.bNeedToSend = 0;
  LODWORD(v1->m_kCenboardingPacket.i64PrevMoney) = 0;
  HIDWORD(v1->m_kCenboardingPacket.i64PrevMoney) = 0;
  v1->m_bBothLocked = 0;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9A6FD4: using guessed type void (__thiscall *UserTradeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A6FF4: using guessed type int (__thiscall *UserTradeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A73D0) --------------------------------------------------------
void __thiscall UserTradeWin::~UserTradeWin(UserTradeWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&UserTradeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&UserTradeWin::`vftable'{for `IDirectMessenger'};
  this->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  this->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9A6FD4: using guessed type void (__thiscall *UserTradeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A6FF4: using guessed type int (__thiscall *UserTradeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A7400) --------------------------------------------------------
void __thiscall UserTradeWin::OnCmdMyInvLClick(UserTradeWin *this, unsigned int uiInvIndex)
{
  UserTradeWin *v2; // esi@1
  Item *v3; // eax@2

  v2 = this;
  if ( !UserTrade::GetLockMy() )
  {
    v3 = ItemIcon::GetItem((ItemIcon *)&v2->m_apkMyInvWin[uiInvIndex]->vfptr);
    if ( v3 )
    {
      v2->m_kDropContents.m_eType = 0;
      v2->m_kDropContents.m_eSenderType = 7;
      v2->m_kDropContents.m_apvParam[0] = v3;
      v2->m_kDropContents.m_apvParam[1] = 0;
      v2->m_kDropContents.m_uiSenderIndex = uiInvIndex;
      v2->m_kDropContents.m_uiLot = ((int (__thiscall *)(_DWORD))v3->vfptr[3].__vecDelDtor)(v3);
      v2->m_kDrop.m_pkSender = (PgWin *)v2;
      PgCursor::ms_pkDrop = &v2->m_kDrop;
    }
  }
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (005A7470) --------------------------------------------------------
void __thiscall UserTradeInvWin::DoAction(UserTradeInvWin *this)
{
  UserTradeInvWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiInvIndex);
}

//----- (005A74A0) --------------------------------------------------------
void __thiscall UserTradeInvWin::DoRAction(UserTradeInvWin *this)
{
  UserTradeInvWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiRCmdMsg, v1->m_uiInvIndex);
}

//----- (005A74D0) --------------------------------------------------------
void __thiscall UserTradeWin::OnCmdLock(UserTradeWin *this)
{
  UserTradeWin *v1; // esi@1
  unsigned __int64 v2; // kr00_8@2
  NiUnsharedGeometryGroup *v3; // eax@3
  bool bBounded; // [sp+7h] [bp-1h]@2

  v1 = this;
  if ( this->m_kCenboardingPacket.bNeedToSend )
  {
    bBounded = 0;
    v2 = UserTradeWin::GetInputMoney(this, &bBounded);
    if ( bBounded )
    {
      v3 = TextData::Get(0xD4DAF036);
      GameFrameWork::AddSysMsg((GameFrameWork *)v1->m_pkFrameWork, (const char *)v3);
    }
    GameFrameWork::NcTradeCenboardingReq((GameFrameWork *)v1->m_pkFrameWork, v2);
    v1->m_kCenboardingPacket.bNeedToSend = 0;
  }
  GameFrameWork::NcTradeBoardlockReq((GameFrameWork *)v1->m_pkFrameWork);
  ((void (__stdcall *)(_DWORD))v1->m_pkMyLock->vfptr[60].__vecDelDtor)(0);
  EditWin::SetEnable(v1->m_pkMyCopperEdit, 0);
  EditWin::SetEnable(v1->m_pkMyGemEdit, 0);
  EditWin::SetEnable(v1->m_pkMyGoldEdit, 0);
  EditWin::SetEnable(v1->m_pkMySilverEdit, 0);
}

//----- (005A7580) --------------------------------------------------------
char __thiscall UserTradeWin::DropOnMyInv(UserTradeWin *this, DropContents *pkContents, unsigned int uiReceiverInvIndex)
{
  UserTradeWin *v3; // ebx@1
  DropContents *v5; // ecx@3
  DropContents::SenderType v6; // eax@3
  NiUnsharedGeometryGroup *v7; // edi@4
  Item *v8; // esi@9
  ItemInfo *v9; // edi@10
  SHINE_PUT_ON_BELONGED_ITEM v10; // eax@13
  SHINE_PUT_ON_BELONGED_ITEM v11; // eax@16
  SHINE_PUT_ON_BELONGED_ITEM v12; // eax@17
  _DWORD *v13; // eax@20
  int v14; // eax@21
  GameFrameWork *v15; // esi@24
  NiUnsharedGeometryGroup *v16; // eax@24
  unsigned int v17; // [sp-Ch] [bp-10h]@14

  v3 = this;
  if ( UserTrade::GetLockMy() )
    return 0;
  v5 = pkContents;
  v6 = pkContents->m_eSenderType;
  if ( v6 != 21 )
  {
    if ( v6 )
      return 0;
    v8 = (Item *)pkContents->m_apvParam[0];
    if ( v8 )
    {
      v9 = v8->m_pkInfo;
      if ( v9 )
      {
        if ( CItemAuthorityBase::IA_IsDataAccBelonged(&g_kItemAuthority, v9->BT_Inx)
          || CItemAuthorityBase::IA_IsDataChrBelonged(&g_kItemAuthority, v9->BT_Inx) )
        {
          if ( CItemAuthorityBase::IA_IsDataPutOnBelonged(&g_kItemAuthority, v9->BT_Inx) != 1 )
            goto LABEL_19;
          v11 = Item::GetPutOnBelongState(v8);
          if ( CItemAuthorityBase::IA_IsWorkAccBelonged(&g_kItemAuthority, v9->BT_Inx, v11) )
            goto LABEL_19;
          v12 = Item::GetPutOnBelongState(v8);
          if ( CItemAuthorityBase::IA_IsWorkChrBelonged(&g_kItemAuthority, v9->BT_Inx, v12) )
            goto LABEL_19;
        }
        else
        {
          v10 = Item::GetPutOnBelongState(v8);
          if ( !CItemAuthorityBase::IA_CanPlayerTrade(&g_kItemAuthority, v9->BT_Inx, v10) )
          {
            v17 = -2086507545;
LABEL_24:
            v15 = (GameFrameWork *)v3->m_pkFrameWork;
            v16 = TextData::Get(v17);
            GameFrameWork::AddSysMsg(v15, (const char *)v16);
            return 0;
          }
        }
        if ( Item::GetPutOnBelongState(v8) == 1 )
        {
LABEL_19:
          v17 = -857857511;
          goto LABEL_24;
        }
      }
      v13 = (_DWORD *)((int (__thiscall *)(Item *))v8->vfptr[11].__vecDelDtor)(v8);
      if ( v13 )
      {
        v14 = *v13 & 0xFF;
        if ( v14 )
        {
          if ( v14 != 255 )
          {
            v17 = -1634432127;
            goto LABEL_24;
          }
        }
      }
      v5 = pkContents;
    }
    GameFrameWork::NcTradeUpboardReq((GameFrameWork *)v3->m_pkFrameWork, v5->m_uiSenderIndex);
    return 1;
  }
  v7 = TextData2::Get(0xD8EBD9EB);
  if ( v3->m_pkMsgHooker )
  {
    ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v3->m_pkMsgHooker->vfptr->SendDirectMessage)(
      25,
      v7,
      &v3->vfptr);
    if ( v3->m_pkMsgHooker )
      ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v3->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
        25,
        v7,
        &v3->vfptr);
  }
  v3->vfptr->DirectDispatchToParent((IDirectMessenger *)&v3->vfptr, 25, v7, (IDirectMessenger *)&v3->vfptr);
  return 0;
}

//----- (005A7730) --------------------------------------------------------
void __thiscall UserTradeWin::UpdateMeWin(UserTradeWin *this, float fCurTime)
{
  UserTradeWin *v2; // esi@1
  bool v3; // al@1
  void *(__thiscall *v4)(NiRefObject *, unsigned int); // edx@1
  bool v5; // al@4
  void *(__thiscall *v6)(NiRefObject *, unsigned int); // edx@4
  PgWinBut *v7; // ecx@10
  unsigned __int64 v8; // kr00_8@11
  NiUnsharedGeometryGroup *v9; // eax@12
  double v10; // st7@13
  bool bBounded; // [sp+Fh] [bp-1h]@11

  v2 = this;
  v3 = UserTrade::GetLockOpp();
  v4 = v2->m_pkOtherLock->vfptr[123].__vecDelDtor;
  if ( v3 )
    ((void (__stdcall *)(signed int))v4)(1);
  else
    ((void (__stdcall *)(_DWORD))v4)(0);
  v5 = UserTrade::GetAgreeOpp();
  v6 = v2->m_pkOtherOk->vfptr[123].__vecDelDtor;
  if ( v5 )
    ((void (__stdcall *)(_DWORD))v6)(0);
  else
    ((void (__stdcall *)(signed int))v6)(1);
  if ( !v2->m_bBothLocked && UserTrade::GetLockMy() && UserTrade::GetLockOpp() )
  {
    v7 = v2->m_pkMyOk;
    v2->m_bBothLocked = 1;
    ((void (__stdcall *)(signed int))v7->vfptr[60].__vecDelDtor)(1);
  }
  bBounded = 0;
  v8 = UserTradeWin::GetInputMoney(v2, &bBounded);
  if ( bBounded )
  {
    v9 = TextData::Get(0xD4DAF036);
    GameFrameWork::AddSysMsg((GameFrameWork *)v2->m_pkFrameWork, (const char *)v9);
  }
  v10 = fCurTime;
  if ( v2->m_kCenboardingPacket.i64PrevMoney != v8 )
  {
    v2->m_kCenboardingPacket.i64PrevMoney = v8;
    v2->m_kCenboardingPacket.bNeedToSend = 1;
    v2->m_kCenboardingPacket.fSendTime = v10 + 0.699999988079071;
  }
  if ( v2->m_kCenboardingPacket.bNeedToSend )
  {
    if ( v2->m_kCenboardingPacket.fSendTime <= v10 )
    {
      GameFrameWork::NcTradeCenboardingReq((GameFrameWork *)v2->m_pkFrameWork, v8);
      v2->m_kCenboardingPacket.bNeedToSend = 0;
    }
  }
}

//----- (005A7860) --------------------------------------------------------
char __thiscall UserTradeInvWin::EatDropInstance(UserTradeInvWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  UserTradeInvWin *v4; // esi@1
  DropContents *v5; // edi@4
  UserTradeWin *v6; // eax@6
  char result; // al@7

  v4 = this;
  if ( !*pkDrop
    || ItemIcon::GetItem((ItemIcon *)&this->vfptr)
    || !v4->m_uiInvType
    || (v5 = (DropContents *)(*pkDrop)->m_pkContents, v5->m_eType)
    || v5->m_eSenderType
    || (v6 = (UserTradeWin *)PgWin::GetParentWin((PgWin *)&v4->vfptr), v4->m_uiInvType != 1) )
  {
    result = 0;
  }
  else
  {
    result = UserTradeWin::DropOnMyInv(v6, v5, v4->m_uiInvIndex);
  }
  return result;
}

//----- (005A78C0) --------------------------------------------------------
void __thiscall UserTradeWin::OnCommand(UserTradeWin *this, unsigned int wParam, int lParam)
{
  UserTradeWin *v3; // esi@1

  v3 = this;
  switch ( wParam )
  {
    case 0xFu:
      UserTradeWin::OnCmdLock(this);
      break;
    case 0x10u:
      GameFrameWork::NcTradeDecideReq((GameFrameWork *)this->m_pkFrameWork);
      ((void (__stdcall *)(_DWORD))v3->m_pkMyOk->vfptr[60].__vecDelDtor)(0);
      break;
    case 0x11u:
    case 0x12u:
      GameFrameWork::NcTradeCancelReq((GameFrameWork *)this->m_pkFrameWork);
      PgWin::PostMsg((PgWin *)&v3->vfptr, 1u, 0, 0);
      break;
    case 0xAu:
      UserTradeWin::OnCmdMyInvLClick(this, lParam);
      break;
    case 0x13u:
      UserTradeWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (005A7970) --------------------------------------------------------
UserTradeInvWin *__cdecl UserTradeInvWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent)
{
  PgWin *v4; // eax@1
  ItemIcon *v5; // esi@1
  PgWin *v6; // edi@8
  UserTradeInvWin *v7; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v4 = (PgWin *)operator new(0x1C8u);
  v5 = (ItemIcon *)v4;
  result.m_pObject = v4;
  v9 = 0;
  if ( v4 )
  {
    ItemIcon::ItemIcon((ItemIcon *)v4);
    LOBYTE(v9) = 1;
    v5->vfptr = (NiRefObjectVtbl *)&UserTradeInvWin::`vftable'{for `NiNode'};
    v5->vfptr = (IDirectMessengerVtbl *)&UserTradeInvWin::`vftable'{for `IDirectMessenger'};
    v5[1].vfptr = (NiRefObjectVtbl *)-1;
    v5[1].m_uiRefCount = 1;
    ItemIcon::SetItem(v5, 0, 1);
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v9 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, (PgWin *)&v5->vfptr);
  if ( (unsigned __int8)((int (__thiscall *)(ItemIcon *, int, int, unsigned int, PgWin *))v5->vfptr[154].__vecDelDtor)(
                          v5,
                          iXPos,
                          iYPos,
                          uiInvIndex,
                          pkParent) )
  {
    ((void (__thiscall *)(ItemIcon *))v5->vfptr[89].__vecDelDtor)(v5);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = (UserTradeInvWin *)v5;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, (PgWin *)&v5->vfptr);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = 0;
  }
  return v7;
}
// 9A6D44: using guessed type void (__thiscall *UserTradeInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A6D64: using guessed type int (__thiscall *UserTradeInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A7AE0) --------------------------------------------------------
UserTradeWin *__cdecl UserTradeWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  UserTradeWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x288u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    UserTradeWin::UserTradeWin((UserTradeWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (UserTradeWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (005A7C10) --------------------------------------------------------
char __thiscall UserTradeWin::Create(UserTradeWin *this, PgFrameWork *pkFrameWork)
{
  UserTradeWin *v2; // esi@1
  NiTexturePalette *v3; // ebx@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  char result; // al@9
  int v8; // edi@10
  int v9; // ebx@10
  NiSourceTexture *v10; // eax@10
  PgSprData *v11; // eax@11
  PgSprData *v12; // eax@15
  PgWinSpr *v13; // eax@15
  PgSprData *v14; // eax@15
  NiNode *v15; // esi@16
  PgFont *v16; // eax@21
  PgWinText *v17; // eax@21
  NiRefObjectVtbl *v18; // edx@21
  NiUnsharedGeometryGroup *v19; // eax@21
  PgSprData *v20; // eax@22
  NiRefObjectVtbl *v21; // eax@22
  NiSourceTexture *v22; // eax@22
  PgSprData *v23; // eax@24
  UserTradeInvWin *v24; // eax@24
  int v25; // ecx@24
  int v26; // eax@24
  PgFont *v27; // eax@26
  PgWinText *v28; // eax@26
  NiNode *v29; // edx@26
  PgFont *v30; // eax@27
  PgWinText *v31; // eax@27
  NiNode *v32; // ecx@27
  PgSprData *v33; // eax@27
  PgSprData *v34; // eax@27
  PgWinSpr *v35; // eax@27
  PgWinSpr *v36; // eax@27
  int v37; // edx@27
  int v38; // eax@27
  int v39; // edx@27
  PgFont *v40; // eax@27
  PgWinText *v41; // eax@27
  NiRefObjectVtbl *v42; // edx@27
  PgWinSpr *v43; // eax@27
  int v44; // edx@27
  int v45; // eax@27
  int v46; // edx@27
  PgFont *v47; // eax@27
  PgWinText *v48; // eax@27
  NiRefObjectVtbl *v49; // edx@27
  NiUnsharedGeometryGroup *v50; // eax@27
  PgWinBut *v51; // eax@27
  int v52; // ecx@27
  int v53; // eax@27
  int v54; // edx@27
  PgFont *v55; // eax@27
  PgWinText *v56; // eax@27
  NiRefObjectVtbl *v57; // edx@27
  PgWinBut *v58; // eax@27
  int v59; // eax@27
  int v60; // edx@27
  PgFont *v61; // eax@27
  PgWinText *v62; // eax@27
  NiRefObjectVtbl *v63; // edx@27
  NiUnsharedGeometryGroup *v64; // eax@27
  PgWinBut *v65; // eax@27
  int v66; // ecx@27
  int v67; // eax@27
  int v68; // edx@27
  PgFont *v69; // eax@27
  PgWinText *v70; // eax@27
  NiRefObjectVtbl *v71; // edx@27
  NiUnsharedGeometryGroup *v72; // eax@27
  D3DXCOLOR v73; // ST48_16@27
  D3DXCOLOR v74; // ST48_16@27
  D3DXCOLOR v75; // ST48_16@27
  D3DXCOLOR v76; // ST48_16@27
  PgWinAbbreviateText *v77; // eax@27
  void *(__thiscall *v78)(NiRefObject *, unsigned int); // edx@27
  NiNode *v79; // esi@28
  UIUtil ui; // [sp+74h] [bp-64h]@27
  unsigned int uiWidth; // [sp+88h] [bp-50h]@15
  unsigned int uiHeight; // [sp+8Ch] [bp-4Ch]@15
  NiSourceTexture *pkTexture8; // [sp+90h] [bp-48h]@13
  NiPointer<NiNode> spNode; // [sp+94h] [bp-44h]@1
  int uiTop; // [sp+98h] [bp-40h]@4
  int uiLeft; // [sp+9Ch] [bp-3Ch]@4
  int i; // [sp+A0h] [bp-38h]@13
  char acShapeName[33]; // [sp+A4h] [bp-34h]@22
  int v89; // [sp+D4h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v89 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\UserTrade.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "UserTradeWin", 0) )
  {
LABEL_5:
    v6 = spNode.m_pObject;
    v89 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = uiLeft;
  v9 = uiTop;
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v11, (PgWin *)&v2->vfptr, 0, 0);
  i = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  v2->m_pkCloseBtn = PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)i, (PgWin *)&v2->vfptr, 0x12u, 0, 0);
  pkTexture8 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    i = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, pkTexture8);
    PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)i, (PgWin *)&v2->vfptr, 0x13u, 0, 0);
  }
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  v13 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v14, (PgWin *)&v2->vfptr, 0, 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "WinTitle",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
    goto LABEL_34;
  v16 = Font::Get(0);
  v17 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9 + 1, uiWidth, uiHeight, v16, (PgWin *)&v2->vfptr, 0, 0);
  v18 = v17->vfptr;
  i = (int)v17;
  v18[122].__vecDelDtor((NiRefObject *)v17, 1u);
  (*(void (__stdcall **)(struct D3DXCOLOR *))(*(_DWORD *)i + 468))(&Color::m_kDxWinTitleColor);
  pkTexture8 = (NiSourceTexture *)(*(_DWORD *)i + 472);
  v19 = TextData::Get(0xA7F8ECE9);
  ((void (__thiscall *)(int, NiUnsharedGeometryGroup *))pkTexture8->vfptr)(i, v19);
  (*(void (__stdcall **)(_DWORD))(*(_DWORD *)i + 240))(0);
  i = 0;
  pkTexture8 = (NiSourceTexture *)v2->m_apkOtherInvWin;
  do
  {
    sprintf(acShapeName, "OtherSlot%03d", i);
    v20 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v20, (PgWin *)&v2->vfptr, 0, 0);
    v21 = (NiRefObjectVtbl *)UserTradeInvWin::CreateWin(uiLeft - v8 + 1, uiTop - v9 + 1, i, (PgWin *)&v2->vfptr);
    pkTexture8->vfptr = v21;
    ItemIcon::SetItem((ItemIcon *)v21, 0, 1);
    v22 = pkTexture8;
    pkTexture8->vfptr[113].__vecDelDtor = 0;
    v22->vfptr[68].__vecDelDtor = (void *(__thiscall *)(NiRefObject *, unsigned int))g_pkItemInfoWin;
    ++i;
    pkTexture8 = (NiSourceTexture *)((char *)v22 + 4);
  }
  while ( i < 12 );
  pkTexture8 = 0;
  i = (int)v2->m_apkMyInvWin;
  do
  {
    sprintf(acShapeName, "MySlot%03d", pkTexture8);
    v23 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v23, (PgWin *)&v2->vfptr, 0, 0);
    v24 = UserTradeInvWin::CreateWin(uiLeft - v8 + 1, uiTop - v9 + 1, (unsigned int)pkTexture8, (PgWin *)&v2->vfptr);
    *(_DWORD *)i = v24;
    ItemIcon::SetItem((ItemIcon *)&v24->vfptr, 0, 1);
    v25 = i;
    *(_DWORD *)(*(_DWORD *)i + 452) = 1;
    (*(void (__stdcall **)(signed int))(**(_DWORD **)v25 + 516))(10);
    (*(void (__stdcall **)(signed int))(**(_DWORD **)i + 560))(11);
    v26 = i;
    *(_DWORD *)(*(_DWORD *)i + 272) = g_pkItemInfoWin;
    *(_BYTE *)(*(_DWORD *)v26 + 254) = 1;
    pkTexture8 = (NiSourceTexture *)((char *)pkTexture8 + 1);
    i = v26 + 4;
  }
  while ( (signed int)pkTexture8 < 12 );
  if ( PgUtil::GetTriShapeRect(
         (NiAVObject *)&spNode.m_pObject->vfptr,
         "OtherName",
         &uiLeft,
         &uiTop,
         &uiWidth,
         &uiHeight) )
  {
    v27 = Font::Get(0);
    v28 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9, uiWidth, uiHeight, v27, (PgWin *)&v2->vfptr, 0, 0);
    v29 = spNode.m_pObject;
    v2->m_pkOtherNameWin = v28;
    if ( !PgUtil::GetTriShapeRect((NiAVObject *)&v29->vfptr, "MyName", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
      goto LABEL_5;
    v30 = Font::Get(0);
    v31 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9, uiWidth, uiHeight, v30, (PgWin *)&v2->vfptr, 0, 0);
    v32 = spNode.m_pObject;
    v2->m_pkMyNameWin = v31;
    v33 = PgSprData::Create((NiAVObject *)&v32->vfptr, "IconSlot", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v33, (PgWin *)&v2->vfptr, 0, 0);
    v34 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Object01", &uiLeft, &uiTop, 0);
    v35 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v34, (PgWin *)&v2->vfptr, 0, 0);
    v35->vfptr[60].__vecDelDtor((NiRefObject *)v35, 0);
    i = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "OtherLockNor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "OtherLockLock");
    v36 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)i, (PgWin *)&v2->vfptr, 0, 0);
    v37 = i;
    v2->m_pkOtherLock = v36;
    v38 = **(_DWORD **)(v37 + 36);
    v39 = *(_DWORD *)(v38 + 20);
    pkTexture8 = *(NiSourceTexture **)(v38 + 24);
    i = v39;
    v40 = Font::Get(0);
    v41 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9, i, (unsigned int)pkTexture8, v40, (PgWin *)&v2->vfptr, 0, 0);
    v42 = v41->vfptr;
    i = (int)v41;
    v42[122].__vecDelDtor((NiRefObject *)v41, 5u);
    (*(void (__stdcall **)(_DWORD))(*(_DWORD *)i + 240))(0);
    i = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "OtherOKNor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "OtherOKOff");
    v43 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)i, (PgWin *)&v2->vfptr, 0, 0);
    v44 = i;
    v2->m_pkOtherOk = v43;
    v45 = **(_DWORD **)(v44 + 36);
    v46 = *(_DWORD *)(v45 + 20);
    pkTexture8 = *(NiSourceTexture **)(v45 + 24);
    i = v46;
    v47 = Font::Get(0);
    v48 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9, i, (unsigned int)pkTexture8, v47, (PgWin *)&v2->vfptr, 0, 0);
    v49 = v48->vfptr;
    i = (int)v48;
    v49[122].__vecDelDtor((NiRefObject *)v48, 5u);
    pkTexture8 = (NiSourceTexture *)(*(_DWORD *)i + 472);
    v50 = TextData::Get(0x2D37918Eu);
    ((void (__thiscall *)(int, NiUnsharedGeometryGroup *))pkTexture8->vfptr)(i, v50);
    (*(void (__stdcall **)(_DWORD))(*(_DWORD *)i + 240))(0);
    i = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MyLockNor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "MyLockOver");
    PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "MyLockClick");
    PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "MyLockLock");
    v51 = PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)i, (PgWin *)&v2->vfptr, 0xFu, 0, 0);
    v52 = i;
    v2->m_pkMyLock = v51;
    v53 = **(_DWORD **)(v52 + 36);
    v54 = *(_DWORD *)(v53 + 20);
    pkTexture8 = *(NiSourceTexture **)(v53 + 24);
    i = v54;
    v55 = Font::Get(0);
    v56 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9, i, (unsigned int)pkTexture8, v55, (PgWin *)&v2->vfptr, 0, 0);
    v57 = v56->vfptr;
    i = (int)v56;
    v57[122].__vecDelDtor((NiRefObject *)v56, 5u);
    (*(void (__stdcall **)(_DWORD))(*(_DWORD *)i + 240))(0);
    i = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MyOKNor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "MyOKClick");
    PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "MyOKClick");
    PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "MyOKOff");
    v58 = PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)i, (PgWin *)&v2->vfptr, 0x10u, 0, 0);
    v2->m_pkMyOk = v58;
    v58->vfptr[60].__vecDelDtor((NiRefObject *)v58, 0);
    v59 = **(_DWORD **)(i + 36);
    v60 = *(_DWORD *)(v59 + 20);
    pkTexture8 = *(NiSourceTexture **)(v59 + 24);
    i = v60;
    v61 = Font::Get(0);
    v62 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9, i, (unsigned int)pkTexture8, v61, (PgWin *)&v2->vfptr, 0, 0);
    v63 = v62->vfptr;
    i = (int)v62;
    v63[122].__vecDelDtor((NiRefObject *)v62, 5u);
    pkTexture8 = (NiSourceTexture *)(*(_DWORD *)i + 472);
    v64 = TextData::Get(0x2D37918Eu);
    ((void (__thiscall *)(_DWORD, _DWORD))pkTexture8->vfptr)(i, v64);
    (*(void (__stdcall **)(_DWORD))(*(_DWORD *)i + 240))(0);
    i = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MyCancelNor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "MyCancelClick");
    PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "MyCancelClick");
    PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "MyCancelOff");
    v65 = PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)i, (PgWin *)&v2->vfptr, 0x11u, 0, 0);
    v66 = i;
    v2->m_pkMyCancel = v65;
    v67 = **(_DWORD **)(v66 + 36);
    v68 = *(_DWORD *)(v67 + 20);
    pkTexture8 = *(NiSourceTexture **)(v67 + 24);
    i = v68;
    v69 = Font::Get(0);
    v70 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9, i, (unsigned int)pkTexture8, v69, (PgWin *)&v2->vfptr, 0, 0);
    v71 = v70->vfptr;
    i = (int)v70;
    v71[122].__vecDelDtor((NiRefObject *)v70, 5u);
    pkTexture8 = (NiSourceTexture *)(*(_DWORD *)i + 472);
    v72 = TextData::Get(0xE2E7EBF6);
    ((void (__thiscall *)(_DWORD, _DWORD))pkTexture8->vfptr)(i, v72);
    (*(void (__stdcall **)(_DWORD))(*(_DWORD *)i + 240))(0);
    UIUtil::UIUtil(&ui);
    LOBYTE(v89) = 1;
    UIUtil::SetOffset(&ui, v8, v9);
    UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
    UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
    v2->m_pkMyCopperBtn = UIUtil::CreateBtn(&ui, 0, "MyCopperBtn", "MyCopperBtn", "MyCopperBtn", "MyCopperBtn", 0);
    v2->m_pkMySilverBtn = UIUtil::CreateBtn(&ui, 0, "MySilverBtn", "MySilverBtn", "MySilverBtn", "MySilverBtn", 0);
    v2->m_pkMyGoldBtn = UIUtil::CreateBtn(&ui, 0, "MyGoldBtn", "MyGoldBtn", "MyGoldBtn", "MyGoldBtn", 0);
    v2->m_pkMyGemBtn = UIUtil::CreateBtn(&ui, 0, "MyGemBtn", "MyGemBtn", "MyGemBtn", "MyGemBtn", 0);
    v2->m_pkMyCopperEdit = UIUtil::CreateEdit(&ui, "MyCopperInput", 3, NUMBER, 0, 1);
    v2->m_pkMySilverEdit = UIUtil::CreateEdit(&ui, "MySilverInput", 3, NUMBER, 0, 1);
    v2->m_pkMyGoldEdit = UIUtil::CreateEdit(&ui, "MyGoldInput", 3, NUMBER, 0, 1);
    v2->m_pkMyGemEdit = UIUtil::CreateEdit(&ui, "MyGemInput", 3, NUMBER, 0, 1);
    v2->m_pkOtherCopperBtn = UIUtil::CreateBtn(
                               &ui,
                               0,
                               "OtherCopperBtn",
                               "OtherCopperBtn",
                               "OtherCopperBtn",
                               "OtherCopperBtn",
                               0);
    v2->m_pkOtherSilverBtn = UIUtil::CreateBtn(
                               &ui,
                               0,
                               "OtherSilverBtn",
                               "OtherSilverBtn",
                               "OtherSilverBtn",
                               "OtherSilverBtn",
                               0);
    v2->m_pkOtherGoldBtn = UIUtil::CreateBtn(&ui, 0, "OtherGoldBtn", "OtherGoldBtn", "OtherGoldBtn", "OtherGoldBtn", 0);
    v2->m_pkOtherGemBtn = UIUtil::CreateBtn(&ui, 0, "OtherGemBtn", "OtherGemBtn", "OtherGemBtn", "OtherGemBtn", 0);
    *(_QWORD *)&v73.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v73.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v2->m_pkOtherCopperText = (PgWinText *)UIUtil::CreateText(&ui, "OtherCopperInput", "0", 0, v73, 5u, 0, 0);
    *(_QWORD *)&v74.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v74.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v2->m_pkOtherSilverText = (PgWinText *)UIUtil::CreateText(&ui, "OtherSilverInput", "0", 0, v74, 5u, 0, 0);
    *(_QWORD *)&v75.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v75.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v2->m_pkOtherGoldText = (PgWinText *)UIUtil::CreateText(&ui, "OtherGoldInput", "0", 0, v75, 5u, 0, 0);
    *(_QWORD *)&v76.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v76.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v77 = UIUtil::CreateText(&ui, "OtherGemInput", "0", 0, v76, 5u, 0, 0);
    v78 = v2->vfptr[59].__vecDelDtor;
    v2->m_pkOtherGemText = (PgWinText *)v77;
    ((void (__thiscall *)(UserTradeWin *, unsigned int, unsigned int, _DWORD, _DWORD))v78)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    LOBYTE(v89) = 0;
    UIUtil::~UIUtil(&ui);
    v89 = -1;
    if ( spNode.m_pObject )
    {
      v79 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v79 )
          v79->vfptr->__vecDelDtor((NiRefObject *)v79, 1u);
      }
    }
    result = 1;
  }
  else
  {
LABEL_34:
    v15 = spNode.m_pObject;
    v89 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v15 )
      v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005A89E0) --------------------------------------------------------
UserTradeInvWin *__thiscall UserTradeInvWin::`scalar deleting destructor'(UserTradeInvWin *this, unsigned int a2)
{
  UserTradeInvWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&UserTradeInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&UserTradeInvWin::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A6D44: using guessed type void (__thiscall *UserTradeInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A6D64: using guessed type int (__thiscall *UserTradeInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A8A20) --------------------------------------------------------
UserTradeWin *__thiscall UserTradeWin::`vector deleting destructor'(UserTradeWin *this, unsigned int a2)
{
  UserTradeWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&UserTradeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&UserTradeWin::`vftable'{for `IDirectMessenger'};
  this->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  this->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9A6FD4: using guessed type void (__thiscall *UserTradeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A6FF4: using guessed type int (__thiscall *UserTradeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A8A70) --------------------------------------------------------
void __thiscall VoteWin::OnShowWin(VoteWin *this)
{
  ((void (__stdcall *)(_DWORD))this->vfptr[64].__vecDelDtor)(1);
}

//----- (005A8A80) --------------------------------------------------------
void __thiscall VoteWin::OnReason(VoteWin *this)
{
  VoteWin *v1; // esi@1
  VoteReasonWin *v2; // eax@2
  NiRefObjectVtbl *v3; // edi@2
  char v4; // al@2

  v1 = this;
  if ( this->m_pkReasonWin )
  {
    v2 = this->m_pkReasonWin;
    v3 = v2->vfptr;
    v4 = ((int (*)(void))v2->vfptr[65].__vecDelDtor)();
    v3[64].__vecDelDtor((NiRefObject *)v1->m_pkReasonWin, v4 == 0);
  }
}

//----- (005A8AC0) --------------------------------------------------------
void VoteWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "KQVote");
}

//----- (005A8AF0) --------------------------------------------------------
void __thiscall VoteWin::SetProposerText(VoteWin *this, const char *pcProposer)
{
  VoteWin *v2; // esi@1

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[65].__vecDelDtor)() != 1 )
  {
    if ( v2->m_pkProposerText )
      ((void (__stdcall *)(_DWORD))v2->m_pkProposerText->vfptr[118].__vecDelDtor)(pcProposer);
  }
}

//----- (005A8B30) --------------------------------------------------------
const char *__thiscall VoteWin::GetProposer(VoteWin *this)
{
  const char *result; // eax@2

  if ( this->m_pkProposerText )
    result = (const char *)((int (*)(void))this->m_pkProposerText->vfptr[121].__vecDelDtor)();
  else
    result = 0;
  return result;
}

//----- (005A8B50) --------------------------------------------------------
void __thiscall VoteWin::SetTargetText(VoteWin *this, const char *pcTarget)
{
  VoteWin *v2; // esi@1

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[65].__vecDelDtor)() != 1 )
  {
    if ( v2->m_pkTargetText )
      ((void (__stdcall *)(_DWORD))v2->m_pkTargetText->vfptr[118].__vecDelDtor)(pcTarget);
  }
}

//----- (005A8B90) --------------------------------------------------------
const char *__thiscall VoteWin::GetTarget(VoteWin *this)
{
  const char *result; // eax@2

  if ( this->m_pkTargetText )
    result = (const char *)((int (*)(void))this->m_pkTargetText->vfptr[121].__vecDelDtor)();
  else
    result = 0;
  return result;
}

//----- (005A8BB0) --------------------------------------------------------
void __thiscall VoteWin::SetReasonText(VoteWin *this, const char *pcText)
{
  if ( this->m_pkReasonText )
    ((void (__stdcall *)(_DWORD))this->m_pkReasonText->vfptr[118].__vecDelDtor)(pcText);
}

//----- (005A8BE0) --------------------------------------------------------
const char *__thiscall VoteWin::GetReasonText(VoteWin *this)
{
  const char *result; // eax@2

  if ( this->m_pkReasonText )
    result = (const char *)((int (*)(void))this->m_pkReasonText->vfptr[121].__vecDelDtor)();
  else
    result = 0;
  return result;
}

//----- (005A8C00) --------------------------------------------------------
int __usercall mktime_2@<eax>(tm *_Tm@<eax>)
{
  return _mktime32(_Tm);
}

//----- (005A8C10) --------------------------------------------------------
void __thiscall VoteWin::OnCloseWin(VoteWin *this)
{
  VoteWin *v1; // esi@1
  EditWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_spReasonEditWin.m_pObject;
  v1->m_bTimer = 0;
  v1->m_bChangeReasonType = 0;
  if ( v2 )
    ((void (__stdcall *)(_DWORD))v2->vfptr[121].__vecDelDtor)(1);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}

//----- (005A8C50) --------------------------------------------------------
void __thiscall VoteWin::OnCancel(VoteWin *this)
{
  VoteWin *v1; // esi@1
  GameFrameWork *v2; // eax@2

  v1 = this;
  if ( !this->m_bSuggestion )
  {
    v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v2 )
    {
      v1->m_eVoteType = 2;
      GameFrameWork::NcKqVoteVotingReq(v2, KVT_NO);
    }
  }
  v1->vfptr[64].__vecDelDtor((NiRefObject *)v1, 0);
  ((void (__stdcall *)(_DWORD))v1->m_spReasonEditWin.m_pObject->vfptr[121].__vecDelDtor)(1);
  ((void (__thiscall *)(_DWORD))v1->vfptr[136].__vecDelDtor)(v1);
}

//----- (005A8CB0) --------------------------------------------------------
void __thiscall VoteWin::SetReasonEditText(VoteWin *this, const char *pcText)
{
  EditWin *v2; // ecx@1

  v2 = this->m_spReasonEditWin.m_pObject;
  if ( v2 )
    ((void (__stdcall *)(_DWORD))v2->vfptr[115].__vecDelDtor)(pcText);
}

//----- (005A8CD0) --------------------------------------------------------
const char *__thiscall VoteWin::GetReasonEditText(VoteWin *this)
{
  EditWin *v1; // ecx@1
  const char *result; // eax@2

  v1 = this->m_spReasonEditWin.m_pObject;
  if ( v1 )
    result = (const char *)((int (*)(void))v1->vfptr[113].__vecDelDtor)();
  else
    result = 0;
  return result;
}

//----- (005A8CF0) --------------------------------------------------------
void __thiscall VoteWin::OnSelected(VoteWin *this)
{
  VoteWin *v1; // esi@1
  EditWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_spReasonEditWin.m_pObject;
  v1->m_bChangeReasonType = 0;
  ((void (__stdcall *)(_DWORD))v2->vfptr[115].__vecDelDtor)(&unk_9A723B);
  ((void (*)(void))v1->m_spReasonEditWin.m_pObject->vfptr[120].__vecDelDtor)();
}

//----- (005A8D20) --------------------------------------------------------
void __thiscall VoteWin::SetReasonType(VoteWin *this, unsigned int uiType)
{
  this->m_uiReasonType = uiType;
  this->m_bChangeReasonType = 1;
  ((void (__stdcall *)(_DWORD))this->m_spReasonEditWin.m_pObject->vfptr[121].__vecDelDtor)(1);
}

//----- (005A8D50) --------------------------------------------------------
void __thiscall VoteWin::VoteWin(VoteWin *this)
{
  VoteWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_pkProposerText = 0;
  v1->m_pkTargetText = 0;
  v1->m_pkTimerText = 0;
  v1->m_pkReasonText = 0;
  v1->m_pkReasonList = 0;
  v1->m_pkReasonWin = 0;
  v1->vfptr = (NiRefObjectVtbl *)&VoteWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&VoteWin::`vftable'{for `IDirectMessenger'};
  v1->m_spReasonEditWin.m_pObject = 0;
  v1->m_bTimer = 0;
  v1->m_uiReasonType = 0;
  v1->m_eVoteType = 0;
  v1->m_pkOKText = 0;
  v1->m_pkCancelText = 0;
  v1->m_pkReasonArrowBut = 0;
  v1->m_pkReasonTextBut = 0;
  v1->m_pkReasonBut = 0;
  *(_WORD *)&v1->m_bSuggestion = 1;
}
// 9A7300: using guessed type void (__thiscall *VoteWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A731C: using guessed type int (__thiscall *VoteWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A8DE0) --------------------------------------------------------
void __thiscall VoteWin::~VoteWin(VoteWin *this)
{
  VoteWin *v1; // esi@1
  EditWin *v2; // edi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&VoteWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&VoteWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spReasonEditWin.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9A7300: using guessed type void (__thiscall *VoteWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A731C: using guessed type int (__thiscall *VoteWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A8E70) --------------------------------------------------------
void __thiscall VoteWin::UpdateTimer(VoteWin *this, float fTime)
{
  VoteWin *v2; // ebx@1
  int v3; // esi@2
  int v4; // eax@2
  float v5; // ST14_4@2
  NiRefObjectVtbl *v6; // esi@4
  char *v7; // eax@4
  char *v8; // eax@4
  float fDeltaTime; // [sp+4h] [bp-2Ch]@2
  tm NowTime; // [sp+8h] [bp-28h]@2

  v2 = this;
  if ( this->m_bTimer )
  {
    qmemcpy(&NowTime, &Timer::ms_dLastServerTime, sizeof(NowTime));
    v3 = _mktime32(&this->m_tEndTime);
    v4 = _mktime32(&NowTime);
    v5 = Timer::ms_fCurTime - Timer::ms_fLastRecordServerTime;
    fDeltaTime = (double)(v3 - v4) - v5;
    if ( fDeltaTime <= 0.0 )
    {
      ((void (__thiscall *)(VoteWin *))v2->vfptr[136].__vecDelDtor)(v2);
    }
    else if ( v2->m_pkTimerText )
    {
      v6 = v2->m_pkTimerText->vfptr;
      v7 = (char *)TextData2::Get(0x89B7C9DC);
      v8 = fs(v7, (signed int)fDeltaTime);
      v6[118].__vecDelDtor((NiRefObject *)v2->m_pkTimerText, (unsigned int)v8);
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8B988: using guessed type float Timer::ms_fLastRecordServerTime;

//----- (005A8F70) --------------------------------------------------------
void __thiscall VoteWin::SetVoteWinType(VoteWin *this, bool bSuggestion)
{
  VoteWin *v2; // esi@1
  KQVoteDesc *v3; // edi@2
  PgWinText *v4; // ecx@3
  NiRefObjectVtbl *v5; // edi@4
  NiUnsharedGeometryGroup *v6; // eax@4
  NiRefObjectVtbl *v7; // edi@4
  NiUnsharedGeometryGroup *v8; // eax@4
  int v9; // ST00_4@5
  KQVoteDesc *v10; // eax@5
  NiRefObjectVtbl *v11; // edi@7
  NiUnsharedGeometryGroup *v12; // eax@7
  NiRefObjectVtbl *v13; // edi@7
  NiUnsharedGeometryGroup *v14; // eax@7

  v2 = this;
  this->m_bSuggestion = bSuggestion;
  if ( bSuggestion )
  {
    this->m_bChangeReasonType = 1;
    v3 = KQVoteDescTable::GetByID(1);
    if ( v3 )
    {
      v4 = v2->m_pkReasonText;
      v2->m_uiReasonType = 1;
      ((void (__stdcall *)(_DWORD))v4->vfptr[118].__vecDelDtor)(v3->KQVoteTitle);
      ((void (__stdcall *)(_DWORD))v2->m_spReasonEditWin.m_pObject->vfptr[115].__vecDelDtor)(v3->KQVoteDescription);
    }
    v5 = v2->m_pkOKText->vfptr;
    v6 = TextData2::Get(0xBAEAE224);
    v5[118].__vecDelDtor((NiRefObject *)v2->m_pkOKText, (unsigned int)v6);
    v7 = v2->m_pkCancelText->vfptr;
    v8 = TextData2::Get(0xA6E6DFD7);
    v7[118].__vecDelDtor((NiRefObject *)v2->m_pkCancelText, (unsigned int)v8);
    ((void (__stdcall *)(_DWORD))v2->m_pkTimerText->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkTimerText->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkReasonArrowBut->vfptr[60].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v2->m_pkReasonArrowBut->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v2->m_pkReasonTextBut->vfptr[60].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v2->m_pkReasonTextBut->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v2->m_pkReasonBut->vfptr[60].__vecDelDtor)(1);
    ((void (__cdecl *)(_DWORD))v2->m_pkReasonBut->vfptr[64].__vecDelDtor)(1);
  }
  else
  {
    v9 = this->m_uiReasonType + 1;
    this->m_bChangeReasonType = 0;
    this->m_bTimer = 1;
    v10 = KQVoteDescTable::GetByID(v9);
    if ( v10 )
      ((void (__stdcall *)(_DWORD))v2->m_pkReasonText->vfptr[118].__vecDelDtor)(v10->KQVoteTitle);
    v11 = v2->m_pkOKText->vfptr;
    v12 = TextData2::Get(0x7999D1F1u);
    v11[118].__vecDelDtor((NiRefObject *)v2->m_pkOKText, (unsigned int)v12);
    v13 = v2->m_pkCancelText->vfptr;
    v14 = TextData2::Get(0xBFEDD632);
    v13[118].__vecDelDtor((NiRefObject *)v2->m_pkCancelText, (unsigned int)v14);
    ((void (__stdcall *)(_DWORD))v2->m_pkTimerText->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkTimerText->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v2->m_pkReasonArrowBut->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkReasonArrowBut->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkReasonTextBut->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkReasonTextBut->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v2->m_pkReasonBut->vfptr[60].__vecDelDtor)(0);
    ((void (__cdecl *)(_DWORD))v2->m_pkReasonBut->vfptr[64].__vecDelDtor)(0);
  }
}

//----- (005A91B0) --------------------------------------------------------
void __thiscall VoteReasonWin::OnReasonSelect(VoteReasonWin *this, VoteReasonWin::eVoteReasonType eType)
{
  VoteReasonWin *v2; // esi@1
  NiNode *v3; // eax@2
  char **v4; // eax@2
  NiNode *v5; // ecx@4
  KQVoteDesc *v6; // eax@6
  NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> >Vtbl *v7; // ecx@7

  v2 = this;
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
  {
    v3 = v2->m_pkParent;
    BYTE2(v3[1].m_kChildren.m_uiGrowBy) = 1;
    v3[1].m_kEffectList.m_pkHead = (NiTListItem<NiDynamicEffect *> *)eType;
    (*((void (__thiscall **)(_DWORD, _DWORD))v3[1].m_kPropertyList.vfptr->__vecDelDtor + 121))(
      v3[1].m_kPropertyList.vfptr,
      1);
    v4 = &v2->m_kReasonString[eType]._Bx._Ptr;
    if ( v2->m_kReasonString[eType]._Myres >= 0x10 )
      v4 = (char **)*v4;
    v5 = v2->m_pkParent;
    if ( LODWORD(v5[1].m_kWorld.m_Rotate.m_pEntry[1][2]) )
      (*(void (__stdcall **)(_DWORD))(*(_DWORD *)LODWORD(v5[1].m_kWorld.m_Rotate.m_pEntry[1][2]) + 472))(v4);
    v6 = KQVoteDescTable::GetByID(eType + 1);
    if ( v6 )
    {
      v7 = v2->m_pkParent[1].m_kPropertyList.vfptr;
      if ( v7 )
        (*((void (__stdcall **)(_DWORD))v7->__vecDelDtor + 115))(v6->KQVoteDescription);
    }
    v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 0);
  }
}

//----- (005A9270) --------------------------------------------------------
void __thiscall VoteWin::UpdateMeWin(VoteWin *this, float fTime)
{
  VoteWin *v2; // esi@1
  PgFrameWork *v3; // eax@2

  v2 = this;
  if ( g_pkKeyboard->m_aucKeystate[0] & 2 )
  {
    v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v3 )
      BYTE3(v3[73].m_kMsgQ.m_uiAlloced) = 0;
    ((void (__thiscall *)(_DWORD))v2->vfptr[136].__vecDelDtor)(v2);
  }
  VoteWin::UpdateTimer(v2, fTime);
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (005A92C0) --------------------------------------------------------
void __thiscall VoteReasonWin::VoteReasonWin(VoteReasonWin *this)
{
  VoteReasonWin *v1; // esi@1

  v1 = this;
  PgWinSpr::PgWinSpr((PgWinSpr *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&VoteReasonWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&VoteReasonWin::`vftable'{for `IDirectMessenger'};
  `eh vector constructor iterator'(
    v1->m_kReasonString,
    0x1Cu,
    5,
    (void (__thiscall *)(void *))std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>,
    (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
}
// 9A7544: using guessed type void (__thiscall *VoteReasonWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A7564: using guessed type int (__thiscall *VoteReasonWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A9340) --------------------------------------------------------
void __thiscall VoteReasonWin::~VoteReasonWin(VoteReasonWin *this)
{
  VoteReasonWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&VoteReasonWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&VoteReasonWin::`vftable'{for `IDirectMessenger'};
  `eh vector destructor iterator'(
    this->m_kReasonString,
    0x1Cu,
    5,
    (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
  PgWinSpr::~PgWinSpr((PgWinSpr *)&v1->vfptr);
}
// 9A7544: using guessed type void (__thiscall *VoteReasonWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A7564: using guessed type int (__thiscall *VoteReasonWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A93C0) --------------------------------------------------------
void __thiscall VoteReasonWin::OnCommand(VoteReasonWin *this, unsigned int wParam, int lParam)
{
  if ( !wParam )
    VoteReasonWin::OnReasonSelect(this, (VoteReasonWin::eVoteReasonType)lParam);
}

//----- (005A93E0) --------------------------------------------------------
VoteWin *__cdecl VoteWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  VoteWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1B8u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    VoteWin::VoteWin((VoteWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (VoteWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (005A9510) --------------------------------------------------------
VoteReasonWin *__cdecl VoteReasonWin::CreateWin(NiPointer<NiNode> spNode, PgWin *pkParent)
{
  VoteReasonWin *v2; // eax@1
  VoteReasonWin *v3; // esi@1
  PgWin *v4; // edi@10
  VoteReasonWin *result; // eax@19
  void (__thiscall *v6)(void *); // [sp-8h] [bp-28h]@2
  void (__thiscall *v7)(void *); // [sp-4h] [bp-24h]@2
  NiPointer<VoteReasonWin> pkWin; // [sp+10h] [bp-10h]@1
  int v9; // [sp+1Ch] [bp-4h]@1

  v9 = 0;
  v2 = (VoteReasonWin *)operator new(0x1B4u);
  v3 = v2;
  pkWin.m_pObject = v2;
  LOBYTE(v9) = 1;
  if ( v2 )
  {
    PgWinSpr::PgWinSpr((PgWinSpr *)&v2->vfptr);
    v7 = (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>;
    v6 = (void (__thiscall *)(void *))std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>;
    LOBYTE(v9) = 2;
    v3->vfptr = (NiRefObjectVtbl *)&VoteReasonWin::`vftable'{for `NiNode'};
    v3->vfptr = (IDirectMessengerVtbl *)&VoteReasonWin::`vftable'{for `IDirectMessenger'};
    `eh vector constructor iterator'(v3->m_kReasonString, 0x1Cu, 5, v6, v7);
  }
  else
  {
    v3 = 0;
  }
  pkWin.m_pObject = v3;
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  LOBYTE(v9) = 3;
  PgWinMgr::Add(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
  v7 = (void (__thiscall *)(void *))pkParent;
  v6 = (void (__thiscall *)(void *))spNode.m_pObject;
  pkParent = (PgWin *)&v6;
  if ( spNode.m_pObject )
    InterlockedIncrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
  if ( (unsigned __int8)((int (__thiscall *)(VoteReasonWin *, void (__thiscall *)(void *), void (__thiscall *)(void *)))v3->vfptr[129].__vecDelDtor)(
                          v3,
                          v6,
                          v7) )
  {
    ((void (__thiscall *)(VoteReasonWin *))v3->vfptr[89].__vecDelDtor)(v3);
    LOBYTE(v9) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v9 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && spNode.m_pObject )
      spNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spNode.m_pObject, 1u);
    result = v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, (NiPointer<PgWin> *)&pkParent, (PgWin *)&v3->vfptr);
    if ( pkParent )
    {
      v4 = pkParent;
      if ( !InterlockedDecrement((volatile LONG *)&pkParent->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    LOBYTE(v9) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v9 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( spNode.m_pObject )
        spNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spNode.m_pObject, 1u);
    }
    result = 0;
  }
  return result;
}
// 9A7544: using guessed type void (__thiscall *VoteReasonWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A7564: using guessed type int (__thiscall *VoteReasonWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005A96D0) --------------------------------------------------------
char __thiscall VoteWin::Create(VoteWin *this, PgFrameWork *pkFrameWork)
{
  VoteWin *v2; // esi@1
  NiTexturePalette *v3; // ebx@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  char result; // al@9
  NiSourceTexture *v8; // eax@10
  PgWinSpr *v9; // eax@10
  D3DXCOLOR v10; // ST38_16@10
  char *v11; // eax@10
  PgWinText *v12; // ebx@10
  NiRefObjectVtbl *v13; // edi@10
  PgFont *v14; // eax@10
  NiSourceTexture *v15; // eax@10
  D3DXCOLOR v16; // ST30_16@10
  char *v17; // eax@10
  PgWinAbbreviateText *v18; // ebx@10
  NiRefObjectVtbl *v19; // edi@10
  PgFont *v20; // eax@10
  D3DXCOLOR v21; // ST38_16@10
  PgWinText *v22; // eax@10
  NiRefObjectVtbl *v23; // edi@10
  PgFont *v24; // eax@10
  D3DXCOLOR v25; // ST30_16@10
  char *v26; // eax@10
  PgWinAbbreviateText *v27; // ebx@10
  NiRefObjectVtbl *v28; // edi@10
  PgFont *v29; // eax@10
  D3DXCOLOR v30; // ST38_16@10
  PgWinText *v31; // eax@10
  NiRefObjectVtbl *v32; // edi@10
  PgFont *v33; // eax@10
  KQVoteDesc *v34; // edi@10
  NiNode *v35; // esi@11
  PgWin *v36; // ST40_4@16
  PgWinBut *v37; // ebx@16
  PgFont *v38; // ST3C_4@16
  unsigned int v39; // ST38_4@16
  unsigned int v40; // eax@16
  PgWinText *v41; // eax@16
  EditWin *v42; // eax@18
  PgWinBut *v43; // eax@18
  char *v44; // eax@18
  VoteReasonWin *v45; // eax@20
  VoteReasonWin *v46; // ecx@20
  void *(__thiscall *v47)(NiRefObject *, unsigned int); // eax@20
  D3DXCOLOR v48; // ST3C_16@20
  PgWinText *v49; // eax@20
  PgWinBut *v50; // eax@20
  PgWinBut *v51; // edi@20
  PgWin *v52; // ST44_4@20
  PgFont *v53; // ST40_4@20
  unsigned int v54; // ST3C_4@20
  unsigned int v55; // eax@20
  PgWinText *v56; // eax@20
  PgWinText *v57; // ecx@20
  void *(__thiscall *v58)(NiRefObject *, unsigned int); // eax@20
  NiRefObjectVtbl *v59; // edi@20
  NiUnsharedGeometryGroup *v60; // ST48_4@20
  PgWinBut *v61; // eax@20
  PgWinBut *v62; // edi@20
  PgWin *v63; // ST38_4@20
  PgFont *v64; // ST34_4@20
  unsigned int v65; // ST30_4@20
  unsigned int v66; // eax@20
  PgWinText *v67; // eax@20
  NiRefObjectVtbl *v68; // edi@20
  NiNode *v69; // [sp+4Ch] [bp-44h]@18
  PgWin *v70; // [sp+50h] [bp-40h]@18
  UIUtil ui; // [sp+5Ch] [bp-34h]@10
  unsigned int uiWidth; // [sp+70h] [bp-20h]@1
  unsigned int uiHeight; // [sp+74h] [bp-1Ch]@1
  int iLeft; // [sp+78h] [bp-18h]@1
  int iTop; // [sp+7Ch] [bp-14h]@1
  NiPointer<NiNode> spNode; // [sp+80h] [bp-10h]@1
  int v77; // [sp+8Ch] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v77 = 0;
  uiWidth = 0;
  uiHeight = 0;
  iLeft = 0;
  iTop = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\KQVote.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iLeft, &iTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "VoteWin", 0) )
  {
    v6 = spNode.m_pObject;
    v77 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v77) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, 0, 0);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v8 = MenuTexMgr::GetTexture(0x13u);
  v9 = UIUtil::CreateSpr(&ui, "Theme", v8);
  v9->vfptr[60].__vecDelDtor((NiRefObject *)v9, 0);
  UIUtil::CreateSpr(&ui, "Panel01", 0);
  *(_QWORD *)&v10.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v10.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v11 = (char *)TextData2::Get(0x93958BA1);
  v12 = UIUtil::CreateTextNoSpr(&ui, "WinTitle", v11, v10, 5u);
  v13 = v12->vfptr;
  v14 = Font::Get(0);
  v13[113].__vecDelDtor((NiRefObject *)v12, (unsigned int)v14);
  UIUtil::CreateCloseBtn(&ui, "ClsNor", "ClsOver", "ClsClick");
  v15 = MenuTexMgr::GetTexture(4u);
  UIUtil::CreateButton(&ui, 4u, "HelpLink", v15, 3);
  *(_QWORD *)&v16.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v16.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v17 = (char *)TextData2::Get(0xE5F5C8E0);
  v18 = UIUtil::CreateText(&ui, "User", v17, 0, v16, 5u, 0, 0);
  v19 = v18->vfptr;
  v20 = Font::Get(0);
  v19[113].__vecDelDtor((NiRefObject *)v18, (unsigned int)v20);
  *(_QWORD *)&v21.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v21.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v22 = UIUtil::CreateTextNoSpr(&ui, "Text01", &byte_9A722A, v21, 5u);
  v2->m_pkProposerText = v22;
  v23 = v22->vfptr;
  v24 = Font::Get(0);
  v23[113].__vecDelDtor((NiRefObject *)v2->m_pkProposerText, (unsigned int)v24);
  *(_QWORD *)&v25.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v25.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v26 = (char *)TextData2::Get(0x94B07FCD);
  v27 = UIUtil::CreateText(&ui, "TargetName", v26, 0, v25, 5u, 0, 0);
  v28 = v27->vfptr;
  v29 = Font::Get(0);
  v28[113].__vecDelDtor((NiRefObject *)v27, (unsigned int)v29);
  *(_QWORD *)&v30.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v30.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v31 = UIUtil::CreateTextNoSpr(&ui, "Text02", &byte_9A722B, v30, 5u);
  v2->m_pkTargetText = v31;
  v32 = v31->vfptr;
  v33 = Font::Get(0);
  v32[113].__vecDelDtor((NiRefObject *)v2->m_pkTargetText, (unsigned int)v33);
  v2->m_pkReasonArrowBut = UIUtil::CreateButton(&ui, 2u, "Reason01", 0, 3);
  v2->m_pkReasonTextBut = UIUtil::CreateButton(&ui, 2u, "Reason", 0, 3);
  v34 = KQVoteDescTable::GetByID(1);
  if ( v34 )
  {
    v36 = (PgWin *)&v2->m_pkReasonTextBut->vfptr;
    v37 = v2->m_pkReasonTextBut;
    v38 = Font::Get(0);
    v39 = ((int (__thiscall *)(PgWinBut *))v37->vfptr[37].__vecDelDtor)(v37);
    v40 = ((int (__thiscall *)(PgWinBut *))v37->vfptr[36].__vecDelDtor)(v37);
    v41 = PgWinText::CreateWin(0, 0, v40, v39, v38, v36, 0, 0);
    v2->m_pkReasonText = v41;
    v41->vfptr[122].__vecDelDtor((NiRefObject *)v41, 5u);
    ((void (__stdcall *)(char *))v2->m_pkReasonText->vfptr[118].__vecDelDtor)(v34->KQVoteTitle);
    ((void (__stdcall *)(_DWORD))v2->m_pkReasonText->vfptr[60].__vecDelDtor)(0);
    if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Text04", &iLeft, &iTop, &uiWidth, &uiHeight) )
    {
      v42 = EditWin::CreateWin(iLeft, iTop + 2, uiWidth, uiHeight, (PgWin *)&v2->vfptr, MULTILINE, 0x78u, 0, 1, 0, 1);
      NiPointer<PopupMenuWin>::operator=(
        (NiPointer<NiD3DDefaultShader> *)&v2->m_spReasonEditWin,
        (NiD3DDefaultShader *)v42);
      EditWin::SetImeStatus(v2->m_spReasonEditWin.m_pObject, IS_KOREAN);
      ((void (__thiscall *)(EditWin *, char *, NiNode *, PgWin *))v2->m_spReasonEditWin.m_pObject->vfptr[115].__vecDelDtor)(
        v2->m_spReasonEditWin.m_pObject,
        v34->KQVoteDescription,
        v69,
        v70);
      v43 = PgWinBut::CreateWin(iLeft, iTop + 2, uiWidth, uiHeight, (PgWin *)&v2->vfptr, 3u, 0, 0);
      v2->m_pkReasonBut = v43;
      v43->m_pkToolTipWin = g_pkToolTipWin;
      v44 = (char *)TextData2::Get(0xDAFAF0C3);
      PgWin::SetToolTipWinText((PgWin *)&v2->m_pkReasonBut->vfptr, v44);
      v70 = (PgWin *)v2;
      v69 = spNode.m_pObject;
      if ( spNode.m_pObject )
        InterlockedIncrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
      v45 = VoteReasonWin::CreateWin((NiPointer<NiNode>)v69, v70);
      v2->m_pkReasonWin = v45;
      v46 = v45;
      v47 = v45->vfptr[64].__vecDelDtor;
      v70 = 0;
      ((void (__thiscall *)(VoteReasonWin *))v47)(v46);
      *(_QWORD *)&v48.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v48.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v49 = UIUtil::CreateTextNoSpr(&ui, "Text07", &byte_9A723A, v48, 5u);
      v69 = (NiNode *)3;
      v2->m_pkTimerText = v49;
      v50 = UIUtil::CreateButton(&ui, 0, "Btn01", 0, (int)v69);
      v69 = 0;
      v51 = v50;
      v52 = (PgWin *)v50;
      v53 = Font::Get(0);
      v54 = ((int (__thiscall *)(PgWinBut *))v51->vfptr[37].__vecDelDtor)(v51);
      v55 = ((int (__thiscall *)(PgWinBut *))v51->vfptr[36].__vecDelDtor)(v51);
      v56 = PgWinText::CreateWin(0, 0, v55, v54, v53, v52, 0, (unsigned int)v69);
      v2->m_pkOKText = v56;
      v57 = v56;
      v58 = v56->vfptr[122].__vecDelDtor;
      v69 = (NiNode *)5;
      ((void (__thiscall *)(PgWinText *))v58)(v57);
      v59 = v2->m_pkOKText->vfptr;
      v60 = TextData2::Get(0xBAEAE224);
      ((void (__thiscall *)(PgWinText *))v59[118].__vecDelDtor)(v2->m_pkOKText);
      ((void (__cdecl *)(_DWORD, NiUnsharedGeometryGroup *, NiNode *, PgWin *))v2->m_pkOKText->vfptr[60].__vecDelDtor)(
        0,
        v60,
        v69,
        v70);
      v61 = UIUtil::CreateButton(&ui, 1u, "Btn02", 0, 3);
      v62 = v61;
      v63 = (PgWin *)v61;
      v64 = Font::Get(0);
      v65 = ((int (__thiscall *)(PgWinBut *))v62->vfptr[37].__vecDelDtor)(v62);
      v66 = ((int (__thiscall *)(PgWinBut *))v62->vfptr[36].__vecDelDtor)(v62);
      v67 = PgWinText::CreateWin(0, 0, v66, v65, v64, v63, 0, 0);
      v2->m_pkCancelText = v67;
      ((void (__thiscall *)(PgWinText *))v67->vfptr[122].__vecDelDtor)(v67);
      v68 = v2->m_pkCancelText->vfptr;
      TextData2::Get(0xA6E6DFD7);
      ((void (__thiscall *)(PgWinText *))v68[118].__vecDelDtor)(v2->m_pkCancelText);
      ((void (__stdcall *)(_DWORD))v2->m_pkCancelText->vfptr[60].__vecDelDtor)(0);
      ((void (__thiscall *)(VoteWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
        v2,
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        1.0,
        0.5);
      LOBYTE(v77) = 0;
      UIUtil::~UIUtil(&ui);
      v77 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 1;
    }
    else
    {
      LOBYTE(v77) = 0;
      UIUtil::~UIUtil(&ui);
      v77 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 0;
    }
  }
  else
  {
    LOBYTE(v77) = 0;
    UIUtil::~UIUtil(&ui);
    v35 = spNode.m_pObject;
    v77 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v35 )
      v35->vfptr->__vecDelDtor((NiRefObject *)v35, 1u);
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005A9E30) --------------------------------------------------------
void __thiscall VoteWin::OnOK(VoteWin *this)
{
  VoteWin *v1; // esi@1
  GameFrameWork *v2; // eax@1
  char *v3; // eax@3
  ProcessingString *v4; // edi@3
  ProcessingString *v5; // edx@3
  char v6; // al@4
  int (*v7)(void); // eax@5
  char *v8; // eax@5
  Name5 v9; // [sp-34h] [bp-5Ch]@5
  int v10; // [sp-30h] [bp-58h]@5
  int v11; // [sp-2Ch] [bp-54h]@5
  int v12; // [sp-28h] [bp-50h]@5
  int v13; // [sp-24h] [bp-4Ch]@5
  unsigned int v14; // [sp-20h] [bp-48h]@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v15; // [sp-1Ch] [bp-44h]@3
  int v16; // [sp-Ch] [bp-34h]@3
  signed int v17; // [sp-8h] [bp-30h]@3
  KQ_VOTING_TYPE v18; // [sp-4h] [bp-2Ch]@6
  _DWORD *v19; // [sp+10h] [bp-18h]@3
  GameFrameWork *pkGame; // [sp+14h] [bp-14h]@1
  char *v21; // [sp+18h] [bp-10h]@3
  int v22; // [sp+24h] [bp-4h]@5

  v1 = this;
  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  pkGame = v2;
  if ( v2 )
  {
    if ( v1->m_bSuggestion )
    {
      v3 = (char *)((int (*)(void))v1->m_spReasonEditWin.m_pObject->vfptr[113].__vecDelDtor)();
      v4 = TextFilterTable::FilterSlander(v3);
      v5 = v4;
      v17 = 15;
      v16 = 0;
      v19 = &v15;
      v15._Bx._Buf[0] = 0;
      v21 = &v4->m_acSource[1];
      do
      {
        v6 = v5->m_acSource[0];
        v5 = (ProcessingString *)((char *)v5 + 1);
      }
      while ( v6 );
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v15,
        v4->m_acSource,
        (char *)v5 - v21);
      v14 = v1->m_uiReasonType;
      v7 = (int (*)(void))v1->m_pkTargetText->vfptr[121].__vecDelDtor;
      v22 = 0;
      v8 = (char *)v7();
      v19 = &v9;
      v13 = 0;
      v12 = 0;
      v11 = 0;
      v10 = 0;
      v9.n5_code[0] = 0;
      strncpy(v9.n5_name, v8, 0x14u);
      v22 = -1;
      GameFrameWork::NcKqVoteStartReq(pkGame, v9, v14, v15);
    }
    else
    {
      v18 = 1;
      v1->m_eVoteType = 1;
      GameFrameWork::NcKqVoteVotingReq(v2, v18);
    }
    v1->vfptr[64].__vecDelDtor((NiRefObject *)v1, 0);
    ((void (*)(void))v1->vfptr[136].__vecDelDtor)();
  }
}

//----- (005A9F60) --------------------------------------------------------
char __thiscall VoteReasonWin::Create(VoteReasonWin *this, NiPointer<NiNode> spNode, PgWin *pkParent)
{
  VoteReasonWin *v3; // esi@1
  PgSprData *v4; // eax@1
  char result; // al@6
  signed int v6; // edi@7
  int v7; // eax@8
  unsigned int v8; // ebx@9
  unsigned int v9; // esi@11
  char *v10; // eax@14
  unsigned int v11; // edi@16
  unsigned int v12; // ebx@17
  const char *v13; // eax@17
  PgWinBut *v14; // esi@17
  PgFont *v15; // ST10_4@17
  unsigned int v16; // ST0C_4@17
  unsigned int v17; // eax@17
  PgWinText *v18; // esi@17
  void *v19; // eax@17
  UIUtil ui; // [sp+10h] [bp-2Ch]@7
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v21; // [sp+24h] [bp-18h]@7
  int iLeft; // [sp+28h] [bp-14h]@1
  int iTop; // [sp+2Ch] [bp-10h]@1
  int v24; // [sp+38h] [bp-4h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *pkParenta; // [sp+48h] [bp+Ch]@7
  PgWin *pkParentb; // [sp+48h] [bp+Ch]@16

  v3 = this;
  v24 = 0;
  iLeft = 0;
  iTop = 0;
  v4 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ReasonPulldown", &iLeft, &iTop, 0);
  if ( PgWinSpr::Create((PgWinSpr *)&v3->vfptr, iLeft, iTop, v4, pkParent, 0, 0) )
  {
    UIUtil::UIUtil(&ui);
    LOBYTE(v24) = 1;
    UIUtil::SetParent(&ui, (PgWin *)&v3->vfptr);
    UIUtil::SetOffset(&ui, iLeft, iTop);
    UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
    v6 = 1;
    v21 = v3->m_kReasonString;
    pkParenta = v3->m_kReasonString;
    do
    {
      v7 = *(_DWORD *)(ITableBase<KQVoteDesc,KQVoteDescTable>::ms_pkTable + 56);
      if ( v7 )
        v8 = *(_DWORD *)(v7 + 40);
      else
        v8 = 0;
      v9 = 0;
      if ( v8 )
      {
        while ( (unsigned __int8)*CDataReader::GetRecord(
                                    (CDataReader *)(ITableBase<KQVoteDesc,KQVoteDescTable>::ms_pkTable + 4),
                                    v9) != v6 )
        {
          if ( ++v9 >= v8 )
            goto LABEL_14;
        }
        v10 = CDataReader::GetRecord((CDataReader *)(ITableBase<KQVoteDesc,KQVoteDescTable>::ms_pkTable + 4), v9);
      }
      else
      {
LABEL_14:
        v10 = 0;
      }
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(pkParenta, v10 + 1, strlen(v10 + 1));
      ++v6;
      ++pkParenta;
    }
    while ( v6 < 5 );
    v11 = 0;
    pkParentb = (PgWin *)v21;
    do
    {
      v12 = v11 + 1;
      v13 = fs("Text_ReasonList%02d", v11 + 1);
      v14 = UIUtil::CreateButton(&ui, 0, v13, 0, 3);
      v14->vfptr[130].__vecDelDtor((NiRefObject *)v14, v11);
      v15 = Font::Get(0);
      v16 = ((int (__thiscall *)(PgWinBut *))v14->vfptr[37].__vecDelDtor)(v14);
      v17 = ((int (__thiscall *)(PgWinBut *))v14->vfptr[36].__vecDelDtor)(v14);
      v18 = PgWinText::CreateWin(0, 0, v17, v16, v15, (PgWin *)&v14->vfptr, 0, 0);
      v18->vfptr[122].__vecDelDtor((NiRefObject *)v18, 5u);
      v19 = pkParentb;
      if ( pkParentb->m_uiExtraDataSize >= 0x10 )
        v19 = pkParentb->vfptr;
      v18->vfptr[118].__vecDelDtor((NiRefObject *)v18, (unsigned int)v19);
      v18->vfptr[60].__vecDelDtor((NiRefObject *)v18, 0);
      pkParentb = (PgWin *)((char *)pkParentb + 28);
      ++v11;
    }
    while ( v12 < 4 );
    LOBYTE(v24) = 0;
    UIUtil::~UIUtil(&ui);
    v24 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && spNode.m_pObject )
      spNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spNode.m_pObject, 1u);
    result = 1;
  }
  else
  {
    v24 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( spNode.m_pObject )
        spNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spNode.m_pObject, 1u);
    }
    result = 0;
  }
  return result;
}
// A8C23C: using guessed type int ITableBase<KQVoteDesc,KQVoteDescTable>::ms_pkTable;

//----- (005AA1D0) --------------------------------------------------------
void __thiscall VoteWin::OnCommand(VoteWin *this, unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@7

  switch ( wParam )
  {
    case 0u:
      VoteWin::OnOK(this);
      break;
    case 1u:
      VoteWin::OnCancel(this);
      break;
    case 2u:
      VoteWin::OnReason(this);
      break;
    case 3u:
      if ( this->m_bChangeReasonType == 1 )
        VoteWin::OnSelected(this);
      break;
    case 4u:
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v3 )
        GameFrameWork::OpenPlayGuideSearchList(v3, "KQVote");
      break;
    default:
      return;
  }
}

//----- (005AA250) --------------------------------------------------------
KQVoteDesc *__cdecl KQVoteDescTable::GetByID(const int iID)
{
  int v1; // eax@1
  unsigned int v2; // edi@2
  unsigned int v3; // esi@4
  KQVoteDesc *result; // eax@7

  v1 = *(_DWORD *)(ITableBase<KQVoteDesc,KQVoteDescTable>::ms_pkTable + 56);
  if ( v1 )
    v2 = *(_DWORD *)(v1 + 40);
  else
    v2 = 0;
  v3 = 0;
  if ( v2 )
  {
    while ( (unsigned __int8)*CDataReader::GetRecord(
                                (CDataReader *)(ITableBase<KQVoteDesc,KQVoteDescTable>::ms_pkTable + 4),
                                v3) != iID )
    {
      if ( ++v3 >= v2 )
        goto LABEL_7;
    }
    result = (KQVoteDesc *)CDataReader::GetRecord(
                             (CDataReader *)(ITableBase<KQVoteDesc,KQVoteDescTable>::ms_pkTable + 4),
                             v3);
  }
  else
  {
LABEL_7:
    result = 0;
  }
  return result;
}
// A8C23C: using guessed type int ITableBase<KQVoteDesc,KQVoteDescTable>::ms_pkTable;

//----- (005AA2B0) --------------------------------------------------------
VoteWin *__thiscall VoteWin::`scalar deleting destructor'(VoteWin *this, unsigned int a2)
{
  VoteWin *v2; // esi@1
  EditWin *v3; // edi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&VoteWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&VoteWin::`vftable'{for `IDirectMessenger'};
  v3 = this->m_spReasonEditWin.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A7300: using guessed type void (__thiscall *VoteWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A731C: using guessed type int (__thiscall *VoteWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005AA350) --------------------------------------------------------
VoteReasonWin *__thiscall VoteReasonWin::`vector deleting destructor'(VoteReasonWin *this, unsigned int a2)
{
  VoteReasonWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&VoteReasonWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&VoteReasonWin::`vftable'{for `IDirectMessenger'};
  `eh vector destructor iterator'(
    this->m_kReasonString,
    0x1Cu,
    5,
    (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
  PgWinSpr::~PgWinSpr((PgWinSpr *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A7544: using guessed type void (__thiscall *VoteReasonWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A7564: using guessed type int (__thiscall *VoteReasonWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005AA3E0) --------------------------------------------------------
void __thiscall LogoutAfterMinutesWin::SetStartTime(LogoutAfterMinutesWin *this, float fStart)
{
  this->m_fStartTime = fStart;
}

//----- (005AA3F0) --------------------------------------------------------
void __thiscall WaitingForLogoutWin::ProcessMeInput(WaitingForLogoutWin *this, bool *bHit)
{
  PgWin::ProcessMeInput((PgWin *)&this->vfptr, bHit);
}

//----- (005AA400) --------------------------------------------------------
void __thiscall WaitingForLogoutWin::WaitingForLogoutWin(WaitingForLogoutWin *this)
{
  WaitingForLogoutWin *v1; // esi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->m_eLogoutType = 0;
  v1->m_bIsShow = 0;
  v1->m_pkKeyMap = 0;
  v1->vfptr = (NiRefObjectVtbl *)&WaitingForLogoutWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&WaitingForLogoutWin::`vftable'{for `IDirectMessenger'};
}
// 9A77D8: using guessed type void (__thiscall *WaitingForLogoutWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A77F4: using guessed type int (__thiscall *WaitingForLogoutWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005AA430) --------------------------------------------------------
void __thiscall WaitingForLogoutWin::~WaitingForLogoutWin(WaitingForLogoutWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&WaitingForLogoutWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&WaitingForLogoutWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
}
// 9A77D8: using guessed type void (__thiscall *WaitingForLogoutWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A77F4: using guessed type int (__thiscall *WaitingForLogoutWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005AA450) --------------------------------------------------------
void __thiscall WaitingForLogoutWin::OnClose(WaitingForLogoutWin *this)
{
  this->m_bIsShow = 0;
}

//----- (005AA460) --------------------------------------------------------
void __thiscall WaitingForLogoutWin::SetLogoutType(WaitingForLogoutWin *this, WaitingForLogoutWin::LogoutType eType)
{
  this->m_eLogoutType = eType;
}

//----- (005AA470) --------------------------------------------------------
void __thiscall WaitingForLogoutWin::SetKeyMap(WaitingForLogoutWin *this, KeyMap *pkMap)
{
  this->m_pkKeyMap = pkMap;
}

//----- (005AA490) --------------------------------------------------------
void __thiscall WaitingForLogoutWin::OnShowWin(WaitingForLogoutWin *this)
{
  WaitingForLogoutWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))this->m_pkLogoutAfterWin->vfptr[59].__vecDelDtor)(
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.2);
  v1->m_pkLogoutAfterWin->m_fStartTime = Timer::ms_fCurTime;
  v1->m_bIsShow = 1;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (005AA4F0) --------------------------------------------------------
void __thiscall WaitingForLogoutWin::OnCloseBut(WaitingForLogoutWin *this)
{
  WaitingForLogoutWin *v1; // esi@1
  PgFrameWork *v2; // eax@1

  v1 = this;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 4u, 0x72u, 0, 0);
  PgWin::PostMsg((PgWin *)&v1->vfptr, 1u, 0, 0);
  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
    StatusWin::SetStoneAlarmEnable((StatusWin *)v2[15].m_kMsgQ.m_pBase, 1);
}

//----- (005AA540) --------------------------------------------------------
void __thiscall WaitingForLogoutWin::OnTimeOver(WaitingForLogoutWin *this)
{
  WaitingForLogoutWin *v1; // edi@1
  WaitingForLogoutWin::LogoutType v2; // eax@1
  PgFrameWork *v3; // eax@2
  char *v4; // esi@8
  PgFrameWork *v5; // edx@11
  MiniMapWin *v6; // esi@11

  v1 = this;
  QuestPigeonEffect::ms_bGameStart = 0;
  GameFrameWork::ms_bGameFrameStart = 0;
  v2 = this->m_eLogoutType;
  if ( v2 )
  {
    if ( v2 == 2 )
    {
      Skill::ClearLearnSkill();
      Skill::ClearLearnPassiveSkill();
      AbStateInfectee::ClearAbState((AbStateInfectee *)&g_pkMainChar->vfptr, 0);
      NetMgr::SendUserLogOutMsg2AllServer(&g_kNetMgr);
      PgFrameMgr::PostQuitMsg(&Pgg_kFrameMgr, 0);
    }
    else if ( v2 == 1 )
    {
      v4 = (char *)&this->vfptr;
      if ( this->m_pkMsgHooker )
      {
        ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))this->m_pkMsgHooker->vfptr->SendDirectMessage)(54, 0, &this->vfptr);
        if ( v1->m_pkMsgHooker )
          ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            54,
            0,
            &v1->vfptr);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v4 + 20))(&v1->vfptr, 54, 0, &v1->vfptr);
      g_pkMainChar[1].m_bActionHit = 0;
      DecalMgr::RemoveAllDecal(&stru_B26354);
      v5 = v1->m_pkFrameWork;
      v6 = *(MiniMapWin **)&v5[15].m_bInit;
      if ( v6 )
      {
        MiniMapWin::RemoveAllMapMark(*(MiniMapWin **)&v5[15].m_bInit);
        MiniMapWin::RemoveAllKQTeamMark(v6);
      }
    }
  }
  else
  {
    Skill::ClearLearnSkill();
    Skill::ClearLearnPassiveSkill();
    g_pkMainChar[1].m_bActionHit = 0;
    AbStateInfectee::ClearAbState((AbStateInfectee *)&g_pkMainChar->vfptr, 0);
    v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, AccountFrameWorkID);
    if ( v3 )
    {
      v3[2].m_BackFrameID = 0;
      *(_DWORD *)&v3[2].m_bInit = 0;
      v3[3].vfptr = 0;
      v3[3].m_pkMsgHooker = 0;
      v3[3].m_uiMessageNum = 0;
      v3[3].m_kMsgQ.m_pBase = 0;
      v3[3].m_kMsgQ.m_uiAlloced = 0;
      v3[3].m_kMsgQ.m_uiHead = 0;
    }
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 3u, 0x33u, 0, 0);
  }
}
// A8CAFF: using guessed type bool GameFrameWork::ms_bGameFrameStart;
// A8EA80: using guessed type bool QuestPigeonEffect::ms_bGameStart;

//----- (005AA680) --------------------------------------------------------
void __thiscall WaitingForLogoutWin::Cancel(WaitingForLogoutWin *this)
{
  WaitingForLogoutWin *v1; // esi@1
  PgFrameWork *v2; // eax@2

  v1 = this;
  QuestPigeonEffect::ms_bGameStart = 1;
  if ( this->m_bIsShow )
  {
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 4u, 0x72u, 0, 0);
    PgWin::PostMsg((PgWin *)&v1->vfptr, 1u, 0, 0);
    v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v2 )
      StatusWin::SetStoneAlarmEnable((StatusWin *)v2[15].m_kMsgQ.m_pBase, 1);
  }
}
// A8EA80: using guessed type bool QuestPigeonEffect::ms_bGameStart;

//----- (005AA6E0) --------------------------------------------------------
void __thiscall LogoutAfterMinutesWin::LogoutAfterMinutesWin(LogoutAfterMinutesWin *this)
{
  LogoutAfterMinutesWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&LogoutAfterMinutesWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&LogoutAfterMinutesWin::`vftable'{for `IDirectMessenger'};
  v1->m_spTextWin.m_pObject = 0;
}
// 9A79C0: using guessed type void (__thiscall *LogoutAfterMinutesWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A79DC: using guessed type int (__thiscall *LogoutAfterMinutesWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005AA710) --------------------------------------------------------
void __thiscall LogoutAfterMinutesWin::~LogoutAfterMinutesWin(LogoutAfterMinutesWin *this)
{
  LogoutAfterMinutesWin *v1; // esi@1
  PgWinText *v2; // edi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&LogoutAfterMinutesWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&LogoutAfterMinutesWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spTextWin.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9A79C0: using guessed type void (__thiscall *LogoutAfterMinutesWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A79DC: using guessed type int (__thiscall *LogoutAfterMinutesWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005AA7A0) --------------------------------------------------------
char __thiscall LogoutAfterMinutesWin::Create(LogoutAfterMinutesWin *this, PgFrameWork *pkFrameWork)
{
  LogoutAfterMinutesWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  NiSourceTexture *v8; // eax@10
  PgSprData *v9; // eax@11
  PgWinSpr *v10; // eax@13
  PgSprData *v11; // edi@15
  PgWinBut *v12; // ST14_4@15
  PgWinBut *v13; // edi@15
  PgFont *v14; // ST10_4@15
  unsigned int v15; // ST0C_4@15
  unsigned int v16; // eax@15
  PgWinText *v17; // edi@15
  NiRefObjectVtbl *v18; // ebx@15
  NiUnsharedGeometryGroup *v19; // eax@15
  unsigned int v20; // edi@15
  PgFont *v21; // ST10_4@15
  unsigned int v22; // eax@15
  PgWinText *v23; // eax@15
  PgWinText *v24; // edi@15
  PgWinText *v25; // ebx@15
  NiNode *v26; // eax@22
  NiNode *v27; // esi@23
  int uiLeft; // [sp+10h] [bp-18h]@4
  int uiTop; // [sp+14h] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+18h] [bp-10h]@1
  int v31; // [sp+24h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v31 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\MessageWin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "LogoutAfterMinutesWin", 0) )
  {
    v6 = spNode.m_pObject;
    v31 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = MenuTexMgr::GetTexture(0x13u);
  if ( v8 )
    v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v8);
  else
    v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  v10 = PgWinSpr::CreateWin(uiLeft, uiTop, v9, (PgWin *)&v2->vfptr, 0, 0);
  if ( v10 )
    v10->vfptr[60].__vecDelDtor((NiRefObject *)v10, 0);
  v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor01", &uiLeft, &uiTop, 0);
  PgSprData::Add(v11, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick01");
  PgSprData::Add(v11, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver01");
  v12 = PgWinBut::CreateWin(uiLeft, uiTop, v11, (PgWin *)&v2->vfptr, 0, 0, 0);
  v2->m_pkCancelBut = v12;
  v13 = v12;
  v14 = Font::Get(0);
  v15 = ((int (__thiscall *)(PgWinBut *))v13->vfptr[37].__vecDelDtor)(v13);
  v16 = ((int (__thiscall *)(PgWinBut *))v13->vfptr[36].__vecDelDtor)(v13);
  v17 = PgWinText::CreateWin(0, 2, v16, v15, v14, (PgWin *)&v12->vfptr, 0, 0);
  v17->vfptr[122].__vecDelDtor((NiRefObject *)v17, 5u);
  v18 = v17->vfptr;
  v19 = TextData::Get(0x88A297E1);
  v18[118].__vecDelDtor((NiRefObject *)v17, (unsigned int)v19);
  v17->vfptr[60].__vecDelDtor((NiRefObject *)v17, 0);
  v20 = Font::Get(0)->m_uiDefHeight;
  v21 = Font::Get(0);
  v22 = ((int (__thiscall *)(LogoutAfterMinutesWin *))v2->vfptr[36].__vecDelDtor)(v2);
  v23 = PgWinText::CreateWin(0, 20, v22, v20, v21, (PgWin *)&v2->vfptr, 0, 0);
  v24 = v2->m_spTextWin.m_pObject;
  v25 = v23;
  if ( v24 != v23 )
  {
    if ( v24 && !InterlockedDecrement((volatile LONG *)&v24->m_uiRefCount) && v24 )
      v24->vfptr->__vecDelDtor((NiRefObject *)v24, 1u);
    v2->m_spTextWin.m_pObject = v25;
    if ( v25 )
      InterlockedIncrement((volatile LONG *)&v25->m_uiRefCount);
  }
  ((void (__stdcall *)(signed int))v2->m_spTextWin.m_pObject->vfptr[122].__vecDelDtor)(5);
  ((void (__stdcall *)(_DWORD))v2->m_spTextWin.m_pObject->vfptr[60].__vecDelDtor)(0);
  v26 = spNode.m_pObject;
  v2->m_bTimeIsOver = 0;
  v31 = -1;
  if ( v26 )
  {
    v27 = v26;
    if ( !InterlockedDecrement((volatile LONG *)&v26->m_uiRefCount) )
    {
      if ( v27 )
        v27->vfptr->__vecDelDtor((NiRefObject *)v27, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005AAA80) --------------------------------------------------------
void __thiscall LogoutAfterMinutesWin::OnCancelBut(LogoutAfterMinutesWin *this)
{
  PgWin *v1; // esi@1
  PgFrameWork *v2; // eax@1

  v1 = (PgWin *)this->m_pkParent;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 4u, 0x72u, 0, 0);
  PgWin::PostMsg(v1, 1u, 0, 0);
  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
    StatusWin::SetStoneAlarmEnable((StatusWin *)v2[15].m_kMsgQ.m_pBase, 1);
}

//----- (005AAAD0) --------------------------------------------------------
void __thiscall LogoutAfterMinutesWin::UpdateMeWin(LogoutAfterMinutesWin *this, float fCurTime)
{
  LogoutAfterMinutesWin *v2; // edi@1
  int v3; // esi@1
  NiRefObjectVtbl **v4; // ebx@4
  NiRefObjectVtbl *v5; // edi@4
  char *v6; // eax@4
  char *v7; // eax@4

  v2 = this;
  v3 = (signed int)(this->m_fStartTime - fCurTime) + 10;
  if ( v3 <= 0 )
  {
    v3 = 0;
    if ( !this->m_bTimeIsOver )
    {
      WaitingForLogoutWin::OnTimeOver((WaitingForLogoutWin *)this->m_pkParent);
      v2->m_bTimeIsOver = 1;
    }
  }
  v4 = &v2->m_spTextWin.m_pObject->vfptr;
  v5 = *v4;
  v6 = (char *)TextData::Get(0x3F543D74u);
  v7 = fs(v6, v3);
  v5[118].__vecDelDtor((NiRefObject *)v4, (unsigned int)v7);
}

//----- (005AAB40) --------------------------------------------------------
void __thiscall LogoutAfterMinutesWin::OnCommand(LogoutAfterMinutesWin *this, unsigned int wParam, int lParam)
{
  PgWin *v3; // esi@2
  PgFrameWork *v4; // eax@2

  if ( !wParam )
  {
    v3 = (PgWin *)this->m_pkParent;
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 4u, 0x72u, 0, 0);
    PgWin::PostMsg(v3, 1u, 0, 0);
    v4 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v4 )
      StatusWin::SetStoneAlarmEnable((StatusWin *)v4[15].m_kMsgQ.m_pBase, 1);
  }
}

//----- (005AABA0) --------------------------------------------------------
LogoutAfterMinutesWin *__cdecl LogoutAfterMinutesWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  LogoutAfterMinutesWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x170u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&LogoutAfterMinutesWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&LogoutAfterMinutesWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][1]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (LogoutAfterMinutesWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9A79C0: using guessed type void (__thiscall *LogoutAfterMinutesWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A79DC: using guessed type int (__thiscall *LogoutAfterMinutesWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005AACE0) --------------------------------------------------------
WaitingForLogoutWin *__cdecl WaitingForLogoutWin::CreateWin(unsigned int dwScrWidth, unsigned int dwScrHeight, PgFrameWork *pkFrameWork)
{
  PgWin *v3; // eax@1
  PgWin *v4; // esi@1
  PgWin *v5; // edi@8
  WaitingForLogoutWin *v6; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x134u);
  v4 = v3;
  result.m_pObject = v3;
  v8 = 0;
  if ( v3 )
  {
    PgWin::PgWin(v3);
    v4->vfptr = (NiRefObjectVtbl *)&WaitingForLogoutWin::`vftable'{for `NiNode'};
    v4->vfptr = (IDirectMessengerVtbl *)&WaitingForLogoutWin::`vftable'{for `IDirectMessenger'};
    v4[1].m_pcName = 0;
    LOBYTE(v4[1].m_spControllers.m_pObject) = 0;
    v4[1].m_ppkExtra = 0;
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v8 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v4);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, unsigned int, unsigned int, PgFrameWork *))v4->vfptr[113].__vecDelDtor)(
                          v4,
                          dwScrWidth,
                          dwScrHeight,
                          pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v4->vfptr[89].__vecDelDtor)(v4);
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = (WaitingForLogoutWin *)v4;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v4);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = 0;
  }
  return v6;
}
// 9A77D8: using guessed type void (__thiscall *WaitingForLogoutWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A77F4: using guessed type int (__thiscall *WaitingForLogoutWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005AAE40) --------------------------------------------------------
char __thiscall WaitingForLogoutWin::Create(WaitingForLogoutWin *this, unsigned int dwScrWidth, unsigned int dwScrHeight, PgFrameWork *pkFrameWork)
{
  WaitingForLogoutWin *v4; // edi@1
  NiScreenElements *v5; // esi@1
  char result; // al@1
  NiScreenElements *v7; // ebx@2
  NiScreenElementsData *v8; // eax@3
  NiScreenElementsData *v9; // eax@4
  NiScreenElements *v10; // eax@4
  float fHeight; // ST20_4@9
  float fWidth; // ST1C_4@9
  NiObjectNET *v13; // eax@9
  NiObjectNET *v14; // ebx@9
  NiObjectNET *v15; // eax@12
  NiObjectNET *v16; // ebx@12
  void *(__thiscall *v17)(NiRefObject *, unsigned int); // eax@15
  NiObjectNET *v18; // eax@15
  NiObjectNET *v19; // ebx@15
  NiObjectNET *v20; // eax@16
  LogoutAfterMinutesWin *v21; // eax@18
  void (__thiscall *v22)(IDirectMessenger *, IDirectMessenger *); // eax@18
  NiColorA kCommonValue; // [sp+20h] [bp-28h]@9
  NiScreenElementsData *v24; // [sp+30h] [bp-18h]@3
  NiScreenElements *v25; // [sp+34h] [bp-14h]@2
  NiPointer<NiScreenElements> m_spDecoPlane; // [sp+38h] [bp-10h]@2
  int v27; // [sp+44h] [bp-4h]@2

  v4 = this;
  v5 = 0;
  result = PgWin::Create((PgWin *)&this->vfptr, 0, 0, dwScrWidth, dwScrHeight, 0, 0, 0);
  if ( result )
  {
    m_spDecoPlane.m_pObject = 0;
    v27 = 0;
    v7 = (NiScreenElements *)operator new(0xC4u);
    v25 = v7;
    LOBYTE(v27) = 1;
    if ( v7 )
    {
      v8 = (NiScreenElementsData *)operator new(0x70u);
      v24 = v8;
      LOBYTE(v27) = 2;
      if ( v8 )
      {
        NiScreenElementsData::NiScreenElementsData(v8, 0, 1, 0, 1, 1, 4, 1, 2, 1);
        LOBYTE(v27) = 1;
        NiScreenElements::NiScreenElements(v7, v9);
      }
      else
      {
        LOBYTE(v27) = 1;
        NiScreenElements::NiScreenElements(v7, 0);
      }
    }
    else
    {
      v10 = 0;
    }
    LOBYTE(v27) = 0;
    if ( v10 )
    {
      v5 = v10;
      m_spDecoPlane.m_pObject = v10;
      InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
    }
    NiScreenElementsData::Insert((NiScreenElementsData *)v5->m_spModelData.m_pObject, 4u, 0, 0);
    fHeight = (double)dwScrHeight;
    fWidth = (double)dwScrWidth;
    NiScreenElementsData::SetRectangle(
      (NiScreenElementsData *)v5->m_spModelData.m_pObject,
      0,
      0.0,
      0.0,
      fWidth,
      fHeight);
    kCommonValue.r = 0.0;
    kCommonValue.g = 0.0;
    kCommonValue.b = 0.0;
    kCommonValue.a = 0.5;
    NiScreenElementsData::SetColors((NiScreenElementsData *)v5->m_spModelData.m_pObject, 0, &kCommonValue);
    v13 = (NiObjectNET *)operator new(0x28u);
    v14 = v13;
    LOBYTE(v27) = 3;
    if ( v13 )
    {
      NiObjectNET::NiObjectNET(v13);
      v14->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
      LOWORD(v14[1].vfptr) = 0;
      v14[1].m_uiRefCount = 0;
      v14[1].m_pcName = (char *)1;
    }
    else
    {
      v14 = 0;
    }
    LOBYTE(v27) = 0;
    v14[1].m_uiRefCount = 1;
    v14[1].m_pcName = 0;
    NiAVObject::AttachProperty((NiAVObject *)&v5->vfptr, (NiProperty *)v14);
    NiScreenElementsData::UpdateBound((NiScreenElementsData *)v5->m_spModelData.m_pObject);
    NiAVObject::UpdateProperties((NiAVObject *)&v5->vfptr);
    NiAVObject::Update((NiAVObject *)&v5->vfptr, 0.0, 1);
    v15 = (NiObjectNET *)operator new(0x28u);
    v16 = v15;
    LOBYTE(v27) = 4;
    if ( v15 )
    {
      NiObjectNET::NiObjectNET(v15);
      v16->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
      LOWORD(v16[1].vfptr) = 0;
      v16[1].m_uiRefCount = 0;
      v16[1].m_pcName = (char *)1;
    }
    else
    {
      v16 = 0;
    }
    v16[1].m_uiRefCount = 1;
    v16[1].m_pcName = 0;
    v17 = v4->vfptr[29].__vecDelDtor;
    LOBYTE(v27) = 0;
    ((void (__thiscall *)(WaitingForLogoutWin *, NiScreenElements *, _DWORD))v17)(v4, v5, 0);
    v18 = (NiObjectNET *)operator new(0x20u);
    v19 = v18;
    LOBYTE(v27) = 5;
    if ( v18 )
    {
      NiObjectNET::NiObjectNET(v18);
      v19->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
      LOWORD(v19[1].vfptr) = 236;
      BYTE2(v19[1].vfptr) = 0;
      v20 = v19;
    }
    else
    {
      v20 = 0;
    }
    LOWORD(v20[1].vfptr) |= 1u;
    LOBYTE(v27) = 0;
    NiAVObject::AttachProperty((NiAVObject *)&v5->vfptr, (NiProperty *)v20);
    NiAVObject::UpdateProperties((NiAVObject *)&v4->vfptr);
    v21 = LogoutAfterMinutesWin::CreateWin(pkFrameWork);
    v4->m_pkLogoutAfterWin = v21;
    v21->vfptr[130].__vecDelDtor((NiRefObject *)v21, 0);
    PgWin::AttachChildWin((PgWin *)&v4->vfptr, (PgWin *)&v4->m_pkLogoutAfterWin->vfptr);
    ((void (__stdcall *)(signed int))v4->m_pkLogoutAfterWin->vfptr[64].__vecDelDtor)(1);
    v22 = v4->vfptr->SetMsgHooker;
    v4->m_pkFrameWork = pkFrameWork;
    v22((IDirectMessenger *)&v4->vfptr, (IDirectMessenger *)&pkFrameWork->vfptr);
    v4->vfptr[60].__vecDelDtor((NiRefObject *)v4, 1u);
    v27 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    result = 1;
  }
  return result;
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);

//----- (005AB150) --------------------------------------------------------
WaitingForLogoutWin *__thiscall WaitingForLogoutWin::`scalar deleting destructor'(WaitingForLogoutWin *this, unsigned int a2)
{
  WaitingForLogoutWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&WaitingForLogoutWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&WaitingForLogoutWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A77D8: using guessed type void (__thiscall *WaitingForLogoutWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A77F4: using guessed type int (__thiscall *WaitingForLogoutWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005AB190) --------------------------------------------------------
LogoutAfterMinutesWin *__thiscall LogoutAfterMinutesWin::`scalar deleting destructor'(LogoutAfterMinutesWin *this, unsigned int a2)
{
  LogoutAfterMinutesWin *v2; // esi@1
  PgWinText *v3; // edi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&LogoutAfterMinutesWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&LogoutAfterMinutesWin::`vftable'{for `IDirectMessenger'};
  v3 = this->m_spTextWin.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A79C0: using guessed type void (__thiscall *LogoutAfterMinutesWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A79DC: using guessed type int (__thiscall *LogoutAfterMinutesWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005AB230) --------------------------------------------------------
void __thiscall WeaponTitleWin::WeaponTitleWin(WeaponTitleWin *this)
{
  WeaponTitleWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&WeaponTitleWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&WeaponTitleWin::`vftable'{for `IDirectMessenger'};
}
// 9A7F28: using guessed type void (__thiscall *WeaponTitleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A7F44: using guessed type int (__thiscall *WeaponTitleWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005AB250) --------------------------------------------------------
void __thiscall WeaponTitleWin::~WeaponTitleWin(WeaponTitleWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&WeaponTitleWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&WeaponTitleWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9A7F28: using guessed type void (__thiscall *WeaponTitleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A7F44: using guessed type int (__thiscall *WeaponTitleWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005AB270) --------------------------------------------------------
void __thiscall WeaponTitleWin::OnQuit(WeaponTitleWin *this)
{
  PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
}

//----- (005AB280) --------------------------------------------------------
void __thiscall WeaponTitleWin::ResetContents(WeaponTitleWin *this)
{
  WeaponTitleWin *v1; // esi@1
  int v2; // esi@1
  signed int v3; // edi@1

  v1 = this;
  IconSlotWin::Clear(this->m_pkWeaponIconWin);
  v2 = (int)&v1->m_akWeaponTitleFrame[0].pkBtn;
  v3 = 3;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v2 - 4) + 472))(&unk_9A7C36);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 240))(1);
    IconSlotWin::Clear(*(IconSlotWin **)(v2 - 8));
    v2 += 12;
    --v3;
  }
  while ( v3 );
}

//----- (005AB2E0) --------------------------------------------------------
void __thiscall WeaponTitleWin::SignTitleFailed(WeaponTitleWin *this, ITEM_INVEN *rkLicenseInven)
{
  signed int v2; // edi@1
  IconSlotWin **v3; // esi@1
  IconSlotWin *v4; // ecx@2
  __int16 v5; // ax@2
  signed int v6; // eax@3

  v2 = 0;
  v3 = (IconSlotWin **)this->m_akWeaponTitleFrame;
  do
  {
    v4 = *v3;
    v5 = rkLicenseInven->Inven >> 10;
    if ( v5 == 9 )
    {
      v6 = 0;
    }
    else
    {
      if ( v5 != 8 )
        return;
      v6 = 1;
    }
    if ( v4->m_kContentsDetail.kItem.uiSenderType == v6
      && v4->m_kContentsDetail.kItem.uiSenderIndex == (rkLicenseInven->Inven & 0x3FF) )
    {
      IconSlotWin::Clear(v4);
    }
    ++v2;
    v3 += 3;
  }
  while ( v2 < 3 );
}

//----- (005AB340) --------------------------------------------------------
void __thiscall WeaponTitleDeleteWin::SetClearItemInven(WeaponTitleDeleteWin *this, ITEM_INVEN *rkInven)
{
  this->m_kClearInven = (ITEM_INVEN)rkInven->Inven;
}

//----- (005AB360) --------------------------------------------------------
void __thiscall WeaponTitleWin::OnCommand(WeaponTitleWin *this, unsigned int wParam, int lParam)
{
  if ( wParam )
  {
    if ( wParam <= 3 )
    {
      ((void (__stdcall *)(_DWORD))this->vfptr[136].__vecDelDtor)(wParam - 1);
    }
    else if ( wParam == 5 )
    {
      PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
    }
  }
}

//----- (005AB3B0) --------------------------------------------------------
void __thiscall WeaponTitleWin::OnClose(WeaponTitleWin *this)
{
  WeaponTitleWin *v1; // esi@1
  int v2; // esi@1
  bool v3; // zf@1
  DirectUserMsgBody_SendPacket kPacket; // [sp+4h] [bp-Ch]@1

  v1 = this;
  WeaponTitleWin::ResetContents(this);
  v2 = (int)&v1->vfptr;
  v3 = *(_DWORD *)(v2 + 4) == 0;
  *(_DWORD *)&kPacket.wDepartment = 720904;
  kPacket.pvPacket = 0;
  if ( !v3 )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v2 + 4) + 4))(23, &kPacket, v2);
    if ( *(_DWORD *)(v2 + 4) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v2 + 4) + 20))(23, &kPacket, v2);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v2 + 20))(v2, 23, &kPacket, v2);
}

//----- (005AB420) --------------------------------------------------------
void __thiscall WeaponTitleWin::SignTitleSuccess(WeaponTitleWin *this, ITEM_INVEN *rkLicenseInven, Item *pkWeapon)
{
  if ( this->m_pkWeaponIconWin->m_eType == CT_ITEM )
  {
    ((void (__stdcall *)(_DWORD, _DWORD))this->vfptr[137].__vecDelDtor)(
      &pkWeapon->m_kStruct.itemattr,
      pkWeapon->m_kStruct.itemid);
    SoundMgr::PlayInterfaceSound(&g_kSoundMgr, WEAPONTITLE);
  }
}

//----- (005AB460) --------------------------------------------------------
char __thiscall WeaponTitleWin::Create(WeaponTitleWin *this, PgFrameWork *pkFrameWork)
{
  WeaponTitleWin *v2; // ebx@1
  NiTexturePalette *v3; // esi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  NiSourceTexture *v8; // eax@10
  PgSprData *v9; // eax@13
  char *v10; // eax@13
  char *v11; // eax@13
  PgWinBut *v12; // esi@13
  char *v13; // eax@13
  char *v14; // eax@13
  PgSprData *v15; // eax@13
  PgWinSpr *v16; // eax@13
  char *v17; // eax@13
  float v18; // esi@13
  int v19; // edi@13
  char *v20; // eax@14
  PgWinAbbreviateText *v21; // eax@14
  char *v22; // eax@14
  PgWinBut *v23; // eax@14
  char *v24; // eax@14
  PgWinSpr *v25; // eax@14
  IconSlotWin *v26; // eax@14
  char *v27; // eax@14
  PgWinBut *v28; // eax@15
  char *v29; // eax@15
  PgWinAbbreviateText *v30; // eax@15
  NiRefObjectVtbl *v31; // eax@15
  NiNode *v32; // esi@16
  D3DXCOLOR v33; // [sp-Ch] [bp-64h]@13
  const char *v34; // [sp+4h] [bp-54h]@11
  const char *v35; // [sp+8h] [bp-50h]@11
  int *v36; // [sp+Ch] [bp-4Ch]@11
  NiSourceTexture *v37; // [sp+10h] [bp-48h]@11
  UIUtil ui; // [sp+24h] [bp-34h]@10
  int iXOff; // [sp+38h] [bp-20h]@4
  int iYOff; // [sp+3Ch] [bp-1Ch]@4
  int iLeft; // [sp+40h] [bp-18h]@11
  int iTop; // [sp+44h] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+48h] [bp-10h]@1
  int v44; // [sp+54h] [bp-4h]@1
  PgFrameWork *pkFrameWorka; // [sp+60h] [bp+8h]@13

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v44 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\WTitleWin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iXOff, &iYOff, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "WeaponTitleWin", 0) )
  {
    v6 = spNode.m_pObject;
    v44 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v44) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, iXOff, iYOff);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  *(float *)&v8 = COERCE_FLOAT(MenuTexMgr::GetTexture(0x13u));
  if ( *(float *)&v8 == 0.0 )
  {
    *(float *)&v37 = 0.0;
    *(float *)&v36 = COERCE_FLOAT(&iTop);
    v35 = (const char *)&iLeft;
    v34 = "Theme";
  }
  else
  {
    v37 = v8;
    *(float *)&v36 = COERCE_FLOAT(&iTop);
    v35 = (const char *)&iLeft;
    v34 = "Theme";
  }
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, v34, (int *)v35, v36, v37);
  PgWinSpr::CreateWin(iLeft - iXOff, iTop - iYOff, v9, (PgWin *)&v2->vfptr, 0, 0);
  UIUtil::CreateSpr(&ui, "Panel02", 0);
  UIUtil::CreateSpr(&ui, "Panel03", 0);
  v33.g = Color::m_kDxWhiteColor.g;
  v33.b = Color::m_kDxWhiteColor.b;
  v33.a = Color::m_kDxWhiteColor.a;
  v10 = (char *)TextData2::Get(0x80A583D6);
  UIUtil::CreateTextEx(&ui, "NPCText", v10, 0, v33, 5u, 0, -16, -10);
  *(D3DXCOLOR *)((char *)&v33 + 4) = Color::m_kDxWinTitleColor;
  v11 = (char *)TextData2::Get(0xDCEBE03A);
  UIUtil::CreateText(&ui, "ItemName", v11, 0, *(D3DXCOLOR *)((char *)&v33 + 4), 4u, 0, 0);
  UIUtil::CreateBtn(&ui, 5u, "ClsNor", "ClsOver", "ClsClick", 0, 0);
  v12 = UIUtil::CreateBtn(&ui, 5u, "QuitBtnNor", "QuitBtnOver", "QuitBtnClick", 0, 0);
  *(D3DXCOLOR *)((char *)&v33 + 12) = Color::m_kDxWhiteColor;
  v13 = (char *)TextData2::Get(0xA5A4A8EF);
  UIUtil::CreateAttachedText((PgWin *)&v12->vfptr, v13, *(D3DXCOLOR *)((char *)&v33 + 12), 5u);
  *(D3DXCOLOR *)((char *)&v33 + 4) = Color::m_kDxWinTitleColor;
  v14 = (char *)TextData2::Get(0x3E4E9197u);
  UIUtil::CreateTextNoSprEx(&ui, "WinTitle", v14, *(D3DXCOLOR *)((char *)&v33 + 4), 5u, 0, 2u);
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TgetSlot", &iLeft, &iTop, 0);
  v16 = PgWinSpr::CreateWin(iLeft - iXOff, iTop - iYOff, v15, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkWeaponIconWin = IconSlotWin::CreateWin(3, 3, (PgWin *)&v16->vfptr);
  v17 = (char *)TextData2::Get(0xEBFFD741);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkWeaponIconWin->vfptr, v17);
  v2->m_pkWeaponIconWin->m_pkToolTipWin = g_pkToolTipWin;
  ((void (__stdcall *)(signed int))v2->m_pkWeaponIconWin->vfptr[60].__vecDelDtor)(1);
  LODWORD(v18) = 1;
  v19 = (int)v2->m_akWeaponTitleFrame;
  pkFrameWorka = (PgFrameWork *)3;
  do
  {
    *(float *)&v37 = 0.0;
    *(float *)&v36 = 0.0;
    v35 = (const char *)5;
    *(D3DXCOLOR *)((char *)&v33 + 4) = Color::m_kDxWhiteColor;
    v20 = fs("TitleName%02d", v18);
    v21 = UIUtil::CreateText(
            &ui,
            v20,
            &byte_9A7C0F,
            0,
            *(D3DXCOLOR *)((char *)&v33 + 4),
            (unsigned int)v35,
            (NiSourceTexture *)v36,
            (bool)v37);
    *(float *)&v37 = 0.0;
    *(float *)&v36 = v18;
    v35 = "RegBtnLock%02d";
    *(_DWORD *)(v19 + 4) = v21;
    *(float *)&v36 = COERCE_FLOAT(fs((char *)v35, v36));
    v35 = (const char *)LODWORD(v18);
    v35 = fs("RegBtnClick%02d", v18);
    v34 = (const char *)LODWORD(v18);
    v34 = fs("RegBtnOver%02d", v18);
    v33.a = v18;
    v22 = fs("RegBtnNor%02d", v18);
    v23 = UIUtil::CreateBtn(&ui, LODWORD(v18), v22, (char *)v34, (char *)v35, (char *)v36, v37);
    *(float *)&v37 = 0.0;
    *(float *)&v36 = v18;
    v35 = "Slot%02d";
    *(_DWORD *)(v19 + 8) = v23;
    v24 = fs((char *)v35, v36);
    v25 = UIUtil::CreateSpr(&ui, v24, v37);
    v26 = IconSlotWin::CreateWin(3, 3, (PgWin *)&v25->vfptr);
    v34 = (const char *)776415289;
    *(_DWORD *)v19 = v26;
    v27 = (char *)TextData2::Get((unsigned int)v34);
    PgWin::SetToolTipWinText(*(PgWin **)v19, v27);
    *(_DWORD *)(*(_DWORD *)v19 + 272) = g_pkToolTipWin;
    (*(void (__stdcall **)(signed int))(**(_DWORD **)v19 + 240))(1);
    ++LODWORD(v18);
    v19 += 12;
    pkFrameWorka = (PgFrameWork *)((char *)pkFrameWorka - 1);
  }
  while ( pkFrameWorka );
  v28 = UIUtil::CreateBtn(&ui, 4u, "RegBtnNor04", "RegBtnOver04", "RegBtnClick04", "RegBtnLock04", 0);
  v28->vfptr[60].__vecDelDtor((NiRefObject *)v28, 0);
  *(float *)&v37 = 0.0;
  *(float *)&v36 = 0.0;
  v35 = (const char *)5;
  *(D3DXCOLOR *)((char *)&v33 + 4) = Color::m_kDxWhiteColor;
  v29 = (char *)TextData2::Get(0x98FEEDF6);
  UIUtil::CreateText(
    &ui,
    "MakerNameText",
    v29,
    0,
    *(D3DXCOLOR *)((char *)&v33 + 4),
    (unsigned int)v35,
    (NiSourceTexture *)v36,
    (bool)v37);
  v30 = UIUtil::CreateText(&ui, "MakerName", &byte_9A7C27, 0, Color::m_kDxWhiteColor, 4u, 0, 0);
  *(float *)&v37 = 0.5;
  v2->m_pkMakerNameText = (PgWinText *)v30;
  v31 = v2->vfptr;
  *(float *)&v36 = 0.0;
  ((void (__thiscall *)(WeaponTitleWin *, unsigned int, unsigned int, _DWORD, NiSourceTexture *))v31[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.0,
    v37);
  LOBYTE(v44) = 0;
  UIUtil::~UIUtil(&ui);
  v44 = -1;
  if ( spNode.m_pObject )
  {
    v32 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v32 )
        v32->vfptr->__vecDelDtor((NiRefObject *)v32, 1u);
    }
  }
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005ABA00) --------------------------------------------------------
void __thiscall WeaponTitleWin::DirectMessage(WeaponTitleWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  WeaponTitleWin *v4; // ebx@1
  float v5; // eax@2
  IDirectMessenger *v6; // eax@3
  bool v7; // zf@5
  int v8; // eax@5
  int v9; // ecx@7
  void (__thiscall *v10)(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> > *, NiTListItem<NiPointer<NiProperty> > *); // edx@10
  int v11; // esi@10
  int v12; // ebx@15
  int v13; // eax@16
  IDirectMessenger *v14; // eax@17
  NiUnsharedGeometryGroup *v15; // eax@11
  NiUnsharedGeometryGroup *v16; // esi@26
  signed int v17; // [sp+Ch] [bp-70h]@15
  SHINE_ITEM_STRUCT kStruct; // [sp+10h] [bp-6Ch]@10

  v4 = this;
  if ( iMsgTag != 22 )
    return;
  v5 = this->m_kWorld.m_fScale;
  if ( v5 == 0.0 )
    v6 = 0;
  else
    v6 = (IDirectMessenger *)(LODWORD(v5) + 232);
  v7 = pkFrom == v6;
  v8 = *(_DWORD *)pvBody;
  if ( v7 )
  {
    if ( *(_DWORD *)(v8 + 16) )
      return;
    v9 = *(_DWORD *)(v8 + 8);
    if ( v9 )
    {
      if ( v9 != 1 )
        return;
    }
    if ( (unsigned __int8)(*(int (__thiscall **)(_DWORD))(**(_DWORD **)(v8 + 20) + 4))(*(_DWORD *)(v8 + 20)) == 5 )
    {
      v10 = v4[-1].m_kPropertyList.vfptr[45].DeleteItem;
      v11 = *(_DWORD *)(*(_DWORD *)pvBody + 20) + 8;
      qmemcpy(&kStruct, (const void *)v11, 0x64u);
      v11 += 100;
      *((_WORD *)&kStruct.itemattr.Bracelet + 49) = *(_WORD *)v11;
      *((_BYTE *)&kStruct.itemattr.Bracelet + 100) = *(_BYTE *)(v11 + 2);
      ((void (__thiscall *)(NiTPointerList<NiPointer<NiProperty> > *, SHINE_ITEM_ATTRIBUTE *, _DWORD))v10)(
        &v4[-1].m_kPropertyList,
        &kStruct.itemattr,
        *(_DWORD *)&kStruct.itemid);
      *((_BYTE *)pvBody + 12) = 1;
      return;
    }
    v15 = TextData2::Get(0x8DF3F602);
    goto LABEL_26;
  }
  if ( *(_DWORD *)(v8 + 16) || *(_DWORD *)(v8 + 8) )
    return;
  if ( (unsigned __int8)(*(int (__thiscall **)(_DWORD))(**(_DWORD **)(v8 + 20) + 4))(*(_DWORD *)(v8 + 20)) != 16 )
  {
    v15 = TextData2::Get(0xD4FCEAF7);
LABEL_26:
    v16 = v15;
    if ( v4->m_uiRefCount )
    {
      (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, WeaponTitleWin *))(*(_DWORD *)v4->m_uiRefCount + 4))(
        25,
        v15,
        v4);
      if ( v4->m_uiRefCount )
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, WeaponTitleWin *))(*(_DWORD *)v4->m_uiRefCount + 20))(
          25,
          v16,
          v4);
    }
    ((void (__thiscall *)(WeaponTitleWin *, signed int, NiUnsharedGeometryGroup *, WeaponTitleWin *))v4->vfptr[5].__vecDelDtor)(
      v4,
      25,
      v16,
      v4);
    return;
  }
  v12 = (int)&v4->m_kWorld.m_Rotate.m_pEntry[1][1];
  v17 = 3;
  do
  {
    v13 = *(_DWORD *)(v12 - 8);
    if ( v13 )
      v14 = (IDirectMessenger *)(v13 + 232);
    else
      v14 = 0;
    if ( pkFrom == v14 && (unsigned __int8)(*(int (**)(void))(**(_DWORD **)v12 + 244))() && pkFrom )
    {
      (*(void (__thiscall **)(unsigned int *, signed int))(pkFrom[-20].m_uiMessageNum + 256))(
        &pkFrom[-20].m_uiMessageNum,
        1);
      *((_BYTE *)pvBody + 12) = 1;
    }
    v12 += 12;
    --v17;
  }
  while ( v17 );
}

//----- (005ABBB0) --------------------------------------------------------
void __thiscall WeaponTitleWin::OnRegBtn(WeaponTitleWin *this, int iIndex)
{
  WeaponTitleWin *v2; // esi@1
  IconSlotWin *v3; // ecx@1
  IconSlotWin *v4; // edx@2
  unsigned int v5; // eax@3
  __int16 v6; // ax@4
  int v7; // esi@8
  bool v8; // zf@8
  int v9; // esi@12
  NiUnsharedGeometryGroup *v10; // edi@12
  DirectUserMsgBody_SendPacket kPacket; // [sp+8h] [bp-14h]@8
  PROTO_NC_WT_LICENSE_REQ kLicense; // [sp+14h] [bp-8h]@4

  v2 = this;
  v3 = this->m_pkWeaponIconWin;
  if ( v3->m_eType || (v4 = v2->m_akWeaponTitleFrame[iIndex].pkSlot, v4->m_eType) )
  {
    v9 = (int)&v2->vfptr;
    v10 = TextData2::Get(0xA896FCE2);
    if ( *(_DWORD *)(v9 + 4) )
    {
      (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v9 + 4) + 4))(25, v10, v9);
      if ( *(_DWORD *)(v9 + 4) )
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v9 + 4) + 20))(25, v10, v9);
    }
    (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v9 + 20))(v9, 25, v10, v9);
  }
  else
  {
    v5 = v3->m_kContentsDetail.kItem.uiSenderType;
    if ( v5 == 1 )
    {
      v6 = kLicense.weaponitem.Inven & 0x3FF | 0x2000;
      kLicense.weaponitem.Inven = kLicense.weaponitem.Inven & 0x3FF | 0x2000;
    }
    else if ( v5 )
    {
      v6 = kLicense.weaponitem.Inven;
    }
    else
    {
      v6 = kLicense.weaponitem.Inven & 0x3FF | 0x2400;
      kLicense.weaponitem.Inven = kLicense.weaponitem.Inven & 0x3FF | 0x2400;
    }
    kLicense.weaponitem.Inven = (v6 ^ LOWORD(v3->m_kContentsDetail.kItem.uiSenderIndex)) & 0x3FF ^ v6;
    kLicense.licenseitem.Inven = kLicense.licenseitem.Inven & 0x3FF | 0x2400;
    v7 = (int)&v2->vfptr;
    v8 = *(_DWORD *)(v7 + 4) == 0;
    kLicense.licenseitem.Inven ^= (kLicense.licenseitem.Inven ^ LOWORD(v4->m_kContentsDetail.kItem.uiSenderIndex)) & 0x3FF;
    kLicense.bSet = 1;
    *(_DWORD *)&kPacket.wDepartment = 65559;
    kPacket.pvPacket = &kLicense;
    kPacket.uiPacketSize = 7;
    if ( !v8 )
    {
      (*(void (__stdcall **)(signed int, DirectUserMsgBody_SendPacket *, int))(**(_DWORD **)(v7 + 4) + 4))(
        23,
        &kPacket,
        v7);
      if ( *(_DWORD *)(v7 + 4) )
        (*(void (__stdcall **)(signed int, DirectUserMsgBody_SendPacket *, int))(**(_DWORD **)(v7 + 4) + 20))(
          23,
          &kPacket,
          v7);
    }
    (*(void (__thiscall **)(int, signed int, DirectUserMsgBody_SendPacket *, int))(*(_DWORD *)v7 + 20))(
      v7,
      23,
      &kPacket,
      v7);
  }
}

//----- (005ABD20) --------------------------------------------------------
char __thiscall WeaponTitleDeleteWin::Create(WeaponTitleDeleteWin *this, PgFrameWork *pkFrameWork)
{
  WeaponTitleDeleteWin *v2; // ebx@1
  NiTexturePalette *v3; // esi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  NiSourceTexture *v8; // eax@10
  PgSprData *v9; // eax@13
  char *v10; // eax@13
  char *v11; // eax@13
  PgWinBut *v12; // esi@13
  char *v13; // eax@13
  char *v14; // eax@13
  PgSprData *v15; // eax@13
  PgWinSpr *v16; // eax@13
  char *v17; // eax@13
  float v18; // esi@13
  int v19; // edi@13
  char *v20; // eax@14
  PgWinAbbreviateText *v21; // eax@14
  char *v22; // eax@14
  PgWinBut *v23; // eax@14
  char *v24; // eax@14
  PgWinSpr *v25; // eax@14
  IconSlotWin *v26; // eax@14
  char *v27; // eax@14
  PgWinBut *v28; // eax@15
  char *v29; // eax@15
  PgWinAbbreviateText *v30; // eax@15
  NiRefObjectVtbl *v31; // eax@15
  NiNode *v32; // esi@16
  D3DXCOLOR v33; // [sp-8h] [bp-60h]@13
  const char *v34; // [sp+4h] [bp-54h]@11
  const char *v35; // [sp+8h] [bp-50h]@11
  int *v36; // [sp+Ch] [bp-4Ch]@11
  NiSourceTexture *v37; // [sp+10h] [bp-48h]@11
  UIUtil ui; // [sp+24h] [bp-34h]@10
  int iXOff; // [sp+38h] [bp-20h]@4
  int iYOff; // [sp+3Ch] [bp-1Ch]@4
  int iLeft; // [sp+40h] [bp-18h]@11
  int iTop; // [sp+44h] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+48h] [bp-10h]@1
  int v44; // [sp+54h] [bp-4h]@1
  PgFrameWork *pkFrameWorka; // [sp+60h] [bp+8h]@13

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v44 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\WTitleWin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iXOff, &iYOff, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "WeaponTitleDeleteWin", 0) )
  {
    v6 = spNode.m_pObject;
    v44 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v44) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, iXOff, iYOff);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  *(float *)&v8 = COERCE_FLOAT(MenuTexMgr::GetTexture(0x13u));
  if ( *(float *)&v8 == 0.0 )
  {
    *(float *)&v37 = 0.0;
    *(float *)&v36 = COERCE_FLOAT(&iTop);
    v35 = (const char *)&iLeft;
    v34 = "Theme";
  }
  else
  {
    v37 = v8;
    *(float *)&v36 = COERCE_FLOAT(&iTop);
    v35 = (const char *)&iLeft;
    v34 = "Theme";
  }
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, v34, (int *)v35, v36, v37);
  PgWinSpr::CreateWin(iLeft - iXOff, iTop - iYOff, v9, (PgWin *)&v2->vfptr, 0, 0);
  UIUtil::CreateSpr(&ui, "Panel02", 0);
  UIUtil::CreateSpr(&ui, "Panel03", 0);
  v33 = Color::m_kDxWhiteColor;
  v10 = (char *)TextData2::Get(0x80A583D6);
  UIUtil::CreateText(&ui, "NPCText", v10, 0, v33, 5u, 0, 0);
  v33 = Color::m_kDxWinTitleColor;
  v11 = (char *)TextData2::Get(0xDCEBE03A);
  UIUtil::CreateText(&ui, "ItemName", v11, 0, v33, 4u, 0, 0);
  UIUtil::CreateBtn(&ui, 5u, "ClsNor", "ClsOver", "ClsClick", 0, 0);
  v12 = UIUtil::CreateBtn(&ui, 5u, "QuitBtnNor", "QuitBtnOver", "QuitBtnClick", 0, 0);
  *(D3DXCOLOR *)((char *)&v33 + 8) = Color::m_kDxWhiteColor;
  v13 = (char *)TextData2::Get(0xA5A4A8EF);
  UIUtil::CreateAttachedText((PgWin *)&v12->vfptr, v13, *(D3DXCOLOR *)((char *)&v33 + 8), 5u);
  *(D3DXCOLOR *)((char *)&v33 + 8) = Color::m_kDxWinTitleColor;
  v14 = (char *)TextData2::Get(0xD6F2DD21);
  UIUtil::CreateTextNoSpr(&ui, "WinTitle", v14, *(D3DXCOLOR *)((char *)&v33 + 8), 5u);
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TgetSlot", &iLeft, &iTop, 0);
  v16 = PgWinSpr::CreateWin(iLeft - iXOff, iTop - iYOff, v15, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkWeaponIconWin = IconSlotWin::CreateWin(3, 3, (PgWin *)&v16->vfptr);
  v17 = (char *)TextData2::Get(0xEBFFD741);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkWeaponIconWin->vfptr, v17);
  v2->m_pkWeaponIconWin->m_pkToolTipWin = g_pkToolTipWin;
  ((void (__stdcall *)(signed int))v2->m_pkWeaponIconWin->vfptr[60].__vecDelDtor)(1);
  LODWORD(v18) = 1;
  v19 = (int)v2->m_akWeaponTitleFrame;
  pkFrameWorka = (PgFrameWork *)3;
  do
  {
    *(float *)&v37 = 0.0;
    *(float *)&v36 = 0.0;
    v35 = (const char *)5;
    v33 = Color::m_kDxWhiteColor;
    v20 = fs("TitleName%02d", v18);
    v21 = UIUtil::CreateText(&ui, v20, &byte_9A7C37, 0, v33, (unsigned int)v35, (NiSourceTexture *)v36, (bool)v37);
    *(float *)&v37 = 0.0;
    *(float *)&v36 = v18;
    v35 = "RegCancelBtnLock%02d";
    *(_DWORD *)(v19 + 4) = v21;
    *(float *)&v36 = COERCE_FLOAT(fs((char *)v35, v36));
    v35 = (const char *)LODWORD(v18);
    v35 = fs("RegCancelBtnClick%02d", v18);
    v34 = (const char *)LODWORD(v18);
    v34 = fs("RegCancelBtnOver%02d", v18);
    v33.b = v18;
    v22 = fs("RegCancelBtnNor%02d", v18);
    v23 = UIUtil::CreateBtn(&ui, LODWORD(v18), v22, (char *)v34, (char *)v35, (char *)v36, v37);
    *(float *)&v37 = 0.0;
    *(float *)&v36 = v18;
    v35 = "Slot%02d";
    *(_DWORD *)(v19 + 8) = v23;
    v24 = fs((char *)v35, v36);
    v25 = UIUtil::CreateSpr(&ui, v24, v37);
    v26 = IconSlotWin::CreateWin(3, 3, (PgWin *)&v25->vfptr);
    v34 = (const char *)776415289;
    *(_DWORD *)v19 = v26;
    v27 = (char *)TextData2::Get((unsigned int)v34);
    PgWin::SetToolTipWinText(*(PgWin **)v19, v27);
    *(_DWORD *)(*(_DWORD *)v19 + 272) = g_pkToolTipWin;
    (*(void (__stdcall **)(signed int))(**(_DWORD **)v19 + 240))(1);
    ++LODWORD(v18);
    v19 += 12;
    pkFrameWorka = (PgFrameWork *)((char *)pkFrameWorka - 1);
  }
  while ( pkFrameWorka );
  v28 = UIUtil::CreateBtn(
          &ui,
          4u,
          "RegCancelBtnNor04",
          "RegCancelBtnOver04",
          "RegCancelBtnClick04",
          "RegCancelBtnLock04",
          0);
  v28->vfptr[60].__vecDelDtor((NiRefObject *)v28, 0);
  *(float *)&v37 = 0.0;
  *(float *)&v36 = 0.0;
  v35 = (const char *)5;
  v33 = Color::m_kDxWhiteColor;
  v29 = (char *)TextData2::Get(0x98FEEDF6);
  UIUtil::CreateText(&ui, "MakerNameText", v29, 0, v33, (unsigned int)v35, (NiSourceTexture *)v36, (bool)v37);
  v30 = UIUtil::CreateText(&ui, "MakerName", &byte_9A7C59, 0, Color::m_kDxWhiteColor, 5u, 0, 0);
  *(float *)&v37 = 0.5;
  v2->m_pkMakerNameText = (PgWinText *)v30;
  v31 = v2->vfptr;
  *(float *)&v36 = 0.0;
  ((void (__thiscall *)(WeaponTitleDeleteWin *, unsigned int, unsigned int, _DWORD, NiSourceTexture *))v31[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.0,
    v37);
  LOBYTE(v44) = 0;
  UIUtil::~UIUtil(&ui);
  v44 = -1;
  if ( spNode.m_pObject )
  {
    v32 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v32 )
        v32->vfptr->__vecDelDtor((NiRefObject *)v32, 1u);
    }
  }
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005AC2C0) --------------------------------------------------------
void __thiscall WeaponTitleDeleteWin::OnRegBtn(WeaponTitleDeleteWin *this, int iIndex)
{
  WeaponTitleDeleteWin *v2; // esi@1
  IconSlotWin *v3; // ecx@1
  int v4; // esi@2
  NiUnsharedGeometryGroup *v5; // edi@2
  unsigned int v6; // eax@7
  __int16 v7; // ax@8
  Item *v8; // eax@12
  unsigned int v9; // ecx@13
  unsigned int v10; // ecx@17
  int v11; // esi@22
  NiUnsharedGeometryGroup *v12; // edi@22
  PROTO_NC_WT_LICENSE_REQ kLicense; // [sp+8h] [bp-8h]@8

  v2 = this;
  v3 = this->m_pkWeaponIconWin;
  if ( v3->m_eType )
  {
    v4 = (int)&v2->vfptr;
    v5 = TextData2::Get(0xA896FCE2);
    if ( *(_DWORD *)(v4 + 4) )
    {
      (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v4 + 4) + 4))(25, v5, v4);
      if ( *(_DWORD *)(v4 + 4) )
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v4 + 4) + 20))(25, v5, v4);
    }
    (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v4 + 20))(v4, 25, v5, v4);
  }
  else if ( v2->m_akWeaponTitleFrame[iIndex].pkSlot->m_eType )
  {
    v11 = (int)&v2->vfptr;
    v12 = TextData2::Get(0xA896FCE2);
    if ( *(_DWORD *)(v11 + 4) )
    {
      (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v11 + 4) + 4))(25, v12, v11);
      if ( *(_DWORD *)(v11 + 4) )
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v11 + 4) + 20))(25, v12, v11);
    }
    (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v11 + 20))(v11, 25, v12, v11);
  }
  else
  {
    v6 = v3->m_kContentsDetail.kItem.uiSenderType;
    if ( v6 == 1 )
    {
      v7 = kLicense.weaponitem.Inven & 0x3FF | 0x2000;
      kLicense.weaponitem.Inven = kLicense.weaponitem.Inven & 0x3FF | 0x2000;
    }
    else if ( v6 )
    {
      v7 = kLicense.weaponitem.Inven;
    }
    else
    {
      v7 = kLicense.weaponitem.Inven & 0x3FF | 0x2400;
      kLicense.weaponitem.Inven = kLicense.weaponitem.Inven & 0x3FF | 0x2400;
    }
    kLicense.weaponitem.Inven = (v7 ^ LOWORD(v3->m_kContentsDetail.kItem.uiSenderIndex)) & 0x3FF ^ v7;
    v8 = (Item *)v3->m_kContentsDetail.kItem.uiSenderType;
    if ( v8 == (Item *)1 )
    {
      v9 = v3->m_kContentsDetail.kItem.uiSenderIndex;
      if ( v9 < 0x1E )
        v8 = g_kInventory.m_aspEquip[v9].m_pObject;
      else
        v8 = 0;
    }
    else if ( v8 )
    {
      v8 = (Item *)iIndex;
    }
    else
    {
      v10 = v3->m_kContentsDetail.kItem.uiSenderIndex;
      if ( v10 < 0xC0 )
        v8 = g_kInventory.m_aspInv[v10].m_pObject;
    }
    kLicense.mobid = *(&v8->m_kStruct.itemattr.MobCard_Unident.Group + 3 * iIndex);
    if ( Inventory::FindWeaponTitleRemoveInven(&g_kInventory, &kLicense.licenseitem) )
    {
      kLicense.bSet = 0;
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x17u, 1u, &kLicense, 7);
    }
  }
}

//----- (005AC470) --------------------------------------------------------
void __thiscall WeaponTitleWin::OnShowWin(WeaponTitleWin *this)
{
  WeaponTitleWin *v1; // esi@1
  char *v2; // eax@1
  PgWin **v3; // ebx@1
  int v4; // eax@2
  unsigned int v5; // eax@3
  void *v6; // eax@5
  void *v7; // edi@5
  char *v8; // eax@6
  PgWin *v9; // edx@12
  bool v10; // zf@12
  GameFrameWork *v11; // eax@13
  int key; // [sp+Ch] [bp-14h]@2
  NiUnsharedGeometryGroup *v13; // [sp+10h] [bp-10h]@2
  NiUnsharedGeometryGroup *v14; // [sp+14h] [bp-Ch]@2
  NiUnsharedGeometryGroup *v15; // [sp+18h] [bp-8h]@2
  int v16; // [sp+1Ch] [bp-4h]@1

  v1 = this;
  v2 = (char *)TextData2::Get(0xEBFFD741);
  PgWin::SetToolTipWinText((PgWin *)&v1->m_pkWeaponIconWin->vfptr, v2);
  v1->m_pkWeaponIconWin->m_pkToolTipWin = g_pkToolTipWin;
  v3 = (PgWin **)v1->m_akWeaponTitleFrame;
  v16 = 3;
  do
  {
    v13 = &unk_96F8EB;
    v14 = &unk_96F8EB;
    v15 = &unk_96F8EB;
    key = 776415289;
    v4 = *(_DWORD *)(ITableBase<TextDataType2,TextData2>::ms_pkTable + 56);
    if ( v4 )
      v5 = *(_DWORD *)(v4 + 40);
    else
      v5 = 0;
    v6 = bsearch(&key, TextData2::ms_apkNode, v5, 0x10u, TextDataNodeComp);
    v7 = v6;
    if ( v6 )
    {
      if ( strcmp(*((const char **)v6 + 2), "None") )
        SoundMgr::PlayGenderVoice(&g_kSoundMgr, *((char **)v7 + 2));
      if ( strcmp(*((const char **)v7 + 3), "None") )
        SoundMgr::PlayInterfaceSound(&g_kSoundMgr, *((char **)v7 + 3));
      v8 = (char *)*((_DWORD *)v7 + 1);
    }
    else
    {
      v8 = (char *)&unk_96F8EB;
    }
    PgWin::SetToolTipWinText(*v3, v8);
    v9 = *v3;
    v3 += 3;
    v10 = v16-- == 1;
    v9->m_pkToolTipWin = g_pkToolTipWin;
  }
  while ( !v10 );
  v11 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v11 )
    GameFrameWork::OpenPlayGuideWin(v11, BIL_WEAPONTITLE_2);
}
// A88684: using guessed type int ITableBase<TextDataType2,TextData2>::ms_pkTable;

//----- (005AC5E0) --------------------------------------------------------
WeaponTitleWin *__cdecl WeaponTitleWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  WeaponTitleWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x184u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&WeaponTitleWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&WeaponTitleWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (WeaponTitleWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9A7F28: using guessed type void (__thiscall *WeaponTitleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A7F44: using guessed type int (__thiscall *WeaponTitleWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005AC720) --------------------------------------------------------
WeaponTitleDeleteWin *__cdecl WeaponTitleDeleteWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  WeaponTitleDeleteWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x188u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&WeaponTitleDeleteWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&WeaponTitleDeleteWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (WeaponTitleDeleteWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9A8170: using guessed type void (__thiscall *WeaponTitleDeleteWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A818C: using guessed type int (__thiscall *WeaponTitleDeleteWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005AC860) --------------------------------------------------------
void __userpurge WeaponTitleWin::SetWeaponTitle(WeaponTitleWin *this@<ecx>, signed int a2@<esi>, ShineItemAttr_Weapon *pkWeapon, unsigned __int16 wepID)
{
  WeaponTitleWin *v4; // ebx@1
  int v5; // esi@2
  char *v6; // edi@2
  char *v7; // eax@3
  int v8; // eax@3
  int v9; // ebx@4
  int *v10; // eax@6
  int v11; // eax@7
  char *v12; // eax@8
  ItemInfo *v13; // eax@8
  Item *v14; // eax@9
  char *v15; // eax@9
  void (*v16)(void); // eax@11
  signed int v17; // [sp-4h] [bp-90h]@2
  WeaponTitleWin *v18; // [sp+Ch] [bp-80h]@1
  unsigned __int16 v19; // [sp+14h] [bp-78h]@4
  signed int v20; // [sp+18h] [bp-74h]@2
  bool bDisableLastBtn; // [sp+1Eh] [bp-6Eh]@2
  bool bWeaponTitled; // [sp+1Fh] [bp-6Dh]@2
  SHINE_ITEM_STRUCT kStruct; // [sp+20h] [bp-6Ch]@9

  v4 = this;
  v18 = this;
  if ( pkWeapon )
  {
    v17 = a2;
    bWeaponTitled = 0;
    bDisableLastBtn = 0;
    ((void (__stdcall *)(void *))this->m_pkMakerNameText->vfptr[118].__vecDelDtor)(&unk_9A7C2E);
    v5 = (int)&v4->m_akWeaponTitleFrame[0].pkTitleText;
    v6 = (char *)pkWeapon->mobkills;
    v20 = 3;
    do
    {
      (*(void (__stdcall **)(void *, signed int))(**(_DWORD **)v5 + 472))(&unk_9A7C2F, v17);
      IconSlotWin::Clear(*(IconSlotWin **)(v5 - 4));
      v7 = (char *)TextData2::Get(0x2E472839u);
      PgWin::SetToolTipWinText(*(PgWin **)(v5 - 4), v7);
      *(_DWORD *)(*(_DWORD *)(v5 - 4) + 272) = g_pkToolTipWin;
      v8 = *(_WORD *)v6;
      if ( (_WORD)v8 == -1 )
      {
        v16 = *(void (**)(void))(**(_DWORD **)(v5 + 4) + 240);
        if ( bDisableLastBtn )
        {
          v17 = 0;
          v16();
        }
        else
        {
          v17 = 1;
          v16();
          bDisableLastBtn = 1;
        }
      }
      else
      {
        v9 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
        v19 = *(_WORD *)v6;
        if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable
                                                              + 16))(
                                ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                                v8) )
        {
          if ( v19 <= *(_WORD *)(v9 + 200) )
          {
            v10 = (int *)(*(_DWORD *)(v9 + 196) + 4 * v19);
            if ( *v10 )
            {
              v11 = *v10;
              if ( v11 )
              {
                v12 = fs("WTL_%s", v11 + 2);
                v13 = ItemInfoTab::GetByInxName(v12);
                if ( v13 )
                {
                  kStruct.itemid = v13->ID;
                  v14 = Item::Create(&kStruct);
                  IconSlotWin::SetItem(*(IconSlotWin **)(v5 - 4), v14, 1, 1);
                  v15 = WeaponTitleTab::GetWeaponTitleString(*(_WORD *)v6, *(_DWORD *)(v6 + 2) & 0xFFFFFFF, wepID);
                  (*(void (__stdcall **)(char *))(**(_DWORD **)v5 + 472))(v15);
                }
              }
            }
          }
        }
        v17 = 0;
        bWeaponTitled = 1;
        (*(void (**)(void))(**(_DWORD **)(v5 + 4) + 240))();
        v4 = v18;
      }
      v6 += 6;
      v5 += 12;
      --v20;
    }
    while ( v20 );
    if ( bWeaponTitled )
      ((void (__stdcall *)(char *))v4->m_pkMakerNameText->vfptr[118].__vecDelDtor)(pkWeapon->usertitle);
  }
}
// 5AC860: could not find valid save-restore pair for esi
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;

//----- (005ACA30) --------------------------------------------------------
void __userpurge WeaponTitleDeleteWin::SetWeaponTitle(WeaponTitleDeleteWin *this@<ecx>, signed int a2@<ebx>, ShineItemAttr_Weapon *pkWeapon, unsigned __int16 wepID)
{
  WeaponTitleDeleteWin *v4; // esi@1
  char v5; // bl@2
  int v6; // esi@2
  char *v7; // edi@2
  int v8; // eax@3
  int v9; // ebx@4
  int v10; // edx@4
  int *v11; // eax@6
  int v12; // eax@7
  char *v13; // eax@8
  ItemInfo *v14; // eax@8
  Item *v15; // eax@9
  char *v16; // eax@9
  void (*v17)(void); // eax@10
  signed int v18; // [sp-4h] [bp-94h]@2
  ITEM_INVEN kInven; // [sp+8h] [bp-88h]@2
  unsigned __int16 v20[2]; // [sp+Ch] [bp-84h]@1
  ShineItemAttr_Weapon *v21; // [sp+10h] [bp-80h]@1
  WeaponTitleDeleteWin *v22; // [sp+14h] [bp-7Ch]@1
  int v23; // [sp+18h] [bp-78h]@4
  int v24; // [sp+1Ch] [bp-74h]@2
  bool bRemoveItemFound; // [sp+23h] [bp-6Dh]@2
  SHINE_ITEM_STRUCT kStruct; // [sp+24h] [bp-6Ch]@9

  v4 = this;
  v22 = this;
  v21 = pkWeapon;
  *(_DWORD *)v20 = wepID;
  if ( pkWeapon )
  {
    v18 = a2;
    v5 = 0;
    ((void (__stdcall *)(void *))this->m_pkMakerNameText->vfptr[118].__vecDelDtor)(&unk_9A7C5A);
    v6 = (int)&v4->m_akWeaponTitleFrame[0].pkBtn;
    bRemoveItemFound = Inventory::FindWeaponTitleRemoveInven(&g_kInventory, &kInven);
    v7 = (char *)pkWeapon->mobkills;
    v24 = 3;
    while ( 1 )
    {
      (*(void (__stdcall **)(void *, signed int))(**(_DWORD **)(v6 - 4) + 472))(&unk_9A7C5B, v18);
      IconSlotWin::Clear(*(IconSlotWin **)(v6 - 8));
      v8 = *(_WORD *)v7;
      if ( (_WORD)v8 == -1 )
        break;
      v9 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
      v10 = *(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
      v23 = *(_WORD *)v7;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(v10 + 16))(ITableBase<MobInfo,MobInfoTab>::ms_pkTable, v8) )
      {
        if ( (unsigned __int16)v23 <= *(_WORD *)(v9 + 200) )
        {
          v11 = (int *)(*(_DWORD *)(v9 + 196) + 4 * (unsigned __int16)v23);
          if ( *v11 )
          {
            v12 = *v11;
            if ( v12 )
            {
              v13 = fs("WTL_%s", v12 + 2);
              v14 = ItemInfoTab::GetByInxName(v13);
              if ( v14 )
              {
                kStruct.itemid = v14->ID;
                v15 = Item::Create(&kStruct);
                IconSlotWin::SetItem(*(IconSlotWin **)(v6 - 8), v15, 1, 1);
                v16 = WeaponTitleTab::GetWeaponTitleString(*(_WORD *)v7, *(_DWORD *)(v7 + 2) & 0xFFFFFFF, v20[0]);
                (*(void (__stdcall **)(char *))(**(_DWORD **)(v6 - 4) + 472))(v16);
              }
            }
          }
        }
      }
      v17 = *(void (**)(void))(**(_DWORD **)v6 + 240);
      v5 = 1;
      if ( !bRemoveItemFound )
        goto LABEL_13;
      v18 = 1;
LABEL_14:
      v17();
      v7 += 6;
      v6 += 12;
      if ( !--v24 )
      {
        if ( v5 )
          ((void (__stdcall *)(char *))v22->m_pkMakerNameText->vfptr[118].__vecDelDtor)(v21->usertitle);
        return;
      }
    }
    v17 = *(void (**)(void))(**(_DWORD **)v6 + 240);
LABEL_13:
    v18 = 0;
    goto LABEL_14;
  }
}
// 5ACA30: could not find valid save-restore pair for ebx
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;

//----- (005ACBE0) --------------------------------------------------------
WeaponTitleDeleteWin *__thiscall WeaponTitleDeleteWin::`vector deleting destructor'(WeaponTitleDeleteWin *this, unsigned int a2)
{
  WeaponTitleDeleteWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&WeaponTitleWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&WeaponTitleWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A7F28: using guessed type void (__thiscall *WeaponTitleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A7F44: using guessed type int (__thiscall *WeaponTitleWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005ACC20) --------------------------------------------------------
void __thiscall WingStoneMapWin::SetMapViewRect(WingStoneMapWin *this, unsigned int dwLeft, unsigned int dwTop, unsigned int dwRight, unsigned int dwBottom)
{
  this->m_kMapViewRect.left = dwLeft;
  this->m_kMapViewRect.right = dwRight;
  this->m_kMapViewRect.top = dwTop;
  this->m_kMapViewRect.bottom = dwBottom;
}

//----- (005ACC50) --------------------------------------------------------
void __thiscall WingStoneMapWin::OnClose(WingStoneMapWin *this)
{
  PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
}

//----- (005ACC80) --------------------------------------------------------
void WingStoneMapWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "MinimapFull");
}

//----- (005ACCB0) --------------------------------------------------------
void __thiscall WingStoneMapWin::OnFly(WingStoneMapWin *this)
{
  WingStoneMapWin *v1; // esi@1

  v1 = this;
  WingStoneWin::OnCmdFlying(*(WingStoneWin **)&this->m_pkFrameWork[16].m_bInit);
  PgWin::PostMsg((PgWin *)&v1->vfptr, 1u, 0, 0);
}

//----- (005ACCE0) --------------------------------------------------------
void __thiscall WingStoneMapWin::SetWinPos(WingStoneMapWin *this, float fCharWorldX, float fCharWorldY)
{
  MainCharMarkWin *v3; // eax@1
  float v4; // ST00_4@1
  float v5; // ST04_4@1
  float v6; // edx@1
  float v7; // ST00_4@1
  double v8; // st7@1
  float v9; // ST04_4@1

  v3 = this->m_pkMainCharMarkWin;
  v4 = v3->m_kLocal.m_Translate.x;
  v5 = v3->m_kLocal.m_Translate.y;
  v6 = v3->m_kLocal.m_Translate.z;
  v7 = (fCharWorldX * 0.01999999955296516 / this->m_fMiniMapScale - this->m_fMapOffsetX) * this->m_fMapScaleX;
  v8 = (512.0 - 0.01999999955296516 * fCharWorldY / this->m_fMiniMapScale - this->m_fMapOffsetY) * this->m_fMapScaleY;
  v3->m_kLocal.m_Translate.x = v7;
  v9 = v8;
  v3->m_kLocal.m_Translate.y = v9;
  v3->m_kLocal.m_Translate.z = v6;
}

//----- (005ACD60) --------------------------------------------------------
void __thiscall WingStoneMapWin::WingStoneMapWin(WingStoneMapWin *this)
{
  WingStoneMapWin *v1; // esi@1
  PgSprData *v2; // ebx@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&WingStoneMapWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&WingStoneMapWin::`vftable'{for `IDirectMessenger'};
  v1->m_spSavePlace.m_pObject = 0;
  v1->m_spFullMapGeom.m_pObject = 0;
  v1->m_spFullMapTexProp.m_pObject = 0;
  v1->m_spMiniMapTexture.m_pObject = 0;
  v2 = v1->m_spSavePlace.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spSavePlace.m_pObject = 0;
  }
  v1->m_pkMapNameTextWin = 0;
  v1->m_fMiniMapScale = 0.0;
  v1->m_pkFullMapViewWin = 0;
  v1->m_pkMainCharMarkWin = 0;
  v1->m_pkMiniMapWin = 0;
  v1->m_pkFlyMapBut = 0;
}
// 9A8488: using guessed type void (__thiscall *WingStoneMapWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A84A4: using guessed type int (__thiscall *WingStoneMapWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005ACE30) --------------------------------------------------------
void __thiscall WingStoneMapWin::~WingStoneMapWin(WingStoneMapWin *this)
{
  WingStoneMapWin *v1; // esi@1
  PgSprData *v2; // edi@1
  NiSourceTexture *v3; // edi@6
  NiTexturingProperty *v4; // edi@10
  NiScreenElements *v5; // edi@14
  PgSprData *v6; // edi@18

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&WingStoneMapWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&WingStoneMapWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spSavePlace.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spSavePlace.m_pObject = 0;
  }
  v1->m_pkMapNameTextWin = 0;
  v1->m_fMiniMapScale = 0.0;
  v1->m_pkFullMapViewWin = 0;
  v1->m_pkMainCharMarkWin = 0;
  v1->m_pkMiniMapWin = 0;
  v1->m_pkFlyMapBut = 0;
  v3 = v1->m_spMiniMapTexture.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v4 = v1->m_spFullMapTexProp.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v5 = v1->m_spFullMapGeom.m_pObject;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  v6 = v1->m_spSavePlace.m_pObject;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9A8488: using guessed type void (__thiscall *WingStoneMapWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A84A4: using guessed type int (__thiscall *WingStoneMapWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005ACF90) --------------------------------------------------------
void __thiscall WingStoneMapWin::ReSetView(WingStoneMapWin *this)
{
  WingStoneMapWin *v1; // esi@1
  NiSourceTexture *v2; // ecx@1
  int v3; // edi@2
  int v4; // ebx@2
  NiTexturingProperty *v5; // ecx@2
  NiTexture *fBottom; // ST14_4@2

  v1 = this;
  v2 = this->m_spMiniMapTexture.m_pObject;
  if ( v2 )
  {
    ((void (*)(void))v2->vfptr[15].__vecDelDtor)();
    ((void (*)(void))v1->m_spMiniMapTexture.m_pObject->vfptr[16].__vecDelDtor)();
    v3 = v1->m_kMapViewRect.right - v1->m_kMapViewRect.left + 1;
    v4 = v1->m_kMapViewRect.bottom - v1->m_kMapViewRect.top + 1;
    NiScreenElementsData::SetTextures(
      (NiScreenElementsData *)v1->m_spFullMapGeom.m_pObject->m_spModelData.m_pObject,
      0,
      0,
      0.0,
      0.0,
      1.0,
      1.0);
    NiScreenElementsData::SetRectangle(
      (NiScreenElementsData *)v1->m_spFullMapGeom.m_pObject->m_spModelData.m_pObject,
      0,
      0.0,
      0.0,
      512.0,
      512.0);
    v1->m_fMapOffsetX = (double)v1->m_kMapViewRect.left;
    v1->m_fMapOffsetY = (double)v1->m_kMapViewRect.top;
    v1->m_fMapScaleX = 512.0 / (double)(unsigned int)v3;
    v5 = v1->m_spFullMapTexProp.m_pObject;
    fBottom = (NiTexture *)&v1->m_spMiniMapTexture.m_pObject->vfptr;
    v1->m_fMapScaleY = 512.0 / (double)(unsigned int)v4;
    NiTexturingProperty::SetBaseTexture(v5, fBottom);
    v1->m_spFullMapGeom.m_pObject->m_spModelData.m_pObject->m_usDirtyFlags |= 9u;
    NiAVObject::UpdateProperties((NiAVObject *)&v1->vfptr);
  }
}

//----- (005AD0B0) --------------------------------------------------------
void __thiscall WingStoneMapWin::OnCommand(WingStoneMapWin *this, unsigned int wParam, int lParam)
{
  WingStoneMapWin *v3; // esi@1
  GameFrameWork *v4; // eax@4

  v3 = this;
  if ( wParam )
  {
    if ( wParam == 1 )
    {
      ((void (*)(void))this->vfptr[90].__vecDelDtor)();
    }
    else if ( wParam == 2 )
    {
      v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v4 )
        GameFrameWork::OpenPlayGuideSearchList(v4, "MinimapFull");
    }
  }
  else
  {
    WingStoneWin::OnCmdFlying(*(WingStoneWin **)&this->m_pkFrameWork[16].m_bInit);
    PgWin::PostMsg((PgWin *)&v3->vfptr, 1u, 0, 0);
  }
}

//----- (005AD120) --------------------------------------------------------
char __thiscall WingStoneMapWin::Create(WingStoneMapWin *this, PgFrameWork *pkFrameWork)
{
  WingStoneMapWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  PgSprData *v6; // edi@4
  PgSprData *v7; // ebx@4
  PgSprData *v8; // eax@11
  NiNode *v9; // esi@12
  PgSprData *v11; // eax@17
  PgSprData *v12; // edi@17
  NiSourceTexture *v13; // edi@17
  PgSprData *v14; // edi@18
  PgFont *v15; // eax@19
  PgWinText *v16; // eax@19
  NiScreenElementsData *v17; // edi@19
  NiScreenElements *v18; // eax@19
  NiScreenElements *v19; // eax@20
  NiScreenElements *v20; // ebx@20
  NiScreenElements *v21; // edi@22
  NiTexturingProperty *v22; // eax@29
  NiTexturingProperty *v23; // eax@30
  NiTexturingProperty *v24; // ebx@30
  NiTexturingProperty *v25; // edi@32
  NiNode *v26; // esi@40
  unsigned int uiWidth; // [sp+40h] [bp-20h]@19
  unsigned int uiHeight; // [sp+44h] [bp-1Ch]@19
  int uiLeft; // [sp+48h] [bp-18h]@4
  int uiTop; // [sp+4Ch] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+50h] [bp-10h]@1
  int v32; // [sp+5Ch] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v32 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\MinimapFull.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NPCGuild", &uiLeft, &uiTop, 0);
  v6 = v2->m_spSavePlace.m_pObject;
  v7 = v5;
  if ( v6 != v5 )
  {
    if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v2->m_spSavePlace.m_pObject = v7;
    if ( v7 )
      InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  }
  v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v8, 0, pkFrameWork, "WingStoneMapWin", 0) )
  {
    v9 = spNode.m_pObject;
    v32 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v9 )
        v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    }
    return 0;
  }
  v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft, uiTop, v11, (PgWin *)&v2->vfptr, 0, 0);
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v12, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(v12, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinBut::CreateWin(uiLeft, uiTop, v12, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v13 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, v13);
    PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft, uiTop, v14, (PgWin *)&v2->vfptr, 2u, 0, 0);
  }
  PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight);
  v15 = Font::Get(0);
  v16 = PgWinText::CreateWin(uiLeft, uiTop, uiWidth, uiHeight, v15, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkMapNameTextWin = v16;
  v16->vfptr[122].__vecDelDtor((NiRefObject *)v16, 1u);
  ((void (__stdcall *)(void *))v2->m_pkMapNameTextWin->vfptr[118].__vecDelDtor)(&unk_9A83C9);
  ((void (__stdcall *)(_DWORD))v2->m_pkMapNameTextWin->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(struct D3DXCOLOR *))v2->m_pkMapNameTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
  PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "fullmap", &uiLeft, &uiTop, &uiWidth, &uiHeight);
  v2->m_pkFullMapViewWin = PgWin::CreateWin(uiLeft, uiTop, uiWidth, uiHeight, (PgWin *)&v2->vfptr, 0, 0);
  v17 = PgUtil::CreateScreenGeometryData(1u, 1u, 0, 0, 1u, 1u);
  v18 = (NiScreenElements *)operator new(0xC4u);
  LOBYTE(v32) = 1;
  if ( v18 )
  {
    NiScreenElements::NiScreenElements(v18, v17);
    v20 = v19;
  }
  else
  {
    v20 = 0;
  }
  v21 = v2->m_spFullMapGeom.m_pObject;
  LOBYTE(v32) = 0;
  if ( v21 != v20 )
  {
    if ( v21 && !InterlockedDecrement((volatile LONG *)&v21->m_uiRefCount) && v21 )
      v21->vfptr->__vecDelDtor((NiRefObject *)v21, 1u);
    v2->m_spFullMapGeom.m_pObject = v20;
    if ( v20 )
      InterlockedIncrement((volatile LONG *)&v20->m_uiRefCount);
  }
  v22 = (NiTexturingProperty *)operator new(0x44u);
  LOBYTE(v32) = 2;
  if ( v22 )
  {
    NiTexturingProperty::NiTexturingProperty(v22);
    v24 = v23;
  }
  else
  {
    v24 = 0;
  }
  v25 = v2->m_spFullMapTexProp.m_pObject;
  LOBYTE(v32) = 0;
  if ( v25 != v24 )
  {
    if ( v25 && !InterlockedDecrement((volatile LONG *)&v25->m_uiRefCount) && v25 )
      v25->vfptr->__vecDelDtor((NiRefObject *)v25, 1u);
    v2->m_spFullMapTexProp.m_pObject = v24;
    if ( v24 )
      InterlockedIncrement((volatile LONG *)&v24->m_uiRefCount);
  }
  NiTexturingProperty::SetBaseTexture(v2->m_spFullMapTexProp.m_pObject, 0);
  NiTexturingProperty::SetBaseFilterMode(v2->m_spFullMapTexProp.m_pObject, FILTER_BILERP);
  v2->m_spFullMapTexProp.m_pObject->m_eApply = 0;
  NiTexturingProperty::SetBaseClampMode(v2->m_spFullMapTexProp.m_pObject, 0);
  NiAVObject::AttachProperty(
    (NiAVObject *)&v2->m_spFullMapGeom.m_pObject->vfptr,
    (NiProperty *)&v2->m_spFullMapTexProp.m_pObject->vfptr);
  ((void (__stdcall *)(NiScreenElements *, _DWORD))v2->m_pkFullMapViewWin->vfptr[29].__vecDelDtor)(
    v2->m_spFullMapGeom.m_pObject,
    0);
  v2->m_pkMainCharMarkWin = MainCharMarkWin::CreateWin(0, 0, v2->m_spSavePlace.m_pObject, v2->m_pkFullMapViewWin);
  NiAVObject::UpdateProperties((NiAVObject *)&v2->vfptr);
  NiAVObject::Update((NiAVObject *)&v2->vfptr, 0.0, 1);
  ((void (__thiscall *)(WingStoneMapWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  v32 = -1;
  if ( spNode.m_pObject )
  {
    v26 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v26 )
        v26->vfptr->__vecDelDtor((NiRefObject *)v26, 1u);
    }
  }
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005AD610) --------------------------------------------------------
char __thiscall WingStoneMapWin::SetLoadMap(WingStoneMapWin *this, unsigned __int16 kMapID, float fX, float fY)
{
  WingStoneMapWin *v4; // esi@1
  MapInfo *v5; // eax@1
  Name3 *v6; // edi@1
  NiImageConverter *v7; // eax@3
  NiPixelData *v8; // eax@3
  NiPixelData *v9; // ebx@5
  NiSourceTexture *v10; // eax@14
  NiSourceTexture *v11; // edi@14
  NiSourceTexture *v12; // ebx@14
  char result; // al@21
  MapViewInfo *v14; // eax@22
  int v15; // edx@22
  int v16; // ecx@22
  int v17; // ebx@22
  int v18; // edx@22
  MapInfo *v19; // eax@22
  NiTexture::FormatPrefs kPrefs; // [sp+24h] [bp-128h]@4
  NiPixelData *v21; // [sp+30h] [bp-11Ch]@5
  char acFileName[260]; // [sp+34h] [bp-118h]@3
  char acMapName[13]; // [sp+138h] [bp-14h]@1

  v4 = this;
  v5 = MapInfoTab::GetByMapName(kMapID);
  v6 = &v5->MapName;
  *(_DWORD *)acMapName = v5->MapName.n3_code[0];
  *(_DWORD *)&acMapName[4] = v5->MapName.n3_code[1];
  *(_DWORD *)&acMapName[8] = v5->MapName.n3_code[2];
  acMapName[12] = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acFileName, "%sminimap\\%s.dds", &Folder::m_acMenu, acMapName);
  v7 = NiImageConverter::GetImageConverter();
  v8 = (NiPixelData *)((int (__thiscall *)(_DWORD, _DWORD, _DWORD))v7->vfptr[2].__vecDelDtor)(v7, acFileName, 0);
  if ( v8 )
  {
    kPrefs.m_ePixelLayout = 6;
    kPrefs.m_eAlphaFmt = 3;
    kPrefs.m_eMipMapped = 0;
    v8 = (NiPixelData *)NiSourceTexture::Create(v8, &kPrefs);
  }
  v9 = (NiPixelData *)v4->m_spMiniMapTexture.m_pObject;
  v21 = v8;
  if ( v9 != v8 )
  {
    if ( v9 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
        v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      v8 = v21;
    }
    v4->m_spMiniMapTexture.m_pObject = (NiSourceTexture *)v8;
    if ( v8 )
      InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  }
  if ( v4->m_spMiniMapTexture.m_pObject )
  {
    v14 = MapViewInfoTab::GetByMapName(v6);
    v15 = v14->EndX;
    v16 = v14->EndY;
    v21 = (NiPixelData *)v14->StartY;
    v17 = v14->StartX;
    v4->m_kMapViewRect.right = v15;
    v18 = (int)v21;
    v4->m_kMapViewRect.left = v17;
    v4->m_kMapViewRect.top = v18;
    v4->m_kMapViewRect.bottom = v16;
    v4->m_fMiniMapScale = v14->MiniMapScale;
    v19 = MapInfoTab::GetByMapName(v6);
    ((void (__stdcall *)(_DWORD))v4->m_pkMapNameTextWin->vfptr[118].__vecDelDtor)(v19->Name);
    WingStoneMapWin::ReSetView(v4);
    WingStoneMapWin::SetWinPos(v4, fX, fY);
    result = 1;
  }
  else
  {
    v10 = PgUtil::Create1PixelSourceTexture(0, 0, 0, -1);
    v11 = v4->m_spMiniMapTexture.m_pObject;
    v12 = v10;
    if ( v11 != v10 )
    {
      if ( v11 && !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
        v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
      v4->m_spMiniMapTexture.m_pObject = v12;
      if ( v12 )
        InterlockedIncrement((volatile LONG *)&v12->m_uiRefCount);
    }
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005AD820) --------------------------------------------------------
WingStoneMapWin *__cdecl WingStoneMapWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  WingStoneMapWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1A0u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    WingStoneMapWin::WingStoneMapWin((WingStoneMapWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (WingStoneMapWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (005AD950) --------------------------------------------------------
WingStoneMapWin *__thiscall WingStoneMapWin::`scalar deleting destructor'(WingStoneMapWin *this, unsigned int a2)
{
  WingStoneMapWin *v2; // esi@1

  v2 = this;
  WingStoneMapWin::~WingStoneMapWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005AD980) --------------------------------------------------------
void __thiscall WingStoneWin::OnCmdPlaceMemoryList(WingStoneWin *this)
{
  PgFrameWork::AddMsg(this->m_pkFrameWork, 0xECu, 0, 0);
}

//----- (005AD9A0) --------------------------------------------------------
void __thiscall WingStoneWin::SetFirstGoddessWingUse(WingStoneWin *this, bool b)
{
  this->m_bFirstGoddessWingUse = b;
}

//----- (005AD9B0) --------------------------------------------------------
void __thiscall WingStoneWin::OnCmdClose(WingStoneWin *this)
{
  WingStoneWin *v1; // esi@1

  v1 = this;
  InvWin::SetLock(*((InvWin **)this->m_pkFrameWork[19].m_BackFrameID + this->m_uiLockInvPos + 87), 0);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
  if ( (unsigned __int8)(*((int (**)(void))v1->m_pkFrameWork[17].vfptr->SetMsgHooker + 65))() )
    GameFrameWork::CloseWingStoneMapWin((GameFrameWork *)v1->m_pkFrameWork);
}

//----- (005ADA10) --------------------------------------------------------
void __thiscall WingStoneWin::SetLockInvPos(WingStoneWin *this, unsigned int uiInvPos)
{
  this->m_uiLockInvPos = uiInvPos;
  InvWin::SetLock(*((InvWin **)this->m_pkFrameWork[19].m_BackFrameID + uiInvPos + 87), 1);
}

//----- (005ADA40) --------------------------------------------------------
void __thiscall WingStoneWin::CloseWingStoneWin(WingStoneWin *this)
{
  InvWin::SetLock(*((InvWin **)this->m_pkFrameWork[19].m_BackFrameID + this->m_uiLockInvPos + 87), 0);
}

//----- (005ADA70) --------------------------------------------------------
void __thiscall WingStoneWin::~WingStoneWin(WingStoneWin *this)
{
  WingStoneWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&WingStoneWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&WingStoneWin::`vftable'{for `IDirectMessenger'};
  this->m_pkItemUseExposition = 0;
  this->m_pkChoicePlace = 0;
  this->m_pkPopupMenuWin = 0;
  this->m_pkEditWin = 0;
  this->m_pkItemIconWin = 0;
  this->m_pkPgWinCloseBut = 0;
  this->m_pkItemInfo = 0;
  this->m_uiDescript = 0;
  `eh vector destructor iterator'(
    this->m_apkTextWin,
    4u,
    3,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9A88C4: using guessed type void (__thiscall *WingStoneWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A88E4: using guessed type int (__thiscall *WingStoneWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005ADB20) --------------------------------------------------------
void __thiscall WingStoneWin::OnCmdFlying(WingStoneWin *this)
{
  WingStoneWin *v1; // ebx@1
  NiUnsharedGeometryGroup *v2; // edi@7

  v1 = this;
  if ( this->m_bCheckMemory == 1 )
  {
    if ( LOBYTE(TextData::Get(0x3E4F2E49u)->vfptr) )
    {
      v2 = TextData::Get(0x3E4F2E49u);
      if ( v1->m_pkMsgHooker )
      {
        ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->SendDirectMessage)(25, v2, &v1->vfptr);
        if ( v1->m_pkMsgHooker )
          ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            25,
            v2,
            &v1->vfptr);
      }
      v1->vfptr->DirectDispatchToParent((IDirectMessenger *)&v1->vfptr, 25, v2, (IDirectMessenger *)&v1->vfptr);
      v1->m_bCheckMemory = 0;
    }
    else
    {
      if ( v1->m_pkMsgHooker )
      {
        ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->SendDirectMessage)(
          25,
          "Unknown Text",
          &v1->vfptr);
        if ( v1->m_pkMsgHooker )
          ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            25,
            "Unknown Text",
            &v1->vfptr);
      }
      v1->vfptr->DirectDispatchToParent(
        (IDirectMessenger *)&v1->vfptr,
        25,
        "Unknown Text",
        (IDirectMessenger *)&v1->vfptr);
      v1->m_bCheckMemory = 0;
    }
  }
  else
  {
    GameFrameWork::On_NC_MAP_WING_FLY_REQ((GameFrameWork *)this->m_pkFrameWork);
    InvWin::SetLock(*((InvWin **)v1->m_pkFrameWork[19].m_BackFrameID + v1->m_uiLockInvPos + 87), 0);
    if ( v1->m_bCheckOpenMap )
      GameFrameWork::CloseWingStoneMapWin((GameFrameWork *)v1->m_pkFrameWork);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
  }
}

//----- (005ADC40) --------------------------------------------------------
void __thiscall WingStoneWin::OnCmdPosiotionMemory(WingStoneWin *this)
{
  WingStoneWin *v1; // esi@1
  PROTO_NC_CHAR_BASE_CMD::LoginLocation *v2; // eax@1
  int v3; // esi@3
  int v4; // esi@7
  NiUnsharedGeometryGroup *v5; // edi@7

  v1 = this;
  v2 = User::GetMainCharLoginMapName(&g_kUser);
  if ( MapInfoTab::GetByMapName(&v2->currentmap)->KingdomMap == 1 )
  {
    if ( LOBYTE(TextData::Get(0x68A78683u)->vfptr) )
    {
      v4 = (int)&v1->vfptr;
      v5 = TextData::Get(0x68A78683u);
      if ( *(_DWORD *)(v4 + 4) )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v4 + 4) + 4))(25, v5, v4);
        if ( *(_DWORD *)(v4 + 4) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v4 + 4) + 20))(25, v5, v4);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v4 + 20))(v4, 25, v5, v4);
    }
    else
    {
      v3 = (int)&v1->vfptr;
      if ( *(_DWORD *)(v3 + 4) )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v3 + 4) + 4))(25, "Unknown Text", v3);
        if ( *(_DWORD *)(v3 + 4) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v3 + 4) + 20))(25, "Unknown Text", v3);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v3 + 20))(v3, 25, "Unknown Text", v3);
    }
  }
  else
  {
    GameFrameWork::On_NC_MAP_WING_SAVE_REQ((GameFrameWork *)v1->m_pkFrameWork);
    InvWin::SetLock(*((InvWin **)v1->m_pkFrameWork[19].m_BackFrameID + v1->m_uiLockInvPos + 87), 0);
  }
}

//----- (005ADD40) --------------------------------------------------------
void __thiscall WingStoneWin::ChoiceList(WingStoneWin *this, unsigned int uiParam)
{
  WingStoneWin *v2; // esi@1
  int v3; // eax@2
  char v4; // cl@3
  NiUnsharedGeometryGroup *v5; // eax@4
  char *v6; // ecx@4
  bool v7; // cf@5
  char v8; // dl@7
  int v9; // eax@9
  int v10; // eax@11
  char v11; // cl@12
  NiUnsharedGeometryGroup *v12; // eax@13
  char *v13; // ecx@13
  char v14; // dl@16
  int v15; // eax@20
  char v16; // cl@21
  NiUnsharedGeometryGroup *v17; // eax@22
  char *v18; // ecx@22
  char v19; // dl@25
  int v20; // eax@29
  char v21; // cl@30
  NiUnsharedGeometryGroup *v22; // eax@31
  char *v23; // ecx@31
  char v24; // dl@34
  int v25; // eax@38
  char v26; // cl@39
  NiUnsharedGeometryGroup *v27; // eax@40
  char *v28; // ecx@40
  char v29; // dl@43
  char temp[256]; // [sp+8h] [bp-104h]@3

  v2 = this;
  if ( uiParam )
  {
    switch ( uiParam )
    {
      case 1u:
        this->m_uiMemorySlot = PopupMenuTemplate::ms_uiWingStoneMemorySlot1;
        v10 = 0;
        do
        {
          v11 = (char)(&PopupMenuTemplate::ms_acChoiceMapNameSlot1)[v10];
          temp[v10++] = v11;
        }
        while ( v11 );
        ((void (__stdcall *)(char *))v2->m_pkChoicePlace->vfptr[118].__vecDelDtor)(temp);
        v2->m_bFirstGoddessWingUse = 1;
        v2->m_smiMapID = PopupMenuTemplate::ms_smiMapID1;
        v12 = TextData::Get(0x9BEBE5D9);
        v13 = temp;
        while ( 1 )
        {
          v7 = (unsigned __int8)*v13 < LOBYTE(v12->vfptr);
          if ( *v13 != LOBYTE(v12->vfptr) )
            break;
          if ( *v13 )
          {
            v14 = v13[1];
            v7 = (unsigned __int8)v14 < BYTE1(v12->vfptr);
            if ( v14 != BYTE1(v12->vfptr) )
              goto LABEL_46;
            v13 += 2;
            v12 = (NiUnsharedGeometryGroup *)((char *)v12 + 2);
            if ( v14 )
              continue;
          }
          v9 = 0;
          goto LABEL_47;
        }
        break;
      case 2u:
        this->m_uiMemorySlot = PopupMenuTemplate::ms_uiWingStoneMemorySlot2;
        v15 = 0;
        do
        {
          v16 = (char)(&PopupMenuTemplate::ms_acChoiceMapNameSlot2)[v15];
          temp[v15++] = v16;
        }
        while ( v16 );
        ((void (__stdcall *)(char *))v2->m_pkChoicePlace->vfptr[118].__vecDelDtor)(temp);
        v2->m_bFirstGoddessWingUse = 1;
        v2->m_smiMapID = PopupMenuTemplate::ms_smiMapID2;
        v17 = TextData::Get(0x9BEBE5D9);
        v18 = temp;
        while ( 1 )
        {
          v7 = (unsigned __int8)*v18 < LOBYTE(v17->vfptr);
          if ( *v18 != LOBYTE(v17->vfptr) )
            break;
          if ( *v18 )
          {
            v19 = v18[1];
            v7 = (unsigned __int8)v19 < BYTE1(v17->vfptr);
            if ( v19 != BYTE1(v17->vfptr) )
              goto LABEL_46;
            v18 += 2;
            v17 = (NiUnsharedGeometryGroup *)((char *)v17 + 2);
            if ( v19 )
              continue;
          }
          v9 = 0;
          goto LABEL_47;
        }
        break;
      case 3u:
        this->m_uiMemorySlot = PopupMenuTemplate::ms_uiWingStoneMemorySlot3;
        v20 = 0;
        do
        {
          v21 = (char)(&PopupMenuTemplate::ms_acChoiceMapNameSlot3)[v20];
          temp[v20++] = v21;
        }
        while ( v21 );
        ((void (__stdcall *)(_DWORD))v2->m_pkChoicePlace->vfptr[118].__vecDelDtor)(temp);
        v2->m_bFirstGoddessWingUse = 1;
        v2->m_smiMapID = PopupMenuTemplate::ms_smiMapID3;
        v22 = TextData::Get(0x9BEBE5D9);
        v23 = temp;
        while ( 1 )
        {
          v7 = (unsigned __int8)*v23 < LOBYTE(v22->vfptr);
          if ( *v23 != LOBYTE(v22->vfptr) )
            break;
          if ( *v23 )
          {
            v24 = v23[1];
            v7 = (unsigned __int8)v24 < BYTE1(v22->vfptr);
            if ( v24 != BYTE1(v22->vfptr) )
              goto LABEL_46;
            v23 += 2;
            v22 = (NiUnsharedGeometryGroup *)((char *)v22 + 2);
            if ( v24 )
              continue;
          }
          v9 = 0;
          goto LABEL_47;
        }
        break;
      default:
        if ( uiParam != 4 )
          return;
        this->m_uiMemorySlot = PopupMenuTemplate::ms_uiWingStoneMemorySlot4;
        v25 = 0;
        do
        {
          v26 = (char)(&PopupMenuTemplate::ms_acChoiceMapNameSlot4)[v25];
          temp[v25++] = v26;
        }
        while ( v26 );
        ((void (__stdcall *)(_DWORD))v2->m_pkChoicePlace->vfptr[118].__vecDelDtor)(temp);
        v2->m_bFirstGoddessWingUse = 1;
        v2->m_smiMapID = PopupMenuTemplate::ms_smiMapID4;
        v27 = TextData::Get(0x9BEBE5D9);
        v28 = temp;
        while ( 1 )
        {
          v7 = (unsigned __int8)*v28 < LOBYTE(v27->vfptr);
          if ( *v28 != LOBYTE(v27->vfptr) )
            break;
          if ( *v28 )
          {
            v29 = v28[1];
            v7 = (unsigned __int8)v29 < BYTE1(v27->vfptr);
            if ( v29 != BYTE1(v27->vfptr) )
              goto LABEL_46;
            v28 += 2;
            v27 = (NiUnsharedGeometryGroup *)((char *)v27 + 2);
            if ( v29 )
              continue;
          }
          v9 = 0;
          goto LABEL_47;
        }
        break;
    }
  }
  else
  {
    this->m_uiMemorySlot = PopupMenuTemplate::ms_uiWingStoneMemorySlot0;
    v3 = 0;
    do
    {
      v4 = (char)(&PopupMenuTemplate::ms_acChoiceMapNameSlot0)[v3];
      temp[v3++] = v4;
    }
    while ( v4 );
    ((void (__stdcall *)(_DWORD))v2->m_pkChoicePlace->vfptr[118].__vecDelDtor)(temp);
    v2->m_bFirstGoddessWingUse = 1;
    v2->m_smiMapID = PopupMenuTemplate::ms_smiMapID0;
    v5 = TextData::Get(0x9BEBE5D9);
    v6 = temp;
    while ( 1 )
    {
      v7 = (unsigned __int8)*v6 < LOBYTE(v5->vfptr);
      if ( *v6 != LOBYTE(v5->vfptr) )
        break;
      if ( *v6 )
      {
        v8 = v6[1];
        v7 = (unsigned __int8)v8 < BYTE1(v5->vfptr);
        if ( v8 != BYTE1(v5->vfptr) )
          break;
        v6 += 2;
        v5 = (NiUnsharedGeometryGroup *)((char *)v5 + 2);
        if ( v8 )
          continue;
      }
      v9 = 0;
      goto LABEL_47;
    }
  }
LABEL_46:
  v9 = -v7 - (v7 - 1);
LABEL_47:
  if ( !v9 )
    v2->m_bCheckMemory = 1;
}
// A710A8: using guessed type unsigned int PopupMenuTemplate::ms_uiWingStoneMemorySlot0;
// A710AC: using guessed type unsigned int PopupMenuTemplate::ms_uiWingStoneMemorySlot1;
// A710B0: using guessed type unsigned int PopupMenuTemplate::ms_uiWingStoneMemorySlot2;
// A710B4: using guessed type unsigned int PopupMenuTemplate::ms_uiWingStoneMemorySlot3;
// A710B8: using guessed type unsigned int PopupMenuTemplate::ms_uiWingStoneMemorySlot4;
// A710BC: using guessed type unsigned __int16 PopupMenuTemplate::ms_smiMapID0;
// A710C0: using guessed type unsigned __int16 PopupMenuTemplate::ms_smiMapID1;
// A710C4: using guessed type unsigned __int16 PopupMenuTemplate::ms_smiMapID2;
// A710C8: using guessed type unsigned __int16 PopupMenuTemplate::ms_smiMapID3;
// A710CC: using guessed type unsigned __int16 PopupMenuTemplate::ms_smiMapID4;
// A8CE60: using guessed type char *PopupMenuTemplate::ms_acChoiceMapNameSlot4;
// A8CF60: using guessed type char *PopupMenuTemplate::ms_acChoiceMapNameSlot3;
// A8D060: using guessed type char *PopupMenuTemplate::ms_acChoiceMapNameSlot2;
// A8D160: using guessed type char *PopupMenuTemplate::ms_acChoiceMapNameSlot1;
// A8D260: using guessed type char *PopupMenuTemplate::ms_acChoiceMapNameSlot0;

//----- (005AE090) --------------------------------------------------------
void __thiscall WingStoneWin::WingStoneWin(WingStoneWin *this)
{
  WingStoneWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&WingStoneWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&WingStoneWin::`vftable'{for `IDirectMessenger'};
  `eh vector constructor iterator'(
    v1->m_apkTextWin,
    4u,
    3,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_dMapX = 0.0;
  v1->m_dMapY = 0.0;
  v1->m_pkItemUseExposition = 0;
  v1->m_pkItemIconWin = 0;
  v1->m_pkChoicePlace = 0;
  v1->m_pkPopupMenuWin = 0;
  v1->m_pkEditWin = 0;
  v1->m_pkPgWinCloseBut = 0;
  v1->m_pkItemInfo = 0;
  v1->m_uiLockInvPos = 0;
  *(_DWORD *)&v1->m_bCheckPossibility = 0;
  v1->m_uiMemorySlot = 0;
  v1->WingStoneID = 30068;
  v1->m_smiMapID = 0;
}
// 9A88C4: using guessed type void (__thiscall *WingStoneWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A88E4: using guessed type int (__thiscall *WingStoneWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005AE160) --------------------------------------------------------
WingStoneWin *__cdecl WingStoneWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  WingStoneWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1A0u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    WingStoneWin::WingStoneWin((WingStoneWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (WingStoneWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (005AE290) --------------------------------------------------------
char __thiscall WingStoneWin::Create(WingStoneWin *this, PgFrameWork *pkFrameWork)
{
  WingStoneWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  int v8; // edi@10
  PgSprData *v9; // eax@10
  PgFont *v10; // eax@11
  PgWinText *v11; // ebx@11
  NiUnsharedGeometryGroup *v12; // eax@13
  PgSprData *v13; // ebx@14
  PgSprData *v14; // ST40_4@14
  int v15; // ebx@14
  PgSprData *v16; // eax@14
  ItemInfo *v17; // eax@14
  char *v18; // eax@14
  int v19; // eax@18
  unsigned int v20; // ebx@18
  PgFont *v21; // eax@18
  PgWinText *v22; // eax@18
  NiUnsharedGeometryGroup *v23; // eax@19
  PgWinText *v24; // ecx@19
  NiRefObjectVtbl *v25; // ebx@21
  NiUnsharedGeometryGroup *v26; // eax@21
  NiRefObjectVtbl *v27; // ebx@26
  D3DXCOLOR *v28; // eax@26
  PgSprData *v29; // ebx@26
  NiPointer<PgSprData::PgHitTester> *v30; // ecx@26
  unsigned int v31; // ebx@26
  PgFont *v32; // eax@26
  PgWinText *v33; // eax@26
  PgSprData *v34; // ebx@26
  NiPointer<PgSprData::PgHitTester> *v35; // edx@26
  unsigned int v36; // ebx@26
  PgFont *v37; // eax@26
  PgWinText *v38; // ebx@26
  NiUnsharedGeometryGroup *v39; // eax@28
  PgSprData *v40; // ebx@29
  NiPointer<PgSprData::PgHitTester> *v41; // edx@29
  unsigned int v42; // ebx@29
  PgFont *v43; // eax@29
  PgWinText *v44; // ebx@29
  NiUnsharedGeometryGroup *v45; // eax@31
  PgSprData *v46; // ebx@32
  NiPointer<PgSprData::PgHitTester> *v47; // edx@32
  unsigned int v48; // ebx@32
  PgFont *v49; // eax@32
  PgWinText *v50; // edi@32
  NiRefObjectVtbl *v51; // ebx@34
  NiUnsharedGeometryGroup *v52; // eax@34
  D3DXCOLOR result; // [sp+64h] [bp-34h]@26
  int iYOff; // [sp+74h] [bp-24h]@10
  unsigned int uiWidth; // [sp+78h] [bp-20h]@10
  unsigned int uiHeight; // [sp+7Ch] [bp-1Ch]@10
  NiPointer<NiNode> spNode; // [sp+80h] [bp-18h]@1
  int uiLeft; // [sp+84h] [bp-14h]@4
  int uiTop; // [sp+88h] [bp-10h]@4
  int v60; // [sp+94h] [bp-4h]@1
  Item *pkItema; // [sp+A0h] [bp+8h]@13
  Item *pkItem; // [sp+A0h] [bp+8h]@14
  Item *pkItemb; // [sp+A0h] [bp+8h]@26
  Item *pkItemc; // [sp+A0h] [bp+8h]@26
  Item *pkItemd; // [sp+A0h] [bp+8h]@28
  Item *pkIteme; // [sp+A0h] [bp+8h]@29
  Item *pkItemf; // [sp+A0h] [bp+8h]@31
  Item *pkItemg; // [sp+A0h] [bp+8h]@32

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v60 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\GoddessWing.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "WingStoneWin", 0)
    || (v8 = uiLeft,
        iYOff = uiTop,
        v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0),
        PgWinSpr::CreateWin(uiLeft - v8, uiTop, v9, (PgWin *)&v2->vfptr, 0, 0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "WinTitle",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight)) )
  {
    v6 = spNode.m_pObject;
    v60 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v10 = Font::Get(0);
  v11 = PgWinText::CreateWin(uiLeft - v8, uiTop, uiWidth, uiHeight, v10, (PgWin *)&v2->vfptr, 0, 0);
  v11->vfptr[122].__vecDelDtor((NiRefObject *)v11, 5u);
  v11->vfptr[117].__vecDelDtor((NiRefObject *)v11, (unsigned int)&Color::m_kDxWinTitleColor);
  if ( TextData::Get(0xF00AF4F0) )
  {
    pkItema = (Item *)v11->vfptr;
    v12 = TextData::Get(0xF00AF4F0);
    ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkItema[3].m_pkInfo)(v11, v12);
  }
  else
  {
    v11->vfptr[118].__vecDelDtor((NiRefObject *)v11, (unsigned int)"GoddessWingWin");
  }
  v11->vfptr[60].__vecDelDtor((NiRefObject *)v11, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  v14 = v13;
  v15 = iYOff;
  PgWinBut::CreateWin(uiLeft - v8, uiTop - iYOff, v14, (PgWin *)&v2->vfptr, 5u, 0, 0);
  PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Slot00", &uiLeft, &uiTop, &uiWidth, &uiHeight);
  v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Slot00", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - iYOff, v16, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkItemIconWin = ItemIcon::CreateWin(uiLeft - v8, uiTop - iYOff, (PgWin *)&v2->vfptr);
  v17 = ItemInfoTab::GetByInxName("WingStone01_1");
  v2->m_pkItemInfo = v17;
  pkItem = Inventory::GetItemByID(&g_kInventory, v17->ID);
  ItemIcon::SetItemAsID(v2->m_pkItemIconWin, v8, v2->WingStoneID);
  v18 = fs("%d\n", 0);
  iYOff = (int)v2->m_pkItemIconWin;
  (*(void (__stdcall **)(char *))(**(_DWORD **)(iYOff + 380) + 472))(v18);
  (*(void (__stdcall **)(signed int))(**(_DWORD **)(iYOff + 380) + 256))(1);
  if ( pkItem )
    ItemIcon::SetItem(v2->m_pkItemIconWin, pkItem, 1);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "Textbox_Exp",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
  {
    v60 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  iYOff = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Textbox_Exp", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - v15, (PgSprData *)iYOff, (PgWin *)&v2->vfptr, 0, 0);
  v19 = **(_DWORD **)(iYOff + 36);
  v20 = *(_DWORD *)(v19 + 24);
  iYOff = *(_DWORD *)(v19 + 20);
  v21 = Font::Get(0);
  v22 = PgWinText::CreateWin(uiLeft - v8, uiTop + 1, iYOff, v20, v21, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkItemUseExposition = v22;
  v22->vfptr[122].__vecDelDtor((NiRefObject *)v22, 5u);
  if ( !pkItem )
  {
    if ( !LOBYTE(TextData::Get(0x37388C78u)->vfptr) )
    {
      v2->m_pkItemUseExposition->vfptr[118].__vecDelDtor(
        (NiRefObject *)v2->m_pkItemUseExposition,
        (unsigned int)"Unknown Text");
      goto LABEL_26;
    }
    v25 = v2->m_pkItemUseExposition->vfptr;
    v26 = TextData::Get(0x37388C78u);
LABEL_25:
    v25[118].__vecDelDtor((NiRefObject *)v2->m_pkItemUseExposition, (unsigned int)v26);
    goto LABEL_26;
  }
  v23 = TextData::Get(0x91A78CD3);
  v24 = v2->m_pkItemUseExposition;
  if ( LOBYTE(v23->vfptr) )
  {
    v25 = v24->vfptr;
    v26 = TextData::Get(0x91A78CD3);
    goto LABEL_25;
  }
  ((void (__stdcall *)(const char *))v24->vfptr[118].__vecDelDtor)("Unknown Text");
LABEL_26:
  v27 = v2->m_pkItemUseExposition->vfptr;
  v28 = Color::GetDxColor(&result, -1, -1, -1, -1);
  v27[117].__vecDelDtor((NiRefObject *)v2->m_pkItemUseExposition, (unsigned int)v28);
  v29 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ListNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v29, (NiAVObject *)&spNode.m_pObject->vfptr, "ListClick");
  PgSprData::Add(v29, (NiAVObject *)&spNode.m_pObject->vfptr, "ListOver");
  PgWinBut::CreateWin(uiLeft, uiTop, v29, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v30 = v29->m_akHitTester.m_pBase;
  v31 = v30->m_pObject->m_uiHeight;
  pkItemb = (Item *)v30->m_pObject->m_uiWidth;
  v32 = Font::Get(0);
  v33 = PgWinText::CreateWin(uiLeft, uiTop + 3, (unsigned int)pkItemb, v31, v32, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkChoicePlace = v33;
  v33->vfptr[60].__vecDelDtor((NiRefObject *)v33, 0);
  v34 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor02", &uiLeft, &uiTop, 0);
  PgSprData::Add(v34, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick02");
  PgSprData::Add(v34, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver02");
  PgWinBut::CreateWin(uiLeft - v8, uiTop, v34, (PgWin *)&v2->vfptr, 2u, 0, 0);
  v35 = v34->m_akHitTester.m_pBase;
  v36 = v35->m_pObject->m_uiHeight;
  pkItemc = (Item *)v35->m_pObject->m_uiWidth;
  v37 = Font::Get(0);
  v38 = PgWinText::CreateWin(uiLeft - v8, uiTop + 1, (unsigned int)pkItemc, v36, v37, (PgWin *)&v2->vfptr, 0, 0);
  v38->vfptr[122].__vecDelDtor((NiRefObject *)v38, 5u);
  if ( LOBYTE(TextData::Get(0x9DBEF9F3)->vfptr) )
  {
    pkItemd = (Item *)v38->vfptr;
    v39 = TextData::Get(0x9DBEF9F3);
    ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkItemd[3].m_pkInfo)(v38, v39);
  }
  else
  {
    v38->vfptr[118].__vecDelDtor((NiRefObject *)v38, (unsigned int)&off_9A87D4);
  }
  v38->vfptr[60].__vecDelDtor((NiRefObject *)v38, 0);
  v40 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor01", &uiLeft, &uiTop, 0);
  PgSprData::Add(v40, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick01");
  PgSprData::Add(v40, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver01");
  PgWinBut::CreateWin(uiLeft - v8, uiTop, v40, (PgWin *)&v2->vfptr, 3u, 0, 0);
  v41 = v40->m_akHitTester.m_pBase;
  v42 = v41->m_pObject->m_uiHeight;
  pkIteme = (Item *)v41->m_pObject->m_uiWidth;
  v43 = Font::Get(0);
  v44 = PgWinText::CreateWin(uiLeft - v8, uiTop + 1, (unsigned int)pkIteme, v42, v43, (PgWin *)&v2->vfptr, 0, 0);
  v44->vfptr[122].__vecDelDtor((NiRefObject *)v44, 5u);
  if ( LOBYTE(TextData::Get(0xA9A2E0DE)->vfptr) )
  {
    pkItemf = (Item *)v44->vfptr;
    v45 = TextData::Get(0xA9A2E0DE);
    ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkItemf[3].m_pkInfo)(v44, v45);
  }
  else
  {
    v44->vfptr[118].__vecDelDtor((NiRefObject *)v44, (unsigned int)"Save Position");
  }
  v44->vfptr[60].__vecDelDtor((NiRefObject *)v44, 0);
  v46 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor03", &uiLeft, &uiTop, 0);
  PgSprData::Add(v46, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick03");
  PgSprData::Add(v46, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver03");
  PgWinBut::CreateWin(uiLeft - v8, uiTop, v46, (PgWin *)&v2->vfptr, 4u, 0, 0);
  v47 = v46->m_akHitTester.m_pBase;
  v48 = v47->m_pObject->m_uiHeight;
  pkItemg = (Item *)v47->m_pObject->m_uiWidth;
  v49 = Font::Get(0);
  v50 = PgWinText::CreateWin(uiLeft - v8, uiTop + 1, (unsigned int)pkItemg, v48, v49, (PgWin *)&v2->vfptr, 0, 0);
  v50->vfptr[122].__vecDelDtor((NiRefObject *)v50, 5u);
  if ( LOBYTE(TextData::Get(0xF2073F2E)->vfptr) )
  {
    v51 = v50->vfptr;
    v52 = TextData::Get(0xF2073F2E);
    v51[118].__vecDelDtor((NiRefObject *)v50, (unsigned int)v52);
  }
  else
  {
    v50->vfptr[118].__vecDelDtor((NiRefObject *)v50, (unsigned int)"cancel");
  }
  v50->vfptr[60].__vecDelDtor((NiRefObject *)v50, 0);
  ((void (__thiscall *)(WingStoneWin *))v2->vfptr[59].__vecDelDtor)(v2);
  v60 = -1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
  return 1;
}
// 9A87D4: using guessed type void *off_9A87D4;
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005AEAD0) --------------------------------------------------------
void __thiscall WingStoneWin::InitInformation(WingStoneWin *this)
{
  WingStoneWin *v1; // ebx@1
  ItemInfo *v2; // eax@2
  Item *v3; // eax@2
  unsigned __int16 v4; // si@4
  NiRefObjectVtbl **v5; // esi@5
  NiRefObjectVtbl *v6; // edi@5
  char *v7; // eax@5
  char *v8; // eax@5
  char *v9; // eax@6
  char *v10; // edx@6
  char v11; // cl@7
  char *v12; // eax@8
  char *v13; // edx@8
  char v14; // cl@9
  unsigned int v15; // eax@10
  char *v16; // edi@10
  char v17; // cl@11
  SHINE_ITEM_STRUCT pkShineItemStruct; // [sp+4h] [bp-ACh]@3
  char acText[32]; // [sp+6Ch] [bp-44h]@6
  char acText2[32]; // [sp+8Ch] [bp-24h]@8

  v1 = this;
  if ( !this->m_bFirstGoddessWingUse )
  {
    v2 = ItemInfoTab::GetByInxName("GoddessWing");
    v3 = Inventory::GetItemByID(&g_kInventory, v2->ID);
    if ( v3 )
    {
      qmemcpy(&pkShineItemStruct, &v3->m_kStruct, sizeof(pkShineItemStruct));
      if ( (unsigned __int8)(*(_DWORD *)&pkShineItemStruct.itemid >> 16) )
      {
        v4 = pkShineItemStruct.itemattr.furniture.furnicherID;
        if ( pkShineItemStruct.itemattr.furniture.furnicherID == -1 )
        {
          v5 = &v1->m_pkChoicePlace->vfptr;
          v6 = *v5;
          v7 = (char *)TextData::Get(0x4E3E2E25u);
          v8 = fs(v7, 1);
          v6[118].__vecDelDtor((NiRefObject *)v5, (unsigned int)v8);
          v1->m_smiMapID = -1;
        }
        else
        {
          v9 = MapInfoTab::GetByMapName(pkShineItemStruct.itemattr.furniture.furnicherID)->Name;
          v10 = (char *)(acText - v9);
          do
          {
            v11 = *v9;
            v9[(_DWORD)v10] = *v9;
            ++v9;
          }
          while ( v11 );
          v1->m_smiMapID = v4;
          v12 = fs(" %d. ", 1);
          v13 = (char *)(acText2 - v12);
          do
          {
            v14 = *v12;
            v12[(_DWORD)v13] = *v12;
            ++v12;
          }
          while ( v14 );
          v15 = strlen(acText) + 1;
          v16 = &acText[31];
          do
            v17 = (v16++)[1];
          while ( v17 );
          qmemcpy(v16, acText, v15);
          ((void (__stdcall *)(_DWORD))v1->m_pkChoicePlace->vfptr[118].__vecDelDtor)(acText2);
        }
        v1->m_uiMemorySlot = 0;
      }
    }
  }
}

//----- (005AEC30) --------------------------------------------------------
void __thiscall WingStoneWin::SetMapCoordinate(WingStoneWin *this, unsigned __int16 id)
{
  WingStoneWin *v2; // ebx@1
  ItemInfo *v3; // eax@1
  Item *v4; // eax@1
  signed int v5; // eax@2
  char *v6; // ecx@3
  int v7; // eax@8
  double v8; // st7@8
  unsigned int v9; // eax@8
  SHINE_ITEM_STRUCT kStruct; // [sp+8h] [bp-6Ch]@2

  v2 = this;
  v3 = ItemInfoTab::GetByInxName("GoddessWing");
  v4 = Inventory::GetItemByID(&g_kInventory, v3->ID);
  if ( v4 )
  {
    qmemcpy(&kStruct, &v4->m_kStruct, sizeof(kStruct));
    v5 = 0;
    if ( (unsigned __int8)(*(_DWORD *)&kStruct.itemid >> 16) )
    {
      v6 = &kStruct.itemattr.weapon.strengthen;
      while ( v5 != v2->m_uiMemorySlot || id != *(_WORD *)v6 )
      {
        ++v5;
        v6 += 10;
        if ( v5 >= (unsigned __int8)kStruct.itemattr.blot.lot )
          return;
      }
      v7 = 10 * v5;
      v8 = (double)*(unsigned int *)((char *)&kStruct.itemattr.Capsule.content.dwrdkey[0] + v7 + 3);
      v9 = *(unsigned int *)((char *)&kStruct.itemattr.Capsule.content.dwrdkey[1] + v7 + 3);
      v2->m_dMapX = v8;
      v2->m_dMapY = (double)v9;
    }
  }
}

//----- (005AED10) --------------------------------------------------------
void __thiscall WingStoneWin::SearchMapID(WingStoneWin *this, unsigned int MemorySlot)
{
  WingStoneWin *v2; // ebx@1
  ItemInfo *v3; // eax@1
  Item *v4; // eax@1
  signed int v5; // eax@2
  unsigned __int16 v6; // cx@3
  unsigned __int16 v7; // dx@3
  unsigned __int16 v8; // si@3
  SHINE_ITEM_STRUCT kStruct; // [sp+4h] [bp-6Ch]@2

  v2 = this;
  v3 = ItemInfoTab::GetByInxName("GoddessWing");
  v4 = Inventory::GetItemByID(&g_kInventory, v3->ID);
  if ( v4 )
  {
    qmemcpy(&kStruct, &v4->m_kStruct, sizeof(kStruct));
    v5 = 0;
    if ( (unsigned __int8)(*(_DWORD *)&kStruct.itemid >> 16) )
    {
      v6 = *(_WORD *)((char *)&kStruct.itemattr.Bracelet + 41);
      v7 = *(_WORD *)(&kStruct.itemattr.GBCoin + 31);
      v8 = *(_WORD *)(&kStruct.itemattr.upgradebluegem + 21);
      do
      {
        if ( v5 == MemorySlot )
        {
          switch ( v5 )
          {
            case 0:
              PopupMenuTemplate::ms_smiMapID0 = kStruct.itemattr.furniture.furnicherID;
              v2->m_smiMapID = kStruct.itemattr.furniture.furnicherID;
              break;
            case 1:
              PopupMenuTemplate::ms_smiMapID1 = *(_WORD *)((char *)&kStruct.itemattr.decorate + 11);
              v2->m_smiMapID = *(_WORD *)((char *)&kStruct.itemattr.decorate + 11);
              break;
            case 2:
              PopupMenuTemplate::ms_smiMapID2 = v8;
              v2->m_smiMapID = v8;
              break;
            case 3:
              PopupMenuTemplate::ms_smiMapID3 = v7;
              v2->m_smiMapID = v7;
              break;
            case 4:
              PopupMenuTemplate::ms_smiMapID4 = v6;
              v2->m_smiMapID = v6;
              break;
            default:
              break;
          }
        }
        ++v5;
      }
      while ( v5 < (unsigned __int8)kStruct.itemattr.blot.lot );
    }
  }
}
// A710BC: using guessed type unsigned __int16 PopupMenuTemplate::ms_smiMapID0;
// A710C0: using guessed type unsigned __int16 PopupMenuTemplate::ms_smiMapID1;
// A710C4: using guessed type unsigned __int16 PopupMenuTemplate::ms_smiMapID2;
// A710C8: using guessed type unsigned __int16 PopupMenuTemplate::ms_smiMapID3;
// A710CC: using guessed type unsigned __int16 PopupMenuTemplate::ms_smiMapID4;

//----- (005AEE10) --------------------------------------------------------
void __thiscall WingStoneWin::OnCmdMapInfo(WingStoneWin *this)
{
  WingStoneWin *v1; // esi@1
  unsigned __int16 v2; // ax@1
  char *v3; // esi@2
  NiUnsharedGeometryGroup *v4; // edi@2

  v1 = this;
  v2 = this->m_smiMapID;
  if ( v2 == -1 )
  {
    v3 = (char *)&this->vfptr;
    v4 = TextData::Get(0x3E4F2E49u);
    if ( *((_DWORD *)v3 + 1) )
    {
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v3 + 1) + 4))(25, v4, v3);
      if ( *((_DWORD *)v3 + 1) )
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v3 + 1) + 20))(25, v4, v3);
    }
    (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v3 + 20))(v3, 25, v4, v3);
  }
  else
  {
    WingStoneWin::SetMapCoordinate(this, v2);
    WingStoneMapWin::SetLoadMap(
      (WingStoneMapWin *)v1->m_pkFrameWork[17].vfptr,
      v1->m_smiMapID,
      v1->m_dMapX,
      v1->m_dMapY);
    if ( GameFrameWork::OpenWingStoneMapWin((GameFrameWork *)v1->m_pkFrameWork) )
      v1->m_bCheckOpenMap = 1;
  }
}

//----- (005AEED0) --------------------------------------------------------
void __userpurge WingStoneWin::UpdateMeWin(WingStoneWin *this@<ecx>, int a2@<edi>, float fCurTime)
{
  WingStoneWin *v3; // ebx@1
  ItemInfo *v4; // edx@1
  Item *v5; // eax@1
  char *v6; // eax@6
  ItemIcon *v7; // esi@6
  PROTO_NC_CHAR_BASE_CMD::LoginLocation *v8; // eax@9
  char *v9; // eax@9
  char *v10; // edx@9
  char v11; // cl@10
  char *v12; // eax@11
  char *v13; // edx@11
  char v14; // cl@12
  unsigned int v15; // eax@13
  char *v16; // edi@13
  char v17; // cl@14
  PgFrameWork *v18; // edx@15
  char acText[32]; // [sp+8h] [bp-44h]@9
  char acText2[32]; // [sp+28h] [bp-24h]@11

  v3 = this;
  v4 = this->m_pkItemInfo;
  this->m_pkPopupMenuWin = (PopupMenuWin *)this->m_pkFrameWork[26].m_kMsgQ.m_uiTail;
  v5 = Inventory::GetItemByID(&g_kInventory, v4->ID);
  if ( v5 )
  {
    ItemIcon::SetItem(v3->m_pkItemIconWin, v5, 1);
    if ( !LOBYTE(TextData::Get(0x91A78CD3)->vfptr) )
      ((void (__stdcall *)(_DWORD))v3->m_pkItemUseExposition->vfptr[118].__vecDelDtor)("Unknown Text");
  }
  else
  {
    if ( !LOBYTE(TextData::Get(0x37388C78u)->vfptr) )
      ((void (__stdcall *)(_DWORD))v3->m_pkItemUseExposition->vfptr[118].__vecDelDtor)("Unknown Text");
    ItemIcon::SetItemAsID(v3->m_pkItemIconWin, a2, v3->WingStoneID);
    v6 = fs("%d\n", 0);
    v7 = v3->m_pkItemIconWin;
    ((void (__stdcall *)(_DWORD))v7->m_pkLotText->vfptr[118].__vecDelDtor)(v6);
    ((void (__stdcall *)(_DWORD))v7->m_pkLotText->vfptr[64].__vecDelDtor)(1);
  }
  if ( v3->m_bCheckPossibility == 1 && LOBYTE(v3->m_pkFrameWork[4].vfptr) )
  {
    v8 = User::GetMainCharLoginMapName(&g_kUser);
    v9 = MapInfoTab::GetByMapName(&v8->currentmap)->Name;
    v10 = (char *)(acText - v9);
    do
    {
      v11 = *v9;
      v9[(_DWORD)v10] = *v9;
      ++v9;
    }
    while ( v11 );
    v12 = fs(" %d. ", v3->m_uiMemorySlot + 1);
    v13 = (char *)(acText2 - v12);
    do
    {
      v14 = *v12;
      v12[(_DWORD)v13] = *v12;
      ++v12;
    }
    while ( v14 );
    v15 = strlen(acText) + 1;
    v16 = &acText[31];
    do
      v17 = (v16++)[1];
    while ( v17 );
    qmemcpy(v16, acText, v15);
    ((void (__stdcall *)(_DWORD))v3->m_pkChoicePlace->vfptr[118].__vecDelDtor)(acText2);
    WingStoneWin::SearchMapID(v3, v3->m_uiMemorySlot);
    v18 = v3->m_pkFrameWork;
    v3->m_bCheckPossibility = 0;
    LOBYTE(v18[4].vfptr) = 0;
  }
}

//----- (005AF0A0) --------------------------------------------------------
void __thiscall WingStoneWin::OnCommand(WingStoneWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 1u:
      PgFrameWork::AddMsg(this->m_pkFrameWork, 0xECu, 0, 0);
      break;
    case 2u:
      WingStoneWin::OnCmdFlying(this);
      break;
    case 3u:
      WingStoneWin::OnCmdPosiotionMemory(this);
      break;
    case 4u:
      WingStoneWin::OnCmdMapInfo(this);
      break;
    case 5u:
      WingStoneWin::OnCmdClose(this);
      break;
    default:
      return;
  }
}

//----- (005AF110) --------------------------------------------------------
WingStoneWin *__thiscall WingStoneWin::`scalar deleting destructor'(WingStoneWin *this, unsigned int a2)
{
  WingStoneWin *v2; // esi@1

  v2 = this;
  WingStoneWin::~WingStoneWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005AF150) --------------------------------------------------------
void __thiscall WorldMapWin::DirectMessage(WorldMapWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  WorldMapWin *v4; // esi@1
  GameFrameWork *v5; // ecx@1

  v4 = this;
  v5 = (GameFrameWork *)LODWORD(this->m_kLocal.m_Rotate.m_pEntry[1][0]);
  if ( v5 && SLODWORD(v4->m_kWorld.m_Rotate.m_pEntry[1][2]) <= 36 && iMsgTag == 27 && pvBody )
  {
    if ( !*(_DWORD *)pvBody )
      GameFrameWork::NcItemMaplinkScrollReq(v5, SLODWORD(v4->m_kWorld.m_Rotate.m_pEntry[1][2]));
    v4->m_pkToolTipWin = 0;
  }
}

//----- (005AF190) --------------------------------------------------------
char __thiscall WorldMapWin::Create(WorldMapWin *this, PgFrameWork *pkFrameWork)
{
  WorldMapWin *v2; // edi@1
  PgFrameWork *v3; // ebx@1
  NiTexturePalette *v4; // esi@1
  const char *v5; // eax@3
  NiNode *v6; // eax@3
  PgSprData *v7; // eax@4
  unsigned int v8; // esi@5
  PgWinBut **v9; // edi@5
  signed int v10; // ebx@5
  char *v11; // ST10_4@6
  char *v12; // ST0C_4@6
  char *v13; // eax@6
  D3DXCOLOR v14; // ST08_16@7
  PgWinText *v15; // eax@7
  PgWin *v16; // ebx@7
  NiNode *v17; // esi@11
  signed int v19; // esi@15
  int v20; // edi@15
  NiPixelData *v21; // eax@17
  char *v22; // ST10_4@19
  char *v23; // eax@19
  const char *v24; // eax@19
  NiPixelData *v25; // ebx@20
  NiNode *v26; // eax@21
  int *v27; // eax@21
  int v28; // eax@24
  UIUtil ui; // [sp+18h] [bp-40h]@5
  float v30; // [sp+2Ch] [bp-2Ch]@24
  float v31; // [sp+30h] [bp-28h]@24
  float v32; // [sp+34h] [bp-24h]@24
  int uiLeft; // [sp+38h] [bp-20h]@4
  int uiTop; // [sp+3Ch] [bp-1Ch]@4
  NiPointer<NiPixelData> ptr; // [sp+40h] [bp-18h]@17
  PgWin *pkParent; // [sp+44h] [bp-14h]@1
  NiPointer<NiNode> spNode; // [sp+48h] [bp-10h]@1
  int v38; // [sp+54h] [bp-4h]@1

  v2 = this;
  pkParent = (PgWin *)this;
  spNode.m_pObject = 0;
  v3 = pkFrameWork;
  this->m_pkFrameWork = pkFrameWork;
  v4 = pTexturePalette;
  v38 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "Game\\WorldMap.nif");
  PgUtil::LoadNodeNifFile(v5, &spNode, v4);
  v6 = spNode.m_pObject;
  if ( !spNode.m_pObject )
    goto LABEL_10;
  v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v7, 0, v3, "WorldMapWin", 0) )
  {
LABEL_9:
    v6 = spNode.m_pObject;
LABEL_10:
    v38 = -1;
    if ( v6 )
    {
      v17 = v6;
      if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      {
        if ( v17 )
          v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
      }
    }
    return 0;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v38) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, uiLeft, uiTop);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  UIUtil::CreateSpr(&ui, "Plane01", 0);
  UIUtil::CreateSpr(&ui, "Panel02", 0);
  v8 = 1;
  v9 = v2->m_pkMapBtn;
  v10 = 36;
  do
  {
    v11 = fs("WM%.2dClick", v8);
    v12 = fs("WM%.2dOver", v8);
    v13 = fs("WM%.2dNor", v8);
    *v9 = UIUtil::CreateBtn(&ui, v8, v13, v12, v11, 0, 0);
    ++v9;
    ++v8;
    --v10;
  }
  while ( v10 );
  UIUtil::CreateCloseBtn(&ui, "ClsNor", "ClsOver", "ClsClick");
  *(_QWORD *)&v14.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v14.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v15 = UIUtil::CreateTextNoSpr(&ui, "MapName", &byte_9A8B16, v14, 5u);
  v16 = pkParent;
  LODWORD(pkParent[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = v15;
  if ( !v15 )
  {
    LOBYTE(v38) = 0;
    UIUtil::~UIUtil(&ui);
    goto LABEL_9;
  }
  LODWORD(v16[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = UIUtil::CreateSpr(&ui, "Avatar01", 0);
  LODWORD(v16[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = UIUtil::CreateSpr(&ui, "Avatar02", 0);
  v19 = 0;
  v20 = (int)&v16[1].m_kBound.m_kCenter.y;
  while ( 1 )
  {
    v21 = (NiPixelData *)PgWinSpr::CreateWin(0, 0, 1u, 1u, v16, 0, 0);
    ptr.m_pObject = v21;
    if ( v21 )
      InterlockedIncrement((volatile LONG *)&v21->m_uiRefCount);
    LOBYTE(v38) = 2;
    NiPointer<NiActorManager>::operator=((NiPointer<NiPixelData> *)(v20 + 144), &ptr);
    LOBYTE(v38) = 1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&ptr);
    pkFrameWork = 0;
    ++v19;
    LOBYTE(v38) = 3;
    v22 = fs("WM%.2d.nif", v19);
    v23 = Folder::Effect();
    v24 = Folder::Merge(v23, v22);
    PgUtil::LoadNodeNifFile(v24, (NiPointer<NiNode> *)&pkFrameWork, 0);
    if ( !pkFrameWork )
      break;
    v25 = (NiPixelData *)operator new(0x44u);
    ptr.m_pObject = v25;
    LOBYTE(v38) = 4;
    if ( v25 )
    {
      v26 = (NiNode *)NiObject::Clone((NiObject *)pkFrameWork);
      SpEffect::SpEffect((SpEffect *)v25, v26);
    }
    else
    {
      v27 = 0;
    }
    *(_DWORD *)v20 = v27;
    if ( v27 )
    {
      v28 = *v27;
      v30 = 0.0;
      v31 = 0.0;
      *(float *)(v28 + 88) = 0.0;
      v32 = 1000.0;
      *(float *)(v28 + 92) = 0.0;
      *(float *)(v28 + 96) = 1000.0;
      *(_BYTE *)(*(_DWORD *)v20 + 66) = 1;
    }
    LOBYTE(v38) = 1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkFrameWork);
    v20 += 4;
    if ( v19 >= 36 )
    {
      ((void (__cdecl *)(unsigned int, unsigned int, _DWORD, _DWORD))pkParent->vfptr[59].__vecDelDtor)(
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        0.5,
        0.5);
      LOBYTE(v38) = 0;
      UIUtil::~UIUtil(&ui);
      v38 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      return 1;
    }
    v16 = pkParent;
  }
  LOBYTE(v38) = 1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkFrameWork);
  LOBYTE(v38) = 0;
  UIUtil::~UIUtil(&ui);
  v38 = -1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
  return 0;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005AF560) --------------------------------------------------------
void __thiscall WorldMapWin::WorldMapLinkFail(WorldMapWin *this, unsigned __int16 nError, char nLevel)
{
  WorldMapWin *v3; // esi@1
  MapInfo *v4; // edi@1
  GameFrameWork *v5; // esi@5
  NiUnsharedGeometryGroup *v6; // eax@5
  GameFrameWork *v7; // esi@6
  NiUnsharedGeometryGroup *v8; // eax@6
  GameFrameWork *v9; // esi@8
  char *v10; // eax@8
  const char *v11; // eax@8
  GameFrameWork *v12; // esi@10
  char *v13; // eax@10
  const char *v14; // eax@10
  GameFrameWork *v15; // esi@13
  NiUnsharedGeometryGroup *v16; // eax@13
  GameFrameWork *v17; // esi@15
  NiUnsharedGeometryGroup *v18; // eax@15
  unsigned int v19; // [sp-8h] [bp-10h]@9
  unsigned int v20; // [sp-4h] [bp-Ch]@4
  int v21; // [sp-4h] [bp-Ch]@9

  v3 = this;
  v4 = MapInfoTab::GetByLinkIndex(this->m_TargetMap);
  if ( v3->m_TargetMap )
    SpEffect::Start(
      *((SpEffect **)&v3->m_pkMsgBox + v3->m_TargetMap),
      (NiNode *)&v3->m_apkEffect[v3->m_TargetMap + 35]->m_spEffect.m_pObject);
  switch ( nError )
  {
    case 0x3749u:
      v20 = -237123612;
      goto LABEL_15;
    case 0x374Au:
      v5 = (GameFrameWork *)v3->m_pkFrameWork;
      v6 = TextData::Get(0x7FFED6DEu);
      GameFrameWork::AddSysMsg(v5, (const char *)v6);
      return;
    case 0x374Bu:
      v7 = (GameFrameWork *)v3->m_pkFrameWork;
      v8 = TextData::Get(0x85F7D6D1);
      GameFrameWork::AddSysMsg(v7, (const char *)v8);
      return;
    case 0x374Cu:
      v20 = -572080927;
      goto LABEL_15;
    case 0x374Du:
      v9 = (GameFrameWork *)v3->m_pkFrameWork;
      v10 = (char *)TextData3::Get(0xF2DD093F);
      v11 = fs(v10, v4->Name, (unsigned __int8)nLevel);
      GameFrameWork::AddSysMsg(v9, v11);
      return;
    case 0x374Eu:
      v21 = (int)v4->Name;
      v19 = -1900295449;
      goto LABEL_10;
    case 0x374Fu:
      v21 = (int)v4->Name;
      v19 = -1900229913;
LABEL_10:
      v12 = (GameFrameWork *)v3->m_pkFrameWork;
      v13 = (char *)TextData3::Get(v19);
      v14 = fs(v13, v21);
      GameFrameWork::AddSysMsg(v12, v14);
      return;
    case 0x3750u:
      v20 = -421590220;
      goto LABEL_15;
    case 0x3751u:
      v15 = (GameFrameWork *)v3->m_pkFrameWork;
      v16 = TextData::Get(0x226625A6u);
      GameFrameWork::AddSysMsg(v15, (const char *)v16);
      break;
    case 0x3752u:
      v20 = -554973122;
LABEL_15:
      v17 = (GameFrameWork *)v3->m_pkFrameWork;
      v18 = TextData3::Get(v20);
      GameFrameWork::AddSysMsg(v17, (const char *)v18);
      break;
    default:
      return;
  }
}

//----- (005AF6F0) --------------------------------------------------------
void __thiscall WorldMapWin::OnShowWin(WorldMapWin *this)
{
  WorldMapWin *v1; // esi@1
  Name3 *v2; // eax@1
  MapViewInfo *v3; // eax@1
  Name3 *v4; // eax@3
  Name3 *v5; // eax@4
  NiPoint2 *v6; // eax@4
  Name3 *v7; // eax@7
  NiPoint2 *v8; // eax@7
  GameFrameWork *v9; // eax@10
  Name3 result; // [sp+10h] [bp-Ch]@1

  v1 = this;
  v2 = World::GetMapName(&g_kWorld, &result);
  v3 = MapViewInfoTab::GetByMapName(v2);
  if ( v3 )
  {
    if ( v3->WorldMapView )
    {
      v4 = World::GetMapName(&g_kWorld, &result);
      if ( WorldMapAvatarInfoTab::GetByNormalDungeon(v4) )
      {
        ((void (__stdcall *)(_DWORD))v1->m_pkNormalAvatar->vfptr[64].__vecDelDtor)(0);
        v5 = World::GetMapName(&g_kWorld, &result);
        v6 = WorldMapAvatarInfoTab::GetByAvatarPosition(v5);
        if ( v6 )
          PgUtil::SetXYTranslate((NiAVObject *)&v1->m_pkDungeonAvatar->vfptr, v6->x, v6->y);
        ((void (__stdcall *)(_DWORD))v1->m_pkDungeonAvatar->vfptr[64].__vecDelDtor)(1);
      }
      else
      {
        ((void (__stdcall *)(_DWORD))v1->m_pkDungeonAvatar->vfptr[64].__vecDelDtor)(0);
        v7 = World::GetMapName(&g_kWorld, &result);
        v8 = WorldMapAvatarInfoTab::GetByAvatarPosition(v7);
        if ( v8 )
          PgUtil::SetXYTranslate((NiAVObject *)&v1->m_pkNormalAvatar->vfptr, v8->x, v8->y);
        ((void (__stdcall *)(_DWORD))v1->m_pkNormalAvatar->vfptr[64].__vecDelDtor)(1);
      }
    }
    v9 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v9 )
      GameFrameWork::OpenPlayGuideWin(v9, BIL_MAP_5);
  }
}

//----- (005AF820) --------------------------------------------------------
void __thiscall WorldMapWin::~WorldMapWin(WorldMapWin *this)
{
  WorldMapWin *v1; // ebx@1
  SpEffect *v2; // esi@2
  NiNode *v3; // edi@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v4; // ST0C_4@9
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v5; // ST08_4@9
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > result; // [sp+18h] [bp-14h]@1
  SpEffect **v7; // [sp+1Ch] [bp-10h]@1
  int v8; // [sp+28h] [bp-4h]@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&WorldMapWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&WorldMapWin::`vftable'{for `IDirectMessenger'};
  v8 = 0;
  v7 = this->m_apkEffect;
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)36;
  do
  {
    v2 = *v7;
    if ( *v7 )
    {
      NsEffect::~NsEffect(&v2->m_kEffect);
      LOBYTE(v8) = 3;
      ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v2->m_kMarkCheck);
      v3 = v2->m_spEffect.m_pObject;
      LOBYTE(v8) = 2;
      if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      operator delete(v2);
      *v7 = 0;
    }
    ++v7;
    --result._Ptr;
  }
  while ( result._Ptr );
  v4._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapUserLocationView._Myhead;
  v5._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapUserLocationView._Myhead->_Left;
  LOBYTE(v8) = 5;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapUserLocationView,
    &result,
    v5,
    v4);
  operator delete(v1->m_mapUserLocationView._Myhead);
  LOBYTE(v8) = 0;
  `eh vector destructor iterator'(
    v1->m_pAttachEffect,
    4u,
    36,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v8 = -1;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9A8BD8: using guessed type void (__thiscall *WorldMapWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A8BF4: using guessed type int (__thiscall *WorldMapWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005AF940) --------------------------------------------------------
void __thiscall WorldMapWin::OnCommand(WorldMapWin *this, unsigned int wParam, int lParam)
{
  WorldMapWin *v3; // esi@1
  ItemInfo *v4; // edi@1
  MsgBox *v5; // eax@2
  MapInfo *v6; // eax@2
  int v7; // ST04_4@4
  char *v8; // eax@4
  char *v9; // eax@4

  v3 = this;
  this->m_TargetMap = wParam;
  v4 = ItemInfoTab::GetByInxName("WorldLink");
  if ( v4 )
  {
    v5 = MsgBox::Modal(MSGBOX_RANDOMOPTION, &byte_9A8B17);
    v3->m_pkMsgBox = v5;
    ((void (__stdcall *)(_DWORD))v5->vfptr->SetMsgHooker)(&v3->vfptr);
    v6 = MapInfoTab::GetByLinkIndex(v3->m_TargetMap);
    if ( v6 )
    {
      v7 = (int)v6->Name;
      v8 = (char *)TextData3::Get(0x898D669B);
      v9 = fs(v8, v7);
      MsgBox::SetUnderSlotText(v3->m_pkMsgBox, v9);
      MsgBox::SetItemIconByID(v3->m_pkMsgBox, (int)v4, v4->ID);
    }
    else
    {
      MsgBox::SetUnderSlotText(v3->m_pkMsgBox, "Map is currently not available!");
    }
  }
}

//----- (005AFA00) --------------------------------------------------------
void __thiscall WorldMapWin::WorldMapWin(WorldMapWin *this)
{
  WorldMapWin *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,WorldMapWin::UserLocationView *,std::less<int>,std::allocator<std::pair<int const ,WorldMapWin::UserLocationView *> >,0> >::_Node *v2; // eax@1
  std::exception pExceptionObject; // [sp+Ch] [bp-20h]@3
  WorldMapWin *v4; // [sp+18h] [bp-14h]@1
  char *_What; // [sp+1Ch] [bp-10h]@3
  int v6; // [sp+28h] [bp-4h]@1

  v1 = this;
  v4 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v6 = 0;
  v1->vfptr = (NiRefObjectVtbl *)&WorldMapWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&WorldMapWin::`vftable'{for `IDirectMessenger'};
  `eh vector constructor iterator'(
    v1->m_pAttachEffect,
    4u,
    36,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  LOBYTE(v6) = 1;
  v1->m_mapUserLocationView._Mysize = 0;
  v2 = (std::_Tree_nod<std::_Tmap_traits<int,WorldMapWin::UserLocationView *,std::less<int>,std::allocator<std::pair<int const ,WorldMapWin::UserLocationView *> >,0> >::_Node *)operator new(0x18u);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_mapUserLocationView._Myhead = v2;
  v2->_Left = v2;
  v1->m_mapUserLocationView._Myhead->_Parent = v1->m_mapUserLocationView._Myhead;
  v1->m_mapUserLocationView._Myhead->_Right = v1->m_mapUserLocationView._Myhead;
  v1->m_mapUserLocationView._Myhead->_Color = 1;
  v1->m_mapUserLocationView._Myhead->_Isnil = 1;
  v1->m_pkUserLocationView = 0;
  v1->m_uiUserLocationViewCount = 0;
  v1->m_pkMsgBox = 0;
  v1->m_apkEffect[0] = 0;
  v1->m_apkEffect[1] = 0;
  v1->m_apkEffect[2] = 0;
  v1->m_apkEffect[3] = 0;
  v1->m_apkEffect[4] = 0;
  v1->m_apkEffect[5] = 0;
  v1->m_apkEffect[6] = 0;
  v1->m_apkEffect[7] = 0;
  v1->m_apkEffect[8] = 0;
  v1->m_apkEffect[9] = 0;
  v1->m_apkEffect[10] = 0;
  v1->m_apkEffect[11] = 0;
  v1->m_apkEffect[12] = 0;
  v1->m_apkEffect[13] = 0;
  v1->m_apkEffect[14] = 0;
  v1->m_apkEffect[15] = 0;
  v1->m_apkEffect[16] = 0;
  v1->m_apkEffect[17] = 0;
  v1->m_apkEffect[18] = 0;
  v1->m_apkEffect[19] = 0;
  v1->m_apkEffect[20] = 0;
  v1->m_apkEffect[21] = 0;
  v1->m_apkEffect[22] = 0;
  v1->m_apkEffect[23] = 0;
  v1->m_apkEffect[24] = 0;
  v1->m_apkEffect[25] = 0;
  v1->m_apkEffect[26] = 0;
  v1->m_apkEffect[27] = 0;
  v1->m_apkEffect[28] = 0;
  v1->m_apkEffect[29] = 0;
  v1->m_apkEffect[30] = 0;
  v1->m_apkEffect[31] = 0;
  v1->m_apkEffect[32] = 0;
  v1->m_apkEffect[33] = 0;
  v1->m_apkEffect[34] = 0;
  v1->m_apkEffect[35] = 0;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9A8BD8: using guessed type void (__thiscall *WorldMapWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A8BF4: using guessed type int (__thiscall *WorldMapWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005AFBD0) --------------------------------------------------------
WorldMapWin *__cdecl WorldMapWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  WorldMapWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x334u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    WorldMapWin::WorldMapWin((WorldMapWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (WorldMapWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (005AFD00) --------------------------------------------------------
unsigned int __cdecl ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C190: using guessed type int ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::ms_pkTable;

//----- (005AFD20) --------------------------------------------------------
MapInfo *__cdecl MapInfoTab::GetByLinkIndex(WM_Link LinkIndex)
{
  unsigned int v1; // esi@1
  MapInfo *result; // eax@4

  v1 = 0;
  if ( ITableBase<MapInfo,MapInfoTab>::GetTotal() )
  {
    while ( *(_DWORD *)(CDataReader::GetRecord((CDataReader *)(ITableBase<MapInfo,MapInfoTab>::ms_pkTable + 4), v1) + 46) != LinkIndex )
    {
      if ( ++v1 >= ITableBase<MapInfo,MapInfoTab>::GetTotal() )
        goto LABEL_4;
    }
    result = (MapInfo *)CDataReader::GetRecord((CDataReader *)(ITableBase<MapInfo,MapInfoTab>::ms_pkTable + 4), v1);
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}
// A89D38: using guessed type int ITableBase<MapInfo,MapInfoTab>::ms_pkTable;

//----- (005AFD70) --------------------------------------------------------
bool __cdecl WorldMapAvatarInfoTab::GetByNormalDungeon(Name3 *kMapName)
{
  unsigned int v1; // esi@1
  char *v2; // eax@2
  bool result; // al@6

  v1 = 0;
  if ( ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::GetTotal() )
  {
    while ( 1 )
    {
      v2 = CDataReader::GetRecord(
             (CDataReader *)(ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::ms_pkTable + 4),
             v1);
      if ( *(_DWORD *)v2 == kMapName->n3_code[0]
        && *((_DWORD *)v2 + 1) == kMapName->n3_code[1]
        && *((_DWORD *)v2 + 2) == kMapName->n3_code[2] )
      {
        break;
      }
      if ( ++v1 >= ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::GetTotal() )
        goto LABEL_6;
    }
    result = CDataReader::GetRecord(
               (CDataReader *)(ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::ms_pkTable + 4),
               v1)[20] == 1;
  }
  else
  {
LABEL_6:
    result = 0;
  }
  return result;
}
// A8C190: using guessed type int ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::ms_pkTable;

//----- (005AFDE0) --------------------------------------------------------
NiPoint2 *__cdecl WorldMapAvatarInfoTab::GetByAvatarPosition(Name3 *kMapName)
{
  unsigned int v1; // esi@3
  char *v2; // eax@4
  NiPoint2 *result; // eax@8

  if ( !(`WorldMapAvatarInfoTab::GetByAvatarPosition'::`2'::`local static guard' & 1) )
    `WorldMapAvatarInfoTab::GetByAvatarPosition'::`2'::`local static guard' |= 1u;
  v1 = 0;
  if ( ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::GetTotal() )
  {
    while ( 1 )
    {
      v2 = CDataReader::GetRecord(
             (CDataReader *)(ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::ms_pkTable + 4),
             v1);
      if ( *(_DWORD *)v2 == kMapName->n3_code[0]
        && *((_DWORD *)v2 + 1) == kMapName->n3_code[1]
        && *((_DWORD *)v2 + 2) == kMapName->n3_code[2] )
      {
        break;
      }
      if ( ++v1 >= ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::GetTotal() )
        goto LABEL_8;
    }
    `WorldMapAvatarInfoTab::GetByAvatarPosition'::`2'::kAvatarPosition.x = (double)*((unsigned int *)CDataReader::GetRecord((CDataReader *)(ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::ms_pkTable + 4), v1)
                                                                                   + 3);
    `WorldMapAvatarInfoTab::GetByAvatarPosition'::`2'::kAvatarPosition.y = (double)*((unsigned int *)CDataReader::GetRecord((CDataReader *)(ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::ms_pkTable + 4), v1)
                                                                                   + 4);
    result = &`WorldMapAvatarInfoTab::GetByAvatarPosition'::`2'::kAvatarPosition;
  }
  else
  {
LABEL_8:
    result = 0;
  }
  return result;
}
// A8C190: using guessed type int ITableBase<WorldMapAvatarInfo,WorldMapAvatarInfoTab>::ms_pkTable;
// A8E0FC: using guessed type int `WorldMapAvatarInfoTab::GetByAvatarPosition'::`2'::`local static guard';

//----- (005AFE90) --------------------------------------------------------
WorldMapWin *__thiscall WorldMapWin::`scalar deleting destructor'(WorldMapWin *this, unsigned int a2)
{
  WorldMapWin *v2; // esi@1

  v2 = this;
  WorldMapWin::~WorldMapWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005AFEC0) --------------------------------------------------------
void __thiscall OptionBaseWin::OptionBaseWin(OptionBaseWin *this)
{
  OptionBaseWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&OptionBaseWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&OptionBaseWin::`vftable'{for `IDirectMessenger'};
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_ApplyInitDelayed);
  v1->m_iMode = -1;
}
// 9A8F68: using guessed type void (__thiscall *OptionBaseWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A8F84: using guessed type int (__thiscall *OptionBaseWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005AFF30) --------------------------------------------------------
void __thiscall OptionBaseWin::~OptionBaseWin(OptionBaseWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&OptionBaseWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&OptionBaseWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9A8F68: using guessed type void (__thiscall *OptionBaseWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A8F84: using guessed type int (__thiscall *OptionBaseWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005AFF80) --------------------------------------------------------
void OptionBaseWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "Option_common");
}

//----- (005AFFB0) --------------------------------------------------------
void __thiscall OptionBaseWin::ProcessMeInput(OptionBaseWin *this, bool *bHit)
{
  OptionBaseWin *v2; // esi@1

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[78].__vecDelDtor)() )
  {
    if ( dword_B64790 )
      ++dword_B64790;
    if ( PgWin::ms_kbRbutPressed.m_iBool )
      ++PgWin::ms_kbRbutPressed.m_iBool;
    PgWinFrame::ProcessMeInput((PgWinFrame *)&v2->vfptr, bHit);
    PgWin::ms_kbRbutPressed.m_bReserveFalse = 0;
    if ( PgWin::ms_kbRbutPressed.m_iBool )
      --PgWin::ms_kbRbutPressed.m_iBool;
    byte_B6478C = 0;
    if ( dword_B64790 )
      --dword_B64790;
  }
}
// B6478C: using guessed type char byte_B6478C;
// B64790: using guessed type int dword_B64790;

//----- (005B0030) --------------------------------------------------------
void __thiscall OptionBaseWin::UpdateMeWin(OptionBaseWin *this, float fCurTime)
{
  OptionBaseWin *v2; // esi@1
  PgWinBut *v3; // ecx@4

  v2 = this;
  if ( !(unsigned __int8)((int (*)(void))this->m_pkApply->vfptr[61].__vecDelDtor)()
    || !(unsigned __int8)((int (*)(void))v2->m_pkDefaultSetting->vfptr[61].__vecDelDtor)() )
  {
    if ( CNSTimer_Interval::IsRun_GetCount(&v2->m_ApplyInitDelayed, fCurTime) )
    {
      CNSTimer_Interval::ReSet(&v2->m_ApplyInitDelayed, fCurTime);
      v3 = v2->m_pkApply;
      v2->m_ApplyInitDelayed.m_fCheckTime = 2.0;
      ((void (__stdcall *)(_DWORD))v3->vfptr[60].__vecDelDtor)(1);
      ((void (__stdcall *)(_DWORD))v2->m_pkDefaultSetting->vfptr[60].__vecDelDtor)(1);
    }
  }
}

//----- (005B00C0) --------------------------------------------------------
void __thiscall OptionBaseWin::OnWinClose(OptionBaseWin *this)
{
  GameFrameWork::CloseOptionWin((GameFrameWork *)this->m_pkFrameWork);
}

//----- (005B00D0) --------------------------------------------------------
void __thiscall OptionBaseWin::OnApply(OptionBaseWin *this)
{
  OptionBaseWin *v1; // esi@1
  int v2; // eax@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkApply->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkDefaultSetting->vfptr[60].__vecDelDtor)(0);
  v2 = v1->m_iMode;
  if ( v2 )
  {
    if ( v2 == 1 )
    {
      GameFrameWork::OnOptionWinApply((GameFrameWork *)v1->m_pkFrameWork, 1);
    }
    else if ( v2 == 2 )
    {
      GameFrameWork::OnOptionWinApply((GameFrameWork *)v1->m_pkFrameWork, 2);
    }
  }
  else
  {
    GameFrameWork::OnOptionWinApply((GameFrameWork *)v1->m_pkFrameWork, 0);
  }
}

//----- (005B0140) --------------------------------------------------------
void __thiscall OptionBaseWin::OnDefaultSetting(OptionBaseWin *this)
{
  OptionBaseWin *v1; // esi@1
  int v2; // eax@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkApply->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkDefaultSetting->vfptr[60].__vecDelDtor)(0);
  v2 = v1->m_iMode;
  if ( v2 )
  {
    if ( v2 == 1 )
    {
      GameFrameWork::OnOptionWinDefaultSetting((GameFrameWork *)v1->m_pkFrameWork, 1);
    }
    else if ( v2 == 2 )
    {
      GameFrameWork::OnOptionWinDefaultSetting((GameFrameWork *)v1->m_pkFrameWork, 2);
    }
  }
  else
  {
    GameFrameWork::OnOptionWinDefaultSetting((GameFrameWork *)v1->m_pkFrameWork, 0);
  }
}

//----- (005B01B0) --------------------------------------------------------
void __thiscall OptionBaseWin::OnGame(OptionBaseWin *this)
{
  GameFrameWork::OpenGameOptionWin((GameFrameWork *)this->m_pkFrameWork);
}

//----- (005B01C0) --------------------------------------------------------
void __thiscall OptionBaseWin::OnGraphic(OptionBaseWin *this)
{
  GameFrameWork::OpenGraphicOptionWin((GameFrameWork *)this->m_pkFrameWork);
}

//----- (005B01D0) --------------------------------------------------------
void __thiscall OptionBaseWin::OnSound(OptionBaseWin *this)
{
  GameFrameWork::OpenSoundOptionWin((GameFrameWork *)this->m_pkFrameWork);
}

//----- (005B01E0) --------------------------------------------------------
char __thiscall OptionBaseWin::Create(OptionBaseWin *this, PgFrameWork *pkFrameWork)
{
  OptionBaseWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiAVObject *v5; // eax@4
  NiTexturingProperty *v6; // eax@4
  NiTexturingProperty *v7; // edi@4
  NiTexturingProperty::Map *v8; // eax@6
  NiSourceTexture *v9; // eax@7
  NiNode *v10; // esi@10
  char result; // al@14
  PgSprData *v12; // eax@15
  NiNode *v13; // esi@18
  int v14; // edi@22
  int v15; // ebx@22
  NiSourceTexture *v16; // eax@22
  PgSprData *v17; // eax@23
  PgFont *v18; // eax@27
  unsigned int v19; // ST8C_4@27
  NiUnsharedGeometryGroup *v20; // eax@27
  PgSprData *v21; // eax@27
  PgSprData *v22; // eax@27
  PgSprData *v23; // eax@27
  PgWinBut *v24; // eax@29
  int v25; // eax@29
  unsigned int v26; // ST8C_4@29
  PgFont *v27; // eax@29
  unsigned int v28; // ST8C_4@29
  NiUnsharedGeometryGroup *v29; // ST70_4@29
  PgWinBut *v30; // eax@29
  int v31; // eax@29
  unsigned int v32; // ST8C_4@29
  PgFont *v33; // eax@29
  unsigned int v34; // ST8C_4@29
  NiUnsharedGeometryGroup *v35; // eax@29
  NiPointer<PgSprData::PgHitTester> *v36; // ecx@29
  unsigned int v37; // ST8C_4@29
  PgFont *v38; // eax@29
  unsigned int v39; // ST8C_4@29
  NiUnsharedGeometryGroup *v40; // eax@29
  NiPointer<PgSprData::PgHitTester> *v41; // ecx@29
  unsigned int v42; // ST8C_4@29
  PgFont *v43; // eax@29
  PgWinText *v44; // eax@29
  NiUnsharedGeometryGroup *v45; // eax@29
  NiPointer<PgSprData::PgHitTester> *v46; // ecx@29
  unsigned int v47; // ST8C_4@29
  PgFont *v48; // eax@29
  PgWinText *v49; // eax@29
  NiUnsharedGeometryGroup *v50; // eax@29
  NiPointer<PgSprData::PgHitTester> *v51; // ecx@29
  unsigned int v52; // ST8C_4@29
  PgFont *v53; // eax@29
  PgWinText *v54; // edi@29
  NiRefObjectVtbl *v55; // ebx@29
  NiUnsharedGeometryGroup *v56; // eax@29
  unsigned int uiWidth; // [sp+90h] [bp-28h]@25
  unsigned int uiHeight; // [sp+94h] [bp-24h]@25
  NiPointer<NiTexturingProperty> spTexProp; // [sp+98h] [bp-20h]@4
  NiSourceTexture *pkTexture; // [sp+9Ch] [bp-1Ch]@7
  int uiLeft; // [sp+A0h] [bp-18h]@15
  int uiTop; // [sp+A4h] [bp-14h]@15
  NiPointer<NiNode> spNode; // [sp+A8h] [bp-10h]@1
  int v64; // [sp+B4h] [bp-4h]@1
  PgWinText *pkTextWina; // [sp+C0h] [bp+8h]@27
  PgSprData *pkTextWinb; // [sp+C0h] [bp+8h]@27
  NiSourceTexture *pkTextWin; // [sp+C0h] [bp+8h]@27
  PgSprData *pkTextWinc; // [sp+C0h] [bp+8h]@28
  PgWinText *pkTextWind; // [sp+C0h] [bp+8h]@29
  PgWinText *pkTextWine; // [sp+C0h] [bp+8h]@29
  PgWinText *pkTextWinf; // [sp+C0h] [bp+8h]@29
  PgWinText *pkTextWing; // [sp+C0h] [bp+8h]@29
  PgWinText *pkTextWinh; // [sp+C0h] [bp+8h]@29
  PgWinText *pkTextWini; // [sp+C0h] [bp+8h]@29
  PgSprData *pkTextWinj; // [sp+C0h] [bp+8h]@29
  PgWinText *pkTextWink; // [sp+C0h] [bp+8h]@29
  PgWinText *pkTextWinl; // [sp+C0h] [bp+8h]@29
  PgWinText *pkTextWinm; // [sp+C0h] [bp+8h]@29
  PgWinText *pkTextWinn; // [sp+C0h] [bp+8h]@29
  PgWinText *pkTextWino; // [sp+C0h] [bp+8h]@29
  PgWinText *pkTextWinp; // [sp+C0h] [bp+8h]@29
  PgWinText *pkTextWinq; // [sp+C0h] [bp+8h]@29

  v2 = this;
  spNode.m_pObject = 0;
  this->m_pkFrameWork = pkFrameWork;
  v3 = pTexturePalette;
  v64 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\Option_common.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Frame");
  v6 = (NiTexturingProperty *)NiAVObject::GetProperty(v5, 8);
  v7 = v6;
  spTexProp.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v8 = *v7->m_kMaps.m_pBase;
  LOBYTE(v64) = 1;
  if ( !v8 || (v9 = (NiSourceTexture *)v8->m_spTexture.m_pObject, (pkTexture = v9) == 0) )
  {
    LOBYTE(v64) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v10 = spNode.m_pObject;
    v64 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
    return 0;
  }
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v9);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v12, 0, pkFrameWork, "OptionBaseWin", 0) )
  {
    v14 = uiLeft;
    v15 = uiTop;
    v16 = MenuTexMgr::GetTexture(0x13u);
    if ( v16 )
      v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v16);
    else
      v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v17, (PgWin *)&v2->vfptr, 0, 0);
    if ( PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "WinTitle",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight) )
    {
      v18 = Font::Get(MAIN_MENU);
      pkTextWina = PgWinText::CreateWin(uiLeft - v14, uiTop - v15, uiWidth, uiHeight, v18, (PgWin *)&v2->vfptr, 0, 0);
      pkTextWina->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWina, 1u);
      ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWina->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
      v19 = (unsigned int)pkTextWina->vfptr;
      v20 = TextData::Get(0xE2F70740);
      (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v19 + 472))(pkTextWina, v20);
      ((void (__stdcall *)(_DWORD))pkTextWina->vfptr[60].__vecDelDtor)(0);
      v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
      PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v21, (PgWin *)&v2->vfptr, 0, 0);
      v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, pkTexture);
      PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v22, (PgWin *)&v2->vfptr, 0, 0);
      v23 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, pkTexture);
      PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v23, (PgWin *)&v2->vfptr, 0, 0);
      pkTextWinb = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, pkTexture);
      PgSprData::Add(pkTextWinb, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
      PgSprData::Add(pkTextWinb, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, pkTextWinb, (PgWin *)&v2->vfptr, 0x10u, 0, 0);
      pkTextWin = MenuTexMgr::GetTexture(4u);
      if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
      {
        pkTextWinc = PgSprData::Create(
                       (NiAVObject *)&spNode.m_pObject->vfptr,
                       "HelpLinkNor",
                       &uiLeft,
                       &uiTop,
                       pkTextWin);
        PgSprData::Add(pkTextWinc, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
        PgSprData::Add(pkTextWinc, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
        PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, pkTextWinc, (PgWin *)&v2->vfptr, 0x11u, 0, 0);
      }
      pkTextWind = (PgWinText *)PgSprData::Create(
                                  (NiAVObject *)&spNode.m_pObject->vfptr,
                                  "OkNor",
                                  &uiLeft,
                                  &uiTop,
                                  pkTexture);
      PgSprData::Add((PgSprData *)pkTextWind, (NiAVObject *)&spNode.m_pObject->vfptr, "OkClick");
      PgSprData::Add((PgSprData *)pkTextWind, (NiAVObject *)&spNode.m_pObject->vfptr, "OkOver");
      v24 = PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWind, (PgWin *)&v2->vfptr, 0xEu, 0, 0);
      v2->m_pkDefaultSetting = v24;
      ((void (__thiscall *)(PgWinBut *))v24->vfptr[60].__vecDelDtor)(v24);
      v25 = *(_DWORD *)LODWORD(pkTextWind->m_kWorldBound.m_kCenter.x);
      pkTextWine = *(PgWinText **)(v25 + 24);
      v26 = *(_DWORD *)(v25 + 20);
      v27 = Font::Get(0);
      pkTextWinf = PgWinText::CreateWin(
                     uiLeft - v14,
                     uiTop - v15 + 1,
                     v26,
                     (unsigned int)pkTextWine,
                     v27,
                     (PgWin *)&v2->vfptr,
                     0,
                     0);
      ((void (__thiscall *)(PgWinText *))pkTextWinf->vfptr[122].__vecDelDtor)(pkTextWinf);
      v28 = (unsigned int)pkTextWinf->vfptr;
      v29 = TextData::Get(0x47A08085u);
      (*(void (__thiscall **)(PgWinText *))(v28 + 472))(pkTextWinf);
      ((void (__cdecl *)(_DWORD, NiUnsharedGeometryGroup *, signed int, signed int))pkTextWinf->vfptr[60].__vecDelDtor)(
        0,
        v29,
        5,
        1);
      pkTextWing = (PgWinText *)PgSprData::Create(
                                  (NiAVObject *)&spNode.m_pObject->vfptr,
                                  "CreatNor",
                                  &uiLeft,
                                  &uiTop,
                                  pkTexture);
      PgSprData::Add((PgSprData *)pkTextWing, (NiAVObject *)&spNode.m_pObject->vfptr, "CreatClick");
      PgSprData::Add((PgSprData *)pkTextWing, (NiAVObject *)&spNode.m_pObject->vfptr, "CreatOver");
      v30 = PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWing, (PgWin *)&v2->vfptr, 0xFu, 0, 0);
      v2->m_pkApply = v30;
      v30->vfptr[60].__vecDelDtor((NiRefObject *)v30, 1u);
      v31 = *(_DWORD *)LODWORD(pkTextWing->m_kWorldBound.m_kCenter.x);
      pkTextWinh = *(PgWinText **)(v31 + 24);
      v32 = *(_DWORD *)(v31 + 20);
      v33 = Font::Get(0);
      pkTextWini = PgWinText::CreateWin(
                     uiLeft - v14,
                     uiTop - v15 + 1,
                     v32,
                     (unsigned int)pkTextWinh,
                     v33,
                     (PgWin *)&v2->vfptr,
                     0,
                     0);
      pkTextWini->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWini, 5u);
      v34 = (unsigned int)pkTextWini->vfptr;
      v35 = TextData::Get(0x9FF9F4E6);
      (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v34 + 472))(pkTextWini, v35);
      ((void (__stdcall *)(_DWORD))pkTextWini->vfptr[60].__vecDelDtor)(0);
      pkTextWinj = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "QuitNor", &uiLeft, &uiTop, pkTexture);
      PgSprData::Add(pkTextWinj, (NiAVObject *)&spNode.m_pObject->vfptr, "QuitClick");
      PgSprData::Add(pkTextWinj, (NiAVObject *)&spNode.m_pObject->vfptr, "QuitOver");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, pkTextWinj, (PgWin *)&v2->vfptr, 0x10u, 0, 0);
      v36 = pkTextWinj->m_akHitTester.m_pBase;
      pkTextWink = (PgWinText *)v36->m_pObject->m_uiHeight;
      v37 = v36->m_pObject->m_uiWidth;
      v38 = Font::Get(0);
      pkTextWinl = PgWinText::CreateWin(
                     uiLeft - v14,
                     uiTop - v15 + 1,
                     v37,
                     (unsigned int)pkTextWink,
                     v38,
                     (PgWin *)&v2->vfptr,
                     0,
                     0);
      pkTextWinl->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinl, 5u);
      v39 = (unsigned int)pkTextWinl->vfptr;
      v40 = TextData::Get(0x9BE7FBE5);
      (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v39 + 472))(pkTextWinl, v40);
      ((void (__stdcall *)(_DWORD))pkTextWinl->vfptr[60].__vecDelDtor)(0);
      v41 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SubTitle01", &uiLeft, &uiTop, pkTexture)->m_akHitTester.m_pBase;
      pkTextWinm = (PgWinText *)v41->m_pObject->m_uiHeight;
      v42 = v41->m_pObject->m_uiWidth;
      v43 = Font::Get(0);
      v44 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              v42,
              (unsigned int)pkTextWinm,
              v43,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v2->m_Grop01TextWin = v44;
      v44->vfptr[122].__vecDelDtor((NiRefObject *)v44, 5u);
      pkTextWinn = (PgWinText *)v2->m_Grop01TextWin->vfptr;
      v45 = TextData::Get(0xDD594F31);
      ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkTextWinn[1].m_kChildren.m_pBase)(
        v2->m_Grop01TextWin,
        v45);
      ((void (__stdcall *)(_DWORD))v2->m_Grop01TextWin->vfptr[60].__vecDelDtor)(0);
      v46 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SubTitle02", &uiLeft, &uiTop, pkTexture)->m_akHitTester.m_pBase;
      pkTextWino = (PgWinText *)v46->m_pObject->m_uiHeight;
      v47 = v46->m_pObject->m_uiWidth;
      v48 = Font::Get(0);
      v49 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              v47,
              (unsigned int)pkTextWino,
              v48,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v2->m_Grop02TextWin = v49;
      v49->vfptr[122].__vecDelDtor((NiRefObject *)v49, 5u);
      pkTextWinp = (PgWinText *)v2->m_Grop02TextWin->vfptr;
      v50 = TextData::Get(0x2E3A4C30u);
      ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkTextWinp[1].m_kChildren.m_pBase)(
        v2->m_Grop02TextWin,
        v50);
      ((void (__stdcall *)(_DWORD))v2->m_Grop02TextWin->vfptr[60].__vecDelDtor)(0);
      v51 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &uiLeft, &uiTop, pkTexture)->m_akHitTester.m_pBase;
      pkTextWinq = (PgWinText *)v51->m_pObject->m_uiHeight;
      v52 = v51->m_pObject->m_uiWidth;
      v53 = Font::Get(0);
      v54 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              v52,
              (unsigned int)pkTextWinq,
              v53,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v54->vfptr[122].__vecDelDtor((NiRefObject *)v54, 5u);
      v55 = v54->vfptr;
      v56 = TextData2::Get(0xE4332521);
      v55[118].__vecDelDtor((NiRefObject *)v54, (unsigned int)v56);
      v54->vfptr[60].__vecDelDtor((NiRefObject *)v54, 0);
      ((void (__thiscall *)(OptionBaseWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
        v2,
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        0.0,
        0.5);
      CNSTimer_Interval::ReSet(&v2->m_ApplyInitDelayed, Timer::ms_fCurTime);
      v2->m_ApplyInitDelayed.m_fCheckTime = 2.0;
      LOBYTE(v64) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
      v64 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 1;
    }
    else
    {
      LOBYTE(v64) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
      v64 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 0;
    }
  }
  else
  {
    LOBYTE(v64) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v13 = spNode.m_pObject;
    v64 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v13 )
      return 0;
    ((void (__thiscall *)(NiNode *))v13->vfptr->__vecDelDtor)(v13);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (005B0B60) --------------------------------------------------------
void __thiscall OptionBaseWin::OnCommand(OptionBaseWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0xBu:
      GameFrameWork::OpenGameOptionWin((GameFrameWork *)this->m_pkFrameWork);
      break;
    case 0xCu:
      GameFrameWork::OpenGraphicOptionWin((GameFrameWork *)this->m_pkFrameWork);
      break;
    case 0xDu:
      GameFrameWork::OpenSoundOptionWin((GameFrameWork *)this->m_pkFrameWork);
      break;
    case 0xEu:
      OptionBaseWin::OnDefaultSetting(this);
      break;
    case 0xFu:
      OptionBaseWin::OnApply(this);
      break;
    case 0x10u:
      GameFrameWork::CloseOptionWin((GameFrameWork *)this->m_pkFrameWork);
      break;
    case 0x11u:
      OptionBaseWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (005B0BF0) --------------------------------------------------------
void __thiscall OptionBaseWin::SetMode(OptionBaseWin *this, int nMode)
{
  OptionBaseWin *v2; // esi@1
  NiRefObjectVtbl *v3; // edi@4
  NiUnsharedGeometryGroup *v4; // eax@4
  NiRefObjectVtbl *v5; // edi@5
  NiUnsharedGeometryGroup *v6; // eax@5
  NiRefObjectVtbl *v7; // edi@6
  NiUnsharedGeometryGroup *v8; // eax@6
  NiRefObjectVtbl *v9; // edi@7
  unsigned int v10; // [sp+0h] [bp-8h]@5

  v2 = this;
  this->m_iMode = nMode;
  if ( !nMode )
  {
    v7 = this->m_Grop01TextWin->vfptr;
    v8 = TextData::Get(0xD9EFF842);
    v7[118].__vecDelDtor((NiRefObject *)v2->m_Grop01TextWin, (unsigned int)v8);
    v10 = -168297239;
    goto LABEL_7;
  }
  if ( nMode == 1 )
  {
    v5 = this->m_Grop01TextWin->vfptr;
    v6 = TextData::Get(0xDD594F31);
    v5[118].__vecDelDtor((NiRefObject *)v2->m_Grop01TextWin, (unsigned int)v6);
    v10 = 775572528;
LABEL_7:
    v9 = v2->m_Grop02TextWin->vfptr;
    TextData::Get(v10);
    ((void (__thiscall *)(_DWORD))v9[118].__vecDelDtor)(v2->m_Grop02TextWin);
    return;
  }
  if ( nMode == 2 )
  {
    v3 = this->m_Grop01TextWin->vfptr;
    v4 = TextData::Get(0x9EF6F6EB);
    v3[118].__vecDelDtor((NiRefObject *)v2->m_Grop01TextWin, (unsigned int)v4);
    ((void (__stdcall *)(_DWORD))v2->m_Grop02TextWin->vfptr[118].__vecDelDtor)(&unk_9A8E2B);
  }
}

//----- (005B0CD0) --------------------------------------------------------
OptionBaseWin *__cdecl OptionBaseWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  OptionBaseWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x188u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    LOBYTE(v6) = 1;
    v2->vfptr = (NiRefObjectVtbl *)&OptionBaseWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&OptionBaseWin::`vftable'{for `IDirectMessenger'};
    CNSTimer_Interval::CNSTimer_Interval((CNSTimer_Interval *)&v2[1].m_kLocal.m_Rotate.m_pEntry[1][1]);
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = -1;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (OptionBaseWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9A8F68: using guessed type void (__thiscall *OptionBaseWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A8F84: using guessed type int (__thiscall *OptionBaseWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005B0E30) --------------------------------------------------------
OptionBaseWin *__thiscall OptionBaseWin::`vector deleting destructor'(OptionBaseWin *this, unsigned int a2)
{
  OptionBaseWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&OptionBaseWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&OptionBaseWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A8F68: using guessed type void (__thiscall *OptionBaseWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A8F84: using guessed type int (__thiscall *OptionBaseWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005B0E70) --------------------------------------------------------
void __thiscall OptionGraphicWin::OptionGraphicWin(OptionGraphicWin *this)
{
  OptionGraphicWin *v1; // esi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&OptionGraphicWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&OptionGraphicWin::`vftable'{for `IDirectMessenger'};
  MachineOpt::GraphicOption::GraphicOption(&v1->m_kOpenGraphicOption);
  v1->m_pkOptionBaseWin = 0;
  v1->m_bChangeOption = 0;
  v1->m_pkResolutionTextWin = 0;
  v1->m_pkScreenShotCheck = 0;
}
// 9A9430: using guessed type void (__thiscall *OptionGraphicWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A944C: using guessed type int (__thiscall *OptionGraphicWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005B0EF0) --------------------------------------------------------
void __thiscall OptionGraphicWin::~OptionGraphicWin(OptionGraphicWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&OptionGraphicWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&OptionGraphicWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
}
// 9A9430: using guessed type void (__thiscall *OptionGraphicWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A944C: using guessed type int (__thiscall *OptionGraphicWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005B0F10) --------------------------------------------------------
void __stdcall OptionGraphicWin::OnGamma(int nPos)
{
  int nPosa; // [sp+Ch] [bp+8h]@1

  *(float *)&nPosa = (double)(nPos + 1) / 10.0;
  MachineOpt::SetCurGama(*(float *)&nPosa);
}

//----- (005B0F40) --------------------------------------------------------
void __thiscall OptionGraphicWin::OnApply(OptionGraphicWin *this)
{
  OptionBaseWin *v1; // eax@1

  v1 = this->m_pkOptionBaseWin;
  this->m_bChangeOption = 0;
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}

//----- (005B0F60) --------------------------------------------------------
void __thiscall OptionGraphicWin::SetViewLength(OptionGraphicWin *this, float fRate)
{
  float fRatea; // [sp+8h] [bp+8h]@1

  fRatea = fRate * -100.0;
  switch ( -60 - (signed int)fRatea )
  {
    case 0:
      SlideBar::SetCurPos(this->m_pkSlides[0], 0);
      break;
    case 10:
      SlideBar::SetCurPos(this->m_pkSlides[0], 1);
      break;
    case 20:
      SlideBar::SetCurPos(this->m_pkSlides[0], 2);
      break;
    case 30:
      SlideBar::SetCurPos(this->m_pkSlides[0], 3);
      break;
    case 40:
      SlideBar::SetCurPos(this->m_pkSlides[0], 4);
      break;
    default:
      return;
  }
}

//----- (005B1040) --------------------------------------------------------
void __thiscall OptionGraphicWin::SetCharShadowCnt(OptionGraphicWin *this, int nCnt)
{
  switch ( nCnt )
  {
    case 1:
      SlideBar::SetCurPos(this->m_pkSlides[2], 1);
      break;
    case 10:
      SlideBar::SetCurPos(this->m_pkSlides[2], 2);
      break;
    case 50:
      SlideBar::SetCurPos(this->m_pkSlides[2], 3);
      break;
    default:
      SlideBar::SetCurPos(this->m_pkSlides[2], 0);
      break;
  }
}

//----- (005B1100) --------------------------------------------------------
void __thiscall OptionGraphicWin::SetLodAdjust(OptionGraphicWin *this, float fVal)
{
  SlideBar::SetCurPos(this->m_pkSlides[1], (signed int)((1.0 - fVal) * 10.0 + 5.0));
}

//----- (005B1130) --------------------------------------------------------
void __thiscall OptionGraphicWin::OnResolutionClick(OptionGraphicWin *this)
{
  PgFrameWork::AddMsg(this->m_pkFrameWork, 0x8Du, 0, 0);
}

//----- (005B1170) --------------------------------------------------------
void __stdcall OptionGraphicWin::OnViewLength(int nPos)
{
  switch ( nPos )
  {
    case 0:
      MachineOpt::ms_kGraphicOption.fViewTerrainRate = 0.60000002;
      if ( !unk_A99569 )
        unk_B24FB4 = MachineOpt::ms_kGraphicOption.fViewTerrainLength * 0.6000000238418579;
      break;
    case 1:
      MachineOpt::ms_kGraphicOption.fViewTerrainRate = 0.69999999;
      if ( !unk_A99569 )
        unk_B24FB4 = MachineOpt::ms_kGraphicOption.fViewTerrainLength * 0.699999988079071;
      break;
    case 2:
      MachineOpt::ms_kGraphicOption.fViewTerrainRate = 0.80000001;
      if ( !unk_A99569 )
        unk_B24FB4 = MachineOpt::ms_kGraphicOption.fViewTerrainLength * 0.800000011920929;
      break;
    case 3:
      MachineOpt::ms_kGraphicOption.fViewTerrainRate = 0.89999998;
      if ( !unk_A99569 )
        unk_B24FB4 = MachineOpt::ms_kGraphicOption.fViewTerrainLength * 0.8999999761581421;
      break;
    case 4:
      MachineOpt::ms_kGraphicOption.fViewTerrainRate = 1.0;
      if ( !unk_A99569 )
        unk_B24FB4 = MachineOpt::ms_kGraphicOption.fViewTerrainLength;
      break;
    default:
      return;
  }
}

//----- (005B1270) --------------------------------------------------------
void __stdcall OptionGraphicWin::OnCharShadowCnt(int nPos)
{
  switch ( nPos )
  {
    case 0:
      unk_B25048 = 0;
      MachineOpt::ms_kGraphicOption.nCharShadowLevel = 0;
      break;
    case 1:
      unk_B25048 = 1;
      MachineOpt::ms_kGraphicOption.nCharShadowLevel = 1;
      break;
    case 2:
      unk_B25048 = 10;
      MachineOpt::ms_kGraphicOption.nCharShadowLevel = 10;
      break;
    case 3:
      unk_B25048 = 50;
      MachineOpt::ms_kGraphicOption.nCharShadowLevel = 50;
      break;
    default:
      return;
  }
}

//----- (005B12E0) --------------------------------------------------------
void __thiscall OptionGraphicWin::OnOutLineCheck(OptionGraphicWin *this)
{
  this->m_pkOutLineCheck->m_bCheck = this->m_pkOutLineCheck->m_bCheck == 0;
  MachineOpt::SetViewOutLine(this->m_pkOutLineCheck->m_bCheck);
}

//----- (005B1310) --------------------------------------------------------
void __thiscall OptionGraphicWin::CloseWin(OptionGraphicWin *this)
{
  OptionGraphicWin *v1; // esi@1
  void (__thiscall ***v2)(_DWORD, _DWORD); // edi@3
  int v3; // [sp+4h] [bp-4h]@2

  v1 = this;
  if ( this->m_pkOptionBaseWin )
  {
    GameFrameWork::ms_bRecreatingDisplay = 0;
    ((void (__stdcall *)(int *, OptionGraphicWin *))this->m_pkOptionBaseWin->vfptr[30].__vecDelDtor)(&v3, this);
    if ( v3 )
    {
      v2 = (void (__thiscall ***)(_DWORD, _DWORD))v3;
      if ( !InterlockedDecrement((volatile LONG *)(v3 + 4)) )
      {
        if ( v2 )
          (**v2)(v2, 1);
      }
    }
    v1->vfptr[64].__vecDelDtor((NiRefObject *)v1, 0);
  }
}
// A8CAFE: using guessed type bool GameFrameWork::ms_bRecreatingDisplay;

//----- (005B1380) --------------------------------------------------------
void __thiscall OptionGraphicWin::SetOutLineCheck(OptionGraphicWin *this, bool bLine)
{
  this->m_pkOutLineCheck->m_bCheck = bLine;
}

//----- (005B13A0) --------------------------------------------------------
void __thiscall OptionGraphicWin::SetResoulution(OptionGraphicWin *this, unsigned int uiWidth, unsigned int uiHeight)
{
  OptionGraphicWin *v3; // esi@1
  char temp[256]; // [sp+4h] [bp-104h]@1

  v3 = this;
  MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = uiWidth;
  MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = uiHeight;
  sprintf(temp, "%i x %i", uiWidth, uiHeight);
  ((void (__stdcall *)(_DWORD))v3->m_pkResolutionTextWin->vfptr[118].__vecDelDtor)(temp);
}

//----- (005B1410) --------------------------------------------------------
void __thiscall OptionGraphicWin::SetWindowFullModeCheck(OptionGraphicWin *this, bool bCheck)
{
  this->m_pkWindowFullModeCheck->m_bCheck = bCheck;
}

//----- (005B1430) --------------------------------------------------------
void __thiscall OptionGraphicWin::OnGlowEffectToggle(OptionGraphicWin *this)
{
  bool v1; // al@1

  this->m_pkGlowEffectCheck->m_bCheck = this->m_pkGlowEffectCheck->m_bCheck == 0;
  v1 = MachineOpt::GetGlowEffect();
  MachineOpt::SetGlowEffect(v1 == 0);
}

//----- (005B1460) --------------------------------------------------------
void __thiscall OptionGraphicWin::SetGlowEffectEnable(OptionGraphicWin *this, int bEnable)
{
  this->m_pkGlowEffectCheck->m_bCheck = bEnable;
  MachineOpt::SetGlowEffect(bEnable);
}

//----- (005B1480) --------------------------------------------------------
void __thiscall OptionGraphicWin::OnShakeEffectToggle(OptionGraphicWin *this)
{
  this->m_pkScreenShakeEffectCheck->m_bCheck = this->m_pkScreenShakeEffectCheck->m_bCheck == 0;
  MachineOpt::ms_kGraphicOption.bScreenShakeEnable = MachineOpt::ms_kGraphicOption.bScreenShakeEnable == 0;
}

//----- (005B14B0) --------------------------------------------------------
void __thiscall OptionGraphicWin::SetScreenShakeEffectEnable(OptionGraphicWin *this, bool bEnable)
{
  this->m_pkScreenShakeEffectCheck->m_bCheck = bEnable;
  MachineOpt::ms_kGraphicOption.bScreenShakeEnable = bEnable;
}

//----- (005B14D0) --------------------------------------------------------
void __thiscall OptionGraphicWin::OnCharAuraEffectToggle(OptionGraphicWin *this)
{
  Effect *v1; // eax@2

  this->m_pkCharAuraEffectCheck->m_bCheck = this->m_pkCharAuraEffectCheck->m_bCheck == 0;
  MachineOpt::ms_kGraphicOption.bCharAuraEffectEnable = MachineOpt::ms_kGraphicOption.bCharAuraEffectEnable == 0;
  EffectMgr::AuraEffectEnable(&g_kEffectMgr, MachineOpt::ms_kGraphicOption.bCharAuraEffectEnable);
  if ( g_pkMainChar->m_kCharShape.m_kEquip.Equ_CosEff != -1 )
  {
    v1 = EffectMgr::FindAuraEffect(&g_kEffectMgr, g_pkMainChar->m_kHandle);
    if ( v1 )
      v1->vfptr[21].__vecDelDtor((NiRefObject *)v1, 0);
  }
}

//----- (005B1550) --------------------------------------------------------
void __thiscall OptionGraphicWin::SetCharAuraEffectEnable(OptionGraphicWin *this, bool bEnable)
{
  Effect *v2; // eax@2

  this->m_pkCharAuraEffectCheck->m_bCheck = bEnable;
  MachineOpt::ms_kGraphicOption.bCharAuraEffectEnable = bEnable;
  EffectMgr::AuraEffectEnable(&g_kEffectMgr, bEnable);
  if ( g_pkMainChar->m_kCharShape.m_kEquip.Equ_CosEff != -1 )
  {
    v2 = EffectMgr::FindAuraEffect(&g_kEffectMgr, g_pkMainChar->m_kHandle);
    if ( v2 )
      v2->vfptr[21].__vecDelDtor((NiRefObject *)v2, 0);
  }
}

//----- (005B15B0) --------------------------------------------------------
void __thiscall OptionGraphicWin::OnScreenShotToggle(OptionGraphicWin *this)
{
  this->m_pkScreenShotCheck->m_bCheck = this->m_pkScreenShotCheck->m_bCheck == 0;
  MachineOpt::ms_kGraphicOption.bScreenShotEnable = MachineOpt::ms_kGraphicOption.bScreenShotEnable == 0;
}

//----- (005B15E0) --------------------------------------------------------
void __thiscall OptionGraphicWin::SetScreenShotEnable(OptionGraphicWin *this, bool bEnable)
{
  this->m_pkScreenShotCheck->m_bCheck = bEnable;
  MachineOpt::ms_kGraphicOption.bScreenShotEnable = bEnable;
}

//----- (005B1600) --------------------------------------------------------
char __thiscall OptionGraphicWin::Create(OptionGraphicWin *this, PgFrameWork *pkFrameWork)
{
  OptionGraphicWin *v2; // esi@1
  NiRefObjectVtbl *v3; // edx@1
  NiTexturePalette *v4; // edi@1
  const char *v5; // eax@3
  NiAVObject *v6; // eax@4
  NiProperty *v7; // eax@4
  NiProperty *v8; // ebx@4
  NiRefObjectVtbl *v9; // eax@6
  NiSourceTexture *v10; // edi@7
  NiNode *v11; // esi@10
  PgSprData *v13; // eax@15
  PgWinSpr *v14; // eax@15
  NiPointer<PgSprData::PgHitTester> *v15; // ecx@15
  unsigned int v16; // ebx@15
  unsigned int uiWidth; // ST44_4@15
  PgFont *v18; // eax@15
  PgWinText *v19; // ebx@15
  unsigned int v20; // ST44_4@15
  NiUnsharedGeometryGroup *v21; // eax@15
  NiPointer<PgSprData::PgHitTester> *v22; // ecx@15
  unsigned int v23; // ebx@15
  unsigned int v24; // ST44_4@15
  PgFont *v25; // eax@15
  PgWinText *v26; // ebx@15
  unsigned int v27; // ST44_4@15
  NiUnsharedGeometryGroup *v28; // eax@15
  NiPointer<PgSprData::PgHitTester> *v29; // ecx@15
  unsigned int v30; // ebx@15
  unsigned int v31; // ST44_4@15
  PgFont *v32; // eax@15
  PgWinText *v33; // ebx@15
  unsigned int v34; // ST44_4@15
  NiUnsharedGeometryGroup *v35; // eax@15
  NiPointer<PgSprData::PgHitTester> *v36; // ecx@15
  unsigned int v37; // ebx@15
  unsigned int v38; // ST44_4@15
  PgFont *v39; // eax@15
  PgWinText *v40; // ebx@15
  unsigned int v41; // ST44_4@15
  NiUnsharedGeometryGroup *v42; // eax@15
  PgSprData *v43; // eax@15
  PgSprData *v44; // ebx@15
  SlideBar *v45; // eax@15
  SlideBar *v46; // eax@15
  SlideBar *v47; // eax@15
  PgSprData *v48; // ebx@15
  PgSprData *v49; // ebx@15
  NiPointer<PgSprData::PgHitTester> *v50; // edx@15
  unsigned int v51; // ebx@15
  unsigned int v52; // ST44_4@15
  PgFont *v53; // eax@15
  PgWinText *v54; // eax@15
  NiPointer<PgSprData::PgHitTester> *v55; // ecx@15
  unsigned int v56; // ebx@15
  unsigned int v57; // ST44_4@15
  PgFont *v58; // eax@15
  PgWinText *v59; // ebx@15
  unsigned int v60; // ST44_4@15
  NiUnsharedGeometryGroup *v61; // eax@15
  NiPointer<PgSprData::PgHitTester> *v62; // ecx@15
  unsigned int v63; // ebx@15
  unsigned int v64; // ST44_4@15
  PgFont *v65; // eax@15
  PgWinText *v66; // eax@15
  NiRefObjectVtbl *v67; // ebx@15
  NiUnsharedGeometryGroup *v68; // eax@15
  PgSprData *v69; // ebx@15
  NiPointer<PgSprData::PgHitTester> *v70; // ecx@15
  unsigned int v71; // ebx@15
  unsigned int v72; // ST44_4@15
  PgFont *v73; // eax@15
  PgWinText *v74; // eax@15
  NiRefObjectVtbl *v75; // ebx@15
  NiUnsharedGeometryGroup *v76; // eax@15
  PgSprData *v77; // ebx@15
  NiPointer<PgSprData::PgHitTester> *v78; // ecx@15
  unsigned int v79; // ebx@15
  unsigned int v80; // ST44_4@15
  PgFont *v81; // eax@15
  PgWinText *v82; // eax@15
  NiRefObjectVtbl *v83; // ebx@15
  NiUnsharedGeometryGroup *v84; // eax@15
  PgSprData *v85; // ebx@15
  NiPointer<PgSprData::PgHitTester> *v86; // ecx@15
  unsigned int v87; // ebx@15
  unsigned int v88; // ST44_4@15
  PgFont *v89; // eax@15
  PgWinText *v90; // eax@15
  NiRefObjectVtbl *v91; // ebx@15
  NiUnsharedGeometryGroup *v92; // eax@15
  PgSprData *v93; // ebx@15
  NiPointer<PgSprData::PgHitTester> *v94; // ecx@15
  unsigned int v95; // ebx@15
  unsigned int v96; // ST44_4@15
  PgFont *v97; // eax@15
  PgWinText *v98; // eax@15
  NiRefObjectVtbl *v99; // ebx@15
  NiUnsharedGeometryGroup *v100; // eax@15
  PgSprData *v101; // ebx@15
  NiPointer<PgSprData::PgHitTester> *v102; // ecx@15
  unsigned int v103; // ebx@15
  unsigned int v104; // ST44_4@15
  PgFont *v105; // eax@15
  PgWinText *v106; // ebx@15
  unsigned int v107; // ST44_4@15
  NiUnsharedGeometryGroup *v108; // eax@15
  NiPointer<PgSprData::PgHitTester> *v109; // ecx@15
  unsigned int v110; // ebx@15
  unsigned int v111; // ST44_4@15
  PgFont *v112; // eax@15
  PgWinText *v113; // ebx@15
  unsigned int v114; // ST44_4@15
  NiUnsharedGeometryGroup *v115; // eax@15
  PgSprData *v116; // edi@15
  ColumnBut *v117; // eax@15
  NiNode *v118; // edi@17
  NiPointer<NiTexturingProperty> spTexProp; // [sp+10h] [bp-1Ch]@4
  NiPointer<NiNode> spNode; // [sp+18h] [bp-14h]@1
  int uiLeft; // [sp+1Ch] [bp-10h]@15
  int v122; // [sp+28h] [bp-4h]@1

  v2 = this;
  v3 = this->vfptr;
  this->m_pkFrameWork = pkFrameWork;
  ((void (__stdcall *)(signed int))v3[43].__vecDelDtor)(-15);
  v2->vfptr[44].__vecDelDtor((NiRefObject *)v2, 0);
  v2->vfptr[38].__vecDelDtor((NiRefObject *)v2, 0);
  v2->vfptr[39].__vecDelDtor((NiRefObject *)v2, 0);
  v2->vfptr[35].__vecDelDtor((NiRefObject *)v2, (unsigned int)&unk_9A91A4);
  v2->vfptr[75].__vecDelDtor((NiRefObject *)v2, 0);
  v2->vfptr[60].__vecDelDtor((NiRefObject *)v2, 0);
  v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 1u);
  spNode.m_pObject = 0;
  v4 = pTexturePalette;
  v122 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "Game\\Option_Graphic.nif");
  PgUtil::LoadNodeNifFile(v5, &spNode, v4);
  if ( !spNode.m_pObject )
    return 0;
  v6 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Panel_Graphic");
  v7 = NiAVObject::GetProperty(v6, 8);
  v8 = v7;
  spTexProp.m_pObject = (NiTexturingProperty *)v7;
  if ( v7 )
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  v9 = v8[1].m_spControllers.m_pObject->vfptr;
  LOBYTE(v122) = 1;
  if ( !v9 || (v10 = (NiSourceTexture *)v9[1].__vecDelDtor) == 0 )
  {
    LOBYTE(v122) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v11 = spNode.m_pObject;
    v122 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v11 )
        v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    }
    return 0;
  }
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel_Graphic", &uiLeft, (int *)&pkFrameWork, v10);
  v14 = PgWinSpr::CreateWin(uiLeft, (int)pkFrameWork, v13, (PgWin *)&v2->vfptr, 0, 0);
  v14->vfptr[60].__vecDelDtor((NiRefObject *)v14, 0);
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "LongGround", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v16 = v15->m_pObject->m_uiHeight;
  uiWidth = v15->m_pObject->m_uiWidth;
  v18 = Font::Get(0);
  v19 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, uiWidth, v16, v18, (PgWin *)&v2->vfptr, 0, 0);
  v20 = (unsigned int)v19->vfptr;
  v21 = TextData::Get(0x2931AD8Eu);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v20 + 472))(v19, v21);
  v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
  v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "LongObject", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v23 = v22->m_pObject->m_uiHeight;
  v24 = v22->m_pObject->m_uiWidth;
  v25 = Font::Get(0);
  v26 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v24, v23, v25, (PgWin *)&v2->vfptr, 0, 0);
  v27 = (unsigned int)v26->vfptr;
  v28 = TextData::Get(0x3530A075u);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v27 + 472))(v26, v28);
  v26->vfptr[60].__vecDelDtor((NiRefObject *)v26, 0);
  v29 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ChrShadow", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v30 = v29->m_pObject->m_uiHeight;
  v31 = v29->m_pObject->m_uiWidth;
  v32 = Font::Get(0);
  v33 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v31, v30, v32, (PgWin *)&v2->vfptr, 0, 0);
  v34 = (unsigned int)v33->vfptr;
  v35 = TextData::Get(0x39453B7Bu);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v34 + 472))(v33, v35);
  v33->vfptr[60].__vecDelDtor((NiRefObject *)v33, 0);
  v36 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ChrOline", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v37 = v36->m_pObject->m_uiHeight;
  v38 = v36->m_pObject->m_uiWidth;
  v39 = Font::Get(0);
  v40 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v38, v37, v39, (PgWin *)&v2->vfptr, 0, 0);
  v41 = (unsigned int)v40->vfptr;
  v42 = TextData::Get(0xEDFA4C3D);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v41 + 472))(v40, v42);
  v40->vfptr[60].__vecDelDtor((NiRefObject *)v40, 0);
  v43 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MovingPoint", &uiLeft, (int *)&pkFrameWork, v10);
  v44 = v43;
  v45 = SlideBar::CreateWin(
          spNode.m_pObject,
          "LongGroundBar",
          "LongGroundBarLow",
          "LongGroundBarHigh",
          v43,
          0,
          (PgWin *)&v2->vfptr);
  v2->m_pkSlides[0] = v45;
  v45->m_uiClickMsg = 11;
  SlideBar::SetSplitCnt(v2->m_pkSlides[0], 5);
  SlideBar::SetCurPos(v2->m_pkSlides[0], 4);
  v46 = SlideBar::CreateWin(
          spNode.m_pObject,
          "LongObjectBar",
          "LongObjectBarLow",
          "LongObjectBarHigh",
          v44,
          1u,
          (PgWin *)&v2->vfptr);
  v2->m_pkSlides[1] = v46;
  v46->m_uiClickMsg = 11;
  SlideBar::SetSplitCnt(v2->m_pkSlides[1], 10);
  SlideBar::SetCurPos(v2->m_pkSlides[1], 5);
  v47 = SlideBar::CreateWin(
          spNode.m_pObject,
          "ChrShadowBar",
          "ChrShadowBarLow",
          "ChrShadowBarHigh",
          v44,
          2u,
          (PgWin *)&v2->vfptr);
  v2->m_pkSlides[2] = v47;
  v47->m_uiClickMsg = 11;
  SlideBar::SetSplitCnt(v2->m_pkSlides[2], 4);
  SlideBar::SetCurPos(v2->m_pkSlides[2], 2);
  v48 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ChrOlineChNor", &uiLeft, (int *)&pkFrameWork, v10);
  PgSprData::Add(v48, (NiAVObject *)&spNode.m_pObject->vfptr, "ChrOlineChClick");
  v2->m_pkOutLineCheck = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v48, (PgWin *)&v2->vfptr, 0xCu, 0);
  v49 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ResolutionNor", &uiLeft, (int *)&pkFrameWork, v10);
  PgSprData::Add(v49, (NiAVObject *)&spNode.m_pObject->vfptr, "ResolutionClick");
  PgSprData::Add(v49, (NiAVObject *)&spNode.m_pObject->vfptr, "ResolutionOver");
  PgWinBut::CreateWin(uiLeft, (int)pkFrameWork, v49, (PgWin *)&v2->vfptr, 0xDu, 0, 0);
  v50 = v49->m_akHitTester.m_pBase;
  v51 = v50->m_pObject->m_uiHeight;
  v52 = v50->m_pObject->m_uiWidth;
  v53 = Font::Get(0);
  v54 = PgWinText::CreateWin(uiLeft, (int)pkFrameWork, v52, v51, v53, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkResolutionTextWin = v54;
  v54->vfptr[60].__vecDelDtor((NiRefObject *)v54, 0);
  v55 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Resolution", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v56 = v55->m_pObject->m_uiHeight;
  v57 = v55->m_pObject->m_uiWidth;
  v58 = Font::Get(0);
  v59 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v57, v56, v58, (PgWin *)&v2->vfptr, 0, 0);
  v60 = (unsigned int)v59->vfptr;
  v61 = TextData::Get(0xCDB7D5D8);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v60 + 472))(v59, v61);
  v59->vfptr[60].__vecDelDtor((NiRefObject *)v59, 0);
  v62 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "WindowMod", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v63 = v62->m_pObject->m_uiHeight;
  v64 = v62->m_pObject->m_uiWidth;
  v65 = Font::Get(0);
  v66 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v64, v63, v65, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkWindowFullModeTextWin = v66;
  v67 = v66->vfptr;
  v68 = TextData::Get(0x3354398Du);
  v67[118].__vecDelDtor((NiRefObject *)v2->m_pkWindowFullModeTextWin, (unsigned int)v68);
  ((void (__stdcall *)(_DWORD))v2->m_pkWindowFullModeTextWin->vfptr[60].__vecDelDtor)(0);
  v69 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "WindowModNor", &uiLeft, (int *)&pkFrameWork, v10);
  PgSprData::Add(v69, (NiAVObject *)&spNode.m_pObject->vfptr, "WindowModClick");
  v2->m_pkWindowFullModeCheck = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v69, (PgWin *)&v2->vfptr, 0xEu, 0);
  v70 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MultiSample", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v71 = v70->m_pObject->m_uiHeight;
  v72 = v70->m_pObject->m_uiWidth;
  v73 = Font::Get(0);
  v74 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v72, v71, v73, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkMultiSampleTextWin = v74;
  v75 = v74->vfptr;
  v76 = TextData::Get(0x32347986u);
  v75[118].__vecDelDtor((NiRefObject *)v2->m_pkMultiSampleTextWin, (unsigned int)v76);
  ((void (__stdcall *)(_DWORD))v2->m_pkMultiSampleTextWin->vfptr[60].__vecDelDtor)(0);
  v77 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MultiSampleNor", &uiLeft, (int *)&pkFrameWork, v10);
  PgSprData::Add(v77, (NiAVObject *)&spNode.m_pObject->vfptr, "MultiSampleClick");
  v2->m_pkMultiSampleCheck = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v77, (PgWin *)&v2->vfptr, 0xFu, 0);
  v78 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GlowEffect", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v79 = v78->m_pObject->m_uiHeight;
  v80 = v78->m_pObject->m_uiWidth;
  v81 = Font::Get(0);
  v82 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v80, v79, v81, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkGlowEffectWin = v82;
  v83 = v82->vfptr;
  v84 = TextData::Get(0x352E4430u);
  v83[118].__vecDelDtor((NiRefObject *)v2->m_pkGlowEffectWin, (unsigned int)v84);
  ((void (__stdcall *)(_DWORD))v2->m_pkGlowEffectWin->vfptr[60].__vecDelDtor)(0);
  v85 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GlowEffectNor", &uiLeft, (int *)&pkFrameWork, v10);
  PgSprData::Add(v85, (NiAVObject *)&spNode.m_pObject->vfptr, "GlowEffectClick");
  v2->m_pkGlowEffectCheck = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v85, (PgWin *)&v2->vfptr, 0x10u, 0);
  v86 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CameraShake", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v87 = v86->m_pObject->m_uiHeight;
  v88 = v86->m_pObject->m_uiWidth;
  v89 = Font::Get(0);
  v90 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v88, v87, v89, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkScreenShakeEffectWin = v90;
  v91 = v90->vfptr;
  v92 = TextData2::Get(0xF0D1C8CA);
  v91[118].__vecDelDtor((NiRefObject *)v2->m_pkScreenShakeEffectWin, (unsigned int)v92);
  ((void (__stdcall *)(_DWORD))v2->m_pkScreenShakeEffectWin->vfptr[60].__vecDelDtor)(0);
  v93 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CameraShakeNor", &uiLeft, (int *)&pkFrameWork, v10);
  PgSprData::Add(v93, (NiAVObject *)&spNode.m_pObject->vfptr, "CameraShaketClick");
  v2->m_pkScreenShakeEffectCheck = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v93, (PgWin *)&v2->vfptr, 0x12u, 0);
  v94 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ChrAura", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v95 = v94->m_pObject->m_uiHeight;
  v96 = v94->m_pObject->m_uiWidth;
  v97 = Font::Get(0);
  v98 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v96, v95, v97, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkCharAuraEffectWin = v98;
  v99 = v98->vfptr;
  v100 = TextData2::Get(0xA4A0E9ED);
  v99[118].__vecDelDtor((NiRefObject *)v2->m_pkCharAuraEffectWin, (unsigned int)v100);
  ((void (__stdcall *)(_DWORD))v2->m_pkCharAuraEffectWin->vfptr[60].__vecDelDtor)(0);
  v101 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ChrAuraNor", &uiLeft, (int *)&pkFrameWork, v10);
  PgSprData::Add(v101, (NiAVObject *)&spNode.m_pObject->vfptr, "ChrAuraClick");
  v2->m_pkCharAuraEffectCheck = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v101, (PgWin *)&v2->vfptr, 0x13u, 0);
  v102 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HideUITitle", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v103 = v102->m_pObject->m_uiHeight;
  v104 = v102->m_pObject->m_uiWidth;
  v105 = Font::Get(0);
  v106 = PgWinText::CreateWin(uiLeft, (int)pkFrameWork, v104, v103, v105, (PgWin *)&v2->vfptr, 0, 0);
  v107 = (unsigned int)v106->vfptr;
  v108 = TextData3::Get(0x7F936B6Au);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v107 + 472))(v106, v108);
  v106->vfptr[60].__vecDelDtor((NiRefObject *)v106, 0);
  v106->vfptr[64].__vecDelDtor((NiRefObject *)v106, 1u);
  v109 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HideUI", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v110 = v109->m_pObject->m_uiHeight;
  v111 = v109->m_pObject->m_uiWidth;
  v112 = Font::Get(0);
  v113 = PgWinText::CreateWin(uiLeft, (int)pkFrameWork, v111, v110, v112, (PgWin *)&v2->vfptr, 0, 0);
  v114 = (unsigned int)v113->vfptr;
  v115 = TextData3::Get(0x989EAFBE);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v114 + 472))(v113, v115);
  v113->vfptr[60].__vecDelDtor((NiRefObject *)v113, 0);
  v113->vfptr[64].__vecDelDtor((NiRefObject *)v113, 1u);
  v116 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HideUINor", &uiLeft, (int *)&pkFrameWork, v10);
  PgSprData::Add(v116, (NiAVObject *)&spNode.m_pObject->vfptr, "HideUIClick");
  v117 = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v116, (PgWin *)&v2->vfptr, 0x14u, 0);
  v2->m_pkScreenShotCheck = v117;
  v117->vfptr[60].__vecDelDtor((NiRefObject *)v117, 1u);
  v2->m_pkScreenShotCheck->vfptr[64].__vecDelDtor((NiRefObject *)v2->m_pkScreenShotCheck, 1u);
  LOBYTE(v122) = 0;
  if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
    spTexProp.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spTexProp.m_pObject, 1u);
  v118 = spNode.m_pObject;
  v122 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v118 )
    v118->vfptr->__vecDelDtor((NiRefObject *)v118, 1u);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005B21B0) --------------------------------------------------------
void __stdcall OptionGraphicWin::OnLodAdjust(int nPos)
{
  MachineOpt::ms_kGraphicOption.fLODAdjust = 1.0 - (double)(nPos - 5) / 10.0;
  pkWorldCamera->m_fLODAdjust = MachineOpt::ms_kGraphicOption.fLODAdjust;
}

//----- (005B21F0) --------------------------------------------------------
void __thiscall OptionGraphicWin::OnWindowModCheck(OptionGraphicWin *this)
{
  bool v1; // zf@1

  this->m_pkWindowFullModeCheck->m_bCheck = this->m_pkWindowFullModeCheck->m_bCheck == 0;
  v1 = this->m_pkWindowFullModeCheck->m_bCheck == 0;
  GameFrameWork::ms_bWindowSizeChanged = 1;
  MachineOpt::ms_kGraphicOption.bWindowFullMode = v1;
}
// A8CAFD: using guessed type bool GameFrameWork::ms_bWindowSizeChanged;

//----- (005B2230) --------------------------------------------------------
void __thiscall OptionGraphicWin::SetWindowFullMode(OptionGraphicWin *this, bool bWinFullMode)
{
  MachineOpt::ms_kGraphicOption.bWindowFullMode = bWinFullMode;
  this->m_pkWindowFullModeCheck->m_bCheck = bWinFullMode;
}

//----- (005B2250) --------------------------------------------------------
void __thiscall OptionGraphicWin::SetMultiSampleCheck(OptionGraphicWin *this, bool bCheck)
{
  OptionGraphicWin *v2; // esi@1
  NiRefObjectVtbl *v3; // edi@1
  NiUnsharedGeometryGroup *v4; // eax@2

  v2 = this;
  this->m_pkMultiSampleCheck->m_bCheck = bCheck;
  v3 = this->m_pkMultiSampleTextWin->vfptr;
  if ( this->m_pkMultiSampleCheck->m_bCheck )
    v4 = TextData::Get(0x819379D4);
  else
    v4 = TextData::Get(0x8193BFCC);
  v3[118].__vecDelDtor((NiRefObject *)v2->m_pkMultiSampleTextWin, (unsigned int)v4);
}

//----- (005B22B0) --------------------------------------------------------
void __thiscall OptionGraphicWin::OnSlideClick(OptionGraphicWin *this, unsigned int uiID)
{
  int v2; // edx@1

  v2 = this->m_pkSlides[uiID]->m_nCurPos;
  if ( uiID )
  {
    if ( uiID == 1 )
    {
      MachineOpt::ms_kGraphicOption.fLODAdjust = 1.0 - (double)(v2 - 5) / 10.0;
      pkWorldCamera->m_fLODAdjust = MachineOpt::ms_kGraphicOption.fLODAdjust;
    }
    else if ( uiID == 2 )
    {
      OptionGraphicWin::OnCharShadowCnt(this->m_pkSlides[uiID]->m_nCurPos);
    }
  }
  else
  {
    OptionGraphicWin::OnViewLength(v2);
  }
}

//----- (005B2310) --------------------------------------------------------
void __thiscall OptionGraphicWin::SetInfo(OptionGraphicWin *this, MachineOpt::GraphicOption *kOption)
{
  OptionGraphicWin *v2; // edi@1
  char v3; // al@1
  NiRefObjectVtbl *v4; // ebx@4
  NiUnsharedGeometryGroup *v5; // eax@4
  unsigned int v6; // ST08_4@6
  bool v7; // al@6
  bool v8; // al@6
  Effect *v9; // eax@7
  bool v10; // al@9
  int bEnable; // [sp+Ch] [bp-108h]@0
  char string; // [sp+10h] [bp-104h]@6

  v2 = this;
  this->m_pkOutLineCheck->m_bCheck = kOption->bViewOutLine;
  OptionGraphicWin::SetViewLength(this, kOption->fViewTerrainRate);
  OptionGraphicWin::SetCharShadowCnt(v2, kOption->nCharShadowLevel);
  SlideBar::SetCurPos(v2->m_pkSlides[1], (signed int)((1.0 - kOption->fLODAdjust) * 10.0 + 5.0));
  v2->m_pkWindowFullModeCheck->m_bCheck = kOption->bWindowFullMode;
  v3 = 0;
  if ( kOption->ui_DisplayMultisample )
    v3 = 1;
  v2->m_pkMultiSampleCheck->m_bCheck = v3;
  if ( v2->m_pkMultiSampleCheck->m_bCheck )
  {
    v4 = v2->m_pkMultiSampleTextWin->vfptr;
    v5 = TextData::Get(0x819379D4);
  }
  else
  {
    v4 = v2->m_pkMultiSampleTextWin->vfptr;
    v5 = TextData::Get(0x8193BFCC);
  }
  v4[118].__vecDelDtor((NiRefObject *)v2->m_pkMultiSampleTextWin, (unsigned int)v5);
  v6 = kOption->ui_DisplayResolutionWidth;
  MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight = kOption->ui_DisplayResolutionHeight;
  MachineOpt::ms_kGraphicOption.ui_DisplayResolutionWidth = v6;
  sprintf(&string, "%i x %i", v6, MachineOpt::ms_kGraphicOption.ui_DisplayResolutionHeight);
  ((void (__stdcall *)(_DWORD))v2->m_pkResolutionTextWin->vfptr[118].__vecDelDtor)(&string);
  GameFrameWork::ms_uiDisResWidth = kOption->ui_DisplayResolutionWidth;
  GameFrameWork::ms_uiDisResHeight = kOption->ui_DisplayResolutionHeight;
  LOBYTE(bEnable) = kOption->bGlowEnable;
  v2->m_pkGlowEffectCheck->m_bCheck = bEnable;
  MachineOpt::SetGlowEffect(bEnable);
  v7 = kOption->bScreenShakeEnable;
  v2->m_pkScreenShakeEffectCheck->m_bCheck = v7;
  MachineOpt::ms_kGraphicOption.bScreenShakeEnable = v7;
  v8 = kOption->bCharAuraEffectEnable;
  v2->m_pkCharAuraEffectCheck->m_bCheck = v8;
  MachineOpt::ms_kGraphicOption.bCharAuraEffectEnable = v8;
  EffectMgr::AuraEffectEnable(&g_kEffectMgr, v8);
  if ( g_pkMainChar->m_kCharShape.m_kEquip.Equ_CosEff != -1 )
  {
    v9 = EffectMgr::FindAuraEffect(&g_kEffectMgr, g_pkMainChar->m_kHandle);
    if ( v9 )
      v9->vfptr[21].__vecDelDtor((NiRefObject *)v9, 0);
  }
  v10 = kOption->bScreenShotEnable;
  v2->m_pkScreenShotCheck->m_bCheck = v10;
  MachineOpt::ms_kGraphicOption.bScreenShotEnable = v10;
}

//----- (005B24F0) --------------------------------------------------------
void __thiscall OptionGraphicWin::OnMultiSampleCheck(OptionGraphicWin *this)
{
  OptionGraphicWin *v1; // esi@1
  ColumnBut *v2; // eax@1
  unsigned int v3; // edi@1
  NiRefObjectVtbl *v4; // ebx@3
  NiUnsharedGeometryGroup *v5; // eax@4

  v1 = this;
  v2 = this->m_pkMultiSampleCheck;
  v3 = 0;
  if ( !v2->m_bCheck )
    v3 = 1;
  v2->m_bCheck = v2->m_bCheck == 0;
  v4 = this->m_pkMultiSampleTextWin->vfptr;
  if ( this->m_pkMultiSampleCheck->m_bCheck )
    v5 = TextData::Get(0x819379D4);
  else
    v5 = TextData::Get(0x8193BFCC);
  v4[118].__vecDelDtor((NiRefObject *)v1->m_pkMultiSampleTextWin, (unsigned int)v5);
  MachineOpt::ms_kGraphicOption.ui_DisplayMultisample = v3;
  GameFrameWork::ms_bWindowSizeChanged = 1;
}
// A8CAFD: using guessed type bool GameFrameWork::ms_bWindowSizeChanged;

//----- (005B2560) --------------------------------------------------------
void __thiscall OptionGraphicWin::ResetInfo(OptionGraphicWin *this)
{
  OptionGraphicWin *v1; // esi@1
  MachineOpt::GraphicOption *v2; // edi@1

  v1 = this;
  v2 = &this->m_kOpenGraphicOption;
  MachineOpt::SetGraphicOption(&this->m_kOpenGraphicOption);
  OptionGraphicWin::SetInfo(v1, v2);
  GameFrameWork::ms_bWindowSizeChanged = 1;
}
// A8CAFD: using guessed type bool GameFrameWork::ms_bWindowSizeChanged;

//----- (005B2590) --------------------------------------------------------
void __thiscall OptionGraphicWin::OnCommand(OptionGraphicWin *this, unsigned int wParam, int lParam)
{
  bool v3; // dl@1

  v3 = this->m_bChangeOption;
  this->m_bChangeOption = 1;
  switch ( wParam )
  {
    case 0xBu:
      OptionGraphicWin::OnSlideClick(this, lParam);
      break;
    case 0xCu:
      OptionGraphicWin::OnOutLineCheck(this);
      break;
    case 0xDu:
      PgFrameWork::AddMsg(this->m_pkFrameWork, 0x8Du, 0, 0);
      break;
    case 0xEu:
      OptionGraphicWin::OnWindowModCheck(this);
      break;
    case 0xFu:
      OptionGraphicWin::OnMultiSampleCheck(this);
      break;
    case 0x10u:
      OptionGraphicWin::OnGlowEffectToggle(this);
      break;
    case 0x12u:
      OptionGraphicWin::OnShakeEffectToggle(this);
      break;
    case 0x13u:
      OptionGraphicWin::OnCharAuraEffectToggle(this);
      break;
    case 0x14u:
      OptionGraphicWin::OnScreenShotToggle(this);
      break;
    case 0x11u:
      return;
    default:
      this->m_bChangeOption = v3;
      break;
  }
}

//----- (005B2650) --------------------------------------------------------
void __thiscall OptionGraphicWin::OnWinClose(OptionGraphicWin *this)
{
  OptionGraphicWin *v1; // esi@1

  v1 = this;
  if ( this->m_bChangeOption )
  {
    MachineOpt::SetGraphicOption(&this->m_kOpenGraphicOption);
    OptionGraphicWin::SetInfo(v1, &v1->m_kOpenGraphicOption);
    GameFrameWork::ms_bWindowSizeChanged = 1;
  }
  v1->m_bChangeOption = 0;
}
// A8CAFD: using guessed type bool GameFrameWork::ms_bWindowSizeChanged;

//----- (005B2690) --------------------------------------------------------
void __thiscall OptionGraphicWin::OpenWin(OptionGraphicWin *this)
{
  OptionGraphicWin *v1; // ebx@1

  v1 = this;
  if ( this->m_pkOptionBaseWin )
  {
    qmemcpy(&this->m_kOpenGraphicOption, &MachineOpt::ms_kGraphicOption, sizeof(this->m_kOpenGraphicOption));
    OptionGraphicWin::SetInfo(this, &this->m_kOpenGraphicOption);
    v1->m_pkWindowFullModeCheck->m_bCheck = MachineOpt::ms_kGraphicOption.bWindowFullMode == 0;
    OptionBaseWin::SetMode(v1->m_pkOptionBaseWin, 1);
    ((void (__stdcall *)(_DWORD, _DWORD))v1->m_pkOptionBaseWin->vfptr[29].__vecDelDtor)(v1, 1);
    v1->vfptr[64].__vecDelDtor((NiRefObject *)v1, 1u);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkOptionBaseWin->vfptr);
  }
}

//----- (005B2720) --------------------------------------------------------
void __thiscall OptionGraphicWin::OnDefaultSetting(OptionGraphicWin *this)
{
  bool v1; // bl@1
  OptionGraphicWin *v2; // esi@1

  v1 = MachineOpt::ms_kGraphicOption.bWindowFullMode;
  v2 = this;
  MachineOpt::GraphicOption::SetDefault(&MachineOpt::ms_kGraphicOption);
  MachineOpt::SetGraphicOption(&MachineOpt::ms_kGraphicOption);
  OptionGraphicWin::SetInfo(v2, &MachineOpt::ms_kGraphicOption);
  v2->m_bChangeOption = 1;
  if ( MachineOpt::ms_kGraphicOption.bWindowFullMode != v1 )
    GameFrameWork::ms_bWindowSizeChanged = 1;
}
// A8CAFD: using guessed type bool GameFrameWork::ms_bWindowSizeChanged;

//----- (005B2770) --------------------------------------------------------
OptionGraphicWin *__cdecl OptionGraphicWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  OptionGraphicWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1B8u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWin::PgWin(v1);
    LOBYTE(v6) = 1;
    v2->vfptr = (NiRefObjectVtbl *)&OptionGraphicWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&OptionGraphicWin::`vftable'{for `IDirectMessenger'};
    MachineOpt::GraphicOption::GraphicOption((MachineOpt::GraphicOption *)((char *)v2[1].m_kLocal.m_Rotate.m_pEntry[0]
                                                                         + 1));
    LODWORD(v2[1].m_kWorld.m_Rotate.m_pEntry[1][0]) = 0;
    LOBYTE(v2[1].m_kLocal.m_Rotate.m_pEntry[0][0]) = 0;
    LODWORD(v2[1].m_kWorld.m_Rotate.m_pEntry[1][2]) = 0;
    LODWORD(v2[1].m_kWorldBound.m_fRadius) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[113].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (OptionGraphicWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9A9430: using guessed type void (__thiscall *OptionGraphicWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A944C: using guessed type int (__thiscall *OptionGraphicWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005B28E0) --------------------------------------------------------
OptionGraphicWin *__thiscall OptionGraphicWin::`vector deleting destructor'(OptionGraphicWin *this, unsigned int a2)
{
  OptionGraphicWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&OptionGraphicWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&OptionGraphicWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A9430: using guessed type void (__thiscall *OptionGraphicWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A944C: using guessed type int (__thiscall *OptionGraphicWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005B2920) --------------------------------------------------------
void __thiscall OptionSoundWin::OptionSoundWin(OptionSoundWin *this)
{
  OptionSoundWin *v1; // esi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->m_pkOptionBaseWin = 0;
  v1->m_bChangeOption = 0;
  v1->vfptr = (NiRefObjectVtbl *)&OptionSoundWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&OptionSoundWin::`vftable'{for `IDirectMessenger'};
}
// 9A9730: using guessed type void (__thiscall *OptionSoundWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A974C: using guessed type int (__thiscall *OptionSoundWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005B2950) --------------------------------------------------------
void __thiscall OptionSoundWin::~OptionSoundWin(OptionSoundWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&OptionSoundWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&OptionSoundWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
}
// 9A9730: using guessed type void (__thiscall *OptionSoundWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A974C: using guessed type int (__thiscall *OptionSoundWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005B2970) --------------------------------------------------------
void __thiscall OptionSoundWin::OnClose(OptionSoundWin *this)
{
  OptionSoundWin *v1; // esi@1
  MachineOpt::SoundOption *v2; // eax@1
  unsigned int v3; // edi@1
  unsigned int v4; // ebx@1
  int kOpt; // ST10_4@1
  int kOpt_4; // ST14_4@1
  unsigned int kOpt_20; // ST24_4@1
  float v8; // ST28_4@1
  float v9; // ST28_4@1
  float v10; // ST28_4@1
  float v11; // ST28_4@1

  v1 = this;
  v2 = MachineOpt::GetSoundOption();
  v3 = v2->uiBgVolume;
  v4 = v2->uiEffectVolume;
  kOpt = *(_DWORD *)&v2->kVersion.year;
  kOpt_4 = *(_DWORD *)&v2->kVersion.hour;
  kOpt_20 = v2->uiEnvEffectVolume;
  v8 = (double)v2->uiMasterVolume / 50.0;
  SoundMgr::SetMasterVolume(v8);
  v9 = (double)v3 / 50.0;
  SoundMgr::SetBgVolume(&g_kSoundMgr, v9);
  v10 = (double)v4 / 50.0;
  SoundMgr::SetEffectVolume(&g_kSoundMgr, v10);
  v11 = (double)kOpt_20 / 50.0;
  SoundMgr::SetEnvEffectVolume(&g_kSoundMgr, v11);
  v1->m_bChangeOption = 0;
}

//----- (005B2A50) --------------------------------------------------------
void __thiscall OptionSoundWin::SetInfo(OptionSoundWin *this, MachineOpt::SoundOption *kOption)
{
  OptionSoundWin *v2; // esi@1

  v2 = this;
  SlideBar::SetCurPos(this->m_pkSlides[0], kOption->uiMasterVolume);
  SlideBar::SetCurPos(v2->m_pkSlides[1], kOption->uiBgVolume);
  SlideBar::SetCurPos(v2->m_pkSlides[2], kOption->uiEffectVolume);
  SlideBar::SetCurPos(v2->m_pkSlides[3], kOption->uiEnvEffectVolume);
}

//----- (005B2AA0) --------------------------------------------------------
void __thiscall OptionSoundWin::OnMasterVolume(OptionSoundWin *this, unsigned int uiVol)
{
  OptionSoundWin *v2; // ebx@1
  int v3; // edi@1
  signed int v4; // esi@1
  SlideBar *v5; // ecx@2
  float uiVola; // [sp+18h] [bp+8h]@1

  v2 = this;
  uiVola = (double)uiVol / 50.0;
  SoundMgr::SetMasterVolume(uiVola);
  v3 = v2->m_pkSlides[0]->m_nCurPos;
  v4 = 1;
  do
  {
    v5 = v2->m_pkSlides[v4];
    if ( v3 < v5->m_nCurPos )
    {
      SlideBar::SetCurPos(v5, v3);
      switch ( v4 )
      {
        case 1:
          SoundMgr::SetBgVolume(&g_kSoundMgr, uiVola);
          break;
        case 2:
          SoundMgr::SetEffectVolume(&g_kSoundMgr, uiVola);
          break;
        case 3:
          SoundMgr::SetEnvEffectVolume(&g_kSoundMgr, uiVola);
          break;
      }
    }
    ++v4;
  }
  while ( v4 < 4 );
}

//----- (005B2B60) --------------------------------------------------------
void __thiscall OptionSoundWin::OnBgVolume(OptionSoundWin *this, unsigned int uiVol)
{
  OptionSoundWin *v2; // esi@1
  double v3; // [sp+8h] [bp-8h]@1
  float uiVola; // [sp+18h] [bp+8h]@3

  v2 = this;
  v3 = (double)uiVol / 50.0;
  if ( SoundGroup::GetMasterGain() < v3 )
    SlideBar::SetCurPos(v2->m_pkSlides[1], v2->m_pkSlides[0]->m_nCurPos);
  uiVola = v3;
  SoundMgr::SetBgVolume(&g_kSoundMgr, uiVola);
}

//----- (005B2BD0) --------------------------------------------------------
void __thiscall OptionSoundWin::OnEffectVolume(OptionSoundWin *this, unsigned int uiVol)
{
  OptionSoundWin *v2; // esi@1
  double v3; // [sp+8h] [bp-8h]@1
  float uiVola; // [sp+18h] [bp+8h]@3

  v2 = this;
  v3 = (double)uiVol / 50.0;
  if ( SoundGroup::GetMasterGain() < v3 )
    SlideBar::SetCurPos(v2->m_pkSlides[2], v2->m_pkSlides[0]->m_nCurPos);
  uiVola = v3;
  SoundMgr::SetEffectVolume(&g_kSoundMgr, uiVola);
}

//----- (005B2C40) --------------------------------------------------------
void __thiscall OptionSoundWin::OnEnvEffectVolume(OptionSoundWin *this, unsigned int uiVol)
{
  OptionSoundWin *v2; // esi@1
  double v3; // [sp+8h] [bp-8h]@1
  float uiVola; // [sp+18h] [bp+8h]@3

  v2 = this;
  v3 = (double)uiVol / 50.0;
  if ( SoundGroup::GetMasterGain() < v3 )
    SlideBar::SetCurPos(v2->m_pkSlides[3], v2->m_pkSlides[0]->m_nCurPos);
  uiVola = v3;
  SoundMgr::SetEnvEffectVolume(&g_kSoundMgr, uiVola);
}

//----- (005B2CB0) --------------------------------------------------------
void __thiscall OptionSoundWin::OnApply(OptionSoundWin *this)
{
  OptionSoundWin *v1; // esi@1
  SlideBar *v2; // edx@1
  SlideBar *v3; // ecx@1
  SlideBar *v4; // eax@1
  MachineOpt::SoundOption kOpt; // [sp+4h] [bp-18h]@1

  v1 = this;
  this->m_bChangeOption = 0;
  MachineOpt::SoundOption::SoundOption(&kOpt);
  v2 = v1->m_pkSlides[1];
  kOpt.uiMasterVolume = v1->m_pkSlides[0]->m_nCurPos;
  v3 = v1->m_pkSlides[2];
  kOpt.uiBgVolume = v2->m_nCurPos;
  v4 = v1->m_pkSlides[3];
  kOpt.uiEffectVolume = v3->m_nCurPos;
  kOpt.uiEnvEffectVolume = v4->m_nCurPos;
  MachineOpt::SetSoundOption(&kOpt);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkOptionBaseWin->vfptr);
}

//----- (005B2D30) --------------------------------------------------------
void __thiscall OptionSoundWin::CloseWin(OptionSoundWin *this)
{
  OptionSoundWin *v1; // esi@1
  void (__thiscall ***v2)(_DWORD, _DWORD); // edi@3
  int v3; // [sp+4h] [bp-4h]@2

  v1 = this;
  if ( this->m_pkOptionBaseWin )
  {
    ((void (__stdcall *)(int *, OptionSoundWin *))this->m_pkOptionBaseWin->vfptr[30].__vecDelDtor)(&v3, this);
    if ( v3 )
    {
      v2 = (void (__thiscall ***)(_DWORD, _DWORD))v3;
      if ( !InterlockedDecrement((volatile LONG *)(v3 + 4)) )
      {
        if ( v2 )
          (**v2)(v2, 1);
      }
    }
    v1->vfptr[64].__vecDelDtor((NiRefObject *)v1, 0);
  }
}

//----- (005B2D90) --------------------------------------------------------
void __thiscall OptionSoundWin::OpenWin(OptionSoundWin *this)
{
  OptionSoundWin *v1; // esi@1
  MachineOpt::SoundOption *v2; // edi@2

  v1 = this;
  if ( this->m_pkOptionBaseWin )
  {
    v2 = MachineOpt::GetSoundOption();
    SlideBar::SetCurPos(v1->m_pkSlides[0], v2->uiMasterVolume);
    SlideBar::SetCurPos(v1->m_pkSlides[1], v2->uiBgVolume);
    SlideBar::SetCurPos(v1->m_pkSlides[2], v2->uiEffectVolume);
    SlideBar::SetCurPos(v1->m_pkSlides[3], v2->uiEnvEffectVolume);
    OptionBaseWin::SetMode(v1->m_pkOptionBaseWin, 2);
    ((void (__stdcall *)(_DWORD, _DWORD))v1->m_pkOptionBaseWin->vfptr[29].__vecDelDtor)(v1, 1);
    v1->vfptr[64].__vecDelDtor((NiRefObject *)v1, 1u);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkOptionBaseWin->vfptr);
  }
}

//----- (005B2E30) --------------------------------------------------------
void __thiscall OptionSoundWin::OnDefaultSetting(OptionSoundWin *this)
{
  OptionSoundWin *v1; // esi@1
  MachineOpt::SoundOption *v2; // edi@1
  MachineOpt::SoundOption *v3; // eax@1
  unsigned int v4; // edi@1
  unsigned int v5; // ebx@1
  int kOpt; // ST10_4@1
  int kOpt_4; // ST14_4@1
  unsigned int kOpt_20; // ST24_4@1
  float v9; // ST28_4@1
  float v10; // ST28_4@1
  float v11; // ST28_4@1
  float v12; // ST28_4@1

  v1 = this;
  MachineOpt::SetDefaultSoundOption();
  v2 = MachineOpt::GetSoundOption();
  SlideBar::SetCurPos(v1->m_pkSlides[0], v2->uiMasterVolume);
  SlideBar::SetCurPos(v1->m_pkSlides[1], v2->uiBgVolume);
  SlideBar::SetCurPos(v1->m_pkSlides[2], v2->uiEffectVolume);
  SlideBar::SetCurPos(v1->m_pkSlides[3], v2->uiEnvEffectVolume);
  v3 = MachineOpt::GetSoundOption();
  v4 = v3->uiBgVolume;
  v5 = v3->uiEffectVolume;
  kOpt = *(_DWORD *)&v3->kVersion.year;
  kOpt_4 = *(_DWORD *)&v3->kVersion.hour;
  kOpt_20 = v3->uiEnvEffectVolume;
  v9 = (double)v3->uiMasterVolume / 50.0;
  SoundMgr::SetMasterVolume(v9);
  v10 = (double)v4 / 50.0;
  SoundMgr::SetBgVolume(&g_kSoundMgr, v10);
  v11 = (double)v5 / 50.0;
  SoundMgr::SetEffectVolume(&g_kSoundMgr, v11);
  v12 = (double)kOpt_20 / 50.0;
  SoundMgr::SetEnvEffectVolume(&g_kSoundMgr, v12);
  v1->m_bChangeOption = 1;
}

//----- (005B2F60) --------------------------------------------------------
char __thiscall OptionSoundWin::Create(OptionSoundWin *this, PgFrameWork *pkFrameWork)
{
  OptionSoundWin *v2; // esi@1
  NiRefObjectVtbl *v3; // edx@1
  NiTexturePalette *v4; // edi@1
  const char *v5; // eax@3
  char result; // al@4
  PgSprData *v7; // eax@5
  PgWinSpr *v8; // eax@5
  NiPointer<PgSprData::PgHitTester> *v9; // ecx@5
  unsigned int v10; // edi@5
  unsigned int v11; // ebx@5
  PgFont *v12; // eax@5
  PgWinText *v13; // edi@5
  NiRefObjectVtbl *v14; // ebx@5
  NiUnsharedGeometryGroup *v15; // eax@5
  PgSprData::PgHitTester *v16; // eax@5
  unsigned int v17; // edi@5
  unsigned int v18; // ebx@5
  PgFont *v19; // eax@5
  PgWinText *v20; // edi@5
  NiRefObjectVtbl *v21; // ebx@5
  NiUnsharedGeometryGroup *v22; // eax@5
  NiPointer<PgSprData::PgHitTester> *v23; // ecx@5
  unsigned int v24; // edi@5
  unsigned int v25; // ebx@5
  PgFont *v26; // eax@5
  PgWinText *v27; // edi@5
  NiRefObjectVtbl *v28; // ebx@5
  NiUnsharedGeometryGroup *v29; // eax@5
  PgSprData::PgHitTester *v30; // eax@5
  unsigned int v31; // edi@5
  unsigned int v32; // ebx@5
  PgFont *v33; // eax@5
  PgWinText *v34; // edi@5
  NiRefObjectVtbl *v35; // ebx@5
  NiUnsharedGeometryGroup *v36; // eax@5
  PgSprData *v37; // eax@5
  PgSprData *v38; // edi@5
  SlideBar *v39; // eax@5
  SlideBar *v40; // eax@5
  SlideBar *v41; // eax@5
  SlideBar *v42; // eax@5
  PgFrameWork *v43; // esi@6
  int uiLeft; // [sp+10h] [bp-14h]@5
  int uiTop; // [sp+14h] [bp-10h]@5
  int v46; // [sp+20h] [bp-4h]@1

  v2 = this;
  v3 = this->vfptr;
  this->m_pkFrameWork = pkFrameWork;
  ((void (__stdcall *)(signed int))v3[43].__vecDelDtor)(-15);
  v2->vfptr[44].__vecDelDtor((NiRefObject *)v2, 0);
  v2->vfptr[38].__vecDelDtor((NiRefObject *)v2, 0);
  v2->vfptr[39].__vecDelDtor((NiRefObject *)v2, 0);
  v2->vfptr[35].__vecDelDtor((NiRefObject *)v2, (unsigned int)&unk_9A9628);
  v2->vfptr[75].__vecDelDtor((NiRefObject *)v2, 0);
  v2->vfptr[60].__vecDelDtor((NiRefObject *)v2, 0);
  v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 1u);
  pkFrameWork = 0;
  v4 = pTexturePalette;
  v46 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "Game\\Option_Sound.nif");
  PgUtil::LoadNodeNifFile(v5, (NiPointer<NiNode> *)&pkFrameWork, v4);
  if ( pkFrameWork )
  {
    v7 = PgSprData::Create((NiAVObject *)pkFrameWork, "Panel_Sound", &uiLeft, &uiTop, 0);
    v8 = PgWinSpr::CreateWin(uiLeft, uiTop, v7, (PgWin *)&v2->vfptr, 0, 0);
    v8->vfptr[60].__vecDelDtor((NiRefObject *)v8, 0);
    v9 = PgSprData::Create((NiAVObject *)pkFrameWork, "ToSdOpt", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
    v10 = v9->m_pObject->m_uiHeight;
    v11 = v9->m_pObject->m_uiWidth;
    v12 = Font::Get(0);
    v13 = PgWinText::CreateWin(uiLeft, uiTop + 1, v11, v10, v12, (PgWin *)&v2->vfptr, 0, 0);
    v13->vfptr[122].__vecDelDtor((NiRefObject *)v13, 4u);
    v14 = v13->vfptr;
    v15 = TextData::Get(0x2A7B899Cu);
    v14[118].__vecDelDtor((NiRefObject *)v13, (unsigned int)v15);
    v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
    v16 = PgSprData::Create((NiAVObject *)pkFrameWork, "BaGdOpt", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
    v17 = v16->m_uiHeight;
    v18 = v16->m_uiWidth;
    v19 = Font::Get(0);
    v20 = PgWinText::CreateWin(uiLeft, uiTop + 1, v18, v17, v19, (PgWin *)&v2->vfptr, 0, 0);
    v20->vfptr[122].__vecDelDtor((NiRefObject *)v20, 4u);
    v21 = v20->vfptr;
    v22 = TextData::Get(0xDE2B3549);
    v21[118].__vecDelDtor((NiRefObject *)v20, (unsigned int)v22);
    v20->vfptr[60].__vecDelDtor((NiRefObject *)v20, 0);
    v23 = PgSprData::Create((NiAVObject *)pkFrameWork, "EfSdOpt", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
    v24 = v23->m_pObject->m_uiHeight;
    v25 = v23->m_pObject->m_uiWidth;
    v26 = Font::Get(0);
    v27 = PgWinText::CreateWin(uiLeft, uiTop + 1, v25, v24, v26, (PgWin *)&v2->vfptr, 0, 0);
    v27->vfptr[122].__vecDelDtor((NiRefObject *)v27, 4u);
    v28 = v27->vfptr;
    v29 = TextData::Get(0x31717A8Fu);
    v28[118].__vecDelDtor((NiRefObject *)v27, (unsigned int)v29);
    v27->vfptr[60].__vecDelDtor((NiRefObject *)v27, 0);
    v30 = PgSprData::Create((NiAVObject *)pkFrameWork, "EnEfOpt", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
    v31 = v30->m_uiHeight;
    v32 = v30->m_uiWidth;
    v33 = Font::Get(0);
    v34 = PgWinText::CreateWin(uiLeft, uiTop + 1, v32, v31, v33, (PgWin *)&v2->vfptr, 0, 0);
    v34->vfptr[122].__vecDelDtor((NiRefObject *)v34, 4u);
    v35 = v34->vfptr;
    v36 = TextData::Get(0x9380AED3);
    v35[118].__vecDelDtor((NiRefObject *)v34, (unsigned int)v36);
    v34->vfptr[60].__vecDelDtor((NiRefObject *)v34, 0);
    v37 = PgSprData::Create((NiAVObject *)pkFrameWork, "MovingPoint", &uiLeft, &uiTop, 0);
    v38 = v37;
    v39 = SlideBar::CreateWin(
            (NiNode *)pkFrameWork,
            "ToSdOptBar",
            "ToSdOptBarLow",
            "ToSdOptBarHigh",
            v37,
            0,
            (PgWin *)&v2->vfptr);
    v2->m_pkSlides[0] = v39;
    v39->m_uiClickMsg = 11;
    SlideBar::SetSplitCnt(v2->m_pkSlides[0], 51);
    SlideBar::SetCurPos(v2->m_pkSlides[0], 4);
    v40 = SlideBar::CreateWin(
            (NiNode *)pkFrameWork,
            "BaGdOptBar",
            "BaGdOptBarLow",
            "BaGdOptBarHigh",
            v38,
            1u,
            (PgWin *)&v2->vfptr);
    v2->m_pkSlides[1] = v40;
    v40->m_uiClickMsg = 11;
    SlideBar::SetSplitCnt(v2->m_pkSlides[1], 51);
    SlideBar::SetCurPos(v2->m_pkSlides[1], 4);
    v41 = SlideBar::CreateWin(
            (NiNode *)pkFrameWork,
            "EfSdOptBar",
            "EfSdOptBarLow",
            "EfSdOptBarHigh",
            v38,
            2u,
            (PgWin *)&v2->vfptr);
    v2->m_pkSlides[2] = v41;
    v41->m_uiClickMsg = 11;
    SlideBar::SetSplitCnt(v2->m_pkSlides[2], 51);
    SlideBar::SetCurPos(v2->m_pkSlides[2], 4);
    v42 = SlideBar::CreateWin(
            (NiNode *)pkFrameWork,
            "EnEfOptBar",
            "EnEfOptBarLow",
            "EnEfOptBarHigh",
            v38,
            3u,
            (PgWin *)&v2->vfptr);
    v2->m_pkSlides[3] = v42;
    v42->m_uiClickMsg = 11;
    SlideBar::SetSplitCnt(v2->m_pkSlides[3], 51);
    SlideBar::SetCurPos(v2->m_pkSlides[3], 4);
    v46 = -1;
    if ( pkFrameWork )
    {
      v43 = pkFrameWork;
      if ( !InterlockedDecrement((volatile LONG *)&pkFrameWork->m_pkMsgHooker) )
      {
        if ( v43 )
          v43->vfptr->SetMsgHooker((IDirectMessenger *)v43, (IDirectMessenger *)1);
      }
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005B3410) --------------------------------------------------------
void __thiscall OptionSoundWin::OnSlideClick(OptionSoundWin *this, unsigned int uiID)
{
  switch ( uiID )
  {
    case 0u:
      OptionSoundWin::OnMasterVolume(this, this->m_pkSlides[uiID]->m_nCurPos);
      break;
    case 1u:
      OptionSoundWin::OnBgVolume(this, this->m_pkSlides[uiID]->m_nCurPos);
      break;
    case 2u:
      OptionSoundWin::OnEffectVolume(this, this->m_pkSlides[uiID]->m_nCurPos);
      break;
    case 3u:
      OptionSoundWin::OnEnvEffectVolume(this, this->m_pkSlides[uiID]->m_nCurPos);
      break;
    default:
      return;
  }
}

//----- (005B3470) --------------------------------------------------------
void __thiscall OptionSoundWin::OnCommand(OptionSoundWin *this, unsigned int wParam, int lParam)
{
  bool v3; // al@1

  v3 = this->m_bChangeOption;
  this->m_bChangeOption = 1;
  if ( wParam == 11 )
  {
    switch ( lParam )
    {
      case 0:
        OptionSoundWin::OnMasterVolume(this, this->m_pkSlides[lParam]->m_nCurPos);
        break;
      case 1:
        OptionSoundWin::OnBgVolume(this, this->m_pkSlides[lParam]->m_nCurPos);
        break;
      case 2:
        OptionSoundWin::OnEffectVolume(this, this->m_pkSlides[lParam]->m_nCurPos);
        break;
      case 3:
        OptionSoundWin::OnEnvEffectVolume(this, this->m_pkSlides[lParam]->m_nCurPos);
        break;
      default:
        return;
    }
  }
  else
  {
    this->m_bChangeOption = v3;
  }
}

//----- (005B34F0) --------------------------------------------------------
OptionSoundWin *__cdecl OptionSoundWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  OptionSoundWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x13Cu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWin::PgWin(v1);
    v2->vfptr = (NiRefObjectVtbl *)&OptionSoundWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&OptionSoundWin::`vftable'{for `IDirectMessenger'};
    v2[1].m_uiExtraDataSize = 0;
    LOBYTE(v2[1].m_ppkExtra) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[113].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (OptionSoundWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9A9730: using guessed type void (__thiscall *OptionSoundWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A974C: using guessed type int (__thiscall *OptionSoundWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005B3640) --------------------------------------------------------
OptionSoundWin *__thiscall OptionSoundWin::`vector deleting destructor'(OptionSoundWin *this, unsigned int a2)
{
  OptionSoundWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&OptionSoundWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&OptionSoundWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A9730: using guessed type void (__thiscall *OptionSoundWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A974C: using guessed type int (__thiscall *OptionSoundWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005B3680) --------------------------------------------------------
void __thiscall OptionSystemWin::OptionSystemWin(OptionSystemWin *this)
{
  OptionSystemWin *v1; // esi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&OptionSystemWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&OptionSystemWin::`vftable'{for `IDirectMessenger'};
  MachineOpt::GameOption::GameOption(&v1->m_kOpenGameOption);
  v1->m_pkOptionBaseWin = 0;
  v1->m_bChangeOption = 0;
}
// 9A9D10: using guessed type void (__thiscall *OptionSystemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A9D2C: using guessed type int (__thiscall *OptionSystemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005B3700) --------------------------------------------------------
void __thiscall OptionSystemWin::~OptionSystemWin(OptionSystemWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&OptionSystemWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&OptionSystemWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
}
// 9A9D10: using guessed type void (__thiscall *OptionSystemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A9D2C: using guessed type int (__thiscall *OptionSystemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005B3720) --------------------------------------------------------
void __thiscall OptionSystemWin::OnApply(OptionSystemWin *this)
{
  OptionSystemWin *v1; // esi@1
  OptionBaseWin *v2; // ST00_4@1
  PgFrameWork *v3; // ecx@1

  v1 = this;
  v2 = this->m_pkOptionBaseWin;
  this->m_bChangeOption = 0;
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
  v3 = v1->m_pkFrameWork;
  GameFrameWork::OnSaveServerGameOption();
}

//----- (005B3750) --------------------------------------------------------
void __thiscall OptionSystemWin::OnDefaultSetting(OptionSystemWin *this)
{
  OptionSystemWin *v1; // esi@1

  v1 = this;
  GameFrameWork::SendDefaultGameOpt((GameFrameWork *)this->m_pkFrameWork);
  v1->m_bChangeOption = 1;
}

//----- (005B3770) --------------------------------------------------------
void __thiscall OptionSystemWin::OnMyNameCheck(OptionSystemWin *this)
{
  this->m_pkMyNameCheck->m_bCheck = this->m_pkMyNameCheck->m_bCheck == 0;
  byte_B4FF66 = this->m_pkMyNameCheck->m_bCheck;
}
// B4FF66: using guessed type char byte_B4FF66;

//----- (005B37A0) --------------------------------------------------------
void __thiscall OptionSystemWin::OnOtherCharNameCheck(OptionSystemWin *this)
{
  this->m_pkOtherCharNameCheck->m_bCheck = this->m_pkOtherCharNameCheck->m_bCheck == 0;
  byte_B4FF67 = this->m_pkOtherCharNameCheck->m_bCheck;
}
// B4FF67: using guessed type char byte_B4FF67;

//----- (005B37D0) --------------------------------------------------------
void __thiscall OptionSystemWin::OnNpcNameCheck(OptionSystemWin *this)
{
  this->m_pkNpcNameCheck->m_bCheck = this->m_pkNpcNameCheck->m_bCheck == 0;
  byte_B4FF68 = this->m_pkNpcNameCheck->m_bCheck;
}
// B4FF68: using guessed type char byte_B4FF68;

//----- (005B3800) --------------------------------------------------------
void __thiscall OptionSystemWin::OnMonsterNameCheck(OptionSystemWin *this)
{
  this->m_pkMonsterNameCheck->m_bCheck = this->m_pkMonsterNameCheck->m_bCheck == 0;
  byte_B4FF69 = this->m_pkMonsterNameCheck->m_bCheck;
}
// B4FF69: using guessed type char byte_B4FF69;

//----- (005B3830) --------------------------------------------------------
void __thiscall OptionSystemWin::OnItemNameCheck(OptionSystemWin *this)
{
  this->m_pkItemNameCheck->m_bCheck = this->m_pkItemNameCheck->m_bCheck == 0;
  byte_B4FF6A = this->m_pkItemNameCheck->m_bCheck;
}
// B4FF6A: using guessed type char byte_B4FF6A;

//----- (005B3860) --------------------------------------------------------
void __thiscall OptionSystemWin::OnHPCheck(OptionSystemWin *this)
{
  this->m_pkHPCheck->m_bCheck = this->m_pkHPCheck->m_bCheck == 0;
  byte_B4FF6B = this->m_pkHPCheck->m_bCheck;
}
// B4FF6B: using guessed type char byte_B4FF6B;

//----- (005B3890) --------------------------------------------------------
void __thiscall OptionSystemWin::OnSPCheck(OptionSystemWin *this)
{
  this->m_pkSPCheck->m_bCheck = this->m_pkSPCheck->m_bCheck == 0;
  byte_B4FF6C = this->m_pkSPCheck->m_bCheck;
}
// B4FF6C: using guessed type char byte_B4FF6C;

//----- (005B38C0) --------------------------------------------------------
void __thiscall OptionSystemWin::OnInterfaceCheck(OptionSystemWin *this)
{
  this->m_pkInterfaceCheck->m_bCheck = this->m_pkInterfaceCheck->m_bCheck == 0;
  byte_B4FF6D = this->m_pkInterfaceCheck->m_bCheck;
}
// B4FF6D: using guessed type char byte_B4FF6D;

//----- (005B38F0) --------------------------------------------------------
void __thiscall OptionSystemWin::OnSpeechCheck(OptionSystemWin *this)
{
  this->m_pkSpeechCheck->m_bCheck = this->m_pkSpeechCheck->m_bCheck == 0;
  byte_B4FF6E = this->m_pkSpeechCheck->m_bCheck;
}
// B4FF6E: using guessed type char byte_B4FF6E;

//----- (005B3920) --------------------------------------------------------
void __usercall OptionSystemWin::OnInterfacePosCheck(OptionSystemWin *this@<ecx>, signed int a2@<esi>)
{
  this->m_pkInterfacePosCheck->m_bCheck = this->m_pkInterfacePosCheck->m_bCheck == 0;
  byte_B4FF6F = this->m_pkInterfacePosCheck->m_bCheck;
  if ( this->m_pkInterfacePosCheck->m_bCheck )
    GameFrameWork::ChangeWinDefaultPos((GameFrameWork *)this->m_pkFrameWork, a2);
}
// B4FF6F: using guessed type char byte_B4FF6F;

//----- (005B3970) --------------------------------------------------------
void __thiscall OptionSystemWin::OnChattingHideCheck(OptionSystemWin *this)
{
  this->m_pkChattingHideCheck->m_bCheck = this->m_pkChattingHideCheck->m_bCheck == 0;
  byte_B4FF8E = this->m_pkChattingHideCheck->m_bCheck;
}
// B4FF8E: using guessed type char byte_B4FF8E;

//----- (005B39A0) --------------------------------------------------------
void __thiscall OptionSystemWin::OnWisCheck(OptionSystemWin *this)
{
  this->m_pkWisRejCheck->m_bCheck = this->m_pkWisRejCheck->m_bCheck == 0;
  byte_B4FF70 = this->m_pkWisRejCheck->m_bCheck;
}
// B4FF70: using guessed type char byte_B4FF70;

//----- (005B39D0) --------------------------------------------------------
void __thiscall OptionSystemWin::OnTrdCheck(OptionSystemWin *this)
{
  this->m_pkTrdRejCheck->m_bCheck = this->m_pkTrdRejCheck->m_bCheck == 0;
  byte_B4FF71 = this->m_pkTrdRejCheck->m_bCheck;
}
// B4FF71: using guessed type char byte_B4FF71;

//----- (005B3A00) --------------------------------------------------------
void __thiscall OptionSystemWin::OnParCheck(OptionSystemWin *this)
{
  this->m_pkParRejCheck->m_bCheck = this->m_pkParRejCheck->m_bCheck == 0;
  byte_B4FF72 = this->m_pkParRejCheck->m_bCheck;
}
// B4FF72: using guessed type char byte_B4FF72;

//----- (005B3A30) --------------------------------------------------------
void __thiscall OptionSystemWin::OnAgCheck(OptionSystemWin *this)
{
  this->m_pkAgRejCheck->m_bCheck = this->m_pkAgRejCheck->m_bCheck == 0;
  byte_B4FF73 = this->m_pkAgRejCheck->m_bCheck;
}
// B4FF73: using guessed type char byte_B4FF73;

//----- (005B3A60) --------------------------------------------------------
void __thiscall OptionSystemWin::OnSystemMsgCheck(OptionSystemWin *this)
{
  this->m_pkSystemMsgCheck->m_bCheck = this->m_pkSystemMsgCheck->m_bCheck == 0;
  byte_B4FF74 = this->m_pkSystemMsgCheck->m_bCheck;
}
// B4FF74: using guessed type char byte_B4FF74;

//----- (005B3A90) --------------------------------------------------------
void __thiscall OptionSystemWin::OnOKMsgBoxCheck(OptionSystemWin *this)
{
  this->m_pkOKMsgBoxCheck->m_bCheck = this->m_pkOKMsgBoxCheck->m_bCheck == 0;
  byte_B4FF75 = this->m_pkOKMsgBoxCheck->m_bCheck;
}
// B4FF75: using guessed type char byte_B4FF75;

//----- (005B3AC0) --------------------------------------------------------
void __thiscall OptionSystemWin::OnChatInputCheck(OptionSystemWin *this)
{
  this->m_pkChatInputCheck->m_bCheck = this->m_pkChatInputCheck->m_bCheck == 0;
  byte_B4FF90 = this->m_pkChatInputCheck->m_bCheck;
}
// B4FF90: using guessed type char byte_B4FF90;

//----- (005B3AF0) --------------------------------------------------------
void __thiscall OptionSystemWin::OnNamePanelCheck(OptionSystemWin *this)
{
  this->m_pkNamePanelCheck->m_bCheck = this->m_pkNamePanelCheck->m_bCheck == 0;
  byte_B4FF93 = this->m_pkNamePanelCheck->m_bCheck;
  ScreenBDMgr::InitCharBD(&g_kScrnBDMgr, byte_B4FF93);
}
// B4FF93: using guessed type char byte_B4FF93;

//----- (005B3B30) --------------------------------------------------------
void __thiscall OptionSystemWin::OnBasicInfoTipCheck(OptionSystemWin *this)
{
  this->m_pkBasicInfoTipCheck->m_bCheck = this->m_pkBasicInfoTipCheck->m_bCheck == 0;
  byte_B4FF94 = this->m_pkBasicInfoTipCheck->m_bCheck;
}
// B4FF94: using guessed type char byte_B4FF94;

//----- (005B3B60) --------------------------------------------------------
void __thiscall OptionSystemWin::OnPlayGuideCheck(OptionSystemWin *this)
{
  bool v1; // al@1
  GameFrameWork *v2; // ecx@1

  this->m_pkPlayGuideCheck->m_bCheck = this->m_pkPlayGuideCheck->m_bCheck == 0;
  v1 = this->m_pkPlayGuideCheck->m_bCheck;
  byte_B4FF95 = this->m_pkPlayGuideCheck->m_bCheck;
  v2 = (GameFrameWork *)this->m_pkFrameWork;
  if ( v2 )
  {
    if ( v1 )
      GameFrameWork::OpenPlayGuideMinWin(v2);
    else
      GameFrameWork::ClosePlayGuideMinWin(v2);
  }
}
// B4FF95: using guessed type char byte_B4FF95;

//----- (005B3BA0) --------------------------------------------------------
void __thiscall OptionSystemWin::OnAutoStack(OptionSystemWin *this)
{
  OptionSystemWin *v1; // eax@1
  PgFrameWork *v2; // ecx@1
  InventoryWin *v3; // ecx@2

  v1 = this;
  this->m_pkAutoStack->m_bCheck = this->m_pkAutoStack->m_bCheck == 0;
  byte_B4FF96 = this->m_pkAutoStack->m_bCheck;
  v2 = this->m_pkFrameWork;
  if ( v2 )
  {
    v3 = (InventoryWin *)v2[19].m_BackFrameID;
    if ( v3 )
      InventoryWin::SetEnableAutoArrange(v3, v1->m_pkAutoStack->m_bCheck);
  }
}
// B4FF96: using guessed type char byte_B4FF96;

//----- (005B3C00) --------------------------------------------------------
void __thiscall OptionSystemWin::CloseWin(OptionSystemWin *this)
{
  OptionSystemWin *v1; // esi@1
  void (__thiscall ***v2)(_DWORD, _DWORD); // edi@3
  int v3; // [sp+4h] [bp-4h]@2

  v1 = this;
  if ( this->m_pkOptionBaseWin )
  {
    ((void (__stdcall *)(int *, OptionSystemWin *))this->m_pkOptionBaseWin->vfptr[30].__vecDelDtor)(&v3, this);
    if ( v3 )
    {
      v2 = (void (__thiscall ***)(_DWORD, _DWORD))v3;
      if ( !InterlockedDecrement((volatile LONG *)(v3 + 4)) )
      {
        if ( v2 )
          (**v2)(v2, 1);
      }
    }
    v1->vfptr[64].__vecDelDtor((NiRefObject *)v1, 0);
  }
}

//----- (005B3C60) --------------------------------------------------------
void __thiscall OptionSystemWin::SetMyNameCheck(OptionSystemWin *this, bool b)
{
  this->m_pkMyNameCheck->m_bCheck = b;
}

//----- (005B3C80) --------------------------------------------------------
void __thiscall OptionSystemWin::SetOtherCharNameCheck(OptionSystemWin *this, bool b)
{
  this->m_pkOtherCharNameCheck->m_bCheck = b;
}

//----- (005B3CA0) --------------------------------------------------------
void __thiscall OptionSystemWin::SetNpcNameCheck(OptionSystemWin *this, bool b)
{
  this->m_pkNpcNameCheck->m_bCheck = b;
}

//----- (005B3CC0) --------------------------------------------------------
void __thiscall OptionSystemWin::SetMonsterNameCheck(OptionSystemWin *this, bool b)
{
  this->m_pkMonsterNameCheck->m_bCheck = b;
}

//----- (005B3CE0) --------------------------------------------------------
void __thiscall OptionSystemWin::SetItemNameCheck(OptionSystemWin *this, bool b)
{
  this->m_pkItemNameCheck->m_bCheck = b;
}

//----- (005B3D00) --------------------------------------------------------
void __thiscall OptionSystemWin::SetHPCheck(OptionSystemWin *this, bool b)
{
  this->m_pkHPCheck->m_bCheck = b;
}

//----- (005B3D20) --------------------------------------------------------
void __thiscall OptionSystemWin::SetSPCheck(OptionSystemWin *this, bool b)
{
  this->m_pkSPCheck->m_bCheck = b;
}

//----- (005B3D40) --------------------------------------------------------
void __thiscall OptionSystemWin::SetInterfaceCheck(OptionSystemWin *this, bool b)
{
  this->m_pkInterfaceCheck->m_bCheck = b;
}

//----- (005B3D60) --------------------------------------------------------
void __thiscall OptionSystemWin::SetSpeechCheck(OptionSystemWin *this, bool b)
{
  this->m_pkSpeechCheck->m_bCheck = b;
}

//----- (005B3D80) --------------------------------------------------------
void __thiscall OptionSystemWin::SetInterfacePosCheck(OptionSystemWin *this, bool b)
{
  this->m_pkInterfacePosCheck->m_bCheck = b;
}

//----- (005B3DA0) --------------------------------------------------------
void __thiscall OptionSystemWin::SetChattingHideCheck(OptionSystemWin *this, bool b)
{
  this->m_pkChattingHideCheck->m_bCheck = b;
}

//----- (005B3DC0) --------------------------------------------------------
void __thiscall OptionSystemWin::SetWisCheck(OptionSystemWin *this, bool b)
{
  this->m_pkWisRejCheck->m_bCheck = b;
}

//----- (005B3DE0) --------------------------------------------------------
void __thiscall OptionSystemWin::SetTrdCheck(OptionSystemWin *this, bool b)
{
  this->m_pkTrdRejCheck->m_bCheck = b;
}

//----- (005B3E00) --------------------------------------------------------
void __thiscall OptionSystemWin::SetParCheck(OptionSystemWin *this, bool b)
{
  this->m_pkParRejCheck->m_bCheck = b;
}

//----- (005B3E20) --------------------------------------------------------
void __thiscall OptionSystemWin::SetAgCheck(OptionSystemWin *this, bool b)
{
  this->m_pkAgRejCheck->m_bCheck = b;
}

//----- (005B3E40) --------------------------------------------------------
void __thiscall OptionSystemWin::SetSystemMsgCheck(OptionSystemWin *this, bool b)
{
  this->m_pkSystemMsgCheck->m_bCheck = b;
}

//----- (005B3E60) --------------------------------------------------------
void __thiscall OptionSystemWin::SetOKMsgBoxCheck(OptionSystemWin *this, bool b)
{
  this->m_pkOKMsgBoxCheck->m_bCheck = b;
}

//----- (005B3E80) --------------------------------------------------------
void __thiscall OptionSystemWin::SetChatInputCheck(OptionSystemWin *this, bool b)
{
  this->m_pkChatInputCheck->m_bCheck = b;
}

//----- (005B3EA0) --------------------------------------------------------
void __thiscall OptionSystemWin::SetNamePanelCheck(OptionSystemWin *this, bool b)
{
  this->m_pkNamePanelCheck->m_bCheck = b;
}

//----- (005B3EC0) --------------------------------------------------------
void __thiscall OptionSystemWin::SetBasicInfoTipCheck(OptionSystemWin *this, bool b)
{
  this->m_pkBasicInfoTipCheck->m_bCheck = b;
}

//----- (005B3EE0) --------------------------------------------------------
void __thiscall OptionSystemWin::SetPlayGuideCheck(OptionSystemWin *this, bool b)
{
  this->m_pkPlayGuideCheck->m_bCheck = b;
}

//----- (005B3F00) --------------------------------------------------------
void __thiscall OptionSystemWin::SetAutoStack(OptionSystemWin *this, bool b)
{
  this->m_pkAutoStack->m_bCheck = b;
}

//----- (005B3F20) --------------------------------------------------------
void __thiscall OptionSystemWin::SetInfo(OptionSystemWin *this, MachineOpt::GameOption *kOption)
{
  OptionSystemWin *v2; // esi@1

  v2 = this;
  this->m_pkMyNameCheck->m_bCheck = kOption->bMyNameCheck;
  this->m_pkOtherCharNameCheck->m_bCheck = kOption->bOtherCharNameCheck;
  this->m_pkNpcNameCheck->m_bCheck = kOption->bNpcNameCheck;
  this->m_pkMonsterNameCheck->m_bCheck = kOption->bMonsterNameCheck;
  this->m_pkItemNameCheck->m_bCheck = kOption->bItemNameCheck;
  this->m_pkHPCheck->m_bCheck = kOption->bHPCheck;
  this->m_pkSPCheck->m_bCheck = kOption->bSPCheck;
  this->m_pkInterfaceCheck->m_bCheck = kOption->bInterfaceCheck;
  this->m_pkSpeechCheck->m_bCheck = kOption->bSpeechCheck;
  this->m_pkInterfacePosCheck->m_bCheck = kOption->bInterfacePosCheck;
  this->m_pkChattingHideCheck->m_bCheck = kOption->bChattingHideCheck;
  this->m_pkWisRejCheck->m_bCheck = kOption->bWisCheck;
  this->m_pkTrdRejCheck->m_bCheck = kOption->bTrdCheck;
  this->m_pkParRejCheck->m_bCheck = kOption->bParCheck;
  this->m_pkAgRejCheck->m_bCheck = kOption->bAgCheck;
  this->m_pkSystemMsgCheck->m_bCheck = kOption->bSystemMsgCheck;
  this->m_pkOKMsgBoxCheck->m_bCheck = kOption->bOKMsgBoxCheck;
  this->m_pkChatInputCheck->m_bCheck = kOption->bChatInputCheck;
  this->m_pkNamePanelCheck->m_bCheck = kOption->bNamePanelCheck;
  this->m_pkBasicInfoTipCheck->m_bCheck = kOption->bBasicInfoTipCheck;
  this->m_pkPlayGuideCheck->m_bCheck = kOption->bPlayGuideCheck;
  ScreenBDMgr::InitCharBD(&g_kScrnBDMgr, byte_B4FF93);
  v2->m_pkAutoStack->m_bCheck = kOption->bAutoStack;
}
// B4FF93: using guessed type char byte_B4FF93;

//----- (005B40B0) --------------------------------------------------------
char __thiscall OptionSystemWin::Create(OptionSystemWin *this, PgFrameWork *pkFrameWork)
{
  OptionSystemWin *v2; // esi@1
  NiRefObjectVtbl *v3; // edx@1
  NiTexturePalette *v4; // edi@1
  const char *v5; // eax@3
  NiAVObject *v6; // eax@4
  NiProperty *v7; // eax@4
  NiProperty *v8; // ebx@4
  NiRefObjectVtbl *v9; // eax@6
  NiSourceTexture *v10; // edi@7
  NiNode *v11; // esi@10
  PgSprData *v13; // eax@15
  PgWinSpr *v14; // eax@15
  NiPointer<PgSprData::PgHitTester> *v15; // ecx@15
  unsigned int v16; // ebx@15
  unsigned int uiWidth; // ST40_4@15
  PgFont *v18; // eax@15
  PgWinText *v19; // ebx@15
  unsigned int v20; // ST40_4@15
  NiUnsharedGeometryGroup *v21; // eax@15
  PgSprData *v22; // ebx@15
  NiPointer<PgSprData::PgHitTester> *v23; // ecx@15
  unsigned int v24; // ebx@15
  unsigned int v25; // ST40_4@15
  PgFont *v26; // eax@15
  PgWinText *v27; // ebx@15
  unsigned int v28; // ST40_4@15
  NiUnsharedGeometryGroup *v29; // eax@15
  PgSprData *v30; // ebx@15
  NiPointer<PgSprData::PgHitTester> *v31; // ecx@15
  unsigned int v32; // ebx@15
  unsigned int v33; // ST40_4@15
  PgFont *v34; // eax@15
  PgWinText *v35; // ebx@15
  unsigned int v36; // ST40_4@15
  NiUnsharedGeometryGroup *v37; // eax@15
  PgSprData *v38; // ebx@15
  NiPointer<PgSprData::PgHitTester> *v39; // ecx@15
  unsigned int v40; // ebx@15
  unsigned int v41; // ST40_4@15
  PgFont *v42; // eax@15
  PgWinText *v43; // ebx@15
  unsigned int v44; // ST40_4@15
  NiUnsharedGeometryGroup *v45; // eax@15
  PgSprData *v46; // ebx@15
  NiPointer<PgSprData::PgHitTester> *v47; // ecx@15
  unsigned int v48; // ebx@15
  unsigned int v49; // ST40_4@15
  PgFont *v50; // eax@15
  PgWinText *v51; // ebx@15
  unsigned int v52; // ST40_4@15
  NiUnsharedGeometryGroup *v53; // eax@15
  PgSprData *v54; // ebx@15
  NiPointer<PgSprData::PgHitTester> *v55; // ecx@15
  unsigned int v56; // ebx@15
  unsigned int v57; // ST40_4@15
  PgFont *v58; // eax@15
  PgWinText *v59; // ebx@15
  unsigned int v60; // ST40_4@15
  NiUnsharedGeometryGroup *v61; // eax@15
  PgSprData *v62; // ebx@15
  NiPointer<PgSprData::PgHitTester> *v63; // ecx@15
  unsigned int v64; // ebx@15
  unsigned int v65; // ST40_4@15
  PgFont *v66; // eax@15
  PgWinText *v67; // ebx@15
  unsigned int v68; // ST40_4@15
  NiUnsharedGeometryGroup *v69; // eax@15
  PgSprData *v70; // ebx@15
  NiPointer<PgSprData::PgHitTester> *v71; // ecx@15
  unsigned int v72; // ebx@15
  unsigned int v73; // ST40_4@15
  PgFont *v74; // eax@15
  PgWinText *v75; // ebx@15
  unsigned int v76; // ST40_4@15
  NiUnsharedGeometryGroup *v77; // eax@15
  PgSprData *v78; // ebx@15
  NiPointer<PgSprData::PgHitTester> *v79; // ecx@15
  unsigned int v80; // ebx@15
  unsigned int v81; // ST40_4@15
  PgFont *v82; // eax@15
  PgWinText *v83; // ebx@15
  unsigned int v84; // ST40_4@15
  NiUnsharedGeometryGroup *v85; // eax@15
  PgSprData *v86; // ebx@15
  NiPointer<PgSprData::PgHitTester> *v87; // ecx@15
  unsigned int v88; // ebx@15
  unsigned int v89; // ST40_4@15
  PgFont *v90; // eax@15
  PgWinText *v91; // ebx@15
  unsigned int v92; // ST40_4@15
  NiUnsharedGeometryGroup *v93; // eax@15
  PgSprData *v94; // ebx@15
  NiPointer<PgSprData::PgHitTester> *v95; // ecx@15
  unsigned int v96; // ebx@15
  unsigned int v97; // ST40_4@15
  PgFont *v98; // eax@15
  PgWinText *v99; // ebx@15
  unsigned int v100; // ST40_4@15
  NiUnsharedGeometryGroup *v101; // eax@15
  PgSprData *v102; // ebx@15
  NiPointer<PgSprData::PgHitTester> *v103; // ecx@15
  unsigned int v104; // ebx@15
  unsigned int v105; // ST40_4@15
  PgFont *v106; // eax@15
  PgWinText *v107; // ebx@15
  unsigned int v108; // ST40_4@15
  NiUnsharedGeometryGroup *v109; // eax@15
  PgSprData *v110; // ebx@15
  NiPointer<PgSprData::PgHitTester> *v111; // ecx@15
  unsigned int v112; // ebx@15
  unsigned int v113; // ST40_4@15
  PgFont *v114; // eax@15
  PgWinText *v115; // ebx@15
  unsigned int v116; // ST40_4@15
  NiUnsharedGeometryGroup *v117; // eax@15
  PgSprData *v118; // ebx@15
  NiPointer<PgSprData::PgHitTester> *v119; // ecx@15
  unsigned int v120; // ebx@15
  unsigned int v121; // ST40_4@15
  PgFont *v122; // eax@15
  PgWinText *v123; // ebx@15
  unsigned int v124; // ST40_4@15
  NiUnsharedGeometryGroup *v125; // eax@15
  PgSprData *v126; // ebx@15
  NiPointer<PgSprData::PgHitTester> *v127; // ecx@15
  unsigned int v128; // ebx@15
  unsigned int v129; // ST40_4@15
  PgFont *v130; // eax@15
  PgWinText *v131; // ebx@15
  unsigned int v132; // ST40_4@15
  NiUnsharedGeometryGroup *v133; // eax@15
  PgSprData *v134; // ebx@15
  NiPointer<PgSprData::PgHitTester> *v135; // ecx@15
  unsigned int v136; // ebx@15
  unsigned int v137; // ST40_4@15
  PgFont *v138; // eax@15
  PgWinText *v139; // ebx@15
  unsigned int v140; // ST40_4@15
  NiUnsharedGeometryGroup *v141; // eax@15
  PgSprData *v142; // ebx@15
  NiPointer<PgSprData::PgHitTester> *v143; // ecx@15
  unsigned int v144; // ebx@15
  unsigned int v145; // ST40_4@15
  PgFont *v146; // eax@15
  PgWinText *v147; // ebx@15
  unsigned int v148; // ST40_4@15
  NiUnsharedGeometryGroup *v149; // eax@15
  PgSprData *v150; // ebx@15
  NiPointer<PgSprData::PgHitTester> *v151; // ecx@15
  unsigned int v152; // ebx@15
  unsigned int v153; // ST40_4@15
  PgFont *v154; // eax@15
  PgWinText *v155; // ebx@15
  unsigned int v156; // ST40_4@15
  NiUnsharedGeometryGroup *v157; // eax@15
  PgSprData *v158; // ebx@15
  NiPointer<PgSprData::PgHitTester> *v159; // ecx@15
  unsigned int v160; // ebx@15
  unsigned int v161; // ST40_4@15
  PgFont *v162; // eax@15
  PgWinText *v163; // ebx@15
  unsigned int v164; // ST40_4@15
  NiUnsharedGeometryGroup *v165; // eax@15
  PgSprData *v166; // ebx@15
  NiPointer<PgSprData::PgHitTester> *v167; // ecx@15
  unsigned int v168; // ebx@15
  unsigned int v169; // ST40_4@15
  PgFont *v170; // eax@15
  PgWinText *v171; // ebx@15
  unsigned int v172; // ST40_4@15
  NiUnsharedGeometryGroup *v173; // eax@15
  PgSprData *v174; // ebx@15
  NiPointer<PgSprData::PgHitTester> *v175; // ecx@15
  unsigned int v176; // ebx@15
  unsigned int v177; // ST40_4@15
  PgFont *v178; // eax@15
  PgWinText *v179; // ebx@15
  unsigned int v180; // ST40_4@15
  NiUnsharedGeometryGroup *v181; // eax@15
  PgSprData *v182; // ebx@15
  NiPointer<PgSprData::PgHitTester> *v183; // ecx@15
  unsigned int v184; // ebx@15
  unsigned int v185; // ST40_4@15
  PgFont *v186; // eax@15
  PgWinText *v187; // ebx@15
  unsigned int v188; // ST40_4@15
  NiUnsharedGeometryGroup *v189; // eax@15
  PgSprData *v190; // edi@15
  NiNode *v191; // edi@17
  NiPointer<NiTexturingProperty> spTexProp; // [sp+10h] [bp-1Ch]@4
  NiPointer<NiNode> spNode; // [sp+18h] [bp-14h]@1
  int uiLeft; // [sp+1Ch] [bp-10h]@15
  int v195; // [sp+28h] [bp-4h]@1

  v2 = this;
  v3 = this->vfptr;
  this->m_pkFrameWork = pkFrameWork;
  ((void (__stdcall *)(signed int))v3[43].__vecDelDtor)(-15);
  v2->vfptr[44].__vecDelDtor((NiRefObject *)v2, 0);
  v2->vfptr[38].__vecDelDtor((NiRefObject *)v2, 0);
  v2->vfptr[39].__vecDelDtor((NiRefObject *)v2, 0);
  v2->vfptr[35].__vecDelDtor((NiRefObject *)v2, (unsigned int)&unk_9A9914);
  v2->vfptr[75].__vecDelDtor((NiRefObject *)v2, 0);
  v2->vfptr[60].__vecDelDtor((NiRefObject *)v2, 0);
  v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 1u);
  spNode.m_pObject = 0;
  v4 = pTexturePalette;
  v195 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "Game\\Option_System.nif");
  PgUtil::LoadNodeNifFile(v5, &spNode, v4);
  if ( !spNode.m_pObject )
    return 0;
  v6 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Panel_System");
  v7 = NiAVObject::GetProperty(v6, 8);
  v8 = v7;
  spTexProp.m_pObject = (NiTexturingProperty *)v7;
  if ( v7 )
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  v9 = v8[1].m_spControllers.m_pObject->vfptr;
  LOBYTE(v195) = 1;
  if ( !v9 || (v10 = (NiSourceTexture *)v9[1].__vecDelDtor) == 0 )
  {
    LOBYTE(v195) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v11 = spNode.m_pObject;
    v195 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v11 )
        v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    }
    return 0;
  }
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel_System", &uiLeft, (int *)&pkFrameWork, v10);
  v14 = PgWinSpr::CreateWin(uiLeft, (int)pkFrameWork, v13, (PgWin *)&v2->vfptr, 0, 0);
  v14->vfptr[60].__vecDelDtor((NiRefObject *)v14, 0);
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MyChrName", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v16 = v15->m_pObject->m_uiHeight;
  uiWidth = v15->m_pObject->m_uiWidth;
  v18 = Font::Get(0);
  v19 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, uiWidth, v16, v18, (PgWin *)&v2->vfptr, 0, 0);
  v19->vfptr[122].__vecDelDtor((NiRefObject *)v19, 4u);
  v20 = (unsigned int)v19->vfptr;
  v21 = TextData::Get(0x2A428FA5u);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v20 + 472))(v19, v21);
  v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
  v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MyNmChNor", &uiLeft, (int *)&pkFrameWork, v10);
  PgSprData::Add(v22, (NiAVObject *)&spNode.m_pObject->vfptr, "MyNmChClick");
  v2->m_pkMyNameCheck = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v22, (PgWin *)&v2->vfptr, 0xBu, 0);
  v23 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "OtChrName", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v24 = v23->m_pObject->m_uiHeight;
  v25 = v23->m_pObject->m_uiWidth;
  v26 = Font::Get(0);
  v27 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v25, v24, v26, (PgWin *)&v2->vfptr, 0, 0);
  v27->vfptr[122].__vecDelDtor((NiRefObject *)v27, 4u);
  v28 = (unsigned int)v27->vfptr;
  v29 = TextData::Get(0xA18283D6);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v28 + 472))(v27, v29);
  v27->vfptr[60].__vecDelDtor((NiRefObject *)v27, 0);
  v30 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "OtNmChNor", &uiLeft, (int *)&pkFrameWork, v10);
  PgSprData::Add(v30, (NiAVObject *)&spNode.m_pObject->vfptr, "OtNmChClick");
  v2->m_pkOtherCharNameCheck = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v30, (PgWin *)&v2->vfptr, 0xCu, 0);
  v31 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NpcName", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v32 = v31->m_pObject->m_uiHeight;
  v33 = v31->m_pObject->m_uiWidth;
  v34 = Font::Get(0);
  v35 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v33, v32, v34, (PgWin *)&v2->vfptr, 0, 0);
  v35->vfptr[122].__vecDelDtor((NiRefObject *)v35, 4u);
  v36 = (unsigned int)v35->vfptr;
  v37 = TextData::Get(0xE0FB4C37);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v36 + 472))(v35, v37);
  v35->vfptr[60].__vecDelDtor((NiRefObject *)v35, 0);
  v38 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NPCNmChNor", &uiLeft, (int *)&pkFrameWork, v10);
  PgSprData::Add(v38, (NiAVObject *)&spNode.m_pObject->vfptr, "NPCNmChClick");
  v2->m_pkNpcNameCheck = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v38, (PgWin *)&v2->vfptr, 0xDu, 0);
  v39 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MonName", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v40 = v39->m_pObject->m_uiHeight;
  v41 = v39->m_pObject->m_uiWidth;
  v42 = Font::Get(0);
  v43 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v41, v40, v42, (PgWin *)&v2->vfptr, 0, 0);
  v43->vfptr[122].__vecDelDtor((NiRefObject *)v43, 4u);
  v44 = (unsigned int)v43->vfptr;
  v45 = TextData::Get(0xDFFA4C36);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v44 + 472))(v43, v45);
  v43->vfptr[60].__vecDelDtor((NiRefObject *)v43, 0);
  v46 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MonNmChNor", &uiLeft, (int *)&pkFrameWork, v10);
  PgSprData::Add(v46, (NiAVObject *)&spNode.m_pObject->vfptr, "MonNmChClick");
  v2->m_pkMonsterNameCheck = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v46, (PgWin *)&v2->vfptr, 0xEu, 0);
  v47 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ItName", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v48 = v47->m_pObject->m_uiHeight;
  v49 = v47->m_pObject->m_uiWidth;
  v50 = Font::Get(0);
  v51 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v49, v48, v50, (PgWin *)&v2->vfptr, 0, 0);
  v51->vfptr[122].__vecDelDtor((NiRefObject *)v51, 4u);
  v52 = (unsigned int)v51->vfptr;
  v53 = TextData::Get(0x6B8AE5EFu);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v52 + 472))(v51, v53);
  v51->vfptr[60].__vecDelDtor((NiRefObject *)v51, 0);
  v54 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ItNmChNor", &uiLeft, (int *)&pkFrameWork, v10);
  PgSprData::Add(v54, (NiAVObject *)&spNode.m_pObject->vfptr, "ItNmChClick");
  v2->m_pkItemNameCheck = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v54, (PgWin *)&v2->vfptr, 0xFu, 0);
  v55 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HpName", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v56 = v55->m_pObject->m_uiHeight;
  v57 = v55->m_pObject->m_uiWidth;
  v58 = Font::Get(0);
  v59 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v57, v56, v58, (PgWin *)&v2->vfptr, 0, 0);
  v59->vfptr[122].__vecDelDtor((NiRefObject *)v59, 4u);
  v60 = (unsigned int)v59->vfptr;
  v61 = TextData::Get(0x393C4A58u);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v60 + 472))(v59, v61);
  v59->vfptr[60].__vecDelDtor((NiRefObject *)v59, 0);
  v62 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HPNmChNor", &uiLeft, (int *)&pkFrameWork, v10);
  PgSprData::Add(v62, (NiAVObject *)&spNode.m_pObject->vfptr, "HPNmChClick");
  v2->m_pkHPCheck = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v62, (PgWin *)&v2->vfptr, 0x10u, 0);
  v63 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SpName", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v64 = v63->m_pObject->m_uiHeight;
  v65 = v63->m_pObject->m_uiWidth;
  v66 = Font::Get(0);
  v67 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v65, v64, v66, (PgWin *)&v2->vfptr, 0, 0);
  v67->vfptr[122].__vecDelDtor((NiRefObject *)v67, 4u);
  v68 = (unsigned int)v67->vfptr;
  v69 = TextData::Get(0x39479AA4u);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v68 + 472))(v67, v69);
  v67->vfptr[60].__vecDelDtor((NiRefObject *)v67, 0);
  v70 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SPNmChNor", &uiLeft, (int *)&pkFrameWork, v10);
  PgSprData::Add(v70, (NiAVObject *)&spNode.m_pObject->vfptr, "SPNmChClick");
  v2->m_pkSPCheck = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v70, (PgWin *)&v2->vfptr, 0x11u, 0);
  v71 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "InterfaceName", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v72 = v71->m_pObject->m_uiHeight;
  v73 = v71->m_pObject->m_uiWidth;
  v74 = Font::Get(0);
  v75 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v73, v72, v74, (PgWin *)&v2->vfptr, 0, 0);
  v75->vfptr[122].__vecDelDtor((NiRefObject *)v75, 4u);
  v76 = (unsigned int)v75->vfptr;
  v77 = TextData::Get(0xE33F303C);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v76 + 472))(v75, v77);
  v75->vfptr[60].__vecDelDtor((NiRefObject *)v75, 0);
  v78 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "InterfaceNmChNor", &uiLeft, (int *)&pkFrameWork, v10);
  PgSprData::Add(v78, (NiAVObject *)&spNode.m_pObject->vfptr, "InterfaceNmChClick");
  v2->m_pkInterfaceCheck = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v78, (PgWin *)&v2->vfptr, 0x12u, 0);
  v79 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SpeechName", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v80 = v79->m_pObject->m_uiHeight;
  v81 = v79->m_pObject->m_uiWidth;
  v82 = Font::Get(0);
  v83 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v81, v80, v82, (PgWin *)&v2->vfptr, 0, 0);
  v83->vfptr[122].__vecDelDtor((NiRefObject *)v83, 4u);
  v84 = (unsigned int)v83->vfptr;
  v85 = TextData::Get(0x2844739Du);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v84 + 472))(v83, v85);
  v83->vfptr[60].__vecDelDtor((NiRefObject *)v83, 0);
  v86 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SpeechNmChNor", &uiLeft, (int *)&pkFrameWork, v10);
  PgSprData::Add(v86, (NiAVObject *)&spNode.m_pObject->vfptr, "SpeechNmChClick");
  v2->m_pkSpeechCheck = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v86, (PgWin *)&v2->vfptr, 0x13u, 0);
  v87 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "InterfacePosName", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v88 = v87->m_pObject->m_uiHeight;
  v89 = v87->m_pObject->m_uiWidth;
  v90 = Font::Get(0);
  v91 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v89, v88, v90, (PgWin *)&v2->vfptr, 0, 0);
  v91->vfptr[122].__vecDelDtor((NiRefObject *)v91, 4u);
  v92 = (unsigned int)v91->vfptr;
  v93 = TextData::Get(0x333F838Bu);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v92 + 472))(v91, v93);
  v91->vfptr[60].__vecDelDtor((NiRefObject *)v91, 0);
  v94 = PgSprData::Create(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "InterfacePosChNor",
          &uiLeft,
          (int *)&pkFrameWork,
          v10);
  PgSprData::Add(v94, (NiAVObject *)&spNode.m_pObject->vfptr, "InterfacePosChClick");
  v2->m_pkInterfacePosCheck = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v94, (PgWin *)&v2->vfptr, 0x14u, 0);
  v95 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ChattingHideName", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v96 = v95->m_pObject->m_uiHeight;
  v97 = v95->m_pObject->m_uiWidth;
  v98 = Font::Get(0);
  v99 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v97, v96, v98, (PgWin *)&v2->vfptr, 0, 0);
  v99->vfptr[122].__vecDelDtor((NiRefObject *)v99, 4u);
  v100 = (unsigned int)v99->vfptr;
  v101 = TextData::Get(0x83C9EEDD);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v100 + 472))(v99, v101);
  v99->vfptr[60].__vecDelDtor((NiRefObject *)v99, 0);
  v102 = PgSprData::Create(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "ChattingHideChNor",
           &uiLeft,
           (int *)&pkFrameWork,
           v10);
  PgSprData::Add(v102, (NiAVObject *)&spNode.m_pObject->vfptr, "ChattingHideChClick");
  v2->m_pkChattingHideCheck = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v102, (PgWin *)&v2->vfptr, 0x15u, 0);
  v103 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "WisRej", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v104 = v103->m_pObject->m_uiHeight;
  v105 = v103->m_pObject->m_uiWidth;
  v106 = Font::Get(0);
  v107 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v105, v104, v106, (PgWin *)&v2->vfptr, 0, 0);
  v107->vfptr[122].__vecDelDtor((NiRefObject *)v107, 4u);
  v108 = (unsigned int)v107->vfptr;
  v109 = TextData::Get(0x838194A3);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v108 + 472))(v107, v109);
  v107->vfptr[60].__vecDelDtor((NiRefObject *)v107, 0);
  v110 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "WisRejChNor", &uiLeft, (int *)&pkFrameWork, v10);
  PgSprData::Add(v110, (NiAVObject *)&spNode.m_pObject->vfptr, "WisRejChClick");
  v2->m_pkWisRejCheck = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v110, (PgWin *)&v2->vfptr, 0x16u, 0);
  v111 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TrdRej", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v112 = v111->m_pObject->m_uiHeight;
  v113 = v111->m_pObject->m_uiWidth;
  v114 = Font::Get(0);
  v115 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v113, v112, v114, (PgWin *)&v2->vfptr, 0, 0);
  v115->vfptr[122].__vecDelDtor((NiRefObject *)v115, 4u);
  v116 = (unsigned int)v115->vfptr;
  v117 = TextData::Get(0x29468694u);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v116 + 472))(v115, v117);
  v115->vfptr[60].__vecDelDtor((NiRefObject *)v115, 0);
  v118 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TrdRejChNor", &uiLeft, (int *)&pkFrameWork, v10);
  PgSprData::Add(v118, (NiAVObject *)&spNode.m_pObject->vfptr, "TrdRejChClick");
  v2->m_pkTrdRejCheck = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v118, (PgWin *)&v2->vfptr, 0x17u, 0);
  v119 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ParRej", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v120 = v119->m_pObject->m_uiHeight;
  v121 = v119->m_pObject->m_uiWidth;
  v122 = Font::Get(0);
  v123 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v121, v120, v122, (PgWin *)&v2->vfptr, 0, 0);
  v123->vfptr[122].__vecDelDtor((NiRefObject *)v123, 4u);
  v124 = (unsigned int)v123->vfptr;
  v125 = TextData::Get(0xF1D9CB42);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v124 + 472))(v123, v125);
  v123->vfptr[60].__vecDelDtor((NiRefObject *)v123, 0);
  v126 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ParRejChNor", &uiLeft, (int *)&pkFrameWork, v10);
  PgSprData::Add(v126, (NiAVObject *)&spNode.m_pObject->vfptr, "ParRejChClick");
  v2->m_pkParRejCheck = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v126, (PgWin *)&v2->vfptr, 0x18u, 0);
  v127 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "AgRej", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v128 = v127->m_pObject->m_uiHeight;
  v129 = v127->m_pObject->m_uiWidth;
  v130 = Font::Get(0);
  v131 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v129, v128, v130, (PgWin *)&v2->vfptr, 0, 0);
  v131->vfptr[122].__vecDelDtor((NiRefObject *)v131, 4u);
  v132 = (unsigned int)v131->vfptr;
  v133 = TextData::Get(0xE9D0DF24);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v132 + 472))(v131, v133);
  v131->vfptr[60].__vecDelDtor((NiRefObject *)v131, 0);
  v134 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "AgRejChNor", &uiLeft, (int *)&pkFrameWork, v10);
  PgSprData::Add(v134, (NiAVObject *)&spNode.m_pObject->vfptr, "AgRejChClick");
  v2->m_pkAgRejCheck = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v134, (PgWin *)&v2->vfptr, 0x19u, 0);
  v135 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SystemMsgRej", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v136 = v135->m_pObject->m_uiHeight;
  v137 = v135->m_pObject->m_uiWidth;
  v138 = Font::Get(0);
  v139 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v137, v136, v138, (PgWin *)&v2->vfptr, 0, 0);
  v139->vfptr[122].__vecDelDtor((NiRefObject *)v139, 4u);
  v140 = (unsigned int)v139->vfptr;
  v141 = TextData::Get(0x9CA5E9DB);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v140 + 472))(v139, v141);
  v139->vfptr[60].__vecDelDtor((NiRefObject *)v139, 0);
  v142 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SystemMsgChNor", &uiLeft, (int *)&pkFrameWork, v10);
  PgSprData::Add(v142, (NiAVObject *)&spNode.m_pObject->vfptr, "SystemMsgChClick");
  v2->m_pkSystemMsgCheck = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v142, (PgWin *)&v2->vfptr, 0x1Au, 0);
  v143 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "OKMsgBoxRej", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v144 = v143->m_pObject->m_uiHeight;
  v145 = v143->m_pObject->m_uiWidth;
  v146 = Font::Get(0);
  v147 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v145, v144, v146, (PgWin *)&v2->vfptr, 0, 0);
  v147->vfptr[122].__vecDelDtor((NiRefObject *)v147, 4u);
  v148 = (unsigned int)v147->vfptr;
  v149 = TextData::Get(0x91A8DFDA);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v148 + 472))(v147, v149);
  v147->vfptr[60].__vecDelDtor((NiRefObject *)v147, 0);
  v150 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "OKMsgBoxChNor", &uiLeft, (int *)&pkFrameWork, v10);
  PgSprData::Add(v150, (NiAVObject *)&spNode.m_pObject->vfptr, "OKMsgBoxChClick");
  v2->m_pkOKMsgBoxCheck = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v150, (PgWin *)&v2->vfptr, 0x1Bu, 0);
  v151 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ChatInputRej", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v152 = v151->m_pObject->m_uiHeight;
  v153 = v151->m_pObject->m_uiWidth;
  v154 = Font::Get(0);
  v155 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v153, v152, v154, (PgWin *)&v2->vfptr, 0, 0);
  v155->vfptr[122].__vecDelDtor((NiRefObject *)v155, 4u);
  v156 = (unsigned int)v155->vfptr;
  v157 = TextData::Get(0xA48492D0);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v156 + 472))(v155, v157);
  v155->vfptr[60].__vecDelDtor((NiRefObject *)v155, 0);
  v158 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ChatInputChNor", &uiLeft, (int *)&pkFrameWork, v10);
  PgSprData::Add(v158, (NiAVObject *)&spNode.m_pObject->vfptr, "ChatInputChClick");
  v2->m_pkChatInputCheck = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v158, (PgWin *)&v2->vfptr, 0x1Cu, 0);
  v159 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NamePanel3D", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v160 = v159->m_pObject->m_uiHeight;
  v161 = v159->m_pObject->m_uiWidth;
  v162 = Font::Get(0);
  v163 = PgWinText::CreateWin(uiLeft, (int)&pkFrameWork->vfptr + 1, v161, v160, v162, (PgWin *)&v2->vfptr, 0, 0);
  v163->vfptr[122].__vecDelDtor((NiRefObject *)v163, 4u);
  v164 = (unsigned int)v163->vfptr;
  v165 = TextData2::Get(0x78797F75u);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v164 + 472))(v163, v165);
  v163->vfptr[60].__vecDelDtor((NiRefObject *)v163, 0);
  v166 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NamePanel3DNor", &uiLeft, (int *)&pkFrameWork, v10);
  PgSprData::Add(v166, (NiAVObject *)&spNode.m_pObject->vfptr, "NamePanel3DClick");
  v2->m_pkNamePanelCheck = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v166, (PgWin *)&v2->vfptr, 0x1Du, 0);
  v167 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GameTipOn", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v168 = v167->m_pObject->m_uiHeight;
  v169 = v167->m_pObject->m_uiWidth;
  v170 = Font::Get(0);
  v171 = PgWinText::CreateWin(uiLeft, (int)pkFrameWork, v169, v168, v170, (PgWin *)&v2->vfptr, 0, 0);
  v171->vfptr[122].__vecDelDtor((NiRefObject *)v171, 4u);
  v172 = (unsigned int)v171->vfptr;
  v173 = TextData2::Get(0xECEED61B);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v172 + 472))(v171, v173);
  v171->vfptr[60].__vecDelDtor((NiRefObject *)v171, 0);
  v174 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GameTipOnChNor", &uiLeft, (int *)&pkFrameWork, v10);
  PgSprData::Add(v174, (NiAVObject *)&spNode.m_pObject->vfptr, "GameTipOnChClick");
  v2->m_pkBasicInfoTipCheck = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v174, (PgWin *)&v2->vfptr, 0x1Eu, 0);
  v175 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PlayGuideOn", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v176 = v175->m_pObject->m_uiHeight;
  v177 = v175->m_pObject->m_uiWidth;
  v178 = Font::Get(0);
  v179 = PgWinText::CreateWin(uiLeft, (int)pkFrameWork, v177, v176, v178, (PgWin *)&v2->vfptr, 0, 0);
  v179->vfptr[122].__vecDelDtor((NiRefObject *)v179, 4u);
  v180 = (unsigned int)v179->vfptr;
  v181 = TextData2::Get(0xE0EC2B54);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v180 + 472))(v179, v181);
  v179->vfptr[60].__vecDelDtor((NiRefObject *)v179, 0);
  v182 = PgSprData::Create(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "PlayGuideOnChNor",
           &uiLeft,
           (int *)&pkFrameWork,
           v10);
  PgSprData::Add(v182, (NiAVObject *)&spNode.m_pObject->vfptr, "PlayGuideOnChClick");
  v2->m_pkPlayGuideCheck = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v182, (PgWin *)&v2->vfptr, 0x1Fu, 0);
  v183 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "InvAutoStack", &uiLeft, (int *)&pkFrameWork, v10)->m_akHitTester.m_pBase;
  v184 = v183->m_pObject->m_uiHeight;
  v185 = v183->m_pObject->m_uiWidth;
  v186 = Font::Get(0);
  v187 = PgWinText::CreateWin(uiLeft, (int)pkFrameWork, v185, v184, v186, (PgWin *)&v2->vfptr, 0, 0);
  v187->vfptr[122].__vecDelDtor((NiRefObject *)v187, 4u);
  v188 = (unsigned int)v187->vfptr;
  v189 = TextData3::Get(0x2A597F77u);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v188 + 472))(v187, v189);
  v187->vfptr[60].__vecDelDtor((NiRefObject *)v187, 0);
  v190 = PgSprData::Create(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "InvAutoStackChNor",
           &uiLeft,
           (int *)&pkFrameWork,
           v10);
  PgSprData::Add(v190, (NiAVObject *)&spNode.m_pObject->vfptr, "InvAutoStackChClick");
  v2->m_pkAutoStack = ColumnBut::CreateWin(uiLeft, (int)pkFrameWork, v190, (PgWin *)&v2->vfptr, 0x20u, 0);
  LOBYTE(v195) = 0;
  if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
    spTexProp.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spTexProp.m_pObject, 1u);
  v191 = spNode.m_pObject;
  v195 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v191 )
    v191->vfptr->__vecDelDtor((NiRefObject *)v191, 1u);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005B54C0) --------------------------------------------------------
void __userpurge OptionSystemWin::OnCommand(OptionSystemWin *this@<ecx>, signed int a2@<esi>, unsigned int wParam, int lParam)
{
  bool v4; // dl@1

  v4 = this->m_bChangeOption;
  this->m_bChangeOption = 1;
  switch ( wParam )
  {
    case 0xBu:
      OptionSystemWin::OnMyNameCheck(this);
      break;
    case 0xCu:
      OptionSystemWin::OnOtherCharNameCheck(this);
      break;
    case 0xDu:
      OptionSystemWin::OnNpcNameCheck(this);
      break;
    case 0xEu:
      OptionSystemWin::OnMonsterNameCheck(this);
      break;
    case 0xFu:
      OptionSystemWin::OnItemNameCheck(this);
      break;
    case 0x10u:
      OptionSystemWin::OnHPCheck(this);
      break;
    case 0x11u:
      OptionSystemWin::OnSPCheck(this);
      break;
    case 0x12u:
      OptionSystemWin::OnInterfaceCheck(this);
      break;
    case 0x13u:
      OptionSystemWin::OnSpeechCheck(this);
      break;
    case 0x14u:
      OptionSystemWin::OnInterfacePosCheck(this, a2);
      break;
    case 0x16u:
      OptionSystemWin::OnWisCheck(this);
      break;
    case 0x17u:
      OptionSystemWin::OnTrdCheck(this);
      break;
    case 0x18u:
      OptionSystemWin::OnParCheck(this);
      break;
    case 0x19u:
      OptionSystemWin::OnAgCheck(this);
      break;
    case 0x1Au:
      OptionSystemWin::OnSystemMsgCheck(this);
      break;
    case 0x1Bu:
      OptionSystemWin::OnOKMsgBoxCheck(this);
      break;
    case 0x15u:
      OptionSystemWin::OnChattingHideCheck(this);
      break;
    case 0x1Cu:
      OptionSystemWin::OnChatInputCheck(this);
      break;
    case 0x1Du:
      OptionSystemWin::OnNamePanelCheck(this);
      break;
    case 0x1Eu:
      OptionSystemWin::OnBasicInfoTipCheck(this);
      break;
    case 0x1Fu:
      OptionSystemWin::OnPlayGuideCheck(this);
      break;
    case 0x20u:
      OptionSystemWin::OnAutoStack(this);
      break;
    default:
      this->m_bChangeOption = v4;
      break;
  }
}

//----- (005B5610) --------------------------------------------------------
void __thiscall OptionSystemWin::OnWinClose(OptionSystemWin *this)
{
  OptionSystemWin *v1; // ebx@1

  v1 = this;
  if ( this->m_bChangeOption )
  {
    qmemcpy(&MachineOpt::ms_kGameOption, &this->m_kOpenGameOption, sizeof(MachineOpt::ms_kGameOption));
    byte_B4FF66 = *(_DWORD *)&byte_B4FF64 >> 16;
    OptionSystemWin::SetInfo(this, &this->m_kOpenGameOption);
    ScreenBDMgr::InitCharBD(&g_kScrnBDMgr, byte_B4FF93);
  }
  v1->m_bChangeOption = 0;
}
// B4FF60: using guessed type struct MachineOpt::GameOption MachineOpt::ms_kGameOption;
// B4FF64: using guessed type char byte_B4FF64;
// B4FF66: using guessed type char byte_B4FF66;
// B4FF93: using guessed type char byte_B4FF93;

//----- (005B5670) --------------------------------------------------------
void __thiscall OptionSystemWin::OpenWin(OptionSystemWin *this)
{
  OptionSystemWin *v1; // ebx@1

  v1 = this;
  if ( this->m_pkOptionBaseWin )
  {
    qmemcpy(&this->m_kOpenGameOption, &MachineOpt::ms_kGameOption, sizeof(this->m_kOpenGameOption));
    OptionSystemWin::SetInfo(this, &this->m_kOpenGameOption);
    OptionBaseWin::SetMode(v1->m_pkOptionBaseWin, 0);
    ((void (__stdcall *)(_DWORD, _DWORD))v1->m_pkOptionBaseWin->vfptr[29].__vecDelDtor)(v1, 1);
    v1->vfptr[64].__vecDelDtor((NiRefObject *)v1, 1u);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkOptionBaseWin->vfptr);
  }
}
// B4FF60: using guessed type struct MachineOpt::GameOption MachineOpt::ms_kGameOption;

//----- (005B56E0) --------------------------------------------------------
OptionSystemWin *__cdecl OptionSystemWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  OptionSystemWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1B8u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWin::PgWin(v1);
    LOBYTE(v6) = 1;
    v2->vfptr = (NiRefObjectVtbl *)&OptionSystemWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&OptionSystemWin::`vftable'{for `IDirectMessenger'};
    MachineOpt::GameOption::GameOption((MachineOpt::GameOption *)((char *)&v2[1].vfptr + 1));
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LOBYTE(v2[1].vfptr) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[113].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (OptionSystemWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9A9D10: using guessed type void (__thiscall *OptionSystemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A9D2C: using guessed type int (__thiscall *OptionSystemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005B5840) --------------------------------------------------------
OptionSystemWin *__thiscall OptionSystemWin::`vector deleting destructor'(OptionSystemWin *this, unsigned int a2)
{
  OptionSystemWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&OptionSystemWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&OptionSystemWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9A9D10: using guessed type void (__thiscall *OptionSystemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A9D2C: using guessed type int (__thiscall *OptionSystemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005B5880) --------------------------------------------------------
void __thiscall AbstateIcon::SetIconFile(AbstateIcon *this, char *FileName, int IconIndex)
{
  AbstateIcon *v3; // esi@1
  NiRefObjectVtbl *v4; // edi@2
  NiSourceTexture *v5; // eax@2

  v3 = this;
  if ( FileName )
  {
    v4 = this->vfptr;
    v5 = IconMgr::GetTexture(FileName);
    ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v4[146].__vecDelDtor)(v3, v5, IconIndex, 16, 16);
    v3->vfptr[64].__vecDelDtor((NiRefObject *)v3, 1u);
  }
}

//----- (005B58C0) --------------------------------------------------------
unsigned __int16 __thiscall AbstateIcon::GetAbstate(AbstateIcon *this)
{
  return this->m_kAbstateID;
}

//----- (005B58D0) --------------------------------------------------------
void __thiscall AbstateIcon::SetDuplicate(AbstateIcon *this, unsigned int uiDuplicate)
{
  AbstateIcon *v2; // esi@1
  NiRefObjectVtbl *v3; // edi@1
  NiSourceTexture *v4; // eax@1
  NiRefObjectVtbl *v5; // edi@1
  char *v6; // eax@1

  v2 = this;
  v3 = this->vfptr;
  v4 = IconMgr::GetTexture("AbState01");
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v3[146].__vecDelDtor)(v2, v4, 49, 16, 16);
  v5 = v2->m_pkDuplicateText->vfptr;
  v6 = fs(off_9A9F00, uiDuplicate);
  v5[118].__vecDelDtor((NiRefObject *)v2->m_pkDuplicateText, (unsigned int)v6);
  ((void (__stdcall *)(_DWORD))v2->m_pkDuplicateText->vfptr[64].__vecDelDtor)(1);
  v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 1u);
}

//----- (005B5950) --------------------------------------------------------
void __thiscall AbstateIcon::ClearDuplicateText(AbstateIcon *this)
{
  AbstateIcon *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkDuplicateText->vfptr[118].__vecDelDtor)(&unk_9A9EFE);
  ((void (__stdcall *)(_DWORD))v1->m_pkDuplicateText->vfptr[64].__vecDelDtor)(0);
}

//----- (005B5980) --------------------------------------------------------
void __thiscall AbstateIcon::SetAbstate(AbstateIcon *this, int kAbstateID)
{
  int v2; // edi@1
  AbstateIcon *v3; // esi@1
  int v4; // ecx@3
  int v5; // eax@4
  NiRefObjectVtbl *v6; // edi@6
  int v7; // ST04_4@6
  NiSourceTexture *v8; // eax@6
  void *(__thiscall *v9)(NiRefObject *, unsigned int); // eax@6

  v2 = ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;
  v3 = this;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable,
                          kAbstateID)
    && (unsigned __int16)kAbstateID <= *(_WORD *)(v2 + 200)
    && (v4 = *(_DWORD *)(v2 + 196), *(_DWORD *)(v4 + 4 * (unsigned __int16)kAbstateID))
    && (v5 = *(_DWORD *)(v4 + 4 * (unsigned __int16)kAbstateID)) != 0
    && *(_BYTE *)(v5 + 38) != 45 )
  {
    v6 = v3->vfptr;
    v7 = *(_DWORD *)(v5 + 34);
    v8 = IconMgr::GetTexture((char *)(v5 + 38));
    ((void (__thiscall *)(AbstateIcon *, NiSourceTexture *, int, signed int, signed int))v6[146].__vecDelDtor)(
      v3,
      v8,
      v7,
      16,
      16);
    v9 = v3->vfptr[64].__vecDelDtor;
    v3->m_kAbstateID = kAbstateID;
    v9((NiRefObject *)&v3->vfptr, 1u);
  }
  else
  {
    v3->vfptr[64].__vecDelDtor((NiRefObject *)v3, 0);
  }
}
// A8C2A4: using guessed type int ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;

//----- (005B5A20) --------------------------------------------------------
void __thiscall AbstateIcon::Show(AbstateIcon *this, bool b)
{
  AbstateIcon *v2; // esi@1
  NiScreenElements *v3; // eax@2
  NiScreenElements *v4; // esi@5

  v2 = this;
  IconWin::Show((IconWin *)&this->vfptr, b);
  if ( v2->m_bShowSubIcon )
  {
    v3 = v2->m_spSubImagePlane.m_pObject;
    if ( b )
      v3->m_uFlags &= 0xFFFEu;
    else
      v3->m_uFlags |= 1u;
  }
  v4 = v2->m_spBackPlane.m_pObject;
  if ( v4 )
  {
    if ( b )
      v4->m_uFlags &= 0xFFFEu;
    else
      v4->m_uFlags |= 1u;
  }
}

//----- (005B5A80) --------------------------------------------------------
void __thiscall AbstateIcon::AbstateIcon(AbstateIcon *this)
{
  AbstateIcon *v1; // esi@1
  PopupMenuWin *v2; // edi@1

  v1 = this;
  IconWin::IconWin((IconWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&AbstateIcon::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&AbstateIcon::`vftable'{for `IDirectMessenger'};
  v1->m_spPopupMenu.m_pObject = 0;
  v1->m_spBackPlane.m_pObject = 0;
  v1->m_spSubImagePlane.m_pObject = 0;
  v1->m_spSubImageTexProp.m_pObject = 0;
  v1->m_bEraseEnable = 0;
  v2 = v1->m_spPopupMenu.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spPopupMenu.m_pObject = 0;
  }
  v1->IsRButtonClicked = 0;
  v1->m_uiSubIconIndex = -1;
  v1->m_bShowSubIcon = 0;
  v1->m_pkDuplicateText = 0;
  v1->m_bCharged = 0;
  v1->m_pkChargedBuffInfo = 0;
}
// 9A9F08: using guessed type void (__thiscall *AbstateIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A9F24: using guessed type int (__thiscall *AbstateIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (005B5B50) --------------------------------------------------------
void __thiscall AbstateIcon::~AbstateIcon(AbstateIcon *this)
{
  AbstateIcon *v1; // esi@1
  NiTexturingProperty *v2; // edi@1
  NiScreenElements *v3; // edi@5
  NiScreenElements *v4; // edi@9
  PopupMenuWin *v5; // edi@13

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&AbstateIcon::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&AbstateIcon::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spSubImageTexProp.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_spSubImagePlane.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v4 = v1->m_spBackPlane.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v5 = v1->m_spPopupMenu.m_pObject;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  IconWin::~IconWin((IconWin *)&v1->vfptr);
}
// 9A9F08: using guessed type void (__thiscall *AbstateIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9A9F24: using guessed type int (__thiscall *AbstateIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (005B5C50) --------------------------------------------------------
char __userpurge AbstateIcon::Create@<al>(AbstateIcon *this@<ecx>, int a2@<ebx>, int a3@<edi>, int iXPos, int iYPos, int iWidth, int iHeight, PgWin *pkParent, bool EraseEnable)
{
  AbstateIcon *v9; // esi@1
  char result; // al@1
  PgFont *v11; // eax@2
  PgWinText *v12; // eax@2
  NiSourceTexture *v13; // eax@2
  PopupMenuWin *v14; // eax@2
  int v15; // edi@2
  PopupMenuWin *v16; // ebx@2
  char *v17; // eax@9
  PopupMenuText *v18; // eax@9

  v9 = this;
  result = PgWinLRBut::Create((PgWinLRBut *)&this->vfptr, iXPos, iYPos, iWidth, iHeight, pkParent, 0, 0);
  if ( result )
  {
    v11 = Font::Get(0);
    v12 = PgWinText::CreateWin(1, 2, 0xEu, 0xCu, v11, (PgWin *)&v9->vfptr, 0, 0);
    v9->m_pkDuplicateText = v12;
    ((void (__thiscall *)(PgWinText *, signed int, int, int))v12->vfptr[122].__vecDelDtor)(v12, 5, a3, a2);
    SpScreenText::SetShadowOffset((SpScreenText *)&v9->m_pkDuplicateText->m_spTextGeom.m_pObject->vfptr, 1u);
    ((void (__stdcall *)(_DWORD))v9->m_pkDuplicateText->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(D3DXCOLOR *))v9->m_pkDuplicateText->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
    PgWin::AttachChildWin((PgWin *)&v9->vfptr, (PgWin *)&v9->m_pkDuplicateText->vfptr);
    v9->m_bEraseEnable = EraseEnable;
    v13 = MenuTexMgr::GetTexture(1u);
    v14 = PopupMenuWin::CreateWin(v13, 4u, 4u, 0);
    v15 = (int)v9->m_spPopupMenu.m_pObject;
    v16 = v14;
    if ( (PopupMenuWin *)v15 != v14 )
    {
      if ( v15 && !InterlockedDecrement((volatile LONG *)(v15 + 4)) && v15 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v15)(v15, 1);
      v9->m_spPopupMenu.m_pObject = v16;
      if ( v16 )
        InterlockedIncrement((volatile LONG *)&v16->m_uiRefCount);
    }
    ((void (__thiscall *)(IDirectMessengerVtbl **))v9->m_spPopupMenu.m_pObject->vfptr->SetMsgHooker)(&v9->m_spPopupMenu.m_pObject->vfptr);
    PopupMenuWin::Clear(v9->m_spPopupMenu.m_pObject);
    v17 = (char *)TextData2::Get(0xDA03DB33);
    v18 = PopupMenuText::CreateWin(v17, 0, 0, 0, 0, 0, 0);
    v18->m_ePopupMenuID = 1014;
    PopupMenuWin::AddMenu(v9->m_spPopupMenu.m_pObject, v15, (PopupMenu *)&v18->vfptr);
    PopupMenuWin::FinishMenu(v9->m_spPopupMenu.m_pObject, 0);
    ((void (__cdecl *)(_DWORD))v9->m_spPopupMenu.m_pObject->vfptr[64].__vecDelDtor)(0);
    result = 1;
  }
  return result;
}
// 5B5C50: could not find valid save-restore pair for ebx
// 5B5C50: could not find valid save-restore pair for edi

//----- (005B5DF0) --------------------------------------------------------
void __thiscall AbstateIcon::SetBackPlaneColor(AbstateIcon *this, float rad, float green, float blue, float alpha)
{
  AbstateIcon *v5; // esi@1
  NiScreenElements *v6; // eax@1
  NiColorA kCommonValue; // [sp+Ch] [bp-10h]@2

  v5 = this;
  v6 = this->m_spBackPlane.m_pObject;
  if ( v6 )
  {
    kCommonValue.r = rad / 255.0;
    kCommonValue.g = green / 255.0;
    kCommonValue.b = blue / 255.0;
    kCommonValue.a = alpha / 255.0;
    NiScreenElementsData::SetColors((NiScreenElementsData *)v6->m_spModelData.m_pObject, 0, &kCommonValue);
    NiScreenElementsData::UpdateBound((NiScreenElementsData *)v5->m_spBackPlane.m_pObject->m_spModelData.m_pObject);
    NiAVObject::UpdateProperties((NiAVObject *)&v5->m_spBackPlane.m_pObject->vfptr);
    NiAVObject::Update((NiAVObject *)&v5->m_spBackPlane.m_pObject->vfptr, 0.0, 1);
    NiAVObject::UpdateProperties((NiAVObject *)&v5->vfptr);
    NiAVObject::Update((NiAVObject *)&v5->vfptr, 0.0, 1);
  }
}

//----- (005B5E90) --------------------------------------------------------
void __thiscall AbstateIcon::CreateSubIconImg(AbstateIcon *this, char *pcFn, unsigned int uiIndex, unsigned int uiIconWidth, unsigned int uiIconHeight)
{
  AbstateIcon *v5; // esi@1
  NiSourceTexture *v6; // eax@6
  NiSourceTexture *v7; // edi@6
  unsigned int v8; // eax@10
  unsigned int v9; // ST14_4@10
  unsigned int v10; // ST10_4@10
  unsigned int v11; // ST0C_4@10
  unsigned int v12; // eax@10
  char *pcFna; // [sp+1Ch] [bp+8h]@10

  v5 = this;
  if ( pcFn && *pcFn != 45 )
  {
    if ( uiIndex == -1 )
    {
      this->m_bShowSubIcon = 0;
      this->m_spSubImagePlane.m_pObject->m_uFlags |= 1u;
    }
    else
    {
      v6 = IconMgr::GetTexture(pcFn);
      v7 = v6;
      if ( v6 )
      {
        NiTexturingProperty::SetBaseTexture(v5->m_spSubImageTexProp.m_pObject, (NiTexture *)&v6->vfptr);
        v5->m_spSubImagePlane.m_pObject->m_uFlags &= 0xFFFEu;
        v5->m_bShowSubIcon = 1;
        if ( uiIndex != v5->m_uiSubIconIndex )
        {
          if ( v5->m_spSubImageTexProp.m_pObject )
          {
            v8 = ((int (__thiscall *)(_DWORD))v7->vfptr[15].__vecDelDtor)(v7);
            pcFna = (char *)v5->m_spSubImagePlane.m_pObject;
            v9 = uiIconHeight * (uiIndex / (v8 / uiIconWidth));
            v10 = uiIconWidth * (uiIndex % (v8 / uiIconWidth));
            v11 = ((int (__thiscall *)(_DWORD))v7->vfptr[16].__vecDelDtor)(v7);
            v12 = ((int (__thiscall *)(_DWORD))v7->vfptr[15].__vecDelDtor)(v7);
            PgUtil::SetTextureCoord((NiScreenElements *)pcFna, 0, v12, v11, v10, v9, uiIconWidth, uiIconHeight);
            NiAVObject::Update((NiAVObject *)&v5->m_spSubImagePlane.m_pObject->vfptr, 0.0, 1);
            v5->m_uiSubIconIndex = uiIndex;
          }
        }
      }
      else
      {
        v5->m_bShowSubIcon = 0;
        v5->m_spSubImagePlane.m_pObject->m_uFlags |= 1u;
      }
    }
  }
  else
  {
    this->m_bShowSubIcon = 0;
    this->m_spSubImagePlane.m_pObject->m_uFlags |= 1u;
  }
}

//----- (005B5FB0) --------------------------------------------------------
void __thiscall AbstateIcon::OnHide(AbstateIcon *this)
{
  AbstateIcon *v1; // ebx@1
  PROTO_CHARGEDBUFF_INFO *v2; // edi@2
  char *v3; // esi@2
  int v4; // esi@6
  int v5; // edi@6
  int v6; // edi@7
  int v7; // ecx@10
  int v8; // esi@13
  int v9; // ebx@13
  int v10; // esi@14
  int *v11; // eax@17
  GameFrameWork *v12; // ebx@22
  int v13; // eax@22
  NiUnsharedGeometryGroup *v14; // eax@25

  v1 = this;
  if ( this->m_bCharged )
  {
    v2 = this->m_pkChargedBuffInfo;
    v3 = (char *)&this->vfptr;
    if ( this->m_pkMsgHooker )
    {
      ((void (__stdcall *)(signed int, PROTO_CHARGEDBUFF_INFO *, IDirectMessengerVtbl **))this->m_pkMsgHooker->vfptr->SendDirectMessage)(
        82,
        v2,
        &this->vfptr);
      if ( v1->m_pkMsgHooker )
        ((void (__stdcall *)(signed int, PROTO_CHARGEDBUFF_INFO *, IDirectMessengerVtbl **))v1->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          82,
          v2,
          &v1->vfptr);
    }
    (*(void (__thiscall **)(IDirectMessengerVtbl **, signed int, PROTO_CHARGEDBUFF_INFO *, IDirectMessengerVtbl **))(*(_DWORD *)v3 + 20))(
      &v1->vfptr,
      82,
      v2,
      &v1->vfptr);
  }
  else
  {
    v4 = ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;
    v5 = this->m_kAbstateID;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable
                                                          + 16))(
                            ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable,
                            v5) )
    {
      if ( (unsigned __int16)v5 <= *(_WORD *)(v4 + 200) )
      {
        v7 = *(_DWORD *)(v4 + 196);
        if ( *(_DWORD *)(v7 + 4 * v5) )
          v6 = *(_DWORD *)(v7 + 4 * v5);
        else
          v6 = 0;
      }
      else
      {
        v6 = 0;
      }
    }
    else
    {
      v6 = 0;
    }
    v8 = ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
    v9 = v1->m_kAbstateID;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable
                                                          + 16))(
                            ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable,
                            v9) )
    {
      if ( (unsigned __int16)v9 <= *(_WORD *)(v8 + 200) )
      {
        v11 = (int *)(*(_DWORD *)(v8 + 196) + 4 * v9);
        if ( *v11 )
          v10 = *v11;
        else
          v10 = 0;
      }
      else
      {
        v10 = 0;
      }
    }
    else
    {
      v10 = 0;
    }
    if ( v6 && v10 )
    {
      v12 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      v13 = *(_DWORD *)(v6 + 522);
      if ( v13 && v13 != 4 )
      {
        GameFrameWork::NcBatAbastateEraseReq(v12, *(_WORD *)(v10 + 34));
      }
      else
      {
        v14 = TextData2::Get(0x9FEDBEC2);
        GameFrameWork::AddSysMsg(v12, (const char *)v14);
      }
    }
  }
}
// A8C2A0: using guessed type int ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
// A8C2A4: using guessed type int ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;

//----- (005B60E0) --------------------------------------------------------
void __thiscall AbstateIcon::DirectMessage(AbstateIcon *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  AbstateIcon *v4; // esi@1

  v4 = this;
  if ( BYTE2(this->m_kWorld.m_Translate.z) )
  {
    if ( iMsgTag == 5 )
    {
      if ( (unsigned __int8)(*(int (__thiscall **)(_DWORD, _DWORD, _DWORD))(this[-1].m_kChildren.m_uiSize + 348))(
                              &this[-1].m_kChildren.m_uiSize,
                              PgWin::ms_iMsX,
                              PgWin::ms_iMsY)
        && (unsigned __int8)(*(int (__thiscall **)(_DWORD))(v4[-1].m_kChildren.m_uiSize + 260))(&v4[-1].m_kChildren.m_uiSize) )
      {
        BYTE3(v4->m_kWorld.m_Translate.z) = 1;
      }
    }
    else if ( iMsgTag == 6 )
    {
      if ( (unsigned __int8)(*(int (__thiscall **)(_DWORD, _DWORD, _DWORD))(this[-1].m_kChildren.m_uiSize + 348))(
                              &this[-1].m_kChildren.m_uiSize,
                              PgWin::ms_iMsX,
                              PgWin::ms_iMsY)
        && (unsigned __int8)(*(int (__thiscall **)(_DWORD))(v4[-1].m_kChildren.m_uiSize + 260))(&v4[-1].m_kChildren.m_uiSize) )
      {
        if ( BYTE3(v4->m_kWorld.m_Translate.z) )
        {
          (*(void (__stdcall **)(_DWORD, _DWORD))(*(_DWORD *)LODWORD(v4->m_kWorld.m_fScale) + 308))(
            PgWin::ms_iMsX,
            PgWin::ms_iMsY);
          PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)LODWORD(v4->m_kWorld.m_fScale));
        }
        BYTE3(v4->m_kWorld.m_Translate.z) = 0;
      }
    }
    else if ( iMsgTag == 15 && *(_DWORD *)pvBody == 1014 )
    {
      AbstateIcon::OnHide((AbstateIcon *)((char *)this - 232));
    }
  }
}

//----- (005B6210) --------------------------------------------------------
void __thiscall AbstateIcon::CreateSubImagePlane(AbstateIcon *this, unsigned int uiWidth, unsigned int uiHeight)
{
  AbstateIcon *v3; // esi@1
  NiScreenElements *v4; // ebx@1
  NiScreenElementsData *v5; // edi@1
  NiScreenElements *v6; // eax@1
  NiScreenElements *v7; // eax@2
  NiScreenElements *v8; // edi@3
  NiTexturingProperty *v9; // eax@10
  NiTexturingProperty *v10; // eax@11
  NiTexturingProperty *v11; // ebx@11
  NiTexturingProperty *v12; // edi@13
  NiTexturingProperty *v13; // ebx@20
  unsigned int v14; // edi@20
  NiTexturingProperty::Map *v15; // eax@21
  unsigned int v16; // eax@22
  int v17; // ebx@25
  unsigned int v18; // edi@30
  NiScreenElements *v19; // ebx@30
  NiObjectNET *v20; // eax@35
  unsigned int v21; // edi@35
  unsigned int uiWidtha; // [sp+24h] [bp+8h]@38

  v3 = this;
  v4 = 0;
  v5 = PgUtil::CreateScreenGeometryData(uiWidth, uiHeight, 0, 0, uiWidth, uiHeight);
  v6 = (NiScreenElements *)operator new(0xC4u);
  uiHeight = (unsigned int)v6;
  if ( v6 )
  {
    NiScreenElements::NiScreenElements(v6, v5);
    v4 = v7;
  }
  v8 = v3->m_spSubImagePlane.m_pObject;
  if ( v8 != v4 )
  {
    if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v3->m_spSubImagePlane.m_pObject = v4;
    if ( v4 )
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  }
  v9 = (NiTexturingProperty *)operator new(0x44u);
  uiHeight = (unsigned int)v9;
  if ( v9 )
  {
    NiTexturingProperty::NiTexturingProperty(v9);
    v11 = v10;
  }
  else
  {
    v11 = 0;
  }
  v12 = v3->m_spSubImageTexProp.m_pObject;
  if ( v12 != v11 )
  {
    if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
      v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
    v3->m_spSubImageTexProp.m_pObject = v11;
    if ( v11 )
      InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
  }
  v13 = v3->m_spSubImageTexProp.m_pObject;
  v14 0, 1);
  d int)*v13->m_kMaps.m_pBase;
  if ( !v14 )
  {
    v15 = (NiTexturingProperty::Map *)operator new(0x18u);
    uiHeight = (unsigned int)v15;
    if ( v15 )
      NiTexturingProperty::Map::Map(v15);
    else
      v16 = 0;
    v14 = v16;
    uiHeight = v16;
    NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)&v13->m_kMaps, 0, (NiVBChip *const *)&uiHeight);
  }
  v17 = *(_DWORD *)(v14 + 4);
  if ( v17 )
  {
    if ( !InterlockedDecrement((volatile LONG *)(v17 + 4)) && v17 )
      (**(void (__thiscall ***)(_DWORD, _DWORD))v17)(v17, 1);
    *(_DWORD *)(v14 + 4) = 0;
  }
  NiTexturingProperty::SetBaseFilterMode(v3->m_spSubImageTexProp.m_pObject, 0);
  v3->m_spSubImageTexProp.m_pObject->m_eApply = 2;
  NiTexturingProperty::SetBaseClampMode(v3->m_spSubImageTexProp.m_pObject, 0);
  v18 = (unsigned int)v3->m_spSubImageTexProp.m_pObject;
  v19 = v3->m_spSubImagePlane.m_pObject;
  uiHeight = v18;
  if ( v18 )
    InterlockedIncrement((volatile LONG *)(v18 + 4));
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v19->m_kPropertyList,
    (NiPointer<NiRoom> *)&uiHeight);
  if ( v18 && !InterlockedDecrement((volatile LONG *)(v18 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v18)(v18, 1);
  v20 = (NiObjectNET *)operator new(0x20u);
  v21 = (unsigned int)v20;
  uiHeight = (unsigned int)v20;
  if ( v20 )
  {
    NiObjectNET::NiObjectNET(v20);
    *(_DWORD *)v21 = &NiAlphaProperty::`vftable';
    *(_WORD *)(v21 + 28) = 236;
    *(_BYTE *)(v21 + 30) = 0;
  }
  else
  {
    v21 = 0;
  }
  *(_WORD *)(v21 + 28) |= 1u;
  uiWidtha = (unsigned int)v3->m_spSubImagePlane.m_pObject;
  uiHeight = v21;
  InterlockedIncrement((volatile LONG *)(v21 + 4));
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(uiWidtha + 156),
    (NiPointer<NiRoom> *)&uiHeight);
  if ( !InterlockedDecrement((volatile LONG *)(v21 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v21)(v21, 1);
  ((void (__thiscall *)(AbstateIcon *, NiScreenElements *, _DWORD))v3->vfptr[29].__vecDelDtor)(
    v3,
    v3->m_spSubImagePlane.m_pObject,
    0);
  NiAVObject::UpdateProperties((NiAVObject *)&v3->vfptr);
}
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);

//----- (005B64D0) --------------------------------------------------------
AbstateIcon *__cdecl AbstateIcon::CreateWin(int iXPos, int iYPos, int iWidth, int iHeight, PgWin *pkParent, int EraseEnable)
{
  PgWin *v6; // eax@1
  PgWin *v7; // eax@2
  PgWin *v8; // esi@2
  PgWin *v9; // edi@8
  AbstateIcon *v10; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v12; // [sp+20h] [bp-4h]@1

  v6 = (PgWin *)operator new(0x1A4u);
  result.m_pObject = v6;
  v12 = 0;
  if ( v6 )
  {
    AbstateIcon::AbstateIcon((AbstateIcon *)v6);
    v8 = v7;
  }
  else
  {
    v8 = 0;
  }
  if ( v8 )
    InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  v12 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v8);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, int, int, PgWin *, int))v8->vfptr[152].__vecDelDtor)(
                          v8,
                          iXPos,
                          iYPos,
                          iWidth,
                          iHeight,
                          pkParent,
                          EraseEnable) )
  {
    ((void (__thiscall *)(PgWin *, int, int))v8->vfptr[149].__vecDelDtor)(v8, iWidth, iHeight);
    ((void (__thiscall *)(PgWin *))v8->vfptr[89].__vecDelDtor)(v8);
    v12 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v10 = (AbstateIcon *)v8;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v8);
    if ( result.m_pObject )
    {
      v9 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v9 )
          v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      }
    }
    v12 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v10 = 0;
  }
  return v10;
}

//----- (005B6620) --------------------------------------------------------
void __cdecl PgUtil::SetTextureCoord(NiScreenElements *pkScreenGeom, int nPoly, unsigned int uiTextureWidht, unsigned int uiTextureHeight, unsigned int uiXPos, unsigned int uiYPos, unsigned int uiWidth, unsigned int uiHeight)
{
  double v8; // st7@1
  float fBottom; // ST14_4@1
  float fRight; // ST10_4@1
  float fTop; // ST0C_4@1
  unsigned int uiTextureWidhta; // [sp+24h] [bp+10h]@1
  unsigned int uiTextureHeighta; // [sp+28h] [bp+14h]@1
  unsigned int uiTextureHeightb; // [sp+28h] [bp+14h]@1
  unsigned int uiTextureHeightc; // [sp+28h] [bp+14h]@1
  unsigned int uiTextureHeightd; // [sp+28h] [bp+14h]@1
  float uiTextureHeighte; // [sp+28h] [bp+14h]@1

  *(float *)&uiTextureHeighta = (double)uiTextureHeight;
  *(float *)&uiTextureWidhta = (double)uiTextureWidht;
  v8 = *(float *)&uiTextureHeighta;
  *(float *)&uiTextureHeightb = (double)(uiYPos + uiHeight) / *(float *)&uiTextureHeighta;
  fBottom = *(float *)&uiTextureHeightb;
  *(float *)&uiTextureHeightc = (double)(uiXPos + uiWidth) / *(float *)&uiTextureWidhta;
  fRight = *(float *)&uiTextureHeightc;
  *(float *)&uiTextureHeightd = (double)uiYPos / v8;
  fTop = *(float *)&uiTextureHeightd;
  uiTextureHeighte = (double)uiXPos / *(float *)&uiTextureWidhta;
  NiScreenElementsData::SetTextures(
    (NiScreenElementsData *)pkScreenGeom->m_spModelData.m_pObject,
    nPoly,
    0,
    uiTextureHeighte,
    fTop,
    fRight,
    fBottom);
  pkScreenGeom->m_spModelData.m_pObject->m_usDirtyFlags |= 8u;
}

//----- (005B6700) --------------------------------------------------------
AbstateIcon *__thiscall AbstateIcon::`vector deleting destructor'(AbstateIcon *this, unsigned int a2)
{
  AbstateIcon *v2; // esi@1

  v2 = this;
  AbstateIcon::~AbstateIcon(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005B6730) --------------------------------------------------------
void __thiscall ActionIcon::ActionIcon(ActionIcon *this)
{
  ActionIcon *v1; // esi@1

  v1 = this;
  IconWin::IconWin((IconWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ActionIcon::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ActionIcon::`vftable'{for `IDirectMessenger'};
  IconWin::CreateGeometry((IconWin *)&v1->vfptr, 0x20u, 0x20u);
}
// 9AA18C: using guessed type void (__thiscall *ActionIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AA1AC: using guessed type int (__thiscall *ActionIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (005B67A0) --------------------------------------------------------
void __thiscall ActionIcon::~ActionIcon(ActionIcon *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ActionIcon::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ActionIcon::`vftable'{for `IDirectMessenger'};
  IconWin::~IconWin((IconWin *)&this->vfptr);
}
// 9AA18C: using guessed type void (__thiscall *ActionIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AA1AC: using guessed type int (__thiscall *ActionIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (005B67C0) --------------------------------------------------------
bool __thiscall ActionIcon::Create(ActionIcon *this, int iXPos, int iYPos, PgWin *pkParent)
{
  return PgWinLRBut::Create((PgWinLRBut *)&this->vfptr, iXPos, iYPos, 0x20u, 0x20u, pkParent, 0, 0) != 0;
}

//----- (005B67F0) --------------------------------------------------------
void __thiscall ActionIcon::SetAction(ActionIcon *this, unsigned int uiTableIndex)
{
  int v2; // edi@1
  ActionIcon *v3; // esi@1
  int v4; // ecx@3
  int v5; // eax@4
  NiRefObjectVtbl *v6; // edi@5
  int v7; // ST04_4@5
  NiSourceTexture *v8; // eax@5
  void *(__thiscall *v9)(NiRefObject *, unsigned int); // eax@5
  void *(__thiscall *v10)(NiRefObject *, unsigned int); // eax@6

  v2 = ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;
  v3 = this;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, unsigned int))(*(_DWORD *)ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable
                                                                 + 16))(
                          ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable,
                          uiTableIndex)
    && (unsigned __int16)uiTableIndex <= *(_WORD *)(v2 + 200)
    && (v4 = *(_DWORD *)(v2 + 196), *(_DWORD *)(v4 + 4 * (unsigned __int16)uiTableIndex))
    && (v5 = *(_DWORD *)(v4 + 4 * (unsigned __int16)uiTableIndex)) != 0 )
  {
    v6 = v3->vfptr;
    v7 = *(_WORD *)(v5 + 99);
    v8 = IconMgr::GetTexture((char *)(v5 + 67));
    ((void (__thiscall *)(ActionIcon *, NiSourceTexture *, int, signed int, signed int))v6[146].__vecDelDtor)(
      v3,
      v8,
      v7,
      32,
      32);
    v9 = v3->vfptr[60].__vecDelDtor;
    v3->m_uFlags &= 0xFFFEu;
    v9((NiRefObject *)&v3->vfptr, 1u);
  }
  else
  {
    ((void (__thiscall *)(ActionIcon *, _DWORD, signed int, signed int, signed int))v3->vfptr[146].__vecDelDtor)(
      v3,
      0,
      -1,
      32,
      32);
    v10 = v3->vfptr[60].__vecDelDtor;
    v3->m_uFlags |= 1u;
    v10((NiRefObject *)&v3->vfptr, 0);
  }
}
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;

//----- (005B68A0) --------------------------------------------------------
ActionIcon *__cdecl ActionIcon::CreateWin(int iXPos, int iYPos, PgWin *pkParent)
{
  PgWin *v3; // eax@1
  IconWin *v4; // esi@1
  PgWin *v5; // edi@8
  ActionIcon *v6; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x180u);
  v4 = (IconWin *)v3;
  result.m_pObject = v3;
  v8 = 0;
  if ( v3 )
  {
    IconWin::IconWin((IconWin *)v3);
    LOBYTE(v8) = 1;
    v4->vfptr = (NiRefObjectVtbl *)&ActionIcon::`vftable'{for `NiNode'};
    v4->vfptr = (IDirectMessengerVtbl *)&ActionIcon::`vftable'{for `IDirectMessenger'};
    IconWin::CreateGeometry(v4, 0x20u, 0x20u);
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v8 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, (PgWin *)&v4->vfptr);
  if ( (unsigned __int8)((int (__thiscall *)(IconWin *, int, int, PgWin *))v4->vfptr[152].__vecDelDtor)(
                          v4,
                          iXPos,
                          iYPos,
                          pkParent) )
  {
    ((void (__thiscall *)(IconWin *))v4->vfptr[89].__vecDelDtor)(v4);
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = (ActionIcon *)v4;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, (PgWin *)&v4->vfptr);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = 0;
  }
  return v6;
}
// 9AA18C: using guessed type void (__thiscall *ActionIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AA1AC: using guessed type int (__thiscall *ActionIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (005B6A00) --------------------------------------------------------
ActionIcon *__thiscall ActionIcon::`vector deleting destructor'(ActionIcon *this, unsigned int a2)
{
  ActionIcon *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ActionIcon::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ActionIcon::`vftable'{for `IDirectMessenger'};
  IconWin::~IconWin((IconWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9AA18C: using guessed type void (__thiscall *ActionIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AA1AC: using guessed type int (__thiscall *ActionIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (005B6A40) --------------------------------------------------------
void __thiscall AniIconWin::AniIconWin(AniIconWin *this)
{
  AniIconWin *v1; // esi@1

  v1 = this;
  IconWin::IconWin((IconWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&AniIconWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&AniIconWin::`vftable'{for `IDirectMessenger'};
}
// 9AA414: using guessed type void (__thiscall *AniIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AA434: using guessed type int (__thiscall *AniIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005B6A60) --------------------------------------------------------
void __thiscall AniIconWin::~AniIconWin(AniIconWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&AniIconWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&AniIconWin::`vftable'{for `IDirectMessenger'};
  IconWin::~IconWin((IconWin *)&this->vfptr);
}
// 9AA414: using guessed type void (__thiscall *AniIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AA434: using guessed type int (__thiscall *AniIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005B6A80) --------------------------------------------------------
char __thiscall AniIconWin::Create(AniIconWin *this, int iXPos, int iYPos, int iWidth, int iHeight, PgWin *pkParent)
{
  AniIconWin *v6; // esi@1
  char result; // al@1

  v6 = this;
  result = PgWinLRBut::Create((PgWinLRBut *)&this->vfptr, iXPos, iYPos, iWidth, iHeight, pkParent, 0, 0);
  if ( result )
  {
    ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v6->vfptr[149].__vecDelDtor)(v6, iWidth, iHeight);
    result = 1;
  }
  return result;
}

//----- (005B6AE0) --------------------------------------------------------
bool __stdcall AniIconWin::CreateItemIconTexture(unsigned __int16 itemID)
{
  return 0;
}

//----- (005B6AF0) --------------------------------------------------------
NiScreenElements *__thiscall AniIconWin::GetGeometry(AniIconWin *this)
{
  return this->m_spGeom.m_pObject;
}

//----- (005B6B00) --------------------------------------------------------
char __thiscall AniIconWin::CreateAniTexture(AniIconWin *this, const char *pkName)
{
  AniIconWin *v2; // esi@1
  NiProperty *v3; // eax@2
  NiProperty *v5; // eax@4
  const char *v6; // esi@7

  v2 = this;
  if ( pkName )
  {
    IconMgr::GetAniTextureProperty((NiPointer<NiTexturingProperty> *)&pkName, pkName);
    v5 = NiAVObject::GetProperty((NiAVObject *)&v2->m_spGeom.m_pObject->vfptr, 8);
    if ( v5 )
      NiAVObject::DetachProperty((NiAVObject *)&v2->m_spGeom.m_pObject->vfptr, v5);
    NiAVObject::AttachProperty((NiAVObject *)&v2->m_spGeom.m_pObject->vfptr, (NiProperty *)pkName);
    NiAVObject::UpdateEffects((NiAVObject *)&v2->m_spGeom.m_pObject->vfptr);
    NiAVObject::UpdateProperties((NiAVObject *)&v2->m_spGeom.m_pObject->vfptr);
    if ( pkName )
    {
      v6 = pkName;
      if ( !InterlockedDecrement((volatile LONG *)pkName + 1) )
      {
        if ( v6 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v6)(v6, 1);
      }
    }
  }
  else
  {
    v3 = NiAVObject::GetProperty((NiAVObject *)&this->m_spGeom.m_pObject->vfptr, 8);
    if ( v3 )
    {
      NiAVObject::DetachProperty((NiAVObject *)&v2->m_spGeom.m_pObject->vfptr, v3);
      return 1;
    }
  }
  return 1;
}

//----- (005B6C00) --------------------------------------------------------
AniIconWin *__cdecl AniIconWin::CreateWin(int iXPos, int iYPos, PgWin *pkParent)
{
  PgWin *v3; // eax@1
  PgWin *v4; // esi@1
  PgWin *v5; // edi@8
  AniIconWin *v6; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x17Cu);
  v4 = v3;
  result.m_pObject = v3;
  v8 = 0;
  if ( v3 )
  {
    IconWin::IconWin((IconWin *)v3);
    v4->vfptr = (NiRefObjectVtbl *)&AniIconWin::`vftable'{for `NiNode'};
    v4->vfptr = (IDirectMessengerVtbl *)&AniIconWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v8 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v4);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, signed int, signed int, PgWin *))v4->vfptr[152].__vecDelDtor)(
                          v4,
                          iXPos,
                          iYPos,
                          32,
                          32,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v4->vfptr[89].__vecDelDtor)(v4);
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = (AniIconWin *)v4;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v4);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = 0;
  }
  return v6;
}
// 9AA414: using guessed type void (__thiscall *AniIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AA434: using guessed type int (__thiscall *AniIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005B6D50) --------------------------------------------------------
AniIconWin *__cdecl AniIconWin::CreateWin(int iXPos, int iYPos, int iWidth, int iHeight, PgWin *pkParent)
{
  PgWin *v5; // eax@1
  PgWin *v6; // esi@1
  PgWin *v7; // edi@8
  AniIconWin *v8; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v10; // [sp+20h] [bp-4h]@1

  v5 = (PgWin *)operator new(0x17Cu);
  v6 = v5;
  result.m_pObject = v5;
  v10 = 0;
  if ( v5 )
  {
    IconWin::IconWin((IconWin *)v5);
    v6->vfptr = (NiRefObjectVtbl *)&AniIconWin::`vftable'{for `NiNode'};
    v6->vfptr = (IDirectMessengerVtbl *)&AniIconWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v6 = 0;
  }
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v10 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v6);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, int, int, PgWin *))v6->vfptr[152].__vecDelDtor)(
                          v6,
                          iXPos,
                          iYPos,
                          iWidth,
                          iHeight,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v6->vfptr[89].__vecDelDtor)(v6);
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = (AniIconWin *)v6;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v6);
    if ( result.m_pObject )
    {
      v7 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      }
    }
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = 0;
  }
  return v8;
}
// 9AA414: using guessed type void (__thiscall *AniIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AA434: using guessed type int (__thiscall *AniIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005B6EA0) --------------------------------------------------------
NiPointer<AniIconWin> *__cdecl AniIconWin::CreateWin(NiPointer<AniIconWin> *result, const char *pkName, int iWidth, int iHeight)
{
  IconWin *v4; // eax@1
  PgWin *v5; // esi@1

  v4 = (IconWin *)operator new(0x17Cu);
  v5 = (PgWin *)v4;
  if ( v4 )
  {
    IconWin::IconWin(v4);
    v5->vfptr = (NiRefObjectVtbl *)&AniIconWin::`vftable'{for `NiNode'};
    v5->vfptr = (IDirectMessengerVtbl *)&AniIconWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  PgWinMgr::Add(&Pgg_kWinMgr, v5);
  result->m_pObject = (AniIconWin *)v5;
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  ((void (__stdcall *)(int, int))result->m_pObject->vfptr[149].__vecDelDtor)(iWidth, iHeight);
  AniIconWin::CreateAniTexture(result->m_pObject, pkName);
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  return result;
}
// 9AA414: using guessed type void (__thiscall *AniIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AA434: using guessed type int (__thiscall *AniIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005B6FA0) --------------------------------------------------------
AniIconWin *__thiscall AniIconWin::`scalar deleting destructor'(AniIconWin *this, unsigned int a2)
{
  AniIconWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&AniIconWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&AniIconWin::`vftable'{for `IDirectMessenger'};
  IconWin::~IconWin((IconWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9AA414: using guessed type void (__thiscall *AniIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AA434: using guessed type int (__thiscall *AniIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005B6FE0) --------------------------------------------------------
Item *__thiscall IconSlotWin::GetItem(IconSlotWin *this)
{
  ItemIcon *v1; // ecx@2
  Item *result; // eax@3

  if ( this->m_eType || (v1 = (ItemIcon *)this->m_spIcon.m_pObject) == 0 )
    result = 0;
  else
    result = ItemIcon::GetItem(v1);
  return result;
}

//----- (005B7000) --------------------------------------------------------
void __thiscall IconSlotWin::OnFirstHitWin(IconSlotWin *this)
{
  IconSlotWin *v1; // esi@1
  ItemInfoWin *v2; // edi@2
  ItemIcon *v3; // ecx@3
  Item *v4; // eax@4

  v1 = this;
  if ( this->m_eType == CT_ITEM )
  {
    v2 = (ItemInfoWin *)this->m_pkToolTipWin;
    if ( !v2 )
      return;
    v3 = (ItemIcon *)this->m_spIcon.m_pObject;
    if ( v3 )
    {
      v4 = ItemIcon::GetItem(v3);
      ItemInfoWin::SetItemInfo(v2, v4);
      PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
      return;
    }
    ItemInfoWin::SetItemInfo(v2, 0);
  }
  PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
}

//----- (005B7050) --------------------------------------------------------
unsigned __int16 __thiscall IconSlotWin::GetSkill(IconSlotWin *this)
{
  unsigned __int16 result; // ax@2

  if ( this->m_eType == 1 )
    result = SkillIcon::GetSkill((SkillIcon *)this->m_spIcon.m_pObject);
  else
    result = -1;
  return result;
}

//----- (005B7070) --------------------------------------------------------
void __thiscall IconSlotWin::IconSlotWin(IconSlotWin *this)
{
  IconSlotWin *v1; // esi@1
  IconWin *v2; // edi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&IconSlotWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&IconSlotWin::`vftable'{for `IDirectMessenger'};
  v1->m_spIcon.m_pObject = 0;
  v1->m_iIconOffsetX = 0;
  v1->m_iIconOffsetY = 0;
  v1->m_bKeepDropWhenFailed = 0;
  v2 = v1->m_spIcon.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spIcon.m_pObject = 0;
  }
  v1->m_eType = -1;
}
// 9AA69C: using guessed type void (__thiscall *IconSlotWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AA6BC: using guessed type int (__thiscall *IconSlotWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005B7120) --------------------------------------------------------
void __thiscall IconSlotWin::~IconSlotWin(IconSlotWin *this)
{
  IconSlotWin *v1; // esi@1
  IconWin *v2; // edi@1
  IconWin *v3; // edi@6

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&IconSlotWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&IconSlotWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spIcon.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spIcon.m_pObject = 0;
  }
  v3 = v1->m_spIcon.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  PgWin::~PgWin((PgWin *)&v1->vfptr);
}
// 9AA69C: using guessed type void (__thiscall *IconSlotWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AA6BC: using guessed type int (__thiscall *IconSlotWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005B71E0) --------------------------------------------------------
void __thiscall IconSlotWin::SetItem(IconSlotWin *this, Item *pkItem, bool bShowLotText, bool bEnable)
{
  Item *v4; // ebx@1
  IconSlotWin *v5; // esi@1
  ItemIcon *v6; // edi@2
  void *(__thiscall *v7)(NiRefObject *, unsigned int); // eax@2
  Item *v8; // ebx@4
  IconWin *v9; // ebx@7
  ItemIcon *v10; // ebx@12

  v4 = pkItem;
  v5 = this;
  if ( pkItem )
  {
    v6 = ItemIcon::CreateWin(this->m_iIconOffsetX, this->m_iIconOffsetY, (PgWin *)&this->vfptr);
    ItemIcon::SetItem(v6, v4, bEnable);
    ItemIcon::ShowLotText(v6, bShowLotText);
    v7 = v6->vfptr[60].__vecDelDtor;
    v6->m_bDroppable = 0;
    v7((NiRefObject *)&v6->vfptr, 0);
    if ( v5->m_spIcon.m_pObject )
    {
      PgWin::DetachChildWin((PgWin *)&v5->vfptr, (NiPointer<PgWin> *)&pkItem, (PgWin *)&v5->m_spIcon.m_pObject->vfptr);
      if ( pkItem )
      {
        v8 = pkItem;
        if ( !InterlockedDecrement((volatile LONG *)&pkItem->m_uiRefCount) )
        {
          if ( v8 )
            v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
        }
      }
      PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v5->m_spIcon.m_pObject->vfptr);
      v9 = v5->m_spIcon.m_pObject;
      if ( v9 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
          v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
        v5->m_spIcon.m_pObject = 0;
      }
    }
    v10 = (ItemIcon *)v5->m_spIcon.m_pObject;
    if ( v10 != v6 )
    {
      if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) )
      {
        if ( v10 )
          v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
      }
      v5->m_spIcon.m_pObject = (IconWin *)v6;
      InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
    }
    v5->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
    v5->m_eType = 0;
  }
}

//----- (005B7310) --------------------------------------------------------
void __thiscall IconSlotWin::Clear(IconSlotWin *this)
{
  IconSlotWin *v1; // esi@1
  IconWin *v2; // eax@1
  PgWin *v3; // edi@3
  IconWin *v4; // edi@6
  NiPointer<PgWin> result; // [sp+4h] [bp-4h]@2

  v1 = this;
  v2 = this->m_spIcon.m_pObject;
  if ( v2 )
  {
    PgWin::DetachChildWin((PgWin *)&this->vfptr, &result, (PgWin *)&v2->vfptr);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_spIcon.m_pObject->vfptr);
    v4 = v1->m_spIcon.m_pObject;
    if ( v4 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
      v1->m_spIcon.m_pObject = 0;
    }
    v1->m_eType = -1;
  }
  else
  {
    this->m_eType = -1;
  }
}

//----- (005B73C0) --------------------------------------------------------
void __thiscall IconSlotWin::SetSkill(IconSlotWin *this, unsigned __int16 kSkillID)
{
  IconSlotWin *v2; // edi@1
  SkillIcon *v3; // esi@1
  void *(__thiscall *v4)(NiRefObject *, unsigned int); // edx@1
  SkillIcon *v5; // ebx@1

  v2 = this;
  v3 = SkillIcon::CreateWin(this->m_iIconOffsetX, this->m_iIconOffsetY, (PgWin *)&this->vfptr);
  SkillIcon::SetSkill(v3, kSkillID);
  v4 = v3->vfptr[60].__vecDelDtor;
  v3->m_bDroppable = 0;
  v4((NiRefObject *)&v3->vfptr, 0);
  v5 = (SkillIcon *)v2->m_spIcon.m_pObject;
  if ( v5 != v3 )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v2->m_spIcon.m_pObject = (IconWin *)v3;
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
  v2->m_eType = 1;
}

//----- (005B7450) --------------------------------------------------------
void __thiscall IconSlotWin::SetAction(IconSlotWin *this, unsigned int uiTableIndex)
{
  IconSlotWin *v2; // edi@1
  ActionIcon *v3; // esi@1
  void *(__thiscall *v4)(NiRefObject *, unsigned int); // edx@1
  ActionIcon *v5; // ebx@1

  v2 = this;
  v3 = ActionIcon::CreateWin(this->m_iIconOffsetX, this->m_iIconOffsetY, (PgWin *)&this->vfptr);
  ActionIcon::SetAction(v3, uiTableIndex);
  v4 = v3->vfptr[60].__vecDelDtor;
  v3->m_bDroppable = 0;
  v4((NiRefObject *)&v3->vfptr, 0);
  v5 = (ActionIcon *)v2->m_spIcon.m_pObject;
  if ( v5 != v3 )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v2->m_spIcon.m_pObject = (IconWin *)v3;
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
  v2->m_eType = 3;
}

//----- (005B74E0) --------------------------------------------------------
void __userpurge IconSlotWin::SetItemSell(IconSlotWin *this@<ecx>, int a2@<ebx>, PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *pkItemSellInfo)
{
  IconSlotWin *v3; // edi@1
  ItemIcon *v4; // esi@1
  ItemIcon *v5; // ebx@1

  v3 = this;
  v4 = ItemIcon::CreateWin(this->m_iIconOffsetX, this->m_iIconOffsetY, (PgWin *)&this->vfptr);
  v4->m_bDroppable = 0;
  ItemIcon::SetItemSellInfo(v4, a2, (int)v3, pkItemSellInfo);
  v4->vfptr[60].__vecDelDtor((NiRefObject *)v4, 0);
  v5 = (ItemIcon *)v3->m_spIcon.m_pObject;
  if ( v5 != v4 )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
    {
      if ( v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
    v3->m_spIcon.m_pObject = (IconWin *)v4;
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  }
}

//----- (005B7570) --------------------------------------------------------
void __thiscall IconSlotWin::SetItemByID(IconSlotWin *this, int kItemID)
{
  IconSlotWin *v2; // esi@1
  ItemIcon *v3; // edi@1
  void *(__thiscall *v4)(NiRefObject *, unsigned int); // edx@1
  ItemIcon *v5; // ebx@1

  v2 = this;
  v3 = ItemIcon::CreateWin(this->m_iIconOffsetX, this->m_iIconOffsetY, (PgWin *)&this->vfptr);
  ItemIcon::SetItemAsID(v3, (int)v3, kItemID);
  v4 = v3->vfptr[60].__vecDelDtor;
  v3->m_bDroppable = 0;
  v4((NiRefObject *)&v3->vfptr, 0);
  v5 = (ItemIcon *)v2->m_spIcon.m_pObject;
  if ( v5 == v3 )
  {
    v2->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
    v2->m_eType = 6;
  }
  else
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
    {
      if ( v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
    v2->m_spIcon.m_pObject = (IconWin *)v3;
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
    v2->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
    v2->m_eType = 6;
  }
}

//----- (005B7630) --------------------------------------------------------
void __userpurge IconSlotWin::SetDropContents(IconSlotWin *this@<ecx>, int a2@<ebx>, DropContents *pkDropContents)
{
  IconSlotWin *v3; // edi@1

  v3 = this;
  if ( pkDropContents )
  {
    switch ( pkDropContents->m_eType )
    {
      case 0:
        IconSlotWin::SetItem(this, (Item *)pkDropContents->m_apvParam[0], 0, 1);
        v3->m_kContentsDetail.kItem.uiSenderType = pkDropContents->m_eSenderType;
        v3->m_kContentsDetail.kItem.uiSenderIndex = pkDropContents->m_uiSenderIndex;
        break;
      case 6:
        if ( pkDropContents->m_kItemID != -1 )
          IconSlotWin::SetItemByID(this, pkDropContents->m_kItemID);
        break;
      case 1:
        IconSlotWin::SetSkill(this, (unsigned __int16)pkDropContents->m_apvParam[0]);
        break;
      case 3:
        IconSlotWin::SetAction(this, pkDropContents->nTableIndexNum);
        break;
      case 2:
        IconSlotWin::SetItemSell(this, a2, (PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *)pkDropContents->m_apvParam[0]);
        break;
      default:
        return;
    }
  }
}

//----- (005B76E0) --------------------------------------------------------
char __thiscall IconSlotWin::EatDropInstance(IconSlotWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  IconSlotWin *v4; // ebx@1
  DropContents *v6; // edi@3
  bool v7; // zf@4
  char *v8; // esi@4
  DirectUserMsgBody_DroppedOnSlot kDrop; // [sp+4h] [bp-10h]@4

  v4 = this;
  if ( !*pkDrop )
    return 0;
  v6 = (DropContents *)(*pkDrop)->m_pkContents;
  if ( v6 )
  {
    v7 = this->m_pkMsgHooker == 0;
    v8 = (char *)&this->vfptr;
    kDrop.pkDropContents = (DropContents *)(*pkDrop)->m_pkContents;
    kDrop.iDropXPos = iDropXPos;
    kDrop.iDropYPos = iDropYPos;
    kDrop.bRetDropable = 0;
    if ( !v7 )
    {
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))this->m_pkMsgHooker->vfptr->SendDirectMessage)(
        22,
        &kDrop,
        &this->vfptr);
      if ( v4->m_pkMsgHooker )
        ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v4->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          22,
          &kDrop,
          &v4->vfptr);
    }
    (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v8 + 20))(&v4->vfptr, 22, &kDrop, &v4->vfptr);
    if ( kDrop.bRetDropable )
    {
      IconSlotWin::Clear(v4);
      IconSlotWin::SetDropContents(v4, (int)v4, v6);
      return 1;
    }
    if ( v4->m_bKeepDropWhenFailed )
      PgCursor::ms_bKeepDrop = 1;
  }
  return 0;
}
// B648B8: using guessed type bool PgCursor::ms_bKeepDrop;

//----- (005B77A0) --------------------------------------------------------
IconSlotWin *__cdecl IconSlotWin::CreateWin(int iXPos, int iYPos, PgWin *pkParent)
{
  PgWin *v3; // eax@1
  PgWin *v4; // eax@2
  PgWin *v5; // esi@2
  PgWin *v6; // edi@8
  IconSlotWin *v7; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x13Cu);
  result.m_pObject = v3;
  v9 = 0;
  if ( v3 )
  {
    IconSlotWin::IconSlotWin((IconSlotWin *)v3);
    v5 = v4;
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v9 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v5);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, signed int, signed int, PgWin *, _DWORD, _DWORD))v5->vfptr[84].__vecDelDtor)(
                          v5,
                          iXPos,
                          iYPos,
                          32,
                          32,
                          pkParent,
                          0,
                          0) )
  {
    v5->m_bDroppable = 1;
    ((void (__thiscall *)(PgWin *))v5->vfptr[89].__vecDelDtor)(v5);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = (IconSlotWin *)v5;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v5);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = 0;
  }
  return v7;
}

//----- (005B78F0) --------------------------------------------------------
IconSlotWin *__thiscall IconSlotWin::`scalar deleting destructor'(IconSlotWin *this, unsigned int a2)
{
  IconSlotWin *v2; // esi@1

  v2 = this;
  IconSlotWin::~IconSlotWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005B7920) --------------------------------------------------------
void __thiscall IconWin::SetIconImg(IconWin *this, NiSourceTexture *pkTexture, unsigned int uiIndex, unsigned int uiIconWidth, unsigned int uiIconHeight)
{
  IconWin *v5; // esi@1

  v5 = this;
  ((void (__stdcall *)(_DWORD))this->vfptr[150].__vecDelDtor)(pkTexture);
  if ( uiIndex != v5->m_uiIconIndex )
  {
    if ( uiIndex != -1 )
      ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v5->vfptr[151].__vecDelDtor)(
        v5,
        pkTexture,
        uiIndex,
        uiIconWidth,
        uiIconHeight);
    v5->m_uiIconIndex = uiIndex;
  }
}

//----- (005B7970) --------------------------------------------------------
std::vector<unsigned long,std::allocator<unsigned long> > *__cdecl IconWin::GetCoolTimeIconList()
{
  return &IconWin::ms_kCoolTimeIconList;
}

//----- (005B7980) --------------------------------------------------------
void __thiscall DecoPlaneTex::Show(DecoPlaneTex *this, bool bShow)
{
  NiScreenElements *v2; // eax@2

  if ( this->m_bShowDeco )
  {
    v2 = this->m_spDecoPlane.m_pObject;
    if ( bShow )
      v2->m_uFlags &= 0xFFFEu;
    else
      v2->m_uFlags |= 1u;
  }
}

//----- (005B79B0) --------------------------------------------------------
void __thiscall DecoPlaneColor::Show(DecoPlaneColor *this, bool bShow)
{
  NiScreenElements *v2; // eax@2
  NiScreenElements *v3; // ecx@6

  if ( this->m_bShowDeco )
  {
    v2 = this->m_spDecoPlane.m_pObject;
    if ( bShow )
      v2->m_uFlags &= 0xFFFEu;
    else
      v2->m_uFlags |= 1u;
  }
  if ( this->m_bShowSub )
  {
    v3 = this->m_spSubPlane.m_pObject;
    if ( bShow )
      v3->m_uFlags &= 0xFFFEu;
    else
      v3->m_uFlags |= 1u;
  }
}

//----- (005B7A00) --------------------------------------------------------
void __thiscall IconWin::ProcessMeInput(IconWin *this, bool *bHit)
{
  IconWin *v2; // esi@1
  bool v3; // bl@1
  char v4; // al@1
  NiAVObject *v5; // eax@3

  v2 = this;
  v3 = dword_B64784 >= 1;
  v4 = ((int (__stdcall *)(unsigned int, int))this->vfptr[87].__vecDelDtor)(PgWin::ms_iMsX, PgWin::ms_iMsY);
  *bHit = v4;
  if ( v4 && v2->m_bShowFocus )
  {
    v5 = v2->m_spClickGeom.m_pObject;
    if ( !v3 )
    {
      v5->m_uFlags |= 1u;
      v2->m_spOverGeom.m_pObject->m_uFlags &= 0xFFFEu;
      PgWinLRBut::ProcessMeInput((PgWinLRBut *)&v2->vfptr, bHit);
      return;
    }
    v5->m_uFlags &= 0xFFFEu;
  }
  else
  {
    v2->m_spClickGeom.m_pObject->m_uFlags |= 1u;
  }
  v2->m_spOverGeom.m_pObject->m_uFlags |= 1u;
  PgWinLRBut::ProcessMeInput((PgWinLRBut *)&v2->vfptr, bHit);
}
// B64784: using guessed type int dword_B64784;

//----- (005B7AA0) --------------------------------------------------------
void __thiscall IconWin::ReleaseMeInput(IconWin *this)
{
  this->m_spClickGeom.m_pObject->m_uFlags |= 1u;
  this->m_spOverGeom.m_pObject->m_uFlags |= 1u;
}

//----- (005B7AC0) --------------------------------------------------------
void __thiscall IconWin::Show(IconWin *this, bool b)
{
  NiScreenElements *v2; // eax@1
  ClockShadowWin *v3; // ecx@5

  v2 = this->m_spGeom.m_pObject;
  if ( v2 )
  {
    if ( b )
      v2->m_uFlags &= 0xFFFEu;
    else
      v2->m_uFlags |= 1u;
  }
  v3 = this->m_spClockShadowWin.m_pObject;
  if ( v3 )
    v3->b_show = b;
}

//----- (005B7B00) --------------------------------------------------------
bool __thiscall IconWin::GetShow(IconWin *this)
{
  NiScreenElements *v1; // eax@1
  bool result; // al@2

  v1 = this->m_spGeom.m_pObject;
  if ( v1 )
    result = ~LOBYTE(v1->m_uFlags) & 1;
  else
    result = 0;
  return result;
}

//----- (005B7B20) --------------------------------------------------------
void __thiscall IconWin::ShowFocus(IconWin *this, bool bFocus)
{
  this->m_bShowFocus = bFocus;
  if ( !bFocus )
  {
    this->m_spClickGeom.m_pObject->m_uFlags |= 1u;
    this->m_spOverGeom.m_pObject->m_uFlags |= 1u;
  }
}

//----- (005B7B50) --------------------------------------------------------
void __thiscall IconWin::UpdateMeWin(IconWin *this, float fCurTime)
{
  IconWin *v2; // esi@1
  ClockShadowWin *v3; // eax@1
  NiNode *v4; // ebx@5
  SpEffect *v5; // eax@6
  SpEffect *v6; // edi@6
  SpEffect *v7; // ST14_4@6
  SpEffect *v8; // eax@6
  NiNode *v9; // eax@7
  SpEffect *v10; // ecx@9
  ClockShadowWin *v11; // eax@11
  SpEffect *v12; // ecx@14

  v2 = this;
  v3 = this->m_spClockShadowWin.m_pObject;
  if ( v3 && this->m_bClockShadowWinActive && !v3->m_bStart )
  {
    if ( !this->m_pkCoolTimeOverEffect )
    {
      v4 = EffectMgr::GetEffectNode(&g_kEffectMgr, "WeaponTitle");
      if ( v4 )
      {
        v5 = (SpEffect *)operator new(0x44u);
        v6 = v5;
        v7 = v5;
        v8 = 0;
        if ( v7 )
        {
          v9 = (NiNode *)NiObject::Clone((NiObject *)&v4->vfptr);
          SpEffect::SpEffect(v6, v9);
        }
        v2->m_pkCoolTimeOverEffect = v8;
      }
    }
    v10 = v2->m_pkCoolTimeOverEffect;
    if ( v10 )
      SpEffect::Start(v10, (NiNode *)&v2->vfptr);
  }
  v11 = v2->m_spClockShadowWin.m_pObject;
  if ( v11 )
    v2->m_bClockShadowWinActive = v11->m_bStart;
  else
    v2->m_bClockShadowWinActive = 0;
  v12 = v2->m_pkCoolTimeOverEffect;
  if ( v12 )
    SpEffect::Update(v12, fCurTime);
}

//----- (005B7C40) --------------------------------------------------------
void __thiscall IconWin::SetCoolTimeID(IconWin *this, unsigned __int16 id)
{
  IconWin *v2; // esi@1
  ClockShadowWin *v3; // ecx@1

  v2 = this;
  v3 = this->m_spClockShadowWin.m_pObject;
  if ( v3 )
  {
    ClockShadowWin::StopClockShadow(v3);
    v2->m_bClockShadowWinActive = 0;
  }
  v2->m_coolTimeID = id;
  if ( id != -1 )
    v2->m_bCoolTimeCheckNeeded = 1;
}

//----- (005B7C80) --------------------------------------------------------
void __thiscall IconWin::SetCoolTimeIDByItemAction(IconWin *this, unsigned __int16 id)
{
  IconWin *v2; // esi@1
  ClockShadowWin *v3; // ecx@1

  v2 = this;
  v3 = this->m_spClockShadowWin.m_pObject;
  if ( v3 )
  {
    ClockShadowWin::StopClockShadow(v3);
    v2->m_bClockShadowWinActive = 0;
  }
  v2->m_CoolGroupItemActionID = id;
  if ( id != -1 )
    v2->m_bCoolTimeCheckNeeded = 1;
}

//----- (005B7CC0) --------------------------------------------------------
bool __thiscall IconWin::IsStartCoolTime(IconWin *this)
{
  ClockShadowWin *v1; // eax@1

  v1 = this->m_spClockShadowWin.m_pObject;
  return v1 && v1->m_bStart;
}

//----- (005B7CE0) --------------------------------------------------------
void __thiscall IconWin::CooltimeDecrease(IconWin *this, unsigned __int16 kID)
{
  ClockShadowWin::CoolTimeDecrease(this->m_spClockShadowWin.m_pObject, kID);
}

//----- (005B7CF0) --------------------------------------------------------
void __thiscall IconWin::SelectIcon(IconWin *this)
{
  this->m_spClickGeom.m_pObject->m_uFlags &= 0xFFFEu;
  this->m_spOverGeom.m_pObject->m_uFlags |= 1u;
}

//----- (005B7D10) --------------------------------------------------------
void __thiscall DecoPlaneTex::DecoPlaneTex(DecoPlaneTex *this)
{
  this->m_spDecoPlane.m_pObject = 0;
  this->m_spDecoTexProp.m_pObject = 0;
  this->m_uiDecoImageIndex = -1;
  this->m_bShowDeco = 0;
}

//----- (005B7D30) --------------------------------------------------------
void __thiscall DecoPlaneTex::SetImage(DecoPlaneTex *this, char *pcFn, unsigned int uiIndex)
{
  DecoPlaneTex *v3; // esi@1
  NiSourceTexture *v4; // eax@6
  NiSourceTexture *v5; // edi@6
  unsigned int v6; // eax@10
  unsigned int v7; // ST14_4@10
  unsigned int v8; // ST10_4@10
  unsigned int v9; // ST0C_4@10
  unsigned int v10; // eax@10
  char *pcFna; // [sp+1Ch] [bp+8h]@10

  v3 = this;
  if ( pcFn && *pcFn != 45 )
  {
    if ( uiIndex == -1 )
    {
      this->m_bShowDeco = 0;
      this->m_spDecoPlane.m_pObject->m_uFlags |= 1u;
    }
    else
    {
      v4 = IconMgr::GetTexture(pcFn);
      v5 = v4;
      if ( v4 )
      {
        NiTexturingProperty::SetBaseTexture(v3->m_spDecoTexProp.m_pObject, (NiTexture *)&v4->vfptr);
        v3->m_spDecoPlane.m_pObject->m_uFlags &= 0xFFFEu;
        v3->m_bShowDeco = 1;
        if ( uiIndex != v3->m_uiDecoImageIndex )
        {
          if ( v3->m_spDecoTexProp.m_pObject )
          {
            v6 = ((int (__thiscall *)(_DWORD))v5->vfptr[15].__vecDelDtor)(v5);
            pcFna = (char *)v3->m_spDecoPlane.m_pObject;
            v7 = 32 * (uiIndex / (v6 >> 5));
            v8 = 32 * (uiIndex % (v6 >> 5));
            v9 = ((int (__thiscall *)(_DWORD))v5->vfptr[16].__vecDelDtor)(v5);
            v10 = ((int (__thiscall *)(_DWORD))v5->vfptr[15].__vecDelDtor)(v5);
            PgUtil::SetTextureCoord((NiScreenElements *)pcFna, 0, v10, v9, v8, v7, 0x20u, 0x20u);
            NiAVObject::Update((NiAVObject *)&v3->m_spDecoPlane.m_pObject->vfptr, 0.0, 1);
            v3->m_uiDecoImageIndex = uiIndex;
          }
        }
      }
      else
      {
        v3->m_bShowDeco = 0;
        v3->m_spDecoPlane.m_pObject->m_uFlags |= 1u;
      }
    }
  }
  else
  {
    this->m_bShowDeco = 0;
    this->m_spDecoPlane.m_pObject->m_uFlags |= 1u;
  }
}

//----- (005B7E20) --------------------------------------------------------
void __thiscall DecoPlaneColor::SetColor(DecoPlaneColor *this, char byR, char byG, char byB, char bySubR, char bySubG, char bySubB)
{
  double v7; // st7@1
  DecoPlaneColor *v8; // esi@1
  NiScreenElements *v9; // eax@4
  NiScreenElements *v10; // edx@5
  NiScreenElements *v11; // ecx@5
  NiScreenElements *v12; // eax@9
  NiScreenElements *v13; // ecx@9
  NiColorA kCommonValue; // [sp+8h] [bp-10h]@5

  v7 = 255.0;
  v8 = this;
  if ( byR || byG || byB )
  {
    v10 = this->m_spDecoPlane.m_pObject;
    *(_WORD *)&this->m_bShowDeco = 257;
    kCommonValue.r = (double)(unsigned __int8)byR / 255.0;
    kCommonValue.g = (double)(unsigned __int8)byG / 255.0;
    kCommonValue.b = (double)(unsigned __int8)byB / 255.0;
    kCommonValue.a = 1.0;
    NiScreenElementsData::SetColors((NiScreenElementsData *)v10->m_spModelData.m_pObject, 0, &kCommonValue);
    v11 = v8->m_spSubPlane.m_pObject;
    kCommonValue.r = 0.0;
    kCommonValue.g = 0.0;
    kCommonValue.b = 0.0;
    kCommonValue.a = 1.0;
    NiScreenElementsData::SetColors((NiScreenElementsData *)v11->m_spModelData.m_pObject, 0, &kCommonValue);
    v7 = 255.0;
    v8->m_spDecoPlane.m_pObject->m_uFlags &= 0xFFFEu;
    v8->m_spSubPlane.m_pObject->m_uFlags &= 0xFFFEu;
  }
  else
  {
    v9 = this->m_spDecoPlane.m_pObject;
    *(_WORD *)&this->m_bShowDeco = 0;
    v9->m_uFlags |= 1u;
    this->m_spSubPlane.m_pObject->m_uFlags |= 1u;
  }
  if ( bySubR || bySubG || bySubB )
  {
    v12 = v8->m_spSubPlane.m_pObject;
    v8->m_bShowSub = 1;
    v12->m_uFlags &= 0xFFFEu;
    v13 = v8->m_spSubPlane.m_pObject;
    kCommonValue.r = (double)(unsigned __int8)bySubR / v7;
    kCommonValue.g = (double)(unsigned __int8)bySubG / v7;
    kCommonValue.b = (double)(unsigned __int8)bySubB / v7;
    kCommonValue.a = 1.0;
    NiScreenElementsData::SetColors((NiScreenElementsData *)v13->m_spModelData.m_pObject, 0, &kCommonValue);
  }
}

//----- (005B7F70) --------------------------------------------------------
void __thiscall IconWin::IconWin(IconWin *this)
{
  IconWin *v1; // esi@1
  NiAVObject *v2; // edi@1
  NiAVObject *v3; // edi@6
  ClockShadowWin *v4; // edi@11

  v1 = this;
  PgWinLRBut::PgWinLRBut((PgWinLRBut *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&IconWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&IconWin::`vftable'{for `IDirectMessenger'};
  v1->m_spGeom.m_pObject = 0;
  v1->m_spTexProp.m_pObject = 0;
  v1->m_spOverGeomForRefCount.m_pObject = 0;
  v1->m_spClickGeomForRefCount.m_pObject = 0;
  v1->m_spOverGeom.m_pObject = 0;
  v1->m_spClickGeom.m_pObject = 0;
  v1->m_spClockShadowWin.m_pObject = 0;
  v1->m_uiIconIndex = -1;
  v2 = v1->m_spOverGeom.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spOverGeom.m_pObject = 0;
  }
  v3 = v1->m_spClickGeom.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spClickGeom.m_pObject = 0;
  }
  v1->m_bShowFocus = 0;
  v1->m_bDroppable = 1;
  v1->m_bEnableClickSound = 0;
  v1->m_bClockShadowWinActive = 0;
  v4 = v1->m_spClockShadowWin.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spClockShadowWin.m_pObject = 0;
  }
  v1->m_pkCoolTimeOverEffect = 0;
  v1->m_bCoolTimeCheckNeeded = 0;
  *(_DWORD *)&v1->m_coolTimeID = -1;
}
// 9AA8DC: using guessed type void (__thiscall *IconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AA8FC: using guessed type int (__thiscall *IconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005B80C0) --------------------------------------------------------
void __thiscall IconWin::ResetUVs(IconWin *this, NiSourceTexture *pkTexture, unsigned int uiIndex, unsigned int uiIconWidth, unsigned int uiIconHeight)
{
  NiSourceTexture *v5; // esi@1
  IconWin *v6; // edi@1
  unsigned int v7; // eax@3
  unsigned int v8; // ST14_4@3
  unsigned int v9; // ST10_4@3
  unsigned int v10; // ST0C_4@3
  unsigned int v11; // eax@3
  NiSourceTexture *pkTexturea; // [sp+1Ch] [bp+8h]@3

  v5 = pkTexture;
  v6 = this;
  if ( pkTexture )
  {
    if ( this->m_spGeom.m_pObject )
    {
      v7 = ((int (__thiscall *)(_DWORD))pkTexture->vfptr[15].__vecDelDtor)(pkTexture);
      pkTexturea = (NiSourceTexture *)v6->m_spGeom.m_pObject;
      v8 = uiIconHeight * (uiIndex / (v7 / uiIconWidth));
      v9 = uiIconWidth * (uiIndex % (v7 / uiIconWidth));
      v10 = ((int (__thiscall *)(_DWORD))v5->vfptr[16].__vecDelDtor)(v5);
      v11 = ((int (__thiscall *)(_DWORD))v5->vfptr[15].__vecDelDtor)(v5);
      PgUtil::SetTextureCoord((NiScreenElements *)pkTexturea, 0, v11, v10, v9, v8, uiIconWidth, uiIconHeight);
      NiAVObject::Update((NiAVObject *)&v6->m_spGeom.m_pObject->vfptr, 0.0, 1);
    }
  }
}

//----- (005B8150) --------------------------------------------------------
void __thiscall IconWin::StartCoolTime(IconWin *this, float fCurTime, float fDlyTime, float fStartTime)
{
  IconWin *v4; // esi@1
  ClockShadowWin *v5; // eax@2
  ClockShadowWin *v6; // edi@2
  ClockShadowWin *v7; // ebx@2
  ClockShadowWin *v8; // esi@10

  v4 = this;
  if ( !this->m_spClockShadowWin.m_pObject )
  {
    v5 = ClockShadowWin::CreateWin(0, 0, (PgWin *)&this->vfptr);
    v6 = v4->m_spClockShadowWin.m_pObject;
    v7 = v5;
    if ( v6 != v5 )
    {
      if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      v4->m_spClockShadowWin.m_pObject = v7;
      if ( v7 )
        InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
    }
    ((void (__stdcall *)(_DWORD))v4->m_spClockShadowWin.m_pObject->vfptr[60].__vecDelDtor)(0);
    NiAVObject::UpdateProperties((NiAVObject *)&v4->vfptr);
  }
  v8 = v4->m_spClockShadowWin.m_pObject;
  if ( v8 )
    ClockShadowWin::Start(v8, fCurTime, fDlyTime, fStartTime);
}

//----- (005B8200) --------------------------------------------------------
void __cdecl IconWin::StartCoolTimebyItemUse(unsigned __int16 id, float fCurTime, float fDlyTime, float fStartTime)
{
  ItemAction *v4; // ebx@1
  unsigned int *v5; // eax@2
  unsigned int v6; // edi@2
  IconWin *v7; // esi@3
  ItemAction *v8; // eax@5
  unsigned __int16 v9; // cx@6

  v4 = ItemActionTab::GetByItemActionID(id);
  if ( v4 )
  {
    v5 = IconWin::ms_kCoolTimeIconList._Myfirst;
    v6 = 0;
    if ( IconWin::ms_kCoolTimeIconList._Mylast - IconWin::ms_kCoolTimeIconList._Myfirst )
    {
      do
      {
        v7 = (IconWin *)v5[v6];
        if ( v7 )
        {
          if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v7->vfptr[65].__vecDelDtor)(v7) )
          {
            v8 = ItemActionTab::GetByItemActionID(v7->m_CoolGroupItemActionID);
            if ( v8 )
            {
              v9 = v8->CoolGroupActionID;
              if ( v9 == v4->CoolGroupActionID && (v9 || v8->ItemActionID == v4->ItemActionID) )
                IconWin::StartCoolTime(v7, fCurTime, fDlyTime, fStartTime);
            }
          }
        }
        v5 = IconWin::ms_kCoolTimeIconList._Myfirst;
        ++v6;
      }
      while ( v6 < IconWin::ms_kCoolTimeIconList._Mylast - IconWin::ms_kCoolTimeIconList._Myfirst );
    }
  }
}

//----- (005B82B0) --------------------------------------------------------
void __cdecl IconWin::StartCoolTime(unsigned __int16 id, float fCurTime, float fDlyTime, float fStartTime)
{
  unsigned int *v4; // eax@1
  unsigned int v5; // edi@1
  IconWin *v6; // esi@2

  v4 = IconWin::ms_kCoolTimeIconList._Myfirst;
  v5 = 0;
  if ( IconWin::ms_kCoolTimeIconList._Mylast - IconWin::ms_kCoolTimeIconList._Myfirst )
  {
    do
    {
      v6 = (IconWin *)v4[v5];
      if ( v6 && v6->m_coolTimeID == id )
      {
        if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v6->vfptr[65].__vecDelDtor)(v6) )
          IconWin::StartCoolTime(v6, fCurTime, fDlyTime, fStartTime);
      }
      v4 = IconWin::ms_kCoolTimeIconList._Myfirst;
      ++v5;
    }
    while ( v5 < IconWin::ms_kCoolTimeIconList._Mylast - IconWin::ms_kCoolTimeIconList._Myfirst );
  }
}

//----- (005B8330) --------------------------------------------------------
void __thiscall DecoPlaneTex::Create(DecoPlaneTex *this, PgWin *pkParent)
{
  DecoPlaneTex *v2; // edi@1
  NiScreenElements *v3; // ebx@1
  NiScreenElementsData *v4; // esi@1
  NiScreenElements *v5; // eax@1
  NiScreenElements *v6; // eax@2
  NiScreenElements *v7; // esi@3
  NiTexturingProperty *v8; // eax@10
  NiTexturingProperty *v9; // eax@11
  NiTexturingProperty *v10; // ebx@11
  NiTexturingProperty *v11; // esi@13
  NiTexturingProperty *v12; // ebx@20
  NiVBChip *v13; // esi@20
  NiTexturingProperty::Map *v14; // eax@21
  NiVBChip *v15; // eax@22
  NiVBBlock *v16; // ebx@25
  NiTexturingProperty *v17; // esi@30
  NiScreenElements *v18; // ebx@30
  NiObjectNET *v19; // eax@35
  NiObjectNET *v20; // esi@35
  NiScreenElements *v21; // ST2C_4@38
  NiVBChip *element; // [sp+14h] [bp-10h]@24
  int v23; // [sp+20h] [bp-4h]@1

  v2 = this;
  v3 = 0;
  v4 = PgUtil::CreateScreenGeometryData(0x20u, 0x20u, 0, 0, 0x20u, 0x20u);
  v5 = (NiScreenElements *)operator new(0xC4u);
  v23 = 0;
  if ( v5 )
  {
    NiScreenElements::NiScreenElements(v5, v4);
    v3 = v6;
  }
  v7 = v2->m_spDecoPlane.m_pObject;
  v23 = -1;
  if ( v7 != v3 )
  {
    if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v2->m_spDecoPlane.m_pObject = v3;
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
  v8 = (NiTexturingProperty *)operator new(0x44u);
  v23 = 1;
  if ( v8 )
  {
    NiTexturingProperty::NiTexturingProperty(v8);
    v10 = v9;
  }
  else
  {
    v10 = 0;
  }
  v11 = v2->m_spDecoTexProp.m_pObject;
  v23 = -1;
  if ( v11 != v10 )
  {
    if ( v11 && !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    v2->m_spDecoTexProp.m_pObject = v10;
    if ( v10 )
      InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
  }
  v12 = v2->m_spDecoTexProp.m_pObject;
  v13 = (NiVBChip *)*v12->m_kMaps.m_pBase;
  if ( !v13 )
  {
    v14 = (NiTexturingProperty::Map *)operator new(0x18u);
    v23 = 2;
    if ( v14 )
      NiTexturingProperty::Map::Map(v14);
    else
      v15 = 0;
    v13 = v15;
    v23 = -1;
    element = v15;
    NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)&v12->m_kMaps, 0, &element);
  }
  v16 = v13->m_pkBlock;
  if ( v16 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v16->m_uiIndex) && v16 )
      ((void (__thiscall *)(NiVBBlock *, signed int))v16->m_pkSet->m_uiIndex)(v16, 1);
    v13->m_pkBlock = 0;
  }
  NiTexturingProperty::SetBaseFilterMode(v2->m_spDecoTexProp.m_pObject, 0);
  v2->m_spDecoTexProp.m_pObject->m_eApply = 2;
  NiTexturingProperty::SetBaseClampMode(v2->m_spDecoTexProp.m_pObject, 0);
  v17 = v2->m_spDecoTexProp.m_pObject;
  v18 = v2->m_spDecoPlane.m_pObject;
  element = (NiVBChip *)v17;
  if ( v17 )
    InterlockedIncrement((volatile LONG *)&v17->m_uiRefCount);
  v23 = 3;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v18->m_kPropertyList,
    (NiPointer<NiRoom> *)&element);
  v23 = -1;
  if ( v17 && !InterlockedDecrement((volatile LONG *)&v17->m_uiRefCount) )
    v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
  v19 = (NiObjectNET *)operator new(0x20u);
  v20 = v19;
  v23 = 4;
  if ( v19 )
  {
    NiObjectNET::NiObjectNET(v19);
    v20->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
    LOWORD(v20[1].vfptr) = 236;
    BYTE2(v20[1].vfptr) = 0;
  }
  else
  {
    v20 = 0;
  }
  LOWORD(v20[1].vfptr) |= 1u;
  v21 = v2->m_spDecoPlane.m_pObject;
  element = (NiVBChip *)v20;
  InterlockedIncrement((volatile LONG *)&v20->m_uiRefCount);
  v23 = 5;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v21->m_kPropertyList,
    (NiPointer<NiRoom> *)&element);
  v23 = -1;
  if ( !InterlockedDecrement((volatile LONG *)&v20->m_uiRefCount) )
    v20->vfptr->__vecDelDtor((NiRefObject *)v20, 1u);
  ((void (__thiscall *)(PgWin *, NiScreenElements *, _DWORD))pkParent->vfptr[29].__vecDelDtor)(
    pkParent,
    v2->m_spDecoPlane.m_pObject,
    0);
  NiAVObject::UpdateProperties((NiAVObject *)&pkParent->vfptr);
}
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);

//----- (005B85C0) --------------------------------------------------------
void __thiscall DecoPlaneColor::Create(DecoPlaneColor *this, PgWin *pkParent)
{
  DecoPlaneColor *v2; // esi@1
  NiRoom *v3; // edi@1
  NiScreenElements *v4; // ebx@1
  NiRoom *v5; // eax@2
  NiScreenElementsData *v6; // eax@3
  NiScreenElements *v7; // eax@5
  NiScreenElements *v8; // edi@6
  NiScreenElements *v9; // eax@13
  NiRoom *v10; // eax@13
  NiRoom *v11; // edi@13
  NiRoom *v12; // edi@18
  NiRoom *v13; // eax@19
  NiScreenElementsData *v14; // eax@20
  NiScreenElements *v15; // eax@20
  NiScreenElements *v16; // ebx@20
  NiScreenElements *v17; // eax@21
  NiScreenElements *v18; // edi@23
  NiRoom *v19; // eax@30
  NiRoom *v20; // edi@30
  NiRoom *fWidth; // ST1C_4@35
  float fLeft; // ST14_4@35
  NiColorA kCommonValue; // [sp+2Ch] [bp-24h]@13
  NiPointer<NiRoom> v24; // [sp+3Ch] [bp-14h]@1
  NiPointer<NiRoom> element; // [sp+40h] [bp-10h]@2
  int v26; // [sp+4Ch] [bp-4h]@1

  v2 = this;
  v3 = (NiRoom *)operator new(0xC4u);
  v24.m_pObject = v3;
  v4 = 0;
  v26 = 0;
  if ( v3 )
  {
    v5 = (NiRoom *)operator new(0x70u);
    element.m_pObject = v5;
    LOBYTE(v26) = 1;
    if ( v5 )
      NiScreenElementsData::NiScreenElementsData((NiScreenElementsData *)v5, 0, 1, 0, 1, 1, 4, 1, 2, 1);
    else
      v6 = 0;
    LOBYTE(v26) = 0;
    NiScreenElements::NiScreenElements((NiScreenElements *)v3, v6);
    v4 = v7;
  }
  v8 = v2->m_spDecoPlane.m_pObject;
  v26 = -1;
  if ( v8 != v4 )
  {
    if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v2->m_spDecoPlane.m_pObject = v4;
    if ( v4 )
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  }
  NiScreenElementsData::Insert((NiScreenElementsData *)v2->m_spDecoPlane.m_pObject->m_spModelData.m_pObject, 4u, 0, 0);
  NiScreenElementsData::SetRectangle(
    (NiScreenElementsData *)v2->m_spDecoPlane.m_pObject->m_spModelData.m_pObject,
    0,
    -1.0,
    -1.0,
    34.0,
    34.0);
  v9 = v2->m_spDecoPlane.m_pObject;
  kCommonValue.r = 0.0;
  kCommonValue.g = 0.0;
  kCommonValue.b = 0.0;
  kCommonValue.a = 1.0;
  NiScreenElementsData::SetColors((NiScreenElementsData *)v9->m_spModelData.m_pObject, 0, &kCommonValue);
  v10 = (NiRoom *)operator new(0x28u);
  v11 = v10;
  v24.m_pObject = v10;
  v26 = 2;
  if ( v10 )
  {
    NiObjectNET::NiObjectNET((NiObjectNET *)&v10->vfptr);
    v11->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
    v11->m_uFlags = 0;
    v11->m_pkParent = 0;
    LODWORD(v11->m_kWorldBound.m_kCenter.x) = 1;
  }
  else
  {
    v11 = 0;
  }
  LODWORD(v11->m_kWorldBound.m_kCenter.x) = 0;
  v11->m_pkParent = (NiNode *)1;
  v24.m_pObject = (NiRoom *)v2->m_spDecoPlane.m_pObject;
  element.m_pObject = v11;
  InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
  v26 = 3;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v24.m_pObject->m_kPropertyList,
    &element);
  v26 = -1;
  if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) )
    v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
  NiScreenElementsData::UpdateBound((NiScreenElementsData *)v2->m_spDecoPlane.m_pObject->m_spModelData.m_pObject);
  NiAVObject::UpdateProperties((NiAVObject *)&v2->m_spDecoPlane.m_pObject->vfptr);
  NiAVObject::Update((NiAVObject *)&v2->m_spDecoPlane.m_pObject->vfptr, 0.0, 1);
  v12 = (NiRoom *)operator new(0xC4u);
  v24.m_pObject = v12;
  v26 = 4;
  if ( v12 )
  {
    v13 = (NiRoom *)operator new(0x70u);
    element.m_pObject = v13;
    LOBYTE(v26) = 5;
    if ( v13 )
    {
      NiScreenElementsData::NiScreenElementsData((NiScreenElementsData *)v13, 0, 1, 0, 1, 1, 4, 1, 2, 1);
      LOBYTE(v26) = 4;
      NiScreenElements::NiScreenElements((NiScreenElements *)v12, v14);
      v16 = v15;
    }
    else
    {
      LOBYTE(v26) = 4;
      NiScreenElements::NiScreenElements((NiScreenElements *)v12, 0);
      v16 = v17;
    }
  }
  else
  {
    v16 = 0;
  }
  v18 = v2->m_spSubPlane.m_pObject;
  v26 = -1;
  if ( v18 != v16 )
  {
    if ( v18 && !InterlockedDecrement((volatile LONG *)&v18->m_uiRefCount) && v18 )
      v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
    v2->m_spSubPlane.m_pObject = v16;
    if ( v16 )
      InterlockedIncrement((volatile LONG *)&v16->m_uiRefCount);
  }
  NiScreenElementsData::Insert((NiScreenElementsData *)v2->m_spSubPlane.m_pObject->m_spModelData.m_pObject, 4u, 0, 0);
  NiScreenElementsData::SetRectangle(
    (NiScreenElementsData *)v2->m_spSubPlane.m_pObject->m_spModelData.m_pObject,
    0,
    0.0,
    0.0,
    32.0,
    32.0);
  v19 = (NiRoom *)operator new(0x28u);
  v20 = v19;
  v24.m_pObject = v19;
  v26 = 6;
  if ( v19 )
  {
    NiObjectNET::NiObjectNET((NiObjectNET *)&v19->vfptr);
    v20->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
    v20->m_uFlags = 0;
    v20->m_pkParent = 0;
    LODWORD(v20->m_kWorldBound.m_kCenter.x) = 1;
  }
  else
  {
    v20 = 0;
  }
  LODWORD(v20->m_kWorldBound.m_kCenter.x) = 0;
  v20->m_pkParent = (NiNode *)1;
  element.m_pObject = (NiRoom *)v2->m_spSubPlane.m_pObject;
  v24.m_pObject = v20;
  InterlockedIncrement((volatile LONG *)&v20->m_uiRefCount);
  v26 = 7;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&element.m_pObject->m_kPropertyList,
    &v24);
  v26 = -1;
  if ( !InterlockedDecrement((volatile LONG *)&v20->m_uiRefCount) )
    v20->vfptr->__vecDelDtor((NiRefObject *)v20, 1u);
  NiScreenElementsData::UpdateBound((NiScreenElementsData *)v2->m_spSubPlane.m_pObject->m_spModelData.m_pObject);
  NiAVObject::UpdateProperties((NiAVObject *)&v2->m_spSubPlane.m_pObject->vfptr);
  NiAVObject::Update((NiAVObject *)&v2->m_spSubPlane.m_pObject->vfptr, 0.0, 1);
  fWidth = (NiRoom *)v2->m_spDecoPlane.m_pObject;
  ((void (__thiscall *)(PgWin *))pkParent->vfptr[29].__vecDelDtor)(pkParent);
  fLeft = *(float *)&v2->m_spSubPlane.m_pObject;
  ((void (__thiscall *)(PgWin *))pkParent->vfptr[29].__vecDelDtor)(pkParent);
  NiAVObject::UpdateProperties((NiAVObject *)&pkParent->vfptr);
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);

//----- (005B8970) --------------------------------------------------------
void __thiscall IconWin::~IconWin(IconWin *this)
{
  IconWin *v1; // esi@1
  NiAVObject *v2; // eax@1
  LONG (__stdcall *v3)(volatile LONG *); // edi@2
  NiAVObject *v4; // ebx@3
  NiAVObject *v5; // ebx@6
  NiAVObject *v6; // ebx@14
  NiAVObject *v7; // ebx@17
  NiScreenElements *v8; // ebx@22
  NiTexturingProperty *v9; // ebx@27
  NiAVObject *v10; // ebx@32
  NiAVObject *v11; // ebx@37
  NiD3DDefaultShader *v12; // ebx@42
  NiD3DDefaultShader *v13; // ebx@48
  SpEffect *v14; // ebx@54
  NiNode *v15; // edi@55
  ClockShadowWin *v16; // ebx@60
  NiAVObject *v17; // ebx@64
  NiAVObject *v18; // ebx@68
  NiAVObject *v19; // ebx@72
  NiAVObject *v20; // ebx@76
  NiTexturingProperty *v21; // edi@80
  NiScreenElements *v22; // edi@84
  NiPointer<NiAVObject> result; // [sp+18h] [bp-10h]@2
  int v24; // [sp+24h] [bp-4h]@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&IconWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&IconWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spOverGeom.m_pObject;
  v24 = 7;
  if ( v2 )
  {
    NiNode::DetachChild((NiNode *)&this->vfptr, &result, v2);
    v3 = InterlockedDecrement;
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v5 = v1->m_spOverGeom.m_pObject;
    if ( v5 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      v1->m_spOverGeom.m_pObject = 0;
    }
  }
  else
  {
    v3 = InterlockedDecrement;
  }
  if ( v1->m_spClickGeom.m_pObject )
  {
    NiNode::DetachChild((NiNode *)&v1->vfptr, &result, v1->m_spClickGeom.m_pObject);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !v3((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v7 = v1->m_spClickGeom.m_pObject;
    if ( v7 )
    {
      if ( !v3((volatile LONG *)&v7->m_uiRefCount) && v7 )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      v1->m_spClickGeom.m_pObject = 0;
    }
  }
  v8 = v1->m_spGeom.m_pObject;
  if ( v8 )
  {
    if ( !v3((volatile LONG *)&v8->m_uiRefCount) && v8 )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v1->m_spGeom.m_pObject = 0;
  }
  v9 = v1->m_spTexProp.m_pObject;
  if ( v9 )
  {
    if ( !v3((volatile LONG *)&v9->m_uiRefCount) && v9 )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v1->m_spTexProp.m_pObject = 0;
  }
  v10 = v1->m_spOverGeomForRefCount.m_pObject;
  if ( v10 )
  {
    if ( !v3((volatile LONG *)&v10->m_uiRefCount) && v10 )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    v1->m_spOverGeomForRefCount.m_pObject = 0;
  }
  v11 = v1->m_spClickGeomForRefCount.m_pObject;
  if ( v11 )
  {
    if ( !v3((volatile LONG *)&v11->m_uiRefCount) && v11 )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    v1->m_spClickGeomForRefCount.m_pObject = 0;
  }
  v12 = IconWin::ms_spOverGeom.m_pObject;
  if ( IconWin::ms_spOverGeom.m_pObject && IconWin::ms_spOverGeom.m_pObject->m_uiRefCount == 1 )
  {
    if ( !v3((volatile LONG *)&IconWin::ms_spOverGeom.m_pObject->m_uiRefCount) && v12 )
      v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
    IconWin::ms_spOverGeom.m_pObject = 0;
  }
  v13 = IconWin::ms_spClickGeom.m_pObject;
  if ( IconWin::ms_spClickGeom.m_pObject && IconWin::ms_spClickGeom.m_pObject->m_uiRefCount == 1 )
  {
    if ( !v3((volatile LONG *)&IconWin::ms_spClickGeom.m_pObject->m_uiRefCount) && v13 )
      v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
    IconWin::ms_spClickGeom.m_pObject = 0;
  }
  v14 = v1->m_pkCoolTimeOverEffect;
  if ( v14 )
  {
    LOBYTE(v24) = 9;
    NsEffect::~NsEffect(&v14->m_kEffect);
    LOBYTE(v24) = 8;
    ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v14->m_kMarkCheck);
    v15 = v14->m_spEffect.m_pObject;
    LOBYTE(v24) = 7;
    if ( v15 && !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) && v15 )
      v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
    operator delete(v14);
    v3 = InterlockedDecrement;
  }
  v16 = v1->m_spClockShadowWin.m_pObject;
  LOBYTE(v24) = 6;
  if ( v16 && !v3((volatile LONG *)&v16->m_uiRefCount) && v16 )
    v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
  v17 = v1->m_spClickGeom.m_pObject;
  LOBYTE(v24) = 5;
  if ( v17 && !v3((volatile LONG *)&v17->m_uiRefCount) && v17 )
    v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
  v18 = v1->m_spOverGeom.m_pObject;
  LOBYTE(v24) = 4;
  if ( v18 && !v3((volatile LONG *)&v18->m_uiRefCount) && v18 )
    v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
  v19 = v1->m_spClickGeomForRefCount.m_pObject;
  LOBYTE(v24) = 3;
  if ( v19 && !v3((volatile LONG *)&v19->m_uiRefCount) && v19 )
    v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
  v20 = v1->m_spOverGeomForRefCount.m_pObject;
  LOBYTE(v24) = 2;
  if ( v20 && !v3((volatile LONG *)&v20->m_uiRefCount) && v20 )
    v20->vfptr->__vecDelDtor((NiRefObject *)v20, 1u);
  v21 = v1->m_spTexProp.m_pObject;
  LOBYTE(v24) = 1;
  if ( v21 && !InterlockedDecrement((volatile LONG *)&v21->m_uiRefCount) && v21 )
    v21->vfptr->__vecDelDtor((NiRefObject *)v21, 1u);
  v22 = v1->m_spGeom.m_pObject;
  LOBYTE(v24) = 0;
  if ( v22 && !InterlockedDecrement((volatile LONG *)&v22->m_uiRefCount) && v22 )
    v22->vfptr->__vecDelDtor((NiRefObject *)v22, 1u);
  v24 = -1;
  PgWinLRBut::~PgWinLRBut((PgWinLRBut *)&v1->vfptr);
}
// 9AA8DC: using guessed type void (__thiscall *IconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AA8FC: using guessed type int (__thiscall *IconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005B8D30) --------------------------------------------------------
void __thiscall IconWin::CreateGeometry(IconWin *this, unsigned int uiWidth, unsigned int uiHeight)
{
  IconWin *v3; // esi@1
  NiScreenElements *v4; // ebx@1
  NiScreenElementsData *v5; // edi@1
  NiScreenElements *v6; // eax@1
  NiScreenElements *v7; // eax@2
  NiScreenElements *v8; // edi@3
  NiTexturingProperty *v9; // eax@10
  NiTexturingProperty *v10; // eax@11
  NiTexturingProperty *v11; // ebx@11
  NiTexturingProperty *v12; // edi@13
  NiTexturingProperty *v13; // ebx@20
  unsigned int v14; // edi@20
  NiTexturingProperty::Map *v15; // eax@21
  unsigned int v16; // eax@22
  int v17; // ebx@25
  unsigned int v18; // edi@30
  NiScreenElements *v19; // ebx@30
  NiObjectNET *v20; // eax@35
  unsigned int v21; // edi@35
  NiTexturePalette *v22; // edi@42
  const char *v23; // eax@44
  NiD3DDefaultShader *v24; // eax@45
  NiD3DDefaultShader *v25; // eax@45
  void (__thiscall ***v26)(_DWORD, _DWORD); // edi@45
  NiD3DDefaultShader *v27; // edi@49
  NiD3DDefaultShader *v28; // eax@54
  NiD3DDefaultShader *v29; // edi@56
  NiD3DDefaultShader *v30; // eax@61
  NiD3DDefaultShader *v31; // eax@65
  NiD3DDefaultShader *v32; // eax@68
  unsigned int uiWidtha; // [sp+6Ch] [bp+8h]@38

  v3 = this;
  v4 = 0;
  v5 = PgUtil::CreateScreenGeometryData(uiWidth, uiHeight, 0, 0, uiWidth, uiHeight);
  v6 = (NiScreenElements *)operator new(0xC4u);
  uiHeight = (unsigned int)v6;
  if ( v6 )
  {
    NiScreenElements::NiScreenElements(v6, v5);
    v4 = v7;
  }
  v8 = v3->m_spGeom.m_pObject;
  if ( v8 != v4 )
  {
    if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v3->m_spGeom.m_pObject = v4;
    if ( v4 )
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  }
  v9 = (NiTexturingProperty *)operator new(0x44u);
  uiHeight = (unsigned int)v9;
  if ( v9 )
  {
    NiTexturingProperty::NiTexturingProperty(v9);
    v11 = v10;
  }
  else
  {
    v11 = 0;
  }
  v12 = v3->m_spTexProp.m_pObject;
  if ( v12 != v11 )
  {
    if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
      v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
    v3->m_spTexProp.m_pObject = v11;
    if ( v11 )
      InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
  }
  v13 = v3->m_spTexProp.m_pObject;
  v14 = (unsigned int)*v13->m_kMaps.m_pBase;
  if ( !v14 )
  {
    v15 = (NiTexturingProperty::Map *)operator new(0x18u);
    uiHeight = (unsigned int)v15;
    if ( v15 )
      NiTexturingProperty::Map::Map(v15);
    else
      v16 = 0;
    v14 = v16;
    uiHeight = v16;
    NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)&v13->m_kMaps, 0, (NiVBChip *const *)&uiHeight);
  }
  v17 = *(_DWORD *)(v14 + 4);
  if ( v17 )
  {
    if ( !InterlockedDecrement((volatile LONG *)(v17 + 4)) && v17 )
      (**(void (__thiscall ***)(_DWORD, _DWORD))v17)(v17, 1);
    *(_DWORD *)(v14 + 4) = 0;
  }
  NiTexturingProperty::SetBaseFilterMode(v3->m_spTexProp.m_pObject, 0);
  v3->m_spTexProp.m_pObject->m_eApply = 2;
  NiTexturingProperty::SetBaseClampMode(v3->m_spTexProp.m_pObject, 0);
  v18 = (unsigned int)v3->m_spTexProp.m_pObject;
  v19 = v3->m_spGeom.m_pObject;
  uiHeight = v18;
  if ( v18 )
    InterlockedIncrement((volatile LONG *)(v18 + 4));
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v19->m_kPropertyList,
    (NiPointer<NiRoom> *)&uiHeight);
  if ( v18 && !InterlockedDecrement((volatile LONG *)(v18 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v18)(v18, 1);
  v20 = (NiObjectNET *)operator new(0x20u);
  v21 = (unsigned int)v20;
  uiHeight = (unsigned int)v20;
  if ( v20 )
  {
    NiObjectNET::NiObjectNET(v20);
    *(_DWORD *)v21 = &NiAlphaProperty::`vftable';
    *(_WORD *)(v21 + 28) = 236;
    *(_BYTE *)(v21 + 30) = 0;
  }
  else
  {
    v21 = 0;
  }
  *(_WORD *)(v21 + 28) |= 1u;
  uiWidtha = (unsigned int)v3->m_spGeom.m_pObject;
  uiHeight = v21;
  InterlockedIncrement((volatile LONG *)(v21 + 4));
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(uiWidtha + 156),
    (NiPointer<NiRoom> *)&uiHeight);
  if ( !InterlockedDecrement((volatile LONG *)(v21 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v21)(v21, 1);
  ((void (__thiscall *)(IconWin *, NiScreenElements *, _DWORD))v3->vfptr[29].__vecDelDtor)(
    v3,
    v3->m_spGeom.m_pObject,
    0);
  if ( IconWin::ms_spClickGeom.m_pObject || IconWin::ms_spOverGeom.m_pObject )
    goto LABEL_49;
  uiHeight = 0;
  v22 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v23 = Folder::Merge(&Folder::m_acMenu, "Game\\ItemPick.nif");
  PgUtil::LoadNodeNifFile(v23, (NiPointer<NiNode> *)&uiHeight, v22);
  if ( uiHeight )
  {
    v24 = (NiD3DDefaultShader *)(*(int (__stdcall **)(const char *))(*(_DWORD *)uiHeight + 72))("ItemClick");
    NiPointer<PopupMenuWin>::operator=(&IconWin::ms_spClickGeom, v24);
    v25 = (NiD3DDefaultShader *)(*(int (__stdcall **)(const char *))(*(_DWORD *)uiHeight + 72))("ItemOver");
    NiPointer<PopupMenuWin>::operator=(&IconWin::ms_spOverGeom, v25);
    v26 = (void (__thiscall ***)(_DWORD, _DWORD))uiHeight;
    if ( uiHeight && !InterlockedDecrement((volatile LONG *)(uiHeight + 4)) && v26 )
      (**v26)(v26, 1);
LABEL_49:
    v27 = (NiD3DDefaultShader *)v3->m_spClickGeomForRefCount.m_pObject;
    if ( v27 != IconWin::ms_spClickGeom.m_pObject )
    {
      if ( v27 && !InterlockedDecrement((volatile LONG *)&v27->m_uiRefCount) && v27 )
        v27->vfptr->__vecDelDtor((NiRefObject *)v27, 1u);
      v28 = IconWin::ms_spClickGeom.m_pObject;
      v3->m_spClickGeomForRefCount.m_pObject = (NiAVObject *)IconWin::ms_spClickGeom.m_pObject;
      if ( v28 )
        InterlockedIncrement((volatile LONG *)&v28->m_uiRefCount);
    }
    v29 = (NiD3DDefaultShader *)v3->m_spOverGeomForRefCount.m_pObject;
    if ( v29 != IconWin::ms_spOverGeom.m_pObject )
    {
      if ( v29 && !InterlockedDecrement((volatile LONG *)&v29->m_uiRefCount) && v29 )
        v29->vfptr->__vecDelDtor((NiRefObject *)v29, 1u);
      v30 = IconWin::ms_spOverGeom.m_pObject;
      v3->m_spOverGeomForRefCount.m_pObject = (NiAVObject *)IconWin::ms_spOverGeom.m_pObject;
      if ( v30 )
        InterlockedIncrement((volatile LONG *)&v30->m_uiRefCount);
    }
    if ( !v3->m_spClickGeom.m_pObject && IconWin::ms_spClickGeom.m_pObject )
    {
      v31 = (NiD3DDefaultShader *)NiObject::Clone((NiObject *)IconWin::ms_spClickGeom.m_pObject);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_spClickGeom, v31);
      ((void (__thiscall *)(IconWin *, NiAVObject *, _DWORD))v3->vfptr[29].__vecDelDtor)(
        v3,
        v3->m_spClickGeom.m_pObject,
        0);
      v3->m_spClickGeom.m_pObject->m_uFlags |= 1u;
    }
    if ( !v3->m_spOverGeom.m_pObject )
    {
      if ( IconWin::ms_spOverGeom.m_pObject )
      {
        v32 = (NiD3DDefaultShader *)NiObject::Clone((NiObject *)IconWin::ms_spOverGeom.m_pObject);
        NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_spOverGeom, v32);
        ((void (__thiscall *)(IconWin *, NiAVObject *, _DWORD))v3->vfptr[29].__vecDelDtor)(
          v3,
          v3->m_spOverGeom.m_pObject,
          0);
        v3->m_spOverGeom.m_pObject->m_uFlags |= 1u;
      }
    }
    NiAVObject::UpdateProperties((NiAVObject *)&v3->vfptr);
    NiAVObject::Update((NiAVObject *)&v3->vfptr, 0.0, 1);
  }
}
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005B91C0) --------------------------------------------------------
void __thiscall IconWin::CreateGeometry(IconWin *this, NiSourceTexture *pkTexture, unsigned int uiIndex, unsigned int uiIconWidth, unsigned int uiIconHeight)
{
  IconWin *v5; // esi@1
  unsigned int v6; // eax@2
  unsigned int v7; // ST10_4@2
  unsigned int v8; // ST0C_4@2
  unsigned int v9; // ST08_4@2
  unsigned int v10; // eax@2
  NiScreenElementsData *v11; // edi@2
  NiScreenElements *v12; // eax@2
  NiScreenElements *v13; // ebx@2
  NiScreenElements *v14; // eax@3
  NiScreenElements *v15; // edi@4
  NiTexturingProperty *v16; // eax@11
  NiTexturingProperty *v17; // eax@12
  NiTexturingProperty *v18; // ebx@12
  NiTexturingProperty *v19; // edi@14
  NiObjectNET *v20; // eax@21
  NiObjectNET *v21; // edi@21

  v5 = this;
  if ( pkTexture )
  {
    v6 = ((int (__thiscall *)(_DWORD))pkTexture->vfptr[15].__vecDelDtor)(pkTexture);
    v7 = uiIconHeight * (uiIndex / (v6 / uiIconWidth));
    v8 = uiIndex % (v6 / uiIconWidth);
    v9 = ((int (__thiscall *)(_DWORD))pkTexture->vfptr[16].__vecDelDtor)(pkTexture);
    v10 = ((int (__thiscall *)(_DWORD))pkTexture->vfptr[15].__vecDelDtor)(pkTexture);
    v11 = PgUtil::CreateScreenGeometryData(v10, v9, v8, v7, uiIconWidth, uiIconHeight);
    v12 = (NiScreenElements *)operator new(0xC4u);
    v13 = 0;
    if ( v12 )
    {
      NiScreenElements::NiScreenElements(v12, v11);
      v13 = v14;
    }
    v15 = v5->m_spGeom.m_pObject;
    if ( v15 != v13 )
    {
      if ( v15 && !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) && v15 )
        v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
      v5->m_spGeom.m_pObject = v13;
      if ( v13 )
        InterlockedIncrement((volatile LONG *)&v13->m_uiRefCount);
    }
    v16 = (NiTexturingProperty *)operator new(0x44u);
    if ( v16 )
    {
      NiTexturingProperty::NiTexturingProperty(v16);
      v18 = v17;
    }
    else
    {
      v18 = 0;
    }
    v19 = v5->m_spTexProp.m_pObject;
    if ( v19 != v18 )
    {
      if ( v19 && !InterlockedDecrement((volatile LONG *)&v19->m_uiRefCount) && v19 )
        v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
      v5->m_spTexProp.m_pObject = v18;
      if ( v18 )
        InterlockedIncrement((volatile LONG *)&v18->m_uiRefCount);
    }
    NiTexturingProperty::SetBaseTexture(v5->m_spTexProp.m_pObject, 0);
    NiTexturingProperty::SetBaseFilterMode(v5->m_spTexProp.m_pObject, 0);
    v5->m_spTexProp.m_pObject->m_eApply = 2;
    NiTexturingProperty::SetBaseClampMode(v5->m_spTexProp.m_pObject, 0);
    NiAVObject::AttachProperty(
      (NiAVObject *)&v5->m_spGeom.m_pObject->vfptr,
      (NiProperty *)&v5->m_spTexProp.m_pObject->vfptr);
    v20 = (NiObjectNET *)operator new(0x20u);
    v21 = v20;
    if ( v20 )
    {
      NiObjectNET::NiObjectNET(v20);
      v21->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
      LOWORD(v21[1].vfptr) = 236;
      BYTE2(v21[1].vfptr) = 0;
    }
    else
    {
      v21 = 0;
    }
    LOWORD(v21[1].vfptr) |= 1u;
    NiAVObject::AttachProperty((NiAVObject *)&v5->m_spGeom.m_pObject->vfptr, (NiProperty *)v21);
    ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v5->vfptr[29].__vecDelDtor)(v5, v5->m_spGeom.m_pObject, 0);
    NiAVObject::UpdateProperties((NiAVObject *)&v5->vfptr);
    NiAVObject::Update((NiAVObject *)&v5->vfptr, 0.0, 1);
  }
}
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);

//----- (005B93E0) --------------------------------------------------------
void __thiscall IconWin::IconDisable(IconWin *this, bool b)
{
  IconWin *v2; // ebx@1
  NiProperty *v3; // edi@1
  NiObjectNET *v4; // eax@2
  NiObjectNET *v5; // esi@2
  NiProperty *v6; // esi@6
  NiMaterialProperty *v7; // eax@7
  NiProperty *v8; // eax@8
  double v9; // st7@12
  NiTimeController *kColor; // ST14_4@14
  NiExtraData **kColor_4; // ST18_4@14
  unsigned int kColor_8; // ST1C_4@14

  v2 = this;
  v3 = NiAVObject::GetProperty((NiAVObject *)&this->vfptr, 9);
  if ( !v3 )
  {
    v4 = (NiObjectNET *)operator new(0x28u);
    v5 = v4;
    if ( v4 )
    {
      NiObjectNET::NiObjectNET(v4);
      v5->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
      LOWORD(v5[1].vfptr) = 0;
      v5[1].m_uiRefCount = 0;
      v5[1].m_pcName = (char *)1;
    }
    else
    {
      v5 = 0;
    }
    v3 = (NiProperty *)v5;
    NiAVObject::AttachProperty((NiAVObject *)&v2->vfptr, (NiProperty *)v5);
  }
  v6 = NiAVObject::GetProperty((NiAVObject *)&v2->vfptr, 3);
  if ( !v6 )
  {
    v7 = (NiMaterialProperty *)operator new(0x60u);
    if ( v7 )
      NiMaterialProperty::NiMaterialProperty(v7);
    else
      v8 = 0;
    v6 = v8;
    NiAVObject::AttachProperty((NiAVObject *)&v2->vfptr, v8);
  }
  v3[1].m_uiRefCount = 0;
  v3[1].m_pcName = 0;
  ++v6[3].m_uiRefCount;
  if ( b )
    v9 = 0.40000001;
  else
    v9 = 1.0;
  *(float *)&kColor = v9;
  *(float *)&kColor_4 = v9;
  v6[2].m_spControllers.m_pObject = kColor;
  *(float *)&kColor_8 = v9;
  v6[2].m_ppkExtra = kColor_4;
  v6[2].m_uiExtraDataSize = kColor_8;
  NiAVObject::UpdateProperties((NiAVObject *)&v2->vfptr);
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);

//----- (005B9500) --------------------------------------------------------
void __thiscall IconWin::IconDisable(IconWin *this, float fR, float fG, float fB)
{
  IconWin *v4; // edi@1
  NiProperty *v5; // ebx@1
  NiObjectNET *v6; // eax@2
  NiObjectNET *v7; // esi@2
  NiProperty *v8; // esi@6
  NiMaterialProperty *v9; // eax@7
  NiProperty *v10; // eax@8

  v4 = this;
  v5 = NiAVObject::GetProperty((NiAVObject *)&this->vfptr, 9);
  if ( !v5 )
  {
    v6 = (NiObjectNET *)operator new(0x28u);
    v7 = v6;
    if ( v6 )
    {
      NiObjectNET::NiObjectNET(v6);
      v7->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
      LOWORD(v7[1].vfptr) = 0;
      v7[1].m_uiRefCount = 0;
      v7[1].m_pcName = (char *)1;
    }
    else
    {
      v7 = 0;
    }
    v5 = (NiProperty *)v7;
    NiAVObject::AttachProperty((NiAVObject *)&v4->vfptr, (NiProperty *)v7);
  }
  v8 = NiAVObject::GetProperty((NiAVObject *)&v4->vfptr, 3);
  if ( !v8 )
  {
    v9 = (NiMaterialProperty *)operator new(0x60u);
    if ( v9 )
      NiMaterialProperty::NiMaterialProperty(v9);
    else
      v10 = 0;
    v8 = v10;
    NiAVObject::AttachProperty((NiAVObject *)&v4->vfptr, v10);
  }
  v5[1].m_uiRefCount = 0;
  v5[1].m_pcName = 0;
  ++v8[3].m_uiRefCount;
  *(float *)&v8[2].m_spControllers.m_pObject = fR;
  *(float *)&v8[2].m_ppkExtra = fG;
  *(float *)&v8[2].m_uiExtraDataSize = fB;
  NiAVObject::UpdateProperties((NiAVObject *)&v4->vfptr);
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);

//----- (005B9610) --------------------------------------------------------
void __thiscall IconWin::CreateGeometry(IconWin *this, unsigned int uiWidth, unsigned int uiHeight, char *pPickFileName)
{
  IconWin *v4; // esi@1
  NiScreenElementsData *v5; // edi@1
  NiScreenElements *v6; // eax@1
  NiScreenElements *v7; // eax@2
  NiScreenElements *v8; // edi@2
  NiScreenElements *v9; // ebx@4
  NiTexturingProperty *v10; // eax@11
  NiTexturingProperty *v11; // eax@12
  NiTexturingProperty *v12; // edi@12
  NiTexturingProperty *v13; // ebx@14
  NiTexturingProperty *v14; // edi@21
  NiNode *v15; // ebx@21
  NiTexturingProperty::Map *v16; // eax@22
  NiNode *v17; // eax@23
  unsigned int v18; // edi@26
  NiNode *v19; // ebx@31
  NiScreenElements *v20; // edi@31
  NiObjectNET *v21; // eax@36
  NiObjectNET *v22; // ebx@36
  NiScreenElements *v23; // ST74_4@39
  NiD3DDefaultShader *v24; // ebx@41
  NiD3DDefaultShader *v25; // eax@46
  NiD3DDefaultShader *v26; // ebx@48
  NiD3DDefaultShader *v27; // eax@53
  NiD3DDefaultShader *v28; // eax@60
  NiAVObject *v29; // eax@60
  float vPos_8; // ST70_4@60
  float v31; // ST74_4@60
  float v32; // ST78_4@60
  NiD3DDefaultShader *v33; // eax@60
  NiAVObject *v34; // eax@60
  float vPos; // ST68_4@60
  float vPos_4; // ST6C_4@60
  float v37; // ST70_4@60
  float v38; // ST78_4@60
  float v39; // ST74_4@60
  NiNode *v40; // edi@61
  NiPointer<NiNode> spNode; // [sp+7Ch] [bp-114h]@25
  char acName[256]; // [sp+80h] [bp-110h]@59
  int v43; // [sp+18Ch] [bp-4h]@1

  v4 = this;
  v5 = PgUtil::CreateScreenGeometryData(uiWidth, uiHeight, 0, 0, uiWidth, uiHeight);
  v6 = (NiScreenElements *)operator new(0xC4u);
  v43 = 0;
  if ( v6 )
  {
    NiScreenElements::NiScreenElements(v6, v5);
    v8 = v7;
  }
  else
  {
    v8 = 0;
  }
  v9 = v4->m_spGeom.m_pObject;
  v43 = -1;
  if ( v9 != v8 )
  {
    if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v4->m_spGeom.m_pObject = v8;
    if ( v8 )
      InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  }
  v10 = (NiTexturingProperty *)operator new(0x44u);
  v43 = 1;
  if ( v10 )
  {
    NiTexturingProperty::NiTexturingProperty(v10);
    v12 = v11;
  }
  else
  {
    v12 = 0;
  }
  v13 = v4->m_spTexProp.m_pObject;
  v43 = -1;
  if ( v13 != v12 )
  {
    if ( v13 && !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) && v13 )
      v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
    v4->m_spTexProp.m_pObject = v12;
    if ( v12 )
      InterlockedIncrement((volatile LONG *)&v12->m_uiRefCount);
  }
  v14 = v4->m_spTexProp.m_pObject;
  v15 = (NiNode *)*v14->m_kMaps.m_pBase;
  if ( !v15 )
  {
    v16 = (NiTexturingProperty::Map *)operator new(0x18u);
    v43 = 2;
    if ( v16 )
      NiTexturingProperty::Map::Map(v16);
    else
      v17 = 0;
    v15 = v17;
    v43 = -1;
    spNode.m_pObject = v17;
    NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)&v14->m_kMaps, 0, (NiVBChip *const *)&spNode);
  }
  v18 = v15->m_uiRefCount;
  if ( v18 )
  {
    if ( !InterlockedDecrement((volatile LONG *)(v18 + 4)) && v18 )
      (**(void (__thiscall ***)(_DWORD, _DWORD))v18)(v18, 1);
    v15->m_uiRefCount = 0;
  }
  NiTexturingProperty::SetBaseFilterMode(v4->m_spTexProp.m_pObject, 0);
  v4->m_spTexProp.m_pObject->m_eApply = 2;
  NiTexturingProperty::SetBaseClampMode(v4->m_spTexProp.m_pObject, 0);
  v19 = (NiNode *)v4->m_spTexProp.m_pObject;
  v20 = v4->m_spGeom.m_pObject;
  spNode.m_pObject = v19;
  if ( v19 )
    InterlockedIncrement((volatile LONG *)&v19->m_uiRefCount);
  v43 = 3;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v20->m_kPropertyList,
    (NiPointer<NiRoom> *)&spNode);
  v43 = -1;
  if ( v19 && !InterlockedDecrement((volatile LONG *)&v19->m_uiRefCount) )
    v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
  v21 = (NiObjectNET *)operator new(0x20u);
  v22 = v21;
  v43 = 4;
  if ( v21 )
  {
    NiObjectNET::NiObjectNET(v21);
    v22->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
    LOWORD(v22[1].vfptr) = 236;
    BYTE2(v22[1].vfptr) = 0;
  }
  else
  {
    v22 = 0;
  }
  LOWORD(v22[1].vfptr) |= 1u;
  v23 = v4->m_spGeom.m_pObject;
  spNode.m_pObject = (NiNode *)v22;
  InterlockedIncrement((volatile LONG *)&v22->m_uiRefCount);
  v43 = 5;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v23->m_kPropertyList,
    (NiPointer<NiRoom> *)&spNode);
  v43 = -1;
  if ( !InterlockedDecrement((volatile LONG *)&v22->m_uiRefCount) )
    v22->vfptr->__vecDelDtor((NiRefObject *)v22, 1u);
  ((void (__thiscall *)(IconWin *, NiScreenElements *, _DWORD))v4->vfptr[29].__vecDelDtor)(
    v4,
    v4->m_spGeom.m_pObject,
    0);
  v24 = (NiD3DDefaultShader *)v4->m_spClickGeomForRefCount.m_pObject;
  if ( v24 != IconWin::ms_spClickGeom.m_pObject )
  {
    if ( v24 && !InterlockedDecrement((volatile LONG *)&v24->m_uiRefCount) && v24 )
      v24->vfptr->__vecDelDtor((NiRefObject *)v24, 1u);
    v25 = IconWin::ms_spClickGeom.m_pObject;
    v4->m_spClickGeomForRefCount.m_pObject = (NiAVObject *)IconWin::ms_spClickGeom.m_pObject;
    if ( v25 )
      InterlockedIncrement((volatile LONG *)&v25->m_uiRefCount);
  }
  v26 = (NiD3DDefaultShader *)v4->m_spOverGeomForRefCount.m_pObject;
  if ( v26 != IconWin::ms_spOverGeom.m_pObject )
  {
    if ( v26 && !InterlockedDecrement((volatile LONG *)&v26->m_uiRefCount) && v26 )
      v26->vfptr->__vecDelDtor((NiRefObject *)v26, 1u);
    v27 = IconWin::ms_spOverGeom.m_pObject;
    v4->m_spOverGeomForRefCount.m_pObject = (NiAVObject *)IconWin::ms_spOverGeom.m_pObject;
    if ( v27 )
      InterlockedIncrement((volatile LONG *)&v27->m_uiRefCount);
  }
  if ( v4->m_spClickGeom.m_pObject || v4->m_spOverGeom.m_pObject )
    goto LABEL_64;
  spNode.m_pObject = 0;
  v43 = 6;
  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acName, "%sGame\\%s.nif", &Folder::m_acMenu, pPickFileName);
  PgUtil::LoadNodeNifFile(acName, &spNode, pTexturePalette);
  if ( spNode.m_pObject )
  {
    sprintf(acName, "%sClick", pPickFileName);
    v28 = (NiD3DDefaultShader *)((int (__stdcall *)(char *))spNode.m_pObject->vfptr[18].__vecDelDtor)(acName);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v4->m_spClickGeom, v28);
    ((void (__thiscall *)(IconWin *, NiAVObject *, _DWORD))v4->vfptr[29].__vecDelDtor)(
      v4,
      v4->m_spClickGeom.m_pObject,
      0);
    v4->m_spClickGeom.m_pObject->m_uFlags |= 1u;
    v29 = v4->m_spClickGeom.m_pObject;
    vPos_8 = v29->m_kLocal.m_Translate.z;
    v31 = v29->m_kLocal.m_Translate.x - 2.0;
    v32 = v29->m_kLocal.m_Translate.y - 2.0;
    v29->m_kLocal.m_Translate.x = v31;
    v29->m_kLocal.m_Translate.y = v32;
    v29->m_kLocal.m_Translate.z = vPos_8;
    sprintf(acName, "%sOver", pPickFileName);
    v33 = (NiD3DDefaultShader *)((int (__stdcall *)(char *))spNode.m_pObject->vfptr[18].__vecDelDtor)(acName);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v4->m_spOverGeom, v33);
    ((void (__thiscall *)(IconWin *, NiAVObject *, _DWORD))v4->vfptr[29].__vecDelDtor)(
      v4,
      v4->m_spOverGeom.m_pObject,
      0);
    v4->m_spOverGeom.m_pObject->m_uFlags |= 1u;
    v34 = v4->m_spOverGeom.m_pObject;
    vPos = v34->m_kLocal.m_Translate.x;
    vPos_4 = v34->m_kLocal.m_Translate.y;
    v37 = v34->m_kLocal.m_Translate.z;
    v43 = -1;
    v38 = vPos - 2.0;
    v39 = vPos_4 - 2.0;
    v34->m_kLocal.m_Translate.x = v38;
    v34->m_kLocal.m_Translate.y = v39;
    v34->m_kLocal.m_Translate.z = v37;
    if ( spNode.m_pObject )
    {
      v40 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v40 )
          v40->vfptr->__vecDelDtor((NiRefObject *)v40, 1u);
      }
    }
LABEL_64:
    NiAVObject::UpdateProperties((NiAVObject *)&v4->vfptr);
    NiAVObject::Update((NiAVObject *)&v4->vfptr, 0.0, 1);
  }
}
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005B9C10) --------------------------------------------------------
IconWin *__cdecl IconWin::CreateWin(int iXPos, int iYPos, int iWidth, int iHeight, PgWin *pkParent)
{
  PgWin *v5; // eax@1
  PgWin *v6; // eax@2
  PgWin *v7; // esi@2
  PgWin *v8; // edi@8
  IconWin *v9; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v11; // [sp+20h] [bp-4h]@1

  v5 = (PgWin *)operator new(0x17Cu);
  result.m_pObject = v5;
  v11 = 0;
  if ( v5 )
  {
    IconWin::IconWin((IconWin *)v5);
    v7 = v6;
  }
  else
  {
    v7 = 0;
  }
  if ( v7 )
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  v11 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v7);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, int, int, PgWin *, _DWORD, _DWORD))v7->vfptr[143].__vecDelDtor)(
                          v7,
                          iXPos,
                          iYPos,
                          iWidth,
                          iHeight,
                          pkParent,
                          0,
                          0) )
  {
    ((void (__thiscall *)(PgWin *, int, int))v7->vfptr[149].__vecDelDtor)(v7, iWidth, iHeight);
    ((void (__thiscall *)(PgWin *))v7->vfptr[89].__vecDelDtor)(v7);
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = (IconWin *)v7;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v7);
    if ( result.m_pObject )
    {
      v8 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v8 )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      }
    }
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = 0;
  }
  return v9;
}

//----- (005B9D60) --------------------------------------------------------
void __cdecl IconWin::ClearRegisteredCoolTime()
{
  unsigned int *v0; // edi@1

  v0 = IconWin::ms_kCoolTimeIconList._Myfirst;
  if ( IconWin::ms_kCoolTimeIconList._Myfirst != IconWin::ms_kCoolTimeIconList._Mylast )
  {
    memmove((char *)IconWin::ms_kCoolTimeIconList._Myfirst, (char *)IconWin::ms_kCoolTimeIconList._Mylast, 0);
    IconWin::ms_kCoolTimeIconList._Mylast = v0;
  }
}

//----- (005B9DA0) --------------------------------------------------------
IconWin *__thiscall IconWin::`scalar deleting destructor'(IconWin *this, unsigned int a2)
{
  IconWin *v2; // esi@1

  v2 = this;
  IconWin::~IconWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005B9DD0) --------------------------------------------------------
void __thiscall ItemIcon::ShowLotText(ItemIcon *this, int b)
{
  ItemIcon *v2; // esi@1
  PgWinText *v3; // ecx@1

  v2 = this;
  v3 = this->m_pkLotText;
  if ( v3 )
  {
    ((void (__stdcall *)(_DWORD))v3->vfptr[64].__vecDelDtor)(b);
    v2->m_bShowLotText = b;
  }
}

//----- (005B9E00) --------------------------------------------------------
void __thiscall ItemIcon::ProcessMeInput(ItemIcon *this, bool *bHit)
{
  if ( this->m_bInputProcess )
    IconWin::ProcessMeInput((IconWin *)&this->vfptr, bHit);
}

//----- (005B9E20) --------------------------------------------------------
Item *__thiscall ItemIcon::GetItem(ItemIcon *this)
{
  return this->m_spItem.m_pObject;
}

//----- (005B9E30) --------------------------------------------------------
char *__cdecl GetAmountString(Item *pkItem)
{
  char *result; // eax@2
  ItemInfo *v2; // edx@3
  float b; // ST0C_4@3
  float a; // [sp+10h] [bp+8h]@3

  if ( pkItem )
  {
    v2 = pkItem->m_pkInfo;
    a = (double)pkItem->m_kStruct.itemattr.dlot.lot;
    b = (double)v2->MaxLot;
    result = fs("%d%%", (unsigned int)(signed __int64)(a * 100.0 / b));
  }
  else
  {
    result = (char *)&unk_9AAB60;
  }
  return result;
}

//----- (005B9EB0) --------------------------------------------------------
void __thiscall ItemIcon::Show(ItemIcon *this, int b)
{
  ItemIcon *v2; // esi@1
  NiScreenElements *v3; // eax@5

  v2 = this;
  IconWin::Show((IconWin *)&this->vfptr, b);
  if ( v2->m_pkLotText && v2->m_bShowLotText )
    ((void (__stdcall *)(_DWORD))v2->m_pkLotText->vfptr[64].__vecDelDtor)(b);
  if ( v2->m_bShowSubIcon )
  {
    v3 = v2->m_spSubImagePlane.m_pObject;
    if ( (_BYTE)b )
      v3->m_uFlags &= 0xFFFEu;
    else
      v3->m_uFlags |= 1u;
  }
  DecoPlaneTex::Show(&v2->m_kTermDeco, b);
  DecoPlaneColor::Show(&v2->m_kGradeDeco, b);
}

//----- (005B9F30) --------------------------------------------------------
char __stdcall ItemIcon::CheckQuestDoing(unsigned __int16 kId)
{
  CClientQuest *v2; // eax@1
  CQuest *v3; // ebx@1
  CQuestData *v4; // edi@2
  unsigned int v5; // esi@2
  QUEST_DATA *v6; // eax@3
  QUEST_DATA *v7; // eax@7
  char result; // al@10

  v2 = QuestDataMgr::GetQuest();
  v3 = (CQuest *)v2;
  if ( v2 && (v4 = v2->m_pQuestData, v5 = 0, CQuestData::GetNumOfQuestData(v2->m_pQuestData) > 0u) )
  {
    while ( 1 )
    {
      v6 = CQuestData::GetQuestDataByIndex(v4, v5);
      if ( v6 )
      {
        if ( v6->Start.bItem )
        {
          if ( !v6->Start.bNPC && v6->Start.ItemID == kId )
          {
            v7 = CQuest::GetNewQuestStatus(v3, v6->ID);
            if ( v7 == (QUEST_DATA *)6 || v7 == (QUEST_DATA *)8 )
              break;
          }
        }
      }
      if ( (signed int)++v5 >= CQuestData::GetNumOfQuestData(v4) )
        goto LABEL_10;
    }
    result = 1;
  }
  else
  {
LABEL_10:
    result = 0;
  }
  return result;
}

//----- (005B9FB0) --------------------------------------------------------
signed __int16 __thiscall ItemIcon::GetItemID(ItemIcon *this)
{
  Item *v1; // eax@1
  signed __int16 result; // ax@2

  v1 = this->m_spItem.m_pObject;
  if ( v1 )
    result = v1->m_kStruct.itemid;
  else
    result = -1;
  return result;
}

//----- (005B9FD0) --------------------------------------------------------
void __thiscall ItemIcon::OnFirstHitWin(ItemIcon *this)
{
  ItemIcon *v1; // esi@1
  ItemInfoWin *v2; // ecx@1

  v1 = this;
  v2 = (ItemInfoWin *)this->m_pkToolTipWin;
  if ( v2 )
  {
    if ( v1->m_spItem.m_pObject )
    {
      ItemInfoWin::SetItemInfo(v2, v1->m_spItem.m_pObject);
      PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
    }
  }
}

//----- (005BA000) --------------------------------------------------------
void __thiscall ItemIcon::~ItemIcon(ItemIcon *this)
{
  ItemIcon *v1; // edi@1
  Item *v2; // esi@1
  NiScreenElements *v3; // esi@6
  NiScreenElements *v4; // esi@10
  NiScreenElements **v5; // ebx@14
  NiTexturingProperty *v6; // esi@14
  NiScreenElements *v7; // esi@18
  NiScreenElements *v8; // esi@22
  NiScreenElements *v9; // esi@26
  NiTexturingProperty *v10; // esi@30
  NiScreenElements *v11; // esi@34
  Item *v12; // esi@38

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ItemIcon::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ItemIcon::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spItem.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spItem.m_pObject = 0;
  }
  v1->m_bgray = 0;
  v3 = v1->m_spTopPlane.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v4 = v1->m_spBackPlane.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v5 = &v1->m_kTermDeco.m_spDecoPlane.m_pObject;
  v6 = v1->m_kTermDeco.m_spDecoTexProp.m_pObject;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  v7 = *v5;
  if ( *v5 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  v8 = v1->m_kGradeDeco.m_spSubPlane.m_pObject;
  if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
    v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
  v9 = v1->m_kGradeDeco.m_spDecoPlane.m_pObject;
  if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
    v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
  v10 = v1->m_spSubImageTexProp.m_pObject;
  if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
    v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
  v11 = v1->m_spSubImagePlane.m_pObject;
  if ( v11 && !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
    v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
  v12 = v1->m_spItem.m_pObject;
  if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
    v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
  IconWin::~IconWin((IconWin *)&v1->vfptr);
}
// 9AABA8: using guessed type void (__thiscall *ItemIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AABC4: using guessed type int (__thiscall *ItemIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (005BA210) --------------------------------------------------------
char __thiscall ItemIcon::Create(ItemIcon *this, int iXPos, int iYPos, PgWin *pkParent)
{
  ItemIcon *v4; // esi@1
  char result; // al@1
  PgFont *v6; // eax@2
  PgWinText *v7; // eax@2

  v4 = this;
  result = PgWinLRBut::Create((PgWinLRBut *)&this->vfptr, iXPos, iYPos, 0x20u, 0x20u, pkParent, 0, 0);
  if ( result )
  {
    v6 = Font::Get(0);
    v7 = PgWinText::CreateWin(18, 20, 0xEu, 0xCu, v6, (PgWin *)&v4->vfptr, 0, 0);
    v4->m_pkLotText = v7;
    v7->vfptr[122].__vecDelDtor((NiRefObject *)v7, 2u);
    SpScreenText::SetShadowOffset((SpScreenText *)&v4->m_pkLotText->m_spTextGeom.m_pObject->vfptr, 1u);
    ((void (__stdcall *)(_DWORD))v4->m_pkLotText->vfptr[60].__vecDelDtor)(0);
    result = 1;
  }
  return result;
}

//----- (005BA2A0) --------------------------------------------------------
void __thiscall ItemIcon::SetSubIconImage(ItemIcon *this, char *pcFn, unsigned int uiIndex, unsigned int uiIconWidth, unsigned int uiIconHeight)
{
  ItemIcon *v5; // esi@1
  NiSourceTexture *v6; // eax@6
  NiSourceTexture *v7; // edi@6
  unsigned int v8; // eax@10
  unsigned int v9; // ST14_4@10
  unsigned int v10; // ST10_4@10
  unsigned int v11; // ST0C_4@10
  unsigned int v12; // eax@10
  char *pcFna; // [sp+1Ch] [bp+8h]@10

  v5 = this;
  if ( pcFn && *pcFn != 45 )
  {
    if ( uiIndex == -1 )
    {
      this->m_bShowSubIcon = 0;
      this->m_spSubImagePlane.m_pObject->m_uFlags |= 1u;
    }
    else
    {
      v6 = IconMgr::GetTexture(pcFn);
      v7 = v6;
      if ( v6 )
      {
        NiTexturingProperty::SetBaseTexture(v5->m_spSubImageTexProp.m_pObject, (NiTexture *)&v6->vfptr);
        v5->m_spSubImagePlane.m_pObject->m_uFlags &= 0xFFFEu;
        v5->m_bShowSubIcon = 1;
        if ( uiIndex != v5->m_uiSubIconIndex )
        {
          if ( v5->m_spSubImageTexProp.m_pObject )
          {
            v8 = ((int (__thiscall *)(_DWORD))v7->vfptr[15].__vecDelDtor)(v7);
            pcFna = (char *)v5->m_spSubImagePlane.m_pObject;
            v9 = uiIconHeight * (uiIndex / (v8 / uiIconWidth));
            v10 = uiIconWidth * (uiIndex % (v8 / uiIconWidth));
            v11 = ((int (__thiscall *)(_DWORD))v7->vfptr[16].__vecDelDtor)(v7);
            v12 = ((int (__thiscall *)(_DWORD))v7->vfptr[15].__vecDelDtor)(v7);
            PgUtil::SetTextureCoord((NiScreenElements *)pcFna, 0, v12, v11, v10, v9, uiIconWidth, uiIconHeight);
            NiAVObject::Update((NiAVObject *)&v5->m_spSubImagePlane.m_pObject->vfptr, 0.0, 1);
            v5->m_uiSubIconIndex = uiIndex;
          }
        }
      }
      else
      {
        v5->m_bShowSubIcon = 0;
        v5->m_spSubImagePlane.m_pObject->m_uFlags |= 1u;
      }
    }
  }
  else
  {
    this->m_bShowSubIcon = 0;
    this->m_spSubImagePlane.m_pObject->m_uFlags |= 1u;
  }
}

//----- (005BA3C0) --------------------------------------------------------
void __thiscall ItemIcon::SetBackPlaneColor(ItemIcon *this, float rad, float green, float blue, float alpha)
{
  ItemIcon *v5; // esi@1
  NiScreenElements *v6; // eax@1
  NiColorA kCommonValue; // [sp+Ch] [bp-10h]@2

  v5 = this;
  v6 = this->m_spBackPlane.m_pObject;
  if ( v6 )
  {
    kCommonValue.r = rad / 255.0;
    kCommonValue.g = green / 255.0;
    kCommonValue.b = blue / 255.0;
    kCommonValue.a = alpha / 255.0;
    NiScreenElementsData::SetColors((NiScreenElementsData *)v6->m_spModelData.m_pObject, 0, &kCommonValue);
    NiScreenElementsData::UpdateBound((NiScreenElementsData *)v5->m_spBackPlane.m_pObject->m_spModelData.m_pObject);
    NiAVObject::UpdateProperties((NiAVObject *)&v5->m_spBackPlane.m_pObject->vfptr);
    NiAVObject::Update((NiAVObject *)&v5->m_spBackPlane.m_pObject->vfptr, 0.0, 1);
    NiAVObject::UpdateProperties((NiAVObject *)&v5->vfptr);
    NiAVObject::Update((NiAVObject *)&v5->vfptr, 0.0, 1);
  }
}

//----- (005BA460) --------------------------------------------------------
void __thiscall ItemIcon::SetTopPlaneColor(ItemIcon *this, float rad, float green, float blue, float alpha)
{
  ItemIcon *v5; // esi@1
  NiScreenElements *v6; // eax@1
  NiColorA kCommonValue; // [sp+Ch] [bp-10h]@2

  v5 = this;
  v6 = this->m_spTopPlane.m_pObject;
  if ( v6 )
  {
    kCommonValue.r = rad / 255.0;
    kCommonValue.g = green / 255.0;
    kCommonValue.b = blue / 255.0;
    kCommonValue.a = alpha / 255.0;
    NiScreenElementsData::SetColors((NiScreenElementsData *)v6->m_spModelData.m_pObject, 0, &kCommonValue);
    NiScreenElementsData::UpdateBound((NiScreenElementsData *)v5->m_spTopPlane.m_pObject->m_spModelData.m_pObject);
    NiAVObject::UpdateProperties((NiAVObject *)&v5->m_spTopPlane.m_pObject->vfptr);
    NiAVObject::Update((NiAVObject *)&v5->m_spTopPlane.m_pObject->vfptr, 0.0, 1);
  }
}

//----- (005BA4E0) --------------------------------------------------------
void __thiscall ItemIcon::DoingQuest(ItemIcon *this)
{
  this->m_bShowSubIcon = 0;
  this->m_spSubImagePlane.m_pObject->m_uFlags |= 1u;
}

//----- (005BA500) --------------------------------------------------------
void __thiscall ItemIcon::GiveUpQuest(ItemIcon *this)
{
  ItemIcon::SetSubIconImage(this, "VarItem000", 0x39u, 0x20u, 0x20u);
}

//----- (005BA520) --------------------------------------------------------
void __thiscall ItemIcon::SetItem(ItemIcon *this, Item *pkItem, bool bEnable)
{
  ItemIcon *v3; // esi@1
  ItemViewInfo *v4; // edi@2
  NiRefObjectVtbl *v5; // ebx@3
  unsigned int v6; // ST0C_4@3
  NiSourceTexture *v7; // eax@3
  int v8; // ebx@3
  int *v9; // eax@5
  int v10; // eax@6
  NiScreenElements *v11; // eax@9
  void *(__thiscall *v12)(NiRefObject *, unsigned int); // eax@13
  PgWinText *v13; // ecx@14
  NiRefObjectVtbl *v14; // ebx@16
  char *v15; // eax@16
  NiRefObjectVtbl **v16; // eax@19
  NiRefObjectVtbl *v17; // edi@21
  int v18; // eax@21
  char *v19; // eax@21
  PgWinText *v20; // ecx@22
  NiScreenElements *v21; // eax@25
  PgWinText *v22; // ecx@25
  Item *v23; // edi@29
  char *v24; // [sp-10h] [bp-20h]@10
  unsigned int v25; // [sp-Ch] [bp-1Ch]@10
  int v26; // [sp+0h] [bp-10h]@0
  unsigned __int16 v27; // [sp+Ch] [bp-4h]@3

  v3 = this;
  if ( !pkItem )
  {
    DecoPlaneColor::SetColor(&this->m_kGradeDeco, 0, 0, 0, 0, 0, 0);
    ((void (__thiscall *)(ItemIcon *, _DWORD, signed int, signed int, signed int))v3->vfptr[146].__vecDelDtor)(
      v3,
      0,
      -1,
      32,
      32);
    v21 = v3->m_spSubImagePlane.m_pObject;
    v3->m_bShowSubIcon = 0;
    v21->m_uFlags |= 1u;
    DecoPlaneTex::SetImage(&v3->m_kTermDeco, 0, 0xFFFFFFFF);
    v3->vfptr[64].__vecDelDtor((NiRefObject *)v3, 0);
    v3->vfptr[60].__vecDelDtor((NiRefObject *)v3, 0);
    v22 = v3->m_pkLotText;
    if ( !v22 || !v3->m_bShowLotText )
      goto LABEL_29;
    ((void (__stdcall *)(void *, int))v22->vfptr[118].__vecDelDtor)(&unk_9AAB69, v26);
LABEL_28:
    ((void (__cdecl *)(_DWORD))v3->m_pkLotText->vfptr[64].__vecDelDtor)(0);
    goto LABEL_29;
  }
  v4 = pkItem->m_pkViewInfo;
  if ( !v4 )
    return;
  DecoPlaneColor::SetColor(&this->m_kGradeDeco, v4->R, v4->G, v4->B, v4->SUB_R, v4->SUB_G, v4->SUB_B);
  v5 = v3->vfptr;
  v6 = v4->IconIndex;
  v7 = IconMgr::GetTexture(v4->IconFile);
  ((void (__thiscall *)(ItemIcon *, NiSourceTexture *, unsigned int, signed int, signed int))v5[146].__vecDelDtor)(
    v3,
    v7,
    v6,
    32,
    32);
  v8 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  v27 = pkItem->m_kStruct.itemid;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                          ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                          pkItem->m_kStruct.itemid) )
  {
    if ( v27 <= *(_WORD *)(v8 + 200) )
    {
      v9 = (int *)(*(_DWORD *)(v8 + 196) + 4 * v27);
      if ( *v9 )
      {
        v10 = *v9;
        if ( v10 )
        {
          if ( *(_DWORD *)(v10 + 98) == 4 )
          {
            if ( ItemIcon::CheckQuestDoing(*(_WORD *)v10) )
            {
              v11 = v3->m_spSubImagePlane.m_pObject;
              v3->m_bShowSubIcon = 0;
              v11->m_uFlags |= 1u;
              goto LABEL_13;
            }
            v25 = 57;
            v24 = "VarItem000";
          }
          else
          {
            v25 = v4->SubIconIndex;
            v24 = v4->SubIconFile;
          }
          ItemIcon::SetSubIconImage(v3, v24, v25, 0x20u, 0x20u);
        }
      }
    }
  }
LABEL_13:
  DecoPlaneTex::SetImage(&v3->m_kTermDeco, v4->PeriodIconFile, v4->PeriodIconIndex);
  v12 = v3->vfptr[64].__vecDelDtor;
  v3->m_uFlags &= 0xFFFEu;
  v12((NiRefObject *)&v3->vfptr, 1u);
  v3->vfptr[60].__vecDelDtor((NiRefObject *)v3, 1u);
  v3->m_bInputProcess = bEnable;
  if ( (unsigned __int8)((int (__thiscall *)(Item *))pkItem->vfptr[1].__vecDelDtor)(pkItem) == 24 )
  {
    v13 = v3->m_pkLotText;
    if ( v13 && v3->m_bShowLotText )
    {
      v14 = v13->vfptr;
      v15 = GetAmountString(pkItem);
      v14[118].__vecDelDtor((NiRefObject *)v3->m_pkLotText, (unsigned int)v15);
      ((void (__stdcall *)(signed int))v3->m_pkLotText->vfptr[64].__vecDelDtor)(1);
    }
    else
    {
      ((void (__stdcall *)(void *))v13->vfptr[118].__vecDelDtor)(&unk_9AAB62);
      ((void (__stdcall *)(_DWORD))v3->m_pkLotText->vfptr[64].__vecDelDtor)(0);
    }
    goto LABEL_29;
  }
  if ( (unsigned int)((int (__thiscall *)(Item *))pkItem->vfptr[4].__vecDelDtor)(pkItem) > 1 )
  {
    v16 = &v3->m_pkLotText->vfptr;
    if ( v16 && v3->m_bShowLotText )
    {
      v17 = *v16;
      v18 = ((int (__stdcall *)(int))pkItem->vfptr[3].__vecDelDtor)(v26);
      v19 = fs("%d", v18);
      v17[118].__vecDelDtor((NiRefObject *)v3->m_pkLotText, (unsigned int)v19);
      ((void (__cdecl *)(signed int))v3->m_pkLotText->vfptr[64].__vecDelDtor)(1);
    }
    goto LABEL_29;
  }
  v20 = v3->m_pkLotText;
  if ( v20 && v3->m_bShowLotText )
  {
    ((void (__stdcall *)(void *, int))v20->vfptr[118].__vecDelDtor)(&unk_9AAB63, v26);
    goto LABEL_28;
  }
LABEL_29:
  v23 = v3->m_spItem.m_pObject;
  if ( v23 != pkItem )
  {
    if ( v23 && !InterlockedDecrement((volatile LONG *)&v23->m_uiRefCount) && v23 )
      v23->vfptr->__vecDelDtor((NiRefObject *)v23, 1u);
    v3->m_spItem.m_pObject = pkItem;
    if ( pkItem )
      InterlockedIncrement((volatile LONG *)&pkItem->m_uiRefCount);
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (005BA850) --------------------------------------------------------
void __userpurge ItemIcon::SetItemAsID(ItemIcon *this@<ecx>, int a2@<edi>, int itemID)
{
  ItemIcon *v3; // esi@1
  int v4; // ST14_4@2
  int v5; // edi@2
  int v6; // edi@3
  int v7; // edx@6
  NiRefObjectVtbl *v8; // ebx@9
  int v9; // ST0C_4@9
  NiSourceTexture *v10; // eax@9
  int v11; // ebx@9
  int *v12; // eax@11
  int v13; // eax@12
  NiScreenElements *v14; // eax@15
  NiScreenElements *v15; // eax@20
  PgWinText *v16; // ecx@21
  char *v17; // [sp-10h] [bp-18h]@16
  unsigned int v18; // [sp-Ch] [bp-14h]@16

  v3 = this;
  if ( (_WORD)itemID != -1 )
  {
    v4 = a2;
    v5 = ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int, int))(*(_DWORD *)ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable
                                                               + 16))(
                            ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable,
                            itemID,
                            v4) )
    {
      if ( (unsigned __int16)itemID <= *(_WORD *)(v5 + 200) )
      {
        v7 = *(_DWORD *)(v5 + 196);
        if ( *(_DWORD *)(v7 + 4 * (unsigned __int16)itemID) )
          v6 = *(_DWORD *)(v7 + 4 * (unsigned __int16)itemID);
        else
          v6 = 0;
      }
      else
      {
        v6 = 0;
      }
    }
    else
    {
      v6 = 0;
    }
    DecoPlaneColor::SetColor(
      &v3->m_kGradeDeco,
      *(_BYTE *)(v6 + 142),
      *(_BYTE *)(v6 + 146),
      *(_BYTE *)(v6 + 150),
      *(_BYTE *)(v6 + 154),
      *(_BYTE *)(v6 + 158),
      *(_BYTE *)(v6 + 162));
    v8 = v3->vfptr;
    v9 = *(_DWORD *)(v6 + 34);
    v10 = IconMgr::GetTexture((char *)(v6 + 38));
    ((void (__thiscall *)(ItemIcon *, NiSourceTexture *, int, signed int, signed int))v8[146].__vecDelDtor)(
      v3,
      v10,
      v9,
      32,
      32);
    v11 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    if ( !(unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                             ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                             itemID) )
      goto LABEL_19;
    if ( (unsigned __int16)itemID > *(_WORD *)(v11 + 200) )
      goto LABEL_19;
    v12 = (int *)(*(_DWORD *)(v11 + 196) + 4 * (unsigned __int16)itemID);
    if ( !*v12 )
      goto LABEL_19;
    v13 = *v12;
    if ( !v13 )
      goto LABEL_19;
    if ( *(_DWORD *)(v13 + 98) == 4 )
    {
      if ( ItemIcon::CheckQuestDoing(*(_WORD *)v13) )
      {
        v14 = v3->m_spSubImagePlane.m_pObject;
        v3->m_bShowSubIcon = 0;
        v14->m_uFlags |= 1u;
LABEL_19:
        DecoPlaneTex::SetImage(&v3->m_kTermDeco, (char *)(v6 + 110), *(_DWORD *)(v6 + 106));
        ((void (__thiscall *)(ItemIcon *))v3->vfptr[64].__vecDelDtor)(v3);
        v3->vfptr[60].__vecDelDtor((NiRefObject *)v3, 1u);
        goto LABEL_21;
      }
      v18 = 57;
      v17 = "VarItem000";
    }
    else
    {
      v18 = *(_DWORD *)(v6 + 70);
      v17 = (char *)(v6 + 74);
    }
    ItemIcon::SetSubIconImage(v3, v17, v18, 0x20u, 0x20u);
    goto LABEL_19;
  }
  DecoPlaneColor::SetColor(&this->m_kGradeDeco, 0, 0, 0, 0, 0, 0);
  ((void (__thiscall *)(ItemIcon *, _DWORD, signed int, signed int, signed int))v3->vfptr[146].__vecDelDtor)(
    v3,
    0,
    -1,
    32,
    32);
  v15 = v3->m_spSubImagePlane.m_pObject;
  v3->m_bShowSubIcon = 0;
  v15->m_uFlags |= 1u;
  DecoPlaneTex::SetImage(&v3->m_kTermDeco, 0, 0xFFFFFFFF);
  v3->vfptr[64].__vecDelDtor((NiRefObject *)v3, 0);
  v3->vfptr[60].__vecDelDtor((NiRefObject *)v3, 0);
LABEL_21:
  v16 = v3->m_pkLotText;
  if ( v16 )
  {
    if ( v3->m_bShowLotText )
    {
      ((void (__stdcall *)(void *))v16->vfptr[118].__vecDelDtor)(&unk_9AAB6A);
      v3->m_pkLotText->vfptr[64].__vecDelDtor((NiRefObject *)v3->m_pkLotText, 0);
    }
  }
}
// 5BA850: could not find valid save-restore pair for edi
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
// A8C298: using guessed type int ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;

//----- (005BAA60) --------------------------------------------------------
void __thiscall ItemIcon::SetChargedItem(ItemIcon *this, unsigned int dwShopItemID)
{
  ItemIcon *v2; // esi@1
  PgWinText *v3; // ecx@1
  ItemShopView *v4; // eax@5
  ItemShopView *v5; // edi@5
  NiRefObjectVtbl *v6; // ebx@6
  unsigned int v7; // ST0C_4@6
  NiSourceTexture *v8; // eax@6
  NiScreenElements *v9; // eax@7

  v2 = this;
  v3 = this->m_pkLotText;
  if ( v3 && v2->m_bShowLotText )
  {
    ((void (__stdcall *)(_DWORD))v3->vfptr[118].__vecDelDtor)(&unk_9AAB6B);
    ((void (__stdcall *)(_DWORD))v2->m_pkLotText->vfptr[64].__vecDelDtor)(0);
  }
  if ( dwShopItemID != -1 && (v4 = ItemShopViewTable::GetByShopID(dwShopItemID), (v5 = v4) != 0) )
  {
    DecoPlaneColor::SetColor(&v2->m_kGradeDeco, v4->R, v4->G, v4->B, 0, 0, 0);
    v6 = v2->vfptr;
    v7 = v5->IconIndex;
    v8 = IconMgr::GetTexture(v5->IconFile);
    ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v6[146].__vecDelDtor)(v2, v8, v7, 32, 32);
    ItemIcon::SetSubIconImage(v2, v5->SubIconFile, v5->SubIconIndex, 0x20u, 0x20u);
    DecoPlaneTex::SetImage(&v2->m_kTermDeco, v5->PeriodIconFile, v5->PeriodIconIndex);
    v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 1u);
    v2->vfptr[60].__vecDelDtor((NiRefObject *)v2, 1u);
  }
  else
  {
    DecoPlaneColor::SetColor(&v2->m_kGradeDeco, 0, 0, 0, 0, 0, 0);
    ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v2->vfptr[146].__vecDelDtor)(v2, 0, -1, 32, 32);
    v9 = v2->m_spSubImagePlane.m_pObject;
    v2->m_bShowSubIcon = 0;
    v9->m_uFlags |= 1u;
    DecoPlaneTex::SetImage(&v2->m_kTermDeco, 0, 0xFFFFFFFF);
    v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 0);
    v2->vfptr[60].__vecDelDtor((NiRefObject *)v2, 0);
  }
}

//----- (005BABD0) --------------------------------------------------------
void __userpurge ItemIcon::SetItemSellInfo(ItemIcon *this@<ecx>, int a2@<ebx>, int a3@<edi>, PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *pkItemSellInfo)
{
  ItemIcon *v4; // esi@1
  int v5; // eax@2
  int v6; // edi@3
  int v7; // ebx@3
  int *v8; // eax@5
  int v9; // edi@6
  NiRefObjectVtbl *v10; // ebx@7
  int v11; // ST0C_4@7
  NiSourceTexture *v12; // eax@7
  ItemInfo *v13; // eax@7
  NiScreenElements *v14; // eax@10
  unsigned int v15; // eax@14
  PgWinText *v16; // ecx@14
  NiRefObjectVtbl *v17; // edi@17
  char *v18; // eax@17
  NiScreenElements *v19; // eax@22
  PgWinText *v20; // ecx@22
  char *v21; // [sp-10h] [bp-14h]@11
  unsigned int v22; // [sp-Ch] [bp-10h]@11
  int v23; // [sp-8h] [bp-Ch]@3
  int v24; // [sp-4h] [bp-8h]@3

  v4 = this;
  if ( pkItemSellInfo )
  {
    v5 = pkItemSellInfo->item;
    if ( (_WORD)v5 != -1 )
    {
      v24 = a2;
      v23 = a3;
      v6 = ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;
      v7 = pkItemSellInfo->item;
      if ( !(unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable
                                                             + 16))(
                               ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable,
                               v5) )
        return;
      if ( (unsigned __int16)v7 > *(_WORD *)(v6 + 200) )
        return;
      v8 = (int *)(*(_DWORD *)(v6 + 196) + 4 * v7);
      if ( !*v8 )
        return;
      v9 = *v8;
      if ( !*v8 )
        return;
      DecoPlaneColor::SetColor(
        &v4->m_kGradeDeco,
        *(_BYTE *)(v9 + 142),
        *(_BYTE *)(v9 + 146),
        *(_BYTE *)(v9 + 150),
        *(_BYTE *)(v9 + 154),
        *(_BYTE *)(v9 + 158),
        *(_BYTE *)(v9 + 162));
      v10 = v4->vfptr;
      v11 = *(_DWORD *)(v9 + 34);
      v12 = IconMgr::GetTexture((char *)(v9 + 38));
      ((void (__thiscall *)(ItemIcon *, NiSourceTexture *, int, signed int, signed int, int, int))v10[146].__vecDelDtor)(
        v4,
        v12,
        v11,
        32,
        32,
        v23,
        v24);
      v13 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(pkItemSellInfo->item);
      if ( !v13 )
        goto LABEL_14;
      if ( v13->Type == 4 )
      {
        if ( ItemIcon::CheckQuestDoing(v13->ID) )
        {
          v14 = v4->m_spSubImagePlane.m_pObject;
          v4->m_bShowSubIcon = 0;
          v14->m_uFlags |= 1u;
          goto LABEL_14;
        }
        v22 = 57;
        v21 = "VarItem000";
      }
      else
      {
        v22 = *(_DWORD *)(v9 + 70);
        v21 = (char *)(v9 + 74);
      }
      ItemIcon::SetSubIconImage(v4, v21, v22, 0x20u, 0x20u);
LABEL_14:
      DecoPlaneTex::SetImage(&v4->m_kTermDeco, (char *)(v9 + 110), *(_DWORD *)(v9 + 106));
      ((void (__thiscall *)(ItemIcon *))v4->vfptr[64].__vecDelDtor)(v4);
      ((void (__thiscall *)(ItemIcon *))v4->vfptr[60].__vecDelDtor)(v4);
      v15 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(pkItemSellInfo->item)->MaxLot;
      v16 = v4->m_pkLotText;
      if ( v15 <= 1 )
      {
        if ( v16 && v4->m_bShowLotText )
        {
          ((void (__stdcall *)(void *))v16->vfptr[118].__vecDelDtor)(&unk_9AAB77);
          v4->m_pkLotText->vfptr[64].__vecDelDtor((NiRefObject *)v4->m_pkLotText, 0);
        }
      }
      else if ( v16 )
      {
        if ( v4->m_bShowLotText )
        {
          v17 = v16->vfptr;
          v18 = fs("%d", v15);
          v17[118].__vecDelDtor((NiRefObject *)v4->m_pkLotText, (unsigned int)v18);
          ((void (__stdcall *)(signed int))v4->m_pkLotText->vfptr[64].__vecDelDtor)(1);
        }
      }
      return;
    }
  }
  DecoPlaneColor::SetColor(&this->m_kGradeDeco, 0, 0, 0, 0, 0, 0);
  ((void (__thiscall *)(ItemIcon *, _DWORD, signed int, signed int, signed int))v4->vfptr[146].__vecDelDtor)(
    v4,
    0,
    -1,
    32,
    32);
  v19 = v4->m_spSubImagePlane.m_pObject;
  v4->m_bShowSubIcon = 0;
  v19->m_uFlags |= 1u;
  DecoPlaneTex::SetImage(&v4->m_kTermDeco, 0, 0xFFFFFFFF);
  v4->vfptr[64].__vecDelDtor((NiRefObject *)v4, 0);
  v4->vfptr[60].__vecDelDtor((NiRefObject *)v4, 0);
  v20 = v4->m_pkLotText;
  if ( v20 && v4->m_bShowLotText )
  {
    ((void (__stdcall *)(void *))v20->vfptr[118].__vecDelDtor)(&unk_9AAB7B);
    v4->m_pkLotText->vfptr[64].__vecDelDtor((NiRefObject *)v4->m_pkLotText, 0);
  }
}
// 5BABD0: could not find valid save-restore pair for ebx
// 5BABD0: could not find valid save-restore pair for edi
// A8C298: using guessed type int ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;

//----- (005BAE70) --------------------------------------------------------
void __thiscall ItemIcon::CreateSubImagePlane(ItemIcon *this, unsigned int uiWidth, unsigned int uiHeight)
{
  ItemIcon *v3; // esi@1
  NiScreenElements *v4; // ebx@1
  NiScreenElementsData *v5; // edi@1
  NiScreenElements *v6; // eax@1
  NiScreenElements *v7; // eax@2
  NiScreenElements *v8; // edi@3
  NiTexturingProperty *v9; // eax@10
  NiTexturingProperty *v10; // eax@11
  NiTexturingProperty *v11; // ebx@11
  NiTexturingProperty *v12; // edi@13
  NiTexturingProperty *v13; // ebx@20
  unsigned int v14; // edi@20
  NiTexturingProperty::Map *v15; // eax@21
  unsigned int v16; // eax@22
  int v17; // ebx@25
  unsigned int v18; // edi@30
  NiScreenElements *v19; // ebx@30
  NiObjectNET *v20; // eax@35
  unsigned int v21; // edi@35
  unsigned int uiWidtha; // [sp+24h] [bp+8h]@38

  v3 = this;
  v4 = 0;
  v5 = PgUtil::CreateScreenGeometryData(uiWidth, uiHeight, 0, 0, uiWidth, uiHeight);
  v6 = (NiScreenElements *)operator new(0xC4u);
  uiHeight = (unsigned int)v6;
  if ( v6 )
  {
    NiScreenElements::NiScreenElements(v6, v5);
    v4 = v7;
  }
  v8 = v3->m_spSubImagePlane.m_pObject;
  if ( v8 != v4 )
  {
    if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v3->m_spSubImagePlane.m_pObject = v4;
    if ( v4 )
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  }
  v9 = (NiTexturingProperty *)operator new(0x44u);
  uiHeight = (unsigned int)v9;
  if ( v9 )
  {
    NiTexturingProperty::NiTexturingProperty(v9);
    v11 = v10;
  }
  else
  {
    v11 = 0;
  }
  v12 = v3->m_spSubImageTexProp.m_pObject;
  if ( v12 != v11 )
  {
    if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
      v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
    v3->m_spSubImageTexProp.m_pObject = v11;
    if ( v11 )
      InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
  }
  v13 = v3->m_spSubImageTexProp.m_pObject;
  v14 = (unsigned int)*v13->m_kMaps.m_pBase;
  if ( !v14 )
  {
    v15 = (NiTexturingProperty::Map *)operator new(0x18u);
    uiHeight = (unsigned int)v15;
    if ( v15 )
      NiTexturingProperty::Map::Map(v15);
    else
      v16 = 0;
    v14 = v16;
    uiHeight = v16;
    NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)&v13->m_kMaps, 0, (NiVBChip *const *)&uiHeight);
  }
  v17 = *(_DWORD *)(v14 + 4);
  if ( v17 )
  {
    if ( !InterlockedDecrement((volatile LONG *)(v17 + 4)) && v17 )
      (**(void (__thiscall ***)(_DWORD, _DWORD))v17)(v17, 1);
    *(_DWORD *)(v14 + 4) = 0;
  }
  NiTexturingProperty::SetBaseFilterMode(v3->m_spSubImageTexProp.m_pObject, 0);
  v3->m_spSubImageTexProp.m_pObject->m_eApply = 2;
  NiTexturingProperty::SetBaseClampMode(v3->m_spSubImageTexProp.m_pObject, 0);
  v18 = (unsigned int)v3->m_spSubImageTexProp.m_pObject;
  v19 = v3->m_spSubImagePlane.m_pObject;
  uiHeight = v18;
  if ( v18 )
    InterlockedIncrement((volatile LONG *)(v18 + 4));
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v19->m_kPropertyList,
    (NiPointer<NiRoom> *)&uiHeight);
  if ( v18 && !InterlockedDecrement((volatile LONG *)(v18 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v18)(v18, 1);
  v20 = (NiObjectNET *)operator new(0x20u);
  v21 = (unsigned int)v20;
  uiHeight = (unsigned int)v20;
  if ( v20 )
  {
    NiObjectNET::NiObjectNET(v20);
    *(_DWORD *)v21 = &NiAlphaProperty::`vftable';
    *(_WORD *)(v21 + 28) = 236;
    *(_BYTE *)(v21 + 30) = 0;
  }
  else
  {
    v21 = 0;
  }
  *(_WORD *)(v21 + 28) |= 1u;
  uiWidtha = (unsigned int)v3->m_spSubImagePlane.m_pObject;
  uiHeight = v21;
  InterlockedIncrement((volatile LONG *)(v21 + 4));
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(uiWidtha + 156),
    (NiPointer<NiRoom> *)&uiHeight);
  if ( !InterlockedDecrement((volatile LONG *)(v21 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v21)(v21, 1);
  ((void (__thiscall *)(ItemIcon *, NiScreenElements *, _DWORD))v3->vfptr[29].__vecDelDtor)(
    v3,
    v3->m_spSubImagePlane.m_pObject,
    0);
  NiAVObject::UpdateProperties((NiAVObject *)&v3->vfptr);
}
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);

//----- (005BB130) --------------------------------------------------------
void __thiscall ItemIcon::PlaneInit(ItemIcon *this)
{
  ItemIcon *v1; // esi@1
  NiScreenElements *v2; // edi@1
  NiScreenElements *v3; // ebx@1
  NiScreenElementsData *v4; // eax@2
  NiScreenElementsData *v5; // eax@3
  NiScreenElements *v6; // eax@5
  NiScreenElements *v7; // edi@6
  NiScreenElements *v8; // eax@13
  NiObjectNET *v9; // eax@13
  float v10; // edi@13
  NiObjectNET *v11; // eax@18
  float v12; // edi@18
  NiScreenElements *v13; // edi@23
  NiScreenElementsData *v14; // eax@24
  NiScreenElementsData *v15; // eax@25
  NiScreenElements *v16; // eax@25
  NiScreenElements *v17; // ebx@25
  NiScreenElements *v18; // eax@26
  NiScreenElements *v19; // edi@28
  NiScreenElements *v20; // eax@35
  NiObjectNET *v21; // eax@35
  float v22; // edi@35
  NiObjectNET *v23; // eax@40
  float v24; // edi@40
  NiColorA kCommonValue; // [sp+40h] [bp-34h]@13
  void *v26; // [sp+50h] [bp-24h]@24
  NiScreenElements *v27; // [sp+54h] [bp-20h]@23
  float alpha; // [sp+58h] [bp-1Ch]@1
  float rad; // [sp+5Ch] [bp-18h]@2
  float green; // [sp+60h] [bp-14h]@1
  float blue; // [sp+64h] [bp-10h]@1
  int v32; // [sp+70h] [bp-4h]@1

  v1 = this;
  green = 0.0 / 255.0;
  blue = green;
  *(float *)&v2 = COERCE_FLOAT(operator new(0xC4u));
  alpha = *(float *)&v2;
  v3 = 0;
  v32 = 0;
  if ( *(float *)&v2 != 0.0 )
  {
    *(float *)&v4 = COERCE_FLOAT(operator new(0x70u));
    rad = *(float *)&v4;
    LOBYTE(v32) = 1;
    if ( *(float *)&v4 == 0.0 )
      v5 = 0;
    else
      NiScreenElementsData::NiScreenElementsData(v4, 0, 1, 0, 1, 1, 4, 1, 2, 1);
    LOBYTE(v32) = 0;
    NiScreenElements::NiScreenElements(v2, v5);
    v3 = v6;
  }
  v7 = v1->m_spBackPlane.m_pObject;
  v32 = -1;
  if ( v7 != v3 )
  {
    if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v1->m_spBackPlane.m_pObject = v3;
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
  NiScreenElementsData::Insert((NiScreenElementsData *)v1->m_spBackPlane.m_pObject->m_spModelData.m_pObject, 4u, 0, 0);
  NiScreenElementsData::SetRectangle(
    (NiScreenElementsData *)v1->m_spBackPlane.m_pObject->m_spModelData.m_pObject,
    0,
    0.0,
    0.0,
    32.0,
    32.0);
  v8 = v1->m_spBackPlane.m_pObject;
  kCommonValue.r = 1.0;
  kCommonValue.g = 1.0;
  kCommonValue.b = blue;
  kCommonValue.a = 0.50196081;
  NiScreenElementsData::SetColors((NiScreenElementsData *)v8->m_spModelData.m_pObject, 0, &kCommonValue);
  *(float *)&v9 = COERCE_FLOAT(operator new(0x20u));
  v10 = *(float *)&v9;
  alpha = *(float *)&v9;
  v32 = 2;
  if ( *(float *)&v9 == 0.0 )
  {
    v10 = 0.0;
  }
  else
  {
    NiObjectNET::NiObjectNET(v9);
    *(_DWORD *)LODWORD(v10) = &NiAlphaProperty::`vftable';
    *(_WORD *)(LODWORD(v10) + 28) = 236;
    *(_BYTE *)(LODWORD(v10) + 30) = 0;
  }
  *(_WORD *)(LODWORD(v10) + 28) |= 1u;
  rad = *(float *)&v1->m_spBackPlane.m_pObject;
  blue = v10;
  InterlockedIncrement((volatile LONG *)(LODWORD(v10) + 4));
  v32 = 3;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(LODWORD(rad) + 156),
    (NiPointer<NiRoom> *)&blue);
  v32 = -1;
  if ( !InterlockedDecrement((volatile LONG *)(LODWORD(v10) + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))LODWORD(v10))(LODWORD(v10), 1);
  *(float *)&v11 = COERCE_FLOAT(operator new(0x28u));
  v12 = *(float *)&v11;
  alpha = *(float *)&v11;
  v32 = 4;
  if ( *(float *)&v11 == 0.0 )
  {
    v12 = 0.0;
  }
  else
  {
    NiObjectNET::NiObjectNET(v11);
    *(_DWORD *)LODWORD(v12) = &NiVertexColorProperty::`vftable';
    *(_WORD *)(LODWORD(v12) + 28) = 0;
    *(_DWORD *)(LODWORD(v12) + 32) = 0;
    *(_DWORD *)(LODWORD(v12) + 36) = 1;
  }
  *(_DWORD *)(LODWORD(v12) + 36) = 0;
  *(_DWORD *)(LODWORD(v12) + 32) = 1;
  blue = *(float *)&v1->m_spBackPlane.m_pObject;
  rad = v12;
  InterlockedIncrement((volatile LONG *)(LODWORD(v12) + 4));
  v32 = 5;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(LODWORD(blue) + 156),
    (NiPointer<NiRoom> *)&rad);
  v32 = -1;
  if ( !InterlockedDecrement((volatile LONG *)(LODWORD(v12) + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))LODWORD(v12))(LODWORD(v12), 1);
  NiScreenElementsData::UpdateBound((NiScreenElementsData *)v1->m_spBackPlane.m_pObject->m_spModelData.m_pObject);
  NiAVObject::UpdateProperties((NiAVObject *)&v1->m_spBackPlane.m_pObject->vfptr);
  NiAVObject::Update((NiAVObject *)&v1->m_spBackPlane.m_pObject->vfptr, 0.0, 1);
  ((void (__thiscall *)(ItemIcon *, NiScreenElements *, _DWORD))v1->vfptr[29].__vecDelDtor)(
    v1,
    v1->m_spBackPlane.m_pObject,
    0);
  NiAVObject::UpdateProperties((NiAVObject *)&v1->vfptr);
  NiAVObject::Update((NiAVObject *)&v1->vfptr, 0.0, 1);
  rad = green;
  blue = green;
  alpha = green;
  v13 = (NiScreenElements *)operator new(0xC4u);
  v27 = v13;
  v32 = 6;
  if ( v13 )
  {
    v14 = (NiScreenElementsData *)operator new(0x70u);
    v26 = v14;
    LOBYTE(v32) = 7;
    if ( v14 )
    {
      NiScreenElementsData::NiScreenElementsData(v14, 0, 1, 0, 1, 1, 4, 1, 2, 1);
      LOBYTE(v32) = 6;
      NiScreenElements::NiScreenElements(v13, v15);
      v17 = v16;
    }
    else
    {
      LOBYTE(v32) = 6;
      NiScreenElements::NiScreenElements(v13, 0);
      v17 = v18;
    }
  }
  else
  {
    v17 = 0;
  }
  v19 = v1->m_spTopPlane.m_pObject;
  v32 = -1;
  if ( v19 != v17 )
  {
    if ( v19 && !InterlockedDecrement((volatile LONG *)&v19->m_uiRefCount) && v19 )
      v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
    v1->m_spTopPlane.m_pObject = v17;
    if ( v17 )
      InterlockedIncrement((volatile LONG *)&v17->m_uiRefCount);
  }
  NiScreenElementsData::Insert((NiScreenElementsData *)v1->m_spTopPlane.m_pObject->m_spModelData.m_pObject, 4u, 0, 0);
  NiScreenElementsData::SetRectangle(
    (NiScreenElementsData *)v1->m_spTopPlane.m_pObject->m_spModelData.m_pObject,
    0,
    0.0,
    0.0,
    32.0,
    32.0);
  v20 = v1->m_spTopPlane.m_pObject;
  kCommonValue.r = rad;
  kCommonValue.g = green;
  kCommonValue.b = blue;
  kCommonValue.a = alpha;
  NiScreenElementsData::SetColors((NiScreenElementsData *)v20->m_spModelData.m_pObject, 0, &kCommonValue);
  v21 = (NiObjectNET *)operator new(0x20u);
  v22 = *(float *)&v21;
  v26 = v21;
  v32 = 8;
  if ( v21 )
  {
    NiObjectNET::NiObjectNET(v21);
    *(_DWORD *)LODWORD(v22) = &NiAlphaProperty::`vftable';
    *(_WORD *)(LODWORD(v22) + 28) = 236;
    *(_BYTE *)(LODWORD(v22) + 30) = 0;
  }
  else
  {
    v22 = 0.0;
  }
  *(_WORD *)(LODWORD(v22) + 28) |= 1u;
  rad = *(float *)&v1->m_spTopPlane.m_pObject;
  alpha = v22;
  InterlockedIncrement((volatile LONG *)(LODWORD(v22) + 4));
  v32 = 9;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(LODWORD(rad) + 156),
    (NiPointer<NiRoom> *)&alpha);
  v32 = -1;
  if ( !InterlockedDecrement((volatile LONG *)(LODWORD(v22) + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))LODWORD(v22))(LODWORD(v22), 1);
  v23 = (NiObjectNET *)operator new(0x28u);
  v24 = *(float *)&v23;
  v26 = v23;
  v32 = 10;
  if ( v23 )
  {
    NiObjectNET::NiObjectNET(v23);
    *(_DWORD *)LODWORD(v24) = &NiVertexColorProperty::`vftable';
    *(_WORD *)(LODWORD(v24) + 28) = 0;
    *(_DWORD *)(LODWORD(v24) + 32) = 0;
    *(_DWORD *)(LODWORD(v24) + 36) = 1;
  }
  else
  {
    v24 = 0.0;
  }
  *(_DWORD *)(LODWORD(v24) + 36) = 0;
  *(_DWORD *)(LODWORD(v24) + 32) = 1;
  rad = *(float *)&v1->m_spTopPlane.m_pObject;
  alpha = v24;
  InterlockedIncrement((volatile LONG *)(LODWORD(v24) + 4));
  v32 = 11;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(LODWORD(rad) + 156),
    (NiPointer<NiRoom> *)&alpha);
  v32 = -1;
  if ( !InterlockedDecrement((volatile LONG *)(LODWORD(v24) + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))LODWORD(v24))(LODWORD(v24), 1);
  NiScreenElementsData::UpdateBound((NiScreenElementsData *)v1->m_spTopPlane.m_pObject->m_spModelData.m_pObject);
  NiAVObject::UpdateProperties((NiAVObject *)&v1->m_spTopPlane.m_pObject->vfptr);
  NiAVObject::Update((NiAVObject *)&v1->m_spTopPlane.m_pObject->vfptr, 0.0, 1);
  ((void (__thiscall *)(ItemIcon *, NiScreenElements *, _DWORD))v1->vfptr[29].__vecDelDtor)(
    v1,
    v1->m_spTopPlane.m_pObject,
    0);
  NiAVObject::UpdateProperties((NiAVObject *)&v1->vfptr);
  NiAVObject::Update((NiAVObject *)&v1->vfptr, 0.0, 1);
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);

//----- (005BB6B0) --------------------------------------------------------
void __thiscall ItemIcon::ItemIcon(ItemIcon *this)
{
  ItemIcon *v1; // esi@1
  Item *v2; // edi@1

  v1 = this;
  IconWin::IconWin((IconWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ItemIcon::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ItemIcon::`vftable'{for `IDirectMessenger'};
  v1->m_spItem.m_pObject = 0;
  v1->m_spSubImagePlane.m_pObject = 0;
  v1->m_spSubImageTexProp.m_pObject = 0;
  DecoPlaneColor::DecoPlaneColor(&v1->m_kGradeDeco);
  DecoPlaneTex::DecoPlaneTex(&v1->m_kTermDeco);
  v1->m_spBackPlane.m_pObject = 0;
  v1->m_spTopPlane.m_pObject = 0;
  DecoPlaneColor::Create(&v1->m_kGradeDeco, (PgWin *)&v1->vfptr);
  IconWin::CreateGeometry((IconWin *)&v1->vfptr, 0x20u, 0x20u);
  ItemIcon::CreateSubImagePlane(v1, 0x20u, 0x20u);
  DecoPlaneTex::Create(&v1->m_kTermDeco, (PgWin *)&v1->vfptr);
  v1->m_bgray = 0;
  v1->m_pkLotText = 0;
  v2 = v1->m_spItem.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spItem.m_pObject = 0;
  }
  v1->m_uiSubIconIndex = -1;
  *(_WORD *)&v1->m_bShowLotText = 1;
  v1->m_bInputProcess = 1;
}
// 9AABA8: using guessed type void (__thiscall *ItemIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AABC4: using guessed type int (__thiscall *ItemIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (005BB7D0) --------------------------------------------------------
ItemIcon *__cdecl ItemIcon::CreateWin(int iXPos, int iYPos, PgWin *pkParent)
{
  PgWin *v3; // eax@1
  PgWin *v4; // eax@2
  PgWin *v5; // esi@2
  PgWin *v6; // edi@8
  ItemIcon *v7; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x1C0u);
  result.m_pObject = v3;
  v9 = 0;
  if ( v3 )
  {
    ItemIcon::ItemIcon((ItemIcon *)v3);
    v5 = v4;
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v9 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v5);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgWin *))v5->vfptr[153].__vecDelDtor)(
                          v5,
                          iXPos,
                          iYPos,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v5->vfptr[89].__vecDelDtor)(v5);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = (ItemIcon *)v5;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v5);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = 0;
  }
  return v7;
}

//----- (005BB910) --------------------------------------------------------
void __thiscall DecoPlaneColor::~DecoPlaneColor(DecoPlaneTex *this)
{
  DecoPlaneTex *v1; // edi@1
  NiTexturingProperty *v2; // esi@1
  NiScreenElements *v3; // esi@5

  v1 = this;
  v2 = this->m_spDecoTexProp.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_spDecoPlane.m_pObject;
  if ( v1->m_spDecoPlane.m_pObject && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
  {
    if ( v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  }
}

//----- (005BB9A0) --------------------------------------------------------
MaterialItemIcon *__thiscall MaterialItemIcon::`scalar deleting destructor'(MaterialItemIcon *this, unsigned int a2)
{
  MaterialItemIcon *v2; // esi@1

  v2 = this;
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005BB9D0) --------------------------------------------------------
Skill::EmpowerInfo *__thiscall SkillIcon::GetEmpowerInfo(SkillIcon *this, Skill::EmpowerInfo *result)
{
  Skill::EmpowerInfo *v2; // eax@1

  v2 = result;
  *result = this->m_kEmpowerInfo;
  return v2;
}

//----- (005BB9F0) --------------------------------------------------------
unsigned __int16 __thiscall SkillIcon::GetSkill(SkillIcon *this)
{
  return this->m_kSkillID;
}

//----- (005BBA00) --------------------------------------------------------
Skill::EmpowerInfo *__thiscall SkillIcon::GetAccumulatedEmpowerInfo(SkillIcon *this, Skill::EmpowerInfo *result)
{
  int v2; // esi@1
  SkillIcon *v3; // edi@1
  int v4; // ebx@1
  int *v5; // eax@3
  int v6; // ecx@4
  Skill::EmpowerInfo *v7; // eax@5
  char *v8; // eax@6
  char v9; // dl@7
  int v10; // esi@8
  char v11; // bl@9
  Skill::LearnSkillInfo *v12; // eax@10
  Skill::EmpowerInfo kEmpowerInfo; // [sp+Ch] [bp-4h]@6

  v2 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  v3 = this;
  v4 = this->m_kSkillID;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                          v4)
    && (unsigned __int16)v4 <= *(_WORD *)(v2 + 200)
    && (v5 = (int *)(*(_DWORD *)(v2 + 196) + 4 * v4), *v5)
    && (v6 = *v5) != 0 )
  {
    kEmpowerInfo = v3->m_kEmpowerInfo;
    v8 = (char *)(v6 + 2);
    do
      v9 = *v8++;
    while ( v9 );
    v10 = *(&v8[v6 - 2] - v6) - 49;
    if ( *(&v8[v6 - 2] - v6) != 49 )
    {
      v11 = (char)v3->m_kEmpowerInfo;
      do
      {
        v12 = Skill::GetLearnActSkillInfo(v3->m_kSkillID - v10);
        v11 += v12->kEmpowerInfo.cDamageUp;
        kEmpowerInfo.cSmallSp += v12->kEmpowerInfo.cSmallSp;
        kEmpowerInfo.cLongKeepTime += v12->kEmpowerInfo.cLongKeepTime;
        kEmpowerInfo.cShortCoolTime += v12->kEmpowerInfo.cShortCoolTime;
        --v10;
      }
      while ( v10 );
      kEmpowerInfo.cDamageUp = v11;
    }
    v7 = result;
    *result = kEmpowerInfo;
  }
  else
  {
    v7 = result;
    *result = v3->m_kEmpowerInfo;
  }
  return v7;
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (005BBAD0) --------------------------------------------------------
Skill::EmpowerInfo *__thiscall SkillIcon::GetTotalAccumulatedEmpowerInfo(SkillIcon *this, Skill::EmpowerInfo *result)
{
  Skill::GetAccumulatedEmpowerInfo(result, this->m_kSkillID);
  return result;
}

//----- (005BBAF0) --------------------------------------------------------
void __thiscall SkillIcon::ShowSkillPowerBar(SkillIcon *this, bool b)
{
  PgWinBar *v2; // eax@1
  PgWinBar *v3; // eax@5
  PgWinBar *v4; // eax@9
  PgWinBar *v5; // eax@13

  v2 = this->m_apkSkillPowerBar[0];
  if ( v2 )
  {
    if ( b )
      v2->m_uFlags &= 0xFFFEu;
    else
      v2->m_uFlags |= 1u;
  }
  v3 = this->m_apkSkillPowerBar[1];
  if ( v3 )
  {
    if ( b )
      v3->m_uFlags &= 0xFFFEu;
    else
      v3->m_uFlags |= 1u;
  }
  v4 = this->m_apkSkillPowerBar[2];
  if ( v4 )
  {
    if ( b )
      v4->m_uFlags &= 0xFFFEu;
    else
      v4->m_uFlags |= 1u;
  }
  v5 = this->m_apkSkillPowerBar[3];
  if ( v5 )
  {
    if ( b )
      v5->m_uFlags &= 0xFFFEu;
    else
      v5->m_uFlags |= 1u;
  }
}

//----- (005BBB80) --------------------------------------------------------
void __thiscall SkillIcon::SetBackPlaneColor(SkillIcon *this, float rad, float green, float blue, float alpha)
{
  SkillIcon *v5; // esi@1
  NiScreenElements *v6; // eax@1
  NiColorA kCommonValue; // [sp+Ch] [bp-10h]@2

  v5 = this;
  v6 = this->m_spBackPlane.m_pObject;
  if ( v6 )
  {
    kCommonValue.r = rad / 255.0;
    kCommonValue.g = green / 255.0;
    kCommonValue.b = blue / 255.0;
    kCommonValue.a = alpha / 255.0;
    NiScreenElementsData::SetColors((NiScreenElementsData *)v6->m_spModelData.m_pObject, 0, &kCommonValue);
    NiScreenElementsData::UpdateBound((NiScreenElementsData *)v5->m_spBackPlane.m_pObject->m_spModelData.m_pObject);
    NiAVObject::UpdateProperties((NiAVObject *)&v5->m_spBackPlane.m_pObject->vfptr);
    NiAVObject::Update((NiAVObject *)&v5->m_spBackPlane.m_pObject->vfptr, 0.0, 1);
    NiAVObject::UpdateProperties((NiAVObject *)&v5->vfptr);
    NiAVObject::Update((NiAVObject *)&v5->vfptr, 0.0, 1);
  }
}

//----- (005BBC20) --------------------------------------------------------
void __thiscall SkillIcon::SetTopPlaneColor(SkillIcon *this, float rad, float green, float blue, float alpha)
{
  SkillIcon *v5; // esi@1
  NiScreenElements *v6; // eax@1
  NiColorA kCommonValue; // [sp+Ch] [bp-10h]@2

  v5 = this;
  v6 = this->m_spTopPlane.m_pObject;
  if ( v6 )
  {
    kCommonValue.r = rad / 255.0;
    kCommonValue.g = green / 255.0;
    kCommonValue.b = blue / 255.0;
    kCommonValue.a = alpha / 255.0;
    NiScreenElementsData::SetColors((NiScreenElementsData *)v6->m_spModelData.m_pObject, 0, &kCommonValue);
    NiScreenElementsData::UpdateBound((NiScreenElementsData *)v5->m_spTopPlane.m_pObject->m_spModelData.m_pObject);
    NiAVObject::UpdateProperties((NiAVObject *)&v5->m_spTopPlane.m_pObject->vfptr);
    NiAVObject::Update((NiAVObject *)&v5->m_spTopPlane.m_pObject->vfptr, 0.0, 1);
  }
}

//----- (005BBCA0) --------------------------------------------------------
void __thiscall SkillIcon::Show(SkillIcon *this, bool b)
{
  SkillIcon *v2; // esi@1
  NiScreenElements *v3; // eax@1
  NiScreenElements *v4; // eax@5

  v2 = this;
  IconWin::Show((IconWin *)&this->vfptr, b);
  v3 = v2->m_spBackPlane.m_pObject;
  if ( v3 )
  {
    if ( b )
      v3->m_uFlags &= 0xFFFEu;
    else
      v3->m_uFlags |= 1u;
  }
  v4 = v2->m_spTopPlane.m_pObject;
  if ( v4 )
  {
    if ( !b )
    {
      v4->m_uFlags |= 1u;
      SkillIcon::ShowSkillPowerBar(v2, 0);
      return;
    }
    v4->m_uFlags &= 0xFFFEu;
  }
  SkillIcon::ShowSkillPowerBar(v2, b);
}

//----- (005BBD10) --------------------------------------------------------
bool __thiscall SkillIcon::GraySkillTexture(SkillIcon *this, NiTexture *pkGrayTexture, NiD3DPass *pkD3DPass)
{
  NiTexturingProperty::Map *v3; // eax@1
  NiTexture *v4; // edi@2
  NiD3DTextureStage *v5; // ebx@4
  NiTexture *v6; // esi@4
  NiD3DTextureStage *v7; // edi@11
  NiTexture *v8; // esi@11
  NiTexturePalette *v9; // esi@18
  const char *v10; // eax@20
  NiAVObject *v11; // esi@21
  NiNode *v12; // esi@22
  NiD3DTextureStage *v13; // eax@25
  NiD3DTextureStage *v14; // eax@28
  SkillIcon *v16; // [sp+24h] [bp-1Ch]@1
  NiPointer<NiNode> spNode; // [sp+28h] [bp-18h]@18
  NiPointer<NiD3DTextureStage> spStage2; // [sp+2Ch] [bp-14h]@11
  NiPointer<NiD3DTextureStage> spStage; // [sp+30h] [bp-10h]@4
  int v20; // [sp+3Ch] [bp-4h]@4

  v16 = this;
  v3 = *this->m_spTexProp.m_pObject->m_kMaps.m_pBase;
  if ( v3 )
    v4 = v3->m_spTexture.m_pObject;
  else
    v4 = 0;
  NiD3DTextureStage::CreateNewStage(&spStage);
  spStage.m_pObject->m_uiStage = 0;
  v5 = spStage.m_pObject;
  v6 = spStage.m_pObject->m_spTexture.m_pObject;
  v20 = 0;
  if ( v6 != v4 )
  {
    if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v5->m_spTexture.m_pObject = v4;
    if ( v4 )
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  }
  NiD3DTextureStageGroup::SetStageState(spStage.m_pObject->m_pkTextureStageGroup, 2u, 2u, 0);
  NiD3DTextureStageGroup::SetStageState(spStage.m_pObject->m_pkTextureStageGroup, 1u, 2u, 0);
  NiD3DTextureStage::CreateNewStage(&spStage2);
  spStage2.m_pObject->m_uiStage = 1;
  v7 = spStage2.m_pObject;
  v8 = spStage2.m_pObject->m_spTexture.m_pObject;
  LOBYTE(v20) = 1;
  if ( v8 != pkGrayTexture )
  {
    if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v7->m_spTexture.m_pObject = pkGrayTexture;
    if ( pkGrayTexture )
      InterlockedIncrement((volatile LONG *)&pkGrayTexture->m_uiRefCount);
  }
  NiD3DTextureStageGroup::SetStageState(spStage.m_pObject->m_pkTextureStageGroup, 2u, 2u, 0);
  NiD3DTextureStageGroup::SetStageState(spStage.m_pObject->m_pkTextureStageGroup, 3u, 1u, 0);
  NiD3DTextureStageGroup::SetStageState(spStage.m_pObject->m_pkTextureStageGroup, 1u, 4u, 0);
  spNode.m_pObject = 0;
  v9 = pTexturePalette;
  LOBYTE(v20) = 2;
  if ( !Folder::m_bInit )
    Folder::Init();
  v10 = Folder::Merge(&Folder::m_acMenu, "Game\\IconMaterial.nif");
  PgUtil::LoadNodeNifFile(v10, &spNode, v9);
  if ( spNode.m_pObject )
  {
    v11 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Plane01");
    NiAVObject::UpdateProperties(v11);
    NiAVObject::Update(v11, 0.0, 1);
    NiAVObject::UpdateProperties((NiAVObject *)&v16->vfptr);
    NiAVObject::Update((NiAVObject *)&v16->vfptr, 0.0, 1);
    LOBYTE(v20) = 1;
    if ( spNode.m_pObject )
    {
      v12 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v12 )
          v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
      }
    }
  }
  v13 = spStage2.m_pObject;
  LOBYTE(v20) = 0;
  if ( spStage2.m_pObject )
  {
    --spStage2.m_pObject->m_uiRefCount;
    if ( !v13->m_uiRefCount )
      NiD3DTextureStage::ReturnStageToPool(v13);
  }
  v14 = spStage.m_pObject;
  v20 = -1;
  if ( spStage.m_pObject )
  {
    --spStage.m_pObject->m_uiRefCount;
    if ( !v14->m_uiRefCount )
      NiD3DTextureStage::ReturnStageToPool(v14);
  }
  return 0;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005BBF60) --------------------------------------------------------
void __thiscall SkillIcon::~SkillIcon(SkillIcon *this)
{
  SkillIcon *v1; // edi@1
  NiTListItem<NiD3DShaderInterface *> *v2; // eax@1
  NiD3DShaderInterface **v3; // ecx@2
  NiTListItem<NiD3DShaderInterface *> *v4; // edx@2
  NiScreenElements *v5; // esi@7
  NiScreenElements *v6; // esi@11
  void *kPos; // [sp+14h] [bp-10h]@5
  int v8; // [sp+20h] [bp-4h]@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&SkillIcon::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SkillIcon::`vftable'{for `IDirectMessenger'};
  v2 = SkillIcon::ms_kSkillIconList.m_pkHead;
  v8 = 2;
  if ( SkillIcon::ms_kSkillIconList.m_pkHead )
  {
    while ( 1 )
    {
      v3 = &v2->m_element;
      v4 = v2;
      v2 = v2->m_pkNext;
      if ( (NiD3DShaderInterface *)v1 == *v3 )
        break;
      if ( !v2 )
        goto LABEL_4;
    }
  }
  else
  {
LABEL_4:
    v4 = 0;
  }
  kPos = v4;
  if ( v4 )
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(&SkillIcon::ms_kSkillIconList, &kPos);
  v5 = v1->m_spTopPlane.m_pObject;
  LOBYTE(v8) = 1;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  v6 = v1->m_spBackPlane.m_pObject;
  LOBYTE(v8) = 0;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  v8 = -1;
  IconWin::~IconWin((IconWin *)&v1->vfptr);
}
// 9AAEC4: using guessed type void (__thiscall *SkillIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AAEE4: using guessed type int (__thiscall *SkillIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (005BC050) --------------------------------------------------------
char __thiscall SkillIcon::Create(SkillIcon *this, int iXPos, int iYPos, PgWin *pkParent)
{
  SkillIcon *v4; // esi@1
  char result; // al@1
  NiSourceTexture *v6; // eax@2
  NiSourceTexture *v7; // edi@2
  PgWinBar *v8; // eax@4
  PgWinBar *v9; // ecx@4
  NiTListItem<NiD3DShaderInterface *> *v10; // eax@4

  v4 = this;
  result = PgWinLRBut::Create((PgWinLRBut *)&this->vfptr, iXPos, iYPos, 0x20u, 0x20u, pkParent, 0, 0);
  if ( result )
  {
    v6 = MenuTexMgr::GetTexture(7u);
    v7 = v6;
    if ( v6 )
    {
      v4->m_apkSkillPowerBar[0] = PgWinBar::CreateWin(
                                    0,
                                    0,
                                    v6,
                                    0,
                                    0,
                                    0,
                                    0x10u,
                                    4u,
                                    (PgWin *)&v4->vfptr,
                                    BGT_RIGHT,
                                    0,
                                    0);
      v4->m_apkSkillPowerBar[1] = PgWinBar::CreateWin(
                                    28,
                                    0,
                                    v7,
                                    0,
                                    0x10u,
                                    0,
                                    4u,
                                    0x10u,
                                    (PgWin *)&v4->vfptr,
                                    BGT_BOTTOM,
                                    0,
                                    0);
      v4->m_apkSkillPowerBar[2] = PgWinBar::CreateWin(
                                    0,
                                    16,
                                    v7,
                                    0,
                                    0x14u,
                                    0,
                                    4u,
                                    0x10u,
                                    (PgWin *)&v4->vfptr,
                                    BGT_TOP,
                                    0,
                                    0);
      v8 = PgWinBar::CreateWin(16, 28, v7, 0, 0, 4u, 0x10u, 4u, (PgWin *)&v4->vfptr, 0, 0, 0);
      v9 = v4->m_apkSkillPowerBar[0];
      v4->m_apkSkillPowerBar[3] = v8;
      PgWinBar::SetValue(v9, 1.0, 0.0);
      PgWinBar::SetValue(v4->m_apkSkillPowerBar[1], 1.0, 0.0);
      PgWinBar::SetValue(v4->m_apkSkillPowerBar[2], 1.0, 0.0);
      PgWinBar::SetValue(v4->m_apkSkillPowerBar[3], 1.0, 0.0);
      ((void (__stdcall *)(_DWORD))v4->m_apkSkillPowerBar[0]->vfptr[60].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v4->m_apkSkillPowerBar[1]->vfptr[60].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v4->m_apkSkillPowerBar[2]->vfptr[60].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v4->m_apkSkillPowerBar[3]->vfptr[60].__vecDelDtor)(0);
      v10 = SkillIcon::ms_kSkillIconList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&SkillIcon::ms_kSkillIconList);
      v10->m_element = (NiD3DShaderInterface *)v4;
      v10->m_pkNext = 0;
      v10->m_pkPrev = SkillIcon::ms_kSkillIconList.m_pkTail;
      if ( SkillIcon::ms_kSkillIconList.m_pkTail )
      {
        SkillIcon::ms_kSkillIconList.m_pkTail->m_pkNext = v10;
        ++SkillIcon::ms_kSkillIconList.m_kAllocator.m_uiCount;
        SkillIcon::ms_kSkillIconList.m_pkTail = v10;
        result = 1;
      }
      else
      {
        ++SkillIcon::ms_kSkillIconList.m_kAllocator.m_uiCount;
        SkillIcon::ms_kSkillIconList.m_pkHead = v10;
        SkillIcon::ms_kSkillIconList.m_pkTail = v10;
        result = 1;
      }
    }
    else
    {
      result = 0;
    }
  }
  return result;
}

//----- (005BC230) --------------------------------------------------------
void __thiscall SkillIcon::SetEmpowerInfo(SkillIcon *this, Skill::EmpowerInfo kInfo)
{
  char v2; // dh@1
  SkillIcon *v3; // esi@1
  PgWinBar *v4; // ecx@1
  double v5; // st7@1
  double v6; // st7@3
  PgWinBar *v7; // ecx@4
  double v8; // st6@6
  double v9; // st7@6
  PgWinBar *v10; // ecx@7
  double v11; // st6@9
  double v12; // st7@9
  PgWinBar *v13; // ecx@10
  double v14; // st6@12
  double v15; // st7@12
  float v16; // [sp+4h] [bp-4h]@1
  float v17; // [sp+4h] [bp-4h]@4
  float v18; // [sp+4h] [bp-4h]@7
  float v19; // [sp+4h] [bp-4h]@10

  v2 = kInfo.cSmallSp;
  v3 = this;
  this->m_kEmpowerInfo.cLongKeepTime = *(unsigned int *)&kInfo >> 16;
  this->m_kEmpowerInfo.cSmallSp = kInfo.cSmallSp;
  this->m_kEmpowerInfo.cDamageUp = kInfo.cDamageUp;
  this->m_kEmpowerInfo.cShortCoolTime = kInfo.cShortCoolTime;
  v4 = this->m_apkSkillPowerBar[0];
  v16 = (double)(kInfo.cDamageUp != 0) + (double)kInfo.cDamageUp * 3.0;
  v5 = 16.0;
  if ( 16.0 != v4->m_fMaxValue || v16 != v4->m_fCurValue )
  {
    v6 = v16;
    v4->m_fMaxValue = 16.0;
    v4->m_fCurValue = *(float *)&v6;
    PgWinBar::OnChangeValue(v4);
    v2 = kInfo.cSmallSp;
    v5 = 16.0;
  }
  v7 = v3->m_apkSkillPowerBar[1];
  v17 = (double)(v2 != 0) + (double)v2 * 3.0;
  if ( v5 != v7->m_fMaxValue || v17 != v7->m_fCurValue )
  {
    v8 = v5;
    v9 = v17;
    v7->m_fMaxValue = v8;
    v7->m_fCurValue = *(float *)&v9;
    PgWinBar::OnChangeValue(v7);
    v5 = 16.0;
  }
  v10 = v3->m_apkSkillPowerBar[2];
  v18 = (double)(kInfo.cLongKeepTime != 0) + (double)kInfo.cLongKeepTime * 3.0;
  if ( v5 != v10->m_fMaxValue || v18 != v10->m_fCurValue )
  {
    v11 = v5;
    v12 = v18;
    v10->m_fMaxValue = v11;
    v10->m_fCurValue = *(float *)&v12;
    PgWinBar::OnChangeValue(v10);
    v5 = 16.0;
  }
  v13 = v3->m_apkSkillPowerBar[3];
  v19 = (double)(kInfo.cShortCoolTime != 0) + (double)kInfo.cShortCoolTime * 3.0;
  if ( v5 != v13->m_fMaxValue || v19 != v13->m_fCurValue )
  {
    v14 = v5;
    v15 = v19;
    v13->m_fMaxValue = v14;
    v13->m_fCurValue = *(float *)&v15;
    PgWinBar::OnChangeValue(v13);
  }
}

//----- (005BC420) --------------------------------------------------------
void __thiscall SkillIcon::RefreshSkillInfo(SkillIcon *this)
{
  SkillIcon *v1; // esi@1
  Skill::EmpowerInfo kInfo; // [sp+4h] [bp-4h]@1

  v1 = this;
  Skill::GetAccumulatedEmpowerInfo(&kInfo, this->m_kSkillID);
  SkillIcon::SetEmpowerInfo(v1, kInfo);
}

//----- (005BC450) --------------------------------------------------------
void __cdecl SkillIcon::RefreshSkillInfoAll()
{
  NiTListItem<NiD3DShaderInterface *> *v0; // esi@1
  SkillIcon *v1; // edi@2
  Skill::EmpowerInfo result; // [sp+4h] [bp-4h]@2

  v0 = SkillIcon::ms_kSkillIconList.m_pkHead;
  if ( SkillIcon::ms_kSkillIconList.m_pkHead )
  {
    do
    {
      v1 = (SkillIcon *)v0->m_element;
      v0 = v0->m_pkNext;
      Skill::GetAccumulatedEmpowerInfo(&result, v1->m_kSkillID);
      SkillIcon::SetEmpowerInfo(v1, result);
    }
    while ( v0 );
  }
}

//----- (005BC4A0) --------------------------------------------------------
void __thiscall SkillIcon::SkillIcon(SkillIcon *this)
{
  SkillIcon *v1; // esi@1
  NiScreenElements *v2; // edi@1
  NiScreenElementsData *v3; // eax@2
  NiScreenElementsData *v4; // eax@3
  int v5; // eax@3
  NiScreenElements *v6; // edi@6
  NiScreenElements *v7; // eax@14
  NiObjectNET *v8; // eax@14
  float v9; // edi@14
  NiObjectNET *v10; // eax@19
  float v11; // edi@19
  NiProperty *v12; // eax@24
  NiTexturePalette *v13; // edi@24
  const char *v14; // eax@26
  NiAVObject *v15; // eax@27
  NiProperty *v16; // eax@27
  NiObjectNET *v17; // eax@29
  NiPointer<NiAlphaProperty> v18; // edi@29
  NiAVObject *v19; // ecx@34
  NiScreenElements *v20; // edi@36
  NiScreenElementsData *v21; // eax@37
  NiScreenElementsData *v22; // eax@38
  int v23; // eax@38
  NiScreenElements *v24; // edi@41
  NiScreenElements *v25; // eax@49
  NiObjectNET *v26; // eax@49
  NiObjectNET *v27; // edi@49
  NiAVObject *v28; // ecx@52
  NiObjectNET *v29; // eax@52
  NiObjectNET *v30; // edi@52
  NiProperty *v31; // eax@53
  NiAVObject *v32; // ecx@55
  NiNode *v33; // edi@56
  NiColorA kCommonValue; // [sp+38h] [bp-3Ch]@14
  void *v35; // [sp+48h] [bp-2Ch]@37
  SkillIcon *v36; // [sp+4Ch] [bp-28h]@1
  NiPointer<NiAlphaProperty> spAlphaProp; // [sp+50h] [bp-24h]@1
  float green; // [sp+54h] [bp-20h]@2
  float rad; // [sp+58h] [bp-1Ch]@1
  NiPointer<NiNode> spNode; // [sp+5Ch] [bp-18h]@24
  float blue; // [sp+60h] [bp-14h]@1
  NiScreenElements *v42; // [sp+64h] [bp-10h]@3
  int v43; // [sp+70h] [bp-4h]@1

  v1 = this;
  v36 = this;
  IconWin::IconWin((IconWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&SkillIcon::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&SkillIcon::`vftable'{for `IDirectMessenger'};
  v43 = 0;
  v1->m_spBackPlane.m_pObject = 0;
  v1->m_spTopPlane.m_pObject = 0;
  v1->m_apkSkillPowerBar[0] = 0;
  v1->m_apkSkillPowerBar[1] = 0;
  v1->m_apkSkillPowerBar[2] = 0;
  v1->m_apkSkillPowerBar[3] = 0;
  v1->m_kSkillID = -1;
  v1->m_kEmpowerInfo = 0;
  rad = 0.0 / 255.0;
  blue = rad;
  *(float *)&v2 = COERCE_FLOAT(operator new(0xC4u));
  spAlphaProp.m_pObject = (NiAlphaProperty *)v2;
  LOBYTE(v43) = 3;
  if ( *(float *)&v2 == 0.0 )
  {
    v42 = 0;
    v5 = 0;
  }
  else
  {
    *(float *)&v3 = COERCE_FLOAT(operator new(0x70u));
    green = *(float *)&v3;
    LOBYTE(v43) = 4;
    if ( *(float *)&v3 == 0.0 )
    {
      LOBYTE(v43) = 3;
      NiScreenElements::NiScreenElements(v2, 0);
      v42 = (NiScreenElements *)v5;
    }
    else
    {
      NiScreenElementsData::NiScreenElementsData(v3, 0, 1, 0, 1, 1, 4, 1, 2, 1);
      LOBYTE(v43) = 3;
      NiScreenElements::NiScreenElements(v2, v4);
      v42 = (NiScreenElements *)v5;
    }
  }
  v6 = v1->m_spBackPlane.m_pObject;
  LOBYTE(v43) = 2;
  if ( v6 != (NiScreenElements *)v5 )
  {
    if ( v6 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      v5 = (int)v42;
    }
    v1->m_spBackPlane.m_pObject = (NiScreenElements *)v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)(v5 + 4));
  }
  NiScreenElementsData::Insert((NiScreenElementsData *)v1->m_spBackPlane.m_pObject->m_spModelData.m_pObject, 4u, 0, 0);
  NiScreenElementsData::SetRectangle(
    (NiScreenElementsData *)v1->m_spBackPlane.m_pObject->m_spModelData.m_pObject,
    0,
    0.0,
    0.0,
    32.0,
    32.0);
  v7 = v1->m_spBackPlane.m_pObject;
  kCommonValue.r = 1.0;
  kCommonValue.g = 1.0;
  kCommonValue.b = blue;
  kCommonValue.a = 0.50196081;
  NiScreenElementsData::SetColors((NiScreenElementsData *)v7->m_spModelData.m_pObject, 0, &kCommonValue);
  *(float *)&v8 = COERCE_FLOAT(operator new(0x20u));
  v9 = *(float *)&v8;
  spAlphaProp.m_pObject = (NiAlphaProperty *)v8;
  LOBYTE(v43) = 5;
  if ( *(float *)&v8 == 0.0 )
  {
    v9 = 0.0;
  }
  else
  {
    NiObjectNET::NiObjectNET(v8);
    *(_DWORD *)LODWORD(v9) = &NiAlphaProperty::`vftable';
    *(_WORD *)(LODWORD(v9) + 28) = 236;
    *(_BYTE *)(LODWORD(v9) + 30) = 0;
  }
  *(_WORD *)(LODWORD(v9) + 28) |= 1u;
  v42 = v1->m_spBackPlane.m_pObject;
  blue = v9;
  InterlockedIncrement((volatile LONG *)(LODWORD(v9) + 4));
  LOBYTE(v43) = 6;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v42->m_kPropertyList,
    (NiPointer<NiRoom> *)&blue);
  LOBYTE(v43) = 2;
  if ( !InterlockedDecrement((volatile LONG *)(LODWORD(v9) + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))LODWORD(v9))(LODWORD(v9), 1);
  *(float *)&v10 = COERCE_FLOAT(operator new(0x28u));
  v11 = *(float *)&v10;
  spAlphaProp.m_pObject = (NiAlphaProperty *)v10;
  LOBYTE(v43) = 7;
  if ( *(float *)&v10 == 0.0 )
  {
    v11 = 0.0;
  }
  else
  {
    NiObjectNET::NiObjectNET(v10);
    *(_DWORD *)LODWORD(v11) = &NiVertexColorProperty::`vftable';
    *(_WORD *)(LODWORD(v11) + 28) = 0;
    *(_DWORD *)(LODWORD(v11) + 32) = 0;
    *(_DWORD *)(LODWORD(v11) + 36) = 1;
  }
  *(_DWORD *)(LODWORD(v11) + 32) = 1;
  *(_DWORD *)(LODWORD(v11) + 36) = 0;
  v42 = v1->m_spBackPlane.m_pObject;
  blue = v11;
  InterlockedIncrement((volatile LONG *)(LODWORD(v11) + 4));
  LOBYTE(v43) = 8;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v42->m_kPropertyList,
    (NiPointer<NiRoom> *)&blue);
  LOBYTE(v43) = 2;
  if ( !InterlockedDecrement((volatile LONG *)(LODWORD(v11) + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))LODWORD(v11))(LODWORD(v11), 1);
  NiScreenElementsData::UpdateBound((NiScreenElementsData *)v1->m_spBackPlane.m_pObject->m_spModelData.m_pObject);
  NiAVObject::UpdateProperties((NiAVObject *)&v1->m_spBackPlane.m_pObject->vfptr);
  NiAVObject::Update((NiAVObject *)&v1->m_spBackPlane.m_pObject->vfptr, 0.0, 1);
  NiNode::AttachChild((NiNode *)&v1->vfptr, (NiAVObject *)&v1->m_spBackPlane.m_pObject->vfptr, 0);
  NiAVObject::UpdateProperties((NiAVObject *)&v1->vfptr);
  NiAVObject::Update((NiAVObject *)&v1->vfptr, 0.0, 1);
  IconWin::CreateGeometry((IconWin *)&v1->vfptr, 0x20u, 0x20u);
  v12 = NiAVObject::GetProperty((NiAVObject *)&v1->m_spGeom.m_pObject->vfptr, 0);
  NiAVObject::DetachProperty((NiAVObject *)&v1->m_spGeom.m_pObject->vfptr, v12);
  spNode.m_pObject = 0;
  v13 = pTexturePalette;
  LOBYTE(v43) = 9;
  if ( !Folder::m_bInit )
    Folder::Init();
  v14 = Folder::Merge(&Folder::m_acMenu, "Game\\IconMaterial.nif");
  PgUtil::LoadNodeNifFile(v14, &spNode, v13);
  if ( spNode.m_pObject )
  {
    v15 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Plane01");
    v16 = NiAVObject::GetProperty(v15, 0);
    if ( v16 )
    {
      NiAVObject::AttachProperty((NiAVObject *)&v1->m_spGeom.m_pObject->vfptr, v16);
    }
    else
    {
      *(float *)&v17 = COERCE_FLOAT(operator new(0x20u));
      v18.m_pObject = (NiAlphaProperty *)v17;
      spAlphaProp.m_pObject = (NiAlphaProperty *)v17;
      LOBYTE(v43) = 10;
      if ( *(float *)&v17 == 0.0 )
      {
        *(float *)&v18.m_pObject = 0.0;
      }
      else
      {
        NiObjectNET::NiObjectNET(v17);
        v18.m_pObject->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
        v18.m_pObject->m_uFlags = 236;
        v18.m_pObject->m_ucAlphaTestRef = 0;
      }
      spAlphaProp.m_pObject = v18.m_pObject;
      if ( *(float *)&v18.m_pObject != 0.0 )
        InterlockedIncrement((volatile LONG *)&v18.m_pObject->m_uiRefCount);
      v18.m_pObject->m_uFlags |= 1u;
      v19 = (NiAVObject *)&v1->m_spGeom.m_pObject->vfptr;
      LOBYTE(v43) = 11;
      NiAVObject::AttachProperty(v19, (NiProperty *)&v18.m_pObject->vfptr);
      LOBYTE(v43) = 9;
      if ( !InterlockedDecrement((volatile LONG *)&v18.m_pObject->m_uiRefCount) )
        v18.m_pObject->vfptr->__vecDelDtor((NiRefObject *)v18.m_pObject, 1u);
    }
    green = rad;
    blue = rad;
    *(float *)&spAlphaProp.m_pObject = rad;
    v20 = (NiScreenElements *)operator new(0xC4u);
    v42 = v20;
    LOBYTE(v43) = 12;
    if ( v20 )
    {
      v21 = (NiScreenElementsData *)operator new(0x70u);
      v35 = v21;
      LOBYTE(v43) = 13;
      if ( v21 )
      {
        NiScreenElementsData::NiScreenElementsData(v21, 0, 1, 0, 1, 1, 4, 1, 2, 1);
        LOBYTE(v43) = 12;
        NiScreenElements::NiScreenElements(v20, v22);
        v42 = (NiScreenElements *)v23;
      }
      else
      {
        LOBYTE(v43) = 12;
        NiScreenElements::NiScreenElements(v20, 0);
        v42 = (NiScreenElements *)v23;
      }
    }
    else
    {
      v42 = 0;
      v23 = 0;
    }
    v24 = v1->m_spTopPlane.m_pObject;
    LOBYTE(v43) = 9;
    if ( v24 != (NiScreenElements *)v23 )
    {
      if ( v24 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v24->m_uiRefCount) && v24 )
          v24->vfptr->__vecDelDtor((NiRefObject *)v24, 1u);
        v23 = (int)v42;
      }
      v1->m_spTopPlane.m_pObject = (NiScreenElements *)v23;
      if ( v23 )
        InterlockedIncrement((volatile LONG *)(v23 + 4));
    }
    NiScreenElementsData::Insert((NiScreenElementsData *)v1->m_spTopPlane.m_pObject->m_spModelData.m_pObject, 4u, 0, 0);
    NiScreenElementsData::SetRectangle(
      (NiScreenElementsData *)v1->m_spTopPlane.m_pObject->m_spModelData.m_pObject,
      0,
      0.0,
      0.0,
      32.0,
      32.0);
    v25 = v1->m_spTopPlane.m_pObject;
    kCommonValue.r = rad;
    kCommonValue.g = green;
    kCommonValue.b = blue;
    kCommonValue.a = *(float *)&spAlphaProp.m_pObject;
    NiScreenElementsData::SetColors((NiScreenElementsData *)v25->m_spModelData.m_pObject, 0, &kCommonValue);
    v26 = (NiObjectNET *)operator new(0x20u);
    v27 = v26;
    v35 = v26;
    LOBYTE(v43) = 14;
    if ( v26 )
    {
      NiObjectNET::NiObjectNET(v26);
      v27->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
      LOWORD(v27[1].vfptr) = 236;
      BYTE2(v27[1].vfptr) = 0;
    }
    else
    {
      v27 = 0;
    }
    LOWORD(v27[1].vfptr) |= 1u;
    v28 = (NiAVObject *)&v1->m_spTopPlane.m_pObject->vfptr;
    LOBYTE(v43) = 9;
    NiAVObject::AttachProperty(v28, (NiProperty *)v27);
    v29 = (NiObjectNET *)operator new(0x28u);
    v30 = v29;
    v35 = v29;
    LOBYTE(v43) = 15;
    if ( v29 )
    {
      NiObjectNET::NiObjectNET(v29);
      LOWORD(v30[1].vfptr) = 0;
      v30->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
      v30[1].m_uiRefCount = 0;
      v30[1].m_pcName = (char *)1;
      v31 = (NiProperty *)v30;
    }
    else
    {
      v31 = 0;
    }
    v31[1].m_uiRefCount = 1;
    v31[1].m_pcName = 0;
    v32 = (NiAVObject *)&v1->m_spTopPlane.m_pObject->vfptr;
    LOBYTE(v43) = 9;
    NiAVObject::AttachProperty(v32, v31);
    NiScreenElementsData::UpdateBound((NiScreenElementsData *)v1->m_spTopPlane.m_pObject->m_spModelData.m_pObject);
    NiAVObject::UpdateProperties((NiAVObject *)&v1->m_spTopPlane.m_pObject->vfptr);
    NiAVObject::Update((NiAVObject *)&v1->m_spTopPlane.m_pObject->vfptr, 0.0, 1);
    NiNode::AttachChild((NiNode *)&v1->vfptr, (NiAVObject *)&v1->m_spTopPlane.m_pObject->vfptr, 0);
    NiAVObject::UpdateProperties((NiAVObject *)&v1->vfptr);
    NiAVObject::Update((NiAVObject *)&v1->vfptr, 0.0, 1);
    LOBYTE(v43) = 2;
    if ( spNode.m_pObject )
    {
      v33 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v33 )
          v33->vfptr->__vecDelDtor((NiRefObject *)v33, 1u);
      }
    }
  }
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);
// 9AAEC4: using guessed type void (__thiscall *SkillIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AAEE4: using guessed type int (__thiscall *SkillIcon::`vftable'{for `NiNode'})(void *p, char);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005BCB20) --------------------------------------------------------
void __thiscall SkillIcon::UsingSkillAlphaProperty(SkillIcon *this)
{
  SkillIcon *v1; // edi@1
  NiProperty *v2; // eax@1
  NiTexturePalette *v3; // esi@1
  const char *v4; // eax@3
  NiAVObject *v5; // eax@4
  NiProperty *v6; // eax@4
  NiObjectNET *v7; // eax@6
  NiObjectNET *v8; // esi@6
  NiAVObject *v9; // ecx@11
  NiNode *v10; // esi@14
  NiPointer<NiNode> spNode; // [sp+24h] [bp-10h]@1
  int v12; // [sp+30h] [bp-4h]@1

  v1 = this;
  v2 = NiAVObject::GetProperty((NiAVObject *)&this->m_spGeom.m_pObject->vfptr, 0);
  NiAVObject::DetachProperty((NiAVObject *)&v1->m_spGeom.m_pObject->vfptr, v2);
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v12 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\IconMaterial.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( spNode.m_pObject )
  {
    v5 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Plane01");
    v6 = NiAVObject::GetProperty(v5, 0);
    if ( v6 )
    {
      NiAVObject::AttachProperty((NiAVObject *)&v1->m_spGeom.m_pObject->vfptr, v6);
    }
    else
    {
      v7 = (NiObjectNET *)operator new(0x20u);
      v8 = v7;
      LOBYTE(v12) = 1;
      if ( v7 )
      {
        NiObjectNET::NiObjectNET(v7);
        v8->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
        LOWORD(v8[1].vfptr) = 236;
        BYTE2(v8[1].vfptr) = 0;
      }
      else
      {
        v8 = 0;
      }
      if ( v8 )
        InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
      LOWORD(v8[1].vfptr) |= 1u;
      v9 = (NiAVObject *)&v1->m_spGeom.m_pObject->vfptr;
      LOBYTE(v12) = 2;
      NiAVObject::AttachProperty(v9, (NiProperty *)v8);
      LOBYTE(v12) = 0;
      if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
        v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    }
    NiAVObject::UpdateProperties((NiAVObject *)&v1->vfptr);
    NiAVObject::Update((NiAVObject *)&v1->vfptr, 0.0, 1);
    v12 = -1;
    if ( spNode.m_pObject )
    {
      v10 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v10 )
          v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
      }
    }
  }
}
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005BCCA0) --------------------------------------------------------
void __thiscall SkillIcon::UsingItemAlphaProperty(SkillIcon *this)
{
  SkillIcon *v1; // edi@1
  NiProperty *v2; // eax@1
  NiObjectNET *v3; // eax@1
  NiObjectNET *v4; // esi@1
  NiScreenElements *v5; // ST1C_4@4
  NiPointer<NiRoom> element; // [sp+20h] [bp-10h]@4
  int v7; // [sp+2Ch] [bp-4h]@1

  v1 = this;
  v2 = NiAVObject::GetProperty((NiAVObject *)&this->m_spGeom.m_pObject->vfptr, 0);
  NiAVObject::DetachProperty((NiAVObject *)&v1->m_spGeom.m_pObject->vfptr, v2);
  v3 = (NiObjectNET *)operator new(0x20u);
  v4 = v3;
  v7 = 0;
  if ( v3 )
  {
    NiObjectNET::NiObjectNET(v3);
    v4->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
    LOWORD(v4[1].vfptr) = 236;
    BYTE2(v4[1].vfptr) = 0;
  }
  else
  {
    v4 = 0;
  }
  LOWORD(v4[1].vfptr) |= 1u;
  v5 = v1->m_spGeom.m_pObject;
  element.m_pObject = (NiRoom *)v4;
  InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v7 = 1;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v5->m_kPropertyList,
    &element);
  v7 = -1;
  if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  NiAVObject::UpdateProperties((NiAVObject *)&v1->vfptr);
  NiAVObject::Update((NiAVObject *)&v1->vfptr, 0.0, 1);
}
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);

//----- (005BCD90) --------------------------------------------------------
void __thiscall SkillIcon::SetSkill(SkillIcon *this, unsigned __int16 kSkillID)
{
  int v2; // ebx@1
  SkillIcon *v3; // esi@1
  void *(__thiscall *v4)(NiRefObject *, unsigned int); // eax@2
  int v5; // edi@3
  int *v6; // eax@5
  int v7; // edi@6
  float v8; // ST0C_4@7
  float green; // ST08_4@7
  float rad; // ST04_4@7
  float v11; // ST08_4@7
  NiSourceTexture *v12; // eax@7
  void *(__thiscall *v13)(NiRefObject *, unsigned int); // eax@7

  v2 = kSkillID;
  v3 = this;
  this->m_kSkillID = kSkillID;
  if ( (_WORD)v2 == -1 )
  {
    ((void (__stdcall *)(_DWORD, signed int, signed int, signed int))this->vfptr[146].__vecDelDtor)(0, -1, 32, 32);
    v4 = v3->vfptr[60].__vecDelDtor;
    v3->m_uFlags |= 1u;
    v4((NiRefObject *)&v3->vfptr, 0);
  }
  else
  {
    v5 = ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable
                                                          + 16))(
                            ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable,
                            v2) )
    {
      if ( (unsigned __int16)v2 <= *(_WORD *)(v5 + 200) )
      {
        v6 = (int *)(*(_DWORD *)(v5 + 196) + 4 * (unsigned __int16)v2);
        if ( *v6 )
        {
          v7 = *v6;
          if ( *v6 )
          {
            rad = (double)*(unsigned int *)(v7 + 75);
            green = (double)*(unsigned int *)(v7 + 79);
            v8 = (double)*(unsigned int *)(v7 + 83);
            SkillIcon::SetBackPlaneColor(v3, rad, green, v8, 255.0);
            v11 = *(float *)(v7 + 39);
            *(_DWORD *)&kSkillID = v3->vfptr;
            v12 = IconMgr::GetTexture((char *)(v7 + 43));
            (*(void (__thiscall **)(SkillIcon *, NiSourceTexture *, _DWORD, signed int, signed int))(kSkillID + 584))(
              v3,
              v12,
              LODWORD(v11),
              32,
              32);
            v13 = v3->vfptr[60].__vecDelDtor;
            v3->m_uFlags &= 0xFFFEu;
            v13((NiRefObject *)&v3->vfptr, 1u);
            if ( (unsigned __int16)v2 < 0x4E20u )
            {
              SkillIcon::UsingSkillAlphaProperty(v3);
              v3->m_spBackPlane.m_pObject->m_uFlags &= 0xFFFEu;
              v3->m_spTopPlane.m_pObject->m_uFlags &= 0xFFFEu;
              Skill::GetAccumulatedEmpowerInfo((Skill::EmpowerInfo *)&kSkillID, v2);
              SkillIcon::SetEmpowerInfo(v3, (Skill::EmpowerInfo)kSkillID);
            }
            else
            {
              v3->m_spBackPlane.m_pObject->m_uFlags |= 1u;
              v3->m_spTopPlane.m_pObject->m_uFlags |= 1u;
              SkillIcon::UsingItemAlphaProperty(v3);
            }
          }
        }
      }
    }
  }
}
// A8CAA0: using guessed type int ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable;

//----- (005BCF20) --------------------------------------------------------
SkillIcon *__cdecl SkillIcon::CreateWin(int iXPos, int iYPos, PgWin *pkParent)
{
  PgWin *v3; // eax@1
  PgWin *v4; // eax@2
  PgWin *v5; // esi@2
  PgWin *v6; // edi@8
  SkillIcon *v7; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x19Cu);
  result.m_pObject = v3;
  v9 = 0;
  if ( v3 )
  {
    SkillIcon::SkillIcon((SkillIcon *)v3);
    v5 = v4;
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v9 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v5);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgWin *))v5->vfptr[152].__vecDelDtor)(
                          v5,
                          iXPos,
                          iYPos,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v5->vfptr[89].__vecDelDtor)(v5);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = (SkillIcon *)v5;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v5);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = 0;
  }
  return v7;
}

//----- (005BD060) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<SkillIcon *>,SkillIcon *>::~NiTListBase<DFALL<SkillIcon *>,SkillIcon *>(NiTListBase<DFALL<SkillIcon *>,SkillIcon *> *this)
{
  this->vfptr = (NiTListBase<DFALL<SkillIcon *>,SkillIcon *>Vtbl *)&NiTListBase<DFALL<SkillIcon *>,SkillIcon *>::`vftable';
}
// 9AAE94: using guessed type int (__thiscall *NiTListBase<DFALL<SkillIcon *>,SkillIcon *>::`vftable')(void *p, char);

//----- (005BD070) --------------------------------------------------------
NiTListBase<DFALL<SkillIcon *>,SkillIcon *> *__thiscall NiTListBase<DFALL<SkillIcon *>,SkillIcon *>::`vector deleting destructor'(NiTListBase<DFALL<SkillIcon *>,SkillIcon *> *this, unsigned int a2)
{
  NiTListBase<DFALL<SkillIcon *>,SkillIcon *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<SkillIcon *>,SkillIcon *>Vtbl *)&NiTListBase<DFALL<SkillIcon *>,SkillIcon *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9AAE94: using guessed type int (__thiscall *NiTListBase<DFALL<SkillIcon *>,SkillIcon *>::`vftable')(void *p, char);

//----- (005BD0A0) --------------------------------------------------------
NiTPointerListBase<DFALL<SkillIcon *>,SkillIcon *> *__thiscall NiTPointerListBase<DFALL<SkillIcon *>,SkillIcon *>::`vector deleting destructor'(NiTPointerListBase<DFALL<SkillIcon *>,SkillIcon *> *this, unsigned int a2)
{
  NiTPointerListBase<DFALL<SkillIcon *>,SkillIcon *> *v2; // edi@1
  NiTListItem<SkillIcon *> *v3; // esi@1
  NiTListItem<SkillIcon *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<SkillIcon *>,SkillIcon *>Vtbl *)&NiTPointerListBase<DFALL<SkillIcon *>,SkillIcon *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<DFALL<SkillIcon *>,SkillIcon *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<SkillIcon *>,SkillIcon *>Vtbl *)&NiTListBase<DFALL<SkillIcon *>,SkillIcon *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9AAE94: using guessed type int (__thiscall *NiTListBase<DFALL<SkillIcon *>,SkillIcon *>::`vftable')(void *p, char);
// 9AAEA4: using guessed type int (__thiscall *NiTPointerListBase<DFALL<SkillIcon *>,SkillIcon *>::`vftable')(void *p, char);

//----- (005BD130) --------------------------------------------------------
SkillIcon *__thiscall SkillIcon::`scalar deleting destructor'(SkillIcon *this, unsigned int a2)
{
  SkillIcon *v2; // esi@1

  v2 = this;
  SkillIcon::~SkillIcon(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005BD160) --------------------------------------------------------
void __thiscall GuildCombatPropensityChangeWin::SetTitle(GuildCombatPropensityChangeWin *this, const char *pkTitle)
{
  ((void (__stdcall *)(_DWORD))this->m_pTitleWin->vfptr[118].__vecDelDtor)(pkTitle);
}

//----- (005BD180) --------------------------------------------------------
void __thiscall GuildCombatPropensityChangeWin::OnCmdCancel(GuildCombatPropensityChangeWin *this)
{
  PgWin::PostMsg((PgWin *)&this->vfptr, 2u, 0, 0);
}

//----- (005BD190) --------------------------------------------------------
void __thiscall GuildCombatPropensityChangeWin::SetTextMsg(GuildCombatPropensityChangeWin *this, const char *pkMainMessage, const char *pkOkMessage, const char *pkCancelMessage)
{
  GuildCombatPropensityChangeWin *v4; // esi@1

  v4 = this;
  ((void (__stdcall *)(_DWORD))this->m_pMainWin->vfptr[118].__vecDelDtor)(pkMainMessage);
  ((void (__stdcall *)(_DWORD))v4->m_pOKWin->vfptr[118].__vecDelDtor)(pkOkMessage);
  ((void (__stdcall *)(_DWORD))v4->m_pCancelWin->vfptr[118].__vecDelDtor)(pkCancelMessage);
}

//----- (005BD1E0) --------------------------------------------------------
void GuildCombatPropensityChangeWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "GuildChangeAttribute");
}

//----- (005BD210) --------------------------------------------------------
void __thiscall GuildCombatPropensityChangeWin::CheckButtonUpdate(GuildCombatPropensityChangeWin *this, int nIndex)
{
  ColumnBut *v2; // eax@1

  this->m_nChoice = nIndex;
  v2 = this->m_RadoiButLeft;
  if ( nIndex == 1 )
  {
    v2->m_bCheck = 1;
    this->m_RadoiButRight->m_bCheck = 0;
  }
  else
  {
    v2->m_bCheck = 0;
    this->m_RadoiButRight->m_bCheck = 1;
  }
}

//----- (005BD260) --------------------------------------------------------
void __thiscall GuildCombatPropensityChangeWin::~GuildCombatPropensityChangeWin(GuildCombatPropensityChangeWin *this)
{
  GuildCombatPropensityChangeWin *v1; // esi@1
  PgWinBut *v2; // edi@1
  PgWinBut *v3; // edi@6
  PgWinBut *v4; // edi@11
  PgWinBut *v5; // edi@18
  PgWinBut *v6; // edi@22
  PgWinBut *v7; // edi@26

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildCombatPropensityChangeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildCombatPropensityChangeWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spQuitButton.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spQuitButton.m_pObject = 0;
  }
  v3 = v1->m_spOKButton.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spOKButton.m_pObject = 0;
  }
  v4 = v1->m_spCancleButton.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spCancleButton.m_pObject = 0;
  }
  if ( v1->m_OKButtonMsgFunc.manager )
    v1->m_OKButtonMsgFunc.functor.obj_ptr = (void *)((int (__cdecl *)(_DWORD, _DWORD))v1->m_OKButtonMsgFunc.manager)(
                                                      v1->m_OKButtonMsgFunc.functor.obj_ptr,
                                                      1);
  v1->m_OKButtonMsgFunc.manager = 0;
  v1->m_OKButtonMsgFunc.invoker = 0;
  v5 = v1->m_spCancleButton.m_pObject;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  v6 = v1->m_spOKButton.m_pObject;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  v7 = v1->m_spQuitButton.m_pObject;
  if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9AB268: using guessed type void (__thiscall *GuildCombatPropensityChangeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AB284: using guessed type int (__thiscall *GuildCombatPropensityChangeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005BD400) --------------------------------------------------------
char __thiscall GuildCombatPropensityChangeWin::Create(GuildCombatPropensityChangeWin *this)
{
  GuildCombatPropensityChangeWin *v1; // esi@1
  NiTexturePalette *v2; // edi@1
  const char *v3; // eax@3
  PgSprData *v4; // eax@4
  NiNode *v5; // esi@5
  NiSourceTexture *v7; // eax@10
  PgSprData *v8; // eax@11
  D3DXCOLOR v9; // ST14_16@13
  PgWinBut *v10; // edi@13
  D3DXCOLOR v11; // ST14_16@13
  char *v12; // eax@13
  PgWinBut *v13; // edi@13
  D3DXCOLOR v14; // ST14_16@13
  char *v15; // eax@13
  NiSourceTexture *v16; // edi@13
  D3DXCOLOR v17; // ST0C_16@15
  D3DXCOLOR v18; // ST0C_16@15
  D3DXCOLOR v19; // ST0C_16@15
  NiNode *v20; // esi@16
  UIUtil ui; // [sp+1Ch] [bp-2Ch]@10
  int iTop; // [sp+30h] [bp-18h]@4
  int iLeft; // [sp+34h] [bp-14h]@1
  NiPointer<NiNode> spNode; // [sp+38h] [bp-10h]@1
  int v25; // [sp+44h] [bp-4h]@1

  v1 = this;
  spNode.m_pObject = 0;
  v2 = pTexturePalette;
  v25 = 0;
  iLeft = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v3 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildChangeAttribute.nif");
  PgUtil::LoadNodeNifFile(v3, &spNode, v2);
  if ( !spNode.m_pObject )
    return 0;
  v4 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iLeft, &iTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v1->vfptr, 0, 0, v4, 0, 0, "GuildCombatPropensityChangeWin", 0) )
  {
    v5 = spNode.m_pObject;
    v25 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
    return 0;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v25) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v1->vfptr);
  UIUtil::SetOffset(&ui, iLeft, iTop);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  UIUtil::CreateSpr(&ui, "Panel01", 0);
  UIUtil::CreateSpr(&ui, "Panel02", 0);
  v7 = MenuTexMgr::GetTexture(0x13u);
  if ( v7 )
    v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, v7);
  else
    v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft, iTop, v8, (PgWin *)&v1->vfptr, 0, 0);
  *(_QWORD *)&v9.r = *(_QWORD *)&Color::m_kDxYellowColor.r;
  *(_QWORD *)&v9.b = *(_QWORD *)&Color::m_kDxYellowColor.b;
  v1->m_pTitleWin = UIUtil::CreateTextNoSpr(&ui, "WinTitle", byte_9AB166, v9, 5u);
  v1->m_RadoiButLeft = UIUtil::CreateCheckButton(&ui, 2u, "RadioBox01", 0, 2);
  v1->m_RadoiButRight = UIUtil::CreateCheckButton(&ui, 3u, "RadioBox02", 0, 2);
  v10 = UIUtil::CreateButton(&ui, 0, "Btn01", 0, 3);
  *(_QWORD *)&v11.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v11.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v12 = (char *)TextData::Get(0x4F5F499Fu);
  UIUtil::CreateAttachedText((PgWin *)&v10->vfptr, v12, v11, 5u);
  v13 = UIUtil::CreateButton(&ui, 1u, "Btn02", 0, 3);
  *(_QWORD *)&v14.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v14.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v15 = (char *)TextData::Get(0x88A297E1);
  UIUtil::CreateAttachedText((PgWin *)&v13->vfptr, v15, v14, 5u);
  v16 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
    UIUtil::CreateBtn(&ui, 4u, "HelpLinkNor", "HelpLinkOver", "HelpLinkClick", 0, v16);
  *(_QWORD *)&v17.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v17.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v1->m_pMainWin = (PgWinText *)UIUtil::CreateText(&ui, "Text01", "test", 0, v17, 5u, 0, 0);
  *(_QWORD *)&v18.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v18.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v1->m_pOKWin = (PgWinText *)UIUtil::CreateText(&ui, "Text02", "test2", 0, v18, 5u, 0, 0);
  *(_QWORD *)&v19.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v19.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v1->m_pCancelWin = (PgWinText *)UIUtil::CreateText(&ui, "Text03", "test3", 0, v19, 5u, 0, 0);
  ((void (__thiscall *)(GuildCombatPropensityChangeWin *, unsigned int, unsigned int, _DWORD, _DWORD))v1->vfptr[59].__vecDelDtor)(
    v1,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  LOBYTE(v25) = 0;
  UIUtil::~UIUtil(&ui);
  v25 = -1;
  if ( spNode.m_pObject )
  {
    v20 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v20 )
        v20->vfptr->__vecDelDtor((NiRefObject *)v20, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005BD810) --------------------------------------------------------
void __thiscall GuildCombatPropensityChangeWin::GuildCombatPropensityChangeWin(GuildCombatPropensityChangeWin *this)
{
  GuildCombatPropensityChangeWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GuildCombatPropensityChangeWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildCombatPropensityChangeWin::`vftable'{for `IDirectMessenger'};
  v1->m_spQuitButton.m_pObject = 0;
  v1->m_spOKButton.m_pObject = 0;
  v1->m_spCancleButton.m_pObject = 0;
  v1->m_OKButtonMsgFunc.manager = 0;
  v1->m_OKButtonMsgFunc.functor.obj_ptr = 0;
  v1->m_OKButtonMsgFunc.invoker = 0;
  v1->m_nChoice = 0;
}
// 9AB268: using guessed type void (__thiscall *GuildCombatPropensityChangeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AB284: using guessed type int (__thiscall *GuildCombatPropensityChangeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005BD860) --------------------------------------------------------
void __thiscall GuildCombatPropensityChangeWin::OnCmdOk(GuildCombatPropensityChangeWin *this)
{
  GuildCombatPropensityChangeWin *v1; // esi@1
  bool v2; // zf@1
  boost::function1<void,int,std::allocator<void> > *v3; // ecx@1

  v1 = this;
  v2 = this->m_OKButtonMsgFunc.manager == 0;
  v3 = (boost::function1<void,int,std::allocator<void> > *)&this->m_OKButtonMsgFunc.manager;
  if ( !v2 && v1->m_nChoice )
    boost::function1<void,int,std::allocator<void>>::operator()(v3, v1->m_nChoice);
  PgWin::PostMsg((PgWin *)&v1->vfptr, 2u, 0, 0);
}

//----- (005BD8A0) --------------------------------------------------------
GuildCombatPropensityChangeWin *__cdecl GuildCombatPropensityChangeWin::CreateWin()
{
  PgWin *v0; // eax@1
  PgWin *v1; // esi@1
  PgWin *v2; // edi@8
  GuildCombatPropensityChangeWin *v3; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v5; // [sp+20h] [bp-4h]@1

  v0 = (PgWin *)operator new(0x190u);
  v1 = v0;
  result.m_pObject = v0;
  v5 = 0;
  if ( v0 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v0);
    v1->vfptr = (NiRefObjectVtbl *)&GuildCombatPropensityChangeWin::`vftable'{for `NiNode'};
    v1->vfptr = (IDirectMessengerVtbl *)&GuildCombatPropensityChangeWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v1[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v1[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
    LODWORD(v1[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = 0;
    LODWORD(v1[1].m_kLocal.m_fScale) = 0;
    LODWORD(v1[1].m_kWorld.m_Rotate.m_pEntry[0][0]) = 0;
    LODWORD(v1[1].m_kWorld.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v1[1].m_kLocal.m_Translate.z) = 0;
  }
  else
  {
    v1 = 0;
  }
  if ( v1 )
    InterlockedIncrement((volatile LONG *)&v1->m_uiRefCount);
  v5 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v1);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *))v1->vfptr[135].__vecDelDtor)(v1) )
  {
    ((void (__thiscall *)(PgWin *))v1->vfptr[89].__vecDelDtor)(v1);
    v5 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
      v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
    v3 = (GuildCombatPropensityChangeWin *)v1;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v1);
    if ( result.m_pObject )
    {
      v2 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v2 )
          v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
      }
    }
    v5 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
      v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
    v3 = 0;
  }
  return v3;
}
// 9AB268: using guessed type void (__thiscall *GuildCombatPropensityChangeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AB284: using guessed type int (__thiscall *GuildCombatPropensityChangeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005BDA10) --------------------------------------------------------
void __thiscall GuildCombatPropensityChangeWin::RegisterCallBack(GuildCombatPropensityChangeWin *this, boost::function<void __cdecl(int),std::allocator<void> > CallBackFunc)
{
  int v2; // eax@1
  char *v3; // esi@1
  boost::detail::function::any_pointer (__cdecl *v4)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // ecx@1
  boost::detail::function::any_pointer (__cdecl *v5)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // edi@1
  boost::detail::function::unusable *(__cdecl *v6)(boost::detail::function::unusable *, boost::detail::function::any_pointer, int); // ebx@1
  boost::detail::function::any_pointer (__cdecl *v7)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // edx@4
  int v8; // edx@4
  char v9; // [sp+10h] [bp-18h]@3
  int v10; // [sp+24h] [bp-4h]@1

  v2 = 0;
  v3 = (char *)&this->m_OKButtonMsgFunc;
  v4 = CallBackFunc.manager;
  v5 = 0;
  v6 = 0;
  v10 = 0;
  if ( CallBackFunc.manager )
  {
    v6 = CallBackFunc.invoker;
    v5 = CallBackFunc.manager;
    v2 = ((int (__cdecl *)(void *, _DWORD))CallBackFunc.manager)(CallBackFunc.functor.obj_ptr, 0);
    v4 = CallBackFunc.manager;
  }
  if ( v3 != &v9 )
  {
    v7 = v5;
    v5 = *(boost::detail::function::any_pointer (__cdecl **)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type))v3;
    *(_DWORD *)v3 = v7;
    v8 = v2;
    v2 = *((_DWORD *)v3 + 1);
    *((_DWORD *)v3 + 1) = v8;
    *((_DWORD *)v3 + 2) = v6;
  }
  if ( v5 )
  {
    ((void (__cdecl *)(int, signed int))v5)(v2, 1);
    v4 = CallBackFunc.manager;
  }
  v10 = -1;
  if ( v4 )
    ((void (__cdecl *)(void *, signed int))v4)(CallBackFunc.functor.obj_ptr, 1);
}

//----- (005BDAC0) --------------------------------------------------------
void __thiscall GuildCombatPropensityChangeWin::OnCommand(GuildCombatPropensityChangeWin *this, unsigned int wParam, int lParam)
{
  ColumnBut *v3; // edx@4
  ColumnBut *v4; // edx@5
  GameFrameWork *v5; // eax@6

  switch ( wParam )
  {
    case 0u:
      GuildCombatPropensityChangeWin::OnCmdOk(this);
      break;
    case 1u:
      PgWin::PostMsg((PgWin *)&this->vfptr, 2u, 0, 0);
      break;
    case 2u:
      v3 = this->m_RadoiButLeft;
      this->m_nChoice = 1;
      v3->m_bCheck = 1;
      this->m_RadoiButRight->m_bCheck = 0;
      break;
    case 3u:
      v4 = this->m_RadoiButLeft;
      this->m_nChoice = 2;
      v4->m_bCheck = 0;
      this->m_RadoiButRight->m_bCheck = 1;
      break;
    case 4u:
      v5 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v5 )
        GameFrameWork::OpenPlayGuideSearchList(v5, "GuildChangeAttribute");
      break;
    default:
      return;
  }
}

//----- (005BDB80) --------------------------------------------------------
GuildCombatPropensityChangeWin *__cdecl GuildCombatPropensityChangeWin::Modal(const char *pkTitleName)
{
  GuildCombatPropensityChangeWin *result; // eax@1
  GuildCombatPropensityChangeWin *v2; // esi@1

  result = GuildCombatPropensityChangeWin::CreateWin();
  v2 = result;
  if ( result )
  {
    ((void (__stdcall *)(const char *))result->m_pTitleWin->vfptr[118].__vecDelDtor)(pkTitleName);
    PgWinMgr::DoModal(&Pgg_kWinMgr, (PgWin *)&v2->vfptr, 0, 0, 0);
    result = v2;
  }
  return result;
}

//----- (005BDBC0) --------------------------------------------------------
GuildCombatPropensityChangeWin *__cdecl GuildCombatPropensityChangeWin::Modeless(const char *pkTitleName)
{
  GuildCombatPropensityChangeWin *result; // eax@1
  GuildCombatPropensityChangeWin *v2; // esi@1

  result = GuildCombatPropensityChangeWin::CreateWin();
  v2 = result;
  if ( result )
  {
    ((void (__stdcall *)(const char *))result->m_pTitleWin->vfptr[118].__vecDelDtor)(pkTitleName);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
    result = v2;
  }
  return result;
}

//----- (005BDC00) --------------------------------------------------------
GuildCombatPropensityChangeWin *__thiscall GuildCombatPropensityChangeWin::`vector deleting destructor'(GuildCombatPropensityChangeWin *this, unsigned int a2)
{
  GuildCombatPropensityChangeWin *v2; // esi@1

  v2 = this;
  GuildCombatPropensityChangeWin::~GuildCombatPropensityChangeWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005BDC30) --------------------------------------------------------
void __thiscall boost::function1<void,int,std::allocator<void>>::operator()(boost::function1<void,int,std::allocator<void> > *this, int a0)
{
  std::exception v2; // [sp+4h] [bp-1Ch]@2
  char *_What; // [sp+10h] [bp-10h]@2
  int v4; // [sp+1Ch] [bp-4h]@3

  if ( !this->manager )
  {
    _What = "call to empty boost::function";
    std::exception::exception(&v2, (const char *const *)&_What);
    v2.vfptr = (std::exceptionVtbl *)&boost::bad_function_call::`vftable';
    v4 = 0;
    boost::throw_exception<boost::bad_function_call>((boost::bad_function_call *)&v2);
  }
  ((void (__cdecl *)(char *, void *, int))this->invoker)((char *)&a0 + 3, this->functor.obj_ptr, a0);
}
// 98CD40: using guessed type int (__thiscall *boost::bad_function_call::`vftable')(void *p, char);

//----- (005BDCB0) --------------------------------------------------------
void __thiscall GuildFoundWin::OnCancel(GuildFoundWin *this)
{
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
}

//----- (005BDCD0) --------------------------------------------------------
void GuildFoundWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "GuildCreate");
}

//----- (005BDD00) --------------------------------------------------------
void __thiscall GuildFoundWin::OnWarCheckBox(GuildFoundWin *this)
{
  this->m_pkWarCheckBox->m_bCheck = 1;
  this->m_pkNoWarCheckBox->m_bCheck = 0;
}

//----- (005BDD20) --------------------------------------------------------
void __thiscall GuildFoundWin::OnNoWarCheckBox(GuildFoundWin *this)
{
  this->m_pkWarCheckBox->m_bCheck = 0;
  this->m_pkNoWarCheckBox->m_bCheck = 1;
}

//----- (005BDD40) --------------------------------------------------------
void __thiscall GuildFoundWin::OnShowWin(GuildFoundWin *this)
{
  GuildFoundWin *v1; // esi@1
  EditWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_spIDEdit.m_pObject;
  v1->m_eFocusStatus = 0;
  ((void (*)(void))v2->vfptr[117].__vecDelDtor)();
  ((void (*)(void))v1->m_spPasswdEdit.m_pObject->vfptr[117].__vecDelDtor)();
  ((void (*)(void))v1->m_spIDEdit.m_pObject->vfptr[120].__vecDelDtor)();
}

//----- (005BDD80) --------------------------------------------------------
void __thiscall GuildFoundWin::GuildFoundWin(GuildFoundWin *this)
{
  GuildFoundWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GuildFoundWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildFoundWin::`vftable'{for `IDirectMessenger'};
  v1->m_spIDEdit.m_pObject = 0;
  v1->m_spPasswdEdit.m_pObject = 0;
}
// 9AB640: using guessed type void (__thiscall *GuildFoundWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AB65C: using guessed type int (__thiscall *GuildFoundWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005BDDB0) --------------------------------------------------------
void __thiscall GuildFoundWin::~GuildFoundWin(GuildFoundWin *this)
{
  GuildFoundWin *v1; // esi@1
  EditWin *v2; // edi@1
  EditWin *v3; // edi@5

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildFoundWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildFoundWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spPasswdEdit.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_spIDEdit.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9AB640: using guessed type void (__thiscall *GuildFoundWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AB65C: using guessed type int (__thiscall *GuildFoundWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005BDE60) --------------------------------------------------------
char __thiscall GuildFoundWin::Create(GuildFoundWin *this, PgFrameWork *pkFrameWork)
{
  GuildFoundWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  bool v7; // zf@7
  int v9; // ebx@11
  int v10; // edi@11
  NiSourceTexture *v11; // eax@11
  PgSprData *v12; // eax@12
  PgSprData *v13; // eax@14
  PgSprData *v14; // eax@14
  PgFont *v15; // eax@18
  PgWinText *v16; // ebx@18
  unsigned int v17; // ST54_4@18
  NiUnsharedGeometryGroup *v18; // eax@18
  PgSprData *v19; // ebx@18
  NiSourceTexture *v20; // ebx@18
  PgSprData *v21; // ebx@19
  PgSprData *v22; // ebx@20
  PgSprData::PgHitTester *v23; // eax@20
  unsigned int v24; // ebx@20
  unsigned int v25; // ST54_4@20
  PgFont *v26; // eax@20
  PgWinText *v27; // ebx@20
  unsigned int v28; // ST54_4@20
  NiUnsharedGeometryGroup *v29; // eax@20
  PgSprData *v30; // ebx@20
  NiPointer<PgSprData::PgHitTester> *v31; // edx@20
  unsigned int v32; // ebx@20
  unsigned int v33; // ST54_4@20
  PgFont *v34; // eax@20
  PgWinText *v35; // ebx@20
  unsigned int v36; // ST54_4@20
  NiUnsharedGeometryGroup *v37; // eax@20
  PgSprData *v38; // ebx@20
  PgSprData *v39; // ebx@20
  ColumnBut *v40; // eax@20
  NiNode *v41; // edx@20
  PgFont *v42; // eax@22
  PgWinText *v43; // ebx@22
  unsigned int v44; // ST54_4@22
  NiUnsharedGeometryGroup *v45; // eax@22
  PgFont *v46; // eax@23
  unsigned int v47; // ST54_4@23
  NiUnsharedGeometryGroup *v48; // eax@23
  PgFont *v49; // eax@24
  unsigned int v50; // ST54_4@24
  NiUnsharedGeometryGroup *v51; // eax@24
  PgFont *v52; // eax@25
  unsigned int v53; // ST54_4@25
  NiUnsharedGeometryGroup *v54; // eax@25
  PgFont *v55; // eax@26
  unsigned int v56; // ST54_4@26
  NiUnsharedGeometryGroup *v57; // eax@26
  PgFont *v58; // eax@27
  PgWinText *v59; // edi@27
  NiRefObjectVtbl *v60; // ebx@27
  NiUnsharedGeometryGroup *v61; // eax@27
  PgSprData *v62; // eax@27
  EditWin *v63; // eax@28
  char v64; // bl@29
  PgSprData *v65; // eax@29
  EditWin *v66; // eax@30
  unsigned int uiWidth; // [sp+14h] [bp-20h]@14
  unsigned int uiHeight; // [sp+18h] [bp-1Ch]@14
  NiPointer<NiNode> spNode; // [sp+1Ch] [bp-18h]@1
  int uiLeft; // [sp+20h] [bp-14h]@4
  int uiTop; // [sp+24h] [bp-10h]@4
  int v72; // [sp+30h] [bp-4h]@1
  PgWinText *pkTextWin; // [sp+3Ch] [bp+8h]@11
  PgWinText *pkTextWina; // [sp+3Ch] [bp+8h]@22
  PgWinText *pkTextWinb; // [sp+3Ch] [bp+8h]@23
  PgWinText *pkTextWinc; // [sp+3Ch] [bp+8h]@24
  PgWinText *pkTextWind; // [sp+3Ch] [bp+8h]@25
  PgWinText *pkTextWine; // [sp+3Ch] [bp+8h]@26

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v72 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildCreate.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "GuildCreateWin", 0) )
  {
    v6 = spNode.m_pObject;
    v72 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v7 = v6 == 0;
    goto LABEL_8;
  }
  v9 = uiTop;
  v10 = uiLeft;
  pkTextWin = (PgWinText *)uiTop;
  v11 = MenuTexMgr::GetTexture(0x13u);
  if ( v11 )
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v11);
  else
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop - v9, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop, v13, (PgWin *)&v2->vfptr, 0, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop, v14, (PgWin *)&v2->vfptr, 0, 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "WinTitle",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
  {
    v6 = spNode.m_pObject;
    v72 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v7 = v6 == 0;
LABEL_8:
    if ( !v7 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    return 0;
  }
  v15 = Font::Get(0);
  v16 = PgWinText::CreateWin(uiLeft - v10, uiTop, uiWidth, uiHeight, v15, (PgWin *)&v2->vfptr, 0, 0);
  v16->vfptr[122].__vecDelDtor((NiRefObject *)v16, 1u);
  v16->vfptr[117].__vecDelDtor((NiRefObject *)v16, (unsigned int)&Color::m_kDxWinTitleColor);
  v17 = (unsigned int)v16->vfptr;
  v18 = TextData::Get(0x8DD4E1DB);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v17 + 472))(v16, v18);
  v16->vfptr[60].__vecDelDtor((NiRefObject *)v16, 0);
  v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v19, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(v19, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinCloseBut::CreateWin(uiLeft - v10, uiTop - (_DWORD)pkTextWin, v19, (PgWin *)&v2->vfptr);
  v20 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, v20);
    PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v10, uiTop - (_DWORD)pkTextWin, v21, (PgWin *)&v2->vfptr, 0xEu, 0, 0);
  }
  v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "AddFrndNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v22, (NiAVObject *)&spNode.m_pObject->vfptr, "AddFrndClick");
  PgSprData::Add(v22, (NiAVObject *)&spNode.m_pObject->vfptr, "AddFrndOver");
  PgWinBut::CreateWin(uiLeft - v10, uiTop, v22, (PgWin *)&v2->vfptr, 0xAu, 0, 0);
  v23 = v22->m_akHitTester.m_pBase->m_pObject;
  v24 = v23->m_uiHeight;
  v25 = v23->m_uiWidth;
  v26 = Font::Get(0);
  v27 = PgWinText::CreateWin(uiLeft - v10, uiTop + 1, v25, v24, v26, (PgWin *)&v2->vfptr, 0, 0);
  v27->vfptr[122].__vecDelDtor((NiRefObject *)v27, 5u);
  v28 = (unsigned int)v27->vfptr;
  v29 = TextData::Get(0x4F5F499Fu);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v28 + 472))(v27, v29);
  v27->vfptr[60].__vecDelDtor((NiRefObject *)v27, 0);
  v30 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "AddFrndNor01", &uiLeft, &uiTop, 0);
  PgSprData::Add(v30, (NiAVObject *)&spNode.m_pObject->vfptr, "AddFrndClick01");
  PgSprData::Add(v30, (NiAVObject *)&spNode.m_pObject->vfptr, "AddFrndOver01");
  PgWinBut::CreateWin(uiLeft - v10, uiTop, v30, (PgWin *)&v2->vfptr, 0xBu, 0, 0);
  v31 = v30->m_akHitTester.m_pBase;
  v32 = v31->m_pObject->m_uiHeight;
  v33 = v31->m_pObject->m_uiWidth;
  v34 = Font::Get(0);
  v35 = PgWinText::CreateWin(uiLeft - v10, uiTop + 1, v33, v32, v34, (PgWin *)&v2->vfptr, 0, 0);
  v35->vfptr[122].__vecDelDtor((NiRefObject *)v35, 5u);
  v36 = (unsigned int)v35->vfptr;
  v37 = TextData::Get(0x88A297E1);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v36 + 472))(v35, v37);
  v35->vfptr[60].__vecDelDtor((NiRefObject *)v35, 0);
  v38 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MyNmChNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v38, (NiAVObject *)&spNode.m_pObject->vfptr, "MyNmChClick");
  v2->m_pkWarCheckBox = ColumnBut::CreateWin(uiLeft, uiTop, v38, (PgWin *)&v2->vfptr, 0xCu, 0);
  v39 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MyNmChNor01", &uiLeft, &uiTop, 0);
  PgSprData::Add(v39, (NiAVObject *)&spNode.m_pObject->vfptr, "MyNmChClick01");
  v40 = ColumnBut::CreateWin(uiLeft, uiTop, v39, (PgWin *)&v2->vfptr, 0xDu, 0);
  v41 = spNode.m_pObject;
  v2->m_pkNoWarCheckBox = v40;
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&v41->vfptr, "Text01", &uiLeft, &uiTop, &uiWidth, &uiHeight)
    || (v42 = Font::Get(SMALL),
        v43 = pkTextWin,
        pkTextWina = PgWinText::CreateWin(
                       uiLeft - v10,
                       uiTop - (_DWORD)pkTextWin,
                       uiWidth,
                       uiHeight,
                       v42,
                       (PgWin *)&v2->vfptr,
                       0,
                       0),
        v44 = (unsigned int)pkTextWina->vfptr,
        v45 = TextData::Get(0x381C213Cu),
        (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v44 + 472))(pkTextWina, v45),
        ((void (__stdcall *)(_DWORD))pkTextWina->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Text03", &uiLeft, &uiTop, &uiWidth, &uiHeight))
    || (v46 = Font::Get(SMALL),
        pkTextWinb = PgWinText::CreateWin(
                       uiLeft - v10,
                       uiTop - (_DWORD)v43,
                       uiWidth,
                       uiHeight,
                       v46,
                       (PgWin *)&v2->vfptr,
                       0,
                       0),
        v47 = (unsigned int)pkTextWinb->vfptr,
        v48 = TextData::Get(0x2A3A5E67u),
        (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v47 + 472))(pkTextWinb, v48),
        ((void (__stdcall *)(_DWORD))pkTextWinb->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Text05", &uiLeft, &uiTop, &uiWidth, &uiHeight))
    || (v49 = Font::Get(SMALL),
        pkTextWinc = PgWinText::CreateWin(
                       uiLeft - v10,
                       uiTop - (_DWORD)v43,
                       uiWidth,
                       uiHeight,
                       v49,
                       (PgWin *)&v2->vfptr,
                       0,
                       0),
        v50 = (unsigned int)pkTextWinc->vfptr,
        v51 = TextData::Get(0x829378A1),
        (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v50 + 472))(pkTextWinc, v51),
        ((void (__stdcall *)(_DWORD))pkTextWinc->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Text09", &uiLeft, &uiTop, &uiWidth, &uiHeight))
    || (v52 = Font::Get(SMALL),
        pkTextWind = PgWinText::CreateWin(
                       uiLeft - v10,
                       uiTop - (_DWORD)v43,
                       uiWidth,
                       uiHeight,
                       v52,
                       (PgWin *)&v2->vfptr,
                       0,
                       0),
        v53 = (unsigned int)pkTextWind->vfptr,
        v54 = TextData::Get(0x7B8DCCF0u),
        (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v53 + 472))(pkTextWind, v54),
        ((void (__stdcall *)(_DWORD))pkTextWind->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Text06", &uiLeft, &uiTop, &uiWidth, &uiHeight))
    || (v55 = Font::Get(SMALL),
        pkTextWine = PgWinText::CreateWin(
                       uiLeft - v10,
                       uiTop - (_DWORD)v43,
                       uiWidth,
                       uiHeight,
                       v55,
                       (PgWin *)&v2->vfptr,
                       0,
                       0),
        v56 = (unsigned int)pkTextWine->vfptr,
        v57 = TextData::Get(0x8A747095),
        (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v56 + 472))(pkTextWine, v57),
        ((void (__stdcall *)(_DWORD))pkTextWine->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Text08", &uiLeft, &uiTop, &uiWidth, &uiHeight)) )
  {
    v72 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  v58 = Font::Get(SMALL);
  v59 = PgWinText::CreateWin(uiLeft - v10, uiTop - (_DWORD)v43, uiWidth, uiHeight, v58, (PgWin *)&v2->vfptr, 0, 0);
  v60 = v59->vfptr;
  v61 = TextData::Get(0x2C676292u);
  v60[118].__vecDelDtor((NiRefObject *)v59, (unsigned int)v61);
  v59->m_spTextGeom.m_pObject->m_bAutoWordWrap = 1;
  v59->vfptr[60].__vecDelDtor((NiRefObject *)v59, 0);
  LOBYTE(v60) = PgUtil::GetTriShapeRect(
                  (NiAVObject *)&spNode.m_pObject->vfptr,
                  "Text02",
                  &uiLeft,
                  &uiTop,
                  &uiWidth,
                  &uiHeight);
  v62 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text02", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft, uiTop, v62, (PgWin *)&v2->vfptr, 0, 0);
  if ( (_BYTE)v60 )
  {
    v63 = EditWin::CreateWin(uiLeft + 2, uiTop + 2, uiWidth, uiHeight, (PgWin *)&v2->vfptr, NORMAL, 0x10u, 3u, 0, 0, 1);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spIDEdit, (NiD3DDefaultShader *)v63);
  }
  v64 = PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Text07", &uiLeft, &uiTop, &uiWidth, &uiHeight);
  v65 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text07", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft, uiTop, v65, (PgWin *)&v2->vfptr, 0, 0);
  if ( v64 )
  {
    v66 = EditWin::CreateWin(uiLeft + 2, uiTop + 2, uiWidth, uiHeight, (PgWin *)&v2->vfptr, PASSWD, 8u, 3u, 0, 0, 1);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spPasswdEdit, (NiD3DDefaultShader *)v66);
  }
  v2->m_pkWarCheckBox->m_bCheck = 1;
  v2->m_pkNoWarCheckBox->m_bCheck = 0;
  v72 = -1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005BE830) --------------------------------------------------------
void __thiscall GuildFoundWin::OnOk(GuildFoundWin *this)
{
  GuildFoundWin *v1; // esi@1
  EditWin *v2; // ecx@1
  char *v3; // eax@1
  char *v4; // edx@1
  char v5; // cl@2
  EditWin *v6; // ecx@5
  char *v7; // eax@5
  char *v8; // edx@5
  char v9; // cl@6
  int v10; // esi@12
  char *v11; // eax@16
  DirectUserMsgBody_DelegatePacket kBody; // [sp+8h] [bp-50h]@12
  PROTO_NC_GUILD_MAKE_REQ kReq; // [sp+14h] [bp-44h]@1
  char acTitle[17]; // [sp+34h] [bp-24h]@1
  char acPassword[9]; // [sp+48h] [bp-10h]@5

  v1 = this;
  v2 = this->m_spIDEdit.m_pObject;
  *(_QWORD *)&kReq.Name.n4_code[2] = 0i64;
  *(_QWORD *)&kReq.Name.n4_name[0] = 0i64;
  *(_QWORD *)&kReq.Password.n3_code[1] = 0i64;
  kReq.Password.n3_code[0] = 0;
  *(_DWORD *)acTitle = 0;
  *(_DWORD *)&acTitle[4] = 0;
  *(_DWORD *)&acTitle[8] = 0;
  *(_DWORD *)&acTitle[12] = 0;
  acTitle[16] = 0;
  v3 = (char *)((int (*)(void))v2->vfptr[113].__vecDelDtor)();
  v4 = (char *)(acTitle - v3);
  do
  {
    v5 = *v3;
    v3[(_DWORD)v4] = *v3;
    ++v3;
  }
  while ( v5 );
  if ( TextFilterTable::IsBadName(acTitle) || TextFilterTable::IsForbiddenGuildName(acTitle) )
  {
    v11 = (char *)TextData::Get(0x329D7E83u);
    MsgBox::Modeless(MSGBOX_OK, v11);
  }
  else
  {
    *(_QWORD *)&kReq.Name.n4_code[2] = 0i64;
    *(_QWORD *)&kReq.Name.n4_name[0] = 0i64;
    strncpy(kReq.Name.n4_name, acTitle, 0x10u);
    v6 = v1->m_spPasswdEdit.m_pObject;
    *(_DWORD *)acPassword = 0;
    *(_DWORD *)&acPassword[4] = 0;
    acPassword[8] = 0;
    v7 = (char *)((int (*)(void))v6->vfptr[113].__vecDelDtor)();
    v8 = (char *)(acPassword - v7);
    do
    {
      v9 = *v7;
      v7[(_DWORD)v8] = *v7;
      ++v7;
    }
    while ( v9 );
    *(_QWORD *)&kReq.Password.n3_code[1] = 0i64;
    kReq.Password.n3_code[0] = 0;
    strncpy(kReq.Password.n3_name, acPassword, 0xCu);
    if ( strlen(acPassword) - 1 <= 7 )
    {
      if ( v1->m_pkWarCheckBox->m_bCheck )
        kReq.Type = 1;
      if ( v1->m_pkNoWarCheckBox->m_bCheck )
        kReq.Type = 0;
      v10 = (int)&v1->vfptr;
      *(_DWORD *)&kBody.wDepartment = 327709;
      kBody.pvProto = &kReq;
      kBody.dwPacketSize = 29;
      if ( *(_DWORD *)(v10 + 4) )
      {
        (*(void (__stdcall **)(signed int, DirectUserMsgBody_DelegatePacket *, int))(**(_DWORD **)(v10 + 4) + 4))(
          44,
          &kBody,
          v10);
        if ( *(_DWORD *)(v10 + 4) )
          (*(void (__stdcall **)(signed int, DirectUserMsgBody_DelegatePacket *, int))(**(_DWORD **)(v10 + 4) + 20))(
            44,
            &kBody,
            v10);
      }
      (*(void (__thiscall **)(int, signed int, DirectUserMsgBody_DelegatePacket *, int))(*(_DWORD *)v10 + 20))(
        v10,
        44,
        &kBody,
        v10);
    }
  }
}

//----- (005BE9F0) --------------------------------------------------------
void __thiscall GuildFoundWin::OnEditEnd(GuildFoundWin *this, unsigned int wParam, int lParam)
{
  GuildFoundWin *v3; // esi@1
  GuildFoundWin::EDIT_FOCUS_STATUS v4; // eax@2

  v3 = this;
  if ( wParam != 4 )
  {
    v4 = this->m_eFocusStatus;
    if ( v4 )
    {
      if ( v4 == 1 )
      {
        if ( wParam == 2 )
        {
          ((void (*)(void))this->m_spIDEdit.m_pObject->vfptr[120].__vecDelDtor)();
          ((void (__stdcall *)(_DWORD))v3->m_spPasswdEdit.m_pObject->vfptr[121].__vecDelDtor)(1);
        }
        else if ( wParam == 1 )
        {
          GuildFoundWin::OnOk(this);
        }
      }
    }
    else
    {
      ((void (__stdcall *)(_DWORD))this->m_spIDEdit.m_pObject->vfptr[121].__vecDelDtor)(1);
      ((void (*)(void))v3->m_spPasswdEdit.m_pObject->vfptr[120].__vecDelDtor)();
    }
  }
}

//----- (005BEA70) --------------------------------------------------------
void __thiscall GuildFoundWin::OnCommand(GuildFoundWin *this, unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@6

  switch ( wParam )
  {
    case 0xCu:
      this->m_pkWarCheckBox->m_bCheck = 1;
      this->m_pkNoWarCheckBox->m_bCheck = 0;
      break;
    case 0xDu:
      this->m_pkWarCheckBox->m_bCheck = 0;
      this->m_pkNoWarCheckBox->m_bCheck = 1;
      break;
    case 0xAu:
      GuildFoundWin::OnOk(this);
      break;
    case 0xBu:
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
      break;
    case 0xEu:
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v3 )
        GameFrameWork::OpenPlayGuideSearchList(v3, "GuildCreate");
      break;
    default:
      return;
  }
}

//----- (005BEB20) --------------------------------------------------------
void __thiscall GuildFoundWin::UpdateMeWin(GuildFoundWin *this, float fCurTime)
{
  GuildFoundWin *v2; // edi@1

  v2 = this;
  if ( g_pkKeyboard->m_aucKeystate[0] & 2 )
  {
    BYTE3(PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID)[73].m_kMsgQ.m_uiAlloced) = 0;
    if ( PgWinMgr::IsIn(&Pgg_kWinMgr, (PgWin *)&this->vfptr) )
      PgTQueue<PgWinMgr::PgWinMsg>::Add(&stru_B6483C, (PgWinMgr::PgWinMsg)__PAIR__(1, (unsigned int)v2));
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (005BEB80) --------------------------------------------------------
GuildFoundWin *__cdecl GuildFoundWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  GuildFoundWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x16Cu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&GuildFoundWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&GuildFoundWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][2]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (GuildFoundWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9AB640: using guessed type void (__thiscall *GuildFoundWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AB65C: using guessed type int (__thiscall *GuildFoundWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005BECD0) --------------------------------------------------------
GuildFoundWin *__thiscall GuildFoundWin::`scalar deleting destructor'(GuildFoundWin *this, unsigned int a2)
{
  GuildFoundWin *v2; // esi@1

  v2 = this;
  GuildFoundWin::~GuildFoundWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005BED00) --------------------------------------------------------
void __thiscall GuildMasterMenuWin::GuildMasterMenuWin(GuildMasterMenuWin *this)
{
  GuildMasterMenuWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GuildMasterMenuWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildMasterMenuWin::`vftable'{for `IDirectMessenger'};
}
// 9ABA14: using guessed type void (__thiscall *GuildMasterMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9ABA34: using guessed type int (__thiscall *GuildMasterMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005BED20) --------------------------------------------------------
void __thiscall GuildMasterMenuWin::~GuildMasterMenuWin(GuildMasterMenuWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GuildMasterMenuWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildMasterMenuWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9ABA14: using guessed type void (__thiscall *GuildMasterMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9ABA34: using guessed type int (__thiscall *GuildMasterMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005BEDA0) --------------------------------------------------------
void GuildMasterMenuWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "GuildMenu");
}

//----- (005BEDD0) --------------------------------------------------------
void __thiscall GuildMasterMenuWin::OnCommand(GuildMasterMenuWin *this, unsigned int wParam, int lParam)
{
  char *v3; // esi@2

  switch ( wParam )
  {
    case 6u:
      v3 = (char *)&this->vfptr;
      if ( this->m_pkMsgHooker )
      {
        ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))this->m_pkMsgHooker->vfptr->SendDirectMessage)(45, 0, v3);
        if ( *((_DWORD *)v3 + 1) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v3 + 1) + 20))(45, 0, v3);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v3 + 20))(v3, 45, 0, v3);
      break;
    case 0xCu:
      GuildMasterMenuWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (005BEE60) --------------------------------------------------------
char __thiscall GuildMasterMenuWin::Create(GuildMasterMenuWin *this, PgFrameWork *pkFrameWork)
{
  GuildMasterMenuWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  char result; // al@9
  int v8; // ebx@10
  int v9; // edi@10
  NiSourceTexture *v10; // eax@10
  PgSprData *v11; // eax@11
  PgSprData *v12; // eax@13
  PgSprData *v13; // eax@13
  PgSprData *v14; // ebx@13
  NiSourceTexture *v15; // ebx@13
  PgSprData *v16; // ebx@14
  NiNode *v17; // esi@16
  PgFont *v18; // eax@21
  PgWinText *v19; // ebx@21
  NiUnsharedGeometryGroup *v20; // eax@21
  PgSprData *v21; // ebx@21
  NiPointer<PgSprData::PgHitTester> *v22; // edx@21
  unsigned int v23; // ebx@21
  PgFont *v24; // eax@21
  PgWinText *v25; // ebx@21
  NiUnsharedGeometryGroup *v26; // eax@21
  PgSprData *v27; // ebx@21
  PgWinBut *v28; // eax@21
  NiPointer<PgSprData::PgHitTester> *v29; // ecx@21
  unsigned int v30; // ebx@21
  PgFont *v31; // eax@21
  PgWinText *v32; // ebx@21
  NiUnsharedGeometryGroup *v33; // eax@21
  PgSprData *v34; // ebx@21
  PgWinBut *v35; // eax@21
  NiPointer<PgSprData::PgHitTester> *v36; // ecx@21
  unsigned int v37; // ebx@21
  PgFont *v38; // eax@21
  PgWinText *v39; // ebx@21
  NiUnsharedGeometryGroup *v40; // eax@21
  PgSprData *v41; // ebx@21
  PgWinBut *v42; // eax@21
  NiPointer<PgSprData::PgHitTester> *v43; // ecx@21
  unsigned int v44; // ebx@21
  PgFont *v45; // eax@21
  PgWinText *v46; // ebx@21
  NiUnsharedGeometryGroup *v47; // eax@21
  PgSprData *v48; // ebx@21
  PgWinBut *v49; // eax@21
  NiPointer<PgSprData::PgHitTester> *v50; // ecx@21
  unsigned int v51; // ebx@21
  PgFont *v52; // eax@21
  PgWinText *v53; // ebx@21
  NiUnsharedGeometryGroup *v54; // eax@21
  PgSprData *v55; // ebx@21
  PgWinBut *v56; // eax@21
  NiPointer<PgSprData::PgHitTester> *v57; // ecx@21
  unsigned int v58; // ebx@21
  PgFont *v59; // eax@21
  PgWinText *v60; // edi@21
  NiRefObjectVtbl *v61; // ebx@21
  NiUnsharedGeometryGroup *v62; // eax@21
  NiNode *v63; // esi@22
  unsigned int uiWidth; // [sp+88h] [bp-20h]@15
  unsigned int uiHeight; // [sp+8Ch] [bp-1Ch]@15
  int uiLeft; // [sp+90h] [bp-18h]@4
  int uiTop; // [sp+94h] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+98h] [bp-10h]@1
  int v69; // [sp+A4h] [bp-4h]@1
  int iYOff; // [sp+B0h] [bp+8h]@10
  int iYOffa; // [sp+B0h] [bp+8h]@21
  int iYOffb; // [sp+B0h] [bp+8h]@21
  int iYOffc; // [sp+B0h] [bp+8h]@21
  int iYOffd; // [sp+B0h] [bp+8h]@21
  int iYOffe; // [sp+B0h] [bp+8h]@21
  int iYOfff; // [sp+B0h] [bp+8h]@21
  int iYOffg; // [sp+B0h] [bp+8h]@21
  int iYOffh; // [sp+B0h] [bp+8h]@21
  int iYOffi; // [sp+B0h] [bp+8h]@21
  int iYOffj; // [sp+B0h] [bp+8h]@21
  int iYOffk; // [sp+B0h] [bp+8h]@21
  int iYOffl; // [sp+B0h] [bp+8h]@21

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v69 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildMenu.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "GuildMasterMenuWin", 0) )
  {
    v6 = spNode.m_pObject;
    v69 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = uiTop;
  v9 = uiLeft;
  iYOff = uiTop;
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v8, v11, (PgWin *)&v2->vfptr, 0, 0);
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop, v13, (PgWin *)&v2->vfptr, 0, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinCloseBut::CreateWin(uiLeft - v9, uiTop - iYOff, v14, (PgWin *)&v2->vfptr);
  v15 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, v15);
    PgSprData::Add(v16, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(v16, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v9, uiTop - iYOff, v16, (PgWin *)&v2->vfptr, 0xCu, 0, 0);
  }
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v18 = Font::Get(0);
    v19 = PgWinText::CreateWin(uiLeft - v9, uiTop, uiWidth, uiHeight, v18, (PgWin *)&v2->vfptr, 0, 0);
    v19->vfptr[122].__vecDelDtor((NiRefObject *)v19, 1u);
    v19->vfptr[117].__vecDelDtor((NiRefObject *)v19, (unsigned int)&Color::m_kDxWinTitleColor);
    iYOffa = (int)v19->vfptr;
    v20 = TextData::Get(0x363D3C93u);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(iYOffa + 472))(v19, v20);
    v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
    v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
    PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
    PgWinBut::CreateWin(uiLeft - v9, uiTop, v21, (PgWin *)&v2->vfptr, 6u, 0, 0);
    v22 = v21->m_akHitTester.m_pBase;
    v23 = v22->m_pObject->m_uiHeight;
    iYOffb = v22->m_pObject->m_uiWidth;
    v24 = Font::Get(0);
    v25 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOffb, v23, v24, (PgWin *)&v2->vfptr, 0, 0);
    v25->vfptr[122].__vecDelDtor((NiRefObject *)v25, 5u);
    iYOffc = (int)v25->vfptr;
    v26 = TextData::Get(0xC9253B46);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(iYOffc + 472))(v25, v26);
    v25->vfptr[60].__vecDelDtor((NiRefObject *)v25, 0);
    v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v27, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Click");
    PgSprData::Add(v27, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Over");
    v28 = PgWinBut::CreateWin(uiLeft - v9, uiTop, v27, (PgWin *)&v2->vfptr, 7u, 0, 0);
    v28->vfptr[60].__vecDelDtor((NiRefObject *)v28, 0);
    v29 = v27->m_akHitTester.m_pBase;
    v30 = v29->m_pObject->m_uiHeight;
    iYOffd = v29->m_pObject->m_uiWidth;
    v31 = Font::Get(0);
    v32 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOffd, v30, v31, (PgWin *)&v2->vfptr, 0, 0);
    v32->vfptr[122].__vecDelDtor((NiRefObject *)v32, 5u);
    iYOffe = (int)v32->vfptr;
    v33 = TextData::Get(0x7D7EEFDCu);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(iYOffe + 472))(v32, v33);
    v32->vfptr[60].__vecDelDtor((NiRefObject *)v32, 0);
    v34 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v34, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Click");
    PgSprData::Add(v34, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Over");
    v35 = PgWinBut::CreateWin(uiLeft - v9, uiTop, v34, (PgWin *)&v2->vfptr, 8u, 0, 0);
    v35->vfptr[60].__vecDelDtor((NiRefObject *)v35, 0);
    v36 = v34->m_akHitTester.m_pBase;
    v37 = v36->m_pObject->m_uiHeight;
    iYOfff = v36->m_pObject->m_uiWidth;
    v38 = Font::Get(0);
    v39 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOfff, v37, v38, (PgWin *)&v2->vfptr, 0, 0);
    v39->vfptr[122].__vecDelDtor((NiRefObject *)v39, 5u);
    iYOffg = (int)v39->vfptr;
    v40 = TextData::Get(0x8AD5E9E2);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(iYOffg + 472))(v39, v40);
    v39->vfptr[60].__vecDelDtor((NiRefObject *)v39, 0);
    v41 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn04Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v41, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn04Click");
    PgSprData::Add(v41, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn04Over");
    v42 = PgWinBut::CreateWin(uiLeft - v9, uiTop, v41, (PgWin *)&v2->vfptr, 9u, 0, 0);
    v42->vfptr[60].__vecDelDtor((NiRefObject *)v42, 0);
    v43 = v41->m_akHitTester.m_pBase;
    v44 = v43->m_pObject->m_uiHeight;
    iYOffh = v43->m_pObject->m_uiWidth;
    v45 = Font::Get(0);
    v46 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOffh, v44, v45, (PgWin *)&v2->vfptr, 0, 0);
    v46->vfptr[122].__vecDelDtor((NiRefObject *)v46, 5u);
    iYOffi = (int)v46->vfptr;
    v47 = TextData::Get(0x82CBDCE2);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(iYOffi + 472))(v46, v47);
    v46->vfptr[60].__vecDelDtor((NiRefObject *)v46, 0);
    v48 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn05Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v48, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn05Click");
    PgSprData::Add(v48, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn05Over");
    v49 = PgWinBut::CreateWin(uiLeft - v9, uiTop, v48, (PgWin *)&v2->vfptr, 0xAu, 0, 0);
    v49->vfptr[60].__vecDelDtor((NiRefObject *)v49, 0);
    v50 = v48->m_akHitTester.m_pBase;
    v51 = v50->m_pObject->m_uiHeight;
    iYOffj = v50->m_pObject->m_uiWidth;
    v52 = Font::Get(0);
    v53 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOffj, v51, v52, (PgWin *)&v2->vfptr, 0, 0);
    v53->vfptr[122].__vecDelDtor((NiRefObject *)v53, 5u);
    iYOffk = (int)v53->vfptr;
    v54 = TextData::Get(0xD2C9E4E6);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(iYOffk + 472))(v53, v54);
    v53->vfptr[60].__vecDelDtor((NiRefObject *)v53, 0);
    v55 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn06Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v55, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn06Click");
    PgSprData::Add(v55, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn06Over");
    v56 = PgWinBut::CreateWin(uiLeft - v9, uiTop, v55, (PgWin *)&v2->vfptr, 0xBu, 0, 0);
    v56->vfptr[60].__vecDelDtor((NiRefObject *)v56, 0);
    v57 = v55->m_akHitTester.m_pBase;
    v58 = v57->m_pObject->m_uiHeight;
    iYOffl = v57->m_pObject->m_uiWidth;
    v59 = Font::Get(0);
    v60 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOffl, v58, v59, (PgWin *)&v2->vfptr, 0, 0);
    v60->vfptr[122].__vecDelDtor((NiRefObject *)v60, 5u);
    v61 = v60->vfptr;
    v62 = TextData::Get(0xD4EB2F17);
    v61[118].__vecDelDtor((NiRefObject *)v60, (unsigned int)v62);
    v60->vfptr[60].__vecDelDtor((NiRefObject *)v60, 0);
    ((void (__thiscall *)(GuildMasterMenuWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    v69 = -1;
    if ( spNode.m_pObject )
    {
      v63 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v63 )
          v63->vfptr->__vecDelDtor((NiRefObject *)v63, 1u);
      }
    }
    result = 1;
  }
  else
  {
    v17 = spNode.m_pObject;
    v69 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v17 )
      v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005BF710) --------------------------------------------------------
GuildMasterMenuWin *__cdecl GuildMasterMenuWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  GuildMasterMenuWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x158u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&GuildMasterMenuWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&GuildMasterMenuWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (GuildMasterMenuWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9ABA14: using guessed type void (__thiscall *GuildMasterMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9ABA34: using guessed type int (__thiscall *GuildMasterMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005BF850) --------------------------------------------------------
GuildMasterMenuWin *__thiscall GuildMasterMenuWin::`scalar deleting destructor'(GuildMasterMenuWin *this, unsigned int a2)
{
  GuildMasterMenuWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildMasterMenuWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildMasterMenuWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9ABA14: using guessed type void (__thiscall *GuildMasterMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9ABA34: using guessed type int (__thiscall *GuildMasterMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005BF8A0) --------------------------------------------------------
void GuildMenuWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "GuildMenu");
}

//----- (005BF8D0) --------------------------------------------------------
void __thiscall GuildMenuWin::GuildMenuWin(GuildMenuWin *this)
{
  GuildMenuWin *v1; // esi@1
  GuildFoundWin *v2; // edi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GuildMenuWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildMenuWin::`vftable'{for `IDirectMessenger'};
  v1->m_spGuildFoundWin.m_pObject = 0;
  v1->m_spGuildMasterMenuWin.m_pObject = 0;
  v2 = v1->m_spGuildFoundWin.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
    v1->m_spGuildFoundWin.m_pObject = 0;
  }
}
// 9ABD48: using guessed type void (__thiscall *GuildMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9ABD64: using guessed type int (__thiscall *GuildMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005BF970) --------------------------------------------------------
void __thiscall GuildMenuWin::~GuildMenuWin(GuildMenuWin *this)
{
  GuildMenuWin *v1; // esi@1
  GuildMasterMenuWin *v2; // edi@1
  GuildFoundWin *v3; // edi@5

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildMenuWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildMenuWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spGuildMasterMenuWin.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_spGuildFoundWin.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9ABD48: using guessed type void (__thiscall *GuildMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9ABD64: using guessed type int (__thiscall *GuildMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005BFA20) --------------------------------------------------------
void __thiscall GuildMenuWin::CloseFoundWin(GuildMenuWin *this)
{
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_spGuildFoundWin.m_pObject->vfptr);
}

//----- (005BFA40) --------------------------------------------------------
GuildMasterMenuWin *__thiscall GuildMenuWin::GetMasterMenuWin(GuildMenuWin *this)
{
  return this->m_spGuildMasterMenuWin.m_pObject;
}

//----- (005BFA50) --------------------------------------------------------
void __thiscall GuildMenuWin::UpdateInformGuildMemberLoginText(GuildMenuWin *this)
{
  GuildMenuWin *v1; // edi@1
  const char *v2; // eax@1
  NiRefObjectVtbl *v3; // esi@3
  const char *v4; // ST08_4@3
  NiUnsharedGeometryGroup *v5; // eax@3
  char *v6; // eax@3

  v1 = this;
  v2 = "(O)";
  if ( !byte_B4FF8F )
    v2 = "(X)";
  v3 = this->m_pkMemberLoginInformText->vfptr;
  v4 = v2;
  v5 = TextData::Get(0x1A757781u);
  v6 = fs("%s%s", v5, v4);
  v3[118].__vecDelDtor((NiRefObject *)v1->m_pkMemberLoginInformText, (unsigned int)v6);
}
// B4FF8F: using guessed type char byte_B4FF8F;

//----- (005BFAA0) --------------------------------------------------------
void __thiscall GuildMenuWin::OnCmdGuildMasterMenu(GuildMenuWin *this)
{
  GuildMenuWin *v1; // esi@1
  CClientGuild *v2; // eax@1
  char *v3; // eax@2

  v1 = this;
  v2 = GuildTask::GetGuild();
  if ( CClientGuild::AmIGuildMaster(v2) )
  {
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v1->m_spGuildMasterMenuWin.m_pObject->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_spGuildMasterMenuWin.m_pObject->vfptr);
  }
  else
  {
    v3 = (char *)TextData::Get(0x28233E34u);
    MsgBox::Modal(MSGBOX_OK, v3);
  }
}

//----- (005BFB20) --------------------------------------------------------
void __thiscall GuildMenuWin::GuildStateBtnSetting(GuildMenuWin *this)
{
  GuildMenuWin *v1; // esi@1
  CClientGuild *v2; // eax@1
  CClientGuild *v3; // eax@3
  NiRefObjectVtbl *v4; // edi@5
  int v5; // [sp+0h] [bp-8h]@0
  unsigned int v6; // [sp+0h] [bp-8h]@2

  v1 = this;
  v2 = GuildTask::GetGuild();
  if ( CClientGuild::AmIGuildMaster(v2) == 1 )
  {
    ((void (__stdcall *)(signed int, int))v1->m_pkMenuBtn[1]->vfptr[129].__vecDelDtor)(10, v5);
    v6 = 739451169;
  }
  else
  {
    v3 = GuildTask::GetGuild();
    if ( (unsigned __int8)CClientGuild::AmIGuildMember(v3) != 1 )
      return;
    ((void (__stdcall *)(signed int, int))v1->m_pkMenuBtn[1]->vfptr[129].__vecDelDtor)(6, v5);
    v6 = -1782523934;
  }
  v4 = v1->m_pkMenuText[1]->vfptr;
  TextData::Get(v6);
  ((void (__thiscall *)(PgWinText *))v4[118].__vecDelDtor)(v1->m_pkMenuText[1]);
  ((void (__stdcall *)(signed int))v1->m_pkMenuBtn[0]->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(signed int))v1->m_pkMenuText[0]->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(signed int))v1->m_pkMenuBtn[1]->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(signed int))v1->m_pkMenuText[1]->vfptr[64].__vecDelDtor)(1);
}

//----- (005BFBE0) --------------------------------------------------------
char __thiscall GuildMenuWin::Create(GuildMenuWin *this, PgFrameWork *pkFrameWork)
{
  GuildMenuWin *v2; // ebx@1
  NiTexturePalette *v3; // esi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  char result; // al@9
  int v8; // esi@10
  int v9; // edi@10
  NiSourceTexture *v10; // eax@10
  PgSprData *v11; // eax@11
  PgSprData *v12; // eax@13
  PgSprData *v13; // eax@13
  PgSprData *v14; // edi@13
  NiSourceTexture *v15; // edi@13
  PgSprData *v16; // edi@14
  NiNode *v17; // esi@16
  PgFont *v18; // eax@21
  PgWinText *v19; // esi@21
  NiRefObjectVtbl *v20; // edi@21
  NiUnsharedGeometryGroup *v21; // eax@21
  int v22; // esi@21
  NiNode *v23; // edi@22
  const char *v24; // eax@22
  PgSprData *v25; // edi@22
  NiNode *pkObject; // ST58_4@22
  const char *v27; // eax@22
  NiNode *v28; // ST58_4@22
  const char *v29; // eax@22
  PgWinBut *v30; // eax@22
  NiPointer<PgSprData::PgHitTester> *v31; // ecx@22
  unsigned int v32; // edi@22
  NiAVObject *v33; // ST58_4@22
  PgFont *v34; // eax@22
  PgWinText *v35; // eax@22
  PgWinText *v36; // eax@23
  const char *v37; // ecx@23
  NiRefObjectVtbl *v38; // esi@25
  const char *v39; // ST44_4@25
  NiUnsharedGeometryGroup *v40; // eax@25
  char *v41; // eax@25
  GuildFoundWin *v42; // eax@25
  GuildFoundWin *v43; // esi@25
  GuildFoundWin *v44; // edi@25
  GuildMasterMenuWin *v45; // eax@32
  GuildMasterMenuWin *v46; // esi@32
  GuildMasterMenuWin *v47; // edi@32
  NiNode *v48; // esi@40
  unsigned int uiWidth; // [sp+5Ch] [bp-28h]@15
  unsigned int uiHeight; // [sp+60h] [bp-24h]@15
  int v51; // [sp+64h] [bp-20h]@21
  int iXOff; // [sp+68h] [bp-1Ch]@10
  int uiLeft; // [sp+6Ch] [bp-18h]@4
  int uiTop; // [sp+70h] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+74h] [bp-10h]@1
  int v56; // [sp+80h] [bp-4h]@1
  int iYOff; // [sp+8Ch] [bp+8h]@10
  int iYOffa; // [sp+8Ch] [bp+8h]@21

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v56 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildMenu.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "GuildMenuWin", 0) )
  {
    v6 = spNode.m_pObject;
    v56 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = uiLeft;
  v9 = uiTop;
  iXOff = uiLeft;
  iYOff = uiTop;
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v11, (PgWin *)&v2->vfptr, 0, 0);
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop, v13, (PgWin *)&v2->vfptr, 0, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinCloseBut::CreateWin(uiLeft - v8, uiTop - iYOff, v14, (PgWin *)&v2->vfptr);
  v15 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, v15);
    PgSprData::Add(v16, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(v16, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - iYOff, v16, (PgWin *)&v2->vfptr, 9u, 0, 0);
  }
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v18 = Font::Get(0);
    v19 = PgWinText::CreateWin(uiLeft - v8, uiTop, uiWidth, uiHeight, v18, (PgWin *)&v2->vfptr, 0, 0);
    v19->vfptr[122].__vecDelDtor((NiRefObject *)v19, 1u);
    v19->vfptr[117].__vecDelDtor((NiRefObject *)v19, (unsigned int)&Color::m_kDxWinTitleColor);
    v20 = v19->vfptr;
    v21 = TextData::Get(0x363D3C93u);
    v20[118].__vecDelDtor((NiRefObject *)v19, (unsigned int)v21);
    v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
    iYOffa = 1;
    v22 = (int)v2->m_pkMenuText;
    v51 = 7;
    do
    {
      v23 = spNode.m_pObject;
      v24 = fs("Btn%02dNor", iYOffa);
      v25 = PgSprData::Create((NiAVObject *)&v23->vfptr, v24, &uiLeft, &uiTop, 0);
      pkObject = spNode.m_pObject;
      v27 = fs("Btn%02dClick", iYOffa);
      PgSprData::Add(v25, (NiAVObject *)&pkObject->vfptr, v27);
      v28 = spNode.m_pObject;
      v29 = fs("Btn%02dOVer", iYOffa);
      PgSprData::Add(v25, (NiAVObject *)&v28->vfptr, v29);
      v30 = PgWinBut::CreateWin(uiLeft - iXOff, uiTop, v25, (PgWin *)&v2->vfptr, 0, 0, 0);
      *(_DWORD *)(v22 - 28) = v30;
      v30->vfptr[64].__vecDelDtor((NiRefObject *)v30, 0);
      v31 = v25->m_akHitTester.m_pBase;
      v32 = v31->m_pObject->m_uiHeight;
      v33 = (NiAVObject *)v31->m_pObject->m_uiWidth;
      v34 = Font::Get(0);
      v35 = PgWinText::CreateWin(uiLeft - iXOff, uiTop + 1, (unsigned int)v33, v32, v34, (PgWin *)&v2->vfptr, 0, 0);
      *(_DWORD *)v22 = v35;
      v35->vfptr[122].__vecDelDtor((NiRefObject *)v35, 5u);
      (*(void (__stdcall **)(void *))(**(_DWORD **)v22 + 472))(&unk_9ABC67);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v22 + 240))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v22 + 256))(0);
      ++iYOffa;
      v22 += 4;
      --v51;
    }
    while ( v51 );
    ((void (__stdcall *)(signed int))v2->m_pkMenuBtn[0]->vfptr[129].__vecDelDtor)(7);
    v36 = v2->m_pkMenuText[0];
    v2->m_pkMemberLoginInformText = v36;
    v37 = "(O)";
    if ( !byte_B4FF8F )
      v37 = "(X)";
    v38 = v36->vfptr;
    v39 = v37;
    v40 = TextData::Get(0x1A757781u);
    v41 = fs("%s%s", v40, v39);
    v38[118].__vecDelDtor((NiRefObject *)v2->m_pkMemberLoginInformText, (unsigned int)v41);
    v42 = GuildFoundWin::CreateWin(0);
    v43 = v2->m_spGuildFoundWin.m_pObject;
    v44 = v42;
    if ( v43 != v42 )
    {
      if ( v43 && !InterlockedDecrement((volatile LONG *)&v43->m_uiRefCount) && v43 )
        v43->vfptr->__vecDelDtor((NiRefObject *)v43, 1u);
      v2->m_spGuildFoundWin.m_pObject = v44;
      if ( v44 )
        InterlockedIncrement((volatile LONG *)&v44->m_uiRefCount);
    }
    v2->m_spGuildFoundWin.m_pObject->vfptr->SetMsgHooker(&v2->m_spGuildFoundWin.m_pObject->vfptr, &v2->vfptr);
    v45 = GuildMasterMenuWin::CreateWin(0);
    v46 = v2->m_spGuildMasterMenuWin.m_pObject;
    v47 = v45;
    if ( v46 != v45 )
    {
      if ( v46 && !InterlockedDecrement((volatile LONG *)&v46->m_uiRefCount) && v46 )
        v46->vfptr->__vecDelDtor((NiRefObject *)v46, 1u);
      v2->m_spGuildMasterMenuWin.m_pObject = v47;
      if ( v47 )
        InterlockedIncrement((volatile LONG *)&v47->m_uiRefCount);
    }
    v2->m_spGuildMasterMenuWin.m_pObject->vfptr->SetMsgHooker(&v2->m_spGuildMasterMenuWin.m_pObject->vfptr, &v2->vfptr);
    ((void (__thiscall *)(GuildMenuWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    v56 = -1;
    if ( spNode.m_pObject )
    {
      v48 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v48 )
          v48->vfptr->__vecDelDtor((NiRefObject *)v48, 1u);
      }
    }
    result = 1;
  }
  else
  {
    v17 = spNode.m_pObject;
    v56 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v17 )
      v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;
// B4FF8F: using guessed type char byte_B4FF8F;

//----- (005C01F0) --------------------------------------------------------
GuildMenuWin *__cdecl GuildMenuWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  GuildMenuWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x19Cu);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    GuildMenuWin::GuildMenuWin((GuildMenuWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (GuildMenuWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (005C0320) --------------------------------------------------------
void GuildMenuWin::OnCmdGuildAddMember()
{
  CClientGuild *v1; // eax@1
  char *v2; // eax@2
  CClientGuild *v3; // eax@3
  char *v4; // eax@4

  v1 = GuildTask::GetGuild();
  if ( (unsigned __int8)CClientGuild::AmIGuildMember(v1) )
  {
    v3 = GuildTask::GetGuild();
    if ( CClientGuild::CanIInvite(v3) )
    {
      ISingletonTask<GuildJoinReqTask>::Run();
    }
    else
    {
      v4 = (char *)TextData::Get(0x80D5CBDB);
      MsgBox::Modal(MSGBOX_OK, v4);
    }
  }
  else
  {
    v2 = (char *)TextData::Get(0x76816B99u);
    MsgBox::Modal(MSGBOX_OK, v2);
  }
}

//----- (005C0380) --------------------------------------------------------
void __thiscall GuildMenuWin::OnCmdGuildLeave(GuildMenuWin *this)
{
  GuildMenuWin *v1; // esi@1
  CClientGuild *v2; // eax@1
  char *v3; // eax@2
  CClientGuild *v4; // eax@3
  char *v5; // eax@4
  GuildLeaveTask *v6; // eax@5

  v1 = this;
  v2 = GuildTask::GetGuild();
  if ( (unsigned __int8)CClientGuild::AmIGuildMember(v2) )
  {
    v4 = GuildTask::GetGuild();
    if ( CClientGuild::AmIGuildMaster(v4) )
    {
      v5 = (char *)TextData::Get(0x363B0D6Cu);
      MsgBox::Modal(MSGBOX_OK, v5);
    }
    else
    {
      v6 = ISingletonTask<GuildLeaveTask>::Run();
      ((void (__stdcall *)(_DWORD))v6->vfptr->SetMsgHooker)(v1->m_pkFrameWork);
    }
  }
  else
  {
    v3 = (char *)TextData::Get(0x76816B99u);
    MsgBox::Modal(MSGBOX_OK, v3);
  }
}

//----- (005C03F0) --------------------------------------------------------
void __thiscall GuildMenuWin::OnCommand(GuildMenuWin *this, unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@5

  switch ( wParam )
  {
    case 6u:
      GuildMenuWin::OnCmdGuildLeave(this);
      break;
    case 8u:
      GuildMenuWin::OnCmdGuildMasterMenu(this);
      break;
    case 7u:
      byte_B4FF8F = byte_B4FF8F == 0;
      GuildMenuWin::UpdateInformGuildMemberLoginText(this);
      break;
    case 9u:
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v3 )
        GameFrameWork::OpenPlayGuideSearchList(v3, "GuildMenu");
      break;
    case 0xAu:
      GuildMenuWin::OnCmdGuildAddMember();
      break;
    default:
      return;
  }
}
// B4FF8F: using guessed type char byte_B4FF8F;

//----- (005C0480) --------------------------------------------------------
GuildMenuWin *__thiscall GuildMenuWin::`vector deleting destructor'(GuildMenuWin *this, unsigned int a2)
{
  GuildMenuWin *v2; // esi@1

  v2 = this;
  GuildMenuWin::~GuildMenuWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005C04B0) --------------------------------------------------------
GuildLeaveTask *__thiscall ISingletonTask<GuildLeaveTask>::`vector deleting destructor'(GuildLeaveTask *this, unsigned int a2)
{
  GuildLeaveTask *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ISingletonTask<GuildLeaveTask>::`vftable'{for `NiRefObject'};
  this->vfptr = (IDirectMessengerVtbl *)&ISingletonTask<GuildLeaveTask>::`vftable'{for `IDirectMessenger'};
  ISingletonTask<GuildLeaveTask>::ms_pkSingletonTask = 0;
  ITask::~ITask((ITask *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9ABF88: using guessed type void (__thiscall *ISingletonTask<GuildLeaveTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9ABFA4: using guessed type int (__thiscall *ISingletonTask<GuildLeaveTask>::`vftable'{for `NiRefObject'})(void *p, char);
// A8E118: using guessed type int ISingletonTask<GuildLeaveTask>::ms_pkSingletonTask;

//----- (005C04F0) --------------------------------------------------------
void GuildLeaveTask::OnStart()
{
  NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 0x1Cu, 0, 0);
}

//----- (005C0510) --------------------------------------------------------
GuildLeaveTask *__cdecl ISingletonTask<GuildLeaveTask>::Run()
{
  GuildLeaveTask *result; // eax@1
  ITask *v1; // eax@2
  GuildLeaveTask *v2; // esi@2

  result = (GuildLeaveTask *)ISingletonTask<GuildLeaveTask>::ms_pkSingletonTask;
  if ( !ISingletonTask<GuildLeaveTask>::ms_pkSingletonTask )
  {
    v1 = (ITask *)operator new(0x40u);
    v2 = (GuildLeaveTask *)v1;
    if ( v1 )
    {
      ITask::ITask(v1, 0);
      v2->vfptr = (NiRefObjectVtbl *)&GuildLeaveTask::`vftable'{for `NiRefObject'};
      v2->vfptr = (IDirectMessengerVtbl *)&GuildLeaveTask::`vftable'{for `IDirectMessenger'};
    }
    else
    {
      v2 = 0;
    }
    result = v2;
    ISingletonTask<GuildLeaveTask>::ms_pkSingletonTask = (int)v2;
  }
  return result;
}
// 9ABFBC: using guessed type void (__thiscall *GuildLeaveTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9ABFD8: using guessed type int (__thiscall *GuildLeaveTask::`vftable'{for `NiRefObject'})(void *p, char);
// A8E118: using guessed type int ISingletonTask<GuildLeaveTask>::ms_pkSingletonTask;

//----- (005C0590) --------------------------------------------------------
bool __thiscall GuildLeaveTask::OnProcessNetMsg(GuildLeaveTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  GuildLeaveTask *v5; // esi@1
  int v6; // eax@3
  char *v7; // eax@6
  CClientGuild *v8; // eax@7
  unsigned int v9; // edx@7
  char *v10; // eax@7
  int v11; // esi@7
  char *v12; // edi@7
  CClientGuild *v13; // eax@10
  CClientGuildAcademy *v14; // eax@10
  CClientGuildAcademy *v15; // eax@11
  CClientGuildAcademy *v16; // eax@12
  PgFrameWork *v17; // eax@12
  PgFrameWork *v18; // eax@12
  PgFrameWork *v19; // eax@14
  char *v20; // eax@17
  char *v21; // eax@17
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v23; // [sp-1Ch] [bp-40h]@17
  int v24; // [sp-8h] [bp-2Ch]@17
  char *v25; // [sp-4h] [bp-28h]@7
  GuildLeaveTask *v26; // [sp+8h] [bp-1Ch]@1
  char acMyGuildName[17]; // [sp+Ch] [bp-18h]@7

  v5 = this;
  v26 = this;
  if ( iDepart == 29 && iCommand == 29 )
  {
    v6 = *(_WORD *)pvData;
    if ( v6 == 3302 )
    {
      v7 = (char *)TextData2::Get(0x6D72B4D4u);
    }
    else
    {
      if ( v6 == 12688 )
      {
        v26 = (GuildLeaveTask *)&v23;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
          &v23,
          "Guild_CannotLeaveTime");
        v25 = (char *)(unsigned __int16)CSingleDataMap::GetValue(&g_kSingleDataMap, v23);
        v20 = (char *)TextData2::Get(0xFD4F187E);
        v21 = fs(v20, v25);
        MsgBox::Modal(MSGBOX_OK, v21, v24);
LABEL_20:
        v5->m_eTaskState = 2;
        return 0;
      }
      if ( *(_WORD *)pvData == 3137 )
      {
        v8 = GuildTask::GetGuild();
        *(_DWORD *)acMyGuildName = v8->m_Guild.sName.n4_code[0];
        *(_DWORD *)&acMyGuildName[4] = v8->m_Guild.sName.n4_code[1];
        *(_DWORD *)&acMyGuildName[8] = v8->m_Guild.sName.n4_code[2];
        v9 = v8->m_Guild.sName.n4_code[3];
        v25 = acMyGuildName;
        *(_DWORD *)&acMyGuildName[12] = v9;
        acMyGuildName[16] = 0;
        v10 = (char *)TextData::Get(0x5ED0E9E9u);
        v11 = (int)&v5->vfptr;
        v12 = fs(v10, acMyGuildName);
        if ( *(_DWORD *)(v11 + 4) )
        {
          (*(void (__stdcall **)(signed int, char *, int))(**(_DWORD **)(v11 + 4) + 4))(25, v12, v11);
          if ( *(_DWORD *)(v11 + 4) )
            (*(void (__stdcall **)(signed int, char *, int))(**(_DWORD **)(v11 + 4) + 20))(25, v12, v11);
        }
        (*(void (__thiscall **)(int, signed int, char *, int))(*(_DWORD *)v11 + 20))(v11, 25, v12, v11);
        GuildTask::GetGuild()->m_bIsGuild = 0;
        GuildMemberTask::GetGuildMember()->m_NumOfMembers = 0;
        v13 = GuildTask::GetGuild();
        CClientGuild::ClearHistoryList(v13);
        GuildTask::InvalidateGuildWindow();
        GuildAcademyMemberTask::GetGuildAcademyMember()->m_NumOfAcademyMembers = 0;
        GuildAcademyTask::GetGuildAcademy()->m_bIsGuildAcademyMember = 0;
        v14 = GuildAcademyTask::GetGuildAcademy();
        if ( (unsigned __int8)CClientGuildAcademy::AmIGuildAcademyMaster(v14) )
        {
          v15 = GuildAcademyTask::GetGuildAcademy();
          Name5::operator=(&v15->m_GuildAcademy.sAcademyMasterName, (const char *)&unk_96F8EB);
        }
        v16 = GuildAcademyTask::GetGuildAcademy();
        CClientGuildAcademy::ClearHistoryList(v16);
        v17 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
        GuildAcademyWin::InvalidateAcademy((GuildAcademyWin *)v17[24].m_kMsgQ.m_uiTail);
        v18 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
        if ( v18 )
          GuildWin::ClearGTInfo((GuildWin *)v18[24].vfptr);
        v19 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
        if ( v19 )
          GuildWin::ClearEmblem((GuildWin *)v19[24].vfptr);
        v5 = v26;
        goto LABEL_20;
      }
      v7 = (char *)TextData::Get(0xD3A3898u);
    }
    MsgBox::Modal(MSGBOX_OK, v7);
    goto LABEL_20;
  }
  return 0;
}

//----- (005C07B0) --------------------------------------------------------
void __thiscall GuildNameChangeWin::SetTitle(GuildNameChangeWin *this, const char *pkTitle)
{
  ((void (__stdcall *)(_DWORD))this->m_pTitleWin->vfptr[118].__vecDelDtor)(pkTitle);
}

//----- (005C07D0) --------------------------------------------------------
void __thiscall GuildNameChangeWin::SetCommentText(GuildNameChangeWin *this, const char *pkComment)
{
  ((void (__stdcall *)(_DWORD))this->m_pComment->vfptr[118].__vecDelDtor)(pkComment);
}

//----- (005C07F0) --------------------------------------------------------
void __thiscall GuildNameChangeWin::OnCmdCancel(GuildNameChangeWin *this)
{
  PgWin::PostMsg((PgWin *)&this->vfptr, 2u, 0, 0);
}

//----- (005C0800) --------------------------------------------------------
void GuildNameChangeWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "GuildChangeName");
}

//----- (005C0830) --------------------------------------------------------
void __thiscall GuildNameChangeWin::~GuildNameChangeWin(GuildNameChangeWin *this)
{
  GuildNameChangeWin *v1; // esi@1
  PgWinBut *v2; // edi@1
  PgWinBut *v3; // edi@6
  PgWinBut *v4; // edi@11
  PgWinBut *v5; // edi@18
  PgWinBut *v6; // edi@22
  PgWinBut *v7; // edi@26

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildNameChangeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildNameChangeWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spQuitButton.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spQuitButton.m_pObject = 0;
  }
  v3 = v1->m_spOKButton.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spOKButton.m_pObject = 0;
  }
  v4 = v1->m_spCancleButton.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spCancleButton.m_pObject = 0;
  }
  if ( v1->m_OKButtonMsgFunc.manager )
    v1->m_OKButtonMsgFunc.functor.obj_ptr = (void *)((int (__cdecl *)(_DWORD, _DWORD))v1->m_OKButtonMsgFunc.manager)(
                                                      v1->m_OKButtonMsgFunc.functor.obj_ptr,
                                                      1);
  v1->m_OKButtonMsgFunc.manager = 0;
  v1->m_OKButtonMsgFunc.invoker = 0;
  v5 = v1->m_spCancleButton.m_pObject;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  v6 = v1->m_spOKButton.m_pObject;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  v7 = v1->m_spQuitButton.m_pObject;
  if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9AC0D8: using guessed type void (__thiscall *GuildNameChangeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AC0F4: using guessed type int (__thiscall *GuildNameChangeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005C09D0) --------------------------------------------------------
char __thiscall GuildNameChangeWin::Create(GuildNameChangeWin *this)
{
  GuildNameChangeWin *v1; // esi@1
  NiTexturePalette *v2; // edi@1
  const char *v3; // eax@3
  PgSprData *v4; // eax@4
  NiNode *v5; // esi@5
  NiSourceTexture *v7; // eax@10
  PgSprData *v8; // eax@11
  D3DXCOLOR v9; // ST08_16@13
  D3DXCOLOR v10; // ST08_16@13
  PgWinBut *v11; // eax@13
  PgWinBut *v12; // edi@13
  PgWinBut *v13; // ebx@13
  PgWinBut *v14; // eax@20
  PgWinBut *v15; // edi@20
  PgWinBut *v16; // ebx@20
  PgWin *v17; // edi@27
  D3DXCOLOR v18; // ST08_16@27
  char *v19; // eax@27
  NiSourceTexture *v20; // edi@27
  PgWinBut *v21; // eax@29
  PgWinBut *v22; // edi@29
  PgWinBut *v23; // ebx@29
  PgWin *v24; // edi@36
  D3DXCOLOR v25; // ST08_16@36
  char *v26; // eax@36
  EditWin *v27; // eax@36
  NiNode *v28; // esi@37
  UIUtil ui; // [sp+28h] [bp-2Ch]@10
  int iLeft; // [sp+3Ch] [bp-18h]@1
  int iTop; // [sp+40h] [bp-14h]@1
  NiPointer<NiNode> spNode; // [sp+44h] [bp-10h]@1
  int v33; // [sp+50h] [bp-4h]@1

  v1 = this;
  spNode.m_pObject = 0;
  v2 = pTexturePalette;
  v33 = 0;
  iLeft = 0;
  iTop = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v3 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildChangeName.nif");
  PgUtil::LoadNodeNifFile(v3, &spNode, v2);
  if ( !spNode.m_pObject )
    return 0;
  v4 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iLeft, &iTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v1->vfptr, 0, 0, v4, 0, 0, "GuildNameChangeWin", 0) )
  {
    v5 = spNode.m_pObject;
    v33 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
    return 0;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v33) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v1->vfptr);
  UIUtil::SetOffset(&ui, iLeft, iTop);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  UIUtil::CreateSpr(&ui, "Panel01", 0);
  UIUtil::CreateSpr(&ui, "Panel02", 0);
  v7 = MenuTexMgr::GetTexture(0x13u);
  if ( v7 )
    v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, v7);
  else
    v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft, iTop, v8, (PgWin *)&v1->vfptr, 0, 0);
  *(_QWORD *)&v9.r = *(_QWORD *)&Color::m_kDxYellowColor.r;
  *(_QWORD *)&v9.b = *(_QWORD *)&Color::m_kDxYellowColor.b;
  v1->m_pTitleWin = UIUtil::CreateTextNoSpr(&ui, "WinTitle", &byte_9AC01D, v9, 5u);
  *(_QWORD *)&v10.r = *(_QWORD *)&Color::m_kDxYellowColor.r;
  *(_QWORD *)&v10.b = *(_QWORD *)&Color::m_kDxYellowColor.b;
  v1->m_pComment = UIUtil::CreateTextNoSpr(&ui, "Text01", byte_9AC01E, v10, 5u);
  v11 = UIUtil::CreateButton(&ui, 1u, off_9AC070, 0, 3);
  v12 = v1->m_spQuitButton.m_pObject;
  v13 = v11;
  if ( v12 != v11 )
  {
    if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
      v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
    v1->m_spQuitButton.m_pObject = v13;
    if ( v13 )
      InterlockedIncrement((volatile LONG *)&v13->m_uiRefCount);
  }
  v14 = UIUtil::CreateButton(&ui, 0, "Btn01", 0, 3);
  v15 = v1->m_spOKButton.m_pObject;
  v16 = v14;
  if ( v15 != v14 )
  {
    if ( v15 && !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) && v15 )
      v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
    v1->m_spOKButton.m_pObject = v16;
    if ( v16 )
      InterlockedIncrement((volatile LONG *)&v16->m_uiRefCount);
  }
  v17 = (PgWin *)&v1->m_spOKButton.m_pObject->vfptr;
  *(_QWORD *)&v18.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v18.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v19 = (char *)TextData::Get(0x4F5F499Fu);
  UIUtil::CreateAttachedText(v17, v19, v18, 5u);
  v20 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
    UIUtil::CreateBtn(&ui, 2u, "HelpLinkNor", "HelpLinkOver", "HelpLinkClick", 0, v20);
  v21 = UIUtil::CreateButton(&ui, 1u, "Btn02", 0, 3);
  v22 = v1->m_spCancleButton.m_pObject;
  v23 = v21;
  if ( v22 != v21 )
  {
    if ( v22 && !InterlockedDecrement((volatile LONG *)&v22->m_uiRefCount) && v22 )
      v22->vfptr->__vecDelDtor((NiRefObject *)v22, 1u);
    v1->m_spCancleButton.m_pObject = v23;
    if ( v23 )
      InterlockedIncrement((volatile LONG *)&v23->m_uiRefCount);
  }
  v24 = (PgWin *)&v1->m_spCancleButton.m_pObject->vfptr;
  *(_QWORD *)&v25.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v25.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v26 = (char *)TextData::Get(0x88A297E1);
  UIUtil::CreateAttachedText(v24, v26, v25, 5u);
  v27 = UIUtil::CreateEdit(&ui, "Panel03", 16, NORMAL, 0, 1);
  v1->m_pEditWin = v27;
  ((void (__thiscall *)(EditWin *))v27->vfptr[120].__vecDelDtor)(v27);
  ((void (__thiscall *)(GuildNameChangeWin *, unsigned int, unsigned int, _DWORD, _DWORD))v1->vfptr[59].__vecDelDtor)(
    v1,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  LOBYTE(v33) = 0;
  UIUtil::~UIUtil(&ui);
  v33 = -1;
  if ( spNode.m_pObject )
  {
    v28 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v28 )
        v28->vfptr->__vecDelDtor((NiRefObject *)v28, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005C0E30) --------------------------------------------------------
void __thiscall GuildNameChangeWin::GuildNameChangeWin(GuildNameChangeWin *this)
{
  GuildNameChangeWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GuildNameChangeWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildNameChangeWin::`vftable'{for `IDirectMessenger'};
  v1->m_spQuitButton.m_pObject = 0;
  v1->m_spOKButton.m_pObject = 0;
  v1->m_spCancleButton.m_pObject = 0;
  v1->m_OKButtonMsgFunc.manager = 0;
  v1->m_OKButtonMsgFunc.functor.obj_ptr = 0;
  v1->m_OKButtonMsgFunc.invoker = 0;
}
// 9AC0D8: using guessed type void (__thiscall *GuildNameChangeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AC0F4: using guessed type int (__thiscall *GuildNameChangeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005C0E80) --------------------------------------------------------
void __thiscall GuildNameChangeWin::OnCmdOk(GuildNameChangeWin *this)
{
  GuildNameChangeWin *v1; // edi@1
  char *v2; // eax@2
  ProcessingString *v3; // esi@2
  GameFrameWork *v4; // esi@3
  NiUnsharedGeometryGroup *v5; // eax@4
  int v6; // eax@5

  v1 = this;
  if ( !this->m_OKButtonMsgFunc.manager )
    goto LABEL_6;
  v2 = (char *)((int (*)(void))this->m_pEditWin->vfptr[113].__vecDelDtor)();
  v3 = TextFilterTable::FilterSlander(v2);
  if ( !strcmp((const char *)((int (*)(void))v1->m_pEditWin->vfptr[113].__vecDelDtor)(), v3->m_acSource) )
  {
    v6 = ((int (*)(void))v1->m_pEditWin->vfptr[113].__vecDelDtor)();
    boost::function1<void,int,std::allocator<void>>::operator()(
      (boost::function1<void,int,std::allocator<void> > *)&v1->m_OKButtonMsgFunc,
      v6);
LABEL_6:
    PgWin::PostMsg((PgWin *)&v1->vfptr, 2u, 0, 0);
    return;
  }
  v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v4 )
  {
    v5 = TextData::Get(0x24663F86u);
    GameFrameWork::AddSysMsg(v4, (const char *)v5);
  }
}

//----- (005C0F50) --------------------------------------------------------
GuildNameChangeWin *__cdecl GuildNameChangeWin::CreateWin()
{
  PgWin *v0; // eax@1
  PgWin *v1; // esi@1
  PgWin *v2; // edi@8
  GuildNameChangeWin *v3; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v5; // [sp+20h] [bp-4h]@1

  v0 = (PgWin *)operator new(0x17Cu);
  v1 = v0;
  result.m_pObject = v0;
  v5 = 0;
  if ( v0 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v0);
    v1->vfptr = (NiRefObjectVtbl *)&GuildNameChangeWin::`vftable'{for `NiNode'};
    v1->vfptr = (IDirectMessengerVtbl *)&GuildNameChangeWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v1[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v1[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
    LODWORD(v1[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = 0;
    LODWORD(v1[1].m_kLocal.m_Rotate.m_pEntry[2][1]) = 0;
    LODWORD(v1[1].m_kLocal.m_Rotate.m_pEntry[2][2]) = 0;
    LODWORD(v1[1].m_kLocal.m_Translate.x) = 0;
  }
  else
  {
    v1 = 0;
  }
  if ( v1 )
    InterlockedIncrement((volatile LONG *)&v1->m_uiRefCount);
  v5 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v1);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *))v1->vfptr[135].__vecDelDtor)(v1) )
  {
    ((void (__thiscall *)(PgWin *))v1->vfptr[89].__vecDelDtor)(v1);
    v5 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
      v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
    v3 = (GuildNameChangeWin *)v1;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v1);
    if ( result.m_pObject )
    {
      v2 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v2 )
          v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
      }
    }
    v5 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
      v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
    v3 = 0;
  }
  return v3;
}
// 9AC0D8: using guessed type void (__thiscall *GuildNameChangeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AC0F4: using guessed type int (__thiscall *GuildNameChangeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005C10B0) --------------------------------------------------------
void __thiscall GuildNameChangeWin::RegisterCallBack(GuildNameChangeWin *this, boost::function<void __cdecl(char const *),std::allocator<void> > CallBackFunc)
{
  int v2; // eax@1
  char *v3; // esi@1
  boost::detail::function::any_pointer (__cdecl *v4)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // ecx@1
  boost::detail::function::any_pointer (__cdecl *v5)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // edi@1
  boost::detail::function::unusable *(__cdecl *v6)(boost::detail::function::unusable *, boost::detail::function::any_pointer, const char *); // ebx@1
  boost::detail::function::any_pointer (__cdecl *v7)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // edx@4
  int v8; // edx@4
  char v9; // [sp+10h] [bp-18h]@3
  int v10; // [sp+24h] [bp-4h]@1

  v2 = 0;
  v3 = (char *)&this->m_OKButtonMsgFunc;
  v4 = CallBackFunc.manager;
  v5 = 0;
  v6 = 0;
  v10 = 0;
  if ( CallBackFunc.manager )
  {
    v6 = CallBackFunc.invoker;
    v5 = CallBackFunc.manager;
    v2 = ((int (__cdecl *)(void *, _DWORD))CallBackFunc.manager)(CallBackFunc.functor.obj_ptr, 0);
    v4 = CallBackFunc.manager;
  }
  if ( v3 != &v9 )
  {
    v7 = v5;
    v5 = *(boost::detail::function::any_pointer (__cdecl **)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type))v3;
    *(_DWORD *)v3 = v7;
    v8 = v2;
    v2 = *((_DWORD *)v3 + 1);
    *((_DWORD *)v3 + 1) = v8;
    *((_DWORD *)v3 + 2) = v6;
  }
  if ( v5 )
  {
    ((void (__cdecl *)(int, signed int))v5)(v2, 1);
    v4 = CallBackFunc.manager;
  }
  v10 = -1;
  if ( v4 )
    ((void (__cdecl *)(void *, signed int))v4)(CallBackFunc.functor.obj_ptr, 1);
}

//----- (005C1160) --------------------------------------------------------
void __thiscall GuildNameChangeWin::OnCommand(GuildNameChangeWin *this, unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@4

  if ( wParam )
  {
    if ( wParam == 1 )
    {
      PgWin::PostMsg((PgWin *)&this->vfptr, 2u, 0, 0);
    }
    else if ( wParam == 2 )
    {
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v3 )
        GameFrameWork::OpenPlayGuideSearchList(v3, "GuildChangeName");
    }
  }
  else
  {
    GuildNameChangeWin::OnCmdOk(this);
  }
}

//----- (005C11B0) --------------------------------------------------------
GuildNameChangeWin *__cdecl GuildNameChangeWin::Modal(const char *pkTitleName)
{
  GuildNameChangeWin *result; // eax@1
  GuildNameChangeWin *v2; // esi@1

  result = GuildNameChangeWin::CreateWin();
  v2 = result;
  if ( result )
  {
    ((void (__stdcall *)(const char *))result->m_pTitleWin->vfptr[118].__vecDelDtor)(pkTitleName);
    PgWinMgr::DoModal(&Pgg_kWinMgr, (PgWin *)&v2->vfptr, 0, 0, 0);
    result = v2;
  }
  return result;
}

//----- (005C11F0) --------------------------------------------------------
GuildNameChangeWin *__cdecl GuildNameChangeWin::Modeless(const char *pkTitleName)
{
  GuildNameChangeWin *result; // eax@1
  GuildNameChangeWin *v2; // esi@1

  result = GuildNameChangeWin::CreateWin();
  v2 = result;
  if ( result )
  {
    ((void (__stdcall *)(const char *))result->m_pTitleWin->vfptr[118].__vecDelDtor)(pkTitleName);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
    result = v2;
  }
  return result;
}

//----- (005C1230) --------------------------------------------------------
GuildNameChangeWin *__thiscall GuildNameChangeWin::`vector deleting destructor'(GuildNameChangeWin *this, unsigned int a2)
{
  GuildNameChangeWin *v2; // esi@1

  v2 = this;
  GuildNameChangeWin::~GuildNameChangeWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005C1260) --------------------------------------------------------
void __thiscall GuildNoticeEditorWin::GuildNoticeEditorWin(GuildNoticeEditorWin *this)
{
  GuildNoticeEditorWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GuildNoticeEditorWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildNoticeEditorWin::`vftable'{for `IDirectMessenger'};
}
// 9AC43C: using guessed type void (__thiscall *GuildNoticeEditorWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AC45C: using guessed type int (__thiscall *GuildNoticeEditorWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005C1280) --------------------------------------------------------
void __thiscall GuildNoticeEditorWin::~GuildNoticeEditorWin(GuildNoticeEditorWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GuildNoticeEditorWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildNoticeEditorWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9AC43C: using guessed type void (__thiscall *GuildNoticeEditorWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AC45C: using guessed type int (__thiscall *GuildNoticeEditorWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005C12A0) --------------------------------------------------------
void __thiscall GuildNoticeEditorWin::OnClose(GuildNoticeEditorWin *this)
{
  ((void (__stdcall *)(_DWORD))this->m_pkEditWin->vfptr[121].__vecDelDtor)(1);
}

//----- (005C12C0) --------------------------------------------------------
void __thiscall GuildNoticeEditorWin::OnShowWin(GuildNoticeEditorWin *this)
{
  GuildNoticeEditorWin *v1; // esi@1

  v1 = this;
  ((void (*)(void))this->m_pkEditWin->vfptr[117].__vecDelDtor)();
  ((void (*)(void))v1->m_pkEditWin->vfptr[120].__vecDelDtor)();
}

//----- (005C12F0) --------------------------------------------------------
void GuildNoticeEditorWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "GuildEditor");
}

//----- (005C1320) --------------------------------------------------------
void __thiscall GuildNotifyTask::OnStart(GuildNotifyTask *this)
{
  GuildNotifyTask *v1; // esi@1
  unsigned int v2; // edi@1
  _WORD *v3; // eax@1
  _BYTE *v4; // ebx@1
  char **v5; // eax@1
  int v6; // edx@3
  char v7; // cl@4

  v1 = this;
  v2 = this->m_kNoticeMsg._Mysize + 3;
  v3 = operator new[](v2);
  v4 = v3;
  *v3 = LOWORD(v1->m_kNoticeMsg._Mysize) + 1;
  v5 = &v1->m_kNoticeMsg._Bx._Ptr;
  if ( v1->m_kNoticeMsg._Myres >= 0x10 )
    v5 = (char **)*v5;
  v6 = v4 + 2 - (_BYTE *)v5;
  do
  {
    v7 = *(_BYTE *)v5;
    *((_BYTE *)v5 + v6) = *(_BYTE *)v5;
    v5 = (char **)((char *)v5 + 1);
  }
  while ( v7 );
  NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 0x10u, v4, v2);
  operator delete[](v4);
}

//----- (005C1380) --------------------------------------------------------
bool __thiscall GuildNotifyTask::OnProcessNetMsg(GuildNotifyTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  GuildNotifyTask *v5; // esi@1
  char *v6; // eax@4

  v5 = this;
  if ( iDepart == 29 && iCommand == 17 )
  {
    if ( *(_WORD *)pvData != 3137 )
    {
      v6 = (char *)TextData::Get(0x237746A2u);
      MsgBox::Modal(MSGBOX_OK, v6);
    }
    v5->m_eTaskState = 2;
  }
  return 0;
}

//----- (005C13D0) --------------------------------------------------------
char __thiscall GuildNoticeEditorWin::Create(GuildNoticeEditorWin *this, PgFrameWork *pkFrameWork)
{
  GuildNoticeEditorWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  char result; // al@9
  int v8; // edi@10
  int v9; // ebx@10
  NiSourceTexture *v10; // eax@10
  PgSprData *v11; // eax@11
  PgSprData *v12; // eax@13
  PgSprData *v13; // eax@13
  PgSprData *v14; // edi@13
  NiSourceTexture *v15; // edi@13
  PgSprData *v16; // edi@14
  NiNode *v17; // esi@16
  PgFont *v18; // eax@21
  PgWinText *v19; // edi@21
  NiUnsharedGeometryGroup *v20; // eax@21
  PgSprData *v21; // edi@21
  NiPointer<PgSprData::PgHitTester> *v22; // edx@21
  unsigned int v23; // edi@21
  PgFont *v24; // eax@21
  PgWinText *v25; // edi@21
  NiUnsharedGeometryGroup *v26; // eax@21
  PgSprData *v27; // edi@21
  NiPointer<PgSprData::PgHitTester> *v28; // edx@21
  unsigned int v29; // edi@21
  PgFont *v30; // eax@21
  PgWinText *v31; // edi@21
  NiRefObjectVtbl *v32; // ebx@21
  NiUnsharedGeometryGroup *v33; // eax@21
  NiNode *v34; // esi@22
  unsigned int uiWidth; // [sp+44h] [bp-20h]@15
  unsigned int uiHeight; // [sp+48h] [bp-1Ch]@15
  int uiLeft; // [sp+4Ch] [bp-18h]@4
  int uiTop; // [sp+50h] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+54h] [bp-10h]@1
  int v40; // [sp+60h] [bp-4h]@1
  int iYOff; // [sp+6Ch] [bp+8h]@10
  int iYOffa; // [sp+6Ch] [bp+8h]@21
  int iYOffb; // [sp+6Ch] [bp+8h]@21
  int iYOffc; // [sp+6Ch] [bp+8h]@21
  int iYOffd; // [sp+6Ch] [bp+8h]@21

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v40 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildEditor.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "GuildNoticeEditorWin", 0) )
  {
    v6 = spNode.m_pObject;
    v40 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = uiTop;
  v9 = uiLeft;
  iYOff = uiTop;
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v8, v11, (PgWin *)&v2->vfptr, 0, 0);
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop, v13, (PgWin *)&v2->vfptr, 0, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinCloseBut::CreateWin(uiLeft - v9, uiTop - iYOff, v14, (PgWin *)&v2->vfptr);
  v15 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, v15);
    PgSprData::Add(v16, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(v16, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v9, uiTop - iYOff, v16, (PgWin *)&v2->vfptr, 2u, 0, 0);
  }
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v18 = Font::Get(0);
    v19 = PgWinText::CreateWin(uiLeft - v9, uiTop, uiWidth, uiHeight, v18, (PgWin *)&v2->vfptr, 0, 0);
    v19->vfptr[122].__vecDelDtor((NiRefObject *)v19, 1u);
    v19->vfptr[117].__vecDelDtor((NiRefObject *)v19, (unsigned int)&Color::m_kDxWinTitleColor);
    iYOffa = (int)v19->vfptr;
    v20 = TextData::Get(0x3D25058Eu);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(iYOffa + 472))(v19, v20);
    v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
    v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "AddFrndNor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "AddFrndClick");
    PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "AddFrndOver");
    PgWinBut::CreateWin(uiLeft - v9, uiTop, v21, (PgWin *)&v2->vfptr, 0, 0, 0);
    v22 = v21->m_akHitTester.m_pBase;
    v23 = v22->m_pObject->m_uiHeight;
    iYOffb = v22->m_pObject->m_uiWidth;
    v24 = Font::Get(0);
    v25 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOffb, v23, v24, (PgWin *)&v2->vfptr, 0, 0);
    v25->vfptr[122].__vecDelDtor((NiRefObject *)v25, 5u);
    iYOffc = (int)v25->vfptr;
    v26 = TextData::Get(0x4F5F499Fu);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(iYOffc + 472))(v25, v26);
    v25->vfptr[60].__vecDelDtor((NiRefObject *)v25, 0);
    v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "AddFrndNor01", &uiLeft, &uiTop, 0);
    PgSprData::Add(v27, (NiAVObject *)&spNode.m_pObject->vfptr, "AddFrndClick01");
    PgSprData::Add(v27, (NiAVObject *)&spNode.m_pObject->vfptr, "AddFrndOver01");
    PgWinBut::CreateWin(uiLeft - v9, uiTop, v27, (PgWin *)&v2->vfptr, 1u, 0, 0);
    v28 = v27->m_akHitTester.m_pBase;
    v29 = v28->m_pObject->m_uiHeight;
    iYOffd = v28->m_pObject->m_uiWidth;
    v30 = Font::Get(0);
    v31 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOffd, v29, v30, (PgWin *)&v2->vfptr, 0, 0);
    v31->vfptr[122].__vecDelDtor((NiRefObject *)v31, 5u);
    v32 = v31->vfptr;
    v33 = TextData::Get(0x88A297E1);
    v32[118].__vecDelDtor((NiRefObject *)v31, (unsigned int)v33);
    v31->vfptr[60].__vecDelDtor((NiRefObject *)v31, 0);
    PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &uiLeft, &uiTop, &uiWidth, &uiHeight);
    v2->m_pkEditWin = EditWin::CreateWin(
                        uiLeft,
                        uiTop,
                        uiWidth,
                        uiHeight,
                        (PgWin *)&v2->vfptr,
                        MULTILINE,
                        0x190u,
                        4u,
                        0,
                        0,
                        1);
    ((void (__thiscall *)(GuildNoticeEditorWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    v40 = -1;
    if ( spNode.m_pObject )
    {
      v34 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v34 )
          v34->vfptr->__vecDelDtor((NiRefObject *)v34, 1u);
      }
    }
    result = 1;
  }
  else
  {
    v17 = spNode.m_pObject;
    v40 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v17 )
      v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005C1960) --------------------------------------------------------
GuildNoticeEditorWin *__cdecl GuildNoticeEditorWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  GuildNoticeEditorWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x15Cu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&GuildNoticeEditorWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&GuildNoticeEditorWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (GuildNoticeEditorWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9AC43C: using guessed type void (__thiscall *GuildNoticeEditorWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AC45C: using guessed type int (__thiscall *GuildNoticeEditorWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005C1AA0) --------------------------------------------------------
void __thiscall GuildNotifyTask::SetInfo(GuildNotifyTask *this, char *pcNotice)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &this->m_kNoticeMsg,
    pcNotice,
    strlen(pcNotice));
}

//----- (005C1AD0) --------------------------------------------------------
void __thiscall GuildNoticeEditorWin::OnCommand(GuildNoticeEditorWin *this, unsigned int wParam, int lParam)
{
  GuildNoticeEditorWin *v3; // ebx@1
  GameFrameWork *v4; // eax@4
  const char *v5; // eax@7
  const char *v6; // esi@7
  char v7; // cl@9
  GuildNotifyTask *v8; // eax@10

  v3 = this;
  if ( wParam )
  {
    if ( wParam == 1 )
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
    }
    else if ( wParam == 2 )
    {
      v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v4 )
        GameFrameWork::OpenPlayGuideSearchList(v4, "GuildEditor");
    }
  }
  else
  {
    v5 = (const char *)((int (*)(void))this->m_pkEditWin->vfptr[113].__vecDelDtor)();
    v6 = v5;
    if ( v5 && *v5 )
    {
      do
        v7 = *v5++;
      while ( v7 );
      v8 = ISingletonTask<GuildNotifyTask>::Run();
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v8->m_kNoticeMsg, v6, strlen(v6));
    }
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
  }
}

//----- (005C1BB0) --------------------------------------------------------
GuildNoticeEditorWin *__thiscall GuildNoticeEditorWin::`scalar deleting destructor'(GuildNoticeEditorWin *this, unsigned int a2)
{
  GuildNoticeEditorWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildNoticeEditorWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildNoticeEditorWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9AC43C: using guessed type void (__thiscall *GuildNoticeEditorWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AC45C: using guessed type int (__thiscall *GuildNoticeEditorWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005C1BF0) --------------------------------------------------------
ISingletonTask<GuildNotifyTask> *__thiscall ISingletonTask<GuildNotifyTask>::`vector deleting destructor'(ISingletonTask<GuildNotifyTask> *this, unsigned int a2)
{
  ISingletonTask<GuildNotifyTask> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ISingletonTask<GuildNotifyTask>::`vftable'{for `NiRefObject'};
  this->vfptr = (IDirectMessengerVtbl *)&ISingletonTask<GuildNotifyTask>::`vftable'{for `IDirectMessenger'};
  ISingletonTask<GuildNotifyTask>::ms_pkSingletonTask = 0;
  ITask::~ITask((ITask *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9AC680: using guessed type void (__thiscall *ISingletonTask<GuildNotifyTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AC69C: using guessed type int (__thiscall *ISingletonTask<GuildNotifyTask>::`vftable'{for `NiRefObject'})(void *p, char);
// A8E11C: using guessed type int ISingletonTask<GuildNotifyTask>::ms_pkSingletonTask;

//----- (005C1C30) --------------------------------------------------------
GuildNotifyTask *__cdecl ISingletonTask<GuildNotifyTask>::Run()
{
  GuildNotifyTask *result; // eax@1
  ITask *v1; // eax@2
  GuildNotifyTask *v2; // esi@2

  result = (GuildNotifyTask *)ISingletonTask<GuildNotifyTask>::ms_pkSingletonTask;
  if ( !ISingletonTask<GuildNotifyTask>::ms_pkSingletonTask )
  {
    v1 = (ITask *)operator new(0x5Cu);
    v2 = (GuildNotifyTask *)v1;
    if ( v1 )
    {
      ITask::ITask(v1, 0);
      v2->vfptr = (NiRefObjectVtbl *)&GuildNotifyTask::`vftable'{for `NiRefObject'};
      v2->vfptr = (IDirectMessengerVtbl *)&GuildNotifyTask::`vftable'{for `IDirectMessenger'};
      v2->m_kNoticeMsg._Myres = 15;
      v2->m_kNoticeMsg._Mysize = 0;
      v2->m_kNoticeMsg._Bx._Buf[0] = 0;
    }
    else
    {
      v2 = 0;
    }
    result = v2;
    ISingletonTask<GuildNotifyTask>::ms_pkSingletonTask = (int)v2;
  }
  return result;
}
// 9AC6B4: using guessed type void (__thiscall *GuildNotifyTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AC6D0: using guessed type int (__thiscall *GuildNotifyTask::`vftable'{for `NiRefObject'})(void *p, char);
// A8E11C: using guessed type int ISingletonTask<GuildNotifyTask>::ms_pkSingletonTask;

//----- (005C1CC0) --------------------------------------------------------
GuildNotifyTask *__thiscall GuildNotifyTask::`scalar deleting destructor'(GuildNotifyTask *this, unsigned int a2)
{
  GuildNotifyTask *v2; // esi@1

  v2 = this;
  if ( this->m_kNoticeMsg._Myres >= 0x10 )
    operator delete(this->m_kNoticeMsg._Bx._Ptr);
  v2->m_kNoticeMsg._Myres = 15;
  v2->m_kNoticeMsg._Mysize = 0;
  v2->m_kNoticeMsg._Bx._Buf[0] = 0;
  v2->vfptr = (NiRefObjectVtbl *)&ISingletonTask<GuildNotifyTask>::`vftable'{for `NiRefObject'};
  v2->vfptr = (IDirectMessengerVtbl *)&ISingletonTask<GuildNotifyTask>::`vftable'{for `IDirectMessenger'};
  ISingletonTask<GuildNotifyTask>::ms_pkSingletonTask = 0;
  ITask::~ITask((ITask *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9AC680: using guessed type void (__thiscall *ISingletonTask<GuildNotifyTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AC69C: using guessed type int (__thiscall *ISingletonTask<GuildNotifyTask>::`vftable'{for `NiRefObject'})(void *p, char);
// A8E11C: using guessed type int ISingletonTask<GuildNotifyTask>::ms_pkSingletonTask;

//----- (005C1D20) --------------------------------------------------------
void __thiscall GuildDismissTask::OnFinish(GuildDismissTask *this)
{
  PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkInputBox->vfptr);
}

//----- (005C1D30) --------------------------------------------------------
void __thiscall GuildNpcMenuWin::Close(GuildNpcMenuWin *this)
{
  GuildNpcMenuWin *v1; // esi@1

  v1 = this;
  this->m_bDuplicationCheck = 1;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 8u, 0xBu, 0, 0);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}

//----- (005C1D60) --------------------------------------------------------
void __thiscall GuildNpcMenuWin::OnClose(GuildNpcMenuWin *this)
{
  if ( !this->m_bDuplicationCheck )
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 8u, 0xBu, 0, 0);
}

//----- (005C1D80) --------------------------------------------------------
void __thiscall GuildNpcMenuWin::OnShowWin(GuildNpcMenuWin *this)
{
  this->m_bDuplicationCheck = 0;
}

//----- (005C1D90) --------------------------------------------------------
void __thiscall GuildNpcMenuWin::OnClickGuildAcademyMenuBtn(GuildNpcMenuWin *this)
{
  GuildNpcMenuWin *v1; // edi@1
  GuildAcademyMenuWin *v2; // eax@1
  GuildAcademyMenuWin *v3; // esi@2
  GuildAcademyMenuWin *v4; // eax@2
  int YPos; // [sp+4h] [bp-8h]@2
  int XPos; // [sp+8h] [bp-4h]@2

  v1 = this;
  v2 = GuildAcademyTask::GetGuildAcademyMenuWin();
  if ( !(unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[65].__vecDelDtor)(v2) )
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
    v3 = GuildAcademyTask::GetGuildAcademyMenuWin();
    ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[45].__vecDelDtor)(v1, &XPos, &YPos);
    v3->vfptr[43].__vecDelDtor((NiRefObject *)v3, XPos);
    v3->vfptr[44].__vecDelDtor((NiRefObject *)v3, YPos);
    v4 = GuildAcademyTask::GetGuildAcademyMenuWin();
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v4->vfptr);
  }
}

//----- (005C1E10) --------------------------------------------------------
void GuildNpcMenuWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "GuildMenu");
}

//----- (005C1E40) --------------------------------------------------------
void __thiscall GuildNpcMenuWin::OnClickPrevMenuBtn(GuildNpcMenuWin *this)
{
  GuildNpcMenuWin *v1; // esi@1
  GuildSelectWin *v2; // esi@1
  int YPos; // [sp+4h] [bp-8h]@1
  int XPos; // [sp+8h] [bp-4h]@1

  v1 = this;
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[45].__vecDelDtor)(v1, &XPos, &YPos);
  v2 = GuildTask::GetGuildSelectWin();
  v2->vfptr[43].__vecDelDtor((NiRefObject *)v2, XPos);
  v2->vfptr[44].__vecDelDtor((NiRefObject *)v2, YPos);
  if ( !(unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[65].__vecDelDtor)(v2) )
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
}

//----- (005C1EB0) --------------------------------------------------------
void __thiscall GuildNpcMenuWin::MenuBtnSetting(GuildNpcMenuWin *this, unsigned int BtnType, unsigned int PGWM_CMD_TYPE, char *pkText)
{
  GuildNpcMenuWin *v4; // esi@1

  v4 = this;
  if ( this->m_pkMenuBtn[BtnType] )
  {
    ((void (__stdcall *)(_DWORD))this->m_pkMenuBtn[BtnType]->vfptr[129].__vecDelDtor)(PGWM_CMD_TYPE);
    ((void (__stdcall *)(_DWORD))v4->m_pkMenuBtn[BtnType]->vfptr[64].__vecDelDtor)(1);
  }
  if ( v4->m_pkMenuTxt[BtnType] )
  {
    ((void (__stdcall *)(_DWORD))v4->m_pkMenuTxt[BtnType]->vfptr[118].__vecDelDtor)(pkText);
    ((void (__stdcall *)(_DWORD))v4->m_pkMenuTxt[BtnType]->vfptr[64].__vecDelDtor)(1);
  }
}

//----- (005C1F30) --------------------------------------------------------
void __thiscall GuildDismissTask::SetInfo(GuildDismissTask *this, Name4 *rkName)
{
  *(_QWORD *)&this->m_kGuildName.n4_name[0] = *(_QWORD *)&rkName->n4_code[0];
  *(_QWORD *)&this->m_kGuildName.n4_code[2] = *(_QWORD *)&rkName->n4_code[2];
}

//----- (005C1F60) --------------------------------------------------------
void __thiscall GuildNpcMenuWin::GuildNpcMenuWin(GuildNpcMenuWin *this)
{
  GuildNpcMenuWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GuildNpcMenuWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildNpcMenuWin::`vftable'{for `IDirectMessenger'};
  v1->m_spGuildFoundWin.m_pObject = 0;
  *(_WORD *)&v1->m_bGradeChange = 0;
  v1->m_bGuildDissmiss = 0;
}
// 9AC7C8: using guessed type void (__thiscall *GuildNpcMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AC7E4: using guessed type int (__thiscall *GuildNpcMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005C2000) --------------------------------------------------------
void __thiscall GuildNpcMenuWin::~GuildNpcMenuWin(GuildNpcMenuWin *this)
{
  GuildNpcMenuWin *v1; // esi@1
  GuildFoundWin *v2; // edi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildNpcMenuWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildNpcMenuWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spGuildFoundWin.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9AC7C8: using guessed type void (__thiscall *GuildNpcMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AC7E4: using guessed type int (__thiscall *GuildNpcMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005C2090) --------------------------------------------------------
void __thiscall GuildNpcMenuWin::CloseFoundWin(GuildNpcMenuWin *this)
{
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_spGuildFoundWin.m_pObject->vfptr);
}

//----- (005C20B0) --------------------------------------------------------
void __thiscall GuildDismissTask::OnStart(GuildDismissTask *this)
{
  GuildDismissTask *v1; // esi@1
  char *v2; // eax@1

  v1 = this;
  this->m_eState = 0;
  this->m_pkInputBox = InputBox::CreateWin();
  v2 = (char *)TextData::Get(0x82EFD4ED);
  InputBox::SetText(v1->m_pkInputBox, v2);
  InputBox::SetActionAfterInputEnd(v1->m_pkInputBox, 0);
  v1->m_pkInputBox->vfptr->SetMsgHooker(&v1->m_pkInputBox->vfptr, &v1->vfptr);
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v1->m_pkInputBox->vfptr[59].__vecDelDtor)(
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkInputBox->vfptr);
}

//----- (005C2140) --------------------------------------------------------
void __thiscall GuildDismissTask::DirectMessage(GuildDismissTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  GuildDismissTask *v4; // esi@1
  unsigned int v5; // eax@2
  IDirectMessenger *v6; // edx@3
  GuildDismissTask::State v7; // edx@7
  char *v8; // ecx@7
  unsigned int v9; // edx@7
  PROTO_NC_GUILD_DISMISS_REQ kProto; // [sp+4h] [bp-20h]@7

  v4 = this;
  if ( iMsgTag == 28 )
  {
    v5 = this->m_kGuildName.n4_code[2];
    if ( v5 )
      v6 = (IDirectMessenger *)(v5 + 232);
    else
      v6 = 0;
    if ( pkFrom == v6 )
    {
      if ( *(_DWORD *)pvBody )
      {
        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)this->m_kGuildName.n4_code[2]);
        v4->m_pkMsgHooker = (IDirectMessenger *)2;
      }
      else
      {
        v7 = this->m_eState;
        v8 = (char *)*((_DWORD *)pvBody + 1);
        kProto.Name.n4_code[0] = v4->m_kSerialTaskList.m_kAllocator.m_uiCount;
        kProto.Name.n4_code[2] = v4->m_kGuildName.n4_code[0];
        kProto.Name.n4_code[1] = v7;
        v9 = v4->m_kGuildName.n4_code[1];
        *(_QWORD *)&kProto.Password.n3_code[1] = 0i64;
        kProto.Password.n3_code[0] = 0;
        kProto.Name.n4_code[3] = v9;
        STRING_TO_NAME(v8, &kProto.Password);
        NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 7u, &kProto, 28);
        v4->m_kSerialTaskList.m_pkTail = (NiTListItem<NiPointer<ITask> > *)1;
      }
    }
  }
}

//----- (005C2210) --------------------------------------------------------
bool __thiscall GuildDismissTask::OnProcessNetMsg(GuildDismissTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  GuildDismissTask *v5; // esi@1
  char *v6; // eax@4
  char *v7; // eax@5

  v5 = this;
  if ( iDepart == 29 && iCommand == 8 )
  {
    switch ( *(_WORD *)pvData )
    {
      case 0xD00:
      case 0xD01:
      case 0xD02:
      case 0xD04:
      case 0xD06:
      case 0xD07:
        v6 = (char *)TextData::Get(0x22748095u);
        goto LABEL_9;
      case 0xD03:
        v7 = (char *)TextData::Get(0x33431998u);
        InputBox::SetText(v5->m_pkInputBox, v7);
        InputBox::SetFocus(v5->m_pkInputBox);
        v5->m_eState = 0;
        return 0;
      case 0xD05:
        v6 = (char *)TextData::Get(0x747245E1u);
        goto LABEL_9;
      case 0xD09:
        v6 = (char *)TextData2::Get(0xAFEB9E38);
        goto LABEL_9;
      case 0xD0A:
        v6 = (char *)TextData2::Get(0x4AF28600u);
LABEL_9:
        MsgBox::Modeless(MSGBOX_OK, v6);
        break;
      case 0xC41:
        break;
      default:
        return 0;
    }
    v5->m_eTaskState = 2;
  }
  return 0;
}

//----- (005C23A0) --------------------------------------------------------
char __thiscall GuildNpcMenuWin::Create(GuildNpcMenuWin *this, PgFrameWork *pkFrameWork)
{
  GuildNpcMenuWin *v2; // ebx@1
  NiTexturePalette *v3; // esi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  char result; // al@9
  int v8; // esi@10
  int v9; // edi@10
  NiSourceTexture *v10; // eax@10
  PgSprData *v11; // eax@11
  PgSprData *v12; // eax@13
  PgSprData *v13; // eax@13
  PgSprData *v14; // edi@13
  NiSourceTexture *v15; // edi@13
  PgSprData *v16; // edi@14
  NiNode *v17; // esi@16
  PgFont *v18; // eax@21
  PgWinText *v19; // esi@21
  NiRefObjectVtbl *v20; // edi@21
  NiUnsharedGeometryGroup *v21; // eax@21
  int v22; // esi@21
  NiNode *v23; // edi@22
  const char *v24; // eax@22
  PgSprData *v25; // edi@22
  NiNode *pkObject; // ST54_4@22
  const char *v27; // eax@22
  NiNode *v28; // ST54_4@22
  const char *v29; // eax@22
  PgWinBut *v30; // eax@22
  NiPointer<PgSprData::PgHitTester> *v31; // ecx@22
  unsigned int v32; // edi@22
  NiAVObject *v33; // ST54_4@22
  PgFont *v34; // eax@22
  PgWinText *v35; // eax@22
  char *v36; // eax@23
  char *v37; // eax@23
  char *v38; // eax@23
  char *v39; // eax@23
  char *v40; // eax@23
  GuildFoundWin *v41; // eax@23
  GuildFoundWin *v42; // esi@23
  GuildFoundWin *v43; // edi@23
  NiNode *v44; // esi@31
  unsigned int uiWidth; // [sp+44h] [bp-28h]@15
  unsigned int uiHeight; // [sp+48h] [bp-24h]@15
  int v47; // [sp+4Ch] [bp-20h]@21
  int iXOff; // [sp+50h] [bp-1Ch]@10
  int uiLeft; // [sp+54h] [bp-18h]@4
  int uiTop; // [sp+58h] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+5Ch] [bp-10h]@1
  int v52; // [sp+68h] [bp-4h]@1
  int iYOff; // [sp+74h] [bp+8h]@10
  int iYOffa; // [sp+74h] [bp+8h]@21

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v52 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildMenu.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "GuildNpcMenuWin", 0) )
  {
    v6 = spNode.m_pObject;
    v52 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = uiLeft;
  v9 = uiTop;
  iXOff = uiLeft;
  iYOff = uiTop;
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v11, (PgWin *)&v2->vfptr, 0, 0);
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop, v13, (PgWin *)&v2->vfptr, 0, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinBut::CreateWin(uiLeft - v8, uiTop - iYOff, v14, (PgWin *)&v2->vfptr, 0xBu, 0, 0);
  v15 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, v15);
    PgSprData::Add(v16, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(v16, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - iYOff, v16, (PgWin *)&v2->vfptr, 0x10u, 0, 0);
  }
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v18 = Font::Get(0);
    v19 = PgWinText::CreateWin(uiLeft - v8, uiTop - 1, uiWidth, uiHeight, v18, (PgWin *)&v2->vfptr, 0, 0);
    v19->vfptr[122].__vecDelDtor((NiRefObject *)v19, 1u);
    v19->vfptr[117].__vecDelDtor((NiRefObject *)v19, (unsigned int)&Color::m_kDxWinTitleColor);
    v20 = v19->vfptr;
    v21 = TextData::Get(0x363D3C93u);
    v20[118].__vecDelDtor((NiRefObject *)v19, (unsigned int)v21);
    v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
    iYOffa = 1;
    v22 = (int)v2->m_pkMenuTxt;
    v47 = 5;
    do
    {
      v23 = spNode.m_pObject;
      v24 = fs("Btn%02dNor", iYOffa);
      v25 = PgSprData::Create((NiAVObject *)&v23->vfptr, v24, &uiLeft, &uiTop, 0);
      pkObject = spNode.m_pObject;
      v27 = fs("Btn%02dClick", iYOffa);
      PgSprData::Add(v25, (NiAVObject *)&pkObject->vfptr, v27);
      v28 = spNode.m_pObject;
      v29 = fs("Btn%02dOver", iYOffa);
      PgSprData::Add(v25, (NiAVObject *)&v28->vfptr, v29);
      v30 = PgWinBut::CreateWin(uiLeft - iXOff, uiTop, v25, (PgWin *)&v2->vfptr, 0, 0, 0);
      *(_DWORD *)(v22 - 20) = v30;
      v30->vfptr[64].__vecDelDtor((NiRefObject *)v30, 0);
      v31 = v25->m_akHitTester.m_pBase;
      v32 = v31->m_pObject->m_uiHeight;
      v33 = (NiAVObject *)v31->m_pObject->m_uiWidth;
      v34 = Font::Get(0);
      v35 = PgWinText::CreateWin(uiLeft - iXOff, uiTop + 1, (unsigned int)v33, v32, v34, (PgWin *)&v2->vfptr, 0, 0);
      *(_DWORD *)v22 = v35;
      v35->vfptr[122].__vecDelDtor((NiRefObject *)v35, 5u);
      (*(void (__stdcall **)(void *))(**(_DWORD **)v22 + 472))(&unk_9AC6F7);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v22 + 240))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v22 + 256))(0);
      ++iYOffa;
      v22 += 4;
      --v47;
    }
    while ( v47 );
    v36 = (char *)TextData::Get(0x8DD4E1DB);
    GuildNpcMenuWin::MenuBtnSetting(v2, 0, 5u, v36);
    v37 = (char *)TextData::Get(0x898688E7);
    GuildNpcMenuWin::MenuBtnSetting(v2, 1u, 9u, v37);
    v38 = (char *)TextData::Get(0xE2E3D820);
    GuildNpcMenuWin::MenuBtnSetting(v2, 2u, 8u, v38);
    v39 = (char *)TextData::Get(0x1F46265Au);
    GuildNpcMenuWin::MenuBtnSetting(v2, 3u, 0xEu, v39);
    v40 = (char *)TextData2::Get(0x4D562842u);
    GuildNpcMenuWin::MenuBtnSetting(v2, 4u, 0x11u, v40);
    ((void (__thiscall *)(GuildNpcMenuWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    v41 = GuildFoundWin::CreateWin(0);
    v42 = v2->m_spGuildFoundWin.m_pObject;
    v43 = v41;
    if ( v42 != v41 )
    {
      if ( v42 && !InterlockedDecrement((volatile LONG *)&v42->m_uiRefCount) && v42 )
        v42->vfptr->__vecDelDtor((NiRefObject *)v42, 1u);
      v2->m_spGuildFoundWin.m_pObject = v43;
      if ( v43 )
        InterlockedIncrement((volatile LONG *)&v43->m_uiRefCount);
    }
    v2->m_spGuildFoundWin.m_pObject->vfptr->SetMsgHooker(&v2->m_spGuildFoundWin.m_pObject->vfptr, &v2->vfptr);
    v52 = -1;
    if ( spNode.m_pObject )
    {
      v44 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v44 )
          v44->vfptr->__vecDelDtor((NiRefObject *)v44, 1u);
      }
    }
    result = 1;
  }
  else
  {
    v17 = spNode.m_pObject;
    v52 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v17 )
      v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005C2960) --------------------------------------------------------
void __thiscall GuildNpcMenuWin::OnCmdFoundGuild(GuildNpcMenuWin *this)
{
  GuildNpcMenuWin *v1; // esi@1
  CClientGuild *v2; // eax@1
  char *v3; // eax@2

  v1 = this;
  v2 = GuildTask::GetGuild();
  if ( (unsigned __int8)CClientGuild::AmIGuildMember(v2) )
  {
    v3 = (char *)TextData::Get(0x6E784590u);
    MsgBox::Modal(MSGBOX_OK, v3);
  }
  else
  {
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_spGuildFoundWin.m_pObject->vfptr);
  }
}

//----- (005C29A0) --------------------------------------------------------
void __thiscall GuildNpcMenuWin::OnClickGuildAcademyStorageBtn(GuildNpcMenuWin *this)
{
  GuildNpcMenuWin *v1; // esi@1
  GuildAcademyStorageWin *v2; // eax@1
  CClientGuild *v3; // eax@2
  GuildAcademyStorageWin *v4; // eax@3
  int v5; // esi@5
  NiUnsharedGeometryGroup *v6; // edi@5
  PROTO_NC_GUILD_ACADEMY_REWARD_STORAGE_OPEN_REQ kProto; // [sp+7h] [bp-1h]@4

  v1 = this;
  v2 = GuildAcademyTask::GetGuildAcademyStorageWin();
  if ( !(unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[65].__vecDelDtor)(v2) )
  {
    v3 = GuildTask::GetGuild();
    if ( (unsigned __int8)CClientGuild::AmIGuildMember(v3) )
    {
      v4 = GuildAcademyTask::GetGuildAcademyStorageWin();
      if ( !(unsigned __int8)((int (__thiscall *)(_DWORD))v4->vfptr[65].__vecDelDtor)(v4) )
      {
        kProto.nOpenType = 0;
        NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x26u, 0x6Du, &kProto, 1);
      }
    }
    else
    {
      v5 = (int)&v1->vfptr;
      v6 = TextData::Get(0x7290F5A0u);
      if ( *(_DWORD *)(v5 + 4) )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v5 + 4) + 4))(25, v6, v5);
        if ( *(_DWORD *)(v5 + 4) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v5 + 4) + 20))(25, v6, v5);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v5 + 20))(v5, 25, v6, v5);
    }
  }
}

//----- (005C2A60) --------------------------------------------------------
void __thiscall GuildNpcMenuWin::OnClickGuildDissmissBtn(GuildNpcMenuWin *this)
{
  GuildNpcMenuWin *v1; // esi@1
  CClientGuild *v2; // eax@1
  char *v3; // eax@2
  CClientGuild *v4; // eax@3
  char *v5; // eax@4
  char *v6; // eax@5
  MsgBox *v7; // eax@5
  int v8; // edx@6

  v1 = this;
  v2 = GuildTask::GetGuild();
  if ( (unsigned __int8)CClientGuild::AmIGuildMember(v2) )
  {
    v4 = GuildTask::GetGuild();
    if ( CClientGuild::CanIDismissGuild(v4) )
    {
      v6 = (char *)TextData2::Get(0x328E9279u);
      v7 = MsgBox::Modal(MSGBOX_OKCANCEL, v6);
      if ( v1 )
        v8 = (int)&v1->vfptr;
      else
        v8 = 0;
      ((void (__stdcall *)(_DWORD))v7->vfptr->SetMsgHooker)(v8);
      v1->m_bGuildDissmiss = 1;
    }
    else
    {
      v5 = (char *)TextData::Get(0xDFE80C1E);
      MsgBox::Modeless(MSGBOX_OK, v5);
    }
  }
  else
  {
    v3 = (char *)TextData::Get(0x76816B99u);
    MsgBox::Modeless(MSGBOX_OK, v3);
  }
}

//----- (005C2AF0) --------------------------------------------------------
void __thiscall GuildNpcMenuWin::OnCommand(GuildNpcMenuWin *this, unsigned int wParam, int lParam)
{
  GuildTournamentBaseWin *v3; // eax@3

  switch ( wParam )
  {
    case 5u:
      GuildNpcMenuWin::OnCmdFoundGuild(this);
      break;
    case 0xCu:
      v3 = GuildTask::GetGuildTournamnetBaseWin();
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
      break;
    case 8u:
      GuildNpcMenuWin::OnClickGuildDissmissBtn(this);
      break;
    case 9u:
      GuildListTask::ShowGuildListWin();
      break;
    case 0xBu:
      GuildNpcMenuWin::Close(this);
      break;
    case 0xEu:
      GuildNpcMenuWin::OnClickGuildAcademyStorageBtn(this);
      break;
    case 0xFu:
      GuildNpcMenuWin::OnClickGuildAcademyMenuBtn(this);
      break;
    case 0x10u:
      GuildNpcMenuWin::OnHelpLink();
      break;
    case 0x11u:
      GuildNpcMenuWin::OnClickPrevMenuBtn(this);
      break;
    default:
      return;
  }
}

//----- (005C2BA0) --------------------------------------------------------
GuildNpcMenuWin *__cdecl GuildNpcMenuWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  GuildNpcMenuWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x18Cu);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    GuildNpcMenuWin::GuildNpcMenuWin((GuildNpcMenuWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (GuildNpcMenuWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (005C2CD0) --------------------------------------------------------
void __thiscall GuildNpcMenuWin::DirectMessage(GuildNpcMenuWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  GuildNpcMenuWin *v4; // edi@1
  _DWORD *v5; // eax@2
  GuildDismissTask *v6; // esi@5
  CClientGuild *v7; // eax@5
  unsigned int v8; // edx@5

  v4 = this;
  if ( iMsgTag == 27 )
  {
    v5 = pvBody;
    if ( pvBody )
    {
      if ( !*(_DWORD *)pvBody && LOBYTE(this->m_kPropertyList.m_pkHead) )
      {
        v6 = ISingletonTask<GuildDismissTask>::Run();
        v7 = GuildTask::GetGuild();
        v6->m_kGuildName.n4_code[0] = v7->m_Guild.sName.n4_code[0];
        v6->m_kGuildName.n4_code[1] = v7->m_Guild.sName.n4_code[1];
        v6->m_kGuildName.n4_code[2] = v7->m_Guild.sName.n4_code[2];
        v8 = v7->m_Guild.sName.n4_code[3];
        v5 = pvBody;
        v6->m_kGuildName.n4_code[3] = v8;
        LOBYTE(v4->m_kPropertyList.m_pkHead) = 0;
      }
      if ( *v5 == 1 )
        LOBYTE(v4->m_kPropertyList.m_pkHead) = 0;
    }
  }
}

//----- (005C2D40) --------------------------------------------------------
void __cdecl STRING_TO_NAME(char *pcString, Name3 *kName3)
{
  char *v2; // eax@1
  char v3; // cl@3
  char acTemp[12]; // [sp+8h] [bp-10h]@2

  v2 = pcString;
  if ( strlen(pcString) < 0xB )
  {
    *(_DWORD *)acTemp = 0;
    *(_DWORD *)&acTemp[4] = 0;
    *(_DWORD *)&acTemp[8] = 0;
    do
    {
      v3 = *v2;
      v2[acTemp - pcString] = *v2;
      ++v2;
    }
    while ( v3 );
    *(_QWORD *)&kName3->n3_code[1] = 0i64;
    kName3->n3_code[0] = 0;
    strncpy((char *)kName3->n3_code, acTemp, 0xCu);
  }
}

//----- (005C2DC0) --------------------------------------------------------
GuildNpcMenuWin *__thiscall GuildNpcMenuWin::`vector deleting destructor'(GuildNpcMenuWin *this, unsigned int a2)
{
  GuildNpcMenuWin *v2; // esi@1
  GuildFoundWin *v3; // edi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildNpcMenuWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildNpcMenuWin::`vftable'{for `IDirectMessenger'};
  v3 = this->m_spGuildFoundWin.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9AC7C8: using guessed type void (__thiscall *GuildNpcMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AC7E4: using guessed type int (__thiscall *GuildNpcMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005C2E60) --------------------------------------------------------
GuildDismissTask *__thiscall ISingletonTask<GuildDismissTask>::`scalar deleting destructor'(GuildDismissTask *this, unsigned int a2)
{
  GuildDismissTask *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ISingletonTask<GuildDismissTask>::`vftable'{for `NiRefObject'};
  this->vfptr = (IDirectMessengerVtbl *)&ISingletonTask<GuildDismissTask>::`vftable'{for `IDirectMessenger'};
  ISingletonTask<GuildDismissTask>::ms_pkSingletonTask = 0;
  ITask::~ITask((ITask *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9ACA08: using guessed type void (__thiscall *ISingletonTask<GuildDismissTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9ACA24: using guessed type int (__thiscall *ISingletonTask<GuildDismissTask>::`vftable'{for `NiRefObject'})(void *p, char);
// A8E120: using guessed type int ISingletonTask<GuildDismissTask>::ms_pkSingletonTask;

//----- (005C2EA0) --------------------------------------------------------
GuildDismissTask *__cdecl ISingletonTask<GuildDismissTask>::Run()
{
  GuildDismissTask *result; // eax@1
  ITask *v1; // eax@2
  GuildDismissTask *v2; // esi@2

  result = (GuildDismissTask *)ISingletonTask<GuildDismissTask>::ms_pkSingletonTask;
  if ( !ISingletonTask<GuildDismissTask>::ms_pkSingletonTask )
  {
    v1 = (ITask *)operator new(0x58u);
    v2 = (GuildDismissTask *)v1;
    if ( v1 )
    {
      ITask::ITask(v1, 0);
      v2->vfptr = (NiRefObjectVtbl *)&GuildDismissTask::`vftable'{for `NiRefObject'};
      v2->vfptr = (IDirectMessengerVtbl *)&GuildDismissTask::`vftable'{for `IDirectMessenger'};
      v2->m_kGuildName.n4_code[3] = 0;
      v2->m_kGuildName.n4_code[2] = 0;
      v2->m_kGuildName.n4_code[1] = 0;
      v2->m_kGuildName.n4_code[0] = 0;
    }
    else
    {
      v2 = 0;
    }
    result = v2;
    ISingletonTask<GuildDismissTask>::ms_pkSingletonTask = (int)v2;
  }
  return result;
}
// 9ACA3C: using guessed type void (__thiscall *GuildDismissTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9ACA58: using guessed type int (__thiscall *GuildDismissTask::`vftable'{for `NiRefObject'})(void *p, char);
// A8E120: using guessed type int ISingletonTask<GuildDismissTask>::ms_pkSingletonTask;

//----- (005C2F30) --------------------------------------------------------
void __thiscall GuildWarInformWin::SetText(GuildWarInformWin *this, char *pcText)
{
  GuildWarInformWin *v2; // esi@1

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->m_spTextGeom.m_pObject->vfptr[37].__vecDelDtor)(pcText);
  PgFadeTextGeometry::SetLifeTime(v2->m_spTextGeom.m_pObject, 3.0);
}

//----- (005C2F70) --------------------------------------------------------
void __thiscall GuildWarInformWin::SetColor(GuildWarInformWin *this, D3DXCOLOR *kColor)
{
  ((void (__stdcall *)(_DWORD))this->m_spTextGeom.m_pObject->vfptr[44].__vecDelDtor)(kColor);
}

//----- (005C2F90) --------------------------------------------------------
void __thiscall GuildWarInformWin::GuildWarInformWin(GuildWarInformWin *this)
{
  GuildWarInformWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GuildWarInformWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildWarInformWin::`vftable'{for `IDirectMessenger'};
  v1->m_spTextGeom.m_pObject = 0;
}
// 9ACA88: using guessed type void (__thiscall *GuildWarInformWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9ACAA4: using guessed type int (__thiscall *GuildWarInformWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005C2FC0) --------------------------------------------------------
void __thiscall GuildWarInformWin::~GuildWarInformWin(GuildWarInformWin *this)
{
  GuildWarInformWin *v1; // esi@1
  PgFadeTextGeometry *v2; // edi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildWarInformWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildWarInformWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spTextGeom.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9ACA88: using guessed type void (__thiscall *GuildWarInformWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9ACAA4: using guessed type int (__thiscall *GuildWarInformWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005C3050) --------------------------------------------------------
char __thiscall GuildWarInformWin::Create(GuildWarInformWin *this, PgFrameWork *pkFrameWork)
{
  PgFadeTextGeometry *v2; // ebx@1
  GuildWarInformWin *v3; // esi@1
  char v4; // al@2
  PgFont *v5; // eax@3
  PgFont *v6; // edi@3
  PgFadeTextGeometry *v7; // eax@4
  PgFadeTextGeometry *v8; // eax@5
  PgFadeTextGeometry *v9; // edi@6
  PgFadeTextGeometry *v10; // eax@13
  NiRefObjectVtbl **v11; // ebx@15
  NiRefObjectVtbl *v12; // edi@15
  D3DXCOLOR *v13; // eax@15
  PgFadeTextGeometry *v14; // eax@15
  float v15; // edx@15
  float v16; // ecx@15
  float v17; // edx@15
  D3DXCOLOR result; // [sp+34h] [bp-48h]@15
  PgFadeTextGeometry *v19; // [sp+44h] [bp-38h]@4
  float v20; // [sp+4Ch] [bp-30h]@15
  tagSIZE kSize; // [sp+54h] [bp-28h]@4
  tagRECT kDrawRect; // [sp+5Ch] [bp-20h]@4
  int v23; // [sp+78h] [bp-4h]@4

  v2 = 0;
  v3 = this;
  if ( PgWinFrame::Create((PgWinFrame *)&this->vfptr, 0, 0, 0, pkFrameWork, "GuildWarInformWin", 0)
    && (v5 = Font::Get(LARGEBOLD), (v6 = v5) != 0) )
  {
    SelectObject(v5->m_kFontRenderStuff.hDC, v5->m_hFont);
    PgFont::GetTextSize(v6, "W", 1, &kSize);
    SetRect(&kDrawRect, 0, 0, 900, kSize.cy);
    v7 = (PgFadeTextGeometry *)operator new(0x158u);
    v19 = v7;
    v23 = 0;
    if ( v7 )
    {
      PgFadeTextGeometry::PgFadeTextGeometry(v7, v6);
      v2 = v8;
    }
    v9 = v3->m_spTextGeom.m_pObject;
    v23 = -1;
    if ( v9 != v2 )
    {
      if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
        v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      v3->m_spTextGeom.m_pObject = v2;
      if ( v2 )
        InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
    }
    SpScreenText::SetShadowOffset((SpScreenText *)&v3->m_spTextGeom.m_pObject->vfptr, 3u);
    ((void (__stdcall *)(tagRECT *))v3->m_spTextGeom.m_pObject->vfptr[34].__vecDelDtor)(&kDrawRect);
    v10 = v3->m_spTextGeom.m_pObject;
    v10->m_uiDrawFormat = 1;
    if ( v10->m_iAlignOption != 18 )
    {
      v10->m_iAlignOption = 18;
      v10->m_bInvalidate = 1;
    }
    v11 = &v3->m_spTextGeom.m_pObject->vfptr;
    v12 = *v11;
    v13 = ColorInfoTable::GetDxColor(&result, 0);
    v12[44].__vecDelDtor((NiRefObject *)v11, (unsigned int)v13);
    v14 = v3->m_spTextGeom.m_pObject;
    v15 = v14->m_kLocal.m_Translate.y;
    v16 = v14->m_kLocal.m_Translate.x;
    v20 = -2.0;
    v17 = v14->m_kLocal.m_Translate.z;
    v14->m_kLocal.m_Translate.x = v16;
    v14->m_kLocal.m_Translate.y = v20;
    v14->m_kLocal.m_Translate.z = v17;
    ((void (__thiscall *)(GuildWarInformWin *, PgFadeTextGeometry *, _DWORD))v3->vfptr[29].__vecDelDtor)(
      v3,
      v3->m_spTextGeom.m_pObject,
      0);
    NiAVObject::UpdateProperties((NiAVObject *)&v3->vfptr);
    v3->vfptr[38].__vecDelDtor((NiRefObject *)v3, 900u);
    v3->vfptr[39].__vecDelDtor((NiRefObject *)v3, kSize.cy);
    ((void (__thiscall *)(GuildWarInformWin *, unsigned int, unsigned int, _DWORD, _DWORD))v3->vfptr[59].__vecDelDtor)(
      v3,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.2);
    v3->vfptr[60].__vecDelDtor((NiRefObject *)v3, 0);
    v4 = 1;
  }
  else
  {
    v4 = 0;
  }
  return v4;
}

//----- (005C3280) --------------------------------------------------------
GuildWarInformWin *__cdecl GuildWarInformWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  GuildWarInformWin *v4; // eax@14
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x15Cu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&GuildWarInformWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&GuildWarInformWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( GuildWarInformWin::Create((GuildWarInformWin *)v2, pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (GuildWarInformWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( v2 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
    v4 = 0;
  }
  return v4;
}
// 9ACA88: using guessed type void (__thiscall *GuildWarInformWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9ACAA4: using guessed type int (__thiscall *GuildWarInformWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005C33C0) --------------------------------------------------------
GuildWarInformWin *__thiscall GuildWarInformWin::`vector deleting destructor'(GuildWarInformWin *this, unsigned int a2)
{
  GuildWarInformWin *v2; // esi@1
  PgFadeTextGeometry *v3; // edi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildWarInformWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildWarInformWin::`vftable'{for `IDirectMessenger'};
  v3 = this->m_spTextGeom.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9ACA88: using guessed type void (__thiscall *GuildWarInformWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9ACAA4: using guessed type int (__thiscall *GuildWarInformWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005C3460) --------------------------------------------------------
void __thiscall GuildWarKillCountWin::SetText(GuildWarKillCountWin *this, float fLifeTime, char *pcText1, char *pcText2)
{
  GuildWarKillCountWin *v4; // esi@1

  v4 = this;
  if ( 0.0 == fLifeTime )
  {
    ((void (__stdcall *)(_DWORD))this->m_aspTextGeoGuildName[0].m_pObject->vfptr[37].__vecDelDtor)(pcText1);
    ((void (__stdcall *)(_DWORD))v4->m_aspTextGeoGuildName[1].m_pObject->vfptr[37].__vecDelDtor)(pcText2);
  }
  if ( fLifeTime > 0.0 )
  {
    ((void (__stdcall *)(_DWORD))v4->m_aspTextGeoGuildName[0].m_pObject->vfptr[37].__vecDelDtor)(pcText1);
    ((void (__stdcall *)(_DWORD))v4->m_aspTextGeoGuildName[1].m_pObject->vfptr[37].__vecDelDtor)(pcText2);
    PgFadeTextGeometry::SetLifeTime(v4->m_aspTextGeoGuildName[0].m_pObject, fLifeTime);
    PgFadeTextGeometry::SetLifeTime(v4->m_aspTextGeoGuildName[1].m_pObject, fLifeTime);
  }
}

//----- (005C3500) --------------------------------------------------------
void __thiscall GuildWarKillCountWin::~GuildWarKillCountWin(GuildWarKillCountWin *this)
{
  GuildWarKillCountWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildWarKillCountWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildWarKillCountWin::`vftable'{for `IDirectMessenger'};
  `eh vector destructor iterator'(
    this->m_aspTextGeoGuildName,
    4u,
    2,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9ACCE0: using guessed type void (__thiscall *GuildWarKillCountWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9ACCFC: using guessed type int (__thiscall *GuildWarKillCountWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005C3580) --------------------------------------------------------
void __thiscall GuildWarKillCountWin::GuildWarKillCountWin(GuildWarKillCountWin *this)
{
  GuildWarKillCountWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GuildWarKillCountWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildWarKillCountWin::`vftable'{for `IDirectMessenger'};
  `eh vector constructor iterator'(
    v1->m_aspTextGeoGuildName,
    4u,
    2,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
}
// 9ACCE0: using guessed type void (__thiscall *GuildWarKillCountWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9ACCFC: using guessed type int (__thiscall *GuildWarKillCountWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005C3600) --------------------------------------------------------
char __thiscall GuildWarKillCountWin::Create(GuildWarKillCountWin *this, PgFrameWork *pkFramework)
{
  GuildWarKillCountWin *v2; // esi@1
  char v3; // al@2
  PgFont *v4; // eax@3
  PgFont *v5; // ebx@3
  int v6; // edi@4
  PgFadeTextGeometry *v7; // eax@6
  int v8; // eax@7
  PgFadeTextGeometry *v9; // ebx@9
  PgFadeTextGeometry *v10; // eax@17
  NiRefObjectVtbl *v11; // ebx@20
  D3DXCOLOR *v12; // eax@20
  int v13; // ecx@20
  PgFadeTextGeometry *v14; // eax@22
  float v15; // edx@22
  float v16; // ecx@22
  float v17; // edx@22
  PgFadeTextGeometry *v18; // eax@22
  void *(__thiscall *v19)(NiRefObject *, unsigned int); // edx@22
  D3DXCOLOR v20; // [sp+30h] [bp-60h]@21
  D3DXCOLOR result; // [sp+40h] [bp-50h]@20
  float v22; // [sp+54h] [bp-3Ch]@22
  tagSIZE kSize; // [sp+5Ch] [bp-34h]@4
  PgFont *pkFont; // [sp+64h] [bp-2Ch]@3
  int iLineYPos; // [sp+68h] [bp-28h]@4
  PgFadeTextGeometry *v26; // [sp+6Ch] [bp-24h]@6
  tagRECT kDrawRect; // [sp+70h] [bp-20h]@4
  int v28; // [sp+8Ch] [bp-4h]@6

  v2 = this;
  if ( PgWinFrame::Create((PgWinFrame *)&this->vfptr, 0, 0, 0, pkFramework, "GuildWarKillCountWin", 0)
    && (v4 = Font::Get(MENU), v5 = v4, (pkFont = v4) != 0) )
  {
    SelectObject(v4->m_kFontRenderStuff.hDC, v4->m_hFont);
    PgFont::GetTextSize(v5, "W", 1, &kSize);
    iLineYPos = -2;
    SetRect(&kDrawRect, 0, 0, 500, kSize.cy);
    v6 = 0;
    while ( 1 )
    {
      v7 = (PgFadeTextGeometry *)operator new(0x158u);
      v26 = v7;
      v28 = 0;
      if ( v7 )
      {
        PgFadeTextGeometry::PgFadeTextGeometry(v7, v5);
        v26 = (PgFadeTextGeometry *)v8;
      }
      else
      {
        v26 = 0;
        v8 = 0;
      }
      v9 = v2->m_aspTextGeoGuildName[v6].m_pObject;
      v28 = -1;
      if ( v9 != (PgFadeTextGeometry *)v8 )
      {
        if ( v9 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
            v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
          v8 = (int)v26;
        }
        v2->m_aspTextGeoGuildName[v6].m_pObject = (PgFadeTextGeometry *)v8;
        if ( v8 )
          InterlockedIncrement((volatile LONG *)(v8 + 4));
      }
      SpScreenText::SetShadowOffset((SpScreenText *)&v2->m_aspTextGeoGuildName[v6].m_pObject->vfptr, 1u);
      ((void (__stdcall *)(tagRECT *))v2->m_aspTextGeoGuildName[v6].m_pObject->vfptr[34].__vecDelDtor)(&kDrawRect);
      v10 = v2->m_aspTextGeoGuildName[v6].m_pObject;
      v10->m_uiDrawFormat = 1;
      if ( v10->m_iAlignOption != 18 )
      {
        v10->m_iAlignOption = 18;
        v10->m_bInvalidate = 1;
      }
      if ( v6 == 1 )
      {
        v11 = v2->m_aspTextGeoGuildName[1].m_pObject->vfptr;
        v26 = v2->m_aspTextGeoGuildName[1].m_pObject;
        v12 = ColorInfoTable::GetDxColor(&v20, yellow);
        v13 = (int)v26;
      }
      else
      {
        v11 = v2->m_aspTextGeoGuildName[v6].m_pObject->vfptr;
        v26 = v2->m_aspTextGeoGuildName[v6].m_pObject;
        v12 = ColorInfoTable::GetDxColor(&result, Center_Announcement);
        v13 = (int)v26;
      }
      v11[44].__vecDelDtor((NiRefObject *)v13, (unsigned int)v12);
      v14 = v2->m_aspTextGeoGuildName[v6].m_pObject;
      v15 = v14->m_kLocal.m_Translate.y;
      v16 = v14->m_kLocal.m_Translate.x;
      v22 = (double)iLineYPos;
      v17 = v14->m_kLocal.m_Translate.z;
      v14->m_kLocal.m_Translate.x = v16;
      v14->m_kLocal.m_Translate.y = v22;
      v14->m_kLocal.m_Translate.z = v17;
      v18 = v2->m_aspTextGeoGuildName[v6].m_pObject;
      v19 = v2->vfptr[29].__vecDelDtor;
      iLineYPos += kSize.cy + 2;
      ((void (__thiscall *)(GuildWarKillCountWin *, PgFadeTextGeometry *, _DWORD))v19)(v2, v18, 0);
      if ( ++v6 >= 2 )
        break;
      v5 = pkFont;
    }
    v2->vfptr[39].__vecDelDtor((NiRefObject *)v2, 45u);
    ((void (__thiscall *)(GuildWarKillCountWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.63999999,
      0.31999999);
    v2->vfptr[60].__vecDelDtor((NiRefObject *)v2, 0);
    v3 = 1;
  }
  else
  {
    v3 = 0;
  }
  return v3;
}

//----- (005C3880) --------------------------------------------------------
GuildWarKillCountWin *__cdecl GuildWarKillCountWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  GuildWarKillCountWin *v4; // eax@14
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x160u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    LOBYTE(v6) = 1;
    v2->vfptr = (NiRefObjectVtbl *)&GuildWarKillCountWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&GuildWarKillCountWin::`vftable'{for `IDirectMessenger'};
    `eh vector constructor iterator'(
      &v2[1].m_kLocal.m_Rotate.m_pEntry[0][1],
      4u,
      2,
      (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
      (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( GuildWarKillCountWin::Create((GuildWarKillCountWin *)v2, pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (GuildWarKillCountWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( v2 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
    v4 = 0;
  }
  return v4;
}
// 9ACCE0: using guessed type void (__thiscall *GuildWarKillCountWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9ACCFC: using guessed type int (__thiscall *GuildWarKillCountWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005C39E0) --------------------------------------------------------
GuildWarKillCountWin *__thiscall GuildWarKillCountWin::`vector deleting destructor'(GuildWarKillCountWin *this, unsigned int a2)
{
  GuildWarKillCountWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildWarKillCountWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildWarKillCountWin::`vftable'{for `IDirectMessenger'};
  `eh vector destructor iterator'(
    this->m_aspTextGeoGuildName,
    4u,
    2,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9ACCE0: using guessed type void (__thiscall *GuildWarKillCountWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9ACCFC: using guessed type int (__thiscall *GuildWarKillCountWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005C3A70) --------------------------------------------------------
void __thiscall GuildWarStateWin::SortWarListBy(GuildWarStateWin *this, int iIndex)
{
  GuildWarStateWin *v2; // esi@1
  SlideListWin *v3; // ecx@1

  v2 = this;
  v3 = this->m_pListWinGuildWar;
  if ( v3 )
  {
    v2->m_nWarSortColumn = iIndex;
    SlideListWin::Sort(v3, iIndex, 0, 0);
    SlideListWin::UpdateViewList(v2->m_pListWinGuildWar);
  }
}

//----- (005C3AB0) --------------------------------------------------------
void __thiscall GuildWarStateWin::SortWarableListBy(GuildWarStateWin *this, int iIndex)
{
  GuildWarStateWin *v2; // esi@1
  SlideListWin *v3; // ecx@1

  v2 = this;
  v3 = this->m_pListWinGuildWarable;
  if ( v3 )
  {
    v2->m_nWarableSortColumn = iIndex;
    SlideListWin::Sort(v3, iIndex, 0, 0);
    SlideListWin::UpdateViewList(v2->m_pListWinGuildWarable);
  }
}

//----- (005C3B20) --------------------------------------------------------
unsigned int __cdecl SumKillScore(SHINE_GUILD_SCORE *rkGuildScore)
{
  return rkGuildScore->nKillScore[0]
       + rkGuildScore->nKillScore[1]
       + rkGuildScore->nKillScore[2]
       + rkGuildScore->nKillScore[3]
       + rkGuildScore->nKillScore[4]
       + rkGuildScore->nKillScore[5]
       + rkGuildScore->nKillScore[6];
}

//----- (005C3B40) --------------------------------------------------------
void GuildWarStateWin::OnClose()
{
  GuildTask::SetListRefreshEnable(0);
}

//----- (005C3B50) --------------------------------------------------------
void GuildWarStateWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "GuildWarMenu");
}

//----- (005C3B80) --------------------------------------------------------
void __thiscall GuildWarStateWin::SortWarAbleListNum(GuildWarStateWin *this, int iIndex)
{
  GuildWarStateWin *v2; // esi@1
  SlideListWin *v3; // ecx@1

  v2 = this;
  v3 = this->m_pListWinGuildWarable;
  if ( v3 )
  {
    if ( iIndex >= 0 )
    {
      v2->m_nWarableSortColumn = iIndex;
      SlideListWin::Sort(v3, iIndex, 0, 1);
      SlideListWin::UpdateViewList(v2->m_pListWinGuildWarable);
    }
  }
}

//----- (005C3BC0) --------------------------------------------------------
void __thiscall GuildWarStateWin::UpdateTimer(GuildWarStateWin *this, float fTime)
{
  float fTimea; // [sp+8h] [bp+8h]@2

  if ( this->m_bTimer != 1 )
  {
    fTimea = fTime - this->m_fOldTime;
    if ( fTimea >= 5.0 )
      this->m_bTimer = 1;
  }
}

//----- (005C3C00) --------------------------------------------------------
void __thiscall GuildWarStateWin::OnCmdWarSlideBar(GuildWarStateWin *this)
{
  GuildWarStateWin *v1; // esi@1
  SlideBar *v2; // ecx@1
  SlideListWin *v3; // eax@2

  v1 = this;
  v2 = this->m_pkSlideBarGuildWarList;
  if ( v2 )
  {
    v3 = v1->m_pListWinGuildWar;
    if ( v3 )
    {
      SlideBar::SetSplitCnt(v2, v3->m_nSlideSplitCnt);
      v1->m_pListWinGuildWar->m_nViewStartPos = v1->m_pkSlideBarGuildWarList->m_nCurPos;
      SlideListWin::UpdateViewList(v1->m_pListWinGuildWar);
    }
  }
}

//----- (005C3C50) --------------------------------------------------------
void __thiscall GuildWarStateWin::OnClick2(GuildWarStateWin *this)
{
  int v1; // eax@2

  if ( this->m_pListWinGuildWarable )
  {
    v1 = this->m_pkSlideBarGuildWarableList->m_nCurPos;
    if ( v1 >= 0 )
    {
      this->m_pListWinGuildWarable->m_nViewStartPos = v1;
      SlideListWin::UpdateViewList(this->m_pListWinGuildWarable);
    }
  }
}

//----- (005C3C90) --------------------------------------------------------
void __thiscall GuildWarStateWin::OnClick1(GuildWarStateWin *this)
{
  int v1; // eax@2

  if ( this->m_pListWinGuildWarable )
  {
    v1 = this->m_pkSlideBarGuildWarableList->m_nCurPos;
    if ( v1 >= 0 )
    {
      this->m_pListWinGuildWarable->m_nViewStartPos = v1;
      SlideListWin::UpdateViewList(this->m_pListWinGuildWarable);
    }
  }
}

//----- (005C3CD0) --------------------------------------------------------
void __thiscall GuildWarStateWin::ViewSeachList(GuildWarStateWin *this)
{
  GuildWarStateWin *v1; // esi@1
  SlideBar *v2; // ecx@1
  int v3; // eax@4
  int v4; // eax@6
  SlideListWin *v5; // ecx@6

  v1 = this;
  v2 = this->m_pkSlideBarGuildWarableList;
  if ( v2 && v1->m_pListWinGuildWarable && v1->m_nWarableSortColumn >= 0 )
  {
    v3 = v1->m_vecSeachAbleGuildWar._Mylast - v1->m_vecSeachAbleGuildWar._Myfirst - 9;
    if ( v3 < 0 )
      v3 = 0;
    SlideBar::SetSplitCnt(v2, v3);
    SlideBar::SetCurPos(v1->m_pkSlideBarGuildWarableList, 0);
    v4 = v1->m_nWarableSortColumn;
    v5 = v1->m_pListWinGuildWarable;
    if ( v4 )
      SlideListWin::Sort(v5, v4, 0, 0);
    else
      SlideListWin::Sort(v5, 0, 0, 1);
    v1->m_pListWinGuildWarable->m_nViewStartPos = 0;
    SlideListWin::AlignText(v1->m_pListWinGuildWarable, 5u);
    SlideListWin::UpdateViewList(v1->m_pListWinGuildWarable);
  }
}

//----- (005C3D70) --------------------------------------------------------
void __thiscall GuildWarStateWin::OnCmdApplyGuildWar(GuildWarStateWin *this)
{
  GuildWarStateWin *v1; // esi@1
  CClientGuild *v2; // eax@1
  int v3; // esi@2
  NiUnsharedGeometryGroup *v4; // edi@2
  signed int v5; // edi@6
  int v6; // esi@8
  NiUnsharedGeometryGroup *v7; // edi@8
  SHINE_GUILD_WAR_ABLE_INFO *v8; // eax@13
  char v9; // cl@13
  bool v10; // zf@14
  NiUnsharedGeometryGroup *v11; // eax@16
  int v12; // esi@21
  NiUnsharedGeometryGroup *v13; // edi@21
  SHINE_GUILD_WAR_ABLE_INFO *pkInfo; // [sp+8h] [bp-18h]@12
  PROTO_NC_GUILD_WAR_REQ kReq; // [sp+Ch] [bp-14h]@19

  v1 = this;
  v2 = GuildTask::GetGuild();
  if ( !CClientGuild::CanIApplyGuildWar(v2) )
  {
    v3 = (int)&v1->vfptr;
    v4 = TextData::Get(0x6B8371C7u);
    if ( *(_DWORD *)(v3 + 4) )
    {
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v3 + 4) + 4))(25, v4, v3);
      if ( *(_DWORD *)(v3 + 4) )
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v3 + 4) + 20))(25, v4, v3);
    }
    (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v3 + 20))(v3, 25, v4, v3);
    return;
  }
  v5 = SlideListWin::GetCurSelIndex(v1->m_pListWinGuildWarable);
  if ( v5 >= 0 )
  {
    if ( GuildTask::GetGuild()->m_Guild.nWarStatus )
    {
      v6 = (int)&v1->vfptr;
      v7 = TextData::Get(0xACE3043B);
      if ( *(_DWORD *)(v6 + 4) )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v6 + 4) + 4))(25, v7, v6);
        if ( *(_DWORD *)(v6 + 4) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v6 + 4) + 20))(25, v7, v6);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v6 + 20))(v6, 25, v7, v6);
      return;
    }
    SlideListWin::GetData(v1->m_pListWinGuildWarable, v5, (unsigned int *)&pkInfo);
    if ( GuildTask::GetGuild()->m_Guild.nType )
    {
      v10 = GuildTask::GetGuild()->m_Guild.nType == 1;
      v8 = pkInfo;
      if ( !v10 )
        goto LABEL_19;
      v10 = pkInfo->nType == 0;
    }
    else
    {
      v8 = pkInfo;
      v9 = pkInfo->nType;
      if ( !v9 )
      {
LABEL_16:
        v11 = TextData::Get(0xC4342323);
        goto LABEL_21;
      }
      v10 = v9 == 1;
    }
    if ( v10 )
      goto LABEL_16;
LABEL_19:
    *(_QWORD *)&kReq.TargetName.n4_code[2] = 0i64;
    *(_QWORD *)&kReq.TargetName.n4_name[0] = 0i64;
    *(_QWORD *)&kReq.TargetName.n4_name[0] = *(_QWORD *)&v8->sName.n4_name[0];
    *(_QWORD *)&kReq.TargetName.n4_code[2] = v8->sName.n4_code[2];
    kReq.TargetName.n4_code[3] = v8->sName.n4_code[3];
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 0x22u, &kReq, 16);
    return;
  }
  v11 = TextData::Get((unsigned int)&loc_825A97 + 1);
LABEL_21:
  v12 = (int)&v1->vfptr;
  v13 = v11;
  if ( *(_DWORD *)(v12 + 4) )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v12 + 4) + 4))(25, v11, v12);
    if ( *(_DWORD *)(v12 + 4) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v12 + 4) + 20))(25, v13, v12);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v12 + 20))(v12, 25, v13, v12);
}

//----- (005C3F60) --------------------------------------------------------
void __thiscall GuildWarStateWin::OnCmdWarableSlideBar(GuildWarStateWin *this)
{
  GuildWarStateWin *v1; // esi@1
  int v2; // edi@1
  SlideListWin *v3; // eax@2

  v1 = this;
  v2 = this->m_pkSlideBarGuildWarableList->m_nCurPos;
  if ( this->m_pkSlideBarCurPos != v2 )
  {
    v3 = this->m_pListWinGuildWarable;
    if ( v3 )
    {
      if ( v2 >= 0 )
      {
        v3->m_nViewStartPos = v2;
        SlideListWin::UpdateViewList(this->m_pListWinGuildWarable);
      }
    }
    v1->m_pkSlideBarCurPos = v2;
  }
}

//----- (005C3FB0) --------------------------------------------------------
char *__cdecl GetGuildWarTimeLeftStr(unsigned int dwLeftTime, unsigned int dwPassedTime)
{
  unsigned int v2; // esi@1
  unsigned int v3; // edi@1
  unsigned int v4; // ebx@1
  NiUnsharedGeometryGroup *v5; // eax@2
  char *v6; // eax@2
  char *v7; // ecx@2
  char v8; // dl@3
  unsigned int v9; // eax@4
  char *v10; // esi@4
  char *v11; // edi@4
  char v12; // cl@5
  NiUnsharedGeometryGroup *v13; // eax@8
  char *v14; // eax@8
  char *v15; // ecx@8
  char v16; // dl@9
  unsigned int v17; // eax@10
  char *v18; // esi@10
  char *v19; // edi@10
  char v20; // cl@11
  NiUnsharedGeometryGroup *v21; // eax@13
  char *v22; // eax@13
  char *v23; // ecx@13
  char v24; // dl@14
  unsigned int v25; // eax@15
  char *v26; // esi@15
  char *v27; // edi@15
  char v28; // cl@16
  int iSec; // [sp+14h] [bp+8h]@1

  v2 = (dwLeftTime - dwPassedTime) / 0x3C;
  v3 = (dwLeftTime - dwPassedTime) / 0xE10;
  iSec = (dwLeftTime - dwPassedTime) % 0x3C;
  s_acTimeStr[0] = 0;
  v4 = v2 % 0x3C;
  if ( v3 )
  {
    v5 = TextData::Get(0x48B19EA3u);
    v6 = fs("%d %s ", v3, v5);
    v7 = v6;
    do
      v8 = *v6++;
    while ( v8 );
    v9 = v6 - v7;
    v10 = v7;
    v11 = &s_acTimeStr[-1];
    do
      v12 = (v11++)[1];
    while ( v12 );
    qmemcpy(v11, v10, v9);
  }
  if ( v4 )
  {
    v13 = TextData::Get(0xA1B497E2);
    v14 = fs("%d %s", v4, v13);
    v15 = v14;
    do
      v16 = *v14++;
    while ( v16 );
    v17 = v14 - v15;
    v18 = v15;
    v19 = &s_acTimeStr[-1];
    do
      v20 = (v19++)[1];
    while ( v20 );
    qmemcpy(v19, v18, v17);
  }
  v21 = TextData::Get(0x535F8C99u);
  v22 = fs("%d %s", iSec, v21);
  v23 = v22;
  do
    v24 = *v22++;
  while ( v24 );
  v25 = v22 - v23;
  v26 = v23;
  v27 = &s_acTimeStr[-1];
  do
    v28 = (v27++)[1];
  while ( v28 );
  qmemcpy(v27, v26, v25);
  return s_acTimeStr;
}

//----- (005C40E0) --------------------------------------------------------
char *__cdecl GetGuildWarStatusStr(Name4 *rkName)
{
  char *result; // eax@2

  *(_QWORD *)acStr_1 = *(_QWORD *)&rkName->n4_code[0];
  qword_A8E170 = *(_QWORD *)&rkName->n4_code[2];
  byte_A8E178 = 0;
  if ( acStr_1[0] )
    result = acStr_1;
  else
    result = (char *)TextData::Get(0x6D738A94u);
  return result;
}
// A8E170: using guessed type __int64 qword_A8E170;
// A8E178: using guessed type char byte_A8E178;

//----- (005C4130) --------------------------------------------------------
char *__cdecl GetGuildWarStatusStr(char eStatus)
{
  char *result; // eax@2

  switch ( eStatus )
  {
    case 0:
      result = (char *)TextData::Get(0x6D738A94u);
      break;
    case 1:
      result = (char *)TextData::Get(0x7CB5CAE6u);
      break;
    case 2:
      result = (char *)TextData::Get(0xB0BAD2D2);
      break;
    case 3:
      result = (char *)TextData::Get(0xC4B9C9EB);
      break;
    default:
      result = ".";
      break;
  }
  return result;
}

//----- (005C41A0) --------------------------------------------------------
char *__cdecl GetGuildTypeStr(char type)
{
  char *result; // eax@3

  if ( type )
  {
    if ( type == 1 )
      result = (char *)TextData::Get(0x3E486D96u);
    else
      result = ".";
  }
  else
  {
    result = (char *)TextData::Get(0x3E3D34A2u);
  }
  return result;
}

//----- (005C41E0) --------------------------------------------------------
char *__cdecl GetGuildMemberCount(unsigned __int16 wCount)
{
  char *result; // eax@2

  if ( wCount == -1 )
    result = (char *)TextData::Get(0x5081E30u);
  else
    result = fs("%d", wCount);
  return result;
}

//----- (005C4220) --------------------------------------------------------
NiUnsharedGeometryGroup *__cdecl GetWarableStr(char byWarable)
{
  NiUnsharedGeometryGroup *result; // eax@2

  if ( byWarable )
    result = TextData::Get(0xD4C0D437);
  else
    result = TextData::Get(0xC9113434);
  return result;
}

//----- (005C4250) --------------------------------------------------------
void __thiscall GuildWarStateWin::AddGuildWarListItem(GuildWarStateWin *this, SHINE_GUILD_WAR_INFO *pkData)
{
  GuildWarStateWin *v2; // ebx@1
  SlideListWin *v3; // ecx@1
  int v4; // eax@2
  unsigned int v5; // ecx@2
  unsigned int v6; // edx@2
  unsigned int v7; // edi@2
  unsigned int v8; // eax@2
  const char *v9; // eax@2
  signed __int64 dwPassedTime; // ST1C_8@2
  const char *v11; // eax@2
  const char *v12; // eax@2
  const char *v13; // eax@2
  NiUnsharedGeometryGroup *v14; // eax@3
  NiUnsharedGeometryGroup *v15; // ST24_4@5
  char *v16; // eax@5
  const char *v17; // eax@5
  char acGuildName[17]; // [sp+14h] [bp-18h]@2

  v2 = this;
  v3 = this->m_pListWinGuildWar;
  if ( v3 )
  {
    v4 = SlideListWin::AddText(v3, 0);
    v5 = pkData->sName.n4_code[1];
    v6 = pkData->sName.n4_code[2];
    v7 = v4;
    *(_DWORD *)acGuildName = pkData->sName.n4_code[0];
    v8 = pkData->sName.n4_code[3];
    *(_DWORD *)&acGuildName[4] = v5;
    *(_DWORD *)&acGuildName[8] = v6;
    *(_DWORD *)&acGuildName[12] = v8;
    acGuildName[16] = 0;
    v9 = fs("%d", v7);
    SlideListWin::SetText(v2->m_pListWinGuildWar, v7, 0, v9);
    SlideListWin::SetText(v2->m_pListWinGuildWar, v7, 1u, acGuildName);
    dwPassedTime = (signed __int64)GuildTask::GetPassedTimeSinceRefresh();
    v11 = GetGuildWarTimeLeftStr(pkData->nWarStatusRemainSec, dwPassedTime);
    SlideListWin::SetText(v2->m_pListWinGuildWar, v7, 2u, v11);
    v12 = fs(
            "%d",
            pkData->MyScore.nKillScore[0]
          + pkData->MyScore.nKillScore[1]
          + pkData->MyScore.nKillScore[2]
          + pkData->MyScore.nKillScore[3]
          + pkData->MyScore.nKillScore[4]
          + pkData->MyScore.nKillScore[5]
          + pkData->MyScore.nKillScore[6]);
    SlideListWin::SetText(v2->m_pListWinGuildWar, v7, 3u, v12);
    v13 = fs(
            "%d",
            pkData->EnemyScore.nKillScore[0]
          + pkData->EnemyScore.nKillScore[1]
          + pkData->EnemyScore.nKillScore[2]
          + pkData->EnemyScore.nKillScore[3]
          + pkData->EnemyScore.nKillScore[4]
          + pkData->EnemyScore.nKillScore[5]
          + pkData->EnemyScore.nKillScore[6]);
    SlideListWin::SetText(v2->m_pListWinGuildWar, v7, 4u, v13);
    if ( pkData->nRequestNo == GuildTask::GetGuild()->m_Guild.nNo )
      v14 = TextData::Get(0xEAF20F2B);
    else
      v14 = TextData::Get(0xA2FC1727);
    v15 = v14;
    v16 = GetGuildWarStatusStr(pkData->nWarStatus);
    v17 = fs("%s/%s", v15, v16);
    SlideListWin::SetText(v2->m_pListWinGuildWar, v7, 5u, v17);
    SlideListWin::SetData(v2->m_pListWinGuildWar, v7, 0xFFFFFFFF);
    SlideListWin::SetFontSize(v2->m_pListWinGuildWar, v7, 1);
  }
}

//----- (005C4420) --------------------------------------------------------
void __thiscall GuildWarStateWin::AddGuildWarableListItem(GuildWarStateWin *this, SHINE_GUILD_WAR_ABLE_INFO *pkData)
{
  GuildWarStateWin *v2; // ebx@1
  int v3; // eax@2
  unsigned int v4; // ecx@2
  unsigned int v5; // edx@2
  unsigned int v6; // edi@2
  unsigned int v7; // eax@2
  CClientGuild *v8; // eax@2
  const char *v9; // eax@2
  const char *v10; // eax@2
  const char *v11; // eax@4
  const char *v12; // eax@8
  char acGuildName[17]; // [sp+8h] [bp-18h]@2

  v2 = this;
  if ( this->m_pListWinGuildWar )
  {
    v3 = SlideListWin::AddText(this->m_pListWinGuildWarable, 0);
    v4 = pkData->sName.n4_code[1];
    v5 = pkData->sName.n4_code[2];
    v6 = v3;
    *(_DWORD *)acGuildName = pkData->sName.n4_code[0];
    v7 = pkData->sName.n4_code[3];
    *(_DWORD *)&acGuildName[4] = v4;
    *(_DWORD *)&acGuildName[8] = v5;
    *(_DWORD *)&acGuildName[12] = v7;
    acGuildName[16] = 0;
    v8 = GuildTask::GetGuild();
    v9 = fs("%d", v6 + 10 * v8->m_iCurrPage);
    SlideListWin::SetText(v2->m_pListWinGuildWarable, v6, 0, v9);
    SlideListWin::SetText(v2->m_pListWinGuildWarable, v6, 1u, acGuildName);
    v10 = GetGuildWarStatusStr(&pkData->sTargetName);
    SlideListWin::SetText(v2->m_pListWinGuildWarable, v6, 2u, v10);
    if ( pkData->nType )
    {
      if ( pkData->nType == 1 )
        v11 = (const char *)TextData::Get(0x3E486D96u);
      else
        v11 = ".";
    }
    else
    {
      v11 = (const char *)TextData::Get(0x3E3D34A2u);
    }
    SlideListWin::SetText(v2->m_pListWinGuildWarable, v6, 3u, v11);
    if ( pkData->nNumMembers == -1 )
      v12 = (const char *)TextData::Get(0x5081E30u);
    else
      v12 = fs("%d", pkData->nNumMembers);
    SlideListWin::SetText(v2->m_pListWinGuildWarable, v6, 4u, v12);
    SlideListWin::SetData(v2->m_pListWinGuildWarable, v6, (unsigned int)pkData);
  }
}

//----- (005C4560) --------------------------------------------------------
void __thiscall GuildWarStateWin::UpdateMeWin(GuildWarStateWin *this, float fCurTime)
{
  GuildWarStateWin *v2; // esi@1
  CGuildWar::GUILD_WAR_LIST *v3; // ebx@1
  unsigned int v4; // edi@1
  const char *v5; // eax@4
  unsigned int dwLastTime; // [sp+Ch] [bp-10h]@3
  unsigned int dwPassedTime[2]; // [sp+10h] [bp-Ch]@1
  float fCurTimea; // [sp+24h] [bp+8h]@9

  v2 = this;
  *(_QWORD *)dwPassedTime = (signed __int64)GuildTask::GetPassedTimeSinceRefresh();
  dwPassedTime[1] = dwPassedTime[0];
  v3 = GuildTask::GetGuild()->m_GuildWar.m_pGuildWarListTop;
  v4 = 0;
  if ( SlideListWin::GetItemSize(v2->m_pListWinGuildWar) )
  {
    do
    {
      if ( !v3 )
        break;
      SlideListWin::GetData(v2->m_pListWinGuildWar, v4, &dwLastTime);
      if ( v3->WarInfo.nWarStatusRemainSec - dwPassedTime[1] < dwLastTime )
      {
        v5 = GetGuildWarTimeLeftStr(v3->WarInfo.nWarStatusRemainSec, dwPassedTime[1]);
        SlideListWin::SetText(v2->m_pListWinGuildWar, v4, 2u, v5);
        SlideListWin::SetData(v2->m_pListWinGuildWar, v4, v3->WarInfo.nWarStatusRemainSec);
      }
      v3 = v3->pLinkDn;
      ++v4;
    }
    while ( v4 < SlideListWin::GetItemSize(v2->m_pListWinGuildWar) );
  }
  SlideListWin::UpdateViewList(v2->m_pListWinGuildWar);
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
  {
    GameFrameWork::UpdateUIScroll(v2->m_pListWinGuildWar, v2->m_pkSlideBarGuildWarList);
    GameFrameWork::UpdateUIScroll(v2->m_pListWinGuildWarable, v2->m_pkSlideBarGuildWarableList);
  }
  if ( v2->m_bTimer != 1 )
  {
    fCurTimea = fCurTime - v2->m_fOldTime;
    if ( fCurTimea >= 5.0 )
      v2->m_bTimer = 1;
  }
}

//----- (005C46A0) --------------------------------------------------------
char __stdcall GuildWarStateWin::IsSeachNameSize(char *pSearchName)
{
  unsigned int v3; // edi@3
  GameFrameWork *v4; // esi@3
  NiUnsharedGeometryGroup *v5; // eax@6
  NiUnsharedGeometryGroup *v6; // eax@8
  char dbcs; // [sp+8h] [bp+8h]@3

  if ( !pSearchName )
    return 0;
  v3 = strlen(pSearchName);
  dbcs = *pSearchName;
  v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( !v4 )
    return 0;
  if ( IsDBCSLeadByte(dbcs) )
  {
    if ( v3 < 2 )
    {
      v5 = TextData3::Get(0x96D0CDB6);
      GameFrameWork::AddSysMsg(v4, (const char *)v5);
      return 0;
    }
    return 1;
  }
  if ( v3 < 1 )
  {
    v6 = TextData3::Get(0x96D0CDB6);
    GameFrameWork::AddSysMsg(v4, (const char *)v6);
    return 0;
  }
  return 1;
}

//----- (005C4740) --------------------------------------------------------
void __thiscall GuildWarStateWin::InvalidateGuildWarList(GuildWarStateWin *this)
{
  GuildWarStateWin *v1; // ebx@1
  CGuildWar::GUILD_WAR_LIST *i; // esi@1
  SlideListWin *v3; // ecx@2
  int v4; // eax@3
  int v5; // ecx@3
  int v6; // edx@3
  unsigned int v7; // edi@3
  int v8; // eax@3
  const char *v9; // eax@3
  signed __int64 dwPassedTime; // ST18_8@3
  const char *v11; // eax@3
  const char *v12; // eax@3
  const char *v13; // eax@3
  NiUnsharedGeometryGroup *v14; // eax@4
  NiUnsharedGeometryGroup *v15; // eax@7
  const char *v16; // eax@12
  NiUnsharedGeometryGroup *v17; // [sp+10h] [bp-1Ch]@6
  char szText[4]; // [sp+14h] [bp-18h]@3
  int v19; // [sp+18h] [bp-14h]@3
  int v20; // [sp+1Ch] [bp-10h]@3
  int v21; // [sp+20h] [bp-Ch]@3
  char v22; // [sp+24h] [bp-8h]@3

  v1 = this;
  SlideListWin::RemoveAllList(this->m_pListWinGuildWar);
  for ( i = GuildTask::GetGuild()->m_GuildWar.m_pGuildWarListTop; i; i = i->pLinkDn )
  {
    v3 = v1->m_pListWinGuildWar;
    if ( v3 )
    {
      v4 = SlideListWin::AddText(v3, 0);
      v5 = i->WarInfo.sName.n4_code[1];
      v6 = i->WarInfo.sName.n4_code[2];
      v7 = v4;
      *(_DWORD *)szText = i->WarInfo.sName.n4_code[0];
      v8 = i->WarInfo.sName.n4_code[3];
      v19 = v5;
      v20 = v6;
      v21 = v8;
      v22 = 0;
      v9 = fs("%d", v7);
      SlideListWin::SetText(v1->m_pListWinGuildWar, v7, 0, v9);
      SlideListWin::SetText(v1->m_pListWinGuildWar, v7, 1u, szText);
      dwPassedTime = (signed __int64)GuildTask::GetPassedTimeSinceRefresh();
      v11 = GetGuildWarTimeLeftStr(i->WarInfo.nWarStatusRemainSec, dwPassedTime);
      SlideListWin::SetText(v1->m_pListWinGuildWar, v7, 2u, v11);
      v12 = fs(
              "%d",
              i->WarInfo.MyScore.nKillScore[0]
            + i->WarInfo.MyScore.nKillScore[1]
            + i->WarInfo.MyScore.nKillScore[2]
            + i->WarInfo.MyScore.nKillScore[3]
            + i->WarInfo.MyScore.nKillScore[4]
            + i->WarInfo.MyScore.nKillScore[5]
            + i->WarInfo.MyScore.nKillScore[6]);
      SlideListWin::SetText(v1->m_pListWinGuildWar, v7, 3u, v12);
      v13 = fs(
              "%d",
              i->WarInfo.EnemyScore.nKillScore[0]
            + i->WarInfo.EnemyScore.nKillScore[1]
            + i->WarInfo.EnemyScore.nKillScore[2]
            + i->WarInfo.EnemyScore.nKillScore[3]
            + i->WarInfo.EnemyScore.nKillScore[4]
            + i->WarInfo.EnemyScore.nKillScore[5]
            + i->WarInfo.EnemyScore.nKillScore[6]);
      SlideListWin::SetText(v1->m_pListWinGuildWar, v7, 4u, v13);
      if ( i->WarInfo.nRequestNo == GuildTask::GetGuild()->m_Guild.nNo )
        v14 = TextData::Get(0xEAF20F2B);
      else
        v14 = TextData::Get(0xA2FC1727);
      v17 = v14;
      switch ( i->WarInfo.nWarStatus )
      {
        case 0:
          v15 = TextData::Get(0x6D738A94u);
          break;
        case 1:
          v15 = TextData::Get(0x7CB5CAE6u);
          break;
        case 2:
          v15 = TextData::Get(0xB0BAD2D2);
          break;
        case 3:
          v15 = TextData::Get(0xC4B9C9EB);
          break;
        default:
          v15 = (NiUnsharedGeometryGroup *)".";
          break;
      }
      v16 = fs("%s/%s", v17, v15);
      SlideListWin::SetText(v1->m_pListWinGuildWar, v7, 5u, v16);
      SlideListWin::SetData(v1->m_pListWinGuildWar, v7, 0xFFFFFFFF);
      SlideListWin::SetFontSize(v1->m_pListWinGuildWar, v7, 1);
    }
  }
  SlideListWin::Sort(v1->m_pListWinGuildWar, v1->m_nWarSortColumn, 0, 0);
  SlideListWin::AlignText(v1->m_pListWinGuildWar, 5u);
  SlideListWin::UpdateViewList(v1->m_pListWinGuildWar);
  SlideBar::SetSplitCnt(v1->m_pkSlideBarGuildWarList, v1->m_pListWinGuildWar->m_nSlideSplitCnt);
}

//----- (005C49E0) --------------------------------------------------------
void __thiscall GuildWarStateWin::InvalidateGuildWarableList(GuildWarStateWin *this)
{
  GuildWarStateWin *v1; // edi@1
  CGuildWarAble::GUILD_WAR_ABLE_LIST *i; // esi@1
  int v3; // eax@3
  int v4; // ecx@3
  int v5; // edx@3
  unsigned int v6; // ebx@3
  int v7; // eax@3
  CClientGuild *v8; // eax@3
  const char *v9; // eax@3
  const char *v10; // eax@4
  const char *v11; // eax@8
  const char *v12; // eax@12
  int v13; // eax@16
  SlideListWin *v14; // ecx@16
  CClientGuild *v15; // eax@19
  CClientGuild *v16; // eax@20
  char szText[4]; // [sp+8h] [bp-18h]@3
  int v18; // [sp+Ch] [bp-14h]@3
  int v19; // [sp+10h] [bp-10h]@3
  int v20; // [sp+14h] [bp-Ch]@3
  char v21; // [sp+18h] [bp-8h]@3

  v1 = this;
  SlideListWin::RemoveAllList(this->m_pListWinGuildWarable);
  for ( i = GuildTask::GetGuild()->m_GuildWarAble.m_pGuildWarAbleListTop; i; i = i->pLinkDn )
  {
    if ( v1->m_pListWinGuildWar )
    {
      v3 = SlideListWin::AddText(v1->m_pListWinGuildWarable, 0);
      v4 = i->WarInfo.sName.n4_code[1];
      v5 = i->WarInfo.sName.n4_code[2];
      v6 = v3;
      *(_DWORD *)szText = i->WarInfo.sName.n4_code[0];
      v7 = i->WarInfo.sName.n4_code[3];
      v18 = v4;
      v19 = v5;
      v20 = v7;
      v21 = 0;
      v8 = GuildTask::GetGuild();
      v9 = fs("%d", v6 + 10 * v8->m_iCurrPage);
      SlideListWin::SetText(v1->m_pListWinGuildWarable, v6, 0, v9);
      SlideListWin::SetText(v1->m_pListWinGuildWarable, v6, 1u, szText);
      *(_DWORD *)acStr_1 = i->WarInfo.sTargetName.n4_code[0];
      dword_A8E16C = i->WarInfo.sTargetName.n4_code[1];
      dword_A8E170 = i->WarInfo.sTargetName.n4_code[2];
      dword_A8E174 = i->WarInfo.sTargetName.n4_code[3];
      byte_A8E178 = 0;
      if ( acStr_1[0] )
        v10 = acStr_1;
      else
        v10 = (const char *)TextData::Get(0x6D738A94u);
      SlideListWin::SetText(v1->m_pListWinGuildWarable, v6, 2u, v10);
      if ( i->WarInfo.nType )
      {
        if ( i->WarInfo.nType == 1 )
          v11 = (const char *)TextData::Get(0x3E486D96u);
        else
          v11 = ".";
      }
      else
      {
        v11 = (const char *)TextData::Get(0x3E3D34A2u);
      }
      SlideListWin::SetText(v1->m_pListWinGuildWarable, v6, 3u, v11);
      if ( i->WarInfo.nNumMembers == -1 )
        v12 = (const char *)TextData::Get(0x5081E30u);
      else
        v12 = fs("%d", i->WarInfo.nNumMembers);
      SlideListWin::SetText(v1->m_pListWinGuildWarable, v6, 4u, v12);
      SlideListWin::SetData(v1->m_pListWinGuildWarable, v6, (unsigned int)i);
    }
  }
  v13 = v1->m_nWarableSortColumn;
  v14 = v1->m_pListWinGuildWarable;
  if ( v13 )
    SlideListWin::Sort(v14, v13, 0, 0);
  else
    SlideListWin::Sort(v14, 0, 0, 1);
  SlideListWin::AlignText(v1->m_pListWinGuildWarable, 5u);
  SlideListWin::UpdateViewList(v1->m_pListWinGuildWarable);
  v15 = GuildTask::GetGuild();
  if ( v15 )
  {
    v1->m_pkSlideBarCurPos = v15->m_iCurrPage;
    v16 = GuildTask::GetGuild();
    SlideBar::SetSplitCnt(v1->m_pkSlideBarGuildWarableList, v16->m_GuildWarAble.m_NumOfWarAbleList - 9);
    SlideBar::SetCurPos(v1->m_pkSlideBarGuildWarableList, v1->m_pkSlideBarCurPos);
  }
}
// A8E16C: using guessed type int dword_A8E16C;
// A8E170: using guessed type int dword_A8E170;
// A8E174: using guessed type int dword_A8E174;
// A8E178: using guessed type char byte_A8E178;

//----- (005C4C00) --------------------------------------------------------
void __thiscall GuildWarStateWin::OnShowWin(GuildWarStateWin *this)
{
  GuildWarStateWin *v1; // esi@1
  GameFrameWork *v2; // esi@2
  NiUnsharedGeometryGroup *v3; // eax@3
  CClientGuild *v4; // eax@4
  CClientGuild *v5; // eax@4

  v1 = this;
  if ( this->m_bTimer )
  {
    this->m_bTimer = 0;
    this->m_fOldTime = Timer::ms_fCurTime;
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 0x24u, 0, 0);
    v4 = GuildTask::GetGuild();
    CGuildWar::Clear(&v4->m_GuildWar);
    v5 = GuildTask::GetGuild();
    CGuildWarAble::Clear(&v5->m_GuildWarAble);
    GuildWarStateWin::InvalidateGuildWarList(v1);
    GuildWarStateWin::InvalidateGuildWarableList(v1);
    GuildTask::SetListRefreshEnable(1);
  }
  else
  {
    v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v2 )
    {
      v3 = TextData3::Get(0x32D6F69u);
      GameFrameWork::AddSysMsg(v2, (const char *)v3);
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (005C4CA0) --------------------------------------------------------
void __thiscall GuildWarStateWin::OnFirstPage(GuildWarStateWin *this)
{
  GuildWarStateWin *v1; // esi@1
  SlideListWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_pListWinGuildWarable;
  if ( v2 )
  {
    SlideListWin::RemoveAllList(v2);
    v1->m_pListWinGuildWarable->m_nViewStartPos = 0;
    SlideListWin::UpdateViewList(v1->m_pListWinGuildWarable);
    GuildWarStateWin::InvalidateGuildWarableList(v1);
  }
}

//----- (005C4CE0) --------------------------------------------------------
char __thiscall GuildWarStateWin::IsSeachHaveList(GuildWarStateWin *this)
{
  GuildWarStateWin *v1; // esi@1
  GameFrameWork *v2; // edi@1
  SHINE_GUILD_WAR_ABLE_INFO **i; // edi@3
  NiUnsharedGeometryGroup *v5; // eax@6

  v1 = this;
  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( !v2 )
    return 0;
  if ( !(((char *)v1->m_vecSeachAbleGuildWar._Mylast - (char *)v1->m_vecSeachAbleGuildWar._Myfirst) & 0xFFFFFFFC) )
  {
    v5 = TextData3::Get(0xB5D1D1A8);
    GameFrameWork::AddSysMsg(v2, (const char *)v5);
    return 0;
  }
  SlideListWin::RemoveAllList(v1->m_pListWinGuildWarable);
  SlideListWin::UpdateViewList(v1->m_pListWinGuildWarable);
  for ( i = v1->m_vecSeachAbleGuildWar._Myfirst; i != v1->m_vecSeachAbleGuildWar._Mylast; ++i )
    GuildWarStateWin::AddGuildWarableListItem(v1, *i);
  return 1;
}

//----- (005C4D70) --------------------------------------------------------
void __thiscall GuildWarStateWin::GuildWarStateWin(GuildWarStateWin *this)
{
  GuildWarStateWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GuildWarStateWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildWarStateWin::`vftable'{for `IDirectMessenger'};
  v1->m_spEdit.m_pObject = 0;
  v1->m_vecSeachAbleGuildWar._Myfirst = 0;
  v1->m_vecSeachAbleGuildWar._Mylast = 0;
  v1->m_vecSeachAbleGuildWar._Myend = 0;
  v1->m_fOldTime = 0.0;
  v1->m_pListWinGuildWar = 0;
  v1->m_pkSlideBarGuildWarList = 0;
  v1->m_nWarSortColumn = 0;
  v1->m_nWarableSortColumn = 0;
  v1->m_pkSlideBarCurPos = 0;
  v1->m_bTimer = 1;
}
// 9AD42C: using guessed type void (__thiscall *GuildWarStateWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AD44C: using guessed type int (__thiscall *GuildWarStateWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005C4DE0) --------------------------------------------------------
void __thiscall GuildWarStateWin::~GuildWarStateWin(GuildWarStateWin *this)
{
  GuildWarStateWin *v1; // esi@1
  SHINE_GUILD_WAR_ABLE_INFO **v2; // eax@1
  EditWin *v3; // edi@3

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildWarStateWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildWarStateWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_vecSeachAbleGuildWar._Myfirst;
  if ( v2 )
    operator delete(v2);
  v1->m_vecSeachAbleGuildWar._Myfirst = 0;
  v1->m_vecSeachAbleGuildWar._Mylast = 0;
  v1->m_vecSeachAbleGuildWar._Myend = 0;
  v3 = v1->m_spEdit.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9AD42C: using guessed type void (__thiscall *GuildWarStateWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AD44C: using guessed type int (__thiscall *GuildWarStateWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005C4E90) --------------------------------------------------------
GuildWarStateWin *__cdecl GuildWarStateWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  GuildWarStateWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x190u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    GuildWarStateWin::GuildWarStateWin((GuildWarStateWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (GuildWarStateWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (005C4FC0) --------------------------------------------------------
void __thiscall GuildWarStateWin::OnSearch(GuildWarStateWin *this)
{
  GuildWarStateWin *v1; // esi@1
  char *v2; // eax@1
  char *v3; // ebx@1
  char *v4; // ecx@3
  char *v5; // edi@3
  CGuildWarAble::GUILD_WAR_ABLE_LIST *i; // edi@5
  unsigned int v7; // eax@7
  unsigned int v8; // ecx@8
  int v9; // ebx@9
  SHINE_GUILD_WAR_ABLE_INFO **v10; // eax@11
  _DWORD *v11; // eax@16
  char *kSearchGuildName; // [sp+Ch] [bp-40h]@1
  CGuildWarAble::GUILD_WAR_ABLE_LIST *v13; // [sp+10h] [bp-3Ch]@7
  char strGuildName[32]; // [sp+14h] [bp-38h]@6
  char acname[17]; // [sp+34h] [bp-18h]@6

  v1 = this;
  v2 = (char *)((int (*)(void))this->m_spEdit.m_pObject->vfptr[113].__vecDelDtor)();
  v3 = v2;
  kSearchGuildName = v2;
  if ( v2 && GuildWarStateWin::IsSeachNameSize(v2) )
  {
    v4 = (char *)v1->m_vecSeachAbleGuildWar._Mylast;
    v5 = (char *)v1->m_vecSeachAbleGuildWar._Myfirst;
    if ( v5 != v4 )
    {
      memmove(v5, v4, 0);
      v1->m_vecSeachAbleGuildWar._Mylast = (SHINE_GUILD_WAR_ABLE_INFO **)v5;
      v3 = kSearchGuildName;
    }
    for ( i = GuildTask::GetGuild()->m_GuildWarAble.m_pGuildWarAbleListTop; i; i = i->pLinkDn )
    {
      *(_DWORD *)strGuildName = 0;
      *(_DWORD *)&strGuildName[4] = 0;
      *(_DWORD *)&strGuildName[8] = 0;
      *(_DWORD *)&strGuildName[12] = 0;
      *(_DWORD *)&strGuildName[16] = 0;
      *(_DWORD *)&strGuildName[20] = 0;
      *(_DWORD *)&strGuildName[24] = 0;
      *(_DWORD *)&strGuildName[28] = 0;
      *(_DWORD *)acname = i->WarInfo.sName.n4_code[0];
      *(_DWORD *)&acname[4] = i->WarInfo.sName.n4_code[1];
      *(_DWORD *)&acname[8] = i->WarInfo.sName.n4_code[2];
      *(_DWORD *)&acname[12] = i->WarInfo.sName.n4_code[3];
      acname[16] = 0;
      strncpy(strGuildName, acname, 0x12u);
      _strlwr(strGuildName);
      _strlwr(v3);
      if ( _mbsstr(strGuildName, v3) )
      {
        v7 = (unsigned int)v1->m_vecSeachAbleGuildWar._Mylast;
        v13 = i;
        if ( (unsigned int)&v13 >= v7
          || (v8 = (unsigned int)v1->m_vecSeachAbleGuildWar._Myfirst, v8 > (unsigned int)&v13) )
        {
          if ( (SHINE_GUILD_WAR_ABLE_INFO **)v7 == v1->m_vecSeachAbleGuildWar._Myend )
            std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
              (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v1->m_vecSeachAbleGuildWar,
              1u);
          v11 = v1->m_vecSeachAbleGuildWar._Mylast;
          if ( v11 )
            *v11 = i;
        }
        else
        {
          v9 = (signed int)((signed int)&v13 - v8) >> 2;
          if ( (SHINE_GUILD_WAR_ABLE_INFO **)v7 == v1->m_vecSeachAbleGuildWar._Myend )
            std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(
              (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v1->m_vecSeachAbleGuildWar,
              1u);
          v10 = v1->m_vecSeachAbleGuildWar._Mylast;
          if ( v10 )
            *v10 = v1->m_vecSeachAbleGuildWar._Myfirst[v9];
          v3 = kSearchGuildName;
        }
        ++v1->m_vecSeachAbleGuildWar._Mylast;
      }
    }
    if ( GuildWarStateWin::IsSeachHaveList(v1) )
      GuildWarStateWin::ViewSeachList(v1);
  }
}

//----- (005C5160) --------------------------------------------------------
void __thiscall GuildWarStateWin::OnCommand(GuildWarStateWin *this, unsigned int wParam, int lParam)
{
  GuildWarStateWin *v3; // esi@1
  CClientGuild *v4; // eax@8
  CClientGuild *v5; // eax@9

  v3 = this;
  switch ( wParam )
  {
    case 2u:
      GuildWarStateWin::OnCmdWarSlideBar(this);
      break;
    case 5u:
      GuildWarStateWin::OnCmdWarableSlideBar(this);
      break;
    case 8u:
      GuildWarStateWin::OnCmdApplyGuildWar(this);
      break;
    case 9u:
    case 0xAu:
    case 0xBu:
    case 0xCu:
    case 0xDu:
    case 0xEu:
      GuildWarStateWin::SortWarListBy(this, wParam - 9);
      break;
    case 0xFu:
      GuildWarStateWin::SortWarAbleListNum(this, 0);
      break;
    case 0x10u:
    case 0x11u:
    case 0x12u:
    case 0x13u:
    case 0x14u:
      GuildWarStateWin::SortWarableListBy(this, wParam - 15);
      break;
    case 6u:
      v4 = GuildTask::GetGuild();
      CClientGuild::ReqNextPage(v4);
      break;
    case 7u:
      v5 = GuildTask::GetGuild();
      CClientGuild::ReqPrevPage(v5);
      break;
    case 0x17u:
      GuildWarStateWin::OnSearch(this);
      break;
    case 0x18u:
      GuildTask::SetListRefreshEnable(1);
      ((void (__thiscall *)(_DWORD))v3->vfptr[66].__vecDelDtor)(v3);
      break;
    case 0x16u:
      GuildWarStateWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (005C5280) --------------------------------------------------------
void __thiscall GuildWarStateWin::OnEditEnd(GuildWarStateWin *this, unsigned int wParam, int lParam)
{
  GuildWarStateWin *v3; // esi@1
  EditWin *v4; // edi@1
  NiRefObjectVtbl *v5; // ebx@1
  int v6; // eax@1

  v3 = this;
  v4 = this->m_spEdit.m_pObject;
  v5 = v4->vfptr;
  v6 = ((int (__thiscall *)(_DWORD))v4->vfptr[114].__vecDelDtor)(this->m_spEdit.m_pObject);
  v5[115].__vecDelDtor((NiRefObject *)v4, v6);
  ((void (*)(void))v3->m_spEdit.m_pObject->vfptr[120].__vecDelDtor)();
  GuildWarStateWin::OnSearch(v3);
}

//----- (005C52C0) --------------------------------------------------------
char __thiscall GuildWarStateWin::Create(GuildWarStateWin *this, PgFrameWork *pkFrameWork)
{
  GuildWarStateWin *v2; // esi@1
  NiTexturePalette *v3; // ebx@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  char result; // al@9
  int v8; // edi@10
  int v9; // ebx@10
  NiSourceTexture *v10; // eax@10
  PgSprData *v11; // eax@11
  NiNode *v12; // esi@14
  PgFont *v13; // eax@19
  PgWinText *v14; // eax@19
  NiRefObjectVtbl *v15; // edx@19
  NiUnsharedGeometryGroup *v16; // eax@19
  PgSprData *v17; // eax@21
  PgSprData *v18; // eax@21
  SLWCreateInfo::Item *v19; // eax@21
  PgWinText *v20; // eax@31
  PgSprData *v21; // eax@39
  SlideListWin *v22; // eax@39
  PgSprData *v23; // eax@39
  SlideBar *v24; // eax@39
  float v25; // ecx@39
  PgWinText *v26; // eax@39
  PgFont *v27; // eax@39
  PgWinText *v28; // eax@39
  NiRefObjectVtbl *v29; // edx@39
  NiUnsharedGeometryGroup *v30; // eax@39
  float v31; // ecx@39
  PgWinText *v32; // eax@39
  PgFont *v33; // eax@39
  PgWinText *v34; // eax@39
  NiRefObjectVtbl *v35; // edx@39
  NiUnsharedGeometryGroup *v36; // eax@39
  float v37; // ecx@39
  PgWinText *v38; // eax@39
  PgFont *v39; // eax@39
  PgWinText *v40; // eax@39
  NiRefObjectVtbl *v41; // edx@39
  NiUnsharedGeometryGroup *v42; // eax@39
  float v43; // ecx@39
  PgWinText *v44; // eax@39
  PgFont *v45; // eax@39
  PgWinText *v46; // eax@39
  NiRefObjectVtbl *v47; // edx@39
  NiUnsharedGeometryGroup *v48; // eax@39
  float v49; // ecx@39
  PgWinText *v50; // eax@39
  PgFont *v51; // eax@39
  PgWinText *v52; // eax@39
  NiRefObjectVtbl *v53; // edx@39
  NiUnsharedGeometryGroup *v54; // eax@39
  float v55; // ecx@39
  PgWinText *v56; // eax@39
  PgFont *v57; // eax@39
  PgWinText *v58; // eax@39
  NiRefObjectVtbl *v59; // edx@39
  NiUnsharedGeometryGroup *v60; // eax@39
  PgFont *v61; // eax@41
  PgWinText *v62; // eax@41
  NiRefObjectVtbl *v63; // edx@41
  NiUnsharedGeometryGroup *v64; // eax@41
  SLWCreateInfo::Item *v65; // eax@41
  PgWinText *v66; // eax@41
  PgSprData *v67; // eax@41
  SlideListWin *v68; // eax@41
  PgSprData *v69; // eax@41
  SlideBar *v70; // eax@41
  float v71; // ecx@41
  PgWinText *v72; // eax@41
  PgFont *v73; // eax@41
  PgWinText *v74; // eax@41
  NiRefObjectVtbl *v75; // edx@41
  NiUnsharedGeometryGroup *v76; // eax@41
  float v77; // ecx@41
  PgWinText *v78; // eax@41
  PgFont *v79; // eax@41
  PgWinText *v80; // eax@41
  NiRefObjectVtbl *v81; // edx@41
  NiUnsharedGeometryGroup *v82; // eax@41
  float v83; // ecx@41
  PgWinText *v84; // eax@41
  PgFont *v85; // eax@41
  PgWinText *v86; // eax@41
  NiRefObjectVtbl *v87; // edx@41
  NiUnsharedGeometryGroup *v88; // eax@41
  float v89; // ecx@41
  PgWinText *v90; // eax@41
  PgFont *v91; // eax@41
  PgWinText *v92; // eax@41
  NiRefObjectVtbl *v93; // edx@41
  NiUnsharedGeometryGroup *v94; // eax@41
  float v95; // ecx@41
  PgWinText *v96; // eax@41
  PgFont *v97; // eax@41
  PgWinText *v98; // eax@41
  NiRefObjectVtbl *v99; // edx@41
  NiUnsharedGeometryGroup *v100; // eax@41
  PgFont *v101; // eax@42
  PgWinText *v102; // eax@42
  NiRefObjectVtbl *v103; // edx@42
  NiUnsharedGeometryGroup *v104; // eax@42
  float v105; // ecx@42
  int v106; // eax@42
  PgFont *v107; // eax@42
  PgWinText *v108; // eax@42
  NiRefObjectVtbl *v109; // edx@42
  NiUnsharedGeometryGroup *v110; // eax@42
  PgSprData::PgHitTester *v111; // eax@42
  PgWinText *v112; // edx@42
  PgFont *v113; // eax@42
  PgWinText *v114; // eax@42
  NiRefObjectVtbl *v115; // edx@42
  NiUnsharedGeometryGroup *v116; // eax@42
  EditWin *v117; // eax@42
  float v118; // ecx@42
  PgWinText *v119; // eax@42
  PgFont *v120; // eax@42
  PgWinText *v121; // eax@42
  NiRefObjectVtbl *v122; // edx@42
  NiUnsharedGeometryGroup *v123; // eax@42
  float v124; // ecx@42
  PgWinText *v125; // eax@42
  PgFont *v126; // eax@42
  PgWinText *v127; // edi@42
  NiRefObjectVtbl *v128; // ebx@42
  NiUnsharedGeometryGroup *v129; // eax@42
  SLWCreateInfo kCreateInfo; // [sp+F8h] [bp-64h]@21
  unsigned int uiWidth; // [sp+114h] [bp-48h]@13
  unsigned int uiHeight; // [sp+118h] [bp-44h]@13
  NiSourceTexture *pkTexture8; // [sp+11Ch] [bp-40h]@19
  int uiTop; // [sp+120h] [bp-3Ch]@4
  int uiLeft; // [sp+124h] [bp-38h]@4
  NiPointer<NiNode> spNode; // [sp+128h] [bp-34h]@1
  PgWinText *pkTextWin; // [sp+12Ch] [bp-30h]@19
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+130h] [bp-2Ch]@21
  int v139; // [sp+158h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  this->m_pkFrameWork = pkFrameWork;
  v3 = pTexturePalette;
  v139 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildWarMenu.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "GuildWarStateWin", 0) )
  {
    v6 = spNode.m_pObject;
    v139 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = uiLeft;
  v9 = uiTop;
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v11, (PgWin *)&v2->vfptr, 0, 0);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v13 = Font::Get(0);
    v14 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9, uiWidth, uiHeight, v13, (PgWin *)&v2->vfptr, 0, 0);
    v15 = v14->vfptr;
    pkTextWin = v14;
    v15[122].__vecDelDtor((NiRefObject *)v14, 1u);
    ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
    pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
    v16 = TextData::Get(0xC9253B46);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))&pkTexture8[6].m_bStatic)(pkTextWin, v16);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
    PgWinCloseBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr);
    pkTexture8 = MenuTexMgr::GetTexture(4u);
    if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
    {
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "HelpLinkNor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture8);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
      PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x16u, 0, 0);
    }
    v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v17, (PgWin *)&v2->vfptr, 0, 0);
    v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v18, (PgWin *)&v2->vfptr, 0, 0);
    kCreateInfo.m_arrItem._Myfirst = 0;
    kCreateInfo.m_arrItem._Mylast = 0;
    kCreateInfo.m_arrItem._Myend = 0;
    kCreateInfo.m_bMakeData = 0;
    kCreateInfo.m_nOffX = 0;
    kCreateInfo.m_nOffY = 0;
    LOBYTE(v139) = 1;
    v19 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
    v19->nItemType = 1;
    v19->pNode = spNode.m_pObject;
    pkTextWin = (PgWinText *)v19;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarNor", 0xCu);
    LOBYTE(v139) = 2;
    pkTextWin = (PgWinText *)((char *)pkTextWin + 72);
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkTextWin,
      &_Val);
    LOBYTE(v139) = 1;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarClick", 0xEu);
    LOBYTE(v139) = 3;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkTextWin,
      &_Val);
    LOBYTE(v139) = 1;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarOver", 0xDu);
    LOBYTE(v139) = 4;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkTextWin,
      &_Val);
    LOBYTE(v139) = 1;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    pkTextWin->vfptr = (NiRefObjectVtbl *)2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column01", 8u);
    LOBYTE(v139) = 5;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
      &_Val);
    LOBYTE(v139) = 1;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
    pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    pkTextWin->vfptr = (NiRefObjectVtbl *)2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column02", 8u);
    LOBYTE(v139) = 6;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
      &_Val);
    LOBYTE(v139) = 1;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    v20 = pkTextWin;
    pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
    LOBYTE(v20->m_kLocal.m_Translate.x) = 1;
    pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    pkTextWin->vfptr = (NiRefObjectVtbl *)2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column03", 8u);
    LOBYTE(v139) = 7;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
      &_Val);
    LOBYTE(v139) = 1;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
    pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    pkTextWin->vfptr = (NiRefObjectVtbl *)2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column04", 8u);
    LOBYTE(v139) = 8;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
      &_Val);
    LOBYTE(v139) = 1;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
    pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    pkTextWin->vfptr = (NiRefObjectVtbl *)2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column05", 8u);
    LOBYTE(v139) = 9;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
      &_Val);
    LOBYTE(v139) = 1;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
    pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    pkTextWin->vfptr = (NiRefObjectVtbl *)2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column06", 8u);
    LOBYTE(v139) = 10;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
      &_Val);
    LOBYTE(v139) = 1;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
    kCreateInfo.m_nOffX = 5;
    kCreateInfo.m_nOffY = 0;
    SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
    v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &uiLeft, &uiTop, 0);
    v22 = SlideListWin::CreateWin(uiLeft - v8, uiTop - v9, v21, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
    v2->m_pListWinGuildWar = v22;
    v22->m_uiRClickMsg = 0;
    v2->m_pListWinGuildWar->m_uiLClickMsg = 1;
    SlideListWin::AlignText(v2->m_pListWinGuildWar, 5u);
    SlideListWin::UpdateViewList(v2->m_pListWinGuildWar);
    v23 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle", &uiLeft, &uiTop, 0);
    v24 = SlideBar::CreateWin(
            spNode.m_pObject,
            "SlideBar",
            "SlideBar_UpBtn",
            "SlideBar_DnBtn",
            v23,
            0,
            (PgWin *)&v2->vfptr);
    v2->m_pkSlideBarGuildWarList = v24;
    v24->m_uiClickMsg = 2;
    v2->m_pkSlideBarGuildWarList->m_eType = 1;
    SlideBar::SetSplitCnt(v2->m_pkSlideBarGuildWarList, v2->m_pListWinGuildWar->m_nSlideSplitCnt);
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title01Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title01Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title01Over");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 9u, 0, 0);
    v25 = pkTextWin->m_kWorldBound.m_kCenter.x;
    v26 = *(PgWinText **)(*(_DWORD *)LODWORD(v25) + 20);
    pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v25) + 24);
    pkTextWin = v26;
    v27 = Font::Get(MAIN_MENU);
    v28 = PgWinText::CreateWin(
            uiLeft - v8,
            uiTop - v9 + 1,
            (unsigned int)pkTextWin,
            (unsigned int)pkTexture8,
            v27,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v29 = v28->vfptr;
    pkTextWin = v28;
    v29[122].__vecDelDtor((NiRefObject *)v28, 5u);
    pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
    v30 = TextData::Get(0x88CBE8E1);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))&pkTexture8[6].m_bStatic)(pkTextWin, v30);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title02Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title02Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title02Over");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xAu, 0, 0);
    v31 = pkTextWin->m_kWorldBound.m_kCenter.x;
    v32 = *(PgWinText **)(*(_DWORD *)LODWORD(v31) + 20);
    pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v31) + 24);
    pkTextWin = v32;
    v33 = Font::Get(MAIN_MENU);
    v34 = PgWinText::CreateWin(
            uiLeft - v8,
            uiTop - v9 + 1,
            (unsigned int)pkTextWin,
            (unsigned int)pkTexture8,
            v33,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v35 = v34->vfptr;
    pkTextWin = v34;
    v35[122].__vecDelDtor((NiRefObject *)v34, 5u);
    pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
    v36 = TextData::Get(0x86D1C8EA);
    (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v36);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title03Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title03Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title03Over");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xBu, 0, 0);
    v37 = pkTextWin->m_kWorldBound.m_kCenter.x;
    v38 = *(PgWinText **)(*(_DWORD *)LODWORD(v37) + 20);
    pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v37) + 24);
    pkTextWin = v38;
    v39 = Font::Get(MAIN_MENU);
    v40 = PgWinText::CreateWin(
            uiLeft - v8,
            uiTop - v9 + 1,
            (unsigned int)pkTextWin,
            (unsigned int)pkTexture8,
            v39,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v41 = v40->vfptr;
    pkTextWin = v40;
    v41[122].__vecDelDtor((NiRefObject *)v40, 5u);
    pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
    v42 = TextData::Get(0x838775A8);
    (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v42);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title04Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title04Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title04Over");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xCu, 0, 0);
    v43 = pkTextWin->m_kWorldBound.m_kCenter.x;
    v44 = *(PgWinText **)(*(_DWORD *)LODWORD(v43) + 20);
    pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v43) + 24);
    pkTextWin = v44;
    v45 = Font::Get(MAIN_MENU);
    v46 = PgWinText::CreateWin(
            uiLeft - v8,
            uiTop - v9 + 1,
            (unsigned int)pkTextWin,
            (unsigned int)pkTexture8,
            v45,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v47 = v46->vfptr;
    pkTextWin = v46;
    v47[122].__vecDelDtor((NiRefObject *)v46, 5u);
    pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
    v48 = TextData::Get(0x79D5EDE2u);
    (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v48);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title05Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title05Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title05Over");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xDu, 0, 0);
    v49 = pkTextWin->m_kWorldBound.m_kCenter.x;
    v50 = *(PgWinText **)(*(_DWORD *)LODWORD(v49) + 20);
    pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v49) + 24);
    pkTextWin = v50;
    v51 = Font::Get(MAIN_MENU);
    v52 = PgWinText::CreateWin(
            uiLeft - v8,
            uiTop - v9 + 1,
            (unsigned int)pkTextWin,
            (unsigned int)pkTexture8,
            v51,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v53 = v52->vfptr;
    pkTextWin = v52;
    v53[122].__vecDelDtor((NiRefObject *)v52, 5u);
    pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
    v54 = TextData::Get(0xCDDB185B);
    (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v54);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title06Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title06Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title06Over");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xEu, 0, 0);
    v55 = pkTextWin->m_kWorldBound.m_kCenter.x;
    v56 = *(PgWinText **)(*(_DWORD *)LODWORD(v55) + 20);
    pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v55) + 24);
    pkTextWin = v56;
    v57 = Font::Get(MAIN_MENU);
    v58 = PgWinText::CreateWin(
            uiLeft - v8,
            uiTop - v9 + 1,
            (unsigned int)pkTextWin,
            (unsigned int)pkTexture8,
            v57,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v59 = v58->vfptr;
    pkTextWin = v58;
    v59[122].__vecDelDtor((NiRefObject *)v58, 5u);
    pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
    v60 = TextData::Get(0x887C7E8D);
    (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v60);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    if ( PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "GuildList",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight)
      && (v61 = Font::Get(SMALL),
          v62 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9, uiWidth, uiHeight, v61, (PgWin *)&v2->vfptr, 0, 0),
          v63 = v62->vfptr,
          pkTextWin = v62,
          v63[122].__vecDelDtor((NiRefObject *)v62, 1u),
          pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr,
          v64 = TextData::Get(0xC9253B46),
          (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v64),
          ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0),
          SLWCreateInfo::Clear(&kCreateInfo),
          v65 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1),
          v65->nItemType = 1,
          v65->pNode = spNode.m_pObject,
          pkTextWin = (PgWinText *)v65,
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
            &_Val,
            "ColumnBarNor01"),
          LOBYTE(v139) = 11,
          pkTextWin = (PgWinText *)((char *)pkTextWin + 72),
          std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
            (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkTextWin,
            &_Val),
          LOBYTE(v139) = 1,
          std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val),
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
            &_Val,
            "ColumnBarClick01"),
          LOBYTE(v139) = 12,
          std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
            (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkTextWin,
            &_Val),
          LOBYTE(v139) = 1,
          std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val),
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
            &_Val,
            "ColumnBarOver01"),
          LOBYTE(v139) = 13,
          std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
            (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkTextWin,
            &_Val),
          LOBYTE(v139) = 1,
          std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val),
          pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2),
          pkTextWin->vfptr = (NiRefObjectVtbl *)2,
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
            &_Val,
            "Column07"),
          LOBYTE(v139) = 14,
          std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
            (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
            &_Val),
          LOBYTE(v139) = 1,
          std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val),
          pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject,
          pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2),
          pkTextWin->vfptr = (NiRefObjectVtbl *)2,
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
            &_Val,
            "Column08"),
          LOBYTE(v139) = 15,
          std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
            (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
            &_Val),
          LOBYTE(v139) = 1,
          std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val),
          v66 = pkTextWin,
          pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject,
          LOBYTE(v66->m_kLocal.m_Translate.x) = 1,
          pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2),
          pkTextWin->vfptr = (NiRefObjectVtbl *)2,
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
            &_Val,
            "Column09"),
          LOBYTE(v139) = 16,
          std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
            (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
            &_Val),
          LOBYTE(v139) = 1,
          std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val),
          pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject,
          pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2),
          pkTextWin->vfptr = (NiRefObjectVtbl *)2,
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
            &_Val,
            "Column10"),
          LOBYTE(v139) = 17,
          std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
            (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
            &_Val),
          LOBYTE(v139) = 1,
          std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val),
          pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject,
          pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2),
          pkTextWin->vfptr = (NiRefObjectVtbl *)2,
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
            &_Val,
            "Column11"),
          LOBYTE(v139) = 18,
          std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
            (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
            &_Val),
          LOBYTE(v139) = 1,
          std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val),
          pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject,
          kCreateInfo.m_nOffX = 5,
          kCreateInfo.m_nOffY = 0,
          SLWCreateInfo::MakeTempData(&kCreateInfo, 0),
          v67 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text02", &uiLeft, &uiTop, 0),
          v68 = SlideListWin::CreateWin(uiLeft - v8, uiTop - v9, v67, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0),
          v2->m_pListWinGuildWarable = v68,
          v68->m_uiRClickMsg = 3,
          v2->m_pListWinGuildWarable->m_uiLClickMsg = 4,
          SlideListWin::AlignText(v2->m_pListWinGuildWarable, 5u),
          SlideListWin::UpdateViewList(v2->m_pListWinGuildWarable),
          v69 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle", &uiLeft, &uiTop, 0),
          v70 = SlideBar::CreateWin(
                  spNode.m_pObject,
                  "SlideBar01",
                  "SlideBar01_UpBtn",
                  "SlideBar01_DnBtn",
                  v69,
                  0,
                  (PgWin *)&v2->vfptr),
          v2->m_pkSlideBarGuildWarableList = v70,
          v70->m_uiClickMsg = 5,
          v2->m_pkSlideBarGuildWarableList->m_eType = 1,
          SlideBar::SetSplitCnt(v2->m_pkSlideBarGuildWarableList, v2->m_pListWinGuildWarable->m_nSlideSplitCnt),
          pkTextWin = (PgWinText *)PgSprData::Create(
                                     (NiAVObject *)&spNode.m_pObject->vfptr,
                                     "Title07Nor",
                                     &uiLeft,
                                     &uiTop,
                                     0),
          PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title07Click"),
          PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title07Over"),
          PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xFu, 0, 0),
          v71 = pkTextWin->m_kWorldBound.m_kCenter.x,
          v72 = *(PgWinText **)(*(_DWORD *)LODWORD(v71) + 20),
          pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v71) + 24),
          pkTextWin = v72,
          v73 = Font::Get(MAIN_MENU),
          v74 = PgWinText::CreateWin(
                  uiLeft - v8,
                  uiTop - v9 + 1,
                  (unsigned int)pkTextWin,
                  (unsigned int)pkTexture8,
                  v73,
                  (PgWin *)&v2->vfptr,
                  0,
                  0),
          v75 = v74->vfptr,
          pkTextWin = v74,
          v75[122].__vecDelDtor((NiRefObject *)v74, 5u),
          pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr,
          v76 = TextData::Get(0x88CBE8E1),
          (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v76),
          ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0),
          pkTextWin = (PgWinText *)PgSprData::Create(
                                     (NiAVObject *)&spNode.m_pObject->vfptr,
                                     "Title08Nor",
                                     &uiLeft,
                                     &uiTop,
                                     0),
          PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title08Click"),
          PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title08Over"),
          PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x10u, 0, 0),
          v77 = pkTextWin->m_kWorldBound.m_kCenter.x,
          v78 = *(PgWinText **)(*(_DWORD *)LODWORD(v77) + 20),
          pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v77) + 24),
          pkTextWin = v78,
          v79 = Font::Get(MAIN_MENU),
          v80 = PgWinText::CreateWin(
                  uiLeft - v8,
                  uiTop - v9 + 1,
                  (unsigned int)pkTextWin,
                  (unsigned int)pkTexture8,
                  v79,
                  (PgWin *)&v2->vfptr,
                  0,
                  0),
          v81 = v80->vfptr,
          pkTextWin = v80,
          v81[122].__vecDelDtor((NiRefObject *)v80, 5u),
          pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr,
          v82 = TextData::Get(0x86D1C8EA),
          (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v82),
          ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0),
          pkTextWin = (PgWinText *)PgSprData::Create(
                                     (NiAVObject *)&spNode.m_pObject->vfptr,
                                     "Title09Nor",
                                     &uiLeft,
                                     &uiTop,
                                     0),
          PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title09Click"),
          PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title09Over"),
          PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x11u, 0, 0),
          v83 = pkTextWin->m_kWorldBound.m_kCenter.x,
          v84 = *(PgWinText **)(*(_DWORD *)LODWORD(v83) + 20),
          pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v83) + 24),
          pkTextWin = v84,
          v85 = Font::Get(MAIN_MENU),
          v86 = PgWinText::CreateWin(
                  uiLeft - v8,
                  uiTop - v9 + 1,
                  (unsigned int)pkTextWin,
                  (unsigned int)pkTexture8,
                  v85,
                  (PgWin *)&v2->vfptr,
                  0,
                  0),
          v87 = v86->vfptr,
          pkTextWin = v86,
          v87[122].__vecDelDtor((NiRefObject *)v86, 5u),
          pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr,
          v88 = TextData::Get(0xC9253B46),
          (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v88),
          ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0),
          pkTextWin = (PgWinText *)PgSprData::Create(
                                     (NiAVObject *)&spNode.m_pObject->vfptr,
                                     "Title10Nor",
                                     &uiLeft,
                                     &uiTop,
                                     0),
          PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title10Click"),
          PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title10Over"),
          PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x12u, 0, 0),
          v89 = pkTextWin->m_kWorldBound.m_kCenter.x,
          v90 = *(PgWinText **)(*(_DWORD *)LODWORD(v89) + 20),
          pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v89) + 24),
          pkTextWin = v90,
          v91 = Font::Get(MAIN_MENU),
          v92 = PgWinText::CreateWin(
                  uiLeft - v8,
                  uiTop - v9 + 1,
                  (unsigned int)pkTextWin,
                  (unsigned int)pkTexture8,
                  v91,
                  (PgWin *)&v2->vfptr,
                  0,
                  0),
          v93 = v92->vfptr,
          pkTextWin = v92,
          v93[122].__vecDelDtor((NiRefObject *)v92, 5u),
          pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr,
          v94 = TextData::Get(0x88C9DFD4),
          (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v94),
          ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0),
          pkTextWin = (PgWinText *)PgSprData::Create(
                                     (NiAVObject *)&spNode.m_pObject->vfptr,
                                     "Title11Nor",
                                     &uiLeft,
                                     &uiTop,
                                     0),
          PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title11Click"),
          PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title11Over"),
          PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x13u, 0, 0),
          v95 = pkTextWin->m_kWorldBound.m_kCenter.x,
          v96 = *(PgWinText **)(*(_DWORD *)LODWORD(v95) + 20),
          pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v95) + 24),
          pkTextWin = v96,
          v97 = Font::Get(MAIN_MENU),
          v98 = PgWinText::CreateWin(
                  uiLeft - v8,
                  uiTop - v9 + 1,
                  (unsigned int)pkTextWin,
                  (unsigned int)pkTexture8,
                  v97,
                  (PgWin *)&v2->vfptr,
                  0,
                  0),
          v99 = v98->vfptr,
          pkTextWin = v98,
          v99[122].__vecDelDtor((NiRefObject *)v98, 5u),
          pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr,
          v100 = TextData::Get(0x1B242C77u),
          (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v100),
          ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0),
          PgUtil::GetTriShapeRect(
            (NiAVObject *)&spNode.m_pObject->vfptr,
            "GuildWarList",
            &uiLeft,
            &uiTop,
            &uiWidth,
            &uiHeight)) )
    {
      v101 = Font::Get(SMALL);
      v102 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9, uiWidth, uiHeight, v101, (PgWin *)&v2->vfptr, 0, 0);
      v103 = v102->vfptr;
      pkTextWin = v102;
      v103[122].__vecDelDtor((NiRefObject *)v102, 1u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v104 = TextData::Get(0x20132187u);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v104);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "GuildWarApplyNor",
                                 &uiLeft,
                                 &uiTop,
                                 0);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GuildWarApplyClick");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GuildWarApplyOver");
      PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 8u, 0, 0);
      v105 = pkTextWin->m_kWorldBound.m_kCenter.x;
      v106 = *(_DWORD *)LODWORD(v105);
      pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v105) + 24);
      pkTextWin = *(PgWinText **)(v106 + 20);
      v107 = Font::Get(0);
      v108 = PgWinText::CreateWin(
               uiLeft - v8,
               uiTop - v9 + 1,
               (unsigned int)pkTextWin,
               (unsigned int)pkTexture8,
               v107,
               (PgWin *)&v2->vfptr,
               0,
               0);
      v109 = v108->vfptr;
      pkTextWin = v108;
      v109[122].__vecDelDtor((NiRefObject *)v108, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v110 = TextData::Get(0xE2CF342C);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v110);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      v111 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text03", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
      v112 = (PgWinText *)v111->m_uiWidth;
      pkTexture8 = (NiSourceTexture *)v111->m_uiHeight;
      pkTextWin = v112;
      v113 = Font::Get(0);
      v114 = PgWinText::CreateWin(
               uiLeft - v8,
               uiTop - v9,
               (unsigned int)pkTextWin,
               (unsigned int)pkTexture8,
               v113,
               (PgWin *)&v2->vfptr,
               0,
               0);
      v115 = v114->vfptr;
      pkTextWin = v114;
      v115[122].__vecDelDtor((NiRefObject *)v114, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v116 = TextData3::Get(0xB306566u);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v116);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "Search_Input",
                                 &uiLeft,
                                 &uiTop,
                                 0);
      PgWinSpr::CreateWin(uiLeft, uiTop, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0, 0);
      v117 = EditWin::CreateWin(
               uiLeft,
               uiTop + 2,
               *(_DWORD *)(*(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x) + 20),
               *(_DWORD *)(*(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x) + 24),
               (PgWin *)&v2->vfptr,
               NORMAL,
               0x10u,
               1u,
               1,
               0,
               1);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spEdit, (NiD3DDefaultShader *)v117);
      EditWin::SetImeStatus(v2->m_spEdit.m_pObject, IS_KOREAN);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "SearchBtnNor",
                                 &uiLeft,
                                 &uiTop,
                                 0);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "SearchBtnClick");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "SearchBtnOver");
      PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x17u, 0, 0);
      v118 = pkTextWin->m_kWorldBound.m_kCenter.x;
      v119 = *(PgWinText **)(*(_DWORD *)LODWORD(v118) + 20);
      pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v118) + 24);
      pkTextWin = v119;
      v120 = Font::Get(0);
      v121 = PgWinText::CreateWin(
               uiLeft - v8,
               uiTop - v9 + 1,
               (unsigned int)pkTextWin,
               (unsigned int)pkTexture8,
               v120,
               (PgWin *)&v2->vfptr,
               0,
               0);
      v122 = v121->vfptr;
      pkTextWin = v121;
      v122[122].__vecDelDtor((NiRefObject *)v121, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v123 = TextData3::Get(0x67775F79u);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v123);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Nor", &uiLeft, &uiTop, 0);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
      PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x18u, 0, 0);
      v124 = pkTextWin->m_kWorldBound.m_kCenter.x;
      v125 = *(PgWinText **)(*(_DWORD *)LODWORD(v124) + 20);
      pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v124) + 24);
      pkTextWin = v125;
      v126 = Font::Get(0);
      v127 = PgWinText::CreateWin(
               uiLeft - v8,
               uiTop - v9 + 1,
               (unsigned int)pkTextWin,
               (unsigned int)pkTexture8,
               v126,
               (PgWin *)&v2->vfptr,
               0,
               0);
      v127->vfptr[122].__vecDelDtor((NiRefObject *)v127, 5u);
      v128 = v127->vfptr;
      v129 = TextData3::Get(0x7272A2EDu);
      v128[118].__vecDelDtor((NiRefObject *)v127, (unsigned int)v129);
      v127->vfptr[60].__vecDelDtor((NiRefObject *)v127, 0);
      ((void (__thiscall *)(GuildWarStateWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
        v2,
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        0.30000001,
        0.5);
      LOBYTE(v139) = 0;
      SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
      v139 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 1;
    }
    else
    {
      LOBYTE(v139) = 0;
      SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
      v139 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 0;
    }
  }
  else
  {
    v12 = spNode.m_pObject;
    v139 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v12 )
      v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005C6CA0) --------------------------------------------------------
GuildWarStateWin *__thiscall GuildWarStateWin::`scalar deleting destructor'(GuildWarStateWin *this, unsigned int a2)
{
  GuildWarStateWin *v2; // esi@1

  v2 = this;
  GuildWarStateWin::~GuildWarStateWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005C6CD0) --------------------------------------------------------
tm *__usercall localtime@<eax>(const int *_Time@<eax>)
{
  return _localtime32(_Time);
}

//----- (005C6D00) --------------------------------------------------------
void __thiscall GuildWin::OnSortByTitle01(GuildWin *this)
{
  GuildWin *v1; // esi@1
  SlideListWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_pListWinGuild;
  if ( v2 )
  {
    v1->m_nSortColumn = 0;
    SlideListWin::Sort(v2, 0, 0, 0);
    SlideListWin::UpdateViewList(v1->m_pListWinGuild);
  }
}

//----- (005C6D30) --------------------------------------------------------
void __thiscall GuildWin::OnSortByTitle02(GuildWin *this)
{
  GuildWin *v1; // esi@1
  SlideListWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_pListWinGuild;
  if ( v2 )
  {
    v1->m_nSortColumn = 1;
    SlideListWin::Sort(v2, 1, 0, 0);
    SlideListWin::UpdateViewList(v1->m_pListWinGuild);
  }
}

//----- (005C6D60) --------------------------------------------------------
void __thiscall GuildWin::OnSortByTitle03(GuildWin *this)
{
  GuildWin *v1; // esi@1
  SlideListWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_pListWinGuild;
  if ( v2 )
  {
    v1->m_nSortColumn = 2;
    SlideListWin::Sort(v2, 2, 0, 0);
    SlideListWin::UpdateViewList(v1->m_pListWinGuild);
  }
}

//----- (005C6D90) --------------------------------------------------------
void __thiscall GuildWin::OnSortByTitle04(GuildWin *this)
{
  GuildWin *v1; // esi@1
  SlideListWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_pListWinGuild;
  if ( v2 )
  {
    v1->m_nSortColumn = 3;
    SlideListWin::Sort(v2, 3, 0, 0);
    SlideListWin::UpdateViewList(v1->m_pListWinGuild);
  }
}

//----- (005C6DC0) --------------------------------------------------------
void __thiscall GuildWin::OnSortByTitle05(GuildWin *this)
{
  GuildWin *v1; // esi@1
  SlideListWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_pListWinGuild;
  if ( v2 )
  {
    v1->m_nSortColumn = 4;
    SlideListWin::Sort(v2, 4, 0, 0);
    SlideListWin::UpdateViewList(v1->m_pListWinGuild);
  }
}

//----- (005C6DF0) --------------------------------------------------------
void GuildWin::OnGuildMenu()
{
  ITask::DirectDispatchAll(42, 0);
}

//----- (005C6E50) --------------------------------------------------------
void __thiscall GuildWin::SetNextJoinTime(GuildWin *this, char *pkJoinTime)
{
  if ( this->m_pkNextJoinTime )
    ((void (__stdcall *)(_DWORD))this->m_pkNextJoinTime->vfptr[118].__vecDelDtor)(pkJoinTime);
}

//----- (005C6E80) --------------------------------------------------------
void __thiscall GuildWin::ClearGTInfo(GuildWin *this)
{
  GuildWin *v1; // esi@1

  v1 = this;
  if ( this->m_pkGuildToken )
    ((void (__stdcall *)(_DWORD))this->m_pkGuildToken->vfptr[118].__vecDelDtor)(&unk_9AD69E);
  if ( v1->m_pkNextJoinTime )
    ((void (__stdcall *)(_DWORD))v1->m_pkNextJoinTime->vfptr[118].__vecDelDtor)(&unk_9AD69F);
}

//----- (005C6ED0) --------------------------------------------------------
void GuildWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "GuildWin");
}

//----- (005C6F00) --------------------------------------------------------
void GuildWin::OnGuildTournamentMenu()
{
  GuildTournamentBaseWin *v1; // eax@2

  if ( GuildTask::GetGuildTournamnetBaseWin() )
  {
    v1 = GuildTask::GetGuildTournamnetBaseWin();
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
  }
}

//----- (005C6F20) --------------------------------------------------------
void __thiscall GuildWin::OnShowEmblemWin(GuildWin *this)
{
  GuildWin *v1; // esi@1
  CClientGuild *v2; // eax@1
  char v3; // al@5
  GameFrameWork *v4; // ecx@7

  v1 = this;
  v2 = GuildTask::GetGuild();
  if ( v2 )
  {
    if ( CClientGuild::AmIGuildMaster(v2) && !v1->m_kTabIndex && !v1->m_bDisableEmblem )
    {
      v3 = v1->m_EmblemState;
      if ( !v3 || v3 == -1 )
      {
        v4 = (GameFrameWork *)v1->m_pkFrameWork;
        if ( v4 )
          GameFrameWork::NcGuildEmblemCheckAvailabilityReq(v4);
      }
    }
  }
}

//----- (005C6F70) --------------------------------------------------------
char __thiscall GuildWin::SetEmblemIconInfo(GuildWin *this)
{
  GuildWin *v1; // eax@1
  GuildEmblemIcon *v2; // ecx@1
  char result; // al@2

  v1 = this;
  v2 = this->m_pkEmblemIcon;
  if ( v2 )
    result = GuildEmblemIcon::SetEmblemIcon(v2, &v1->m_GuildEmblemInfo.nPTFileNo, &v1->m_GuildEmblemInfo.nPTIconNo, 1);
  else
    result = 0;
  return result;
}

//----- (005C6FA0) --------------------------------------------------------
void __thiscall GuildWin::SetEmblemDisable(GuildWin *this, bool bDisable)
{
  GuildWin *v2; // esi@1
  GuildEmblemIcon *v3; // ecx@1

  v2 = this;
  v3 = this->m_pkEmblemIcon;
  if ( v3 )
  {
    IconWin::IconDisable((IconWin *)&v3->vfptr, bDisable);
    v2->m_bDisableEmblem = bDisable;
  }
}

//----- (005C6FD0) --------------------------------------------------------
void __thiscall GuildMemberVanishTask::SetInfo(GuildMemberVanishTask *this, Name5 *rkTargetName)
{
  *(_QWORD *)&this->m_kTargetName.n5_name[0] = *(_QWORD *)&rkTargetName->n5_code[0];
  *(_QWORD *)&this->m_kTargetName.n5_code[2] = *(_QWORD *)&rkTargetName->n5_code[2];
  this->m_kTargetName.n5_code[4] = rkTargetName->n5_code[4];
}

//----- (005C7000) --------------------------------------------------------
void __thiscall GuildMemberGradeSetupTask::SetInfo(GuildMemberGradeSetupTask *this, Name5 *rkTargetName, char grade, char TargetLevel)
{
  *(_QWORD *)&this->m_kTargetName.n5_name[0] = *(_QWORD *)&rkTargetName->n5_code[0];
  *(_QWORD *)&this->m_kTargetName.n5_code[2] = *(_QWORD *)&rkTargetName->n5_code[2];
  this->m_kTargetName.n5_code[4] = rkTargetName->n5_code[4];
  this->m_grade = grade;
  this->m_TargetLevel = TargetLevel;
}

//----- (005C7040) --------------------------------------------------------
void __thiscall GuildWin::ProcessMeInput(GuildWin *this, bool *bHit)
{
  GuildWin *v2; // esi@1

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[78].__vecDelDtor)() )
  {
    if ( dword_B64790 )
      ++dword_B64790;
    if ( PgWin::ms_kbRbutPressed.m_iBool )
      ++PgWin::ms_kbRbutPressed.m_iBool;
    PgWinFrame::ProcessMeInput((PgWinFrame *)&v2->vfptr, bHit);
    PgWin::ms_kbRbutPressed.m_bReserveFalse = 0;
    if ( PgWin::ms_kbRbutPressed.m_iBool )
      --PgWin::ms_kbRbutPressed.m_iBool;
    byte_B6478C = 0;
    if ( dword_B64790 )
      --dword_B64790;
  }
}
// B6478C: using guessed type char byte_B6478C;
// B64790: using guessed type int dword_B64790;

//----- (005C70C0) --------------------------------------------------------
void __thiscall GuildWin::UpdateMeWin(GuildWin *this, float fCurTime)
{
  GuildWin *v2; // esi@1

  v2 = this;
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
  {
    GameFrameWork::UpdateUIScroll(v2->m_pListWinNotice, v2->m_pkSlideBarGuildNotice);
    GameFrameWork::UpdateUIScroll(v2->m_pListWinGuild, v2->m_pkSlideBarGuildList);
    GameFrameWork::UpdateUIScroll(v2->m_pListWinHistory, v2->m_pkSlideBarGuildHistory);
  }
}

//----- (005C7120) --------------------------------------------------------
void __thiscall GuildWin::OnLClick(GuildWin *this, int nItemIndex)
{
  if ( this == (GuildWin *)g_pkToolTipWin->m_pkToolTipParentWin )
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
}

//----- (005C7140) --------------------------------------------------------
void __thiscall GuildWin::OnRClick(GuildWin *this, int nItemIndex)
{
  GuildWin *v2; // esi@1
  int v3; // edi@3
  int v4; // ebx@3
  unsigned int v5; // eax@3
  Name5 *v6; // eax@4
  CClientGuild *v7; // eax@9
  Name5 *v8; // eax@11
  CClientGuild *v9; // eax@16
  CClientGuild *v10; // eax@18
  CClientGuildAcademy *v11; // eax@20
  CClientGuild *v12; // eax@22
  CClientGuild *v13; // eax@24
  PopupMenuWin *v14; // ecx@26
  GUILD_MEMBER_CLIENT *pkMemberClient; // [sp+Ch] [bp-4h]@3

  v2 = this;
  if ( this == (GuildWin *)g_pkToolTipWin->m_pkToolTipParentWin )
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
  v3 = PgWin::ms_iMsX;
  v4 = PgWin::ms_iMsY;
  v5 = SlideListWin::GetCurSelIndex(v2->m_pListWinGuild);
  SlideListWin::GetData(v2->m_pListWinGuild, v5, (unsigned int *)&pkMemberClient);
  if ( pkMemberClient )
  {
    v6 = User::GetMainCharID(&g_kUser);
    if ( pkMemberClient->sName.n5_code[0] != v6->n5_code[0]
      || pkMemberClient->sName.n5_code[1] != v6->n5_code[1]
      || pkMemberClient->sName.n5_code[2] != v6->n5_code[2]
      || pkMemberClient->sName.n5_code[3] != v6->n5_code[3]
      || pkMemberClient->sName.n5_code[4] != v6->n5_code[4]
      || (v7 = GuildTask::GetGuild(), CClientGuild::AmIGuildMaster(v7)) )
    {
      v8 = User::GetMainCharID(&g_kUser);
      if ( pkMemberClient->sName.n5_code[0] == v8->n5_code[0]
        && pkMemberClient->sName.n5_code[1] == v8->n5_code[1]
        && pkMemberClient->sName.n5_code[2] == v8->n5_code[2]
        && pkMemberClient->sName.n5_code[3] == v8->n5_code[3]
        && pkMemberClient->sName.n5_code[4] == v8->n5_code[4]
        && (v9 = GuildTask::GetGuild(), CClientGuild::AmIGuildMaster(v9)) )
      {
        ((void (__stdcall *)(_DWORD, _DWORD))v2->m_pkGuildMemberPopupMenu->vfptr[77].__vecDelDtor)(v3, v4);
        PopupMenuWin::Clear(v2->m_pkGuildMemberPopupMenu);
        PopupMenuWin::AddMenu(
          v2->m_pkGuildMemberPopupMenu,
          v3,
          (PopupMenu *)&v2->m_spPopupInitializeAcademyMaster.m_pObject->vfptr);
        PopupMenuWin::FinishMenu(v2->m_pkGuildMemberPopupMenu, 0);
        PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v2->m_pkGuildMemberPopupMenu->vfptr);
        ((void (__stdcall *)(_DWORD))v2->m_pkGuildMemberPopupMenu->vfptr[60].__vecDelDtor)(1);
      }
      else
      {
        ((void (__stdcall *)(_DWORD, _DWORD))v2->m_pkGuildMemberPopupMenu->vfptr[77].__vecDelDtor)(v3, v4);
        PopupMenuWin::Clear(v2->m_pkGuildMemberPopupMenu);
        v10 = GuildTask::GetGuild();
        if ( CClientGuild::CanIAppoint(v10) )
        {
          PopupMenuWin::AddMenu(
            v2->m_pkGuildMemberPopupMenu,
            v3,
            (PopupMenu *)&v2->m_spPopupAppointMaster.m_pObject->vfptr);
          PopupMenuWin::AddMenu(
            v2->m_pkGuildMemberPopupMenu,
            v3,
            (PopupMenu *)&v2->m_spPopupAppointSubMaster.m_pObject->vfptr);
          PopupMenuWin::AddMenu(
            v2->m_pkGuildMemberPopupMenu,
            v3,
            (PopupMenu *)&v2->m_spPopupAppointSenior.m_pObject->vfptr);
          PopupMenuWin::AddMenu(
            v2->m_pkGuildMemberPopupMenu,
            v3,
            (PopupMenu *)&v2->m_spPopupAppointKnight.m_pObject->vfptr);
          PopupMenuWin::AddMenu(
            v2->m_pkGuildMemberPopupMenu,
            v3,
            (PopupMenu *)&v2->m_spPopupFireAppointment.m_pObject->vfptr);
        }
        v11 = GuildAcademyTask::GetGuildAcademy();
        if ( (unsigned __int8)CClientGuildAcademy::AmIGuildAcademyMaster(v11) )
          PopupMenuWin::AddMenu(
            v2->m_pkGuildMemberPopupMenu,
            v3,
            (PopupMenu *)&v2->m_spPopupAppointAcademyMaster.m_pObject->vfptr);
        v12 = GuildTask::GetGuild();
        if ( CClientGuild::AmIGuildMaster(v12) )
          PopupMenuWin::AddMenu(
            v2->m_pkGuildMemberPopupMenu,
            v3,
            (PopupMenu *)&v2->m_spPopupInitializeAcademyMaster.m_pObject->vfptr);
        v13 = GuildTask::GetGuild();
        if ( CClientGuild::CanIVanishMember(v13) )
          PopupMenuWin::AddMenu(v2->m_pkGuildMemberPopupMenu, v3, (PopupMenu *)&v2->m_spPopupVanish.m_pObject->vfptr);
        PopupMenuWin::AddMenu(v2->m_pkGuildMemberPopupMenu, v3, (PopupMenu *)&v2->m_spPopupWhisperChat.m_pObject->vfptr);
        v14 = v2->m_pkGuildMemberPopupMenu;
        if ( v14->m_dwMenuCount )
        {
          PopupMenuWin::FinishMenu(v14, 0);
          PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v2->m_pkGuildMemberPopupMenu->vfptr);
          ((void (__stdcall *)(_DWORD))v2->m_pkGuildMemberPopupMenu->vfptr[60].__vecDelDtor)(1);
        }
        else
        {
          PopupMenuWin::Clear(v14);
        }
      }
    }
    else
    {
      PopupMenuWin::Clear(v2->m_pkGuildMemberPopupMenu);
      PgWinMgr::ClosePopupWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkGuildMemberPopupMenu->vfptr);
    }
  }
}

//----- (005C7410) --------------------------------------------------------
void __thiscall GuildWin::OnDetailInfo(GuildWin *this)
{
  char *v1; // esi@1

  v1 = (char *)&this->vfptr;
  if ( this->m_pkMsgHooker )
  {
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))this->m_pkMsgHooker->vfptr->SendDirectMessage)(45, 0, v1);
    if ( *((_DWORD *)v1 + 1) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v1 + 1) + 20))(45, 0, v1);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v1 + 20))(v1, 45, 0, v1);
}

//----- (005C7460) --------------------------------------------------------
void __thiscall GuildWin::OnChangeTab(GuildWin *this, DirectUserMsgBody_CommunityTabChanged::TabEnum eTab)
{
  char *v2; // esi@1

  v2 = (char *)&this->vfptr;
  if ( this->m_pkMsgHooker )
  {
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))this->m_pkMsgHooker->vfptr->SendDirectMessage)(40, &eTab, v2);
    if ( *((_DWORD *)v2 + 1) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v2 + 1) + 20))(40, &eTab, v2);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v2 + 20))(v2, 40, &eTab, v2);
}

//----- (005C74C0) --------------------------------------------------------
void __thiscall GuildWin::OnWinClose(GuildWin *this)
{
  GuildWin *v1; // esi@1

  v1 = this;
  if ( this == (GuildWin *)g_pkToolTipWin->m_pkToolTipParentWin )
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
  GameFrameWork::CloseCommunityWin((GameFrameWork *)v1->m_pkFrameWork);
}

//----- (005C74F0) --------------------------------------------------------
void __stdcall GuildWin::OnSlideBar(SlideBar *pkSlideBar, SlideListWin *pkSlideListWin)
{
  if ( pkSlideBar )
  {
    if ( pkSlideListWin )
    {
      SlideBar::SetSplitCnt(pkSlideBar, pkSlideListWin->m_nSlideSplitCnt);
      pkSlideListWin->m_nViewStartPos = pkSlideBar->m_nCurPos;
      SlideListWin::UpdateViewList(pkSlideListWin);
    }
  }
}

//----- (005C7530) --------------------------------------------------------
void __thiscall GuildWin::OnTopWin(GuildWin *this)
{
  GameFrameWork::SetTopFriendAddWin((GameFrameWork *)this->m_pkFrameWork);
}

//----- (005C7540) --------------------------------------------------------
void __thiscall GuildMemberVanishTask::OnStart(GuildMemberVanishTask *this)
{
  GuildMemberVanishTask *v1; // esi@1
  unsigned int v2; // eax@1
  unsigned int v3; // edx@1
  unsigned int v4; // ecx@1
  unsigned int v5; // eax@1
  unsigned int v6; // ecx@1
  char *v7; // eax@1
  char *v8; // eax@1
  MsgBox *v9; // eax@1
  char pcTargetName[21]; // [sp+4h] [bp-1Ch]@1

  v1 = this;
  v2 = this->m_kTargetName.n5_code[0];
  v3 = this->m_kTargetName.n5_code[2];
  v4 = this->m_kTargetName.n5_code[1];
  *(_DWORD *)pcTargetName = v2;
  v5 = v1->m_kTargetName.n5_code[3];
  *(_DWORD *)&pcTargetName[8] = v3;
  *(_DWORD *)&pcTargetName[4] = v4;
  v6 = v1->m_kTargetName.n5_code[4];
  *(_DWORD *)&pcTargetName[12] = v5;
  *(_DWORD *)&pcTargetName[16] = v6;
  pcTargetName[20] = 0;
  v1->m_eState = 0;
  v7 = (char *)TextData::Get(0x103CFDA7u);
  v8 = fs(v7, pcTargetName);
  v9 = MsgBox::Modal(MSGBOX_OKCANCEL, v8);
  v1->m_pkMsgBox = v9;
  ((void (__stdcall *)(_DWORD))v9->vfptr->SetMsgHooker)(&v1->vfptr);
}

//----- (005C75C0) --------------------------------------------------------
void __thiscall GuildMemberVanishTask::DirectMessage(GuildMemberVanishTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  GuildMemberVanishTask *v4; // esi@1
  unsigned int v5; // eax@2
  IDirectMessenger *v6; // eax@3
  unsigned int v7; // eax@7
  GuildMemberVanishTask::State v8; // edx@7
  unsigned int v9; // ecx@7
  PROTO_NC_GUILD_MEMBER_VANISH_REQ kProto; // [sp+4h] [bp-18h]@7

  v4 = this;
  if ( iMsgTag == 27 )
  {
    v5 = this->m_kTargetName.n5_code[3];
    if ( v5 )
      v6 = (IDirectMessenger *)(v5 + 232);
    else
      v6 = 0;
    if ( pkFrom == v6 && !*(_DWORD *)pvBody )
    {
      v7 = this->m_kTargetName.n5_code[0];
      v8 = this->m_eState;
      kProto.CharID.n5_code[0] = this->m_kSerialTaskList.m_kAllocator.m_uiCount;
      v9 = this->m_kTargetName.n5_code[1];
      *(_QWORD *)&kProto.CharID.n5_code[1] = __PAIR__(v7, v8);
      *(_QWORD *)&kProto.CharID.n5_code[3] = __PAIR__(v4->m_kTargetName.n5_code[2], v9);
      NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 0xEu, &kProto, 20);
      v4->m_kSerialTaskList.m_pkTail = (NiTListItem<NiPointer<ITask> > *)1;
    }
  }
}

//----- (005C7640) --------------------------------------------------------
void __thiscall GuildMemberGradeSetupTask::OnStart(GuildMemberGradeSetupTask *this)
{
  GuildMemberGradeSetupTask *v1; // esi@1
  unsigned int v2; // edx@1
  unsigned int v3; // eax@1
  unsigned int v4; // ecx@1
  unsigned int v5; // eax@1
  unsigned int v6; // ecx@1
  char *v7; // eax@1
  bool v8; // zf@1
  char *v9; // eax@2
  char *v10; // eax@2
  MsgBox *v11; // eax@2
  char *v12; // ST10_4@3
  char *v13; // eax@3
  char *v14; // eax@3
  char pcTargetName[21]; // [sp+4h] [bp-1Ch]@1

  v1 = this;
  v2 = this->m_kTargetName.n5_code[2];
  v3 = this->m_kTargetName.n5_code[0];
  v4 = this->m_kTargetName.n5_code[1];
  *(_DWORD *)&pcTargetName[8] = v2;
  LOBYTE(v2) = v1->m_grade;
  *(_DWORD *)pcTargetName = v3;
  v5 = v1->m_kTargetName.n5_code[3];
  *(_DWORD *)&pcTargetName[4] = v4;
  v6 = v1->m_kTargetName.n5_code[4];
  *(_DWORD *)&pcTargetName[12] = v5;
  *(_DWORD *)&pcTargetName[16] = v6;
  pcTargetName[20] = 0;
  v7 = Guild::GetMemberGradeString(v2);
  v8 = v1->m_grade == 6;
  v1->m_eState = 0;
  if ( v8 )
  {
    v9 = (char *)TextData::Get(0x728B3FA8u);
    v10 = fs(v9, pcTargetName);
    v11 = MsgBox::Modal(MSGBOX_OKCANCEL, v10);
  }
  else
  {
    v12 = v7;
    v13 = (char *)TextData::Get(0x84F1C5F1);
    v14 = fs(v13, pcTargetName, v12);
    v11 = MsgBox::Modal(MSGBOX_OKCANCEL, v14);
  }
  v1->m_pkMsgBox = v11;
  v1->m_pkMsgBox->vfptr->SetMsgHooker(&v1->m_pkMsgBox->vfptr, &v1->vfptr);
}

//----- (005C7700) --------------------------------------------------------
bool __thiscall GuildMemberGradeSetupTask::OnProcessNetMsg(GuildMemberGradeSetupTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  GuildMemberGradeSetupTask *v5; // edi@1
  GameFrameWork *v6; // esi@3
  char *v7; // eax@4
  NiUnsharedGeometryGroup *v9; // eax@6
  char *v10; // eax@7
  char *v11; // eax@7
  char *v12; // eax@8

  v5 = this;
  if ( iDepart == 29 && iCommand == 23 )
  {
    v6 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    switch ( *(_WORD *)((char *)pvData + 21) )
    {
      case 0xCE8:
      case 0xCE9:
      case 0xCEA:
      case 0xCEB:
      case 0xCEC:
        v7 = (char *)TextData::Get(0xBDDE1046);
        MsgBox::Modal(MSGBOX_OK, v7);
        v5->m_eTaskState = 2;
        return 0;
      case 0xCEE:
        if ( !v6 )
          break;
        v9 = TextData::Get(0x9DB4B64F);
        goto LABEL_11;
      case 0xCFB:
        v10 = (char *)TextData2::Get(0x407D757Au);
        v11 = fs(v10, 20);
        MsgBox::Modal(MSGBOX_OK, v11);
        v5->m_eTaskState = 2;
        return 0;
      case 0xC8A:
        v12 = (char *)TextData2::Get(0x4A02B0B7u);
        MsgBox::Modal(MSGBOX_OK, v12);
        v5->m_eTaskState = 2;
        return 0;
      case 0xCEF:
        if ( v6 )
        {
          v9 = TextData3::Get(0xDF8C517B);
LABEL_11:
          GameFrameWork::AddSysMsg(v6, (const char *)v9);
        }
        break;
      default:
        break;
    }
    v5->m_eTaskState = 2;
  }
  return 0;
}

//----- (005C7890) --------------------------------------------------------
char __thiscall GuildMemberGradeSetupTask::ConfirmMasterChange(GuildMemberGradeSetupTask *this)
{
  GuildMemberGradeSetupTask *v1; // esi@1
  char *v2; // eax@2
  char *v3; // eax@2
  char result; // al@2

  v1 = this;
  if ( __PAIR__(this->m_grade, this->m_TargetLevel) >= 0x14u )
  {
    result = 1;
  }
  else
  {
    v2 = (char *)TextData2::Get(0x407D757Au);
    v3 = fs(v2, 20);
    MsgBox::Modal(MSGBOX_OK, v3);
    v1->m_eTaskState = 2;
    result = 0;
  }
  return result;
}

//----- (005C78D0) --------------------------------------------------------
void __thiscall GuildWin::OnEditNotice(GuildWin *this)
{
  GuildWin *v1; // esi@1
  CClientGuild *v2; // eax@1
  char *v3; // eax@2

  v1 = this;
  v2 = GuildTask::GetGuild();
  if ( CClientGuild::CanIWriteNotice(v2) )
  {
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkNoticeEditor->vfptr);
  }
  else
  {
    v3 = (char *)TextData::Get(0x43C1E7Au);
    MsgBox::Modal(MSGBOX_OK, v3);
  }
}

//----- (005C7910) --------------------------------------------------------
void __thiscall GuildWin::OnSlideBar(GuildWin *this)
{
  SlideListWin *v1; // esi@1
  SlideBar *v2; // edi@1

  v1 = this->m_pListWinGuild;
  v2 = this->m_pkSlideBarGuildList;
  if ( v2 )
  {
    if ( v1 )
    {
      SlideBar::SetSplitCnt(v2, v1->m_nSlideSplitCnt);
      v1->m_nViewStartPos = v2->m_nCurPos;
      SlideListWin::UpdateViewList(v1);
    }
  }
}

//----- (005C7950) --------------------------------------------------------
void __thiscall GuildWin::OnSlideBarNotice(GuildWin *this)
{
  SlideListWin *v1; // esi@1
  SlideBar *v2; // edi@1

  v1 = this->m_pListWinNotice;
  v2 = this->m_pkSlideBarGuildNotice;
  if ( v2 )
  {
    if ( v1 )
    {
      SlideBar::SetSplitCnt(v2, v1->m_nSlideSplitCnt);
      v1->m_nViewStartPos = v2->m_nCurPos;
      SlideListWin::UpdateViewList(v1);
    }
  }
}

//----- (005C7990) --------------------------------------------------------
void __thiscall GuildWin::OnSlideBarHistory(GuildWin *this)
{
  SlideListWin *v1; // esi@1
  SlideBar *v2; // edi@1

  v1 = this->m_pListWinHistory;
  v2 = this->m_pkSlideBarGuildHistory;
  if ( v2 )
  {
    if ( v1 )
    {
      SlideBar::SetSplitCnt(v2, v1->m_nSlideSplitCnt);
      v1->m_nViewStartPos = v2->m_nCurPos;
      SlideListWin::UpdateViewList(v1);
    }
  }
}

//----- (005C79D0) --------------------------------------------------------
NiUnsharedGeometryGroup *__stdcall GuildWin::GetHistoryText(GUILD_HISTORY_MSG_TYPE hisType)
{
  NiUnsharedGeometryGroup *result; // eax@2

  switch ( hisType )
  {
    case 0u:
      result = TextData3::Get(0x23184472u);
      break;
    case 1u:
      result = TextData3::Get(0xDED84422);
      break;
    case 2u:
      result = TextData3::Get(0xD41F4C1A);
      break;
    case 3u:
      result = TextData3::Get(0x2D284170u);
      break;
    case 0xAu:
      result = TextData3::Get(0x676EA983u);
      break;
    case 0xBu:
      result = TextData3::Get(0xBCC108C5);
      break;
    case 0xCu:
      result = TextData3::Get(0x6B7E9E7Eu);
      break;
    case 0xDu:
      result = TextData3::Get(0x766F9C79u);
      break;
    default:
      result = 0;
      break;
  }
  return result;
}

//----- (005C7AB0) --------------------------------------------------------
void __thiscall GuildWin::SetEmblemState(GuildWin *this, const char *eEmblemState)
{
  GuildWin *v2; // esi@1
  ColumnBut *v3; // edx@1
  GuildEmblemIcon *v4; // eax@2
  signed int v5; // ecx@3
  char *v6; // eax@9
  char *v7; // eax@14
  char *v8; // eax@17

  v2 = this;
  v3 = this->m_pkEmblemCheckBox;
  if ( v3 )
  {
    v4 = this->m_pkEmblemIcon;
    if ( v4 )
    {
      v5 = *eEmblemState;
      if ( v5 <= 255 )
      {
        if ( v5 == 255 )
        {
          v4->m_pkToolTipWin = 0;
          v2->m_pkEmblemCheckBox->m_pkToolTipWin = 0;
          ((void (__stdcall *)(_DWORD))v2->m_pkEmblemCheckBox->vfptr[64].__vecDelDtor)(1);
          ((void (__stdcall *)(_DWORD))v2->m_pkEmblemCheckBox->vfptr[60].__vecDelDtor)(1);
          v2->m_pkEmblemCheckBox->m_bCheck = 1;
        }
        else
        {
          switch ( v5 )
          {
            case 0:
              v4->m_pkToolTipWin = 0;
              ((void (__stdcall *)(_DWORD))v2->m_pkEmblemCheckBox->vfptr[64].__vecDelDtor)(0);
              ((void (__stdcall *)(_DWORD))v2->m_pkEmblemCheckBox->vfptr[60].__vecDelDtor)(0);
              GuildWin::SetEmblemDisable(v2, 0);
              break;
            case 3:
              if ( !v4->m_pkToolTipWin )
                v4->m_pkToolTipWin = g_pkToolTipWin;
              v6 = (char *)TextData3::Get(0x4FA1A77Au);
              PgWin::SetToolTipWinText((PgWin *)&v2->m_pkEmblemIcon->vfptr, v6);
              GuildWin::SetEmblemDisable(v2, 0);
              goto LABEL_10;
            case 1:
              if ( v2->m_bGuildEmblem )
              {
                if ( !v4->m_pkToolTipWin )
                  v4->m_pkToolTipWin = g_pkToolTipWin;
                v7 = (char *)TextData3::Get(0xC0EE4A29);
                PgWin::SetToolTipWinText((PgWin *)&v2->m_pkEmblemIcon->vfptr, v7);
                GuildWin::SetEmblemDisable(v2, 1);
LABEL_10:
                ((void (__stdcall *)(_DWORD))v2->m_pkEmblemCheckBox->vfptr[64].__vecDelDtor)(0);
                ((void (__stdcall *)(_DWORD))v2->m_pkEmblemCheckBox->vfptr[60].__vecDelDtor)(0);
              }
              break;
            case 4:
              if ( !v3->m_pkToolTipWin )
                v3->m_pkToolTipWin = g_pkToolTipWin;
              v8 = (char *)TextData3::Get(0xC0EE4A29);
              PgWin::SetToolTipWinText((PgWin *)&v2->m_pkEmblemCheckBox->vfptr, v8);
              ((void (__stdcall *)(_DWORD))v2->m_pkEmblemCheckBox->vfptr[64].__vecDelDtor)(1);
              ((void (__stdcall *)(_DWORD))v2->m_pkEmblemCheckBox->vfptr[60].__vecDelDtor)(1);
              v2->m_pkEmblemCheckBox->m_bCheck = 0;
              break;
            default:
              return;
          }
        }
      }
    }
  }
}

//----- (005C7C90) --------------------------------------------------------
void __thiscall GuildMemberGradeSetupTask::DirectMessage(GuildMemberGradeSetupTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  GuildMemberGradeSetupTask *v4; // esi@1
  unsigned int v5; // eax@2
  IDirectMessenger *v6; // eax@3
  unsigned int v7; // edx@8
  GuildMemberGradeSetupTask::State v8; // eax@8
  PROTO_NC_GUILD_MEMBER_GRADE_REQ kProto; // [sp+4h] [bp-1Ch]@8

  v4 = this;
  if ( iMsgTag == 27 )
  {
    v5 = this->m_kTargetName.n5_code[4];
    if ( v5 )
      v6 = (IDirectMessenger *)(v5 + 232);
    else
      v6 = 0;
    if ( pkFrom == v6 )
    {
      if ( *(_DWORD *)pvBody )
      {
        this->m_pkMsgHooker = (IDirectMessenger *)2;
      }
      else if ( GuildMemberGradeSetupTask::ConfirmMasterChange((GuildMemberGradeSetupTask *)((char *)this - 8)) )
      {
        v7 = v4->m_kSerialTaskList.m_kAllocator.m_uiCount;
        v8 = v4->m_eState;
        kProto.MemberGrade = v4->m_kTargetName.n5_name[13];
        kProto.CharID.n5_code[2] = v4->m_kTargetName.n5_code[0];
        *(_QWORD *)&kProto.CharID.n5_name[0] = __PAIR__(v8, v7);
        *(_QWORD *)&kProto.CharID.n5_code[3] = *(_QWORD *)&v4->m_kTargetName.n5_code[1];
        NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 0x16u, &kProto, 21);
        v4->m_kSerialTaskList.m_pkTail = (NiTListItem<NiPointer<ITask> > *)1;
      }
    }
  }
}

//----- (005C7D40) --------------------------------------------------------
void __thiscall GuildWin::AddListItem_DefInfo(GuildWin *this, GUILD_MEMBER_CLIENT *pkData)
{
  GuildWin *v2; // edi@1
  SlideListWin *v3; // ecx@1
  unsigned int v4; // eax@5
  unsigned int v5; // edx@5
  unsigned int v6; // eax@5
  unsigned int v7; // ebx@5
  char *v8; // eax@5
  const char *v9; // eax@6
  const char *v10; // eax@8
  const char *v11; // eax@8
  const char *v12; // eax@8
  SlideListWin *v13; // ecx@8
  char acname[21]; // [sp+8h] [bp-1Ch]@5

  v2 = this;
  v3 = this->m_pListWinGuild;
  if ( v3 && (!v2->m_bShowOnlineOnly || *(_BYTE *)&pkData->dLogonInfo & 1) && pkData->nLevel )
  {
    v4 = pkData->sName.n5_code[0];
    *(_DWORD *)&acname[4] = pkData->sName.n5_code[1];
    v5 = pkData->sName.n5_code[3];
    *(_DWORD *)acname = v4;
    v6 = pkData->sName.n5_code[2];
    *(_DWORD *)&acname[12] = v5;
    *(_DWORD *)&acname[8] = v6;
    *(_DWORD *)&acname[16] = pkData->sName.n5_code[4];
    acname[20] = 0;
    v7 = SlideListWin::AddText(v3, acname);
    v8 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), pkData->nClassID);
    if ( v8 )
      v9 = v8 + 21;
    else
      v9 = (const char *)&unk_96F8EB;
    SlideListWin::SetText(v2->m_pListWinGuild, v7, 1u, v9);
    v10 = fs("%d", pkData->nLevel);
    SlideListWin::SetText(v2->m_pListWinGuild, v7, 2u, v10);
    v11 = Guild::GetMemberGradeString(pkData->nGrade);
    SlideListWin::SetText(v2->m_pListWinGuild, v7, 3u, v11);
    v12 = fs("%d", pkData->nExpRatio);
    SlideListWin::SetText(v2->m_pListWinGuild, v7, 4u, v12);
    SlideListWin::SetData(v2->m_pListWinGuild, v7, (unsigned int)pkData);
    SlideListWin::SetFontSize(v2->m_pListWinGuild, v7, 1);
    v13 = v2->m_pListWinGuild;
    if ( *(_BYTE *)&pkData->dLogonInfo & 1 )
      SlideListWin::SetFontColor(v13, v7, 255, 255, 0);
    else
      SlideListWin::SetFontColor(v13, v7, 200, 200, 200);
  }
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (005C7EA0) --------------------------------------------------------
void __thiscall GuildWin::ViewAllInfo(GuildWin *this, PROTO_FRIEND_INFO *pdata)
{
  GuildWin *v2; // edi@1
  unsigned int v3; // ecx@1
  unsigned int v4; // edx@1
  unsigned int v5; // eax@1
  unsigned int v6; // ecx@1
  char *v7; // eax@1
  NiUnsharedGeometryGroup *v8; // eax@2
  NiUnsharedGeometryGroup *v9; // ST14_4@4
  NiUnsharedGeometryGroup *v10; // eax@4
  NiUnsharedGeometryGroup *v11; // ST10_4@5
  NiUnsharedGeometryGroup *v12; // ST10_4@6
  char *v13; // ST14_4@7
  NiUnsharedGeometryGroup *v14; // eax@7
  unsigned int v15; // eax@7
  int v16; // ST14_4@10
  int v17; // ST10_4@10
  NiUnsharedGeometryGroup *v18; // eax@10
  NiUnsharedGeometryGroup *v19; // eax@8
  char szdata[128]; // [sp+8h] [bp-9Ch]@4
  char acname[21]; // [sp+88h] [bp-1Ch]@1

  v2 = this;
  ToolTipWin::ClearTipText((ToolTipWin *)g_pkToolTipWin);
  v3 = pdata->charid.n5_code[1];
  v4 = pdata->charid.n5_code[2];
  *(_DWORD *)acname = pdata->charid.n5_code[0];
  v5 = pdata->charid.n5_code[3];
  *(_DWORD *)&acname[4] = v3;
  v6 = pdata->charid.n5_code[4];
  *(_DWORD *)&acname[12] = v5;
  *(_DWORD *)&acname[16] = v6;
  *(_DWORD *)&acname[8] = v4;
  acname[20] = 0;
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))g_pkToolTipWin->vfptr[137].__vecDelDtor)(
    0,
    acname,
    1,
    255,
    255,
    0);
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))g_pkToolTipWin->vfptr[137].__vecDelDtor)(
    1,
    &unk_9AD687,
    255,
    255,
    255,
    0);
  v7 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), pdata->classid);
  if ( v7 )
    v8 = (NiUnsharedGeometryGroup *)(v7 + 21);
  else
    v8 = &unk_96F8EB;
  v9 = v8;
  v10 = TextData::Get(0x95A9DAED);
  sprintf(szdata, (const char *)v10, v9);
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))g_pkToolTipWin->vfptr[137].__vecDelDtor)(
    2,
    szdata,
    255,
    255,
    255,
    0);
  sprintf(szdata, "LV : %d", pdata->level);
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))g_pkToolTipWin->vfptr[137].__vecDelDtor)(
    3,
    szdata,
    255,
    255,
    255,
    0);
  if ( pdata->isparty )
  {
    v11 = TextData::Get(0xEFE6FA48);
    sprintf(szdata, (const char *)v11);
  }
  else
  {
    v12 = TextData::Get(0xA0989BF4);
    sprintf(szdata, (const char *)v12);
  }
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))g_pkToolTipWin->vfptr[137].__vecDelDtor)(
    4,
    szdata,
    255,
    255,
    255,
    0);
  v13 = MapInfoTab::GetByMapName(&pdata->map)->Name;
  v14 = TextData::Get(0xDE353F4D);
  sprintf(szdata, (const char *)v14, v13);
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))g_pkToolTipWin->vfptr[137].__vecDelDtor)(
    5,
    szdata,
    255,
    255,
    255,
    0);
  v15 = (unsigned int)pdata->logininfo;
  if ( *(_DWORD *)&pdata->logininfo & 1 )
  {
    v19 = TextData::Get(0x8F909FD1);
LABEL_12:
    sprintf(szdata, (const char *)v19);
    goto LABEL_13;
  }
  if ( !(v15 & 0xFFE) )
  {
    v19 = TextData::Get(0x94E2F5DB);
    goto LABEL_12;
  }
  v16 = (v15 >> 16) & 0x1F;
  v17 = (unsigned __int16)v15 >> 12;
  v18 = TextData2::Get(0xF1ECBD28);
  sprintf(szdata, (const char *)v18, v17, v16);
LABEL_13:
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))g_pkToolTipWin->vfptr[137].__vecDelDtor)(
    6,
    szdata,
    255,
    255,
    255,
    0);
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))g_pkToolTipWin->vfptr[137].__vecDelDtor)(
    7,
    pdata->statustitle,
    255,
    255,
    255,
    0);
  ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[139].__vecDelDtor)(v2);
  ((void (__stdcall *)(_DWORD, _DWORD))g_pkToolTipWin->vfptr[77].__vecDelDtor)(PgWin::ms_iMsX, PgWin::ms_iMsY);
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (005C8190) --------------------------------------------------------
void __thiscall GuildWin::InvalidateGuildHistoryList(GuildWin *this)
{
  GuildWin *v1; // edi@1
  SlideListWin *v2; // ecx@1
  CClientGuild *v3; // eax@2
  NiTListItem<GUILD_HISTORY *> *v4; // ecx@3
  unsigned int v5; // eax@3
  unsigned int v6; // esi@6
  NiTListItem<GUILD_HISTORY *> *v7; // ecx@6
  const char *v8; // eax@7
  unsigned int v9; // ebx@7
  char *pkHistoryText; // [sp+4h] [bp-28h]@6
  NiTListItem<GUILD_HISTORY *> *kIter; // [sp+8h] [bp-24h]@6
  unsigned int v12; // [sp+Ch] [bp-20h]@4
  char acName[21]; // [sp+10h] [bp-1Ch]@6

  v1 = this;
  v2 = this->m_pListWinHistory;
  if ( v2 )
  {
    SlideListWin::RemoveAllList(v2);
    v3 = GuildTask::GetGuild();
    if ( v3 )
    {
      v4 = v3->m_kHistoryList.m_pkHead;
      v5 = v3->m_kHistoryList.m_kAllocator.m_uiCount;
      if ( v5 )
      {
        v12 = v5;
        while ( 1 )
        {
          v6 = (unsigned int)&v4->m_element->nHistoryNumber;
          v7 = v4->m_pkNext;
          *(_DWORD *)acName = *(_DWORD *)(v6 + 8);
          *(_DWORD *)&acName[4] = *(_DWORD *)(v6 + 12);
          kIter = v7;
          *(_DWORD *)&acName[8] = *(_DWORD *)(v6 + 16);
          *(_DWORD *)&acName[12] = *(_DWORD *)(v6 + 20);
          *(_DWORD *)&acName[16] = *(_DWORD *)(v6 + 24);
          acName[20] = 0;
          pkHistoryText = (char *)GuildWin::GetHistoryText(*(GUILD_HISTORY_MSG_TYPE *)(v6 + 28));
          if ( pkHistoryText )
          {
            v8 = fs("%d-%d-%d", *(_WORD *)(v6 + 4), *(_BYTE *)(v6 + 6), *(_BYTE *)(v6 + 7));
            v9 = SlideListWin::AddText(v1->m_pListWinHistory, v8);
            SlideListWin::SetText(v1->m_pListWinHistory, v9, 1u, acName);
            SlideListWin::SetText(v1->m_pListWinHistory, v9, 2u, pkHistoryText);
            SlideListWin::SetData(v1->m_pListWinHistory, v9, v6);
            SlideListWin::SetFontSize(v1->m_pListWinHistory, v9, 1);
          }
          if ( !--v12 )
            break;
          v4 = kIter;
        }
      }
      SlideListWin::AlignText(v1->m_pListWinHistory, 4u);
      SlideListWin::AlignText(v1->m_pListWinHistory, 0, 5u);
      SlideListWin::AlignText(v1->m_pListWinHistory, 1u, 4u);
      SlideListWin::AlignText(v1->m_pListWinHistory, 2u, 4u);
      SlideListWin::UpdateViewList(v1->m_pListWinHistory);
    }
  }
}

//----- (005C82F0) --------------------------------------------------------
void __thiscall GuildWin::ShowEmblem(GuildWin *this, bool bShow)
{
  GuildWin *v2; // esi@1
  GuildEmblemIcon *v3; // ecx@4
  CClientGuild *v4; // eax@7
  int v5; // [sp+0h] [bp-4h]@0

  v2 = this;
  if ( this->m_pkEmblemCheckBox )
  {
    if ( bShow )
    {
      if ( !this->m_kTabIndex )
      {
        ((void (__stdcall *)(_DWORD))this->m_pkEmblemCheckBox->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkEmblemCheckBox->vfptr[60].__vecDelDtor)(0);
        v3 = v2->m_pkEmblemIcon;
        if ( v3 )
          GuildEmblemIcon::SetEmblemIcon(v3, &v2->m_GuildEmblemInfo.nPTFileNo, &v2->m_GuildEmblemInfo.nPTIconNo, 1);
        GuildWin::SetEmblemState(v2, &v2->m_EmblemState);
      }
    }
    else
    {
      v4 = GuildTask::GetGuild();
      if ( v4 )
      {
        if ( v2->m_kTabIndex || !(unsigned __int8)CClientGuild::AmIGuildMember(v4) )
        {
          ((void (__stdcall *)(_DWORD, int))v2->m_pkEmblemCheckBox->vfptr[64].__vecDelDtor)(0, v5);
          ((void (__cdecl *)(_DWORD))v2->m_pkEmblemCheckBox->vfptr[60].__vecDelDtor)(0);
        }
        else
        {
          ((void (__stdcall *)(_DWORD, int))v2->m_pkEmblemCheckBox->vfptr[64].__vecDelDtor)(v2->m_bGuildEmblem == 0, v5);
          ((void (__cdecl *)(_DWORD))v2->m_pkEmblemCheckBox->vfptr[60].__vecDelDtor)(v2->m_bGuildEmblem == 0);
        }
        if ( v2->m_pkEmblemIcon )
        {
          ((void (__stdcall *)(_DWORD))v2->m_pkEmblemIcon->vfptr[64].__vecDelDtor)(0);
          ((void (__stdcall *)(_DWORD))v2->m_pkEmblemIcon->vfptr[60].__vecDelDtor)(0);
        }
      }
    }
  }
}

//----- (005C8420) --------------------------------------------------------
void __thiscall GuildWin::SetEmblem(GuildWin *this, GUILD_EMBLEM_INFO *pEmblemInfo, char eEmblemState)
{
  char v3; // bl@1
  GuildWin *v4; // esi@1
  const char *v5; // eax@1
  GuildEmblemIcon *v6; // ecx@1
  Name5 *v7; // eax@3
  _BYTE v8[20]; // ST00_20@3
  Char *v9; // eax@3
  unsigned int v10; // eax@5

  v3 = eEmblemState;
  v4 = this;
  v5 = &this->m_GuildEmblemInfo.nPTFileNo;
  this->m_GuildEmblemInfo = *pEmblemInfo;
  v6 = this->m_pkEmblemIcon;
  v4->m_EmblemState = v3;
  if ( v6 && GuildEmblemIcon::SetEmblemIcon(v6, v5, &v4->m_GuildEmblemInfo.nPTIconNo, 1) )
  {
    v4->m_bGuildEmblem = 1;
    v7 = User::GetMainCharID(&g_kUser);
    *(_DWORD *)v8 = v7->n5_code[0];
    *(_QWORD *)&v8[4] = *(_QWORD *)&v7->n5_code[1];
    *(_QWORD *)&v8[12] = *(_QWORD *)&v7->n5_code[3];
    v9 = CharMgr::GetChar(&g_kCharMgr, *(Name5 *)v8);
    if ( v9 )
    {
      if ( v3 == 1 )
      {
        v10 = v9->m_dwGuildRegNum;
        *(_WORD *)&eEmblemState = -1;
        GuildTask::SetGuildEmblem(v10, (GUILD_EMBLEM_INFO *)&eEmblemState);
      }
      else
      {
        GuildTask::SetGuildEmblem(v9->m_dwGuildRegNum, pEmblemInfo);
      }
      if ( v4->m_kTabIndex )
        GuildWin::ShowEmblem(v4, 0);
      else
        GuildWin::ShowEmblem(v4, v4->m_bGuildEmblem);
    }
  }
  else
  {
    v4->m_bGuildEmblem = 0;
  }
}

//----- (005C8510) --------------------------------------------------------
void __thiscall GuildWin::ClearEmblem(GuildWin *this)
{
  this->m_bGuildEmblem = 0;
  GuildWin::ShowEmblem(this, 0);
}

//----- (005C8520) --------------------------------------------------------
void __thiscall GuildWin::UpdateViewList(GuildWin *this)
{
  GuildWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  CClientGuildMember *v3; // ebx@3
  signed int v4; // edi@3
  GUILD_MEMBER_CLIENT *pkData; // [sp+4h] [bp-4h]@4

  v1 = this;
  v2 = this->m_pListWinGuild;
  if ( v2 )
  {
    SlideListWin::RemoveAllList(v2);
    if ( (unsigned __int8)((int (*)(void))v1->m_pListWinGuild->vfptr[65].__vecDelDtor)() )
    {
      v3 = GuildMemberTask::GetGuildMember();
      v4 = 0;
      if ( v3->m_NumOfMembers > 0u )
      {
        pkData = v3->m_Members;
        do
        {
          if ( v1->m_bDefaultView )
            GuildWin::AddListItem_DefInfo(v1, pkData);
          ++pkData;
          ++v4;
        }
        while ( v4 < v3->m_NumOfMembers );
      }
      SlideListWin::Sort(v1->m_pListWinGuild, v1->m_nSortColumn, 0, 0);
      SlideListWin::AlignText(v1->m_pListWinGuild, 4u);
      SlideListWin::AlignText(v1->m_pListWinGuild, 0, 5u);
      SlideListWin::AlignText(v1->m_pListWinGuild, 1u, 5u);
      SlideListWin::AlignText(v1->m_pListWinGuild, 2u, 5u);
      SlideListWin::AlignText(v1->m_pListWinGuild, 3u, 5u);
      SlideListWin::AlignText(v1->m_pListWinGuild, 4u, 5u);
      SlideListWin::UpdateViewList(v1->m_pListWinGuild);
      SlideBar::SetSplitCnt(v1->m_pkSlideBarGuildList, v1->m_pListWinGuild->m_nSlideSplitCnt);
    }
  }
}

//----- (005C8630) --------------------------------------------------------
void __thiscall GuildWin::ChangeUserName(GuildWin *this, Name5 *OldName, Name5 *NewName)
{
  CClientGuildMember *v3; // eax@1
  int v4; // edi@1
  int v5; // edx@1
  int v6; // ecx@2
  int v7; // eax@10
  GuildWin *v8; // [sp+4h] [bp-4h]@1

  v8 = this;
  v3 = GuildMemberTask::GetGuildMember();
  v4 = v3->m_NumOfMembers;
  v5 = 0;
  if ( v4 > 0 )
  {
    v6 = (int)&v3->m_Members[0].sName.n5_code[2];
    while ( *(_DWORD *)(v6 - 8) != OldName->n5_code[0]
         || *(_DWORD *)(v6 - 4) != OldName->n5_code[1]
         || *(_DWORD *)v6 != OldName->n5_code[2]
         || *(_DWORD *)(v6 + 4) != OldName->n5_code[3]
         || *(_DWORD *)(v6 + 8) != OldName->n5_code[4] )
    {
      ++v5;
      v6 += 110;
      if ( v5 >= v4 )
        return;
    }
    v7 = (int)&v3->m_Members[v5];
    *(_QWORD *)v7 = *(_QWORD *)&NewName->n5_code[0];
    *(_QWORD *)(v7 + 8) = *(_QWORD *)&NewName->n5_code[2];
    *(_DWORD *)(v7 + 16) = NewName->n5_code[4];
    GuildWin::UpdateViewList(v8);
  }
}

//----- (005C86C0) --------------------------------------------------------
void GuildWin::OnAddGuildMember()
{
  CClientGuild *v1; // eax@1
  char *v2; // eax@2
  CClientGuild *v3; // eax@3
  char *v4; // eax@4

  v1 = GuildTask::GetGuild();
  if ( (unsigned __int8)CClientGuild::AmIGuildMember(v1) )
  {
    v3 = GuildTask::GetGuild();
    if ( CClientGuild::CanIInvite(v3) )
    {
      ISingletonTask<GuildJoinReqTask>::Run();
    }
    else
    {
      v4 = (char *)TextData::Get(0x80D5CBDB);
      MsgBox::Modal(MSGBOX_OK, v4);
    }
  }
  else
  {
    v2 = (char *)TextData::Get(0x76816B99u);
    MsgBox::Modal(MSGBOX_OK, v2);
  }
}

//----- (005C8720) --------------------------------------------------------
bool __thiscall GuildMemberVanishTask::OnProcessNetMsg(GuildMemberVanishTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  GuildMemberVanishTask *v5; // ebx@1
  int v6; // edx@3
  int v7; // ecx@3
  int v8; // edx@3
  int v9; // ecx@3
  int v10; // eax@3
  char *v11; // eax@6
  char *v12; // eax@7
  char *v13; // eax@8
  CClientGuild *v14; // eax@9
  CClientGuildAcademy *v15; // eax@9
  char *v16; // eax@9
  char *v17; // edi@9
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v19; // [sp-1Ch] [bp-48h]@7
  char *v20; // [sp-4h] [bp-30h]@7
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v21; // [sp+Ch] [bp-20h]@7
  char acCharName[21]; // [sp+10h] [bp-1Ch]@3

  v5 = this;
  if ( iDepart == 29 && iCommand == 15 )
  {
    v6 = *((_DWORD *)pvData + 1);
    *(_DWORD *)acCharName = *(_DWORD *)pvData;
    v7 = *((_DWORD *)pvData + 2);
    *(_DWORD *)&acCharName[4] = v6;
    v8 = *((_DWORD *)pvData + 3);
    *(_DWORD *)&acCharName[8] = v7;
    v9 = *((_DWORD *)pvData + 4);
    v10 = *((_WORD *)pvData + 10);
    *(_DWORD *)&acCharName[12] = v8;
    *(_DWORD *)&acCharName[16] = v9;
    acCharName[20] = 0;
    if ( (_WORD)v10 == 3137 )
    {
      v14 = GuildTask::GetGuild();
      CClientGuild::ClearHistoryList(v14);
      v15 = GuildAcademyTask::GetGuildAcademy();
      CClientGuildAcademy::ClearHistoryList(v15);
      GuildTask::InvalidateGuildWindow();
      GuildAcademyTask::InvalidateGuildAcademyWin();
      v20 = acCharName;
      v16 = (char *)TextData::Get(0xC4D5ADF3);
      v17 = fs(v16, acCharName);
      if ( v5->m_pkMsgHooker )
      {
        ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v5->m_pkMsgHooker->vfptr->SendDirectMessage)(
          25,
          v17,
          &v5->vfptr);
        if ( v5->m_pkMsgHooker )
          ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v5->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            25,
            v17,
            &v5->vfptr);
      }
      v5->vfptr->DirectDispatchToParent((IDirectMessenger *)&v5->vfptr, 25, v17, (IDirectMessenger *)&v5->vfptr);
    }
    else if ( v10 == 3321 )
    {
      v13 = (char *)TextData2::Get(0x55E8A6E0u);
      MsgBox::Modeless(MSGBOX_OK, v13);
    }
    else if ( v10 == 12695 )
    {
      v21 = &v19;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &v19,
        "Guild_CannotLeaveTime");
      v20 = (char *)(unsigned __int16)CSingleDataMap::GetValue(&g_kSingleDataMap, v19);
      v12 = (char *)TextData3::Get(0x37804387u);
      MsgBox::Modeless(MSGBOX_OK, v12, v20);
    }
    else
    {
      v11 = (char *)TextData::Get(0x736A5B7Eu);
      MsgBox::Modeless(MSGBOX_OK, v11);
    }
    v5->m_eTaskState = 2;
  }
  return 0;
}

//----- (005C8890) --------------------------------------------------------
void __thiscall GuildWin::InvalidateGuildList(GuildWin *this)
{
  GuildWin *v1; // esi@1
  CClientGuild *v2; // eax@2
  bool v3; // al@2
  void *(__thiscall *v4)(NiRefObject *, unsigned int); // edx@2
  CClientGuild *v5; // eax@5
  CClientGuild *v6; // ebx@6
  CClientGuildMember *v7; // eax@7
  GUILD_MEMBER_CLIENT *v8; // eax@7
  tm *v9; // eax@9
  ATL::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char> > > *v10; // eax@9
  NiRefObjectVtbl *v11; // edi@9
  char *v12; // ST28_4@9
  char *v13; // eax@9
  char *v14; // eax@9
  char v15; // al@10
  char v16; // al@16
  NiUnsharedGeometryGroup *v17; // eax@12
  NiRefObjectVtbl *v18; // edi@23
  NiUnsharedGeometryGroup *v19; // ST28_4@23
  NiUnsharedGeometryGroup *v20; // eax@23
  char *v21; // eax@23
  NiRefObjectVtbl *v22; // edi@24
  int v23; // ST28_4@24
  char *v24; // eax@24
  char *v25; // eax@24
  NiRefObjectVtbl *v26; // edi@24
  unsigned int v27; // ST28_4@24
  char *v28; // eax@24
  char *v29; // eax@24
  int v30; // ebx@24
  NiRefObjectVtbl *v31; // edi@24
  unsigned int v32; // ST28_4@24
  int v33; // ST24_4@24
  char *v34; // eax@24
  char *v35; // eax@24
  signed __int64 v36; // kr08_8@24
  NiRefObjectVtbl *v37; // edi@24
  char *v38; // eax@24
  char *v39; // eax@24
  NiRefObjectVtbl *v40; // edi@24
  int v41; // ST28_4@24
  int v42; // ST24_4@24
  char *v43; // eax@24
  char *v44; // eax@24
  int v45; // edi@25
  signed int v46; // ebx@25
  CClientGuild *v47; // edi@27
  unsigned int v48; // eax@29
  unsigned int v49; // ecx@29
  unsigned int v50; // eax@29
  unsigned int v51; // ecx@29
  NiUnsharedGeometryGroup *v52; // eax@29
  NiUnsharedGeometryGroup *v53; // eax@29
  NiUnsharedGeometryGroup *v54; // eax@29
  const char *v55; // eax@29
  NiUnsharedGeometryGroup *v56; // eax@29
  const char *v57; // eax@29
  NiUnsharedGeometryGroup *v58; // eax@29
  const char *v59; // eax@29
  SlideListWin *v60; // eax@29
  ColumnBut *v61; // eax@31
  PgWinText *v62; // eax@32
  char *v63; // edi@36
  int v64; // eax@38
  unsigned int v65; // edi@38
  unsigned int v66; // eax@38
  unsigned int v67; // ebx@42
  const void *v68; // eax@44
  SlideListWin *v69; // ecx@46
  const char *v70; // eax@49
  CClientGuild *v71; // eax@54
  ColumnBut *v72; // eax@57
  char *v73; // eax@59
  PgWin *v74; // ecx@59
  GuildEmblemIcon *v75; // eax@60
  HDC__ *hDC; // [sp+10h] [bp-494h]@6
  HDC__ *hDCa; // [sp+10h] [bp-494h]@35
  __int64 found; // [sp+14h] [bp-490h]@9
  PgWinText *pkTestWin; // [sp+1Ch] [bp-488h]@9
  char _Ptr; // [sp+20h] [bp-484h]@35
  int lengthSize; // [sp+24h] [bp-480h]@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strNotice; // [sp+28h] [bp-47Ch]@35
  char pcTemp[512]; // [sp+44h] [bp-460h]@29
  char acStr[256]; // [sp+244h] [bp-260h]@35
  char buffer[256]; // [sp+344h] [bp-160h]@42
  char acDateTime[32]; // [sp+444h] [bp-60h]@29
  char acGuildMaster[21]; // [sp+464h] [bp-40h]@9
  char acAuthor[21]; // [sp+47Ch] [bp-28h]@29
  int v89; // [sp+4A0h] [bp-4h]@9

  v1 = this;
  GuildWin::UpdateViewList(this);
  if ( v1->m_kTabIndex )
    goto LABEL_65;
  v2 = GuildTask::GetGuild();
  v3 = CClientGuild::CanIWriteNotice(v2);
  v4 = v1->m_pkEditNoticeBtn->vfptr[64].__vecDelDtor;
  if ( v3 )
    ((void (__stdcall *)(signed int))v4)(1);
  else
    ((void (__stdcall *)(_DWORD))v4)(0);
  lengthSize = (int)GuildMemberTask::GetGuildMember();
  v5 = GuildTask::GetGuild();
  if ( (unsigned __int8)CClientGuild::AmIGuildMember(v5) )
  {
    v6 = GuildTask::GetGuild();
    hDC = (HDC__ *)v6;
    if ( v6 )
    {
      v7 = GuildMemberTask::GetGuildMember();
      v8 = CClientGuildMember::GetGuildMaster(v7);
      if ( v8 && v6->m_Guild.dCreateDate )
      {
        Name5::n_string(&v8->sName, acGuildMaster);
        acGuildMaster[20] = 0;
        v9 = _localtime32(&v6->m_Guild.dCreateDate);
        ATL::CTime::CTime((ATL::CTime *)&found, v9->tm_year + 1900, v9->tm_mon + 1, v9->tm_mday, 0, 0, 0, -1);
        v10 = ATL::CTime::Format(
                (ATL::CTime *)&found,
                (ATL::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char> > > *)&pkTestWin,
                "%Y-%m-%d");
        v11 = v1->m_pkGuildInfoTxt[0]->vfptr;
        v12 = v10->m_pszData;
        v89 = 0;
        v13 = (char *)TextData3::Get(0x171B0262u);
        v14 = fs(v13, acGuildMaster, v12);
        v11[118].__vecDelDtor((NiRefObject *)v1->m_pkGuildInfoTxt[0], (unsigned int)v14);
        v89 = -1;
        ATL::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char>>>::~CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char>>>((ATL::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char> > > *)&pkTestWin);
        ((void (__stdcall *)(signed int))v1->m_pkGuildInfoTxt[0]->vfptr[64].__vecDelDtor)(1);
      }
      v15 = v6->m_Guild.nType;
      if ( v15 || v6->m_Guild.nGrade != 1 )
      {
        if ( v15 != 1 || v6->m_Guild.nGrade != 1 )
        {
          v16 = v6->m_Guild.nGrade;
          if ( v16 == 2 )
          {
            v17 = TextData::Get(0x5EA56BE6u);
          }
          else if ( v16 == 3 )
          {
            v17 = TextData::Get(0x54B070D9u);
          }
          else
          {
            if ( v16 != 4 )
            {
LABEL_24:
              v22 = v1->m_pkGuildInfoTxt[2]->vfptr;
              v23 = v6->m_Guild.nMaxMembers;
              v24 = (char *)TextData3::Get(0xC0D2B71E);
              v25 = fs(v24, v23);
              v22[118].__vecDelDtor((NiRefObject *)v1->m_pkGuildInfoTxt[2], (unsigned int)v25);
              ((void (__stdcall *)(signed int))v1->m_pkGuildInfoTxt[2]->vfptr[64].__vecDelDtor)(1);
              v26 = v1->m_pkGuildInfoTxt[3]->vfptr;
              v27 = v6->m_Guild.nFame;
              v28 = (char *)TextData3::Get(0xDADCD821);
              v29 = fs(v28, v27);
              v26[118].__vecDelDtor((NiRefObject *)v1->m_pkGuildInfoTxt[3], (unsigned int)v29);
              ((void (__stdcall *)(signed int))v1->m_pkGuildInfoTxt[3]->vfptr[64].__vecDelDtor)(1);
              v30 = lengthSize;
              v31 = v1->m_pkGuildInfoTxt[4]->vfptr;
              v32 = CClientGuildMember::GetNumOfOnlineMembers((CClientGuildMember *)lengthSize);
              v33 = *(_WORD *)(v30 + 4);
              v34 = (char *)TextData::Get(0xCCA32130);
              v35 = fs(v34, v33, v32);
              v31[118].__vecDelDtor((NiRefObject *)v1->m_pkGuildInfoTxt[4], (unsigned int)v35);
              ((void (__stdcall *)(signed int))v1->m_pkGuildInfoTxt[4]->vfptr[64].__vecDelDtor)(1);
              v36 = GuildAcademyTask::GetGuildAcademy()->m_GuildAcademy.dAcademyBuffUntilTime;
              pkTestWin = (PgWinText *)(signed int)((double)v36 / 3600.0);
              found = v36 % 3600;
              v37 = v1->m_pkGuildInfoTxt[5]->vfptr;
              v38 = (char *)TextData2::Get(0xEFCFDD01);
              v39 = fs(v38, (signed int)((double)v36 / 3600.0), (signed int)((double)(v36 % 3600) / 60.0));
              v37[118].__vecDelDtor((NiRefObject *)v1->m_pkGuildInfoTxt[5], (unsigned int)v39);
              ((void (__stdcall *)(signed int))v1->m_pkGuildInfoTxt[5]->vfptr[64].__vecDelDtor)(1);
              v40 = v1->m_pkGuildInfoTxt[6]->vfptr;
              v41 = *((_DWORD *)hDC + 685);
              v42 = *((_DWORD *)hDC + 684);
              v43 = (char *)TextData2::Get(0x809BDFE9);
              v44 = fs(v43, v42, v41);
              v40[118].__vecDelDtor((NiRefObject *)v1->m_pkGuildInfoTxt[6], (unsigned int)v44);
              ((void (__stdcall *)(signed int))v1->m_pkGuildInfoTxt[6]->vfptr[64].__vecDelDtor)(1);
              goto LABEL_27;
            }
            v17 = TextData::Get(0x6FAB679Au);
          }
        }
        else
        {
          v17 = TextData::Get(0x235C708Du);
        }
      }
      else
      {
        v17 = TextData::Get(0xA9E9BA32);
      }
      if ( v17 )
      {
        v18 = v1->m_pkGuildInfoTxt[1]->vfptr;
        v19 = v17;
        v20 = TextData::Get(0xDDC9DF24);
        v21 = fs("%s : %s", v20, v19);
        v18[118].__vecDelDtor((NiRefObject *)v1->m_pkGuildInfoTxt[1], (unsigned int)v21);
        ((void (__stdcall *)(signed int))v1->m_pkGuildInfoTxt[1]->vfptr[64].__vecDelDtor)(1);
      }
      goto LABEL_24;
    }
  }
  else
  {
    v45 = (int)v1->m_pkGuildInfoTxt;
    v46 = 7;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v45 + 256))(0);
      v45 += 4;
      --v46;
    }
    while ( v46 );
  }
LABEL_27:
  SlideListWin::RemoveAllList(v1->m_pListWinNotice);
  v47 = GuildTask::GetGuild();
  if ( (unsigned __int8)CClientGuild::AmIGuildMember(v47) && v47->m_Guild.sNotify[0] )
  {
    v48 = v47->m_Guild.sNotifyCharID.n5_code[0];
    v49 = v47->m_Guild.sNotifyCharID.n5_code[1];
    *(_DWORD *)&acAuthor[8] = v47->m_Guild.sNotifyCharID.n5_code[2];
    *(_DWORD *)acAuthor = v48;
    v50 = v47->m_Guild.sNotifyCharID.n5_code[3];
    *(_DWORD *)&acAuthor[4] = v49;
    v51 = v47->m_Guild.sNotifyCharID.n5_code[4];
    *(_DWORD *)&acAuthor[12] = v50;
    *(_DWORD *)&acAuthor[16] = v51;
    acAuthor[20] = 0;
    pcTemp[0] = 0;
    memset(&pcTemp[1], 0, 0x1FFu);
    v52 = TextData2::Get(0x1A2B4123u);
    sprintf(pcTemp, "%s", v52);
    strftime(acDateTime, 0x1Fu, pcTemp, &v47->m_Guild.tm_dNotifyDate);
    SlideListWin::AddText(v1->m_pListWinNotice, &byte_9AD68E);
    v53 = TextData::Get(0xDF3F2351);
    SlideListWin::AddText(v1->m_pListWinNotice, (const char *)v53);
    SlideListWin::AddText(v1->m_pListWinNotice, &byte_9AD68F);
    v54 = TextData::Get(0x8693CAE1);
    v55 = fs("%s : %s", v54, acAuthor);
    SlideListWin::AddText(v1->m_pListWinNotice, v55);
    v56 = TextData::Get(0x83936495);
    v57 = fs("%s : %s", v56, acDateTime);
    SlideListWin::AddText(v1->m_pListWinNotice, v57);
    SlideListWin::AddText(v1->m_pListWinNotice, &byte_9AD696);
    v58 = TextData::Get(0xE5E1C0D9);
    v59 = fs("%s :", v58);
    SlideListWin::AddText(v1->m_pListWinNotice, v59);
    SlideListWin::AddText(v1->m_pListWinNotice, &byte_9AD697);
    strcpy(pcTemp, v47->m_Guild.sNotify);
    v60 = v1->m_pListWinNotice;
    if ( v60->m_vecButList._Mylast - v60->m_vecButList._Myfirst )
    {
      v61 = *v60->m_vecButList._Myfirst;
      if ( v61->m_vecTextWin._Mylast - v61->m_vecTextWin._Myfirst )
        v62 = *v61->m_vecTextWin._Myfirst;
      else
        v62 = 0;
      pkTestWin = v62;
    }
    else
    {
      pkTestWin = 0;
    }
    hDCa = pkTestWin->m_spTextGeom.m_pObject->m_spPgFont.m_pObject->m_kFontRenderStuff.hDC;
    acStr[0] = 0;
    memset(&acStr[1], 0, 0xFFu);
    strNotice._Myres = 15;
    strNotice._Mysize = 0;
    strNotice._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strNotice, pcTemp, strlen(pcTemp));
    v89 = 1;
    _Ptr = 10;
    while ( 1 )
    {
      memset(acStr, 0, 0x100u);
      v63 = strNotice._Bx._Ptr;
      if ( strNotice._Myres < 0x10 )
        v63 = (char *)&strNotice;
      v64 = ((int (*)(void))pkTestWin->vfptr[36].__vecDelDtor)();
      v65 = PgUtil::StringPixelCopy(acStr, v63, hDCa, v64 - 10);
      v66 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::find(&strNotice, &_Ptr, 0, 1u);
      HIDWORD(found) = v66;
      if ( !v65 )
        break;
      if ( v66 > v65 || (lengthSize = v66, v66 == -1) )
        lengthSize = v65;
      buffer[0] = 0;
      memset(&buffer[1], 0, 0xFFu);
      v67 = lengthSize;
      if ( strNotice._Mysize < lengthSize )
        v67 = strNotice._Mysize;
      v68 = strNotice._Bx._Ptr;
      if ( strNotice._Myres < 0x10 )
        v68 = &strNotice;
      memcpy_s(buffer, 0x100u, v68, v67);
      v69 = v1->m_pListWinNotice;
      buffer[v67] = 0;
      SlideListWin::AddText(v69, buffer);
      if ( HIDWORD(found) > v65 )
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::erase(&strNotice, 0, lengthSize);
      else
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::erase(&strNotice, 0, lengthSize + 1);
    }
    v70 = strNotice._Bx._Ptr;
    if ( strNotice._Myres < 0x10 )
      v70 = (const char *)&strNotice;
    SlideListWin::AddText(v1->m_pListWinNotice, v70);
    SlideListWin::AlignText(v1->m_pListWinNotice, 4u);
    SlideListWin::UpdateViewList(v1->m_pListWinNotice);
    SlideBar::SetSplitCnt(v1->m_pkSlideBarGuildNotice, v1->m_pListWinGuild->m_nSlideSplitCnt);
    v89 = -1;
    if ( strNotice._Myres >= 0x10 )
      operator delete(strNotice._Bx._Ptr);
    strNotice._Myres = 15;
    strNotice._Mysize = 0;
    strNotice._Bx._Buf[0] = 0;
  }
  v71 = GuildTask::GetGuild();
  if ( CClientGuild::AmIGuildMaster(v71) )
  {
    GuildWin::SetEmblemState(v1, &v1->m_EmblemState);
  }
  else
  {
    if ( v1->m_bGuildEmblem )
    {
      v75 = v1->m_pkEmblemIcon;
      if ( !v75 )
        return;
      if ( !v75->m_pkToolTipWin )
        v75->m_pkToolTipWin = g_pkToolTipWin;
      v73 = (char *)TextData3::Get(0x6E9EAD92u);
      v74 = (PgWin *)&v1->m_pkEmblemIcon->vfptr;
    }
    else
    {
      v72 = v1->m_pkEmblemCheckBox;
      if ( !v72->m_pkToolTipWin )
        v72->m_pkToolTipWin = g_pkToolTipWin;
      v73 = (char *)TextData3::Get(0x6E9EAD92u);
      v74 = (PgWin *)&v1->m_pkEmblemCheckBox->vfptr;
    }
    PgWin::SetToolTipWinText(v74, v73);
  }
LABEL_65:
  GuildWin::InvalidateGuildHistoryList(v1);
}

//----- (005C91A0) --------------------------------------------------------
void __thiscall GuildWin::DeleteUser(GuildWin *this, Name5 *kName)
{
  GuildWin *v2; // edi@1
  CClientGuildMember *v3; // eax@1
  unsigned int v4; // edx@1
  _BYTE v5[20]; // ST00_20@3
  CClientGuildAcademy *v6; // eax@3
  char *v7; // ST08_4@4
  PROTO_NC_GUILD_MEMBER_LEAVE_CMD pkProto; // [sp+8h] [bp-18h]@1

  v2 = this;
  v3 = GuildMemberTask::GetGuildMember();
  v4 = kName->n5_code[1];
  pkProto.CharID.n5_code[0] = kName->n5_code[0];
  *(_QWORD *)&pkProto.CharID.n5_code[1] = __PAIR__(kName->n5_code[2], v4);
  *(_QWORD *)&pkProto.CharID.n5_code[3] = *(_QWORD *)&kName->n5_code[3];
  if ( !v3 || v3->vfptr->Recv_NC_GUILD_MEMBER_LEAVE_CMD((CGuildMember *)v3, &pkProto) )
  {
    *(_QWORD *)v5 = *(_QWORD *)&pkProto.CharID.n5_name[0];
    *(_QWORD *)&v5[8] = *(_QWORD *)&pkProto.CharID.n5_code[2];
    *(_DWORD *)&v5[16] = pkProto.CharID.n5_code[4];
    v6 = GuildAcademyTask::GetGuildAcademy();
    if ( (unsigned __int8)CClientGuildAcademy::IsGuildAcademyMaster(v6, *(Name5 *)v5) )
    {
      v7 = GuildAcademyTask::GetGuildAcademy()->m_GuildAcademy.sAcademyMasterName.n5_name;
      *((_DWORD *)v7 + 4) = 0;
      *((_DWORD *)v7 + 3) = 0;
      *((_DWORD *)v7 + 2) = 0;
      *((_DWORD *)v7 + 1) = 0;
      *(_DWORD *)v7 = 0;
      strncpy(v7, byte_9AD6C5, 0x14u);
    }
    GuildWin::InvalidateGuildList(v2);
  }
}

//----- (005C9270) --------------------------------------------------------
void __thiscall GuildWin::~GuildWin(GuildWin *this)
{
  GuildWin *v1; // esi@1
  PopupMenuText *v2; // edi@1
  PopupMenuText *v3; // edi@5
  PopupMenuText *v4; // edi@9
  PopupMenuText *v5; // edi@13
  PopupMenuText *v6; // edi@17
  PopupMenuText *v7; // edi@21
  PopupMenuText *v8; // edi@25
  PopupMenuText *v9; // edi@29
  PopupMenuText *v10; // edi@33
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v11; // ST08_4@37
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v12; // ST04_4@37
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > result; // [sp+10h] [bp-18h]@37
  std::map<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> > > *v14; // [sp+14h] [bp-14h]@37
  GuildWin *v15; // [sp+18h] [bp-10h]@1
  int v16; // [sp+24h] [bp-4h]@1

  v1 = this;
  v15 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spPopupInitializeAcademyMaster.m_pObject;
  v16 = 9;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_spPopupAppointAcademyMaster.m_pObject;
  LOBYTE(v16) = 8;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v4 = v1->m_spPopupWhisperChat.m_pObject;
  LOBYTE(v16) = 7;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v5 = v1->m_spPopupVanish.m_pObject;
  LOBYTE(v16) = 6;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  v6 = v1->m_spPopupFireAppointment.m_pObject;
  LOBYTE(v16) = 5;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  v7 = v1->m_spPopupAppointKnight.m_pObject;
  LOBYTE(v16) = 4;
  if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  v8 = v1->m_spPopupAppointSenior.m_pObject;
  LOBYTE(v16) = 3;
  if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
    v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
  v9 = v1->m_spPopupAppointSubMaster.m_pObject;
  LOBYTE(v16) = 2;
  if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
    v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
  v10 = v1->m_spPopupAppointMaster.m_pObject;
  LOBYTE(v16) = 1;
  if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
    v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
  v14 = &v1->map_WinIndex;
  v11._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->map_WinIndex._Myhead;
  v12._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->map_WinIndex._Myhead->_Left;
  LOBYTE(v16) = 10;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->map_WinIndex,
    &result,
    v12,
    v11);
  operator delete(v1->map_WinIndex._Myhead);
  v16 = -1;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9AE00C: using guessed type void (__thiscall *GuildWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AE02C: using guessed type int (__thiscall *GuildWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005C9460) --------------------------------------------------------
void __thiscall GuildWin::DirectMessage(GuildWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  GuildWin *v4; // esi@1
  SlideListWin *v5; // ecx@1
  signed int v6; // eax@2
  int v7; // eax@7
  GuildMemberGradeSetupTask *v8; // eax@10
  GuildMemberGradeSetupTask *v9; // eax@11
  GuildMemberGradeSetupTask *v10; // eax@12
  GuildMemberGradeSetupTask *v11; // eax@13
  GuildMemberGradeSetupTask *v12; // eax@14
  GuildMemberGradeSetupTask *v13; // eax@15
  GuildMemberVanishTask *v14; // eax@16
  GUILD_MEMBER_CLIENT *v15; // edi@17
  CClientGuildAcademy *v16; // eax@18
  GuildAcademyMasterAppointTask *v17; // eax@21
  CClientGuild *v18; // eax@24
  GuildAcademyMasterInitializeTask *v19; // esi@25
  Name5 *v20; // eax@25
  NiUnsharedGeometryGroup *v21; // eax@20
  NiUnsharedGeometryGroup *v22; // edi@27
  GUILD_MEMBER_CLIENT *pkMemberClient; // [sp+4h] [bp-20h]@7
  char acname[21]; // [sp+8h] [bp-1Ch]@17

  v4 = this;
  v5 = (SlideListWin *)LODWORD(this->m_kWorld.m_fScale);
  if ( v5 )
  {
    v6 = SlideListWin::GetCurSelIndex(v5);
    if ( v6 >= 0 )
    {
      switch ( iMsgTag )
      {
        case 9:
        case 12:
          if ( &v4[-1].m_iVYPos == (int *)g_pkToolTipWin->m_pkToolTipParentWin )
            ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
          return;
        case 41:
          GuildWin::InvalidateGuildList((GuildWin *)((char *)v4 - 232));
          return;
        case 15:
          SlideListWin::GetData((SlideListWin *)LODWORD(v4->m_kWorld.m_fScale), v6, (unsigned int *)&pkMemberClient);
          v7 = *(_DWORD *)pvBody;
          if ( *(_DWORD *)pvBody > 1011 )
          {
            if ( v7 != 1012 )
              return;
            v18 = GuildTask::GetGuild();
            if ( CClientGuild::AmIGuildMaster(v18) )
            {
              v19 = ISingletonTask<GuildAcademyMasterInitializeTask>::Run();
              v20 = User::GetMainCharID(&g_kUser);
              GuildAcademyMasterInitializeTask::SetInfo(v19, v20);
              return;
            }
            v21 = TextData::Get(0x28233E34u);
          }
          else
          {
            if ( *(_DWORD *)pvBody != 1011 )
            {
              switch ( v7 )
              {
                case 34:
                  v8 = ISingletonTask<GuildMemberGradeSetupTask>::Run();
                  GuildMemberGradeSetupTask::SetInfo(v8, &pkMemberClient->sName, 0, pkMemberClient->nLevel);
                  break;
                case 35:
                  v9 = ISingletonTask<GuildMemberGradeSetupTask>::Run();
                  GuildMemberGradeSetupTask::SetInfo(v9, &pkMemberClient->sName, 1, 0);
                  break;
                case 36:
                  v10 = ISingletonTask<GuildMemberGradeSetupTask>::Run();
                  GuildMemberGradeSetupTask::SetInfo(v10, &pkMemberClient->sName, 2, 0);
                  break;
                case 37:
                  v11 = ISingletonTask<GuildMemberGradeSetupTask>::Run();
                  GuildMemberGradeSetupTask::SetInfo(v11, &pkMemberClient->sName, 3, 0);
                  break;
                case 38:
                  v12 = ISingletonTask<GuildMemberGradeSetupTask>::Run();
                  GuildMemberGradeSetupTask::SetInfo(v12, &pkMemberClient->sName, 4, 0);
                  break;
                case 39:
                  v13 = ISingletonTask<GuildMemberGradeSetupTask>::Run();
                  GuildMemberGradeSetupTask::SetInfo(v13, &pkMemberClient->sName, 6, 0);
                  break;
                case 40:
                  v14 = ISingletonTask<GuildMemberVanishTask>::Run();
                  GuildMemberVanishTask::SetInfo(v14, &pkMemberClient->sName);
                  break;
                case 41:
                  v15 = pkMemberClient;
                  Name5::n_string(&pkMemberClient->sName, acname);
                  acname[20] = 0;
                  *(_QWORD *)&GameFrameWork::m_kWhisperCharID.n5_name[0] = *(_QWORD *)&v15->sName.n5_name[0];
                  *(_QWORD *)&GameFrameWork::m_kWhisperCharID.n5_code[2] = *(_QWORD *)&v15->sName.n5_code[2];
                  GameFrameWork::m_kWhisperCharID.n5_code[4] = v15->sName.n5_code[4];
                  GameFrameWork::OnWhisperChatStart(
                    (GameFrameWork *)LODWORD(v4->m_kLocal.m_Rotate.m_pEntry[1][0]),
                    acname);
                  break;
                default:
                  return;
              }
              return;
            }
            v16 = GuildAcademyTask::GetGuildAcademy();
            if ( (unsigned __int8)CClientGuildAcademy::AmIGuildAcademyMaster(v16) )
            {
              if ( pkMemberClient->nGrade <= 3u )
              {
                v17 = ISingletonTask<GuildAcademyMasterAppointTask>::Run();
                GuildAcademyMasterAppointTask::SetInfo(v17, &pkMemberClient->sName);
                return;
              }
              v21 = TextData::Get(0xBD4E5E5C);
            }
            else
            {
              v21 = TextData::Get(0x66B58AC6u);
            }
          }
          v22 = v21;
          if ( v4->m_uiRefCount )
          {
            (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, GuildWin *))(*(_DWORD *)v4->m_uiRefCount + 4))(
              25,
              v21,
              v4);
            if ( v4->m_uiRefCount )
              (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, GuildWin *))(*(_DWORD *)v4->m_uiRefCount + 20))(
                25,
                v22,
                v4);
          }
          ((void (__thiscall *)(GuildWin *, signed int, NiUnsharedGeometryGroup *, GuildWin *))v4->vfptr[5].__vecDelDtor)(
            v4,
            25,
            v22,
            v4);
          break;
        default:
          return;
      }
    }
  }
}

//----- (005C97D0) --------------------------------------------------------
void __thiscall GuildWin::OnTab01(GuildWin *this)
{
  GuildWin *v1; // edi@1
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v3; // esi@1
  PgWin *v4; // ecx@2
  void *(__thiscall *v5)(NiRefObject *, unsigned int); // edx@3
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v6; // eax@7
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *j; // eax@8
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *i; // eax@11
  CClientGuild *v9; // eax@16
  CClientGuild *v10; // esi@16
  ColumnBut *v11; // eax@22
  char *v12; // eax@24
  GuildEmblemIcon *v13; // eax@25
  char *v14; // eax@28

  v1 = this;
  v2 = this->map_WinIndex._Myhead;
  this->m_kTabIndex = 0;
  v3 = v2->_Left;
  if ( v2->_Left != v2 )
  {
    do
    {
      v4 = v3->_Myval.first;
      if ( v4 )
      {
        v5 = v4->vfptr[64].__vecDelDtor;
        if ( v3->_Myval.second )
          ((void (__stdcall *)(_DWORD))v5)(0);
        else
          ((void (__stdcall *)(_DWORD))v5)(1);
      }
      if ( !v3->_Isnil )
      {
        v6 = v3->_Right;
        if ( v6->_Isnil )
        {
          for ( i = v3->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v3 != i->_Right )
              break;
            v3 = i;
          }
          v3 = i;
        }
        else
        {
          v3 = v3->_Right;
          for ( j = v6->_Left; !j->_Isnil; j = j->_Left )
            v3 = j;
        }
      }
    }
    while ( v3 != v1->map_WinIndex._Myhead );
  }
  GuildWin::InvalidateGuildList(v1);
  v1->m_pkTab01->m_bCheck = 1;
  v1->m_pkTab02->m_bCheck = 0;
  v1->m_pkTab03->m_bCheck = 0;
  v9 = GuildTask::GetGuild();
  v10 = v9;
  if ( v9 )
  {
    if ( (unsigned __int8)CClientGuild::AmIGuildMember(v9) )
      GuildWin::ShowEmblem(v1, v1->m_bGuildEmblem);
    else
      GuildWin::ShowEmblem(v1, 0);
    if ( !CClientGuild::AmIGuildMaster(v10) )
    {
      if ( v1->m_bGuildEmblem )
      {
        v13 = v1->m_pkEmblemIcon;
        if ( v13 )
        {
          if ( !v13->m_pkToolTipWin )
            v13->m_pkToolTipWin = g_pkToolTipWin;
          v14 = (char *)TextData3::Get(0x6E9EAD92u);
          PgWin::SetToolTipWinText((PgWin *)&v1->m_pkEmblemIcon->vfptr, v14);
        }
      }
      else
      {
        v11 = v1->m_pkEmblemCheckBox;
        if ( !v11->m_pkToolTipWin )
          v11->m_pkToolTipWin = g_pkToolTipWin;
        v12 = (char *)TextData3::Get(0x6E9EAD92u);
        PgWin::SetToolTipWinText((PgWin *)&v1->m_pkEmblemCheckBox->vfptr, v12);
        v1->m_pkEmblemCheckBox->m_bCheck = 0;
      }
    }
  }
}

//----- (005C9940) --------------------------------------------------------
void __thiscall GuildWin::OnTab02(GuildWin *this)
{
  GuildWin *v1; // edi@1
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v4; // eax@3
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *j; // eax@4
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *i; // eax@7

  v1 = this;
  v2 = this->map_WinIndex._Myhead;
  this->m_kTabIndex = 1;
  v3 = v2->_Left;
  if ( v2->_Left != v2 )
  {
    do
    {
      ((void (__stdcall *)(_DWORD))v3->_Myval.first->vfptr[64].__vecDelDtor)(v3->_Myval.second == 1);
      if ( !v3->_Isnil )
      {
        v4 = v3->_Right;
        if ( v4->_Isnil )
        {
          for ( i = v3->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v3 != i->_Right )
              break;
            v3 = i;
          }
          v3 = i;
        }
        else
        {
          v3 = v3->_Right;
          for ( j = v4->_Left; !j->_Isnil; j = j->_Left )
            v3 = j;
        }
      }
    }
    while ( v3 != v1->map_WinIndex._Myhead );
  }
  GuildWin::InvalidateGuildList(v1);
  v1->m_pkTab01->m_bCheck = 0;
  v1->m_pkTab02->m_bCheck = 1;
  v1->m_pkTab03->m_bCheck = 0;
  GuildWin::ShowEmblem(v1, 0);
}

//----- (005C9A00) --------------------------------------------------------
void __thiscall GuildWin::OnTab03(GuildWin *this)
{
  GuildWin *v1; // edi@1
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v4; // eax@3
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *j; // eax@4
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *i; // eax@7

  v1 = this;
  v2 = this->map_WinIndex._Myhead;
  this->m_kTabIndex = 2;
  v3 = v2->_Left;
  if ( v2->_Left != v2 )
  {
    do
    {
      ((void (__stdcall *)(_DWORD))v3->_Myval.first->vfptr[64].__vecDelDtor)(v3->_Myval.second == 2);
      if ( !v3->_Isnil )
      {
        v4 = v3->_Right;
        if ( v4->_Isnil )
        {
          for ( i = v3->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v3 != i->_Right )
              break;
            v3 = i;
          }
          v3 = i;
        }
        else
        {
          v3 = v3->_Right;
          for ( j = v4->_Left; !j->_Isnil; j = j->_Left )
            v3 = j;
        }
      }
    }
    while ( v3 != v1->map_WinIndex._Myhead );
  }
  GuildWin::InvalidateGuildList(v1);
  v1->m_pkTab01->m_bCheck = 0;
  v1->m_pkTab02->m_bCheck = 0;
  v1->m_pkTab03->m_bCheck = 1;
  GuildWin::ShowEmblem(v1, 0);
}

//----- (005C9AC0) --------------------------------------------------------
void __thiscall GuildWin::GuildWin(GuildWin *this)
{
  GuildWin *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v2; // eax@1
  std::exception pExceptionObject; // [sp+Ch] [bp-20h]@3
  GuildWin *v4; // [sp+18h] [bp-14h]@1
  char *_What; // [sp+1Ch] [bp-10h]@3
  int v6; // [sp+28h] [bp-4h]@1

  v1 = this;
  v4 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GuildWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildWin::`vftable'{for `IDirectMessenger'};
  v6 = 0;
  v1->map_WinIndex._Mysize = 0;
  v2 = (std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *)operator new(0x18u);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->map_WinIndex._Myhead = v2;
  v2->_Left = v2;
  v1->map_WinIndex._Myhead->_Parent = v1->map_WinIndex._Myhead;
  v1->map_WinIndex._Myhead->_Right = v1->map_WinIndex._Myhead;
  v1->map_WinIndex._Myhead->_Color = 1;
  v1->map_WinIndex._Myhead->_Isnil = 1;
  v1->m_spPopupAppointMaster.m_pObject = 0;
  v1->m_spPopupAppointSubMaster.m_pObject = 0;
  v1->m_spPopupAppointSenior.m_pObject = 0;
  v1->m_spPopupAppointKnight.m_pObject = 0;
  v1->m_spPopupFireAppointment.m_pObject = 0;
  v1->m_spPopupVanish.m_pObject = 0;
  v1->m_spPopupWhisperChat.m_pObject = 0;
  v1->m_spPopupAppointAcademyMaster.m_pObject = 0;
  v1->m_spPopupInitializeAcademyMaster.m_pObject = 0;
  *(_WORD *)&v1->m_bShowOnlineOnly = 256;
  v1->m_nSortColumn = 0;
  v1->m_pkSlideBarGuildList = 0;
  v1->m_pkSlideBarGuildNotice = 0;
  v1->m_pkSlideBar = 0;
  v1->m_pListWinGuild = 0;
  v1->m_pListWinNotice = 0;
  v1->m_pkInfoType = 0;
  v1->m_pkTitle1 = 0;
  v1->m_pkTitle2 = 0;
  v1->m_pkTitle3 = 0;
  v1->m_pkMemberOnlineStatus = 0;
  v1->m_pkGuildGrade_Fame = 0;
  v1->m_pkGuildAcademyInfo = 0;
  v1->m_pkRemainingBuffTime = 0;
  v1->m_pkShowOnlineOnly = 0;
  v1->m_pkGuildMemberPopupMenu = 0;
  v1->m_pkCorpsSetupSubMenu = 0;
  v1->m_pkCorpsCommanderSetupSubMenu = 0;
  v1->m_pkGuildToken = 0;
  v1->m_pkNextJoinTime = 0;
  v1->m_kTabIndex = 0;
  *(_WORD *)&v1->m_bGuildEmblem = 0;
  v1->m_EmblemState = 4;
  v1->m_pkEmblemCheckBox = 0;
  v1->m_pkEmblemIcon = 0;
  v1->m_GuildEmblemInfo = (GUILD_EMBLEM_INFO)-1;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9AE00C: using guessed type void (__thiscall *GuildWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AE02C: using guessed type int (__thiscall *GuildWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005C9C70) --------------------------------------------------------
GuildWin *__cdecl GuildWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  GuildWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x22Cu);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    GuildWin::GuildWin((GuildWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (GuildWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (005C9DA0) --------------------------------------------------------
void __thiscall GuildWin::OnCommand(GuildWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0xBu:
      GuildWin::OnWinClose(this);
      break;
    case 0xCu:
      GuildWin::OnDetailInfo(this);
      break;
    case 0xDu:
      GuildWin::OnAddGuildMember();
      break;
    case 0xEu:
      ITask::DirectDispatchAll(42, 0);
      break;
    case 0x11u:
      GuildWin::OnSlideBar(this);
      break;
    case 0x12u:
      GuildWin::OnSlideBarNotice(this);
      break;
    case 0x13u:
      GuildWin::OnSortByTitle01(this);
      break;
    case 0x14u:
      GuildWin::OnSortByTitle02(this);
      break;
    case 0x15u:
      GuildWin::OnSortByTitle03(this);
      break;
    case 0x16u:
      GuildWin::OnSortByTitle04(this);
      break;
    case 0x17u:
      GuildWin::OnSortByTitle05(this);
      break;
    case 0x19u:
      GuildWin::OnLClick(this, lParam);
      break;
    case 0x18u:
      GuildWin::OnRClick(this, lParam);
      break;
    case 0x1Bu:
      GuildWin::OnChangeTab(this, 0);
      break;
    case 0x1Cu:
      GuildWin::OnChangeTab(this, TE_PARTYMATCH);
      break;
    case 0x1Du:
      GuildWin::OnChangeTab(this, TE_WEDDING);
      break;
    case 0x1Eu:
      GuildWin::OnChangeTab(this, TE_HOLYPROMISE);
      break;
    case 0x1Fu:
      GuildWin::OnChangeTab(this, TE_GUILDACADEMY);
      break;
    case 0x1Au:
      GuildWin::OnEditNotice(this);
      break;
    case 0x20u:
      GuildWin::OnHelpLink();
      break;
    case 0x21u:
      GuildWin::OnGuildTournamentMenu();
      break;
    case 0x22u:
      GuildWin::OnTab01(this);
      break;
    case 0x23u:
      GuildWin::OnTab02(this);
      break;
    case 0x24u:
      GuildWin::OnTab03(this);
      break;
    case 0x28u:
      GuildWin::OnSlideBarHistory(this);
      break;
    case 0x29u:
      GuildWin::OnShowEmblemWin(this);
      break;
    default:
      return;
  }
}

//----- (005C9F40) --------------------------------------------------------
void __thiscall GuildWin::OnShowWin(GuildWin *this)
{
  unsigned int v1; // eax@1
  int v2; // eax@2

  v1 = this->m_kTabIndex;
  if ( v1 )
  {
    v2 = v1 - 1;
    if ( v2 )
    {
      if ( v2 == 1 )
        GuildWin::OnTab03(this);
    }
    else
    {
      GuildWin::OnTab02(this);
    }
  }
  else
  {
    GuildWin::OnTab01(this);
  }
}

//----- (005C9F70) --------------------------------------------------------
char __thiscall GuildWin::Create(GuildWin *this, PgFrameWork *pkFrameWork)
{
  GuildWin *v2; // esi@1
  NiTexturePalette *v3; // ebx@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  LONG v7; // eax@6
  char v8; // al@10
  int v9; // edi@11
  int v10; // ebx@11
  NiSourceTexture *v11; // eax@11
  PgSprData *v12; // eax@12
  PgSprData *v13; // eax@14
  PgFont *v14; // eax@17
  PgWinText *v15; // edi@17
  NiUnsharedGeometryGroup *v16; // eax@17
  PgSprData *v17; // edi@17
  PgSprData *v18; // ST148_4@17
  int v19; // edi@17
  PgFont *v20; // eax@19
  PgWinText *v21; // edi@19
  NiUnsharedGeometryGroup *v22; // eax@19
  PgFont *v23; // eax@19
  PgWinText *v24; // edi@19
  NiUnsharedGeometryGroup *v25; // eax@19
  PgSprData *v26; // eax@19
  int v27; // edi@19
  PgSprData *v28; // eax@19
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v29; // eax@19
  PgSprData *v30; // eax@19
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v31; // eax@19
  PgSprData *v32; // eax@19
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v33; // eax@19
  SLWCreateInfo::Item *v34; // eax@19
  SLWCreateInfo::Item *v35; // eax@27
  SLWCreateInfo::Item *v36; // eax@29
  SLWCreateInfo::Item *v37; // eax@33
  PgSprData *v38; // eax@35
  SlideListWin *v39; // eax@35
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v40; // eax@35
  SLWCreateInfo::Item *v41; // eax@35
  PgSprData *v42; // eax@39
  SlideListWin *v43; // eax@39
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v44; // eax@39
  SLWCreateInfo::Item *v45; // eax@39
  SLWCreateInfo::Item *v46; // eax@47
  SLWCreateInfo::Item *v47; // eax@49
  SLWCreateInfo::Item *v48; // eax@51
  PgSprData *v49; // eax@51
  SlideListWin *v50; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v51; // eax@51
  PgWinText *v52; // eax@51
  SlideBar *v53; // eax@51
  int v54; // edx@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v55; // eax@51
  SlideBar *v56; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v57; // eax@51
  PgSprData *v58; // eax@51
  SlideBar *v59; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v60; // eax@51
  ColumnBut *v61; // eax@51
  PgWinText *v62; // edx@51
  int v63; // eax@51
  SLWCreateInfo::Item *v64; // edx@51
  PgFont *v65; // eax@51
  PgWinText *v66; // eax@51
  NiRefObjectVtbl *v67; // edx@51
  NiUnsharedGeometryGroup *v68; // eax@51
  ColumnBut *v69; // eax@51
  PgWinText *v70; // edx@51
  int v71; // eax@51
  SLWCreateInfo::Item *v72; // edx@51
  PgFont *v73; // eax@51
  PgWinText *v74; // eax@51
  NiRefObjectVtbl *v75; // edx@51
  NiUnsharedGeometryGroup *v76; // eax@51
  ColumnBut *v77; // eax@51
  PgWinText *v78; // edx@51
  int v79; // eax@51
  SLWCreateInfo::Item *v80; // edx@51
  PgFont *v81; // eax@51
  PgWinText *v82; // eax@51
  NiRefObjectVtbl *v83; // edx@51
  NiUnsharedGeometryGroup *v84; // eax@51
  float v85; // ecx@51
  PgWinText *v86; // eax@51
  PgFont *v87; // eax@51
  PgWinText *v88; // eax@51
  NiRefObjectVtbl *v89; // edx@51
  NiUnsharedGeometryGroup *v90; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v91; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v92; // eax@51
  float v93; // ecx@51
  PgWinText *v94; // eax@51
  PgFont *v95; // eax@51
  PgWinText *v96; // eax@51
  NiUnsharedGeometryGroup *v97; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v98; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v99; // eax@51
  float v100; // ecx@51
  PgWinText *v101; // eax@51
  PgFont *v102; // eax@51
  PgWinText *v103; // eax@51
  NiUnsharedGeometryGroup *v104; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v105; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v106; // eax@51
  float v107; // ecx@51
  PgWinText *v108; // eax@51
  PgFont *v109; // eax@51
  PgWinText *v110; // eax@51
  NiUnsharedGeometryGroup *v111; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v112; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v113; // eax@51
  float v114; // ecx@51
  PgWinText *v115; // eax@51
  PgFont *v116; // eax@51
  PgWinText *v117; // eax@51
  NiRefObjectVtbl *v118; // edx@51
  NiUnsharedGeometryGroup *v119; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v120; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v121; // eax@51
  float v122; // ecx@51
  PgWinText *v123; // eax@51
  PgFont *v124; // eax@51
  PgWinText *v125; // eax@51
  NiRefObjectVtbl *v126; // edx@51
  NiUnsharedGeometryGroup *v127; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v128; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v129; // eax@51
  float v130; // ecx@51
  PgWinText *v131; // eax@51
  PgFont *v132; // eax@51
  PgWinText *v133; // eax@51
  NiRefObjectVtbl *v134; // edx@51
  NiUnsharedGeometryGroup *v135; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v136; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v137; // eax@51
  float v138; // ecx@51
  PgWinText *v139; // eax@51
  PgFont *v140; // eax@51
  PgWinText *v141; // eax@51
  NiRefObjectVtbl *v142; // edx@51
  NiUnsharedGeometryGroup *v143; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v144; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v145; // eax@51
  PgFont *v146; // eax@54
  PgWinText *v147; // eax@54
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v148; // eax@54
  PgFont *v149; // eax@55
  PgWinText *v150; // eax@55
  PgFont *v151; // eax@56
  PgWinText *v152; // eax@56
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v153; // eax@56
  char *v154; // eax@56
  int v155; // eax@56
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v156; // edx@56
  PgFont *v157; // eax@56
  PgWinText *v158; // eax@56
  NiRefObjectVtbl *v159; // edx@56
  NiUnsharedGeometryGroup *v160; // eax@56
  float v161; // ecx@56
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v162; // eax@56
  PgFont *v163; // eax@56
  PgWinText *v164; // eax@56
  NiUnsharedGeometryGroup *v165; // eax@56
  float v166; // ecx@56
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v167; // eax@56
  PgFont *v168; // eax@56
  PgWinText *v169; // eax@56
  NiUnsharedGeometryGroup *v170; // eax@56
  PgWinBut *v171; // eax@56
  PgWinText *v172; // ecx@56
  int v173; // ecx@56
  int v174; // edx@56
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v175; // ecx@56
  PgWin *v176; // ST150_4@56
  PgFont *v177; // eax@56
  PgWinText *v178; // eax@56
  NiRefObjectVtbl *v179; // edx@56
  NiUnsharedGeometryGroup *v180; // eax@56
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v181; // eax@56
  PgSprData *v182; // eax@56
  int v183; // edi@56
  char *v184; // eax@56
  char *v185; // eax@56
  char *v186; // eax@56
  char *v187; // eax@56
  char *v188; // eax@56
  char *v189; // eax@56
  PgSprData::PgHitTester *v190; // eax@56
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v191; // edx@56
  PgFont *v192; // eax@56
  NiUnsharedGeometryGroup *v193; // eax@56
  NiPointer<PgSprData::PgHitTester> *v194; // ecx@56
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v195; // eax@56
  PgFont *v196; // eax@56
  PgWinText *v197; // eax@56
  NiRefObjectVtbl *v198; // edx@56
  NiUnsharedGeometryGroup *v199; // eax@56
  NiPointer<PgSprData::PgHitTester> *v200; // ecx@56
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v201; // eax@56
  PgFont *v202; // eax@56
  PgWinText *v203; // eax@56
  NiRefObjectVtbl *v204; // edx@56
  NiUnsharedGeometryGroup *v205; // eax@56
  NiPointer<PgSprData::PgHitTester> *v206; // ecx@56
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v207; // eax@56
  PgFont *v208; // eax@56
  PgWinText *v209; // eax@56
  NiRefObjectVtbl *v210; // edx@56
  NiUnsharedGeometryGroup *v211; // eax@56
  NiPointer<PgSprData::PgHitTester> *v212; // ecx@56
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v213; // eax@56
  PgFont *v214; // eax@56
  PgWinText *v215; // eax@56
  NiRefObjectVtbl *v216; // edx@56
  NiUnsharedGeometryGroup *v217; // eax@56
  NiPointer<PgSprData::PgHitTester> *v218; // ecx@56
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v219; // eax@56
  PgFont *v220; // eax@56
  PgWinText *v221; // eax@56
  NiRefObjectVtbl *v222; // edx@56
  NiUnsharedGeometryGroup *v223; // eax@56
  NiSourceTexture *v224; // eax@56
  PopupMenuWin *v225; // eax@56
  NiUnsharedGeometryGroup *v226; // ST140_4@56
  NiUnsharedGeometryGroup *v227; // eax@56
  char *v228; // eax@56
  NiD3DDefaultShader *v229; // eax@56
  NiUnsharedGeometryGroup *v230; // ST140_4@56
  NiUnsharedGeometryGroup *v231; // eax@56
  char *v232; // eax@56
  NiD3DDefaultShader *v233; // eax@56
  NiUnsharedGeometryGroup *v234; // ST140_4@56
  NiUnsharedGeometryGroup *v235; // eax@56
  char *v236; // eax@56
  NiD3DDefaultShader *v237; // eax@56
  NiUnsharedGeometryGroup *v238; // ST140_4@56
  NiUnsharedGeometryGroup *v239; // eax@56
  char *v240; // eax@56
  NiD3DDefaultShader *v241; // eax@56
  NiUnsharedGeometryGroup *v242; // ST140_4@56
  NiUnsharedGeometryGroup *v243; // eax@56
  char *v244; // eax@56
  NiD3DDefaultShader *v245; // eax@56
  char *v246; // eax@56
  NiD3DDefaultShader *v247; // eax@56
  char *v248; // eax@56
  NiD3DDefaultShader *v249; // eax@56
  char *v250; // eax@56
  NiD3DDefaultShader *v251; // eax@56
  char *v252; // eax@56
  NiD3DDefaultShader *v253; // eax@56
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node **v254; // eax@56
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v255; // ecx@56
  PgWin *v256; // ecx@57
  ColumnBut *v257; // eax@60
  NiNode *v258; // ecx@60
  GuildEmblemIcon *v259; // eax@60
  NiNode *v260; // esi@61
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >,bool> v261; // [sp+16Ch] [bp-88h]@54
  PgFrameWork *v262; // [sp+174h] [bp-80h]@1
  SLWCreateInfo kCreateInfo; // [sp+178h] [bp-7Ch]@19
  unsigned int uiWidth; // [sp+194h] [bp-60h]@14
  unsigned int uiHeight; // [sp+198h] [bp-5Ch]@14
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >,bool> result; // [sp+19Ch] [bp-58h]@19
  int iOffY; // [sp+1A4h] [bp-50h]@11
  std::pair<int const ,int> _Val; // [sp+1A8h] [bp-4Ch]@19
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> > > iter; // [sp+1B0h] [bp-44h]@17
  SLWCreateInfo::Item *pCIItem; // [sp+1B4h] [bp-40h]@19
  int uiTop; // [sp+1B8h] [bp-3Ch]@4
  int uiLeft; // [sp+1BCh] [bp-38h]@4
  NiPointer<NiNode> spNode; // [sp+1C0h] [bp-34h]@1
  PgWinText *pkTextWin; // [sp+1C4h] [bp-30h]@18
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v275; // [sp+1C8h] [bp-2Ch]@19
  int v276; // [sp+1F0h] [bp-4h]@1

  v2 = this;
  v262 = pkFrameWork;
  spNode.m_pObject = 0;
  this->m_pkFrameWork = pkFrameWork;
  v3 = pTexturePalette;
  v276 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildWin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "GuildWin", 0) )
  {
    v6 = spNode.m_pObject;
    v276 = -1;
    if ( spNode.m_pObject )
    {
      v7 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
      goto LABEL_7;
    }
    return 0;
  }
  v9 = uiTop;
  v10 = uiLeft;
  iOffY = uiTop;
  v11 = MenuTexMgr::GetTexture(0x13u);
  if ( v11 )
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v11);
  else
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop - v9, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop - v9, v13, (PgWin *)&v2->vfptr, 0, 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "WinTitle",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
  {
    v6 = spNode.m_pObject;
    v276 = -1;
    if ( spNode.m_pObject )
    {
      v7 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
LABEL_7:
      if ( !v7 )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    return 0;
  }
  v14 = Font::Get(MAIN_MENU);
  v15 = PgWinText::CreateWin(uiLeft - v10, uiTop - v9, uiWidth, uiHeight, v14, (PgWin *)&v2->vfptr, 0, 0);
  v15->vfptr[122].__vecDelDtor((NiRefObject *)v15, 1u);
  v15->vfptr[117].__vecDelDtor((NiRefObject *)v15, (unsigned int)&Color::m_kDxWinTitleColor);
  iter._Ptr = (std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *)&v15->vfptr[118];
  v16 = TextData::Get(0xE3504941);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))iter._Ptr->_Left)(v15, v16);
  v15->vfptr[60].__vecDelDtor((NiRefObject *)v15, 0);
  v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v17, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(v17, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  v18 = v17;
  v19 = iOffY;
  PgWinBut::CreateWin(uiLeft - v10, uiTop - iOffY, v18, (PgWin *)&v2->vfptr, 0xBu, 0, 0);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "HelpLinkNor",
                               &uiLeft,
                               &uiTop,
                               0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v10, uiTop - v19, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x20u, 0, 0);
  }
  PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text04", &uiLeft, &uiTop, 0);
  v20 = Font::Get(TITLEBOLD);
  v21 = PgWinText::CreateWin(uiLeft - v10, uiTop - v19, uiWidth, uiHeight, v20, (PgWin *)&v2->vfptr, 0, 0);
  v21->vfptr[122].__vecDelDtor((NiRefObject *)v21, 5u);
  iter._Ptr = (std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *)&v21->vfptr[118];
  v22 = TextData::Get(0x9BEAF4F4);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))iter._Ptr->_Left)(v21, v22);
  v21->vfptr[60].__vecDelDtor((NiRefObject *)v21, 0);
  PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Category", &uiLeft, &uiTop, 0);
  v23 = Font::Get(TITLEBOLD);
  v24 = PgWinText::CreateWin(uiLeft - v10, uiTop - iOffY, uiWidth, uiHeight, v23, (PgWin *)&v2->vfptr, 0, 0);
  v24->vfptr[122].__vecDelDtor((NiRefObject *)v24, 5u);
  iter._Ptr = (std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *)&v24->vfptr[118];
  v25 = TextData3::Get(0x2E4A1B0Bu);
  ((void (__thiscall *)(_DWORD, _DWORD))iter._Ptr->_Left)(v24, v25);
  v24->vfptr[60].__vecDelDtor((NiRefObject *)v24, 0);
  v26 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  v27 = iOffY;
  PgWinSpr::CreateWin(uiLeft - v10, uiTop - iOffY, v26, (PgWin *)&v2->vfptr, 0, 0);
  v28 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, 0);
  _Val.first = (const int)PgWinSpr::CreateWin(uiLeft - v10, uiTop - v27, v28, (PgWin *)&v2->vfptr, 0, 0);
  _Val.second = 1;
  v29 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v29,
    0);
  v30 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel03", &uiLeft, &uiTop, 0);
  _Val.first = (const int)PgWinSpr::CreateWin(uiLeft - v10, uiTop - v27, v30, (PgWin *)&v2->vfptr, 0, 0);
  _Val.second = 2;
  v31 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v31,
    0);
  v32 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel04", &uiLeft, &uiTop, 0);
  _Val.first = (const int)PgWinSpr::CreateWin(uiLeft - v10, uiTop - v27, v32, (PgWin *)&v2->vfptr, 0, 0);
  _Val.second = 0;
  v33 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v33,
    0);
  kCreateInfo.m_arrItem._Myfirst = 0;
  kCreateInfo.m_arrItem._Mylast = 0;
  kCreateInfo.m_arrItem._Myend = 0;
  kCreateInfo.m_bMakeData = 0;
  kCreateInfo.m_nOffX = 0;
  kCreateInfo.m_nOffY = 0;
  LOBYTE(v276) = 1;
  v34 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
  v34->nItemType = 1;
  pCIItem = v34;
  v34->pNode = spNode.m_pObject;
  v275._Myres = 15;
  v275._Mysize = 0;
  v275._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v275, "ColumnBarNor", 0xCu);
  LOBYTE(v276) = 2;
  pCIItem = (SLWCreateInfo::Item *)((char *)pCIItem + 72);
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pCIItem,
    &v275);
  LOBYTE(v276) = 1;
  if ( v275._Myres >= 0x10 )
    operator delete(v275._Bx._Ptr);
  v275._Myres = 15;
  v275._Mysize = 0;
  v275._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v275, "ColumnBarClick", 0xEu);
  LOBYTE(v276) = 3;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pCIItem,
    &v275);
  LOBYTE(v276) = 1;
  if ( v275._Myres >= 0x10 )
    operator delete(v275._Bx._Ptr);
  v275._Myres = 15;
  v275._Mysize = 0;
  v275._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v275, "ColumnBarOver", 0xDu);
  LOBYTE(v276) = 4;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pCIItem,
    &v275);
  LOBYTE(v276) = 1;
  if ( v275._Myres >= 0x10 )
    operator delete(v275._Bx._Ptr);
  pCIItem = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pCIItem->nItemType = 2;
  v275._Myres = 15;
  v275._Mysize = 0;
  v275._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v275, "Column01", 8u);
  LOBYTE(v276) = 5;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &pCIItem->vecNodeName,
    &v275);
  LOBYTE(v276) = 1;
  if ( v275._Myres >= 0x10 )
    operator delete(v275._Bx._Ptr);
  v35 = pCIItem;
  pCIItem->pNode = spNode.m_pObject;
  v35->bAbbreviatable = 1;
  pCIItem = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pCIItem->nItemType = 2;
  v275._Myres = 15;
  v275._Mysize = 0;
  v275._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v275, "Column02", 8u);
  LOBYTE(v276) = 6;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &pCIItem->vecNodeName,
    &v275);
  LOBYTE(v276) = 1;
  if ( v275._Myres >= 0x10 )
    operator delete(v275._Bx._Ptr);
  v36 = pCIItem;
  pCIItem->pNode = spNode.m_pObject;
  v36->bAbbreviatable = 1;
  v36->nVisiableTextMaxNums = 6;
  pCIItem = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pCIItem->nItemType = 2;
  v275._Myres = 15;
  v275._Mysize = 0;
  v275._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v275, "Column03", 8u);
  LOBYTE(v276) = 7;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &pCIItem->vecNodeName,
    &v275);
  LOBYTE(v276) = 1;
  if ( v275._Myres >= 0x10 )
    operator delete(v275._Bx._Ptr);
  pCIItem->pNode = spNode.m_pObject;
  pCIItem = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pCIItem->nItemType = 2;
  v275._Myres = 15;
  v275._Mysize = 0;
  v275._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v275, "Column04", 8u);
  LOBYTE(v276) = 8;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &pCIItem->vecNodeName,
    &v275);
  LOBYTE(v276) = 1;
  if ( v275._Myres >= 0x10 )
    operator delete(v275._Bx._Ptr);
  v37 = pCIItem;
  pCIItem->pNode = spNode.m_pObject;
  v37->bAbbreviatable = 1;
  pCIItem = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pCIItem->nItemType = 2;
  v275._Myres = 15;
  v275._Mysize = 0;
  v275._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v275, "Column05", 8u);
  LOBYTE(v276) = 9;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &pCIItem->vecNodeName,
    &v275);
  LOBYTE(v276) = 1;
  if ( v275._Myres >= 0x10 )
    operator delete(v275._Bx._Ptr);
  pCIItem->pNode = spNode.m_pObject;
  SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
  v38 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SubText01", &uiLeft, &uiTop, 0);
  v39 = SlideListWin::CreateWin(uiLeft - v10, uiTop - iOffY, v38, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
  v2->m_pListWinGuild = v39;
  v39->m_uiRClickMsg = 24;
  v2->m_pListWinGuild->m_uiLClickMsg = 25;
  SlideListWin::UpdateViewList(v2->m_pListWinGuild);
  _Val.first = (const int)v2->m_pListWinGuild;
  _Val.second = 1;
  v40 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v40,
    0);
  SLWCreateInfo::Clear(&kCreateInfo);
  v41 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
  v41->nItemType = 1;
  v41->pNode = spNode.m_pObject;
  pCIItem = v41;
  v275._Myres = 15;
  v275._Mysize = 0;
  v275._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v275, "ColumnBarNor01", 0xEu);
  LOBYTE(v276) = 10;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &pCIItem->vecNodeName,
    &v275);
  LOBYTE(v276) = 1;
  if ( v275._Myres >= 0x10 )
    operator delete(v275._Bx._Ptr);
  pCIItem = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pCIItem->nItemType = 2;
  v275._Myres = 15;
  v275._Mysize = 0;
  v275._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v275, "Column06", 8u);
  LOBYTE(v276) = 11;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &pCIItem->vecNodeName,
    &v275);
  LOBYTE(v276) = 1;
  if ( v275._Myres >= 0x10 )
    operator delete(v275._Bx._Ptr);
  pCIItem->pNode = spNode.m_pObject;
  SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
  v42 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SubText02", &uiLeft, &uiTop, 0);
  v43 = SlideListWin::CreateWin(uiLeft - v10, uiTop - iOffY, v42, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
  v2->m_pListWinNotice = v43;
  v43->m_bCheckEnable = 0;
  SlideListWin::UpdateViewList(v2->m_pListWinNotice);
  _Val.first = (const int)v2->m_pListWinNotice;
  _Val.second = 0;
  v44 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v44,
    0);
  SLWCreateInfo::Clear(&kCreateInfo);
  v45 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
  v45->nItemType = 1;
  pCIItem = v45;
  v45->pNode = spNode.m_pObject;
  v275._Myres = 15;
  v275._Mysize = 0;
  v275._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v275, "ColumnBar01Nor", 0xEu);
  LOBYTE(v276) = 12;
  pCIItem = (SLWCreateInfo::Item *)((char *)pCIItem + 72);
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pCIItem,
    &v275);
  LOBYTE(v276) = 1;
  if ( v275._Myres >= 0x10 )
    operator delete(v275._Bx._Ptr);
  v275._Myres = 15;
  v275._Mysize = 0;
  v275._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v275, "ColumnBar01Click", 0x10u);
  LOBYTE(v276) = 13;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pCIItem,
    &v275);
  LOBYTE(v276) = 1;
  if ( v275._Myres >= 0x10 )
    operator delete(v275._Bx._Ptr);
  v275._Myres = 15;
  v275._Mysize = 0;
  v275._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v275, "ColumnBar01Over", 0xFu);
  LOBYTE(v276) = 14;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pCIItem,
    &v275);
  LOBYTE(v276) = 1;
  if ( v275._Myres >= 0x10 )
    operator delete(v275._Bx._Ptr);
  pCIItem = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pCIItem->nItemType = 2;
  v275._Myres = 15;
  v275._Mysize = 0;
  v275._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v275, "ColumnHis01", 0xBu);
  LOBYTE(v276) = 15;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &pCIItem->vecNodeName,
    &v275);
  LOBYTE(v276) = 1;
  if ( v275._Myres >= 0x10 )
    operator delete(v275._Bx._Ptr);
  v46 = pCIItem;
  pCIItem->pNode = spNode.m_pObject;
  v46->bAbbreviatable = 1;
  pCIItem = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pCIItem->nItemType = 2;
  v275._Myres = 15;
  v275._Mysize = 0;
  v275._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v275, "ColumnHis02", 0xBu);
  LOBYTE(v276) = 16;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &pCIItem->vecNodeName,
    &v275);
  LOBYTE(v276) = 1;
  if ( v275._Myres >= 0x10 )
    operator delete(v275._Bx._Ptr);
  v47 = pCIItem;
  pCIItem->pNode = spNode.m_pObject;
  v47->bAbbreviatable = 1;
  pCIItem = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pCIItem->nItemType = 2;
  v275._Myres = 15;
  v275._Mysize = 0;
  v275._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v275, "ColumnHis03", 0xBu);
  LOBYTE(v276) = 17;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &pCIItem->vecNodeName,
    &v275);
  LOBYTE(v276) = 1;
  if ( v275._Myres >= 0x10 )
    operator delete(v275._Bx._Ptr);
  v48 = pCIItem;
  pCIItem->pNode = spNode.m_pObject;
  v48->bAbbreviatable = 1;
  SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
  v49 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SubText03", &uiLeft, &uiTop, 0);
  v50 = SlideListWin::CreateWin(uiLeft, uiTop, v49, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
  v2->m_pListWinHistory = v50;
  _Val.first = (const int)v50;
  _Val.second = 2;
  v51 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v51,
    0);
  v52 = (PgWinText *)PgSprData::Create(
                       (NiAVObject *)&spNode.m_pObject->vfptr,
                       "SlideBar_SlideBtnMiddle",
                       &uiLeft,
                       &uiTop,
                       0);
  pkTextWin = v52;
  v53 = SlideBar::CreateWin(
          spNode.m_pObject,
          "SlideBar02",
          "SlideBar_UpBtn02",
          "SlideBar_DnBtn02",
          (PgSprData *)v52,
          0,
          (PgWin *)&v2->vfptr);
  v2->m_pkSlideBarGuildList = v53;
  v53->m_uiClickMsg = 17;
  v2->m_pkSlideBarGuildList->m_eType = 1;
  v54 = (int)v2->m_pkSlideBarGuildList;
  _Val.second = 1;
  _Val.first = v54;
  v55 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v55,
    0);
  v56 = SlideBar::CreateWin(
          spNode.m_pObject,
          "SlideBar01",
          "SlideBar_UpBtn01",
          "SlideBar_DnBtn01",
          (PgSprData *)pkTextWin,
          0,
          (PgWin *)&v2->vfptr);
  v2->m_pkSlideBarGuildNotice = v56;
  v56->m_uiClickMsg = 18;
  v2->m_pkSlideBarGuildNotice->m_eType = 1;
  _Val.first = (const int)v2->m_pkSlideBarGuildNotice;
  _Val.second = 0;
  v57 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v57,
    0);
  v58 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle", &uiLeft, &uiTop, 0);
  v59 = SlideBar::CreateWin(
          spNode.m_pObject,
          "SlideBar03",
          "SlideBar_UpBtn03",
          "SlideBar_DnBtn03",
          v58,
          0,
          (PgWin *)&v2->vfptr);
  v2->m_pkSlideBarGuildHistory = v59;
  v59->m_uiClickMsg = 40;
  v2->m_pkSlideBarGuildHistory->m_eType = 1;
  _Val.first = (const int)v2->m_pkSlideBarGuildHistory;
  _Val.second = 2;
  v60 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v60,
    0);
  SlideBar::SetSplitCnt(v2->m_pkSlideBarGuildList, v2->m_pListWinGuild->m_nSlideSplitCnt);
  SlideBar::SetSplitCnt(v2->m_pkSlideBarGuildNotice, v2->m_pListWinNotice->m_nSlideSplitCnt);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab01_Off", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Tab01_On");
  v61 = ColumnBut::CreateWin(uiLeft - v10, uiTop - iOffY, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x22u, 0);
  v62 = pkTextWin;
  v2->m_pkTab01 = v61;
  v63 = *(_DWORD *)LODWORD(v62->m_kWorldBound.m_kCenter.x);
  v64 = *(SLWCreateInfo::Item **)(v63 + 20);
  iter._Ptr = *(std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node **)(v63 + 24);
  pCIItem = v64;
  v65 = Font::Get(MAIN_MENU);
  v66 = PgWinText::CreateWin(
          uiLeft - v10,
          uiTop - iOffY + 1,
          (unsigned int)pCIItem,
          (unsigned int)iter._Ptr,
          v65,
          (PgWin *)&v2->vfptr,
          0,
          0);
  v67 = v66->vfptr;
  pkTextWin = v66;
  v67[122].__vecDelDtor((NiRefObject *)v66, 5u);
  iter._Ptr = (std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *)&pkTextWin->vfptr[118];
  v68 = TextData3::Get(0x25581D98u);
  ((void (__thiscall *)(_DWORD, _DWORD))iter._Ptr->_Left)(pkTextWin, v68);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab02_Off", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Tab02_On");
  v69 = ColumnBut::CreateWin(uiLeft - v10, uiTop - iOffY, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x23u, 0);
  v70 = pkTextWin;
  v2->m_pkTab02 = v69;
  v71 = *(_DWORD *)LODWORD(v70->m_kWorldBound.m_kCenter.x);
  v72 = *(SLWCreateInfo::Item **)(v71 + 20);
  iter._Ptr = *(std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node **)(v71 + 24);
  pCIItem = v72;
  v73 = Font::Get(MAIN_MENU);
  v74 = PgWinText::CreateWin(
          uiLeft - v10,
          uiTop - iOffY + 1,
          (unsigned int)pCIItem,
          (unsigned int)iter._Ptr,
          v73,
          (PgWin *)&v2->vfptr,
          0,
          0);
  v75 = v74->vfptr;
  pkTextWin = v74;
  v75[122].__vecDelDtor((NiRefObject *)v74, 5u);
  iter._Ptr = (std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *)&pkTextWin->vfptr[118];
  v76 = TextData3::Get(0x2CA1668Bu);
  ((void (__thiscall *)(_DWORD, _DWORD))iter._Ptr->_Left)(pkTextWin, v76);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab03_Off", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Tab03_On");
  v77 = ColumnBut::CreateWin(uiLeft - v10, uiTop - iOffY, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x24u, 0);
  v78 = pkTextWin;
  v2->m_pkTab03 = v77;
  v79 = *(_DWORD *)LODWORD(v78->m_kWorldBound.m_kCenter.x);
  v80 = *(SLWCreateInfo::Item **)(v79 + 20);
  iter._Ptr = *(std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node **)(v79 + 24);
  pCIItem = v80;
  v81 = Font::Get(MAIN_MENU);
  v82 = PgWinText::CreateWin(
          uiLeft - v10,
          uiTop - iOffY + 1,
          (unsigned int)pCIItem,
          (unsigned int)iter._Ptr,
          v81,
          (PgWin *)&v2->vfptr,
          0,
          0);
  v83 = v82->vfptr;
  pkTextWin = v82;
  v83[122].__vecDelDtor((NiRefObject *)v82, 5u);
  iter._Ptr = (std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *)&pkTextWin->vfptr[118];
  v84 = TextData3::Get(0x8BA56B9D);
  ((void (__thiscall *)(_DWORD, _DWORD))iter._Ptr->_Left)(pkTextWin, v84);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  v2->m_pkTab01->m_bCheck = 1;
  v2->m_pkTab02->m_bCheck = 0;
  v2->m_pkTab03->m_bCheck = 0;
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title01Nor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title01Click");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title01Over");
  pCIItem = (SLWCreateInfo::Item *)PgWinBut::CreateWin(
                                     uiLeft - v10,
                                     uiTop - iOffY,
                                     (PgSprData *)pkTextWin,
                                     (PgWin *)&v2->vfptr,
                                     0x13u,
                                     0,
                                     0);
  v85 = pkTextWin->m_kWorldBound.m_kCenter.x;
  v86 = *(PgWinText **)(*(_DWORD *)LODWORD(v85) + 20);
  iter._Ptr = *(std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node **)(*(_DWORD *)LODWORD(v85) + 24);
  pkTextWin = v86;
  v87 = Font::Get(MAIN_MENU);
  v88 = PgWinText::CreateWin(
          uiLeft - v10,
          uiTop - iOffY + 1,
          (unsigned int)pkTextWin,
          (unsigned int)iter._Ptr,
          v87,
          (PgWin *)&v2->vfptr,
          0,
          0);
  v89 = v88->vfptr;
  pkTextWin = v88;
  v89[122].__vecDelDtor((NiRefObject *)v88, 5u);
  iter._Ptr = (std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *)&pkTextWin->vfptr[118];
  v90 = TextData::Get(0x4EA49695u);
  ((void (__thiscall *)(_DWORD, _DWORD))iter._Ptr->_Left)(pkTextWin, v90);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  _Val.first = (const int)pCIItem;
  _Val.second = 1;
  v91 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v91,
    0);
  _Val.first = (const int)pkTextWin;
  _Val.second = 1;
  v92 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v92,
    0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title02Nor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title02Click");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title02Over");
  pCIItem = (SLWCreateInfo::Item *)PgWinBut::CreateWin(
                                     uiLeft - v10,
                                     uiTop - iOffY,
                                     (PgSprData *)pkTextWin,
                                     (PgWin *)&v2->vfptr,
                                     0x14u,
                                     0,
                                     0);
  v93 = pkTextWin->m_kWorldBound.m_kCenter.x;
  v94 = *(PgWinText **)(*(_DWORD *)LODWORD(v93) + 20);
  iter._Ptr = *(std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node **)(*(_DWORD *)LODWORD(v93) + 24);
  pkTextWin = v94;
  v95 = Font::Get(MAIN_MENU);
  v96 = PgWinText::CreateWin(
          uiLeft - v10,
          uiTop - iOffY + 1,
          (unsigned int)pkTextWin,
          (unsigned int)iter._Ptr,
          v95,
          (PgWin *)&v2->vfptr,
          0,
          0);
  v2->m_pkTitle1 = v96;
  v96->vfptr[122].__vecDelDtor((NiRefObject *)v96, 5u);
  iter._Ptr = (std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *)&v2->m_pkTitle1->vfptr[118];
  v97 = TextData::Get(0x4A5F8BA3u);
  ((void (__thiscall *)(_DWORD, _DWORD))iter._Ptr->_Left)(v2->m_pkTitle1, v97);
  ((void (__stdcall *)(_DWORD))v2->m_pkTitle1->vfptr[60].__vecDelDtor)(0);
  _Val.first = (const int)v2->m_pkTitle1;
  _Val.second = 1;
  v98 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v98,
    0);
  _Val.first = (const int)pCIItem;
  _Val.second = 1;
  v99 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v99,
    0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title03Nor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title03Click");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title03Over");
  pCIItem = (SLWCreateInfo::Item *)PgWinBut::CreateWin(
                                     uiLeft - v10,
                                     uiTop - iOffY,
                                     (PgSprData *)pkTextWin,
                                     (PgWin *)&v2->vfptr,
                                     0x15u,
                                     0,
                                     0);
  v100 = pkTextWin->m_kWorldBound.m_kCenter.x;
  v101 = *(PgWinText **)(*(_DWORD *)LODWORD(v100) + 20);
  iter._Ptr = *(std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node **)(*(_DWORD *)LODWORD(v100) + 24);
  pkTextWin = v101;
  v102 = Font::Get(MAIN_MENU);
  v103 = PgWinText::CreateWin(
           uiLeft - v10,
           uiTop - iOffY + 1,
           (unsigned int)pkTextWin,
           (unsigned int)iter._Ptr,
           v102,
           (PgWin *)&v2->vfptr,
           0,
           0);
  v2->m_pkTitle2 = v103;
  v103->vfptr[122].__vecDelDtor((NiRefObject *)v103, 5u);
  iter._Ptr = (std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *)&v2->m_pkTitle2->vfptr[118];
  v104 = TextData::Get(0x8BF7ED01);
  ((void (__thiscall *)(_DWORD, _DWORD))iter._Ptr->_Left)(v2->m_pkTitle2, v104);
  ((void (__stdcall *)(_DWORD))v2->m_pkTitle2->vfptr[60].__vecDelDtor)(0);
  _Val.first = (const int)v2->m_pkTitle2;
  _Val.second = 1;
  v105 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v105,
    0);
  _Val.first = (const int)pCIItem;
  _Val.second = 1;
  v106 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v106,
    0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title04Nor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title04Click");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title04Over");
  pCIItem = (SLWCreateInfo::Item *)PgWinBut::CreateWin(
                                     uiLeft - v10,
                                     uiTop - iOffY,
                                     (PgSprData *)pkTextWin,
                                     (PgWin *)&v2->vfptr,
                                     0x16u,
                                     0,
                                     0);
  v107 = pkTextWin->m_kWorldBound.m_kCenter.x;
  v108 = *(PgWinText **)(*(_DWORD *)LODWORD(v107) + 20);
  iter._Ptr = *(std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node **)(*(_DWORD *)LODWORD(v107) + 24);
  pkTextWin = v108;
  v109 = Font::Get(MAIN_MENU);
  v110 = PgWinText::CreateWin(
           uiLeft - v10,
           uiTop - iOffY + 1,
           (unsigned int)pkTextWin,
           (unsigned int)iter._Ptr,
           v109,
           (PgWin *)&v2->vfptr,
           0,
           0);
  v2->m_pkTitle3 = v110;
  v110->vfptr[122].__vecDelDtor((NiRefObject *)v110, 5u);
  iter._Ptr = (std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *)&v2->m_pkTitle3->vfptr[118];
  v111 = TextData::Get(0xB8E4BFEC);
  ((void (__thiscall *)(_DWORD, _DWORD))iter._Ptr->_Left)(v2->m_pkTitle3, v111);
  ((void (__stdcall *)(_DWORD))v2->m_pkTitle3->vfptr[60].__vecDelDtor)(0);
  _Val.first = (const int)v2->m_pkTitle3;
  _Val.second = 1;
  v112 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v112,
    0);
  _Val.first = (const int)pCIItem;
  _Val.second = 1;
  v113 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v113,
    0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title05Nor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title05Click");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title05Over");
  pCIItem = (SLWCreateInfo::Item *)PgWinBut::CreateWin(
                                     uiLeft - v10,
                                     uiTop - iOffY,
                                     (PgSprData *)pkTextWin,
                                     (PgWin *)&v2->vfptr,
                                     0x17u,
                                     0,
                                     0);
  v114 = pkTextWin->m_kWorldBound.m_kCenter.x;
  v115 = *(PgWinText **)(*(_DWORD *)LODWORD(v114) + 20);
  iter._Ptr = *(std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node **)(*(_DWORD *)LODWORD(v114) + 24);
  pkTextWin = v115;
  v116 = Font::Get(MAIN_MENU);
  v117 = PgWinText::CreateWin(
           uiLeft - v10,
           uiTop - iOffY + 1,
           (unsigned int)pkTextWin,
           (unsigned int)iter._Ptr,
           v116,
           (PgWin *)&v2->vfptr,
           0,
           0);
  v118 = v117->vfptr;
  pkTextWin = v117;
  v118[122].__vecDelDtor((NiRefObject *)v117, 5u);
  iter._Ptr = (std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *)&pkTextWin->vfptr[118];
  v119 = TextData::Get(0x398A90A7u);
  ((void (__thiscall *)(_DWORD, _DWORD))iter._Ptr->_Left)(pkTextWin, v119);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  _Val.first = (const int)pkTextWin;
  _Val.second = 1;
  v120 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v120,
    0);
  _Val.first = (const int)pCIItem;
  _Val.second = 1;
  v121 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v121,
    0);
  pkTextWin = (PgWinText *)PgSprData::Create(
                             (NiAVObject *)&spNode.m_pObject->vfptr,
                             "TitleHis01Nor",
                             &uiLeft,
                             &uiTop,
                             0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "TitleHis01Click");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "TItleHis01Over");
  pCIItem = (SLWCreateInfo::Item *)PgWinBut::CreateWin(
                                     uiLeft - v10,
                                     uiTop - iOffY,
                                     (PgSprData *)pkTextWin,
                                     (PgWin *)&v2->vfptr,
                                     0,
                                     0,
                                     0);
  v122 = pkTextWin->m_kWorldBound.m_kCenter.x;
  v123 = *(PgWinText **)(*(_DWORD *)LODWORD(v122) + 20);
  iter._Ptr = *(std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node **)(*(_DWORD *)LODWORD(v122) + 24);
  pkTextWin = v123;
  v124 = Font::Get(MAIN_MENU);
  v125 = PgWinText::CreateWin(
           uiLeft - v10,
           uiTop - iOffY + 1,
           (unsigned int)pkTextWin,
           (unsigned int)iter._Ptr,
           v124,
           (PgWin *)&v2->vfptr,
           0,
           0);
  v126 = v125->vfptr;
  pkTextWin = v125;
  v126[122].__vecDelDtor((NiRefObject *)v125, 5u);
  iter._Ptr = (std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *)&pkTextWin->vfptr[118];
  v127 = TextData3::Get(0x8D927778);
  ((void (__thiscall *)(_DWORD, _DWORD))iter._Ptr->_Left)(pkTextWin, v127);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  _Val.first = (const int)pkTextWin;
  _Val.second = 2;
  v128 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v128,
    0);
  _Val.first = (const int)pCIItem;
  _Val.second = 2;
  v129 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v129,
    0);
  pkTextWin = (PgWinText *)PgSprData::Create(
                             (NiAVObject *)&spNode.m_pObject->vfptr,
                             "TitleHis02Nor",
                             &uiLeft,
                             &uiTop,
                             0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "TitleHis02Click");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "TItleHis02Over");
  pCIItem = (SLWCreateInfo::Item *)PgWinBut::CreateWin(
                                     uiLeft - v10,
                                     uiTop - iOffY,
                                     (PgSprData *)pkTextWin,
                                     (PgWin *)&v2->vfptr,
                                     0,
                                     0,
                                     0);
  v130 = pkTextWin->m_kWorldBound.m_kCenter.x;
  v131 = *(PgWinText **)(*(_DWORD *)LODWORD(v130) + 20);
  iter._Ptr = *(std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node **)(*(_DWORD *)LODWORD(v130) + 24);
  pkTextWin = v131;
  v132 = Font::Get(MAIN_MENU);
  v133 = PgWinText::CreateWin(
           uiLeft - v10,
           uiTop - iOffY + 1,
           (unsigned int)pkTextWin,
           (unsigned int)iter._Ptr,
           v132,
           (PgWin *)&v2->vfptr,
           0,
           0);
  v134 = v133->vfptr;
  pkTextWin = v133;
  v134[122].__vecDelDtor((NiRefObject *)v133, 5u);
  iter._Ptr = (std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *)&pkTextWin->vfptr[118];
  v135 = TextData3::Get(0xE7C0CC1B);
  ((void (__thiscall *)(_DWORD, _DWORD))iter._Ptr->_Left)(pkTextWin, v135);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  _Val.first = (const int)pkTextWin;
  _Val.second = 2;
  v136 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v136,
    0);
  _Val.first = (const int)pCIItem;
  _Val.second = 2;
  v137 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v137,
    0);
  pkTextWin = (PgWinText *)PgSprData::Create(
                             (NiAVObject *)&spNode.m_pObject->vfptr,
                             "TitleHis03Nor",
                             &uiLeft,
                             &uiTop,
                             0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "TitleHis03Click");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "TItleHis03Over");
  pCIItem = (SLWCreateInfo::Item *)PgWinBut::CreateWin(
                                     uiLeft - v10,
                                     uiTop - iOffY,
                                     (PgSprData *)pkTextWin,
                                     (PgWin *)&v2->vfptr,
                                     0,
                                     0,
                                     0);
  v138 = pkTextWin->m_kWorldBound.m_kCenter.x;
  v139 = *(PgWinText **)(*(_DWORD *)LODWORD(v138) + 20);
  iter._Ptr = *(std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node **)(*(_DWORD *)LODWORD(v138) + 24);
  pkTextWin = v139;
  v140 = Font::Get(MAIN_MENU);
  v141 = PgWinText::CreateWin(
           uiLeft - v10,
           uiTop - iOffY + 1,
           (unsigned int)pkTextWin,
           (unsigned int)iter._Ptr,
           v140,
           (PgWin *)&v2->vfptr,
           0,
           0);
  v142 = v141->vfptr;
  pkTextWin = v141;
  v142[122].__vecDelDtor((NiRefObject *)v141, 5u);
  iter._Ptr = (std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *)&pkTextWin->vfptr[118];
  v143 = TextData3::Get(0x9B957B82);
  ((void (__thiscall *)(_DWORD, _DWORD))iter._Ptr->_Left)(pkTextWin, v143);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  _Val.first = (const int)pkTextWin;
  _Val.second = 2;
  v144 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v144,
    0);
  _Val.first = (const int)pCIItem;
  _Val.second = 2;
  v145 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v145,
    0);
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
    goto LABEL_67;
  _Val.second = (signed int)((double)uiHeight * 0.1428571492433548);
  *(_DWORD *)&result.second = 0;
  pkTextWin = (PgWinText *)-iOffY;
  pCIItem = (SLWCreateInfo::Item *)v2->m_pkGuildInfoTxt;
  iter._Ptr = (std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *)7;
  do
  {
    v146 = Font::Get(MAIN_MENU);
    v147 = PgWinText::CreateWin(
             uiLeft - v10,
             (int)pkTextWin + uiTop,
             uiWidth,
             uiHeight,
             v146,
             (PgWin *)&v2->vfptr,
             0,
             0);
    pCIItem->nItemType = (int)v147;
    v147->vfptr[122].__vecDelDtor((NiRefObject *)v147, 0);
    (*(void (__stdcall **)(struct ShopInvWin *(__cdecl **)(int, int, unsigned int, PgWin *)))(*(_DWORD *)pCIItem->nItemType
                                                                                            + 472))(&off_9AD682);
    (*(void (__stdcall **)(_DWORD))(*(_DWORD *)pCIItem->nItemType + 240))(0);
    result.first._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)pCIItem->nItemType;
    v148 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, (std::pair<int const ,int> *)&result);
    std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
      (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
      &v261,
      v148,
      0);
    pCIItem = (SLWCreateInfo::Item *)((char *)pCIItem + 4);
    pkTextWin = (PgWinText *)((char *)pkTextWin + _Val.second);
    --iter._Ptr;
  }
  while ( iter._Ptr );
  v149 = Font::Get(MAIN_MENU);
  v150 = PgWinText::CreateWin(
           uiLeft - v10 + 190,
           uiTop - iOffY + 17,
           uiWidth,
           uiHeight,
           v149,
           (PgWin *)&v2->vfptr,
           0,
           0);
  v2->m_pkGuildToken = v150;
  v150->vfptr[122].__vecDelDtor((NiRefObject *)v150, 4u);
  ((void (__stdcall *)(signed int))v2->m_pkGuildToken->vfptr[118].__vecDelDtor)(10147459);
  ((void (__stdcall *)(_DWORD))v2->m_pkGuildToken->vfptr[60].__vecDelDtor)(0);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Text02", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v151 = Font::Get(MAIN_MENU);
    v152 = PgWinText::CreateWin(uiLeft - v10, uiTop - iOffY, uiWidth, uiHeight, v151, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkNextJoinTime = v152;
    v152->vfptr[122].__vecDelDtor((NiRefObject *)v152, 5u);
    ((void (__stdcall *)(void *))v2->m_pkNextJoinTime->vfptr[118].__vecDelDtor)(&unk_9AD686);
    ((void (__stdcall *)(_DWORD))v2->m_pkNextJoinTime->vfptr[60].__vecDelDtor)(0);
    result.first._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v2->m_pkNextJoinTime;
    *(_DWORD *)&result.second = 0;
    v153 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, (std::pair<int const ,int> *)&result);
    std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
      (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
      &v261,
      v153,
      0);
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
    pCIItem = (SLWCreateInfo::Item *)PgWinBut::CreateWin(
                                       uiLeft - v10,
                                       uiTop - iOffY,
                                       (PgSprData *)pkTextWin,
                                       (PgWin *)&v2->vfptr,
                                       0xCu,
                                       0,
                                       0);
    pCIItem[2].vecNodeName._Myend = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)g_pkToolTipWin;
    v154 = (char *)TextData2::Get(0xF12C3535);
    PgWin::SetToolTipWinText((PgWin *)pCIItem, v154);
    v155 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
    v156 = *(std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node **)(v155 + 20);
    _Val.second = *(_DWORD *)(v155 + 24);
    iter._Ptr = v156;
    v157 = Font::Get(MAIN_MENU);
    v158 = PgWinText::CreateWin(
             uiLeft - v10,
             uiTop - iOffY + 1,
             (unsigned int)iter._Ptr,
             _Val.second,
             v157,
             (PgWin *)&v2->vfptr,
             0,
             0);
    v159 = v158->vfptr;
    pkTextWin = v158;
    v159[122].__vecDelDtor((NiRefObject *)v158, 5u);
    _Val.second = (int)&pkTextWin->vfptr[118];
    v160 = TextData::Get(0xC9253B46);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))_Val.second)(pkTextWin, v160);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Over");
    PgWinBut::CreateWin(uiLeft - v10, uiTop - iOffY, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x21u, 0, 0);
    v161 = pkTextWin->m_kWorldBound.m_kCenter.x;
    v162 = *(std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node **)(*(_DWORD *)LODWORD(v161) + 20);
    _Val.second = *(_DWORD *)(*(_DWORD *)LODWORD(v161) + 24);
    iter._Ptr = v162;
    v163 = Font::Get(MAIN_MENU);
    v164 = PgWinText::CreateWin(
             uiLeft - v10,
             uiTop - iOffY + 1,
             (unsigned int)iter._Ptr,
             _Val.second,
             v163,
             (PgWin *)&v2->vfptr,
             0,
             0);
    v2->m_pkInfoType = v164;
    v164->vfptr[122].__vecDelDtor((NiRefObject *)v164, 5u);
    _Val.second = (int)&v2->m_pkInfoType->vfptr[118];
    v165 = TextData::Get(0x2D8F829Fu);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))_Val.second)(v2->m_pkInfoType, v165);
    ((void (__stdcall *)(_DWORD))v2->m_pkInfoType->vfptr[60].__vecDelDtor)(0);
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Over");
    PgWinBut::CreateWin(uiLeft - v10, uiTop - iOffY, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xEu, 0, 0);
    v166 = pkTextWin->m_kWorldBound.m_kCenter.x;
    v167 = *(std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node **)(*(_DWORD *)LODWORD(v166) + 20);
    _Val.second = *(_DWORD *)(*(_DWORD *)LODWORD(v166) + 24);
    iter._Ptr = v167;
    v168 = Font::Get(MAIN_MENU);
    v169 = PgWinText::CreateWin(
             uiLeft - v10,
             uiTop - iOffY + 1,
             (unsigned int)iter._Ptr,
             _Val.second,
             v168,
             (PgWin *)&v2->vfptr,
             0,
             0);
    v2->m_pkShowOnlineOnly = v169;
    v169->vfptr[122].__vecDelDtor((NiRefObject *)v169, 5u);
    _Val.second = (int)&v2->m_pkShowOnlineOnly->vfptr[118];
    v170 = TextData::Get(0x848289E8);
    (*(void (__thiscall **)(_DWORD, _DWORD))_Val.second)(v2->m_pkShowOnlineOnly, v170);
    ((void (__stdcall *)(_DWORD))v2->m_pkShowOnlineOnly->vfptr[60].__vecDelDtor)(0);
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn05Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn05Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn05Over");
    v171 = PgWinBut::CreateWin(uiLeft - v10, uiTop - iOffY, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x1Au, 0, 0);
    v172 = pkTextWin;
    v2->m_pkEditNoticeBtn = v171;
    v173 = *(_DWORD *)LODWORD(v172->m_kWorldBound.m_kCenter.x);
    v174 = *(_DWORD *)(v173 + 24);
    v175 = *(std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node **)(v173 + 20);
    v176 = (PgWin *)v171;
    _Val.second = v174;
    iter._Ptr = v175;
    v177 = Font::Get(MAIN_MENU);
    v178 = PgWinText::CreateWin(0, 0, (unsigned int)iter._Ptr, _Val.second, v177, v176, 0, 0);
    v179 = v178->vfptr;
    pkTextWin = v178;
    v179[122].__vecDelDtor((NiRefObject *)v178, 5u);
    _Val.second = (int)&pkTextWin->vfptr[118];
    v180 = TextData::Get(0x92D1BCF5);
    (*(void (__thiscall **)(_DWORD, _DWORD))_Val.second)(pkTextWin, v180);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkEditNoticeBtn->vfptr[64].__vecDelDtor)(0);
    result.first._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v2->m_pkEditNoticeBtn;
    *(_DWORD *)&result.second = 0;
    v181 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, (std::pair<int const ,int> *)&result);
    std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
      (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
      &v261,
      v181,
      0);
    v182 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Base", &uiLeft, &uiTop, 0);
    v183 = iOffY;
    PgWinSpr::CreateWin(uiLeft - v10, uiTop - iOffY, v182, (PgWin *)&v2->vfptr, 0, 0);
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "FriendNor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "FriendClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "FriendOver");
    pCIItem = (SLWCreateInfo::Item *)PgWinBut::CreateWin(
                                       uiLeft - v10,
                                       uiTop - v183,
                                       (PgSprData *)pkTextWin,
                                       (PgWin *)&v2->vfptr,
                                       0x1Bu,
                                       0,
                                       0);
    v184 = (char *)TextData::Get(0xDCF3EDF4);
    PgWin::SetToolTipWinText((PgWin *)pCIItem, v184);
    pCIItem[2].vecNodeName._Myend = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)g_pkToolTipWin;
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MasterNor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "MasterClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "MasterOver");
    pCIItem = (SLWCreateInfo::Item *)PgWinBut::CreateWin(
                                       uiLeft - v10,
                                       uiTop - v183,
                                       (PgSprData *)pkTextWin,
                                       (PgWin *)&v2->vfptr,
                                       0x1Eu,
                                       0,
                                       0);
    v185 = (char *)TextData::Get(0xF44C3A3C);
    PgWin::SetToolTipWinText((PgWin *)pCIItem, v185);
    pCIItem[2].vecNodeName._Myend = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)g_pkToolTipWin;
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GuildNor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GuildClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GuildOver");
    pCIItem = (SLWCreateInfo::Item *)PgWinBut::CreateWin(
                                       uiLeft - v10,
                                       uiTop - v183,
                                       (PgSprData *)pkTextWin,
                                       (PgWin *)&v2->vfptr,
                                       0xAu,
                                       0,
                                       0);
    v186 = (char *)TextData::Get(0x9BEAF4F4);
    PgWin::SetToolTipWinText((PgWin *)pCIItem, v186);
    pCIItem[2].vecNodeName._Myend = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)g_pkToolTipWin;
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "GuildAcademyNor",
                               &uiLeft,
                               &uiTop,
                               0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GuildAcademyClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GuildAcademyOver");
    pCIItem = (SLWCreateInfo::Item *)PgWinBut::CreateWin(
                                       uiLeft - v10,
                                       uiTop - v183,
                                       (PgSprData *)pkTextWin,
                                       (PgWin *)&v2->vfptr,
                                       0x1Fu,
                                       0,
                                       0);
    v187 = (char *)TextData::Get(0x253B184Cu);
    PgWin::SetToolTipWinText((PgWin *)pCIItem, v187);
    pCIItem[2].vecNodeName._Myend = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)g_pkToolTipWin;
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "WeddingNor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "WeddingClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "WeddingOver");
    pCIItem = (SLWCreateInfo::Item *)PgWinBut::CreateWin(
                                       uiLeft - v10,
                                       uiTop - v183,
                                       (PgSprData *)pkTextWin,
                                       (PgWin *)&v2->vfptr,
                                       0x1Du,
                                       0,
                                       0);
    v188 = (char *)TextData::Get(0xC8F53F44);
    PgWin::SetToolTipWinText((PgWin *)pCIItem, v188);
    pCIItem[2].vecNodeName._Myend = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)g_pkToolTipWin;
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "PartyMatchNor",
                               &uiLeft,
                               &uiTop,
                               0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "PartyMatchClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "PartyMatchOver");
    pCIItem = (SLWCreateInfo::Item *)PgWinBut::CreateWin(
                                       uiLeft - v10,
                                       uiTop - v183,
                                       (PgSprData *)pkTextWin,
                                       (PgWin *)&v2->vfptr,
                                       0x1Cu,
                                       0,
                                       0);
    v189 = (char *)TextData::Get(0x1C4B503Eu);
    PgWin::SetToolTipWinText((PgWin *)pCIItem, v189);
    pCIItem[2].vecNodeName._Myend = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)g_pkToolTipWin;
    v190 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Friend", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
    v191 = (std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *)v190->m_uiWidth;
    _Val.second = v190->m_uiHeight;
    iter._Ptr = v191;
    v192 = Font::Get(TITLEBOLD);
    pkTextWin = PgWinText::CreateWin(
                  uiLeft,
                  uiTop,
                  (unsigned int)iter._Ptr,
                  _Val.second,
                  v192,
                  (PgWin *)&v2->vfptr,
                  0,
                  0);
    pkTextWin->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWin, 1u);
    _Val.second = (int)&pkTextWin->vfptr[118];
    v193 = TextData::Get(0xDCF3EDF4);
    (*(void (__thiscall **)(_DWORD, _DWORD))_Val.second)(pkTextWin, v193);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v194 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HolyPromise", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
    v195 = (std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *)v194->m_pObject->m_uiWidth;
    _Val.second = v194->m_pObject->m_uiHeight;
    iter._Ptr = v195;
    v196 = Font::Get(TITLEBOLD);
    v197 = PgWinText::CreateWin(uiLeft, uiTop, (unsigned int)iter._Ptr, _Val.second, v196, (PgWin *)&v2->vfptr, 0, 0);
    v198 = v197->vfptr;
    pkTextWin = v197;
    v198[122].__vecDelDtor((NiRefObject *)v197, 1u);
    _Val.second = (int)&pkTextWin->vfptr[118];
    v199 = TextData::Get(0xF44C3A3C);
    (*(void (__thiscall **)(_DWORD, _DWORD))_Val.second)(pkTextWin, v199);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v200 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Guild", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
    v201 = (std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *)v200->m_pObject->m_uiWidth;
    _Val.second = v200->m_pObject->m_uiHeight;
    iter._Ptr = v201;
    v202 = Font::Get(TITLEBOLD);
    v203 = PgWinText::CreateWin(uiLeft, uiTop, (unsigned int)iter._Ptr, _Val.second, v202, (PgWin *)&v2->vfptr, 0, 0);
    v204 = v203->vfptr;
    pkTextWin = v203;
    v204[122].__vecDelDtor((NiRefObject *)v203, 1u);
    _Val.second = (int)&pkTextWin->vfptr[118];
    v205 = TextData::Get(0x9BEAF4F4);
    (*(void (__thiscall **)(_DWORD, _DWORD))_Val.second)(pkTextWin, v205);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v206 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GuildAcademy", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
    v207 = (std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *)v206->m_pObject->m_uiWidth;
    _Val.second = v206->m_pObject->m_uiHeight;
    iter._Ptr = v207;
    v208 = Font::Get(TITLEBOLD);
    v209 = PgWinText::CreateWin(uiLeft, uiTop, (unsigned int)iter._Ptr, _Val.second, v208, (PgWin *)&v2->vfptr, 0, 0);
    v210 = v209->vfptr;
    pkTextWin = v209;
    v210[122].__vecDelDtor((NiRefObject *)v209, 1u);
    _Val.second = (int)&pkTextWin->vfptr[118];
    v211 = TextData::Get(0x253B184Cu);
    (*(void (__thiscall **)(_DWORD, _DWORD))_Val.second)(pkTextWin, v211);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v212 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Wedding", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
    v213 = (std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *)v212->m_pObject->m_uiWidth;
    _Val.second = v212->m_pObject->m_uiHeight;
    iter._Ptr = v213;
    v214 = Font::Get(TITLEBOLD);
    v215 = PgWinText::CreateWin(uiLeft, uiTop, (unsigned int)iter._Ptr, _Val.second, v214, (PgWin *)&v2->vfptr, 0, 0);
    v216 = v215->vfptr;
    pkTextWin = v215;
    v216[122].__vecDelDtor((NiRefObject *)v215, 1u);
    _Val.second = (int)&pkTextWin->vfptr[118];
    v217 = TextData::Get(0xC8F53F44);
    (*(void (__thiscall **)(_DWORD, _DWORD))_Val.second)(pkTextWin, v217);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v218 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PartyMatch", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
    v219 = (std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *)v218->m_pObject->m_uiWidth;
    _Val.second = v218->m_pObject->m_uiHeight;
    iter._Ptr = v219;
    v220 = Font::Get(TITLEBOLD);
    v221 = PgWinText::CreateWin(uiLeft, uiTop, (unsigned int)iter._Ptr, _Val.second, v220, (PgWin *)&v2->vfptr, 0, 0);
    v222 = v221->vfptr;
    pkTextWin = v221;
    v222[122].__vecDelDtor((NiRefObject *)v221, 1u);
    _Val.second = (int)&pkTextWin->vfptr[118];
    v223 = TextData::Get(0x1C4B503Eu);
    (*(void (__thiscall **)(_DWORD, _DWORD))_Val.second)(pkTextWin, v223);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v224 = MenuTexMgr::GetTexture(1u);
    v225 = PopupMenuWin::CreateWin(v224, 4u, 4u, 0);
    v2->m_pkGuildMemberPopupMenu = v225;
    ((void (__stdcall *)(IDirectMessengerVtbl **))v225->vfptr->SetMsgHooker)(&v2->vfptr);
    v226 = TextData::Get(0x39988592u);
    v227 = TextData::Get(0xE152929u);
    v228 = fs("%s %s", v227, v226);
    v229 = (NiD3DDefaultShader *)PopupMenuText::CreateWin(v228, 0, 0, 0, 0, 0, 0);
    v229[1].m_uiPassCount = 34;
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spPopupAppointMaster, v229);
    v230 = TextData::Get(0x39988592u);
    v231 = TextData::Get(0x6368886Bu);
    v232 = fs("%s %s", v231, v230);
    v233 = (NiD3DDefaultShader *)PopupMenuText::CreateWin(v232, 0, 0, 0, 0, 0, 0);
    v233[1].m_uiPassCount = 35;
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spPopupAppointSubMaster, v233);
    v234 = TextData::Get(0x39988592u);
    v235 = TextData::Get(0x12251E24u);
    v236 = fs("%s %s", v235, v234);
    v237 = (NiD3DDefaultShader *)PopupMenuText::CreateWin(v236, 0, 0, 0, 0, 0, 0);
    v237[1].m_uiPassCount = 37;
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spPopupAppointSenior, v237);
    v238 = TextData::Get(0x39988592u);
    v239 = TextData::Get(0x1D161C1Fu);
    v240 = fs("%s %s", v239, v238);
    v241 = (NiD3DDefaultShader *)PopupMenuText::CreateWin(v240, 0, 0, 0, 0, 0, 0);
    v241[1].m_uiPassCount = 38;
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spPopupAppointKnight, v241);
    v242 = TextData::Get(0x39988592u);
    v243 = TextData::Get(0x63A9B4C9u);
    v244 = fs("%s %s", v243, v242);
    v245 = (NiD3DDefaultShader *)PopupMenuText::CreateWin(v244, 0, 0, 0, 0, 0, 0);
    v245[1].m_uiPassCount = 39;
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spPopupFireAppointment, v245);
    v246 = (char *)TextData::Get(0x334270B1u);
    v247 = (NiD3DDefaultShader *)PopupMenuText::CreateWin(v246, 0, 0, 0, 0, 0, 0);
    v247[1].m_uiPassCount = 40;
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spPopupVanish, v247);
    v248 = (char *)TextData::Get(0xBEEF0012);
    v249 = (NiD3DDefaultShader *)PopupMenuText::CreateWin(v248, 0, 0, 0, 0, 0, 0);
    v249[1].m_uiPassCount = 41;
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spPopupWhisperChat, v249);
    v250 = (char *)TextData::Get(0xA204DA15);
    v251 = (NiD3DDefaultShader *)PopupMenuText::CreateWin(v250, 0, 0, 0, 0, 0, 0);
    v251[1].m_uiPassCount = 1011;
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spPopupAppointAcademyMaster, v251);
    v252 = (char *)TextData::Get(0x9FA0B5BA);
    v253 = (NiD3DDefaultShader *)PopupMenuText::CreateWin(v252, 0, 0, 0, 0, 0, 0);
    v253[1].m_uiPassCount = 1012;
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spPopupInitializeAcademyMaster, v253);
    v2->m_pkNoticeEditor = GuildNoticeEditorWin::CreateWin(0);
    ((void (__thiscall *)(GuildWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.40000001,
      0.5);
    v254 = &v2->map_WinIndex._Myhead->_Left;
    v255 = *v254;
    iter._Ptr = v255;
    if ( (std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node **)v255 != v254 )
    {
      do
      {
        v256 = v255->_Myval.first;
        if ( v256 )
          ((void (__stdcall *)(_DWORD))v256->vfptr[64].__vecDelDtor)(0);
        std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const,int>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&iter);
        v255 = iter._Ptr;
      }
      while ( iter._Ptr != v2->map_WinIndex._Myhead );
    }
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "GuildEmblemDis",
                               &uiLeft,
                               &uiTop,
                               0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GuildEmblemActive");
    v257 = ColumnBut::CreateWin(uiLeft - v10, uiTop - v183, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x29u, 0);
    v258 = spNode.m_pObject;
    v2->m_pkEmblemCheckBox = v257;
    PgSprData::Create((NiAVObject *)&v258->vfptr, "GuildEmblem", &uiLeft, &uiTop, 0);
    v259 = GuildEmblemIcon::CreateWin(uiLeft - v10, uiTop - v183, 0, (PgWin *)&v2->vfptr, v262, 0x40u, 0x40u);
    v2->m_pkEmblemIcon = v259;
    v259->vfptr[64].__vecDelDtor((NiRefObject *)v259, 0);
    ((void (__stdcall *)(_DWORD))v2->m_pkEmblemIcon->vfptr[60].__vecDelDtor)(0);
    v2->m_pkEmblemIcon->m_eType = 1;
    ((void (__stdcall *)(signed int))v2->m_pkEmblemIcon->vfptr[129].__vecDelDtor)(41);
    v2->m_pkEmblemCheckBox->m_pkToolTipWin = g_pkToolTipWin;
    ((void (__stdcall *)(_DWORD))v2->m_pkEmblemCheckBox->vfptr[64].__vecDelDtor)(0);
    v2->m_pkEmblemCheckBox->vfptr[60].__vecDelDtor((NiRefObject *)v2->m_pkEmblemCheckBox, 0);
    LOBYTE(v276) = 0;
    SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
    v276 = -1;
    if ( spNode.m_pObject )
    {
      v260 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v260 )
          v260->vfptr->__vecDelDtor((NiRefObject *)v260, 1u);
      }
    }
    v8 = 1;
  }
  else
  {
LABEL_67:
    LOBYTE(v276) = 0;
    SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
    v276 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    v8 = 0;
  }
  return v8;
}
// 9AD682: using guessed type struct ShopInvWin *(__cdecl *off_9AD682)(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent);
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005CCD00) --------------------------------------------------------
ATL::ATLSTRINGRESOURCEIMAGE *__cdecl ATL::_AtlGetStringResourceImage(HINSTANCE__ *hInstance, HRSRC__ *hResource, unsigned int id)
{
  ATL::ATLSTRINGRESOURCEIMAGE *result; // eax@1
  char *v4; // esi@2
  DWORD v5; // eax@3
  unsigned int v6; // ecx@3

  result = (ATL::ATLSTRINGRESOURCEIMAGE *)LoadResource(hInstance, hResource);
  if ( result )
  {
    v4 = (char *)LockResource(result);
    if ( !v4 )
      return 0;
    v5 = (DWORD)&v4[SizeofResource(hInstance, hResource)];
    v6 = id & 0xF;
    if ( id & 0xF )
    {
      while ( (unsigned int)v4 < v5 )
      {
        --v6;
        v4 += 2 * *(_WORD *)v4 + 2;
        if ( !v6 )
          goto LABEL_6;
      }
      return 0;
    }
LABEL_6:
    if ( (unsigned int)v4 >= v5 )
      return 0;
    result = (ATL::ATLSTRINGRESOURCEIMAGE *)(*(_WORD *)v4 != 0 ? (unsigned int)v4 : 0);
  }
  return result;
}

//----- (005CCD70) --------------------------------------------------------
HINSTANCE__ *__cdecl ATL::AtlFindStringResourceInstance(unsigned int nID, unsigned __int16 wLanguage)
{
  ATL::ATLSTRINGRESOURCEIMAGE *v2; // edi@1
  HINSTANCE__ *v3; // esi@1
  HRSRC v4; // eax@3
  HINSTANCE__ *v5; // eax@5
  signed int i; // [sp+Ch] [bp-4h]@1

  v2 = 0;
  v3 = ATL::CAtlBaseModule::GetHInstanceAt(&ATL::_AtlBaseModule, 0);
  i = 1;
  if ( v3 )
  {
    while ( !v2 )
    {
      v4 = FindResourceExW(v3, (LPCWSTR)6, (LPCWSTR)(unsigned __int16)((nID >> 4) + 1), wLanguage);
      if ( v4 )
      {
        v2 = ATL::_AtlGetStringResourceImage(v3, v4, nID);
        if ( v2 )
          return v3;
      }
      v5 = ATL::CAtlBaseModule::GetHInstanceAt(&ATL::_AtlBaseModule, i++);
      v3 = v5;
      if ( !v5 )
        return 0;
    }
  }
  return 0;
}

//----- (005CCDF0) --------------------------------------------------------
void __noreturn ATL::CSimpleStringT<char,0>::ThrowMemoryException()
{
  ATL::AtlThrowImpl(-2147024882);
}

//----- (005CCE00) --------------------------------------------------------
void __thiscall ATL::CSimpleStringT<char,0>::Fork(ATL::CSimpleStringT<char,0> *this, int nLength)
{
  int v2; // ebx@1
  char *v3; // esi@1
  int (__thiscall ***v4)(_DWORD, _DWORD, _DWORD); // eax@1
  int v5; // edi@1
  int v6; // eax@3
  ATL::CSimpleStringT<char,0> *v7; // [sp+Ch] [bp-4h]@1

  v2 = *((_DWORD *)this->m_pszData - 3);
  v3 = this->m_pszData - 16;
  v7 = this;
  v4 = (int (__thiscall ***)(_DWORD, _DWORD, _DWORD))(*(int (**)(void))(**(_DWORD **)v3 + 16))();
  v5 = (**v4)(v4, nLength, 1);
  if ( !v5 )
    ATL::CSimpleStringT<char,0>::ThrowMemoryException();
  v6 = nLength;
  if ( v2 < nLength )
    v6 = v2;
  memcpy_s((void *)(v5 + 16), v6 + 1, v3 + 16, v6 + 1);
  *(_DWORD *)(v5 + 4) = v2;
  if ( _InterlockedDecrement((volatile signed __int32 *)v3 + 3) <= 0 )
    (*(void (__stdcall **)(char *))(**(_DWORD **)v3 + 4))(v3);
  v7->m_pszData = (char *)(v5 + 16);
}

//----- (005CCE80) --------------------------------------------------------
void __thiscall ATL::CSimpleStringT<char,0>::Reallocate(ATL::CSimpleStringT<char,0> *this, int nLength)
{
  ATL::CSimpleStringT<char,0> *v2; // esi@1
  char *v3; // eax@1
  int v4; // ecx@1
  int v5; // eax@1
  int v6; // eax@3

  v2 = this;
  v3 = this->m_pszData;
  v4 = *((_DWORD *)this->m_pszData - 4);
  v5 = (int)(v3 - 16);
  if ( *(_DWORD *)(v5 + 8) >= nLength
    || nLength <= 0
    || (v6 = (*(int (__stdcall **)(int, int, signed int))(*(_DWORD *)v4 + 8))(v5, nLength, 1)) == 0 )
  {
    ATL::CSimpleStringT<char,0>::ThrowMemoryException();
  }
  v2->m_pszData = (char *)(v6 + 16);
}

//----- (005CCEC0) --------------------------------------------------------
void __thiscall ATL::CSimpleStringT<char,0>::Empty(ATL::CSimpleStringT<char,0> *this)
{
  ATL::CSimpleStringT<char,0> *v1; // esi@1
  char *v2; // ecx@1
  int v3; // eax@1
  int v4; // edi@1

  v1 = this;
  v2 = this->m_pszData;
  v3 = (int)(v2 - 16);
  v4 = *((_DWORD *)v2 - 4);
  if ( *((_DWORD *)v2 - 3) )
  {
    if ( *(_DWORD *)(v3 + 12) >= 0 )
    {
      if ( _InterlockedDecrement((volatile signed __int32 *)(v3 + 12)) <= 0 )
        (*(void (__stdcall **)(int))(**(_DWORD **)v3 + 4))(v3);
      v1->m_pszData = (char *)((*(int (__thiscall **)(int))(*(_DWORD *)v4 + 12))(v4) + 16);
    }
    else
    {
      if ( *((_DWORD *)v2 - 2) < 0 )
        ATL::AtlThrowImpl(-2147024809);
      *((_DWORD *)v2 - 3) = 0;
      *v1->m_pszData = 0;
    }
  }
}

//----- (005CCF20) --------------------------------------------------------
void __thiscall ATL::CSimpleStringT<char,0>::PrepareWrite2(ATL::CSimpleStringT<char,0> *this, int nLength)
{
  char *v2; // eax@1
  int v3; // edi@1
  signed int v4; // eax@5
  int v5; // esi@7

  v2 = this->m_pszData;
  v3 = nLength;
  if ( *((_DWORD *)this->m_pszData - 3) > nLength )
    v3 = *((_DWORD *)this->m_pszData - 3);
  if ( *((_DWORD *)v2 - 1) <= 1 )
  {
    v4 = *((_DWORD *)v2 - 2);
    if ( v4 < v3 )
    {
      if ( v4 <= 0x40000000 )
        v5 = v4 / 2 + v4;
      else
        v5 = v4 + 0x100000;
      if ( v5 < v3 )
        v5 = v3;
      ATL::CSimpleStringT<char,0>::Reallocate(this, v5);
    }
  }
  else
  {
    ATL::CSimpleStringT<char,0>::Fork(this, v3);
  }
}

//----- (005CCF80) --------------------------------------------------------
char *__cdecl Guild::GetMemberGradeString(char grade)
{
  char *result; // eax@2

  switch ( grade )
  {
    case 0:
      result = (char *)TextData::Get(0xE152929u);
      break;
    case 1:
      result = (char *)TextData::Get(0x6368886Bu);
      break;
    case 2:
      result = (char *)TextData::Get(0xD08FF05u);
      break;
    case 3:
      result = (char *)TextData::Get(0x12251E24u);
      break;
    case 4:
      result = (char *)TextData::Get(0x1D161C1Fu);
      break;
    case 6:
      result = (char *)TextData::Get(0x63A9B4C9u);
      break;
    default:
      result = "default";
      break;
  }
  return result;
}

//----- (005CD010) --------------------------------------------------------
void __thiscall ATL::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char>>>::~CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char>>>(ATL::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char> > > *this)
{
  char *v1; // eax@1

  v1 = this->m_pszData - 16;
  if ( _InterlockedDecrement((volatile signed __int32 *)v1 + 3) <= 0 )
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v1 + 4))(v1);
}

//----- (005CD030) --------------------------------------------------------
void __thiscall ATL::CSimpleStringT<char,0>::SetString(ATL::CSimpleStringT<char,0> *this, const char *pszSrc, int nLength)
{
  int v3; // esi@1
  ATL::CSimpleStringT<char,0> *v4; // ebx@1
  const char *v5; // ecx@3
  const char *v6; // edi@5
  char *v7; // eax@9
  unsigned int nOldLength; // [sp+14h] [bp+Ch]@5

  v3 = nLength;
  v4 = this;
  if ( nLength )
  {
    v5 = pszSrc;
    if ( !pszSrc )
      goto LABEL_16;
    v6 = (const char *)(pszSrc - v4->m_pszData);
    nOldLength = *((_DWORD *)v4->m_pszData - 3);
    if ( v3 < 0 )
      ATL::AtlThrowImpl(-2147024809);
    if ( ((*((_DWORD *)v4->m_pszData - 2) - v3) | (1 - *((_DWORD *)v4->m_pszData - 1))) < 0 )
    {
      ATL::CSimpleStringT<char,0>::PrepareWrite2(v4, v3);
      v5 = pszSrc;
    }
    v7 = v4->m_pszData;
    if ( (unsigned int)v6 > nOldLength )
      memcpy_s(v7, *((_DWORD *)v7 - 2), v5, v3);
    else
      memmove_s(v7, *((_DWORD *)v7 - 2), &v6[(_DWORD)v7], v3);
    if ( v3 > *((_DWORD *)v4->m_pszData - 2) )
LABEL_16:
      ATL::AtlThrowImpl(-2147024809);
    *((_DWORD *)v4->m_pszData - 3) = v3;
    v4->m_pszData[v3] = 0;
  }
  else
  {
    ATL::CSimpleStringT<char,0>::Empty(this);
  }
}

//----- (005CD0D0) --------------------------------------------------------
int __thiscall ATL::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char>>>::LoadStringA(ATL::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char> > > *this, HINSTANCE__ *hInstance, unsigned int nID)
{
  ATL::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char> > > *v3; // ebx@1
  HRSRC v4; // eax@1
  ATL::ATLSTRINGRESOURCEIMAGE *v5; // eax@2
  ATL::ATLSTRINGRESOURCEIMAGE *v6; // edi@2
  int result; // eax@3
  int v8; // eax@4
  int v9; // esi@4

  v3 = this;
  v4 = FindResourceW(hInstance, (LPCWSTR)(unsigned __int16)((nID >> 4) + 1), (LPCWSTR)6);
  if ( v4 && (v5 = ATL::_AtlGetStringResourceImage(hInstance, v4, nID), (v6 = v5) != 0) )
  {
    v8 = WideCharToMultiByte(3u, 0, &v5[1].nLength, v5->nLength, 0, 0, 0, 0);
    v9 = v8;
    if ( v8 < 0 )
      goto LABEL_12;
    if ( ((*((_DWORD *)v3->m_pszData - 2) - v8) | (1 - *((_DWORD *)v3->m_pszData - 1))) < 0 )
      ATL::CSimpleStringT<char,0>::PrepareWrite2((ATL::CSimpleStringT<char,0> *)&v3->m_pszData, v8);
    WideCharToMultiByte(3u, 0, &v6[1].nLength, v6->nLength, v3->m_pszData, v9, 0, 0);
    if ( v9 > *((_DWORD *)v3->m_pszData - 2) )
LABEL_12:
      ATL::AtlThrowImpl(-2147024809);
    *((_DWORD *)v3->m_pszData - 3) = v9;
    v3->m_pszData[v9] = 0;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (005CD190) --------------------------------------------------------
GuildMemberVanishTask *__thiscall GuildMemberVanishTask::`vector deleting destructor'(GuildMemberVanishTask *this, unsigned int a2)
{
  GuildMemberVanishTask *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ISingletonTask<GuildMemberVanishTask>::`vftable'{for `NiRefObject'};
  this->vfptr = (IDirectMessengerVtbl *)&ISingletonTask<GuildMemberVanishTask>::`vftable'{for `IDirectMessenger'};
  ISingletonTask<GuildMemberVanishTask>::ms_pkSingletonTask = 0;
  ITask::~ITask((ITask *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9ADE6C: using guessed type void (__thiscall *ISingletonTask<GuildMemberVanishTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9ADE88: using guessed type int (__thiscall *ISingletonTask<GuildMemberVanishTask>::`vftable'{for `NiRefObject'})(void *p, char);
// A8E17C: using guessed type int ISingletonTask<GuildMemberVanishTask>::ms_pkSingletonTask;

//----- (005CD1D0) --------------------------------------------------------
GuildAcademyMasterAppointTask *__thiscall ISingletonTask<GuildAcademyMasterAppointTask>::`scalar deleting destructor'(GuildAcademyMasterAppointTask *this, unsigned int a2)
{
  GuildAcademyMasterAppointTask *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ISingletonTask<GuildAcademyMasterAppointTask>::`vftable'{for `NiRefObject'};
  this->vfptr = (IDirectMessengerVtbl *)&ISingletonTask<GuildAcademyMasterAppointTask>::`vftable'{for `IDirectMessenger'};
  ISingletonTask<GuildAcademyMasterAppointTask>::ms_pkSingletonTask = 0;
  ITask::~ITask((ITask *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9ADED4: using guessed type void (__thiscall *ISingletonTask<GuildAcademyMasterAppointTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9ADEF0: using guessed type int (__thiscall *ISingletonTask<GuildAcademyMasterAppointTask>::`vftable'{for `NiRefObject'})(void *p, char);
// A8E184: using guessed type int ISingletonTask<GuildAcademyMasterAppointTask>::ms_pkSingletonTask;

//----- (005CD210) --------------------------------------------------------
GuildAcademyMasterInitializeTask *__thiscall ISingletonTask<GuildAcademyMasterInitializeTask>::`scalar deleting destructor'(GuildAcademyMasterInitializeTask *this, unsigned int a2)
{
  GuildAcademyMasterInitializeTask *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ISingletonTask<GuildAcademyMasterInitializeTask>::`vftable'{for `NiRefObject'};
  this->vfptr = (IDirectMessengerVtbl *)&ISingletonTask<GuildAcademyMasterInitializeTask>::`vftable'{for `IDirectMessenger'};
  ISingletonTask<GuildAcademyMasterInitializeTask>::ms_pkSingletonTask = 0;
  ITask::~ITask((ITask *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9ADF08: using guessed type void (__thiscall *ISingletonTask<GuildAcademyMasterInitializeTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9ADF24: using guessed type int (__thiscall *ISingletonTask<GuildAcademyMasterInitializeTask>::`vftable'{for `NiRefObject'})(void *p, char);
// A8E188: using guessed type int ISingletonTask<GuildAcademyMasterInitializeTask>::ms_pkSingletonTask;

//----- (005CD250) --------------------------------------------------------
GuildMemberVanishTask *__cdecl ISingletonTask<GuildMemberVanishTask>::Run()
{
  GuildMemberVanishTask *result; // eax@1
  ITask *v1; // eax@2
  GuildMemberVanishTask *v2; // esi@2

  result = (GuildMemberVanishTask *)ISingletonTask<GuildMemberVanishTask>::ms_pkSingletonTask;
  if ( !ISingletonTask<GuildMemberVanishTask>::ms_pkSingletonTask )
  {
    v1 = (ITask *)operator new(0x5Cu);
    v2 = (GuildMemberVanishTask *)v1;
    if ( v1 )
    {
      ITask::ITask(v1, 0);
      v2->vfptr = (NiRefObjectVtbl *)&GuildMemberVanishTask::`vftable'{for `NiRefObject'};
      v2->vfptr = (IDirectMessengerVtbl *)&GuildMemberVanishTask::`vftable'{for `IDirectMessenger'};
      v2->m_kTargetName.n5_code[4] = 0;
      v2->m_kTargetName.n5_code[3] = 0;
      v2->m_kTargetName.n5_code[2] = 0;
      v2->m_kTargetName.n5_code[1] = 0;
      v2->m_kTargetName.n5_code[0] = 0;
    }
    else
    {
      v2 = 0;
    }
    result = v2;
    ISingletonTask<GuildMemberVanishTask>::ms_pkSingletonTask = (int)v2;
  }
  return result;
}
// 9ADF3C: using guessed type void (__thiscall *GuildMemberVanishTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9ADF58: using guessed type int (__thiscall *GuildMemberVanishTask::`vftable'{for `NiRefObject'})(void *p, char);
// A8E17C: using guessed type int ISingletonTask<GuildMemberVanishTask>::ms_pkSingletonTask;

//----- (005CD2E0) --------------------------------------------------------
GuildMemberGradeSetupTask *__cdecl ISingletonTask<GuildMemberGradeSetupTask>::Run()
{
  GuildMemberGradeSetupTask *result; // eax@1
  ITask *v1; // eax@2
  GuildMemberGradeSetupTask *v2; // esi@2

  result = (GuildMemberGradeSetupTask *)ISingletonTask<GuildMemberGradeSetupTask>::ms_pkSingletonTask;
  if ( !ISingletonTask<GuildMemberGradeSetupTask>::ms_pkSingletonTask )
  {
    v1 = (ITask *)operator new(0x60u);
    v2 = (GuildMemberGradeSetupTask *)v1;
    if ( v1 )
    {
      ITask::ITask(v1, 0);
      v2->vfptr = (NiRefObjectVtbl *)&GuildMemberGradeSetupTask::`vftable'{for `NiRefObject'};
      v2->vfptr = (IDirectMessengerVtbl *)&GuildMemberGradeSetupTask::`vftable'{for `IDirectMessenger'};
      v2->m_kTargetName.n5_code[4] = 0;
      v2->m_kTargetName.n5_code[3] = 0;
      v2->m_kTargetName.n5_code[2] = 0;
      v2->m_kTargetName.n5_code[1] = 0;
      v2->m_kTargetName.n5_code[0] = 0;
    }
    else
    {
      v2 = 0;
    }
    result = v2;
    ISingletonTask<GuildMemberGradeSetupTask>::ms_pkSingletonTask = (int)v2;
  }
  return result;
}
// 9ADF70: using guessed type void (__thiscall *GuildMemberGradeSetupTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9ADF8C: using guessed type int (__thiscall *GuildMemberGradeSetupTask::`vftable'{for `NiRefObject'})(void *p, char);
// A8E180: using guessed type int ISingletonTask<GuildMemberGradeSetupTask>::ms_pkSingletonTask;

//----- (005CD370) --------------------------------------------------------
GuildAcademyMasterAppointTask *__cdecl ISingletonTask<GuildAcademyMasterAppointTask>::Run()
{
  GuildAcademyMasterAppointTask *result; // eax@1
  ITask *v1; // eax@2
  GuildAcademyMasterAppointTask *v2; // esi@2

  result = (GuildAcademyMasterAppointTask *)ISingletonTask<GuildAcademyMasterAppointTask>::ms_pkSingletonTask;
  if ( !ISingletonTask<GuildAcademyMasterAppointTask>::ms_pkSingletonTask )
  {
    v1 = (ITask *)operator new(0x5Cu);
    v2 = (GuildAcademyMasterAppointTask *)v1;
    if ( v1 )
    {
      ITask::ITask(v1, 0);
      v2->vfptr = (NiRefObjectVtbl *)&GuildAcademyMasterAppointTask::`vftable'{for `NiRefObject'};
      v2->vfptr = (IDirectMessengerVtbl *)&GuildAcademyMasterAppointTask::`vftable'{for `IDirectMessenger'};
      v2->m_kTargetName.n5_code[4] = 0;
      v2->m_kTargetName.n5_code[3] = 0;
      v2->m_kTargetName.n5_code[2] = 0;
      v2->m_kTargetName.n5_code[1] = 0;
      v2->m_kTargetName.n5_code[0] = 0;
    }
    else
    {
      v2 = 0;
    }
    result = v2;
    ISingletonTask<GuildAcademyMasterAppointTask>::ms_pkSingletonTask = (int)v2;
  }
  return result;
}
// 9ADFA4: using guessed type void (__thiscall *GuildAcademyMasterAppointTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9ADFC0: using guessed type int (__thiscall *GuildAcademyMasterAppointTask::`vftable'{for `NiRefObject'})(void *p, char);
// A8E184: using guessed type int ISingletonTask<GuildAcademyMasterAppointTask>::ms_pkSingletonTask;

//----- (005CD400) --------------------------------------------------------
GuildAcademyMasterInitializeTask *__cdecl ISingletonTask<GuildAcademyMasterInitializeTask>::Run()
{
  GuildAcademyMasterInitializeTask *result; // eax@1
  ITask *v1; // eax@2
  GuildAcademyMasterInitializeTask *v2; // esi@2

  result = (GuildAcademyMasterInitializeTask *)ISingletonTask<GuildAcademyMasterInitializeTask>::ms_pkSingletonTask;
  if ( !ISingletonTask<GuildAcademyMasterInitializeTask>::ms_pkSingletonTask )
  {
    v1 = (ITask *)operator new(0x5Cu);
    v2 = (GuildAcademyMasterInitializeTask *)v1;
    if ( v1 )
    {
      ITask::ITask(v1, 0);
      v2->vfptr = (NiRefObjectVtbl *)&GuildAcademyMasterInitializeTask::`vftable'{for `NiRefObject'};
      v2->vfptr = (IDirectMessengerVtbl *)&GuildAcademyMasterInitializeTask::`vftable'{for `IDirectMessenger'};
      v2->m_kTargetName.n5_code[4] = 0;
      v2->m_kTargetName.n5_code[3] = 0;
      v2->m_kTargetName.n5_code[2] = 0;
      v2->m_kTargetName.n5_code[1] = 0;
      v2->m_kTargetName.n5_code[0] = 0;
    }
    else
    {
      v2 = 0;
    }
    result = v2;
    ISingletonTask<GuildAcademyMasterInitializeTask>::ms_pkSingletonTask = (int)v2;
  }
  return result;
}
// 9ADFD8: using guessed type void (__thiscall *GuildAcademyMasterInitializeTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9ADFF4: using guessed type int (__thiscall *GuildAcademyMasterInitializeTask::`vftable'{for `NiRefObject'})(void *p, char);
// A8E188: using guessed type int ISingletonTask<GuildAcademyMasterInitializeTask>::ms_pkSingletonTask;

//----- (005CD490) --------------------------------------------------------
void __thiscall ATL::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char>>>::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char>>>(ATL::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char> > > *this, const char *pszSrc)
{
  ATL::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char> > > *v2; // esi@1
  HINSTANCE__ *v3; // eax@3
  int v4; // eax@5

  v2 = this;
  this->m_pszData = (char *)((int)ATL::g_strmgr.vfptr->GetNilString((ATL::IAtlStringMgr *)&ATL::g_strmgr) + 16);
  if ( !pszSrc )
  {
    v4 = 0;
LABEL_7:
    ATL::CSimpleStringT<char,0>::SetString((ATL::CSimpleStringT<char,0> *)&v2->m_pszData, pszSrc, v4);
    return;
  }
  if ( (unsigned int)pszSrc & 0xFFFF0000 )
  {
    v4 = strlen(pszSrc);
    goto LABEL_7;
  }
  v3 = ATL::AtlFindStringResourceInstance((unsigned __int16)pszSrc, 0);
  if ( v3 )
    ATL::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char>>>::LoadStringA(v2, v3, (unsigned __int16)pszSrc);
}
// A844A8: using guessed type struct ATL::CAtlStringMgr ATL::g_strmgr;

//----- (005CD540) --------------------------------------------------------
GuildMemberGradeSetupTask *__thiscall ISingletonTask<GuildMemberGradeSetupTask>::`vector deleting destructor'(GuildMemberGradeSetupTask *this, unsigned int a2)
{
  GuildMemberGradeSetupTask *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ISingletonTask<GuildMemberGradeSetupTask>::`vftable'{for `NiRefObject'};
  this->vfptr = (IDirectMessengerVtbl *)&ISingletonTask<GuildMemberGradeSetupTask>::`vftable'{for `IDirectMessenger'};
  ISingletonTask<GuildMemberGradeSetupTask>::ms_pkSingletonTask = 0;
  ITask::~ITask((ITask *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9ADEA0: using guessed type void (__thiscall *ISingletonTask<GuildMemberGradeSetupTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9ADEBC: using guessed type int (__thiscall *ISingletonTask<GuildMemberGradeSetupTask>::`vftable'{for `NiRefObject'})(void *p, char);
// A8E180: using guessed type int ISingletonTask<GuildMemberGradeSetupTask>::ms_pkSingletonTask;

//----- (005CD580) --------------------------------------------------------
ATL::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char> > > *__thiscall ATL::CTime::Format(ATL::CTime *this, ATL::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char> > > *result, const char *pFormat)
{
  tm ptmTemp; // [sp+Ch] [bp-A8h]@3
  char szBuffer[128]; // [sp+30h] [bp-84h]@5

  if ( pFormat )
  {
    if ( _localtime64_s(&ptmTemp, &this->m_time) )
      ATL::AtlThrowImpl(-2147024809);
    if ( !strftime(szBuffer, 0x80u, pFormat, &ptmTemp) )
      szBuffer[0] = 0;
    ATL::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char>>>::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char>>>(
      result,
      szBuffer);
  }
  else
  {
    ATL::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char>>>::CStringT<char,ATL::StrTraitATL<char,ATL::ChTraitsCRT<char>>>(
      result,
      0);
  }
  return result;
}

//----- (005CD620) --------------------------------------------------------
GuildWin *__thiscall GuildWin::`scalar deleting destructor'(GuildWin *this, unsigned int a2)
{
  GuildWin *v2; // esi@1

  v2 = this;
  GuildWin::~GuildWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005CD650) --------------------------------------------------------
void __thiscall GTIFlagWin::GTIFlagWin(GTIFlagWin *this)
{
  GTIFlagWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GTIFlagWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GTIFlagWin::`vftable'{for `IDirectMessenger'};
}
// 9AE284: using guessed type void (__thiscall *GTIFlagWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AE2A4: using guessed type int (__thiscall *GTIFlagWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005CD670) --------------------------------------------------------
void __thiscall GTIFlagWin::~GTIFlagWin(GTIFlagWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GTIFlagWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GTIFlagWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9AE284: using guessed type void (__thiscall *GTIFlagWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AE2A4: using guessed type int (__thiscall *GTIFlagWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005CD6B0) --------------------------------------------------------
char __thiscall GTIFlagWin::Create(GTIFlagWin *this, PgFrameWork *pkFrameWork, unsigned int uiFlagType)
{
  GTIFlagWin *v3; // edi@1
  NiSourceTexture *v4; // eax@2
  NiSourceTexture *v5; // esi@4
  NiNode *v6; // esi@5
  bool v7; // zf@7
  NiTexturePalette *v9; // ebx@11
  const char *v10; // eax@13
  PgSprData *v11; // eax@14
  NiNode *v12; // esi@21
  int uiLeft; // [sp+18h] [bp-18h]@14
  int uiTop; // [sp+1Ch] [bp-14h]@14
  NiPointer<NiNode> spNode; // [sp+20h] [bp-10h]@1
  int v16; // [sp+2Ch] [bp-4h]@1

  v3 = this;
  spNode.m_pObject = 0;
  v16 = 0;
  if ( uiFlagType )
    v4 = MenuTexMgr::GetTexture(0x17u);
  else
    v4 = MenuTexMgr::GetTexture(0x16u);
  v5 = v4;
  if ( !v4 )
  {
    v6 = spNode.m_pObject;
    v16 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v7 = spNode.m_pObject == 0;
LABEL_8:
    if ( !v7 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    return 0;
  }
  v9 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v10 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildTFlag.nif");
  PgUtil::LoadNodeNifFile(v10, &spNode, v9);
  if ( !spNode.m_pObject )
    return 0;
  v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane01", &uiLeft, &uiTop, v5);
  if ( !PgWinFrame::Create((PgWinFrame *)&v3->vfptr, 0, 0, v11, 0, pkFrameWork, "GTIFlagWin", 0) )
  {
    v6 = spNode.m_pObject;
    v16 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v7 = v6 == 0;
    goto LABEL_8;
  }
  if ( uiFlagType )
    ((void (__thiscall *)(GTIFlagWin *, unsigned int, unsigned int, _DWORD, _DWORD))v3->vfptr[59].__vecDelDtor)(
      v3,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.69999999,
      0.15000001);
  else
    ((void (__thiscall *)(GTIFlagWin *, unsigned int, unsigned int, _DWORD, _DWORD))v3->vfptr[59].__vecDelDtor)(
      v3,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.69999999,
      0.25);
  v12 = spNode.m_pObject;
  v16 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v12 )
    v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005CD880) --------------------------------------------------------
GTIFlagWin *__cdecl GTIFlagWin::CreateWin(PgFrameWork *pkFrameWork, unsigned int uiFlagType)
{
  PgWin *v2; // eax@1
  PgWin *v3; // esi@1
  PgWin *v4; // edi@8
  GTIFlagWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v2 = (PgWin *)operator new(0x158u);
  v3 = v2;
  result.m_pObject = v2;
  v7 = 0;
  if ( v2 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v2);
    v3->vfptr = (NiRefObjectVtbl *)&GTIFlagWin::`vftable'{for `NiNode'};
    v3->vfptr = (IDirectMessengerVtbl *)&GTIFlagWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, PgFrameWork *, unsigned int))v3->vfptr[135].__vecDelDtor)(
                          v3,
                          pkFrameWork,
                          uiFlagType) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (GTIFlagWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}
// 9AE284: using guessed type void (__thiscall *GTIFlagWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AE2A4: using guessed type int (__thiscall *GTIFlagWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005CD9C0) --------------------------------------------------------
GTIFlagWin *__thiscall GTIFlagWin::`vector deleting destructor'(GTIFlagWin *this, unsigned int a2)
{
  GTIFlagWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GTIFlagWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GTIFlagWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9AE284: using guessed type void (__thiscall *GTIFlagWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AE2A4: using guessed type int (__thiscall *GTIFlagWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005CDA00) --------------------------------------------------------
void __thiscall GTInformWin::AddText(GTInformWin *this, char *pcText, D3DXCOLOR TextColor, bool bSingleLine, float fLifeTime)
{
  GTInformWin *v5; // ebx@1
  char *v6; // esi@3
  signed int v7; // edi@4
  signed int v8; // edi@7

  v5 = this;
  if ( 0.0 == fLifeTime )
    fLifeTime = 3.0;
  v6 = (char *)this->m_aspTextGeom;
  if ( bSingleLine )
  {
    v8 = 5;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v6 + 148))(&unk_9AE4C4);
      PgFadeTextGeometry::SetLifeTime(*(PgFadeTextGeometry **)v6, -1.0);
      v6 += 4;
      --v8;
    }
    while ( v8 );
  }
  else
  {
    v7 = 4;
    do
    {
      PgFadeTextGeometry::CopyFrom(*(PgFadeTextGeometry **)v6, *((PgFadeTextGeometry **)v6 + 1));
      v6 += 4;
      --v7;
    }
    while ( v7 );
  }
  ((void (__stdcall *)(_DWORD))v5->m_aspTextGeom[4].m_pObject->vfptr[44].__vecDelDtor)(&TextColor);
  ((void (__stdcall *)(_DWORD))v5->m_aspTextGeom[4].m_pObject->vfptr[37].__vecDelDtor)(pcText);
  PgFadeTextGeometry::SetLifeTime(v5->m_aspTextGeom[4].m_pObject, fLifeTime);
}

//----- (005CDAC0) --------------------------------------------------------
void __thiscall GTInformWin::AddText(GTInformWin *this, unsigned int uiMaxViewLine, char *pcText, D3DXCOLOR TextColor, float fLifeTime)
{
  GTInformWin *v5; // edi@1
  unsigned int v6; // ebx@3
  char *v7; // esi@4

  v5 = this;
  if ( 0.0 == fLifeTime )
    fLifeTime = 3.0;
  v6 = uiMaxViewLine - 1;
  if ( uiMaxViewLine != 1 )
  {
    v7 = (char *)this->m_aspTextGeom;
    do
    {
      PgFadeTextGeometry::CopyFrom(*(PgFadeTextGeometry **)v7, *((PgFadeTextGeometry **)v7 + 1));
      v7 += 4;
      --v6;
    }
    while ( v6 );
  }
  (*(void (__stdcall **)(_DWORD))(**((_DWORD **)&v5->m_fInitYPos + uiMaxViewLine) + 176))(&TextColor);
  (*(void (__stdcall **)(_DWORD))(**((_DWORD **)&v5->m_fInitYPos + uiMaxViewLine) + 148))(pcText);
  PgFadeTextGeometry::SetLifeTime(*((PgFadeTextGeometry **)&v5->m_fInitYPos + uiMaxViewLine), fLifeTime);
}

//----- (005CDB50) --------------------------------------------------------
void __thiscall GTInformWin::Clear(GTInformWin *this)
{
  PgFadeTextGeometry **v1; // esi@1
  signed int v2; // edi@1

  v1 = (PgFadeTextGeometry **)this->m_aspTextGeom;
  v2 = 5;
  do
  {
    ((void (__stdcall *)(_DWORD))(*v1)->vfptr[37].__vecDelDtor)(&unk_9AE4C5);
    PgFadeTextGeometry::SetLifeTime(*v1, -1.0);
    ++v1;
    --v2;
  }
  while ( v2 );
}

//----- (005CDB90) --------------------------------------------------------
void __thiscall GTInformWin::~GTInformWin(GTInformWin *this)
{
  GTInformWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&GTInformWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GTInformWin::`vftable'{for `IDirectMessenger'};
  `eh vector destructor iterator'(
    this->m_aspTextGeom,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9AE4DC: using guessed type void (__thiscall *GTInformWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AE4FC: using guessed type int (__thiscall *GTInformWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005CDC10) --------------------------------------------------------
void __thiscall GTInformWin::GTInformWin(GTInformWin *this)
{
  GTInformWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GTInformWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GTInformWin::`vftable'{for `IDirectMessenger'};
  `eh vector constructor iterator'(
    v1->m_aspTextGeom,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
}
// 9AE4DC: using guessed type void (__thiscall *GTInformWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AE4FC: using guessed type int (__thiscall *GTInformWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005CDC90) --------------------------------------------------------
char __thiscall GTInformWin::Create(GTInformWin *this, PgFrameWork *pkFrameWork)
{
  GTInformWin *v2; // edi@1
  PgFont *v4; // eax@3
  PgFont *v5; // ebx@3
  SpScreenText **v6; // esi@4
  PgFadeTextGeometry *v7; // eax@6
  int v8; // eax@7
  SpScreenText *v9; // ebx@9
  SpScreenText *v10; // eax@17
  SpScreenText *v11; // ebx@19
  char *v12; // eax@21
  SpScreenText *v13; // eax@25
  float v14; // edx@25
  float v15; // ST38_4@25
  float v16; // edx@25
  SpScreenText *v17; // eax@25
  void *(__thiscall *v18)(NiRefObject *, unsigned int); // edx@25
  char v19; // [sp+14h] [bp-74h]@20
  char v20; // [sp+18h] [bp-70h]@20
  char v21; // [sp+1Ch] [bp-6Ch]@20
  char v22; // [sp+20h] [bp-68h]@20
  D3DXCOLOR result; // [sp+40h] [bp-48h]@22
  tagSIZE kSize; // [sp+50h] [bp-38h]@4
  PgFont *pkFont; // [sp+58h] [bp-30h]@3
  int v26; // [sp+5Ch] [bp-2Ch]@4
  int iLineYPos; // [sp+60h] [bp-28h]@4
  PgFadeTextGeometry *v28; // [sp+64h] [bp-24h]@6
  tagRECT kDrawRect; // [sp+68h] [bp-20h]@4
  int v30; // [sp+84h] [bp-4h]@6

  v2 = this;
  if ( !PgWinFrame::Create((PgWinFrame *)&this->vfptr, 0, 0, 0, pkFrameWork, "GTInformWin", 0) )
    return 0;
  v4 = Font::Get(GTFONT);
  v5 = v4;
  pkFont = v4;
  if ( !v4 )
    return 0;
  SelectObject(v4->m_kFontRenderStuff.hDC, v4->m_hFont);
  PgFont::GetTextSize(v5, "W", 1, &kSize);
  iLineYPos = -2;
  SetRect(&kDrawRect, 0, 0, 500, kSize.cy);
  v6 = (SpScreenText **)v2->m_aspTextGeom;
  v26 = 5;
  while ( 1 )
  {
    v7 = (PgFadeTextGeometry *)operator new(0x158u);
    v28 = v7;
    v30 = 0;
    if ( v7 )
    {
      PgFadeTextGeometry::PgFadeTextGeometry(v7, v5);
      v28 = (PgFadeTextGeometry *)v8;
    }
    else
    {
      v28 = 0;
      v8 = 0;
    }
    v9 = *v6;
    v30 = -1;
    if ( v9 != (SpScreenText *)v8 )
    {
      if ( v9 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
          v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
        v8 = (int)v28;
      }
      *v6 = (SpScreenText *)v8;
      if ( v8 )
        InterlockedIncrement((volatile LONG *)(v8 + 4));
    }
    SpScreenText::SetShadowOffset(*v6, 3u);
    ((void (__stdcall *)(tagRECT *))(*v6)->vfptr[34].__vecDelDtor)(&kDrawRect);
    v10 = *v6;
    v10[1].vfptr = (NiRefObjectVtbl *)1;
    if ( v10->m_iAlignOption != 18 )
    {
      v10->m_iAlignOption = 18;
      v10->m_bInvalidate = 1;
    }
    v11 = *v6;
    if ( *(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable )
    {
      v12 = CDataReader::GetRecord(
              (CDataReader *)(*(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable + 4),
              0x23u);
      v22 = -1;
      if ( !v12 )
      {
        Color::GetDxColor(&result, -1, 0, -1, -1);
        goto LABEL_25;
      }
      v21 = v12[6];
      v20 = v12[5];
      v19 = v12[4];
    }
    else
    {
      v22 = -1;
      v21 = -1;
      v20 = ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable[0];
      v19 = -1;
    }
    Color::GetDxColor(&result, v19, v20, v21, v22);
LABEL_25:
    v11->vfptr[44].__vecDelDtor((NiRefObject *)v11, (unsigned int)&result);
    v13 = *v6;
    v14 = (*v6)->m_kLocal.m_Translate.y;
    v15 = (double)iLineYPos;
    v16 = (*v6)->m_kLocal.m_Translate.z;
    v13->m_kLocal.m_Translate.x = (*v6)->m_kLocal.m_Translate.x;
    v13->m_kLocal.m_Translate.y = v15;
    v13->m_kLocal.m_Translate.z = v16;
    v17 = *v6;
    v18 = v2->vfptr[29].__vecDelDtor;
    iLineYPos += kSize.cy + 2;
    ((void (__thiscall *)(GTInformWin *, SpScreenText *, _DWORD))v18)(v2, v17, 0);
    ++v6;
    if ( !--v26 )
      break;
    v5 = pkFont;
  }
  NiAVObject::UpdateProperties((NiAVObject *)&v2->vfptr);
  v2->vfptr[38].__vecDelDtor((NiRefObject *)v2, 500u);
  v2->vfptr[39].__vecDelDtor((NiRefObject *)v2, 45u);
  ((void (__thiscall *)(GTInformWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.2);
  v2->vfptr[60].__vecDelDtor((NiRefObject *)v2, 0);
  return 1;
}

//----- (005CDF40) --------------------------------------------------------
GTInformWin *__cdecl GTInformWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  GTInformWin *v4; // eax@14
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x16Cu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    LOBYTE(v6) = 1;
    v2->vfptr = (NiRefObjectVtbl *)&GTInformWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&GTInformWin::`vftable'{for `IDirectMessenger'};
    `eh vector constructor iterator'(
      &v2[1].m_kLocal.m_Rotate.m_pEntry[0][1],
      4u,
      5,
      (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
      (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( GTInformWin::Create((GTInformWin *)v2, pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (GTInformWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( v2 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
    v4 = 0;
  }
  return v4;
}
// 9AE4DC: using guessed type void (__thiscall *GTInformWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AE4FC: using guessed type int (__thiscall *GTInformWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005CE0A0) --------------------------------------------------------
GTInformWin *__thiscall GTInformWin::`vector deleting destructor'(GTInformWin *this, unsigned int a2)
{
  GTInformWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GTInformWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GTInformWin::`vftable'{for `IDirectMessenger'};
  `eh vector destructor iterator'(
    this->m_aspTextGeom,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9AE4DC: using guessed type void (__thiscall *GTInformWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AE4FC: using guessed type int (__thiscall *GTInformWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005CE130) --------------------------------------------------------
BOOL __cdecl GTStatusWin::RankInfo::Low_IncreaseScore(GTStatusWin::RankInfo *lhw, GTStatusWin::RankInfo *rhw)
{
  return lhw->m_unIncreaseScore < rhw->m_unIncreaseScore;
}

//----- (005CE150) --------------------------------------------------------
BOOL __cdecl GTStatusWin::RankInfo::High_DecreaseScore(PkRealTiemRankWin::RankInfo *lhw, PkRealTiemRankWin::RankInfo *rhw)
{
  return rhw->m_unKill < lhw->m_unKill;
}

//----- (005CE170) --------------------------------------------------------
BOOL __cdecl GTStatusWin::RankInfo::Low_DecreaseScore(GTStatusWin::RankInfo *lhw, GTStatusWin::RankInfo *rhw)
{
  return lhw->m_unDecreaseScore < rhw->m_unDecreaseScore;
}

//----- (005CE190) --------------------------------------------------------
BOOL __cdecl GTStatusWin::RankInfo::Low_DieCount(GTStatusWin::RankInfo *lhw, GTStatusWin::RankInfo *rhw)
{
  return lhw->m_unDieCount < rhw->m_unDieCount;
}

//----- (005CE1B0) --------------------------------------------------------
BOOL __cdecl GTStatusWin::RankInfo::High_KillCount(GTStatusWin::RankInfo *lhw, GTStatusWin::RankInfo *rhw)
{
  return rhw->m_unKillCount < lhw->m_unKillCount;
}

//----- (005CE1D0) --------------------------------------------------------
BOOL __cdecl PkRealTiemRankWin::RankInfo::Less_Rank(PkRealTiemRankWin::RankInfo *lhw, PkRealTiemRankWin::RankInfo *rhw)
{
  return lhw->m_unRank < rhw->m_unRank;
}

//----- (005CE1F0) --------------------------------------------------------
BOOL __cdecl GTStatusWin::RankInfo::High_Grade(GTStatusWin::RankInfo *lhw, GTStatusWin::RankInfo *rhw)
{
  return rhw->m_unGrade < lhw->m_unGrade;
}

//----- (005CE210) --------------------------------------------------------
BOOL __cdecl GTStatusWin::RankInfo::Low_Grade(GTStatusWin::RankInfo *lhw, GTStatusWin::RankInfo *rhw)
{
  return lhw->m_unGrade < rhw->m_unGrade;
}

//----- (005CE230) --------------------------------------------------------
BOOL __cdecl GTStatusWin::RankInfo::High_CaptureFlag(GTStatusWin::RankInfo *lhw, GTStatusWin::RankInfo *rhw)
{
  return rhw->m_unCaptureFlag < lhw->m_unCaptureFlag;
}

//----- (005CE250) --------------------------------------------------------
BOOL __cdecl GTStatusWin::RankInfo::Low_CaptureFlag(GTStatusWin::RankInfo *lhw, GTStatusWin::RankInfo *rhw)
{
  return lhw->m_unCaptureFlag < rhw->m_unCaptureFlag;
}

//----- (005CE270) --------------------------------------------------------
void __thiscall GTStatusWin::UpdateMeWin(GTStatusWin *this, float fCurTime)
{
  GTStatusWin *v2; // esi@1

  v2 = this;
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
    GameFrameWork::UpdateUIScroll(v2->m_pkGTScoreList, v2->m_pkSlideBarScoreList);
}

//----- (005CE2A0) --------------------------------------------------------
void __thiscall GTStatusWin::EndGame(GTStatusWin *this, bool b)
{
  this->m_bGame = b;
}

//----- (005CE2B0) --------------------------------------------------------
void GTStatusWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "GuildTBattleStatus");
}

//----- (005CE2E0) --------------------------------------------------------
void __thiscall GTStatusMiniWin::GTStatusMiniWin(GTStatusMiniWin *this)
{
  GTStatusMiniWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GTStatusMiniWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GTStatusMiniWin::`vftable'{for `IDirectMessenger'};
  v1->m_GTStatus.m_uiMyScore = 0;
  v1->m_GTStatus.m_uiEnemyScore = 0;
  v1->m_GTStatus.m_uiMyCaptureFlag = 0;
  v1->m_GTStatus.m_uiEnemyCaptureFlag = 0;
  v1->m_bOpserver = 0;
  v1->m_FirstGuildReg = 0;
}
// 9AEB50: using guessed type void (__thiscall *GTStatusMiniWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AEB6C: using guessed type int (__thiscall *GTStatusMiniWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005CE330) --------------------------------------------------------
void __thiscall GTStatusMiniWin::~GTStatusMiniWin(GTStatusMiniWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GTStatusMiniWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GTStatusMiniWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9AEB50: using guessed type void (__thiscall *GTStatusMiniWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AEB6C: using guessed type int (__thiscall *GTStatusMiniWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005CE360) --------------------------------------------------------
void __thiscall GTStatusMiniWin::Clear(GTStatusMiniWin *this)
{
  GTStatusMiniWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkMyGuildName->vfptr[118].__vecDelDtor)(&unk_9AE77B);
  ((void (__stdcall *)(_DWORD))v1->m_pkEnemyGuildName->vfptr[118].__vecDelDtor)(&unk_9AE786);
  ((void (__stdcall *)(_DWORD))v1->m_pkMyGuildTotalScore->vfptr[118].__vecDelDtor)(&unk_9AE787);
  ((void (__stdcall *)(_DWORD))v1->m_pkEnemyGuildTotalScore->vfptr[118].__vecDelDtor)(&unk_9AE78E);
  ((void (__stdcall *)(_DWORD))v1->m_pkMyGuildCaptureFlag->vfptr[118].__vecDelDtor)(&unk_9AE78F);
  ((void (__stdcall *)(_DWORD))v1->m_pkEnemyGuildCaptureFlag->vfptr[118].__vecDelDtor)(&unk_9AE79A);
}

//----- (005CE3F0) --------------------------------------------------------
void __thiscall GTStatusMiniWin::EndGame(GTStatusMiniWin *this, bool b)
{
  this->m_bOpserver = b;
  this->m_FirstGuildReg = 0;
}

//----- (005CE410) --------------------------------------------------------
void GTStatusMiniWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "GuildTBattleStatusMin");
}

//----- (005CE440) --------------------------------------------------------
void __userpurge GTStatusWin::SetGuildInfo(GTStatusWin *this@<ecx>, int a2@<ebx>, unsigned int Reg, unsigned int TotalScore)
{
  GTStatusWin *v4; // esi@1
  CClientGuild *v5; // eax@2
  NiRefObjectVtbl *v6; // ebx@5
  CClientGuild *v7; // eax@5
  char *v8; // eax@5
  NiRefObjectVtbl *v9; // edi@5
  char *v10; // eax@5
  NiRefObjectVtbl *v11; // ebx@7
  CClientGuild *v12; // eax@7
  char *v13; // eax@7
  NiRefObjectVtbl *v14; // edi@7
  char *v15; // eax@7
  NiRefObjectVtbl *v16; // ebx@11
  CClientGuild *v17; // eax@11
  char *v18; // eax@11
  NiRefObjectVtbl *v19; // edi@11
  char *v20; // eax@11
  unsigned int v21; // edi@11
  GuildTournamentImprove *v22; // eax@11
  NiRefObjectVtbl *v23; // edx@11
  NiRefObjectVtbl *v24; // ebx@14
  CClientGuild *v25; // eax@14
  char *v26; // eax@14
  NiRefObjectVtbl *v27; // ebx@14
  char *v28; // eax@14
  int v29; // [sp-4h] [bp-Ch]@2

  v4 = this;
  if ( Reg )
  {
    v29 = a2;
    v5 = GuildTask::GetGuild();
    if ( v5 && v5->m_bOpserver )
    {
      if ( GuildTask::GetGuildTournamentImprove()->m_RedTeam == Reg )
      {
        v6 = v4->m_pkMyGuildName->vfptr;
        v7 = GuildTask::GetGuild();
        v8 = CClientGuild::FindGttEnemyInfo(v7, Reg);
        v6[118].__vecDelDtor((NiRefObject *)v4->m_pkMyGuildName, (unsigned int)v8);
        v9 = v4->m_pkMyGuildScore->vfptr;
        v10 = fs("%d", TotalScore);
        v9[118].__vecDelDtor((NiRefObject *)v4->m_pkMyGuildScore, (unsigned int)v10);
        ((void (__stdcall *)(D3DXCOLOR *))v4->m_pkMyGuildName->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
        return;
      }
      if ( GuildTask::GetGuildTournamentImprove()->m_BlueTeam == Reg )
      {
        v11 = v4->m_pkEnemyGuildName->vfptr;
        v12 = GuildTask::GetGuild();
        v13 = CClientGuild::FindGttEnemyInfo(v12, Reg);
        ((void (__thiscall *)(PgWinText *, char *, int))v11[118].__vecDelDtor)(v4->m_pkEnemyGuildName, v13, v29);
        v14 = v4->m_pkEnemyGuildScore->vfptr;
        v15 = fs("%d", TotalScore);
        v14[118].__vecDelDtor((NiRefObject *)v4->m_pkEnemyGuildScore, (unsigned int)v15);
LABEL_8:
        ((void (__stdcall *)(signed int, signed int, signed int))v4->m_pkEnemyGuildName->vfptr[116].__vecDelDtor)(
          62,
          158,
          255);
        return;
      }
    }
    else
    {
      if ( g_pkMainChar->m_dwGuildRegNum != Reg )
      {
        v24 = v4->m_pkEnemyGuildName->vfptr;
        v25 = GuildTask::GetGuild();
        v26 = CClientGuild::FindGttEnemyInfo(v25, Reg);
        ((void (__thiscall *)(PgWinText *, char *, int))v24[118].__vecDelDtor)(v4->m_pkEnemyGuildName, v26, v29);
        v27 = v4->m_pkEnemyGuildScore->vfptr;
        v28 = fs("%d", TotalScore);
        v27[118].__vecDelDtor((NiRefObject *)v4->m_pkEnemyGuildScore, (unsigned int)v28);
        if ( GuildTask::GetGuildTournamentImprove()->m_RedTeam == Reg )
        {
          ((void (__cdecl *)(D3DXCOLOR *))v4->m_pkEnemyGuildName->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
          return;
        }
        goto LABEL_8;
      }
      v16 = v4->m_pkMyGuildName->vfptr;
      v17 = GuildTask::GetGuild();
      v18 = CClientGuild::FindGttEnemyInfo(v17, Reg);
      ((void (__thiscall *)(PgWinText *, char *, int))v16[118].__vecDelDtor)(v4->m_pkMyGuildName, v18, v29);
      v19 = v4->m_pkMyGuildScore->vfptr;
      v20 = fs("%d", TotalScore);
      v19[118].__vecDelDtor((NiRefObject *)v4->m_pkMyGuildScore, (unsigned int)v20);
      v21 = g_pkMainChar->m_dwGuildRegNum;
      v22 = GuildTask::GetGuildTournamentImprove();
      v23 = v4->m_pkMyGuildName->vfptr;
      if ( v22->m_RedTeam == v21 )
        ((void (__cdecl *)(D3DXCOLOR *))v23[117].__vecDelDtor)(&Color::m_kDxRedColor);
      else
        ((void (__stdcall *)(signed int, signed int, signed int))v23[116].__vecDelDtor)(62, 158, 255);
    }
  }
}
// 5CE440: could not find valid save-restore pair for ebx

//----- (005CE680) --------------------------------------------------------
void __thiscall GTStatusWin::OnSlideBar(GTStatusWin *this)
{
  GTStatusWin *v1; // esi@1
  SlideListWin *v2; // eax@1
  SlideBar *v3; // ecx@2

  v1 = this;
  v2 = this->m_pkGTScoreList;
  if ( v2 )
  {
    v3 = this->m_pkSlideBarScoreList;
    if ( v3 )
      SlideBar::SetSplitCnt(v3, v2->m_nSlideSplitCnt);
    v1->m_pkGTScoreList->m_nViewStartPos = v1->m_pkSlideBarScoreList->m_nCurPos;
    SlideListWin::UpdateViewList(v1->m_pkGTScoreList);
  }
}

//----- (005CE6D0) --------------------------------------------------------
void __thiscall GTStatusMiniWin::OnCommand(GTStatusMiniWin *this, unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@3
  GTStatusWin *v4; // eax@5

  if ( wParam )
  {
    if ( wParam == 1 )
    {
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v3 )
        GameFrameWork::OpenPlayGuideSearchList(v3, "GuildTBattleStatusMin");
    }
  }
  else
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
    v4 = GuildTask::GetGTStatusWin();
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v4->vfptr);
  }
}

//----- (005CE730) --------------------------------------------------------
void __userpurge GTStatusMiniWin::SetGTStatus(GTStatusMiniWin *this@<ecx>, int a2@<ebx>, PROTO_NC_GUILD_TOURNAMENT_SCORE_CMD *pkCmd)
{
  PROTO_NC_GUILD_TOURNAMENT_SCORE_CMD *v3; // edi@1
  GTStatusMiniWin *v4; // esi@1
  CClientGuild *v5; // eax@2
  NiRefObjectVtbl *v6; // ebx@5
  CClientGuild *v7; // eax@5
  char *v8; // eax@5
  NiRefObjectVtbl *v9; // ebx@5
  char *v10; // eax@5
  NiRefObjectVtbl *v11; // ebx@5
  char *v12; // eax@5
  unsigned int v13; // ebx@6
  NiRefObjectVtbl *v14; // ebx@7
  CClientGuild *v15; // eax@7
  char *v16; // eax@7
  NiRefObjectVtbl *v17; // ebx@7
  char *v18; // eax@7
  NiRefObjectVtbl *v19; // ebx@7
  char *v20; // eax@7
  unsigned int v21; // eax@8
  NiRefObjectVtbl *v22; // ebx@10
  unsigned int v23; // ST0C_4@10
  CClientGuild *v24; // eax@10
  char *v25; // eax@10
  NiRefObjectVtbl *v26; // ebx@10
  char *v27; // eax@10
  NiRefObjectVtbl *v28; // ebx@10
  char *v29; // eax@10
  unsigned int v30; // edi@10
  GuildTournamentImprove *v31; // eax@10
  NiRefObjectVtbl **v32; // ecx@10
  bool v33; // zf@10
  NiRefObjectVtbl *v34; // ebx@13
  unsigned int v35; // ST0C_4@13
  CClientGuild *v36; // eax@13
  char *v37; // eax@13
  NiRefObjectVtbl *v38; // ebx@13
  char *v39; // eax@13
  NiRefObjectVtbl *v40; // ebx@13
  char *v41; // eax@13
  NiRefObjectVtbl *v42; // edx@14
  int v43; // [sp-4h] [bp-Ch]@2
  PROTO_NC_GUILD_TOURNAMENT_SCORE_CMD *pkCmda; // [sp+10h] [bp+8h]@4
  PROTO_NC_GUILD_TOURNAMENT_SCORE_CMD *pkCmdb; // [sp+10h] [bp+8h]@6

  v3 = pkCmd;
  v4 = this;
  if ( pkCmd )
  {
    v43 = a2;
    v5 = GuildTask::GetGuild();
    if ( v5 && v5->m_bOpserver )
    {
      pkCmda = (PROTO_NC_GUILD_TOURNAMENT_SCORE_CMD *)pkCmd->regNumber;
      if ( (PROTO_NC_GUILD_TOURNAMENT_SCORE_CMD *)GuildTask::GetGuildTournamentImprove()->m_RedTeam == pkCmda )
      {
        v6 = v4->m_pkMyGuildName->vfptr;
        v7 = GuildTask::GetGuild();
        v8 = CClientGuild::FindGttEnemyInfo(v7, (unsigned int)pkCmda);
        v6[118].__vecDelDtor((NiRefObject *)v4->m_pkMyGuildName, (unsigned int)v8);
        v9 = v4->m_pkMyGuildTotalScore->vfptr;
        v10 = fs("%d", v3->unAllScore);
        v9[118].__vecDelDtor((NiRefObject *)v4->m_pkMyGuildTotalScore, (unsigned int)v10);
        v11 = v4->m_pkMyGuildCaptureFlag->vfptr;
        v12 = fs("%d", v3->unCaptureFlagCount);
        v11[118].__vecDelDtor((NiRefObject *)v4->m_pkMyGuildCaptureFlag, (unsigned int)v12);
        ((void (__stdcall *)(D3DXCOLOR *))v4->m_pkMyGuildName->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
      }
      else
      {
        v13 = v3->regNumber;
        pkCmdb = (PROTO_NC_GUILD_TOURNAMENT_SCORE_CMD *)v3->regNumber;
        if ( GuildTask::GetGuildTournamentImprove()->m_BlueTeam == v13 )
        {
          v14 = v4->m_pkEnemyGuildName->vfptr;
          v15 = GuildTask::GetGuild();
          v16 = CClientGuild::FindGttEnemyInfo(v15, (unsigned int)pkCmdb);
          v14[118].__vecDelDtor((NiRefObject *)v4->m_pkEnemyGuildName, (unsigned int)v16);
          v17 = v4->m_pkEnemyGuildTotalScore->vfptr;
          v18 = fs("%d", v3->unAllScore);
          v17[118].__vecDelDtor((NiRefObject *)v4->m_pkEnemyGuildTotalScore, (unsigned int)v18);
          v19 = v4->m_pkEnemyGuildCaptureFlag->vfptr;
          v20 = fs("%d", v3->unCaptureFlagCount);
          v19[118].__vecDelDtor((NiRefObject *)v4->m_pkEnemyGuildCaptureFlag, (unsigned int)v20);
          ((void (__stdcall *)(signed int, signed int, signed int, signed int))v4->m_pkEnemyGuildName->vfptr[116].__vecDelDtor)(
            62,
            158,
            255,
            255);
        }
      }
      return;
    }
    v21 = pkCmd->regNumber;
    if ( !v21 )
      return;
    if ( g_pkMainChar->m_dwGuildRegNum == v21 )
    {
      v22 = v4->m_pkMyGuildName->vfptr;
      v23 = pkCmd->regNumber;
      v24 = GuildTask::GetGuild();
      v25 = CClientGuild::FindGttEnemyInfo(v24, v23);
      ((void (__thiscall *)(PgWinText *, char *, int))v22[118].__vecDelDtor)(v4->m_pkMyGuildName, v25, v43);
      v26 = v4->m_pkMyGuildTotalScore->vfptr;
      v27 = fs("%d", pkCmd->unAllScore);
      v26[118].__vecDelDtor((NiRefObject *)v4->m_pkMyGuildTotalScore, (unsigned int)v27);
      v28 = v4->m_pkMyGuildCaptureFlag->vfptr;
      v29 = fs("%d", pkCmd->unCaptureFlagCount);
      v28[118].__vecDelDtor((NiRefObject *)v4->m_pkMyGuildCaptureFlag, (unsigned int)v29);
      v30 = g_pkMainChar->m_dwGuildRegNum;
      v31 = GuildTask::GetGuildTournamentImprove();
      v32 = &v4->m_pkMyGuildName->vfptr;
      v33 = v30 == v31->m_RedTeam;
      goto LABEL_14;
    }
    if ( v21 && g_pkMainChar->m_dwGuildRegNum != v21 )
    {
      v34 = v4->m_pkEnemyGuildName->vfptr;
      v35 = pkCmd->regNumber;
      v36 = GuildTask::GetGuild();
      v37 = CClientGuild::FindGttEnemyInfo(v36, v35);
      ((void (__thiscall *)(PgWinText *, char *, int))v34[118].__vecDelDtor)(v4->m_pkEnemyGuildName, v37, v43);
      v38 = v4->m_pkEnemyGuildTotalScore->vfptr;
      v39 = fs("%d", pkCmd->unAllScore);
      v38[118].__vecDelDtor((NiRefObject *)v4->m_pkEnemyGuildTotalScore, (unsigned int)v39);
      v40 = v4->m_pkEnemyGuildCaptureFlag->vfptr;
      v41 = fs("%d", pkCmd->unCaptureFlagCount);
      v40[118].__vecDelDtor((NiRefObject *)v4->m_pkEnemyGuildCaptureFlag, (unsigned int)v41);
      v33 = pkCmd->regNumber == GuildTask::GetGuildTournamentImprove()->m_RedTeam;
      v32 = &v4->m_pkEnemyGuildName->vfptr;
LABEL_14:
      v42 = *v32;
      if ( v33 )
        ((void (__cdecl *)(D3DXCOLOR *))v42[117].__vecDelDtor)(&Color::m_kDxRedColor);
      else
        ((void (__stdcall *)(signed int, signed int, signed int))v42[116].__vecDelDtor)(62, 158, 255);
      return;
    }
  }
}
// 5CE730: could not find valid save-restore pair for ebx

//----- (005CEA40) --------------------------------------------------------
char __thiscall GTStatusMiniWin::Create(GTStatusMiniWin *this, PgFrameWork *pkFrameWork)
{
  GTStatusMiniWin *v2; // esi@1
  NiNode *v3; // esi@2
  NiTexturePalette *v5; // edi@7
  const char *v6; // eax@9
  PgSprData *v7; // eax@10
  int v8; // edi@11
  int v9; // ebx@11
  NiSourceTexture *v10; // eax@11
  PgSprData *v11; // eax@12
  PgSprData::PgHitTester *v12; // eax@14
  unsigned int uiWidth; // ST8C_4@14
  PgFont *v14; // eax@14
  unsigned int v15; // ST8C_4@14
  NiUnsharedGeometryGroup *v16; // eax@14
  PgSprData *v17; // eax@14
  PgSprData *v18; // eax@14
  int v19; // eax@14
  unsigned int v20; // ST8C_4@14
  PgFont *v21; // eax@14
  unsigned int v22; // ST8C_4@14
  NiUnsharedGeometryGroup *v23; // eax@14
  NiPointer<PgSprData::PgHitTester> *v24; // ecx@14
  unsigned int v25; // ST8C_4@14
  PgFont *v26; // eax@14
  unsigned int v27; // ST8C_4@14
  NiUnsharedGeometryGroup *v28; // eax@14
  NiPointer<PgSprData::PgHitTester> *v29; // ecx@14
  unsigned int v30; // ST8C_4@14
  PgFont *v31; // eax@14
  unsigned int v32; // ST8C_4@14
  NiUnsharedGeometryGroup *v33; // eax@14
  int v34; // eax@14
  PgWin *v35; // ST74_4@14
  unsigned int v36; // ST8C_4@14
  PgFont *v37; // eax@14
  PgWinAbbreviateText *v38; // eax@14
  int v39; // eax@14
  PgWin *v40; // ST74_4@14
  unsigned int v41; // ST8C_4@14
  PgFont *v42; // eax@14
  PgWinAbbreviateText *v43; // eax@14
  NiPointer<PgSprData::PgHitTester> *v44; // ecx@14
  unsigned int v45; // ST8C_4@14
  PgFont *v46; // eax@14
  PgWinText *v47; // eax@14
  NiPointer<PgSprData::PgHitTester> *v48; // ecx@14
  unsigned int v49; // ST8C_4@14
  PgFont *v50; // eax@14
  PgWinText *v51; // eax@14
  NiPointer<PgSprData::PgHitTester> *v52; // ecx@14
  unsigned int v53; // ST8C_4@14
  PgFont *v54; // eax@14
  PgWinText *v55; // eax@14
  NiPointer<PgSprData::PgHitTester> *v56; // ecx@14
  unsigned int v57; // ST8C_4@14
  PgFont *v58; // eax@14
  PgWinText *v59; // eax@14
  NiNode *v60; // esi@16
  NiSourceTexture *pkTexture; // [sp+90h] [bp-1Ch]@1
  NiPointer<NiNode> spNode; // [sp+94h] [bp-18h]@1
  int uiLeft; // [sp+98h] [bp-14h]@10
  int uiTop; // [sp+9Ch] [bp-10h]@10
  int v65; // [sp+A8h] [bp-4h]@1
  NiSourceTexture *pkTexture8a; // [sp+B4h] [bp+8h]@14
  NiSourceTexture *pkTexture8b; // [sp+B4h] [bp+8h]@14
  NiSourceTexture *pkTexture8c; // [sp+B4h] [bp+8h]@14
  NiSourceTexture *pkTexture8d; // [sp+B4h] [bp+8h]@14
  NiSourceTexture *pkTexture8e; // [sp+B4h] [bp+8h]@14
  PgSprData *pkTexture8f; // [sp+B4h] [bp+8h]@14
  NiSourceTexture *pkTexture8g; // [sp+B4h] [bp+8h]@14
  NiSourceTexture *pkTexture8h; // [sp+B4h] [bp+8h]@14
  PgSprData *pkTexture8i; // [sp+B4h] [bp+8h]@14
  NiSourceTexture *pkTexture8j; // [sp+B4h] [bp+8h]@14
  NiSourceTexture *pkTexture8k; // [sp+B4h] [bp+8h]@14
  NiSourceTexture *pkTexture8l; // [sp+B4h] [bp+8h]@14
  NiSourceTexture *pkTexture8m; // [sp+B4h] [bp+8h]@14
  NiSourceTexture *pkTexture8n; // [sp+B4h] [bp+8h]@14
  NiSourceTexture *pkTexture8o; // [sp+B4h] [bp+8h]@14
  PgSprData *pkTexture8p; // [sp+B4h] [bp+8h]@14
  NiSourceTexture *pkTexture8q; // [sp+B4h] [bp+8h]@14
  PgSprData *pkTexture8r; // [sp+B4h] [bp+8h]@14
  NiSourceTexture *pkTexture8s; // [sp+B4h] [bp+8h]@14
  PgSprData *pkTexture8t; // [sp+B4h] [bp+8h]@14
  NiSourceTexture *pkTexture8u; // [sp+B4h] [bp+8h]@14
  PgSprData *pkTexture8v; // [sp+B4h] [bp+8h]@14
  NiSourceTexture *pkTexture8w; // [sp+B4h] [bp+8h]@14
  PgSprData *pkTexture8x; // [sp+B4h] [bp+8h]@14
  NiSourceTexture *pkTexture8; // [sp+B4h] [bp+8h]@14
  PgSprData *pkTexture8y; // [sp+B4h] [bp+8h]@15

  v2 = this;
  spNode.m_pObject = 0;
  v65 = 0;
  pkTexture = MenuTexMgr::GetTexture(4u);
  if ( !pkTexture )
    goto LABEL_23;
  v5 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildTBattleStatusMin.nif");
  PgUtil::LoadNodeNifFile(v6, &spNode, v5);
  if ( !spNode.m_pObject )
    return 0;
  v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v7, 0, pkFrameWork, "GTStatusMiniWin", 0) )
  {
LABEL_23:
    v3 = spNode.m_pObject;
    v65 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
    return 0;
  }
  v8 = uiLeft;
  v9 = uiTop;
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v11, (PgWin *)&v2->vfptr, 0, 0);
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  pkTexture8a = (NiSourceTexture *)v12->m_uiHeight;
  uiWidth = v12->m_uiWidth;
  v14 = Font::Get(0);
  pkTexture8b = (NiSourceTexture *)PgWinText::CreateWin(
                                     uiLeft - v8,
                                     uiTop - v9,
                                     uiWidth,
                                     (unsigned int)pkTexture8a,
                                     v14,
                                     (PgWin *)&v2->vfptr,
                                     0,
                                     0);
  pkTexture8b->vfptr[122].__vecDelDtor((NiRefObject *)pkTexture8b, 5u);
  v15 = (unsigned int)pkTexture8b->vfptr;
  v16 = TextData2::Get(0x34A29797u);
  (*(void (__thiscall **)(NiSourceTexture *, NiUnsharedGeometryGroup *))(v15 + 472))(pkTexture8b, v16);
  ((void (__stdcall *)(_DWORD))pkTexture8b->vfptr[60].__vecDelDtor)(0);
  v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop, v17, (PgWin *)&v2->vfptr, 0, 0);
  v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop, v18, (PgWin *)&v2->vfptr, 0, 0);
  pkTexture8c = (NiSourceTexture *)PgSprData::Create(
                                     (NiAVObject *)&spNode.m_pObject->vfptr,
                                     "Text01",
                                     &uiLeft,
                                     &uiTop,
                                     pkTexture);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTexture8c, (PgWin *)&v2->vfptr, 0, 0);
  v19 = *(_DWORD *)pkTexture8c->m_kFormatPrefs.m_eMipMapped;
  pkTexture8d = *(NiSourceTexture **)(v19 + 24);
  v20 = *(_DWORD *)(v19 + 20);
  v21 = Font::Get(0);
  pkTexture8e = (NiSourceTexture *)PgWinText::CreateWin(
                                     uiLeft - v8,
                                     uiTop - v9,
                                     v20,
                                     (unsigned int)pkTexture8d,
                                     v21,
                                     (PgWin *)&v2->vfptr,
                                     0,
                                     0);
  pkTexture8e->vfptr[122].__vecDelDtor((NiRefObject *)pkTexture8e, 5u);
  v22 = (unsigned int)pkTexture8e->vfptr;
  v23 = TextData2::Get(0xDAEC3E0E);
  (*(void (__thiscall **)(NiSourceTexture *, NiUnsharedGeometryGroup *))(v22 + 472))(pkTexture8e, v23);
  ((void (__stdcall *)(_DWORD))pkTexture8e->vfptr[60].__vecDelDtor)(0);
  pkTexture8f = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text02", &uiLeft, &uiTop, pkTexture);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, pkTexture8f, (PgWin *)&v2->vfptr, 0, 0);
  v24 = pkTexture8f->m_akHitTester.m_pBase;
  pkTexture8g = (NiSourceTexture *)v24->m_pObject->m_uiHeight;
  v25 = v24->m_pObject->m_uiWidth;
  v26 = Font::Get(0);
  pkTexture8h = (NiSourceTexture *)PgWinText::CreateWin(
                                     uiLeft - v8,
                                     uiTop - v9,
                                     v25,
                                     (unsigned int)pkTexture8g,
                                     v26,
                                     (PgWin *)&v2->vfptr,
                                     0,
                                     0);
  pkTexture8h->vfptr[122].__vecDelDtor((NiRefObject *)pkTexture8h, 5u);
  v27 = (unsigned int)pkTexture8h->vfptr;
  v28 = TextData2::Get(0xDD4D411F);
  (*(void (__thiscall **)(NiSourceTexture *, NiUnsharedGeometryGroup *))(v27 + 472))(pkTexture8h, v28);
  ((void (__stdcall *)(_DWORD))pkTexture8h->vfptr[60].__vecDelDtor)(0);
  pkTexture8i = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text03", &uiLeft, &uiTop, pkTexture);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, pkTexture8i, (PgWin *)&v2->vfptr, 0, 0);
  v29 = pkTexture8i->m_akHitTester.m_pBase;
  pkTexture8j = (NiSourceTexture *)v29->m_pObject->m_uiHeight;
  v30 = v29->m_pObject->m_uiWidth;
  v31 = Font::Get(0);
  pkTexture8k = (NiSourceTexture *)PgWinText::CreateWin(
                                     uiLeft - v8,
                                     uiTop - v9,
                                     v30,
                                     (unsigned int)pkTexture8j,
                                     v31,
                                     (PgWin *)&v2->vfptr,
                                     0,
                                     0);
  pkTexture8k->vfptr[122].__vecDelDtor((NiRefObject *)pkTexture8k, 5u);
  v32 = (unsigned int)pkTexture8k->vfptr;
  v33 = TextData2::Get(0xCFDBDA42);
  (*(void (__thiscall **)(NiSourceTexture *, NiUnsharedGeometryGroup *))(v32 + 472))(pkTexture8k, v33);
  ((void (__stdcall *)(_DWORD))pkTexture8k->vfptr[60].__vecDelDtor)(0);
  pkTexture8l = (NiSourceTexture *)PgSprData::Create(
                                     (NiAVObject *)&spNode.m_pObject->vfptr,
                                     "GuildName01",
                                     &uiLeft,
                                     &uiTop,
                                     0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop, (PgSprData *)pkTexture8l, (PgWin *)&v2->vfptr, 0, 0);
  v34 = *(_DWORD *)pkTexture8l->m_kFormatPrefs.m_eMipMapped;
  v35 = g_pkToolTipWin;
  pkTexture8m = *(NiSourceTexture **)(v34 + 24);
  v36 = *(_DWORD *)(v34 + 20);
  v37 = Font::Get(0);
  v38 = PgWinAbbreviateText::CreateWin(
          uiLeft - v8,
          uiTop - v9,
          v36,
          (unsigned int)pkTexture8m,
          v37,
          (PgWin *)&v2->vfptr,
          0,
          0,
          0,
          1,
          v35,
          0x1Eu);
  v2->m_pkMyGuildName = (PgWinText *)v38;
  v38->vfptr[122].__vecDelDtor((NiRefObject *)v38, 5u);
  ((void (__stdcall *)(void *))v2->m_pkMyGuildName->vfptr[118].__vecDelDtor)(&unk_9AE756);
  pkTexture8n = (NiSourceTexture *)PgSprData::Create(
                                     (NiAVObject *)&spNode.m_pObject->vfptr,
                                     "GuildName02",
                                     &uiLeft,
                                     &uiTop,
                                     0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop, (PgSprData *)pkTexture8n, (PgWin *)&v2->vfptr, 0, 0);
  v39 = *(_DWORD *)pkTexture8n->m_kFormatPrefs.m_eMipMapped;
  v40 = g_pkToolTipWin;
  pkTexture8o = *(NiSourceTexture **)(v39 + 24);
  v41 = *(_DWORD *)(v39 + 20);
  v42 = Font::Get(0);
  v43 = PgWinAbbreviateText::CreateWin(
          uiLeft - v8,
          uiTop - v9,
          v41,
          (unsigned int)pkTexture8o,
          v42,
          (PgWin *)&v2->vfptr,
          0,
          0,
          0,
          1,
          v40,
          0x1Eu);
  v2->m_pkEnemyGuildName = (PgWinText *)v43;
  v43->vfptr[122].__vecDelDtor((NiRefObject *)v43, 5u);
  ((void (__stdcall *)(void *))v2->m_pkEnemyGuildName->vfptr[118].__vecDelDtor)(&unk_9AE757);
  pkTexture8p = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Score01", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop, pkTexture8p, (PgWin *)&v2->vfptr, 0, 0);
  v44 = pkTexture8p->m_akHitTester.m_pBase;
  pkTexture8q = (NiSourceTexture *)v44->m_pObject->m_uiHeight;
  v45 = v44->m_pObject->m_uiWidth;
  v46 = Font::Get(0);
  v47 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9, v45, (unsigned int)pkTexture8q, v46, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkMyGuildTotalScore = v47;
  v47->vfptr[122].__vecDelDtor((NiRefObject *)v47, 5u);
  ((void (__stdcall *)(void *))v2->m_pkMyGuildTotalScore->vfptr[118].__vecDelDtor)(&unk_9AE761);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyGuildTotalScore->vfptr[60].__vecDelDtor)(0);
  pkTexture8r = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Score02", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop, pkTexture8r, (PgWin *)&v2->vfptr, 0, 0);
  v48 = pkTexture8r->m_akHitTester.m_pBase;
  pkTexture8s = (NiSourceTexture *)v48->m_pObject->m_uiHeight;
  v49 = v48->m_pObject->m_uiWidth;
  v50 = Font::Get(0);
  v51 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9, v49, (unsigned int)pkTexture8s, v50, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkEnemyGuildTotalScore = v51;
  v51->vfptr[122].__vecDelDtor((NiRefObject *)v51, 5u);
  ((void (__stdcall *)(void *))v2->m_pkEnemyGuildTotalScore->vfptr[118].__vecDelDtor)(&unk_9AE762);
  ((void (__stdcall *)(_DWORD))v2->m_pkEnemyGuildTotalScore->vfptr[60].__vecDelDtor)(0);
  pkTexture8t = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Flag01", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop, pkTexture8t, (PgWin *)&v2->vfptr, 0, 0);
  v52 = pkTexture8t->m_akHitTester.m_pBase;
  pkTexture8u = (NiSourceTexture *)v52->m_pObject->m_uiHeight;
  v53 = v52->m_pObject->m_uiWidth;
  v54 = Font::Get(0);
  v55 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9, v53, (unsigned int)pkTexture8u, v54, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkMyGuildCaptureFlag = v55;
  v55->vfptr[122].__vecDelDtor((NiRefObject *)v55, 5u);
  ((void (__stdcall *)(void *))v2->m_pkMyGuildCaptureFlag->vfptr[118].__vecDelDtor)(&unk_9AE763);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyGuildCaptureFlag->vfptr[60].__vecDelDtor)(0);
  pkTexture8v = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Flag02", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop, pkTexture8v, (PgWin *)&v2->vfptr, 0, 0);
  v56 = pkTexture8v->m_akHitTester.m_pBase;
  pkTexture8w = (NiSourceTexture *)v56->m_pObject->m_uiHeight;
  v57 = v56->m_pObject->m_uiWidth;
  v58 = Font::Get(0);
  v59 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9, v57, (unsigned int)pkTexture8w, v58, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkEnemyGuildCaptureFlag = v59;
  v59->vfptr[122].__vecDelDtor((NiRefObject *)v59, 5u);
  ((void (__stdcall *)(void *))v2->m_pkEnemyGuildCaptureFlag->vfptr[118].__vecDelDtor)(&unk_9AE77A);
  ((void (__stdcall *)(_DWORD))v2->m_pkEnemyGuildCaptureFlag->vfptr[60].__vecDelDtor)(0);
  pkTexture8x = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MaxNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(pkTexture8x, (NiAVObject *)&spNode.m_pObject->vfptr, "MaxClick");
  PgSprData::Add(pkTexture8x, (NiAVObject *)&spNode.m_pObject->vfptr, "MaxOver");
  PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, pkTexture8x, (PgWin *)&v2->vfptr, 0, 0, 0);
  pkTexture8 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    pkTexture8y = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, pkTexture8);
    PgSprData::Add(pkTexture8y, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(pkTexture8y, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, pkTexture8y, (PgWin *)&v2->vfptr, 1u, 0, 0);
  }
  ((void (__thiscall *)(GTStatusMiniWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.80000001,
    0.40000001);
  v60 = spNode.m_pObject;
  v65 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v60 )
    v60->vfptr->__vecDelDtor((NiRefObject *)v60, 1u);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005CF410) --------------------------------------------------------
GTStatusMiniWin *__cdecl GTStatusMiniWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  GTStatusMiniWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x188u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&GTStatusMiniWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&GTStatusMiniWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][1]) = 0;
    LOBYTE(v2[1].m_kLocal.m_Translate.z) = 0;
    LODWORD(v2[1].m_kLocal.m_fScale) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (GTStatusMiniWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9AEB50: using guessed type void (__thiscall *GTStatusMiniWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AEB6C: using guessed type int (__thiscall *GTStatusMiniWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005CF570) --------------------------------------------------------
void __thiscall GTStatusWin::AddRankPlayerInfo(GTStatusWin *this, GTStatusWin::RankInfo *rInfo)
{
  GTStatusWin *v2; // edi@1
  const char *v3; // eax@1
  bool v4; // cf@1
  const char *v5; // eax@2
  unsigned int v6; // ebx@4
  const char *v7; // eax@4
  unsigned int v8; // eax@4
  const char *v9; // edx@5
  const char *v10; // ecx@9
  unsigned int v11; // eax@12
  int v12; // ecx@14
  int v13; // eax@14
  int v14; // edx@14
  CClientGuild *v15; // eax@15
  int b; // [sp+10h] [bp-B0h]@0
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strMainName; // [sp+14h] [bp-ACh]@1
  char Name[128]; // [sp+30h] [bp-90h]@4
  int v19; // [sp+BCh] [bp-4h]@1

  v2 = this;
  v3 = (const char *)((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)();
  strMainName._Myres = 15;
  strMainName._Mysize = 0;
  strMainName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strMainName, v3, strlen(v3));
  v4 = rInfo->m_strName._Myres < 0x10;
  v19 = 0;
  if ( v4 )
    v5 = (const char *)rInfo;
  else
    v5 = rInfo->m_strName._Bx._Ptr;
  v6 = SlideListWin::AddText(v2->m_pkGTScoreList, v5);
  v7 = Guild::GetMemberGradeString(rInfo->m_unGrade);
  SlideListWin::SetText(v2->m_pkGTScoreList, v6, 1u, v7);
  sprintf(Name, "%d", rInfo->m_unIncreaseScore);
  SlideListWin::SetText(v2->m_pkGTScoreList, v6, 2u, Name);
  sprintf(Name, "%d", rInfo->m_unDecreaseScore);
  SlideListWin::SetText(v2->m_pkGTScoreList, v6, 3u, Name);
  sprintf(Name, "%d", rInfo->m_unKillCount);
  SlideListWin::SetText(v2->m_pkGTScoreList, v6, 4u, Name);
  sprintf(Name, "%d", rInfo->m_unDieCount);
  SlideListWin::SetText(v2->m_pkGTScoreList, v6, 5u, Name);
  sprintf(Name, "%d", rInfo->m_unCaptureFlag);
  SlideListWin::SetText(v2->m_pkGTScoreList, v6, 6u, Name);
  v8 = rInfo->m_strName._Mysize;
  if ( rInfo->m_strName._Myres < 0x10 )
    v9 = (const char *)rInfo;
  else
    v9 = rInfo->m_strName._Bx._Ptr;
  if ( strMainName._Mysize < v8 )
    v8 = strMainName._Mysize;
  v10 = strMainName._Bx._Ptr;
  if ( strMainName._Myres < 0x10 )
    v10 = (const char *)&strMainName;
  if ( !std::char_traits<char>::compare(v10, v9, v8) )
  {
    v11 = rInfo->m_strName._Mysize;
    if ( strMainName._Mysize >= v11 && strMainName._Mysize == v11 )
    {
      v12 = 245;
      v13 = (strMainName._Mysize != v11) + 116;
      v14 = 250;
      goto LABEL_24;
    }
  }
  v15 = GuildTask::GetGuild();
  if ( v15 && v15->m_bOpserver )
  {
    if ( v2->m_uiTabNum )
      goto LABEL_28;
    if ( GuildTask::GetGuildTournamentImprove()->m_RedTeam == rInfo->m_kGuildReg )
    {
      v12 = 0;
      v13 = 255;
      v14 = 0;
      goto LABEL_24;
    }
    if ( GuildTask::GetGuildTournamentImprove()->m_BlueTeam != rInfo->m_kGuildReg )
    {
LABEL_28:
      v13 = b;
      v12 = b;
      v14 = b;
    }
    else
    {
      v13 = 62;
      v12 = 158;
      v14 = 255;
    }
  }
  else
  {
    v13 = 255;
    v12 = 255;
    v14 = 0;
  }
LABEL_24:
  SlideListWin::SetFontColor(v2->m_pkGTScoreList, v6, v13, v12, v14);
  if ( strMainName._Myres >= 0x10 )
    operator delete(strMainName._Bx._Ptr);
}

//----- (005CF820) --------------------------------------------------------
void __thiscall GTStatusWin::DisplayInfoSetting(GTStatusWin *this)
{
  GTStatusWin *v1; // edi@1
  const char *v2; // eax@1
  GTStatusWin::RankInfo *v3; // esi@1
  signed int v4; // ecx@1
  unsigned int v5; // eax@3
  GTStatusWin::RankInfo *v6; // ebx@3
  unsigned int v7; // esi@3
  const char *v8; // edx@4
  unsigned int v9; // ecx@6
  const char *v10; // eax@8
  int v11; // eax@10
  unsigned int v12; // ecx@10
  const char *v13; // edx@15
  const char *v14; // eax@19
  GTStatusWin::RankInfo *v15; // esi@27
  unsigned int v16; // edx@27
  GTStatusWin::RankInfo *v17; // ebx@29
  int v18; // ecx@30
  unsigned int v19; // edx@32
  void *v20; // esi@34
  signed int v21; // eax@40
  int v22; // eax@47
  unsigned int v23; // eax@51
  unsigned int v24; // eax@53
  unsigned int v25; // edx@60
  unsigned int v26; // [sp+10h] [bp-38h]@3
  unsigned int v27; // [sp+10h] [bp-38h]@27
  unsigned int i; // [sp+14h] [bp-34h]@1
  unsigned int ia; // [sp+14h] [bp-34h]@28
  GTStatusWin::RankInfo *rInfo; // [sp+18h] [bp-30h]@2
  GTStatusWin::RankInfo *rInfoa; // [sp+18h] [bp-30h]@29
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strMainName; // [sp+1Ch] [bp-2Ch]@1
  int v33; // [sp+44h] [bp-4h]@1

  v1 = this;
  SlideListWin::RemoveAllList(this->m_pkGTScoreList);
  v2 = (const char *)((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)();
  strMainName._Myres = 15;
  strMainName._Mysize = 0;
  strMainName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strMainName, v2, strlen(v2));
  v3 = v1->m_vecRankInfos._Myfirst;
  v4 = (char *)v1->m_vecRankInfos._Mylast - (char *)v3;
  v33 = 0;
  i = 0;
  if ( v4 / 56 )
  {
    rInfo = 0;
    do
    {
      v5 = *(unsigned int *)((char *)&rInfo->m_strName._Myres + (_DWORD)v3);
      v6 = (GTStatusWin::RankInfo *)((char *)rInfo + (_DWORD)v3);
      v7 = *(unsigned int *)((char *)&rInfo->m_strName._Mysize + (_DWORD)v3);
      v26 = v5;
      if ( v5 < 0x10 )
        v8 = (const char *)v6;
      else
        v8 = v6->m_strName._Bx._Ptr;
      v9 = strMainName._Mysize;
      if ( strMainName._Mysize >= v7 )
        v9 = v7;
      v10 = strMainName._Bx._Ptr;
      if ( strMainName._Myres < 0x10 )
        v10 = (const char *)&strMainName;
      v11 = std::char_traits<char>::compare(v10, v8, v9);
      v12 = strMainName._Mysize;
      if ( !v11 && strMainName._Mysize >= v7 )
      {
        LOBYTE(v11) = strMainName._Mysize != v7;
        if ( !v11 && !v1->m_uiTabNum )
          goto LABEL_65;
      }
      if ( v26 < 0x10 )
        v13 = (const char *)v6;
      else
        v13 = v6->m_strName._Bx._Ptr;
      if ( strMainName._Mysize >= v7 )
        v12 = v7;
      v14 = strMainName._Bx._Ptr;
      if ( strMainName._Myres < 0x10 )
        v14 = (const char *)&strMainName;
      if ( !std::char_traits<char>::compare(v14, v13, v12)
        && strMainName._Mysize >= v7
        && strMainName._Mysize == v7
        && v1->m_uiTabNum == 1 )
      {
LABEL_65:
        GTStatusWin::AddRankPlayerInfo(v1, v6);
      }
      v3 = v1->m_vecRankInfos._Myfirst;
      ++rInfo;
      ++i;
    }
    while ( i < v1->m_vecRankInfos._Mylast - v3 );
  }
  v15 = v1->m_vecRankInfos._Myfirst;
  v16 = (signed int)((char *)v15
                   + (unsigned int)(((unsigned __int64)(-1840700269i64
                                                      * (unsigned int)((char *)v1->m_vecRankInfos._Mylast - (char *)v15)) >> 32)
                                  - (unsigned int)v1->m_vecRankInfos._Mylast)) >> 5;
  v27 = 0;
  if ( v16 + (v16 >> 31) )
  {
    ia = 0;
    do
    {
      v17 = &v15[ia];
      rInfoa = &v15[ia];
      if ( v15[ia].m_strName._Myres < 0x10 )
        v18 = (int)&v15[ia];
      else
        v18 = (int)v17->m_strName._Bx._Ptr;
      v19 = strMainName._Mysize;
      if ( strMainName._Mysize >= v15[ia].m_strName._Mysize )
        v19 = v15[ia].m_strName._Mysize;
      v20 = strMainName._Bx._Ptr;
      if ( strMainName._Myres < 0x10 )
        v20 = &strMainName;
      if ( v19 < 4 )
      {
LABEL_39:
        if ( !v19 )
          goto LABEL_49;
      }
      else
      {
        while ( *(_DWORD *)v20 == *(_DWORD *)v18 )
        {
          v19 -= 4;
          v18 += 4;
          v20 = (char *)v20 + 4;
          if ( v19 < 4 )
            goto LABEL_39;
        }
      }
      v21 = *(_BYTE *)v20 - *(_BYTE *)v18;
      if ( *(_BYTE *)v20 == *(_BYTE *)v18 )
      {
        if ( v19 <= 1 )
          goto LABEL_48;
        v21 = *((_BYTE *)v20 + 1) - *(_BYTE *)(v18 + 1);
        if ( *((_BYTE *)v20 + 1) == *(_BYTE *)(v18 + 1) )
        {
          if ( v19 <= 2 )
            goto LABEL_48;
          v21 = *((_BYTE *)v20 + 2) - *(_BYTE *)(v18 + 2);
          if ( *((_BYTE *)v20 + 2) == *(_BYTE *)(v18 + 2) )
          {
            if ( v19 <= 3 )
            {
LABEL_48:
              v17 = rInfoa;
LABEL_49:
              v22 = 0;
              goto LABEL_50;
            }
            v21 = *((_BYTE *)v20 + 3) - *(_BYTE *)(v18 + 3);
          }
        }
      }
      v17 = rInfoa;
      v22 = (v21 >> 31) | 1;
LABEL_50:
      if ( !v22 )
      {
        v23 = v17->m_strName._Mysize;
        if ( strMainName._Mysize >= v23 && strMainName._Mysize == v23 )
          goto LABEL_60;
      }
      v24 = v1->m_uiTabNum;
      if ( !v24 )
        goto LABEL_59;
      if ( v24 != 1 )
      {
        if ( v24 != 2 || v17->m_kGuildReg == g_pkMainChar->m_dwGuildRegNum )
          goto LABEL_60;
LABEL_59:
        GTStatusWin::AddRankPlayerInfo(v1, v17);
        goto LABEL_60;
      }
      if ( v17->m_kGuildReg == g_pkMainChar->m_dwGuildRegNum )
        goto LABEL_59;
LABEL_60:
      v15 = v1->m_vecRankInfos._Myfirst;
      ++ia;
      v25 = (signed int)((char *)v15
                       + (unsigned int)(((unsigned __int64)(-1840700269i64
                                                          * (unsigned int)((char *)v1->m_vecRankInfos._Mylast
                                                                         - (char *)v15)) >> 32)
                                      - (unsigned int)v1->m_vecRankInfos._Mylast)) >> 5;
      ++v27;
    }
    while ( v27 < v25 + (v25 >> 31) );
  }
  SlideListWin::UpdateViewList(v1->m_pkGTScoreList);
  if ( strMainName._Myres >= 0x10 )
    operator delete(strMainName._Bx._Ptr);
}

//----- (005CFB30) --------------------------------------------------------
void __thiscall GTStatusWin::GTStatusWin(GTStatusWin *this)
{
  GTStatusWin *v1; // esi@1
  int v2; // edi@1
  void *v3; // eax@1
  boost::detail::function::any_pointer (__cdecl *v4)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // ecx@1
  boost::detail::function::any_pointer (__cdecl *v5)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // edx@4
  void *v6; // ecx@4
  boost::detail::function::any_pointer (__cdecl *v7)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp+10h] [bp-1Ch]@2
  int (__cdecl *v8)(boost::detail::function::any_pointer, GuildListWin::GuildInfo *, GuildListWin::GuildInfo *); // [sp+18h] [bp-14h]@1
  GTStatusWin *v9; // [sp+1Ch] [bp-10h]@1
  int v10; // [sp+28h] [bp-4h]@1

  v1 = this;
  v9 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GTStatusWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GTStatusWin::`vftable'{for `IDirectMessenger'};
  v1->m_strPlayerName._Myres = 15;
  v1->m_strPlayerName._Mysize = 0;
  v10 = 0;
  v1->m_strPlayerName._Bx._Buf[0] = 0;
  v1->m_vecRankInfos._Myfirst = 0;
  v1->m_vecRankInfos._Mylast = 0;
  v1->m_vecRankInfos._Myend = 0;
  v2 = (int)&v1->m_SortPradicationFunc;
  *(_DWORD *)v2 = 0;
  *(_DWORD *)(v2 + 4) = 0;
  *(_DWORD *)(v2 + 8) = 0;
  v3 = 0;
  v4 = 0;
  LOBYTE(v10) = 3;
  v1->m_uiTabNum = 0;
  v8 = 0;
  if ( PkRealTiemRankWin::RankInfo::greater_Score )
  {
    v8 = boost::detail::function::function_invoker2<bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),bool,GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &>::invoke;
    v7 = boost::detail::function::functor_manager<bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>::manage;
    v3 = boost::detail::function::functor_manager<bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>::manage(
           (boost::detail::function::any_pointer)PkRealTiemRankWin::RankInfo::greater_Score,
           0).obj_ptr;
    v4 = boost::detail::function::functor_manager<bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>::manage;
  }
  if ( (boost::detail::function::any_pointer (__cdecl **)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type))v2 != &v7 )
  {
    v5 = *(boost::detail::function::any_pointer (__cdecl **)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type))v2;
    *(_DWORD *)v2 = v4;
    v6 = v3;
    v3 = v1->m_SortPradicationFunc.functor.obj_ptr;
    v1->m_SortPradicationFunc.functor.obj_ptr = v6;
    v1->m_SortPradicationFunc.invoker = (bool (__cdecl *)(boost::detail::function::any_pointer, GTStatusWin::RankInfo *, GTStatusWin::RankInfo *))v8;
    v7 = v5;
    v4 = v5;
  }
  if ( v4 )
    ((void (__cdecl *)(void *, signed int))v4)(v3, 1);
  v1->m_bGame = 0;
}
// 9AED90: using guessed type void (__thiscall *GTStatusWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AEDAC: using guessed type int (__thiscall *GTStatusWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005CFC30) --------------------------------------------------------
void __thiscall GTStatusWin::~GTStatusWin(GTStatusWin *this)
{
  GTStatusWin *v1; // esi@1
  GTStatusWin::RankInfo *v2; // eax@3

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&GTStatusWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GTStatusWin::`vftable'{for `IDirectMessenger'};
  if ( this->m_SortPradicationFunc.manager )
    this->m_SortPradicationFunc.functor.obj_ptr = (void *)((int (__cdecl *)(_DWORD, _DWORD))this->m_SortPradicationFunc.manager)(
                                                            this->m_SortPradicationFunc.functor.obj_ptr,
                                                            1);
  v1->m_SortPradicationFunc.manager = 0;
  v1->m_SortPradicationFunc.invoker = 0;
  v2 = v1->m_vecRankInfos._Myfirst;
  if ( v2 )
  {
    std::_Destroy_range<std::allocator<GTStatusWin::RankInfo>>(v2, v1->m_vecRankInfos._Mylast);
    operator delete(v1->m_vecRankInfos._Myfirst);
  }
  v1->m_vecRankInfos._Myfirst = 0;
  v1->m_vecRankInfos._Mylast = 0;
  v1->m_vecRankInfos._Myend = 0;
  if ( v1->m_strPlayerName._Myres >= 0x10 )
    operator delete(v1->m_strPlayerName._Bx._Ptr);
  v1->m_strPlayerName._Myres = 15;
  v1->m_strPlayerName._Mysize = 0;
  v1->m_strPlayerName._Bx._Buf[0] = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9AED90: using guessed type void (__thiscall *GTStatusWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AEDAC: using guessed type int (__thiscall *GTStatusWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005CFD40) --------------------------------------------------------
GTStatusWin *__cdecl GTStatusWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  GTStatusWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1C8u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    GTStatusWin::GTStatusWin((GTStatusWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (GTStatusWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (005CFE70) --------------------------------------------------------
void __thiscall GTStatusWin::Clear(GTStatusWin *this)
{
  GTStatusWin *v1; // esi@1
  GTStatusWin::RankInfo *v2; // eax@1
  GTStatusWin::RankInfo *v3; // ecx@1
  GTStatusWin::RankInfo *v4; // edi@2

  v1 = this;
  v2 = this->m_vecRankInfos._Mylast;
  v3 = this->m_vecRankInfos._Myfirst;
  if ( v3 != v2 )
  {
    v4 = std::_Move<GTStatusWin::RankInfo *,GTStatusWin::RankInfo *>(v2, v2, v3);
    std::_Destroy_range<std::allocator<GTStatusWin::RankInfo>>(v4, v1->m_vecRankInfos._Mylast);
    v1->m_vecRankInfos._Mylast = v4;
  }
  SlideListWin::RemoveAllList(v1->m_pkGTScoreList);
  SlideListWin::UpdateViewList(v1->m_pkGTScoreList);
}

//----- (005CFEE0) --------------------------------------------------------
char __thiscall GTStatusWin::Create(GTStatusWin *this, PgFrameWork *pkFrameWork)
{
  GTStatusWin *v2; // esi@1
  char result; // al@6
  NiTexturePalette *v4; // ebx@7
  const char *v5; // eax@9
  PgSprData *v6; // eax@10
  NiNode *v7; // esi@11
  int v8; // edi@16
  int v9; // ebx@16
  NiSourceTexture *v10; // eax@16
  PgSprData *v11; // eax@17
  PgSprData::PgHitTester *v12; // eax@19
  SLWCreateInfo::Item *v13; // edx@19
  PgFont *v14; // eax@19
  SLWCreateInfo::Item *v15; // eax@19
  int v16; // edx@19
  NiUnsharedGeometryGroup *v17; // eax@19
  PgSprData *v18; // eax@19
  PgSprData *v19; // eax@19
  ColumnBut *v20; // eax@19
  SLWCreateInfo::Item *v21; // edx@19
  int v22; // eax@19
  SLWCreateInfo::Item *v23; // edx@19
  PgFont *v24; // eax@19
  PgWinText *v25; // eax@19
  NiUnsharedGeometryGroup *v26; // eax@19
  int v27; // ecx@19
  SLWCreateInfo::Item *v28; // eax@19
  PgFont *v29; // eax@19
  PgWinText *v30; // eax@19
  NiUnsharedGeometryGroup *v31; // eax@19
  int v32; // ecx@19
  SLWCreateInfo::Item *v33; // eax@19
  PgFont *v34; // eax@19
  PgWinText *v35; // eax@19
  NiUnsharedGeometryGroup *v36; // eax@19
  SLWCreateInfo::Item *v37; // eax@19
  SLWCreateInfo::Item *v38; // eax@26
  int v39; // STC8_4@26
  char *v40; // eax@26
  char *v41; // ecx@26
  char v42; // dl@27
  int v43; // eax@30
  SLWCreateInfo::Item *v44; // ecx@30
  PgSprData *v45; // eax@33
  SlideListWin *v46; // eax@33
  PgSprData *v47; // eax@33
  SlideBar *v48; // eax@33
  int v49; // eax@33
  NiSourceTexture *v50; // ecx@33
  int (*v51)(void); // eax@33
  int v52; // eax@33
  int v53; // eax@33
  int v54; // eax@33
  int v55; // edx@33
  PgFont *v56; // eax@33
  SLWCreateInfo::Item *v57; // eax@33
  int v58; // edx@33
  NiUnsharedGeometryGroup *v59; // eax@33
  int v60; // eax@33
  int v61; // edx@33
  PgFont *v62; // eax@33
  SLWCreateInfo::Item *v63; // eax@33
  int v64; // edx@33
  NiUnsharedGeometryGroup *v65; // eax@33
  int v66; // eax@33
  int v67; // edx@33
  PgFont *v68; // eax@33
  SLWCreateInfo::Item *v69; // eax@33
  int v70; // edx@33
  NiUnsharedGeometryGroup *v71; // eax@33
  int v72; // eax@33
  int v73; // edx@33
  PgFont *v74; // eax@33
  SLWCreateInfo::Item *v75; // eax@33
  int v76; // edx@33
  NiUnsharedGeometryGroup *v77; // eax@33
  int v78; // eax@33
  int v79; // edx@33
  PgFont *v80; // eax@33
  SLWCreateInfo::Item *v81; // eax@33
  int v82; // edx@33
  NiUnsharedGeometryGroup *v83; // eax@33
  int v84; // eax@33
  int v85; // edx@33
  PgFont *v86; // eax@33
  SLWCreateInfo::Item *v87; // eax@33
  int v88; // edx@33
  NiUnsharedGeometryGroup *v89; // eax@33
  int v90; // eax@33
  int v91; // edx@33
  PgFont *v92; // eax@33
  SLWCreateInfo::Item *v93; // eax@33
  int v94; // edx@33
  NiUnsharedGeometryGroup *v95; // eax@33
  NiSourceTexture *v96; // eax@33
  NiRefObjectVtbl *v97; // edx@33
  PgSprData::PgHitTester *v98; // eax@35
  int v99; // edx@35
  PgFont *v100; // eax@35
  PgWinText *v101; // eax@35
  PgSprData::PgHitTester *v102; // eax@35
  int v103; // edx@35
  PgFont *v104; // eax@35
  PgWinText *v105; // eax@35
  PgSprData::PgHitTester *v106; // eax@35
  int v107; // edx@35
  PgFont *v108; // eax@35
  PgWinText *v109; // eax@35
  PgSprData::PgHitTester *v110; // eax@35
  int v111; // edx@35
  PgFont *v112; // eax@35
  PgWinText *v113; // eax@35
  NiNode *v114; // esi@37
  SLWCreateInfo kCreateInfo; // [sp+DCh] [bp-64h]@19
  NiSourceTexture *pkTexture; // [sp+F8h] [bp-48h]@1
  NiSourceTexture *pkTexture8; // [sp+FCh] [bp-44h]@26
  int i; // [sp+100h] [bp-40h]@19
  NiPointer<NiNode> spNode; // [sp+104h] [bp-3Ch]@1
  int uiLeft; // [sp+108h] [bp-38h]@10
  int uiTop; // [sp+10Ch] [bp-34h]@10
  SLWCreateInfo::Item *pCIItem; // [sp+110h] [bp-30h]@19
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+114h] [bp-2Ch]@19
  int v124; // [sp+13Ch] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v124 = 0;
  pkTexture = MenuTexMgr::GetTexture(4u);
  if ( !pkTexture )
  {
    v124 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( spNode.m_pObject )
        spNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spNode.m_pObject, 1u);
    }
    return 0;
  }
  v4 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildTBattleStatus.nif");
  PgUtil::LoadNodeNifFile(v5, &spNode, v4);
  if ( !spNode.m_pObject )
    return 0;
  v6 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v6, 0, pkFrameWork, "GTStatusWin", 0) )
  {
    v8 = uiLeft;
    v9 = uiTop;
    v10 = MenuTexMgr::GetTexture(0x13u);
    if ( v10 )
      v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
    else
      v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v11, (PgWin *)&v2->vfptr, 0, 0);
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
    v13 = (SLWCreateInfo::Item *)v12->m_uiWidth;
    i = v12->m_uiHeight;
    pCIItem = v13;
    v14 = Font::Get(0);
    v15 = (SLWCreateInfo::Item *)PgWinText::CreateWin(
                                   uiLeft - v8,
                                   uiTop - v9,
                                   (unsigned int)pCIItem,
                                   i,
                                   v14,
                                   (PgWin *)&v2->vfptr,
                                   0,
                                   0);
    v16 = v15->nItemType;
    pCIItem = v15;
    (*(void (__thiscall **)(SLWCreateInfo::Item *, signed int))(v16 + 488))(v15, 5);
    i = pCIItem->nItemType + 472;
    v17 = TextData2::Get(0x34A29797u);
    (*(void (__thiscall **)(SLWCreateInfo::Item *, NiUnsharedGeometryGroup *))i)(pCIItem, v17);
    (*(void (__stdcall **)(_DWORD))(pCIItem->nItemType + 240))(0);
    v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v8, uiTop, v18, (PgWin *)&v2->vfptr, 0, 0);
    v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v8, uiTop, v19, (PgWin *)&v2->vfptr, 0, 0);
    pCIItem = (SLWCreateInfo::Item *)PgSprData::Create(
                                       (NiAVObject *)&spNode.m_pObject->vfptr,
                                       "Tab01",
                                       &uiLeft,
                                       &uiTop,
                                       pkTexture);
    PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "Tab01Text");
    v20 = ColumnBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pCIItem, (PgWin *)&v2->vfptr, 0, 0);
    v21 = pCIItem;
    v2->m_pkTabAll = v20;
    v22 = **(_DWORD **)&v21->mapSprDataWinState._Alnod.0;
    v23 = *(SLWCreateInfo::Item **)(v22 + 20);
    i = *(_DWORD *)(v22 + 24);
    pCIItem = v23;
    v24 = Font::Get(MAIN_MENU);
    v25 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9 + 1, (unsigned int)pCIItem, i, v24, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkTextTabAll = v25;
    v25->vfptr[122].__vecDelDtor((NiRefObject *)v25, 5u);
    i = (int)&v2->m_pkTextTabAll->vfptr[118];
    v26 = TextData2::Get(0x3A533D48u);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))i)(v2->m_pkTextTabAll, v26);
    ((void (__stdcall *)(_DWORD))v2->m_pkTextTabAll->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(D3DXCOLOR *))v2->m_pkTextTabAll->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
    pCIItem = (SLWCreateInfo::Item *)PgSprData::Create(
                                       (NiAVObject *)&spNode.m_pObject->vfptr,
                                       "Tab02",
                                       &uiLeft,
                                       &uiTop,
                                       pkTexture);
    PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "Tab02Text");
    v2->m_pkTabMy = ColumnBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pCIItem, (PgWin *)&v2->vfptr, 1u, 0);
    v27 = *(_DWORD *)&pCIItem->mapSprDataWinState._Alnod.0;
    v28 = *(SLWCreateInfo::Item **)(*(_DWORD *)v27 + 20);
    i = *(_DWORD *)(*(_DWORD *)v27 + 24);
    pCIItem = v28;
    v29 = Font::Get(MAIN_MENU);
    v30 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9 + 1, (unsigned int)pCIItem, i, v29, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkTextTabMy = v30;
    v30->vfptr[122].__vecDelDtor((NiRefObject *)v30, 5u);
    i = (int)&v2->m_pkTextTabMy->vfptr[118];
    v31 = TextData2::Get(0xEE604948);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))i)(v2->m_pkTextTabMy, v31);
    ((void (__stdcall *)(_DWORD))v2->m_pkTextTabMy->vfptr[60].__vecDelDtor)(0);
    pCIItem = (SLWCreateInfo::Item *)PgSprData::Create(
                                       (NiAVObject *)&spNode.m_pObject->vfptr,
                                       "Tab03",
                                       &uiLeft,
                                       &uiTop,
                                       pkTexture);
    PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "Tab03Text");
    v2->m_pkTabEnemy = ColumnBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pCIItem, (PgWin *)&v2->vfptr, 2u, 0);
    v32 = *(_DWORD *)&pCIItem->mapSprDataWinState._Alnod.0;
    v33 = *(SLWCreateInfo::Item **)(*(_DWORD *)v32 + 20);
    i = *(_DWORD *)(*(_DWORD *)v32 + 24);
    pCIItem = v33;
    v34 = Font::Get(MAIN_MENU);
    v35 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9 + 1, (unsigned int)pCIItem, i, v34, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkTextEnemy = v35;
    v35->vfptr[122].__vecDelDtor((NiRefObject *)v35, 5u);
    i = (int)&v2->m_pkTextEnemy->vfptr[118];
    v36 = TextData2::Get(0x33559A95u);
    (*(void (__thiscall **)(_DWORD, _DWORD))i)(v2->m_pkTextEnemy, v36);
    ((void (__stdcall *)(_DWORD))v2->m_pkTextEnemy->vfptr[60].__vecDelDtor)(0);
    kCreateInfo.m_arrItem._Myfirst = 0;
    kCreateInfo.m_arrItem._Mylast = 0;
    kCreateInfo.m_arrItem._Myend = 0;
    kCreateInfo.m_bMakeData = 0;
    kCreateInfo.m_nOffX = 0;
    kCreateInfo.m_nOffY = 0;
    LOBYTE(v124) = 1;
    v37 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
    v37->nItemType = 1;
    v37->pNode = spNode.m_pObject;
    pCIItem = v37;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBar01Nor", 0xEu);
    LOBYTE(v124) = 2;
    i = (int)&pCIItem->vecNodeName;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      &pCIItem->vecNodeName,
      &_Val);
    LOBYTE(v124) = 1;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBar01Click", 0x10u);
    LOBYTE(v124) = 3;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)i,
      &_Val);
    LOBYTE(v124) = 1;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBar01Over", 0xFu);
    LOBYTE(v124) = 4;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)i,
      &_Val);
    LOBYTE(v124) = 1;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    i = 1;
    do
    {
      v38 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      v39 = i;
      pCIItem = v38;
      v38->nItemType = 2;
      v40 = fs("Column0%d", v39);
      v41 = v40;
      _Val._Myres = 15;
      _Val._Mysize = 0;
      _Val._Bx._Buf[0] = 0;
      pkTexture8 = (NiSourceTexture *)(v40 + 1);
      do
        v42 = *v41++;
      while ( v42 );
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, v40, v41 - (char *)pkTexture8);
      LOBYTE(v124) = 5;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        &pCIItem->vecNodeName,
        &_Val);
      LOBYTE(v124) = 1;
      if ( _Val._Myres >= 0x10 )
        operator delete(_Val._Bx._Ptr);
      v43 = i;
      v44 = pCIItem;
      _Val._Myres = 15;
      _Val._Mysize = 0;
      _Val._Bx._Buf[0] = 0;
      pCIItem->pNode = spNode.m_pObject;
      if ( v43 == 1 )
        v44->bAbbreviatable = 1;
      i = v43 + 1;
    }
    while ( v43 + 1 < 8 );
    kCreateInfo.m_nOffX = 7;
    kCreateInfo.m_nOffY = 0;
    SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
    v45 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SubText01", &uiLeft, &uiTop, pkTexture);
    v46 = SlideListWin::CreateWin(uiLeft - v8, uiTop - v9, v45, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
    v2->m_pkGTScoreList = v46;
    SlideListWin::UpdateViewList(v46);
    v47 = PgSprData::Create(
            (NiAVObject *)&spNode.m_pObject->vfptr,
            "SlideBar_SlideBtnMiddle",
            &uiLeft,
            &uiTop,
            pkTexture);
    v48 = SlideBar::CreateWin(
            spNode.m_pObject,
            "SlideBar",
            "SlideBar_UpBtn",
            "SlideBar_DnBtn",
            v47,
            0,
            (PgWin *)&v2->vfptr);
    v2->m_pkSlideBarScoreList = v48;
    v48->m_uiClickMsg = 3;
    v2->m_pkSlideBarScoreList->m_eType = 1;
    v49 = (int)v2->m_pkSlideBarScoreList->vfptr;
    v50 = (NiSourceTexture *)v2->m_pkSlideBarScoreList;
    i = v49;
    v51 = *(int (**)(void))(v49 + 168);
    pkTexture8 = v50;
    v52 = v51();
    v53 = ((int (__stdcall *)(int))pkTexture8->vfptr[41].__vecDelDtor)(v52);
    (*(void (__thiscall **)(SlideBar *, int))(i + 308))(v2->m_pkSlideBarScoreList, v53 - 4);
    pCIItem = (SLWCreateInfo::Item *)PgSprData::Create(
                                       (NiAVObject *)&spNode.m_pObject->vfptr,
                                       "Title01Nor",
                                       &uiLeft,
                                       &uiTop,
                                       pkTexture);
    PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "Title01Click");
    PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "Title01Over");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pCIItem, (PgWin *)&v2->vfptr, 4u, 0, 0);
    v54 = **(_DWORD **)&pCIItem->mapSprDataWinState._Alnod.0;
    v55 = *(_DWORD *)(v54 + 20);
    pkTexture8 = *(NiSourceTexture **)(v54 + 24);
    i = v55;
    v56 = Font::Get(MAIN_MENU);
    v57 = (SLWCreateInfo::Item *)PgWinText::CreateWin(
                                   uiLeft - v8,
                                   uiTop - v9 + 1,
                                   i,
                                   (unsigned int)pkTexture8,
                                   v56,
                                   (PgWin *)&v2->vfptr,
                                   0,
                                   0);
    v58 = v57->nItemType;
    pCIItem = v57;
    (*(void (__thiscall **)(SLWCreateInfo::Item *, signed int))(v58 + 488))(v57, 5);
    pkTexture8 = (NiSourceTexture *)(pCIItem->nItemType + 472);
    v59 = TextData2::Get(0x2F4F3F9Au);
    ((void (__thiscall *)(SLWCreateInfo::Item *, NiUnsharedGeometryGroup *))pkTexture8->vfptr)(pCIItem, v59);
    (*(void (__stdcall **)(_DWORD))(pCIItem->nItemType + 240))(0);
    pCIItem = (SLWCreateInfo::Item *)PgSprData::Create(
                                       (NiAVObject *)&spNode.m_pObject->vfptr,
                                       "Title02Nor",
                                       &uiLeft,
                                       &uiTop,
                                       pkTexture);
    PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "Title02Click");
    PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "Title02Over");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pCIItem, (PgWin *)&v2->vfptr, 5u, 0, 0);
    v60 = **(_DWORD **)&pCIItem->mapSprDataWinState._Alnod.0;
    v61 = *(_DWORD *)(v60 + 20);
    pkTexture8 = *(NiSourceTexture **)(v60 + 24);
    i = v61;
    v62 = Font::Get(MAIN_MENU);
    v63 = (SLWCreateInfo::Item *)PgWinText::CreateWin(
                                   uiLeft - v8,
                                   uiTop - v9 + 1,
                                   i,
                                   (unsigned int)pkTexture8,
                                   v62,
                                   (PgWin *)&v2->vfptr,
                                   0,
                                   0);
    v64 = v63->nItemType;
    pCIItem = v63;
    (*(void (__thiscall **)(SLWCreateInfo::Item *, signed int))(v64 + 488))(v63, 5);
    pkTexture8 = (NiSourceTexture *)(pCIItem->nItemType + 472);
    v65 = TextData2::Get(0x2F59888Cu);
    ((void (__thiscall *)(SLWCreateInfo::Item *, NiUnsharedGeometryGroup *))pkTexture8->vfptr)(pCIItem, v65);
    (*(void (__stdcall **)(_DWORD))(pCIItem->nItemType + 240))(0);
    pCIItem = (SLWCreateInfo::Item *)PgSprData::Create(
                                       (NiAVObject *)&spNode.m_pObject->vfptr,
                                       "Title03Nor",
                                       &uiLeft,
                                       &uiTop,
                                       pkTexture);
    PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "Title03Click");
    PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "Title03Over");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pCIItem, (PgWin *)&v2->vfptr, 6u, 0, 0);
    v66 = **(_DWORD **)&pCIItem->mapSprDataWinState._Alnod.0;
    v67 = *(_DWORD *)(v66 + 20);
    pkTexture8 = *(NiSourceTexture **)(v66 + 24);
    i = v67;
    v68 = Font::Get(MAIN_MENU);
    v69 = (SLWCreateInfo::Item *)PgWinText::CreateWin(
                                   uiLeft - v8,
                                   uiTop - v9 + 1,
                                   i,
                                   (unsigned int)pkTexture8,
                                   v68,
                                   (PgWin *)&v2->vfptr,
                                   0,
                                   0);
    v70 = v69->nItemType;
    pCIItem = v69;
    (*(void (__thiscall **)(SLWCreateInfo::Item *, signed int))(v70 + 488))(v69, 5);
    pkTexture8 = (NiSourceTexture *)(pCIItem->nItemType + 472);
    v71 = TextData2::Get(0x80948CEC);
    ((void (__thiscall *)(_DWORD, _DWORD))pkTexture8->vfptr)(pCIItem, v71);
    (*(void (__stdcall **)(_DWORD))(pCIItem->nItemType + 240))(0);
    pCIItem = (SLWCreateInfo::Item *)PgSprData::Create(
                                       (NiAVObject *)&spNode.m_pObject->vfptr,
                                       "Title04Nor",
                                       &uiLeft,
                                       &uiTop,
                                       pkTexture);
    PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "Title04Click");
    PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "Title04Over");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pCIItem, (PgWin *)&v2->vfptr, 7u, 0, 0);
    v72 = **(_DWORD **)&pCIItem->mapSprDataWinState._Alnod.0;
    v73 = *(_DWORD *)(v72 + 20);
    pkTexture8 = *(NiSourceTexture **)(v72 + 24);
    i = v73;
    v74 = Font::Get(MAIN_MENU);
    v75 = (SLWCreateInfo::Item *)PgWinText::CreateWin(
                                   uiLeft - v8,
                                   uiTop - v9 + 1,
                                   i,
                                   (unsigned int)pkTexture8,
                                   v74,
                                   (PgWin *)&v2->vfptr,
                                   0,
                                   0);
    v76 = v75->nItemType;
    pCIItem = v75;
    (*(void (__thiscall **)(SLWCreateInfo::Item *, signed int))(v76 + 488))(v75, 5);
    pkTexture8 = (NiSourceTexture *)(pCIItem->nItemType + 472);
    v77 = TextData2::Get(0xC1ECEAF0);
    ((void (__thiscall *)(_DWORD, _DWORD))pkTexture8->vfptr)(pCIItem, v77);
    (*(void (__stdcall **)(_DWORD))(pCIItem->nItemType + 240))(0);
    pCIItem = (SLWCreateInfo::Item *)PgSprData::Create(
                                       (NiAVObject *)&spNode.m_pObject->vfptr,
                                       "Title05Nor",
                                       &uiLeft,
                                       &uiTop,
                                       pkTexture);
    PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "Title05Click");
    PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "Title05Over");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pCIItem, (PgWin *)&v2->vfptr, 8u, 0, 0);
    v78 = **(_DWORD **)&pCIItem->mapSprDataWinState._Alnod.0;
    v79 = *(_DWORD *)(v78 + 20);
    pkTexture8 = *(NiSourceTexture **)(v78 + 24);
    i = v79;
    v80 = Font::Get(MAIN_MENU);
    v81 = (SLWCreateInfo::Item *)PgWinText::CreateWin(
                                   uiLeft - v8,
                                   uiTop - v9 + 1,
                                   i,
                                   (unsigned int)pkTexture8,
                                   v80,
                                   (PgWin *)&v2->vfptr,
                                   0,
                                   0);
    v82 = v81->nItemType;
    pCIItem = v81;
    (*(void (__thiscall **)(SLWCreateInfo::Item *, signed int))(v82 + 488))(v81, 5);
    pkTexture8 = (NiSourceTexture *)(pCIItem->nItemType + 472);
    v83 = TextData2::Get(0x89F4F4DD);
    ((void (__thiscall *)(_DWORD, _DWORD))pkTexture8->vfptr)(pCIItem, v83);
    (*(void (__stdcall **)(_DWORD))(pCIItem->nItemType + 240))(0);
    pCIItem = (SLWCreateInfo::Item *)PgSprData::Create(
                                       (NiAVObject *)&spNode.m_pObject->vfptr,
                                       "Title06Nor",
                                       &uiLeft,
                                       &uiTop,
                                       pkTexture);
    PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "Title06Click");
    PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "Title06Over");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pCIItem, (PgWin *)&v2->vfptr, 9u, 0, 0);
    v84 = **(_DWORD **)&pCIItem->mapSprDataWinState._Alnod.0;
    v85 = *(_DWORD *)(v84 + 20);
    pkTexture8 = *(NiSourceTexture **)(v84 + 24);
    i = v85;
    v86 = Font::Get(MAIN_MENU);
    v87 = (SLWCreateInfo::Item *)PgWinText::CreateWin(
                                   uiLeft - v8,
                                   uiTop - v9 + 1,
                                   i,
                                   (unsigned int)pkTexture8,
                                   v86,
                                   (PgWin *)&v2->vfptr,
                                   0,
                                   0);
    v88 = v87->nItemType;
    pCIItem = v87;
    (*(void (__thiscall **)(SLWCreateInfo::Item *, signed int))(v88 + 488))(v87, 5);
    pkTexture8 = (NiSourceTexture *)(pCIItem->nItemType + 472);
    v89 = TextData2::Get(0x7C9FE4F5u);
    ((void (__thiscall *)(_DWORD, _DWORD))pkTexture8->vfptr)(pCIItem, v89);
    (*(void (__stdcall **)(_DWORD))(pCIItem->nItemType + 240))(0);
    pCIItem = (SLWCreateInfo::Item *)PgSprData::Create(
                                       (NiAVObject *)&spNode.m_pObject->vfptr,
                                       "Title07Nor",
                                       &uiLeft,
                                       &uiTop,
                                       pkTexture);
    PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "Title07Click");
    PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "Title07Over");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pCIItem, (PgWin *)&v2->vfptr, 0xAu, 0, 0);
    v90 = **(_DWORD **)&pCIItem->mapSprDataWinState._Alnod.0;
    v91 = *(_DWORD *)(v90 + 20);
    pkTexture8 = *(NiSourceTexture **)(v90 + 24);
    i = v91;
    v92 = Font::Get(MAIN_MENU);
    v93 = (SLWCreateInfo::Item *)PgWinText::CreateWin(
                                   uiLeft - v8,
                                   uiTop - v9 + 1,
                                   i,
                                   (unsigned int)pkTexture8,
                                   v92,
                                   (PgWin *)&v2->vfptr,
                                   0,
                                   0);
    v94 = v93->nItemType;
    pCIItem = v93;
    (*(void (__thiscall **)(SLWCreateInfo::Item *, signed int))(v94 + 488))(v93, 5);
    pkTexture8 = (NiSourceTexture *)(pCIItem->nItemType + 472);
    v95 = TextData2::Get(0xCFDBDA42);
    ((void (__thiscall *)(_DWORD, _DWORD))pkTexture8->vfptr)(pCIItem, v95);
    (*(void (__stdcall **)(_DWORD))(pCIItem->nItemType + 240))(0);
    pCIItem = (SLWCreateInfo::Item *)PgSprData::Create(
                                       (NiAVObject *)&spNode.m_pObject->vfptr,
                                       "MinNor",
                                       &uiLeft,
                                       &uiTop,
                                       pkTexture);
    PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "MinClick");
    PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "MinOver");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pCIItem, (PgWin *)&v2->vfptr, 0xBu, 0, 0);
    v96 = MenuTexMgr::GetTexture(4u);
    v97 = spNode.m_pObject->vfptr;
    pkTexture8 = v96;
    if ( ((int (__stdcall *)(const char *))v97[18].__vecDelDtor)("HelpLinkNor") )
    {
      pCIItem = (SLWCreateInfo::Item *)PgSprData::Create(
                                         (NiAVObject *)&spNode.m_pObject->vfptr,
                                         "HelpLinkNor",
                                         &uiLeft,
                                         &uiTop,
                                         pkTexture8);
      PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
      PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
      PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pCIItem, (PgWin *)&v2->vfptr, 0xCu, 0, 0);
    }
    v98 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GuildName01", &uiLeft, &uiTop, pkTexture)->m_akHitTester.m_pBase->m_pObject;
    v99 = v98->m_uiWidth;
    pkTexture8 = (NiSourceTexture *)v98->m_uiHeight;
    i = v99;
    v100 = Font::Get(0);
    v101 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9, i, (unsigned int)pkTexture8, v100, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkMyGuildName = v101;
    v101->vfptr[122].__vecDelDtor((NiRefObject *)v101, 5u);
    ((void (__stdcall *)(void *))v2->m_pkMyGuildName->vfptr[118].__vecDelDtor)(&unk_9AE73A);
    ((void (__stdcall *)(_DWORD))v2->m_pkMyGuildName->vfptr[60].__vecDelDtor)(0);
    v102 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Score01", &uiLeft, &uiTop, pkTexture)->m_akHitTester.m_pBase->m_pObject;
    v103 = v102->m_uiWidth;
    pkTexture8 = (NiSourceTexture *)v102->m_uiHeight;
    i = v103;
    v104 = Font::Get(0);
    v105 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9, i, (unsigned int)pkTexture8, v104, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkMyGuildScore = v105;
    v105->vfptr[122].__vecDelDtor((NiRefObject *)v105, 5u);
    ((void (__stdcall *)(void *))v2->m_pkMyGuildScore->vfptr[118].__vecDelDtor)(&unk_9AE73B);
    ((void (__stdcall *)(_DWORD))v2->m_pkMyGuildScore->vfptr[60].__vecDelDtor)(0);
    v106 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GuildName02", &uiLeft, &uiTop, pkTexture)->m_akHitTester.m_pBase->m_pObject;
    v107 = v106->m_uiWidth;
    pkTexture8 = (NiSourceTexture *)v106->m_uiHeight;
    i = v107;
    v108 = Font::Get(0);
    v109 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9, i, (unsigned int)pkTexture8, v108, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkEnemyGuildName = v109;
    v109->vfptr[122].__vecDelDtor((NiRefObject *)v109, 5u);
    ((void (__stdcall *)(void *))v2->m_pkEnemyGuildName->vfptr[118].__vecDelDtor)(&unk_9AE74E);
    ((void (__stdcall *)(_DWORD))v2->m_pkEnemyGuildName->vfptr[60].__vecDelDtor)(0);
    v110 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Score02", &uiLeft, &uiTop, pkTexture)->m_akHitTester.m_pBase->m_pObject;
    v111 = v110->m_uiWidth;
    pkTexture8 = (NiSourceTexture *)v110->m_uiHeight;
    i = v111;
    v112 = Font::Get(0);
    v113 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9, i, (unsigned int)pkTexture8, v112, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkEnemyGuildScore = v113;
    v113->vfptr[122].__vecDelDtor((NiRefObject *)v113, 5u);
    ((void (__stdcall *)(void *))v2->m_pkEnemyGuildScore->vfptr[118].__vecDelDtor)(&unk_9AE74F);
    ((void (__stdcall *)(_DWORD))v2->m_pkEnemyGuildScore->vfptr[60].__vecDelDtor)(0);
    ((void (__thiscall *)(GTStatusWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    LOBYTE(v124) = 0;
    if ( kCreateInfo.m_arrItem._Myfirst )
    {
      std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(
        kCreateInfo.m_arrItem._Myfirst,
        kCreateInfo.m_arrItem._Mylast);
      operator delete(kCreateInfo.m_arrItem._Myfirst);
    }
    v114 = spNode.m_pObject;
    kCreateInfo.m_arrItem._Myfirst = 0;
    kCreateInfo.m_arrItem._Mylast = 0;
    kCreateInfo.m_arrItem._Myend = 0;
    v124 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v114 )
      v114->vfptr->__vecDelDtor((NiRefObject *)v114, 1u);
    result = 1;
  }
  else
  {
    v7 = spNode.m_pObject;
    v124 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005D10F0) --------------------------------------------------------
void __thiscall GTStatusWin::OnCommand(GTStatusWin *this, unsigned int wParam, int lParam)
{
  GTStatusWin *v3; // esi@1
  CClientGuild *v4; // eax@1
  GTStatusMiniWin *v5; // eax@34
  boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > v6; // [sp-Ch] [bp-14h]@14
  bool (__cdecl *v7)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *); // [sp-4h] [bp-Ch]@13
  D3DXCOLOR *v8; // [sp+0h] [bp-8h]@2

  v3 = this;
  v4 = GuildTask::GetGuild();
  switch ( wParam )
  {
    case 0u:
      v3->m_uiTabNum = 0;
      GTStatusWin::DisplayInfoSetting(v3);
      ((void (__stdcall *)(_DWORD, _DWORD))v3->m_pkTextTabAll->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor, v8);
      v8 = &Color::m_kDxWhiteColor;
      goto LABEL_3;
    case 1u:
      if ( v4 && v4->m_bOpserver )
        return;
      v3->m_uiTabNum = 1;
      GTStatusWin::DisplayInfoSetting(v3);
      ((void (__stdcall *)(_DWORD, _DWORD))v3->m_pkTextTabAll->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor, v8);
      v8 = &Color::m_kDxYellowColor;
LABEL_3:
      ((void (__stdcall *)(_DWORD))v3->m_pkTextTabMy->vfptr[117].__vecDelDtor)(v8);
      v8 = &Color::m_kDxWhiteColor;
      goto LABEL_4;
    case 2u:
      if ( !v4 || !v4->m_bOpserver )
      {
        v3->m_uiTabNum = 2;
        GTStatusWin::DisplayInfoSetting(v3);
        ((void (__stdcall *)(_DWORD, _DWORD))v3->m_pkTextTabAll->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor, v8);
        ((void (__stdcall *)(_DWORD))v3->m_pkTextTabMy->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
        v8 = &Color::m_kDxYellowColor;
LABEL_4:
        ((void (__cdecl *)(_DWORD))v3->m_pkTextEnemy->vfptr[117].__vecDelDtor)(v8);
      }
      return;
    case 3u:
      GTStatusWin::OnSlideBar(v3);
      return;
    case 4u:
      if ( bTitle01 )
      {
        bTitle01 = 0;
        v7 = GuildListWin::GuildInfo::Low_GuildName;
      }
      else
      {
        bTitle01 = 1;
        v7 = GTRequestListWin::GuildInfo::High_GuildName;
      }
      goto LABEL_14;
    case 5u:
      if ( bTitle02 )
      {
        bTitle02 = 0;
        v7 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))GTStatusWin::RankInfo::Low_Grade;
      }
      else
      {
        bTitle02 = 1;
        v7 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))GTStatusWin::RankInfo::High_Grade;
      }
      goto LABEL_14;
    case 6u:
      if ( bTitle03 )
      {
        bTitle03 = 0;
        v7 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))GTStatusWin::RankInfo::Low_IncreaseScore;
      }
      else
      {
        bTitle03 = 1;
        v7 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))PkRealTiemRankWin::RankInfo::greater_Score;
      }
      goto LABEL_14;
    case 7u:
      if ( bTitle04 )
      {
        bTitle04 = 0;
        v7 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))GTStatusWin::RankInfo::Low_DecreaseScore;
      }
      else
      {
        bTitle04 = 1;
        v7 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))GTStatusWin::RankInfo::High_DecreaseScore;
      }
      goto LABEL_14;
    case 8u:
      if ( bTitle05 )
      {
        bTitle05 = 0;
        v7 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))PkRealTiemRankWin::RankInfo::Less_Rank;
      }
      else
      {
        bTitle05 = 1;
        v7 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))GTStatusWin::RankInfo::High_KillCount;
      }
      goto LABEL_14;
    case 9u:
      if ( bTitle06 )
      {
        bTitle06 = 0;
        v7 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))GTStatusWin::RankInfo::Low_DieCount;
      }
      else
      {
        bTitle06 = 1;
        v7 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))GTStatusWin::RankInfo::High_DieCount;
      }
      goto LABEL_14;
    case 0xAu:
      if ( bTitle07 )
      {
        bTitle07 = 0;
        v7 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))GTStatusWin::RankInfo::Low_CaptureFlag;
      }
      else
      {
        bTitle07 = 1;
        v7 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))GTStatusWin::RankInfo::High_CaptureFlag;
      }
LABEL_14:
      boost::function<bool __cdecl (GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void>>::operator=<bool (__cdecl *)(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &)>(
        (boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *)&v3->m_SortPradicationFunc,
        v7);
      boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>(
        (boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *)&v6,
        (boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *)&v3->m_SortPradicationFunc);
      std::sort<std::_Vector_iterator<std::_Vector_val<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo>>>,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(
        (std::_Vector_iterator<std::_Vector_val<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo> > >)v3->m_vecRankInfos._Myfirst,
        (std::_Vector_iterator<std::_Vector_val<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo> > >)v3->m_vecRankInfos._Mylast,
        v6);
      GTStatusWin::DisplayInfoSetting(v3);
      break;
    case 0xBu:
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
      v5 = GuildTask::GetGTStatusMiniWin();
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v5->vfptr);
      break;
    case 0xCu:
      GTStatusWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (005D13D0) --------------------------------------------------------
char __thiscall GTStatusWin::SetRankInfo(GTStatusWin *this, TOURNAMENT_PLAYER_SCORE *pkCmd, unsigned int Reg)
{
  unsigned int v3; // ecx@1
  unsigned int v4; // edx@1
  unsigned int v5; // eax@1
  unsigned int v6; // ecx@1
  unsigned int v7; // ecx@1
  unsigned int v8; // edx@1
  unsigned int v9; // ecx@1
  unsigned int v10; // edx@1
  GTStatusWin::RankInfo *v11; // esi@1
  signed int v12; // ecx@1
  unsigned int v13; // ebx@1
  int v14; // esi@3
  const char *v15; // edx@3
  unsigned int v16; // ecx@5
  const char *v17; // eax@8
  unsigned int v18; // eax@11
  GTStatusWin *v20; // [sp+10h] [bp-6Ch]@1
  int v21; // [sp+14h] [bp-68h]@2
  bool bEqualData; // [sp+1Bh] [bp-61h]@1
  GTStatusWin::RankInfo kRankInfo; // [sp+1Ch] [bp-60h]@1
  char acName[21]; // [sp+54h] [bp-28h]@1
  int v25; // [sp+78h] [bp-4h]@1

  v20 = this;
  kRankInfo.m_strName._Myres = 15;
  kRankInfo.m_strName._Mysize = 0;
  kRankInfo.m_strName._Bx._Buf[0] = 0;
  v25 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &kRankInfo.m_strName,
    (const char *)&unk_96F8EB,
    0);
  v3 = pkCmd->CharID.n5_code[1];
  v4 = pkCmd->CharID.n5_code[2];
  *(_DWORD *)acName = pkCmd->CharID.n5_code[0];
  v5 = pkCmd->CharID.n5_code[3];
  *(_DWORD *)&acName[4] = v3;
  v6 = pkCmd->CharID.n5_code[4];
  *(_DWORD *)&acName[12] = v5;
  *(_DWORD *)&acName[16] = v6;
  kRankInfo.m_unIncreaseScore = 0;
  kRankInfo.m_unDecreaseScore = 0;
  kRankInfo.m_unDieCount = 0;
  kRankInfo.m_unKillCount = 0;
  kRankInfo.m_unGrade = 0;
  kRankInfo.m_unCaptureFlag = 0;
  kRankInfo.m_kGuildReg = 0;
  *(_DWORD *)&acName[8] = v4;
  acName[20] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &kRankInfo.m_strName,
    acName,
    strlen(acName));
  v7 = pkCmd->unDecreaseScore;
  v8 = pkCmd->unDieCount;
  kRankInfo.m_unIncreaseScore = pkCmd->unIncreaseScore;
  kRankInfo.m_unKillCount = pkCmd->unKillCount;
  kRankInfo.m_unDecreaseScore = v7;
  v9 = pkCmd->unGuildGreade;
  kRankInfo.m_unDieCount = v8;
  v10 = pkCmd->unCaptureFlag;
  v11 = v20->m_vecRankInfos._Myfirst;
  kRankInfo.m_kGuildReg = Reg;
  kRankInfo.m_unGrade = v9;
  v12 = (char *)v20->m_vecRankInfos._Mylast - (char *)v11;
  kRankInfo.m_unCaptureFlag = v10;
  v13 = 0;
  bEqualData = 0;
  if ( !(v12 / 56) )
    goto LABEL_25;
  v21 = 0;
  if ( (unsigned int)(v12 / 56) <= 0 )
    std::_Xout_of_range("invalid vector<T> subscript");
  do
  {
    v14 = (int)&v11[v21];
    v15 = kRankInfo.m_strName._Bx._Ptr;
    if ( kRankInfo.m_strName._Myres < 0x10 )
      v15 = (const char *)&kRankInfo;
    v16 = kRankInfo.m_strName._Mysize;
    if ( *(_DWORD *)(v14 + 16) < kRankInfo.m_strName._Mysize )
      v16 = *(_DWORD *)(v14 + 16);
    if ( *(_DWORD *)(v14 + 20) < 0x10u )
      v17 = (const char *)v14;
    else
      v17 = *(const char **)v14;
    if ( !std::char_traits<char>::compare(v17, v15, v16) )
    {
      v18 = *(_DWORD *)(v14 + 16);
      if ( v18 >= kRankInfo.m_strName._Mysize && v18 == kRankInfo.m_strName._Mysize )
      {
        bEqualData = 1;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v14,
          &kRankInfo.m_strName,
          v18 != kRankInfo.m_strName._Mysize,
          0xFFFFFFFF);
        *(_DWORD *)(v14 + 28) = kRankInfo.m_unIncreaseScore;
        *(_DWORD *)(v14 + 32) = kRankInfo.m_unDecreaseScore;
        *(_DWORD *)(v14 + 36) = kRankInfo.m_unDieCount;
        *(_DWORD *)(v14 + 40) = kRankInfo.m_unKillCount;
        *(_DWORD *)(v14 + 44) = kRankInfo.m_unGrade;
        *(_DWORD *)(v14 + 48) = kRankInfo.m_unCaptureFlag;
        *(_DWORD *)(v14 + 52) = kRankInfo.m_kGuildReg;
      }
    }
    v11 = v20->m_vecRankInfos._Myfirst;
    ++v21;
    ++v13;
  }
  while ( v20->m_vecRankInfos._Mylast - v11 > v13 );
  if ( !bEqualData )
LABEL_25:
    std::vector<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo>>::push_back(
      &v20->m_vecRankInfos,
      &kRankInfo);
  if ( !v20->m_bGame )
  {
    std::_Sort<GTStatusWin::RankInfo *,int,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(
      v20->m_vecRankInfos._Myfirst,
      v20->m_vecRankInfos._Mylast,
      v20->m_vecRankInfos._Mylast - v20->m_vecRankInfos._Myfirst,
      (bool (__cdecl *)(GTStatusWin::RankInfo *, GTStatusWin::RankInfo *))PkRealTiemRankWin::RankInfo::greater_Score);
    v20->m_bGame = 1;
  }
  GTStatusWin::DisplayInfoSetting(v20);
  if ( kRankInfo.m_strName._Myres >= 0x10 )
    operator delete(kRankInfo.m_strName._Bx._Ptr);
  return 1;
}

//----- (005D1630) --------------------------------------------------------
GTStatusMiniWin *__thiscall GTStatusMiniWin::`vector deleting destructor'(GTStatusMiniWin *this, unsigned int a2)
{
  GTStatusMiniWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GTStatusMiniWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GTStatusMiniWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9AEB50: using guessed type void (__thiscall *GTStatusMiniWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AEB6C: using guessed type int (__thiscall *GTStatusMiniWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005D1670) --------------------------------------------------------
GTStatusWin::RankInfo *__stdcall std::allocator<GTStatusWin::RankInfo>::allocate(unsigned int _Count)
{
  GTStatusWin::RankInfo *result; // eax@1
  std::exception pExceptionObject; // [sp+0h] [bp-Ch]@4

  result = 0;
  if ( _Count )
  {
    if ( _Count > 0x4924924 || (result = (GTStatusWin::RankInfo *)operator new(56 * _Count)) == 0 )
    {
      _Count = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&_Count);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
  }
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (005D16E0) --------------------------------------------------------
boost::detail::function::any_pointer __cdecl boost::detail::function::functor_manager<bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>::manage(boost::detail::function::any_pointer functor_ptr, boost::detail::function::functor_manager_operation_type op)
{
  boost::detail::function::any_pointer result; // eax@2

  if ( op )
    result.obj_ptr = 0;
  else
    result.obj_ptr = functor_ptr.obj_ptr;
  return result;
}

//----- (005D1700) --------------------------------------------------------
bool __cdecl GuildListWin::GuildInfo::Low_GuildName(GuildListWin::GuildInfo *lhw, GuildListWin::GuildInfo *rhw)
{
  const char *v2; // eax@1

  v2 = (const char *)rhw;
  if ( rhw->m_strGuildName._Myres >= 0x10 )
    v2 = rhw->m_strGuildName._Bx._Ptr;
  return std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
           &lhw->m_strGuildName,
           0,
           lhw->m_strGuildName._Mysize,
           v2,
           rhw->m_strGuildName._Mysize) < 0;
}

//----- (005D1730) --------------------------------------------------------
GTStatusWin::RankInfo *__cdecl std::_Move<GTStatusWin::RankInfo *,GTStatusWin::RankInfo *>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, GTStatusWin::RankInfo *_Dest)
{
  GTStatusWin::RankInfo *v3; // edi@2
  char *v4; // esi@2
  unsigned int v5; // ecx@3
  GTStatusWin::RankInfo *result; // eax@4

  if ( _First == _Last )
  {
    result = _Dest;
  }
  else
  {
    v3 = _Dest;
    v4 = (char *)&_First->m_unDecreaseScore;
    do
    {
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v3->m_strName,
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)(v4 - 32),
        0,
        0xFFFFFFFF);
      v3->m_unIncreaseScore = *((_DWORD *)v4 - 1);
      v3->m_unDecreaseScore = *(_DWORD *)v4;
      v3->m_unDieCount = *((_DWORD *)v4 + 1);
      v3->m_unKillCount = *((_DWORD *)v4 + 2);
      v3->m_unGrade = *((_DWORD *)v4 + 3);
      v3->m_unCaptureFlag = *((_DWORD *)v4 + 4);
      v5 = *((_DWORD *)v4 + 5);
      v4 += 56;
      v3->m_kGuildReg = v5;
      ++v3;
    }
    while ( (GTStatusWin::RankInfo *)(v4 - 32) != _Last );
    result = v3;
  }
  return result;
}

//----- (005D17A0) --------------------------------------------------------
void __cdecl std::_Destroy_range<std::allocator<GTStatusWin::RankInfo>>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last)
{
  GTStatusWin::RankInfo *i; // esi@1

  for ( i = _First; i != _Last; ++i )
  {
    if ( i->m_strName._Myres >= 0x10 )
      operator delete(i->m_strName._Bx._Ptr);
    i->m_strName._Myres = 15;
    i->m_strName._Mysize = 0;
    i->m_strName._Bx._Buf[0] = 0;
  }
}

//----- (005D17E0) --------------------------------------------------------
void __cdecl std::_Construct<GTStatusWin::RankInfo,GTStatusWin::RankInfo const &>(GTStatusWin::RankInfo *_Ptr, GTStatusWin::RankInfo *_Val)
{
  if ( _Ptr )
  {
    _Ptr->m_strName._Myres = 15;
    _Ptr->m_strName._Mysize = 0;
    _Ptr->m_strName._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &_Ptr->m_strName,
      &_Val->m_strName,
      0,
      0xFFFFFFFF);
    _Ptr->m_unIncreaseScore = _Val->m_unIncreaseScore;
    _Ptr->m_unDecreaseScore = _Val->m_unDecreaseScore;
    _Ptr->m_unDieCount = _Val->m_unDieCount;
    _Ptr->m_unKillCount = _Val->m_unKillCount;
    _Ptr->m_unGrade = _Val->m_unGrade;
    _Ptr->m_unCaptureFlag = _Val->m_unCaptureFlag;
    _Ptr->m_kGuildReg = _Val->m_kGuildReg;
  }
}

//----- (005D1870) --------------------------------------------------------
void __cdecl std::swap<GTStatusWin::RankInfo>(GTStatusWin::RankInfo *_Left, GTStatusWin::RankInfo *_Right)
{
  unsigned int v2; // ecx@1
  unsigned int v3; // edx@1
  unsigned int v4; // eax@1
  unsigned int v5; // ecx@1
  unsigned int v6; // edx@1
  unsigned int v7; // eax@1
  bool v8; // cf@1
  unsigned int v9; // ecx@1
  unsigned int v10; // edx@1
  unsigned int v11; // eax@1
  unsigned int v12; // ecx@1
  unsigned int v13; // edx@1
  unsigned int v14; // eax@1
  GTStatusWin::RankInfo _Tmp; // [sp+Ch] [bp-48h]@1
  int v16; // [sp+50h] [bp-4h]@1

  _Tmp.m_strName._Myres = 15;
  _Tmp.m_strName._Mysize = 0;
  _Tmp.m_strName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_Tmp.m_strName,
    &_Left->m_strName,
    0,
    0xFFFFFFFF);
  v2 = _Left->m_unDecreaseScore;
  v3 = _Left->m_unDieCount;
  _Tmp.m_unIncreaseScore = _Left->m_unIncreaseScore;
  v4 = _Left->m_unKillCount;
  _Tmp.m_unDecreaseScore = v2;
  v5 = _Left->m_unGrade;
  _Tmp.m_unDieCount = v3;
  v6 = _Left->m_unCaptureFlag;
  _Tmp.m_unKillCount = v4;
  v7 = _Left->m_kGuildReg;
  _Tmp.m_unGrade = v5;
  _Tmp.m_unCaptureFlag = v6;
  _Tmp.m_kGuildReg = v7;
  v16 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_Left->m_strName,
    &_Right->m_strName,
    0,
    0xFFFFFFFF);
  _Left->m_unIncreaseScore = _Right->m_unIncreaseScore;
  _Left->m_unDecreaseScore = _Right->m_unDecreaseScore;
  _Left->m_unDieCount = _Right->m_unDieCount;
  _Left->m_unKillCount = _Right->m_unKillCount;
  _Left->m_unGrade = _Right->m_unGrade;
  _Left->m_unCaptureFlag = _Right->m_unCaptureFlag;
  _Left->m_kGuildReg = _Right->m_kGuildReg;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_Right->m_strName,
    &_Tmp.m_strName,
    0,
    0xFFFFFFFF);
  v8 = _Tmp.m_strName._Myres < 0x10;
  v9 = _Tmp.m_unDecreaseScore;
  v10 = _Tmp.m_unDieCount;
  _Right->m_unIncreaseScore = _Tmp.m_unIncreaseScore;
  v11 = _Tmp.m_unKillCount;
  _Right->m_unDecreaseScore = v9;
  v12 = _Tmp.m_unGrade;
  _Right->m_unDieCount = v10;
  v13 = _Tmp.m_unCaptureFlag;
  _Right->m_unKillCount = v11;
  v14 = _Tmp.m_kGuildReg;
  _Right->m_unGrade = v12;
  _Right->m_unCaptureFlag = v13;
  _Right->m_kGuildReg = v14;
  if ( !v8 )
    operator delete(_Tmp.m_strName._Bx._Ptr);
}

//----- (005D1990) --------------------------------------------------------
void __cdecl std::_Push_heap<GTStatusWin::RankInfo *,int,GTStatusWin::RankInfo,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(GTStatusWin::RankInfo *_First, int _Hole, int _Top, GTStatusWin::RankInfo *_Val, boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > _Pred)
{
  int v5; // edi@1
  int v6; // ebx@1
  GTStatusWin::RankInfo *v7; // esi@3
  GTStatusWin::RankInfo *v8; // edi@4
  int v9; // eax@5
  GTStatusWin::RankInfo *v10; // edi@5
  GTStatusWin::RankInfo *v11; // esi@5
  boost::detail::function::any_pointer (__cdecl *v12)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // eax@5
  std::exception v13; // [sp+10h] [bp-18h]@8
  int i; // [sp+24h] [bp-4h]@1

  v5 = _Hole;
  v6 = (_Hole - 1) / 2;
  for ( i = 0; _Top < v5; v6 = (v6 - 1) / 2 )
  {
    if ( !_Pred.manager )
    {
      _Hole = (int)"call to empty boost::function";
      std::exception::exception(&v13, (const char *const *)&_Hole);
      v13.vfptr = (std::exceptionVtbl *)&boost::bad_function_call::`vftable';
      LOBYTE(i) = 1;
      boost::throw_exception<boost::bad_function_call>((boost::bad_function_call *)&v13);
    }
    v7 = &_First[v6];
    if ( !(unsigned __int8)((int (__cdecl *)(void *, GTStatusWin::RankInfo *, GTStatusWin::RankInfo *))_Pred.invoker)(
                             _Pred.functor.obj_ptr,
                             &_First[v6],
                             _Val) )
      break;
    v8 = &_First[v5];
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v8->m_strName,
      &v7->m_strName,
      0,
      0xFFFFFFFF);
    v8->m_unIncreaseScore = v7->m_unIncreaseScore;
    v8->m_unDecreaseScore = v7->m_unDecreaseScore;
    v8->m_unDieCount = v7->m_unDieCount;
    v8->m_unKillCount = v7->m_unKillCount;
    v8->m_unGrade = v7->m_unGrade;
    v8->m_unCaptureFlag = v7->m_unCaptureFlag;
    v8->m_kGuildReg = v7->m_kGuildReg;
    v5 = v6;
  }
  v9 = 7 * v5;
  v10 = _Val;
  v11 = &_First[8 * v9 / 0x38u];
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_First[8 * v9 / 0x38u].m_strName,
    &_Val->m_strName,
    0,
    0xFFFFFFFF);
  v11->m_unIncreaseScore = v10->m_unIncreaseScore;
  v11->m_unDecreaseScore = v10->m_unDecreaseScore;
  v11->m_unDieCount = v10->m_unDieCount;
  v11->m_unKillCount = v10->m_unKillCount;
  v11->m_unGrade = v10->m_unGrade;
  v12 = _Pred.manager;
  v11->m_unCaptureFlag = v10->m_unCaptureFlag;
  v11->m_kGuildReg = v10->m_kGuildReg;
  i = -1;
  if ( v12 )
    ((void (__cdecl *)(void *, signed int))v12)(_Pred.functor.obj_ptr, 1);
}
// 98CD40: using guessed type int (__thiscall *boost::bad_function_call::`vftable')(void *p, char);

//----- (005D1B00) --------------------------------------------------------
GTStatusWin::RankInfo *__cdecl std::_Move_backward<GTStatusWin::RankInfo *,GTStatusWin::RankInfo *>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, GTStatusWin::RankInfo *_Dest)
{
  GTStatusWin::RankInfo *v3; // edi@2
  char *v4; // esi@2
  GTStatusWin::RankInfo *result; // eax@4

  if ( _First == _Last )
  {
    result = _Dest;
  }
  else
  {
    v3 = _Dest;
    v4 = (char *)&_Last->m_unDecreaseScore;
    do
    {
      v4 -= 56;
      --v3;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v3->m_strName,
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)(v4 - 32),
        0,
        0xFFFFFFFF);
      v3->m_unIncreaseScore = *((_DWORD *)v4 - 1);
      v3->m_unDecreaseScore = *(_DWORD *)v4;
      v3->m_unDieCount = *((_DWORD *)v4 + 1);
      v3->m_unKillCount = *((_DWORD *)v4 + 2);
      v3->m_unGrade = *((_DWORD *)v4 + 3);
      v3->m_unCaptureFlag = *((_DWORD *)v4 + 4);
      v3->m_kGuildReg = *((_DWORD *)v4 + 5);
    }
    while ( (GTStatusWin::RankInfo *)(v4 - 32) != _First );
    result = v3;
  }
  return result;
}

//----- (005D1B70) --------------------------------------------------------
void __cdecl std::_Push_heap<GTStatusWin::RankInfo *,int,GTStatusWin::RankInfo,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(GTStatusWin::RankInfo *_First, int _Hole, int _Top, GTStatusWin::RankInfo *_Val, bool (__cdecl *_Pred)(GTStatusWin::RankInfo *, GTStatusWin::RankInfo *))
{
  int v5; // edi@1
  int i; // ebx@1
  GTStatusWin::RankInfo *v7; // esi@2
  GTStatusWin::RankInfo *v8; // edi@3
  GTStatusWin::RankInfo *v9; // esi@4

  v5 = _Hole;
  for ( i = (_Hole - 1) / 2; _Top < v5; i = (i - 1) / 2 )
  {
    v7 = &_First[i];
    if ( !_Pred(&_First[i], _Val) )
      break;
    v8 = &_First[v5];
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v8->m_strName,
      &v7->m_strName,
      0,
      0xFFFFFFFF);
    v8->m_unIncreaseScore = v7->m_unIncreaseScore;
    v8->m_unDecreaseScore = v7->m_unDecreaseScore;
    v8->m_unDieCount = v7->m_unDieCount;
    v8->m_unKillCount = v7->m_unKillCount;
    v8->m_unGrade = v7->m_unGrade;
    v8->m_unCaptureFlag = v7->m_unCaptureFlag;
    v8->m_kGuildReg = v7->m_kGuildReg;
    v5 = i;
  }
  v9 = &_First[v5];
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &v9->m_strName,
    &_Val->m_strName,
    0,
    0xFFFFFFFF);
  v9->m_unIncreaseScore = _Val->m_unIncreaseScore;
  v9->m_unDecreaseScore = _Val->m_unDecreaseScore;
  v9->m_unDieCount = _Val->m_unDieCount;
  v9->m_unKillCount = _Val->m_unKillCount;
  v9->m_unGrade = _Val->m_unGrade;
  v9->m_unCaptureFlag = _Val->m_unCaptureFlag;
  v9->m_kGuildReg = _Val->m_kGuildReg;
}

//----- (005D1C60) --------------------------------------------------------
void __cdecl std::_Cons_val<std::allocator<GTStatusWin::RankInfo>,GTStatusWin::RankInfo,GTStatusWin::RankInfo &>(std::allocator<GTStatusWin::RankInfo> *_Alval, GTStatusWin::RankInfo *_Pdest, GTStatusWin::RankInfo *_Src)
{
  if ( _Pdest )
  {
    _Pdest->m_strName._Myres = 15;
    _Pdest->m_strName._Mysize = 0;
    _Pdest->m_strName._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &_Pdest->m_strName,
      &_Src->m_strName,
      0,
      0xFFFFFFFF);
    _Pdest->m_unIncreaseScore = _Src->m_unIncreaseScore;
    _Pdest->m_unDecreaseScore = _Src->m_unDecreaseScore;
    _Pdest->m_unDieCount = _Src->m_unDieCount;
    _Pdest->m_unKillCount = _Src->m_unKillCount;
    _Pdest->m_unGrade = _Src->m_unGrade;
    _Pdest->m_unCaptureFlag = _Src->m_unCaptureFlag;
    _Pdest->m_kGuildReg = _Src->m_kGuildReg;
  }
}

//----- (005D1CF0) --------------------------------------------------------
GTStatusWin::RankInfo *__cdecl std::_Uninit_move<GTStatusWin::RankInfo *,GTStatusWin::RankInfo *,std::allocator<GTStatusWin::RankInfo>,GTStatusWin::RankInfo>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, GTStatusWin::RankInfo *_Dest)
{
  GTStatusWin::RankInfo *v3; // esi@1
  GTStatusWin::RankInfo *v4; // edi@1
  int v6; // [sp+0h] [bp-24h]@1
  GTStatusWin::RankInfo *_Next; // [sp+10h] [bp-14h]@1
  int *v8; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v8 = &v6;
  v3 = _Dest;
  v4 = _First;
  _Next = _Dest;
  v9 = 0;
  while ( v4 != _Last )
  {
    LOBYTE(v9) = 1;
    if ( v3 )
    {
      v3->m_strName._Myres = 15;
      v3->m_strName._Mysize = 0;
      v3->m_strName._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v3->m_strName,
        &v4->m_strName,
        0,
        0xFFFFFFFF);
      v3->m_unIncreaseScore = v4->m_unIncreaseScore;
      v3->m_unDecreaseScore = v4->m_unDecreaseScore;
      v3->m_unDieCount = v4->m_unDieCount;
      v3->m_unKillCount = v4->m_unKillCount;
      v3->m_unGrade = v4->m_unGrade;
      v3->m_unCaptureFlag = v4->m_unCaptureFlag;
      v3->m_kGuildReg = v4->m_kGuildReg;
    }
    ++v3;
    LOBYTE(v9) = 0;
    ++v4;
  }
  return v3;
}

//----- (005D1DD0) --------------------------------------------------------
void __cdecl std::_Med3<GTStatusWin::RankInfo *,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Mid, GTStatusWin::RankInfo *_Last, boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > _Pred)
{
  std::exception v4; // [sp+10h] [bp-1Ch]@2
  char *_What; // [sp+1Ch] [bp-10h]@2
  int v6; // [sp+28h] [bp-4h]@1

  v6 = 0;
  if ( !_Pred.manager )
  {
    _What = "call to empty boost::function";
    std::exception::exception(&v4, (const char *const *)&_What);
    v4.vfptr = (std::exceptionVtbl *)&boost::bad_function_call::`vftable';
    LOBYTE(v6) = 1;
    boost::throw_exception<boost::bad_function_call>((boost::bad_function_call *)&v4);
  }
  if ( (unsigned __int8)((int (__cdecl *)(void *, GTStatusWin::RankInfo *, GTStatusWin::RankInfo *))_Pred.invoker)(
                          _Pred.functor.obj_ptr,
                          _Mid,
                          _First) )
    std::swap<GTStatusWin::RankInfo>(_Mid, _First);
  if ( !_Pred.manager )
  {
    _What = "call to empty boost::function";
    std::exception::exception(&v4, (const char *const *)&_What);
    v4.vfptr = (std::exceptionVtbl *)&boost::bad_function_call::`vftable';
    LOBYTE(v6) = 2;
    boost::throw_exception<boost::bad_function_call>((boost::bad_function_call *)&v4);
  }
  if ( (unsigned __int8)((int (__cdecl *)(void *, GTStatusWin::RankInfo *, GTStatusWin::RankInfo *))_Pred.invoker)(
                          _Pred.functor.obj_ptr,
                          _Last,
                          _Mid) )
    std::swap<GTStatusWin::RankInfo>(_Last, _Mid);
  if ( !_Pred.manager )
  {
    _What = "call to empty boost::function";
    std::exception::exception(&v4, (const char *const *)&_What);
    v4.vfptr = (std::exceptionVtbl *)&boost::bad_function_call::`vftable';
    LOBYTE(v6) = 3;
    boost::throw_exception<boost::bad_function_call>((boost::bad_function_call *)&v4);
  }
  if ( (unsigned __int8)((int (__cdecl *)(_DWORD, _DWORD, _DWORD))_Pred.invoker)(_Pred.functor.obj_ptr, _Mid, _First) )
    std::swap<GTStatusWin::RankInfo>(_Mid, _First);
  v6 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}
// 98CD40: using guessed type int (__thiscall *boost::bad_function_call::`vftable')(void *p, char);

//----- (005D1F10) --------------------------------------------------------
void __cdecl std::_Adjust_heap<GTStatusWin::RankInfo *,int,GTStatusWin::RankInfo,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(GTStatusWin::RankInfo *_First, int _Hole, int _Bottom, GTStatusWin::RankInfo *_Val, boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > _Pred)
{
  int v5; // edi@1
  int v6; // esi@1
  int v7; // ebx@1
  bool v8; // zf@1
  GTStatusWin::RankInfo *v9; // esi@5
  GTStatusWin::RankInfo *v10; // edi@5
  GTStatusWin::RankInfo *v11; // ebx@8
  GTStatusWin::RankInfo *v12; // edi@8
  boost::detail::function::any_pointer (__cdecl *v13)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp-Ch] [bp-38h]@9
  int v14; // [sp-8h] [bp-34h]@9
  bool (__cdecl *v15)(boost::detail::function::any_pointer, GTStatusWin::RankInfo *, GTStatusWin::RankInfo *); // [sp-4h] [bp-30h]@9
  std::exception v16; // [sp+10h] [bp-1Ch]@14
  int _Top; // [sp+1Ch] [bp-10h]@1
  int v18; // [sp+28h] [bp-4h]@1

  v5 = _Hole;
  v6 = _Bottom;
  v7 = 2 * _Hole + 2;
  v18 = 0;
  _Top = _Hole;
  v8 = v7 == _Bottom;
  if ( v7 < _Bottom )
  {
    do
    {
      if ( !_Pred.manager )
      {
        _Hole = (int)"call to empty boost::function";
        std::exception::exception(&v16, (const char *const *)&_Hole);
        v16.vfptr = (std::exceptionVtbl *)&boost::bad_function_call::`vftable';
        LOBYTE(v18) = 1;
        boost::throw_exception<boost::bad_function_call>((boost::bad_function_call *)&v16);
      }
      if ( (unsigned __int8)((int (__cdecl *)(void *, GTStatusWin::RankInfo *, GTStatusWin::RankInfo *))_Pred.invoker)(
                              _Pred.functor.obj_ptr,
                              &_First[v7],
                              &_First[v7 - 1]) )
        --v7;
      v9 = &_First[v7];
      v10 = &_First[v5];
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v10->m_strName,
        &v9->m_strName,
        0,
        0xFFFFFFFF);
      v10->m_unIncreaseScore = v9->m_unIncreaseScore;
      v10->m_unDecreaseScore = v9->m_unDecreaseScore;
      v10->m_unDieCount = v9->m_unDieCount;
      v10->m_unKillCount = v9->m_unKillCount;
      v10->m_unGrade = v9->m_unGrade;
      v10->m_unCaptureFlag = v9->m_unCaptureFlag;
      v10->m_kGuildReg = v9->m_kGuildReg;
      v5 = v7;
      v7 = 2 * v7 + 2;
    }
    while ( v7 < _Bottom );
    v6 = _Bottom;
    v8 = v7 == _Bottom;
  }
  if ( v8 )
  {
    v11 = &_First[v6 - 1];
    v12 = &_First[v5];
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v12->m_strName,
      &v11->m_strName,
      0,
      0xFFFFFFFF);
    v12->m_unIncreaseScore = v11->m_unIncreaseScore;
    v12->m_unDecreaseScore = v11->m_unDecreaseScore;
    v12->m_unDieCount = v11->m_unDieCount;
    v12->m_unKillCount = v11->m_unKillCount;
    v12->m_unGrade = v11->m_unGrade;
    v12->m_unCaptureFlag = v11->m_unCaptureFlag;
    v12->m_kGuildReg = v11->m_kGuildReg;
    v5 = v6 - 1;
  }
  v13 = 0;
  v14 = 0;
  v15 = 0;
  _Bottom = (int)&v13;
  if ( _Pred.manager )
  {
    v15 = _Pred.invoker;
    v13 = _Pred.manager;
    v14 = ((int (__cdecl *)(void *, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
  }
  std::_Push_heap<GTStatusWin::RankInfo *,int,GTStatusWin::RankInfo,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(
    _First,
    v5,
    _Top,
    _Val,
    *(boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > *)&v13);
  v18 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}
// 98CD40: using guessed type int (__thiscall *boost::bad_function_call::`vftable')(void *p, char);

//----- (005D20E0) --------------------------------------------------------
void __cdecl std::_Adjust_heap<GTStatusWin::RankInfo *,int,GTStatusWin::RankInfo,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(GTStatusWin::RankInfo *_First, int _Hole, int _Bottom, GTStatusWin::RankInfo *_Val, bool (__cdecl *_Pred)(GTStatusWin::RankInfo *, GTStatusWin::RankInfo *))
{
  int v5; // esi@1
  int v6; // edi@1
  int v7; // ebx@1
  bool v8; // zf@1
  GTStatusWin::RankInfo *v9; // esi@4
  GTStatusWin::RankInfo *v10; // edi@4
  GTStatusWin::RankInfo *v11; // ebx@7
  GTStatusWin::RankInfo *v12; // edi@7

  v5 = _Bottom;
  v6 = _Hole;
  v7 = 2 * _Hole + 2;
  v8 = v7 == _Bottom;
  if ( v7 < _Bottom )
  {
    do
    {
      if ( _Pred(&_First[v7], &_First[v7 - 1]) )
        --v7;
      v9 = &_First[v7];
      v10 = &_First[v6];
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v10->m_strName,
        &v9->m_strName,
        0,
        0xFFFFFFFF);
      v10->m_unIncreaseScore = v9->m_unIncreaseScore;
      v10->m_unDecreaseScore = v9->m_unDecreaseScore;
      v10->m_unDieCount = v9->m_unDieCount;
      v10->m_unKillCount = v9->m_unKillCount;
      v10->m_unGrade = v9->m_unGrade;
      v10->m_unCaptureFlag = v9->m_unCaptureFlag;
      v10->m_kGuildReg = v9->m_kGuildReg;
      v6 = v7;
      v7 = 2 * v7 + 2;
    }
    while ( v7 < _Bottom );
    v5 = _Bottom;
    v8 = v7 == _Bottom;
  }
  if ( v8 )
  {
    v11 = &_First[v5 - 1];
    v12 = &_First[v6];
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v12->m_strName,
      &v11->m_strName,
      0,
      0xFFFFFFFF);
    v12->m_unIncreaseScore = v11->m_unIncreaseScore;
    v12->m_unDecreaseScore = v11->m_unDecreaseScore;
    v12->m_unDieCount = v11->m_unDieCount;
    v12->m_unKillCount = v11->m_unKillCount;
    v12->m_unGrade = v11->m_unGrade;
    v12->m_unCaptureFlag = v11->m_unCaptureFlag;
    v12->m_kGuildReg = v11->m_kGuildReg;
    v6 = v5 - 1;
  }
  std::_Push_heap<GTStatusWin::RankInfo *,int,GTStatusWin::RankInfo,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(
    _First,
    v6,
    _Hole,
    _Val,
    _Pred);
}

//----- (005D2200) --------------------------------------------------------
void __cdecl std::_Pop_heap<GTStatusWin::RankInfo *,int,GTStatusWin::RankInfo,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, GTStatusWin::RankInfo *_Dest, GTStatusWin::RankInfo *_Val, boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > _Pred)
{
  boost::detail::function::any_pointer (__cdecl *v5)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp-Ch] [bp-24h]@1
  int v6; // [sp-8h] [bp-20h]@1
  bool (__cdecl *v7)(boost::detail::function::any_pointer, GTStatusWin::RankInfo *, GTStatusWin::RankInfo *); // [sp-4h] [bp-1Ch]@1
  int v8; // [sp+14h] [bp-4h]@1

  v8 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_Dest->m_strName,
    &_First->m_strName,
    0,
    0xFFFFFFFF);
  _Dest->m_unIncreaseScore = _First->m_unIncreaseScore;
  _Dest->m_unDecreaseScore = _First->m_unDecreaseScore;
  _Dest->m_unDieCount = _First->m_unDieCount;
  _Dest->m_unKillCount = _First->m_unKillCount;
  _Dest->m_unGrade = _First->m_unGrade;
  _Dest->m_unCaptureFlag = _First->m_unCaptureFlag;
  _Dest->m_kGuildReg = _First->m_kGuildReg;
  v5 = 0;
  v6 = 0;
  v7 = 0;
  if ( _Pred.manager )
  {
    v7 = _Pred.invoker;
    v5 = _Pred.manager;
    v6 = ((int (__cdecl *)(void *, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
  }
  std::_Adjust_heap<GTStatusWin::RankInfo *,int,GTStatusWin::RankInfo,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(
    _First,
    0,
    _Last - _First,
    _Val,
    *(boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > *)&v5);
  v8 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}

//----- (005D2300) --------------------------------------------------------
void __cdecl std::_Pop_heap<GTStatusWin::RankInfo *,int,GTStatusWin::RankInfo,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, GTStatusWin::RankInfo *_Dest, GTStatusWin::RankInfo *_Val, bool (__cdecl *_Pred)(GTStatusWin::RankInfo *, GTStatusWin::RankInfo *))
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_Dest->m_strName,
    &_First->m_strName,
    0,
    0xFFFFFFFF);
  _Dest->m_unIncreaseScore = _First->m_unIncreaseScore;
  _Dest->m_unDecreaseScore = _First->m_unDecreaseScore;
  _Dest->m_unDieCount = _First->m_unDieCount;
  _Dest->m_unKillCount = _First->m_unKillCount;
  _Dest->m_unGrade = _First->m_unGrade;
  _Dest->m_unCaptureFlag = _First->m_unCaptureFlag;
  _Dest->m_kGuildReg = _First->m_kGuildReg;
  std::_Adjust_heap<GTStatusWin::RankInfo *,int,GTStatusWin::RankInfo,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(
    _First,
    0,
    _Last - _First,
    _Val,
    _Pred);
}

//----- (005D2380) --------------------------------------------------------
#error "5D2551: positive sp value has been found (funcsize=184)"

//----- (005D2560) --------------------------------------------------------
void __cdecl std::_Make_heap<GTStatusWin::RankInfo *,int,GTStatusWin::RankInfo,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > _Pred)
{
  int v3; // ebx@1
  char *v4; // esi@2
  unsigned int v5; // eax@3
  unsigned int v6; // ecx@3
  unsigned int v7; // edx@3
  unsigned int v8; // eax@3
  unsigned int v9; // ecx@3
  unsigned int v10; // edx@3
  boost::detail::function::any_pointer (__cdecl *v11)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp-Ch] [bp-70h]@3
  int v12; // [sp-8h] [bp-6Ch]@3
  bool (__cdecl *v13)(boost::detail::function::any_pointer, GTStatusWin::RankInfo *, GTStatusWin::RankInfo *); // [sp-4h] [bp-68h]@3
  boost::detail::function::any_pointer (__cdecl **v14)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp+10h] [bp-54h]@3
  int _Bottom; // [sp+14h] [bp-50h]@1
  GTStatusWin::RankInfo *v16; // [sp+18h] [bp-4Ch]@1
  GTStatusWin::RankInfo _Val; // [sp+1Ch] [bp-48h]@3
  int v18; // [sp+60h] [bp-4h]@1

  v16 = _First;
  _Bottom = _Last - _First;
  v3 = _Bottom / 2;
  v18 = 0;
  if ( _Bottom / 2 > 0 )
  {
    v4 = (char *)&_First[v3].m_unDecreaseScore;
    do
    {
      v4 -= 56;
      --v3;
      _Val.m_strName._Myres = 15;
      _Val.m_strName._Mysize = 0;
      _Val.m_strName._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &_Val.m_strName,
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)(v4 - 32),
        0,
        0xFFFFFFFF);
      v5 = *(_DWORD *)v4;
      v6 = *((_DWORD *)v4 + 1);
      _Val.m_unIncreaseScore = *((_DWORD *)v4 - 1);
      v7 = *((_DWORD *)v4 + 2);
      _Val.m_unDecreaseScore = v5;
      v8 = *((_DWORD *)v4 + 3);
      _Val.m_unDieCount = v6;
      v9 = *((_DWORD *)v4 + 4);
      _Val.m_unKillCount = v7;
      v10 = *((_DWORD *)v4 + 5);
      _Val.m_unGrade = v8;
      _Val.m_unCaptureFlag = v9;
      _Val.m_kGuildReg = v10;
      v11 = 0;
      v12 = 0;
      v13 = 0;
      LOBYTE(v18) = 1;
      v14 = &v11;
      if ( _Pred.manager )
      {
        v13 = _Pred.invoker;
        v11 = _Pred.manager;
        v12 = ((int (__cdecl *)(void *, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
      }
      std::_Adjust_heap<GTStatusWin::RankInfo *,int,GTStatusWin::RankInfo,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(
        v16,
        v3,
        _Bottom,
        &_Val,
        *(boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > *)&v11);
      LOBYTE(v18) = 0;
      if ( _Val.m_strName._Myres >= 0x10 )
        operator delete(_Val.m_strName._Bx._Ptr);
      _Val.m_strName._Myres = 15;
      _Val.m_strName._Mysize = 0;
      _Val.m_strName._Bx._Buf[0] = 0;
    }
    while ( v3 > 0 );
  }
  v18 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}

//----- (005D26D0) --------------------------------------------------------
void __cdecl std::_Insertion_sort1<GTStatusWin::RankInfo *,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>,GTStatusWin::RankInfo>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > _Pred)
{
  GTStatusWin::RankInfo *v3; // edi@1
  GTStatusWin::RankInfo *i; // ebx@2
  int v5; // esi@3
  unsigned int v6; // ecx@3
  unsigned int v7; // edx@3
  unsigned int v8; // eax@3
  unsigned int v9; // ecx@3
  unsigned int v10; // edx@3
  unsigned int v11; // eax@3
  unsigned int v12; // ecx@5
  unsigned int v13; // edx@5
  unsigned int v14; // eax@5
  unsigned int v15; // ecx@5
  unsigned int v16; // edx@5
  unsigned int v17; // eax@5
  int j; // edi@6
  unsigned int v19; // eax@10
  unsigned int v20; // ecx@10
  unsigned int v21; // edx@10
  unsigned int v22; // eax@10
  unsigned int v23; // ecx@10
  unsigned int v24; // edx@10
  std::exception v25; // [sp+10h] [bp-6Ch]@19
  std::exception v26; // [sp+1Ch] [bp-60h]@17
  GTStatusWin::RankInfo *v27; // [sp+28h] [bp-54h]@1
  char *_What; // [sp+2Ch] [bp-50h]@17
  char *v29; // [sp+30h] [bp-4Ch]@19
  GTStatusWin::RankInfo _Val; // [sp+34h] [bp-48h]@3
  int v31; // [sp+78h] [bp-4h]@1

  v3 = _First;
  v27 = _First;
  v31 = 0;
  if ( _First != _Last )
  {
    for ( i = _First + 1; i != _Last; _Val.m_strName._Bx._Buf[0] = 0 )
    {
      v5 = (int)i;
      _Val.m_strName._Myres = 15;
      _Val.m_strName._Mysize = 0;
      _Val.m_strName._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &_Val.m_strName,
        &i->m_strName,
        0,
        0xFFFFFFFF);
      v6 = i->m_unDecreaseScore;
      v7 = i->m_unDieCount;
      _Val.m_unIncreaseScore = i->m_unIncreaseScore;
      v8 = i->m_unKillCount;
      _Val.m_unDecreaseScore = v6;
      v9 = i->m_unGrade;
      _Val.m_unDieCount = v7;
      v10 = i->m_unCaptureFlag;
      _Val.m_unKillCount = v8;
      v11 = i->m_kGuildReg;
      _Val.m_unGrade = v9;
      _Val.m_unCaptureFlag = v10;
      _Val.m_kGuildReg = v11;
      LOBYTE(v31) = 1;
      if ( !_Pred.manager )
      {
        _What = "call to empty boost::function";
        std::exception::exception(&v26, (const char *const *)&_What);
        v26.vfptr = (std::exceptionVtbl *)&boost::bad_function_call::`vftable';
        LOBYTE(v31) = 2;
        boost::throw_exception<boost::bad_function_call>((boost::bad_function_call *)&v26);
      }
      if ( (unsigned __int8)((int (__cdecl *)(void *, GTStatusWin::RankInfo *, GTStatusWin::RankInfo *))_Pred.invoker)(
                              _Pred.functor.obj_ptr,
                              &_Val,
                              v3) )
      {
        std::_Move_backward<GTStatusWin::RankInfo *,GTStatusWin::RankInfo *>(v3, i, i + 1);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &v3->m_strName,
          &_Val.m_strName,
          0,
          0xFFFFFFFF);
        v12 = _Val.m_unDecreaseScore;
        v13 = _Val.m_unDieCount;
        v3->m_unIncreaseScore = _Val.m_unIncreaseScore;
        v14 = _Val.m_unKillCount;
        v3->m_unDecreaseScore = v12;
        v15 = _Val.m_unGrade;
        v3->m_unDieCount = v13;
        v16 = _Val.m_unCaptureFlag;
        v3->m_unKillCount = v14;
        v17 = _Val.m_kGuildReg;
        v3->m_unGrade = v15;
        v3->m_unCaptureFlag = v16;
        v3->m_kGuildReg = v17;
      }
      else
      {
        for ( j = (int)&i->m_unDecreaseScore; ; v5 = j - 32 )
        {
          j -= 56;
          if ( !_Pred.manager )
          {
            v29 = "call to empty boost::function";
            std::exception::exception(&v25, (const char *const *)&v29);
            v25.vfptr = (std::exceptionVtbl *)&boost::bad_function_call::`vftable';
            LOBYTE(v31) = 3;
            boost::throw_exception<boost::bad_function_call>((boost::bad_function_call *)&v25);
          }
          if ( !(unsigned __int8)((int (__cdecl *)(void *, GTStatusWin::RankInfo *, int))_Pred.invoker)(
                                   _Pred.functor.obj_ptr,
                                   &_Val,
                                   j - 32) )
            break;
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
            (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v5,
            (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)(j - 32),
            0,
            0xFFFFFFFF);
          *(_DWORD *)(v5 + 28) = *(_DWORD *)(j - 4);
          *(_DWORD *)(v5 + 32) = *(_DWORD *)j;
          *(_DWORD *)(v5 + 36) = *(_DWORD *)(j + 4);
          *(_DWORD *)(v5 + 40) = *(_DWORD *)(j + 8);
          *(_DWORD *)(v5 + 44) = *(_DWORD *)(j + 12);
          *(_DWORD *)(v5 + 48) = *(_DWORD *)(j + 16);
          *(_DWORD *)(v5 + 52) = *(_DWORD *)(j + 20);
        }
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v5,
          &_Val.m_strName,
          0,
          0xFFFFFFFF);
        v19 = _Val.m_unDecreaseScore;
        v20 = _Val.m_unDieCount;
        v3 = v27;
        *(_DWORD *)(v5 + 28) = _Val.m_unIncreaseScore;
        v21 = _Val.m_unKillCount;
        *(_DWORD *)(v5 + 32) = v19;
        v22 = _Val.m_unGrade;
        *(_DWORD *)(v5 + 36) = v20;
        v23 = _Val.m_unCaptureFlag;
        *(_DWORD *)(v5 + 40) = v21;
        v24 = _Val.m_kGuildReg;
        *(_DWORD *)(v5 + 44) = v22;
        *(_DWORD *)(v5 + 48) = v23;
        *(_DWORD *)(v5 + 52) = v24;
      }
      LOBYTE(v31) = 0;
      if ( _Val.m_strName._Myres >= 0x10 )
        operator delete(_Val.m_strName._Bx._Ptr);
      ++i;
      _Val.m_strName._Myres = 15;
      _Val.m_strName._Mysize = 0;
    }
  }
  v31 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}
// 98CD40: using guessed type int (__thiscall *boost::bad_function_call::`vftable')(void *p, char);

//----- (005D2930) --------------------------------------------------------
void __cdecl std::_Median<GTStatusWin::RankInfo *,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Mid, GTStatusWin::RankInfo *_Last, bool (__cdecl *_Pred)(GTStatusWin::RankInfo *, GTStatusWin::RankInfo *))
{
  signed int v4; // eax@1
  int v5; // eax@2
  unsigned int v6; // esi@2
  GTStatusWin::RankInfo *v7; // eax@14
  GTStatusWin::RankInfo *v8; // esi@14
  int v9; // [sp+Ch] [bp-8h]@2
  GTStatusWin::RankInfo *_Left; // [sp+10h] [bp-4h]@2
  GTStatusWin::RankInfo *_Firsta; // [sp+1Ch] [bp+8h]@8
  GTStatusWin::RankInfo *_Firstb; // [sp+1Ch] [bp+8h]@14

  v4 = _Last - _First;
  if ( v4 <= 40 )
  {
    if ( _Pred(_Mid, _First) )
      std::swap<GTStatusWin::RankInfo>(_Mid, _First);
    if ( _Pred(_Last, _Mid) )
      std::swap<GTStatusWin::RankInfo>(_Last, _Mid);
    if ( _Pred(_Mid, _First) )
      std::swap<GTStatusWin::RankInfo>(_Mid, _First);
  }
  else
  {
    v5 = (v4 + 1) / 8;
    v6 = 56 * v5;
    v9 = 2 * v5;
    _Left = &_First[v5];
    if ( _Pred(_Left, _First) )
      std::swap<GTStatusWin::RankInfo>(_Left, _First);
    if ( _Pred(&_First[v9], _Left) )
      std::swap<GTStatusWin::RankInfo>(&_First[v9], _Left);
    if ( _Pred(_Left, _First) )
      std::swap<GTStatusWin::RankInfo>(_Left, _First);
    _Firsta = &_Mid[-v6 / 0x38];
    if ( _Pred(_Mid, &_Mid[-v6 / 0x38]) )
      std::swap<GTStatusWin::RankInfo>(_Mid, _Firsta);
    if ( _Pred(&_Mid[v6 / 0x38], _Mid) )
      std::swap<GTStatusWin::RankInfo>(&_Mid[v6 / 0x38], _Mid);
    if ( _Pred(_Mid, _Firsta) )
      std::swap<GTStatusWin::RankInfo>(_Mid, _Firsta);
    v7 = &_Last[-v6 / 0x38];
    v8 = &_Last[-(v9 * 56) / 0x38u];
    _Firstb = v7;
    if ( _Pred(v7, &_Last[-(v9 * 56) / 0x38u]) )
      std::swap<GTStatusWin::RankInfo>(_Firstb, v8);
    if ( _Pred(_Last, _Firstb) )
      std::swap<GTStatusWin::RankInfo>(_Last, _Firstb);
    if ( _Pred(_Firstb, v8) )
      std::swap<GTStatusWin::RankInfo>(_Firstb, v8);
    if ( _Pred(_Mid, _Left) )
      std::swap<GTStatusWin::RankInfo>(_Mid, _Left);
    if ( _Pred(_Firstb, _Mid) )
      std::swap<GTStatusWin::RankInfo>(_Firstb, _Mid);
    if ( _Pred(_Mid, _Left) )
      std::swap<GTStatusWin::RankInfo>(_Mid, _Left);
  }
}

//----- (005D2B40) --------------------------------------------------------
void __cdecl std::_Make_heap<GTStatusWin::RankInfo *,int,GTStatusWin::RankInfo,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, bool (__cdecl *_Pred)(GTStatusWin::RankInfo *, GTStatusWin::RankInfo *))
{
  int v3; // edi@1
  char *v4; // esi@2
  unsigned int v5; // edx@3
  unsigned int v6; // eax@3
  unsigned int v7; // ecx@3
  unsigned int v8; // edx@3
  unsigned int v9; // eax@3
  unsigned int v10; // ecx@3
  GTStatusWin::RankInfo _Val; // [sp+18h] [bp-48h]@3
  int v12; // [sp+5Ch] [bp-4h]@3

  v3 = (_Last - _First) / 2;
  if ( v3 > 0 )
  {
    v4 = (char *)&_First[v3].m_unDecreaseScore;
    do
    {
      v4 -= 56;
      --v3;
      _Val.m_strName._Myres = 15;
      _Val.m_strName._Mysize = 0;
      _Val.m_strName._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &_Val.m_strName,
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)(v4 - 32),
        0,
        0xFFFFFFFF);
      v5 = *(_DWORD *)v4;
      v6 = *((_DWORD *)v4 + 1);
      _Val.m_unIncreaseScore = *((_DWORD *)v4 - 1);
      v7 = *((_DWORD *)v4 + 2);
      _Val.m_unDecreaseScore = v5;
      v8 = *((_DWORD *)v4 + 3);
      _Val.m_unDieCount = v6;
      v9 = *((_DWORD *)v4 + 4);
      _Val.m_unKillCount = v7;
      v10 = *((_DWORD *)v4 + 5);
      _Val.m_unGrade = v8;
      _Val.m_unCaptureFlag = v9;
      _Val.m_kGuildReg = v10;
      v12 = 0;
      std::_Adjust_heap<GTStatusWin::RankInfo *,int,GTStatusWin::RankInfo,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(
        _First,
        v3,
        _Last - _First,
        &_Val,
        _Pred);
      v12 = -1;
      if ( _Val.m_strName._Myres >= 0x10 )
        operator delete(_Val.m_strName._Bx._Ptr);
    }
    while ( v3 > 0 );
  }
}

//----- (005D2C60) --------------------------------------------------------
void __cdecl std::_Insertion_sort1<GTStatusWin::RankInfo *,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),GTStatusWin::RankInfo>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, bool (__cdecl *_Pred)(GTStatusWin::RankInfo *, GTStatusWin::RankInfo *))
{
  GTStatusWin::RankInfo *v3; // esi@1
  GTStatusWin::RankInfo *i; // ebx@2
  GTStatusWin::RankInfo *v5; // edi@3
  unsigned int v6; // edx@3
  unsigned int v7; // eax@3
  unsigned int v8; // ecx@3
  unsigned int v9; // edx@3
  unsigned int v10; // eax@3
  unsigned int v11; // ecx@3
  unsigned int v12; // ecx@4
  unsigned int v13; // edx@4
  unsigned int v14; // eax@4
  unsigned int v15; // ecx@4
  unsigned int v16; // edx@4
  unsigned int v17; // eax@4
  int j; // esi@5
  unsigned int v19; // eax@7
  unsigned int v20; // ecx@7
  unsigned int v21; // edx@7
  unsigned int v22; // eax@7
  unsigned int v23; // ecx@7
  unsigned int v24; // edx@7
  GTStatusWin::RankInfo _Val; // [sp+18h] [bp-48h]@3
  int v26; // [sp+5Ch] [bp-4h]@3

  v3 = _First;
  if ( _First != _Last )
  {
    for ( i = _First + 1; i != _Last; ++i )
    {
      v5 = i;
      _Val.m_strName._Myres = 15;
      _Val.m_strName._Mysize = 0;
      _Val.m_strName._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &_Val.m_strName,
        &i->m_strName,
        0,
        0xFFFFFFFF);
      v6 = i->m_unDecreaseScore;
      v7 = i->m_unDieCount;
      _Val.m_unIncreaseScore = i->m_unIncreaseScore;
      v8 = i->m_unKillCount;
      _Val.m_unDecreaseScore = v6;
      v9 = i->m_unGrade;
      _Val.m_unDieCount = v7;
      v10 = i->m_unCaptureFlag;
      _Val.m_unKillCount = v8;
      v11 = i->m_kGuildReg;
      _Val.m_unGrade = v9;
      _Val.m_unCaptureFlag = v10;
      _Val.m_kGuildReg = v11;
      v26 = 0;
      if ( _Pred(&_Val, v3) )
      {
        std::_Move_backward<GTStatusWin::RankInfo *,GTStatusWin::RankInfo *>(v3, i, i + 1);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &v3->m_strName,
          &_Val.m_strName,
          0,
          0xFFFFFFFF);
        v12 = _Val.m_unDecreaseScore;
        v13 = _Val.m_unDieCount;
        v3->m_unIncreaseScore = _Val.m_unIncreaseScore;
        v14 = _Val.m_unKillCount;
        v3->m_unDecreaseScore = v12;
        v15 = _Val.m_unGrade;
        v3->m_unDieCount = v13;
        v16 = _Val.m_unCaptureFlag;
        v3->m_unKillCount = v14;
        v17 = _Val.m_kGuildReg;
        v3->m_unGrade = v15;
        v3->m_unCaptureFlag = v16;
        v3->m_kGuildReg = v17;
      }
      else
      {
        for ( j = (int)&i[-1]; _Pred(&_Val, (GTStatusWin::RankInfo *)j); j -= 56 )
        {
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
            &v5->m_strName,
            (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)j,
            0,
            0xFFFFFFFF);
          v5->m_unIncreaseScore = *(_DWORD *)(j + 28);
          v5->m_unDecreaseScore = *(_DWORD *)(j + 32);
          v5->m_unDieCount = *(_DWORD *)(j + 36);
          v5->m_unKillCount = *(_DWORD *)(j + 40);
          v5->m_unGrade = *(_DWORD *)(j + 44);
          v5->m_unCaptureFlag = *(_DWORD *)(j + 48);
          v5->m_kGuildReg = *(_DWORD *)(j + 52);
          v5 = (GTStatusWin::RankInfo *)j;
        }
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &v5->m_strName,
          &_Val.m_strName,
          0,
          0xFFFFFFFF);
        v19 = _Val.m_unDecreaseScore;
        v20 = _Val.m_unDieCount;
        v3 = _First;
        v5->m_unIncreaseScore = _Val.m_unIncreaseScore;
        v21 = _Val.m_unKillCount;
        v5->m_unDecreaseScore = v19;
        v22 = _Val.m_unGrade;
        v5->m_unDieCount = v20;
        v23 = _Val.m_unCaptureFlag;
        v5->m_unKillCount = v21;
        v24 = _Val.m_kGuildReg;
        v5->m_unGrade = v22;
        v5->m_unCaptureFlag = v23;
        v5->m_kGuildReg = v24;
      }
      v26 = -1;
      if ( _Val.m_strName._Myres >= 0x10 )
        operator delete(_Val.m_strName._Bx._Ptr);
    }
  }
}

//----- (005D2E40) --------------------------------------------------------
void __cdecl std::_Pop_heap_0<GTStatusWin::RankInfo *,GTStatusWin::RankInfo,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > _Pred)
{
  unsigned int v3; // edx@1
  unsigned int v4; // eax@1
  unsigned int v5; // ecx@1
  unsigned int v6; // edx@1
  unsigned int v7; // eax@1
  unsigned int v8; // ecx@1
  boost::detail::function::any_pointer (__cdecl *v9)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp-10h] [bp-70h]@1
  int v10; // [sp-Ch] [bp-6Ch]@1
  bool (__cdecl *v11)(boost::detail::function::any_pointer, GTStatusWin::RankInfo *, GTStatusWin::RankInfo *); // [sp-8h] [bp-68h]@1
  int v12; // [sp-4h] [bp-64h]@1
  boost::detail::function::any_pointer (__cdecl **v13)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp+10h] [bp-50h]@1
  GTStatusWin::RankInfo *v14; // [sp+14h] [bp-4Ch]@1
  GTStatusWin::RankInfo _Val; // [sp+18h] [bp-48h]@1
  int v16; // [sp+5Ch] [bp-4h]@1

  v14 = _First;
  v16 = 0;
  _Val.m_strName._Myres = 15;
  _Val.m_strName._Mysize = 0;
  _Val.m_strName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_Val.m_strName,
    &_Last[-1].m_strName,
    0,
    0xFFFFFFFF);
  v3 = _Last[-1].m_unDecreaseScore;
  v4 = _Last[-1].m_unDieCount;
  _Val.m_unIncreaseScore = _Last[-1].m_unIncreaseScore;
  v5 = _Last[-1].m_unKillCount;
  _Val.m_unDecreaseScore = v3;
  v6 = _Last[-1].m_unGrade;
  _Val.m_unDieCount = v4;
  v7 = _Last[-1].m_unCaptureFlag;
  _Val.m_unKillCount = v5;
  v8 = _Last[-1].m_kGuildReg;
  _Val.m_unGrade = v6;
  _Val.m_unCaptureFlag = v7;
  _Val.m_kGuildReg = v8;
  v12 = 0;
  v9 = 0;
  v10 = 0;
  v11 = 0;
  LOBYTE(v16) = 1;
  v13 = &v9;
  if ( _Pred.manager )
  {
    v11 = _Pred.invoker;
    v9 = _Pred.manager;
    v10 = ((int (__cdecl *)(void *, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
  }
  std::_Pop_heap<GTStatusWin::RankInfo *,int,GTStatusWin::RankInfo,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(
    v14,
    _Last - 1,
    _Last - 1,
    &_Val,
    *(boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > *)&v9);
  if ( _Val.m_strName._Myres >= 0x10 )
    operator delete(_Val.m_strName._Bx._Ptr);
  _Val.m_strName._Myres = 15;
  _Val.m_strName._Mysize = 0;
  _Val.m_strName._Bx._Buf[0] = 0;
  v16 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}

//----- (005D2F60) --------------------------------------------------------
void __cdecl std::_Pop_heap_0<GTStatusWin::RankInfo *,GTStatusWin::RankInfo,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, bool (__cdecl *_Pred)(GTStatusWin::RankInfo *, GTStatusWin::RankInfo *))
{
  unsigned int v3; // ecx@1
  unsigned int v4; // edx@1
  unsigned int v5; // eax@1
  unsigned int v6; // ecx@1
  unsigned int v7; // edx@1
  unsigned int v8; // eax@1
  GTStatusWin::RankInfo _Val; // [sp+10h] [bp-48h]@1
  int v10; // [sp+54h] [bp-4h]@1

  _Val.m_strName._Myres = 15;
  _Val.m_strName._Mysize = 0;
  _Val.m_strName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_Val.m_strName,
    &_Last[-1].m_strName,
    0,
    0xFFFFFFFF);
  v3 = _Last[-1].m_unDecreaseScore;
  v4 = _Last[-1].m_unDieCount;
  _Val.m_unIncreaseScore = _Last[-1].m_unIncreaseScore;
  v5 = _Last[-1].m_unKillCount;
  _Val.m_unDecreaseScore = v3;
  v6 = _Last[-1].m_unGrade;
  _Val.m_unDieCount = v4;
  v7 = _Last[-1].m_unCaptureFlag;
  _Val.m_unKillCount = v5;
  v8 = _Last[-1].m_kGuildReg;
  _Val.m_unGrade = v6;
  _Val.m_unCaptureFlag = v7;
  _Val.m_kGuildReg = v8;
  v10 = 0;
  std::_Pop_heap<GTStatusWin::RankInfo *,int,GTStatusWin::RankInfo,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(
    _First,
    _Last - 1,
    _Last - 1,
    &_Val,
    _Pred);
  if ( _Val.m_strName._Myres >= 0x10 )
    operator delete(_Val.m_strName._Bx._Ptr);
}

//----- (005D3030) --------------------------------------------------------
#error "5D341A: positive sp value has been found (funcsize=334)"

//----- (005D3420) --------------------------------------------------------
void __cdecl std::make_heap<GTStatusWin::RankInfo *,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > _Pred)
{
  boost::detail::function::any_pointer (__cdecl *v3)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp-14h] [bp-30h]@2
  int v4; // [sp-10h] [bp-2Ch]@2
  bool (__cdecl *v5)(boost::detail::function::any_pointer, GTStatusWin::RankInfo *, GTStatusWin::RankInfo *); // [sp-Ch] [bp-28h]@2
  int v6; // [sp-8h] [bp-24h]@2
  int v7; // [sp-4h] [bp-20h]@2
  int v8; // [sp+18h] [bp-4h]@1

  v8 = 0;
  if ( _Last - _First > 1 )
  {
    v7 = 0;
    v6 = 0;
    v3 = 0;
    v4 = 0;
    v5 = 0;
    if ( _Pred.manager )
    {
      v5 = _Pred.invoker;
      v3 = _Pred.manager;
      v4 = ((int (__cdecl *)(void *, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
    }
    std::_Make_heap<GTStatusWin::RankInfo *,int,GTStatusWin::RankInfo,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(
      _First,
      _Last,
      *(boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > *)&v3);
  }
  v8 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}

//----- (005D34E0) --------------------------------------------------------
void __cdecl std::_Insertion_sort<GTStatusWin::RankInfo *,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > _Pred)
{
  boost::detail::function::any_pointer (__cdecl *v3)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp-10h] [bp-28h]@1
  int v4; // [sp-Ch] [bp-24h]@1
  bool (__cdecl *v5)(boost::detail::function::any_pointer, GTStatusWin::RankInfo *, GTStatusWin::RankInfo *); // [sp-8h] [bp-20h]@1
  int v6; // [sp-4h] [bp-1Ch]@1
  boost::detail::function::any_pointer (__cdecl **v7)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp+8h] [bp-10h]@1
  int v8; // [sp+14h] [bp-4h]@1

  v6 = 0;
  v3 = 0;
  v4 = 0;
  v5 = 0;
  v8 = 0;
  v7 = &v3;
  if ( _Pred.manager )
  {
    v5 = _Pred.invoker;
    v3 = _Pred.manager;
    v4 = ((int (__cdecl *)(void *, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
  }
  std::_Insertion_sort1<GTStatusWin::RankInfo *,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>,GTStatusWin::RankInfo>(
    _First,
    _Last,
    *(boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > *)&v3);
  v8 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}

//----- (005D3590) --------------------------------------------------------
std::pair<GTStatusWin::RankInfo *,GTStatusWin::RankInfo *> *__cdecl std::_Unguarded_partition<GTStatusWin::RankInfo *,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(std::pair<GTStatusWin::RankInfo *,GTStatusWin::RankInfo *> *result, GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, bool (__cdecl *_Pred)(GTStatusWin::RankInfo *, GTStatusWin::RankInfo *))
{
  int v4; // eax@1
  GTStatusWin::RankInfo *v5; // esi@1
  GTStatusWin::RankInfo *v6; // ebx@1
  unsigned int v7; // eax@10
  GTStatusWin::RankInfo *v8; // edi@10
  GTStatusWin::RankInfo *v9; // ST08_4@14
  bool v10; // zf@17
  GTStatusWin::RankInfo *v11; // ebx@18
  GTStatusWin::RankInfo *v12; // ST0C_4@28
  GTStatusWin::RankInfo *v13; // ST08_4@28
  GTStatusWin::RankInfo *v14; // eax@29
  std::pair<GTStatusWin::RankInfo *,GTStatusWin::RankInfo *> *v15; // eax@34
  GTStatusWin::RankInfo *_Plast; // [sp+Ch] [bp-8h]@1
  GTStatusWin::RankInfo *_Glast; // [sp+10h] [bp-4h]@2
  GTStatusWin::RankInfo *_Glasta; // [sp+10h] [bp-4h]@10

  v4 = (_Last - _First) / 2;
  v5 = &_First[v4];
  std::_Median<GTStatusWin::RankInfo *,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(
    _First,
    &_First[v4],
    _Last - 1,
    _Pred);
  v6 = v5 + 1;
  _Plast = v5 + 1;
  if ( _First < v5 )
  {
    do
    {
      _Glast = v5 - 1;
      if ( _Pred(v5 - 1, v5) )
        break;
      if ( _Pred(v5, _Glast) )
        break;
      --v5;
    }
    while ( _First < _Glast );
  }
  if ( v6 < _Last )
  {
    do
    {
      if ( _Pred(v6, v5) )
        break;
      if ( _Pred(v5, v6) )
        break;
      ++v6;
    }
    while ( v6 < _Last );
    _Plast = v6;
  }
  v7 = (unsigned int)v5;
  v8 = v6;
  for ( _Glasta = v5; ; v7 = (unsigned int)_Glasta )
  {
    while ( 1 )
    {
      if ( v8 < _Last )
      {
        do
        {
          if ( !_Pred(v5, v8) )
          {
            if ( _Pred(v8, v5) )
              break;
            v9 = v6;
            ++v6;
            std::swap<GTStatusWin::RankInfo>(v9, v8);
          }
          ++v8;
        }
        while ( v8 < _Last );
        v7 = (unsigned int)_Glasta;
        _Plast = v6;
      }
      v10 = v7 == (_DWORD)_First;
      if ( v7 > (unsigned int)_First )
      {
        v11 = (GTStatusWin::RankInfo *)(v7 - 56);
        do
        {
          if ( !_Pred(v11, v5) )
          {
            if ( _Pred(v5, v11) )
              break;
            --v5;
            std::swap<GTStatusWin::RankInfo>(v5, v11);
          }
          --v11;
          --_Glasta;
        }
        while ( _First < _Glasta );
        v7 = (unsigned int)_Glasta;
        v6 = _Plast;
        v10 = _Glasta == _First;
      }
      if ( v10 )
        break;
      v14 = (GTStatusWin::RankInfo *)(v7 - 56);
      _Glasta = v14;
      if ( v8 == _Last )
      {
        --v5;
        if ( v14 != v5 )
          std::swap<GTStatusWin::RankInfo>(v14, v5);
        --v6;
        _Plast = v6;
        std::swap<GTStatusWin::RankInfo>(v5, v6);
        v7 = (unsigned int)_Glasta;
      }
      else
      {
        std::swap<GTStatusWin::RankInfo>(v8, v14);
        v7 = (unsigned int)_Glasta;
        ++v8;
      }
    }
    if ( v8 == _Last )
      break;
    if ( v6 != v8 )
      std::swap<GTStatusWin::RankInfo>(v5, v6);
    v12 = v8;
    ++v6;
    v13 = v5;
    _Plast = v6;
    ++v5;
    ++v8;
    std::swap<GTStatusWin::RankInfo>(v13, v12);
  }
  v15 = result;
  result->first = v5;
  result->second = v6;
  return v15;
}

//----- (005D3750) --------------------------------------------------------
void __thiscall std::vector<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo>>::~vector<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo>>(std::vector<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo> > *this)
{
  std::vector<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo> > *v1; // esi@1

  v1 = this;
  if ( this->_Myfirst )
  {
    std::_Destroy_range<std::allocator<GTStatusWin::RankInfo>>(this->_Myfirst, this->_Mylast);
    operator delete(v1->_Myfirst);
  }
  v1->_Myfirst = 0;
  v1->_Mylast = 0;
  v1->_Myend = 0;
}

//----- (005D37A0) --------------------------------------------------------
void __thiscall std::vector<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo>>::reserve(std::vector<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo> > *this, unsigned int _Count)
{
  std::vector<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo> > *v2; // esi@1
  GTStatusWin::RankInfo *v3; // eax@4
  GTStatusWin::RankInfo *v4; // ST04_4@4
  GTStatusWin::RankInfo *v5; // ST00_4@4
  unsigned int v6; // edx@4
  int v7; // edi@4
  GTStatusWin::RankInfo *v8; // eax@6
  int v9; // [sp+0h] [bp-24h]@1
  GTStatusWin::RankInfo *_Ptr; // [sp+10h] [bp-14h]@4
  int *v11; // [sp+14h] [bp-10h]@1
  int v12; // [sp+20h] [bp-4h]@4

  v11 = &v9;
  v2 = this;
  if ( _Count > 0x4924924 )
    std::_Xlength_error("vector<T> too long");
  if ( this->_Myend - this->_Myfirst < _Count )
  {
    v3 = std::allocator<GTStatusWin::RankInfo>::allocate(_Count);
    v4 = v2->_Mylast;
    v5 = v2->_Myfirst;
    _Ptr = v3;
    v12 = 0;
    std::_Uninit_move<GTStatusWin::RankInfo *,GTStatusWin::RankInfo *,std::allocator<GTStatusWin::RankInfo>,GTStatusWin::RankInfo>(
      v5,
      v4,
      v3);
    v6 = (signed int)((char *)v2->_Mylast
                    - (char *)v2->_Myfirst
                    + ((unsigned __int64)(-1840700269i64 * (unsigned int)((char *)v2->_Mylast - (char *)v2->_Myfirst)) >> 32)) >> 5;
    v7 = v6 + (v6 >> 31);
    if ( v2->_Myfirst )
    {
      std::_Destroy_range<std::allocator<GTStatusWin::RankInfo>>(v2->_Myfirst, v2->_Mylast);
      operator delete(v2->_Myfirst);
    }
    v8 = _Ptr;
    v2->_Myend = &_Ptr[_Count];
    v2->_Mylast = &v8[v7];
    v2->_Myfirst = v8;
  }
}

//----- (005D38C0) --------------------------------------------------------
void __cdecl std::_Sort_heap<GTStatusWin::RankInfo *,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > _Pred)
{
  int v3; // ebx@3
  boost::detail::function::any_pointer (__cdecl *v4)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // edi@3
  unsigned int v5; // edx@9
  boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > v6; // [sp-10h] [bp-40h]@5
  int v7; // [sp-Ch] [bp-3Ch]@5
  bool (__cdecl *v8)(boost::detail::function::any_pointer, GTStatusWin::RankInfo *, GTStatusWin::RankInfo *); // [sp-8h] [bp-38h]@5
  int v9; // [sp-4h] [bp-34h]@5
  boost::detail::function::any_pointer (__cdecl *v10)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp+10h] [bp-20h]@3
  int v11; // [sp+14h] [bp-1Ch]@3
  bool (__cdecl *v12)(boost::detail::function::any_pointer, GTStatusWin::RankInfo *, GTStatusWin::RankInfo *); // [sp+18h] [bp-18h]@3
  boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > *v13; // [sp+1Ch] [bp-14h]@5
  int v14; // [sp+20h] [bp-10h]@2
  int v15; // [sp+2Ch] [bp-4h]@1

  v15 = 0;
  if ( _Last - _First > 1 )
  {
    v14 = (char *)_Last - (char *)_First;
    do
    {
      v3 = 0;
      v4 = 0;
      v10 = 0;
      v11 = 0;
      v12 = 0;
      if ( _Pred.manager )
      {
        v4 = _Pred.manager;
        v12 = _Pred.invoker;
        v10 = _Pred.manager;
        v3 = ((int (__cdecl *)(void *, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
        v11 = v3;
      }
      v9 = 0;
      LOBYTE(v15) = 1;
      v13 = &v6;
      v6.manager = 0;
      v7 = 0;
      v8 = 0;
      if ( v4 )
      {
        v8 = v12;
        v6.manager = v4;
        v7 = ((int (__cdecl *)(int, _DWORD))v4)(v3, 0);
      }
      std::_Pop_heap_0<GTStatusWin::RankInfo *,GTStatusWin::RankInfo,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(
        _First,
        _Last,
        v6);
      LOBYTE(v15) = 0;
      if ( v4 )
        v11 = ((int (__cdecl *)(int, signed int))v4)(v3, 1);
      --_Last;
      v5 = (signed int)(v14 - 56 + ((unsigned __int64)(-1840700269i64 * (v14 - 56)) >> 32)) >> 5;
      v14 -= 56;
      v10 = 0;
      v12 = 0;
    }
    while ( (signed int)(v5 + (v5 >> 31)) > 1 );
  }
  v15 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}

//----- (005D39F0) --------------------------------------------------------
void __cdecl std::_Sort_heap<GTStatusWin::RankInfo *,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, bool (__cdecl *_Pred)(GTStatusWin::RankInfo *, GTStatusWin::RankInfo *))
{
  GTStatusWin::RankInfo *v3; // edi@1
  signed int i; // esi@1

  v3 = _Last;
  for ( i = (char *)_Last - (char *)_First; i / 56 > 1; --v3 )
  {
    std::_Pop_heap_0<GTStatusWin::RankInfo *,GTStatusWin::RankInfo,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(
      _First,
      v3,
      _Pred);
    i -= 56;
  }
}

//----- (005D3A50) --------------------------------------------------------
void __thiscall std::vector<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo>>::_Reserve(std::vector<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo> > *this, unsigned int _Count)
{
  unsigned int v2; // esi@1
  unsigned int v3; // esi@3
  unsigned int v4; // eax@3
  unsigned int v5; // eax@5

  v2 = this->_Mylast - this->_Myfirst;
  if ( 76695844 - _Count < v2 )
    std::_Xlength_error("vector<T> too long");
  v3 = _Count + v2;
  v4 = this->_Myend - this->_Myfirst;
  if ( v3 > v4 )
  {
    if ( 76695844 - (v4 >> 1) >= v4 )
      v5 = (v4 >> 1) + v4;
    else
      v5 = 0;
    if ( v5 < v3 )
      v5 = v3;
    std::vector<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo>>::reserve(this, v5);
  }
}

//----- (005D3AD0) --------------------------------------------------------
#error "5D3B6E: positive sp value has been found (funcsize=52)"

//----- (005D3B70) --------------------------------------------------------
GTStatusWin *__thiscall GTStatusWin::`vector deleting destructor'(GTStatusWin *this, unsigned int a2)
{
  GTStatusWin *v2; // esi@1

  v2 = this;
  GTStatusWin::~GTStatusWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005D3BA0) --------------------------------------------------------
void __thiscall std::vector<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo>>::push_back(std::vector<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo> > *this, GTStatusWin::RankInfo *_Val)
{
  std::vector<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo> > *v2; // esi@1
  GTStatusWin::RankInfo *v3; // ecx@1
  unsigned int v4; // edx@3
  int v5; // edi@3

  v2 = this;
  v3 = this->_Mylast;
  if ( _Val >= v3 || v2->_Myfirst > _Val )
  {
    if ( v3 == v2->_Myend )
      std::vector<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo>>::_Reserve(v2, 1u);
    std::_Construct<GTStatusWin::RankInfo,GTStatusWin::RankInfo const &>(v2->_Mylast, _Val);
    ++v2->_Mylast;
  }
  else
  {
    v4 = (signed int)((char *)_Val
                    - (char *)v2->_Myfirst
                    + ((unsigned __int64)(-1840700269i64 * ((char *)_Val - (char *)v2->_Myfirst)) >> 32)) >> 5;
    v5 = v4 + (v4 >> 31);
    if ( v3 == v2->_Myend )
      std::vector<GTStatusWin::RankInfo,std::allocator<GTStatusWin::RankInfo>>::_Reserve(v2, 1u);
    std::_Cons_val<std::allocator<GTStatusWin::RankInfo>,GTStatusWin::RankInfo,GTStatusWin::RankInfo &>(
      &v2->_Alval,
      v2->_Mylast,
      &v2->_Myfirst[v5]);
    ++v2->_Mylast;
  }
}

//----- (005D3C30) --------------------------------------------------------
void __cdecl std::_Sort<GTStatusWin::RankInfo *,int,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, int _Ideal, boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > _Pred)
{
  GTStatusWin::RankInfo *v4; // edi@1
  GTStatusWin::RankInfo *v5; // ebx@1
  int v6; // eax@1
  signed int v7; // esi@2
  boost::detail::function::any_pointer (__cdecl *v8)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp-Ch] [bp-30h]@4
  int v9; // [sp-8h] [bp-2Ch]@4
  bool (__cdecl *v10)(boost::detail::function::any_pointer, GTStatusWin::RankInfo *, GTStatusWin::RankInfo *); // [sp-4h] [bp-28h]@4
  std::pair<GTStatusWin::RankInfo *,GTStatusWin::RankInfo *> _Mid; // [sp+10h] [bp-14h]@6
  int v12; // [sp+20h] [bp-4h]@1

  v4 = _Last;
  v5 = _First;
  v6 = _Last - _First;
  v12 = 0;
  if ( v6 <= 32 )
    goto LABEL_14;
  v7 = _Ideal;
  while ( v7 > 0 )
  {
    v8 = 0;
    v9 = 0;
    v10 = 0;
    if ( _Pred.manager )
    {
      v10 = _Pred.invoker;
      v8 = _Pred.manager;
      v9 = ((int (__cdecl *)(void *, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
    }
    std::_Unguarded_partition<GTStatusWin::RankInfo *,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(
      &_Mid,
      v5,
      v4,
      *(boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > *)&v8);
    v7 = v7 / 2 / 2 + v7 / 2;
    if ( _Mid.first - v5 >= v4 - _Mid.second )
    {
      v8 = 0;
      v9 = 0;
      v10 = 0;
      if ( _Pred.manager )
      {
        v10 = _Pred.invoker;
        v8 = _Pred.manager;
        v9 = ((int (__cdecl *)(void *, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
      }
      std::_Sort<GTStatusWin::RankInfo *,int,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(
        _Mid.second,
        v4,
        v7,
        *(boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > *)&v8);
      v4 = _Mid.first;
      v5 = _First;
    }
    else
    {
      v8 = 0;
      v9 = 0;
      v10 = 0;
      if ( _Pred.manager )
      {
        v10 = _Pred.invoker;
        v8 = _Pred.manager;
        v9 = ((int (__cdecl *)(_DWORD, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
      }
      std::_Sort<GTStatusWin::RankInfo *,int,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(
        _First,
        _Mid.first,
        v7,
        *(boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > *)&v8);
      v5 = _Mid.second;
      _First = _Mid.second;
    }
    v6 = v4 - v5;
    if ( v6 <= 32 )
      goto LABEL_14;
  }
  if ( v6 <= 32 )
  {
LABEL_14:
    if ( v6 > 1 )
    {
      v8 = 0;
      v9 = 0;
      v10 = 0;
      if ( _Pred.manager )
      {
        v10 = _Pred.invoker;
        v8 = _Pred.manager;
        v9 = ((int (__cdecl *)(_DWORD, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
      }
      std::_Insertion_sort<GTStatusWin::RankInfo *,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(
        v5,
        v4,
        *(boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > *)&v8);
    }
  }
  else
  {
    v8 = 0;
    v9 = 0;
    v10 = 0;
    if ( _Pred.manager )
    {
      v10 = _Pred.invoker;
      v8 = _Pred.manager;
      v9 = ((int (__cdecl *)(_DWORD, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
    }
    std::make_heap<GTStatusWin::RankInfo *,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(
      v5,
      v4,
      *(boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > *)&v8);
    v8 = 0;
    v9 = 0;
    v10 = 0;
    if ( _Pred.manager )
    {
      v10 = _Pred.invoker;
      v8 = _Pred.manager;
      v9 = ((int (__cdecl *)(_DWORD, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
    }
    std::sort_heap<GTStatusWin::RankInfo *,boost::function<bool __cdecl (GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void>>>(
      v5,
      v4,
      *(boost::function<bool __cdecl(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),std::allocator<void> > *)&v8);
  }
  v12 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}

//----- (005D3EA0) --------------------------------------------------------
void __cdecl std::_Sort<GTStatusWin::RankInfo *,int,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(GTStatusWin::RankInfo *_First, GTStatusWin::RankInfo *_Last, int _Ideal, bool (__cdecl *_Pred)(GTStatusWin::RankInfo *, GTStatusWin::RankInfo *))
{
  GTStatusWin::RankInfo *v4; // ebx@1
  GTStatusWin::RankInfo *v5; // edi@1
  int v6; // eax@1
  signed int v7; // esi@2
  std::pair<GTStatusWin::RankInfo *,GTStatusWin::RankInfo *> _Mid; // [sp+Ch] [bp-8h]@4

  v4 = _First;
  v5 = _Last;
  v6 = _Last - _First;
  if ( v6 <= 32 )
    goto LABEL_8;
  v7 = _Ideal;
  while ( v7 > 0 )
  {
    std::_Unguarded_partition<GTStatusWin::RankInfo *,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(
      &_Mid,
      v4,
      v5,
      _Pred);
    v7 = v7 / 2 / 2 + v7 / 2;
    if ( _Mid.first - v4 >= v5 - _Mid.second )
    {
      std::_Sort<GTStatusWin::RankInfo *,int,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(
        _Mid.second,
        v5,
        v7,
        _Pred);
      v5 = _Mid.first;
      v4 = _First;
    }
    else
    {
      std::_Sort<GTStatusWin::RankInfo *,int,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(
        _First,
        _Mid.first,
        v7,
        _Pred);
      v4 = _Mid.second;
      _First = _Mid.second;
    }
    v6 = v5 - v4;
    if ( v6 <= 32 )
      goto LABEL_8;
  }
  if ( v6 <= 32 )
  {
LABEL_8:
    if ( v6 > 1 )
      std::_Insertion_sort1<GTStatusWin::RankInfo *,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &),GTStatusWin::RankInfo>(
        v4,
        v5,
        _Pred);
  }
  else
  {
    if ( v5 - v4 > 1 )
      std::_Make_heap<GTStatusWin::RankInfo *,int,GTStatusWin::RankInfo,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(
        v4,
        v5,
        _Pred);
    std::_Sort_heap<GTStatusWin::RankInfo *,bool (__cdecl *)(GTStatusWin::RankInfo const &,GTStatusWin::RankInfo const &)>(
      v4,
      v5,
      _Pred);
  }
}

//----- (005D3FF0) --------------------------------------------------------
#error "5D40A8: positive sp value has been found (funcsize=64)"

//----- (005D40B0) --------------------------------------------------------
void __thiscall GTTDiceWin::GTTDiceWin(GTTDiceWin *this)
{
  GTTDiceWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GTTDiceWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GTTDiceWin::`vftable'{for `IDirectMessenger'};
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kTimerInterval);
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kTimerIntervalCount);
  v1->m_uiDiceCount = 1;
  v1->m_bEnemyRolling = 1;
  v1->m_pkMyguild = 0;
  v1->m_uiCount = 0;
  *(_WORD *)&v1->m_bRolling = 256;
  v1->m_bCount = 0;
}
// 9AF074: using guessed type void (__thiscall *GTTDiceWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AF094: using guessed type int (__thiscall *GTTDiceWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005D4150) --------------------------------------------------------
void __thiscall GTTDiceWin::~GTTDiceWin(GTTDiceWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GTTDiceWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GTTDiceWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9AF074: using guessed type void (__thiscall *GTTDiceWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AF094: using guessed type int (__thiscall *GTTDiceWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005D4170) --------------------------------------------------------
void __thiscall GTTDiceWin::RollingDice(GTTDiceWin *this, bool b)
{
  this->m_bRolling = b;
}

//----- (005D4180) --------------------------------------------------------
void __thiscall GTTDiceWin::InitDice(GTTDiceWin *this)
{
  GTTDiceWin *v1; // ebx@1
  int v2; // esi@1
  signed int v3; // edi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkMyDice[0]->vfptr[64].__vecDelDtor)(1);
  v2 = (int)v1->m_pkEnemyDice;
  ((void (__stdcall *)(_DWORD))v1->m_pkEnemyDice[0]->vfptr[64].__vecDelDtor)(1);
  v3 = 0;
  do
  {
    if ( v3 )
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v2 - 24) + 256))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 256))(0);
    }
    ++v3;
    v2 += 4;
  }
  while ( v3 < 6 );
  *(_WORD *)&v1->m_bMyRolling = 257;
}

//----- (005D41F0) --------------------------------------------------------
void __thiscall GTTDiceWin::SetCount(GTTDiceWin *this, bool b)
{
  this->m_bCount = b;
}

//----- (005D4200) --------------------------------------------------------
void __thiscall GTTDiceWin::UpdateMeWin(GTTDiceWin *this, float fCurTime)
{
  GTTDiceWin *v2; // esi@1
  signed int v3; // ebx@8
  int v4; // edi@8
  unsigned int v5; // eax@23
  char *v6; // ebx@26

  v2 = this;
  if ( this->m_bRolling )
  {
    if ( this->m_uiCount > 5 )
      this->m_uiCount = 0;
    if ( this->m_bMyRolling )
      ((void (__stdcall *)(_DWORD))this->m_pkMyDice[this->m_uiCount]->vfptr[64].__vecDelDtor)(1);
    if ( v2->m_bEnemyRolling )
      ((void (__stdcall *)(_DWORD))v2->m_pkEnemyDice[v2->m_uiCount]->vfptr[64].__vecDelDtor)(1);
    v3 = 0;
    v4 = (int)v2->m_pkEnemyDice;
    do
    {
      if ( v3 != v2->m_uiCount )
      {
        if ( v2->m_bMyRolling )
          (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v4 - 24) + 256))(0);
        if ( v2->m_bEnemyRolling )
          (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 256))(0);
      }
      ++v3;
      v4 += 4;
    }
    while ( v3 < 6 );
    if ( !(v2->m_uFlags & 1) && CNSTimer_Interval::IsRun_GetCount(&v2->m_kTimerInterval, fCurTime) )
    {
      CNSTimer_Interval::ReSet(&v2->m_kTimerInterval, Timer::ms_fCurTime);
      ++v2->m_uiCount;
      v2->m_kTimerInterval.m_fCheckTime = 0.2;
    }
  }
  if ( v2->m_bCount && !(v2->m_uFlags & 1) && CNSTimer_Interval::IsRun_GetCount(&v2->m_kTimerIntervalCount, fCurTime) )
  {
    if ( v2->m_uiDiceCount <= 5 )
    {
      CNSTimer_Interval::ReSet(&v2->m_kTimerIntervalCount, Timer::ms_fCurTime);
      v5 = v2->m_uiDiceCount;
      if ( v5 == 5 )
        v2->m_kTimerInterval.m_fCheckTime = 0.1;
      else
        v2->m_kTimerIntervalCount.m_fCheckTime = 1.0;
      v6 = fs("%d", v5);
      if ( v2->m_pkMsgHooker )
      {
        ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v2->m_pkMsgHooker->vfptr->SendDirectMessage)(46, v6, &v2->vfptr);
        if ( v2->m_pkMsgHooker )
          ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v2->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            46,
            v6,
            &v2->vfptr);
      }
      v2->vfptr->DirectDispatchToParent((IDirectMessenger *)&v2->vfptr, 46, v6, (IDirectMessenger *)&v2->vfptr);
      ++v2->m_uiCount;
    }
    else
    {
      v2->m_bCount = 0;
      v2->m_uiDiceCount = 1;
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (005D43E0) --------------------------------------------------------
void __thiscall GTTDiceWin::OnClickDice(GTTDiceWin *this)
{
  unsigned int v1; // edi@1
  GTTDiceWin *v2; // esi@1
  unsigned __int16 v3; // di@2
  bool v4; // zf@2
  unsigned int v5; // edi@3
  unsigned __int16 v6; // di@4

  v1 = g_pkMainChar->m_dwGuildRegNum;
  v2 = this;
  if ( v1 == GuildTask::GetGuildTournamentImprove()->m_DiceInfo.AGuild )
  {
    v3 = g_pkMainChar->m_kHandle;
    v4 = v3 == GuildTask::GetGuildTournamentImprove()->m_DiceInfo.AGuildDelegate;
  }
  else
  {
    v5 = g_pkMainChar->m_dwGuildRegNum;
    if ( v5 != GuildTask::GetGuildTournamentImprove()->m_DiceInfo.BGuild )
      return;
    v6 = g_pkMainChar->m_kHandle;
    v4 = v6 == GuildTask::GetGuildTournamentImprove()->m_DiceInfo.BGuildDelegate;
  }
  if ( v4 )
  {
    v2->m_bRolling = 1;
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x1Du, 0xD3u, 0, 0);
  }
}

//----- (005D4460) --------------------------------------------------------
void __thiscall GTTDiceWin::SetReseultDice(GTTDiceWin *this, unsigned int uiType, bool b)
{
  GTTDiceWin *v3; // esi@1
  unsigned int v4; // edi@5
  GuildTournamentImprove *v5; // eax@7
  GuildTournamentImprove *v6; // eax@9
  signed int v7; // edi@10
  int v8; // ebx@10
  unsigned int v9; // edi@19
  GuildTournamentImprove *v10; // eax@21
  GuildTournamentImprove *v11; // eax@23
  signed int v12; // edi@24
  int v13; // ebx@24
  GuildTournamentImprove *v14; // eax@36
  GuildTournamentImprove *v15; // eax@38
  signed int v16; // edi@39
  int v17; // ebx@39
  GuildTournamentImprove *v18; // eax@50
  GuildTournamentImprove *v19; // eax@52
  signed int v20; // edi@53
  int v21; // ebx@53

  v3 = this;
  if ( uiType )
  {
    if ( uiType == 1 )
    {
      this->m_bEnemyRolling = b;
      this->m_bMyRolling = b;
    }
  }
  else
  {
    this->m_bCount = 0;
  }
  v4 = g_pkMainChar->m_dwGuildRegNum;
  if ( v4 == GuildTask::GetGuildTournamentImprove()->m_GTTScore.AGuild )
  {
    if ( !v3->m_bMyRolling )
    {
      v5 = GuildTask::GetGuildTournamentImprove();
      (*(void (__stdcall **)(_DWORD))(**((_DWORD **)&v3->m_pkEnemyGuild + v5->m_GTTScore.AGuildScore) + 256))(1);
    }
    if ( !v3->m_bEnemyRolling )
    {
      v6 = GuildTask::GetGuildTournamentImprove();
      ((void (__stdcall *)(_DWORD))v3->m_pkMyDice[v6->m_GTTScore.BGuildScore + 5]->vfptr[64].__vecDelDtor)(1);
    }
    v7 = 0;
    v8 = (int)v3->m_pkEnemyDice;
    do
    {
      if ( v7 != GuildTask::GetGuildTournamentImprove()->m_GTTScore.AGuildScore - 1 && !v3->m_bMyRolling )
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v8 - 24) + 256))(0);
      if ( v7 != GuildTask::GetGuildTournamentImprove()->m_GTTScore.BGuildScore - 1 && !v3->m_bEnemyRolling )
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v8 + 256))(0);
      ++v7;
      v8 += 4;
    }
    while ( v7 < 6 );
  }
  else
  {
    v9 = g_pkMainChar->m_dwGuildRegNum;
    if ( v9 == GuildTask::GetGuildTournamentImprove()->m_GTTScore.BGuild )
    {
      if ( !v3->m_bMyRolling )
      {
        v10 = GuildTask::GetGuildTournamentImprove();
        (*(void (__stdcall **)(_DWORD))(**((_DWORD **)&v3->m_pkEnemyGuild + v10->m_GTTScore.BGuildScore) + 256))(1);
      }
      if ( !v3->m_bEnemyRolling )
      {
        v11 = GuildTask::GetGuildTournamentImprove();
        ((void (__stdcall *)(_DWORD))v3->m_pkMyDice[v11->m_GTTScore.AGuildScore + 5]->vfptr[64].__vecDelDtor)(1);
      }
      v12 = 0;
      v13 = (int)v3->m_pkEnemyDice;
      do
      {
        if ( v12 != GuildTask::GetGuildTournamentImprove()->m_GTTScore.BGuildScore - 1 && !v3->m_bMyRolling )
          (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v13 - 24) + 256))(0);
        if ( v12 != GuildTask::GetGuildTournamentImprove()->m_GTTScore.AGuildScore - 1 && !v3->m_bEnemyRolling )
          (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v13 + 256))(0);
        ++v12;
        v13 += 4;
      }
      while ( v12 < 6 );
    }
    else if ( !v3->m_bEnemyRolling )
    {
      if ( GuildTask::GetGuildTournamentImprove()->m_GTTScore.AGuild )
      {
        if ( !v3->m_bMyRolling )
        {
          v14 = GuildTask::GetGuildTournamentImprove();
          (*(void (__stdcall **)(_DWORD))(**((_DWORD **)&v3->m_pkEnemyGuild + v14->m_GTTScore.BGuildScore) + 256))(1);
        }
        if ( !v3->m_bEnemyRolling )
        {
          v15 = GuildTask::GetGuildTournamentImprove();
          ((void (__stdcall *)(_DWORD))v3->m_pkMyDice[v15->m_GTTScore.AGuildScore + 5]->vfptr[64].__vecDelDtor)(1);
        }
        v16 = 0;
        v17 = (int)v3->m_pkEnemyDice;
        do
        {
          if ( v16 != GuildTask::GetGuildTournamentImprove()->m_GTTScore.BGuildScore - 1 && !v3->m_bMyRolling )
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v17 - 24) + 256))(0);
          if ( v16 != GuildTask::GetGuildTournamentImprove()->m_GTTScore.AGuildScore - 1 && !v3->m_bEnemyRolling )
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v17 + 256))(0);
          ++v16;
          v17 += 4;
        }
        while ( v16 < 6 );
      }
      else if ( GuildTask::GetGuildTournamentImprove()->m_GTTScore.BGuild )
      {
        if ( !v3->m_bMyRolling )
        {
          v18 = GuildTask::GetGuildTournamentImprove();
          (*(void (__stdcall **)(_DWORD))(**((_DWORD **)&v3->m_pkEnemyGuild + v18->m_GTTScore.AGuildScore) + 256))(1);
        }
        if ( !v3->m_bEnemyRolling )
        {
          v19 = GuildTask::GetGuildTournamentImprove();
          ((void (__stdcall *)(_DWORD))v3->m_pkMyDice[v19->m_GTTScore.BGuildScore + 5]->vfptr[64].__vecDelDtor)(1);
        }
        v20 = 0;
        v21 = (int)v3->m_pkEnemyDice;
        do
        {
          if ( v20 != GuildTask::GetGuildTournamentImprove()->m_GTTScore.AGuildScore - 1 && !v3->m_bMyRolling )
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v21 - 24) + 256))(0);
          if ( v20 != GuildTask::GetGuildTournamentImprove()->m_GTTScore.BGuildScore - 1 && !v3->m_bEnemyRolling )
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v21 + 256))(0);
          ++v20;
          v21 += 4;
        }
        while ( v20 < 6 );
      }
    }
  }
}

//----- (005D47A0) --------------------------------------------------------
void __thiscall GTTDiceWin::OnShowWin(GTTDiceWin *this)
{
  unsigned int v1; // esi@1
  GTTDiceWin *v2; // ebx@1
  unsigned int v3; // ST00_4@2
  CClientGuild *v4; // eax@2
  const char *v5; // edi@2
  unsigned int v6; // ST00_4@2
  CClientGuild *v7; // eax@2
  char *v8; // eax@2
  char *v9; // edx@5
  char v10; // cl@6
  unsigned int v11; // esi@8
  unsigned int v12; // ST00_4@9
  CClientGuild *v13; // eax@9
  const char *v14; // edi@9
  unsigned int v15; // ST00_4@9
  CClientGuild *v16; // eax@9
  char *v17; // eax@9
  char *v18; // edx@12
  char v19; // cl@13
  char acEnemyGuildName[32]; // [sp+Ch] [bp-44h]@1
  char acMyGuildName[32]; // [sp+2Ch] [bp-24h]@1

  *(_DWORD *)acMyGuildName = 0;
  *(_DWORD *)&acMyGuildName[4] = 0;
  *(_DWORD *)&acMyGuildName[8] = 0;
  *(_DWORD *)&acMyGuildName[12] = 0;
  *(_DWORD *)&acMyGuildName[16] = 0;
  *(_DWORD *)&acMyGuildName[20] = 0;
  *(_DWORD *)&acMyGuildName[24] = 0;
  *(_DWORD *)&acMyGuildName[28] = 0;
  *(_DWORD *)acEnemyGuildName = 0;
  *(_DWORD *)&acEnemyGuildName[4] = 0;
  *(_DWORD *)&acEnemyGuildName[8] = 0;
  *(_DWORD *)&acEnemyGuildName[12] = 0;
  *(_DWORD *)&acEnemyGuildName[16] = 0;
  *(_DWORD *)&acEnemyGuildName[20] = 0;
  *(_DWORD *)&acEnemyGuildName[24] = 0;
  *(_DWORD *)&acEnemyGuildName[28] = 0;
  v1 = g_pkMainChar->m_dwGuildRegNum;
  v2 = this;
  if ( v1 == GuildTask::GetGuildTournamentImprove()->m_DiceInfo.AGuild )
  {
    v3 = GuildTask::GetGuildTournamentImprove()->m_DiceInfo.AGuild;
    v4 = GuildTask::GetGuild();
    v5 = CClientGuild::FindGttEnemyInfo(v4, v3);
    v6 = GuildTask::GetGuildTournamentImprove()->m_DiceInfo.BGuild;
    v7 = GuildTask::GetGuild();
    v8 = CClientGuild::FindGttEnemyInfo(v7, v6);
    if ( v5 )
      strcpy(acMyGuildName, v5);
    if ( v8 )
    {
      v9 = (char *)(acEnemyGuildName - v8);
      do
      {
        v10 = *v8;
        v8[(_DWORD)v9] = *v8;
        ++v8;
      }
      while ( v10 );
    }
  }
  else
  {
    v11 = g_pkMainChar->m_dwGuildRegNum;
    if ( v11 != GuildTask::GetGuildTournamentImprove()->m_DiceInfo.BGuild )
      return;
    v12 = GuildTask::GetGuildTournamentImprove()->m_DiceInfo.BGuild;
    v13 = GuildTask::GetGuild();
    v14 = CClientGuild::FindGttEnemyInfo(v13, v12);
    v15 = GuildTask::GetGuildTournamentImprove()->m_DiceInfo.AGuild;
    v16 = GuildTask::GetGuild();
    v17 = CClientGuild::FindGttEnemyInfo(v16, v15);
    if ( v14 )
      strcpy(acMyGuildName, v14);
    if ( v17 )
    {
      v18 = (char *)(acEnemyGuildName - v17);
      do
      {
        v19 = *v17;
        v17[(_DWORD)v18] = *v17;
        ++v17;
      }
      while ( v19 );
    }
  }
  ((void (__stdcall *)(_DWORD))v2->m_pkMyguild->vfptr[118].__vecDelDtor)(acMyGuildName);
  ((void (__stdcall *)(_DWORD))v2->m_pkEnemyGuild->vfptr[118].__vecDelDtor)(acEnemyGuildName);
}

//----- (005D4900) --------------------------------------------------------
char __thiscall GTTDiceWin::Create(GTTDiceWin *this, PgFrameWork *pkFrameWork)
{
  GTTDiceWin *v2; // esi@1
  NiNode *v3; // esi@2
  NiTexturePalette *v5; // edi@7
  const char *v6; // eax@9
  PgSprData *v7; // eax@10
  int v8; // ebx@11
  int v9; // edi@11
  NiSourceTexture *v10; // eax@11
  PgSprData *v11; // eax@12
  PgSprData *v12; // eax@14
  PgSprData *v13; // eax@14
  PgSprData *v14; // eax@14
  PgSprData *v15; // eax@14
  PgSprData *v16; // eax@14
  PgWinSpr *v17; // ebx@14
  PgFont *v18; // ST34_4@14
  unsigned int v19; // ST30_4@14
  unsigned int v20; // eax@14
  PgWinText *v21; // eax@14
  PgSprData *v22; // eax@14
  PgWinSpr *v23; // ebx@14
  PgFont *v24; // ST34_4@14
  unsigned int v25; // ST30_4@14
  unsigned int v26; // eax@14
  PgWinText *v27; // eax@14
  signed int v28; // ebx@14
  NiNode *pkObject; // ST54_4@15
  const char *v30; // eax@15
  PgSprData *v31; // eax@15
  NiNode *v32; // ST54_4@16
  const char *v33; // ST34_4@16
  NiNode *v34; // ST54_4@17
  const char *v35; // ST34_4@17
  PgSprData *v36; // eax@16
  bool v37; // zf@18
  PgSprData *v38; // ebx@19
  NiNode *v39; // eax@19
  NiNode *v40; // esi@20
  int iYOff; // [sp+40h] [bp-24h]@11
  signed int v42; // [sp+44h] [bp-20h]@14
  NiSourceTexture *pkTexture; // [sp+48h] [bp-1Ch]@1
  NiPointer<NiNode> spNode; // [sp+4Ch] [bp-18h]@1
  int uiLeft; // [sp+50h] [bp-14h]@10
  int uiTop; // [sp+54h] [bp-10h]@10
  int v47; // [sp+60h] [bp-4h]@1
  PgFrameWork *pkFrameWorka; // [sp+6Ch] [bp+8h]@14

  v2 = this;
  spNode.m_pObject = 0;
  v47 = 0;
  pkTexture = MenuTexMgr::GetTexture(4u);
  if ( !pkTexture )
    goto LABEL_26;
  v5 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildTDiceWin.nif");
  PgUtil::LoadNodeNifFile(v6, &spNode, v5);
  if ( !spNode.m_pObject )
    return 0;
  v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v7, 0, pkFrameWork, "GTTDiceWin", 0) )
  {
LABEL_26:
    v3 = spNode.m_pObject;
    v47 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
    return 0;
  }
  v8 = uiTop;
  v9 = uiLeft;
  iYOff = uiTop;
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v8, v11, (PgWin *)&v2->vfptr, 0, 0);
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel03", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop, v13, (PgWin *)&v2->vfptr, 0, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop, v14, (PgWin *)&v2->vfptr, 0, 0);
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel05", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop, v15, (PgWin *)&v2->vfptr, 0, 0);
  v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &uiLeft, &uiTop, pkTexture);
  v17 = PgWinSpr::CreateWin(uiLeft - v9, uiTop - v8, v16, (PgWin *)&v2->vfptr, 0, 0);
  v18 = Font::Get(0);
  v19 = ((int (__thiscall *)(PgWinSpr *))v17->vfptr[37].__vecDelDtor)(v17);
  v20 = ((int (__thiscall *)(PgWinSpr *))v17->vfptr[36].__vecDelDtor)(v17);
  v21 = PgWinText::CreateWin(0, 1, v20, v19, v18, (PgWin *)&v17->vfptr, 0, 0);
  v2->m_pkMyguild = v21;
  v21->vfptr[122].__vecDelDtor((NiRefObject *)v21, 6u);
  ((void (__stdcall *)(void *))v2->m_pkMyguild->vfptr[118].__vecDelDtor)(&unk_9AEFE3);
  ((void (__stdcall *)(_DWORD))v2->m_pkMyguild->vfptr[60].__vecDelDtor)(0);
  v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text02", &uiLeft, &uiTop, pkTexture);
  v23 = PgWinSpr::CreateWin(uiLeft - v9, uiTop - iYOff, v22, (PgWin *)&v2->vfptr, 0, 0);
  v24 = Font::Get(0);
  v25 = ((int (__thiscall *)(PgWinSpr *))v23->vfptr[37].__vecDelDtor)(v23);
  v26 = ((int (__thiscall *)(PgWinSpr *))v23->vfptr[36].__vecDelDtor)(v23);
  v27 = PgWinText::CreateWin(0, 1, v26, v25, v24, (PgWin *)&v23->vfptr, 0, 0);
  v2->m_pkEnemyGuild = v27;
  v27->vfptr[122].__vecDelDtor((NiRefObject *)v27, 6u);
  ((void (__stdcall *)(void *))v2->m_pkEnemyGuild->vfptr[118].__vecDelDtor)(&unk_9AEFEA);
  ((void (__stdcall *)(_DWORD))v2->m_pkEnemyGuild->vfptr[60].__vecDelDtor)(0);
  v28 = 7;
  pkFrameWorka = (PgFrameWork *)v2->m_pkEnemyDice;
  v42 = 6;
  do
  {
    pkObject = spNode.m_pObject;
    v30 = fs("Dice0%d", v28 - 6);
    v31 = PgSprData::Create((NiAVObject *)&pkObject->vfptr, v30, &uiLeft, &uiTop, 0);
    pkFrameWorka[-1].m_kMsgQ.m_pBase = (PgMsg::Frame *)PgWinSpr::CreateWin(
                                                         uiLeft - v9,
                                                         uiTop,
                                                         v31,
                                                         (PgWin *)&v2->vfptr,
                                                         0,
                                                         0);
    if ( v28 >= 10 )
    {
      v34 = spNode.m_pObject;
      v35 = fs("Dice%d", v28);
      v36 = PgSprData::Create((NiAVObject *)&v34->vfptr, v35, &uiLeft, &uiTop, 0);
    }
    else
    {
      v32 = spNode.m_pObject;
      v33 = fs("Dice0%d", v28);
      v36 = PgSprData::Create((NiAVObject *)&v32->vfptr, v33, &uiLeft, &uiTop, 0);
    }
    pkFrameWorka->vfptr = (IDirectMessengerVtbl *)PgWinSpr::CreateWin(
                                                    uiLeft - v9,
                                                    uiTop,
                                                    v36,
                                                    (PgWin *)&v2->vfptr,
                                                    0,
                                                    0);
    ++v28;
    v37 = v42-- == 1;
    pkFrameWorka = (PgFrameWork *)((char *)pkFrameWorka + 4);
  }
  while ( !v37 );
  v38 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(v38, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick");
  PgSprData::Add(v38, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver");
  PgWinBut::CreateWin(uiLeft - v9, uiTop - iYOff, v38, (PgWin *)&v2->vfptr, 0, 0, 0);
  ((void (__thiscall *)(GTTDiceWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.60000002);
  CNSTimer_Interval::ReSet(&v2->m_kTimerInterval, Timer::ms_fCurTime);
  v2->m_kTimerInterval.m_fCheckTime = 0.2;
  CNSTimer_Interval::ReSet(&v2->m_kTimerIntervalCount, Timer::ms_fCurTime);
  v39 = spNode.m_pObject;
  v2->m_kTimerIntervalCount.m_fCheckTime = 1.0;
  v47 = -1;
  if ( v39 )
  {
    v40 = v39;
    if ( !InterlockedDecrement((volatile LONG *)&v39->m_uiRefCount) )
    {
      if ( v40 )
        v40->vfptr->__vecDelDtor((NiRefObject *)v40, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (005D4E60) --------------------------------------------------------
GTTDiceWin *__cdecl GTTDiceWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  GTTDiceWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1D8u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    GTTDiceWin::GTTDiceWin((GTTDiceWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (GTTDiceWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (005D4F90) --------------------------------------------------------
GTTDiceWin *__thiscall GTTDiceWin::`scalar deleting destructor'(GTTDiceWin *this, unsigned int a2)
{
  GTTDiceWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GTTDiceWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GTTDiceWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9AF074: using guessed type void (__thiscall *GTTDiceWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AF094: using guessed type int (__thiscall *GTTDiceWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005D4FD0) --------------------------------------------------------
void __thiscall GTTSkillWin::GTTSkillWin(GTTSkillWin *this)
{
  GTTSkillWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_pkMinimize = 0;
  v1->m_uiSkillPoint = 0;
  v1->vfptr = (NiRefObjectVtbl *)&GTTSkillWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GTTSkillWin::`vftable'{for `IDirectMessenger'};
  v1->m_uiPageNum = 1;
  v1->m_uiCurSelTab = 10;
  v1->m_iRecordData = -1;
}
// 9AF498: using guessed type void (__thiscall *GTTSkillWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AF4B4: using guessed type int (__thiscall *GTTSkillWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005D5020) --------------------------------------------------------
void __thiscall GTTSkillWin::~GTTSkillWin(GTTSkillWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GTTSkillWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GTTSkillWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9AF498: using guessed type void (__thiscall *GTTSkillWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AF4B4: using guessed type int (__thiscall *GTTSkillWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005D5050) --------------------------------------------------------
void __thiscall GTTSkillWin::SetSkillPoint(GTTSkillWin *this, unsigned int uiSkillPoint)
{
  GTTSkillWin *v2; // esi@1
  PgWinText *v3; // ecx@1
  NiRefObjectVtbl *v4; // edi@1
  char *v5; // eax@1

  v2 = this;
  v3 = this->m_pkTotalDeadedCount;
  v2->m_uiSkillPoint = uiSkillPoint;
  v4 = v3->vfptr;
  v5 = fs("%d", uiSkillPoint);
  v4[118].__vecDelDtor((NiRefObject *)v2->m_pkTotalDeadedCount, (unsigned int)v5);
}

//----- (005D5090) --------------------------------------------------------
void __thiscall GTTSkillWin::ReSetPage(GTTSkillWin *this)
{
  GTTSkillWin *v1; // ebx@1
  unsigned int v2; // eax@1
  unsigned int v3; // edi@1
  char *v4; // esi@2

  v1 = this;
  v2 = 9 * this->m_uiPageNum;
  v3 = v2 - 9;
  if ( v2 - 9 < v2 )
  {
    v4 = (char *)&this->m_pkDeathPoint[v3];
    do
    {
      SkillInvWin::SetSkill(*((SkillInvWin **)v4 - 18), 0xFFFFu, 0);
      SkillInvWin::SetSkill(*((SkillInvWin **)v4 - 9), 0xFFFFu, 0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 472))(&unk_9AF2CE);
      ++v3;
      v4 += 4;
    }
    while ( v3 < 9 * v1->m_uiPageNum );
  }
}

//----- (005D5100) --------------------------------------------------------
void GTTSkillWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "GuildSkill");
}

//----- (005D5130) --------------------------------------------------------
void __thiscall GTTMiniSkillWin::GTTMiniSkillWin(GTTMiniSkillWin *this)
{
  GTTMiniSkillWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GTTMiniSkillWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GTTMiniSkillWin::`vftable'{for `IDirectMessenger'};
  v1->m_uiSkillPoint = 0;
}
// 9AF6D8: using guessed type void (__thiscall *GTTMiniSkillWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AF6F4: using guessed type int (__thiscall *GTTMiniSkillWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005D5160) --------------------------------------------------------
void __thiscall GTTMiniSkillWin::~GTTMiniSkillWin(GTTMiniSkillWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GTTMiniSkillWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GTTMiniSkillWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9AF6D8: using guessed type void (__thiscall *GTTMiniSkillWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AF6F4: using guessed type int (__thiscall *GTTMiniSkillWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005D5190) --------------------------------------------------------
void __thiscall GTTMiniSkillWin::SetSkillPoint(GTTMiniSkillWin *this, unsigned int uiSkillPoint)
{
  GTTMiniSkillWin *v2; // esi@1
  PgWinText *v3; // ecx@1
  NiRefObjectVtbl *v4; // edi@1
  char *v5; // eax@1

  v2 = this;
  v3 = this->m_pkDeadCount;
  v2->m_uiSkillPoint = uiSkillPoint;
  v4 = v3->vfptr;
  v5 = fs("%d", uiSkillPoint);
  v4[118].__vecDelDtor((NiRefObject *)v2->m_pkDeadCount, (unsigned int)v5);
}

//----- (005D51D0) --------------------------------------------------------
void __thiscall GTTMiniSkillWin::UpdateMeWin(GTTMiniSkillWin *this, float fCurTime)
{
  GTTMiniSkillWin *v2; // esi@1
  GTTSkillWin *v3; // eax@4

  v2 = this;
  if ( (unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD))this->m_pkIconSlot->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY)
    && !g_pkMouse->m_akButtons[0].m_bPressed )
  {
    if ( g_pkMouse->m_akButtons[0].m_bLastPressed )
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
      v3 = GuildTask::GetGTTSkillWin();
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
    }
  }
}
// A8C4A8: using guessed type struct NiInputMouse *g_pkMouse;

//----- (005D5230) --------------------------------------------------------
void __thiscall GTTSkillWin::InitPage(GTTSkillWin *this)
{
  GTTSkillWin *v1; // esi@1
  unsigned int v2; // eax@1
  PgWinText **v3; // ebx@2
  unsigned int v4; // eax@3
  int v5; // eax@4
  unsigned int v6; // edi@8
  char *v7; // eax@13
  NiRefObjectVtbl *v8; // edi@14
  char *v9; // eax@14
  unsigned int i; // [sp+8h] [bp-8h]@1
  int uiNeedPoint; // [sp+Ch] [bp-4h]@1

  v1 = this;
  this->m_iRecordData = -1;
  GTTSkillWin::ReSetPage(this);
  v2 = 9 * v1->m_uiPageNum;
  i = v2 - 9;
  uiNeedPoint = -1;
  if ( v2 - 9 < v2 )
  {
    v3 = &v1->m_pkDeathPoint[v2 - 9];
    do
    {
      v4 = v1->m_uiCurSelTab;
      if ( v4 == 10 )
      {
        v5 = SkillInvWin::SetSkill((SkillInvWin *)*(v3 - 18), v1->m_iRecordData, 0xAu);
      }
      else
      {
        if ( v4 != 9 )
          goto LABEL_8;
        v5 = SkillInvWin::SetSkill((SkillInvWin *)*(v3 - 9), v1->m_iRecordData, 9u);
      }
      uiNeedPoint = v5;
LABEL_8:
      v6 = uiNeedPoint;
      if ( uiNeedPoint >= 0 )
      {
        v1->m_iRecordData = uiNeedPoint;
        if ( uiNeedPoint < GuildTournamentStateTab::GetTotal() )
        {
          while ( !CDataReader::GetRecord(
                     (CDataReader *)(ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ms_pkTable + 4),
                     v6) )
          {
            if ( ++v6 >= GuildTournamentStateTab::GetTotal() )
              goto LABEL_15;
          }
          v7 = CDataReader::GetRecord(
                 (CDataReader *)(ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ms_pkTable + 4),
                 v6);
          if ( v7 )
          {
            v8 = (*v3)->vfptr;
            v9 = fs("%d", *((_WORD *)v7 + 2));
            v8[118].__vecDelDtor((NiRefObject *)*v3, (unsigned int)v9);
          }
        }
      }
LABEL_15:
      ++v3;
      ++i;
    }
    while ( i < 9 * v1->m_uiPageNum );
  }
}
// A8C1BC: using guessed type int ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ms_pkTable;

//----- (005D5330) --------------------------------------------------------
void __thiscall GTTSkillWin::OnInvLClick(GTTSkillWin *this, unsigned int uiIndex)
{
  GTTSkillWin *v2; // esi@1
  unsigned int v3; // eax@1
  unsigned int v4; // edi@2
  SkillInvWin *v5; // eax@2
  GUILD_TOURNAMENT_SKILL *v6; // eax@5
  unsigned int v7; // eax@7

  v2 = this;
  v3 = this->m_uiCurSelTab;
  if ( v3 == 10 )
  {
    v4 = uiIndex;
    v5 = this->m_apkBuffInvWin[uiIndex];
  }
  else
  {
    if ( v3 != 9 )
      return;
    v4 = uiIndex;
    v5 = this->m_apkDeBuffInvWin[uiIndex];
  }
  v6 = GuildTournamentStateTab::GetByMapIndex(v5->m_iStaNum, v5->m_uiMapType);
  if ( v6 && v2->m_uiSkillPoint >= v6->DeathPoint )
  {
    v7 = v2->m_uiCurSelTab;
    LOWORD(uiIndex) = 0;
    if ( v7 == 10 )
    {
      LOWORD(uiIndex) = v2->m_apkBuffInvWin[v4]->m_iStaNum;
    }
    else if ( v7 == 9 )
    {
      LOWORD(uiIndex) = v2->m_apkDeBuffInvWin[v4]->m_iStaNum;
    }
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x1Du, 0xCFu, &uiIndex, 2);
  }
}

//----- (005D53E0) --------------------------------------------------------
void __thiscall GTTSkillWin::StartCoolTime(GTTSkillWin *this, unsigned int uiIndex)
{
  IconWin **v2; // ebx@1
  unsigned int v3; // eax@3
  unsigned int v4; // edi@5
  unsigned int v5; // esi@6
  char *v6; // eax@10
  float v7; // ST18_4@12
  unsigned int v8; // edi@17
  unsigned int v9; // esi@18
  char *v10; // eax@22
  float v11; // ST18_4@24
  GTTSkillWin *v12; // [sp+1Ch] [bp-8h]@1
  signed int v13; // [sp+20h] [bp-4h]@1

  v12 = this;
  v2 = (IconWin **)this->m_apkDeBuffInvWin;
  v13 = 9;
  while ( 1 )
  {
    v3 = this->m_uiCurSelTab;
    if ( v3 == 10 )
    {
      if ( uiIndex == LODWORD((*(v2 - 9))[1].m_kWorldBound.m_kCenter.y) )
      {
        v4 = 0;
        if ( GuildTournamentStateTab::GetTotal() )
        {
          do
          {
            v5 = v4;
            if ( v4 < GuildTournamentStateTab::GetTotal() )
            {
              while ( !CDataReader::GetRecord(
                         (CDataReader *)(ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ms_pkTable + 4),
                         v5) )
              {
                if ( ++v5 >= GuildTournamentStateTab::GetTotal() )
                  goto LABEL_13;
              }
              v6 = CDataReader::GetRecord(
                     (CDataReader *)(ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ms_pkTable + 4),
                     v5);
              if ( v6 )
              {
                if ( *((_WORD *)v6 + 1) == uiIndex )
                {
                  v7 = (double)*(unsigned int *)(v6 + 42) / 1000.0;
                  IconWin::StartCoolTime(*(v2 - 9), Timer::ms_fCurTime, v7, 0.0);
                }
              }
            }
LABEL_13:
            ++v4;
          }
          while ( v4 < GuildTournamentStateTab::GetTotal() );
        }
      }
    }
    else if ( v3 == 9 && uiIndex == LODWORD((*v2)[1].m_kWorldBound.m_kCenter.y) )
    {
      v8 = 0;
      if ( GuildTournamentStateTab::GetTotal() )
      {
        do
        {
          v9 = v8;
          if ( v8 < GuildTournamentStateTab::GetTotal() )
          {
            while ( !CDataReader::GetRecord(
                       (CDataReader *)(ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ms_pkTable + 4),
                       v9) )
            {
              if ( ++v9 >= GuildTournamentStateTab::GetTotal() )
                goto LABEL_25;
            }
            v10 = CDataReader::GetRecord(
                    (CDataReader *)(ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ms_pkTable + 4),
                    v9);
            if ( v10 && *((_WORD *)v10 + 1) == uiIndex )
            {
              v11 = (double)*(unsigned int *)(v10 + 42) / 1000.0;
              IconWin::StartCoolTime(*v2, Timer::ms_fCurTime, v11, 0.0);
            }
          }
LABEL_25:
          ++v8;
        }
        while ( v8 < GuildTournamentStateTab::GetTotal() );
      }
    }
    ++v2;
    if ( !--v13 )
      break;
    this = v12;
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8C1BC: using guessed type int ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ms_pkTable;

//----- (005D55A0) --------------------------------------------------------
char __thiscall GTTMiniSkillWin::Create(GTTMiniSkillWin *this, PgFrameWork *pkFrameWork)
{
  GTTMiniSkillWin *v2; // esi@1
  NiNode *v3; // esi@2
  NiTexturePalette *v5; // edi@7
  const char *v6; // eax@9
  PgSprData *v7; // eax@10
  int v8; // edi@11
  int iYOff; // ST50_4@11
  PgSprData *v10; // eax@11
  PgSprData *v11; // ebx@11
  PgSprData::PgHitTester *v12; // eax@11
  unsigned int v13; // ebx@11
  PgFont *v14; // eax@11
  PgWinText *v15; // eax@11
  NiNode *v16; // esi@12
  int uiLeft; // [sp+28h] [bp-18h]@10
  int uiTop; // [sp+2Ch] [bp-14h]@10
  NiPointer<NiNode> spNode; // [sp+30h] [bp-10h]@1
  int v20; // [sp+3Ch] [bp-4h]@1
  PgFrameWork *pkFrameWorka; // [sp+48h] [bp+8h]@11

  v2 = this;
  spNode.m_pObject = 0;
  v20 = 0;
  if ( !MenuTexMgr::GetTexture(4u) )
    goto LABEL_18;
  v5 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildSkill_Min.nif");
  PgUtil::LoadNodeNifFile(v6, &spNode, v5);
  if ( !spNode.m_pObject )
    return 0;
  v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v7, 0, pkFrameWork, "GTTMiniSkillWin", 0) )
  {
LABEL_18:
    v3 = spNode.m_pObject;
    v20 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
    return 0;
  }
  v8 = uiLeft;
  iYOff = uiTop;
  v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, 0);
  v2->m_pkIconSlot = PgWinSpr::CreateWin(uiLeft - v8, uiTop, v10, (PgWin *)&v2->vfptr, 0, 0);
  v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "DeathCount01", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop, v11, (PgWin *)&v2->vfptr, 0, 0);
  v12 = v11->m_akHitTester.m_pBase->m_pObject;
  v13 = v12->m_uiHeight;
  pkFrameWorka = (PgFrameWork *)v12->m_uiWidth;
  v14 = Font::Get(0);
  v15 = PgWinText::CreateWin(
          uiLeft - v8,
          uiTop - iYOff,
          (unsigned int)pkFrameWorka,
          v13,
          v14,
          (PgWin *)&v2->vfptr,
          0,
          0);
  v2->m_pkDeadCount = v15;
  v15->vfptr[122].__vecDelDtor((NiRefObject *)v15, 5u);
  ((void (__stdcall *)(const char *))v2->m_pkDeadCount->vfptr[118].__vecDelDtor)("0");
  ((void (__stdcall *)(_DWORD))v2->m_pkDeadCount->vfptr[60].__vecDelDtor)(0);
  ((void (__thiscall *)(GTTMiniSkillWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.80000001,
    0.69999999);
  v20 = -1;
  if ( spNode.m_pObject )
  {
    v16 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v16 )
        v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005D57E0) --------------------------------------------------------
char __thiscall GTTSkillWin::Create(GTTSkillWin *this, PgFrameWork *pkFrameWork)
{
  GTTSkillWin *v2; // esi@1
  NiNode *v3; // esi@2
  NiTexturePalette *v5; // edi@7
  const char *v6; // eax@9
  PgSprData *v7; // eax@10
  int v8; // edi@11
  int v9; // ebx@11
  NiSourceTexture *v10; // eax@11
  PgSprData *v11; // eax@12
  PgSprData *v12; // eax@14
  PgSprData *v13; // eax@14
  PgSprData *v14; // eax@14
  NiPointer<PgSprData::PgHitTester> *v15; // ecx@14
  unsigned int uiWidth; // ST74_4@14
  PgFont *v17; // eax@14
  NiRefObjectVtbl *v18; // ST74_4@14
  NiUnsharedGeometryGroup *v19; // eax@14
  ColumnBut *v20; // eax@14
  NiPointer<PgSprData::PgHitTester> *v21; // ecx@14
  unsigned int v22; // ST74_4@14
  PgFont *v23; // eax@14
  PgWinText *v24; // eax@14
  NiUnsharedGeometryGroup *v25; // eax@14
  NiPointer<PgSprData::PgHitTester> *v26; // ecx@14
  unsigned int v27; // ST74_4@14
  PgFont *v28; // eax@14
  PgWinText *v29; // eax@14
  NiUnsharedGeometryGroup *v30; // eax@14
  NiPointer<PgSprData::PgHitTester> *v31; // ecx@14
  unsigned int v32; // ST74_4@14
  PgFont *v33; // eax@14
  PgWinText *v34; // eax@14
  NiUnsharedGeometryGroup *v35; // eax@14
  NiPointer<PgSprData::PgHitTester> *v36; // ecx@14
  unsigned int v37; // ST74_4@14
  PgFont *v38; // eax@14
  PgWinText *v39; // eax@14
  PgWinSpr *pkWinSpr; // ST78_4@17
  const char *v41; // eax@17
  PgSprData *v42; // eax@17
  PgWinSpr *v43; // ST78_4@17
  PgFont *v44; // ST54_4@17
  unsigned int v45; // ST50_4@17
  unsigned int v46; // eax@17
  PgWinText *v47; // eax@17
  PgWinSpr *v48; // ST78_4@17
  const char *v49; // eax@17
  PgSprData *v50; // eax@17
  SkillInvWin *v51; // eax@17
  SkillInvWin *v52; // eax@17
  NiNode *v53; // esi@18
  int i; // [sp+7Ch] [bp-20h]@16
  NiSourceTexture *pkTexture; // [sp+80h] [bp-1Ch]@1
  NiPointer<NiNode> spNode; // [sp+84h] [bp-18h]@1
  int uiLeft; // [sp+88h] [bp-14h]@10
  int uiTop; // [sp+8Ch] [bp-10h]@10
  int v59; // [sp+98h] [bp-4h]@1
  PgSprData *pkTexture8b; // [sp+A4h] [bp+8h]@14
  NiSourceTexture *pkTexture8c; // [sp+A4h] [bp+8h]@14
  NiSourceTexture *pkTexture8d; // [sp+A4h] [bp+8h]@14
  PgSprData *pkTexture8e; // [sp+A4h] [bp+8h]@14
  NiSourceTexture *pkTexture8f; // [sp+A4h] [bp+8h]@14
  NiSourceTexture *pkTexture8g; // [sp+A4h] [bp+8h]@14
  PgSprData *pkTexture8h; // [sp+A4h] [bp+8h]@14
  NiSourceTexture *pkTexture8i; // [sp+A4h] [bp+8h]@14
  NiSourceTexture *pkTexture8j; // [sp+A4h] [bp+8h]@14
  NiSourceTexture *pkTexture8k; // [sp+A4h] [bp+8h]@14
  NiSourceTexture *pkTexture8l; // [sp+A4h] [bp+8h]@14
  PgSprData *pkTexture8m; // [sp+A4h] [bp+8h]@14
  NiSourceTexture *pkTexture8n; // [sp+A4h] [bp+8h]@14
  PgSprData *pkTexture8o; // [sp+A4h] [bp+8h]@14
  NiSourceTexture *pkTexture8; // [sp+A4h] [bp+8h]@14
  PgSprData *pkTexture8p; // [sp+A4h] [bp+8h]@15
  PgSprData *pkTexture8q; // [sp+A4h] [bp+8h]@16
  PgSprData *pkTexture8r; // [sp+A4h] [bp+8h]@16
  NiSourceTexture *pkTexture8a; // [sp+A4h] [bp+8h]@16

  v2 = this;
  spNode.m_pObject = 0;
  v59 = 0;
  pkTexture = MenuTexMgr::GetTexture(4u);
  if ( !pkTexture )
    goto LABEL_25;
  v5 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildSkill.nif");
  PgUtil::LoadNodeNifFile(v6, &spNode, v5);
  if ( !spNode.m_pObject )
    return 0;
  v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v7, 0, pkFrameWork, "GTTSkillWin", 0) )
  {
LABEL_25:
    v3 = spNode.m_pObject;
    v59 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
    return 0;
  }
  v8 = uiLeft;
  v9 = uiTop;
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v11, (PgWin *)&v2->vfptr, 0, 0);
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop, v13, (PgWin *)&v2->vfptr, 0, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop, v14, (PgWin *)&v2->vfptr, 0, 0);
  pkTexture8b = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, pkTexture);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, pkTexture8b, (PgWin *)&v2->vfptr, 0, 0);
  v15 = pkTexture8b->m_akHitTester.m_pBase;
  pkTexture8c = (NiSourceTexture *)v15->m_pObject->m_uiHeight;
  uiWidth = v15->m_pObject->m_uiWidth;
  v17 = Font::Get(0);
  pkTexture8d = (NiSourceTexture *)PgWinText::CreateWin(
                                     uiLeft - v8,
                                     uiTop - v9,
                                     uiWidth,
                                     (unsigned int)pkTexture8c,
                                     v17,
                                     (PgWin *)&v2->vfptr,
                                     0,
                                     0);
  pkTexture8d->vfptr[122].__vecDelDtor((NiRefObject *)pkTexture8d, 5u);
  v18 = pkTexture8d->vfptr + 118;
  v19 = TextData2::Get(0xBDF42A3A);
  v18->__vecDelDtor(pkTexture8d, v19);
  ((void (__stdcall *)(_DWORD))pkTexture8d->vfptr[60].__vecDelDtor)(0);
  pkTexture8e = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab01_Off", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(pkTexture8e, (NiAVObject *)&spNode.m_pObject->vfptr, "Tab01_On");
  v20 = ColumnBut::CreateWin(uiLeft - v8, uiTop - v9, pkTexture8e, (PgWin *)&v2->vfptr, 0xEu, 0);
  v2->m_pkBuff = v20;
  v20->m_bCheck = 1;
  v21 = pkTexture8e->m_akHitTester.m_pBase;
  pkTexture8f = (NiSourceTexture *)v21->m_pObject->m_uiHeight;
  v22 = v21->m_pObject->m_uiWidth;
  v23 = Font::Get(MAIN_MENU);
  v24 = PgWinText::CreateWin(
          uiLeft - v8,
          uiTop - v9 + 1,
          v22,
          (unsigned int)pkTexture8f,
          v23,
          (PgWin *)&v2->vfptr,
          0,
          0);
  v2->m_pkBuffText = v24;
  v24->vfptr[122].__vecDelDtor((NiRefObject *)v24, 5u);
  pkTexture8g = (NiSourceTexture *)&v2->m_pkBuffText->vfptr[118];
  v25 = TextData2::Get(0xBAFECD34);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkTexture8g->vfptr)(v2->m_pkBuffText, v25);
  ((void (__stdcall *)(_DWORD))v2->m_pkBuffText->vfptr[60].__vecDelDtor)(0);
  pkTexture8h = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab02_Off", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(pkTexture8h, (NiAVObject *)&spNode.m_pObject->vfptr, "Tab02_On");
  v2->m_pkDeBuff = ColumnBut::CreateWin(uiLeft - v8, uiTop - v9, pkTexture8h, (PgWin *)&v2->vfptr, 0xFu, 0);
  v26 = pkTexture8h->m_akHitTester.m_pBase;
  pkTexture8i = (NiSourceTexture *)v26->m_pObject->m_uiHeight;
  v27 = v26->m_pObject->m_uiWidth;
  v28 = Font::Get(MAIN_MENU);
  v29 = PgWinText::CreateWin(
          uiLeft - v8,
          uiTop - v9 + 1,
          v27,
          (unsigned int)pkTexture8i,
          v28,
          (PgWin *)&v2->vfptr,
          0,
          0);
  v2->m_pkDebuffText = v29;
  v29->vfptr[122].__vecDelDtor((NiRefObject *)v29, 5u);
  pkTexture8j = (NiSourceTexture *)&v2->m_pkDebuffText->vfptr[118];
  v30 = TextData2::Get(0xB6341543);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkTexture8j->vfptr)(v2->m_pkDebuffText, v30);
  ((void (__stdcall *)(_DWORD))v2->m_pkDebuffText->vfptr[60].__vecDelDtor)(0);
  v31 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
  pkTexture8k = (NiSourceTexture *)v31->m_pObject->m_uiHeight;
  v32 = v31->m_pObject->m_uiWidth;
  v33 = Font::Get(MAIN_MENU);
  v34 = PgWinText::CreateWin(
          uiLeft - v8,
          uiTop - v9 + 1,
          v32,
          (unsigned int)pkTexture8k,
          v33,
          (PgWin *)&v2->vfptr,
          0,
          0);
  v2->m_pkDeadedCountText = v34;
  v34->vfptr[122].__vecDelDtor((NiRefObject *)v34, 5u);
  pkTexture8l = (NiSourceTexture *)&v2->m_pkDeadedCountText->vfptr[118];
  v35 = TextData2::Get(0xC40ADCD2);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkTexture8l->vfptr)(v2->m_pkDeadedCountText, v35);
  ((void (__stdcall *)(_DWORD))v2->m_pkDeadedCountText->vfptr[60].__vecDelDtor)(0);
  pkTexture8m = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "DeathCount10", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, pkTexture8m, (PgWin *)&v2->vfptr, 0, 0);
  v36 = pkTexture8m->m_akHitTester.m_pBase;
  pkTexture8n = (NiSourceTexture *)v36->m_pObject->m_uiHeight;
  v37 = v36->m_pObject->m_uiWidth;
  v38 = Font::Get(MAIN_MENU);
  v39 = PgWinText::CreateWin(
          uiLeft - v8,
          uiTop - v9 + 1,
          v37,
          (unsigned int)pkTexture8n,
          v38,
          (PgWin *)&v2->vfptr,
          0,
          0);
  v2->m_pkTotalDeadedCount = v39;
  v39->vfptr[122].__vecDelDtor((NiRefObject *)v39, 5u);
  ((void (__stdcall *)(const char *))v2->m_pkTotalDeadedCount->vfptr[118].__vecDelDtor)("0");
  ((void (__stdcall *)(_DWORD))v2->m_pkTotalDeadedCount->vfptr[60].__vecDelDtor)(0);
  pkTexture8o = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(pkTexture8o, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(pkTexture8o, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  v2->m_pkMinimize = PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, pkTexture8o, (PgWin *)&v2->vfptr, 0xBu, 0, 0);
  pkTexture8 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    pkTexture8p = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, pkTexture8);
    PgSprData::Add(pkTexture8p, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(pkTexture8p, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, pkTexture8p, (PgWin *)&v2->vfptr, 0x12u, 0, 0);
  }
  pkTexture8q = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PrePageNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(pkTexture8q, (NiAVObject *)&spNode.m_pObject->vfptr, "PrePageClick");
  PgSprData::Add(pkTexture8q, (NiAVObject *)&spNode.m_pObject->vfptr, "PrePageOver");
  PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, pkTexture8q, (PgWin *)&v2->vfptr, 0x10u, 0, 0);
  pkTexture8r = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NextPageNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(pkTexture8r, (NiAVObject *)&spNode.m_pObject->vfptr, "NextPageClick");
  PgSprData::Add(pkTexture8r, (NiAVObject *)&spNode.m_pObject->vfptr, "NextPageOver");
  PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, pkTexture8r, (PgWin *)&v2->vfptr, 0x11u, 0, 0);
  i = 0;
  pkTexture8a = (NiSourceTexture *)v2->m_apkDeBuffInvWin;
  do
  {
    pkWinSpr = (PgWinSpr *)spNode.m_pObject;
    v41 = fs("DeathCount0%d", i + 1);
    v42 = PgSprData::Create((NiAVObject *)&pkWinSpr->vfptr, v41, &uiLeft, &uiTop, pkTexture);
    v43 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v42, (PgWin *)&v2->vfptr, 0, 0);
    v44 = Font::Get(0);
    v45 = ((int (*)(void))v43->vfptr[37].__vecDelDtor)();
    v46 = ((int (*)(void))v43->vfptr[36].__vecDelDtor)();
    v47 = PgWinText::CreateWin(0, 1, v46, v45, v44, (PgWin *)&v43->vfptr, 0, 0);
    pkTexture8a->m_kFormatPrefs.m_eMipMapped = (NiTexture::FormatPrefs::MipFlag)v47;
    v47->vfptr[122].__vecDelDtor((NiRefObject *)v47, 5u);
    (*(void (__stdcall **)(const char *))(*(_DWORD *)pkTexture8a->m_kFormatPrefs.m_eMipMapped + 472))("0");
    (*(void (__stdcall **)(_DWORD))(*(_DWORD *)pkTexture8a->m_kFormatPrefs.m_eMipMapped + 240))(0);
    v48 = (PgWinSpr *)spNode.m_pObject;
    v49 = fs("IconSlot00%d", i + 1);
    v50 = PgSprData::Create((NiAVObject *)&v48->vfptr, v49, &uiLeft, &uiTop, pkTexture);
    PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v50, (PgWin *)&v2->vfptr, 0, 0);
    v51 = SkillInvWin::CreateWin(uiLeft - v8, uiTop - v9, i, (PgWin *)&v2->vfptr);
    pkTexture8a->vfptr = (NiRefObjectVtbl *)v51;
    SkillInvWin::SetSkill(v51, 0xFFFFu, 0);
    (*((void (__stdcall **)(_DWORD))pkTexture8a->vfptr->__vecDelDtor + 129))(12);
    (*((void (__stdcall **)(_DWORD))pkTexture8a->vfptr->__vecDelDtor + 140))(13);
    pkTexture8a->vfptr[68].__vecDelDtor = (void *(__thiscall *)(NiRefObject *, unsigned int))g_pkToolTipWin;
    v52 = SkillInvWin::CreateWin(uiLeft - v8, uiTop - v9, i, (PgWin *)&v2->vfptr);
    pkTexture8a[-1].m_kFormatPrefs.m_eAlphaFmt = (NiTexture::FormatPrefs::AlphaFormat)v52;
    SkillInvWin::SetSkill(v52, 0xFFFFu, 0);
    (*(void (__stdcall **)(signed int))(*(_DWORD *)pkTexture8a[-1].m_kFormatPrefs.m_eAlphaFmt + 516))(12);
    (*(void (__stdcall **)(signed int))(*(_DWORD *)pkTexture8a[-1].m_kFormatPrefs.m_eAlphaFmt + 560))(13);
    *(_DWORD *)(pkTexture8a[-1].m_kFormatPrefs.m_eAlphaFmt + 272) = g_pkToolTipWin;
    ++i;
    pkTexture8a = (NiSourceTexture *)((char *)pkTexture8a + 4);
  }
  while ( i < 9 );
  ((void (__thiscall *)(GTTSkillWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  GTTSkillWin::ReSetPage(v2);
  GTTSkillWin::InitPage(v2);
  v53 = spNode.m_pObject;
  v59 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v53 )
    v53->vfptr->__vecDelDtor((NiRefObject *)v53, 1u);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005D61A0) --------------------------------------------------------
void __thiscall GTTSkillWin::OnCommand(GTTSkillWin *this, unsigned int wParam, int lParam)
{
  GTTMiniSkillWin *v3; // eax@5
  GameFrameWork *v4; // eax@6

  switch ( wParam )
  {
    case 0xFu:
      this->m_pkBuff->m_bCheck = 0;
      this->m_pkDeBuff->m_bCheck = 1;
      this->m_uiCurSelTab = 9;
      GTTSkillWin::InitPage(this);
      break;
    case 0xEu:
      this->m_pkBuff->m_bCheck = 1;
      this->m_pkDeBuff->m_bCheck = 0;
      this->m_uiCurSelTab = 10;
      GTTSkillWin::InitPage(this);
      break;
    case 0xCu:
      GTTSkillWin::OnInvLClick(this, lParam);
      break;
    case 0xBu:
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
      v3 = GuildTask::GetGTTMiniSkillWin();
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
      break;
    case 0x12u:
      v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v4 )
        GameFrameWork::OpenPlayGuideSearchList(v4, "GuildSkill");
      break;
    default:
      return;
  }
}

//----- (005D6290) --------------------------------------------------------
GTTSkillWin *__cdecl GTTSkillWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  GTTSkillWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x214u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&GTTSkillWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&GTTSkillWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kBound.m_fRadius) = 0;
    v2[1].vfptr = (IDirectMessengerVtbl *)1;
    v2[1].m_pkMsgHooker = (IDirectMessenger *)10;
    v2[1].m_uiMessageNum = -1;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (GTTSkillWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9AF498: using guessed type void (__thiscall *GTTSkillWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AF4B4: using guessed type int (__thiscall *GTTSkillWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005D6400) --------------------------------------------------------
GTTMiniSkillWin *__cdecl GTTMiniSkillWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  GTTMiniSkillWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x164u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&GTTMiniSkillWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&GTTMiniSkillWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (GTTMiniSkillWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9AF6D8: using guessed type void (__thiscall *GTTMiniSkillWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AF6F4: using guessed type int (__thiscall *GTTMiniSkillWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005D6540) --------------------------------------------------------
GTTSkillWin *__thiscall GTTSkillWin::`scalar deleting destructor'(GTTSkillWin *this, unsigned int a2)
{
  GTTSkillWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GTTSkillWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GTTSkillWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9AF498: using guessed type void (__thiscall *GTTSkillWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AF4B4: using guessed type int (__thiscall *GTTSkillWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005D6580) --------------------------------------------------------
GTTMiniSkillWin *__thiscall GTTMiniSkillWin::`vector deleting destructor'(GTTMiniSkillWin *this, unsigned int a2)
{
  GTTMiniSkillWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GTTMiniSkillWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GTTMiniSkillWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9AF6D8: using guessed type void (__thiscall *GTTMiniSkillWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AF6F4: using guessed type int (__thiscall *GTTMiniSkillWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005D65C0) --------------------------------------------------------
GUILD_TOURNAMENT_SKILL *__cdecl GuildTournamentStateTab::GetByMapIndex(unsigned int uiIndex, unsigned int uiMapType)
{
  unsigned int v2; // esi@1
  GUILD_TOURNAMENT_SKILL *result; // eax@5

  v2 = 0;
  if ( GuildTournamentStateTab::GetTotal() )
  {
    while ( *((_WORD *)CDataReader::GetRecord(
                         (CDataReader *)(ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ms_pkTable + 4),
                         v2)
            + 1) != uiIndex
         || *(_WORD *)CDataReader::GetRecord(
                        (CDataReader *)(ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ms_pkTable + 4),
                        v2) != uiMapType )
    {
      if ( ++v2 >= GuildTournamentStateTab::GetTotal() )
        goto LABEL_5;
    }
    result = (GUILD_TOURNAMENT_SKILL *)CDataReader::GetRecord(
                                         (CDataReader *)(ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ms_pkTable
                                                       + 4),
                                         v2);
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}
// A8C1BC: using guessed type int ITableBase<GUILD_TOURNAMENT_SKILL,GuildTournamentStateTab>::ms_pkTable;

//----- (005D6640) --------------------------------------------------------
BOOL __cdecl GuildListWin::GuildInfo::High_GuildType(GuildListWin::GuildInfo *lhw, GuildListWin::GuildInfo *rhw)
{
  return rhw->m_unGuildType < lhw->m_unGuildType;
}

//----- (005D6660) --------------------------------------------------------
BOOL __cdecl GTRequestListWin::GuildInfo::High_GuildGrade(GuildListWin::GuildInfo *lhw, GuildListWin::GuildInfo *rhw)
{
  return rhw->m_unGuildGrade < lhw->m_unGuildGrade;
}

//----- (005D6680) --------------------------------------------------------
BOOL __cdecl GTRequestListWin::GuildInfo::High_GuildTotalMember(GuildListWin::GuildInfo *lhw, GuildListWin::GuildInfo *rhw)
{
  return rhw->m_unGuildTotalMember < lhw->m_unGuildTotalMember;
}

//----- (005D66A0) --------------------------------------------------------
void __thiscall GuildTournamentBaseWin::GuildTournamentBaseWin(GuildTournamentBaseWin *this)
{
  GuildTournamentBaseWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GuildTournamentBaseWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildTournamentBaseWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkGTRequestListWin = 0;
}
// 9AFDDC: using guessed type void (__thiscall *GuildTournamentBaseWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AFDFC: using guessed type int (__thiscall *GuildTournamentBaseWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005D66D0) --------------------------------------------------------
void __thiscall GuildTournamentBaseWin::~GuildTournamentBaseWin(GuildTournamentBaseWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GuildTournamentBaseWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildTournamentBaseWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9AFDDC: using guessed type void (__thiscall *GuildTournamentBaseWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AFDFC: using guessed type int (__thiscall *GuildTournamentBaseWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005D6710) --------------------------------------------------------
void GuildTournamentBaseWin::OnShowWin()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideWin(v1, BIL_GUILDWAR_3);
}

//----- (005D6730) --------------------------------------------------------
void __stdcall GuildTournamentBaseWin::DirectMessage(int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  if ( iMsgTag == 27 && pvBody && !*(_DWORD *)pvBody )
  {
    iMsgTag = GuildTask::GetGuild()->m_Guild.nNo;
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 0x7Au, &iMsgTag, 4);
  }
}

//----- (005D6770) --------------------------------------------------------
void GuildTournamentBaseWin::On_NC_GUILD_TOURNAMENT_LIST_REQ()
{
  GuildTask::SetListReq(1);
  NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 0x7Eu, 0, 0);
}

//----- (005D6790) --------------------------------------------------------
void GuildTournamentBaseWin::On_NC_GUILD_TOURNAMENT_STORAGEOPEN_REQ()
{
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x1Du, 0x91u, 0, 0);
}

//----- (005D67B0) --------------------------------------------------------
void GuildTournamentBaseWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "GuildMenu");
}

//----- (005D67E0) --------------------------------------------------------
void __thiscall GTRequestListWin::UpdateMeWin(GTRequestListWin *this, float fCurTime)
{
  GTRequestListWin *v2; // esi@1

  v2 = this;
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
    GameFrameWork::UpdateUIScroll(v2->m_pkGuildLIst, v2->m_pkSlideBarGuild);
}

//----- (005D6810) --------------------------------------------------------
void GTRequestListWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "GuildList");
}

//----- (005D6840) --------------------------------------------------------
void __thiscall GTRequestListWin::OnSlideBar(GTRequestListWin *this)
{
  GTRequestListWin *v1; // esi@1
  SlideListWin *v2; // eax@1
  SlideBar *v3; // ecx@2

  v1 = this;
  v2 = this->m_pkGuildLIst;
  if ( v2 )
  {
    v3 = this->m_pkSlideBarGuild;
    if ( v3 )
      SlideBar::SetSplitCnt(v3, v2->m_nSlideSplitCnt);
    v1->m_pkGuildLIst->m_nViewStartPos = v1->m_pkSlideBarGuild->m_nCurPos;
    SlideListWin::UpdateViewList(v1->m_pkGuildLIst);
  }
}

//----- (005D6890) --------------------------------------------------------
void __thiscall GTRequestListWin::OnSearchChoice(GTRequestListWin *this)
{
  GTRequestListWin *v1; // esi@1

  v1 = this;
  if ( this == (GTRequestListWin *)g_pkToolTipWin->m_pkToolTipParentWin )
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD, _DWORD))v1->m_spPopupMenu->vfptr[77].__vecDelDtor)(PgWin::ms_iMsX, PgWin::ms_iMsY);
  PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v1->m_spPopupMenu->vfptr);
  ((void (__stdcall *)(_DWORD))v1->m_spPopupMenu->vfptr[60].__vecDelDtor)(1);
}

//----- (005D6900) --------------------------------------------------------
void __thiscall GuildTournamentBaseWin::On_NC_GUILD_TOURNAMENT_JOIN_REQ(GuildTournamentBaseWin *this)
{
  char *v1; // eax@2
  unsigned int v2; // ebx@3
  __int64 v3; // rax@5
  int v4; // eax@5
  char v5; // cl@6
  NiUnsharedGeometryGroup *v6; // eax@7
  NiUnsharedGeometryGroup *v7; // edx@7
  char v8; // cl@8
  unsigned int v9; // eax@9
  char *v10; // edi@9
  char v11; // cl@10
  char *v12; // edi@11
  char v13; // al@12
  __int64 v14; // rax@15
  unsigned int v15; // eax@15
  char *v16; // edi@15
  char v17; // cl@16
  NiUnsharedGeometryGroup *v18; // eax@17
  NiUnsharedGeometryGroup *v19; // ecx@17
  char v20; // dl@18
  unsigned int v21; // eax@19
  NiUnsharedGeometryGroup *v22; // esi@19
  char *v23; // edi@19
  char v24; // cl@20
  char *v25; // edi@21
  char v26; // al@22
  __int64 v27; // rax@25
  unsigned int v28; // eax@25
  char *v29; // edi@25
  char v30; // cl@26
  NiUnsharedGeometryGroup *v31; // eax@27
  NiUnsharedGeometryGroup *v32; // ecx@27
  char v33; // dl@28
  unsigned int v34; // eax@29
  NiUnsharedGeometryGroup *v35; // esi@29
  char *v36; // edi@29
  char v37; // cl@30
  char *v38; // edi@31
  char v39; // al@32
  __int64 v40; // rax@35
  unsigned int v41; // eax@35
  char *v42; // edi@35
  char v43; // cl@36
  NiUnsharedGeometryGroup *v44; // eax@37
  NiUnsharedGeometryGroup *v45; // ecx@37
  char v46; // dl@38
  unsigned int v47; // eax@39
  NiUnsharedGeometryGroup *v48; // esi@39
  char *v49; // edi@39
  char v50; // cl@40
  char *v51; // edi@41
  char v52; // al@42
  char *v53; // eax@44
  char *v54; // eax@44
  MsgBox *v55; // eax@44
  int v56; // edx@45
  GuildTournamentBaseWin *v57; // [sp+0h] [bp-208h]@1
  char acStr1[256]; // [sp+4h] [bp-204h]@3
  char acStr2[256]; // [sp+104h] [bp-104h]@3

  v57 = this;
  if ( CDataReader::GetRecord((CDataReader *)(ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::ms_pkTable + 4), 0) )
  {
    v1 = CDataReader::GetRecord((CDataReader *)(ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::ms_pkTable + 4), 0);
    if ( v1 )
    {
      v2 = *(_DWORD *)(v1 + 3);
      memset(acStr1, 0, 0x100u);
      memset(acStr2, 0, 0x100u);
      if ( v2 )
      {
        if ( User::GetGem(v2) )
        {
          v3 = User::GetGem(v2);
          sprintf(acStr1, "%I64d", v3);
          v4 = 0;
          do
          {
            v5 = acStr1[v4];
            acStr2[v4++] = v5;
          }
          while ( v5 );
          v6 = TextData::Get(0x475F9699u);
          v7 = v6;
          do
          {
            v8 = (char)v6->vfptr;
            v6 = (NiUnsharedGeometryGroup *)((char *)v6 + 1);
          }
          while ( v8 );
          v9 = (char *)v6 - (char *)v7;
          v10 = &acStr1[255];
          do
            v11 = (v10++)[1];
          while ( v11 );
          qmemcpy(v10, v7, v9);
          v12 = &acStr1[255];
          do
            v13 = (v12++)[1];
          while ( v13 );
          *v12 = 0;
        }
        if ( User::GetGold(v2) )
        {
          v14 = User::GetGold(v2);
          sprintf(acStr1, "%I64d", v14);
          v15 = strlen(acStr1) + 1;
          v16 = &acStr1[255];
          do
            v17 = (v16++)[1];
          while ( v17 );
          qmemcpy(v16, acStr1, v15);
          v18 = TextData::Get(0x47A395A3u);
          v19 = v18;
          do
          {
            v20 = (char)v18->vfptr;
            v18 = (NiUnsharedGeometryGroup *)((char *)v18 + 1);
          }
          while ( v20 );
          v21 = (char *)v18 - (char *)v19;
          v22 = v19;
          v23 = &acStr1[255];
          do
            v24 = (v23++)[1];
          while ( v24 );
          qmemcpy(v23, v22, v21);
          v25 = &acStr1[255];
          do
            v26 = (v25++)[1];
          while ( v26 );
          *v25 = 0;
        }
        if ( User::GetSilver(v2) )
        {
          v27 = User::GetSilver(v2);
          sprintf(acStr1, "%I64d", v27);
          v28 = strlen(acStr1) + 1;
          v29 = &acStr1[255];
          do
            v30 = (v29++)[1];
          while ( v30 );
          qmemcpy(v29, acStr1, v28);
          v31 = TextData::Get(0x98B595EF);
          v32 = v31;
          do
          {
            v33 = (char)v31->vfptr;
            v31 = (NiUnsharedGeometryGroup *)((char *)v31 + 1);
          }
          while ( v33 );
          v34 = (char *)v31 - (char *)v32;
          v35 = v32;
          v36 = &acStr1[255];
          do
            v37 = (v36++)[1];
          while ( v37 );
          qmemcpy(v36, v35, v34);
          v38 = &acStr1[255];
          do
            v39 = (v38++)[1];
          while ( v39 );
          *v38 = 0;
        }
        if ( User::GetCopper(v2) )
        {
          v40 = User::GetCopper(v2);
          sprintf(acStr1, "%I64d", v40);
          v41 = strlen(acStr1) + 1;
          v42 = &acStr1[255];
          do
            v43 = (v42++)[1];
          while ( v43 );
          qmemcpy(v42, acStr1, v41);
          v44 = TextData::Get(0x88AF99F5);
          v45 = v44;
          do
          {
            v46 = (char)v44->vfptr;
            v44 = (NiUnsharedGeometryGroup *)((char *)v44 + 1);
          }
          while ( v46 );
          v47 = (char *)v44 - (char *)v45;
          v48 = v45;
          v49 = &acStr1[255];
          do
            v50 = (v49++)[1];
          while ( v50 );
          qmemcpy(v49, v48, v47);
          v51 = &acStr1[255];
          do
            v52 = (v51++)[1];
          while ( v52 );
          *v51 = 0;
        }
      }
      v53 = (char *)TextData2::Get(0x2D555492u);
      v54 = fs(v53, acStr2);
      v55 = MsgBox::Modal(MSGBOX_OKCANCEL, v54);
      if ( v57 )
        v56 = (int)&v57->vfptr;
      else
        v56 = 0;
      ((void (__stdcall *)(int))v55->vfptr->SetMsgHooker)(v56);
    }
  }
}
// A8C1C0: using guessed type int ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::ms_pkTable;

//----- (005D6CB0) --------------------------------------------------------
void __thiscall GTRequestListWin::AddGuildInfo(GTRequestListWin *this, GTRequestListWin::GuildInfo *kGuildInfo)
{
  GTRequestListWin::GuildInfo *v2; // ebx@1
  GTRequestListWin *v3; // edi@1
  unsigned int v4; // ST2C_4@1
  unsigned int v5; // ecx@3
  char *v6; // eax@6
  char v7; // dl@7
  GTRequestListWin::GuildInfo *v8; // eax@9
  char *v9; // esi@12
  char *v10; // ebx@13
  BOOL v11; // eax@13
  const char *v12; // edi@13
  int v13; // ebx@16
  char *v14; // eax@16
  const char *v15; // ebx@17
  unsigned int v16; // eax@20
  char *v17; // edi@20
  char v18; // cl@21
  unsigned int v19; // edx@22
  char *v20; // edi@22
  char v21; // cl@23
  unsigned int v22; // eax@24
  char *v23; // edi@24
  char v24; // cl@25
  unsigned int v25; // kr00_4@26
  char *v26; // eax@26
  char v27; // dl@27
  unsigned int v28; // eax@28
  char *v29; // esi@28
  char *v30; // edi@28
  char v31; // cl@29
  int v32; // edx@30
  GTRequestListWin *v33; // ebx@30
  char v34; // bl@37
  int v35; // ebx@39
  char *v36; // eax@39
  const char *v37; // ebx@40
  unsigned int v38; // eax@43
  char *v39; // edi@43
  char v40; // cl@44
  unsigned int v41; // edx@45
  char *v42; // edi@45
  char v43; // cl@46
  unsigned int v44; // eax@47
  char *v45; // edi@47
  char v46; // cl@48
  unsigned int v47; // kr04_4@49
  char *v48; // eax@49
  char v49; // dl@50
  char v50; // cl@52
  char *v51; // edi@59
  const char *v52; // eax@63
  unsigned int v53; // eax@64
  char *v54; // edi@64
  char v55; // cl@65
  unsigned int v56; // eax@66
  char *v57; // edi@66
  char v58; // cl@67
  unsigned int v59; // kr08_4@68
  char *v60; // eax@68
  char v61; // dl@69
  unsigned int v62; // eax@70
  char *v63; // esi@70
  char *v64; // edi@70
  char v65; // cl@71
  char *v66; // edi@72
  char *v67; // esi@72
  char v68; // cl@72
  int v69; // eax@72
  unsigned int v70; // eax@73
  char *v71; // edi@73
  char v72; // cl@74
  unsigned int v73; // eax@75
  char *v74; // edi@75
  char v75; // cl@76
  unsigned int v76; // kr0C_4@77
  char *v77; // eax@77
  char v78; // dl@78
  char v79; // cl@80
  unsigned int v80; // esi@86
  char *v81; // ecx@86
  char *v82; // eax@89
  char v83; // dl@90
  char *v84; // esi@94
  BOOL v85; // eax@95
  const char *v86; // edi@95
  unsigned int v87; // ebx@98
  const char *v88; // eax@98
  const char *v89; // ebx@99
  unsigned int v90; // eax@102
  char *v91; // edi@102
  char v92; // cl@103
  unsigned int v93; // edx@104
  char *v94; // edi@104
  char v95; // cl@105
  unsigned int v96; // eax@106
  char *v97; // edi@106
  char v98; // cl@107
  unsigned int v99; // kr10_4@108
  char *v100; // eax@108
  char v101; // dl@109
  unsigned int v102; // eax@110
  char *v103; // esi@110
  char *v104; // edi@110
  char v105; // cl@111
  int v106; // edx@112
  GTRequestListWin *v107; // esi@112
  char *v108; // edi@118
  char *v109; // edi@118
  char v110; // bl@119
  unsigned int v111; // ebx@121
  const char *v112; // eax@121
  const char *v113; // ebx@122
  unsigned int v114; // eax@125
  char *v115; // edi@125
  char v116; // cl@126
  unsigned int v117; // edx@127
  char *v118; // edi@127
  char v119; // cl@128
  unsigned int v120; // eax@129
  char *v121; // edi@129
  char v122; // cl@130
  unsigned int v123; // kr14_4@131
  char *v124; // eax@131
  char v125; // dl@132
  char v126; // cl@134
  char *v127; // edi@141
  const char *v128; // eax@145
  int v129; // edi@148
  GTRequestListWin::GuildInfo *v130; // ebx@149
  unsigned int v131; // eax@149
  unsigned int v132; // eax@151
  char *v133; // edi@151
  char v134; // cl@152
  unsigned int v135; // eax@153
  char *v136; // edi@153
  char v137; // cl@154
  unsigned int v138; // kr18_4@155
  char *v139; // eax@155
  char v140; // dl@156
  unsigned int v141; // eax@157
  char *v142; // esi@157
  char *v143; // edi@157
  char v144; // cl@158
  unsigned int v145; // eax@160
  char *v146; // edi@160
  char v147; // cl@161
  unsigned int v148; // eax@162
  char *v149; // edi@162
  char v150; // cl@163
  unsigned int v151; // kr1C_4@164
  char *v152; // eax@164
  char v153; // dl@165
  char v154; // cl@167
  NiUnsharedGeometryGroup *v155; // eax@150
  char TextCmd2[256]; // [sp+Ch] [bp-430h]@3
  BYTE TestChar[4]; // [sp+10Ch] [bp-330h]@37
  GTRequestListWin::GuildInfo *v158; // [sp+110h] [bp-32Ch]@1
  int GuildNamelen; // [sp+114h] [bp-328h]@11
  char *pChar; // [sp+118h] [bp-324h]@16
  int c2; // [sp+11Ch] [bp-320h]@14
  int Searchlen; // [sp+120h] [bp-31Ch]@8
  int c1; // [sp+124h] [bp-318h]@13
  int iLastIndex; // [sp+128h] [bp-314h]@1
  GTRequestListWin *v165; // [sp+12Ch] [bp-310h]@1
  int i; // [sp+130h] [bp-30Ch]@11
  char *pkCharClone; // [sp+134h] [bp-308h]@4
  char TextCmd3[256]; // [sp+138h] [bp-304h]@3
  char TextCmd4[256]; // [sp+238h] [bp-204h]@3
  char szText[4]; // [sp+338h] [bp-104h]@3
  int v171; // [sp+33Ch] [bp-100h]@3
  int v172; // [sp+340h] [bp-FCh]@3
  int v173; // [sp+344h] [bp-F8h]@3
  char dst; // [sp+348h] [bp-F4h]@3
  char Name[128]; // [sp+3B8h] [bp-84h]@1

  v2 = kGuildInfo;
  v3 = this;
  v4 = this->m_uiNo;
  v165 = this;
  v158 = kGuildInfo;
  sprintf(Name, "%d", v4);
  iLastIndex = SlideListWin::AddText(v3->m_pkGuildLIst, Name);
  if ( !strcmp(v3->m_acSearchName, (const char *)&unk_9AF927) || v3->m_iSearchTyepe != 11 )
    goto LABEL_62;
  v171 = 2032956015;
  *(_DWORD *)szText = 1819239291;
  v172 = 1869376613;
  v173 = 11383;
  memset(&dst, 0, 0xF0u);
  strcpy(TextCmd2, "}");
  TextCmd2[2] = 0;
  memset(&TextCmd2[3], 0, 0xFDu);
  memset(TextCmd3, 0, 0x100u);
  memset(TextCmd4, 0, 0x100u);
  v5 = kGuildInfo->m_strGuildName._Myres;
  pkCharClone = (char *)(v5 < 0x10 ? kGuildInfo : kGuildInfo->m_strGuildName._Bx._Ptr);
  v6 = v3->m_acSearchName;
  do
    v7 = *v6++;
  while ( v7 );
  Searchlen = v6 - &v3->m_acSearchName[1];
  v8 = v5 < 0x10 ? kGuildInfo : kGuildInfo->m_strGuildName._Bx._Ptr;
  GuildNamelen = strlen(v8->m_strGuildName._Bx._Buf);
  i = 0;
  if ( GuildNamelen <= 0 )
  {
LABEL_62:
    if ( v2->m_strGuildName._Myres < 0x10 )
      v52 = (const char *)v2;
    else
      v52 = v2->m_strGuildName._Bx._Ptr;
    SlideListWin::SetText(v3->m_pkGuildLIst, iLastIndex, 1u, v52);
    v33 = v165;
    goto LABEL_84;
  }
  v9 = TextCmd4;
  while ( 1 )
  {
    v10 = pkCharClone;
    LOBYTE(c1) = *pkCharClone;
    v11 = IsDBCSLeadByte(c1);
    v12 = v165->m_acSearchName;
    if ( !v11 )
      break;
    LOBYTE(c2) = *v12;
    if ( !IsDBCSLeadByte(c2) )
    {
      strncpy(v9, v10, 2u);
      i += 2;
      v9 += 2;
      pkCharClone = v10 + 2;
      goto LABEL_60;
    }
    if ( (_BYTE)c1 != (_BYTE)c2 )
    {
      strncpy(v9, v10, 2u);
      goto LABEL_35;
    }
    v13 = Searchlen;
    strncpy(TextCmd3, pkCharClone, Searchlen);
    v14 = (char *)_mbsstr(TextCmd3, v12);
    pChar = v14;
    if ( !v14 )
    {
      strncpy(v9, pkCharClone, v13);
LABEL_35:
      i += 2;
      v9 += 2;
      pkCharClone += 2;
      goto LABEL_60;
    }
    v15 = v14;
    if ( !strcmp(v14, v12) )
    {
      if ( !i )
      {
        v53 = strlen(TextCmd3) + 1;
        v54 = &TextCmd4[255];
        do
          v55 = (v54++)[1];
        while ( v55 );
        qmemcpy(v54, TextCmd3, v53);
        v56 = strlen(TextCmd2) + 1;
        v57 = &TextCmd4[255];
        do
          v58 = (v57++)[1];
        while ( v58 );
        qmemcpy(v57, TextCmd2, v56);
        v59 = strlen(v15);
        v60 = &pkCharClone[v59];
        do
          v61 = *v60++;
        while ( v61 );
        v62 = v60 - &pkCharClone[v59];
        v63 = &pkCharClone[v59];
        v64 = &TextCmd4[255];
        do
          v65 = (v64++)[1];
        while ( v65 );
        goto LABEL_72;
      }
      if ( i > 0 )
      {
        v16 = strlen(szText) + 1;
        v17 = &TextCmd3[255];
        do
          v18 = (v17++)[1];
        while ( v18 );
        qmemcpy(v17, szText, v16);
        v19 = strlen(v15) + 1;
        v20 = &TextCmd3[255];
        do
          v21 = (v20++)[1];
        while ( v21 );
        qmemcpy(v20, v15, v19);
        v22 = strlen(TextCmd2) + 1;
        v23 = &TextCmd3[255];
        do
          v24 = (v23++)[1];
        while ( v24 );
        qmemcpy(v23, TextCmd2, v22);
        v25 = strlen(v15);
        v26 = &pkCharClone[v25];
        do
          v27 = *v26++;
        while ( v27 );
        v28 = v26 - &pkCharClone[v25];
        v29 = &pkCharClone[v25];
        v30 = &TextCmd3[255];
        do
          v31 = (v30++)[1];
        while ( v31 );
LABEL_30:
        v32 = iLastIndex;
        v33 = v165;
        qmemcpy(v30, v29, v28);
        SlideListWin::SetText(v33->m_pkGuildLIst, v32, 1u, TextCmd4);
        goto LABEL_84;
      }
    }
    else
    {
      strncpy(v9, pkCharClone, 2u);
      i += 2;
      v9 += 2;
    }
    memset(TextCmd3, 0, 0x100u);
    pkCharClone += 2;
LABEL_60:
    if ( i >= GuildNamelen )
    {
      v3 = v165;
      v2 = v158;
      goto LABEL_62;
    }
  }
  v34 = *v12;
  TestChar[0] = *v12;
  if ( IsDBCSLeadByte(TestChar[0]) )
  {
    v51 = pkCharClone;
    strncpy(v9, pkCharClone, 1u);
    ++i;
    ++v9;
    pkCharClone = v51 + 1;
    goto LABEL_60;
  }
  if ( (_BYTE)c1 != v34 )
  {
    strncpy(v9, pkCharClone, 1u);
    goto LABEL_58;
  }
  v35 = Searchlen;
  strncpy(TextCmd3, pkCharClone, Searchlen);
  v36 = (char *)_mbsstr(TextCmd3, v12);
  pChar = v36;
  if ( !v36 )
  {
    strncpy(v9, pkCharClone, v35);
LABEL_58:
    ++i;
    ++v9;
    ++pkCharClone;
    goto LABEL_60;
  }
  v37 = v36;
  if ( strcmp(v36, v12) )
  {
    strncpy(v9, pkCharClone, 1u);
    ++i;
    ++v9;
LABEL_55:
    memset(TextCmd3, 0, 0x100u);
    ++pkCharClone;
    goto LABEL_60;
  }
  if ( i )
  {
    if ( i > 0 )
    {
      v38 = strlen(szText) + 1;
      v39 = &TextCmd3[255];
      do
        v40 = (v39++)[1];
      while ( v40 );
      qmemcpy(v39, szText, v38);
      v41 = strlen(v37) + 1;
      v42 = &TextCmd3[255];
      do
        v43 = (v42++)[1];
      while ( v43 );
      qmemcpy(v42, v37, v41);
      v44 = strlen(TextCmd2) + 1;
      v45 = &TextCmd3[255];
      do
        v46 = (v45++)[1];
      while ( v46 );
      qmemcpy(v45, TextCmd2, v44);
      v47 = strlen(v37);
      v48 = &pkCharClone[v47];
      do
        v49 = *v48++;
      while ( v49 );
      v28 = v48 - &pkCharClone[v47];
      v29 = &pkCharClone[v47];
      v30 = &TextCmd3[255];
      do
        v50 = (v30++)[1];
      while ( v50 );
      goto LABEL_30;
    }
    goto LABEL_55;
  }
  v70 = strlen(TextCmd3) + 1;
  v71 = &TextCmd4[255];
  do
    v72 = (v71++)[1];
  while ( v72 );
  qmemcpy(v71, TextCmd3, v70);
  v73 = strlen(TextCmd2) + 1;
  v74 = &TextCmd4[255];
  do
    v75 = (v74++)[1];
  while ( v75 );
  qmemcpy(v74, TextCmd2, v73);
  v76 = strlen(v37);
  v77 = &pkCharClone[v76];
  do
    v78 = *v77++;
  while ( v78 );
  v62 = v77 - &pkCharClone[v76];
  v63 = &pkCharClone[v76];
  v64 = &TextCmd4[255];
  do
    v79 = (v64++)[1];
  while ( v79 );
LABEL_72:
  v33 = v165;
  qmemcpy(v64, v63, 4 * (v62 >> 2));
  v67 = &v63[4 * (v62 >> 2)];
  v66 = &v64[4 * (v62 >> 2)];
  v68 = v62;
  v69 = iLastIndex;
  qmemcpy(v66, v67, v68 & 3);
  SlideListWin::SetText(v33->m_pkGuildLIst, v69, 1u, szText);
LABEL_84:
  if ( !strcmp(v33->m_acSearchName, (const char *)&unk_9AF92E) || v33->m_iSearchTyepe != 12 )
    goto LABEL_145;
  v171 = 2032956015;
  *(_DWORD *)szText = 1819239291;
  v172 = 1869376613;
  v173 = 11383;
  memset(&dst, 0, 0xF0u);
  strcpy(TextCmd2, "}");
  TextCmd2[2] = 0;
  memset(&TextCmd2[3], 0, 0xFDu);
  memset(TextCmd3, 0, 0x100u);
  memset(TextCmd4, 0, 0x100u);
  v80 = v158->m_MasterName._Myres;
  v81 = v158->m_MasterName._Bx._Buf;
  if ( v80 < 0x10 )
    pkCharClone = v158->m_MasterName._Bx._Buf;
  else
    pkCharClone = *(char **)v81;
  v82 = v33->m_acSearchName;
  do
    v83 = *v82++;
  while ( v83 );
  c2 = v82 - &v33->m_acSearchName[1];
  if ( v80 >= 0x10 )
    v81 = *(char **)v81;
  pChar = (char *)strlen(v81);
  i = 0;
  if ( (signed int)pChar <= 0 )
    goto LABEL_145;
  v84 = TextCmd4;
  while ( 2 )
  {
    LOBYTE(c1) = *pkCharClone;
    v85 = IsDBCSLeadByte(c1);
    v86 = v165->m_acSearchName;
    if ( !v85 )
    {
      v110 = *v86;
      TestChar[0] = *v86;
      if ( !IsDBCSLeadByte(TestChar[0]) )
      {
        if ( (_BYTE)c1 == v110 )
        {
          v111 = c2;
          strncpy(TextCmd3, pkCharClone, c2);
          v112 = _mbsstr(TextCmd3, v86);
          GuildNamelen = (int)v112;
          if ( v112 )
          {
            v113 = v112;
            if ( !strcmp(v112, v86) )
            {
              if ( !i )
              {
                v145 = strlen(TextCmd3) + 1;
                v146 = &TextCmd4[255];
                do
                  v147 = (v146++)[1];
                while ( v147 );
                qmemcpy(v146, TextCmd3, v145);
                v148 = strlen(TextCmd2) + 1;
                v149 = &TextCmd4[255];
                do
                  v150 = (v149++)[1];
                while ( v150 );
                qmemcpy(v149, TextCmd2, v148);
                v151 = strlen(v113);
                v152 = &pkCharClone[v151];
                do
                  v153 = *v152++;
                while ( v153 );
                v141 = v152 - &pkCharClone[v151];
                v142 = &pkCharClone[v151];
                v143 = &TextCmd4[255];
                do
                  v154 = (v143++)[1];
                while ( v154 );
                goto LABEL_159;
              }
              if ( i > 0 )
              {
                v114 = strlen(szText) + 1;
                v115 = &TextCmd3[255];
                do
                  v116 = (v115++)[1];
                while ( v116 );
                qmemcpy(v115, szText, v114);
                v117 = strlen(v113) + 1;
                v118 = &TextCmd3[255];
                do
                  v119 = (v118++)[1];
                while ( v119 );
                qmemcpy(v118, v113, v117);
                v120 = strlen(TextCmd2) + 1;
                v121 = &TextCmd3[255];
                do
                  v122 = (v121++)[1];
                while ( v122 );
                qmemcpy(v121, TextCmd2, v120);
                v123 = strlen(v113);
                v124 = &pkCharClone[v123];
                do
                  v125 = *v124++;
                while ( v125 );
                v102 = v124 - &pkCharClone[v123];
                v103 = &pkCharClone[v123];
                v104 = &TextCmd3[255];
                do
                  v126 = (v104++)[1];
                while ( v126 );
                goto LABEL_112;
              }
            }
            else
            {
              strncpy(v84, pkCharClone, 1u);
              ++i;
              ++v84;
            }
            memset(TextCmd3, 0, 0x100u);
            ++pkCharClone;
            goto LABEL_143;
          }
          strncpy(v84, pkCharClone, v111);
        }
        else
        {
          strncpy(v84, pkCharClone, 1u);
        }
        ++i;
        ++v84;
        ++pkCharClone;
        goto LABEL_143;
      }
      v127 = pkCharClone;
      strncpy(v84, pkCharClone, 1u);
      ++i;
      ++v84;
      v109 = v127 + 1;
LABEL_142:
      pkCharClone = v109;
      goto LABEL_143;
    }
    LOBYTE(Searchlen) = *v86;
    if ( !IsDBCSLeadByte(Searchlen) )
    {
      v108 = pkCharClone;
      strncpy(v84, pkCharClone, 2u);
      i += 2;
      v84 += 2;
      v109 = v108 + 2;
      goto LABEL_142;
    }
    if ( (_BYTE)c1 != (_BYTE)Searchlen )
    {
      strncpy(v84, pkCharClone, 2u);
      goto LABEL_117;
    }
    v87 = c2;
    strncpy(TextCmd3, pkCharClone, c2);
    v88 = _mbsstr(TextCmd3, v86);
    GuildNamelen = (int)v88;
    if ( !v88 )
    {
      strncpy(v84, pkCharClone, v87);
LABEL_117:
      i += 2;
      v84 += 2;
      pkCharClone += 2;
      goto LABEL_143;
    }
    v89 = v88;
    if ( strcmp(v88, v86) )
    {
      strncpy(v84, pkCharClone, 2u);
      i += 2;
      v84 += 2;
      goto LABEL_114;
    }
    if ( !i )
    {
      v132 = strlen(TextCmd3) + 1;
      v133 = &TextCmd4[255];
      do
        v134 = (v133++)[1];
      while ( v134 );
      qmemcpy(v133, TextCmd3, v132);
      v135 = strlen(TextCmd2) + 1;
      v136 = &TextCmd4[255];
      do
        v137 = (v136++)[1];
      while ( v137 );
      qmemcpy(v136, TextCmd2, v135);
      v138 = strlen(v89);
      v139 = &pkCharClone[v138];
      do
        v140 = *v139++;
      while ( v140 );
      v141 = v139 - &pkCharClone[v138];
      v142 = &pkCharClone[v138];
      v143 = &TextCmd4[255];
      do
        v144 = (v143++)[1];
      while ( v144 );
LABEL_159:
      qmemcpy(v143, v142, v141);
      v129 = iLastIndex;
      v107 = v165;
      SlideListWin::SetText(v165->m_pkGuildLIst, iLastIndex, 2u, szText);
      goto LABEL_149;
    }
    if ( i > 0 )
    {
      v90 = strlen(szText) + 1;
      v91 = &TextCmd3[255];
      do
        v92 = (v91++)[1];
      while ( v92 );
      qmemcpy(v91, szText, v90);
      v93 = strlen(v89) + 1;
      v94 = &TextCmd3[255];
      do
        v95 = (v94++)[1];
      while ( v95 );
      qmemcpy(v94, v89, v93);
      v96 = strlen(TextCmd2) + 1;
      v97 = &TextCmd3[255];
      do
        v98 = (v97++)[1];
      while ( v98 );
      qmemcpy(v97, TextCmd2, v96);
      v99 = strlen(v89);
      v100 = &pkCharClone[v99];
      do
        v101 = *v100++;
      while ( v101 );
      v102 = v100 - &pkCharClone[v99];
      v103 = &pkCharClone[v99];
      v104 = &TextCmd3[255];
      do
        v105 = (v104++)[1];
      while ( v105 );
LABEL_112:
      v106 = iLastIndex;
      qmemcpy(v104, v103, v102);
      v107 = v165;
      SlideListWin::SetText(v165->m_pkGuildLIst, v106, 2u, TextCmd4);
      goto LABEL_148;
    }
LABEL_114:
    memset(TextCmd3, 0, 0x100u);
    pkCharClone += 2;
LABEL_143:
    if ( i < (signed int)pChar )
      continue;
    break;
  }
  v33 = v165;
LABEL_145:
  v128 = v158->m_MasterName._Bx._Buf;
  if ( v158->m_MasterName._Myres >= 0x10 )
    v128 = *(const char **)v128;
  SlideListWin::SetText(v33->m_pkGuildLIst, iLastIndex, 2u, v128);
  v107 = v165;
LABEL_148:
  v129 = iLastIndex;
LABEL_149:
  v130 = v158;
  v131 = v158->m_unGuildType;
  if ( !v131 )
  {
    v155 = TextData::Get(0x3E3D34A2u);
    goto LABEL_171;
  }
  if ( v131 == 1 )
  {
    v155 = TextData::Get(0x3E486D96u);
LABEL_171:
    SlideListWin::SetText(v107->m_pkGuildLIst, v129, 3u, (const char *)v155);
  }
  sprintf(Name, "%d", v130->m_unGuildGrade);
  SlideListWin::SetText(v107->m_pkGuildLIst, v129, 4u, Name);
  sprintf(Name, "%d", v130->m_unGuildTotalMember);
  SlideListWin::SetText(v107->m_pkGuildLIst, v129, 5u, Name);
}

//----- (005D7C70) --------------------------------------------------------
void __thiscall GTRequestListWin::DirectMessage(GTRequestListWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  GTRequestListWin *v4; // esi@1
  NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> >Vtbl *v5; // eax@3
  void *(__thiscall *v6)(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> > *, unsigned int); // edi@4
  NiUnsharedGeometryGroup *v7; // eax@4
  NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> >Vtbl *v8; // eax@5
  void *(__thiscall *v9)(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> > *, unsigned int); // edi@6
  NiUnsharedGeometryGroup *v10; // eax@6

  v4 = this;
  if ( iMsgTag == 74 )
  {
    v8 = this->m_kPropertyList.vfptr;
    this->m_kPropertyList.m_pkHead = (NiTListItem<NiPointer<NiProperty> > *)11;
    if ( v8 )
    {
      v9 = v8->__vecDelDtor;
      v10 = TextData2::Get(0xD90AE9EE);
      (*((void (__thiscall **)(_DWORD, _DWORD))v9 + 118))(v4->m_kPropertyList.vfptr, v10);
    }
  }
  else if ( iMsgTag == 75 )
  {
    v5 = this->m_kPropertyList.vfptr;
    this->m_kPropertyList.m_pkHead = (NiTListItem<NiPointer<NiProperty> > *)12;
    if ( v5 )
    {
      v6 = v5->__vecDelDtor;
      v7 = TextData2::Get(0xE012F32C);
      (*((void (__thiscall **)(_DWORD, _DWORD))v6 + 118))(v4->m_kPropertyList.vfptr, v7);
    }
  }
}

//----- (005D7D00) --------------------------------------------------------
void __thiscall GTRequestListWin::OnClose(GTRequestListWin *this)
{
  GTRequestListWin *v1; // esi@1
  PgWinText *v2; // eax@1
  NiRefObjectVtbl *v3; // edi@2
  NiUnsharedGeometryGroup *v4; // eax@2
  SlideListWin *v5; // edi@3

  v1 = this;
  this->m_bFirstSort = 0;
  *(_DWORD *)&this->m_acSearchName[0] = 0;
  *(_DWORD *)&this->m_acSearchName[4] = 0;
  *(_DWORD *)&this->m_acSearchName[8] = 0;
  *(_DWORD *)&this->m_acSearchName[12] = 0;
  *(_DWORD *)&this->m_acSearchName[16] = 0;
  *(_DWORD *)&this->m_acSearchName[20] = 0;
  *(_DWORD *)&this->m_acSearchName[24] = 0;
  *(_DWORD *)&this->m_acSearchName[28] = 0;
  v2 = this->m_pkSearchType;
  this->m_iSearchTyepe = 11;
  if ( v2 )
  {
    v3 = v2->vfptr;
    v4 = TextData2::Get(0xD90AE9EE);
    v3[118].__vecDelDtor((NiRefObject *)v1->m_pkSearchType, (unsigned int)v4);
  }
  SlideBar::SetSplitCnt(v1->m_pkSlideBarGuild, 0);
  v1->m_pkGuildLIst->m_nSlideSplitCnt = 0;
  v5 = v1->m_pkGuildLIst;
  v5->m_fCurSlideBtnPos = 0.0;
  v5->m_nViewStartPos = (signed int)((double)v5->m_nSlideSplitCnt * 0.0);
  v1->m_pkGuildLIst->m_nViewStartPos = 0;
  ((void (__stdcall *)(_DWORD))v1->m_spEdit.m_pObject->vfptr[115].__vecDelDtor)(&unk_9AF947);
}

//----- (005D7DE0) --------------------------------------------------------
void __thiscall GuildTournamentBaseWin::OnCommand(GuildTournamentBaseWin *this, unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@6

  switch ( wParam )
  {
    case 0u:
      GuildTournamentBaseWin::On_NC_GUILD_TOURNAMENT_JOIN_REQ(this);
      break;
    case 1u:
      GuildTask::SetListReq(1);
      NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 0x7Eu, 0, 0);
      break;
    case 2u:
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x1Du, 0x91u, 0, 0);
      break;
    case 3u:
      NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 0xE9u, 0, 0);
      break;
    case 4u:
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v3 )
        GameFrameWork::OpenPlayGuideSearchList(v3, "GuildMenu");
      break;
    default:
      return;
  }
}

//----- (005D7E90) --------------------------------------------------------
void __thiscall GTRequestListWin::DisplayInfoSetting(GTRequestListWin *this, bool bSearch)
{
  GTRequestListWin *v2; // esi@1
  SlideListWin *v3; // ecx@1
  NiRefObjectVtbl *v4; // edi@1
  unsigned int v5; // ST04_4@1
  char *v6; // eax@1
  char *v7; // eax@1
  GTRequestListWin::GuildInfo *v8; // edi@3
  int v9; // eax@4
  const char *v10; // eax@6
  NiRefObjectVtbl *v11; // ebx@9
  unsigned int v12; // ST04_4@9
  char *v13; // eax@9
  char *v14; // eax@9
  NiRefObjectVtbl *v15; // ebx@14
  unsigned int v16; // ST04_4@14
  char *v17; // eax@14
  char *v18; // eax@14
  unsigned int i; // [sp+Ch] [bp-8h]@1
  int v20; // [sp+10h] [bp-4h]@2

  v2 = this;
  v3 = this->m_pkGuildLIst;
  v2->m_uiNo = 0;
  SlideListWin::RemoveAllList(v3);
  v4 = v2->m_pkTotalGuildNum->vfptr;
  v5 = v2->m_uiNo;
  v6 = (char *)TextData2::Get(0x3B544247u);
  v7 = fs(v6, v5);
  v4[118].__vecDelDtor((NiRefObject *)v2->m_pkTotalGuildNum, (unsigned int)v7);
  i = 0;
  if ( v2->m_vecGuildInfo._Mylast - v2->m_vecGuildInfo._Myfirst )
  {
    v20 = 0;
    do
    {
      v8 = &v2->m_vecGuildInfo._Myfirst[v20];
      if ( bSearch )
      {
        v9 = v2->m_iSearchTyepe;
        if ( v9 == 11 )
        {
          if ( v8->m_strGuildName._Myres < 0x10 )
            v10 = v2->m_vecGuildInfo._Myfirst[v20].m_strGuildName._Bx._Buf;
          else
            v10 = v8->m_strGuildName._Bx._Ptr;
        }
        else
        {
          if ( v9 != 12 )
            goto LABEL_16;
          v10 = v8->m_MasterName._Bx._Buf;
          if ( v8->m_MasterName._Myres >= 0x10 )
            v10 = *(const char **)v10;
        }
        if ( _mbsstr(v10, v2->m_acSearchName) )
        {
          ++v2->m_uiNo;
          v11 = v2->m_pkTotalGuildNum->vfptr;
          v12 = v2->m_uiNo;
          v13 = (char *)TextData2::Get(0x3B544247u);
          v14 = fs(v13, v12);
          v11[118].__vecDelDtor((NiRefObject *)v2->m_pkTotalGuildNum, (unsigned int)v14);
LABEL_15:
          GTRequestListWin::AddGuildInfo(v2, v8);
          goto LABEL_16;
        }
      }
      else if ( !v2->m_bSearchStart )
      {
        ++v2->m_uiNo;
        v15 = v2->m_pkTotalGuildNum->vfptr;
        v16 = v2->m_uiNo;
        v17 = (char *)TextData2::Get(0x3B544247u);
        v18 = fs(v17, v16);
        v15[118].__vecDelDtor((NiRefObject *)v2->m_pkTotalGuildNum, (unsigned int)v18);
        goto LABEL_15;
      }
LABEL_16:
      ++v20;
      ++i;
    }
    while ( i < v2->m_vecGuildInfo._Mylast - v2->m_vecGuildInfo._Myfirst );
  }
  SlideListWin::UpdateViewList(v2->m_pkGuildLIst);
}

//----- (005D8030) --------------------------------------------------------
GuildTournamentBaseWin *__cdecl GuildTournamentBaseWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  GuildTournamentBaseWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x15Cu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&GuildTournamentBaseWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&GuildTournamentBaseWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (GuildTournamentBaseWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9AFDDC: using guessed type void (__thiscall *GuildTournamentBaseWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AFDFC: using guessed type int (__thiscall *GuildTournamentBaseWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005D8170) --------------------------------------------------------
void __thiscall GTRequestListWin::GTRequestListWin(GTRequestListWin *this)
{
  GTRequestListWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GTRequestListWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GTRequestListWin::`vftable'{for `IDirectMessenger'};
  v1->m_vecGuildInfo._Myfirst = 0;
  v1->m_vecGuildInfo._Mylast = 0;
  v1->m_vecGuildInfo._Myend = 0;
  v1->m_SortPradicationFunc.manager = 0;
  v1->m_SortPradicationFunc.functor.obj_ptr = 0;
  v1->m_SortPradicationFunc.invoker = 0;
  v1->m_spEdit.m_pObject = 0;
  *(_WORD *)&v1->m_bFirstSort = 0;
  v1->m_spPopupMenu = 0;
  v1->m_uiNo = 0;
  v1->m_iSearchTyepe = 11;
  *(_DWORD *)&v1->m_acSearchName[0] = 0;
  *(_DWORD *)&v1->m_acSearchName[4] = 0;
  *(_DWORD *)&v1->m_acSearchName[8] = 0;
  *(_DWORD *)&v1->m_acSearchName[12] = 0;
  *(_DWORD *)&v1->m_acSearchName[16] = 0;
  *(_DWORD *)&v1->m_acSearchName[20] = 0;
  *(_DWORD *)&v1->m_acSearchName[24] = 0;
  *(_DWORD *)&v1->m_acSearchName[28] = 0;
}
// 9B0020: using guessed type void (__thiscall *GTRequestListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B003C: using guessed type int (__thiscall *GTRequestListWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005D8210) --------------------------------------------------------
void __thiscall GTRequestListWin::~GTRequestListWin(GTRequestListWin *this)
{
  GTRequestListWin *v1; // esi@1
  EditWin *v2; // edi@1
  GuildListWin::GuildInfo *v3; // eax@7

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&GTRequestListWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GTRequestListWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spEdit.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  if ( v1->m_SortPradicationFunc.manager )
    v1->m_SortPradicationFunc.functor.obj_ptr = (void *)((int (__cdecl *)(_DWORD, _DWORD))v1->m_SortPradicationFunc.manager)(
                                                          v1->m_SortPradicationFunc.functor.obj_ptr,
                                                          1);
  v1->m_SortPradicationFunc.manager = 0;
  v1->m_SortPradicationFunc.invoker = 0;
  v3 = (GuildListWin::GuildInfo *)v1->m_vecGuildInfo._Myfirst;
  if ( v3 )
  {
    std::_Destroy_range<std::allocator<GTRequestListWin::GuildInfo>>(
      v3,
      (GuildListWin::GuildInfo *)v1->m_vecGuildInfo._Mylast);
    operator delete(v1->m_vecGuildInfo._Myfirst);
  }
  v1->m_vecGuildInfo._Myfirst = 0;
  v1->m_vecGuildInfo._Mylast = 0;
  v1->m_vecGuildInfo._Myend = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9B0020: using guessed type void (__thiscall *GTRequestListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B003C: using guessed type int (__thiscall *GTRequestListWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005D8310) --------------------------------------------------------
void __thiscall GTRequestListWin::Clear(GTRequestListWin *this)
{
  GTRequestListWin *v1; // esi@1
  GTRequestListWin::GuildInfo *v2; // eax@1
  GTRequestListWin::GuildInfo *v3; // ecx@1
  GuildListWin::GuildInfo *v4; // edi@2

  v1 = this;
  *(_DWORD *)&this->m_acSearchName[0] = 0;
  *(_DWORD *)&this->m_acSearchName[4] = 0;
  *(_DWORD *)&this->m_acSearchName[8] = 0;
  *(_DWORD *)&this->m_acSearchName[12] = 0;
  *(_DWORD *)&this->m_acSearchName[16] = 0;
  *(_DWORD *)&this->m_acSearchName[20] = 0;
  *(_DWORD *)&this->m_acSearchName[24] = 0;
  *(_DWORD *)&this->m_acSearchName[28] = 0;
  v2 = this->m_vecGuildInfo._Mylast;
  v3 = this->m_vecGuildInfo._Myfirst;
  if ( v3 != v2 )
  {
    v4 = std::_Move<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::GuildInfo *>(
           (GuildListWin::GuildInfo *)v2,
           (GuildListWin::GuildInfo *)v2,
           (GuildListWin::GuildInfo *)v3);
    std::_Destroy_range<std::allocator<GTRequestListWin::GuildInfo>>(
      v4,
      (GuildListWin::GuildInfo *)v1->m_vecGuildInfo._Mylast);
    v1->m_vecGuildInfo._Mylast = (GTRequestListWin::GuildInfo *)v4;
  }
  SlideListWin::RemoveAllList(v1->m_pkGuildLIst);
  SlideListWin::UpdateViewList(v1->m_pkGuildLIst);
}

//----- (005D83B0) --------------------------------------------------------
GTRequestListWin *__cdecl GTRequestListWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  GTRequestListWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1B8u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    GTRequestListWin::GTRequestListWin((GTRequestListWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (GTRequestListWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (005D84E0) --------------------------------------------------------
char __thiscall GuildTournamentBaseWin::Create(GuildTournamentBaseWin *this, PgFrameWork *pkFrameWork)
{
  GuildTournamentBaseWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  char result; // al@9
  int v8; // ebx@10
  int v9; // edi@10
  NiSourceTexture *v10; // eax@10
  PgSprData *v11; // eax@11
  PgSprData *v12; // eax@13
  PgSprData *v13; // eax@13
  PgSprData *v14; // ebx@13
  NiSourceTexture *v15; // ebx@13
  PgSprData *v16; // ebx@14
  NiNode *v17; // esi@16
  PgFont *v18; // eax@21
  int *v19; // ebx@21
  NiUnsharedGeometryGroup *v20; // eax@21
  PgSprData *v21; // ebx@21
  NiPointer<PgSprData::PgHitTester> *v22; // edx@21
  unsigned int v23; // ebx@21
  PgFont *v24; // eax@21
  int *v25; // ebx@21
  NiUnsharedGeometryGroup *v26; // eax@21
  PgSprData *v27; // ebx@21
  NiPointer<PgSprData::PgHitTester> *v28; // edx@21
  unsigned int v29; // ebx@21
  PgFont *v30; // eax@21
  int *v31; // ebx@21
  NiUnsharedGeometryGroup *v32; // eax@21
  PgSprData *v33; // ebx@21
  NiPointer<PgSprData::PgHitTester> *v34; // edx@21
  unsigned int v35; // ebx@21
  PgFont *v36; // eax@21
  int *v37; // ebx@21
  NiUnsharedGeometryGroup *v38; // eax@21
  PgSprData *v39; // ebx@21
  NiPointer<PgSprData::PgHitTester> *v40; // edx@21
  unsigned int v41; // ebx@21
  PgFont *v42; // eax@21
  PgWinText *v43; // edi@21
  NiRefObjectVtbl *v44; // ebx@21
  NiUnsharedGeometryGroup *v45; // eax@21
  GTRequestListWin *v46; // eax@21
  void *(__thiscall *v47)(NiRefObject *, unsigned int); // edx@21
  NiNode *v48; // esi@22
  unsigned int uiWidth; // [sp+5Ch] [bp-24h]@15
  unsigned int uiHeight; // [sp+60h] [bp-20h]@15
  int iYOff; // [sp+64h] [bp-1Ch]@10
  int uiLeft; // [sp+68h] [bp-18h]@4
  int uiTop; // [sp+6Ch] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+70h] [bp-10h]@1
  int v55; // [sp+7Ch] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v55 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildMenu.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "GuildTournamentBaseWin", 0) )
  {
    v6 = spNode.m_pObject;
    v55 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = uiTop;
  v9 = uiLeft;
  iYOff = uiTop;
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v8, v11, (PgWin *)&v2->vfptr, 0, 0);
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop, v13, (PgWin *)&v2->vfptr, 0, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinCloseBut::CreateWin(uiLeft - v9, uiTop - iYOff, v14, (PgWin *)&v2->vfptr);
  v15 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, v15);
    PgSprData::Add(v16, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(v16, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v9, uiTop - iYOff, v16, (PgWin *)&v2->vfptr, 4u, 0, 0);
  }
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v18 = Font::Get(0);
    v19 = (int *)PgWinText::CreateWin(uiLeft - v9, uiTop, uiWidth, uiHeight, v18, (PgWin *)&v2->vfptr, 0, 0);
    (*(void (__thiscall **)(int *, signed int))(*v19 + 488))(v19, 1);
    (*(void (__thiscall **)(int *, struct D3DXCOLOR *))(*v19 + 468))(v19, &Color::m_kDxWinTitleColor);
    iYOff = *v19;
    v20 = TextData::Get(0x2D8F829Fu);
    (*(void (__thiscall **)(int *, NiUnsharedGeometryGroup *))(iYOff + 472))(v19, v20);
    (*(void (__thiscall **)(int *, _DWORD))(*v19 + 240))(v19, 0);
    v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
    PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
    PgWinBut::CreateWin(uiLeft - v9, uiTop, v21, (PgWin *)&v2->vfptr, 0, 0, 0);
    v22 = v21->m_akHitTester.m_pBase;
    v23 = v22->m_pObject->m_uiHeight;
    iYOff = v22->m_pObject->m_uiWidth;
    v24 = Font::Get(0);
    v25 = (int *)PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOff, v23, v24, (PgWin *)&v2->vfptr, 0, 0);
    (*(void (__thiscall **)(int *, signed int))(*v25 + 488))(v25, 5);
    iYOff = *v25;
    v26 = TextData::Get(0xDAD8D1E9);
    (*(void (__thiscall **)(int *, NiUnsharedGeometryGroup *))(iYOff + 472))(v25, v26);
    (*(void (__thiscall **)(int *, _DWORD))(*v25 + 240))(v25, 0);
    v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v27, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Click");
    PgSprData::Add(v27, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Over");
    PgWinBut::CreateWin(uiLeft - v9, uiTop, v27, (PgWin *)&v2->vfptr, 3u, 0, 0);
    v28 = v27->m_akHitTester.m_pBase;
    v29 = v28->m_pObject->m_uiHeight;
    iYOff = v28->m_pObject->m_uiWidth;
    v30 = Font::Get(0);
    v31 = (int *)PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOff, v29, v30, (PgWin *)&v2->vfptr, 0, 0);
    (*(void (__thiscall **)(int *, signed int))(*v31 + 488))(v31, 5);
    iYOff = *v31;
    v32 = TextData2::Get(0x76A107E5u);
    (*(void (__thiscall **)(_DWORD, _DWORD))(iYOff + 472))(v31, v32);
    (*(void (__thiscall **)(int *, _DWORD))(*v31 + 240))(v31, 0);
    v33 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v33, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Click");
    PgSprData::Add(v33, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Over");
    PgWinBut::CreateWin(uiLeft - v9, uiTop, v33, (PgWin *)&v2->vfptr, 1u, 0, 0);
    v34 = v33->m_akHitTester.m_pBase;
    v35 = v34->m_pObject->m_uiHeight;
    iYOff = v34->m_pObject->m_uiWidth;
    v36 = Font::Get(0);
    v37 = (int *)PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOff, v35, v36, (PgWin *)&v2->vfptr, 0, 0);
    (*(void (__thiscall **)(int *, signed int))(*v37 + 488))(v37, 5);
    iYOff = *v37;
    v38 = TextData::Get(0x16231A36u);
    (*(void (__thiscall **)(_DWORD, _DWORD))(iYOff + 472))(v37, v38);
    (*(void (__thiscall **)(int *, _DWORD))(*v37 + 240))(v37, 0);
    v39 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn04Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v39, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn04Click");
    PgSprData::Add(v39, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn04Over");
    PgWinBut::CreateWin(uiLeft - v9, uiTop, v39, (PgWin *)&v2->vfptr, 2u, 0, 0);
    v40 = v39->m_akHitTester.m_pBase;
    v41 = v40->m_pObject->m_uiHeight;
    iYOff = v40->m_pObject->m_uiWidth;
    v42 = Font::Get(0);
    v43 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOff, v41, v42, (PgWin *)&v2->vfptr, 0, 0);
    v43->vfptr[122].__vecDelDtor((NiRefObject *)v43, 5u);
    v44 = v43->vfptr;
    v45 = TextData::Get(0xE6D8D434);
    v44[118].__vecDelDtor((NiRefObject *)v43, (unsigned int)v45);
    v43->vfptr[60].__vecDelDtor((NiRefObject *)v43, 0);
    v46 = GTRequestListWin::CreateWin(pkFrameWork);
    v47 = v2->vfptr[59].__vecDelDtor;
    v2->m_pkGTRequestListWin = v46;
    ((void (__thiscall *)(GuildTournamentBaseWin *, unsigned int, unsigned int, _DWORD, _DWORD))v47)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.60000002,
      0.60000002);
    v2->vfptr->SetMsgHooker(&v2->vfptr, &v2->vfptr);
    v55 = -1;
    if ( spNode.m_pObject )
    {
      v48 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v48 )
          v48->vfptr->__vecDelDtor((NiRefObject *)v48, 1u);
      }
    }
    result = 1;
  }
  else
  {
    v17 = spNode.m_pObject;
    v55 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v17 )
      v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005D8BD0) --------------------------------------------------------
void __thiscall GTRequestListWin::OnSearch(GTRequestListWin *this)
{
  GTRequestListWin *v1; // esi@1
  int v2; // edi@2
  char *v3; // eax@2
  int v4; // edi@2
  char v5; // cl@3
  int v6; // eax@4
  SlideBar *v7; // ecx@11
  SlideListWin *v8; // edi@11
  boost::detail::function::any_pointer (__cdecl *v9)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp-Ch] [bp-1Ch]@9
  int v10; // [sp-8h] [bp-18h]@9
  bool (__cdecl *v11)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *); // [sp-4h] [bp-14h]@5
  boost::detail::function::any_pointer (__cdecl **v12)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp+Ch] [bp-4h]@9

  v1 = this;
  if ( !((int (*)(void))this->m_spEdit.m_pObject->vfptr[113].__vecDelDtor)() )
    return;
  v2 = (int)v1->m_acSearchName;
  *(_DWORD *)v2 = 0;
  *(_DWORD *)(v2 + 4) = 0;
  *(_DWORD *)(v2 + 8) = 0;
  *(_DWORD *)(v2 + 12) = 0;
  *(_DWORD *)(v2 + 16) = 0;
  *(_DWORD *)(v2 + 20) = 0;
  *(_DWORD *)(v2 + 24) = 0;
  *(_DWORD *)(v2 + 28) = 0;
  v3 = (char *)((int (*)(void))v1->m_spEdit.m_pObject->vfptr[113].__vecDelDtor)();
  v4 = v1->m_acSearchName - v3;
  do
  {
    v5 = *v3;
    v3[v4] = *v3;
    ++v3;
  }
  while ( v5 );
  v6 = v1->m_iSearchTyepe;
  if ( v6 == 11 )
  {
    v11 = GTRequestListWin::GuildInfo::High_GuildName;
LABEL_8:
    boost::function<bool __cdecl (GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void>>::operator=<bool (__cdecl *)(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &)>(
      (boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *)&v1->m_SortPradicationFunc,
      v11);
    goto LABEL_9;
  }
  if ( v6 == 12 )
  {
    v11 = GTRequestListWin::GuildInfo::High_GuildMasterName;
    goto LABEL_8;
  }
LABEL_9:
  v9 = 0;
  v10 = 0;
  v11 = 0;
  v12 = &v9;
  if ( v1->m_SortPradicationFunc.manager )
  {
    v11 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))v1->m_SortPradicationFunc.invoker;
    v9 = v1->m_SortPradicationFunc.manager;
    v10 = ((int (__cdecl *)(void *, _DWORD))v1->m_SortPradicationFunc.manager)(
            v1->m_SortPradicationFunc.functor.obj_ptr,
            0);
  }
  std::sort<std::_Vector_iterator<std::_Vector_val<GTRequestListWin::GuildInfo,std::allocator<GTRequestListWin::GuildInfo>>>,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(
    (std::_Vector_iterator<std::_Vector_val<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > >)v1->m_vecGuildInfo._Myfirst,
    (std::_Vector_iterator<std::_Vector_val<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > >)v1->m_vecGuildInfo._Mylast,
    *(boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *)&v9);
  v7 = v1->m_pkSlideBarGuild;
  v11 = 0;
  v1->m_bSearchStart = 1;
  SlideBar::SetSplitCnt(v7, (int)v11);
  v1->m_pkGuildLIst->m_nSlideSplitCnt = 0;
  v8 = v1->m_pkGuildLIst;
  v8->m_fCurSlideBtnPos = 0.0;
  v8->m_nViewStartPos = (signed int)((double)v8->m_nSlideSplitCnt * 0.0);
  v1->m_pkGuildLIst->m_nViewStartPos = 0;
  GTRequestListWin::DisplayInfoSetting(v1, 1);
}

//----- (005D8D10) --------------------------------------------------------
void __thiscall GTRequestListWin::OnEditEnd(GTRequestListWin *this, unsigned int wParam, int lParam)
{
  GTRequestListWin *v3; // esi@1
  EditWin *v4; // edi@1
  NiRefObjectVtbl *v5; // ebx@1
  int v6; // eax@1

  v3 = this;
  v4 = this->m_spEdit.m_pObject;
  v5 = v4->vfptr;
  v6 = ((int (__thiscall *)(_DWORD))v4->vfptr[114].__vecDelDtor)(this->m_spEdit.m_pObject);
  v5[115].__vecDelDtor((NiRefObject *)v4, v6);
  ((void (*)(void))v3->m_spEdit.m_pObject->vfptr[120].__vecDelDtor)();
  GTRequestListWin::OnSearch(v3);
}

//----- (005D8D50) --------------------------------------------------------
void __thiscall GTRequestListWin::SetGuildList(GTRequestListWin *this, SHINE_GUILD_LIST_NEW *pkList, unsigned int uiTotalGuild)
{
  GTRequestListWin *v3; // edi@1
  unsigned int v4; // eax@2
  unsigned int v5; // edx@2
  unsigned int v6; // ecx@2
  unsigned int v7; // ecx@2
  unsigned int v8; // edx@2
  unsigned int v9; // eax@2
  unsigned int v10; // ecx@2
  unsigned int v11; // ecx@2
  unsigned int v12; // edx@2
  NiRefObjectVtbl *v13; // esi@3
  char *v14; // eax@3
  char *v15; // eax@3
  GuildListWin::GuildInfo *v16; // esi@5
  GuildListWin::GuildInfo *_First; // ST20_4@5
  unsigned int v18; // edx@5
  GTRequestListWin::GuildInfo kGuildInfo; // [sp+14h] [bp-80h]@1
  char acName[17]; // [sp+58h] [bp-3Ch]@2
  _DWORD acName2[5]; // [sp+6Ch] [bp-28h]@2
  char v22; // [sp+80h] [bp-14h]@2
  int v23; // [sp+90h] [bp-4h]@1

  v3 = this;
  kGuildInfo.m_strGuildName._Myres = 15;
  kGuildInfo.m_strGuildName._Mysize = 0;
  kGuildInfo.m_strGuildName._Bx._Buf[0] = 0;
  kGuildInfo.m_MasterName._Myres = 15;
  kGuildInfo.m_MasterName._Mysize = 0;
  kGuildInfo.m_MasterName._Bx._Buf[0] = 0;
  v23 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &kGuildInfo.m_strGuildName,
    (const char *)&unk_96F8EB,
    0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &kGuildInfo.m_MasterName,
    (const char *)&unk_96F8EB,
    0);
  if ( pkList )
  {
    v4 = pkList->sGuildName.n4_code[2];
    v5 = pkList->sGuildName.n4_code[1];
    *(_DWORD *)acName = pkList->sGuildName.n4_code[0];
    v6 = pkList->sGuildName.n4_code[3];
    *(_DWORD *)&acName[8] = v4;
    *(_DWORD *)&acName[4] = v5;
    *(_DWORD *)&acName[12] = v6;
    acName[16] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kGuildInfo.m_strGuildName,
      acName,
      strlen(acName));
    v7 = pkList->sMasterCharID.n5_code[1];
    v8 = pkList->sMasterCharID.n5_code[2];
    acName2[0] = pkList->sMasterCharID.n5_code[0];
    v9 = pkList->sMasterCharID.n5_code[3];
    acName2[1] = v7;
    v10 = pkList->sMasterCharID.n5_code[4];
    acName2[3] = v9;
    acName2[2] = v8;
    acName2[4] = v10;
    v22 = 0;
    LOBYTE(acName2[4]) = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kGuildInfo.m_MasterName,
      (const char *)acName2,
      strlen((const char *)acName2));
    v11 = pkList->nType;
    v12 = pkList->nMemberCnt;
    kGuildInfo.m_unGuildGrade = pkList->nGrade;
    kGuildInfo.m_unGuildType = v11;
    kGuildInfo.m_unGuildTotalMember = v12;
    if ( uiTotalGuild > 0 )
    {
      v13 = v3->m_pkTotalGuildNum->vfptr;
      v14 = (char *)TextData2::Get(0x3B544247u);
      v15 = fs(v14, uiTotalGuild);
      v13[118].__vecDelDtor((NiRefObject *)v3->m_pkTotalGuildNum, (unsigned int)v15);
    }
    std::vector<GuildAcademySelectWin::GuildInfo,std::allocator<GuildAcademySelectWin::GuildInfo>>::push_back(
      (std::vector<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > *)&v3->m_vecGuildInfo,
      (GuildListWin::GuildInfo *)&kGuildInfo);
    if ( !v3->m_bFirstSort )
    {
      v16 = (GuildListWin::GuildInfo *)v3->m_vecGuildInfo._Mylast;
      _First = (GuildListWin::GuildInfo *)v3->m_vecGuildInfo._Myfirst;
      v18 = (signed int)((unsigned __int64)(2021161081i64 * ((char *)v16 - (char *)_First)) >> 32) >> 5;
      std::_Sort<GTRequestListWin::GuildInfo *,int,bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &)>(
        _First,
        v16,
        v18 + (v18 >> 31),
        GTRequestListWin::GuildInfo::High_GuildName);
      v3->m_bFirstSort = 1;
    }
    GTRequestListWin::DisplayInfoSetting(v3, 0);
  }
  if ( kGuildInfo.m_MasterName._Myres >= 0x10 )
    operator delete(kGuildInfo.m_MasterName._Bx._Ptr);
  kGuildInfo.m_MasterName._Myres = 15;
  kGuildInfo.m_MasterName._Mysize = 0;
  kGuildInfo.m_MasterName._Bx._Buf[0] = 0;
  if ( kGuildInfo.m_strGuildName._Myres >= 0x10 )
    operator delete(kGuildInfo.m_strGuildName._Bx._Ptr);
}

//----- (005D8F50) --------------------------------------------------------
void __thiscall GTRequestListWin::ShowFormerList(GTRequestListWin *this)
{
  void *v1; // eax@1
  GTRequestListWin *v2; // esi@1
  boost::detail::function::any_pointer (__cdecl *v3)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // ebx@1
  int (__cdecl *v4)(boost::detail::function::any_pointer, GuildListWin::GuildInfo *, GuildListWin::GuildInfo *); // ecx@1
  char *v5; // edi@1
  boost::detail::function::any_pointer (__cdecl *v6)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // edx@4
  void *v7; // edx@4
  boost::detail::function::any_pointer (__cdecl *v8)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp-Ch] [bp-28h]@7
  int v9; // [sp-8h] [bp-24h]@7
  bool (__cdecl *v10)(boost::detail::function::any_pointer, GTRequestListWin::GuildInfo *, GTRequestListWin::GuildInfo *); // [sp-4h] [bp-20h]@7
  char v11; // [sp+Ch] [bp-10h]@3
  int (__cdecl *v12)(boost::detail::function::any_pointer, GuildListWin::GuildInfo *, GuildListWin::GuildInfo *); // [sp+14h] [bp-8h]@2
  boost::detail::function::any_pointer (__cdecl **v13)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp+18h] [bp-4h]@7

  v1 = 0;
  v2 = this;
  this->m_bSearchStart = 0;
  *(_DWORD *)&this->m_acSearchName[0] = 0;
  *(_DWORD *)&this->m_acSearchName[4] = 0;
  *(_DWORD *)&this->m_acSearchName[8] = 0;
  *(_DWORD *)&this->m_acSearchName[12] = 0;
  *(_DWORD *)&this->m_acSearchName[16] = 0;
  *(_DWORD *)&this->m_acSearchName[20] = 0;
  v3 = 0;
  v4 = 0;
  *(_DWORD *)&v2->m_acSearchName[24] = 0;
  *(_DWORD *)&v2->m_acSearchName[28] = 0;
  v5 = (char *)&v2->m_SortPradicationFunc;
  if ( GTRequestListWin::GuildInfo::High_GuildName )
  {
    v12 = boost::detail::function::function_invoker2<bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),bool,GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &>::invoke;
    v3 = boost::detail::function::functor_manager<bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>::manage;
    v1 = boost::detail::function::functor_manager<bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>::manage(
           (boost::detail::function::any_pointer)GTRequestListWin::GuildInfo::High_GuildName,
           0).obj_ptr;
    v4 = boost::detail::function::function_invoker2<bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),bool,GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &>::invoke;
  }
  if ( v5 != &v11 )
  {
    v6 = v3;
    v3 = *(boost::detail::function::any_pointer (__cdecl **)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type))v5;
    *(_DWORD *)v5 = v6;
    v7 = v1;
    v1 = v2->m_SortPradicationFunc.functor.obj_ptr;
    v2->m_SortPradicationFunc.functor.obj_ptr = v7;
    v2->m_SortPradicationFunc.invoker = (bool (__cdecl *)(boost::detail::function::any_pointer, GTRequestListWin::GuildInfo *, GTRequestListWin::GuildInfo *))v4;
  }
  if ( v3 )
    ((void (__cdecl *)(void *, signed int))v3)(v1, 1);
  v8 = 0;
  v9 = 0;
  v10 = 0;
  v13 = &v8;
  if ( *(_DWORD *)v5 )
  {
    v10 = v2->m_SortPradicationFunc.invoker;
    v8 = *(boost::detail::function::any_pointer (__cdecl **)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type))v5;
    v9 = (*(int (__cdecl **)(void *, _DWORD))v5)(v2->m_SortPradicationFunc.functor.obj_ptr, 0);
  }
  std::sort<std::_Vector_iterator<std::_Vector_val<GTRequestListWin::GuildInfo,std::allocator<GTRequestListWin::GuildInfo>>>,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(
    (std::_Vector_iterator<std::_Vector_val<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > >)v2->m_vecGuildInfo._Myfirst,
    (std::_Vector_iterator<std::_Vector_val<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > >)v2->m_vecGuildInfo._Mylast,
    *(boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *)&v8);
  GTRequestListWin::DisplayInfoSetting(v2, 0);
}

//----- (005D9040) --------------------------------------------------------
void __thiscall GTRequestListWin::OnCommand(GTRequestListWin *this, unsigned int wParam, int lParam)
{
  GTRequestListWin *v3; // esi@1
  SlideListWin *v4; // edi@23
  boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > v5; // [sp-Ch] [bp-14h]@5
  bool (__cdecl *v6)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *); // [sp-4h] [bp-Ch]@4

  v3 = this;
  switch ( wParam )
  {
    case 1u:
      GTRequestListWin::OnSlideBar(this);
      return;
    case 3u:
      if ( bSGuildName_0 )
      {
        bSGuildName_0 = 0;
        v6 = GuildListWin::GuildInfo::Low_GuildName;
      }
      else
      {
        bSGuildName_0 = 1;
        v6 = GTRequestListWin::GuildInfo::High_GuildName;
      }
      goto LABEL_5;
    case 4u:
      if ( bSMasterName_0 )
      {
        bSMasterName_0 = 0;
        v6 = GTRequestListWin::GuildInfo::Low_GuildMasterName;
      }
      else
      {
        bSMasterName_0 = 1;
        v6 = GTRequestListWin::GuildInfo::High_GuildMasterName;
      }
      goto LABEL_5;
    case 5u:
      if ( bSGuildType_0 )
      {
        bSGuildType_0 = 0;
        v6 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))GuildListWin::GuildInfo::Low_GuildType;
      }
      else
      {
        bSGuildType_0 = 1;
        v6 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))GuildListWin::GuildInfo::High_GuildType;
      }
      goto LABEL_5;
    case 6u:
      if ( bSGuildGrade_0 )
      {
        bSGuildGrade_0 = 0;
        v6 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))GuildListWin::GuildInfo::Low_GuildGrade;
      }
      else
      {
        bSGuildGrade_0 = 1;
        v6 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))GTRequestListWin::GuildInfo::High_GuildGrade;
      }
      goto LABEL_5;
    case 7u:
      if ( bSTotalMember_0 )
      {
        bSTotalMember_0 = 0;
        v6 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))GTRequestListWin::GuildInfo::Low_GuildTotalMember;
      }
      else
      {
        bSTotalMember_0 = 1;
        v6 = (bool (__cdecl *)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))GTRequestListWin::GuildInfo::High_GuildTotalMember;
      }
LABEL_5:
      boost::function<bool __cdecl (GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void>>::operator=<bool (__cdecl *)(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &)>(
        (boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *)&this->m_SortPradicationFunc,
        v6);
      boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>(
        &v5,
        (boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *)&v3->m_SortPradicationFunc);
      std::sort<std::_Vector_iterator<std::_Vector_val<GTRequestListWin::GuildInfo,std::allocator<GTRequestListWin::GuildInfo>>>,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(
        (std::_Vector_iterator<std::_Vector_val<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > >)v3->m_vecGuildInfo._Myfirst,
        (std::_Vector_iterator<std::_Vector_val<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > >)v3->m_vecGuildInfo._Mylast,
        v5);
      if ( v3->m_bSearchStart )
        GTRequestListWin::DisplayInfoSetting(v3, 1);
      else
        GTRequestListWin::DisplayInfoSetting(v3, 0);
      break;
    case 8u:
      GTRequestListWin::OnSearchChoice(this);
      break;
    case 9u:
      GTRequestListWin::OnSearch(this);
      break;
    case 0xAu:
      this->m_bSearchStart = 0;
      *(_DWORD *)&this->m_acSearchName[0] = 0;
      *(_DWORD *)&this->m_acSearchName[4] = 0;
      *(_DWORD *)&this->m_acSearchName[8] = 0;
      *(_DWORD *)&this->m_acSearchName[12] = 0;
      *(_DWORD *)&this->m_acSearchName[16] = 0;
      *(_DWORD *)&this->m_acSearchName[20] = 0;
      *(_DWORD *)&this->m_acSearchName[24] = 0;
      *(_DWORD *)&this->m_acSearchName[28] = 0;
      SlideBar::SetSplitCnt(this->m_pkSlideBarGuild, 0);
      v3->m_pkGuildLIst->m_nSlideSplitCnt = 0;
      v4 = v3->m_pkGuildLIst;
      v4->m_fCurSlideBtnPos = 0.0;
      v4->m_nViewStartPos = (signed int)((double)v4->m_nSlideSplitCnt * 0.0);
      v3->m_pkGuildLIst->m_nViewStartPos = 0;
      GTRequestListWin::ShowFormerList(v3);
      break;
    case 0xDu:
      GTRequestListWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (005D9280) --------------------------------------------------------
char __thiscall GTRequestListWin::Create(GTRequestListWin *this, PgFrameWork *pkFrameWork)
{
  GTRequestListWin *v2; // esi@1
  char result; // al@6
  NiTexturePalette *v4; // ebx@7
  const char *v5; // eax@9
  PgSprData *v6; // eax@10
  NiNode *v7; // esi@11
  int v8; // edi@16
  int v9; // ebx@16
  NiSourceTexture *v10; // eax@16
  PgSprData *v11; // eax@17
  PgSprData *v12; // eax@21
  PgWinSpr *v13; // eax@21
  PgFont *v14; // eax@23
  PopupMenu *v15; // eax@23
  NiRefObjectVtbl *v16; // edx@23
  NiUnsharedGeometryGroup *v17; // eax@23
  PgSprData *v18; // eax@23
  SLWCreateInfo::Item *v19; // eax@23
  PopupMenu *v20; // eax@23
  PopupMenu *v21; // eax@23
  PopupMenu *v22; // eax@23
  PopupMenu *v23; // eax@23
  PopupMenu *v24; // eax@23
  PopupMenu *v25; // eax@23
  PopupMenu *v26; // eax@23
  PgSprData *v27; // eax@23
  SlideListWin *v28; // eax@23
  PgSprData *v29; // eax@23
  SlideBar *v30; // eax@23
  PopupMenu *v31; // eax@23
  unsigned int v32; // ecx@23
  int (*v33)(void); // eax@23
  int v34; // eax@23
  int v35; // eax@23
  int v36; // eax@23
  PopupMenu *v37; // edx@23
  PgFont *v38; // eax@23
  PopupMenu *v39; // eax@23
  NiRefObjectVtbl *v40; // edx@23
  NiUnsharedGeometryGroup *v41; // eax@23
  float v42; // ecx@23
  PopupMenu *v43; // eax@23
  PgFont *v44; // eax@23
  PopupMenu *v45; // eax@23
  NiRefObjectVtbl *v46; // edx@23
  NiUnsharedGeometryGroup *v47; // eax@23
  float v48; // ecx@23
  PopupMenu *v49; // eax@23
  PgFont *v50; // eax@23
  PopupMenu *v51; // eax@23
  NiRefObjectVtbl *v52; // edx@23
  NiUnsharedGeometryGroup *v53; // eax@23
  float v54; // ecx@23
  PopupMenu *v55; // eax@23
  PgFont *v56; // eax@23
  PopupMenu *v57; // eax@23
  NiRefObjectVtbl *v58; // edx@23
  NiUnsharedGeometryGroup *v59; // eax@23
  float v60; // ecx@23
  PopupMenu *v61; // eax@23
  PgFont *v62; // eax@23
  NiUnsharedGeometryGroup *v63; // eax@23
  float v64; // ecx@23
  PopupMenu *v65; // eax@23
  PgFont *v66; // eax@23
  PopupMenu *v67; // eax@23
  NiRefObjectVtbl *v68; // edx@23
  NiUnsharedGeometryGroup *v69; // eax@23
  float v70; // ecx@23
  PopupMenu *v71; // eax@23
  PgFont *v72; // eax@23
  PgWinText *v73; // eax@23
  int v74; // eax@23
  PopupMenu *v75; // edx@23
  PgFont *v76; // eax@23
  PgWinText *v77; // eax@23
  NiUnsharedGeometryGroup *v78; // eax@23
  PgSprData *v79; // eax@23
  EditWin *v80; // eax@23
  NiSourceTexture *v81; // eax@23
  PopupMenuWin *v82; // eax@23
  char *v83; // eax@23
  char *v84; // eax@23
  int v85; // eax@23
  NiSourceTexture *v86; // edx@23
  PgFont *v87; // eax@23
  PgWinText *v88; // edi@23
  NiRefObjectVtbl *v89; // ebx@23
  NiUnsharedGeometryGroup *v90; // eax@23
  SLWCreateInfo kCreateInfo; // [sp+ACh] [bp-68h]@23
  unsigned int uiHeight; // [sp+C8h] [bp-4Ch]@21
  unsigned int uiWidth; // [sp+CCh] [bp-48h]@21
  NiSourceTexture *pkTexture; // [sp+D0h] [bp-44h]@1
  unsigned int v95; // [sp+D4h] [bp-40h]@23
  int uiTop; // [sp+D8h] [bp-3Ch]@10
  int uiLeft; // [sp+DCh] [bp-38h]@10
  NiPointer<NiNode> spNode; // [sp+E0h] [bp-34h]@1
  PopupMenu *pkMenu; // [sp+E4h] [bp-30h]@19
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+E8h] [bp-2Ch]@23
  int v101; // [sp+110h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v101 = 0;
  pkTexture = MenuTexMgr::GetTexture(4u);
  if ( !pkTexture )
  {
    v101 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( spNode.m_pObject )
        spNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spNode.m_pObject, 1u);
    }
    return 0;
  }
  v4 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildList.nif");
  PgUtil::LoadNodeNifFile(v5, &spNode, v4);
  if ( !spNode.m_pObject )
    return 0;
  v6 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v6, 0, pkFrameWork, "GuildListWin", 0) )
  {
    v8 = uiLeft;
    v9 = uiTop;
    v10 = MenuTexMgr::GetTexture(0x13u);
    if ( v10 )
      v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
    else
      v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v11, (PgWin *)&v2->vfptr, 0, 0);
    pkMenu = (PopupMenu *)PgSprData::Create(
                            (NiAVObject *)&spNode.m_pObject->vfptr,
                            "ClsNor",
                            &uiLeft,
                            &uiTop,
                            pkTexture);
    PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
    PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
    PgWinCloseBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkMenu, (PgWin *)&v2->vfptr);
    pkMenu = (PopupMenu *)MenuTexMgr::GetTexture(4u);
    if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
    {
      pkMenu = (PopupMenu *)PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "HelpLinkNor",
                              &uiLeft,
                              &uiTop,
                              (NiSourceTexture *)pkMenu);
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
      PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkMenu, (PgWin *)&v2->vfptr, 0xDu, 0, 0);
    }
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
    v13 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v12, (PgWin *)&v2->vfptr, 0, 0);
    v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
    if ( PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "WinTitle",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight) )
    {
      v14 = Font::Get(MAIN_MENU);
      v15 = (PopupMenu *)PgWinText::CreateWin(
                           uiLeft - v8,
                           uiTop - v9 + 2,
                           uiWidth,
                           uiHeight,
                           v14,
                           (PgWin *)&v2->vfptr,
                           0,
                           0);
      v16 = v15->vfptr;
      pkMenu = v15;
      v16[122].__vecDelDtor((NiRefObject *)v15, 5u);
      ((void (__stdcall *)(struct D3DXCOLOR *))pkMenu->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
      v95 = (unsigned int)pkMenu->vfptr;
      v17 = TextData2::Get(0x2C5335A1u);
      (*(void (__thiscall **)(PopupMenu *, NiUnsharedGeometryGroup *))(v95 + 472))(pkMenu, v17);
      ((void (__stdcall *)(_DWORD))pkMenu->vfptr[60].__vecDelDtor)(0);
      v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, pkTexture);
      PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v18, (PgWin *)&v2->vfptr, 0, 0);
      kCreateInfo.m_arrItem._Myfirst = 0;
      kCreateInfo.m_arrItem._Mylast = 0;
      kCreateInfo.m_arrItem._Myend = 0;
      kCreateInfo.m_bMakeData = 0;
      kCreateInfo.m_nOffX = 0;
      kCreateInfo.m_nOffY = 0;
      LOBYTE(v101) = 1;
      v19 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
      v19->nItemType = 1;
      v19->pNode = spNode.m_pObject;
      pkMenu = (PopupMenu *)v19;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "ColumnBarNor");
      LOBYTE(v101) = 2;
      pkMenu = (PopupMenu *)((char *)pkMenu + 72);
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkMenu,
        &_Val);
      LOBYTE(v101) = 1;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "ColumnBarClick");
      LOBYTE(v101) = 3;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkMenu,
        &_Val);
      LOBYTE(v101) = 1;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "ColumnBarOver");
      LOBYTE(v101) = 4;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkMenu,
        &_Val);
      LOBYTE(v101) = 1;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      v20 = (PopupMenu *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkMenu = v20;
      v20->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column01");
      LOBYTE(v101) = 5;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkMenu->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v101) = 1;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      pkMenu->m_uiRefCount = (unsigned int)spNode.m_pObject;
      v21 = (PopupMenu *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkMenu = v21;
      v21->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column02");
      LOBYTE(v101) = 6;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkMenu->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v101) = 1;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      v22 = pkMenu;
      pkMenu->m_uiRefCount = (unsigned int)spNode.m_pObject;
      LOBYTE(v22->m_kLocal.m_Translate.x) = 1;
      v23 = (PopupMenu *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkMenu = v23;
      v23->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column03");
      LOBYTE(v101) = 7;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkMenu->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v101) = 1;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      pkMenu->m_uiRefCount = (unsigned int)spNode.m_pObject;
      v24 = (PopupMenu *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkMenu = v24;
      v24->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column04");
      LOBYTE(v101) = 8;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkMenu->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v101) = 1;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      pkMenu->m_uiRefCount = (unsigned int)spNode.m_pObject;
      v25 = (PopupMenu *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkMenu = v25;
      v25->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column05");
      LOBYTE(v101) = 9;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkMenu->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v101) = 1;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      pkMenu->m_uiRefCount = (unsigned int)spNode.m_pObject;
      v26 = (PopupMenu *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkMenu = v26;
      v26->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column06");
      LOBYTE(v101) = 10;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkMenu->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v101) = 1;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      pkMenu->m_uiRefCount = (unsigned int)spNode.m_pObject;
      kCreateInfo.m_nOffX = 6;
      kCreateInfo.m_nOffY = 0;
      SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
      v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SubText01", &uiLeft, &uiTop, pkTexture);
      v28 = SlideListWin::CreateWin(uiLeft - v8, uiTop - v9, v27, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
      v2->m_pkGuildLIst = v28;
      SlideListWin::UpdateViewList(v28);
      v29 = PgSprData::Create(
              (NiAVObject *)&spNode.m_pObject->vfptr,
              "SlideBar_SlideBtnMiddle",
              &uiLeft,
              &uiTop,
              pkTexture);
      v30 = SlideBar::CreateWin(
              spNode.m_pObject,
              "SlideBar",
              "SlideBar_UpBtn",
              "SlideBar_DnBtn",
              v29,
              0,
              (PgWin *)&v2->vfptr);
      v2->m_pkSlideBarGuild = v30;
      v30->m_uiClickMsg = 1;
      v2->m_pkSlideBarGuild->m_eType = 1;
      v31 = (PopupMenu *)v2->m_pkSlideBarGuild->vfptr;
      v32 = (unsigned int)v2->m_pkSlideBarGuild;
      pkMenu = v31;
      v33 = (int (*)(void))v31->m_kPropertyList.m_kAllocator.m_uiCount;
      v95 = v32;
      v34 = v33();
      v35 = (*(int (__stdcall **)(int))(*(_DWORD *)v95 + 164))(v34);
      ((void (__thiscall *)(SlideBar *, int))pkMenu->m_eButShow)(v2->m_pkSlideBarGuild, v35 - 18);
      pkMenu = (PopupMenu *)PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "Title01Nor",
                              &uiLeft,
                              &uiTop,
                              pkTexture);
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Title01Click");
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Title01Over");
      PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkMenu, (PgWin *)&v2->vfptr, 2u, 0, 0);
      v36 = *(_DWORD *)LODWORD(pkMenu->m_kWorldBound.m_kCenter.x);
      v37 = *(PopupMenu **)(v36 + 20);
      v95 = *(_DWORD *)(v36 + 24);
      pkMenu = v37;
      v38 = Font::Get(MAIN_MENU);
      v39 = (PopupMenu *)PgWinText::CreateWin(
                           uiLeft - v8,
                           uiTop - v9 + 1,
                           (unsigned int)pkMenu,
                           v95,
                           v38,
                           (PgWin *)&v2->vfptr,
                           0,
                           0);
      v40 = v39->vfptr;
      pkMenu = v39;
      v40[122].__vecDelDtor((NiRefObject *)v39, 5u);
      v95 = (unsigned int)pkMenu->vfptr;
      v41 = TextData2::Get(0x26B17C8Fu);
      (*(void (__thiscall **)(PopupMenu *, NiUnsharedGeometryGroup *))(v95 + 472))(pkMenu, v41);
      ((void (__stdcall *)(_DWORD))pkMenu->vfptr[60].__vecDelDtor)(0);
      pkMenu = (PopupMenu *)PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "Title02Nor",
                              &uiLeft,
                              &uiTop,
                              pkTexture);
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Title02Click");
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Title02Over");
      PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkMenu, (PgWin *)&v2->vfptr, 3u, 0, 0);
      v42 = pkMenu->m_kWorldBound.m_kCenter.x;
      v43 = *(PopupMenu **)(*(_DWORD *)LODWORD(v42) + 20);
      v95 = *(_DWORD *)(*(_DWORD *)LODWORD(v42) + 24);
      pkMenu = v43;
      v44 = Font::Get(MAIN_MENU);
      v45 = (PopupMenu *)PgWinText::CreateWin(
                           uiLeft - v8,
                           uiTop - v9 + 1,
                           (unsigned int)pkMenu,
                           v95,
                           v44,
                           (PgWin *)&v2->vfptr,
                           0,
                           0);
      v46 = v45->vfptr;
      pkMenu = v45;
      v46[122].__vecDelDtor((NiRefObject *)v45, 5u);
      v95 = (unsigned int)pkMenu->vfptr;
      v47 = TextData2::Get(0xD90AE9EE);
      (*(void (__thiscall **)(_DWORD, _DWORD))(v95 + 472))(pkMenu, v47);
      ((void (__stdcall *)(_DWORD))pkMenu->vfptr[60].__vecDelDtor)(0);
      pkMenu = (PopupMenu *)PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "Title03Nor",
                              &uiLeft,
                              &uiTop,
                              pkTexture);
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Title03Click");
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Title03Over");
      PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkMenu, (PgWin *)&v2->vfptr, 4u, 0, 0);
      v48 = pkMenu->m_kWorldBound.m_kCenter.x;
      v49 = *(PopupMenu **)(*(_DWORD *)LODWORD(v48) + 20);
      v95 = *(_DWORD *)(*(_DWORD *)LODWORD(v48) + 24);
      pkMenu = v49;
      v50 = Font::Get(MAIN_MENU);
      v51 = (PopupMenu *)PgWinText::CreateWin(
                           uiLeft - v8,
                           uiTop - v9 + 1,
                           (unsigned int)pkMenu,
                           v95,
                           v50,
                           (PgWin *)&v2->vfptr,
                           0,
                           0);
      v52 = v51->vfptr;
      pkMenu = v51;
      v52[122].__vecDelDtor((NiRefObject *)v51, 5u);
      v95 = (unsigned int)pkMenu->vfptr;
      v53 = TextData2::Get(0xE012F32C);
      (*(void (__thiscall **)(_DWORD, _DWORD))(v95 + 472))(pkMenu, v53);
      ((void (__stdcall *)(_DWORD))pkMenu->vfptr[60].__vecDelDtor)(0);
      pkMenu = (PopupMenu *)PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "Title04Nor",
                              &uiLeft,
                              &uiTop,
                              pkTexture);
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Title04Click");
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Title04Over");
      PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkMenu, (PgWin *)&v2->vfptr, 5u, 0, 0);
      v54 = pkMenu->m_kWorldBound.m_kCenter.x;
      v55 = *(PopupMenu **)(*(_DWORD *)LODWORD(v54) + 20);
      v95 = *(_DWORD *)(*(_DWORD *)LODWORD(v54) + 24);
      pkMenu = v55;
      v56 = Font::Get(MAIN_MENU);
      v57 = (PopupMenu *)PgWinText::CreateWin(
                           uiLeft - v8,
                           uiTop - v9 + 1,
                           (unsigned int)pkMenu,
                           v95,
                           v56,
                           (PgWin *)&v2->vfptr,
                           0,
                           0);
      v58 = v57->vfptr;
      pkMenu = v57;
      v58[122].__vecDelDtor((NiRefObject *)v57, 5u);
      v95 = (unsigned int)pkMenu->vfptr;
      v59 = TextData2::Get(0x29633D92u);
      (*(void (__thiscall **)(_DWORD, _DWORD))(v95 + 472))(pkMenu, v59);
      ((void (__stdcall *)(_DWORD))pkMenu->vfptr[60].__vecDelDtor)(0);
      pkMenu = (PopupMenu *)PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "Title05Nor",
                              &uiLeft,
                              &uiTop,
                              pkTexture);
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Title05Click");
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Title05Over");
      PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkMenu, (PgWin *)&v2->vfptr, 6u, 0, 0);
      v60 = pkMenu->m_kWorldBound.m_kCenter.x;
      v61 = *(PopupMenu **)(*(_DWORD *)LODWORD(v60) + 20);
      v95 = *(_DWORD *)(*(_DWORD *)LODWORD(v60) + 24);
      pkMenu = v61;
      v62 = Font::Get(MAIN_MENU);
      pkMenu = (PopupMenu *)PgWinText::CreateWin(
                              uiLeft - v8,
                              uiTop - v9 + 1,
                              (unsigned int)pkMenu,
                              v95,
                              v62,
                              (PgWin *)&v2->vfptr,
                              0,
                              0);
      pkMenu->vfptr[122].__vecDelDtor((NiRefObject *)pkMenu, 5u);
      v95 = (unsigned int)pkMenu->vfptr;
      v63 = TextData::Get(0x88C9DFD4);
      (*(void (__thiscall **)(_DWORD, _DWORD))(v95 + 472))(pkMenu, v63);
      ((void (__stdcall *)(_DWORD))pkMenu->vfptr[60].__vecDelDtor)(0);
      pkMenu = (PopupMenu *)PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "Title06Nor",
                              &uiLeft,
                              &uiTop,
                              pkTexture);
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Title06Click");
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Title06Over");
      PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkMenu, (PgWin *)&v2->vfptr, 7u, 0, 0);
      v64 = pkMenu->m_kWorldBound.m_kCenter.x;
      v65 = *(PopupMenu **)(*(_DWORD *)LODWORD(v64) + 20);
      v95 = *(_DWORD *)(*(_DWORD *)LODWORD(v64) + 24);
      pkMenu = v65;
      v66 = Font::Get(MAIN_MENU);
      v67 = (PopupMenu *)PgWinText::CreateWin(
                           uiLeft - v8,
                           uiTop - v9 + 1,
                           (unsigned int)pkMenu,
                           v95,
                           v66,
                           (PgWin *)&v2->vfptr,
                           0,
                           0);
      v68 = v67->vfptr;
      pkMenu = v67;
      v68[122].__vecDelDtor((NiRefObject *)v67, 5u);
      v95 = (unsigned int)pkMenu->vfptr;
      v69 = TextData2::Get(0xBFFAD625);
      (*(void (__thiscall **)(_DWORD, _DWORD))(v95 + 472))(pkMenu, v69);
      ((void (__stdcall *)(_DWORD))pkMenu->vfptr[60].__vecDelDtor)(0);
      pkMenu = (PopupMenu *)PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "Count_total",
                              &uiLeft,
                              &uiTop,
                              pkTexture);
      PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkMenu, (PgWin *)&v2->vfptr, 0, 0);
      v70 = pkMenu->m_kWorldBound.m_kCenter.x;
      v71 = *(PopupMenu **)(*(_DWORD *)LODWORD(v70) + 20);
      v95 = *(_DWORD *)(*(_DWORD *)LODWORD(v70) + 24);
      pkMenu = v71;
      v72 = Font::Get(MAIN_MENU);
      v73 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9 + 1, (unsigned int)pkMenu, v95, v72, (PgWin *)&v2->vfptr, 0, 0);
      v2->m_pkTotalGuildNum = v73;
      v73->vfptr[122].__vecDelDtor((NiRefObject *)v73, 5u);
      ((void (__stdcall *)(void *))v2->m_pkTotalGuildNum->vfptr[118].__vecDelDtor)(&unk_9AF92F);
      ((void (__stdcall *)(_DWORD))v2->m_pkTotalGuildNum->vfptr[60].__vecDelDtor)(0);
      pkMenu = (PopupMenu *)PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "SearchChoiceNor",
                              &uiLeft,
                              &uiTop,
                              pkTexture);
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "SearchChoiceClick");
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "SearchChoiceOver");
      PgWinBut::CreateWin(uiLeft, uiTop, (PgSprData *)pkMenu, (PgWin *)&v2->vfptr, 8u, 0, 0);
      v74 = *(_DWORD *)LODWORD(pkMenu->m_kWorldBound.m_kCenter.x);
      v75 = *(PopupMenu **)(v74 + 20);
      v95 = *(_DWORD *)(v74 + 24);
      pkMenu = v75;
      v76 = Font::Get(0);
      v77 = PgWinText::CreateWin(uiLeft, uiTop + 1, (unsigned int)pkMenu, v95, v76, (PgWin *)&v2->vfptr, 0, 0);
      v2->m_pkSearchType = v77;
      v77->vfptr[122].__vecDelDtor((NiRefObject *)v77, 5u);
      v95 = (unsigned int)v2->m_pkSearchType->vfptr;
      v78 = TextData2::Get(0xD90AE9EE);
      (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v95 + 472))(v2->m_pkSearchType, v78);
      ((void (__stdcall *)(_DWORD))v2->m_pkSearchType->vfptr[60].__vecDelDtor)(0);
      v79 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Search_Input", &uiLeft, &uiTop, pkTexture);
      PgWinSpr::CreateWin(uiLeft, uiTop, v79, (PgWin *)&v2->vfptr, 0, 0);
      v80 = EditWin::CreateWin(uiLeft, uiTop + 2, uiWidth, uiHeight, (PgWin *)&v2->vfptr, NORMAL, 0x10u, 1u, 1, 0, 1);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spEdit, (NiD3DDefaultShader *)v80);
      EditWin::SetImeStatus(v2->m_spEdit.m_pObject, IS_KOREAN);
      pkMenu = (PopupMenu *)PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "SearchNor",
                              &uiLeft,
                              &uiTop,
                              pkTexture);
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "SearchClick");
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "SearchOver");
      PgWinBut::CreateWin(uiLeft, uiTop, (PgSprData *)pkMenu, (PgWin *)&v2->vfptr, 9u, 0, 0);
      v81 = MenuTexMgr::GetTexture(1u);
      v82 = PopupMenuWin::CreateWin(v81, 4u, 4u, 0);
      v2->m_spPopupMenu = v82;
      ((void (__stdcall *)(IDirectMessengerVtbl **))v82->vfptr->SetMsgHooker)(&v2->vfptr);
      PopupMenuWin::Clear(v2->m_spPopupMenu);
      v83 = (char *)TextData2::Get(0xD90AE9EE);
      pkMenu = (PopupMenu *)PopupMenuText::CreateWin(v83, 0, 0, 0, 0, 0, 0);
      PopupMenu::SetClickEvent(pkMenu, 74, 0);
      PopupMenuWin::AddMenu(v2->m_spPopupMenu, v8, pkMenu);
      v84 = (char *)TextData2::Get(0xE012F32C);
      pkMenu = (PopupMenu *)PopupMenuText::CreateWin(v84, 0, 0, 0, 0, 0, 0);
      PopupMenu::SetClickEvent(pkMenu, 75, 0);
      PopupMenuWin::AddMenu(v2->m_spPopupMenu, v8, pkMenu);
      PopupMenuWin::FinishMenu(v2->m_spPopupMenu, 0);
      ((void (__stdcall *)(_DWORD))v2->m_spPopupMenu->vfptr[64].__vecDelDtor)(0);
      pkMenu = (PopupMenu *)PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "Btn01Nor",
                              &uiLeft,
                              &uiTop,
                              pkTexture);
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
      PgSprData::Add((PgSprData *)pkMenu, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
      PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkMenu, (PgWin *)&v2->vfptr, 0xAu, 0, 0);
      v85 = *(_DWORD *)LODWORD(pkMenu->m_kWorldBound.m_kCenter.x);
      v86 = *(NiSourceTexture **)(v85 + 20);
      v95 = *(_DWORD *)(v85 + 24);
      pkTexture = v86;
      v87 = Font::Get(MAIN_MENU);
      v88 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9, (unsigned int)pkTexture, v95, v87, (PgWin *)&v2->vfptr, 0, 0);
      v88->vfptr[122].__vecDelDtor((NiRefObject *)v88, 5u);
      v89 = v88->vfptr;
      v90 = TextData2::Get(0x4A8E7A8Au);
      v89[118].__vecDelDtor((NiRefObject *)v88, (unsigned int)v90);
      v88->vfptr[60].__vecDelDtor((NiRefObject *)v88, 0);
      ((void (__thiscall *)(GTRequestListWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
        v2,
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        0.5,
        0.5);
      LOBYTE(v101) = 0;
      SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
      v101 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 1;
    }
    else
    {
      v101 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 0;
    }
  }
  else
  {
    v7 = spNode.m_pObject;
    v101 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005DA330) --------------------------------------------------------
GuildTournamentBaseWin *__thiscall GuildTournamentBaseWin::`vector deleting destructor'(GuildTournamentBaseWin *this, unsigned int a2)
{
  GuildTournamentBaseWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildTournamentBaseWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildTournamentBaseWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9AFDDC: using guessed type void (__thiscall *GuildTournamentBaseWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9AFDFC: using guessed type int (__thiscall *GuildTournamentBaseWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005DA370) --------------------------------------------------------
bool __cdecl GTRequestListWin::GuildInfo::Low_GuildMasterName(GuildListWin::GuildInfo *lhw, GuildListWin::GuildInfo *rhw)
{
  char *v2; // eax@1

  v2 = rhw->m_MasterName._Bx._Buf;
  if ( rhw->m_MasterName._Myres >= 0x10 )
    v2 = *(char **)v2;
  return std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
           &lhw->m_MasterName,
           0,
           lhw->m_MasterName._Mysize,
           v2,
           rhw->m_MasterName._Mysize) < 0;
}

//----- (005DA3A0) --------------------------------------------------------
bool __cdecl GTRequestListWin::GuildInfo::High_GuildName(GuildListWin::GuildInfo *lhw, GuildListWin::GuildInfo *rhw)
{
  const char *v2; // eax@1

  v2 = (const char *)lhw;
  if ( lhw->m_strGuildName._Myres >= 0x10 )
    v2 = lhw->m_strGuildName._Bx._Ptr;
  return std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
           &rhw->m_strGuildName,
           0,
           rhw->m_strGuildName._Mysize,
           v2,
           lhw->m_strGuildName._Mysize) < 0;
}

//----- (005DA3D0) --------------------------------------------------------
bool __cdecl GTRequestListWin::GuildInfo::High_GuildMasterName(GuildListWin::GuildInfo *lhw, GuildListWin::GuildInfo *rhw)
{
  char *v2; // eax@1

  v2 = lhw->m_MasterName._Bx._Buf;
  if ( lhw->m_MasterName._Myres >= 0x10 )
    v2 = *(char **)v2;
  return std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
           &rhw->m_MasterName,
           0,
           rhw->m_MasterName._Mysize,
           v2,
           lhw->m_MasterName._Mysize) < 0;
}

//----- (005DA400) --------------------------------------------------------
boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *__thiscall boost::function<bool __cdecl (GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void>>::operator=<bool (__cdecl *)(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &)>(boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *this, bool (__cdecl *f)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))
{
  boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *v2; // esi@1
  void *v3; // eax@1
  boost::detail::function::any_pointer (__cdecl *v4)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // edi@1
  int (__cdecl *v5)(boost::detail::function::any_pointer, GuildListWin::GuildInfo *, GuildListWin::GuildInfo *); // ebx@1
  boost::detail::function::any_pointer (__cdecl *v6)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // ecx@4
  void *v7; // ecx@4
  char v9; // [sp+Ch] [bp-10h]@3

  v2 = this;
  v3 = 0;
  v4 = 0;
  v5 = 0;
  if ( f )
  {
    v5 = boost::detail::function::function_invoker2<bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),bool,GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &>::invoke;
    v4 = boost::detail::function::functor_manager<bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>::manage;
    v3 = boost::detail::function::functor_manager<bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>::manage(
           (boost::detail::function::any_pointer)f,
           0).obj_ptr;
  }
  if ( (char *)v2 != &v9 )
  {
    v6 = v4;
    v4 = v2->manager;
    v2->manager = v6;
    v7 = v3;
    v3 = v2->functor.obj_ptr;
    v2->functor.obj_ptr = v7;
    v2->invoker = (bool (__cdecl *)(boost::detail::function::any_pointer, GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))v5;
  }
  if ( v4 )
    ((void (__cdecl *)(void *, signed int))v4)(v3, 1);
  return v2;
}

//----- (005DA470) --------------------------------------------------------
void __cdecl std::_Push_heap<GTRequestListWin::GuildInfo *,int,GTRequestListWin::GuildInfo,bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &)>(GuildListWin::GuildInfo *_First, int _Hole, int _Top, GuildListWin::GuildInfo *_Val, bool (__cdecl *_Pred)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))
{
  int v5; // edi@1
  int i; // ebx@1
  GuildListWin::GuildInfo *v7; // esi@2
  GuildListWin::GuildInfo *v8; // edi@3
  GuildListWin::GuildInfo *v9; // esi@4

  v5 = _Hole;
  for ( i = (_Hole - 1) / 2; _Top < v5; i = (i - 1) / 2 )
  {
    v7 = &_First[i];
    if ( !_Pred(&_First[i], _Val) )
      break;
    v8 = &_First[v5];
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v8->m_strGuildName,
      &v7->m_strGuildName,
      0,
      0xFFFFFFFF);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v8->m_MasterName,
      &v7->m_MasterName,
      0,
      0xFFFFFFFF);
    v8->m_unGuildType = v7->m_unGuildType;
    v8->m_unGuildGrade = v7->m_unGuildGrade;
    v8->m_unGuildTotalMember = v7->m_unGuildTotalMember;
    v5 = i;
  }
  v9 = &_First[v5];
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &v9->m_strGuildName,
    &_Val->m_strGuildName,
    0,
    0xFFFFFFFF);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &v9->m_MasterName,
    &_Val->m_MasterName,
    0,
    0xFFFFFFFF);
  v9->m_unGuildType = _Val->m_unGuildType;
  v9->m_unGuildGrade = _Val->m_unGuildGrade;
  v9->m_unGuildTotalMember = _Val->m_unGuildTotalMember;
}

//----- (005DA540) --------------------------------------------------------
void __cdecl std::_Adjust_heap<GuildListWin::GuildInfo *,int,GuildListWin::GuildInfo,bool (__cdecl *)(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &)>(GuildListWin::GuildInfo *_First, int _Hole, int _Bottom, GuildListWin::GuildInfo *_Val, bool (__cdecl *_Pred)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))
{
  int v5; // ebx@1
  int v6; // edi@1
  int v7; // esi@1
  bool v8; // zf@1
  GuildListWin::GuildInfo *v9; // edi@4
  GuildListWin::GuildInfo *v10; // ebx@4
  GuildListWin::GuildInfo *v11; // esi@7
  GuildListWin::GuildInfo *v12; // ebx@7

  v5 = _Hole;
  v6 = _Bottom;
  v7 = 2 * _Hole + 2;
  v8 = v7 == _Bottom;
  if ( v7 < _Bottom )
  {
    do
    {
      if ( _Pred(&_First[v7], &_First[v7 - 1]) )
        --v7;
      v9 = &_First[v7];
      v10 = &_First[v5];
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v10->m_strGuildName,
        &v9->m_strGuildName,
        0,
        0xFFFFFFFF);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v10->m_MasterName,
        &v9->m_MasterName,
        0,
        0xFFFFFFFF);
      v10->m_unGuildType = v9->m_unGuildType;
      v10->m_unGuildGrade = v9->m_unGuildGrade;
      v10->m_unGuildTotalMember = v9->m_unGuildTotalMember;
      v5 = v7;
      v7 = 2 * v7 + 2;
    }
    while ( v7 < _Bottom );
    v6 = _Bottom;
    v8 = v7 == _Bottom;
  }
  if ( v8 )
  {
    v11 = &_First[v6 - 1];
    v12 = &_First[v5];
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v12->m_strGuildName,
      &v11->m_strGuildName,
      0,
      0xFFFFFFFF);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v12->m_MasterName,
      &v11->m_MasterName,
      0,
      0xFFFFFFFF);
    v12->m_unGuildType = v11->m_unGuildType;
    v12->m_unGuildGrade = v11->m_unGuildGrade;
    v12->m_unGuildTotalMember = v11->m_unGuildTotalMember;
    v5 = v6 - 1;
  }
  std::_Push_heap<GTRequestListWin::GuildInfo *,int,GTRequestListWin::GuildInfo,bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &)>(
    _First,
    v5,
    _Hole,
    _Val,
    _Pred);
}

//----- (005DA640) --------------------------------------------------------
void __cdecl std::_Make_heap<GTRequestListWin::GuildInfo *,int,GTRequestListWin::GuildInfo,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > _Pred)
{
  int v3; // eax@1
  char *v4; // esi@2
  unsigned int v5; // edx@4
  unsigned int v6; // eax@4
  int v7; // edi@6
  boost::detail::function::any_pointer (__cdecl *v8)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp-Ch] [bp-80h]@4
  int v9; // [sp-8h] [bp-7Ch]@4
  bool (__cdecl *v10)(boost::detail::function::any_pointer, GuildListWin::GuildInfo *, GuildListWin::GuildInfo *); // [sp-4h] [bp-78h]@4
  boost::detail::function::any_pointer (__cdecl **v11)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp+10h] [bp-64h]@4
  int _Bottom; // [sp+14h] [bp-60h]@1
  GuildListWin::GuildInfo *v13; // [sp+18h] [bp-5Ch]@1
  int _Hole; // [sp+1Ch] [bp-58h]@3
  GuildListWin::GuildInfo _Val; // [sp+20h] [bp-54h]@4
  int v16; // [sp+70h] [bp-4h]@1

  v13 = _First;
  _Bottom = _Last - _First;
  v3 = _Bottom / 2;
  v16 = 0;
  if ( _Bottom / 2 > 0 )
  {
    v4 = (char *)&_First[v3].m_unGuildType;
    while ( 1 )
    {
      v4 -= 68;
      _Hole = v3 - 1;
      _Val.m_strGuildName._Myres = 15;
      _Val.m_strGuildName._Mysize = 0;
      _Val.m_strGuildName._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &_Val.m_strGuildName,
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v4 - 2,
        0,
        0xFFFFFFFF);
      LOBYTE(v16) = 1;
      _Val.m_MasterName._Myres = 15;
      _Val.m_MasterName._Mysize = 0;
      _Val.m_MasterName._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &_Val.m_MasterName,
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v4 - 1,
        0,
        0xFFFFFFFF);
      v5 = *((_DWORD *)v4 + 1);
      v6 = *((_DWORD *)v4 + 2);
      _Val.m_unGuildType = *(_DWORD *)v4;
      _Val.m_unGuildGrade = v5;
      _Val.m_unGuildTotalMember = v6;
      v8 = 0;
      v9 = 0;
      v10 = 0;
      LOBYTE(v16) = 2;
      v11 = &v8;
      if ( _Pred.manager )
      {
        v10 = _Pred.invoker;
        v8 = _Pred.manager;
        v9 = ((int (__cdecl *)(void *, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
      }
      v7 = _Hole;
      std::_Adjust_heap<GTRequestListWin::GuildInfo *,int,GTRequestListWin::GuildInfo,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(
        v13,
        _Hole,
        _Bottom,
        &_Val,
        *(boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *)&v8);
      LOBYTE(v16) = 0;
      if ( _Val.m_MasterName._Myres >= 0x10 )
        operator delete(_Val.m_MasterName._Bx._Ptr);
      _Val.m_MasterName._Myres = 15;
      _Val.m_MasterName._Mysize = 0;
      _Val.m_MasterName._Bx._Buf[0] = 0;
      if ( _Val.m_strGuildName._Myres >= 0x10 )
        operator delete(_Val.m_strGuildName._Bx._Ptr);
      _Val.m_strGuildName._Myres = 15;
      _Val.m_strGuildName._Mysize = 0;
      _Val.m_strGuildName._Bx._Buf[0] = 0;
      if ( v7 <= 0 )
        break;
      v3 = _Hole;
    }
  }
  v16 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}

//----- (005DA7D0) --------------------------------------------------------
void __cdecl std::_Insertion_sort1<GTRequestListWin::GuildInfo *,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>,GTRequestListWin::GuildInfo>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > _Pred)
{
  GuildListWin::GuildInfo *v3; // edi@1
  GuildListWin::GuildInfo *i; // ebx@2
  int v5; // esi@3
  unsigned int v6; // edx@3
  unsigned int v7; // eax@3
  unsigned int v8; // edx@5
  unsigned int v9; // eax@5
  int j; // edi@6
  unsigned int v11; // ecx@10
  unsigned int v12; // edx@10
  std::exception v13; // [sp+10h] [bp-78h]@21
  std::exception v14; // [sp+1Ch] [bp-6Ch]@19
  GuildListWin::GuildInfo *v15; // [sp+28h] [bp-60h]@1
  char *_What; // [sp+2Ch] [bp-5Ch]@19
  char *v17; // [sp+30h] [bp-58h]@21
  GuildListWin::GuildInfo _Val; // [sp+34h] [bp-54h]@3
  int v19; // [sp+84h] [bp-4h]@1

  v3 = _First;
  v15 = _First;
  v19 = 0;
  if ( _First != _Last )
  {
    for ( i = _First + 1; i != _Last; _Val.m_strGuildName._Bx._Buf[0] = 0 )
    {
      v5 = (int)i;
      _Val.m_strGuildName._Myres = 15;
      _Val.m_strGuildName._Mysize = 0;
      _Val.m_strGuildName._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &_Val.m_strGuildName,
        &i->m_strGuildName,
        0,
        0xFFFFFFFF);
      LOBYTE(v19) = 1;
      _Val.m_MasterName._Myres = 15;
      _Val.m_MasterName._Mysize = 0;
      _Val.m_MasterName._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &_Val.m_MasterName,
        &i->m_MasterName,
        0,
        0xFFFFFFFF);
      v6 = i->m_unGuildGrade;
      v7 = i->m_unGuildTotalMember;
      _Val.m_unGuildType = i->m_unGuildType;
      _Val.m_unGuildGrade = v6;
      _Val.m_unGuildTotalMember = v7;
      LOBYTE(v19) = 2;
      if ( !_Pred.manager )
      {
        _What = "call to empty boost::function";
        std::exception::exception(&v14, (const char *const *)&_What);
        v14.vfptr = (std::exceptionVtbl *)&boost::bad_function_call::`vftable';
        LOBYTE(v19) = 3;
        boost::throw_exception<boost::bad_function_call>((boost::bad_function_call *)&v14);
      }
      if ( (unsigned __int8)((int (__cdecl *)(void *, GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))_Pred.invoker)(
                              _Pred.functor.obj_ptr,
                              &_Val,
                              v3) )
      {
        std::_Move_backward<GuildListWin::GuildInfo *,GuildListWin::GuildInfo *>(v3, i, i + 1);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &v3->m_strGuildName,
          &_Val.m_strGuildName,
          0,
          0xFFFFFFFF);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &v3->m_MasterName,
          &_Val.m_MasterName,
          0,
          0xFFFFFFFF);
        v8 = _Val.m_unGuildGrade;
        v9 = _Val.m_unGuildTotalMember;
        v3->m_unGuildType = _Val.m_unGuildType;
        v3->m_unGuildGrade = v8;
        v3->m_unGuildTotalMember = v9;
      }
      else
      {
        for ( j = (int)&i->m_unGuildType; ; v5 = j - 56 )
        {
          j -= 68;
          if ( !_Pred.manager )
          {
            v17 = "call to empty boost::function";
            std::exception::exception(&v13, (const char *const *)&v17);
            v13.vfptr = (std::exceptionVtbl *)&boost::bad_function_call::`vftable';
            LOBYTE(v19) = 4;
            boost::throw_exception<boost::bad_function_call>((boost::bad_function_call *)&v13);
          }
          if ( !(unsigned __int8)((int (__cdecl *)(void *, GuildListWin::GuildInfo *, int))_Pred.invoker)(
                                   _Pred.functor.obj_ptr,
                                   &_Val,
                                   j - 56) )
            break;
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
            (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v5,
            (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)(j - 56),
            0,
            0xFFFFFFFF);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
            (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)(v5 + 28),
            (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)(j - 28),
            0,
            0xFFFFFFFF);
          *(_DWORD *)(v5 + 56) = *(_DWORD *)j;
          *(_DWORD *)(v5 + 60) = *(_DWORD *)(j + 4);
          *(_DWORD *)(v5 + 64) = *(_DWORD *)(j + 8);
        }
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v5,
          &_Val.m_strGuildName,
          0,
          0xFFFFFFFF);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)(v5 + 28),
          &_Val.m_MasterName,
          0,
          0xFFFFFFFF);
        v11 = _Val.m_unGuildGrade;
        v12 = _Val.m_unGuildTotalMember;
        v3 = v15;
        *(_DWORD *)(v5 + 56) = _Val.m_unGuildType;
        *(_DWORD *)(v5 + 60) = v11;
        *(_DWORD *)(v5 + 64) = v12;
      }
      LOBYTE(v19) = 0;
      if ( _Val.m_MasterName._Myres >= 0x10 )
        operator delete(_Val.m_MasterName._Bx._Ptr);
      _Val.m_MasterName._Myres = 15;
      _Val.m_MasterName._Mysize = 0;
      _Val.m_MasterName._Bx._Buf[0] = 0;
      if ( _Val.m_strGuildName._Myres >= 0x10 )
        operator delete(_Val.m_strGuildName._Bx._Ptr);
      ++i;
      _Val.m_strGuildName._Myres = 15;
      _Val.m_strGuildName._Mysize = 0;
    }
  }
  v19 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}
// 98CD40: using guessed type int (__thiscall *boost::bad_function_call::`vftable')(void *p, char);

//----- (005DAA50) --------------------------------------------------------
void __cdecl std::_Median<GTRequestListWin::GuildInfo *,bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &)>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Mid, GuildListWin::GuildInfo *_Last, bool (__cdecl *_Pred)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))
{
  signed int v4; // eax@1
  int v5; // eax@2
  unsigned int v6; // esi@2
  GuildListWin::GuildInfo *v7; // eax@14
  GuildListWin::GuildInfo *v8; // esi@14
  int v9; // [sp+Ch] [bp-8h]@2
  GuildListWin::GuildInfo *_Left; // [sp+10h] [bp-4h]@2
  GuildListWin::GuildInfo *_Firsta; // [sp+1Ch] [bp+8h]@8
  GuildListWin::GuildInfo *_Firstb; // [sp+1Ch] [bp+8h]@14

  v4 = _Last - _First;
  if ( v4 <= 40 )
  {
    if ( _Pred(_Mid, _First) )
      std::swap<GTRequestListWin::GuildInfo>(_Mid, _First);
    if ( _Pred(_Last, _Mid) )
      std::swap<GTRequestListWin::GuildInfo>(_Last, _Mid);
    if ( _Pred(_Mid, _First) )
      std::swap<GTRequestListWin::GuildInfo>(_Mid, _First);
  }
  else
  {
    v5 = (v4 + 1) / 8;
    v6 = 68 * v5;
    v9 = 2 * v5;
    _Left = &_First[v5];
    if ( _Pred(_Left, _First) )
      std::swap<GTRequestListWin::GuildInfo>(_Left, _First);
    if ( _Pred(&_First[v9], _Left) )
      std::swap<GTRequestListWin::GuildInfo>(&_First[v9], _Left);
    if ( _Pred(_Left, _First) )
      std::swap<GTRequestListWin::GuildInfo>(_Left, _First);
    _Firsta = &_Mid[-v6 / 0x44];
    if ( _Pred(_Mid, &_Mid[-v6 / 0x44]) )
      std::swap<GTRequestListWin::GuildInfo>(_Mid, _Firsta);
    if ( _Pred(&_Mid[v6 / 0x44], _Mid) )
      std::swap<GTRequestListWin::GuildInfo>(&_Mid[v6 / 0x44], _Mid);
    if ( _Pred(_Mid, _Firsta) )
      std::swap<GTRequestListWin::GuildInfo>(_Mid, _Firsta);
    v7 = &_Last[-v6 / 0x44];
    v8 = &_Last[-(v9 * 68) / 0x44u];
    _Firstb = v7;
    if ( _Pred(v7, &_Last[-(v9 * 68) / 0x44u]) )
      std::swap<GTRequestListWin::GuildInfo>(_Firstb, v8);
    if ( _Pred(_Last, _Firstb) )
      std::swap<GTRequestListWin::GuildInfo>(_Last, _Firstb);
    if ( _Pred(_Firstb, v8) )
      std::swap<GTRequestListWin::GuildInfo>(_Firstb, v8);
    if ( _Pred(_Mid, _Left) )
      std::swap<GTRequestListWin::GuildInfo>(_Mid, _Left);
    if ( _Pred(_Firstb, _Mid) )
      std::swap<GTRequestListWin::GuildInfo>(_Firstb, _Mid);
    if ( _Pred(_Mid, _Left) )
      std::swap<GTRequestListWin::GuildInfo>(_Mid, _Left);
  }
}

//----- (005DAC60) --------------------------------------------------------
void __cdecl std::_Make_heap<GTRequestListWin::GuildInfo *,int,GTRequestListWin::GuildInfo,bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &)>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, bool (__cdecl *_Pred)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))
{
  int v3; // edi@1
  char *v4; // esi@2
  unsigned int v5; // eax@3
  unsigned int v6; // ecx@3
  signed int _Bottom; // [sp+18h] [bp-58h]@1
  GuildListWin::GuildInfo _Val; // [sp+1Ch] [bp-54h]@3
  int v9; // [sp+6Ch] [bp-4h]@3

  _Bottom = _Last - _First;
  v3 = _Bottom / 2;
  if ( _Bottom / 2 > 0 )
  {
    v4 = (char *)&_First[v3].m_unGuildType;
    do
    {
      v4 -= 68;
      --v3;
      _Val.m_strGuildName._Myres = 15;
      _Val.m_strGuildName._Mysize = 0;
      _Val.m_strGuildName._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &_Val.m_strGuildName,
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v4 - 2,
        0,
        0xFFFFFFFF);
      v9 = 0;
      _Val.m_MasterName._Myres = 15;
      _Val.m_MasterName._Mysize = 0;
      _Val.m_MasterName._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &_Val.m_MasterName,
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v4 - 1,
        0,
        0xFFFFFFFF);
      v5 = *((_DWORD *)v4 + 1);
      v6 = *((_DWORD *)v4 + 2);
      _Val.m_unGuildType = *(_DWORD *)v4;
      _Val.m_unGuildGrade = v5;
      _Val.m_unGuildTotalMember = v6;
      v9 = 1;
      std::_Adjust_heap<GuildListWin::GuildInfo *,int,GuildListWin::GuildInfo,bool (__cdecl *)(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &)>(
        _First,
        v3,
        _Bottom,
        &_Val,
        _Pred);
      v9 = -1;
      if ( _Val.m_MasterName._Myres >= 0x10 )
        operator delete(_Val.m_MasterName._Bx._Ptr);
      _Val.m_MasterName._Myres = 15;
      _Val.m_MasterName._Mysize = 0;
      _Val.m_MasterName._Bx._Buf[0] = 0;
      if ( _Val.m_strGuildName._Myres >= 0x10 )
        operator delete(_Val.m_strGuildName._Bx._Ptr);
    }
    while ( v3 > 0 );
  }
}

//----- (005DADA0) --------------------------------------------------------
void __cdecl std::_Insertion_sort1<GTRequestListWin::GuildInfo *,bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),GTRequestListWin::GuildInfo>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, bool (__cdecl *_Pred)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))
{
  GuildListWin::GuildInfo *v3; // esi@1
  GuildListWin::GuildInfo *i; // ebx@2
  GuildListWin::GuildInfo *v5; // edi@3
  unsigned int v6; // eax@3
  unsigned int v7; // ecx@3
  unsigned int v8; // edx@4
  unsigned int v9; // eax@4
  int j; // esi@5
  unsigned int v11; // ecx@7
  unsigned int v12; // edx@7
  GuildListWin::GuildInfo _Val; // [sp+18h] [bp-54h]@3
  int v14; // [sp+68h] [bp-4h]@3

  v3 = _First;
  if ( _First != _Last )
  {
    for ( i = _First + 1; i != _Last; ++i )
    {
      v5 = i;
      _Val.m_strGuildName._Myres = 15;
      _Val.m_strGuildName._Mysize = 0;
      _Val.m_strGuildName._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &_Val.m_strGuildName,
        &i->m_strGuildName,
        0,
        0xFFFFFFFF);
      v14 = 0;
      _Val.m_MasterName._Myres = 15;
      _Val.m_MasterName._Mysize = 0;
      _Val.m_MasterName._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &_Val.m_MasterName,
        &i->m_MasterName,
        0,
        0xFFFFFFFF);
      v6 = i->m_unGuildGrade;
      v7 = i->m_unGuildTotalMember;
      _Val.m_unGuildType = i->m_unGuildType;
      _Val.m_unGuildGrade = v6;
      _Val.m_unGuildTotalMember = v7;
      v14 = 1;
      if ( _Pred(&_Val, v3) )
      {
        std::_Move_backward<GuildListWin::GuildInfo *,GuildListWin::GuildInfo *>(v3, i, i + 1);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &v3->m_strGuildName,
          &_Val.m_strGuildName,
          0,
          0xFFFFFFFF);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &v3->m_MasterName,
          &_Val.m_MasterName,
          0,
          0xFFFFFFFF);
        v8 = _Val.m_unGuildGrade;
        v9 = _Val.m_unGuildTotalMember;
        v3->m_unGuildType = _Val.m_unGuildType;
        v3->m_unGuildGrade = v8;
        v3->m_unGuildTotalMember = v9;
      }
      else
      {
        for ( j = (int)&i[-1]; _Pred(&_Val, (GuildListWin::GuildInfo *)j); j -= 68 )
        {
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
            &v5->m_strGuildName,
            (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)j,
            0,
            0xFFFFFFFF);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
            &v5->m_MasterName,
            (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)(j + 28),
            0,
            0xFFFFFFFF);
          v5->m_unGuildType = *(_DWORD *)(j + 56);
          v5->m_unGuildGrade = *(_DWORD *)(j + 60);
          v5->m_unGuildTotalMember = *(_DWORD *)(j + 64);
          v5 = (GuildListWin::GuildInfo *)j;
        }
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &v5->m_strGuildName,
          &_Val.m_strGuildName,
          0,
          0xFFFFFFFF);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &v5->m_MasterName,
          &_Val.m_MasterName,
          0,
          0xFFFFFFFF);
        v11 = _Val.m_unGuildGrade;
        v12 = _Val.m_unGuildTotalMember;
        v3 = _First;
        v5->m_unGuildType = _Val.m_unGuildType;
        v5->m_unGuildGrade = v11;
        v5->m_unGuildTotalMember = v12;
      }
      v14 = -1;
      if ( _Val.m_MasterName._Myres >= 0x10 )
        operator delete(_Val.m_MasterName._Bx._Ptr);
      _Val.m_MasterName._Myres = 15;
      _Val.m_MasterName._Mysize = 0;
      _Val.m_MasterName._Bx._Buf[0] = 0;
      if ( _Val.m_strGuildName._Myres >= 0x10 )
        operator delete(_Val.m_strGuildName._Bx._Ptr);
    }
  }
}

//----- (005DAFA0) --------------------------------------------------------
void __cdecl std::_Pop_heap_0<GTRequestListWin::GuildInfo *,GTRequestListWin::GuildInfo,bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &)>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, bool (__cdecl *_Pred)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))
{
  GuildListWin::GuildInfo *v3; // edi@1
  unsigned int v4; // edx@1
  GuildListWin::GuildInfo _Val; // [sp+14h] [bp-54h]@1
  int v6; // [sp+64h] [bp-4h]@1

  v3 = _Last - 1;
  GuildListWin::GuildInfo::GuildInfo(&_Val, _Last - 1);
  v6 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_Last[-1].m_strGuildName,
    &_First->m_strGuildName,
    0,
    0xFFFFFFFF);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_Last[-1].m_MasterName,
    &_First->m_MasterName,
    0,
    0xFFFFFFFF);
  v3->m_unGuildType = _First->m_unGuildType;
  v3->m_unGuildGrade = _First->m_unGuildGrade;
  v3->m_unGuildTotalMember = _First->m_unGuildTotalMember;
  v4 = (signed int)((unsigned __int64)(2021161081i64 * ((char *)_Last - (char *)_First - 68)) >> 32) >> 5;
  std::_Adjust_heap<GuildListWin::GuildInfo *,int,GuildListWin::GuildInfo,bool (__cdecl *)(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &)>(
    _First,
    0,
    v4 + (v4 >> 31),
    &_Val,
    _Pred);
  if ( _Val.m_MasterName._Myres >= 0x10 )
    operator delete(_Val.m_MasterName._Bx._Ptr);
  _Val.m_MasterName._Myres = 15;
  _Val.m_MasterName._Mysize = 0;
  _Val.m_MasterName._Bx._Buf[0] = 0;
  if ( _Val.m_strGuildName._Myres >= 0x10 )
    operator delete(_Val.m_strGuildName._Bx._Ptr);
}

//----- (005DB0A0) --------------------------------------------------------
void __cdecl std::make_heap<GuildListWin::GuildInfo *,boost::function<bool __cdecl (GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void>>>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > _Pred)
{
  boost::detail::function::any_pointer (__cdecl *v3)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp-14h] [bp-30h]@2
  int v4; // [sp-10h] [bp-2Ch]@2
  bool (__cdecl *v5)(boost::detail::function::any_pointer, GuildListWin::GuildInfo *, GuildListWin::GuildInfo *); // [sp-Ch] [bp-28h]@2
  int v6; // [sp-8h] [bp-24h]@2
  int v7; // [sp-4h] [bp-20h]@2
  int v8; // [sp+18h] [bp-4h]@1

  v8 = 0;
  if ( _Last - _First > 1 )
  {
    v7 = 0;
    v6 = 0;
    v3 = 0;
    v4 = 0;
    v5 = 0;
    if ( _Pred.manager )
    {
      v5 = _Pred.invoker;
      v3 = _Pred.manager;
      v4 = ((int (__cdecl *)(void *, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
    }
    std::_Make_heap<GTRequestListWin::GuildInfo *,int,GTRequestListWin::GuildInfo,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(
      _First,
      _Last,
      *(boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *)&v3);
  }
  v8 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}

//----- (005DB160) --------------------------------------------------------
void __cdecl std::_Insertion_sort<GTRequestListWin::GuildInfo *,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > _Pred)
{
  boost::detail::function::any_pointer (__cdecl *v3)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp-10h] [bp-28h]@1
  int v4; // [sp-Ch] [bp-24h]@1
  bool (__cdecl *v5)(boost::detail::function::any_pointer, GuildListWin::GuildInfo *, GuildListWin::GuildInfo *); // [sp-8h] [bp-20h]@1
  int v6; // [sp-4h] [bp-1Ch]@1
  boost::detail::function::any_pointer (__cdecl **v7)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // [sp+8h] [bp-10h]@1
  int v8; // [sp+14h] [bp-4h]@1

  v6 = 0;
  v3 = 0;
  v4 = 0;
  v5 = 0;
  v8 = 0;
  v7 = &v3;
  if ( _Pred.manager )
  {
    v5 = _Pred.invoker;
    v3 = _Pred.manager;
    v4 = ((int (__cdecl *)(void *, _DWORD))_Pred.manager)(_Pred.functor.obj_ptr, 0);
  }
  std::_Insertion_sort1<GTRequestListWin::GuildInfo *,boost::function<bool __cdecl (GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),std::allocator<void>>,GTRequestListWin::GuildInfo>(
    _First,
    _Last,
    *(boost::function<bool __cdecl(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &),std::allocator<void> > *)&v3);
  v8 = -1;
  if ( _Pred.manager )
    ((void (__cdecl *)(void *, signed int))_Pred.manager)(_Pred.functor.obj_ptr, 1);
}

//----- (005DB210) --------------------------------------------------------
std::pair<GuildListWin::GuildInfo *,GuildListWin::GuildInfo *> *__cdecl std::_Unguarded_partition<GuildListWin::GuildInfo *,bool (__cdecl *)(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &)>(std::pair<GuildListWin::GuildInfo *,GuildListWin::GuildInfo *> *result, GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, bool (__cdecl *_Pred)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))
{
  GuildListWin::GuildInfo *v4; // esi@1
  GuildListWin::GuildInfo *v5; // ebx@1
  unsigned int v6; // eax@10
  GuildListWin::GuildInfo *v7; // edi@10
  GuildListWin::GuildInfo *v8; // ST08_4@14
  bool v9; // zf@17
  GuildListWin::GuildInfo *v10; // ebx@18
  GuildListWin::GuildInfo *v11; // ST0C_4@28
  GuildListWin::GuildInfo *v12; // ST08_4@28
  GuildListWin::GuildInfo *v13; // eax@29
  std::pair<GuildListWin::GuildInfo *,GuildListWin::GuildInfo *> *v14; // eax@34
  GuildListWin::GuildInfo *_Plast; // [sp+Ch] [bp-8h]@1
  GuildListWin::GuildInfo *_Glast; // [sp+10h] [bp-4h]@2
  GuildListWin::GuildInfo *_Glasta; // [sp+10h] [bp-4h]@10

  v4 = &_First[(_Last - _First) / 2];
  std::_Median<GTRequestListWin::GuildInfo *,bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &)>(
    _First,
    &_First[(_Last - _First) / 2],
    _Last - 1,
    _Pred);
  v5 = v4 + 1;
  _Plast = v4 + 1;
  if ( _First < v4 )
  {
    do
    {
      _Glast = v4 - 1;
      if ( _Pred(v4 - 1, v4) )
        break;
      if ( _Pred(v4, _Glast) )
        break;
      --v4;
    }
    while ( _First < _Glast );
  }
  if ( v5 < _Last )
  {
    do
    {
      if ( _Pred(v5, v4) )
        break;
      if ( _Pred(v4, v5) )
        break;
      ++v5;
    }
    while ( v5 < _Last );
    _Plast = v5;
  }
  v6 = (unsigned int)v4;
  v7 = v5;
  for ( _Glasta = v4; ; v6 = (unsigned int)_Glasta )
  {
    while ( 1 )
    {
      if ( v7 < _Last )
      {
        do
        {
          if ( !_Pred(v4, v7) )
          {
            if ( _Pred(v7, v4) )
              break;
            v8 = v5;
            ++v5;
            std::swap<GTRequestListWin::GuildInfo>(v8, v7);
          }
          ++v7;
        }
        while ( v7 < _Last );
        v6 = (unsigned int)_Glasta;
        _Plast = v5;
      }
      v9 = v6 == (_DWORD)_First;
      if ( v6 > (unsigned int)_First )
      {
        v10 = (GuildListWin::GuildInfo *)(v6 - 68);
        do
        {
          if ( !_Pred(v10, v4) )
          {
            if ( _Pred(v4, v10) )
              break;
            --v4;
            std::swap<GTRequestListWin::GuildInfo>(v4, v10);
          }
          --v10;
          --_Glasta;
        }
        while ( _First < _Glasta );
        v6 = (unsigned int)_Glasta;
        v5 = _Plast;
        v9 = _Glasta == _First;
      }
      if ( v9 )
        break;
      v13 = (GuildListWin::GuildInfo *)(v6 - 68);
      _Glasta = v13;
      if ( v7 == _Last )
      {
        --v4;
        if ( v13 != v4 )
          std::swap<GTRequestListWin::GuildInfo>(v13, v4);
        --v5;
        _Plast = v5;
        std::swap<GTRequestListWin::GuildInfo>(v4, v5);
        v6 = (unsigned int)_Glasta;
      }
      else
      {
        std::swap<GTRequestListWin::GuildInfo>(v7, v13);
        v6 = (unsigned int)_Glasta;
        ++v7;
      }
    }
    if ( v7 == _Last )
      break;
    if ( v5 != v7 )
      std::swap<GTRequestListWin::GuildInfo>(v4, v5);
    v11 = v7;
    ++v5;
    v12 = v4;
    _Plast = v5;
    ++v4;
    ++v7;
    std::swap<GTRequestListWin::GuildInfo>(v12, v11);
  }
  v14 = result;
  result->first = v4;
  result->second = v5;
  return v14;
}

//----- (005DB3D0) --------------------------------------------------------
void __thiscall std::vector<GTRequestListWin::GuildInfo,std::allocator<GTRequestListWin::GuildInfo>>::~vector<GTRequestListWin::GuildInfo,std::allocator<GTRequestListWin::GuildInfo>>(std::vector<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > *this)
{
  std::vector<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > *v1; // esi@1

  v1 = this;
  if ( this->_Myfirst )
  {
    std::_Destroy_range<std::allocator<GTRequestListWin::GuildInfo>>(this->_Myfirst, this->_Mylast);
    operator delete(v1->_Myfirst);
  }
  v1->_Myfirst = 0;
  v1->_Mylast = 0;
  v1->_Myend = 0;
}

//----- (005DB420) --------------------------------------------------------
void __cdecl std::_Sort_heap<GuildListWin::GuildInfo *,bool (__cdecl *)(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &)>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, bool (__cdecl *_Pred)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))
{
  GuildListWin::GuildInfo *v3; // esi@1
  signed int i; // edi@1

  v3 = _Last;
  for ( i = (char *)_Last - (char *)_First; i / 68 > 1; --v3 )
  {
    std::_Pop_heap_0<GTRequestListWin::GuildInfo *,GTRequestListWin::GuildInfo,bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &)>(
      _First,
      v3,
      _Pred);
    i -= 68;
  }
}

//----- (005DB480) --------------------------------------------------------
GTRequestListWin *__thiscall GTRequestListWin::`vector deleting destructor'(GTRequestListWin *this, unsigned int a2)
{
  GTRequestListWin *v2; // esi@1

  v2 = this;
  GTRequestListWin::~GTRequestListWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005DB4B0) --------------------------------------------------------
void __cdecl std::_Sort<GTRequestListWin::GuildInfo *,int,bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &)>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, int _Ideal, bool (__cdecl *_Pred)(GuildListWin::GuildInfo *, GuildListWin::GuildInfo *))
{
  GuildListWin::GuildInfo *v4; // ebx@1
  GuildListWin::GuildInfo *v5; // edi@1
  int v6; // eax@1
  signed int v7; // esi@2
  std::pair<GuildListWin::GuildInfo *,GuildListWin::GuildInfo *> _Mid; // [sp+Ch] [bp-8h]@4

  v4 = _First;
  v5 = _Last;
  v6 = _Last - _First;
  if ( v6 <= 32 )
    goto LABEL_8;
  v7 = _Ideal;
  while ( v7 > 0 )
  {
    std::_Unguarded_partition<GuildListWin::GuildInfo *,bool (__cdecl *)(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &)>(
      &_Mid,
      v4,
      v5,
      _Pred);
    v7 = v7 / 2 / 2 + v7 / 2;
    if ( _Mid.first - v4 >= v5 - _Mid.second )
    {
      std::_Sort<GTRequestListWin::GuildInfo *,int,bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &)>(
        _Mid.second,
        v5,
        v7,
        _Pred);
      v5 = _Mid.first;
    }
    else
    {
      std::_Sort<GTRequestListWin::GuildInfo *,int,bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &)>(
        v4,
        _Mid.first,
        v7,
        _Pred);
      v4 = _Mid.second;
    }
    v6 = v5 - v4;
    if ( v6 <= 32 )
      goto LABEL_8;
  }
  if ( v6 <= 32 )
  {
LABEL_8:
    if ( v6 > 1 )
      std::_Insertion_sort1<GTRequestListWin::GuildInfo *,bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &),GTRequestListWin::GuildInfo>(
        v4,
        v5,
        _Pred);
  }
  else
  {
    if ( v5 - v4 > 1 )
      std::_Make_heap<GTRequestListWin::GuildInfo *,int,GTRequestListWin::GuildInfo,bool (__cdecl *)(GTRequestListWin::GuildInfo const &,GTRequestListWin::GuildInfo const &)>(
        v4,
        v5,
        _Pred);
    std::_Sort_heap<GuildListWin::GuildInfo *,bool (__cdecl *)(GuildListWin::GuildInfo const &,GuildListWin::GuildInfo const &)>(
      v4,
      v5,
      _Pred);
  }
}

//----- (005DB5F0) --------------------------------------------------------
void __thiscall GuildTournamentScheduleWin::GuildTournamentScheduleWin(GuildTournamentScheduleWin *this)
{
  GuildTournamentScheduleWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GuildTournamentScheduleWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildTournamentScheduleWin::`vftable'{for `IDirectMessenger'};
  v1->m_p16Preliminary[0] = 0;
  v1->m_p16Preliminary[1] = 0;
  v1->m_p16Preliminary[2] = 0;
  v1->m_p16Preliminary[3] = 0;
  v1->m_p16Preliminary[4] = 0;
  v1->m_p16Preliminary[5] = 0;
  v1->m_p16Preliminary[6] = 0;
  v1->m_p16Preliminary[7] = 0;
  v1->m_p16Preliminary[8] = 0;
  v1->m_p16Preliminary[9] = 0;
  v1->m_p16Preliminary[10] = 0;
  v1->m_p16Preliminary[11] = 0;
  v1->m_p16Preliminary[12] = 0;
  v1->m_p16Preliminary[13] = 0;
  v1->m_p16Preliminary[14] = 0;
  v1->m_p16Preliminary[15] = 0;
  v1->m_p8Preliminary[0] = 0;
  v1->m_p8Preliminary[1] = 0;
  v1->m_p8Preliminary[2] = 0;
  v1->m_p8Preliminary[3] = 0;
  v1->m_p8Preliminary[4] = 0;
  v1->m_p8Preliminary[5] = 0;
  v1->m_p8Preliminary[6] = 0;
  v1->m_p8Preliminary[7] = 0;
  v1->m_pSemiFinal[0] = 0;
  v1->m_pSemiFinal[1] = 0;
  v1->m_pSemiFinal[2] = 0;
  v1->m_pSemiFinal[3] = 0;
  v1->m_pFinal[0] = 0;
  v1->m_pFinal[1] = 0;
  v1->m_pChampion = 0;
  v1->m_uiDuringMatchIndex = -1;
  v1->m_iSeedNum = -1;
}
// 9B0418: using guessed type void (__thiscall *GuildTournamentScheduleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B0434: using guessed type int (__thiscall *GuildTournamentScheduleWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005DB6E0) --------------------------------------------------------
void __thiscall GuildTournamentScheduleWin::~GuildTournamentScheduleWin(GuildTournamentScheduleWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GuildTournamentScheduleWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildTournamentScheduleWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9B0418: using guessed type void (__thiscall *GuildTournamentScheduleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B0434: using guessed type int (__thiscall *GuildTournamentScheduleWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005DB720) --------------------------------------------------------
void __thiscall GuildTournamentScheduleWin::OnCommand(GuildTournamentScheduleWin *this, unsigned int wParam, int lParam)
{
  this->m_iSeedNum = wParam;
  BYTE3(wParam) = wParam;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x1Du, 0xD7u, (char *)&wParam + 3, 1);
}

//----- (005DB750) --------------------------------------------------------
void __thiscall GuildTournamentScheduleWin::ClearList(GuildTournamentScheduleWin *this)
{
  GuildTournamentScheduleWin *v1; // ebx@1
  char *v2; // esi@1
  signed int v3; // edi@1

  v1 = this;
  v2 = (char *)this->m_pMatchList;
  v3 = 31;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 472))(&unk_9B02A7);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 468))(&Color::m_kDxWhiteColor);
    v2 += 4;
    --v3;
  }
  while ( v3 );
  ((void (__stdcall *)(_DWORD))v1->m_pGTMatchTypeText->vfptr[118].__vecDelDtor)(&unk_9B02B7);
}

//----- (005DB7B0) --------------------------------------------------------
char __thiscall GuildTournamentScheduleWin::Create(GuildTournamentScheduleWin *this, PgFrameWork *pkFrameWork)
{
  GuildTournamentScheduleWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  int v8; // edi@10
  int v9; // ebx@10
  NiSourceTexture *v10; // eax@10
  PgSprData *v11; // eax@11
  PgSprData *v12; // eax@13
  PgSprData *v13; // edi@13
  NiPointer<PgSprData::PgHitTester> *v14; // edx@13
  unsigned int v15; // edi@13
  unsigned int v16; // ebx@13
  PgFont *v17; // eax@13
  PgWinText *v18; // eax@13
  NiPointer<PgSprData::PgHitTester> *v19; // ecx@13
  unsigned int v20; // edi@13
  unsigned int v21; // ebx@13
  PgFont *v22; // eax@13
  PgWinText *v23; // eax@13
  NiRefObjectVtbl *v24; // edi@13
  NiUnsharedGeometryGroup *v25; // eax@13
  signed int v26; // edi@13
  NiNode *v27; // ebx@15
  const char *v28; // eax@16
  PgSprData *v29; // ebx@16
  NiNode *pkObject; // ST54_4@16
  const char *v31; // eax@16
  const char *v32; // eax@17
  NiNode *v33; // ST54_4@17
  const char *v34; // eax@17
  NiNode *v35; // ST54_4@18
  const char *v36; // eax@18
  PgSprData::PgHitTester *v37; // eax@18
  unsigned int v38; // ebx@18
  PgWin *v39; // ST3C_4@18
  NiAVObject *v40; // ST54_4@18
  PgFont *v41; // eax@18
  PgWinAbbreviateText *v42; // eax@18
  NiNode *v43; // ebx@20
  const char *v44; // eax@20
  PgSprData *v45; // ebx@20
  NiNode *v46; // ST54_4@20
  const char *v47; // eax@20
  NiNode *v48; // ST54_4@20
  const char *v49; // eax@20
  PgSprData::PgHitTester *v50; // eax@20
  unsigned int v51; // ebx@20
  PgWin *v52; // ST3C_4@20
  NiAVObject *v53; // ST54_4@20
  PgFont *v54; // eax@20
  PgWinAbbreviateText *v55; // eax@20
  NiNode *v56; // ebx@22
  const char *v57; // eax@22
  PgSprData *v58; // ebx@22
  NiNode *v59; // ST54_4@22
  const char *v60; // eax@22
  NiNode *v61; // ST54_4@22
  const char *v62; // eax@22
  PgSprData::PgHitTester *v63; // eax@22
  unsigned int v64; // ebx@22
  PgWin *v65; // ST3C_4@22
  NiAVObject *v66; // ST54_4@22
  PgFont *v67; // eax@22
  PgWinAbbreviateText *v68; // eax@22
  NiNode *v69; // ebx@24
  const char *v70; // eax@24
  PgSprData *v71; // ebx@24
  NiNode *v72; // ST54_4@24
  const char *v73; // eax@24
  NiNode *v74; // ST54_4@24
  const char *v75; // eax@24
  PgSprData::PgHitTester *v76; // eax@24
  unsigned int v77; // ebx@24
  PgWin *v78; // ST3C_4@24
  NiAVObject *v79; // ST54_4@24
  PgFont *v80; // eax@24
  PgWinAbbreviateText *v81; // eax@24
  PgSprData *v82; // ebx@26
  NiPointer<PgSprData::PgHitTester> *v83; // edx@26
  unsigned int v84; // ebx@26
  PgWin *v85; // ST3C_4@26
  NiAVObject *v86; // ST54_4@26
  PgFont *v87; // eax@26
  PgSprData *v88; // edi@29
  PgSprData::PgHitTester *v89; // eax@29
  unsigned int v90; // ebx@29
  PgFont *v91; // eax@29
  NiPointer<PgSprData::PgHitTester> *v92; // edx@29
  unsigned int v93; // ebx@29
  PgFont *v94; // eax@29
  NiPointer<PgSprData::PgHitTester> *v95; // ecx@29
  unsigned int v96; // edi@29
  unsigned int v97; // ebx@29
  PgFont *v98; // eax@29
  PgWinText *v99; // eax@29
  PgWinText *v100; // ebx@29
  NiRefObjectVtbl *v101; // edi@29
  NiUnsharedGeometryGroup *v102; // eax@29
  signed int v103; // ecx@29
  signed int v104; // eax@29
  _DWORD *v105; // esi@29
  NiNode *v106; // esi@38
  int v107; // [sp-10h] [bp-44h]@15
  char *v108; // [sp-8h] [bp-3Ch]@16
  int v109; // [sp-4h] [bp-38h]@16
  unsigned int istep4; // [sp+14h] [bp-20h]@13
  unsigned int istep3; // [sp+18h] [bp-1Ch]@13
  NiPointer<NiNode> spNode; // [sp+1Ch] [bp-18h]@1
  int uiLeft; // [sp+20h] [bp-14h]@4
  int uiTop; // [sp+24h] [bp-10h]@4
  int v115; // [sp+30h] [bp-4h]@1
  unsigned int istep2; // [sp+3Ch] [bp+8h]@13
  unsigned int istep2a; // [sp+3Ch] [bp+8h]@29
  unsigned int istep2b; // [sp+3Ch] [bp+8h]@29

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v115 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildTornament.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "GuildTournamentScheduleWin", 0) )
  {
    v6 = spNode.m_pObject;
    v115 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = uiLeft;
  v9 = uiTop;
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v11, (PgWin *)&v2->vfptr, 0, 0);
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft, uiTop, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinCloseBut::CreateWin(uiLeft, uiTop, v13, (PgWin *)&v2->vfptr);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
  v15 = v14->m_pObject->m_uiHeight;
  v16 = v14->m_pObject->m_uiWidth;
  v17 = Font::Get(0);
  v18 = PgWinText::CreateWin(uiLeft, uiTop, v16, v15, v17, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pGTMatchTypeText = v18;
  v18->vfptr[122].__vecDelDtor((NiRefObject *)v18, 5u);
  ((void (__stdcall *)(void *))v2->m_pGTMatchTypeText->vfptr[118].__vecDelDtor)(&unk_9B0297);
  ((void (__stdcall *)(D3DXCOLOR *))v2->m_pGTMatchTypeText->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
  ((void (__stdcall *)(_DWORD))v2->m_pGTMatchTypeText->vfptr[60].__vecDelDtor)(0);
  istep2 = 1;
  istep3 = 1;
  istep4 = 1;
  v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text03", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
  v20 = v19->m_pObject->m_uiHeight;
  v21 = v19->m_pObject->m_uiWidth;
  v22 = Font::Get(0);
  v23 = PgWinText::CreateWin(uiLeft, uiTop, v21, v20, v22, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkHelpMsg = v23;
  v23->vfptr[122].__vecDelDtor((NiRefObject *)v23, 0);
  v24 = v2->m_pkHelpMsg->vfptr;
  v25 = TextData2::Get(0x94F6DED2);
  v24[118].__vecDelDtor((NiRefObject *)v2->m_pkHelpMsg, (unsigned int)v25);
  ((void (__stdcall *)(D3DXCOLOR *))v2->m_pkHelpMsg->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  ((void (__stdcall *)(_DWORD))v2->m_pkHelpMsg->vfptr[60].__vecDelDtor)(0);
  v26 = 0;
  do
  {
    if ( v26 < 16 )
    {
      v27 = spNode.m_pObject;
      v107 = v26 + 1;
      if ( v26 >= 9 )
      {
        v32 = fs("Step1_%dNor", v107);
        v29 = PgSprData::Create((NiAVObject *)&v27->vfptr, v32, &uiLeft, &uiTop, 0);
        v33 = spNode.m_pObject;
        v34 = fs("Step1_%dClick", v26 + 1);
        PgSprData::Add(v29, (NiAVObject *)&v33->vfptr, v34);
        v109 = v26 + 1;
        v108 = "Step1_%dOver";
      }
      else
      {
        v28 = fs("Step1_0%dNor", v107);
        v29 = PgSprData::Create((NiAVObject *)&v27->vfptr, v28, &uiLeft, &uiTop, 0);
        pkObject = spNode.m_pObject;
        v31 = fs("Step1_0%dClick", v26 + 1);
        PgSprData::Add(v29, (NiAVObject *)&pkObject->vfptr, v31);
        v109 = v26 + 1;
        v108 = "Step1_0%dOver";
      }
      v35 = spNode.m_pObject;
      v36 = fs(v108, v109);
      PgSprData::Add(v29, (NiAVObject *)&v35->vfptr, v36);
      PgWinBut::CreateWin(uiLeft, uiTop, v29, (PgWin *)&v2->vfptr, v26, 0, 0);
      v37 = v29->m_akHitTester.m_pBase->m_pObject;
      v38 = v37->m_uiHeight;
      v39 = g_pkToolTipWin;
      v40 = (NiAVObject *)v37->m_uiWidth;
      v41 = Font::Get(0);
      v42 = PgWinAbbreviateText::CreateWin(
              uiLeft,
              uiTop + 2,
              (unsigned int)v40,
              v38,
              v41,
              (PgWin *)&v2->vfptr,
              0,
              0,
              0,
              1,
              v39,
              0xCu);
      v2->m_pMatchList[v26] = (PgWinText *)v42;
      goto LABEL_27;
    }
    if ( v26 < 24 )
    {
      v43 = spNode.m_pObject;
      v44 = fs("Step2_0%dNor", istep2);
      v45 = PgSprData::Create((NiAVObject *)&v43->vfptr, v44, &uiLeft, &uiTop, 0);
      v46 = spNode.m_pObject;
      v47 = fs("Step2_0%dClick", istep2);
      PgSprData::Add(v45, (NiAVObject *)&v46->vfptr, v47);
      v48 = spNode.m_pObject;
      v49 = fs("Step2_0%dOver", istep2);
      PgSprData::Add(v45, (NiAVObject *)&v48->vfptr, v49);
      PgWinBut::CreateWin(uiLeft, uiTop, v45, (PgWin *)&v2->vfptr, v26, 0, 0);
      v50 = v45->m_akHitTester.m_pBase->m_pObject;
      v51 = v50->m_uiHeight;
      v52 = g_pkToolTipWin;
      v53 = (NiAVObject *)v50->m_uiWidth;
      v54 = Font::Get(0);
      v55 = PgWinAbbreviateText::CreateWin(
              uiLeft,
              uiTop + 2,
              (unsigned int)v53,
              v51,
              v54,
              (PgWin *)&v2->vfptr,
              0,
              0,
              0,
              1,
              v52,
              0xCu);
      v2->m_pMatchList[v26] = (PgWinText *)v55;
      v55->vfptr[122].__vecDelDtor((NiRefObject *)v55, 5u);
      ++istep2;
      goto LABEL_28;
    }
    if ( v26 < 28 )
    {
      v56 = spNode.m_pObject;
      v57 = fs("Step3_0%dNor", istep3);
      v58 = PgSprData::Create((NiAVObject *)&v56->vfptr, v57, &uiLeft, &uiTop, 0);
      v59 = spNode.m_pObject;
      v60 = fs("Step3_0%dClick", istep3);
      PgSprData::Add(v58, (NiAVObject *)&v59->vfptr, v60);
      v61 = spNode.m_pObject;
      v62 = fs("Step3_0%dOver", istep3);
      PgSprData::Add(v58, (NiAVObject *)&v61->vfptr, v62);
      PgWinBut::CreateWin(uiLeft, uiTop, v58, (PgWin *)&v2->vfptr, v26, 0, 0);
      v63 = v58->m_akHitTester.m_pBase->m_pObject;
      v64 = v63->m_uiHeight;
      v65 = g_pkToolTipWin;
      v66 = (NiAVObject *)v63->m_uiWidth;
      v67 = Font::Get(0);
      v68 = PgWinAbbreviateText::CreateWin(
              uiLeft,
              uiTop + 2,
              (unsigned int)v66,
              v64,
              v67,
              (PgWin *)&v2->vfptr,
              0,
              0,
              0,
              1,
              v65,
              0xCu);
      v2->m_pMatchList[v26] = (PgWinText *)v68;
      v68->vfptr[122].__vecDelDtor((NiRefObject *)v68, 5u);
      ++istep3;
      goto LABEL_28;
    }
    if ( v26 < 30 )
    {
      v69 = spNode.m_pObject;
      v70 = fs("Step4_0%dNor", istep4);
      v71 = PgSprData::Create((NiAVObject *)&v69->vfptr, v70, &uiLeft, &uiTop, 0);
      v72 = spNode.m_pObject;
      v73 = fs("Step4_0%dClick", istep4);
      PgSprData::Add(v71, (NiAVObject *)&v72->vfptr, v73);
      v74 = spNode.m_pObject;
      v75 = fs("Step4_0%dOver", istep4);
      PgSprData::Add(v71, (NiAVObject *)&v74->vfptr, v75);
      PgWinBut::CreateWin(uiLeft, uiTop, v71, (PgWin *)&v2->vfptr, v26, 0, 0);
      v76 = v71->m_akHitTester.m_pBase->m_pObject;
      v77 = v76->m_uiHeight;
      v78 = g_pkToolTipWin;
      v79 = (NiAVObject *)v76->m_uiWidth;
      v80 = Font::Get(0);
      v81 = PgWinAbbreviateText::CreateWin(
              uiLeft,
              uiTop + 2,
              (unsigned int)v79,
              v77,
              v80,
              (PgWin *)&v2->vfptr,
              0,
              0,
              0,
              1,
              v78,
              0xCu);
      v2->m_pMatchList[v26] = (PgWinText *)v81;
      v81->vfptr[122].__vecDelDtor((NiRefObject *)v81, 5u);
      ++istep4;
      goto LABEL_28;
    }
    if ( v26 == 30 )
    {
      v82 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Step5_01Nor", &uiLeft, &uiTop, 0);
      PgSprData::Add(v82, (NiAVObject *)&spNode.m_pObject->vfptr, "Step5_01Click");
      PgSprData::Add(v82, (NiAVObject *)&spNode.m_pObject->vfptr, "Step5_01Over");
      PgWinBut::CreateWin(uiLeft, uiTop, v82, (PgWin *)&v2->vfptr, 0x1Eu, 0, 0);
      v83 = v82->m_akHitTester.m_pBase;
      v84 = v83->m_pObject->m_uiHeight;
      v85 = g_pkToolTipWin;
      v86 = (NiAVObject *)v83->m_pObject->m_uiWidth;
      v87 = Font::Get(0);
      v42 = PgWinAbbreviateText::CreateWin(
              uiLeft,
              uiTop + 2,
              (unsigned int)v86,
              v84,
              v87,
              (PgWin *)&v2->vfptr,
              0,
              0,
              0,
              1,
              v85,
              0xCu);
      v2->m_pMatchList[30] = (PgWinText *)v42;
LABEL_27:
      v42->vfptr[122].__vecDelDtor((NiRefObject *)v42, 5u);
    }
LABEL_28:
    ++v26;
  }
  while ( v26 < 31 );
  v88 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel03", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft, uiTop, v88, (PgWin *)&v2->vfptr, 0, 0);
  v89 = v88->m_akHitTester.m_pBase->m_pObject;
  v90 = v89->m_uiWidth;
  istep2a = v89->m_uiHeight;
  v91 = Font::Get(0);
  v2->m_pGTJoinTime = PgWinText::CreateWin(uiLeft + 6, uiTop + 8, istep2a, v90, v91, (PgWin *)&v2->vfptr, 0, 0);
  v92 = v88->m_akHitTester.m_pBase;
  v93 = v92->m_pObject->m_uiWidth;
  istep2b = v92->m_pObject->m_uiHeight;
  v94 = Font::Get(0);
  v2->m_pGTNextJoinTime = PgWinText::CreateWin(uiLeft + 6, uiTop + 28, istep2b, v93, v94, (PgWin *)&v2->vfptr, 0, 0);
  v95 = v88->m_akHitTester.m_pBase;
  v96 = v95->m_pObject->m_uiWidth;
  v97 = v95->m_pObject->m_uiHeight;
  v98 = Font::Get(0);
  v99 = PgWinText::CreateWin(uiLeft + 6, uiTop + 58, v97, v96, v98, (PgWin *)&v2->vfptr, 0, 0);
  v100 = v99;
  v101 = v99->vfptr;
  v102 = TextData::Get(0x29966E75u);
  v101[118].__vecDelDtor((NiRefObject *)v100, (unsigned int)v102);
  ((void (__thiscall *)(GuildTournamentScheduleWin *, signed int, signed int))v2->vfptr[77].__vecDelDtor)(v2, 50, 50);
  v103 = 0;
  v104 = 1;
  v105 = &v2->m_uiScheduleTable[0].RightChild;
  do
  {
    if ( v103 >= 8 )
    {
      if ( v103 >= 12 )
      {
        if ( v103 >= 15 )
        {
          *(v105 - 1) = v104 - 3;
          *v105 = v104 - 2;
          *(v105 - 2) = 2;
        }
        else
        {
          *(v105 - 1) = v104 - 1;
          *v105 = v104;
          *(v105 - 2) = 4;
        }
      }
      else
      {
        *(v105 - 1) = v104 - 1;
        *v105 = v104;
        *(v105 - 2) = 8;
      }
    }
    else
    {
      *(v105 - 1) = v104 - 1;
      *v105 = v104;
      *(v105 - 2) = 16;
    }
    v104 += 2;
    ++v103;
    v105 += 3;
  }
  while ( v104 < 33 );
  v106 = spNode.m_pObject;
  v115 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v106 )
    v106->vfptr->__vecDelDtor((NiRefObject *)v106, 1u);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005DC110) --------------------------------------------------------
void __thiscall GuildTournamentScheduleWin::CheckMatchType(GuildTournamentScheduleWin *this, PROTO_NC_GUILD_TOURNAMENT_LIST_ACK *pkProto)
{
  char v2; // dl@1
  char v3; // dl@2
  signed int v4; // esi@2
  char v5; // dl@5
  char v6; // dl@8
  char v7; // dl@11
  char v8; // dl@14
  char v9; // dl@17
  char v10; // dl@20
  char v11; // al@23
  char v12; // dl@29
  signed int v13; // esi@29
  char v14; // dl@32
  char v15; // dl@35
  char v16; // dl@38
  char v17; // dl@41
  char v18; // dl@44
  char v19; // dl@47
  char v20; // al@50
  char v21; // dl@56
  signed int v22; // esi@56
  char v23; // dl@59
  char v24; // dl@62
  char v25; // dl@65
  char v26; // dl@68
  char v27; // dl@71
  char v28; // dl@74
  char v29; // al@77
  char v30; // dl@83
  signed int v31; // esi@83
  char v32; // dl@86
  char v33; // dl@89
  char v34; // al@92
  PgWinText *v35; // esi@97
  NiRefObjectVtbl *v36; // edi@97
  NiUnsharedGeometryGroup *v37; // eax@97
  char v38; // dl@99
  signed int v39; // esi@99
  char v40; // al@102
  PgWinText *v41; // esi@107
  NiRefObjectVtbl *v42; // edi@107
  NiUnsharedGeometryGroup *v43; // eax@107
  unsigned int v44; // [sp-4h] [bp-Ch]@27
  unsigned int v45; // [sp-4h] [bp-Ch]@54

  v2 = pkProto->nMatchType;
  if ( v2 == 4 )
  {
    v3 = pkProto->TournamentList[0].nResult;
    v4 = 0;
    if ( v3 != 4 && v3 )
      v4 = 1;
    v5 = pkProto->TournamentList[1].nResult;
    if ( v5 != 4 && v5 )
      ++v4;
    v6 = pkProto->TournamentList[2].nResult;
    if ( v6 != 4 && v6 )
      ++v4;
    v7 = pkProto->TournamentList[3].nResult;
    if ( v7 != 4 && v7 )
      ++v4;
    v8 = pkProto->TournamentList[4].nResult;
    if ( v8 != 4 && v8 )
      ++v4;
    v9 = pkProto->TournamentList[5].nResult;
    if ( v9 != 4 && v9 )
      ++v4;
    v10 = pkProto->TournamentList[6].nResult;
    if ( v10 != 4 && v10 )
      ++v4;
    v11 = pkProto->TournamentList[7].nResult;
    if ( v11 != 4 )
    {
      if ( v11 )
        ++v4;
    }
    if ( v4 == 8 )
    {
      v44 = 1147615635;
LABEL_107:
      v41 = this->m_pGTMatchTypeText;
      v42 = v41->vfptr;
      v43 = TextData::Get(v44);
      v42[118].__vecDelDtor((NiRefObject *)v41, (unsigned int)v43);
      return;
    }
    return;
  }
  if ( v2 == 5 )
  {
    v12 = pkProto->TournamentList[8].nResult;
    v13 = 0;
    if ( v12 != 4 && v12 )
      v13 = 1;
    v14 = pkProto->TournamentList[9].nResult;
    if ( v14 != 4 && v14 )
      ++v13;
    v15 = pkProto->TournamentList[10].nResult;
    if ( v15 != 4 && v15 )
      ++v13;
    v16 = pkProto->TournamentList[11].nResult;
    if ( v16 != 4 && v16 )
      ++v13;
    v17 = pkProto->TournamentList[12].nResult;
    if ( v17 != 4 && v17 )
      ++v13;
    v18 = pkProto->TournamentList[13].nResult;
    if ( v18 != 4 && v18 )
      ++v13;
    v19 = pkProto->TournamentList[14].nResult;
    if ( v19 != 4 && v19 )
      ++v13;
    v20 = pkProto->TournamentList[15].nResult;
    if ( v20 != 4 && v20 )
      ++v13;
    if ( v13 != 8 )
      return;
    v45 = 1164392851;
    goto LABEL_97;
  }
  if ( v2 != 6 )
  {
    if ( v2 != 7 )
    {
      if ( v2 == 8 )
      {
        v38 = pkProto->TournamentList[28].nResult;
        v39 = 0;
        if ( v38 != 4 && v38 )
          v39 = 1;
        v40 = pkProto->TournamentList[29].nResult;
        if ( v40 != 4 && v40 )
          ++v39;
        if ( v39 == 2 )
        {
          v44 = 339884418;
          goto LABEL_107;
        }
      }
      return;
    }
    v30 = pkProto->TournamentList[24].nResult;
    v31 = 0;
    if ( v30 != 4 && v30 )
      v31 = 1;
    v32 = pkProto->TournamentList[25].nResult;
    if ( v32 != 4 && v32 )
      ++v31;
    v33 = pkProto->TournamentList[26].nResult;
    if ( v33 != 4 && v33 )
      ++v31;
    v34 = pkProto->TournamentList[27].nResult;
    if ( v34 != 4 && v34 )
      ++v31;
    if ( v31 != 4 )
      return;
    v45 = 339884930;
LABEL_97:
    v35 = this->m_pGTMatchTypeText;
    v36 = v35->vfptr;
    v37 = TextData::Get(v45);
    v36[118].__vecDelDtor((NiRefObject *)v35, (unsigned int)v37);
    return;
  }
  v21 = pkProto->TournamentList[16].nResult;
  v22 = 0;
  if ( v21 != 4 && v21 )
    v22 = 1;
  v23 = pkProto->TournamentList[17].nResult;
  if ( v23 != 4 && v23 )
    ++v22;
  v24 = pkProto->TournamentList[18].nResult;
  if ( v24 != 4 && v24 )
    ++v22;
  v25 = pkProto->TournamentList[19].nResult;
  if ( v25 != 4 && v25 )
    ++v22;
  v26 = pkProto->TournamentList[20].nResult;
  if ( v26 != 4 && v26 )
    ++v22;
  v27 = pkProto->TournamentList[21].nResult;
  if ( v27 != 4 && v27 )
    ++v22;
  v28 = pkProto->TournamentList[22].nResult;
  if ( v28 != 4 && v28 )
    ++v22;
  v29 = pkProto->TournamentList[23].nResult;
  if ( v29 != 4 && v29 )
    ++v22;
  if ( v22 == 8 )
  {
    v44 = 339885954;
    goto LABEL_107;
  }
}

//----- (005DC3D0) --------------------------------------------------------
char __userpurge GuildTournamentScheduleWin::SetGuildTournamentList@<al>(GuildTournamentScheduleWin *this@<ecx>, D3DXCOLOR *a2@<ebx>, PROTO_NC_GUILD_TOURNAMENT_LIST_ACK *pkProto)
{
  GuildTournamentScheduleWin *v3; // edi@1
  NiUnsharedGeometryGroup *v4; // eax@2
  int v5; // ecx@2
  NiUnsharedGeometryGroup *v6; // eax@5
  signed int v7; // esi@5
  unsigned int *v8; // ebx@5
  char *v9; // eax@7
  char v10; // cl@8
  int v11; // edx@10
  int v12; // ecx@10
  int v13; // edx@10
  PgWinText *v14; // ecx@10
  int v15; // edx@12
  int v16; // ecx@12
  int v17; // edx@12
  PgWinText *v18; // ecx@12
  int v19; // edx@14
  int v20; // ecx@14
  int v21; // edx@14
  PgWinText *v22; // ecx@14
  char *v23; // eax@16
  char v24; // al@17
  unsigned int v25; // eax@18
  NiUnsharedGeometryGroup *v26; // eax@19
  NiUnsharedGeometryGroup *v27; // eax@21
  NiUnsharedGeometryGroup *v28; // eax@23
  NiUnsharedGeometryGroup *v29; // eax@25
  NiUnsharedGeometryGroup *v30; // eax@27
  char v31; // cl@31
  int v32; // edx@32
  int v33; // ecx@32
  int v34; // edx@32
  PgWinText *v35; // ecx@32
  PgWinText *v36; // ecx@33
  int v37; // edx@35
  int v38; // ecx@35
  int v39; // edx@35
  PgWinText *v40; // ecx@35
  int v41; // edx@37
  int v42; // ecx@37
  int v43; // edx@37
  PgWinText *v44; // ecx@37
  int v45; // edx@39
  int v46; // ecx@39
  int v47; // edx@39
  PgWinText *v48; // ecx@39
  D3DXCOLOR *v50; // [sp-4h] [bp-CCh]@5
  unsigned int *v51; // [sp+Ch] [bp-BCh]@5
  char acNextJoinTime[64]; // [sp+10h] [bp-B8h]@2
  char acJoinTime[64]; // [sp+50h] [bp-78h]@2
  char acGuildName[17]; // [sp+90h] [bp-38h]@8
  char acDateTime[32]; // [sp+A4h] [bp-24h]@19

  v3 = this;
  if ( pkProto )
  {
    memset(acJoinTime, 0, 0x40u);
    memset(acNextJoinTime, 0, 0x40u);
    v4 = TextData2::Get(0x504D8F7Cu);
    strftime(acJoinTime, 0x40u, (const char *)v4, &pkProto->tm_Time_Start);
    ((void (__stdcall *)(char *))v3->m_pGTJoinTime->vfptr[118].__vecDelDtor)(acJoinTime);
    v5 = pkProto->tm_Time_Match_End.tm_min + 2;
    if ( v5 == 60 )
    {
      ++pkProto->tm_Time_Match_End.tm_hour;
      pkProto->tm_Time_Match_End.tm_min = 0;
    }
    else
    {
      pkProto->tm_Time_Match_End.tm_min = v5;
    }
    v50 = a2;
    v6 = TextData2::Get(0x4BA58B78u);
    strftime(acNextJoinTime, 0x40u, (const char *)v6, &pkProto->tm_Time_Match_End);
    ((void (__stdcall *)(char *))v3->m_pGTNextJoinTime->vfptr[118].__vecDelDtor)(acNextJoinTime);
    GuildTournamentScheduleWin::CheckMatchType(v3, pkProto);
    v3->m_tJoinTime = pkProto->Time_Start;
    v7 = 0;
    v8 = &v3->m_uiScheduleTable[0].RightChild;
    v51 = &v3->m_uiScheduleTable[0].LeftChild;
    while ( 1 )
    {
      if ( v7 >= 16 )
      {
        v23 = (char *)pkProto + 21 * v7;
        if ( *((_DWORD *)v23 + 91) )
        {
          v31 = v23[363];
          if ( !v31 )
          {
            v32 = *((_DWORD *)v23 + 93);
            *(_DWORD *)acGuildName = *((_DWORD *)v23 + 92);
            v33 = *((_DWORD *)v23 + 94);
            *(_DWORD *)&acGuildName[4] = v32;
            v34 = *((_DWORD *)v23 + 95);
            *(_DWORD *)&acGuildName[8] = v33;
            v35 = v3->m_pMatchList[v7];
            *(_DWORD *)&acGuildName[12] = v34;
            acGuildName[16] = 0;
            ((void (__stdcall *)(char *, D3DXCOLOR *))v35->vfptr[118].__vecDelDtor)(acGuildName, v50);
            if ( v7 != 31 )
              goto LABEL_40;
            v36 = v3->m_pGTMatchTypeText;
            v50 = &Color::m_kDxYellowColor;
            goto LABEL_42;
          }
          if ( v31 == 2 )
          {
            v37 = *((_DWORD *)v23 + 93);
            *(_DWORD *)acGuildName = *((_DWORD *)v23 + 92);
            v38 = *((_DWORD *)v23 + 94);
            *(_DWORD *)&acGuildName[4] = v37;
            v39 = *((_DWORD *)v23 + 95);
            *(_DWORD *)&acGuildName[8] = v38;
            v40 = v3->m_pMatchList[v7];
            *(_DWORD *)&acGuildName[12] = v39;
            acGuildName[16] = 0;
            ((void (__stdcall *)(char *, D3DXCOLOR *))v40->vfptr[118].__vecDelDtor)(acGuildName, v50);
            v50 = (D3DXCOLOR *)&Color::m_kDxGrayColor;
            goto LABEL_41;
          }
          if ( v31 == 1 )
          {
            v41 = *((_DWORD *)v23 + 93);
            *(_DWORD *)acGuildName = *((_DWORD *)v23 + 92);
            v42 = *((_DWORD *)v23 + 94);
            *(_DWORD *)&acGuildName[4] = v41;
            v43 = *((_DWORD *)v23 + 95);
            *(_DWORD *)&acGuildName[8] = v42;
            v44 = v3->m_pMatchList[v7];
            *(_DWORD *)&acGuildName[12] = v43;
            acGuildName[16] = 0;
            ((void (__stdcall *)(char *, D3DXCOLOR *))v44->vfptr[118].__vecDelDtor)(acGuildName, v50);
            v50 = &Color::m_kDxYellowColor;
            goto LABEL_41;
          }
          if ( v31 == 4 )
          {
            v45 = *((_DWORD *)v23 + 93);
            *(_DWORD *)acGuildName = *((_DWORD *)v23 + 92);
            v46 = *((_DWORD *)v23 + 94);
            *(_DWORD *)&acGuildName[4] = v45;
            v47 = *((_DWORD *)v23 + 95);
            *(_DWORD *)&acGuildName[8] = v46;
            v48 = v3->m_pMatchList[v7];
            *(_DWORD *)&acGuildName[12] = v47;
            acGuildName[16] = 0;
            ((void (__stdcall *)(char *, D3DXCOLOR *))v48->vfptr[118].__vecDelDtor)(acGuildName, v50);
LABEL_40:
            v50 = &Color::m_kDxWhiteColor;
LABEL_41:
            v36 = v3->m_pMatchList[v7];
LABEL_42:
            ((void (*)(void))v36->vfptr[117].__vecDelDtor)();
            goto LABEL_43;
          }
        }
        else
        {
          v24 = pkProto->TournamentList[*v51].nResult;
          if ( v24 && v24 != 4 && v24 != 2 )
            goto LABEL_44;
          v25 = *v8;
          if ( *v8 < 8 )
          {
            *(_DWORD *)acDateTime = 0;
            *(_DWORD *)&acDateTime[4] = 0;
            *(_DWORD *)&acDateTime[8] = 0;
            *(_DWORD *)&acDateTime[12] = 0;
            *(_DWORD *)&acDateTime[16] = 0;
            *(_DWORD *)&acDateTime[20] = 0;
            *(_DWORD *)&acDateTime[24] = 0;
            *(_DWORD *)&acDateTime[28] = 0;
            v26 = TextData2::Get(0xD8DB2709);
            strftime(acDateTime, 0x1Fu, (const char *)v26, &pkProto->tm_Time_Match_161);
            ((void (__stdcall *)(char *))v3->m_pMatchList[v7]->vfptr[118].__vecDelDtor)(acDateTime);
LABEL_43:
            v51 += 3;
            v8 += 3;
            goto LABEL_44;
          }
          if ( v25 < 0x10 )
          {
            *(_DWORD *)acDateTime = 0;
            *(_DWORD *)&acDateTime[4] = 0;
            *(_DWORD *)&acDateTime[8] = 0;
            *(_DWORD *)&acDateTime[12] = 0;
            *(_DWORD *)&acDateTime[16] = 0;
            *(_DWORD *)&acDateTime[20] = 0;
            *(_DWORD *)&acDateTime[24] = 0;
            *(_DWORD *)&acDateTime[28] = 0;
            v27 = TextData2::Get(0xD8DB2709);
            strftime(acDateTime, 0x1Fu, (const char *)v27, &pkProto->tm_Time_Match_162);
            ((void (__stdcall *)(char *))v3->m_pMatchList[v7]->vfptr[118].__vecDelDtor)(acDateTime);
            goto LABEL_43;
          }
          if ( v25 < 0x18 )
          {
            *(_DWORD *)acDateTime = 0;
            *(_DWORD *)&acDateTime[4] = 0;
            *(_DWORD *)&acDateTime[8] = 0;
            *(_DWORD *)&acDateTime[12] = 0;
            *(_DWORD *)&acDateTime[16] = 0;
            *(_DWORD *)&acDateTime[20] = 0;
            *(_DWORD *)&acDateTime[24] = 0;
            *(_DWORD *)&acDateTime[28] = 0;
            v28 = TextData2::Get(0xD8DB2709);
            strftime(acDateTime, 0x1Fu, (const char *)v28, &pkProto->tm_Time_Match_8);
            ((void (__stdcall *)(_DWORD))v3->m_pMatchList[v7]->vfptr[118].__vecDelDtor)(acDateTime);
            goto LABEL_43;
          }
          if ( v25 < 0x1C )
          {
            *(_DWORD *)acDateTime = 0;
            *(_DWORD *)&acDateTime[4] = 0;
            *(_DWORD *)&acDateTime[8] = 0;
            *(_DWORD *)&acDateTime[12] = 0;
            *(_DWORD *)&acDateTime[16] = 0;
            *(_DWORD *)&acDateTime[20] = 0;
            *(_DWORD *)&acDateTime[24] = 0;
            *(_DWORD *)&acDateTime[28] = 0;
            v29 = TextData2::Get(0xD8DB2709);
            strftime(acDateTime, 0x1Fu, (const char *)v29, &pkProto->tm_Time_Match_4);
            ((void (__stdcall *)(_DWORD))v3->m_pMatchList[v7]->vfptr[118].__vecDelDtor)(acDateTime);
            goto LABEL_43;
          }
          if ( v25 < 0x1E )
          {
            *(_DWORD *)acDateTime = 0;
            *(_DWORD *)&acDateTime[4] = 0;
            *(_DWORD *)&acDateTime[8] = 0;
            *(_DWORD *)&acDateTime[12] = 0;
            *(_DWORD *)&acDateTime[16] = 0;
            *(_DWORD *)&acDateTime[20] = 0;
            *(_DWORD *)&acDateTime[24] = 0;
            *(_DWORD *)&acDateTime[28] = 0;
            v30 = TextData2::Get(0xD8DB2709);
            strftime(acDateTime, 0x1Fu, (const char *)v30, &pkProto->tm_Time_Match_2);
            ((void (__stdcall *)(_DWORD))v3->m_pMatchList[v7]->vfptr[118].__vecDelDtor)(acDateTime);
            goto LABEL_43;
          }
        }
      }
      else
      {
        v9 = (char *)pkProto + 21 * v7;
        if ( !*((_DWORD *)v9 + 91) )
        {
          ((void (__stdcall *)(void *))v3->m_pMatchList[v7]->vfptr[118].__vecDelDtor)(&unk_9B029E);
          goto LABEL_44;
        }
        v10 = v9[363];
        acGuildName[16] = 0;
        if ( !v10 )
          goto LABEL_14;
        if ( v10 == 2 )
        {
          v11 = *((_DWORD *)v9 + 93);
          *(_DWORD *)acGuildName = *((_DWORD *)v9 + 92);
          v12 = *((_DWORD *)v9 + 94);
          *(_DWORD *)&acGuildName[4] = v11;
          v13 = *((_DWORD *)v9 + 95);
          *(_DWORD *)&acGuildName[8] = v12;
          v14 = v3->m_pMatchList[v7];
          *(_DWORD *)&acGuildName[12] = v13;
          ((void (__stdcall *)(char *))v14->vfptr[118].__vecDelDtor)(acGuildName);
          ((void (__stdcall *)(void *))v3->m_pMatchList[v7]->vfptr[117].__vecDelDtor)(&Color::m_kDxGrayColor);
        }
        else
        {
          if ( v10 != 1 )
          {
            v9[363] = 4;
LABEL_14:
            v19 = *((_DWORD *)v9 + 93);
            *(_DWORD *)acGuildName = *((_DWORD *)v9 + 92);
            v20 = *((_DWORD *)v9 + 94);
            *(_DWORD *)&acGuildName[4] = v19;
            v21 = *((_DWORD *)v9 + 95);
            *(_DWORD *)&acGuildName[8] = v20;
            v22 = v3->m_pMatchList[v7];
            *(_DWORD *)&acGuildName[12] = v21;
            ((void (__stdcall *)(char *))v22->vfptr[118].__vecDelDtor)(acGuildName);
            ((void (__stdcall *)(D3DXCOLOR *))v3->m_pMatchList[v7]->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
            goto LABEL_44;
          }
          v15 = *((_DWORD *)v9 + 93);
          *(_DWORD *)acGuildName = *((_DWORD *)v9 + 92);
          v16 = *((_DWORD *)v9 + 94);
          *(_DWORD *)&acGuildName[4] = v15;
          v17 = *((_DWORD *)v9 + 95);
          *(_DWORD *)&acGuildName[8] = v16;
          v18 = v3->m_pMatchList[v7];
          *(_DWORD *)&acGuildName[12] = v17;
          ((void (__stdcall *)(char *))v18->vfptr[118].__vecDelDtor)(acGuildName);
          ((void (__stdcall *)(D3DXCOLOR *))v3->m_pMatchList[v7]->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
        }
      }
LABEL_44:
      if ( ++v7 >= 31 )
        return 1;
    }
  }
  return 0;
}
// 5DC3D0: could not find valid save-restore pair for ebx

//----- (005DC9E0) --------------------------------------------------------
void __thiscall GuildTournamentScheduleWin::SetGuildTournamentMatchType(GuildTournamentScheduleWin *this, PROTO_NC_GUILD_TOURNAMENT_LIST_ACK *pkProto)
{
  GuildTournamentScheduleWin *v2; // edi@1
  NiRefObjectVtbl *v3; // esi@2
  NiUnsharedGeometryGroup *v4; // eax@2
  char *v5; // esi@3
  signed int v6; // ebx@3
  NiRefObjectVtbl *v7; // esi@5
  NiUnsharedGeometryGroup *v8; // eax@5

  v2 = this;
  switch ( pkProto->nMatchType )
  {
    case 0:
      v3 = this->m_pGTMatchTypeText->vfptr;
      v4 = TextData::Get(0x75776984u);
      break;
    case 1:
      v5 = (char *)this->m_pMatchList;
      v6 = 31;
      do
      {
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v5 + 472))(&unk_9B029F);
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v5 + 468))(&Color::m_kDxWhiteColor);
        v5 += 4;
        --v6;
      }
      while ( v6 );
      v7 = v2->m_pGTMatchTypeText->vfptr;
      v8 = TextData::Get(0x645558BCu);
      v7[118].__vecDelDtor((NiRefObject *)v2->m_pGTMatchTypeText, (unsigned int)v8);
      return;
    case 2:
    case 3:
      v3 = this->m_pGTMatchTypeText->vfptr;
      v4 = TextData::Get(0x5BA6B3E3u);
      break;
    case 4:
      v3 = this->m_pGTMatchTypeText->vfptr;
      v4 = TextData::Get(0xC0AEB512);
      break;
    case 5:
      v3 = this->m_pGTMatchTypeText->vfptr;
      v4 = TextData::Get(0xC0AEB513);
      break;
    case 6:
      v3 = this->m_pGTMatchTypeText->vfptr;
      v4 = TextData::Get(0x7E70B8D6u);
      break;
    case 7:
      v3 = this->m_pGTMatchTypeText->vfptr;
      v4 = TextData::Get(0x23785992u);
      break;
    case 8:
      v3 = this->m_pGTMatchTypeText->vfptr;
      v4 = TextData::Get(0xCDDD1E31);
      break;
    case 9:
      v3 = this->m_pGTMatchTypeText->vfptr;
      v4 = TextData::Get(0xEB181838);
      break;
    case 0xA:
      v3 = this->m_pGTMatchTypeText->vfptr;
      v4 = TextData::Get(0xCFDD0F27);
      break;
    default:
      v3 = this->m_pGTMatchTypeText->vfptr;
      v4 = (NiUnsharedGeometryGroup *)fs("Type : %d", pkProto->nMatchType);
      break;
  }
  v3[118].__vecDelDtor((NiRefObject *)v2->m_pGTMatchTypeText, (unsigned int)v4);
}

//----- (005DCBA0) --------------------------------------------------------
void __thiscall GuildTournamentScheduleWin::SetGuildTournamentMatchType(GuildTournamentScheduleWin *this, unsigned int uiMsg)
{
  GuildTournamentScheduleWin *v2; // edi@1
  NiRefObjectVtbl *v3; // esi@2
  NiUnsharedGeometryGroup *v4; // eax@2
  char *v5; // esi@3
  signed int v6; // ebx@3
  NiRefObjectVtbl *v7; // esi@5
  NiUnsharedGeometryGroup *v8; // eax@5

  v2 = this;
  switch ( uiMsg )
  {
    case 0u:
      v3 = this->m_pGTMatchTypeText->vfptr;
      v4 = TextData::Get(0x75776984u);
      break;
    case 1u:
      v5 = (char *)this->m_pMatchList;
      v6 = 31;
      do
      {
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v5 + 472))(&unk_9B02A6);
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v5 + 468))(&Color::m_kDxWhiteColor);
        v5 += 4;
        --v6;
      }
      while ( v6 );
      v7 = v2->m_pGTMatchTypeText->vfptr;
      v8 = TextData::Get(0x645558BCu);
      v7[118].__vecDelDtor((NiRefObject *)v2->m_pGTMatchTypeText, (unsigned int)v8);
      return;
    case 2u:
    case 3u:
      v3 = this->m_pGTMatchTypeText->vfptr;
      v4 = TextData::Get(0x5BA6B3E3u);
      break;
    case 4u:
      v3 = this->m_pGTMatchTypeText->vfptr;
      v4 = TextData::Get(0xC0AEB512);
      break;
    case 5u:
      v3 = this->m_pGTMatchTypeText->vfptr;
      v4 = TextData::Get(0xC0AEB513);
      break;
    case 6u:
      v3 = this->m_pGTMatchTypeText->vfptr;
      v4 = TextData::Get(0x7E70B8D6u);
      break;
    case 7u:
      v3 = this->m_pGTMatchTypeText->vfptr;
      v4 = TextData::Get(0x23785992u);
      break;
    case 8u:
      v3 = this->m_pGTMatchTypeText->vfptr;
      v4 = TextData::Get(0xCDDD1E31);
      break;
    case 9u:
      v3 = this->m_pGTMatchTypeText->vfptr;
      v4 = TextData::Get(0xEB181838);
      break;
    case 0xAu:
      v3 = this->m_pGTMatchTypeText->vfptr;
      v4 = TextData::Get(0xCFDD0F27);
      break;
    default:
      v3 = this->m_pGTMatchTypeText->vfptr;
      v4 = (NiUnsharedGeometryGroup *)fs("Type : %d", uiMsg);
      break;
  }
  v3[118].__vecDelDtor((NiRefObject *)v2->m_pGTMatchTypeText, (unsigned int)v4);
}

//----- (005DCD50) --------------------------------------------------------
GuildTournamentScheduleWin *__cdecl GuildTournamentScheduleWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  GuildTournamentScheduleWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x330u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    GuildTournamentScheduleWin::GuildTournamentScheduleWin((GuildTournamentScheduleWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (GuildTournamentScheduleWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (005DCE80) --------------------------------------------------------
GuildTournamentScheduleWin *__thiscall GuildTournamentScheduleWin::`scalar deleting destructor'(GuildTournamentScheduleWin *this, unsigned int a2)
{
  GuildTournamentScheduleWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildTournamentScheduleWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildTournamentScheduleWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B0418: using guessed type void (__thiscall *GuildTournamentScheduleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B0434: using guessed type int (__thiscall *GuildTournamentScheduleWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005DCEC0) --------------------------------------------------------
void __thiscall GTStorageInvWin::GTStorageInvWin(GTStorageInvWin *this)
{
  GTStorageInvWin *v1; // esi@1

  v1 = this;
  ItemIcon::ItemIcon((ItemIcon *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GTStorageInvWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GTStorageInvWin::`vftable'{for `IDirectMessenger'};
  v1->m_uiInvIndex = -1;
  ItemIcon::SetItem((ItemIcon *)&v1->vfptr, 0, 1);
}
// 9B0848: using guessed type void (__thiscall *GTStorageInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B0864: using guessed type int (__thiscall *GTStorageInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005DCF30) --------------------------------------------------------
void __thiscall GTStorageInvWin::~GTStorageInvWin(GTStorageInvWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GTStorageInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GTStorageInvWin::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
}
// 9B0848: using guessed type void (__thiscall *GTStorageInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B0864: using guessed type int (__thiscall *GTStorageInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005DCF50) --------------------------------------------------------
char __thiscall GTStorageInvWin::Create(GTStorageInvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent)
{
  GTStorageInvWin *v5; // esi@1
  char result; // al@1

  v5 = this;
  result = ItemIcon::Create((ItemIcon *)&this->vfptr, iXPos, iYPos, pkParent);
  if ( result )
  {
    v5->m_uiInvIndex = uiInvIndex;
    result = 1;
  }
  return result;
}

//----- (005DCF90) --------------------------------------------------------
void __thiscall GTStorageInvWin::OnFirstHitWin(GTStorageInvWin *this)
{
  GTStorageInvWin *v1; // esi@1
  ItemInfoWin *v2; // edi@2
  Item *v3; // eax@3

  v1 = this;
  if ( ItemIcon::GetItem((ItemIcon *)&this->vfptr) )
  {
    v2 = (ItemInfoWin *)v1->m_pkToolTipWin;
    if ( v2 )
    {
      v3 = ItemIcon::GetItem((ItemIcon *)&v1->vfptr);
      ItemInfoWin::SetItemInfo(v2, v3);
      PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
    }
  }
}

//----- (005DCFF0) --------------------------------------------------------
void __thiscall GuildTournamentStorageWin::ResetContents(GuildTournamentStorageWin *this)
{
  ItemIcon **v1; // edi@1
  ItemIcon **v2; // esi@2
  signed int v3; // ebx@2
  unsigned int v4; // esi@4
  Item *v5; // eax@5

  v1 = (ItemIcon **)this->m_apkInvWin;
  if ( this->m_apkInvWin[0] )
  {
    v2 = (ItemIcon **)this->m_apkInvWin;
    v3 = 36;
    do
    {
      ItemIcon::SetItem(*v2, 0, 1);
      ++v2;
      --v3;
    }
    while ( v3 );
    v4 = 0;
    do
    {
      v5 = GuildTournamentStorage::Get(v4);
      ItemIcon::SetItem(*v1, v5, 1);
      ++v4;
      ++v1;
    }
    while ( v4 < 0x24 );
  }
}

//----- (005DD050) --------------------------------------------------------
void __thiscall GuildTournamentStorageWin::GTTInvenItemRemoval(GuildTournamentStorageWin *this, unsigned int uiInvIndex)
{
  if ( !this->m_apkInvWin[uiInvIndex] )
    ItemIcon::SetItem(0, 0, 1);
}

//----- (005DD070) --------------------------------------------------------
void __stdcall GuildTournamentStorageWin::OnDrawingMoneyWinOk(__int64 i64Money)
{
  PROTO_NC_ITEM_GUILD_STORAGE_WITHDRAW_REQ kProto; // [sp+0h] [bp-8h]@1

  kProto.cen = i64Money;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x26u, &kProto, 8);
}

//----- (005DD0A0) --------------------------------------------------------
void __thiscall GuildTournamentStorageWin::UpdateMeWin(GuildTournamentStorageWin *this, float fCurTime)
{
  GuildTournamentStorageWin *v2; // esi@1
  __int64 v3; // rax@1
  __int64 v4; // rax@1
  __int64 v5; // rax@1
  __int64 v6; // rax@1
  __int64 v7; // rax@1
  __int64 v8; // rax@1
  __int64 v9; // rax@1
  __int64 v10; // rax@1
  unsigned int dwValue; // [sp+4h] [bp-88h]@1
  char acStr[128]; // [sp+8h] [bp-84h]@1

  v2 = this;
  v3 = GuildTournamentStorage::GetMoney();
  v4 = User::GetGem(v3);
  sprintf(acStr, "%I64d", v4);
  ((void (__stdcall *)(_DWORD))v2->m_pkGemText->vfptr[118].__vecDelDtor)(acStr);
  v5 = GuildTournamentStorage::GetMoney();
  v6 = User::GetGold(v5);
  sprintf(acStr, "%I64d", v6);
  ((void (__stdcall *)(_DWORD))v2->m_pkGoldText->vfptr[118].__vecDelDtor)(acStr);
  v7 = GuildTournamentStorage::GetMoney();
  v8 = User::GetSilver(v7);
  sprintf(acStr, "%I64d", v8);
  ((void (__stdcall *)(_DWORD))v2->m_pkSilverText->vfptr[118].__vecDelDtor)(acStr);
  v9 = GuildTournamentStorage::GetMoney();
  v10 = User::GetCopper(v9);
  sprintf(acStr, "%I64d", v10);
  ((void (__stdcall *)(_DWORD))v2->m_pkCopperText->vfptr[118].__vecDelDtor)(acStr);
  ChargedItemList::GetTotalEffectingValue(EE_MORESTORAGE, &dwValue);
}

//----- (005DD1C0) --------------------------------------------------------
void GuildTournamentStorageWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "GuildTStore");
}

//----- (005DD1F0) --------------------------------------------------------
void __thiscall GuildTournamentStorageWin::GuildTournamentStorageWin(GuildTournamentStorageWin *this)
{
  GuildTournamentStorageWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GuildTournamentStorageWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildTournamentStorageWin::`vftable'{for `IDirectMessenger'};
  v1->m_kDrop.m_pkSender = 0;
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  v1->m_kDropContents.m_uiLot = 0;
  v1->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v1->m_kDropContents.m_kItemID = -1;
  v1->m_apkTabBtn = 0;
  v1->m_apkTabOnSpr = 0;
  v1->m_apkTabDisableSpr = 0;
  v1->m_kDrop.m_pkContents = &v1->m_kDropContents;
  v1->m_apkInvWin[0] = 0;
  v1->m_apkInvWin[1] = 0;
  v1->m_apkInvWin[2] = 0;
  v1->m_apkInvWin[3] = 0;
  v1->m_apkInvWin[4] = 0;
  v1->m_apkInvWin[5] = 0;
  v1->m_apkInvWin[6] = 0;
  v1->m_apkInvWin[7] = 0;
  v1->m_apkInvWin[8] = 0;
  v1->m_apkInvWin[9] = 0;
  v1->m_apkInvWin[10] = 0;
  v1->m_apkInvWin[11] = 0;
  v1->m_apkInvWin[12] = 0;
  v1->m_apkInvWin[13] = 0;
  v1->m_apkInvWin[14] = 0;
  v1->m_apkInvWin[15] = 0;
  v1->m_apkInvWin[16] = 0;
  v1->m_apkInvWin[17] = 0;
  v1->m_apkInvWin[18] = 0;
  v1->m_apkInvWin[19] = 0;
  v1->m_apkInvWin[20] = 0;
  v1->m_apkInvWin[21] = 0;
  v1->m_apkInvWin[22] = 0;
  v1->m_apkInvWin[23] = 0;
  v1->m_apkInvWin[24] = 0;
  v1->m_apkInvWin[25] = 0;
  v1->m_apkInvWin[26] = 0;
  v1->m_apkInvWin[27] = 0;
  v1->m_apkInvWin[28] = 0;
  v1->m_apkInvWin[29] = 0;
  v1->m_apkInvWin[30] = 0;
  v1->m_apkInvWin[31] = 0;
  v1->m_apkInvWin[32] = 0;
  v1->m_apkInvWin[33] = 0;
  v1->m_apkInvWin[34] = 0;
  v1->m_apkInvWin[35] = 0;
  v1->m_pkCopperText = 0;
  v1->m_pkSilverText = 0;
  v1->m_pkGoldText = 0;
  v1->m_pkGemText = 0;
  v1->m_pkMoneyWin = 0;
  v1->m_bDivide = 0;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9B0AD4: using guessed type void (__thiscall *GuildTournamentStorageWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B0AF4: using guessed type int (__thiscall *GuildTournamentStorageWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005DD360) --------------------------------------------------------
void __thiscall GuildTournamentStorageWin::~GuildTournamentStorageWin(GuildTournamentStorageWin *this)
{
  GuildTournamentStorageWin *v1; // esi@1
  MoneyWin *v2; // eax@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildTournamentStorageWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildTournamentStorageWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_pkMoneyWin;
  if ( v2 )
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
  v1->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9B0AD4: using guessed type void (__thiscall *GuildTournamentStorageWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B0AF4: using guessed type int (__thiscall *GuildTournamentStorageWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005DD3F0) --------------------------------------------------------
void GuildTournamentStorageWin::OnClose()
{
  InventoryWin::ms_uiMode = 0;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x1Du, 0xA0u, 0, 0);
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (005DD410) --------------------------------------------------------
void __thiscall GTStorageInvWin::DoAction(GTStorageInvWin *this)
{
  GTStorageInvWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiInvIndex);
}

//----- (005DD440) --------------------------------------------------------
void __thiscall GTStorageInvWin::DoRAction(GTStorageInvWin *this)
{
  GTStorageInvWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiRCmdMsg, v1->m_uiInvIndex);
}

//----- (005DD470) --------------------------------------------------------
void __thiscall GuildTournamentStorageWin::OnInvShiftLClick(GuildTournamentStorageWin *this, unsigned int uiInvIndex)
{
  GuildTournamentStorageWin *v2; // edi@1
  Item *v3; // esi@1
  GameFrameWork *v4; // ebx@3
  char *v5; // ST0C_4@3
  int v6; // eax@3

  v2 = this;
  v3 = ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[uiInvIndex]->vfptr);
  if ( v3 )
  {
    v2->m_bDivide = 0;
    if ( (unsigned int)((int (__thiscall *)(_DWORD))v3->vfptr[3].__vecDelDtor)(v3) > 1 )
    {
      v2->m_bDivide = 1;
      GuildTournamentStorageWin::ms_kFrom.Inven = uiInvIndex & 0x3FF | 0x1000;
      v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      v5 = (char *)TextData::Get(0xFBF1412E);
      v6 = ((int (__thiscall *)(_DWORD))v3->vfptr[3].__vecDelDtor)(v3);
      GameFrameWork::OnOpenDivideWin(v4, (PgWin *)&v2->vfptr, 0x10u, v6 - 1, v5, 3u);
    }
  }
}

//----- (005DD500) --------------------------------------------------------
void __thiscall GuildTournamentStorageWin::OnInvRClick(GuildTournamentStorageWin *this, unsigned int uiInvIndex)
{
  Item *v2; // ebx@1
  GameFrameWork *v3; // eax@2
  int v4; // esi@2
  int v5; // edi@2
  int v6; // edx@2
  unsigned int v7; // eax@5
  NiUnsharedGeometryGroup *v8; // eax@7
  ITEM_INVEN kTo; // [sp+4h] [bp-Ch]@8
  GameFrameWork *pkGame; // [sp+8h] [bp-8h]@2
  ITEM_INVEN kFrom; // [sp+Ch] [bp-4h]@8

  v2 = ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[uiInvIndex]->vfptr);
  if ( v2 )
  {
    v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v4 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    v5 = v2->m_kStruct.itemid;
    v6 = *(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    pkGame = v3;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(v6 + 16))(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable, v5) )
    {
      if ( (unsigned __int16)v5 <= *(_WORD *)(v4 + 200) && *(_DWORD *)(*(_DWORD *)(v4 + 196) + 4 * v5) )
      {
        v7 = Inventory::GetInvIdxLotIsNotMax(&g_kInventory, v2);
        if ( v7 == -1 )
        {
          if ( pkGame )
          {
            v8 = TextData::Get(0x91A8CDCE);
            GameFrameWork::AddSysMsg(pkGame, (const char *)v8);
          }
        }
        else
        {
          kTo.Inven = v7 & 0x3FF | 0x2400;
          kFrom.Inven = uiInvIndex & 0x3FF | 0x1000;
          if ( (kTo.Inven & 0x3FF) != -1 && pkGame )
          {
            GameFrameWork::NcItemRelocReq(pkGame, &kFrom, &kTo);
            SoundMgr::PlayItemPutSound(v2->m_kStruct.itemid);
          }
        }
      }
    }
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (005DD610) --------------------------------------------------------
char __thiscall GuildTournamentStorageWin::DropOnInv(GuildTournamentStorageWin *this, DropContents *pkContents, unsigned int uiReceiverInvIndex)
{
  DropContents::SenderType v3; // ebx@1
  GuildTournamentStorageWin *v4; // esi@1
  _WORD *v5; // eax@2
  unsigned int v6; // edi@5
  PgFrameWork *v7; // eax@5
  unsigned int v8; // ebx@6
  Item *v9; // eax@8
  Item *v10; // esi@8
  void *v12; // edi@12
  ItemInfo *v13; // ebx@13
  GameFrameWork *v14; // edi@14
  char *v15; // eax@15
  GameFrameWork *v16; // eax@16
  int v17; // esi@19
  NiUnsharedGeometryGroup *v18; // edi@19
  GameFrameWork *pkGame; // [sp+14h] [bp+8h]@5

  v3 = pkContents->m_eSenderType;
  v4 = this;
  if ( pkContents->m_eType == CT_ITEM )
  {
    v5 = pkContents->m_apvParam[0];
    if ( v5 )
      SoundMgr::PlayItemPutSound(v5[4]);
  }
  if ( v3 == 13 )
  {
    v6 = pkContents->m_uiSenderIndex;
    v7 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    pkGame = (GameFrameWork *)v7;
    if ( !v4->m_bDivide )
      return 1;
    v4->m_bDivide = 0;
    v8 = v7[20].m_kMsgQ.m_uiHead;
    if ( !v8 || *(_DWORD *)(v8 + 376) == 3 )
    {
      v9 = ItemIcon::GetItem((ItemIcon *)&v4->m_apkInvWin[v6]->vfptr);
      v10 = v9;
      if ( v9 && (unsigned int)((int (__thiscall *)(Item *))v9->vfptr[3].__vecDelDtor)(v9) > 1 )
      {
        GuildTournamentStorageWin::ms_kTo.Inven = uiReceiverInvIndex & 0x3FF | 0x1000;
        GuildTournamentStorageWin::ms_kFrom.Inven = v6 & 0x3FF | 0x1000;
        GameFrameWork::NcItemSplitReq(
          pkGame,
          &GuildTournamentStorageWin::ms_kFrom,
          &GuildTournamentStorageWin::ms_kTo,
          *(_DWORD *)(v8 + 348));
        SoundMgr::PlayItemPutSound(v10->m_kStruct.itemid);
        return 1;
      }
      return 1;
    }
  }
  else if ( v3 == 5 )
  {
    v12 = pkContents->m_apvParam[0];
    if ( v12 )
    {
      v13 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(*(_WORD *)((char *)v12 + 1));
      if ( g_pkKeyboard->m_aucKeystate[5] & 4 )
      {
        v4->m_TargetItemID = *(_WORD *)((char *)v12 + 1);
        v14 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
        if ( v14 )
        {
          v15 = (char *)TextData::Get(0x2C588E90u);
          GameFrameWork::OnOpenDivideWin(v14, (PgWin *)&v4->vfptr, 0x11u, v13->MaxLot, v15, 3u);
          return 1;
        }
      }
      else
      {
        v16 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
        if ( v16 )
          GameFrameWork::NcItemBuyReq(v16, *(_WORD *)((char *)v12 + 1), v13->MaxLot);
      }
      return 1;
    }
  }
  else
  {
    v17 = (int)&v4->vfptr;
    v18 = TextData::Get(0xE2F1C6Eu);
    if ( *(_DWORD *)(v17 + 4) )
    {
      (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v17 + 4) + 4))(25, v18, v17);
      if ( *(_DWORD *)(v17 + 4) )
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v17 + 4) + 20))(25, v18, v17);
    }
    (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v17 + 20))(v17, 25, v18, v17);
  }
  return 0;
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (005DD810) --------------------------------------------------------
void __thiscall GuildTournamentStorageWin::OnDrawing(GuildTournamentStorageWin *this)
{
  GuildTournamentStorageWin *v1; // esi@1
  MoneyWin *v2; // ecx@1
  char *v3; // eax@2
  char *v4; // eax@2

  v1 = this;
  v2 = this->m_pkMoneyWin;
  if ( v2 )
  {
    MoneyWin::Open(v2, (PgWin *)&v1->vfptr, 0xFu, 0, &byte_9B0673);
    v3 = (char *)TextData::Get(0x89B68F88);
    MoneyWin::SetTitle1(v1->m_pkMoneyWin, v3);
    v4 = (char *)TextData::Get(0xD5F0EF45);
    MoneyWin::SetTitle2(v1->m_pkMoneyWin, v4);
  }
}

//----- (005DD860) --------------------------------------------------------
void __thiscall GuildTournamentStorageWin::SetToken(GuildTournamentStorageWin *this, unsigned __int64 uiToken)
{
  GuildTournamentStorageWin *v2; // esi@1
  NiRefObjectVtbl *v3; // edi@1
  char *v4; // eax@1
  char *v5; // eax@1

  v2 = this;
  v3 = this->m_pkToken->vfptr;
  v4 = (char *)TextData2::Get(0x809BDFE9);
  v5 = fs(v4, uiToken);
  v3[118].__vecDelDtor((NiRefObject *)v2->m_pkToken, (unsigned int)v5);
}

//----- (005DD8B0) --------------------------------------------------------
char __thiscall GTStorageInvWin::EatDropInstance(GTStorageInvWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  GTStorageInvWin *v4; // edi@1
  char result; // al@2
  DropContents *v6; // esi@3
  GuildTournamentStorageWin *v7; // eax@5

  v4 = this;
  if ( *pkDrop )
  {
    v6 = (DropContents *)(*pkDrop)->m_pkContents;
    if ( v6 )
    {
      v7 = (GuildTournamentStorageWin *)PgWin::GetParentWin((PgWin *)&this->vfptr);
      result = GuildTournamentStorageWin::DropOnInv(v7, v6, v4->m_uiInvIndex);
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (005DD8F0) --------------------------------------------------------
void __thiscall GuildTournamentStorageWin::OnInvLClick(GuildTournamentStorageWin *this, unsigned int uiInvIndex)
{
  GuildTournamentStorageWin *v2; // esi@1
  Item *v3; // edi@3

  v2 = this;
  this->m_bDivide = 0;
  if ( g_pkKeyboard->m_aucKeystate[5] & 4 )
  {
    GuildTournamentStorageWin::OnInvShiftLClick(this, uiInvIndex);
  }
  else
  {
    v3 = ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[uiInvIndex]->vfptr);
    if ( v3 )
    {
      v2->m_kDropContents.m_eType = 0;
      v2->m_kDropContents.m_eSenderType = 13;
      v2->m_kDropContents.m_apvParam[1] = 0;
      v2->m_kDropContents.m_apvParam[0] = v3;
      v2->m_kDropContents.m_uiSenderIndex = uiInvIndex;
      v2->m_kDropContents.m_uiLot = ((int (__thiscall *)(_DWORD))v3->vfptr[3].__vecDelDtor)(v3);
      v2->m_kDrop.m_pkSender = (PgWin *)v2;
      PgCursor::ms_pkDrop = &v2->m_kDrop;
      SoundMgr::PlayItemPutSound(v3->m_kStruct.itemid);
    }
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (005DD990) --------------------------------------------------------
void __thiscall GuildTournamentStorageWin::OnCommand(GuildTournamentStorageWin *this, unsigned int wParam, int lParam)
{
  GuildTournamentStorageWin *v3; // esi@1
  Item *v4; // eax@7
  int v5; // ecx@8

  v3 = this;
  switch ( wParam )
  {
    case 0xAu:
      GuildTournamentStorageWin::OnInvLClick(this, lParam);
      break;
    case 0xBu:
      GuildTournamentStorageWin::OnInvRClick(this, lParam);
      break;
    case 0xEu:
      GuildTournamentStorageWin::OnDrawing(this);
      break;
    case 0xFu:
      GuildTournamentStorageWin::OnDrawingMoneyWinOk(*(_QWORD *)lParam);
      break;
    case 0x10u:
      if ( lParam )
      {
        v4 = ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[GuildTournamentStorageWin::ms_kFrom.Inven & 0x3FF]->vfptr);
        if ( v4 )
        {
          v3->m_kDropContents.m_eSenderType = 13;
          v3->m_kDropContents.m_eType = 0;
          v5 = GuildTournamentStorageWin::ms_kFrom.Inven & 0x3FF;
          v3->m_kDropContents.m_apvParam[0] = v4;
          v3->m_kDropContents.m_uiSenderIndex = v5;
          v3->m_kDropContents.m_apvParam[1] = 0;
          ((void (__thiscall *)(_DWORD))v4->vfptr[3].__vecDelDtor)(v4);
          v3->m_kDropContents.m_uiLot = lParam;
          v3->m_kDrop.m_pkSender = (PgWin *)v3;
          PgCursor::ms_pkDrop = &v3->m_kDrop;
        }
      }
      break;
    default:
      return;
    case 0xCu:
      PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      GameFrameWork::OnCloseGTStorageWin();
      break;
    case 0x11u:
      if ( lParam )
        GameFrameWork::NcItemBuyReq((GameFrameWork *)this->m_pkFrameWork, this->m_TargetItemID, lParam);
      break;
    case 0x12u:
      GuildTournamentStorageWin::OnHelpLink();
      break;
  }
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (005DDAE0) --------------------------------------------------------
GTStorageInvWin *__cdecl GTStorageInvWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent)
{
  PgWin *v4; // eax@1
  ItemIcon *v5; // esi@1
  PgWin *v6; // edi@8
  GTStorageInvWin *v7; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v4 = (PgWin *)operator new(0x1C4u);
  v5 = (ItemIcon *)v4;
  result.m_pObject = v4;
  v9 = 0;
  if ( v4 )
  {
    ItemIcon::ItemIcon((ItemIcon *)v4);
    LOBYTE(v9) = 1;
    v5->vfptr = (NiRefObjectVtbl *)&GTStorageInvWin::`vftable'{for `NiNode'};
    v5->vfptr = (IDirectMessengerVtbl *)&GTStorageInvWin::`vftable'{for `IDirectMessenger'};
    v5[1].vfptr = (NiRefObjectVtbl *)-1;
    ItemIcon::SetItem(v5, 0, 1);
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v9 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, (PgWin *)&v5->vfptr);
  if ( (unsigned __int8)((int (__thiscall *)(ItemIcon *, int, int, unsigned int, PgWin *))v5->vfptr[154].__vecDelDtor)(
                          v5,
                          iXPos,
                          iYPos,
                          uiInvIndex,
                          pkParent) )
  {
    ((void (__thiscall *)(ItemIcon *))v5->vfptr[89].__vecDelDtor)(v5);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = (GTStorageInvWin *)v5;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, (PgWin *)&v5->vfptr);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = 0;
  }
  return v7;
}
// 9B0848: using guessed type void (__thiscall *GTStorageInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B0864: using guessed type int (__thiscall *GTStorageInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005DDC40) --------------------------------------------------------
GuildTournamentStorageWin *__cdecl GuildTournamentStorageWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  GuildTournamentStorageWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x270u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    GuildTournamentStorageWin::GuildTournamentStorageWin((GuildTournamentStorageWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (GuildTournamentStorageWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (005DDD70) --------------------------------------------------------
char __thiscall GuildTournamentStorageWin::Create(GuildTournamentStorageWin *this, PgFrameWork *pkFrameWork)
{
  GuildTournamentStorageWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  char result; // al@6
  const char *v6; // eax@9
  PgSprData *v7; // eax@10
  int v8; // edi@11
  int v9; // ebx@11
  NiSourceTexture *v10; // eax@11
  NiRefObjectVtbl *v11; // edx@11
  PgSprData *v12; // eax@13
  PgWinSpr *v13; // eax@13
  PgSprData *v14; // eax@13
  PgFont *v15; // eax@15
  PgWinText *v16; // eax@15
  NiRefObjectVtbl *v17; // edx@15
  NiUnsharedGeometryGroup *v18; // eax@15
  PgSprData *v19; // eax@15
  PgSprData *v20; // eax@16
  NiRefObjectVtbl *v21; // eax@16
  IconWin **v22; // ecx@16
  PgWinBut *v23; // eax@17
  char *v24; // eax@17
  PgSprData *v25; // eax@17
  PgWinSpr *v26; // eax@17
  PgWinBut *v27; // ST6C_4@17
  PgFont *v28; // ST68_4@17
  unsigned int v29; // ST64_4@17
  unsigned int v30; // eax@17
  PgWinText *v31; // eax@17
  NiRefObjectVtbl *v32; // edx@17
  NiUnsharedGeometryGroup *v33; // eax@17
  PgSprData *v34; // eax@17
  PgWinText *v35; // ST6C_4@17
  PgFont *v36; // ST68_4@17
  unsigned int v37; // ST64_4@17
  unsigned int v38; // eax@17
  PgWinText *v39; // eax@17
  NiRefObjectVtbl *v40; // edx@17
  NiSourceTexture *v41; // ST74_4@17
  NiNode *v42; // edx@17
  PgSprData *v43; // eax@17
  PgWinText *v44; // ST6C_4@17
  PgFont *v45; // ST68_4@17
  unsigned int v46; // ST64_4@17
  unsigned int v47; // eax@17
  PgWinText *v48; // eax@17
  NiRefObjectVtbl *v49; // edx@17
  NiSourceTexture *v50; // ST74_4@17
  NiNode *v51; // edx@17
  PgSprData *v52; // eax@17
  PgWinText *v53; // ST6C_4@17
  PgFont *v54; // ST68_4@17
  unsigned int v55; // ST64_4@17
  unsigned int v56; // eax@17
  PgWinText *v57; // eax@17
  NiRefObjectVtbl *v58; // edx@17
  NiSourceTexture *v59; // ST74_4@17
  NiNode *v60; // edx@17
  PgSprData *v61; // eax@17
  PgWinText *v62; // ST6C_4@17
  PgFont *v63; // ST68_4@17
  unsigned int v64; // ST64_4@17
  unsigned int v65; // eax@17
  PgWinText *v66; // eax@17
  NiRefObjectVtbl *v67; // edx@17
  NiSourceTexture *v68; // ST74_4@17
  NiNode *v69; // edx@17
  NiNode *v70; // esi@18
  PgFont *v71; // eax@23
  PgWinText *v72; // eax@23
  NiRefObjectVtbl *v73; // edi@23
  char *v74; // eax@23
  char *v75; // eax@23
  NiNode *v76; // esi@24
  unsigned int uiWidth; // [sp+8Ch] [bp-58h]@13
  unsigned int uiHeight; // [sp+90h] [bp-54h]@13
  NiRefObjectVtbl *v79; // [sp+94h] [bp-50h]@16
  int i; // [sp+98h] [bp-4Ch]@7
  NiSourceTexture *pkTexture; // [sp+9Ch] [bp-48h]@1
  int uiTop; // [sp+A0h] [bp-44h]@10
  int uiLeft; // [sp+A4h] [bp-40h]@10
  NiPointer<NiNode> spNode; // [sp+A8h] [bp-3Ch]@1
  PgWinText *pkTextWin; // [sp+ACh] [bp-38h]@11
  char acShapeName[33]; // [sp+B0h] [bp-34h]@16
  int v87; // [sp+E0h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v87 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  pkTexture = v3;
  if ( !v3 )
    goto LABEL_30;
  i = (int)pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildTStore.nif");
  PgUtil::LoadNodeNifFile(v6, &spNode, (NiTexturePalette *)i);
  if ( !spNode.m_pObject )
    return 0;
  v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v7, 0, pkFrameWork, "GuildTournamentStorageWin", 0) )
  {
LABEL_30:
    v4 = spNode.m_pObject;
    v87 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
    return 0;
  }
  v8 = uiLeft;
  v9 = uiTop;
  pkTextWin = (PgWinText *)PgSprData::Create(
                             (NiAVObject *)&spNode.m_pObject->vfptr,
                             "ClsNor",
                             &uiLeft,
                             &uiTop,
                             pkTexture);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xCu, 0, 0);
  v10 = MenuTexMgr::GetTexture(0x18u);
  v11 = spNode.m_pObject->vfptr;
  i = (int)v10;
  if ( ((int (__stdcall *)(const char *))v11[18].__vecDelDtor)("HelpLinkNor") )
  {
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "HelpLinkNor",
                               &uiLeft,
                               &uiTop,
                               (NiSourceTexture *)i);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x12u, 0, 0);
  }
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
  v13 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, pkTexture);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v14, (PgWin *)&v2->vfptr, 0, 0);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v15 = Font::Get(0);
    v16 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9 + 2, uiWidth, uiHeight, v15, (PgWin *)&v2->vfptr, 0, 0);
    v17 = v16->vfptr;
    pkTextWin = v16;
    v17[122].__vecDelDtor((NiRefObject *)v16, 5u);
    ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
    i = (int)&pkTextWin->vfptr[118];
    v18 = TextData::Get(0x378CA581u);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))i)(pkTextWin, v18);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, pkTexture);
    PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v19, (PgWin *)&v2->vfptr, 0, 0);
    i = 0;
    pkTextWin = (PgWinText *)v2->m_apkInvWin;
    do
    {
      v79 = (NiRefObjectVtbl *)(i + 1);
      sprintf(acShapeName, "IconSlot%03d", i + 1);
      v20 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, pkTexture);
      PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v20, (PgWin *)&v2->vfptr, 0, 0);
      v21 = (NiRefObjectVtbl *)GTStorageInvWin::CreateWin(uiLeft - v8 + 1, uiTop - v9 + 1, i, (PgWin *)&v2->vfptr);
      pkTextWin->vfptr = v21;
      ItemIcon::SetItem((ItemIcon *)v21, 0, 1);
      (*((void (__stdcall **)(_DWORD))pkTextWin->vfptr->__vecDelDtor + 129))(10);
      (*((void (__stdcall **)(_DWORD))pkTextWin->vfptr->__vecDelDtor + 140))(11);
      v22 = (IconWin **)pkTextWin;
      pkTextWin->vfptr[68].__vecDelDtor = (void *(__thiscall *)(NiRefObject *, unsigned int))g_pkItemInfoWin;
      IconWin::ShowFocus(*v22, 1);
      pkTextWin = (PgWinText *)((char *)pkTextWin + 4);
      i = (int)v79;
    }
    while ( (signed int)v79 < 36 );
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "Tab01_Off",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Tab01_Dis");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Tab01_On");
    v23 = PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xDu, 0, 0);
    v2->m_apkTabBtn = v23;
    v23->m_pkToolTipWin = g_pkToolTipWin;
    v24 = (char *)TextData::Get(0x89C2B5DB);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_apkTabBtn->vfptr, v24);
    v25 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Num01", &uiLeft, &uiTop, 0);
    v26 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v25, (PgWin *)&v2->vfptr, 0, 0);
    v26->vfptr[60].__vecDelDtor((NiRefObject *)v26, 0);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "DrawNor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "DrawClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "DrawOver");
    v27 = PgWinBut::CreateWin(uiLeft - v8 + 60, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xEu, 0, 0);
    i = (int)v27;
    v28 = Font::Get(0);
    v29 = (*(int (**)(void))(*(_DWORD *)i + 148))();
    v30 = (*(int (**)(void))(*(_DWORD *)i + 144))();
    v31 = PgWinText::CreateWin(0, 1, v30, v29, v28, (PgWin *)&v27->vfptr, 0, 0);
    v32 = v31->vfptr;
    pkTextWin = v31;
    v32[122].__vecDelDtor((NiRefObject *)v31, 5u);
    v79 = pkTextWin->vfptr + 118;
    v33 = TextData::Get(0x89B68F88);
    v79->__vecDelDtor(pkTextWin, v33);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v34 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GemInput", &uiLeft, &uiTop, pkTexture);
    v35 = (PgWinText *)PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v34, (PgWin *)&v2->vfptr, 0, 0);
    pkTextWin = v35;
    v36 = Font::Get(0);
    v37 = ((int (*)(void))pkTextWin->vfptr[37].__vecDelDtor)();
    v38 = ((int (*)(void))pkTextWin->vfptr[36].__vecDelDtor)();
    v39 = PgWinText::CreateWin(0, 1, v38, v37, v36, (PgWin *)&v35->vfptr, 0, 0);
    v40 = v39->vfptr;
    pkTextWin = v39;
    v40[122].__vecDelDtor((NiRefObject *)v39, 6u);
    ((void (__stdcall *)(void *))pkTextWin->vfptr[118].__vecDelDtor)(&unk_9B0669);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v41 = pkTexture;
    v42 = spNode.m_pObject;
    v2->m_pkGemText = pkTextWin;
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&v42->vfptr, "GemBtn", &uiLeft, &uiTop, v41);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GemBtn");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GemBtn");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0, 0, 0);
    v43 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GoldInput", &uiLeft, &uiTop, pkTexture);
    v44 = (PgWinText *)PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v43, (PgWin *)&v2->vfptr, 0, 0);
    pkTextWin = v44;
    v45 = Font::Get(0);
    v46 = ((int (*)(void))pkTextWin->vfptr[37].__vecDelDtor)();
    v47 = ((int (*)(void))pkTextWin->vfptr[36].__vecDelDtor)();
    v48 = PgWinText::CreateWin(0, 1, v47, v46, v45, (PgWin *)&v44->vfptr, 0, 0);
    v49 = v48->vfptr;
    pkTextWin = v48;
    v49[122].__vecDelDtor((NiRefObject *)v48, 6u);
    ((void (__stdcall *)(void *))pkTextWin->vfptr[118].__vecDelDtor)(&unk_9B066A);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v50 = pkTexture;
    v51 = spNode.m_pObject;
    v2->m_pkGoldText = pkTextWin;
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&v51->vfptr, "GoldBtn", &uiLeft, &uiTop, v50);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GoldBtn");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GoldBtn");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0, 0, 0);
    v52 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SilverInput", &uiLeft, &uiTop, pkTexture);
    v53 = (PgWinText *)PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v52, (PgWin *)&v2->vfptr, 0, 0);
    pkTextWin = v53;
    v54 = Font::Get(0);
    v55 = ((int (*)(void))pkTextWin->vfptr[37].__vecDelDtor)();
    v56 = ((int (*)(void))pkTextWin->vfptr[36].__vecDelDtor)();
    v57 = PgWinText::CreateWin(0, 1, v56, v55, v54, (PgWin *)&v53->vfptr, 0, 0);
    v58 = v57->vfptr;
    pkTextWin = v57;
    v58[122].__vecDelDtor((NiRefObject *)v57, 6u);
    ((void (__stdcall *)(void *))pkTextWin->vfptr[118].__vecDelDtor)(&unk_9B066B);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v59 = pkTexture;
    v60 = spNode.m_pObject;
    v2->m_pkSilverText = pkTextWin;
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&v60->vfptr, "SilverBtn", &uiLeft, &uiTop, v59);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "SilverBtn");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "SilverBtn");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0, 0, 0);
    v61 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CopperInput", &uiLeft, &uiTop, pkTexture);
    v62 = (PgWinText *)PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v61, (PgWin *)&v2->vfptr, 0, 0);
    pkTextWin = v62;
    v63 = Font::Get(0);
    v64 = ((int (*)(void))pkTextWin->vfptr[37].__vecDelDtor)();
    v65 = ((int (*)(void))pkTextWin->vfptr[36].__vecDelDtor)();
    v66 = PgWinText::CreateWin(0, 1, v65, v64, v63, (PgWin *)&v62->vfptr, 0, 0);
    v67 = v66->vfptr;
    pkTextWin = v66;
    v67[122].__vecDelDtor((NiRefObject *)v66, 6u);
    ((void (__stdcall *)(void *))pkTextWin->vfptr[118].__vecDelDtor)(&unk_9B0672);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v68 = pkTexture;
    v69 = spNode.m_pObject;
    v2->m_pkCopperText = pkTextWin;
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&v69->vfptr, "CopperBtn", &uiLeft, &uiTop, v68);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "CopperBtn");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "CopperBtn");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0, 0, 0);
    if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
    {
      v71 = Font::Get(0);
      v72 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9 + 2, uiWidth, uiHeight, v71, (PgWin *)&v2->vfptr, 0, 0);
      v2->m_pkToken = v72;
      v72->vfptr[122].__vecDelDtor((NiRefObject *)v72, 5u);
      ((void (__stdcall *)(struct D3DXCOLOR *))v2->m_pkToken->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
      v73 = v2->m_pkToken->vfptr;
      v74 = (char *)TextData2::Get(0x809BDFE9);
      v75 = fs(v74, 0);
      v73[118].__vecDelDtor((NiRefObject *)v2->m_pkToken, (unsigned int)v75);
      ((void (__stdcall *)(_DWORD))v2->m_pkToken->vfptr[60].__vecDelDtor)(0);
      ((void (__thiscall *)(GuildTournamentStorageWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
        v2,
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        0.2,
        0.5);
      v2->m_pkMoneyWin = MoneyWin::CreateWin(pkFrameWork);
      v87 = -1;
      if ( spNode.m_pObject )
      {
        v76 = spNode.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
        {
          if ( v76 )
            v76->vfptr->__vecDelDtor((NiRefObject *)v76, 1u);
        }
      }
      result = 1;
    }
    else
    {
      v70 = spNode.m_pObject;
      v87 = -1;
      if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v70 )
        v70->vfptr->__vecDelDtor((NiRefObject *)v70, 1u);
      result = 0;
    }
  }
  else
  {
    v87 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005DE8D0) --------------------------------------------------------
GTStorageInvWin *__thiscall GTStorageInvWin::`scalar deleting destructor'(GTStorageInvWin *this, unsigned int a2)
{
  GTStorageInvWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GTStorageInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GTStorageInvWin::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B0848: using guessed type void (__thiscall *GTStorageInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B0864: using guessed type int (__thiscall *GTStorageInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005DE910) --------------------------------------------------------
GuildTournamentStorageWin *__thiscall GuildTournamentStorageWin::`vector deleting destructor'(GuildTournamentStorageWin *this, unsigned int a2)
{
  GuildTournamentStorageWin *v2; // esi@1
  MoneyWin *v3; // eax@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildTournamentStorageWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildTournamentStorageWin::`vftable'{for `IDirectMessenger'};
  v3 = this->m_pkMoneyWin;
  if ( v3 )
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
  v2->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v2->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9B0AD4: using guessed type void (__thiscall *GuildTournamentStorageWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B0AF4: using guessed type int (__thiscall *GuildTournamentStorageWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005DE9B0) --------------------------------------------------------
signed int __stdcall ChatBoard::ParseUserChat(char **pcText)
{
  return 1;
}

//----- (005DE9C0) --------------------------------------------------------
char __thiscall ChatBoard::ViewLineUp(ChatBoard *this)
{
  int v1; // eax@1
  char result; // al@2
  int v3; // eax@3

  v1 = this->m_iViewIndex;
  if ( v1 == this->m_iBottomIndex )
  {
    result = 0;
  }
  else
  {
    v3 = v1 - 1;
    this->m_iViewIndex = v3;
    if ( v3 < 0 )
      this->m_iViewIndex = 49;
    result = 1;
  }
  return result;
}

//----- (005DE9F0) --------------------------------------------------------
char __thiscall ChatBoard::ViewLineDown(ChatBoard *this)
{
  char result; // al@2
  int v2; // esi@3

  if ( this->m_uiTotal > 8 )
  {
    v2 = this->m_iViewIndex;
    if ( (v2 + 8) % 50 != this->m_iTopIndex )
    {
      this->m_iViewIndex = v2 + 1;
      if ( v2 + 1 >= 50 )
        this->m_iViewIndex = 0;
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (005DEA40) --------------------------------------------------------
char __thiscall ChatBoard::ViewLineMostDown(ChatBoard *this)
{
  char result; // al@2
  int v2; // eax@3
  bool v3; // sf@3
  int v4; // eax@3

  if ( this->m_uiTotal > 8 )
  {
    v2 = this->m_iTopIndex;
    v3 = v2 - 8 < 0;
    v4 = v2 - 8;
    this->m_iViewIndex = v4;
    if ( v3 )
      this->m_iViewIndex = v4 + 50;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (005DEA70) --------------------------------------------------------
void __thiscall ChatBoard::SetText(ChatBoard *this, ChatBoard::Type eType, char *pcText, unsigned int uiTextLen)
{
  ChatBoard *v4; // esi@1
  int v5; // eax@1
  bool v6; // zf@5
  int v7; // ecx@12

  v4 = this;
  this->m_aeType[this->m_iTopIndex] = eType;
  v5 = this->m_iTopIndex;
  if ( this->m_auiTextAlloc[v5] < uiTextLen )
  {
    operator delete(this->m_apcText[v5]);
    v4->m_apcText[v4->m_iTopIndex] = (char *)operator new[](uiTextLen + 1);
    v4->m_auiTextAlloc[v4->m_iTopIndex] = uiTextLen;
  }
  strncpy(v4->m_apcText[v4->m_iTopIndex], pcText, uiTextLen);
  v4->m_apcText[v4->m_iTopIndex++][uiTextLen] = 0;
  if ( v4->m_iTopIndex >= 50 )
    v4->m_iTopIndex = 0;
  v6 = ++v4->m_uiTotal == 50;
  if ( v4->m_uiTotal > 0x32 )
  {
    v4->m_uiTotal = 50;
    v6 = 1;
  }
  if ( v6 )
  {
    if ( ++v4->m_iViewIndex >= 50 )
      v4->m_iViewIndex = 0;
    if ( ++v4->m_iBottomIndex >= 50 )
      v4->m_iBottomIndex = 0;
  }
  else
  {
    v7 = v4->m_iViewIndex;
    if ( (v7 + 9) % 50 == v4->m_iTopIndex )
    {
      v4->m_iViewIndex = v7 + 1;
      if ( v7 + 1 >= 50 )
        v4->m_iViewIndex = 0;
    }
  }
}

//----- (005DEBA0) --------------------------------------------------------
void __thiscall ChatBoard::UpdateMeWin(ChatBoard *this, float fCurTime)
{
  ChatBoard *v2; // ebx@1
  int v3; // edi@1
  char *v4; // esi@1
  signed int v5; // eax@4
  signed int v6; // [sp+Ch] [bp-4h]@1

  v2 = this;
  v3 = this->m_iViewIndex;
  v4 = (char *)this->m_aspTextGeom;
  v6 = 8;
  do
  {
    if ( !v2->m_apcText[v3] || !*(_DWORD *)v4 )
      goto LABEL_19;
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 148))(v2->m_apcText[v3]);
    v5 = v2->m_aeType[v3];
    if ( v5 > 16 )
    {
      if ( v5 > 128 )
      {
        if ( v5 != 4096 )
          goto LABEL_19;
      }
      else
      {
        if ( v5 == 128 )
        {
          (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 176))(&Color::m_kDxYellowColor);
          goto LABEL_19;
        }
        if ( v5 != 32 )
        {
          if ( v5 != 64 )
            goto LABEL_19;
LABEL_15:
          (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 176))(&Color::m_kDxBlueColor);
          goto LABEL_19;
        }
      }
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 176))(&Color::m_kDxGreenColor);
    }
    else
    {
      if ( v5 == 16 )
        goto LABEL_15;
      switch ( v5 )
      {
        case 1:
          (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 176))(&Color::m_kDxWhiteColor);
          break;
        case 2:
          (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 176))(&Color::m_kDxRedColor);
          break;
        case 4:
          (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 176))(&Color::m_kDxOrangeColor);
          break;
        case 8:
          (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 176))(&Color::m_kDxGrayColor);
          break;
        default:
          break;
      }
    }
LABEL_19:
    if ( (unsigned int)++v3 >= 0x32 )
      v3 = 0;
    v4 += 4;
    --v6;
  }
  while ( v6 );
}
// A695F0: using guessed type struct D3DXCOLOR Color::m_kDxBlueColor;

//----- (005DEC90) --------------------------------------------------------
void __thiscall ChatBoard::~ChatBoard(ChatBoard *this)
{
  ChatBoard *v1; // ebx@1
  void **v2; // esi@1
  signed int v3; // edi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ChatBoard::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ChatBoard::`vftable'{for `IDirectMessenger'};
  v2 = (void **)this->m_apcText;
  v3 = 50;
  do
  {
    operator delete[](*v2);
    ++v2;
    --v3;
  }
  while ( v3 );
  `eh vector destructor iterator'(
    v1->m_aspTextGeom,
    4u,
    8,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWin::~PgWin((PgWin *)&v1->vfptr);
}
// 9B0D1C: using guessed type void (__thiscall *ChatBoard::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B0D3C: using guessed type int (__thiscall *ChatBoard::`vftable'{for `NiNode'})(void *p, char);

//----- (005DED30) --------------------------------------------------------
void __thiscall ChatBoard::Add(ChatBoard *this, ChatBoard::Type eType, char *pcText)
{
  char *v3; // esi@1
  ChatBoard *v4; // edi@1
  unsigned int v5; // eax@3
  unsigned int v6; // ebx@3

  v3 = pcText;
  v4 = this;
  if ( pcText && *pcText )
  {
    do
    {
      v5 = ((int (__thiscall *)(_DWORD))v4->vfptr[36].__vecDelDtor)(v4);
      v6 = PgFont::GetTextLenInWidth(v4->m_pkFont, v3, v5);
      ChatBoard::SetText(v4, eType, v3, v6);
      v3 += v6;
    }
    while ( *v3 );
  }
}

//----- (005DED80) --------------------------------------------------------
void __thiscall ChatBoard::CreateTextGeometry(ChatBoard *this)
{
  ChatBoard *v1; // edi@1
  PgFont *v2; // eax@3
  int v3; // esi@4
  PgTextGeometry *v4; // eax@5
  int v5; // eax@6
  int v6; // ebx@8
  int v7; // eax@16
  int v8; // edx@16
  float v9; // ST20_4@16
  int v10; // edx@16
  int v11; // eax@16
  void *(__thiscall *v12)(NiRefObject *, unsigned int); // edx@16
  tagSIZE kSize; // [sp+1Ch] [bp-20h]@4
  int v14; // [sp+24h] [bp-18h]@4
  int iLineYPos; // [sp+28h] [bp-14h]@4
  PgTextGeometry *v16; // [sp+2Ch] [bp-10h]@5
  int v17; // [sp+38h] [bp-4h]@5

  v1 = this;
  if ( !this->m_pkFont )
    this->m_pkFont = Font::Get(0);
  v2 = v1->m_pkFont;
  if ( v2 )
  {
    SelectObject(v2->m_kFontRenderStuff.hDC, v2->m_hFont);
    PgFont::GetTextSize(v1->m_pkFont, "W", 1, &kSize);
    iLineYPos = 0;
    v3 = (int)v1->m_aspTextGeom;
    v14 = 8;
    do
    {
      v4 = (PgTextGeometry *)operator new(0x14Cu);
      v16 = v4;
      v17 = 0;
      if ( v4 )
      {
        PgTextGeometry::PgTextGeometry(v4, v1->m_pkFont);
        v16 = (PgTextGeometry *)v5;
      }
      else
      {
        v16 = 0;
        v5 = 0;
      }
      v6 = *(_DWORD *)v3;
      v17 = -1;
      if ( v6 != v5 )
      {
        if ( v6 )
        {
          if ( !InterlockedDecrement((volatile LONG *)(v6 + 4)) && v6 )
            (**(void (__thiscall ***)(_DWORD, _DWORD))v6)(v6, 1);
          v5 = (int)v16;
        }
        *(_DWORD *)v3 = v5;
        if ( v5 )
          InterlockedIncrement((volatile LONG *)(v5 + 4));
      }
      v7 = *(_DWORD *)v3;
      v8 = *(_DWORD *)(*(_DWORD *)v3 + 92);
      v9 = (double)iLineYPos;
      v10 = *(_DWORD *)(*(_DWORD *)v3 + 96);
      *(_DWORD *)(v7 + 88) = *(_DWORD *)(*(_DWORD *)v3 + 88);
      *(float *)(v7 + 92) = v9;
      *(_DWORD *)(v7 + 96) = v10;
      v11 = *(_DWORD *)v3;
      v12 = v1->vfptr[29].__vecDelDtor;
      iLineYPos += kSize.cy + 2;
      ((void (__thiscall *)(ChatBoard *, int, _DWORD))v12)(v1, v11, 0);
      v3 += 4;
      --v14;
    }
    while ( v14 );
    NiAVObject::UpdateProperties((NiAVObject *)&v1->vfptr);
  }
}

//----- (005DEEF0) --------------------------------------------------------
void __thiscall ChatBoard::ChatBoard(ChatBoard *this)
{
  ChatBoard *v1; // esi@1
  char **v2; // eax@1
  signed int v3; // ecx@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ChatBoard::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ChatBoard::`vftable'{for `IDirectMessenger'};
  `eh vector constructor iterator'(
    v1->m_aspTextGeom,
    4u,
    8,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_pkFont = 0;
  v1->m_uiTotal = 0;
  v1->m_iTopIndex = 0;
  v1->m_iBottomIndex = 0;
  v1->m_iViewIndex = 0;
  v2 = v1->m_apcText;
  v3 = 50;
  do
  {
    *(v2 - 50) = 0;
    *v2 = 0;
    ++v2;
    --v3;
  }
  while ( v3 );
}
// 9B0D1C: using guessed type void (__thiscall *ChatBoard::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B0D3C: using guessed type int (__thiscall *ChatBoard::`vftable'{for `NiNode'})(void *p, char);

//----- (005DEFB0) --------------------------------------------------------
void __thiscall ChatBoard::AddUserChat(ChatBoard *this, char *pcText)
{
  char cTmp[512]; // [sp+4h] [bp-204h]@1

  strcpy(cTmp, pcText);
  ChatBoard::Add(this, ITEM, cTmp);
}

//----- (005DF000) --------------------------------------------------------
char __thiscall ChatBoard::Create(ChatBoard *this, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent)
{
  ChatBoard *v6; // esi@1
  char result; // al@1

  v6 = this;
  result = PgWin::Create((PgWin *)&this->vfptr, iXPos, iYPos, uiWidth, uiHeight, pkParent, 0, 0);
  if ( result )
  {
    ChatBoard::CreateTextGeometry(v6);
    result = 1;
  }
  return result;
}

//----- (005DF040) --------------------------------------------------------
ChatBoard *__cdecl ChatBoard::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent)
{
  PgWin *v5; // eax@1
  PgWin *v6; // eax@2
  PgWin *v7; // esi@2
  PgWin *v8; // edi@8
  ChatBoard *v9; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v11; // [sp+20h] [bp-4h]@1

  v5 = (PgWin *)operator new(0x3B0u);
  result.m_pObject = v5;
  v11 = 0;
  if ( v5 )
  {
    ChatBoard::ChatBoard((ChatBoard *)v5);
    v7 = v6;
  }
  else
  {
    v7 = 0;
  }
  if ( v7 )
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  v11 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v7);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, unsigned int, PgWin *))v7->vfptr[113].__vecDelDtor)(
                          v7,
                          iXPos,
                          iYPos,
                          uiWidth,
                          uiHeight,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v7->vfptr[89].__vecDelDtor)(v7);
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = (ChatBoard *)v7;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v7);
    if ( result.m_pObject )
    {
      v8 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v8 )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      }
    }
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = 0;
  }
  return v9;
}

//----- (005DF180) --------------------------------------------------------
unsigned int __thiscall PgFont::GetTextLenInWidth(PgFont *this, char *pcText, unsigned int uiWidth)
{
  char *v3; // ebx@1
  unsigned int v4; // esi@1
  char v5; // dl@2
  signed int v6; // edi@5
  BYTE *v7; // esi@7
  unsigned int v8; // eax@15
  unsigned int v9; // eax@16
  unsigned int v10; // ecx@16
  tagSIZE kSize; // [sp+8h] [bp-18h]@5
  unsigned int uiTextLen; // [sp+10h] [bp-10h]@3
  unsigned int uiTextCx; // [sp+14h] [bp-Ch]@3
  int iStrLen; // [sp+18h] [bp-8h]@3
  CSpFont *v16; // [sp+1Ch] [bp-4h]@1
  char *pcTexta; // [sp+28h] [bp+8h]@7

  v3 = pcText;
  v4 = 0;
  v16 = (CSpFont *)this;
  if ( !pcText )
    return 0;
  v5 = *pcText;
  if ( !*pcText )
    return 0;
  uiTextLen = 0;
  uiTextCx = 0;
  iStrLen = strlen(pcText);
  while ( IsDBCSLeadByte(v5) )
  {
    v6 = 2;
    if ( !CSpFont::GetTextSize(v16, v3, 2, &kSize, 0, 0, 0, 0) )
    {
      GetTextExtentPoint32A(v16->m_kFontRenderStuff.hDC, v3, 2, &kSize);
      if ( v16->m_dwOutlineOffset )
      {
        pcTexta = 0;
        v7 = v3;
        while ( *v7 )
        {
          if ( v6 <= 0 )
            break;
          if ( *v7 == 32 )
          {
            --v6;
            ++v7;
          }
          else
          {
            ++pcTexta;
            if ( IsDBCSLeadByte(*v7) )
            {
              v7 += 2;
              v6 -= 2;
            }
            else
            {
              ++v7;
              --v6;
            }
          }
        }
        v8 = v16->m_dwOutlineOffset;
        v4 = uiTextLen;
        kSize.cy += 2 * v8;
        kSize.cx += 2 * (_DWORD)pcTexta * v8;
      }
    }
    v9 = kSize.cx + uiTextCx;
    v10 = uiWidth;
    iStrLen -= 2;
    v4 += 2;
    v3 += 2;
    uiTextLen = v4;
    if ( kSize.cx + uiTextCx > uiWidth )
    {
      v4 -= 2;
      goto LABEL_24;
    }
LABEL_19:
    if ( v9 <= v10 )
    {
      v5 = *v3;
      uiTextCx = v9;
      if ( v5 )
      {
        if ( iStrLen > 0 )
          continue;
      }
    }
    goto LABEL_24;
  }
  PgFont::GetTextSize((PgFont *)v16, v3, 1, &kSize);
  v9 = uiTextCx + kSize.cx;
  v10 = uiWidth;
  --iStrLen;
  ++v4;
  ++v3;
  uiTextLen = v4;
  if ( uiTextCx + kSize.cx <= uiWidth )
    goto LABEL_19;
  --v4;
LABEL_24:
  if ( uiTextCx > v10 )
    --v4;
  return v4;
}

//----- (005DF2F0) --------------------------------------------------------
ChatBoard *__thiscall ChatBoard::`scalar deleting destructor'(ChatBoard *this, unsigned int a2)
{
  ChatBoard *v2; // esi@1

  v2 = this;
  ChatBoard::~ChatBoard(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005DF320) --------------------------------------------------------
void __thiscall ChatBoardFlex::ClearViewedLineInfo(ChatBoardFlex *this)
{
  this->m_ViewedIndex[0] = -1;
  this->m_ViewedIndex[1] = -1;
  this->m_ViewedIndex[2] = -1;
  this->m_ViewedIndex[3] = -1;
  this->m_ViewedIndex[4] = -1;
  this->m_ViewedIndex[5] = -1;
  this->m_ViewedIndex[6] = -1;
  this->m_ViewedIndex[7] = -1;
  this->m_ViewedIndex[8] = -1;
  this->m_ViewedIndex[9] = -1;
  this->m_ViewedIndex[10] = -1;
  this->m_ViewedIndex[11] = -1;
  this->m_ViewedIndex[12] = -1;
  this->m_ViewedIndex[13] = -1;
  this->m_ViewedIndex[14] = -1;
  this->m_ViewedIndex[15] = -1;
  this->m_ViewedIndex[16] = -1;
  this->m_ViewedIndex[17] = -1;
  this->m_ViewedIndex[18] = -1;
  this->m_ViewedIndex[19] = -1;
  this->m_ViewedIndex[20] = -1;
  this->m_ViewedIndex[21] = -1;
  this->m_ViewedIndex[22] = -1;
  this->m_ViewedIndex[23] = -1;
  this->m_ViewedIndex[24] = -1;
  this->m_ViewedIndex[25] = -1;
  this->m_ViewedIndex[26] = -1;
  this->m_ViewedIndex[27] = -1;
  this->m_ViewedIndex[28] = -1;
  this->m_ViewedIndex[29] = -1;
  this->m_ViewedIndex[30] = -1;
  this->m_ViewedIndex[31] = -1;
  this->m_ViewedIndex[32] = -1;
  this->m_ViewedIndex[33] = -1;
  this->m_ViewedIndex[34] = -1;
  this->m_ViewedIndex[35] = -1;
  this->m_ViewedIndex[36] = -1;
  this->m_ViewedIndex[37] = -1;
  this->m_ViewedIndex[38] = -1;
  this->m_ViewedIndex[39] = -1;
}

//----- (005DF420) --------------------------------------------------------
void __thiscall ChatBoardFlex::DecViewIndex(ChatBoardFlex *this)
{
  bool v1; // sf@1
  int v2; // eax@2

  v1 = this->m_iViewIndex-- - 1 < 0;
  if ( v1 )
  {
    v2 = this->m_MaxTextLine;
    if ( v2 <= 0 )
      this->m_iViewIndex = 0;
    else
      this->m_iViewIndex = v2 - 1;
  }
}

//----- (005DF450) --------------------------------------------------------
signed int __stdcall ChatBoardFlex::ParseUserChat(char **pcText)
{
  return 1;
}

//----- (005DF460) --------------------------------------------------------
char __thiscall ChatBoardFlex::ViewLineDown(ChatBoardFlex *this)
{
  int v1; // eax@1
  char result; // al@2
  int v3; // eax@3

  v1 = this->m_iViewIndex;
  if ( v1 == this->m_iTopIndex - 1 )
  {
    result = 0;
  }
  else
  {
    v3 = v1 + 1;
    this->m_iViewIndex = v3;
    if ( v3 >= this->m_MaxTextLine )
      this->m_iViewIndex = 0;
    result = 1;
  }
  return result;
}

//----- (005DF490) --------------------------------------------------------
char __thiscall ChatBoardFlex::ViewLineMostDown(ChatBoardFlex *this)
{
  int v1; // eax@1
  int v2; // edx@2

  v1 = this->m_iTopIndex - 1;
  this->m_iViewIndex = v1;
  if ( v1 < 0 )
  {
    v2 = this->m_MaxTextLine;
    if ( v2 > 0 )
    {
      this->m_iViewIndex = v1 + v2;
      return 1;
    }
    this->m_iViewIndex = 0;
  }
  return 1;
}

//----- (005DF4D0) --------------------------------------------------------
void __thiscall ChatBoardFlex::SetGameFrameWork(ChatBoardFlex *this, PgFrameWork *pkFrameWork)
{
  this->m_pkFrameWork = pkFrameWork;
}

//----- (005DF4E0) --------------------------------------------------------
void __thiscall ChatBoardFlex::SetSystemWindow(ChatBoardFlex *this, bool b)
{
  this->m_bSystemWindow = b;
}

//----- (005DF4F0) --------------------------------------------------------
char __stdcall ChatBoardFlex::IsNewLineColoring(char *pcText, char *pcColorText, char *pMainText)
{
  char *v4; // esi@1
  signed int v5; // edi@1
  char v6; // al@5
  char *v7; // ecx@6
  bool bColoringText; // [sp+12h] [bp-106h]@1
  bool bEndColoring; // [sp+13h] [bp-105h]@1
  char acTemp[256]; // [sp+14h] [bp-104h]@1

  v4 = pcText;
  memset(acTemp, 0, 0x100u);
  v5 = 0;
  bColoringText = 0;
  bEndColoring = 0;
  if ( !*pcText )
    return 0;
  do
  {
    if ( !strncmp(v4, "{color,", 7u) )
    {
      bColoringText = 1;
      if ( bEndColoring == 1 )
      {
        v4 = &pMainText[v5];
        bEndColoring = 0;
      }
      v4 += 7;
      v5 += 7;
      memset(acTemp, 0, 0x100u);
      v6 = *v4;
      if ( *v4 )
      {
        v7 = acTemp;
        while ( v6 != 44 )
        {
          ++v4;
          *v7 = v6;
          v6 = *v4;
          ++v7;
          ++v5;
          if ( !*v4 )
            goto LABEL_9;
        }
      }
      else
      {
LABEL_9:
        if ( *v4 != 44 )
        {
          bColoringText = 0;
          goto LABEL_15;
        }
      }
      sprintf(pcColorText, "{color,%s,", acTemp);
    }
    else if ( !bColoringText )
    {
      goto LABEL_15;
    }
    if ( *v4 == 125 )
      bEndColoring = 1;
LABEL_15:
    ++v4;
    ++v5;
  }
  while ( v5 < (signed int)strlen(pcText) && *v4 );
  if ( bColoringText == 1 && !bEndColoring )
    return 1;
  return 0;
}

//----- (005DF650) --------------------------------------------------------
char *__thiscall ChatBoardFlex::GetChatText(ChatBoardFlex *this, int iIndex)
{
  char **v2; // eax@3
  char *result; // eax@4

  if ( iIndex >= 0 && iIndex < this->m_MaxTextLine && (v2 = &this->m_apcText[iIndex], *v2) )
    result = *v2;
  else
    result = 0;
  return result;
}

//----- (005DF680) --------------------------------------------------------
void __thiscall ChatBoardFlex::SetMaxTextLine(ChatBoardFlex *this, int MaxLine)
{
  ChatBoardFlex *v2; // esi@1
  int v3; // edi@2
  int i; // edi@4

  v2 = this;
  if ( MaxLine > 0 )
  {
    this->m_aeType = (ChatBoardFlex::Type *)operator new[](4 * MaxLine);
    v2->m_auiTextAlloc = (unsigned int *)operator new[](4 * MaxLine);
    v2->m_apcText = (char **)operator new[](16 * MaxLine);
    v2->m_apcSetTextTime = (float *)operator new[](4 * MaxLine);
    v2->m_kChatID = (char *)operator new[](MaxLine);
    v3 = 0;
    for ( v2->m_apkFont = (PgFont **)operator new[](4 * MaxLine); v3 < MaxLine; ++v3 )
      v2->m_apcText[v3] = (char *)operator new[](0x100u);
    for ( i = 0; i < MaxLine; ++i )
    {
      strncpy(v2->m_apcText[i], "  ", 0xFFu);
      v2->m_apcSetTextTime[i] = 0.0;
      v2->m_auiTextAlloc[i] = 0;
      v2->m_kChatID[i] = 0;
      v2->m_apkFont[i] = v2->m_pkFont;
    }
    v2->m_MaxTextLine = MaxLine;
  }
}

//----- (005DF7D0) --------------------------------------------------------
double __thiscall ChatBoardFlex::GetSetTextTime(ChatBoardFlex *this, int TextLineNum)
{
  float *v2; // ecx@3
  double v3; // st7@3
  float *v4; // ecx@3
  bool v5; // c3@3
  double result; // st7@3

  if ( TextLineNum < 0 || TextLineNum >= this->m_MaxTextLine )
  {
    result = 0.0;
  }
  else
  {
    v2 = this->m_apcSetTextTime;
    v3 = v2[TextLineNum];
    v4 = &v2[TextLineNum];
    v5 = 0.0 == v3;
    result = 0.0;
    if ( !v5 )
      result = *v4;
  }
  return result;
}

//----- (005DF810) --------------------------------------------------------
char __thiscall ChatBoardFlex::FindStrInBoard(ChatBoardFlex *this, int TextRowIndex)
{
  signed int v2; // eax@1
  char *v3; // ecx@1

  v2 = 0;
  v3 = (char *)this->m_ViewedIndex;
  while ( *(_DWORD *)v3 != TextRowIndex )
  {
    ++v2;
    v3 += 4;
    if ( v2 >= 40 )
      return 0;
  }
  return 1;
}

//----- (005DF840) --------------------------------------------------------
signed int __thiscall ChatBoardFlex::GetWhisperTokenType(ChatBoardFlex *this, const char *pcStr)
{
  unsigned int v2; // ebx@1
  const char **v3; // edi@1
  const char *v4; // eax@2
  char v5; // cl@3

  v2 = 0;
  v3 = (const char **)this->m_pcWhisperToken;
  while ( 1 )
  {
    v4 = *v3;
    do
      v5 = *v4++;
    while ( v5 );
    if ( !strncmp(pcStr, *v3, v4 - (*v3 + 1)) )
      break;
    ++v2;
    ++v3;
    if ( v2 >= 2 )
      return 2;
  }
  return v2;
}

//----- (005DF890) --------------------------------------------------------
int __stdcall ChatBoardFlex::ColorCommandCheck(int nTextLen, char *pText)
{
  int result; // eax@2
  int v4; // ebx@4
  const char *v5; // esi@4
  signed int v6; // edi@4
  int v7; // eax@10
  int v8; // esi@12
  bool bIsLineColor; // [sp+7h] [bp-1h]@4

  if ( nTextLen >= 0 && pText )
  {
    v4 = 0;
    bIsLineColor = 0;
    v5 = &pText[nTextLen - 7];
    v6 = 0;
    while ( *v5 )
    {
      if ( !strncmp(v5, "{color,", 7u) )
      {
        bIsLineColor = 1;
        break;
      }
      ++v6;
      ++v4;
      ++v5;
      if ( v6 >= 7 )
        break;
    }
    v7 = 0;
    if ( bIsLineColor )
      v7 = 7 - v4;
    v8 = nTextLen - v7;
    if ( IsDBCSLeadByte(pText[nTextLen - v7]) )
    {
      if ( bIsLineColor == 1 )
        --v8;
    }
    result = v8;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (005DF920) --------------------------------------------------------
int __thiscall ChatBoardFlex::FindItemLinkToken(ChatBoardFlex *this, char *pLinkText, int nCliclkIndex)
{
  ChatBoardFlex *v3; // ebx@1
  int result; // eax@2
  const char *v5; // esi@6
  int v6; // ebx@6
  int v7; // edi@6
  char chRemoveColorText[256]; // [sp+Ch] [bp-104h]@4

  v3 = this;
  if ( pLinkText && nCliclkIndex >= 0 )
  {
    memset(chRemoveColorText, 0, 0x100u);
    if ( v3->m_pkFrameWork )
      GameFrameWork::RemoveColorText(pLinkText, chRemoveColorText, nCliclkIndex);
    v5 = &chRemoveColorText[nCliclkIndex];
    v6 = 0;
    v7 = nCliclkIndex;
    do
    {
      if ( !v5 )
        break;
      if ( !strncmp(v5--, "<\t", 2u) )
      {
        ++v6;
      }
      else if ( !strncmp(v5, "\t>", 2u) && !v6 )
      {
        goto LABEL_2;
      }
      --v7;
    }
    while ( v7 >= 0 );
    result = v6;
  }
  else
  {
LABEL_2:
    result = 0;
  }
  return result;
}

//----- (005DF9F0) --------------------------------------------------------
unsigned int __thiscall ChatBoardFlex::GetViewLineCount(ChatBoardFlex *this)
{
  int v1; // esi@1
  unsigned int v2; // edi@1

  v1 = this->m_iLineGap;
  v2 = this->m_pkFont->m_dwFontSizeInPixel;
  return (((int (*)(void))this->vfptr[37].__vecDelDtor)() + 2 * v1) / (v2 + v1);
}

//----- (005DFA20) --------------------------------------------------------
void __thiscall ChatBoardFlex::SetText(ChatBoardFlex *this, ChatBoardFlex::Type eType, char *pcText, unsigned int uiTextLen)
{
  ChatBoardFlex *v4; // esi@1
  int v5; // eax@6
  int v6; // eax@10

  v4 = this;
  this->m_aeType[this->m_iTopIndex] = eType;
  strncpy(this->m_apcText[this->m_iTopIndex], byte_9B0F24, 0xFFu);
  v4->m_auiTextAlloc[v4->m_iTopIndex] = uiTextLen;
  v4->m_apcSetTextTime[v4->m_iTopIndex] = Timer::ms_fCurTime;
  strncpy(v4->m_apcText[v4->m_iTopIndex], pcText, uiTextLen);
  if ( eType == 1024 || eType == 2048 || eType == 4106 )
    v4->m_apkFont[v4->m_iTopIndex] = Font::Get(GMCHAT);
  else
    v4->m_apkFont[v4->m_iTopIndex] = v4->m_pkFont;
  v5 = v4->m_MaxTextLine;
  if ( ++v4->m_iTopIndex >= v5 )
    v4->m_iTopIndex = 0;
  if ( ++v4->m_uiTotal > v5 )
    v4->m_uiTotal = v5;
  v6 = v4->m_iTopIndex;
  if ( v6 <= 0 )
  {
    v4->m_iViewIndex = -1;
  }
  else if ( v4->m_iViewIndex == v6 - 2 )
  {
    v4->m_iViewIndex = v6 - 1;
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (005DFB50) --------------------------------------------------------
void __thiscall ChatBoardFlex::SetText(ChatBoardFlex *this, ChatBoardFlex::Type eType, char *pcText, unsigned int uiTextLen, char kChatID)
{
  ChatBoardFlex *v5; // esi@1
  int v6; // eax@1
  int v7; // edi@2
  int v8; // eax@5
  int v9; // eax@9

  v5 = this;
  v6 = this->m_iTopIndex;
  if ( v6 > this->m_MaxTextLine - 40 )
  {
    v7 = 0;
    if ( v6 - 1 > 0 )
    {
      do
      {
        strncpy(v5->m_apcText[v7], v5->m_apcText[v7 + 1], 0xFFu);
        v5->m_apcSetTextTime[v7] = v5->m_apcSetTextTime[v7 + 1];
        v5->m_auiTextAlloc[v7] = v5->m_auiTextAlloc[v7 + 1];
        v5->m_kChatID[v7] = v5->m_kChatID[v7 + 1];
        v5->m_apkFont[v7] = v5->m_apkFont[v7 + 1];
        ++v7;
      }
      while ( v7 < v5->m_iTopIndex - 1 );
    }
    --v5->m_iTopIndex;
  }
  v5->m_aeType[v5->m_iTopIndex] = eType;
  strncpy(v5->m_apcText[v5->m_iTopIndex], byte_9B0F28, 0xFFu);
  v5->m_auiTextAlloc[v5->m_iTopIndex] = uiTextLen;
  v5->m_apcSetTextTime[v5->m_iTopIndex] = Timer::ms_fCurTime;
  strncpy(v5->m_apcText[v5->m_iTopIndex], pcText, uiTextLen);
  v5->m_kChatID[v5->m_iTopIndex] = kChatID;
  v5->m_apkFont[v5->m_iTopIndex] = v5->m_pkFont;
  v8 = v5->m_MaxTextLine;
  if ( ++v5->m_iTopIndex >= v8 )
    v5->m_iTopIndex = 0;
  if ( ++v5->m_uiTotal > v8 )
    v5->m_uiTotal = v8;
  v9 = v5->m_iTopIndex;
  if ( v9 <= 0 )
  {
    v5->m_iViewIndex = -1;
  }
  else if ( v5->m_iViewIndex == v9 - 2 )
  {
    v5->m_iViewIndex = v9 - 1;
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (005DFCE0) --------------------------------------------------------
void __thiscall ChatBoardFlex::CreateTextGeometry(ChatBoardFlex *this)
{
  ChatBoardFlex *v1; // edi@1
  NiNode *v2; // ebx@1
  PgFont *v3; // eax@2
  NiNode *v4; // eax@3
  NiNode *v5; // eax@4
  NiNode *v6; // esi@5
  NiRefObjectVtbl *v7; // edx@12
  int v8; // eax@12
  SpScreenText **v9; // esi@12
  PgTextGeometry *v10; // eax@13
  int v11; // eax@14
  SpScreenText *v12; // ebx@16
  SpScreenText *v13; // eax@24
  double v14; // st7@26
  SpScreenText *v15; // eax@26
  float v16; // edx@26
  float v17; // ST28_4@26
  float v18; // edx@26
  NiNode *v19; // ecx@26
  tagSIZE kSize; // [sp+1Ch] [bp-34h]@12
  int iLineYPos; // [sp+24h] [bp-2Ch]@12
  NiNode *v22; // [sp+28h] [bp-28h]@3
  PgTextGeometry *v23; // [sp+2Ch] [bp-24h]@13
  tagRECT kDrawRect; // [sp+30h] [bp-20h]@12
  int v25; // [sp+4Ch] [bp-4h]@3

  v1 = this;
  v2 = 0;
  if ( this->m_pkFont || (v3 = Font::Get(BOLD), (v1->m_pkFont = v3) != 0) )
  {
    v4 = (NiNode *)operator new(0xE8u);
    v22 = v4;
    v25 = 0;
    if ( v4 )
    {
      NiNode::NiNode(v4, 0);
      v2 = v5;
    }
    v6 = v1->m_spTextOffset.m_pObject;
    v25 = -1;
    if ( v6 != v2 )
    {
      if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      v1->m_spTextOffset.m_pObject = v2;
      if ( v2 )
        InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
    }
    v1->vfptr[29].__vecDelDtor((NiRefObject *)v1, (unsigned int)v1->m_spTextOffset.m_pObject);
    SelectObject(v1->m_pkFont->m_kFontRenderStuff.hDC, v1->m_pkFont->m_hFont);
    PgFont::GetTextSize(v1->m_pkFont, "W", 1, &kSize);
    v7 = v1->vfptr;
    iLineYPos = -v1->m_iLineGap;
    v8 = (int)v7[36].__vecDelDtor((NiRefObject *)v1, kSize.cy);
    SetRect(&kDrawRect, 0, 0, v8, 0);
    v9 = (SpScreenText **)v1->m_aspTextGeom;
    v22 = (NiNode *)40;
    do
    {
      v10 = (PgTextGeometry *)operator new(0x14Cu);
      v23 = v10;
      v25 = 1;
      if ( v10 )
      {
        PgTextGeometry::PgTextGeometry(v10, v1->m_pkFont);
        v23 = (PgTextGeometry *)v11;
      }
      else
      {
        v23 = 0;
        v11 = 0;
      }
      v12 = *v9;
      v25 = -1;
      if ( v12 != (SpScreenText *)v11 )
      {
        if ( v12 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
            v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
          v11 = (int)v23;
        }
        *v9 = (SpScreenText *)v11;
        if ( v11 )
          InterlockedIncrement((volatile LONG *)(v11 + 4));
      }
      SpScreenText::SetShadowOffset(*v9, 1u);
      ((void (__stdcall *)(tagRECT *))(*v9)->vfptr[34].__vecDelDtor)(&kDrawRect);
      v13 = *v9;
      v13[1].vfptr = 0;
      if ( v13->m_iAlignOption != 17 )
      {
        v13->m_iAlignOption = 17;
        v13->m_bInvalidate = 1;
      }
      v14 = (double)iLineYPos;
      (*v9)->m_bTextCmdOn = 1;
      v15 = *v9;
      v16 = (*v9)->m_kLocal.m_Translate.y;
      v17 = v14;
      v18 = (*v9)->m_kLocal.m_Translate.z;
      v15->m_kLocal.m_Translate.x = (*v9)->m_kLocal.m_Translate.x;
      v15->m_kLocal.m_Translate.y = v17;
      v15->m_kLocal.m_Translate.z = v18;
      v19 = v1->m_spTextOffset.m_pObject;
      iLineYPos += kSize.cy + v1->m_iLineGap;
      ((void (__stdcall *)(SpScreenText *, _DWORD))v19->vfptr[29].__vecDelDtor)(*v9, 0);
      ++v9;
      v22 = (NiNode *)((char *)v22 - 1);
    }
    while ( v22 );
    NiAVObject::UpdateProperties((NiAVObject *)&v1->vfptr);
  }
}

//----- (005DFF40) --------------------------------------------------------
void __thiscall ChatBoardFlex::SetDrawFormat(ChatBoardFlex *this, unsigned int uiDrawFormat)
{
  char *v2; // esi@2
  int v3; // edx@3
  unsigned int v4; // eax@4
  int v5; // eax@7
  int i; // [sp+8h] [bp-4h]@1

  i = 0;
  if ( this->m_MaxTextViewLine > 0 )
  {
    v2 = (char *)this->m_aspTextGeom;
    do
    {
      v3 = *(_DWORD *)v2;
      *(_DWORD *)(*(_DWORD *)v2 + 308) = uiDrawFormat;
      if ( uiDrawFormat & 1 )
        v4 = 2;
      else
        v4 = uiDrawFormat & 2 | 1;
      if ( uiDrawFormat & 4 )
      {
        v5 = v4 | 0x20;
      }
      else if ( uiDrawFormat & 8 )
      {
        v5 = v4 | 0x30;
      }
      else
      {
        v5 = v4 | 0x10;
      }
      if ( v5 != *(_DWORD *)(v3 + 280) )
      {
        *(_DWORD *)(v3 + 280) = v5;
        *(_BYTE *)(v3 + 300) = 1;
      }
      v2 += 4;
      ++i;
    }
    while ( i < this->m_MaxTextViewLine );
  }
}

//----- (005DFFE0) --------------------------------------------------------
void __thiscall ChatBoardFlex::RoarAdd(ChatBoardFlex *this, ChatBoardFlex::Type eType, char *pcText)
{
  char *v3; // ebx@1
  ChatBoardFlex *v4; // esi@1
  char *v5; // eax@2
  unsigned int v6; // edi@2
  PgFont *v7; // eax@8
  int v8; // eax@10
  int v9; // eax@14

  v3 = pcText;
  v4 = this;
  if ( pcText )
  {
    v5 = pcText;
    v6 = 0;
    if ( *pcText )
    {
      while ( 1 )
      {
        if ( *v5 != 10 )
        {
          ++v5;
          ++v6;
          goto LABEL_20;
        }
        if ( !v6 )
          goto LABEL_18;
        v4->m_aeType[v4->m_iTopIndex] = eType;
        strncpy(v4->m_apcText[v4->m_iTopIndex], byte_9B0F24, 0xFFu);
        v4->m_auiTextAlloc[v4->m_iTopIndex] = v6;
        v4->m_apcSetTextTime[v4->m_iTopIndex] = Timer::ms_fCurTime;
        strncpy(v4->m_apcText[v4->m_iTopIndex], v3, v6);
        if ( eType == 1024 || eType == 2048 || eType == 4106 )
          v7 = Font::Get(GMCHAT);
        else
          v7 = v4->m_pkFont;
        v4->m_apkFont[v4->m_iTopIndex] = v7;
        v8 = v4->m_MaxTextLine;
        if ( ++v4->m_iTopIndex >= v8 )
          v4->m_iTopIndex = 0;
        if ( ++v4->m_uiTotal > v8 )
          v4->m_uiTotal = v8;
        v9 = v4->m_iTopIndex;
        if ( v9 <= 0 )
          break;
        if ( v4->m_iViewIndex != v9 - 2 )
          goto LABEL_18;
        v4->m_iViewIndex = v9 - 1;
        v5 = pcText + 1;
        v6 = 0;
        v3 = pcText + 1;
LABEL_20:
        pcText = v5;
        if ( !*v5 )
        {
          if ( v6 )
            ChatBoardFlex::SetText(v4, eType, v3, v6);
          return;
        }
      }
      v4->m_iViewIndex = -1;
LABEL_18:
      v5 = pcText + 1;
      v6 = 0;
      v3 = pcText + 1;
      goto LABEL_20;
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (005E0160) --------------------------------------------------------
char __thiscall ChatBoardFlex::IsColorTextLine(ChatBoardFlex *this, char *pcText, tagSIZE *kSize)
{
  char *v3; // esi@1
  char v4; // bl@1
  char v5; // al@3
  char *v6; // ecx@4
  const char *v7; // edi@11
  int v8; // esi@11
  int v9; // ebx@13
  tagSIZE *v10; // eax@22
  ChatBoardFlex *v12; // [sp+10h] [bp-118h]@1
  CSpFont *v13; // [sp+14h] [bp-114h]@11
  tagSIZE ColokTextSize; // [sp+18h] [bp-110h]@11
  char *pcSubText; // [sp+20h] [bp-108h]@3
  char acTemp[256]; // [sp+24h] [bp-104h]@1

  v3 = pcText;
  v12 = this;
  memset(acTemp, 0, 0x100u);
  v4 = 0;
  kSize->cx = 0;
  kSize->cy = 0;
  if ( *pcText )
  {
    do
    {
      if ( !strncmp(v3, "{color,", 7u) )
      {
        v5 = v3[7];
        v3 += 7;
        pcSubText = v3;
        if ( v5 )
        {
          v6 = acTemp;
          while ( v5 != 44 )
          {
            ++v3;
            *v6 = v5;
            v5 = *v3;
            ++v6;
            if ( !*v3 )
            {
              pcSubText = v3;
              goto LABEL_8;
            }
          }
          pcSubText = v3;
LABEL_11:
          v7 = fs("{color,%s", acTemp);
          v8 = strlen(v7);
          v13 = (CSpFont *)&v12->m_pkFont->vfptr;
          if ( !CSpFont::GetTextSize(v13, (char *)v7, v8, &ColokTextSize, 0, 0, 0, 0) )
          {
            GetTextExtentPoint32A(v13->m_kFontRenderStuff.hDC, v7, v8, &ColokTextSize);
            if ( v13->m_dwOutlineOffset )
            {
              v9 = 0;
              while ( *v7 )
              {
                if ( v8 <= 0 )
                  break;
                if ( *v7 == 32 )
                {
                  --v8;
                  ++v7;
                }
                else
                {
                  ++v9;
                  if ( IsDBCSLeadByte(*v7) )
                  {
                    v7 += 2;
                    v8 -= 2;
                  }
                  else
                  {
                    ++v7;
                    --v8;
                  }
                }
              }
              ColokTextSize.cy += 2 * v13->m_dwOutlineOffset;
              ColokTextSize.cx += 2 * v9 * v13->m_dwOutlineOffset;
            }
          }
          v10 = kSize;
          v10->cx += ColokTextSize.cx;
          v10->cy += ColokTextSize.cy;
          v4 = 1;
          memset(acTemp, 0, 0x100u);
          v3 = pcSubText;
          goto LABEL_23;
        }
LABEL_8:
        if ( *v3 == 44 )
          goto LABEL_11;
      }
LABEL_23:
      ++v3;
    }
    while ( *v3 );
  }
  return v4;
}

//----- (005E0340) --------------------------------------------------------
char __thiscall ChatBoardFlex::IsMainTextColorText(ChatBoardFlex *this, char *pcText, tagSIZE *kSize)
{
  char *v3; // esi@1
  ChatBoardFlex *v4; // ebx@1
  char v5; // al@4
  char *v6; // ecx@5
  char *v8; // eax@11
  int v9; // eax@11
  tagSIZE ColokTextSize; // [sp+Ch] [bp-10Ch]@11
  char acTemp[256]; // [sp+14h] [bp-104h]@2

  v3 = pcText;
  v4 = this;
  if ( !pcText )
    return 0;
  memset(acTemp, 0, 0x100u);
  if ( !*pcText )
    return 0;
  while ( 1 )
  {
    if ( strncmp(v3, "{color,", 7u) )
      goto LABEL_9;
    v5 = v3[7];
    v3 += 7;
    if ( v5 )
      break;
LABEL_8:
    if ( *v3 == 44 )
      goto LABEL_11;
LABEL_9:
    if ( !*++v3 )
      return 0;
  }
  v6 = acTemp;
  while ( v5 != 44 )
  {
    ++v3;
    *v6 = v5;
    v5 = *v3;
    ++v6;
    if ( !*v3 )
      goto LABEL_8;
  }
LABEL_11:
  v8 = fs("{color,%s", acTemp);
  PgFont::GetTextSize(v4->m_pkFont, v8, strlen(v8), &ColokTextSize);
  v9 = ColokTextSize.cx;
  kSize->cy -= ColokTextSize.cy;
  kSize->cx -= v9;
  return 1;
}

//----- (005E0440) --------------------------------------------------------
int __thiscall ChatBoardFlex::FindClickTextIndex(ChatBoardFlex *this, char *pLinkText, int iX, int nLineCnt)
{
  char *v4; // esi@1
  int v5; // edi@1
  int result; // eax@2
  char *v7; // eax@3
  char v8; // bl@3
  char v9; // cl@4
  _BYTE *v10; // esi@8
  int i; // edi@8
  tagSIZE kSize; // [sp+8h] [bp-10h]@15
  int nStrLen; // [sp+10h] [bp-8h]@5
  ChatBoardFlex *v14; // [sp+14h] [bp-4h]@1
  signed int uiTextCx; // [sp+20h] [bp+8h]@3

  v4 = pLinkText;
  v5 = 0;
  v14 = this;
  if ( pLinkText )
  {
    v7 = pLinkText;
    uiTextCx = 0;
    v8 = 0;
    do
      v9 = *v7++;
    while ( v9 );
    nStrLen = v7 - (v4 + 1);
    if ( *v4 )
    {
      while ( nStrLen > v5 )
      {
        if ( !strncmp(v4, "{color,", 7u) )
        {
          v10 = v4 + 7;
          for ( i = v5 + 7; *v10 != 44; ++i )
            ++v10;
          v5 = i + 1;
          v4 = v10 + 1;
          v8 = 1;
        }
        if ( !strncmp(v4, "}", 1u) && v8 )
        {
          v8 = 0;
          ++v5;
          ++v4;
        }
        else
        {
          if ( IsDBCSLeadByte(*v4) )
          {
            PgFont::GetTextSize(v14->m_apkFont[nLineCnt], v4, 2, &kSize);
            v5 += 2;
            v4 += 2;
          }
          else
          {
            PgFont::GetTextSize(v14->m_apkFont[nLineCnt], v4, 1, &kSize);
            ++v5;
            ++v4;
          }
          uiTextCx += kSize.cx;
          if ( uiTextCx > iX )
            break;
        }
        if ( !*v4 )
          break;
      }
    }
    result = v5;
  }
  else
  {
    result = -1;
  }
  return result;
}

//----- (005E0550) --------------------------------------------------------
void __thiscall ChatBoardFlex::Add(ChatBoardFlex *this, ChatBoardFlex::Type eType, char *pcText)
{
  char *v3; // esi@1
  ChatBoardFlex *v4; // edi@1
  unsigned int v5; // eax@4
  char *v6; // ecx@4

  v3 = pcText;
  v4 = this;
  if ( pcText && (eType == 4 || eType & this->m_uiOption) )
  {
    v5 = 0;
    v6 = pcText;
    if ( *pcText )
    {
      do
      {
        if ( *v3 == 10 )
        {
          if ( v5 )
            ChatBoardFlex::SetText(v4, eType, v6, v5);
          ++v3;
          v5 = 0;
          v6 = v3;
        }
        else
        {
          ++v3;
          ++v5;
        }
      }
      while ( *v3 );
      if ( v5 )
        ChatBoardFlex::SetText(v4, eType, v6, v5);
    }
  }
}

//----- (005E05B0) --------------------------------------------------------
void __thiscall ChatBoardFlex::Add(ChatBoardFlex *this, ChatBoardFlex::Type eType, char *pcText, char kChatID)
{
  ChatBoardFlex *v4; // edi@1
  char *v5; // ecx@1
  ChatBoardFlex::Type v6; // edx@2
  unsigned int v7; // eax@4
  char *v8; // esi@4

  v4 = this;
  v5 = pcText;
  if ( pcText )
  {
    v6 = eType;
    if ( eType == 4 || eType & v4->m_uiOption )
    {
      v7 = 0;
      v8 = pcText;
      if ( *pcText )
      {
        do
        {
          if ( *v8 == 10 )
          {
            if ( v7 )
            {
              ChatBoardFlex::SetText(v4, v6, v5, v7, kChatID);
              v6 = eType;
            }
            ++v8;
            v7 = 0;
            v5 = v8;
          }
          else
          {
            ++v8;
            ++v7;
          }
        }
        while ( *v8 );
        if ( v7 )
          ChatBoardFlex::SetText(v4, v6, v5, v7, kChatID);
      }
    }
  }
}

//----- (005E0620) --------------------------------------------------------
char __thiscall ChatBoardFlex::ViewLineUp(ChatBoardFlex *this)
{
  ChatBoardFlex *v1; // esi@1
  unsigned int v2; // ebx@1
  int v3; // edi@1
  unsigned int v4; // eax@1
  unsigned int v5; // ecx@1
  int v7; // ebx@3
  int v8; // edi@5
  int v9; // ST14_4@5
  char v10; // al@6
  char *v11; // edi@13
  unsigned int v12; // eax@16
  int iViewLineCount; // [sp+Ch] [bp-8h]@5
  int iLineCountPerText; // [sp+10h] [bp-4h]@15

  v1 = this;
  v2 = this->m_pkFont->m_dwFontSizeInPixel;
  v3 = this->m_iLineGap;
  v4 = ((int (*)(void))this->vfptr[37].__vecDelDtor)() + 2 * v3;
  v5 = v1->m_uiTotal;
  if ( v5 > v4 / (v2 + v3) )
  {
    v7 = v1->m_iViewIndex;
    if ( v7 >= 0 && v5 >= v7 )
    {
      v8 = v1->m_iLineGap;
      v9 = v1->m_pkFont->m_dwFontSizeInPixel;
      iViewLineCount = (((int (__thiscall *)(_DWORD))v1->vfptr[37].__vecDelDtor)(v1) + 2 * v8) / (unsigned int)(v9 + v8);
      while ( 1 )
      {
        while ( 1 )
        {
          v10 = 0;
          if ( v1->m_aeType[v7] == 24576 )
            v10 = 1;
          if ( !v1->m_Filter || !v10 || v1->m_FilteredTextShow )
            break;
          if ( --v7 < 0 )
            v7 += v1->m_MaxTextLine;
        }
        v11 = v1->m_apcText[v7];
        if ( !v11 || v7 == v1->m_iTopIndex )
          break;
        for ( iLineCountPerText = 0; *v11; v11 += PgFont::GetTextLenInWidth(v1->m_apkFont[v7], v11, v12) )
        {
          v12 = ((int (__thiscall *)(_DWORD))v1->vfptr[36].__vecDelDtor)(v1);
          ++iLineCountPerText;
        }
        iViewLineCount -= iLineCountPerText;
        if ( iViewLineCount < 0 )
        {
          ChatBoardFlex::DecViewIndex(v1);
          return 1;
        }
        if ( --v7 < 0 )
          v7 += v1->m_MaxTextLine;
      }
    }
  }
  return 0;
}

//----- (005E0750) --------------------------------------------------------
char __thiscall ChatBoardFlex::Create(ChatBoardFlex *this, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgFont *pkFont, bool bLButtonEnable, PgWin *pkParent)
{
  ChatBoardFlex *v8; // esi@1
  char result; // al@1
  NiSourceTexture *v10; // eax@2
  PopupMenuWin *v11; // eax@2

  v8 = this;
  result = PgWin::Create((PgWin *)&this->vfptr, iXPos, iYPos, uiWidth, uiHeight, pkParent, 0, 0);
  if ( result )
  {
    v8->m_pkFont = pkFont;
    ChatBoardFlex::CreateTextGeometry(v8);
    v8->m_bLButtonEnable = bLButtonEnable;
    v10 = MenuTexMgr::GetTexture(1u);
    v11 = PopupMenuWin::CreateWin(v10, 4u, 4u, 0);
    v8->m_pkPopupMenu = v11;
    ((void (__stdcall *)(_DWORD))v11->vfptr->SetMsgHooker)(&v8->vfptr);
    PopupMenuWin::FinishMenu(v8->m_pkPopupMenu, 0);
    ((void (__stdcall *)(_DWORD))v8->m_pkPopupMenu->vfptr[64].__vecDelDtor)(0);
    result = 1;
  }
  return result;
}

//----- (005E07F0) --------------------------------------------------------
bool __thiscall ChatBoardFlex::IsMouseOverNameText(ChatBoardFlex *this)
{
  ChatBoardFlex *v1; // edi@1
  void *(__thiscall *v2)(NiRefObject *, unsigned int); // edx@1
  int v3; // ebx@1
  NiRefObjectVtbl *v4; // eax@2
  int v5; // esi@2
  int v6; // eax@2
  int v7; // ecx@2
  int v8; // eax@2
  int v9; // edx@2
  unsigned int v10; // eax@2
  double v11; // st7@2
  int v12; // esi@4
  unsigned int v13; // eax@4
  void *(__thiscall *v14)(NiRefObject *, unsigned int); // edx@4
  bool result; // al@5
  int v16; // ebx@8
  signed int v17; // ecx@8
  char v18; // dl@8
  ChatDisplayWin2 *v19; // ebx@12
  int v20; // eax@22
  int i; // eax@24
  int v22; // eax@26
  char v23; // dl@27
  bool v24; // zf@34
  char *v25; // eax@36
  char *v26; // esi@37
  __int64 v27; // kr08_8@40
  unsigned int v28; // edx@40
  unsigned int v29; // eax@40
  int iX; // [sp+Ch] [bp-430h]@1
  int iY; // [sp+10h] [bp-42Ch]@1
  int c; // [sp+14h] [bp-428h]@2
  int iStringLen; // [sp+18h] [bp-424h]@1
  ChatDisplayWin2 *chatDisplaywin2; // [sp+1Ch] [bp-420h]@2
  bool bResult; // [sp+23h] [bp-419h]@1
  char dest[20]; // [sp+24h] [bp-418h]@2
  char name[1024]; // [sp+38h] [bp-404h]@8

  v1 = this;
  v2 = this->vfptr[56].__vecDelDtor;
  iX = PgWin::ms_iMsX;
  iY = PgWin::ms_iMsY;
  bResult = 0;
  ((void (__stdcall *)(int *, int *))v2)(&iX, &iY);
  v3 = 0;
  iStringLen = (int)v1->m_aspTextGeom;
  while ( 1 )
  {
    ((void (__thiscall *)(ChatBoardFlex *))v1->vfptr[37].__vecDelDtor)(v1);
    v4 = v1->vfptr;
    v5 = v1->m_iLineGap;
    chatDisplaywin2 = (ChatDisplayWin2 *)v1->m_pkFont->m_dwFontSizeInPixel;
    v6 = ((int (__thiscall *)(ChatBoardFlex *))v4[37].__vecDelDtor)(v1);
    c = (v6 + 2 * v5) % ((unsigned int)chatDisplaywin2 + v5);
    *(float *)&chatDisplaywin2 = (double)(unsigned int)c;
    v7 = *(_DWORD *)iStringLen;
    v8 = *(_DWORD *)(*(_DWORD *)iStringLen + 88);
    *(_DWORD *)&dest[12] = *(_DWORD *)(*(_DWORD *)iStringLen + 92);
    v9 = *(_DWORD *)v7;
    *(_DWORD *)&dest[8] = v8;
    *(_DWORD *)&dest[16] = *(_DWORD *)(v7 + 96);
    *(float *)&chatDisplaywin2 = *(float *)&dest[12] + *(float *)&chatDisplaywin2;
    v10 = (*(int (**)(void))(v9 + 160))();
    v11 = *(float *)&chatDisplaywin2;
    *(float *)&c = (double)v10 + *(float *)&chatDisplaywin2;
    *(float *)&chatDisplaywin2 = (double)iY;
    if ( *(float *)&chatDisplaywin2 > v11 && *(float *)&c > (double)*(float *)&chatDisplaywin2 )
      break;
    iStringLen += 4;
    if ( (unsigned int)++v3 >= 0x28 )
      return bResult;
  }
  v12 = ((int (*)(void))v1->m_aspTextGeom[v3].m_pObject->vfptr[38].__vecDelDtor)();
  v13 = ((int (__thiscall *)(ChatBoardFlex *))v1->vfptr[36].__vecDelDtor)(v1);
  PgFont::GetTextLenInWidth(v1->m_apkFont[v3], (char *)v12, v13);
  v14 = v1->vfptr[56].__vecDelDtor;
  c = 416;
  ((void (__thiscall *)(ChatBoardFlex *, int *, int *))v14)(v1, &c, &iY);
  if ( v12 )
  {
    v16 = strlen((const char *)v12);
    iStringLen = v16;
    name[0] = 0;
    memset(&name[1], 0, 0x3FFu);
    v17 = 0;
    v18 = 0;
    if ( *(_BYTE *)v12 == 91 )
    {
      if ( *(_BYTE *)(v12 + 1) == 91 )
        v18 = 1;
      v17 = 0;
      if ( v16 > 0 )
      {
        v19 = (ChatDisplayWin2 *)(1 - v12);
        chatDisplaywin2 = (ChatDisplayWin2 *)(1 - v12);
        while ( (ChatDisplayWin2 *)iStringLen != (ChatDisplayWin2 *)((char *)v19 + v12 + v17) )
        {
          if ( *(_BYTE *)(v12 + v17) == 93 )
          {
            if ( !v18 )
              goto LABEL_33;
            name[v17] = *(_BYTE *)(v12 + v17 + 1);
            v18 = 0;
          }
          else
          {
            name[v17] = *(_BYTE *)(v12 + v17 + 1);
          }
          if ( ++v17 >= iStringLen )
            return bResult;
          v19 = chatDisplaywin2;
        }
      }
    }
    else if ( *(_BYTE *)v12 == 123 )
    {
      v20 = 0;
      do
        ++v20;
      while ( *(_BYTE *)(v20 + v12) != 44 );
      for ( i = v20 + 1; *(_BYTE *)(i + v12) != 44; ++i )
        ;
      v22 = i + 1;
      if ( v22 < v16 )
      {
        while ( 1 )
        {
          v23 = *(_BYTE *)(v22 + v12);
          if ( v23 == 125 )
            break;
          if ( v23 != 91 || *(_BYTE *)(v22 + v12 + 1) == 91 )
            name[v17++] = v23;
          if ( ++v22 >= v16 )
            return bResult;
        }
LABEL_33:
        if ( v17 > 2 )
        {
          v24 = v1->m_bSystemWindow == 0;
          dest[v17 + 19] = 0;
          if ( v24 )
          {
            *(float *)&chatDisplaywin2 = COERCE_FLOAT(PgWin::GetParentWin((PgWin *)&v1->vfptr));
            if ( *(float *)&chatDisplaywin2 != 0.0 )
            {
              v25 = strtok(name, " ");
              if ( v25 )
              {
                do
                {
                  v26 = v25;
                  v25 = strtok(0, " ");
                }
                while ( v25 );
                if ( v26 )
                {
                  if ( strlen(v26) )
                  {
                    *(_QWORD *)&dest[12] = 0i64;
                    *(_QWORD *)&dest[4] = 0i64;
                    *(_DWORD *)dest = 0;
                    strncpy(dest, v26, 0x14u);
                    GameFrameWork::m_kWhisperCharID = *(Name5 *)dest;
                    *(_QWORD *)&dest[12] = 0i64;
                    *(_QWORD *)&dest[4] = 0i64;
                    *(_DWORD *)dest = 0;
                    strncpy(dest, v26, 0x14u);
                    v27 = *(_QWORD *)&dest[4];
                    v1->m_selectedChar.n5_code[0] = *(_DWORD *)dest;
                    v28 = *(_DWORD *)&dest[12];
                    v1->m_selectedChar.n5_code[1] = v27;
                    v29 = *(_DWORD *)&dest[16];
                    v1->m_selectedChar.n5_code[2] = HIDWORD(v27);
                    v1->m_selectedChar.n5_code[3] = v28;
                    v1->m_selectedChar.n5_code[4] = v29;
                  }
                }
              }
              ChatDisplayWin2::OnWhisperTab(chatDisplaywin2, 0);
              unk_A8E19E = 1;
              bResult = 1;
            }
          }
        }
      }
    }
    result = bResult;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (005E0C80) --------------------------------------------------------
void __thiscall ChatBoardFlex::AddUserChat(ChatBoardFlex *this, ChatBoardFlex::Type eType, char *pcText)
{
  ChatBoardFlex *v3; // edi@1
  char cTmp[512]; // [sp+8h] [bp-204h]@2

  v3 = this;
  if ( pcText )
  {
    cTmp[0] = 0;
    memset(&cTmp[1], 0, 0x1FFu);
    strcpy(cTmp, pcText);
    ChatBoardFlex::Add(v3, eType, cTmp);
  }
}

//----- (005E0D00) --------------------------------------------------------
void __thiscall ChatBoardFlex::AddUserChat(ChatBoardFlex *this, ChatBoardFlex::Type eType, char *pcText, char kChatID)
{
  ChatBoardFlex *v4; // edi@1
  char cTmp[512]; // [sp+8h] [bp-204h]@2

  v4 = this;
  if ( pcText )
  {
    cTmp[0] = 0;
    memset(&cTmp[1], 0, 0x1FFu);
    strcpy(cTmp, pcText);
    ChatBoardFlex::Add(v4, eType, cTmp, kChatID);
  }
}

//----- (005E0D80) --------------------------------------------------------
void __thiscall ChatBoardFlex::AddUserChat(ChatBoardFlex *this, char *pcText)
{
  char cTmp[512]; // [sp+4h] [bp-204h]@1

  strcpy(cTmp, pcText);
  ChatBoardFlex::Add(this, ITEM, cTmp);
}

//----- (005E0DD0) --------------------------------------------------------
void __thiscall ChatBoardFlex::AddUserChat(ChatBoardFlex *this, char *pcText, char kChatID)
{
  char cTmp[512]; // [sp+4h] [bp-204h]@1

  strcpy(cTmp, pcText);
  ChatBoardFlex::Add(this, ITEM, cTmp, kChatID);
}

//----- (005E0E20) --------------------------------------------------------
void __thiscall ChatBoardFlex::AddGMUserChat(ChatBoardFlex *this, char *pcText)
{
  char cTmp[512]; // [sp+4h] [bp-204h]@1

  strcpy(cTmp, pcText);
  ChatBoardFlex::Add(this, (ChatBoardFlex::Type)1024, cTmp);
}

//----- (005E0E70) --------------------------------------------------------
void __thiscall ChatBoardFlex::UpdateMeWin(ChatBoardFlex *this, float fCurTime)
{
  ChatBoardFlex *v2; // esi@1
  NiRefObjectVtbl *v3; // edx@2
  int v4; // ebx@2
  unsigned int v5; // edi@2
  unsigned int v6; // eax@2
  int v7; // edi@2
  int v8; // ebx@2
  void *(__thiscall *v9)(NiRefObject *, unsigned int); // edx@2
  NiNode *v10; // eax@2
  float v11; // edx@2
  float v12; // ecx@2
  float v13; // edx@2
  int v14; // edi@3
  int v15; // edi@6
  char *v16; // edi@20
  bool v17; // zf@21
  unsigned int v18; // eax@22
  int v19; // ebx@22
  int v20; // eax@24
  int v21; // eax@24
  float v22; // edx@26
  int v23; // ebx@27
  signed int v24; // ecx@28
  int *v25; // edx@28
  char *v26; // edx@31
  int v27; // eax@31
  SpScreenText **v28; // edi@32
  unsigned int v29; // eax@33
  int v30; // ebx@33
  int v31; // ebx@34
  char *v32; // eax@38
  char *v33; // ebx@39
  void *(__thiscall *v34)(NiRefObject *, unsigned int); // edx@39
  unsigned int v35; // eax@39
  int v36; // eax@39
  int v37; // eax@42
  int v38; // eax@42
  char *v39; // ST14_4@44
  char v40; // al@44
  void *(__thiscall *v41)(NiRefObject *, unsigned int); // edx@44
  signed int v42; // eax@44
  char v43; // bl@51
  D3DXCOLOR *v44; // ecx@52
  NiRefObjectVtbl *v45; // ebx@53
  D3DXCOLOR *v46; // eax@53
  char *v47; // ecx@54
  void *(__thiscall *v48)(NiRefObject *, unsigned int); // edx@54
  ChatColor *v49; // eax@55
  NiRefObjectVtbl *v50; // ebx@56
  char v51; // dl@56
  SpScreenText *v52; // ebx@60
  char *v53; // eax@62
  char *v54; // eax@73
  unsigned int v55; // ebx@76
  char *v56; // eax@77
  NiRefObjectVtbl *v57; // ebx@80
  char v58; // ST10_1@80
  char v59; // dl@80
  char *v60; // eax@94
  NiRefObjectVtbl *v61; // ebx@100
  char *v62; // eax@103
  char *v63; // eax@108
  int v64; // ebx@123
  int v65; // edi@123
  void (__stdcall *v66)(void *); // eax@124
  int v67; // edi@127
  char v68; // [sp-18h] [bp-988h]@107
  char v69; // [sp-14h] [bp-984h]@107
  char v70; // [sp-10h] [bp-980h]@107
  ColorID v71; // [sp-Ch] [bp-97Ch]@52
  char v72; // [sp-Ch] [bp-97Ch]@107
  char v73; // [sp+4h] [bp-96Ch]@66
  char v74; // [sp+14h] [bp-95Ch]@87
  char v75; // [sp+24h] [bp-94Ch]@59
  char v76; // [sp+34h] [bp-93Ch]@67
  char v77; // [sp+44h] [bp-92Ch]@58
  char v78; // [sp+54h] [bp-91Ch]@69
  D3DXCOLOR result; // [sp+64h] [bp-90Ch]@52
  char v80; // [sp+74h] [bp-8FCh]@88
  D3DXCOLOR v81; // [sp+84h] [bp-8ECh]@56
  D3DXCOLOR v82; // [sp+94h] [bp-8DCh]@80
  D3DXCOLOR v83; // [sp+A4h] [bp-8CCh]@100
  char v84; // [sp+B4h] [bp-8BCh]@68
  char v85; // [sp+C4h] [bp-8ACh]@91
  char v86; // [sp+D4h] [bp-89Ch]@89
  char v87; // [sp+E4h] [bp-88Ch]@57
  D3DXCOLOR v88; // [sp+F4h] [bp-87Ch]@72
  D3DXCOLOR v89; // [sp+104h] [bp-86Ch]@93
  D3DXCOLOR v90; // [sp+114h] [bp-85Ch]@109
  D3DXCOLOR v91; // [sp+124h] [bp-84Ch]@102
  D3DXCOLOR v92; // [sp+134h] [bp-83Ch]@61
  char v93; // [sp+144h] [bp-82Ch]@70
  int v94; // [sp+148h] [bp-828h]@2
  tagSIZE kSize; // [sp+150h] [bp-820h]@2
  bool bNewLineColoring; // [sp+15Ah] [bp-816h]@21
  bool bAllScan; // [sp+15Bh] [bp-815h]@5
  int iTextRow; // [sp+15Ch] [bp-814h]@2
  int nTokenInx; // [sp+160h] [bp-810h]@2
  float fOffset; // [sp+164h] [bp-80Ch]@2
  char *pcText; // [sp+168h] [bp-808h]@20
  char acTemp[1024]; // [sp+16Ch] [bp-804h]@22
  char pcTempSubText[256]; // [sp+56Ch] [bp-404h]@40
  char pTokenCheckText[256]; // [sp+66Ch] [bp-304h]@34
  char pcTemp[256]; // [sp+76Ch] [bp-204h]@44
  char acColorText[256]; // [sp+86Ch] [bp-104h]@21

  v2 = this;
  if ( this->m_apcText )
  {
    v3 = this->vfptr;
    v4 = this->m_iLineGap;
    v5 = this->m_pkFont->m_dwFontSizeInPixel;
    iTextRow = this->m_iViewIndex;
    v6 = (((int (__thiscall *)(ChatBoardFlex *))v3[37].__vecDelDtor)(this) + 2 * v4) / (v4 + v5);
    v7 = v2->m_iLineGap;
    fOffset = *(float *)&v2->m_pkFont->m_dwFontSizeInPixel;
    v8 = v6 - 1;
    v9 = v2->vfptr[37].__vecDelDtor;
    nTokenInx = v6 - 1;
    v94 = (((int (__thiscall *)(ChatBoardFlex *))v9)(v2) + 2 * v7) % (unsigned int)(v7 + LODWORD(fOffset));
    v10 = v2->m_spTextOffset.m_pObject;
    fOffset = (double)(unsigned int)v94;
    v11 = v10->m_kLocal.m_Translate.y;
    v12 = v10->m_kLocal.m_Translate.x;
    *(float *)&kSize.cx = fOffset;
    v13 = v10->m_kLocal.m_Translate.z;
    v10->m_kLocal.m_Translate.x = v12;
    LODWORD(v10->m_kLocal.m_Translate.y) = kSize.cx;
    v10->m_kLocal.m_Translate.z = v13;
    if ( v8 < 39 )
    {
      v14 = (int)&v2->m_aspTextGeom[39];
      LODWORD(fOffset) = 39 - v8;
      do
      {
        (*(void (__stdcall **)(void *))(**(_DWORD **)v14 + 148))(&unk_9B0F0A);
        v14 -= 4;
        --LODWORD(fOffset);
      }
      while ( fOffset != 0.0 );
    }
    bAllScan = 0;
    if ( v8 >= 0 )
    {
      v15 = iTextRow;
      while ( 1 )
      {
        if ( v15 < 0 )
        {
          if ( v2->m_MaxTextLine != 100 )
            OutputDebugStringA(&byte_9B0F0B);
          if ( bAllScan == 1 )
          {
            if ( v8 >= 0 )
            {
              v67 = (int)&v2->m_aspTextGeom[v8];
              do
              {
                (*(void (__stdcall **)(void *))(**(_DWORD **)v67 + 148))(&unk_9B0F21);
                v67 -= 4;
                --v8;
              }
              while ( v8 >= 0 );
            }
            goto LABEL_129;
          }
          if ( v2->m_MaxTextViewLine <= 0 )
            v15 = 0;
          else
            v15 += v2->m_MaxTextLine;
          iTextRow = v15;
          bAllScan = 1;
        }
        if ( v2->m_aeType[v15] != v2->m_FilterType )
          break;
        if ( v2->m_FilteredTextShow )
          goto LABEL_20;
        iTextRow = --v15;
LABEL_120:
        if ( v8 < 0 )
          goto LABEL_129;
      }
      if ( v2->m_MaxTextLine != 100 )
        OutputDebugStringA(&byte_9B0F22);
LABEL_20:
      v16 = v2->m_apcText[v15];
      pcText = v16;
      if ( *(float *)&v16 == 0.0 )
      {
        ((void (__stdcall *)(void *))v2->m_aspTextGeom[v8].m_pObject->vfptr[37].__vecDelDtor)(&unk_9B0F26);
        nTokenInx = v8 - 1;
      }
      else
      {
        memset(acColorText, 0, 0x100u);
        v17 = *v16 == 0;
        bNewLineColoring = 0;
        fOffset = 0.0;
        if ( !v17 )
        {
          do
          {
            v18 = ((int (__thiscall *)(ChatBoardFlex *))v2->vfptr[36].__vecDelDtor)(v2);
            v19 = PgFont::GetTextLenInWidth(v2->m_apkFont[iTextRow], v16, v18);
            acTemp[0] = 0;
            memset(&acTemp[1], 0, 0x3FFu);
            strncpy(acTemp, v16, v19);
            if ( ChatBoardFlex::IsColorTextLine(v2, acTemp, &kSize)
              || ChatBoardFlex::IsMainTextColorText(v2, v16, &kSize) )
            {
              v20 = ((int (__thiscall *)(ChatBoardFlex *))v2->vfptr[36].__vecDelDtor)(v2);
              v21 = PgFont::GetTextLenInWidth(v2->m_apkFont[iTextRow], v16, kSize.cx + v20);
              v19 = ChatBoardFlex::ColorCommandCheck(v21, v16);
            }
            ++LODWORD(fOffset);
            v16 += v19;
          }
          while ( *v16 );
        }
        v22 = fOffset;
        v94 = nTokenInx - LODWORD(fOffset);
        if ( nTokenInx - LODWORD(fOffset) + 1 < 0 )
        {
          if ( nTokenInx >= 0 )
          {
            v64 = nTokenInx;
            v65 = (int)&v2->m_aspTextGeom[nTokenInx];
            do
            {
              v66 = *(void (__stdcall **)(void *))(**(_DWORD **)v65 + 148);
              v65 -= 4;
              v66(&unk_9B0F23);
              --v64;
            }
            while ( v64 >= 0 );
          }
          goto LABEL_129;
        }
        fOffset = *(float *)&pcText;
        v23 = LODWORD(v22) - 1;
        if ( bAllScan == 1 )
        {
          v24 = 0;
          v25 = v2->m_ViewedIndex;
          while ( *v25 != iTextRow )
          {
            ++v24;
            ++v25;
            if ( v24 >= 40 )
              goto LABEL_31;
          }
          --iTextRow;
          goto LABEL_119;
        }
LABEL_31:
        v26 = pcText;
        v27 = nTokenInx - v23;
        v2->m_ViewedIndex[nTokenInx - v23] = iTextRow;
        if ( *v26 )
        {
          v28 = (SpScreenText **)&v2->m_aspTextGeom[v27];
          do
          {
            v29 = ((int (__thiscall *)(_DWORD))v2->vfptr[36].__vecDelDtor)(v2);
            v30 = iTextRow;
            nTokenInx = PgFont::GetTextLenInWidth(v2->m_apkFont[iTextRow], (char *)LODWORD(fOffset), v29);
            if ( bNewLineColoring == 1 )
            {
              PgFont::GetTextSize(v2->m_apkFont[v30], acColorText, strlen(acColorText), &kSize);
              nTokenInx = 0;
              strncpy(pTokenCheckText, (char *)LODWORD(fOffset), strlen((const char *)LODWORD(fOffset)) + 1);
              v31 = 0;
              while ( 1 )
              {
                if ( !strncmp(&pTokenCheckText[v31], "{color,", 7u) )
                {
LABEL_38:
                  *(float *)&v32 = COERCE_FLOAT(fs("%s%s", acColorText, fOffset));
                  goto LABEL_39;
                }
                if ( !strncmp(&pTokenCheckText[v31], "<\t", 2u) )
                  break;
                ++nTokenInx;
                if ( ++v31 >= 10 )
                  goto LABEL_38;
              }
              *(float *)&v32 = COERCE_FLOAT(fs("%s%s", acColorText, &pTokenCheckText[nTokenInx]));
LABEL_39:
              v33 = v32;
              v34 = v2->vfptr[36].__vecDelDtor;
              fOffset = *(float *)&v32;
              bNewLineColoring = 0;
              v35 = ((int (__thiscall *)(ChatBoardFlex *))v34)(v2);
              v36 = PgFont::GetTextLenInWidth(v2->m_apkFont[iTextRow], v33, v35);
              v30 = iTextRow;
              nTokenInx = v36;
            }
            memset(pcTempSubText, 0, 0x100u);
            strncpy(pcTempSubText, (char *)LODWORD(fOffset), nTokenInx);
            if ( ChatBoardFlex::IsColorTextLine(v2, pcTempSubText, &kSize)
              || ChatBoardFlex::IsMainTextColorText(v2, (char *)LODWORD(fOffset), &kSize) )
            {
              v37 = ((int (__thiscall *)(_DWORD))v2->vfptr[36].__vecDelDtor)(v2);
              v38 = PgFont::GetTextLenInWidth(v2->m_apkFont[v30], (char *)LODWORD(fOffset), kSize.cx + v37);
              nTokenInx = ChatBoardFlex::ColorCommandCheck(v38, (char *)LODWORD(fOffset));
            }
            if ( !*v28 )
              goto LABEL_115;
            memset(pcTemp, 0, 0x100u);
            strncpy(pcTemp, (char *)LODWORD(fOffset), nTokenInx);
            v39 = (char *)LODWORD(fOffset);
            pcTemp[nTokenInx] = 0;
            v40 = ChatBoardFlex::IsNewLineColoring(pcTemp, acColorText, v39);
            v41 = (*v28)->vfptr[37].__vecDelDtor;
            bNewLineColoring = v40;
            ((void (__stdcall *)(char *))v41)(pcTemp);
            ((void (__stdcall *)(PgFont *))(*v28)->vfptr[36].__vecDelDtor)(v2->m_apkFont[v30]);
            SpScreenText::SetShadowOffset(*v28, 1u);
            (*v28)[1].m_uiExtraDataSize = v30;
            v42 = v2->m_aeType[v30];
            if ( v42 > 512 )
            {
              if ( v42 > 4112 )
              {
                if ( v42 == 0x2000 )
                {
                  v52 = *v28;
                  if ( !*(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable )
                  {
                    v72 = -1;
                    v70 = -1;
                    v69 = ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable[0];
                    v68 = -1;
                    goto LABEL_111;
                  }
                  v63 = CDataReader::GetRecord(
                          (CDataReader *)(*(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable + 4),
                          0x36u);
                  v72 = -1;
                  if ( v63 )
                  {
                    v70 = v63[6];
                    v69 = v63[5];
                    v68 = v63[4];
LABEL_111:
                    Color::GetDxColor(&v90, v68, v69, v70, v72);
                  }
                  else
                  {
                    Color::GetDxColor(&v90, -1, 0, -1, -1);
                  }
                  v46 = &v90;
LABEL_113:
                  v48 = v52->vfptr[44].__vecDelDtor;
                  v47 = (char *)v52;
                  goto LABEL_114;
                }
                if ( v42 == 0x4000 )
                {
                  v52 = *v28;
                  if ( *(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable )
                  {
                    v62 = CDataReader::GetRecord(
                            (CDataReader *)(*(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable + 4),
                            7u);
                    if ( v62 )
                    {
                      Color::GetDxColor(&v91, v62[4], v62[5], v62[6], -1);
                      v46 = &v91;
                    }
                    else
                    {
                      Color::GetDxColor(&v91, -1, 0, -1, -1);
                      v46 = &v91;
                    }
                  }
                  else
                  {
                    Color::GetDxColor(&v91, -1, ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable[0], -1, -1);
                    v46 = &v91;
                  }
                  goto LABEL_113;
                }
                if ( v42 == 24576 )
                {
                  v61 = (*v28)->vfptr;
                  pcText = *(char **)v28;
                  v46 = Color::GetDxColor(&v83, -1, -1, 0, -1);
                  v47 = pcText;
                  v48 = v61[44].__vecDelDtor;
                  goto LABEL_114;
                }
              }
              else
              {
                if ( v42 == 4112 )
                {
                  v52 = *v28;
                  if ( *(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable )
                  {
                    v60 = CDataReader::GetRecord(
                            (CDataReader *)(*(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable + 4),
                            0x35u);
                    if ( v60 )
                    {
                      Color::GetDxColor(&v89, v60[4], v60[5], v60[6], -1);
                      v46 = &v89;
                    }
                    else
                    {
                      Color::GetDxColor(&v89, -1, 0, -1, -1);
                      v46 = &v89;
                    }
                  }
                  else
                  {
                    Color::GetDxColor(&v89, -1, ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable[0], -1, -1);
                    v46 = &v89;
                  }
                  goto LABEL_113;
                }
                if ( v42 > 4096 )
                {
                  if ( v42 == 4106 )
                  {
                    v45 = (*v28)->vfptr;
                    pcText = *(char **)v28;
                    v46 = ColorInfoTable::GetDxColor((D3DXCOLOR *)&v85, Chat_GMWhisper);
                    goto LABEL_54;
                  }
                }
                else
                {
                  if ( v42 == 4096 )
                  {
                    v45 = (*v28)->vfptr;
                    pcText = *(char **)v28;
                    v46 = ColorInfoTable::GetDxColor((D3DXCOLOR *)&v86, Chat_GuildAcademy);
                    goto LABEL_54;
                  }
                  if ( v42 == 1024 )
                  {
                    v45 = (*v28)->vfptr;
                    pcText = *(char **)v28;
                    v46 = ColorInfoTable::GetDxColor((D3DXCOLOR *)&v80, Chat_GMNormal);
                    goto LABEL_54;
                  }
                  if ( v42 == 2048 )
                  {
                    v45 = (*v28)->vfptr;
                    pcText = *(char **)v28;
                    v46 = ColorInfoTable::GetDxColor((D3DXCOLOR *)&v74, Chat_GMShout);
LABEL_54:
                    v47 = pcText;
                    v48 = v45[44].__vecDelDtor;
LABEL_114:
                    v48((NiRefObject *)v47, (unsigned int)v46);
                    goto LABEL_115;
                  }
                }
              }
            }
            else
            {
              if ( v42 != 512 )
              {
                if ( v42 > 16 )
                {
                  switch ( v42 )
                  {
                    case 32:
                      v71 = 32;
                      v44 = (D3DXCOLOR *)&v73;
LABEL_53:
                      v45 = (*v28)->vfptr;
                      pcText = *(char **)v28;
                      v46 = ColorInfoTable::GetDxColor(v44, v71);
                      goto LABEL_54;
                    case 64:
                      v45 = (*v28)->vfptr;
                      pcText = *(char **)v28;
                      v46 = ColorInfoTable::GetDxColor((D3DXCOLOR *)&v76, Chat_Friend);
                      goto LABEL_54;
                    case 128:
                      v45 = (*v28)->vfptr;
                      pcText = *(char **)v28;
                      v46 = ColorInfoTable::GetDxColor((D3DXCOLOR *)&v84, Chat_Announcement);
                      goto LABEL_54;
                    case 256:
                      v45 = (*v28)->vfptr;
                      pcText = *(char **)v28;
                      v46 = ColorInfoTable::GetDxColor((D3DXCOLOR *)&v78, lightorange);
                      goto LABEL_54;
                    default:
                      goto LABEL_115;
                  }
                  goto LABEL_115;
                }
                if ( v42 != 16 )
                {
                  switch ( v42 )
                  {
                    case 1:
                      v43 = v2->m_kChatID[v30];
                      if ( !v43 )
                      {
                        v71 = 27;
                        v44 = &result;
                        goto LABEL_53;
                      }
                      v49 = ChatColorTab::GetByID(v43);
                      if ( !v49 )
                        goto LABEL_115;
                      v50 = (*v28)->vfptr;
                      v51 = v49->ColorG;
                      pcText = *(char **)v28;
                      v46 = Color::GetDxColor(&v81, v49->ColorR, v51, v49->ColorB, -1);
                      v47 = pcText;
                      v48 = v50[44].__vecDelDtor;
                      break;
                    case 2:
                      v45 = (*v28)->vfptr;
                      pcText = *(char **)v28;
                      v46 = ColorInfoTable::GetDxColor((D3DXCOLOR *)&v87, Chat_FieldShout);
                      goto LABEL_54;
                    case 4:
                      v45 = (*v28)->vfptr;
                      pcText = *(char **)v28;
                      v46 = ColorInfoTable::GetDxColor((D3DXCOLOR *)&v77, Chat_System);
                      goto LABEL_54;
                    case 8:
                      v45 = (*v28)->vfptr;
                      pcText = *(char **)v28;
                      v46 = ColorInfoTable::GetDxColor((D3DXCOLOR *)&v75, Chat_Whisper);
                      goto LABEL_54;
                    default:
                      goto LABEL_115;
                  }
                  goto LABEL_114;
                }
                v52 = *v28;
                if ( *(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable )
                {
                  v53 = CDataReader::GetRecord(
                          (CDataReader *)(*(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable + 4),
                          0x1Fu);
                  if ( v53 )
                  {
                    Color::GetDxColor(&v92, v53[4], v53[5], v53[6], -1);
                    v46 = &v92;
                  }
                  else
                  {
                    Color::GetDxColor(&v92, -1, 0, -1, -1);
                    v46 = &v92;
                  }
                }
                else
                {
                  Color::GetDxColor(&v92, -1, ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable[0], -1, -1);
                  v46 = &v92;
                }
                goto LABEL_113;
              }
              v93 = v2->m_kChatID[v30];
              if ( !v93 )
              {
                v52 = *v28;
                if ( *(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable )
                {
                  v54 = CDataReader::GetRecord(
                          (CDataReader *)(*(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable + 4),
                          0x1Cu);
                  if ( v54 )
                  {
                    Color::GetDxColor(&v88, v54[4], v54[5], v54[6], -1);
                    v46 = &v88;
                  }
                  else
                  {
                    Color::GetDxColor(&v88, -1, 0, -1, -1);
                    v46 = &v88;
                  }
                }
                else
                {
                  Color::GetDxColor(&v88, -1, ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable[0], -1, -1);
                  v46 = &v88;
                }
                goto LABEL_113;
              }
              v55 = 0;
              if ( ITableBase<ChatColor,ChatColorTab>::GetTotal() )
              {
                while ( 1 )
                {
                  v56 = CDataReader::GetRecord((CDataReader *)(ITableBase<ChatColor,ChatColorTab>::ms_pkTable + 4), v55);
                  if ( *v56 == v93 )
                    break;
                  if ( ++v55 >= ITableBase<ChatColor,ChatColorTab>::GetTotal() )
                    goto LABEL_115;
                }
                v57 = (*v28)->vfptr;
                v58 = v56[3];
                v59 = v56[1];
                pcText = *(char **)v28;
                v46 = Color::GetDxColor(&v82, v59, v56[2], v58, -1);
                v47 = pcText;
                v48 = v57[44].__vecDelDtor;
                goto LABEL_114;
              }
            }
LABEL_115:
            ++v28;
            v17 = *(_BYTE *)(nTokenInx + LODWORD(fOffset)) == 0;
            LODWORD(fOffset) += nTokenInx;
          }
          while ( !v17 );
        }
        nTokenInx = v94;
      }
      --iTextRow;
LABEL_119:
      v15 = iTextRow;
      v8 = nTokenInx;
      goto LABEL_120;
    }
LABEL_129:
    ChatBoardFlex::ClearViewedLineInfo(v2);
  }
}
// A886DC: using guessed type int ITableBase<ChatColor,ChatColorTab>::ms_pkTable;

//----- (005E1BE0) --------------------------------------------------------
char __thiscall ChatBoardFlex::FindClickItemLink(ChatBoardFlex *this, char *pcharName, int iX, int nLineIndex)
{
  ChatBoardFlex *v4; // esi@1
  int v5; // eax@1
  PgTextGeometry *v6; // edx@1
  unsigned int v7; // edi@1
  int v8; // esi@1
  int v9; // eax@1
  NiRefObjectVtbl *v10; // edx@1
  int (*v11)(void); // eax@1
  int v12; // ebx@1
  int v13; // esi@1
  char *v14; // edi@2
  int v15; // esi@7
  char *v16; // edi@8
  ChatBoardFlex *v17; // edi@14
  unsigned int v18; // ST08_4@14
  char *v19; // eax@14
  char *v20; // edi@16
  char *v21; // esi@18
  char *v22; // eax@19
  char v23; // cl@20
  bool v24; // zf@21
  char *v25; // eax@21
  int v26; // edx@21
  char v27; // cl@22
  char *v28; // eax@23
  int v29; // edx@23
  char v30; // cl@24
  char v31; // cl@26
  char v32; // cl@29
  GameFrameWork *v33; // ebx@34
  int v34; // esi@35
  size_t v35; // ST08_4@39
  const char *v36; // eax@39
  int v37; // esi@42
  int v38; // edx@43
  GameFrameWork *v39; // ebx@44
  GameFrameWork *v40; // ecx@45
  int v41; // eax@45
  GameFrameWork **v42; // eax@53
  GameFrameWork *v43; // ecx@55
  NiUnsharedGeometryGroup *v44; // eax@56
  SHINE_ITEM_STRUCT *v46; // ecx@59
  Item *v47; // eax@61
  Item *v48; // esi@61
  int v49; // [sp+10h] [bp-420h]@16
  int nViewLinkCnt; // [sp+14h] [bp-41Ch]@1
  int nItemLinkTextIndex; // [sp+18h] [bp-418h]@1
  int nTextClinkLineIndex; // [sp+1Ch] [bp-414h]@1
  GameFrameWork *pGameFrame; // [sp+20h] [bp-410h]@1
  ChatBoardFlex *v54; // [sp+24h] [bp-40Ch]@1
  int v55; // [sp+28h] [bp-408h]@1
  char chItemLinkFullText[1024]; // [sp+2Ch] [bp-404h]@1

  v4 = this;
  v54 = this;
  v55 = nLineIndex;
  v5 = ChatBoardFlex::FindClickTextIndex(this, pcharName, iX, nLineIndex);
  v6 = v4->m_aspTextGeom[nLineIndex].m_pObject;
  v7 = v4->m_pkFont->m_dwFontSizeInPixel;
  v8 = v4->m_iLineGap;
  nItemLinkTextIndex = v5;
  v9 = v6->m_nTextIndex;
  v10 = v54->vfptr;
  nTextClinkLineIndex = v9;
  v11 = (int (*)(void))v10[37].__vecDelDtor;
  v12 = 0;
  pGameFrame = 0;
  nViewLinkCnt = (v11() + 2 * v8) / (v7 + v8);
  memset(chItemLinkFullText, 0, 0x400u);
  v13 = nLineIndex - 1;
  if ( nLineIndex - 1 >= 0 )
  {
    v14 = (char *)&v54->m_aspTextGeom[v13];
    do
    {
      if ( (*(int (**)(void))(**(_DWORD **)v14 + 152))() )
      {
        if ( nTextClinkLineIndex != *(_DWORD *)(*(_DWORD *)v14 + 328) )
          break;
        ++v12;
      }
      v14 -= 4;
      --v13;
    }
    while ( v13 >= 0 );
  }
  v15 = v55 + 1;
  if ( v55 + 1 < nViewLinkCnt )
  {
    v16 = (char *)&v54->m_aspTextGeom[v15];
    do
    {
      if ( (*(int (**)(void))(**(_DWORD **)v16 + 152))() )
      {
        if ( nTextClinkLineIndex != *(_DWORD *)(*(_DWORD *)v16 + 328) )
          break;
        pGameFrame = (GameFrameWork *)((char *)pGameFrame + 1);
      }
      ++v15;
      v16 += 4;
    }
    while ( v15 < nViewLinkCnt );
  }
  if ( v12 )
  {
    if ( v12 < 0 )
    {
LABEL_32:
      v17 = v54;
      goto LABEL_33;
    }
    v49 = v55 - v12;
    v20 = (char *)&v54->m_aspTextGeom[v55 - v12];
    while ( 1 )
    {
      if ( v49 < 0 )
        return 0;
      v21 = (char *)(*(int (**)(void))(**(_DWORD **)v20 + 152))();
      if ( v21 )
      {
        v22 = chItemLinkFullText;
        do
          v23 = *v22++;
        while ( v23 );
        v24 = v22 == &chItemLinkFullText[1];
        v25 = v21;
        v26 = (int)(v21 + 1);
        if ( v24 )
        {
          do
            v27 = *v25++;
          while ( v27 );
          strncpy(chItemLinkFullText, v21, (unsigned int)&v25[-v26]);
          v28 = v21;
          v29 = (int)(v21 + 1);
          do
            v30 = *v28++;
          while ( v30 );
        }
        else
        {
          do
            v31 = *v25++;
          while ( v31 );
          strncat(chItemLinkFullText, v21, (size_t)&v25[-v26]);
          if ( !v12 )
            goto LABEL_31;
          v28 = v21;
          v29 = (int)(v21 + 1);
          do
            v32 = *v28++;
          while ( v32 );
        }
        nItemLinkTextIndex += (int)&v28[-v29];
      }
LABEL_31:
      ++v49;
      v20 += 4;
      if ( --v12 < 0 )
        goto LABEL_32;
    }
  }
  v17 = v54;
  v18 = strlen((const char *)((int (*)(void))v54->m_aspTextGeom[v55].m_pObject->vfptr[38].__vecDelDtor)());
  v19 = (char *)((int (*)(void))v54->m_aspTextGeom[v55].m_pObject->vfptr[38].__vecDelDtor)();
  strncpy(chItemLinkFullText, v19, v18);
LABEL_33:
  if ( pGameFrame )
  {
    v33 = pGameFrame;
    if ( (signed int)pGameFrame < nViewLinkCnt )
    {
      v34 = (int)&v17->m_aspTextGeom[(_DWORD)pGameFrame + v55];
      do
      {
        if ( (signed int)v33 + v55 >= nViewLinkCnt )
          break;
        if ( (*(int (**)(void))(**(_DWORD **)v34 + 152))() )
        {
          if ( nTextClinkLineIndex != *(_DWORD *)(*(_DWORD *)v34 + 328) )
            break;
          v35 = strlen((const char *)(*(int (**)(void))(**(_DWORD **)v34 + 152))());
          v36 = (const char *)(*(int (**)(void))(**(_DWORD **)v34 + 152))();
          strncat(chItemLinkFullText, v36, v35);
        }
        v33 = (GameFrameWork *)((char *)v33 + 1);
        v34 += 4;
      }
      while ( (signed int)v33 < nViewLinkCnt );
    }
  }
  if ( nItemLinkTextIndex >= (signed int)strlen(chItemLinkFullText) )
    return 0;
  v37 = ChatBoardFlex::FindItemLinkToken(v17, chItemLinkFullText, nItemLinkTextIndex);
  if ( !v37 )
    return 0;
  v38 = (int)v17->m_mapItemLinkInfo._Myhead;
  if ( *(_DWORD *)v38 == v38 )
    return 0;
  v39 = (GameFrameWork *)v17->m_pkFrameWork;
  pGameFrame = v39;
  if ( !v39 )
    return 0;
  v40 = (GameFrameWork *)v38;
  v41 = *(_DWORD *)(v38 + 4);
  if ( !*(_BYTE *)(v41 + 33) )
  {
    do
    {
      if ( *(_DWORD *)(v41 + 12) >= nTextClinkLineIndex )
      {
        v40 = (GameFrameWork *)v41;
        v41 = *(_DWORD *)v41;
      }
      else
      {
        v41 = *(_DWORD *)(v41 + 8);
      }
    }
    while ( !*(_BYTE *)(v41 + 33) );
    v39 = pGameFrame;
  }
  pGameFrame = v40;
  if ( v40 == (GameFrameWork *)v38 || nTextClinkLineIndex < (signed int)v40->m_kMsgQ.m_pBase )
  {
    v49 = v38;
    v42 = (GameFrameWork **)&v49;
  }
  else
  {
    v42 = &pGameFrame;
  }
  v43 = *v42;
  if ( *v42 == (GameFrameWork *)v38 || v37 > (signed int)(v43->m_kMsgQ.m_uiHead - v43->m_kMsgQ.m_uiAlloced) / 103 )
    goto LABEL_65;
  v46 = (SHINE_ITEM_STRUCT *)v43->m_kMsgQ.m_uiAlloced;
  if ( v37 - 1 > 0 )
    v46 += v37 - 1;
  v47 = Item::Create(v46);
  v48 = v47;
  if ( !v47 )
  {
LABEL_65:
    v44 = TextData3::Get(0x293B777Fu);
    GameFrameWork::AddSysMsg(v39, (const char *)v44);
    return 0;
  }
  GameFrameWork::ClickLinkItemInfo(v39, v47, PgWin::ms_iMsX, PgWin::ms_iMsY);
  v48->vfptr->__vecDelDtor((NiRefObject *)v48, 1u);
  return 1;
}

//----- (005E2040) --------------------------------------------------------
void __thiscall ChatBoardFlex::EraseWhisperToken(ChatBoardFlex *this, char *pcStr)
{
  ChatBoardFlex *v2; // edi@1
  signed int v3; // eax@1
  const char *v4; // edi@2
  char *v5; // ecx@2
  unsigned int v6; // edi@2
  bool v7; // cf@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kStr; // [sp+Ch] [bp-2Ch]@2
  int v9; // [sp+34h] [bp-4h]@2

  v2 = this;
  v3 = ChatBoardFlex::GetWhisperTokenType(this, pcStr);
  if ( v3 != 2 )
  {
    v4 = v2->m_pcWhisperToken[v3];
    kStr._Myres = 15;
    kStr._Mysize = 0;
    kStr._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&kStr, pcStr, strlen(pcStr));
    v9 = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::erase(&kStr, 0, strlen(v4));
    v5 = kStr._Bx._Ptr;
    v6 = kStr._Mysize;
    if ( kStr._Myres < 0x10 )
      v5 = (char *)&kStr;
    strncpy(pcStr, v5, kStr._Mysize);
    v7 = kStr._Myres < 0x10;
    pcStr[v6] = 0;
    if ( !v7 )
      operator delete(kStr._Bx._Ptr);
  }
}

//----- (005E2130) --------------------------------------------------------
void __userpurge ChatBoardFlex::DirectMessage(ChatBoardFlex *this@<ecx>, int a2@<edi>, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  ChatBoardFlex *v5; // ebx@1
  PopupMenuText *v6; // eax@5
  char *v7; // eax@5
  PopupMenuText *v8; // eax@5
  char *v9; // eax@5
  PopupMenuText *v10; // eax@5
  char *v11; // eax@8
  PopupMenuText *v12; // eax@8
  char *v13; // eax@9
  char *v14; // eax@11
  PopupMenuText *v15; // eax@11
  bool v16; // zf@11
  char *v17; // eax@12
  PopupMenuText *v18; // eax@12
  char *v19; // eax@12
  PopupMenuText *v20; // eax@12
  char *v21; // eax@12
  PopupMenuText *v22; // eax@12
  char *v23; // eax@13
  char *v24; // eax@14
  PopupMenuText *v25; // eax@14
  PopupMenuWin *v26; // ecx@14
  bool v27; // sf@18
  PgTextGeometry *v28; // eax@20
  PgWin *v29; // edi@20
  int v30; // eax@20
  int v31; // ecx@20
  unsigned int v32; // eax@20
  int v33; // edx@20
  unsigned int v34; // eax@20
  double v35; // st7@20
  char *v36; // edi@22
  int v37; // eax@25
  unsigned int v38; // eax@34
  char *v39; // edi@34
  char v40; // cl@35
  GameFrameWork *v41; // ecx@36
  int v42; // esi@40
  signed int v43; // eax@45
  GameFrameWork *v44; // ecx@48
  Name5 *v45; // esi@53
  char *v46; // eax@54
  char *v47; // eax@54
  NiD3DDefaultShader *v48; // eax@54
  PgFrameWork *v49; // eax@54
  GameFrameWork *v50; // ebx@55
  char *v51; // eax@55
  int v52; // edx@56
  int v53; // ecx@56
  unsigned int v54; // edx@56
  PgMsg::Frame *v55; // ecx@56
  Name5 *v56; // esi@58
  char *v57; // eax@59
  char *v58; // eax@59
  NiD3DDefaultShader *v59; // eax@59
  PgFrameWork *v60; // eax@59
  ChatDisplayWin2 *v61; // esi@61
  int v62; // eax@62
  int v63; // eax@63
  int v64; // eax@64
  GameFrameWork *v65; // ebx@68
  NiUnsharedGeometryGroup *v66; // eax@68
  int v67; // edx@70
  int v68; // ecx@70
  unsigned int v69; // edx@70
  PgMsg::Frame *v70; // ecx@70
  int v71; // ecx@71
  char *v72; // edx@71
  unsigned int v73; // ecx@71
  PgMsg::Frame *v74; // edx@71
  GameFrameWork *v75; // ecx@71
  unsigned int v76; // [sp-14h] [bp-894h]@11
  PgWin *v77; // [sp-10h] [bp-890h]@11
  char *v78; // [sp-Ch] [bp-88Ch]@11
  unsigned int v79; // [sp-8h] [bp-888h]@11
  PgMsg::Frame *v80; // [sp-4h] [bp-884h]@11
  int iX; // [sp+Ch] [bp-874h]@2
  int iY; // [sp+10h] [bp-870h]@2
  int i; // [sp+14h] [bp-86Ch]@18
  float fYMax; // [sp+18h] [bp-868h]@20
  int iStringLen; // [sp+1Ch] [bp-864h]@19
  char *charName; // [sp+20h] [bp-860h]@20
  Name5 v87; // [sp+24h] [bp-85Ch]@62
  PgMsg::Frame pkFrameCancelMsg; // [sp+38h] [bp-848h]@20
  char acWhisper[1024]; // [sp+4Ch] [bp-834h]@34
  char name[1024]; // [sp+44Ch] [bp-434h]@25
  PgMsg::Frame kCancelMsg; // [sp+84Ch] [bp-34h]@4
  char v92; // [sp+860h] [bp-20h]@4
  char acName[21]; // [sp+864h] [bp-1Ch]@54

  v5 = this;
  if ( !((unsigned int)this[-1].m_aspTextGeom[10].m_pObject & 1) )
  {
    iX = PgWin::ms_iMsX;
    iY = PgWin::ms_iMsY;
    switch ( iMsgTag )
    {
      case 5:
        if ( !ChatBoardFlex::IsMouseOverNameText((ChatBoardFlex *)((char *)this - 232)) )
          return;
        Name5::n_string((Name5 *)&v5->m_ViewedIndex[34], (char *)&kCancelMsg);
        v92 = 0;
        if ( !strcmp(
                (const char *)((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)(),
                (const char *)&kCancelMsg) )
          return;
        (*(void (__stdcall **)(unsigned int, int))(*(_DWORD *)v5->m_ViewedIndex[33] + 308))(
          PgWin::ms_iMsX,
          PgWin::ms_iMsY);
        PopupMenuWin::Clear((PopupMenuWin *)v5->m_ViewedIndex[33]);
        v6 = PopupMenuText::CreateWin((char *)&kCancelMsg, 0, 0, 0, 0, 0, 1);
        v6->m_ePopupMenuID = 9;
        PopupMenuWin::AddMenu((PopupMenuWin *)v5->m_ViewedIndex[33], a2, (PopupMenu *)&v6->vfptr);
        v7 = (char *)TextData::Get(0xF54E1743);
        v8 = PopupMenuText::CreateWin(v7, 0, 0, 0, 0, 0, 0);
        v8->m_ePopupMenuID = 18;
        PopupMenuWin::AddMenu((PopupMenuWin *)v5->m_ViewedIndex[33], a2, (PopupMenu *)&v8->vfptr);
        v9 = (char *)TextData::Get(0x1B50368Cu);
        v10 = PopupMenuText::CreateWin(v9, 0, 0, 0, 0, 0, 0);
        v10->m_ePopupMenuID = 1001;
        PopupMenuWin::AddMenu((PopupMenuWin *)v5->m_ViewedIndex[33], a2, (PopupMenu *)&v10->vfptr);
        if ( !RaidInfo::IsMeRaidMember(&g_kRaidinfo) )
        {
          v13 = (char *)TextData::Get(0x353D9AAAu);
          v12 = PopupMenuText::CreateWin(v13, 0, 0, 0, 0, 0, 0);
          v12->m_ePopupMenuID = 2;
          goto LABEL_10;
        }
        if ( g_kRaidinfo.m_bIsMeRaidLeader || g_kRaidinfo.m_bIsMeRaidSubLeader )
        {
          v11 = (char *)TextData2::Get(0xFAF92532);
          v12 = PopupMenuText::CreateWin(v11, 0, 0, 0, 0, 0, 0);
          v12->m_ePopupMenuID = 1021;
LABEL_10:
          PopupMenuWin::AddMenu((PopupMenuWin *)v5->m_ViewedIndex[33], a2, (PopupMenu *)&v12->vfptr);
        }
        v14 = (char *)TextData::Get(0xE42F3F31);
        v15 = PopupMenuText::CreateWin(v14, 0, 0, 0, 0, 0, 0);
        v15->m_ePopupMenuID = 1002;
        PopupMenuWin::AddMenu((PopupMenuWin *)v5->m_ViewedIndex[33], a2, (PopupMenu *)&v15->vfptr);
        v16 = *(_BYTE *)(v5->m_ViewedIndex[30] + 152) == 0;
        v80 = 0;
        v79 = 0;
        v78 = 0;
        v77 = 0;
        v76 = 0;
        if ( v16 )
        {
          v23 = (char *)TextData2::Get(0xEC03F7F6);
          v22 = PopupMenuText::CreateWin(v23, 0, v76, v77, v78, v79, (bool)v80);
          v22->m_ePopupMenuID = 13;
        }
        else
        {
          v17 = (char *)TextData2::Get(0xF3F14845);
          v18 = PopupMenuText::CreateWin(v17, 0, v76, v77, v78, v79, (bool)v80);
          v18->m_ePopupMenuID = 11;
          PopupMenuWin::AddMenu((PopupMenuWin *)v5->m_ViewedIndex[33], a2, (PopupMenu *)&v18->vfptr);
          v19 = (char *)TextData2::Get(0xDD014A28);
          v20 = PopupMenuText::CreateWin(v19, 0, 0, 0, 0, 0, 0);
          v20->m_ePopupMenuID = 14;
          PopupMenuWin::AddMenu((PopupMenuWin *)v5->m_ViewedIndex[33], a2, (PopupMenu *)&v20->vfptr);
          v21 = (char *)TextData2::Get(0xA5F8EBE7);
          v22 = PopupMenuText::CreateWin(v21, 0, 0, 0, 0, 0, 0);
          v22->m_ePopupMenuID = 12;
        }
        PopupMenuWin::AddMenu((PopupMenuWin *)v5->m_ViewedIndex[33], a2, (PopupMenu *)&v22->vfptr);
        v24 = (char *)TextData::Get(0xDDE7EBEF);
        v25 = PopupMenuText::CreateWin(v24, 0, 0, 0, 0, 0, 0);
        v25->m_ePopupMenuID = 9;
        PopupMenuWin::AddMenu((PopupMenuWin *)v5->m_ViewedIndex[33], a2, (PopupMenu *)&v25->vfptr);
        v26 = (PopupMenuWin *)v5->m_ViewedIndex[33];
        if ( v26->m_dwMenuCount )
        {
          PopupMenuWin::FinishMenu(v26, 0);
          PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)v5->m_ViewedIndex[33]);
          (*(void (__thiscall **)(int, signed int))(*(_DWORD *)v5->m_ViewedIndex[33] + 240))(v5->m_ViewedIndex[33], 1);
        }
        else
        {
          PopupMenuWin::Clear(v26);
        }
        break;
      case 2:
        if ( LOBYTE(this->m_ViewedIndex[32]) )
        {
          ((void (__thiscall *)(NiPointer<PgTextGeometry> *, int *, int *))LODWORD(this[-1].m_aspTextGeom[3].m_pObject->m_kBound.m_kCenter.z))(
            &this[-1].m_aspTextGeom[3],
            &iX,
            &iY);
          v16 = LODWORD(v5->m_kLocal.m_Translate.x) == 0;
          v27 = SLODWORD(v5->m_kLocal.m_Translate.x) < 0;
          i = 0;
          if ( !v27 && !v16 )
          {
            iStringLen = (int)&v5->m_bSystemWindow;
            while ( 1 )
            {
              ((void (__thiscall *)(NiPointer<PgTextGeometry> *))LODWORD(v5[-1].m_aspTextGeom[3].m_pObject->m_kWorld.m_Translate.z))(&v5[-1].m_aspTextGeom[3]);
              v28 = v5[-1].m_aspTextGeom[3].m_pObject;
              v29 = v5->m_pkToolTipParentWin;
              charName = *(char **)(LODWORD(v5->m_kLocal.m_Rotate.m_pEntry[0][2]) + 224);
              v30 = ((int (__thiscall *)(NiPointer<PgTextGeometry> *))LODWORD(v28->m_kWorld.m_Translate.z))(&v5[-1].m_aspTextGeom[3]);
              LODWORD(fYMax) = (v30 + 2 * (signed int)v29) % (unsigned int)&charName[(_DWORD)v29];
              *(float *)&charName = (double)LODWORD(fYMax);
              v31 = *(_DWORD *)iStringLen;
              v32 = *(_DWORD *)(*(_DWORD *)iStringLen + 88);
              pkFrameCancelMsg.m_uiFrameWParam = *(_DWORD *)(*(_DWORD *)iStringLen + 92);
              v33 = *(_DWORD *)v31;
              pkFrameCancelMsg.m_uiFrameMsg = v32;
              pkFrameCancelMsg.m_uiFramelParam = *(_DWORD *)(v31 + 96);
              *(float *)&charName = *(float *)&pkFrameCancelMsg.m_uiFrameWParam + *(float *)&charName;
              v34 = (*(int (**)(void))(v33 + 160))();
              v35 = *(float *)&charName;
              fYMax = (double)v34 + *(float *)&charName;
              *(float *)&charName = (double)iY;
              if ( *(float *)&charName > v35 && fYMax > (double)*(float *)&charName )
                break;
              iStringLen += 4;
              if ( ++i >= SLODWORD(v5->m_kLocal.m_Translate.x) )
                return;
            }
            v36 = (char *)(*(int (**)(void))(**((_DWORD **)&v5->m_bSystemWindow + i) + 152))();
            charName = v36;
            if ( ChatBoardFlex::FindClickItemLink((ChatBoardFlex *)((char *)v5 - 232), v36, iX, i) )
            {
LABEL_38:
              unk_A8E19E = 1;
            }
            else if ( v36 )
            {
              if ( *v36 == 91 )
              {
                iStringLen = strlen(v36);
                name[0] = 0;
                memset(&name[1], 0, 0x3FFu);
                v37 = 0;
                if ( iStringLen > 0 )
                {
                  LODWORD(fYMax) = 1 - (_DWORD)charName;
                  i = name - charName;
                  while ( (char *)iStringLen != &v36[LODWORD(fYMax)] )
                  {
                    if ( *v36 == 93 )
                    {
                      if ( v37 <= 2 )
                        return;
                      acWhisper[v37 + 1023] = 0;
                      ChatBoardFlex::EraseWhisperToken((ChatBoardFlex *)((char *)v5 - 232), name);
                      strcpy(acWhisper, "/w ");
                      memset(&acWhisper[4], 0, 0x3FCu);
                      v38 = strlen(name) + 1;
                      v39 = (char *)&pkFrameCancelMsg.m_uiFramelParam + 3;
                      do
                        v40 = (v39++)[1];
                      while ( v40 );
                      qmemcpy(v39, name, v38);
                      v41 = (GameFrameWork *)v5->m_ViewedIndex[30];
                      if ( v41 )
                        GameFrameWork::OnOpenAutoWhisperChat(v41, acWhisper);
                      goto LABEL_38;
                    }
                    (v36++)[i] = charName[v37++ + 1];
                    if ( v37 >= iStringLen )
                      return;
                  }
                }
              }
            }
          }
        }
        return;
      case 27:
        if ( this->m_ViewedIndex[39] )
        {
          v42 = this->m_ViewedIndex[39];
          if ( v42 )
          {
            if ( !InterlockedDecrement((volatile LONG *)(v42 + 4)) && v42 )
              (**(void (__thiscall ***)(_DWORD, _DWORD))v42)(v42, 1);
            v5->m_ViewedIndex[39] = 0;
          }
        }
        return;
      case 15:
        v43 = *(_DWORD *)pvBody;
        if ( *(_DWORD *)pvBody > 9 )
        {
          if ( v43 > 18 )
          {
            v63 = v43 - 1001;
            if ( v63 )
            {
              v64 = v63 - 1;
              if ( v64 )
              {
                if ( v64 == 19 )
                {
                  if ( g_kRaidinfo.m_bIsMeRaidSubLeader || g_kRaidinfo.m_bIsMeRaidLeader )
                  {
                    Name5::n_string((Name5 *)&this->m_ViewedIndex[34], acName);
                    fYMax = COERCE_FLOAT(&v76);
                    acName[20] = 0;
                    Name5::Name5((Name5 *)&v76, acName);
                    GameFrameWork::NcRaidInvitationReq((GameFrameWork *)v5->m_ViewedIndex[30], *(Name5 *)&v76);
                  }
                  else
                  {
                    v65 = (GameFrameWork *)this->m_ViewedIndex[30];
                    v66 = TextData2::Get(0x42A0111u);
                    GameFrameWork::AddSysMsg(v65, (const char *)v66);
                  }
                }
              }
              else
              {
                v67 = this->m_ViewedIndex[35];
                v76 = this->m_ViewedIndex[34];
                v68 = this->m_ViewedIndex[36];
                v77 = (PgWin *)v67;
                v69 = v5->m_ViewedIndex[37];
                v78 = (char *)v68;
                v70 = (PgMsg::Frame *)v5->m_ViewedIndex[38];
                v79 = v69;
                v80 = v70;
                GameFrameWork::NcChatRestrictAddReq((GameFrameWork *)v5->m_ViewedIndex[30], *(Name5 *)&v76);
              }
            }
            else
            {
              v71 = this->m_ViewedIndex[35];
              v76 = v5->m_ViewedIndex[34];
              v72 = (char *)v5->m_ViewedIndex[36];
              v77 = (PgWin *)v71;
              v73 = v5->m_ViewedIndex[37];
              v78 = v72;
              v74 = (PgMsg::Frame *)v5->m_ViewedIndex[38];
              v79 = v73;
              v75 = (GameFrameWork *)v5->m_ViewedIndex[30];
              v80 = v74;
              GameFrameWork::NcFriendSetReq(v75, *(Name5 *)&v76);
            }
          }
          else if ( v43 == 18 )
          {
            Name5::n_string((Name5 *)&this->m_ViewedIndex[34], acName);
            acName[20] = 0;
            v61 = (ChatDisplayWin2 *)PgWin::GetParentWin((PgWin *)&v5[-1].m_aspTextGeom[3]);
            if ( v61 )
            {
              Name5::Name5(&v87, acName);
              *(_QWORD *)&GameFrameWork::m_kWhisperCharID.n5_name[0] = *(_QWORD *)v62;
              *(_QWORD *)&GameFrameWork::m_kWhisperCharID.n5_code[2] = *(_QWORD *)(v62 + 8);
              GameFrameWork::m_kWhisperCharID.n5_code[4] = *(_DWORD *)(v62 + 16);
              ChatDisplayWin2::OnWhisperTab(v61, 1);
            }
          }
          else
          {
            switch ( v43 )
            {
              case 11:
                if ( !this->m_ViewedIndex[39] )
                {
                  v45 = (Name5 *)operator new(0x14u);
                  if ( v45 )
                  {
                    v45->n5_code[4] = 0;
                    v45->n5_code[3] = 0;
                    v45->n5_code[2] = 0;
                    v45->n5_code[1] = 0;
                    v45->n5_code[0] = 0;
                    Name5::operator=(v45, (Name5 *)&v5->m_ViewedIndex[34]);
                    Name5::n_string((Name5 *)&v5->m_ViewedIndex[34], acName);
                    acName[20] = 0;
                    v46 = (char *)TextData2::Get(0x8303E8DA);
                    v47 = fs(v46, acName);
                    v48 = (NiD3DDefaultShader *)MsgBox::Modeless(MSGBOX_OKCANCEL, v47, v79);
                    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v5->m_ViewedIndex[39], v48);
                    kCancelMsg.m_uiFrameMsg = 256;
                    kCancelMsg.m_uiFramelParam = (unsigned int)v45;
                    pkFrameCancelMsg.m_uiFrameMsg = 257;
                    pkFrameCancelMsg.m_uiFramelParam = (unsigned int)v45;
                    v49 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
                    v80 = &pkFrameCancelMsg;
                    MsgBox::SetFrameWorkMsgOnClose((MsgBox *)v5->m_ViewedIndex[39], v49, &kCancelMsg, &pkFrameCancelMsg);
                    (**(void (__thiscall ***)(_DWORD, _DWORD))(v5->m_ViewedIndex[39] + 232))(
                      v5->m_ViewedIndex[39] + 232,
                      v5 != (ChatBoardFlex *)232 ? (unsigned int)v5 : 0);
                  }
                }
                break;
              case 12:
                Name5::n_string((Name5 *)&this->m_ViewedIndex[34], acName);
                v50 = (GameFrameWork *)v5->m_ViewedIndex[30];
                acName[20] = 0;
                v51 = fs("&pfind %s", acName);
                GameFrameWork::NcActChatReq(v50, v51);
                break;
              case 13:
                v52 = this->m_ViewedIndex[35];
                v76 = this->m_ViewedIndex[34];
                v53 = this->m_ViewedIndex[36];
                v77 = (PgWin *)v52;
                v54 = v5->m_ViewedIndex[37];
                v78 = (char *)v53;
                v55 = (PgMsg::Frame *)v5->m_ViewedIndex[38];
                v79 = v54;
                v80 = v55;
                GameFrameWork::NcMiscSpammerReportReq((GameFrameWork *)v5->m_ViewedIndex[30], *(Name5 *)&v76);
                break;
              case 14:
                if ( !this->m_ViewedIndex[39] )
                {
                  v56 = (Name5 *)operator new(0x14u);
                  if ( v56 )
                  {
                    v56->n5_code[4] = 0;
                    v56->n5_code[3] = 0;
                    v56->n5_code[2] = 0;
                    v56->n5_code[1] = 0;
                    v56->n5_code[0] = 0;
                    Name5::operator=(v56, (Name5 *)&v5->m_ViewedIndex[34]);
                    Name5::n_string((Name5 *)&v5->m_ViewedIndex[34], acName);
                    acName[20] = 0;
                    v57 = (char *)TextData2::Get(0x1E60957Bu);
                    v58 = fs(v57, acName);
                    v59 = (NiD3DDefaultShader *)MsgBox::Modeless(MSGBOX_OKCANCEL, v58, v79);
                    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v5->m_ViewedIndex[39], v59);
                    pkFrameCancelMsg.m_uiFrameMsg = 258;
                    pkFrameCancelMsg.m_uiFramelParam = (unsigned int)v56;
                    kCancelMsg.m_uiFrameMsg = 259;
                    kCancelMsg.m_uiFramelParam = (unsigned int)v56;
                    v60 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
                    v80 = &kCancelMsg;
                    MsgBox::SetFrameWorkMsgOnClose((MsgBox *)v5->m_ViewedIndex[39], v60, &pkFrameCancelMsg, &kCancelMsg);
                    (**(void (__thiscall ***)(_DWORD, _DWORD))(v5->m_ViewedIndex[39] + 232))(
                      v5->m_ViewedIndex[39] + 232,
                      v5 != (ChatBoardFlex *)232 ? (unsigned int)v5 : 0);
                  }
                }
                goto LABEL_60;
              default:
                return;
            }
          }
        }
        else if ( *(_DWORD *)pvBody == 9 )
        {
LABEL_60:
          PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)v5->m_ViewedIndex[33]);
        }
        else if ( v43 == 2 )
        {
          Name5::n_string((Name5 *)&this->m_ViewedIndex[34], (char *)&kCancelMsg);
          v44 = (GameFrameWork *)v5->m_ViewedIndex[30];
          v92 = 0;
          GameFrameWork::NcPartyJoinReq(v44, (char *)&kCancelMsg);
        }
        return;
      default:
        return;
    }
  }
}

//----- (005E2D70) --------------------------------------------------------
char __thiscall ChatBoardFlex::DeleteItemLinkInfo(ChatBoardFlex *this)
{
  ChatBoardFlex *v1; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v2; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > v3; // edi@1
  char v4; // al@2
  unsigned int v5; // edx@3
  int v6; // esi@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > result; // [sp+8h] [bp-4h]@4

  v1 = this;
  v2 = this->m_mapItemLinkInfo._Myhead;
  v3._Ptr = v2->_Left;
  if ( v2->_Left == v2 )
  {
    v4 = 0;
  }
  else
  {
    v5 = (signed int)((unsigned __int64)(333589693i64
                                       * (unsigned int)((char *)v3._Ptr->_Myval.second._Mylast
                                                      - (char *)v3._Ptr->_Myval.second._Myfirst)) >> 32) >> 3;
    v6 = v5 + (v5 >> 31);
    if ( v6 )
      std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::erase(
        (std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *)&this->m_mapItemLinkInfo.comp,
        &result,
        v3);
    v1->m_nChatItemLinkCnt -= v6;
    v4 = 1;
  }
  return v4;
}

//----- (005E2DD0) --------------------------------------------------------
void __thiscall ChatBoardFlex::AddItemLinkInfo(ChatBoardFlex *this, ChatBoardFlex::Type eType, SHINE_ITEM_STRUCT *pItem)
{
  ChatBoardFlex *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v4; // eax@6
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v5; // eax@7
  std::pair<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > _Val; // [sp+10h] [bp-38h]@7
  std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > vecItem; // [sp+24h] [bp-24h]@7
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > >,bool> result; // [sp+34h] [bp-14h]@7
  int v9; // [sp+44h] [bp-4h]@7

  v3 = this;
  if ( pItem
    && (eType == 4 || eType & this->m_uiOption)
    && (this->m_nChatItemLinkCnt < this->m_nMaxItemLinkCnt || ChatBoardFlex::DeleteItemLinkInfo(this)) )
  {
    v4 = std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::find(
           (std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *)&v3->m_mapItemLinkInfo.comp,
           (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > *)&eType,
           &v3->m_iTopIndex)->_Ptr;
    if ( v4 == v3->m_mapItemLinkInfo._Myhead )
    {
      vecItem._Myfirst = 0;
      vecItem._Mylast = 0;
      vecItem._Myend = 0;
      v9 = 0;
      std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::push_back(&vecItem, pItem);
      _Val.first = v3->m_iTopIndex;
      std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>(
        &_Val.second,
        &vecItem);
      LOBYTE(v9) = 1;
      v5 = std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::_Buynode<std::pair<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>(
             (std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *)&v3->m_mapItemLinkInfo.comp,
             &_Val);
      std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::_Linsert(
        (std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *)&v3->m_mapItemLinkInfo.comp,
        &result,
        v5,
        0);
      if ( _Val.second._Myfirst )
        operator delete(_Val.second._Myfirst);
      if ( vecItem._Myfirst )
        operator delete(vecItem._Myfirst);
    }
    else
    {
      std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::push_back(&v4->_Myval.second, pItem);
    }
    ++v3->m_nChatItemLinkCnt;
  }
}

//----- (005E2EF0) --------------------------------------------------------
void __thiscall ChatBoardFlex::~ChatBoardFlex(ChatBoardFlex *this)
{
  ChatBoardFlex *v1; // esi@1
  int i; // edi@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > v3; // ST0C_4@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > v4; // ST08_4@3
  MsgBox *v5; // edi@3
  NiNode *v6; // edi@7
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > result; // [sp+10h] [bp-18h]@3
  std::map<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > > > *v8; // [sp+14h] [bp-14h]@3
  ChatBoardFlex *v9; // [sp+18h] [bp-10h]@1
  int v10; // [sp+24h] [bp-4h]@1

  v1 = this;
  v9 = this;
  this->vfptr = (NiRefObjectVtbl *)&ChatBoardFlex::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ChatBoardFlex::`vftable'{for `IDirectMessenger'};
  v10 = 0;
  for ( i = 0; i < v1->m_MaxTextLine; ++i )
    operator delete[](v1->m_apcText[i]);
  operator delete[](v1->m_apcText);
  v8 = &v1->m_mapItemLinkInfo;
  v3._Ptr = v1->m_mapItemLinkInfo._Myhead;
  v4._Ptr = v1->m_mapItemLinkInfo._Myhead->_Left;
  LOBYTE(v10) = 4;
  std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *)&v1->m_mapItemLinkInfo.comp,
    &result,
    v4,
    v3);
  operator delete(v1->m_mapItemLinkInfo._Myhead);
  v5 = v1->m_spMsgBox.m_pObject;
  LOBYTE(v10) = 2;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  LOBYTE(v10) = 1;
  `eh vector destructor iterator'(
    v1->m_aspTextGeom,
    4u,
    40,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v6 = v1->m_spTextOffset.m_pObject;
  LOBYTE(v10) = 0;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  v10 = -1;
  PgWin::~PgWin((PgWin *)&v1->vfptr);
}
// 9B0FC4: using guessed type void (__thiscall *ChatBoardFlex::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B0FE4: using guessed type int (__thiscall *ChatBoardFlex::`vftable'{for `NiNode'})(void *p, char);

//----- (005E3020) --------------------------------------------------------
void __thiscall ChatBoardFlex::ChatBoardFlex(ChatBoardFlex *this)
{
  ChatBoardFlex *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v2; // eax@1
  NiNode *v3; // edi@2
  MsgBox *v4; // edi@7
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v5; // [sp-1Ch] [bp-50h]@12
  int v6; // [sp-Ch] [bp-40h]@12
  signed int v7; // [sp-8h] [bp-3Ch]@12
  unsigned int v8; // [sp-4h] [bp-38h]@1
  std::exception pExceptionObject; // [sp+10h] [bp-24h]@13
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v10; // [sp+1Ch] [bp-18h]@12
  ChatBoardFlex *v11; // [sp+20h] [bp-14h]@1
  char *_What; // [sp+24h] [bp-10h]@13
  int v13; // [sp+30h] [bp-4h]@1

  v1 = this;
  v11 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ChatBoardFlex::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ChatBoardFlex::`vftable'{for `IDirectMessenger'};
  v13 = 0;
  v1->m_spTextOffset.m_pObject = 0;
  `eh vector constructor iterator'(
    v1->m_aspTextGeom,
    4u,
    40,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_selectedChar.n5_code[4] = 0;
  v1->m_selectedChar.n5_code[3] = 0;
  v1->m_selectedChar.n5_code[2] = 0;
  v1->m_selectedChar.n5_code[1] = 0;
  v1->m_selectedChar.n5_code[0] = 0;
  v1->m_spMsgBox.m_pObject = 0;
  v8 = 36;
  LOBYTE(v13) = 3;
  v1->m_mapItemLinkInfo._Mysize = 0;
  v2 = (std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *)operator new(v8);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_mapItemLinkInfo._Myhead = v2;
  v2->_Left = v2;
  v1->m_mapItemLinkInfo._Myhead->_Parent = v1->m_mapItemLinkInfo._Myhead;
  v1->m_mapItemLinkInfo._Myhead->_Right = v1->m_mapItemLinkInfo._Myhead;
  v1->m_mapItemLinkInfo._Myhead->_Color = 1;
  v1->m_mapItemLinkInfo._Myhead->_Isnil = 1;
  LOBYTE(v13) = 4;
  v1->m_pkFont = 0;
  v1->m_uiTotal = 0;
  v1->m_iTopIndex = 0;
  v1->m_iBottomIndex = 0;
  v1->m_iViewIndex = -1;
  v1->m_aeType = 0;
  v1->m_auiTextAlloc = 0;
  v1->m_apcText = 0;
  v1->m_apcSetTextTime = 0;
  v1->m_MaxTextLine = 0;
  v1->m_FilterType = 0;
  v1->m_MaxTextViewLine = 40;
  *(_WORD *)&v1->m_Filter = 0;
  ChatBoardFlex::ClearViewedLineInfo(v1);
  v1->m_uiViewLineCount = -1;
  v3 = v1->m_spTextOffset.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spTextOffset.m_pObject = 0;
  }
  v1->m_uiOption = -1;
  v1->m_fOldTime = 0.0;
  v1->m_iLineGap = 4;
  v1->m_bLButtonEnable = 0;
  v1->m_bSystemWindow = 0;
  v4 = v1->m_spMsgBox.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spMsgBox.m_pObject = 0;
  }
  v10 = &v5;
  v1->m_pcWhisperToken[0] = "From ";
  v1->m_pcWhisperToken[1] = "To ";
  v1->m_kTextColorID = 0;
  v1->m_kChatID = 0;
  v1->m_nChatItemLinkCnt = 0;
  v7 = 15;
  v6 = 0;
  v5._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v5, "ItemLinkTabLimit", 0x10u);
  v1->m_nMaxItemLinkCnt = (unsigned __int16)CSingleDataMap::GetValue(&g_kSingleDataMap, v5);
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9B0FC4: using guessed type void (__thiscall *ChatBoardFlex::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B0FE4: using guessed type int (__thiscall *ChatBoardFlex::`vftable'{for `NiNode'})(void *p, char);

//----- (005E3280) --------------------------------------------------------
ChatBoardFlex *__cdecl ChatBoardFlex::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgFont *pkFont, int bLButtonEnable, PgWin *pkParent)
{
  PgWin *v7; // eax@1
  PgWin *v8; // eax@2
  PgWin *v9; // esi@2
  PgWin *v10; // edi@8
  ChatBoardFlex *v11; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v13; // [sp+20h] [bp-4h]@1

  v7 = (PgWin *)operator new(0x2FCu);
  result.m_pObject = v7;
  v13 = 0;
  if ( v7 )
  {
    ChatBoardFlex::ChatBoardFlex((ChatBoardFlex *)v7);
    v9 = v8;
  }
  else
  {
    v9 = 0;
  }
  if ( v9 )
    InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  v13 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v9);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, unsigned int, PgFont *, int, PgWin *))v9->vfptr[113].__vecDelDtor)(
                          v9,
                          iXPos,
                          iYPos,
                          uiWidth,
                          uiHeight,
                          pkFont,
                          bLButtonEnable,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v9->vfptr[89].__vecDelDtor)(v9);
    v13 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v11 = (ChatBoardFlex *)v9;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v9);
    if ( result.m_pObject )
    {
      v10 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v10 )
          v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
      }
    }
    v13 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v11 = 0;
  }
  return v11;
}

//----- (005E33D0) --------------------------------------------------------
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>,std::_Iterator_base0>::operator--(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >,std::_Iterator_base0> *this)
{
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >,std::_Iterator_base0> *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v2; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *i; // edx@3
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v4; // ecx@4
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v5; // edx@5

  result = this;
  v2 = this->_Ptr;
  if ( v2->_Isnil )
  {
    result->_Ptr = v2->_Right;
    return result;
  }
  i = v2->_Left;
  if ( !v2->_Left->_Isnil )
  {
    v4 = i->_Right;
    if ( !v4->_Isnil )
    {
      do
      {
        v5 = v4;
        v4 = v4->_Right;
      }
      while ( !v4->_Isnil );
      result->_Ptr = v5;
      return result;
    }
LABEL_11:
    result->_Ptr = i;
    return result;
  }
  for ( i = v2->_Parent; !i->_Isnil; i = i->_Parent )
  {
    if ( result->_Ptr != i->_Left )
      break;
    result->_Ptr = i;
  }
  if ( !result->_Ptr->_Isnil )
    goto LABEL_11;
  return result;
}

//----- (005E3430) --------------------------------------------------------
SHINE_ITEM_STRUCT *__stdcall std::allocator<SHINE_ITEM_STRUCT>::allocate(unsigned int _Count)
{
  SHINE_ITEM_STRUCT *result; // eax@1
  std::exception pExceptionObject; // [sp+0h] [bp-Ch]@4

  result = 0;
  if ( _Count )
  {
    if ( _Count > 0x27C4597 || (result = (SHINE_ITEM_STRUCT *)operator new(103 * _Count)) == 0 )
    {
      _Count = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&_Count);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
  }
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (005E3490) --------------------------------------------------------
SHINE_ITEM_STRUCT *__cdecl std::_Uninit_move<SHINE_ITEM_STRUCT *,SHINE_ITEM_STRUCT *,std::allocator<SHINE_ITEM_STRUCT>,SHINE_ITEM_STRUCT>(SHINE_ITEM_STRUCT *_First, SHINE_ITEM_STRUCT *_Last, SHINE_ITEM_STRUCT *_Dest)
{
  SHINE_ITEM_STRUCT *v3; // edx@1
  SHINE_ITEM_STRUCT *result; // eax@1

  v3 = _First;
  for ( result = _Dest; v3 != _Last; ++result )
  {
    if ( result )
      qmemcpy(result, v3, sizeof(SHINE_ITEM_STRUCT));
    ++v3;
  }
  return result;
}

//----- (005E34D0) --------------------------------------------------------
SHINE_ITEM_STRUCT *__cdecl std::_Uninit_copy<std::_Vector_const_iterator<std::_Vector_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>,SHINE_ITEM_STRUCT *,std::allocator<SHINE_ITEM_STRUCT>>(std::_Vector_const_iterator<std::_Vector_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > _First, std::_Vector_const_iterator<std::_Vector_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > _Last, SHINE_ITEM_STRUCT *_Dest)
{
  SHINE_ITEM_STRUCT *v3; // edx@1
  SHINE_ITEM_STRUCT *result; // eax@1

  v3 = _First._Ptr;
  for ( result = _Dest; v3 != _Last._Ptr; ++result )
  {
    if ( result )
      qmemcpy(result, v3, sizeof(SHINE_ITEM_STRUCT));
    ++v3;
  }
  return result;
}

//----- (005E3510) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::find(std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > *result, const int *_Keyval)
{
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v3; // edx@1
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v4; // eax@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > *v5; // eax@8

  v3 = this->_Myhead;
  v4 = v3->_Parent;
  while ( !v4->_Isnil )
  {
    if ( v4->_Myval.first >= *_Keyval )
    {
      v3 = v4;
      v4 = v4->_Left;
    }
    else
    {
      v4 = v4->_Right;
    }
  }
  if ( v3 == this->_Myhead || *_Keyval < v3->_Myval.first )
  {
    v5 = result;
    result->_Ptr = this->_Myhead;
  }
  else
  {
    v5 = result;
    result->_Ptr = v3;
  }
  return v5;
}

//----- (005E3580) --------------------------------------------------------
void __thiscall std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::reserve(std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *this, unsigned int _Count)
{
  std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *v2; // esi@1
  SHINE_ITEM_STRUCT *v3; // eax@4
  SHINE_ITEM_STRUCT *v4; // ST04_4@4
  SHINE_ITEM_STRUCT *v5; // ST00_4@4
  unsigned int v6; // edx@4
  int v7; // edi@4
  SHINE_ITEM_STRUCT *v8; // ecx@6
  SHINE_ITEM_STRUCT *v9; // edi@6
  int v10; // [sp+0h] [bp-24h]@1
  SHINE_ITEM_STRUCT *_Ptr; // [sp+10h] [bp-14h]@4
  int *v12; // [sp+14h] [bp-10h]@1
  int v13; // [sp+20h] [bp-4h]@4

  v12 = &v10;
  v2 = this;
  if ( _Count > 0x27C4597 )
    std::_Xlength_error("vector<T> too long");
  if ( this->_Myend - this->_Myfirst < _Count )
  {
    v3 = std::allocator<SHINE_ITEM_STRUCT>::allocate(_Count);
    v4 = v2->_Mylast;
    v5 = v2->_Myfirst;
    _Ptr = v3;
    v13 = 0;
    std::_Uninit_move<SHINE_ITEM_STRUCT *,SHINE_ITEM_STRUCT *,std::allocator<SHINE_ITEM_STRUCT>,SHINE_ITEM_STRUCT>(
      v5,
      v4,
      v3);
    v6 = (signed int)((unsigned __int64)(333589693i64 * (unsigned int)((char *)v2->_Mylast - (char *)v2->_Myfirst)) >> 32) >> 3;
    v7 = v6 + (v6 >> 31);
    if ( v2->_Myfirst )
      operator delete(v2->_Myfirst);
    v8 = _Ptr;
    v9 = &_Ptr[v7];
    v2->_Myend = &_Ptr[_Count];
    v2->_Mylast = v9;
    v2->_Myfirst = v8;
  }
}

//----- (005E3670) --------------------------------------------------------
void __thiscall std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>(std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *this, std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *_Right)
{
  std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *v2; // esi@1
  unsigned int v3; // edi@1
  SHINE_ITEM_STRUCT *v4; // eax@4
  SHINE_ITEM_STRUCT *v5; // ecx@4
  SHINE_ITEM_STRUCT *v6; // ST00_4@4
  int v7; // [sp+0h] [bp-24h]@1
  std::vector<HeightMapMaker::TriangleIndex *,std::allocator<HeightMapMaker::TriangleIndex *> > *v8; // [sp+10h] [bp-14h]@1
  int *v9; // [sp+14h] [bp-10h]@1
  int v10; // [sp+20h] [bp-4h]@4

  v9 = &v7;
  v2 = this;
  v8 = (std::vector<HeightMapMaker::TriangleIndex *,std::allocator<HeightMapMaker::TriangleIndex *> > *)this;
  this->_Myfirst = 0;
  this->_Mylast = 0;
  this->_Myend = 0;
  v3 = _Right->_Mylast - _Right->_Myfirst;
  this->_Myfirst = 0;
  this->_Mylast = 0;
  this->_Myend = 0;
  if ( v3 )
  {
    if ( v3 > 0x27C4597 )
      std::_Xlength_error("vector<T> too long");
    v4 = std::allocator<SHINE_ITEM_STRUCT>::allocate(v3);
    v2->_Myfirst = v4;
    v2->_Mylast = v4;
    v2->_Myend = &v4[v3];
    v5 = _Right->_Mylast;
    v6 = _Right->_Myfirst;
    v10 = 0;
    v2->_Mylast = std::_Uninit_copy<std::_Vector_const_iterator<std::_Vector_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>,SHINE_ITEM_STRUCT *,std::allocator<SHINE_ITEM_STRUCT>>(
                    (std::_Vector_const_iterator<std::_Vector_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > >)v6,
                    (std::_Vector_const_iterator<std::_Vector_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > >)v5,
                    v4);
  }
}

//----- (005E3750) --------------------------------------------------------
void __thiscall std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::_Reserve(std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *this, unsigned int _Count)
{
  unsigned int v2; // esi@1
  unsigned int v3; // esi@3
  unsigned int v4; // eax@3
  unsigned int v5; // eax@5

  v2 = this->_Mylast - this->_Myfirst;
  if ( 41698711 - _Count < v2 )
    std::_Xlength_error("vector<T> too long");
  v3 = _Count + v2;
  v4 = this->_Myend - this->_Myfirst;
  if ( v3 > v4 )
  {
    if ( 41698711 - (v4 >> 1) >= v4 )
      v5 = (v4 >> 1) + v4;
    else
      v5 = 0;
    if ( v5 < v3 )
      v5 = v3;
    std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::reserve(this, v5);
  }
}

//----- (005E37D0) --------------------------------------------------------
void __thiscall std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::push_back(std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *this, SHINE_ITEM_STRUCT *_Val)
{
  SHINE_ITEM_STRUCT *v2; // esi@1
  std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *v3; // ebx@1
  SHINE_ITEM_STRUCT *v4; // ecx@1
  unsigned int v5; // edx@3
  int v6; // esi@3
  SHINE_ITEM_STRUCT *v7; // edi@8
  int v8; // edi@9
  int v9; // esi@9

  v2 = _Val;
  v3 = this;
  v4 = this->_Mylast;
  if ( _Val >= v4 || v3->_Myfirst > _Val )
  {
    if ( v4 == v3->_Myend )
      std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::_Reserve(v3, 1u);
  }
  else
  {
    v5 = (signed int)((unsigned __int64)(333589693i64 * ((char *)_Val - (char *)v3->_Myfirst)) >> 32) >> 3;
    v6 = v5 + (v5 >> 31);
    if ( v4 == v3->_Myend )
      std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::_Reserve(v3, 1u);
    v2 = &v3->_Myfirst[v6];
  }
  v7 = v3->_Mylast;
  if ( v7 )
  {
    qmemcpy(v7, v2, 0x64u);
    v9 = (int)&v2->itemattr.Bracelet + 98;
    v8 = (int)&v7->itemattr.Bracelet + 98;
    *(_WORD *)v8 = *(_WORD *)v9;
    *(_BYTE *)(v8 + 2) = *(_BYTE *)(v9 + 2);
  }
  ++v3->_Mylast;
}

//----- (005E3840) --------------------------------------------------------
void __thiscall std::pair<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>::~pair<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>(std::pair<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > *this)
{
  std::pair<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > *v1; // esi@1

  v1 = this;
  if ( this->second._Myfirst )
    operator delete(this->second._Myfirst);
  v1->second._Myfirst = 0;
  v1->second._Mylast = 0;
  v1->second._Myend = 0;
}

//----- (005E3870) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *_Newnode)
{
  unsigned int v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v6; // edi@6
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v7; // edx@6
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v8; // edx@7
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v9; // edx@9
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v10; // eax@13
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v11; // edx@14
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v12; // esi@14
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v13; // esi@15
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v14; // edx@18
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v15; // esi@20
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v16; // esi@22
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v17; // edx@26
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v18; // esi@26
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v19; // edi@26
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v20; // edi@28
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v21; // edi@30
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v22; // esi@33
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v23; // edx@36
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v24; // esi@36
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v25; // esi@38
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v26; // esi@40
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v27; // edi@46
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v28; // edi@48
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v29; // ecx@54
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > *v30; // eax@54

  v5 = this->_Mysize;
  if ( v5 >= 0xCCCCCCB )
  {
    if ( _Newnode->_Myval.second._Myfirst )
      operator delete(_Newnode->_Myval.second._Myfirst);
    _Newnode->_Myval.second._Myfirst = 0;
    _Newnode->_Myval.second._Mylast = 0;
    _Newnode->_Myval.second._Myend = 0;
    operator delete(_Newnode);
    std::_Xlength_error("map/set<T> too long");
  }
  v6 = _Newnode;
  this->_Mysize = v5 + 1;
  _Newnode->_Parent = _Wherenode;
  v7 = this->_Myhead;
  if ( _Wherenode == v7 )
  {
    v7->_Parent = _Newnode;
    this->_Myhead->_Left = _Newnode;
    v8 = this->_Myhead;
LABEL_12:
    v8->_Right = _Newnode;
    goto LABEL_13;
  }
  if ( !_Addleft )
  {
    _Wherenode->_Right = _Newnode;
    v8 = this->_Myhead;
    if ( _Wherenode != v8->_Right )
      goto LABEL_13;
    goto LABEL_12;
  }
  _Wherenode->_Left = _Newnode;
  v9 = this->_Myhead;
  if ( _Wherenode == v9->_Left )
    v9->_Left = _Newnode;
LABEL_13:
  v10 = _Newnode;
  while ( !v10->_Parent->_Color )
  {
    v11 = v10->_Parent;
    v12 = v11->_Parent;
    if ( v11 == v12->_Left )
    {
      v13 = v12->_Right;
      if ( v13->_Color )
      {
        if ( v10 == v11->_Right )
        {
          v10 = v10->_Parent;
          v14 = v11->_Right;
          v10->_Right = v14->_Left;
          if ( !v14->_Left->_Isnil )
            v14->_Left->_Parent = v10;
          v14->_Parent = v10->_Parent;
          v15 = this->_Myhead;
          if ( v10 == v15->_Parent )
          {
            v15->_Parent = v14;
          }
          else
          {
            v16 = v10->_Parent;
            if ( v10 == v16->_Left )
              v16->_Left = v14;
            else
              v16->_Right = v14;
          }
          v14->_Left = v10;
          v10->_Parent = v14;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Left;
        v17->_Left = v17->_Left->_Right;
        v19 = v18->_Right;
        if ( !v19->_Isnil )
          v19->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v20 = this->_Myhead;
        if ( v17 == v20->_Parent )
        {
          v20->_Parent = v18;
          v18->_Right = v17;
        }
        else
        {
          v21 = v17->_Parent;
          if ( v17 == v21->_Right )
          {
            v21->_Right = v18;
            v18->_Right = v17;
          }
          else
          {
            v21->_Left = v18;
            v18->_Right = v17;
          }
        }
LABEL_52:
        v6 = _Newnode;
        v17->_Parent = v18;
        continue;
      }
      v11->_Color = 1;
      v13->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
    else
    {
      v22 = v12->_Left;
      if ( v22->_Color )
      {
        if ( v10 == v11->_Left )
        {
          v10 = v10->_Parent;
          v23 = v11->_Left;
          v10->_Left = v23->_Right;
          v24 = v23->_Right;
          if ( !v24->_Isnil )
            v24->_Parent = v10;
          v23->_Parent = v10->_Parent;
          v25 = this->_Myhead;
          if ( v10 == v25->_Parent )
          {
            v25->_Parent = v23;
          }
          else
          {
            v26 = v10->_Parent;
            if ( v10 == v26->_Right )
              v26->_Right = v23;
            else
              v26->_Left = v23;
          }
          v23->_Right = v10;
          v10->_Parent = v23;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Right;
        v17->_Right = v18->_Left;
        if ( !v18->_Left->_Isnil )
          v18->_Left->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v27 = this->_Myhead;
        if ( v17 == v27->_Parent )
        {
          v27->_Parent = v18;
        }
        else
        {
          v28 = v17->_Parent;
          if ( v17 == v28->_Left )
            v28->_Left = v18;
          else
            v28->_Right = v18;
        }
        v18->_Left = v17;
        goto LABEL_52;
      }
      v11->_Color = 1;
      v22->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
  }
  v29 = this->_Myhead->_Parent;
  v30 = result;
  result->_Ptr = v6;
  v29->_Color = 1;
  return v30;
}

//----- (005E3AB0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::erase(std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > _Where)
{
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v4; // edi@4
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v5; // eax@7
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v6; // esi@8
  std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *v7; // ecx@10
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v8; // eax@10
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v9; // eax@17
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v10; // ecx@20
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v11; // ecx@29
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v12; // ecx@31
  char v13; // cl@34
  std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *i; // ecx@36
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v15; // eax@38
  unsigned int v16; // eax@61
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > *v17; // eax@63
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *_Erasednode; // [sp+10h] [bp-8h]@3
  std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *v19; // [sp+14h] [bp-4h]@1

  v3 = _Where._Ptr;
  v19 = this;
  if ( _Where._Ptr->_Isnil )
    std::_Xout_of_range("invalid map/set<T> iterator");
  _Erasednode = _Where._Ptr;
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >,std::_Iterator_base0> *)&_Where._Ptr);
  if ( v3->_Left->_Isnil )
  {
    v4 = v3->_Right;
LABEL_8:
    v6 = v3->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v7 = v19;
    v8 = v19->_Myhead;
    if ( v8->_Parent == v3 )
    {
      v8->_Parent = v4;
    }
    else if ( v6->_Left == v3 )
    {
      v6->_Left = v4;
    }
    else
    {
      v6->_Right = v4;
    }
    if ( v19->_Myhead->_Left == v3 )
    {
      if ( v4->_Isnil )
      {
        v9 = v6;
      }
      else
      {
        v9 = std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Min(v4);
        v7 = v19;
      }
      v7->_Myhead->_Left = v9;
    }
    v10 = v7->_Myhead;
    if ( v10->_Right == v3 )
    {
      if ( v4->_Isnil )
        v10->_Right = v6;
      else
        v10->_Right = std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::_Max(v4);
    }
    goto LABEL_35;
  }
  if ( v3->_Right->_Isnil )
  {
    v4 = v3->_Left;
    goto LABEL_8;
  }
  v5 = _Where._Ptr;
  v4 = _Where._Ptr->_Right;
  if ( _Where._Ptr == v3 )
    goto LABEL_8;
  v3->_Left->_Parent = _Where._Ptr;
  v5->_Left = v3->_Left;
  if ( v5 == v3->_Right )
  {
    v6 = v5;
  }
  else
  {
    v6 = v5->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v6->_Left = v4;
    v5->_Right = v3->_Right;
    v3->_Right->_Parent = v5;
  }
  v11 = v19->_Myhead;
  if ( v11->_Parent == v3 )
  {
    v11->_Parent = v5;
  }
  else
  {
    v12 = v3->_Parent;
    if ( v12->_Left == v3 )
      v12->_Left = v5;
    else
      v12->_Right = v5;
  }
  v5->_Parent = v3->_Parent;
  v13 = v5->_Color;
  v5->_Color = v3->_Color;
  v3->_Color = v13;
LABEL_35:
  if ( _Erasednode->_Color == 1 )
  {
    for ( i = v19; v4 != i->_Myhead->_Parent; v6 = v6->_Parent )
    {
      if ( v4->_Color != 1 )
        break;
      v15 = v6->_Left;
      if ( v4 == v6->_Left )
      {
        v15 = v6->_Right;
        if ( !v15->_Color )
        {
          v15->_Color = 1;
          v6->_Color = 0;
          std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Lrotate(
            i,
            v6);
          v15 = v6->_Right;
          i = v19;
        }
        if ( v15->_Isnil )
          goto LABEL_53;
        if ( v15->_Left->_Color != 1 || v15->_Right->_Color != 1 )
        {
          if ( v15->_Right->_Color == 1 )
          {
            v15->_Left->_Color = 1;
            v15->_Color = 0;
            std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Rrotate(
              i,
              v15);
            v15 = v6->_Right;
            i = v19;
          }
          v15->_Color = v6->_Color;
          v6->_Color = 1;
          v15->_Right->_Color = 1;
          std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Lrotate(
            i,
            v6);
          break;
        }
      }
      else
      {
        if ( !v15->_Color )
        {
          v15->_Color = 1;
          v6->_Color = 0;
          std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Rrotate(
            i,
            v6);
          v15 = v6->_Left;
          i = v19;
        }
        if ( v15->_Isnil )
          goto LABEL_53;
        if ( v15->_Right->_Color != 1 || v15->_Left->_Color != 1 )
        {
          if ( v15->_Left->_Color == 1 )
          {
            v15->_Right->_Color = 1;
            v15->_Color = 0;
            std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Lrotate(
              i,
              v15);
            v15 = v6->_Left;
            i = v19;
          }
          v15->_Color = v6->_Color;
          v6->_Color = 1;
          v15->_Left->_Color = 1;
          std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Rrotate(
            i,
            v6);
          break;
        }
      }
      v15->_Color = 0;
LABEL_53:
      v4 = v6;
    }
    v4->_Color = 1;
  }
  if ( _Erasednode->_Myval.second._Myfirst )
    operator delete(_Erasednode->_Myval.second._Myfirst);
  _Erasednode->_Myval.second._Myfirst = 0;
  _Erasednode->_Myval.second._Mylast = 0;
  _Erasednode->_Myval.second._Myend = 0;
  operator delete(_Erasednode);
  v16 = v19->_Mysize;
  if ( v16 > 0 )
    v19->_Mysize = v16 - 1;
  v17 = result;
  result->_Ptr = _Where._Ptr;
  return v17;
}

//----- (005E3D20) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::_Erase(std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *this, std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *_Rootnode)
{
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v2; // esi@1
  std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *i; // edi@1

  v2 = _Rootnode;
  v3 = this;
  for ( i = _Rootnode; !i->_Isnil; v2 = i )
  {
    std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::_Erase(
      v3,
      i->_Right);
    i = i->_Left;
    if ( v2->_Myval.second._Myfirst )
      operator delete(v2->_Myval.second._Myfirst);
    v2->_Myval.second._Myfirst = 0;
    v2->_Myval.second._Mylast = 0;
    v2->_Myval.second._Myend = 0;
    operator delete(v2);
  }
}

//----- (005E3D80) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *_Node, bool _Leftish)
{
  std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *v4; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v5; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v6; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v7; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v8; // edi@1
  bool v9; // cl@1
  int v10; // edx@2
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v11; // edx@12
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > >,bool> *v12; // eax@12
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v13; // ecx@15
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v14; // edx@18
  bool _Addleft; // [sp+18h] [bp+Ch]@1

  v4 = this;
  v5 = this->_Myhead;
  v6 = v5->_Parent;
  v7 = v5;
  v8 = _Node;
  v9 = 1;
  _Addleft = 1;
  if ( !v6->_Isnil )
  {
    v10 = v8->_Myval.first;
    do
    {
      v7 = v6;
      if ( _Leftish )
        v9 = v6->_Myval.first >= v10;
      else
        v9 = v10 < v6->_Myval.first;
      _Addleft = v9;
      if ( v9 )
        v6 = v6->_Left;
      else
        v6 = v6->_Right;
    }
    while ( !v6->_Isnil );
  }
  *(_DWORD *)&_Leftish = v7;
  if ( v9 )
  {
    if ( v7 == v4->_Myhead->_Left )
    {
      v11 = std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::_Insert(
              v4,
              (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > *)&_Leftish,
              1,
              v7,
              v8)->_Ptr;
      v12 = result;
      result->second = 1;
      result->first._Ptr = v11;
      return v12;
    }
    std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >,std::_Iterator_base0> *)&_Leftish);
  }
  if ( *(_DWORD *)(_Leftish + 12) >= v8->_Myval.first )
  {
    if ( v8->_Myval.second._Myfirst )
      operator delete(v8->_Myval.second._Myfirst);
    v8->_Myval.second._Myfirst = 0;
    v8->_Myval.second._Mylast = 0;
    v8->_Myval.second._Myend = 0;
    operator delete(v8);
    v12 = result;
    v14 = (std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *)_Leftish;
    result->second = 0;
    result->first._Ptr = v14;
  }
  else
  {
    v13 = std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::_Insert(
            v4,
            (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > *)&_Leftish,
            _Addleft,
            v7,
            v8)->_Ptr;
    v12 = result;
    result->first._Ptr = v13;
    result->second = 1;
  }
  return v12;
}

//----- (005E3E70) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::_Buynode<std::pair<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>(std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *this, std::pair<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > *_Val)
{
  std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *result; // eax@1
  char *v4; // edx@3
  char *v5; // ecx@3
  std::exception pExceptionObject; // [sp+14h] [bp-18h]@6

  v2 = this;
  result = (std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *)operator new(0x24u);
  if ( !result )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  result->_Left = v2->_Myhead;
  result->_Parent = v2->_Myhead;
  result->_Right = v2->_Myhead;
  *(_WORD *)&result->_Color = 0;
  if ( result != (std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *)-12 )
  {
    v4 = (char *)&_Val->second;
    result->_Myval.first = _Val->first;
    v5 = (char *)&result->_Myval.second;
    *(_DWORD *)v5 = 0;
    *((_DWORD *)v5 + 1) = 0;
    *((_DWORD *)v5 + 2) = 0;
    if ( (char *)&result->_Myval.second != v4 )
    {
      *(_DWORD *)v5 = 0;
      result->_Myval.second._Mylast = 0;
      result->_Myval.second._Myend = 0;
      *(_DWORD *)v5 = *(_DWORD *)v4;
      result->_Myval.second._Mylast = (SHINE_ITEM_STRUCT *)*((_DWORD *)v4 + 1);
      result->_Myval.second._Myend = (SHINE_ITEM_STRUCT *)*((_DWORD *)v4 + 2);
      *(_DWORD *)v4 = 0;
      *((_DWORD *)v4 + 1) = 0;
      *((_DWORD *)v4 + 2) = 0;
    }
  }
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (005E3F40) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::erase(std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > _Last)
{
  std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v6; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node **v7; // ecx@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > *v8; // eax@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > v9; // edx@5
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v10; // eax@6
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v11; // ecx@7
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *j; // eax@7
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *i; // eax@10
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > v14; // [sp+4h] [bp-4h]@14

  v4 = this;
  v5 = this->_Myhead;
  v6 = _First._Ptr;
  if ( _First._Ptr != v5->_Left || _Last._Ptr != v5 )
  {
    for ( ; _First._Ptr != _Last._Ptr; v6 = _First._Ptr )
    {
      v9._Ptr = v6;
      if ( !v6->_Isnil )
      {
        v10 = v6->_Right;
        if ( v10->_Isnil )
        {
          for ( i = v6->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v6 != i->_Right )
              break;
            v6 = i;
          }
          _First._Ptr = i;
        }
        else
        {
          v11 = v6->_Right;
          for ( j = v10->_Left; !j->_Isnil; j = j->_Left )
            v11 = j;
          _First._Ptr = v11;
        }
      }
      std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::erase(
        v4,
        &v14,
        v9);
    }
    v8 = result;
    result->_Ptr = v6;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::_Erase(
      v4,
      v5->_Parent);
    v4->_Myhead->_Parent = v4->_Myhead;
    v4->_Myhead->_Left = v4->_Myhead;
    v4->_Myhead->_Right = v4->_Myhead;
    v7 = &v4->_Myhead->_Left;
    v8 = result;
    v4->_Mysize = 0;
    result->_Ptr = *v7;
  }
  return v8;
}

//----- (005E4000) --------------------------------------------------------
void __thiscall std::map<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>>::~map<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>>(std::map<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > > > *this)
{
  std::map<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > > > *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v2; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > v3; // ST04_4@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > > result; // [sp+8h] [bp-14h]@1
  std::map<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > > > *v5; // [sp+Ch] [bp-10h]@1
  int v6; // [sp+18h] [bp-4h]@1

  v1 = this;
  v5 = this;
  v2 = this->_Myhead;
  v3._Ptr = v2->_Left;
  v6 = 0;
  std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *)&this->comp,
    &result,
    v3,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > >)v2);
  operator delete(v1->_Myhead);
}

//----- (005E4060) --------------------------------------------------------
ChatBoardFlex *__thiscall ChatBoardFlex::`vector deleting destructor'(ChatBoardFlex *this, unsigned int a2)
{
  ChatBoardFlex *v2; // esi@1

  v2 = this;
  ChatBoardFlex::~ChatBoardFlex(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005E4090) --------------------------------------------------------
void __thiscall ChatDisplayWin::OnUp(ChatDisplayWin *this)
{
  ChatBoardFlex::ViewLineUp(this->m_pkActiveChatBD);
}

//----- (005E40A0) --------------------------------------------------------
void __thiscall ChatDisplayWin::OnDown(ChatDisplayWin *this)
{
  ChatBoardFlex::ViewLineDown(this->m_pkActiveChatBD);
}

//----- (005E40B0) --------------------------------------------------------
void __thiscall ChatDisplayWin::OnMostDown(ChatDisplayWin *this)
{
  ChatBoardFlex::ViewLineMostDown(this->m_pkActiveChatBD);
}

//----- (005E40C0) --------------------------------------------------------
void __thiscall ChatDisplayWin::AddNormalChat(ChatDisplayWin *this, char *pcFormat, char kChatID)
{
  ChatBoardFlex::AddUserChat(this->m_pkActiveChatBD, pcFormat, kChatID);
}

//----- (005E40D0) --------------------------------------------------------
void __thiscall ChatDisplayWin::AddOtherNormalChat(ChatDisplayWin *this, char *pcFormat, char kChatID)
{
  ChatBoardFlex::Add(this->m_pkActiveChatBD, (ChatBoardFlex::Type)512, pcFormat, kChatID);
}

//----- (005E40F0) --------------------------------------------------------
void __thiscall ChatDisplayWin::AddNormalChat(ChatDisplayWin *this, char *pcFormat)
{
  ChatBoardFlex::AddUserChat(this->m_pkActiveChatBD, pcFormat);
}

//----- (005E4100) --------------------------------------------------------
void __thiscall ChatDisplayWin::AddOtherNormalChat(ChatDisplayWin *this, char *pcFormat)
{
  ChatBoardFlex::Add(this->m_pkActiveChatBD, (ChatBoardFlex::Type)512, pcFormat);
}

//----- (005E4120) --------------------------------------------------------
void __thiscall ChatDisplayWin::AddGMNormalChat(ChatDisplayWin *this, char *pcFormat)
{
  ChatBoardFlex::AddGMUserChat(this->m_pkActiveChatBD, pcFormat);
}

//----- (005E4130) --------------------------------------------------------
void __thiscall ChatDisplayWin::AddGMOtherNormalChat(ChatDisplayWin *this, char *pcFormat)
{
  ChatBoardFlex::Add(this->m_pkActiveChatBD, (ChatBoardFlex::Type)1024, pcFormat);
}

//----- (005E4150) --------------------------------------------------------
void __thiscall ChatDisplayWin::AddGMShoutChat(ChatDisplayWin *this, char *pcFormat)
{
  ChatDisplayWin *v2; // esi@1
  char str[256]; // [sp+4h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  ChatBoardFlex::Add(v2->m_pkActiveChatBD, (ChatBoardFlex::Type)2048, str);
}

//----- (005E41B0) --------------------------------------------------------
void __thiscall ChatDisplayWin::AddGMWhisperChat(ChatDisplayWin *this, char *pcFormat)
{
  ChatDisplayWin *v2; // esi@1
  char str[256]; // [sp+4h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  ChatBoardFlex::Add(v2->m_pkActiveChatBD, (ChatBoardFlex::Type)4106, str);
}

//----- (005E4210) --------------------------------------------------------
void __thiscall ChatDisplayWin::AddShoutChat(ChatDisplayWin *this, char *pcFormat)
{
  ChatDisplayWin *v2; // esi@1
  char str[256]; // [sp+4h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  ChatBoardFlex::Add(v2->m_pkActiveChatBD, COLUMN, str);
}

//----- (005E4270) --------------------------------------------------------
void __thiscall ChatDisplayWin::AddWhisperChat(ChatDisplayWin *this, char *pcFormat)
{
  ChatDisplayWin *v2; // esi@1
  char str[256]; // [sp+4h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  ChatBoardFlex::Add(v2->m_pkActiveChatBD, (ChatBoardFlex::Type)8, str);
}

//----- (005E42D0) --------------------------------------------------------
void __thiscall ChatDisplayWin::AddPartyChat(ChatDisplayWin *this, char *pcFormat)
{
  ChatDisplayWin *v2; // esi@1
  char str[256]; // [sp+4h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  ChatBoardFlex::Add(v2->m_pkActiveChatBD, (ChatBoardFlex::Type)16, str);
}

//----- (005E4330) --------------------------------------------------------
void __thiscall ChatDisplayWin::AddGuildChat(ChatDisplayWin *this, char *pcFormat)
{
  ChatDisplayWin *v2; // esi@1
  char str[256]; // [sp+4h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  ChatBoardFlex::Add(v2->m_pkActiveChatBD, (ChatBoardFlex::Type)32, str);
}

//----- (005E4390) --------------------------------------------------------
void __thiscall ChatDisplayWin::AddOtherPartyChat(ChatDisplayWin *this, char *pcFormat)
{
  ChatDisplayWin *v2; // esi@1
  char str[256]; // [sp+4h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  ChatBoardFlex::Add(v2->m_pkActiveChatBD, (ChatBoardFlex::Type)16, str);
}

//----- (005E43F0) --------------------------------------------------------
void __thiscall ChatDisplayWin::AddOtherGuildChat(ChatDisplayWin *this, char *pcFormat)
{
  ChatDisplayWin *v2; // esi@1
  char str[256]; // [sp+4h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  ChatBoardFlex::Add(v2->m_pkActiveChatBD, (ChatBoardFlex::Type)32, str);
}

//----- (005E4450) --------------------------------------------------------
void __thiscall ChatDisplayWin::AddGuildAcademyChat(ChatDisplayWin *this, char *pcFormat)
{
  ChatDisplayWin *v2; // esi@1
  char str[256]; // [sp+4h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  ChatBoardFlex::Add(v2->m_pkActiveChatBD, (ChatBoardFlex::Type)4096, str);
}

//----- (005E44B0) --------------------------------------------------------
void __thiscall ChatDisplayWin::AddOtherGuildAcademyChat(ChatDisplayWin *this, char *pcFormat)
{
  ChatDisplayWin *v2; // esi@1
  char str[256]; // [sp+4h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  ChatBoardFlex::Add(v2->m_pkActiveChatBD, (ChatBoardFlex::Type)4096, str);
}

//----- (005E4510) --------------------------------------------------------
void __thiscall ChatDisplayWin::AddRaidChat(ChatDisplayWin *this, char *pcFormat)
{
  ChatDisplayWin *v2; // esi@1
  char str[256]; // [sp+4h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  ChatBoardFlex::Add(v2->m_pkActiveChatBD, (ChatBoardFlex::Type)0x2000, str);
}

//----- (005E4570) --------------------------------------------------------
void __thiscall ChatDisplayWin::AddOtherRaidChat(ChatDisplayWin *this, char *pcFormat)
{
  ChatDisplayWin *v2; // esi@1
  char str[256]; // [sp+4h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  ChatBoardFlex::Add(v2->m_pkActiveChatBD, (ChatBoardFlex::Type)0x2000, str);
}

//----- (005E45D0) --------------------------------------------------------
void __thiscall ChatDisplayWin::AddSystemChat(ChatDisplayWin *this, const char *pcFormat)
{
  ChatDisplayWin *v2; // esi@1
  char str[256]; // [sp+4h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  ChatBoardFlex::Add(v2->m_pkActiveChatBD, (ChatBoardFlex::Type)4, str);
}

//----- (005E4630) --------------------------------------------------------
void __thiscall ChatDisplayWin::AddAuthorChat(ChatDisplayWin *this, char *pcFormat)
{
  ChatDisplayWin *v2; // esi@1
  char str[256]; // [sp+4h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  ChatBoardFlex::Add(v2->m_pkActiveChatBD, (ChatBoardFlex::Type)128, str);
}

//----- (005E4690) --------------------------------------------------------
void __thiscall ChatDisplayWin::AddBattleChat(ChatDisplayWin *this, char *pcFormat)
{
  ChatDisplayWin *v2; // esi@1
  char str[256]; // [sp+4h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  ChatBoardFlex::Add(v2->m_pkActiveChatBD, (ChatBoardFlex::Type)256, str);
}

//----- (005E46F0) --------------------------------------------------------
void __thiscall ChatDisplayWin::GetSize(ChatDisplayWin *this, unsigned int *ruiWidth, unsigned int *ruiHeight)
{
  ChatDisplayWin *v3; // esi@1

  v3 = this;
  *ruiWidth = ((int (*)(void))this->m_pkChattingBox->vfptr[36].__vecDelDtor)();
  *ruiHeight = ((int (*)(void))v3->m_pkChattingBox->vfptr[37].__vecDelDtor)();
}

//----- (005E4730) --------------------------------------------------------
void __thiscall ChatDisplayWin::SetSize(ChatDisplayWin *this, unsigned int uiWidth, unsigned int uiHeight)
{
  ChatDisplayWin *v3; // esi@1
  int v4; // eax@1
  unsigned int v5; // ebx@1
  int iNewTop; // ST18_4@1
  int v7; // edi@1
  int v8; // ebx@1
  int v9; // ST18_4@1
  int v10; // eax@1
  FrameBoxWin *v11; // ecx@1
  int v12; // eax@1
  FrameBoxWin *v13; // ecx@1
  FrameBoxWin *v14; // eax@1
  int v15; // eax@2
  DirectUserMsgBody_SizeDrag kDrag; // [sp+10h] [bp-14h]@1

  v3 = this;
  v4 = ((int (*)(void))this->m_pkChattingBox->vfptr[36].__vecDelDtor)();
  v5 = v4 - uiWidth;
  iNewTop = v4 - uiWidth;
  v7 = v5 + ((int (*)(void))v3->m_pkChattingBox->vfptr[41].__vecDelDtor)();
  v8 = ((int (*)(void))v3->m_pkChattingBox->vfptr[36].__vecDelDtor)() - iNewTop;
  v9 = ((int (*)(void))v3->m_pkChattingBox->vfptr[42].__vecDelDtor)();
  ((void (*)(void))v3->m_pkChattingBox->vfptr[36].__vecDelDtor)();
  ((void (*)(void))v3->m_pkChattingBox->vfptr[37].__vecDelDtor)();
  v10 = ((int (*)(void))v3->m_pkChattingBox->vfptr[36].__vecDelDtor)();
  v11 = v3->m_pkChattingBox;
  kDrag.iDeltaWidth = v8 - v10;
  kDrag.iDeltaHeight = uiHeight - ((int (*)(void))v11->vfptr[37].__vecDelDtor)();
  v12 = ((int (*)(void))v3->m_pkChattingBox->vfptr[41].__vecDelDtor)();
  v13 = v3->m_pkChattingBox;
  kDrag.iDeltaLeft = v7 - v12;
  kDrag.iDeltaTop = v9 - ((int (*)(void))v13->vfptr[42].__vecDelDtor)();
  ((void (__stdcall *)(_DWORD, _DWORD))v3->m_pkChattingBox->vfptr[135].__vecDelDtor)(uiWidth, uiHeight);
  v14 = v3->m_pkChattingBox;
  if ( v14 )
    v15 = (int)&v14->vfptr;
  else
    v15 = 0;
  v3->vfptr->DirectMessage((IDirectMessenger *)&v3->vfptr, 14, &kDrag, (IDirectMessenger *)v15);
}

//----- (005E4870) --------------------------------------------------------
void __thiscall ChatDisplayWin::SetDefaultSize(ChatDisplayWin *this)
{
  ((void (__stdcall *)(_DWORD, _DWORD))this->vfptr[135].__vecDelDtor)(this->m_uiDefaultWidth, this->m_uiDefaultHeight);
}

//----- (005E4890) --------------------------------------------------------
void __thiscall ChatDisplayWin::OnChatCommand(ChatDisplayWin *this)
{
  ChatDisplayWin *v1; // ebx@1
  PgWinSpr *v2; // eax@2
  NiRefObjectVtbl *v3; // esi@2
  char v4; // al@2
  PgWinBut **v5; // edi@2
  NiRefObjectVtbl *v6; // esi@3
  unsigned __int8 v7; // al@3
  signed int v8; // [sp+4h] [bp-4h]@2

  v1 = this;
  if ( this->m_pkChatCommandSprWin )
  {
    v2 = this->m_pkChatCommandSprWin;
    v3 = v2->vfptr;
    v4 = ((int (*)(void))v2->vfptr[65].__vecDelDtor)();
    v3[64].__vecDelDtor((NiRefObject *)v1->m_pkChatCommandSprWin, v4 == 0);
    v5 = v1->m_pkChatCmdBut;
    v8 = 8;
    do
    {
      v6 = (*v5)->vfptr;
      v7 = ((int (*)(void))v1->m_pkChatCommandSprWin->vfptr[65].__vecDelDtor)();
      v6[64].__vecDelDtor((NiRefObject *)*v5, v7);
      ++v5;
      --v8;
    }
    while ( v8 );
  }
}

//----- (005E4920) --------------------------------------------------------
void __thiscall ChatDisplayWin::~ChatDisplayWin(ChatDisplayWin *this)
{
  ChatDisplayWin *v1; // esi@1
  EditWin *v2; // edi@1
  PopupMenuWin *v3; // edi@6
  PopupMenuWin *v4; // edi@11
  PopupMenuWin *v5; // edi@16
  PopupMenuWin *v6; // edi@21
  PopupMenuWin *v7; // edi@25
  PopupMenuWin *v8; // edi@29
  EditWin *v9; // edi@33
  NiMaterialProperty *v10; // edi@37
  NiMaterialProperty *v11; // edi@41

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ChatDisplayWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ChatDisplayWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spEdit.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spEdit.m_pObject = 0;
  }
  PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_spChatFilterPopupMenu.m_pObject->vfptr);
  PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_spChatPopupMenu.m_pObject->vfptr);
  v3 = v1->m_spChatFilterPopupMenu.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spChatFilterPopupMenu.m_pObject = 0;
  }
  v4 = v1->m_spChatPopupMenu.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spChatPopupMenu.m_pObject = 0;
  }
  v5 = v1->m_spChatModePopupMenu.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spChatModePopupMenu.m_pObject = 0;
  }
  v6 = v1->m_spChatPopupMenu.m_pObject;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  v7 = v1->m_spChatModePopupMenu.m_pObject;
  if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  v8 = v1->m_spChatFilterPopupMenu.m_pObject;
  if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
    v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
  v9 = v1->m_spEdit.m_pObject;
  if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
    v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
  v10 = v1->m_spFixedMtrlProp.m_pObject;
  if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
    v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
  v11 = v1->m_spMtrlProp.m_pObject;
  if ( v11 && !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
    v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
  `eh vector destructor iterator'(
    v1->m_aspChatBD,
    4u,
    4,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9B1428: using guessed type void (__thiscall *ChatDisplayWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B1444: using guessed type int (__thiscall *ChatDisplayWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005E4B70) --------------------------------------------------------
void __thiscall ChatDisplayWin::OnReport(ChatDisplayWin *this)
{
  GameFrameWork::OpenReportWin((GameFrameWork *)this->m_pkFrameWork);
}

//----- (005E4B80) --------------------------------------------------------
void __thiscall ChatDisplayWin::OnTab(ChatDisplayWin *this)
{
  ChatDisplayWin *v1; // esi@1
  int v2; // eax@1
  PgWinBut *v3; // ecx@1
  PopupMenuWin *v4; // edi@1
  int v5; // ebx@1
  int v6; // eax@1
  PgWinProxy *v7; // ecx@1
  int x; // [sp+Ch] [bp-8h]@1
  int y; // [sp+10h] [bp-4h]@1

  v1 = this;
  v2 = ((int (*)(void))this->m_pkTabBtn->vfptr[41].__vecDelDtor)();
  v3 = v1->m_pkTabBtn;
  v4 = v1->m_spChatModePopupMenu.m_pObject;
  x = v2;
  v5 = ((int (*)(void))v3->vfptr[42].__vecDelDtor)();
  v6 = ((int (__thiscall *)(_DWORD))v4->vfptr[37].__vecDelDtor)(v4);
  v7 = v1->m_pkLTSocketWin;
  y = v5 - v6;
  ((void (__stdcall *)(_DWORD, _DWORD))v7->vfptr[55].__vecDelDtor)(&x, &y);
  ((void (__stdcall *)(_DWORD, _DWORD))v1->m_spChatModePopupMenu.m_pObject->vfptr[77].__vecDelDtor)(x, y);
  PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v1->m_spChatModePopupMenu.m_pObject->vfptr);
}

//----- (005E4C20) --------------------------------------------------------
void __thiscall ChatDisplayWin::ChatStart(ChatDisplayWin *this, const char *szText)
{
  ChatDisplayWin *v2; // esi@1

  v2 = this;
  ((void (*)(void))this->m_spEdit.m_pObject->vfptr[120].__vecDelDtor)();
  ((void (__stdcall *)(_DWORD))v2->m_pkChatEditBox->vfptr[64].__vecDelDtor)(1);
  if ( szText )
    ((void (__stdcall *)(_DWORD))v2->m_spEdit.m_pObject->vfptr[116].__vecDelDtor)(szText);
}

//----- (005E4C70) --------------------------------------------------------
int __thiscall ChatDisplayWin::IsDuringEdit(ChatDisplayWin *this)
{
  return ((int (*)(void))this->m_spEdit.m_pObject->vfptr[122].__vecDelDtor)();
}

//----- (005E4C80) --------------------------------------------------------
void __thiscall ChatDisplayWin::OnEditEnd(ChatDisplayWin *this, unsigned int wParam, int lParam)
{
  ChatDisplayWin *v3; // esi@1
  char *v4; // edi@1
  unsigned int v5; // eax@2
  int v6; // eax@3
  char *v7; // [sp-8h] [bp-10h]@5

  v3 = this;
  v4 = (char *)((int (*)(void))this->m_spEdit.m_pObject->vfptr[114].__vecDelDtor)();
  if ( wParam != 1 )
    goto LABEL_9;
  v5 = v3->m_uiChatMode;
  if ( v5 )
  {
    v6 = v5 - 2;
    if ( v6 )
    {
      if ( v6 != 1 )
        goto LABEL_9;
      v7 = "/g ";
    }
    else
    {
      v7 = "/p ";
    }
  }
  else
  {
    v7 = 0;
  }
  GameFrameWork::DecodingChat((GameFrameWork *)v3->m_pkFrameWork, v4, v7, 0);
LABEL_9:
  if ( v4 )
  {
    ((void (__stdcall *)(_DWORD))v3->m_pkChatEditBox->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v3->m_pkChatEngMode->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v3->m_pkChatKorMode->vfptr[64].__vecDelDtor)(0);
  }
}

//----- (005E4D20) --------------------------------------------------------
unsigned int __thiscall ChatDisplayWin::GetOption(ChatDisplayWin *this)
{
  return this->m_aspChatBD[0].m_pObject->m_uiOption;
}

//----- (005E4D30) --------------------------------------------------------
void __thiscall ChatDisplayWin::SetOption(ChatDisplayWin *this, unsigned int uiOpt)
{
  ChatDisplayWin *v2; // edi@1
  char *v3; // esi@1
  int v4; // esi@4
  int v5; // esi@7
  int v6; // esi@10
  int v7; // esi@13
  int v8; // esi@16
  int v9; // esi@19
  DirectUserMsgBody_PopupMenuSetCheckBox kBody; // [sp+Ch] [bp-8h]@1

  v2 = this;
  this->m_aspChatBD[0].m_pObject->m_uiOption = uiOpt;
  v3 = (char *)&this->m_spChatFilterPopupMenu.m_pObject->vfptr;
  kBody.iPopupMenuID = 17;
  kBody.bCheck = uiOpt & 1;
  if ( *((_DWORD *)v3 + 1) )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v3 + 1) + 4))(16, &kBody, v3);
    if ( *((_DWORD *)v3 + 1) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v3 + 1) + 16))(16, &kBody, v3);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v3 + 16))(v3, 16, &kBody, v3);
  v4 = (int)&v2->m_spChatFilterPopupMenu.m_pObject->vfptr;
  kBody.iPopupMenuID = 18;
  kBody.bCheck = (uiOpt >> 3) & 1;
  if ( *(_DWORD *)(v4 + 4) )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v4 + 4) + 4))(16, &kBody, v4);
    if ( *(_DWORD *)(v4 + 4) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v4 + 4) + 16))(16, &kBody, v4);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v4 + 16))(v4, 16, &kBody, v4);
  v5 = (int)&v2->m_spChatFilterPopupMenu.m_pObject->vfptr;
  kBody.iPopupMenuID = 19;
  kBody.bCheck = (uiOpt >> 4) & 1;
  if ( *(_DWORD *)(v5 + 4) )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v5 + 4) + 4))(16, &kBody, v5);
    if ( *(_DWORD *)(v5 + 4) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v5 + 4) + 16))(16, &kBody, v5);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v5 + 16))(v5, 16, &kBody, v5);
  v6 = (int)&v2->m_spChatFilterPopupMenu.m_pObject->vfptr;
  kBody.iPopupMenuID = 20;
  kBody.bCheck = (uiOpt >> 5) & 1;
  if ( *(_DWORD *)(v6 + 4) )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v6 + 4) + 4))(16, &kBody, v6);
    if ( *(_DWORD *)(v6 + 4) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v6 + 4) + 16))(16, &kBody, v6);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v6 + 16))(v6, 16, &kBody, v6);
  v7 = (int)&v2->m_spChatFilterPopupMenu.m_pObject->vfptr;
  kBody.iPopupMenuID = 21;
  kBody.bCheck = 0;
  if ( *(_DWORD *)(v7 + 4) )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v7 + 4) + 4))(16, &kBody, v7);
    if ( *(_DWORD *)(v7 + 4) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v7 + 4) + 16))(16, &kBody, v7);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v7 + 16))(v7, 16, &kBody, v7);
  v8 = (int)&v2->m_spChatFilterPopupMenu.m_pObject->vfptr;
  kBody.iPopupMenuID = 26;
  kBody.bCheck = BYTE1(uiOpt) & 1;
  if ( *(_DWORD *)(v8 + 4) )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v8 + 4) + 4))(16, &kBody, v8);
    if ( *(_DWORD *)(v8 + 4) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v8 + 4) + 16))(16, &kBody, v8);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v8 + 16))(v8, 16, &kBody, v8);
  v9 = (int)&v2->m_spChatFilterPopupMenu.m_pObject->vfptr;
  kBody.iPopupMenuID = 25;
  kBody.bCheck = 1;
  if ( *(_DWORD *)(v9 + 4) )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v9 + 4) + 4))(16, &kBody, v9);
    if ( *(_DWORD *)(v9 + 4) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v9 + 4) + 16))(16, &kBody, v9);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v9 + 16))(v9, 16, &kBody, v9);
}

//----- (005E4FD0) --------------------------------------------------------
void __thiscall ChatDisplayWin::AddOption(ChatDisplayWin *this, unsigned int uiOpt)
{
  this->m_aspChatBD[0].m_pObject->m_uiOption |= uiOpt;
}

//----- (005E4FF0) --------------------------------------------------------
void __thiscall ChatDisplayWin::RemoveOption(ChatDisplayWin *this, unsigned int uiOpt)
{
  this->m_aspChatBD[0].m_pObject->m_uiOption &= ~uiOpt;
}

//----- (005E5010) --------------------------------------------------------
char *__thiscall ChatDisplayWin::GetCurrentChatText(ChatDisplayWin *this)
{
  return (char *)((int (*)(void))this->m_spEdit.m_pObject->vfptr[113].__vecDelDtor)();
}

//----- (005E5020) --------------------------------------------------------
BOOL ChatDisplayWin::IsAutoHideOptionSetted()
{
  return byte_B4FF8E == 0;
}
// B4FF8E: using guessed type char byte_B4FF8E;

//----- (005E5030) --------------------------------------------------------
char __thiscall ChatDisplayWin::GetCursorStateOnPanel(ChatDisplayWin *this)
{
  char v1; // bl@1
  FrameBoxWin *v3; // ecx@3

  v1 = 0;
  if ( this->m_kAlphaControl.fAlphaValue < 1.0 )
    return 0;
  v3 = this->m_pkChattingBox;
  if ( v3 )
  {
    if ( v3->m_bIsDuringSizeDrag )
      return 2;
    if ( (unsigned __int8)FrameBoxWin::SizeDragHitTest(v3) )
      v1 = 1;
  }
  return v1;
}

//----- (005E5070) --------------------------------------------------------
void __thiscall ChatDisplayWin::ChatDisplayWin(ChatDisplayWin *this)
{
  ChatDisplayWin *v1; // esi@1
  PopupMenuWin *v2; // ebx@1
  PopupMenuWin *v3; // ebx@6
  PopupMenuWin *v4; // ebx@11

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ChatDisplayWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ChatDisplayWin::`vftable'{for `IDirectMessenger'};
  `eh vector constructor iterator'(
    v1->m_aspChatBD,
    4u,
    4,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_spMtrlProp.m_pObject = 0;
  v1->m_spFixedMtrlProp.m_pObject = 0;
  v1->m_spEdit.m_pObject = 0;
  v1->m_spChatFilterPopupMenu.m_pObject = 0;
  v1->m_spChatModePopupMenu.m_pObject = 0;
  v1->m_spChatPopupMenu.m_pObject = 0;
  v1->m_kAlphaControl.fTimeLeftToAppear = 1.0;
  v1->m_uiChattingBoxWidthMinusEditBoxWidth = 0;
  v1->m_pkLTSocketWin = 0;
  v1->m_kAlphaControl.fAlphaValue = 0.0;
  v1->m_pkLBSocketWin = 0;
  v1->m_pkRBSocketWin = 0;
  v2 = v1->m_spChatFilterPopupMenu.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spChatFilterPopupMenu.m_pObject = 0;
  }
  v3 = v1->m_spChatPopupMenu.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spChatPopupMenu.m_pObject = 0;
  }
  v4 = v1->m_spChatModePopupMenu.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spChatModePopupMenu.m_pObject = 0;
  }
  v1->m_uiChatMode = 0;
  v1->m_pkReportText = 0;
  v1->m_pkReportTabBtn = 0;
  v1->m_pkChatCommandSprWin = 0;
}
// 9B1428: using guessed type void (__thiscall *ChatDisplayWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B1444: using guessed type int (__thiscall *ChatDisplayWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005E51D0) --------------------------------------------------------
void __thiscall ChatDisplayWin::OnActive(ChatDisplayWin *this, unsigned int uiIndex)
{
  ChatDisplayWin *v2; // esi@1
  ChatBoardFlex *v3; // ecx@1
  NiUnsharedGeometryGroup *v4; // eax@2
  PgWinText *v5; // ecx@6

  v2 = this;
  v3 = this->m_aspChatBD[uiIndex].m_pObject;
  v2->m_pkActiveChatBD = v3;
  ChatBoardFlex::SetSystemWindow(v3, 1);
  v2->m_uiActiveChatBoardIndex = uiIndex;
  switch ( uiIndex )
  {
    case 0u:
      v4 = TextData::Get(0xEF05252B);
      goto LABEL_6;
    case 1u:
      v4 = TextData::Get(0xF54E1743);
      goto LABEL_6;
    case 2u:
      v4 = TextData::Get(0xF605CB45);
      goto LABEL_6;
    case 3u:
      v4 = TextData::Get(0xEEFCDF27);
LABEL_6:
      v5 = v2->m_pkTabText;
      if ( v5 )
        ((void (__stdcall *)(_DWORD))v5->vfptr[118].__vecDelDtor)(v4);
      break;
    default:
      return;
  }
}

//----- (005E5250) --------------------------------------------------------
void __userpurge ChatDisplayWin::UpdateMeWin(ChatDisplayWin *this@<ecx>, signed int a2@<edi>, float fCurTime)
{
  double v3; // st7@1
  double v4; // st6@1
  ChatDisplayWin *v5; // esi@1
  ChatBoardFlex *v6; // ecx@3
  bool v7; // c0@5
  double v8; // st7@5
  ChatBoardFlex *v9; // ecx@6
  FrameBoxWin *v10; // ecx@7
  PgWinBut *v11; // ecx@15
  PgWinBut *v12; // ecx@17
  PopupMenuWin *v13; // ecx@19
  PopupMenuWin *v14; // ecx@22
  FrameBoxWin *v15; // ecx@26
  double v16; // st7@27
  PgWinBut *v17; // ecx@29
  const char *v18; // eax@34
  NiMaterialProperty *v19; // eax@34
  NiMaterialProperty *v20; // eax@37
  PgWinBut *v21; // ecx@41
  double v22; // st7@43
  NiMaterialProperty *v23; // eax@48
  PgWinText *v24; // ecx@49
  PgWinText *v25; // ecx@51
  GameFrameWork *v26; // eax@53
  signed int v27; // [sp+40h] [bp-Ch]@10
  signed int v28; // [sp+44h] [bp-8h]@1
  float fSin; // [sp+54h] [bp+8h]@28
  float fSina; // [sp+54h] [bp+8h]@33
  float fSinb; // [sp+54h] [bp+8h]@33
  float fSinc; // [sp+54h] [bp+8h]@34
  float fSind; // [sp+54h] [bp+8h]@44
  float fSine; // [sp+54h] [bp+8h]@47
  float fSinf; // [sp+54h] [bp+8h]@47
  float fSing; // [sp+54h] [bp+8h]@48

  v3 = fCurTime;
  v4 = 0.1000000014901161;
  v5 = this;
  v28 = a2;
  if ( this->m_pkScrollUpBtn->m_eButShow == 1 && v3 - this->m_fScUpTimeWhenPushed > 0.1000000014901161 )
  {
    do
    {
      v6 = v5->m_pkActiveChatBD;
      v5->m_fScUpTimeWhenPushed = v4 + v5->m_fScUpTimeWhenPushed;
      ChatBoardFlex::ViewLineUp(v6);
      v3 = fCurTime;
      v4 = 0.1000000014901161;
    }
    while ( fCurTime - v5->m_fScUpTimeWhenPushed > 0.1000000014901161 );
  }
  if ( v5->m_pkScrollDnBtn->m_eButShow == 1 )
  {
    v7 = v4 < v3 - v5->m_fScDnTimeWhenPushed;
    v8 = v4;
    if ( v7 )
    {
      do
      {
        v9 = v5->m_pkActiveChatBD;
        v5->m_fScDnTimeWhenPushed = v8 + v5->m_fScDnTimeWhenPushed;
        ChatBoardFlex::ViewLineDown(v9);
        v8 = 0.1000000014901161;
      }
      while ( fCurTime - v5->m_fScDnTimeWhenPushed > 0.1000000014901161 );
    }
  }
  v10 = v5->m_pkChatEditBox;
  if ( v10 && (unsigned __int8)((int (*)(void))v10->vfptr[65].__vecDelDtor)() )
  {
    if ( EditWin::GetImeStatus(v5->m_spEdit.m_pObject) == (HIMC)2 )
    {
      v27 = 1;
    }
    else
    {
      v27 = 0;
      if ( EditWin::GetImeStatus(v5->m_spEdit.m_pObject) == (HIMC)1 )
      {
        ((void (__stdcall *)(_DWORD, signed int))v5->m_pkChatEngMode->vfptr[64].__vecDelDtor)(0, a2);
        v28 = 1;
        goto LABEL_12;
      }
    }
    ((void (__stdcall *)(signed int, signed int))v5->m_pkChatEngMode->vfptr[64].__vecDelDtor)(v27, a2);
    v28 = 0;
LABEL_12:
    ((void (*)(void))v5->m_pkChatKorMode->vfptr[64].__vecDelDtor)();
  }
  if ( (unsigned __int8)((int (__stdcall *)(unsigned int, int))v5->m_pkChattingBox->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY)
    || (unsigned __int8)((int (__thiscall *)(ChatDisplayWin *, unsigned int, int))v5->vfptr[83].__vecDelDtor)(
                          v5,
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY)
    || (v11 = v5->m_pkTabBtn) != 0
    && (unsigned __int8)((int (__stdcall *)(unsigned int, int))v11->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY)
    || (v12 = v5->m_pkFilterBtn) != 0
    && (unsigned __int8)((int (__stdcall *)(unsigned int, int))v12->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY)
    || (v13 = v5->m_spChatFilterPopupMenu.m_pObject) != 0
    && (unsigned __int8)((int (*)(void))v13->vfptr[65].__vecDelDtor)()
    && (unsigned __int8)((int (__stdcall *)(unsigned int, int))v5->m_spChatFilterPopupMenu.m_pObject->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY)
    || (v14 = v5->m_spChatModePopupMenu.m_pObject) != 0
    && (unsigned __int8)((int (*)(void))v14->vfptr[65].__vecDelDtor)()
    || (unsigned __int8)((int (*)(void))v5->m_spChatFilterPopupMenu.m_pObject->vfptr[65].__vecDelDtor)()
    || (unsigned __int8)((int (__thiscall *)(ChatDisplayWin *))v5->vfptr[137].__vecDelDtor)(v5) )
  {
    if ( v5->m_kAlphaControl.fTimeLeftToAppear > 0.0 )
      v5->m_kAlphaControl.fTimeLeftToAppear = v5->m_kAlphaControl.fTimeLeftToAppear - Timer::ms_fDeltaTime;
    if ( v5->m_kAlphaControl.fTimeLeftToAppear <= 0.0 )
    {
      ((void (__stdcall *)(signed int, signed int))v5->m_pkChattingBox->vfptr[64].__vecDelDtor)(1, v28);
      v21 = v5->m_pkTabBtn;
      if ( v21 )
        ((void (__stdcall *)(signed int))v21->vfptr[64].__vecDelDtor)(1);
      ((void (__thiscall *)(ChatDisplayWin *))v5->vfptr[60].__vecDelDtor)(v5);
      v22 = 1.0;
      if ( v5->m_kAlphaControl.fAlphaValue < 1.0 )
      {
        fSind = Timer::ms_fDeltaTime + Timer::ms_fDeltaTime + v5->m_kAlphaControl.fAlphaValue;
        v5->m_kAlphaControl.fAlphaValue = fSind;
        if ( fSind > 1.0 )
          v5->m_kAlphaControl.fAlphaValue = 1.0;
        if ( v5->m_kAlphaControl.fAlphaValue < 1.0 )
        {
          fSine = NI_HALF_PI * v5->m_kAlphaControl.fAlphaValue;
          fSinf = sin(fSine);
          v22 = fSinf;
        }
        v23 = v5->m_spMtrlProp.m_pObject;
        fSing = v22;
        ++v23->m_uiRevID;
        v23->m_fAlpha = fSing;
      }
    }
  }
  else
  {
    v15 = v5->m_pkChattingBox;
    if ( !v15->m_bIsDuringSizeDrag )
    {
      v16 = 0.0;
      if ( v5->m_kAlphaControl.fAlphaValue <= 0.0 )
      {
        ((void (__stdcall *)(_DWORD))v15->vfptr[64].__vecDelDtor)(0);
        v5->vfptr[60].__vecDelDtor((NiRefObject *)v5, 0);
        v20 = v5->m_spMtrlProp.m_pObject;
        v20->m_fAlpha = 0.0;
        ++v20->m_uiRevID;
      }
      else
      {
        fSin = v5->m_kAlphaControl.fAlphaValue - (Timer::ms_fDeltaTime + Timer::ms_fDeltaTime);
        v5->m_kAlphaControl.fAlphaValue = fSin;
        if ( fSin <= 0.0 )
        {
          v5->m_kAlphaControl.fAlphaValue = 0.0;
          v5->m_kAlphaControl.fTimeLeftToAppear = 1.0;
          ((void (__stdcall *)(_DWORD, signed int))v15->vfptr[64].__vecDelDtor)(0, v28);
          v17 = v5->m_pkTabBtn;
          if ( v17 )
            ((void (__stdcall *)(_DWORD))v17->vfptr[64].__vecDelDtor)(0);
          ((void (__thiscall *)(ChatDisplayWin *))v5->vfptr[60].__vecDelDtor)(v5);
          v16 = 0.0;
        }
        if ( v16 < v5->m_kAlphaControl.fAlphaValue )
        {
          fSina = NI_HALF_PI * v5->m_kAlphaControl.fAlphaValue;
          fSinb = sin(fSina);
          v16 = fSinb;
        }
        fSinc = v16;
        v18 = fs("%f\n", fSinc);
        OutputDebugStringA(v18);
        v19 = v5->m_spMtrlProp.m_pObject;
        ++v19->m_uiRevID;
        v19->m_fAlpha = fSinc;
      }
    }
  }
  v24 = v5->m_pkTabText;
  if ( v24 )
    ((void (__stdcall *)(_DWORD))v24->vfptr[69].__vecDelDtor)(v5->m_spMtrlProp.m_pObject->m_fAlpha);
  v25 = v5->m_pkReportText;
  if ( v25 )
    ((void (__stdcall *)(_DWORD))v25->vfptr[69].__vecDelDtor)(v5->m_spMtrlProp.m_pObject->m_fAlpha);
  v26 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v26 )
    GameFrameWork::UpdateUIScroll(v26, v5->m_pkChattingBox, v5->m_pkActiveChatBD);
}
// 5E5250: could not find valid save-restore pair for edi
// A8B980: using guessed type float Timer::ms_fDeltaTime;
// B622D0: using guessed type const float NI_HALF_PI;

//----- (005E5710) --------------------------------------------------------
void __cdecl MoveChildrenWin(PgWin *pkWin, int x, int y)
{
  PgWin *v3; // esi@1
  unsigned int i; // ebx@2
  int v5; // edi@3
  int v6; // eax@3
  NiPointer<NiAVObject> *v7; // ecx@4
  NiRTTI *v8; // eax@5
  unsigned int uiPos; // [sp+4h] [bp-4h]@1

  uiPos = 0;
  v3 = PgWin::GetNextChildWin(pkWin, &uiPos);
  if ( v3 )
  {
    for ( i = uiPos; ; ++i )
    {
      v5 = x + ((int (__thiscall *)(_DWORD))v3->vfptr[41].__vecDelDtor)(v3);
      v6 = ((int (__thiscall *)(_DWORD))v3->vfptr[42].__vecDelDtor)(v3);
      ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v3->vfptr[77].__vecDelDtor)(v3, v5, y + v6);
      if ( i >= pkWin->m_kChildren.m_uiSize )
        break;
      while ( 1 )
      {
        v7 = pkWin->m_kChildren.m_pBase;
        v3 = (PgWin *)v7[i].m_pObject;
        if ( v3 )
        {
          v8 = (NiRTTI *)((int (__thiscall *)(_DWORD))v3->vfptr[1].__vecDelDtor)(v7[i].m_pObject);
          if ( v8 )
            break;
        }
LABEL_8:
        if ( ++i >= pkWin->m_kChildren.m_uiSize )
          return;
      }
      while ( v8 != &PgWin::m_RTTI )
      {
        v8 = v8->m_pkBaseRTTI;
        if ( !v8 )
          goto LABEL_8;
      }
    }
  }
}

//----- (005E57C0) --------------------------------------------------------
void __thiscall ChatDisplayWin::SetChatMode(ChatDisplayWin *this, unsigned int uiChatMode)
{
  ChatDisplayWin *v2; // edi@1
  unsigned int v3; // esi@1
  NiUnsharedGeometryGroup *v4; // ebx@5
  CClientGuild *v5; // eax@10
  NiUnsharedGeometryGroup *v6; // ebx@11
  NiUnsharedGeometryGroup *v7; // eax@2
  PgWinText *v8; // edi@17
  char *pcText; // [sp+14h] [bp+8h]@5

  v2 = this;
  v3 = this->m_uiChatMode;
  this->m_uiChatMode = uiChatMode;
  switch ( uiChatMode )
  {
    case 0u:
      v7 = TextData::Get(0xEF05252B);
      goto LABEL_16;
    case 1u:
      v7 = TextData::Get(0xF54E1743);
      goto LABEL_16;
    case 2u:
      if ( g_kParty.m_uiTotalMember )
      {
        v7 = TextData::Get(0xF605CB45);
        goto LABEL_16;
      }
      pcText = (char *)TextData::Get(0xEF05252B);
      v2->m_uiChatMode = v3;
      v4 = TextData::Get(0x7D9CEEE9u);
      if ( v2->m_pkMsgHooker )
      {
        ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v2->m_pkMsgHooker->vfptr->SendDirectMessage)(25, v4, &v2->vfptr);
        if ( v2->m_pkMsgHooker )
          ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v2->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            25,
            v4,
            &v2->vfptr);
      }
      v2->vfptr->DirectDispatchToParent((IDirectMessenger *)&v2->vfptr, 25, v4, (IDirectMessenger *)&v2->vfptr);
      break;
    case 3u:
      v5 = GuildTask::GetGuild();
      if ( (unsigned __int8)CClientGuild::AmIGuildMember(v5) )
      {
        v7 = TextData::Get(0xEEFCDF27);
LABEL_16:
        pcText = (char *)v7;
      }
      else
      {
        pcText = (char *)TextData::Get(0xEF05252B);
        v2->m_uiChatMode = v3;
        v6 = TextData::Get(0x76816B99u);
        if ( v2->m_pkMsgHooker )
        {
          ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v2->m_pkMsgHooker->vfptr->SendDirectMessage)(25, v6, &v2->vfptr);
          if ( v2->m_pkMsgHooker )
            ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v2->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
              25,
              v6,
              &v2->vfptr);
        }
        v2->vfptr->DirectDispatchToParent((IDirectMessenger *)&v2->vfptr, 25, v6, (IDirectMessenger *)&v2->vfptr);
      }
      break;
    default:
      this->m_uiChatMode = 0;
      return;
  }
  v8 = v2->m_pkTabText;
  if ( v8 )
    v8->vfptr[118].__vecDelDtor((NiRefObject *)v8, (unsigned int)pcText);
}

//----- (005E5930) --------------------------------------------------------
char __thiscall ChatDisplayWin::Create(ChatDisplayWin *this, PgFrameWork *pkFrameWork)
{
  ChatDisplayWin *v2; // esi@1
  NiNode *v3; // esi@2
  bool v4; // zf@4
  char result; // al@7
  NiTexturePalette *v6; // ebx@8
  const char *v7; // eax@10
  NiMaterialProperty *v8; // eax@11
  int v9; // eax@12
  NiMaterialProperty *v10; // edi@14
  int v11; // eax@19
  NiMaterialProperty *v12; // eax@21
  float v13; // ecx@21
  NiMaterialProperty *v14; // eax@21
  float v15; // edx@21
  NiMaterialProperty *v16; // eax@21
  float v17; // ecx@21
  NiMaterialProperty *v18; // eax@21
  NiMaterialProperty *v19; // eax@21
  int v20; // eax@22
  NiMaterialProperty *v21; // edi@24
  int v22; // eax@29
  NiMaterialProperty *v23; // eax@31
  float v24; // ecx@31
  NiMaterialProperty *v25; // eax@31
  float v26; // edx@31
  NiMaterialProperty *v27; // eax@31
  float v28; // ecx@31
  NiSourceTexture *v29; // edx@31
  NiMaterialProperty *v30; // eax@31
  PgSprData *v31; // eax@31
  PgFrameWork *v32; // edi@31
  NiNode *v33; // esi@32
  int v34; // ebx@37
  unsigned int v35; // ecx@39
  NiSourceTexture *v36; // eax@39
  FrameBoxWin *v37; // eax@39
  unsigned int v38; // ST30_4@39
  unsigned int v39; // ecx@39
  PgFont *v40; // eax@39
  FrameBoxWin *v41; // ecx@40
  unsigned int v42; // eax@40
  FrameBoxWin *v43; // ecx@40
  NiPointer<NiD3DDefaultShader> *v44; // edi@40
  FrameBoxWin *v45; // ebx@41
  int v46; // eax@41
  unsigned int v47; // ecx@41
  FrameBoxWin *v48; // ebx@41
  NiRefObjectVtbl *v49; // edx@41
  int v50; // eax@41
  unsigned int v51; // ecx@41
  FrameBoxWin *v52; // ebx@41
  int v53; // eax@41
  FrameBoxWin *v54; // ecx@41
  int v55; // edx@41
  unsigned int v56; // ecx@41
  unsigned int v57; // ST20_4@41
  int v58; // ST1C_4@41
  int v59; // eax@41
  NiD3DDefaultShader *v60; // eax@41
  FrameBoxWin *v61; // edi@42
  int v62; // ebx@42
  int v63; // eax@42
  PgWinProxy *v64; // eax@42
  int v65; // ebx@42
  int (*v66)(void); // eax@42
  int v67; // eax@42
  int v68; // edi@42
  PgSprData *v69; // eax@42
  char *v70; // eax@42
  PgWin *v71; // ST28_4@42
  PgFont *v72; // ST24_4@42
  unsigned int v73; // ST20_4@42
  unsigned int v74; // eax@42
  PgWinText *v75; // eax@42
  PgWinBut *v76; // eax@42
  NiProperty *v77; // ST30_4@42
  PgSprData *v78; // eax@46
  PgWinSpr *v79; // eax@46
  NiProperty *v80; // ST30_4@46
  PgSprData *v81; // edi@46
  NiNode *v82; // ebx@47
  const char *v83; // eax@47
  PgSprData *v84; // ebx@47
  const char *v85; // eax@47
  const char *v86; // eax@47
  PgWinBut *v87; // eax@47
  PgWinBut *v88; // ebx@47
  PgWin *v89; // ST28_4@47
  PgFont *v90; // ST24_4@47
  unsigned int v91; // ST20_4@47
  unsigned int v92; // eax@47
  PgWinText *v93; // eax@47
  NiRefObjectVtbl *v94; // ebx@47
  PgFont *v95; // eax@47
  PgWinBut *v96; // ebx@47
  PgWin *v97; // ST28_4@47
  PgFont *v98; // ST24_4@47
  unsigned int v99; // ST20_4@47
  unsigned int v100; // eax@47
  PgWinText *v101; // eax@47
  NiRefObjectVtbl *v102; // edi@48
  NiUnsharedGeometryGroup *v103; // eax@48
  PgWinBut *v104; // eax@48
  NiRefObjectVtbl *v105; // edi@49
  NiUnsharedGeometryGroup *v106; // eax@49
  NiUnsharedGeometryGroup *v107; // ST30_4@49
  NiUnsharedGeometryGroup *v108; // eax@49
  char *v109; // eax@49
  NiRefObjectVtbl *v110; // edi@50
  NiUnsharedGeometryGroup *v111; // eax@50
  NiUnsharedGeometryGroup *v112; // eax@50
  char *v113; // eax@50
  NiRefObjectVtbl *v114; // edi@51
  NiUnsharedGeometryGroup *v115; // eax@51
  NiUnsharedGeometryGroup *v116; // eax@51
  char *v117; // eax@51
  NiRefObjectVtbl *v118; // edi@52
  NiUnsharedGeometryGroup *v119; // eax@52
  NiUnsharedGeometryGroup *v120; // eax@52
  char *v121; // eax@52
  NiRefObjectVtbl *v122; // edi@53
  NiUnsharedGeometryGroup *v123; // eax@53
  NiRefObjectVtbl *v124; // edi@53
  NiUnsharedGeometryGroup *v125; // eax@53
  char *v126; // eax@53
  NiUnsharedGeometryGroup *v127; // ST30_4@53
  NiUnsharedGeometryGroup *v128; // eax@53
  char *v129; // eax@53
  NiRefObjectVtbl *v130; // edi@54
  NiUnsharedGeometryGroup *v131; // eax@54
  NiRefObjectVtbl *v132; // edi@55
  NiUnsharedGeometryGroup *v133; // eax@55
  PgSprData *v134; // edi@58
  ColumnBut *v135; // eax@58
  NiProperty *v136; // ST30_4@58
  int v137; // ST24_4@58
  int v138; // eax@58
  PgWinProxy *v139; // eax@58
  int v140; // eax@58
  int v141; // edi@58
  int v142; // ebx@58
  char *v143; // eax@58
  NiSourceTexture *v144; // ST30_4@58
  PgSprData *v145; // eax@58
  PgWinBut *v146; // eax@58
  NiProperty *v147; // ST30_4@58
  NiSourceTexture *v148; // eax@58
  PopupMenuWin *v149; // eax@58
  int v150; // edi@58
  PopupMenuWin *v151; // ebx@58
  char *v152; // eax@65
  PopupMenuTextCheck *v153; // eax@65
  char *v154; // eax@65
  PopupMenuTextCheck *v155; // eax@65
  char *v156; // eax@65
  PopupMenuTextCheck *v157; // eax@65
  char *v158; // eax@65
  PopupMenuTextCheck *v159; // eax@65
  NiSourceTexture *v160; // eax@65
  PopupMenuWin *v161; // eax@65
  PopupMenuWin *v162; // edi@65
  PopupMenuWin *v163; // ebx@65
  int v164; // eax@72
  unsigned int v165; // ebx@72
  int v166; // edi@75
  char *v167; // eax@76
  PopupMenuText *v168; // eax@80
  NiSourceTexture *v169; // eax@82
  PopupMenuWin *v170; // eax@82
  int v171; // edi@82
  PopupMenuWin *v172; // ebx@82
  char *v173; // eax@89
  PopupMenuText *v174; // eax@89
  char *v175; // eax@89
  PopupMenuText *v176; // eax@89
  char *v177; // eax@89
  PopupMenuText *v178; // eax@89
  FrameBoxWin *v179; // edi@89
  int v180; // eax@89
  int v181; // ebx@89
  int v182; // eax@89
  PgWinProxy *v183; // eax@89
  int v184; // eax@89
  int v185; // edi@89
  int v186; // ebx@89
  PgWinBut *v187; // eax@89
  unsigned int v188; // eax@89
  PgWinBut *v189; // eax@94
  unsigned int v190; // eax@94
  PgWinBut *v191; // eax@99
  unsigned int v192; // eax@99
  NiSourceTexture *v193; // eax@105
  FrameBoxWin *v194; // eax@105
  unsigned int v195; // ST30_4@105
  unsigned int v196; // ecx@105
  unsigned int v197; // eax@105
  unsigned int v198; // ecx@105
  EditWin *v199; // eax@110
  EditWin *v200; // ecx@110
  int v201; // eax@115
  PgSprData *v202; // eax@117
  PgWinSpr *v203; // eax@117
  unsigned int v204; // eax@117
  unsigned int v205; // ecx@117
  PgSprData *v206; // eax@122
  PgWinSpr *v207; // eax@122
  NiMaterialProperty *v208; // edi@122
  PgWinSpr *v209; // ebx@122
  FrameBoxWin *v210; // edi@127
  PgFrameWork *v211; // eax@127
  void *(__thiscall *v212)(NiRefObject *, unsigned int); // edx@127
  int v213; // eax@127
  NiUnsharedGeometryGroup *v214; // eax@127
  PgWinText *v215; // ecx@127
  ChatBoardFlex *v216; // ecx@129
  NiUnsharedGeometryGroup *v217; // eax@129
  PgWinText *v218; // ecx@129
  void *(__thiscall *v219)(NiRefObject *, unsigned int); // edx@131
  int v220; // edi@131
  NiNode *v221; // esi@132
  int v222; // [sp+10h] [bp-5Ch]@131
  int v223; // [sp+14h] [bp-58h]@131
  int v224; // [sp+18h] [bp-54h]@131
  int v225; // [sp+1Ch] [bp-50h]@131
  int iPanelLeft; // [sp+20h] [bp-4Ch]@42
  unsigned int uiPanelWidth; // [sp+24h] [bp-48h]@42
  unsigned int uiEditwinWidth; // [sp+28h] [bp-44h]@11
  unsigned int uiPanelHeight; // [sp+2Ch] [bp-40h]@41
  int iPanelTop; // [sp+30h] [bp-3Ch]@41
  int _iOrgX; // [sp+34h] [bp-38h]@39
  int _iOrgY; // [sp+38h] [bp-34h]@41
  int iOrgX; // [sp+3Ch] [bp-30h]@37
  NiSourceTexture *pkTexture; // [sp+40h] [bp-2Ch]@1
  unsigned int uiHeight; // [sp+44h] [bp-28h]@37
  unsigned int uiWidth; // [sp+48h] [bp-24h]@37
  int iOrgY; // [sp+4Ch] [bp-20h]@12
  PgSprData *pkSprData; // [sp+50h] [bp-1Ch]@40
  int uiLeft; // [sp+54h] [bp-18h]@31
  int uiTop; // [sp+58h] [bp-14h]@31
  NiPointer<NiNode> spNode; // [sp+5Ch] [bp-10h]@1
  int v242; // [sp+68h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v242 = 0;
  pkTexture = MenuTexMgr::GetTexture(4u);
  if ( !pkTexture )
  {
    v3 = spNode.m_pObject;
    v242 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v4 = spNode.m_pObject == 0;
LABEL_5:
    if ( !v4 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    return 0;
  }
  v6 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v7 = Folder::Merge(&Folder::m_acMenu, "Game\\Chatting.nif");
  PgUtil::LoadNodeNifFile(v7, &spNode, v6);
  if ( !spNode.m_pObject )
    return 0;
  v8 = (NiMaterialProperty *)operator new(0x60u);
  uiEditwinWidth = (unsigned int)v8;
  LOBYTE(v242) = 1;
  if ( v8 )
  {
    NiMaterialProperty::NiMaterialProperty(v8);
    iOrgY = v9;
  }
  else
  {
    iOrgY = 0;
  }
  v10 = v2->m_spMtrlProp.m_pObject;
  LOBYTE(v242) = 0;
  if ( v10 != (NiMaterialProperty *)iOrgY )
  {
    if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    v11 = iOrgY;
    v2->m_spMtrlProp.m_pObject = (NiMaterialProperty *)iOrgY;
    if ( v11 )
      InterlockedIncrement((volatile LONG *)(v11 + 4));
  }
  v12 = v2->m_spMtrlProp.m_pObject;
  v12->m_amb.r = NiColor::WHITE.r;
  v12->m_amb.g = NiColor::WHITE.g;
  v13 = NiColor::WHITE.b;
  ++v12->m_uiRevID;
  v12->m_amb.b = v13;
  v14 = v2->m_spMtrlProp.m_pObject;
  v14->m_diff.r = NiColor::WHITE.r;
  v14->m_diff.g = NiColor::WHITE.g;
  v15 = NiColor::WHITE.b;
  ++v14->m_uiRevID;
  v14->m_diff.b = v15;
  v16 = v2->m_spMtrlProp.m_pObject;
  v16->m_emit.r = NiColor::WHITE.r;
  v16->m_emit.g = NiColor::WHITE.g;
  v17 = NiColor::WHITE.b;
  ++v16->m_uiRevID;
  v16->m_emit.b = v17;
  v18 = v2->m_spMtrlProp.m_pObject;
  ++v18->m_uiRevID;
  v18->m_fAlpha = 1.0;
  v19 = (NiMaterialProperty *)operator new(0x60u);
  uiEditwinWidth = (unsigned int)v19;
  LOBYTE(v242) = 2;
  if ( v19 )
  {
    NiMaterialProperty::NiMaterialProperty(v19);
    iOrgY = v20;
  }
  else
  {
    iOrgY = 0;
  }
  v21 = v2->m_spFixedMtrlProp.m_pObject;
  LOBYTE(v242) = 0;
  if ( v21 != (NiMaterialProperty *)iOrgY )
  {
    if ( v21 && !InterlockedDecrement((volatile LONG *)&v21->m_uiRefCount) && v21 )
      v21->vfptr->__vecDelDtor((NiRefObject *)v21, 1u);
    v22 = iOrgY;
    v2->m_spFixedMtrlProp.m_pObject = (NiMaterialProperty *)iOrgY;
    if ( v22 )
      InterlockedIncrement((volatile LONG *)(v22 + 4));
  }
  v23 = v2->m_spFixedMtrlProp.m_pObject;
  v23->m_amb.r = NiColor::WHITE.r;
  v23->m_amb.g = NiColor::WHITE.g;
  v24 = NiColor::WHITE.b;
  ++v23->m_uiRevID;
  v23->m_amb.b = v24;
  v25 = v2->m_spFixedMtrlProp.m_pObject;
  v25->m_diff.r = NiColor::WHITE.r;
  v25->m_diff.g = NiColor::WHITE.g;
  v26 = NiColor::WHITE.b;
  ++v25->m_uiRevID;
  v25->m_diff.b = v26;
  v27 = v2->m_spFixedMtrlProp.m_pObject;
  v27->m_emit.r = NiColor::WHITE.r;
  v27->m_emit.g = NiColor::WHITE.g;
  v28 = NiColor::WHITE.b;
  ++v27->m_uiRevID;
  v29 = pkTexture;
  v27->m_emit.b = v28;
  v30 = v2->m_spFixedMtrlProp.m_pObject;
  ++v30->m_uiRevID;
  v30->m_fAlpha = 1.0;
  v31 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v29);
  v32 = pkFrameWork;
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, uiLeft, uiTop, v31, 0, pkFrameWork, "ChatDisplayWin", 0) )
  {
    NiAVObject::AttachProperty((NiAVObject *)&v2->vfptr, (NiProperty *)&v2->m_spMtrlProp.m_pObject->vfptr);
    v34 = uiLeft;
    iOrgY = uiTop;
    iOrgX = uiLeft;
    if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "ChaBox", &uiLeft, &uiTop, &uiWidth, &uiHeight)
      && (v35 = uiHeight,
          v2->m_uiDefaultWidth = uiWidth,
          v2->m_uiDefaultHeight = v35,
          v36 = MenuTexMgr::GetTexture(0xBu),
          v37 = FrameBoxWin::CreateWin(v36, 7u, 7u, uiLeft - v34, uiTop - iOrgY, (PgWin *)&v2->vfptr, v32),
          v38 = uiHeight,
          v39 = uiWidth,
          v2->m_pkChattingBox = v37,
          ((void (__thiscall *)(FrameBoxWin *, unsigned int, unsigned int))v37->vfptr[135].__vecDelDtor)(v37, v39, v38),
          ((void (__stdcall *)(_DWORD))v2->m_pkChattingBox->vfptr[130].__vecDelDtor)(0),
          v2->m_pkChattingBox->m_bSizeDraggable = 1,
          ((void (__stdcall *)(signed int))v2->m_pkChattingBox->vfptr[64].__vecDelDtor)(1),
          v40 = Font::Get(0),
          (_iOrgX = (int)v40) != 0) )
    {
      v41 = v2->m_pkChattingBox;
      v41->m_iSizeDragMinWidth = 100;
      v41->m_iSizeDragMaxWidth = 800;
      v42 = v40->m_dwFontSizeInPixel;
      v43 = v2->m_pkChattingBox;
      v43->m_iSizeDragMinHeight = 4 * v42 + 8;
      v43->m_iSizeDragMaxHeight = 40 * v42 + 88;
      ((void (__stdcall *)(_DWORD))v2->m_pkChattingBox->vfptr[60].__vecDelDtor)(0);
      v44 = (NiPointer<NiD3DDefaultShader> *)v2->m_aspChatBD;
      pkSprData = (PgSprData *)4;
      do
      {
        v45 = v2->m_pkChattingBox;
        v46 = ((int (__thiscall *)(FrameBoxWin *))v45->vfptr[37].__vecDelDtor)(v2->m_pkChattingBox);
        v47 = v45->m_uiEdgeHeight;
        v48 = v2->m_pkChattingBox;
        v49 = v48->vfptr;
        _iOrgY = v46 - 2 * v47;
        v50 = ((int (__thiscall *)(FrameBoxWin *))v49[36].__vecDelDtor)(v48);
        v51 = v48->m_uiEdgeWidth;
        v52 = v2->m_pkChattingBox;
        v53 = v50 - 2 * v51;
        v54 = v2->m_pkChattingBox;
        v55 = v54->m_uiEdgeHeight;
        v56 = v54->m_uiEdgeWidth;
        iPanelTop = v55;
        uiPanelHeight = v56;
        v57 = v53;
        v58 = v55 + ((int (__thiscall *)(FrameBoxWin *))v52->vfptr[42].__vecDelDtor)(v52);
        v59 = ((int (__thiscall *)(FrameBoxWin *))v52->vfptr[41].__vecDelDtor)(v52);
        v60 = (NiD3DDefaultShader *)ChatBoardFlex::CreateWin(
                                      uiPanelHeight + v59,
                                      v58,
                                      v57,
                                      _iOrgY,
                                      (PgFont *)_iOrgX,
                                      0,
                                      (PgWin *)&v2->vfptr);
        NiPointer<PopupMenuWin>::operator=(v44, v60);
        ChatBoardFlex::SetGameFrameWork((ChatBoardFlex *)v44->m_pObject, v2->m_pkFrameWork);
        ((void (__stdcall *)(_DWORD))v44->m_pObject->vfptr[60].__vecDelDtor)(0);
        ++v44;
        pkSprData = (PgSprData *)((char *)pkSprData - 1);
      }
      while ( pkSprData );
      v61 = v2->m_pkChattingBox;
      v62 = ((int (__thiscall *)(ChatDisplayWin *))v2->vfptr[36].__vecDelDtor)(v2);
      v63 = ((int (__thiscall *)(FrameBoxWin *))v61->vfptr[36].__vecDelDtor)(v61);
      v64 = PgWinProxy::CreateWin(v62 - v63, 0, 0, 0, (PgWin *)&v2->vfptr);
      v2->m_pkLTSocketWin = v64;
      v65 = iOrgX + ((int (__thiscall *)(PgWinProxy *))v64->vfptr[41].__vecDelDtor)(v64);
      v66 = (int (*)(void))v2->m_pkLTSocketWin->vfptr[42].__vecDelDtor;
      _iOrgX = v65;
      v67 = v66();
      v68 = iOrgY + v67;
      _iOrgY = iOrgY + v67;
      v69 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
      v2->m_pkTabBtn = PgWinBut::CreateWin(
                         uiLeft - v65,
                         uiTop - v68,
                         v69,
                         (PgWin *)&v2->m_pkLTSocketWin->vfptr,
                         3u,
                         0,
                         0);
      v70 = (char *)TextData::Get(0xA2F5CBF0);
      PgWin::SetToolTipWinText((PgWin *)&v2->m_pkTabBtn->vfptr, v70);
      v2->m_pkTabBtn->m_pkToolTipWin = g_pkToolTipWin;
      pkSprData = (PgSprData *)v2->m_pkTabBtn;
      v71 = (PgWin *)pkSprData;
      v72 = Font::Get(0);
      v73 = ((int (*)(void))pkSprData->vfptr[37].__vecDelDtor)();
      v74 = ((int (*)(void))pkSprData->vfptr[36].__vecDelDtor)();
      v75 = PgWinText::CreateWin(0, 0, v74, v73, v72, v71, 0, 0);
      v2->m_pkTabText = v75;
      v75->vfptr[122].__vecDelDtor((NiRefObject *)v75, 5u);
      NiAVObject::AttachProperty(
        (NiAVObject *)&v2->m_pkTabText->vfptr,
        (NiProperty *)&v2->m_spMtrlProp.m_pObject->vfptr);
      ((void (__stdcall *)(_DWORD))v2->m_pkTabText->vfptr[60].__vecDelDtor)(0);
      pkSprData = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ChatCommandNor", &uiLeft, &uiTop, 0);
      PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "ChatCommandOver");
      PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "ChatCommandClick");
      v76 = PgWinBut::CreateWin(uiLeft - v65, uiTop - v68, pkSprData, (PgWin *)&v2->m_pkLTSocketWin->vfptr, 0xAu, 0, 0);
      v77 = (NiProperty *)&v2->m_spFixedMtrlProp.m_pObject->vfptr;
      v2->m_pkChatCommandBtn = v76;
      NiAVObject::AttachProperty((NiAVObject *)&v76->vfptr, v77);
      iPanelTop = 0;
      uiPanelHeight = 0;
      if ( !PgUtil::GetTriShapeRect(
              (NiAVObject *)&spNode.m_pObject->vfptr,
              "ChatCommandPanel",
              &iPanelLeft,
              &iPanelTop,
              &uiPanelWidth,
              &uiPanelHeight) )
        goto LABEL_138;
      v78 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ChatCommandPanel", &uiLeft, &uiTop, 0);
      v79 = PgWinSpr::CreateWin(uiLeft - v65, uiTop - v68, v78, (PgWin *)&v2->m_pkLTSocketWin->vfptr, 0, 0);
      v80 = (NiProperty *)&v2->m_spFixedMtrlProp.m_pObject->vfptr;
      v2->m_pkChatCommandSprWin = v79;
      NiAVObject::AttachProperty((NiAVObject *)&v79->vfptr, v80);
      ((void (__stdcall *)(_DWORD))v2->m_pkChatCommandSprWin->vfptr[64].__vecDelDtor)(0);
      v81 = 0;
      do
      {
        v82 = spNode.m_pObject;
        pkSprData = (PgSprData *)((char *)v81 + 1);
        v83 = fs("Chat_Cmd_Name%02d_Nor", (char *)&v81->vfptr + 1);
        v84 = PgSprData::Create((NiAVObject *)&v82->vfptr, v83, &uiLeft, &uiTop, 0);
        uiEditwinWidth = (unsigned int)spNode.m_pObject;
        v85 = fs("Chat_Cmd_Name%02d_Click", pkSprData);
        PgSprData::Add(v84, (NiAVObject *)uiEditwinWidth, v85);
        uiEditwinWidth = (unsigned int)spNode.m_pObject;
        v86 = fs("Chat_Cmd_Name%02d_Over", pkSprData);
        PgSprData::Add(v84, (NiAVObject *)uiEditwinWidth, v86);
        v87 = PgWinBut::CreateWin(
                uiLeft - _iOrgX,
                uiTop - _iOrgY,
                v84,
                (PgWin *)&v2->m_pkLTSocketWin->vfptr,
                (unsigned int)&v81->m_akGeomData.vfptr + 3,
                0,
                0);
        v2->m_pkChatCmdBut[(_DWORD)v81] = v87;
        NiAVObject::AttachProperty((NiAVObject *)&v87->vfptr, (NiProperty *)&v2->m_spFixedMtrlProp.m_pObject->vfptr);
        ((void (__stdcall *)(_DWORD))v2->m_pkChatCmdBut[(_DWORD)v81]->vfptr[64].__vecDelDtor)(0);
        v2->m_pkChatCmdBut[(_DWORD)v81]->m_pkToolTipWin = g_pkToolTipWin;
        v88 = v2->m_pkChatCmdBut[(_DWORD)v81];
        v89 = (PgWin *)&v2->m_pkChatCmdBut[(_DWORD)v81]->vfptr;
        v90 = Font::Get(0);
        v91 = ((int (__thiscall *)(PgWinBut *))v88->vfptr[37].__vecDelDtor)(v88);
        v92 = ((int (__thiscall *)(PgWinBut *))v88->vfptr[36].__vecDelDtor)(v88);
        v93 = PgWinText::CreateWin(0, 0, v92, v91, v90, v89, 0, 0);
        v2->m_pkChatCmdNameText[(_DWORD)v81] = v93;
        v93->vfptr[122].__vecDelDtor((NiRefObject *)v93, 4u);
        v94 = v2->m_pkChatCmdNameText[(_DWORD)v81]->vfptr;
        v95 = Font::Get(BOLD);
        v94[113].__vecDelDtor((NiRefObject *)v2->m_pkChatCmdNameText[(_DWORD)v81], (unsigned int)v95);
        ((void (__stdcall *)(struct D3DXCOLOR *))v2->m_pkChatCmdNameText[(_DWORD)v81]->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
        v96 = v2->m_pkChatCmdBut[(_DWORD)v81];
        v97 = (PgWin *)&v2->m_pkChatCmdBut[(_DWORD)v81]->vfptr;
        v98 = Font::Get(0);
        v99 = ((int (__thiscall *)(PgWinBut *))v96->vfptr[37].__vecDelDtor)(v96);
        v100 = ((int (__thiscall *)(PgWinBut *))v96->vfptr[36].__vecDelDtor)(v96);
        v101 = PgWinText::CreateWin(0, 0, v100, v99, v98, v97, 0, 0);
        v2->m_pkChatCmdKeyText[(_DWORD)v81] = v101;
        v101->vfptr[122].__vecDelDtor((NiRefObject *)v101, 6u);
        ((void (__stdcall *)(_DWORD))v2->m_pkChatCmdNameText[(_DWORD)v81]->vfptr[60].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkChatCmdKeyText[(_DWORD)v81]->vfptr[60].__vecDelDtor)(0);
        switch ( v81 )
        {
          case 0u:
            v102 = v2->m_pkChatCmdNameText[0]->vfptr;
            v103 = TextData::Get(0x3D421B33u);
            v102[118].__vecDelDtor((NiRefObject *)v2->m_pkChatCmdNameText[0], (unsigned int)v103);
            ((void (__stdcall *)(void *))v2->m_pkChatCmdKeyText[0]->vfptr[118].__vecDelDtor)(&unk_9B11C2);
            v104 = v2->m_pkChatCmdBut[0];
            goto LABEL_56;
          case 1u:
            v105 = v2->m_pkChatCmdNameText[1]->vfptr;
            v106 = TextData::Get(0xA1DFB4C7);
            v105[118].__vecDelDtor((NiRefObject *)v2->m_pkChatCmdNameText[1], (unsigned int)v106);
            ((void (__stdcall *)(const char *))v2->m_pkChatCmdKeyText[1]->vfptr[118].__vecDelDtor)("/w");
            v107 = TextData::Get(0x95876FE6);
            v108 = TextData::Get(0x4965747Du);
            v109 = fs("/w [%s] (%s)", v108, v107);
            PgWin::SetToolTipWinText((PgWin *)&v2->m_pkChatCmdBut[1]->vfptr, v109);
            break;
          case 2u:
            v110 = v2->m_pkChatCmdNameText[2]->vfptr;
            v111 = TextData::Get(0xEE4B1720);
            v110[118].__vecDelDtor((NiRefObject *)v2->m_pkChatCmdNameText[2], (unsigned int)v111);
            ((void (__stdcall *)(const char *))v2->m_pkChatCmdKeyText[2]->vfptr[118].__vecDelDtor)("/s");
            v112 = TextData::Get(0x95876FE6);
            v113 = fs("/s (%s)", v112);
            PgWin::SetToolTipWinText((PgWin *)&v2->m_pkChatCmdBut[2]->vfptr, v113);
            break;
          case 3u:
            v114 = v2->m_pkChatCmdNameText[3]->vfptr;
            v115 = TextData::Get(0x374D0E99u);
            v114[118].__vecDelDtor((NiRefObject *)v2->m_pkChatCmdNameText[3], (unsigned int)v115);
            ((void (__stdcall *)(const char *))v2->m_pkChatCmdKeyText[3]->vfptr[118].__vecDelDtor)("/p");
            v116 = TextData::Get(0x95876FE6);
            v117 = fs("/p (%s)", v116);
            PgWin::SetToolTipWinText((PgWin *)&v2->m_pkChatCmdBut[3]->vfptr, v117);
            break;
          case 4u:
            v118 = v2->m_pkChatCmdNameText[4]->vfptr;
            v119 = TextData::Get(0x2F44227Bu);
            v118[118].__vecDelDtor((NiRefObject *)v2->m_pkChatCmdNameText[4], (unsigned int)v119);
            ((void (__stdcall *)(const char *))v2->m_pkChatCmdKeyText[4]->vfptr[118].__vecDelDtor)("/g");
            v120 = TextData::Get(0x95876FE6);
            v121 = fs("/g (%s)", v120);
            PgWin::SetToolTipWinText((PgWin *)&v2->m_pkChatCmdBut[4]->vfptr, v121);
            break;
          case 5u:
            v122 = v2->m_pkChatCmdNameText[5]->vfptr;
            v123 = TextData::Get(0x353D9AAAu);
            v122[118].__vecDelDtor((NiRefObject *)v2->m_pkChatCmdNameText[5], (unsigned int)v123);
            v124 = v2->m_pkChatCmdKeyText[5]->vfptr;
            v125 = TextData::Get(0x43706657u);
            v126 = fs(off_9B12C8, v125);
            v124[118].__vecDelDtor((NiRefObject *)v2->m_pkChatCmdKeyText[5], (unsigned int)v126);
            v127 = TextData::Get(0x9D8CC0C7);
            v128 = TextData::Get(0x43706657u);
            v129 = fs("/%s (%s)", v128, v127);
            PgWin::SetToolTipWinText((PgWin *)&v2->m_pkChatCmdBut[5]->vfptr, v129);
            break;
          case 6u:
            v130 = v2->m_pkChatCmdNameText[6]->vfptr;
            v131 = TextData::Get(0xEE03CF47);
            v130[118].__vecDelDtor((NiRefObject *)v2->m_pkChatCmdNameText[6], (unsigned int)v131);
            ((void (__stdcall *)(const char *))v2->m_pkChatCmdKeyText[6]->vfptr[118].__vecDelDtor)("/r");
            PgWin::SetToolTipWinText((PgWin *)&v2->m_pkChatCmdBut[6]->vfptr, "/r (´ëÈ­³»¿ë)");
            v104 = v2->m_pkChatCmdBut[6];
            goto LABEL_56;
          case 7u:
            v132 = v2->m_pkChatCmdNameText[7]->vfptr;
            v133 = TextData::Get(0xF650262A);
            v132[118].__vecDelDtor((NiRefObject *)v2->m_pkChatCmdNameText[7], (unsigned int)v133);
            v104 = v2->m_pkChatCmdBut[7];
LABEL_56:
            v104->m_pkToolTipWin = 0;
            break;
          default:
            break;
        }
        v81 = pkSprData;
      }
      while ( (signed int)pkSprData < 8 );
      v134 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "UnlockNor", &uiLeft, &uiTop, pkTexture);
      PgSprData::Add(v134, (NiAVObject *)&spNode.m_pObject->vfptr, "lockNor");
      v135 = ColumnBut::CreateWin(uiLeft - _iOrgX, uiTop - _iOrgY, v134, (PgWin *)&v2->m_pkLTSocketWin->vfptr, 0x13u, 0);
      v136 = (NiProperty *)&v2->m_spFixedMtrlProp.m_pObject->vfptr;
      v2->m_pkCheckBox = v135;
      NiAVObject::AttachProperty((NiAVObject *)&v135->vfptr, v136);
      v137 = ((int (*)(void))v2->m_pkChattingBox->vfptr[37].__vecDelDtor)();
      v138 = ((int (__thiscall *)(ChatDisplayWin *))v2->vfptr[36].__vecDelDtor)(v2);
      v139 = PgWinProxy::CreateWin(v138, v137, 0, 0, (PgWin *)&v2->vfptr);
      v2->m_pkRBSocketWin = v139;
      v140 = ((int (__thiscall *)(PgWinProxy *))v139->vfptr[41].__vecDelDtor)(v139);
      v141 = iOrgX + v140;
      v142 = iOrgY + ((int (*)(void))v2->m_pkRBSocketWin->vfptr[42].__vecDelDtor)();
      pkSprData = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "FillterNor", &uiLeft, &uiTop, 0);
      PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "FillterOver");
      PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "FillterClick");
      v2->m_pkFilterBtn = PgWinBut::CreateWin(
                            uiLeft - v141,
                            uiTop - v142,
                            pkSprData,
                            (PgWin *)&v2->m_pkRBSocketWin->vfptr,
                            8u,
                            0,
                            0);
      v143 = (char *)TextData::Get(0xF6FF2527);
      PgWin::SetToolTipWinText((PgWin *)&v2->m_pkFilterBtn->vfptr, v143);
      v144 = pkTexture;
      v2->m_pkFilterBtn->m_pkToolTipWin = g_pkToolTipWin;
      v145 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Emoticon", &uiLeft, &uiTop, v144);
      v146 = PgWinBut::CreateWin(uiLeft - iOrgX, uiTop - iOrgY, v145, (PgWin *)&v2->vfptr, 0, 0, 0);
      v147 = (NiProperty *)&v2->m_spFixedMtrlProp.m_pObject->vfptr;
      v2->m_pkEmoticonBtn = v146;
      NiAVObject::AttachProperty((NiAVObject *)&v146->vfptr, v147);
      ((void (__stdcall *)(_DWORD))v2->m_pkEmoticonBtn->vfptr[64].__vecDelDtor)(0);
      v148 = MenuTexMgr::GetTexture(1u);
      v149 = PopupMenuWin::CreateWin(v148, 4u, 4u, 0);
      v150 = (int)v2->m_spChatFilterPopupMenu.m_pObject;
      v151 = v149;
      if ( (PopupMenuWin *)v150 != v149 )
      {
        if ( v150 && !InterlockedDecrement((volatile LONG *)(v150 + 4)) && v150 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v150)(v150, 1);
        v2->m_spChatFilterPopupMenu.m_pObject = v151;
        if ( v151 )
          InterlockedIncrement((volatile LONG *)&v151->m_uiRefCount);
      }
      v2->m_spChatFilterPopupMenu.m_pObject->vfptr->SetMsgHooker(
        &v2->m_spChatFilterPopupMenu.m_pObject->vfptr,
        &v2->vfptr);
      PopupMenuWin::Clear(v2->m_spChatFilterPopupMenu.m_pObject);
      v152 = (char *)TextData::Get(0xEF05252B);
      v153 = PopupMenuTextCheck::CreateWin(v152, 0, 0, 0, 0, 0);
      v153->m_ePopupMenuID = 17;
      PopupMenuWin::AddMenu(v2->m_spChatFilterPopupMenu.m_pObject, v150, (PopupMenu *)&v153->vfptr);
      v154 = (char *)TextData::Get(0xF54E1743);
      v155 = PopupMenuTextCheck::CreateWin(v154, 0, 0, 0, 0, 0);
      v155->m_ePopupMenuID = 18;
      PopupMenuWin::AddMenu(v2->m_spChatFilterPopupMenu.m_pObject, v150, (PopupMenu *)&v155->vfptr);
      v156 = (char *)TextData::Get(0xF605CB45);
      v157 = PopupMenuTextCheck::CreateWin(v156, 0, 0, 0, 0, 0);
      v157->m_ePopupMenuID = 19;
      PopupMenuWin::AddMenu(v2->m_spChatFilterPopupMenu.m_pObject, v150, (PopupMenu *)&v157->vfptr);
      v158 = (char *)TextData::Get(0xEEFCDF27);
      v159 = PopupMenuTextCheck::CreateWin(v158, 0, 0, 0, 0, 0);
      v159->m_ePopupMenuID = 20;
      PopupMenuWin::AddMenu(v2->m_spChatFilterPopupMenu.m_pObject, v150, (PopupMenu *)&v159->vfptr);
      PopupMenuWin::FinishMenu(v2->m_spChatFilterPopupMenu.m_pObject, 0);
      ((void (__stdcall *)(_DWORD))v2->m_spChatFilterPopupMenu.m_pObject->vfptr[64].__vecDelDtor)(0);
      v160 = MenuTexMgr::GetTexture(1u);
      v161 = PopupMenuWin::CreateWin(v160, 4u, 4u, 0);
      v162 = v2->m_spChatPopupMenu.m_pObject;
      v163 = v161;
      if ( v162 != v161 )
      {
        if ( v162 && !InterlockedDecrement((volatile LONG *)&v162->m_uiRefCount) && v162 )
          v162->vfptr->__vecDelDtor((NiRefObject *)v162, 1u);
        v2->m_spChatPopupMenu.m_pObject = v163;
        if ( v163 )
          InterlockedIncrement((volatile LONG *)&v163->m_uiRefCount);
      }
      v2->m_spChatPopupMenu.m_pObject->vfptr->SetMsgHooker(&v2->m_spChatPopupMenu.m_pObject->vfptr, &v2->vfptr);
      PopupMenuWin::Clear(v2->m_spChatPopupMenu.m_pObject);
      v164 = *(_DWORD *)(ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable + 56);
      v165 = 0;
      if ( v164 )
        pkSprData = *(PgSprData **)(v164 + 40);
      else
        pkSprData = 0;
      v166 = 0;
      if ( (unsigned int)pkSprData > 0 )
      {
        do
        {
          v167 = CDataReader::GetRecord(
                   (CDataReader *)(ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable + 4),
                   v165);
          if ( !v167 )
            break;
          if ( *(_WORD *)(v167 + 65) == -1 && v166 < 17 && *(_DWORD *)(v167 + 101) == 1 )
          {
            v168 = PopupMenuText::CreateWin(v167 + 33, 0, 0, 0, 0, 0, 0);
            v168->m_ePopupMenuID = v166 + 62;
            PopupMenuWin::AddMenu(v2->m_spChatPopupMenu.m_pObject, v166++, (PopupMenu *)&v168->vfptr);
          }
          ++v165;
        }
        while ( v165 < (unsigned int)pkSprData );
      }
      PopupMenuWin::FinishMenu(v2->m_spChatPopupMenu.m_pObject, 0);
      ((void (__stdcall *)(_DWORD))v2->m_spChatPopupMenu.m_pObject->vfptr[64].__vecDelDtor)(0);
      v169 = MenuTexMgr::GetTexture(1u);
      v170 = PopupMenuWin::CreateWin(v169, 4u, 4u, 0);
      v171 = (int)v2->m_spChatModePopupMenu.m_pObject;
      v172 = v170;
      if ( (PopupMenuWin *)v171 != v170 )
      {
        if ( v171 && !InterlockedDecrement((volatile LONG *)(v171 + 4)) && v171 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v171)(v171, 1);
        v2->m_spChatModePopupMenu.m_pObject = v172;
        if ( v172 )
          InterlockedIncrement((volatile LONG *)&v172->m_uiRefCount);
      }
      ((void (__thiscall *)(IDirectMessengerVtbl **))v2->m_spChatModePopupMenu.m_pObject->vfptr->SetMsgHooker)(&v2->m_spChatModePopupMenu.m_pObject->vfptr);
      PopupMenuWin::Clear(v2->m_spChatModePopupMenu.m_pObject);
      v173 = (char *)TextData::Get(0xEF05252B);
      v174 = PopupMenuText::CreateWin(v173, 0, 0, 0, 0, 0, 0);
      v174->m_ePopupMenuID = 27;
      PopupMenuWin::AddMenu(v2->m_spChatModePopupMenu.m_pObject, v171, (PopupMenu *)&v174->vfptr);
      v175 = (char *)TextData::Get(0xF605CB45);
      v176 = PopupMenuText::CreateWin(v175, 0, 0, 0, 0, 0, 0);
      v176->m_ePopupMenuID = 28;
      PopupMenuWin::AddMenu(v2->m_spChatModePopupMenu.m_pObject, v171, (PopupMenu *)&v176->vfptr);
      v177 = (char *)TextData::Get(0xEEFCDF27);
      v178 = PopupMenuText::CreateWin(v177, 0, 0, 0, 0, 0, 0);
      v178->m_ePopupMenuID = 29;
      PopupMenuWin::AddMenu(v2->m_spChatModePopupMenu.m_pObject, v171, (PopupMenu *)&v178->vfptr);
      PopupMenuWin::FinishMenu(v2->m_spChatModePopupMenu.m_pObject, 0);
      ((void (__stdcall *)(_DWORD))v2->m_spChatModePopupMenu.m_pObject->vfptr[64].__vecDelDtor)(0);
      v179 = v2->m_pkChattingBox;
      v180 = ((int (__thiscall *)(FrameBoxWin *))v179->vfptr[37].__vecDelDtor)(v2->m_pkChattingBox);
      v181 = (int)v2->vfptr[36].__vecDelDtor((NiRefObject *)v2, v180);
      v182 = ((int (__thiscall *)(FrameBoxWin *))v179->vfptr[36].__vecDelDtor)(v179);
      v183 = PgWinProxy::CreateWin(v181 - v182, 0, 0, (unsigned int)v2, (PgWin *)&v2->vfptr);
      v2->m_pkLBSocketWin = v183;
      v184 = ((int (__thiscall *)(PgWinProxy *))v183->vfptr[41].__vecDelDtor)(v183);
      v185 = iOrgX + v184;
      v186 = iOrgY + ((int (*)(void))v2->m_pkLBSocketWin->vfptr[42].__vecDelDtor)();
      pkSprData = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PreUpNor", &uiLeft, &uiTop, 0);
      PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "PreUpOver");
      PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "PreUpClick");
      v187 = PgWinBut::CreateWin(uiLeft - v185, uiTop - v186, pkSprData, (PgWin *)&v2->m_pkLBSocketWin->vfptr, 0, 0, 0);
      uiPanelHeight = (unsigned int)v187;
      v2->m_pkScrollUpBtn = v187;
      v188 = (unsigned int)v2->m_spFixedMtrlProp.m_pObject;
      iOrgX = v188;
      uiEditwinWidth = v188;
      if ( v188 )
        InterlockedIncrement((volatile LONG *)(v188 + 4));
      LOBYTE(v242) = 3;
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(uiPanelHeight + 156),
        (NiPointer<NiRoom> *)&uiEditwinWidth);
      LOBYTE(v242) = 0;
      if ( iOrgX && !InterlockedDecrement((volatile LONG *)(iOrgX + 4)) )
        (**(void (__stdcall ***)(_DWORD))iOrgX)(1);
      pkSprData = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NextDownNor", &uiLeft, &uiTop, 0);
      PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "NextDownOver");
      PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "NextDownClick");
      v189 = PgWinBut::CreateWin(uiLeft - v185, uiTop - v186, pkSprData, (PgWin *)&v2->m_pkLBSocketWin->vfptr, 1u, 0, 0);
      uiPanelHeight = (unsigned int)v189;
      v2->m_pkScrollDnBtn = v189;
      v190 = (unsigned int)v2->m_spFixedMtrlProp.m_pObject;
      iOrgX = v190;
      uiEditwinWidth = v190;
      if ( v190 )
        InterlockedIncrement((volatile LONG *)(v190 + 4));
      LOBYTE(v242) = 4;
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(uiPanelHeight + 156),
        (NiPointer<NiRoom> *)&uiEditwinWidth);
      LOBYTE(v242) = 0;
      if ( iOrgX && !InterlockedDecrement((volatile LONG *)(iOrgX + 4)) )
        (**(void (__stdcall ***)(_DWORD))iOrgX)(1);
      pkSprData = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "DownNor", &uiLeft, &uiTop, 0);
      PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "DownOver");
      PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, "DownClick");
      v191 = PgWinBut::CreateWin(uiLeft - v185, uiTop - v186, pkSprData, (PgWin *)&v2->m_pkLBSocketWin->vfptr, 2u, 0, 0);
      uiPanelHeight = (unsigned int)v191;
      v2->m_pkScrollMostDnBtn = v191;
      v192 = (unsigned int)v2->m_spFixedMtrlProp.m_pObject;
      iOrgX = v192;
      uiEditwinWidth = v192;
      if ( v192 )
        InterlockedIncrement((volatile LONG *)(v192 + 4));
      LOBYTE(v242) = 5;
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(uiPanelHeight + 156),
        (NiPointer<NiRoom> *)&uiEditwinWidth);
      LOBYTE(v242) = 0;
      if ( iOrgX && !InterlockedDecrement((volatile LONG *)(iOrgX + 4)) )
        (**(void (__stdcall ***)(_DWORD))iOrgX)(1);
      if ( !PgUtil::GetTriShapeRect(
              (NiAVObject *)&spNode.m_pObject->vfptr,
              "ChaMsgView",
              &uiLeft,
              &uiTop,
              &uiWidth,
              &uiHeight) )
      {
LABEL_138:
        v3 = spNode.m_pObject;
        v242 = -1;
        if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
          return 0;
        v4 = v3 == 0;
        goto LABEL_5;
      }
      v193 = MenuTexMgr::GetTexture(0xBu);
      v194 = FrameBoxWin::CreateWin(
               v193,
               7u,
               7u,
               uiLeft - v185,
               uiTop - v186,
               (PgWin *)&v2->m_pkLBSocketWin->vfptr,
               pkFrameWork);
      v195 = uiHeight;
      v196 = uiWidth;
      v2->m_pkChatEditBox = v194;
      ((void (__thiscall *)(FrameBoxWin *, unsigned int, unsigned int))v194->vfptr[135].__vecDelDtor)(v194, v196, v195);
      ((void (__stdcall *)(_DWORD))v2->m_pkChatEditBox->vfptr[130].__vecDelDtor)(0);
      v2->m_pkChatEditBox->m_bSizeDraggable = 0;
      ((void (__stdcall *)(_DWORD))v2->m_pkChatEditBox->vfptr[64].__vecDelDtor)(0);
      v197 = (unsigned int)v2->m_spFixedMtrlProp.m_pObject;
      v198 = (unsigned int)v2->m_pkChatEditBox;
      pkFrameWork = (PgFrameWork *)v197;
      uiPanelHeight = v198;
      uiEditwinWidth = v197;
      if ( v197 )
        InterlockedIncrement((volatile LONG *)(v197 + 4));
      LOBYTE(v242) = 6;
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(uiPanelHeight + 156),
        (NiPointer<NiRoom> *)&uiEditwinWidth);
      LOBYTE(v242) = 0;
      if ( pkFrameWork && !InterlockedDecrement((volatile LONG *)&pkFrameWork->m_pkMsgHooker) )
        ((void (__stdcall *)(signed int))pkFrameWork->vfptr->SetMsgHooker)(1);
      ((void (__stdcall *)(_DWORD))v2->m_pkChatEditBox->vfptr[60].__vecDelDtor)(0);
      uiEditwinWidth = uiWidth - 4;
      pkFrameWork = (PgFrameWork *)(uiHeight - 1);
      v199 = EditWin::CreateWin(
               uiLeft - v185 + 4,
               uiTop - v186 + 6,
               uiWidth - 4,
               uiHeight - 1,
               (PgWin *)&v2->m_pkLBSocketWin->vfptr,
               NORMAL,
               0x80u,
               1u,
               1,
               0,
               0);
      v200 = v2->m_spEdit.m_pObject;
      _iOrgX = (int)v199;
      pkFrameWork = (PgFrameWork *)v200;
      if ( v200 != v199 )
      {
        if ( v200 && !InterlockedDecrement((volatile LONG *)&v200->m_uiRefCount) && pkFrameWork )
          ((void (__stdcall *)(signed int))pkFrameWork->vfptr->SetMsgHooker)(1);
        v201 = _iOrgX;
        v2->m_spEdit.m_pObject = (EditWin *)_iOrgX;
        if ( v201 )
          InterlockedIncrement((volatile LONG *)(v201 + 4));
      }
      EditWin::SetImeStatus(v2->m_spEdit.m_pObject, IS_KOREAN);
      ((void (__stdcall *)(_DWORD))v2->m_spEdit.m_pObject->vfptr[60].__vecDelDtor)(0);
      v202 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ChaK", &uiLeft, &uiTop, pkTexture);
      v203 = PgWinSpr::CreateWin(uiLeft - v185, uiTop - v186, v202, (PgWin *)&v2->m_pkLBSocketWin->vfptr, 0, 0);
      v2->m_pkChatKorMode = v203;
      v203->vfptr[64].__vecDelDtor((NiRefObject *)v203, 0);
      v204 = (unsigned int)v2->m_spFixedMtrlProp.m_pObject;
      v205 = (unsigned int)v2->m_pkChatKorMode;
      pkFrameWork = (PgFrameWork *)v204;
      uiPanelHeight = v205;
      uiEditwinWidth = v204;
      if ( v204 )
        InterlockedIncrement((volatile LONG *)(v204 + 4));
      LOBYTE(v242) = 7;
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(uiPanelHeight + 156),
        (NiPointer<NiRoom> *)&uiEditwinWidth);
      LOBYTE(v242) = 0;
      if ( pkFrameWork && !InterlockedDecrement((volatile LONG *)&pkFrameWork->m_pkMsgHooker) )
        ((void (__stdcall *)(_DWORD))pkFrameWork->vfptr->SetMsgHooker)(1);
      v206 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ChaE", &uiLeft, &uiTop, pkTexture);
      v207 = PgWinSpr::CreateWin(uiLeft - v185, uiTop - v186, v206, (PgWin *)&v2->m_pkLBSocketWin->vfptr, 0, 0);
      v2->m_pkChatEngMode = v207;
      v207->vfptr[64].__vecDelDtor((NiRefObject *)v207, 0);
      v208 = v2->m_spFixedMtrlProp.m_pObject;
      v209 = v2->m_pkChatEngMode;
      pkFrameWork = (PgFrameWork *)v208;
      if ( v208 )
        InterlockedIncrement((volatile LONG *)&v208->m_uiRefCount);
      LOBYTE(v242) = 8;
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v209->m_kPropertyList,
        (NiPointer<NiRoom> *)&pkFrameWork);
      LOBYTE(v242) = 0;
      if ( v208 && !InterlockedDecrement((volatile LONG *)&v208->m_uiRefCount) )
        v208->vfptr->__vecDelDtor((NiRefObject *)v208, 1u);
      v210 = v2->m_pkChattingBox;
      v211 = (PgFrameWork *)((int (*)(void))v2->m_pkChatEditBox->vfptr[36].__vecDelDtor)();
      v212 = v210->vfptr[36].__vecDelDtor;
      pkFrameWork = v211;
      v213 = ((int (__thiscall *)(FrameBoxWin *))v212)(v210);
      v2->m_uiChattingBoxWidthMinusEditBoxWidth = v213 - (_DWORD)pkFrameWork;
      v2->m_uiChatMode = 0;
      v214 = TextData::Get(0xEF05252B);
      v215 = v2->m_pkTabText;
      if ( v215 )
        ((void (__stdcall *)(NiUnsharedGeometryGroup *))v215->vfptr[118].__vecDelDtor)(v214);
      v216 = v2->m_aspChatBD[0].m_pObject;
      v2->m_pkActiveChatBD = v216;
      ChatBoardFlex::SetSystemWindow(v216, 1);
      v2->m_uiActiveChatBoardIndex = 0;
      v217 = TextData::Get(0xEF05252B);
      v218 = v2->m_pkTabText;
      if ( v218 )
        ((void (__stdcall *)(NiUnsharedGeometryGroup *))v218->vfptr[118].__vecDelDtor)(v217);
      v219 = v2->vfptr[52].__vecDelDtor;
      v220 = PgWin::ms_uiScreenWidth;
      pkFrameWork = (PgFrameWork *)PgWin::ms_uiScreenHeight;
      v222 = 0;
      v223 = 0;
      v224 = 0;
      v225 = 0;
      v219((NiRefObject *)&v2->vfptr, (unsigned int)&v222);
      iPanelLeft = v220;
      ((void (__thiscall *)(ChatDisplayWin *, signed int, signed int))v2->vfptr[77].__vecDelDtor)(
        v2,
        (signed int)((double)(unsigned int)v220 * 0.0 - (double)v222),
        (signed int)((double)(unsigned int)pkFrameWork * 0.800000011920929));
      v242 = -1;
      if ( spNode.m_pObject )
      {
        v221 = spNode.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
        {
          if ( v221 )
            v221->vfptr->__vecDelDtor((NiRefObject *)v221, 1u);
        }
      }
      result = 1;
    }
    else
    {
      v242 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 0;
    }
  }
  else
  {
    v33 = spNode.m_pObject;
    v242 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v33 )
      v33->vfptr->__vecDelDtor((NiRefObject *)v33, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A7D11C: using guessed type const struct NiColor NiColor::WHITE;
// A8975C: using guessed type bool Folder::m_bInit;
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;

//----- (005E7270) --------------------------------------------------------
void __thiscall ChatDisplayWin::OnCommand(ChatDisplayWin *this, unsigned int wParam, int lParam)
{
  ChatDisplayWin *v3; // esi@1
  ChatBoardFlex *v4; // ecx@7
  NiUnsharedGeometryGroup *v5; // eax@7
  PgWinText *v6; // ecx@8
  ChatBoardFlex *v7; // ecx@10
  ChatBoardFlex *v8; // ecx@11
  ChatBoardFlex *v9; // ecx@12
  NiUnsharedGeometryGroup *v10; // eax@20
  const char *v11; // eax@20

  v3 = this;
  switch ( wParam )
  {
    case 0u:
      ChatBoardFlex::ViewLineUp(this->m_pkActiveChatBD);
      return;
    case 1u:
      ChatBoardFlex::ViewLineDown(this->m_pkActiveChatBD);
      return;
    case 2u:
      ChatBoardFlex::ViewLineMostDown(this->m_pkActiveChatBD);
      return;
    case 0xAu:
      ChatDisplayWin::OnChatCommand(this);
      return;
    case 3u:
      ChatDisplayWin::OnTab(this);
      return;
    case 4u:
      v4 = this->m_aspChatBD[0].m_pObject;
      v3->m_pkActiveChatBD = v4;
      ChatBoardFlex::SetSystemWindow(v4, 1);
      v3->m_uiActiveChatBoardIndex = 0;
      v5 = TextData::Get(0xEF05252B);
      goto LABEL_8;
    case 5u:
      v7 = this->m_aspChatBD[1].m_pObject;
      v3->m_pkActiveChatBD = v7;
      ChatBoardFlex::SetSystemWindow(v7, 1);
      v3->m_uiActiveChatBoardIndex = 1;
      v5 = TextData::Get(0xF54E1743);
      goto LABEL_8;
    case 6u:
      v8 = this->m_aspChatBD[2].m_pObject;
      v3->m_pkActiveChatBD = v8;
      ChatBoardFlex::SetSystemWindow(v8, 1);
      v3->m_uiActiveChatBoardIndex = 2;
      v5 = TextData::Get(0xF605CB45);
      goto LABEL_8;
    case 7u:
      v9 = this->m_aspChatBD[3].m_pObject;
      v3->m_pkActiveChatBD = v9;
      ChatBoardFlex::SetSystemWindow(v9, 1);
      v3->m_uiActiveChatBoardIndex = 3;
      v5 = TextData::Get(0xEEFCDF27);
LABEL_8:
      v6 = v3->m_pkTabText;
      if ( v6 )
        ((void (__stdcall *)(_DWORD))v6->vfptr[118].__vecDelDtor)(v5);
      break;
    case 8u:
      ((void (__stdcall *)(_DWORD, _DWORD))this->m_spChatFilterPopupMenu.m_pObject->vfptr[77].__vecDelDtor)(
        PgWin::ms_iMsX,
        PgWin::ms_iMsY);
      PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v3->m_spChatFilterPopupMenu.m_pObject->vfptr);
      break;
    case 9u:
      GameFrameWork::OpenReportWin((GameFrameWork *)this->m_pkFrameWork);
      break;
    case 0xBu:
      ChatDisplayWin::ChatStart(this, &byte_9B11C3);
      break;
    case 0xCu:
      ChatDisplayWin::ChatStart(this, "/w ");
      break;
    case 0xDu:
      ChatDisplayWin::ChatStart(this, "/s ");
      break;
    case 0xEu:
      ChatDisplayWin::ChatStart(this, "/p ");
      break;
    case 0xFu:
      ChatDisplayWin::ChatStart(this, "/g ");
      break;
    case 0x10u:
      v10 = TextData::Get(0x43706657u);
      v11 = fs("/%s ", v10);
      ChatDisplayWin::ChatStart(v3, v11);
      break;
    case 0x11u:
      ChatDisplayWin::ChatStart(this, "/r ");
      break;
    case 0x12u:
      ((void (__stdcall *)(_DWORD, _DWORD))this->m_spChatPopupMenu.m_pObject->vfptr[77].__vecDelDtor)(
        PgWin::ms_iMsX,
        PgWin::ms_iMsY);
      PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v3->m_spChatPopupMenu.m_pObject->vfptr);
      break;
    case 0x13u:
      this->m_pkCheckBox->m_bCheck = this->m_pkCheckBox->m_bCheck == 0;
      ((void (__stdcall *)(_DWORD))this->vfptr[130].__vecDelDtor)(this->m_pkCheckBox->m_bCheck == 0);
      v3->m_pkChattingBox->m_bLock = v3->m_pkCheckBox->m_bCheck;
      break;
    default:
      return;
  }
}

//----- (005E7520) --------------------------------------------------------
void __thiscall ChatDisplayWin::DirectMessage(ChatDisplayWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  ChatDisplayWin *v4; // esi@1
  NiTListItem<NiPointer<NiProperty> > *v5; // eax@2
  IDirectMessenger *v6; // eax@3
  int v7; // eax@6
  IDirectMessenger **v8; // ecx@6
  int v9; // eax@6
  int v10; // eax@8
  NiTListItem<NiPointer<NiProperty> > *v11; // ecx@8
  NiTListItem<NiPointer<NiProperty> > *v12; // edi@8
  int v13; // eax@8
  int v14; // edi@9
  NiTListItem<NiPointer<NiProperty> > *v15; // eax@10
  NiTListItem<NiPointer<NiProperty> > *v16; // ebx@10
  _DWORD *v17; // ST3C_4@10
  void (__thiscall **v18)(_DWORD, _DWORD); // ST38_4@10
  int v19; // eax@10
  int v20; // eax@10
  NiRefObjectVtbl **v21; // eax@11
  NiRefObjectVtbl *v22; // edi@12
  NiTListItem<NiPointer<NiProperty> > *v23; // ebx@12
  int v24; // eax@12
  int *v25; // eax@13
  int v26; // edi@14
  NiTListItem<NiPointer<NiProperty> > *v27; // ebx@14
  int v28; // eax@14
  int *v29; // eax@15
  int v30; // edi@16
  int v31; // eax@16
  int *v32; // eax@17
  int v33; // edi@18
  int v34; // eax@18
  int *v35; // eax@19
  int v36; // edi@20
  int v37; // eax@20
  NiTListItem<NiPointer<NiProperty> > *v38; // ecx@21
  NiTListItem<NiPointer<NiProperty> > *v39; // edi@22
  NiTListItem<NiPointer<NiProperty> > *v40; // ebx@22
  int v41; // eax@22
  int v42; // eax@22
  void (__thiscall **v43)(IDirectMessenger *, IDirectMessenger *); // ebx@22
  void (__thiscall *v44)(IDirectMessenger *, IDirectMessenger *); // edi@22
  int v45; // eax@22
  void (__thiscall **v46)(IDirectMessenger *, IDirectMessenger *); // ebx@22
  void (__thiscall *v47)(IDirectMessenger *, IDirectMessenger *); // edi@22
  int v48; // eax@22
  NiTListItem<NiPointer<NiProperty> > *v49; // edi@22
  void (__thiscall *v50)(IDirectMessenger *, IDirectMessenger *); // ebx@22
  int v51; // eax@22
  int v52; // eax@22
  NiRefObjectVtbl *v53; // edi@24
  int v54; // eax@24
  NiTListItem<NiPointer<NiProperty> > *v55; // eax@25
  IDirectMessenger *v56; // eax@26
  NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> >Vtbl *v57; // eax@29
  IDirectMessenger *v58; // eax@30
  unsigned int v59; // eax@33
  IDirectMessenger *v60; // eax@34
  NiPointer<NiAVObject> *v61; // eax@38
  IDirectMessenger *v62; // eax@39
  NiTListItem<NiPointer<NiProperty> > *v63; // eax@43
  IDirectMessenger *v64; // eax@44
  NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> >Vtbl *v65; // eax@47
  IDirectMessenger *v66; // eax@48
  unsigned int v67; // eax@52
  IDirectMessenger *v68; // eax@53
  NiPointer<NiAVObject> *v69; // eax@57
  IDirectMessenger *v70; // eax@58
  signed int v71; // edi@62
  NiUnsharedGeometryGroup *v72; // eax@68
  int v73; // ecx@68
  ActionWin *v74; // ecx@72
  float v75; // esi@74
  unsigned int uiHeight; // [sp+30h] [bp-10h]@6
  unsigned int uiWidth; // [sp+34h] [bp-Ch]@6
  int iMsgTaga; // [sp+48h] [bp+8h]@10
  char *pvBodya; // [sp+4Ch] [bp+Ch]@10
  IDirectMessenger *pkFromb; // [sp+50h] [bp+10h]@6
  IDirectMessenger *pkFromc; // [sp+50h] [bp+10h]@6
  IDirectMessenger *pkFromd; // [sp+50h] [bp+10h]@8
  IDirectMessenger *pkFroma; // [sp+50h] [bp+10h]@9
  IDirectMessenger *pkFrome; // [sp+50h] [bp+10h]@12
  IDirectMessenger *pkFromf; // [sp+50h] [bp+10h]@14
  IDirectMessenger *pkFromg; // [sp+50h] [bp+10h]@22

  v4 = this;
  switch ( iMsgTag )
  {
    case 14:
      v5 = this->m_kPropertyList.m_pkHead;
      if ( v5 )
        v6 = (IDirectMessenger *)&v5[19].m_pkPrev;
      else
        v6 = 0;
      if ( pkFrom == v6 )
      {
        pkFromb = (IDirectMessenger *)this[-1].m_pkActiveChatBD;
        v7 = ((int (__thiscall *)(ChatBoardFlex **))pkFromb[14].vfptr)(&this[-1].m_pkActiveChatBD);
        ((void (__thiscall *)(ChatBoardFlex **, int))pkFromb[14].m_uiMessageNum)(
          &v4[-1].m_pkActiveChatBD,
          *((_DWORD *)pvBody + 1) + v7);
        v8 = (IDirectMessenger **)v4->m_kPropertyList.m_pkHead;
        pkFromc = *v8;
        v9 = ((int (*)(void))(*v8)[13].m_uiMessageNum)();
        ((void (__thiscall *)(NiTListItem<NiPointer<NiProperty> > *, int))pkFromc[14].m_pkMsgHooker)(
          v4->m_kPropertyList.m_pkHead,
          *(_DWORD *)pvBody + v9);
        uiWidth = FrameBoxWin::GetClientWidth((FrameBoxWin *)v4->m_kPropertyList.m_pkHead);
        uiHeight = FrameBoxWin::GetClientHeight((FrameBoxWin *)v4->m_kPropertyList.m_pkHead);
        if ( *((_DWORD *)pvBody + 2) && !*(_DWORD *)pvBody )
        {
          pkFromd = (IDirectMessenger *)v4[-1].m_pkActiveChatBD;
          v10 = ((int (__thiscall *)(ChatBoardFlex **))v4[-1].m_pkActiveChatBD->m_kPropertyList.m_pkTail)(&v4[-1].m_pkActiveChatBD);
          ((void (__thiscall *)(ChatBoardFlex **, int))pkFromd[14].m_pkMsgHooker)(
            &v4[-1].m_pkActiveChatBD,
            *((_DWORD *)pvBody + 2) + v10);
          v11 = v4->m_kPropertyList.m_pkHead;
          v12 = v11->m_pkNext;
          v13 = ((int (*)(void))v11->m_pkNext[13].m_element.m_pObject)();
          ((void (__thiscall *)(NiTListItem<NiPointer<NiProperty> > *, int))v12[14].m_pkPrev)(
            v4->m_kPropertyList.m_pkHead,
            v13 - *((_DWORD *)pvBody + 2));
        }
        v14 = (int)&v4->m_kWorld.m_Translate;
        pkFroma = (IDirectMessenger *)4;
        do
        {
          v15 = v4->m_kPropertyList.m_pkHead;
          v16 = v4->m_kPropertyList.m_pkHead;
          iMsgTaga = (int)v15[29].m_element.m_pObject;
          pvBodya = (char *)v15[29].m_pkPrev;
          v17 = *(_DWORD **)v14;
          v18 = (void (__thiscall **)(_DWORD, _DWORD))(**(_DWORD **)v14 + 308);
          v19 = ((int (__thiscall *)(NiTListItem<NiPointer<NiProperty> > *))v16->m_pkNext[14].m_pkNext)(v4->m_kPropertyList.m_pkHead);
          v20 = ((int (__thiscall *)(NiTListItem<NiPointer<NiProperty> > *, char *))v16->m_pkNext[13].m_element.m_pObject)(
                  v16,
                  &pvBodya[v19]);
          (*v18)(v17, iMsgTaga + v20);
          (*(void (__stdcall **)(unsigned int))(**(_DWORD **)v14 + 152))(uiWidth);
          (*(void (__stdcall **)(unsigned int))(**(_DWORD **)v14 + 156))(uiHeight);
          (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v14 + 324))(LODWORD(Timer::ms_fCurTime));
          v14 += 4;
          pkFroma = (IDirectMessenger *)((char *)pkFroma - 1);
        }
        while ( pkFroma );
        v21 = &v4->m_spMaterialProp.m_pObject->vfptr;
        if ( v21 )
        {
          v22 = *v21;
          v23 = v4->m_kPropertyList.m_pkHead;
          pkFrome = (IDirectMessenger *)((int (__thiscall *)(ChatBoardFlex **))LODWORD(v4[-1].m_pkActiveChatBD->m_kWorld.m_Translate.y))(&v4[-1].m_pkActiveChatBD);
          v24 = ((int (__thiscall *)(NiTListItem<NiPointer<NiProperty> > *))v23->m_pkNext[12].m_pkNext)(v23);
          v22[43].__vecDelDtor((NiRefObject *)v4->m_spMaterialProp.m_pObject, (unsigned int)pkFrome - v24);
        }
        v25 = (int *)v4->m_uiDepth;
        if ( v25 )
        {
          v26 = *v25;
          v27 = v4->m_kPropertyList.m_pkHead;
          pkFromf = (IDirectMessenger *)((int (__thiscall *)(ChatBoardFlex **))LODWORD(v4[-1].m_pkActiveChatBD->m_kWorld.m_Translate.y))(&v4[-1].m_pkActiveChatBD);
          v28 = ((int (__thiscall *)(NiTListItem<NiPointer<NiProperty> > *))v27->m_pkNext[12].m_pkNext)(v27);
          (*(void (__thiscall **)(unsigned int, char *))(v26 + 172))(v4->m_uiDepth, (char *)pkFromf - v28);
        }
        v29 = (int *)v4->m_uiExtStyle;
        if ( v29 )
        {
          v30 = *v29;
          v31 = ((int (__thiscall *)(_DWORD))LODWORD(v4[-1].m_pkActiveChatBD->m_kWorld.m_Translate.y))(&v4[-1].m_pkActiveChatBD);
          (*(void (__thiscall **)(unsigned int, int))(v30 + 172))(v4->m_uiExtStyle, v31);
        }
        v32 = (int *)v4->m_uiDepth;
        if ( v32 )
        {
          v33 = *v32;
          v34 = ((int (*)(void))v4->m_kPropertyList.m_pkHead->m_pkNext[12].m_pkPrev)();
          (*(void (__thiscall **)(unsigned int, int))(v33 + 176))(v4->m_uiDepth, v34);
        }
        v35 = (int *)v4->m_uiExtStyle;
        if ( v35 )
        {
          v36 = *v35;
          v37 = ((int (*)(void))v4->m_kPropertyList.m_pkHead->m_pkNext[12].m_pkPrev)();
          (*(void (__thiscall **)(unsigned int, int))(v36 + 176))(v4->m_uiExtStyle, v37);
        }
        v38 = v4->m_kPropertyList.m_pkTail;
        if ( v38 )
        {
          v39 = v38->m_pkNext;
          v40 = v4->m_kPropertyList.m_pkHead;
          v41 = ((int (*)(void))v38->m_pkNext[12].m_pkPrev)();
          v42 = ((int (__thiscall *)(NiTListItem<NiPointer<NiProperty> > *, int))v40->m_pkNext[12].m_pkNext)(v40, v41);
          ((void (__thiscall *)(NiTListItem<NiPointer<NiProperty> > *, int))v39[45].m_pkNext)(
            v4->m_kPropertyList.m_pkTail,
            v42 - *(_DWORD *)&v4->m_bResigterFirstHit);
          v43 = &v4->vfptr->SetMsgHooker;
          v44 = *v43;
          v45 = ((int (*)(void))v4->m_kPropertyList.m_pkTail->m_pkNext[12].m_pkNext)();
          (*((void (__thiscall **)(_DWORD, _DWORD))v44 + 38))(v43, v45 - 4);
          v46 = &v4->vfptr->SetMsgHooker;
          v47 = *v46;
          v48 = ((int (*)(void))v4->m_kPropertyList.m_pkTail->m_pkNext[12].m_pkPrev)();
          (*((void (__thiscall **)(_DWORD, _DWORD))v47 + 39))(v46, v48 - 1);
          v49 = v4->m_kPropertyList.m_pkTail;
          v50 = v4->vfptr->SetMsgHooker;
          pkFromg = (IDirectMessenger *)v4->vfptr;
          v51 = ((int (__thiscall *)(NiTListItem<NiPointer<NiProperty> > *))v49->m_pkNext[14].m_pkNext)(v4->m_kPropertyList.m_pkTail);
          v52 = ((int (__thiscall *)(NiTListItem<NiPointer<NiProperty> > *, int))v49->m_pkNext[13].m_element.m_pObject)(
                  v49,
                  v51 + 4);
          (*((void (__thiscall **)(_DWORD, _DWORD))v50 + 77))(pkFromg, v52 + 4);
        }
        if ( v4->m_spMaterialProp.m_pObject )
        {
          v53 = v4->m_aspChatBD[3].m_pObject->vfptr;
          v54 = ((int (*)(void))v4->m_kPropertyList.m_pkHead->m_pkNext[12].m_pkNext)();
          v53[43].__vecDelDtor((NiRefObject *)v4->m_aspChatBD[3].m_pObject, v54);
        }
      }
      break;
    case 2:
      v55 = this->m_kPropertyList.m_pkHead;
      if ( v55 )
        v56 = (IDirectMessenger *)&v55[19].m_pkPrev;
      else
        v56 = 0;
      if ( pkFrom == v56 )
        goto LABEL_51;
      v57 = this->m_kPropertyList.vfptr;
      v58 = (IDirectMessenger *)(v57 ? &v57[19].NewItem : 0);
      if ( v58 == pkFrom )
        goto LABEL_51;
      v59 = this->m_kPropertyList.m_kAllocator.m_uiCount;
      if ( v59 )
        v60 = (IDirectMessenger *)(v59 + 232);
      else
        v60 = 0;
      if ( v60 == pkFrom )
      {
        *(float *)&this->m_kChildren.vfptr = Timer::ms_fCurTime;
        LOBYTE(this->m_spCollisionObject.m_pObject) = 1;
      }
      else
      {
        v61 = this->m_kChildren.m_pBase;
        if ( v61 )
          v62 = (IDirectMessenger *)&v61[58];
        else
          v62 = 0;
        if ( v62 == pkFrom )
        {
          *(float *)&this->m_kChildren.m_uiSize = Timer::ms_fCurTime;
          LOBYTE(this->m_kChildren.m_uiMaxSize) = 1;
        }
      }
      break;
    case 5:
      v63 = this->m_kPropertyList.m_pkHead;
      if ( v63 )
        v64 = (IDirectMessenger *)&v63[19].m_pkPrev;
      else
        v64 = 0;
      if ( pkFrom == v64
        || ((v65 = this->m_kPropertyList.vfptr) == 0 ? (v66 = 0) : (v66 = (IDirectMessenger *)&v65[19].NewItem),
            v66 == pkFrom) )
      {
LABEL_51:
        *(float *)&this->m_pcToolTipWinText = 0.0;
      }
      break;
    case 3:
      v67 = this->m_kPropertyList.m_kAllocator.m_uiCount;
      if ( v67 )
        v68 = (IDirectMessenger *)(v67 + 232);
      else
        v68 = 0;
      if ( v68 == pkFrom )
      {
        LOBYTE(this->m_spCollisionObject.m_pObject) = 0;
      }
      else
      {
        v69 = this->m_kChildren.m_pBase;
        if ( v69 )
          v70 = (IDirectMessenger *)&v69[58];
        else
          v70 = 0;
        if ( v70 == pkFrom )
          LOBYTE(this->m_kChildren.m_uiMaxSize) = 0;
      }
      break;
    case 15:
      v71 = 0;
      switch ( *(_DWORD *)pvBody )
      {
        case 0x11:
          v71 = 1;
          break;
        case 0x12:
          v71 = 8;
          break;
        case 0x13:
          v71 = 16;
          break;
        case 0x14:
          v71 = 32;
          break;
        case 0x15:
          v71 = 4096;
          break;
        case 0x1B:
          LODWORD(this->m_kWorld.m_Rotate.m_pEntry[1][0]) = 0;
          v72 = TextData::Get(0xEF05252B);
          v73 = v4->m_iHeight;
          if ( v73 )
            (*(void (__stdcall **)(NiUnsharedGeometryGroup *))(*(_DWORD *)v73 + 472))(v72);
          break;
        case 0x1C:
          ChatDisplayWin::SetChatMode((ChatDisplayWin *)((char *)this - 232), 2u);
          break;
        case 0x1D:
          ChatDisplayWin::SetChatMode((ChatDisplayWin *)((char *)this - 232), 3u);
          break;
        case 0x3E:
        case 0x3F:
        case 0x40:
        case 0x41:
        case 0x42:
        case 0x43:
        case 0x44:
        case 0x45:
        case 0x46:
        case 0x47:
        case 0x48:
        case 0x49:
        case 0x4A:
        case 0x4B:
        case 0x4C:
        case 0x4D:
        case 0x4E:
          v74 = *(ActionWin **)(LODWORD(this->m_kLocal.m_Rotate.m_pEntry[1][0]) + 768);
          if ( v74 )
            ActionWin::OnEmotionAction(v74, *(_DWORD *)pvBody - 62);
          break;
        default:
          break;
      }
      v75 = v4->m_kWorld.m_Translate.x;
      if ( *((_BYTE *)pvBody + 4) )
        *(_DWORD *)(LODWORD(v75) + 512) |= v71;
      else
        *(_DWORD *)(LODWORD(v75) + 512) &= ~v71;
      break;
    default:
      return;
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (005E7B90) --------------------------------------------------------
ChatDisplayWin *__cdecl ChatDisplayWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  ChatDisplayWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x26Cu);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    ChatDisplayWin::ChatDisplayWin((ChatDisplayWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[136].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (ChatDisplayWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (005E7CC0) --------------------------------------------------------
SysMsgDisplayWin *__thiscall SysMsgDisplayWin::`vector deleting destructor'(SysMsgDisplayWin *this, unsigned int a2)
{
  SysMsgDisplayWin *v2; // esi@1

  v2 = this;
  ChatDisplayWin::~ChatDisplayWin((ChatDisplayWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005E7CF0) --------------------------------------------------------
void __thiscall ChatDisplayWin2::OnUp(ChatDisplayWin2 *this)
{
  ChatBoardFlex::ViewLineUp(this->m_pkActiveChatBD);
}

//----- (005E7D00) --------------------------------------------------------
void __thiscall ChatDisplayWin2::OnDown(ChatDisplayWin2 *this)
{
  ChatBoardFlex::ViewLineDown(this->m_pkActiveChatBD);
}

//----- (005E7D10) --------------------------------------------------------
void __thiscall ChatDisplayWin2::OnMostDown(ChatDisplayWin2 *this)
{
  ChatBoardFlex::ViewLineMostDown(this->m_pkActiveChatBD);
}

//----- (005E7D30) --------------------------------------------------------
bool ChatDisplayWin2::IsOnCandList()
{
  return 0;
}

//----- (005E7D40) --------------------------------------------------------
char __fastcall IsAllSpace_0(char *pcSrc)
{
  char v1; // al@2

  if ( pcSrc )
  {
    v1 = *pcSrc;
    if ( *pcSrc )
    {
      while ( v1 == 32 )
      {
        v1 = (pcSrc++)[1];
        if ( !v1 )
          return 1;
      }
    }
  }
  return 0;
}

//----- (005E7D70) --------------------------------------------------------
void __stdcall ChatDisplayWin2::AddSystemChat(const char *pcFormat)
{
  char str[256]; // [sp+0h] [bp-104h]@1

  _wsprintfA(str, "%s", pcFormat);
}

//----- (005E7DB0) --------------------------------------------------------
void __thiscall ChatDisplayWin2::AddAuthorChat(ChatDisplayWin2 *this, char *pcFormat)
{
  ChatDisplayWin2 *v2; // esi@1
  char str[256]; // [sp+4h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  ChatBoardFlex::Add(v2->m_pkActiveChatBD, (ChatBoardFlex::Type)128, str);
}

//----- (005E7E10) --------------------------------------------------------
void __thiscall ChatDisplayWin2::GetSize(ChatDisplayWin2 *this, unsigned int *ruiWidth, unsigned int *ruiHeight)
{
  ChatDisplayWin2 *v3; // esi@1

  v3 = this;
  *ruiWidth = ((int (*)(void))this->m_pkChattingBox->vfptr[36].__vecDelDtor)();
  *ruiHeight = ((int (*)(void))v3->m_pkChattingBox->vfptr[37].__vecDelDtor)();
}

//----- (005E7E50) --------------------------------------------------------
void __thiscall ChatDisplayWin2::SetSize(ChatDisplayWin2 *this, unsigned int uiWidth, unsigned int uiHeight)
{
  ChatDisplayWin2 *v3; // esi@1
  int v4; // eax@1
  unsigned int v5; // ebx@1
  int iNewTop; // ST18_4@1
  int v7; // edi@1
  int v8; // ebx@1
  int v9; // ST18_4@1
  int v10; // eax@1
  FrameBoxWin *v11; // ecx@1
  int v12; // eax@1
  FrameBoxWin *v13; // ecx@1
  FrameBoxWin *v14; // eax@1
  int v15; // eax@2
  DirectUserMsgBody_SizeDrag kDrag; // [sp+10h] [bp-14h]@1

  v3 = this;
  v4 = ((int (*)(void))this->m_pkChattingBox->vfptr[36].__vecDelDtor)();
  v5 = v4 - uiWidth;
  iNewTop = v4 - uiWidth;
  v7 = v5 + ((int (*)(void))v3->m_pkChattingBox->vfptr[41].__vecDelDtor)();
  v8 = ((int (*)(void))v3->m_pkChattingBox->vfptr[36].__vecDelDtor)() - iNewTop;
  v9 = ((int (*)(void))v3->m_pkChattingBox->vfptr[42].__vecDelDtor)();
  ((void (*)(void))v3->m_pkChattingBox->vfptr[36].__vecDelDtor)();
  ((void (*)(void))v3->m_pkChattingBox->vfptr[37].__vecDelDtor)();
  v10 = ((int (*)(void))v3->m_pkChattingBox->vfptr[36].__vecDelDtor)();
  v11 = v3->m_pkChattingBox;
  kDrag.iDeltaWidth = v8 - v10;
  kDrag.iDeltaHeight = uiHeight - ((int (*)(void))v11->vfptr[37].__vecDelDtor)();
  v12 = ((int (*)(void))v3->m_pkChattingBox->vfptr[41].__vecDelDtor)();
  v13 = v3->m_pkChattingBox;
  kDrag.iDeltaLeft = v7 - v12;
  kDrag.iDeltaTop = v9 - ((int (*)(void))v13->vfptr[42].__vecDelDtor)();
  ((void (__stdcall *)(_DWORD, _DWORD))v3->m_pkChattingBox->vfptr[135].__vecDelDtor)(uiWidth, uiHeight);
  v14 = v3->m_pkChattingBox;
  if ( v14 )
    v15 = (int)&v14->vfptr;
  else
    v15 = 0;
  v3->vfptr->DirectMessage((IDirectMessenger *)&v3->vfptr, 14, &kDrag, (IDirectMessenger *)v15);
}

//----- (005E7F90) --------------------------------------------------------
void __thiscall ChatDisplayWin2::SetDefaultSize(ChatDisplayWin2 *this)
{
  ((void (__stdcall *)(_DWORD, _DWORD))this->vfptr[135].__vecDelDtor)(this->m_uiDefaultWidth, this->m_uiDefaultHeight);
}

//----- (005E7FB0) --------------------------------------------------------
void __thiscall ChatDisplayWin2::OnChatCommand(ChatDisplayWin2 *this)
{
  ChatDisplayWin2 *v1; // ebx@1
  PgWinSpr *v2; // eax@2
  NiRefObjectVtbl *v3; // esi@2
  char v4; // al@2
  PgWinBut **v5; // edi@2
  NiRefObjectVtbl *v6; // esi@3
  unsigned __int8 v7; // al@3
  signed int v8; // [sp+4h] [bp-4h]@2

  v1 = this;
  if ( this->m_pkChatCommandSprWin )
  {
    v2 = this->m_pkChatCommandSprWin;
    v3 = v2->vfptr;
    v4 = ((int (*)(void))v2->vfptr[65].__vecDelDtor)();
    v3[64].__vecDelDtor((NiRefObject *)v1->m_pkChatCommandSprWin, v4 == 0);
    v5 = v1->m_pkChatCmdBut;
    v8 = 11;
    do
    {
      v6 = (*v5)->vfptr;
      v7 = ((int (*)(void))v1->m_pkChatCommandSprWin->vfptr[65].__vecDelDtor)();
      v6[64].__vecDelDtor((NiRefObject *)*v5, v7);
      ++v5;
      --v8;
    }
    while ( v8 );
  }
}

//----- (005E8040) --------------------------------------------------------
void __thiscall ChatDisplayWin2::OnWhisperHotKeyTab(ChatDisplayWin2 *this)
{
  ((void (__stdcall *)(_DWORD, _DWORD))this->vfptr[95].__vecDelDtor)(22, 1);
}

//----- (005E8050) --------------------------------------------------------
void __thiscall ChatDisplayWin2::OnPartyHotKeyTab(ChatDisplayWin2 *this)
{
  ((void (__stdcall *)(_DWORD, _DWORD))this->vfptr[95].__vecDelDtor)(23, 1);
}

//----- (005E8060) --------------------------------------------------------
void __thiscall ChatDisplayWin2::OnGuildHotKeyTab(ChatDisplayWin2 *this)
{
  ((void (__stdcall *)(_DWORD, _DWORD))this->vfptr[95].__vecDelDtor)(24, 1);
}

//----- (005E8070) --------------------------------------------------------
void __thiscall ChatDisplayWin2::OnNormalHotKeyTab(ChatDisplayWin2 *this)
{
  ((void (__stdcall *)(_DWORD, _DWORD))this->vfptr[95].__vecDelDtor)(26, 1);
}

//----- (005E8080) --------------------------------------------------------
bool __thiscall ChatDisplayWin2::IsChatStart(ChatDisplayWin2 *this)
{
  bool result; // al@2

  if ( this->m_pkChatEditBox )
    result = ((int (*)(void))this->m_pkChatEditBox->vfptr[65].__vecDelDtor)();
  else
    result = 0;
  return result;
}

//----- (005E80A0) --------------------------------------------------------
void __thiscall ChatDisplayWin2::SetChatNameEditText(ChatDisplayWin2 *this, const char *sName)
{
  ((void (__stdcall *)(_DWORD))this->m_pkChatNameEditBox->vfptr[115].__vecDelDtor)(sName);
}

//----- (005E80C0) --------------------------------------------------------
void __thiscall ChatDisplayWin2::SetWhisperEditFocus(ChatDisplayWin2 *this)
{
  ChatDisplayWin2 *v1; // esi@1

  v1 = this;
  if ( this->m_uiChatMode == 1 )
  {
    ((void (*)(void))this->m_pkChatNameEditBox->vfptr[120].__vecDelDtor)();
    EditWin::SelectAll(v1->m_pkChatNameEditBox);
  }
}

//----- (005E80F0) --------------------------------------------------------
void __thiscall ChatDisplayWin2::OnGuildAcademyHotKeyTab(ChatDisplayWin2 *this)
{
  ((void (__stdcall *)(_DWORD, _DWORD))this->vfptr[95].__vecDelDtor)(25, 1);
}

//----- (005E8100) --------------------------------------------------------
char *__stdcall ChatDisplayWin2::GetCharName(char *pcRetCharName, char *pcChatText)
{
  const char *v3; // eax@3
  char *v4; // ecx@3
  char v5; // dl@4
  unsigned int v6; // ecx@5

  if ( pcChatText )
  {
    if ( *pcChatText == 91 )
    {
      strchr(pcChatText, 93);
      v4 = pcChatText + 1;
      do
        v5 = *v4++;
      while ( v5 );
      v6 = v4 - (pcChatText + 2) - strlen(v3);
      if ( v6 <= 0x14 )
        strncpy(pcRetCharName, pcChatText + 1, v6);
    }
  }
  return 0;
}

//----- (005E8160) --------------------------------------------------------
bool __stdcall ChatDisplayWin2::IsSameCharName(char *pcCharName, char *pcStr2)
{
  const char *v3; // eax@3
  char *v4; // ecx@3
  char v5; // dl@4
  unsigned int v6; // ecx@5
  bool result; // al@8
  char acStrCharName[20]; // [sp+8h] [bp-18h]@1

  acStrCharName[0] = 0;
  *(_DWORD *)&acStrCharName[1] = 0;
  *(_DWORD *)&acStrCharName[5] = 0;
  *(_DWORD *)&acStrCharName[9] = 0;
  *(_DWORD *)&acStrCharName[13] = 0;
  *(_WORD *)&acStrCharName[17] = 0;
  acStrCharName[19] = 0;
  if ( pcStr2 )
  {
    if ( *pcStr2 == 91 )
    {
      strchr(pcStr2, 93);
      v4 = pcStr2 + 1;
      do
        v5 = *v4++;
      while ( v5 );
      v6 = v4 - (pcStr2 + 2) - strlen(v3);
      if ( v6 <= 0x14 )
        strncpy(acStrCharName, pcStr2 + 1, v6);
    }
  }
  if ( acStrCharName[0] )
    result = strncmp(pcCharName, acStrCharName, 0x14u) == 0;
  else
    result = 0;
  return result;
}

//----- (005E8220) --------------------------------------------------------
char __thiscall ChatDisplayWin2::DoesSpamFilterWinOpen(ChatDisplayWin2 *this)
{
  char result; // al@2

  if ( this->m_pkSpamFilterPanel )
    result = ((int (*)(void))this->m_pkSpamFilterPanel->vfptr[65].__vecDelDtor)();
  else
    result = 1;
  return result;
}

//----- (005E8240) --------------------------------------------------------
void __thiscall ChatDisplayWin2::MoveSpamFilterWindow(ChatDisplayWin2 *this, int fX, int fY)
{
  ChatDisplayWin2 *v3; // esi@1
  NiRefObjectVtbl *v4; // ebx@1
  int v5; // eax@1
  int v6; // edi@1
  int *v7; // eax@1
  int v8; // eax@1
  int *v9; // ecx@1
  int v10; // eax@1
  int *v11; // eax@1
  int v12; // eax@1
  int *v13; // ecx@1
  int v14; // eax@1
  int *v15; // eax@1
  int v16; // eax@1
  int *v17; // ecx@1
  int v18; // eax@1
  int *v19; // eax@1
  int v20; // eax@1
  int *v21; // ecx@1
  int v22; // eax@1
  int *v23; // eax@1
  int v24; // eax@1
  int *v25; // ecx@1
  int v26; // eax@1
  int *v27; // eax@1
  int v28; // eax@1
  int *v29; // ecx@1
  int v30; // eax@1
  NiRefObjectVtbl *v31; // edi@1
  int v32; // eax@1
  int fXa; // [sp+14h] [bp+8h]@1
  int fXb; // [sp+14h] [bp+8h]@1
  int fXc; // [sp+14h] [bp+8h]@1
  int fXd; // [sp+14h] [bp+8h]@1
  int fXe; // [sp+14h] [bp+8h]@1
  int fXf; // [sp+14h] [bp+8h]@1
  int fXg; // [sp+14h] [bp+8h]@1
  int fXh; // [sp+14h] [bp+8h]@1
  int fXi; // [sp+14h] [bp+8h]@1
  int fXj; // [sp+14h] [bp+8h]@1
  int fXk; // [sp+14h] [bp+8h]@1
  int fXl; // [sp+14h] [bp+8h]@1

  v3 = this;
  v4 = this->m_pkSpamFilterPanel->vfptr;
  v5 = ((int (*)(void))this->m_pkSpamFilterPanel->vfptr[41].__vecDelDtor)();
  v6 = fX;
  v4[43].__vecDelDtor((NiRefObject *)v3->m_pkSpamFilterPanel, fX + v5);
  v7 = (int *)v3->m_pkSpamFilterPanel;
  fXa = *v7;
  v8 = (*(int (**)(void))(*v7 + 168))();
  (*(void (__thiscall **)(_DWORD, _DWORD))(fXa + 176))(v3->m_pkSpamFilterPanel, fY + v8);
  v9 = (int *)v3->m_pkTextSFOnOff;
  fXb = *v9;
  v10 = (*(int (**)(void))(*v9 + 164))();
  (*(void (__thiscall **)(_DWORD, _DWORD))(fXb + 172))(v3->m_pkTextSFOnOff, v6 + v10);
  v11 = (int *)v3->m_pkTextSFOnOff;
  fXc = *v11;
  v12 = (*(int (**)(void))(*v11 + 168))();
  (*(void (__thiscall **)(_DWORD, _DWORD))(fXc + 176))(v3->m_pkTextSFOnOff, fY + v12);
  v13 = (int *)v3->m_pkSpamFilterOnOff;
  fXd = *v13;
  v14 = (*(int (**)(void))(*v13 + 164))();
  (*(void (__thiscall **)(_DWORD, _DWORD))(fXd + 172))(v3->m_pkSpamFilterOnOff, v6 + v14);
  v15 = (int *)v3->m_pkSpamFilterOnOff;
  fXe = *v15;
  v16 = (*(int (**)(void))(*v15 + 168))();
  (*(void (__thiscall **)(_DWORD, _DWORD))(fXe + 176))(v3->m_pkSpamFilterOnOff, fY + v16);
  v17 = (int *)v3->m_pkTextSFMsgShow;
  fXf = *v17;
  v18 = (*(int (**)(void))(*v17 + 164))();
  (*(void (__thiscall **)(_DWORD, _DWORD))(fXf + 172))(v3->m_pkTextSFMsgShow, v6 + v18);
  v19 = (int *)v3->m_pkTextSFMsgShow;
  fXg = *v19;
  v20 = (*(int (**)(void))(*v19 + 168))();
  (*(void (__thiscall **)(_DWORD, _DWORD))(fXg + 176))(v3->m_pkTextSFMsgShow, fY + v20);
  v21 = (int *)v3->m_pkSpamFilterMsgShow;
  fXh = *v21;
  v22 = (*(int (**)(void))(*v21 + 164))();
  (*(void (__thiscall **)(_DWORD, _DWORD))(fXh + 172))(v3->m_pkSpamFilterMsgShow, v6 + v22);
  v23 = (int *)v3->m_pkSpamFilterMsgShow;
  fXi = *v23;
  v24 = (*(int (**)(void))(*v23 + 168))();
  (*(void (__thiscall **)(_DWORD, _DWORD))(fXi + 176))(v3->m_pkSpamFilterMsgShow, fY + v24);
  v25 = (int *)v3->m_pkTextSFSlide;
  fXj = *v25;
  v26 = (*(int (**)(void))(*v25 + 164))();
  (*(void (__thiscall **)(_DWORD, _DWORD))(fXj + 172))(v3->m_pkTextSFSlide, v6 + v26);
  v27 = (int *)v3->m_pkTextSFSlide;
  fXk = *v27;
  v28 = (*(int (**)(void))(*v27 + 168))();
  (*(void (__thiscall **)(_DWORD, _DWORD))(fXk + 176))(v3->m_pkTextSFSlide, fY + v28);
  v29 = (int *)v3->m_pkSpamFilterSlide;
  fXl = *v29;
  v30 = (*(int (**)(void))(*v29 + 164))();
  (*(void (__thiscall **)(_DWORD, _DWORD))(fXl + 172))(v3->m_pkSpamFilterSlide, v6 + v30);
  v31 = v3->m_pkSpamFilterSlide->vfptr;
  v32 = ((int (*)(void))v3->m_pkSpamFilterSlide->vfptr[42].__vecDelDtor)();
  v31[44].__vecDelDtor((NiRefObject *)v3->m_pkSpamFilterSlide, fY + v32);
}

//----- (005E84A0) --------------------------------------------------------
bool __stdcall ChatDisplayWin2::ProcessDrop(PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  return 0;
}

//----- (005E84B0) --------------------------------------------------------
void __stdcall ChatDisplayWin2::InsertText(char *pResultText, char *pCurText, char *pInserText, int nInsertPos)
{
  unsigned int v5; // eax@1
  char *v6; // edi@1
  char v7; // cl@2
  char *v8; // edi@3
  char *v9; // esi@3
  int v10; // ecx@3
  char *v11; // eax@3
  char *v12; // esi@3
  char v13; // cl@4
  unsigned int v14; // eax@5
  char *v15; // edi@5
  char v16; // cl@6

  strncpy(pResultText, pCurText, nInsertPos);
  v5 = strlen(pInserText) + 1;
  v6 = pResultText - 1;
  do
    v7 = (v6++)[1];
  while ( v7 );
  qmemcpy(v6, pInserText, 4 * (v5 >> 2));
  v9 = &pInserText[4 * (v5 >> 2)];
  v8 = &v6[4 * (v5 >> 2)];
  v10 = v5 & 3;
  v11 = &pCurText[nInsertPos];
  qmemcpy(v8, v9, v10);
  v12 = &pCurText[nInsertPos];
  do
    v13 = *v11++;
  while ( v13 );
  v14 = v11 - v12;
  v15 = pResultText - 1;
  do
    v16 = (v15++)[1];
  while ( v16 );
  qmemcpy(v15, v12, v14);
}

//----- (005E8530) --------------------------------------------------------
void __thiscall ChatDisplayWin2::OnChatBlockBtn(ChatDisplayWin2 *this)
{
  GameFrameWork::OpenChatBlockListWin((GameFrameWork *)this->m_pkFrameWork);
}

//----- (005E8540) --------------------------------------------------------
void __thiscall ChatDisplayWin2::OnReport(ChatDisplayWin2 *this)
{
  GameFrameWork::OpenReportWin((GameFrameWork *)this->m_pkFrameWork);
}

//----- (005E8550) --------------------------------------------------------
void __thiscall ChatDisplayWin2::OnTab(ChatDisplayWin2 *this)
{
  ChatDisplayWin2 *v1; // esi@1
  NiSourceTexture *v2; // eax@1
  PopupMenuWin *v3; // eax@1
  PopupMenuWin *v4; // edi@1
  PopupMenuWin *v5; // ebx@1
  signed int v6; // ebx@8
  int v7; // edi@8
  int v8; // eax@9
  int v9; // edx@14
  int v10; // ecx@14
  int v11; // edx@14
  PopupMenuText *v12; // eax@14
  int v13; // eax@16
  PopupMenuWin *v14; // ecx@16
  PgWinBut *v15; // edi@16
  int v16; // ebx@16
  int v17; // eax@16
  PgWinProxy *v18; // ecx@16
  FrameBoxWin *v19; // edi@16
  PopupMenuWin *v20; // ebx@16
  int v21; // eax@16
  int x; // [sp+Ch] [bp-28h]@16
  int y; // [sp+10h] [bp-24h]@16
  int iCount; // [sp+14h] [bp-20h]@1
  char acName[21]; // [sp+18h] [bp-1Ch]@9

  v1 = this;
  iCount = 0;
  v2 = MenuTexMgr::GetTexture(1u);
  v3 = PopupMenuWin::CreateWin(v2, 4u, 4u, 0);
  v4 = v1->m_spChatModePopupMenu.m_pObject;
  v5 = v3;
  if ( v4 != v3 )
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spChatModePopupMenu.m_pObject = v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  }
  v1->m_spChatModePopupMenu.m_pObject->vfptr->SetMsgHooker(&v1->m_spChatModePopupMenu.m_pObject->vfptr, &v1->vfptr);
  PopupMenuWin::Clear(v1->m_spChatModePopupMenu.m_pObject);
  v6 = 0;
  v7 = (int)&v1->m_pkFrameWork[130].m_kMsgQ.m_uiTail;
  do
  {
    *(_DWORD *)&acName[16] = 0;
    *(_DWORD *)&acName[12] = 0;
    *(_DWORD *)&acName[8] = 0;
    *(_DWORD *)&acName[4] = 0;
    *(_DWORD *)acName = 0;
    strncpy(acName, &byte_9B168B, 0x14u);
    v8 = *(_DWORD *)(v7 - 8);
    if ( v8 != *(_DWORD *)acName
      || *(_DWORD *)(v7 - 4) != *(_DWORD *)&acName[4]
      || *(_DWORD *)v7 != *(_DWORD *)&acName[8]
      || *(_DWORD *)(v7 + 4) != *(_DWORD *)&acName[12]
      || *(_DWORD *)(v7 + 8) != *(_DWORD *)&acName[16] )
    {
      v9 = *(_DWORD *)(v7 - 4);
      v10 = *(_DWORD *)(v7 + 4);
      ++iCount;
      *(_DWORD *)acName = v8;
      *(_DWORD *)&acName[8] = *(_DWORD *)v7;
      *(_DWORD *)&acName[4] = v9;
      v11 = *(_DWORD *)(v7 + 8);
      *(_DWORD *)&acName[12] = v10;
      *(_DWORD *)&acName[16] = v11;
      acName[20] = 0;
      v12 = PopupMenuText::CreateWin(acName, 0, 0, 0, 0, 0, 0);
      v12->m_ePopupMenuID = v6 + 79;
      PopupMenuWin::AddMenu(v1->m_spChatModePopupMenu.m_pObject, v7, (PopupMenu *)&v12->vfptr);
    }
    ++v6;
    v7 += 20;
  }
  while ( v6 < 6 );
  PopupMenuWin::FinishMenu(v1->m_spChatModePopupMenu.m_pObject, 0);
  ((void (__stdcall *)(_DWORD))v1->m_spChatModePopupMenu.m_pObject->vfptr[64].__vecDelDtor)(0);
  v13 = ((int (*)(void))v1->m_pkWhisperListBtn->vfptr[41].__vecDelDtor)();
  v14 = v1->m_spChatModePopupMenu.m_pObject;
  v15 = v1->m_pkWhisperListBtn;
  x = v13;
  v16 = ((int (*)(void))v14->vfptr[37].__vecDelDtor)();
  v17 = ((int (__thiscall *)(PgWinBut *))v15->vfptr[42].__vecDelDtor)(v15);
  v18 = v1->m_pkLTSocketWin;
  y = v17 - v16;
  ((void (__stdcall *)(int *, int *))v18->vfptr[55].__vecDelDtor)(&x, &y);
  v19 = v1->m_pkChattingBox;
  v20 = v1->m_spChatModePopupMenu.m_pObject;
  v21 = ((int (__thiscall *)(FrameBoxWin *))v19->vfptr[37].__vecDelDtor)(v1->m_pkChattingBox);
  ((void (__thiscall *)(PopupMenuWin *, int, unsigned int))v20->vfptr[77].__vecDelDtor)(
    v20,
    x,
    y + v21 - 2 * v19->m_uiEdgeHeight);
  if ( iCount > 0 )
    PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v1->m_spChatModePopupMenu.m_pObject->vfptr);
}

//----- (005E8780) --------------------------------------------------------
int __thiscall ChatDisplayWin2::IsDuringEdit(ChatDisplayWin2 *this)
{
  return ((int (*)(void))this->m_spEdit.m_pObject->vfptr[122].__vecDelDtor)();
}

//----- (005E8790) --------------------------------------------------------
void __thiscall ChatDisplayWin2::AddGMNormalChat(ChatDisplayWin2 *this, char *pcFormat)
{
  ChatBoardFlex **v2; // esi@1
  signed int v3; // edi@1

  v2 = (ChatBoardFlex **)this->m_aspChatBD;
  v3 = 5;
  do
  {
    ChatBoardFlex::AddGMUserChat(*v2, pcFormat);
    ++v2;
    --v3;
  }
  while ( v3 );
}

//----- (005E87C0) --------------------------------------------------------
void __thiscall ChatDisplayWin2::AddGMOtherNormalChat(ChatDisplayWin2 *this, char *pcFormat)
{
  ChatBoardFlex **v2; // esi@1
  signed int v3; // edi@1

  v2 = (ChatBoardFlex **)this->m_aspChatBD;
  v3 = 5;
  do
  {
    ChatBoardFlex::Add(*v2, (ChatBoardFlex::Type)1024, pcFormat);
    ++v2;
    --v3;
  }
  while ( v3 );
}

//----- (005E87F0) --------------------------------------------------------
void __thiscall ChatDisplayWin2::AddGMShoutChat(ChatDisplayWin2 *this, char *pcFormat)
{
  ChatDisplayWin2 *v2; // esi@1
  ChatBoardFlex **v3; // esi@1
  signed int v4; // edi@1
  char str[256]; // [sp+8h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  v3 = (ChatBoardFlex **)v2->m_aspChatBD;
  v4 = 5;
  do
  {
    ChatBoardFlex::Add(*v3, (ChatBoardFlex::Type)2048, str);
    ++v3;
    --v4;
  }
  while ( v4 );
}

//----- (005E8860) --------------------------------------------------------
void __thiscall ChatDisplayWin2::AddGMWhisperChat(ChatDisplayWin2 *this, char *pcFormat)
{
  ChatDisplayWin2 *v2; // esi@1
  ChatBoardFlex **v3; // esi@1
  signed int v4; // edi@1
  char str[256]; // [sp+8h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  v3 = (ChatBoardFlex **)v2->m_aspChatBD;
  v4 = 5;
  do
  {
    ChatBoardFlex::Add(*v3, (ChatBoardFlex::Type)4106, str);
    ++v3;
    --v4;
  }
  while ( v4 );
}

//----- (005E88D0) --------------------------------------------------------
void __thiscall ChatDisplayWin2::AddShoutChat(ChatDisplayWin2 *this, char *pcFormat)
{
  ChatDisplayWin2 *v2; // esi@1
  ChatBoardFlex **v3; // esi@1
  signed int v4; // edi@1
  char str[256]; // [sp+8h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  v3 = (ChatBoardFlex **)v2->m_aspChatBD;
  v4 = 5;
  do
  {
    ChatBoardFlex::Add(*v3, COLUMN, str);
    ++v3;
    --v4;
  }
  while ( v4 );
}

//----- (005E8940) --------------------------------------------------------
void __thiscall ChatDisplayWin2::AddOtherShoutChat(ChatDisplayWin2 *this, char *pcFormat)
{
  ChatDisplayWin2 *v2; // esi@1
  ChatBoardFlex **v3; // esi@1
  signed int v4; // edi@1
  char str[256]; // [sp+8h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  v3 = (ChatBoardFlex **)v2->m_aspChatBD;
  v4 = 5;
  do
  {
    ChatBoardFlex::Add(*v3, COLUMN, str);
    ++v3;
    --v4;
  }
  while ( v4 );
}

//----- (005E89B0) --------------------------------------------------------
void __thiscall ChatDisplayWin2::AddWhisperChat(ChatDisplayWin2 *this, char *pcFormat)
{
  ChatDisplayWin2 *v2; // esi@1
  ChatBoardFlex **v3; // esi@1
  signed int v4; // edi@1
  char str[256]; // [sp+8h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  v3 = (ChatBoardFlex **)v2->m_aspChatBD;
  v4 = 5;
  do
  {
    ChatBoardFlex::Add(*v3, (ChatBoardFlex::Type)8, str);
    ++v3;
    --v4;
  }
  while ( v4 );
}

//----- (005E8A20) --------------------------------------------------------
void __thiscall ChatDisplayWin2::AddPartyChat(ChatDisplayWin2 *this, char *pcFormat)
{
  ChatDisplayWin2 *v2; // esi@1
  ChatBoardFlex **v3; // esi@1
  signed int v4; // edi@1
  char str[256]; // [sp+8h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  v3 = (ChatBoardFlex **)v2->m_aspChatBD;
  v4 = 5;
  do
  {
    ChatBoardFlex::Add(*v3, (ChatBoardFlex::Type)16, str);
    ++v3;
    --v4;
  }
  while ( v4 );
}

//----- (005E8A90) --------------------------------------------------------
void __thiscall ChatDisplayWin2::AddOtherPartyChat(ChatDisplayWin2 *this, char *pcFormat)
{
  ChatDisplayWin2 *v2; // esi@1
  ChatBoardFlex **v3; // esi@1
  signed int v4; // edi@1
  char str[256]; // [sp+8h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  v3 = (ChatBoardFlex **)v2->m_aspChatBD;
  v4 = 5;
  do
  {
    ChatBoardFlex::Add(*v3, (ChatBoardFlex::Type)16, str);
    ++v3;
    --v4;
  }
  while ( v4 );
}

//----- (005E8B00) --------------------------------------------------------
void __thiscall ChatDisplayWin2::AddRaidChat(ChatDisplayWin2 *this, char *pcFormat)
{
  ChatDisplayWin2 *v2; // esi@1
  ChatBoardFlex **v3; // esi@1
  signed int v4; // edi@1
  char str[256]; // [sp+8h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  v3 = (ChatBoardFlex **)v2->m_aspChatBD;
  v4 = 5;
  do
  {
    ChatBoardFlex::Add(*v3, (ChatBoardFlex::Type)0x2000, str);
    ++v3;
    --v4;
  }
  while ( v4 );
}

//----- (005E8B70) --------------------------------------------------------
void __thiscall ChatDisplayWin2::AddOtherRaidChat(ChatDisplayWin2 *this, char *pcFormat)
{
  ChatDisplayWin2 *v2; // esi@1
  ChatBoardFlex **v3; // esi@1
  signed int v4; // edi@1
  char str[256]; // [sp+8h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  v3 = (ChatBoardFlex **)v2->m_aspChatBD;
  v4 = 5;
  do
  {
    ChatBoardFlex::Add(*v3, (ChatBoardFlex::Type)0x2000, str);
    ++v3;
    --v4;
  }
  while ( v4 );
}

//----- (005E8BE0) --------------------------------------------------------
void __thiscall ChatDisplayWin2::AddRaidNoticeChat(ChatDisplayWin2 *this, char *pcFormat)
{
  ChatDisplayWin2 *v2; // esi@1
  ChatBoardFlex **v3; // esi@1
  signed int v4; // edi@1
  char str[256]; // [sp+8h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  v3 = (ChatBoardFlex **)v2->m_aspChatBD;
  v4 = 5;
  do
  {
    ChatBoardFlex::Add(*v3, (ChatBoardFlex::Type)0x4000, str);
    ++v3;
    --v4;
  }
  while ( v4 );
}

//----- (005E8C50) --------------------------------------------------------
void __thiscall ChatDisplayWin2::AddGuildChat(ChatDisplayWin2 *this, char *pcFormat)
{
  ChatDisplayWin2 *v2; // esi@1
  ChatBoardFlex **v3; // esi@1
  signed int v4; // edi@1
  char str[256]; // [sp+8h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  v3 = (ChatBoardFlex **)v2->m_aspChatBD;
  v4 = 5;
  do
  {
    ChatBoardFlex::Add(*v3, (ChatBoardFlex::Type)32, str);
    ++v3;
    --v4;
  }
  while ( v4 );
}

//----- (005E8CC0) --------------------------------------------------------
void __thiscall ChatDisplayWin2::AddOtherGuildChat(ChatDisplayWin2 *this, char *pcFormat)
{
  ChatDisplayWin2 *v2; // esi@1
  ChatBoardFlex **v3; // esi@1
  signed int v4; // edi@1
  char str[256]; // [sp+8h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  v3 = (ChatBoardFlex **)v2->m_aspChatBD;
  v4 = 5;
  do
  {
    ChatBoardFlex::Add(*v3, (ChatBoardFlex::Type)32, str);
    ++v3;
    --v4;
  }
  while ( v4 );
}

//----- (005E8D30) --------------------------------------------------------
void __thiscall ChatDisplayWin2::AddGuildAcademyChat(ChatDisplayWin2 *this, char *pcFormat)
{
  ChatDisplayWin2 *v2; // esi@1
  ChatBoardFlex **v3; // esi@1
  signed int v4; // edi@1
  char str[256]; // [sp+8h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  v3 = (ChatBoardFlex **)v2->m_aspChatBD;
  v4 = 5;
  do
  {
    ChatBoardFlex::Add(*v3, (ChatBoardFlex::Type)4096, str);
    ++v3;
    --v4;
  }
  while ( v4 );
}

//----- (005E8DA0) --------------------------------------------------------
void __thiscall ChatDisplayWin2::AddOtherGuildAcademyChat(ChatDisplayWin2 *this, char *pcFormat)
{
  ChatDisplayWin2 *v2; // esi@1
  ChatBoardFlex **v3; // esi@1
  signed int v4; // edi@1
  char str[256]; // [sp+8h] [bp-104h]@1

  v2 = this;
  _wsprintfA(str, "%s", pcFormat);
  v3 = (ChatBoardFlex **)v2->m_aspChatBD;
  v4 = 5;
  do
  {
    ChatBoardFlex::Add(*v3, (ChatBoardFlex::Type)4096, str);
    ++v3;
    --v4;
  }
  while ( v4 );
}

//----- (005E8E10) --------------------------------------------------------
unsigned int __thiscall ChatDisplayWin2::GetOption(ChatDisplayWin2 *this, unsigned int uiChatMode)
{
  return this->m_aspChatBD[uiChatMode].m_pObject->m_uiOption;
}

//----- (005E8E30) --------------------------------------------------------
void __thiscall ChatDisplayWin2::SetOption(ChatDisplayWin2 *this, unsigned int uiOpt, unsigned int uiChatMode)
{
  ChatDisplayWin2 *v3; // edi@1
  char *v4; // esi@1
  int v5; // esi@4
  int v6; // esi@7
  int v7; // esi@10
  int v8; // esi@13
  int v9; // esi@16
  int v10; // esi@19
  DirectUserMsgBody_PopupMenuSetCheckBox kBody; // [sp+Ch] [bp-8h]@1

  v3 = this;
  this->m_aspChatBD[uiChatMode].m_pObject->m_uiOption = uiOpt;
  v4 = (char *)&this->m_spChatFilterPopupMenu[uiChatMode].m_pObject->vfptr;
  kBody.iPopupMenuID = 17;
  kBody.bCheck = (uiOpt >> 9) & 1;
  if ( *((_DWORD *)v4 + 1) )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v4 + 1) + 4))(16, &kBody, v4);
    if ( *((_DWORD *)v4 + 1) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v4 + 1) + 16))(16, &kBody, v4);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v4 + 16))(v4, 16, &kBody, v4);
  v5 = (int)&v3->m_spChatFilterPopupMenu[uiChatMode].m_pObject->vfptr;
  kBody.iPopupMenuID = 18;
  kBody.bCheck = (uiOpt >> 3) & 1;
  if ( *(_DWORD *)(v5 + 4) )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v5 + 4) + 4))(16, &kBody, v5);
    if ( *(_DWORD *)(v5 + 4) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v5 + 4) + 16))(16, &kBody, v5);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v5 + 16))(v5, 16, &kBody, v5);
  v6 = (int)&v3->m_spChatFilterPopupMenu[uiChatMode].m_pObject->vfptr;
  kBody.iPopupMenuID = 19;
  kBody.bCheck = (uiOpt >> 4) & 1;
  if ( *(_DWORD *)(v6 + 4) )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v6 + 4) + 4))(16, &kBody, v6);
    if ( *(_DWORD *)(v6 + 4) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v6 + 4) + 16))(16, &kBody, v6);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v6 + 16))(v6, 16, &kBody, v6);
  v7 = (int)&v3->m_spChatFilterPopupMenu[uiChatMode].m_pObject->vfptr;
  kBody.iPopupMenuID = 20;
  kBody.bCheck = (uiOpt >> 5) & 1;
  if ( *(_DWORD *)(v7 + 4) )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v7 + 4) + 4))(16, &kBody, v7);
    if ( *(_DWORD *)(v7 + 4) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v7 + 4) + 16))(16, &kBody, v7);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v7 + 16))(v7, 16, &kBody, v7);
  v8 = (int)&v3->m_spChatFilterPopupMenu[uiChatMode].m_pObject->vfptr;
  kBody.iPopupMenuID = 21;
  kBody.bCheck = (uiOpt >> 12) & 1;
  if ( *(_DWORD *)(v8 + 4) )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v8 + 4) + 4))(16, &kBody, v8);
    if ( *(_DWORD *)(v8 + 4) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v8 + 4) + 16))(16, &kBody, v8);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v8 + 16))(v8, 16, &kBody, v8);
  v9 = (int)&v3->m_spChatFilterPopupMenu[uiChatMode].m_pObject->vfptr;
  kBody.iPopupMenuID = 24;
  kBody.bCheck = (uiOpt >> 1) & 1;
  if ( *(_DWORD *)(v9 + 4) )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v9 + 4) + 4))(16, &kBody, v9);
    if ( *(_DWORD *)(v9 + 4) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v9 + 4) + 16))(16, &kBody, v9);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v9 + 16))(v9, 16, &kBody, v9);
  v10 = (int)&v3->m_spChatFilterPopupMenu[uiChatMode].m_pObject->vfptr;
  kBody.iPopupMenuID = 22;
  kBody.bCheck = (uiOpt >> 13) & 1;
  if ( *(_DWORD *)(v10 + 4) )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v10 + 4) + 4))(16, &kBody, v10);
    if ( *(_DWORD *)(v10 + 4) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v10 + 4) + 16))(16, &kBody, v10);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v10 + 16))(v10, 16, &kBody, v10);
}

//----- (005E90E0) --------------------------------------------------------
void __thiscall ChatDisplayWin2::AddOption(ChatDisplayWin2 *this, unsigned int uiOpt)
{
  this->m_aspChatBD[this->m_uiChatMode].m_pObject->m_uiOption |= uiOpt;
}

//----- (005E9100) --------------------------------------------------------
void __thiscall ChatDisplayWin2::RemoveOption(ChatDisplayWin2 *this, unsigned int uiOpt)
{
  this->m_aspChatBD[this->m_uiChatMode].m_pObject->m_uiOption &= ~uiOpt;
}

//----- (005E9120) --------------------------------------------------------
char *__thiscall ChatDisplayWin2::GetCurrentChatText(ChatDisplayWin2 *this)
{
  return (char *)((int (*)(void))this->m_spEdit.m_pObject->vfptr[113].__vecDelDtor)();
}

//----- (005E9130) --------------------------------------------------------
BOOL ChatDisplayWin2::IsAutoHideOptionSetted()
{
  return byte_B4FF8E == 0;
}
// B4FF8E: using guessed type char byte_B4FF8E;

//----- (005E9140) --------------------------------------------------------
char __thiscall ChatDisplayWin2::GetCursorStateOnPanel(ChatDisplayWin2 *this)
{
  char v1; // bl@1
  FrameBoxWin *v3; // ecx@3

  v1 = 0;
  if ( this->m_kAlphaControl.fAlphaValue < 1.0 )
    return 0;
  v3 = this->m_pkChattingBox;
  if ( v3 )
  {
    if ( v3->m_bIsDuringSizeDrag )
      return 2;
    if ( (unsigned __int8)FrameBoxWin::SizeDragHitTest(v3) )
      v1 = 1;
  }
  return v1;
}

//----- (005E9180) --------------------------------------------------------
void __thiscall ChatDisplayWin2::AddRoarChat(ChatDisplayWin2 *this, char *pcFormat)
{
  ChatDisplayWin2 *v2; // esi@1
  char str[256]; // [sp+8h] [bp-104h]@1

  v2 = this;
  vsprintf(str, pcFormat, str);
  ChatBoardFlex::RoarAdd(v2->m_aspChatBD[0].m_pObject, (ChatBoardFlex::Type)4112, str);
}

//----- (005E91E0) --------------------------------------------------------
void __thiscall ChatDisplayWin2::ProcessMeInput(ChatDisplayWin2 *this, bool *bHit)
{
  ChatDisplayWin2 *v2; // ebx@1
  PgWinBut **v3; // edi@3
  NiRefObjectVtbl *v4; // esi@4
  unsigned __int8 v5; // al@4
  bool *bHita; // [sp+Ch] [bp+8h]@3

  v2 = this;
  PgWinFrame::ProcessMeInput((PgWinFrame *)&this->vfptr, bHit);
  if ( g_pkKeyboard->m_aucKeystate[0] & 2
    && (unsigned __int8)((int (*)(void))v2->m_pkChatCommandSprWin->vfptr[65].__vecDelDtor)() )
  {
    BYTE3(PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID)[73].m_kMsgQ.m_uiAlloced) = 0;
    ((void (__stdcall *)(_DWORD))v2->m_pkChatCommandSprWin->vfptr[64].__vecDelDtor)(0);
    v3 = v2->m_pkChatCmdBut;
    bHita = (bool *)11;
    do
    {
      v4 = (*v3)->vfptr;
      v5 = ((int (*)(void))v2->m_pkChatCommandSprWin->vfptr[65].__vecDelDtor)();
      v4[64].__vecDelDtor((NiRefObject *)*v3, v5);
      ++v3;
      --bHita;
    }
    while ( bHita );
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (005E9290) --------------------------------------------------------
bool __thiscall ChatDisplayWin2::IsSpamFilterOnBoard(ChatDisplayWin2 *this, int iChatBDIndex)
{
  ChatBoardFlex *v2; // eax@1
  bool result; // al@2

  v2 = this->m_aspChatBD[iChatBDIndex].m_pObject;
  if ( v2 )
    result = v2->m_Filter;
  else
    result = 0;
  return result;
}

//----- (005E92C0) --------------------------------------------------------
char __thiscall ChatDisplayWin2::SpamFilterPass(ChatDisplayWin2 *this, int iChatBDIndex, char *pcNewStr)
{
  int v3; // ebx@1
  ChatDisplayWin2 *v4; // esi@1
  ChatBoardFlex *v5; // eax@1
  ChatBoardFlex *v7; // ecx@6
  int v8; // edi@6
  char *v9; // eax@9
  char *v10; // eax@10
  char *v11; // ebx@10
  char *v12; // eax@10
  char *v13; // eax@10
  float v14; // ST1C_4@16
  float fNowTime; // [sp+8h] [bp-2Ch]@5
  char acCharName[20]; // [sp+1Ch] [bp-18h]@5

  v3 = iChatBDIndex;
  v4 = this;
  v5 = this->m_aspChatBD[iChatBDIndex].m_pObject;
  if ( !v5 )
    return 0;
  if ( !v5->m_Filter )
    return 1;
  *(_DWORD *)&acCharName[1] = 0;
  fNowTime = Timer::ms_fCurTime;
  *(_DWORD *)&acCharName[5] = 0;
  *(_DWORD *)&acCharName[9] = 0;
  *(_DWORD *)&acCharName[13] = 0;
  *(_WORD *)&acCharName[17] = 0;
  acCharName[19] = 0;
  acCharName[0] = 0;
  ChatDisplayWin2::GetCharName(acCharName, pcNewStr);
  if ( !acCharName[0] )
    return 1;
  v7 = v4->m_aspChatBD[iChatBDIndex].m_pObject;
  v8 = 0;
  if ( v7->m_MaxTextLine <= 0 )
    return 1;
  while ( 1 )
  {
    if ( 0.0 == ChatBoardFlex::GetSetTextTime(v7, v8) )
      goto LABEL_18;
    if ( fNowTime - ChatBoardFlex::GetSetTextTime(v4->m_aspChatBD[v3].m_pObject, v8) > 30.0 )
      goto LABEL_18;
    v9 = ChatBoardFlex::GetChatText(v4->m_aspChatBD[v3].m_pObject, v8);
    if ( !ChatDisplayWin2::IsSameCharName(acCharName, v9) )
      goto LABEL_18;
    strchr(pcNewStr, 58);
    v11 = v10;
    v12 = ChatBoardFlex::GetChatText(v4->m_aspChatBD[iChatBDIndex].m_pObject, v8);
    strchr(v12, 58);
    if ( v11 )
      v11 += 2;
    if ( v13 )
      v13 += 2;
    CLCS::LCSExecute(&v4->m_kSpamFilter, v11, v13);
    if ( pcNewStr )
      ChatBoardFlex::GetChatText(v4->m_aspChatBD[iChatBDIndex].m_pObject, v8);
    v14 = 100.0 - (double)(5 * v4->m_pkSpamFilterSlide->m_nCurPos);
    if ( v14 <= CLCS::GetCompDoubtPercentLower(&v4->m_kSpamFilter) )
      return 0;
    v3 = iChatBDIndex;
LABEL_18:
    v7 = v4->m_aspChatBD[v3].m_pObject;
    if ( ++v8 >= v7->m_MaxTextLine )
      return 1;
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (005E94A0) --------------------------------------------------------
void __thiscall ChatDisplayWin2::OpenSpamFilterWin(ChatDisplayWin2 *this, int b)
{
  ChatDisplayWin2 *v2; // esi@1
  PgFrameWork *v3; // ecx@2

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkSpamFilterPanel->vfptr[64].__vecDelDtor)(b);
  ((void (__stdcall *)(_DWORD))v2->m_pkTextSFOnOff->vfptr[64].__vecDelDtor)(b);
  ((void (__stdcall *)(_DWORD))v2->m_pkSpamFilterOnOff->vfptr[64].__vecDelDtor)(b);
  ((void (__stdcall *)(_DWORD))v2->m_pkTextSFMsgShow->vfptr[64].__vecDelDtor)(b);
  ((void (__stdcall *)(_DWORD))v2->m_pkSpamFilterMsgShow->vfptr[64].__vecDelDtor)(b);
  ((void (__stdcall *)(_DWORD))v2->m_pkTextSFSlide->vfptr[64].__vecDelDtor)(b);
  ((void (__stdcall *)(_DWORD))v2->m_pkSpamFilterSlide->vfptr[64].__vecDelDtor)(b);
  if ( !(_BYTE)b )
  {
    v3 = v2->m_pkFrameWork;
    GameFrameWork::NcMistSetChatBlockSpamFilterCmd(
      v2->m_pkSpamFilterMsgShow->m_bCheck,
      v2->m_pkSpamFilterOnOff->m_bCheck,
      (signed int)(100.0 - (double)(5 * v2->m_pkSpamFilterSlide->m_nCurPos)));
  }
}

//----- (005E9590) --------------------------------------------------------
void __thiscall ChatDisplayWin2::SetSpamFilteredTextShow(ChatDisplayWin2 *this, bool b)
{
  this->m_aspChatBD[0].m_pObject->m_FilteredTextShow = b;
  this->m_pkSpamFilterMsgShow->m_bCheck = b;
}

//----- (005E95C0) --------------------------------------------------------
void __thiscall ChatDisplayWin2::SetSpamBlockRate(ChatDisplayWin2 *this, float fRate)
{
  int v2; // esi@1
  ChatDisplayWin2 *v3; // edi@1
  PgWin *v4; // edi@3
  char *v5; // eax@3

  v2 = 0;
  v3 = this;
  if ( 100.0 != fRate )
    v2 = (signed int)((fRate * -1.0 + 100.0) / 5.0);
  SlideBar::SetCurPos(this->m_pkSpamFilterSlide, v2);
  v4 = (PgWin *)&v3->m_spkSpamSlideSpr.m_pObject->vfptr;
  v5 = fs("%d", v2);
  PgWin::SetToolTipWinText(v4, v5);
}

//----- (005E9630) --------------------------------------------------------
void __thiscall ChatDisplayWin2::SetEditFocus(ChatDisplayWin2 *this, const bool b)
{
  NiRefObjectVtbl *v2; // eax@1

  v2 = this->m_spEdit.m_pObject->vfptr;
  if ( b )
    ((void (*)(void))v2[120].__vecDelDtor)();
  else
    ((void (__stdcall *)(_DWORD))v2[121].__vecDelDtor)(1);
}

//----- (005E9660) --------------------------------------------------------
bool __thiscall ChatDisplayWin2::IsItemLinkInfo(ChatDisplayWin2 *this)
{
  return this->m_listItemLinkStruct._Mysize != 0;
}

//----- (005E9670) --------------------------------------------------------
void __thiscall ChatDisplayWin2::AddChatBoardFlexIItemLink(ChatDisplayWin2 *this, ChatBoardFlex::Type eType, SHINE_ITEM_STRUCT *pItem)
{
  ChatBoardFlex **v3; // esi@2
  signed int v4; // edi@2

  if ( pItem )
  {
    v3 = (ChatBoardFlex **)this->m_aspChatBD;
    v4 = 5;
    do
    {
      ChatBoardFlex::AddItemLinkInfo(*v3, eType, pItem);
      ++v3;
      --v4;
    }
    while ( v4 );
  }
}

//----- (005E96B0) --------------------------------------------------------
void __thiscall ChatDisplayWin2::ChatStart(ChatDisplayWin2 *this, const char *szText)
{
  ChatDisplayWin2 *v2; // esi@1
  PgEditWin *v3; // eax@1
  GameFrameWork *v4; // eax@3

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->m_spEdit.m_pObject->vfptr[64].__vecDelDtor)(1);
  v3 = v2->m_spEdit.m_pObject->m_spEditWin.m_pObject;
  v3->m_bStrClip = 1;
  v3->m_uiMaxEditWidth = 423;
  ((void (*)(void))v2->m_spEdit.m_pObject->vfptr[120].__vecDelDtor)();
  ((void (__stdcall *)(_DWORD))v2->m_pkChatEditBox->vfptr[64].__vecDelDtor)(1);
  if ( szText )
    ((void (__stdcall *)(_DWORD))v2->m_spEdit.m_pObject->vfptr[116].__vecDelDtor)(szText);
  v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v4 )
    GameFrameWork::OpenPlayGuideWin(v4, BIL_CHAT_1);
}

//----- (005E9740) --------------------------------------------------------
void __thiscall ChatDisplayWin2::AddNormalChat(ChatDisplayWin2 *this, char *pcFormat)
{
  char *v2; // esi@1
  ChatBoardFlex **v3; // ebx@1
  const char *v4; // eax@6
  char *v5; // ecx@6
  char v6; // dl@7
  unsigned int v7; // edi@8
  int v8; // edi@11
  char *v9; // eax@14
  char *v10; // eax@15
  char *v11; // esi@15
  char *v12; // eax@15
  char *v13; // eax@15
  int v14; // esi@21
  double v15; // st7@21
  int v16; // eax@21
  float v17; // ST20_4@21
  bool v18; // zf@25
  float v19; // [sp+Ch] [bp-34h]@4
  signed int v20; // [sp+18h] [bp-28h]@1
  ChatDisplayWin2 *v21; // [sp+20h] [bp-20h]@1
  ChatBoardFlex **v22; // [sp+24h] [bp-1Ch]@1
  char dest; // [sp+28h] [bp-18h]@4
  int v24; // [sp+29h] [bp-17h]@4
  int v25; // [sp+2Dh] [bp-13h]@4
  int v26; // [sp+31h] [bp-Fh]@4
  int v27; // [sp+35h] [bp-Bh]@4
  __int16 v28; // [sp+39h] [bp-7h]@4
  char v29; // [sp+3Bh] [bp-5h]@4

  v2 = pcFormat;
  v3 = (ChatBoardFlex **)this->m_aspChatBD;
  v21 = this;
  v22 = (ChatBoardFlex **)this->m_aspChatBD;
  v20 = 5;
  do
  {
    if ( *v3 )
    {
      if ( !(*v3)->m_Filter )
        goto LABEL_23;
      v19 = Timer::ms_fCurTime;
      dest = 0;
      v24 = 0;
      v25 = 0;
      v26 = 0;
      v27 = 0;
      v28 = 0;
      v29 = 0;
      if ( v2 )
      {
        if ( *v2 == 91 )
        {
          strchr(v2, 93);
          v5 = v2 + 1;
          do
            v6 = *v5++;
          while ( v6 );
          v7 = v5 - (v2 + 2) - strlen(v4);
          if ( v7 <= 0x14 )
            strncpy(&dest, v2 + 1, v7);
        }
      }
      if ( !dest || (v8 = 0, (*v3)->m_MaxTextLine <= 0) )
      {
LABEL_23:
        ChatBoardFlex::AddUserChat(*v3, v2);
        goto LABEL_25;
      }
      while ( 1 )
      {
        if ( 0.0 != ChatBoardFlex::GetSetTextTime(*v3, v8) && v19 - ChatBoardFlex::GetSetTextTime(*v3, v8) <= 30.0 )
        {
          v9 = ChatBoardFlex::GetChatText(*v3, v8);
          if ( ChatDisplayWin2::IsSameCharName(&dest, v9) )
          {
            strchr(v2, 58);
            v11 = v10;
            v12 = ChatBoardFlex::GetChatText(*v3, v8);
            strchr(v12, 58);
            if ( v11 )
              v11 += 2;
            if ( v13 )
              v13 += 2;
            CLCS::LCSExecute(&v21->m_kSpamFilter, v11, v13);
            if ( pcFormat )
              ChatBoardFlex::GetChatText(*v22, v8);
            v14 = v21->m_pkSpamFilterSlide->m_nCurPos;
            v15 = CLCS::GetCompDoubtPercentLower(&v21->m_kSpamFilter);
            v3 = v22;
            v16 = 5 * v14;
            v2 = pcFormat;
            v17 = 100.0 - (double)v16;
            if ( v17 <= v15 )
              break;
          }
        }
        if ( ++v8 >= (*v3)->m_MaxTextLine )
          goto LABEL_23;
      }
    }
    ChatBoardFlex::AddUserChat(*v3, (ChatBoardFlex::Type)24576, v2);
LABEL_25:
    ++v3;
    v18 = v20-- == 1;
    v22 = v3;
  }
  while ( !v18 );
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (005E9940) --------------------------------------------------------
void __thiscall ChatDisplayWin2::AddNormalChat(ChatDisplayWin2 *this, char *pcFormat, char kChatID)
{
  char *v3; // esi@1
  ChatBoardFlex **v4; // ebx@1
  const char *v5; // eax@6
  char *v6; // ecx@6
  char v7; // dl@7
  unsigned int v8; // edi@8
  int v9; // edi@11
  char *v10; // eax@14
  char *v11; // eax@15
  char *v12; // esi@15
  char *v13; // eax@15
  char *v14; // eax@15
  int v15; // esi@21
  double v16; // st7@21
  int v17; // eax@21
  float v18; // ST20_4@21
  bool v19; // zf@25
  float v20; // [sp+Ch] [bp-34h]@4
  signed int v21; // [sp+18h] [bp-28h]@1
  ChatDisplayWin2 *v22; // [sp+20h] [bp-20h]@1
  ChatBoardFlex **v23; // [sp+24h] [bp-1Ch]@1
  char dest; // [sp+28h] [bp-18h]@4
  int v25; // [sp+29h] [bp-17h]@4
  int v26; // [sp+2Dh] [bp-13h]@4
  int v27; // [sp+31h] [bp-Fh]@4
  int v28; // [sp+35h] [bp-Bh]@4
  __int16 v29; // [sp+39h] [bp-7h]@4
  char v30; // [sp+3Bh] [bp-5h]@4

  v3 = pcFormat;
  v4 = (ChatBoardFlex **)this->m_aspChatBD;
  v22 = this;
  v23 = (ChatBoardFlex **)this->m_aspChatBD;
  v21 = 5;
  do
  {
    if ( *v4 )
    {
      if ( !(*v4)->m_Filter )
        goto LABEL_23;
      v20 = Timer::ms_fCurTime;
      dest = 0;
      v25 = 0;
      v26 = 0;
      v27 = 0;
      v28 = 0;
      v29 = 0;
      v30 = 0;
      if ( v3 )
      {
        if ( *v3 == 91 )
        {
          strchr(v3, 93);
          v6 = v3 + 1;
          do
            v7 = *v6++;
          while ( v7 );
          v8 = v6 - (v3 + 2) - strlen(v5);
          if ( v8 <= 0x14 )
            strncpy(&dest, v3 + 1, v8);
        }
      }
      if ( !dest || (v9 = 0, (*v4)->m_MaxTextLine <= 0) )
      {
LABEL_23:
        ChatBoardFlex::AddUserChat(*v4, v3, kChatID);
        goto LABEL_25;
      }
      while ( 1 )
      {
        if ( 0.0 != ChatBoardFlex::GetSetTextTime(*v4, v9) && v20 - ChatBoardFlex::GetSetTextTime(*v4, v9) <= 30.0 )
        {
          v10 = ChatBoardFlex::GetChatText(*v4, v9);
          if ( ChatDisplayWin2::IsSameCharName(&dest, v10) )
          {
            strchr(v3, 58);
            v12 = v11;
            v13 = ChatBoardFlex::GetChatText(*v4, v9);
            strchr(v13, 58);
            if ( v12 )
              v12 += 2;
            if ( v14 )
              v14 += 2;
            CLCS::LCSExecute(&v22->m_kSpamFilter, v12, v14);
            if ( pcFormat )
              ChatBoardFlex::GetChatText(*v23, v9);
            v15 = v22->m_pkSpamFilterSlide->m_nCurPos;
            v16 = CLCS::GetCompDoubtPercentLower(&v22->m_kSpamFilter);
            v4 = v23;
            v17 = 5 * v15;
            v3 = pcFormat;
            v18 = 100.0 - (double)v17;
            if ( v18 <= v16 )
              break;
          }
        }
        if ( ++v9 >= (*v4)->m_MaxTextLine )
          goto LABEL_23;
      }
    }
    ChatBoardFlex::AddUserChat(*v4, (ChatBoardFlex::Type)24576, v3, kChatID);
LABEL_25:
    ++v4;
    v19 = v21-- == 1;
    v23 = v4;
  }
  while ( !v19 );
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (005E9B50) --------------------------------------------------------
void __thiscall ChatDisplayWin2::AddOtherNormalChat(ChatDisplayWin2 *this, char *pcFormat, char kChatID)
{
  char *v3; // esi@1
  ChatBoardFlex **v4; // ebx@1
  const char *v5; // eax@6
  char *v6; // ecx@6
  char v7; // dl@7
  unsigned int v8; // edi@8
  int v9; // edi@11
  char *v10; // eax@14
  char *v11; // eax@15
  char *v12; // esi@15
  char *v13; // eax@15
  char *v14; // eax@15
  int v15; // esi@21
  double v16; // st7@21
  int v17; // edx@21
  float v18; // ST20_4@21
  float v19; // [sp+Ch] [bp-30h]@4
  signed int v20; // [sp+18h] [bp-24h]@1
  ChatDisplayWin2 *v21; // [sp+1Ch] [bp-20h]@1
  char dest; // [sp+24h] [bp-18h]@4
  int v23; // [sp+25h] [bp-17h]@4
  int v24; // [sp+29h] [bp-13h]@4
  int v25; // [sp+2Dh] [bp-Fh]@4
  int v26; // [sp+31h] [bp-Bh]@4
  __int16 v27; // [sp+35h] [bp-7h]@4
  char v28; // [sp+37h] [bp-5h]@4

  v3 = pcFormat;
  v21 = this;
  v4 = (ChatBoardFlex **)this->m_aspChatBD;
  v20 = 5;
  do
  {
    if ( *v4 )
    {
      if ( !(*v4)->m_Filter )
        goto LABEL_23;
      v19 = Timer::ms_fCurTime;
      dest = 0;
      v23 = 0;
      v24 = 0;
      v25 = 0;
      v26 = 0;
      v27 = 0;
      v28 = 0;
      if ( v3 )
      {
        if ( *v3 == 91 )
        {
          strchr(v3, 93);
          v6 = v3 + 1;
          do
            v7 = *v6++;
          while ( v7 );
          v8 = v6 - (v3 + 2) - strlen(v5);
          if ( v8 <= 0x14 )
            strncpy(&dest, v3 + 1, v8);
        }
      }
      if ( !dest || (v9 = 0, (*v4)->m_MaxTextLine <= 0) )
      {
LABEL_23:
        ChatBoardFlex::Add(*v4, (ChatBoardFlex::Type)512, v3, kChatID);
        goto LABEL_25;
      }
      while ( 1 )
      {
        if ( 0.0 != ChatBoardFlex::GetSetTextTime(*v4, v9) && v19 - ChatBoardFlex::GetSetTextTime(*v4, v9) <= 30.0 )
        {
          v10 = ChatBoardFlex::GetChatText(*v4, v9);
          if ( ChatDisplayWin2::IsSameCharName(&dest, v10) )
          {
            strchr(v3, 58);
            v12 = v11;
            v13 = ChatBoardFlex::GetChatText(*v4, v9);
            strchr(v13, 58);
            if ( v12 )
              v12 += 2;
            if ( v14 )
              v14 += 2;
            CLCS::LCSExecute(&v21->m_kSpamFilter, v12, v14);
            if ( pcFormat )
              ChatBoardFlex::GetChatText(*v4, v9);
            v15 = v21->m_pkSpamFilterSlide->m_nCurPos;
            v16 = CLCS::GetCompDoubtPercentLower(&v21->m_kSpamFilter);
            v17 = 5 * v15;
            v3 = pcFormat;
            v18 = 100.0 - (double)v17;
            if ( v18 <= v16 )
              break;
          }
        }
        if ( ++v9 >= (*v4)->m_MaxTextLine )
          goto LABEL_23;
      }
    }
    ChatBoardFlex::AddUserChat(*v4, (ChatBoardFlex::Type)24576, v3, kChatID);
LABEL_25:
    ++v4;
    --v20;
  }
  while ( v20 );
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (005E9D50) --------------------------------------------------------
void __thiscall ChatDisplayWin2::AddOtherNormalChat(ChatDisplayWin2 *this, char *pcFormat)
{
  char *v2; // esi@1
  ChatBoardFlex **v3; // ebx@1
  const char *v4; // eax@6
  char *v5; // ecx@6
  char v6; // dl@7
  unsigned int v7; // edi@8
  int v8; // edi@11
  char *v9; // eax@14
  char *v10; // eax@15
  char *v11; // esi@15
  char *v12; // eax@15
  char *v13; // eax@15
  int v14; // esi@21
  double v15; // st7@21
  int v16; // eax@21
  float v17; // ST20_4@21
  bool v18; // zf@25
  float v19; // [sp+Ch] [bp-34h]@4
  signed int v20; // [sp+18h] [bp-28h]@1
  ChatDisplayWin2 *v21; // [sp+20h] [bp-20h]@1
  ChatBoardFlex **v22; // [sp+24h] [bp-1Ch]@1
  char dest; // [sp+28h] [bp-18h]@4
  int v24; // [sp+29h] [bp-17h]@4
  int v25; // [sp+2Dh] [bp-13h]@4
  int v26; // [sp+31h] [bp-Fh]@4
  int v27; // [sp+35h] [bp-Bh]@4
  __int16 v28; // [sp+39h] [bp-7h]@4
  char v29; // [sp+3Bh] [bp-5h]@4

  v2 = pcFormat;
  v3 = (ChatBoardFlex **)this->m_aspChatBD;
  v21 = this;
  v22 = (ChatBoardFlex **)this->m_aspChatBD;
  v20 = 5;
  do
  {
    if ( *v3 )
    {
      if ( !(*v3)->m_Filter )
        goto LABEL_23;
      v19 = Timer::ms_fCurTime;
      dest = 0;
      v24 = 0;
      v25 = 0;
      v26 = 0;
      v27 = 0;
      v28 = 0;
      v29 = 0;
      if ( v2 )
      {
        if ( *v2 == 91 )
        {
          strchr(v2, 93);
          v5 = v2 + 1;
          do
            v6 = *v5++;
          while ( v6 );
          v7 = v5 - (v2 + 2) - strlen(v4);
          if ( v7 <= 0x14 )
            strncpy(&dest, v2 + 1, v7);
        }
      }
      if ( !dest || (v8 = 0, (*v3)->m_MaxTextLine <= 0) )
      {
LABEL_23:
        ChatBoardFlex::Add(*v3, (ChatBoardFlex::Type)512, v2);
        goto LABEL_25;
      }
      while ( 1 )
      {
        if ( 0.0 != ChatBoardFlex::GetSetTextTime(*v3, v8) && v19 - ChatBoardFlex::GetSetTextTime(*v3, v8) <= 30.0 )
        {
          v9 = ChatBoardFlex::GetChatText(*v3, v8);
          if ( ChatDisplayWin2::IsSameCharName(&dest, v9) )
          {
            strchr(v2, 58);
            v11 = v10;
            v12 = ChatBoardFlex::GetChatText(*v3, v8);
            strchr(v12, 58);
            if ( v11 )
              v11 += 2;
            if ( v13 )
              v13 += 2;
            CLCS::LCSExecute(&v21->m_kSpamFilter, v11, v13);
            if ( pcFormat )
              ChatBoardFlex::GetChatText(*v22, v8);
            v14 = v21->m_pkSpamFilterSlide->m_nCurPos;
            v15 = CLCS::GetCompDoubtPercentLower(&v21->m_kSpamFilter);
            v3 = v22;
            v16 = 5 * v14;
            v2 = pcFormat;
            v17 = 100.0 - (double)v16;
            if ( v17 <= v15 )
              break;
          }
        }
        if ( ++v8 >= (*v3)->m_MaxTextLine )
          goto LABEL_23;
      }
    }
    ChatBoardFlex::AddUserChat(*v3, (ChatBoardFlex::Type)24576, v2);
LABEL_25:
    ++v3;
    v18 = v20-- == 1;
    v22 = v3;
  }
  while ( !v18 );
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (005E9F50) --------------------------------------------------------
void __cdecl MoveChildrenWin2(PgWin *pkWin, int x, int y)
{
  PgWin *v3; // esi@1
  unsigned int i; // ebx@2
  int v5; // edi@3
  int v6; // eax@3
  NiPointer<NiAVObject> *v7; // ecx@4
  NiRTTI *v8; // eax@5
  unsigned int uiPos; // [sp+4h] [bp-4h]@1

  uiPos = 0;
  v3 = PgWin::GetNextChildWin(pkWin, &uiPos);
  if ( v3 )
  {
    for ( i = uiPos; ; ++i )
    {
      v5 = x + ((int (__thiscall *)(_DWORD))v3->vfptr[41].__vecDelDtor)(v3);
      v6 = ((int (__thiscall *)(_DWORD))v3->vfptr[42].__vecDelDtor)(v3);
      ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v3->vfptr[77].__vecDelDtor)(v3, v5, y + v6);
      if ( i >= pkWin->m_kChildren.m_uiSize )
        break;
      while ( 1 )
      {
        v7 = pkWin->m_kChildren.m_pBase;
        v3 = (PgWin *)v7[i].m_pObject;
        if ( v3 )
        {
          v8 = (NiRTTI *)((int (__thiscall *)(_DWORD))v3->vfptr[1].__vecDelDtor)(v7[i].m_pObject);
          if ( v8 )
            break;
        }
LABEL_8:
        if ( ++i >= pkWin->m_kChildren.m_uiSize )
          return;
      }
      while ( v8 != &PgWin::m_RTTI )
      {
        v8 = v8->m_pkBaseRTTI;
        if ( !v8 )
          goto LABEL_8;
      }
    }
  }
}

//----- (005EA000) --------------------------------------------------------
void __thiscall ChatDisplayWin2::SetChatMode(ChatDisplayWin2 *this, unsigned int uiChatMode)
{
  ChatDisplayWin2 *v2; // esi@1
  unsigned int v3; // edi@1
  int v4; // esi@5
  NiUnsharedGeometryGroup *v5; // edi@5
  CClientGuild *v6; // eax@10
  int v7; // esi@11
  NiUnsharedGeometryGroup *v8; // edi@11
  CClientGuildAcademy *v9; // eax@16
  int v10; // esi@17
  NiUnsharedGeometryGroup *v11; // edi@17

  v2 = this;
  v3 = this->m_uiChatMode;
  this->m_uiChatMode = uiChatMode;
  switch ( uiChatMode )
  {
    case 0u:
      TextData::Get(0xEF05252B);
      break;
    case 1u:
      TextData::Get(0xF54E1743);
      break;
    case 2u:
      if ( g_kParty.m_uiTotalMember )
      {
        TextData::Get(0xF605CB45);
      }
      else
      {
        TextData::Get(0xEF05252B);
        v2->m_uiChatMode = v3;
        v4 = (int)&v2->vfptr;
        v5 = TextData::Get(0x7D9CEEE9u);
        if ( *(_DWORD *)(v4 + 4) )
        {
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v4 + 4) + 4))(25, v5, v4);
          if ( *(_DWORD *)(v4 + 4) )
            (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v4 + 4) + 20))(25, v5, v4);
        }
        (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v4 + 20))(v4, 25, v5, v4);
      }
      break;
    case 3u:
      v6 = GuildTask::GetGuild();
      if ( (unsigned __int8)CClientGuild::AmIGuildMember(v6) )
      {
        TextData::Get(0xEEFCDF27);
      }
      else
      {
        TextData::Get(0xEF05252B);
        v2->m_uiChatMode = v3;
        v7 = (int)&v2->vfptr;
        v8 = TextData::Get(0x76816B99u);
        if ( *(_DWORD *)(v7 + 4) )
        {
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v7 + 4) + 4))(25, v8, v7);
          if ( *(_DWORD *)(v7 + 4) )
            (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v7 + 4) + 20))(25, v8, v7);
        }
        (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v7 + 20))(v7, 25, v8, v7);
      }
      break;
    case 4u:
      v9 = GuildAcademyTask::GetGuildAcademy();
      if ( !CClientGuildAcademy::AmIGuildAcademyMember(v9) )
      {
        v2->m_uiChatMode = v3;
        v10 = (int)&v2->vfptr;
        v11 = TextData::Get(0xB2EBE824);
        if ( *(_DWORD *)(v10 + 4) )
        {
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v10 + 4) + 4))(25, v11, v10);
          if ( *(_DWORD *)(v10 + 4) )
            (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v10 + 4) + 20))(25, v11, v10);
        }
        (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v10 + 20))(v10, 25, v11, v10);
      }
      break;
    default:
      this->m_uiChatMode = 0;
      break;
  }
}

//----- (005EA1E0) --------------------------------------------------------
void __thiscall ChatDisplayWin2::OnWhisperTab(ChatDisplayWin2 *this, bool bChatStart)
{
  ChatDisplayWin2 *v2; // esi@1
  EditWin *v3; // ecx@1
  char acname[21]; // [sp+4h] [bp-1Ch]@1

  v2 = this;
  *(Name5 *)acname = GameFrameWork::m_kWhisperCharID;
  v3 = this->m_pkChatNameEditBox;
  acname[20] = 0;
  ((void (__stdcall *)(_DWORD))v3->vfptr[115].__vecDelDtor)(acname);
  if ( bChatStart )
  {
    ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v2->vfptr[95].__vecDelDtor)(v2, 22, 1);
    ChatDisplayWin2::ChatStart(v2, &byte_9B16D9);
  }
}

//----- (005EA270) --------------------------------------------------------
void __thiscall ChatDisplayWin2::OnWhisperTabToTarget(ChatDisplayWin2 *this)
{
  unsigned int v1; // edi@1
  ChatDisplayWin2 *v2; // esi@1
  NiRefObjectVtbl *v3; // ST18_4@2
  int v4; // eax@2
  char *v5; // eax@2
  char dest[20]; // [sp+10h] [bp-18h]@2

  v1 = g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1];
  v2 = this;
  if ( v1 )
  {
    v3 = this->m_pkChatNameEditBox->vfptr;
    v4 = (*(int (__thiscall **)(unsigned int))(*(_DWORD *)v1 + 84))(v1);
    v3[115].__vecDelDtor((NiRefObject *)v2->m_pkChatNameEditBox, v4);
    v5 = (char *)(*(int (__thiscall **)(unsigned int))(*(_DWORD *)v1 + 84))(v1);
    *(_DWORD *)&dest[16] = 0;
    *(_QWORD *)&dest[8] = 0i64;
    *(_QWORD *)dest = 0i64;
    strncpy(dest, v5, 0x14u);
    GameFrameWork::m_kWhisperCharID = *(Name5 *)dest;
    ((void (__thiscall *)(ChatDisplayWin2 *, signed int, signed int))v2->vfptr[95].__vecDelDtor)(v2, 22, 1);
    ChatDisplayWin2::ChatStart(v2, &byte_9B16DA);
  }
}

//----- (005EA340) --------------------------------------------------------
void __thiscall ChatDisplayWin2::OnWhisperTabToTarget(ChatDisplayWin2 *this, char *pcName)
{
  ChatDisplayWin2 *v2; // esi@1
  char dest[20]; // [sp+8h] [bp-18h]@1

  v2 = this;
  CharMgr::GetChar(&g_kCharMgr, pcName);
  ((void (__stdcall *)(char *))v2->m_pkChatNameEditBox->vfptr[115].__vecDelDtor)(pcName);
  *(_DWORD *)&dest[16] = 0;
  *(_QWORD *)&dest[8] = 0i64;
  *(_QWORD *)dest = 0i64;
  strncpy(dest, pcName, 0x14u);
  GameFrameWork::m_kWhisperCharID = *(Name5 *)dest;
  ((void (__thiscall *)(ChatDisplayWin2 *, signed int, signed int))v2->vfptr[95].__vecDelDtor)(v2, 22, 1);
  ChatDisplayWin2::ChatStart(v2, &byte_9B16DB);
}

//----- (005EA3F0) --------------------------------------------------------
int __thiscall ChatDisplayWin2::PositionCarretItemLink(ChatDisplayWin2 *this)
{
  ChatDisplayWin2 *v1; // esi@1
  signed int v2; // ebx@1
  int v3; // edi@1
  int v4; // eax@1
  int i; // ecx@1

  v1 = this;
  v2 = 0;
  v3 = PgEditWin::GetCaretPos(this->m_spEdit.m_pObject->m_spEditWin.m_pObject);
  v4 = ((int (*)(void))v1->m_spEdit.m_pObject->m_spEditWin.m_pObject->vfptr[4].__vecDelDtor)();
  for ( i = 0; i < v3; ++i )
  {
    if ( *(_BYTE *)(i + v4) == 9 )
      ++v2;
  }
  return v2 / 2;
}

//----- (005EA440) --------------------------------------------------------
char __thiscall ChatDisplayWin2::Create(ChatDisplayWin2 *this, PgFrameWork *pkFrameWork)
{
  ChatDisplayWin2 *v2; // esi@1
  NiNode *v3; // esi@2
  LONG v4; // eax@3
  bool v5; // zf@5
  NiTexturePalette *v7; // ebx@9
  const char *v8; // eax@11
  NiMaterialProperty *v9; // eax@12
  int v10; // eax@13
  NiMaterialProperty *v11; // edi@15
  int v12; // eax@20
  NiMaterialProperty *v13; // eax@22
  float v14; // ecx@22
  NiMaterialProperty *v15; // eax@22
  float v16; // edx@22
  NiMaterialProperty *v17; // eax@22
  float v18; // ecx@22
  NiMaterialProperty *v19; // eax@22
  NiMaterialProperty *v20; // eax@22
  int v21; // eax@23
  NiMaterialProperty *v22; // edi@25
  NiMaterialProperty *v23; // eax@33
  float v24; // ecx@33
  NiMaterialProperty *v25; // eax@33
  float v26; // edx@33
  NiMaterialProperty *v27; // eax@33
  float v28; // ecx@33
  NiSourceTexture *v29; // edx@33
  NiMaterialProperty *v30; // eax@33
  PgSprData *v31; // eax@33
  NiNode *v32; // esi@34
  char *v33; // eax@39
  int v34; // edx@39
  int v35; // ebx@39
  unsigned int v36; // eax@41
  NiSourceTexture *v37; // eax@41
  FrameBoxWin *v38; // eax@41
  float fRate; // ST70_4@41
  unsigned int v40; // ecx@41
  PgFont *v41; // eax@41
  FrameBoxWin *v42; // ecx@42
  unsigned int v43; // eax@42
  FrameBoxWin *v44; // ecx@42
  NiPointer<NiD3DDefaultShader> *v45; // edi@42
  FrameBoxWin *v46; // ebx@43
  int v47; // eax@43
  unsigned int v48; // ecx@43
  FrameBoxWin *v49; // ebx@43
  NiRefObjectVtbl *v50; // edx@43
  int v51; // eax@43
  unsigned int v52; // ecx@43
  FrameBoxWin *v53; // ebx@43
  int v54; // eax@43
  FrameBoxWin *v55; // ecx@43
  int v56; // edx@43
  NiPointer<NiRoom> v57; // ecx@43
  int v58; // ST64_4@43
  unsigned int v59; // ST60_4@43
  int v60; // ST5C_4@43
  int v61; // eax@43
  NiD3DDefaultShader *v62; // eax@43
  int v63; // edi@44
  int v64; // eax@44
  PgWinProxy *v65; // eax@44
  int v66; // edi@44
  int (*v67)(void); // eax@44
  int v68; // eax@44
  int v69; // ebx@44
  char *v70; // eax@44
  NiSourceTexture *v71; // edx@44
  PgWinBut *v72; // eax@44
  char *v73; // eax@44
  PgSprData *v74; // ebx@44
  PgWinBut *v75; // eax@44
  char *v76; // eax@44
  PgSprData *v77; // eax@44
  PgWinSpr *v78; // eax@44
  NiProperty *v79; // ST70_4@44
  PgSprData *v80; // eax@44
  PgSprData *v81; // ebx@44
  SlideBar *v82; // eax@44
  NiD3DDefaultShader *v83; // eax@44
  PgSprData::PgHitTester *v84; // eax@46
  unsigned int v85; // edi@46
  unsigned int v86; // ebx@46
  PgWin *v87; // ST68_4@46
  PgFont *v88; // eax@46
  PgWinText *v89; // eax@46
  NiRefObjectVtbl *v90; // edi@46
  NiUnsharedGeometryGroup *v91; // eax@46
  PgSprData *v92; // edi@46
  ColumnBut *v93; // eax@46
  NiPointer<PgSprData::PgHitTester> *v94; // edx@46
  unsigned int v95; // edi@46
  unsigned int v96; // ebx@46
  PgWin *v97; // ST68_4@46
  PgFont *v98; // eax@46
  PgWinText *v99; // eax@46
  NiRefObjectVtbl *v100; // edi@46
  NiUnsharedGeometryGroup *v101; // eax@46
  PgSprData *v102; // edi@46
  ColumnBut *v103; // eax@46
  NiPointer<PgSprData::PgHitTester> *v104; // edx@46
  unsigned int v105; // edi@46
  unsigned int v106; // ebx@46
  PgWin *v107; // ST68_4@46
  PgFont *v108; // eax@46
  PgWinText *v109; // eax@46
  NiRefObjectVtbl *v110; // edi@46
  NiUnsharedGeometryGroup *v111; // eax@46
  bool v112; // al@46
  bool v113; // al@46
  PgFont *v114; // edi@46
  NiNode *v115; // ebx@47
  const char *v116; // eax@47
  PgSprData *v117; // eax@47
  PgWinBut *v118; // ST68_4@47
  PgWinBut *v119; // ebx@47
  PgFont *v120; // ST64_4@47
  unsigned int v121; // ST60_4@47
  unsigned int v122; // eax@47
  PgWinText *v123; // eax@47
  NiPointer<NiRoom> v124; // ebx@47
  NiRefObjectVtbl *v125; // ebx@52
  PgFont *v126; // eax@52
  NiRefObjectVtbl *v127; // edi@53
  NiUnsharedGeometryGroup *v128; // eax@53
  PgWinText *v129; // ecx@53
  PgSprData *v130; // edi@60
  PgWinBut *v131; // eax@60
  unsigned int v132; // edi@60
  PgWinBut *v133; // ebx@60
  char *v134; // eax@65
  PgFont *v135; // edi@65
  PgSprData *v136; // eax@68
  PgWinSpr *v137; // eax@68
  NiProperty *v138; // ST70_4@68
  NiNode *v139; // ebx@69
  const char *v140; // eax@69
  PgSprData *v141; // ebx@69
  const char *v142; // eax@69
  const char *v143; // eax@69
  PgWinBut *v144; // eax@69
  int v145; // ebx@69
  PgWinBut *v146; // ebx@74
  PgWin *v147; // ST68_4@74
  PgFont *v148; // ST64_4@74
  unsigned int v149; // ST60_4@74
  unsigned int v150; // eax@74
  PgWinText *v151; // eax@74
  NiRefObjectVtbl *v152; // ebx@74
  PgFont *v153; // eax@74
  PgWinBut *v154; // ebx@74
  PgWin *v155; // ST68_4@74
  PgFont *v156; // ST64_4@74
  unsigned int v157; // ST60_4@74
  unsigned int v158; // eax@74
  PgWinText *v159; // eax@74
  NiRefObjectVtbl *v160; // edi@75
  NiUnsharedGeometryGroup *v161; // eax@75
  NiRefObjectVtbl *v162; // edi@76
  NiUnsharedGeometryGroup *v163; // eax@76
  NiUnsharedGeometryGroup *v164; // ST70_4@76
  NiUnsharedGeometryGroup *v165; // eax@76
  char *v166; // eax@76
  PgWin *v167; // ecx@76
  NiRefObjectVtbl *v168; // edi@77
  NiUnsharedGeometryGroup *v169; // eax@77
  NiUnsharedGeometryGroup *v170; // eax@77
  NiRefObjectVtbl *v171; // edi@78
  NiUnsharedGeometryGroup *v172; // eax@78
  NiUnsharedGeometryGroup *v173; // eax@78
  NiRefObjectVtbl *v174; // edi@79
  NiUnsharedGeometryGroup *v175; // eax@79
  NiUnsharedGeometryGroup *v176; // eax@79
  NiRefObjectVtbl *v177; // edi@80
  NiUnsharedGeometryGroup *v178; // eax@80
  NiRefObjectVtbl *v179; // edi@80
  NiUnsharedGeometryGroup *v180; // eax@80
  char *v181; // eax@80
  NiUnsharedGeometryGroup *v182; // ST70_4@80
  NiUnsharedGeometryGroup *v183; // eax@80
  NiRefObjectVtbl *v184; // edi@81
  NiUnsharedGeometryGroup *v185; // eax@81
  NiUnsharedGeometryGroup *v186; // eax@81
  char *v187; // eax@81
  NiRefObjectVtbl *v188; // edi@82
  NiUnsharedGeometryGroup *v189; // eax@82
  NiRefObjectVtbl *v190; // edi@83
  NiUnsharedGeometryGroup *v191; // eax@83
  NiUnsharedGeometryGroup *v192; // eax@83
  NiRefObjectVtbl *v193; // edi@84
  NiUnsharedGeometryGroup *v194; // eax@84
  NiUnsharedGeometryGroup *v195; // eax@84
  NiRefObjectVtbl *v196; // edi@85
  NiUnsharedGeometryGroup *v197; // eax@85
  NiRefObjectVtbl *v198; // edi@85
  NiUnsharedGeometryGroup *v199; // eax@85
  char *v200; // eax@85
  NiUnsharedGeometryGroup *v201; // ST70_4@85
  NiUnsharedGeometryGroup *v202; // eax@85
  char *v203; // eax@85
  PgSprData *v204; // edi@88
  ColumnBut *v205; // eax@88
  unsigned int v206; // edi@88
  ColumnBut *v207; // ebx@88
  char *v208; // eax@93
  int v209; // ST64_4@93
  int v210; // eax@93
  PgWinProxy *v211; // eax@93
  int v212; // edi@93
  NiSourceTexture *v213; // eax@94
  PopupMenuWin *v214; // eax@94
  PopupMenuWin *v215; // ebx@94
  int v216; // eax@99
  char *v217; // eax@101
  PopupMenuTextCheck *v218; // eax@101
  char *v219; // eax@101
  PopupMenuTextCheck *v220; // eax@101
  char *v221; // eax@101
  PopupMenuTextCheck *v222; // eax@101
  char *v223; // eax@101
  PopupMenuTextCheck *v224; // eax@101
  char *v225; // eax@101
  PopupMenuTextCheck *v226; // eax@101
  char *v227; // eax@101
  PopupMenuTextCheck *v228; // eax@101
  char *v229; // eax@101
  PopupMenuTextCheck *v230; // eax@101
  char *v231; // eax@102
  PopupMenuTextCheck *v232; // eax@102
  NiSourceTexture *v233; // eax@104
  PopupMenuWin *v234; // eax@104
  PopupMenuWin *v235; // edi@104
  int v236; // eax@109
  int v237; // eax@111
  unsigned int v238; // ebx@114
  int v239; // edi@114
  char *v240; // eax@115
  PopupMenuText *v241; // eax@119
  FrameBoxWin *v242; // edi@121
  int v243; // eax@121
  int v244; // edi@121
  int v245; // eax@121
  PgWinProxy *v246; // eax@121
  int v247; // eax@121
  PgFont *v248; // ebx@121
  int (*v249)(void); // eax@121
  PgSprData *v250; // edi@121
  PgWinBut *v251; // ebx@121
  int v252; // edi@121
  NiTListItem<NiPointer<NiProperty> > *(__thiscall *v253)(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> > *); // eax@123
  int v254; // eax@123
  int v255; // eax@123
  NiTListItem<NiPointer<NiProperty> > *v256; // eax@130
  NiTListItem<NiPointer<NiProperty> > *v257; // ecx@130
  PgSprData *v258; // edi@136
  PgWinBut *v259; // eax@136
  int v260; // edi@136
  PgWinBut *v261; // ebx@136
  NiTListItem<NiPointer<NiProperty> > *(__thiscall *v262)(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> > *); // edx@138
  int v263; // eax@138
  int v264; // eax@138
  int v265; // eax@143
  NiTListItem<NiPointer<NiProperty> > *v266; // ecx@146
  PgSprData *v267; // edi@152
  PgWinBut *v268; // eax@152
  int v269; // edi@152
  PgWinBut *v270; // ebx@152
  NiTListItem<NiPointer<NiProperty> > *(__thiscall *v271)(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> > *); // eax@154
  int v272; // eax@154
  int v273; // eax@154
  int v274; // eax@159
  NiTListItem<NiPointer<NiProperty> > *v275; // ecx@162
  NiSourceTexture *v276; // eax@172
  int v277; // ecx@172
  PgWin *v278; // ST68_4@172
  int v279; // edx@172
  FrameBoxWin *v280; // eax@172
  float v281; // ST70_4@172
  unsigned int v282; // ecx@172
  int v283; // edi@172
  FrameBoxWin *v284; // ebx@172
  NiTListItem<NiPointer<NiProperty> > *(__thiscall *v285)(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> > *); // eax@174
  int v286; // eax@174
  int v287; // eax@174
  int v288; // eax@179
  NiTListItem<NiPointer<NiProperty> > *v289; // ecx@182
  int v290; // ebx@188
  PgFont *v291; // edi@188
  EditWin *v292; // eax@188
  NiSourceTexture *v293; // eax@189
  PgWin *v294; // ST68_4@189
  int v295; // ST64_4@189
  int v296; // ST60_4@189
  FrameBoxWin *v297; // eax@189
  float v298; // ST70_4@189
  unsigned int v299; // ecx@189
  int v300; // edi@189
  FrameBoxWin *v301; // ebx@189
  NiTListItem<NiPointer<NiProperty> > *(__thiscall *v302)(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> > *); // eax@191
  int v303; // eax@191
  int v304; // eax@191
  int v305; // eax@196
  NiTListItem<NiPointer<NiProperty> > *v306; // ecx@199
  int v307; // ebx@205
  PgSprData *v308; // edi@205
  PgWinBut *v309; // eax@205
  int v310; // edi@205
  int (*v311)(void); // edx@207
  int v312; // eax@207
  int v313; // eax@207
  int v314; // ecx@212
  int v315; // eax@215
  int v316; // edx@215
  char *v317; // eax@221
  EditWin *v318; // eax@221
  EditWin *v319; // ebx@221
  EditWin *v320; // edi@221
  PgSprData *v321; // eax@228
  PgWinSpr *v322; // eax@228
  int v323; // ebx@228
  PgWinSpr *v324; // edi@228
  NiTListItem<NiPointer<NiProperty> > *(__thiscall *v325)(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> > *); // eax@230
  int v326; // eax@230
  int v327; // eax@230
  int v328; // eax@235
  NiTListItem<NiPointer<NiProperty> > *v329; // ecx@238
  PgSprData *v330; // eax@244
  PgWinSpr *v331; // eax@244
  int v332; // ebx@244
  PgWinSpr *v333; // edi@244
  NiTListItem<NiPointer<NiProperty> > *(__thiscall *v334)(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> > *); // eax@246
  int v335; // eax@246
  int v336; // eax@246
  int v337; // eax@251
  NiTListItem<NiPointer<NiProperty> > *v338; // ecx@254
  FrameBoxWin *v339; // edi@260
  int v340; // ebx@260
  int v341; // ebx@260
  signed int v342; // edi@260
  NiNode *v343; // esi@263
  int iPanelLeft; // [sp+84h] [bp-58h]@65
  unsigned int uiPanelWidth; // [sp+88h] [bp-54h]@65
  int iPanelTop; // [sp+8Ch] [bp-50h]@12
  unsigned int uiPanelHeight; // [sp+90h] [bp-4Ch]@65
  unsigned int uiEditwinWidth; // [sp+94h] [bp-48h]@33
  int iFrameTop; // [sp+98h] [bp-44h]@33
  NiPointer<NiRoom> element; // [sp+9Ch] [bp-40h]@43
  PgWinText *v351; // [sp+A0h] [bp-3Ch]@43
  int iOrgX; // [sp+A4h] [bp-38h]@39
  int iOrgY; // [sp+A8h] [bp-34h]@39
  int _iOrgX; // [sp+ACh] [bp-30h]@13
  NiSourceTexture *pkTexture; // [sp+B0h] [bp-2Ch]@1
  PgFont *pkFont; // [sp+B4h] [bp-28h]@41
  unsigned int uiHeight; // [sp+B8h] [bp-24h]@39
  unsigned int uiWidth; // [sp+BCh] [bp-20h]@39
  int _iOrgY; // [sp+C0h] [bp-1Ch]@43
  int uiLeft; // [sp+C4h] [bp-18h]@33
  int uiTop; // [sp+C8h] [bp-14h]@33
  NiPointer<NiNode> spNode; // [sp+CCh] [bp-10h]@1
  int v363; // [sp+D8h] [bp-4h]@1
  PgFrameWork *pkFrameWorka; // [sp+E4h] [bp+8h]@191
  PgFrameWork *pkFrameWorkb; // [sp+E4h] [bp+8h]@205
  PgFrameWork *pkFrameWorkc; // [sp+E4h] [bp+8h]@207
  PgFrameWork *pkFrameWorkd; // [sp+E4h] [bp+8h]@230
  PgFrameWork *pkFrameWorke; // [sp+E4h] [bp+8h]@246

  v2 = this;
  spNode.m_pObject = 0;
  v363 = 0;
  pkTexture = MenuTexMgr::GetTexture(4u);
  if ( !pkTexture )
  {
    v3 = spNode.m_pObject;
    v363 = -1;
    if ( !spNode.m_pObject )
      return 0;
    v4 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
LABEL_4:
    if ( !v4 )
    {
      v5 = v3 == 0;
LABEL_6:
      if ( !v5 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
    return 0;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "Game\\Chatting.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = (NiMaterialProperty *)operator new(0x60u);
  iPanelTop = (int)v9;
  LOBYTE(v363) = 1;
  if ( v9 )
  {
    NiMaterialProperty::NiMaterialProperty(v9);
    _iOrgX = v10;
  }
  else
  {
    _iOrgX = 0;
  }
  v11 = v2->m_spMtrlProp.m_pObject;
  LOBYTE(v363) = 0;
  if ( v11 != (NiMaterialProperty *)_iOrgX )
  {
    if ( v11 && !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    v12 = _iOrgX;
    v2->m_spMtrlProp.m_pObject = (NiMaterialProperty *)_iOrgX;
    if ( v12 )
      InterlockedIncrement((volatile LONG *)(v12 + 4));
  }
  v13 = v2->m_spMtrlProp.m_pObject;
  v13->m_amb.r = NiColor::WHITE.r;
  v13->m_amb.g = NiColor::WHITE.g;
  v14 = NiColor::WHITE.b;
  ++v13->m_uiRevID;
  v13->m_amb.b = v14;
  v15 = v2->m_spMtrlProp.m_pObject;
  v15->m_diff.r = NiColor::WHITE.r;
  v15->m_diff.g = NiColor::WHITE.g;
  v16 = NiColor::WHITE.b;
  ++v15->m_uiRevID;
  v15->m_diff.b = v16;
  v17 = v2->m_spMtrlProp.m_pObject;
  v17->m_emit.r = NiColor::WHITE.r;
  v17->m_emit.g = NiColor::WHITE.g;
  v18 = NiColor::WHITE.b;
  ++v17->m_uiRevID;
  v17->m_emit.b = v18;
  v19 = v2->m_spMtrlProp.m_pObject;
  ++v19->m_uiRevID;
  v19->m_fAlpha = 1.0;
  v20 = (NiMaterialProperty *)operator new(0x60u);
  iPanelTop = (int)v20;
  LOBYTE(v363) = 2;
  if ( v20 )
  {
    NiMaterialProperty::NiMaterialProperty(v20);
    _iOrgX = v21;
  }
  else
  {
    _iOrgX = 0;
    v21 = 0;
  }
  v22 = v2->m_spFixedMtrlProp.m_pObject;
  LOBYTE(v363) = 0;
  if ( v22 != (NiMaterialProperty *)v21 )
  {
    if ( v22 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v22->m_uiRefCount) && v22 )
        v22->vfptr->__vecDelDtor((NiRefObject *)v22, 1u);
      v21 = _iOrgX;
    }
    v2->m_spFixedMtrlProp.m_pObject = (NiMaterialProperty *)v21;
    if ( v21 )
      InterlockedIncrement((volatile LONG *)(v21 + 4));
  }
  v23 = v2->m_spFixedMtrlProp.m_pObject;
  v23->m_amb.r = NiColor::WHITE.r;
  v23->m_amb.g = NiColor::WHITE.g;
  v24 = NiColor::WHITE.b;
  ++v23->m_uiRevID;
  v23->m_amb.b = v24;
  v25 = v2->m_spFixedMtrlProp.m_pObject;
  v25->m_diff.r = NiColor::WHITE.r;
  v25->m_diff.g = NiColor::WHITE.g;
  v26 = NiColor::WHITE.b;
  ++v25->m_uiRevID;
  v25->m_diff.b = v26;
  v27 = v2->m_spFixedMtrlProp.m_pObject;
  v27->m_emit.r = NiColor::WHITE.r;
  v27->m_emit.g = NiColor::WHITE.g;
  v28 = NiColor::WHITE.b;
  ++v27->m_uiRevID;
  v29 = pkTexture;
  v27->m_emit.b = v28;
  v30 = v2->m_spFixedMtrlProp.m_pObject;
  ++v30->m_uiRevID;
  v30->m_fAlpha = 1.0;
  v31 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel", &uiLeft, &uiTop, v29);
  uiEditwinWidth = uiLeft - 20;
  iFrameTop = uiTop;
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, uiLeft, uiTop, v31, 0, pkFrameWork, "ChatDisplayWin2", 0) )
  {
    v32 = spNode.m_pObject;
    v363 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v32 )
      v32->vfptr->__vecDelDtor((NiRefObject *)v32, 1u);
    return 0;
  }
  v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
  NiAVObject::AttachProperty((NiAVObject *)&v2->vfptr, (NiProperty *)&v2->m_spMtrlProp.m_pObject->vfptr);
  v33 = (char *)TextData::Get(0xA1ACEDF7);
  PgWin::SetToolTipWinText((PgWin *)&v2->vfptr, v33);
  v34 = uiTop;
  v35 = uiLeft;
  v2->m_pkToolTipWin = g_pkToolTipWin;
  iOrgY = v34;
  iOrgX = v35;
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "ChaBox", &uiLeft, &uiTop, &uiWidth, &uiHeight)
    || (v36 = uiHeight,
        v2->m_uiDefaultWidth = uiWidth,
        v2->m_uiDefaultHeight = v36,
        v37 = MenuTexMgr::GetTexture(0xBu),
        v38 = FrameBoxWin::CreateWin(v37, 7u, 7u, uiLeft - v35, uiTop - iOrgY, (PgWin *)&v2->vfptr, pkFrameWork),
        fRate = *(float *)&uiHeight,
        v40 = uiWidth,
        v2->m_pkChattingBox = v38,
        ((void (__thiscall *)(FrameBoxWin *, unsigned int, _DWORD))v38->vfptr[135].__vecDelDtor)(
          v38,
          v40,
          LODWORD(fRate)),
        ((void (__stdcall *)(_DWORD))v2->m_pkChattingBox->vfptr[130].__vecDelDtor)(0),
        v2->m_pkChattingBox->m_bSizeDraggable = 1,
        ((void (__stdcall *)(signed int))v2->m_pkChattingBox->vfptr[64].__vecDelDtor)(1),
        v41 = Font::Get(0),
        (pkFont = v41) == 0) )
  {
    v363 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  v42 = v2->m_pkChattingBox;
  v42->m_iSizeDragMinWidth = 400;
  v42->m_iSizeDragMaxWidth = 800;
  v43 = v41->m_dwFontSizeInPixel;
  v44 = v2->m_pkChattingBox;
  v44->m_iSizeDragMinHeight = 4 * v43 + 8;
  v44->m_iSizeDragMaxHeight = 40 * v43 + 88;
  ((void (__stdcall *)(_DWORD))v2->m_pkChattingBox->vfptr[60].__vecDelDtor)(0);
  v45 = (NiPointer<NiD3DDefaultShader> *)v2->m_aspChatBD;
  _iOrgX = 5;
  do
  {
    v46 = v2->m_pkChattingBox;
    v47 = ((int (__thiscall *)(FrameBoxWin *))v46->vfptr[37].__vecDelDtor)(v2->m_pkChattingBox);
    v48 = v46->m_uiEdgeHeight;
    v49 = v2->m_pkChattingBox;
    v50 = v49->vfptr;
    _iOrgY = v47 - 2 * v48;
    v51 = ((int (__thiscall *)(FrameBoxWin *))v50[36].__vecDelDtor)(v49);
    v52 = v49->m_uiEdgeWidth;
    v53 = v2->m_pkChattingBox;
    v54 = v51 - 2 * v52;
    v55 = v2->m_pkChattingBox;
    v56 = v55->m_uiEdgeHeight;
    v57.m_pObject = (NiRoom *)v55->m_uiEdgeWidth;
    v351 = (PgWinText *)v56;
    element.m_pObject = v57.m_pObject;
    v58 = _iOrgY;
    v59 = v54;
    v60 = v56 + ((int (__thiscall *)(FrameBoxWin *))v53->vfptr[42].__vecDelDtor)(v53);
    v61 = ((int (__thiscall *)(FrameBoxWin *))v53->vfptr[41].__vecDelDtor)(v53);
    v62 = (NiD3DDefaultShader *)ChatBoardFlex::CreateWin(
                                  (int)element.m_pObject + v61,
                                  v60,
                                  v59,
                                  v58,
                                  pkFont,
                                  1,
                                  (PgWin *)&v2->vfptr);
    NiPointer<PopupMenuWin>::operator=(v45, v62);
    ChatBoardFlex::SetMaxTextLine((ChatBoardFlex *)v45->m_pObject, 1500);
    v45->m_pObject[1].m_spPixelConstantMap.m_pObject = (NiD3DSCM_Pixel *)40;
    v45->m_pObject[1].m_pkD3DRenderState = (NiD3DRenderState *)24576;
    LOBYTE(v45->m_pObject[1].m_spVertexConstantMap.m_pObject) = 0;
    ChatBoardFlex::SetGameFrameWork((ChatBoardFlex *)v45->m_pObject, v2->m_pkFrameWork);
    ((void (__stdcall *)(_DWORD))v45->m_pObject->vfptr[60].__vecDelDtor)(0);
    ++v45;
    --_iOrgX;
  }
  while ( _iOrgX );
  v63 = ((int (*)(void))v2->m_pkChattingBox->vfptr[36].__vecDelDtor)();
  v64 = ((int (__thiscall *)(ChatDisplayWin2 *))v2->vfptr[36].__vecDelDtor)(v2);
  v65 = PgWinProxy::CreateWin(v64 - v63, 0, 0, 0, (PgWin *)&v2->vfptr);
  v2->m_pkLTSocketWin = v65;
  v66 = iOrgX + ((int (__thiscall *)(PgWinProxy *))v65->vfptr[41].__vecDelDtor)(v65);
  v67 = (int (*)(void))v2->m_pkLTSocketWin->vfptr[42].__vecDelDtor;
  _iOrgX = v66;
  v68 = v67();
  v69 = iOrgY + v68;
  _iOrgY = iOrgY + v68;
  pkFont = (PgFont *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "FillterNor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkFont, (NiAVObject *)&spNode.m_pObject->vfptr, "FillterOver");
  PgSprData::Add((PgSprData *)pkFont, (NiAVObject *)&spNode.m_pObject->vfptr, "FillterClick");
  v2->m_pkFilterBtn = PgWinBut::CreateWin(
                        uiLeft - v66,
                        uiTop - v69,
                        (PgSprData *)pkFont,
                        (PgWin *)&v2->m_pkLTSocketWin->vfptr,
                        8u,
                        0,
                        0);
  v70 = (char *)TextData::Get(0xF6FF2527);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkFilterBtn->vfptr, v70);
  v71 = pkTexture;
  v2->m_pkFilterBtn->m_pkToolTipWin = g_pkToolTipWin;
  pkFont = (PgFont *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ChatBlockNor", &uiLeft, &uiTop, v71);
  PgSprData::Add((PgSprData *)pkFont, (NiAVObject *)&spNode.m_pObject->vfptr, "ChatBlockClick");
  PgSprData::Add((PgSprData *)pkFont, (NiAVObject *)&spNode.m_pObject->vfptr, "ChatBlockOver");
  v72 = PgWinBut::CreateWin(
          uiLeft - v66,
          uiTop - v69,
          (PgSprData *)pkFont,
          (PgWin *)&v2->m_pkLTSocketWin->vfptr,
          0x1Cu,
          0,
          0);
  v2->m_pkChatBlockListBtn = v72;
  v72->m_pkToolTipWin = g_pkToolTipWin;
  v73 = (char *)TextData2::Get(0xA89379EC);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkChatBlockListBtn->vfptr, v73);
  v74 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SpamBlockNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v74, (NiAVObject *)&spNode.m_pObject->vfptr, "SpamBlockOver");
  PgSprData::Add(v74, (NiAVObject *)&spNode.m_pObject->vfptr, "SpamBlockClick");
  v75 = PgWinBut::CreateWin(uiLeft - v66, uiTop, v74, (PgWin *)&v2->m_pkLTSocketWin->vfptr, 0x1Eu, 0, 0);
  v2->m_pkSpamFilterBtn = v75;
  v75->vfptr[64].__vecDelDtor((NiRefObject *)v75, 1u);
  v2->m_pkSpamFilterBtn->m_pkToolTipWin = g_pkToolTipWin;
  v76 = (char *)TextData2::Get(0x5F3C838Fu);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkSpamFilterBtn->vfptr, v76);
  v77 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SpamBlockPanel", &uiLeft, &uiTop, 0);
  v78 = PgWinSpr::CreateWin(uiLeft, uiTop, v77, (PgWin *)&v2->m_pkLTSocketWin->vfptr, 0, 0);
  v79 = (NiProperty *)&v2->m_spFixedMtrlProp.m_pObject->vfptr;
  v2->m_pkSpamFilterPanel = v78;
  NiAVObject::AttachProperty((NiAVObject *)&v78->vfptr, v79);
  ((void (__stdcall *)(_DWORD))v2->m_pkSpamFilterPanel->vfptr[60].__vecDelDtor)(0);
  v80 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SpamMovingPoint", &uiLeft, &uiTop, 0);
  v81 = v80;
  v82 = SlideBar::CreateWin(
          spNode.m_pObject,
          "SpamBlockSlideBar",
          "SpamBlockLow",
          "SpamBlockHigh",
          v80,
          0,
          (PgWin *)&v2->m_pkLTSocketWin->vfptr);
  v2->m_pkSpamFilterSlide = v82;
  v82->m_uiClickMsg = 31;
  SlideBar::SetSplitCnt(v2->m_pkSpamFilterSlide, 11);
  SlideBar::SetCurPos(v2->m_pkSpamFilterSlide, 9);
  NiAVObject::AttachProperty(
    (NiAVObject *)&v2->m_pkSpamFilterSlide->vfptr,
    (NiProperty *)&v2->m_spFixedMtrlProp.m_pObject->vfptr);
  v83 = (NiD3DDefaultShader *)PgWinSpr::CreateWin(uiLeft, uiTop, v81, (PgWin *)&v2->vfptr, 0, 0);
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spkSpamSlideSpr, v83);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_spkSpamSlideSpr.m_pObject->vfptr, "0");
  v2->m_spkSpamSlideSpr.m_pObject->m_pkToolTipWin = g_pkToolTipWin;
  if ( v2->m_spkSpamSlideSpr.m_pObject )
    PgWin::AttachChildWin(
      (PgWin *)&v2->m_pkSpamFilterSlide->m_pkSlidePoint->vfptr,
      (PgWin *)&v2->m_spkSpamSlideSpr.m_pObject->vfptr);
  v84 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SpamFiltering", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v85 = v84->m_uiHeight;
  v86 = v84->m_uiWidth;
  v87 = (PgWin *)&v2->m_pkLTSocketWin->vfptr;
  v88 = Font::Get(0);
  v89 = PgWinText::CreateWin(uiLeft, uiTop, v86, v85, v88, v87, 0, 0);
  v2->m_pkTextSFSlide = v89;
  v89->vfptr[122].__vecDelDtor((NiRefObject *)v89, 4u);
  NiAVObject::AttachProperty(
    (NiAVObject *)&v2->m_pkTextSFSlide->vfptr,
    (NiProperty *)&v2->m_spFixedMtrlProp.m_pObject->vfptr);
  ((void (__stdcall *)(_DWORD))v2->m_pkTextSFSlide->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(signed int))v2->m_pkTextSFSlide->vfptr[60].__vecDelDtor)(1);
  v90 = v2->m_pkTextSFSlide->vfptr;
  v91 = TextData2::Get(0x26544341u);
  v90[118].__vecDelDtor((NiRefObject *)v2->m_pkTextSFSlide, (unsigned int)v91);
  v92 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SpamOnOffNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(v92, (NiAVObject *)&spNode.m_pObject->vfptr, "SpamOnOffClick");
  v93 = ColumnBut::CreateWin(uiLeft, uiTop, v92, (PgWin *)&v2->m_pkLTSocketWin->vfptr, 0x20u, 0);
  v2->m_pkSpamFilterOnOff = v93;
  v93->m_bCheck = 1;
  v94 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SpamOnOff", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
  v95 = v94->m_pObject->m_uiHeight;
  v96 = v94->m_pObject->m_uiWidth;
  v97 = (PgWin *)&v2->m_pkLTSocketWin->vfptr;
  v98 = Font::Get(0);
  v99 = PgWinText::CreateWin(uiLeft, uiTop, v96, v95, v98, v97, 0, 0);
  v2->m_pkTextSFOnOff = v99;
  v99->vfptr[122].__vecDelDtor((NiRefObject *)v99, 4u);
  NiAVObject::AttachProperty(
    (NiAVObject *)&v2->m_pkTextSFOnOff->vfptr,
    (NiProperty *)&v2->m_spFixedMtrlProp.m_pObject->vfptr);
  ((void (__stdcall *)(_DWORD))v2->m_pkTextSFOnOff->vfptr[60].__vecDelDtor)(0);
  v100 = v2->m_pkTextSFOnOff->vfptr;
  v101 = TextData2::Get(0x294D858Cu);
  v100[118].__vecDelDtor((NiRefObject *)v2->m_pkTextSFOnOff, (unsigned int)v101);
  v102 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SpamViewNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(v102, (NiAVObject *)&spNode.m_pObject->vfptr, "SpamViewClick");
  v103 = ColumnBut::CreateWin(uiLeft, uiTop, v102, (PgWin *)&v2->m_pkLTSocketWin->vfptr, 0x1Du, 0);
  v2->m_pkSpamFilterMsgShow = v103;
  v103->m_bCheck = 0;
  v104 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SpamView", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
  v105 = v104->m_pObject->m_uiHeight;
  v106 = v104->m_pObject->m_uiWidth;
  v107 = (PgWin *)&v2->m_pkLTSocketWin->vfptr;
  v108 = Font::Get(0);
  v109 = PgWinText::CreateWin(uiLeft, uiTop, v106, v105, v108, v107, 0, 0);
  v2->m_pkTextSFMsgShow = v109;
  v109->vfptr[122].__vecDelDtor((NiRefObject *)v109, 4u);
  NiAVObject::AttachProperty(
    (NiAVObject *)&v2->m_pkTextSFMsgShow->vfptr,
    (NiProperty *)&v2->m_spFixedMtrlProp.m_pObject->vfptr);
  ((void (__stdcall *)(_DWORD))v2->m_pkTextSFMsgShow->vfptr[60].__vecDelDtor)(0);
  v110 = v2->m_pkTextSFMsgShow->vfptr;
  v111 = TextData2::Get(0x6D8EA7D6u);
  v110[118].__vecDelDtor((NiRefObject *)v2->m_pkTextSFMsgShow, (unsigned int)v111);
  ((void (__stdcall *)(_DWORD))v2->m_pkSpamFilterPanel->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkTextSFOnOff->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkSpamFilterOnOff->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkTextSFMsgShow->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkSpamFilterMsgShow->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkTextSFSlide->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkSpamFilterSlide->vfptr[64].__vecDelDtor)(0);
  v112 = v2->m_pkSpamFilterOnOff->m_bCheck;
  v2->m_aspChatBD[0].m_pObject->m_Filter = v112;
  v2->m_pkSpamFilterOnOff->m_bCheck = v112;
  *(float *)&element.m_pObject = 100.0 - (double)(5 * v2->m_pkSpamFilterSlide->m_nCurPos);
  ChatDisplayWin2::SetSpamBlockRate(v2, *(float *)&element.m_pObject);
  v113 = v2->m_pkSpamFilterMsgShow->m_bCheck;
  v2->m_aspChatBD[0].m_pObject->m_FilteredTextShow = v113;
  v2->m_pkSpamFilterMsgShow->m_bCheck = v113;
  v114 = 0;
  do
  {
    v115 = spNode.m_pObject;
    pkFont = (PgFont *)((char *)v114 + 1);
    v116 = fs("Tab%02d", (char *)&v114->vfptr + 1);
    v117 = PgSprData::Create((NiAVObject *)&v115->vfptr, v116, &uiLeft, &uiTop, 0);
    v118 = PgWinBut::CreateWin(
             uiLeft - _iOrgX - uiEditwinWidth,
             uiTop - _iOrgY - iFrameTop,
             v117,
             (PgWin *)&v2->vfptr,
             (unsigned int)&v114->m_kBucketBuffer.m_dwLoadXPos + 2,
             0,
             0);
    v2->m_pkTabBut[(_DWORD)v114] = v118;
    v119 = v118;
    v120 = Font::Get(0);
    v121 = ((int (__thiscall *)(PgWinBut *))v119->vfptr[37].__vecDelDtor)(v119);
    v122 = ((int (__thiscall *)(PgWinBut *))v119->vfptr[36].__vecDelDtor)(v119);
    v123 = PgWinText::CreateWin(10, 2, v122, v121, v120, (PgWin *)&v118->vfptr, 0, 0);
    v2->m_pkTabButText[(_DWORD)v114] = v123;
    v123->vfptr[122].__vecDelDtor((NiRefObject *)v123, 5u);
    v124.m_pObject = (NiRoom *)v2->m_spMtrlProp.m_pObject;
    v351 = v2->m_pkTabButText[(_DWORD)v114];
    element.m_pObject = v124.m_pObject;
    if ( *(float *)&v124.m_pObject != 0.0 )
      InterlockedIncrement((volatile LONG *)&v124.m_pObject->m_uiRefCount);
    LOBYTE(v363) = 3;
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v351->m_kPropertyList,
      &element);
    LOBYTE(v363) = 0;
    if ( *(float *)&v124.m_pObject != 0.0 && !InterlockedDecrement((volatile LONG *)&v124.m_pObject->m_uiRefCount) )
      v124.m_pObject->vfptr->__vecDelDtor((NiRefObject *)v124.m_pObject, 1u);
    ((void (__stdcall *)(_DWORD))v2->m_pkTabButText[(_DWORD)v114]->vfptr[60].__vecDelDtor)(0);
    v125 = v2->m_pkTabButText[(_DWORD)v114]->vfptr;
    v126 = Font::Get(BOLD);
    v125[113].__vecDelDtor((NiRefObject *)v2->m_pkTabButText[(_DWORD)v114], (unsigned int)v126);
    ((void (__stdcall *)(signed int, signed int, signed int, signed int))v2->m_pkTabButText[(_DWORD)v114]->vfptr[116].__vecDelDtor)(
      155,
      155,
      155,
      255);
    switch ( v114 )
    {
      case 0u:
        v127 = v2->m_pkTabButText[0]->vfptr;
        v128 = TextData::Get(0xF54E1743);
        v129 = v2->m_pkTabButText[0];
        goto LABEL_58;
      case 1u:
        v127 = v2->m_pkTabButText[1]->vfptr;
        v128 = TextData::Get(0xF605CB45);
        v129 = v2->m_pkTabButText[1];
        goto LABEL_58;
      case 2u:
        v127 = v2->m_pkTabButText[2]->vfptr;
        v128 = TextData::Get(0xEEFCDF27);
        v129 = v2->m_pkTabButText[2];
        goto LABEL_58;
      case 3u:
        v127 = v2->m_pkTabButText[3]->vfptr;
        v128 = TextData::Get(0x86A3E3E4);
        v129 = v2->m_pkTabButText[3];
        goto LABEL_58;
      case 4u:
        ((void (__stdcall *)(signed int, signed int, _DWORD, signed int))v2->m_pkTabButText[4]->vfptr[116].__vecDelDtor)(
          255,
          255,
          0,
          255);
        v127 = v2->m_pkTabButText[4]->vfptr;
        v128 = TextData::Get(0xEF05252B);
        v129 = v2->m_pkTabButText[4];
LABEL_58:
        v127[118].__vecDelDtor((NiRefObject *)v129, (unsigned int)v128);
        break;
      default:
        break;
    }
    v114 = pkFont;
  }
  while ( (signed int)pkFont < 5 );
  v130 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ChatCommandNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v130, (NiAVObject *)&spNode.m_pObject->vfptr, "ChatCommandOver");
  PgSprData::Add(v130, (NiAVObject *)&spNode.m_pObject->vfptr, "ChatCommandClick");
  v131 = PgWinBut::CreateWin(uiLeft - _iOrgX, uiTop - _iOrgY, v130, (PgWin *)&v2->m_pkLTSocketWin->vfptr, 0xAu, 0, 0);
  v132 = (unsigned int)v2->m_spMtrlProp.m_pObject;
  v133 = v131;
  v2->m_pkChatCommandBtn = v131;
  uiEditwinWidth = v132;
  if ( v132 )
    InterlockedIncrement((volatile LONG *)(v132 + 4));
  LOBYTE(v363) = 4;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v133->m_kPropertyList,
    (NiPointer<NiRoom> *)&uiEditwinWidth);
  LOBYTE(v363) = 0;
  if ( v132 && !InterlockedDecrement((volatile LONG *)(v132 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v132)(v132, 1);
  v134 = (char *)TextData::Get(0x9AE3BFC8);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkChatCommandBtn->vfptr, v134);
  v2->m_pkChatCommandBtn->m_pkToolTipWin = g_pkToolTipWin;
  v135 = 0;
  iPanelTop = 0;
  uiPanelHeight = 0;
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "ChatCommandPanel",
          &iPanelLeft,
          &iPanelTop,
          &uiPanelWidth,
          &uiPanelHeight) )
  {
    v3 = spNode.m_pObject;
    v363 = -1;
    if ( !spNode.m_pObject )
      return 0;
    v4 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
    goto LABEL_4;
  }
  v136 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ChatCommandPanel", &uiLeft, &uiTop, 0);
  v137 = PgWinSpr::CreateWin(uiLeft - _iOrgX, uiTop - _iOrgY, v136, (PgWin *)&v2->m_pkLTSocketWin->vfptr, 0, 0);
  v138 = (NiProperty *)&v2->m_spFixedMtrlProp.m_pObject->vfptr;
  v2->m_pkChatCommandSprWin = v137;
  NiAVObject::AttachProperty((NiAVObject *)&v137->vfptr, v138);
  ((void (__stdcall *)(_DWORD))v2->m_pkChatCommandSprWin->vfptr[64].__vecDelDtor)(0);
  do
  {
    v139 = spNode.m_pObject;
    pkFont = (PgFont *)((char *)v135 + 1);
    v140 = fs("Chat_Cmd_Name%02d_Nor", (char *)&v135->vfptr + 1);
    v141 = PgSprData::Create((NiAVObject *)&v139->vfptr, v140, &uiLeft, &uiTop, 0);
    uiEditwinWidth = (unsigned int)spNode.m_pObject;
    v142 = fs("Chat_Cmd_Name%02d_Click", pkFont);
    PgSprData::Add(v141, (NiAVObject *)uiEditwinWidth, v142);
    uiEditwinWidth = (unsigned int)spNode.m_pObject;
    v143 = fs("Chat_Cmd_Name%02d_Over", pkFont);
    PgSprData::Add(v141, (NiAVObject *)uiEditwinWidth, v143);
    v144 = PgWinBut::CreateWin(
             uiLeft - _iOrgX,
             uiTop - _iOrgY,
             v141,
             (PgWin *)&v2->m_pkLTSocketWin->vfptr,
             (unsigned int)&v135->m_kBucketBuffer.m_dwFontSize + 3,
             0,
             0);
    v2->m_pkChatCmdBut[(_DWORD)v135] = v144;
    v145 = (int)v2->m_spFixedMtrlProp.m_pObject;
    uiEditwinWidth = (unsigned int)v144;
    iFrameTop = v145;
    if ( v145 )
    {
      InterlockedIncrement((volatile LONG *)(v145 + 4));
      v144 = (PgWinBut *)uiEditwinWidth;
    }
    LOBYTE(v363) = 5;
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v144->m_kPropertyList,
      (NiPointer<NiRoom> *)&iFrameTop);
    LOBYTE(v363) = 0;
    if ( v145 && !InterlockedDecrement((volatile LONG *)(v145 + 4)) )
      (**(void (__thiscall ***)(_DWORD, _DWORD))v145)(v145, 1);
    ((void (__stdcall *)(_DWORD))v2->m_pkChatCmdBut[(_DWORD)v135]->vfptr[64].__vecDelDtor)(0);
    v2->m_pkChatCmdBut[(_DWORD)v135]->m_pkToolTipWin = g_pkToolTipWin;
    v146 = v2->m_pkChatCmdBut[(_DWORD)v135];
    v147 = (PgWin *)&v2->m_pkChatCmdBut[(_DWORD)v135]->vfptr;
    v148 = Font::Get(0);
    v149 = ((int (__thiscall *)(PgWinBut *))v146->vfptr[37].__vecDelDtor)(v146);
    v150 = ((int (__thiscall *)(PgWinBut *))v146->vfptr[36].__vecDelDtor)(v146);
    v151 = PgWinText::CreateWin(0, 0, v150, v149, v148, v147, 0, 0);
    v2->m_pkChatCmdNameText[(_DWORD)v135] = v151;
    v151->vfptr[122].__vecDelDtor((NiRefObject *)v151, 4u);
    v152 = v2->m_pkChatCmdNameText[(_DWORD)v135]->vfptr;
    v153 = Font::Get(BOLD);
    v152[113].__vecDelDtor((NiRefObject *)v2->m_pkChatCmdNameText[(_DWORD)v135], (unsigned int)v153);
    ((void (__stdcall *)(struct D3DXCOLOR *))v2->m_pkChatCmdNameText[(_DWORD)v135]->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
    v154 = v2->m_pkChatCmdBut[(_DWORD)v135];
    v155 = (PgWin *)&v2->m_pkChatCmdBut[(_DWORD)v135]->vfptr;
    v156 = Font::Get(0);
    v157 = ((int (__thiscall *)(PgWinBut *))v154->vfptr[37].__vecDelDtor)(v154);
    v158 = ((int (__thiscall *)(PgWinBut *))v154->vfptr[36].__vecDelDtor)(v154);
    v159 = PgWinText::CreateWin(0, 0, v158, v157, v156, v155, 0, 0);
    v2->m_pkChatCmdKeyText[(_DWORD)v135] = v159;
    v159->vfptr[122].__vecDelDtor((NiRefObject *)v159, 6u);
    ((void (__stdcall *)(_DWORD))v2->m_pkChatCmdNameText[(_DWORD)v135]->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkChatCmdKeyText[(_DWORD)v135]->vfptr[60].__vecDelDtor)(0);
    switch ( v135 )
    {
      case 0u:
        v160 = v2->m_pkChatCmdNameText[0]->vfptr;
        v161 = TextData::Get(0x3D421B33u);
        v160[118].__vecDelDtor((NiRefObject *)v2->m_pkChatCmdNameText[0], (unsigned int)v161);
        ((void (__stdcall *)(void *))v2->m_pkChatCmdKeyText[0]->vfptr[118].__vecDelDtor)(&unk_9B1682);
        v2->m_pkChatCmdBut[0]->m_pkToolTipWin = 0;
        break;
      case 1u:
        v162 = v2->m_pkChatCmdNameText[1]->vfptr;
        v163 = TextData::Get(0xA1DFB4C7);
        v162[118].__vecDelDtor((NiRefObject *)v2->m_pkChatCmdNameText[1], (unsigned int)v163);
        ((void (__stdcall *)(const char *))v2->m_pkChatCmdKeyText[1]->vfptr[118].__vecDelDtor)("/w");
        v164 = TextData::Get(0x95876FE6);
        v165 = TextData::Get(0x4965747Du);
        v166 = fs("/w [%s] (%s)", v165, v164);
        v167 = (PgWin *)&v2->m_pkChatCmdBut[1]->vfptr;
        goto LABEL_86;
      case 2u:
        v168 = v2->m_pkChatCmdNameText[2]->vfptr;
        v169 = TextData::Get(0xEE4B1720);
        v168[118].__vecDelDtor((NiRefObject *)v2->m_pkChatCmdNameText[2], (unsigned int)v169);
        ((void (__stdcall *)(const char *))v2->m_pkChatCmdKeyText[2]->vfptr[118].__vecDelDtor)("/s");
        v170 = TextData::Get(0x95876FE6);
        v166 = fs("/s (%s)", v170);
        v167 = (PgWin *)&v2->m_pkChatCmdBut[2]->vfptr;
        goto LABEL_86;
      case 3u:
        v171 = v2->m_pkChatCmdNameText[3]->vfptr;
        v172 = TextData::Get(0x374D0E99u);
        v171[118].__vecDelDtor((NiRefObject *)v2->m_pkChatCmdNameText[3], (unsigned int)v172);
        ((void (__stdcall *)(const char *))v2->m_pkChatCmdKeyText[3]->vfptr[118].__vecDelDtor)("/p");
        v173 = TextData::Get(0x95876FE6);
        v166 = fs("/p (%s)", v173);
        v167 = (PgWin *)&v2->m_pkChatCmdBut[3]->vfptr;
        goto LABEL_86;
      case 4u:
        v174 = v2->m_pkChatCmdNameText[4]->vfptr;
        v175 = TextData::Get(0x2F44227Bu);
        v174[118].__vecDelDtor((NiRefObject *)v2->m_pkChatCmdNameText[4], (unsigned int)v175);
        ((void (__stdcall *)(const char *))v2->m_pkChatCmdKeyText[4]->vfptr[118].__vecDelDtor)("/g");
        v176 = TextData::Get(0x95876FE6);
        v166 = fs("/g (%s)", v176);
        v167 = (PgWin *)&v2->m_pkChatCmdBut[4]->vfptr;
        goto LABEL_86;
      case 5u:
        v177 = v2->m_pkChatCmdNameText[5]->vfptr;
        v178 = TextData::Get(0x353D9AAAu);
        v177[118].__vecDelDtor((NiRefObject *)v2->m_pkChatCmdNameText[5], (unsigned int)v178);
        v179 = v2->m_pkChatCmdKeyText[5]->vfptr;
        v180 = TextData::Get(0x43706657u);
        v181 = fs(off_9B18CC, v180);
        v179[118].__vecDelDtor((NiRefObject *)v2->m_pkChatCmdKeyText[5], (unsigned int)v181);
        v182 = TextData::Get(0x9D8CC0C7);
        v183 = TextData::Get(0x43706657u);
        v166 = fs("/%s (%s)", v183, v182);
        v167 = (PgWin *)&v2->m_pkChatCmdBut[5]->vfptr;
        goto LABEL_86;
      case 6u:
        v184 = v2->m_pkChatCmdNameText[6]->vfptr;
        v185 = TextData::Get(0xEE03CF47);
        v184[118].__vecDelDtor((NiRefObject *)v2->m_pkChatCmdNameText[6], (unsigned int)v185);
        ((void (__stdcall *)(const char *))v2->m_pkChatCmdKeyText[6]->vfptr[118].__vecDelDtor)("/r");
        v186 = TextData::Get(0x95876FE6);
        v187 = fs("/r (%s)", v186);
        PgWin::SetToolTipWinText((PgWin *)&v2->m_pkChatCmdBut[6]->vfptr, v187);
        v2->m_pkChatCmdBut[6]->m_pkToolTipWin = 0;
        break;
      case 7u:
        v188 = v2->m_pkChatCmdNameText[7]->vfptr;
        v189 = TextData::Get(0xF650262A);
        v188[118].__vecDelDtor((NiRefObject *)v2->m_pkChatCmdNameText[7], (unsigned int)v189);
        v2->m_pkChatCmdBut[7]->m_pkToolTipWin = 0;
        break;
      case 8u:
        v190 = v2->m_pkChatCmdNameText[8]->vfptr;
        v191 = TextData::Get(0x86A3E3E4);
        v190[118].__vecDelDtor((NiRefObject *)v2->m_pkChatCmdNameText[8], (unsigned int)v191);
        ((void (__stdcall *)(const char *))v2->m_pkChatCmdKeyText[8]->vfptr[118].__vecDelDtor)("/a");
        v192 = TextData::Get(0x95876FE6);
        v166 = fs("/a (%s)", v192);
        v167 = (PgWin *)&v2->m_pkChatCmdBut[8]->vfptr;
        goto LABEL_86;
      case 9u:
        v193 = v2->m_pkChatCmdNameText[9]->vfptr;
        v194 = TextData2::Get(0xFDF7DB2E);
        v193[118].__vecDelDtor((NiRefObject *)v2->m_pkChatCmdNameText[9], (unsigned int)v194);
        ((void (__stdcall *)(const char *))v2->m_pkChatCmdKeyText[9]->vfptr[118].__vecDelDtor)("/f");
        v195 = TextData::Get(0x95876FE6);
        v166 = fs("/f (%s)", v195);
        v167 = (PgWin *)&v2->m_pkChatCmdBut[9]->vfptr;
        goto LABEL_86;
      case 0xAu:
        v196 = v2->m_pkChatCmdNameText[10]->vfptr;
        v197 = TextData2::Get(0x42A6726Bu);
        v196[118].__vecDelDtor((NiRefObject *)v2->m_pkChatCmdNameText[10], (unsigned int)v197);
        v198 = v2->m_pkChatCmdKeyText[10]->vfptr;
        v199 = TextData::Get(0xFAF72626);
        v200 = fs(off_9B1900, v199);
        v198[118].__vecDelDtor((NiRefObject *)v2->m_pkChatCmdKeyText[10], (unsigned int)v200);
        v201 = TextData::Get(0x95876FE6);
        v202 = TextData::Get(0xFAF72626);
        v203 = fs("/%s (%%s)", v202);
        v166 = fs(v203, v201);
        v167 = (PgWin *)&v2->m_pkChatCmdBut[10]->vfptr;
LABEL_86:
        PgWin::SetToolTipWinText(v167, v166);
        break;
      default:
        break;
    }
    v135 = pkFont;
  }
  while ( (signed int)pkFont < 11 );
  v204 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "UnlockNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(v204, (NiAVObject *)&spNode.m_pObject->vfptr, "lockNor");
  v205 = ColumnBut::CreateWin(uiLeft - _iOrgX, uiTop - _iOrgY, v204, (PgWin *)&v2->m_pkLTSocketWin->vfptr, 0x1Bu, 0);
  v206 = (unsigned int)v2->m_spFixedMtrlProp.m_pObject;
  v207 = v205;
  v2->m_pkCheckBox = v205;
  uiEditwinWidth = v206;
  if ( v206 )
    InterlockedIncrement((volatile LONG *)(v206 + 4));
  LOBYTE(v363) = 6;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v207->m_kPropertyList,
    (NiPointer<NiRoom> *)&uiEditwinWidth);
  LOBYTE(v363) = 0;
  if ( v206 && !InterlockedDecrement((volatile LONG *)(v206 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v206)(v206, 1);
  v2->m_pkCheckBox->m_pkToolTipWin = g_pkToolTipWin;
  v208 = (char *)TextData2::Get(0x10D7C7C8u);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkCheckBox->vfptr, v208);
  v209 = ((int (*)(void))v2->m_pkChattingBox->vfptr[37].__vecDelDtor)();
  v210 = ((int (__thiscall *)(ChatDisplayWin2 *))v2->vfptr[36].__vecDelDtor)(v2);
  v211 = PgWinProxy::CreateWin(v210, v209, 0, 0, (PgWin *)&v2->vfptr);
  v2->m_pkRBSocketWin = v211;
  ((void (__thiscall *)(PgWinProxy *))v211->vfptr[41].__vecDelDtor)(v211);
  ((void (*)(void))v2->m_pkRBSocketWin->vfptr[42].__vecDelDtor)();
  v212 = 0;
  do
  {
    v213 = MenuTexMgr::GetTexture(1u);
    v214 = PopupMenuWin::CreateWin(v213, 4u, 4u, 0);
    v215 = v2->m_spChatFilterPopupMenu[v212].m_pObject;
    _iOrgX = (int)v214;
    if ( v215 != v214 )
    {
      if ( v215 && !InterlockedDecrement((volatile LONG *)&v215->m_uiRefCount) && v215 )
        v215->vfptr->__vecDelDtor((NiRefObject *)v215, 1u);
      v216 = _iOrgX;
      v2->m_spChatFilterPopupMenu[v212].m_pObject = (PopupMenuWin *)_iOrgX;
      if ( v216 )
        InterlockedIncrement((volatile LONG *)(v216 + 4));
    }
    v2->m_spChatFilterPopupMenu[v212].m_pObject->vfptr->SetMsgHooker(
      &v2->m_spChatFilterPopupMenu[v212].m_pObject->vfptr,
      &v2->vfptr);
    PopupMenuWin::Clear(v2->m_spChatFilterPopupMenu[v212].m_pObject);
    v217 = (char *)TextData::Get(0xEF05252B);
    v218 = PopupMenuTextCheck::CreateWin(v217, 0, 0, 0, 0, 0);
    v218->m_ePopupMenuID = 17;
    PopupMenuWin::AddMenu(v2->m_spChatFilterPopupMenu[v212].m_pObject, v212, (PopupMenu *)&v218->vfptr);
    v219 = (char *)TextData::Get(0xF54E1743);
    v220 = PopupMenuTextCheck::CreateWin(v219, 0, 0, 0, 0, 0);
    v220->m_ePopupMenuID = 18;
    PopupMenuWin::AddMenu(v2->m_spChatFilterPopupMenu[v212].m_pObject, v212, (PopupMenu *)&v220->vfptr);
    v221 = (char *)TextData::Get(0xF605CB45);
    v222 = PopupMenuTextCheck::CreateWin(v221, 0, 0, 0, 0, 0);
    v222->m_ePopupMenuID = 19;
    PopupMenuWin::AddMenu(v2->m_spChatFilterPopupMenu[v212].m_pObject, v212, (PopupMenu *)&v222->vfptr);
    v223 = (char *)TextData::Get(0xEEFCDF27);
    v224 = PopupMenuTextCheck::CreateWin(v223, 0, 0, 0, 0, 0);
    v224->m_ePopupMenuID = 20;
    PopupMenuWin::AddMenu(v2->m_spChatFilterPopupMenu[v212].m_pObject, v212, (PopupMenu *)&v224->vfptr);
    v225 = (char *)TextData::Get(0xEE4B1720);
    v226 = PopupMenuTextCheck::CreateWin(v225, 0, 0, 0, 0, 0);
    v226->m_ePopupMenuID = 24;
    PopupMenuWin::AddMenu(v2->m_spChatFilterPopupMenu[v212].m_pObject, v212, (PopupMenu *)&v226->vfptr);
    v227 = (char *)TextData::Get(0x253B184Cu);
    v228 = PopupMenuTextCheck::CreateWin(v227, 0, 0, 0, 0, 0);
    v228->m_ePopupMenuID = 21;
    PopupMenuWin::AddMenu(v2->m_spChatFilterPopupMenu[v212].m_pObject, v212, (PopupMenu *)&v228->vfptr);
    v229 = (char *)TextData2::Get(0xFDF7DB2E);
    v230 = PopupMenuTextCheck::CreateWin(v229, 0, 0, 0, 0, 0);
    v230->m_ePopupMenuID = 22;
    PopupMenuWin::AddMenu(v2->m_spChatFilterPopupMenu[v212].m_pObject, v212, (PopupMenu *)&v230->vfptr);
    if ( v212 == 3 )
    {
      v231 = (char *)TextData2::Get(0x42A6726Bu);
      v232 = PopupMenuTextCheck::CreateWin(v231, 0, 0, 0, 0, 0);
      v232->m_ePopupMenuID = 23;
      PopupMenuWin::AddMenu(v2->m_spChatFilterPopupMenu[3].m_pObject, 3, (PopupMenu *)&v232->vfptr);
    }
    PopupMenuWin::FinishMenu(v2->m_spChatFilterPopupMenu[v212].m_pObject, 0);
    ((void (__stdcall *)(_DWORD))v2->m_spChatFilterPopupMenu[v212++].m_pObject->vfptr[64].__vecDelDtor)(0);
  }
  while ( v212 < 5 );
  v233 = MenuTexMgr::GetTexture(1u);
  v234 = PopupMenuWin::CreateWin(v233, 4u, 4u, 0);
  v235 = v2->m_spChatPopupMenu.m_pObject;
  _iOrgX = (int)v234;
  if ( v235 != v234 )
  {
    if ( v235 && !InterlockedDecrement((volatile LONG *)&v235->m_uiRefCount) && v235 )
      v235->vfptr->__vecDelDtor((NiRefObject *)v235, 1u);
    v236 = _iOrgX;
    v2->m_spChatPopupMenu.m_pObject = (PopupMenuWin *)_iOrgX;
    if ( v236 )
      InterlockedIncrement((volatile LONG *)(v236 + 4));
  }
  v2->m_spChatPopupMenu.m_pObject->vfptr->SetMsgHooker(&v2->m_spChatPopupMenu.m_pObject->vfptr, &v2->vfptr);
  PopupMenuWin::Clear(v2->m_spChatPopupMenu.m_pObject);
  v237 = *(_DWORD *)(ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable + 56);
  if ( v237 )
    _iOrgX = *(_DWORD *)(v237 + 40);
  else
    _iOrgX = 0;
  v238 = 0;
  v239 = 0;
  if ( _iOrgX )
  {
    do
    {
      v240 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable + 4), v238);
      if ( !v240 )
        break;
      if ( *(_WORD *)(v240 + 65) == -1 && v239 < 17 && *(_DWORD *)(v240 + 101) == 1 )
      {
        v241 = PopupMenuText::CreateWin(v240 + 33, 0, 0, 0, 0, 0, 0);
        v241->m_ePopupMenuID = v239 + 62;
        PopupMenuWin::AddMenu(v2->m_spChatPopupMenu.m_pObject, v239++, (PopupMenu *)&v241->vfptr);
      }
      ++v238;
    }
    while ( v238 < _iOrgX );
  }
  PopupMenuWin::FinishMenu(v2->m_spChatPopupMenu.m_pObject, 0);
  ((void (*)(void))v2->m_spChatPopupMenu.m_pObject->vfptr[64].__vecDelDtor)();
  v242 = v2->m_pkChattingBox;
  v243 = ((int (__thiscall *)(FrameBoxWin *))v242->vfptr[37].__vecDelDtor)(v2->m_pkChattingBox);
  v244 = (int)v242->vfptr[36].__vecDelDtor((NiRefObject *)v242, v243);
  v245 = ((int (__thiscall *)(_DWORD))v2->vfptr[36].__vecDelDtor)(v2);
  v246 = PgWinProxy::CreateWin(v245 - v244, 0, 0, (unsigned int)v2, 0);
  v2->m_pkLBSocketWin = v246;
  v247 = ((int (__thiscall *)(PgWinProxy *))v246->vfptr[41].__vecDelDtor)(v246);
  v248 = (PgFont *)(iOrgX + v247);
  v249 = (int (*)(void))v2->m_pkLBSocketWin->vfptr[42].__vecDelDtor;
  pkFont = v248;
  _iOrgY = iOrgY + v249();
  v250 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PreUpNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v250, (NiAVObject *)&spNode.m_pObject->vfptr, "PreUpOver");
  PgSprData::Add(v250, (NiAVObject *)&spNode.m_pObject->vfptr, "PreUpClick");
  v251 = PgWinBut::CreateWin(uiLeft - (_DWORD)v248, uiTop - _iOrgY, v250, (PgWin *)&v2->m_pkLBSocketWin->vfptr, 0, 0, 0);
  v2->m_pkScrollUpBtn = v251;
  v252 = (int)v2->m_spFixedMtrlProp.m_pObject;
  iPanelLeft = v252;
  if ( v252 )
    InterlockedIncrement((volatile LONG *)(v252 + 4));
  v253 = v251->m_kPropertyList.vfptr->NewItem;
  LOBYTE(v363) = 7;
  v254 = (int)v253((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> > *)&v251->m_kPropertyList.vfptr);
  iOrgX = v254;
  v255 = *(_DWORD *)(v254 + 8);
  _iOrgX = v255;
  if ( v255 != v252 )
  {
    if ( v255 && !InterlockedDecrement((volatile LONG *)(v255 + 4)) && _iOrgX )
      (**(void (__stdcall ***)(_DWORD))_iOrgX)(1);
    *(_DWORD *)(iOrgX + 8) = v252;
    if ( v252 )
      InterlockedIncrement((volatile LONG *)(v252 + 4));
  }
  v256 = (NiTListItem<NiPointer<NiProperty> > *)iOrgX;
  *(_DWORD *)(iOrgX + 4) = 0;
  v256->m_pkNext = v251->m_kPropertyList.m_pkHead;
  v257 = v251->m_kPropertyList.m_pkHead;
  if ( v257 )
    v257->m_pkPrev = v256;
  else
    v251->m_kPropertyList.m_pkTail = v256;
  ++v251->m_kPropertyList.m_kAllocator.m_uiCount;
  v251->m_kPropertyList.m_pkHead = v256;
  LOBYTE(v363) = 0;
  if ( v252 && !InterlockedDecrement((volatile LONG *)(v252 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v252)(v252, 1);
  v258 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NextDownNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v258, (NiAVObject *)&spNode.m_pObject->vfptr, "NextDownOver");
  PgSprData::Add(v258, (NiAVObject *)&spNode.m_pObject->vfptr, "NextDownClick");
  v259 = PgWinBut::CreateWin(
           uiLeft - (_DWORD)pkFont,
           uiTop - _iOrgY,
           v258,
           (PgWin *)&v2->m_pkLBSocketWin->vfptr,
           1u,
           0,
           0);
  v260 = (int)v2->m_spFixedMtrlProp.m_pObject;
  v261 = v259;
  v2->m_pkScrollDnBtn = v259;
  iPanelLeft = v260;
  if ( v260 )
    InterlockedIncrement((volatile LONG *)(v260 + 4));
  v262 = v261->m_kPropertyList.vfptr->NewItem;
  LOBYTE(v363) = 8;
  v263 = (int)v262((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> > *)&v261->m_kPropertyList.vfptr);
  iOrgY = v263;
  v264 = *(_DWORD *)(v263 + 8);
  _iOrgX = v264;
  if ( v264 == v260 )
    goto LABEL_145;
  if ( v264 && !InterlockedDecrement((volatile LONG *)(v264 + 4)) && _iOrgX )
    (**(void (__stdcall ***)(_DWORD))_iOrgX)(1);
  v265 = iOrgY;
  *(_DWORD *)(iOrgY + 8) = v260;
  if ( v260 )
  {
    InterlockedIncrement((volatile LONG *)(v260 + 4));
LABEL_145:
    v265 = iOrgY;
  }
  *(_DWORD *)(v265 + 4) = 0;
  *(_DWORD *)v265 = v261->m_kPropertyList.m_pkHead;
  v266 = v261->m_kPropertyList.m_pkHead;
  if ( v266 )
    v266->m_pkPrev = (NiTListItem<NiPointer<NiProperty> > *)v265;
  else
    v261->m_kPropertyList.m_pkTail = (NiTListItem<NiPointer<NiProperty> > *)v265;
  ++v261->m_kPropertyList.m_kAllocator.m_uiCount;
  v261->m_kPropertyList.m_pkHead = (NiTListItem<NiPointer<NiProperty> > *)v265;
  LOBYTE(v363) = 0;
  if ( v260 && !InterlockedDecrement((volatile LONG *)(v260 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v260)(v260, 1);
  v267 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "DownNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v267, (NiAVObject *)&spNode.m_pObject->vfptr, "DownOver");
  PgSprData::Add(v267, (NiAVObject *)&spNode.m_pObject->vfptr, "DownClick");
  v268 = PgWinBut::CreateWin(
           uiLeft - (_DWORD)pkFont,
           uiTop - _iOrgY,
           v267,
           (PgWin *)&v2->m_pkLBSocketWin->vfptr,
           2u,
           0,
           0);
  v269 = (int)v2->m_spFixedMtrlProp.m_pObject;
  v270 = v268;
  v2->m_pkScrollMostDnBtn = v268;
  iPanelLeft = v269;
  if ( v269 )
    InterlockedIncrement((volatile LONG *)(v269 + 4));
  v271 = v270->m_kPropertyList.vfptr->NewItem;
  LOBYTE(v363) = 9;
  v272 = (int)v271((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> > *)&v270->m_kPropertyList.vfptr);
  iOrgY = v272;
  v273 = *(_DWORD *)(v272 + 8);
  _iOrgX = v273;
  if ( v273 == v269 )
    goto LABEL_161;
  if ( v273 && !InterlockedDecrement((volatile LONG *)(v273 + 4)) && _iOrgX )
    (**(void (__stdcall ***)(_DWORD))_iOrgX)(1);
  v274 = iOrgY;
  *(_DWORD *)(iOrgY + 8) = v269;
  if ( v269 )
  {
    InterlockedIncrement((volatile LONG *)(v269 + 4));
LABEL_161:
    v274 = iOrgY;
  }
  *(_DWORD *)(v274 + 4) = 0;
  *(_DWORD *)v274 = v270->m_kPropertyList.m_pkHead;
  v275 = v270->m_kPropertyList.m_pkHead;
  if ( v275 )
    v275->m_pkPrev = (NiTListItem<NiPointer<NiProperty> > *)v274;
  else
    v270->m_kPropertyList.m_pkTail = (NiTListItem<NiPointer<NiProperty> > *)v274;
  ++v270->m_kPropertyList.m_kAllocator.m_uiCount;
  v270->m_kPropertyList.m_pkHead = (NiTListItem<NiPointer<NiProperty> > *)v274;
  LOBYTE(v363) = 0;
  if ( v269 && !InterlockedDecrement((volatile LONG *)(v269 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v269)(v269, 1);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "CharNameEdit",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
    goto LABEL_169;
  v276 = MenuTexMgr::GetTexture(0xBu);
  v277 = uiLeft - (_DWORD)pkFont;
  v278 = (PgWin *)&v2->m_pkLBSocketWin->vfptr;
  v279 = uiTop - _iOrgY;
  v2->m_iChatBoxPosX = uiLeft - (_DWORD)pkFont;
  v280 = FrameBoxWin::CreateWin(v276, 7u, 7u, v277, v279, v278, pkFrameWork);
  v281 = *(float *)&uiHeight;
  v282 = uiWidth;
  v2->m_pkChatNameEditBack = v280;
  ((void (__thiscall *)(FrameBoxWin *, unsigned int, _DWORD))v280->vfptr[135].__vecDelDtor)(v280, v282, LODWORD(v281));
  ((void (__stdcall *)(_DWORD))v2->m_pkChatNameEditBack->vfptr[130].__vecDelDtor)(0);
  v2->m_pkChatNameEditBack->m_bSizeDraggable = 0;
  ((void (__stdcall *)(_DWORD))v2->m_pkChatNameEditBack->vfptr[64].__vecDelDtor)(0);
  v283 = (int)v2->m_spFixedMtrlProp.m_pObject;
  v284 = v2->m_pkChatNameEditBack;
  iPanelLeft = v283;
  if ( v283 )
    InterlockedIncrement((volatile LONG *)(v283 + 4));
  v285 = v284->m_kPropertyList.vfptr->NewItem;
  LOBYTE(v363) = 10;
  v286 = (int)v285((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> > *)&v284->m_kPropertyList.vfptr);
  iOrgY = v286;
  v287 = *(_DWORD *)(v286 + 8);
  _iOrgX = v287;
  if ( v287 == v283 )
    goto LABEL_181;
  if ( v287 && !InterlockedDecrement((volatile LONG *)(v287 + 4)) && _iOrgX )
    (**(void (__stdcall ***)(_DWORD))_iOrgX)(1);
  v288 = iOrgY;
  *(_DWORD *)(iOrgY + 8) = v283;
  if ( v283 )
  {
    InterlockedIncrement((volatile LONG *)(v283 + 4));
LABEL_181:
    v288 = iOrgY;
  }
  *(_DWORD *)(v288 + 4) = 0;
  *(_DWORD *)v288 = v284->m_kPropertyList.m_pkHead;
  v289 = v284->m_kPropertyList.m_pkHead;
  if ( v289 )
    v289->m_pkPrev = (NiTListItem<NiPointer<NiProperty> > *)v288;
  else
    v284->m_kPropertyList.m_pkTail = (NiTListItem<NiPointer<NiProperty> > *)v288;
  ++v284->m_kPropertyList.m_kAllocator.m_uiCount;
  v284->m_kPropertyList.m_pkHead = (NiTListItem<NiPointer<NiProperty> > *)v288;
  LOBYTE(v363) = 0;
  if ( v283 && !InterlockedDecrement((volatile LONG *)(v283 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v283)(v283, 1);
  ((void (__stdcall *)(_DWORD))v2->m_pkChatNameEditBack->vfptr[60].__vecDelDtor)(0);
  v290 = _iOrgY;
  v291 = pkFont;
  v292 = EditWin::CreateWin(
           uiLeft - (_DWORD)pkFont + 3,
           uiTop - _iOrgY + 3,
           uiWidth,
           uiHeight,
           (PgWin *)&v2->m_pkLBSocketWin->vfptr,
           NORMAL,
           0x10u,
           3u,
           0,
           0,
           1);
  v2->m_pkChatNameEditBox = v292;
  v292->vfptr[64].__vecDelDtor((NiRefObject *)v292, 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "ChaMsgView",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
  {
LABEL_169:
    v3 = spNode.m_pObject;
    v363 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v3 == 0;
    goto LABEL_6;
  }
  v293 = MenuTexMgr::GetTexture(0xBu);
  v294 = (PgWin *)&v2->m_pkLBSocketWin->vfptr;
  v295 = uiTop - v290;
  v296 = uiLeft - (_DWORD)v291;
  v2->m_iChatBoxWhisperModePosX = uiLeft - (_DWORD)v291;
  v297 = FrameBoxWin::CreateWin(v293, 7u, 7u, v296, v295, v294, pkFrameWork);
  v298 = *(float *)&uiHeight;
  v299 = uiWidth;
  v2->m_pkChatEditBox = v297;
  ((void (__thiscall *)(FrameBoxWin *, unsigned int, _DWORD))v297->vfptr[135].__vecDelDtor)(v297, v299, LODWORD(v298));
  ((void (__stdcall *)(_DWORD))v2->m_pkChatEditBox->vfptr[130].__vecDelDtor)(0);
  v2->m_pkChatEditBox->m_bSizeDraggable = 0;
  ((void (__stdcall *)(_DWORD))v2->m_pkChatEditBox->vfptr[64].__vecDelDtor)(0);
  v300 = (int)v2->m_spFixedMtrlProp.m_pObject;
  v301 = v2->m_pkChatEditBox;
  iPanelLeft = v300;
  if ( v300 )
    InterlockedIncrement((volatile LONG *)(v300 + 4));
  v302 = v301->m_kPropertyList.vfptr->NewItem;
  LOBYTE(v363) = 11;
  v303 = (int)v302((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> > *)&v301->m_kPropertyList.vfptr);
  iOrgY = v303;
  v304 = *(_DWORD *)(v303 + 8);
  pkFrameWorka = (PgFrameWork *)v304;
  if ( v304 == v300 )
    goto LABEL_198;
  if ( v304 && !InterlockedDecrement((volatile LONG *)(v304 + 4)) && pkFrameWorka )
    ((void (__stdcall *)(signed int))pkFrameWorka->vfptr->SetMsgHooker)(1);
  v305 = iOrgY;
  *(_DWORD *)(iOrgY + 8) = v300;
  if ( v300 )
  {
    InterlockedIncrement((volatile LONG *)(v300 + 4));
LABEL_198:
    v305 = iOrgY;
  }
  *(_DWORD *)(v305 + 4) = 0;
  *(_DWORD *)v305 = v301->m_kPropertyList.m_pkHead;
  v306 = v301->m_kPropertyList.m_pkHead;
  if ( v306 )
    v306->m_pkPrev = (NiTListItem<NiPointer<NiProperty> > *)v305;
  else
    v301->m_kPropertyList.m_pkTail = (NiTListItem<NiPointer<NiProperty> > *)v305;
  ++v301->m_kPropertyList.m_kAllocator.m_uiCount;
  v301->m_kPropertyList.m_pkHead = (NiTListItem<NiPointer<NiProperty> > *)v305;
  LOBYTE(v363) = 0;
  if ( v300 && !InterlockedDecrement((volatile LONG *)(v300 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v300)(v300, 1);
  ((void (__stdcall *)(_DWORD))v2->m_pkChatEditBox->vfptr[60].__vecDelDtor)(0);
  iFrameTop = uiTop - _iOrgY + 6;
  uiEditwinWidth = uiWidth - 4;
  uiPanelHeight = uiHeight - 1;
  v307 = uiLeft - (_DWORD)pkFont + 4;
  v308 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "DownNor01", &uiLeft, &uiTop, 0);
  PgSprData::Add(v308, (NiAVObject *)&spNode.m_pObject->vfptr, "DownOver01");
  PgSprData::Add(v308, (NiAVObject *)&spNode.m_pObject->vfptr, "DownClick01");
  v309 = PgWinBut::CreateWin(
           uiLeft - (_DWORD)pkFont,
           uiTop - _iOrgY,
           v308,
           (PgWin *)&v2->m_pkLBSocketWin->vfptr,
           3u,
           0,
           0);
  v310 = (int)v2->m_spFixedMtrlProp.m_pObject;
  pkFrameWorkb = (PgFrameWork *)v309;
  v2->m_pkWhisperListBtn = v309;
  iPanelLeft = v310;
  if ( v310 )
    InterlockedIncrement((volatile LONG *)(v310 + 4));
  v311 = (int (*)(void))pkFrameWorkb[4].m_kMsgQ.m_pBase->m_uiDumy[1];
  LOBYTE(v363) = 12;
  iPanelTop = (int)&pkFrameWorkb[4].m_kMsgQ;
  v312 = v311();
  iOrgY = v312;
  v313 = *(_DWORD *)(v312 + 8);
  pkFrameWorkc = (PgFrameWork *)v313;
  if ( v313 == v310 )
    goto LABEL_214;
  if ( v313 && !InterlockedDecrement((volatile LONG *)(v313 + 4)) && pkFrameWorkc )
    ((void (__stdcall *)(signed int))pkFrameWorkc->vfptr->SetMsgHooker)(1);
  v314 = iOrgY;
  *(_DWORD *)(iOrgY + 8) = v310;
  if ( v310 )
  {
    InterlockedIncrement((volatile LONG *)(v310 + 4));
LABEL_214:
    v314 = iOrgY;
  }
  v315 = iPanelTop;
  *(_DWORD *)(v314 + 4) = 0;
  *(_DWORD *)v314 = *(_DWORD *)(v315 + 4);
  v316 = *(_DWORD *)(v315 + 4);
  if ( v316 )
    *(_DWORD *)(v316 + 4) = v314;
  else
    *(_DWORD *)(v315 + 8) = v314;
  ++*(_DWORD *)(v315 + 12);
  *(_DWORD *)(v315 + 4) = v314;
  LOBYTE(v363) = 0;
  if ( v310 && !InterlockedDecrement((volatile LONG *)(v310 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v310)(v310, 1);
  v317 = (char *)TextData::Get(0xA8A1608F);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkWhisperListBtn->vfptr, v317);
  v2->m_pkWhisperListBtn->m_pkToolTipWin = g_pkToolTipWin;
  ((void (__stdcall *)(_DWORD))v2->m_pkWhisperListBtn->vfptr[64].__vecDelDtor)(0);
  v318 = EditWin::CreateWin(
           v307,
           iFrameTop - 2,
           uiEditwinWidth,
           uiPanelHeight,
           (PgWin *)&v2->m_pkLBSocketWin->vfptr,
           NORMAL,
           0x80u,
           5u,
           1,
           0,
           1);
  v319 = v2->m_spEdit.m_pObject;
  v320 = v318;
  if ( v319 != v318 )
  {
    if ( v319 && !InterlockedDecrement((volatile LONG *)&v319->m_uiRefCount) && v319 )
      v319->vfptr->__vecDelDtor((NiRefObject *)v319, 1u);
    v2->m_spEdit.m_pObject = v320;
    if ( v320 )
      InterlockedIncrement((volatile LONG *)&v320->m_uiRefCount);
  }
  EditWin::SetImeStatus(v2->m_spEdit.m_pObject, IS_ENGLISH);
  ((void (__stdcall *)(_DWORD))v2->m_spEdit.m_pObject->vfptr[60].__vecDelDtor)(0);
  v2->m_spEdit.m_pObject->m_bIsLinkEdit = 1;
  v321 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ChaK", &uiLeft, &uiTop, pkTexture);
  v322 = PgWinSpr::CreateWin(uiLeft - (_DWORD)pkFont, uiTop - _iOrgY, v321, (PgWin *)&v2->m_pkLBSocketWin->vfptr, 0, 0);
  v2->m_pkChatKorMode = v322;
  v322->vfptr[64].__vecDelDtor((NiRefObject *)v322, 0);
  v323 = (int)v2->m_spFixedMtrlProp.m_pObject;
  v324 = v2->m_pkChatKorMode;
  iPanelLeft = v323;
  if ( v323 )
    InterlockedIncrement((volatile LONG *)(v323 + 4));
  v325 = v324->m_kPropertyList.vfptr->NewItem;
  LOBYTE(v363) = 13;
  v326 = (int)v325((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> > *)&v324->m_kPropertyList.vfptr);
  iOrgY = v326;
  v327 = *(_DWORD *)(v326 + 8);
  pkFrameWorkd = (PgFrameWork *)v327;
  if ( v327 == v323 )
    goto LABEL_237;
  if ( v327 && !InterlockedDecrement((volatile LONG *)(v327 + 4)) && pkFrameWorkd )
    ((void (__stdcall *)(signed int))pkFrameWorkd->vfptr->SetMsgHooker)(1);
  v328 = iOrgY;
  *(_DWORD *)(iOrgY + 8) = v323;
  if ( v323 )
  {
    InterlockedIncrement((volatile LONG *)(v323 + 4));
LABEL_237:
    v328 = iOrgY;
  }
  *(_DWORD *)(v328 + 4) = 0;
  *(_DWORD *)v328 = v324->m_kPropertyList.m_pkHead;
  v329 = v324->m_kPropertyList.m_pkHead;
  if ( v329 )
    v329->m_pkPrev = (NiTListItem<NiPointer<NiProperty> > *)v328;
  else
    v324->m_kPropertyList.m_pkTail = (NiTListItem<NiPointer<NiProperty> > *)v328;
  ++v324->m_kPropertyList.m_kAllocator.m_uiCount;
  v324->m_kPropertyList.m_pkHead = (NiTListItem<NiPointer<NiProperty> > *)v328;
  LOBYTE(v363) = 0;
  if ( v323 && !InterlockedDecrement((volatile LONG *)(v323 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v323)(v323, 1);
  v330 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ChaE", &uiLeft, &uiTop, pkTexture);
  v331 = PgWinSpr::CreateWin(uiLeft - (_DWORD)pkFont, uiTop - _iOrgY, v330, (PgWin *)&v2->m_pkLBSocketWin->vfptr, 0, 0);
  v2->m_pkChatEngMode = v331;
  v331->vfptr[64].__vecDelDtor((NiRefObject *)v331, 0);
  v332 = (int)v2->m_spFixedMtrlProp.m_pObject;
  v333 = v2->m_pkChatEngMode;
  iPanelLeft = v332;
  if ( v332 )
    InterlockedIncrement((volatile LONG *)(v332 + 4));
  v334 = v333->m_kPropertyList.vfptr->NewItem;
  LOBYTE(v363) = 14;
  v335 = (int)v334((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> > *)&v333->m_kPropertyList.vfptr);
  iOrgY = v335;
  v336 = *(_DWORD *)(v335 + 8);
  pkFrameWorke = (PgFrameWork *)v336;
  if ( v336 != v332 )
  {
    if ( v336 && !InterlockedDecrement((volatile LONG *)(v336 + 4)) && pkFrameWorke )
      ((void (__stdcall *)(signed int))pkFrameWorke->vfptr->SetMsgHooker)(1);
    v337 = iOrgY;
    *(_DWORD *)(iOrgY + 8) = v332;
    if ( !v332 )
      goto LABEL_254;
    InterlockedIncrement((volatile LONG *)(v332 + 4));
  }
  v337 = iOrgY;
LABEL_254:
  *(_DWORD *)(v337 + 4) = 0;
  *(_DWORD *)v337 = v333->m_kPropertyList.m_pkHead;
  v338 = v333->m_kPropertyList.m_pkHead;
  if ( v338 )
    v338->m_pkPrev = (NiTListItem<NiPointer<NiProperty> > *)v337;
  else
    v333->m_kPropertyList.m_pkTail = (NiTListItem<NiPointer<NiProperty> > *)v337;
  ++v333->m_kPropertyList.m_kAllocator.m_uiCount;
  v333->m_kPropertyList.m_pkHead = (NiTListItem<NiPointer<NiProperty> > *)v337;
  LOBYTE(v363) = 0;
  if ( v332 && !InterlockedDecrement((volatile LONG *)(v332 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v332)(v332, 1);
  v339 = v2->m_pkChattingBox;
  v340 = ((int (*)(void))v2->m_pkChatEditBox->vfptr[36].__vecDelDtor)();
  v2->m_uiChattingBoxWidthMinusEditBoxWidth = ((int (__thiscall *)(FrameBoxWin *))v339->vfptr[36].__vecDelDtor)(v339)
                                            - v340;
  v2->m_uiChatMode = 0;
  TextData::Get(0xEF05252B);
  v341 = (int)v2->m_aspChatBD;
  v342 = 5;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v341 + 256))(0);
    v341 += 4;
    --v342;
  }
  while ( v342 );
  ((void (__stdcall *)(signed int))v2->m_aspChatBD[0].m_pObject->vfptr[64].__vecDelDtor)(1);
  v2->m_pkActiveChatBD = v2->m_aspChatBD[0].m_pObject;
  v363 = -1;
  if ( spNode.m_pObject )
  {
    v343 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v343 )
        v343->vfptr->__vecDelDtor((NiRefObject *)v343, 1u);
    }
  }
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A7D11C: using guessed type const struct NiColor NiColor::WHITE;
// A8975C: using guessed type bool Folder::m_bInit;
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;

//----- (005ECC80) --------------------------------------------------------
void __userpurge ChatDisplayWin2::OnCommand(ChatDisplayWin2 *this@<ecx>, int a2@<ebx>, int a3@<edi>, unsigned int wParam, int lParam)
{
  ChatDisplayWin2 *v5; // esi@1
  NiUnsharedGeometryGroup *v6; // ST10_4@14
  const char *v7; // eax@14
  EditWin *v8; // ecx@16
  NiUnsharedGeometryGroup *v9; // ST10_4@20
  char *v10; // edi@23
  NiRefObjectVtbl *v11; // edi@25
  NiUnsharedGeometryGroup *v12; // eax@25
  NiRefObjectVtbl *v13; // edi@25
  NiUnsharedGeometryGroup *v14; // eax@25
  NiRefObjectVtbl *v15; // edi@25
  NiUnsharedGeometryGroup *v16; // eax@25
  NiRefObjectVtbl *v17; // edi@25
  NiUnsharedGeometryGroup *v18; // eax@25
  NiRefObjectVtbl *v19; // edi@25
  NiUnsharedGeometryGroup *v20; // eax@25
  PgWinText *v21; // ecx@26
  NiRefObjectVtbl *v22; // edi@26
  NiUnsharedGeometryGroup *v23; // eax@26
  PgWinText *v24; // ecx@26
  PgWinText *v25; // ecx@27
  PgWinText *v26; // ecx@28
  PgWinText *v27; // ecx@29
  PgWinText *v28; // ecx@30
  ChatBoardFlex *v29; // esi@32
  void *(__thiscall *v30)(NiRefObject *, unsigned int); // edx@33
  bool v31; // al@37
  ColumnBut *v32; // edx@37
  char v33; // al@38
  float fRate; // ST14_4@39
  int v35; // [sp-4h] [bp-2Ch]@23
  NiUnsharedGeometryGroup *v36; // [sp+4h] [bp-24h]@0
  signed int v37; // [sp+8h] [bp-20h]@23
  char acName[21]; // [sp+Ch] [bp-1Ch]@16

  v5 = this;
  switch ( wParam )
  {
    case 0u:
      ChatBoardFlex::ViewLineUp(this->m_pkActiveChatBD);
      return;
    case 1u:
      ChatBoardFlex::ViewLineDown(this->m_pkActiveChatBD);
      return;
    case 2u:
      ChatBoardFlex::ViewLineMostDown(this->m_pkActiveChatBD);
      return;
    case 0xAu:
      ChatDisplayWin2::OnChatCommand(this);
      return;
    case 3u:
      ChatDisplayWin2::OnTab(this);
      return;
    case 8u:
      ((void (__stdcall *)(unsigned int, int))this->m_spChatFilterPopupMenu[this->m_uiChatMode].m_pObject->vfptr[77].__vecDelDtor)(
        PgWin::ms_iMsX,
        PgWin::ms_iMsY);
      PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v5->m_spChatFilterPopupMenu[v5->m_uiChatMode].m_pObject->vfptr);
      return;
    case 9u:
      GameFrameWork::OpenReportWin((GameFrameWork *)this->m_pkFrameWork);
      return;
    case 0xBu:
      ((void (__stdcall *)(signed int, signed int))this->vfptr[95].__vecDelDtor)(26, 1);
      ChatDisplayWin2::ChatStart(v5, &byte_9B1683);
      return;
    case 0xCu:
      ((void (__stdcall *)(signed int, signed int))this->vfptr[95].__vecDelDtor)(22, 1);
      ChatDisplayWin2::ChatStart(v5, "/w ");
      return;
    case 0xDu:
      ((void (__stdcall *)(signed int, signed int))this->vfptr[95].__vecDelDtor)(26, 1);
      ChatDisplayWin2::ChatStart(v5, "/s ");
      return;
    case 0xEu:
      ((void (__stdcall *)(signed int, _DWORD))this->vfptr[95].__vecDelDtor)(23, 1);
      ChatDisplayWin2::ChatStart(v5, "/p ");
      return;
    case 0xFu:
      ((void (__stdcall *)(signed int, _DWORD))this->vfptr[95].__vecDelDtor)(24, 0);
      ChatDisplayWin2::ChatStart(v5, "/g ");
      return;
    case 0x10u:
      v6 = TextData::Get(0x43706657u);
      v7 = fs("/%s ", v6);
      goto LABEL_15;
    case 0x11u:
      ((void (__stdcall *)(signed int, _DWORD))this->vfptr[95].__vecDelDtor)(22, 0);
      ChatDisplayWin2::ChatStart(v5, "/r ");
      Name5::n_string(&GameFrameWork::m_kWhisperCharID, acName);
      v8 = v5->m_pkChatNameEditBox;
      acName[20] = 0;
      ((void (__stdcall *)(char *))v8->vfptr[115].__vecDelDtor)(acName);
      return;
    case 0x12u:
      ((void (__stdcall *)(unsigned int, int))this->m_spChatPopupMenu.m_pObject->vfptr[77].__vecDelDtor)(
        PgWin::ms_iMsX,
        PgWin::ms_iMsY);
      PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v5->m_spChatPopupMenu.m_pObject->vfptr);
      return;
    case 0x13u:
      ((void (__stdcall *)(signed int, _DWORD))this->vfptr[95].__vecDelDtor)(25, 1);
      ChatDisplayWin2::ChatStart(v5, "/a ");
      return;
    case 0x14u:
      ((void (__stdcall *)(signed int, _DWORD))this->vfptr[95].__vecDelDtor)(23, 1);
      ChatDisplayWin2::ChatStart(v5, &byte_9B168A);
      return;
    case 0x15u:
      ((void (__stdcall *)(signed int, _DWORD))this->vfptr[95].__vecDelDtor)(25, 1);
      v9 = TextData::Get(0xFAF72626);
      v7 = fs("/%s ", v9);
LABEL_15:
      ChatDisplayWin2::ChatStart(v5, v7);
      return;
    case 0x16u:
    case 0x17u:
    case 0x18u:
    case 0x19u:
    case 0x1Au:
      if ( this->m_kAlphaControl.fAlphaValue >= 1.0 || lParam )
      {
        v35 = a3;
        v10 = (char *)this->m_pkTabButText;
        v37 = 5;
        do
        {
          (*(void (__stdcall **)(signed int, signed int, signed int, signed int))(**(_DWORD **)v10 + 464))(
            155,
            155,
            155,
            255);
          (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v10 - 37) + 256))(0);
          v10 += 4;
          --v37;
        }
        while ( v37 );
        v11 = v5->m_pkTabButText[0]->vfptr;
        v12 = TextData::Get(0xF54E1743);
        ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *, int, int))v11[118].__vecDelDtor)(
          v5->m_pkTabButText[0],
          v12,
          v35,
          a2);
        v13 = v5->m_pkTabButText[1]->vfptr;
        v14 = TextData::Get(0xF605CB45);
        v13[118].__vecDelDtor((NiRefObject *)v5->m_pkTabButText[1], (unsigned int)v14);
        v15 = v5->m_pkTabButText[2]->vfptr;
        v16 = TextData::Get(0xEEFCDF27);
        v15[118].__vecDelDtor((NiRefObject *)v5->m_pkTabButText[2], (unsigned int)v16);
        v17 = v5->m_pkTabButText[3]->vfptr;
        v18 = TextData::Get(0x86A3E3E4);
        v17[118].__vecDelDtor((NiRefObject *)v5->m_pkTabButText[3], (unsigned int)v18);
        v19 = v5->m_pkTabButText[4]->vfptr;
        v20 = TextData::Get(0xEF05252B);
        v19[118].__vecDelDtor((NiRefObject *)v5->m_pkTabButText[4], (unsigned int)v20);
        switch ( wParam )
        {
          case 0x16u:
            v21 = v5->m_pkTabButText[0];
            v5->m_pkActiveChatBD = v5->m_aspChatBD[1].m_pObject;
            v5->m_uiChatMode = 1;
            ((void (__stdcall *)(signed int, signed int, _DWORD, signed int, NiUnsharedGeometryGroup *))v21->vfptr[116].__vecDelDtor)(
              255,
              255,
              0,
              255,
              v36);
            v22 = v5->m_pkTabButText[0]->vfptr;
            v23 = TextData::Get(0xF54E1743);
            v24 = v5->m_pkTabButText[0];
            goto LABEL_31;
          case 0x17u:
            v25 = v5->m_pkTabButText[1];
            v5->m_pkActiveChatBD = v5->m_aspChatBD[2].m_pObject;
            v5->m_uiChatMode = 2;
            ((void (__stdcall *)(signed int, signed int, _DWORD, signed int, NiUnsharedGeometryGroup *))v25->vfptr[116].__vecDelDtor)(
              255,
              255,
              0,
              255,
              v36);
            v22 = v5->m_pkTabButText[1]->vfptr;
            v23 = TextData::Get(0xF605CB45);
            v24 = v5->m_pkTabButText[1];
            goto LABEL_31;
          case 0x18u:
            v26 = v5->m_pkTabButText[2];
            v5->m_pkActiveChatBD = v5->m_aspChatBD[3].m_pObject;
            v5->m_uiChatMode = 3;
            ((void (__stdcall *)(signed int, signed int, _DWORD, signed int, NiUnsharedGeometryGroup *))v26->vfptr[116].__vecDelDtor)(
              255,
              255,
              0,
              255,
              v36);
            v22 = v5->m_pkTabButText[2]->vfptr;
            v23 = TextData::Get(0xEEFCDF27);
            v24 = v5->m_pkTabButText[2];
            goto LABEL_31;
          case 0x19u:
            v27 = v5->m_pkTabButText[3];
            v5->m_pkActiveChatBD = v5->m_aspChatBD[4].m_pObject;
            v5->m_uiChatMode = 4;
            ((void (__stdcall *)(signed int, signed int, _DWORD, signed int, NiUnsharedGeometryGroup *))v27->vfptr[116].__vecDelDtor)(
              255,
              255,
              0,
              255,
              v36);
            v22 = v5->m_pkTabButText[3]->vfptr;
            v23 = TextData::Get(0x86A3E3E4);
            v24 = v5->m_pkTabButText[3];
            goto LABEL_31;
          case 0x1Au:
            v28 = v5->m_pkTabButText[4];
            v5->m_pkActiveChatBD = v5->m_aspChatBD[0].m_pObject;
            v5->m_uiChatMode = 0;
            ((void (__stdcall *)(signed int, signed int, _DWORD, signed int, NiUnsharedGeometryGroup *))v28->vfptr[116].__vecDelDtor)(
              255,
              255,
              0,
              255,
              v36);
            v22 = v5->m_pkTabButText[4]->vfptr;
            v23 = TextData::Get(0xEF05252B);
            v24 = v5->m_pkTabButText[4];
LABEL_31:
            v36 = v23;
            ((void (__thiscall *)(PgWinText *))v22[118].__vecDelDtor)(v24);
            break;
          default:
            break;
        }
        v29 = v5->m_aspChatBD[v5->m_uiChatMode].m_pObject;
        ((void (__thiscall *)(ChatBoardFlex *, signed int, NiUnsharedGeometryGroup *, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v29->vfptr[64].__vecDelDtor)(
          v29,
          1,
          v36,
          0,
          *(_DWORD *)acName,
          *(_DWORD *)&acName[4],
          *(_DWORD *)&acName[8],
          *(_DWORD *)&acName[12]);
      }
      return;
    case 0x1Bu:
      this->m_pkCheckBox->m_bCheck = this->m_pkCheckBox->m_bCheck == 0;
      this->m_pkChattingBox->m_bLock = this->m_pkCheckBox->m_bCheck;
      v30 = this->vfptr[130].__vecDelDtor;
      if ( this->m_pkCheckBox->m_bCheck )
        ((void (__stdcall *)(_DWORD))v30)(0);
      else
        ((void (__stdcall *)(signed int))v30)(1);
      return;
    case 0x1Cu:
      GameFrameWork::OpenChatBlockListWin((GameFrameWork *)this->m_pkFrameWork);
      return;
    case 0x1Du:
      this->m_pkSpamFilterMsgShow->m_bCheck = this->m_pkSpamFilterMsgShow->m_bCheck == 0;
      v31 = this->m_pkSpamFilterMsgShow->m_bCheck;
      this->m_aspChatBD[0].m_pObject->m_FilteredTextShow = v31;
      v32 = this->m_pkSpamFilterMsgShow;
      goto LABEL_41;
    case 0x1Eu:
      v33 = ChatDisplayWin2::DoesSpamFilterWinOpen(this);
      ChatDisplayWin2::OpenSpamFilterWin(v5, v33 == 0);
      break;
    case 0x1Fu:
      fRate = ChatDisplayWin2::GetSpamBlockRate(this);
      ChatDisplayWin2::SetSpamBlockRate(v5, fRate);
      break;
    case 0x20u:
      this->m_pkSpamFilterOnOff->m_bCheck = this->m_pkSpamFilterOnOff->m_bCheck == 0;
      v31 = this->m_pkSpamFilterOnOff->m_bCheck;
      this->m_aspChatBD[0].m_pObject->m_Filter = v31;
      v32 = this->m_pkSpamFilterOnOff;
LABEL_41:
      v32->m_bCheck = v31;
      break;
    default:
      return;
  }
}
// 5ECC80: could not find valid save-restore pair for ebx
// 5ECC80: could not find valid save-restore pair for edi

//----- (005ED4A0) --------------------------------------------------------
void __thiscall ChatDisplayWin2::DirectMessage(ChatDisplayWin2 *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  ChatDisplayWin2 *v4; // esi@1
  float v5; // eax@2
  IDirectMessenger *v6; // eax@3
  PgWinBut *v7; // ebx@6
  int v8; // eax@6
  float v9; // ecx@6
  int v10; // ebx@6
  int v11; // eax@6
  float v12; // ebx@6
  int v13; // eax@6
  int v14; // ecx@6
  float v15; // ebx@6
  int v16; // edx@6
  int v17; // eax@6
  bool v18; // zf@6
  NiTListItem<NiPointer<NiProperty> > *v19; // edx@8
  int v20; // eax@8
  float v21; // ecx@8
  int v22; // edi@8
  int v23; // eax@8
  int v24; // edi@9
  float v25; // eax@10
  unsigned int v26; // edx@10
  _DWORD *v27; // ecx@10
  float v28; // ebx@10
  void (__thiscall **v29)(_DWORD, _DWORD); // eax@10
  int v30; // edx@10
  int v31; // eax@10
  int v32; // eax@10
  int *v33; // eax@11
  int v34; // edi@12
  float v35; // ebx@12
  unsigned int v36; // eax@12
  int (__thiscall *v37)(_DWORD); // edx@12
  int v38; // eax@12
  int *v39; // eax@13
  int v40; // edi@14
  float v41; // ebx@14
  unsigned int v42; // eax@14
  int (__thiscall *v43)(_DWORD); // edx@14
  int v44; // eax@14
  int *v45; // eax@15
  int v46; // edi@16
  int v47; // eax@16
  int *v48; // eax@17
  int v49; // edi@18
  int v50; // eax@18
  int *v51; // eax@19
  int v52; // edi@20
  int v53; // eax@20
  float v54; // ecx@21
  int v55; // edi@22
  float v56; // ebx@22
  int v57; // eax@22
  int v58; // eax@22
  void (__thiscall **v59)(IDirectMessenger *, IDirectMessenger *); // ebx@22
  void (__thiscall *v60)(IDirectMessenger *, IDirectMessenger *); // edi@22
  int v61; // eax@22
  void (__thiscall **v62)(IDirectMessenger *, IDirectMessenger *); // ebx@22
  void (__thiscall *v63)(IDirectMessenger *, IDirectMessenger *); // edi@22
  int v64; // eax@22
  void (__thiscall **v65)(IDirectMessenger *, IDirectMessenger *); // ebx@22
  float v66; // esi@22
  void (__thiscall *v67)(IDirectMessenger *, IDirectMessenger *); // edi@22
  int v68; // eax@22
  int v69; // eax@22
  float v70; // eax@23
  IDirectMessenger *v71; // eax@24
  float v72; // eax@27
  IDirectMessenger *v73; // eax@28
  unsigned int v74; // eax@31
  IDirectMessenger *v75; // eax@32
  NiPointer<NiAVObject> *v76; // eax@36
  IDirectMessenger *v77; // eax@37
  float v78; // eax@41
  IDirectMessenger *v79; // eax@42
  float v80; // eax@45
  IDirectMessenger *v81; // eax@46
  unsigned int v82; // eax@50
  IDirectMessenger *v83; // eax@51
  NiPointer<NiAVObject> *v84; // eax@55
  IDirectMessenger *v85; // eax@56
  int v86; // eax@60
  unsigned int v87; // ebx@60
  GTInformWin *v88; // ecx@68
  float v89; // edi@73
  CClientGuild *v90; // eax@73
  NiUnsharedGeometryGroup *v91; // ebx@74
  float v92; // edi@79
  CClientGuildAcademy *v93; // eax@79
  NiUnsharedGeometryGroup *v94; // ebx@80
  ActionWin *v95; // ecx@84
  int v96; // edx@86
  float v97; // eax@86
  unsigned int v98; // ecx@86
  int v99; // eax@86
  unsigned int v100; // edx@86
  NiTListItem<NiPointer<NiProperty> > *v101; // ecx@87
  float v102; // eax@89
  float v103; // eax@90
  Name5 kCharID; // [sp+30h] [bp-60h]@86
  int v105; // [sp+44h] [bp-4Ch]@10
  unsigned int uiWidth; // [sp+48h] [bp-48h]@6
  _DWORD *v107; // [sp+4Ch] [bp-44h]@10
  void (__thiscall **v108)(_DWORD, _DWORD); // [sp+50h] [bp-40h]@10
  unsigned int uiHeight; // [sp+54h] [bp-3Ch]@6
  unsigned int uiOption; // [sp+58h] [bp-38h]@8
  char *v111; // [sp+5Ch] [bp-34h]@1
  Name5 nm; // [sp+60h] [bp-30h]@86
  char acName[21]; // [sp+74h] [bp-1Ch]@87

  v4 = this;
  v111 = (char *)pvBody;
  switch ( iMsgTag )
  {
    case 14:
      v5 = this->m_kWorld.m_Translate.z;
      if ( v5 == 0.0 )
        v6 = 0;
      else
        v6 = (IDirectMessenger *)(LODWORD(v5) + 232);
      if ( pkFrom == v6 )
      {
        v7 = this[-1].m_pkChatCmdBut[2];
        v8 = ((int (__thiscall *)(PgWinBut **))v7->m_kPropertyList.m_kAllocator.m_uiCount)(&this[-1].m_pkChatCmdBut[2]);
        ((void (__thiscall *)(PgWinBut **, int))v7->m_kChildren.vfptr)(
          &v4[-1].m_pkChatCmdBut[2],
          *((_DWORD *)v111 + 1) + v8);
        v9 = v4->m_kWorld.m_Translate.z;
        v10 = *(_DWORD *)LODWORD(v9);
        v11 = (*(int (**)(void))(*(_DWORD *)LODWORD(v9) + 164))();
        (*(void (__thiscall **)(_DWORD, int))(v10 + 172))(LODWORD(v4->m_kWorld.m_Translate.z), *(_DWORD *)v111 + v11);
        v12 = v4->m_kWorld.m_Translate.z;
        v13 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)LODWORD(v12) + 144))(LODWORD(v4->m_kWorld.m_Translate.z));
        v14 = *(_DWORD *)(LODWORD(v12) + 356);
        v15 = v4->m_kWorld.m_Translate.z;
        v16 = *(_DWORD *)LODWORD(v15);
        uiWidth = v13 - 2 * v14;
        v17 = (*(int (__thiscall **)(_DWORD))(v16 + 148))(LODWORD(v15));
        v18 = *((_DWORD *)v111 + 2) == 0;
        uiHeight = v17 - 2 * *(_DWORD *)(LODWORD(v15) + 352);
        if ( !v18 && !*(_DWORD *)v111 )
        {
          v19 = v4[-1].m_pkChatCmdBut[2]->m_kPropertyList.m_pkTail;
          uiOption = (unsigned int)v4[-1].m_pkChatCmdBut[2];
          v20 = ((int (__thiscall *)(PgWinBut **))v19)(&v4[-1].m_pkChatCmdBut[2]);
          (*(void (__thiscall **)(PgWinBut **, int))(uiOption + 172))(
            &v4[-1].m_pkChatCmdBut[2],
            *((_DWORD *)v111 + 2) + v20);
          v21 = v4->m_kWorld.m_Translate.z;
          v22 = *(_DWORD *)LODWORD(v21);
          v23 = (*(int (**)(void))(*(_DWORD *)LODWORD(v21) + 164))();
          (*(void (__thiscall **)(_DWORD, int))(v22 + 172))(
            LODWORD(v4->m_kWorld.m_Translate.z),
            v23 - *((_DWORD *)v111 + 2));
        }
        v24 = (int)&v4->m_kWorld.m_Rotate.m_pEntry[1][2];
        v111 = (char *)5;
        do
        {
          v25 = v4->m_kWorld.m_Translate.z;
          v26 = *(_DWORD *)(LODWORD(v25) + 352);
          v27 = *(_DWORD **)v24;
          v28 = v4->m_kWorld.m_Translate.z;
          v105 = *(_DWORD *)(LODWORD(v25) + 356);
          v29 = (void (__thiscall **)(_DWORD, _DWORD))(*v27 + 308);
          uiOption = v26;
          v30 = *(_DWORD *)LODWORD(v28);
          v107 = v27;
          v108 = v29;
          v31 = (*(int (__thiscall **)(_DWORD))(v30 + 168))(LODWORD(v28));
          v32 = (*(int (__thiscall **)(_DWORD, unsigned int))(*(_DWORD *)LODWORD(v28) + 164))(
                  LODWORD(v28),
                  uiOption + v31);
          (*v108)(v107, v105 + v32);
          (*(void (__stdcall **)(unsigned int))(**(_DWORD **)v24 + 152))(uiWidth);
          (*(void (__stdcall **)(unsigned int))(**(_DWORD **)v24 + 156))(uiHeight);
          (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v24 + 324))(LODWORD(Timer::ms_fCurTime));
          v24 += 4;
          --v111;
        }
        while ( v111 );
        v33 = (int *)v4->m_iVXPos;
        if ( v33 )
        {
          v34 = *v33;
          v35 = v4->m_kWorld.m_Translate.z;
          v36 = ((int (__thiscall *)(PgWinBut **))LODWORD(v4[-1].m_pkChatCmdBut[2]->m_kWorld.m_Translate.y))(&v4[-1].m_pkChatCmdBut[2]);
          v37 = *(int (__thiscall **)(_DWORD))(*(_DWORD *)LODWORD(v35) + 144);
          uiHeight = v36;
          v38 = v37(LODWORD(v35));
          (*(void (__thiscall **)(int, unsigned int))(v34 + 172))(v4->m_iVXPos, uiHeight - v38);
        }
        v39 = (int *)v4->m_iOldDragOffY;
        if ( v39 )
        {
          v40 = *v39;
          v41 = v4->m_kWorld.m_Translate.z;
          v42 = ((int (__thiscall *)(PgWinBut **))LODWORD(v4[-1].m_pkChatCmdBut[2]->m_kWorld.m_Translate.y))(&v4[-1].m_pkChatCmdBut[2]);
          v43 = *(int (__thiscall **)(_DWORD))(*(_DWORD *)LODWORD(v41) + 144);
          uiHeight = v42;
          v44 = v43(LODWORD(v41));
          (*(void (__thiscall **)(int, unsigned int))(v40 + 172))(v4->m_iOldDragOffY, uiHeight - v44);
        }
        v45 = (int *)v4->m_iOldDragOffX;
        if ( v45 )
        {
          v46 = *v45;
          v47 = ((int (__thiscall *)(_DWORD))LODWORD(v4[-1].m_pkChatCmdBut[2]->m_kWorld.m_Translate.y))(&v4[-1].m_pkChatCmdBut[2]);
          (*(void (__thiscall **)(int, int))(v46 + 172))(v4->m_iOldDragOffX, v47);
        }
        v48 = (int *)v4->m_iOldDragOffY;
        if ( v48 )
        {
          v49 = *v48;
          v50 = (*(int (**)(void))(*(_DWORD *)LODWORD(v4->m_kWorld.m_Translate.z) + 148))();
          (*(void (__thiscall **)(int, int))(v49 + 176))(v4->m_iOldDragOffY, v50);
        }
        v51 = (int *)v4->m_iOldDragOffX;
        if ( v51 )
        {
          v52 = *v51;
          v53 = (*(int (**)(void))(*(_DWORD *)LODWORD(v4->m_kWorld.m_Translate.z) + 148))();
          (*(void (__thiscall **)(int, int))(v52 + 176))(v4->m_iOldDragOffX, v53);
        }
        v54 = v4->m_kWorld.m_fScale;
        if ( v54 != 0.0 )
        {
          v55 = *(_DWORD *)LODWORD(v54);
          v56 = v4->m_kWorld.m_Translate.z;
          v57 = (*(int (**)(void))(*(_DWORD *)LODWORD(v54) + 148))();
          v58 = (*(int (__thiscall **)(_DWORD, int))(*(_DWORD *)LODWORD(v56) + 144))(LODWORD(v56), v57);
          (*(void (__thiscall **)(_DWORD, int))(v55 + 540))(LODWORD(v4->m_kWorld.m_fScale), v58 - v4->m_iVYPos);
          v59 = &v4->vfptr->SetMsgHooker;
          v60 = *v59;
          v61 = (*(int (**)(void))(*(_DWORD *)LODWORD(v4->m_kWorld.m_fScale) + 144))();
          (*((void (__thiscall **)(_DWORD, _DWORD))v60 + 38))(v59, v61 - 4);
          v62 = &v4->vfptr->SetMsgHooker;
          v63 = *v62;
          v64 = (*(int (**)(void))(*(_DWORD *)LODWORD(v4->m_kWorld.m_fScale) + 148))();
          (*((void (__thiscall **)(_DWORD, _DWORD))v63 + 39))(v62, v64 - 1);
          v65 = &v4->vfptr->SetMsgHooker;
          v66 = v4->m_kWorld.m_fScale;
          v67 = *v65;
          v68 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)LODWORD(v66) + 168))(LODWORD(v66));
          v69 = (*(int (__thiscall **)(_DWORD, int))(*(_DWORD *)LODWORD(v66) + 164))(LODWORD(v66), v68 + 4);
          (*((void (__thiscall **)(_DWORD, _DWORD))v67 + 77))(v65, v69 + 4);
        }
      }
      break;
    case 2:
      v70 = this->m_kWorld.m_Translate.z;
      if ( v70 == 0.0 )
        v71 = 0;
      else
        v71 = (IDirectMessenger *)(LODWORD(v70) + 232);
      if ( pkFrom == v71 )
        goto LABEL_49;
      v72 = this->m_kWorld.m_Translate.y;
      v73 = (IDirectMessenger *)(v72 == 0.0 ? 0 : LODWORD(v72) + 232);
      if ( v73 == pkFrom )
        goto LABEL_49;
      v74 = this->m_kPropertyList.m_kAllocator.m_uiCount;
      if ( v74 )
        v75 = (IDirectMessenger *)(v74 + 232);
      else
        v75 = 0;
      if ( v75 == pkFrom )
      {
        *(float *)&this->m_kChildren.vfptr = Timer::ms_fCurTime;
        LOBYTE(this->m_spCollisionObject.m_pObject) = 1;
      }
      else
      {
        v76 = this->m_kChildren.m_pBase;
        if ( v76 )
          v77 = (IDirectMessenger *)&v76[58];
        else
          v77 = 0;
        if ( v77 == pkFrom )
        {
          *(float *)&this->m_kChildren.m_uiSize = Timer::ms_fCurTime;
          LOBYTE(this->m_kChildren.m_uiMaxSize) = 1;
        }
      }
      break;
    case 5:
      v78 = this->m_kWorld.m_Translate.z;
      if ( v78 == 0.0 )
        v79 = 0;
      else
        v79 = (IDirectMessenger *)(LODWORD(v78) + 232);
      if ( pkFrom == v79
        || ((v80 = this->m_kWorld.m_Translate.y, v80 == 0.0) ? (v81 = 0) : (v81 = (IDirectMessenger *)(LODWORD(v80) + 232)),
            v81 == pkFrom) )
      {
LABEL_49:
        this->m_fInitXPos = 0.0;
      }
      break;
    case 3:
      v82 = this->m_kPropertyList.m_kAllocator.m_uiCount;
      if ( v82 )
        v83 = (IDirectMessenger *)(v82 + 232);
      else
        v83 = 0;
      if ( v83 == pkFrom )
      {
        LOBYTE(this->m_spCollisionObject.m_pObject) = 0;
      }
      else
      {
        v84 = this->m_kChildren.m_pBase;
        if ( v84 )
          v85 = (IDirectMessenger *)&v84[58];
        else
          v85 = 0;
        if ( v85 == pkFrom )
          LOBYTE(this->m_kChildren.m_uiMaxSize) = 0;
      }
      break;
    case 15:
      v86 = *(_DWORD *)pvBody;
      v87 = 0;
      uiOption = 0;
      switch ( v86 )
      {
        case 17:
          v87 = 512;
          break;
        case 18:
          v87 = 8;
          break;
        case 19:
          v87 = 16;
          break;
        case 20:
          v87 = 32;
          break;
        case 21:
          v87 = 4096;
          break;
        case 22:
          v87 = 0x2000;
          break;
        case 23:
          g_kRaidinfo.m_bIsDisplayNotice = *((_BYTE *)pvBody + 4);
          if ( !*((_BYTE *)pvBody + 4) )
          {
            v88 = *(GTInformWin **)(LODWORD(this->m_kLocal.m_Rotate.m_pEntry[1][0]) + 1244);
            if ( v88 )
              GTInformWin::Clear(v88);
          }
          break;
        case 24:
          v87 = 2;
          break;
        case 27:
          LODWORD(this->m_kWorld.m_Rotate.m_pEntry[1][0]) = 0;
          TextData::Get(0xEF05252B);
          break;
        case 28:
          ChatDisplayWin2::SetChatMode((ChatDisplayWin2 *)((char *)this - 232), 2u);
          break;
        case 29:
          v89 = this->m_kWorld.m_Rotate.m_pEntry[1][0];
          LODWORD(this->m_kWorld.m_Rotate.m_pEntry[1][0]) = 3;
          v90 = GuildTask::GetGuild();
          if ( (unsigned __int8)CClientGuild::AmIGuildMember(v90) )
          {
            TextData::Get(0xEEFCDF27);
          }
          else
          {
            TextData::Get(0xEF05252B);
            v4->m_kWorld.m_Rotate.m_pEntry[1][0] = v89;
            v91 = TextData::Get(0x76816B99u);
            if ( v4->m_uiRefCount )
            {
              (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, ChatDisplayWin2 *))(*(_DWORD *)v4->m_uiRefCount
                                                                                              + 4))(
                25,
                v91,
                v4);
              if ( v4->m_uiRefCount )
                (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, ChatDisplayWin2 *))(*(_DWORD *)v4->m_uiRefCount
                                                                                                + 20))(
                  25,
                  v91,
                  v4);
            }
            ((void (__thiscall *)(ChatDisplayWin2 *, signed int, NiUnsharedGeometryGroup *, ChatDisplayWin2 *))v4->vfptr[5].__vecDelDtor)(
              v4,
              25,
              v91,
              v4);
            v87 = uiOption;
          }
          break;
        case 30:
          v92 = this->m_kWorld.m_Rotate.m_pEntry[1][0];
          LODWORD(this->m_kWorld.m_Rotate.m_pEntry[1][0]) = 4;
          v93 = GuildAcademyTask::GetGuildAcademy();
          if ( !CClientGuildAcademy::AmIGuildAcademyMember(v93) )
          {
            v4->m_kWorld.m_Rotate.m_pEntry[1][0] = v92;
            v94 = TextData::Get(0xB2EBE824);
            if ( v4->m_uiRefCount )
            {
              (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, ChatDisplayWin2 *))(*(_DWORD *)v4->m_uiRefCount
                                                                                              + 4))(
                25,
                v94,
                v4);
              if ( v4->m_uiRefCount )
                (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, ChatDisplayWin2 *))(*(_DWORD *)v4->m_uiRefCount
                                                                                                + 20))(
                  25,
                  v94,
                  v4);
            }
            ((void (__thiscall *)(ChatDisplayWin2 *, signed int, NiUnsharedGeometryGroup *, ChatDisplayWin2 *))v4->vfptr[5].__vecDelDtor)(
              v4,
              25,
              v94,
              v4);
            v87 = uiOption;
          }
          break;
        case 62:
        case 63:
        case 64:
        case 65:
        case 66:
        case 67:
        case 68:
        case 69:
        case 70:
        case 71:
        case 72:
        case 73:
        case 74:
        case 75:
        case 76:
        case 77:
        case 78:
          v95 = *(ActionWin **)(LODWORD(this->m_kLocal.m_Rotate.m_pEntry[1][0]) + 768);
          if ( v95 )
            ActionWin::OnEmotionAction(v95, v86 - 62);
          break;
        case 79:
        case 80:
        case 81:
        case 82:
        case 83:
        case 84:
          v96 = 5 * v86 - 395;
          v97 = this->m_kLocal.m_Rotate.m_pEntry[1][0];
          v98 = *(_DWORD *)(LODWORD(v97) + 4 * v96 + 4696);
          v99 = LODWORD(v97) + 4 * v96 + 4696;
          v100 = *(_DWORD *)(v99 + 4);
          kCharID.n5_code[0] = v98;
          *(_QWORD *)&kCharID.n5_code[1] = __PAIR__(*(_DWORD *)(v99 + 8), v100);
          *(_QWORD *)&kCharID.n5_code[3] = *(_QWORD *)(v99 + 12);
          Name5::Name5(&nm, &str);
          if ( !Name5::operator==(&kCharID, &nm) )
          {
            Name5::n_string(&kCharID, acName);
            v101 = v4->m_kPropertyList.m_pkHead;
            acName[20] = 0;
            ((void (__stdcall *)(char *))v101->m_pkNext[38].m_pkPrev)(acName);
            ((void (__thiscall *)(PgWinBut **, signed int, _DWORD))LODWORD(v4[-1].m_pkChatCmdBut[2][1].m_kLocal.m_Rotate.m_pEntry[0][1]))(
              &v4[-1].m_pkChatCmdBut[2],
              22,
              0);
            ChatDisplayWin2::ChatStart((ChatDisplayWin2 *)((char *)v4 - 232), &byte_9B16CB);
          }
          break;
        default:
          break;
      }
      if ( v111[4] )
      {
        v102 = v4->m_kWorld.m_Rotate.m_pEntry[1][LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[1][0]) + 2];
        *(_DWORD *)(LODWORD(v102) + 512) |= v87;
      }
      else
      {
        v103 = v4->m_kWorld.m_Rotate.m_pEntry[1][LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[1][0]) + 2];
        *(_DWORD *)(LODWORD(v103) + 512) &= ~v87;
      }
      MachineOpt::SetChatWinFilter(
        LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[1][0]),
        *(_DWORD *)(LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[1][LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[1][0]) + 2]) + 512));
      break;
    default:
      return;
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (005EDD50) --------------------------------------------------------
void __thiscall ChatDisplayWin2::ChatDisplayWin2(ChatDisplayWin2 *this)
{
  ChatDisplayWin2 *v1; // esi@1
  NiPointer<PopupMenuWin> *v2; // ebx@1
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v3; // eax@1
  PopupMenuWin *v4; // ebx@3
  bool v5; // zf@8
  PopupMenuWin *v6; // ebx@9
  PopupMenuWin *v7; // ebx@14
  PgWinSpr *v8; // ebx@19
  std::exception pExceptionObject; // [sp+10h] [bp-28h]@25
  ChatDisplayWin2 *v10; // [sp+1Ch] [bp-1Ch]@1
  char *_What; // [sp+20h] [bp-18h]@25
  int v12; // [sp+24h] [bp-14h]@2
  NiPointer<PopupMenuWin> *v13; // [sp+28h] [bp-10h]@2
  int v14; // [sp+34h] [bp-4h]@1

  v1 = this;
  v10 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v14 = 0;
  v1->vfptr = (NiRefObjectVtbl *)&ChatDisplayWin2::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ChatDisplayWin2::`vftable'{for `IDirectMessenger'};
  `eh vector constructor iterator'(
    v1->m_aspChatBD,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_spMtrlProp.m_pObject = 0;
  v1->m_spFixedMtrlProp.m_pObject = 0;
  v1->m_spEdit.m_pObject = 0;
  v2 = v1->m_spChatFilterPopupMenu;
  `eh vector constructor iterator'(
    v1->m_spChatFilterPopupMenu,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_spChatModePopupMenu.m_pObject = 0;
  v1->m_spChatPopupMenu.m_pObject = 0;
  CLCS::CLCS(&v1->m_kSpamFilter);
  v1->m_spkSpamSlideSpr.m_pObject = 0;
  LOBYTE(v14) = 9;
  v1->m_listItemLinkStruct._Mysize = 0;
  v3 = (std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *)operator new(0x70u);
  if ( !v3 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_listItemLinkStruct._Myhead = v3;
  v3->_Next = v3;
  v1->m_listItemLinkStruct._Myhead->_Prev = v1->m_listItemLinkStruct._Myhead;
  v1->m_kAlphaControl.fTimeLeftToAppear = 1.0;
  LOBYTE(v14) = 10;
  v1->m_uiChattingBoxWidthMinusEditBoxWidth = 0;
  v1->m_kAlphaControl.fAlphaValue = 0.0;
  v1->m_pkLTSocketWin = 0;
  v1->m_pkLBSocketWin = 0;
  v1->m_pkRBSocketWin = 0;
  v13 = v1->m_spChatFilterPopupMenu;
  v12 = 5;
  do
  {
    v4 = v2->m_pObject;
    if ( v4 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      v13->m_pObject = 0;
    }
    v2 = v13 + 1;
    v5 = v12-- == 1;
    ++v13;
  }
  while ( !v5 );
  v6 = v1->m_spChatPopupMenu.m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v1->m_spChatPopupMenu.m_pObject = 0;
  }
  v7 = v1->m_spChatModePopupMenu.m_pObject;
  if ( v7 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v1->m_spChatModePopupMenu.m_pObject = 0;
  }
  v1->m_uiChatMode = 0;
  v1->m_pkReportText = 0;
  v1->m_pkReportTabBtn = 0;
  v1->m_pkChatCommandSprWin = 0;
  v1->m_pkTabButText[0] = 0;
  v1->m_pkTabButText[1] = 0;
  v1->m_pkTabButText[2] = 0;
  v1->m_pkTabButText[3] = 0;
  v1->m_pkTabButText[4] = 0;
  v1->m_pkTabText = 0;
  v1->m_iX = 0;
  v1->m_iY = 0;
  v1->m_pkCheckBox = 0;
  v1->m_pkChatBlockListBtn = 0;
  CLCS::Init(&v1->m_kSpamFilter, 128);
  v8 = v1->m_spkSpamSlideSpr.m_pObject;
  if ( v8 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
    {
      if ( v8 )
        v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    }
    v1->m_spkSpamSlideSpr.m_pObject = 0;
  }
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9B1B5C: using guessed type void (__thiscall *ChatDisplayWin2::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B1B7C: using guessed type int (__thiscall *ChatDisplayWin2::`vftable'{for `NiNode'})(void *p, char);

//----- (005EDFC0) --------------------------------------------------------
void __thiscall ChatDisplayWin2::~ChatDisplayWin2(ChatDisplayWin2 *this)
{
  ChatDisplayWin2 *v1; // esi@1
  EditWin *v2; // edi@1
  PgWin **v3; // edi@6
  signed int v4; // ebx@6
  NiPointer<PopupMenuWin> *v5; // ebx@8
  PopupMenuWin *v6; // edi@9
  PopupMenuWin *v7; // edi@15
  PopupMenuWin *v8; // edi@20
  void **v9; // ecx@25
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v10; // eax@25
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v11; // edi@26
  PgWinSpr *v12; // edi@27
  PopupMenuWin *v13; // edi@31
  PopupMenuWin *v14; // edi@35
  EditWin *v15; // edi@39
  NiMaterialProperty *v16; // edi@43
  NiMaterialProperty *v17; // edi@47
  signed int v18; // [sp+14h] [bp-10h]@8

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ChatDisplayWin2::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ChatDisplayWin2::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spEdit.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spEdit.m_pObject = 0;
  }
  v3 = (PgWin **)v1->m_spChatFilterPopupMenu;
  v4 = 5;
  do
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, *v3);
    ++v3;
    --v4;
  }
  while ( v4 );
  PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_spChatPopupMenu.m_pObject->vfptr);
  v5 = v1->m_spChatFilterPopupMenu;
  v18 = 5;
  do
  {
    v6 = v5->m_pObject;
    if ( v5->m_pObject )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      v5->m_pObject = 0;
    }
    ++v5;
    --v18;
  }
  while ( v18 );
  v7 = v1->m_spChatPopupMenu.m_pObject;
  if ( v7 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v1->m_spChatPopupMenu.m_pObject = 0;
  }
  v8 = v1->m_spChatModePopupMenu.m_pObject;
  if ( v8 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v1->m_spChatModePopupMenu.m_pObject = 0;
  }
  v1->m_pkCheckBox = 0;
  v9 = (void **)&v1->m_listItemLinkStruct._Myhead->_Next;
  v10 = (std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *)*v9;
  *v9 = v9;
  v1->m_listItemLinkStruct._Myhead->_Prev = v1->m_listItemLinkStruct._Myhead;
  v1->m_listItemLinkStruct._Mysize = 0;
  if ( v10 != v1->m_listItemLinkStruct._Myhead )
  {
    do
    {
      v11 = v10->_Next;
      operator delete(v10);
      v10 = v11;
    }
    while ( v11 != v1->m_listItemLinkStruct._Myhead );
  }
  operator delete(v1->m_listItemLinkStruct._Myhead);
  v12 = v1->m_spkSpamSlideSpr.m_pObject;
  if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
    v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
  CLCS::~CLCS(&v1->m_kSpamFilter);
  v13 = v1->m_spChatPopupMenu.m_pObject;
  if ( v13 && !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) && v13 )
    v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
  v14 = v1->m_spChatModePopupMenu.m_pObject;
  if ( v14 && !InterlockedDecrement((volatile LONG *)&v14->m_uiRefCount) && v14 )
    v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
  `eh vector destructor iterator'(
    v1->m_spChatFilterPopupMenu,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v15 = v1->m_spEdit.m_pObject;
  if ( v15 && !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) && v15 )
    v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
  v16 = v1->m_spFixedMtrlProp.m_pObject;
  if ( v16 && !InterlockedDecrement((volatile LONG *)&v16->m_uiRefCount) && v16 )
    v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
  v17 = v1->m_spMtrlProp.m_pObject;
  if ( v17 && !InterlockedDecrement((volatile LONG *)&v17->m_uiRefCount) && v17 )
    v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
  `eh vector destructor iterator'(
    v1->m_aspChatBD,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9B1B5C: using guessed type void (__thiscall *ChatDisplayWin2::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B1B7C: using guessed type int (__thiscall *ChatDisplayWin2::`vftable'{for `NiNode'})(void *p, char);

//----- (005EE2A0) --------------------------------------------------------
ChatDisplayWin2 *__cdecl ChatDisplayWin2::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  ChatDisplayWin2 *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x330u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    ChatDisplayWin2::ChatDisplayWin2((ChatDisplayWin2 *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[136].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (ChatDisplayWin2 *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (005EE3D0) --------------------------------------------------------
void __thiscall ChatDisplayWin2::AddChatLinkItemInfo(ChatDisplayWin2 *this, char *pcChatText)
{
  char *v2; // edi@1
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v3; // eax@2
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v4; // esi@2
  int v5; // ebx@5
  int v6; // esi@5
  int v7; // edx@9
  unsigned int v8; // kr00_4@12
  unsigned int v9; // ebx@12
  ItemInfo *v10; // esi@22
  unsigned int v11; // eax@35
  char *v12; // edi@35
  char v13; // cl@36
  char *v14; // edi@37
  char *v15; // esi@37
  int v16; // ecx@37
  char *v17; // eax@37
  char *v18; // esi@37
  char v19; // cl@38
  unsigned int v20; // eax@39
  char *v21; // edi@39
  char v22; // cl@40
  unsigned int v23; // ebx@45
  char *v24; // edi@45
  char v25; // al@46
  char *v26; // eax@47
  char v27; // dl@48
  unsigned int v28; // eax@49
  char *v29; // edi@49
  char v30; // cl@50
  const char *v31; // [sp-10h] [bp-168h]@24
  const char *v32; // [sp-Ch] [bp-164h]@24
  ChatDisplayWin2 *v33; // [sp+4h] [bp-154h]@1
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *iter; // [sp+Ch] [bp-14Ch]@2
  ItemInfo *pInfo; // [sp+10h] [bp-148h]@6
  char chItemName[256]; // [sp+14h] [bp-144h]@35
  char chColorName[64]; // [sp+114h] [bp-44h]@5

  v2 = pcChatText;
  v33 = this;
  if ( pcChatText )
  {
    v3 = this->m_listItemLinkStruct._Myhead;
    v4 = v3->_Next;
    iter = v3->_Next;
    if ( v3->_Next != v3 )
    {
      while ( 1 )
      {
        memset(chColorName, 0, 0x40u);
        v5 = v4->_Myval.itemid;
        v6 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
        if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                              + 16))(
                                ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                                v5) )
        {
          if ( (unsigned __int16)v5 <= *(_WORD *)(v6 + 200) )
          {
            v7 = *(_DWORD *)(v6 + 196);
            if ( *(_DWORD *)(v7 + 4 * v5) )
              pInfo = *(ItemInfo **)(v7 + 4 * v5);
            else
              pInfo = 0;
          }
          else
          {
            pInfo = 0;
          }
        }
        else
        {
          pInfo = 0;
        }
        v8 = strlen(v2);
        v9 = 0;
        if ( (signed int)(v8 + 1) > 0 )
        {
          while ( 1 )
          {
            if ( v2[v9] == 123 && !strncmp(&v2[v9], "{color,", 7u) )
            {
              for ( ; v2[v9 + 1] != 125; ++v9 )
                ;
              ++v9;
            }
            if ( v2[v9] == 60 && v2[v9 + 1] == 9 )
              break;
            if ( (signed int)++v9 >= (signed int)(v8 + 1) )
              goto LABEL_52;
          }
          v10 = pInfo;
          switch ( pInfo->ItemGradeType )
          {
            case 0:
              sprintf(chColorName, "{color,%s,", "#FFFFFF");
              break;
            case 1:
              v32 = "green";
              v31 = "{color,%s,";
              goto LABEL_31;
            case 2:
            case 5:
              sprintf(chColorName, "{color,%s,", "lightblue");
              break;
            case 3:
              sprintf(chColorName, "{color,%s,", "yellow");
              break;
            case 4:
              v32 = "pink";
              v31 = "{color,%s,";
              goto LABEL_31;
            case 6:
              sprintf(chColorName, "{color,%s,", "orange");
              break;
            case 7:
              sprintf(chColorName, "{color,%s,", "violet");
              break;
            default:
              v32 = "#FFFFFF";
              v31 = "{color,%s,";
LABEL_31:
              sprintf(chColorName, v31, v32);
              break;
          }
          if ( v10->SetItemIndex[0] != 45 && SetItemNameTab::GetByInxName(v10->SetItemIndex) )
            sprintf(chColorName, "{color,%s,", "lightblue");
          memset(chItemName, 0, 0x100u);
          strncpy(chItemName, v2, v9);
          v11 = strlen(chColorName) + 1;
          v12 = (char *)&pInfo + 3;
          do
            v13 = (v12++)[1];
          while ( v13 );
          qmemcpy(v12, chColorName, 4 * (v11 >> 2));
          v15 = &chColorName[4 * (v11 >> 2)];
          v14 = &v12[4 * (v11 >> 2)];
          v16 = v11 & 3;
          v17 = &pcChatText[v9];
          qmemcpy(v14, v15, v16);
          v18 = &pcChatText[v9];
          do
            v19 = *v17++;
          while ( v19 );
          v20 = v17 - v18;
          v21 = (char *)&pInfo + 3;
          do
            v22 = (v21++)[1];
          while ( v22 );
          qmemcpy(v21, v18, v20);
          while ( pcChatText[v9] != 9 || pcChatText[v9 + 1] != 62 )
            ++v9;
          memset(pcChatText, 0, 0x400u);
          v23 = strlen(chColorName) + v9 + 2;
          strncpy(pcChatText, chItemName, v23);
          v24 = pcChatText - 1;
          do
            v25 = (v24++)[1];
          while ( v25 );
          v26 = &chItemName[v23];
          *(_WORD *)v24 = 125;
          do
            v27 = *v26++;
          while ( v27 );
          v28 = v26 - &chItemName[v23];
          v29 = pcChatText - 1;
          do
            v30 = (v29++)[1];
          while ( v30 );
          qmemcpy(v29, &chItemName[v23], v28);
          v2 = pcChatText;
        }
LABEL_52:
        iter = iter->_Next;
        if ( iter == v33->m_listItemLinkStruct._Myhead )
          break;
        v4 = iter;
      }
    }
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (005EE730) --------------------------------------------------------
void __thiscall ChatDisplayWin2::ClearLinkItemList(ChatDisplayWin2 *this)
{
  ChatDisplayWin2 *v1; // esi@1
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v2; // ecx@1
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v3; // eax@1
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v4; // edi@2
  void **v5; // ecx@5
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v6; // eax@5
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v7; // edi@6

  v1 = this;
  v2 = this->m_listItemLinkStruct._Myhead;
  v3 = v2->_Next;
  if ( v2->_Next != v2 )
  {
    do
    {
      v4 = v3->_Next;
      if ( v3 != v1->m_listItemLinkStruct._Myhead )
      {
        v3->_Prev->_Next = v4;
        v3->_Next->_Prev = v3->_Prev;
        operator delete(v3);
        --v1->m_listItemLinkStruct._Mysize;
      }
      v3 = v4;
    }
    while ( v4 != v1->m_listItemLinkStruct._Myhead );
  }
  v5 = (void **)&v1->m_listItemLinkStruct._Myhead->_Next;
  v6 = (std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *)*v5;
  *v5 = v5;
  v1->m_listItemLinkStruct._Myhead->_Prev = v1->m_listItemLinkStruct._Myhead;
  v1->m_listItemLinkStruct._Mysize = 0;
  if ( v6 != v1->m_listItemLinkStruct._Myhead )
  {
    do
    {
      v7 = v6->_Next;
      operator delete(v6);
      v6 = v7;
    }
    while ( v7 != v1->m_listItemLinkStruct._Myhead );
  }
}

//----- (005EE7B0) --------------------------------------------------------
void __thiscall ChatDisplayWin2::DeleteItemLink(ChatDisplayWin2 *this, bool bIsDeleteKey, bool bIsBackSpaceKey)
{
  ChatDisplayWin2 *v3; // edi@1
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v4; // esi@2
  int v5; // eax@2

  v3 = this;
  if ( bIsDeleteKey != bIsBackSpaceKey )
  {
    v4 = this->m_listItemLinkStruct._Myhead->_Next;
    v5 = ChatDisplayWin2::PositionCarretItemLink(this);
    if ( v5 > 0 )
    {
      do
      {
        --v5;
        v4 = v4->_Next;
      }
      while ( v5 );
    }
    if ( bIsBackSpaceKey )
    {
      if ( v4 == v3->m_listItemLinkStruct._Myhead )
        return;
      v4->_Prev->_Next = v4->_Next;
      v4->_Next->_Prev = v4->_Prev;
      goto LABEL_10;
    }
    if ( bIsDeleteKey && v4 != v3->m_listItemLinkStruct._Myhead )
    {
      v4->_Prev->_Next = v4->_Next;
      v4->_Next->_Prev = v4->_Prev;
LABEL_10:
      operator delete(v4);
      --v3->m_listItemLinkStruct._Mysize;
      return;
    }
  }
}

//----- (005EE830) --------------------------------------------------------
void __thiscall ChatDisplayWin2::OnEditEnd(ChatDisplayWin2 *this, unsigned int wParam, int lParam)
{
  ChatDisplayWin2 *v3; // edi@1
  int v4; // eax@1
  GameFrameWork *v5; // esi@7
  NiUnsharedGeometryGroup *v6; // eax@7
  char *v7; // esi@8
  char v8; // al@9
  char v9; // al@12
  char *v10; // ecx@12
  signed int v11; // edx@13
  void **v12; // ecx@25
  std::_List_nod<float,std::allocator<float> >::_Node *v13; // eax@25
  std::list<float,std::allocator<float> > *v14; // esi@25
  std::_List_nod<float,std::allocator<float> >::_Node *v15; // edi@26
  EditWin *v16; // ecx@36
  const char *v17; // esi@37
  signed int v18; // eax@37
  signed int i; // ecx@37
  int v20; // eax@40
  char *v21; // eax@41
  char v22; // cl@42
  char *v23; // [sp-8h] [bp-8B4h]@32
  char *v24; // [sp-4h] [bp-8B0h]@32
  char resultText[1024]; // [sp+10h] [bp-89Ch]@37
  char pcChatText[1024]; // [sp+410h] [bp-49Ch]@1
  char acToken[128]; // [sp+810h] [bp-9Ch]@10
  char acName[21]; // [sp+890h] [bp-1Ch]@36

  v3 = this;
  v4 = ((int (*)(void))this->m_spEdit.m_pObject->vfptr[114].__vecDelDtor)();
  sprintf(pcChatText, "%s", v4);
  if ( wParam != 2 )
    ((void (*)(void))v3->m_spEdit.m_pObject->vfptr[117].__vecDelDtor)();
  if ( wParam != 1 )
  {
    if ( wParam == 2 )
    {
      ((void (*)(void))v3->m_spEdit.m_pObject->vfptr[120].__vecDelDtor)();
      return;
    }
    goto LABEL_47;
  }
  if ( g_pkMainChar->m_kAbStateProperty.iCantChatStateCount > 0 )
  {
    v5 = (GameFrameWork *)v3->m_pkFrameWork;
    v6 = TextData2::Get(0x4F19C4B8u);
    GameFrameWork::AddSysMsg(v5, (const char *)v6);
  }
  v7 = pcChatText;
  if ( !pcChatText[0] )
  {
LABEL_21:
    if ( v3->m_listItemLinkStruct._Mysize )
      ChatDisplayWin2::AddChatLinkItemInfo(v3, pcChatText);
    switch ( v3->m_uiChatMode )
    {
      case 0u:
        GameFrameWork::DecodingChat((GameFrameWork *)v3->m_pkFrameWork, pcChatText, 0, 0);
        break;
      case 2u:
        GameFrameWork::DecodingChat((GameFrameWork *)v3->m_pkFrameWork, pcChatText, "/p ", 0);
        break;
      case 3u:
        v24 = 0;
        v23 = "/g ";
        goto LABEL_46;
      case 4u:
        GameFrameWork::DecodingChat((GameFrameWork *)v3->m_pkFrameWork, pcChatText, "/a ", 0);
        break;
      case 1u:
        if ( !pcChatText[0] || IsAllSpace_0(pcChatText) )
          break;
        Name5::n_string(&GameFrameWork::m_kWhisperCharID, acName);
        v16 = v3->m_pkChatNameEditBox;
        acName[20] = 0;
        if ( strlen((const char *)((int (*)(void))v16->vfptr[113].__vecDelDtor)()) )
        {
          resultText[0] = 0;
          memset(&resultText[1], 0, 0x3FFu);
          v17 = (const char *)((int (*)(void))v3->m_pkChatNameEditBox->vfptr[113].__vecDelDtor)();
          v18 = strlen(v17);
          for ( i = 0; i < v18; ++i )
          {
            if ( v17[i] == 32 )
              return;
          }
          v20 = ((int (__cdecl *)(char *))v3->m_pkChatNameEditBox->vfptr[113].__vecDelDtor)(pcChatText);
          sprintf(resultText, "%s %s", v20);
          GameFrameWork::DecodingChat((GameFrameWork *)v3->m_pkFrameWork, resultText, "/w ", (char *)v17);
        }
        else
        {
          v21 = acName;
          do
            v22 = *v21++;
          while ( v22 );
          if ( v21 == &acName[1] )
          {
            v24 = 0;
            v23 = "/w ";
LABEL_46:
            GameFrameWork::DecodingChat((GameFrameWork *)v3->m_pkFrameWork, pcChatText, v23, v24);
          }
          else
          {
            resultText[0] = 0;
            memset(&resultText[1], 0, 0x3FFu);
            sprintf(resultText, "%s %s", acName, pcChatText);
            GameFrameWork::DecodingChat((GameFrameWork *)v3->m_pkFrameWork, resultText, "/w ", acName);
          }
        }
        break;
      default:
        break;
    }
LABEL_47:
    if ( byte_B4FF90 && pcChatText[0] )
    {
      ((void (*)(void))v3->m_spEdit.m_pObject->vfptr[120].__vecDelDtor)();
    }
    else
    {
      ((void (__stdcall *)(_DWORD))v3->m_pkChatEditBox->vfptr[64].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v3->m_pkChatEngMode->vfptr[64].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v3->m_pkChatKorMode->vfptr[64].__vecDelDtor)(0);
    }
    if ( v3->m_listItemLinkStruct._Mysize )
      ChatDisplayWin2::ClearLinkItemList(v3);
    return;
  }
  while ( 1 )
  {
    v8 = *v7++;
    if ( v8 == 123 )
    {
      acToken[0] = 0;
      memset(&acToken[1], 0, 0x7Fu);
      for ( ; *v7 == 32; ++v7 )
        ;
      v9 = *v7;
      v10 = acToken;
      if ( *v7 )
      {
        v11 = 0;
        do
        {
          if ( v9 == 44 || v11 >= 64 )
            break;
          if ( v9 != 32 )
          {
            *v10++ = v9;
            ++v11;
          }
          v9 = (v7++)[1];
        }
        while ( v9 );
      }
      *v10 = 0;
      if ( !_strcmpi(acToken, "color") )
        break;
    }
    if ( !*v7 )
      goto LABEL_21;
  }
  if ( v3->m_listItemLinkStruct._Mysize )
  {
    v12 = (void **)&v3->m_listItemLinkStruct._Myhead->_Next;
    v13 = (std::_List_nod<float,std::allocator<float> >::_Node *)*v12;
    v14 = (std::list<float,std::allocator<float> > *)&v3->m_listItemLinkStruct;
    if ( *v12 != v12 )
    {
      do
      {
        v15 = v13->_Next;
        if ( v13 != v14->_Myhead )
        {
          v13->_Prev->_Next = v15;
          v13->_Next->_Prev = v13->_Prev;
          operator delete(v13);
          --v14->_Mysize;
        }
        v13 = v15;
      }
      while ( v15 != v14->_Myhead );
    }
    std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::clear(v14);
  }
}
// B4FF90: using guessed type char byte_B4FF90;

//----- (005EEC10) --------------------------------------------------------
void __thiscall ChatDisplayWin2::SetItemChatLink(ChatDisplayWin2 *this, char *pLinkItemText, SHINE_ITEM_STRUCT *rItemStruct)
{
  ChatDisplayWin2 *v3; // ebx@1
  PgEditWin *v4; // ecx@2
  const char *v5; // edi@2
  signed int v6; // esi@2
  PgEditWin *v7; // eax@3
  int i; // eax@4
  int j; // eax@8
  unsigned int v10; // eax@12
  char *v11; // edi@12
  char v12; // cl@13
  int v13; // kr04_4@14
  char *v14; // eax@14
  char *v15; // esi@14
  char v16; // cl@15
  unsigned int v17; // eax@16
  char *v18; // edi@16
  char v19; // cl@17
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v20; // edi@20
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v21; // eax@20
  unsigned int v22; // ecx@20
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v23; // esi@23
  int v24; // eax@23
  unsigned int v25; // ecx@25
  GameFrameWork *v26; // eax@28
  char *pCurrentText; // [sp+8h] [bp-11Ch]@2
  int nCarretPos; // [sp+Ch] [bp-118h]@2
  int nNextTokenCnt; // [sp+18h] [bp-10Ch]@2
  int nPreTokenCnt; // [sp+1Ch] [bp-108h]@2
  char chInsertText[256]; // [sp+20h] [bp-104h]@2

  v3 = this;
  if ( pLinkItemText )
  {
    v4 = this->m_spEdit.m_pObject->m_spEditWin.m_pObject;
    nPreTokenCnt = 0;
    nNextTokenCnt = 0;
    nCarretPos = PgEditWin::GetCaretPos(v4);
    memset(chInsertText, 0, 0x100u);
    v5 = (const char *)((int (*)(void))v3->m_spEdit.m_pObject->m_spEditWin.m_pObject->vfptr[4].__vecDelDtor)();
    pCurrentText = (char *)v5;
    v6 = strlen(v5) + 1;
    if ( !(unsigned __int8)((int (*)(void))v3->m_spEdit.m_pObject->vfptr[122].__vecDelDtor)() )
    {
      ((void (__stdcall *)(signed int))v3->m_spEdit.m_pObject->vfptr[64].__vecDelDtor)(1);
      v7 = v3->m_spEdit.m_pObject->m_spEditWin.m_pObject;
      v7->m_bStrClip = 1;
      v7->m_uiMaxEditWidth = 423;
      ((void (*)(void))v3->m_spEdit.m_pObject->vfptr[120].__vecDelDtor)();
      ((void (__stdcall *)(signed int))v3->m_pkChatEditBox->vfptr[64].__vecDelDtor)(1);
      ((void (__stdcall *)(void *))v3->m_spEdit.m_pObject->vfptr[116].__vecDelDtor)(&unk_9B16EB);
    }
    for ( i = 0; i < nCarretPos; ++i )
    {
      if ( v5[i] == 9 )
        ++nPreTokenCnt;
    }
    for ( j = nCarretPos; j < v6; ++j )
    {
      if ( v5[j] == 9 )
        ++nNextTokenCnt;
    }
    strncpy(chInsertText, (char *)v5, nCarretPos);
    v10 = strlen(pLinkItemText) + 1;
    v11 = (char *)&nPreTokenCnt + 3;
    do
      v12 = (v11++)[1];
    while ( v12 );
    qmemcpy(v11, pLinkItemText, v10);
    v13 = strlen(chInsertText);
    v14 = &pCurrentText[nCarretPos];
    v15 = &pCurrentText[nCarretPos];
    do
      v16 = *v14++;
    while ( v16 );
    v17 = v14 - v15;
    v18 = (char *)&nPreTokenCnt + 3;
    do
      v19 = (v18++)[1];
    while ( v19 );
    qmemcpy(v18, v15, v17);
    if ( (signed int)(strlen(chInsertText) + 20 * v3->m_listItemLinkStruct._Mysize) <= 128 )
    {
      if ( nNextTokenCnt )
      {
        v23 = v3->m_listItemLinkStruct._Myhead->_Next;
        v24 = nPreTokenCnt / 2;
        if ( nPreTokenCnt / 2 > 0 )
        {
          do
          {
            --v24;
            v23 = v23->_Next;
          }
          while ( v24 );
        }
        v21 = std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::_Buynode<SHINE_ITEM_STRUCT &>(
                v23,
                v23->_Prev,
                rItemStruct);
        v25 = v3->m_listItemLinkStruct._Mysize;
        if ( 41698710 - v25 < 1 )
          std::_Xlength_error("list<T> too long");
        v3->m_listItemLinkStruct._Mysize = v25 + 1;
        v23->_Prev = v21;
      }
      else
      {
        v20 = v3->m_listItemLinkStruct._Myhead;
        v21 = std::_List_val<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::_Buynode<SHINE_ITEM_STRUCT &>(
                v3->m_listItemLinkStruct._Myhead,
                v20->_Prev,
                rItemStruct);
        v22 = v3->m_listItemLinkStruct._Mysize;
        if ( 41698710 - v22 < 1 )
          std::_Xlength_error("list<T> too long");
        v3->m_listItemLinkStruct._Mysize = v22 + 1;
        v20->_Prev = v21;
      }
      v21->_Prev->_Next = v21;
      v26 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v26 )
        GameFrameWork::SetSaveChatComList(v26, 0);
      ((void (__stdcall *)(char *))v3->m_spEdit.m_pObject->m_spEditWin.m_pObject->vfptr[5].__vecDelDtor)(chInsertText);
      PgEditWin::SetCaretPos(v3->m_spEdit.m_pObject->m_spEditWin.m_pObject, v13);
    }
  }
}

//----- (005EEF20) --------------------------------------------------------
void __thiscall ChatDisplayWin2::ItemLinkKeyDownCheck(ChatDisplayWin2 *this)
{
  ChatDisplayWin2 *v1; // edi@1
  const char *v2; // esi@1
  PgEditWin *v3; // edi@2
  int v4; // eax@3
  signed int v5; // ebx@3
  char v6; // cl@4
  int v7; // edi@7
  int v8; // ebx@15
  int v9; // edi@22
  int v10; // edi@25
  unsigned int v11; // ebx@25
  unsigned int v12; // eax@25
  char *v13; // edi@25
  char v14; // cl@26
  std::_List_nod<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >::_Node *v15; // esi@27
  int v16; // eax@27
  int v17; // edi@33
  unsigned int v18; // edi@36
  unsigned int v19; // ebx@36
  int v20; // kr00_4@36
  unsigned int v21; // eax@36
  char *v22; // edi@36
  char v23; // cl@37
  char *src; // [sp+8h] [bp-314h]@32
  ChatDisplayWin2 *v25; // [sp+Ch] [bp-310h]@1
  PgEditWin *pEditWin; // [sp+10h] [bp-30Ch]@2
  int nCaretPos; // [sp+14h] [bp-308h]@3
  char chToken[256]; // [sp+18h] [bp-304h]@10
  char chStartText[256]; // [sp+118h] [bp-204h]@22
  char chNextText[256]; // [sp+218h] [bp-104h]@22

  v1 = this;
  v25 = this;
  v2 = (const char *)((int (*)(void))this->m_spEdit.m_pObject->vfptr[113].__vecDelDtor)();
  if ( v2 )
  {
    v3 = v1->m_spEdit.m_pObject->m_spEditWin.m_pObject;
    pEditWin = v3;
    if ( v3 )
    {
      v4 = PgEditWin::GetCaretPos(v3);
      nCaretPos = v4;
      v5 = strlen(v2);
      if ( v5 )
      {
        v6 = g_pkKeyboard->m_aucKeystate[15];
        if ( v6 & 0x10 )
        {
          if ( v2[v4 - 1] == 60 && v2[v4] == 9 )
          {
            v7 = v4;
            while ( ++v7 < v5 )
            {
              if ( v2[v7] == 62 )
              {
                memcpy(chToken, (char *)&v2[v4], v7 - v4);
                if ( strtok(chToken, "\t") )
                  PgEditWin::SetCaretPos(pEditWin, v7 + 1);
                return;
              }
            }
          }
        }
        else if ( v6 & 8 )
        {
          if ( v2[v4] == 62 && v2[v4 - 1] == 9 )
          {
            v8 = v4;
            while ( --v8 > 0 )
            {
              if ( v2[v8 - 1] == 60 )
              {
                memcpy(chToken, (char *)&v2[v8], v4 - v8);
                if ( strtok(chToken, "\t") )
                  PgEditWin::SetCaretPos(v3, v8 - 1);
                return;
              }
            }
          }
        }
        else if ( g_pkKeyboard->m_aucKeystate[16] & 2 )
        {
          if ( v2[v4] == 9 )
          {
            memset(chStartText, 0, 0x100u);
            memset(chNextText, 0, 0x100u);
            v9 = nCaretPos;
            while ( ++v9 < v5 )
            {
              if ( v2[v9] == 62 )
              {
                v10 = v9 + 1;
                memcpy(chStartText, (char *)v2, nCaretPos);
                v11 = v5 - v10;
                memcpy(chNextText, (char *)&v2[v10], v11);
                chNextText[v11] = 0;
                v12 = strlen(chNextText) + 1;
                v13 = &chToken[255];
                do
                  v14 = (v13++)[1];
                while ( v14 );
                qmemcpy(v13, chNextText, v12);
                pEditWin->vfptr[5].__vecDelDtor((NiRefObject *)pEditWin, (unsigned int)chStartText);
                PgEditWin::SetCaretPos(pEditWin, nCaretPos);
                v15 = v25->m_listItemLinkStruct._Myhead->_Next;
                v16 = ChatDisplayWin2::PositionCarretItemLink(v25);
                if ( v16 > 0 )
                {
                  do
                  {
                    --v16;
                    v15 = v15->_Next;
                  }
                  while ( v16 );
                }
                if ( v15 != v25->m_listItemLinkStruct._Myhead )
                {
                  v15->_Prev->_Next = v15->_Next;
                  v15->_Next->_Prev = v15->_Prev;
                  operator delete(v15);
                  --v25->m_listItemLinkStruct._Mysize;
                }
                return;
              }
            }
          }
        }
        else if ( g_pkKeyboard->m_aucKeystate[1] & 0x40 )
        {
          src = (char *)&v2[v4];
          if ( v2[v4 - 1] == 9 )
          {
            memset(chNextText, 0, 0x100u);
            memset(chStartText, 0, 0x100u);
            v17 = nCaretPos;
            while ( --v17 > 0 )
            {
              if ( v2[v17 - 1] == 60 )
              {
                v18 = v17 - 1;
                memcpy(chNextText, (char *)v2, v18);
                v19 = v5 - v18;
                memcpy(chStartText, src, v19);
                chToken[v19] = 0;
                v20 = strlen(chNextText);
                v21 = strlen(chStartText) + 1;
                v22 = &chStartText[255];
                do
                  v23 = (v22++)[1];
                while ( v23 );
                qmemcpy(v22, chStartText, v21);
                pEditWin->vfptr[5].__vecDelDtor((NiRefObject *)pEditWin, (unsigned int)chNextText);
                PgEditWin::SetCaretPos(pEditWin, v20);
                ChatDisplayWin2::DeleteItemLink(v25, 0, 1);
                return;
              }
            }
          }
        }
      }
    }
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (005EF2F0) --------------------------------------------------------
void __userpurge ChatDisplayWin2::UpdateMeWin(ChatDisplayWin2 *this@<ecx>, int a2@<ebx>, int a3@<edi>, int a4@<esi>, float fCurTime)
{
  double v5; // st7@1
  double v6; // st6@1
  ChatDisplayWin2 *v7; // esi@1
  ChatBoardFlex *v8; // ecx@3
  bool v9; // c0@5
  double v10; // st7@5
  ChatBoardFlex *v11; // ecx@6
  FrameBoxWin *v12; // ecx@7
  PgWinBut *v13; // ecx@14
  PgWinBut *v14; // ecx@16
  PgWinBut *v15; // ecx@18
  ColumnBut *v16; // ecx@20
  PgWinBut *v17; // ecx@22
  PgWinBut *v18; // ecx@24
  PgWinBut *v19; // ecx@26
  PgWinBut *v20; // ecx@28
  PgWinBut *v21; // ecx@30
  PgWinBut *v22; // ecx@32
  PopupMenuWin *v23; // ecx@34
  PopupMenuWin *v24; // ecx@37
  int v25; // edi@40
  signed int v26; // ebx@40
  FrameBoxWin *v27; // ecx@49
  double v28; // st7@50
  const char *v29; // eax@55
  NiMaterialProperty *v30; // eax@55
  NiMaterialProperty *v31; // eax@59
  double v32; // st7@63
  NiMaterialProperty *v33; // eax@68
  PgWinText *v34; // ecx@69
  int v35; // edi@71
  signed int v36; // ebx@71
  PgWinText *v37; // ecx@75
  int v38; // edi@78
  signed int v39; // ebx@78
  struct NiInputMouse *v40; // eax@86
  int v41; // edx@89
  unsigned int v42; // edi@94
  int v43; // ebx@94
  int v44; // eax@94
  int v45; // eax@94
  EditWin *v46; // ecx@101
  int v47; // edi@103
  signed int v48; // ebx@103
  char v49; // al@106
  void *(__thiscall *v50)(NiRefObject *, unsigned int); // edx@106
  int v51; // eax@107
  FrameBoxWin *v52; // ecx@111
  NiRefObjectVtbl *v53; // edi@111
  FrameBoxWin *v54; // ebx@111
  int v55; // eax@111
  int v56; // eax@111
  NiRefObjectVtbl **v57; // ebx@112
  int v58; // edi@112
  FrameBoxWin *v59; // edi@112
  int v60; // eax@112
  int v61; // eax@112
  int v62; // ST98_4@112
  NiRefObjectVtbl **v63; // ebx@113
  NiRefObjectVtbl *v64; // edi@113
  int v65; // ST98_4@113
  NiRefObjectVtbl **v66; // ebx@113
  NiRefObjectVtbl *v67; // edi@113
  int v68; // eax@113
  FrameBoxWin *v69; // edi@113
  NiRefObjectVtbl *v70; // ebx@113
  int v71; // eax@113
  int v72; // eax@113
  GameFrameWork *v73; // eax@113
  GameFrameWork *v74; // eax@116
  EditWin *v75; // eax@118
  signed int v76; // [sp+8Ch] [bp-10h]@10
  int v77; // [sp+90h] [bp-Ch]@1
  int v78; // [sp+94h] [bp-8h]@1
  ChatDisplayWin2 *v79; // [sp+98h] [bp-4h]@1
  float bHit; // [sp+A4h] [bp+8h]@51
  float bHita; // [sp+A4h] [bp+8h]@54
  float bHitb; // [sp+A4h] [bp+8h]@54
  float bHitc; // [sp+A4h] [bp+8h]@55
  float bHitd; // [sp+A4h] [bp+8h]@64
  float bHite; // [sp+A4h] [bp+8h]@67
  float bHitf; // [sp+A4h] [bp+8h]@67
  float bHitg; // [sp+A4h] [bp+8h]@68
  NiRefObjectVtbl *bHith; // [sp+A4h] [bp+8h]@94
  NiRefObjectVtbl *bHiti; // [sp+A4h] [bp+8h]@112
  EditWin *bHitj; // [sp+A4h] [bp+8h]@113
  char bHit_3; // [sp+A7h] [bp+Bh]@40
  char bHit_3a; // [sp+A7h] [bp+Bh]@78

  v79 = this;
  v5 = fCurTime;
  v78 = a4;
  v6 = 0.1000000014901161;
  v7 = this;
  v77 = a3;
  if ( this->m_pkScrollUpBtn->m_eButShow == 1 && v5 - this->m_fScUpTimeWhenPushed > 0.1000000014901161 )
  {
    do
    {
      v8 = v7->m_pkActiveChatBD;
      v7->m_fScUpTimeWhenPushed = v6 + v7->m_fScUpTimeWhenPushed;
      ChatBoardFlex::ViewLineUp(v8);
      v5 = fCurTime;
      v6 = 0.1000000014901161;
    }
    while ( fCurTime - v7->m_fScUpTimeWhenPushed > 0.1000000014901161 );
  }
  if ( v7->m_pkScrollDnBtn->m_eButShow == 1 )
  {
    v9 = v6 < v5 - v7->m_fScDnTimeWhenPushed;
    v10 = v6;
    if ( v9 )
    {
      do
      {
        v11 = v7->m_pkActiveChatBD;
        v7->m_fScDnTimeWhenPushed = v10 + v7->m_fScDnTimeWhenPushed;
        ChatBoardFlex::ViewLineDown(v11);
        v10 = 0.1000000014901161;
      }
      while ( fCurTime - v7->m_fScDnTimeWhenPushed > 0.1000000014901161 );
    }
  }
  v12 = v7->m_pkChatEditBox;
  if ( v12 && (unsigned __int8)((int (__cdecl *)(int, int, ChatDisplayWin2 *))v12->vfptr[65].__vecDelDtor)(a3, v78, v79) )
  {
    if ( EditWin::GetImeStatus(v7->m_spEdit.m_pObject) == (HIMC)2 )
    {
      v76 = 1;
LABEL_11:
      ((void (__stdcall *)(signed int, int))v7->m_pkChatEngMode->vfptr[64].__vecDelDtor)(v76, v77);
      ((void (__cdecl *)(_DWORD))v7->m_pkChatKorMode->vfptr[64].__vecDelDtor)(0);
      goto LABEL_12;
    }
    v76 = 0;
    if ( EditWin::GetImeStatus(v7->m_spEdit.m_pObject) != (HIMC)1 )
      goto LABEL_11;
    ((void (__stdcall *)(_DWORD, int))v7->m_pkChatEngMode->vfptr[64].__vecDelDtor)(0, v77);
    ((void (__cdecl *)(signed int))v7->m_pkChatKorMode->vfptr[64].__vecDelDtor)(1);
  }
LABEL_12:
  if ( (unsigned __int8)((int (__stdcall *)(unsigned int, int, int, int, int, ChatDisplayWin2 *))v7->m_pkChattingBox->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY,
                          a2,
                          v77,
                          v78,
                          v79)
    || (unsigned __int8)((int (__thiscall *)(ChatDisplayWin2 *, unsigned int, int))v7->vfptr[83].__vecDelDtor)(
                          v7,
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY)
    || (v13 = v7->m_pkChatBlockListBtn) != 0
    && (unsigned __int8)((int (__stdcall *)(unsigned int, int))v13->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY)
    || (v14 = v7->m_pkSpamFilterBtn) != 0
    && (unsigned __int8)((int (__stdcall *)(unsigned int, int))v14->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY)
    || (v15 = v7->m_pkChatCommandBtn) != 0
    && (unsigned __int8)((int (__stdcall *)(unsigned int, int))v15->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY)
    || (v16 = v7->m_pkCheckBox) != 0
    && (unsigned __int8)((int (__stdcall *)(unsigned int, int))v16->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY)
    || (v17 = v7->m_pkScrollUpBtn) != 0
    && (unsigned __int8)((int (__stdcall *)(unsigned int, int))v17->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY)
    || (v18 = v7->m_pkScrollDnBtn) != 0
    && (unsigned __int8)((int (__stdcall *)(unsigned int, int))v18->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY)
    || (v19 = v7->m_pkScrollMostDnBtn) != 0
    && (unsigned __int8)((int (__stdcall *)(unsigned int, int))v19->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY)
    || (v20 = v7->m_pkReportTabBtn) != 0
    && (unsigned __int8)((int (__stdcall *)(unsigned int, int))v20->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY)
    || (v21 = v7->m_pkWhisperListBtn) != 0
    && (unsigned __int8)((int (__stdcall *)(unsigned int, int))v21->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY)
    || (v22 = v7->m_pkFilterBtn) != 0
    && (unsigned __int8)((int (__stdcall *)(unsigned int, int))v22->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY)
    || (v23 = v7->m_spChatFilterPopupMenu[v7->m_uiChatMode].m_pObject) != 0
    && (unsigned __int8)((int (*)(void))v23->vfptr[65].__vecDelDtor)()
    && (unsigned __int8)((int (__stdcall *)(unsigned int, int))v7->m_spChatFilterPopupMenu[v7->m_uiChatMode].m_pObject->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY)
    || (v24 = v7->m_spChatModePopupMenu.m_pObject) != 0
    && (unsigned __int8)((int (*)(void))v24->vfptr[65].__vecDelDtor)()
    || bIsMove )
  {
    bHit_3 = 1;
  }
  else
  {
    bHit_3 = 0;
    v25 = (int)v7->m_pkTabBut;
    v26 = 5;
    do
    {
      if ( *(_DWORD *)v25
        && (unsigned __int8)(*(int (__stdcall **)(unsigned int, int))(**(_DWORD **)v25 + 332))(
                              PgWin::ms_iMsX,
                              PgWin::ms_iMsY) )
      {
        bHit_3 = 1;
      }
      v25 += 4;
      --v26;
    }
    while ( v26 );
  }
  if ( (unsigned __int8)((int (*)(void))v7->m_pkSpamFilterPanel->vfptr[65].__vecDelDtor)()
    || bHit_3
    || (unsigned __int8)((int (*)(void))v7->m_spChatFilterPopupMenu[v7->m_uiChatMode].m_pObject->vfptr[65].__vecDelDtor)()
    || (unsigned __int8)((int (__thiscall *)(ChatDisplayWin2 *))v7->vfptr[137].__vecDelDtor)(v7) )
  {
    if ( v7->m_kAlphaControl.fTimeLeftToAppear > 0.0 )
      v7->m_kAlphaControl.fTimeLeftToAppear = v7->m_kAlphaControl.fTimeLeftToAppear - Timer::ms_fDeltaTime * 10.0;
    if ( v7->m_kAlphaControl.fTimeLeftToAppear <= 0.0 )
    {
      ((void (__stdcall *)(signed int))v7->m_pkChattingBox->vfptr[64].__vecDelDtor)(1);
      v7->vfptr[60].__vecDelDtor((NiRefObject *)v7, 1u);
      v32 = 1.0;
      if ( v7->m_kAlphaControl.fAlphaValue < 1.0 )
      {
        bHitd = Timer::ms_fDeltaTime + Timer::ms_fDeltaTime + v7->m_kAlphaControl.fAlphaValue;
        v7->m_kAlphaControl.fAlphaValue = bHitd;
        if ( bHitd > 1.0 )
          v7->m_kAlphaControl.fAlphaValue = 1.0;
        if ( v7->m_kAlphaControl.fAlphaValue < 1.0 )
        {
          bHite = v7->m_kAlphaControl.fAlphaValue * NI_HALF_PI;
          bHitf = sin(bHite);
          v32 = bHitf;
        }
        v33 = v7->m_spMtrlProp.m_pObject;
        bHitg = v32;
        ++v33->m_uiRevID;
        v33->m_fAlpha = bHitg;
      }
    }
  }
  else
  {
    v27 = v7->m_pkChattingBox;
    if ( !v27->m_bIsDuringSizeDrag )
    {
      v28 = 0.0;
      if ( v7->m_kAlphaControl.fAlphaValue <= 0.0 )
      {
        ((void (__stdcall *)(_DWORD))v27->vfptr[64].__vecDelDtor)(0);
        v7->vfptr[60].__vecDelDtor((NiRefObject *)v7, 0);
        v31 = v7->m_spMtrlProp.m_pObject;
        v31->m_fAlpha = 0.0;
        ++v31->m_uiRevID;
      }
      else
      {
        bHit = v7->m_kAlphaControl.fAlphaValue - (Timer::ms_fDeltaTime + Timer::ms_fDeltaTime);
        v7->m_kAlphaControl.fAlphaValue = bHit;
        if ( bHit <= 0.0 )
        {
          v7->m_kAlphaControl.fAlphaValue = 0.0;
          v7->m_kAlphaControl.fTimeLeftToAppear = 1.0;
          ((void (__stdcall *)(_DWORD))v27->vfptr[64].__vecDelDtor)(0);
          v7->vfptr[60].__vecDelDtor((NiRefObject *)v7, 0);
          v28 = 0.0;
        }
        if ( v28 < v7->m_kAlphaControl.fAlphaValue )
        {
          bHita = v7->m_kAlphaControl.fAlphaValue * NI_HALF_PI;
          bHitb = sin(bHita);
          v28 = bHitb;
        }
        bHitc = v28;
        v29 = fs("%f\n", bHitc);
        OutputDebugStringA(v29);
        v30 = v7->m_spMtrlProp.m_pObject;
        ++v30->m_uiRevID;
        v30->m_fAlpha = bHitc;
      }
    }
  }
  v34 = v7->m_pkTabText;
  if ( v34 )
    ((void (__stdcall *)(_DWORD))v34->vfptr[69].__vecDelDtor)(v7->m_spMtrlProp.m_pObject->m_fAlpha);
  v35 = (int)v7->m_pkTabButText;
  v36 = 5;
  do
  {
    if ( *(_DWORD *)v35 )
      ((void (__stdcall *)(_DWORD))*(void (__stdcall **)(float))(**(_DWORD **)v35 + 276))(v7->m_spMtrlProp.m_pObject->m_fAlpha);
    v35 += 4;
    --v36;
  }
  while ( v36 );
  v37 = v7->m_pkReportText;
  if ( v37 )
    ((void (__stdcall *)(_DWORD))v37->vfptr[69].__vecDelDtor)(v7->m_spMtrlProp.m_pObject->m_fAlpha);
  if ( !v7->m_pkCheckBox->m_bCheck )
  {
    bHit_3a = 0;
    v38 = (int)v7->m_pkTabBut;
    v39 = 5;
    do
    {
      if ( (unsigned __int8)(*(int (__stdcall **)(unsigned int, int))(**(_DWORD **)v38 + 332))(
                              PgWin::ms_iMsX,
                              PgWin::ms_iMsY) )
        bHit_3a = 1;
      v38 += 4;
      --v39;
    }
    while ( v39 );
    if ( v7->m_kAlphaControl.fAlphaValue < 1.0 || v7->m_pkChattingBox->m_bIsDuringSizeDrag )
    {
      if ( !bIsMove )
        goto LABEL_95;
    }
    else if ( !bIsMove )
    {
      if ( bHit_3a )
      {
        v40 = g_pkMouse;
        if ( !g_pkMouse->m_akButtons[0].m_bPressed
          || g_pkMouse->m_akButtons[0].m_bLastPressed && !g_pkMouse->m_akButtons[0].m_bPressed )
        {
          goto LABEL_97;
        }
        v41 = iYPos - g_pkMouse->m_akAxes[1].m_iValue;
        if ( (unsigned int)(iXPos - g_pkMouse->m_akAxes[0].m_iValue + 3) <= 6 && v41 <= 3 && v41 >= -3 )
        {
LABEL_96:
          if ( v40->m_akButtons[0].m_bPressed )
          {
LABEL_99:
            iXPos = v40->m_akAxes[0].m_iValue;
            iYPos = v40->m_akAxes[1].m_iValue;
            iZPos = v40->m_akAxes[2].m_iValue;
            v7->m_iX = PgWin::ms_iMsX;
            v7->m_iY = PgWin::ms_iMsY;
            goto LABEL_100;
          }
LABEL_97:
          if ( v40->m_akButtons[0].m_bLastPressed )
            bIsMove = 0;
          goto LABEL_99;
        }
        bIsMove = 1;
        goto LABEL_94;
      }
LABEL_95:
      v40 = g_pkMouse;
      goto LABEL_96;
    }
LABEL_94:
    v42 = PgWin::ms_iMsX - v7->m_iX;
    v43 = PgWin::ms_iMsY - v7->m_iY;
    bHith = v7->vfptr;
    v44 = ((int (__thiscall *)(ChatDisplayWin2 *))v7->vfptr[42].__vecDelDtor)(v7);
    v45 = (int)v7->vfptr[41].__vecDelDtor((NiRefObject *)v7, v43 + v44);
    bHith[77].__vecDelDtor((NiRefObject *)v7, v42 + v45);
    goto LABEL_95;
  }
LABEL_100:
  if ( !(unsigned __int8)((int (*)(void))v7->m_pkChatEditBox->vfptr[65].__vecDelDtor)() )
  {
    v46 = v7->m_spEdit.m_pObject;
    if ( v46 )
      ((void (__stdcall *)(signed int))v46->vfptr[121].__vecDelDtor)(1);
  }
  v47 = (int)v7->m_pkTabBut;
  v48 = 5;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v47 + 240))(bIsMove == 0);
    v47 += 4;
    --v48;
  }
  while ( v48 );
  if ( v7->m_uiChatMode == 1 )
  {
    v49 = ((int (*)(void))v7->m_pkChatEditBox->vfptr[65].__vecDelDtor)();
    v50 = v7->m_pkChatNameEditBack->vfptr[64].__vecDelDtor;
    if ( v49 )
    {
      ((void (__stdcall *)(signed int))v50)(1);
      ((void (__stdcall *)(signed int))v7->m_pkChatNameEditBox->vfptr[64].__vecDelDtor)(1);
      ((void (__stdcall *)(signed int))v7->m_pkWhisperListBtn->vfptr[64].__vecDelDtor)(1);
      ((void (__stdcall *)(int))v7->m_pkChatEditBox->vfptr[43].__vecDelDtor)(v7->m_iChatBoxWhisperModePosX);
      v51 = v7->m_iChatBoxWhisperModePosX;
      goto LABEL_110;
    }
  }
  else
  {
    v50 = v7->m_pkChatNameEditBack->vfptr[64].__vecDelDtor;
  }
  ((void (__stdcall *)(_DWORD))v50)(0);
  ((void (__stdcall *)(_DWORD))v7->m_pkChatNameEditBox->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v7->m_pkWhisperListBtn->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(int))v7->m_pkChatEditBox->vfptr[43].__vecDelDtor)(v7->m_iChatBoxPosX);
  v51 = v7->m_iChatBoxPosX;
LABEL_110:
  ((void (__stdcall *)(int))v7->m_spEdit.m_pObject->vfptr[43].__vecDelDtor)(v51 + 3);
  if ( v7->m_uiChatMode == 1 )
  {
    v52 = v7->m_pkChatEditBox;
    v53 = v52->vfptr;
    v54 = v7->m_pkChattingBox;
    v55 = ((int (*)(void))v52->vfptr[37].__vecDelDtor)();
    v56 = (int)v54->vfptr[36].__vecDelDtor((NiRefObject *)v54, v55);
    v53[135].__vecDelDtor((NiRefObject *)v7->m_pkChatEditBox, v56 - v7->m_uiChattingBoxWidthMinusEditBoxWidth);
  }
  else
  {
    v57 = &v7->m_pkChatEditBox->vfptr;
    bHiti = *v57;
    v58 = ((int (*)(void))v7->m_pkChattingBox->vfptr[36].__vecDelDtor)() - v7->m_uiChattingBoxWidthMinusEditBoxWidth;
    ((void (*)(void))v7->m_pkWhisperListBtn->vfptr[36].__vecDelDtor)();
    v59 = v7->m_pkChatNameEditBack;
    v60 = ((int (__thiscall *)(NiRefObjectVtbl **))bHiti[37].__vecDelDtor)(v57);
    v61 = (int)v59->vfptr[36].__vecDelDtor((NiRefObject *)v59, v60);
    bHiti[135].__vecDelDtor((NiRefObject *)v7->m_pkChatEditBox, v62 + v61);
  }
  v63 = &v7->m_spEdit.m_pObject->vfptr;
  v64 = *v63;
  v65 = ((int (*)(void))v7->m_pkChatEditBox->vfptr[36].__vecDelDtor)() - 4;
  ((void (__thiscall *)(NiRefObjectVtbl **))v64[38].__vecDelDtor)(v63);
  v66 = &v7->m_spEdit.m_pObject->vfptr;
  v67 = *v66;
  v68 = ((int (*)(void))v7->m_pkChatEditBox->vfptr[37].__vecDelDtor)();
  v67[39].__vecDelDtor((NiRefObject *)v66, v68 - 1);
  v69 = v7->m_pkChatEditBox;
  v70 = v7->m_spEdit.m_pObject->vfptr;
  bHitj = v7->m_spEdit.m_pObject;
  v71 = ((int (__thiscall *)(FrameBoxWin *))v69->vfptr[42].__vecDelDtor)(v7->m_pkChatEditBox);
  v72 = (int)v69->vfptr[41].__vecDelDtor((NiRefObject *)v69, v71 + 4);
  v70[77].__vecDelDtor((NiRefObject *)bHitj, v72 + 4);
  v73 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v73 )
    GameFrameWork::UpdateUIScroll(v73, v7->m_pkChattingBox, v7->m_pkActiveChatBD);
  if ( (unsigned __int8)((int (__thiscall *)(ChatDisplayWin2 *))v7->vfptr[83].__vecDelDtor)(v7) )
  {
    v74 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v74 )
      GameFrameWork::OpenPlayGuideWin(v74, BIL_CHAT_3);
  }
  v75 = v7->m_spEdit.m_pObject;
  if ( v75 && v75->m_bIsLinkEdit )
  {
    if ( v7->m_listItemLinkStruct._Mysize )
      ChatDisplayWin2::ItemLinkKeyDownCheck(v7);
  }
}
// 5EF2F0: could not find valid save-restore pair for edi
// 5EF2F0: could not find valid save-restore pair for esi
// A8B980: using guessed type float Timer::ms_fDeltaTime;
// A8C4A8: using guessed type struct NiInputMouse *g_pkMouse;
// B622D0: using guessed type const float NI_HALF_PI;

//----- (005EFDC0) --------------------------------------------------------
std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *__thiscall ChatDisplayWin2::GetLinkItemList(ChatDisplayWin2 *this, std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > *result)
{
  std::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>::list<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>(
    result,
    &this->m_listItemLinkStruct);
  return result;
}

//----- (005EFDF0) --------------------------------------------------------
double __thiscall ChatDisplayWin2::GetSpamBlockRate(ChatDisplayWin2 *this)
{
  return (float)(100.0 - (double)(5 * this->m_pkSpamFilterSlide->m_nCurPos));
}

//----- (005EFE20) --------------------------------------------------------
ChatDisplayWin2 *__thiscall ChatDisplayWin2::`vector deleting destructor'(ChatDisplayWin2 *this, unsigned int a2)
{
  ChatDisplayWin2 *v2; // esi@1

  v2 = this;
  ChatDisplayWin2::~ChatDisplayWin2(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005EFE50) --------------------------------------------------------
void __thiscall CLCS::CLCS(CLCS *this)
{
  this->f_CompDoubtPercentA = 0.0;
  this->f_CompDoubtPercentB = 0.0;
  this->i_DoubtCnt = 0;
  this->i_MaxStringLen = 0;
  this->m_pCompStrA = 0;
  this->m_pCompStrB = 0;
  this->m_CompStrALen = 0;
  this->m_CompStrBLen = 0;
  this->LCSCalData1 = 0;
  this->LCSCalData2 = 0;
}

//----- (005EFE90) --------------------------------------------------------
char __thiscall CLCS::Init(CLCS *this, int nMaxStringLen)
{
  int v2; // ebx@1
  CLCS *v3; // esi@1
  void *v5; // eax@3
  void *v6; // edi@3
  unsigned __int16 *v7; // eax@3
  int **v8; // eax@6
  int **v9; // eax@6
  unsigned __int16 *v10; // ST10_4@7
  unsigned __int16 *v11; // ST10_4@9
  int **v12; // ST0C_4@9
  int v13; // edi@11
  char **v14; // eax@12
  int nMaxStringLena; // [sp+10h] [bp+8h]@6

  v2 = nMaxStringLen;
  v3 = this;
  if ( nMaxStringLen <= 0 )
    return 0;
  this->i_MaxStringLen = nMaxStringLen;
  v5 = malloc(2 * nMaxStringLen);
  v6 = v5;
  v3->m_pCompStrA = (unsigned __int16 *)v5;
  v7 = (unsigned __int16 *)malloc(2 * nMaxStringLen);
  v3->m_pCompStrB = v7;
  if ( !v6 )
    return 0;
  if ( !v7 )
  {
    free(v6);
    v3->m_pCompStrA = 0;
    return 0;
  }
  v8 = (int **)malloc(4 * nMaxStringLen);
  nMaxStringLena = (int)v8;
  v3->LCSCalData1 = v8;
  v9 = (int **)malloc(4 * v2);
  v3->LCSCalData2 = v9;
  if ( !nMaxStringLena )
  {
    free(v6);
    v10 = v3->m_pCompStrB;
    v3->m_pCompStrA = 0;
    free(v10);
    v3->m_pCompStrB = 0;
    return 0;
  }
  if ( !v9 )
  {
    free(v6);
    v11 = v3->m_pCompStrB;
    v3->m_pCompStrA = 0;
    free(v11);
    v12 = v3->LCSCalData1;
    v3->m_pCompStrB = 0;
    free(v12);
    v3->LCSCalData1 = 0;
    return 0;
  }
  v13 = 0;
  if ( v2 > 0 )
  {
    while ( 1 )
    {
      v3->LCSCalData1[v13] = (int *)malloc(4 * v3->i_MaxStringLen);
      v3->LCSCalData2[v13] = (int *)malloc(4 * v3->i_MaxStringLen);
      v14 = (char **)&v3->LCSCalData1[v13];
      if ( !*v14 || !v3->LCSCalData2[v13] )
        break;
      memset(*v14, 0, 4 * v3->i_MaxStringLen);
      memset((char *)v3->LCSCalData2[v13++], 0, 4 * v3->i_MaxStringLen);
      if ( v13 >= v3->i_MaxStringLen )
        return 1;
    }
    return 0;
  }
  return 1;
}

//----- (005EFFF0) --------------------------------------------------------
double __thiscall CLCS::GetCompDoubtPercentA(CLCS *this)
{
  return this->f_CompDoubtPercentA;
}

//----- (005F0000) --------------------------------------------------------
double __thiscall CLCS::GetCompDoubtPercentB(CLCS *this)
{
  return this->f_CompDoubtPercentB;
}

//----- (005F0010) --------------------------------------------------------
void __thiscall CLCS::printLCS(CLCS *this, int i, int j, unsigned __int16 *pWordStr)
{
  int v4; // esi@1
  unsigned __int16 *v5; // edi@3
  int v6; // edx@4
  BYTE v7; // cl@5
  char *v8; // esi@5

  v4 = i;
  if ( i )
  {
    if ( j )
    {
      v5 = pWordStr;
      if ( pWordStr )
      {
        v6 = this->LCSCalData2[i][j];
        if ( v6 == 1 )
        {
          CLCS::printLCS(this, i - 1, j - 1, pWordStr);
          v7 = v5[v4 - 1];
          v8 = (char *)&v5[v4 - 1];
          if ( IsDBCSLeadByte(v7) == 1 )
          {
            strncpy((char *)&i, v8, 2u);
            BYTE2(i) = 0;
            printf("%s", &i);
          }
          else
          {
            printf("%c", *v8);
          }
        }
        else if ( v6 == 2 )
        {
          CLCS::printLCS(this, i - 1, j, pWordStr);
        }
        else
        {
          CLCS::printLCS(this, i, j - 1, pWordStr);
        }
      }
    }
  }
}

//----- (005F00D0) --------------------------------------------------------
char __thiscall CLCS::CharToMultyByte(CLCS *this, unsigned __int16 *pWordStr, int *pWordStrLen, char *pCharStr)
{
  char result; // al@2
  char *v5; // ebx@4
  signed int v6; // eax@6
  int v7; // ecx@6
  int v8; // esi@10
  int v9; // edi@10
  int nCharStrLen; // [sp+10h] [bp+10h]@6

  if ( pWordStr && pWordStrLen )
  {
    v5 = pCharStr;
    if ( pCharStr )
    {
      v6 = strlen(pCharStr);
      v7 = this->i_MaxStringLen;
      nCharStrLen = v6;
      if ( v6 > v7 )
      {
        nCharStrLen = v7;
        v6 = v7;
      }
      if ( v6 > 0 )
      {
        v8 = 0;
        v9 = 0;
        if ( v6 > 0 )
        {
          do
          {
            if ( IsDBCSLeadByte(v5[v8]) == 1 )
              pWordStr[v9] = *(_WORD *)&v5[v8++];
            else
              pWordStr[v9] = v5[v8];
            ++v8;
            ++v9;
          }
          while ( v8 < nCharStrLen );
        }
        *pWordStrLen = v9;
        result = 1;
      }
      else
      {
        result = 0;
      }
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (005F0170) --------------------------------------------------------
double __thiscall CLCS::GetCompDoubtPercentLower(CLCS *this)
{
  double result; // st7@2

  if ( this->f_CompDoubtPercentB >= (double)this->f_CompDoubtPercentA )
    result = this->f_CompDoubtPercentA;
  else
    result = this->f_CompDoubtPercentB;
  return result;
}

//----- (005F01A0) --------------------------------------------------------
char __thiscall CLCS::LCSExecute(CLCS *this, char *pCompStrA, char *pCompStrB)
{
  CLCS *v3; // esi@1
  char *v4; // edi@3
  char result; // al@5
  signed int i; // eax@6
  int *v7; // ecx@7
  int j; // eax@8
  signed int k; // ecx@10
  signed int l; // eax@11
  int **v11; // edx@12
  int v12; // ebx@14
  int v13; // eax@19
  signed int v14; // ecx@19
  char *pCompStrAa; // [sp+14h] [bp+8h]@19
  char *pCompStrBa; // [sp+18h] [bp+Ch]@19

  v3 = this;
  if ( pCompStrA && pCompStrB )
  {
    v4 = (char *)&this->m_CompStrALen;
    if ( CLCS::CharToMultyByte(this, this->m_pCompStrA, &this->m_CompStrALen, pCompStrA)
      && CLCS::CharToMultyByte(v3, v3->m_pCompStrB, &v3->m_CompStrBLen, pCompStrB) )
    {
      for ( i = 1; i <= *(_DWORD *)v4; *v7 = 0 )
        v7 = v3->LCSCalData1[i++];
      for ( j = 0; j <= v3->m_CompStrBLen; ++j )
        (*v3->LCSCalData1)[j] = 0;
      for ( k = 1; k <= v3->m_CompStrALen; ++k )
      {
        for ( l = 1; l <= v3->m_CompStrBLen; ++l )
        {
          v11 = &v3->LCSCalData1[k];
          if ( v3->m_pCompStrA[k - 1] == v3->m_pCompStrB[l - 1] )
          {
            (*v11)[l] = (*(v11 - 1))[l - 1] + 1;
            v3->LCSCalData2[k][l] = 1;
          }
          else
          {
            v12 = (*(v11 - 1))[l];
            if ( v12 < (*v11)[l - 1] )
            {
              (*v11)[l] = (*v11)[l - 1];
              v3->LCSCalData2[k][l] = 3;
            }
            else
            {
              (*v11)[l] = v12;
              v3->LCSCalData2[k][l] = 2;
            }
          }
        }
      }
      v13 = v3->m_CompStrALen;
      v14 = v3->m_CompStrBLen;
      pCompStrBa = (char *)v13;
      pCompStrAa = (char *)v3->LCSCalData1[v13][v14];
      v3->i_DoubtCnt = (int)pCompStrAa;
      result = 1;
      v3->f_CompDoubtPercentA = (double)(signed int)pCompStrAa / (double)(signed int)pCompStrBa * 100.0;
      v3->f_CompDoubtPercentB = 100.0 * ((double)v3->i_DoubtCnt / (double)v14);
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (005F0320) --------------------------------------------------------
void __thiscall CLCS::PrintSubString(CLCS *this)
{
  CLCS::printLCS(this, this->m_CompStrALen, this->m_CompStrBLen, this->m_pCompStrA);
}

//----- (005F0340) --------------------------------------------------------
void __thiscall KingdomQuestWin::OnSortByTitle(KingdomQuestWin *this)
{
  KingdomQuestWin *v1; // esi@1

  v1 = this;
  this->m_nSortColumn = 0;
  if ( bSortByTltle )
  {
    bSortByTltle = 0;
    SlideListWin::Sort(this->m_pListWinTime, 0, 1, 0);
  }
  else
  {
    bSortByTltle = 1;
    SlideListWin::Sort(this->m_pListWinTime, 0, 0, 0);
  }
  SlideListWin::UpdateViewList(v1->m_pListWinTime);
}

//----- (005F0380) --------------------------------------------------------
void __thiscall KingdomQuestWin::OnSortByUsercnt(KingdomQuestWin *this)
{
  bool v1; // al@1
  KingdomQuestWin *v2; // esi@1
  SlideListWin *v3; // ecx@1

  v2 = this;
  v3 = this->m_pListWinTime;
  bSortByUserCnt = bSortByUserCnt == 0;
  v1 = bSortByUserCnt;
  v2->m_nSortColumn = 1;
  if ( v1 )
  {
    SlideListWin::Sort(v3, 1, 0, 1);
    SlideListWin::UpdateViewList(v2->m_pListWinTime);
  }
  else
  {
    SlideListWin::Sort(v3, 1, 1, 1);
    SlideListWin::UpdateViewList(v2->m_pListWinTime);
  }
}

//----- (005F03E0) --------------------------------------------------------
void __thiscall KingdomQuestWin::OnSortByStarttime(KingdomQuestWin *this)
{
  bool v1; // zf@1
  KingdomQuestWin *v2; // esi@1

  v1 = bSortByStarttime == 0;
  v2 = this;
  this->m_nSortColumn = 2;
  if ( v1 )
  {
    bSortByStarttime = 1;
    SlideListWin::Sort(this->m_pListWinTime, 2, 0, 0);
  }
  else
  {
    bSortByStarttime = 0;
    SlideListWin::Sort(this->m_pListWinTime, 2, 1, 0);
  }
  SlideListWin::UpdateViewList(v2->m_pListWinTime);
}

//----- (005F0430) --------------------------------------------------------
void __thiscall KingdomQuestWin::OnSortBYState(KingdomQuestWin *this)
{
  bool v1; // zf@1
  KingdomQuestWin *v2; // esi@1

  v1 = bSortByState == 0;
  v2 = this;
  this->m_nSortColumn = 3;
  if ( v1 )
  {
    bSortByState = 1;
    SlideListWin::Sort(this->m_pListWinTime, 3, 0, 0);
  }
  else
  {
    bSortByState = 0;
    SlideListWin::Sort(this->m_pListWinTime, 3, 1, 0);
  }
  SlideListWin::UpdateViewList(v2->m_pListWinTime);
}

//----- (005F0480) --------------------------------------------------------
void __thiscall KingdomQuestWin::JoinResult(KingdomQuestWin *this, unsigned int Handle, bool bResult)
{
  if ( !bResult )
  {
    this->m_JoinHandle = -1;
    this->m_bSendJoinMsg = 0;
    this->m_nJoinIndex = 0;
  }
}

//----- (005F04B0) --------------------------------------------------------
void __thiscall KingdomQuestWin::RemoveAllKQuestInfo(KingdomQuestWin *this)
{
  CKQ::Clear(&this->m_kKindomQuestData);
}

//----- (005F04C0) --------------------------------------------------------
void __thiscall KingdomQuestWin::DeleteKQuestInfo(KingdomQuestWin *this, unsigned int Handle)
{
  CKQ::Del(&this->m_kKindomQuestData, Handle);
}

//----- (005F04D0) --------------------------------------------------------
PROTO_KQ_INFO *__thiscall KingdomQuestWin::GetQuestInfo(KingdomQuestWin *this, unsigned int Handle)
{
  return CKQ::Get(&this->m_kKindomQuestData, Handle);
}

//----- (005F04E0) --------------------------------------------------------
tm *__usercall localtime_0@<eax>(const int *_Time@<eax>)
{
  return _localtime32(_Time);
}

//----- (005F04F0) --------------------------------------------------------
int __usercall time@<eax>(int *_Time@<eax>)
{
  return _time32(_Time);
}

//----- (005F0500) --------------------------------------------------------
void __thiscall KingdomQuestWin::SetView(KingdomQuestWin *this, int bView)
{
  KingdomQuestWin *v2; // esi@1

  v2 = this;
  if ( this->m_pJoinOk )
  {
    if ( this->m_pJoinCancel )
    {
      ((void (__stdcall *)(_DWORD))this->m_pJoinOk->vfptr[60].__vecDelDtor)(bView);
      ((void (__stdcall *)(_DWORD))v2->m_pJoinCancel->vfptr[60].__vecDelDtor)(bView);
      ((void (__stdcall *)(_DWORD))v2->m_pJoinOk->vfptr[64].__vecDelDtor)(bView);
      ((void (__stdcall *)(_DWORD))v2->m_pJoinCancel->vfptr[64].__vecDelDtor)(bView);
      if ( v2->m_pTexJoinOk )
      {
        if ( v2->m_pTexJoinCancel )
        {
          ((void (__stdcall *)(_DWORD))v2->m_pTexJoinOk->vfptr[64].__vecDelDtor)(bView);
          ((void (__stdcall *)(_DWORD))v2->m_pTexJoinCancel->vfptr[64].__vecDelDtor)(bView);
        }
      }
    }
  }
}

//----- (005F05A0) --------------------------------------------------------
void KingdomQuestWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "NPCKDQuest");
}

//----- (005F05D0) --------------------------------------------------------
char __thiscall KingdomQuestWin::IsStarted(KingdomQuestWin *this)
{
  int v1; // edi@1
  int v2; // esi@1
  char *v3; // eax@2
  char v4; // dl@4
  bool v5; // dl@6
  char result; // al@11

  v1 = this->m_kKindomQuestData.m_NumOfSchedule;
  v2 = 0;
  if ( v1 <= 0 )
  {
LABEL_11:
    result = 0;
  }
  else
  {
    v3 = (char *)this->m_kKindomQuestData.m_Schedule;
    while ( 1 )
    {
      if ( v3 )
      {
        v4 = v3[4];
        v5 = v4 == 3 || v4 == 4;
        if ( *(_DWORD *)v3 == this->m_JoinHandle && v5 )
          break;
      }
      ++v2;
      v3 += 377;
      if ( v2 >= v1 )
        goto LABEL_11;
    }
    result = 1;
  }
  return result;
}

//----- (005F0630) --------------------------------------------------------
unsigned int __thiscall KingdomQuestWin::GetJoinQuestHandle(KingdomQuestWin *this)
{
  KingdomQuestWin *v1; // esi@1
  Name5 *v2; // eax@2
  PROTO_AVATARINFORMATION *v3; // eax@2
  unsigned int result; // eax@3

  v1 = this;
  if ( this->m_JoinHandle == -1 && (v2 = User::GetMainCharID(&g_kUser), (v3 = User::GetAvatarInfo(&g_kUser, v2)) != 0) )
    result = v3->nKQHandle;
  else
    result = v1->m_JoinHandle;
  return result;
}

//----- (005F0670) --------------------------------------------------------
void __thiscall KingdomQuestPlayerList::KingdomQuestPlayerList(KingdomQuestPlayerList *this)
{
  KingdomQuestPlayerList *v1; // esi@1

  v1 = this;
  PgWinSpr::PgWinSpr((PgWinSpr *)&this->vfptr);
  v1->m_fOldTime = 0.0;
  v1->m_pkListWin = 0;
  v1->m_pkSlideBar = 0;
  v1->m_pkFrameWork = 0;
  v1->m_acName[0] = 0;
  v1->m_pkJoinPlyaerListText = 0;
  v1->vfptr = (NiRefObjectVtbl *)&KingdomQuestPlayerList::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&KingdomQuestPlayerList::`vftable'{for `IDirectMessenger'};
  *(_DWORD *)&v1->m_bSortReverse[0] = 0x1000000;
}
// 9B29CC: using guessed type void (__thiscall *KingdomQuestPlayerList::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B29EC: using guessed type int (__thiscall *KingdomQuestPlayerList::`vftable'{for `NiNode'})(void *p, char);

//----- (005F06C0) --------------------------------------------------------
void __thiscall KingdomQuestPlayerList::~KingdomQuestPlayerList(KingdomQuestPlayerList *this)
{
  this->vfptr = (NiRefObjectVtbl *)&KingdomQuestPlayerList::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&KingdomQuestPlayerList::`vftable'{for `IDirectMessenger'};
  this->m_kQuestHandle = -1;
  PgWinSpr::~PgWinSpr((PgWinSpr *)&this->vfptr);
}
// 9B29CC: using guessed type void (__thiscall *KingdomQuestPlayerList::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B29EC: using guessed type int (__thiscall *KingdomQuestPlayerList::`vftable'{for `NiNode'})(void *p, char);

//----- (005F06E0) --------------------------------------------------------
void __thiscall KingdomQuestPlayerList::OnClose(KingdomQuestPlayerList *this)
{
  ((void (__stdcall *)(_DWORD))this->vfptr[64].__vecDelDtor)(0);
}

//----- (005F06F0) --------------------------------------------------------
void __thiscall KingdomQuestPlayerList::OnSort(KingdomQuestPlayerList *this, KingdomQuestPlayerList::eSortType eType)
{
  KingdomQuestPlayerList *v2; // esi@1

  v2 = this;
  if ( eType )
    SlideListWin::Sort(this->m_pkListWin, eType, this->m_bSortReverse[eType], 0);
  else
    SlideListWin::Sort(this->m_pkListWin, 0, this->m_bSortReverse[0], 1);
  SlideListWin::UpdateViewList(v2->m_pkListWin);
  v2->m_bSortReverse[eType] = v2->m_bSortReverse[eType] == 0;
}

//----- (005F0750) --------------------------------------------------------
void __thiscall KingdomQuestPlayerList::ReSetList(KingdomQuestPlayerList *this)
{
  SlideListWin::RemoveAllList(this->m_pkListWin);
}

//----- (005F0760) --------------------------------------------------------
void __thiscall KingdomQuestPlayerList::OnRClick(KingdomQuestPlayerList *this)
{
  KingdomQuestPlayerList *v1; // esi@1
  unsigned int v2; // eax@1
  char *v3; // eax@1
  unsigned int v4; // esi@2
  int v5; // edx@2
  char v6; // cl@3
  PgFrameWork *v7; // eax@4

  v1 = this;
  v2 = SlideListWin::GetCurSelIndex(this->m_pkListWin);
  v3 = SlideListWin::GetText(v1->m_pkListWin, v2, 2u);
  if ( strcmp(v3, (const char *)&unk_9B1DF9) )
  {
    v4 = (unsigned int)v1->m_acName;
    v5 = v4 - (_DWORD)v3;
    do
    {
      v6 = *v3;
      v3[v5] = *v3;
      ++v3;
    }
    while ( v6 );
    v7 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v7 )
      PgFrameWork::AddMsg(v7, 0x80u, v4, 0);
  }
}

//----- (005F07F0) --------------------------------------------------------
char __thiscall KingdomQuestPlayerList::IsPlayerName(KingdomQuestPlayerList *this, const char *pcName)
{
  KingdomQuestPlayerList *v2; // edi@1
  char result; // al@2
  unsigned int v4; // esi@3
  char *v5; // eax@4

  v2 = this;
  if ( pcName )
  {
    v4 = 0;
    if ( SlideListWin::GetItemSize(this->m_pkListWin) <= 0 )
    {
LABEL_7:
      result = 0;
    }
    else
    {
      while ( 1 )
      {
        v5 = SlideListWin::GetText(v2->m_pkListWin, v4, 2u);
        if ( v5 )
        {
          if ( !strcmp(pcName, v5) )
            break;
        }
        if ( (signed int)++v4 >= SlideListWin::GetItemSize(v2->m_pkListWin) )
          goto LABEL_7;
      }
      result = 1;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (005F0890) --------------------------------------------------------
void __thiscall KingdomQuestTeamList::KingdomQuestTeamList(KingdomQuestTeamList *this)
{
  KingdomQuestTeamList *v1; // esi@1

  v1 = this;
  PgWinSpr::PgWinSpr((PgWinSpr *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&KingdomQuestTeamList::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&KingdomQuestTeamList::`vftable'{for `IDirectMessenger'};
  *(_DWORD *)&v1->m_bSortReverse[0] = 0;
  *(_WORD *)&v1->m_bSortReverse[4] = 0;
  v1->m_fOldTime = 0.0;
  v1->m_pkFrameWork = 0;
  v1->m_acName[0] = 0;
  v1->m_pkJoinTeamListText = 0;
  v1->m_bTimer = 1;
}
// 9B2BF8: using guessed type void (__thiscall *KingdomQuestTeamList::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B2C14: using guessed type int (__thiscall *KingdomQuestTeamList::`vftable'{for `NiNode'})(void *p, char);

//----- (005F08E0) --------------------------------------------------------
void __thiscall KingdomQuestTeamList::~KingdomQuestTeamList(KingdomQuestTeamList *this)
{
  this->vfptr = (NiRefObjectVtbl *)&KingdomQuestTeamList::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&KingdomQuestTeamList::`vftable'{for `IDirectMessenger'};
  this->m_kQuestHandle = -1;
  PgWinSpr::~PgWinSpr((PgWinSpr *)&this->vfptr);
}
// 9B2BF8: using guessed type void (__thiscall *KingdomQuestTeamList::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B2C14: using guessed type int (__thiscall *KingdomQuestTeamList::`vftable'{for `NiNode'})(void *p, char);

//----- (005F0900) --------------------------------------------------------
void __thiscall KingdomQuestTeamList::OnClose(KingdomQuestTeamList *this)
{
  ((void (__stdcall *)(_DWORD))this->vfptr[64].__vecDelDtor)(0);
}

//----- (005F0910) --------------------------------------------------------
void __thiscall KingdomQuestTeamList::OnSort(KingdomQuestTeamList *this, KingdomQuestTeamList::eSortType eType)
{
  KingdomQuestTeamList *v2; // edi@1
  SlideListWin *v3; // ebx@10
  bool bNumber; // [sp+Ch] [bp-4h]@1

  v2 = this;
  bNumber = 0;
  if ( eType == ST_LEVEL || eType == 3 )
    bNumber = 1;
  if ( eType && eType != 1 && eType != 2 )
  {
    if ( eType != 3 && eType != 4 && eType != 5 )
      v3 = (SlideListWin *)eType;
    else
      v3 = this->m_pkListWin[1];
  }
  else
  {
    v3 = this->m_pkListWin[0];
  }
  SlideListWin::Sort(v3, eType, this->m_bSortReverse[eType], bNumber);
  SlideListWin::UpdateViewList(v3);
  v2->m_bSortReverse[eType] = v2->m_bSortReverse[eType] == 0;
}

//----- (005F09A0) --------------------------------------------------------
void __stdcall KingdomQuestTeamList::OnSelect(unsigned int uiTeamType)
{
  GameFrameWork *v2; // eax@1

  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
    GameFrameWork::NcKqTeamSelectReq(v2, uiTeamType);
}

//----- (005F09D0) --------------------------------------------------------
void __thiscall KingdomQuestTeamList::SetSelectedTeam(KingdomQuestTeamList *this, char kKQTeamInfo)
{
  KingdomQuestTeamList *v2; // esi@1
  signed int v3; // [sp-4h] [bp-8h]@2
  int v4; // [sp+0h] [bp-4h]@0

  v2 = this;
  if ( !kKQTeamInfo )
  {
    v3 = 1;
LABEL_3:
    ((void (__stdcall *)(signed int, int))this->m_pkSelectedRed->vfptr[64].__vecDelDtor)(v3, v4);
    ((void (__cdecl *)(_DWORD))v2->m_pkSelectedBlue->vfptr[64].__vecDelDtor)(0);
    return;
  }
  v3 = 0;
  if ( kKQTeamInfo != 1 )
    goto LABEL_3;
  ((void (__stdcall *)(_DWORD, int))this->m_pkSelectedRed->vfptr[64].__vecDelDtor)(0, v4);
  ((void (__cdecl *)(signed int))v2->m_pkSelectedBlue->vfptr[64].__vecDelDtor)(1);
}

//----- (005F0A20) --------------------------------------------------------
void __thiscall KingdomQuestTeamList::ReSetList(KingdomQuestTeamList *this)
{
  KingdomQuestTeamList *v1; // ebx@1
  SlideListWin **v2; // esi@1
  signed int v3; // edi@1

  v1 = this;
  v2 = this->m_pkListWin;
  v3 = 2;
  do
  {
    SlideListWin::RemoveAllList(*v2);
    ++v2;
    --v3;
  }
  while ( v3 );
  ((void (__stdcall *)(_DWORD))v1->m_pkSelectedRed->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkSelectedBlue->vfptr[64].__vecDelDtor)(0);
}

//----- (005F0A70) --------------------------------------------------------
void __thiscall KingdomQuestTeamList::OnRClick(KingdomQuestTeamList *this, SlideListWin *pkSlideListWin)
{
  KingdomQuestTeamList *v2; // edi@1
  unsigned int v3; // eax@2
  char *v4; // eax@2
  int v5; // edx@3
  char v6; // cl@4
  PgFrameWork *v7; // eax@5

  v2 = this;
  if ( pkSlideListWin )
  {
    v3 = SlideListWin::GetCurSelIndex(pkSlideListWin);
    v4 = SlideListWin::GetText(pkSlideListWin, v3, 2u);
    if ( strcmp(v4, (const char *)&unk_9B1DFB) )
    {
      v5 = v2->m_acName - v4;
      do
      {
        v6 = *v4;
        v4[v5] = *v4;
        ++v4;
      }
      while ( v6 );
      v7 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v7 )
        PgFrameWork::AddMsg(v7, 0x82u, (unsigned int)v2->m_acName, 0);
    }
  }
}

//----- (005F0B10) --------------------------------------------------------
void __thiscall KingdomQuestTeamList::OnRClickRed(KingdomQuestTeamList *this)
{
  if ( this->m_pkListWin[0] )
    KingdomQuestTeamList::OnRClick(this, this->m_pkListWin[0]);
}

//----- (005F0B30) --------------------------------------------------------
void __thiscall KingdomQuestTeamList::OnRClickBlue(KingdomQuestTeamList *this)
{
  if ( this->m_pkListWin[1] )
    KingdomQuestTeamList::OnRClick(this, this->m_pkListWin[1]);
}

//----- (005F0B50) --------------------------------------------------------
char __thiscall KingdomQuestTeamList::IsPlayerName(KingdomQuestTeamList *this, const char *pcName)
{
  char result; // al@2
  unsigned int v3; // ebx@3
  SlideListWin **v4; // esi@3
  unsigned int v5; // edi@4
  char *v6; // eax@5

  if ( pcName )
  {
    v3 = 0;
    v4 = this->m_pkListWin;
    while ( 1 )
    {
      v5 = 0;
      if ( SlideListWin::GetItemSize(*v4) )
        break;
LABEL_8:
      ++v3;
      ++v4;
      if ( v3 >= 2 )
        return 0;
    }
    while ( 1 )
    {
      v6 = SlideListWin::GetText(*v4, v5, 2u);
      if ( v6 )
      {
        if ( !strcmp(pcName, v6) )
          break;
      }
      if ( ++v5 >= SlideListWin::GetItemSize(*v4) )
        goto LABEL_8;
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (005F0BF0) --------------------------------------------------------
void __thiscall KingdomQuestWin::~KingdomQuestWin(KingdomQuestWin *this)
{
  KingdomQuestWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&KingdomQuestWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&KingdomQuestWin::`vftable'{for `IDirectMessenger'};
  CKQ::~CKQ(&this->m_kKindomQuestData);
  `eh vector destructor iterator'(
    v1->m_kKQJoiner.kJoiner,
    0x14u,
    100,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
  v1->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9B2E20: using guessed type void (__thiscall *KingdomQuestWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B2E3C: using guessed type int (__thiscall *KingdomQuestWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005F0C90) --------------------------------------------------------
void __thiscall KingdomQuestWin::OnSlideBarContent(KingdomQuestWin *this)
{
  this->m_pListWinContent->m_nViewStartPos = this->m_pSlideBarContentEx->m_nCurPos;
  SlideListWin::UpdateViewList(this->m_pListWinContent);
}

//----- (005F0CC0) --------------------------------------------------------
void __thiscall KingdomQuestWin::OnSlideBarTime(KingdomQuestWin *this)
{
  this->m_pListWinTime->m_nViewStartPos = this->m_pSlideBarTimeEx->m_nCurPos;
  SlideListWin::UpdateViewList(this->m_pListWinTime);
}

//----- (005F0CF0) --------------------------------------------------------
void __thiscall KingdomQuestWin::OnWinClose(KingdomQuestWin *this)
{
  KingdomQuestWin *v1; // esi@1
  NiRefObjectVtbl **v2; // eax@1
  NiRefObjectVtbl *v3; // edi@1
  D3DXCOLOR *v4; // eax@1
  NiRefObjectVtbl *v5; // edi@1
  D3DXCOLOR *v6; // eax@1
  D3DXCOLOR result; // [sp+8h] [bp-10h]@1

  v1 = this;
  GameFrameWork::CloseKDQuestWin((GameFrameWork *)this->m_pkFrameWork);
  v2 = &v1->m_pTexMyList->vfptr;
  *(_WORD *)&v1->m_bMyList = 1;
  v3 = *v2;
  v4 = Color::GetDxColor(&result, -1, -1, 0, -1);
  v3[117].__vecDelDtor((NiRefObject *)v1->m_pTexMyList, (unsigned int)v4);
  v5 = v1->m_pTexAllList->vfptr;
  v6 = Color::GetDxColor(&result, -1, -1, -1, -1);
  v5[117].__vecDelDtor((NiRefObject *)v1->m_pTexAllList, (unsigned int)v6);
}

//----- (005F0D80) --------------------------------------------------------
void __thiscall KingdomQuestWin::OnOK(KingdomQuestWin *this)
{
  KingdomQuestWin *v1; // esi@1
  unsigned int v2; // eax@3
  SlideListWin *v3; // ecx@5
  unsigned int v4; // eax@6
  PgWinBut *v5; // ecx@6
  unsigned int dwData; // [sp+8h] [bp-4h]@3

  v1 = this;
  if ( !this->m_bRequestJoin && (SlideListWin::GetCurSelIndex(this->m_pListWinTime) & 0x80000000) == 0 )
  {
    v2 = SlideListWin::GetCurSelIndex(v1->m_pListWinTime);
    SlideListWin::GetData(v1->m_pListWinTime, v2, &dwData);
    if ( (signed int)dwData < v1->m_kKindomQuestData.m_NumOfSchedule )
    {
      if ( v1->m_kKindomQuestData.m_Schedule[dwData].Status == 2 )
      {
        v1->m_JoinHandle = v1->m_kKindomQuestData.m_Schedule[dwData].Handle;
        v3 = v1->m_pListWinTime;
        v1->m_bSendJoinMsg = 1;
        v1->m_nJoinIndex = SlideListWin::GetCurSelIndex(v3);
      }
      GameFrameWork::NcKqJoinReq((GameFrameWork *)v1->m_pkFrameWork, v1->m_JoinHandle);
      v4 = SlideListWin::GetCurSelIndex(v1->m_pListWinTime);
      SlideListWin::SetFontColor(v1->m_pListWinTime, v4, 255, 255, 0);
      CNSTimer_Interval::ReSet(&v1->m_kKQDelay, Timer::ms_fCurTime);
      v5 = v1->m_pJoinOk;
      v1->m_kKQDelay.m_fCheckTime = 5.0;
      v1->m_bRequestJoin = 1;
      ((void (__stdcall *)(_DWORD))v5->vfptr[60].__vecDelDtor)(0);
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (005F0E80) --------------------------------------------------------
void __thiscall KingdomQuestWin::OnCancel(KingdomQuestWin *this)
{
  KingdomQuestWin *v1; // esi@1
  SlideListWin *v2; // ecx@3

  v1 = this;
  if ( this->m_bSendJoinMsg && this->m_JoinHandle != -1 )
  {
    GameFrameWork::NcKqJoinCancelReq((GameFrameWork *)this->m_pkFrameWork, this->m_JoinHandle);
    v2 = v1->m_pListWinTime;
    v1->m_JoinHandle = -1;
    v1->m_bSendJoinMsg = 0;
    v1->m_nJoinIndex = 0;
    SlideListWin::SetFontColor(v2, 0, 0, 0, 0);
  }
  v1->m_bSendJoinMsg = 0;
}

//----- (005F0EE0) --------------------------------------------------------
void __thiscall KingdomQuestWin::SetServerTime(KingdomQuestWin *this, int *pkKQ_Time)
{
  KingdomQuestWin *v2; // esi@1
  int v3; // ecx@1
  int lTime; // [sp+4h] [bp-4h]@1

  v2 = this;
  _time32(&lTime);
  v3 = lTime - *pkKQ_Time;
  v2->m_bGetServerTime = 1;
  v2->m_tTimeGap = v3;
}

//----- (005F0F10) --------------------------------------------------------
void __thiscall KingdomQuestWin::CheckButtonEnableSetting(KingdomQuestWin *this)
{
  if ( unk_B25074 == 1 || unk_B25074 == 2 )
    KingdomQuestWin::SetView(this, 0);
  else
    KingdomQuestWin::SetView(this, 1);
}

//----- (005F0F30) --------------------------------------------------------
void __thiscall KingdomQuestWin::SetTimer(KingdomQuestWin *this, bool bTimer)
{
  this->m_bTimer = bTimer;
  if ( !bTimer )
    this->m_fOldTime = Timer::ms_fCurTime;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (005F0F50) --------------------------------------------------------
void __thiscall KingdomQuestPlayerList::OnSlide(KingdomQuestPlayerList *this)
{
  SlideBar *v1; // eax@1
  int v2; // edx@1

  v1 = this->m_pkSlideBar;
  v2 = 0;
  if ( v1 )
    v2 = v1->m_nCurPos;
  if ( this->m_pkListWin )
  {
    this->m_pkListWin->m_nViewStartPos = v2;
    SlideListWin::UpdateViewList(this->m_pkListWin);
  }
}

//----- (005F0F90) --------------------------------------------------------
void __thiscall KingdomQuestPlayerList::OnReflash(KingdomQuestPlayerList *this)
{
  KingdomQuestPlayerList *v1; // esi@1
  GameFrameWork *v2; // eax@4

  v1 = this;
  if ( this->m_kQuestHandle == -1 )
  {
    SlideListWin::RemoveAllList(this->m_pkListWin);
  }
  else if ( this->m_bTimer )
  {
    v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v2 )
      GameFrameWork::NcKqJoinListReq(v2, v1->m_kQuestHandle);
  }
}

//----- (005F0FE0) --------------------------------------------------------
void __thiscall KingdomQuestPlayerList::SetTimer(KingdomQuestPlayerList *this, bool bTimer)
{
  this->m_bTimer = bTimer;
  if ( !bTimer )
    this->m_fOldTime = Timer::ms_fCurTime;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (005F1000) --------------------------------------------------------
void __stdcall KingdomQuestTeamList::OnSlide(SlideBar *pkSlideBar, SlideListWin *pkSlideListWin)
{
  if ( pkSlideBar )
  {
    if ( pkSlideListWin )
    {
      pkSlideListWin->m_nViewStartPos = pkSlideBar->m_nCurPos;
      SlideListWin::UpdateViewList(pkSlideListWin);
    }
  }
}

//----- (005F1030) --------------------------------------------------------
void __thiscall KingdomQuestTeamList::OnSlideBlue(KingdomQuestTeamList *this)
{
  KingdomQuestTeamList *v1; // eax@1
  SlideListWin *v2; // ecx@1
  SlideBar *v3; // eax@1

  v1 = this;
  v2 = this->m_pkListWin[1];
  v3 = v1->m_pkSlideBarBlue;
  if ( v3 )
  {
    if ( v2 )
    {
      v2->m_nViewStartPos = v3->m_nCurPos;
      SlideListWin::UpdateViewList(v2);
    }
  }
}

//----- (005F1060) --------------------------------------------------------
void __thiscall KingdomQuestTeamList::OnSlideRed(KingdomQuestTeamList *this)
{
  KingdomQuestTeamList *v1; // eax@1
  SlideListWin *v2; // ecx@1
  SlideBar *v3; // eax@1

  v1 = this;
  v2 = this->m_pkListWin[0];
  v3 = v1->m_pkSlideBarRed;
  if ( v3 )
  {
    if ( v2 )
    {
      v2->m_nViewStartPos = v3->m_nCurPos;
      SlideListWin::UpdateViewList(v2);
    }
  }
}

//----- (005F1090) --------------------------------------------------------
void __thiscall KingdomQuestTeamList::OnReflash(KingdomQuestTeamList *this)
{
  KingdomQuestTeamList *v1; // esi@1
  GameFrameWork *v2; // eax@4

  v1 = this;
  if ( this->m_kQuestHandle == -1 )
  {
    KingdomQuestTeamList::ReSetList(this);
  }
  else if ( this->m_bTimer )
  {
    v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v2 )
      GameFrameWork::NcKqJoinListReq(v2, v1->m_kQuestHandle);
  }
}

//----- (005F10D0) --------------------------------------------------------
void __thiscall KingdomQuestTeamList::SetTimer(KingdomQuestTeamList *this, bool bTimer)
{
  this->m_bTimer = bTimer;
  if ( !bTimer )
    this->m_fOldTime = Timer::ms_fCurTime;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (005F10F0) --------------------------------------------------------
void __thiscall KingdomQuestWin::KingdomQuestWin(KingdomQuestWin *this)
{
  KingdomQuestWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&KingdomQuestWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&KingdomQuestWin::`vftable'{for `IDirectMessenger'};
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  v1->m_kDrop.m_pkContents = 0;
  v1->m_kDrop.m_pkSender = 0;
  v1->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v1->m_kDropContents.m_kItemID = -1;
  v1->m_kDropContents.m_uiLot = 0;
  `eh vector constructor iterator'(
    v1->m_kKQJoiner.kJoiner,
    0x14u,
    100,
    (void (__thiscall *)(void *))Name5::Name5,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
  CKQ::CKQ(&v1->m_kKindomQuestData);
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kTimerInterval);
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kKQDelay);
  v1->m_fOldTime = 0.0;
  v1->m_JoinHandle = -1;
  v1->m_SelectedKQHandle = -1;
  v1->m_kKQJoiner.Handle = -1;
  v1->m_bTimer = 1;
  v1->m_nSortColumn = 3;
  v1->m_nJoinIndex = 0;
  v1->m_bSendJoinMsg = 0;
  v1->m_kKQJoiner.nJoinCnt = 0;
  v1->m_pJoinOk = 0;
  v1->m_pTexJoinOk = 0;
  v1->m_pMyList = 0;
  v1->m_pAllList = 0;
  v1->m_pkKQPresentTimeWin = 0;
  v1->m_tTimeGap = 0;
  v1->m_pTexMyList = 0;
  v1->m_pTexAllList = 0;
  *(_DWORD *)&v1->m_bMyList = 16777217;
  v1->m_bRequestJoin = 0;
  v1->m_pkKingdomQuestPlayerList = 0;
  v1->m_pkKingdomQuestTeamList = 0;
  v1->m_pkPlayerListBtn = 0;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9B2E20: using guessed type void (__thiscall *KingdomQuestWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B2E3C: using guessed type int (__thiscall *KingdomQuestWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005F1260) --------------------------------------------------------
void __thiscall KingdomQuestWin::UpdateKQTime(KingdomQuestWin *this)
{
  KingdomQuestWin *v1; // esi@1
  int v2; // ST0C_4@4
  int v3; // ST08_4@4
  NiUnsharedGeometryGroup *v4; // eax@4
  int lCalcedServerTime; // [sp+4h] [bp-2Ch]@2
  int lTime; // [sp+8h] [bp-28h]@1
  char acDateTime[32]; // [sp+Ch] [bp-24h]@4

  v1 = this;
  _time32(&lTime);
  if ( v1->m_bGetServerTime == 1 )
  {
    lCalcedServerTime = lTime - v1->m_tTimeGap;
    _localtime32(&lCalcedServerTime);
  }
  else
  {
    _localtime32(&lTime);
  }
  v2 = dword_A8B95C;
  v3 = dword_A8B960;
  v4 = TextData::Get(0x34489F8Bu);
  sprintf(acDateTime, (const char *)v4, v3, v2);
  ((void (__stdcall *)(_DWORD))v1->m_pkKQPresentTimeWin->vfptr[118].__vecDelDtor)(acDateTime);
}
// A8B95C: using guessed type int dword_A8B95C;
// A8B960: using guessed type int dword_A8B960;

//----- (005F1300) --------------------------------------------------------
NiUnsharedGeometryGroup *__stdcall KingdomQuestWin::GetKQState(int nState)
{
  NiUnsharedGeometryGroup *result; // eax@2

  switch ( nState )
  {
    case 0:
      result = TextData::Get(0x9FB2A8D5);
      break;
    case 1:
      result = TextData::Get(0x9FB2A8D6);
      break;
    case 2:
      result = TextData::Get(0x9FB2A8D7);
      break;
    case 3:
      result = TextData::Get(0x9FB2A8D8);
      break;
    case 4:
      result = TextData::Get(0x9FB2A8D9);
      break;
    case 5:
      result = TextData::Get(0x9FB2A8DA);
      break;
    case 6:
      result = TextData::Get(0x9FB2A8DB);
      break;
    case 7:
      result = TextData::Get(0x9FB2A8DC);
      break;
    case 8:
      result = TextData::Get(0x9FB2A8DD);
      break;
    case 9:
      result = TextData::Get(0x9FB2A8DE);
      break;
    case 10:
      result = TextData::Get(0x9FB2D8D6);
      break;
    default:
      result = 0;
      break;
  }
  return result;
}

//----- (005F1410) --------------------------------------------------------
void __thiscall KingdomQuestPlayerList::OnCommand(KingdomQuestPlayerList *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0u:
      ((void (*)(void))this->vfptr[90].__vecDelDtor)();
      break;
    case 1u:
      KingdomQuestPlayerList::OnSlide(this);
      break;
    case 2u:
      KingdomQuestPlayerList::OnReflash(this);
      break;
    case 3u:
      KingdomQuestPlayerList::OnSort(this, (KingdomQuestPlayerList::eSortType)lParam);
      break;
    case 4u:
      KingdomQuestPlayerList::OnRClick(this);
      break;
    default:
      return;
  }
}

//----- (005F1470) --------------------------------------------------------
void __thiscall KingdomQuestPlayerList::UpdateList(KingdomQuestPlayerList *this)
{
  KingdomQuestPlayerList *v1; // esi@1
  PgFrameWork *v2; // eax@1
  NiRefObjectVtbl *v3; // edi@3
  NiUnsharedGeometryGroup *v4; // eax@3

  v1 = this;
  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    if ( v2[140].m_BackFrameID == (void *)1 )
    {
      v3 = v1->m_pkJoinPlyaerListText->vfptr;
      v4 = TextData2::Get(0xF0CE2E33);
    }
    else
    {
      v3 = v1->m_pkJoinPlyaerListText->vfptr;
      v4 = TextData2::Get(0x297C7396u);
    }
    v3[118].__vecDelDtor((NiRefObject *)v1->m_pkJoinPlyaerListText, (unsigned int)v4);
    SlideListWin::UpdateViewList(v1->m_pkListWin);
  }
}

//----- (005F14E0) --------------------------------------------------------
void __thiscall KingdomQuestTeamList::OnCommand(KingdomQuestTeamList *this, unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@4
  GameFrameWork *v4; // eax@9

  switch ( wParam )
  {
    case 0u:
      ((void (*)(void))this->vfptr[90].__vecDelDtor)();
      break;
    case 1u:
      KingdomQuestTeamList::OnSlideRed(this);
      break;
    case 2u:
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v3 )
        GameFrameWork::NcKqTeamSelectReq(v3, 0);
      break;
    case 3u:
      if ( this->m_pkListWin[0] )
        KingdomQuestTeamList::OnRClick(this, this->m_pkListWin[0]);
      break;
    case 4u:
      KingdomQuestTeamList::OnSlideBlue(this);
      break;
    case 5u:
      v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v4 )
        GameFrameWork::NcKqTeamSelectReq(v4, 1);
      break;
    case 6u:
      if ( this->m_pkListWin[1] )
        KingdomQuestTeamList::OnRClick(this, this->m_pkListWin[1]);
      break;
    case 7u:
      KingdomQuestTeamList::OnReflash(this);
      break;
    case 8u:
      KingdomQuestTeamList::OnSort(this, (KingdomQuestTeamList::eSortType)lParam);
      break;
    default:
      return;
  }
}

//----- (005F15C0) --------------------------------------------------------
void __thiscall KingdomQuestTeamList::UpdateList(KingdomQuestTeamList *this)
{
  KingdomQuestTeamList *v1; // esi@1
  PgFrameWork *v2; // eax@1
  NiRefObjectVtbl *v3; // edi@3
  NiUnsharedGeometryGroup *v4; // eax@3
  SlideListWin **v5; // esi@5
  signed int v6; // edi@5

  v1 = this;
  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    if ( v2[140].m_BackFrameID == (void *)1 )
    {
      v3 = v1->m_pkJoinTeamListText->vfptr;
      v4 = TextData2::Get(0xF0CE2E33);
    }
    else
    {
      v3 = v1->m_pkJoinTeamListText->vfptr;
      v4 = TextData2::Get(0x297C7396u);
    }
    v3[118].__vecDelDtor((NiRefObject *)v1->m_pkJoinTeamListText, (unsigned int)v4);
    v5 = v1->m_pkListWin;
    v6 = 2;
    do
    {
      SlideListWin::UpdateViewList(*v5);
      ++v5;
      --v6;
    }
    while ( v6 );
  }
}

//----- (005F1630) --------------------------------------------------------
void __thiscall KingdomQuestWin::UpdateMyList(KingdomQuestWin *this)
{
  KingdomQuestWin *v1; // ebx@1
  SlideListWin *v2; // ecx@1
  SlideListWin *v3; // esi@3
  signed int v4; // edi@4
  int v5; // esi@4
  signed int v6; // eax@4
  bool v7; // zf@4
  bool v8; // sf@4
  char *v9; // edi@5
  int v10; // esi@10
  int v11; // ST08_4@10
  const char *v12; // eax@10
  int v13; // esi@12
  signed int v14; // edi@12
  int v15; // esi@12
  int v16; // eax@16
  NiUnsharedGeometryGroup *v17; // eax@20
  PgFrameWork *v18; // eax@20
  SlideListWin *v19; // ecx@21
  PgFrameWork *v20; // eax@26
  PgFrameWork *v21; // eax@30
  tm StartTM; // [sp+4h] [bp-140h]@12
  int nMainLv; // [sp+28h] [bp-11Ch]@4
  int ni; // [sp+2Ch] [bp-118h]@10
  int nJoinIndex; // [sp+30h] [bp-114h]@4
  int nCheckIndex; // [sp+34h] [bp-110h]@4
  int i; // [sp+38h] [bp-10Ch]@4
  char *v28; // [sp+3Ch] [bp-108h]@5
  char szTemp[256]; // [sp+40h] [bp-104h]@10

  v1 = this;
  v2 = this->m_pListWinTime;
  if ( v2 )
  {
    SlideListWin::RemoveAllList(v2);
    if ( !v1->m_bUpdateListCheck )
    {
      SlideBar::SetSplitCnt(v1->m_pSlideBarTimeEx, 0);
      v3 = v1->m_pListWinTime;
      v3->m_fCurSlideBtnPos = 0.0;
      v3->m_nViewStartPos = (signed int)((double)v3->m_nSlideSplitCnt * 0.0);
      v1->m_pListWinTime->m_nViewStartPos = 0;
    }
    v4 = -1;
    v5 = -1;
    nCheckIndex = -1;
    nJoinIndex = -1;
    v6 = User::Lv(&g_kUser);
    v7 = v1->m_kKindomQuestData.m_NumOfSchedule == 0;
    v8 = v1->m_kKindomQuestData.m_NumOfSchedule < 0;
    nMainLv = v6;
    i = 0;
    if ( !v8 && !v7 )
    {
      v9 = &v1->m_kKindomQuestData.m_Schedule[0].MaxLevel;
      v28 = &v1->m_kKindomQuestData.m_Schedule[0].MaxLevel;
      while ( 1 )
      {
        if ( v9 != (char *)118 && v6 >= (unsigned __int8)*(v9 - 1) && v6 <= (unsigned __int8)*v9 )
        {
          v10 = SlideListWin::AddText(v1->m_pListWinTime, v9 - 109);
          v11 = *(_WORD *)(v9 - 113);
          ni = v10;
          v12 = _itoa(v11, szTemp, 10);
          SlideListWin::SetText(v1->m_pListWinTime, v10, 1u, v12);
          if ( *(_DWORD *)(v9 - 43) == -1 )
          {
            sprintf(szTemp, "%02d:%02d", 2, 5);
          }
          else
          {
            qmemcpy(&StartTM, v9 - 39, sizeof(StartTM));
            v13 = StartTM.tm_min;
            v14 = StartTM.tm_hour;
            sprintf(szTemp, "%02d:%02d", StartTM.tm_hour, StartTM.tm_min);
            v15 = *(_WORD *)(v28 - 3) + v13;
            StartTM.tm_min = v15;
            if ( v15 > 59 )
            {
              ++v14;
              v15 += 60
                   * (((signed int)(((unsigned __int64)(2004318071i64 * v15) >> 32) - v15) >> 5)
                    + ((unsigned int)(((unsigned __int64)(2004318071i64 * v15) >> 32) - v15) >> 31));
              StartTM.tm_min = v15;
              StartTM.tm_hour = v14;
              if ( v14 == 25 )
              {
                v14 = 1;
                StartTM.tm_hour = 1;
              }
            }
            sprintf(szTemp, "%s ~ %02d:%02d", szTemp, v14, v15);
            v9 = v28;
            v10 = ni;
          }
          v16 = *(_DWORD *)(v9 - 118);
          if ( v16 == v1->m_SelectedKQHandle )
            nCheckIndex = v10;
          if ( v16 == v1->m_JoinHandle )
            nJoinIndex = v10;
          SlideListWin::SetText(v1->m_pListWinTime, v10, 2u, szTemp);
          v17 = KingdomQuestWin::GetKQState((unsigned __int8)*(v9 - 114));
          SlideListWin::SetText(v1->m_pListWinTime, v10, 3u, (const char *)v17);
          SlideListWin::SetData(v1->m_pListWinTime, v10, i);
          v18 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
          if ( v18 )
          {
            v19 = v1->m_pListWinTime;
            if ( v18[140].m_BackFrameID == (void *)1 )
            {
              SlideListWin::SetCurSelIndex(v19, -1);
              ((void (__stdcall *)(_DWORD))v1->m_pListWinTime->vfptr[60].__vecDelDtor)(0);
              SlideListWin::SetFontColor(v1->m_pListWinTime, v10, 128, 128, 128);
            }
            else
            {
              ((void (__stdcall *)(signed int))v19->vfptr[60].__vecDelDtor)(1);
              SlideListWin::SetFontColor(v1->m_pListWinTime, v10, 255, 255, 255);
            }
          }
        }
        v9 += 377;
        ++i;
        v28 = v9;
        if ( i >= v1->m_kKindomQuestData.m_NumOfSchedule )
          break;
        v6 = nMainLv;
      }
      v5 = nJoinIndex;
      v4 = nCheckIndex;
    }
    v20 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v20 && v20[140].m_BackFrameID != (void *)1 && v4 > -1 )
      SlideListWin::SetCurSelIndex(v1->m_pListWinTime, v4);
    v1->m_bSendJoinMsg = 0;
    v21 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v21 && v21[140].m_BackFrameID != (void *)1 && v5 > -1 )
    {
      SlideListWin::SetFontColor(v1->m_pListWinTime, v5, 255, 255, 0);
      v1->m_bSendJoinMsg = 1;
      v1->m_nJoinIndex = v5;
    }
    SlideListWin::Sort(v1->m_pListWinTime, v1->m_nSortColumn, 0, 0);
    SlideListWin::UpdateViewList(v1->m_pListWinTime);
    SlideBar::SetSplitCnt(v1->m_pSlideBarTimeEx, v1->m_pListWinTime->m_nSlideSplitCnt);
    v1->m_bUpdateListCheck = 1;
  }
}

//----- (005F1A00) --------------------------------------------------------
void __thiscall KingdomQuestWin::UpdateAllList(KingdomQuestWin *this)
{
  KingdomQuestWin *v1; // ebx@1
  SlideListWin *v2; // ecx@3
  SlideListWin *v3; // esi@5
  int v4; // edi@6
  bool v5; // zf@6
  bool v6; // sf@6
  int v7; // esi@7
  int v8; // edi@9
  int v9; // ST08_4@9
  const char *v10; // eax@9
  int v11; // esi@11
  signed int v12; // edi@11
  int v13; // esi@11
  int v14; // eax@15
  NiUnsharedGeometryGroup *v15; // eax@19
  tm StartTM; // [sp+4h] [bp-13Ch]@11
  int ni; // [sp+28h] [bp-118h]@9
  int nJoinIndex; // [sp+2Ch] [bp-114h]@6
  int nCheckIndex; // [sp+30h] [bp-110h]@6
  int i; // [sp+34h] [bp-10Ch]@6
  unsigned __int16 *v21; // [sp+38h] [bp-108h]@7
  char szTemp[256]; // [sp+3Ch] [bp-104h]@9

  v1 = this;
  if ( this->m_bMyList )
  {
    KingdomQuestWin::UpdateMyList(this);
  }
  else
  {
    v2 = this->m_pListWinTime;
    if ( v2 )
    {
      SlideListWin::RemoveAllList(v2);
      if ( !v1->m_bUpdateListCheck )
      {
        SlideBar::SetSplitCnt(v1->m_pSlideBarTimeEx, 0);
        v3 = v1->m_pListWinTime;
        v3->m_fCurSlideBtnPos = 0.0;
        v3->m_nViewStartPos = (signed int)((double)v3->m_nSlideSplitCnt * 0.0);
        v1->m_pListWinTime->m_nViewStartPos = 0;
      }
      v4 = -1;
      v5 = v1->m_kKindomQuestData.m_NumOfSchedule == 0;
      v6 = v1->m_kKindomQuestData.m_NumOfSchedule < 0;
      nCheckIndex = -1;
      nJoinIndex = -1;
      i = 0;
      if ( !v6 && !v5 )
      {
        v7 = (int)&v1->m_kKindomQuestData.m_Schedule[0].NumOfJoiner;
        v21 = &v1->m_kKindomQuestData.m_Schedule[0].NumOfJoiner;
        do
        {
          if ( v7 != 5 )
          {
            v8 = SlideListWin::AddText(v1->m_pListWinTime, (const char *)(v7 + 4));
            v9 = *(_WORD *)v7;
            ni = v8;
            v10 = _itoa(v9, szTemp, 10);
            SlideListWin::SetText(v1->m_pListWinTime, v8, 1u, v10);
            if ( *(_DWORD *)(v7 + 70) == -1 )
            {
              sprintf(szTemp, "%02d:%02d", 2, 5);
            }
            else
            {
              qmemcpy(&StartTM, (const void *)(v7 + 74), sizeof(StartTM));
              v11 = StartTM.tm_min;
              v12 = StartTM.tm_hour;
              sprintf(szTemp, "%02d:%02d", StartTM.tm_hour, StartTM.tm_min);
              v13 = v21[55] + v11;
              StartTM.tm_min = v13;
              if ( v13 > 59 )
              {
                ++v12;
                v13 += 60
                     * (((signed int)(((unsigned __int64)(2004318071i64 * v13) >> 32) - v13) >> 5)
                      + ((unsigned int)(((unsigned __int64)(2004318071i64 * v13) >> 32) - v13) >> 31));
                StartTM.tm_min = v13;
                StartTM.tm_hour = v12;
                if ( v12 == 25 )
                {
                  v12 = 1;
                  StartTM.tm_hour = 1;
                }
              }
              sprintf(szTemp, "%s ~ %02d:%02d", szTemp, v12, v13);
              v7 = (int)v21;
              v8 = ni;
            }
            v14 = *(_DWORD *)(v7 - 5);
            if ( v14 == v1->m_SelectedKQHandle )
              nCheckIndex = v8;
            if ( v14 == v1->m_JoinHandle )
              nJoinIndex = v8;
            SlideListWin::SetText(v1->m_pListWinTime, v8, 2u, szTemp);
            v15 = KingdomQuestWin::GetKQState(*(_BYTE *)(v7 - 1));
            SlideListWin::SetText(v1->m_pListWinTime, v8, 3u, (const char *)v15);
            SlideListWin::SetData(v1->m_pListWinTime, v8, i);
            v4 = nJoinIndex;
          }
          v7 += 377;
          ++i;
          v21 = (unsigned __int16 *)v7;
        }
        while ( i < v1->m_kKindomQuestData.m_NumOfSchedule );
        if ( nCheckIndex > -1 )
          SlideListWin::SetCurSelIndex(v1->m_pListWinTime, nCheckIndex);
      }
      v1->m_bSendJoinMsg = 0;
      if ( v4 > -1 )
      {
        SlideListWin::SetFontColor(v1->m_pListWinTime, v4, 255, 255, 0);
        v1->m_bSendJoinMsg = 1;
        v1->m_nJoinIndex = v4;
      }
      SlideListWin::Sort(v1->m_pListWinTime, v1->m_nSortColumn, 0, 0);
      SlideListWin::UpdateViewList(v1->m_pListWinTime);
      SlideBar::SetSplitCnt(v1->m_pSlideBarTimeEx, v1->m_pListWinTime->m_nSlideSplitCnt);
      v1->m_bUpdateListCheck = 1;
    }
  }
}

//----- (005F1D00) --------------------------------------------------------
void __thiscall KingdomQuestWin::OpenSideWin(KingdomQuestWin *this, unsigned int uiTeamType)
{
  KingdomQuestWin *v2; // esi@1
  char v3; // bl@5
  char v4; // bl@8

  v2 = this;
  if ( this->m_pkKingdomQuestTeamList && this->m_pkKingdomQuestPlayerList )
  {
    if ( uiTeamType <= 1 )
    {
      v4 = ((int (*)(void))this->m_pkKingdomQuestPlayerList->vfptr[65].__vecDelDtor)();
      ((void (__stdcall *)(_DWORD))v2->m_pkKingdomQuestTeamList->vfptr[64].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v2->m_pkKingdomQuestPlayerList->vfptr[64].__vecDelDtor)(v4 == 0);
      if ( !v4
        && (unsigned __int8)((int (*)(void))v2->m_pkKingdomQuestPlayerList->vfptr[65].__vecDelDtor)()
        && v2->m_bTimer )
      {
        GameFrameWork::NcKqJoinListReq((GameFrameWork *)v2->m_pkFrameWork, v2->m_SelectedKQHandle);
        KingdomQuestPlayerList::UpdateList(v2->m_pkKingdomQuestPlayerList);
      }
    }
    else if ( uiTeamType == 2 )
    {
      v3 = ((int (*)(void))this->m_pkKingdomQuestTeamList->vfptr[65].__vecDelDtor)();
      ((void (__stdcall *)(_DWORD))v2->m_pkKingdomQuestPlayerList->vfptr[64].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v2->m_pkKingdomQuestTeamList->vfptr[64].__vecDelDtor)(v3 == 0);
      if ( !v3 )
      {
        if ( v2->m_bTimer )
        {
          GameFrameWork::NcKqJoinListReq((GameFrameWork *)v2->m_pkFrameWork, v2->m_SelectedKQHandle);
          KingdomQuestTeamList::UpdateList(v2->m_pkKingdomQuestTeamList);
        }
      }
    }
  }
}

//----- (005F1E30) --------------------------------------------------------
void __thiscall KingdomQuestWin::OnPlayerList(KingdomQuestWin *this)
{
  KingdomQuestWin *v1; // esi@1
  unsigned int v2; // edi@3
  PROTO_KQ_INFO *v3; // eax@3
  KQTeam *v4; // eax@4

  v1 = this;
  if ( this->m_pkKingdomQuestPlayerList && this->m_pkKingdomQuestTeamList )
  {
    v2 = 0;
    v3 = CKQ::Get(&this->m_kKindomQuestData, this->m_SelectedKQHandle);
    if ( v3 )
    {
      v4 = KQTeamTable::GetByID(v3->ID);
      if ( v4 )
        v2 = v4->KQTeamDivideType;
    }
    KingdomQuestWin::OpenSideWin(v1, v2);
  }
}

//----- (005F1E80) --------------------------------------------------------
void __thiscall KingdomQuestPlayerList::AddElement(KingdomQuestPlayerList *this, KQ_JOIN_CHAR_INFO *pkCharInfo)
{
  KingdomQuestPlayerList *v2; // edi@1
  Name5 *v3; // eax@2
  unsigned int v4; // edx@2
  unsigned int v5; // ecx@2
  unsigned int v6; // edx@2
  unsigned int v7; // eax@2
  unsigned int v8; // ecx@2
  unsigned int v9; // edx@2
  unsigned int v10; // eax@2
  unsigned int v11; // ecx@2
  unsigned int v12; // edx@2
  int v13; // eax@3
  unsigned int v14; // esi@5
  const char *v15; // eax@5
  char *v16; // eax@5
  const char *v17; // eax@6
  char *v18; // eax@8
  char acMainCharID[21]; // [sp+8h] [bp-34h]@2
  char acName[21]; // [sp+20h] [bp-1Ch]@2

  v2 = this;
  if ( this->m_pkListWin )
  {
    v3 = User::GetMainCharID(&g_kUser);
    v4 = v3->n5_code[1];
    *(_DWORD *)acMainCharID = v3->n5_code[0];
    v5 = v3->n5_code[2];
    *(_DWORD *)&acMainCharID[4] = v4;
    v6 = v3->n5_code[3];
    v7 = v3->n5_code[4];
    *(_DWORD *)&acMainCharID[8] = v5;
    v8 = pkCharInfo->sCharID.n5_code[0];
    *(_DWORD *)&acMainCharID[12] = v6;
    v9 = pkCharInfo->sCharID.n5_code[1];
    *(_DWORD *)&acMainCharID[16] = v7;
    v10 = pkCharInfo->sCharID.n5_code[2];
    *(_DWORD *)acName = v8;
    v11 = pkCharInfo->sCharID.n5_code[3];
    *(_DWORD *)&acName[4] = v9;
    v12 = pkCharInfo->sCharID.n5_code[4];
    *(_DWORD *)&acName[8] = v10;
    acMainCharID[20] = 0;
    *(_DWORD *)&acName[12] = v11;
    *(_DWORD *)&acName[16] = v12;
    acName[20] = 0;
    if ( !strcmp(acName, acMainCharID) )
      v13 = SlideListWin::AddHeadText(v2->m_pkListWin, acName);
    else
      v13 = SlideListWin::AddText(v2->m_pkListWin, acName);
    v14 = v13;
    v15 = fs("%d", pkCharInfo->nCharLevel);
    SlideListWin::SetText(v2->m_pkListWin, v14, 0, v15);
    v16 = CDataReader::GetRecord(
            (CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4),
            pkCharInfo->nCharClass);
    if ( v16 )
      v17 = v16 + 21;
    else
      v17 = (const char *)&unk_96F8EB;
    SlideListWin::SetText(v2->m_pkListWin, v14, 1u, v17);
    SlideListWin::SetText(v2->m_pkListWin, v14, 2u, acName);
    SlideListWin::SetFontColor(v2->m_pkListWin, v14, 255, 255, 255);
    SlideListWin::SetFontSize(v2->m_pkListWin, v14, 1);
    v18 = (char *)TextData2::Get(0xDC604216);
    SlideListWin::SetToolTipWinText(v2->m_pkListWin, v14, v18);
  }
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (005F2000) --------------------------------------------------------
void __thiscall KingdomQuestTeamList::AddElement(KingdomQuestTeamList *this, KQ_JOIN_CHAR_INFO *pkCharInfo)
{
  KingdomQuestTeamList *v2; // esi@1
  unsigned int v3; // eax@1
  char *v4; // ecx@1
  char v5; // al@4
  signed int v6; // ebx@4
  Name5 *v7; // eax@9
  unsigned int v8; // edx@9
  unsigned int v9; // ecx@9
  unsigned int v10; // edx@9
  unsigned int v11; // eax@9
  unsigned int v12; // ecx@9
  unsigned int v13; // edx@9
  unsigned int v14; // eax@9
  unsigned int v15; // ecx@9
  unsigned int v16; // edx@9
  int v17; // edi@10
  char v18; // al@10
  NiRefObjectVtbl *v19; // edx@10
  void *(__thiscall *v20)(NiRefObject *, unsigned int); // eax@11
  bool v21; // zf@13
  const char *v22; // eax@16
  char *v23; // eax@16
  const char *v24; // eax@17
  char *v25; // eax@19
  signed int v26; // [sp-8h] [bp-48h]@11
  char acMainCharID[21]; // [sp+Ch] [bp-34h]@9
  char acName[21]; // [sp+24h] [bp-1Ch]@9

  v2 = this;
  v3 = 0;
  v4 = (char *)this->m_pkListWin;
  while ( *(_DWORD *)v4 )
  {
    ++v3;
    v4 += 4;
    if ( v3 >= 2 )
    {
      v5 = pkCharInfo->nTeamType;
      v6 = -1;
      if ( v5 == 2 )
        return;
      if ( v5 == 1 )
      {
        v6 = 0;
      }
      else if ( !v5 )
      {
        v6 = 1;
      }
      v7 = User::GetMainCharID(&g_kUser);
      v8 = v7->n5_code[1];
      *(_DWORD *)acMainCharID = v7->n5_code[0];
      v9 = v7->n5_code[2];
      *(_DWORD *)&acMainCharID[4] = v8;
      v10 = v7->n5_code[3];
      v11 = v7->n5_code[4];
      *(_DWORD *)&acMainCharID[8] = v9;
      v12 = pkCharInfo->sCharID.n5_code[0];
      *(_DWORD *)&acMainCharID[12] = v10;
      v13 = pkCharInfo->sCharID.n5_code[1];
      *(_DWORD *)&acMainCharID[16] = v11;
      v14 = pkCharInfo->sCharID.n5_code[2];
      *(_DWORD *)acName = v12;
      v15 = pkCharInfo->sCharID.n5_code[3];
      *(_DWORD *)&acName[4] = v13;
      v16 = pkCharInfo->sCharID.n5_code[4];
      *(_DWORD *)&acName[8] = v14;
      acMainCharID[20] = 0;
      *(_DWORD *)&acName[12] = v15;
      *(_DWORD *)&acName[16] = v16;
      acName[20] = 0;
      if ( !strcmp(acName, acMainCharID) )
      {
        v17 = SlideListWin::AddHeadText(v2->m_pkListWin[v6], acName);
        v18 = pkCharInfo->nTeamType;
        v19 = v2->m_pkSelectedRed->vfptr;
        if ( !v18 )
        {
          v20 = v19[64].__vecDelDtor;
          v26 = 1;
          goto LABEL_12;
        }
        v21 = v18 == 1;
        v20 = v19[64].__vecDelDtor;
        v26 = 0;
        if ( v21 )
        {
          ((void (__stdcall *)(_DWORD))v20)(0);
          ((void (__stdcall *)(_DWORD))v2->m_pkSelectedBlue->vfptr[64].__vecDelDtor)(1);
        }
        else
        {
LABEL_12:
          ((void (__stdcall *)(_DWORD))v20)(v26);
          ((void (__stdcall *)(_DWORD))v2->m_pkSelectedBlue->vfptr[64].__vecDelDtor)(0);
        }
      }
      else
      {
        v17 = SlideListWin::AddText(v2->m_pkListWin[v6], acName);
      }
      v22 = fs("%d", pkCharInfo->nCharLevel);
      SlideListWin::SetText(v2->m_pkListWin[v6], v17, 0, v22);
      v23 = CDataReader::GetRecord(
              (CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4),
              pkCharInfo->nCharClass);
      if ( v23 )
        v24 = v23 + 21;
      else
        v24 = (const char *)&unk_96F8EB;
      SlideListWin::SetText(v2->m_pkListWin[v6], v17, 1u, v24);
      SlideListWin::SetText(v2->m_pkListWin[v6], v17, 2u, acName);
      SlideListWin::SetFontColor(v2->m_pkListWin[v6], v17, 255, 255, 255);
      SlideListWin::SetFontSize(v2->m_pkListWin[v6], v17, 1);
      v25 = (char *)TextData2::Get(0xDC604216);
      SlideListWin::SetToolTipWinText(v2->m_pkListWin[v6], v17, v25);
      return;
    }
  }
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (005F2210) --------------------------------------------------------
void __thiscall KingdomQuestTeamList::SetElement(KingdomQuestTeamList *this, PROTO_NC_KQ_TEAM_SELECT_CMD *pkTeamSelectInfo)
{
  char *v2; // edx@1
  signed int v3; // eax@1
  char *v4; // ecx@1
  unsigned int v5; // ecx@4
  unsigned int v6; // eax@4
  unsigned int v7; // ecx@4
  unsigned int v8; // eax@4
  SlideListWin **v9; // edi@4
  unsigned int v10; // esi@5
  char *v11; // eax@6
  char *v12; // edx@6
  char v13; // cl@7
  int v14; // eax@8
  SlideListWin *v15; // ecx@8
  char *v16; // eax@11
  char v17; // al@11
  SlideListWin *v18; // ecx@11
  char *v19; // eax@11
  char v20; // al@11
  SlideListWin *v21; // ecx@11
  char *v22; // eax@11
  char *v23; // edx@12
  char v24; // cl@13
  SlideListWin *v25; // ecx@15
  KingdomQuestTeamList *v26; // [sp+8h] [bp-ECh]@1
  KQ_JOIN_CHAR_INFO GetData; // [sp+10h] [bp-E4h]@4
  int v28; // [sp+28h] [bp-CCh]@4
  unsigned int j; // [sp+2Ch] [bp-C8h]@11
  Name5 kName; // [sp+30h] [bp-C4h]@11
  char tempName[128]; // [sp+44h] [bp-B0h]@4
  char acName[21]; // [sp+C4h] [bp-30h]@4
  char source[4]; // [sp+DCh] [bp-18h]@12
  int v34; // [sp+E0h] [bp-14h]@12
  int v35; // [sp+E4h] [bp-10h]@12
  int v36; // [sp+E8h] [bp-Ch]@12
  int v37; // [sp+ECh] [bp-8h]@12

  v2 = (char *)this->m_pkListWin;
  v26 = this;
  v3 = 0;
  v4 = (char *)this->m_pkListWin;
  while ( *(_DWORD *)v4 )
  {
    ++v3;
    v4 += 4;
    if ( v3 >= 2 )
    {
      v5 = pkTeamSelectInfo->sCharID.n5_code[1];
      *(_DWORD *)acName = pkTeamSelectInfo->sCharID.n5_code[0];
      v6 = pkTeamSelectInfo->sCharID.n5_code[2];
      *(_DWORD *)&acName[4] = v5;
      v7 = pkTeamSelectInfo->sCharID.n5_code[3];
      *(_DWORD *)&acName[8] = v6;
      v8 = pkTeamSelectInfo->sCharID.n5_code[4];
      *(_QWORD *)&GetData.sCharID.n5_code[3] = 0i64;
      *(_QWORD *)&GetData.sCharID.n5_code[1] = 0i64;
      GetData.sCharID.n5_code[0] = 0;
      *(_DWORD *)&acName[12] = v7;
      *(_DWORD *)&acName[16] = v8;
      acName[20] = 0;
      tempName[0] = 0;
      v9 = (SlideListWin **)v2;
      v28 = 2;
      do
      {
        v10 = 0;
        if ( SlideListWin::GetItemSize(*v9) )
        {
          while ( 1 )
          {
            v11 = SlideListWin::GetText(*v9, v10, 2u);
            v12 = (char *)(tempName - v11);
            do
            {
              v13 = *v11;
              v11[(_DWORD)v12] = *v11;
              ++v11;
            }
            while ( v13 );
            v14 = strcmp(tempName, acName);
            v15 = *v9;
            if ( !v14 )
              break;
            if ( ++v10 >= SlideListWin::GetItemSize(v15) )
              goto LABEL_16;
          }
          j = v10;
          v16 = SlideListWin::GetText(v15, v10, 0);
          v17 = atoi(v16);
          v18 = *v9;
          GetData.nCharLevel = v17;
          v19 = SlideListWin::GetText(v18, v10, 1u);
          v20 = CharClass::GetClassIDByLocalName(v19);
          v21 = *v9;
          GetData.nCharClass = v20;
          *(_QWORD *)&kName.n5_code[3] = 0i64;
          *(_QWORD *)&kName.n5_code[1] = 0i64;
          kName.n5_code[0] = 0;
          v22 = SlideListWin::GetText(v21, v10, 2u);
          if ( strlen(v22) < 0x13 )
          {
            *(_DWORD *)source = 0;
            v34 = 0;
            v35 = 0;
            v36 = 0;
            v37 = 0;
            v23 = (char *)(source - v22);
            do
            {
              v24 = *v22;
              v22[(_DWORD)v23] = *v22;
              ++v22;
            }
            while ( v24 );
            *(_QWORD *)&kName.n5_code[3] = 0i64;
            *(_QWORD *)&kName.n5_code[1] = 0i64;
            kName.n5_code[0] = 0;
            strncpy(kName.n5_name, source, 0x14u);
          }
          GetData.sCharID = kName;
          v25 = *v9;
          GetData.nTeamType = pkTeamSelectInfo->nTeamType;
          SlideListWin::RemoveItem(v25, j);
        }
LABEL_16:
        ++v9;
        --v28;
      }
      while ( v28 );
      KingdomQuestTeamList::AddElement(v26, &GetData);
      return;
    }
  }
}

//----- (005F2470) --------------------------------------------------------
void __thiscall KingdomQuestWin::AddKQuest(KingdomQuestWin *this, PROTO_NC_KQ_LIST_ADD_ACK *pkAddAck)
{
  KingdomQuestWin *v2; // esi@1

  v2 = this;
  if ( pkAddAck )
  {
    CKQ::Add(&this->m_kKindomQuestData, pkAddAck);
    KingdomQuestWin::UpdateAllList(v2);
  }
}

//----- (005F24A0) --------------------------------------------------------
void __thiscall KingdomQuestWin::UpdateListState(KingdomQuestWin *this, PROTO_NC_KQ_LIST_UPDATE_ACK *pkUpdateAck)
{
  KingdomQuestWin *v2; // esi@1

  v2 = this;
  if ( pkUpdateAck )
  {
    CKQ::Update(&this->m_kKindomQuestData, pkUpdateAck);
    KingdomQuestWin::UpdateAllList(v2);
  }
}

//----- (005F24D0) --------------------------------------------------------
void __thiscall KingdomQuestWin::OnMyList(KingdomQuestWin *this)
{
  KingdomQuestWin *v1; // esi@1
  PgWinText *v2; // ecx@1
  NiRefObjectVtbl *v3; // edi@1
  D3DXCOLOR *v4; // eax@1
  NiRefObjectVtbl *v5; // edi@1
  D3DXCOLOR *v6; // eax@1
  D3DXCOLOR result; // [sp+8h] [bp-10h]@1

  v1 = this;
  v2 = this->m_pTexMyList;
  *(_WORD *)&v1->m_bMyList = 1;
  v1->m_bUpdateListCheck = 0;
  v3 = v2->vfptr;
  v4 = Color::GetDxColor(&result, -1, -1, 0, -1);
  v3[117].__vecDelDtor((NiRefObject *)v1->m_pTexMyList, (unsigned int)v4);
  v5 = v1->m_pTexAllList->vfptr;
  v6 = Color::GetDxColor(&result, -1, -1, -1, -1);
  v5[117].__vecDelDtor((NiRefObject *)v1->m_pTexAllList, (unsigned int)v6);
  KingdomQuestWin::UpdateMyList(v1);
}

//----- (005F2570) --------------------------------------------------------
void __thiscall KingdomQuestWin::OnAllList(KingdomQuestWin *this)
{
  KingdomQuestWin *v1; // esi@1
  PgWinText *v2; // ecx@1
  NiRefObjectVtbl *v3; // edi@1
  D3DXCOLOR *v4; // eax@1
  NiRefObjectVtbl *v5; // edi@1
  D3DXCOLOR *v6; // eax@1
  D3DXCOLOR result; // [sp+8h] [bp-10h]@1

  v1 = this;
  v2 = this->m_pTexAllList;
  *(_WORD *)&v1->m_bMyList = 256;
  v1->m_bUpdateListCheck = 0;
  v3 = v2->vfptr;
  v4 = Color::GetDxColor(&result, -1, -1, 0, -1);
  v3[117].__vecDelDtor((NiRefObject *)v1->m_pTexAllList, (unsigned int)v4);
  v5 = v1->m_pTexMyList->vfptr;
  v6 = Color::GetDxColor(&result, -1, -1, -1, -1);
  v5[117].__vecDelDtor((NiRefObject *)v1->m_pTexMyList, (unsigned int)v6);
  KingdomQuestWin::UpdateAllList(v1);
}

//----- (005F2610) --------------------------------------------------------
KingdomQuestWin *__cdecl KingdomQuestWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  KingdomQuestWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1C408u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    KingdomQuestWin::KingdomQuestWin((KingdomQuestWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (KingdomQuestWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (005F2740) --------------------------------------------------------
KingdomQuestPlayerList *__cdecl KingdomQuestPlayerList::CreateWin(NiPointer<NiNode> spNode, PgWin *pkParent)
{
  KingdomQuestPlayerList *v2; // eax@1
  KingdomQuestPlayerList *v3; // eax@2
  KingdomQuestPlayerList *v4; // esi@2
  PgWin *v5; // edi@10
  KingdomQuestPlayerList *result; // eax@19
  NiNode *v7; // [sp-8h] [bp-28h]@6
  PgWin *v8; // [sp-4h] [bp-24h]@6
  NiPointer<KingdomQuestPlayerList> pkWin; // [sp+10h] [bp-10h]@1
  int v10; // [sp+1Ch] [bp-4h]@1

  v10 = 0;
  v2 = (KingdomQuestPlayerList *)operator new(0x16Cu);
  pkWin.m_pObject = v2;
  LOBYTE(v10) = 1;
  if ( v2 )
  {
    KingdomQuestPlayerList::KingdomQuestPlayerList(v2);
    v4 = v3;
  }
  else
  {
    v4 = 0;
  }
  pkWin.m_pObject = v4;
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  LOBYTE(v10) = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, (PgWin *)&v4->vfptr);
  v8 = pkParent;
  v7 = spNode.m_pObject;
  pkParent = (PgWin *)&v7;
  if ( spNode.m_pObject )
    InterlockedIncrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
  if ( (unsigned __int8)((int (__thiscall *)(KingdomQuestPlayerList *, NiNode *, PgWin *))v4->vfptr[129].__vecDelDtor)(
                          v4,
                          v7,
                          v8) )
  {
    ((void (__thiscall *)(KingdomQuestPlayerList *))v4->vfptr[89].__vecDelDtor)(v4);
    LOBYTE(v10) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v10 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && spNode.m_pObject )
      spNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spNode.m_pObject, 1u);
    result = v4;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, (NiPointer<PgWin> *)&pkParent, (PgWin *)&v4->vfptr);
    if ( pkParent )
    {
      v5 = pkParent;
      if ( !InterlockedDecrement((volatile LONG *)&pkParent->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    LOBYTE(v10) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v10 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( spNode.m_pObject )
        spNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spNode.m_pObject, 1u);
    }
    result = 0;
  }
  return result;
}

//----- (005F28D0) --------------------------------------------------------
KingdomQuestTeamList *__cdecl KingdomQuestTeamList::CreateWin(NiPointer<NiNode> spNode, PgWin *pkParent)
{
  KingdomQuestTeamList *v2; // eax@1
  KingdomQuestTeamList *v3; // esi@1
  PgWin *v4; // edi@10
  KingdomQuestTeamList *result; // eax@19
  NiNode *v6; // [sp-8h] [bp-28h]@6
  PgWin *v7; // [sp-4h] [bp-24h]@6
  NiPointer<KingdomQuestTeamList> pkWin; // [sp+10h] [bp-10h]@1
  int v9; // [sp+1Ch] [bp-4h]@1

  v9 = 0;
  v2 = (KingdomQuestTeamList *)operator new(0x180u);
  v3 = v2;
  pkWin.m_pObject = v2;
  LOBYTE(v9) = 1;
  if ( v2 )
  {
    PgWinSpr::PgWinSpr((PgWinSpr *)&v2->vfptr);
    v3->vfptr = (NiRefObjectVtbl *)&KingdomQuestTeamList::`vftable'{for `NiNode'};
    v3->vfptr = (IDirectMessengerVtbl *)&KingdomQuestTeamList::`vftable'{for `IDirectMessenger'};
    *(_DWORD *)&v3->m_bSortReverse[0] = 0;
    *(_WORD *)&v3->m_bSortReverse[4] = 0;
    v3->m_fOldTime = 0.0;
    v3->m_pkFrameWork = 0;
    v3->m_acName[0] = 0;
    v3->m_pkJoinTeamListText = 0;
    v3->m_bTimer = 1;
  }
  else
  {
    v3 = 0;
  }
  pkWin.m_pObject = v3;
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  LOBYTE(v9) = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
  v7 = pkParent;
  v6 = spNode.m_pObject;
  pkParent = (PgWin *)&v6;
  if ( spNode.m_pObject )
    InterlockedIncrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
  if ( (unsigned __int8)((int (__thiscall *)(KingdomQuestTeamList *, NiNode *, PgWin *))v3->vfptr[129].__vecDelDtor)(
                          v3,
                          v6,
                          v7) )
  {
    ((void (__thiscall *)(KingdomQuestTeamList *))v3->vfptr[89].__vecDelDtor)(v3);
    LOBYTE(v9) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v9 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && spNode.m_pObject )
      spNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spNode.m_pObject, 1u);
    result = v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, (NiPointer<PgWin> *)&pkParent, (PgWin *)&v3->vfptr);
    if ( pkParent )
    {
      v4 = pkParent;
      if ( !InterlockedDecrement((volatile LONG *)&pkParent->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    LOBYTE(v9) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v9 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( spNode.m_pObject )
        spNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spNode.m_pObject, 1u);
    }
    result = 0;
  }
  return result;
}
// 9B2BF8: using guessed type void (__thiscall *KingdomQuestTeamList::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B2C14: using guessed type int (__thiscall *KingdomQuestTeamList::`vftable'{for `NiNode'})(void *p, char);

//----- (005F2AA0) --------------------------------------------------------
void __thiscall KingdomQuestWin::UpdateTimer(KingdomQuestWin *this, float fTime)
{
  KingdomQuestWin *v2; // esi@1
  double v3; // st7@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v4; // [sp-1Ch] [bp-24h]@2
  int v5; // [sp-Ch] [bp-14h]@2
  signed int v6; // [sp-8h] [bp-10h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v7; // [sp+4h] [bp-4h]@2
  float fDeltaTime; // [sp+10h] [bp+8h]@2

  v2 = this;
  if ( this->m_bTimer != 1 )
  {
    v3 = fTime - this->m_fOldTime;
    v7 = &v4;
    v6 = 15;
    fDeltaTime = v3;
    v5 = 0;
    v4._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v4,
      "KQPlayerList_ResetListCoolTime",
      0x1Eu);
    if ( (double)(unsigned __int16)CSingleDataMap::GetValue(&g_kSingleDataMap, v4) <= fDeltaTime )
      v2->m_bTimer = 1;
  }
}

//----- (005F2B10) --------------------------------------------------------
void __thiscall KingdomQuestPlayerList::UpdateTimer(KingdomQuestPlayerList *this, float fTime)
{
  KingdomQuestPlayerList *v2; // esi@1
  double v3; // st7@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v4; // [sp-1Ch] [bp-24h]@2
  int v5; // [sp-Ch] [bp-14h]@2
  signed int v6; // [sp-8h] [bp-10h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v7; // [sp+4h] [bp-4h]@2
  float fDeltaTime; // [sp+10h] [bp+8h]@2

  v2 = this;
  if ( this->m_bTimer != 1 )
  {
    v3 = fTime - this->m_fOldTime;
    v7 = &v4;
    v6 = 15;
    fDeltaTime = v3;
    v5 = 0;
    v4._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v4,
      "KQPlayerList_ResetListCoolTime",
      0x1Eu);
    if ( (double)(unsigned __int16)CSingleDataMap::GetValue(&g_kSingleDataMap, v4) <= fDeltaTime )
      v2->m_bTimer = 1;
  }
}

//----- (005F2B80) --------------------------------------------------------
void __thiscall KingdomQuestTeamList::UpdateTimer(KingdomQuestTeamList *this, float fTime)
{
  KingdomQuestTeamList *v2; // esi@1
  double v3; // st7@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v4; // [sp-1Ch] [bp-24h]@2
  int v5; // [sp-Ch] [bp-14h]@2
  signed int v6; // [sp-8h] [bp-10h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v7; // [sp+4h] [bp-4h]@2
  float fDeltaTime; // [sp+10h] [bp+8h]@2

  v2 = this;
  if ( this->m_bTimer != 1 )
  {
    v3 = fTime - this->m_fOldTime;
    v7 = &v4;
    v6 = 15;
    fDeltaTime = v3;
    v5 = 0;
    v4._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v4,
      "KQPlayerList_ResetListCoolTime",
      0x1Eu);
    if ( (double)(unsigned __int16)CSingleDataMap::GetValue(&g_kSingleDataMap, v4) <= fDeltaTime )
      v2->m_bTimer = 1;
  }
}

//----- (005F2BF0) --------------------------------------------------------
void __thiscall KingdomQuestWin::UpdateContentView(KingdomQuestWin *this, int nIndex)
{
  KingdomQuestWin *v2; // ebx@1
  SlideListWin *v3; // ecx@1
  unsigned int v4; // eax@4
  unsigned int v5; // edx@5
  unsigned int v6; // esi@5
  unsigned int v7; // ST18_4@5
  NiUnsharedGeometryGroup *v8; // eax@5
  PROTO_KQ_INFO_CLIENT *v9; // esi@5
  int v10; // ecx@5
  int v11; // eax@6
  int v12; // ST18_4@9
  int v13; // ST14_4@9
  NiUnsharedGeometryGroup *v14; // eax@9
  int v15; // eax@9
  int v16; // ST18_4@9
  unsigned int v17; // edi@9
  NiUnsharedGeometryGroup *v18; // eax@9
  int v19; // ST18_4@9
  int v20; // ST14_4@9
  NiUnsharedGeometryGroup *v21; // eax@9
  unsigned int v22; // edi@9
  NiUnsharedGeometryGroup *v23; // eax@9
  int v24; // ST18_4@9
  int v25; // ST14_4@9
  NiUnsharedGeometryGroup *v26; // eax@9
  char v27; // al@9
  int v28; // edi@11
  unsigned int v29; // ecx@11
  int v30; // esi@13
  int v31; // edx@14
  int v32; // ecx@14
  unsigned int v33; // eax@14
  unsigned int v34; // edx@14
  char *v35; // edi@16
  char *v36; // eax@16
  PgWinText *v37; // eax@18
  PgFont *v38; // ecx@18
  char *v39; // eax@19
  int v40; // esi@22
  int v41; // eax@22
  signed int v42; // ecx@24
  double v43; // st7@30
  char *v44; // eax@30
  NiRefObjectVtbl *v45; // edx@30
  double v46; // st7@30
  NiUnsharedGeometryGroup *v47; // eax@39
  char *v48; // edi@39
  char v49; // al@40
  const char *v50; // eax@42
  _BYTE *v51; // eax@44
  const char *v52; // eax@49
  PgFrameWork *v53; // edi@54
  SlideListWin *v54; // eax@55
  signed int v55; // esi@55
  SlideListWin *v56; // ecx@56
  unsigned int dwData; // [sp+14h] [bp-368h]@4
  PROTO_KQ_INFO_CLIENT *pData; // [sp+18h] [bp-364h]@5
  PgFont *pkFont; // [sp+1Ch] [bp-360h]@18
  char *pPosEndTest; // [sp+20h] [bp-35Ch]@19
  PgWinText *c; // [sp+24h] [bp-358h]@18
  char *pPosEnd; // [sp+28h] [bp-354h]@19
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strResult; // [sp+2Ch] [bp-350h]@5
  unsigned int v64; // [sp+48h] [bp-334h]@11
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v65; // [sp+50h] [bp-32Ch]@14
  char szTemp2[256]; // [sp+6Ch] [bp-310h]@16
  char szTemp[256]; // [sp+16Ch] [bp-210h]@5
  char dest; // [sp+26Ch] [bp-110h]@16
  char dst; // [sp+26Dh] [bp-10Fh]@16
  char szTest[128]; // [sp+2ECh] [bp-90h]@53
  int v71; // [sp+378h] [bp-4h]@11

  v2 = this;
  v3 = this->m_pListWinTime;
  if ( v3 )
  {
    if ( nIndex < v2->m_kKindomQuestData.m_NumOfSchedule && (SlideListWin::GetCurSelIndex(v3) & 0x80000000) == 0 )
    {
      SlideListWin::RemoveAllList(v2->m_pListWinContent);
      v4 = SlideListWin::GetCurSelIndex(v2->m_pListWinTime);
      SlideListWin::GetData(v2->m_pListWinTime, v4, &dwData);
      if ( (signed int)dwData < v2->m_kKindomQuestData.m_NumOfSchedule )
      {
        v5 = v2->m_kKindomQuestData.m_Schedule[dwData].Handle;
        v6 = (unsigned int)&v2->m_kKindomQuestData.m_Schedule[dwData].Handle;
        v7 = (unsigned int)v2->m_kKindomQuestData.m_Schedule[dwData].Title;
        pData = (PROTO_KQ_INFO_CLIENT *)&v2->m_kKindomQuestData.m_Schedule[dwData].Handle;
        v2->m_SelectedKQHandle = v5;
        v8 = TextData::Get(0x9A9A9181);
        sprintf(szTemp, (const char *)v8, v7);
        SlideListWin::AddText(v2->m_pListWinContent, szTemp);
        SlideListWin::AddText(v2->m_pListWinContent, &byte_9B1DCF);
        qmemcpy(&strResult, (const void *)(v6 + 79), 0x24u);
        v9 = pData;
        v10 = pData->StartWaitTime + *(_DWORD *)&strResult._Bx._Alias[4];
        if ( v10 <= 59 )
        {
          v11 = *(_DWORD *)&strResult._Bx._Alias[8];
        }
        else
        {
          v11 = *(_DWORD *)&strResult._Bx._Alias[8] + 1;
          v10 += 60
               * (((signed int)(((unsigned __int64)(2004318071i64 * v10) >> 32) - v10) >> 5)
                + ((unsigned int)(((unsigned __int64)(2004318071i64 * v10) >> 32) - v10) >> 31));
          if ( *(_DWORD *)&strResult._Bx._Alias[8] == 24 )
            v11 = 1;
        }
        v12 = v10;
        v13 = v11;
        v14 = TextData2::Get(0x5A55283Cu);
        sprintf(szTemp, (const char *)v14, v13, v12);
        v15 = SlideListWin::AddText(v2->m_pListWinContent, szTemp);
        v16 = v9->LimitTime;
        v17 = v15;
        v18 = TextData::Get(0x3841364Fu);
        sprintf(szTemp, (const char *)v18, v16);
        SlideListWin::SetText(v2->m_pListWinContent, v17, 1u, szTemp);
        v19 = v9->MaxLevel;
        v20 = v9->MinLevel;
        v21 = TextData::Get(0xE608F644);
        sprintf(szTemp, (const char *)v21, v20, v19);
        v22 = SlideListWin::AddText(v2->m_pListWinContent, szTemp);
        v23 = TextData::Get(0xC2EADB35);
        SlideListWin::AddText(v2->m_pListWinContent, (const char *)v23);
        v24 = v9->MaxPlayers;
        v25 = v9->MinPlayers;
        v26 = TextData::Get(0x2D4A4395u);
        sprintf(szTemp, (const char *)v26, v25, v24);
        SlideListWin::SetText(v2->m_pListWinContent, v22, 1u, szTemp);
        v27 = v9->Status;
        if ( v27 == 2 || v27 == 4 )
        {
          v28 = 0;
          v64 = 15;
          *(_DWORD *)&strResult._Alval.0 = 0;
          strResult._Bx._Buf[8] = 0;
          v29 = v2->m_SelectedKQHandle;
          v71 = 0;
          if ( v29 == v2->m_kKQJoiner.Handle && v2->m_kKQJoiner.nJoinCnt > 0 )
          {
            v30 = (int)&v2->m_kKQJoiner.kJoiner[0].n5_code[2];
            do
            {
              v31 = *(_DWORD *)(v30 - 8);
              v32 = *(_DWORD *)v30;
              *(_DWORD *)&v65._Bx._Alias[8] = *(_DWORD *)(v30 - 4);
              v33 = *(_DWORD *)(v30 + 8);
              *(_DWORD *)&v65._Bx._Alias[4] = v31;
              v34 = *(_DWORD *)(v30 + 4);
              v65._Myres = v33;
              v65._Mysize = v34;
              *(_DWORD *)&v65._Bx._Alias[12] = v32;
              v65._Alval.0 = 0;
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
                (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)&strResult + 8),
                &v65._Bx._Buf[4],
                strlen(&v65._Bx._Buf[4]));
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
                (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)&strResult + 8),
                ", ",
                2u);
              ++v28;
              v30 += 20;
            }
            while ( v28 < v2->m_kKQJoiner.nJoinCnt );
            v9 = pData;
          }
          dest = 0;
          memset(&dst, 0, 0xFFu);
          szTemp2[0] = 0;
          memset(&szTemp2[1], 0, 0xFFu);
          v35 = fs(0);
          v36 = *(char **)&strResult._Bx._Alias[8];
          if ( v64 < 0x10 )
            v36 = &strResult._Bx._Buf[8];
          strncpy(v35, v36, *(unsigned int *)&strResult._Alval.0);
          v35[*(_DWORD *)&strResult._Alval.0] = 0;
          v37 = SlideListWin::GetTextWin(v2->m_pListWinContent, 0, 0);
          v38 = v37->m_spTextGeom.m_pObject->m_spPgFont.m_pObject;
          c = v37;
          pkFont = v38;
          if ( v38 )
          {
            pPosEndTest = (char *)(2 * ((int (__thiscall *)(PgWinText *))v37->vfptr[36].__vecDelDtor)(v37));
            v39 = CSpFont::SplitStrByPixelSize(
                    (CSpFont *)&pkFont->vfptr,
                    v35,
                    (signed int)((double)(unsigned int)pPosEndTest / 1.049999952316284),
                    0);
            pPosEnd = v39;
            pPosEndTest = v39;
            if ( v39 )
            {
              while ( 1 )
              {
                v40 = v39 - v35;
                strncpy(&dest, v35, v39 - v35);
                v41 = v40 - 2;
                *(&dest + v40) = 0;
                if ( v40 - 2 > 0 && *(&dest + v41) != 44 )
                {
                  v42 = 2;
                  while ( *(&dest + v41) != 44 )
                  {
                    --v41;
                    ++v42;
                    if ( v41 <= 0 )
                      goto LABEL_29;
                  }
                  *(&dest + v41) = 0;
LABEL_29:
                  pPosEnd -= v42;
                }
                v35 = pPosEnd;
                v43 = (double)(unsigned int)(2 * ((int (*)(void))c->vfptr[36].__vecDelDtor)());
                v44 = CSpFont::SplitStrByPixelSize(
                        (CSpFont *)&pkFont->vfptr,
                        pPosEnd,
                        (signed int)(v43 / 1.049999952316284),
                        0);
                v45 = c->vfptr;
                pPosEnd = v44;
                v46 = (double)(unsigned int)(2 * ((int (*)(void))v45[36].__vecDelDtor)());
                if ( CSpFont::SplitStrByPixelSize(
                       (CSpFont *)&pkFont->vfptr,
                       pPosEndTest,
                       (signed int)(v46 / 1.049999952316284),
                       0) )
                {
                  pPosEndTest = pPosEnd;
                }
                else
                {
                  if ( v40 - 2 > 0 )
                    szTemp[v40 + 254] = 0;
                  pPosEndTest = 0;
                }
                sprintf(szTemp2, "  %s", &dest);
                SlideListWin::AddText(v2->m_pListWinContent, szTemp2);
                if ( !pPosEndTest )
                  break;
                v39 = pPosEnd;
              }
              v9 = pData;
            }
          }
          v71 = -1;
          if ( v64 >= 0x10 )
            operator delete(*(void **)&strResult._Bx._Alias[8]);
        }
        SlideListWin::AddText(v2->m_pListWinContent, &byte_9B1DE6);
        v47 = TextData::Get(0xA6A69872);
        SlideListWin::AddText(v2->m_pListWinContent, (const char *)v47);
        v48 = CDataReader::GetRecord(
                (CDataReader *)(ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::ms_pkTable + 4),
                v9->ID);
        if ( v48 )
        {
          v65._Myres = 15;
          v65._Mysize = 0;
          v65._Bx._Buf[0] = 0;
          v71 = 1;
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v65, "   ", 3u);
          v49 = *v48;
          for ( LOBYTE(c) = v49; v49; LOBYTE(c) = v49 )
          {
            if ( v49 == 10 )
            {
              v50 = v65._Bx._Ptr;
              if ( v65._Myres < 0x10 )
                v50 = (const char *)&v65;
              SlideListWin::AddText(v2->m_pListWinContent, v50);
              v51 = v65._Bx._Ptr;
              v65._Mysize = 0;
              if ( v65._Myres < 0x10 )
                v51 = &v65;
              *v51 = 0;
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v65, "   ", 3u);
            }
            else
            {
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&v65, 1u, (char)c);
            }
            v49 = (v48++)[1];
          }
          v52 = v65._Bx._Ptr;
          if ( v65._Myres < 0x10 )
            v52 = (const char *)&v65;
          SlideListWin::AddText(v2->m_pListWinContent, v52);
          SlideListWin::AlignText(v2->m_pListWinContent, 4u);
          v71 = -1;
          if ( v65._Myres >= 0x10 )
            operator delete(v65._Bx._Ptr);
        }
        else
        {
          sprintf(szTest, "%d KQDesc Not Found", v9->ID);
          SlideListWin::AddText(v2->m_pListWinContent, szTest);
        }
        SlideListWin::UpdateViewList(v2->m_pListWinContent);
        v53 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
        if ( v53 )
        {
          v54 = v2->m_pListWinTime;
          v55 = v54->m_nViewStartPos;
          if ( v55 < v54->m_nMaxViewListCnt )
          {
            do
            {
              v56 = v2->m_pListWinTime;
              if ( v53[140].m_BackFrameID == (void *)1 )
              {
                SlideListWin::SetCurSelIndex(v56, -1);
                ((void (__stdcall *)(_DWORD))v2->m_pListWinTime->vfptr[60].__vecDelDtor)(0);
                SlideListWin::SetFontColor(v2->m_pListWinTime, v55, 128, 128, 128);
              }
              else
              {
                ((void (__stdcall *)(signed int))v56->vfptr[60].__vecDelDtor)(1);
                SlideListWin::SetFontColor(v2->m_pListWinTime, v55, 255, 255, 255);
              }
              ++v55;
            }
            while ( v55 < v2->m_pListWinTime->m_nMaxViewListCnt );
          }
        }
        SlideBar::SetSplitCnt(v2->m_pSlideBarContentEx, v2->m_pListWinContent->m_nSlideSplitCnt);
      }
    }
  }
}
// A8C174: using guessed type int ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::ms_pkTable;

//----- (005F3400) --------------------------------------------------------
void __thiscall KingdomQuestWin::UpdateMeWin(KingdomQuestWin *this, float fCurTime)
{
  KingdomQuestWin *v2; // esi@1
  GameFrameWork *v3; // ecx@3

  v2 = this;
  if ( !(this->m_uFlags & 1) && CNSTimer_Interval::IsRun_GetCount(&this->m_kTimerInterval, fCurTime) )
  {
    v3 = (GameFrameWork *)v2->m_pkFrameWork;
    v2->m_bUpdateListCheck = 1;
    GameFrameWork::NcKqListRefreshReq(v3);
  }
  KingdomQuestWin::UpdateKQTime(v2);
  if ( v2->m_bRequestJoin )
  {
    if ( v2->m_uFlags & 1 || !CNSTimer_Interval::IsRun_GetCount(&v2->m_kKQDelay, fCurTime) )
    {
      ((void (__stdcall *)(_DWORD))v2->m_pJoinOk->vfptr[60].__vecDelDtor)(0);
    }
    else
    {
      v2->m_bRequestJoin = 0;
      ((void (__stdcall *)(_DWORD))v2->m_pJoinOk->vfptr[60].__vecDelDtor)(1);
    }
  }
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
  {
    GameFrameWork::UpdateUIScroll(v2->m_pListWinContent, v2->m_pSlideBarContentEx);
    GameFrameWork::UpdateUIScroll(v2->m_pListWinTime, v2->m_pSlideBarTimeEx);
  }
  KingdomQuestWin::UpdateTimer(v2, fCurTime);
}

//----- (005F34E0) --------------------------------------------------------
void __thiscall KingdomQuestWin::UpdateContentView(KingdomQuestWin *this, unsigned int kQuestHandle)
{
  KingdomQuestWin *v2; // ebx@1
  PROTO_KQ_INFO *v3; // eax@2
  PROTO_KQ_INFO *v4; // esi@3
  int v5; // ST18_4@3
  NiUnsharedGeometryGroup *v6; // eax@3
  int v7; // ecx@3
  int v8; // eax@4
  int v9; // ST18_4@7
  int v10; // ST14_4@7
  NiUnsharedGeometryGroup *v11; // eax@7
  int v12; // eax@7
  int v13; // ST18_4@7
  unsigned int v14; // edi@7
  NiUnsharedGeometryGroup *v15; // eax@7
  int v16; // ST18_4@7
  int v17; // ST14_4@7
  NiUnsharedGeometryGroup *v18; // eax@7
  unsigned int v19; // edi@7
  NiUnsharedGeometryGroup *v20; // eax@7
  int v21; // ST18_4@7
  int v22; // ST14_4@7
  NiUnsharedGeometryGroup *v23; // eax@7
  char v24; // al@7
  unsigned int v25; // ecx@9
  int v26; // edi@10
  int v27; // esi@11
  int v28; // edx@12
  int v29; // ecx@12
  unsigned int v30; // eax@12
  unsigned int v31; // edx@12
  char *v32; // esi@13
  char *v33; // eax@13
  SlideListWin *v34; // eax@15
  PgWinText *v35; // eax@16
  ColumnBut **v36; // edx@17
  double v37; // st7@21
  char *v38; // edi@21
  int v39; // esi@22
  int v40; // eax@22
  signed int v41; // ecx@24
  double v42; // st7@30
  double v43; // st7@30
  NiUnsharedGeometryGroup *v44; // eax@38
  char *v45; // esi@38
  char v46; // cl@39
  const char *v47; // eax@43
  _BYTE *v48; // eax@45
  unsigned int v49; // esi@49
  bool v50; // zf@52
  _BYTE *v51; // eax@53
  _BYTE *v52; // eax@58
  _BYTE *v53; // eax@60
  const char *v54; // eax@64
  PgFrameWork *v55; // edi@70
  SlideListWin *v56; // eax@71
  signed int v57; // esi@71
  SlideListWin *v58; // ecx@72
  char *pcTemp; // [sp+14h] [bp-368h]@13
  PgWinText *pkTestWin; // [sp+18h] [bp-364h]@20
  PROTO_KQ_INFO_CLIENT *pData; // [sp+1Ch] [bp-360h]@2
  char *pPosEndTest; // [sp+20h] [bp-35Ch]@21
  PgFont *pkFont; // [sp+24h] [bp-358h]@20
  PgFont *pkFonta; // [sp+24h] [bp-358h]@40
  char c; // [sp+2Bh] [bp-351h]@39
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strResult; // [sp+2Ch] [bp-350h]@3
  unsigned int v67; // [sp+48h] [bp-334h]@9
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v68; // [sp+50h] [bp-32Ch]@12
  char szTemp2[256]; // [sp+6Ch] [bp-310h]@13
  char szTemp[256]; // [sp+16Ch] [bp-210h]@3
  char dest; // [sp+26Ch] [bp-110h]@13
  char dst; // [sp+26Dh] [bp-10Fh]@13
  char szTest[128]; // [sp+2ECh] [bp-90h]@69
  int v74; // [sp+378h] [bp-4h]@9

  v2 = this;
  if ( kQuestHandle != -1 )
  {
    SlideListWin::RemoveAllList(this->m_pListWinContent);
    v3 = CKQ::Get(&v2->m_kKindomQuestData, kQuestHandle);
    pData = (PROTO_KQ_INFO_CLIENT *)v3;
    if ( v3 )
    {
      v4 = v3;
      v5 = (int)v3->Title;
      v2->m_SelectedKQHandle = v3->Handle;
      v6 = TextData::Get(0x9A9A9181);
      sprintf(szTemp, (const char *)v6, v5);
      SlideListWin::AddText(v2->m_pListWinContent, szTemp);
      SlideListWin::AddText(v2->m_pListWinContent, &byte_9B1DE7);
      qmemcpy(&strResult, &v4->tm_StartTime, 0x24u);
      v7 = pData->StartWaitTime + *(_DWORD *)&strResult._Bx._Alias[4];
      if ( v7 <= 59 )
      {
        v8 = *(_DWORD *)&strResult._Bx._Alias[8];
      }
      else
      {
        v8 = *(_DWORD *)&strResult._Bx._Alias[8] + 1;
        v7 += 60
            * (((signed int)(((unsigned __int64)(2004318071i64 * v7) >> 32) - v7) >> 5)
             + ((unsigned int)(((unsigned __int64)(2004318071i64 * v7) >> 32) - v7) >> 31));
        if ( *(_DWORD *)&strResult._Bx._Alias[8] == 24 )
          v8 = 1;
      }
      v9 = v7;
      v10 = v8;
      v11 = TextData2::Get(0x5A55283Cu);
      sprintf(szTemp, (const char *)v11, v10, v9);
      v12 = SlideListWin::AddText(v2->m_pListWinContent, szTemp);
      v13 = pData->LimitTime;
      v14 = v12;
      v15 = TextData::Get(0x3841364Fu);
      sprintf(szTemp, (const char *)v15, v13);
      SlideListWin::SetText(v2->m_pListWinContent, v14, 1u, szTemp);
      v16 = pData->MaxLevel;
      v17 = pData->MinLevel;
      v18 = TextData::Get(0xE608F644);
      sprintf(szTemp, (const char *)v18, v17, v16);
      v19 = SlideListWin::AddText(v2->m_pListWinContent, szTemp);
      v20 = TextData::Get(0xC2EADB35);
      SlideListWin::AddText(v2->m_pListWinContent, (const char *)v20);
      v21 = pData->MaxPlayers;
      v22 = pData->MinPlayers;
      v23 = TextData::Get(0x2D4A4395u);
      sprintf(szTemp, (const char *)v23, v22, v21);
      SlideListWin::SetText(v2->m_pListWinContent, v19, 1u, szTemp);
      v24 = pData->Status;
      if ( v24 == 2 || v24 == 4 )
      {
        v67 = 15;
        *(_DWORD *)&strResult._Alval.0 = 0;
        strResult._Bx._Buf[8] = 0;
        v25 = v2->m_SelectedKQHandle;
        v74 = 0;
        if ( v25 == v2->m_kKQJoiner.Handle )
        {
          v26 = 0;
          if ( v2->m_kKQJoiner.nJoinCnt > 0 )
          {
            v27 = (int)&v2->m_kKQJoiner.kJoiner[0].n5_code[2];
            do
            {
              v28 = *(_DWORD *)(v27 - 8);
              v29 = *(_DWORD *)v27;
              *(_DWORD *)&v68._Bx._Alias[8] = *(_DWORD *)(v27 - 4);
              v30 = *(_DWORD *)(v27 + 8);
              *(_DWORD *)&v68._Bx._Alias[4] = v28;
              v31 = *(_DWORD *)(v27 + 4);
              v68._Myres = v30;
              v68._Mysize = v31;
              *(_DWORD *)&v68._Bx._Alias[12] = v29;
              v68._Alval.0 = 0;
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
                (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)&strResult + 8),
                &v68._Bx._Buf[4],
                strlen(&v68._Bx._Buf[4]));
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
                (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)&strResult + 8),
                ", ",
                2u);
              ++v26;
              v27 += 20;
            }
            while ( v26 < v2->m_kKQJoiner.nJoinCnt );
          }
        }
        dest = 0;
        memset(&dst, 0, 0xFFu);
        szTemp2[0] = 0;
        memset(&szTemp2[1], 0, 0xFFu);
        v32 = fs(0);
        v33 = *(char **)&strResult._Bx._Alias[8];
        pcTemp = v32;
        if ( v67 < 0x10 )
          v33 = &strResult._Bx._Buf[8];
        strncpy(v32, v33, *(unsigned int *)&strResult._Alval.0);
        v32[*(_DWORD *)&strResult._Alval.0] = 0;
        v34 = v2->m_pListWinContent;
        if ( v34->m_vecButList._Mylast - v34->m_vecButList._Myfirst )
        {
          v36 = v34->m_vecButList._Myfirst;
          if ( (*v36)->m_vecTextWin._Mylast - (*v36)->m_vecTextWin._Myfirst )
            v35 = *(*v36)->m_vecTextWin._Myfirst;
          else
            v35 = 0;
        }
        else
        {
          v35 = 0;
        }
        pkTestWin = v35;
        pkFont = v35->m_spTextGeom.m_pObject->m_spPgFont.m_pObject;
        if ( pkFont )
        {
          v37 = (double)(unsigned int)(2 * ((int (*)(void))v35->vfptr[36].__vecDelDtor)());
          v38 = CSpFont::SplitStrByPixelSize((CSpFont *)&pkFont->vfptr, v32, (signed int)(v37 / 1.049999952316284), 0);
          pPosEndTest = v38;
          while ( pPosEndTest )
          {
            v39 = v38 - pcTemp;
            strncpy(&dest, pcTemp, v38 - pcTemp);
            v40 = v38 - pcTemp - 2;
            *(&dest + v38 - pcTemp) = 0;
            if ( v40 > 0 && *(&dest + v40) != 44 )
            {
              v41 = 2;
              while ( *(&dest + v40) != 44 )
              {
                --v40;
                ++v41;
                if ( v40 <= 0 )
                  goto LABEL_29;
              }
              *(&dest + v40) = 0;
LABEL_29:
              v38 -= v41;
            }
            pcTemp = v38;
            v42 = (double)(unsigned int)(2 * ((int (*)(void))pkTestWin->vfptr[36].__vecDelDtor)());
            v38 = CSpFont::SplitStrByPixelSize((CSpFont *)&pkFont->vfptr, v38, (signed int)(v42 / 1.049999952316284), 0);
            v43 = (double)(unsigned int)(2 * ((int (*)(void))pkTestWin->vfptr[36].__vecDelDtor)());
            if ( CSpFont::SplitStrByPixelSize(
                   (CSpFont *)&pkFont->vfptr,
                   pPosEndTest,
                   (signed int)(v43 / 1.049999952316284),
                   0) )
            {
              pPosEndTest = v38;
            }
            else
            {
              if ( v39 - 2 > 0 )
                szTemp[v39 + 254] = 0;
              pPosEndTest = 0;
            }
            sprintf(szTemp2, "  %s", &dest);
            SlideListWin::AddText(v2->m_pListWinContent, szTemp2);
          }
        }
        v74 = -1;
        if ( v67 >= 0x10 )
          operator delete(*(void **)&strResult._Bx._Alias[8]);
      }
      SlideListWin::AddText(v2->m_pListWinContent, &byte_9B1DEE);
      v44 = TextData::Get(0xA6A69872);
      SlideListWin::AddText(v2->m_pListWinContent, (const char *)v44);
      v45 = CDataReader::GetRecord(
              (CDataReader *)(ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::ms_pkTable + 4),
              pData->ID);
      if ( v45 )
      {
        v68._Myres = 15;
        v68._Mysize = 0;
        v68._Bx._Buf[0] = 0;
        v74 = 1;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v68, "   ", 3u);
        v46 = *v45;
        c = *v45;
        if ( *v45 )
        {
          for ( pkFonta = (PgFont *)v45; ; v46 = (char)pkFonta->vfptr )
          {
            if ( v46 == 10 )
            {
              v47 = v68._Bx._Ptr;
              if ( v68._Myres < 0x10 )
                v47 = (const char *)&v68;
              SlideListWin::AddText(v2->m_pListWinContent, v47);
              v48 = v68._Bx._Ptr;
              v68._Mysize = 0;
              if ( v68._Myres < 0x10 )
                v48 = &v68;
              *v48 = 0;
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v68, "   ", 3u);
              goto LABEL_63;
            }
            if ( -1 - v68._Mysize <= 1 || (v49 = v68._Mysize + 1, v68._Mysize + 1 > 0xFFFFFFFE) )
              std::_Xlength_error("string too long");
            if ( v68._Myres >= v49 )
            {
              v50 = v49 == 0;
              if ( v68._Mysize != -1 )
                goto LABEL_57;
              v51 = v68._Bx._Ptr;
              v68._Mysize = 0;
              if ( v68._Myres < 0x10 )
                v51 = &v68;
              *v51 = 0;
            }
            else
            {
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Copy(
                &v68,
                v68._Mysize + 1,
                v68._Mysize);
              v46 = c;
            }
            v50 = v49 == 0;
LABEL_57:
            if ( !v50 )
            {
              v52 = v68._Bx._Ptr;
              if ( v68._Myres < 0x10 )
                v52 = &v68;
              v52[v68._Mysize] = v46;
              v53 = v68._Bx._Ptr;
              v68._Mysize = v49;
              if ( v68._Myres < 0x10 )
                v53 = &v68;
              v53[v49] = 0;
            }
LABEL_63:
            pkFonta = (PgFont *)((char *)pkFonta + 1);
            c = (char)pkFonta->vfptr;
            if ( !LOBYTE(pkFonta->vfptr) )
              break;
          }
        }
        v54 = v68._Bx._Ptr;
        if ( v68._Myres < 0x10 )
          v54 = (const char *)&v68;
        SlideListWin::AddText(v2->m_pListWinContent, v54);
        SlideListWin::AlignText(v2->m_pListWinContent, 4u);
        v74 = -1;
        if ( v68._Myres >= 0x10 )
          operator delete(v68._Bx._Ptr);
      }
      else
      {
        sprintf(szTest, "%d KQDesc Not Found", pData->ID);
        SlideListWin::AddText(v2->m_pListWinContent, szTest);
      }
      SlideListWin::UpdateViewList(v2->m_pListWinContent);
      v55 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v55 )
      {
        v56 = v2->m_pListWinTime;
        v57 = v56->m_nViewStartPos;
        if ( v57 < v56->m_nMaxViewListCnt )
        {
          do
          {
            v58 = v2->m_pListWinTime;
            if ( v55[140].m_BackFrameID == (void *)1 )
            {
              SlideListWin::SetCurSelIndex(v58, -1);
              ((void (__stdcall *)(_DWORD))v2->m_pListWinTime->vfptr[60].__vecDelDtor)(0);
              SlideListWin::SetFontColor(v2->m_pListWinTime, v57, 128, 128, 128);
            }
            else
            {
              ((void (__stdcall *)(signed int))v58->vfptr[60].__vecDelDtor)(1);
              SlideListWin::SetFontColor(v2->m_pListWinTime, v57, 255, 255, 255);
            }
            ++v57;
          }
          while ( v57 < v2->m_pListWinTime->m_nMaxViewListCnt );
        }
      }
      SlideBar::SetSplitCnt(v2->m_pSlideBarContentEx, v2->m_pListWinContent->m_nSlideSplitCnt);
    }
  }
}
// A8C174: using guessed type int ITableBase<KINGDOM_QUEST_DESC,KQDescTable>::ms_pkTable;

//----- (005F3D80) --------------------------------------------------------
void __thiscall KingdomQuestPlayerList::UpdateMeWin(KingdomQuestPlayerList *this, float fCurTime)
{
  KingdomQuestPlayerList::UpdateTimer(this, fCurTime);
}

//----- (005F3DA0) --------------------------------------------------------
void __thiscall KingdomQuestTeamList::UpdateMeWin(KingdomQuestTeamList *this, float fCurTime)
{
  KingdomQuestTeamList::UpdateTimer(this, fCurTime);
}

//----- (005F3DC0) --------------------------------------------------------
void __thiscall KingdomQuestWin::OnListClick(KingdomQuestWin *this, int nIndex)
{
  KingdomQuestWin *v2; // esi@1
  signed int v3; // eax@1
  unsigned int v4; // edi@5
  PROTO_KQ_INFO *v5; // eax@5
  KQTeam *v6; // eax@6
  unsigned int dwData; // [sp+4h] [bp-4h]@2

  v2 = this;
  v3 = SlideListWin::GetCurSelIndex(this->m_pListWinTime);
  if ( v3 >= 0 )
  {
    SlideListWin::GetData(v2->m_pListWinTime, v3, &dwData);
    if ( (signed int)dwData < v2->m_kKindomQuestData.m_NumOfSchedule )
    {
      GameFrameWork::NcKqStatusReq((GameFrameWork *)v2->m_pkFrameWork, v2->m_kKindomQuestData.m_Schedule[dwData].Handle);
      KingdomQuestWin::UpdateContentView(v2, nIndex);
      GameFrameWork::SetJoinHandle((GameFrameWork *)v2->m_pkFrameWork, v2->m_SelectedKQHandle);
      if ( (unsigned __int8)((int (*)(void))v2->m_pkKingdomQuestPlayerList->vfptr[65].__vecDelDtor)()
        || (unsigned __int8)((int (*)(void))v2->m_pkKingdomQuestTeamList->vfptr[65].__vecDelDtor)() )
      {
        v4 = 0;
        v5 = CKQ::Get(&v2->m_kKindomQuestData, v2->m_SelectedKQHandle);
        if ( v5 )
        {
          v6 = KQTeamTable::GetByID(v5->ID);
          if ( v6 )
            v4 = v6->KQTeamDivideType;
        }
        ((void (__stdcall *)(_DWORD))v2->m_pkKingdomQuestPlayerList->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkKingdomQuestTeamList->vfptr[64].__vecDelDtor)(0);
        SlideListWin::RemoveAllList(v2->m_pkKingdomQuestPlayerList->m_pkListWin);
        KingdomQuestTeamList::ReSetList(v2->m_pkKingdomQuestTeamList);
        KingdomQuestWin::OpenSideWin(v2, v4);
      }
    }
  }
}

//----- (005F3EE0) --------------------------------------------------------
void __thiscall KingdomQuestWin::SetKQuestStatus(KingdomQuestWin *this, PROTO_NC_KQ_STATUS_ACK *pkInfo)
{
  unsigned int v2; // edi@2
  char *v3; // edx@3
  char *v4; // eax@3

  if ( pkInfo )
  {
    this->m_kKQJoiner.Handle = pkInfo->Handle;
    this->m_kKQJoiner.nJoinCnt = pkInfo->NumOfJoiner;
    v2 = 0;
    if ( pkInfo->NumOfJoiner > 0u )
    {
      v3 = &this->m_kKQJoiner.kJoiner[0].n5_name[8];
      v4 = (char *)&pkInfo[2].Handle + 1;
      do
      {
        *((_DWORD *)v3 - 2) = *((_DWORD *)v4 - 2);
        *((_DWORD *)v3 - 1) = *((_DWORD *)v4 - 1);
        *(_DWORD *)v3 = *(_DWORD *)v4;
        *((_DWORD *)v3 + 1) = *((_DWORD *)v4 + 1);
        *((_DWORD *)v3 + 2) = *((_DWORD *)v4 + 2);
        ++v2;
        v4 += 20;
        v3 += 20;
      }
      while ( v2 < pkInfo->NumOfJoiner );
    }
    KingdomQuestWin::UpdateContentView(this, 0);
  }
}

//----- (005F3F50) --------------------------------------------------------
void __thiscall KingdomQuestWin::OnShowWin(KingdomQuestWin *this)
{
  KingdomQuestWin *v1; // esi@1
  PgFrameWork *v2; // eax@1
  Name5 *v3; // eax@4
  PROTO_AVATARINFORMATION *v4; // eax@4
  unsigned int v5; // eax@5
  char *v6; // eax@13

  v1 = this;
  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 && v2[140].m_BackFrameID == (void *)1 )
  {
    if ( v1->m_JoinHandle == -1 && (v3 = User::GetMainCharID(&g_kUser), (v4 = User::GetAvatarInfo(&g_kUser, v3)) != 0) )
      v5 = v4->nKQHandle;
    else
      v5 = v1->m_JoinHandle;
    KingdomQuestWin::UpdateContentView(v1, v5);
  }
  if ( unk_B25074 == 1 || unk_B25074 == 2 )
    KingdomQuestWin::SetView(v1, 0);
  else
    KingdomQuestWin::SetView(v1, 1);
  v1->m_bGetServerTime = 0;
  CNSTimer_Interval::ReSet(&v1->m_kTimerInterval, Timer::ms_fCurTime);
  KingdomQuestWin::UpdateAllList(v1);
  if ( v1->m_pkFrameWork[140].m_BackFrameID == (void *)1 )
  {
    v6 = (char *)TextData2::Get(0x83AED4A0);
  }
  else
  {
    SlideListWin::SetCurSelIndex(v1->m_pListWinTime, -1);
    v6 = (char *)TextData2::Get(0x88A89664);
  }
  PgWin::SetToolTipWinText((PgWin *)&v1->m_pkPlayerListBtn->vfptr, v6);
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (005F4020) --------------------------------------------------------
void __thiscall KingdomQuestWin::OnCommand(KingdomQuestWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 1u:
      KingdomQuestWin::OnWinClose(this);
      break;
    case 2u:
      KingdomQuestWin::OnSortByTitle(this);
      break;
    case 3u:
      KingdomQuestWin::OnSortByUsercnt(this);
      break;
    case 4u:
      KingdomQuestWin::OnSortByStarttime(this);
      break;
    case 5u:
      KingdomQuestWin::OnSortBYState(this);
      break;
    case 6u:
      KingdomQuestWin::OnOK(this);
      break;
    case 7u:
      KingdomQuestWin::OnCancel(this);
      break;
    case 8u:
      KingdomQuestWin::OnListClick(this, lParam);
      break;
    case 9u:
      KingdomQuestWin::OnListClick(this, lParam);
      break;
    case 0xAu:
      KingdomQuestWin::OnSlideBarTime(this);
      break;
    case 0xBu:
      KingdomQuestWin::OnSlideBarContent(this);
      break;
    case 0xCu:
      KingdomQuestWin::OnMyList(this);
      break;
    case 0xDu:
      KingdomQuestWin::OnAllList(this);
      break;
    case 0xEu:
      KingdomQuestWin::OnHelpLink();
      break;
    case 0xFu:
      KingdomQuestWin::OnPlayerList(this);
      break;
    default:
      return;
  }
}

//----- (005F4110) --------------------------------------------------------
char __thiscall KingdomQuestWin::Create(KingdomQuestWin *this, PgFrameWork *pkFrameWork)
{
  KingdomQuestWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiAVObject *v5; // eax@4
  NiTexturingProperty *v6; // eax@4
  NiTexturingProperty *v7; // edi@4
  NiTexturingProperty::Map *v8; // eax@6
  PgSprData *v9; // eax@9
  NiNode *v10; // esi@12
  char result; // al@16
  int v12; // edi@17
  int v13; // ebx@17
  NiSourceTexture *v14; // eax@17
  PgSprData *v15; // eax@18
  NiTexturingProperty *v16; // esi@21
  NiNode *v17; // esi@23
  PgFont *v18; // eax@27
  PgWinText *v19; // eax@27
  NiRefObjectVtbl *v20; // edx@27
  NiUnsharedGeometryGroup *v21; // eax@27
  PgSprData *v22; // eax@27
  PgWinSpr *v23; // eax@27
  PgSprData *v24; // eax@27
  PgWinSpr *v25; // eax@27
  SLWCreateInfo::Item *v26; // eax@27
  PgSprData *v27; // eax@41
  SlideListWin *v28; // eax@41
  SLWCreateInfo::Item *v29; // eax@41
  PgSprData *v30; // eax@47
  SlideListWin *v31; // eax@47
  PgWinText *v32; // eax@47
  SlideBar *v33; // eax@47
  NiRefObjectVtbl *v34; // eax@47
  PgWinBut *v35; // ecx@47
  int (*v36)(void); // eax@47
  int v37; // eax@47
  int v38; // eax@47
  NiObjectNET *v39; // eax@47
  NiObjectNET *v40; // eax@47
  NiObjectNET *v41; // eax@47
  NiObjectNET *v42; // eax@47
  NiObjectNET *v43; // eax@47
  NiObjectNET *v44; // eax@47
  SlideBar *v45; // eax@47
  PgWinBut *v46; // eax@47
  NiSourceTexture *v47; // ecx@47
  int (*v48)(void); // eax@47
  int v49; // eax@47
  int v50; // eax@47
  int v51; // eax@47
  PgWinBut *v52; // edx@47
  PgFont *v53; // eax@47
  PgWinText *v54; // eax@47
  NiRefObjectVtbl *v55; // edx@47
  NiUnsharedGeometryGroup *v56; // eax@47
  int v57; // eax@47
  PgWinBut *v58; // edx@47
  PgFont *v59; // eax@47
  PgWinText *v60; // eax@47
  NiRefObjectVtbl *v61; // edx@47
  NiUnsharedGeometryGroup *v62; // eax@47
  int v63; // eax@47
  PgWinBut *v64; // edx@47
  PgFont *v65; // eax@47
  PgWinText *v66; // eax@47
  NiRefObjectVtbl *v67; // edx@47
  NiUnsharedGeometryGroup *v68; // eax@47
  int v69; // eax@47
  PgWinBut *v70; // edx@47
  PgFont *v71; // eax@47
  PgWinText *v72; // eax@47
  NiRefObjectVtbl *v73; // edx@47
  NiUnsharedGeometryGroup *v74; // eax@47
  PgWinBut *v75; // eax@47
  PgWinText *v76; // edx@47
  int v77; // eax@47
  PgWinBut *v78; // edx@47
  PgFont *v79; // eax@47
  PgWinText *v80; // eax@47
  NiUnsharedGeometryGroup *v81; // eax@47
  PgWinText *v82; // eax@47
  PgWinBut *v83; // eax@47
  PgWinText *v84; // ecx@47
  int v85; // eax@47
  PgWinBut *v86; // edx@47
  PgFont *v87; // eax@47
  PgWinText *v88; // eax@47
  D3DXCOLOR *v89; // eax@47
  NiUnsharedGeometryGroup *v90; // eax@47
  PgWinText *v91; // eax@47
  PgWinBut *v92; // eax@47
  PgWinText *v93; // ecx@47
  int v94; // eax@47
  PgWinBut *v95; // edx@47
  PgFont *v96; // eax@47
  PgWinText *v97; // eax@47
  NiUnsharedGeometryGroup *v98; // eax@47
  PgWinBut *v99; // eax@47
  PgWinText *v100; // ecx@47
  int v101; // eax@47
  PgWinBut *v102; // edx@47
  PgFont *v103; // eax@47
  PgWinText *v104; // eax@47
  NiUnsharedGeometryGroup *v105; // eax@47
  NiSourceTexture *v106; // eax@47
  NiRefObjectVtbl *v107; // edx@47
  char *v108; // eax@49
  PgWinBut *v109; // ecx@49
  PgWinText *v110; // edx@49
  int v111; // eax@49
  NiSourceTexture *v112; // edx@49
  PgWinBut *v113; // eax@49
  PgWin *v114; // STD8_4@49
  PgFont *v115; // eax@49
  PgWinText *v116; // eax@49
  NiRefObjectVtbl *v117; // edx@49
  NiUnsharedGeometryGroup *v118; // eax@49
  KingdomQuestPlayerList *v119; // eax@51
  KingdomQuestTeamList *v120; // eax@53
  KingdomQuestTeamList *v121; // ecx@53
  void *(__thiscall *v122)(NiRefObject *, unsigned int); // eax@53
  PgSprData *v123; // eax@53
  PgSprData::PgHitTester *v124; // eax@53
  NiSourceTexture *v125; // ecx@53
  PgWinBut *v126; // edx@53
  PgFont *v127; // eax@53
  PgWinText *v128; // eax@53
  PgWinText *v129; // ecx@53
  void *(__thiscall *v130)(NiRefObject *, unsigned int); // eax@53
  NiRefObjectVtbl *v131; // edi@53
  NiUnsharedGeometryGroup *v132; // eax@53
  NiTexturingProperty *v133; // edi@53
  NiNode *v134; // edi@55
  NiNode *v135; // [sp+E4h] [bp-80h]@49
  PgWin *v136; // [sp+E8h] [bp-7Ch]@49
  unsigned int uiWidth; // [sp+F4h] [bp-70h]@20
  unsigned int uiHeight; // [sp+F8h] [bp-6Ch]@20
  SLWCreateInfo kCreateInfo; // [sp+FCh] [bp-68h]@27
  NiPointer<NiTexturingProperty> spTexProp; // [sp+118h] [bp-4Ch]@4
  NiSourceTexture *pkTexture; // [sp+11Ch] [bp-48h]@7
  PgWinBut *pkButWin; // [sp+120h] [bp-44h]@1
  NiSourceTexture *pkTexture8; // [sp+124h] [bp-40h]@47
  int uiTop; // [sp+128h] [bp-3Ch]@9
  int uiLeft; // [sp+12Ch] [bp-38h]@9
  NiPointer<NiNode> spNode; // [sp+130h] [bp-34h]@1
  PgWinText *pkTextWin; // [sp+134h] [bp-30h]@27
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+138h] [bp-2Ch]@27
  int v149; // [sp+160h] [bp-4h]@1

  v2 = this;
  pkButWin = (PgWinBut *)pkFrameWork;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v149 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\NPCKDQuest.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Panel01");
  v6 = (NiTexturingProperty *)NiAVObject::GetProperty(v5, 8);
  v7 = v6;
  spTexProp.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v8 = *v7->m_kMaps.m_pBase;
  LOBYTE(v149) = 1;
  if ( v8 )
    pkTexture = (NiSourceTexture *)v8->m_spTexture.m_pObject;
  else
    pkTexture = 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, pkTexture);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, (PgFrameWork *)pkButWin, "KingdomQuestWin", 0) )
  {
    LOBYTE(v149) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v10 = spNode.m_pObject;
    v149 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
    return 0;
  }
  v12 = uiLeft;
  v13 = uiTop;
  v14 = MenuTexMgr::GetTexture(0x13u);
  if ( v14 )
    v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v14);
  else
    v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v15, (PgWin *)&v2->vfptr, 0, 0);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v18 = Font::Get(MAIN_MENU);
    v19 = PgWinText::CreateWin(uiLeft - v12, uiTop - v13, uiWidth, uiHeight, v18, (PgWin *)&v2->vfptr, 0, 0);
    v20 = v19->vfptr;
    pkTextWin = v19;
    v20[122].__vecDelDtor((NiRefObject *)v19, 1u);
    ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
    pkButWin = (PgWinBut *)&pkTextWin->vfptr[118];
    v21 = TextData::Get(0x94ABFCF8);
    ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkButWin->vfptr)(pkTextWin, v21);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
    v23 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v22, (PgWin *)&v2->vfptr, 0, 0);
    v23->vfptr[60].__vecDelDtor((NiRefObject *)v23, 1u);
    v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, pkTexture);
    v25 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v24, (PgWin *)&v2->vfptr, 0, 0);
    v25->vfptr[60].__vecDelDtor((NiRefObject *)v25, 0);
    kCreateInfo.m_arrItem._Myfirst = 0;
    kCreateInfo.m_arrItem._Mylast = 0;
    kCreateInfo.m_arrItem._Myend = 0;
    kCreateInfo.m_bMakeData = 0;
    kCreateInfo.m_nOffX = 0;
    kCreateInfo.m_nOffY = 0;
    LOBYTE(v149) = 2;
    v26 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
    v26->nItemType = 1;
    v26->pNode = spNode.m_pObject;
    pkTextWin = (PgWinText *)v26;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarNor", 0xCu);
    LOBYTE(v149) = 3;
    pkTextWin = (PgWinText *)((char *)pkTextWin + 72);
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkTextWin,
      &_Val);
    LOBYTE(v149) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarClick", 0xEu);
    LOBYTE(v149) = 4;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkTextWin,
      &_Val);
    LOBYTE(v149) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarOver", 0xDu);
    LOBYTE(v149) = 5;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkTextWin,
      &_Val);
    LOBYTE(v149) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    pkTextWin->vfptr = (NiRefObjectVtbl *)2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column01", 8u);
    LOBYTE(v149) = 6;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
      &_Val);
    LOBYTE(v149) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
    pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    pkTextWin->vfptr = (NiRefObjectVtbl *)2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column02", 8u);
    LOBYTE(v149) = 7;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
      &_Val);
    LOBYTE(v149) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
    pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    pkTextWin->vfptr = (NiRefObjectVtbl *)2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column03", 8u);
    LOBYTE(v149) = 8;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
      &_Val);
    LOBYTE(v149) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
    pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    pkTextWin->vfptr = (NiRefObjectVtbl *)2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column04", 8u);
    LOBYTE(v149) = 9;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
      &_Val);
    LOBYTE(v149) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
    SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
    v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SubText01", &uiLeft, &uiTop, pkTexture);
    v28 = SlideListWin::CreateWin(uiLeft - v12, uiTop - v13, v27, (PgWin *)&v2->vfptr, &kCreateInfo, 3u, 0);
    v2->m_pListWinTime = v28;
    v28->m_uiRClickMsg = 8;
    v2->m_pListWinTime->m_uiLClickMsg = 9;
    SLWCreateInfo::Clear(&kCreateInfo);
    v29 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
    v29->nItemType = 1;
    v29->pNode = spNode.m_pObject;
    pkTextWin = (PgWinText *)v29;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarNor01", 0xEu);
    LOBYTE(v149) = 10;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
      &_Val);
    LOBYTE(v149) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    pkTextWin->vfptr = (NiRefObjectVtbl *)2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column05", 8u);
    LOBYTE(v149) = 11;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
      &_Val);
    LOBYTE(v149) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
    pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    pkTextWin->vfptr = (NiRefObjectVtbl *)2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column06", 8u);
    LOBYTE(v149) = 12;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
      &_Val);
    LOBYTE(v149) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
    SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
    v30 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SubText02", &uiLeft, &uiTop, pkTexture);
    v31 = SlideListWin::CreateWin(uiLeft - v12, uiTop - v13, v30, (PgWin *)&v2->vfptr, &kCreateInfo, 4u, 0);
    v2->m_pListWinContent = v31;
    SlideListWin::AlignText(v31, 4u);
    SlideListWin::UpdateViewList(v2->m_pListWinContent);
    v32 = (PgWinText *)PgSprData::Create(
                         (NiAVObject *)&spNode.m_pObject->vfptr,
                         "SlideBar_SlideBtnMiddle",
                         &uiLeft,
                         &uiTop,
                         pkTexture);
    pkTextWin = v32;
    v33 = SlideBar::CreateWin(
            spNode.m_pObject,
            "SlideBar",
            "SlideBar_UpBtn",
            "SlideBar_DnBtn",
            (PgSprData *)v32,
            0,
            (PgWin *)&v2->vfptr);
    v2->m_pSlideBarTimeEx = v33;
    v33->m_uiClickMsg = 10;
    v2->m_pSlideBarTimeEx->m_eType = 1;
    v34 = v2->m_pSlideBarTimeEx->vfptr;
    v35 = (PgWinBut *)v2->m_pSlideBarTimeEx;
    pkTexture8 = (NiSourceTexture *)v34;
    v36 = (int (*)(void))v34[42].__vecDelDtor;
    pkButWin = v35;
    v37 = v36();
    v38 = ((int (__stdcall *)(int))pkButWin->vfptr[41].__vecDelDtor)(v37);
    ((void (__thiscall *)(SlideBar *, int))pkTexture8[4].m_kFormatPrefs.m_eMipMapped)(v2->m_pSlideBarTimeEx, v38);
    v39 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnNor01");
    NiObjectNET::SetName(v39, "SlideBar_DnBtn01Nor");
    v40 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnClick01");
    NiObjectNET::SetName(v40, "SlideBar_DnBtn01Click");
    v41 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnOver01");
    NiObjectNET::SetName(v41, "SlideBar_DnBtn01Over");
    v42 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnNor01");
    NiObjectNET::SetName(v42, "SlideBar_UpBtn01Nor");
    v43 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnClick01");
    NiObjectNET::SetName(v43, "SlideBar_UpBtn01Click");
    v44 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnOver01");
    NiObjectNET::SetName(v44, "SlideBar_UpBtn01Over");
    v45 = SlideBar::CreateWin(
            spNode.m_pObject,
            "SlideBar01",
            "SlideBar_UpBtn01",
            "SlideBar_DnBtn01",
            (PgSprData *)pkTextWin,
            0,
            (PgWin *)&v2->vfptr);
    v2->m_pSlideBarContentEx = v45;
    v45->m_uiClickMsg = 11;
    v2->m_pSlideBarContentEx->m_eType = 1;
    v46 = (PgWinBut *)v2->m_pSlideBarContentEx->vfptr;
    v47 = (NiSourceTexture *)v2->m_pSlideBarContentEx;
    pkButWin = v46;
    v48 = (int (*)(void))v46->m_kPropertyList.m_kAllocator.m_uiCount;
    pkTexture8 = v47;
    v49 = v48();
    v50 = ((int (__stdcall *)(int))pkTexture8->vfptr[41].__vecDelDtor)(v49);
    ((void (__thiscall *)(SlideBar *, int))pkButWin->m_eButShow)(v2->m_pSlideBarContentEx, v50);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "Title01Nor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title01Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title01Over");
    PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 2u, 0, 0);
    v51 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
    v52 = *(PgWinBut **)(v51 + 20);
    pkTexture8 = *(NiSourceTexture **)(v51 + 24);
    pkButWin = v52;
    v53 = Font::Get(MAIN_MENU);
    v54 = PgWinText::CreateWin(
            uiLeft - v12,
            uiTop - v13 + 1,
            (unsigned int)pkButWin,
            (unsigned int)pkTexture8,
            v53,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v55 = v54->vfptr;
    pkTextWin = v54;
    v55[122].__vecDelDtor((NiRefObject *)v54, 5u);
    pkTexture8 = (NiSourceTexture *)&pkTextWin->vfptr[118];
    v56 = TextData::Get(0x94F8F4F9);
    ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkTexture8->vfptr)(pkTextWin, v56);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "Title02Nor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title02Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title02Over");
    PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 3u, 0, 0);
    v57 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
    v58 = *(PgWinBut **)(v57 + 20);
    pkTexture8 = *(NiSourceTexture **)(v57 + 24);
    pkButWin = v58;
    v59 = Font::Get(MAIN_MENU);
    v60 = PgWinText::CreateWin(
            uiLeft - v12,
            uiTop - v13 + 1,
            (unsigned int)pkButWin,
            (unsigned int)pkTexture8,
            v59,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v61 = v60->vfptr;
    pkTextWin = v60;
    v61[122].__vecDelDtor((NiRefObject *)v60, 5u);
    pkTexture8 = (NiSourceTexture *)&pkTextWin->vfptr[118];
    v62 = TextData::Get(0xCE1D3A35);
    ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkTexture8->vfptr)(pkTextWin, v62);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "Title03Nor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title03Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title03Over");
    PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 4u, 0, 0);
    v63 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
    v64 = *(PgWinBut **)(v63 + 20);
    pkTexture8 = *(NiSourceTexture **)(v63 + 24);
    pkButWin = v64;
    v65 = Font::Get(MAIN_MENU);
    v66 = PgWinText::CreateWin(
            uiLeft - v12,
            uiTop - v13 + 1,
            (unsigned int)pkButWin,
            (unsigned int)pkTexture8,
            v65,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v67 = v66->vfptr;
    pkTextWin = v66;
    v67[122].__vecDelDtor((NiRefObject *)v66, 5u);
    pkTexture8 = (NiSourceTexture *)&pkTextWin->vfptr[118];
    v68 = TextData::Get(0x75948EF3u);
    ((void (__thiscall *)(_DWORD, _DWORD))pkTexture8->vfptr)(pkTextWin, v68);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "Title04Nor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title04Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title04Over");
    PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 5u, 0, 0);
    v69 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
    v70 = *(PgWinBut **)(v69 + 20);
    pkTexture8 = *(NiSourceTexture **)(v69 + 24);
    pkButWin = v70;
    v71 = Font::Get(MAIN_MENU);
    v72 = PgWinText::CreateWin(
            uiLeft - v12,
            uiTop - v13 + 1,
            (unsigned int)pkButWin,
            (unsigned int)pkTexture8,
            v71,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v73 = v72->vfptr;
    pkTextWin = v72;
    v73[122].__vecDelDtor((NiRefObject *)v72, 5u);
    pkTexture8 = (NiSourceTexture *)&pkTextWin->vfptr[118];
    v74 = TextData::Get(0xF207FCE6);
    ((void (__thiscall *)(_DWORD, _DWORD))pkTexture8->vfptr)(pkTextWin, v74);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "OkNor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "OkClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "OkOver");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "OkDisable");
    v75 = PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 6u, 0, 0);
    v76 = pkTextWin;
    v2->m_pJoinOk = v75;
    v77 = *(_DWORD *)LODWORD(v76->m_kWorldBound.m_kCenter.x);
    v78 = *(PgWinBut **)(v77 + 20);
    pkTexture8 = *(NiSourceTexture **)(v77 + 24);
    pkButWin = v78;
    v79 = Font::Get(MAIN_MENU);
    v80 = PgWinText::CreateWin(
            uiLeft - v12,
            uiTop - v13 + 1,
            (unsigned int)pkButWin,
            (unsigned int)pkTexture8,
            v79,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v2->m_pTexJoinOk = v80;
    v80->vfptr[122].__vecDelDtor((NiRefObject *)v80, 5u);
    pkTexture8 = (NiSourceTexture *)&v2->m_pTexJoinOk->vfptr[118];
    v81 = TextData::Get(0x8B779780);
    ((void (__thiscall *)(_DWORD, _DWORD))pkTexture8->vfptr)(v2->m_pTexJoinOk, v81);
    ((void (__stdcall *)(_DWORD))v2->m_pTexJoinOk->vfptr[60].__vecDelDtor)(0);
    v82 = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab01", &uiLeft, &uiTop, pkTexture);
    pkTextWin = v82;
    v83 = PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)v82, (PgWin *)&v2->vfptr, 0xCu, 0, 0);
    v84 = pkTextWin;
    v2->m_pMyList = v83;
    v85 = *(_DWORD *)LODWORD(v84->m_kWorldBound.m_kCenter.x);
    v86 = *(PgWinBut **)(v85 + 20);
    pkTexture8 = *(NiSourceTexture **)(v85 + 24);
    pkButWin = v86;
    v87 = Font::Get(MAIN_MENU);
    v88 = PgWinText::CreateWin(
            uiLeft - v12,
            uiTop - v13 + 1,
            (unsigned int)pkButWin,
            (unsigned int)pkTexture8,
            v87,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v2->m_pTexMyList = v88;
    v88->vfptr[122].__vecDelDtor((NiRefObject *)v88, 5u);
    pkTexture8 = (NiSourceTexture *)&v2->m_pTexMyList->vfptr[117];
    v89 = Color::GetDxColor((D3DXCOLOR *)&_Val._Bx._Alias[12], -1, -1, 0, -1);
    ((void (__thiscall *)(PgWinText *, D3DXCOLOR *))pkTexture8->vfptr)(v2->m_pTexMyList, v89);
    pkTexture8 = (NiSourceTexture *)&v2->m_pTexMyList->vfptr[118];
    v90 = TextData::Get(0xF7F5F458);
    ((void (__thiscall *)(_DWORD, _DWORD))pkTexture8->vfptr)(v2->m_pTexMyList, v90);
    ((void (__stdcall *)(_DWORD))v2->m_pTexMyList->vfptr[60].__vecDelDtor)(0);
    v91 = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab02", &uiLeft, &uiTop, pkTexture);
    pkTextWin = v91;
    v92 = PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)v91, (PgWin *)&v2->vfptr, 0xDu, 0, 0);
    v93 = pkTextWin;
    v2->m_pAllList = v92;
    v94 = *(_DWORD *)LODWORD(v93->m_kWorldBound.m_kCenter.x);
    v95 = *(PgWinBut **)(v94 + 20);
    pkTexture8 = *(NiSourceTexture **)(v94 + 24);
    pkButWin = v95;
    v96 = Font::Get(MAIN_MENU);
    v97 = PgWinText::CreateWin(
            uiLeft - v12,
            uiTop - v13 + 1,
            (unsigned int)pkButWin,
            (unsigned int)pkTexture8,
            v96,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v2->m_pTexAllList = v97;
    v97->vfptr[122].__vecDelDtor((NiRefObject *)v97, 5u);
    pkTexture8 = (NiSourceTexture *)&v2->m_pTexAllList->vfptr[118];
    v98 = TextData::Get(0xE0EC5B44);
    ((void (__thiscall *)(_DWORD, _DWORD))pkTexture8->vfptr)(v2->m_pTexAllList, v98);
    ((void (__stdcall *)(_DWORD))v2->m_pTexAllList->vfptr[60].__vecDelDtor)(0);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "CancelBtnNor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "OkClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "OkOver");
    v99 = PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 7u, 0, 0);
    v100 = pkTextWin;
    v2->m_pJoinCancel = v99;
    v101 = *(_DWORD *)LODWORD(v100->m_kWorldBound.m_kCenter.x);
    v102 = *(PgWinBut **)(v101 + 20);
    pkTexture8 = *(NiSourceTexture **)(v101 + 24);
    pkButWin = v102;
    v103 = Font::Get(MAIN_MENU);
    v104 = PgWinText::CreateWin(
             uiLeft - v12,
             uiTop - v13 + 1,
             (unsigned int)pkButWin,
             (unsigned int)pkTexture8,
             v103,
             (PgWin *)&v2->vfptr,
             0,
             0);
    v2->m_pTexJoinCancel = v104;
    v104->vfptr[122].__vecDelDtor((NiRefObject *)v104, 5u);
    pkTexture8 = (NiSourceTexture *)&v2->m_pTexJoinCancel->vfptr[118];
    v105 = TextData::Get(0x213635A0u);
    ((void (__thiscall *)(_DWORD, _DWORD))pkTexture8->vfptr)(v2->m_pTexJoinCancel, v105);
    ((void (__stdcall *)(_DWORD))v2->m_pTexJoinCancel->vfptr[60].__vecDelDtor)(0);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "ClsNor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
    PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 1u, 0, 0);
    v106 = MenuTexMgr::GetTexture(4u);
    v107 = spNode.m_pObject->vfptr;
    pkTexture8 = v106;
    if ( ((int (__stdcall *)(const char *))v107[18].__vecDelDtor)("HelpLinkNor") )
    {
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "HelpLinkNor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture8);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
      PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xEu, 0, 0);
    }
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "PlayerListBtnNor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "PlayerListBtnClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "PlayerListBtnOver");
    pkButWin = PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xFu, 0, 0);
    pkButWin->m_pkToolTipWin = g_pkToolTipWin;
    v108 = (char *)TextData2::Get(0x83AED4A0);
    PgWin::SetToolTipWinText((PgWin *)&pkButWin->vfptr, v108);
    v109 = pkButWin;
    v110 = pkTextWin;
    v2->m_pkPlayerListBtn = pkButWin;
    v111 = *(_DWORD *)LODWORD(v110->m_kWorldBound.m_kCenter.x);
    v112 = *(NiSourceTexture **)(v111 + 24);
    v113 = *(PgWinBut **)(v111 + 20);
    v114 = (PgWin *)v109;
    pkTexture8 = v112;
    pkButWin = v113;
    v115 = Font::Get(MAIN_MENU);
    v116 = PgWinText::CreateWin(0, 0, (unsigned int)pkButWin, (unsigned int)pkTexture8, v115, v114, 0, 0);
    v117 = v116->vfptr;
    pkTextWin = v116;
    ((void (__thiscall *)(PgWinText *, signed int, NiNode *, PgWin *))v117[122].__vecDelDtor)(v116, 5, v135, v136);
    pkTexture8 = (NiSourceTexture *)&pkTextWin->vfptr[118];
    v118 = TextData2::Get(0xB444334E);
    ((void (__thiscall *)(_DWORD, _DWORD))pkTexture8->vfptr)(pkTextWin, v118);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v136 = (PgWin *)v2;
    v135 = spNode.m_pObject;
    pkTexture8 = (NiSourceTexture *)&v135;
    if ( spNode.m_pObject )
      InterlockedIncrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
    v119 = KingdomQuestPlayerList::CreateWin((NiPointer<NiNode>)v135, v136);
    v2->m_pkKingdomQuestPlayerList = v119;
    v119->vfptr[64].__vecDelDtor((NiRefObject *)v119, 0);
    v136 = (PgWin *)v2;
    v135 = spNode.m_pObject;
    pkTexture8 = (NiSourceTexture *)&v135;
    if ( spNode.m_pObject )
      InterlockedIncrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
    v120 = KingdomQuestTeamList::CreateWin((NiPointer<NiNode>)v135, v136);
    v2->m_pkKingdomQuestTeamList = v120;
    v121 = v120;
    v122 = v120->vfptr[64].__vecDelDtor;
    v136 = 0;
    ((void (__thiscall *)(KingdomQuestTeamList *))v122)(v121);
    v123 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "panel02", &uiLeft, &uiTop, pkTexture);
    PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v123, (PgWin *)&v2->vfptr, 0, 0);
    v124 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Time", &uiLeft, &uiTop, pkTexture)->m_akHitTester.m_pBase->m_pObject;
    v125 = (NiSourceTexture *)v124->m_uiHeight;
    v126 = (PgWinBut *)v124->m_uiWidth;
    v135 = 0;
    pkTexture8 = v125;
    pkButWin = v126;
    v127 = Font::Get(MAIN_MENU);
    v128 = PgWinText::CreateWin(
             uiLeft - v12,
             uiTop - v13 + 1,
             (unsigned int)pkButWin,
             (unsigned int)pkTexture8,
             v127,
             (PgWin *)&v2->vfptr,
             0,
             (unsigned int)v135);
    v2->m_pkKQPresentTimeWin = v128;
    v129 = v128;
    v130 = v128->vfptr[122].__vecDelDtor;
    v135 = (NiNode *)5;
    ((void (__thiscall *)(PgWinText *))v130)(v129);
    v131 = v2->m_pkKQPresentTimeWin->vfptr;
    v132 = TextData::Get(0x8B779780);
    v131[118].__vecDelDtor((NiRefObject *)v2->m_pkKQPresentTimeWin, (unsigned int)v132);
    ((void (__stdcall *)(D3DXCOLOR *))v2->m_pkKQPresentTimeWin->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
    ((void (__stdcall *)(void *))v2->m_pkKQPresentTimeWin->vfptr[118].__vecDelDtor)(&unk_9B1DCE);
    ((void (__thiscall *)(KingdomQuestWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.0,
      0.5);
    CNSTimer_Interval::ReSet(&v2->m_kTimerInterval, Timer::ms_fCurTime);
    v2->m_kTimerInterval.m_fCheckTime = 6.0;
    LOBYTE(v149) = 1;
    SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
    v133 = spTexProp.m_pObject;
    LOBYTE(v149) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
      v133->vfptr->__vecDelDtor((NiRefObject *)v133, 1u);
    v134 = spNode.m_pObject;
    v149 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v134 )
      v134->vfptr->__vecDelDtor((NiRefObject *)v134, 1u);
    result = 1;
  }
  else
  {
    v16 = spTexProp.m_pObject;
    LOBYTE(v149) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
      v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
    v17 = spNode.m_pObject;
    v149 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v17 )
      return 0;
    v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (005F55F0) --------------------------------------------------------
char __thiscall KingdomQuestPlayerList::Create(KingdomQuestPlayerList *this, NiPointer<NiNode> spNode, PgWin *pkParent)
{
  PgWin *v3; // edi@1
  KingdomQuestPlayerList *v4; // esi@1
  void *(__thiscall *v5)(NiRefObject *, unsigned int); // edx@1
  int v6; // ebx@1
  const char *v7; // eax@3
  PgSprData *v8; // eax@4
  NiNode *v9; // esi@5
  char result; // al@9
  int v11; // edi@10
  void *(__thiscall *v12)(NiRefObject *, unsigned int); // edx@10
  PgSprData *v13; // ebx@10
  PgSprData *v14; // ebx@10
  PgWinBut *v15; // edi@10
  char *v16; // eax@10
  PgSprData::PgHitTester *v17; // eax@10
  unsigned int v18; // ebx@10
  PgFont *v19; // eax@10
  PgWinText *v20; // ebx@10
  NiRefObjectVtbl *v21; // edi@10
  NiUnsharedGeometryGroup *v22; // eax@10
  NiUnsharedGeometryGroup *v23; // eax@10
  NiUnsharedGeometryGroup *v24; // eax@10
  NiUnsharedGeometryGroup *v25; // eax@10
  signed int v26; // ebx@10
  NiNode *v27; // edi@11
  const char *v28; // eax@11
  PgSprData *v29; // edi@11
  const char *v30; // eax@11
  const char *v31; // eax@11
  PgWinBut *v32; // eax@11
  void *(__thiscall *v33)(NiRefObject *, unsigned int); // edx@11
  PgSprData::PgHitTester *v34; // eax@11
  unsigned int v35; // edi@11
  unsigned int v36; // ST40_4@11
  PgFont *v37; // eax@11
  PgWinText *v38; // edi@11
  unsigned int v39; // eax@11
  SLWCreateInfo::Item *v40; // edi@14
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *v41; // edi@14
  SLWCreateInfo::Item *v42; // edi@20
  SLWCreateInfo::Item *v43; // edi@22
  SLWCreateInfo::Item *v44; // edi@24
  PgSprData *v45; // eax@26
  SlideListWin *v46; // eax@26
  NiObjectNET *v47; // eax@26
  NiObjectNET *v48; // eax@26
  NiObjectNET *v49; // eax@26
  NiObjectNET *v50; // eax@26
  NiObjectNET *v51; // eax@26
  NiObjectNET *v52; // eax@26
  PgSprData *v53; // eax@26
  SlideBar *v54; // eax@26
  SlideBar *v55; // eax@26
  NiRefObjectVtbl *v56; // ebx@26
  SlideBar *v57; // edi@26
  int v58; // eax@26
  int v59; // eax@26
  int v60; // edi@26
  NiNode *v61; // esi@29
  PgFont *v62; // eax@34
  PgWinText *v63; // eax@34
  NiNode *v64; // esi@36
  unsigned int uiHeight; // [sp+14h] [bp-BCh]@26
  SLWCreateInfo kCreateInfo; // [sp+18h] [bp-B8h]@14
  unsigned int uiWidth; // [sp+34h] [bp-9Ch]@26
  int iOffX; // [sp+38h] [bp-98h]@1
  unsigned int v69; // [sp+3Ch] [bp-94h]@10
  PgWinBut *pkBtnWin; // [sp+40h] [bp-90h]@11
  int iOffY; // [sp+44h] [bp-8Ch]@1
  int uiTop; // [sp+48h] [bp-88h]@4
  int uiLeft; // [sp+4Ch] [bp-84h]@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+50h] [bp-80h]@14
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kTitleString[3]; // [sp+6Ch] [bp-64h]@10
  int v76; // [sp+CCh] [bp-4h]@1

  v3 = pkParent;
  v4 = this;
  v5 = pkParent->vfptr[41].__vecDelDtor;
  v76 = 0;
  v6 = ((int (__thiscall *)(PgWin *))v5)(pkParent);
  iOffY = ((int (__thiscall *)(PgWin *))v3->vfptr[42].__vecDelDtor)(v3);
  iOffX = (int)pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v7 = Folder::Merge(&Folder::m_acMenu, "Game\\NPCKDQuest_TeamNone.nif");
  PgUtil::LoadNodeNifFile(v7, &spNode, (NiTexturePalette *)iOffX);
  if ( !spNode.m_pObject )
    return 0;
  v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel03", &uiLeft, &uiTop, 0);
  if ( !PgWinSpr::Create((PgWinSpr *)&v4->vfptr, uiLeft - v6, uiTop - iOffY, v8, v3, 0, 0) )
  {
    v9 = spNode.m_pObject;
    v76 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v9 )
        v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    }
    return 0;
  }
  v11 = ((int (__thiscall *)(KingdomQuestPlayerList *))v4->vfptr[41].__vecDelDtor)(v4);
  v12 = v4->vfptr[42].__vecDelDtor;
  iOffX = v11;
  iOffY = ((int (__thiscall *)(KingdomQuestPlayerList *))v12)(v4);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor01", &uiLeft, &uiTop, 0);
  PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick01");
  PgSprData::Add(v13, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver01");
  PgWinBut::CreateWin(uiLeft - v11, uiTop - iOffY, v13, (PgWin *)&v4->vfptr, 0, 0, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick");
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver");
  v15 = PgWinBut::CreateWin(uiLeft - v11, uiTop - iOffY, v14, (PgWin *)&v4->vfptr, 2u, 0, 0);
  v15->m_pkToolTipWin = g_pkToolTipWin;
  v16 = (char *)TextData2::Get(0x283CA263u);
  PgWin::SetToolTipWinText((PgWin *)&v15->vfptr, v16);
  v17 = v14->m_akHitTester.m_pBase->m_pObject;
  v18 = v17->m_uiHeight;
  v69 = v17->m_uiWidth;
  v19 = Font::Get(MAIN_MENU);
  v20 = PgWinText::CreateWin(0, 0, v69, v18, v19, (PgWin *)&v15->vfptr, 0, 0);
  v20->vfptr[122].__vecDelDtor((NiRefObject *)v20, 5u);
  v21 = v20->vfptr;
  v22 = TextData2::Get(0x8332EB1u);
  v21[118].__vecDelDtor((NiRefObject *)v20, (unsigned int)v22);
  v20->vfptr[60].__vecDelDtor((NiRefObject *)v20, 0);
  v23 = TextData::Get(0x98A49F99);
  kTitleString[0]._Myres = 15;
  kTitleString[0]._Mysize = 0;
  kTitleString[0]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    kTitleString,
    (const char *)v23,
    strlen((const char *)v23));
  LOBYTE(v76) = 1;
  v24 = TextData::Get(0x96B28AA0);
  kTitleString[1]._Myres = 15;
  kTitleString[1]._Mysize = 0;
  kTitleString[1]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &kTitleString[1],
    (const char *)v24,
    strlen((const char *)v24));
  LOBYTE(v76) = 2;
  v25 = TextData::Get(0x4EA49695u);
  kTitleString[2]._Myres = 15;
  kTitleString[2]._Mysize = 0;
  kTitleString[2]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &kTitleString[2],
    (const char *)v25,
    strlen((const char *)v25));
  LOBYTE(v76) = 3;
  v26 = 5;
  v69 = (unsigned int)kTitleString;
  do
  {
    v27 = spNode.m_pObject;
    v28 = fs("Title%02dNor", v26);
    v29 = PgSprData::Create((NiAVObject *)&v27->vfptr, v28, &uiLeft, &uiTop, 0);
    pkBtnWin = (PgWinBut *)spNode.m_pObject;
    v30 = fs("Title%02dClick", v26);
    PgSprData::Add(v29, (NiAVObject *)&pkBtnWin->vfptr, v30);
    pkBtnWin = (PgWinBut *)spNode.m_pObject;
    v31 = fs("Title%02dOver", v26);
    PgSprData::Add(v29, (NiAVObject *)&pkBtnWin->vfptr, v31);
    v32 = PgWinBut::CreateWin(uiLeft - iOffX, uiTop - iOffY, v29, (PgWin *)&v4->vfptr, 3u, 0, 0);
    v33 = v32->vfptr[130].__vecDelDtor;
    pkBtnWin = v32;
    v33((NiRefObject *)&v32->vfptr, v26 - 5);
    v34 = v29->m_akHitTester.m_pBase->m_pObject;
    v35 = v34->m_uiHeight;
    v36 = v34->m_uiWidth;
    v37 = Font::Get(MAIN_MENU);
    v38 = PgWinText::CreateWin(0, 0, v36, v35, v37, (PgWin *)&pkBtnWin->vfptr, 0, 0);
    v38->vfptr[122].__vecDelDtor((NiRefObject *)v38, 5u);
    v39 = v69;
    if ( *(_DWORD *)(v69 + 20) >= 0x10u )
      v39 = *(_DWORD *)v69;
    v38->vfptr[118].__vecDelDtor((NiRefObject *)v38, v39);
    v38->vfptr[60].__vecDelDtor((NiRefObject *)v38, 0);
    v69 += 28;
    ++v26;
  }
  while ( (unsigned int)(v26 - 5) < 3 );
  kCreateInfo.m_arrItem._Myfirst = 0;
  kCreateInfo.m_arrItem._Mylast = 0;
  kCreateInfo.m_arrItem._Myend = 0;
  LOBYTE(v76) = 4;
  kCreateInfo.m_bMakeData = 0;
  kCreateInfo.m_nOffX = 0;
  kCreateInfo.m_nOffY = 0;
  v40 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
  v40->nItemType = 1;
  v40->pNode = spNode.m_pObject;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarNor02", 0xEu);
  v41 = &v40->vecNodeName;
  LOBYTE(v76) = 5;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v41,
    &_Val);
  LOBYTE(v76) = 4;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarClick02", 0x10u);
  LOBYTE(v76) = 6;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v41,
    &_Val);
  LOBYTE(v76) = 4;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarOver02", 0xFu);
  LOBYTE(v76) = 7;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v41,
    &_Val);
  LOBYTE(v76) = 4;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v42 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  v42->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column09", 8u);
  LOBYTE(v76) = 8;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &v42->vecNodeName,
    &_Val);
  LOBYTE(v76) = 4;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v42->pNode = spNode.m_pObject;
  v43 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  v43->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column07", 8u);
  LOBYTE(v76) = 9;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &v43->vecNodeName,
    &_Val);
  LOBYTE(v76) = 4;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v43->pNode = spNode.m_pObject;
  v43->bAbbreviatable = 1;
  v44 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  v44->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column08", 8u);
  LOBYTE(v76) = 10;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &v44->vecNodeName,
    &_Val);
  LOBYTE(v76) = 4;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  v44->pNode = spNode.m_pObject;
  v44->bAbbreviatable = 1;
  SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
  v45 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Object01", &uiLeft, &uiTop, 0);
  v46 = SlideListWin::CreateWin(uiLeft - iOffX, uiTop - iOffY, v45, (PgWin *)&v4->vfptr, &kCreateInfo, 0, 0);
  v4->m_pkListWin = v46;
  v46->m_uiRClickMsg = 4;
  SlideListWin::UpdateViewList(v4->m_pkListWin);
  SlideListWin::SetToolTipWin(v4->m_pkListWin, g_pkToolTipWin);
  v47 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnNor02");
  NiObjectNET::SetName(v47, "SlideBar_DnBtn02Nor");
  v48 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnClick02");
  NiObjectNET::SetName(v48, "SlideBar_DnBtn02Click");
  v49 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnOver02");
  NiObjectNET::SetName(v49, "SlideBar_DnBtn02Over");
  v50 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnNor02");
  NiObjectNET::SetName(v50, "SlideBar_UpBtn02Nor");
  v51 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnClick02");
  NiObjectNET::SetName(v51, "SlideBar_UpBtn02Click");
  v52 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnOver02");
  NiObjectNET::SetName(v52, "SlideBar_UpBtn02Over");
  v53 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle", &uiLeft, &uiTop, 0);
  v54 = SlideBar::CreateWin(
          spNode.m_pObject,
          "SlideBar02",
          "SlideBar_UpBtn02",
          "SlideBar_DnBtn02",
          v53,
          0,
          (PgWin *)&v4->vfptr);
  v4->m_pkSlideBar = v54;
  v54->m_uiClickMsg = 1;
  v4->m_pkSlideBar->m_eType = 1;
  v55 = v4->m_pkSlideBar;
  v56 = v55->vfptr;
  v57 = v4->m_pkSlideBar;
  v58 = ((int (__thiscall *)(SlideBar *))v55->vfptr[42].__vecDelDtor)(v4->m_pkSlideBar);
  v59 = (int)v57->vfptr[41].__vecDelDtor((NiRefObject *)v57, v58 - iOffY);
  v60 = iOffX;
  v56[77].__vecDelDtor((NiRefObject *)v4->m_pkSlideBar, v59 - iOffX);
  if ( PgUtil::GetTriShapeRect(
         (NiAVObject *)&spNode.m_pObject->vfptr,
         "JoinPlayerList",
         &uiLeft,
         &uiTop,
         &uiWidth,
         &uiHeight) )
  {
    v62 = Font::Get(MAIN_MENU);
    v63 = PgWinText::CreateWin(uiLeft - v60, uiTop - iOffY, uiWidth, uiHeight, v62, (PgWin *)&v4->vfptr, 0, 0);
    v4->m_pkJoinPlyaerListText = v63;
    v63->vfptr[117].__vecDelDtor((NiRefObject *)v63, (unsigned int)&Color::m_kDxWinTitleColor);
    ((void (__stdcall *)(signed int))v4->m_pkJoinPlyaerListText->vfptr[122].__vecDelDtor)(1);
    ((void (__stdcall *)(void *))v4->m_pkJoinPlyaerListText->vfptr[118].__vecDelDtor)(&unk_9B1DEF);
    v4->m_pkJoinPlyaerListText->vfptr[60].__vecDelDtor((NiRefObject *)v4->m_pkJoinPlyaerListText, 0);
    LOBYTE(v76) = 3;
    if ( kCreateInfo.m_arrItem._Myfirst )
    {
      std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(
        kCreateInfo.m_arrItem._Myfirst,
        kCreateInfo.m_arrItem._Mylast);
      operator delete(kCreateInfo.m_arrItem._Myfirst);
    }
    kCreateInfo.m_arrItem._Myfirst = 0;
    kCreateInfo.m_arrItem._Mylast = 0;
    kCreateInfo.m_arrItem._Myend = 0;
    LOBYTE(v76) = 0;
    `eh vector destructor iterator'(
      kTitleString,
      0x1Cu,
      3,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    v64 = spNode.m_pObject;
    v76 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v64 )
      v64->vfptr->__vecDelDtor((NiRefObject *)v64, 1u);
    result = 1;
  }
  else
  {
    LOBYTE(v76) = 3;
    if ( kCreateInfo.m_arrItem._Myfirst )
    {
      std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(
        kCreateInfo.m_arrItem._Myfirst,
        kCreateInfo.m_arrItem._Mylast);
      operator delete(kCreateInfo.m_arrItem._Myfirst);
    }
    kCreateInfo.m_arrItem._Myfirst = 0;
    kCreateInfo.m_arrItem._Mylast = 0;
    kCreateInfo.m_arrItem._Myend = 0;
    LOBYTE(v76) = 0;
    `eh vector destructor iterator'(
      kTitleString,
      0x1Cu,
      3,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    v61 = spNode.m_pObject;
    v76 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v61 )
      v61->vfptr->__vecDelDtor((NiRefObject *)v61, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005F6080) --------------------------------------------------------
char __thiscall KingdomQuestTeamList::Create(KingdomQuestTeamList *this, NiPointer<NiNode> spNode, PgWin *pkParent)
{
  PgWin *v3; // edi@1
  KingdomQuestTeamList *v4; // esi@1
  void *(__thiscall *v5)(NiRefObject *, unsigned int); // edx@1
  int v6; // ebx@1
  const char *v7; // eax@8
  PgSprData *v8; // eax@9
  NiNode *v9; // esi@10
  char result; // al@14
  int v11; // edi@15
  int v12; // ebx@15
  PgWinBut *v13; // eax@15
  int v14; // ecx@15
  PgWinBut *v15; // edx@15
  unsigned int v16; // ecx@15
  PgWin *v17; // ST24_4@15
  PgFont *v18; // eax@15
  PgWinText *v19; // eax@15
  NiRefObjectVtbl *v20; // edx@15
  NiUnsharedGeometryGroup *v21; // eax@15
  PgWinBut *v22; // eax@15
  int v23; // ecx@15
  PgWinBut *v24; // edx@15
  unsigned int v25; // ecx@15
  PgWin *v26; // ST24_4@15
  PgFont *v27; // eax@15
  PgWinText *v28; // eax@15
  NiRefObjectVtbl *v29; // edx@15
  NiUnsharedGeometryGroup *v30; // eax@15
  PgWinBut *v31; // eax@15
  char *v32; // eax@15
  int v33; // eax@15
  PgWinText *v34; // edx@15
  PgWinBut *v35; // ST24_4@15
  PgFont *v36; // eax@15
  PgWinText *v37; // eax@15
  NiRefObjectVtbl *v38; // edx@15
  NiUnsharedGeometryGroup *v39; // eax@15
  PgSprData *v40; // eax@15
  PgWinSpr *v41; // eax@15
  PgSprData *v42; // eax@15
  PgWinSpr *v43; // eax@15
  NiUnsharedGeometryGroup *v44; // eax@15
  NiUnsharedGeometryGroup *v45; // ecx@15
  char v46; // dl@16
  NiUnsharedGeometryGroup *v47; // eax@17
  NiUnsharedGeometryGroup *v48; // ecx@17
  char v49; // dl@18
  NiUnsharedGeometryGroup *v50; // eax@19
  NiUnsharedGeometryGroup *v51; // ecx@19
  char v52; // dl@20
  const char *v53; // eax@22
  const char *v54; // eax@22
  const char *v55; // eax@22
  PgWinBut *v56; // eax@22
  void *(__thiscall *v57)(NiRefObject *, unsigned int); // edx@22
  int v58; // eax@22
  PgWinText *v59; // edx@22
  unsigned int v60; // eax@22
  PgWinBut *v61; // ST24_4@22
  PgFont *v62; // eax@22
  PgWinText *v63; // eax@22
  NiRefObjectVtbl *v64; // edx@22
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v65; // eax@22
  SLWCreateInfo::Item *v66; // eax@25
  PgWinText *v67; // eax@35
  PgWinText *v68; // eax@37
  PgSprData *v69; // eax@37
  SlideListWin *v70; // eax@37
  NiObjectNET *v71; // eax@37
  NiObjectNET *v72; // eax@37
  NiObjectNET *v73; // eax@37
  NiObjectNET *v74; // eax@37
  NiObjectNET *v75; // eax@37
  NiObjectNET *v76; // eax@37
  PgSprData *v77; // eax@37
  SlideBar *v78; // eax@37
  unsigned int v79; // ecx@37
  int (*v80)(void); // edx@37
  int v81; // eax@37
  int v82; // eax@37
  SLWCreateInfo::Item *v83; // eax@39
  PgWinText *v84; // eax@49
  PgWinText *v85; // eax@51
  PgSprData *v86; // eax@51
  SlideListWin *v87; // eax@51
  NiObjectNET *v88; // eax@51
  NiObjectNET *v89; // eax@51
  NiObjectNET *v90; // eax@51
  NiObjectNET *v91; // eax@51
  NiObjectNET *v92; // eax@51
  NiObjectNET *v93; // eax@51
  PgSprData *v94; // eax@51
  SlideBar *v95; // eax@51
  unsigned int v96; // ecx@51
  int (*v97)(void); // edx@51
  int v98; // eax@51
  int v99; // eax@51
  NiNode *v100; // esi@55
  PgFont *v101; // eax@59
  PgWinText *v102; // eax@59
  NiNode *v103; // esi@62
  unsigned int uiHeight; // [sp+10h] [bp-110h]@51
  SLWCreateInfo kCreateInfo; // [sp+14h] [bp-10Ch]@25
  unsigned int uiWidth; // [sp+30h] [bp-F0h]@51
  unsigned int v107; // [sp+34h] [bp-ECh]@22
  unsigned int i; // [sp+38h] [bp-E8h]@1
  int uiTop; // [sp+3Ch] [bp-E4h]@9
  int uiLeft; // [sp+40h] [bp-E0h]@9
  PgWinBut *pkButWin; // [sp+44h] [bp-DCh]@2
  PgWinText *pkTextWin; // [sp+48h] [bp-D8h]@15
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+4Ch] [bp-D4h]@25
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kTitleString[6]; // [sp+68h] [bp-B8h]@15
  int v115; // [sp+11Ch] [bp-4h]@1

  v3 = pkParent;
  v4 = this;
  v5 = pkParent->vfptr[41].__vecDelDtor;
  v115 = 0;
  v6 = ((int (__thiscall *)(PgWin *))v5)(pkParent);
  i = ((int (__thiscall *)(PgWin *))v3->vfptr[42].__vecDelDtor)(v3);
  if ( spNode.m_pObject )
  {
    pkButWin = (PgWinBut *)spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && pkButWin )
      ((void (__stdcall *)(signed int))pkButWin->vfptr->__vecDelDtor)(1);
    spNode.m_pObject = 0;
  }
  pkButWin = (PgWinBut *)pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v7 = Folder::Merge(&Folder::m_acMenu, "Game\\NPCKDQuest_TeamSelect.nif");
  PgUtil::LoadNodeNifFile(v7, &spNode, (NiTexturePalette *)pkButWin);
  if ( !spNode.m_pObject )
    return 0;
  v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel03", &uiLeft, &uiTop, 0);
  if ( !PgWinSpr::Create((PgWinSpr *)&v4->vfptr, uiLeft - v6, uiTop - i, v8, v3, 0, 0) )
  {
    v9 = spNode.m_pObject;
    v115 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v9 )
        v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    }
    return 0;
  }
  v11 = ((int (__thiscall *)(KingdomQuestTeamList *))v4->vfptr[41].__vecDelDtor)(v4);
  v12 = ((int (__thiscall *)(KingdomQuestTeamList *))v4->vfptr[42].__vecDelDtor)(v4);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor01", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick01");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver01");
  PgWinBut::CreateWin(uiLeft - v11, uiTop - v12, (PgSprData *)pkTextWin, (PgWin *)&v4->vfptr, 0, 0, 0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "RedNor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "RedClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "RedOver");
  v13 = PgWinBut::CreateWin(uiLeft - v11, uiTop - v12, (PgSprData *)pkTextWin, (PgWin *)&v4->vfptr, 2u, 0, 0);
  v14 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
  v15 = *(PgWinBut **)(v14 + 24);
  v16 = *(_DWORD *)(v14 + 20);
  v17 = (PgWin *)v13;
  pkButWin = v15;
  i = v16;
  v18 = Font::Get(MAIN_MENU);
  v19 = PgWinText::CreateWin(0, 0, i, (unsigned int)pkButWin, v18, v17, 0, 0);
  v20 = v19->vfptr;
  pkTextWin = v19;
  v20[122].__vecDelDtor((NiRefObject *)v19, 5u);
  pkButWin = (PgWinBut *)&pkTextWin->vfptr[118];
  v21 = TextData3::Get(0xB90A33FF);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkButWin->vfptr)(pkTextWin, v21);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BlueNor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "BlueClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "BlueOver");
  v22 = PgWinBut::CreateWin(uiLeft - v11, uiTop - v12, (PgSprData *)pkTextWin, (PgWin *)&v4->vfptr, 5u, 0, 0);
  v23 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
  v24 = *(PgWinBut **)(v23 + 24);
  v25 = *(_DWORD *)(v23 + 20);
  v26 = (PgWin *)v22;
  pkButWin = v24;
  i = v25;
  v27 = Font::Get(MAIN_MENU);
  v28 = PgWinText::CreateWin(0, 0, i, (unsigned int)pkButWin, v27, v26, 0, 0);
  v29 = v28->vfptr;
  pkTextWin = v28;
  v29[122].__vecDelDtor((NiRefObject *)v28, 5u);
  pkButWin = (PgWinBut *)&pkTextWin->vfptr[118];
  v30 = TextData3::Get(0xB848380A);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkButWin->vfptr)(pkTextWin, v30);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver");
  v31 = PgWinBut::CreateWin(uiLeft - v11, uiTop - v12, (PgSprData *)pkTextWin, (PgWin *)&v4->vfptr, 7u, 0, 0);
  pkButWin = v31;
  v31->m_pkToolTipWin = g_pkToolTipWin;
  v32 = (char *)TextData2::Get(0x283CA263u);
  PgWin::SetToolTipWinText((PgWin *)&pkButWin->vfptr, v32);
  v33 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
  v34 = *(PgWinText **)(v33 + 20);
  v35 = pkButWin;
  i = *(_DWORD *)(v33 + 24);
  pkTextWin = v34;
  v36 = Font::Get(MAIN_MENU);
  v37 = PgWinText::CreateWin(0, 0, (unsigned int)pkTextWin, i, v36, (PgWin *)&v35->vfptr, 0, 0);
  v38 = v37->vfptr;
  pkTextWin = v37;
  v38[122].__vecDelDtor((NiRefObject *)v37, 5u);
  pkButWin = (PgWinBut *)&pkTextWin->vfptr[118];
  v39 = TextData2::Get(0x8332EB1u);
  ((void (__thiscall *)(_DWORD, _DWORD))pkButWin->vfptr)(pkTextWin, v39);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  v40 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Red_Select", &uiLeft, &uiTop, 0);
  v41 = PgWinSpr::CreateWin(uiLeft - v11, uiTop - v12, v40, (PgWin *)&v4->vfptr, 0, 0);
  v4->m_pkSelectedRed = v41;
  v41->vfptr[60].__vecDelDtor((NiRefObject *)v41, 0);
  ((void (__stdcall *)(_DWORD))v4->m_pkSelectedRed->vfptr[64].__vecDelDtor)(0);
  v42 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Blue_Select", &uiLeft, &uiTop, 0);
  v43 = PgWinSpr::CreateWin(uiLeft - v11, uiTop - v12, v42, (PgWin *)&v4->vfptr, 0, 0);
  v4->m_pkSelectedBlue = v43;
  v43->vfptr[60].__vecDelDtor((NiRefObject *)v43, 0);
  ((void (__stdcall *)(_DWORD))v4->m_pkSelectedBlue->vfptr[64].__vecDelDtor)(0);
  v44 = TextData::Get(0x98A49F99);
  v45 = v44;
  kTitleString[0]._Myres = 15;
  kTitleString[0]._Mysize = 0;
  kTitleString[0]._Bx._Buf[0] = 0;
  pkButWin = (PgWinBut *)((char *)&v44->vfptr + 1);
  do
  {
    v46 = (char)v45->vfptr;
    v45 = (NiUnsharedGeometryGroup *)((char *)v45 + 1);
  }
  while ( v46 );
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    kTitleString,
    (const char *)v44,
    (char *)v45 - (char *)pkButWin);
  LOBYTE(v115) = 1;
  v47 = TextData::Get(0x96B28AA0);
  v48 = v47;
  kTitleString[1]._Myres = 15;
  kTitleString[1]._Mysize = 0;
  kTitleString[1]._Bx._Buf[0] = 0;
  pkButWin = (PgWinBut *)((char *)&v47->vfptr + 1);
  do
  {
    v49 = (char)v48->vfptr;
    v48 = (NiUnsharedGeometryGroup *)((char *)v48 + 1);
  }
  while ( v49 );
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &kTitleString[1],
    (const char *)v47,
    (char *)v48 - (char *)pkButWin);
  LOBYTE(v115) = 2;
  v50 = TextData::Get(0x4EA49695u);
  v51 = v50;
  kTitleString[2]._Myres = 15;
  kTitleString[2]._Mysize = 0;
  kTitleString[2]._Bx._Buf[0] = 0;
  pkButWin = (PgWinBut *)((char *)&v50->vfptr + 1);
  do
  {
    v52 = (char)v51->vfptr;
    v51 = (NiUnsharedGeometryGroup *)((char *)v51 + 1);
  }
  while ( v52 );
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &kTitleString[2],
    (const char *)v50,
    (char *)v51 - (char *)pkButWin);
  LOBYTE(v115) = 3;
  `eh vector constructor iterator'(
    &kTitleString[3],
    0x1Cu,
    3,
    (void (__thiscall *)(void *))std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>,
    (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
  LOBYTE(v115) = 4;
  i = 0;
  do
  {
    pkButWin = (PgWinBut *)spNode.m_pObject;
    v53 = fs("Title%02dNor", i + 5);
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&pkButWin->vfptr, v53, &uiLeft, &uiTop, 0);
    pkButWin = (PgWinBut *)spNode.m_pObject;
    v54 = fs("Title%02dClick", i + 5);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&pkButWin->vfptr, v54);
    pkButWin = (PgWinBut *)spNode.m_pObject;
    v55 = fs("Title%02dOver", i + 5);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&pkButWin->vfptr, v55);
    v56 = PgWinBut::CreateWin(uiLeft - v11, uiTop - v12, (PgSprData *)pkTextWin, (PgWin *)&v4->vfptr, 8u, 0, 0);
    v57 = v56->vfptr[130].__vecDelDtor;
    pkButWin = v56;
    v57((NiRefObject *)&v56->vfptr, i);
    v58 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
    v59 = *(PgWinText **)(v58 + 24);
    v60 = *(_DWORD *)(v58 + 20);
    v61 = pkButWin;
    pkTextWin = v59;
    v107 = v60;
    v62 = Font::Get(MAIN_MENU);
    v63 = PgWinText::CreateWin(0, 0, v107, (unsigned int)pkTextWin, v62, (PgWin *)&v61->vfptr, 0, 0);
    v64 = v63->vfptr;
    pkTextWin = v63;
    v64[122].__vecDelDtor((NiRefObject *)v63, 5u);
    v65 = &kTitleString[i % 3];
    if ( *(&kTitleString[0]._Myres + 7 * (i % 3)) >= 0x10 )
      v65 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v65->_Bx._Ptr;
    ((void (__stdcall *)(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *))pkTextWin->vfptr[118].__vecDelDtor)(v65);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    ++i;
  }
  while ( i < 6 );
  kCreateInfo.m_arrItem._Myfirst = 0;
  kCreateInfo.m_arrItem._Mylast = 0;
  kCreateInfo.m_arrItem._Myend = 0;
  LOBYTE(v115) = 5;
  kCreateInfo.m_bMakeData = 0;
  kCreateInfo.m_nOffX = 0;
  kCreateInfo.m_nOffY = 0;
  v66 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
  v66->nItemType = 1;
  v66->pNode = spNode.m_pObject;
  pkTextWin = (PgWinText *)v66;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarNor02", 0xEu);
  LOBYTE(v115) = 6;
  i = (unsigned int)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2];
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
    &_Val);
  LOBYTE(v115) = 5;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarClick02", 0x10u);
  LOBYTE(v115) = 7;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)i,
    &_Val);
  LOBYTE(v115) = 5;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarOver02", 0xFu);
  LOBYTE(v115) = 8;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)i,
    &_Val);
  LOBYTE(v115) = 5;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pkTextWin->vfptr = (NiRefObjectVtbl *)2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column09", 8u);
  LOBYTE(v115) = 9;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
    &_Val);
  LOBYTE(v115) = 5;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
  pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pkTextWin->vfptr = (NiRefObjectVtbl *)2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column07", 8u);
  LOBYTE(v115) = 10;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
    &_Val);
  LOBYTE(v115) = 5;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v67 = pkTextWin;
  pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
  LOBYTE(v67->m_kLocal.m_Translate.x) = 1;
  pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pkTextWin->vfptr = (NiRefObjectVtbl *)2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column08", 8u);
  LOBYTE(v115) = 11;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
    &_Val);
  LOBYTE(v115) = 5;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v68 = pkTextWin;
  pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
  LOBYTE(v68->m_kLocal.m_Translate.x) = 1;
  SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
  v69 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Object01", &uiLeft, &uiTop, 0);
  v70 = SlideListWin::CreateWin(uiLeft - v11, uiTop - v12, v69, (PgWin *)&v4->vfptr, &kCreateInfo, 0, 0);
  v4->m_pkListWin[0] = v70;
  v70->m_uiRClickMsg = 3;
  SlideListWin::UpdateViewList(v4->m_pkListWin[0]);
  SlideListWin::SetToolTipWin(v4->m_pkListWin[0], g_pkToolTipWin);
  v71 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnNor02");
  NiObjectNET::SetName(v71, "SlideBar_DnBtn02Nor");
  v72 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnClick02");
  NiObjectNET::SetName(v72, "SlideBar_DnBtn02Click");
  v73 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnOver02");
  NiObjectNET::SetName(v73, "SlideBar_DnBtn02Over");
  v74 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnNor02");
  NiObjectNET::SetName(v74, "SlideBar_UpBtn02Nor");
  v75 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnClick02");
  NiObjectNET::SetName(v75, "SlideBar_UpBtn02Click");
  v76 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnOver02");
  NiObjectNET::SetName(v76, "SlideBar_UpBtn02Over");
  v77 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle", &uiLeft, &uiTop, 0);
  v78 = SlideBar::CreateWin(
          spNode.m_pObject,
          "SlideBar02",
          "SlideBar_UpBtn02",
          "SlideBar_DnBtn02",
          v77,
          0,
          (PgWin *)&v4->vfptr);
  v4->m_pkSlideBarRed = v78;
  v78->m_uiClickMsg = 1;
  v4->m_pkSlideBarRed->m_eType = 1;
  v79 = (unsigned int)v4->m_pkSlideBarRed;
  v80 = (int (*)(void))v4->m_pkSlideBarRed->vfptr[42].__vecDelDtor;
  pkButWin = (PgWinBut *)v4->m_pkSlideBarRed->vfptr;
  v107 = v79;
  v81 = v80();
  v82 = (*(int (__stdcall **)(int))(*(_DWORD *)v107 + 164))(v81 - v12);
  ((void (__thiscall *)(SlideBar *, int))pkButWin->m_eButShow)(v4->m_pkSlideBarRed, v82 - v11);
  if ( kCreateInfo.m_arrItem._Myfirst != kCreateInfo.m_arrItem._Mylast )
  {
    v107 = (unsigned int)std::_Move<boost::shared_ptr<SlideListWin::ListItem> *,boost::shared_ptr<SlideListWin::ListItem> *>(
                           kCreateInfo.m_arrItem._Mylast,
                           kCreateInfo.m_arrItem._Mylast,
                           kCreateInfo.m_arrItem._Myfirst);
    std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(
      (boost::shared_ptr<SLWCreateInfo::Item> *)v107,
      kCreateInfo.m_arrItem._Mylast);
    kCreateInfo.m_arrItem._Mylast = (boost::shared_ptr<SLWCreateInfo::Item> *)v107;
  }
  kCreateInfo.m_bMakeData = 0;
  kCreateInfo.m_nOffX = 0;
  kCreateInfo.m_nOffY = 0;
  v83 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
  v83->nItemType = 1;
  v83->pNode = spNode.m_pObject;
  pkTextWin = (PgWinText *)v83;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarNor03", 0xEu);
  LOBYTE(v115) = 12;
  i = (unsigned int)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2];
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
    &_Val);
  LOBYTE(v115) = 5;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarClick03", 0x10u);
  LOBYTE(v115) = 13;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)i,
    &_Val);
  LOBYTE(v115) = 5;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarOver03", 0xFu);
  LOBYTE(v115) = 14;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)i,
    &_Val);
  LOBYTE(v115) = 5;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pkTextWin->vfptr = (NiRefObjectVtbl *)2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column10", 8u);
  LOBYTE(v115) = 15;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
    &_Val);
  LOBYTE(v115) = 5;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
  pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pkTextWin->vfptr = (NiRefObjectVtbl *)2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column11", 8u);
  LOBYTE(v115) = 16;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
    &_Val);
  LOBYTE(v115) = 5;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v84 = pkTextWin;
  pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
  LOBYTE(v84->m_kLocal.m_Translate.x) = 1;
  pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pkTextWin->vfptr = (NiRefObjectVtbl *)2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column12", 8u);
  LOBYTE(v115) = 17;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
    &_Val);
  LOBYTE(v115) = 5;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v85 = pkTextWin;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
  LOBYTE(v85->m_kLocal.m_Translate.x) = 1;
  SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
  v86 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Object02", &uiLeft, &uiTop, 0);
  v87 = SlideListWin::CreateWin(uiLeft - v11, uiTop - v12, v86, (PgWin *)&v4->vfptr, &kCreateInfo, 0, 0);
  v4->m_pkListWin[1] = v87;
  v87->m_uiRClickMsg = 6;
  SlideListWin::UpdateViewList(v4->m_pkListWin[1]);
  SlideListWin::SetToolTipWin(v4->m_pkListWin[1], g_pkToolTipWin);
  v88 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnNor03");
  NiObjectNET::SetName(v88, "SlideBar_DnBtn03Nor");
  v89 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnClick03");
  NiObjectNET::SetName(v89, "SlideBar_DnBtn03Click");
  v90 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnOver03");
  NiObjectNET::SetName(v90, "SlideBar_DnBtn03Over");
  v91 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnNor03");
  NiObjectNET::SetName(v91, "SlideBar_UpBtn03Nor");
  v92 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnClick03");
  NiObjectNET::SetName(v92, "SlideBar_UpBtn03Click");
  v93 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnOver03");
  NiObjectNET::SetName(v93, "SlideBar_UpBtn03Over");
  v94 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle01", &uiLeft, &uiTop, 0);
  v95 = SlideBar::CreateWin(
          spNode.m_pObject,
          "SlideBar03",
          "SlideBar_UpBtn03",
          "SlideBar_DnBtn03",
          v94,
          0,
          (PgWin *)&v4->vfptr);
  v4->m_pkSlideBarBlue = v95;
  v95->m_uiClickMsg = 1;
  v4->m_pkSlideBarBlue->m_eType = 1;
  v96 = (unsigned int)v4->m_pkSlideBarBlue;
  v97 = (int (*)(void))v4->m_pkSlideBarBlue->vfptr[42].__vecDelDtor;
  pkButWin = (PgWinBut *)v4->m_pkSlideBarBlue->vfptr;
  v107 = v96;
  v98 = v97();
  v99 = (*(int (__stdcall **)(int))(*(_DWORD *)v107 + 164))(v98 - v12);
  ((void (__thiscall *)(SlideBar *, int))pkButWin->m_eButShow)(v4->m_pkSlideBarBlue, v99 - v11);
  if ( PgUtil::GetTriShapeRect(
         (NiAVObject *)&spNode.m_pObject->vfptr,
         "JoinPlayerList",
         &uiLeft,
         &uiTop,
         &uiWidth,
         &uiHeight) )
  {
    v101 = Font::Get(MAIN_MENU);
    v102 = PgWinText::CreateWin(uiLeft - v11, uiTop - v12, uiWidth, uiHeight, v101, (PgWin *)&v4->vfptr, 0, 0);
    v4->m_pkJoinTeamListText = v102;
    v102->vfptr[117].__vecDelDtor((NiRefObject *)v102, (unsigned int)&Color::m_kDxWinTitleColor);
    ((void (__stdcall *)(signed int))v4->m_pkJoinTeamListText->vfptr[122].__vecDelDtor)(1);
    ((void (__stdcall *)(void *))v4->m_pkJoinTeamListText->vfptr[118].__vecDelDtor)(&unk_9B1DFA);
    v4->m_pkJoinTeamListText->vfptr[60].__vecDelDtor((NiRefObject *)v4->m_pkJoinTeamListText, 0);
    LOBYTE(v115) = 4;
    if ( kCreateInfo.m_arrItem._Myfirst )
    {
      std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(
        kCreateInfo.m_arrItem._Myfirst,
        kCreateInfo.m_arrItem._Mylast);
      operator delete(kCreateInfo.m_arrItem._Myfirst);
    }
    kCreateInfo.m_arrItem._Myfirst = 0;
    kCreateInfo.m_arrItem._Mylast = 0;
    kCreateInfo.m_arrItem._Myend = 0;
    LOBYTE(v115) = 0;
    `eh vector destructor iterator'(
      kTitleString,
      0x1Cu,
      6,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    v115 = -1;
    if ( spNode.m_pObject )
    {
      v103 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v103 )
          v103->vfptr->__vecDelDtor((NiRefObject *)v103, 1u);
      }
    }
    result = 1;
  }
  else
  {
    LOBYTE(v115) = 4;
    if ( kCreateInfo.m_arrItem._Myfirst )
    {
      std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(
        kCreateInfo.m_arrItem._Myfirst,
        kCreateInfo.m_arrItem._Mylast);
      operator delete(kCreateInfo.m_arrItem._Myfirst);
    }
    kCreateInfo.m_arrItem._Myfirst = 0;
    kCreateInfo.m_arrItem._Mylast = 0;
    kCreateInfo.m_arrItem._Myend = 0;
    LOBYTE(v115) = 0;
    `eh vector destructor iterator'(
      kTitleString,
      0x1Cu,
      6,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    v115 = -1;
    if ( spNode.m_pObject )
    {
      v100 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v100 )
          v100->vfptr->__vecDelDtor((NiRefObject *)v100, 1u);
      }
    }
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005F7550) --------------------------------------------------------
void __thiscall KingdomQuestWin::KQ_Joiner::~KQ_Joiner(KingdomQuestWin::KQ_Joiner *this)
{
  `eh vector destructor iterator'(
    this->kJoiner,
    0x14u,
    100,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
}

//----- (005F7570) --------------------------------------------------------
KingdomQuestPlayerList *__thiscall KingdomQuestPlayerList::`scalar deleting destructor'(KingdomQuestPlayerList *this, unsigned int a2)
{
  KingdomQuestPlayerList *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&KingdomQuestPlayerList::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&KingdomQuestPlayerList::`vftable'{for `IDirectMessenger'};
  this->m_kQuestHandle = -1;
  PgWinSpr::~PgWinSpr((PgWinSpr *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B29CC: using guessed type void (__thiscall *KingdomQuestPlayerList::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B29EC: using guessed type int (__thiscall *KingdomQuestPlayerList::`vftable'{for `NiNode'})(void *p, char);

//----- (005F75B0) --------------------------------------------------------
KingdomQuestTeamList *__thiscall KingdomQuestTeamList::`vector deleting destructor'(KingdomQuestTeamList *this, unsigned int a2)
{
  KingdomQuestTeamList *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&KingdomQuestTeamList::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&KingdomQuestTeamList::`vftable'{for `IDirectMessenger'};
  this->m_kQuestHandle = -1;
  PgWinSpr::~PgWinSpr((PgWinSpr *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B2BF8: using guessed type void (__thiscall *KingdomQuestTeamList::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B2C14: using guessed type int (__thiscall *KingdomQuestTeamList::`vftable'{for `NiNode'})(void *p, char);

//----- (005F75F0) --------------------------------------------------------
KQTeam *__cdecl KQTeamTable::GetByID(const unsigned __int16 iID)
{
  int v1; // eax@1
  unsigned int v2; // edi@2
  unsigned int v3; // esi@4
  KQTeam *result; // eax@7

  v1 = *(_DWORD *)(ITableBase<KQTeam,KQTeamTable>::ms_pkTable + 56);
  if ( v1 )
    v2 = *(_DWORD *)(v1 + 40);
  else
    v2 = 0;
  v3 = 0;
  if ( v2 )
  {
    while ( *(_WORD *)CDataReader::GetRecord((CDataReader *)(ITableBase<KQTeam,KQTeamTable>::ms_pkTable + 4), v3) != iID )
    {
      if ( ++v3 >= v2 )
        goto LABEL_7;
    }
    result = (KQTeam *)CDataReader::GetRecord((CDataReader *)(ITableBase<KQTeam,KQTeamTable>::ms_pkTable + 4), v3);
  }
  else
  {
LABEL_7:
    result = 0;
  }
  return result;
}
// A8C248: using guessed type int ITableBase<KQTeam,KQTeamTable>::ms_pkTable;

//----- (005F7650) --------------------------------------------------------
KingdomQuestWin *__thiscall KingdomQuestWin::`vector deleting destructor'(KingdomQuestWin *this, unsigned int a2)
{
  KingdomQuestWin *v2; // esi@1

  v2 = this;
  KingdomQuestWin::~KingdomQuestWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (005F7680) --------------------------------------------------------
char __cdecl CharClass::GetClassIDByLocalName(char *pcLocalName)
{
  unsigned int v1; // edi@1

  v1 = 0;
  while ( strcmp(
            CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), v1) + 21,
            pcLocalName) )
  {
    if ( (signed int)++v1 >= 28 )
      return 0;
  }
  return *CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), v1);
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (005F76F0) --------------------------------------------------------
void __thiscall KQuestTimeWin::KQuestTimeWin(KQuestTimeWin *this)
{
  KQuestTimeWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&KQuestTimeWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&KQuestTimeWin::`vftable'{for `IDirectMessenger'};
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kTimer);
  v1->m_iRestLife = 0;
  v1->m_bTextOutTimeLimit = 0;
  v1->m_iRequiredKillMonNums = 0;
}
// 9B30EC: using guessed type void (__thiscall *KQuestTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B310C: using guessed type int (__thiscall *KQuestTimeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005F7770) --------------------------------------------------------
void __thiscall KQuestTimeWin::~KQuestTimeWin(KQuestTimeWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&KQuestTimeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&KQuestTimeWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9B30EC: using guessed type void (__thiscall *KQuestTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B310C: using guessed type int (__thiscall *KQuestTimeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005F77B0) --------------------------------------------------------
void __thiscall KQuestTimeWin::SetRestLife(KQuestTimeWin *this, int iLife)
{
  int v2; // esi@1
  char *v3; // edi@1

  this->m_iRestLife = iLife - 1;
  v2 = 0;
  v3 = (char *)this->m_apkLifeSpr;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 256))(iLife - 1 > v2++);
    v3 += 4;
  }
  while ( v2 < 5 );
}

//----- (005F7800) --------------------------------------------------------
void __thiscall KQuestTimeWin::ResetTime(KQuestTimeWin *this, unsigned int second)
{
  KQuestTimeWin *v2; // esi@1

  v2 = this;
  if ( !KQuestTimeWin::m_second )
    this->m_bTextOutTimeLimit = 0;
  KQuestTimeWin::m_second = second;
  CNSTimer_Interval::ReSet(&this->m_kTimer, Timer::ms_fCurTime);
  v2->m_kTimer.m_fCheckTime = 1.0;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8E1B4: using guessed type unsigned int KQuestTimeWin::m_second;

//----- (005F7840) --------------------------------------------------------
char __thiscall KQuestTimeWin::Create(KQuestTimeWin *this, PgFrameWork *pkFrameWork)
{
  KQuestTimeWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // ebx@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  PgSprData *v10; // edi@15
  PgWinSpr *v11; // eax@15
  PgSprData::PgHitTester *v12; // eax@15
  unsigned int v13; // edi@15
  unsigned int v14; // ebx@15
  PgFont *v15; // eax@15
  PgWinText *v16; // eax@15
  NiRefObjectVtbl *v17; // edi@15
  PgFont *v18; // eax@15
  PgSprData *v19; // eax@15
  PgWinSpr *v20; // eax@15
  PgSprData *v21; // eax@15
  PgSprData *v22; // edi@15
  PgWinSpr *v23; // eax@15
  NiPointer<PgSprData::PgHitTester> *v24; // ecx@15
  unsigned int v25; // edi@15
  unsigned int v26; // ebx@15
  PgFont *v27; // eax@15
  PgWinText *v28; // eax@15
  NiRefObjectVtbl *v29; // edi@15
  PgFont *v30; // eax@15
  PgFrameWork *v31; // eax@15
  PgWinSpr **v32; // ebx@15
  NiNode *v33; // edi@16
  const char *v34; // eax@16
  PgSprData *v35; // eax@16
  PgWinSpr *v36; // edi@16
  NiRefObjectVtbl *v37; // edi@17
  int v38; // eax@17
  NiNode *v39; // esi@18
  NiSourceTexture *pkTexture; // [sp+4Ch] [bp-1Ch]@1
  int uiLeft; // [sp+50h] [bp-18h]@11
  int uiTop; // [sp+54h] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+58h] [bp-10h]@1
  int v44; // [sp+64h] [bp-4h]@1
  PgFrameWork *pkFrameWorka; // [sp+70h] [bp+8h]@16

  v2 = this;
  spNode.m_pObject = 0;
  v44 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  pkTexture = v3;
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v44 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "\\Game\\QuestTime.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "KQuestTimeWin", 0) )
  {
    v4 = spNode.m_pObject;
    v44 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
    goto LABEL_5;
  }
  v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "KillCount_Off", &uiLeft, &uiTop, 0);
  PgSprData::Add(v10, (NiAVObject *)&spNode.m_pObject->vfptr, "KillCount_On");
  PgSprData::Add(v10, (NiAVObject *)&spNode.m_pObject->vfptr, "Reward");
  v11 = PgWinSpr::CreateWin(uiLeft, uiTop, v10, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_apkKillCount = v11;
  v11->m_pkToolTipWin = g_pkToolTipWin;
  ((void (__stdcall *)(signed int))v2->m_apkKillCount->vfptr[64].__vecDelDtor)(1);
  v12 = v10->m_akHitTester.m_pBase->m_pObject;
  v13 = v12->m_uiHeight;
  v14 = v12->m_uiWidth;
  v15 = Font::Get(0);
  v16 = PgWinText::CreateWin(uiLeft, uiTop, v14, v13, v15, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkRemainMonNumsToKill = v16;
  v16->vfptr[122].__vecDelDtor((NiRefObject *)v16, 5u);
  v17 = v2->m_pkRemainMonNumsToKill->vfptr;
  v18 = Font::Get(BOLD);
  v17[113].__vecDelDtor((NiRefObject *)v2->m_pkRemainMonNumsToKill, (unsigned int)v18);
  ((void (__stdcall *)(_DWORD))v2->m_pkRemainMonNumsToKill->vfptr[60].__vecDelDtor)(0);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_apkKillCount->vfptr, "-");
  ((void (__stdcall *)(void *))v2->m_pkRemainMonNumsToKill->vfptr[118].__vecDelDtor)(&unk_9B3076);
  v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  v20 = PgWinSpr::CreateWin(uiLeft, uiTop, v19, (PgWin *)&v2->vfptr, 0, 0);
  v20->vfptr[60].__vecDelDtor((NiRefObject *)v20, 0);
  v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Time", &uiLeft, &uiTop, pkTexture);
  v22 = v21;
  v23 = PgWinSpr::CreateWin(uiLeft, uiTop, v21, (PgWin *)&v2->vfptr, 0, 0);
  v23->vfptr[60].__vecDelDtor((NiRefObject *)v23, 0);
  v24 = v22->m_akHitTester.m_pBase;
  v25 = v24->m_pObject->m_uiHeight;
  v26 = v24->m_pObject->m_uiWidth;
  v27 = Font::Get(0);
  v28 = PgWinText::CreateWin(uiLeft, uiTop + 2, v26, v25, v27, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_minuteTxtWin = v28;
  v28->vfptr[122].__vecDelDtor((NiRefObject *)v28, 5u);
  v29 = v2->m_minuteTxtWin->vfptr;
  v30 = Font::Get(LARGEBOLD);
  v29[113].__vecDelDtor((NiRefObject *)v2->m_minuteTxtWin, (unsigned int)v30);
  ((void (__stdcall *)(const char *))v2->m_minuteTxtWin->vfptr[118].__vecDelDtor)("00:00");
  ((void (__stdcall *)(_DWORD))v2->m_minuteTxtWin->vfptr[60].__vecDelDtor)(0);
  v31 = 0;
  v32 = v2->m_apkLifeSpr;
  do
  {
    v33 = spNode.m_pObject;
    pkFrameWorka = (PgFrameWork *)((char *)v31 + 1);
    v34 = fs("Life%02d", (char *)&v31->vfptr + 1);
    v35 = PgSprData::Create((NiAVObject *)&v33->vfptr, v34, &uiLeft, &uiTop, pkTexture);
    v36 = PgWinSpr::CreateWin(uiLeft, uiTop, v35, (PgWin *)&v2->vfptr, 0, 0);
    v36->vfptr[60].__vecDelDtor((NiRefObject *)v36, 0);
    v36->vfptr[64].__vecDelDtor((NiRefObject *)v36, 0);
    v31 = pkFrameWorka;
    *v32 = v36;
    ++v32;
  }
  while ( (signed int)pkFrameWorka < 5 );
  ((void (__thiscall *)(KQuestTimeWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    1.0,
    0.0);
  v37 = v2->vfptr;
  v38 = (int)v2->vfptr[41].__vecDelDtor((NiRefObject *)v2, 200u);
  v37[77].__vecDelDtor((NiRefObject *)v2, v38);
  v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 1u);
  KQuestTimeWin::SetRestLife(v2, 0);
  v44 = -1;
  if ( spNode.m_pObject )
  {
    v39 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v39 )
        v39->vfptr->__vecDelDtor((NiRefObject *)v39, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005F7C90) --------------------------------------------------------
void __thiscall KQuestTimeWin::UpdateMeWin(KQuestTimeWin *this, float fCurTime)
{
  KQuestTimeWin *v2; // esi@1
  PgWinSpr *v3; // ecx@5
  NiRefObjectVtbl *v4; // edi@9
  char *v5; // eax@9
  void *(__thiscall *v6)(NiRefObject *, unsigned int); // edx@10
  GameFrameWork *v7; // edi@17
  NiUnsharedGeometryGroup *v8; // eax@17

  v2 = this;
  if ( !KQuestTimeWin::m_second )
  {
    ((void (__stdcall *)(_DWORD))this->vfptr[64].__vecDelDtor)(0);
    return;
  }
  if ( CNSTimer_Interval::IsRun_GetCount(&this->m_kTimer, fCurTime) )
  {
    v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 1u);
    --KQuestTimeWin::m_second;
    if ( v2->m_iRequiredKillMonNums <= 0 )
    {
      ((void (__stdcall *)(_DWORD))v2->m_apkKillCount->vfptr[123].__vecDelDtor)(2);
    }
    else
    {
      ((void (__stdcall *)(_DWORD))v2->m_pkRemainMonNumsToKill->vfptr[64].__vecDelDtor)(1);
      v3 = v2->m_apkKillCount;
      if ( KQuestTimeWin::m_second & 1 )
      {
        ((void (__stdcall *)(_DWORD))v3->vfptr[123].__vecDelDtor)(1);
        ((void (__stdcall *)(_DWORD))v2->m_pkRemainMonNumsToKill->vfptr[117].__vecDelDtor)(&Color::m_kDxYellowColor);
        SpScreenText::SetShadowOffset((SpScreenText *)&v2->m_pkRemainMonNumsToKill->m_spTextGeom.m_pObject->vfptr, 1u);
      }
      else
      {
        ((void (__stdcall *)(_DWORD))v3->vfptr[123].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkRemainMonNumsToKill->vfptr[117].__vecDelDtor)(&Color::m_kDxRedColor);
        SpScreenText::SetShadowOffset((SpScreenText *)&v2->m_pkRemainMonNumsToKill->m_spTextGeom.m_pObject->vfptr, 1u);
      }
    }
  }
  ((void (__stdcall *)(_DWORD))v2->m_minuteTxtWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  v4 = v2->m_minuteTxtWin->vfptr;
  v5 = fs("%02d:%02d", KQuestTimeWin::m_second / 0x3C % 0x3C, KQuestTimeWin::m_second % 0x3C);
  v4[118].__vecDelDtor((NiRefObject *)v2->m_minuteTxtWin, (unsigned int)v5);
  if ( KQuestTimeWin::m_second >= 0x3C )
  {
    if ( KQuestTimeWin::m_second >= 0x12C )
      goto LABEL_15;
    v6 = v2->m_minuteTxtWin->vfptr[117].__vecDelDtor;
  }
  else
  {
    v6 = v2->m_minuteTxtWin->vfptr[117].__vecDelDtor;
    if ( !(KQuestTimeWin::m_second & 1) )
    {
      ((void (__stdcall *)(_DWORD))v6)(&Color::m_kDxWhiteColor);
      goto LABEL_15;
    }
  }
  ((void (__stdcall *)(_DWORD))v6)(&Color::m_kDxRedColor);
LABEL_15:
  if ( !v2->m_bTextOutTimeLimit && KQuestTimeWin::m_second == 300 )
  {
    v7 = (GameFrameWork *)v2->m_pkFrameWork;
    v8 = TextData::Get(0xBAEA2A3E);
    GameFrameWork::AddSysMsg(v7, (const char *)v8);
    v2->m_bTextOutTimeLimit = 1;
  }
  if ( KQuestTimeWin::m_second == 60 )
    SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_KQLast);
}
// A8E1B4: using guessed type unsigned int KQuestTimeWin::m_second;

//----- (005F7E80) --------------------------------------------------------
void __thiscall KQuestTimeWin::SetRequiredKillMobNums(KQuestTimeWin *this, int iNums)
{
  KQuestTimeWin *v2; // esi@1
  PgWinText *v3; // eax@1
  NiRefObjectVtbl *v4; // edi@2
  char *v5; // eax@2
  int v6; // ST04_4@2
  char *v7; // eax@2
  char *v8; // eax@2
  char *v9; // eax@4

  v2 = this;
  v3 = this->m_pkRemainMonNumsToKill;
  this->m_iRequiredKillMonNums = iNums;
  if ( v3 )
  {
    v4 = v3->vfptr;
    v5 = fs("%d", iNums);
    v4[118].__vecDelDtor((NiRefObject *)v2->m_pkRemainMonNumsToKill, (unsigned int)v5);
    v6 = v2->m_iRequiredKillMonNums;
    v7 = (char *)TextData2::Get(0xAFDAD647);
    v8 = fs(v7, v6);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_apkKillCount->vfptr, v8);
  }
  if ( v2->m_iRequiredKillMonNums <= 0 )
  {
    ((void (__stdcall *)(_DWORD))v2->m_pkRemainMonNumsToKill->vfptr[64].__vecDelDtor)(0);
    v9 = (char *)TextData2::Get(0x78C0D8F8u);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_apkKillCount->vfptr, v9);
  }
}

//----- (005F7F20) --------------------------------------------------------
KQuestTimeWin *__cdecl KQuestTimeWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  KQuestTimeWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1A0u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    LOBYTE(v6) = 1;
    v2->vfptr = (NiRefObjectVtbl *)&KQuestTimeWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&KQuestTimeWin::`vftable'{for `IDirectMessenger'};
    CNSTimer_Interval::CNSTimer_Interval((CNSTimer_Interval *)&v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]);
    LODWORD(v2[1].m_kWorld.m_Rotate.m_pEntry[0][1]) = 0;
    LOBYTE(v2[1].m_kWorld.m_Rotate.m_pEntry[0][2]) = 0;
    LODWORD(v2[1].m_kWorld.m_Rotate.m_pEntry[1][0]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (KQuestTimeWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9B30EC: using guessed type void (__thiscall *KQuestTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B310C: using guessed type int (__thiscall *KQuestTimeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005F8080) --------------------------------------------------------
KQuestTimeWin *__thiscall KQuestTimeWin::`vector deleting destructor'(KQuestTimeWin *this, unsigned int a2)
{
  KQuestTimeWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&KQuestTimeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&KQuestTimeWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B30EC: using guessed type void (__thiscall *KQuestTimeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B310C: using guessed type int (__thiscall *KQuestTimeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005F80C0) --------------------------------------------------------
char *__cdecl NpcDlgScript::ActionToken()
{
  return "action";
}

//----- (005F80D0) --------------------------------------------------------
char *__cdecl NpcDlgScript::TypeToken()
{
  return "type";
}

//----- (005F80E0) --------------------------------------------------------
void **__cdecl NpcDlgScript::BtnToken()
{
  return &off_9B333C;
}
// 9B333C: using guessed type void *off_9B333C;

//----- (005F80F0) --------------------------------------------------------
char *__cdecl NpcDlgScript::ScriptToken()
{
  return "script";
}

//----- (005F8100) --------------------------------------------------------
char *__cdecl NpcDlgScript::TextToken()
{
  return "text";
}

//----- (005F8110) --------------------------------------------------------
char *__cdecl NpcDlgScript::GetText(CTextDataMem *rtd, INode *pkNode)
{
  CFieldNode *v2; // eax@1
  char *result; // eax@2

  v2 = INode::FindField(pkNode, "text");
  if ( v2 )
  {
    CTextDataMem::ReadFieldStr(rtd, v2, acText, 2047);
    result = acText;
  }
  else
  {
    result = (char *)&unk_9B3333;
  }
  return result;
}

//----- (005F8150) --------------------------------------------------------
char *__cdecl NpcDlgScript::GetAction(CTextDataMem *rtd, INode *pkNode)
{
  CFieldNode *v2; // eax@1
  char *result; // eax@2

  v2 = INode::FindField(pkNode, "action");
  if ( v2 )
  {
    CTextDataMem::ReadFieldStr(rtd, v2, acText_0, 63);
    result = acText_0;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (005F8180) --------------------------------------------------------
void __thiscall FlexDlgBtn::FlexDlgBtn(FlexDlgBtn *this)
{
  FlexDlgBtn *v1; // esi@1

  v1 = this;
  PgWinBut::PgWinBut((PgWinBut *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&FlexDlgBtn::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&FlexDlgBtn::`vftable'{for `IDirectMessenger'};
}
// 9B389C: using guessed type void (__thiscall *FlexDlgBtn::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B38BC: using guessed type int (__thiscall *FlexDlgBtn::`vftable'{for `NiNode'})(void *p, char);

//----- (005F81A0) --------------------------------------------------------
void __thiscall FlexDlgBtn::~FlexDlgBtn(FlexDlgBtn *this)
{
  this->vfptr = (NiRefObjectVtbl *)&FlexDlgBtn::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&FlexDlgBtn::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
}
// 9B389C: using guessed type void (__thiscall *FlexDlgBtn::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B38BC: using guessed type int (__thiscall *FlexDlgBtn::`vftable'{for `NiNode'})(void *p, char);

//----- (005F81C0) --------------------------------------------------------
void __thiscall FlexDlgBtn::SetBtnWidth(FlexDlgBtn *this, int iWidth)
{
  FlexDlgBtn *v2; // esi@1
  PgWinSpr *v3; // edi@1
  int v4; // ebx@1
  unsigned int v5; // eax@1
  int v6; // ebx@1
  PgWinSpr *v7; // edi@2
  int v8; // ebx@2
  int v9; // edi@3
  int v10; // edi@3
  void *(__thiscall *v11)(NiRefObject *, unsigned int); // eax@3
  PgWinSpr *v12; // ecx@3
  int v13; // eax@3
  PgWinText *v14; // ecx@3
  NiRefObjectVtbl *v15; // ebx@3
  int v16; // eax@3
  NiRefObjectVtbl *v17; // ebx@3
  int v18; // eax@3
  tagRECT kRect; // [sp+Ch] [bp-14h]@3

  v2 = this;
  v3 = this->m_pkRight;
  v4 = ((int (*)(void))this->m_pkLeft->vfptr[36].__vecDelDtor)();
  v5 = v4 + ((int (__thiscall *)(_DWORD))v3->vfptr[36].__vecDelDtor)(v3) + 3;
  v6 = iWidth;
  if ( v5 > iWidth )
  {
    v7 = v2->m_pkRight;
    v8 = ((int (*)(void))v2->m_pkLeft->vfptr[36].__vecDelDtor)();
    v6 = v8 + ((int (__thiscall *)(_DWORD))v7->vfptr[36].__vecDelDtor)(v7) + 3;
  }
  v9 = v6 - ((int (*)(void))v2->m_pkLeft->vfptr[36].__vecDelDtor)();
  v10 = v9 - ((int (*)(void))v2->m_pkRight->vfptr[36].__vecDelDtor)();
  v11 = v2->vfptr[38].__vecDelDtor;
  v2->m_iBtnWidth = v6;
  v11((NiRefObject *)&v2->vfptr, v6);
  kRect.right = v2->m_iBtnWidth;
  v12 = v2->m_pkLeft;
  kRect.left = 0;
  kRect.top = 0;
  v13 = ((int (*)(void))v12->vfptr[37].__vecDelDtor)();
  v14 = v2->m_pkText;
  kRect.bottom = v13;
  ((void (__stdcall *)(_DWORD))v14->vfptr[115].__vecDelDtor)(&kRect);
  v15 = v2->m_pkMiddle->vfptr;
  v16 = ((int (*)(void))v2->m_pkLeft->vfptr[36].__vecDelDtor)();
  v15[43].__vecDelDtor((NiRefObject *)v2->m_pkMiddle, v16);
  ((void (__stdcall *)(_DWORD))v2->m_pkMiddle->vfptr[117].__vecDelDtor)(v10);
  v17 = v2->m_pkRight->vfptr;
  v18 = ((int (*)(void))v2->m_pkLeft->vfptr[36].__vecDelDtor)();
  v17[43].__vecDelDtor((NiRefObject *)v2->m_pkRight, v10 + v18);
}

//----- (005F8330) --------------------------------------------------------
void __thiscall FlexDlgBtn::OnChangeButShow(FlexDlgBtn *this, PgWinBut::ButShow eShow)
{
  if ( eShow )
  {
    if ( eShow == 1 )
    {
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))this->m_pkText->vfptr[116].__vecDelDtor)(0, 255, 204, 255);
    }
    else if ( eShow == 2 )
    {
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))this->m_pkText->vfptr[116].__vecDelDtor)(246, 255, 0, 255);
    }
  }
  else
  {
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))this->m_pkText->vfptr[116].__vecDelDtor)(255, 255, 255, 255);
  }
}

//----- (005F83C0) --------------------------------------------------------
void __thiscall TextBtn::TextBtn(TextBtn *this)
{
  TextBtn *v1; // esi@1

  v1 = this;
  PgWinBut::PgWinBut((PgWinBut *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&TextBtn::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&TextBtn::`vftable'{for `IDirectMessenger'};
}
// 9B3AF4: using guessed type void (__thiscall *TextBtn::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B3B14: using guessed type int (__thiscall *TextBtn::`vftable'{for `NiNode'})(void *p, char);

//----- (005F83E0) --------------------------------------------------------
void __thiscall TextBtn::~TextBtn(TextBtn *this)
{
  this->vfptr = (NiRefObjectVtbl *)&TextBtn::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&TextBtn::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
}
// 9B3AF4: using guessed type void (__thiscall *TextBtn::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B3B14: using guessed type int (__thiscall *TextBtn::`vftable'{for `NiNode'})(void *p, char);

//----- (005F8400) --------------------------------------------------------
void __thiscall TextBtn::OnChangeButShow(TextBtn *this, PgWinBut::ButShow eShow)
{
  TextBtn *v2; // esi@1
  int v3; // [sp+0h] [bp-4h]@0

  v2 = this;
  if ( eShow )
  {
    if ( eShow == 1 )
    {
      ((void (__stdcall *)(_DWORD, signed int, signed int, signed int, int))this->m_pkText->vfptr[116].__vecDelDtor)(
        0,
        255,
        204,
        255,
        v3);
      ((void (__cdecl *)(signed int))v2->m_pkDeco->vfptr[123].__vecDelDtor)(1);
    }
    else if ( eShow == 2 )
    {
      ((void (__stdcall *)(signed int, signed int, _DWORD, signed int, int))this->m_pkText->vfptr[116].__vecDelDtor)(
        54,
        255,
        0,
        255,
        v3);
      ((void (__cdecl *)(signed int))v2->m_pkDeco->vfptr[123].__vecDelDtor)(2);
    }
  }
  else
  {
    ((void (__stdcall *)(signed int, _DWORD, _DWORD, _DWORD, _DWORD))this->m_pkText->vfptr[116].__vecDelDtor)(
      246,
      255,
      0,
      255,
      v3);
    ((void (__cdecl *)(_DWORD))v2->m_pkDeco->vfptr[123].__vecDelDtor)(0);
  }
}

//----- (005F84A0) --------------------------------------------------------
void __thiscall AutoSizingDialogWin::AutoSizingDialogWin(AutoSizingDialogWin *this)
{
  AutoSizingDialogWin *v1; // esi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->m_pkFont = 0;
  v1->m_dwCurrentRunningScenarioID = 0;
  v1->vfptr = (NiRefObjectVtbl *)&AutoSizingDialogWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&AutoSizingDialogWin::`vftable'{for `IDirectMessenger'};
  v1->m_uiVerticalGap = 4;
  v1->m_dwCurrQuestID = -1;
  v1->m_byCurrScriptCmd = -1;
}
// 9B3D4C: using guessed type void (__thiscall *AutoSizingDialogWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B3D6C: using guessed type int (__thiscall *AutoSizingDialogWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005F84F0) --------------------------------------------------------
void __thiscall AutoSizingDialogWin::~AutoSizingDialogWin(AutoSizingDialogWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&AutoSizingDialogWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&AutoSizingDialogWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
}
// 9B3D4C: using guessed type void (__thiscall *AutoSizingDialogWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B3D6C: using guessed type int (__thiscall *AutoSizingDialogWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005F8510) --------------------------------------------------------
void __thiscall AutoSizingDialogWin::SetVerticalGap(AutoSizingDialogWin *this, int iGap)
{
  SpScreenText **v2; // esi@1
  signed int v3; // edi@1

  v2 = (SpScreenText **)this->m_apkTextGeoms;
  v3 = 3;
  do
  {
    SpScreenText::SetVerticalGap(*v2, iGap);
    ++v2;
    --v3;
  }
  while ( v3 );
}

//----- (005F8540) --------------------------------------------------------
void __thiscall SpeechBubbleDlgWin::SpeechBubbleDlgWin(SpeechBubbleDlgWin *this)
{
  SpeechBubbleDlgWin *v1; // esi@1

  v1 = this;
  SpeechBubbleWin::SpeechBubbleWin((SpeechBubbleWin *)&this->vfptr);
  v1->m_pkRewardWin = 0;
  v1->m_bClickPortalNPC = 0;
  v1->m_pkDlgQuestListWin = 0;
  v1->m_bShowOutLine = 0;
  v1->m_bSelectReward = 0;
  v1->m_uiDefaultRewardWinWidth = 0;
  v1->vfptr = (NiRefObjectVtbl *)&SpeechBubbleDlgWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&SpeechBubbleDlgWin::`vftable'{for `IDirectMessenger'};
}
// 9B3F38: using guessed type void (__thiscall *SpeechBubbleDlgWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B3F54: using guessed type int (__thiscall *SpeechBubbleDlgWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005F8590) --------------------------------------------------------
void __thiscall SpeechBubbleDlgWin::~SpeechBubbleDlgWin(SpeechBubbleDlgWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&SpeechBubbleDlgWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SpeechBubbleDlgWin::`vftable'{for `IDirectMessenger'};
  SpeechBubbleWin::~SpeechBubbleWin((SpeechBubbleWin *)&this->vfptr);
}
// 9B3F38: using guessed type void (__thiscall *SpeechBubbleDlgWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B3F54: using guessed type int (__thiscall *SpeechBubbleDlgWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005F85B0) --------------------------------------------------------
void __thiscall SpeechBubbleDlgWin::ShowOutLineBtn(SpeechBubbleDlgWin *this, int b)
{
  if ( this->m_bShowOutLine )
    ((void (__stdcall *)(_DWORD))this->m_apkOutLineBtns->vfptr[64].__vecDelDtor)(b);
}

//----- (005F85E0) --------------------------------------------------------
void __thiscall SpeechBubbleDlgWin::SetShowOutLineBtn(SpeechBubbleDlgWin *this, int b)
{
  this->m_bShowOutLine = b;
  ((void (__stdcall *)(_DWORD))this->m_apkOutLineBtns->vfptr[64].__vecDelDtor)(b);
}

//----- (005F8610) --------------------------------------------------------
int __thiscall SpeechBubbleDlgWin::GetBtnCount(SpeechBubbleDlgWin *this)
{
  AutoSizingDialogWin *v1; // eax@1
  int result; // eax@2

  v1 = this->m_pkDialog;
  if ( v1 )
    result = v1->m_iBtnCount;
  else
    result = 0;
  return result;
}

//----- (005F8630) --------------------------------------------------------
void __thiscall NpcDialogWin::ShowOutLineBtn(NpcDialogWin *this, float fCurTime)
{
  NpcDialogWin *v2; // esi@1
  SpeechBubbleDlgWin *v3; // eax@3

  v2 = this;
  if ( CNSTimer_Interval::IsRun_GetCount(&this->m_kRandomTimer_Interval, fCurTime) )
    v2->m_bCheckTimer = v2->m_bCheckTimer == 0;
  v3 = v2->m_pkNpcDlgWin;
  if ( v3->m_bShowOutLine )
    ((void (__stdcall *)(_DWORD))v3->m_apkOutLineBtns->vfptr[64].__vecDelDtor)(v2->m_bCheckTimer);
}

//----- (005F8690) --------------------------------------------------------
bool __cdecl DlgQuestListWin::QuestNameList::SortType(DlgQuestListWin::QuestNameList *lhw, DlgQuestListWin::QuestNameList *rhw)
{
  unsigned int *v2; // eax@1
  unsigned int *v3; // ecx@1
  bool result; // al@2

  v2 = (&DlgQuestListWin::QuestNameList::ms_TypePriority)[lhw->m_Type];
  v3 = (&DlgQuestListWin::QuestNameList::ms_TypePriority)[rhw->m_Type];
  if ( v2 == v3 )
    result = 0;
  else
    result = v2 < v3;
  return result;
}
// A8E1B8: using guessed type unsigned int *DlgQuestListWin::QuestNameList::ms_TypePriority;

//----- (005F86C0) --------------------------------------------------------
bool __cdecl DlgQuestListWin::QuestNameList::SortRepeatable(DlgQuestListWin::QuestNameList *lhw, DlgQuestListWin::QuestNameList *rhw)
{
  return lhw->m_Repeatable == rhw->m_Repeatable ? 0 : lhw->m_Repeatable;
}

//----- (005F86E0) --------------------------------------------------------
bool __cdecl DlgQuestListWin::QuestNameList::SortStartItem(DlgQuestListWin::QuestNameList *lhw, DlgQuestListWin::QuestNameList *rhw)
{
  return lhw->m_StartItem == rhw->m_StartItem ? 0 : lhw->m_StartItem;
}

//----- (005F8700) --------------------------------------------------------
bool __cdecl DlgQuestListWin::QuestNameList::SortStartQuest(DlgQuestListWin::QuestNameList *lhw, DlgQuestListWin::QuestNameList *rhw)
{
  return lhw->m_StartQuest == rhw->m_StartQuest ? 0 : lhw->m_StartQuest;
}

//----- (005F8720) --------------------------------------------------------
bool __cdecl DlgQuestListWin::QuestNameList::SortEvent(DlgQuestListWin::QuestNameList *lhw, DlgQuestListWin::QuestNameList *rhw)
{
  char v2; // al@1
  bool result; // al@2

  v2 = lhw->m_Type;
  if ( v2 == rhw->m_Type )
    result = 0;
  else
    result = v2 == 3;
  return result;
}

//----- (005F8740) --------------------------------------------------------
BOOL __cdecl DlgQuestListWin::QuestNameList::SortLevel(DlgQuestListWin::QuestNameList *lhw, DlgQuestListWin::QuestNameList *rhw)
{
  return rhw->m_Level < lhw->m_Level;
}

//----- (005F8760) --------------------------------------------------------
bool __cdecl DlgQuestListWin::QuestNameList::SortStatus(DlgQuestListWin::QuestNameList *lhw, DlgQuestListWin::QuestNameList *rhw)
{
  unsigned int *v2; // eax@1
  unsigned int *v3; // ecx@1
  bool result; // al@2

  v2 = (&DlgQuestListWin::QuestNameList::ms_StatusPriority)[lhw->m_Status];
  v3 = (&DlgQuestListWin::QuestNameList::ms_StatusPriority)[rhw->m_Status];
  if ( v2 == v3 )
    result = 0;
  else
    result = v2 < v3;
  return result;
}
// A8E1E8: using guessed type unsigned int *DlgQuestListWin::QuestNameList::ms_StatusPriority;

//----- (005F8790) --------------------------------------------------------
void __thiscall DlgQuestListWin::DlgQuestListWin(DlgQuestListWin *this)
{
  DlgQuestListWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_currTalkingNpcID = -1;
  v1->vfptr = (NiRefObjectVtbl *)&DlgQuestListWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&DlgQuestListWin::`vftable'{for `IDirectMessenger'};
}
// 9B4178: using guessed type void (__thiscall *DlgQuestListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B4194: using guessed type int (__thiscall *DlgQuestListWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005F87C0) --------------------------------------------------------
void __thiscall DlgQuestListWin::~DlgQuestListWin(DlgQuestListWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&DlgQuestListWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&DlgQuestListWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9B4178: using guessed type void (__thiscall *DlgQuestListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B4194: using guessed type int (__thiscall *DlgQuestListWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005F87E0) --------------------------------------------------------
void __thiscall DlgQuestListWin::OnQuestListLClick(DlgQuestListWin *this, int nIndex)
{
  DlgQuestListWin *v2; // esi@1
  unsigned int dwQuestID; // [sp+4h] [bp-4h]@1

  v2 = this;
  if ( SlideListWin::GetData(this->m_pListWinQuestList, nIndex, &dwQuestID) )
  {
    LOWORD(nIndex) = v2->m_currTalkingNpcID;
    HIWORD(nIndex) = dwQuestID;
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x11u, 0xFu, &nIndex, 4);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
  }
}

//----- (005F8840) --------------------------------------------------------
void __thiscall DlgQuestListWin::UpdateMeWin(DlgQuestListWin *this, float fCurTime)
{
  DlgQuestListWin *v2; // esi@1

  v2 = this;
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
    GameFrameWork::UpdateUIScroll(v2->m_pListWinQuestList, v2->m_pSlideBarList);
}

//----- (005F8870) --------------------------------------------------------
void DlgQuestListWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "QuestList");
}

//----- (005F88A0) --------------------------------------------------------
void __cdecl NpcBaseTextParsing(char *pcText, char *acResult, int iMaxStrLen)
{
  char *v3; // ebx@1
  char v4; // al@1
  int v5; // esi@1
  Name5 *v6; // eax@5
  unsigned int v7; // ecx@5
  unsigned int v8; // edx@5
  unsigned int v9; // ecx@5
  unsigned int v10; // edx@5
  char v11; // al@5
  char *v12; // ecx@6
  char acUserID[64]; // [sp+10h] [bp-44h]@5

  v3 = pcText;
  v4 = *pcText;
  v5 = 0;
  if ( *pcText )
  {
    while ( 1 )
    {
      if ( v5 >= iMaxStrLen - 1 )
        goto LABEL_12;
      if ( v4 != 37 )
        break;
      if ( *++v3 == 110 )
      {
        v6 = User::GetMainCharID(&g_kUser);
        v7 = v6->n5_code[1];
        *(_DWORD *)acUserID = v6->n5_code[0];
        v8 = v6->n5_code[2];
        *(_DWORD *)&acUserID[4] = v7;
        v9 = v6->n5_code[3];
        *(_DWORD *)&acUserID[8] = v8;
        v10 = v6->n5_code[4];
        v11 = acUserID[0];
        *(_DWORD *)&acUserID[12] = v9;
        *(_DWORD *)&acUserID[16] = v10;
        acUserID[20] = 0;
        if ( acUserID[0] )
        {
          v12 = &acUserID[-v5];
          do
          {
            acResult[v5] = v11;
            v11 = v12[v5++ + 1];
          }
          while ( v11 );
        }
        goto LABEL_10;
      }
LABEL_11:
      v4 = *v3;
      if ( !*v3 )
        goto LABEL_12;
    }
    acResult[v5++] = v4;
LABEL_10:
    ++v3;
    goto LABEL_11;
  }
LABEL_12:
  acResult[v5] = 0;
}

//----- (005F8940) --------------------------------------------------------
char __thiscall TextBtn::Create(TextBtn *this, int iXPos, int iYPos, PgSprData *pkDeco, PgFont *pkFont, PgWin *pkParent, unsigned int uiCmdMsg)
{
  unsigned int v7; // ebx@1
  TextBtn *v8; // esi@1
  char result; // al@1
  PgWinSpr *v10; // eax@2
  PgWinSpr *v11; // ecx@2
  NiRefObjectVtbl *v12; // edi@2
  int v13; // eax@2
  PgWinText *v14; // eax@2
  NiRefObjectVtbl *v15; // edi@2
  int v16; // eax@2
  NiRefObjectVtbl *v17; // edi@2
  int v18; // eax@2

  v7 = pkFont->m_dwFontSizeInPixel;
  v8 = this;
  result = PgWinBut::Create((PgWinBut *)&this->vfptr, iXPos, iYPos, 1u, v7, pkParent, uiCmdMsg, 0, 0);
  if ( result )
  {
    v10 = PgWinSpr::CreateWin(0, 0, pkDeco, (PgWin *)&v8->vfptr, 0, 0);
    v8->m_pkDeco = v10;
    v10->vfptr[60].__vecDelDtor((NiRefObject *)v10, 0);
    v11 = v8->m_pkDeco;
    v12 = v11->vfptr;
    v13 = ((int (*)(void))v11->vfptr[37].__vecDelDtor)();
    v12[44].__vecDelDtor((NiRefObject *)v8->m_pkDeco, (v7 - v13) >> 1);
    v14 = PgWinText::CreateWin(0, 0, 1u, v7, pkFont, (PgWin *)&v8->vfptr, 0, 0);
    v8->m_pkText = v14;
    ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v14->vfptr[116].__vecDelDtor)(v14, 246, 255, 0, 255);
    v15 = v8->m_pkText->vfptr;
    v16 = ((int (*)(void))v8->m_pkDeco->vfptr[36].__vecDelDtor)();
    v15[43].__vecDelDtor((NiRefObject *)v8->m_pkText, v16 + 3);
    ((void (__stdcall *)(_DWORD))v8->m_pkText->vfptr[122].__vecDelDtor)(4);
    ((void (__stdcall *)(_DWORD))v8->m_pkText->vfptr[60].__vecDelDtor)(0);
    v17 = v8->vfptr;
    v18 = ((int (*)(void))v8->m_pkDeco->vfptr[36].__vecDelDtor)();
    v17[38].__vecDelDtor((NiRefObject *)v8, v18);
    result = 1;
  }
  return result;
}

//----- (005F8A80) --------------------------------------------------------
unsigned int __stdcall AutoSizingDialogWin::CalculateApproximateHeight(NiTList<AutoSizingDialogWin::VirtualRect *> *rkVRList, unsigned int *ruiWidth)
{
  NiTListItem<AutoSizingDialogWin::VirtualRect *> *v3; // eax@1
  unsigned int v4; // edx@1
  AutoSizingDialogWin::VirtualRect *v5; // ecx@2
  unsigned int v6; // ecx@3
  NiTListItem<AutoSizingDialogWin::VirtualRect *> *v7; // ecx@8
  unsigned int result; // eax@8
  unsigned int v9; // ebx@9
  AutoSizingDialogWin::VirtualRect *v10; // esi@10
  int v11; // eax@12
  unsigned int uiHeight; // [sp+10h] [bp+8h]@8

  v3 = rkVRList->m_pkHead;
  v4 = 0;
  if ( v3 )
  {
    do
    {
      v5 = v3->m_element;
      v3 = v3->m_pkNext;
      if ( v5->bFixed )
      {
        v6 = v5->uiWidth;
        if ( v4 < v6 )
          v4 = v6;
      }
    }
    while ( v3 );
    if ( *ruiWidth < v4 )
      *ruiWidth = v4;
  }
  v7 = rkVRList->m_pkHead;
  result = 0;
  uiHeight = 0;
  if ( v7 )
  {
    v9 = *ruiWidth;
    do
    {
      v10 = v7->m_element;
      v7 = v7->m_pkNext;
      if ( v10->uiWidth / v9 && v10->uiWidth != v9 )
        v11 = v10->uiHeight * (v10->uiWidth / v9 + 1);
      else
        v11 = v10->uiHeight;
      uiHeight += v11;
    }
    while ( v7 );
    result = uiHeight;
  }
  return result;
}

//----- (005F8B00) --------------------------------------------------------
void __thiscall AutoSizingDialogWin::AddTextGeomtry(AutoSizingDialogWin *this, unsigned int uiWidth, unsigned int *ruiYPos, char *acText)
{
  AutoSizingDialogWin *v4; // esi@1
  PgTextGeometry *v5; // eax@1
  float v6; // ST1C_4@1
  PgTextGeometry *v7; // eax@1

  v4 = this;
  v5 = this->m_apkTextGeoms[this->m_iTextGeomCount];
  v5->m_uFlags &= 0xFFFEu;
  v6 = (double)*ruiYPos;
  v7 = v4->m_apkTextGeoms[v4->m_iTextGeomCount];
  v7->m_kLocal.m_Translate.x = 0.0;
  v7->m_kLocal.m_Translate.y = v6;
  v7->m_kLocal.m_Translate.z = 0.0;
  SpScreenText::SetDrawRect((SpScreenText *)&v4->m_apkTextGeoms[v4->m_iTextGeomCount]->vfptr, 0, 0, uiWidth, 10);
  ((void (__stdcall *)(char *))v4->m_apkTextGeoms[v4->m_iTextGeomCount]->vfptr[37].__vecDelDtor)(acText);
  *ruiYPos += ((int (*)(void))v4->m_apkTextGeoms[v4->m_iTextGeomCount]->vfptr[40].__vecDelDtor)();
  ++v4->m_iTextGeomCount;
}

//----- (005F8BC0) --------------------------------------------------------
void __thiscall AutoSizingDialogWin::Approximation(AutoSizingDialogWin *this, NiTList<AutoSizingDialogWin::VirtualRect *> *rkVRList, unsigned int *ruiWidth, unsigned int *ruiHeight)
{
  unsigned int *v4; // edi@1
  unsigned int v5; // ebx@1
  unsigned int v6; // esi@1
  unsigned int v7; // edx@3
  float v8; // ST14_4@3
  NiTListItem<AutoSizingDialogWin::VirtualRect *> *v9; // ebx@7
  unsigned int v10; // esi@7
  AutoSizingDialogWin::VirtualRect *v11; // eax@8
  unsigned int v12; // eax@9
  unsigned int uiAboutMinWidth; // [sp+10h] [bp-8h]@1
  AutoSizingDialogWin *v14; // [sp+14h] [bp-4h]@1
  int i; // [sp+24h] [bp+Ch]@1

  v4 = ruiWidth;
  v5 = *ruiWidth;
  v14 = this;
  uiAboutMinWidth = 0;
  i = 0;
  v6 = v5;
  do
  {
    if ( v6 <= 5 )
      break;
    v7 = *v4;
    *v4;
    v8 = (double)*v4 / (double)*ruiHeight;
    if ( v8 <= 2.4000001 )
    {
      v6 = v5 - v7;
      uiAboutMinWidth = *v4;
      *v4 = v7 + ((v5 - v7) >> 1);
      *ruiHeight = AutoSizingDialogWin::CalculateApproximateHeight(v14, rkVRList, v4);
    }
    else
    {
      v5 = *v4;
      v6 = v7 - uiAboutMinWidth;
      *v4 = v7 - ((v7 - uiAboutMinWidth) >> 1);
      *ruiHeight = AutoSizingDialogWin::CalculateApproximateHeight(v14, rkVRList, v4);
    }
    ++i;
  }
  while ( i < 50 );
  v9 = rkVRList->m_pkHead;
  v10 = 99999999;
  if ( v9 )
  {
    do
    {
      v11 = v9->m_element;
      v9 = v9->m_pkNext;
      if ( v11->bFixed )
      {
        v12 = v11->uiWidth;
        if ( v10 > v12 )
          v10 = v12;
      }
      else if ( *v4 && v10 > v11->uiWidth % *v4 )
      {
        v10 = v11->uiWidth % *v4;
      }
    }
    while ( v9 );
    if ( v10 < 0x3C )
    {
      *v4 += v10 + 40;
      *ruiHeight = AutoSizingDialogWin::CalculateApproximateHeight(v14, rkVRList, v4);
    }
  }
  if ( *v4 > 0x258 )
  {
    *v4 = 600;
    *ruiHeight = AutoSizingDialogWin::CalculateApproximateHeight(v14, rkVRList, v4);
  }
}

//----- (005F8D00) --------------------------------------------------------
void __thiscall SpeechBubbleDlgWin::ProcessMeInput(SpeechBubbleDlgWin *this, bool *bHit)
{
  SpeechBubbleDlgWin *v2; // edi@1
  AutoSizingDialogWin *v3; // eax@3
  NiObjectNET *v4; // esi@5
  NiExtraData *v5; // eax@6
  const char *v6; // eax@7

  v2 = this;
  if ( dword_B6479C >= 1
    && (unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD))this->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY) == 1 )
  {
    v3 = v2->m_pkDialog;
    if ( v3 )
    {
      if ( v3->m_iBtnCount == 1 )
      {
        v4 = (NiObjectNET *)&v3->m_apkBtns[0]->vfptr;
        if ( v4 )
        {
          v5 = NiObjectNET::GetExtraData(v4, "action");
          if ( v5 )
          {
            v6 = (const char *)v5[1].vfptr;
            if ( v6 )
            {
              if ( !strncmp(v6, "quest_ack", 9u) )
                PgWin::PostCommandMsg((PgWin *)&v2->vfptr, 0x12FD1u, (int)v4);
            }
          }
        }
      }
    }
  }
  PgWinFrame::ProcessMeInput((PgWinFrame *)&v2->vfptr, bHit);
}
// B6479C: using guessed type int dword_B6479C;

//----- (005F8DA0) --------------------------------------------------------
void __thiscall SpeechBubbleDlgWin::DirectMessage(SpeechBubbleDlgWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  SpeechBubbleDlgWin *v4; // esi@1

  v4 = this;
  if ( iMsgTag == 15 )
  {
    if ( this->m_uiRefCount )
    {
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(*(_DWORD *)this->m_uiRefCount + 4))(15, pvBody, this);
      if ( v4->m_uiRefCount )
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(*(_DWORD *)v4->m_uiRefCount + 20))(15, pvBody, v4);
    }
    ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD))v4->vfptr[5].__vecDelDtor)(v4, 15, pvBody, v4);
  }
}

//----- (005F8DF0) --------------------------------------------------------
void __thiscall NpcDialogWin::NpcDialogWin(NpcDialogWin *this)
{
  NpcDialogWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&NpcDialogWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&NpcDialogWin::`vftable'{for `IDirectMessenger'};
  v1->m_spFaceCut.m_pObject = 0;
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kRandomTimer_Interval);
  v1->m_currTalkingNpcID = -1;
  v1->m_uiDivorceSelect = 0;
}
// 9B43DC: using guessed type void (__thiscall *NpcDialogWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B43FC: using guessed type int (__thiscall *NpcDialogWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005F8E80) --------------------------------------------------------
void __thiscall NpcDialogWin::~NpcDialogWin(NpcDialogWin *this)
{
  NpcDialogWin *v1; // esi@1
  PgWinSpr *v2; // edi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&NpcDialogWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&NpcDialogWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spFaceCut.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9B43DC: using guessed type void (__thiscall *NpcDialogWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B43FC: using guessed type int (__thiscall *NpcDialogWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005F8F10) --------------------------------------------------------
void __thiscall NpcDialogWin::SetCloseTime(NpcDialogWin *this, float fCloseTime)
{
  this->m_bCloseTimerEnabled = 1;
  this->m_fTimeToClose = Timer::ms_fCurTime + fCloseTime;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (005F8F30) --------------------------------------------------------
void __thiscall NpcDialogWin::CheckCloseTimer(NpcDialogWin *this, unsigned int wDlgID)
{
  NpcDialogWin *v2; // edi@1
  CClientQuest *v3; // esi@1
  signed int v4; // eax@1
  double v5; // st7@5
  DialogParser::TokenDetail kDetail; // [sp+8h] [bp-Ch]@1
  QuestDialogParser kParser; // [sp+10h] [bp-4h]@1

  v2 = this;
  this->m_bCloseTimerEnabled = 0;
  v3 = QuestDataMgr::GetQuest();
  DialogParser::DialogParser((DialogParser *)&kParser.m_pcCurrentStr);
  QuestDialogParser::StartParsing(&kParser, (CQuest *)&v3->vfptr, wDlgID);
  v4 = DialogParser::Parse((DialogParser *)&kParser.m_pcCurrentStr, &kDetail);
  if ( v4 != 11 )
  {
    while ( v4 != 15 )
    {
      v4 = DialogParser::Parse((DialogParser *)&kParser.m_pcCurrentStr, &kDetail);
      if ( v4 == 11 )
        return;
    }
    v5 = (double)kDetail.kScenarioNumber.iScenarioNumber;
    v2->m_bCloseTimerEnabled = 1;
    v2->m_fTimeToClose = v5 + Timer::ms_fCurTime;
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (005F8FB0) --------------------------------------------------------
void __thiscall NpcDialogWin::OnClose(NpcDialogWin *this)
{
  NpcDialogWin *v1; // esi@1
  SpeechBubbleDlgWin *v2; // eax@1
  GameFrameWork *v3; // eax@3
  AutoSizingDialogWin *v4; // edx@4

  v1 = this;
  v2 = this->m_pkNpcDlgWin;
  v2->m_bShowOutLine = 0;
  v2->m_apkOutLineBtns->vfptr[64].__vecDelDtor((NiRefObject *)v2->m_apkOutLineBtns, 0);
  if ( (unsigned __int8)((int (*)(void))v1->m_spFaceCut.m_pObject->vfptr[65].__vecDelDtor)() == 1 )
    ((void (__stdcall *)(_DWORD))v1->m_spFaceCut.m_pObject->vfptr[64].__vecDelDtor)(0);
  v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v3 )
  {
    v4 = v1->m_pkNpcDlgWin->m_pkDialog;
    if ( v4 )
    {
      if ( v4->m_iBtnCount > 1 )
        GameFrameWork::OpenPlayGuideWin(v3, BIL_BEGINNER_1);
    }
  }
}

//----- (005F9040) --------------------------------------------------------
void __thiscall NpcDialogWin::CloseDialog(NpcDialogWin *this)
{
  NpcDialogWin *v1; // esi@1
  SpeechBubbleDlgWin *v2; // eax@1
  SpeechBubbleDlgWin *v3; // esi@3
  PgWin *v4; // esi@4
  GameFrameWork *v5; // eax@6

  v1 = this;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 8u, 0xBu, 0, 0);
  ((void (__stdcall *)(_DWORD))v1->m_spFaceCut.m_pObject->vfptr[64].__vecDelDtor)(0);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
  v2 = v1->m_pkNpcDlgWin;
  if ( v2 )
    v2->m_bClickPortalNPC = 0;
  v3 = v1->m_pkNpcDlgWin;
  if ( v3 )
  {
    v4 = (PgWin *)&v3->m_pkDlgQuestListWin->vfptr;
    if ( v4 )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, v4);
  }
  v5 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v5 )
    GameFrameWork::OpenPlayGuideWin(v5, BIL_BEGINNER_1);
}

//----- (005F90D0) --------------------------------------------------------
void __thiscall DlgQuestListWin::UpDateListSideBar(DlgQuestListWin *this)
{
  DlgQuestListWin *v1; // esi@1
  SlideBar *v2; // ecx@1
  SlideListWin *v3; // eax@2

  v1 = this;
  v2 = this->m_pSlideBarList;
  if ( v2 )
  {
    v3 = v1->m_pListWinQuestList;
    if ( v3 )
    {
      SlideBar::SetSplitCnt(v2, v3->m_nSlideSplitCnt);
      v1->m_pListWinQuestList->m_nViewStartPos = v1->m_pSlideBarList->m_nCurPos;
      SlideListWin::UpdateViewList(v1->m_pListWinQuestList);
    }
  }
}

//----- (005F9120) --------------------------------------------------------
char __thiscall FlexDlgBtn::Create(FlexDlgBtn *this, int iXPos, int iYPos, PgSprData *pkLeft, PgSprData *pkRight, PgSprData *pkMiddle, PgWin *pkParent, unsigned int uiCmdMsg)
{
  FlexDlgBtn *v8; // esi@1
  char result; // al@4
  unsigned int v10; // eax@5
  PgWinSpr *v11; // eax@6
  PgWinSpr *v12; // eax@6
  PgWinSpr *v13; // eax@6
  PgWinSpr *v14; // edi@6
  PgFont *v15; // ST10_4@6
  unsigned int v16; // eax@6
  PgWinText *v17; // eax@6

  v8 = this;
  if ( (pkLeft || pkRight || pkMiddle)
    && (v10 = pkMiddle->m_akHitTester.m_pBase->m_pObject->m_uiWidth
            + pkRight->m_akHitTester.m_pBase->m_pObject->m_uiWidth
            + pkLeft->m_akHitTester.m_pBase->m_pObject->m_uiWidth,
        this->m_iBtnWidth = v10,
        PgWinBut::Create(
          (PgWinBut *)&this->vfptr,
          iXPos,
          iYPos,
          v10,
          pkLeft->m_akHitTester.m_pBase->m_pObject->m_uiHeight,
          pkParent,
          uiCmdMsg,
          0,
          0)) )
  {
    v11 = PgWinSpr::CreateWin(0, 0, pkLeft, (PgWin *)&v8->vfptr, 0, 0);
    v8->m_pkLeft = v11;
    v11->vfptr[60].__vecDelDtor((NiRefObject *)v11, 0);
    v12 = PgWinSpr::CreateWin(0, 0, pkRight, (PgWin *)&v8->vfptr, 0, 0);
    v8->m_pkRight = v12;
    v12->vfptr[60].__vecDelDtor((NiRefObject *)v12, 0);
    v13 = PgWinSpr::CreateWin(0, 0, pkMiddle, (PgWin *)&v8->vfptr, 0, 0);
    v8->m_pkMiddle = v13;
    v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
    v14 = v8->m_pkLeft;
    v15 = Font::Get(SMALL);
    v16 = ((int (__thiscall *)(_DWORD))v14->vfptr[37].__vecDelDtor)(v14);
    v17 = PgWinText::CreateWin(iXPos, iYPos, v8->m_iBtnWidth, v16, v15, (PgWin *)&v8->vfptr, 0, 0);
    v8->m_pkText = v17;
    v17->vfptr[122].__vecDelDtor((NiRefObject *)v17, 5u);
    ((void (__stdcall *)(_DWORD))v8->m_pkText->vfptr[60].__vecDelDtor)(0);
    FlexDlgBtn::SetBtnWidth(v8, v8->m_iBtnWidth);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (005F9280) --------------------------------------------------------
int __thiscall FlexDlgBtn::EstimateBtnWidth(FlexDlgBtn *this, char *pcText)
{
  FlexDlgBtn *v2; // esi@1
  PgWinSpr *v3; // edi@1
  int v4; // esi@1
  int v5; // eax@1
  tagSIZE kSize; // [sp+8h] [bp-8h]@1

  v2 = this;
  PgFont::GetTextSize(this->m_pkText->m_spTextGeom.m_pObject->m_spPgFont.m_pObject, pcText, strlen(pcText), &kSize);
  v3 = v2->m_pkRight;
  v4 = ((int (*)(void))v2->m_pkLeft->vfptr[36].__vecDelDtor)();
  v5 = ((int (__thiscall *)(_DWORD))v3->vfptr[36].__vecDelDtor)(v3);
  return kSize.cx + v4 + v5;
}

//----- (005F92F0) --------------------------------------------------------
void __thiscall FlexDlgBtn::SetBtnText(FlexDlgBtn *this, char *pcText, bool bAutoScale)
{
  FlexDlgBtn *v3; // esi@1
  PgWinSpr *v4; // ebx@2
  PgTextGeometry *v5; // edi@2
  int v6; // eax@2
  int v7; // ebx@2
  int v8; // eax@2

  v3 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkText->vfptr[118].__vecDelDtor)(pcText);
  if ( bAutoScale )
  {
    v4 = v3->m_pkRight;
    v5 = v3->m_pkText->m_spTextGeom.m_pObject;
    v6 = ((int (*)(void))v3->m_pkLeft->vfptr[36].__vecDelDtor)();
    v7 = ((int (__thiscall *)(_DWORD))v4->vfptr[36].__vecDelDtor)(v4) + v6;
    v8 = ((int (__thiscall *)(_DWORD))v5->vfptr[39].__vecDelDtor)(v5);
    FlexDlgBtn::SetBtnWidth(v3, v7 + v8);
  }
}

//----- (005F9370) --------------------------------------------------------
void __thiscall TextBtn::SetBtnText(TextBtn *this, char *pcText)
{
  TextBtn *v2; // esi@1
  PgWinText *v3; // ecx@1
  NiRefObjectVtbl *v4; // edi@1
  int v5; // eax@1
  tagSIZE kSize; // [sp+8h] [bp-1Ch]@1
  tagRECT kRect; // [sp+10h] [bp-14h]@1

  v2 = this;
  PgFont::GetTextSize(this->m_pkText->m_spTextGeom.m_pObject->m_spPgFont.m_pObject, pcText, strlen(pcText), &kSize);
  *(tagSIZE *)&kRect.right = kSize;
  v3 = v2->m_pkText;
  kRect.left = 0;
  kRect.top = 0;
  ((void (__stdcall *)(_DWORD))v3->vfptr[115].__vecDelDtor)(&kRect);
  ((void (__stdcall *)(_DWORD))v2->m_pkText->vfptr[118].__vecDelDtor)(pcText);
  v4 = v2->vfptr;
  v5 = ((int (*)(void))v2->m_pkDeco->vfptr[36].__vecDelDtor)();
  v4[38].__vecDelDtor((NiRefObject *)v2, v5 + kSize.cx + 3);
  v2->vfptr[39].__vecDelDtor((NiRefObject *)v2, kSize.cy);
}

//----- (005F9440) --------------------------------------------------------
int __thiscall TextBtn::EstimateBtnWidth(TextBtn *this, char *pcText)
{
  TextBtn *v2; // esi@1
  tagSIZE kSize; // [sp+8h] [bp-8h]@1

  v2 = this;
  PgFont::GetTextSize(this->m_pkText->m_spTextGeom.m_pObject->m_spPgFont.m_pObject, pcText, strlen(pcText), &kSize);
  return kSize.cx + ((int (*)(void))v2->m_pkDeco->vfptr[36].__vecDelDtor)();
}

//----- (005F94A0) --------------------------------------------------------
void __thiscall AutoSizingDialogWin::BuildVirtualRectOfNormalDlg(AutoSizingDialogWin *this, NiTList<AutoSizingDialogWin::VirtualRect *> *rkVRList, char *pcText, unsigned int *ruiMaxWidth, unsigned int *ruiMaxHeight)
{
  PgFont *v5; // ecx@1
  char *v6; // ebx@2
  char v7; // dl@3
  char *v8; // eax@3
  int v9; // eax@7
  AutoSizingDialogWin::VirtualRect *v10; // eax@8
  AutoSizingDialogWin::VirtualRect *v11; // edi@8
  NiTListItem<AutoSizingDialogWin::VirtualRect *> *v12; // eax@8
  NiTListItem<AutoSizingDialogWin::VirtualRect *> *v13; // ecx@8
  unsigned int *v14; // ecx@11
  int *v15; // eax@17
  tagSIZE kSize; // [sp+0h] [bp-10h]@6
  PgFont *pkFont; // [sp+8h] [bp-8h]@1
  AutoSizingDialogWin *v18; // [sp+Ch] [bp-4h]@1

  v18 = this;
  v5 = this->m_pkFont;
  pkFont = v5;
  if ( v5 )
  {
    v6 = pcText;
    if ( pcText )
    {
      v7 = *pcText;
      v8 = pcText;
      if ( *pcText )
      {
        do
        {
          if ( v7 == 10 )
          {
            if ( v8 >= v6 )
            {
              v9 = v5->m_dwFontSizeInPixel;
              kSize.cx = 1;
              kSize.cy = v9;
            }
            else
            {
              PgFont::GetTextSize(v5, v8, v6 - v8, &kSize);
            }
            v10 = (AutoSizingDialogWin::VirtualRect *)operator new(0xCu);
            v11 = v10;
            v10->uiHeight = kSize.cy + v18->m_uiVerticalGap;
            v10->uiWidth = kSize.cx;
            v10->bFixed = 0;
            v12 = rkVRList->vfptr->NewItem((NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *> *)rkVRList);
            v12->m_element = v11;
            v12->m_pkNext = 0;
            v12->m_pkPrev = rkVRList->m_pkTail;
            v13 = rkVRList->m_pkTail;
            if ( v13 )
              v13->m_pkNext = v12;
            else
              rkVRList->m_pkHead = v12;
            v14 = ruiMaxWidth;
            ++rkVRList->m_kAllocator.m_uiCount;
            rkVRList->m_pkTail = v12;
            if ( kSize.cx > *v14 )
              *v14 = kSize.cx;
            *ruiMaxHeight += kSize.cy;
            v5 = pkFont;
            v8 = ++v6;
          }
          else
          {
            ++v6;
          }
          v7 = *v6;
        }
        while ( *v6 );
        if ( v8 < v6 )
        {
          PgFont::GetTextSize(v5, v8, v6 - v8, &kSize);
          v15 = (int *)operator new(0xCu);
          v15[1] = kSize.cy + v18->m_uiVerticalGap;
          *v15 = kSize.cx;
          pcText = (char *)v15;
          *((_BYTE *)v15 + 8) = 0;
          NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
            (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)rkVRList,
            (NiD3DXEffectParameter *const *)&pcText);
          if ( kSize.cx > *ruiMaxWidth )
            *ruiMaxWidth = kSize.cx;
          *ruiMaxHeight += kSize.cy;
        }
      }
    }
  }
}

//----- (005F95E0) --------------------------------------------------------
void __thiscall AutoSizingDialogWin::BuildVirtualRectOfQuestDlg(AutoSizingDialogWin *this, NiTList<AutoSizingDialogWin::VirtualRect *> *rkVRList, unsigned __int16 questID, unsigned int wQuestDlgID, unsigned int *ruiMaxWidth, unsigned int *ruiMaxHeight)
{
  AutoSizingDialogWin *v6; // ebx@1
  CClientQuest *v7; // esi@1
  CQuestData *v8; // ecx@3
  const char *v9; // eax@5
  const char *v10; // ecx@5
  char v11; // dl@6
  unsigned int v12; // eax@7
  const char *v13; // esi@7
  char *v14; // edi@7
  char v15; // cl@8
  char *v16; // edi@9
  char v17; // al@10
  signed int i; // eax@12
  _DWORD *v19; // eax@14
  Name5 *v20; // eax@17
  unsigned int v21; // edx@17
  unsigned int v22; // ecx@17
  unsigned int v23; // edx@17
  unsigned int v24; // eax@17
  char *v25; // edi@17
  char v26; // cl@18
  char *v27; // edi@20
  char v28; // al@21
  int v29; // kr00_4@23
  AutoSizingDialogWin::VirtualRect *v30; // eax@24
  unsigned int *v31; // edi@24
  AutoSizingDialogWin::VirtualRect *v32; // esi@24
  unsigned int v33; // eax@24
  AutoSizingDialogWin::VirtualRect *v34; // esi@28
  int (*v35)(void); // edx@28
  int v36; // kr04_4@31
  AutoSizingDialogWin::VirtualRect *v37; // eax@32
  unsigned int v38; // ecx@32
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *v39; // ecx@34
  int v40; // kr08_4@35
  AutoSizingDialogWin::VirtualRect *v41; // eax@36
  AutoSizingDialogWin::VirtualRect *v42; // esi@36
  unsigned int v43; // eax@36
  int v44; // kr0C_4@41
  AutoSizingDialogWin::VirtualRect *v45; // eax@42
  AutoSizingDialogWin::VirtualRect *v46; // esi@42
  unsigned int *v47; // ecx@42
  unsigned int v48; // eax@42
  tagSIZE v49; // [sp+Ch] [bp-484h]@24
  tagSIZE v50; // [sp+14h] [bp-47Ch]@32
  tagSIZE kSize; // [sp+1Ch] [bp-474h]@14
  tagSIZE v52; // [sp+24h] [bp-46Ch]@36
  DialogParser::TokenDetail kDetail; // [sp+2Ch] [bp-464h]@12
  QuestDialogParser kParser; // [sp+34h] [bp-45Ch]@3
  unsigned int *v55; // [sp+38h] [bp-458h]@1
  PgFont *pkFont; // [sp+3Ch] [bp-454h]@2
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *v57; // [sp+40h] [bp-450h]@1
  unsigned int *v58; // [sp+44h] [bp-44Ch]@1
  AutoSizingDialogWin::VirtualRect *pkCurrRect; // [sp+48h] [bp-448h]@7
  char acDlgText[1024]; // [sp+4Ch] [bp-444h]@3
  char acUserID[64]; // [sp+44Ch] [bp-44h]@17

  v6 = this;
  v57 = (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)rkVRList;
  v55 = ruiMaxWidth;
  v58 = ruiMaxHeight;
  v7 = QuestDataMgr::GetQuest();
  if ( v7 )
  {
    pkFont = v6->m_pkFont;
    if ( pkFont )
    {
      DialogParser::DialogParser((DialogParser *)&kParser.m_pcCurrentStr);
      QuestDialogParser::StartParsing(&kParser, (CQuest *)&v7->vfptr, wQuestDlgID);
      acDlgText[0] = 0;
      v8 = v7->m_pQuestData;
      if ( v8 )
      {
        if ( questID != -1 )
        {
          v9 = CQuestData::GetQuestName(v8, questID);
          v10 = v9;
          do
            v11 = *v9++;
          while ( v11 );
          v12 = v9 - v10;
          v13 = v10;
          v14 = (char *)&pkCurrRect + 3;
          do
            v15 = (v14++)[1];
          while ( v15 );
          qmemcpy(v14, v13, v12);
          v16 = (char *)&pkCurrRect + 3;
          do
            v17 = (v16++)[1];
          while ( v17 );
          *(_WORD *)v16 = 10;
        }
        for ( i = DialogParser::Parse((DialogParser *)&kParser.m_pcCurrentStr, &kDetail);
              i != 11;
              i = DialogParser::Parse((DialogParser *)&kParser.m_pcCurrentStr, &kDetail) )
        {
          switch ( i )
          {
            case 0:
              strncat(acDlgText, kDetail.kNormal.pcNormalStr, kDetail.kNormal.iLength);
              PgFont::GetTextSize(pkFont, kDetail.kNormal.pcNormalStr, kDetail.kNormal.iLength, &kSize);
              v19 = operator new(0xCu);
              *v19 += kSize.cx;
              if ( v19[1] < (unsigned int)kSize.cy )
                v19[1] = kSize.cy;
              *((_BYTE *)v19 + 8) = 0;
              break;
            case 1:
              v20 = User::GetMainCharID(&g_kUser);
              v21 = v20->n5_code[1];
              *(_DWORD *)acUserID = v20->n5_code[0];
              v22 = v20->n5_code[2];
              *(_DWORD *)&acUserID[4] = v21;
              v23 = v20->n5_code[3];
              *(_DWORD *)&acUserID[16] = v20->n5_code[4];
              *(_DWORD *)&acUserID[8] = v22;
              *(_DWORD *)&acUserID[12] = v23;
              acUserID[20] = 0;
              v24 = strlen(acUserID) + 1;
              v25 = (char *)&pkCurrRect + 3;
              do
                v26 = (v25++)[1];
              while ( v26 );
              qmemcpy(v25, acUserID, v24);
              break;
            case 2:
              v27 = (char *)&pkCurrRect + 3;
              do
                v28 = (v27++)[1];
              while ( v28 );
              *(_WORD *)v27 = 10;
              break;
            case 7:
              v29 = strlen(acDlgText);
              if ( v29 )
              {
                PgFont::GetTextSize(pkFont, acDlgText, v29, &v49);
                v30 = (AutoSizingDialogWin::VirtualRect *)operator new(0xCu);
                v31 = v55;
                v32 = v30;
                v30->uiWidth = v49.cx;
                v30->uiHeight = v49.cy + v6->m_uiVerticalGap;
                v33 = v30->uiWidth;
                pkCurrRect = v32;
                if ( v33 > *v31 )
                  *v31 = v33;
                *v58 += v32->uiHeight;
                NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
                  v57,
                  (NiD3DXEffectParameter *const *)&pkCurrRect);
                v32->bFixed = 0;
                acDlgText[0] = 0;
              }
              else
              {
                v31 = v55;
              }
              v34 = (AutoSizingDialogWin::VirtualRect *)operator new(0xCu);
              v35 = (int (*)(void))v6->m_apkBtns[0]->vfptr[37].__vecDelDtor;
              pkCurrRect = v34;
              v34->uiHeight = v6->m_uiVerticalGap + v35();
              v34->uiWidth = TextBtn::EstimateBtnWidth(v6->m_apkBtns[0], kDetail.kNormal.pcNormalStr);
              v34->bFixed = 1;
              if ( v34->uiWidth > *v31 )
                *v31 = v34->uiWidth;
              *v58 += v34->uiHeight;
              NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
                v57,
                (NiD3DXEffectParameter *const *)&pkCurrRect);
              break;
            case 5:
              v36 = strlen(acDlgText);
              if ( v36 )
              {
                PgFont::GetTextSize(pkFont, acDlgText, v36, &v50);
                v37 = (AutoSizingDialogWin::VirtualRect *)operator new(0xCu);
                v37->uiWidth = v50.cx;
                v37->uiHeight = v50.cy + v6->m_uiVerticalGap;
                v38 = v37->uiWidth;
                pkCurrRect = v37;
                if ( v38 > *v55 )
                  *v55 = v38;
                *v58 += v37->uiHeight;
                v39 = v57;
                v37->bFixed = 0;
                NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
                  v39,
                  (NiD3DXEffectParameter *const *)&pkCurrRect);
                goto LABEL_39;
              }
              break;
            case 4:
              v40 = strlen(acDlgText);
              if ( v40 )
              {
                PgFont::GetTextSize(pkFont, acDlgText, v40, &v52);
                v41 = (AutoSizingDialogWin::VirtualRect *)operator new(0xCu);
                v42 = v41;
                v41->uiWidth = v52.cx;
                v41->uiHeight = v52.cy + v6->m_uiVerticalGap;
                v43 = v41->uiWidth;
                pkCurrRect = v42;
                if ( v43 > *v55 )
                  *v55 = v43;
                *v58 += v42->uiHeight;
                NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
                  v57,
                  (NiD3DXEffectParameter *const *)&pkCurrRect);
                v42->bFixed = 0;
LABEL_39:
                acDlgText[0] = 0;
              }
              break;
            default:
              continue;
          }
        }
        v44 = strlen(acDlgText);
        if ( v44 )
        {
          PgFont::GetTextSize(pkFont, acDlgText, v44, &v52);
          v45 = (AutoSizingDialogWin::VirtualRect *)operator new(0xCu);
          v46 = v45;
          v45->uiWidth = v52.cx;
          v47 = v55;
          v45->uiHeight = v52.cy + v6->m_uiVerticalGap;
          v48 = v45->uiWidth;
          pkCurrRect = v46;
          if ( v48 > *v47 )
            *v47 = v48;
          *v58 += v46->uiHeight;
          NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
            v57,
            (NiD3DXEffectParameter *const *)&pkCurrRect);
          v46->bFixed = 0;
        }
      }
    }
  }
}

//----- (005F9AD0) --------------------------------------------------------
char __thiscall SpeechBubbleDlgWin::AddBtn(SpeechBubbleDlgWin *this, const char *pcText, bool bAutoScale, NiExtraData *pkType, NiExtraData *pkAction)
{
  SpeechBubbleDlgWin *v5; // edi@1
  int v6; // eax@1
  FlexDlgBtn *v7; // esi@3
  char result; // al@4

  v5 = this;
  v6 = this->m_iBtnCount;
  if ( v6 < 0 || v6 >= 7 )
  {
    result = 0;
  }
  else
  {
    v7 = this->m_apkBtns[v6];
    if ( v7 )
    {
      FlexDlgBtn::SetBtnText(v7, (char *)pcText, bAutoScale);
      v7->vfptr[64].__vecDelDtor((NiRefObject *)v7, 1u);
      NiObjectNET::RemoveExtraData((NiObjectNET *)&v7->vfptr, "type");
      if ( pkType )
        NiObjectNET::AddExtraData((NiObjectNET *)&v7->vfptr, "type", pkType);
      NiObjectNET::RemoveExtraData((NiObjectNET *)&v7->vfptr, "action");
      if ( pkAction )
      {
        if ( strlen((const char *)pkAction[1].vfptr) )
          NiObjectNET::AddExtraData((NiObjectNET *)&v7->vfptr, "action", pkAction);
      }
      ++v5->m_iBtnCount;
      result = 1;
    }
    else
    {
      result = 0;
    }
  }
  return result;
}

//----- (005F9B90) --------------------------------------------------------
void __thiscall SpeechBubbleDlgWin::ParseBaseDlgAndCreateBtn(SpeechBubbleDlgWin *this, unsigned __int16 mobid, char *acBaseScript, int iMaxLen, unsigned int uiSeqID)
{
  int v5; // esi@1
  int *v6; // eax@3
  int v7; // eax@4
  char *v8; // eax@5
  NpcDialogData *v9; // eax@6
  char *v10; // esi@7
  char *v11; // edi@8
  signed int i; // eax@10
  Name5 *v13; // eax@16
  unsigned int v14; // edx@16
  unsigned int v15; // ecx@16
  unsigned int v16; // edx@16
  unsigned int v17; // eax@16
  char *v18; // edi@16
  char v19; // cl@17
  char *v20; // edi@20
  char v21; // al@21
  NiStringExtraData *v22; // eax@23
  NiExtraData *v23; // eax@24
  NiExtraData *v24; // edi@24
  NiExtraData *v25; // eax@26
  NiExtraData *v26; // esi@26
  SpeechBubbleDlgWin *v27; // [sp+14h] [bp-64h]@1
  DialogParser::TokenDetail kDetail; // [sp+18h] [bp-60h]@10
  DialogParser kParser; // [sp+20h] [bp-58h]@10
  char *v30; // [sp+24h] [bp-54h]@1
  char acUserID[64]; // [sp+28h] [bp-50h]@16
  int v32; // [sp+74h] [bp-4h]@23

  v27 = this;
  v30 = acBaseScript;
  Font::Get(BOLD);
  v5 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 16))(
                          ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                          mobid) )
  {
    if ( mobid <= *(_WORD *)(v5 + 200) )
    {
      v6 = (int *)(*(_DWORD *)(v5 + 196) + 4 * mobid);
      if ( *v6 )
      {
        v7 = *v6;
        if ( v7 )
        {
          v8 = (char *)(v7 + 2);
          if ( v8 )
          {
            v9 = NpcDialogDataTable::GetNpcDialogDataByMobIDX(v8);
            if ( v9 )
            {
              v10 = v9->Dialog;
              if ( v9 != (NpcDialogData *)-64 )
              {
                v11 = v30;
                if ( v30 )
                  *v30 = 0;
                DialogParser::DialogParser(&kParser);
                DialogParser::StartParsing(&kParser, v10, uiSeqID);
                for ( i = DialogParser::Parse(&kParser, &kDetail); i != 11; i = DialogParser::Parse(&kParser, &kDetail) )
                {
                  if ( i == 16 )
                    break;
                  switch ( i )
                  {
                    case 0:
                      if ( v11 )
                        strncat(v11, kDetail.kNormal.pcNormalStr, kDetail.kNormal.iLength);
                      break;
                    case 1:
                      if ( v11 )
                      {
                        v13 = User::GetMainCharID(&g_kUser);
                        v14 = v13->n5_code[1];
                        *(_DWORD *)acUserID = v13->n5_code[0];
                        v15 = v13->n5_code[2];
                        *(_DWORD *)&acUserID[4] = v14;
                        v16 = v13->n5_code[3];
                        *(_DWORD *)&acUserID[16] = v13->n5_code[4];
                        *(_DWORD *)&acUserID[8] = v15;
                        *(_DWORD *)&acUserID[12] = v16;
                        acUserID[20] = 0;
                        v17 = strlen(acUserID) + 1;
                        v18 = v11 - 1;
                        do
                          v19 = (v18++)[1];
                        while ( v19 );
                        qmemcpy(v18, acUserID, v17);
                        goto LABEL_30;
                      }
                      break;
                    case 2:
                      if ( v11 )
                      {
                        v20 = v11 - 1;
                        do
                          v21 = (v20++)[1];
                        while ( v21 );
                        *(_WORD *)v20 = 10;
                        goto LABEL_30;
                      }
                      break;
                    case 8:
                      v22 = (NiStringExtraData *)operator new(0x10u);
                      v32 = 0;
                      if ( v22 )
                      {
                        NiStringExtraData::NiStringExtraData(v22, kDetail.kCreateBtnNpc.pcAction);
                        v24 = v23;
                      }
                      else
                      {
                        v24 = 0;
                      }
                      v32 = -1;
                      v25 = (NiExtraData *)operator new(0x10u);
                      v26 = v25;
                      v32 = 1;
                      if ( v25 )
                      {
                        NiExtraData::NiExtraData(v25);
                        v26->vfptr = (NiRefObjectVtbl *)&NiIntegerExtraData::`vftable';
                        v26[1].vfptr = 0;
                      }
                      else
                      {
                        v26 = 0;
                      }
                      v32 = -1;
                      SpeechBubbleDlgWin::AddBtn(v27, kDetail.kNormal.pcNormalStr, 0, v26, v24);
LABEL_30:
                      v11 = v30;
                      break;
                    default:
                      continue;
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
// 981C24: using guessed type int (__thiscall *NiIntegerExtraData::`vftable')(void *p, char);
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;

//----- (005F9E00) --------------------------------------------------------
char *__cdecl GetQuestStateText(PLAYER_QUEST_STATUS eStatus)
{
  char *result; // eax@2

  switch ( eStatus )
  {
    case 4:
    case 5:
    case 9:
    case 20:
      result = (char *)TextData::Get(0x8988D7BA);
      break;
    case 6:
      result = (char *)TextData::Get(0xA4FDEBBD);
      break;
    case 8:
      result = (char *)TextData::Get(0x859CC9CD);
      break;
    default:
      result = ".";
      break;
  }
  return result;
}

//----- (005F9E80) --------------------------------------------------------
void __thiscall AutoSizingDialogWin::OnCommand(AutoSizingDialogWin *this, unsigned int wParam, int lParam)
{
  PgWin *v3; // eax@1

  v3 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  PgWin::PostCommandMsg(v3, wParam, lParam);
}

//----- (005F9EB0) --------------------------------------------------------
void __thiscall NpcDialogWin::SetNpcFaceCut(NpcDialogWin *this, char *pcFn)
{
  NpcDialogWin *v2; // ebx@1
  char *v3; // esi@4
  NiImageConverter *v4; // eax@5
  NiPixelData *v5; // eax@5
  NiSourceTexture *v6; // eax@6
  const char *v7; // eax@9
  NiTexture::FormatPrefs kPrefs; // [sp+8h] [bp-Ch]@6

  v2 = this;
  if ( pcFn )
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    v3 = fs("%s\\game\\NPCFaceCut\\%s.png", &Folder::m_acMenu, pcFn);
    if ( v3 )
    {
      v4 = NiImageConverter::GetImageConverter();
      v5 = (NiPixelData *)((int (__thiscall *)(_DWORD, _DWORD, _DWORD))v4->vfptr[2].__vecDelDtor)(v4, v3, 0);
      if ( v5 )
      {
        kPrefs.m_ePixelLayout = 6;
        kPrefs.m_eAlphaFmt = 3;
        kPrefs.m_eMipMapped = 0;
        v6 = NiSourceTexture::Create(v5, &kPrefs);
        if ( v6 )
          goto LABEL_14;
      }
    }
    if ( !Folder::m_bInit )
      Folder::Init();
    v7 = fs("%s\\game\\NPCFaceCut\\%s.tga", &Folder::m_acMenu, pcFn);
    v6 = PgUtil::LoadSourceTexture(v7);
    if ( v6 )
    {
LABEL_14:
      PgSpr::SetTexture(v2->m_spFaceCut.m_pObject->m_spSpr.m_pObject, (NiTexture *)&v6->vfptr);
      ((void (__stdcall *)(_DWORD))v2->m_spFaceCut.m_pObject->vfptr[64].__vecDelDtor)(1);
    }
    else
    {
      ((void (__stdcall *)(_DWORD))v2->m_spFaceCut.m_pObject->vfptr[64].__vecDelDtor)(0);
    }
  }
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005F9F90) --------------------------------------------------------
void __thiscall NpcDialogWin::DirectMessage(NpcDialogWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  NpcDialogWin *v4; // esi@1
  float v5; // eax@4
  float v6; // esi@9
  PgWin *v7; // esi@10
  float v8; // esi@14
  signed int v9; // eax@18
  __int16 v10; // ax@20
  char *v11; // eax@22
  MsgBox *v12; // eax@22
  char *v13; // eax@24
  MsgBox *v14; // eax@24

  v4 = this;
  switch ( iMsgTag )
  {
    case 15:
      v9 = *(_DWORD *)pvBody;
      if ( *(_DWORD *)pvBody < 42 || v9 > 61 )
      {
        if ( v9 == 1003 )
        {
          v11 = (char *)TextData::Get(0xD78635Au);
          v12 = MsgBox::Modal(MSGBOX_OKCANCEL, v11);
          ((void (__stdcall *)(unsigned int))v12->vfptr->SetMsgHooker)(v4 != (NpcDialogWin *)232 ? (unsigned int)v4 : 0);
          LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[2][2]) = 1;
        }
        else if ( v9 == 1004 )
        {
          v13 = (char *)TextData::Get(0x64AB75BEu);
          v14 = MsgBox::Modal(MSGBOX_OKCANCEL, v13);
          ((void (__stdcall *)(unsigned int))v14->vfptr->SetMsgHooker)(v4 != (NpcDialogWin *)232 ? (unsigned int)v4 : 0);
          LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[2][2]) = 2;
        }
      }
      else
      {
        v10 = *((_WORD *)pvBody + 4);
        LOWORD(pvBody) = LOWORD(this->m_kWorld.m_Rotate.m_pEntry[2][0]);
        HIWORD(pvBody) = v10;
        NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x11u, 0xFu, &pvBody, 4);
      }
      break;
    case 27:
      if ( pvBody && !*(_DWORD *)pvBody )
      {
        v8 = this->m_kWorld.m_Rotate.m_pEntry[2][2];
        if ( LODWORD(v8) == 1 )
        {
          NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 8u, 0x5Bu, 0, 0);
        }
        else if ( LODWORD(v8) == 2 )
        {
          NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 8u, 0x5Cu, 0, 0);
        }
      }
      break;
    case 36:
      v5 = this->m_kWorld.m_Rotate.m_pEntry[1][0];
      if ( v5 != 0.0 )
        *(_BYTE *)(LODWORD(v5) + 504) = 0;
      if ( LOBYTE(this->m_kWorld.m_Rotate.m_pEntry[0][2]) )
      {
        LOBYTE(this->m_kWorld.m_Rotate.m_pEntry[0][2]) = 0;
      }
      else
      {
        (*(void (__stdcall **)(_DWORD))(*(_DWORD *)LODWORD(this->m_kWorld.m_Rotate.m_pEntry[1][2]) + 256))(0);
        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v4[-1].m_spCollisionObject);
      }
      v6 = v4->m_kWorld.m_Rotate.m_pEntry[1][0];
      if ( v6 != 0.0 )
      {
        v7 = *(PgWin **)(LODWORD(v6) + 496);
        if ( v7 )
          PgWinMgr::CloseWin(&Pgg_kWinMgr, v7);
      }
      break;
  }
}

//----- (005FA130) --------------------------------------------------------
void __thiscall NpcDialogWin::UpdateMeWin(NpcDialogWin *this, float fCurTime)
{
  NpcDialogWin *v2; // esi@1
  SpeechBubbleDlgWin *v3; // eax@3
  PgWinSpr *v4; // edi@5
  NiRefObjectVtbl *v5; // ebx@5
  int v6; // eax@5
  unsigned int v7; // edi@5
  int v8; // ebx@5
  int v9; // eax@5
  SpeechBubbleDlgWin *v10; // eax@7

  v2 = this;
  if ( this->m_bCloseTimerEnabled )
  {
    if ( this->m_fTimeToClose < (double)Timer::ms_fCurTime )
    {
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 8u, 0xBu, 0, 0);
      ((void (__stdcall *)(_DWORD))v2->m_spFaceCut.m_pObject->vfptr[64].__vecDelDtor)(0);
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
      v3 = v2->m_pkNpcDlgWin;
      v2->m_bCloseTimerEnabled = 0;
      if ( v3 )
        v3->m_bClickPortalNPC = 0;
    }
  }
  v4 = v2->m_spFaceCut.m_pObject;
  v5 = v4->vfptr;
  v6 = ((int (__thiscall *)(_DWORD))v4->vfptr[36].__vecDelDtor)(v2->m_spFaceCut.m_pObject);
  v5[43].__vecDelDtor((NiRefObject *)v4, PgWin::ms_uiScreenWidth - v6);
  v7 = (unsigned int)v2->m_spFaceCut.m_pObject;
  v8 = *(_DWORD *)v7;
  v9 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v7 + 148))(v2->m_spFaceCut.m_pObject);
  (*(void (__thiscall **)(_DWORD, _DWORD))(v8 + 176))(v7, PgWin::ms_uiScreenHeight - v9);
  SpeechBubbleWin::Update(
    (SpeechBubbleWin *)&v2->m_pkNpcDlgWin->vfptr,
    v8,
    v7,
    (int)v2,
    fCurTime,
    pkWorldCamera,
    (PgWinCamera *)pkScreenCamera);
  if ( CNSTimer_Interval::IsRun_GetCount(&v2->m_kRandomTimer_Interval, fCurTime) )
    v2->m_bCheckTimer = v2->m_bCheckTimer == 0;
  v10 = v2->m_pkNpcDlgWin;
  if ( v10->m_bShowOutLine )
    ((void (__stdcall *)(_DWORD))v10->m_apkOutLineBtns->vfptr[64].__vecDelDtor)(v2->m_bCheckTimer);
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (005FA260) --------------------------------------------------------
void __thiscall DlgQuestListWin::OnSlideBarList(DlgQuestListWin *this)
{
  DlgQuestListWin *v1; // esi@1
  SlideBar *v2; // ecx@1
  SlideListWin *v3; // eax@2

  v1 = this;
  v2 = this->m_pSlideBarList;
  if ( v2 )
  {
    v3 = v1->m_pListWinQuestList;
    if ( v3 )
    {
      SlideBar::SetSplitCnt(v2, v3->m_nSlideSplitCnt);
      v1->m_pListWinQuestList->m_nViewStartPos = v1->m_pSlideBarList->m_nCurPos;
      SlideListWin::UpdateViewList(v1->m_pListWinQuestList);
    }
  }
}

//----- (005FA2B0) --------------------------------------------------------
void __thiscall AutoSizingDialogWin::BuildNormalDialog(AutoSizingDialogWin *this, char *pcText, unsigned int uiMinWidth, AutoSizingDialogWin::VirtualRect *pkBaseRect)
{
  AutoSizingDialogWin *v4; // esi@1
  AutoSizingDialogWin::VirtualRect *v5; // ebx@1
  unsigned int v6; // eax@2
  NiTListItem<AutoSizingDialogWin::VirtualRect *> *v7; // eax@2
  NiTListItem<AutoSizingDialogWin::VirtualRect *> *v8; // eax@7
  NiTListItem<AutoSizingDialogWin::VirtualRect *> *v9; // ecx@7
  AutoSizingDialogWin::VirtualRect *v10; // edi@10
  unsigned int v11; // ebx@11
  int v12; // edi@13
  NiRefObjectVtbl *v13; // edi@15
  int v14; // eax@15
  NiTListItem<AutoSizingDialogWin::VirtualRect *> *v15; // esi@15
  NiTListItem<AutoSizingDialogWin::VirtualRect *> *v16; // ST0C_4@16
  NiTList<AutoSizingDialogWin::VirtualRect *> kVRList; // [sp+10h] [bp-24h]@1
  unsigned int uiDlgHeight; // [sp+20h] [bp-14h]@1
  unsigned int uiDlgWidth; // [sp+24h] [bp-10h]@1
  int v20; // [sp+30h] [bp-4h]@1

  v4 = this;
  kVRList.m_kAllocator.m_uiCount = 0;
  kVRList.m_pkHead = 0;
  kVRList.m_pkTail = 0;
  kVRList.vfptr = (NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>Vtbl *)&NiTList<AutoSizingDialogWin::VirtualRect *>::`vftable';
  v5 = pkBaseRect;
  v20 = 0;
  uiDlgWidth = 0;
  uiDlgHeight = 0;
  if ( pkBaseRect )
  {
    v6 = pkBaseRect->uiWidth;
    uiDlgHeight = pkBaseRect->uiHeight;
    uiDlgWidth = v6;
    v7 = (NiTListItem<AutoSizingDialogWin::VirtualRect *> *)NiTPointerListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>::NewItem();
    v7->m_element = v5;
    v7->m_pkNext = 0;
    v7->m_pkPrev = kVRList.m_pkTail;
    if ( kVRList.m_pkTail )
      kVRList.m_pkTail->m_pkNext = v7;
    else
      kVRList.m_pkHead = v7;
    ++kVRList.m_kAllocator.m_uiCount;
    kVRList.m_pkTail = v7;
  }
  AutoSizingDialogWin::BuildVirtualRectOfNormalDlg(v4, &kVRList, pcText, &uiDlgWidth, &uiDlgHeight);
  AutoSizingDialogWin::Approximation(v4, &kVRList, &uiDlgWidth, &uiDlgHeight);
  while ( kVRList.m_kAllocator.m_uiCount )
  {
    v8 = kVRList.m_pkHead;
    v9 = kVRList.m_pkHead->m_pkNext;
    kVRList.m_pkHead = v9;
    if ( v9 )
      v9->m_pkPrev = 0;
    else
      kVRList.m_pkTail = 0;
    v10 = v8->m_element;
    kVRList.vfptr->DeleteItem(
      (NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *> *)&kVRList,
      v8);
    --kVRList.m_kAllocator.m_uiCount;
    operator delete(v10);
  }
  v11 = uiDlgWidth;
  if ( uiMinWidth < uiDlgWidth )
    v11 = uiMinWidth;
  v4->m_iTextGeomCount = 0;
  v4->m_iBtnCount = 0;
  v12 = (int)v4->m_apkBtns;
  pkBaseRect = (AutoSizingDialogWin::VirtualRect *)10;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v12 + 256))(0);
    v12 += 4;
    pkBaseRect = (AutoSizingDialogWin::VirtualRect *)((char *)pkBaseRect - 1);
  }
  while ( pkBaseRect );
  v4->m_apkTextGeoms[0]->m_uFlags |= 1u;
  v4->m_apkTextGeoms[1]->m_uFlags |= 1u;
  v4->m_apkTextGeoms[2]->m_uFlags |= 1u;
  pkBaseRect = 0;
  AutoSizingDialogWin::AddTextGeomtry(v4, v11, (unsigned int *)&pkBaseRect, pcText);
  v13 = v4->vfptr;
  v14 = ((int (*)(void))v4->m_apkTextGeoms[0]->vfptr[40].__vecDelDtor)();
  v13[39].__vecDelDtor((NiRefObject *)v4, v14);
  v4->vfptr[38].__vecDelDtor((NiRefObject *)v4, v11);
  kVRList.vfptr = (NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>Vtbl *)&NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::`vftable';
  v15 = kVRList.m_pkHead;
  v20 = 1;
  if ( kVRList.m_pkHead )
  {
    do
    {
      v16 = v15;
      v15 = v15->m_pkNext;
      kVRList.vfptr->DeleteItem(
        (NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *> *)&kVRList,
        v16);
    }
    while ( v15 );
  }
}
// 9B43C8: using guessed type int (__thiscall *NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::`vftable')(void *p, char);
// 9B4620: using guessed type int (__thiscall *NiTList<AutoSizingDialogWin::VirtualRect *>::`vftable')(void *p, char);

//----- (005FA480) --------------------------------------------------------
void __thiscall SpeechBubbleDlgWin::BuildDialog(SpeechBubbleDlgWin *this, unsigned __int16 mobid, unsigned int uiMinWidth, unsigned int uiSeqID)
{
  SpeechBubbleDlgWin *v4; // esi@1
  NiRefObjectVtbl *v5; // edx@1
  void *(__thiscall *v6)(NiRefObject *, unsigned int); // eax@1
  int v7; // edi@1
  signed int v8; // ebx@1
  FlexDlgBtn *v9; // ecx@3
  MapInfo *v10; // eax@3
  int v11; // edi@3
  int (__thiscall *v12)(int, _DWORD); // edx@3
  MapInfo *v13; // ebx@3
  int v14; // edi@4
  int *v15; // eax@7
  bool v16; // zf@10
  PopupMenuText *v17; // eax@13
  NiExtraData *v18; // eax@14
  NiExtraData *v19; // ebx@14
  PopupMenuText *v20; // eax@16
  NiExtraData *v21; // edi@16
  NiUnsharedGeometryGroup *v22; // eax@19
  PopupMenuText *v23; // eax@23
  NiExtraData *v24; // eax@24
  NiExtraData *v25; // ebx@24
  PopupMenuText *v26; // eax@26
  NiExtraData *v27; // edi@26
  NiUnsharedGeometryGroup *v28; // eax@29
  PopupMenuText *v29; // ebx@29
  int v30; // edi@29
  char *v31; // eax@31
  int v32; // edi@37
  char v33; // bl@40
  unsigned int v34; // edi@41
  char *v35; // eax@42
  Name3 *v36; // eax@47
  signed int i; // esi@48
  char *v38; // eax@49
  MapInfo *v39; // ebx@49
  char *v40; // edi@49
  PopupMenuText *v41; // edi@51
  char *v42; // eax@52
  NiExtraData *v43; // eax@52
  NiExtraData *v44; // ebx@52
  PopupMenuText *v45; // eax@54
  NiExtraData *v46; // edi@54
  PopupMenuText *v47; // eax@59
  NiExtraData *v48; // eax@60
  NiExtraData *v49; // ebx@60
  PopupMenuText *v50; // eax@62
  NiExtraData *v51; // edi@62
  NiUnsharedGeometryGroup *v52; // eax@65
  SpeechBubbleDlgWin *v53; // esi@65
  int v54; // eax@65
  AutoSizingDialogWin::VirtualRect *v55; // edi@65
  int v56; // ebx@66
  int v57; // esi@66
  int (*v58)(void); // eax@67
  int v59; // eax@67
  int v60; // edi@68
  int v61; // eax@70
  int v62; // edi@70
  int v63; // ebx@70
  int v64; // edi@70
  FlexDlgBtn **v65; // esi@71
  bool v66; // [sp-4h] [bp-854h]@31
  Name3 result; // [sp+10h] [bp-840h]@47
  MapInfo *pkLoginMapInfo; // [sp+1Ch] [bp-834h]@3
  FlexDlgBtn **v69; // [sp+20h] [bp-830h]@1
  unsigned __int16 v70[2]; // [sp+24h] [bp-82Ch]@1
  SpeechBubbleDlgWin *v71; // [sp+28h] [bp-828h]@1
  PopupMenuText *pkMenu; // [sp+2Ch] [bp-824h]@13
  int iLeft; // [sp+30h] [bp-820h]@10
  char dest[4]; // [sp+34h] [bp-81Ch]@49
  int v75; // [sp+38h] [bp-818h]@49
  int v76; // [sp+3Ch] [bp-814h]@49
  char acBaseScript[1024]; // [sp+40h] [bp-810h]@20
  char acProcessedScript[1024]; // [sp+440h] [bp-410h]@67
  int v79; // [sp+84Ch] [bp-4h]@13

  v4 = this;
  v5 = this->m_pkRewardWin->vfptr;
  *(_DWORD *)v70 = mobid;
  v6 = v5[64].__vecDelDtor;
  v71 = this;
  ((void (__stdcall *)(_DWORD))v6)(0);
  v7 = (int)v4->m_apkBtns;
  v69 = v4->m_apkBtns;
  v8 = 7;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v7 + 256))(0);
    v7 += 4;
    --v8;
  }
  while ( v8 );
  v9 = v4->m_apkOutLineBtns;
  v4->m_iBtnCount = 0;
  v4->m_bShowOutLine = 0;
  ((void (__stdcall *)(_DWORD))v9->vfptr[64].__vecDelDtor)(0);
  v10 = (MapInfo *)WeddingTask::GetMarryInfo();
  v11 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
  v12 = *(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 16);
  v13 = v10;
  pkLoginMapInfo = v10;
  if ( (unsigned __int8)v12(ITableBase<MobInfo,MobInfoTab>::ms_pkTable, *(_DWORD *)v70) )
  {
    if ( v70[0] <= *(_WORD *)(v11 + 200) )
    {
      v15 = (int *)(*(_DWORD *)(v11 + 196) + 4 * v70[0]);
      if ( *v15 )
        v14 = *v15;
      else
        v14 = 0;
    }
    else
    {
      v14 = 0;
    }
  }
  else
  {
    v14 = 0;
  }
  v16 = LOBYTE(v13->ID) == 1;
  iLeft = v14;
  if ( v16 && v14 && !strcmp((const char *)(v14 + 2), "WeddingDreian") )
  {
    v17 = (PopupMenuText *)operator new(0x10u);
    pkMenu = v17;
    v79 = 0;
    if ( v17 )
    {
      NiStringExtraData::NiStringExtraData((NiStringExtraData *)v17, "MarryRequest");
      v19 = v18;
    }
    else
    {
      v19 = 0;
    }
    v20 = (PopupMenuText *)operator new(0x10u);
    v21 = (NiExtraData *)v20;
    pkMenu = v20;
    v79 = 1;
    if ( v20 )
    {
      NiExtraData::NiExtraData((NiExtraData *)v20);
      v21->vfptr = (NiRefObjectVtbl *)&NiIntegerExtraData::`vftable';
      v21[1].vfptr = 0;
    }
    else
    {
      v21 = 0;
    }
    v79 = -1;
    v22 = TextData::Get(0xEE133231);
    SpeechBubbleDlgWin::AddBtn(v4, (const char *)v22, 0, v21, v19);
    v14 = iLeft;
    v13 = pkLoginMapInfo;
  }
  SpeechBubbleDlgWin::ParseBaseDlgAndCreateBtn(v4, v70[0], acBaseScript, 1023, uiSeqID);
  if ( LOBYTE(v13->ID) == 2 && v14 && !strcmp((const char *)(v14 + 2), "WeddingDreian") )
  {
    v23 = (PopupMenuText *)operator new(0x10u);
    pkMenu = v23;
    v79 = 2;
    if ( v23 )
    {
      NiStringExtraData::NiStringExtraData((NiStringExtraData *)v23, "DivorceRequest");
      v25 = v24;
    }
    else
    {
      v25 = 0;
    }
    v79 = -1;
    v26 = (PopupMenuText *)operator new(0x10u);
    v27 = (NiExtraData *)v26;
    pkMenu = v26;
    v79 = 3;
    if ( v26 )
    {
      NiExtraData::NiExtraData((NiExtraData *)v26);
      v27->vfptr = (NiRefObjectVtbl *)&NiIntegerExtraData::`vftable';
      v27[1].vfptr = 0;
    }
    else
    {
      v27 = 0;
    }
    v79 = -1;
    v28 = TextData::Get(0x84C1CDBD);
    SpeechBubbleDlgWin::AddBtn(v4, (const char *)v28, 0, v27, v25);
    PopupMenuWin::Clear(v4->m_pkDivorceMenuListPopup);
    v29 = pkMenu;
    v30 = 0;
    while ( v30 )
    {
      if ( v30 == 1 )
      {
        v66 = 0;
        v31 = (char *)TextData::Get(0xC4C2971u);
        goto LABEL_34;
      }
LABEL_35:
      v29->m_ePopupMenuID = v30 + 1003;
      PopupMenuWin::AddMenu(v4->m_pkDivorceMenuListPopup, v30++, (PopupMenu *)&v29->vfptr);
      if ( v30 >= 2 )
      {
        PopupMenuWin::FinishMenu(v4->m_pkDivorceMenuListPopup, 0xC8u);
        goto LABEL_37;
      }
    }
    v66 = 0;
    v31 = (char *)TextData::Get(0xB519170D);
LABEL_34:
    v29 = PopupMenuText::CreateWin(v31, 0, 0, 0, 0, 0, v66);
    goto LABEL_35;
  }
LABEL_37:
  v32 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 16))(
                          ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                          *(_DWORD *)v70)
    && v70[0] <= *(_WORD *)(v32 + 200)
    && *(_DWORD *)(*(_DWORD *)(v32 + 196) + 4 * v70[0]) )
  {
    v33 = 0;
    if ( v70[0] != -1 )
    {
      v34 = 0;
      if ( ITableBase<MobViewInfo,MobViewInfoTab>::GetTotal() )
      {
        while ( 1 )
        {
          v35 = CDataReader::GetRecord((CDataReader *)(ITableBase<MobViewInfo,MobViewInfoTab>::ms_pkTable + 4), v34);
          if ( *(_WORD *)v35 == v70[0] )
            break;
          if ( ++v34 >= ITableBase<MobViewInfo,MobViewInfoTab>::GetTotal() )
            goto LABEL_47;
        }
        if ( *(_DWORD *)(v35 + 170) == 23 )
          v33 = 1;
      }
    }
LABEL_47:
    v36 = World::GetMapName(&g_kWorld, &result);
    pkLoginMapInfo = MapInfoTab::GetByMapName(v36);
    if ( v33 )
    {
      v71->m_bClickPortalNPC = 1;
      for ( i = 0; i < (signed int)ITableBase<TownPortal,TownPortalInfoTable>::GetTotal(); ++i )
      {
        v38 = CDataReader::GetRecord((CDataReader *)(ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable + 4), i);
        v76 = 0;
        v75 = 0;
        *(_DWORD *)dest = 0;
        strncpy(dest, v38 + 3, 0xCu);
        v39 = MapInfoTab::GetByMapName((Name3 *)dest);
        v40 = CDataReader::GetRecord((CDataReader *)(ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable + 4), i);
        if ( User::Lv(&g_kUser) >= (unsigned __int8)v40[1] )
        {
          iLeft = (int)v39->Name;
          if ( strcmp(pkLoginMapInfo->Name, v39->Name) )
          {
            v41 = (PopupMenuText *)operator new(0x10u);
            pkMenu = v41;
            v79 = 4;
            if ( v41 )
            {
              v42 = CDataReader::GetRecord(
                      (CDataReader *)(ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable + 4),
                      i);
              NiStringExtraData::NiStringExtraData((NiStringExtraData *)v41, v42 + 3);
              v44 = v43;
            }
            else
            {
              v44 = 0;
            }
            v79 = -1;
            v45 = (PopupMenuText *)operator new(0x10u);
            v46 = (NiExtraData *)v45;
            pkMenu = v45;
            v79 = 5;
            if ( v45 )
            {
              NiExtraData::NiExtraData((NiExtraData *)v45);
              v46->vfptr = (NiRefObjectVtbl *)&NiIntegerExtraData::`vftable';
              v46[1].vfptr = 0;
            }
            else
            {
              v46 = 0;
            }
            v79 = -1;
            SpeechBubbleDlgWin::AddBtn(v71, (const char *)iLeft, 0, v46, v44);
          }
        }
      }
    }
  }
  v47 = (PopupMenuText *)operator new(0x10u);
  pkMenu = v47;
  v79 = 6;
  if ( v47 )
  {
    NiStringExtraData::NiStringExtraData((NiStringExtraData *)v47, "close");
    v49 = v48;
  }
  else
  {
    v49 = 0;
  }
  v79 = -1;
  v50 = (PopupMenuText *)operator new(0x10u);
  v51 = (NiExtraData *)v50;
  pkMenu = v50;
  v79 = 7;
  if ( v50 )
  {
    NiExtraData::NiExtraData((NiExtraData *)v50);
    v51->vfptr = (NiRefObjectVtbl *)&NiIntegerExtraData::`vftable';
    v51[1].vfptr = 0;
  }
  else
  {
    v51 = 0;
  }
  v79 = -1;
  v52 = TextData::Get(0x9AE7FBE7);
  v53 = v71;
  SpeechBubbleDlgWin::AddBtn(v71, (const char *)v52, 0, v51, v49);
  v54 = v53->m_iBtnCount;
  v55 = 0;
  if ( v54 )
  {
    v56 = 141 * v54 + 1;
    v57 = ((int (*)(void))(*v69)->vfptr[37].__vecDelDtor)();
    v55 = (AutoSizingDialogWin::VirtualRect *)operator new(0xCu);
    v55->uiHeight = v57;
    v53 = v71;
    v55->bFixed = 1;
    v55->uiWidth = v56;
  }
  NpcBaseTextParsing(acBaseScript, acProcessedScript, 1024);
  AutoSizingDialogWin::BuildNormalDialog(v53->m_pkDialog, acProcessedScript, uiMinWidth, v55);
  v58 = (int (*)(void))v53->m_pkDialog->vfptr[36].__vecDelDtor;
  iLeft = 1;
  v59 = v58();
  SpeechBubbleWin::SetBubbleWidth((SpeechBubbleWin *)&v53->vfptr, v59 + 10);
  if ( v53->m_iBtnCount )
    v60 = ((int (*)(void))(*v69)->vfptr[37].__vecDelDtor)() + 10;
  else
    v60 = 0;
  v61 = ((int (*)(void))v53->m_pkDialog->vfptr[37].__vecDelDtor)();
  SpeechBubbleWin::SetBubbleHeight((SpeechBubbleWin *)&v53->vfptr, v60 + v61);
  v62 = ((int (*)(void))(*v69)->vfptr[37].__vecDelDtor)();
  v63 = SpeechBubbleWin::GetBubbleHeight((SpeechBubbleWin *)&v53->vfptr) - v62;
  v64 = 0;
  if ( v53->m_iBtnCount <= 0 )
  {
    v53->m_dwCurrQuestID = -1;
  }
  else
  {
    v65 = v69;
    do
    {
      ((void (__stdcall *)(int))(*v65)->vfptr[43].__vecDelDtor)(iLeft);
      ((void (__stdcall *)(int))(*v65)->vfptr[44].__vecDelDtor)(v63);
      FlexDlgBtn::SetBtnWidth(*v65, 140);
      iLeft += 141;
      ++v64;
      ++v65;
    }
    while ( v64 < v71->m_iBtnCount );
    v71->m_dwCurrQuestID = -1;
  }
}
// 981C24: using guessed type int (__thiscall *NiIntegerExtraData::`vftable')(void *p, char);
// A8C198: using guessed type int ITableBase<TownPortal,TownPortalInfoTable>::ms_pkTable;
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
// A8C29C: using guessed type int ITableBase<MobViewInfo,MobViewInfoTab>::ms_pkTable;

//----- (005FABF0) --------------------------------------------------------
void __thiscall SpeechBubbleDlgWin::BuildScriptDialog(SpeechBubbleDlgWin *this, unsigned __int16 mobid, char *pcScript, unsigned int uiMinWidth, bool bCloseBtn)
{
  SpeechBubbleDlgWin *v5; // esi@1
  int v6; // ebx@1
  NiExtraData *v7; // edi@1
  NiStringExtraData *v8; // eax@4
  NiExtraData *v9; // eax@5
  NiExtraData *v10; // eax@6
  NiExtraData *v11; // ebx@6
  NiUnsharedGeometryGroup *v12; // eax@9
  int v13; // ecx@10
  AutoSizingDialogWin::VirtualRect *v14; // eax@10
  int v15; // ebx@11
  int v16; // edi@11
  int v17; // eax@12
  int v18; // ebx@13
  int v19; // eax@15
  FlexDlgBtn **v20; // edi@15
  int v21; // ebx@15
  int v22; // eax@15
  int v23; // ebx@15
  int iTop; // [sp+2Ch] [bp+10h]@15
  int iLeft; // [sp+30h] [bp+14h]@12

  v5 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkRewardWin->vfptr[64].__vecDelDtor)(0);
  v6 = (int)v5->m_apkBtns;
  v7 = (NiExtraData *)7;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v6 + 256))(0);
    v6 += 4;
    v7 = (NiExtraData *)((char *)v7 - 1);
  }
  while ( v7 );
  v5->m_iBtnCount = 0;
  if ( bCloseBtn == 1 )
  {
    v8 = (NiStringExtraData *)operator new(0x10u);
    if ( v8 )
    {
      NiStringExtraData::NiStringExtraData(v8, "close");
      v7 = v9;
    }
    v10 = (NiExtraData *)operator new(0x10u);
    v11 = v10;
    if ( v10 )
    {
      NiExtraData::NiExtraData(v10);
      v11->vfptr = (NiRefObjectVtbl *)&NiIntegerExtraData::`vftable';
      v11[1].vfptr = 0;
    }
    else
    {
      v11 = 0;
    }
    v12 = TextData::Get(0x9AE7FBE7);
    SpeechBubbleDlgWin::AddBtn(v5, (const char *)v12, 0, v11, v7);
  }
  v13 = v5->m_iBtnCount;
  v14 = 0;
  if ( v13 )
  {
    v15 = 141 * v13 + 1;
    v16 = ((int (*)(void))v5->m_apkBtns[0]->vfptr[37].__vecDelDtor)();
    v14 = (AutoSizingDialogWin::VirtualRect *)operator new(0xCu);
    v14->bFixed = 1;
    v14->uiWidth = v15;
    v14->uiHeight = v16;
  }
  AutoSizingDialogWin::BuildNormalDialog(v5->m_pkDialog, pcScript, uiMinWidth, v14);
  iLeft = 1;
  v17 = ((int (*)(void))v5->m_pkDialog->vfptr[36].__vecDelDtor)();
  SpeechBubbleWin::SetBubbleWidth((SpeechBubbleWin *)&v5->vfptr, v17 + 10);
  if ( v5->m_iBtnCount )
    v18 = ((int (*)(void))v5->m_apkBtns[0]->vfptr[37].__vecDelDtor)() + 10;
  else
    v18 = 0;
  v19 = ((int (*)(void))v5->m_pkDialog->vfptr[37].__vecDelDtor)();
  SpeechBubbleWin::SetBubbleHeight((SpeechBubbleWin *)&v5->vfptr, v18 + v19);
  v20 = v5->m_apkBtns;
  v21 = ((int (*)(void))v5->m_apkBtns[0]->vfptr[37].__vecDelDtor)();
  v22 = SpeechBubbleWin::GetBubbleHeight((SpeechBubbleWin *)&v5->vfptr) - v21;
  v23 = 0;
  for ( iTop = v22; v23 < v5->m_iBtnCount; ++v20 )
  {
    ((void (__stdcall *)(_DWORD))(*v20)->vfptr[43].__vecDelDtor)(iLeft);
    ((void (__stdcall *)(_DWORD))(*v20)->vfptr[44].__vecDelDtor)(iTop);
    FlexDlgBtn::SetBtnWidth(*v20, 140);
    iLeft += 141;
    ++v23;
  }
  v5->m_dwCurrQuestID = -1;
}
// 981C24: using guessed type int (__thiscall *NiIntegerExtraData::`vftable')(void *p, char);

//----- (005FAE10) --------------------------------------------------------
void __thiscall NpcDialogWin::OpenNpcNormalDialog(NpcDialogWin *this, int mobid, unsigned int uiSeqID)
{
  int v3; // esi@1
  NpcDialogWin *v4; // edi@1
  char *v5; // esi@4
  const char *v6; // eax@7
  NiSourceTexture *v7; // eax@7
  const char *v8; // eax@10
  unsigned int v9; // esi@15
  unsigned int v10; // ebx@15
  MobViewInfo *v11; // eax@15
  MobViewInfo *v12; // eax@19
  SpeechBubbleDlgWin *v13; // ecx@21
  int v14; // eax@21
  SpeechBubbleDlgWin *v15; // ecx@22
  int v16; // eax@22
  SpeechBubbleDlgWin *v17; // ecx@23
  NiRefObjectVtbl *v18; // esi@23
  unsigned int v19; // eax@23
  float y; // ST14_4@23
  NiPoint3 kPos; // [sp+24h] [bp-10h]@23
  MobViewInfo *pkMobViewInfo; // [sp+30h] [bp-4h]@15
  NiRefObjectVtbl *mobida; // [sp+3Ch] [bp+8h]@21
  NiRefObjectVtbl *mobidb; // [sp+3Ch] [bp+8h]@22
  float mobidc; // [sp+3Ch] [bp+8h]@23
  float mobidd; // [sp+3Ch] [bp+8h]@23

  v3 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
  v4 = this;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 16))(
                          ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                          mobid) )
  {
    if ( (unsigned __int16)mobid <= *(_WORD *)(v3 + 200) )
    {
      if ( *(_DWORD *)(*(_DWORD *)(v3 + 196) + 4 * (unsigned __int16)mobid) )
      {
        v4->m_bCloseTimerEnabled = 0;
        v5 = NpcDialogDataTable::GetFaceCutFileNameByMobID(mobid);
        if ( v5 )
        {
          if ( !Folder::m_bInit )
            Folder::Init();
          v6 = fs("%s\\game\\NPCFaceCut\\%s.png", &Folder::m_acMenu, v5);
          v7 = PgUtil::LoadSourceTexture(v6);
          if ( !v7 )
          {
            if ( !Folder::m_bInit )
              Folder::Init();
            v8 = fs("%s\\game\\NPCFaceCut\\%s.tga", &Folder::m_acMenu, v5);
            v7 = PgUtil::LoadSourceTexture(v8);
          }
          if ( (_WORD)mobid != -1 && v7 )
          {
            PgSpr::SetTexture(v4->m_spFaceCut.m_pObject->m_spSpr.m_pObject, (NiTexture *)&v7->vfptr);
            ((void (__stdcall *)(signed int))v4->m_spFaceCut.m_pObject->vfptr[64].__vecDelDtor)(1);
          }
          else
          {
            ((void (__stdcall *)(_DWORD))v4->m_spFaceCut.m_pObject->vfptr[64].__vecDelDtor)(0);
          }
          v9 = 650 * PgWin::ms_uiScreenWidth >> 10;
          v10 = 570 * PgWin::ms_uiScreenHeight / 0x300;
          v11 = MobViewInfoTab::GetByID(mobid);
          pkMobViewInfo = v11;
          if ( v11 && v11->MiniMapIcon == 23 )
            SpeechBubbleDlgWin::BuildDialog(v4->m_pkNpcDlgWin, mobid, v9, uiSeqID);
          else
            SpeechBubbleDlgWin::BuildDialog(v4->m_pkNpcDlgWin, mobid, v9 - 30, uiSeqID);
          v12 = pkMobViewInfo;
          v4->m_bHold = uiSeqID != 0;
          if ( v12 && v12->MiniMapIcon == 23 )
          {
            v13 = v4->m_pkNpcDlgWin;
            mobida = v13->vfptr;
            v14 = ((int (*)(void))v13->vfptr[36].__vecDelDtor)();
            mobida[43].__vecDelDtor((NiRefObject *)v4->m_pkNpcDlgWin, v9 - v14 + 35);
          }
          else
          {
            v15 = v4->m_pkNpcDlgWin;
            mobidb = v15->vfptr;
            v16 = ((int (*)(void))v15->vfptr[36].__vecDelDtor)();
            mobidb[43].__vecDelDtor((NiRefObject *)v4->m_pkNpcDlgWin, v9 - v16);
          }
          v17 = v4->m_pkNpcDlgWin;
          v18 = v17->vfptr;
          v19 = ((int (*)(void))v17->vfptr[37].__vecDelDtor)();
          v18[44].__vecDelDtor((NiRefObject *)v4->m_pkNpcDlgWin, v10 - (v19 >> 1));
          v4->m_pkNpcDlgWin->m_uiMode = 1;
          mobidc = (double)PgWin::ms_uiScreenHeight * 0.800000011920929;
          y = mobidc;
          mobidd = 0.800000011920929 * (double)PgWin::ms_uiScreenWidth;
          SpeechBubbleWin::SetNpcPos((SpeechBubbleWin *)&v4->m_pkNpcDlgWin->vfptr, mobidd, y);
          ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[6].SetAbStateProperty)(&kPos);
        }
      }
    }
  }
}
// A8975C: using guessed type bool Folder::m_bInit;
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;

//----- (005FB080) --------------------------------------------------------
void __thiscall NpcDialogWin::OpenNpcScriptDialog(NpcDialogWin *this, int mobid, char *pcScript, bool bCloseBtn)
{
  int v4; // esi@1
  NpcDialogWin *v5; // edi@1
  int *v6; // eax@3
  int v7; // eax@4
  unsigned int v8; // esi@5
  unsigned int v9; // ebx@5
  SpeechBubbleDlgWin *v10; // ecx@5
  int v11; // eax@5
  SpeechBubbleDlgWin *v12; // ecx@5
  NiRefObjectVtbl *v13; // esi@5
  unsigned int v14; // eax@5
  float y; // ST10_4@5
  NiRefObjectVtbl *mobida; // [sp+28h] [bp+8h]@5
  float mobidb; // [sp+28h] [bp+8h]@5
  float mobidc; // [sp+28h] [bp+8h]@5

  v4 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
  v5 = this;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 16))(
                          ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                          mobid) )
  {
    if ( (unsigned __int16)mobid <= *(_WORD *)(v4 + 200) )
    {
      v6 = (int *)(*(_DWORD *)(v4 + 196) + 4 * (unsigned __int16)mobid);
      if ( *v6 )
      {
        v7 = *v6;
        if ( v7 )
        {
          v5->m_bCloseTimerEnabled = 0;
          NpcDialogWin::SetNpcFaceCut(v5, (char *)(v7 + 2));
          v8 = 650 * PgWin::ms_uiScreenWidth >> 10;
          v9 = 570 * PgWin::ms_uiScreenHeight / 0x300;
          SpeechBubbleDlgWin::BuildScriptDialog(v5->m_pkNpcDlgWin, mobid, pcScript, v8 - 30, bCloseBtn);
          v10 = v5->m_pkNpcDlgWin;
          mobida = v10->vfptr;
          v11 = ((int (*)(void))v10->vfptr[36].__vecDelDtor)();
          mobida[43].__vecDelDtor((NiRefObject *)v5->m_pkNpcDlgWin, v8 - v11);
          v12 = v5->m_pkNpcDlgWin;
          v13 = v12->vfptr;
          v14 = ((int (*)(void))v12->vfptr[37].__vecDelDtor)();
          v13[44].__vecDelDtor((NiRefObject *)v5->m_pkNpcDlgWin, v9 - (v14 >> 1));
          v5->m_pkNpcDlgWin->m_uiMode = 1;
          mobidb = (double)PgWin::ms_uiScreenHeight * 0.800000011920929;
          y = mobidb;
          mobidc = 0.800000011920929 * (double)PgWin::ms_uiScreenWidth;
          SpeechBubbleWin::SetNpcPos((SpeechBubbleWin *)&v5->m_pkNpcDlgWin->vfptr, mobidc, y);
        }
      }
    }
  }
}
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;

//----- (005FB1E0) --------------------------------------------------------
void __thiscall NpcDialogWin::OpenNpcScriptDialog(NpcDialogWin *this, char *pcFn, char *pcScript, bool bCloseBtn)
{
  NpcDialogWin *v4; // esi@1
  unsigned int v5; // edi@3
  unsigned int v6; // ebx@3
  char **v7; // ecx@3
  int v8; // eax@3
  SpeechBubbleDlgWin *v9; // ecx@3
  NiRefObjectVtbl *v10; // edi@3
  unsigned int v11; // eax@3
  char *y; // ST0C_4@3
  char *pcScripta; // [sp+28h] [bp+Ch]@3
  char *pcScriptb; // [sp+28h] [bp+Ch]@3
  char *pcScriptc; // [sp+28h] [bp+Ch]@3

  v4 = this;
  if ( pcFn )
  {
    if ( pcScript )
    {
      this->m_bCloseTimerEnabled = 0;
      NpcDialogWin::SetNpcFaceCut(this, pcFn);
      v5 = 650 * PgWin::ms_uiScreenWidth >> 10;
      v6 = 570 * PgWin::ms_uiScreenHeight / 0x300;
      SpeechBubbleDlgWin::BuildScriptDialog(v4->m_pkNpcDlgWin, 0xFFFFu, pcScript, v5 - 30, bCloseBtn);
      v7 = (char **)v4->m_pkNpcDlgWin;
      pcScripta = *v7;
      v8 = (*((int (**)(void))*v7 + 36))();
      (*((void (__thiscall **)(_DWORD, _DWORD))pcScripta + 43))(v4->m_pkNpcDlgWin, v5 - v8);
      v9 = v4->m_pkNpcDlgWin;
      v10 = v9->vfptr;
      v11 = ((int (*)(void))v9->vfptr[37].__vecDelDtor)();
      v10[44].__vecDelDtor((NiRefObject *)v4->m_pkNpcDlgWin, v6 - (v11 >> 1));
      v4->m_pkNpcDlgWin->m_uiMode = 1;
      *(float *)&pcScriptb = (double)PgWin::ms_uiScreenHeight * 0.800000011920929;
      y = pcScriptb;
      *(float *)&pcScriptc = 0.800000011920929 * (double)PgWin::ms_uiScreenWidth;
      SpeechBubbleWin::SetNpcPos((SpeechBubbleWin *)&v4->m_pkNpcDlgWin->vfptr, *(float *)&pcScriptc, *(float *)&y);
    }
  }
}

//----- (005FB310) --------------------------------------------------------
void __thiscall DlgQuestListWin::QuestNameList::QuestNameList(DlgQuestListWin::QuestNameList *this)
{
  this->m_QuestID = -1;
  this->m_Title._Myres = 15;
  this->m_Title._Mysize = 0;
  this->m_Title._Bx._Buf[0] = 0;
  this->m_Data = 0xFFFF;
  this->m_Level = 0;
  this->m_Status = 0;
  *(_DWORD *)&this->m_Type = 0;
  DlgQuestListWin::QuestNameList::ms_StatusPriority = (unsigned int *)21;
  dword_A8E1EC = 21;
  dword_A8E1F0 = 21;
  dword_A8E1F4 = 21;
  dword_A8E1F8 = 21;
  dword_A8E20C = 21;
  dword_A8E210 = 21;
  dword_A8E214 = 21;
  dword_A8E218 = 21;
  dword_A8E21C = 21;
  dword_A8E220 = 21;
  dword_A8E224 = 21;
  dword_A8E228 = 21;
  dword_A8E22C = 21;
  dword_A8E230 = 21;
  dword_A8E234 = 21;
  dword_A8E208 = 0;
  dword_A8E1C4 = 0;
  dword_A8E1FC = 1;
  dword_A8E238 = 1;
  dword_A8E200 = 2;
  dword_A8E204 = 2;
  dword_A8E1BC = 11;
  dword_A8E1C8 = 11;
  dword_A8E1E0 = 11;
  dword_A8E1C0 = 1;
  dword_A8E1D0 = 2;
  dword_A8E1D4 = 2;
  dword_A8E1D8 = 2;
  dword_A8E1CC = 3;
  dword_A8E1DC = 4;
  DlgQuestListWin::QuestNameList::ms_TypePriority = (unsigned int *)5;
}
// A8E1B8: using guessed type unsigned int *DlgQuestListWin::QuestNameList::ms_TypePriority;
// A8E1BC: using guessed type int dword_A8E1BC;
// A8E1C0: using guessed type int dword_A8E1C0;
// A8E1C4: using guessed type int dword_A8E1C4;
// A8E1C8: using guessed type int dword_A8E1C8;
// A8E1CC: using guessed type int dword_A8E1CC;
// A8E1D0: using guessed type int dword_A8E1D0;
// A8E1D4: using guessed type int dword_A8E1D4;
// A8E1D8: using guessed type int dword_A8E1D8;
// A8E1DC: using guessed type int dword_A8E1DC;
// A8E1E0: using guessed type int dword_A8E1E0;
// A8E1E8: using guessed type unsigned int *DlgQuestListWin::QuestNameList::ms_StatusPriority;
// A8E1EC: using guessed type int dword_A8E1EC;
// A8E1F0: using guessed type int dword_A8E1F0;
// A8E1F4: using guessed type int dword_A8E1F4;
// A8E1F8: using guessed type int dword_A8E1F8;
// A8E1FC: using guessed type int dword_A8E1FC;
// A8E200: using guessed type int dword_A8E200;
// A8E204: using guessed type int dword_A8E204;
// A8E208: using guessed type int dword_A8E208;
// A8E20C: using guessed type int dword_A8E20C;
// A8E210: using guessed type int dword_A8E210;
// A8E214: using guessed type int dword_A8E214;
// A8E218: using guessed type int dword_A8E218;
// A8E21C: using guessed type int dword_A8E21C;
// A8E220: using guessed type int dword_A8E220;
// A8E224: using guessed type int dword_A8E224;
// A8E228: using guessed type int dword_A8E228;
// A8E22C: using guessed type int dword_A8E22C;
// A8E230: using guessed type int dword_A8E230;
// A8E234: using guessed type int dword_A8E234;
// A8E238: using guessed type int dword_A8E238;

//----- (005FB470) --------------------------------------------------------
void __thiscall DlgQuestListWin::OnCommand(DlgQuestListWin *this, unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@5

  switch ( wParam )
  {
    case 0u:
      DlgQuestListWin::OnQuestListLClick(this, lParam);
      break;
    case 1u:
      DlgQuestListWin::OnSlideBarList(this);
      break;
    case 2u:
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
      break;
    case 3u:
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v3 )
        GameFrameWork::OpenPlayGuideSearchList(v3, "QuestList");
      break;
    default:
      return;
  }
}

//----- (005FB4E0) --------------------------------------------------------
FlexDlgBtn *__cdecl FlexDlgBtn::CreateWin(int iXPos, int iYPos, PgSprData *pkLeft, PgSprData *pkRight, PgSprData *pkMiddle, PgWin *pkParent, unsigned int uiCmdMsg)
{
  PgWin *v7; // eax@1
  PgWin *v8; // esi@1
  PgWin *v9; // edi@8
  FlexDlgBtn *v10; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v12; // [sp+20h] [bp-4h]@1

  v7 = (PgWin *)operator new(0x158u);
  v8 = v7;
  result.m_pObject = v7;
  v12 = 0;
  if ( v7 )
  {
    PgWinBut::PgWinBut((PgWinBut *)v7);
    v8->vfptr = (NiRefObjectVtbl *)&FlexDlgBtn::`vftable'{for `NiNode'};
    v8->vfptr = (IDirectMessengerVtbl *)&FlexDlgBtn::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v8 = 0;
  }
  if ( v8 )
    InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  v12 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v8);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgSprData *, PgSprData *, PgSprData *, PgWin *, unsigned int))v8->vfptr[140].__vecDelDtor)(
                          v8,
                          iXPos,
                          iYPos,
                          pkLeft,
                          pkRight,
                          pkMiddle,
                          pkParent,
                          uiCmdMsg) )
  {
    ((void (__thiscall *)(PgWin *))v8->vfptr[89].__vecDelDtor)(v8);
    v12 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v10 = (FlexDlgBtn *)v8;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v8);
    if ( result.m_pObject )
    {
      v9 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v9 )
          v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      }
    }
    v12 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v10 = 0;
  }
  return v10;
}
// 9B389C: using guessed type void (__thiscall *FlexDlgBtn::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B38BC: using guessed type int (__thiscall *FlexDlgBtn::`vftable'{for `NiNode'})(void *p, char);

//----- (005FB640) --------------------------------------------------------
TextBtn *__cdecl TextBtn::CreateWin(int iXPos, int iYPos, PgSprData *pkDeco, PgFont *pkFont, PgWin *pkParent, unsigned int uiCmdMsg)
{
  PgWin *v6; // eax@1
  PgWin *v7; // esi@1
  PgWin *v8; // edi@8
  TextBtn *v9; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v11; // [sp+20h] [bp-4h]@1

  v6 = (PgWin *)operator new(0x150u);
  v7 = v6;
  result.m_pObject = v6;
  v11 = 0;
  if ( v6 )
  {
    PgWinBut::PgWinBut((PgWinBut *)v6);
    v7->vfptr = (NiRefObjectVtbl *)&TextBtn::`vftable'{for `NiNode'};
    v7->vfptr = (IDirectMessengerVtbl *)&TextBtn::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v7 = 0;
  }
  if ( v7 )
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  v11 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v7);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgSprData *, PgFont *, PgWin *, unsigned int))v7->vfptr[140].__vecDelDtor)(
                          v7,
                          iXPos,
                          iYPos,
                          pkDeco,
                          pkFont,
                          pkParent,
                          uiCmdMsg) )
  {
    ((void (__thiscall *)(PgWin *))v7->vfptr[89].__vecDelDtor)(v7);
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = (TextBtn *)v7;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v7);
    if ( result.m_pObject )
    {
      v8 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v8 )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      }
    }
    v11 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v9 = 0;
  }
  return v9;
}
// 9B3AF4: using guessed type void (__thiscall *TextBtn::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B3B14: using guessed type int (__thiscall *TextBtn::`vftable'{for `NiNode'})(void *p, char);

//----- (005FB790) --------------------------------------------------------
AutoSizingDialogWin *__cdecl AutoSizingDialogWin::CreateWin(unsigned int uiLeft, unsigned int uiTop, unsigned int uiActionBtnTag, PgFont *pkFont, PgWin *pkParent)
{
  PgWin *v5; // eax@1
  PgWin *v6; // esi@1
  PgWin *v7; // edi@8
  AutoSizingDialogWin *v8; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v10; // [sp+20h] [bp-4h]@1

  v5 = (PgWin *)operator new(0x184u);
  v6 = v5;
  result.m_pObject = v5;
  v10 = 0;
  if ( v5 )
  {
    PgWin::PgWin(v5);
    v6->vfptr = (NiRefObjectVtbl *)&AutoSizingDialogWin::`vftable'{for `NiNode'};
    v6->vfptr = (IDirectMessengerVtbl *)&AutoSizingDialogWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v6[1].m_kLocal.m_Rotate.m_pEntry[2][0]) = 0;
    LODWORD(v6[1].m_kLocal.m_Rotate.m_pEntry[2][1]) = 4;
    LODWORD(v6[1].m_kLocal.m_Rotate.m_pEntry[2][2]) = -1;
    LOBYTE(v6[1].m_kLocal.m_Translate.x) = -1;
    LODWORD(v6[1].m_kLocal.m_Translate.y) = 0;
  }
  else
  {
    v6 = 0;
  }
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v10 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v6);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, unsigned int, unsigned int, unsigned int, PgFont *, PgWin *))v6->vfptr[113].__vecDelDtor)(
                          v6,
                          uiLeft,
                          uiTop,
                          uiActionBtnTag,
                          pkFont,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v6->vfptr[89].__vecDelDtor)(v6);
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = (AutoSizingDialogWin *)v6;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v6);
    if ( result.m_pObject )
    {
      v7 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      }
    }
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = 0;
  }
  return v8;
}
// 9B3D4C: using guessed type void (__thiscall *AutoSizingDialogWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B3D6C: using guessed type int (__thiscall *AutoSizingDialogWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005FB900) --------------------------------------------------------
char __thiscall AutoSizingDialogWin::Create(AutoSizingDialogWin *this, unsigned int uiLeft, unsigned int uiTop, unsigned int uiActionBtnTag, PgFont *pkFont, PgWin *pkParent)
{
  AutoSizingDialogWin *v6; // esi@1
  char result; // al@2
  SpScreenText **v8; // edi@4
  PgTextGeometry *v9; // eax@5
  SpScreenText *v10; // eax@6
  SpScreenText *v11; // eax@8
  NiTexturePalette *v12; // edi@11
  const char *v13; // eax@13
  PgSprData *v14; // ebx@14
  int v15; // edi@14
  unsigned int v16; // ST2C_4@15
  PgFont *v17; // eax@15
  TextBtn *v18; // eax@15
  PgWin *v19; // ST1C_4@16
  PgWinSpr **v20; // edi@16
  signed int v21; // ebx@16
  PgWinSpr *v22; // eax@17
  RewardWin *v23; // eax@18
  RewardWin *v24; // edi@18
  NiRTTI *v25; // eax@19
  PgWin *v26; // esi@25
  int iLeft; // [sp+44h] [bp-10h]@14
  int v28; // [sp+50h] [bp-4h]@5

  v6 = this;
  if ( !PgWin::Create((PgWin *)&this->vfptr, uiLeft, uiTop, 1u, 1u, pkParent, 0, 0) || !pkFont )
    goto LABEL_31;
  v6->m_pkFont = pkFont;
  v8 = (SpScreenText **)v6->m_apkTextGeoms;
  uiTop = 3;
  do
  {
    v9 = (PgTextGeometry *)operator new(0x14Cu);
    v28 = 0;
    if ( v9 )
      PgTextGeometry::PgTextGeometry(v9, pkFont);
    else
      v10 = 0;
    *v8 = v10;
    v10->m_uFlags |= 1u;
    (*v8)->m_bAutoWordWrap = 1;
    (*v8)->m_bTextCmdOn = 1;
    v11 = *v8;
    v28 = -1;
    v11[1].vfptr = 0;
    if ( v11->m_iAlignOption != 17 )
    {
      v11->m_iAlignOption = 17;
      v11->m_bInvalidate = 1;
    }
    SpScreenText::SetVerticalGap(*v8, v6->m_uiVerticalGap);
    ((void (__thiscall *)(AutoSizingDialogWin *, SpScreenText *, _DWORD))v6->vfptr[29].__vecDelDtor)(v6, *v8, 0);
    ++v8;
    --uiTop;
  }
  while ( uiTop );
  v6->m_iTextGeomCount = 0;
  pkParent = 0;
  v12 = pTexturePalette;
  v28 = 1;
  if ( !Folder::m_bInit )
    Folder::Init();
  v13 = Folder::Merge(&Folder::m_acMenu, "Game\\DialogBtn.nif");
  PgUtil::LoadNodeNifFile(v13, (NiPointer<NiNode> *)&pkParent, v12);
  if ( pkParent )
  {
    v14 = PgSprData::Create((NiAVObject *)&pkParent->vfptr, "BtnNor", &iLeft, (int *)&uiLeft, 0);
    PgSprData::Add(v14, (NiAVObject *)&pkParent->vfptr, "BtnClick");
    PgSprData::Add(v14, (NiAVObject *)&pkParent->vfptr, "BtnOver");
    v15 = (int)v6->m_apkBtns;
    pkFont = (PgFont *)10;
    do
    {
      v16 = uiActionBtnTag;
      v17 = Font::Get(MENU);
      v18 = TextBtn::CreateWin(0, 0, v14, v17, (PgWin *)&v6->vfptr, v16);
      *(_DWORD *)v15 = v18;
      v18->vfptr[130].__vecDelDtor((NiRefObject *)v18, (unsigned int)v18);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v15 + 256))(0);
      v15 += 4;
      pkFont = (PgFont *)((char *)pkFont - 1);
    }
    while ( pkFont );
    v19 = pkParent;
    v6->m_iBtnCount = 0;
    pkFont = (PgFont *)PgSprData::Create((NiAVObject *)&v19->vfptr, "Line", &iLeft, (int *)&uiLeft, 0);
    v20 = v6->m_apkLines;
    v21 = 3;
    do
    {
      v22 = PgWinSpr::CreateWin(0, 0, (PgSprData *)pkFont, (PgWin *)&v6->vfptr, 0, 0);
      *v20 = v22;
      v22->vfptr[64].__vecDelDtor((NiRefObject *)v22, 0);
      ++v20;
      --v21;
    }
    while ( v21 );
    v6->m_iLineCount = 0;
    v23 = RewardWin::CreateWin(0);
    v6->m_pkRewardWin = v23;
    v23->vfptr[130].__vecDelDtor((NiRefObject *)v23, 0);
    RewardWin::SetNpcRewardMode(v6->m_pkRewardWin, 1);
    ((void (__stdcall *)(_DWORD))v6->m_pkRewardWin->vfptr[64].__vecDelDtor)(0);
    v24 = v6->m_pkRewardWin;
    if ( v24 )
    {
      v25 = (NiRTTI *)((int (__thiscall *)(RewardWin *))v24->vfptr[1].__vecDelDtor)(v6->m_pkRewardWin);
      if ( v25 )
      {
        while ( v25 != &PgWin::m_RTTI )
        {
          v25 = v25->m_pkBaseRTTI;
          if ( !v25 )
            goto LABEL_24;
        }
        ((void (__thiscall *)(AutoSizingDialogWin *, RewardWin *, _DWORD))v6->vfptr[29].__vecDelDtor)(v6, v24, 0);
        NiAVObject::UpdateProperties((NiAVObject *)&v6->vfptr);
        NiAVObject::Update((NiAVObject *)&v6->vfptr, 0.0, 1);
      }
    }
LABEL_24:
    v6->vfptr[60].__vecDelDtor((NiRefObject *)v6, 0);
    NiAVObject::Update((NiAVObject *)&v6->vfptr, 0.0, 1);
    NiAVObject::UpdateProperties((NiAVObject *)&v6->vfptr);
    v28 = -1;
    if ( pkParent )
    {
      v26 = pkParent;
      if ( !InterlockedDecrement((volatile LONG *)&pkParent->m_uiRefCount) )
      {
        if ( v26 )
          v26->vfptr->__vecDelDtor((NiRefObject *)v26, 1u);
      }
    }
    result = 1;
  }
  else
  {
LABEL_31:
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005FBC40) --------------------------------------------------------
SpeechBubbleDlgWin *__cdecl SpeechBubbleDlgWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  SpeechBubbleDlgWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x20Cu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    SpeechBubbleWin::SpeechBubbleWin((SpeechBubbleWin *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&SpeechBubbleDlgWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&SpeechBubbleDlgWin::`vftable'{for `IDirectMessenger'};
    v2[1].m_kEffectList.m_kAllocator.m_uiCount = 0;
    LOBYTE(v2[1].m_kBound.m_kCenter.x) = 0;
    v2[1].m_kEffectList.m_pkTail = 0;
    LOBYTE(v2[1].m_kBound.m_kCenter.z) = 0;
    LOBYTE(v2[1].vfptr) = 0;
    LODWORD(v2[1].m_kBound.m_fRadius) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (SpeechBubbleDlgWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9B3F38: using guessed type void (__thiscall *SpeechBubbleDlgWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B3F54: using guessed type int (__thiscall *SpeechBubbleDlgWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005FBDA0) --------------------------------------------------------
NpcDialogWin *__cdecl NpcDialogWin::CreateWin(PgFrameWork *pkFrameWork, char *pcName, int ShowWinAtAbsoluteFar)
{
  PgWin *v3; // eax@1
  PgWin *v4; // eax@2
  PgWin *v5; // esi@2
  PgWin *v6; // edi@8
  NpcDialogWin *v7; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x194u);
  result.m_pObject = v3;
  v9 = 0;
  if ( v3 )
  {
    NpcDialogWin::NpcDialogWin((NpcDialogWin *)v3);
    v5 = v4;
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v9 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v5);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, PgFrameWork *, char *, int))v5->vfptr[135].__vecDelDtor)(
                          v5,
                          pkFrameWork,
                          pcName,
                          ShowWinAtAbsoluteFar) )
  {
    ((void (__thiscall *)(PgWin *))v5->vfptr[89].__vecDelDtor)(v5);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = (NpcDialogWin *)v5;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v5);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = 0;
  }
  return v7;
}

//----- (005FBEE0) --------------------------------------------------------
char __thiscall NpcDialogWin::Create(NpcDialogWin *this, PgFrameWork *pkFrameWork, char *pcName, bool ShowWinAtAbsoluteFar)
{
  NpcDialogWin *v4; // esi@1
  NiSourceTexture *v5; // edi@1
  NiNode *v6; // esi@2
  bool v7; // zf@4
  NiTexturePalette *v9; // ebx@8
  const char *v10; // eax@10
  PgSprData *v11; // eax@15
  NiD3DDefaultShader *v12; // eax@15
  char **v13; // ebx@15
  int v14; // eax@15
  char **v15; // ebx@15
  int v16; // eax@15
  SpeechBubbleDlgWin *v17; // eax@15
  NiNode *v18; // esi@16
  UIUtil ui; // [sp+10h] [bp-2Ch]@15
  int uiLeft; // [sp+24h] [bp-18h]@15
  int uiTop; // [sp+28h] [bp-14h]@15
  NiPointer<NiNode> spNode; // [sp+2Ch] [bp-10h]@1
  int v23; // [sp+38h] [bp-4h]@1
  char *pcNamea; // [sp+48h] [bp+Ch]@15
  char *pcNameb; // [sp+48h] [bp+Ch]@15

  v4 = this;
  spNode.m_pObject = 0;
  v23 = 0;
  v5 = MenuTexMgr::GetTexture(4u);
  if ( !v5 )
  {
    v6 = spNode.m_pObject;
    v23 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v7 = spNode.m_pObject == 0;
LABEL_5:
    if ( !v7 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    return 0;
  }
  v9 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v10 = Folder::Merge(&Folder::m_acMenu, "Game\\NPCFace.nif");
  PgUtil::LoadNodeNifFile(v10, &spNode, v9);
  if ( !spNode.m_pObject )
    return 0;
  if ( !PgWinFrame::Create((PgWinFrame *)&v4->vfptr, 0, 0, 0, pkFrameWork, pcName, 0) )
  {
    v6 = spNode.m_pObject;
    v23 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v7 = v6 == 0;
    goto LABEL_5;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v23) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v4->vfptr);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NPCFace", &uiLeft, &uiTop, v5);
  v12 = (NiD3DDefaultShader *)PgWinSpr::CreateWin(0, 0, v11, (PgWin *)&v4->vfptr, 0, 0);
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v4->m_spFaceCut, v12);
  v13 = (char **)v4->m_spFaceCut.m_pObject;
  pcNamea = *v13;
  v14 = (*((int (__thiscall **)(_DWORD))*v13 + 36))(v4->m_spFaceCut.m_pObject);
  (*((void (__thiscall **)(_DWORD, _DWORD))pcNamea + 43))(v13, PgWin::ms_uiScreenWidth - v14);
  v15 = (char **)v4->m_spFaceCut.m_pObject;
  pcNameb = *v15;
  v16 = (*((int (__thiscall **)(_DWORD))*v15 + 37))(v4->m_spFaceCut.m_pObject);
  (*((void (__thiscall **)(_DWORD, _DWORD))pcNameb + 44))(v15, PgWin::ms_uiScreenHeight - v16);
  ((void (__stdcall *)(_DWORD))v4->m_spFaceCut.m_pObject->vfptr[64].__vecDelDtor)(0);
  v4->m_spFaceCut.m_pObject->vfptr[60].__vecDelDtor((NiRefObject *)v4->m_spFaceCut.m_pObject, 0);
  v17 = SpeechBubbleDlgWin::CreateWin(0);
  v4->m_pkNpcDlgWin = v17;
  v17->m_uiMode = 1;
  ((void (__stdcall *)(signed int))v4->m_pkNpcDlgWin->vfptr[64].__vecDelDtor)(1);
  ((void (__thiscall *)(NpcDialogWin *, SpeechBubbleDlgWin *, _DWORD))v4->vfptr[29].__vecDelDtor)(
    v4,
    v4->m_pkNpcDlgWin,
    0);
  NiAVObject::UpdateProperties((NiAVObject *)&v4->vfptr);
  PgWin::EnableOpenCloseSound((PgWin *)&v4->vfptr, 0);
  LOBYTE(v23) = 0;
  UIUtil::~UIUtil(&ui);
  v23 = -1;
  if ( spNode.m_pObject )
  {
    v18 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v18 )
        v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005FC150) --------------------------------------------------------
DlgQuestListWin *__cdecl DlgQuestListWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  DlgQuestListWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x164u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&DlgQuestListWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&DlgQuestListWin::`vftable'{for `IDirectMessenger'};
    LOWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = -1;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (DlgQuestListWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9B4178: using guessed type void (__thiscall *DlgQuestListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B4194: using guessed type int (__thiscall *DlgQuestListWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005FC2A0) --------------------------------------------------------
char __thiscall SpeechBubbleDlgWin::Create(SpeechBubbleDlgWin *this, PgFrameWork *pkFrameWork)
{
  SpeechBubbleDlgWin *v2; // esi@1
  char result; // al@2
  PgFont *v4; // eax@3
  NiTexturePalette *v5; // edi@3
  const char *v6; // eax@5
  PgSprData *v7; // edi@6
  PgSprData *v8; // ebx@6
  PgSprData *v9; // eax@6
  FlexDlgBtn *v10; // eax@6
  int v11; // edi@6
  signed int v12; // ebx@6
  PgSprData *v13; // eax@7
  FlexDlgBtn *v14; // eax@7
  NiSourceTexture *v15; // eax@8
  PopupMenuWin *v16; // eax@8
  NiSourceTexture *v17; // eax@8
  PopupMenuWin *v18; // eax@8
  RewardWin *v19; // eax@8
  NiNode *v20; // esi@10
  PgSprData *pkLeft; // [sp+10h] [bp-20h]@6
  PgSprData *pkRight; // [sp+14h] [bp-1Ch]@6
  int iLeft; // [sp+18h] [bp-18h]@6
  int iTop; // [sp+1Ch] [bp-14h]@6
  NiPointer<NiNode> spDlgCtrlNode; // [sp+20h] [bp-10h]@3
  int v26; // [sp+2Ch] [bp-4h]@3

  v2 = this;
  if ( !SpeechBubbleWin::Create((SpeechBubbleWin *)&this->vfptr, pkFrameWork) )
    goto LABEL_17;
  v4 = Font::Get(BOLD);
  v2->m_pkDialog = AutoSizingDialogWin::CreateWin(5u, 5u, 0x12FD1u, v4, (PgWin *)&v2->vfptr);
  spDlgCtrlNode.m_pObject = 0;
  v5 = pTexturePalette;
  v26 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = Folder::Merge(&Folder::m_acMenu, "Game\\DialogBtn.nif");
  PgUtil::LoadNodeNifFile(v6, &spDlgCtrlNode, v5);
  if ( spDlgCtrlNode.m_pObject )
  {
    v7 = PgSprData::Create((NiAVObject *)&spDlgCtrlNode.m_pObject->vfptr, "BtnLeft01", &iLeft, &iTop, 0);
    v8 = PgSprData::Create((NiAVObject *)&spDlgCtrlNode.m_pObject->vfptr, "BtnRight01", &iLeft, &iTop, 0);
    v9 = PgSprData::Create((NiAVObject *)&spDlgCtrlNode.m_pObject->vfptr, "BtnMiddle01", &iLeft, &iTop, 0);
    v10 = FlexDlgBtn::CreateWin(0, 0, v7, v8, v9, (PgWin *)&v2->vfptr, 0);
    v2->m_apkOutLineBtns = v10;
    v10->vfptr[130].__vecDelDtor((NiRefObject *)v10, (unsigned int)v10);
    ((void (__stdcall *)(_DWORD))v2->m_apkOutLineBtns->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_apkOutLineBtns->vfptr[60].__vecDelDtor)(0);
    pkLeft = PgSprData::Create((NiAVObject *)&spDlgCtrlNode.m_pObject->vfptr, "BtnLeft", &iLeft, &iTop, 0);
    pkRight = PgSprData::Create((NiAVObject *)&spDlgCtrlNode.m_pObject->vfptr, "BtnRight", &iLeft, &iTop, 0);
    v11 = (int)v2->m_apkBtns;
    v12 = 7;
    do
    {
      v13 = PgSprData::Create((NiAVObject *)&spDlgCtrlNode.m_pObject->vfptr, "BtnMiddle", &iLeft, &iTop, 0);
      v14 = FlexDlgBtn::CreateWin(0, 0, pkLeft, pkRight, v13, (PgWin *)&v2->vfptr, 0x12FD1u);
      *(_DWORD *)v11 = v14;
      v14->vfptr[130].__vecDelDtor((NiRefObject *)v14, (unsigned int)v14);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v11 + 256))(0);
      v11 += 4;
      --v12;
    }
    while ( v12 );
    v15 = MenuTexMgr::GetTexture(1u);
    v16 = PopupMenuWin::CreateWin(v15, 5u, 5u, 0);
    v2->m_pkQuestListPopup = v16;
    ((void (__stdcall *)(IDirectMessengerVtbl **))v16->vfptr->SetMsgHooker)(&v2->vfptr);
    v17 = MenuTexMgr::GetTexture(1u);
    v18 = PopupMenuWin::CreateWin(v17, 5u, 5u, 0);
    v2->m_pkDivorceMenuListPopup = v18;
    ((void (__stdcall *)(IDirectMessengerVtbl **))v18->vfptr->SetMsgHooker)(&v2->vfptr);
    v19 = RewardWin::CreateWin(pkFrameWork);
    v2->m_pkRewardWin = v19;
    v19->vfptr[130].__vecDelDtor((NiRefObject *)v19, 0);
    RewardWin::SetNpcRewardMode(v2->m_pkRewardWin, 1);
    PgWin::AttachChildWin((PgWin *)&v2->vfptr, (PgWin *)&v2->m_pkRewardWin->vfptr);
    v2->m_uiDefaultRewardWinWidth = ((int (*)(void))v2->m_pkRewardWin->vfptr[36].__vecDelDtor)();
    if ( !v2->m_pkDlgQuestListWin )
      v2->m_pkDlgQuestListWin = DlgQuestListWin::CreateWin(0);
    v20 = spDlgCtrlNode.m_pObject;
    v26 = -1;
    if ( spDlgCtrlNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spDlgCtrlNode.m_pObject->m_uiRefCount) )
    {
      if ( v20 )
        v20->vfptr->__vecDelDtor((NiRefObject *)v20, 1u);
    }
    result = 1;
  }
  else
  {
LABEL_17:
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005FC580) --------------------------------------------------------
void __thiscall SpeechBubbleDlgWin::BuildScriptDialog(SpeechBubbleDlgWin *this, char *pcScript, NiTList<ScriptBtn *> *pkScriptBtnList, unsigned int uiMinWidth)
{
  SpeechBubbleDlgWin *v4; // esi@1
  int v5; // edi@1
  signed int v6; // ebx@1
  NiTListItem<ScriptBtn *> *v7; // eax@3
  ScriptBtn *v8; // edi@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v9; // eax@5
  NiExtraData *v10; // ecx@5
  NiExtraData *v11; // edx@5
  int v12; // ecx@13
  AutoSizingDialogWin::VirtualRect *v13; // eax@13
  int v14; // edi@14
  int v15; // ebx@14
  int v16; // eax@15
  int v17; // edi@16
  int v18; // eax@18
  int v19; // edi@18
  int v20; // ebx@18
  FlexDlgBtn **v21; // edi@19
  NiTListItem<ScriptBtn *> *iter; // [sp+10h] [bp-38h]@4
  int iTop; // [sp+14h] [bp-34h]@18
  bool iLeft; // [sp+18h] [bp-30h]@5
  int iLefta; // [sp+18h] [bp-30h]@15
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+1Ch] [bp-2Ch]@5
  int v27; // [sp+44h] [bp-4h]@5

  v4 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkRewardWin->vfptr[64].__vecDelDtor)(0);
  v5 = (int)v4->m_apkBtns;
  v6 = 7;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v5 + 256))(0);
    v5 += 4;
    --v6;
  }
  while ( v6 );
  v4->m_iBtnCount = 0;
  v7 = pkScriptBtnList->m_pkHead;
  while ( v7 )
  {
    v8 = v7->m_element;
    v7 = v7->m_pkNext;
    iter = v7;
    if ( v8 )
    {
      v9 = ScriptBtn::GetText(v8, &result);
      v10 = v8->m_pkAction;
      v11 = v8->m_pkType;
      iLeft = v8->m_bAutoScale;
      v27 = 0;
      if ( v9->_Myres >= 0x10 )
        v9 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v9->_Bx._Ptr;
      SpeechBubbleDlgWin::AddBtn(v4, v9->_Bx._Buf, iLeft, v11, v10);
      v27 = -1;
      if ( result._Myres >= 0x10 )
        operator delete(result._Bx._Ptr);
      result._Myres = 15;
      result._Mysize = 0;
      result._Bx._Buf[0] = 0;
      if ( v8->m_kText._Myres >= 0x10 )
        operator delete(v8->m_kText._Bx._Ptr);
      v8->m_kText._Myres = 15;
      v8->m_kText._Mysize = 0;
      v8->m_kText._Bx._Buf[0] = 0;
      operator delete(v8);
      v7 = iter;
    }
  }
  v12 = v4->m_iBtnCount;
  v13 = 0;
  if ( v12 )
  {
    v14 = 141 * v12 + 1;
    v15 = ((int (*)(void))v4->m_apkBtns[0]->vfptr[37].__vecDelDtor)();
    v13 = (AutoSizingDialogWin::VirtualRect *)operator new(0xCu);
    v13->bFixed = 1;
    v13->uiWidth = v14;
    v13->uiHeight = v15;
  }
  AutoSizingDialogWin::BuildNormalDialog(v4->m_pkDialog, pcScript, uiMinWidth, v13);
  iLefta = 1;
  v16 = ((int (*)(void))v4->m_pkDialog->vfptr[36].__vecDelDtor)();
  SpeechBubbleWin::SetBubbleWidth((SpeechBubbleWin *)&v4->vfptr, v16 + 10);
  if ( v4->m_iBtnCount )
    v17 = ((int (*)(void))v4->m_apkBtns[0]->vfptr[37].__vecDelDtor)() + 10;
  else
    v17 = 0;
  v18 = ((int (*)(void))v4->m_pkDialog->vfptr[37].__vecDelDtor)();
  SpeechBubbleWin::SetBubbleHeight((SpeechBubbleWin *)&v4->vfptr, v17 + v18);
  v19 = ((int (*)(void))v4->m_apkBtns[0]->vfptr[37].__vecDelDtor)();
  v20 = 0;
  iTop = SpeechBubbleWin::GetBubbleHeight((SpeechBubbleWin *)&v4->vfptr) - v19;
  if ( v4->m_iBtnCount > 0 )
  {
    v21 = v4->m_apkBtns;
    do
    {
      ((void (__stdcall *)(int))(*v21)->vfptr[43].__vecDelDtor)(iLefta);
      ((void (__stdcall *)(int))(*v21)->vfptr[44].__vecDelDtor)(iTop);
      FlexDlgBtn::SetBtnWidth(*v21, 140);
      iLefta += 141;
      ++v20;
      ++v21;
    }
    while ( v20 < v4->m_iBtnCount );
  }
  v4->m_dwCurrQuestID = -1;
}

//----- (005FC7F0) --------------------------------------------------------
void __thiscall NpcDialogWin::OpenNpcScriptDialog(NpcDialogWin *this, char *pcFn, char *pcScript, NiTList<ScriptBtn *> *pkScriptBtnList)
{
  NpcDialogWin *v4; // esi@1
  unsigned int v5; // edi@3
  unsigned int v6; // ebx@3
  char **v7; // ecx@3
  int v8; // eax@3
  SpeechBubbleDlgWin *v9; // ecx@3
  NiRefObjectVtbl *v10; // edi@3
  unsigned int v11; // eax@3
  char *y; // ST0C_4@3
  char *pcScripta; // [sp+28h] [bp+Ch]@3
  char *pcScriptb; // [sp+28h] [bp+Ch]@3
  char *pcScriptc; // [sp+28h] [bp+Ch]@3

  v4 = this;
  if ( pcFn )
  {
    if ( pcScript )
    {
      this->m_bCloseTimerEnabled = 0;
      NpcDialogWin::SetNpcFaceCut(this, pcFn);
      v5 = 650 * PgWin::ms_uiScreenWidth >> 10;
      v6 = 570 * PgWin::ms_uiScreenHeight / 0x300;
      SpeechBubbleDlgWin::BuildScriptDialog(v4->m_pkNpcDlgWin, pcScript, pkScriptBtnList, v5 - 30);
      v7 = (char **)v4->m_pkNpcDlgWin;
      pcScripta = *v7;
      v8 = (*((int (**)(void))*v7 + 36))();
      (*((void (__thiscall **)(_DWORD, _DWORD))pcScripta + 43))(v4->m_pkNpcDlgWin, v5 - v8);
      v9 = v4->m_pkNpcDlgWin;
      v10 = v9->vfptr;
      v11 = ((int (*)(void))v9->vfptr[37].__vecDelDtor)();
      v10[44].__vecDelDtor((NiRefObject *)v4->m_pkNpcDlgWin, v6 - (v11 >> 1));
      v4->m_pkNpcDlgWin->m_uiMode = 1;
      *(float *)&pcScriptb = (double)PgWin::ms_uiScreenHeight * 0.800000011920929;
      y = pcScriptb;
      *(float *)&pcScriptc = 0.800000011920929 * (double)PgWin::ms_uiScreenWidth;
      SpeechBubbleWin::SetNpcPos((SpeechBubbleWin *)&v4->m_pkNpcDlgWin->vfptr, *(float *)&pcScriptc, *(float *)&y);
    }
  }
}

//----- (005FC920) --------------------------------------------------------
void __thiscall AutoSizingDialogWin::OnClose(AutoSizingDialogWin *this)
{
  AutoSizingDialogWin *v1; // esi@1
  unsigned __int16 v2; // ST00_2@2
  ScenarioMgr *v3; // eax@2

  v1 = this;
  if ( this->m_dwCurrentRunningScenarioID )
  {
    v2 = this->m_dwCurrentRunningScenarioID;
    v3 = ScenarioMgr::GetScenarioMgr();
    ScenarioMgr::StopScenario(v3, v2);
    v1->m_dwCurrentRunningScenarioID = 0;
  }
}

//----- (005FC950) --------------------------------------------------------
void __thiscall AutoSizingDialogWin::ParseAndCreateQuestDlg(AutoSizingDialogWin *this, unsigned __int16 questID, unsigned int wQuestDlgID, unsigned int uiWidth)
{
  AutoSizingDialogWin *v4; // ebx@1
  CClientQuest *v5; // esi@1
  CQuestData *v6; // esi@3
  const char *v7; // eax@5
  char *v8; // eax@5
  char *v9; // esi@5
  char v10; // cl@6
  unsigned int v11; // eax@7
  char *v12; // edi@7
  char v13; // cl@8
  signed int i; // eax@10
  Name5 *v15; // eax@13
  unsigned int v16; // edx@13
  unsigned int v17; // ecx@13
  unsigned int v18; // edx@13
  unsigned int v19; // eax@13
  char *v20; // edi@13
  char v21; // cl@14
  char *v22; // edi@16
  char v23; // al@17
  char *v24; // eax@19
  char v25; // cl@20
  signed int v26; // eax@23
  NiExtraData *v27; // eax@24
  NiExtraData *v28; // esi@24
  NiObjectNET *v29; // ecx@27
  NiStringExtraData *v30; // esi@27
  const char *v31; // eax@28
  NiExtraData *v32; // eax@28
  NiObjectNET *v33; // ecx@30
  char *v34; // eax@31
  char v35; // cl@32
  char v36; // ST08_1@35
  unsigned __int16 v37; // ST04_2@35
  unsigned __int16 v38; // ST00_2@35
  ScenarioMgr *v39; // eax@35
  char *v40; // eax@41
  char v41; // cl@42
  DialogParser::TokenDetail kDetail; // [sp+10h] [bp-464h]@10
  QuestDialogParser kParser; // [sp+18h] [bp-45Ch]@3
  void *v44; // [sp+1Ch] [bp-458h]@24
  unsigned int uiYPos; // [sp+20h] [bp-454h]@3
  char acDlgText[1024]; // [sp+24h] [bp-450h]@3
  char acUserID[64]; // [sp+424h] [bp-50h]@13
  int v48; // [sp+470h] [bp-4h]@24

  v4 = this;
  v5 = QuestDataMgr::GetQuest();
  if ( v5 )
  {
    if ( v4->m_pkFont )
    {
      DialogParser::DialogParser((DialogParser *)&kParser.m_pcCurrentStr);
      QuestDialogParser::StartParsing(&kParser, (CQuest *)&v5->vfptr, wQuestDlgID);
      acDlgText[0] = 0;
      v6 = v5->m_pQuestData;
      uiYPos = 0;
      if ( v6 )
      {
        if ( questID != -1 )
        {
          v7 = CQuestData::GetQuestName(v6, questID);
          v8 = fs("<%s>\n\n", v7);
          v9 = v8;
          do
            v10 = *v8++;
          while ( v10 );
          v11 = v8 - v9;
          v12 = (char *)&uiYPos + 3;
          do
            v13 = (v12++)[1];
          while ( v13 );
          qmemcpy(v12, v9, v11);
        }
        for ( i = DialogParser::Parse((DialogParser *)&kParser.m_pcCurrentStr, &kDetail);
              i != 11;
              i = DialogParser::Parse((DialogParser *)&kParser.m_pcCurrentStr, &kDetail) )
        {
          switch ( i )
          {
            case 0:
              strncat(acDlgText, kDetail.kNormal.pcNormalStr, kDetail.kNormal.iLength);
              break;
            case 1:
              v15 = User::GetMainCharID(&g_kUser);
              v16 = v15->n5_code[1];
              *(_DWORD *)acUserID = v15->n5_code[0];
              v17 = v15->n5_code[2];
              *(_DWORD *)&acUserID[4] = v16;
              v18 = v15->n5_code[3];
              *(_DWORD *)&acUserID[16] = v15->n5_code[4];
              *(_DWORD *)&acUserID[8] = v17;
              *(_DWORD *)&acUserID[12] = v18;
              acUserID[20] = 0;
              v19 = strlen(acUserID) + 1;
              v20 = (char *)&uiYPos + 3;
              do
                v21 = (v20++)[1];
              while ( v21 );
              qmemcpy(v20, acUserID, v19);
              break;
            case 2:
              v22 = (char *)&uiYPos + 3;
              do
                v23 = (v22++)[1];
              while ( v23 );
              *(_WORD *)v22 = 10;
              break;
            case 7:
              v24 = acDlgText;
              do
                v25 = *v24++;
              while ( v25 );
              if ( v24 != &acDlgText[1] )
              {
                AutoSizingDialogWin::AddTextGeomtry(v4, uiWidth, &uiYPos, acDlgText);
                acDlgText[0] = 0;
              }
              v26 = v4->m_iBtnCount;
              if ( v26 < 10 )
              {
                ((void (__stdcall *)(unsigned int))v4->m_apkBtns[v26]->vfptr[44].__vecDelDtor)(uiYPos);
                ((void (__stdcall *)(signed int))v4->m_apkBtns[v4->m_iBtnCount]->vfptr[43].__vecDelDtor)(10);
                TextBtn::SetBtnText(v4->m_apkBtns[v4->m_iBtnCount], kDetail.kNormal.pcNormalStr);
                NiObjectNET::RemoveExtraData((NiObjectNET *)&v4->m_apkBtns[v4->m_iBtnCount]->vfptr, "type");
                v27 = (NiExtraData *)operator new(0x10u);
                v28 = v27;
                v44 = v27;
                v48 = 0;
                if ( v27 )
                {
                  NiExtraData::NiExtraData(v27);
                  v28->vfptr = (NiRefObjectVtbl *)&NiIntegerExtraData::`vftable';
                  v28[1].vfptr = (NiRefObjectVtbl *)1;
                }
                else
                {
                  v28 = 0;
                }
                v29 = (NiObjectNET *)&v4->m_apkBtns[v4->m_iBtnCount]->vfptr;
                v48 = -1;
                NiObjectNET::AddExtraData(v29, "type", v28);
                NiObjectNET::RemoveExtraData((NiObjectNET *)&v4->m_apkBtns[v4->m_iBtnCount]->vfptr, "action");
                v30 = (NiStringExtraData *)operator new(0x10u);
                v44 = v30;
                v48 = 1;
                if ( v30 )
                {
                  v31 = fs("quest_ack %d", kDetail.kNormal.iLength);
                  NiStringExtraData::NiStringExtraData(v30, v31);
                }
                else
                {
                  v32 = 0;
                }
                v33 = (NiObjectNET *)&v4->m_apkBtns[v4->m_iBtnCount]->vfptr;
                v48 = -1;
                NiObjectNET::AddExtraData(v33, "action", v32);
                ((void (__stdcall *)(signed int))v4->m_apkBtns[v4->m_iBtnCount]->vfptr[64].__vecDelDtor)(1);
                uiYPos += v4->m_uiVerticalGap
                        + ((int (*)(void))v4->m_apkBtns[v4->m_iBtnCount]->vfptr[37].__vecDelDtor)();
                ++v4->m_iBtnCount;
              }
              break;
            case 5:
              v34 = acDlgText;
              do
                v35 = *v34++;
              while ( v35 );
              if ( v34 != &acDlgText[1] )
              {
                AutoSizingDialogWin::AddTextGeomtry(v4, uiWidth, &uiYPos, acDlgText);
                acDlgText[0] = 0;
              }
              break;
            case 9:
              v36 = v4->m_byCurrScriptCmd;
              v37 = v4->m_dwCurrQuestID;
              v38 = (unsigned __int16)kDetail.kNormal.pcNormalStr;
              v4->m_dwCurrentRunningScenarioID = kDetail.kScenarioNumber.iScenarioNumber;
              v39 = ScenarioMgr::GetScenarioMgr();
              ScenarioMgr::RunScenario(v39, v38, v37, v36);
              break;
            case 13:
              if ( g_pkMainChar )
              {
                if ( g_pkMainChar->m_byMode == 1 )
                  ((void (__stdcall *)(int))g_pkMainChar->vfptr[14].Deaffect)(kDetail.kScenarioNumber.iScenarioNumber);
                else
                  OutputDebugStringA("³ë¸Ö»óÅÂ¿¡¼­¸¸ º¸¿©ÁÙ ¼ö ÀÖÀ½\n");
              }
              break;
            default:
              continue;
          }
        }
        v40 = acDlgText;
        do
          v41 = *v40++;
        while ( v41 );
        if ( v40 != &acDlgText[1] )
        {
          AutoSizingDialogWin::AddTextGeomtry(v4, uiWidth, &uiYPos, acDlgText);
          acDlgText[0] = 0;
        }
        v4->vfptr[39].__vecDelDtor((NiRefObject *)v4, uiYPos);
        v4->vfptr[38].__vecDelDtor((NiRefObject *)v4, uiWidth);
      }
    }
  }
}
// 981C24: using guessed type int (__thiscall *NiIntegerExtraData::`vftable')(void *p, char);

//----- (005FCE00) --------------------------------------------------------
void __thiscall AutoSizingDialogWin::BuildQuestDialog(AutoSizingDialogWin *this, unsigned int wQuestDlgID, unsigned int uiMinWidth, unsigned int dwQuestID, char byScriptCmd, AutoSizingDialogWin::VirtualRect *pkBaseRect)
{
  AutoSizingDialogWin *v6; // esi@1
  unsigned int v7; // eax@2
  NiTListItem<AutoSizingDialogWin::VirtualRect *> *v8; // eax@2
  NiTListItem<AutoSizingDialogWin::VirtualRect *> *v9; // eax@7
  NiTListItem<AutoSizingDialogWin::VirtualRect *> *v10; // ecx@7
  AutoSizingDialogWin::VirtualRect *v11; // edi@10
  int v12; // edi@13
  signed int v13; // ebx@13
  unsigned int v14; // ecx@15
  NiTListItem<AutoSizingDialogWin::VirtualRect *> *v15; // esi@15
  NiTListItem<AutoSizingDialogWin::VirtualRect *> *v16; // ST10_4@16
  NiTList<AutoSizingDialogWin::VirtualRect *> kVRList; // [sp+10h] [bp-24h]@1
  unsigned int uiDlgHeight; // [sp+20h] [bp-14h]@1
  unsigned int uiDlgWidth; // [sp+24h] [bp-10h]@1
  int v20; // [sp+30h] [bp-4h]@1

  v6 = this;
  kVRList.m_kAllocator.m_uiCount = 0;
  kVRList.m_pkHead = 0;
  kVRList.m_pkTail = 0;
  kVRList.vfptr = (NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>Vtbl *)&NiTList<AutoSizingDialogWin::VirtualRect *>::`vftable';
  v20 = 0;
  uiDlgWidth = 0;
  uiDlgHeight = 0;
  this->m_dwCurrQuestID = dwQuestID;
  this->m_byCurrScriptCmd = byScriptCmd;
  if ( pkBaseRect )
  {
    v7 = pkBaseRect->uiHeight;
    uiDlgWidth = pkBaseRect->uiWidth;
    uiDlgHeight = v7;
    v8 = (NiTListItem<AutoSizingDialogWin::VirtualRect *> *)NiTPointerListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>::NewItem();
    v8->m_element = pkBaseRect;
    v8->m_pkNext = 0;
    v8->m_pkPrev = kVRList.m_pkTail;
    if ( kVRList.m_pkTail )
      kVRList.m_pkTail->m_pkNext = v8;
    else
      kVRList.m_pkHead = v8;
    ++kVRList.m_kAllocator.m_uiCount;
    kVRList.m_pkTail = v8;
  }
  AutoSizingDialogWin::BuildVirtualRectOfQuestDlg(v6, &kVRList, dwQuestID, wQuestDlgID, &uiDlgWidth, &uiDlgHeight);
  AutoSizingDialogWin::Approximation(v6, &kVRList, &uiDlgWidth, &uiDlgHeight);
  while ( kVRList.m_kAllocator.m_uiCount )
  {
    v9 = kVRList.m_pkHead;
    v10 = kVRList.m_pkHead->m_pkNext;
    kVRList.m_pkHead = v10;
    if ( v10 )
      v10->m_pkPrev = 0;
    else
      kVRList.m_pkTail = 0;
    v11 = v9->m_element;
    kVRList.vfptr->DeleteItem(
      (NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *> *)&kVRList,
      v9);
    --kVRList.m_kAllocator.m_uiCount;
    operator delete(v11);
  }
  if ( uiMinWidth < uiDlgWidth )
    uiDlgWidth = uiMinWidth;
  v6->m_iTextGeomCount = 0;
  v6->m_iBtnCount = 0;
  v12 = (int)v6->m_apkBtns;
  v13 = 10;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v12 + 256))(0);
    v12 += 4;
    --v13;
  }
  while ( v13 );
  v14 = uiDlgWidth;
  v6->m_apkTextGeoms[0]->m_uFlags |= 1u;
  v6->m_apkTextGeoms[1]->m_uFlags |= 1u;
  v6->m_apkTextGeoms[2]->m_uFlags |= 1u;
  AutoSizingDialogWin::ParseAndCreateQuestDlg(v6, dwQuestID, wQuestDlgID, v14);
  kVRList.vfptr = (NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>Vtbl *)&NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::`vftable';
  v15 = kVRList.m_pkHead;
  v20 = 1;
  if ( kVRList.m_pkHead )
  {
    do
    {
      v16 = v15;
      v15 = v15->m_pkNext;
      kVRList.vfptr->DeleteItem(
        (NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *> *)&kVRList,
        v16);
    }
    while ( v15 );
  }
}
// 9B43C8: using guessed type int (__thiscall *NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::`vftable')(void *p, char);
// 9B4620: using guessed type int (__thiscall *NiTList<AutoSizingDialogWin::VirtualRect *>::`vftable')(void *p, char);

//----- (005FCFB0) --------------------------------------------------------
void __thiscall SpeechBubbleDlgWin::BuildQuestDialog(SpeechBubbleDlgWin *this, unsigned __int16 mobid, unsigned int wID, unsigned int dwQuestID, char byScriptCmd, unsigned int uiMinWidth, bool bShowMenu)
{
  SpeechBubbleDlgWin *v7; // esi@1
  CClientQuest *v8; // edi@1
  bool v9; // bl@1
  signed int j; // eax@1
  int v11; // edi@10
  NiExtraData *v12; // ebx@10
  bool v13; // al@12
  NiStringExtraData *v14; // eax@18
  NiExtraData *v15; // eax@19
  NiExtraData *v16; // eax@20
  NiExtraData *v17; // edi@20
  NiUnsharedGeometryGroup *v18; // eax@23
  int v19; // ecx@24
  AutoSizingDialogWin::VirtualRect *v20; // eax@24
  int v21; // edi@25
  int v22; // ebx@25
  int v23; // eax@26
  int v24; // ebx@27
  int v25; // edi@30
  int v26; // eax@32
  FlexDlgBtn **v27; // edi@32
  int v28; // ebx@32
  int v29; // eax@32
  int v30; // ebx@32
  CClientQuest *v31; // eax@35
  CClientQuest *v32; // edi@35
  signed int v33; // eax@38
  int v34; // ST10_4@41
  signed int v35; // ST0C_4@41
  char *v36; // eax@41
  const char *v37; // ebx@41
  NiStringExtraData *v38; // eax@41
  NiExtraData *v39; // eax@42
  NiExtraData *v40; // eax@44
  NiExtraData *v41; // edi@44
  DlgQuestListWin *v42; // eax@49
  int v43; // eax@51
  AutoSizingDialogWin::VirtualRect *v44; // edi@51
  int v45; // ebx@52
  RewardWin *v46; // ecx@54
  char v47; // al@54
  RewardWin *v48; // ecx@54
  RewardWin *v49; // ecx@60
  RewardWin *v50; // ecx@66
  int v51; // eax@67
  int v52; // ebx@68
  int v53; // edi@71
  int v54; // eax@73
  int v55; // edi@73
  int v56; // ebx@73
  FlexDlgBtn **v57; // edi@74
  NiRefObjectVtbl *v58; // edi@79
  int v59; // eax@79
  DialogParser::TokenDetail kDetail; // [sp+10h] [bp-24h]@1
  NiExtraData *v61; // [sp+18h] [bp-1Ch]@44
  int iNumOfQuest; // [sp+1Ch] [bp-18h]@39
  QuestDialogParser kParser; // [sp+20h] [bp-14h]@1
  bool bCreateBaseMenu; // [sp+26h] [bp-Eh]@7
  bool bShowReward; // [sp+27h] [bp-Dh]@1
  int v66; // [sp+30h] [bp-4h]@18
  int i; // [sp+3Ch] [bp+8h]@32
  int ia; // [sp+3Ch] [bp+8h]@73
  int iLeft; // [sp+50h] [bp+1Ch]@26
  NiExtraData *iLefta; // [sp+50h] [bp+1Ch]@42
  int iLeftc; // [sp+50h] [bp+1Ch]@52
  int iLeftb; // [sp+50h] [bp+1Ch]@67

  v7 = this;
  bShowReward = 0;
  v8 = QuestDataMgr::GetQuest();
  v9 = 0;
  DialogParser::DialogParser((DialogParser *)&kParser.m_pcCurrentStr);
  QuestDialogParser::StartParsing(&kParser, (CQuest *)&v8->vfptr, wID);
  for ( j = DialogParser::Parse((DialogParser *)&kParser.m_pcCurrentStr, &kDetail);
        j != 11;
        j = DialogParser::Parse((DialogParser *)&kParser.m_pcCurrentStr, &kDetail) )
  {
    if ( j == 12 )
    {
      v9 = 1;
    }
    else if ( j == 3 )
    {
      bShowReward = 1;
    }
  }
  bCreateBaseMenu = v9;
  if ( v9 && mobid == -1 )
    bCreateBaseMenu = 0;
  v11 = (int)v7->m_apkBtns;
  v12 = (NiExtraData *)7;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v11 + 256))(0);
    v11 += 4;
    v12 = (NiExtraData *)((char *)v12 - 1);
  }
  while ( v12 );
  ((void (__stdcall *)(_DWORD))v7->m_apkOutLineBtns->vfptr[64].__vecDelDtor)(0);
  v7->m_bShowOutLine = 0;
  v7->m_iBtnCount = 0;
  v13 = 1;
  if ( wID != 119 )
    v13 = bCreateBaseMenu;
  if ( bShowMenu && v13 )
  {
    if ( wID != 119 )
      SpeechBubbleDlgWin::ParseBaseDlgAndCreateBtn(v7, mobid, 0, 0, 0);
    v14 = (NiStringExtraData *)operator new(0x10u);
    v66 = 0;
    if ( v14 )
    {
      NiStringExtraData::NiStringExtraData(v14, "close");
      v12 = v15;
    }
    v66 = -1;
    v16 = (NiExtraData *)operator new(0x10u);
    v17 = v16;
    v66 = 1;
    if ( v16 )
    {
      NiExtraData::NiExtraData(v16);
      v17->vfptr = (NiRefObjectVtbl *)&NiIntegerExtraData::`vftable';
      v17[1].vfptr = 0;
    }
    else
    {
      v17 = 0;
    }
    v66 = -1;
    v18 = TextData::Get(0x9AE7FBE7);
    SpeechBubbleDlgWin::AddBtn(v7, (const char *)v18, 0, v17, v12);
    if ( wID == 119 )
    {
      v19 = v7->m_iBtnCount;
      v20 = 0;
      if ( v19 )
      {
        v21 = 141 * v19 + 1;
        v22 = ((int (*)(void))v7->m_apkBtns[0]->vfptr[37].__vecDelDtor)();
        v20 = (AutoSizingDialogWin::VirtualRect *)operator new(0xCu);
        v20->bFixed = 1;
        v20->uiWidth = v21;
        v20->uiHeight = v22;
      }
      AutoSizingDialogWin::BuildQuestDialog(v7->m_pkDialog, 0x77u, uiMinWidth, dwQuestID, byScriptCmd, v20);
      iLeft = 1;
      v23 = ((int (*)(void))v7->m_pkDialog->vfptr[36].__vecDelDtor)();
      SpeechBubbleWin::SetBubbleWidth((SpeechBubbleWin *)&v7->vfptr, v23 + 10);
      if ( v7->m_iBtnCount )
        v24 = ((int (*)(void))v7->m_apkBtns[0]->vfptr[37].__vecDelDtor)() + 10;
      else
        v24 = 0;
      if ( bShowReward )
        v25 = ((int (*)(void))v7->m_pkRewardWin->vfptr[37].__vecDelDtor)() + 10;
      else
        v25 = 0;
      v26 = ((int (*)(void))v7->m_pkDialog->vfptr[37].__vecDelDtor)();
      SpeechBubbleWin::SetBubbleHeight((SpeechBubbleWin *)&v7->vfptr, v24 + v25 + v26);
      v27 = v7->m_apkBtns;
      v28 = ((int (*)(void))v7->m_apkBtns[0]->vfptr[37].__vecDelDtor)();
      v29 = SpeechBubbleWin::GetBubbleHeight((SpeechBubbleWin *)&v7->vfptr) - v28;
      v30 = 0;
      for ( i = v29; v30 < v7->m_iBtnCount; ++v27 )
      {
        ((void (__stdcall *)(int))(*v27)->vfptr[43].__vecDelDtor)(iLeft);
        ((void (__stdcall *)(int))(*v27)->vfptr[44].__vecDelDtor)(i);
        FlexDlgBtn::SetBtnWidth(*v27, 140);
        iLeft += 141;
        ++v30;
      }
      goto LABEL_78;
    }
    v31 = QuestDataMgr::GetQuest();
    v32 = v31;
    if ( v31 )
    {
      if ( v31->m_pQuestData )
      {
        if ( CQuest::GetQuestListWithNPC((CQuest *)&v31->vfptr, mobid) )
        {
          v33 = v32->m_NumOfQuestListWithNPC;
          if ( v33 >= 2 )
          {
            iNumOfQuest = v32->m_NumOfQuestListWithNPC;
            if ( v33 > 20 )
              iNumOfQuest = 20;
            v34 = v32->m_MaxOfQuestListWithNPC;
            v35 = v33;
            v36 = (char *)TextData2::Get(0x9F8E7BA9);
            v37 = fs(v36, v35, v34);
            v38 = (NiStringExtraData *)operator new(0x10u);
            v66 = 2;
            if ( v38 )
            {
              NiStringExtraData::NiStringExtraData(v38, "questlist");
              iLefta = v39;
            }
            else
            {
              iLefta = 0;
            }
            v66 = -1;
            v40 = (NiExtraData *)operator new(0x10u);
            v41 = v40;
            v61 = v40;
            v66 = 3;
            if ( v40 )
            {
              NiExtraData::NiExtraData(v40);
              v41->vfptr = (NiRefObjectVtbl *)&NiIntegerExtraData::`vftable';
              v41[1].vfptr = 0;
            }
            else
            {
              v41 = 0;
            }
            v66 = -1;
            SpeechBubbleDlgWin::AddBtn(v7, v37, 0, v41, iLefta);
            if ( iNumOfQuest > 0 )
              v7->m_bShowOutLine = 1;
            v42 = v7->m_pkDlgQuestListWin;
            if ( v42 )
              v42->m_currTalkingNpcID = mobid;
          }
        }
      }
    }
  }
  v43 = v7->m_iBtnCount;
  v44 = 0;
  if ( v43 )
  {
    v45 = 141 * v43 + 1;
    iLeftc = ((int (*)(void))v7->m_apkBtns[0]->vfptr[37].__vecDelDtor)();
    v44 = (AutoSizingDialogWin::VirtualRect *)operator new(0xCu);
    v44->bFixed = 1;
    v44->uiWidth = v45;
    v44->uiHeight = iLeftc;
  }
  ((void (__stdcall *)(_DWORD))v7->m_pkRewardWin->vfptr[64].__vecDelDtor)(0);
  if ( bShowReward )
  {
    v46 = v7->m_pkRewardWin;
    v47 = RewardWin::HasSelectableReward(dwQuestID);
    v48 = v7->m_pkRewardWin;
    if ( v47 )
    {
      RewardWin::ShowSelectInvWin(v48, 1);
      ((void (__stdcall *)(unsigned int))v7->m_pkRewardWin->vfptr[117].__vecDelDtor)(v7->m_uiDefaultRewardWinWidth);
      if ( v44 )
      {
        if ( v44->uiWidth < ((int (*)(void))v7->m_pkRewardWin->vfptr[36].__vecDelDtor)() )
          v44->uiWidth = ((int (*)(void))v7->m_pkRewardWin->vfptr[36].__vecDelDtor)();
        v44->uiHeight += ((int (*)(void))v7->m_pkRewardWin->vfptr[37].__vecDelDtor)();
      }
      else
      {
        v44 = (AutoSizingDialogWin::VirtualRect *)operator new(0xCu);
        v44->bFixed = 1;
        v44->uiWidth = ((int (*)(void))v7->m_pkRewardWin->vfptr[36].__vecDelDtor)();
        v44->uiHeight = ((int (*)(void))v7->m_pkRewardWin->vfptr[37].__vecDelDtor)();
      }
      v49 = v7->m_pkRewardWin;
      v7->m_bSelectReward = 1;
      RewardWin::UpdateReward(v49, dwQuestID);
      ((void (__stdcall *)(signed int))v7->m_pkRewardWin->vfptr[64].__vecDelDtor)(1);
    }
    else
    {
      RewardWin::ShowSelectInvWin(v48, 0);
      ((void (__stdcall *)(unsigned int))v7->m_pkRewardWin->vfptr[117].__vecDelDtor)(v7->m_uiDefaultRewardWinWidth >> 1);
      if ( v44 )
      {
        if ( v44->uiWidth < ((int (*)(void))v7->m_pkRewardWin->vfptr[36].__vecDelDtor)() )
          v44->uiWidth = ((int (*)(void))v7->m_pkRewardWin->vfptr[36].__vecDelDtor)();
        v44->uiHeight += ((int (*)(void))v7->m_pkRewardWin->vfptr[37].__vecDelDtor)();
      }
      else
      {
        v44 = (AutoSizingDialogWin::VirtualRect *)operator new(0xCu);
        v44->bFixed = 1;
        v44->uiWidth = ((int (*)(void))v7->m_pkRewardWin->vfptr[36].__vecDelDtor)();
        v44->uiHeight = ((int (*)(void))v7->m_pkRewardWin->vfptr[37].__vecDelDtor)();
      }
      v50 = v7->m_pkRewardWin;
      v7->m_bSelectReward = 0;
      RewardWin::UpdateReward(v50, dwQuestID);
      ((void (__stdcall *)(signed int))v7->m_pkRewardWin->vfptr[64].__vecDelDtor)(1);
    }
  }
  AutoSizingDialogWin::BuildQuestDialog(v7->m_pkDialog, wID, uiMinWidth, dwQuestID, byScriptCmd, v44);
  iLeftb = 1;
  v51 = ((int (*)(void))v7->m_pkDialog->vfptr[36].__vecDelDtor)();
  SpeechBubbleWin::SetBubbleWidth((SpeechBubbleWin *)&v7->vfptr, v51 + 10);
  if ( v7->m_iBtnCount )
    v52 = ((int (*)(void))v7->m_apkBtns[0]->vfptr[37].__vecDelDtor)() + 10;
  else
    v52 = 0;
  if ( bShowReward )
    v53 = ((int (*)(void))v7->m_pkRewardWin->vfptr[37].__vecDelDtor)() + 10;
  else
    v53 = 0;
  v54 = ((int (*)(void))v7->m_pkDialog->vfptr[37].__vecDelDtor)();
  SpeechBubbleWin::SetBubbleHeight((SpeechBubbleWin *)&v7->vfptr, v52 + v53 + v54);
  v55 = ((int (*)(void))v7->m_apkBtns[0]->vfptr[37].__vecDelDtor)();
  v56 = SpeechBubbleWin::GetBubbleHeight((SpeechBubbleWin *)&v7->vfptr) - v55;
  ia = 0;
  if ( v7->m_iBtnCount > 0 )
  {
    v57 = v7->m_apkBtns;
    do
    {
      ((void (__stdcall *)(int))(*v57)->vfptr[43].__vecDelDtor)(iLeftb);
      ((void (__stdcall *)(int))(*v57)->vfptr[44].__vecDelDtor)(v56);
      FlexDlgBtn::SetBtnWidth(*v57, 140);
      iLeftb += 141;
      ++v57;
      ++ia;
    }
    while ( ia < v7->m_iBtnCount );
  }
  if ( v7->m_bShowOutLine )
  {
    ((void (__stdcall *)(int))v7->m_apkOutLineBtns->vfptr[43].__vecDelDtor)(iLeftb - 141);
    ((void (__stdcall *)(int))v7->m_apkOutLineBtns->vfptr[44].__vecDelDtor)(v56 - 2);
    FlexDlgBtn::SetBtnWidth(v7->m_apkOutLineBtns, 140);
  }
LABEL_78:
  if ( bShowReward )
  {
    ((void (__stdcall *)(_DWORD))v7->m_pkRewardWin->vfptr[43].__vecDelDtor)(0);
    v58 = v7->m_pkRewardWin->vfptr;
    v59 = ((int (*)(void))v7->m_pkDialog->vfptr[37].__vecDelDtor)();
    v58[44].__vecDelDtor((NiRefObject *)v7->m_pkRewardWin, v59 + 10);
  }
  v7->m_byCurrScriptCmd = byScriptCmd;
  v7->m_dwCurrQuestID = dwQuestID;
}
// 981C24: using guessed type int (__thiscall *NiIntegerExtraData::`vftable')(void *p, char);

//----- (005FD740) --------------------------------------------------------
void __thiscall NpcDialogWin::OpenNpcQuestDialog(NpcDialogWin *this, int mobid, unsigned int wID, unsigned int dwQuestID, char byScriptCmd, bool bIsShowMenu)
{
  int v6; // edi@1
  NpcDialogWin *v7; // esi@1
  char *v8; // edi@4
  const char *v9; // eax@7
  NiSourceTexture *v10; // eax@7
  const char *v11; // eax@10
  unsigned int v12; // ebx@17
  unsigned int v13; // edi@17
  SpeechBubbleDlgWin *v14; // ecx@19
  int v15; // ebx@19
  SpeechBubbleDlgWin *v16; // ecx@21
  NiRefObjectVtbl *v17; // ebx@21
  unsigned int v18; // eax@21
  float y; // ST14_4@21
  NiPoint3 kPos; // [sp+24h] [bp-Ch]@21
  float mobida; // [sp+38h] [bp+8h]@21
  float mobidb; // [sp+38h] [bp+8h]@21

  v6 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
  v7 = this;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 16))(
                          ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                          mobid) )
  {
    if ( (unsigned __int16)mobid <= *(_WORD *)(v6 + 200) )
    {
      if ( *(_DWORD *)(*(_DWORD *)(v6 + 196) + 4 * (unsigned __int16)mobid) )
      {
        NpcDialogWin::CheckCloseTimer(v7, wID);
        v8 = NpcDialogDataTable::GetFaceCutFileNameByMobID(mobid);
        if ( v8 )
        {
          if ( !Folder::m_bInit )
            Folder::Init();
          v9 = fs("%s\\game\\NPCFaceCut\\%s.png", &Folder::m_acMenu, v8);
          v10 = PgUtil::LoadSourceTexture(v9);
          if ( !v10 )
          {
            if ( !Folder::m_bInit )
              Folder::Init();
            v11 = fs("%s\\game\\NPCFaceCut\\%s.tga", &Folder::m_acMenu, v8);
            v10 = PgUtil::LoadSourceTexture(v11);
          }
          if ( (_WORD)mobid != -1 && v10 )
          {
            PgSpr::SetTexture(v7->m_spFaceCut.m_pObject->m_spSpr.m_pObject, (NiTexture *)&v10->vfptr);
            ((void (__stdcall *)(signed int))v7->m_spFaceCut.m_pObject->vfptr[64].__vecDelDtor)(1);
          }
          else
          {
            ((void (__stdcall *)(_DWORD))v7->m_spFaceCut.m_pObject->vfptr[64].__vecDelDtor)(0);
          }
          if ( PgWin::ms_uiScreenWidth > 0x320 || PgWin::ms_uiScreenHeight > 0x258 )
          {
            v12 = 650 * PgWin::ms_uiScreenWidth >> 10;
            v13 = 570 * PgWin::ms_uiScreenHeight / 0x300;
          }
          else
          {
            v12 = 650 * PgWin::ms_uiScreenWidth / 0x320;
            v13 = 570 * PgWin::ms_uiScreenHeight / 0x2BC;
          }
          v14 = v7->m_pkNpcDlgWin;
          v7->m_currTalkingNpcID = mobid;
          SpeechBubbleDlgWin::BuildQuestDialog(v14, mobid, wID, dwQuestID, byScriptCmd, v12 - 30, bIsShowMenu);
          v15 = v12 - ((int (*)(void))v7->m_pkNpcDlgWin->vfptr[36].__vecDelDtor)();
          if ( v15 < 0 )
            v15 = 20;
          ((void (__stdcall *)(int))v7->m_pkNpcDlgWin->vfptr[43].__vecDelDtor)(v15);
          v16 = v7->m_pkNpcDlgWin;
          v17 = v16->vfptr;
          v18 = ((int (*)(void))v16->vfptr[37].__vecDelDtor)();
          v17[44].__vecDelDtor((NiRefObject *)v7->m_pkNpcDlgWin, v13 - (v18 >> 1));
          v7->m_pkNpcDlgWin->m_uiMode = 1;
          mobida = (double)PgWin::ms_uiScreenHeight * 0.800000011920929;
          y = mobida;
          mobidb = 0.800000011920929 * (double)PgWin::ms_uiScreenWidth;
          SpeechBubbleWin::SetNpcPos((SpeechBubbleWin *)&v7->m_pkNpcDlgWin->vfptr, mobidb, y);
          ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[6].SetAbStateProperty)(&kPos);
          CNSTimer_Interval::ReSet(&v7->m_kRandomTimer_Interval, Timer::ms_fCurTime);
          v7->m_kRandomTimer_Interval.m_fCheckTime = 1.0;
        }
      }
    }
  }
}
// A8975C: using guessed type bool Folder::m_bInit;
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;

//----- (005FD9B0) --------------------------------------------------------
void __thiscall NpcDialogWin::OpenUserQuestDialog(NpcDialogWin *this, unsigned int wID, unsigned int dwQuestID, char byScriptCmd)
{
  NpcDialogWin *v4; // esi@1
  unsigned int v5; // edi@1
  unsigned int v6; // ebx@1
  unsigned int *v7; // ecx@1
  int v8; // eax@1
  NiRefObjectVtbl *v9; // edi@1
  unsigned int v10; // eax@1
  NiPoint3 kPos; // [sp+Ch] [bp-Ch]@1
  unsigned int wIDa; // [sp+20h] [bp+8h]@1

  v4 = this;
  ((void (__stdcall *)(_DWORD))this->m_spFaceCut.m_pObject->vfptr[64].__vecDelDtor)(0);
  v5 = 440 * PgWin::ms_uiScreenWidth >> 10;
  v6 = 370 * PgWin::ms_uiScreenHeight / 0x300;
  NpcDialogWin::CheckCloseTimer(v4, wID);
  SpeechBubbleDlgWin::BuildQuestDialog(v4->m_pkNpcDlgWin, 0xFFFFu, wID, dwQuestID, byScriptCmd, v5 - 30, 1);
  v7 = (unsigned int *)v4->m_pkNpcDlgWin;
  wIDa = *v7;
  v8 = (*(int (**)(void))(*v7 + 144))();
  (*(void (__thiscall **)(_DWORD, _DWORD))(wIDa + 172))(v4->m_pkNpcDlgWin, v5 - v8);
  v9 = v4->m_pkNpcDlgWin->vfptr;
  v10 = ((int (*)(void))v4->m_pkNpcDlgWin->vfptr[37].__vecDelDtor)();
  v9[44].__vecDelDtor((NiRefObject *)v4->m_pkNpcDlgWin, v6 - (v10 >> 1));
  v4->m_pkNpcDlgWin->m_uiMode = 0;
  ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[6].SetAbStateProperty)(&kPos);
}

//----- (005FDAA0) --------------------------------------------------------
char __thiscall DlgQuestListWin::Create(DlgQuestListWin *this, PgFrameWork *pkFrameWork)
{
  DlgQuestListWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiAVObject *v5; // eax@4
  NiTexturingProperty *v6; // eax@4
  NiTexturingProperty *v7; // edi@4
  NiTexturingProperty::Map *v8; // eax@6
  PgSprData *v9; // eax@9
  NiNode *v10; // esi@12
  char result; // al@16
  int v12; // edi@17
  int v13; // ebx@17
  NiSourceTexture *v14; // eax@17
  PgSprData *v15; // eax@18
  NiTexturingProperty *v16; // esi@21
  NiNode *v17; // esi@23
  PgFont *v18; // eax@27
  NiSourceTexture **v19; // edi@27
  NiUnsharedGeometryGroup *v20; // eax@27
  NiSourceTexture *v21; // edi@27
  PgSprData *v22; // eax@27
  PgWinSpr *v23; // eax@27
  PgSprData *v24; // eax@27
  PgWinSpr *v25; // eax@27
  PgSprData *v26; // eax@27
  PgWinSpr *v27; // eax@27
  PgSprData *v28; // eax@27
  PgWinSpr *v29; // eax@27
  SLWCreateInfo::Item *v30; // eax@29
  SLWCreateInfo::Item *v31; // eax@37
  PgSprData *v32; // eax@37
  SlideListWin *v33; // eax@37
  PgSprData *v34; // edi@37
  NiObjectNET *v35; // eax@37
  NiObjectNET *v36; // eax@37
  NiObjectNET *v37; // eax@37
  NiObjectNET *v38; // eax@37
  NiObjectNET *v39; // eax@37
  NiObjectNET *v40; // eax@37
  SlideBar *v41; // eax@37
  SlideBar *v42; // eax@37
  NiRefObjectVtbl *v43; // ebx@37
  SlideBar *v44; // edi@37
  int v45; // eax@37
  int v46; // eax@37
  NiTexturingProperty *v47; // esi@37
  NiNode *v48; // esi@39
  SLWCreateInfo kCreateInfo; // [sp+60h] [bp-6Ch]@29
  unsigned int uiHeight; // [sp+7Ch] [bp-50h]@20
  unsigned int uiWidth; // [sp+80h] [bp-4Ch]@20
  NiPointer<NiTexturingProperty> spTexProp; // [sp+84h] [bp-48h]@4
  NiSourceTexture *pkTexture8; // [sp+88h] [bp-44h]@27
  int iOffY; // [sp+8Ch] [bp-40h]@1
  SLWCreateInfo::Item *pCIItem; // [sp+90h] [bp-3Ch]@7
  int uiTop; // [sp+94h] [bp-38h]@9
  int uiLeft; // [sp+98h] [bp-34h]@9
  NiPointer<NiNode> spNode; // [sp+9Ch] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+A0h] [bp-2Ch]@29
  int v60; // [sp+C8h] [bp-4h]@1

  v2 = this;
  iOffY = (int)pkFrameWork;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v60 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\QuestList.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Panel01");
  v6 = (NiTexturingProperty *)NiAVObject::GetProperty(v5, 8);
  v7 = v6;
  spTexProp.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v8 = *v7->m_kMaps.m_pBase;
  LOBYTE(v60) = 1;
  if ( v8 )
    pCIItem = (SLWCreateInfo::Item *)v8->m_spTexture.m_pObject;
  else
    pCIItem = 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, (NiSourceTexture *)pCIItem);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, (PgFrameWork *)iOffY, "DlgQuestListWin", 0) )
  {
    LOBYTE(v60) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v10 = spNode.m_pObject;
    v60 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
    return 0;
  }
  v12 = uiTop;
  v13 = uiLeft;
  iOffY = uiTop;
  v14 = MenuTexMgr::GetTexture(0x13u);
  if ( v14 )
    v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v14);
  else
    v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v13, uiTop - v12, v15, (PgWin *)&v2->vfptr, 0, 0);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v18 = Font::Get(MAIN_MENU);
    v19 = (NiSourceTexture **)PgWinText::CreateWin(
                                uiLeft - v13,
                                uiTop - v12,
                                uiWidth,
                                uiHeight,
                                v18,
                                (PgWin *)&v2->vfptr,
                                0,
                                0);
    ((void (__thiscall *)(NiSourceTexture **, signed int))(*v19)[7].m_spControllers.m_pObject)(v19, 1);
    ((void (__thiscall *)(NiSourceTexture **, struct D3DXCOLOR *))(*v19)[6].m_spSrcPixelData.m_pObject)(
      v19,
      &Color::m_kDxWinTitleColor);
    pkTexture8 = *v19;
    v20 = TextData2::Get(0xF8FBDA5C);
    (*(void (__thiscall **)(NiSourceTexture **, NiUnsharedGeometryGroup *))&pkTexture8[6].m_bStatic)(v19, v20);
    ((void (__thiscall *)(NiSourceTexture **, _DWORD))(*v19)[3].m_kFormatPrefs.m_eMipMapped)(v19, 0);
    v21 = (NiSourceTexture *)pCIItem;
    v22 = PgSprData::Create(
            (NiAVObject *)&spNode.m_pObject->vfptr,
            "Panel01",
            &uiLeft,
            &uiTop,
            (NiSourceTexture *)pCIItem);
    v23 = PgWinSpr::CreateWin(uiLeft - v13, uiTop - iOffY, v22, (PgWin *)&v2->vfptr, 0, 0);
    v23->vfptr[60].__vecDelDtor((NiRefObject *)v23, 1u);
    v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, v21);
    v25 = PgWinSpr::CreateWin(uiLeft - v13, uiTop - iOffY, v24, (PgWin *)&v2->vfptr, 0, 0);
    v25->vfptr[60].__vecDelDtor((NiRefObject *)v25, 1u);
    v26 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, v21);
    v27 = PgWinSpr::CreateWin(uiLeft - v13, uiTop - iOffY, v26, (PgWin *)&v2->vfptr, 0, 0);
    v27->vfptr[60].__vecDelDtor((NiRefObject *)v27, 0);
    v28 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title01Nor", &uiLeft, &uiTop, v21);
    v29 = PgWinSpr::CreateWin(uiLeft - v13, uiTop - iOffY, v28, (PgWin *)&v2->vfptr, 0, 0);
    v29->vfptr[60].__vecDelDtor((NiRefObject *)v29, 0);
    pCIItem = (SLWCreateInfo::Item *)PgSprData::Create(
                                       (NiAVObject *)&spNode.m_pObject->vfptr,
                                       "ClsNor",
                                       &uiLeft,
                                       &uiTop,
                                       v21);
    PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
    PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
    PgWinBut::CreateWin(uiLeft - v13, uiTop - iOffY, (PgSprData *)pCIItem, (PgWin *)&v2->vfptr, 2u, 0, 0);
    pkTexture8 = MenuTexMgr::GetTexture(4u);
    if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
    {
      pCIItem = (SLWCreateInfo::Item *)PgSprData::Create(
                                         (NiAVObject *)&spNode.m_pObject->vfptr,
                                         "HelpLinkNor",
                                         &uiLeft,
                                         &uiTop,
                                         pkTexture8);
      PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
      PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
      PgWinBut::CreateWin(uiLeft - v13, uiTop - iOffY, (PgSprData *)pCIItem, (PgWin *)&v2->vfptr, 3u, 0, 0);
    }
    kCreateInfo.m_arrItem._Myfirst = 0;
    kCreateInfo.m_arrItem._Mylast = 0;
    kCreateInfo.m_arrItem._Myend = 0;
    kCreateInfo.m_bMakeData = 0;
    kCreateInfo.m_nOffX = 0;
    kCreateInfo.m_nOffY = 0;
    LOBYTE(v60) = 2;
    v30 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
    v30->nItemType = 1;
    v30->pNode = spNode.m_pObject;
    pCIItem = v30;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarNor", 0xCu);
    LOBYTE(v60) = 3;
    pCIItem = (SLWCreateInfo::Item *)((char *)pCIItem + 72);
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pCIItem,
      &_Val);
    LOBYTE(v60) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarClick", 0xEu);
    LOBYTE(v60) = 4;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pCIItem,
      &_Val);
    LOBYTE(v60) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarClick", 0xEu);
    LOBYTE(v60) = 5;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pCIItem,
      &_Val);
    LOBYTE(v60) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pCIItem = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    pCIItem->nItemType = 2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column01", 8u);
    LOBYTE(v60) = 6;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      &pCIItem->vecNodeName,
      &_Val);
    LOBYTE(v60) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    v31 = pCIItem;
    pCIItem->bAbbreviatable = 1;
    v31->pNode = spNode.m_pObject;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
    v32 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SubText01", &uiLeft, &uiTop, v21);
    v33 = SlideListWin::CreateWin(uiLeft - v13, uiTop - iOffY, v32, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
    v2->m_pListWinQuestList = v33;
    v33->m_uiLClickMsg = 0;
    v2->m_pListWinQuestList->m_bCheckEnable = 0;
    SlideListWin::AlignText(v2->m_pListWinQuestList, 4u);
    SlideListWin::UpdateViewList(v2->m_pListWinQuestList);
    v34 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle", &uiLeft, &uiTop, v21);
    v35 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnNor01");
    NiObjectNET::SetName(v35, "SlideBar_DnBtn01Nor");
    v36 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnClick01");
    NiObjectNET::SetName(v36, "SlideBar_DnBtn01Click");
    v37 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnOver01");
    NiObjectNET::SetName(v37, "SlideBar_DnBtn01Over");
    v38 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnNor01");
    NiObjectNET::SetName(v38, "SlideBar_UpBtn01Nor");
    v39 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnClick01");
    NiObjectNET::SetName(v39, "SlideBar_UpBtn01Click");
    v40 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnOver01");
    NiObjectNET::SetName(v40, "SlideBar_UpBtn01Over");
    v41 = SlideBar::CreateWin(
            spNode.m_pObject,
            "SlideBar01",
            "SlideBar_UpBtn01",
            "SlideBar_DnBtn01",
            v34,
            0,
            (PgWin *)&v2->vfptr);
    v2->m_pSlideBarList = v41;
    v41->m_uiClickMsg = 1;
    v2->m_pSlideBarList->m_eType = 1;
    v42 = v2->m_pSlideBarList;
    v43 = v42->vfptr;
    v44 = v2->m_pSlideBarList;
    v45 = ((int (__thiscall *)(SlideBar *))v42->vfptr[42].__vecDelDtor)(v2->m_pSlideBarList);
    v46 = (int)v44->vfptr[41].__vecDelDtor((NiRefObject *)v44, v45);
    v43[77].__vecDelDtor((NiRefObject *)v2->m_pSlideBarList, v46 - 18);
    ((void (__thiscall *)(DlgQuestListWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    LOBYTE(v60) = 1;
    SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
    v47 = spTexProp.m_pObject;
    LOBYTE(v60) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
      v47->vfptr->__vecDelDtor((NiRefObject *)v47, 1u);
    v48 = spNode.m_pObject;
    v60 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v48 )
      v48->vfptr->__vecDelDtor((NiRefObject *)v48, 1u);
    result = 1;
  }
  else
  {
    v16 = spTexProp.m_pObject;
    LOBYTE(v60) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
      v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
    v17 = spNode.m_pObject;
    v60 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v17 )
      return 0;
    v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005FE2D0) --------------------------------------------------------
void __thiscall DlgQuestListWin::SetQuestList(DlgQuestListWin *this)
{
  DlgQuestListWin *v1; // ebx@1
  CClientQuest *v2; // eax@1
  SlideListWin *v3; // ecx@1
  CQuest *v4; // esi@1
  CQuestData *v5; // eax@1
  std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *v6; // edi@1
  int v7; // esi@7
  const char *v8; // ebx@7
  unsigned __int16 v9; // dx@7
  std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *v10; // eax@7
  std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *v11; // esi@12
  char v12; // dl@13
  unsigned int v13; // eax@13
  bool v14; // cl@13
  bool v15; // dl@13
  bool v16; // cl@13
  NiUnsharedGeometryGroup *v17; // eax@15
  char *v18; // ecx@19
  const char *v19; // eax@21
  unsigned int v20; // edi@21
  SlideListWin *v21; // ecx@24
  SlideBar *v22; // ecx@32
  SlideListWin *v23; // eax@33
  int v24; // [sp-4h] [bp-88h]@26
  std::exception pExceptionObject; // [sp+10h] [bp-74h]@36
  char *_What; // [sp+1Ch] [bp-68h]@36
  DlgQuestListWin *v27; // [sp+20h] [bp-64h]@1
  CQuest *pkQuest; // [sp+24h] [bp-60h]@1
  int iNumOfQuest; // [sp+28h] [bp-5Ch]@4
  CQuestData *pkQuestData; // [sp+2Ch] [bp-58h]@1
  int i; // [sp+30h] [bp-54h]@4
  unsigned int v32; // [sp+34h] [bp-50h]@5
  std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > kQuestNameList; // [sp+38h] [bp-4Ch]@1
  DlgQuestListWin::QuestNameList kList; // [sp+44h] [bp-40h]@7
  int v35; // [sp+80h] [bp-4h]@2

  v1 = this;
  v27 = this;
  v2 = QuestDataMgr::GetQuest();
  v3 = v1->m_pListWinQuestList;
  v4 = (CQuest *)v2;
  v5 = v2->m_pQuestData;
  pkQuest = v4;
  pkQuestData = v5;
  SlideListWin::RemoveAllList(v3);
  kQuestNameList._Mysize = 0;
  v6 = (std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *)operator new(0x38u);
  if ( !v6 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v6->_Next = v6;
  kQuestNameList._Myhead = v6;
  v6->_Prev = v6;
  v35 = 0;
  if ( pkQuestData && CQuest::GetQuestListWithNPC(v4, v1->m_currTalkingNpcID) )
  {
    iNumOfQuest = v4->m_NumOfQuestListWithNPC;
    i = 0;
    if ( iNumOfQuest > 0 )
    {
      v32 = 0;
      while ( 1 )
      {
        v7 = (int)&v4->m_pQuestListWithNPC[v32 / 0x10];
        v8 = CQuestData::GetQuestName(pkQuestData, *(_WORD *)(*(_DWORD *)(v7 + 4) + 4));
        DlgQuestListWin::QuestNameList::QuestNameList(&kList);
        v9 = *(_WORD *)(*(_DWORD *)(v7 + 4) + 4);
        LOBYTE(v35) = 1;
        kList.m_QuestID = v9;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&kList.m_Title, v8, strlen(v8));
        kList.m_Data = *(_WORD *)(*(_DWORD *)(v7 + 4) + 4);
        kList.m_Level = *(_DWORD *)(v7 + 12);
        kList.m_Status = *(_DWORD *)(v7 + 8);
        kList.m_Type = *(_BYTE *)(*(_DWORD *)(v7 + 4) + 17);
        kList.m_Repeatable = *(_BYTE *)(*(_DWORD *)(v7 + 4) + 18) != 0;
        kList.m_StartItem = *(_BYTE *)(*(_DWORD *)(v7 + 4) + 32) != 0;
        kList.m_StartQuest = *(_BYTE *)(*(_DWORD *)(v7 + 4) + 56) != 0;
        v10 = std::_List_val<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::_Buynode(
                v6,
                v6->_Prev,
                &kList);
        if ( 89478484 - kQuestNameList._Mysize < 1 )
          std::_Xlength_error("list<T> too long");
        ++kQuestNameList._Mysize;
        v6->_Prev = v10;
        v10->_Prev->_Next = v10;
        LOBYTE(v35) = 0;
        if ( kList.m_Title._Myres >= 0x10 )
          operator delete(kList.m_Title._Bx._Ptr);
        v32 += 16;
        if ( ++i >= iNumOfQuest )
          break;
        v4 = pkQuest;
      }
      v1 = v27;
    }
    std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::sort<bool (__cdecl *)(DlgQuestListWin::QuestNameList const &,DlgQuestListWin::QuestNameList const &)>(
      &kQuestNameList,
      DlgQuestListWin::QuestNameList::SortType);
    std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::sort<bool (__cdecl *)(DlgQuestListWin::QuestNameList const &,DlgQuestListWin::QuestNameList const &)>(
      &kQuestNameList,
      DlgQuestListWin::QuestNameList::SortRepeatable);
    std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::sort<bool (__cdecl *)(DlgQuestListWin::QuestNameList const &,DlgQuestListWin::QuestNameList const &)>(
      &kQuestNameList,
      DlgQuestListWin::QuestNameList::SortStartItem);
    std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::sort<bool (__cdecl *)(DlgQuestListWin::QuestNameList const &,DlgQuestListWin::QuestNameList const &)>(
      &kQuestNameList,
      DlgQuestListWin::QuestNameList::SortStartQuest);
    std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::sort<bool (__cdecl *)(DlgQuestListWin::QuestNameList const &,DlgQuestListWin::QuestNameList const &)>(
      &kQuestNameList,
      DlgQuestListWin::QuestNameList::SortEvent);
    std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::sort<bool (__cdecl *)(DlgQuestListWin::QuestNameList const &,DlgQuestListWin::QuestNameList const &)>(
      &kQuestNameList,
      (bool (__cdecl *)(DlgQuestListWin::QuestNameList *, DlgQuestListWin::QuestNameList *))DlgQuestListWin::QuestNameList::SortLevel);
    std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::sort<bool (__cdecl *)(DlgQuestListWin::QuestNameList const &,DlgQuestListWin::QuestNameList const &)>(
      &kQuestNameList,
      DlgQuestListWin::QuestNameList::SortStatus);
    v11 = kQuestNameList._Myhead->_Next;
    if ( kQuestNameList._Myhead->_Next != kQuestNameList._Myhead )
    {
      while ( 1 )
      {
        kList.m_QuestID = v11->_Myval.m_QuestID;
        kList.m_Title._Myres = 15;
        kList.m_Title._Mysize = 0;
        kList.m_Title._Bx._Buf[0] = 0;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &kList.m_Title,
          &v11->_Myval.m_Title,
          0,
          0xFFFFFFFF);
        v12 = v11->_Myval.m_Type;
        v13 = v11->_Myval.m_Data;
        kList.m_Level = v11->_Myval.m_Level;
        v14 = v11->_Myval.m_StartItem;
        kList.m_Type = v12;
        v15 = v11->_Myval.m_StartQuest;
        kList.m_StartItem = v14;
        v16 = v11->_Myval.m_Repeatable;
        kList.m_Data = v13;
        kList.m_Status = v11->_Myval.m_Status;
        kList.m_StartQuest = v15;
        kList.m_Repeatable = v16;
        LOBYTE(v35) = 2;
        switch ( kList.m_Status )
        {
          case 4:
          case 5:
          case 9:
          case 0x14:
            v17 = TextData::Get(0x8988D7BA);
            break;
          case 6:
            v17 = TextData::Get(0xA4FDEBBD);
            break;
          case 8:
            v17 = TextData::Get(0x859CC9CD);
            break;
          default:
            v17 = (NiUnsharedGeometryGroup *)".";
            break;
        }
        v18 = kList.m_Title._Bx._Ptr;
        if ( kList.m_Title._Myres < 0x10 )
          v18 = kList.m_Title._Bx._Buf;
        v19 = fs("(%d)  %s  (%s)", kList.m_Level, v18, v17);
        v20 = SlideListWin::AddText(v1->m_pListWinQuestList, v19);
        SlideListWin::SetData(v1->m_pListWinQuestList, v20, kList.m_Data);
        if ( kList.m_Status == 5 || kList.m_Status == 20 || kList.m_Status == 4 )
          break;
        v21 = v1->m_pListWinQuestList;
        if ( kList.m_Status != 6 )
        {
          v24 = 255;
LABEL_28:
          SlideListWin::SetFontColor(v21, v20, 255, 255, v24);
          goto LABEL_29;
        }
        SlideListWin::SetFontColor(v21, v20, 0, 248, 240);
LABEL_29:
        LOBYTE(v35) = 0;
        if ( kList.m_Title._Myres >= 0x10 )
          operator delete(kList.m_Title._Bx._Ptr);
        v11 = v11->_Next;
        if ( v11 == kQuestNameList._Myhead )
          goto LABEL_32;
      }
      v21 = v1->m_pListWinQuestList;
      v24 = 0;
      goto LABEL_28;
    }
LABEL_32:
    SlideListWin::AlignText(v1->m_pListWinQuestList, 4u);
    SlideListWin::AlignText(v1->m_pListWinQuestList, 1u, 5u);
    v22 = v1->m_pSlideBarList;
    if ( v22 )
    {
      v23 = v1->m_pListWinQuestList;
      if ( v23 )
      {
        SlideBar::SetSplitCnt(v22, v23->m_nSlideSplitCnt);
        v1->m_pListWinQuestList->m_nViewStartPos = v1->m_pSlideBarList->m_nCurPos;
        SlideListWin::UpdateViewList(v1->m_pListWinQuestList);
      }
    }
  }
  std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::clear(&kQuestNameList);
  operator delete(kQuestNameList._Myhead);
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (005FE710) --------------------------------------------------------
void __userpurge SpeechBubbleDlgWin::OnCommand(SpeechBubbleDlgWin *this@<ecx>, int a2@<edi>, int a3@<esi>, unsigned int wParam, int lParam)
{
  SpeechBubbleDlgWin *v5; // ebx@1
  NiObjectNET *v6; // esi@2
  NiExtraData *v7; // eax@2
  NiExtraData *v8; // edi@2
  PgFrameWork *v9; // eax@4
  PgMsg::Frame *v10; // ecx@5
  DlgQuestListWin *v11; // ecx@9
  unsigned int v12; // edi@26
  NiUnsharedGeometryGroup *v13; // edi@34
  RewardWin *v14; // ecx@41
  unsigned int v15; // esi@41
  NiUnsharedGeometryGroup *v16; // edi@42
  bool v17; // zf@46
  unsigned int v18; // edx@46
  char v19; // al@46
  int v20; // [sp-8h] [bp-1Ch]@2
  int v21; // [sp-4h] [bp-18h]@2
  DirectUserMsgBody_NpcDialogResponse kBody; // [sp+4h] [bp-10h]@38

  v5 = this;
  if ( wParam != 77777 )
    return;
  v21 = a3;
  v6 = (NiObjectNET *)lParam;
  v20 = a2;
  NiObjectNET::GetExtraData((NiObjectNET *)lParam, "type");
  v7 = NiObjectNET::GetExtraData(v6, "action");
  v8 = v7;
  if ( !v7 )
    goto LABEL_50;
  lParam = (int)v7[1].vfptr;
  if ( !strcmp((const char *)lParam, "close") )
  {
    v9 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v9 )
    {
      v10 = v9[28].m_kMsgQ.m_pBase;
      if ( v10 )
      {
        if ( !(unsigned __int8)(*(int (**)(void))(v10->m_uiDumy[0] + 260))() )
          NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 8u, 0xBu, 0, 0);
      }
    }
    goto LABEL_50;
  }
  if ( !strcmp((const char *)lParam, "questlist") )
  {
    v11 = v5->m_pkDlgQuestListWin;
    if ( v11 )
    {
      DlgQuestListWin::SetQuestList(v11);
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v5->m_pkDlgQuestListWin->vfptr);
    }
    return;
  }
  if ( !strcmp((const char *)lParam, "DivorceRequest") )
  {
    ((void (__stdcall *)(unsigned int, int))v5->m_pkDivorceMenuListPopup->vfptr[77].__vecDelDtor)(
      PgWin::ms_iMsX,
      PgWin::ms_iMsY);
    PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v5->m_pkDivorceMenuListPopup->vfptr);
    return;
  }
  if ( !strcmp((const char *)lParam, "MarryRequest") )
  {
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 8u, 0x53u, 0, 0);
LABEL_50:
    if ( v5->m_pkMsgHooker )
    {
      ((void (__stdcall *)(signed int, _DWORD, IDirectMessengerVtbl **))v5->m_pkMsgHooker->vfptr->SendDirectMessage)(
        36,
        0,
        &v5->vfptr);
      if ( v5->m_pkMsgHooker )
        ((void (__stdcall *)(signed int, _DWORD, IDirectMessengerVtbl **))v5->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          36,
          0,
          &v5->vfptr);
    }
    v5->vfptr->DirectDispatchToParent((IDirectMessenger *)&v5->vfptr, 36, 0, (IDirectMessenger *)&v5->vfptr);
    return;
  }
  if ( !strcmp((const char *)lParam, "PetSetName") )
  {
    if ( v5->m_pkMsgHooker )
    {
      ((void (__stdcall *)(signed int, _DWORD, IDirectMessengerVtbl **))v5->m_pkMsgHooker->vfptr->SendDirectMessage)(
        80,
        0,
        &v5->vfptr);
      if ( v5->m_pkMsgHooker )
        ((void (__stdcall *)(signed int, _DWORD, IDirectMessengerVtbl **))v5->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          80,
          0,
          &v5->vfptr);
    }
    v5->vfptr->DirectDispatchToParent((IDirectMessenger *)&v5->vfptr, 80, 0, (IDirectMessenger *)&v5->vfptr);
    goto LABEL_50;
  }
  if ( !strcmp((const char *)lParam, "PetSetNameCancel") )
  {
    if ( v5->m_pkMsgHooker )
    {
      ((void (__stdcall *)(signed int, _DWORD, _DWORD))v5->m_pkMsgHooker->vfptr->SendDirectMessage)(81, 0, &v5->vfptr);
      if ( v5->m_pkMsgHooker )
        ((void (__stdcall *)(signed int, _DWORD, _DWORD))v5->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          81,
          0,
          &v5->vfptr);
    }
    v5->vfptr->DirectDispatchToParent((IDirectMessenger *)&v5->vfptr, 81, 0, (IDirectMessenger *)&v5->vfptr);
    goto LABEL_50;
  }
  if ( v5->m_bClickPortalNPC )
  {
    v12 = 0;
    if ( (signed int)ITableBase<TownPortal,TownPortalInfoTable>::GetTotal() > 0 )
    {
      while ( strcmp(ITableBase<TownPortal,TownPortalInfoTable>::GetByIndex(v12)->MapName, (const char *)lParam) )
      {
        if ( (signed int)++v12 >= (signed int)ITableBase<TownPortal,TownPortalInfoTable>::GetTotal() )
          goto LABEL_50;
      }
      BYTE3(wParam) = ITableBase<TownPortal,TownPortalInfoTable>::GetByIndex(v12)->Index;
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 6u, 0x1Au, (char *)&wParam + 3, 1);
      v5->m_bClickPortalNPC = 0;
    }
    goto LABEL_50;
  }
  if ( (unsigned __int8)((int (__stdcall *)(int, int))v5->m_pkRewardWin->vfptr[65].__vecDelDtor)(v20, v21)
    && v5->m_bSelectReward )
  {
    if ( RewardWin::GetRealSelectReword(v5->m_pkRewardWin) == -1 )
    {
      v13 = TextData::Get(0x90FCD9C7);
      if ( v5->m_pkMsgHooker )
      {
        ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v5->m_pkMsgHooker->vfptr->SendDirectMessage)(
          25,
          v13,
          &v5->vfptr);
        if ( v5->m_pkMsgHooker )
          ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v5->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            25,
            v13,
            &v5->vfptr);
      }
      ((void (__thiscall *)(IDirectMessengerVtbl **, signed int))v5->vfptr->DirectDispatchToParent)(&v5->vfptr, 25);
      return;
    }
    kBody.dwItemSelIndex = RewardWin::GetRealSelectReword(v5->m_pkRewardWin);
  }
  else
  {
    kBody.dwItemSelIndex = -1;
  }
  if ( !(unsigned __int8)((int (*)(void))v5->m_pkRewardWin->vfptr[65].__vecDelDtor)()
    || (v14 = v5->m_pkRewardWin,
        v15 = RewardWin::GetRewardItemCount(v5->m_dwCurrQuestID),
        Inventory::GetEmptySlotCount(&g_kInventory) >= v15) )
  {
    v17 = v5->m_pkMsgHooker == 0;
    v18 = v5->m_dwCurrQuestID;
    v19 = v5->m_byCurrScriptCmd;
    kBody.acAction = (char *)v8[1].vfptr;
    kBody.dwQuestID = v18;
    kBody.byScriptCmd = v19;
    if ( !v17 )
    {
      ((void (__stdcall *)(signed int, DirectUserMsgBody_NpcDialogResponse *, IDirectMessengerVtbl **))v5->m_pkMsgHooker->vfptr->SendDirectMessage)(
        37,
        &kBody,
        &v5->vfptr);
      if ( v5->m_pkMsgHooker )
        ((void (__stdcall *)(signed int, DirectUserMsgBody_NpcDialogResponse *, IDirectMessengerVtbl **))v5->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          37,
          &kBody,
          &v5->vfptr);
    }
    ((void (__thiscall *)(IDirectMessengerVtbl **, signed int))v5->vfptr->DirectDispatchToParent)(&v5->vfptr, 37);
    goto LABEL_50;
  }
  v16 = TextData::Get(0x6C7C4F96u);
  if ( v5->m_pkMsgHooker )
  {
    ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v5->m_pkMsgHooker->vfptr->SendDirectMessage)(
      25,
      v16,
      &v5->vfptr);
    if ( v5->m_pkMsgHooker )
      ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v5->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
        25,
        v16,
        &v5->vfptr);
  }
  ((void (__thiscall *)(IDirectMessengerVtbl **, signed int))v5->vfptr->DirectDispatchToParent)(&v5->vfptr, 25);
}
// 5FE710: could not find valid save-restore pair for edi
// 5FE710: could not find valid save-restore pair for esi

//----- (005FEC40) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::~NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>(NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *> *this)
{
  this->vfptr = (NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>Vtbl *)&NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::`vftable';
}
// 9B43B8: using guessed type int (__thiscall *NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::`vftable')(void *p, char);

//----- (005FEC50) --------------------------------------------------------
NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *> *__thiscall NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::`vector deleting destructor'(NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *> *this, unsigned int a2)
{
  NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>Vtbl *)&NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9B43B8: using guessed type int (__thiscall *NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::`vftable')(void *p, char);

//----- (005FEC80) --------------------------------------------------------
FlexDlgBtn *__thiscall FlexDlgBtn::`scalar deleting destructor'(FlexDlgBtn *this, unsigned int a2)
{
  FlexDlgBtn *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&FlexDlgBtn::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&FlexDlgBtn::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B389C: using guessed type void (__thiscall *FlexDlgBtn::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B38BC: using guessed type int (__thiscall *FlexDlgBtn::`vftable'{for `NiNode'})(void *p, char);

//----- (005FECC0) --------------------------------------------------------
TextBtn *__thiscall TextBtn::`vector deleting destructor'(TextBtn *this, unsigned int a2)
{
  TextBtn *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&TextBtn::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&TextBtn::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B3AF4: using guessed type void (__thiscall *TextBtn::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B3B14: using guessed type int (__thiscall *TextBtn::`vftable'{for `NiNode'})(void *p, char);

//----- (005FED00) --------------------------------------------------------
AutoSizingDialogWin *__thiscall AutoSizingDialogWin::`vector deleting destructor'(AutoSizingDialogWin *this, unsigned int a2)
{
  AutoSizingDialogWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&AutoSizingDialogWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&AutoSizingDialogWin::`vftable'{for `IDirectMessenger'};
  PgWin::~PgWin((PgWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B3D4C: using guessed type void (__thiscall *AutoSizingDialogWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B3D6C: using guessed type int (__thiscall *AutoSizingDialogWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005FED40) --------------------------------------------------------
SpeechBubbleDlgWin *__thiscall SpeechBubbleDlgWin::`vector deleting destructor'(SpeechBubbleDlgWin *this, unsigned int a2)
{
  SpeechBubbleDlgWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&SpeechBubbleDlgWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SpeechBubbleDlgWin::`vftable'{for `IDirectMessenger'};
  SpeechBubbleWin::~SpeechBubbleWin((SpeechBubbleWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B3F38: using guessed type void (__thiscall *SpeechBubbleDlgWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B3F54: using guessed type int (__thiscall *SpeechBubbleDlgWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005FED80) --------------------------------------------------------
DlgQuestListWin *__thiscall DlgQuestListWin::`scalar deleting destructor'(DlgQuestListWin *this, unsigned int a2)
{
  DlgQuestListWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&DlgQuestListWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&DlgQuestListWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B4178: using guessed type void (__thiscall *DlgQuestListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B4194: using guessed type int (__thiscall *DlgQuestListWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005FEDC0) --------------------------------------------------------
NpcDialogData *__cdecl NpcDialogDataTable::GetNpcDialogDataByMobIDX(char *pcMobIDX)
{
  char *v1; // ebx@1
  int v2; // eax@3
  unsigned int v3; // edi@4
  unsigned int v4; // esi@6
  NpcDialogData *result; // eax@7

  v1 = pcMobIDX;
  if ( pcMobIDX && *pcMobIDX )
  {
    v2 = *(_DWORD *)(ITableBase<NpcDialogData,NpcDialogDataTable>::ms_pkTable + 56);
    if ( v2 )
      v3 = *(_DWORD *)(v2 + 40);
    else
      v3 = 0;
    v4 = 0;
    if ( v3 )
    {
      do
      {
        result = (NpcDialogData *)CDataReader::GetRecord(
                                    (CDataReader *)(ITableBase<NpcDialogData,NpcDialogDataTable>::ms_pkTable + 4),
                                    v4);
        if ( result )
        {
          if ( !strcmp(result->MobIDX, v1) )
            return result;
          v1 = pcMobIDX;
        }
        ++v4;
      }
      while ( v4 < v3 );
    }
    result = 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C17C: using guessed type int ITableBase<NpcDialogData,NpcDialogDataTable>::ms_pkTable;

//----- (005FEE50) --------------------------------------------------------
char *__cdecl NpcDialogDataTable::GetFaceCutFileNameByMobID(int MobID)
{
  int v1; // esi@1
  int v2; // ecx@3
  int v3; // eax@4
  char *result; // eax@5
  char *v5; // eax@6
  NpcDialogData *v6; // eax@7

  v1 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 16))(
                          ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                          MobID)
    && (unsigned __int16)MobID <= *(_WORD *)(v1 + 200)
    && (v2 = *(_DWORD *)(v1 + 196), *(_DWORD *)(v2 + 4 * (unsigned __int16)MobID))
    && (v3 = *(_DWORD *)(v2 + 4 * (unsigned __int16)MobID)) != 0
    && (v5 = (char *)(v3 + 2)) != 0
    && (v6 = NpcDialogDataTable::GetNpcDialogDataByMobIDX(v5)) != 0 )
  {
    result = v6->FaceCutFile;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;

//----- (005FEEB0) --------------------------------------------------------
void __thiscall NiTList<AutoSizingDialogWin::VirtualRect *>::~NiTList<AutoSizingDialogWin::VirtualRect *>(NiTList<AutoSizingDialogWin::VirtualRect *> *this)
{
  NiTList<AutoSizingDialogWin::VirtualRect *> *v1; // edi@1
  NiTListItem<AutoSizingDialogWin::VirtualRect *> *v2; // esi@1
  NiTListItem<AutoSizingDialogWin::VirtualRect *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>Vtbl *)&NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem(
      (NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *> *)v1,
      v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>Vtbl *)&NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::`vftable';
}
// 9B43B8: using guessed type int (__thiscall *NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::`vftable')(void *p, char);
// 9B43C8: using guessed type int (__thiscall *NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::`vftable')(void *p, char);

//----- (005FEF30) --------------------------------------------------------
NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *> *__thiscall NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::`scalar deleting destructor'(NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *> *this, unsigned int a2)
{
  NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *> *v2; // edi@1
  NiTListItem<AutoSizingDialogWin::VirtualRect *> *v3; // esi@1
  NiTListItem<AutoSizingDialogWin::VirtualRect *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>Vtbl *)&NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem(
      (NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *> *)v2,
      v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>Vtbl *)&NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B43B8: using guessed type int (__thiscall *NiTListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::`vftable')(void *p, char);
// 9B43C8: using guessed type int (__thiscall *NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::`vftable')(void *p, char);

//----- (005FEFC0) --------------------------------------------------------
NpcDialogWin *__thiscall NpcDialogWin::`vector deleting destructor'(NpcDialogWin *this, unsigned int a2)
{
  NpcDialogWin *v2; // esi@1
  PgWinSpr *v3; // edi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&NpcDialogWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&NpcDialogWin::`vftable'{for `IDirectMessenger'};
  v3 = this->m_spFaceCut.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B43DC: using guessed type void (__thiscall *NpcDialogWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B43FC: using guessed type int (__thiscall *NpcDialogWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005FF060) --------------------------------------------------------
void __thiscall std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::_Splice_same(std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *this, std::_List_const_iterator<std::_List_val<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > > _Where, std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *_Right, std::_List_const_iterator<std::_List_val<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > > _First, std::_List_const_iterator<std::_List_val<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > > _Last, unsigned int _Count)
{
  unsigned int v6; // edx@2
  std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *v7; // ecx@5

  if ( this != _Right )
  {
    v6 = this->_Mysize;
    if ( 89478484 - v6 < _Count )
      std::_Xlength_error("list<T> too long");
    this->_Mysize = _Count + v6;
    _Right->_Mysize -= _Count;
  }
  _First._Ptr->_Prev->_Next = _Last._Ptr;
  _Last._Ptr->_Prev->_Next = _Where._Ptr;
  _Where._Ptr->_Prev->_Next = _First._Ptr;
  v7 = _Where._Ptr->_Prev;
  _Where._Ptr->_Prev = _Last._Ptr->_Prev;
  _Last._Ptr->_Prev = _First._Ptr->_Prev;
  _First._Ptr->_Prev = v7;
}

//----- (005FF0E0) --------------------------------------------------------
void __thiscall std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>(std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *this)
{
  std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *v1; // esi@1
  std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *v2; // eax@1
  std::exception pExceptionObject; // [sp+4h] [bp-10h]@3
  char *_What; // [sp+10h] [bp-4h]@3

  v1 = this;
  this->_Mysize = 0;
  v2 = (std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *)operator new(0x38u);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->_Myhead = v2;
  v2->_Next = v2;
  v1->_Myhead->_Prev = v1->_Myhead;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (005FF140) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall ScriptBtn::GetText(ScriptBtn *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result)
{
  result->_Myres = 15;
  result->_Mysize = 0;
  result->_Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(result, &this->m_kText, 0, 0xFFFFFFFF);
  return result;
}

//----- (005FF170) --------------------------------------------------------
void __thiscall DlgQuestListWin::QuestNameList::QuestNameList(DlgQuestListWin::QuestNameList *this, DlgQuestListWin::QuestNameList *__that)
{
  DlgQuestListWin::QuestNameList *v2; // esi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // ecx@1

  v2 = this;
  v3 = &this->m_Title;
  v2->m_QuestID = __that->m_QuestID;
  v3->_Myres = 15;
  v3->_Mysize = 0;
  v3->_Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(v3, &__that->m_Title, 0, 0xFFFFFFFF);
  v2->m_Data = __that->m_Data;
  v2->m_Level = __that->m_Level;
  v2->m_Status = __that->m_Status;
  v2->m_Type = __that->m_Type;
  v2->m_StartItem = __that->m_StartItem;
  v2->m_StartQuest = __that->m_StartQuest;
  v2->m_Repeatable = __that->m_Repeatable;
}

//----- (005FF1E0) --------------------------------------------------------
void __thiscall std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::clear(std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *this)
{
  std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *v1; // edi@1
  std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *v2; // esi@1
  std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *v3; // ebx@2

  v1 = this;
  v2 = this->_Myhead->_Next;
  this->_Myhead->_Next = this->_Myhead;
  this->_Myhead->_Prev = this->_Myhead;
  this->_Mysize = 0;
  if ( v2 != this->_Myhead )
  {
    do
    {
      v3 = v2->_Next;
      if ( v2->_Myval.m_Title._Myres >= 0x10 )
        operator delete(v2->_Myval.m_Title._Bx._Ptr);
      v2->_Myval.m_Title._Myres = 15;
      v2->_Myval.m_Title._Mysize = 0;
      v2->_Myval.m_Title._Bx._Buf[0] = 0;
      operator delete(v2);
      v2 = v3;
    }
    while ( v3 != v1->_Myhead );
  }
}

//----- (005FF240) --------------------------------------------------------
std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *__stdcall std::_List_val<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::_Buynode(std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *_Next, std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *_Prev, DlgQuestListWin::QuestNameList *_Val)
{
  void *v4; // esi@1
  std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *v5; // eax@2
  int v7; // [sp+0h] [bp-30h]@1
  std::exception pExceptionObject; // [sp+10h] [bp-20h]@5
  void *p; // [sp+1Ch] [bp-14h]@1
  int *v10; // [sp+20h] [bp-10h]@1
  int v11; // [sp+2Ch] [bp-4h]@2

  v10 = &v7;
  v4 = operator new(0x38u);
  p = v4;
  if ( !v4 )
  {
    _Next = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Next);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v5 = _Next;
  *((_DWORD *)v4 + 1) = _Prev;
  v11 = 0;
  *(_DWORD *)v4 = v5;
  _Next = (std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *)((char *)v4 + 8);
  _Prev = (std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *)((char *)v4 + 8);
  LOBYTE(v11) = 1;
  if ( v4 != (void *)-8 )
    DlgQuestListWin::QuestNameList::QuestNameList((DlgQuestListWin::QuestNameList *)((char *)v4 + 8), _Val);
  return (std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *)v4;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (005FF300) --------------------------------------------------------
void __thiscall std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::~list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>(std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *this)
{
  std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *v1; // esi@1

  v1 = this;
  std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::clear(this);
  operator delete(v1->_Myhead);
}

//----- (005FF320) --------------------------------------------------------
void __thiscall std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::merge<bool (__cdecl *)(DlgQuestListWin::QuestNameList const &,DlgQuestListWin::QuestNameList const &)>(std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *this, std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *_Right, bool (__cdecl *_Pred)(DlgQuestListWin::QuestNameList *, DlgQuestListWin::QuestNameList *))
{
  std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *v3; // edx@1
  std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *v4; // eax@2
  std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *v5; // esi@2
  std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *v6; // edi@2
  std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *v7; // ebx@2
  std::_List_const_iterator<std::_List_val<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > > v8; // edi@5
  std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *v9; // [sp+0h] [bp-Ch]@2
  std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *v10; // [sp+4h] [bp-8h]@1
  std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *v11; // [sp+8h] [bp-4h]@2

  v3 = _Right;
  v10 = this;
  if ( _Right != this )
  {
    v4 = _Right->_Myhead;
    v5 = _Right->_Myhead->_Next;
    v6 = this->_Myhead;
    v7 = this->_Myhead->_Next;
    v9 = this->_Myhead;
    v11 = _Right->_Myhead;
    if ( v7 == this->_Myhead )
    {
LABEL_9:
      if ( v5 != v4 )
        std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::_Splice_same(
          this,
          (std::_List_const_iterator<std::_List_val<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > >)v6,
          v3,
          (std::_List_const_iterator<std::_List_val<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > >)v5,
          (std::_List_const_iterator<std::_List_val<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > >)v4,
          v3->_Mysize);
    }
    else
    {
      while ( v5 != v4 )
      {
        if ( _Pred(&v5->_Myval, &v7->_Myval) )
        {
          v8._Ptr = v5->_Next;
          std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::_Splice_same(
            v10,
            (std::_List_const_iterator<std::_List_val<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > >)v7,
            _Right,
            (std::_List_const_iterator<std::_List_val<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > >)v5,
            (std::_List_const_iterator<std::_List_val<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > >)v5->_Next,
            1u);
          v5 = v8._Ptr;
          v6 = v9;
        }
        else
        {
          v7 = v7->_Next;
        }
        v4 = v11;
        if ( v7 == v6 )
        {
          v3 = _Right;
          this = v10;
          goto LABEL_9;
        }
      }
    }
  }
}

//----- (005FF3A0) --------------------------------------------------------
void __thiscall std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::sort<bool (__cdecl *)(DlgQuestListWin::QuestNameList const &,DlgQuestListWin::QuestNameList const &)>(std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *this, bool (__cdecl *_Pred)(DlgQuestListWin::QuestNameList *, DlgQuestListWin::QuestNameList *))
{
  std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *v2; // edi@1
  bool v3; // cf@1
  unsigned int v4; // ebx@2
  std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *v5; // eax@2
  std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *v6; // eax@4
  std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *v7; // ecx@4
  std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *v8; // edx@4
  std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *v9; // esi@7
  unsigned int v10; // edi@7
  std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *v11; // esi@8
  std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *v12; // eax@11
  unsigned int v13; // edx@11
  unsigned int v14; // eax@11
  std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *v15; // eax@15
  std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *v16; // ecx@16
  unsigned int v17; // ecx@16
  std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *v18; // esi@21
  std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *v19; // eax@23
  std::exception pExceptionObject; // [sp+10h] [bp-16Ch]@29
  char *_What; // [sp+1Ch] [bp-160h]@29
  bool (__cdecl *v22)(DlgQuestListWin::QuestNameList *, DlgQuestListWin::QuestNameList *); // [sp+20h] [bp-15Ch]@1
  std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *v23; // [sp+24h] [bp-158h]@1
  std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > _Templist; // [sp+28h] [bp-154h]@2
  std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > _Binlist[26]; // [sp+34h] [bp-148h]@3
  int v26; // [sp+178h] [bp-4h]@3

  v2 = this;
  v3 = this->_Mysize < 2;
  v23 = this;
  v22 = _Pred;
  if ( !v3 )
  {
    v4 = 0;
    _Templist._Mysize = 0;
    v5 = (std::_List_nod<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> >::_Node *)operator new(0x38u);
    if ( !v5 )
    {
      _What = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&_What);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
    v5->_Next = v5;
    _Templist._Myhead = v5;
    v5->_Prev = v5;
    v26 = 0;
    `eh vector constructor iterator'(
      _Binlist,
      0xCu,
      26,
      (void (__thiscall *)(void *))std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>,
      (void (__thiscall *)(void *))std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::~list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>);
    LOBYTE(v26) = 1;
    if ( v2->_Mysize )
    {
      do
      {
        v6 = v2->_Myhead->_Next->_Next;
        v7 = v2->_Myhead->_Next;
        v8 = _Templist._Myhead->_Next;
        if ( &_Templist != v2 )
        {
          if ( 89478484 - _Templist._Mysize < 1 )
            std::_Xlength_error("list<T> too long");
          ++_Templist._Mysize;
          --v2->_Mysize;
        }
        v7->_Prev->_Next = v6;
        v6->_Prev->_Next = v8;
        v8->_Prev->_Next = v7;
        v9 = v8->_Prev;
        v8->_Prev = v6->_Prev;
        v10 = 0;
        v6->_Prev = v7->_Prev;
        v7->_Prev = v9;
        if ( !v4 )
          goto LABEL_33;
        v11 = _Binlist;
        do
        {
          if ( !v11->_Mysize )
            break;
          std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::merge<bool (__cdecl *)(DlgQuestListWin::QuestNameList const &,DlgQuestListWin::QuestNameList const &)>(
            v11,
            &_Templist,
            v22);
          if ( v11 != &_Templist )
          {
            v12 = v11->_Myhead;
            v13 = _Templist._Mysize;
            v11->_Myhead = _Templist._Myhead;
            _Templist._Myhead = v12;
            v14 = v11->_Mysize;
            v11->_Mysize = v13;
            _Templist._Mysize = v14;
          }
          ++v10;
          ++v11;
        }
        while ( v10 < v4 );
        if ( v10 == 25 )
        {
          std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::merge<bool (__cdecl *)(DlgQuestListWin::QuestNameList const &,DlgQuestListWin::QuestNameList const &)>(
            &_Binlist[24],
            &_Templist,
            v22);
        }
        else
        {
LABEL_33:
          v15 = &_Binlist[v10];
          if ( v15 != &_Templist )
          {
            v16 = v15->_Myhead;
            v15->_Myhead = _Templist._Myhead;
            _Templist._Myhead = v16;
            v17 = v15->_Mysize;
            v15->_Mysize = _Templist._Mysize;
            _Templist._Mysize = v17;
          }
          if ( v10 == v4 )
            ++v4;
        }
        v2 = v23;
      }
      while ( v23->_Mysize );
    }
    if ( v4 > 1 )
    {
      v18 = &_Binlist[1];
      v23 = (std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *)(v4 - 1);
      do
      {
        std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::merge<bool (__cdecl *)(DlgQuestListWin::QuestNameList const &,DlgQuestListWin::QuestNameList const &)>(
          v18,
          v18 - 1,
          v22);
        ++v18;
        v23 = (std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > *)((char *)v23 - 1);
      }
      while ( v23 );
    }
    v19 = &_Templist + v4;
    if ( v2 != v19 )
    {
      if ( v19->_Mysize )
        std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::_Splice_same(
          v2,
          (std::_List_const_iterator<std::_List_val<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > >)v2->_Myhead->_Next,
          v19,
          (std::_List_const_iterator<std::_List_val<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > >)v19->_Myhead->_Next,
          (std::_List_const_iterator<std::_List_val<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList> > >)v19->_Myhead,
          v19->_Mysize);
    }
    LOBYTE(v26) = 0;
    `eh vector destructor iterator'(
      _Binlist,
      0xCu,
      26,
      (void (__thiscall *)(void *))std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::~list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>);
    std::list<DlgQuestListWin::QuestNameList,std::allocator<DlgQuestListWin::QuestNameList>>::clear(&_Templist);
    operator delete(_Templist._Myhead);
  }
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (005FF650) --------------------------------------------------------
void __thiscall NpcQuestWin::NpcQuestWin(NpcQuestWin *this)
{
  NpcQuestWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&NpcQuestWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&NpcQuestWin::`vftable'{for `IDirectMessenger'};
}
// 9B4710: using guessed type void (__thiscall *NpcQuestWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B472C: using guessed type int (__thiscall *NpcQuestWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005FF670) --------------------------------------------------------
void __thiscall NpcQuestWin::~NpcQuestWin(NpcQuestWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&NpcQuestWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&NpcQuestWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9B4710: using guessed type void (__thiscall *NpcQuestWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B472C: using guessed type int (__thiscall *NpcQuestWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005FF6B0) --------------------------------------------------------
void __thiscall NpcQuestWin::OnCmdClose(NpcQuestWin *this)
{
  PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
}

//----- (005FF6C0) --------------------------------------------------------
void NpcQuestWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "NpcQuestWin");
}

//----- (005FF6F0) --------------------------------------------------------
void __thiscall NpcQuestWin::OnCommand(NpcQuestWin *this, unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@3

  switch ( wParam )
  {
    case 2u:
      PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
      break;
    case 3u:
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v3 )
        GameFrameWork::OpenPlayGuideSearchList(v3, "NpcQuestWin");
      break;
    default:
      return;
  }
}

//----- (005FF750) --------------------------------------------------------
char __thiscall NpcQuestWin::Create(NpcQuestWin *this, NiSourceTexture *pkTexture, PgFrameWork *pkFrameWork)
{
  NpcQuestWin *v3; // esi@1
  NiTexturePalette *v4; // edi@1
  const char *v5; // eax@3
  NiSourceTexture *v6; // edi@4
  PgSprData *v7; // eax@4
  NiNode *v8; // esi@5
  PgFont *v10; // ST40_4@10
  unsigned int v11; // ST3C_4@10
  unsigned int v12; // eax@10
  PgWinText *v13; // ebx@10
  NiUnsharedGeometryGroup *v14; // eax@10
  PgSprData *v15; // ebx@10
  PgSprData *v16; // eax@10
  PgSprData *v17; // eax@10
  PgSprData *v18; // eax@10
  PgSprData *v19; // eax@10
  PgSprData *v20; // ebx@10
  PgSprData *v21; // ebx@10
  PgSprData *v22; // edi@10
  PgWinBut *v23; // edi@10
  PgFont *v24; // ST40_4@10
  unsigned int v25; // ST3C_4@10
  unsigned int v26; // eax@10
  PgWinText *v27; // edi@10
  NiRefObjectVtbl *v28; // ebx@10
  NiUnsharedGeometryGroup *v29; // eax@10
  NiSourceTexture *v30; // edi@10
  PgSprData *v31; // edi@11
  NiNode *v32; // esi@12
  int uiLeft; // [sp+34h] [bp-18h]@4
  int uiTop; // [sp+38h] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+3Ch] [bp-10h]@1
  int v36; // [sp+48h] [bp-4h]@1
  NiSourceTexture *pkTexturea; // [sp+54h] [bp+8h]@10

  v3 = this;
  spNode.m_pObject = 0;
  v4 = pTexturePalette;
  v36 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "NpcQuestWin.nif");
  PgUtil::LoadNodeNifFile(v5, &spNode, v4);
  if ( !spNode.m_pObject )
    return 0;
  v6 = pkTexture;
  v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, pkTexture);
  if ( !PgWinFrame::Create((PgWinFrame *)&v3->vfptr, 0, 0, v7, 0, pkFrameWork, "NpcQuestWin", 0) )
  {
    v8 = spNode.m_pObject;
    v36 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v8 )
        v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    }
    return 0;
  }
  v10 = Font::Get(0);
  v11 = ((int (__thiscall *)(NpcQuestWin *))v3->vfptr[37].__vecDelDtor)(v3);
  v12 = ((int (__thiscall *)(NpcQuestWin *))v3->vfptr[36].__vecDelDtor)(v3);
  v13 = PgWinText::CreateWin(0, 0, v12, v11, v10, (PgWin *)&v3->vfptr, 0, 0);
  v13->vfptr[122].__vecDelDtor((NiRefObject *)v13, 5u);
  pkTexturea = (NiSourceTexture *)v13->vfptr;
  v14 = TextData::Get(0xA304FBEA);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))&pkTexturea[6].m_bStatic)(v13, v14);
  v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CloseButton", &uiLeft, &uiTop, v6);
  PgSprData::Add(v15, (NiAVObject *)&spNode.m_pObject->vfptr, "CloseButtonClick");
  PgWinCloseBut::CreateWin(uiLeft, uiTop, v15, (PgWin *)&v3->vfptr);
  v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "panel", &uiLeft, &uiTop, v6);
  PgWinSpr::CreateWin(uiLeft, uiTop, v16, (PgWin *)&v3->vfptr, 0, 0);
  v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "line", &uiLeft, &uiTop, v6);
  PgWinSpr::CreateWin(uiLeft, uiTop, v17, (PgWin *)&v3->vfptr, 0, 0);
  v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "title1", &uiLeft, &uiTop, v6);
  PgWinSpr::CreateWin(uiLeft, uiTop, v18, (PgWin *)&v3->vfptr, 0, 0);
  v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "title2", &uiLeft, &uiTop, v6);
  PgWinSpr::CreateWin(uiLeft, uiTop, v19, (PgWin *)&v3->vfptr, 0, 0);
  v20 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "tab1", &uiLeft, &uiTop, v6);
  PgSprData::Add(v20, (NiAVObject *)&spNode.m_pObject->vfptr, "tab1On");
  PgWinBut::CreateWin(uiLeft, uiTop, v20, (PgWin *)&v3->vfptr, 0, 0, 0);
  v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "tab2", &uiLeft, &uiTop, v6);
  PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "tab2On");
  PgWinBut::CreateWin(uiLeft, uiTop, v21, (PgWin *)&v3->vfptr, 1u, 0, 0);
  v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "button1", &uiLeft, &uiTop, v6);
  PgSprData::Add(v22, (NiAVObject *)&spNode.m_pObject->vfptr, "button1Click");
  v23 = PgWinBut::CreateWin(uiLeft, uiTop, v22, (PgWin *)&v3->vfptr, 2u, 0, 0);
  v24 = Font::Get(0);
  v25 = ((int (__thiscall *)(PgWinBut *))v23->vfptr[37].__vecDelDtor)(v23);
  v26 = ((int (__thiscall *)(PgWinBut *))v23->vfptr[36].__vecDelDtor)(v23);
  v27 = PgWinText::CreateWin(0, 1, v26, v25, v24, (PgWin *)&v23->vfptr, 0, 0);
  v27->vfptr[122].__vecDelDtor((NiRefObject *)v27, 5u);
  v28 = v27->vfptr;
  v29 = TextData::Get(0x9AE7FBF4);
  v28[118].__vecDelDtor((NiRefObject *)v27, (unsigned int)v29);
  v27->vfptr[60].__vecDelDtor((NiRefObject *)v27, 0);
  v30 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    v31 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, v30);
    PgSprData::Add(v31, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(v31, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft, uiTop, v31, (PgWin *)&v3->vfptr, 3u, 0, 0);
  }
  ((void (__thiscall *)(NpcQuestWin *, unsigned int, unsigned int, _DWORD, _DWORD))v3->vfptr[59].__vecDelDtor)(
    v3,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.0,
    0.5);
  v32 = spNode.m_pObject;
  v36 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v32 )
    v32->vfptr->__vecDelDtor((NiRefObject *)v32, 1u);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (005FFBA0) --------------------------------------------------------
NpcQuestWin *__cdecl NpcQuestWin::CreateWin(NiSourceTexture *pkTexture, PgFrameWork *pkFrameWork)
{
  PgWin *v2; // eax@1
  PgWin *v3; // esi@1
  PgWin *v4; // edi@8
  NpcQuestWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v2 = (PgWin *)operator new(0x158u);
  v3 = v2;
  result.m_pObject = v2;
  v7 = 0;
  if ( v2 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v2);
    v3->vfptr = (NiRefObjectVtbl *)&NpcQuestWin::`vftable'{for `NiNode'};
    v3->vfptr = (IDirectMessengerVtbl *)&NpcQuestWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, NiSourceTexture *, PgFrameWork *))v3->vfptr[135].__vecDelDtor)(
                          v3,
                          pkTexture,
                          pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (NpcQuestWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}
// 9B4710: using guessed type void (__thiscall *NpcQuestWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B472C: using guessed type int (__thiscall *NpcQuestWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005FFCE0) --------------------------------------------------------
NpcQuestWin *__thiscall NpcQuestWin::`vector deleting destructor'(NpcQuestWin *this, unsigned int a2)
{
  NpcQuestWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&NpcQuestWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&NpcQuestWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B4710: using guessed type void (__thiscall *NpcQuestWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B472C: using guessed type int (__thiscall *NpcQuestWin::`vftable'{for `NiNode'})(void *p, char);

//----- (005FFD40) --------------------------------------------------------
void __thiscall QuestFinishWin::UpdateMeWin(QuestFinishWin *this, float fCurTime)
{
  QuestFinishWin *v2; // esi@1
  SpEffect *v3; // ecx@1
  int v4; // edx@3
  int v5; // edi@6
  int v6; // esi@7

  v2 = this;
  v3 = this->m_apkEffect;
  if ( v3 )
    SpEffect::Update(v3, fCurTime);
  v4 = v2->m_kmapQuestID._Mylast - v2->m_kmapQuestID._Myfirst;
  if ( v4 <= 0 )
    v2->m_uFlags |= 1u;
  else
    v2->m_uFlags &= 0xFFFEu;
  v2->m_pkBut[0]->m_uFlags |= 1u;
  v2->m_pkBut[1]->m_uFlags |= 1u;
  v2->m_pkBut[2]->m_uFlags |= 1u;
  v2->m_pkBut[3]->m_uFlags |= 1u;
  v2->m_pkBut[4]->m_uFlags |= 1u;
  v2->m_pkBut[5]->m_uFlags |= 1u;
  v2->m_pkBut[6]->m_uFlags |= 1u;
  v2->m_pkBut[7]->m_uFlags |= 1u;
  v2->m_pkBut[8]->m_uFlags |= 1u;
  v5 = (int)v2->m_pkBut;
  v2->m_pkBut[9]->m_uFlags |= 1u;
  if ( v4 > 0 )
  {
    v6 = v4;
    do
    {
      if ( v4 <= 10 )
        *(_WORD *)(*(_DWORD *)v5 + 28) &= 0xFFFEu;
      v5 += 4;
      --v6;
    }
    while ( v6 );
  }
}

//----- (005FFE20) --------------------------------------------------------
char __thiscall QuestFinishWin::Create(QuestFinishWin *this, PgFrameWork *pkFrameWork)
{
  QuestFinishWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  char result; // al@6
  const char *v6; // eax@9
  PgSprData *v7; // eax@10
  int v8; // edi@11
  int v9; // ebx@11
  PgSprData *v10; // eax@12
  NiRefObjectVtbl *v11; // eax@12
  NiTriShape *v12; // ecx@12
  PgSprData *v13; // eax@13
  PgWinSpr *v14; // eax@13
  NiTriShape *v15; // eax@13
  NiRTTI *v16; // eax@15
  char v17; // al@18
  MaskedWin *v18; // eax@20
  PgWinBut *v19; // eax@20
  PgWinBut *v20; // eax@20
  PgSprData *v21; // eax@20
  PgWinSpr *v22; // eax@20
  NiTexturePalette *v23; // edi@20
  const char *v24; // eax@22
  NiNode *v25; // esi@23
  NiTriShape *v26; // edi@29
  NiNode *v27; // eax@30
  SpEffect *v28; // eax@30
  void *(__thiscall *v29)(NiRefObject *, unsigned int); // eax@32
  NiNode *v30; // esi@33
  NiNode *v31; // esi@36
  NiPointer<NiNode> pkNiNodePtr; // [sp+30h] [bp-12Ch]@20
  NiSourceTexture *pkTexture; // [sp+34h] [bp-128h]@1
  NiTriShape *pkTriShape; // [sp+38h] [bp-124h]@7
  int i; // [sp+3Ch] [bp-120h]@11
  int uiTop; // [sp+40h] [bp-11Ch]@10
  int uiLeft; // [sp+44h] [bp-118h]@10
  NiPointer<NiNode> spNode; // [sp+48h] [bp-114h]@1
  char acShapeName[256]; // [sp+4Ch] [bp-110h]@12
  int v40; // [sp+158h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v40 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  pkTexture = v3;
  if ( !v3 )
    goto LABEL_43;
  pkTriShape = (NiTriShape *)pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = Folder::Merge(&Folder::m_acMenu, "Game\\QuestFinishWin.nif");
  PgUtil::LoadNodeNifFile(v6, &spNode, (NiTexturePalette *)pkTriShape);
  if ( !spNode.m_pObject )
    return 0;
  v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane01", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v7, 0, pkFrameWork, "QuestFinishWin", 0) )
  {
LABEL_43:
    v4 = spNode.m_pObject;
    v40 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
    return 0;
  }
  v8 = uiLeft;
  v9 = uiTop;
  i = 0;
  pkTriShape = (NiTriShape *)v2->m_pkBut;
  do
  {
    acShapeName[0] = 0;
    memset(&acShapeName[1], 0, 0xFFu);
    sprintf(acShapeName, "Quest%02d", ++i);
    v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, pkTexture);
    v11 = (NiRefObjectVtbl *)PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, v10, (PgWin *)&v2->vfptr, 0, 0, 0);
    v12 = pkTriShape;
    pkTriShape->vfptr = v11;
    pkTriShape = (NiTriShape *)((char *)v12 + 4);
  }
  while ( i < 10 );
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NPCFaceBack", &uiLeft, &uiTop, pkTexture);
  v14 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v13, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkFaceBackSpr = v14;
  v14->vfptr[64].__vecDelDtor((NiRefObject *)v14, 0);
  v15 = (NiTriShape *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Face_Mask");
  pkTriShape = v15;
  if ( v15 )
  {
    v16 = (NiRTTI *)((int (__thiscall *)(NiTriShape *))v15->vfptr[1].__vecDelDtor)(v15);
    if ( v16 )
    {
      while ( v16 != &NiTriShape::m_RTTI )
      {
        v16 = v16->m_pkBaseRTTI;
        if ( !v16 )
          goto LABEL_18;
      }
      v17 = 1;
    }
    else
    {
LABEL_18:
      v17 = 0;
    }
    pkTriShape = (NiTriShape *)(v17 != 0 ? (unsigned int)pkTriShape : 0);
  }
  else
  {
    pkTriShape = 0;
  }
  PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Face_Mask", &uiLeft, &uiTop, pkTexture);
  v18 = MaskedWin::CreateWin(uiLeft - v8, uiTop - v9, pkTriShape, (PgWin *)&v2->vfptr);
  v2->m_pkFacePortrait = v18;
  v18->vfptr[64].__vecDelDtor((NiRefObject *)v18, 0);
  i = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Face_Panel_Nor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "Face_Panel_Click");
  PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "Face_Panel_Over");
  v19 = PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)i, (PgWin *)&v2->vfptr, 0xAu, 0, 0);
  v2->m_pkQuestCheckPortraitBut = v19;
  v19->vfptr[64].__vecDelDtor((NiRefObject *)v19, 0);
  i = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NPCFaceNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "NPCFaceClick");
  PgSprData::Add((PgSprData *)i, (NiAVObject *)&spNode.m_pObject->vfptr, "NPCFaceOver");
  v20 = PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)i, (PgWin *)&v2->vfptr, 0xAu, 0, 0);
  v2->m_pkQuestCheckBut = v20;
  v20->vfptr[64].__vecDelDtor((NiRefObject *)v20, 0);
  v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane01", &uiLeft, &uiTop, 0);
  v22 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v21, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkSprTopWin = v22;
  v22->vfptr[60].__vecDelDtor((NiRefObject *)v22, 0);
  pkNiNodePtr.m_pObject = 0;
  v23 = pTexturePalette;
  LOBYTE(v40) = 1;
  if ( !Folder::m_bInit )
    Folder::Init();
  v24 = Folder::Merge(&Folder::m_acMenu, "Game\\QuestFinishEffect.nif");
  PgUtil::LoadNodeNifFile(v24, &pkNiNodePtr, v23);
  if ( pkNiNodePtr.m_pObject )
  {
    v26 = (NiTriShape *)operator new(0x44u);
    pkTriShape = v26;
    LOBYTE(v40) = 2;
    if ( v26 )
    {
      v27 = (NiNode *)NiObject::Clone((NiObject *)&pkNiNodePtr.m_pObject->vfptr);
      SpEffect::SpEffect((SpEffect *)v26, v27);
    }
    else
    {
      v28 = 0;
    }
    v2->m_apkEffect = v28;
    v29 = v2->vfptr[59].__vecDelDtor;
    LOBYTE(v40) = 1;
    ((void (__thiscall *)(QuestFinishWin *, unsigned int, unsigned int, _DWORD, _DWORD))v29)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      1.0,
      0.60000002);
    LOBYTE(v40) = 0;
    if ( pkNiNodePtr.m_pObject )
    {
      v30 = pkNiNodePtr.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&pkNiNodePtr.m_pObject->m_uiRefCount) )
      {
        if ( v30 )
          v30->vfptr->__vecDelDtor((NiRefObject *)v30, 1u);
      }
    }
    v31 = spNode.m_pObject;
    v40 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v31 )
      v31->vfptr->__vecDelDtor((NiRefObject *)v31, 1u);
    result = 1;
  }
  else
  {
    v25 = spNode.m_pObject;
    v40 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v25 )
      v25->vfptr->__vecDelDtor((NiRefObject *)v25, 1u);
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00600400) --------------------------------------------------------
void __thiscall QuestFinishWin::ApplyTexture2Portrait(QuestFinishWin *this, NiTexture *pkTex, bool bUserCharFace)
{
  QuestFinishWin *v3; // esi@1

  v3 = this;
  if ( bUserCharFace == 1 )
  {
    ((void (__stdcall *)(_DWORD))this->m_pkFaceBackSpr->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v3->m_pkQuestCheckBut->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v3->m_pkFacePortrait->vfptr[64].__vecDelDtor)(1);
    MaskedWin::SetBaseTexture(v3->m_pkFacePortrait, pkTex);
    ((void (__stdcall *)(_DWORD))v3->m_pkQuestCheckPortraitBut->vfptr[64].__vecDelDtor)(1);
    PgSpr::SetTexture(v3->m_pkQuestCheckPortraitBut->m_spSpr.m_pObject, pkTex);
  }
  else
  {
    ((void (__stdcall *)(_DWORD))this->m_pkFacePortrait->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v3->m_pkQuestCheckPortraitBut->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v3->m_pkFaceBackSpr->vfptr[64].__vecDelDtor)(1);
    PgSpr::SetTexture(v3->m_pkFaceBackSpr->m_spSpr.m_pObject, pkTex);
    ((void (__stdcall *)(_DWORD))v3->m_pkQuestCheckBut->vfptr[64].__vecDelDtor)(1);
    PgSpr::SetTexture(v3->m_pkQuestCheckBut->m_spSpr.m_pObject, pkTex);
  }
}

//----- (006004F0) --------------------------------------------------------
void __thiscall QuestFinishWin::ChangeFace(QuestFinishWin *this, unsigned __int16 iEndQuestNpcID)
{
  QuestFinishWin *v2; // esi@1
  MobViewInfo *v3; // eax@3
  unsigned int v4; // eax@4
  CharNPC_ViewInfo *v5; // eax@5
  char v6; // cl@6
  unsigned int v7; // edi@11
  unsigned int v8; // ebx@11
  BaseCharClass v9; // edx@12
  NiSourceTexture *v10; // eax@15
  NiSourceTexture *v11; // eax@18
  NiSourceTexture *v12; // edi@19
  unsigned int uiHairColor; // [sp+8h] [bp-4h]@11
  char iEndQuestNpcID_3; // [sp+17h] [bp+Bh]@11

  v2 = this;
  SpEffect::Start(this->m_apkEffect, (NiNode *)&this->m_pkSprTopWin->vfptr);
  if ( v2->m_pkSprTopWin )
    SpEffect::Start(v2->m_apkEffect, (NiNode *)&v2->m_pkSprTopWin->vfptr);
  v3 = MobViewInfoTab::GetByID(iEndQuestNpcID);
  if ( v3 && (v4 = v3->NpcViewIndex, (_WORD)v4) )
  {
    v5 = NPCViewInfoTab::GetByID(v4);
    if ( v5 )
    {
      v6 = 64;
      switch ( v5->Class )
      {
        case 0:
          v6 = 1;
          break;
        case 1:
          v6 = 6;
          break;
        case 2:
          v6 = 11;
          break;
        case 3:
          v6 = 16;
          break;
        default:
          break;
      }
      v7 = v5->FaceShape;
      uiHairColor = v5->HairColor;
      v8 = v5->HairType;
      iEndQuestNpcID_3 = v5->Gender;
      if ( v6 == 64 )
      {
        v9 = v5->Class;
        if ( v9 == 4 )
        {
          v6 = Char::GetClass(g_pkMainChar);
          if ( g_pkMainChar != (Char *)-780 )
          {
            v7 = g_pkMainChar->m_kCharShape.m_byFace;
            v8 = g_pkMainChar->m_kCharShape.m_byHairType;
            uiHairColor = g_pkMainChar->m_kCharShape.m_byHairColor;
            iEndQuestNpcID_3 = g_pkMainChar->m_kCharShape.m_byGender;
          }
        }
        else if ( v9 == 5 )
        {
          v11 = PortraitTextureBuffer::GetMobPortrait(v5->Gender);
          QuestFinishWin::ApplyTexture2Portrait(v2, (NiTexture *)&v11->vfptr, 0);
          return;
        }
      }
      v10 = PortraitTextureBuffer::GetOtherCharPortrait(
              v8,
              (unsigned __int8)v6,
              (unsigned __int8)iEndQuestNpcID_3,
              v7,
              v8,
              uiHairColor,
              0xFFFFu,
              5u,
              0);
      QuestFinishWin::ApplyTexture2Portrait(v2, (NiTexture *)&v10->vfptr, 1);
    }
  }
  else
  {
    v12 = PortraitTextureBuffer::GetMobPortrait(iEndQuestNpcID);
    ((void (__stdcall *)(_DWORD))v2->m_pkFacePortrait->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkQuestCheckPortraitBut->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkFaceBackSpr->vfptr[64].__vecDelDtor)(1);
    PgSpr::SetTexture(v2->m_pkFaceBackSpr->m_spSpr.m_pObject, (NiTexture *)&v12->vfptr);
    ((void (__stdcall *)(_DWORD))v2->m_pkQuestCheckBut->vfptr[64].__vecDelDtor)(1);
    PgSpr::SetTexture(v2->m_pkQuestCheckBut->m_spSpr.m_pObject, (NiTexture *)&v12->vfptr);
  }
}

//----- (006006C0) --------------------------------------------------------
void __thiscall QuestFinishWin::QuestFinishWin(QuestFinishWin *this)
{
  QuestFinishWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&QuestFinishWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&QuestFinishWin::`vftable'{for `IDirectMessenger'};
  v1->m_kmapQuestID._Myfirst = 0;
  v1->m_kmapQuestID._Mylast = 0;
  v1->m_kmapQuestID._Myend = 0;
  v1->m_kmapQuestIDClicked._Myfirst = 0;
  v1->m_kmapQuestIDClicked._Mylast = 0;
  v1->m_kmapQuestIDClicked._Myend = 0;
  v1->m_pkQuestAutoFinishBut = 0;
  v1->m_pkQuestCheckBut = 0;
  v1->m_pkFaceBackSpr = 0;
  v1->m_pkFacePortrait = 0;
  v1->m_pkQuestCheckPortraitBut = 0;
  v1->m_apkEffect = 0;
  v1->m_pkSprTopWin = 0;
  v1->m_pkBut[0] = 0;
  v1->m_pkBut[1] = 0;
  v1->m_pkBut[2] = 0;
  v1->m_pkBut[3] = 0;
  v1->m_pkBut[4] = 0;
  v1->m_pkBut[5] = 0;
  v1->m_pkBut[6] = 0;
  v1->m_pkBut[7] = 0;
  v1->m_pkBut[8] = 0;
  v1->m_pkBut[9] = 0;
}
// 9B4A30: using guessed type void (__thiscall *QuestFinishWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B4A4C: using guessed type int (__thiscall *QuestFinishWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00600770) --------------------------------------------------------
void __thiscall QuestFinishWin::~QuestFinishWin(QuestFinishWin *this)
{
  QuestFinishWin *v1; // esi@1
  SpEffect *v2; // edi@1
  NiNode *v3; // ebx@2

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&QuestFinishWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&QuestFinishWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_apkEffect;
  if ( v2 )
  {
    NsEffect::~NsEffect(&v2->m_kEffect);
    ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v2->m_kMarkCheck);
    v3 = v2->m_spEffect.m_pObject;
    if ( v2->m_spEffect.m_pObject && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    operator delete(v2);
  }
  if ( v1->m_kmapQuestIDClicked._Myfirst )
    operator delete(v1->m_kmapQuestIDClicked._Myfirst);
  v1->m_kmapQuestIDClicked._Myfirst = 0;
  v1->m_kmapQuestIDClicked._Mylast = 0;
  v1->m_kmapQuestIDClicked._Myend = 0;
  if ( v1->m_kmapQuestID._Myfirst )
    operator delete(v1->m_kmapQuestID._Myfirst);
  v1->m_kmapQuestID._Myfirst = 0;
  v1->m_kmapQuestID._Mylast = 0;
  v1->m_kmapQuestID._Myend = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9B4A30: using guessed type void (__thiscall *QuestFinishWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B4A4C: using guessed type int (__thiscall *QuestFinishWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00600880) --------------------------------------------------------
QuestFinishWin *__cdecl QuestFinishWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  QuestFinishWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1C4u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    QuestFinishWin::QuestFinishWin((QuestFinishWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (QuestFinishWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (006009B0) --------------------------------------------------------
void __thiscall QuestFinishWin::OnQuestCheckClick(QuestFinishWin *this)
{
  QuestFinishWin *v1; // esi@1
  unsigned __int16 *v2; // ecx@2
  unsigned __int16 *v3; // eax@2
  int i; // edi@2
  int v5; // ebx@4
  unsigned __int16 *v6; // ecx@5
  unsigned __int16 *j; // eax@5
  unsigned __int16 v8; // di@7
  CClientQuest *v9; // eax@7
  QUEST_DATA *v10; // eax@7

  v1 = this;
  if ( (signed int)(((char *)this->m_kmapQuestID._Mylast - (char *)this->m_kmapQuestID._Myfirst) & 0xFFFFFFFE) > 0 )
  {
    v2 = this->m_kmapQuestID._Mylast;
    v3 = v1->m_kmapQuestID._Myfirst;
    for ( i = 0; v3 != v2; ++v3 )
      i = (int)v3;
    v5 = *(_WORD *)i;
    memmove((char *)i, (char *)(i + 2), 2 * (((signed int)v2 + -i - 2) >> 1));
    --v1->m_kmapQuestID._Mylast;
    GameFrameWork::OpenQuestWin((GameFrameWork *)v1->m_pkFrameWork, v5, i, v5, 1);
    v1->m_iSelectedID = v5;
    if ( (signed int)(((char *)v1->m_kmapQuestID._Mylast - (char *)v1->m_kmapQuestID._Myfirst) & 0xFFFFFFFE) > 0 )
    {
      v6 = v1->m_kmapQuestID._Mylast;
      for ( j = v1->m_kmapQuestID._Myfirst; j != v6; ++j )
        i = (int)j;
      v8 = *(_WORD *)i;
      v9 = QuestDataMgr::GetQuest();
      v10 = CQuestData::GetQuestData(v9->m_pQuestData, v8);
      QuestFinishWin::ChangeFace(v1, v10->End.NPCMobList[0].NPCMobID);
    }
  }
}

//----- (00600A70) --------------------------------------------------------
void __thiscall QuestFinishWin::OnCommand(QuestFinishWin *this, unsigned int wParam, int lParam)
{
  if ( wParam == 10 )
    QuestFinishWin::OnQuestCheckClick(this);
}

//----- (00600A90) --------------------------------------------------------
void __thiscall QuestFinishWin::UpdateQuest(QuestFinishWin *this)
{
  Tutorial *v1; // eax@1
  signed int v2; // esi@1
  QuestFinishWin *v3; // edi@1
  Tutorial *v4; // eax@2
  CClientQuest *v5; // eax@7
  CQuestData *v6; // ebx@7
  QUEST_DATA *v7; // eax@10
  unsigned __int16 *v8; // ebx@10
  unsigned __int16 *v9; // esi@12
  unsigned __int16 *j; // edi@12
  unsigned __int16 *v11; // eax@17
  unsigned __int16 *v12; // ecx@17
  std::vector<unsigned short,std::allocator<unsigned short> > *v13; // esi@17
  char v14; // dl@17
  unsigned __int16 *v15; // eax@22
  unsigned __int16 *v16; // edx@23
  unsigned __int16 *v17; // ecx@24
  int v18; // edi@24
  unsigned int v19; // eax@25
  unsigned int v20; // eax@26
  unsigned int v21; // ecx@26
  unsigned int v22; // ecx@28
  unsigned __int16 *v23; // eax@33
  unsigned __int16 *v24; // edi@33
  unsigned __int16 *v25; // ecx@35
  unsigned int v26; // eax@36
  unsigned int v27; // eax@37
  unsigned int v28; // ecx@37
  unsigned int v29; // ecx@39
  unsigned __int16 *v30; // eax@44
  unsigned __int16 *v31; // eax@46
  unsigned __int16 *v32; // edx@47
  unsigned __int16 *v33; // ecx@48
  int v34; // ebx@48
  unsigned int v35; // eax@49
  unsigned int v36; // eax@50
  unsigned int v37; // ecx@50
  unsigned int v38; // ecx@52
  unsigned __int16 *v39; // eax@57
  unsigned __int16 *v40; // ecx@59
  unsigned __int16 *v41; // edx@60
  unsigned int v42; // eax@60
  unsigned int v43; // eax@61
  unsigned int v44; // ecx@61
  unsigned int v45; // ecx@63
  unsigned __int16 *v46; // eax@68
  int v47; // [sp+10h] [bp-4Ch]@10
  QUEST_DATA *lpQuest; // [sp+14h] [bp-48h]@10
  unsigned __int16 iEndQuestNpcID; // [sp+18h] [bp-44h]@0
  int i; // [sp+1Ch] [bp-40h]@7
  CQuest *pQuest; // [sp+20h] [bp-3Ch]@7
  CQuestData *pQData; // [sp+24h] [bp-38h]@7
  QuestFinishWin *v53; // [sp+28h] [bp-34h]@1
  bool bFind; // [sp+2Fh] [bp-2Dh]@7

  v1 = Singleton<Tutorial>::m_pInstance;
  v2 = 0;
  v3 = this;
  v53 = this;
  if ( !Singleton<Tutorial>::m_pInstance )
  {
    v4 = (Tutorial *)operator new(0xB4u);
    iEndQuestNpcID = (unsigned __int16)v4;
    if ( v4 )
      Tutorial::Tutorial(v4);
    else
      v1 = 0;
    Singleton<Tutorial>::m_pInstance = v1;
  }
  if ( !v1->m_bEnable )
  {
    v5 = QuestDataMgr::GetQuest();
    v6 = v5->m_pQuestData;
    pQuest = (CQuest *)v5;
    pQData = v5->m_pQuestData;
    bFind = 0;
    i = 0;
    if ( CQuestData::GetNumOfQuestData(v6) > 0u )
    {
      while ( 1 )
      {
        v7 = CQuestData::GetQuestDataByIndex(v6, v2);
        v8 = &v7->ID;
        lpQuest = v7;
        v47 = (int)&v7->ID;
        if ( CQuest::IsDoingQuest(pQuest, v7->ID) )
        {
          if ( CQuest::GetNewQuestStatus(pQuest, *v8) == (QUEST_DATA *)8 )
          {
            v11 = v3->m_kmapQuestIDClicked._Myfirst;
            v12 = v3->m_kmapQuestIDClicked._Mylast;
            v13 = &v3->m_kmapQuestIDClicked;
            v14 = 0;
            if ( v11 == v12 )
              goto LABEL_79;
            do
            {
              if ( *v11 == *v8 )
                v14 = 1;
              ++v11;
            }
            while ( v11 != v12 );
            if ( !v14 )
            {
LABEL_79:
              v15 = v3->m_kmapQuestIDClicked._Mylast;
              if ( v8 >= v15 || (v16 = v13->_Myfirst, v13->_Myfirst > v8) )
              {
                v25 = v3->m_kmapQuestIDClicked._Myend;
                if ( v15 == v25 )
                {
                  v26 = v15 - v13->_Myfirst;
                  if ( v26 > 0x7FFFFFFE )
                    goto LABEL_76;
                  v27 = v26 + 1;
                  v28 = v25 - v13->_Myfirst;
                  if ( v27 > v28 )
                  {
                    if ( 0x7FFFFFFF - (v28 >> 1) >= v28 )
                      v29 = (v28 >> 1) + v28;
                    else
                      v29 = 0;
                    if ( v29 < v27 )
                      v29 = v27;
                    std::vector<unsigned short,std::allocator<unsigned short>>::reserve(v13, v29);
                  }
                }
                v30 = v3->m_kmapQuestIDClicked._Mylast;
                if ( v30 )
                  *v30 = *v8;
              }
              else
              {
                v17 = v3->m_kmapQuestIDClicked._Myend;
                v18 = v8 - v16;
                if ( v15 == v17 )
                {
                  v19 = v15 - v16;
                  if ( v19 > 0x7FFFFFFE )
                    goto LABEL_76;
                  v20 = v19 + 1;
                  v21 = v17 - v16;
                  if ( v20 > v21 )
                  {
                    if ( 0x7FFFFFFF - (v21 >> 1) >= v21 )
                      v22 = (v21 >> 1) + v21;
                    else
                      v22 = 0;
                    if ( v22 < v20 )
                      v22 = v20;
                    std::vector<unsigned short,std::allocator<unsigned short>>::reserve(v13, v22);
                    v8 = (unsigned __int16 *)v47;
                  }
                }
                v23 = v13->_Mylast;
                v24 = &v13->_Myfirst[v18];
                if ( v23 )
                  *v23 = *v24;
              }
              ++v13->_Mylast;
              v31 = v53->m_kmapQuestID._Mylast;
              if ( v8 >= v31 || (v32 = v53->m_kmapQuestID._Myfirst, v32 > v8) )
              {
                v40 = v53->m_kmapQuestID._Myend;
                if ( v31 == v40 )
                {
                  v41 = v53->m_kmapQuestID._Myfirst;
                  v42 = v31 - v41;
                  if ( v42 > 0x7FFFFFFE )
LABEL_76:
                    std::_Xlength_error("vector<T> too long");
                  v43 = v42 + 1;
                  v44 = v40 - v41;
                  if ( v43 > v44 )
                  {
                    if ( 0x7FFFFFFF - (v44 >> 1) >= v44 )
                      v45 = (v44 >> 1) + v44;
                    else
                      v45 = 0;
                    if ( v45 < v43 )
                      v45 = v43;
                    std::vector<unsigned short,std::allocator<unsigned short>>::reserve(&v53->m_kmapQuestID, v45);
                  }
                }
                v46 = v53->m_kmapQuestID._Mylast;
                if ( v46 )
                  *v46 = *v8;
              }
              else
              {
                v33 = v53->m_kmapQuestID._Myend;
                v34 = v8 - v32;
                if ( v31 == v33 )
                {
                  v35 = v31 - v32;
                  if ( v35 > 0x7FFFFFFE )
                    goto LABEL_76;
                  v36 = v35 + 1;
                  v37 = v33 - v32;
                  if ( v36 > v37 )
                  {
                    if ( 0x7FFFFFFF - (v37 >> 1) >= v37 )
                      v38 = (v37 >> 1) + v37;
                    else
                      v38 = 0;
                    if ( v38 < v36 )
                      v38 = v36;
                    std::vector<unsigned short,std::allocator<unsigned short>>::reserve(&v53->m_kmapQuestID, v38);
                  }
                }
                v39 = v53->m_kmapQuestID._Mylast;
                if ( v39 )
                  *v39 = v53->m_kmapQuestID._Myfirst[v34];
              }
              ++v53->m_kmapQuestID._Mylast;
              iEndQuestNpcID = lpQuest->End.NPCMobList[0].NPCMobID;
              bFind = 1;
            }
          }
          else
          {
            v9 = v3->m_kmapQuestID._Myfirst;
            for ( j = v3->m_kmapQuestID._Mylast; v9 != j; ++v9 )
            {
              if ( *v9 == *v8 )
              {
                memmove((char *)v9, (char *)v9 + 2, 2 * (v53->m_kmapQuestID._Mylast - (v9 + 1)));
                --v53->m_kmapQuestID._Mylast;
              }
            }
          }
          v3 = v53;
          v2 = i;
        }
        i = ++v2;
        if ( v2 >= CQuestData::GetNumOfQuestData(pQData) )
          break;
        v6 = pQData;
      }
      if ( bFind )
        QuestFinishWin::ChangeFace(v3, iEndQuestNpcID);
    }
  }
}

//----- (00600E20) --------------------------------------------------------
void __thiscall NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>(NiPointer<HazeAccumulator> *this)
{
  HazeAccumulator *v1; // esi@1

  v1 = this->m_pObject;
  if ( this->m_pObject && !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
  {
    if ( v1 )
      v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
  }
}

//----- (00600E50) --------------------------------------------------------
QuestFinishWin *__thiscall QuestFinishWin::`scalar deleting destructor'(QuestFinishWin *this, unsigned int a2)
{
  QuestFinishWin *v2; // esi@1

  v2 = this;
  QuestFinishWin::~QuestFinishWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00600E80) --------------------------------------------------------
void __thiscall QuestNewsWin::OnInvLClick(QuestNewsWin *this, unsigned int uiInvIndex)
{
  GameFrameWork *v2; // eax@1

  this->m_bClicked = 1;
  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
    GameFrameWork::OpenQuestWin(v2, 1, 2);
}

//----- (00600EE0) --------------------------------------------------------
void __thiscall QuestNewsWin::OnClose(QuestNewsWin *this)
{
  QuestNewsWin *v1; // esi@1

  v1 = this;
  PgWin::OnClose((PgWin *)&this->vfptr);
  v1->m_bClicked = 0;
}

//----- (00600F00) --------------------------------------------------------
void __thiscall QuestNewsWin::OnCommand(QuestNewsWin *this, unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@2

  if ( wParam == 10 )
  {
    this->m_bClicked = 1;
    v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v3 )
      GameFrameWork::OpenQuestWin(v3, 1, 2);
  }
}

//----- (00600F40) --------------------------------------------------------
int __stdcall QuestNewsWin::CheckNewQuest(char nPlayerLevel)
{
  CClientQuest *v2; // eax@1
  CQuestData *v3; // ebx@1
  unsigned int v4; // edi@1
  QUEST_DATA *v5; // esi@2
  QUEST_DATA *v6; // eax@2
  int result; // eax@7
  CQuest *pQuest; // [sp+Ch] [bp-4h]@1

  v2 = QuestDataMgr::GetQuest();
  v3 = v2->m_pQuestData;
  pQuest = (CQuest *)v2;
  v4 = 0;
  if ( CQuestData::GetNumOfQuestData(v2->m_pQuestData) <= 0u )
  {
LABEL_7:
    result = 0;
  }
  else
  {
    while ( 1 )
    {
      v5 = CQuestData::GetQuestDataByIndex(v3, v4);
      v6 = CQuest::GetNewQuestStatus(pQuest, v5->ID);
      if ( v5->Start.bItem != 1
        && v5->Start.bIsWaitListView
        && v6 == (QUEST_DATA *)5
        && (unsigned __int8)nPlayerLevel - v5->Start.LevelMin <= 150 )
      {
        break;
      }
      if ( (signed int)++v4 >= CQuestData::GetNumOfQuestData(v3) )
        goto LABEL_7;
    }
    result = 1;
  }
  return result;
}

//----- (00600FD0) --------------------------------------------------------
void __thiscall QuestNewsWin::OnShowWin(QuestNewsWin *this)
{
  QuestNewsWin *v1; // esi@1

  v1 = this;
  PgWin::OnShowWin((PgWin *)&this->vfptr);
  v1->m_bShowWinTimer = 1;
  CNSTimer_Interval::ReSet(&v1->m_kRandomTimerInterval, Timer::ms_fCurTime);
  v1->m_kRandomTimerInterval.m_fCheckTime = 1.5;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00601010) --------------------------------------------------------
void __thiscall QuestNewsWin::CreateFlexMsgBox(QuestNewsWin *this)
{
  QuestNewsWin *v1; // edi@1
  NiSourceTexture *v2; // eax@1
  FlexMsgBox *v3; // esi@1
  int v4; // eax@2
  char *v5; // eax@4
  NiRefObjectVtbl *v6; // ebx@6
  unsigned int v7; // eax@6
  NiRefObjectVtbl *v8; // ebx@6
  int v9; // eax@6
  unsigned int v10; // ebx@6
  int v11; // ST1C_4@6
  unsigned int v12; // esi@6
  FlexMsgBox *v13; // ecx@7
  NiRefObjectVtbl *v14; // ebx@7
  int v15; // eax@7

  v1 = this;
  v2 = MenuTexMgr::GetTexture(1u);
  v3 = FlexMsgBox::CreateWin(v2, 7u, 7u, 0);
  if ( v1 )
    v4 = (int)&v1->vfptr;
  else
    v4 = 0;
  v3->vfptr->SetMsgHooker(&v3->vfptr, v4);
  FlexMsgBox::SetVerticalGap(v3, 5);
  v5 = v1->m_Text._Bx._Buf;
  if ( v1->m_Text._Myres >= 0x10 )
    v5 = *(char **)v5;
  FlexMsgBox::SetText(v3, v5);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
  v6 = v3->vfptr;
  v7 = ((int (__thiscall *)(_DWORD))v3->vfptr[36].__vecDelDtor)(v3);
  v6[43].__vecDelDtor((NiRefObject *)v3, -(v7 >> 1));
  v8 = v3->vfptr;
  v9 = ((int (__thiscall *)(_DWORD))v1->vfptr[36].__vecDelDtor)(v1);
  v8[44].__vecDelDtor((NiRefObject *)v3, v9);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[29].__vecDelDtor)(v1, v3, 0);
  v1->m_pkFlexMsgBox = v3;
  v10 = (unsigned int)((int (__thiscall *)(_DWORD))v3->vfptr[36].__vecDelDtor)(v3) >> 1;
  v11 = ((int (__thiscall *)(_DWORD))v1->vfptr[41].__vecDelDtor)(v1) - v10;
  v12 = v11 + ((int (__thiscall *)(_DWORD))v3->vfptr[36].__vecDelDtor)(v3);
  if ( PgWin::ms_uiScreenWidth < v12 )
  {
    v13 = v1->m_pkFlexMsgBox;
    v14 = v13->vfptr;
    v15 = ((int (*)(void))v13->vfptr[41].__vecDelDtor)();
    v14[43].__vecDelDtor((NiRefObject *)v1->m_pkFlexMsgBox, PgWin::ms_uiScreenWidth - v12 + v15);
  }
}

//----- (00601130) --------------------------------------------------------
void __thiscall QuestNewsWin::DirectMessage(QuestNewsWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  QuestNewsWin *v4; // esi@1
  unsigned int v5; // eax@1
  IDirectMessenger *v6; // eax@2
  bool v7; // cf@7
  unsigned int *v8; // eax@7

  v4 = this;
  v5 = this->m_uiMessageNum;
  if ( v5 )
    v6 = (IDirectMessenger *)(v5 + 232);
  else
    v6 = 0;
  if ( pkFrom == v6 )
  {
    if ( iMsgTag == 27 )
    {
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this[-1].m_pkToolTipWin);
      if ( LODWORD(v4->m_kBound.m_fRadius) )
      {
        v7 = v4->vfptr < (IDirectMessengerVtbl *)0x10;
        v8 = &v4->m_kEffectList.m_kAllocator.m_uiCount;
        LODWORD(v4->m_kBound.m_fRadius) = 0;
        if ( !v7 )
          v8 = (unsigned int *)*v8;
        *(_BYTE *)v8 = 0;
      }
    }
    v4->m_uiMessageNum = 0;
  }
}

//----- (006011A0) --------------------------------------------------------
void __thiscall QuestNewsWin::UpdateMeWin(QuestNewsWin *this, float fCurTime)
{
  QuestNewsWin *v2; // edi@1
  SpEffect *v3; // ecx@2
  NiNode *v4; // eax@2
  CClientQuest *v5; // eax@8
  CQuestData *v6; // esi@8
  QUEST_DATA *v7; // eax@11
  QUEST_DATA *v8; // esi@11
  QUEST_DATA *v9; // eax@11
  bool v10; // zf@11
  int v11; // ecx@11
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v12; // eax@13
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v13; // eax@16
  signed int v14; // esi@23
  NiNode *v15; // eax@26
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > >,bool> v16; // [sp+4h] [bp-30h]@16
  SoundIndex rkIndex; // [sp+Ch] [bp-28h]@4
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > result; // [sp+14h] [bp-20h]@13
  CQuest *pQuest; // [sp+18h] [bp-1Ch]@8
  CQuestData *pQData; // [sp+1Ch] [bp-18h]@8
  PLAYER_QUEST_STATUS nStatus; // [sp+20h] [bp-14h]@11
  int Qlv; // [sp+24h] [bp-10h]@11
  int Userlv; // [sp+28h] [bp-Ch]@8
  int i; // [sp+2Ch] [bp-8h]@8
  bool bResult; // [sp+33h] [bp-1h]@8

  v2 = this;
  if ( this->m_bEffectStart )
  {
    v3 = this->m_apkBlinkEffect;
    v2->m_bEffectStart = 0;
    SpEffect::Start(v3, (NiNode *)&v2->vfptr);
    v2->m_apkBlinkEffect->m_bLoop = 1;
    v4 = v2->m_apkBlinkEffect->m_spEffect.m_pObject;
    if ( v4 )
      v4->m_uFlags &= 0xFFFEu;
    rkIndex.m_dwIndex = 2;
    rkIndex.m_acFilename = 0;
    SoundGroupStatic::PlaySoundA((SoundGroupStatic *)&g_kSoundMgr.m_pkInterfaceGroup->vfptr, &rkIndex, 0, 0);
  }
  if ( v2->m_bShowWinTimer )
  {
    v2->m_pkQuestIconBut->m_uFlags &= 0xFFFEu;
    v2->m_bShowWinTimer = 0;
    v2->m_bEffectStart = 1;
  }
  if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[65].__vecDelDtor)(v2) )
  {
    v5 = QuestDataMgr::GetQuest();
    v6 = v5->m_pQuestData;
    pQuest = (CQuest *)v5;
    pQData = v6;
    bResult = 0;
    Userlv = User::Lv(&g_kUser);
    i = 0;
    if ( CQuestData::GetNumOfQuestData(v6) <= 0u )
      goto LABEL_32;
    while ( 1 )
    {
      v7 = CQuestData::GetQuestDataByIndex(v6, i);
      v8 = v7;
      v9 = CQuest::GetNewQuestStatus(pQuest, v7->ID);
      v10 = v8->Start.bItem == 1;
      v11 = v8->Start.LevelMin;
      nStatus = (PLAYER_QUEST_STATUS)v9;
      Qlv = v11;
      if ( !v10 && v8->Start.bIsWaitListView )
      {
        v12 = std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::find(
                (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v2->m_setAbleQuest.comp,
                &result,
                &v8->ID)->_Ptr;
        if ( nStatus != 5 || Userlv - Qlv > 150 )
        {
          if ( v12 != v2->m_setAbleQuest._Myhead )
            std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::erase(
              (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v2->m_setAbleQuest.comp,
              (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *)&rkIndex.m_acFilename,
              (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > >)v12);
        }
        else if ( v12 == v2->m_setAbleQuest._Myhead )
        {
          v13 = std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Buynode<unsigned short>(
                  (std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v2->m_setAbleQuest.comp,
                  &v8->ID);
          std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Linsert(
            (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v2->m_setAbleQuest.comp,
            &v16,
            v13,
            0);
          v2->m_bClicked = 0;
          v2->m_bShowWinTimer = 1;
        }
        if ( Userlv - Qlv <= 150 && Userlv - Qlv >= 0 && nStatus == 5 )
          bResult = 1;
      }
      v14 = ++i;
      if ( v14 >= CQuestData::GetNumOfQuestData(pQData) )
        break;
      v6 = pQData;
    }
    if ( !bResult )
LABEL_32:
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
    v15 = v2->m_apkBlinkEffect->m_spEffect.m_pObject;
    if ( v15 )
    {
      if ( v2->m_bClicked )
        v15->m_uFlags |= 1u;
      else
        v15->m_uFlags &= 0xFFFEu;
    }
  }
}

//----- (006013B0) --------------------------------------------------------
int __thiscall QuestNewsWin::QuestPlayer_LevelChange(QuestNewsWin *this, char nPlayerLevel)
{
  signed int v2; // edi@1
  CClientQuest *v3; // eax@1
  CQuestData *v4; // esi@1
  QUEST_DATA *v5; // ebx@2
  const unsigned __int16 *v6; // esi@2
  QUEST_DATA *v7; // eax@2
  bool v8; // zf@2
  std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *v9; // edi@4
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *v10; // eax@4
  PLAYER_QUEST_STATUS v11; // ecx@4
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > v12; // eax@4
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v13; // eax@7
  QuestNewsWin *v14; // eax@7
  char v15; // bl@17
  int v16; // ST08_4@24
  int v17; // ST04_4@24
  char *v18; // eax@24
  char *v19; // eax@24
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > >,bool> v21; // [sp+Ch] [bp-38h]@7
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > v22; // [sp+14h] [bp-30h]@9
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > result; // [sp+18h] [bp-2Ch]@4
  CQuestData *pQData; // [sp+1Ch] [bp-28h]@1
  CQuest *pQuest; // [sp+20h] [bp-24h]@1
  int bResult; // [sp+24h] [bp-20h]@1
  int i; // [sp+28h] [bp-1Ch]@1
  int Qlv; // [sp+2Ch] [bp-18h]@2
  int nNormalQuest; // [sp+30h] [bp-14h]@1
  int nEpicQuest; // [sp+34h] [bp-10h]@1
  PLAYER_QUEST_STATUS nStatus; // [sp+38h] [bp-Ch]@2
  QuestNewsWin *v32; // [sp+3Ch] [bp-8h]@1
  bool bNewAddQuest; // [sp+43h] [bp-1h]@1

  v2 = 0;
  v32 = this;
  bResult = 0;
  v3 = QuestDataMgr::GetQuest();
  v4 = v3->m_pQuestData;
  pQuest = (CQuest *)v3;
  pQData = v4;
  bNewAddQuest = 0;
  nNormalQuest = 0;
  nEpicQuest = 0;
  i = 0;
  if ( CQuestData::GetNumOfQuestData(v4) <= 0u )
    return 0;
  do
  {
    v5 = CQuestData::GetQuestDataByIndex(v4, v2);
    v6 = &v5->ID;
    v7 = CQuest::GetNewQuestStatus(pQuest, v5->ID);
    v8 = v5->Start.bItem == 1;
    nStatus = (PLAYER_QUEST_STATUS)v7;
    Qlv = v5->Start.LevelMin;
    if ( v8 || !v5->Start.bIsWaitListView )
      goto LABEL_22;
    v9 = (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v32->m_setAbleQuest.comp;
    v10 = std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::find(
            (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v32->m_setAbleQuest.comp,
            &result,
            v6);
    v11 = nStatus;
    v12._Ptr = v10->_Ptr;
    if ( nStatus != 5 || (unsigned __int8)nPlayerLevel - Qlv > 150 )
    {
      if ( v12._Ptr != v32->m_setAbleQuest._Myhead )
      {
        std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::erase(
          v9,
          &v22,
          v12);
        goto LABEL_10;
      }
    }
    else if ( v12._Ptr == v32->m_setAbleQuest._Myhead )
    {
      v13 = std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Buynode<unsigned short>(
              (std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v9->comp,
              (unsigned __int16 *)v6);
      std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Linsert(
        v9,
        &v21,
        v13,
        0);
      v14 = v32;
      v32->m_bClicked = 0;
      v14->m_bShowWinTimer = 1;
      bNewAddQuest = 1;
LABEL_10:
      v11 = nStatus;
      goto LABEL_11;
    }
LABEL_11:
    if ( (unsigned __int8)nPlayerLevel - Qlv > 150 )
      goto LABEL_22;
    if ( v11 == 5 )
    {
      bResult = 1;
    }
    else if ( (signed int)v11 < 4 || (signed int)v11 > 5 && v11 != 20 )
    {
      goto LABEL_22;
    }
    v15 = v5->Type;
    if ( v15 == 1 || (unsigned __int8)v15 > 5u && (unsigned __int8)v15 <= 7u )
      ++nEpicQuest;
    else
      ++nNormalQuest;
LABEL_22:
    v4 = pQData;
    v2 = ++i;
  }
  while ( v2 < CQuestData::GetNumOfQuestData(pQData) );
  if ( bResult )
  {
    v16 = nEpicQuest;
    v17 = nNormalQuest;
    v18 = (char *)TextData2::Get(0xF9461F51);
    v19 = fs(v18, v17, v16);
    PgWin::SetToolTipWinText((PgWin *)&v32->m_pkQuestIconBut->vfptr, v19);
  }
  return bNewAddQuest;
}

//----- (00601560) --------------------------------------------------------
void __thiscall QuestNewsWin::~QuestNewsWin(QuestNewsWin *this)
{
  QuestNewsWin *v1; // esi@1
  SpEffect *v2; // edi@1
  NiNode *v3; // ebx@2
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > v4; // ST08_4@7
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > v5; // ST04_4@7
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > result; // [sp+10h] [bp-18h]@7
  SpEffect *v7; // [sp+14h] [bp-14h]@2
  QuestNewsWin *v8; // [sp+18h] [bp-10h]@1
  int v9; // [sp+24h] [bp-4h]@1

  v1 = this;
  v8 = this;
  this->vfptr = (NiRefObjectVtbl *)&QuestNewsWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&QuestNewsWin::`vftable'{for `IDirectMessenger'};
  v9 = 0;
  v2 = this->m_apkBlinkEffect;
  if ( v2 )
  {
    v7 = this->m_apkBlinkEffect;
    NsEffect::~NsEffect(&v2->m_kEffect);
    LOBYTE(v9) = 3;
    ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v2->m_kMarkCheck);
    v3 = v2->m_spEffect.m_pObject;
    LOBYTE(v9) = 2;
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    operator delete(v2);
  }
  v7 = (SpEffect *)&v1->m_setAbleQuest;
  v4._Ptr = v1->m_setAbleQuest._Myhead;
  v5._Ptr = v1->m_setAbleQuest._Myhead->_Left;
  LOBYTE(v9) = 5;
  std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::erase(
    (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v1->m_setAbleQuest.comp,
    &result,
    v5,
    v4);
  operator delete(v1->m_setAbleQuest._Myhead);
  if ( v1->m_Text._Myres >= 0x10 )
    operator delete(v1->m_Text._Bx._Ptr);
  v1->m_Text._Myres = 15;
  v1->m_Text._Mysize = 0;
  v1->m_Text._Bx._Buf[0] = 0;
  v9 = -1;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9B4CC0: using guessed type void (__thiscall *QuestNewsWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B4CDC: using guessed type int (__thiscall *QuestNewsWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00601680) --------------------------------------------------------
void __thiscall QuestNewsWin::QuestNewsWin(QuestNewsWin *this)
{
  QuestNewsWin *v1; // esi@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v2; // eax@1
  std::exception pExceptionObject; // [sp+10h] [bp-20h]@3
  QuestNewsWin *v4; // [sp+1Ch] [bp-14h]@1
  char *_What; // [sp+20h] [bp-10h]@3
  int v6; // [sp+2Ch] [bp-4h]@1

  v1 = this;
  v4 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v6 = 0;
  v1->vfptr = (NiRefObjectVtbl *)&QuestNewsWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&QuestNewsWin::`vftable'{for `IDirectMessenger'};
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kDisplayTimerInterval);
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kShowWinTimerInterval);
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kRandomTimerInterval);
  v1->m_Text._Myres = 15;
  v1->m_Text._Mysize = 0;
  v1->m_Text._Bx._Buf[0] = 0;
  LOBYTE(v6) = 1;
  v1->m_setAbleQuest._Mysize = 0;
  v2 = (std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *)operator new(0x10u);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_setAbleQuest._Myhead = v2;
  v2->_Left = v2;
  v1->m_setAbleQuest._Myhead->_Parent = v1->m_setAbleQuest._Myhead;
  v1->m_setAbleQuest._Myhead->_Right = v1->m_setAbleQuest._Myhead;
  v1->m_setAbleQuest._Myhead->_Color = 1;
  v1->m_setAbleQuest._Myhead->_Isnil = 1;
  LOBYTE(v6) = 2;
  v1->m_pkTitleTextWin = 0;
  v1->m_bClicked = 0;
  v1->m_pkFlexMsgBox = 0;
  v1->m_bShowWinTimer = 0;
  v1->m_apkBlinkEffect = 0;
  std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::clear((std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v1->m_setAbleQuest.comp);
  v1->m_ePigeonState = 0;
  v1->m_bEffectStart = 0;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9B4CC0: using guessed type void (__thiscall *QuestNewsWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B4CDC: using guessed type int (__thiscall *QuestNewsWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006017C0) --------------------------------------------------------
QuestNewsWin *__cdecl QuestNewsWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  QuestNewsWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1F8u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    QuestNewsWin::QuestNewsWin((QuestNewsWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (QuestNewsWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (006018F0) --------------------------------------------------------
char __thiscall QuestNewsWin::Create(QuestNewsWin *this, PgFrameWork *pkFrameWork)
{
  QuestNewsWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  int v7; // edi@9
  int v8; // ebx@9
  PgWinBut *v9; // eax@10
  NiUnsharedGeometryGroup *v10; // eax@10
  NiTexturePalette *v11; // edi@10
  const char *v12; // eax@12
  SpEffect *v13; // edi@14
  NiNode *v14; // eax@15
  SpEffect *v15; // eax@15
  void *(__thiscall *v16)(NiRefObject *, unsigned int); // eax@17
  NiNode *v18; // esi@18
  unsigned int uiWidth; // [sp+18h] [bp-24h]@9
  unsigned int uiHeight; // [sp+1Ch] [bp-20h]@9
  int uiLeft; // [sp+20h] [bp-1Ch]@4
  int uiTop; // [sp+24h] [bp-18h]@4
  NiPointer<NiNode> pkNiNodePtr; // [sp+28h] [bp-14h]@10
  NiPointer<NiNode> spNode; // [sp+2Ch] [bp-10h]@1
  int v25; // [sp+38h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v25 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\NewQuest.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane04", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "QuestNewsWin", 0) )
  {
    v6 = spNode.m_pObject;
    v25 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v7 = uiLeft;
  v8 = uiTop;
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Picking", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v18 = spNode.m_pObject;
    v25 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v18 )
      v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
    return 0;
  }
  v9 = PgWinBut::CreateWin(uiLeft - v7, uiTop - v8, uiWidth, uiHeight, (PgWin *)&v2->vfptr, 0xAu, 0, 0);
  v2->m_pkQuestIconBut = v9;
  v9->m_uFlags |= 1u;
  v2->m_pkQuestIconBut->m_pkToolTipWin = g_pkToolTipWin;
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkQuestIconBut->vfptr, byte_9B4C7E);
  v10 = TextData::Get(0xE8352F40);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &v2->m_Text,
    (const char *)v10,
    strlen((const char *)v10));
  pkNiNodePtr.m_pObject = 0;
  v11 = pTexturePalette;
  LOBYTE(v25) = 1;
  if ( !Folder::m_bInit )
    Folder::Init();
  v12 = Folder::Merge(&Folder::m_acMenu, "Game\\NewQuestEffect02.nif");
  PgUtil::LoadNodeNifFile(v12, &pkNiNodePtr, v11);
  if ( !pkNiNodePtr.m_pObject )
  {
    LOBYTE(v25) = 0;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkNiNodePtr);
    v25 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  v13 = (SpEffect *)operator new(0x44u);
  LOBYTE(v25) = 2;
  if ( v13 )
  {
    v14 = (NiNode *)NiObject::Clone((NiObject *)&pkNiNodePtr.m_pObject->vfptr);
    SpEffect::SpEffect(v13, v14);
  }
  else
  {
    v15 = 0;
  }
  v2->m_apkBlinkEffect = v15;
  v16 = v2->vfptr[59].__vecDelDtor;
  LOBYTE(v25) = 1;
  ((void (__thiscall *)(QuestNewsWin *))v16)(v2);
  v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
  LOBYTE(v25) = 0;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkNiNodePtr);
  v25 = -1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00601BC0) --------------------------------------------------------
std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *__cdecl std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Min(std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *_Pnode)
{
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *result; // eax@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v2; // ecx@1

  result = _Pnode;
  v2 = _Pnode->_Left;
  if ( !_Pnode->_Left->_Isnil )
  {
    do
    {
      result = v2;
      v2 = v2->_Left;
    }
    while ( !v2->_Isnil );
  }
  return result;
}

//----- (00601BE0) --------------------------------------------------------
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>,std::_Iterator_base0>::operator++(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >,std::_Iterator_base0> *this)
{
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >,std::_Iterator_base0> *result; // eax@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v2; // edx@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v3; // ecx@2
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v4; // edx@3
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *i; // edx@6

  result = this;
  v2 = this->_Ptr;
  if ( !this->_Ptr->_Isnil )
  {
    v3 = v2->_Right;
    if ( v3->_Isnil )
    {
      for ( i = v2->_Parent; !i->_Isnil; i = i->_Parent )
      {
        if ( result->_Ptr != i->_Right )
          break;
        result->_Ptr = i;
      }
      result->_Ptr = i;
    }
    else
    {
      v4 = v3->_Left;
      if ( !v3->_Left->_Isnil )
      {
        do
        {
          v3 = v4;
          v4 = v4->_Left;
        }
        while ( !v4->_Isnil );
      }
      result->_Ptr = v3;
    }
  }
  return result;
}

//----- (00601C30) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Erase(std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *this, std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *_Rootnode)
{
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v2; // edi@1
  std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *v3; // ebx@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *i; // esi@1

  v2 = _Rootnode;
  v3 = this;
  for ( i = _Rootnode; !i->_Isnil; v2 = i )
  {
    std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Erase(
      v3,
      i->_Right);
    i = i->_Left;
    operator delete(v2);
  }
}

//----- (00601C70) --------------------------------------------------------
std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *__thiscall std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::erase(std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *this, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > _Where)
{
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v3; // ebx@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v4; // edi@4
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v5; // eax@7
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v6; // esi@8
  std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *v7; // ecx@10
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v8; // eax@10
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v9; // eax@17
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v10; // ecx@20
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v11; // ecx@29
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v12; // ecx@31
  char v13; // cl@34
  std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *i; // ecx@36
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v15; // eax@38
  unsigned int v16; // eax@59
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *v17; // eax@61
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *_Erasednode; // [sp+10h] [bp-8h]@3
  std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *v19; // [sp+14h] [bp-4h]@1

  v3 = _Where._Ptr;
  v19 = this;
  if ( _Where._Ptr->_Isnil )
    std::_Xout_of_range("invalid map/set<T> iterator");
  _Erasednode = _Where._Ptr;
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >,std::_Iterator_base0> *)&_Where._Ptr);
  if ( v3->_Left->_Isnil )
  {
    v4 = v3->_Right;
LABEL_8:
    v6 = v3->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v7 = v19;
    v8 = v19->_Myhead;
    if ( v8->_Parent == v3 )
    {
      v8->_Parent = v4;
    }
    else if ( v6->_Left == v3 )
    {
      v6->_Left = v4;
    }
    else
    {
      v6->_Right = v4;
    }
    if ( v19->_Myhead->_Left == v3 )
    {
      if ( v4->_Isnil )
      {
        v9 = v6;
      }
      else
      {
        v9 = std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Min(v4);
        v7 = v19;
      }
      v7->_Myhead->_Left = v9;
    }
    v10 = v7->_Myhead;
    if ( v10->_Right == v3 )
    {
      if ( v4->_Isnil )
        v10->_Right = v6;
      else
        v10->_Right = std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Max(v4);
    }
    goto LABEL_35;
  }
  if ( v3->_Right->_Isnil )
  {
    v4 = v3->_Left;
    goto LABEL_8;
  }
  v5 = _Where._Ptr;
  v4 = _Where._Ptr->_Right;
  if ( _Where._Ptr == v3 )
    goto LABEL_8;
  v3->_Left->_Parent = _Where._Ptr;
  v5->_Left = v3->_Left;
  if ( v5 == v3->_Right )
  {
    v6 = v5;
  }
  else
  {
    v6 = v5->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v6->_Left = v4;
    v5->_Right = v3->_Right;
    v3->_Right->_Parent = v5;
  }
  v11 = v19->_Myhead;
  if ( v11->_Parent == v3 )
  {
    v11->_Parent = v5;
  }
  else
  {
    v12 = v3->_Parent;
    if ( v12->_Left == v3 )
      v12->_Left = v5;
    else
      v12->_Right = v5;
  }
  v5->_Parent = v3->_Parent;
  v13 = v5->_Color;
  v5->_Color = v3->_Color;
  v3->_Color = v13;
LABEL_35:
  if ( _Erasednode->_Color == 1 )
  {
    for ( i = v19; v4 != i->_Myhead->_Parent; v6 = v6->_Parent )
    {
      if ( v4->_Color != 1 )
        break;
      v15 = v6->_Left;
      if ( v4 == v6->_Left )
      {
        v15 = v6->_Right;
        if ( !v15->_Color )
        {
          v15->_Color = 1;
          v6->_Color = 0;
          std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Lrotate(
            i,
            v6);
          v15 = v6->_Right;
          i = v19;
        }
        if ( v15->_Isnil )
          goto LABEL_53;
        if ( v15->_Left->_Color != 1 || v15->_Right->_Color != 1 )
        {
          if ( v15->_Right->_Color == 1 )
          {
            v15->_Left->_Color = 1;
            v15->_Color = 0;
            std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Rrotate(
              i,
              v15);
            v15 = v6->_Right;
            i = v19;
          }
          v15->_Color = v6->_Color;
          v6->_Color = 1;
          v15->_Right->_Color = 1;
          std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Lrotate(
            i,
            v6);
          break;
        }
      }
      else
      {
        if ( !v15->_Color )
        {
          v15->_Color = 1;
          v6->_Color = 0;
          std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Rrotate(
            i,
            v6);
          v15 = v6->_Left;
          i = v19;
        }
        if ( v15->_Isnil )
          goto LABEL_53;
        if ( v15->_Right->_Color != 1 || v15->_Left->_Color != 1 )
        {
          if ( v15->_Left->_Color == 1 )
          {
            v15->_Right->_Color = 1;
            v15->_Color = 0;
            std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Lrotate(
              i,
              v15);
            v15 = v6->_Left;
            i = v19;
          }
          v15->_Color = v6->_Color;
          v6->_Color = 1;
          v15->_Left->_Color = 1;
          std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Rrotate(
            i,
            v6);
          break;
        }
      }
      v15->_Color = 0;
LABEL_53:
      v4 = v6;
    }
    v4->_Color = 1;
  }
  operator delete(_Erasednode);
  v16 = v19->_Mysize;
  if ( v16 )
    v19->_Mysize = v16 - 1;
  v17 = result;
  result->_Ptr = _Where._Ptr;
  return v17;
}

//----- (00601EC0) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::clear(std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *this)
{
  std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *v1; // edi@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v3; // ebx@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v4; // esi@1

  v1 = this;
  v2 = this->_Myhead;
  v3 = v2->_Parent;
  v4 = v2->_Parent;
  if ( !v3->_Isnil )
  {
    do
    {
      std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Erase(
        v1,
        v4->_Right);
      v4 = v4->_Left;
      operator delete(v3);
      v3 = v4;
    }
    while ( !v4->_Isnil );
  }
  v1->_Myhead->_Parent = v1->_Myhead;
  v1->_Myhead->_Left = v1->_Myhead;
  v1->_Myhead->_Right = v1->_Myhead;
  v1->_Mysize = 0;
}

//----- (00601F10) --------------------------------------------------------
std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *__thiscall std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::erase(std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *this, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > _Last)
{
  std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *v4; // esi@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v6; // ecx@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *v7; // eax@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > v8; // edx@5
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v9; // eax@6
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v10; // ecx@7
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *j; // eax@7
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *i; // eax@10
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > v13; // [sp+4h] [bp-4h]@14

  v4 = this;
  v5 = this->_Myhead;
  v6 = _First._Ptr;
  if ( _First._Ptr != v5->_Left || _Last._Ptr != v5 )
  {
    for ( ; _First._Ptr != _Last._Ptr; v6 = _First._Ptr )
    {
      v8._Ptr = v6;
      if ( !v6->_Isnil )
      {
        v9 = v6->_Right;
        if ( v9->_Isnil )
        {
          for ( i = v6->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v6 != i->_Right )
              break;
            v6 = i;
          }
          _First._Ptr = i;
        }
        else
        {
          v10 = v6->_Right;
          for ( j = v9->_Left; !j->_Isnil; j = j->_Left )
            v10 = j;
          _First._Ptr = v10;
        }
      }
      std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::erase(
        v4,
        &v13,
        v8);
    }
    v7 = result;
    result->_Ptr = v6;
  }
  else
  {
    std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::clear(v4);
    v7 = result;
    result->_Ptr = v4->_Myhead->_Left;
  }
  return v7;
}

//----- (00601FB0) --------------------------------------------------------
std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *__thiscall std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::find(std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *this, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *result, const unsigned __int16 *_Keyval)
{
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v3; // edx@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v4; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *v5; // eax@8

  v3 = this->_Myhead;
  v4 = v3->_Parent;
  while ( !v4->_Isnil )
  {
    if ( v4->_Myval >= *_Keyval )
    {
      v3 = v4;
      v4 = v4->_Left;
    }
    else
    {
      v4 = v4->_Right;
    }
  }
  if ( v3 == this->_Myhead || *_Keyval < v3->_Myval )
  {
    v5 = result;
    result->_Ptr = this->_Myhead;
  }
  else
  {
    v5 = result;
    result->_Ptr = v3;
  }
  return v5;
}

//----- (00602020) --------------------------------------------------------
void __thiscall std::set<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>>::~set<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>>(std::set<unsigned short,std::less<unsigned short>,std::allocator<unsigned short> > *this)
{
  std::set<unsigned short,std::less<unsigned short>,std::allocator<unsigned short> > *v1; // esi@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v2; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > v3; // ST04_4@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > result; // [sp+8h] [bp-14h]@1
  std::set<unsigned short,std::less<unsigned short>,std::allocator<unsigned short> > *v5; // [sp+Ch] [bp-10h]@1
  int v6; // [sp+18h] [bp-4h]@1

  v1 = this;
  v5 = this;
  v2 = this->_Myhead;
  v3._Ptr = v2->_Left;
  v6 = 0;
  std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::erase(
    (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&this->comp,
    &result,
    v3,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > >)v2);
  operator delete(v1->_Myhead);
}

//----- (00602080) --------------------------------------------------------
QuestNewsWin *__thiscall QuestNewsWin::`vector deleting destructor'(QuestNewsWin *this, unsigned int a2)
{
  QuestNewsWin *v2; // esi@1

  v2 = this;
  QuestNewsWin::~QuestNewsWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006020B0) --------------------------------------------------------
double __cdecl NiACos(float fValue)
{
  long double v1; // st7@1
  double result; // st7@3
  float fValuea; // [sp+8h] [bp+8h]@3

  v1 = fValue;
  if ( fValue <= -1.0 )
  {
    result = NI_PI;
  }
  else if ( v1 >= 1.0 )
  {
    result = 0.0;
  }
  else
  {
    fValuea = acos(v1);
    result = fValuea;
  }
  return result;
}
// B622CC: using guessed type const float NI_PI;

//----- (006020F0) --------------------------------------------------------
double __cdecl NiSymmetricRandom()
{
  signed int v0; // eax@1

  v0 = rand();
  return (float)(((double)v0 + (double)v0) / 32767.0 - 1.0);
}

//----- (00602120) --------------------------------------------------------
NiPoint3 *__thiscall NiPoint3::Cross(NiPoint3 *this, NiPoint3 *result, NiPoint3 *pt)
{
  NiPoint3 *v3; // eax@1

  v3 = result;
  result->x = pt->z * this->y - pt->y * this->z;
  result->y = this->z * pt->x - this->x * pt->z;
  result->z = pt->y * this->x - pt->x * this->y;
  return v3;
}

//----- (00602160) --------------------------------------------------------
NiControllerSequence *__thiscall NiActorManager::GetSequence(NiActorManager *this, unsigned int eSequenceID)
{
  char v2; // al@1

  v2 = NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
         (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_kSequenceMap,
         eSequenceID,
         (NiVBSet **)&eSequenceID);
  return (NiControllerSequence *)(v2 != 0 ? eSequenceID : 0);
}

//----- (00602190) --------------------------------------------------------
void __usercall QuestPigeonEffect::SetStartPos(QuestPigeonEffect *this@<ecx>, int a2@<ebx>)
{
  QuestPigeonEffect *v2; // esi@1
  signed __int16 v3; // ax@1
  Char *v4; // edi@1
  float v5; // ebx@2
  float v6; // ecx@2
  float v7; // edx@2
  unsigned __int16 v8; // ax@2
  float v9; // ST14_4@3
  float v10; // ST18_4@3
  float v11; // ST1C_4@3
  float v12; // edx@3
  float v13; // eax@3
  int v14; // edi@3
  double v15; // st7@4
  void *(__thiscall *v16)(NiRefObject *, unsigned int); // eax@6
  float v17; // edx@7
  float v18; // eax@7
  int v19; // edi@7
  int v20; // ecx@7
  void *(__thiscall *v21)(NiRefObject *, unsigned int); // eax@7
  long double v22; // st7@7
  double v23; // st7@9
  signed int v24; // eax@12
  double v25; // st7@12
  float v26; // [sp+1Ch] [bp-2Ch]@7
  NiPoint3 kPos; // [sp+20h] [bp-28h]@2
  NiPoint3 NewPos; // [sp+2Ch] [bp-1Ch]@2
  NiPoint3 kVec; // [sp+38h] [bp-10h]@2
  float value; // [sp+44h] [bp-4h]@3

  v2 = this;
  v3 = Effect::GetCasterHandle((Effect *)&this->vfptr);
  v4 = CharMgr::GetChar(&g_kCharMgr, v3);
  if ( v4 )
  {
    *(_QWORD *)&kVec.y = (signed __int64)Timer::ms_fCurTime;
    srand(LODWORD(kVec.y));
    ((void (__thiscall *)(Char *, NiPoint3 *, int))v4->vfptr[6].SetAbStateProperty)(v4, &kPos, a2);
    v5 = pkWorldCamera->m_kLocal.m_Translate.x;
    v6 = pkWorldCamera->m_kLocal.m_Translate.y;
    v7 = pkWorldCamera->m_kLocal.m_Translate.z;
    v8 = v4->m_kHandle;
    kVec.x = pkWorldCamera->m_kLocal.m_Translate.x;
    kVec.y = v6;
    NewPos.x = kPos.x - kVec.x;
    kVec.z = v7;
    NewPos.y = kPos.y - v6;
    NewPos.z = kPos.z - v7;
    if ( v8 == g_pkMainChar->m_kHandle )
    {
      v9 = -NewPos.x;
      NewPos.x = v9;
      v10 = -NewPos.y;
      NewPos.y = v10;
      v11 = -NewPos.z;
      NewPos.z = v11;
      NiPoint3::Unitize(&NewPos);
      v12 = kVec.y;
      v13 = kVec.z;
      v14 = (int)&v2->m_kStartPos;
      *(float *)v14 = v5;
      *(float *)(v14 + 4) = v12;
      *(float *)(v14 + 8) = v13;
      kVec.z = (double)rand() * 2.0 / 32767.0 - 1.0;
      *(float *)v14 = (kVec.z + 2.0) * NewPos.x + *(float *)v14;
      kVec.z = (double)rand() * 2.0 / 32767.0 - 1.0;
      v2->m_kStartPos.y = (kVec.z + 2.0) * NewPos.y + v2->m_kStartPos.y;
      kVec.x = -1.0;
      kVec.y = 0.0;
      kVec.z = 0.0;
      NiPoint3::Unitize(&kVec);
      value = kVec.y * NewPos.y + kVec.x * NewPos.x + kVec.z * NewPos.z;
      PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      kVec.z = kVec.x * NewPos.y - kVec.y * NewPos.x;
      if ( kVec.z <= 0.0 )
        v15 = 180.0 - NiACos(value) * 57.2957763671875 + 180.0;
      else
        v15 = NiACos(value) * 57.2957763671875;
      v2->m_fAngle = v15;
      LODWORD(kVec.z) = rand();
      v16 = v2->vfptr[7].__vecDelDtor;
      kVec.z = ((double)SLODWORD(kVec.z) + (double)SLODWORD(kVec.z)) / 32767.0 - 1.0;
      v2->m_fAngle = kVec.z * 20.0 + v2->m_fAngle;
      ((void (__thiscall *)(QuestPigeonEffect *))v16)(v2);
      v2->m_bIsSucceedSettingStartPos = 1;
    }
    else
    {
      v17 = kPos.y;
      v18 = kPos.z;
      v19 = (int)&v2->m_kStartPos;
      *(float *)v19 = kPos.x;
      *(float *)(v19 + 4) = v17;
      *(float *)(v19 + 8) = v18;
      LODWORD(kVec.z) = rand() % 10;
      *(float *)v19 = ((double)SLODWORD(kVec.z) * 0.25 + 2.0) * NewPos.x + *(float *)v19;
      v20 = rand() % 10;
      v21 = v2->vfptr[7].__vecDelDtor;
      LODWORD(kVec.z) = v20;
      v2->m_kStartPos.y = ((double)v20 * 0.25 + 2.0) * NewPos.y + v2->m_kStartPos.y;
      v21((NiRefObject *)&v2->vfptr, (unsigned int)&v2->m_kStartPos);
      kVec.x = 1.0;
      kVec.y = 0.0;
      kVec.z = 0.0;
      NiPoint3::Unitize(&kVec);
      kPos.x = NewPos.x;
      kPos.z = 0.0;
      kPos.y = NewPos.y;
      NiPoint3::Unitize(&kPos);
      kVec.z = kVec.x * kPos.x + kVec.y * kPos.y + kVec.z * kPos.z;
      v26 = kPos.x * kVec.y - kVec.x * kPos.y;
      v22 = kVec.z;
      if ( kVec.z <= -1.0 )
      {
        v23 = NI_PI;
      }
      else if ( v22 >= 1.0 )
      {
        v23 = 0.0;
      }
      else
      {
        kVec.z = acos(v22);
        v23 = kVec.z;
      }
      value = v23;
      v24 = rand();
      kVec.z = ((double)v24 + (double)v24) / 32767.0 - 1.0;
      kVec.z = kVec.z * 90.0 + value * 57.2957763671875;
      v25 = kVec.z;
      v2->m_fAngle = kVec.z;
      if ( v26 >= 0.0 )
      {
        v2->m_bIsSucceedSettingStartPos = 1;
      }
      else
      {
        v2->m_bIsSucceedSettingStartPos = 1;
        v2->m_fAngle = v25 + 180.0;
      }
    }
  }
  else
  {
    v2->m_bIsSucceedSettingStartPos = 0;
  }
}
// 602190: could not find valid save-restore pair for ebx
// A8B97C: using guessed type float Timer::ms_fCurTime;
// B622CC: using guessed type const float NI_PI;

//----- (00602590) --------------------------------------------------------
void __thiscall QuestPigeonEffect::QuestPigeonEffect(QuestPigeonEffect *this, NiActorManager *pkActor, Char *pkTarget)
{
  QuestPigeonEffect *v3; // esi@1
  std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *v4; // eax@1
  NiActorManager *v5; // edi@3
  NiAVObject *v6; // edi@9
  void **v7; // ecx@11
  std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *v8; // eax@11
  std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *v9; // edi@12
  std::exception pExceptionObject; // [sp+10h] [bp-1Ch]@14
  QuestPigeonEffect *v11; // [sp+1Ch] [bp-10h]@1
  int v12; // [sp+28h] [bp-4h]@1

  v3 = this;
  v11 = this;
  Effect::Effect((Effect *)&this->vfptr, 0, 0, pkTarget);
  v3->vfptr = (NiRefObjectVtbl *)&QuestPigeonEffect::`vftable'{for `NiRefObject'};
  v3->vfptr = (IEffectDestroyMessengerVtbl *)&QuestPigeonEffect::`vftable'{for `IEffectDestroyMessenger'};
  v12 = 0;
  v3->m_spActor.m_pObject = 0;
  v3->m_fAngle = 0.0;
  v3->m_bIsSucceedSettingStartPos = 1;
  v3->m_eState = 3;
  v3->m_curAniEventCode = NiActorManager::INVALID_EVENT_CODE;
  LOBYTE(v12) = 1;
  v3->m_AEEffInfo._Mysize = 0;
  v4 = (std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *)operator new(0x14u);
  if ( !v4 )
  {
    pkTarget = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&pkTarget);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v3->m_AEEffInfo._Myhead = v4;
  v4->_Next = v4;
  v3->m_AEEffInfo._Myhead->_Prev = v3->m_AEEffInfo._Myhead;
  LOBYTE(v12) = 2;
  if ( pkActor )
  {
    v5 = v3->m_spActor.m_pObject;
    if ( v5 != pkActor )
    {
      if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      v3->m_spActor.m_pObject = pkActor;
      InterlockedIncrement((volatile LONG *)&pkActor->m_uiRefCount);
    }
    v6 = v3->m_spActor.m_pObject->m_spNIFRoot.m_pObject;
    NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v3->m_spDefaultEffect.m_pObject->m_kChildren);
    if ( v6 )
      ((void (__stdcall *)(NiAVObject *, _DWORD))v3->m_spDefaultEffect.m_pObject->vfptr[29].__vecDelDtor)(v6, 0);
  }
  v7 = (void **)&v3->m_AEEffInfo._Myhead->_Next;
  v8 = (std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *)*v7;
  *v7 = v7;
  v3->m_AEEffInfo._Myhead->_Prev = v3->m_AEEffInfo._Myhead;
  v3->m_AEEffInfo._Mysize = 0;
  if ( v8 != v3->m_AEEffInfo._Myhead )
  {
    do
    {
      v9 = v8->_Next;
      operator delete(v8);
      v8 = v9;
    }
    while ( v9 != v3->m_AEEffInfo._Myhead );
  }
  v3->m_fLastUpdateTime = 0.0;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9B4F5C: using guessed type int (__stdcall *QuestPigeonEffect::`vftable'{for `IEffectDestroyMessenger'})(int);
// 9B4F74: using guessed type int (__thiscall *QuestPigeonEffect::`vftable'{for `NiRefObject'})(void *p, char);

//----- (00602720) --------------------------------------------------------
void __thiscall QuestPigeonEffect::~QuestPigeonEffect(QuestPigeonEffect *this)
{
  QuestPigeonEffect *v1; // esi@1
  NiActorManager *v2; // edi@1
  void **v3; // ecx@6
  std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *v4; // eax@6
  std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *v5; // edi@7
  void **v6; // ecx@8
  std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *v7; // eax@8
  std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *v8; // edi@9
  NiActorManager *v9; // edi@10

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&QuestPigeonEffect::`vftable'{for `NiRefObject'};
  this->vfptr = (IEffectDestroyMessengerVtbl *)&QuestPigeonEffect::`vftable'{for `IEffectDestroyMessenger'};
  v2 = this->m_spActor.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spActor.m_pObject = 0;
  }
  v3 = (void **)&v1->m_AEEffInfo._Myhead->_Next;
  v4 = (std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *)*v3;
  *v3 = v3;
  v1->m_AEEffInfo._Myhead->_Prev = v1->m_AEEffInfo._Myhead;
  v1->m_AEEffInfo._Mysize = 0;
  if ( v4 != v1->m_AEEffInfo._Myhead )
  {
    do
    {
      v5 = v4->_Next;
      operator delete(v4);
      v4 = v5;
    }
    while ( v5 != v1->m_AEEffInfo._Myhead );
  }
  v6 = (void **)&v1->m_AEEffInfo._Myhead->_Next;
  v7 = (std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *)*v6;
  *v6 = v6;
  v1->m_AEEffInfo._Myhead->_Prev = v1->m_AEEffInfo._Myhead;
  v1->m_AEEffInfo._Mysize = 0;
  if ( v7 != v1->m_AEEffInfo._Myhead )
  {
    do
    {
      v8 = v7->_Next;
      operator delete(v7);
      v7 = v8;
    }
    while ( v8 != v1->m_AEEffInfo._Myhead );
  }
  operator delete(v1->m_AEEffInfo._Myhead);
  v9 = v1->m_spActor.m_pObject;
  if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
    v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
  Effect::~Effect((Effect *)&v1->vfptr);
}
// 9B4F5C: using guessed type int (__stdcall *QuestPigeonEffect::`vftable'{for `IEffectDestroyMessenger'})(int);
// 9B4F74: using guessed type int (__thiscall *QuestPigeonEffect::`vftable'{for `NiRefObject'})(void *p, char);

//----- (00602860) --------------------------------------------------------
void __thiscall QuestPigeonEffect::UpdateAEEff(QuestPigeonEffect *this, float fTime)
{
  QuestPigeonEffect *v2; // esi@1
  unsigned int v3; // eax@2
  NiVBSet *v4; // edi@4
  std::_List_nod<float,std::allocator<float> >::_Node **v5; // eax@5
  std::_List_nod<float,std::allocator<float> >::_Node *v6; // ebx@5
  ActionEffectInfo *v7; // edi@10
  signed __int16 v8; // ax@11
  char *v9; // edi@12
  int v10; // eax@13
  float v11; // ST30_4@13
  __int64 v12; // ST34_8@13
  int v13; // eax@13
  _BYTE v14[12]; // ST10_12@13
  _BYTE v15[12]; // ST04_12@13
  Effect *v16; // edi@13
  NiPoint3 *v17; // eax@16
  float kInfo; // [sp+2Ch] [bp-18h]@10
  ActionEffectInfo *kInfo_8; // [sp+34h] [bp-10h]@10
  std::_List_iterator<std::_List_val<float,std::allocator<float> > > result; // [sp+38h] [bp-Ch]@18
  NiVBSet *val; // [sp+3Ch] [bp-8h]@3
  float fLastTime; // [sp+40h] [bp-4h]@5

  v2 = this;
  if ( this->m_AEEffInfo._Mysize )
  {
    v3 = this->m_curAniEventCode;
    if ( v3 != NiActorManager::INVALID_EVENT_CODE )
    {
      if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
             (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_spActor.m_pObject->m_kSequenceMap,
             v3,
             &val) )
      {
        v4 = val;
        if ( val )
        {
          PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
          v5 = (std::_List_nod<float,std::allocator<float> >::_Node **)v2->m_AEEffInfo._Myhead;
          fLastTime = *(float *)&v4[1].m_uiIndex;
          v6 = *v5;
          if ( (std::_List_nod<float,std::allocator<float> >::_Node **)*v5 != v5 )
          {
            while ( 1 )
            {
              if ( fLastTime >= 0.0 && v4[1].m_uiFlags == 1 )
              {
                v7 = (ActionEffectInfo *)v6[1]._Prev;
                kInfo = v6->_Myval;
                kInfo_8 = (ActionEffectInfo *)v6[1]._Prev;
                if ( *(float *)&v6[1]._Next > (double)fLastTime )
                {
                  if ( (unsigned __int8)LODWORD(v6->_Myval) && v2->m_bLoop )
                    LOBYTE(v6->_Myval) = 0;
                }
                else
                {
                  v8 = Effect::GetCasterHandle((Effect *)&v2->vfptr);
                  CharMgr::GetChar(&g_kCharMgr, v8);
                  if ( v7 )
                  {
                    v9 = v7->GrapicFile;
                    if ( *v9 != 45 )
                    {
                      v10 = ((int (__thiscall *)(QuestPigeonEffect *))v2->vfptr[12].__vecDelDtor)(v2);
                      v11 = -*(float *)v10;
                      *(float *)&v12 = -*(float *)(v10 + 4);
                      *((float *)&v12 + 1) = -*(float *)(v10 + 8);
                      ((void (__thiscall *)(QuestPigeonEffect *))v2->vfptr[8].__vecDelDtor)(v2);
                      v13 = ((int (__thiscall *)(QuestPigeonEffect *))v2->vfptr[8].__vecDelDtor)(v2);
                      *(float *)v14 = v11;
                      *(_QWORD *)&v14[4] = v12;
                      *(_DWORD *)v15 = *(_DWORD *)v13;
                      *(_QWORD *)&v15[4] = *(_QWORD *)(v13 + 4);
                      v16 = EffectMgr::JustCreateEffect(
                              &g_kEffectMgr,
                              v9,
                              *(NiPoint3 *)v15,
                              *(NiPoint3 *)v14,
                              Timer::ms_fCurTime,
                              1);
                      EffectMgr::AttachEffectToWorld(&g_kEffectMgr, v16);
                      v16->vfptr[15].__vecDelDtor((NiRefObject *)v16, LODWORD(Timer::ms_fCurTime));
                    }
                    v7 = kInfo_8;
                  }
                  if ( !LOBYTE(kInfo) )
                  {
                    v17 = (NiPoint3 *)((int (__thiscall *)(QuestPigeonEffect *))v2->vfptr[8].__vecDelDtor)(v2);
                    SoundMgr::CreateSound(&g_kSoundMgr, v7, v17);
                    LOBYTE(v6->_Myval) = 1;
                  }
                  if ( !v2->m_bLoop )
                  {
                    v6 = std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::erase(
                           (std::list<float,std::allocator<float> > *)&v2->m_AEEffInfo,
                           &result,
                           (std::_List_const_iterator<std::_List_val<float,std::allocator<float> > >)v6)->_Ptr;
                    goto LABEL_23;
                  }
                }
              }
              v6 = v6->_Next;
LABEL_23:
              if ( v6 == (std::_List_nod<float,std::allocator<float> >::_Node *)v2->m_AEEffInfo._Myhead )
                return;
              v4 = val;
            }
          }
        }
      }
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00602A60) --------------------------------------------------------
void __thiscall QuestPigeonEffect::CatchAEEff(QuestPigeonEffect *this, bool bForceLoading)
{
  QuestPigeonEffect *v2; // edi@1
  void **v3; // ecx@1
  std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *v4; // eax@1
  std::list<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> > *v5; // ebx@1
  std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *v6; // esi@2
  NiActorManager *v7; // eax@3
  NiTextKeyExtraData *v8; // eax@7
  unsigned int v9; // edi@8
  NiTextKey *v10; // esi@9
  const char *v11; // ecx@9
  const char *v12; // eax@10
  char v13; // dl@11
  unsigned __int16 v14; // ax@14
  ActionEffectInfo *v15; // eax@14
  double v16; // st7@14
  QuestPigeonEffect::EffectInfo kInfo; // [sp+Ch] [bp-1Ch]@14
  unsigned int KeyNum; // [sp+18h] [bp-10h]@9
  Effect *v19; // [sp+1Ch] [bp-Ch]@1
  const char *v20; // [sp+20h] [bp-8h]@10
  NiTextKeyExtraData *pkEx; // [sp+24h] [bp-4h]@5

  v2 = this;
  v19 = (Effect *)this;
  PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  v3 = (void **)&v2->m_AEEffInfo._Myhead->_Next;
  v4 = (std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *)*v3;
  v5 = &v2->m_AEEffInfo;
  *v3 = v3;
  v2->m_AEEffInfo._Myhead->_Prev = v2->m_AEEffInfo._Myhead;
  v2->m_AEEffInfo._Mysize = 0;
  if ( v4 != v2->m_AEEffInfo._Myhead )
  {
    do
    {
      v6 = v4->_Next;
      operator delete(v4);
      v4 = v6;
    }
    while ( v6 != v5->_Myhead );
  }
  v7 = v2->m_spActor.m_pObject;
  if ( v7 )
  {
    if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
           (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v7->m_kSequenceMap,
           v2->m_curAniEventCode,
           (NiVBSet **)&pkEx) )
    {
      if ( pkEx )
      {
        v8 = (NiTextKeyExtraData *)pkEx[1].m_uiNumKeys;
        pkEx = v8;
        if ( v8 )
        {
          v9 = 0;
          if ( v8->m_uiNumKeys )
          {
            do
            {
              v10 = v8->m_pKeys;
              v11 = v10[v9].m_pText;
              KeyNum = v8->m_uiNumKeys;
              if ( v11 )
              {
                v12 = v11;
                v20 = v11 + 1;
                do
                  v13 = *v12++;
                while ( v13 );
                if ( v12 - v20 == 7 && !strncmp("AE", v11, 2u) )
                {
                  v14 = Effect::GetKeyStrToInt(v10[v9].m_pText);
                  v15 = ActionEffectInfoTab::GetByID(v14);
                  v16 = v10[v9].m_fTime;
                  kInfo.pkEffectInfo = v15;
                  kInfo.fTime = v16;
                  kInfo.bPlayed = 0;
                  std::list<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo>>::push_back(
                    v5,
                    &kInfo);
                }
                v8 = pkEx;
              }
              ++v9;
            }
            while ( v9 < KeyNum );
          }
        }
      }
    }
  }
  else
  {
    OutputDebugStringA("QuestPigeon Effect CatchAEEff Fail");
  }
}

//----- (00602BA0) --------------------------------------------------------
void __userpurge QuestPigeonEffect::Update(QuestPigeonEffect *this@<ecx>, float a2@<edi>, float fTime)
{
  QuestPigeonEffect *v3; // esi@1
  signed __int16 v4; // ax@1
  Char *v5; // eax@1
  Char *v6; // edi@1
  void *(__thiscall *v7)(NiRefObject *, unsigned int); // edx@2
  int v8; // eax@2
  double v9; // st6@2
  double v10; // st7@4
  NiRefObjectVtbl *v11; // eax@4
  double v12; // st7@10
  double v13; // st6@10
  double v14; // st7@10
  double v15; // st5@11
  double v16; // st7@12
  void *(__thiscall *v17)(NiRefObject *, unsigned int); // eax@17
  int v18; // eax@17
  float v19; // ecx@17
  float v20; // edx@17
  float v21; // eax@17
  void *(__thiscall *v22)(NiRefObject *, unsigned int); // edx@17
  double v23; // st7@18
  float v24; // ST0C_4@20
  NiPoint3 *v25; // eax@20
  float v26; // edx@20
  NiRefObjectVtbl *v27; // eax@20
  double v28; // st7@21
  NiRefObjectVtbl *v29; // eax@21
  char v30; // al@21
  unsigned int v31; // edi@21
  PgFrameWork *v32; // eax@23
  GameFrameWork *v33; // edi@23
  char v34; // al@25
  NiTListItem<NiPointer<Effect> > *v35; // esi@28
  void *(__thiscall *v36)(NiRefObject *, unsigned int); // eax@29
  float fValue; // [sp+Ch] [bp-74h]@1
  NiPoint3 result; // [sp+14h] [bp-6Ch]@20
  NiPoint3 NewPos; // [sp+20h] [bp-60h]@17
  NiPoint3 kO; // [sp+2Ch] [bp-54h]@17
  NiPoint3 kPos; // [sp+38h] [bp-48h]@2
  NiPoint3 kD; // [sp+44h] [bp-3Ch]@2
  NiVBSet *val; // [sp+50h] [bp-30h]@17
  float fAngle; // [sp+54h] [bp-2Ch]@1
  NiMatrix3 kMat; // [sp+58h] [bp-28h]@20

  v3 = this;
  fValue = a2;
  fAngle = fTime - this->m_fLastUpdateTime;
  this->m_fLastUpdateTime = fTime;
  this->m_fAngle = fAngle * 7.0 + this->m_fAngle;
  v4 = Effect::GetCasterHandle((Effect *)&this->vfptr);
  v5 = CharMgr::GetChar(&g_kCharMgr, v4);
  v6 = v5;
  if ( !v5 )
    goto LABEL_28;
  ((void (__thiscall *)(Char *, NiPoint3 *, _DWORD))v5->vfptr[6].SetAbStateProperty)(v5, &kPos, LODWORD(fValue));
  v7 = v3->vfptr[8].__vecDelDtor;
  kPos.z = kPos.z + 70.0;
  v8 = ((int (__thiscall *)(QuestPigeonEffect *))v7)(v3);
  kD.x = kPos.x - *(float *)v8;
  kD.y = kPos.y - *(float *)(v8 + 4);
  kD.z = kPos.z - *(float *)(v8 + 8);
  fAngle = kD.y * kD.y + kD.x * kD.x + kD.z * kD.z;
  fAngle = sqrt(fAngle);
  v9 = fAngle;
  if ( fAngle < 5.0 )
  {
    if ( v3->m_eState == STATE_LETTER_FLY )
    {
      v6->vfptr[6].~AbStateInfectee((AbStateInfectee *)v6);
      v10 = *(float *)(((int (__thiscall *)(QuestPigeonEffect *))v3->vfptr[8].__vecDelDtor)(v3) + 8);
      v11 = v3->vfptr;
      kPos.z = v10;
      v11[7].__vecDelDtor((NiRefObject *)v3, (unsigned int)&kPos);
      if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
             (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v3->m_spActor.m_pObject->m_kSequenceMap,
             0x7A508u,
             (NiVBSet **)&fAngle)
        && fAngle != 0.0 )
      {
        *(float *)(LODWORD(fAngle) + 72) = -3.4028235e38;
      }
      NiActorManager::SetTargetAnimation(v3->m_spActor.m_pObject, 0x7A508u);
      v3->m_bLoop = 0;
      v3->m_eState = 1;
      v3->m_curAniEventCode = 501000;
      QuestPigeonEffect::CatchAEEff(v3, 0);
      goto LABEL_28;
    }
    goto LABEL_21;
  }
  if ( v3->m_eState )
  {
LABEL_21:
    v28 = *(float *)(((int (__thiscall *)(QuestPigeonEffect *))v3->vfptr[8].__vecDelDtor)(v3) + 8);
    v29 = v3->vfptr;
    kPos.z = v28;
    ((void (__thiscall *)(QuestPigeonEffect *))v29[7].__vecDelDtor)(v3);
    v30 = NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
            (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v3->m_spActor.m_pObject->m_kSequenceMap,
            0x7A508u,
            &val);
    v31 = v30 != 0 ? (unsigned int)val : 0;
    if ( *(v30 != 0 ? &val[1].m_uiFlags : 68) == 1 )
    {
      PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( *(float *)(v31 + 48) == *(float *)(v31 + 60) )
      {
        v3->m_curAniEventCode = NiActorManager::INVALID_EVENT_CODE;
        v32 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
        v33 = (GameFrameWork *)v32;
        if ( v32 )
        {
          if ( v32[28].m_BackFrameID )
          {
            v34 = User::Lv(&g_kUser);
            if ( QuestNewsWin::CheckNewQuest(v34) )
              GameFrameWork::OpenQuestNewsWin(v33);
          }
        }
        v3->m_eState = 2;
      }
    }
    goto LABEL_28;
  }
  if ( v9 <= 50.0 )
  {
    fAngle = v3->m_fHighSpeed * 0.8999999761581421;
    v15 = fAngle;
    v3->m_fHighSpeed = fAngle;
    if ( v15 >= 5.0 )
    {
      v16 = v9;
    }
    else
    {
      v16 = v9;
      v3->m_fHighSpeed = 5.0;
    }
    v14 = v16 - v3->m_fHighSpeed;
  }
  else
  {
    v12 = fAngle;
    fAngle = (v3->m_fLastUpdateTime - v3->m_fStartTime) * 2.200000047683716;
    v13 = fAngle;
    v3->m_fHighSpeed = fAngle;
    v14 = v12 - v13;
  }
  fAngle = v14;
  if ( fAngle < 0.0 )
    fAngle = 0.0;
  *(double *)&kD.y = kPos.x;
  *(float *)&val = -v3->m_fAngle * 0.01745329238474369;
  *(float *)&val = cos(*(float *)&val);
  NewPos.x = kPos.x - *(float *)&val * fAngle;
  *(double *)&kD.y = kPos.y;
  *(float *)&val = v3->m_fAngle * 0.01745329238474369;
  *(float *)&val = sin(*(float *)&val);
  v17 = v3->vfptr[8].__vecDelDtor;
  NewPos.y = kPos.y - *(float *)&val * fAngle;
  NewPos.z = kPos.z;
  v18 = ((int (__thiscall *)(QuestPigeonEffect *))v17)(v3);
  v19 = *(float *)v18;
  v20 = *(float *)(v18 + 4);
  v21 = *(float *)(v18 + 8);
  kO.y = v20;
  v22 = v3->vfptr[7].__vecDelDtor;
  kO.z = v21;
  kO.x = v19;
  v22((NiRefObject *)&v3->vfptr, (unsigned int)&NewPos);
  kD.x = NewPos.x - kO.x;
  kD.y = NewPos.y - kO.y;
  kD.z = 0.0;
  NiPoint3::Unitize(&kD);
  kO.x = 0.0;
  kO.y = -1.0;
  kO.z = 0.0;
  fAngle = kD.x * 0.0 - 1.0 * kD.y + kD.z * 0.0;
  *(float *)&val = kD.y * 0.0 - kD.x * -1.0;
  if ( *(float *)&val <= 0.0 )
    v23 = NiACos(fAngle);
  else
    v23 = -NiACos(fAngle);
  v24 = v23;
  NiMatrix3::MakeZRotation(&kMat, v24);
  v25 = NiMatrix3::operator*(&kMat, &result, &kO);
  kD.x = v25->x;
  kD.y = v25->y;
  v26 = v25->z;
  v27 = v3->vfptr;
  kD.z = v26;
  ((void (__thiscall *)(QuestPigeonEffect *))v27[10].__vecDelDtor)(v3);
LABEL_28:
  NiActorManager::Update(v3->m_spActor.m_pObject, fTime);
  QuestPigeonEffect::UpdateAEEff(v3, fTime);
  v35 = v3->m_kChildList.m_pkHead;
  while ( v35 )
  {
    v36 = v35->m_element.m_pObject->vfptr[14].__vecDelDtor;
    v35 = v35->m_pkNext;
    ((void (__stdcall *)(_DWORD))v36)(LODWORD(fTime));
  }
}
// 602BA0: could not find valid save-restore pair for edi

//----- (00603000) --------------------------------------------------------
void __userpurge QuestPigeonEffect::Start(QuestPigeonEffect *this@<ecx>, int a2@<ebx>, float fTime)
{
  QuestPigeonEffect *v3; // esi@1
  double v4; // st7@3
  float _fTime; // ST04_4@3
  NiTListItem<NiPointer<Effect> > *v6; // edi@3
  void *(__thiscall *v7)(NiRefObject *, unsigned int); // edx@4
  float v8; // eax@6
  PgFrameWork *v9; // eax@7
  GameFrameWork *v10; // esi@7
  char v11; // al@9

  v3 = this;
  QuestPigeonEffect::SetStartPos(this, a2);
  if ( !v3->m_bIsSucceedSettingStartPos )
    ((void (__thiscall *)(QuestPigeonEffect *))v3->vfptr[16].__vecDelDtor)(v3);
  v4 = fTime;
  v3->m_fStartTime = fTime;
  _fTime = v4;
  EffectCtrl::Start(&v3->m_kCtrl, _fTime);
  CDecalEffect::Start(&v3->m_kDecalEffect, fTime);
  v6 = v3->m_kChildList.m_pkHead;
  v3->m_fLastUpdateTime = fTime;
  while ( v6 )
  {
    v7 = v6->m_element.m_pObject->vfptr[15].__vecDelDtor;
    v6 = v6->m_pkNext;
    ((void (__stdcall *)(_DWORD))v7)(LODWORD(fTime));
  }
  if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
         (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v3->m_spActor.m_pObject->m_kSequenceMap,
         0x31510u,
         (NiVBSet **)&fTime) )
  {
    v8 = fTime;
    if ( fTime != 0.0 )
    {
      *(_DWORD *)(LODWORD(fTime) + 36) = 0;
      *(float *)(LODWORD(v8) + 72) = -3.4028235e38;
      NiActorManager::SetTargetAnimation(v3->m_spActor.m_pObject, 0x31510u);
      v3->m_eState = 0;
      v3->m_curAniEventCode = 202000;
      v3->m_bLoop = 1;
      QuestPigeonEffect::CatchAEEff(v3, 0);
      v9 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      v10 = (GameFrameWork *)v9;
      if ( v9 )
      {
        if ( v9[28].m_BackFrameID )
        {
          v11 = User::Lv(&g_kUser);
          if ( QuestNewsWin::CheckNewQuest(v11) )
            GameFrameWork::OpenQuestNewsWin(v10);
        }
      }
    }
  }
}

//----- (00603120) --------------------------------------------------------
void __thiscall Effect::SetDefaultEffect(Effect *this, NiNode *pkNode)
{
  Effect *v2; // esi@1

  v2 = this;
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&this->m_spDefaultEffect.m_pObject->m_kChildren);
  if ( pkNode )
    ((void (__stdcall *)(_DWORD, _DWORD))v2->m_spDefaultEffect.m_pObject->vfptr[29].__vecDelDtor)(pkNode, 0);
}

//----- (00603150) --------------------------------------------------------
std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *__stdcall std::_List_val<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo>>::_Buynode(std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *_Next, std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *_Prev, QuestPigeonEffect::EffectInfo *_Val)
{
  std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *result; // eax@1
  std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *v5; // edx@2
  std::exception pExceptionObject; // [sp+0h] [bp-Ch]@5

  result = (std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *)operator new(0x14u);
  if ( !result )
  {
    _Next = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Next);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v5 = _Prev;
  result->_Next = _Next;
  result->_Prev = v5;
  if ( result != (std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *)-8 )
    result->_Myval = *_Val;
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (006031C0) --------------------------------------------------------
NiRTTI *QuestPigeonEffect::GetRTTI()
{
  return &QuestPigeonEffect::m_RTTI;
}

//----- (006031D0) --------------------------------------------------------
bool __thiscall QuestPigeonEffect::IsEnd(QuestPigeonEffect *this, float fTime)
{
  return fTime - this->m_fStartTime > 60.0 || this->m_eState == 2;
}

//----- (00603200) --------------------------------------------------------
QuestPigeonEffect *__thiscall QuestPigeonEffect::`vector deleting destructor'(char *this, unsigned int a2)
{
  return QuestPigeonEffect::`vector deleting destructor'((QuestPigeonEffect *)(this - 8), a2);
}

//----- (00603210) --------------------------------------------------------
NiPoint3 *__thiscall Effect::GetDir(Effect *this)
{
  return &this->m_kDir;
}

//----- (00603220) --------------------------------------------------------
Effect *__thiscall Effect::Clone(Effect *this)
{
  Effect *v1; // edi@1
  Effect *v2; // eax@1
  int v3; // esi@1
  int v4; // eax@2

  v1 = this;
  v2 = (Effect *)operator new(0x20Cu);
  v3 = 0;
  if ( v2 )
  {
    Effect::Effect(v2, 0, 0, 0);
    v3 = v4;
  }
  ((void (__cdecl *)(int))v1->vfptr[22].__vecDelDtor)(v3);
  return (Effect *)v3;
}

//----- (00603290) --------------------------------------------------------
double __thiscall Effect::GetLifeTime(Effect *this)
{
  return this->m_fLifeTime;
}

//----- (006032A0) --------------------------------------------------------
void __thiscall Effect::SetLifeTime(Effect *this, float fLifeTime)
{
  this->m_fLifeTime = fLifeTime;
}

//----- (006032B0) --------------------------------------------------------
void __thiscall Effect::Stop(Effect *this)
{
  this->m_bStopFlag = 1;
}

//----- (006032C0) --------------------------------------------------------
void __thiscall Effect::DeleteEffectDestoryMessengerList(Effect *this)
{
  Effect *v1; // edi@1
  IEffectDestroyMessengerVtbl *v2; // esi@2
  void (__thiscall *v3)(IEffectDestroyMessenger *, Effect *); // ecx@3

  v1 = this;
  if ( this->m_pkEffectDestoryMessengerList.m_pkHead )
  {
    v2 = this->vfptr;
    while ( v2 )
    {
      v3 = v2->OnEffectDestory;
      v2 = (IEffectDestroyMessengerVtbl *)v2->__vecDelDtor;
      if ( v3 )
        (*(void (__stdcall **)(_DWORD))(*(_DWORD *)v3 + 8))(&v1[-1].m_fAccumulate);
    }
    NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *>::RemoveAll((NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *> *)&v1->m_uiRefCount);
  }
}

//----- (00603300) --------------------------------------------------------
void __thiscall Effect::SetShow(Effect *this, bool _bShow)
{
  NiNode *v2; // eax@1
  NiNode *v3; // eax@5
  NiNode *v4; // eax@9

  v2 = this->m_spNode.m_pObject;
  if ( v2 )
  {
    if ( _bShow )
      v2->m_uFlags &= 0xFFFEu;
    else
      v2->m_uFlags |= 1u;
    v3 = this->m_spDefaultEffect.m_pObject;
    if ( v3 )
    {
      if ( _bShow )
        v3->m_uFlags &= 0xFFFEu;
      else
        v3->m_uFlags |= 1u;
    }
    v4 = this->m_spDecalEffect.m_pObject;
    if ( v4 )
    {
      if ( _bShow )
        v4->m_uFlags &= 0xFFFEu;
      else
        v4->m_uFlags |= 1u;
    }
  }
}

//----- (00603360) --------------------------------------------------------
void __thiscall Effect::SetRootNode(Effect *this, NiNode *pkNode)
{
  Effect *v2; // ebx@1
  NiNode *v3; // esi@2

  v2 = this;
  if ( pkNode )
  {
    v3 = this->m_spNode.m_pObject;
    if ( v3 != pkNode )
    {
      if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
      v2->m_spNode.m_pObject = pkNode;
      InterlockedIncrement((volatile LONG *)&pkNode->m_uiRefCount);
    }
    EffectCtrl::SetEffectNode(&v2->m_kCtrl, (NiAVObject *)&pkNode->vfptr);
  }
}

//----- (006033C0) --------------------------------------------------------
void __thiscall Effect::SetPos(Effect *this, NiPoint3 *kPos)
{
  NiNode *v2; // eax@1

  v2 = this->m_spDefaultEffect.m_pObject;
  if ( v2 )
    v2->m_kLocal.m_Translate = *kPos;
}

//----- (006033F0) --------------------------------------------------------
NiPoint3 *__thiscall Effect::GetPos(Effect *this)
{
  NiNode *v1; // eax@1
  NiPoint3 *result; // eax@2

  v1 = this->m_spDefaultEffect.m_pObject;
  if ( v1 )
    result = &v1->m_kLocal.m_Translate;
  else
    result = (NiPoint3 *)&Effect::ms_kOnePos;
  return result;
}

//----- (00603410) --------------------------------------------------------
NiPoint3 *__thiscall Effect::GetWorldPos(Effect *this)
{
  NiNode *v1; // eax@1
  NiPoint3 *result; // eax@2

  v1 = this->m_spDefaultEffect.m_pObject;
  if ( v1 )
    result = &v1->m_kWorld.m_Translate;
  else
    result = (NiPoint3 *)&Effect::ms_kOnePos;
  return result;
}

//----- (00603430) --------------------------------------------------------
void __thiscall Effect::SetRealDir(Effect *this, NiPoint3 *kDir)
{
  Effect *v2; // esi@1
  bool v3; // zf@1
  NiMatrix3 kRot; // [sp+4h] [bp-28h]@2

  v2 = this;
  v3 = this->m_spDefaultEffect.m_pObject == 0;
  this->m_kDir = *kDir;
  if ( !v3 )
  {
    NpNs_RotateModelToDirVector(kDir, &kRot);
    qmemcpy(&v2->m_spDefaultEffect.m_pObject->m_kLocal, &kRot, 0x24u);
  }
}

//----- (00603490) --------------------------------------------------------
void __thiscall Effect::SetDir(Effect *this, NiPoint3 *kDir)
{
  Effect *v2; // esi@1
  bool v3; // zf@1
  NiMatrix3 kRot; // [sp+4h] [bp-28h]@2

  v2 = this;
  v3 = this->m_spDefaultEffect.m_pObject == 0;
  this->m_kDir = *kDir;
  if ( !v3 )
  {
    NpNs_RotateModelZToVector(kDir, &kRot);
    qmemcpy(&v2->m_spDefaultEffect.m_pObject->m_kLocal, &kRot, 0x24u);
  }
}

//----- (006034F0) --------------------------------------------------------
void __thiscall Effect::CopyMember(Effect *this, Effect *pkEffect)
{
  Effect *v2; // edi@1
  NiNode *v3; // ecx@1
  NiRefObjectVtbl *v4; // ebx@2
  NiObject *v5; // eax@2
  bool v6; // al@3

  v2 = this;
  v3 = this->m_spNode.m_pObject;
  if ( v3 )
  {
    v4 = pkEffect->vfptr;
    v5 = NiObject::Clone((NiObject *)&v3->vfptr);
    v4[3].__vecDelDtor((NiRefObject *)pkEffect, (unsigned int)v5);
  }
  pkEffect->m_fLifeTime = v2->m_fLifeTime;
  v6 = v2->m_bCreateProgramEff;
  pkEffect->m_bCreateProgramEff = v6;
  if ( v6 )
    Effect::CreateProgramEff(pkEffect);
}

//----- (00603530) --------------------------------------------------------
void __thiscall Effect::RegisterEffectMessenger(Effect *this, IEffectDestroyMessenger *pkMessenger)
{
  char *v2; // esi@2
  int v3; // eax@2
  int *v4; // ecx@2

  if ( pkMessenger )
  {
    v2 = (char *)&this->m_uiRefCount;
    v3 = (*(int (__thiscall **)(_DWORD))(this->m_uiRefCount + 4))(&this->m_uiRefCount);
    *(_DWORD *)(v3 + 8) = pkMessenger;
    *(_DWORD *)v3 = 0;
    *(_DWORD *)(v3 + 4) = *((_DWORD *)v2 + 2);
    v4 = (int *)*((_DWORD *)v2 + 2);
    if ( v4 )
    {
      *v4 = v3;
      ++*((_DWORD *)v2 + 3);
      *((_DWORD *)v2 + 2) = v3;
    }
    else
    {
      ++*((_DWORD *)v2 + 3);
      *((_DWORD *)v2 + 1) = v3;
      *((_DWORD *)v2 + 2) = v3;
    }
  }
}

//----- (00603580) --------------------------------------------------------
void __thiscall Effect::SetDecalEffect(Effect *this, NiNode *pkNode)
{
  Effect *v2; // esi@1

  v2 = this;
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&this->m_spDecalEffect.m_pObject->m_kChildren);
  if ( pkNode )
    ((void (__stdcall *)(_DWORD, _DWORD))v2->m_spDecalEffect.m_pObject->vfptr[29].__vecDelDtor)(pkNode, 0);
}

//----- (006035B0) --------------------------------------------------------
QuestPigeonEffect *__thiscall QuestPigeonEffect::`vector deleting destructor'(QuestPigeonEffect *this, unsigned int a2)
{
  QuestPigeonEffect *v2; // esi@1

  v2 = this;
  QuestPigeonEffect::~QuestPigeonEffect(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006035E0) --------------------------------------------------------
void __thiscall std::list<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo>>::push_back(std::list<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> > *this, QuestPigeonEffect::EffectInfo *_Val)
{
  std::list<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> > *v2; // esi@1
  std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *v3; // edi@1
  std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *v4; // eax@1
  unsigned int v5; // ecx@1

  v2 = this;
  v3 = this->_Myhead;
  v4 = std::_List_val<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo>>::_Buynode(
         this->_Myhead,
         this->_Myhead->_Prev,
         _Val);
  v5 = v2->_Mysize;
  if ( 357913940 - v5 < 1 )
    std::_Xlength_error("list<T> too long");
  v2->_Mysize = v5 + 1;
  v3->_Prev = v4;
  v4->_Prev->_Next = v4;
}

//----- (00603630) --------------------------------------------------------
void __thiscall QuestStartItemWin::QuestStartItemWin(QuestStartItemWin *this)
{
  QuestStartItemWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_kQuestID = -1;
  v1->vfptr = (NiRefObjectVtbl *)&QuestStartItemWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&QuestStartItemWin::`vftable'{for `IDirectMessenger'};
}
// 9B5318: using guessed type void (__thiscall *QuestStartItemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B5334: using guessed type int (__thiscall *QuestStartItemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00603660) --------------------------------------------------------
void __thiscall QuestStartItemWin::~QuestStartItemWin(QuestStartItemWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&QuestStartItemWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&QuestStartItemWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9B5318: using guessed type void (__thiscall *QuestStartItemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B5334: using guessed type int (__thiscall *QuestStartItemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00603680) --------------------------------------------------------
void __thiscall QuestStartItemWin::UpdateMeWin(QuestStartItemWin *this, float fCurTime)
{
  QuestStartItemWin *v2; // esi@1

  v2 = this;
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
    GameFrameWork::UpdateUIScroll(v2->m_pListWinContent, v2->m_pSlideBarContent);
}

//----- (006036B0) --------------------------------------------------------
void __thiscall QuestStartItemWin::SetRewardWin(QuestStartItemWin *this, RewardWin *pkWin)
{
  QuestStartItemWin *v2; // esi@1
  NiRefObjectVtbl *v3; // edi@2
  int v4; // eax@2
  RewardWin *v5; // ecx@2
  NiRefObjectVtbl *v6; // edi@2
  int v7; // ebx@2
  int v8; // ebx@2
  int v9; // eax@2

  v2 = this;
  this->m_pkRewardWin = pkWin;
  if ( pkWin )
  {
    ((void (__stdcall *)(_DWORD, _DWORD))this->vfptr[29].__vecDelDtor)(pkWin, 0);
    v3 = v2->m_pkRewardWin->vfptr;
    v4 = ((int (*)(void))v2->m_pListWinContent->vfptr[41].__vecDelDtor)();
    v3[43].__vecDelDtor((NiRefObject *)v2->m_pkRewardWin, v4);
    v5 = v2->m_pkRewardWin;
    v6 = v5->vfptr;
    v7 = 8 - ((int (*)(void))v5->vfptr[37].__vecDelDtor)();
    v8 = ((int (*)(void))v2->m_pListWinContent->vfptr[42].__vecDelDtor)() + v7;
    v9 = ((int (*)(void))v2->m_pListWinContent->vfptr[37].__vecDelDtor)();
    v6[44].__vecDelDtor((NiRefObject *)v2->m_pkRewardWin, v8 + v9);
    v2->m_pkRewardWin->vfptr[130].__vecDelDtor((NiRefObject *)v2->m_pkRewardWin, 0);
  }
}

//----- (00603760) --------------------------------------------------------
void __thiscall QuestStartItemWin::OnShowWin(QuestStartItemWin *this)
{
  PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
}

//----- (00603770) --------------------------------------------------------
void QuestStartItemWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "QuestWin_QuickStart");
}

//----- (006037A0) --------------------------------------------------------
void __thiscall QuestStartItemWin::UpDateContentSideBar(QuestStartItemWin *this)
{
  QuestStartItemWin *v1; // esi@1
  SlideBar *v2; // ecx@1
  SlideListWin *v3; // eax@2
  int v4; // edi@3
  SlideBar *v5; // eax@3
  RewardWin *v6; // esi@3

  v1 = this;
  v2 = this->m_pSlideBarContent;
  if ( v2 )
  {
    v3 = v1->m_pListWinContent;
    if ( v3 )
    {
      SlideBar::SetSplitCnt(v2, v3->m_nSlideSplitCnt);
      v4 = v1->m_pSlideBarContent->m_nCurPos;
      v1->m_pListWinContent->m_nViewStartPos = v4;
      SlideListWin::UpdateViewList(v1->m_pListWinContent);
      v5 = v1->m_pSlideBarContent;
      v6 = v1->m_pkRewardWin;
      if ( v4 + 1 == v5->m_nSplitCnt )
      {
        if ( v6 )
          v6->m_uFlags &= 0xFFFEu;
      }
      else if ( v6 )
      {
        v6->m_uFlags |= 1u;
      }
    }
  }
}

//----- (00603820) --------------------------------------------------------
void __thiscall QuestStartItemWin::ResetViewPoint(QuestStartItemWin *this)
{
  QuestStartItemWin *v1; // esi@1

  v1 = this;
  SlideBar::SetSplitCnt(this->m_pSlideBarContent, 0);
  v1->m_pListWinContent->m_nSlideSplitCnt = 0;
  v1->m_pListWinContent->m_nViewStartPos = 0;
  SlideListWin::UpdateViewList(v1->m_pListWinContent);
}

//----- (00603860) --------------------------------------------------------
void __thiscall QuestStartItemWin::OnCommand(QuestStartItemWin *this, unsigned int wParam, int lParam)
{
  QuestStartItemWin *v3; // esi@1
  PgFrameWork *v4; // ebx@1
  RewardWin *v5; // eax@2
  void *(__thiscall *v6)(NiRefObject *, unsigned int); // edx@2
  void (__thiscall ***v7)(_DWORD, _DWORD); // edi@3
  void (__thiscall ***v8)(_DWORD, _DWORD); // edi@10
  GameFrameWork *v9; // eax@16
  int v10; // [sp-4h] [bp-14h]@1
  int v11; // [sp+8h] [bp-8h]@9
  int v12; // [sp+Ch] [bp-4h]@2

  v3 = this;
  v4 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  switch ( wParam )
  {
    case 0u:
      v5 = v3->m_pkRewardWin;
      v6 = v3->vfptr[30].__vecDelDtor;
      v3->m_kQuestID = -1;
      ((void (__thiscall *)(QuestStartItemWin *, int *, RewardWin *, int))v6)(v3, &v12, v5, v10);
      if ( v12 )
      {
        v7 = (void (__thiscall ***)(_DWORD, _DWORD))v12;
        if ( !InterlockedDecrement((volatile LONG *)(v12 + 4)) )
        {
          if ( v7 )
            (**v7)(v7, 1);
        }
      }
      if ( v4 )
        CQuestWin2::SetRewardWin((CQuestWin2 *)v4[21].m_kMsgQ.m_uiAlloced, (RewardWin *)v4[16].m_kMsgQ.m_uiAlloced);
      goto LABEL_15;
    case 1u:
      QuestStartItemWin::UpDateContentSideBar(v3);
      break;
    case 2u:
      LOWORD(wParam) = v3->m_kQuestID;
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x11u, 0x14u, &wParam, 2);
      ((void (__thiscall *)(QuestStartItemWin *, int *, RewardWin *, int))v3->vfptr[30].__vecDelDtor)(
        v3,
        &v11,
        v3->m_pkRewardWin,
        v10);
      if ( v11 )
      {
        v8 = (void (__thiscall ***)(_DWORD, _DWORD))v11;
        if ( !InterlockedDecrement((volatile LONG *)(v11 + 4)) )
        {
          if ( v8 )
            (**v8)(v8, 1);
        }
      }
      if ( v4 )
        CQuestWin2::SetRewardWin((CQuestWin2 *)v4[21].m_kMsgQ.m_uiAlloced, (RewardWin *)v4[16].m_kMsgQ.m_uiAlloced);
LABEL_15:
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
      break;
    case 3u:
      v9 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v9 )
        GameFrameWork::OpenPlayGuideSearchList(v9, "QuestWin_QuickStart");
      break;
    default:
      return;
  }
}

//----- (006039C0) --------------------------------------------------------
void __thiscall QuestStartItemWin::SetQuestContentText(QuestStartItemWin *this, unsigned int hQuestID, const char *szText)
{
  CClientQuest *v3; // eax@1
  signed int i; // eax@1
  char *v5; // ebx@3
  QuestStartItemWin *v6; // eax@3
  SlideListWin *v7; // eax@3
  int v8; // ecx@3
  ColumnBut **v9; // edx@5
  PgWinText *v10; // eax@6
  CSpFont *v11; // esi@9
  double v12; // st7@10
  char *j; // esi@10
  double v14; // st7@14
  PgFont *pkFont; // [sp+18h] [bp-3A8h]@9
  DialogParser::TokenDetail kDetail; // [sp+1Ch] [bp-3A4h]@1
  QuestStartItemWin *v17; // [sp+24h] [bp-39Ch]@1
  QuestDialogParser kParser; // [sp+28h] [bp-398h]@1
  PgWinText *pkTestWin; // [sp+2Ch] [bp-394h]@4
  CSpFont font; // [sp+30h] [bp-390h]@1
  char szTemp2[256]; // [sp+1B0h] [bp-210h]@1
  char szTemp[256]; // [sp+2B0h] [bp-110h]@1
  int v23; // [sp+3BCh] [bp-4h]@1

  v17 = this;
  CSpFont::CSpFont(&font);
  v23 = 0;
  szTemp[0] = 0;
  memset(&szTemp[1], 0, 0xFFu);
  szTemp2[0] = 0;
  memset(&szTemp2[1], 0, 0xFFu);
  DialogParser::DialogParser((DialogParser *)&kParser.m_pcCurrentStr);
  v3 = QuestDataMgr::GetQuest();
  QuestDialogParser::StartParsing(&kParser, (CQuest *)&v3->vfptr, hQuestID);
  for ( i = DialogParser::Parse((DialogParser *)&kParser.m_pcCurrentStr, &kDetail);
        i != 11;
        i = DialogParser::Parse((DialogParser *)&kParser.m_pcCurrentStr, &kDetail) )
  {
    if ( !i )
    {
      v5 = fs(0);
      strncpy(v5, kDetail.kNormal.pcNormalStr, kDetail.kNormal.iLength);
      v6 = v17;
      v5[kDetail.kNormal.iLength] = 0;
      v7 = v6->m_pListWinContent;
      v8 = v7->m_vecButList._Mylast - v7->m_vecButList._Myfirst;
      if ( v8 )
      {
        v9 = v7->m_vecButList._Myfirst;
        v10 = (*v9)->m_vecTextWin._Mylast - (*v9)->m_vecTextWin._Myfirst ? *(*v9)->m_vecTextWin._Myfirst : 0;
        pkTestWin = v10;
        v8 = (int)v10;
      }
      else
      {
        pkTestWin = 0;
      }
      v11 = *(CSpFont **)(*(_DWORD *)(v8 + 288) + 312);
      pkFont = (PgFont *)v11;
      if ( v11 )
      {
        v12 = (double)(unsigned int)(*(int (**)(void))(*(_DWORD *)v8 + 144))() / 1.049999952316284;
        for ( j = CSpFont::SplitStrByPixelSize(v11, v5, (signed int)v12, 0);
              j;
              j = CSpFont::SplitStrByPixelSize((CSpFont *)&pkFont->vfptr, j, (signed int)v14, 0) )
        {
          strncpy(szTemp, v5, j - v5);
          szTemp[j - v5] = 0;
          if ( szText )
            sprintf(szTemp2, "%s%s", szText, szTemp);
          else
            sprintf(szTemp2, "%s", szTemp);
          SlideListWin::AddText(v17->m_pListWinContent, szTemp2);
          v5 = j;
          v14 = (double)(unsigned int)((int (*)(void))pkTestWin->vfptr[36].__vecDelDtor)() / 1.049999952316284;
        }
      }
    }
  }
  v23 = -1;
  CSpFont::~CSpFont(&font);
}

//----- (00603C80) --------------------------------------------------------
QuestStartItemWin *__cdecl QuestStartItemWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  QuestStartItemWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x168u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&QuestStartItemWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&QuestStartItemWin::`vftable'{for `IDirectMessenger'};
    LOWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][1]) = -1;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (QuestStartItemWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9B5318: using guessed type void (__thiscall *QuestStartItemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B5334: using guessed type int (__thiscall *QuestStartItemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00603DD0) --------------------------------------------------------
void __thiscall QuestStartItemWin::SetQuestInfo(QuestStartItemWin *this, unsigned __int16 qID)
{
  QuestStartItemWin *v2; // edi@1
  SlideListWin *v3; // ecx@1
  PgFrameWork *v4; // eax@1
  GameFrameWork *v5; // ecx@3
  CClientQuest *v6; // eax@3
  CQuestData *v7; // ebx@4
  QUEST_DATA *v8; // eax@5
  SlideListWin *v9; // ecx@5
  QUEST_DATA *v10; // esi@5
  NiUnsharedGeometryGroup *v11; // eax@5
  NiUnsharedGeometryGroup *v12; // eax@5
  int v13; // ebx@7
  int v14; // esi@12
  int v15; // edi@12
  int v16; // eax@13
  int v17; // ecx@16
  int v18; // ST10_4@19
  NiUnsharedGeometryGroup *v19; // eax@19
  int v20; // esi@20
  int v21; // edi@20
  int v22; // eax@21
  int v23; // edx@24
  int v24; // ST10_4@27
  NiUnsharedGeometryGroup *v25; // eax@27
  int v26; // esi@28
  int v27; // edi@28
  int v28; // eax@29
  int v29; // ecx@32
  signed int v30; // esi@35
  MobViewInfo *v31; // eax@39
  char v32; // cl@40
  int v33; // esi@50
  int v34; // edi@52
  int v35; // ebx@52
  int v36; // edi@53
  int v37; // edx@56
  int v38; // eax@59
  QUEST_DATA *v39; // esi@60
  NiUnsharedGeometryGroup *v40; // eax@61
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v41; // eax@62
  signed int v42; // edi@63
  unsigned __int16 *v43; // esi@63
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v44; // eax@66
  NiUnsharedGeometryGroup *v45; // eax@68
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v46; // esi@68
  int v47; // edi@69
  int v48; // ebx@69
  int v49; // eax@70
  int v50; // ecx@73
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v51; // eax@77
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *j; // eax@78
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *i; // eax@81
  const char *v54; // eax@86
  QuestStartItemWin *v55; // esi@88
  NiUnsharedGeometryGroup *v56; // eax@88
  RewardWin *v57; // esi@88
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v58; // ecx@92
  std::exception pExceptionObject; // [sp+10h] [bp-15Ch]@94
  std::set<unsigned short,std::less<unsigned short>,std::allocator<unsigned short> > setNpcID; // [sp+1Ch] [bp-150h]@62
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > >,bool> result; // [sp+2Ch] [bp-140h]@7
  QUEST_DATA *lpQuest; // [sp+34h] [bp-138h]@5
  PLAYER_QUEST_INFO *pPlayerQuestInfo; // [sp+38h] [bp-134h]@5
  QuestStartItemWin *v64; // [sp+3Ch] [bp-130h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strNpc; // [sp+40h] [bp-12Ch]@68
  char szTemp[256]; // [sp+5Ch] [bp-110h]@5
  int v67; // [sp+168h] [bp-4h]@63

  v2 = this;
  v3 = this->m_pListWinContent;
  v64 = v2;
  SlideListWin::RemoveAllList(v3);
  v4 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v4 )
    QuestStartItemWin::SetRewardWin(v2, (RewardWin *)v4[16].m_kMsgQ.m_uiAlloced);
  v5 = (GameFrameWork *)v2->m_pkFrameWork;
  v2->m_kQuestID = qID;
  GameFrameWork::SetRewardWinQuestID(v5, qID);
  v6 = QuestDataMgr::GetQuest();
  if ( v6 )
  {
    v7 = v6->m_pQuestData;
    if ( v7 )
    {
      pPlayerQuestInfo = CQuest::GetQuestInfo((CQuest *)&v6->vfptr, qID);
      v8 = CQuestData::GetQuestData(v7, qID);
      v9 = v2->m_pListWinContent;
      v10 = v8;
      lpQuest = v8;
      SlideListWin::AddText(v9, &byte_9B5005);
      v11 = TextData::Get(0x9AF8F4FF);
      sprintf(szTemp, "<%s>", v11);
      SlideListWin::AddText(v2->m_pListWinContent, szTemp);
      QuestStartItemWin::SetQuestContentText(v2, v10->NameID, 0);
      SlideListWin::AddText(v2->m_pListWinContent, &byte_9B5006);
      v12 = TextData::Get(0x7A95849Cu);
      sprintf(szTemp, "<%s>", v12);
      SlideListWin::AddText(v2->m_pListWinContent, szTemp);
      if ( v10->End.bLevel )
      {
        sprintf(szTemp, "Level : %d", v10->End.Level);
        SlideListWin::AddText(v2->m_pListWinContent, szTemp);
      }
      *(_DWORD *)&result.second = 0;
      v13 = (int)&v10->End.NPCMobList[0].NPCMobID;
      while ( 1 )
      {
        if ( !*(_BYTE *)(v13 - 2) )
        {
LABEL_50:
          *(_DWORD *)&result.second = 0;
          v33 = (int)&v10->End.ItemList[0].ItemID;
          do
          {
            if ( !*(_BYTE *)(v33 - 2) )
              break;
            v34 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
            v35 = *(_WORD *)v33;
            if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                                  + 16))(
                                    ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                                    v35) )
            {
              if ( (unsigned __int16)v35 <= *(_WORD *)(v34 + 200) )
              {
                v37 = *(_DWORD *)(v34 + 196);
                v36 = *(_DWORD *)(v37 + 4 * v35) ? *(_DWORD *)(v37 + 4 * v35) : 0;
              }
              else
              {
                v36 = 0;
              }
            }
            else
            {
              v36 = 0;
            }
            v38 = Inventory::GetItemCnt(&g_kInventory, *(_WORD *)v33);
            sprintf(szTemp, "%s %d/%d", v36 + 34, v38, *(_WORD *)(v33 + 2));
            SlideListWin::AddText(v64->m_pListWinContent, szTemp);
            v33 += 6;
            ++*(_DWORD *)&result.second;
          }
          while ( *(_DWORD *)&result.second < 5 );
          v39 = lpQuest;
          if ( lpQuest->End.bLocation )
          {
            v40 = TextData::Get(0x39323D31u);
            sprintf(szTemp, (const char *)v40, &unk_9B500F);
            SlideListWin::AddText(v64->m_pListWinContent, szTemp);
          }
          setNpcID._Mysize = 0;
          v41 = (std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *)operator new(0x10u);
          if ( !v41 )
          {
            pPlayerQuestInfo = 0;
            std::exception::exception(&pExceptionObject, (const char *const *)&pPlayerQuestInfo);
            pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
            _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
          }
          setNpcID._Myhead = v41;
          v41->_Left = v41;
          setNpcID._Myhead->_Parent = setNpcID._Myhead;
          setNpcID._Myhead->_Right = setNpcID._Myhead;
          setNpcID._Myhead->_Color = 1;
          setNpcID._Myhead->_Isnil = 1;
          v42 = 0;
          v67 = 0;
          v43 = (unsigned __int16 *)&v39->End.NPCMobList[0].NPCMobAction;
          do
          {
            if ( !*((_BYTE *)v43 - 4) )
              break;
            if ( !*(_BYTE *)v43 )
            {
              v44 = std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Buynode<unsigned short>(
                      (std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&setNpcID.comp,
                      v43 - 1);
              std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Linsert(
                (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&setNpcID.comp,
                &result,
                v44,
                0);
            }
            ++v42;
            v43 += 4;
          }
          while ( v42 < 5 );
          strNpc._Myres = 15;
          strNpc._Mysize = 0;
          strNpc._Bx._Buf[0] = 0;
          LOBYTE(v67) = 1;
          v45 = TextData::Get(0xEE023049);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
            &strNpc,
            (const char *)v45,
            strlen((const char *)v45));
          v46 = setNpcID._Myhead->_Left;
          while ( v46 != setNpcID._Myhead )
          {
            v47 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
            v48 = v46->_Myval;
            if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable
                                                                  + 16))(
                                    ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                                    v48) )
            {
              if ( (unsigned __int16)v48 <= *(_WORD *)(v47 + 200) )
              {
                v50 = *(_DWORD *)(v47 + 196);
                if ( *(_DWORD *)(v50 + 4 * v48) )
                  v49 = *(_DWORD *)(v50 + 4 * v48);
                else
                  v49 = 0;
              }
              else
              {
                v49 = 0;
              }
            }
            else
            {
              v49 = 0;
            }
            sprintf(szTemp, "   %s", v49 + 34);
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strNpc, szTemp, strlen(szTemp));
            if ( !v46->_Isnil )
            {
              v51 = v46->_Right;
              if ( v51->_Isnil )
              {
                for ( i = v46->_Parent; !i->_Isnil; i = i->_Parent )
                {
                  if ( v46 != i->_Right )
                    break;
                  v46 = i;
                }
                v46 = i;
              }
              else
              {
                v46 = v46->_Right;
                for ( j = v51->_Left; !j->_Isnil; j = j->_Left )
                  v46 = j;
              }
            }
          }
          v54 = strNpc._Bx._Ptr;
          if ( strNpc._Myres < 0x10 )
            v54 = (const char *)&strNpc;
          v55 = v64;
          SlideListWin::AddText(v64->m_pListWinContent, v54);
          SlideListWin::AddText(v55->m_pListWinContent, &byte_9B5022);
          v56 = TextData::Get(0xEEE74F4D);
          sprintf(szTemp, "<%s>", v56);
          SlideListWin::AddText(v55->m_pListWinContent, szTemp);
          QuestStartItemWin::SetQuestContentText(v55, lpQuest->BrifingID, 0);
          SlideListWin::AddText(v55->m_pListWinContent, &byte_9B5023);
          SlideListWin::AlignText(v55->m_pListWinContent, 4u);
          SlideListWin::AddText(v55->m_pListWinContent, &byte_9B502A);
          SlideListWin::AddText(v55->m_pListWinContent, &byte_9B502B);
          SlideListWin::AddText(v55->m_pListWinContent, byte_9B5032);
          SlideListWin::UpdateViewList(v55->m_pListWinContent);
          v57 = v55->m_pkRewardWin;
          if ( v57 )
            v57->m_uFlags |= 1u;
          if ( strNpc._Myres >= 0x10 )
            operator delete(strNpc._Bx._Ptr);
          strNpc._Myres = 15;
          strNpc._Mysize = 0;
          strNpc._Bx._Buf[0] = 0;
          v58 = setNpcID._Myhead->_Left;
          v67 = 2;
          std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::erase(
            (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&setNpcID.comp,
            (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *)&pPlayerQuestInfo,
            (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > >)v58,
            (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > >)setNpcID._Myhead);
          operator delete(setNpcID._Myhead);
          return;
        }
        if ( *(_BYTE *)(v13 + 2) == 1 )
          break;
        if ( *(_BYTE *)(v13 + 2) == 2 )
        {
          v20 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
          v21 = *(_WORD *)v13;
          if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable
                                                                + 16))(
                                  ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                                  v21) )
          {
            if ( (unsigned __int16)v21 <= *(_WORD *)(v20 + 200) )
            {
              v23 = *(_DWORD *)(v20 + 196);
              if ( *(_DWORD *)(v23 + 4 * v21) )
                v22 = *(_DWORD *)(v23 + 4 * v21);
              else
                v22 = 0;
            }
            else
            {
              v22 = 0;
            }
          }
          else
          {
            v22 = 0;
          }
          v24 = v22 + 34;
          v25 = TextData::Get(0x3C497E96u);
          sprintf(szTemp, (const char *)v25, &unk_9B5007, v24);
          SlideListWin::AddText(v64->m_pListWinContent, szTemp);
          goto LABEL_49;
        }
        if ( *(_BYTE *)(v13 + 2) == 3 )
        {
          v14 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
          v15 = *(_WORD *)v13;
          if ( (unsigned __int8)(*(int (__thiscall **)(_DWORD, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable
                                                                   + 16))(
                                  ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                                  v15) )
          {
            if ( (unsigned __int16)v15 <= *(_WORD *)(v14 + 200) )
            {
              v17 = *(_DWORD *)(v14 + 196);
              if ( *(_DWORD *)(v17 + 4 * v15) )
                v16 = *(_DWORD *)(v17 + 4 * v15);
              else
                v16 = 0;
            }
            else
            {
              v16 = 0;
            }
          }
          else
          {
            v16 = 0;
          }
          v18 = v16 + 34;
          v19 = TextData::Get(0x8DECE4E2);
          sprintf(szTemp, (const char *)v19, &unk_9B500E, v18);
LABEL_48:
          SlideListWin::AddText(v64->m_pListWinContent, szTemp);
        }
LABEL_49:
        v10 = lpQuest;
        v13 += 8;
        if ( ++*(_DWORD *)&result.second >= 5 )
          goto LABEL_50;
      }
      v26 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
      v27 = *(_WORD *)v13;
      if ( (unsigned __int8)(*(int (__thiscall **)(_DWORD, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable
                                                               + 16))(
                              ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                              v27) )
      {
        if ( (unsigned __int16)v27 <= *(_WORD *)(v26 + 200) )
        {
          v29 = *(_DWORD *)(v26 + 196);
          if ( *(_DWORD *)(v29 + 4 * v27) )
            v28 = *(_DWORD *)(v29 + 4 * v27);
          else
            v28 = 0;
        }
        else
        {
          v28 = 0;
        }
      }
      else
      {
        v28 = 0;
      }
      v30 = 1;
      if ( pPlayerQuestInfo )
        v30 = pPlayerQuestInfo->Data.End_NPCMobCount[*(_DWORD *)&result.second];
      if ( *(_BYTE *)(v13 + 4) )
      {
        v31 = MobViewInfoTab::GetByID(*(_WORD *)v13);
        if ( v31 )
        {
          v32 = *(_BYTE *)(v13 + 4);
          switch ( v32 )
          {
            case 1:
              sprintf(szTemp, "%s %d/%d", v31->Group1, v30, *(_BYTE *)(v13 + 3));
              break;
            case 2:
              sprintf(szTemp, "%s %d/%d", v31->Group2, v30, *(_BYTE *)(v13 + 3));
              break;
            case 3:
              sprintf(szTemp, "%s %d/%d", v31->Group3, v30, *(_BYTE *)(v13 + 3));
              break;
            case 4:
              sprintf(szTemp, "%s %d/%d", v31->GroupS, v30, *(_BYTE *)(v13 + 3));
              break;
          }
        }
      }
      else
      {
        sprintf(szTemp, "%s %d/%d", v28 + 34, v30, *(_BYTE *)(v13 + 3));
      }
      goto LABEL_48;
    }
  }
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (006045D0) --------------------------------------------------------
char __thiscall QuestStartItemWin::Create(QuestStartItemWin *this, PgFrameWork *pkFrameWork)
{
  QuestStartItemWin *v2; // esi@1
  char result; // al@6
  NiTexturePalette *v4; // ebx@7
  const char *v5; // eax@9
  PgSprData *v6; // eax@10
  NiNode *v7; // esi@11
  int v8; // edi@16
  int v9; // ebx@16
  NiSourceTexture *v10; // eax@16
  PgSprData *v11; // eax@17
  PgSprData *v12; // eax@19
  PgSprData::PgHitTester *v13; // eax@19
  NiSourceTexture *v14; // edx@19
  PgFont *v15; // eax@19
  NiSourceTexture **v16; // edi@19
  NiUnsharedGeometryGroup *v17; // eax@19
  NiSourceTexture *v18; // edi@19
  SLWCreateInfo::Item *v19; // eax@21
  PgSprData *v20; // eax@25
  SlideListWin *v21; // eax@25
  PgSprData *v22; // edi@25
  NiObjectNET *v23; // eax@25
  NiObjectNET *v24; // eax@25
  NiObjectNET *v25; // eax@25
  NiObjectNET *v26; // eax@25
  NiObjectNET *v27; // eax@25
  NiObjectNET *v28; // eax@25
  SlideBar *v29; // eax@25
  SlideBar *v30; // edi@25
  void *(__thiscall *v31)(NiRefObject *, unsigned int); // edx@25
  SlideBar *v32; // ecx@25
  int v33; // eax@25
  int v34; // eax@25
  PgSprData *v35; // edi@25
  PgSprData::PgHitTester *v36; // eax@25
  unsigned int v37; // edi@25
  PgFont *v38; // eax@25
  NiSourceTexture **v39; // edi@25
  NiUnsharedGeometryGroup *v40; // eax@25
  PgSprData *v41; // edi@25
  PgSprData::PgHitTester *v42; // eax@25
  unsigned int v43; // edi@25
  PgFont *v44; // eax@25
  PgWinText *v45; // edi@25
  NiRefObjectVtbl *v46; // ebx@25
  NiUnsharedGeometryGroup *v47; // eax@25
  NiNode *v48; // esi@26
  SLWCreateInfo kCreateInfo; // [sp+60h] [bp-64h]@21
  NiSourceTexture *pkTexture; // [sp+7Ch] [bp-48h]@1
  int iYOff; // [sp+80h] [bp-44h]@16
  SLWCreateInfo::Item *pCIItem; // [sp+84h] [bp-40h]@19
  NiSourceTexture *pkTexture8; // [sp+88h] [bp-3Ch]@19
  int uiTop; // [sp+8Ch] [bp-38h]@10
  int uiLeft; // [sp+90h] [bp-34h]@10
  NiPointer<NiNode> spNode; // [sp+94h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+98h] [bp-2Ch]@21
  int v58; // [sp+C0h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v58 = 0;
  pkTexture = MenuTexMgr::GetTexture(4u);
  if ( !pkTexture )
  {
    v58 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( spNode.m_pObject )
        spNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spNode.m_pObject, 1u);
    }
    return 0;
  }
  v4 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "Game\\QuestWin_QuickStart.nif");
  PgUtil::LoadNodeNifFile(v5, &spNode, v4);
  if ( !spNode.m_pObject )
    return 0;
  v6 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v6, 0, pkFrameWork, "QuestStartItemWin", 0) )
  {
    v8 = uiTop;
    v9 = uiLeft;
    iYOff = uiTop;
    v10 = MenuTexMgr::GetTexture(0x13u);
    if ( v10 )
      v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
    else
      v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v9, uiTop - v8, v11, (PgWin *)&v2->vfptr, 0, 0);
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v9, uiTop, v12, (PgWin *)&v2->vfptr, 0, 0);
    v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, pkTexture)->m_akHitTester.m_pBase->m_pObject;
    v14 = (NiSourceTexture *)v13->m_uiWidth;
    pCIItem = (SLWCreateInfo::Item *)v13->m_uiHeight;
    pkTexture8 = v14;
    v15 = Font::Get(0);
    v16 = (NiSourceTexture **)PgWinText::CreateWin(
                                uiLeft - v9,
                                uiTop - v8,
                                (unsigned int)pkTexture8,
                                (unsigned int)pCIItem,
                                v15,
                                (PgWin *)&v2->vfptr,
                                0,
                                0);
    ((void (__thiscall *)(NiSourceTexture **, signed int))(*v16)[7].m_spControllers.m_pObject)(v16, 5);
    pkTexture8 = *v16;
    v17 = TextData::Get(0xA6A69872);
    (*(void (__thiscall **)(NiSourceTexture **, NiUnsharedGeometryGroup *))&pkTexture8[6].m_bStatic)(v16, v17);
    ((void (__thiscall *)(NiSourceTexture **, _DWORD))(*v16)[3].m_kFormatPrefs.m_eMipMapped)(v16, 0);
    v18 = pkTexture;
    pCIItem = (SLWCreateInfo::Item *)PgSprData::Create(
                                       (NiAVObject *)&spNode.m_pObject->vfptr,
                                       "ClsNor",
                                       &uiLeft,
                                       &uiTop,
                                       pkTexture);
    PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
    PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
    PgWinBut::CreateWin(uiLeft - v9, uiTop - iYOff, (PgSprData *)pCIItem, (PgWin *)&v2->vfptr, 0, 0, 0);
    pkTexture8 = MenuTexMgr::GetTexture(4u);
    if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
    {
      pCIItem = (SLWCreateInfo::Item *)PgSprData::Create(
                                         (NiAVObject *)&spNode.m_pObject->vfptr,
                                         "HelpLinkNor",
                                         &uiLeft,
                                         &uiTop,
                                         pkTexture8);
      PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
      PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
      PgWinBut::CreateWin(uiLeft - v9, uiTop - iYOff, (PgSprData *)pCIItem, (PgWin *)&v2->vfptr, 3u, 0, 0);
    }
    kCreateInfo.m_arrItem._Myfirst = 0;
    kCreateInfo.m_arrItem._Mylast = 0;
    kCreateInfo.m_arrItem._Myend = 0;
    kCreateInfo.m_bMakeData = 0;
    kCreateInfo.m_nOffX = 0;
    kCreateInfo.m_nOffY = 0;
    LOBYTE(v58) = 1;
    v19 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
    v19->nItemType = 1;
    v19->pNode = spNode.m_pObject;
    pCIItem = v19;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBar01Nor", 0xEu);
    LOBYTE(v58) = 2;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      &pCIItem->vecNodeName,
      &_Val);
    LOBYTE(v58) = 1;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pCIItem = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    pCIItem->nItemType = 2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column04", 8u);
    LOBYTE(v58) = 3;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      &pCIItem->vecNodeName,
      &_Val);
    LOBYTE(v58) = 1;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pCIItem->pNode = spNode.m_pObject;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
    v20 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SubText02", &uiLeft, &uiTop, v18);
    v21 = SlideListWin::CreateWin(uiLeft - v9, uiTop - iYOff, v20, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
    v2->m_pListWinContent = v21;
    v21->m_bCheckEnable = 0;
    SlideListWin::AddText(v2->m_pListWinContent, ".");
    SlideListWin::AddText(v2->m_pListWinContent, "..");
    SlideListWin::AddText(v2->m_pListWinContent, "...");
    SlideListWin::AlignText(v2->m_pListWinContent, 4u);
    SlideListWin::UpdateViewList(v2->m_pListWinContent);
    v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle", &uiLeft, &uiTop, v18);
    v23 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnNor01");
    NiObjectNET::SetName(v23, "SlideBar_DnBtn01Nor");
    v24 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnClick01");
    NiObjectNET::SetName(v24, "SlideBar_DnBtn01Click");
    v25 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnOver01");
    NiObjectNET::SetName(v25, "SlideBar_DnBtn01Over");
    v26 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnNor01");
    NiObjectNET::SetName(v26, "SlideBar_UpBtn01Nor");
    v27 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnClick01");
    NiObjectNET::SetName(v27, "SlideBar_UpBtn01Click");
    v28 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnOver01");
    NiObjectNET::SetName(v28, "SlideBar_UpBtn01Over");
    v29 = SlideBar::CreateWin(
            spNode.m_pObject,
            "SlideBar01",
            "SlideBar_UpBtn01",
            "SlideBar_DnBtn01",
            v22,
            0,
            (PgWin *)&v2->vfptr);
    v2->m_pSlideBarContent = v29;
    v29->m_uiClickMsg = 1;
    v2->m_pSlideBarContent->m_eType = 1;
    v30 = v2->m_pSlideBarContent;
    v31 = v2->m_pSlideBarContent->vfptr[42].__vecDelDtor;
    v32 = v2->m_pSlideBarContent;
    pkTexture8 = (NiSourceTexture *)v2->m_pSlideBarContent->vfptr;
    v33 = ((int (__thiscall *)(SlideBar *))v31)(v32);
    v34 = (int)v30->vfptr[41].__vecDelDtor((NiRefObject *)v30, v33);
    ((void (__thiscall *)(SlideBar *, int))pkTexture8[4].m_kFormatPrefs.m_eMipMapped)(v2->m_pSlideBarContent, v34 - 18);
    SlideBar::SetSplitCnt(v2->m_pSlideBarContent, v2->m_pListWinContent->m_nSlideSplitCnt);
    SlideBar::SetSplitCnt(v2->m_pSlideBarContent, 0);
    v2->m_pListWinContent->m_nSlideSplitCnt = 0;
    v2->m_pListWinContent->m_nViewStartPos = 0;
    SlideListWin::UpdateViewList(v2->m_pListWinContent);
    v35 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GiveupNor", &uiLeft, &uiTop, pkTexture);
    PgSprData::Add(v35, (NiAVObject *)&spNode.m_pObject->vfptr, "GiveupClick");
    PgSprData::Add(v35, (NiAVObject *)&spNode.m_pObject->vfptr, "GiveupOver");
    PgWinBut::CreateWin(uiLeft - v9, uiTop - iYOff, v35, (PgWin *)&v2->vfptr, 2u, 0, 0);
    v36 = v35->m_akHitTester.m_pBase->m_pObject;
    v37 = v36->m_uiHeight;
    pkTexture8 = (NiSourceTexture *)v36->m_uiWidth;
    v38 = Font::Get(MAIN_MENU);
    v39 = (NiSourceTexture **)PgWinText::CreateWin(
                                uiLeft - v9,
                                uiTop - iYOff + 1,
                                (unsigned int)pkTexture8,
                                v37,
                                v38,
                                (PgWin *)&v2->vfptr,
                                0,
                                0);
    ((void (__thiscall *)(NiSourceTexture **, signed int))(*v39)[7].m_spControllers.m_pObject)(v39, 5);
    pkTexture8 = *v39;
    v40 = TextData::Get(0xDD03DFE0);
    (*(void (__thiscall **)(NiSourceTexture **, NiUnsharedGeometryGroup *))&pkTexture8[6].m_bStatic)(v39, v40);
    ((void (__thiscall *)(NiSourceTexture **, _DWORD))(*v39)[3].m_kFormatPrefs.m_eMipMapped)(v39, 0);
    v41 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "EpicQuestNor", &uiLeft, &uiTop, pkTexture);
    PgSprData::Add(v41, (NiAVObject *)&spNode.m_pObject->vfptr, "EpicQuestClick");
    PgSprData::Add(v41, (NiAVObject *)&spNode.m_pObject->vfptr, "EpicQuestOver");
    PgWinBut::CreateWin(uiLeft - v9, uiTop - iYOff, v41, (PgWin *)&v2->vfptr, 0, 0, 0);
    v42 = v41->m_akHitTester.m_pBase->m_pObject;
    v43 = v42->m_uiHeight;
    pkTexture8 = (NiSourceTexture *)v42->m_uiWidth;
    v44 = Font::Get(MAIN_MENU);
    v45 = PgWinText::CreateWin(
            uiLeft - v9,
            uiTop - iYOff + 1,
            (unsigned int)pkTexture8,
            v43,
            v44,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v45->vfptr[122].__vecDelDtor((NiRefObject *)v45, 5u);
    v46 = v45->vfptr;
    v47 = TextData::Get(0x9AE7FBE7);
    v46[118].__vecDelDtor((NiRefObject *)v45, (unsigned int)v47);
    v45->vfptr[60].__vecDelDtor((NiRefObject *)v45, 0);
    ((void (__thiscall *)(QuestStartItemWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    LOBYTE(v58) = 0;
    SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
    v58 = -1;
    if ( spNode.m_pObject )
    {
      v48 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v48 )
          v48->vfptr->__vecDelDtor((NiRefObject *)v48, 1u);
      }
    }
    result = 1;
  }
  else
  {
    v7 = spNode.m_pObject;
    v58 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00604E10) --------------------------------------------------------
QuestStartItemWin *__thiscall QuestStartItemWin::`scalar deleting destructor'(QuestStartItemWin *this, unsigned int a2)
{
  QuestStartItemWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&QuestStartItemWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&QuestStartItemWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B5318: using guessed type void (__thiscall *QuestStartItemWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B5334: using guessed type int (__thiscall *QuestStartItemWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00604E60) --------------------------------------------------------
void __thiscall CQuestWin2::ResetQuestStateIcon(CQuestWin2 *this)
{
  char *v1; // esi@1
  signed int v2; // edi@1

  v1 = (char *)this->m_pkSprQstEpic;
  v2 = 10;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v1 - 10) + 240))(0);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v1 - 10) + 256))(0);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v1 + 240))(0);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v1 + 256))(0);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v1 + 10) + 240))(0);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v1 + 10) + 256))(0);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v1 + 20) + 240))(0);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v1 + 20) + 256))(0);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v1 + 30) + 240))(0);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v1 + 30) + 256))(0);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v1 + 40) + 240))(0);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v1 + 40) + 256))(0);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v1 + 67) + 240))(0);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v1 + 67) + 256))(0);
    v1 += 4;
    --v2;
  }
  while ( v2 );
}

//----- (00604F60) --------------------------------------------------------
void __thiscall CQuestWin2::SetRewardWin(CQuestWin2 *this, RewardWin *pkWin)
{
  CQuestWin2 *v2; // esi@1
  NiRefObjectVtbl *v3; // edi@2
  int v4; // eax@2
  RewardWin *v5; // ecx@2
  NiRefObjectVtbl *v6; // edi@2
  int v7; // ebx@2
  int v8; // ebx@2
  int v9; // eax@2

  v2 = this;
  this->m_pkRewardWin = pkWin;
  if ( pkWin )
  {
    ((void (__stdcall *)(_DWORD, _DWORD))this->vfptr[29].__vecDelDtor)(pkWin, 0);
    v3 = v2->m_pkRewardWin->vfptr;
    v4 = ((int (*)(void))v2->m_pListWinContent->vfptr[41].__vecDelDtor)();
    v3[43].__vecDelDtor((NiRefObject *)v2->m_pkRewardWin, v4);
    v5 = v2->m_pkRewardWin;
    v6 = v5->vfptr;
    v7 = 8 - ((int (*)(void))v5->vfptr[37].__vecDelDtor)();
    v8 = ((int (*)(void))v2->m_pListWinContent->vfptr[42].__vecDelDtor)() + v7;
    v9 = ((int (*)(void))v2->m_pListWinContent->vfptr[37].__vecDelDtor)();
    v6[44].__vecDelDtor((NiRefObject *)v2->m_pkRewardWin, v8 + v9);
    v2->m_pkRewardWin->vfptr[130].__vecDelDtor((NiRefObject *)v2->m_pkRewardWin, 0);
  }
}

//----- (00605010) --------------------------------------------------------
void CQuestWin2::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "QuestWin");
}

//----- (00605040) --------------------------------------------------------
void __thiscall CQuestWin2::OnEpicQuestCompleteList(CQuestWin2 *this)
{
  CQuestWin2 *v1; // esi@1
  int v2; // eax@4

  v1 = this;
  if ( this->m_pkEpicQuestWin )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkEpicQuestWin->vfptr[65].__vecDelDtor)() )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkEpicQuestWin->vfptr);
    v2 = v1->m_nCurSelTab;
    if ( v2 == 1 )
    {
      v1->m_pkEpicQuestWin->m_eType = 1;
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkEpicQuestWin->vfptr);
    }
    else
    {
      if ( v2 == 2 )
        v1->m_pkEpicQuestWin->m_eType = 0;
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkEpicQuestWin->vfptr);
    }
  }
}

//----- (006050D0) --------------------------------------------------------
void __thiscall EpicQuestWin::UpdateMeWin(EpicQuestWin *this, float fCurTime)
{
  EpicQuestWin *v2; // esi@1

  v2 = this;
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
  {
    GameFrameWork::UpdateUIScroll(v2->m_pListWinContent, v2->m_pSlideBarContent);
    GameFrameWork::UpdateUIScroll(v2->m_pListWinQuestList, v2->m_pSlideBarList);
  }
}

//----- (00605120) --------------------------------------------------------
void __thiscall EpicQuestWin::OnQuestAccept(EpicQuestWin *this)
{
  EpicQuestWin *v1; // esi@1
  GameFrameWork *v2; // eax@3

  v1 = this;
  if ( this->m_nSelectedID >= 0 && SlideListWin::GetItemSize(this->m_pListWinQuestList) )
  {
    v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v2 )
      GameFrameWork::NcQuestStartReq(v2, v1->m_nSelectedID);
  }
}

//----- (00605160) --------------------------------------------------------
void __thiscall EpicQuestWin::ResetQuestStateIcon(EpicQuestWin *this)
{
  char *v1; // esi@1
  signed int v2; // edi@1

  v1 = (char *)this->m_pkSprQstEpic;
  v2 = 13;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v1 - 13) + 240))(0);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v1 - 13) + 256))(0);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v1 + 240))(0);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v1 + 256))(0);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v1 + 13) + 240))(0);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v1 + 13) + 256))(0);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v1 + 26) + 240))(0);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v1 + 26) + 256))(0);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v1 + 39) + 240))(0);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v1 + 39) + 256))(0);
    v1 += 4;
    --v2;
  }
  while ( v2 );
}

//----- (00605220) --------------------------------------------------------
void EpicQuestWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "EpicQuestWin");
}

//----- (00605250) --------------------------------------------------------
void __thiscall AutoRunBut::AutoRunBut(AutoRunBut *this)
{
  AutoRunBut *v1; // esi@1

  v1 = this;
  PgWinBut::PgWinBut((PgWinBut *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&AutoRunBut::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&AutoRunBut::`vftable'{for `IDirectMessenger'};
}
// 9B6004: using guessed type void (__thiscall *AutoRunBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B6024: using guessed type int (__thiscall *AutoRunBut::`vftable'{for `NiNode'})(void *p, char);

//----- (00605270) --------------------------------------------------------
void __thiscall AutoRunBut::~AutoRunBut(AutoRunBut *this)
{
  this->vfptr = (NiRefObjectVtbl *)&AutoRunBut::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&AutoRunBut::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
}
// 9B6004: using guessed type void (__thiscall *AutoRunBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B6024: using guessed type int (__thiscall *AutoRunBut::`vftable'{for `NiNode'})(void *p, char);

//----- (00605290) --------------------------------------------------------
bool __thiscall AutoRunBut::Create(AutoRunBut *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, char *pcName, unsigned int uiExtStyle)
{
  return PgWinBut::Create((PgWinBut *)&this->vfptr, iXPos, iYPos, pkSprData, pkParent, uiCmdMsg, pcName, uiExtStyle) != 0;
}

//----- (006052C0) --------------------------------------------------------
void __thiscall CQuestWin2::OnWinClose(CQuestWin2 *this)
{
  CQuestWin2 *v1; // edi@1
  MsgBox *v2; // eax@1
  MsgBox *v3; // esi@2

  v1 = this;
  v2 = this->ms_pkMsgBox.m_pObject;
  if ( v2 )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
    v3 = v1->ms_pkMsgBox.m_pObject;
    if ( v3 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      v1->ms_pkMsgBox.m_pObject = 0;
    }
  }
  GameFrameWork::CloseQuestWin((GameFrameWork *)v1->m_pkFrameWork);
}

//----- (00605320) --------------------------------------------------------
void __thiscall CQuestWin2::DirectMessage(CQuestWin2 *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  CQuestWin2 *v4; // edi@1
  PgWinSpr *v5; // esi@4

  v4 = this;
  if ( iMsgTag == 27 )
  {
    if ( pvBody )
    {
      if ( this->m_pkSprQstEpic[5] )
      {
        v5 = this->m_pkSprQstEpic[5];
        if ( v5 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
          {
            if ( v5 )
              v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
          }
          v4->m_pkSprQstEpic[5] = 0;
        }
      }
    }
  }
}

//----- (00605380) --------------------------------------------------------
void __thiscall CQuestWin2::OnFullMapOpen(CQuestWin2 *this)
{
  int v1; // eax@1

  v1 = *(_DWORD *)&this->m_pkFrameWork[15].m_bInit;
  if ( v1 )
    FullMapWin::LocationInfo(*(FullMapWin **)(v1 + 532), this->m_nSelectedID);
}

//----- (006053B0) --------------------------------------------------------
void __thiscall CQuestWin2::UpdateLocationInfo(CQuestWin2 *this, unsigned __int16 Quest_ID)
{
  NiTListItem<NSFParsedShader *> *v2; // edi@2
  QUEST_DATA **v3; // esi@3
  CClientQuest *pQuest; // [sp+4h] [bp-Ch]@1
  CQuestWin2 *v5; // [sp+8h] [bp-8h]@1
  int bShow; // [sp+Ch] [bp-4h]@0

  v5 = this;
  pQuest = QuestDataMgr::GetQuest();
  LOBYTE(bShow) = 0;
  if ( QuestHelperMgr::GetInstance() )
  {
    v2 = QuestHelperMgr::ms_pQuestMCList.m_pkHead;
    if ( QuestHelperMgr::ms_pQuestMCList.m_pkHead )
    {
      while ( 1 )
      {
        v3 = (QUEST_DATA **)v2->m_element;
        v2 = v2->m_pkNext;
        if ( v3 )
        {
          if ( (*v3)->ID == Quest_ID
            && (CQuest::GetNewQuestStatus((CQuest *)&pQuest->vfptr, (*v3)->ID) == (QUEST_DATA *)6
             || (unsigned __int8)QuestHelperMgr::IsStartRewardQuest(*v3) == 1) )
          {
            break;
          }
        }
        if ( !v2 )
          goto LABEL_10;
      }
      LOBYTE(bShow) = 1;
    }
LABEL_10:
    ((void (__stdcall *)(int))v5->m_pkLocationInfoWinBut->vfptr[64].__vecDelDtor)(bShow);
    ((void (__stdcall *)(int))v5->m_pkLocationInfoWinText->vfptr[64].__vecDelDtor)(bShow);
  }
}

//----- (00605460) --------------------------------------------------------
void __thiscall CQuestWin2::ResetContentSlideBar(CQuestWin2 *this)
{
  CQuestWin2 *v1; // esi@1
  SlideBar *v2; // ecx@1
  RewardWin *v3; // esi@3

  v1 = this;
  v2 = this->m_pSlideBarContent;
  if ( v2 && v1->m_pListWinContent )
  {
    SlideBar::SetSplitCnt(v2, 0);
    v1->m_pListWinContent->m_nViewStartPos = 0;
    SlideListWin::UpdateViewList(v1->m_pListWinContent);
    v3 = v1->m_pkRewardWin;
    if ( v3 )
      v3->m_uFlags |= 1u;
  }
}

//----- (006054B0) --------------------------------------------------------
char __thiscall CQuestWin2::RemoveAutoBlinkBut(CQuestWin2 *this, PgWinBut *But)
{
  char result; // al@2

  if ( But )
  {
    NiTArray<PgWinBut *>::Remove(&this->m_kAutoBlinkButList, &But);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006054E0) --------------------------------------------------------
char __thiscall CQuestWin2::UpdateBlinkButList(CQuestWin2 *this, float fCurTime)
{
  CQuestWin2 *v2; // esi@1
  unsigned int v3; // edi@1
  PgWinBut **v4; // eax@3
  bool v5; // zf@3
  PgWinBut **v6; // eax@3
  PgWinBut **v7; // eax@7

  v2 = this;
  v3 = 0;
  this->m_fBlinkTime = Timer::ms_fDeltaTime + Timer::ms_fDeltaTime + this->m_fBlinkTime;
  if ( this->m_kAutoBlinkButList.m_uiSize )
  {
    do
    {
      if ( v2->m_fBlinkTime < 2.0 )
      {
        if ( v2->m_fBlinkTime >= 1.0 )
        {
          v7 = &v2->m_kAutoBlinkButList.m_pBase[v3];
          if ( *v7 )
            (*v7)->vfptr[123].__vecDelDtor((NiRefObject *)*v7, 2u);
        }
      }
      else
      {
        v4 = v2->m_kAutoBlinkButList.m_pBase;
        v5 = v4[v3] == 0;
        v6 = &v4[v3];
        if ( !v5 )
          (*v6)->vfptr[123].__vecDelDtor((NiRefObject *)*v6, 0);
        v2->m_fBlinkTime = 0.0;
      }
      ++v3;
    }
    while ( v3 < v2->m_kAutoBlinkButList.m_uiSize );
  }
  return 1;
}
// A8B980: using guessed type float Timer::ms_fDeltaTime;

//----- (00605580) --------------------------------------------------------
void __thiscall EpicQuestWin::EpicQuestWin(EpicQuestWin *this)
{
  EpicQuestWin *v1; // esi@1
  int v2; // eax@1
  signed int v3; // edx@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&EpicQuestWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&EpicQuestWin::`vftable'{for `IDirectMessenger'};
  v1->ms_pkMsgBox.m_pObject = 0;
  v1->m_pkAcceptBtn = 0;
  v1->m_pkAcceptBtnSpr = 0;
  v1->m_pkBtnText = 0;
  v1->m_eType = 1;
  v2 = (int)v1->m_pkSprQstEpic;
  v3 = 13;
  do
  {
    *(_DWORD *)(v2 - 52) = 0;
    *(_DWORD *)v2 = 0;
    *(_DWORD *)(v2 + 52) = 0;
    *(_DWORD *)(v2 + 104) = 0;
    *(_DWORD *)(v2 + 156) = 0;
    v2 += 4;
    --v3;
  }
  while ( v3 );
  v1->m_uiMaxEpicQuest = 0;
  v1->m_uiCompleteQuest = 0;
  v1->m_nSelectedID = -1;
}
// 9B6260: using guessed type void (__thiscall *EpicQuestWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B627C: using guessed type int (__thiscall *EpicQuestWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00605600) --------------------------------------------------------
void __thiscall EpicQuestWin::~EpicQuestWin(EpicQuestWin *this)
{
  EpicQuestWin *v1; // esi@1
  MsgBox *v2; // edi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&EpicQuestWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&EpicQuestWin::`vftable'{for `IDirectMessenger'};
  v2 = this->ms_pkMsgBox.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9B6260: using guessed type void (__thiscall *EpicQuestWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B627C: using guessed type int (__thiscall *EpicQuestWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00605690) --------------------------------------------------------
int EpicQuestWin::TotalMaxLowLevelQuest()
{
  CClientQuest *v1; // eax@1
  CQuestData *v2; // edi@1
  signed int v3; // ebx@2
  QUEST_DATA *v4; // eax@3
  QUEST_DATA *v5; // esi@3
  QUEST_DATA *v6; // eax@3
  int v7; // esi@7
  int result; // eax@10
  CQuest *pQuest; // [sp+8h] [bp-8h]@1
  int iTotalLowQuset; // [sp+Ch] [bp-4h]@1

  v1 = QuestDataMgr::GetQuest();
  v2 = v1->m_pQuestData;
  pQuest = (CQuest *)v1;
  iTotalLowQuset = 0;
  if ( v2 )
  {
    v3 = 0;
    if ( CQuestData::GetNumOfQuestData(v2) <= 0u )
    {
      result = 0;
    }
    else
    {
      do
      {
        v4 = CQuestData::GetQuestDataByIndex(v2, v3);
        v5 = v4;
        v6 = CQuest::GetNewQuestStatus(pQuest, v4->ID);
        if ( v6 == (QUEST_DATA *)9
          || (signed int)v6 >= 4
          && ((signed int)v6 <= 5 || v6 == (QUEST_DATA *)20)
          && (v7 = v5->Start.LevelMin, (signed int)(User::Lv(&g_kUser) - v7) <= 5) )
        {
          ++iTotalLowQuset;
        }
        ++v3;
      }
      while ( v3 < CQuestData::GetNumOfQuestData(v2) );
      result = iTotalLowQuset;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00605730) --------------------------------------------------------
int __thiscall EpicQuestWin::TotalMaxEpicQuest(EpicQuestWin *this)
{
  CClientQuest *v1; // eax@1
  CQuestData *v2; // edi@1
  int v3; // esi@1
  signed int v4; // ebx@2
  QUEST_DATA *v5; // esi@3
  char v6; // al@4
  char v7; // al@7
  EpicQuestWin *v9; // [sp+8h] [bp-10h]@1
  CQuest *pQuest; // [sp+Ch] [bp-Ch]@1
  int iTotalEpic; // [sp+10h] [bp-8h]@1
  int iCompleateList; // [sp+14h] [bp-4h]@1

  v9 = this;
  v1 = QuestDataMgr::GetQuest();
  v2 = v1->m_pQuestData;
  v3 = 0;
  pQuest = (CQuest *)v1;
  iCompleateList = 0;
  iTotalEpic = 0;
  if ( v2 )
  {
    v4 = 0;
    if ( CQuestData::GetNumOfQuestData(v2) > 0u )
    {
      do
      {
        v5 = CQuestData::GetQuestDataByIndex(v2, v4);
        if ( CQuest::GetNewQuestStatus(pQuest, v5->ID) == (QUEST_DATA *)2 )
        {
          v6 = v5->Type;
          if ( v6 == 6 || v6 == 7 )
            ++iCompleateList;
        }
        v7 = v5->Type;
        if ( v7 == 6 || v7 == 7 )
          ++iTotalEpic;
        ++v4;
      }
      while ( v4 < CQuestData::GetNumOfQuestData(v2) );
      v3 = iCompleateList;
    }
  }
  v9->m_uiCompleteQuest = v3;
  v9->m_uiMaxEpicQuest = iTotalEpic;
  return v3;
}

//----- (006057D0) --------------------------------------------------------
void __thiscall EpicQuestWin::UpDateContentSideBar(EpicQuestWin *this)
{
  EpicQuestWin *v1; // esi@1
  SlideBar *v2; // ecx@1
  SlideListWin *v3; // eax@2

  v1 = this;
  v2 = this->m_pSlideBarContent;
  if ( v2 )
  {
    v3 = v1->m_pListWinContent;
    if ( v3 )
    {
      SlideBar::SetSplitCnt(v2, v3->m_nSlideSplitCnt);
      v1->m_pListWinContent->m_nViewStartPos = v1->m_pSlideBarContent->m_nCurPos;
      SlideListWin::UpdateViewList(v1->m_pListWinContent);
    }
  }
}

//----- (00605820) --------------------------------------------------------
void __thiscall AutoRunBut::ProcessMeInput(AutoRunBut *this, bool *bHit)
{
  AutoRunBut *v2; // esi@1

  v2 = this;
  if ( (unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD))this->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY)
    && (unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[65].__vecDelDtor)(v2)
    && !dword_B64884 )
  {
    dword_B64884 = v2;
  }
  PgWinBut::ProcessMeInput((PgWinBut *)&v2->vfptr, bHit);
}

//----- (00605880) --------------------------------------------------------
void __stdcall CQuestWin2::OnAutoRunBtnClick(unsigned __int16 *kID)
{
  unsigned __int16 v2; // ax@1
  unsigned int v3; // eax@2
  char *v4; // eax@2
  char *v5; // ebx@2
  MapNavigator *v6; // edi@4
  MapNavigator *v7; // esi@5
  int v8; // edx@9
  double v9; // st7@9
  Name3 *v10; // eax@11
  unsigned int v11; // edx@11
  int v12; // ecx@11
  int v13; // edx@11
  PgFrameWork *v14; // eax@11
  GTInformWin *v15; // edi@11
  MapViewInfo *v16; // eax@13
  char *v17; // eax@15
  char *v18; // eax@17
  char *v19; // [sp-10h] [bp-80h]@15
  D3DXCOLOR v20; // [sp-Ch] [bp-7Ch]@15
  bool v21; // [sp+4h] [bp-6Ch]@15
  float fLifeTime; // [sp+8h] [bp-68h]@15
  Name3 v23; // [sp+18h] [bp-58h]@11
  NiPoint3 kDest; // [sp+24h] [bp-4Ch]@11
  NiPointer<MapNavigator> result; // [sp+30h] [bp-40h]@4
  MapNavigator *pkNavigater; // [sp+34h] [bp-3Ch]@4
  NiPoint3 kPos; // [sp+3Ch] [bp-34h]@9
  MobInfo *pkMob; // [sp+48h] [bp-28h]@1
  char acMapName[13]; // [sp+4Ch] [bp-24h]@11
  char acDestMapName[13]; // [sp+5Ch] [bp-14h]@11

  v2 = *kID;
  pkMob = (MobInfo *)kID;
  if ( v2 != -1 )
  {
    v3 = MobCoordinateTab::GetRecordNum(v2);
    v4 = CDataReader::GetRecord((CDataReader *)(ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable + 4), v3);
    v5 = v4;
    if ( v4 )
    {
      if ( *((_WORD *)v4 + 1) == *kID )
      {
        v6 = MapNavigator::GetMapNavigator(&result)->m_pObject;
        pkNavigater = v6;
        if ( result.m_pObject )
        {
          v7 = result.m_pObject;
          if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
          {
            if ( v7 )
              v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
          }
        }
        if ( v6 )
        {
          v8 = *((_DWORD *)v5 + 5);
          kPos.x = (double)*((unsigned int *)v5 + 4);
          v9 = (double)*((signed int *)v5 + 5);
          if ( v8 < 0 )
            v9 = v9 + 4294967300.0;
          kPos.y = v9;
          kPos.z = 0.0;
          kDest.y = kPos.y;
          kDest.x = kPos.x;
          kDest.z = 0.0;
          ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[6].SetAbStateProperty)(&kPos);
          v10 = World::GetMapName(&g_kWorld, &v23);
          *(_DWORD *)acMapName = v10->n3_code[0];
          *(_DWORD *)&acMapName[4] = v10->n3_code[1];
          v11 = v10->n3_code[2];
          v12 = *((_DWORD *)v5 + 2);
          *(_DWORD *)acDestMapName = *((_DWORD *)v5 + 1);
          *(_DWORD *)&acMapName[8] = v11;
          v13 = *((_DWORD *)v5 + 3);
          *(_DWORD *)&acDestMapName[4] = v12;
          acMapName[12] = 0;
          *(_DWORD *)&acDestMapName[8] = v13;
          acDestMapName[12] = 0;
          v14 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
          v15 = (GTInformWin *)v14[33].m_kMsgQ.m_uiHead;
          if ( v15 )
          {
            GTInformWin::Clear((GTInformWin *)v14[33].m_kMsgQ.m_uiHead);
            pkMob = IIDTableBase<MobInfo,MobInfoTab,unsigned short>::GetByID(pkMob->ID);
            if ( pkMob )
            {
              v16 = MapViewInfoTab::GetByMapName((Name3 *)(v5 + 4));
              if ( v16 && v16->MWP_IsMove == 1 )
              {
                fLifeTime = 1000000.0;
                v21 = 0;
                *(_QWORD *)&v20.r = *(_QWORD *)&Color::m_kDxYellowColor.r;
                *(_QWORD *)&v20.b = *(_QWORD *)&Color::m_kDxYellowColor.b;
                v19 = pkMob->Name;
                v17 = (char *)TextData2::Get(0x3E573041u);
              }
              else
              {
                fLifeTime = 1000000.0;
                v21 = 0;
                *(_QWORD *)&v20.r = *(_QWORD *)&Color::m_kDxYellowColor.r;
                *(_QWORD *)&v20.b = *(_QWORD *)&Color::m_kDxYellowColor.b;
                v19 = pkMob->Name;
                v17 = (char *)TextData2::Get(0x9F9CD2DC);
              }
              v18 = fs(v17, v19);
              GTInformWin::AddText(v15, v18, v20, v21, fLifeTime);
            }
          }
          MapNavigator::FindPathAway(pkNavigater, &kPos, &kDest, acMapName, acDestMapName, *((_WORD *)v5 + 1));
        }
      }
    }
  }
}
// A8C27C: using guessed type int ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable;

//----- (00605AD0) --------------------------------------------------------
void __userpurge CQuestWin2::OnQuestListLClick(CQuestWin2 *this@<ecx>, int a2@<ebx>, signed int a3@<edi>, int nIndex, bool bCheck)
{
  CQuestWin2 *v5; // esi@1
  unsigned int v6; // eax@2
  CClientQuest *v7; // edi@4
  NiRefObjectVtbl *v8; // ebx@4
  NiUnsharedGeometryGroup *v9; // eax@5
  CClientQuest *v10; // eax@17
  bool v11; // zf@17
  void *(__thiscall *v12)(NiRefObject *, unsigned int); // eax@17
  MsgBox *v13; // edi@22
  int v14; // [sp-8h] [bp-10h]@4
  signed int v15; // [sp-4h] [bp-Ch]@2
  unsigned int dwQuestID; // [sp+4h] [bp-4h]@1
  QUEST_DATA *nStatus; // [sp+10h] [bp+8h]@4

  v5 = this;
  SlideListWin::RemoveAllList(this->m_pListWinContent);
  if ( SlideListWin::GetData(v5->m_pListWinQuestList, nIndex, &dwQuestID) )
  {
    v6 = dwQuestID;
    v15 = a3;
    v5->m_nSelectedID = dwQuestID;
    if ( v6 != -1 && v5->m_nCurSelTab == 1 )
    {
      v14 = a2;
      v7 = QuestDataMgr::GetQuest();
      nStatus = CQuest::GetNewQuestStatus((CQuest *)&v7->vfptr, v5->m_nSelectedID);
      v8 = v5->m_pkButText1->vfptr;
      if ( nStatus == (QUEST_DATA *)8 )
        v9 = TextData::Get(0xDA03E902);
      else
        v9 = TextData::Get(0xEF05ED51);
      ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *, int))v8[118].__vecDelDtor)(
        v5->m_pkButText1,
        v9,
        v14);
      if ( CQuestData::GetQuestData(v7->m_pQuestData, v5->m_nSelectedID)->End.bIsWaitListProgress
        || nStatus != (QUEST_DATA *)8 )
      {
        ((void (__stdcall *)(signed int))v5->m_pkAcceptBtn->vfptr[60].__vecDelDtor)(1);
        ((void (__stdcall *)(_DWORD))v5->m_pkAcceptBtnSpr->vfptr[60].__vecDelDtor)(0);
        v15 = 0;
      }
      else
      {
        ((void (__stdcall *)(_DWORD))v5->m_pkAcceptBtn->vfptr[60].__vecDelDtor)(0);
        ((void (__stdcall *)(signed int))v5->m_pkAcceptBtnSpr->vfptr[60].__vecDelDtor)(1);
        v15 = 1;
      }
      ((void (*)(void))v5->m_pkAcceptBtnSpr->vfptr[64].__vecDelDtor)();
    }
    if ( v5->m_nCurSelTab == 2 && v5->m_nSelectedID != -1 )
    {
      if ( v5->m_bLevelUp && !bCheck )
        v5->m_bLevelUp = 0;
      v5->m_bAutoClick = bCheck;
      v10 = QuestDataMgr::GetQuest();
      v11 = CQuestData::GetQuestData(v10->m_pQuestData, v5->m_nSelectedID)->Start.bIsWaitListProgress == 0;
      v12 = v5->m_pkAcceptBtn->vfptr[60].__vecDelDtor;
      if ( v11 )
      {
        ((void (__stdcall *)(_DWORD, signed int))v12)(0, v15);
        ((void (__stdcall *)(_DWORD))v5->m_pkAcceptBtn->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v5->m_pkAcceptBtnSpr->vfptr[60].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v5->m_pkAcceptBtnSpr->vfptr[64].__vecDelDtor)(0);
      }
      else
      {
        ((void (__stdcall *)(signed int, signed int))v12)(1, v15);
        ((void (__stdcall *)(_DWORD))v5->m_pkAcceptBtnSpr->vfptr[60].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v5->m_pkAcceptBtnSpr->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(signed int))v5->m_pkAcceptBtn->vfptr[64].__vecDelDtor)(1);
      }
      ((void (*)(void))v5->m_pkButText1->vfptr[64].__vecDelDtor)();
    }
    if ( v5->ms_pkMsgBox.m_pObject )
    {
      PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v5->ms_pkMsgBox.m_pObject->vfptr);
      v13 = v5->ms_pkMsgBox.m_pObject;
      if ( v13 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) )
        {
          if ( v13 )
            v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
        }
        v5->ms_pkMsgBox.m_pObject = 0;
      }
    }
    CQuestWin2::UpdateQuestData(v5);
  }
}
// 605AD0: could not find valid save-restore pair for ebx
// 605AD0: could not find valid save-restore pair for edi

//----- (00605D30) --------------------------------------------------------
bool __thiscall CQuestWin2::AddQuestListElement(CQuestWin2 *this, CQuestWin2::QData *rkQuest)
{
  CQuestWin2::QData *v2; // edi@1
  CQuestWin2 *v3; // ebx@1
  char *v4; // eax@1
  char *v5; // edx@3
  char v6; // cl@4
  int v7; // eax@5
  NiUnsharedGeometryGroup *v8; // eax@6
  NiUnsharedGeometryGroup *v9; // edx@6
  char v10; // cl@7
  unsigned int v11; // eax@8
  char *v12; // edi@8
  char v13; // cl@9
  NiUnsharedGeometryGroup *v14; // eax@14
  char v15; // cl@15
  char v16; // cl@17
  NiUnsharedGeometryGroup *v17; // eax@20
  char v18; // cl@21
  char v19; // cl@23
  NiUnsharedGeometryGroup *v20; // eax@26
  char v21; // cl@27
  char v22; // cl@29
  unsigned int v23; // esi@31
  const char *v24; // eax@31
  int v25; // eax@33
  char *v26; // eax@34
  const char *v27; // eax@34
  SlideListWin *v28; // ecx@34
  char *v29; // eax@37
  const char *v30; // eax@37
  QUEST_DATA *v31; // eax@43
  SlideListWin *v32; // ecx@43
  int v34; // [sp-8h] [bp-A4h]@39
  int v35; // [sp-4h] [bp-A0h]@33
  int v36; // [sp-4h] [bp-A0h]@39
  CClientQuest *pQuest; // [sp+Ch] [bp-90h]@1
  QUEST_DATA *lpQuestTitle; // [sp+10h] [bp-8Ch]@1
  CQuestWin2::QData *v39; // [sp+14h] [bp-88h]@1
  char acStrBuf[128]; // [sp+18h] [bp-84h]@1

  v2 = rkQuest;
  v3 = this;
  v39 = rkQuest;
  pQuest = QuestDataMgr::GetQuest();
  lpQuestTitle = CQuestData::GetQuestData(pQuest->m_pQuestData, rkQuest->dwQuestID);
  memset(acStrBuf, 0, 0x80u);
  v4 = rkQuest->strTitle._Bx._Buf;
  if ( rkQuest->strTitle._Myres >= 0x10 )
    v4 = *(char **)v4;
  v5 = (char *)(acStrBuf - v4);
  do
  {
    v6 = *v4;
    v4[(_DWORD)v5] = *v4;
    ++v4;
  }
  while ( v6 );
  v7 = rkQuest->nType;
  if ( v7 == 9 )
  {
    v8 = TextData2::Get(0x2B4D79B6u);
    v9 = v8;
    do
    {
      v10 = (char)v8->vfptr;
      v8 = (NiUnsharedGeometryGroup *)((char *)v8 + 1);
    }
    while ( v10 );
    v11 = (char *)v8 - (char *)v9;
    v12 = (char *)&v39 + 3;
    do
      v13 = (v12++)[1];
    while ( v13 );
LABEL_30:
    qmemcpy(v12, v9, v11);
    v2 = v39;
    goto LABEL_31;
  }
  if ( v7 != 6 )
  {
    if ( v7 == 7 )
    {
      v20 = TextData2::Get(0x3C468CBBu);
      v9 = v20;
      do
      {
        v21 = (char)v20->vfptr;
        v20 = (NiUnsharedGeometryGroup *)((char *)v20 + 1);
      }
      while ( v21 );
      v11 = (char *)v20 - (char *)v9;
      v12 = (char *)&v39 + 3;
      do
        v22 = (v12++)[1];
      while ( v22 );
    }
    else if ( v7 == 5 )
    {
      v14 = TextData2::Get(0x3C468CBBu);
      v9 = v14;
      do
      {
        v15 = (char)v14->vfptr;
        v14 = (NiUnsharedGeometryGroup *)((char *)v14 + 1);
      }
      while ( v15 );
      v11 = (char *)v14 - (char *)v9;
      v12 = (char *)&v39 + 3;
      do
        v16 = (v12++)[1];
      while ( v16 );
    }
    else
    {
      if ( v7 != 8 )
        goto LABEL_31;
      v17 = TextData2::Get(0x334635ABu);
      v9 = v17;
      do
      {
        v18 = (char)v17->vfptr;
        v17 = (NiUnsharedGeometryGroup *)((char *)v17 + 1);
      }
      while ( v18 );
      v11 = (char *)v17 - (char *)v9;
      v12 = (char *)&v39 + 3;
      do
        v19 = (v12++)[1];
      while ( v19 );
    }
    goto LABEL_30;
  }
LABEL_31:
  v23 = SlideListWin::AddText(v3->m_pListWinQuestList, acStrBuf);
  v24 = v2->strState._Bx._Buf;
  if ( v2->strState._Myres >= 0x10 )
    v24 = *(const char **)v24;
  SlideListWin::SetText(v3->m_pListWinQuestList, v23, 1u, v24);
  SlideListWin::SetData(v3->m_pListWinQuestList, v23, v2->dwData);
  SlideListWin::SetFontColor(v3->m_pListWinQuestList, v23, v2->r, v2->g, v2->b);
  v25 = User::Lv(&g_kUser);
  v35 = lpQuestTitle->Start.LevelMin;
  if ( v25 <= v35 + 5 )
  {
    v29 = (char *)TextData2::Get(0x499B738Eu);
    v30 = fs(v29, v35);
    SlideListWin::SetText(v3->m_pListWinQuestList, v23, 2u, v30);
    switch ( v2->nType )
    {
      case 9:
        SlideListWin::SetFontColor(v3->m_pListWinQuestList, v23, 252, 129, 236);
        break;
      case 6:
      case 7:
        v36 = 255;
        v34 = 0;
        goto LABEL_42;
      case 0xA:
        SlideListWin::SetFontColor(v3->m_pListWinQuestList, v23, 68, 255, 142);
        break;
      default:
        v36 = 0;
        v34 = 255;
LABEL_42:
        SlideListWin::SetFontColor(v3->m_pListWinQuestList, v23, 255, v34, v36);
        break;
    }
    v31 = CQuest::GetNewQuestStatus((CQuest *)&pQuest->vfptr, v2->dwQuestID);
    v32 = v3->m_pListWinQuestList;
    if ( v31 == (QUEST_DATA *)8 )
      SlideListWin::SetFontColor(v32, v23, 1u, 255, 0, 0);
    else
      SlideListWin::SetFontColor(v32, v23, 1u, 255, 255, 0);
    if ( v2->nType == 10 )
      goto LABEL_47;
  }
  else
  {
    v26 = (char *)TextData2::Get(0x499B738Eu);
    v27 = fs(v26, v35);
    SlideListWin::SetText(v3->m_pListWinQuestList, v23, 2u, v27);
    v28 = v3->m_pListWinQuestList;
    if ( v2->nType == 10 )
    {
      SlideListWin::SetFontColor(v28, v23, 68, 255, 142);
LABEL_47:
      SlideListWin::SetFontColor(v3->m_pListWinQuestList, v23, 1u, 68, 255, 142);
      return v3->m_nSelectedID == v2->dwQuestID;
    }
    SlideListWin::SetFontColor(v28, v23, 212, 111, 11);
    SlideListWin::SetFontColor(v3->m_pListWinQuestList, v23, 1u, 212, 111, 11);
  }
  return v3->m_nSelectedID == v2->dwQuestID;
}

//----- (00606060) --------------------------------------------------------
void __thiscall CQuestWin2::UpdateQuestStateIcon(CQuestWin2 *this)
{
  CQuestWin2 *v1; // ebx@1
  SlideListWin *v2; // ecx@1
  int v3; // eax@1
  int v4; // edi@1
  int v5; // esi@4
  int v6; // edi@4
  CClientQuest *v7; // eax@5
  QUEST_DATA *v8; // eax@5
  PgWin **v9; // esi@7
  char *v10; // eax@7
  PgWin **v11; // esi@8
  char *v12; // eax@8
  PgWin **v13; // esi@9
  char *v14; // eax@9
  PgWin **v15; // esi@10
  char *v16; // eax@10
  PgWin **v17; // esi@11
  char *v18; // eax@11
  PgWin **v19; // esi@12
  char *v20; // eax@12
  int v21; // esi@16
  int v22; // edi@16
  int v23; // eax@16
  int v24; // esi@16
  CQuest *v25; // ST14_4@16
  int v26; // edx@17
  CQuest *pQuest; // [sp+8h] [bp-2Ch]@5
  unsigned int dwQuestID; // [sp+Ch] [bp-28h]@4
  PgWinSpr **v29; // [sp+10h] [bp-24h]@2
  QUEST_DATA *lpQuest; // [sp+14h] [bp-20h]@5
  PgWin **v31; // [sp+18h] [bp-1Ch]@2
  PgWin **v32; // [sp+1Ch] [bp-18h]@2
  PgWin **v33; // [sp+20h] [bp-14h]@2
  PgWin **v34; // [sp+24h] [bp-10h]@2
  PgWin **v35; // [sp+28h] [bp-Ch]@2
  PgWin **v36; // [sp+2Ch] [bp-8h]@2
  int i; // [sp+30h] [bp-4h]@1

  v1 = this;
  CQuestWin2::ResetQuestStateIcon(this);
  v2 = v1->m_pListWinQuestList;
  v3 = (char *)v2->m_vecButList._Mylast - (char *)v2->m_vecButList._Myfirst;
  v4 = 0;
  i = 0;
  if ( (signed int)(v3 & 0xFFFFFFFC) > 0 )
  {
    v29 = v1->m_pkNewMark;
    v31 = (PgWin **)v1->m_pkSprQstDaily;
    v32 = (PgWin **)v1->m_pkSprQstInstance;
    v33 = (PgWin **)v1->m_pkSprQstEvent;
    v34 = (PgWin **)v1->m_pkSprQstJob;
    v35 = (PgWin **)v1->m_pkSprQstEpic;
    v36 = (PgWin **)v1->m_pkSprQstNor;
    while ( 1 )
    {
      v5 = SlideListWin::GetColumPosX(v2, v4, 3u);
      v6 = SlideListWin::GetColumPosY(v1->m_pListWinQuestList, v4, 3u);
      if ( SlideListWin::GetData(v1->m_pListWinQuestList, i + v1->m_pListWinQuestList->m_nViewStartPos, &dwQuestID) )
      {
        v7 = QuestDataMgr::GetQuest();
        pQuest = (CQuest *)v7;
        v8 = CQuestData::GetQuestData(v7->m_pQuestData, dwQuestID);
        lpQuest = v8;
        if ( v8 )
        {
          switch ( v8->Type )
          {
            case 0:
            case 5:
            case 8:
              ((void (__stdcall *)(_DWORD))(*v36)->vfptr[64].__vecDelDtor)(1);
              ((void (__stdcall *)(_DWORD))(*v36)->vfptr[43].__vecDelDtor)(v5);
              v9 = v36;
              ((void (__stdcall *)(_DWORD))(*v36)->vfptr[44].__vecDelDtor)(v6);
              ((void (__stdcall *)(_DWORD))(*v9)->vfptr[60].__vecDelDtor)(1);
              (*v9)->m_pkToolTipWin = g_pkToolTipWin;
              v10 = (char *)TextData2::Get(0xD8E4EDF6);
              PgWin::SetToolTipWinText(*v9, v10);
              v36 = v9 + 1;
              break;
            case 1:
            case 6:
            case 7:
              ((void (__stdcall *)(_DWORD))(*v35)->vfptr[64].__vecDelDtor)(1);
              ((void (__stdcall *)(_DWORD))(*v35)->vfptr[43].__vecDelDtor)(v5);
              v11 = v35;
              ((void (__stdcall *)(_DWORD))(*v35)->vfptr[44].__vecDelDtor)(v6);
              ((void (__stdcall *)(_DWORD))(*v11)->vfptr[60].__vecDelDtor)(1);
              (*v11)->m_pkToolTipWin = g_pkToolTipWin;
              v12 = (char *)TextData2::Get(0x8D9AE3ED);
              PgWin::SetToolTipWinText(*v11, v12);
              v35 = v11 + 1;
              break;
            case 2:
              ((void (__stdcall *)(_DWORD))(*v34)->vfptr[64].__vecDelDtor)(1);
              ((void (__stdcall *)(_DWORD))(*v34)->vfptr[43].__vecDelDtor)(v5);
              v13 = v34;
              ((void (__stdcall *)(_DWORD))(*v34)->vfptr[44].__vecDelDtor)(v6);
              ((void (__stdcall *)(_DWORD))(*v13)->vfptr[60].__vecDelDtor)(1);
              (*v13)->m_pkToolTipWin = g_pkToolTipWin;
              v14 = (char *)TextData2::Get(0x89EBF3E5);
              PgWin::SetToolTipWinText(*v13, v14);
              v34 = v13 + 1;
              break;
            case 3:
              ((void (__stdcall *)(_DWORD))(*v33)->vfptr[64].__vecDelDtor)(1);
              ((void (__stdcall *)(_DWORD))(*v33)->vfptr[43].__vecDelDtor)(v5);
              v15 = v33;
              ((void (__stdcall *)(_DWORD))(*v33)->vfptr[44].__vecDelDtor)(v6);
              ((void (__stdcall *)(_DWORD))(*v15)->vfptr[60].__vecDelDtor)(1);
              (*v15)->m_pkToolTipWin = g_pkToolTipWin;
              v16 = (char *)TextData2::Get(0x93EEEEE9);
              PgWin::SetToolTipWinText(*v15, v16);
              v33 = v15 + 1;
              break;
            case 4:
            case 9:
              ((void (__stdcall *)(_DWORD))(*v32)->vfptr[64].__vecDelDtor)(1);
              ((void (__stdcall *)(_DWORD))(*v32)->vfptr[43].__vecDelDtor)(v5);
              v17 = v32;
              ((void (__stdcall *)(_DWORD))(*v32)->vfptr[44].__vecDelDtor)(v6);
              ((void (__stdcall *)(_DWORD))(*v17)->vfptr[60].__vecDelDtor)(1);
              (*v17)->m_pkToolTipWin = g_pkToolTipWin;
              v18 = (char *)TextData2::Get(0x85EBEFE5);
              PgWin::SetToolTipWinText(*v17, v18);
              v32 = v17 + 1;
              break;
            case 0xA:
              ((void (__stdcall *)(_DWORD))(*v31)->vfptr[64].__vecDelDtor)(1);
              ((void (__stdcall *)(_DWORD))(*v31)->vfptr[43].__vecDelDtor)(v5);
              v19 = v31;
              ((void (__stdcall *)(_DWORD))(*v31)->vfptr[44].__vecDelDtor)(v6);
              ((void (__stdcall *)(_DWORD))(*v19)->vfptr[60].__vecDelDtor)(1);
              (*v19)->m_pkToolTipWin = g_pkToolTipWin;
              v20 = (char *)TextData2::Get(0xE4E5E4E9);
              PgWin::SetToolTipWinText(*v19, v20);
              v31 = v19 + 1;
              break;
            default:
              break;
          }
          if ( CQuest::GetNewQuestStatus(pQuest, lpQuest->ID) == (QUEST_DATA *)5
            && (v1->m_nSelectedID != lpQuest->ID || v1->m_bAutoClick) )
          {
            v21 = i;
            v22 = SlideListWin::GetColumPosX(v1->m_pListWinQuestList, i, 1u);
            v23 = SlideListWin::GetColumPosY(v1->m_pListWinQuestList, v21, 1u);
            v24 = (int)v29;
            v25 = (CQuest *)v23;
            ((void (__stdcall *)(_DWORD))(*v29)->vfptr[64].__vecDelDtor)(1);
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v24 + 172))(v22);
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v24 + 176))(v25);
            v29 = (PgWinSpr **)(v24 + 4);
          }
        }
      }
      v2 = v1->m_pListWinQuestList;
      v26 = v2->m_vecButList._Mylast - v2->m_vecButList._Myfirst;
      if ( ++i >= v26 )
        break;
      v4 = i;
    }
  }
  if ( v1->m_bLevelUp )
    ((void (__stdcall *)(_DWORD))v1->m_pkNewQuestReady->vfptr[64].__vecDelDtor)(1);
  else
    v1->m_pkNewQuestReady->vfptr[64].__vecDelDtor((NiRefObject *)v1->m_pkNewQuestReady, 0);
}

//----- (006064E0) --------------------------------------------------------
void __thiscall CQuestWin2::SetQuestContentText(CQuestWin2 *this, unsigned int hQuestID, const char *szText)
{
  CClientQuest *v3; // eax@1
  signed int i; // eax@1
  char *v5; // ebx@3
  CQuestWin2 *v6; // eax@3
  SlideListWin *v7; // eax@3
  int v8; // ecx@3
  ColumnBut **v9; // edx@5
  PgWinText *v10; // eax@6
  CSpFont *v11; // esi@9
  double v12; // st7@10
  char *j; // esi@10
  double v14; // st7@14
  PgFont *pkFont; // [sp+18h] [bp-3A8h]@9
  DialogParser::TokenDetail kDetail; // [sp+1Ch] [bp-3A4h]@1
  CQuestWin2 *v17; // [sp+24h] [bp-39Ch]@1
  QuestDialogParser kParser; // [sp+28h] [bp-398h]@1
  PgWinText *pkTestWin; // [sp+2Ch] [bp-394h]@4
  CSpFont font; // [sp+30h] [bp-390h]@1
  char szTemp2[256]; // [sp+1B0h] [bp-210h]@1
  char szTemp[256]; // [sp+2B0h] [bp-110h]@1
  int v23; // [sp+3BCh] [bp-4h]@1

  v17 = this;
  CSpFont::CSpFont(&font);
  v23 = 0;
  szTemp[0] = 0;
  memset(&szTemp[1], 0, 0xFFu);
  szTemp2[0] = 0;
  memset(&szTemp2[1], 0, 0xFFu);
  DialogParser::DialogParser((DialogParser *)&kParser.m_pcCurrentStr);
  v3 = QuestDataMgr::GetQuest();
  QuestDialogParser::StartParsing(&kParser, (CQuest *)&v3->vfptr, hQuestID);
  for ( i = DialogParser::Parse((DialogParser *)&kParser.m_pcCurrentStr, &kDetail);
        i != 11;
        i = DialogParser::Parse((DialogParser *)&kParser.m_pcCurrentStr, &kDetail) )
  {
    if ( !i )
    {
      v5 = fs(0);
      strncpy(v5, kDetail.kNormal.pcNormalStr, kDetail.kNormal.iLength);
      v6 = v17;
      v5[kDetail.kNormal.iLength] = 0;
      v7 = v6->m_pListWinContent;
      v8 = v7->m_vecButList._Mylast - v7->m_vecButList._Myfirst;
      if ( v8 )
      {
        v9 = v7->m_vecButList._Myfirst;
        v10 = (*v9)->m_vecTextWin._Mylast - (*v9)->m_vecTextWin._Myfirst ? *(*v9)->m_vecTextWin._Myfirst : 0;
        pkTestWin = v10;
        v8 = (int)v10;
      }
      else
      {
        pkTestWin = 0;
      }
      v11 = *(CSpFont **)(*(_DWORD *)(v8 + 288) + 312);
      pkFont = (PgFont *)v11;
      if ( v11 )
      {
        v12 = (double)(unsigned int)(*(int (**)(void))(*(_DWORD *)v8 + 144))() / 1.049999952316284;
        for ( j = CSpFont::SplitStrByPixelSize(v11, v5, (signed int)v12, 0);
              j;
              j = CSpFont::SplitStrByPixelSize((CSpFont *)&pkFont->vfptr, j, (signed int)v14, 0) )
        {
          strncpy(szTemp, v5, j - v5);
          szTemp[j - v5] = 0;
          if ( szText )
            sprintf(szTemp2, "%s%s", szText, szTemp);
          else
            sprintf(szTemp2, "%s", szTemp);
          SlideListWin::AddText(v17->m_pListWinContent, szTemp2);
          v5 = j;
          v14 = (double)(unsigned int)((int (*)(void))pkTestWin->vfptr[36].__vecDelDtor)() / 1.049999952316284;
        }
      }
    }
  }
  v23 = -1;
  CSpFont::~CSpFont(&font);
}

//----- (006067A0) --------------------------------------------------------
void __thiscall CQuestWin2::UpDateContentSideBar(CQuestWin2 *this)
{
  CQuestWin2 *v1; // esi@1
  SlideBar *v2; // ecx@1
  SlideListWin *v3; // eax@2
  int v4; // edi@3
  RewardWin *v5; // eax@3
  SlideListWin *v6; // eax@8
  unsigned int v7; // edi@8
  ColumnBut *v8; // eax@10
  PgWinText *v9; // ecx@11
  int v10; // edi@14
  int v11; // ebx@14
  SlideListWin *v12; // ecx@16
  SlideListWin *v13; // ecx@18
  unsigned int v14; // edi@18
  ColumnBut *v15; // eax@19
  int nPosX; // ST18_4@21
  int nPosY; // ST14_4@21
  AutoRunBut *v18; // ecx@21
  NiRefObjectVtbl *v19; // edi@21
  int v20; // eax@21
  int nViewStartIndex; // [sp+Ch] [bp-Ch]@16
  PgWinText *v22; // [sp+10h] [bp-8h]@20
  unsigned int dwNum; // [sp+14h] [bp-4h]@17

  v1 = this;
  v2 = this->m_pSlideBarContent;
  if ( v2 )
  {
    v3 = v1->m_pListWinContent;
    if ( v3 )
    {
      SlideBar::SetSplitCnt(v2, v3->m_nSlideSplitCnt);
      v4 = v1->m_pSlideBarContent->m_nCurPos;
      v1->m_pListWinContent->m_nViewStartPos = v4;
      SlideListWin::UpdateViewList(v1->m_pListWinContent);
      v5 = v1->m_pkRewardWin;
      if ( v4 + 1 == v1->m_pSlideBarContent->m_nSplitCnt )
      {
        if ( v5 )
          v5->m_uFlags &= 0xFFFEu;
      }
      else if ( v5 )
      {
        v5->m_uFlags |= 1u;
      }
      v6 = v1->m_pListWinContent;
      v7 = 0;
      if ( v6->m_nMaxViewListCnt > 0 )
      {
        do
        {
          if ( v7 < v6->m_vecButList._Mylast - v6->m_vecButList._Myfirst )
          {
            v8 = v6->m_vecButList._Myfirst[v7];
            if ( v8->m_vecTextWin._Mylast - v8->m_vecTextWin._Myfirst )
            {
              v9 = *v8->m_vecTextWin._Myfirst;
              if ( v9 )
                ((void (__stdcall *)(_DWORD))v9->vfptr[43].__vecDelDtor)(0);
            }
          }
          v6 = v1->m_pListWinContent;
          ++v7;
        }
        while ( (signed int)v7 < v6->m_nMaxViewListCnt );
      }
      v10 = (int)v1->m_pkAutoRunBut;
      v11 = 10;
      do
      {
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v10 + 256))(0);
        v10 += 4;
        --v11;
      }
      while ( v11 );
      v12 = v1->m_pListWinContent;
      nViewStartIndex = v12->m_nViewStartPos;
      if ( (signed int)(((char *)v12->m_vecButList._Mylast - (char *)v12->m_vecButList._Myfirst) & 0xFFFFFFFC) > 0 )
      {
        do
        {
          dwNum = -1;
          SlideListWin::GetData(v12, v11 + nViewStartIndex, &dwNum);
          if ( dwNum - 1 <= 9 )
          {
            v13 = v1->m_pListWinContent;
            v14 = dwNum - 1;
            if ( v11 < (unsigned int)(v13->m_vecButList._Mylast - v13->m_vecButList._Myfirst) )
            {
              v15 = v13->m_vecButList._Myfirst[v11];
              if ( v15->m_vecTextWin._Mylast - v15->m_vecTextWin._Myfirst )
              {
                v22 = *v15->m_vecTextWin._Myfirst;
                if ( v22 )
                {
                  nPosX = SlideListWin::GetColumPosX(v13, v11, 0);
                  nPosY = SlideListWin::GetColumPosY(v1->m_pListWinContent, v11, 0);
                  ((void (__stdcall *)(_DWORD))v1->m_pkAutoRunBut[v14].m_pObject->vfptr[60].__vecDelDtor)(v1->m_arryAutoButEnable[v14]);
                  ((void (__stdcall *)(_DWORD))v1->m_pkAutoRunBut[v14].m_pObject->vfptr[64].__vecDelDtor)(1);
                  ((void (__stdcall *)(_DWORD))v1->m_pkAutoRunBut[v14].m_pObject->vfptr[43].__vecDelDtor)(nPosX);
                  ((void (__stdcall *)(_DWORD))v1->m_pkAutoRunBut[v14].m_pObject->vfptr[44].__vecDelDtor)(nPosY);
                  v18 = v1->m_pkAutoRunBut[v14].m_pObject;
                  v19 = v22->vfptr;
                  v20 = ((int (*)(void))v18->vfptr[36].__vecDelDtor)();
                  v19[43].__vecDelDtor((NiRefObject *)v22, v20);
                }
              }
            }
          }
          v12 = v1->m_pListWinContent;
          ++v11;
        }
        while ( v11 < v12->m_vecButList._Mylast - v12->m_vecButList._Myfirst );
      }
    }
  }
}

//----- (00606A20) --------------------------------------------------------
void __userpurge CQuestWin2::SetSelectedID(CQuestWin2 *this@<ecx>, int a2@<ebx>, int a3@<edi>, int iSelectID)
{
  CQuestWin2 *v4; // esi@1
  CClientQuest *v5; // edi@2
  QUEST_DATA *v6; // ebx@2
  NiUnsharedGeometryGroup *v7; // eax@3
  NiUnsharedGeometryGroup *v8; // eax@4
  int v9; // [sp-8h] [bp-Ch]@2
  int v10; // [sp-4h] [bp-8h]@2
  int iSelectIDa; // [sp+Ch] [bp+8h]@3
  int iSelectIDb; // [sp+Ch] [bp+8h]@4

  v4 = this;
  CQuestWin2::ms_bUpdate = 1;
  this->m_nSelectedID = iSelectID;
  if ( iSelectID != -1 )
  {
    v10 = a2;
    v9 = a3;
    v5 = QuestDataMgr::GetQuest();
    v6 = CQuest::GetNewQuestStatus((CQuest *)&v5->vfptr, v4->m_nSelectedID);
    if ( v6 == (QUEST_DATA *)8 )
    {
      iSelectIDa = (int)v4->m_pkButText1->vfptr;
      v7 = TextData::Get(0xDA03E902);
      (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *, int, int))(iSelectIDa + 472))(
        v4->m_pkButText1,
        v7,
        v9,
        v10);
    }
    else
    {
      iSelectIDb = (int)v4->m_pkButText1->vfptr;
      v8 = TextData::Get(0xEF05ED51);
      (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *, int, int))(iSelectIDb + 472))(
        v4->m_pkButText1,
        v8,
        v9,
        v10);
    }
    if ( CQuestData::GetQuestData(v5->m_pQuestData, v4->m_nSelectedID)->End.bIsWaitListProgress || v6 != (QUEST_DATA *)8 )
    {
      ((void (__cdecl *)(signed int))v4->m_pkAcceptBtn->vfptr[60].__vecDelDtor)(1);
      ((void (__stdcall *)(_DWORD))v4->m_pkAcceptBtnSpr->vfptr[60].__vecDelDtor)(0);
    }
    else
    {
      ((void (__cdecl *)(_DWORD))v4->m_pkAcceptBtn->vfptr[60].__vecDelDtor)(0);
      ((void (__stdcall *)(signed int))v4->m_pkAcceptBtnSpr->vfptr[60].__vecDelDtor)(1);
    }
    ((void (*)(void))v4->m_pkAcceptBtnSpr->vfptr[64].__vecDelDtor)();
  }
}
// 606A20: could not find valid save-restore pair for ebx
// 606A20: could not find valid save-restore pair for edi
// A8EA8C: using guessed type bool CQuestWin2::ms_bUpdate;

//----- (00606B40) --------------------------------------------------------
void __thiscall EpicQuestWin::OnSlideBarContent(EpicQuestWin *this)
{
  EpicQuestWin *v1; // esi@1
  SlideBar *v2; // ecx@1
  SlideListWin *v3; // eax@2

  v1 = this;
  v2 = this->m_pSlideBarContent;
  if ( v2 )
  {
    v3 = v1->m_pListWinContent;
    if ( v3 )
    {
      SlideBar::SetSplitCnt(v2, v3->m_nSlideSplitCnt);
      v1->m_pListWinContent->m_nViewStartPos = v1->m_pSlideBarContent->m_nCurPos;
      SlideListWin::UpdateViewList(v1->m_pListWinContent);
    }
  }
}

//----- (00606B90) --------------------------------------------------------
bool __thiscall EpicQuestWin::AddQuestListElement(EpicQuestWin *this, EpicQuestWin::QData *rkQuest)
{
  EpicQuestWin::QData *v2; // edi@1
  EpicQuestWin *v3; // ebx@1
  char *v4; // eax@1
  char *v5; // edx@3
  char v6; // cl@4
  int v7; // eax@5
  NiUnsharedGeometryGroup *v8; // eax@6
  NiUnsharedGeometryGroup *v9; // edx@6
  char v10; // cl@7
  unsigned int v11; // eax@8
  char *v12; // edi@8
  char v13; // cl@9
  NiUnsharedGeometryGroup *v14; // eax@14
  char v15; // cl@15
  char v16; // cl@17
  NiUnsharedGeometryGroup *v17; // eax@20
  char v18; // cl@21
  char v19; // cl@23
  NiUnsharedGeometryGroup *v20; // eax@26
  char v21; // cl@27
  char v22; // cl@29
  unsigned int v23; // esi@31
  int v24; // edi@31
  char *v25; // eax@31
  const char *v26; // eax@31
  int v27; // eax@31
  EpicQuestWin::eUI_TYPE v28; // ecx@33
  char *v29; // eax@35
  const char *v30; // eax@35
  char *v31; // eax@36
  const char *v32; // eax@36
  unsigned __int16 *v33; // edi@36
  signed int v34; // eax@36
  QUEST_DATA *v35; // eax@43
  SlideListWin *v36; // ecx@43
  char *v37; // eax@47
  const char *v38; // eax@47
  int v40; // [sp-8h] [bp-A8h]@40
  int v41; // [sp-4h] [bp-A4h]@40
  CClientQuest *pQuest; // [sp+Ch] [bp-94h]@1
  int UserLv; // [sp+10h] [bp-90h]@31
  QUEST_DATA *lpQuestTitle; // [sp+14h] [bp-8Ch]@1
  EpicQuestWin::QData *v45; // [sp+18h] [bp-88h]@1
  char acStrBuf[128]; // [sp+1Ch] [bp-84h]@1

  v2 = rkQuest;
  v3 = this;
  v45 = rkQuest;
  pQuest = QuestDataMgr::GetQuest();
  lpQuestTitle = CQuestData::GetQuestData(pQuest->m_pQuestData, rkQuest->dwQuestID);
  memset(acStrBuf, 0, 0x80u);
  v4 = rkQuest->strTitle._Bx._Buf;
  if ( rkQuest->strTitle._Myres >= 0x10 )
    v4 = *(char **)v4;
  v5 = (char *)(acStrBuf - v4);
  do
  {
    v6 = *v4;
    v4[(_DWORD)v5] = *v4;
    ++v4;
  }
  while ( v6 );
  v7 = rkQuest->nType;
  if ( v7 == 9 )
  {
    v8 = TextData2::Get(0x2B4D79B6u);
    v9 = v8;
    do
    {
      v10 = (char)v8->vfptr;
      v8 = (NiUnsharedGeometryGroup *)((char *)v8 + 1);
    }
    while ( v10 );
    v11 = (char *)v8 - (char *)v9;
    v12 = (char *)&v45 + 3;
    do
      v13 = (v12++)[1];
    while ( v13 );
LABEL_30:
    qmemcpy(v12, v9, v11);
    v2 = v45;
    goto LABEL_31;
  }
  if ( v7 != 6 )
  {
    if ( v7 == 7 )
    {
      v20 = TextData2::Get(0x3C468CBBu);
      v9 = v20;
      do
      {
        v21 = (char)v20->vfptr;
        v20 = (NiUnsharedGeometryGroup *)((char *)v20 + 1);
      }
      while ( v21 );
      v11 = (char *)v20 - (char *)v9;
      v12 = (char *)&v45 + 3;
      do
        v22 = (v12++)[1];
      while ( v22 );
    }
    else if ( v7 == 5 )
    {
      v14 = TextData2::Get(0x3C468CBBu);
      v9 = v14;
      do
      {
        v15 = (char)v14->vfptr;
        v14 = (NiUnsharedGeometryGroup *)((char *)v14 + 1);
      }
      while ( v15 );
      v11 = (char *)v14 - (char *)v9;
      v12 = (char *)&v45 + 3;
      do
        v16 = (v12++)[1];
      while ( v16 );
    }
    else
    {
      if ( v7 != 8 )
        goto LABEL_31;
      v17 = TextData2::Get(0x334635ABu);
      v9 = v17;
      do
      {
        v18 = (char)v17->vfptr;
        v17 = (NiUnsharedGeometryGroup *)((char *)v17 + 1);
      }
      while ( v18 );
      v11 = (char *)v17 - (char *)v9;
      v12 = (char *)&v45 + 3;
      do
        v19 = (v12++)[1];
      while ( v19 );
    }
    goto LABEL_30;
  }
LABEL_31:
  v23 = SlideListWin::AddText(v3->m_pListWinQuestList, acStrBuf);
  SlideListWin::SetData(v3->m_pListWinQuestList, v23, v2->dwData);
  SlideListWin::SetFontColor(v3->m_pListWinQuestList, v23, v2->r, v2->g, v2->b);
  v24 = lpQuestTitle->Start.LevelMin;
  UserLv = User::Lv(&g_kUser);
  v25 = (char *)TextData2::Get(0x499B738Eu);
  v26 = fs(v25, v24);
  SlideListWin::SetText(v3->m_pListWinQuestList, v23, 2u, v26);
  v27 = v24 + 5;
  if ( UserLv > v24 + 5 )
  {
    SlideListWin::SetFontColor(v3->m_pListWinQuestList, v23, 212, 111, 11);
    v27 = v24 + 5;
  }
  v28 = v3->m_eType;
  if ( v28 == 1 )
  {
    if ( UserLv > v27 )
    {
      v29 = (char *)TextData2::Get(0x499B738Eu);
      v30 = fs(v29, v24);
      SlideListWin::SetText(v3->m_pListWinQuestList, v23, 2u, v30);
      SlideListWin::SetFontColor(v3->m_pListWinQuestList, v23, 212, 111, 11);
      SlideListWin::SetFontColor(v3->m_pListWinQuestList, v23, 1u, 212, 111, 11);
      return v3->m_nSelectedID == v45->dwQuestID;
    }
    v31 = (char *)TextData2::Get(0x499B738Eu);
    v32 = fs(v31, v24);
    SlideListWin::SetText(v3->m_pListWinQuestList, v23, 2u, v32);
    v33 = (unsigned __int16 *)v45;
    v34 = v45->nType;
    if ( v34 >= 6 )
    {
      if ( v34 <= 7 )
      {
        v41 = 255;
        v40 = 0;
LABEL_42:
        SlideListWin::SetFontColor(v3->m_pListWinQuestList, v23, 255, v40, v41);
LABEL_43:
        v35 = CQuest::GetNewQuestStatus((CQuest *)&pQuest->vfptr, *v33);
        v36 = v3->m_pListWinQuestList;
        if ( v35 == (QUEST_DATA *)8 )
          SlideListWin::SetFontColor(v36, v23, 1u, 255, 0, 0);
        else
          SlideListWin::SetFontColor(v36, v23, 1u, 255, 255, 0);
        return v3->m_nSelectedID == v45->dwQuestID;
      }
      if ( v34 == 9 )
      {
        SlideListWin::SetFontColor(v3->m_pListWinQuestList, v23, 252, 129, 236);
        goto LABEL_43;
      }
    }
    v41 = 0;
    v40 = 255;
    goto LABEL_42;
  }
  if ( v28 == UI_LOW_LEVEL )
  {
    v37 = (char *)TextData2::Get(0x499B738Eu);
    v38 = fs(v37, v24);
    SlideListWin::SetText(v3->m_pListWinQuestList, v23, 2u, v38);
    if ( UserLv > v24 + 5 )
      SlideListWin::SetFontColor(v3->m_pListWinQuestList, v23, 212, 111, 11);
  }
  return v3->m_nSelectedID == v45->dwQuestID;
}

//----- (00606F30) --------------------------------------------------------
void __thiscall EpicQuestWin::SetQuestContentText(EpicQuestWin *this, unsigned int hQuestID, const char *szText)
{
  CClientQuest *v3; // eax@1
  signed int i; // eax@1
  char *v5; // ebx@3
  EpicQuestWin *v6; // eax@3
  SlideListWin *v7; // eax@3
  int v8; // ecx@3
  ColumnBut **v9; // edx@5
  PgWinText *v10; // eax@6
  CSpFont *v11; // esi@9
  double v12; // st7@10
  char *j; // esi@10
  double v14; // st7@14
  PgFont *pkFont; // [sp+18h] [bp-3A8h]@9
  DialogParser::TokenDetail kDetail; // [sp+1Ch] [bp-3A4h]@1
  EpicQuestWin *v17; // [sp+24h] [bp-39Ch]@1
  QuestDialogParser kParser; // [sp+28h] [bp-398h]@1
  PgWinText *pkTestWin; // [sp+2Ch] [bp-394h]@4
  CSpFont font; // [sp+30h] [bp-390h]@1
  char szTemp2[256]; // [sp+1B0h] [bp-210h]@1
  char szTemp[256]; // [sp+2B0h] [bp-110h]@1
  int v23; // [sp+3BCh] [bp-4h]@1

  v17 = this;
  CSpFont::CSpFont(&font);
  v23 = 0;
  szTemp[0] = 0;
  memset(&szTemp[1], 0, 0xFFu);
  szTemp2[0] = 0;
  memset(&szTemp2[1], 0, 0xFFu);
  DialogParser::DialogParser((DialogParser *)&kParser.m_pcCurrentStr);
  v3 = QuestDataMgr::GetQuest();
  QuestDialogParser::StartParsing(&kParser, (CQuest *)&v3->vfptr, hQuestID);
  for ( i = DialogParser::Parse((DialogParser *)&kParser.m_pcCurrentStr, &kDetail);
        i != 11;
        i = DialogParser::Parse((DialogParser *)&kParser.m_pcCurrentStr, &kDetail) )
  {
    if ( !i )
    {
      v5 = fs(0);
      strncpy(v5, kDetail.kNormal.pcNormalStr, kDetail.kNormal.iLength);
      v6 = v17;
      v5[kDetail.kNormal.iLength] = 0;
      v7 = v6->m_pListWinContent;
      v8 = v7->m_vecButList._Mylast - v7->m_vecButList._Myfirst;
      if ( v8 )
      {
        v9 = v7->m_vecButList._Myfirst;
        v10 = (*v9)->m_vecTextWin._Mylast - (*v9)->m_vecTextWin._Myfirst ? *(*v9)->m_vecTextWin._Myfirst : 0;
        pkTestWin = v10;
        v8 = (int)v10;
      }
      else
      {
        pkTestWin = 0;
      }
      v11 = *(CSpFont **)(*(_DWORD *)(v8 + 288) + 312);
      pkFont = (PgFont *)v11;
      if ( v11 )
      {
        v12 = (double)(unsigned int)(*(int (**)(void))(*(_DWORD *)v8 + 144))() / 1.049999952316284;
        for ( j = CSpFont::SplitStrByPixelSize(v11, v5, (signed int)v12, 0);
              j;
              j = CSpFont::SplitStrByPixelSize((CSpFont *)&pkFont->vfptr, j, (signed int)v14, 0) )
        {
          strncpy(szTemp, v5, j - v5);
          szTemp[j - v5] = 0;
          if ( szText )
            sprintf(szTemp2, "%s%s", szText, szTemp);
          else
            sprintf(szTemp2, "%s", szTemp);
          SlideListWin::AddText(v17->m_pListWinContent, szTemp2);
          v5 = j;
          v14 = (double)(unsigned int)((int (*)(void))pkTestWin->vfptr[36].__vecDelDtor)() / 1.049999952316284;
        }
      }
    }
  }
  v23 = -1;
  CSpFont::~CSpFont(&font);
}

//----- (006071F0) --------------------------------------------------------
void __thiscall EpicQuestWin::UpdateQuestStateIcon(EpicQuestWin *this)
{
  EpicQuestWin *v1; // edi@1
  SlideListWin *v2; // ecx@1
  int v3; // eax@1
  PgWin **v4; // ebx@2
  int v5; // esi@4
  int v6; // edi@4
  CClientQuest *v7; // eax@5
  QUEST_DATA *v8; // eax@5
  PgWin **v9; // esi@7
  char *v10; // eax@7
  PgWin **v11; // esi@8
  char *v12; // eax@8
  PgWin **v13; // esi@9
  char *v14; // eax@9
  PgWin **v15; // esi@10
  char *v16; // eax@10
  char *v17; // eax@11
  int v18; // edx@12
  unsigned int dwQuestID; // [sp+4h] [bp-1Ch]@4
  EpicQuestWin *v20; // [sp+8h] [bp-18h]@1
  PgWin **v21; // [sp+Ch] [bp-14h]@2
  PgWin **v22; // [sp+10h] [bp-10h]@2
  PgWin **v23; // [sp+14h] [bp-Ch]@2
  PgWin **v24; // [sp+18h] [bp-8h]@2
  int i; // [sp+1Ch] [bp-4h]@1

  v1 = this;
  v20 = this;
  EpicQuestWin::ResetQuestStateIcon(this);
  v2 = v1->m_pListWinQuestList;
  v3 = (char *)v2->m_vecButList._Mylast - (char *)v2->m_vecButList._Myfirst;
  i = 0;
  if ( (signed int)(v3 & 0xFFFFFFFC) > 0 )
  {
    v21 = (PgWin **)v1->m_pkSprQstEvent;
    v22 = (PgWin **)v1->m_pkSprQstJob;
    v4 = (PgWin **)v1->m_pkSprQstInstance;
    v23 = (PgWin **)v1->m_pkSprQstEpic;
    v24 = (PgWin **)v1->m_pkSprQstNor;
    while ( 1 )
    {
      v5 = SlideListWin::GetColumPosX(v2, i, 1u);
      v6 = SlideListWin::GetColumPosY(v1->m_pListWinQuestList, i, 1u);
      if ( SlideListWin::GetData(v20->m_pListWinQuestList, i + v20->m_pListWinQuestList->m_nViewStartPos, &dwQuestID) )
      {
        v7 = QuestDataMgr::GetQuest();
        v8 = CQuestData::GetQuestData(v7->m_pQuestData, dwQuestID);
        if ( v8 )
        {
          switch ( v8->Type )
          {
            case 0:
            case 5:
            case 8:
              ((void (__stdcall *)(_DWORD))(*v24)->vfptr[64].__vecDelDtor)(1);
              ((void (__stdcall *)(_DWORD))(*v24)->vfptr[43].__vecDelDtor)(v5);
              v9 = v24;
              ((void (__stdcall *)(_DWORD))(*v24)->vfptr[44].__vecDelDtor)(v6);
              ((void (__stdcall *)(_DWORD))(*v9)->vfptr[60].__vecDelDtor)(1);
              (*v9)->m_pkToolTipWin = g_pkToolTipWin;
              v10 = (char *)TextData2::Get(0xD8E4EDF6);
              PgWin::SetToolTipWinText(*v9, v10);
              v24 = v9 + 1;
              break;
            case 1:
            case 6:
            case 7:
              ((void (__stdcall *)(_DWORD))(*v23)->vfptr[64].__vecDelDtor)(1);
              ((void (__stdcall *)(_DWORD))(*v23)->vfptr[43].__vecDelDtor)(v5);
              v11 = v23;
              ((void (__stdcall *)(_DWORD))(*v23)->vfptr[44].__vecDelDtor)(v6);
              ((void (__stdcall *)(_DWORD))(*v11)->vfptr[60].__vecDelDtor)(1);
              (*v11)->m_pkToolTipWin = g_pkToolTipWin;
              v12 = (char *)TextData2::Get(0x8D9AE3ED);
              PgWin::SetToolTipWinText(*v11, v12);
              v23 = v11 + 1;
              break;
            case 2:
              ((void (__stdcall *)(_DWORD))(*v22)->vfptr[64].__vecDelDtor)(1);
              ((void (__stdcall *)(_DWORD))(*v22)->vfptr[43].__vecDelDtor)(v5);
              v13 = v22;
              ((void (__stdcall *)(_DWORD))(*v22)->vfptr[44].__vecDelDtor)(v6);
              ((void (__stdcall *)(_DWORD))(*v13)->vfptr[60].__vecDelDtor)(1);
              (*v13)->m_pkToolTipWin = g_pkToolTipWin;
              v14 = (char *)TextData2::Get(0x89EBF3E5);
              PgWin::SetToolTipWinText(*v13, v14);
              v22 = v13 + 1;
              break;
            case 3:
              ((void (__stdcall *)(_DWORD))(*v21)->vfptr[64].__vecDelDtor)(1);
              ((void (__stdcall *)(_DWORD))(*v21)->vfptr[43].__vecDelDtor)(v5);
              v15 = v21;
              ((void (__stdcall *)(_DWORD))(*v21)->vfptr[44].__vecDelDtor)(v6);
              ((void (__stdcall *)(_DWORD))(*v15)->vfptr[60].__vecDelDtor)(1);
              (*v15)->m_pkToolTipWin = g_pkToolTipWin;
              v16 = (char *)TextData2::Get(0x93EEEEE9);
              PgWin::SetToolTipWinText(*v15, v16);
              v21 = v15 + 1;
              break;
            case 4:
            case 9:
              ((void (__stdcall *)(_DWORD))(*v4)->vfptr[64].__vecDelDtor)(1);
              ((void (__stdcall *)(_DWORD))(*v4)->vfptr[43].__vecDelDtor)(v5);
              ((void (__stdcall *)(_DWORD))(*v4)->vfptr[44].__vecDelDtor)(v6);
              ((void (__stdcall *)(_DWORD))(*v4)->vfptr[60].__vecDelDtor)(1);
              (*v4)->m_pkToolTipWin = g_pkToolTipWin;
              v17 = (char *)TextData2::Get(0x85EBEFE5);
              PgWin::SetToolTipWinText(*v4, v17);
              ++v4;
              break;
            default:
              break;
          }
        }
      }
      v2 = v20->m_pListWinQuestList;
      v18 = v2->m_vecButList._Mylast - v2->m_vecButList._Myfirst;
      if ( ++i >= v18 )
        break;
      v1 = v20;
    }
  }
}

//----- (00607540) --------------------------------------------------------
void __thiscall CQuestWin2::UpDateListSideBar(CQuestWin2 *this)
{
  CQuestWin2 *v1; // esi@1
  SlideBar *v2; // ecx@1
  SlideListWin *v3; // eax@2

  v1 = this;
  v2 = this->m_pSlideBarList;
  if ( v2 )
  {
    v3 = v1->m_pListWinQuestList;
    if ( v3 )
    {
      SlideBar::SetSplitCnt(v2, v3->m_nSlideSplitCnt);
      v1->m_pListWinQuestList->m_nViewStartPos = v1->m_pSlideBarList->m_nCurPos;
      SlideListWin::UpdateViewList(v1->m_pListWinQuestList);
      CQuestWin2::UpdateQuestStateIcon(v1);
    }
  }
}

//----- (00607590) --------------------------------------------------------
char __thiscall CQuestWin2::AddAutoBlinkBut(CQuestWin2 *this, PgWinBut *But)
{
  char result; // al@2
  NiTArray<NiVBChip *> *v3; // esi@3
  unsigned int v4; // edi@3

  if ( But )
  {
    v3 = (NiTArray<NiVBChip *> *)&this->m_kAutoBlinkButList;
    v4 = this->m_kAutoBlinkButList.m_uiSize;
    if ( v4 >= this->m_kAutoBlinkButList.m_uiMaxSize )
      NiTArray<NiGeometry *>::SetSize(
        (NiTArray<NiTPointerList<NiPointer<NiProperty> > *> *)&this->m_kAutoBlinkButList,
        v4 + this->m_kAutoBlinkButList.m_uiGrowBy);
    NiTArray<NiCollisionGroup::Record *>::SetAt(v3, v4, (NiVBChip *const *)&But);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006075D0) --------------------------------------------------------
void __thiscall EpicQuestWin::UpDateListSideBar(EpicQuestWin *this)
{
  EpicQuestWin *v1; // esi@1
  SlideBar *v2; // ecx@1
  SlideListWin *v3; // eax@2

  v1 = this;
  v2 = this->m_pSlideBarList;
  if ( v2 )
  {
    v3 = v1->m_pListWinQuestList;
    if ( v3 )
    {
      SlideBar::SetSplitCnt(v2, v3->m_nSlideSplitCnt);
      v1->m_pListWinQuestList->m_nViewStartPos = v1->m_pSlideBarList->m_nCurPos;
      SlideListWin::UpdateViewList(v1->m_pListWinQuestList);
      EpicQuestWin::UpdateQuestStateIcon(v1);
    }
  }
}

//----- (00607620) --------------------------------------------------------
void __thiscall CQuestWin2::OnSlideBarList(CQuestWin2 *this)
{
  CQuestWin2 *v1; // esi@1
  SlideBar *v2; // ecx@1
  SlideListWin *v3; // eax@2

  v1 = this;
  v2 = this->m_pSlideBarList;
  if ( v2 )
  {
    v3 = v1->m_pListWinQuestList;
    if ( v3 )
    {
      SlideBar::SetSplitCnt(v2, v3->m_nSlideSplitCnt);
      v1->m_pListWinQuestList->m_nViewStartPos = v1->m_pSlideBarList->m_nCurPos;
      SlideListWin::UpdateViewList(v1->m_pListWinQuestList);
      CQuestWin2::UpdateQuestStateIcon(v1);
    }
  }
}

//----- (00607670) --------------------------------------------------------
void __thiscall EpicQuestWin::OnSlideBarList(EpicQuestWin *this)
{
  EpicQuestWin *v1; // esi@1
  SlideBar *v2; // ecx@1
  SlideListWin *v3; // eax@2

  v1 = this;
  v2 = this->m_pSlideBarList;
  if ( v2 )
  {
    v3 = v1->m_pListWinQuestList;
    if ( v3 )
    {
      SlideBar::SetSplitCnt(v2, v3->m_nSlideSplitCnt);
      v1->m_pListWinQuestList->m_nViewStartPos = v1->m_pSlideBarList->m_nCurPos;
      SlideListWin::UpdateViewList(v1->m_pListWinQuestList);
      EpicQuestWin::UpdateQuestStateIcon(v1);
    }
  }
}

//----- (006076C0) --------------------------------------------------------
void __thiscall CQuestWin2::OnGiveUp(CQuestWin2 *this)
{
  CQuestWin2 *v1; // esi@1
  CClientQuest *v2; // eax@3
  QUEST_DATA *v3; // eax@3
  QUEST_DATA *v4; // ebx@3
  char *v5; // eax@6
  NiD3DDefaultShader *v6; // eax@6
  unsigned int v7; // edx@6
  unsigned int v8; // eax@6
  PgFrameWork *v9; // eax@6
  int v10; // eax@7
  GameFrameWork *v11; // eax@12
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > result; // [sp+4h] [bp-20h]@10
  unsigned __int16 _Keyval[2]; // [sp+8h] [bp-1Ch]@10
  PgMsg::Frame kOkMsg; // [sp+Ch] [bp-18h]@6

  v1 = this;
  if ( this->m_nSelectedID >= 0 && SlideListWin::GetItemSize(this->m_pListWinQuestList) )
  {
    v2 = QuestDataMgr::GetQuest();
    v3 = CQuest::GetNewQuestStatus((CQuest *)&v2->vfptr, v1->m_nSelectedID);
    v4 = v3;
    if ( !v1->ms_pkMsgBox.m_pObject && v1->m_nCurSelTab == 1 && v3 != (QUEST_DATA *)8 )
    {
      v5 = (char *)TextData::Get(0x8B87929C);
      v6 = (NiD3DDefaultShader *)MsgBox::Modeless(MSGBOX_OKCANCEL, v5);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v1->ms_pkMsgBox, v6);
      v7 = v1->m_nSelectedID;
      v8 = v1->m_nCurSelTab;
      kOkMsg.m_uiFrameMsg = 260;
      kOkMsg.m_uiFramelParam = v7;
      kOkMsg.m_uiFrameWParam = v8;
      v9 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      MsgBox::SetFrameWorkMsgOnClose(v1->ms_pkMsgBox.m_pObject, v9, &kOkMsg, 0);
      v1->ms_pkMsgBox.m_pObject->vfptr->SetMsgHooker(&v1->ms_pkMsgBox.m_pObject->vfptr, &v1->vfptr);
    }
    v10 = v1->m_nCurSelTab;
    if ( v10 == 2 )
      goto LABEL_16;
    if ( v4 != (QUEST_DATA *)8 )
      return;
    if ( v10 == 2 )
    {
LABEL_16:
      *(_DWORD *)_Keyval = LOWORD(v1->m_nSelectedID);
      if ( std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::find(
             (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v1->m_setAbleQuest.comp,
             &result,
             _Keyval)->_Ptr != v1->m_setAbleQuest._Myhead )
        v1->m_bLevelUp = 0;
    }
    v11 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v11 )
      GameFrameWork::NcQuestStartReq(v11, v1->m_nSelectedID);
  }
}

//----- (00607820) --------------------------------------------------------
EpicQuestWin *__cdecl EpicQuestWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  EpicQuestWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x290u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    EpicQuestWin::EpicQuestWin((EpicQuestWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (EpicQuestWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00607950) --------------------------------------------------------
AutoRunBut *__cdecl AutoRunBut::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, char *pcName, unsigned int uiExtStyle)
{
  PgWin *v7; // eax@1
  PgWin *v8; // esi@1
  PgWin *v9; // edi@8
  AutoRunBut *v10; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v12; // [sp+20h] [bp-4h]@1

  v7 = (PgWin *)operator new(0x144u);
  v8 = v7;
  result.m_pObject = v7;
  v12 = 0;
  if ( v7 )
  {
    PgWinBut::PgWinBut((PgWinBut *)v7);
    v8->vfptr = (NiRefObjectVtbl *)&AutoRunBut::`vftable'{for `NiNode'};
    v8->vfptr = (IDirectMessengerVtbl *)&AutoRunBut::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v8 = 0;
  }
  if ( v8 )
    InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  v12 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v8);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgSprData *, PgWin *, unsigned int, char *, unsigned int))v8->vfptr[137].__vecDelDtor)(
                          v8,
                          iXPos,
                          iYPos,
                          pkSprData,
                          pkParent,
                          uiCmdMsg,
                          pcName,
                          uiExtStyle) )
  {
    ((void (__thiscall *)(PgWin *))v8->vfptr[89].__vecDelDtor)(v8);
    v12 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v10 = (AutoRunBut *)v8;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v8);
    if ( result.m_pObject )
    {
      v9 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v9 )
          v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      }
    }
    v12 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v10 = 0;
  }
  return v10;
}
// 9B6004: using guessed type void (__thiscall *AutoRunBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B6024: using guessed type int (__thiscall *AutoRunBut::`vftable'{for `NiNode'})(void *p, char);

//----- (00607AB0) --------------------------------------------------------
void __thiscall CQuestWin2::~CQuestWin2(CQuestWin2 *this)
{
  CQuestWin2 *v1; // esi@1
  char *v2; // ebx@1
  int v3; // edi@2
  PgWinBut **v4; // ST0C_4@8
  NiSourceTexture *v5; // edi@8
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > v6; // ST0C_4@12
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > v7; // ST08_4@12
  MsgBox *v8; // edi@12
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > result; // [sp+10h] [bp-18h]@12
  CQuestWin2 *v10; // [sp+14h] [bp-14h]@1
  std::set<unsigned short,std::less<unsigned short>,std::allocator<unsigned short> > *v11; // [sp+18h] [bp-10h]@1
  int v12; // [sp+24h] [bp-4h]@1

  v1 = this;
  v10 = this;
  this->vfptr = (NiRefObjectVtbl *)&CQuestWin2::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CQuestWin2::`vftable'{for `IDirectMessenger'};
  v12 = 6;
  v2 = (char *)this->m_pkAutoRunBut;
  v11 = (std::set<unsigned short,std::less<unsigned short>,std::allocator<unsigned short> > *)10;
  do
  {
    v3 = *(_DWORD *)v2;
    if ( *(_DWORD *)v2 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v3 + 4)) && v3 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v3)(v3, 1);
      *(_DWORD *)v2 = 0;
    }
    v2 += 4;
    v11 = (std::set<unsigned short,std::less<unsigned short>,std::allocator<unsigned short> > *)((char *)v11 - 1);
  }
  while ( v11 );
  v4 = v1->m_kAutoBlinkButList.m_pBase;
  v1->m_kAutoBlinkButList.vfptr = (NiTArray<PgWinBut *>Vtbl *)&NiTArray<PgWinBut *>::`vftable';
  operator delete[](v4);
  LOBYTE(v12) = 4;
  `eh vector destructor iterator'(
    v1->m_pkAutoRunBut,
    4u,
    10,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v5 = v1->m_ButtonspTexture.m_pObject;
  LOBYTE(v12) = 3;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  v11 = &v1->m_setAbleQuest;
  v6._Ptr = v1->m_setAbleQuest._Myhead;
  v7._Ptr = v1->m_setAbleQuest._Myhead->_Left;
  LOBYTE(v12) = 7;
  std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::erase(
    (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v1->m_setAbleQuest.comp,
    &result,
    v7,
    v6);
  operator delete(v1->m_setAbleQuest._Myhead);
  v8 = v1->ms_pkMsgBox.m_pObject;
  LOBYTE(v12) = 1;
  if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
    v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
  LOBYTE(v12) = 0;
  ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v1->m_kMarkCheck);
  v12 = -1;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9B6258: using guessed type int (__thiscall *NiTArray<PgWinBut *>::`vftable')(void *p, char);
// 9B64A0: using guessed type void (__thiscall *CQuestWin2::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B64BC: using guessed type int (__thiscall *CQuestWin2::`vftable'{for `NiNode'})(void *p, char);

//----- (00607C20) --------------------------------------------------------
void __thiscall CQuestWin2::CQuestWin2(CQuestWin2 *this)
{
  CQuestWin2 *v1; // esi@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v2; // eax@1
  MsgBox *v3; // eax@2
  NiPointer<AutoRunBut> *v4; // eax@9
  signed int v5; // edi@9
  AutoRunBut *v6; // eax@10
  int v7; // eax@15
  std::exception pExceptionObject; // [sp+10h] [bp-24h]@17
  CQuestWin2 *v9; // [sp+1Ch] [bp-18h]@1
  void *p; // [sp+20h] [bp-14h]@2
  NiPointer<AutoRunBut> *v11; // [sp+24h] [bp-10h]@7
  int v12; // [sp+30h] [bp-4h]@1

  v1 = this;
  v9 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v12 = 0;
  v1->vfptr = (NiRefObjectVtbl *)&CQuestWin2::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CQuestWin2::`vftable'{for `IDirectMessenger'};
  CNSTimer_MarkCheck::CNSTimer_MarkCheck(&v1->m_kMarkCheck);
  v1->ms_pkMsgBox.m_pObject = 0;
  LOBYTE(v12) = 2;
  v1->m_setAbleQuest._Mysize = 0;
  v2 = (std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *)operator new(0x10u);
  if ( !v2 )
  {
    p = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&p);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_setAbleQuest._Myhead = v2;
  v2->_Left = v2;
  v1->m_setAbleQuest._Myhead->_Parent = v1->m_setAbleQuest._Myhead;
  v1->m_setAbleQuest._Myhead->_Right = v1->m_setAbleQuest._Myhead;
  v1->m_setAbleQuest._Myhead->_Color = 1;
  v1->m_setAbleQuest._Myhead->_Isnil = 1;
  v1->m_ButtonspTexture.m_pObject = 0;
  LOBYTE(v12) = 4;
  `eh vector constructor iterator'(
    v1->m_pkAutoRunBut,
    4u,
    10,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_kAutoBlinkButList.vfptr = (NiTArray<PgWinBut *>Vtbl *)&NiTArray<PgWinBut *>::`vftable';
  v1->m_kAutoBlinkButList.m_uiMaxSize = 0;
  v1->m_kAutoBlinkButList.m_uiGrowBy = 1;
  v1->m_kAutoBlinkButList.m_uiSize = 0;
  v1->m_kAutoBlinkButList.m_uiESize = 0;
  v1->m_kAutoBlinkButList.m_pBase = 0;
  v1->m_fBlinkTime = 0.0;
  v1->m_pListWinContent = 0;
  v1->m_pListWinQuestList = 0;
  v1->m_pSlideBarList = 0;
  v1->m_pSlideBarContent = 0;
  v1->m_pkTab01 = 0;
  v1->m_pkTab02 = 0;
  v1->m_pkTitle1 = 0;
  v1->m_pkTitle2 = 0;
  v1->m_nSelectedID = -1;
  v1->m_nCurSelTab = -1;
  v1->m_nSortColumn = -1;
  v1->bReverseSort = 1;
  v1->m_nStateFilterType = 0;
  v1->m_pkRewardWin = 0;
  v1->m_iNumOfCompleteEpicQuest = 0;
  v1->m_pkTabText1 = 0;
  v1->m_pkTabText2 = 0;
  v1->m_pkButText1 = 0;
  v1->m_pkButText2 = 0;
  v1->m_pkAcceptBtn = 0;
  v1->m_pkAcceptBtnSpr = 0;
  v3 = v1->ms_pkMsgBox.m_pObject;
  LOBYTE(v12) = 6;
  p = v3;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && p )
      (**(void (__stdcall ***)(_DWORD))p)(1);
    v1->ms_pkMsgBox.m_pObject = 0;
  }
  v1->m_pkNewQuestReady = 0;
  v1->m_pkNewMark[0] = 0;
  v1->m_pkNewMark[1] = 0;
  v1->m_pkNewMark[2] = 0;
  v1->m_pkNewMark[3] = 0;
  v1->m_pkNewMark[4] = 0;
  v1->m_pkNewMark[5] = 0;
  v1->m_pkNewMark[6] = 0;
  v1->m_pkNewMark[7] = 0;
  v1->m_pkNewMark[8] = 0;
  v1->m_pkNewMark[9] = 0;
  v1->m_bLevelUp = 0;
  p = v1->m_setAbleQuest._Myhead->_Parent;
  v11 = (NiPointer<AutoRunBut> *)p;
  if ( !*((_BYTE *)p + 15) )
  {
    do
    {
      std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Erase(
        (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v1->m_setAbleQuest.comp,
        (std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *)v11[2].m_pObject);
      v11 = (NiPointer<AutoRunBut> *)v11->m_pObject;
      operator delete(p);
      p = v11;
    }
    while ( !BYTE3(v11[3].m_pObject) );
  }
  v1->m_setAbleQuest._Myhead->_Parent = v1->m_setAbleQuest._Myhead;
  v1->m_setAbleQuest._Myhead->_Left = v1->m_setAbleQuest._Myhead;
  v1->m_setAbleQuest._Myhead->_Right = v1->m_setAbleQuest._Myhead;
  v4 = v1->m_pkAutoRunBut;
  v1->m_setAbleQuest._Mysize = 0;
  v5 = 0;
  v11 = v1->m_pkAutoRunBut;
  do
  {
    v6 = v4->m_pObject;
    p = v6;
    if ( v6 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      {
        if ( p )
          (**(void (__stdcall ***)(_DWORD))p)(1);
      }
      v11->m_pObject = 0;
    }
    v7 = (int)v11;
    v1->m_arryAutoButEnable[v5++] = 0;
    v4 = (NiPointer<AutoRunBut> *)(v7 + 4);
    v11 = v4;
  }
  while ( v5 < 10 );
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9B6258: using guessed type int (__thiscall *NiTArray<PgWinBut *>::`vftable')(void *p, char);
// 9B64A0: using guessed type void (__thiscall *CQuestWin2::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B64BC: using guessed type int (__thiscall *CQuestWin2::`vftable'{for `NiNode'})(void *p, char);

//----- (00607F10) --------------------------------------------------------
CQuestWin2 *__cdecl CQuestWin2::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  CQuestWin2 *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x364u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    CQuestWin2::CQuestWin2((CQuestWin2 *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (CQuestWin2 *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00608040) --------------------------------------------------------
void __thiscall CQuestWin2::UpDateViewQuesContent(CQuestWin2 *this, unsigned __int16 qID)
{
  CQuestWin2 *v2; // esi@1
  GameFrameWork *v3; // ecx@1
  SlideListWin *v4; // eax@1
  unsigned int v5; // ebx@1
  ColumnBut *v6; // eax@3
  PgWinText *v7; // ecx@4
  CClientQuest *v8; // eax@10
  CQuestData *v9; // ebx@11
  QUEST_DATA *v10; // eax@12
  SlideListWin *v11; // ecx@12
  QUEST_DATA *v12; // edi@12
  NiUnsharedGeometryGroup *v13; // eax@12
  GameFrameWork *v14; // eax@14
  QUEST_DATA *v15; // edi@17
  QUEST_DATA *v16; // eax@17
  NiUnsharedGeometryGroup *v17; // eax@24
  unsigned int v18; // eax@24
  NiUnsharedGeometryGroup *v19; // eax@24
  int v20; // ebx@24
  int v21; // edi@24
  int v22; // eax@25
  int v23; // edx@28
  const char *v24; // eax@31
  signed int v25; // edi@33
  SlideListWin *v26; // ebx@34
  int v27; // ebx@36
  int v28; // eax@36
  void *(__thiscall *v29)(NiRefObject *, unsigned int); // edx@36
  NiRefObjectVtbl *v30; // ebx@36
  int v31; // eax@36
  PgWinText *v32; // ecx@36
  void *(__thiscall *v33)(NiRefObject *, unsigned int); // eax@36
  PgWin *v34; // ebx@39
  char *v35; // eax@40
  SlideListWin *v36; // ecx@42
  NiRefObjectVtbl *v37; // edi@47
  NiUnsharedGeometryGroup *v38; // eax@48
  QUEST_DATA *v39; // edi@50
  NiUnsharedGeometryGroup *v40; // eax@55
  int v41; // edi@62
  int v42; // ebx@62
  int v43; // eax@63
  int v44; // edx@66
  int v45; // ST10_4@69
  NiUnsharedGeometryGroup *v46; // eax@69
  int v47; // edi@70
  int v48; // ebx@70
  int v49; // eax@71
  int v50; // ecx@74
  int v51; // ST10_4@77
  NiUnsharedGeometryGroup *v52; // eax@77
  int v53; // edi@78
  int v54; // ebx@78
  int v55; // eax@79
  int v56; // edx@82
  int v57; // ebx@87
  MobViewInfo *v58; // eax@91
  char v59; // cl@92
  signed int v60; // eax@69
  unsigned int v61; // ebx@101
  SlideListWin *v62; // ecx@102
  ColumnBut *v63; // eax@104
  int v64; // eax@106
  SlideListWin *v65; // ecx@106
  int v66; // eax@106
  int v67; // edx@106
  NiRefObjectVtbl *v68; // edi@106
  int v69; // eax@106
  unsigned int v70; // edi@107
  int v71; // edi@113
  unsigned __int16 *v72; // edx@113
  int *v73; // edx@114
  char *v74; // eax@113
  SlideListWin *v75; // ecx@115
  char *v76; // eax@117
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node **v77; // edi@117
  int v78; // ebx@120
  int v79; // edx@120
  int v80; // ebx@121
  int v81; // edx@124
  int v82; // eax@127
  int v83; // eax@127
  int v84; // ecx@127
  int v85; // ebx@127
  int v86; // eax@127
  char *v87; // edx@128
  char *v88; // eax@137
  SlideListWin *v89; // eax@140
  ColumnBut *v90; // ecx@142
  int v91; // edx@144
  ColumnBut *v92; // ecx@145
  int v93; // ebx@147
  int v94; // ebx@151
  PgWinText *v95; // ebx@151
  int (*v96)(void); // eax@151
  SlideListWin *v97; // ecx@152
  PLAYER_QUEST_INFO *v98; // eax@152
  ColumnBut *v99; // eax@153
  signed int v100; // edx@153
  int v101; // ebx@159
  int v102; // ebx@159
  PgWinText *v103; // eax@159
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v104; // ebx@160
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v105; // edx@160
  int v106; // eax@160
  SlideListWin *v107; // eax@166
  ColumnBut *v108; // ecx@168
  int v109; // edx@170
  ColumnBut *v110; // ecx@171
  PgWinText *v111; // ebx@173
  int v112; // ebx@177
  int v113; // ebx@177
  int (*v114)(void); // eax@177
  SlideListWin *v115; // ecx@178
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v116; // eax@178
  ColumnBut *v117; // eax@179
  signed int v118; // edx@179
  int v119; // ebx@185
  int v120; // ebx@185
  int v121; // eax@185
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v122; // edx@186
  int v123; // eax@186
  char *v124; // eax@163
  SlideListWin *v125; // ecx@189
  QUEST_DATA *v126; // edi@191
  NiUnsharedGeometryGroup *v127; // eax@192
  signed int v128; // ebx@193
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v129; // eax@193
  unsigned __int16 *v130; // edi@194
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v131; // eax@197
  NiUnsharedGeometryGroup *v132; // eax@199
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v133; // edi@199
  int v134; // ebx@200
  int v135; // edx@200
  int v136; // eax@201
  int v137; // edx@204
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v138; // eax@208
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *k; // eax@209
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *j; // eax@212
  const char *v141; // eax@217
  signed int v142; // eax@219
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v143; // ecx@219
  SlideListWin *v144; // ebx@220
  ColumnBut *v145; // ecx@222
  int v146; // edx@224
  ColumnBut *v147; // ecx@225
  PgWinText *v148; // edi@226
  int v149; // eax@231
  int v150; // edi@231
  SlideListWin *v151; // ebx@232
  int v152; // edx@232
  ColumnBut *v153; // ecx@233
  PgWinText *v154; // edi@234
  int v155; // edi@235
  int v156; // eax@239
  int v157; // ebx@239
  int v158; // ebx@240
  int v159; // edi@240
  int v160; // eax@240
  PgWin *v161; // edi@246
  char *v162; // eax@246
  NiUnsharedGeometryGroup *v163; // eax@247
  QUEST_DATA *v164; // edi@247
  SlideBar *v165; // ecx@247
  RewardWin *v166; // esi@249
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v167; // ecx@253
  unsigned int v168; // [sp-4h] [bp-1B0h]@244
  int v169; // [sp+0h] [bp-1ACh]@0
  std::exception pExceptionObject; // [sp+10h] [bp-19Ch]@255
  std::set<unsigned short,std::less<unsigned short>,std::allocator<unsigned short> > setNpcID; // [sp+1Ch] [bp-190h]@193
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > >,bool> result; // [sp+2Ch] [bp-180h]@154
  int bUseAutoWay; // [sp+34h] [bp-178h]@7
  PLAYER_QUEST_INFO *pPlayerQuestInfo; // [sp+38h] [bp-174h]@12
  QUEST_DATA *lpQuest; // [sp+3Ch] [bp-170h]@12
  int iAutoRunNum; // [sp+40h] [bp-16Ch]@1
  int nPosY; // [sp+44h] [bp-168h]@10
  unsigned __int16 *i; // [sp+48h] [bp-164h]@1
  int nPosX; // [sp+4Ch] [bp-160h]@16
  int nIndex; // [sp+50h] [bp-15Ch]@12
  unsigned int Mob_ID; // [sp+54h] [bp-158h]@16
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > v182; // [sp+58h] [bp-154h]@143
  PgWinText *pkText; // [sp+5Ch] [bp-150h]@35
  PLAYER_QUEST_INFO questInfo; // [sp+60h] [bp-14Ch]@15
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strNpc; // [sp+80h] [bp-12Ch]@199
  char szTemp[256]; // [sp+9Ch] [bp-110h]@12
  int v187; // [sp+1A8h] [bp-4h]@24

  v2 = this;
  v3 = (GameFrameWork *)this->m_pkFrameWork;
  i = (unsigned __int16 *)qID;
  GameFrameWork::SetRewardWinQuestID(v3, qID);
  SlideListWin::RemoveAllList(v2->m_pListWinContent);
  v4 = v2->m_pListWinContent;
  v5 = 0;
  iAutoRunNum = 0;
  if ( v4->m_nMaxViewListCnt > 0 )
  {
    do
    {
      if ( v5 < v4->m_vecButList._Mylast - v4->m_vecButList._Myfirst )
      {
        v6 = v4->m_vecButList._Myfirst[v5];
        if ( v6->m_vecTextWin._Mylast - v6->m_vecTextWin._Myfirst )
        {
          v7 = *v6->m_vecTextWin._Myfirst;
          if ( v7 )
            ((void (__stdcall *)(_DWORD))v7->vfptr[43].__vecDelDtor)(0);
        }
      }
      v4 = v2->m_pListWinContent;
      ++v5;
    }
    while ( (signed int)v5 < v4->m_nMaxViewListCnt );
  }
  LOBYTE(bUseAutoWay) = 1;
  if ( !ChargedItemList::IsEffecting(EE_AUTOPATHFIND) && User::Lv(&g_kUser) > 0x3C )
    LOBYTE(bUseAutoWay) = 0;
  v8 = QuestDataMgr::GetQuest();
  nPosY = (int)v8;
  if ( v8 )
  {
    v9 = v8->m_pQuestData;
    if ( v9 )
    {
      pPlayerQuestInfo = CQuest::GetQuestInfo((CQuest *)&v8->vfptr, qID);
      v10 = CQuestData::GetQuestData(v9, qID);
      v11 = v2->m_pListWinContent;
      v12 = v10;
      lpQuest = v10;
      SlideListWin::AddText(v11, &byte_9B5567);
      v13 = TextData::Get(0x9AF8F4FF);
      sprintf(szTemp, "<%s>", v13);
      SlideListWin::AddText(v2->m_pListWinContent, szTemp);
      CQuestWin2::SetQuestContentText(v2, v12->NameID, 0);
      SlideListWin::AddText(v2->m_pListWinContent, &byte_9B5576);
      nIndex = (int)CQuest::GetNewQuestStatus((CQuest *)nPosY, v12->ID);
      if ( nIndex == 5 && !v2->m_bAutoClick )
      {
        v14 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
        if ( v14 )
        {
          GameFrameWork::NcQuestReadReq(v14, v12->ID);
          questInfo.ID = v12->ID;
          questInfo.Status = 20;
          CQuest::AddQuestInfo((CQuest *)nPosY, &questInfo);
        }
        nPosX = User::Lv(&g_kUser);
        Mob_ID = 0;
        if ( CQuestData::GetNumOfQuestData(v9) <= 0u )
        {
LABEL_21:
          ((void (__stdcall *)(_DWORD))v2->m_pkNewQuestReady->vfptr[64].__vecDelDtor)(0);
        }
        else
        {
          while ( 1 )
          {
            v15 = CQuestData::GetQuestDataByIndex(v9, Mob_ID);
            v16 = CQuest::GetNewQuestStatus((CQuest *)nPosY, v15->ID);
            if ( (v2->m_nCurSelTab != 2 || nPosX - v15->Start.LevelMin <= 150) && v16 == (QUEST_DATA *)5 )
              break;
            if ( (signed int)++Mob_ID >= CQuestData::GetNumOfQuestData(v9) )
              goto LABEL_21;
          }
        }
      }
      if ( lpQuest->Start.bIsWaitListProgress || v2->m_nCurSelTab != 2 )
      {
LABEL_45:
        if ( (unsigned __int16)i == -1 || v2->m_nCurSelTab != 1 )
        {
          v39 = lpQuest;
        }
        else
        {
          v37 = v2->m_pkButText1->vfptr;
          if ( nIndex == 8 )
            v38 = TextData::Get(0xDA03E902);
          else
            v38 = TextData::Get(0xEF05ED51);
          v37[118].__vecDelDtor((NiRefObject *)v2->m_pkButText1, (unsigned int)v38);
          v39 = lpQuest;
          if ( lpQuest->End.bIsWaitListProgress || nIndex != 8 )
          {
            ((void (__stdcall *)(signed int))v2->m_pkAcceptBtn->vfptr[60].__vecDelDtor)(1);
            ((void (__stdcall *)(_DWORD))v2->m_pkAcceptBtnSpr->vfptr[60].__vecDelDtor)(0);
            ((void (__stdcall *)(_DWORD))v2->m_pkAcceptBtnSpr->vfptr[64].__vecDelDtor)(0);
          }
          else
          {
            ((void (__stdcall *)(_DWORD))v2->m_pkAcceptBtn->vfptr[60].__vecDelDtor)(0);
            ((void (__stdcall *)(signed int))v2->m_pkAcceptBtnSpr->vfptr[60].__vecDelDtor)(1);
            ((void (__stdcall *)(signed int))v2->m_pkAcceptBtnSpr->vfptr[64].__vecDelDtor)(1);
          }
        }
        v40 = TextData::Get(0x7A95849Cu);
        sprintf(szTemp, "<%s>", v40);
        SlideListWin::AddText(v2->m_pListWinContent, szTemp);
        if ( v39->End.bLevel )
        {
          sprintf(szTemp, "Level : %d", v39->End.Level);
          SlideListWin::AddText(v2->m_pListWinContent, szTemp);
        }
        Mob_ID = 0;
        i = (unsigned __int16 *)&v2->m_pkAutoRunBut[iAutoRunNum];
        nIndex = (int)&v39->End.NPCMobList[0].TargetGroup;
        while ( *(_BYTE *)(nIndex - 6) )
        {
          if ( *(_BYTE *)(nIndex - 2) == 1 )
          {
            v53 = *(_WORD *)(nIndex - 4);
            v54 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
            if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable
                                                                  + 16))(
                                    ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                                    v53) )
            {
              if ( (unsigned __int16)v53 <= *(_WORD *)(v54 + 200) )
              {
                v56 = *(_DWORD *)(v54 + 196);
                if ( *(_DWORD *)(v56 + 4 * v53) )
                  v55 = *(_DWORD *)(v56 + 4 * v53);
                else
                  v55 = 0;
              }
              else
              {
                v55 = 0;
              }
            }
            else
            {
              v55 = 0;
            }
            if ( pPlayerQuestInfo && v2->m_nCurSelTab == 1 )
              v57 = pPlayerQuestInfo->Data.End_NPCMobCount[Mob_ID];
            else
              v57 = 0;
            if ( *(_BYTE *)nIndex )
            {
              v58 = MobViewInfoTab::GetByID(*(_WORD *)(nIndex - 4));
              if ( v58 )
              {
                v59 = *(_BYTE *)nIndex;
                if ( *(_BYTE *)nIndex == 1 )
                {
                  sprintf(szTemp, "%s %d/%d", v58->Group1, v57, *(_BYTE *)(nIndex - 1));
                }
                else
                {
                  switch ( v59 )
                  {
                    case 2:
                      sprintf(szTemp, "%s %d/%d", v58->Group2, v57, *(_BYTE *)(nIndex - 1));
                      break;
                    case 3:
                      sprintf(szTemp, "%s %d/%d", v58->Group3, v57, *(_BYTE *)(nIndex - 1));
                      break;
                    case 4:
                      sprintf(szTemp, "%s %d/%d", v58->GroupS, v57, *(_BYTE *)(nIndex - 1));
                      break;
                  }
                }
              }
            }
            else
            {
              sprintf(szTemp, "%s %d/%d", v55 + 34, v57, *(_BYTE *)(nIndex - 1));
            }
            goto LABEL_100;
          }
          if ( *(_BYTE *)(nIndex - 2) == 2 )
          {
            v47 = *(_WORD *)(nIndex - 4);
            v48 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
            if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable
                                                                  + 16))(
                                    ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                                    v47) )
            {
              if ( (unsigned __int16)v47 <= *(_WORD *)(v48 + 200) )
              {
                v50 = *(_DWORD *)(v48 + 196);
                if ( *(_DWORD *)(v50 + 4 * v47) )
                  v49 = *(_DWORD *)(v50 + 4 * v47);
                else
                  v49 = 0;
              }
              else
              {
                v49 = 0;
              }
            }
            else
            {
              v49 = 0;
            }
            v51 = v49 + 34;
            v52 = TextData::Get(0x3C497E96u);
            sprintf(szTemp, (const char *)v52, &unk_9B5581, v51);
LABEL_100:
            v60 = SlideListWin::AddText(v2->m_pListWinContent, szTemp);
            goto LABEL_101;
          }
          if ( *(_BYTE *)(nIndex - 2) == 3 )
          {
            v41 = *(_WORD *)(nIndex - 4);
            v42 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
            if ( (unsigned __int8)(*(int (__thiscall **)(_DWORD, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable
                                                                     + 16))(
                                    ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                                    v41) )
            {
              if ( (unsigned __int16)v41 <= *(_WORD *)(v42 + 200) )
              {
                v44 = *(_DWORD *)(v42 + 196);
                if ( *(_DWORD *)(v44 + 4 * v41) )
                  v43 = *(_DWORD *)(v44 + 4 * v41);
                else
                  v43 = 0;
              }
              else
              {
                v43 = 0;
              }
            }
            else
            {
              v43 = 0;
            }
            v45 = v43 + 34;
            v46 = TextData::Get(0x8DECE4E2);
            sprintf(szTemp, (const char *)v46, &unk_9B5582, v45);
            v60 = SlideListWin::AddText(v2->m_pListWinContent, szTemp);
LABEL_101:
            v61 = v60;
            if ( v60 > 0 )
            {
              v62 = v2->m_pListWinContent;
              if ( v60 < v62->m_nMaxViewListCnt
                && v60 < (unsigned int)(v62->m_vecButList._Mylast - v62->m_vecButList._Myfirst) )
              {
                v63 = v62->m_vecButList._Myfirst[v60];
                if ( v63->m_vecTextWin._Mylast - v63->m_vecTextWin._Myfirst )
                {
                  pkText = *v63->m_vecTextWin._Myfirst;
                  if ( pkText )
                  {
                    v64 = SlideListWin::GetColumPosX(v62, v61, 0);
                    v65 = v2->m_pListWinContent;
                    nPosX = v64;
                    v66 = SlideListWin::GetColumPosY(v65, v61, 0);
                    v67 = **(_DWORD **)i;
                    nPosY = v66;
                    (*(void (__stdcall **)(signed int))(v67 + 256))(1);
                    (*(void (__stdcall **)(int))(**(_DWORD **)i + 172))(nPosX);
                    (*(void (__stdcall **)(int))(**(_DWORD **)i + 176))(nPosY);
                    v68 = pkText->vfptr;
                    v69 = (*(int (__cdecl **)(int))(**(_DWORD **)i + 144))(v169);
                    v68[43].__vecDelDtor((NiRefObject *)pkText, v69);
                  }
                }
              }
              (*(void (__stdcall **)(_DWORD))(**(_DWORD **)i + 520))(*(_WORD *)(nIndex - 4));
              nPosX = *(_WORD *)(nIndex - 4);
              v70 = 0;
              if ( ITableBase<MobCoordinate,MobCoordinateTab>::GetTotal() )
              {
                do
                {
                  if ( *((_WORD *)CDataReader::GetRecord(
                                    (CDataReader *)(ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable + 4),
                                    v70)
                       + 1) == (_WORD)nPosX )
                    break;
                  ++v70;
                }
                while ( v70 < ITableBase<MobCoordinate,MobCoordinateTab>::GetTotal() );
              }
              if ( CDataReader::GetRecord(
                     (CDataReader *)(ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable + 4),
                     v70)
                && v2->m_nCurSelTab != 2
                && (_BYTE)bUseAutoWay )
              {
                v71 = iAutoRunNum;
                v72 = i;
                v2->m_arryAutoButEnable[iAutoRunNum] = 1;
                (*(void (__stdcall **)(signed int))(**(_DWORD **)v72 + 240))(1);
                nPosX = *(_DWORD *)i;
                v74 = (char *)TextData2::Get(0x3AB58885u);
              }
              else
              {
                v71 = iAutoRunNum;
                v73 = (int *)i;
                v2->m_arryAutoButEnable[iAutoRunNum] = 0;
                nPosX = *v73;
                v74 = (char *)TextData2::Get(0x89AE82D9);
              }
              PgWin::SetToolTipWinText((PgWin *)nPosX, v74);
              v75 = v2->m_pListWinContent;
              i += 2;
              iAutoRunNum = v71 + 1;
              SlideListWin::SetData(v75, v61, v71 + 1);
            }
          }
          nIndex += 8;
          if ( (signed int)++Mob_ID >= 5 )
            break;
        }
        v76 = (char *)&lpQuest->End.ItemList[0].ItemID;
        nPosX = 0;
        v77 = (std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node **)&v2->m_pkAutoRunBut[iAutoRunNum];
        for ( i = &lpQuest->End.ItemList[0].ItemID; ; v76 = (char *)i )
        {
          if ( !*(v76 - 2) )
          {
LABEL_191:
            v126 = lpQuest;
            if ( lpQuest->End.bLocation )
            {
              v127 = TextData::Get(0x39323D31u);
              sprintf(szTemp, (const char *)v127, &unk_9B5583);
              SlideListWin::AddText(v2->m_pListWinContent, szTemp);
            }
            v128 = 0;
            setNpcID._Mysize = 0;
            v129 = (std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *)operator new(0x10u);
            if ( !v129 )
            {
              v182._Ptr = 0;
              std::exception::exception(&pExceptionObject, (const char *const *)&v182);
              pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
              _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
            }
            setNpcID._Myhead = v129;
            v129->_Left = v129;
            setNpcID._Myhead->_Parent = setNpcID._Myhead;
            setNpcID._Myhead->_Right = setNpcID._Myhead;
            setNpcID._Myhead->_Color = 1;
            setNpcID._Myhead->_Isnil = 1;
            v187 = 1;
            v130 = (unsigned __int16 *)&v126->End.NPCMobList[0].NPCMobAction;
            do
            {
              if ( !*((_BYTE *)v130 - 4) )
                break;
              if ( !*(_BYTE *)v130 )
              {
                v131 = std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Buynode<unsigned short>(
                         (std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&setNpcID.comp,
                         v130 - 1);
                std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Linsert(
                  (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&setNpcID.comp,
                  &result,
                  v131,
                  0);
              }
              ++v128;
              v130 += 4;
            }
            while ( v128 < 5 );
            strNpc._Myres = 15;
            strNpc._Mysize = 0;
            strNpc._Bx._Buf[0] = 0;
            LOBYTE(v187) = 2;
            v132 = TextData::Get(0xEE023049);
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
              &strNpc,
              (const char *)v132,
              strlen((const char *)v132));
            v133 = setNpcID._Myhead->_Left;
            while ( v133 != setNpcID._Myhead )
            {
              v134 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
              v135 = *(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
              v182._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *)v133->_Myval;
              if ( (unsigned __int8)(*(int (__thiscall **)(int, std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *))(v135 + 16))(
                                      ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                                      v182._Ptr) )
              {
                if ( LOWORD(v182._Ptr) <= *(_WORD *)(v134 + 200) )
                {
                  v137 = *(_DWORD *)(v134 + 196);
                  if ( *(_DWORD *)(v137 + 4 * LOWORD(v182._Ptr)) )
                    v136 = *(_DWORD *)(v137 + 4 * LOWORD(v182._Ptr));
                  else
                    v136 = 0;
                }
                else
                {
                  v136 = 0;
                }
              }
              else
              {
                v136 = 0;
              }
              sprintf(szTemp, "   %s", v136 + 34, v169);
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
                &strNpc,
                szTemp,
                strlen(szTemp));
              if ( !v133->_Isnil )
              {
                v138 = v133->_Right;
                if ( v138->_Isnil )
                {
                  for ( j = v133->_Parent; !j->_Isnil; j = j->_Parent )
                  {
                    if ( v133 != j->_Right )
                      break;
                    v133 = j;
                  }
                  v133 = j;
                }
                else
                {
                  v133 = v133->_Right;
                  for ( k = v138->_Left; !k->_Isnil; k = k->_Left )
                    v133 = k;
                }
              }
            }
            v141 = strNpc._Bx._Ptr;
            if ( strNpc._Myres < 0x10 )
              v141 = (const char *)&strNpc;
            v142 = SlideListWin::AddText(v2->m_pListWinContent, v141);
            v143 = setNpcID._Myhead->_Left;
            Mob_ID = v142;
            *(_DWORD *)&result.second = v143;
            if ( v142 > 0 )
            {
              v144 = v2->m_pListWinContent;
              if ( v142 < v144->m_nMaxViewListCnt
                && v142 < (unsigned int)(v144->m_vecButList._Mylast - v144->m_vecButList._Myfirst)
                && (v145 = v144->m_vecButList._Myfirst[v142], v145->m_vecTextWin._Mylast - v145->m_vecTextWin._Myfirst)
                && (nPosX = (int)*v145->m_vecTextWin._Myfirst) != 0 )
              {
                v146 = v144->m_vecButList._Mylast - v144->m_vecButList._Myfirst;
                if ( v142 < (unsigned int)v146
                  && (v147 = v144->m_vecButList._Myfirst[v142], v147->m_vecTextWin._Mylast - v147->m_vecTextWin._Myfirst)
                  && (v148 = *v147->m_vecTextWin._Myfirst) != 0 )
                {
                  if ( v142 < v146 && v147 )
                  {
                    v149 = ((int (__cdecl *)(int))v147->vfptr[41].__vecDelDtor)(v169);
                    v150 = ((int (__thiscall *)(PgWinText *))v148->vfptr[41].__vecDelDtor)(v148) + v149;
                    pkText = (PgWinText *)(v150
                                         + ((int (__thiscall *)(SlideListWin *))v144->vfptr[41].__vecDelDtor)(v144));
                    v142 = Mob_ID;
                  }
                  else
                  {
                    pkText = 0;
                  }
                }
                else
                {
                  pkText = 0;
                }
                v151 = v2->m_pListWinContent;
                v152 = v151->m_vecButList._Mylast - v151->m_vecButList._Myfirst;
                if ( v142 < (unsigned int)v152
                  && (v153 = v151->m_vecButList._Myfirst[v142], v153->m_vecTextWin._Mylast - v153->m_vecTextWin._Myfirst)
                  && (v154 = *v153->m_vecTextWin._Myfirst) != 0 )
                {
                  if ( v142 < v152 && v153 )
                  {
                    v156 = ((int (__cdecl *)(int))v153->vfptr[42].__vecDelDtor)(v169);
                    v157 = ((int (__thiscall *)(SlideListWin *))v151->vfptr[42].__vecDelDtor)(v151) + v156;
                    v155 = v157 + ((int (__thiscall *)(PgWinText *))v154->vfptr[42].__vecDelDtor)(v154);
                  }
                  else
                  {
                    v155 = 0;
                  }
                }
                else
                {
                  v155 = 0;
                }
                v158 = iAutoRunNum;
                ((void (__stdcall *)(signed int))v2->m_pkAutoRunBut[iAutoRunNum].m_pObject->vfptr[64].__vecDelDtor)(1);
                ((void (__stdcall *)(PgWinText *))v2->m_pkAutoRunBut[v158].m_pObject->vfptr[43].__vecDelDtor)(pkText);
                ((void (__stdcall *)(int))v2->m_pkAutoRunBut[v158].m_pObject->vfptr[44].__vecDelDtor)(v155);
                v159 = *(_DWORD *)nPosX;
                v160 = ((int (__cdecl *)(int))v2->m_pkAutoRunBut[v158].m_pObject->vfptr[36].__vecDelDtor)(v169);
                (*(void (__thiscall **)(int, int))(v159 + 172))(nPosX, v160);
              }
              else
              {
                v158 = iAutoRunNum;
              }
              ((void (__stdcall *)(_DWORD))v2->m_pkAutoRunBut[v158].m_pObject->vfptr[130].__vecDelDtor)(*(_WORD *)(*(_DWORD *)&result.second + 12));
              if ( v2->m_nCurSelTab != 2 && (_BYTE)bUseAutoWay )
              {
                v2->m_arryAutoButEnable[v158] = 1;
                ((void (__stdcall *)(signed int))v2->m_pkAutoRunBut[v158].m_pObject->vfptr[60].__vecDelDtor)(1);
                v168 = 984975493;
              }
              else
              {
                v2->m_arryAutoButEnable[v158] = 0;
                v168 = -1985051943;
              }
              v161 = (PgWin *)&v2->m_pkAutoRunBut[v158].m_pObject->vfptr;
              v162 = (char *)TextData2::Get(v168);
              PgWin::SetToolTipWinText(v161, v162);
              SlideListWin::SetData(v2->m_pListWinContent, Mob_ID, v158 + 1);
            }
            SlideListWin::AddText(v2->m_pListWinContent, &byte_9B558A);
            v163 = TextData::Get(0xEEE74F4D);
            sprintf(szTemp, "<%s>", v163);
            SlideListWin::AddText(v2->m_pListWinContent, szTemp);
            v164 = lpQuest;
            CQuestWin2::SetQuestContentText(v2, lpQuest->BrifingID, 0);
            SlideListWin::AddText(v2->m_pListWinContent, &byte_9B558B);
            SlideListWin::AlignText(v2->m_pListWinContent, 4u);
            SlideListWin::AddText(v2->m_pListWinContent, &byte_9B5592);
            SlideListWin::AddText(v2->m_pListWinContent, &byte_9B5593);
            SlideListWin::AddText(v2->m_pListWinContent, &byte_9B559D);
            SlideListWin::AddText(v2->m_pListWinContent, &byte_9B559E);
            SlideListWin::AddText(v2->m_pListWinContent, &byte_9B559F);
            SlideListWin::AddText(v2->m_pListWinContent, &byte_9B55B1);
            CQuestWin2::UpdateLocationInfo(v2, v164->ID);
            v165 = v2->m_pSlideBarContent;
            if ( v165 )
            {
              if ( v2->m_pListWinContent )
              {
                SlideBar::SetSplitCnt(v165, 0);
                v2->m_pListWinContent->m_nViewStartPos = 0;
                SlideListWin::UpdateViewList(v2->m_pListWinContent);
                v166 = v2->m_pkRewardWin;
                if ( v166 )
                  v166->m_uFlags |= 1u;
              }
            }
            if ( strNpc._Myres >= 0x10 )
              operator delete(strNpc._Bx._Ptr);
            strNpc._Myres = 15;
            strNpc._Mysize = 0;
            strNpc._Bx._Buf[0] = 0;
            v167 = setNpcID._Myhead->_Left;
            v187 = 3;
            std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::erase(
              (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&setNpcID.comp,
              &v182,
              (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > >)v167,
              (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > >)setNpcID._Myhead);
            operator delete(setNpcID._Myhead);
            return;
          }
          v78 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
          v79 = *(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
          pPlayerQuestInfo = (PLAYER_QUEST_INFO *)*(_WORD *)v76;
          if ( (unsigned __int8)(*(int (__thiscall **)(int, PLAYER_QUEST_INFO *))(v79 + 16))(
                                  ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                                  pPlayerQuestInfo) )
          {
            if ( (unsigned __int16)pPlayerQuestInfo <= *(_WORD *)(v78 + 200) )
            {
              v81 = *(_DWORD *)(v78 + 196);
              if ( *(_DWORD *)(v81 + 4 * (unsigned __int16)pPlayerQuestInfo) )
                v80 = *(_DWORD *)(v81 + 4 * (unsigned __int16)pPlayerQuestInfo);
              else
                v80 = 0;
            }
            else
            {
              v80 = 0;
            }
          }
          else
          {
            v80 = 0;
          }
          v82 = Inventory::GetItemCnt(&g_kInventory, *i);
          sprintf(szTemp, "%s %d/%d", v80 + 34, v82, i[1]);
          v83 = SlideListWin::AddText(v2->m_pListWinContent, szTemp);
          v84 = lpQuest->NumOfAction;
          v85 = v83;
          v86 = 0;
          nIndex = v85;
          Mob_ID = 0xFFFF;
          if ( v84 > 0 )
          {
            v87 = (char *)&lpQuest->Action[0].ThenTarget;
            while ( *(v87 - 12) )
            {
              v85 = nIndex;
              if ( *(_DWORD *)v87 == *i )
              {
                Mob_ID = LOWORD(lpQuest->Action[v86].IfTarget);
                break;
              }
              ++v86;
              v87 += 32;
              if ( v86 >= v84 )
                break;
            }
          }
          nPosY = 0;
          if ( ITableBase<MobCoordinate,MobCoordinateTab>::GetTotal() )
          {
            do
            {
              if ( *((_WORD *)CDataReader::GetRecord(
                                (CDataReader *)(ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable + 4),
                                nPosY)
                   + 1) == (_WORD)Mob_ID )
                break;
              ++nPosY;
            }
            while ( nPosY < ITableBase<MobCoordinate,MobCoordinateTab>::GetTotal() );
          }
          v88 = CDataReader::GetRecord(
                  (CDataReader *)(ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable + 4),
                  nPosY);
          if ( (_WORD)Mob_ID == -1 || !v88 )
            break;
          if ( v85 <= 0 )
            goto LABEL_190;
          v89 = v2->m_pListWinContent;
          pkText = (PgWinText *)v89;
          if ( v85 < v89->m_nMaxViewListCnt
            && v85 < (unsigned int)(v89->m_vecButList._Mylast - v89->m_vecButList._Myfirst) )
          {
            v90 = v89->m_vecButList._Myfirst[v85];
            if ( v90->m_vecTextWin._Mylast - v90->m_vecTextWin._Myfirst )
            {
              v182._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *)*v90->m_vecTextWin._Myfirst;
              if ( v182._Ptr )
              {
                v91 = v89->m_vecButList._Mylast - v89->m_vecButList._Myfirst;
                if ( v85 < (unsigned int)v91
                  && (v92 = v89->m_vecButList._Myfirst[v85], v92->m_vecTextWin._Mylast - v92->m_vecTextWin._Myfirst)
                  && (pPlayerQuestInfo = (PLAYER_QUEST_INFO *)*v92->m_vecTextWin._Myfirst) != 0 )
                {
                  if ( v85 < v91 && v92 )
                  {
                    v94 = ((int (__cdecl *)(int))v92->vfptr[41].__vecDelDtor)(v169);
                    v95 = (PgWinText *)(((int (*)(void))pkText->vfptr[41].__vecDelDtor)() + v94);
                    v96 = *(int (**)(void))(*(_DWORD *)&pPlayerQuestInfo->ID + 164);
                    pkText = v95;
                    v93 = (int)v95 + v96();
                  }
                  else
                  {
                    v93 = 0;
                  }
                }
                else
                {
                  v93 = 0;
                }
                v97 = v2->m_pListWinContent;
                v98 = (PLAYER_QUEST_INFO *)(v97->m_vecButList._Mylast - v97->m_vecButList._Myfirst);
                nPosY = v93;
                pPlayerQuestInfo = v98;
                if ( nIndex < (unsigned int)v98
                  && (v99 = v97->m_vecButList._Myfirst[nIndex],
                      v100 = (char *)v99->m_vecTextWin._Mylast - (char *)v99->m_vecTextWin._Myfirst,
                      pkText = (PgWinText *)v97->m_vecButList._Myfirst[nIndex],
                      v100 >> 2)
                  && (*(_DWORD *)&result.second = *v99->m_vecTextWin._Myfirst) != 0 )
                {
                  if ( nIndex < (signed int)pPlayerQuestInfo && pkText )
                  {
                    v101 = ((int (__cdecl *)(int))v97->vfptr[42].__vecDelDtor)(v169);
                    v102 = (*(int (**)(void))(**(_DWORD **)&result.second + 168))() + v101;
                    v103 = (PgWinText *)(v102 + ((int (*)(void))pkText->vfptr[42].__vecDelDtor)());
                    v93 = nPosY;
                    pkText = v103;
                  }
                  else
                  {
                    pkText = 0;
                  }
                }
                else
                {
                  pkText = 0;
                }
                ((void (__stdcall *)(signed int))(*v77)->_Left[16]._Left)(1);
                (*(void (__stdcall **)(int))&(*v77)->_Left[10]._Myval)(v93);
                ((void (__stdcall *)(PgWinText *))(*v77)->_Left[11]._Left)(pkText);
                v104 = v182._Ptr;
                v105 = (*v77)->_Left;
                v182._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *)((char *)v182._Ptr->_Left + 172);
                v106 = ((int (__cdecl *)(int))v105[9]._Left)(v169);
                ((void (__thiscall *)(std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *, int))v182._Ptr->_Left)(
                  v104,
                  v106);
                v85 = nIndex;
              }
            }
          }
          ((void (__stdcall *)(_DWORD))(*v77)->_Left[32]._Right)((unsigned __int16)Mob_ID);
          if ( v2->m_nCurSelTab == 2 || !(_BYTE)bUseAutoWay )
          {
            v2->m_arryAutoButEnable[iAutoRunNum] = 0;
            v182._Ptr = *v77;
LABEL_188:
            v124 = (char *)TextData2::Get(0x89AE82D9);
            goto LABEL_189;
          }
          v2->m_arryAutoButEnable[iAutoRunNum] = 1;
          ((void (__stdcall *)(signed int))(*v77)->_Left[15]._Left)(1);
          v182._Ptr = *v77;
          v124 = (char *)TextData2::Get(0x3AB58885u);
LABEL_189:
          PgWin::SetToolTipWinText((PgWin *)v182._Ptr, v124);
          v125 = v2->m_pListWinContent;
          ++v77;
          SlideListWin::SetData(v125, v85, ++iAutoRunNum);
LABEL_190:
          i += 3;
          if ( ++nPosX >= 5 )
            goto LABEL_191;
        }
        if ( v85 <= 0 )
          goto LABEL_190;
        v107 = v2->m_pListWinContent;
        pkText = (PgWinText *)v107;
        if ( v85 < v107->m_nMaxViewListCnt
          && v85 < (unsigned int)(v107->m_vecButList._Mylast - v107->m_vecButList._Myfirst) )
        {
          v108 = v107->m_vecButList._Myfirst[v85];
          if ( v108->m_vecTextWin._Mylast - v108->m_vecTextWin._Myfirst )
          {
            pPlayerQuestInfo = (PLAYER_QUEST_INFO *)*v108->m_vecTextWin._Myfirst;
            if ( pPlayerQuestInfo )
            {
              v109 = v107->m_vecButList._Mylast - v107->m_vecButList._Myfirst;
              if ( v85 < (unsigned int)v109
                && (v110 = v107->m_vecButList._Myfirst[v85], v110->m_vecTextWin._Mylast - v110->m_vecTextWin._Myfirst)
                && (v182._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *)*v110->m_vecTextWin._Myfirst) != 0 )
              {
                if ( v85 < v109 && v110 )
                {
                  v112 = ((int (__cdecl *)(int))v110->vfptr[41].__vecDelDtor)(v169);
                  v113 = ((int (*)(void))pkText->vfptr[41].__vecDelDtor)() + v112;
                  v114 = (int (*)(void))v182._Ptr->_Left[10]._Parent;
                  *(_DWORD *)&result.second = v113;
                  v111 = (PgWinText *)(v113 + v114());
                }
                else
                {
                  v111 = 0;
                }
              }
              else
              {
                v111 = 0;
              }
              v115 = v2->m_pListWinContent;
              v116 = (std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *)(v115->m_vecButList._Mylast - v115->m_vecButList._Myfirst);
              pkText = v111;
              v182._Ptr = v116;
              if ( nIndex < (unsigned int)v116
                && (v117 = v115->m_vecButList._Myfirst[nIndex],
                    v118 = (char *)v117->m_vecTextWin._Mylast - (char *)v117->m_vecTextWin._Myfirst,
                    Mob_ID = (unsigned int)v115->m_vecButList._Myfirst[nIndex],
                    v118 >> 2)
                && (*(_DWORD *)&result.second = *v117->m_vecTextWin._Myfirst) != 0 )
              {
                if ( nIndex < (signed int)v182._Ptr && Mob_ID )
                {
                  v119 = ((int (__cdecl *)(int))v115->vfptr[42].__vecDelDtor)(v169);
                  v120 = (*(int (**)(void))(**(_DWORD **)&result.second + 168))() + v119;
                  v121 = v120 + (*(int (**)(void))(*(_DWORD *)Mob_ID + 168))();
                  v111 = pkText;
                  Mob_ID = v121;
                }
                else
                {
                  Mob_ID = 0;
                }
              }
              else
              {
                Mob_ID = 0;
              }
              ((void (__stdcall *)(signed int))(*v77)->_Left[16]._Left)(1);
              (*(void (__stdcall **)(PgWinText *))&(*v77)->_Left[10]._Myval)(v111);
              ((void (__stdcall *)(unsigned int))(*v77)->_Left[11]._Left)(Mob_ID);
              v122 = (*v77)->_Left;
              v182._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *)(*(_DWORD *)&pPlayerQuestInfo->ID + 172);
              v123 = ((int (__cdecl *)(int))v122[9]._Left)(v169);
              ((void (__thiscall *)(PLAYER_QUEST_INFO *, int))v182._Ptr->_Left)(pPlayerQuestInfo, v123);
              v85 = nIndex;
            }
          }
        }
        ((void (__stdcall *)(signed int))(*v77)->_Left[32]._Right)(0xFFFF);
        v2->m_arryAutoButEnable[iAutoRunNum] = 0;
        v182._Ptr = *v77;
        goto LABEL_188;
      }
      v17 = TextData2::Get(0xEAF7DC4C);
      sprintf(szTemp, "<%s>", v17);
      v18 = SlideListWin::AddText(v2->m_pListWinContent, szTemp);
      SlideListWin::SetFontColor(v2->m_pListWinContent, v18, 255, 255, 0);
      *(_DWORD *)&questInfo.Data.End_NPCMobCount[0] = 15;
      *(unsigned int *)((char *)&questInfo.Data.RepeatCount + 1) = 0;
      BYTE1(questInfo.Data.StartTime) = 0;
      v187 = 0;
      v19 = TextData2::Get(0x346578AAu);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)&questInfo.Data.StartTime + 1),
        (const char *)v19,
        strlen((const char *)v19));
      v20 = lpQuest->Start.NPCID;
      v21 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
      if ( (unsigned __int8)(*(int (__thiscall **)(_DWORD, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable
                                                               + 16))(
                              ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                              v20) )
      {
        if ( (unsigned __int16)v20 <= *(_WORD *)(v21 + 200) )
        {
          v23 = *(_DWORD *)(v21 + 196);
          if ( *(_DWORD *)(v23 + 4 * v20) )
            v22 = *(_DWORD *)(v23 + 4 * v20);
          else
            v22 = 0;
        }
        else
        {
          v22 = 0;
        }
      }
      else
      {
        v22 = 0;
      }
      sprintf(szTemp, "   %s", v22 + 34);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)&questInfo.Data.StartTime + 1),
        szTemp,
        strlen(szTemp));
      v24 = *(const char **)((char *)&questInfo.Data.StartTime + 1);
      if ( *(_DWORD *)&questInfo.Data.End_NPCMobCount[0] < 0x10u )
        v24 = (char *)&questInfo.Data.StartTime + 1;
      v25 = SlideListWin::AddText(v2->m_pListWinContent, v24);
      SlideListWin::SetFontColor(v2->m_pListWinContent, v25, 255, 255, 0);
      SlideListWin::AddText(v2->m_pListWinContent, &byte_9B5577);
      if ( v25 <= 0 )
      {
LABEL_43:
        v187 = -1;
        if ( *(_DWORD *)&questInfo.Data.End_NPCMobCount[0] >= 0x10u )
          operator delete(*(void **)((char *)&questInfo.Data.StartTime + 1));
        goto LABEL_45;
      }
      v26 = v2->m_pListWinContent;
      if ( v25 >= v26->m_nMaxViewListCnt )
      {
        ((void (__stdcall *)(_DWORD, int))v2->m_pkAutoRunBut[0].m_pObject->vfptr[60].__vecDelDtor)(0, v169);
        v32 = (PgWinText *)v2->m_pkAutoRunBut[0].m_pObject;
        v33 = v32->vfptr[64].__vecDelDtor;
        v169 = 0;
      }
      else
      {
        pkText = SlideListWin::GetTextWin(v26, v25, 0);
        if ( !pkText )
        {
LABEL_39:
          ((void (__stdcall *)(_DWORD))v2->m_pkAutoRunBut[0].m_pObject->vfptr[130].__vecDelDtor)(lpQuest->Start.NPCID);
          v34 = (PgWin *)&v2->m_pkAutoRunBut[0].m_pObject->vfptr;
          if ( (_BYTE)bUseAutoWay )
            v35 = (char *)TextData2::Get(0x3AB58885u);
          else
            v35 = (char *)TextData2::Get(0x89AE82D9);
          PgWin::SetToolTipWinText(v34, v35);
          v2->m_arryAutoButEnable[0] = bUseAutoWay;
          v36 = v2->m_pListWinContent;
          iAutoRunNum = 1;
          SlideListWin::SetData(v36, v25, 1u);
          goto LABEL_43;
        }
        v27 = SlideListWin::GetColumPosX(v26, v25, 0);
        v28 = SlideListWin::GetColumPosY(v2->m_pListWinContent, v25, 0);
        v29 = v2->m_pkAutoRunBut[0].m_pObject->vfptr[60].__vecDelDtor;
        nPosX = v28;
        ((void (__stdcall *)(int, int))v29)(bUseAutoWay, v169);
        ((void (__stdcall *)(signed int))v2->m_pkAutoRunBut[0].m_pObject->vfptr[64].__vecDelDtor)(1);
        ((void (__stdcall *)(int))v2->m_pkAutoRunBut[0].m_pObject->vfptr[43].__vecDelDtor)(v27);
        ((void (__stdcall *)(int))v2->m_pkAutoRunBut[0].m_pObject->vfptr[44].__vecDelDtor)(nPosX);
        v30 = pkText->vfptr;
        v31 = ((int (*)(void))v2->m_pkAutoRunBut[0].m_pObject->vfptr[36].__vecDelDtor)();
        v32 = pkText;
        v169 = v31;
        v33 = v30[43].__vecDelDtor;
      }
      ((void (__thiscall *)(PgWinText *))v33)(v32);
      goto LABEL_39;
    }
  }
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
// A8C27C: using guessed type int ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable;
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (006098D0) --------------------------------------------------------
void __thiscall EpicQuestWin::UpDateViewQuesContent(EpicQuestWin *this, unsigned __int16 qID)
{
  EpicQuestWin *v2; // edi@1
  SlideListWin *v3; // ecx@1
  CClientQuest *v4; // eax@1
  CQuestData *v5; // ebx@2
  QUEST_DATA *v6; // eax@3
  SlideListWin *v7; // ecx@3
  QUEST_DATA *v8; // esi@3
  NiUnsharedGeometryGroup *v9; // eax@3
  NiUnsharedGeometryGroup *v10; // eax@5
  unsigned int v11; // eax@5
  NiUnsharedGeometryGroup *v12; // eax@5
  MobInfo *v13; // eax@5
  const char *v14; // eax@5
  unsigned int v15; // eax@7
  NiUnsharedGeometryGroup *v16; // eax@8
  int v17; // ebx@10
  int v18; // esi@15
  int v19; // edi@15
  int v20; // eax@16
  int v21; // edx@19
  int v22; // ST10_4@22
  NiUnsharedGeometryGroup *v23; // eax@22
  int v24; // esi@23
  int v25; // edi@23
  int v26; // eax@24
  int v27; // ecx@27
  int v28; // ST10_4@30
  NiUnsharedGeometryGroup *v29; // eax@30
  int v30; // esi@31
  int v31; // edi@31
  int v32; // eax@32
  int v33; // edx@35
  int v34; // esi@40
  MobViewInfo *v35; // eax@44
  char v36; // cl@45
  int v37; // esi@56
  int v38; // edi@58
  int v39; // ebx@58
  int v40; // edi@59
  int v41; // edx@62
  int v42; // eax@65
  QUEST_DATA *v43; // esi@66
  NiUnsharedGeometryGroup *v44; // eax@67
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v45; // eax@68
  signed int v46; // edi@69
  unsigned __int16 *v47; // esi@69
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v48; // eax@72
  NiUnsharedGeometryGroup *v49; // eax@74
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v50; // esi@74
  int v51; // edi@75
  int v52; // ebx@75
  int v53; // eax@76
  int v54; // ecx@79
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v55; // eax@83
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *j; // eax@84
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *i; // eax@87
  const char *v58; // eax@92
  EpicQuestWin *v59; // esi@94
  NiUnsharedGeometryGroup *v60; // eax@94
  SlideBar *v61; // ecx@94
  SlideListWin *v62; // eax@95
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v63; // ecx@99
  std::exception pExceptionObject; // [sp+10h] [bp-178h]@101
  std::set<unsigned short,std::less<unsigned short>,std::allocator<unsigned short> > setNpcID; // [sp+1Ch] [bp-16Ch]@68
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > >,bool> result; // [sp+2Ch] [bp-15Ch]@10
  PLAYER_QUEST_INFO *pPlayerQuestInfo; // [sp+34h] [bp-154h]@3
  QUEST_DATA *lpQuest; // [sp+38h] [bp-150h]@3
  EpicQuestWin *v69; // [sp+3Ch] [bp-14Ch]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v70; // [sp+40h] [bp-148h]@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strNpc; // [sp+5Ch] [bp-12Ch]@74
  char szTemp[256]; // [sp+78h] [bp-110h]@3
  int v73; // [sp+184h] [bp-4h]@5

  v2 = this;
  v3 = this->m_pListWinContent;
  v69 = v2;
  SlideListWin::RemoveAllList(v3);
  v4 = QuestDataMgr::GetQuest();
  if ( !v4 )
    return;
  v5 = v4->m_pQuestData;
  if ( !v5 )
    return;
  pPlayerQuestInfo = CQuest::GetQuestInfo((CQuest *)&v4->vfptr, qID);
  v6 = CQuestData::GetQuestData(v5, qID);
  v7 = v2->m_pListWinContent;
  v8 = v6;
  lpQuest = v6;
  SlideListWin::AddText(v7, &byte_9B55B2);
  v9 = TextData::Get(0x9AF8F4FF);
  sprintf(szTemp, "<%s>", v9);
  SlideListWin::AddText(v2->m_pListWinContent, szTemp);
  EpicQuestWin::SetQuestContentText(v2, v8->NameID, 0);
  SlideListWin::AddText(v2->m_pListWinContent, &byte_9B55B3);
  if ( !v8->Start.bIsWaitListProgress && v2->m_eType == UI_LOW_LEVEL )
  {
    v10 = TextData2::Get(0xEAF7DC4C);
    sprintf(szTemp, "<%s>", v10);
    v11 = SlideListWin::AddText(v2->m_pListWinContent, szTemp);
    SlideListWin::SetFontColor(v2->m_pListWinContent, v11, 255, 255, 0);
    v70._Myres = 15;
    v70._Mysize = 0;
    v70._Bx._Buf[0] = 0;
    v73 = 0;
    v12 = TextData2::Get(0x346578AAu);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
      &v70,
      (const char *)v12,
      strlen((const char *)v12));
    v13 = IIDTableBase<MobInfo,MobInfoTab,unsigned short>::GetByID(v8->Start.NPCID);
    sprintf(szTemp, "   %s", v13->Name);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&v70, szTemp, strlen(szTemp));
    v14 = v70._Bx._Ptr;
    if ( v70._Myres < 0x10 )
      v14 = (const char *)&v70;
    v15 = SlideListWin::AddText(v2->m_pListWinContent, v14);
    SlideListWin::SetFontColor(v2->m_pListWinContent, v15, 255, 255, 0);
    SlideListWin::AddText(v2->m_pListWinContent, &byte_9B55BB);
    v73 = -1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v70);
  }
  v16 = TextData::Get(0x7A95849Cu);
  sprintf(szTemp, "<%s>", v16);
  SlideListWin::AddText(v2->m_pListWinContent, szTemp);
  if ( v8->End.bLevel )
  {
    sprintf(szTemp, "Level : %d", v8->End.Level);
    SlideListWin::AddText(v2->m_pListWinContent, szTemp);
  }
  *(_DWORD *)&result.second = 0;
  v17 = (int)&v8->End.NPCMobList[0].NPCMobID;
  while ( *(_BYTE *)(v17 - 2) )
  {
    if ( *(_BYTE *)(v17 + 2) == 1 )
    {
      v30 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
      v31 = *(_WORD *)v17;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 16))(
                              ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                              v31) )
      {
        if ( (unsigned __int16)v31 <= *(_WORD *)(v30 + 200) )
        {
          v33 = *(_DWORD *)(v30 + 196);
          if ( *(_DWORD *)(v33 + 4 * v31) )
            v32 = *(_DWORD *)(v33 + 4 * v31);
          else
            v32 = 0;
        }
        else
        {
          v32 = 0;
        }
      }
      else
      {
        v32 = 0;
      }
      if ( pPlayerQuestInfo && v69->m_eType == 1 )
        v34 = pPlayerQuestInfo->Data.End_NPCMobCount[*(_DWORD *)&result.second];
      else
        v34 = 0;
      if ( *(_BYTE *)(v17 + 4) )
      {
        v35 = MobViewInfoTab::GetByID(*(_WORD *)v17);
        if ( v35 )
        {
          v36 = *(_BYTE *)(v17 + 4);
          switch ( v36 )
          {
            case 1:
              sprintf(szTemp, "%s %d/%d", v35->Group1, v34, *(_BYTE *)(v17 + 3));
              break;
            case 2:
              sprintf(szTemp, "%s %d/%d", v35->Group2, v34, *(_BYTE *)(v17 + 3));
              break;
            case 3:
              sprintf(szTemp, "%s %d/%d", v35->Group3, v34, *(_BYTE *)(v17 + 3));
              break;
            case 4:
              sprintf(szTemp, "%s %d/%d", v35->GroupS, v34, *(_BYTE *)(v17 + 3));
              break;
          }
        }
      }
      else
      {
        sprintf(szTemp, "%s %d/%d", v32 + 34, v34, *(_BYTE *)(v17 + 3));
      }
      goto LABEL_53;
    }
    if ( *(_BYTE *)(v17 + 2) == 2 )
    {
      v24 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
      v25 = *(_WORD *)v17;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 16))(
                              ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                              v25) )
      {
        if ( (unsigned __int16)v25 <= *(_WORD *)(v24 + 200) )
        {
          v27 = *(_DWORD *)(v24 + 196);
          if ( *(_DWORD *)(v27 + 4 * v25) )
            v26 = *(_DWORD *)(v27 + 4 * v25);
          else
            v26 = 0;
        }
        else
        {
          v26 = 0;
        }
      }
      else
      {
        v26 = 0;
      }
      v28 = v26 + 34;
      v29 = TextData::Get(0x3C497E96u);
      sprintf(szTemp, (const char *)v29, &unk_9B55C5, v28);
LABEL_53:
      SlideListWin::AddText(v69->m_pListWinContent, szTemp);
LABEL_54:
      v8 = lpQuest;
      goto LABEL_55;
    }
    if ( *(_BYTE *)(v17 + 2) == 3 )
    {
      v18 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
      v19 = *(_WORD *)v17;
      if ( (unsigned __int8)(*(int (__thiscall **)(_DWORD, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable
                                                               + 16))(
                              ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                              v19) )
      {
        if ( (unsigned __int16)v19 <= *(_WORD *)(v18 + 200) )
        {
          v21 = *(_DWORD *)(v18 + 196);
          if ( *(_DWORD *)(v21 + 4 * v19) )
            v20 = *(_DWORD *)(v21 + 4 * v19);
          else
            v20 = 0;
        }
        else
        {
          v20 = 0;
        }
      }
      else
      {
        v20 = 0;
      }
      v22 = v20 + 34;
      v23 = TextData::Get(0x8DECE4E2);
      sprintf(szTemp, (const char *)v23, &unk_9B55C6, v22);
      SlideListWin::AddText(v69->m_pListWinContent, szTemp);
      goto LABEL_54;
    }
LABEL_55:
    v17 += 8;
    if ( ++*(_DWORD *)&result.second >= 5 )
      break;
  }
  *(_DWORD *)&result.second = 0;
  v37 = (int)&v8->End.ItemList[0].ItemID;
  do
  {
    if ( !*(_BYTE *)(v37 - 2) )
      break;
    v38 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    v39 = *(_WORD *)v37;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v39) )
    {
      if ( (unsigned __int16)v39 <= *(_WORD *)(v38 + 200) )
      {
        v41 = *(_DWORD *)(v38 + 196);
        v40 = *(_DWORD *)(v41 + 4 * v39) ? *(_DWORD *)(v41 + 4 * v39) : 0;
      }
      else
      {
        v40 = 0;
      }
    }
    else
    {
      v40 = 0;
    }
    v42 = Inventory::GetItemCnt(&g_kInventory, *(_WORD *)v37);
    sprintf(szTemp, "%s %d/%d", v40 + 34, v42, *(_WORD *)(v37 + 2));
    SlideListWin::AddText(v69->m_pListWinContent, szTemp);
    v37 += 6;
    ++*(_DWORD *)&result.second;
  }
  while ( *(_DWORD *)&result.second < 5 );
  v43 = lpQuest;
  if ( lpQuest->End.bLocation )
  {
    v44 = TextData::Get(0x39323D31u);
    sprintf(szTemp, (const char *)v44, &unk_9B55C7);
    SlideListWin::AddText(v69->m_pListWinContent, szTemp);
  }
  setNpcID._Mysize = 0;
  v45 = (std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *)operator new(0x10u);
  if ( !v45 )
  {
    pPlayerQuestInfo = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&pPlayerQuestInfo);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  setNpcID._Myhead = v45;
  v45->_Left = v45;
  setNpcID._Myhead->_Parent = setNpcID._Myhead;
  setNpcID._Myhead->_Right = setNpcID._Myhead;
  setNpcID._Myhead->_Color = 1;
  setNpcID._Myhead->_Isnil = 1;
  v46 = 0;
  v73 = 1;
  v47 = (unsigned __int16 *)&v43->End.NPCMobList[0].NPCMobAction;
  do
  {
    if ( !*((_BYTE *)v47 - 4) )
      break;
    if ( !*(_BYTE *)v47 )
    {
      v48 = std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Buynode<unsigned short>(
              (std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&setNpcID.comp,
              v47 - 1);
      std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Linsert(
        (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&setNpcID.comp,
        &result,
        v48,
        0);
    }
    ++v46;
    v47 += 4;
  }
  while ( v46 < 5 );
  strNpc._Myres = 15;
  strNpc._Mysize = 0;
  strNpc._Bx._Buf[0] = 0;
  LOBYTE(v73) = 2;
  v49 = TextData::Get(0xEE023049);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
    &strNpc,
    (const char *)v49,
    strlen((const char *)v49));
  v50 = setNpcID._Myhead->_Left;
  while ( v50 != setNpcID._Myhead )
  {
    v51 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
    v52 = v50->_Myval;
    if ( (unsigned __int8)(*(int (__thiscall **)(_DWORD, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 16))(
                            ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                            v52) )
    {
      if ( (unsigned __int16)v52 <= *(_WORD *)(v51 + 200) )
      {
        v54 = *(_DWORD *)(v51 + 196);
        if ( *(_DWORD *)(v54 + 4 * v52) )
          v53 = *(_DWORD *)(v54 + 4 * v52);
        else
          v53 = 0;
      }
      else
      {
        v53 = 0;
      }
    }
    else
    {
      v53 = 0;
    }
    sprintf(szTemp, "   %s", v53 + 34);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strNpc, szTemp, strlen(szTemp));
    if ( !v50->_Isnil )
    {
      v55 = v50->_Right;
      if ( v55->_Isnil )
      {
        for ( i = v50->_Parent; !i->_Isnil; i = i->_Parent )
        {
          if ( v50 != i->_Right )
            break;
          v50 = i;
        }
        v50 = i;
      }
      else
      {
        v50 = v50->_Right;
        for ( j = v55->_Left; !j->_Isnil; j = j->_Left )
          v50 = j;
      }
    }
  }
  v58 = strNpc._Bx._Ptr;
  if ( strNpc._Myres < 0x10 )
    v58 = (const char *)&strNpc;
  v59 = v69;
  SlideListWin::AddText(v69->m_pListWinContent, v58);
  SlideListWin::AddText(v59->m_pListWinContent, &byte_9B55F6);
  v60 = TextData::Get(0xEEE74F4D);
  sprintf(szTemp, "<%s>", v60);
  SlideListWin::AddText(v59->m_pListWinContent, szTemp);
  EpicQuestWin::SetQuestContentText(v59, lpQuest->BrifingID, 0);
  SlideListWin::AddText(v59->m_pListWinContent, &byte_9B55F7);
  SlideListWin::AlignText(v59->m_pListWinContent, 4u);
  SlideListWin::AddText(v59->m_pListWinContent, &byte_9B5605);
  SlideListWin::AddText(v59->m_pListWinContent, &byte_9B5606);
  SlideListWin::AddText(v59->m_pListWinContent, &byte_9B5607);
  v61 = v59->m_pSlideBarContent;
  if ( v61 )
  {
    v62 = v59->m_pListWinContent;
    if ( v62 )
    {
      SlideBar::SetSplitCnt(v61, v62->m_nSlideSplitCnt);
      v59->m_pListWinContent->m_nViewStartPos = v59->m_pSlideBarContent->m_nCurPos;
      SlideListWin::UpdateViewList(v59->m_pListWinContent);
    }
  }
  if ( strNpc._Myres >= 0x10 )
    operator delete(strNpc._Bx._Ptr);
  strNpc._Myres = 15;
  strNpc._Mysize = 0;
  strNpc._Bx._Buf[0] = 0;
  v63 = setNpcID._Myhead->_Left;
  v73 = 3;
  std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::erase(
    (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&setNpcID.comp,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *)&pPlayerQuestInfo,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > >)v63,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > >)setNpcID._Myhead);
  operator delete(setNpcID._Myhead);
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0060A220) --------------------------------------------------------
void __thiscall CQuestWin2::UpDateViewQuestList(CQuestWin2 *this, bool bUseCurLevel, int iLevel)
{
  CClientQuest *v3; // eax@1
  CQuestData *v4; // edi@1
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v5; // eax@1
  QUEST_DATA *v6; // eax@3
  CQuest *v7; // edi@3
  unsigned __int16 *v8; // ebx@3
  unsigned __int16 v9; // ST24_2@3
  unsigned __int16 v10; // ST24_2@5
  QUEST_DATA *v11; // eax@5
  bool v12; // zf@5
  QUEST_DATA *v13; // esi@5
  signed int v14; // edi@7
  NiUnsharedGeometryGroup *v15; // eax@10
  NiUnsharedGeometryGroup *v16; // eax@13
  NiUnsharedGeometryGroup *v17; // eax@14
  NiUnsharedGeometryGroup *v18; // eax@17
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v19; // ecx@28
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v20; // eax@28
  std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *v21; // esi@28
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v22; // eax@33
  int *v23; // eax@35
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v24; // eax@37
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v25; // eax@40
  int v26; // eax@43
  const char *v27; // ecx@46
  char v28; // ST24_1@48
  PLAYER_QUEST_STATUS v29; // ST20_4@48
  int v30; // ST1C_4@48
  int v31; // ST18_4@48
  int v32; // ST14_4@48
  unsigned int v33; // ST10_4@48
  const char *v34; // ST0C_4@48
  const char *v35; // eax@48
  QUEST_DATA *v36; // esi@48
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > >,bool> *v37; // eax@49
  signed int v38; // esi@61
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v39; // esi@64
  CQuestWin2 *v40; // edi@65
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v41; // ecx@66
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *mm; // eax@69
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *ll; // eax@72
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v44; // eax@81
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *i1; // eax@82
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *nn; // eax@85
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v47; // esi@92
  CQuestWin2 *v48; // edi@93
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v49; // eax@97
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *kk; // eax@98
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *jj; // eax@101
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v52; // esi@108
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v53; // edi@108
  CQuestWin2 *v54; // ebx@109
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v55; // eax@113
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *m; // eax@114
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *l; // eax@117
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v58; // esi@122
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v59; // edi@122
  CQuestWin2 *v60; // ebx@123
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v61; // eax@127
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *ii; // eax@128
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *n; // eax@131
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v64; // esi@137
  CQuestWin2 *v65; // edi@138
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v66; // eax@142
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *k; // eax@143
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *j; // eax@146
  CQuestWin2 *v69; // edi@153
  SlideBar *v70; // ecx@155
  SlideListWin *v71; // eax@156
  NiRefObjectVtbl *v72; // esi@158
  unsigned int v73; // ST24_4@158
  char *v74; // eax@158
  char *v75; // eax@158
  unsigned int v76; // ebx@158
  NiRefObjectVtbl *v77; // esi@158
  unsigned int v78; // ST24_4@158
  char *v79; // eax@158
  char *v80; // eax@158
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v81; // ecx@160
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > >,bool> v82; // [sp+10h] [bp-164h]@49
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > >,bool> result; // [sp+18h] [bp-15Ch]@40
  char v84; // [sp+20h] [bp-154h]@50
  std::exception pExceptionObject; // [sp+28h] [bp-14Ch]@161
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v86; // [sp+34h] [bp-140h]@33
  char *_What; // [sp+38h] [bp-13Ch]@161
  CQuest *pQuest; // [sp+3Ch] [bp-138h]@1
  int r; // [sp+40h] [bp-134h]@5
  PLAYER_QUEST_STATUS nStatus; // [sp+44h] [bp-130h]@5
  int b; // [sp+48h] [bp-12Ch]@5
  int g; // [sp+4Ch] [bp-128h]@5
  unsigned int uiNumQuest2; // [sp+50h] [bp-124h]@2
  QUEST_DATA *lpQuest; // [sp+54h] [bp-120h]@3
  unsigned int uiNumQuest1; // [sp+58h] [bp-11Ch]@2
  int i; // [sp+5Ch] [bp-118h]@2
  int Qlv; // [sp+60h] [bp-114h]@7
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > >,std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > > v98; // [sp+64h] [bp-110h]@42
  CQuestData *pQData; // [sp+6Ch] [bp-108h]@1
  std::multimap<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> > > mapQuest; // [sp+70h] [bp-104h]@1
  int Userlv; // [sp+80h] [bp-F4h]@7
  int bCountinue; // [sp+84h] [bp-F0h]@5
  int _Keyval; // [sp+88h] [bp-ECh]@36
  CQuestWin2 *v104; // [sp+8Ch] [bp-E8h]@1
  bool bIsSelectedQuest; // [sp+93h] [bp-E1h]@1
  CQuestWin2::QData kData; // [sp+94h] [bp-E0h]@48
  std::pair<int,CQuestWin2::QData> _Val; // [sp+ECh] [bp-88h]@49
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strQuestState; // [sp+148h] [bp-2Ch]@5
  int v109; // [sp+170h] [bp-4h]@2

  v104 = this;
  SlideListWin::RemoveAllList(this->m_pListWinQuestList);
  v3 = QuestDataMgr::GetQuest();
  v4 = v3->m_pQuestData;
  pQuest = (CQuest *)v3;
  pQData = v4;
  bIsSelectedQuest = 0;
  mapQuest._Mysize = 0;
  v5 = (std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *)operator new(0x6Cu);
  if ( !v5 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  mapQuest._Myhead = v5;
  v5->_Left = v5;
  mapQuest._Myhead->_Parent = mapQuest._Myhead;
  mapQuest._Myhead->_Right = mapQuest._Myhead;
  mapQuest._Myhead->_Color = 1;
  mapQuest._Myhead->_Isnil = 1;
  v109 = 0;
  uiNumQuest2 = 0;
  uiNumQuest1 = 0;
  i = 0;
  if ( CQuestData::GetNumOfQuestData(v4) > 0u )
  {
    while ( 1 )
    {
      v6 = CQuestData::GetQuestDataByIndex(pQData, i);
      v7 = pQuest;
      v8 = &v6->ID;
      v9 = v6->ID;
      lpQuest = v6;
      if ( CQuest::IsDoingQuest(pQuest, v9) || CQuest::IsDoingableQuest(v7, *v8) )
        break;
LABEL_61:
      v38 = ++i;
      if ( v38 >= CQuestData::GetNumOfQuestData(pQData) )
        goto LABEL_62;
    }
    strQuestState._Myres = 15;
    strQuestState._Mysize = 0;
    strQuestState._Bx._Buf[0] = 0;
    v10 = *v8;
    LOBYTE(v109) = 1;
    v11 = CQuest::GetNewQuestStatus(v7, v10);
    v12 = v104->m_nStateFilterType == 0;
    v13 = v11;
    nStatus = (PLAYER_QUEST_STATUS)v11;
    b = 255;
    g = 255;
    r = 255;
    LOBYTE(bCountinue) = 1;
    if ( v12 )
      LOBYTE(bCountinue) = 0;
    v14 = 0;
    Qlv = lpQuest->Start.LevelMin;
    Userlv = User::Lv(&g_kUser);
    if ( !bUseCurLevel )
      Userlv = iLevel;
    switch ( v13 )
    {
      case 6u:
        v15 = TextData::Get(0x9FB2A8D8);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &strQuestState,
          (const char *)v15,
          strlen((const char *)v15));
        if ( v104->m_nStateFilterType == 1 )
          LOBYTE(bCountinue) = 0;
        goto LABEL_12;
      case 7u:
        v16 = TextData::Get(0xD6EAF4F4);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &strQuestState,
          (const char *)v16,
          strlen((const char *)v16));
        v14 = 1;
        break;
      case 8u:
        v17 = TextData::Get(0xDA03E902);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &strQuestState,
          (const char *)v17,
          strlen((const char *)v17));
        v12 = v104->m_nStateFilterType == 2;
        r = 64;
        g = 251;
        b = 107;
        if ( v12 )
        {
          LOBYTE(bCountinue) = 0;
          v14 = 1;
        }
        else
        {
LABEL_12:
          v14 = 1;
        }
        break;
      case 0u:
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strQuestState, "None", 4u);
        break;
      case 4u:
      case 5u:
      case 0x14u:
        v18 = TextData2::Get(0x3F4857B5u);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &strQuestState,
          (const char *)v18,
          strlen((const char *)v18));
        v14 = 2;
        break;
      default:
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strQuestState, "...", 3u);
        break;
    }
    if ( lpQuest->Start.bItem != 1 && lpQuest->Start.bIsWaitListView )
    {
      if ( v14 != 1 )
      {
        if ( v14 == 2 && Userlv - Qlv <= 150 )
          ++uiNumQuest2;
        goto LABEL_28;
      }
    }
    else if ( v14 != 1 )
    {
LABEL_59:
      LOBYTE(v109) = 0;
      if ( strQuestState._Myres >= 0x10 )
        operator delete(strQuestState._Bx._Ptr);
      goto LABEL_61;
    }
    ++uiNumQuest1;
LABEL_28:
    v19 = v104->m_setAbleQuest._Myhead;
    v20 = v19->_Parent;
    v21 = (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v104->m_setAbleQuest.comp;
    while ( !v20->_Isnil )
    {
      if ( v20->_Myval >= *v8 )
      {
        v19 = v20;
        v20 = v20->_Left;
      }
      else
      {
        v20 = v20->_Right;
      }
    }
    v22 = v104->m_setAbleQuest._Myhead;
    v86 = v19;
    if ( v19 == v22 || *v8 < v19->_Myval )
    {
      _Keyval = (int)v22;
      v23 = &_Keyval;
    }
    else
    {
      v23 = (int *)&v86;
    }
    v24 = (std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *)*v23;
    if ( nStatus != 5 || Userlv - Qlv > 150 )
    {
      if ( v24 != v104->m_setAbleQuest._Myhead )
        std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::erase(
          (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v104->m_setAbleQuest.comp,
          (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *)&v98.second,
          (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > >)v24);
    }
    else if ( v24 == v104->m_setAbleQuest._Myhead )
    {
      v25 = std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Buynode<unsigned short>(
              (std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v104->m_setAbleQuest.comp,
              v8);
      std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Linsert(
        v21,
        &result,
        v25,
        0);
      v104->m_bLevelUp = 1;
    }
    v26 = v104->m_nCurSelTab;
    if ( (v26 != 2 || Userlv - Qlv <= 150) && v26 == v14 )
    {
      v27 = strQuestState._Bx._Ptr;
      if ( strQuestState._Myres < 0x10 )
        v27 = (const char *)&strQuestState;
      v28 = bCountinue;
      v29 = nStatus;
      v30 = b;
      v31 = g;
      v32 = r;
      v33 = *v8;
      v34 = v27;
      v35 = CQuestData::GetQuestName(pQData, v33);
      v36 = lpQuest;
      CQuestWin2::QData::QData(&kData, *v8, lpQuest->Type, v35, v34, v33, v32, v31, v30, v29, v28);
      v12 = v104->m_nStateFilterType == 4;
      LOBYTE(v109) = 2;
      if ( v12 )
      {
        _Val.first = v36->Start.LevelMin;
        CQuestWin2::QData::QData(&_Val.second, &kData);
        LOBYTE(v109) = 3;
        v37 = &v82;
      }
      else
      {
        _Val.first = (_BYTE)bCountinue != 0;
        CQuestWin2::QData::QData(&_Val.second, &kData);
        LOBYTE(v109) = 4;
        v37 = (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > >,bool> *)&v84;
      }
      std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::insert<std::pair<int,CQuestWin2::QData>>(
        (std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *)&mapQuest.comp,
        v37,
        &_Val);
      if ( _Val.second.strState._Myres >= 0x10 )
        operator delete(_Val.second.strState._Bx._Ptr);
      _Val.second.strState._Bx._Buf[0] = 0;
      _Val.second.strState._Mysize = 0;
      _Val.second.strState._Myres = 15;
      if ( _Val.second.strTitle._Myres >= 0x10 )
        operator delete(_Val.second.strTitle._Bx._Ptr);
      if ( kData.strState._Myres >= 0x10 )
        operator delete(kData.strState._Bx._Ptr);
      kData.strState._Myres = 15;
      kData.strState._Mysize = 0;
      kData.strState._Bx._Buf[0] = 0;
      if ( kData.strTitle._Myres >= 0x10 )
        operator delete(kData.strTitle._Bx._Ptr);
    }
    goto LABEL_59;
  }
LABEL_62:
  if ( v104->m_nStateFilterType != 4 )
  {
    if ( v104->m_nCurSelTab == 2 )
    {
      v64 = mapQuest._Myhead->_Left;
      if ( mapQuest._Myhead->_Left == mapQuest._Myhead )
        goto LABEL_152;
      v65 = v104;
      do
      {
        if ( CQuestWin2::AddQuestListElement(v65, &v64->_Myval.second) )
          bIsSelectedQuest = 1;
        if ( !v64->_Isnil )
        {
          v66 = v64->_Right;
          if ( v66->_Isnil )
          {
            for ( j = v64->_Parent; !j->_Isnil; j = j->_Parent )
            {
              if ( v64 != j->_Right )
                break;
              v64 = j;
            }
            v64 = j;
          }
          else
          {
            v64 = v64->_Right;
            for ( k = v66->_Left; !k->_Isnil; k = k->_Left )
              v64 = k;
          }
        }
      }
      while ( v64 != mapQuest._Myhead );
    }
    else
    {
      _Keyval = 1;
      std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Eqrange(
        (std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *)&mapQuest.comp,
        &v98,
        &_Keyval);
      v52 = v98.first._Ptr;
      v53 = v98.second._Ptr;
      if ( v98.first._Ptr != v98.second._Ptr )
      {
        v54 = v104;
        do
        {
          if ( CQuestWin2::AddQuestListElement(v54, &v52->_Myval.second) )
            bIsSelectedQuest = 1;
          if ( !v52->_Isnil )
          {
            v55 = v52->_Right;
            if ( v55->_Isnil )
            {
              for ( l = v52->_Parent; !l->_Isnil; l = l->_Parent )
              {
                if ( v52 != l->_Right )
                  break;
                v52 = l;
              }
              v52 = l;
            }
            else
            {
              v52 = v52->_Right;
              for ( m = v55->_Left; !m->_Isnil; m = m->_Left )
                v52 = m;
            }
          }
        }
        while ( v52 != v53 );
      }
      _Keyval = 0;
      std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Eqrange(
        (std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *)&mapQuest.comp,
        &v98,
        &_Keyval);
      v58 = v98.first._Ptr;
      v59 = v98.second._Ptr;
      if ( v98.first._Ptr != v98.second._Ptr )
      {
        v60 = v104;
        do
        {
          if ( CQuestWin2::AddQuestListElement(v60, &v58->_Myval.second) )
            bIsSelectedQuest = 1;
          if ( !v58->_Isnil )
          {
            v61 = v58->_Right;
            if ( v61->_Isnil )
            {
              for ( n = v58->_Parent; !n->_Isnil; n = n->_Parent )
              {
                if ( v58 != n->_Right )
                  break;
                v58 = n;
              }
              v58 = n;
            }
            else
            {
              v58 = v58->_Right;
              for ( ii = v61->_Left; !ii->_Isnil; ii = ii->_Left )
                v58 = ii;
            }
          }
        }
        while ( v58 != v59 );
      }
    }
    goto LABEL_151;
  }
  if ( !v104->bReverseSort )
  {
    v47 = mapQuest._Myhead->_Left;
    if ( mapQuest._Myhead->_Left == mapQuest._Myhead )
      goto LABEL_152;
    v48 = v104;
    do
    {
      if ( CQuestWin2::AddQuestListElement(v48, &v47->_Myval.second) )
        bIsSelectedQuest = 1;
      if ( !v47->_Isnil )
      {
        v49 = v47->_Right;
        if ( v49->_Isnil )
        {
          for ( jj = v47->_Parent; !jj->_Isnil; jj = jj->_Parent )
          {
            if ( v47 != jj->_Right )
              break;
            v47 = jj;
          }
          v47 = jj;
        }
        else
        {
          v47 = v47->_Right;
          for ( kk = v49->_Left; !kk->_Isnil; kk = kk->_Left )
            v47 = kk;
        }
      }
    }
    while ( v47 != mapQuest._Myhead );
LABEL_151:
    if ( bIsSelectedQuest )
      goto LABEL_153;
    goto LABEL_152;
  }
  v39 = mapQuest._Myhead;
  if ( v39 != v39->_Left )
  {
    v40 = v104;
    do
    {
      v41 = v39;
      if ( v39->_Isnil )
      {
        v41 = v39->_Right;
      }
      else if ( v39->_Left->_Isnil )
      {
        for ( ll = v39->_Parent; !ll->_Isnil; ll = ll->_Parent )
        {
          if ( v41 != ll->_Left )
            break;
          v41 = ll;
        }
        if ( !v41->_Isnil )
          v41 = ll;
      }
      else
      {
        v41 = v39->_Left;
        for ( mm = v39->_Left->_Right; !mm->_Isnil; mm = mm->_Right )
          v41 = mm;
      }
      if ( CQuestWin2::AddQuestListElement(v40, &v41->_Myval.second) )
        bIsSelectedQuest = 1;
      if ( v39->_Isnil )
      {
        v39 = v39->_Right;
      }
      else
      {
        v44 = v39->_Left;
        if ( v39->_Left->_Isnil )
        {
          for ( nn = v39->_Parent; !nn->_Isnil; nn = nn->_Parent )
          {
            if ( v39 != nn->_Left )
              break;
            v39 = nn;
          }
          if ( !v39->_Isnil )
            v39 = nn;
        }
        else
        {
          v39 = v39->_Left;
          for ( i1 = v44->_Right; !i1->_Isnil; i1 = i1->_Right )
            v39 = i1;
        }
      }
    }
    while ( v39 != mapQuest._Myhead->_Left );
    goto LABEL_151;
  }
LABEL_152:
  v104->m_nSelectedID = -1;
LABEL_153:
  v69 = v104;
  if ( !v104->m_nSortColumn )
    SlideListWin::Sort(v104->m_pListWinQuestList, 0, v104->bReverseSort, 0);
  SlideListWin::AlignText(v69->m_pListWinQuestList, 4u);
  SlideListWin::AlignText(v69->m_pListWinQuestList, 1u, 5u);
  v70 = v69->m_pSlideBarList;
  if ( v70 )
  {
    v71 = v69->m_pListWinQuestList;
    if ( v71 )
    {
      SlideBar::SetSplitCnt(v70, v71->m_nSlideSplitCnt);
      v69->m_pListWinQuestList->m_nViewStartPos = v69->m_pSlideBarList->m_nCurPos;
      SlideListWin::UpdateViewList(v69->m_pListWinQuestList);
      CQuestWin2::UpdateQuestStateIcon(v69);
    }
  }
  v72 = v69->m_pkTabText1->vfptr;
  v73 = uiNumQuest1;
  v74 = (char *)TextData2::Get(0x474930A2u);
  v75 = fs(v74, v73);
  v72[118].__vecDelDtor((NiRefObject *)v69->m_pkTabText1, (unsigned int)v75);
  v76 = uiNumQuest2;
  v77 = v69->m_pkTabText2->vfptr;
  v78 = uiNumQuest2;
  v79 = (char *)TextData2::Get(0x3F4856B5u);
  v80 = fs(v79, v78);
  v77[118].__vecDelDtor((NiRefObject *)v69->m_pkTabText2, (unsigned int)v80);
  if ( !v76 )
    v69->m_bLevelUp = 0;
  v81 = mapQuest._Myhead->_Left;
  v109 = 5;
  std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::erase(
    (std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *)&mapQuest.comp,
    &v98.second,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > >)v81,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > >)mapQuest._Myhead);
  operator delete(mapQuest._Myhead);
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0060ACB0) --------------------------------------------------------
void __thiscall CQuestWin2::UpdateQuestData(CQuestWin2 *this)
{
  CQuestWin2 *v1; // esi@1
  signed int v2; // edi@1
  char *v3; // ebx@1
  RewardWin *v4; // eax@7

  v1 = this;
  v2 = 0;
  v3 = (char *)this->m_pkAutoRunBut;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 240))(0);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 256))(0);
    v1->m_arryAutoButEnable[v2++] = 0;
    v3 += 4;
  }
  while ( v2 < 10 );
  CQuestWin2::UpDateViewQuestList(v1, 1, 0);
  if ( v1->m_nSelectedID <= -1 )
    CQuestWin2::OnQuestListLClick(v1, (int)v3, -1, 0, 1);
  else
    CQuestWin2::UpDateViewQuesContent(v1, v1->m_nSelectedID);
  if ( v1->m_nSelectedID == -1 )
  {
    v4 = v1->m_pkRewardWin;
    if ( v4 )
      v4->m_uFlags |= 1u;
    ((void (__stdcall *)(_DWORD))v1->m_pkLocationInfoWinBut->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v1->m_pkLocationInfoWinText->vfptr[64].__vecDelDtor)(0);
  }
  if ( !SlideListWin::GetItemSize(v1->m_pListWinQuestList) && v1->m_nCurSelTab == 2 )
  {
    ((void (__stdcall *)(_DWORD))v1->m_pkAcceptBtn->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v1->m_pkAcceptBtnSpr->vfptr[60].__vecDelDtor)(0);
    v1->m_pkAcceptBtnSpr->vfptr[64].__vecDelDtor((NiRefObject *)v1->m_pkAcceptBtnSpr, 0);
  }
}

//----- (0060ADB0) --------------------------------------------------------
void __thiscall EpicQuestWin::UpDateViewQuestList(EpicQuestWin *this)
{
  EpicQuestWin *v1; // edi@1
  CClientQuest *v2; // eax@1
  CQuestData *v3; // ebx@1
  SlideListWin *v4; // ecx@1
  signed int v5; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v6; // eax@1
  QUEST_DATA *v7; // esi@3
  EpicQuestWin::eUI_TYPE v8; // eax@3
  char v9; // al@5
  unsigned int v10; // edi@7
  const char *v11; // eax@7
  unsigned int v12; // ecx@7
  unsigned int v13; // edx@7
  CQuest *v14; // ebx@12
  unsigned __int16 v15; // ST18_2@13
  QUEST_DATA *v16; // eax@13
  int v17; // ebx@13
  NiUnsharedGeometryGroup *v18; // eax@18
  unsigned int v19; // ST0C_4@18
  const char *v20; // eax@18
  std::pair<int,EpicQuestWin::QData> *v21; // eax@18
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v22; // esi@26
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v23; // ecx@27
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *k; // eax@30
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *j; // eax@33
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v26; // eax@42
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *m; // eax@43
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *l; // eax@46
  SlideBar *v29; // ecx@54
  SlideListWin *v30; // eax@55
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v31; // ST14_4@57
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > >,bool> v32; // [sp+10h] [bp-FCh]@18
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > >,bool> result; // [sp+18h] [bp-F4h]@7
  std::exception pExceptionObject; // [sp+20h] [bp-ECh]@58
  PLAYER_QUEST_STATUS nStatus; // [sp+2Ch] [bp-E0h]@13
  CQuestData *pQData; // [sp+30h] [bp-DCh]@1
  CQuest *pQuest; // [sp+34h] [bp-D8h]@1
  int i; // [sp+38h] [bp-D4h]@2
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > > v39; // [sp+3Ch] [bp-D0h]@57
  std::multimap<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> > > mapQuest; // [sp+40h] [bp-CCh]@1
  EpicQuestWin *v41; // [sp+50h] [bp-BCh]@1
  bool bIsSelectedQuest; // [sp+57h] [bp-B5h]@1
  std::pair<int,EpicQuestWin::QData> v43; // [sp+58h] [bp-B4h]@18
  std::pair<int,EpicQuestWin::QData> _Val; // [sp+90h] [bp-7Ch]@7
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strQuestState; // [sp+C8h] [bp-44h]@7
  unsigned int v46; // [sp+E4h] [bp-28h]@7
  unsigned int v47; // [sp+ECh] [bp-20h]@7
  int v48; // [sp+F0h] [bp-1Ch]@7
  int v49; // [sp+F4h] [bp-18h]@7
  int v50; // [sp+F8h] [bp-14h]@7
  int v51; // [sp+108h] [bp-4h]@2

  v1 = this;
  v41 = this;
  v2 = QuestDataMgr::GetQuest();
  v3 = v2->m_pQuestData;
  v4 = v1->m_pListWinQuestList;
  pQuest = (CQuest *)v2;
  pQData = v3;
  bIsSelectedQuest = 0;
  SlideListWin::RemoveAllList(v4);
  v5 = 0;
  mapQuest._Mysize = 0;
  v6 = (std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *)operator new(0x48u);
  if ( !v6 )
  {
    v39._Ptr = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&v39);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  mapQuest._Myhead = v6;
  v6->_Left = v6;
  mapQuest._Myhead->_Parent = mapQuest._Myhead;
  mapQuest._Myhead->_Right = mapQuest._Myhead;
  mapQuest._Myhead->_Color = 1;
  mapQuest._Myhead->_Isnil = 1;
  v51 = 0;
  i = 0;
  if ( CQuestData::GetNumOfQuestData(v3) > 0u )
  {
    do
    {
      v7 = CQuestData::GetQuestDataByIndex(v3, v5);
      v8 = v1->m_eType;
      if ( v8 == 1 )
      {
        if ( CQuest::GetNewQuestStatus(pQuest, v7->ID) != (QUEST_DATA *)2 )
          goto LABEL_25;
        v9 = v7->Type;
        if ( v9 != 6 && v9 != 7 )
          goto LABEL_25;
        v10 = v7->ID;
        v11 = CQuestData::GetQuestName(v3, v7->ID);
        v12 = v7->Type;
        v13 = v7->ID;
        v46 = 15;
        *(_DWORD *)&strQuestState._Alval.0 = 0;
        strQuestState._Bx._Buf[8] = 0;
        *(_QWORD *)&strQuestState._Bx._Buf[0] = __PAIR__(v12, v13);
        LOBYTE(v51) = 1;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)&strQuestState + 8),
          v11,
          strlen(v11));
        v47 = v10;
        v48 = 255;
        v49 = 255;
        v50 = 255;
        _Val.first = v7->Start.LevelMin;
        LOBYTE(v51) = 2;
        *(_QWORD *)&_Val.second.dwQuestID = *(_QWORD *)&strQuestState._Bx._Buf[0];
        _Val.second.strTitle._Myres = 15;
        _Val.second.strTitle._Mysize = 0;
        _Val.second.strTitle._Bx._Buf[0] = 0;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &_Val.second.strTitle,
          (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)&strQuestState + 8),
          0,
          0xFFFFFFFF);
        _Val.second.dwData = v47;
        _Val.second.r = v48;
        _Val.second.g = v49;
        _Val.second.b = v50;
        LOBYTE(v51) = 3;
        std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::insert<std::pair<int,EpicQuestWin::QData>>(
          (std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > *)&mapQuest.comp,
          &result,
          &_Val);
        if ( _Val.second.strTitle._Myres >= 0x10 )
          operator delete(_Val.second.strTitle._Bx._Ptr);
        LOBYTE(v51) = 0;
        if ( v46 >= 0x10 )
          operator delete(*(void **)&strQuestState._Bx._Alias[8]);
      }
      else
      {
        if ( v8 )
          goto LABEL_25;
        v14 = pQuest;
        if ( !CQuest::IsDoingableQuest(pQuest, v7->ID) )
          goto LABEL_25;
        v49 = 15;
        v48 = 0;
        strQuestState._Alval.0 = 0;
        v15 = v7->ID;
        LOBYTE(v51) = 4;
        v16 = CQuest::GetNewQuestStatus(v14, v15);
        v17 = v7->Start.LevelMin;
        nStatus = (PLAYER_QUEST_STATUS)v16;
        if ( (signed int)(User::Lv(&g_kUser) - v17) > 150 && v7->Start.bItem != 1 && v7->Start.bIsWaitListView )
        {
          switch ( nStatus )
          {
            case 0:
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)&strQuestState + 24),
                "None",
                4u);
              break;
            case 3:
            case 4:
            case 5:
            case 9:
            case 20:
              v18 = TextData2::Get(0x3F4857B5u);
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator=(
                (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)&strQuestState + 24),
                (const char *)v18);
              v19 = v7->ID;
              v20 = CQuestData::GetQuestName(pQData, v7->ID);
              EpicQuestWin::QData::QData(&_Val.second, v7->ID, v7->Type, v20, v19, 255, 255, 255);
              LOBYTE(v51) = 5;
              std::pair<int,EpicQuestWin::QData>::pair<int,EpicQuestWin::QData>(&v43, &v7->Start.LevelMin, &_Val.second);
              LOBYTE(v51) = 6;
              std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::insert<std::pair<int,EpicQuestWin::QData>>(
                (std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > *)&mapQuest.comp,
                &v32,
                v21);
              std::pair<int,EpicQuestWin::QData>::~pair<int,EpicQuestWin::QData>(&v43);
              EpicQuestWin::QData::~QData(&_Val.second);
              break;
            default:
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)&strQuestState + 24),
                "...",
                3u);
              break;
          }
          LOBYTE(v51) = 0;
          if ( (unsigned int)v49 >= 0x10 )
            operator delete(*(void **)&strQuestState._Alval.0);
        }
        else
        {
          LOBYTE(v51) = 0;
          if ( (unsigned int)v49 >= 0x10 )
            operator delete(*(void **)&strQuestState._Alval.0);
        }
      }
      v1 = v41;
LABEL_25:
      v3 = pQData;
      v5 = ++i;
    }
    while ( v5 < CQuestData::GetNumOfQuestData(pQData) );
  }
  v22 = mapQuest._Myhead;
  if ( v22 == v22->_Left )
    goto LABEL_62;
  do
  {
    v23 = v22;
    if ( v22->_Isnil )
    {
      v23 = v22->_Right;
    }
    else if ( v22->_Left->_Isnil )
    {
      for ( j = v22->_Parent; !j->_Isnil; j = j->_Parent )
      {
        if ( v23 != j->_Left )
          break;
        v23 = j;
      }
      if ( !v23->_Isnil )
        v23 = j;
    }
    else
    {
      v23 = v22->_Left;
      for ( k = v22->_Left->_Right; !k->_Isnil; k = k->_Right )
        v23 = k;
    }
    if ( EpicQuestWin::AddQuestListElement(v1, &v23->_Myval.second) )
      bIsSelectedQuest = 1;
    if ( v22->_Isnil )
    {
      v22 = v22->_Right;
    }
    else
    {
      v26 = v22->_Left;
      if ( v22->_Left->_Isnil )
      {
        for ( l = v22->_Parent; !l->_Isnil; l = l->_Parent )
        {
          if ( v22 != l->_Left )
            break;
          v22 = l;
        }
        if ( !v22->_Isnil )
          v22 = l;
      }
      else
      {
        v22 = v22->_Left;
        for ( m = v26->_Right; !m->_Isnil; m = m->_Right )
          v22 = m;
      }
    }
  }
  while ( v22 != mapQuest._Myhead->_Left );
  if ( !bIsSelectedQuest )
LABEL_62:
    v1->m_nSelectedID = -1;
  SlideListWin::AlignText(v1->m_pListWinQuestList, 4u);
  SlideListWin::AlignText(v1->m_pListWinQuestList, 1u, 5u);
  v29 = v1->m_pSlideBarList;
  if ( v29 )
  {
    v30 = v1->m_pListWinQuestList;
    if ( v30 )
    {
      SlideBar::SetSplitCnt(v29, v30->m_nSlideSplitCnt);
      v1->m_pListWinQuestList->m_nViewStartPos = v1->m_pSlideBarList->m_nCurPos;
      SlideListWin::UpdateViewList(v1->m_pListWinQuestList);
      EpicQuestWin::UpdateQuestStateIcon(v1);
    }
  }
  v31 = mapQuest._Myhead->_Left;
  v51 = 7;
  std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::erase(
    (std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > *)&mapQuest.comp,
    &v39,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > >)v31,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > >)mapQuest._Myhead);
  operator delete(mapQuest._Myhead);
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0060B330) --------------------------------------------------------
void __thiscall CQuestWin2::UpdateMeWin(CQuestWin2 *this, float fCurTime)
{
  CQuestWin2 *v2; // esi@1
  int v3; // edi@8
  signed int v4; // ebx@8
  SlideListWin *v5; // eax@10
  unsigned int v6; // edi@10
  ColumnBut *v7; // eax@12
  PgWinText *v8; // ecx@13
  SlideListWin *v9; // ecx@16
  int v10; // ebx@16
  SlideListWin *v11; // ecx@18
  unsigned int v12; // edi@18
  ColumnBut *v13; // eax@19
  int nPosX; // ST34_4@21
  int nPosY; // ST30_4@21
  AutoRunBut *v16; // ecx@21
  NiRefObjectVtbl *v17; // edi@21
  int v18; // eax@21
  int nViewStartIndex; // [sp+38h] [bp-Ch]@16
  PgWinText *v20; // [sp+3Ch] [bp-8h]@20
  unsigned int dwNum; // [sp+40h] [bp-4h]@17

  v2 = this;
  if ( QuestDataMgr::m_bUpdate || CQuestWin2::ms_bUpdate )
  {
    CQuestWin2::ms_bUpdate = 0;
    CQuestWin2::UpdateQuestData(this);
  }
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
  {
    GameFrameWork::UpdateUIScroll(v2->m_pListWinContent, v2->m_pSlideBarContent);
    GameFrameWork::UpdateUIScroll(v2->m_pListWinQuestList, v2->m_pSlideBarList);
  }
  if ( (unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD))v2->m_pListWinContent->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY)
    && 0.0 != (double)PgWin::ms_iMsDeltaZ )
  {
    v3 = (int)v2->m_pkAutoRunBut;
    v4 = 10;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 256))(0);
      v3 += 4;
      --v4;
    }
    while ( v4 );
    v5 = v2->m_pListWinContent;
    v6 = 0;
    if ( v5->m_nMaxViewListCnt > 0 )
    {
      do
      {
        if ( v6 < v5->m_vecButList._Mylast - v5->m_vecButList._Myfirst )
        {
          v7 = v5->m_vecButList._Myfirst[v6];
          if ( v7->m_vecTextWin._Mylast - v7->m_vecTextWin._Myfirst )
          {
            v8 = *v7->m_vecTextWin._Myfirst;
            if ( v8 )
              ((void (__stdcall *)(_DWORD))v8->vfptr[43].__vecDelDtor)(0);
          }
        }
        v5 = v2->m_pListWinContent;
        ++v6;
      }
      while ( (signed int)v6 < v5->m_nMaxViewListCnt );
    }
    v9 = v2->m_pListWinContent;
    v10 = 0;
    nViewStartIndex = v9->m_nViewStartPos;
    if ( (signed int)(((char *)v9->m_vecButList._Mylast - (char *)v9->m_vecButList._Myfirst) & 0xFFFFFFFC) > 0 )
    {
      do
      {
        dwNum = -1;
        SlideListWin::GetData(v9, v10 + nViewStartIndex, &dwNum);
        if ( dwNum - 1 <= 9 )
        {
          v11 = v2->m_pListWinContent;
          v12 = dwNum - 1;
          if ( v10 < (unsigned int)(v11->m_vecButList._Mylast - v11->m_vecButList._Myfirst) )
          {
            v13 = v11->m_vecButList._Myfirst[v10];
            if ( v13->m_vecTextWin._Mylast - v13->m_vecTextWin._Myfirst )
            {
              v20 = *v13->m_vecTextWin._Myfirst;
              if ( v20 )
              {
                nPosX = SlideListWin::GetColumPosX(v11, v10, 0);
                nPosY = SlideListWin::GetColumPosY(v2->m_pListWinContent, v10, 0);
                ((void (__stdcall *)(_DWORD))v2->m_pkAutoRunBut[v12].m_pObject->vfptr[60].__vecDelDtor)(v2->m_arryAutoButEnable[v12]);
                ((void (__stdcall *)(_DWORD))v2->m_pkAutoRunBut[v12].m_pObject->vfptr[64].__vecDelDtor)(1);
                ((void (__stdcall *)(_DWORD))v2->m_pkAutoRunBut[v12].m_pObject->vfptr[43].__vecDelDtor)(nPosX);
                ((void (__stdcall *)(_DWORD))v2->m_pkAutoRunBut[v12].m_pObject->vfptr[44].__vecDelDtor)(nPosY);
                v16 = v2->m_pkAutoRunBut[v12].m_pObject;
                v17 = v20->vfptr;
                v18 = ((int (*)(void))v16->vfptr[36].__vecDelDtor)();
                v17[43].__vecDelDtor((NiRefObject *)v20, v18);
              }
            }
          }
        }
        v9 = v2->m_pListWinContent;
        ++v10;
      }
      while ( v10 < v9->m_vecButList._Mylast - v9->m_vecButList._Myfirst );
    }
  }
  CQuestWin2::UpdateBlinkButList(v2, fCurTime);
}
// A771B0: using guessed type bool QuestDataMgr::m_bUpdate;
// A8EA8C: using guessed type bool CQuestWin2::ms_bUpdate;

//----- (0060B5E0) --------------------------------------------------------
char __thiscall CQuestWin2::Create(CQuestWin2 *this, PgFrameWork *pkFrameWork)
{
  CQuestWin2 *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiAVObject *v5; // eax@4
  NiTexturingProperty *v6; // eax@4
  NiTexturingProperty *v7; // edi@4
  NiTexturingProperty::Map *v8; // eax@6
  PgSprData *v9; // eax@9
  NiNode *v10; // esi@12
  char result; // al@16
  int v12; // edi@17
  int v13; // ebx@17
  NiSourceTexture *v14; // eax@17
  PgSprData *v15; // eax@18
  NiTexturingProperty *v16; // esi@21
  NiNode *v17; // esi@23
  PgFont *v18; // eax@27
  PgWinText *v19; // eax@27
  NiRefObjectVtbl *v20; // edx@27
  NiUnsharedGeometryGroup *v21; // eax@27
  PgSprData *v22; // eax@27
  PgWinSpr *v23; // eax@27
  PgSprData *v24; // eax@27
  PgWinSpr *v25; // eax@27
  NiSourceTexture *v26; // eax@27
  NiRefObjectVtbl *v27; // edx@27
  float v28; // ecx@29
  PgSprData *v29; // eax@29
  PgFont *v30; // eax@29
  PgWinText *v31; // eax@29
  char *v32; // eax@29
  char *v33; // eax@29
  char *v34; // eax@29
  ColumnBut *v35; // eax@29
  PgWinText *v36; // edx@29
  int v37; // eax@29
  PgSprData *v38; // edx@29
  PgFont *v39; // eax@29
  PgWinText *v40; // eax@29
  char *v41; // eax@29
  char *v42; // eax@29
  char *v43; // eax@29
  PgWinBut *v44; // eax@29
  NiSourceTexture *v45; // STB8_4@29
  NiNode *v46; // ecx@29
  PgWinText *v47; // eax@29
  PgSprData *v48; // ecx@29
  PgSprData *v49; // STC8_4@29
  int v50; // STC4_4@29
  int v51; // eax@29
  PgWinSpr *v52; // eax@29
  char *v53; // eax@29
  int v54; // eax@29
  NiSourceTexture *v55; // ecx@29
  PgSprData *v56; // edx@29
  PgSprData *v57; // eax@29
  PgFont *v58; // STC8_4@29
  NiSourceTexture *v59; // STC4_4@29
  PgSprData *v60; // STC0_4@29
  int v61; // STBC_4@29
  int v62; // eax@29
  PgWinText *v63; // eax@29
  NiUnsharedGeometryGroup *v64; // eax@29
  int v65; // eax@29
  PgSprData *v66; // edx@29
  PgFont *v67; // eax@29
  PgWinText *v68; // eax@29
  NiRefObjectVtbl *v69; // edx@29
  NiUnsharedGeometryGroup *v70; // eax@29
  int v71; // eax@29
  PgSprData *v72; // edx@29
  PgFont *v73; // eax@29
  PgWinText *v74; // eax@29
  NiRefObjectVtbl *v75; // edx@29
  NiUnsharedGeometryGroup *v76; // eax@29
  int v77; // eax@29
  PgSprData *v78; // edx@29
  PgFont *v79; // eax@29
  PgWinText *v80; // eax@29
  NiRefObjectVtbl *v81; // edx@29
  NiUnsharedGeometryGroup *v82; // eax@29
  int v83; // eax@29
  PgSprData *v84; // edx@29
  PgFont *v85; // eax@29
  PgWinText *v86; // eax@29
  NiRefObjectVtbl *v87; // edx@29
  NiUnsharedGeometryGroup *v88; // eax@29
  SLWCreateInfo::Item *v89; // eax@29
  PgWinText *v90; // eax@37
  PgSprData *v91; // eax@43
  SlideListWin *v92; // eax@43
  SLWCreateInfo::Item *v93; // eax@43
  PgSprData *v94; // eax@47
  SlideListWin *v95; // eax@47
  PgWinText *v96; // eax@47
  SlideBar *v97; // eax@47
  NiObjectNET *v98; // eax@47
  NiObjectNET *v99; // eax@47
  NiObjectNET *v100; // eax@47
  NiObjectNET *v101; // eax@47
  NiObjectNET *v102; // eax@47
  NiObjectNET *v103; // eax@47
  SlideBar *v104; // eax@47
  PgSprData *v105; // eax@48
  PgSprData *v106; // ecx@48
  PgWin **v107; // ecx@56
  PgSprData *v108; // eax@57
  PgWinSpr *v109; // eax@58
  NiRefObjectVtbl *v110; // eax@58
  PgWinSpr *v111; // eax@58
  PgWinSpr *v112; // eax@58
  PgWinSpr *v113; // eax@58
  NiTListItem<NiPointer<NiProperty> > *v114; // eax@58
  PgWinSpr *v115; // eax@58
  PgWinBut *v116; // eax@59
  char *v117; // eax@59
  char *v118; // eax@59
  PgWinBut *v119; // eax@59
  char *v120; // eax@59
  int v121; // eax@59
  PgSprData *v122; // edx@59
  PgFont *v123; // eax@59
  PgWinText *v124; // eax@59
  NiRefObjectVtbl *v125; // edi@59
  NiUnsharedGeometryGroup *v126; // eax@59
  NiTexturingProperty *v127; // esi@61
  NiNode *v128; // esi@63
  PgSprData *pkSprQstInstance; // [sp+E8h] [bp-88h]@57
  unsigned int uiWidth; // [sp+ECh] [bp-84h]@20
  PgSprData *pkSprQstEvent; // [sp+F0h] [bp-80h]@57
  unsigned int uiHeight; // [sp+F4h] [bp-7Ch]@20
  NiPointer<NiTexturingProperty> spTexProp; // [sp+F8h] [bp-78h]@4
  SLWCreateInfo kCreateInfo; // [sp+FCh] [bp-74h]@29
  PgSprData *pkSprQstNor; // [sp+118h] [bp-58h]@48
  PgSprData *pkSprQstDaily; // [sp+11Ch] [bp-54h]@57
  PgSprData *pkNewMark; // [sp+120h] [bp-50h]@57
  PgSprData *pkSprQstJob; // [sp+124h] [bp-4Ch]@29
  PgSprData *pkSprQstEpic; // [sp+128h] [bp-48h]@29
  NiSourceTexture *pkTexture; // [sp+12Ch] [bp-44h]@7
  NiSourceTexture *pkTexture8; // [sp+130h] [bp-40h]@1
  int uiTop; // [sp+134h] [bp-3Ch]@9
  int uiLeft; // [sp+138h] [bp-38h]@9
  NiPointer<NiNode> spNode; // [sp+13Ch] [bp-34h]@1
  PgWinText *pkTextWin; // [sp+140h] [bp-30h]@27
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+144h] [bp-2Ch]@29
  int v147; // [sp+16Ch] [bp-4h]@1

  v2 = this;
  pkTexture8 = (NiSourceTexture *)pkFrameWork;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v147 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\QuestWin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Panel01");
  v6 = (NiTexturingProperty *)NiAVObject::GetProperty(v5, 8);
  v7 = v6;
  spTexProp.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v8 = *v7->m_kMaps.m_pBase;
  LOBYTE(v147) = 1;
  if ( v8 )
    pkTexture = (NiSourceTexture *)v8->m_spTexture.m_pObject;
  else
    pkTexture = 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, pkTexture);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, (PgFrameWork *)pkTexture8, "QuestWin", 0) )
  {
    LOBYTE(v147) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v10 = spNode.m_pObject;
    v147 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
    return 0;
  }
  v12 = uiLeft;
  v13 = uiTop;
  v14 = MenuTexMgr::GetTexture(0x13u);
  if ( v14 )
    v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v14);
  else
    v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v15, (PgWin *)&v2->vfptr, 0, 0);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v18 = Font::Get(MAIN_MENU);
    v19 = PgWinText::CreateWin(uiLeft - v12, uiTop - v13, uiWidth, uiHeight, v18, (PgWin *)&v2->vfptr, 0, 0);
    v20 = v19->vfptr;
    pkTextWin = v19;
    v20[122].__vecDelDtor((NiRefObject *)v19, 1u);
    ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
    pkTexture8 = (NiSourceTexture *)&pkTextWin->vfptr[118];
    v21 = TextData::Get(0xA604FBF0);
    ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkTexture8->vfptr)(pkTextWin, v21);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
    v23 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v22, (PgWin *)&v2->vfptr, 0, 0);
    v23->vfptr[60].__vecDelDtor((NiRefObject *)v23, 1u);
    v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, pkTexture);
    v25 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v24, (PgWin *)&v2->vfptr, 0, 0);
    v25->vfptr[60].__vecDelDtor((NiRefObject *)v25, 0);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "ClsNor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
    PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 1u, 0, 0);
    v26 = MenuTexMgr::GetTexture(4u);
    v27 = spNode.m_pObject->vfptr;
    pkTexture8 = v26;
    if ( ((int (__stdcall *)(const char *))v27[18].__vecDelDtor)("HelpLinkNor") )
    {
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "HelpLinkNor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture8);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
      PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x14u, 0, 0);
    }
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "Tab01_Off",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Tab01_On");
    v2->m_pkTab01 = ColumnBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 2u, 0);
    v28 = pkTextWin->m_kWorldBound.m_kCenter.x;
    v29 = *(PgSprData **)(*(_DWORD *)LODWORD(v28) + 20);
    pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v28) + 24);
    pkSprQstEpic = v29;
    v30 = Font::Get(MAIN_MENU);
    v31 = PgWinText::CreateWin(
            uiLeft - v12,
            uiTop - v13 + 1,
            (unsigned int)pkSprQstEpic,
            (unsigned int)pkTexture8,
            v30,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v2->m_pkTabText1 = v31;
    v31->vfptr[122].__vecDelDtor((NiRefObject *)v31, 5u);
    pkTexture8 = (NiSourceTexture *)&v2->m_pkTabText1->vfptr[118];
    v32 = (char *)TextData2::Get(0x474930A2u);
    v33 = fs(v32, 0);
    ((void (__thiscall *)(PgWinText *, char *))pkTexture8->vfptr)(v2->m_pkTabText1, v33);
    ((void (__stdcall *)(_DWORD))v2->m_pkTabText1->vfptr[60].__vecDelDtor)(0);
    v2->m_pkTab01->m_pkToolTipWin = g_pkToolTipWin;
    v34 = (char *)TextData3::Get(0xB66C8B88);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkTab01->vfptr, v34);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "Tab02_Off",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Tab02_On");
    v35 = ColumnBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 3u, 0);
    v36 = pkTextWin;
    v2->m_pkTab02 = v35;
    v37 = *(_DWORD *)LODWORD(v36->m_kWorldBound.m_kCenter.x);
    v38 = *(PgSprData **)(v37 + 20);
    pkTexture8 = *(NiSourceTexture **)(v37 + 24);
    pkSprQstEpic = v38;
    v39 = Font::Get(MAIN_MENU);
    v40 = PgWinText::CreateWin(
            uiLeft - v12,
            uiTop - v13 + 1,
            (unsigned int)pkSprQstEpic,
            (unsigned int)pkTexture8,
            v39,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v2->m_pkTabText2 = v40;
    v40->vfptr[122].__vecDelDtor((NiRefObject *)v40, 5u);
    pkTexture8 = (NiSourceTexture *)&v2->m_pkTabText2->vfptr[118];
    v41 = (char *)TextData2::Get(0x3F4856B5u);
    v42 = fs(v41, 0);
    ((void (__thiscall *)(PgWinText *, char *))pkTexture8->vfptr)(v2->m_pkTabText2, v42);
    ((void (__stdcall *)(_DWORD))v2->m_pkTabText2->vfptr[60].__vecDelDtor)(0);
    v2->m_pkTab02->m_pkToolTipWin = g_pkToolTipWin;
    v43 = (char *)TextData2::Get(0xB88982FB);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkTab02->vfptr, v43);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "GiveupNor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GiveupClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GiveupOver");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GiveupDisable");
    v44 = PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 5u, 0, 0);
    v45 = pkTexture;
    v46 = spNode.m_pObject;
    v2->m_pkAcceptBtn = v44;
    v47 = (PgWinText *)PgSprData::Create((NiAVObject *)&v46->vfptr, "GiveupDisable", &uiLeft, &uiTop, v45);
    v48 = (PgSprData *)v2->m_pkAcceptBtn;
    pkTextWin = v47;
    pkSprQstJob = v48;
    v49 = (PgSprData *)v47;
    v50 = ((int (*)(void))v48->vfptr[42].__vecDelDtor)();
    v51 = ((int (*)(void))pkSprQstJob->vfptr[41].__vecDelDtor)();
    v52 = PgWinSpr::CreateWin(v51, v50, v49, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkAcceptBtnSpr = v52;
    v52->vfptr[60].__vecDelDtor((NiRefObject *)v52, 0);
    ((void (__stdcall *)(_DWORD))v2->m_pkAcceptBtnSpr->vfptr[64].__vecDelDtor)(0);
    v2->m_pkAcceptBtnSpr->m_pkToolTipWin = g_pkToolTipWin;
    v53 = (char *)TextData2::Get(0x2889769Au);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkAcceptBtnSpr->vfptr, v53);
    v54 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
    v55 = *(NiSourceTexture **)(v54 + 24);
    v56 = *(PgSprData **)(v54 + 20);
    v57 = (PgSprData *)v2->m_pkAcceptBtn;
    pkTexture8 = v55;
    pkSprQstEpic = v56;
    pkSprQstJob = v57;
    v58 = Font::Get(MAIN_MENU);
    v59 = pkTexture8;
    v60 = pkSprQstEpic;
    v61 = ((int (*)(void))pkSprQstJob->vfptr[42].__vecDelDtor)();
    v62 = ((int (*)(void))pkSprQstJob->vfptr[41].__vecDelDtor)();
    v63 = PgWinText::CreateWin(v62, v61, (unsigned int)v60, (unsigned int)v59, v58, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkButText1 = v63;
    v63->vfptr[122].__vecDelDtor((NiRefObject *)v63, 5u);
    pkTexture8 = (NiSourceTexture *)&v2->m_pkButText1->vfptr[118];
    v64 = TextData::Get(0xEF05ED51);
    ((void (__thiscall *)(_DWORD, NiUnsharedGeometryGroup *))pkTexture8->vfptr)(v2->m_pkButText1, v64);
    ((void (__stdcall *)(_DWORD))v2->m_pkButText1->vfptr[60].__vecDelDtor)(0);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "Title01Nor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title01Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title01Over");
    PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xDu, 0, 0);
    v65 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
    v66 = *(PgSprData **)(v65 + 20);
    pkTexture8 = *(NiSourceTexture **)(v65 + 24);
    pkSprQstEpic = v66;
    v67 = Font::Get(MAIN_MENU);
    v68 = PgWinText::CreateWin(
            uiLeft - v12,
            uiTop - v13 + 1,
            (unsigned int)pkSprQstEpic,
            (unsigned int)pkTexture8,
            v67,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v69 = v68->vfptr;
    pkTextWin = v68;
    v69[122].__vecDelDtor((NiRefObject *)v68, 5u);
    pkTexture8 = (NiSourceTexture *)&pkTextWin->vfptr[118];
    v70 = TextData::Get(0x8BF7ED01);
    ((void (__thiscall *)(_DWORD, _DWORD))pkTexture8->vfptr)(pkTextWin, v70);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "Title02Nor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title02Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title02Over");
    PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xBu, 0, 0);
    v71 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
    v72 = *(PgSprData **)(v71 + 20);
    pkTexture8 = *(NiSourceTexture **)(v71 + 24);
    pkSprQstEpic = v72;
    v73 = Font::Get(MAIN_MENU);
    v74 = PgWinText::CreateWin(
            uiLeft - v12,
            uiTop - v13 + 1,
            (unsigned int)pkSprQstEpic,
            (unsigned int)pkTexture8,
            v73,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v75 = v74->vfptr;
    pkTextWin = v74;
    v75[122].__vecDelDtor((NiRefObject *)v74, 5u);
    pkTexture8 = (NiSourceTexture *)&pkTextWin->vfptr[118];
    v76 = TextData::Get(0x94F8F4F9);
    ((void (__thiscall *)(_DWORD, _DWORD))pkTexture8->vfptr)(pkTextWin, v76);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "Title03Nor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title03Click");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title03Over");
    PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xCu, 0, 0);
    v77 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
    v78 = *(PgSprData **)(v77 + 20);
    pkTexture8 = *(NiSourceTexture **)(v77 + 24);
    pkSprQstEpic = v78;
    v79 = Font::Get(MAIN_MENU);
    v80 = PgWinText::CreateWin(
            uiLeft - v12,
            uiTop - v13 + 1,
            (unsigned int)pkSprQstEpic,
            (unsigned int)pkTexture8,
            v79,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v81 = v80->vfptr;
    pkTextWin = v80;
    v81[122].__vecDelDtor((NiRefObject *)v80, 5u);
    pkTexture8 = (NiSourceTexture *)&pkTextWin->vfptr[118];
    v82 = TextData::Get(0xF807FCEC);
    ((void (__thiscall *)(_DWORD, _DWORD))pkTexture8->vfptr)(pkTextWin, v82);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "Title04Nor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0, 0, 0);
    v83 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
    v84 = *(PgSprData **)(v83 + 20);
    pkTexture8 = *(NiSourceTexture **)(v83 + 24);
    pkSprQstEpic = v84;
    v85 = Font::Get(MAIN_MENU);
    v86 = PgWinText::CreateWin(
            uiLeft - v12,
            uiTop - v13 + 1,
            (unsigned int)pkSprQstEpic,
            (unsigned int)pkTexture8,
            v85,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v87 = v86->vfptr;
    pkTextWin = v86;
    v87[122].__vecDelDtor((NiRefObject *)v86, 5u);
    pkTexture8 = (NiSourceTexture *)&pkTextWin->vfptr[118];
    v88 = TextData::Get(0xA6A69872);
    ((void (__thiscall *)(_DWORD, _DWORD))pkTexture8->vfptr)(pkTextWin, v88);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    kCreateInfo.m_arrItem._Myfirst = 0;
    kCreateInfo.m_arrItem._Mylast = 0;
    kCreateInfo.m_arrItem._Myend = 0;
    kCreateInfo.m_bMakeData = 0;
    kCreateInfo.m_nOffX = 0;
    kCreateInfo.m_nOffY = 0;
    LOBYTE(v147) = 2;
    v89 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
    v89->nItemType = 1;
    v89->pNode = spNode.m_pObject;
    pkTextWin = (PgWinText *)v89;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarNor", 0xCu);
    LOBYTE(v147) = 3;
    pkSprQstJob = (PgSprData *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2];
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
      &_Val);
    LOBYTE(v147) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarClick", 0xEu);
    LOBYTE(v147) = 4;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkSprQstJob,
      &_Val);
    LOBYTE(v147) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarOver", 0xDu);
    LOBYTE(v147) = 5;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkSprQstJob,
      &_Val);
    LOBYTE(v147) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    pkTextWin->vfptr = (NiRefObjectVtbl *)2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column03", 8u);
    LOBYTE(v147) = 6;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
      &_Val);
    LOBYTE(v147) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    v90 = pkTextWin;
    pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
    LOBYTE(v90->m_kLocal.m_Translate.x) = 1;
    pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    pkTextWin->vfptr = (NiRefObjectVtbl *)2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column04", 8u);
    LOBYTE(v147) = 7;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
      &_Val);
    LOBYTE(v147) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
    pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    pkTextWin->vfptr = (NiRefObjectVtbl *)2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column02", 8u);
    LOBYTE(v147) = 8;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
      &_Val);
    LOBYTE(v147) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
    pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    pkTextWin->vfptr = (NiRefObjectVtbl *)2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column01", 8u);
    LOBYTE(v147) = 9;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
      &_Val);
    LOBYTE(v147) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
    SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
    v91 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SubText01", &uiLeft, &uiTop, pkTexture);
    v92 = SlideListWin::CreateWin(uiLeft, uiTop, v91, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
    v2->m_pListWinQuestList = v92;
    v92->m_uiRClickMsg = 7;
    v2->m_pListWinQuestList->m_uiLClickMsg = 8;
    v2->m_pListWinQuestList->m_bCheckEnable = 0;
    SlideListWin::AlignText(v2->m_pListWinQuestList, 4u);
    SlideListWin::UpdateViewList(v2->m_pListWinQuestList);
    SLWCreateInfo::Clear(&kCreateInfo);
    v93 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
    v93->nItemType = 1;
    v93->pNode = spNode.m_pObject;
    pkTextWin = (PgWinText *)v93;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBar01Nor", 0xEu);
    LOBYTE(v147) = 10;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
      &_Val);
    LOBYTE(v147) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    pkTextWin->vfptr = (NiRefObjectVtbl *)2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column05", 8u);
    LOBYTE(v147) = 11;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
      &_Val);
    LOBYTE(v147) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
    v94 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SubText02", &uiLeft, &uiTop, pkTexture);
    v95 = SlideListWin::CreateWin(uiLeft - v12, uiTop - v13, v94, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
    v2->m_pListWinContent = v95;
    v95->m_bCheckEnable = 0;
    SlideListWin::AddText(v2->m_pListWinContent, ".");
    SlideListWin::AddText(v2->m_pListWinContent, "..");
    SlideListWin::AddText(v2->m_pListWinContent, "...");
    SlideListWin::AlignText(v2->m_pListWinContent, 4u);
    SlideListWin::UpdateViewList(v2->m_pListWinContent);
    v96 = (PgWinText *)PgSprData::Create(
                         (NiAVObject *)&spNode.m_pObject->vfptr,
                         "SlideBar_SlideBtnMiddle",
                         &uiLeft,
                         &uiTop,
                         pkTexture);
    pkTextWin = v96;
    v97 = SlideBar::CreateWin(
            spNode.m_pObject,
            "SlideBar",
            "SlideBar_UpBtn",
            "SlideBar_DnBtn",
            (PgSprData *)v96,
            0,
            (PgWin *)&v2->vfptr);
    v2->m_pSlideBarList = v97;
    v97->m_uiClickMsg = 9;
    v2->m_pSlideBarList->m_eType = 1;
    v98 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnNor01");
    NiObjectNET::SetName(v98, "SlideBar_DnBtn01Nor");
    v99 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnClick01");
    NiObjectNET::SetName(v99, "SlideBar_DnBtn01Click");
    v100 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnOver01");
    NiObjectNET::SetName(v100, "SlideBar_DnBtn01Over");
    v101 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnNor01");
    NiObjectNET::SetName(v101, "SlideBar_UpBtn01Nor");
    v102 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnClick01");
    NiObjectNET::SetName(v102, "SlideBar_UpBtn01Click");
    v103 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnOver01");
    NiObjectNET::SetName(v103, "SlideBar_UpBtn01Over");
    v104 = SlideBar::CreateWin(
             spNode.m_pObject,
             "SlideBar01",
             "SlideBar_UpBtn01",
             "SlideBar_DnBtn01",
             (PgSprData *)pkTextWin,
             0,
             (PgWin *)&v2->vfptr);
    v2->m_pSlideBarContent = v104;
    v104->m_uiClickMsg = 10;
    v2->m_pSlideBarContent->m_eType = 1;
    SlideBar::SetSplitCnt(v2->m_pSlideBarList, v2->m_pListWinQuestList->m_nSlideSplitCnt);
    SlideBar::SetSplitCnt(v2->m_pSlideBarContent, v2->m_pListWinContent->m_nSlideSplitCnt);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "AutoRunNor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "AutoRunClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "AutoRunOver");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "AutoRunDisable");
    pkSprQstJob = (PgSprData *)v2->m_pkAutoRunBut;
    pkTexture8 = (NiSourceTexture *)10;
    do
    {
      v105 = (PgSprData *)AutoRunBut::CreateWin(0, 0, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x13u, 0, 0);
      v106 = (PgSprData *)pkSprQstJob->vfptr;
      pkSprQstEpic = v105;
      pkSprQstNor = v106;
      if ( v106 != v105 )
      {
        if ( v106 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v106->m_uiRefCount) && pkSprQstNor )
            ((void (__stdcall *)(signed int))pkSprQstNor->vfptr->__vecDelDtor)(1);
          v105 = pkSprQstEpic;
        }
        pkSprQstJob->vfptr = (NiRefObjectVtbl *)v105;
        if ( v105 )
          InterlockedIncrement((volatile LONG *)&v105->m_uiRefCount);
      }
      v107 = (PgWin **)pkSprQstJob;
      pkSprQstJob->vfptr[68].__vecDelDtor = (void *(__thiscall *)(NiRefObject *, unsigned int))g_pkToolTipWin;
      PgWin::SetToolTipWinText(*v107, &byte_9B5566);
      pkSprQstJob = (PgSprData *)((char *)pkSprQstJob + 4);
      pkTexture8 = (NiSourceTexture *)((char *)pkTexture8 - 1);
    }
    while ( pkTexture8 );
    pkSprQstNor = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconQstNor", &uiLeft, &uiTop, pkTexture);
    pkSprQstEpic = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconQstEpic", &uiLeft, &uiTop, pkTexture);
    pkSprQstJob = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconQstJob", &uiLeft, &uiTop, pkTexture);
    pkSprQstEvent = PgSprData::Create(
                      (NiAVObject *)&spNode.m_pObject->vfptr,
                      "IconQstEvent",
                      &uiLeft,
                      &uiTop,
                      pkTexture);
    pkSprQstDaily = PgSprData::Create(
                      (NiAVObject *)&spNode.m_pObject->vfptr,
                      "IconQstDaily",
                      &uiLeft,
                      &uiTop,
                      pkTexture);
    pkNewMark = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NewQuest_Text", &uiLeft, &uiTop, pkTexture);
    v108 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "NewQuest_ready", &uiLeft, &uiTop, pkTexture);
    v2->m_pkNewQuestReady = PgWinSpr::CreateWin(uiLeft - v12, uiTop - v13, v108, (PgWin *)&v2->vfptr, 0, 0);
    pkSprQstInstance = PgSprData::Create(
                         (NiAVObject *)&spNode.m_pObject->vfptr,
                         "IconQstInDun",
                         &uiLeft,
                         &uiTop,
                         pkTexture);
    pkTextWin = (PgWinText *)v2->m_pkSprQstEpic;
    pkTexture8 = (NiSourceTexture *)10;
    do
    {
      v109 = PgWinSpr::CreateWin(0, 0, pkSprQstNor, (PgWin *)&v2->vfptr, 0, 0);
      *(_DWORD *)&pkTextWin[-1].m_bEnable = v109;
      v109->vfptr[60].__vecDelDtor((NiRefObject *)v109, 0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)&pkTextWin[-1].m_bEnable + 256))(0);
      v110 = (NiRefObjectVtbl *)PgWinSpr::CreateWin(0, 0, pkSprQstEpic, (PgWin *)&v2->vfptr, 0, 0);
      pkTextWin->vfptr = v110;
      (*((void (__thiscall **)(_DWORD, _DWORD))v110->__vecDelDtor + 60))(v110, 0);
      (*((void (__stdcall **)(_DWORD))pkTextWin->vfptr->__vecDelDtor + 64))(0);
      v111 = PgWinSpr::CreateWin(0, 0, pkSprQstJob, (PgWin *)&v2->vfptr, 0, 0);
      LODWORD(pkTextWin->m_kWorldBound.m_kCenter.y) = v111;
      v111->vfptr[60].__vecDelDtor((NiRefObject *)v111, 0);
      (*(void (__stdcall **)(_DWORD))(*(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.y) + 256))(0);
      v112 = PgWinSpr::CreateWin(0, 0, pkSprQstEvent, (PgWin *)&v2->vfptr, 0, 0);
      LODWORD(pkTextWin->m_kLocal.m_Rotate.m_pEntry[2][1]) = v112;
      v112->vfptr[60].__vecDelDtor((NiRefObject *)v112, 0);
      (*(void (__stdcall **)(_DWORD))(*(_DWORD *)LODWORD(pkTextWin->m_kLocal.m_Rotate.m_pEntry[2][1]) + 256))(0);
      v113 = PgWinSpr::CreateWin(0, 0, pkSprQstInstance, (PgWin *)&v2->vfptr, 0, 0);
      LODWORD(pkTextWin->m_kWorld.m_Rotate.m_pEntry[1][1]) = v113;
      v113->vfptr[60].__vecDelDtor((NiRefObject *)v113, 0);
      (*(void (__stdcall **)(_DWORD))(*(_DWORD *)LODWORD(pkTextWin->m_kWorld.m_Rotate.m_pEntry[1][1]) + 256))(0);
      v114 = (NiTListItem<NiPointer<NiProperty> > *)PgWinSpr::CreateWin(0, 0, pkSprQstDaily, (PgWin *)&v2->vfptr, 0, 0);
      pkTextWin->m_kPropertyList.m_pkHead = v114;
      ((void (__thiscall *)(NiTListItem<NiPointer<NiProperty> > *, _DWORD))v114->m_pkNext[20].m_pkNext)(v114, 0);
      ((void (__stdcall *)(_DWORD))pkTextWin->m_kPropertyList.m_pkHead->m_pkNext[21].m_pkPrev)(0);
      v115 = PgWinSpr::CreateWin(0, 0, pkNewMark, (PgWin *)&v2->vfptr, 0, 0);
      *(_DWORD *)&pkTextWin->m_bResigterFirstHit = v115;
      v115->vfptr[60].__vecDelDtor((NiRefObject *)v115, 0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)&pkTextWin->m_bResigterFirstHit + 256))(0);
      pkTextWin = (PgWinText *)((char *)pkTextWin + 4);
      pkTexture8 = (NiSourceTexture *)((char *)pkTexture8 - 1);
    }
    while ( pkTexture8 );
    v2->m_pkTab01->m_bCheck = 1;
    v2->m_pkTab02->m_bCheck = 0;
    v2->m_kMarkCheck.m_fMarkTime = 1.0;
    v2->m_nCurSelTab = 1;
    CNSTimer_MarkCheck::ReSet(&v2->m_kMarkCheck, Timer::ms_fCurTime, OVER);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "EpicQuestNor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "EpicQuestClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "EpicQuestOver");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "EpicQuestDisable");
    v116 = PgWinBut::CreateWin(uiLeft - v12, uiTop - v13, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 6u, 0, 0);
    v2->m_pkButEpicList = v116;
    v116->m_pkToolTipWin = g_pkToolTipWin;
    v117 = (char *)TextData2::Get(0xB88982FB);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkButEpicList->vfptr, v117);
    ((void (__stdcall *)(_DWORD))v2->m_pkButEpicList->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkButEpicList->vfptr[60].__vecDelDtor)(0);
    v118 = (char *)TextData2::Get(0x89EAE1E9);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkButEpicList->vfptr, v118);
    v2->m_pkEpicQuestWin = EpicQuestWin::CreateWin(0);
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
    v119 = PgWinBut::CreateWin(uiLeft - v12, uiTop - v13 + 1, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x12u, 0, 0);
    v2->m_pkLocationInfoWinBut = v119;
    v119->m_pkToolTipWin = g_pkToolTipWin;
    v120 = (char *)TextData2::Get(0xB1D7C3EC);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkLocationInfoWinBut->vfptr, v120);
    v121 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
    v122 = *(PgSprData **)(v121 + 20);
    pkNewMark = *(PgSprData **)(v121 + 24);
    pkSprQstDaily = v122;
    v123 = Font::Get(MAIN_MENU);
    v124 = PgWinText::CreateWin(
             uiLeft - v12,
             uiTop - v13 + 1,
             (unsigned int)pkSprQstDaily,
             (unsigned int)pkNewMark,
             v123,
             (PgWin *)&v2->vfptr,
             0,
             0);
    v2->m_pkLocationInfoWinText = v124;
    v124->vfptr[122].__vecDelDtor((NiRefObject *)v124, 5u);
    v125 = v2->m_pkLocationInfoWinText->vfptr;
    v126 = TextData2::Get(0xBAD4C4E8);
    v125[118].__vecDelDtor((NiRefObject *)v2->m_pkLocationInfoWinText, (unsigned int)v126);
    ((void (__stdcall *)(_DWORD))v2->m_pkLocationInfoWinText->vfptr[60].__vecDelDtor)(0);
    v2->m_pkLocationInfoWinText->vfptr[64].__vecDelDtor((NiRefObject *)v2->m_pkLocationInfoWinText, 0);
    LOBYTE(v147) = 1;
    if ( kCreateInfo.m_arrItem._Myfirst )
    {
      std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(
        kCreateInfo.m_arrItem._Myfirst,
        kCreateInfo.m_arrItem._Mylast);
      operator delete(kCreateInfo.m_arrItem._Myfirst);
    }
    v127 = spTexProp.m_pObject;
    kCreateInfo.m_arrItem._Myfirst = 0;
    kCreateInfo.m_arrItem._Mylast = 0;
    kCreateInfo.m_arrItem._Myend = 0;
    LOBYTE(v147) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
      v127->vfptr->__vecDelDtor((NiRefObject *)v127, 1u);
    v128 = spNode.m_pObject;
    v147 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v128 )
      v128->vfptr->__vecDelDtor((NiRefObject *)v128, 1u);
    result = 1;
  }
  else
  {
    v16 = spTexProp.m_pObject;
    LOBYTE(v147) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
      v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
    v17 = spNode.m_pObject;
    v147 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v17 )
      return 0;
    v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0060CDF0) --------------------------------------------------------
void __thiscall CQuestWin2::OnTAB1(CQuestWin2 *this)
{
  CQuestWin2 *v1; // esi@1
  PgWinBut *v2; // ecx@1
  NiRefObjectVtbl *v3; // edi@1
  NiUnsharedGeometryGroup *v4; // eax@1

  v1 = this;
  this->m_pkTab01->m_bCheck = 1;
  this->m_pkTab02->m_bCheck = 0;
  v2 = this->m_pkAcceptBtn;
  v1->m_nCurSelTab = 1;
  v1->m_nSelectedID = -1;
  ((void (__stdcall *)(_DWORD))v2->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkAcceptBtnSpr->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkButText1->vfptr[64].__vecDelDtor)(1);
  v3 = v1->m_pkButText1->vfptr;
  v4 = TextData::Get(0xEF05ED51);
  v3[118].__vecDelDtor((NiRefObject *)v1->m_pkButText1, (unsigned int)v4);
  CQuestWin2::UpdateQuestData(v1);
}

//----- (0060CE90) --------------------------------------------------------
void __thiscall CQuestWin2::OnSortByLevel(CQuestWin2 *this, bool bDown)
{
  if ( bDown )
    this->bReverseSort = 1;
  else
    this->bReverseSort = this->bReverseSort == 0;
  this->m_nSortColumn = -1;
  this->m_nStateFilterType = 4;
  CQuestWin2::UpdateQuestData(this);
}

//----- (0060CED0) --------------------------------------------------------
void __thiscall CQuestWin2::OnSortByName(CQuestWin2 *this)
{
  CQuestWin2 *v1; // esi@1
  SlideListWin *v2; // ecx@4
  bool v3; // ST04_1@4

  v1 = this;
  if ( this->m_nSortColumn )
    this->bReverseSort = 0;
  else
    this->bReverseSort = this->bReverseSort == 0;
  v2 = this->m_pListWinQuestList;
  v3 = v1->bReverseSort;
  v1->m_nSortColumn = 0;
  SlideListWin::Sort(v2, 0, v3, 0);
  SlideListWin::UpdateViewList(v1->m_pListWinQuestList);
  CQuestWin2::UpdateQuestData(v1);
}

//----- (0060CF30) --------------------------------------------------------
void __thiscall CQuestWin2::OnSortByState(CQuestWin2 *this)
{
  bool v1; // sf@1
  unsigned __int8 v2; // of@1

  v2 = __OFSUB__(++this->m_nStateFilterType, 3);
  v1 = this->m_nStateFilterType - 3 < 0;
  this->m_nSortColumn = -1;
  if ( !(v1 ^ v2) )
    this->m_nStateFilterType = 0;
  CQuestWin2::UpdateQuestData(this);
}

//----- (0060CF60) --------------------------------------------------------
void __thiscall CQuestWin2::OnShowWin(CQuestWin2 *this)
{
  CQuestWin2 *v1; // esi@1
  bool v2; // zf@1
  EpicQuestWin *v3; // ecx@1
  int v4; // eax@2

  v1 = this;
  v2 = this->m_nCurSelTab == 2;
  v3 = this->m_pkEpicQuestWin;
  if ( v2 )
    v4 = EpicQuestWin::TotalMaxLowLevelQuest();
  else
    v4 = EpicQuestWin::TotalMaxEpicQuest(v3);
  v1->m_iNumOfCompleteEpicQuest = v4;
  v1->bReverseSort = 1;
  v1->m_nSortColumn = -1;
  v1->m_nStateFilterType = 4;
  CQuestWin2::UpdateQuestData(v1);
  CQuestWin2::UpdateQuestData(v1);
  if ( !QuestHelperMgr::ms_pQuestMCList.m_kAllocator.m_uiCount )
  {
    ((void (__stdcall *)(_DWORD))v1->m_pkLocationInfoWinBut->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v1->m_pkLocationInfoWinText->vfptr[64].__vecDelDtor)(0);
  }
}

//----- (0060CFE0) --------------------------------------------------------
void __thiscall CQuestWin2::LevelChange(CQuestWin2 *this, char nPlayerLevel)
{
  CQuestWin2 *v2; // ebx@1
  CClientQuest *v3; // eax@1
  CQuestData *v4; // esi@1
  QUEST_DATA *v5; // esi@4
  unsigned __int16 *v6; // edi@4
  QUEST_DATA *v7; // eax@6
  int v8; // edx@9
  int v9; // ecx@9
  std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *v10; // esi@9
  int v11; // ecx@15
  int *v12; // ecx@17
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > v13; // ecx@19
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v14; // eax@22
  signed int v15; // esi@25
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > >,bool> result; // [sp+8h] [bp-2Ch]@22
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > v17; // [sp+10h] [bp-24h]@24
  int Qlv; // [sp+14h] [bp-20h]@6
  int Userlv; // [sp+18h] [bp-1Ch]@6
  int v20; // [sp+1Ch] [bp-18h]@18
  int v21; // [sp+20h] [bp-14h]@15
  CQuestData *pQData; // [sp+24h] [bp-10h]@1
  int i; // [sp+28h] [bp-Ch]@1
  CQuestWin2 *v24; // [sp+2Ch] [bp-8h]@1
  CQuest *pQuest; // [sp+30h] [bp-4h]@1

  v2 = this;
  v24 = this;
  this->m_bLevelUp = 0;
  v3 = QuestDataMgr::GetQuest();
  v4 = v3->m_pQuestData;
  pQuest = (CQuest *)v3;
  pQData = v4;
  i = 0;
  if ( CQuestData::GetNumOfQuestData(v4) > 0u )
  {
    while ( 1 )
    {
      v5 = CQuestData::GetQuestDataByIndex(v4, i);
      v6 = &v5->ID;
      if ( CQuest::IsDoingQuest(pQuest, v5->ID) || CQuest::IsDoingableQuest(pQuest, *v6) )
      {
        v7 = CQuest::GetNewQuestStatus(pQuest, *v6);
        Qlv = v5->Start.LevelMin;
        Userlv = (unsigned __int8)nPlayerLevel;
        if ( v7 != (QUEST_DATA *)5 || v5->Start.bItem != 1 && v5->Start.bIsWaitListView )
        {
          v8 = (int)v2->m_setAbleQuest._Myhead;
          v9 = *(_DWORD *)(v8 + 4);
          v10 = (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v2->m_setAbleQuest.comp;
          if ( !*(_BYTE *)(v9 + 15) )
          {
            do
            {
              if ( *(_WORD *)(v9 + 12) >= *v6 )
              {
                v8 = v9;
                v9 = *(_DWORD *)v9;
              }
              else
              {
                v9 = *(_DWORD *)(v9 + 8);
              }
            }
            while ( !*(_BYTE *)(v9 + 15) );
            v2 = v24;
          }
          v11 = (int)v10->_Myhead;
          v21 = v8;
          if ( v8 == v11 || (v2 = v24, *v6 < *(_WORD *)(v8 + 12)) )
          {
            v20 = v11;
            v12 = &v20;
          }
          else
          {
            v12 = &v21;
          }
          v13._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *)*v12;
          if ( v7 != (QUEST_DATA *)5 || Userlv - Qlv > 150 )
          {
            if ( v13._Ptr != v2->m_setAbleQuest._Myhead )
              std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::erase(
                v10,
                &v17,
                v13);
          }
          else if ( v13._Ptr == v2->m_setAbleQuest._Myhead )
          {
            v14 = std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Buynode<unsigned short>(
                    (std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v10->comp,
                    v6);
            std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Linsert(
              v10,
              &result,
              v14,
              0);
            v2->m_bLevelUp = 1;
          }
        }
      }
      v15 = ++i;
      if ( v15 >= CQuestData::GetNumOfQuestData(pQData) )
        break;
      v4 = pQData;
    }
  }
  CQuestWin2::UpDateViewQuestList(v2, 0, (unsigned __int8)nPlayerLevel);
}

//----- (0060D160) --------------------------------------------------------
char __thiscall EpicQuestWin::Create(EpicQuestWin *this, PgFrameWork *pkFrameWork)
{
  EpicQuestWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiAVObject *v5; // eax@4
  NiTexturingProperty *v6; // eax@4
  NiTexturingProperty *v7; // edi@4
  NiTexturingProperty::Map *v8; // eax@6
  NiSourceTexture *v9; // edi@7
  PgSprData *v10; // eax@9
  NiNode *v11; // esi@12
  char result; // al@16
  NiSourceTexture *v13; // eax@17
  PgSprData *v14; // eax@18
  NiTexturingProperty *v15; // esi@21
  NiNode *v16; // esi@23
  PgFont *v17; // eax@27
  PgWinText *v18; // eax@27
  NiUnsharedGeometryGroup *v19; // eax@27
  PgSprData *v20; // eax@27
  PgWinSpr *v21; // eax@27
  PgSprData *v22; // eax@27
  PgWinSpr *v23; // eax@27
  PgSprData *v24; // eax@27
  PgWinSpr *v25; // eax@27
  PgFont *v26; // eax@29
  PgWinText *v27; // eax@29
  NiRefObjectVtbl *v28; // edx@29
  NiUnsharedGeometryGroup *v29; // eax@29
  PgWinSpr *v30; // eax@29
  SLWCreateInfo::Item *v31; // eax@29
  SLWCreateInfo::Item *v32; // eax@37
  PgSprData *v33; // eax@41
  SlideListWin *v34; // eax@41
  SLWCreateInfo::Item *v35; // eax@41
  PgSprData *v36; // eax@45
  SlideListWin *v37; // eax@45
  SLWCreateInfo::Item *v38; // eax@45
  NiRefObjectVtbl *v39; // edx@45
  NiObjectNET *v40; // eax@45
  NiObjectNET *v41; // eax@45
  NiObjectNET *v42; // eax@45
  NiObjectNET *v43; // eax@45
  NiObjectNET *v44; // eax@45
  NiObjectNET *v45; // eax@45
  SlideBar *v46; // eax@45
  NiObjectNET *v47; // eax@45
  NiObjectNET *v48; // eax@45
  NiObjectNET *v49; // eax@45
  NiObjectNET *v50; // eax@45
  NiObjectNET *v51; // eax@45
  NiObjectNET *v52; // eax@45
  SlideBar *v53; // eax@45
  PgSprData *v54; // ecx@45
  int (*v55)(void); // edx@45
  int v56; // eax@45
  int v57; // eax@45
  int v58; // edi@45
  PgWinSpr *v59; // eax@46
  PgWinSpr *v60; // eax@46
  PgWinSpr *v61; // eax@46
  PgWinSpr *v62; // eax@46
  PgWinSpr *v63; // eax@46
  PgSprData *v64; // edi@47
  PgWinBut *v65; // eax@47
  NiNode *v66; // edx@47
  SLWCreateInfo::Item *v67; // eax@47
  PgWinBut *v68; // edi@47
  PgSprData *v69; // STA4_4@47
  int v70; // STA0_4@47
  int v71; // eax@47
  PgWinSpr *v72; // eax@47
  char *v73; // eax@47
  int v74; // eax@47
  PgSprData *v75; // edx@47
  PgWinBut *v76; // edi@47
  PgFont *v77; // STA4_4@47
  PgSprData *v78; // STA0_4@47
  PgSprData *v79; // ST9C_4@47
  int v80; // ST98_4@47
  int v81; // eax@47
  PgWinText *v82; // eax@47
  NiRefObjectVtbl *v83; // edi@47
  NiUnsharedGeometryGroup *v84; // eax@47
  NiTexturingProperty *v85; // esi@49
  NiNode *v86; // esi@51
  PgSprData *pkSprQstJob; // [sp+C4h] [bp-80h]@45
  unsigned int uiHeight; // [sp+C8h] [bp-7Ch]@20
  unsigned int uiWidth; // [sp+CCh] [bp-78h]@20
  SLWCreateInfo kCreateInfo; // [sp+D0h] [bp-74h]@29
  PgSprData *pkSprQstEvent; // [sp+ECh] [bp-58h]@45
  NiPointer<NiTexturingProperty> spTexProp; // [sp+F0h] [bp-54h]@4
  PgSprData *pkSprQstInstance; // [sp+F4h] [bp-50h]@45
  PgSprData *pkSprQstNor; // [sp+F8h] [bp-4Ch]@29
  int iOffX; // [sp+FCh] [bp-48h]@17
  int iOffY; // [sp+100h] [bp-44h]@17
  PgWinText *pkTextWin; // [sp+104h] [bp-40h]@1
  SLWCreateInfo::Item *pCIItem; // [sp+108h] [bp-3Ch]@27
  int uiTop; // [sp+10Ch] [bp-38h]@9
  int uiLeft; // [sp+110h] [bp-34h]@9
  NiPointer<NiNode> spNode; // [sp+114h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+118h] [bp-2Ch]@29
  int v103; // [sp+140h] [bp-4h]@1

  v2 = this;
  pkTextWin = (PgWinText *)pkFrameWork;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v103 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\EpicQuestWin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Panel01");
  v6 = (NiTexturingProperty *)NiAVObject::GetProperty(v5, 8);
  v7 = v6;
  spTexProp.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v8 = *v7->m_kMaps.m_pBase;
  LOBYTE(v103) = 1;
  if ( v8 )
    v9 = (NiSourceTexture *)v8->m_spTexture.m_pObject;
  else
    v9 = 0;
  v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v9);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v10, 0, (PgFrameWork *)pkTextWin, "EpicQuestWin", 0) )
  {
    LOBYTE(v103) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
      spTexProp.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spTexProp.m_pObject, 1u);
    v11 = spNode.m_pObject;
    v103 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v11 )
        v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    }
    return 0;
  }
  iOffX = uiLeft;
  iOffY = uiTop;
  v13 = MenuTexMgr::GetTexture(0x13u);
  if ( v13 )
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v13);
  else
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - iOffX, uiTop - iOffY, v14, (PgWin *)&v2->vfptr, 0, 0);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v17 = Font::Get(MAIN_MENU);
    v18 = PgWinText::CreateWin(uiLeft - iOffX, uiTop - iOffY, uiWidth, uiHeight, v17, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkWinTitle = v18;
    v18->vfptr[122].__vecDelDtor((NiRefObject *)v18, 1u);
    ((void (__stdcall *)(struct D3DXCOLOR *))v2->m_pkWinTitle->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
    pkTextWin = (PgWinText *)&v2->m_pkWinTitle->vfptr[118];
    v19 = TextData2::Get(0x968BBFE6);
    ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkTextWin->vfptr)(v2->m_pkWinTitle, v19);
    ((void (__stdcall *)(_DWORD))v2->m_pkWinTitle->vfptr[60].__vecDelDtor)(0);
    v20 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, v9);
    v21 = PgWinSpr::CreateWin(uiLeft - iOffX, uiTop - iOffY, v20, (PgWin *)&v2->vfptr, 0, 0);
    v21->vfptr[60].__vecDelDtor((NiRefObject *)v21, 1u);
    v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, v9);
    v23 = PgWinSpr::CreateWin(uiLeft - iOffX, uiTop - iOffY, v22, (PgWin *)&v2->vfptr, 0, 0);
    v23->vfptr[60].__vecDelDtor((NiRefObject *)v23, 1u);
    v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, v9);
    v25 = PgWinSpr::CreateWin(uiLeft - iOffX, uiTop - iOffY, v24, (PgWin *)&v2->vfptr, 0, 0);
    v25->vfptr[60].__vecDelDtor((NiRefObject *)v25, 0);
    pCIItem = (SLWCreateInfo::Item *)PgSprData::Create(
                                       (NiAVObject *)&spNode.m_pObject->vfptr,
                                       "ClsNor",
                                       &uiLeft,
                                       &uiTop,
                                       v9);
    PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
    PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
    PgWinBut::CreateWin(uiLeft - iOffX, uiTop - iOffY, (PgSprData *)pCIItem, (PgWin *)&v2->vfptr, 3u, 0, 0);
    pkTextWin = (PgWinText *)MenuTexMgr::GetTexture(4u);
    if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
    {
      pCIItem = (SLWCreateInfo::Item *)PgSprData::Create(
                                         (NiAVObject *)&spNode.m_pObject->vfptr,
                                         "HelpLinkNor",
                                         &uiLeft,
                                         &uiTop,
                                         (NiSourceTexture *)pkTextWin);
      PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
      PgSprData::Add((PgSprData *)pCIItem, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
      PgWinBut::CreateWin(uiLeft - iOffX, uiTop - iOffY, (PgSprData *)pCIItem, (PgWin *)&v2->vfptr, 5u, 0, 0);
    }
    pCIItem = (SLWCreateInfo::Item *)PgSprData::Create(
                                       (NiAVObject *)&spNode.m_pObject->vfptr,
                                       "Title01Nor",
                                       &uiLeft,
                                       &uiTop,
                                       v9);
    v26 = Font::Get(MAIN_MENU);
    v27 = PgWinText::CreateWin(uiLeft - iOffX, uiTop - iOffY, uiWidth, uiHeight, v26, (PgWin *)&v2->vfptr, 0, 0);
    v28 = v27->vfptr;
    pkTextWin = v27;
    v28[122].__vecDelDtor((NiRefObject *)v27, 1u);
    ((void (__stdcall *)(D3DXCOLOR *))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
    pkSprQstNor = (PgSprData *)&pkTextWin->vfptr[118];
    v29 = TextData2::Get(0xF2F3DC4D);
    ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkSprQstNor->vfptr)(pkTextWin, v29);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v30 = PgWinSpr::CreateWin(uiLeft - iOffX, uiTop - iOffY, (PgSprData *)pCIItem, (PgWin *)&v2->vfptr, 0, 0);
    v30->vfptr[60].__vecDelDtor((NiRefObject *)v30, 0);
    kCreateInfo.m_arrItem._Myfirst = 0;
    kCreateInfo.m_arrItem._Mylast = 0;
    kCreateInfo.m_arrItem._Myend = 0;
    kCreateInfo.m_bMakeData = 0;
    kCreateInfo.m_nOffX = 0;
    kCreateInfo.m_nOffY = 0;
    LOBYTE(v103) = 2;
    v31 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
    v31->nItemType = 1;
    v31->pNode = spNode.m_pObject;
    pCIItem = v31;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarNor", 0xCu);
    LOBYTE(v103) = 3;
    pkTextWin = (PgWinText *)&pCIItem->vecNodeName;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      &pCIItem->vecNodeName,
      &_Val);
    LOBYTE(v103) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarOver", 0xDu);
    LOBYTE(v103) = 4;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkTextWin,
      &_Val);
    LOBYTE(v103) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarClick", 0xEu);
    LOBYTE(v103) = 5;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkTextWin,
      &_Val);
    LOBYTE(v103) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pCIItem = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    pCIItem->nItemType = 2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column03", 8u);
    LOBYTE(v103) = 6;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      &pCIItem->vecNodeName,
      &_Val);
    LOBYTE(v103) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    v32 = pCIItem;
    pCIItem->bAbbreviatable = 1;
    v32->pNode = spNode.m_pObject;
    pCIItem = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    pCIItem->nItemType = 2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column01", 8u);
    LOBYTE(v103) = 7;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      &pCIItem->vecNodeName,
      &_Val);
    LOBYTE(v103) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pCIItem->pNode = spNode.m_pObject;
    pCIItem = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    pCIItem->nItemType = 2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column02", 8u);
    LOBYTE(v103) = 8;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      &pCIItem->vecNodeName,
      &_Val);
    LOBYTE(v103) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pCIItem->pNode = spNode.m_pObject;
    SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
    v33 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SubText01", &uiLeft, &uiTop, v9);
    v34 = SlideListWin::CreateWin(uiLeft - iOffX, uiTop - iOffY, v33, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
    v2->m_pListWinQuestList = v34;
    v34->m_uiLClickMsg = 0;
    v2->m_pListWinQuestList->m_bCheckEnable = 0;
    SlideListWin::AlignText(v2->m_pListWinQuestList, 4u);
    SlideListWin::UpdateViewList(v2->m_pListWinQuestList);
    SLWCreateInfo::Clear(&kCreateInfo);
    v35 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
    v35->nItemType = 1;
    v35->pNode = spNode.m_pObject;
    pCIItem = v35;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBar02Nor", 0xEu);
    LOBYTE(v103) = 9;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      &pCIItem->vecNodeName,
      &_Val);
    LOBYTE(v103) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pCIItem = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    pCIItem->nItemType = 2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column04", 8u);
    LOBYTE(v103) = 10;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      &pCIItem->vecNodeName,
      &_Val);
    LOBYTE(v103) = 2;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    pCIItem->pNode = spNode.m_pObject;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
    v36 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SubText02", &uiLeft, &uiTop, v9);
    v37 = SlideListWin::CreateWin(uiLeft - iOffX, uiTop - iOffY, v36, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
    v2->m_pListWinContent = v37;
    v37->m_bCheckEnable = 0;
    SlideListWin::AlignText(v2->m_pListWinContent, 4u);
    SlideListWin::UpdateViewList(v2->m_pListWinContent);
    v38 = (SLWCreateInfo::Item *)PgSprData::Create(
                                   (NiAVObject *)&spNode.m_pObject->vfptr,
                                   "SlideBar_SlideBtnMiddle",
                                   &uiLeft,
                                   &uiTop,
                                   v9);
    v39 = spNode.m_pObject->vfptr;
    pCIItem = v38;
    v40 = (NiObjectNET *)((int (__stdcall *)(const char *))v39[18].__vecDelDtor)("SlideBar_DnBtnNor01");
    NiObjectNET::SetName(v40, "SlideBar_DnBtn01Nor");
    v41 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnClick01");
    NiObjectNET::SetName(v41, "SlideBar_DnBtn01Click");
    v42 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnOver01");
    NiObjectNET::SetName(v42, "SlideBar_DnBtn01Over");
    v43 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnNor01");
    NiObjectNET::SetName(v43, "SlideBar_UpBtn01Nor");
    v44 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnClick01");
    NiObjectNET::SetName(v44, "SlideBar_UpBtn01Click");
    v45 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnOver01");
    NiObjectNET::SetName(v45, "SlideBar_UpBtn01Over");
    v46 = SlideBar::CreateWin(
            spNode.m_pObject,
            "SlideBar01",
            "SlideBar_UpBtn01",
            "SlideBar_DnBtn01",
            (PgSprData *)pCIItem,
            0,
            (PgWin *)&v2->vfptr);
    v2->m_pSlideBarList = v46;
    v46->m_uiClickMsg = 1;
    v2->m_pSlideBarList->m_eType = 1;
    v47 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnNor02");
    NiObjectNET::SetName(v47, "SlideBar_DnBtn02Nor");
    v48 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnClick02");
    NiObjectNET::SetName(v48, "SlideBar_DnBtn02Click");
    v49 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_DnBtnOver02");
    NiObjectNET::SetName(v49, "SlideBar_DnBtn02Over");
    v50 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnNor02");
    NiObjectNET::SetName(v50, "SlideBar_UpBtn02Nor");
    v51 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnClick02");
    NiObjectNET::SetName(v51, "SlideBar_UpBtn02Click");
    v52 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("SlideBar_UpBtnOver02");
    NiObjectNET::SetName(v52, "SlideBar_UpBtn02Over");
    v53 = SlideBar::CreateWin(
            spNode.m_pObject,
            "SlideBar02",
            "SlideBar_UpBtn02",
            "SlideBar_DnBtn02",
            (PgSprData *)pCIItem,
            0,
            (PgWin *)&v2->vfptr);
    v2->m_pSlideBarContent = v53;
    v53->m_uiClickMsg = 2;
    v2->m_pSlideBarContent->m_eType = 1;
    v54 = (PgSprData *)v2->m_pSlideBarContent;
    v55 = (int (*)(void))v2->m_pSlideBarContent->vfptr[42].__vecDelDtor;
    pkTextWin = (PgWinText *)v2->m_pSlideBarContent->vfptr;
    pkSprQstNor = v54;
    v56 = v55();
    v57 = ((int (__stdcall *)(int))pkSprQstNor->vfptr[41].__vecDelDtor)(v56);
    ((void (__thiscall *)(SlideBar *, int))pkTextWin[1].m_ppkExtra)(v2->m_pSlideBarContent, v57);
    pkSprQstNor = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconQstNor", &uiLeft, &uiTop, v9);
    pCIItem = (SLWCreateInfo::Item *)PgSprData::Create(
                                       (NiAVObject *)&spNode.m_pObject->vfptr,
                                       "IconQstEpic",
                                       &uiLeft,
                                       &uiTop,
                                       v9);
    pkSprQstJob = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconQstJob", &uiLeft, &uiTop, v9);
    pkSprQstEvent = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconQstEvent", &uiLeft, &uiTop, v9);
    pkSprQstInstance = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconQstInDun", &uiLeft, &uiTop, v9);
    v58 = (int)v2->m_pkSprQstEpic;
    pkTextWin = (PgWinText *)13;
    do
    {
      v59 = PgWinSpr::CreateWin(0, 0, pkSprQstNor, (PgWin *)&v2->vfptr, 0, 0);
      *(_DWORD *)(v58 - 52) = v59;
      v59->vfptr[60].__vecDelDtor((NiRefObject *)v59, 0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v58 - 52) + 256))(0);
      v60 = PgWinSpr::CreateWin(0, 0, (PgSprData *)pCIItem, (PgWin *)&v2->vfptr, 0, 0);
      *(_DWORD *)v58 = v60;
      v60->vfptr[60].__vecDelDtor((NiRefObject *)v60, 0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v58 + 256))(0);
      v61 = PgWinSpr::CreateWin(0, 0, pkSprQstJob, (PgWin *)&v2->vfptr, 0, 0);
      *(_DWORD *)(v58 + 52) = v61;
      v61->vfptr[60].__vecDelDtor((NiRefObject *)v61, 0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v58 + 52) + 256))(0);
      v62 = PgWinSpr::CreateWin(0, 0, pkSprQstEvent, (PgWin *)&v2->vfptr, 0, 0);
      *(_DWORD *)(v58 + 104) = v62;
      v62->vfptr[60].__vecDelDtor((NiRefObject *)v62, 0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v58 + 104) + 256))(0);
      v63 = PgWinSpr::CreateWin(0, 0, pkSprQstInstance, (PgWin *)&v2->vfptr, 0, 0);
      *(_DWORD *)(v58 + 156) = v63;
      v63->vfptr[60].__vecDelDtor((NiRefObject *)v63, 0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v58 + 156) + 256))(0);
      v58 += 4;
      pkTextWin = (PgWinText *)((char *)pkTextWin - 1);
    }
    while ( pkTextWin );
    v64 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v64, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver");
    PgSprData::Add(v64, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick");
    PgSprData::Add(v64, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnDisable");
    v65 = PgWinBut::CreateWin(uiLeft - iOffX, uiTop - iOffY + 1, v64, (PgWin *)&v2->vfptr, 4u, 0, 0);
    v66 = spNode.m_pObject;
    v2->m_pkAcceptBtn = v65;
    v67 = (SLWCreateInfo::Item *)PgSprData::Create((NiAVObject *)&v66->vfptr, "BtnDisable", &uiLeft, &uiTop, 0);
    v68 = v2->m_pkAcceptBtn;
    pCIItem = v67;
    v69 = (PgSprData *)v67;
    v70 = ((int (__thiscall *)(PgWinBut *))v68->vfptr[42].__vecDelDtor)(v68);
    v71 = ((int (__thiscall *)(PgWinBut *))v68->vfptr[41].__vecDelDtor)(v68);
    v72 = PgWinSpr::CreateWin(v71, v70, v69, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkAcceptBtnSpr = v72;
    v72->vfptr[60].__vecDelDtor((NiRefObject *)v72, 0);
    ((void (__stdcall *)(_DWORD))v2->m_pkAcceptBtnSpr->vfptr[64].__vecDelDtor)(0);
    v2->m_pkAcceptBtnSpr->m_pkToolTipWin = g_pkToolTipWin;
    v73 = (char *)TextData2::Get(0x2889769Au);
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkAcceptBtnSpr->vfptr, v73);
    v74 = **(_DWORD **)&pCIItem->mapSprDataWinState._Alnod.0;
    v75 = *(PgSprData **)(v74 + 20);
    v76 = v2->m_pkAcceptBtn;
    pkSprQstInstance = *(PgSprData **)(v74 + 24);
    pkSprQstEvent = v75;
    v77 = Font::Get(MAIN_MENU);
    v78 = pkSprQstInstance;
    v79 = pkSprQstEvent;
    v80 = ((int (__thiscall *)(PgWinBut *))v76->vfptr[42].__vecDelDtor)(v76);
    v81 = ((int (__thiscall *)(PgWinBut *))v76->vfptr[41].__vecDelDtor)(v76);
    v82 = PgWinText::CreateWin(v81, v80, (unsigned int)v79, (unsigned int)v78, v77, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkBtnText = v82;
    v82->vfptr[122].__vecDelDtor((NiRefObject *)v82, 5u);
    v83 = v2->m_pkBtnText->vfptr;
    v84 = TextData2::Get(0xD4E6E5E7);
    v83[118].__vecDelDtor((NiRefObject *)v2->m_pkBtnText, (unsigned int)v84);
    ((void (__stdcall *)(_DWORD))v2->m_pkBtnText->vfptr[60].__vecDelDtor)(0);
    ((void (__thiscall *)(EpicQuestWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    LOBYTE(v103) = 1;
    if ( kCreateInfo.m_arrItem._Myfirst )
    {
      std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(
        kCreateInfo.m_arrItem._Myfirst,
        kCreateInfo.m_arrItem._Mylast);
      operator delete(kCreateInfo.m_arrItem._Myfirst);
    }
    v85 = spTexProp.m_pObject;
    kCreateInfo.m_arrItem._Myfirst = 0;
    kCreateInfo.m_arrItem._Mylast = 0;
    kCreateInfo.m_arrItem._Myend = 0;
    LOBYTE(v103) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
      v85->vfptr->__vecDelDtor((NiRefObject *)v85, 1u);
    v86 = spNode.m_pObject;
    v103 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v86 )
      v86->vfptr->__vecDelDtor((NiRefObject *)v86, 1u);
    result = 1;
  }
  else
  {
    v15 = spTexProp.m_pObject;
    LOBYTE(v103) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
      v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
    v16 = spNode.m_pObject;
    v103 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v16 )
      return 0;
    v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0060E030) --------------------------------------------------------
void __thiscall EpicQuestWin::UpdateQuestData(EpicQuestWin *this)
{
  EpicQuestWin *v1; // esi@1

  v1 = this;
  EpicQuestWin::UpDateViewQuestList(this);
  if ( v1->m_nSelectedID <= -1 )
    EpicQuestWin::OnQuestListLClick(v1, 0);
  else
    EpicQuestWin::UpDateViewQuesContent(v1, v1->m_nSelectedID);
  if ( !SlideListWin::GetItemSize(v1->m_pListWinQuestList) && v1->m_eType == UI_LOW_LEVEL )
  {
    ((void (__stdcall *)(_DWORD))v1->m_pkAcceptBtn->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v1->m_pkAcceptBtnSpr->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v1->m_pkAcceptBtnSpr->vfptr[64].__vecDelDtor)(0);
  }
}

//----- (0060E0B0) --------------------------------------------------------
void __thiscall EpicQuestWin::OnQuestListLClick(EpicQuestWin *this, int nIndex)
{
  EpicQuestWin *v2; // esi@1
  unsigned int v3; // eax@2
  CClientQuest *v4; // eax@4
  QUEST_DATA *v5; // eax@4
  void *(__thiscall *v6)(NiRefObject *, unsigned int); // edx@4
  int v7; // [sp+0h] [bp-8h]@0
  unsigned int dwQuestID; // [sp+4h] [bp-4h]@1

  v2 = this;
  SlideListWin::RemoveAllList(this->m_pListWinContent);
  if ( SlideListWin::GetData(v2->m_pListWinQuestList, nIndex, &dwQuestID) )
  {
    v3 = dwQuestID;
    v2->m_nSelectedID = dwQuestID;
    if ( v3 != -1 && v2->m_eType == UI_LOW_LEVEL )
    {
      v4 = QuestDataMgr::GetQuest();
      v5 = CQuestData::GetQuestData(v4->m_pQuestData, v2->m_nSelectedID);
      v6 = v2->m_pkAcceptBtn->vfptr[60].__vecDelDtor;
      if ( v5->Start.bIsWaitListProgress )
      {
        ((void (__stdcall *)(signed int, int))v6)(1, v7);
        ((void (__stdcall *)(_DWORD))v2->m_pkAcceptBtnSpr->vfptr[60].__vecDelDtor)(0);
        ((void (__cdecl *)(_DWORD))v2->m_pkAcceptBtnSpr->vfptr[64].__vecDelDtor)(0);
      }
      else
      {
        ((void (__stdcall *)(_DWORD, int))v6)(0, v7);
        ((void (__stdcall *)(signed int))v2->m_pkAcceptBtnSpr->vfptr[60].__vecDelDtor)(1);
        ((void (__cdecl *)(signed int))v2->m_pkAcceptBtnSpr->vfptr[64].__vecDelDtor)(1);
      }
    }
    EpicQuestWin::UpdateQuestData(v2);
  }
}

//----- (0060E170) --------------------------------------------------------
void __thiscall CQuestWin2::OnTAB2(CQuestWin2 *this)
{
  CQuestWin2 *v1; // esi@1
  PgWinBut *v2; // ecx@1
  NiRefObjectVtbl *v3; // edi@1
  NiUnsharedGeometryGroup *v4; // eax@1

  v1 = this;
  this->m_pkTab01->m_bCheck = 0;
  this->m_pkTab02->m_bCheck = 1;
  v2 = this->m_pkAcceptBtn;
  v1->m_nCurSelTab = 2;
  v1->m_nSelectedID = -1;
  ((void (__stdcall *)(_DWORD))v2->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkAcceptBtnSpr->vfptr[64].__vecDelDtor)(0);
  v3 = v1->m_pkButText1->vfptr;
  v4 = TextData2::Get(0xD4E6E5E7);
  v3[118].__vecDelDtor((NiRefObject *)v1->m_pkButText1, (unsigned int)v4);
  ((void (__stdcall *)(_DWORD))v1->m_pkButText1->vfptr[64].__vecDelDtor)(0);
  v1->bReverseSort = 1;
  v1->m_nSortColumn = -1;
  v1->m_nStateFilterType = 4;
  CQuestWin2::UpdateQuestData(v1);
  CQuestWin2::UpdateQuestData(v1);
}

//----- (0060E230) --------------------------------------------------------
void __thiscall CQuestWin2::SelectTab(CQuestWin2 *this, int TabNum)
{
  if ( TabNum == 1 )
  {
    CQuestWin2::OnTAB1(this);
  }
  else if ( TabNum == 2 )
  {
    CQuestWin2::OnTAB2(this);
  }
}

//----- (0060E260) --------------------------------------------------------
void __thiscall EpicQuestWin::OnShowWin(EpicQuestWin *this)
{
  EpicQuestWin *v1; // esi@1
  EpicQuestWin::eUI_TYPE v2; // eax@1
  NiRefObjectVtbl *v3; // edi@2
  unsigned int v4; // ST08_4@2
  unsigned int v5; // ST04_4@2
  char *v6; // eax@2
  char *v7; // eax@2
  NiRefObjectVtbl *v8; // edi@4
  NiUnsharedGeometryGroup *v9; // eax@4

  v1 = this;
  v2 = this->m_eType;
  if ( v2 == 1 )
  {
    ((void (__stdcall *)(_DWORD))this->m_pkAcceptBtnSpr->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v1->m_pkAcceptBtnSpr->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v1->m_pkAcceptBtn->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v1->m_pkAcceptBtn->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v1->m_pkBtnText->vfptr[64].__vecDelDtor)(0);
    EpicQuestWin::TotalMaxEpicQuest(v1);
    v3 = v1->m_pkWinTitle->vfptr;
    v4 = v1->m_uiMaxEpicQuest;
    v5 = v1->m_uiCompleteQuest;
    v6 = (char *)TextData2::Get(0x292C0C8Du);
    v7 = fs(v6, v5, v4);
    v3[118].__vecDelDtor((NiRefObject *)v1->m_pkWinTitle, (unsigned int)v7);
    EpicQuestWin::UpdateQuestData(v1);
  }
  else
  {
    if ( v2 == UI_LOW_LEVEL )
    {
      ((void (__stdcall *)(_DWORD))this->m_pkAcceptBtn->vfptr[60].__vecDelDtor)(1);
      ((void (__stdcall *)(_DWORD))v1->m_pkAcceptBtn->vfptr[64].__vecDelDtor)(1);
      ((void (__stdcall *)(_DWORD))v1->m_pkBtnText->vfptr[64].__vecDelDtor)(1);
      v8 = v1->m_pkWinTitle->vfptr;
      v9 = TextData2::Get(0x908E7DD5);
      v8[118].__vecDelDtor((NiRefObject *)v1->m_pkWinTitle, (unsigned int)v9);
    }
    EpicQuestWin::UpdateQuestData(v1);
  }
}

//----- (0060E380) --------------------------------------------------------
void __thiscall EpicQuestWin::OnCommand(EpicQuestWin *this, unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@7

  switch ( wParam )
  {
    case 0u:
      EpicQuestWin::OnQuestListLClick(this, lParam);
      break;
    case 1u:
      EpicQuestWin::OnSlideBarList(this);
      break;
    case 2u:
      EpicQuestWin::OnSlideBarContent(this);
      break;
    case 3u:
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
      break;
    case 4u:
      EpicQuestWin::OnQuestAccept(this);
      goto LABEL_7;
    case 5u:
LABEL_7:
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v3 )
        GameFrameWork::OpenPlayGuideSearchList(v3, "EpicQuestWin");
      break;
    default:
      return;
  }
}

//----- (0060E410) --------------------------------------------------------
void __userpurge CQuestWin2::OnCommand(CQuestWin2 *this@<ecx>, int a2@<ebx>, signed int a3@<edi>, unsigned int wParam, int lParam)
{
  bool v5; // zf@13

  switch ( wParam )
  {
    case 1u:
      CQuestWin2::OnWinClose(this);
      break;
    case 2u:
      CQuestWin2::OnTAB1(this);
      break;
    case 3u:
      this->m_bLevelUp = 0;
      CQuestWin2::OnTAB2(this);
      break;
    case 9u:
      CQuestWin2::OnSlideBarList(this);
      break;
    case 0xAu:
      CQuestWin2::UpDateContentSideBar(this);
      break;
    case 8u:
      CQuestWin2::OnQuestListLClick(this, a2, a3, lParam, 0);
      break;
    case 0xBu:
      CQuestWin2::OnSortByName(this);
      break;
    case 0xCu:
      CQuestWin2::OnSortByState(this);
      break;
    case 5u:
      CQuestWin2::OnGiveUp(this);
      break;
    case 6u:
      CQuestWin2::OnEpicQuestCompleteList(this);
      break;
    case 0x12u:
      CQuestWin2::OnFullMapOpen(this);
      break;
    case 0xDu:
      v5 = this->bReverseSort == 0;
      this->m_nSortColumn = -1;
      this->bReverseSort = v5;
      this->m_nStateFilterType = 4;
      CQuestWin2::UpdateQuestData(this);
      break;
    case 0x13u:
      lParam = (unsigned __int16)lParam;
      CQuestWin2::OnAutoRunBtnClick((unsigned __int16 *)&lParam);
      break;
    case 0x14u:
      CQuestWin2::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (0060E540) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Min(std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *_Pnode)
{
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v2; // ecx@1

  result = _Pnode;
  v2 = _Pnode->_Left;
  if ( !_Pnode->_Left->_Isnil )
  {
    do
    {
      result = v2;
      v2 = v2->_Left;
    }
    while ( !v2->_Isnil );
  }
  return result;
}

//----- (0060E560) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Max(std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *_Pnode)
{
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *i; // ecx@1

  result = _Pnode;
  for ( i = _Pnode->_Right; !i->_Isnil; i = i->_Right )
    result = i;
  return result;
}

//----- (0060E580) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Max(std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Pnode)
{
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *i; // ecx@1

  result = _Pnode;
  for ( i = _Pnode->_Right; !i->_Isnil; i = i->_Right )
    result = i;
  return result;
}

//----- (0060E5A0) --------------------------------------------------------
void __thiscall NiTArray<PgWinBut *>::~NiTArray<PgWinBut *>(NiTArray<PgWinBut *> *this)
{
  PgWinBut **v1; // ST00_4@1

  v1 = this->m_pBase;
  this->vfptr = (NiTArray<PgWinBut *>Vtbl *)&NiTArray<PgWinBut *>::`vftable';
  operator delete[](v1);
}
// 9B6258: using guessed type int (__thiscall *NiTArray<PgWinBut *>::`vftable')(void *p, char);

//----- (0060E5C0) --------------------------------------------------------
unsigned int __thiscall NiTArray<PgWinBut *>::Remove(NiTArray<PgWinBut *> *this, PgWinBut *const *element)
{
  unsigned int result; // eax@2
  PgWinBut **v3; // edx@3
  unsigned int v4; // edx@8
  unsigned int v5; // edx@8

  if ( *element && (result = 0, this->m_uiSize) )
  {
    v3 = this->m_pBase;
    while ( *v3 != *element )
    {
      ++result;
      ++v3;
      if ( result >= this->m_uiSize )
        goto LABEL_6;
    }
    this->m_pBase[result] = 0;
    v4 = this->m_uiSize;
    --this->m_uiESize;
    v5 = v4 - 1;
    if ( result == v5 )
      this->m_uiSize = v5;
  }
  else
  {
LABEL_6:
    result = -1;
  }
  return result;
}

//----- (0060E620) --------------------------------------------------------
NiTArray<PgWinBut *> *__thiscall NiTArray<PgWinBut *>::`vector deleting destructor'(NiTArray<PgWinBut *> *this, unsigned int a2)
{
  NiTArray<PgWinBut *> *v2; // esi@1
  PgWinBut **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pBase;
  this->vfptr = (NiTArray<PgWinBut *>Vtbl *)&NiTArray<PgWinBut *>::`vftable';
  operator delete[](v3);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B6258: using guessed type int (__thiscall *NiTArray<PgWinBut *>::`vftable')(void *p, char);

//----- (0060E650) --------------------------------------------------------
void __thiscall NiTArray<NiGeometry *>::SetSize(NiTArray<NiTPointerList<NiPointer<NiProperty> > *> *this, unsigned int uiMaxSize)
{
  NiTArray<NiTPointerList<NiPointer<NiProperty> > *> *v2; // esi@1
  unsigned int v3; // edx@3
  NiTPointerList<NiPointer<NiProperty> > **v4; // ecx@4
  bool v5; // zf@4
  NiTPointerList<NiPointer<NiProperty> > **v6; // ecx@4
  NiTPointerList<NiPointer<NiProperty> > **v7; // edi@8
  unsigned int v8; // eax@9
  unsigned int v9; // eax@11

  v2 = this;
  if ( uiMaxSize == this->m_uiMaxSize )
    return;
  if ( uiMaxSize < this->m_uiSize )
  {
    v3 = uiMaxSize;
    do
    {
      v4 = v2->m_pBase;
      v5 = v4[v3] == 0;
      v6 = &v4[v3];
      if ( !v5 )
      {
        *v6 = 0;
        --v2->m_uiESize;
      }
      ++v3;
    }
    while ( v3 < v2->m_uiSize );
    v2->m_uiSize = uiMaxSize;
  }
  v7 = v2->m_pBase;
  v2->m_uiMaxSize = uiMaxSize;
  if ( !uiMaxSize )
  {
    v2->m_pBase = 0;
LABEL_15:
    operator delete[](v7);
    return;
  }
  v2->m_pBase = (NiTPointerList<NiPointer<NiProperty> > **)operator new[](4 * uiMaxSize);
  v8 = 0;
  if ( v2->m_uiSize )
  {
    do
    {
      v2->m_pBase[v8] = v7[v8];
      ++v8;
    }
    while ( v8 < v2->m_uiSize );
  }
  v9 = v2->m_uiSize;
  if ( v9 >= v2->m_uiMaxSize )
    goto LABEL_15;
  do
    v2->m_pBase[v9++] = 0;
  while ( v9 < v2->m_uiMaxSize );
  operator delete[](v7);
}

//----- (0060E720) --------------------------------------------------------
AutoRunBut *__thiscall AutoRunBut::`vector deleting destructor'(AutoRunBut *this, unsigned int a2)
{
  AutoRunBut *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&AutoRunBut::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&AutoRunBut::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B6004: using guessed type void (__thiscall *AutoRunBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B6024: using guessed type int (__thiscall *AutoRunBut::`vftable'{for `NiNode'})(void *p, char);

//----- (0060E760) --------------------------------------------------------
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>,std::_Iterator_base0>::operator++(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >,std::_Iterator_base0> *this)
{
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >,std::_Iterator_base0> *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v2; // edx@1
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v3; // ecx@2
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v4; // edx@3
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *i; // edx@6

  result = this;
  v2 = this->_Ptr;
  if ( !this->_Ptr->_Isnil )
  {
    v3 = v2->_Right;
    if ( v3->_Isnil )
    {
      for ( i = v2->_Parent; !i->_Isnil; i = i->_Parent )
      {
        if ( result->_Ptr != i->_Right )
          break;
        result->_Ptr = i;
      }
      result->_Ptr = i;
    }
    else
    {
      v4 = v3->_Left;
      if ( !v3->_Left->_Isnil )
      {
        do
        {
          v3 = v4;
          v4 = v4->_Left;
        }
        while ( !v4->_Isnil );
      }
      result->_Ptr = v3;
    }
  }
  return result;
}

//----- (0060E7B0) --------------------------------------------------------
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>,std::_Iterator_base0>::operator++(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >,std::_Iterator_base0> *this)
{
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >,std::_Iterator_base0> *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v2; // edx@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v3; // ecx@2
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v4; // edx@3
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *i; // edx@6

  result = this;
  v2 = this->_Ptr;
  if ( !this->_Ptr->_Isnil )
  {
    v3 = v2->_Right;
    if ( v3->_Isnil )
    {
      for ( i = v2->_Parent; !i->_Isnil; i = i->_Parent )
      {
        if ( result->_Ptr != i->_Right )
          break;
        result->_Ptr = i;
      }
      result->_Ptr = i;
    }
    else
    {
      v4 = v3->_Left;
      if ( !v3->_Left->_Isnil )
      {
        do
        {
          v3 = v4;
          v4 = v4->_Left;
        }
        while ( !v4->_Isnil );
      }
      result->_Ptr = v3;
    }
  }
  return result;
}

//----- (0060E800) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Lrotate(std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *this, std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *_Wherenode)
{
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v3; // ecx@3
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v4; // ecx@5

  v2 = _Wherenode->_Right;
  _Wherenode->_Right = v2->_Left;
  if ( !v2->_Left->_Isnil )
    v2->_Left->_Parent = _Wherenode;
  v2->_Parent = _Wherenode->_Parent;
  v3 = this->_Myhead;
  if ( _Wherenode == v3->_Parent )
  {
    v3->_Parent = v2;
    v2->_Left = _Wherenode;
    _Wherenode->_Parent = v2;
  }
  else
  {
    v4 = _Wherenode->_Parent;
    if ( _Wherenode == v4->_Left )
    {
      v4->_Left = v2;
      v2->_Left = _Wherenode;
      _Wherenode->_Parent = v2;
    }
    else
    {
      v4->_Right = v2;
      v2->_Left = _Wherenode;
      _Wherenode->_Parent = v2;
    }
  }
}

//----- (0060E860) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Rrotate(std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *this, std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *_Wherenode)
{
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v4; // ecx@3
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v5; // ecx@5

  v2 = _Wherenode->_Left;
  _Wherenode->_Left = _Wherenode->_Left->_Right;
  v3 = v2->_Right;
  if ( !v3->_Isnil )
    v3->_Parent = _Wherenode;
  v2->_Parent = _Wherenode->_Parent;
  v4 = this->_Myhead;
  if ( _Wherenode == v4->_Parent )
  {
    v4->_Parent = v2;
    v2->_Right = _Wherenode;
    _Wherenode->_Parent = v2;
  }
  else
  {
    v5 = _Wherenode->_Parent;
    if ( _Wherenode == v5->_Right )
    {
      v5->_Right = v2;
      v2->_Right = _Wherenode;
      _Wherenode->_Parent = v2;
    }
    else
    {
      v5->_Left = v2;
      v2->_Right = _Wherenode;
      _Wherenode->_Parent = v2;
    }
  }
}

//----- (0060E8C0) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::_Lrotate(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Wherenode)
{
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v3; // ecx@3
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v4; // ecx@5

  v2 = _Wherenode->_Right;
  _Wherenode->_Right = v2->_Left;
  if ( !v2->_Left->_Isnil )
    v2->_Left->_Parent = _Wherenode;
  v2->_Parent = _Wherenode->_Parent;
  v3 = this->_Myhead;
  if ( _Wherenode == v3->_Parent )
  {
    v3->_Parent = v2;
    v2->_Left = _Wherenode;
    _Wherenode->_Parent = v2;
  }
  else
  {
    v4 = _Wherenode->_Parent;
    if ( _Wherenode == v4->_Left )
    {
      v4->_Left = v2;
      v2->_Left = _Wherenode;
      _Wherenode->_Parent = v2;
    }
    else
    {
      v4->_Right = v2;
      v2->_Left = _Wherenode;
      _Wherenode->_Parent = v2;
    }
  }
}

//----- (0060E920) --------------------------------------------------------
EpicQuestWin *__thiscall EpicQuestWin::`scalar deleting destructor'(EpicQuestWin *this, unsigned int a2)
{
  EpicQuestWin *v2; // esi@1
  MsgBox *v3; // edi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&EpicQuestWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&EpicQuestWin::`vftable'{for `IDirectMessenger'};
  v3 = this->ms_pkMsgBox.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B6260: using guessed type void (__thiscall *EpicQuestWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B627C: using guessed type int (__thiscall *EpicQuestWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0060E9C0) --------------------------------------------------------
void __thiscall CQuestWin2::QData::~QData(CQuestWin2::QData *this)
{
  CQuestWin2::QData *v1; // esi@1

  v1 = this;
  if ( this->strState._Myres >= 0x10 )
    operator delete(this->strState._Bx._Ptr);
  v1->strState._Myres = 15;
  v1->strState._Mysize = 0;
  v1->strState._Bx._Buf[0] = 0;
  if ( v1->strTitle._Myres >= 0x10 )
    operator delete(v1->strTitle._Bx._Ptr);
  v1->strTitle._Mysize = 0;
  v1->strTitle._Myres = 15;
  v1->strTitle._Bx._Buf[0] = 0;
}

//----- (0060EA10) --------------------------------------------------------
void __thiscall EpicQuestWin::QData::~QData(EpicQuestWin::QData *this)
{
  EpicQuestWin::QData *v1; // esi@1

  v1 = this;
  if ( this->strTitle._Myres >= 0x10 )
    operator delete(this->strTitle._Bx._Ptr);
  v1->strTitle._Myres = 15;
  v1->strTitle._Mysize = 0;
  v1->strTitle._Bx._Buf[0] = 0;
}

//----- (0060EA40) --------------------------------------------------------
void __thiscall std::pair<int,CQuestWin2::QData>::~pair<int,CQuestWin2::QData>(std::pair<int,CQuestWin2::QData> *this)
{
  std::pair<int,CQuestWin2::QData> *v1; // esi@1

  v1 = this;
  if ( this->second.strState._Myres >= 0x10 )
    operator delete(this->second.strState._Bx._Ptr);
  v1->second.strState._Myres = 15;
  v1->second.strState._Mysize = 0;
  v1->second.strState._Bx._Buf[0] = 0;
  if ( v1->second.strTitle._Myres >= 0x10 )
    operator delete(v1->second.strTitle._Bx._Ptr);
  v1->second.strTitle._Mysize = 0;
  v1->second.strTitle._Myres = 15;
  v1->second.strTitle._Bx._Buf[0] = 0;
}

//----- (0060EA90) --------------------------------------------------------
void __thiscall std::pair<int,EpicQuestWin::QData>::~pair<int,EpicQuestWin::QData>(std::pair<int,EpicQuestWin::QData> *this)
{
  std::pair<int,EpicQuestWin::QData> *v1; // esi@1

  v1 = this;
  if ( this->second.strTitle._Myres >= 0x10 )
    operator delete(this->second.strTitle._Bx._Ptr);
  v1->second.strTitle._Myres = 15;
  v1->second.strTitle._Mysize = 0;
  v1->second.strTitle._Bx._Buf[0] = 0;
}

//----- (0060EAC0) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > >,std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > > *__thiscall std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Eqrange(std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > >,std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > > *result, const int *_Keyval)
{
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v3; // edx@1
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v4; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v5; // ebx@1
  int v6; // edi@2
  int v7; // esi@3
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v8; // eax@11
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > >,std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > > *v9; // eax@18

  v3 = this->_Myhead;
  v4 = v3->_Parent;
  v5 = this->_Myhead;
  if ( !v4->_Isnil )
  {
    v6 = *_Keyval;
    do
    {
      v7 = v4->_Myval.first;
      if ( v7 >= v6 )
      {
        if ( v3->_Isnil && v6 < v7 )
          v3 = v4;
        v5 = v4;
        v4 = v4->_Left;
      }
      else
      {
        v4 = v4->_Right;
      }
    }
    while ( !v4->_Isnil );
  }
  if ( v3->_Isnil )
    v8 = this->_Myhead->_Parent;
  else
    v8 = v3->_Left;
  while ( !v8->_Isnil )
  {
    if ( *_Keyval >= v8->_Myval.first )
    {
      v8 = v8->_Right;
    }
    else
    {
      v3 = v8;
      v8 = v8->_Left;
    }
  }
  v9 = result;
  result->first._Ptr = v5;
  result->second._Ptr = v3;
  return v9;
}

//----- (0060EB50) --------------------------------------------------------
void __thiscall CQuestWin2::QData::QData(CQuestWin2::QData *this, CQuestWin2::QData *__that)
{
  CQuestWin2::QData *v2; // esi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // ecx@1
  int v4; // ecx@1

  v2 = this;
  this->dwQuestID = __that->dwQuestID;
  this->nType = __that->nType;
  v3 = &this->strTitle;
  v3->_Myres = 15;
  v3->_Mysize = 0;
  v3->_Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(v3, &__that->strTitle, 0, 0xFFFFFFFF);
  v4 = (int)&v2->strState;
  *(_DWORD *)(v4 + 20) = 15;
  *(_DWORD *)(v4 + 16) = 0;
  *(_BYTE *)v4 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &v2->strState,
    &__that->strState,
    0,
    0xFFFFFFFF);
  v2->dwData = __that->dwData;
  v2->r = __that->r;
  v2->g = __that->g;
  v2->b = __that->b;
  v2->nStatus = __that->nStatus;
  v2->bIsFilterType = __that->bIsFilterType;
}

//----- (0060EC10) --------------------------------------------------------
void __thiscall EpicQuestWin::QData::QData(EpicQuestWin::QData *this, unsigned int _dwQuestID, int _nType, const char *_szTitle, unsigned int _dwData, int _r, int _g, int _b)
{
  EpicQuestWin::QData *v8; // esi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v9; // ecx@1

  v8 = this;
  v9 = &this->strTitle;
  v9->_Myres = 15;
  v9->_Mysize = 0;
  v9->_Bx._Buf[0] = 0;
  v8->nType = _nType;
  v8->dwQuestID = _dwQuestID;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(v9, _szTitle, strlen(_szTitle));
  v8->dwData = _dwData;
  v8->b = _b;
  v8->r = _r;
  v8->g = _g;
}

//----- (0060ECA0) --------------------------------------------------------
void __thiscall CQuestWin2::QData::QData(CQuestWin2::QData *this, unsigned int _dwQuestID, int _nType, const char *_szTitle, const char *_szState, unsigned int _dwData, int _r, int _g, int _b, PLAYER_QUEST_STATUS _Status, bool _bFilterType)
{
  CQuestWin2::QData *v11; // esi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v12; // ecx@1

  v11 = this;
  v12 = &this->strTitle;
  v12->_Myres = 15;
  v12->_Mysize = 0;
  v12->_Bx._Buf[0] = 0;
  v11->strState._Myres = 15;
  v11->strState._Mysize = 0;
  v11->strState._Bx._Buf[0] = 0;
  v11->dwQuestID = _dwQuestID;
  v11->nType = _nType;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(v12, _szTitle, strlen(_szTitle));
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &v11->strState,
    _szState,
    strlen(_szState));
  v11->dwData = _dwData;
  v11->r = _r;
  v11->g = _g;
  v11->b = _b;
  v11->nStatus = _Status;
  v11->bIsFilterType = _bFilterType;
}

//----- (0060ED70) --------------------------------------------------------
CQuestWin2 *__thiscall CQuestWin2::`vector deleting destructor'(CQuestWin2 *this, unsigned int a2)
{
  CQuestWin2 *v2; // esi@1

  v2 = this;
  CQuestWin2::~CQuestWin2(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0060EDA0) --------------------------------------------------------
void __thiscall std::pair<int const,EpicQuestWin::QData>::pair<int const,EpicQuestWin::QData>(std::pair<int const ,EpicQuestWin::QData> *this, std::pair<int,EpicQuestWin::QData> *_Right)
{
  std::pair<int const ,EpicQuestWin::QData> *v2; // esi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // ecx@1

  v2 = this;
  this->first = _Right->first;
  this->second.dwQuestID = _Right->second.dwQuestID;
  v3 = &this->second.strTitle;
  v2->second.nType = _Right->second.nType;
  v3->_Myres = 15;
  v3->_Mysize = 0;
  v3->_Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    v3,
    &_Right->second.strTitle,
    0,
    0xFFFFFFFF);
  v2->second.dwData = _Right->second.dwData;
  v2->second.r = _Right->second.r;
  v2->second.g = _Right->second.g;
  v2->second.b = _Right->second.b;
}

//----- (0060EE00) --------------------------------------------------------
void __thiscall std::pair<int,EpicQuestWin::QData>::pair<int,EpicQuestWin::QData>(std::pair<int,EpicQuestWin::QData> *this, char *_Val1, EpicQuestWin::QData *_Val2)
{
  std::pair<int,EpicQuestWin::QData> *v3; // esi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v4; // ecx@1

  v3 = this;
  this->first = (unsigned __int8)*_Val1;
  this->second.dwQuestID = _Val2->dwQuestID;
  v4 = &this->second.strTitle;
  v3->second.nType = _Val2->nType;
  v4->_Myres = 15;
  v4->_Mysize = 0;
  v4->_Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(v4, &_Val2->strTitle, 0, 0xFFFFFFFF);
  v3->second.dwData = _Val2->dwData;
  v3->second.r = _Val2->r;
  v3->second.g = _Val2->g;
  v3->second.b = _Val2->b;
}

//----- (0060EE60) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > *__thiscall std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Insert(std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *_Newnode)
{
  unsigned int v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v6; // edi@8
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v7; // edx@8
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v8; // edx@11
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v9; // edx@13
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v10; // eax@15
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v11; // edx@16
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v12; // esi@16
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v13; // esi@17
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v14; // edx@19
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v15; // esi@21
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v16; // esi@23
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v17; // edx@27
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v18; // esi@27
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v19; // edi@27
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v20; // edi@29
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v21; // edi@31
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v22; // edx@37
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v23; // esi@37
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v24; // esi@39
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v25; // esi@41
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v26; // edi@47
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v27; // edi@49
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v28; // ecx@55
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > *v29; // eax@55

  v5 = this->_Mysize;
  if ( v5 >= 0x2C8590A )
  {
    if ( _Newnode->_Myval.second.strState._Myres >= 0x10 )
      operator delete(_Newnode->_Myval.second.strState._Bx._Ptr);
    _Newnode->_Myval.second.strState._Myres = 15;
    _Newnode->_Myval.second.strState._Mysize = 0;
    _Newnode->_Myval.second.strState._Bx._Buf[0] = 0;
    if ( _Newnode->_Myval.second.strTitle._Myres >= 0x10 )
      operator delete(_Newnode->_Myval.second.strTitle._Bx._Ptr);
    _Newnode->_Myval.second.strTitle._Myres = 15;
    _Newnode->_Myval.second.strTitle._Mysize = 0;
    _Newnode->_Myval.second.strTitle._Bx._Buf[0] = 0;
    operator delete(_Newnode);
    std::_Xlength_error("map/set<T> too long");
  }
  v6 = _Newnode;
  this->_Mysize = v5 + 1;
  _Newnode->_Parent = _Wherenode;
  v7 = this->_Myhead;
  if ( _Wherenode == v7 )
  {
    v7->_Parent = _Newnode;
    this->_Myhead->_Left = _Newnode;
    this->_Myhead->_Right = _Newnode;
  }
  else if ( _Addleft )
  {
    _Wherenode->_Left = _Newnode;
    v8 = this->_Myhead;
    if ( _Wherenode == v8->_Left )
      v8->_Left = _Newnode;
  }
  else
  {
    _Wherenode->_Right = _Newnode;
    v9 = this->_Myhead;
    if ( _Wherenode == v9->_Right )
      v9->_Right = _Newnode;
  }
  v10 = _Newnode;
  while ( !v10->_Parent->_Color )
  {
    v11 = v10->_Parent;
    v12 = v11->_Parent;
    if ( v11 == v12->_Left )
    {
      v13 = v12->_Right;
      if ( v13->_Color )
      {
        if ( v10 == v11->_Right )
        {
          v10 = v10->_Parent;
          v14 = v11->_Right;
          v10->_Right = v14->_Left;
          if ( !v14->_Left->_Isnil )
            v14->_Left->_Parent = v10;
          v14->_Parent = v10->_Parent;
          v15 = this->_Myhead;
          if ( v10 == v15->_Parent )
          {
            v15->_Parent = v14;
          }
          else
          {
            v16 = v10->_Parent;
            if ( v10 == v16->_Left )
              v16->_Left = v14;
            else
              v16->_Right = v14;
          }
          v14->_Left = v10;
          v10->_Parent = v14;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Left;
        v17->_Left = v17->_Left->_Right;
        v19 = v18->_Right;
        if ( !v19->_Isnil )
          v19->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v20 = this->_Myhead;
        if ( v17 == v20->_Parent )
        {
          v20->_Parent = v18;
          v18->_Right = v17;
        }
        else
        {
          v21 = v17->_Parent;
          if ( v17 == v21->_Right )
          {
            v21->_Right = v18;
            v18->_Right = v17;
          }
          else
          {
            v21->_Left = v18;
            v18->_Right = v17;
          }
        }
LABEL_53:
        v6 = _Newnode;
        v17->_Parent = v18;
        continue;
      }
    }
    else
    {
      v13 = v12->_Left;
      if ( v13->_Color )
      {
        if ( v10 == v11->_Left )
        {
          v10 = v10->_Parent;
          v22 = v11->_Left;
          v10->_Left = v22->_Right;
          v23 = v22->_Right;
          if ( !v23->_Isnil )
            v23->_Parent = v10;
          v22->_Parent = v10->_Parent;
          v24 = this->_Myhead;
          if ( v10 == v24->_Parent )
          {
            v24->_Parent = v22;
          }
          else
          {
            v25 = v10->_Parent;
            if ( v10 == v25->_Right )
              v25->_Right = v22;
            else
              v25->_Left = v22;
          }
          v22->_Right = v10;
          v10->_Parent = v22;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Right;
        v17->_Right = v18->_Left;
        if ( !v18->_Left->_Isnil )
          v18->_Left->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v26 = this->_Myhead;
        if ( v17 == v26->_Parent )
        {
          v26->_Parent = v18;
        }
        else
        {
          v27 = v17->_Parent;
          if ( v17 == v27->_Left )
            v27->_Left = v18;
          else
            v27->_Right = v18;
        }
        v18->_Left = v17;
        goto LABEL_53;
      }
    }
    v11->_Color = 1;
    v13->_Color = 1;
    v10->_Parent->_Parent->_Color = 0;
    v10 = v10->_Parent->_Parent;
  }
  v28 = this->_Myhead->_Parent;
  v29 = result;
  result->_Ptr = v6;
  v28->_Color = 1;
  return v29;
}

//----- (0060F0C0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > > *__thiscall std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::_Insert(std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *_Newnode)
{
  unsigned int v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v6; // edi@6
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v7; // edx@6
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v8; // edx@9
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v9; // edx@11
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v10; // eax@13
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v11; // edx@14
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v12; // esi@14
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v13; // esi@15
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v14; // edx@18
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v15; // esi@20
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v16; // esi@22
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v17; // edx@26
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v18; // esi@26
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v19; // edi@26
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v20; // edi@28
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v21; // edi@30
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v22; // esi@33
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v23; // edx@36
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v24; // esi@36
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v25; // esi@38
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v26; // esi@40
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v27; // edi@46
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v28; // edi@48
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v29; // ecx@54
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > > *v30; // eax@54

  v5 = this->_Mysize;
  if ( v5 >= 0x4924923 )
  {
    if ( _Newnode->_Myval.second.strTitle._Myres >= 0x10 )
      operator delete(_Newnode->_Myval.second.strTitle._Bx._Ptr);
    _Newnode->_Myval.second.strTitle._Myres = 15;
    _Newnode->_Myval.second.strTitle._Mysize = 0;
    _Newnode->_Myval.second.strTitle._Bx._Buf[0] = 0;
    operator delete(_Newnode);
    std::_Xlength_error("map/set<T> too long");
  }
  v6 = _Newnode;
  this->_Mysize = v5 + 1;
  _Newnode->_Parent = _Wherenode;
  v7 = this->_Myhead;
  if ( _Wherenode == v7 )
  {
    v7->_Parent = _Newnode;
    this->_Myhead->_Left = _Newnode;
    this->_Myhead->_Right = _Newnode;
  }
  else if ( _Addleft )
  {
    _Wherenode->_Left = _Newnode;
    v8 = this->_Myhead;
    if ( _Wherenode == v8->_Left )
      v8->_Left = _Newnode;
  }
  else
  {
    _Wherenode->_Right = _Newnode;
    v9 = this->_Myhead;
    if ( _Wherenode == v9->_Right )
      v9->_Right = _Newnode;
  }
  v10 = _Newnode;
  while ( !v10->_Parent->_Color )
  {
    v11 = v10->_Parent;
    v12 = v11->_Parent;
    if ( v11 == v12->_Left )
    {
      v13 = v12->_Right;
      if ( v13->_Color )
      {
        if ( v10 == v11->_Right )
        {
          v10 = v10->_Parent;
          v14 = v11->_Right;
          v10->_Right = v14->_Left;
          if ( !v14->_Left->_Isnil )
            v14->_Left->_Parent = v10;
          v14->_Parent = v10->_Parent;
          v15 = this->_Myhead;
          if ( v10 == v15->_Parent )
          {
            v15->_Parent = v14;
          }
          else
          {
            v16 = v10->_Parent;
            if ( v10 == v16->_Left )
              v16->_Left = v14;
            else
              v16->_Right = v14;
          }
          v14->_Left = v10;
          v10->_Parent = v14;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Left;
        v17->_Left = v17->_Left->_Right;
        v19 = v18->_Right;
        if ( !v19->_Isnil )
          v19->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v20 = this->_Myhead;
        if ( v17 == v20->_Parent )
        {
          v20->_Parent = v18;
          v18->_Right = v17;
        }
        else
        {
          v21 = v17->_Parent;
          if ( v17 == v21->_Right )
          {
            v21->_Right = v18;
            v18->_Right = v17;
          }
          else
          {
            v21->_Left = v18;
            v18->_Right = v17;
          }
        }
LABEL_52:
        v6 = _Newnode;
        v17->_Parent = v18;
        continue;
      }
      v11->_Color = 1;
      v13->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
    else
    {
      v22 = v12->_Left;
      if ( v22->_Color )
      {
        if ( v10 == v11->_Left )
        {
          v10 = v10->_Parent;
          v23 = v11->_Left;
          v10->_Left = v23->_Right;
          v24 = v23->_Right;
          if ( !v24->_Isnil )
            v24->_Parent = v10;
          v23->_Parent = v10->_Parent;
          v25 = this->_Myhead;
          if ( v10 == v25->_Parent )
          {
            v25->_Parent = v23;
          }
          else
          {
            v26 = v10->_Parent;
            if ( v10 == v26->_Right )
              v26->_Right = v23;
            else
              v26->_Left = v23;
          }
          v23->_Right = v10;
          v10->_Parent = v23;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Right;
        v17->_Right = v18->_Left;
        if ( !v18->_Left->_Isnil )
          v18->_Left->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v27 = this->_Myhead;
        if ( v17 == v27->_Parent )
        {
          v27->_Parent = v18;
        }
        else
        {
          v28 = v17->_Parent;
          if ( v17 == v28->_Left )
            v28->_Left = v18;
          else
            v28->_Right = v18;
        }
        v18->_Left = v17;
        goto LABEL_52;
      }
      v11->_Color = 1;
      v22->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
  }
  v29 = this->_Myhead->_Parent;
  v30 = result;
  result->_Ptr = v6;
  v29->_Color = 1;
  return v30;
}

//----- (0060F310) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > *__thiscall std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::erase(std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > _Where)
{
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v3; // edi@1
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v4; // ebx@4
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v5; // eax@7
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v6; // esi@8
  std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *v7; // ecx@10
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v8; // eax@10
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v9; // eax@17
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v10; // eax@23
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v11; // ecx@29
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v12; // ecx@31
  char v13; // cl@34
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v14; // eax@38
  unsigned int v15; // eax@63
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > *v16; // eax@65
  std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *v17; // [sp+Ch] [bp-4h]@1

  v3 = _Where._Ptr;
  v17 = this;
  if ( _Where._Ptr->_Isnil )
    std::_Xout_of_range("invalid map/set<T> iterator");
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >,std::_Iterator_base0> *)&_Where._Ptr);
  if ( v3->_Left->_Isnil )
  {
    v4 = v3->_Right;
LABEL_8:
    v6 = v3->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v7 = v17;
    v8 = v17->_Myhead;
    if ( v8->_Parent == v3 )
    {
      v8->_Parent = v4;
    }
    else if ( v6->_Left == v3 )
    {
      v6->_Left = v4;
    }
    else
    {
      v6->_Right = v4;
    }
    if ( v17->_Myhead->_Left == v3 )
    {
      if ( v4->_Isnil )
      {
        v9 = v6;
      }
      else
      {
        v9 = std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Min(v4);
        v7 = v17;
      }
      v7->_Myhead->_Left = v9;
    }
    if ( v7->_Myhead->_Right == v3 )
    {
      if ( v4->_Isnil )
      {
        v7->_Myhead->_Right = v6;
      }
      else
      {
        v10 = std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Max(v4);
        v7 = v17;
        v17->_Myhead->_Right = v10;
      }
    }
    goto LABEL_35;
  }
  if ( v3->_Right->_Isnil )
  {
    v4 = v3->_Left;
    goto LABEL_8;
  }
  v5 = _Where._Ptr;
  v4 = _Where._Ptr->_Right;
  if ( _Where._Ptr == v3 )
    goto LABEL_8;
  v3->_Left->_Parent = _Where._Ptr;
  v5->_Left = v3->_Left;
  if ( v5 == v3->_Right )
  {
    v6 = v5;
  }
  else
  {
    v6 = v5->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v6->_Left = v4;
    v5->_Right = v3->_Right;
    v3->_Right->_Parent = v5;
  }
  v11 = v17->_Myhead;
  if ( v11->_Parent == v3 )
  {
    v11->_Parent = v5;
  }
  else
  {
    v12 = v3->_Parent;
    if ( v12->_Left == v3 )
      v12->_Left = v5;
    else
      v12->_Right = v5;
  }
  v5->_Parent = v3->_Parent;
  v13 = v5->_Color;
  v5->_Color = v3->_Color;
  v3->_Color = v13;
  v7 = v17;
LABEL_35:
  if ( v3->_Color == 1 )
  {
    for ( ; v4 != v7->_Myhead->_Parent; v6 = v6->_Parent )
    {
      if ( v4->_Color != 1 )
        break;
      v14 = v6->_Left;
      if ( v4 == v6->_Left )
      {
        v14 = v6->_Right;
        if ( !v14->_Color )
        {
          v14->_Color = 1;
          v6->_Color = 0;
          std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Lrotate(
            v7,
            v6);
          v14 = v6->_Right;
          v7 = v17;
        }
        if ( v14->_Isnil )
          goto LABEL_53;
        if ( v14->_Left->_Color != 1 || v14->_Right->_Color != 1 )
        {
          if ( v14->_Right->_Color == 1 )
          {
            v14->_Left->_Color = 1;
            v14->_Color = 0;
            std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Rrotate(
              v7,
              v14);
            v14 = v6->_Right;
            v7 = v17;
          }
          v14->_Color = v6->_Color;
          v6->_Color = 1;
          v14->_Right->_Color = 1;
          std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Lrotate(
            v7,
            v6);
          break;
        }
      }
      else
      {
        if ( !v14->_Color )
        {
          v14->_Color = 1;
          v6->_Color = 0;
          std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Rrotate(
            v7,
            v6);
          v14 = v6->_Left;
          v7 = v17;
        }
        if ( v14->_Isnil )
          goto LABEL_53;
        if ( v14->_Right->_Color != 1 || v14->_Left->_Color != 1 )
        {
          if ( v14->_Left->_Color == 1 )
          {
            v14->_Right->_Color = 1;
            v14->_Color = 0;
            std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Lrotate(
              v7,
              v14);
            v14 = v6->_Left;
            v7 = v17;
          }
          v14->_Color = v6->_Color;
          v6->_Color = 1;
          v14->_Left->_Color = 1;
          std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Rrotate(
            v7,
            v6);
          break;
        }
      }
      v14->_Color = 0;
LABEL_53:
      v4 = v6;
    }
    v4->_Color = 1;
  }
  if ( v3->_Myval.second.strState._Myres >= 0x10 )
    operator delete(v3->_Myval.second.strState._Bx._Ptr);
  v3->_Myval.second.strState._Myres = 15;
  v3->_Myval.second.strState._Mysize = 0;
  v3->_Myval.second.strState._Bx._Buf[0] = 0;
  if ( v3->_Myval.second.strTitle._Myres >= 0x10 )
    operator delete(v3->_Myval.second.strTitle._Bx._Ptr);
  v3->_Myval.second.strTitle._Myres = 15;
  v3->_Myval.second.strTitle._Mysize = 0;
  v3->_Myval.second.strTitle._Bx._Buf[0] = 0;
  operator delete(v3);
  v15 = v17->_Mysize;
  if ( v15 > 0 )
    v17->_Mysize = v15 - 1;
  v16 = result;
  result->_Ptr = _Where._Ptr;
  return v16;
}

//----- (0060F5B0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > > *__thiscall std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::erase(std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > > _Where)
{
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v4; // edi@4
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v5; // eax@7
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v6; // esi@8
  std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > *v7; // ecx@10
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v8; // eax@10
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v9; // eax@17
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v10; // ecx@20
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v11; // ecx@29
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v12; // ecx@31
  char v13; // cl@34
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v14; // eax@35
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *v15; // ecx@36
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v16; // eax@38
  unsigned int v17; // eax@61
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > > *v18; // eax@63
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *_Erasednode; // [sp+10h] [bp-8h]@3
  std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > *v20; // [sp+14h] [bp-4h]@1

  v3 = _Where._Ptr;
  v20 = this;
  if ( _Where._Ptr->_Isnil )
    std::_Xout_of_range("invalid map/set<T> iterator");
  _Erasednode = _Where._Ptr;
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >,std::_Iterator_base0> *)&_Where);
  if ( v3->_Left->_Isnil )
  {
    v4 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)v3->_Right;
LABEL_8:
    v6 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)v3->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v7 = v20;
    v8 = v20->_Myhead;
    if ( v8->_Parent == v3 )
    {
      v8->_Parent = (std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *)v4;
    }
    else if ( (std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *)v6->_Left == v3 )
    {
      v6->_Left = v4;
    }
    else
    {
      v6->_Right = v4;
    }
    if ( v20->_Myhead->_Left == v3 )
    {
      if ( v4->_Isnil )
      {
        v9 = v6;
      }
      else
      {
        v9 = std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Min(v4);
        v7 = v20;
      }
      v7->_Myhead->_Left = (std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *)v9;
    }
    v10 = v7->_Myhead;
    if ( v10->_Right == v3 )
    {
      if ( v4->_Isnil )
        v10->_Right = (std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *)v6;
      else
        v10->_Right = (std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *)std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Max(v4);
    }
    goto LABEL_35;
  }
  if ( v3->_Right->_Isnil )
  {
    v4 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)v3->_Left;
    goto LABEL_8;
  }
  v5 = _Where._Ptr;
  v4 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)_Where._Ptr->_Right;
  if ( _Where._Ptr == v3 )
    goto LABEL_8;
  v3->_Left->_Parent = _Where._Ptr;
  v5->_Left = v3->_Left;
  if ( v5 == v3->_Right )
  {
    v6 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)v5;
  }
  else
  {
    v6 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)v5->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v6->_Left = v4;
    v5->_Right = v3->_Right;
    v3->_Right->_Parent = v5;
  }
  v11 = v20->_Myhead;
  if ( v11->_Parent == v3 )
  {
    v11->_Parent = v5;
  }
  else
  {
    v12 = v3->_Parent;
    if ( v12->_Left == v3 )
      v12->_Left = v5;
    else
      v12->_Right = v5;
  }
  v5->_Parent = v3->_Parent;
  v13 = v5->_Color;
  v5->_Color = v3->_Color;
  v3->_Color = v13;
LABEL_35:
  v14 = _Erasednode;
  if ( _Erasednode->_Color == 1 )
  {
    v15 = (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *)v20;
    if ( v4 != (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)v20->_Myhead->_Parent )
    {
      do
      {
        if ( v4->_Color != 1 )
          break;
        v16 = v6->_Left;
        if ( v4 == v6->_Left )
        {
          v16 = v6->_Right;
          if ( !v16->_Color )
          {
            v16->_Color = 1;
            v6->_Color = 0;
            std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::_Lrotate(
              v15,
              v6);
            v16 = v6->_Right;
            v15 = (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *)v20;
          }
          if ( v16->_Isnil )
            goto LABEL_53;
          if ( v16->_Left->_Color != 1 || v16->_Right->_Color != 1 )
          {
            if ( v16->_Right->_Color == 1 )
            {
              v16->_Left->_Color = 1;
              v16->_Color = 0;
              std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::_Rrotate(
                v15,
                v16);
              v16 = v6->_Right;
              v15 = (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *)v20;
            }
            v16->_Color = v6->_Color;
            v6->_Color = 1;
            v16->_Right->_Color = 1;
            std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::_Lrotate(
              v15,
              v6);
            break;
          }
        }
        else
        {
          if ( !v16->_Color )
          {
            v16->_Color = 1;
            v6->_Color = 0;
            std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::_Rrotate(
              v15,
              v6);
            v16 = v6->_Left;
            v15 = (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *)v20;
          }
          if ( v16->_Isnil )
            goto LABEL_53;
          if ( v16->_Right->_Color != 1 || v16->_Left->_Color != 1 )
          {
            if ( v16->_Left->_Color == 1 )
            {
              v16->_Right->_Color = 1;
              v16->_Color = 0;
              std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::_Lrotate(
                v15,
                v16);
              v16 = v6->_Left;
              v15 = (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *)v20;
            }
            v16->_Color = v6->_Color;
            v6->_Color = 1;
            v16->_Left->_Color = 1;
            std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::_Rrotate(
              v15,
              v6);
            break;
          }
        }
        v16->_Color = 0;
LABEL_53:
        v4 = v6;
        v6 = v6->_Parent;
      }
      while ( v4 != v15->_Myhead->_Parent );
    }
    v14 = _Erasednode;
    v4->_Color = 1;
  }
  if ( v14->_Myval.second.strTitle._Myres >= 0x10 )
    operator delete(v14->_Myval.second.strTitle._Bx._Ptr);
  _Erasednode->_Myval.second.strTitle._Myres = 15;
  _Erasednode->_Myval.second.strTitle._Mysize = 0;
  _Erasednode->_Myval.second.strTitle._Bx._Buf[0] = 0;
  operator delete(_Erasednode);
  v17 = v20->_Mysize;
  if ( v17 )
    v20->_Mysize = v17 - 1;
  v18 = result;
  result->_Ptr = _Where._Ptr;
  return v18;
}

//----- (0060F830) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Erase(std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *this, std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *_Rootnode)
{
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *i; // edi@1
  std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *v4; // [sp+Ch] [bp-4h]@1

  v2 = _Rootnode;
  v4 = this;
  for ( i = _Rootnode; !i->_Isnil; v2 = i )
  {
    std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Erase(
      v4,
      i->_Right);
    i = i->_Left;
    if ( v2->_Myval.second.strState._Myres >= 0x10 )
      operator delete(v2->_Myval.second.strState._Bx._Ptr);
    v2->_Myval.second.strState._Myres = 15;
    v2->_Myval.second.strState._Mysize = 0;
    v2->_Myval.second.strState._Bx._Buf[0] = 0;
    if ( v2->_Myval.second.strTitle._Myres >= 0x10 )
      operator delete(v2->_Myval.second.strTitle._Bx._Ptr);
    v2->_Myval.second.strTitle._Myres = 15;
    v2->_Myval.second.strTitle._Mysize = 0;
    v2->_Myval.second.strTitle._Bx._Buf[0] = 0;
    operator delete(v2);
  }
}

//----- (0060F8B0) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::_Erase(std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > *this, std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *_Rootnode)
{
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v2; // esi@1
  std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *i; // edi@1

  v2 = _Rootnode;
  v3 = this;
  for ( i = _Rootnode; !i->_Isnil; v2 = i )
  {
    std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::_Erase(
      v3,
      i->_Right);
    i = i->_Left;
    if ( v2->_Myval.second.strTitle._Myres >= 0x10 )
      operator delete(v2->_Myval.second.strTitle._Bx._Ptr);
    v2->_Myval.second.strTitle._Myres = 15;
    v2->_Myval.second.strTitle._Mysize = 0;
    v2->_Myval.second.strTitle._Bx._Buf[0] = 0;
    operator delete(v2);
  }
}

//----- (0060F910) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Buynode<std::pair<int,CQuestWin2::QData>>(std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *this, std::pair<int,CQuestWin2::QData> *_Val)
{
  std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *v2; // edi@1
  void *v3; // eax@1
  void *v4; // esi@1
  int *v5; // eax@2
  CQuestWin2::QData *v6; // ST04_4@3
  int v8; // [sp+0h] [bp-38h]@1
  std::exception pExceptionObject; // [sp+10h] [bp-28h]@5
  char *v10; // [sp+1Ch] [bp-1Ch]@2
  char *v11; // [sp+20h] [bp-18h]@2
  void *p; // [sp+24h] [bp-14h]@1
  int *v13; // [sp+28h] [bp-10h]@1
  int v14; // [sp+34h] [bp-4h]@2

  v13 = &v8;
  v2 = this;
  v3 = operator new(0x6Cu);
  v4 = v3;
  p = v3;
  if ( !v3 )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  *(_DWORD *)v3 = v2->_Myhead;
  *((_DWORD *)v3 + 1) = v2->_Myhead;
  *((_DWORD *)v3 + 2) = v2->_Myhead;
  v5 = (int *)((char *)v3 + 12);
  *((_WORD *)v4 + 52) = 0;
  v14 = 0;
  v11 = (char *)v4 + 12;
  v10 = (char *)v4 + 12;
  LOBYTE(v14) = 1;
  if ( v4 != (void *)-12 )
  {
    v6 = &_Val->second;
    *v5 = _Val->first;
    CQuestWin2::QData::QData((CQuestWin2::QData *)((char *)v4 + 16), v6);
  }
  return (std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *)v4;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0060F9E0) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::_Buynode<std::pair<int,EpicQuestWin::QData>>(std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > *this, std::pair<int,EpicQuestWin::QData> *_Val)
{
  std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > *v2; // edi@1
  void *v3; // esi@1
  int v5; // [sp+0h] [bp-38h]@1
  std::exception pExceptionObject; // [sp+10h] [bp-28h]@5
  char *v7; // [sp+1Ch] [bp-1Ch]@2
  char *v8; // [sp+20h] [bp-18h]@2
  void *p; // [sp+24h] [bp-14h]@1
  int *v10; // [sp+28h] [bp-10h]@1
  int v11; // [sp+34h] [bp-4h]@2

  v10 = &v5;
  v2 = this;
  v3 = operator new(0x48u);
  p = v3;
  if ( !v3 )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  *(_DWORD *)v3 = v2->_Myhead;
  *((_DWORD *)v3 + 1) = v2->_Myhead;
  *((_DWORD *)v3 + 2) = v2->_Myhead;
  *((_WORD *)v3 + 34) = 0;
  v11 = 0;
  v8 = (char *)v3 + 12;
  v7 = (char *)v3 + 12;
  LOBYTE(v11) = 1;
  if ( v3 != (void *)-12 )
    std::pair<int const,EpicQuestWin::QData>::pair<int const,EpicQuestWin::QData>(
      (std::pair<int const ,EpicQuestWin::QData> *)((char *)v3 + 12),
      _Val);
  return (std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *)v3;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0060FAB0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > *__thiscall std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::erase(std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > _Last)
{
  std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v6; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node **v7; // ecx@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > *v8; // eax@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > v9; // edx@5
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v10; // eax@6
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v11; // ecx@7
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *j; // eax@7
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *i; // eax@10
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > v14; // [sp+4h] [bp-4h]@14

  v4 = this;
  v5 = this->_Myhead;
  v6 = _First._Ptr;
  if ( _First._Ptr != v5->_Left || _Last._Ptr != v5 )
  {
    for ( ; _First._Ptr != _Last._Ptr; v6 = _First._Ptr )
    {
      v9._Ptr = v6;
      if ( !v6->_Isnil )
      {
        v10 = v6->_Right;
        if ( v10->_Isnil )
        {
          for ( i = v6->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v6 != i->_Right )
              break;
            v6 = i;
          }
          _First._Ptr = i;
        }
        else
        {
          v11 = v6->_Right;
          for ( j = v10->_Left; !j->_Isnil; j = j->_Left )
            v11 = j;
          _First._Ptr = v11;
        }
      }
      std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::erase(
        v4,
        &v14,
        v9);
    }
    v8 = result;
    result->_Ptr = v6;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Erase(
      v4,
      v5->_Parent);
    v4->_Myhead->_Parent = v4->_Myhead;
    v4->_Myhead->_Left = v4->_Myhead;
    v4->_Myhead->_Right = v4->_Myhead;
    v7 = &v4->_Myhead->_Left;
    v8 = result;
    v4->_Mysize = 0;
    result->_Ptr = *v7;
  }
  return v8;
}

//----- (0060FB70) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > > *__thiscall std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::erase(std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > > _Last)
{
  std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v6; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node **v7; // ecx@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > > *v8; // eax@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > > v9; // edx@5
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v10; // eax@6
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v11; // ecx@7
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *j; // eax@7
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *i; // eax@10
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > > v14; // [sp+4h] [bp-4h]@14

  v4 = this;
  v5 = this->_Myhead;
  v6 = _First._Ptr;
  if ( _First._Ptr != v5->_Left || _Last._Ptr != v5 )
  {
    for ( ; _First._Ptr != _Last._Ptr; v6 = _First._Ptr )
    {
      v9._Ptr = v6;
      if ( !v6->_Isnil )
      {
        v10 = v6->_Right;
        if ( v10->_Isnil )
        {
          for ( i = v6->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v6 != i->_Right )
              break;
            v6 = i;
          }
          _First._Ptr = i;
        }
        else
        {
          v11 = v6->_Right;
          for ( j = v10->_Left; !j->_Isnil; j = j->_Left )
            v11 = j;
          _First._Ptr = v11;
        }
      }
      std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::erase(
        v4,
        &v14,
        v9);
    }
    v8 = result;
    result->_Ptr = v6;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::_Erase(
      v4,
      v5->_Parent);
    v4->_Myhead->_Parent = v4->_Myhead;
    v4->_Myhead->_Left = v4->_Myhead;
    v4->_Myhead->_Right = v4->_Myhead;
    v7 = &v4->_Myhead->_Left;
    v8 = result;
    v4->_Mysize = 0;
    result->_Ptr = *v7;
  }
  return v8;
}

//----- (0060FC30) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::insert<std::pair<int,CQuestWin2::QData>>(std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > >,bool> *result, std::pair<int,CQuestWin2::QData> *_Val)
{
  std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v4; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v5; // edx@1
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v6; // ecx@1
  bool v7; // zf@1
  int v8; // edi@2
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v9; // ecx@7
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > >,bool> *v10; // eax@7

  v3 = this;
  v4 = std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Buynode<std::pair<int,CQuestWin2::QData>>(
         (std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *)&this->comp,
         _Val);
  v5 = v3->_Myhead;
  v6 = v5->_Parent;
  v7 = v6->_Isnil == 0;
  LOBYTE(_Val) = 1;
  if ( v7 )
  {
    v8 = v4->_Myval.first;
    do
    {
      v5 = v6;
      LOBYTE(_Val) = v8 < v6->_Myval.first;
      if ( (_BYTE)_Val )
        v6 = v6->_Left;
      else
        v6 = v6->_Right;
    }
    while ( !v6->_Isnil );
  }
  v9 = std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::_Insert(
         v3,
         (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > *)&_Val,
         (bool)_Val,
         v5,
         v4)->_Ptr;
  v10 = result;
  result->first._Ptr = v9;
  result->second = 1;
  return v10;
}

//----- (0060FCA0) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::insert<std::pair<int,EpicQuestWin::QData>>(std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > >,bool> *result, std::pair<int,EpicQuestWin::QData> *_Val)
{
  std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v4; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v5; // edx@1
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v6; // ecx@1
  bool v7; // zf@1
  int v8; // edi@2
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v9; // ecx@7
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > >,bool> *v10; // eax@7

  v3 = this;
  v4 = std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::_Buynode<std::pair<int,EpicQuestWin::QData>>(
         (std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > *)&this->comp,
         _Val);
  v5 = v3->_Myhead;
  v6 = v5->_Parent;
  v7 = v6->_Isnil == 0;
  LOBYTE(_Val) = 1;
  if ( v7 )
  {
    v8 = v4->_Myval.first;
    do
    {
      v5 = v6;
      LOBYTE(_Val) = v8 < v6->_Myval.first;
      if ( (_BYTE)_Val )
        v6 = v6->_Left;
      else
        v6 = v6->_Right;
    }
    while ( !v6->_Isnil );
  }
  v9 = std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::_Insert(
         v3,
         (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > > *)&_Val,
         (bool)_Val,
         v5,
         v4)->_Ptr;
  v10 = result;
  result->first._Ptr = v9;
  result->second = 1;
  return v10;
}

//----- (0060FD10) --------------------------------------------------------
void __thiscall std::multimap<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>>::~multimap<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>>(std::multimap<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> > > *this)
{
  std::multimap<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> > > *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> >::_Node *v2; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > v3; // ST04_4@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > > result; // [sp+8h] [bp-14h]@1
  std::multimap<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> > > *v5; // [sp+Ch] [bp-10h]@1
  int v6; // [sp+18h] [bp-4h]@1

  v1 = this;
  v5 = this;
  v2 = this->_Myhead;
  v3._Ptr = v2->_Left;
  v6 = 0;
  std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const,CQuestWin2::QData>>,1>>::erase(
    (std::_Tree<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > *)&this->comp,
    &result,
    v3,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,CQuestWin2::QData,std::less<int>,std::allocator<std::pair<int const ,CQuestWin2::QData> >,1> > >)v2);
  operator delete(v1->_Myhead);
}

//----- (0060FD70) --------------------------------------------------------
void __thiscall std::multimap<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>>::~multimap<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>>(std::multimap<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> > > *this)
{
  std::multimap<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> > > *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> >::_Node *v2; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > > v3; // ST04_4@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > > result; // [sp+8h] [bp-14h]@1
  std::multimap<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> > > *v5; // [sp+Ch] [bp-10h]@1
  int v6; // [sp+18h] [bp-4h]@1

  v1 = this;
  v5 = this;
  v2 = this->_Myhead;
  v3._Ptr = v2->_Left;
  v6 = 0;
  std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::erase(
    (std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > *)&this->comp,
    &result,
    v3,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const ,EpicQuestWin::QData> >,1> > >)v2);
  operator delete(v1->_Myhead);
}

//----- (0060FDD0) --------------------------------------------------------
void __thiscall MonsterCardInventoryWin::OnQuit(MonsterCardInventoryWin *this)
{
  PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
}

//----- (0060FDE0) --------------------------------------------------------
void __thiscall MonsterCardInventoryWin::ResetPage(MonsterCardInventoryWin *this)
{
  ItemIcon **v1; // esi@1
  signed int v2; // edi@1

  v1 = this->m_pkCardListIcon;
  v2 = 20;
  do
  {
    ItemIcon::SetItem(*v1, 0, 1);
    ++v1;
    --v2;
  }
  while ( v2 );
}

//----- (0060FE30) --------------------------------------------------------
int __thiscall MonsterCardInventoryWin::GetSelectPageFirstIndex(MonsterCardInventoryWin *this)
{
  return 20 * (this->m_nSelectTabNumber + 10 * this->m_nSelectAttiributeTabNumber);
}

//----- (0060FE50) --------------------------------------------------------
void __thiscall MonsterCardInventoryWin::UpdateMeWin(MonsterCardInventoryWin *this, float fCurTime)
{
  this->m_bDroppable = 1;
}

//----- (0060FE60) --------------------------------------------------------
void __thiscall MonsterCardInventoryWin::SetCardInfo(MonsterCardInventoryWin *this, unsigned __int16 test)
{
  MonsterCardInventoryWin *v2; // esi@1
  PgSpr *v3; // eax@1
  PgSprData *v4; // eax@2
  NiScreenElementsData *v5; // edi@4

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkMonFace->vfptr[113].__vecDelDtor)(this->m_spEmptyPortraitTexture.m_pObject);
  v3 = v2->m_pkMonFace->m_spSpr.m_pObject;
  if ( v3 )
    v4 = v3->m_spSprData.m_pObject;
  else
    v4 = 0;
  v5 = v4->m_akGeomData.m_pBase->m_pObject;
  NiScreenElementsData::SetTexture(v4->m_akGeomData.m_pBase->m_pObject, 0, 0, 0, &v2->m_ptLeftUp);
  NiScreenElementsData::SetTexture(v5, 0, 1, 0, &v2->m_ptLeftDown);
  NiScreenElementsData::SetTexture(v5, 0, 2, 0, &v2->m_ptRightDown);
  NiScreenElementsData::SetTexture(v5, 0, 3, 0, &v2->m_ptRightUp);
}

//----- (0060FEF0) --------------------------------------------------------
void __thiscall MonsterCardInventoryWin::ViewItemUpdate(MonsterCardInventoryWin *this, int nTab, int nAttributeTab)
{
  MonsterCardInventoryWin *v3; // esi@1
  ItemIcon **v4; // edi@2
  signed int v5; // ebx@2
  unsigned int v6; // edi@4
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned short,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,unsigned short> >,0> >::_Node *v7; // edx@4
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned short,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,unsigned short> >,0> >::_Node *v8; // ecx@4
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned short,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,unsigned short> >,0> >::_Node *v9; // eax@5
  unsigned int v10; // eax@11
  unsigned int FirstIndex; // [sp+4h] [bp-8h]@4
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned short,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,unsigned short> >,0> > > iter; // [sp+8h] [bp-4h]@4

  v3 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[65].__vecDelDtor)() )
  {
    v4 = v3->m_pkCardListIcon;
    v5 = 20;
    do
    {
      ItemIcon::SetItem(*v4, 0, 1);
      ++v4;
      --v5;
    }
    while ( v5 );
    v6 = 20 * (v3->m_nSelectTabNumber + 10 * v3->m_nSelectAttiributeTabNumber);
    FirstIndex = 20 * (v3->m_nSelectTabNumber + 10 * v3->m_nSelectAttiributeTabNumber);
    std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::find(
      (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v3->m_mapCardList,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&iter,
      &FirstIndex);
    v7 = v3->m_mapCardList._Myhead;
    v8 = iter._Ptr;
    if ( iter._Ptr != v7 )
      goto LABEL_15;
    v9 = v7->_Parent;
    v8 = v3->m_mapCardList._Myhead;
    while ( !v9->_Isnil )
    {
      if ( v6 >= v9->_Myval.first )
      {
        v9 = v9->_Right;
      }
      else
      {
        v8 = v9;
        v9 = v9->_Left;
      }
    }
    iter._Ptr = v8;
    if ( v8 != v7 )
    {
LABEL_15:
      do
      {
        v10 = v8->_Myval.first;
        if ( v10 >= v6 + 20 )
          break;
        ItemIcon::SetItemAsID(v3->m_pkCardListIcon[v10 - v6], v6, v8->_Myval.second);
        std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const,int>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&iter);
        v8 = iter._Ptr;
      }
      while ( iter._Ptr != v3->m_mapCardList._Myhead );
    }
  }
}

//----- (0060FFD0) --------------------------------------------------------
void __thiscall MonsterCardInventoryWin::SelectTab(MonsterCardInventoryWin *this, int nTab)
{
  int v2; // ST04_4@1

  v2 = this->m_nSelectAttiributeTabNumber;
  this->m_nSelectTabNumber = nTab;
  MonsterCardInventoryWin::ViewItemUpdate(this, nTab, v2);
}

//----- (0060FFF0) --------------------------------------------------------
void __thiscall MonsterCardInventoryWin::SelectAttributeTab(MonsterCardInventoryWin *this, int nAttributeTab)
{
  this->m_nSelectAttiributeTabNumber = nAttributeTab;
  MonsterCardInventoryWin::ViewItemUpdate(this, this->m_nSelectTabNumber, nAttributeTab);
}

//----- (00610010) --------------------------------------------------------
void __thiscall MonsterCardInventoryWin::AddItem(MonsterCardInventoryWin *this, unsigned __int16 nitemID)
{
  MonsterCardInventoryWin *v2; // esi@1
  unsigned int v3; // edi@2
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v4; // eax@4
  int v5; // ecx@4
  int v6; // edx@4
  unsigned int v7; // eax@4
  std::pair<unsigned int,unsigned short> _Val; // [sp+8h] [bp-8h]@3

  v2 = this;
  if ( this->m_mapCardList._Mysize )
  {
    *(_DWORD *)&_Val.second = this->m_mapCardList._Myhead;
    std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,GuildNameCache::GuildNameStorage *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,GuildNameCache::GuildNameStorage *>>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&_Val.second);
    v3 = *(_DWORD *)(*(_DWORD *)&_Val.second + 12) + 1;
  }
  else
  {
    v3 = 0;
  }
  _Val.first = v3;
  _Val.second = nitemID;
  v4 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned short,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,unsigned short>>,0>>::_Buynode<std::pair<unsigned int,unsigned short>>((std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned short,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,unsigned short> >,0> > *)&v2->m_mapCardList.comp, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->m_mapCardList,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >,bool> *)&_Val,
    v4,
    0);
  v5 = v2->m_nSelectAttiributeTabNumber;
  v6 = v2->m_nSelectTabNumber;
  v7 = 20 * (v6 + 10 * v5);
  if ( v7 <= v3 && v3 < v7 + 20 )
    MonsterCardInventoryWin::ViewItemUpdate(v2, v6, v5);
}

//----- (006100B0) --------------------------------------------------------
void __thiscall MonsterCardInventoryWin::~MonsterCardInventoryWin(MonsterCardInventoryWin *this)
{
  MonsterCardInventoryWin *v1; // esi@1
  NiTexture *v2; // edi@1
  NiTexture *v3; // edi@6
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v4; // ST08_4@10
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v5; // ST04_4@10
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > result; // [sp+10h] [bp-18h]@10
  std::map<unsigned int,unsigned short,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,unsigned short> > > *v7; // [sp+14h] [bp-14h]@10
  MonsterCardInventoryWin *v8; // [sp+18h] [bp-10h]@1
  int v9; // [sp+24h] [bp-4h]@1

  v1 = this;
  v8 = this;
  this->vfptr = (NiRefObjectVtbl *)&MonsterCardInventoryWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MonsterCardInventoryWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spEmptyPortraitTexture.m_pObject;
  v9 = 2;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spEmptyPortraitTexture.m_pObject = 0;
  }
  v3 = v1->m_spEmptyPortraitTexture.m_pObject;
  LOBYTE(v9) = 1;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v7 = &v1->m_mapCardList;
  v4._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapCardList._Myhead;
  v5._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapCardList._Myhead->_Left;
  LOBYTE(v9) = 3;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapCardList,
    &result,
    v5,
    v4);
  operator delete(v1->m_mapCardList._Myhead);
  v9 = -1;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9B69C4: using guessed type void (__thiscall *MonsterCardInventoryWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B69E4: using guessed type int (__thiscall *MonsterCardInventoryWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006101A0) --------------------------------------------------------
void __thiscall MonsterCardInventoryWin::OnShowWin(MonsterCardInventoryWin *this)
{
  MonsterCardInventoryWin *v1; // esi@1
  unsigned int v2; // edi@1

  v1 = this;
  this->m_pkMonsterCardHaveListWin->m_nViewStartPos = 0;
  v2 = 0;
  do
    MonsterCardInventoryWin::AddItem(v1, v2++ + 3);
  while ( v2 < 0x1E );
  MonsterCardInventoryWin::ViewItemUpdate(v1, v1->m_nSelectTabNumber, v1->m_nSelectAttiributeTabNumber);
  MonsterCardInventoryWin::SetCardInfo(v1, 0);
  NiAVObject::Update((NiAVObject *)&v1->vfptr, 0.0, 1);
}

//----- (00610200) --------------------------------------------------------
void __thiscall MonsterCardInventoryWin::MonsterCardInventoryWin(MonsterCardInventoryWin *this)
{
  MonsterCardInventoryWin *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned short,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,unsigned short> >,0> >::_Node *v2; // eax@1
  std::exception pExceptionObject; // [sp+Ch] [bp-20h]@3
  MonsterCardInventoryWin *v4; // [sp+18h] [bp-14h]@1
  char *_What; // [sp+1Ch] [bp-10h]@3
  int v6; // [sp+28h] [bp-4h]@1

  v1 = this;
  v4 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&MonsterCardInventoryWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MonsterCardInventoryWin::`vftable'{for `IDirectMessenger'};
  v6 = 0;
  v1->m_mapCardList._Mysize = 0;
  v2 = (std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned short,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,unsigned short> >,0> >::_Node *)operator new(0x18u);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_mapCardList._Myhead = v2;
  v2->_Left = v2;
  v1->m_mapCardList._Myhead->_Parent = v1->m_mapCardList._Myhead;
  v1->m_mapCardList._Myhead->_Right = v1->m_mapCardList._Myhead;
  v1->m_mapCardList._Myhead->_Color = 1;
  v1->m_mapCardList._Myhead->_Isnil = 1;
  v1->m_nSelectTabNumber = 0;
  v1->m_nSelectAttiributeTabNumber = 0;
  v1->m_bActiveListViewEnable = 0;
  v1->m_spEmptyPortraitTexture.m_pObject = 0;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9B69C4: using guessed type void (__thiscall *MonsterCardInventoryWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B69E4: using guessed type int (__thiscall *MonsterCardInventoryWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006102E0) --------------------------------------------------------
MonsterCardInventoryWin *__cdecl MonsterCardInventoryWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  MonsterCardInventoryWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x200u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    MonsterCardInventoryWin::MonsterCardInventoryWin((MonsterCardInventoryWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (MonsterCardInventoryWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00610410) --------------------------------------------------------
void __thiscall MonsterCardInventoryWin::ActiveListViewEnable(MonsterCardInventoryWin *this, int bEnable)
{
  MonsterCardInventoryWin *v2; // esi@1
  void *(__thiscall *v3)(NiRefObject *, unsigned int); // edx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned short,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,unsigned short> >,0> >::_Node **v4; // eax@2
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned short,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,unsigned short> >,0> >::_Node *v5; // edi@2
  int v6; // edx@5
  unsigned __int16 v7; // ST10_2@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v8; // eax@5
  bool v9; // cf@5
  signed int v10; // eax@9
  int v11; // ebx@12
  unsigned int v12; // eax@13
  int v13; // esi@16
  void (__thiscall ***v14)(_DWORD, _DWORD); // esi@16
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned short,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,unsigned short> >,0> >::_Node *v15; // ecx@21
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned short,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,unsigned short> >,0> >::_Node *v16; // eax@22
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned short,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,unsigned short> >,0> >::_Node *i; // eax@25
  std::basic_stringstream<char,std::char_traits<char>,std::allocator<char> > sstr; // [sp+1Ch] [bp-E4h]@3
  std::_Lockit v19; // [sp+C4h] [bp-3Ch]@13
  void *p; // [sp+C8h] [bp-38h]@11
  int v21; // [sp+CCh] [bp-34h]@1
  MonsterCardInventoryWin *v22; // [sp+D0h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+D4h] [bp-2Ch]@5
  int v24; // [sp+FCh] [bp-4h]@3

  v2 = this;
  v21 = 0;
  v3 = this->m_pkListViewBackGround->vfptr[60].__vecDelDtor;
  v22 = this;
  ((void (__stdcall *)(int))v3)(bEnable);
  ((void (__stdcall *)(int))v2->m_pkListViewBackGround->vfptr[64].__vecDelDtor)(bEnable);
  ((void (__stdcall *)(int))v2->m_pkMonsterCardHaveListWin->vfptr[60].__vecDelDtor)(bEnable);
  ((void (__stdcall *)(int))v2->m_pkMonsterCardHaveListWin->vfptr[64].__vecDelDtor)(bEnable);
  ((void (__stdcall *)(int))v2->m_pkMonsterCardHaveListSlideBar->vfptr[60].__vecDelDtor)(bEnable);
  ((void (__stdcall *)(int))v2->m_pkMonsterCardHaveListSlideBar->vfptr[64].__vecDelDtor)(bEnable);
  if ( (_BYTE)bEnable )
  {
    SlideListWin::RemoveAllList(v2->m_pkMonsterCardHaveListWin);
    v4 = &v2->m_mapCardList._Myhead->_Left;
    v5 = *v4;
    if ( (std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned short,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,unsigned short> >,0> >::_Node **)*v4 != v4 )
    {
      do
      {
        *(_DWORD *)&sstr.gap0[0] = &std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::`vbtable'{for `std::basic_istream<char,std::char_traits<char>>'};
        *(_DWORD *)&sstr.gap10[0] = &std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::`vbtable'{for `std::basic_ostream<char,std::char_traits<char>>'};
        v21 |= 1u;
        v24 = 0;
        *(_DWORD *)&sstr.gap60[0] = &std::basic_istream<char,std::char_traits<char>>::`vftable';
        sstr._Chcount = 0i64;
        std::ios_base::_Init((std::ios_base *)sstr.gap60);
        *(_DWORD *)&sstr.gap60[56] = (char *)&sstr + 24;
        *(_DWORD *)&sstr.gap60[60] = 0;
        sstr.gap60[64] = std::basic_ios<char,std::char_traits<char>>::widen(
                           (std::basic_ios<char,std::char_traits<char> > *)sstr.gap60,
                           32);
        if ( !*(_DWORD *)&sstr.gap60[56] )
          std::ios_base::clear((std::ios_base *)sstr.gap60, *(_DWORD *)&sstr.gap60[12] | 4, 0);
        *(_DWORD *)&sstr.gap10[*(_DWORD *)(*(_DWORD *)&sstr.gap10[0] + 4)] = &std::basic_ostream<char,std::char_traits<char>>::`vftable';
        *(_DWORD *)&sstr.gap0[*(_DWORD *)(*(_DWORD *)&sstr.gap0[0] + 4)] = &std::basic_iostream<char,std::char_traits<char>>::`vftable';
        v6 = *(_DWORD *)(*(_DWORD *)&sstr.gap0[0] + 4);
        v24 = 5;
        *(_DWORD *)&sstr.gap0[v6] = &std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::`vftable';
        std::basic_streambuf<char,std::char_traits<char>>::basic_streambuf<char,std::char_traits<char>>((std::basic_streambuf<char,std::char_traits<char> > *)&sstr.gap10[8]);
        *(_DWORD *)&sstr.gap10[8] = &std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::`vftable';
        *(_DWORD *)&sstr.gap10[68] = 0;
        *(_DWORD *)&sstr.88[0] = 0;
        v7 = v5->_Myval.second;
        v24 = 7;
        std::basic_ostream<char,std::char_traits<char>>::operator<<(
          (std::basic_ostream<char,std::char_traits<char> > *)sstr.gap10,
          v7);
        v8 = std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(&sstr, &result);
        v9 = v8->_Myres < 0x10;
        LOBYTE(v24) = 8;
        if ( !v9 )
          v8 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v8->_Bx._Ptr;
        SlideListWin::AddText(v2->m_pkMonsterCardHaveListWin, v8->_Bx._Buf);
        LOBYTE(v24) = 7;
        if ( result._Myres >= 0x10 )
          operator delete(result._Bx._Ptr);
        v10 = SlideListWin::GetItemSize(v2->m_pkMonsterCardHaveListWin);
        SlideListWin::SetFontColor(v2->m_pkMonsterCardHaveListWin, v10 - 1, 0, 0, 0, 0);
        *(_DWORD *)&sstr.gap0[*(_DWORD *)(*(_DWORD *)&sstr.gap0[0] + 4)] = &std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::`vftable';
        v24 = 9;
        *(_DWORD *)&sstr.gap10[8] = &std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::`vftable';
        if ( sstr.88[0] & 1 )
          operator delete(**(void ***)&sstr.gap10[24]);
        **(_DWORD **)&sstr.gap10[24] = 0;
        **(_DWORD **)&sstr.gap10[40] = 0;
        **(_DWORD **)&sstr.gap10[56] = 0;
        **(_DWORD **)&sstr.gap10[28] = 0;
        **(_DWORD **)&sstr.gap10[44] = 0;
        **(_DWORD **)&sstr.gap10[60] = 0;
        *(_DWORD *)&sstr.88[0] &= 0xFFFFFFFE;
        *(_DWORD *)&sstr.gap10[68] = 0;
        *(_DWORD *)&sstr.gap10[8] = &std::basic_streambuf<char,std::char_traits<char>>::`vftable';
        LOBYTE(v24) = 10;
        p = *(void **)&sstr.gap10[64];
        if ( *(_DWORD *)&sstr.gap10[64] )
        {
          v11 = **(_DWORD **)&sstr.gap10[64];
          if ( **(_DWORD **)&sstr.gap10[64] )
          {
            std::_Lockit::_Lockit(&v19, 0);
            v12 = *(_DWORD *)(v11 + 4);
            if ( v12 && v12 < 0xFFFFFFFF )
              *(_DWORD *)(v11 + 4) = v12 - 1;
            v13 = -(*(_DWORD *)(v11 + 4) == 0);
            std::_Lockit::~_Lockit(&v19);
            v14 = (void (__thiscall ***)(_DWORD, _DWORD))(v11 & v13);
            if ( v14 )
              (**v14)(v14, 1);
            v2 = v22;
          }
          operator delete(p);
        }
        LOBYTE(v24) = 9;
        std::_Mutex::~_Mutex((std::_Mutex *)&sstr.gap10[12]);
        *(_DWORD *)&sstr.gap0[*(_DWORD *)(*(_DWORD *)&sstr.gap0[0] + 4)] = &std::basic_iostream<char,std::char_traits<char>>::`vftable';
        *(_DWORD *)&sstr.gap10[*(_DWORD *)(*(_DWORD *)&sstr.gap10[0] + 4)] = &std::basic_ostream<char,std::char_traits<char>>::`vftable';
        *(_DWORD *)&sstr.gap0[*(_DWORD *)(*(_DWORD *)&sstr.gap0[0] + 4)] = &std::basic_istream<char,std::char_traits<char>>::`vftable';
        v24 = -1;
        *(_DWORD *)&sstr.gap60[0] = &std::ios_base::`vftable';
        std::ios_base::_Ios_base_dtor((std::ios_base *)sstr.gap60);
        if ( !v5->_Isnil )
        {
          v15 = v5->_Right;
          if ( v15->_Isnil )
          {
            for ( i = v5->_Parent; !i->_Isnil; i = i->_Parent )
            {
              if ( v5 != i->_Right )
                break;
              v5 = i;
            }
            v5 = i;
          }
          else
          {
            v16 = v15->_Left;
            if ( !v15->_Left->_Isnil )
            {
              do
              {
                v15 = v16;
                v16 = v16->_Left;
              }
              while ( !v16->_Isnil );
            }
            v5 = v15;
          }
        }
      }
      while ( v5 != v2->m_mapCardList._Myhead );
    }
    SlideBar::SetSplitCnt(v2->m_pkMonsterCardHaveListSlideBar, v2->m_pkMonsterCardHaveListWin->m_nSlideSplitCnt);
    SlideListWin::UpdateViewList(v2->m_pkMonsterCardHaveListWin);
  }
}
// 97F0E0: using guessed type int (__thiscall *std::ios_base::`vftable')(void *p, char);
// 97F0E8: using guessed type int (__stdcall *std::basic_istream<char,std::char_traits<char>>::`vftable')(char);
// 97F1A4: using guessed type int (__thiscall *std::basic_streambuf<char,std::char_traits<char>>::`vftable')(void *p, char);
// 9B68D4: using guessed type int (__stdcall *std::basic_ostream<char,std::char_traits<char>>::`vftable')(char);
// 9B68DC: using guessed type int (__stdcall *std::basic_iostream<char,std::char_traits<char>>::`vftable')(char);
// 9B68E4: using guessed type int (__thiscall *std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::`vftable')(void *p, char);
// 9B6978: using guessed type int (__stdcall *std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::`vftable')(char);

//----- (00610820) --------------------------------------------------------
void __thiscall MonsterCardInventoryWin::SelectIconItem(MonsterCardInventoryWin *this, int nIndex)
{
  MonsterCardInventoryWin *v2; // ebx@1
  NiRefObjectVtbl *v3; // esi@1
  NiSourceTexture *v4; // eax@1
  PgSpr *v5; // eax@1
  PgSprData *v6; // eax@2
  NiScreenElementsData *v7; // esi@4
  int v8; // esi@4
  int v9; // esi@5
  int *v10; // eax@8
  int v11; // eax@13
  std::basic_ostream<char,std::char_traits<char> > *v12; // eax@13
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v13; // eax@13
  std::basic_stringstream<char,std::char_traits<char>,std::allocator<char> > sstr; // [sp+14h] [bp-DCh]@11
  NiPoint2 kValue; // [sp+BCh] [bp-34h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+C4h] [bp-2Ch]@13
  int v17; // [sp+ECh] [bp-4h]@11

  LODWORD(kValue.y) = 0;
  v2 = this;
  v3 = this->m_pkMonFace->vfptr;
  v4 = PortraitTextureBuffer::GetMainCharPortrait(g_pkMainChar);
  v3[113].__vecDelDtor((NiRefObject *)v2->m_pkMonFace, (unsigned int)v4);
  v5 = v2->m_pkMonFace->m_spSpr.m_pObject;
  if ( v5 )
    v6 = v5->m_spSprData.m_pObject;
  else
    v6 = 0;
  v7 = v6->m_akGeomData.m_pBase->m_pObject;
  kValue.x = 0.0;
  kValue.y = 0.0;
  NiScreenElementsData::SetTexture(v7, 0, 0, 0, &kValue);
  kValue.x = 0.0;
  kValue.y = 1.0;
  NiScreenElementsData::SetTexture(v7, 0, 1, 0, &kValue);
  kValue.x = 1.0;
  kValue.y = 1.0;
  NiScreenElementsData::SetTexture(v7, 0, 2, 0, &kValue);
  kValue.x = 1.0;
  kValue.y = 0.0;
  NiScreenElementsData::SetTexture(v7, 0, 3, 0, &kValue);
  v8 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                          ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                          nIndex) )
  {
    if ( (unsigned __int16)nIndex <= *(_WORD *)(v8 + 200) )
    {
      v10 = (int *)(*(_DWORD *)(v8 + 196) + 4 * (unsigned __int16)nIndex);
      if ( *v10 )
        v9 = *v10;
      else
        v9 = 0;
    }
    else
    {
      v9 = 0;
    }
  }
  else
  {
    v9 = 0;
  }
  *(_DWORD *)&sstr.gap0[0] = &std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::`vbtable'{for `std::basic_istream<char,std::char_traits<char>>'};
  *(_DWORD *)&sstr.gap10[0] = &std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::`vbtable'{for `std::basic_ostream<char,std::char_traits<char>>'};
  v17 = 0;
  LODWORD(kValue.y) = 1;
  *(_DWORD *)&sstr.gap60[0] = &std::basic_istream<char,std::char_traits<char>>::`vftable';
  sstr._Chcount = 0i64;
  std::ios_base::_Init((std::ios_base *)sstr.gap60);
  *(_DWORD *)&sstr.gap60[56] = (char *)&sstr + 24;
  *(_DWORD *)&sstr.gap60[60] = 0;
  sstr.gap60[64] = std::basic_ios<char,std::char_traits<char>>::widen(
                     (std::basic_ios<char,std::char_traits<char> > *)sstr.gap60,
                     32);
  if ( !*(_DWORD *)&sstr.gap60[56] )
    std::ios_base::clear((std::ios_base *)sstr.gap60, *(_DWORD *)&sstr.gap60[12] | 4, 0);
  *(_DWORD *)&sstr.gap10[*(_DWORD *)(*(_DWORD *)&sstr.gap10[0] + 4)] = &std::basic_ostream<char,std::char_traits<char>>::`vftable';
  *(_DWORD *)&sstr.gap0[*(_DWORD *)(*(_DWORD *)&sstr.gap0[0] + 4)] = &std::basic_iostream<char,std::char_traits<char>>::`vftable';
  v11 = *(_DWORD *)(*(_DWORD *)&sstr.gap0[0] + 4);
  v17 = 5;
  *(_DWORD *)&sstr.gap0[v11] = &std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::`vftable';
  std::basic_streambuf<char,std::char_traits<char>>::basic_streambuf<char,std::char_traits<char>>((std::basic_streambuf<char,std::char_traits<char> > *)&sstr.gap10[8]);
  *(_DWORD *)&sstr.gap10[8] = &std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::`vftable';
  *(_DWORD *)&sstr.gap10[68] = 0;
  *(_DWORD *)&sstr.88[0] = 0;
  v17 = 7;
  v12 = std::operator<<<std::char_traits<char>>(
          (std::basic_ostream<char,std::char_traits<char> > *)sstr.gap10,
          (const char *)(v9 + 34));
  std::operator<<<std::char_traits<char>>(v12, " : ¸ó½ºÅÍ");
  v13 = std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(&sstr, &result);
  LOBYTE(v17) = 8;
  if ( v13->_Myres >= 0x10 )
    v13 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v13->_Bx._Ptr;
  ((void (__stdcall *)(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *))v2->m_pkMonsterInfo->vfptr[118].__vecDelDtor)(v13);
  if ( result._Myres >= 0x10 )
    operator delete(result._Bx._Ptr);
  result._Myres = 15;
  result._Mysize = 0;
  result._Bx._Buf[0] = 0;
  v17 = -1;
  std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream<char,std::char_traits<char>,std::allocator<char>>((std::basic_stringstream<char,std::char_traits<char>,std::allocator<char> > *)((char *)&sstr + 96));
  *(_DWORD *)&sstr.gap60[0] = &std::ios_base::`vftable';
  std::ios_base::_Ios_base_dtor((std::ios_base *)sstr.gap60);
}
// 97F0E0: using guessed type int (__thiscall *std::ios_base::`vftable')(void *p, char);
// 97F0E8: using guessed type int (__stdcall *std::basic_istream<char,std::char_traits<char>>::`vftable')(char);
// 9B68D4: using guessed type int (__stdcall *std::basic_ostream<char,std::char_traits<char>>::`vftable')(char);
// 9B68DC: using guessed type int (__stdcall *std::basic_iostream<char,std::char_traits<char>>::`vftable')(char);
// 9B68E4: using guessed type int (__thiscall *std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::`vftable')(void *p, char);
// 9B6978: using guessed type int (__stdcall *std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::`vftable')(char);
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (00610AD0) --------------------------------------------------------
void __thiscall MonsterCardInventoryWin::OnCommand(MonsterCardInventoryWin *this, unsigned int wParam, int lParam)
{
  unsigned int v3; // eax@1

  v3 = wParam;
  switch ( wParam )
  {
    case 0x16u:
      PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
      break;
    case 0x13u:
      this->m_pkMonsterCardHaveListWin->m_nViewStartPos = this->m_pkMonsterCardHaveListSlideBar->m_nCurPos;
      SlideListWin::UpdateViewList(this->m_pkMonsterCardHaveListWin);
      break;
    case 0x11u:
      LOBYTE(v3) = this->m_bActiveListViewEnable == 0;
      this->m_bActiveListViewEnable = v3;
      MonsterCardInventoryWin::ActiveListViewEnable(this, v3);
      break;
    case 0u:
      MonsterCardInventoryWin::SelectTab(this, 0);
      break;
    case 1u:
      MonsterCardInventoryWin::SelectTab(this, 1);
      break;
    case 2u:
      MonsterCardInventoryWin::SelectTab(this, 2);
      break;
    case 3u:
      MonsterCardInventoryWin::SelectTab(this, 3);
      break;
    case 4u:
      MonsterCardInventoryWin::SelectTab(this, 4);
      break;
    case 5u:
      MonsterCardInventoryWin::SelectTab(this, 5);
      break;
    case 6u:
      MonsterCardInventoryWin::SelectTab(this, 6);
      break;
    case 7u:
      MonsterCardInventoryWin::SelectTab(this, 7);
      break;
    case 8u:
      MonsterCardInventoryWin::SelectTab(this, 8);
      break;
    case 9u:
      MonsterCardInventoryWin::SelectTab(this, 9);
      break;
    case 0xAu:
      MonsterCardInventoryWin::SelectAttributeTab(this, 0);
      break;
    case 0xBu:
      MonsterCardInventoryWin::SelectAttributeTab(this, 1);
      break;
    case 0xCu:
      MonsterCardInventoryWin::SelectAttributeTab(this, 2);
      break;
    case 0xDu:
      MonsterCardInventoryWin::SelectAttributeTab(this, 3);
      break;
    case 0xEu:
      MonsterCardInventoryWin::SelectAttributeTab(this, 4);
      break;
    case 0xFu:
      MonsterCardInventoryWin::SelectAttributeTab(this, 5);
      break;
    case 0x14u:
      MonsterCardInventoryWin::SelectIconItem(
        this,
        lParam + 20 * (this->m_nSelectTabNumber + 10 * this->m_nSelectAttiributeTabNumber));
      break;
    case 0x15u:
      MonsterCardInventoryWin::SelectIconItem(this, lParam);
      break;
    default:
      return;
  }
}

//----- (00610C80) --------------------------------------------------------
char __thiscall MonsterCardInventoryWin::Create(MonsterCardInventoryWin *this, PgFrameWork *pkFrameWork)
{
  MonsterCardInventoryWin *v2; // esi@1
  NiTexturePalette *v3; // ebx@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  PgWinSpr *v8; // eax@10
  int v9; // eax@10
  NiTexture *v10; // edi@10
  NiTexture *v11; // ebx@10
  PgSpr *v12; // eax@17
  PgSprData *v13; // eax@18
  D3DXCOLOR v14; // ST28_16@20
  PgWinAbbreviateText *v15; // eax@20
  PgWinBut *v16; // eax@20
  D3DXCOLOR v17; // ST30_16@20
  PgWinBut *v18; // eax@20
  D3DXCOLOR v19; // ST30_16@20
  signed int v20; // ebx@20
  ItemIcon **v21; // edi@20
  const char *v22; // eax@21
  PgSprData *v23; // eax@21
  ItemIcon *v24; // eax@21
  SLWCreateInfo::Item *v25; // edi@22
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *v26; // edi@22
  SLWCreateInfo::Item *v27; // edi@28
  PgSprData *v28; // eax@30
  SlideListWin *v29; // eax@30
  PgSprData *v30; // eax@30
  SlideBar *v31; // eax@30
  SlideBar *v32; // eax@30
  NiRefObjectVtbl *v33; // ebx@30
  SlideBar *v34; // edi@30
  int v35; // eax@30
  int v36; // eax@30
  NiNode *v37; // esi@32
  SLWCreateInfo kCreateInfo; // [sp+34h] [bp-74h]@22
  NiAVObject *pkObject; // [sp+50h] [bp-58h]@21
  int iYOff; // [sp+54h] [bp-54h]@4
  int iXOff; // [sp+58h] [bp-50h]@4
  UIUtil ui; // [sp+5Ch] [bp-4Ch]@10
  int iTop; // [sp+70h] [bp-38h]@21
  int iLeft; // [sp+74h] [bp-34h]@21
  NiPointer<NiNode> spNode; // [sp+78h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+7Ch] [bp-2Ch]@22
  int v47; // [sp+A4h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v47 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\MonsterCardInventory.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iXOff, &iYOff, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "Frame", 0) )
  {
    v6 = spNode.m_pObject;
    v47 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v47) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, iXOff, iYOff);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  UIUtil::CreateSpr(&ui, "Panel02", 0);
  UIUtil::CreateSpr(&ui, "Panel04", 0);
  v8 = UIUtil::CreateSpr(&ui, "MonFace", 0);
  v2->m_pkMonFace = v8;
  v9 = ((int (__thiscall *)(PgWinSpr *))v8->vfptr[114].__vecDelDtor)(v8);
  v10 = v2->m_spEmptyPortraitTexture.m_pObject;
  v11 = (NiTexture *)v9;
  if ( v10 != (NiTexture *)v9 )
  {
    if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    v2->m_spEmptyPortraitTexture.m_pObject = v11;
    if ( v11 )
      InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
  }
  v12 = v2->m_pkMonFace->m_spSpr.m_pObject;
  if ( v12 )
    v13 = v12->m_spSprData.m_pObject;
  else
    v13 = 0;
  NiScreenElementsData::GetTextures(
    v13->m_akGeomData.m_pBase->m_pObject,
    0,
    0,
    &v2->m_ptLeftUp,
    &v2->m_ptLeftDown,
    &v2->m_ptRightDown,
    &v2->m_ptRightUp);
  *(_QWORD *)&v14.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v14.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v15 = UIUtil::CreateText(&ui, "SubText01", byte_9B66FA, 3u, v14, 0, 0, 0);
  v2->m_pkMonsterInfo = (PgWinText *)v15;
  v15->m_spTextGeom.m_pObject->m_bAutoWordWrap = 1;
  UIUtil::CreateBtn(&ui, 0, "Tab01", 0, 0, 0, 0);
  UIUtil::CreateBtn(&ui, 1u, "Tab02", 0, 0, 0, 0);
  UIUtil::CreateBtn(&ui, 2u, "Tab03", 0, 0, 0, 0);
  UIUtil::CreateBtn(&ui, 3u, "Tab04", 0, 0, 0, 0);
  UIUtil::CreateBtn(&ui, 4u, "Tab05", 0, 0, 0, 0);
  UIUtil::CreateBtn(&ui, 5u, "Tab06", 0, 0, 0, 0);
  UIUtil::CreateBtn(&ui, 6u, "Tab07", 0, 0, 0, 0);
  UIUtil::CreateBtn(&ui, 7u, "Tab08", 0, 0, 0, 0);
  UIUtil::CreateBtn(&ui, 8u, "Tab09", 0, 0, 0, 0);
  UIUtil::CreateBtn(&ui, 9u, "Tab10", 0, 0, 0, 0);
  UIUtil::CreateBtn(&ui, 0xAu, "AtbTab01", 0, 0, 0, 0);
  UIUtil::CreateBtn(&ui, 0xBu, "AtbTab02", 0, 0, 0, 0);
  UIUtil::CreateBtn(&ui, 0xCu, "AtbTab03", 0, 0, 0, 0);
  UIUtil::CreateBtn(&ui, 0xDu, "AtbTab04", 0, 0, 0, 0);
  UIUtil::CreateBtn(&ui, 0xEu, "AtbTab05", 0, 0, 0, 0);
  UIUtil::CreateBtn(&ui, 0xFu, "AtbTab06", 0, 0, 0, 0);
  v16 = UIUtil::CreateBtn(&ui, 0x16u, "BtnNor02", "BtnOver02", "BtnClick02", 0, 0);
  *(_QWORD *)&v17.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v17.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  UIUtil::CreateAttachedText((PgWin *)&v16->vfptr, "You Out", v17, 5u);
  v18 = UIUtil::CreateBtn(&ui, 0x11u, "BtnNor01", "BtnOver01", "BtnClick01", 0, 0);
  *(_QWORD *)&v19.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v19.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  UIUtil::CreateAttachedText((PgWin *)&v18->vfptr, "Metamorphoisi", v19, 5u);
  v20 = 0;
  v21 = v2->m_pkCardListIcon;
  do
  {
    pkObject = (NiAVObject *)spNode.m_pObject;
    v22 = fs("IconSlot%02d", v20);
    v23 = PgSprData::Create(pkObject, v22, &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft - iXOff, iTop - iYOff, v23, (PgWin *)&v2->vfptr, 0, 0);
    v24 = ItemIcon::CreateWin(iLeft - iXOff + 1, iTop - iYOff + 1, (PgWin *)&v2->vfptr);
    *v21 = v24;
    v24->vfptr[129].__vecDelDtor((NiRefObject *)v24, 20u);
    ((void (__stdcall *)(signed int))(*v21)->vfptr[130].__vecDelDtor)(v20);
    ((void (__stdcall *)(signed int))(*v21)->vfptr[140].__vecDelDtor)(21);
    ((void (__stdcall *)(signed int))(*v21)->vfptr[141].__vecDelDtor)(v20);
    ItemIcon::SetItem(*v21, 0, 1);
    IconWin::ShowFocus((IconWin *)&(*v21)->vfptr, 1);
    ++v20;
    ++v21;
  }
  while ( v20 < 20 );
  v2->m_pkListViewBackGround = UIUtil::CreateSpr(&ui, "Panel03", 0);
  kCreateInfo.m_arrItem._Myfirst = 0;
  kCreateInfo.m_arrItem._Mylast = 0;
  kCreateInfo.m_arrItem._Myend = 0;
  kCreateInfo.m_bMakeData = 0;
  kCreateInfo.m_nOffX = 0;
  kCreateInfo.m_nOffY = 0;
  LOBYTE(v47) = 2;
  v25 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
  v25->nItemType = 1;
  v25->pNode = spNode.m_pObject;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarNor", 0xCu);
  v26 = &v25->vecNodeName;
  LOBYTE(v47) = 3;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v26,
    &_Val);
  LOBYTE(v47) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarClick", 0xEu);
  LOBYTE(v47) = 4;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v26,
    &_Val);
  LOBYTE(v47) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarOver", 0xDu);
  LOBYTE(v47) = 5;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v26,
    &_Val);
  LOBYTE(v47) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v27 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  v27->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column", 6u);
  LOBYTE(v47) = 6;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &v27->vecNodeName,
    &_Val);
  LOBYTE(v47) = 2;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v27->pNode = spNode.m_pObject;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
  v28 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ListBox", &iLeft, &iTop, 0);
  v29 = SlideListWin::CreateWin(iLeft - iXOff, iTop - iYOff, v28, (PgWin *)&v2->vfptr, &kCreateInfo, 0xAu, 0);
  v2->m_pkMonsterCardHaveListWin = v29;
  v29->m_uiLClickMsg = 18;
  v30 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle", &iLeft, &iTop, 0);
  v31 = SlideBar::CreateWin(
          spNode.m_pObject,
          "SlideBar",
          "SlideBar_UpBtn",
          "SlideBar_DnBtn",
          v30,
          0,
          (PgWin *)&v2->vfptr);
  v2->m_pkMonsterCardHaveListSlideBar = v31;
  v31->m_uiClickMsg = 19;
  v2->m_pkMonsterCardHaveListSlideBar->m_eType = 1;
  v32 = v2->m_pkMonsterCardHaveListSlideBar;
  v33 = v32->vfptr;
  v34 = v2->m_pkMonsterCardHaveListSlideBar;
  v35 = ((int (__thiscall *)(SlideBar *))v32->vfptr[42].__vecDelDtor)(v2->m_pkMonsterCardHaveListSlideBar);
  v36 = (int)v34->vfptr[41].__vecDelDtor((NiRefObject *)v34, v35 - 25);
  v33[77].__vecDelDtor((NiRefObject *)v2->m_pkMonsterCardHaveListSlideBar, v36 - 5);
  ((void (__thiscall *)(MonsterCardInventoryWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.1,
    0.5);
  LOBYTE(v47) = 1;
  if ( kCreateInfo.m_arrItem._Myfirst )
  {
    std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(
      kCreateInfo.m_arrItem._Myfirst,
      kCreateInfo.m_arrItem._Mylast);
    operator delete(kCreateInfo.m_arrItem._Myfirst);
  }
  kCreateInfo.m_arrItem._Myfirst = 0;
  kCreateInfo.m_arrItem._Mylast = 0;
  kCreateInfo.m_arrItem._Myend = 0;
  LOBYTE(v47) = 0;
  UIUtil::~UIUtil(&ui);
  v37 = spNode.m_pObject;
  v47 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v37 )
    v37->vfptr->__vecDelDtor((NiRefObject *)v37, 1u);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00611480) --------------------------------------------------------
void __thiscall std::basic_iostream<char,std::char_traits<char>>::~basic_iostream<char,std::char_traits<char>>(std::basic_iostream<char,std::char_traits<char> > *this)
{
  *(_DWORD *)&this->gap0[*(_DWORD *)(*(_DWORD *)&this[-1].gap10[56] + 4) - 24] = &std::basic_iostream<char,std::char_traits<char>>::`vftable';
  *(_DWORD *)&this->gap0[*(_DWORD *)(*(_DWORD *)&this[-1].88[0] + 4) - 8] = &std::basic_ostream<char,std::char_traits<char>>::`vftable';
  *(_DWORD *)&this->gap0[*(_DWORD *)(*(_DWORD *)&this[-1].gap10[56] + 4) - 24] = &std::basic_istream<char,std::char_traits<char>>::`vftable';
}
// 97F0E8: using guessed type int (__stdcall *std::basic_istream<char,std::char_traits<char>>::`vftable')(char);
// 9B68D4: using guessed type int (__stdcall *std::basic_ostream<char,std::char_traits<char>>::`vftable')(char);
// 9B68DC: using guessed type int (__stdcall *std::basic_iostream<char,std::char_traits<char>>::`vftable')(char);

//----- (006114B0) --------------------------------------------------------
void __thiscall std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::_Tidy(std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char> > *this)
{
  std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char> > *v1; // esi@1

  v1 = this;
  if ( this->_Mystate & 1 )
    operator delete(*(void **)this->_IGfirst);
  *v1->_IGfirst = 0;
  *v1->_IGnext = 0;
  *v1->_IGcount = 0;
  *v1->_IPfirst = 0;
  *v1->_IPnext = 0;
  *v1->_IPcount = 0;
  v1->_Mystate &= 0xFFFFFFFE;
  v1->_Seekhigh = 0;
}

//----- (00611510) --------------------------------------------------------
char *__thiscall std::basic_ostream<char,std::char_traits<char>>::`vector deleting destructor'(std::basic_ostream<char,std::char_traits<char> > *this, unsigned int a2)
{
  char *v2; // esi@1

  v2 = &this[-1].gap0[72];
  *(_DWORD *)&this->gap0[*(_DWORD *)(*(_DWORD *)&this[-1].gap0[72] + 4) - 8] = &std::basic_ostream<char,std::char_traits<char>>::`vftable';
  *(_DWORD *)&this->gap0[0] = &std::ios_base::`vftable';
  std::ios_base::_Ios_base_dtor((std::ios_base *)this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97F0E0: using guessed type int (__thiscall *std::ios_base::`vftable')(void *p, char);
// 9B68D4: using guessed type int (__stdcall *std::basic_ostream<char,std::char_traits<char>>::`vftable')(char);

//----- (00611550) --------------------------------------------------------
int __thiscall std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::underflow(std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char> > *this)
{
  char **v1; // edx@1
  char *v2; // esi@1
  int result; // eax@2
  int *v4; // edi@3
  char *v5; // eax@6

  v1 = this->_IGnext;
  v2 = *v1;
  if ( *v1 )
  {
    v4 = this->_IGcount;
    if ( v2 >= &v2[*v4] )
    {
      if ( this->_Mystate & 4 || (v5 = *this->_IPnext) == 0 || v5 <= v2 && this->_Seekhigh <= v2 )
      {
        result = -1;
      }
      else
      {
        if ( this->_Seekhigh < v5 )
          this->_Seekhigh = v5;
        *v4 = this->_Seekhigh - *v1;
        result = **this->_IGnext;
      }
    }
    else
    {
      result = (unsigned __int8)*v2;
    }
  }
  else
  {
    result = -1;
  }
  return result;
}

//----- (006115C0) --------------------------------------------------------
std::fpos<int> *__thiscall std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::seekoff(std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char> > *this, std::fpos<int> *result, __int64 _Off, int _Way, int _Which)
{
  char **v5; // edx@1
  char *v6; // eax@1
  char *v7; // eax@5
  signed int v8; // ebx@7
  unsigned int v9; // esi@7
  char *v10; // edi@15
  int v11; // edi@16
  char **v12; // eax@17
  char *v13; // edx@18
  int v14; // eax@18
  char *v15; // edi@29
  int v16; // edi@30
  std::fpos<int> *v17; // eax@33

  v5 = this->_IPnext;
  v6 = *v5;
  if ( *v5 && this->_Seekhigh < v6 )
    this->_Seekhigh = v6;
  if ( !(_Which & 1) || (v7 = *this->_IGnext) == 0 )
  {
    if ( _Which & 2 && *v5 )
    {
      if ( _Way == 2 )
      {
        v8 = (unsigned __int64)(this->_Seekhigh - *this->_IGfirst + _Off) >> 32;
        v9 = this->_Seekhigh - *this->_IGfirst + _Off;
      }
      else if ( _Way == 1 )
      {
        v8 = (unsigned __int64)(*v5 - *this->_IGfirst + _Off) >> 32;
        v9 = *v5 - *this->_IGfirst + _Off;
      }
      else if ( _Way )
      {
        v9 = std::_BADOFF;
        v8 = -1;
      }
      else
      {
        v8 = HIDWORD(_Off);
        v9 = _Off;
      }
      if ( v8 >= 0 )
      {
        v15 = *this->_IGfirst;
        if ( __PAIR__(v8, v9) <= (unsigned int)(this->_Seekhigh - v15) )
        {
          v16 = v9 + v15 - *v5;
          *this->_IPcount -= v16;
          *this->_IPnext += v16;
          goto LABEL_33;
        }
      }
    }
    else
    {
      v8 = HIDWORD(_Off);
      v9 = _Off;
      if ( !_Off )
        goto LABEL_33;
    }
LABEL_32:
    v9 = std::_BADOFF;
    v8 = -1;
    goto LABEL_33;
  }
  if ( _Way != 2 )
  {
    if ( _Way == 1 )
    {
      if ( !(_Which & 2) )
      {
        v8 = (unsigned __int64)(v7 - *this->_IGfirst + _Off) >> 32;
        v9 = v7 - *this->_IGfirst + _Off;
        goto LABEL_14;
      }
    }
    else if ( !_Way )
    {
      v8 = HIDWORD(_Off);
      v9 = _Off;
      goto LABEL_14;
    }
    v9 = std::_BADOFF;
    v8 = -1;
    goto LABEL_14;
  }
  v8 = (unsigned __int64)(this->_Seekhigh - *this->_IGfirst + _Off) >> 32;
  v9 = this->_Seekhigh - *this->_IGfirst + _Off;
LABEL_14:
  if ( v8 < 0 )
    goto LABEL_32;
  v10 = *this->_IGfirst;
  if ( __PAIR__(v8, v9) > (unsigned int)(this->_Seekhigh - v10) )
    goto LABEL_32;
  v11 = v9 + v10 - v7;
  *this->_IGcount -= v11;
  *this->_IGnext += v11;
  if ( _Which & 2 )
  {
    v12 = this->_IPnext;
    if ( *v12 )
    {
      v13 = *this->_IGnext;
      v14 = (int)&(*v12)[*this->_IPcount];
      *this->_IPnext = v13;
      *this->_IPcount = v14 - (_DWORD)v13;
    }
  }
LABEL_33:
  v17 = result;
  LODWORD(result->_Myoff) = v9;
  HIDWORD(result->_Myoff) = v8;
  result->_Fpos = 0i64;
  result->_Mystate = 0;
  return v17;
}
// 9D56D8: using guessed type const __int64 std::_BADOFF;

//----- (00611780) --------------------------------------------------------
std::fpos<int> *__thiscall std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::seekpos(std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char> > *this, std::fpos<int> *result, std::fpos<int> _Ptr, int _Mode)
{
  signed int v4; // ebx@1
  int v5; // esi@1
  char **v6; // edi@1
  char *v7; // eax@1
  int v8; // edx@4
  char *v9; // edi@9
  int v10; // edi@10
  char **v11; // eax@11
  char *v12; // edx@12
  int v13; // eax@12
  char *v14; // edi@16
  int v15; // edi@17
  std::fpos<int> *v16; // eax@20
  char *v17; // [sp+Ch] [bp-4h]@7
  int _Modea; // [sp+34h] [bp+24h]@14

  v6 = this->_IPnext;
  v7 = *v6;
  v4 = (unsigned __int64)(_Ptr._Myoff + SLODWORD(_Ptr._Fpos)) >> 32;
  v5 = LODWORD(_Ptr._Myoff) + LODWORD(_Ptr._Fpos);
  if ( *v6 && this->_Seekhigh < v7 )
    this->_Seekhigh = v7;
  v8 = std::_BADOFF;
  if ( v5 != (_DWORD)std::_BADOFF || v4 != -1 )
  {
    if ( _Mode & 1 && (v17 = *this->_IGnext) != 0 )
    {
      if ( v4 < 0 )
      {
LABEL_19:
        v4 = -1;
        v5 = v8;
        goto LABEL_20;
      }
      v9 = *this->_IGfirst;
      if ( __PAIR__(v4, v5) <= (unsigned int)(this->_Seekhigh - v9) )
      {
        v10 = v5 + v9 - v17;
        *this->_IGcount -= v10;
        *this->_IGnext += v10;
        if ( _Mode & 2 )
        {
          v11 = this->_IPnext;
          if ( *v11 )
          {
            v12 = *this->_IGnext;
            v13 = (int)&(*v11)[*this->_IPcount];
            *this->_IPnext = v12;
            *this->_IPcount = v13 - (_DWORD)v12;
          }
        }
        goto LABEL_20;
      }
    }
    else
    {
      if ( !(_Mode & 2) )
        goto LABEL_19;
      _Modea = (int)*v6;
      if ( !*v6 || v4 < 0 )
        goto LABEL_19;
      v14 = *this->_IGfirst;
      if ( __PAIR__(v4, v5) <= (unsigned int)(this->_Seekhigh - v14) )
      {
        v15 = (int)(&v14[v5] - _Modea);
        *this->_IPcount -= v15;
        *this->_IPnext += v15;
        goto LABEL_20;
      }
    }
    v8 = std::_BADOFF;
    goto LABEL_19;
  }
LABEL_20:
  v16 = result;
  LODWORD(result->_Myoff) = v5;
  HIDWORD(result->_Myoff) = v4;
  result->_Fpos = 0i64;
  result->_Mystate = 0;
  return v16;
}
// 9D56D8: using guessed type const __int64 std::_BADOFF;

//----- (006118A0) --------------------------------------------------------
int __thiscall std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::overflow(std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char> > *this, int _Meta)
{
  std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char> > *v2; // esi@1
  char **v3; // edi@2
  char *v4; // edx@2
  char *v5; // ecx@3
  int v6; // eax@4
  int result; // eax@5
  unsigned int v8; // edi@7
  int *v9; // ecx@8
  unsigned int v10; // ebx@12
  unsigned int v11; // eax@14
  char *v12; // edi@21
  void **v13; // eax@21
  void *v14; // edx@21
  char **v15; // ecx@23
  char **v16; // eax@25
  int v17; // eax@25
  int v18; // eax@25
  char *v19; // ecx@27
  int v20; // eax@27
  int *v21; // eax@30
  char **v22; // esi@31
  char *v23; // ecx@31
  char *_Oldptr; // [sp+8h] [bp-8h]@21
  unsigned int _Newsize; // [sp+Ch] [bp-4h]@21

  v2 = this;
  if ( this->_Mystate & 8 )
  {
    v3 = this->_IPnext;
    v4 = *v3;
    if ( *v3 )
    {
      v5 = this->_Seekhigh;
      if ( v4 < v5 )
      {
        v6 = (int)&v4[*v2->_IPcount];
        *v3 = v5;
        *v2->_IPcount = v6 - (_DWORD)v5;
      }
    }
  }
  result = _Meta;
  if ( _Meta == -1 )
    return 0;
  v8 = (unsigned int)*v2->_IPnext;
  if ( !v8 || (v9 = v2->_IPcount, v8 >= v8 + *v9) )
  {
    if ( !(v2->_Mystate & 2) )
    {
      if ( v8 )
        v10 = v8 + *v2->_IPcount - (unsigned int)*v2->_IGfirst;
      else
        v10 = 0;
      v11 = v10 >> 1;
      if ( v10 >> 1 < 0x20 )
      {
        v11 = 32;
        do
        {
LABEL_17:
          if ( 0x7FFFFFFF - v11 >= v10 )
            break;
          v11 >>= 1;
        }
        while ( v11 );
        if ( !v11 )
          return -1;
        _Newsize = v10 + v11;
        v12 = std::allocator<char>::allocate(v10 + v11);
        v13 = (void **)v2->_IGfirst;
        v14 = *v13;
        _Oldptr = (char *)*v13;
        if ( v10 && (memcpy(v12, (char *)v14, v10), v14 = _Oldptr, v10) )
        {
          v16 = v2->_IPnext;
          v2->_Seekhigh += v12 - _Oldptr;
          v17 = *v16 - _Oldptr;
          *v2->_IPfirst += v12 - _Oldptr;
          v18 = (int)&v12[v17];
          *v2->_IPnext = (char *)v18;
          *v2->_IPcount = (int)(&v12[_Newsize] - v18);
          if ( !(v2->_Mystate & 4) )
          {
            v19 = *v2->_IPnext;
            v20 = (int)&v12[*v2->_IGnext - _Oldptr];
            *v2->_IGfirst = v12;
            *v2->_IGnext = (char *)v20;
            *v2->_IGcount = (int)&v19[-v20 + 1];
            goto LABEL_28;
          }
        }
        else
        {
          v15 = v2->_IPfirst;
          v2->_Seekhigh = v12;
          *v15 = v12;
          *v2->_IPnext = v12;
          *v2->_IPcount = _Newsize;
          if ( !(v2->_Mystate & 4) )
          {
            *v2->_IGfirst = v12;
            *v2->_IGnext = v12;
            *v2->_IGcount = 1;
LABEL_28:
            if ( v2->_Mystate & 1 )
              operator delete(v14);
            v21 = v2->_IPcount;
            v2->_Mystate |= 1u;
            --*v21;
            result = _Meta;
            goto LABEL_31;
          }
        }
        *v2->_IGfirst = v12;
        *v2->_IGnext = 0;
        *v2->_IGcount = (int)v12;
        goto LABEL_28;
      }
      if ( v11 )
        goto LABEL_17;
    }
    return -1;
  }
  --*v9;
LABEL_31:
  v22 = v2->_IPnext;
  v23 = (*v22)++;
  *v23 = result;
  return result;
}

//----- (00611A50) --------------------------------------------------------
int __thiscall std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::pbackfail(std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char> > *this, int _Meta)
{
  char *v2; // eax@1
  int result; // eax@7

  v2 = *this->_IGnext;
  if ( !v2 || v2 <= *this->_IGfirst || _Meta != -1 && (_BYTE)_Meta != *(v2 - 1) && this->_Mystate & 2 )
  {
    result = -1;
  }
  else
  {
    ++*this->_IGcount;
    --*this->_IGnext;
    if ( _Meta == -1 )
    {
      result = 0;
    }
    else
    {
      **this->_IGnext = _Meta;
      result = _Meta;
    }
  }
  return result;
}

//----- (00611AA0) --------------------------------------------------------
char *__thiscall std::basic_iostream<char,std::char_traits<char>>::`vector deleting destructor'(std::basic_iostream<char,std::char_traits<char> > *this, unsigned int a2)
{
  char *v2; // esi@1

  v2 = &this[-1].gap10[56];
  *(_DWORD *)&this->gap0[*(_DWORD *)(*(_DWORD *)&this[-1].gap10[56] + 4) - 24] = &std::basic_iostream<char,std::char_traits<char>>::`vftable';
  *(_DWORD *)&this->gap0[*(_DWORD *)(*(_DWORD *)&this[-1].88[0] + 4) - 8] = &std::basic_ostream<char,std::char_traits<char>>::`vftable';
  *(_DWORD *)&this->gap0[*(_DWORD *)(*(_DWORD *)&this[-1].gap10[56] + 4) - 24] = &std::basic_istream<char,std::char_traits<char>>::`vftable';
  *(_DWORD *)&this->gap0[0] = &std::ios_base::`vftable';
  std::ios_base::_Ios_base_dtor((std::ios_base *)this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97F0E0: using guessed type int (__thiscall *std::ios_base::`vftable')(void *p, char);
// 97F0E8: using guessed type int (__stdcall *std::basic_istream<char,std::char_traits<char>>::`vftable')(char);
// 9B68D4: using guessed type int (__stdcall *std::basic_ostream<char,std::char_traits<char>>::`vftable')(char);
// 9B68DC: using guessed type int (__stdcall *std::basic_iostream<char,std::char_traits<char>>::`vftable')(char);

//----- (00611B00) --------------------------------------------------------
std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::`vector deleting destructor'(std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int a2)
{
  std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char> > *v2; // esi@1

  v2 = this;
  this->vfptr = (std::basic_streambuf<char,std::char_traits<char> >Vtbl *)&std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::`vftable';
  std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::_Tidy(this);
  std::basic_streambuf<char,std::char_traits<char>>::~basic_streambuf<char,std::char_traits<char>>((std::basic_streambuf<char,std::char_traits<char> > *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B68E4: using guessed type int (__thiscall *std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::`vftable')(void *p, char);

//----- (00611B30) --------------------------------------------------------
char *__cdecl std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Ifmt(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, char *_Fmt, const char *_Spec, int _Flags)
{
  char *result; // eax@1
  char *v5; // ecx@1
  int v6; // ecx@6
  int v7; // esi@8

  result = _Fmt;
  *_Fmt = 37;
  v5 = _Fmt + 1;
  if ( _Flags & 0x20 )
  {
    *v5 = 43;
    v5 = _Fmt + 2;
  }
  if ( _Flags & 8 )
    *v5++ = 35;
  if ( *_Spec == 76 )
  {
    *(_WORD *)v5 = 13897;
    v5[2] = 52;
    v6 = (int)(v5 + 3);
  }
  else
  {
    *v5 = *_Spec;
    v6 = (int)(v5 + 1);
  }
  v7 = _Flags & 0xE00;
  if ( v7 == 1024 )
  {
    *(_BYTE *)v6 = 111;
    *(_BYTE *)(v6 + 1) = 0;
  }
  else if ( v7 == 2048 )
  {
    *(_BYTE *)v6 = ~(8 * _Flags) & 0x20 | 0x58;
    *(_BYTE *)(v6 + 1) = 0;
  }
  else
  {
    *(_BYTE *)v6 = _Spec[1];
    *(_BYTE *)(v6 + 1) = 0;
  }
  return result;
}

//----- (00611BC0) --------------------------------------------------------
void __thiscall std::numpunct<char>::_Tidy(std::numpunct<char> *this)
{
  std::numpunct<char> *v1; // esi@1

  v1 = this;
  operator delete[]((void *)this->_Grouping);
  operator delete[]((void *)v1->_Falsename);
  operator delete[]((void *)v1->_Truename);
}

//----- (00611BF0) --------------------------------------------------------
void __thiscall std::numpunct<char>::_Init(std::numpunct<char> *this, std::_Locinfo *_Lobj, bool _Isdef)
{
  std::numpunct<char> *v3; // ebx@1
  lconv *v4; // eax@1
  const char *v5; // edi@1
  unsigned int v6; // esi@3
  char *v7; // eax@3
  void *v8; // eax@3
  void *v9; // eax@3
  lconv *v10; // esi@3
  int v11; // ecx@3
  int v12; // ecx@3
  int v13; // ecx@4
  int v14; // [sp+0h] [bp-28h]@1
  std::numpunct<char> *v15; // [sp+10h] [bp-18h]@1
  lconv *_Ptr; // [sp+14h] [bp-14h]@1
  int *v17; // [sp+18h] [bp-10h]@1
  int v18; // [sp+24h] [bp-4h]@1

  v17 = &v14;
  v3 = this;
  v15 = this;
  v4 = localeconv();
  _Ptr = v4;
  v3->_Grouping = 0;
  v3->_Falsename = 0;
  v3->_Truename = 0;
  v18 = 0;
  v5 = (const char *)&unk_96F8EB;
  if ( !_Isdef )
    v5 = v4->grouping;
  ((void (*)(void))_Getcvt)();
  v6 = strlen(v5) + 1;
  v7 = (char *)operator new[](v6);
  qmemcpy(v7, v5, v6);
  v3->_Grouping = v7;
  _Getcvt(&v7[v6]);
  v8 = operator new[](6u);
  qmemcpy(v8, "false", 6u);
  v3->_Falsename = (const char *)v8;
  _Getcvt((char *)v8 + 6);
  v9 = operator new[](5u);
  qmemcpy(v9, "true", 5u);
  v3->_Truename = (const char *)v9;
  _Getcvt((char *)v9 + 5);
  v10 = _Ptr;
  LOBYTE(v11) = *_Ptr->decimal_point;
  v3->_Dp = v11;
  _Getcvt(v11);
  v3->_Kseparator = *v10->thousands_sep;
  if ( _Isdef )
  {
    _Getcvt(v12);
    v3->_Dp = 46;
    _Getcvt(v13);
    v3->_Kseparator = 44;
  }
}
// 7A17B9: using guessed type int __thiscall _Getcvt(_DWORD);

//----- (00611D30) --------------------------------------------------------
char __thiscall std::numpunct<char>::do_decimal_point(std::numpunct<char> *this)
{
  return this->_Dp;
}

//----- (00611D40) --------------------------------------------------------
char __thiscall std::numpunct<char>::do_thousands_sep(std::numpunct<char> *this)
{
  return this->_Kseparator;
}

//----- (00611D50) --------------------------------------------------------
std::numpunct<char> *__thiscall std::numpunct<char>::`scalar deleting destructor'(std::numpunct<char> *this, unsigned int a2)
{
  std::numpunct<char> *v2; // esi@1
  const char *v3; // ST08_4@1

  v2 = this;
  v3 = this->_Grouping;
  this->vfptr = (std::locale::facetVtbl *)&std::numpunct<char>::`vftable';
  operator delete[]((void *)v3);
  operator delete[]((void *)v2->_Falsename);
  operator delete[]((void *)v2->_Truename);
  v2->vfptr = (std::locale::facetVtbl *)&std::locale::facet::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97F0D8: using guessed type int (__thiscall *std::locale::facet::`vftable')(void *p, char);
// 9B695C: using guessed type int (__thiscall *std::numpunct<char>::`vftable')(void *p, char);

//----- (00611DA0) --------------------------------------------------------
void __thiscall std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream<char,std::char_traits<char>,std::allocator<char>>(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char> > *this)
{
  std::basic_streambuf<char,std::char_traits<char> > *v1; // esi@1

  *(_DWORD *)&this->gap0[*(_DWORD *)(*(_DWORD *)&this[-1].gap10[56] + 4) - 96] = &std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::`vftable';
  v1 = (std::basic_streambuf<char,std::char_traits<char> > *)this[-1].gap60;
  *(_DWORD *)&this[-1].gap60[0] = &std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::`vftable';
  std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::_Tidy((std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char> > *)this[-1].gap60);
  std::basic_streambuf<char,std::char_traits<char>>::~basic_streambuf<char,std::char_traits<char>>(v1);
  *(_DWORD *)((char *)v1 + *((_DWORD *)v1[-1]._IPnext + 1) - 24) = &std::basic_iostream<char,std::char_traits<char>>::`vftable';
  *(_DWORD *)((char *)v1 + v1[-1]._IPcount[1] - 8) = &std::basic_ostream<char,std::char_traits<char>>::`vftable';
  *(_DWORD *)((char *)v1 + *((_DWORD *)v1[-1]._IPnext + 1) - 24) = &std::basic_istream<char,std::char_traits<char>>::`vftable';
}
// 97F0E8: using guessed type int (__stdcall *std::basic_istream<char,std::char_traits<char>>::`vftable')(char);
// 9B68D4: using guessed type int (__stdcall *std::basic_ostream<char,std::char_traits<char>>::`vftable')(char);
// 9B68DC: using guessed type int (__stdcall *std::basic_iostream<char,std::char_traits<char>>::`vftable')(char);
// 9B68E4: using guessed type int (__thiscall *std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::`vftable')(void *p, char);
// 9B6978: using guessed type int (__stdcall *std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::`vftable')(char);

//----- (00611E30) --------------------------------------------------------
std::ostreambuf_iterator<char,std::char_traits<char> > *__cdecl std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Rep(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, std::ostreambuf_iterator<char,std::char_traits<char> > *result, std::ostreambuf_iterator<char,std::char_traits<char> > _Dest, char _Ch, unsigned int _Count)
{
  std::basic_streambuf<char,std::char_traits<char> > *v5; // ecx@1
  unsigned int i; // esi@1
  int *v7; // eax@4
  char **v8; // eax@5
  char *v9; // ecx@5
  int v10; // eax@5
  std::ostreambuf_iterator<char,std::char_traits<char> > *v11; // eax@10

  v5 = _Dest._Strbuf;
  for ( i = _Count; i; --i )
  {
    if ( v5 )
    {
      if ( *v5->_IPnext && (v7 = v5->_IPcount, *v7 > 0) )
      {
        --*v7;
        v8 = v5->_IPnext;
        v9 = (*v8)++;
        *v9 = _Ch;
        v10 = (unsigned __int8)_Ch;
      }
      else
      {
        v10 = ((int (__stdcall *)(_DWORD))v5->vfptr->overflow)((unsigned __int8)_Ch);
      }
      v5 = _Dest._Strbuf;
      if ( v10 != -1 )
        continue;
    }
    _Dest._Failed = 1;
  }
  v11 = result;
  *(_DWORD *)&result->_Failed = *(_DWORD *)&_Dest._Failed;
  result->_Strbuf = v5;
  return v11;
}

//----- (00611EA0) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::numpunct<char>::falsename(std::numpunct<char> *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result)
{
  ((void (__stdcall *)(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *))this->vfptr[4].__vecDelDtor)(result);
  return result;
}

//----- (00611EC0) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::numpunct<char>::truename(std::numpunct<char> *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result)
{
  ((void (__stdcall *)(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *))this->vfptr[5].__vecDelDtor)(result);
  return result;
}

//----- (00611EE0) --------------------------------------------------------
std::ostreambuf_iterator<char,std::char_traits<char> > *__cdecl std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Put(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, std::ostreambuf_iterator<char,std::char_traits<char> > *result, std::ostreambuf_iterator<char,std::char_traits<char> > _Dest, const char *_Ptr, unsigned int _Count)
{
  std::basic_streambuf<char,std::char_traits<char> > *v5; // ecx@1
  unsigned int v6; // ebx@1
  const char *v7; // edi@2
  char v8; // dl@4
  int *v9; // eax@5
  char **v10; // eax@6
  char *v11; // ecx@6
  int v12; // eax@6
  std::ostreambuf_iterator<char,std::char_traits<char> > *v13; // eax@11

  v5 = _Dest._Strbuf;
  v6 = _Count;
  if ( _Count )
  {
    v7 = _Ptr;
    do
    {
      if ( !v5
        || ((v8 = *v7, !*v5->_IPnext) || (v9 = v5->_IPcount, *v9 <= 0) ? (v12 = ((int (__stdcall *)(_DWORD))v5->vfptr->overflow)((unsigned __int8)v8)) : (--*v9, v10 = v5->_IPnext, v11 = *v10, ++*v10, *v11 = v8, v12 = (unsigned __int8)v8),
            v5 = _Dest._Strbuf,
            v12 == -1) )
      {
        _Dest._Failed = 1;
      }
      ++v7;
      --v6;
    }
    while ( v6 );
  }
  v13 = result;
  *(_DWORD *)&result->_Failed = *(_DWORD *)&_Dest._Failed;
  result->_Strbuf = v5;
  return v13;
}

//----- (00611F50) --------------------------------------------------------
std::ostreambuf_iterator<char,std::char_traits<char> > *__cdecl std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Putgrouped(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, std::ostreambuf_iterator<char,std::char_traits<char> > *result, std::ostreambuf_iterator<char,std::char_traits<char> > _Dest, const char *_Ptr, unsigned int _Count, char _Kseparator)
{
  int v6; // ebx@1
  char *v7; // edi@1
  int v8; // eax@2
  unsigned int v9; // esi@3
  std::ostreambuf_iterator<char,std::char_traits<char> > *v10; // eax@5
  int v11; // edi@5
  int v12; // ebx@5
  std::ostreambuf_iterator<char,std::char_traits<char> > *v13; // eax@7
  int v14; // edx@9
  std::ostreambuf_iterator<char,std::char_traits<char> > v16; // [sp+Ch] [bp-10h]@7
  std::ostreambuf_iterator<char,std::char_traits<char> > v17; // [sp+14h] [bp-8h]@5

  v6 = _Count;
  v7 = (char *)_Ptr;
  while ( 1 )
  {
    memchr(v7, 0, v6);
    v9 = v8 ? v8 - (_DWORD)v7 : v6;
    v10 = std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Put(this, &v17, _Dest, v7, v9);
    *(_DWORD *)&_Dest._Failed = *(_DWORD *)&v10->_Failed;
    v11 = (int)&v7[v9];
    v12 = v6 - v9;
    _Dest._Strbuf = v10->_Strbuf;
    if ( !v12 )
      break;
    if ( _Kseparator )
    {
      v13 = std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Rep(
              this,
              &v16,
              *v10,
              _Kseparator,
              1u);
      *(_DWORD *)&_Dest._Failed = *(_DWORD *)&v13->_Failed;
      _Dest._Strbuf = v13->_Strbuf;
    }
    v7 = (char *)(v11 + 1);
    v6 = v12 - 1;
  }
  v14 = *(_DWORD *)&v10->_Failed;
  result->_Strbuf = v10->_Strbuf;
  *(_DWORD *)&result->_Failed = v14;
  return result;
}

//----- (00611FF0) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::numpunct<char>::grouping(std::numpunct<char> *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result)
{
  ((void (__stdcall *)(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *))this->vfptr[3].__vecDelDtor)(result);
  return result;
}

//----- (00612010) --------------------------------------------------------
signed int __cdecl std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Getcat(std::locale::facet **_Ppf, std::locale *_Ploc)
{
  char v2; // bl@1
  std::locale::facet *v3; // esi@3
  char *v4; // eax@5
  int v5; // ecx@7
  unsigned int v6; // edx@7
  std::_Locinfo v8; // [sp+Ch] [bp-34h]@7
  std::locale::facet *v9; // [sp+30h] [bp-10h]@1
  int v10; // [sp+3Ch] [bp-4h]@3

  v2 = 0;
  v9 = 0;
  if ( _Ppf && !*_Ppf )
  {
    v3 = (std::locale::facet *)operator new(0x10u);
    v9 = v3;
    v10 = 0;
    if ( v3 )
    {
      if ( _Ploc->_Ptr->_Name._Myptr )
        v4 = _Ploc->_Ptr->_Name._Myptr;
      else
        v4 = &_Ploc->_Ptr->_Name._Nul;
      std::_Locinfo::_Locinfo(&v8, v4);
      v2 = 1;
      v3->_Refs = 0;
      v3->vfptr = (std::locale::facetVtbl *)&std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::`vftable';
      v3[1].vfptr = (std::locale::facetVtbl *)_Getcvt(v5);
      v3[1]._Refs = v6;
    }
    else
    {
      v3 = 0;
    }
    v10 = -1;
    *_Ppf = v3;
    if ( v2 & 1 )
      std::_Locinfo::~_Locinfo(&v8);
  }
  return 4;
}
// 7A17B9: using guessed type int __thiscall _Getcvt(_DWORD);
// 9B6924: using guessed type int (__thiscall *std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::`vftable')(void *p, char);

//----- (006120D0) --------------------------------------------------------
signed int __cdecl std::numpunct<char>::_Getcat(std::locale::facet **_Ppf, std::locale *_Ploc)
{
  char v2; // bl@1
  std::numpunct<char> *v3; // esi@3
  char *v4; // eax@5
  std::_Locinfo *v5; // eax@7
  std::_Locinfo v7; // [sp+Ch] [bp-38h]@7
  std::numpunct<char> *v8; // [sp+30h] [bp-14h]@3
  int v9; // [sp+34h] [bp-10h]@1
  int v10; // [sp+40h] [bp-4h]@3

  v2 = 0;
  v9 = 0;
  if ( _Ppf && !*_Ppf )
  {
    v3 = (std::numpunct<char> *)operator new(0x18u);
    v8 = v3;
    v10 = 0;
    if ( v3 )
    {
      if ( _Ploc->_Ptr->_Name._Myptr )
        v4 = _Ploc->_Ptr->_Name._Myptr;
      else
        v4 = &_Ploc->_Ptr->_Name._Nul;
      std::_Locinfo::_Locinfo(&v7, v4);
      v2 = 1;
      v9 = 1;
      v3->_Refs = 0;
      v10 = 2;
      v3->vfptr = (std::locale::facetVtbl *)&std::numpunct<char>::`vftable';
      std::numpunct<char>::_Init(v3, v5, 1);
    }
    else
    {
      v3 = 0;
    }
    *_Ppf = (std::locale::facet *)v3;
    v10 = -1;
    if ( v2 & 1 )
      std::_Locinfo::~_Locinfo(&v7);
  }
  return 4;
}
// 9B695C: using guessed type int (__thiscall *std::numpunct<char>::`vftable')(void *p, char);

//----- (006121A0) --------------------------------------------------------
void __thiscall std::basic_ostream<char,std::char_traits<char>>::_Osfx(std::basic_ostream<char,std::char_traits<char> > *this)
{
  bool v1; // zf@1
  int v2; // [sp+0h] [bp-20h]@1
  int *v3; // [sp+10h] [bp-10h]@1
  int v4; // [sp+1Ch] [bp-4h]@1

  v3 = &v2;
  v1 = (this->gap0[*(_DWORD *)(*(_DWORD *)&this->gap0[0] + 4) + 20] & 2) == 0;
  v4 = 0;
  if ( !v1 )
    std::basic_ostream<char,std::char_traits<char>>::flush(this);
}

//----- (00612200) --------------------------------------------------------
void __thiscall std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::`vbase destructor(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char> > *this)
{
  std::ios_base *v1; // esi@1

  v1 = (std::ios_base *)this->gap60;
  std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream<char,std::char_traits<char>,std::allocator<char>>((std::basic_stringstream<char,std::char_traits<char>,std::allocator<char> > *)((char *)this + 96));
  v1->vfptr = (std::ios_baseVtbl *)&std::ios_base::`vftable';
  std::ios_base::_Ios_base_dtor(v1);
}
// 97F0E0: using guessed type int (__thiscall *std::ios_base::`vftable')(void *p, char);

//----- (00612220) --------------------------------------------------------
char *__thiscall std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::`scalar deleting destructor'(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int a2)
{
  char *v2; // edi@1
  std::ios_base *v3; // esi@1

  v2 = &this[-1].gap10[56];
  v3 = (std::ios_base *)this;
  std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream<char,std::char_traits<char>,std::allocator<char>>(this);
  v3->vfptr = (std::ios_baseVtbl *)&std::ios_base::`vftable';
  std::ios_base::_Ios_base_dtor(v3);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 97F0E0: using guessed type int (__thiscall *std::ios_base::`vftable')(void *p, char);

//----- (00612260) --------------------------------------------------------
std::locale::facet *__cdecl std::use_facet<std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>>(std::locale *_Loc)
{
  int v1; // ebx@1
  std::locale *v2; // edi@5
  unsigned int v3; // esi@5
  std::locale::_Locimp *v4; // eax@5
  std::locale::facet *v5; // ecx@6
  std::locale::_Locimp *v6; // eax@8
  std::locale::facet *v7; // esi@9
  unsigned int v8; // eax@18
  std::bad_cast pExceptionObject; // [sp+10h] [bp-24h]@16
  std::_Lockit _Lock; // [sp+1Ch] [bp-18h]@1
  std::_Lockit v12; // [sp+20h] [bp-14h]@2
  std::locale::facet *_Psave; // [sp+24h] [bp-10h]@1
  int v14; // [sp+30h] [bp-4h]@1

  std::_Lockit::_Lockit(&_Lock, 0);
  v1 = std::_Facetptr<std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>>::_Psave;
  v14 = 0;
  _Psave = (std::locale::facet *)std::_Facetptr<std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>>::_Psave;
  if ( !std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::id )
  {
    std::_Lockit::_Lockit(&v12, 0);
    if ( !std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::id )
      std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::id = ++std::locale::id::_Id_cnt;
    std::_Lockit::~_Lockit(&v12);
  }
  v2 = _Loc;
  v3 = std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::id;
  v4 = _Loc->_Ptr;
  if ( std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::id >= _Loc->_Ptr->_Facetcount )
  {
    v5 = 0;
  }
  else
  {
    v5 = v4->_Facetvec[std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::id];
    if ( v5 )
    {
LABEL_11:
      v7 = v5;
LABEL_12:
      if ( v7 )
        goto LABEL_21;
      goto LABEL_13;
    }
  }
  if ( !v4->_Xparent )
    goto LABEL_11;
  v6 = std::locale::_Getgloballocale();
  if ( v3 < v6->_Facetcount )
  {
    v7 = v6->_Facetvec[v3];
    goto LABEL_12;
  }
LABEL_13:
  if ( v1 )
  {
    v7 = (std::locale::facet *)v1;
  }
  else
  {
    if ( std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Getcat(&_Psave, v2) == -1 )
    {
      std::bad_cast::bad_cast(&pExceptionObject, "bad cast");
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_cast_std__);
    }
    v7 = _Psave;
    std::_Facetptr<std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>>::_Psave = (int)_Psave;
    std::_Lockit::_Lockit((std::_Lockit *)&_Loc, 0);
    v8 = v7->_Refs;
    if ( v8 < 0xFFFFFFFF )
      v7->_Refs = v8 + 1;
    std::_Lockit::~_Lockit((std::_Lockit *)&_Loc);
    std::locale::facet::_Facet_Register(v7);
  }
LABEL_21:
  v14 = -1;
  std::_Lockit::~_Lockit(&_Lock);
  return v7;
}
// A8EA90: using guessed type int std::_Facetptr<std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>>::_Psave;
// A8EA9C: using guessed type int std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::id;
// B607F0: using guessed type int std::locale::id::_Id_cnt;

//----- (006123A0) --------------------------------------------------------
std::locale::facet *__cdecl std::use_facet<std::numpunct<char>>(std::locale *_Loc)
{
  int v1; // ebx@1
  std::locale *v2; // edi@5
  unsigned int v3; // esi@5
  std::locale::_Locimp *v4; // eax@5
  std::locale::facet *v5; // ecx@6
  std::locale::_Locimp *v6; // eax@8
  std::locale::facet *v7; // esi@9
  unsigned int v8; // eax@18
  std::bad_cast pExceptionObject; // [sp+10h] [bp-24h]@16
  std::_Lockit _Lock; // [sp+1Ch] [bp-18h]@1
  std::_Lockit v12; // [sp+20h] [bp-14h]@2
  std::locale::facet *_Psave; // [sp+24h] [bp-10h]@1
  int v14; // [sp+30h] [bp-4h]@1

  std::_Lockit::_Lockit(&_Lock, 0);
  v1 = std::_Facetptr<std::numpunct<char>>::_Psave;
  v14 = 0;
  _Psave = (std::locale::facet *)std::_Facetptr<std::numpunct<char>>::_Psave;
  if ( !std::numpunct<char>::id )
  {
    std::_Lockit::_Lockit(&v12, 0);
    if ( !std::numpunct<char>::id )
      std::numpunct<char>::id = ++std::locale::id::_Id_cnt;
    std::_Lockit::~_Lockit(&v12);
  }
  v2 = _Loc;
  v3 = std::numpunct<char>::id;
  v4 = _Loc->_Ptr;
  if ( std::numpunct<char>::id >= _Loc->_Ptr->_Facetcount )
  {
    v5 = 0;
  }
  else
  {
    v5 = v4->_Facetvec[std::numpunct<char>::id];
    if ( v5 )
    {
LABEL_11:
      v7 = v5;
LABEL_12:
      if ( v7 )
        goto LABEL_21;
      goto LABEL_13;
    }
  }
  if ( !v4->_Xparent )
    goto LABEL_11;
  v6 = std::locale::_Getgloballocale();
  if ( v3 < v6->_Facetcount )
  {
    v7 = v6->_Facetvec[v3];
    goto LABEL_12;
  }
LABEL_13:
  if ( v1 )
  {
    v7 = (std::locale::facet *)v1;
  }
  else
  {
    if ( std::numpunct<char>::_Getcat(&_Psave, v2) == -1 )
    {
      std::bad_cast::bad_cast(&pExceptionObject, "bad cast");
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_cast_std__);
    }
    v7 = _Psave;
    std::_Facetptr<std::numpunct<char>>::_Psave = (int)_Psave;
    std::_Lockit::_Lockit((std::_Lockit *)&_Loc, 0);
    v8 = v7->_Refs;
    if ( v8 < 0xFFFFFFFF )
      v7->_Refs = v8 + 1;
    std::_Lockit::~_Lockit((std::_Lockit *)&_Loc);
    std::locale::facet::_Facet_Register(v7);
  }
LABEL_21:
  v14 = -1;
  std::_Lockit::~_Lockit(&_Lock);
  return v7;
}
// A8EA94: using guessed type int std::_Facetptr<std::numpunct<char>>::_Psave;
// A8EA98: using guessed type int std::numpunct<char>::id;
// B607F0: using guessed type int std::locale::id::_Id_cnt;

//----- (006124E0) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *_Node, bool _Leftish)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v4; // edx@1
  std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *v5; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v6; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v7; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v8; // esi@1
  bool v9; // cl@1
  unsigned int v10; // edi@2
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v11; // edi@10
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v12; // edx@12
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >,bool> *v13; // eax@12
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v14; // ecx@15
  bool _Addleft; // [sp+Ch] [bp-4h]@1

  v4 = _Node;
  v5 = this;
  v6 = this->_Myhead;
  v7 = (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)v6->_Parent;
  v8 = (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)v6;
  v9 = 1;
  _Addleft = 1;
  if ( !v7->_Isnil )
  {
    v10 = _Node->_Myval.first;
    do
    {
      v8 = v7;
      if ( _Leftish )
        v9 = v7->_Myval.first >= v10;
      else
        v9 = v10 < v7->_Myval.first;
      _Addleft = v9;
      if ( v9 )
        v7 = v7->_Left;
      else
        v7 = v7->_Right;
    }
    while ( !v7->_Isnil );
  }
  v11 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v8;
  *(_DWORD *)&_Leftish = v8;
  if ( v9 )
  {
    if ( (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v8 == v5->_Myhead->_Left )
    {
      v12 = std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
              (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)v5,
              (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)&_Leftish,
              1,
              v8,
              (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)_Node)->_Ptr;
      v13 = result;
      result->first._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v12;
      result->second = 1;
      return v13;
    }
    std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,GuildNameCache::GuildNameStorage *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,GuildNameCache::GuildNameStorage *>>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&_Leftish);
    v11 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)_Leftish;
    v4 = _Node;
  }
  if ( v11->_Myval.first >= v4->_Myval.first )
  {
    operator delete(v4);
    v13 = result;
    result->first._Ptr = v11;
    result->second = 0;
  }
  else
  {
    v14 = std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
            (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)v5,
            (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)&_Leftish,
            _Addleft,
            v8,
            (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)v4)->_Ptr;
    v13 = result;
    result->first._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v14;
    result->second = 1;
  }
  return v13;
}

//----- (006125C0) --------------------------------------------------------
void __thiscall std::basic_ostream<char,std::char_traits<char>>::sentry::~sentry(std::basic_ostream<char,std::char_traits<char> >::sentry *this)
{
  std::basic_ostream<char,std::char_traits<char> >::sentry *v1; // esi@1
  int v2; // eax@3

  v1 = this;
  if ( !std::uncaught_exception() )
    std::basic_ostream<char,std::char_traits<char>>::_Osfx(v1->_Myostr);
  v2 = *(_DWORD *)&v1->_Myostr->gap0[*(_DWORD *)(*(_DWORD *)&v1->_Myostr->gap0[0] + 4) + 56];
  if ( v2 )
    (*(void (**)(void))(*(_DWORD *)v2 + 8))();
}

//----- (00612630) --------------------------------------------------------
std::basic_ostream<char,std::char_traits<char> > *__thiscall std::basic_ostream<char,std::char_traits<char>>::operator<<(std::basic_ostream<char,std::char_traits<char> > *this, unsigned __int16 _Val)
{
  std::basic_ostream<char,std::char_traits<char> > *v2; // esi@1
  int v3; // ecx@1
  int v4; // eax@3
  std::basic_ostream<char,std::char_traits<char> > *v5; // eax@4
  int v6; // eax@6
  std::locale *v7; // eax@7
  std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *v8; // eax@7
  std::locale::_Locimp *v9; // ebx@7
  unsigned int v10; // eax@8
  int v11; // edi@11
  void (__thiscall ***v12)(_DWORD, _DWORD); // edi@11
  int v13; // eax@13
  int v14; // ecx@13
  char v15; // dl@13
  int v16; // ecx@13
  std::locale::facetVtbl *v17; // edi@13
  void *(__thiscall *v18)(std::locale::facet *, unsigned int); // edx@13
  std::ios_base *v19; // ecx@16
  int v20; // eax@17
  int v21; // ecx@22
  int v23; // [sp+0h] [bp-44h]@1
  int v24; // [sp+10h] [bp-34h]@13
  std::basic_ostream<char,std::char_traits<char> >::sentry _Ok; // [sp+18h] [bp-2Ch]@1
  std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *_Nput_fac; // [sp+20h] [bp-24h]@7
  std::_Lockit v27; // [sp+24h] [bp-20h]@8
  std::locale result; // [sp+28h] [bp-1Ch]@7
  int _State; // [sp+2Ch] [bp-18h]@1
  std::basic_ostream<char,std::char_traits<char> > *v30; // [sp+30h] [bp-14h]@1
  int *v31; // [sp+34h] [bp-10h]@1
  int v32; // [sp+40h] [bp-4h]@3

  v31 = &v23;
  v2 = this;
  v30 = this;
  v3 = *(_DWORD *)&this->gap0[*(_DWORD *)(*(_DWORD *)&this->gap0[0] + 4) + 56];
  _State = 0;
  _Ok._Myostr = v30;
  if ( v3 )
    (*(void (**)(void))(*(_DWORD *)v3 + 4))();
  v4 = *(_DWORD *)(*(_DWORD *)&v2->gap0[0] + 4);
  v32 = 0;
  if ( !*(_DWORD *)&v2->gap0[v4 + 12] )
  {
    v5 = *(std::basic_ostream<char,std::char_traits<char> > **)&v2->gap0[v4 + 60];
    if ( v5 )
      std::basic_ostream<char,std::char_traits<char>>::flush(v5);
  }
  v6 = *(_DWORD *)&v2->gap0[0];
  _Ok._Ok = *(_DWORD *)&v2->gap0[*(_DWORD *)(*(_DWORD *)&v2->gap0[0] + 4) + 12] == 0;
  v32 = 1;
  if ( _Ok._Ok )
  {
    v7 = std::ios_base::getloc((std::ios_base *)((char *)v2 + *(_DWORD *)(v6 + 4)), &result);
    LOBYTE(v32) = 2;
    v8 = (std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *)std::use_facet<std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>>(v7);
    v9 = result._Ptr;
    _Nput_fac = v8;
    LOBYTE(v32) = 1;
    if ( result._Ptr )
    {
      std::_Lockit::_Lockit(&v27, 0);
      v10 = v9->_Refs;
      if ( v10 > 0 && v10 < 0xFFFFFFFF )
        v9->_Refs = v10 - 1;
      v11 = -(v9->_Refs == 0);
      std::_Lockit::~_Lockit(&v27);
      v12 = (void (__thiscall ***)(_DWORD, _DWORD))((unsigned int)v9 & v11);
      if ( v12 )
        (**v12)(v12, 1);
    }
    v13 = *(_DWORD *)(*(_DWORD *)&v2->gap0[0] + 4);
    v14 = *(_DWORD *)(*(_DWORD *)&v2->gap0[0] + 4);
    v15 = v2->gap0[v14 + 64];
    v16 = *(_DWORD *)&v2->gap0[v14 + 56];
    LOBYTE(v27._Locktype) = v15;
    v17 = _Nput_fac->vfptr;
    LOBYTE(v24) = 0;
    v18 = v17[6].__vecDelDtor;
    LOBYTE(v32) = 3;
    ((void (__thiscall *)(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *, int *, int, int, char *, int, _DWORD))v18)(
      _Nput_fac,
      &v24,
      v24,
      v16,
      (char *)v2 + v13,
      v27._Locktype,
      _Val);
    if ( (_BYTE)v24 )
      _State = 4;
    v32 = 1;
  }
  v19 = (std::ios_base *)((char *)v2 + *(_DWORD *)(*(_DWORD *)&v2->gap0[0] + 4));
  if ( _State )
  {
    v20 = _State | v19->_Mystate;
    if ( !v19[1].vfptr )
      v20 |= 4u;
    std::ios_base::clear(v19, v20, 0);
  }
  v32 = 5;
  if ( !std::uncaught_exception() )
    std::basic_ostream<char,std::char_traits<char>>::_Osfx(v2);
  v21 = *(_DWORD *)&v2->gap0[*(_DWORD *)(*(_DWORD *)&v2->gap0[0] + 4) + 56];
  v32 = -1;
  if ( v21 )
    (*(void (**)(void))(*(_DWORD *)v21 + 8))();
  return v2;
}

//----- (00612820) --------------------------------------------------------
std::ostreambuf_iterator<char,std::char_traits<char> > *__cdecl std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Iput(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, std::ostreambuf_iterator<char,std::char_traits<char> > *result, std::ostreambuf_iterator<char,std::char_traits<char> > _Dest, std::ios_base *_Iosbase, char _Fill, char *_Buf, unsigned int _Count)
{
  char *v7; // ebx@1
  std::locale *v8; // eax@1
  std::locale::facet *v9; // eax@1
  std::locale::_Locimp *v10; // esi@1
  unsigned int v11; // eax@2
  int v12; // edi@5
  void (__thiscall ***v13)(_DWORD, _DWORD); // edi@5
  char v14; // al@7
  char v15; // al@10
  std::basic_streambuf<char,std::char_traits<char> > *v16; // edx@15
  _BYTE *v17; // eax@15
  _BYTE *v18; // eax@18
  unsigned int v19; // esi@23
  std::basic_streambuf<char,std::char_traits<char> > *v20; // eax@23
  int v21; // edi@29
  unsigned int v22; // edi@33
  int v23; // eax@35
  std::ostreambuf_iterator<char,std::char_traits<char> > *v24; // eax@37
  std::ostreambuf_iterator<char,std::char_traits<char> > *v25; // eax@38
  std::ostreambuf_iterator<char,std::char_traits<char> > *v26; // eax@38
  char v27; // al@40
  std::ostreambuf_iterator<char,std::char_traits<char> > *v28; // eax@40
  std::ios_base *v29; // edx@40
  unsigned int v30; // ST14_4@40
  std::ostreambuf_iterator<char,std::char_traits<char> > *v31; // edi@40
  std::basic_streambuf<char,std::char_traits<char> > *v32; // eax@40
  std::ostreambuf_iterator<char,std::char_traits<char> > v34; // [sp+10h] [bp-54h]@1
  std::ostreambuf_iterator<char,std::char_traits<char> > *v35; // [sp+18h] [bp-4Ch]@1
  std::ostreambuf_iterator<char,std::char_traits<char> > v36; // [sp+1Ch] [bp-48h]@23
  std::locale v37; // [sp+24h] [bp-40h]@1
  std::ios_base *v38; // [sp+28h] [bp-3Ch]@1
  std::ostreambuf_iterator<char,std::char_traits<char> > v39; // [sp+2Ch] [bp-38h]@2
  unsigned int v40; // [sp+34h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Grouping; // [sp+38h] [bp-2Ch]@7
  int v42; // [sp+60h] [bp-4h]@1
  int _Desta; // [sp+74h] [bp+10h]@38
  unsigned int _Destb; // [sp+74h] [bp+10h]@40
  std::basic_streambuf<char,std::char_traits<char> > *_Dest_4; // [sp+78h] [bp+14h]@38

  v7 = _Buf;
  v35 = result;
  v38 = _Iosbase;
  v40 = _Count;
  v8 = std::ios_base::getloc(_Iosbase, &v37);
  v42 = 0;
  v9 = std::use_facet<std::numpunct<char>>(v8);
  v10 = v37._Ptr;
  v34._Strbuf = (std::basic_streambuf<char,std::char_traits<char> > *)v9;
  v42 = -1;
  if ( v37._Ptr )
  {
    std::_Lockit::_Lockit((std::_Lockit *)&v39._Strbuf, 0);
    v11 = v10->_Refs;
    if ( v11 && v11 < 0xFFFFFFFF )
      v10->_Refs = v11 - 1;
    v12 = -(v10->_Refs == 0);
    std::_Lockit::~_Lockit((std::_Lockit *)&v39._Strbuf);
    v13 = (void (__thiscall ***)(_DWORD, _DWORD))((unsigned int)v10 & v12);
    if ( v13 )
      (**v13)(v13, 1);
  }
  std::numpunct<char>::grouping((std::numpunct<char> *)v34._Strbuf, &_Grouping);
  v14 = *_Buf;
  v42 = 1;
  if ( v14 == 43 || v14 == 45 )
  {
    v39._Strbuf = (std::basic_streambuf<char,std::char_traits<char> > *)1;
  }
  else if ( v14 != 48 || (v15 = _Buf[1], v15 != 120) && v15 != 88 )
  {
    v39._Strbuf = 0;
  }
  else
  {
    v39._Strbuf = (std::basic_streambuf<char,std::char_traits<char> > *)2;
  }
  v16 = (std::basic_streambuf<char,std::char_traits<char> > *)_Grouping._Bx._Ptr;
  v17 = _Grouping._Bx._Ptr;
  if ( _Grouping._Myres < 0x10 )
    v17 = &_Grouping;
  if ( *v17 != 127 )
  {
    v18 = _Grouping._Bx._Ptr;
    if ( _Grouping._Myres < 0x10 )
      v18 = &_Grouping;
    if ( *v18 > 0 )
    {
      if ( _Grouping._Myres < 0x10 )
        v16 = (std::basic_streambuf<char,std::char_traits<char> > *)&_Grouping;
      v19 = v40;
      LOBYTE(v20) = v16->vfptr;
      for ( v36._Strbuf = v16; (_BYTE)v20 != 127; LOBYTE(v20) = v20->vfptr )
      {
        if ( (char)v20 <= 0 )
          break;
        v20 = (std::basic_streambuf<char,std::char_traits<char> > *)(char)v20;
        if ( (char)v20 >= v19 - (unsigned int)v39._Strbuf )
          break;
        v19 -= (unsigned int)v20;
        memmove_s(&_Buf[v19 + 1], v40 - v19 + 1, &_Buf[v19], v40 - v19 + 1);
        v20 = v36._Strbuf;
        ++v40;
        _Buf[v19] = 0;
        if ( SBYTE1(v20->vfptr) > 0 )
        {
          v20 = (std::basic_streambuf<char,std::char_traits<char> > *)((char *)v20 + 1);
          v36._Strbuf = v20;
        }
      }
    }
  }
  v21 = v38->_Wide;
  if ( SHIDWORD(v38->_Wide) >= 0 && (SHIDWORD(v38->_Wide) > 0 || v21) && v21 > v40 )
    v22 = v21 - v40;
  else
    v22 = 0;
  v23 = v38->_Fmtfl & 0x1C0;
  if ( v23 != 64 )
  {
    if ( v23 == 256 )
    {
      v25 = std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Put(
              this,
              &v36,
              _Dest,
              _Buf,
              (unsigned int)v39._Strbuf);
      _Desta = *(_DWORD *)&v25->_Failed;
      _Dest_4 = v25->_Strbuf;
      v40 -= (unsigned int)v39._Strbuf;
      v7 = (char *)v39._Strbuf + (unsigned int)_Buf;
      v26 = std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Rep(this, &v39, *v25, _Fill, v22);
      *(_DWORD *)&_Dest._Failed = *(_DWORD *)&v26->_Failed;
      _Dest._Strbuf = v26->_Strbuf;
    }
    else
    {
      v24 = std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Rep(
              this,
              &v39,
              _Dest,
              _Fill,
              v22);
      *(_DWORD *)&_Dest._Failed = *(_DWORD *)&v24->_Failed;
      _Dest._Strbuf = v24->_Strbuf;
    }
    v22 = 0;
  }
  v27 = ((int (*)(void))v34._Strbuf->vfptr->_Unlock)();
  LOBYTE(v37._Ptr) = v27;
  v28 = std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Putgrouped(
          this,
          &v34,
          _Dest,
          v7,
          v40,
          v27);
  v29 = v38;
  v30 = v22;
  v31 = v35;
  _Destb = *(_DWORD *)&v28->_Failed;
  v32 = v28->_Strbuf;
  LODWORD(v38->_Wide) = 0;
  HIDWORD(v29->_Wide) = 0;
  std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Rep(
    this,
    v31,
    (std::ostreambuf_iterator<char,std::char_traits<char> >)__PAIR__((unsigned int)v32, _Destb),
    _Fill,
    v30);
  if ( _Grouping._Myres >= 0x10 )
    operator delete(_Grouping._Bx._Ptr);
  return v31;
}

//----- (00612AB0) --------------------------------------------------------
std::basic_ostream<char,std::char_traits<char> > *__cdecl std::operator<<<std::char_traits<char>>(std::basic_ostream<char,std::char_traits<char> > *_Ostr, const char *_Val)
{
  int v2; // edx@1
  int v3; // ecx@1
  unsigned int v4; // eax@1
  unsigned int v5; // ebx@7
  unsigned __int64 v6; // kr18_8@7
  int v7; // edx@9
  int v8; // eax@11
  bool v9; // zf@11
  std::basic_ostream<char,std::char_traits<char> > *v10; // eax@12
  int v11; // eax@14
  int v12; // edx@15
  int v13; // eax@16
  int v14; // ecx@20
  int v15; // eax@20
  int v16; // ecx@20
  _DWORD *v17; // edx@21
  _DWORD *v18; // ecx@22
  _BYTE *v19; // edx@22
  int v20; // eax@27
  int v21; // edx@27
  int v22; // eax@30
  std::ios_base *v23; // ecx@31
  int v24; // eax@32
  bool v25; // al@35
  std::basic_ostream<char,std::char_traits<char> > *v26; // edi@35
  int v27; // ecx@37
  int v29; // et0@40
  int v30; // ecx@44
  int v31; // eax@44
  int v32; // ecx@44
  _DWORD *v33; // edx@45
  _DWORD *v34; // ecx@46
  _BYTE *v35; // edx@46
  int v36; // et0@50
  int v37; // [sp+0h] [bp-38h]@1
  std::basic_ostream<char,std::char_traits<char> >::sentry _Ok; // [sp+10h] [bp-28h]@9
  __int64 _Pad; // [sp+18h] [bp-20h]@7
  unsigned int v40; // [sp+20h] [bp-18h]@1
  int _State; // [sp+24h] [bp-14h]@1
  int *v42; // [sp+28h] [bp-10h]@1
  int v43; // [sp+34h] [bp-4h]@11

  v42 = &v37;
  _State = 0;
  v40 = strlen(_Val);
  v2 = *(_DWORD *)(*(_DWORD *)&_Ostr->gap0[0] + 4);
  v3 = *(_DWORD *)&_Ostr->gap0[v2 + 36];
  v4 = *(_DWORD *)&_Ostr->gap0[v2 + 32];
  if ( v3 >= 0 && (v3 > 0 || v4) && v3 >= 0 && (v3 > 0 || v4 > v40) )
  {
    v6 = __PAIR__(v3, v4) - v40;
    HIDWORD(_Pad) = v6 >> 32;
    v5 = v6;
  }
  else
  {
    v5 = 0;
    HIDWORD(_Pad) = 0;
  }
  v7 = *(_DWORD *)&_Ostr->gap0[v2 + 56];
  _Ok._Myostr = _Ostr;
  if ( v7 )
    (*(void (__thiscall **)(int))(*(_DWORD *)v7 + 4))(v7);
  v8 = *(_DWORD *)(*(_DWORD *)&_Ostr->gap0[0] + 4);
  v9 = *(_DWORD *)&_Ostr->gap0[v8 + 12] == 0;
  v43 = 0;
  if ( v9 )
  {
    v10 = *(std::basic_ostream<char,std::char_traits<char> > **)&_Ostr->gap0[v8 + 60];
    if ( v10 )
      std::basic_ostream<char,std::char_traits<char>>::flush(v10);
  }
  v11 = *(_DWORD *)(*(_DWORD *)&_Ostr->gap0[0] + 4);
  _Ok._Ok = *(_DWORD *)&_Ostr->gap0[v11 + 12] == 0;
  v43 = 1;
  if ( _Ok._Ok )
  {
    v13 = *(_DWORD *)&_Ostr->gap0[v11 + 20] & 0x1C0;
    LOBYTE(v43) = 2;
    if ( v13 == 64 )
      goto LABEL_53;
    while ( SHIDWORD(_Pad) >= 0 && (SHIDWORD(_Pad) > 0 || v5) )
    {
      v14 = *(_DWORD *)(*(_DWORD *)&_Ostr->gap0[0] + 4);
      LOBYTE(v15) = _Ostr->gap0[v14 + 64];
      v16 = *(_DWORD *)&_Ostr->gap0[v14 + 56];
      if ( **(_DWORD **)(v16 + 36) && (v17 = *(_DWORD **)(v16 + 52), *v17 > 0) )
      {
        --*v17;
        v18 = *(_DWORD **)(v16 + 36);
        v19 = (_BYTE *)(*v18)++;
        *v19 = v15;
        v15 = (unsigned __int8)v15;
      }
      else
      {
        v15 = (*(int (__stdcall **)(_DWORD))(*(_DWORD *)v16 + 12))((unsigned __int8)v15);
      }
      if ( v15 == -1 )
      {
        _State |= 4u;
        break;
      }
      v29 = (__PAIR__(HIDWORD(_Pad), v5--) - 1) >> 32;
      HIDWORD(_Pad) = v29;
    }
    if ( !_State )
    {
LABEL_53:
      v20 = (*(int (__stdcall **)(const char *, unsigned int, _DWORD))(**(_DWORD **)&_Ostr->gap0[*(_DWORD *)(*(_DWORD *)&_Ostr->gap0[0] + 4)
                                                                                               + 56]
                                                                     + 36))(
              _Val,
              v40,
              0);
      if ( v20 != v40 || v21 )
      {
        _State = 4;
      }
      else
      {
        while ( SHIDWORD(_Pad) >= 0 && (SHIDWORD(_Pad) > 0 || v5) )
        {
          v30 = *(_DWORD *)(*(_DWORD *)&_Ostr->gap0[0] + 4);
          LOBYTE(v31) = _Ostr->gap0[v30 + 64];
          v32 = *(_DWORD *)&_Ostr->gap0[v30 + 56];
          if ( **(_DWORD **)(v32 + 36) && (v33 = *(_DWORD **)(v32 + 52), *v33 > 0) )
          {
            --*v33;
            v34 = *(_DWORD **)(v32 + 36);
            v35 = (_BYTE *)(*v34)++;
            *v35 = v31;
            v31 = (unsigned __int8)v31;
          }
          else
          {
            v31 = (*(int (__stdcall **)(_DWORD))(*(_DWORD *)v32 + 12))((unsigned __int8)v31);
          }
          if ( v31 == -1 )
          {
            _State |= 4u;
            break;
          }
          v36 = (__PAIR__(HIDWORD(_Pad), v5--) - 1) >> 32;
          HIDWORD(_Pad) = v36;
        }
      }
    }
    v22 = *(_DWORD *)(*(_DWORD *)&_Ostr->gap0[0] + 4);
    *(_DWORD *)&_Ostr->gap0[v22 + 32] = 0;
    *(_DWORD *)&_Ostr->gap0[v22 + 36] = 0;
    v43 = 1;
    v12 = _State;
  }
  else
  {
    v12 = 4;
  }
  v23 = (std::ios_base *)((char *)_Ostr + *(_DWORD *)(*(_DWORD *)&_Ostr->gap0[0] + 4));
  if ( v12 )
  {
    v24 = v12 | v23->_Mystate;
    if ( !v23[1].vfptr )
      v24 |= 4u;
    std::ios_base::clear(v23, v24, 0);
  }
  v43 = 4;
  v25 = std::uncaught_exception();
  v26 = _Ok._Myostr;
  if ( !v25 )
    std::basic_ostream<char,std::char_traits<char>>::_Osfx(_Ok._Myostr);
  v27 = *(_DWORD *)&v26->gap0[*(_DWORD *)(*(_DWORD *)&v26->gap0[0] + 4) + 56];
  v43 = -1;
  if ( v27 )
    (*(void (**)(void))(*(_DWORD *)v27 + 8))();
  return _Ostr;
}

//----- (00612D70) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned short,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,unsigned short> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned short,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,unsigned short>>,0>>::_Buynode<std::pair<unsigned int,unsigned short>>(std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned short,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,unsigned short> >,0> > *this, std::pair<unsigned int,unsigned short> *_Val)
{
  std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned short,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,unsigned short> >,0> > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned short,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,unsigned short> >,0> >::_Node *result; // eax@1
  std::exception pExceptionObject; // [sp+4h] [bp-Ch]@5

  v2 = this;
  result = (std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned short,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,unsigned short> >,0> >::_Node *)operator new(0x18u);
  if ( !result )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  result->_Left = v2->_Myhead;
  result->_Parent = v2->_Myhead;
  result->_Right = v2->_Myhead;
  *(_WORD *)&result->_Color = 0;
  if ( result != (std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned short,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,unsigned short> >,0> >::_Node *)-12 )
    result->_Myval = (std::pair<unsigned int const ,unsigned short>)*_Val;
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00612DE0) --------------------------------------------------------
std::ostreambuf_iterator<char,std::char_traits<char> > *__thiscall std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::do_put(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, std::ostreambuf_iterator<char,std::char_traits<char> > *result, std::ostreambuf_iterator<char,std::char_traits<char> > _Dest, std::ios_base *_Iosbase, char _Fill, int _Val)
{
  std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *v6; // esi@1
  const char *v7; // eax@1
  unsigned int v8; // eax@1
  char _Buf[64]; // [sp+Ch] [bp-4Ch]@1
  char _Fmt[6]; // [sp+4Ch] [bp-Ch]@1

  v6 = this;
  v7 = std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Ifmt(
         this,
         _Fmt,
         "ld",
         _Iosbase->_Fmtfl);
  v8 = sprintf_s(_Buf, 0x40u, v7, _Val);
  std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Iput(
    v6,
    result,
    _Dest,
    _Iosbase,
    _Fill,
    _Buf,
    v8);
  return result;
}

//----- (00612E60) --------------------------------------------------------
std::ostreambuf_iterator<char,std::char_traits<char> > *__thiscall std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::do_put(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, std::ostreambuf_iterator<char,std::char_traits<char> > *result, std::ostreambuf_iterator<char,std::char_traits<char> > _Dest, std::ios_base *_Iosbase, char _Fill, unsigned int _Val)
{
  std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *v6; // esi@1
  const char *v7; // eax@1
  unsigned int v8; // eax@1
  char _Buf[64]; // [sp+Ch] [bp-4Ch]@1
  char _Fmt[6]; // [sp+4Ch] [bp-Ch]@1

  v6 = this;
  v7 = std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Ifmt(
         this,
         _Fmt,
         "lu",
         _Iosbase->_Fmtfl);
  v8 = sprintf_s(_Buf, 0x40u, v7, _Val);
  std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Iput(
    v6,
    result,
    _Dest,
    _Iosbase,
    _Fill,
    _Buf,
    v8);
  return result;
}

//----- (00612EE0) --------------------------------------------------------
std::ostreambuf_iterator<char,std::char_traits<char> > *__thiscall std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::do_put(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, std::ostreambuf_iterator<char,std::char_traits<char> > *result, std::ostreambuf_iterator<char,std::char_traits<char> > _Dest, std::ios_base *_Iosbase, char _Fill, __int64 _Val)
{
  std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *v6; // esi@1
  const char *v7; // eax@1
  unsigned int v8; // eax@1
  char _Buf[64]; // [sp+Ch] [bp-4Ch]@1
  char _Fmt[8]; // [sp+4Ch] [bp-Ch]@1

  v6 = this;
  v7 = std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Ifmt(
         this,
         _Fmt,
         "Ld",
         _Iosbase->_Fmtfl);
  v8 = sprintf_s(_Buf, 0x40u, v7, _Val);
  std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Iput(
    v6,
    result,
    _Dest,
    _Iosbase,
    _Fill,
    _Buf,
    v8);
  return result;
}

//----- (00612F60) --------------------------------------------------------
std::ostreambuf_iterator<char,std::char_traits<char> > *__thiscall std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::do_put(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, std::ostreambuf_iterator<char,std::char_traits<char> > *result, std::ostreambuf_iterator<char,std::char_traits<char> > _Dest, std::ios_base *_Iosbase, char _Fill, unsigned __int64 _Val)
{
  std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *v6; // esi@1
  const char *v7; // eax@1
  unsigned int v8; // eax@1
  char _Buf[64]; // [sp+Ch] [bp-4Ch]@1
  char _Fmt[8]; // [sp+4Ch] [bp-Ch]@1

  v6 = this;
  v7 = std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Ifmt(
         this,
         _Fmt,
         "Lu",
         _Iosbase->_Fmtfl);
  v8 = sprintf_s(_Buf, 0x40u, v7, _Val);
  std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Iput(
    v6,
    result,
    _Dest,
    _Iosbase,
    _Fill,
    _Buf,
    v8);
  return result;
}

//----- (00612FE0) --------------------------------------------------------
std::ostreambuf_iterator<char,std::char_traits<char> > *__thiscall std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::do_put(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, std::ostreambuf_iterator<char,std::char_traits<char> > *result, std::ostreambuf_iterator<char,std::char_traits<char> > _Dest, std::ios_base *_Iosbase, char _Fill, const void *_Val)
{
  std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *v6; // edi@1
  unsigned int v7; // eax@1
  char _Buf[64]; // [sp+Ch] [bp-44h]@1

  v6 = this;
  v7 = sprintf_s(_Buf, 0x40u, "%p", _Val);
  std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Iput(
    v6,
    result,
    _Dest,
    _Iosbase,
    _Fill,
    _Buf,
    v7);
  return result;
}

//----- (00613040) --------------------------------------------------------
std::ostreambuf_iterator<char,std::char_traits<char> > *__cdecl std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Fput(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, std::ostreambuf_iterator<char,std::char_traits<char> > *result, std::ostreambuf_iterator<char,std::char_traits<char> > _Dest, std::ios_base *_Iosbase, char _Fill, const char *_Buf, unsigned int _Beforepoint, unsigned int _Afterpoint, unsigned int _Trailing, unsigned int _Count)
{
  unsigned int v10; // ebx@1
  const char *v11; // edi@1
  std::locale *v12; // eax@1
  std::basic_streambuf<char,std::char_traits<char> > *v13; // esi@1
  std::basic_streambuf<char,std::char_traits<char> > *v14; // esi@2
  unsigned int v15; // eax@2
  int v16; // esi@5
  void (__thiscall ***v17)(_DWORD, _DWORD); // esi@5
  void (__thiscall *v18)(std::basic_streambuf<char,std::char_traits<char> > *); // eax@8
  char v19; // al@8
  int v20; // eax@11
  int v21; // esi@11
  const char *v22; // eax@11
  _BYTE *v23; // eax@13
  _BYTE *v24; // eax@16
  const char *v25; // ebx@20
  unsigned int v26; // ebx@26
  void *v27; // ebx@27
  char *v28; // eax@29
  unsigned int v29; // edi@31
  unsigned int v30; // eax@31
  int v31; // ecx@40
  unsigned int v32; // eax@40
  int v33; // eax@46
  std::ostreambuf_iterator<char,std::char_traits<char> > *v34; // eax@48
  std::ostreambuf_iterator<char,std::char_traits<char> > *v35; // eax@50
  std::ostreambuf_iterator<char,std::char_traits<char> > *v36; // eax@51
  int v37; // eax@53
  unsigned int v38; // eax@54
  int v39; // ebx@54
  std::ostreambuf_iterator<char,std::char_traits<char> > *v40; // eax@54
  char v41; // al@54
  std::ostreambuf_iterator<char,std::char_traits<char> > *v42; // eax@54
  std::ostreambuf_iterator<char,std::char_traits<char> > *v43; // eax@54
  int v44; // ecx@54
  int v45; // eax@55
  int v46; // ebx@56
  std::ostreambuf_iterator<char,std::char_traits<char> > *v47; // eax@56
  std::ostreambuf_iterator<char,std::char_traits<char> > *v48; // eax@56
  bool v49; // zf@56
  const char *v50; // ecx@56
  std::ostreambuf_iterator<char,std::char_traits<char> > *v51; // eax@58
  int v52; // edx@58
  std::ostreambuf_iterator<char,std::char_traits<char> > *v53; // eax@59
  std::ostreambuf_iterator<char,std::char_traits<char> > *v54; // eax@59
  unsigned int v55; // ecx@59
  std::ios_base *v56; // edx@59
  std::basic_streambuf<char,std::char_traits<char> > *v57; // eax@59
  std::ostreambuf_iterator<char,std::char_traits<char> > v59; // [sp+14h] [bp-80h]@1
  std::ios_base *v60; // [sp+1Ch] [bp-78h]@1
  std::ostreambuf_iterator<char,std::char_traits<char> > v61; // [sp+20h] [bp-74h]@1
  unsigned int v62; // [sp+28h] [bp-6Ch]@1
  std::ostreambuf_iterator<char,std::char_traits<char> > v63; // [sp+2Ch] [bp-68h]@2
  std::basic_streambuf<char,std::char_traits<char> > *_Kseparator; // [sp+34h] [bp-60h]@2
  char _Enders[3]; // [sp+38h] [bp-5Ch]@11
  unsigned int v66; // [sp+3Ch] [bp-58h]@1
  unsigned int v67; // [sp+40h] [bp-54h]@1
  const char *_Pointptr; // [sp+44h] [bp-50h]@11
  unsigned int v69; // [sp+48h] [bp-4Ch]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Grouping; // [sp+4Ch] [bp-48h]@8
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Groupstring; // [sp+68h] [bp-2Ch]@8
  int v72; // [sp+90h] [bp-4h]@1
  int _Desta; // [sp+A4h] [bp+10h]@54
  std::ostreambuf_iterator<char,std::char_traits<char> > _Destb; // [sp+A4h] [bp+10h]@54
  std::ostreambuf_iterator<char,std::char_traits<char> > _Destc; // [sp+A4h] [bp+10h]@54
  int _Destd; // [sp+A4h] [bp+10h]@56
  int _Deste; // [sp+A4h] [bp+10h]@56
  int _Destf; // [sp+A4h] [bp+10h]@59
  std::basic_streambuf<char,std::char_traits<char> > *_Dest_4; // [sp+A8h] [bp+14h]@54
  std::basic_streambuf<char,std::char_traits<char> > *_Dest_4a; // [sp+A8h] [bp+14h]@56
  std::basic_streambuf<char,std::char_traits<char> > *_Dest_4b; // [sp+A8h] [bp+14h]@56
  std::basic_streambuf<char,std::char_traits<char> > *_Dest_4c; // [sp+A8h] [bp+14h]@59

  v10 = _Count;
  v11 = _Buf;
  v62 = _Afterpoint;
  v66 = _Beforepoint;
  v60 = _Iosbase;
  v67 = _Trailing;
  v69 = _Count;
  v12 = std::ios_base::getloc(_Iosbase, (std::locale *)&v61._Strbuf);
  v72 = 0;
  v13 = (std::basic_streambuf<char,std::char_traits<char> > *)std::use_facet<std::numpunct<char>>(v12);
  v59._Strbuf = v13;
  v72 = -1;
  if ( v61._Strbuf )
  {
    v14 = v61._Strbuf;
    _Kseparator = v61._Strbuf;
    std::_Lockit::_Lockit((std::_Lockit *)&v63._Strbuf, 0);
    v15 = (unsigned int)v14->_Mylock._Mtx;
    if ( v15 && v15 < 0xFFFFFFFF )
      v14->_Mylock._Mtx = (void *)(v15 - 1);
    v16 = -(v14->_Mylock._Mtx == 0);
    std::_Lockit::~_Lockit((std::_Lockit *)&v63._Strbuf);
    v17 = (void (__thiscall ***)(_DWORD, _DWORD))((unsigned int)_Kseparator & v16);
    if ( v17 )
      (**v17)(v17, 1);
    v13 = v59._Strbuf;
  }
  std::numpunct<char>::grouping((std::numpunct<char> *)v13, &_Grouping);
  v18 = v13->vfptr->_Unlock;
  v72 = 1;
  LOBYTE(_Kseparator) = ((int (__thiscall *)(std::basic_streambuf<char,std::char_traits<char> > *))v18)(v13);
  _Groupstring._Myres = 15;
  _Groupstring._Mysize = 0;
  _Groupstring._Bx._Buf[0] = 0;
  v19 = *_Buf;
  LOBYTE(v72) = 2;
  if ( v19 == 43 || (v63._Strbuf = 0, v19 == 45) )
    v63._Strbuf = (std::basic_streambuf<char,std::char_traits<char> > *)1;
  _Enders[0] = *localeconv()->decimal_point;
  *(_WORD *)&_Enders[1] = 101;
  memchr((char *)_Buf, 101, _Count);
  v21 = v20;
  memchr((char *)_Buf, _Enders[0], _Count);
  _Pointptr = v22;
  if ( !v22 )
    v67 = 0;
  v23 = _Grouping._Bx._Ptr;
  if ( _Grouping._Myres < 0x10 )
    v23 = &_Grouping;
  if ( *v23 != 127 )
  {
    v24 = _Grouping._Bx._Ptr;
    if ( _Grouping._Myres < 0x10 )
      v24 = &_Grouping;
    if ( *v24 > 0 )
    {
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&_Groupstring, _Buf, _Count);
      if ( v21 )
      {
        v25 = _Pointptr;
        if ( !_Pointptr )
        {
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&_Groupstring, v66, 48);
          v66 = (unsigned int)v25;
        }
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::insert(
          &_Groupstring,
          v21 - (_DWORD)_Buf,
          v67,
          48);
      }
      else
      {
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&_Groupstring, v67, 48);
        v25 = _Pointptr;
      }
      if ( v25 )
      {
        v26 = v25 - _Buf;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::insert(&_Groupstring, v26 + 1, v62, 48);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::insert(&_Groupstring, v26, v66, 48);
        v62 = 0;
      }
      else
      {
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&_Groupstring, v66, 48);
      }
      v27 = _Grouping._Bx._Ptr;
      v66 = 0;
      if ( _Grouping._Myres < 0x10 )
        v27 = &_Grouping;
      v28 = _Groupstring._Bx._Ptr;
      if ( _Groupstring._Myres < 0x10 )
        v28 = (char *)&_Groupstring;
      strcspn(v28, _Enders);
      v29 = v30;
      for ( LOBYTE(v30) = *(_BYTE *)v27; *(_BYTE *)v27 != 127; LOBYTE(v30) = *(_BYTE *)v27 )
      {
        if ( (char)v30 <= 0 )
          break;
        v30 = (char)v30;
        if ( (char)v30 >= v29 - (unsigned int)v63._Strbuf )
          break;
        v29 -= v30;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::insert(&_Groupstring, v29, 1u, 0);
        if ( *((_BYTE *)v27 + 1) > 0 )
          v27 = (char *)v27 + 1;
      }
      v11 = _Groupstring._Bx._Ptr;
      if ( _Groupstring._Myres < 0x10 )
        v11 = (const char *)&_Groupstring;
      v67 = 0;
      v69 = _Groupstring._Mysize;
      v10 = _Groupstring._Mysize;
    }
  }
  v31 = v60->_Wide;
  v32 = v66 + v62 + v10 + v67;
  if ( SHIDWORD(v60->_Wide) >= 0 && (SHIDWORD(v60->_Wide) > 0 || v31) && v31 > v32 )
    _Pointptr = (const char *)(v31 - v32);
  else
    _Pointptr = 0;
  v33 = v60->_Fmtfl & 0x1C0;
  if ( v33 != 64 )
  {
    if ( v33 == 256 )
    {
      if ( v63._Strbuf )
      {
        v35 = std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Put(this, &v63, _Dest, v11, 1u);
        *(_DWORD *)&_Dest._Failed = *(_DWORD *)&v35->_Failed;
        ++v11;
        --v10;
        _Dest._Strbuf = v35->_Strbuf;
        v69 = v10;
      }
      v36 = std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Rep(
              this,
              &v63,
              _Dest,
              _Fill,
              (unsigned int)_Pointptr);
      *(_DWORD *)&_Dest._Failed = *(_DWORD *)&v36->_Failed;
      _Dest._Strbuf = v36->_Strbuf;
    }
    else
    {
      v34 = std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Rep(
              this,
              &v63,
              _Dest,
              _Fill,
              (unsigned int)_Pointptr);
      *(_DWORD *)&_Dest._Failed = *(_DWORD *)&v34->_Failed;
      _Dest._Strbuf = v34->_Strbuf;
    }
    _Pointptr = 0;
  }
  memchr((char *)v11, _Enders[0], v10);
  if ( v37 )
  {
    v38 = v37 - (_DWORD)v11;
    v39 = v38 + 1;
    v40 = std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Putgrouped(
            this,
            &v63,
            _Dest,
            v11,
            v38,
            (char)_Kseparator);
    _Desta = *(_DWORD *)&v40->_Failed;
    _Dest_4 = v40->_Strbuf;
    _Destb = *std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Rep(this, &v63, *v40, 48, v66);
    v41 = (*(int (**)(void))&v59._Strbuf->vfptr->gap4[0])();
    LOBYTE(v61._Strbuf) = v41;
    v42 = std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Rep(this, &v59, _Destb, v41, 1u);
    _Destc = *v42;
    v43 = std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Rep(this, &v61, *v42, 48, v62);
    v44 = *(_DWORD *)&v43->_Failed;
    v11 += v39;
    v69 -= v39;
    v10 = v69;
    *(_DWORD *)&_Dest._Failed = v44;
    _Dest._Strbuf = v43->_Strbuf;
  }
  memchr((char *)v11, 101, v10);
  if ( v45 )
  {
    v46 = v45 - (_DWORD)v11 + 1;
    v47 = std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Putgrouped(
            this,
            &v61,
            _Dest,
            v11,
            v45 - (_DWORD)v11,
            (char)_Kseparator);
    _Destd = *(_DWORD *)&v47->_Failed;
    _Dest_4a = v47->_Strbuf;
    v48 = std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Rep(this, &v61, *v47, 48, v67);
    _Deste = *(_DWORD *)&v48->_Failed;
    v49 = (v60->_Fmtfl & 4) == 0;
    _Dest_4b = v48->_Strbuf;
    v67 = 0;
    v50 = "E";
    if ( v49 )
      v50 = "e";
    v51 = std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Put(this, &v61, *v48, v50, 1u);
    v52 = *(_DWORD *)&v51->_Failed;
    v11 += v46;
    v69 -= v46;
    v10 = v69;
    *(_DWORD *)&_Dest._Failed = v52;
    _Dest._Strbuf = v51->_Strbuf;
  }
  v53 = std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Putgrouped(
          this,
          &v61,
          _Dest,
          v11,
          v10,
          (char)_Kseparator);
  _Destf = *(_DWORD *)&v53->_Failed;
  _Dest_4c = v53->_Strbuf;
  v54 = std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Rep(this, &v59, *v53, 48, v67);
  v56 = v60;
  v55 = *(_DWORD *)&v54->_Failed;
  v57 = v54->_Strbuf;
  LODWORD(v60->_Wide) = 0;
  HIDWORD(v56->_Wide) = 0;
  std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Rep(
    this,
    result,
    (std::ostreambuf_iterator<char,std::char_traits<char> >)__PAIR__((unsigned int)v57, v55),
    _Fill,
    (unsigned int)_Pointptr);
  if ( _Groupstring._Myres >= 0x10 )
    operator delete(_Groupstring._Bx._Ptr);
  _Groupstring._Myres = 15;
  _Groupstring._Mysize = 0;
  _Groupstring._Bx._Buf[0] = 0;
  if ( _Grouping._Myres >= 0x10 )
    operator delete(_Grouping._Bx._Ptr);
  return result;
}

//----- (006135B0) --------------------------------------------------------
std::ostreambuf_iterator<char,std::char_traits<char> > *__thiscall std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::do_put(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, std::ostreambuf_iterator<char,std::char_traits<char> > *result, std::ostreambuf_iterator<char,std::char_traits<char> > _Dest, std::ios_base *_Iosbase, char _Fill, bool _Val)
{
  bool v6; // zf@1
  std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *v7; // ebx@1
  std::ostreambuf_iterator<char,std::char_traits<char> > *v8; // eax@2
  std::locale *v9; // eax@3
  std::locale::facet *v10; // eax@3
  std::locale::_Locimp *v11; // edi@3
  unsigned int v12; // eax@4
  int v13; // edi@7
  void (__thiscall ***v14)(_DWORD, _DWORD); // edi@7
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v15; // eax@10
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v16; // eax@12
  int v17; // edi@14
  unsigned int v18; // ecx@14
  unsigned int v19; // edi@18
  std::ostreambuf_iterator<char,std::char_traits<char> > *v20; // eax@21
  const char *v21; // eax@22
  std::ostreambuf_iterator<char,std::char_traits<char> > *v22; // eax@24
  unsigned int v23; // ecx@24
  std::basic_streambuf<char,std::char_traits<char> > *v24; // eax@24
  std::ostreambuf_iterator<char,std::char_traits<char> > *v25; // esi@24
  std::ostreambuf_iterator<char,std::char_traits<char> > v26; // [sp+10h] [bp-68h]@4
  std::ostreambuf_iterator<char,std::char_traits<char> > v27; // [sp+18h] [bp-60h]@3
  std::locale v28; // [sp+20h] [bp-58h]@3
  std::ostreambuf_iterator<char,std::char_traits<char> > *v29; // [sp+24h] [bp-54h]@1
  std::locale::_Locimp *v30; // [sp+28h] [bp-50h]@4
  char _Ch[4]; // [sp+2Ch] [bp-4Ch]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v32; // [sp+30h] [bp-48h]@10
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Str; // [sp+4Ch] [bp-2Ch]@9
  int v34; // [sp+74h] [bp-4h]@3

  v6 = (_Iosbase->_Fmtfl & 0x4000) == 0;
  v7 = this;
  v29 = result;
  _Ch[0] = _Fill;
  if ( v6 )
  {
    ((void (__stdcall *)(std::ostreambuf_iterator<char,std::char_traits<char> > *, _DWORD, std::basic_streambuf<char,std::char_traits<char> > *, std::ios_base *, _DWORD, _DWORD))this->vfptr[7].__vecDelDtor)(
      result,
      *(_DWORD *)&_Dest._Failed,
      _Dest._Strbuf,
      _Iosbase,
      *(_DWORD *)_Ch,
      _Val);
    v8 = result;
  }
  else
  {
    v9 = std::ios_base::getloc(_Iosbase, &v28);
    v34 = 0;
    v10 = std::use_facet<std::numpunct<char>>(v9);
    v11 = v28._Ptr;
    v27._Strbuf = (std::basic_streambuf<char,std::char_traits<char> > *)v10;
    v34 = -1;
    if ( v28._Ptr )
    {
      v30 = v28._Ptr;
      std::_Lockit::_Lockit((std::_Lockit *)&v26._Strbuf, 0);
      v12 = v11->_Refs;
      if ( v12 && v12 < 0xFFFFFFFF )
        v11->_Refs = v12 - 1;
      v13 = -(v11->_Refs == 0);
      std::_Lockit::~_Lockit((std::_Lockit *)&v26._Strbuf);
      v14 = (void (__thiscall ***)(_DWORD, _DWORD))((unsigned int)v30 & v13);
      if ( v14 )
        (**v14)(v14, 1);
    }
    _Str._Myres = 15;
    _Str._Mysize = 0;
    _Str._Bx._Buf[0] = 0;
    v34 = 1;
    if ( _Val )
    {
      v15 = std::numpunct<char>::truename((std::numpunct<char> *)v27._Strbuf, &v32);
      LOBYTE(v34) = 2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Str, v15);
      LOBYTE(v34) = 1;
      if ( v32._Myres >= 0x10 )
        operator delete(v32._Bx._Ptr);
    }
    else
    {
      v16 = std::numpunct<char>::falsename((std::numpunct<char> *)v27._Strbuf, &v32);
      LOBYTE(v34) = 3;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Str, v16);
      LOBYTE(v34) = 1;
      if ( v32._Myres >= 0x10 )
        operator delete(v32._Bx._Ptr);
    }
    v17 = _Iosbase->_Wide;
    v18 = _Str._Mysize;
    if ( SHIDWORD(_Iosbase->_Wide) >= 0 && (SHIDWORD(_Iosbase->_Wide) > 0 || v17) && v17 > _Str._Mysize )
      v19 = v17 - _Str._Mysize;
    else
      v19 = 0;
    if ( (_Iosbase->_Fmtfl & 0x1C0) != 64 )
    {
      v20 = std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Rep(v7, &v26, _Dest, _Ch[0], v19);
      *(_DWORD *)&_Dest._Failed = *(_DWORD *)&v20->_Failed;
      v18 = _Str._Mysize;
      _Dest._Strbuf = v20->_Strbuf;
      v19 = 0;
    }
    v21 = _Str._Bx._Ptr;
    if ( _Str._Myres < 0x10 )
      v21 = (const char *)&_Str;
    v22 = std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Put(v7, &v27, _Dest, v21, v18);
    v23 = *(_DWORD *)&v22->_Failed;
    v24 = v22->_Strbuf;
    _Iosbase->_Wide = 0i64;
    v25 = v29;
    std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Rep(
      v7,
      v29,
      (std::ostreambuf_iterator<char,std::char_traits<char> >)__PAIR__((unsigned int)v24, v23),
      _Ch[0],
      v19);
    if ( _Str._Myres >= 0x10 )
      operator delete(_Str._Bx._Ptr);
    v8 = v25;
  }
  return v8;
}

//----- (006137D0) --------------------------------------------------------
std::ostreambuf_iterator<char,std::char_traits<char> > *__thiscall std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::do_put(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, std::ostreambuf_iterator<char,std::char_traits<char> > *result, std::ostreambuf_iterator<char,std::char_traits<char> > _Dest, std::ios_base *_Iosbase, char _Fill, long double _Val)
{
  unsigned int v6; // esi@1
  int v7; // eax@1
  unsigned int v8; // edi@1
  long double v9; // st7@11
  int v10; // ecx@11
  unsigned int v11; // esi@11
  int v12; // edx@11
  long double v13; // st7@14
  long double v14; // st6@14
  double v15; // st5@16
  double v16; // st4@16
  double v17; // st5@17
  long double v18; // rt2@18
  double v19; // rtt@20
  long double v20; // st4@20
  double v21; // rt0@21
  long double v22; // st5@21
  double v23; // st7@21
  long double v24; // st5@25
  long double v25; // rt1@26
  unsigned __int8 v26; // cf@29
  long double v27; // rt2@29
  long double v28; // st5@29
  long double v29; // st6@29
  long double v30; // st5@29
  char *v31; // eax@35
  int v32; // edx@39
  int v33; // ecx@40
  unsigned int v34; // eax@45
  std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *v36; // [sp+14h] [bp-8Ch]@1
  int _Significance; // [sp+1Ch] [bp-84h]@9
  unsigned int _Beforepoint; // [sp+20h] [bp-80h]@11
  bool _Signed; // [sp+27h] [bp-79h]@14
  char _Buf[108]; // [sp+28h] [bp-78h]@45
  char _Fmt[8]; // [sp+94h] [bp-Ch]@35

  v6 = _Iosbase->_Prec;
  v7 = HIDWORD(_Iosbase->_Prec);
  v8 = 0;
  v36 = this;
  if ( v7 <= 0 && (v7 < 0 || v6 <= 0) && !(_Iosbase->_Fmtfl & 0x2000) )
  {
    v6 = 6;
    v7 = 0;
  }
  if ( v7 < 0 || v7 <= 0 && v6 <= 0x24 )
    _Significance = v6;
  else
    _Significance = 36;
  v9 = _Val;
  v10 = (__PAIR__((unsigned int)v7, v6) - _Significance) >> 32;
  v11 = v6 - _Significance;
  v12 = _Iosbase->_Fmtfl;
  _Beforepoint = 0;
  if ( (_Iosbase->_Fmtfl & 0x3000) == 0x2000 && _Val != 0.5 * _Val )
  {
    if ( _Val >= 0.0 )
    {
      _Signed = 0;
      v14 = _Val;
      v13 = 0.0;
    }
    else
    {
      v13 = 0.0;
      _Signed = 1;
      v14 = -_Val;
    }
    v15 = 1.0e35;
    v16 = 1.0e10;
    if ( v14 >= 1.0e35 )
    {
      while ( _Beforepoint < 0x1388 )
      {
        v14 = v14 / v16;
        _Beforepoint += 10;
        v19 = v16;
        v20 = v15;
        v17 = v19;
        if ( v20 > v14 )
          goto LABEL_21;
        v18 = v20;
        v16 = v17;
        v15 = v18;
      }
    }
    v17 = v16;
LABEL_21:
    v21 = v17;
    v22 = v13;
    v23 = v21;
    if ( v22 < v14 && v10 >= 0 && (v10 > 0 || v11 >= 0xA) )
    {
      v24 = 1.0e-35;
      while ( v24 >= v14 && v8 < 0x1388 )
      {
        v26 = __CFADD__(v11, -10);
        v11 -= 10;
        v27 = v24;
        v28 = v14;
        v29 = v27;
        v10 = v26 + v10 - 1;
        v30 = v28 * v23;
        v8 += 10;
        if ( v10 <= 0 && (v10 < 0 || v11 < 0xA) )
        {
          v14 = v30;
          break;
        }
        v25 = v30;
        v24 = v29;
        v14 = v25;
      }
    }
    v9 = v14;
    if ( _Signed )
      v9 = -v14;
  }
  _Fmt[0] = 37;
  v31 = &_Fmt[1];
  if ( v12 & 0x20 )
  {
    _Fmt[1] = 43;
    v31 = &_Fmt[2];
  }
  if ( v12 & 0x10 )
    *v31++ = 35;
  v32 = v12 & 0x3000;
  *(_WORD *)v31 = 10798;
  if ( v32 == 0x2000 )
  {
    LOBYTE(v33) = 102;
  }
  else if ( v32 == 12288 )
  {
    LOBYTE(v33) = 97;
  }
  else
  {
    LOBYTE(v10) = v32 != 4096;
    v33 = 2 * v10 + 101;
  }
  v31[2] = v33;
  v31[3] = 0;
  v34 = sprintf_s(_Buf, 0x6Cu, _Fmt, _Significance, LODWORD(v9), (_DWORD)(*(unsigned __int64 *)&v9 >> 32));
  std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Fput(
    v36,
    result,
    _Dest,
    _Iosbase,
    _Fill,
    _Buf,
    _Beforepoint,
    v8,
    v11,
    v34);
  return result;
}

//----- (006139E0) --------------------------------------------------------
std::ostreambuf_iterator<char,std::char_traits<char> > *__thiscall std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::do_put(std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *this, std::ostreambuf_iterator<char,std::char_traits<char> > *result, std::ostreambuf_iterator<char,std::char_traits<char> > _Dest, std::ios_base *_Iosbase, char _Fill, long double _Val)
{
  unsigned int v6; // esi@1
  int v7; // eax@1
  unsigned int v8; // edi@1
  int v9; // ecx@11
  unsigned int v10; // esi@11
  int v11; // edx@11
  long double v12; // st6@12
  double v13; // st5@14
  double v14; // st4@14
  double v15; // st5@15
  long double v16; // rt0@17
  double v17; // rt1@19
  long double v18; // st4@19
  double v19; // st7@20
  long double v20; // st5@24
  long double v21; // rtt@25
  unsigned __int8 v22; // cf@28
  long double v23; // rt0@28
  long double v24; // st5@28
  long double v25; // st6@28
  long double v26; // st5@28
  long double v27; // st7@32
  char *v28; // eax@36
  int v29; // edx@40
  int v30; // ecx@41
  unsigned int v31; // eax@45
  std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > > *v33; // [sp+14h] [bp-8Ch]@1
  int _Significance; // [sp+1Ch] [bp-84h]@9
  unsigned int _Beforepoint; // [sp+20h] [bp-80h]@11
  bool _Signed; // [sp+27h] [bp-79h]@13
  char _Buf[108]; // [sp+28h] [bp-78h]@45
  char _Fmt[8]; // [sp+94h] [bp-Ch]@36

  v6 = _Iosbase->_Prec;
  v7 = HIDWORD(_Iosbase->_Prec);
  v8 = 0;
  v33 = this;
  if ( v7 <= 0 && (v7 < 0 || v6 <= 0) && !(_Iosbase->_Fmtfl & 0x2000) )
  {
    v6 = 6;
    v7 = 0;
  }
  if ( v7 < 0 || v7 <= 0 && v6 <= 0x24 )
    _Significance = v6;
  else
    _Significance = 36;
  v9 = (__PAIR__((unsigned int)v7, v6) - _Significance) >> 32;
  v10 = v6 - _Significance;
  v11 = _Iosbase->_Fmtfl;
  _Beforepoint = 0;
  if ( (_Iosbase->_Fmtfl & 0x3000) == 0x2000 )
  {
    v12 = _Val;
    if ( _Val >= 0.0 )
    {
      _Signed = 0;
    }
    else
    {
      _Signed = 1;
      v12 = -_Val;
    }
    v13 = 1.0e35;
    v14 = 1.0e10;
    if ( v12 >= 1.0e35 )
    {
      while ( _Beforepoint < 0x1388 )
      {
        v12 = v12 / v14;
        _Beforepoint += 10;
        v17 = v14;
        v18 = v13;
        v15 = v17;
        if ( v18 > v12 )
          goto LABEL_20;
        v16 = v18;
        v14 = v15;
        v13 = v16;
      }
    }
    v15 = v14;
LABEL_20:
    v19 = v15;
    if ( v12 > 0.0 && v9 >= 0 && (v9 > 0 || v10 >= 0xA) )
    {
      v20 = 1.0e-35;
      while ( v20 >= v12 && v8 < 0x1388 )
      {
        v22 = __CFADD__(v10, -10);
        v10 -= 10;
        v23 = v20;
        v24 = v12;
        v25 = v23;
        v9 = v22 + v9 - 1;
        v26 = v24 * v19;
        v8 += 10;
        if ( v9 <= 0 && (v9 < 0 || v10 < 0xA) )
        {
          v12 = v26;
          break;
        }
        v21 = v26;
        v20 = v25;
        v12 = v21;
      }
    }
    v27 = v12;
    if ( _Signed )
      v27 = -v12;
  }
  else
  {
    v27 = _Val;
  }
  _Fmt[0] = 37;
  v28 = &_Fmt[1];
  if ( v11 & 0x20 )
  {
    _Fmt[1] = 43;
    v28 = &_Fmt[2];
  }
  if ( v11 & 0x10 )
    *v28++ = 35;
  v29 = v11 & 0x3000;
  *(_WORD *)v28 = 10798;
  v28[2] = 76;
  if ( v29 == 0x2000 )
  {
    LOBYTE(v30) = 102;
  }
  else if ( v29 == 12288 )
  {
    LOBYTE(v30) = 97;
  }
  else
  {
    LOBYTE(v9) = v29 != 4096;
    v30 = 2 * v9 + 101;
  }
  v28[3] = v30;
  v28[4] = 0;
  v31 = sprintf_s(_Buf, 0x6Cu, _Fmt, _Significance, LODWORD(v27), (_DWORD)(*(unsigned __int64 *)&v27 >> 32));
  std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>::_Fput(
    v33,
    result,
    _Dest,
    _Iosbase,
    _Fill,
    _Buf,
    _Beforepoint,
    v8,
    v10,
    v31);
  return result;
}

//----- (00613BE0) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::numpunct<char>::do_grouping(std::numpunct<char> *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result)
{
  const char *v2; // ecx@1

  v2 = this->_Grouping;
  result->_Myres = 15;
  result->_Mysize = 0;
  result->_Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(result, v2, strlen(v2));
  return result;
}

//----- (00613C30) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::numpunct<char>::do_falsename(std::numpunct<char> *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result)
{
  const char *v2; // ecx@1

  v2 = this->_Falsename;
  result->_Myres = 15;
  result->_Mysize = 0;
  result->_Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(result, v2, strlen(v2));
  return result;
}

//----- (00613C80) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::numpunct<char>::do_truename(std::numpunct<char> *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result)
{
  const char *v2; // ecx@1

  v2 = this->_Truename;
  result->_Myres = 15;
  result->_Mysize = 0;
  result->_Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(result, v2, strlen(v2));
  return result;
}

//----- (00613CD0) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::str(std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char> > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result)
{
  int v2; // edx@1
  char **v3; // eax@2
  char *v4; // eax@3
  char *v5; // ecx@5
  char **v6; // edx@9
  int v7; // eax@10
  char *v8; // ecx@10
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Nul; // [sp+14h] [bp-48h]@11
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Str; // [sp+30h] [bp-2Ch]@5
  int v12; // [sp+58h] [bp-4h]@5

  v2 = this->_Mystate;
  if ( !(v2 & 2) )
  {
    v3 = this->_IPnext;
    if ( *v3 )
    {
      v4 = *v3;
      if ( this->_Seekhigh >= v4 )
        v4 = this->_Seekhigh;
      v5 = *this->_IPfirst;
      _Str._Myres = 15;
      _Str._Mysize = 0;
      _Str._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Str, v5, v4 - v5);
      v12 = 0;
      goto LABEL_6;
    }
  }
  if ( !(v2 & 4) )
  {
    v6 = this->_IGnext;
    if ( *v6 )
    {
      v7 = (int)&(*v6)[*this->_IGcount];
      v8 = *this->_IGfirst;
      _Str._Myres = 15;
      _Str._Mysize = 0;
      _Str._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Str, v8, v7 - (_DWORD)v8);
      v12 = 1;
LABEL_6:
      result->_Myres = 15;
      result->_Mysize = 0;
      result->_Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(result, &_Str);
      if ( _Str._Myres >= 0x10 )
        operator delete(_Str._Bx._Ptr);
      return result;
    }
  }
  _Nul._Myres = 15;
  _Nul._Mysize = 0;
  _Nul._Bx._Buf[0] = 0;
  result->_Myres = 15;
  result->_Mysize = 0;
  v12 = 2;
  result->_Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(result, &_Nul);
  if ( _Nul._Myres >= 0x10 )
    operator delete(_Nul._Bx._Ptr);
  return result;
}

//----- (00613E00) --------------------------------------------------------
MonsterCardInventoryWin *__thiscall MonsterCardInventoryWin::`vector deleting destructor'(MonsterCardInventoryWin *this, unsigned int a2)
{
  MonsterCardInventoryWin *v2; // esi@1

  v2 = this;
  MonsterCardInventoryWin::~MonsterCardInventoryWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00613E30) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char> > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result)
{
  std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::str(
    (std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char> > *)&this->gap10[8],
    result);
  return result;
}

//----- (00613E60) --------------------------------------------------------
__int64 __cdecl Bank::GetMoney()
{
  return Bank::ms_i64Money;
}
// A8EAA0: using guessed type __int64 Bank::ms_i64Money;

//----- (00613E70) --------------------------------------------------------
void __cdecl Bank::SetMoney(__int64 i64Money)
{
  Bank::ms_i64Money = i64Money;
}
// A8EAA0: using guessed type __int64 Bank::ms_i64Money;

//----- (00613E90) --------------------------------------------------------
unsigned __int8 __cdecl Bank::GetMaxPage()
{
  return Bank::ms_byTotalBankPage;
}
// A8EAA8: using guessed type unsigned __int8 Bank::ms_byTotalBankPage;

//----- (00613EA0) --------------------------------------------------------
unsigned int __cdecl Bank::GetInvIdxLotIsNotMax(Item *pkItem)
{
  unsigned int v1; // ebx@1
  unsigned int v2; // edi@1
  int v3; // esi@3
  unsigned int v4; // ST14_4@5
  unsigned int result; // eax@7
  unsigned int dwValue; // [sp+10h] [bp-4h]@1

  ChargedItemList::GetTotalEffectingValue(EE_MORESTORAGE, &dwValue);
  v1 = 4 * (9 * dwValue + 18);
  v2 = 0;
  do
  {
    if ( v2 >= v1 )
      break;
    v3 = Bank::ms_aspInv[v2];
    if ( v3 )
    {
      if ( *(_WORD *)(v3 + 8) == pkItem->m_kStruct.itemid )
      {
        v4 = (*(int (__thiscall **)(int))(*(_DWORD *)v3 + 16))(Bank::ms_aspInv[v2]);
        if ( v4 > (*(int (__thiscall **)(int))(*(_DWORD *)v3 + 12))(v3) )
          return v2;
      }
    }
    ++v2;
  }
  while ( v2 < 0x240 );
  result = 0;
  do
  {
    if ( result >= v1 )
      break;
    if ( !Bank::ms_aspInv[result] )
      return result;
    ++result;
  }
  while ( result < 0x240 );
  return -1;
}
// A8EAB0: using guessed type int Bank::ms_aspInv[];

//----- (00613F30) --------------------------------------------------------
void __cdecl Bank::RemoveExtraInv()
{
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v0; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v1; // ebx@1
  char *v2; // eax@2
  char *v3; // edi@3
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v4; // eax@5
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *j; // eax@6
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *i; // eax@9

  v0 = stru_A8F3B4._Ptr->_Left;
  v1 = stru_A8F3B4._Ptr;
  if ( stru_A8F3B4._Ptr->_Left != stru_A8F3B4._Ptr )
  {
    do
    {
      v2 = (char *)v0->_Myval.second;
      if ( v2 )
      {
        v3 = v2 - 4;
        `eh vector destructor iterator'(
          v2,
          4u,
          *((_DWORD *)v2 - 1),
          (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
        operator delete[](v3);
      }
      if ( !v0->_Isnil )
      {
        v4 = v0->_Right;
        if ( v4->_Isnil )
        {
          for ( i = v0->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v0 != i->_Right )
              break;
            v0 = i;
          }
          v0 = i;
        }
        else
        {
          v0 = v0->_Right;
          for ( j = v4->_Left; !j->_Isnil; j = j->_Left )
            v0 = j;
        }
      }
    }
    while ( v0 != v1 );
    std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::clear(&Bank::ms_mapExtraInv);
  }
}

//----- (00613FC0) --------------------------------------------------------
void __cdecl Bank::Clear(char byTargetPage)
{
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > > iter; // [sp+4h] [bp-4h]@3

  if ( (unsigned __int8)byTargetPage < 0x10u )
    memset(&Bank::ms_aspInv[144 * (unsigned __int8)byTargetPage], 0, 0x90u);
  std::_Tree<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,NiPointer<Item> *>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > *)&Bank::ms_mapExtraInv,
    &iter,
    &byTargetPage);
  if ( iter._Ptr != (std::_Tree_nod<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> >::_Node *)stru_A8F3B4._Ptr )
    memset((char *)iter._Ptr->_Myval.second, 0, 0x90u);
  Bank::ms_i64Money = 0i64;
}
// A8EAA0: using guessed type __int64 Bank::ms_i64Money;

//----- (00614030) --------------------------------------------------------
char __cdecl Bank::IsEmpty(unsigned int uiIndex)
{
  unsigned int v1; // esi@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > > iter; // [sp+4h] [bp-4h]@6

  v1 = uiIndex;
  if ( uiIndex >= 36 * (unsigned int)Bank::ms_byTotalBankPage )
    return 0;
  if ( uiIndex >= 0x240 )
  {
    BYTE3(uiIndex) = uiIndex / 0x24;
    std::_Tree<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,NiPointer<Item> *>>,0>>::find(
      (std::_Tree<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > *)&Bank::ms_mapExtraInv,
      &iter,
      (const char *)&uiIndex + 3);
    if ( iter._Ptr != (std::_Tree_nod<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> >::_Node *)stru_A8F3B4._Ptr
      && iter._Ptr->_Myval.second[v1 % 0x24].m_pObject )
    {
      return 0;
    }
  }
  else if ( *(_DWORD *)&Bank::ms_aspInv[4 * uiIndex] )
  {
    return 0;
  }
  return 1;
}
// A8EAA8: using guessed type unsigned __int8 Bank::ms_byTotalBankPage;

//----- (006140C0) --------------------------------------------------------
Item *__cdecl Bank::Get(unsigned int uiIndex)
{
  unsigned int v1; // esi@1
  Item *result; // eax@2
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > > iter; // [sp+4h] [bp-4h]@5

  v1 = uiIndex;
  if ( uiIndex < 36 * (unsigned int)Bank::ms_byTotalBankPage )
  {
    if ( uiIndex >= 0x240 )
    {
      BYTE3(uiIndex) = uiIndex / 0x24;
      std::_Tree<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,NiPointer<Item> *>>,0>>::find(
        (std::_Tree<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > *)&Bank::ms_mapExtraInv,
        &iter,
        (const char *)&uiIndex + 3);
      if ( iter._Ptr == (std::_Tree_nod<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> >::_Node *)stru_A8F3B4._Ptr )
        result = 0;
      else
        result = iter._Ptr->_Myval.second[v1 % 0x24].m_pObject;
    }
    else
    {
      result = (Item *)Bank::ms_aspInv[uiIndex];
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8EAA8: using guessed type unsigned __int8 Bank::ms_byTotalBankPage;
// A8EAB0: using guessed type int Bank::ms_aspInv[];

//----- (00614140) --------------------------------------------------------
void __cdecl Bank::Add(Item *pkItem, unsigned int uiIndex)
{
  unsigned int v2; // esi@1
  Item *v3; // edi@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > > iter; // [sp+4h] [bp-4h]@11

  v2 = uiIndex;
  if ( uiIndex < 36 * (unsigned int)Bank::ms_byTotalBankPage )
  {
    if ( uiIndex >= 0x240 )
    {
      BYTE3(uiIndex) = uiIndex / 0x24;
      std::_Tree<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,NiPointer<Item> *>>,0>>::find(
        (std::_Tree<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > *)&Bank::ms_mapExtraInv,
        &iter,
        (const char *)&uiIndex + 3);
      if ( iter._Ptr != (std::_Tree_nod<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> >::_Node *)stru_A8F3B4._Ptr )
        NiPointer<PopupMenuWin>::operator=(
          (NiPointer<NiD3DDefaultShader> *)&iter._Ptr->_Myval.second[v2 % 0x24],
          (NiD3DDefaultShader *)pkItem);
    }
    else
    {
      v3 = *(Item **)&Bank::ms_aspInv[4 * uiIndex];
      if ( v3 != pkItem )
      {
        if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
        *(_DWORD *)&Bank::ms_aspInv[4 * v2] = pkItem;
        if ( pkItem )
          InterlockedIncrement((volatile LONG *)&pkItem->m_uiRefCount);
      }
    }
  }
}
// A8EAA8: using guessed type unsigned __int8 Bank::ms_byTotalBankPage;

//----- (00614200) --------------------------------------------------------
bool __cdecl Bank::IsPageDataExist(char byTargetPage)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> >::_Node *v1; // ecx@0
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > > iter; // [sp+0h] [bp-4h]@1

  iter._Ptr = v1;
  std::_Tree<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,NiPointer<Item> *>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > *)&Bank::ms_mapExtraInv,
    &iter,
    &byTargetPage);
  return iter._Ptr != (std::_Tree_nod<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> >::_Node *)stru_A8F3B4._Ptr;
}

//----- (00614230) --------------------------------------------------------
char __cdecl Bank::SetContents(PROTO_NC_MENU_OPENSTORAGE_CMD *pkProto)
{
  PROTO_NC_MENU_OPENSTORAGE_CMD *v1; // esi@1
  const char *v2; // edi@1
  char v3; // ST10_1@1
  PROTO_NC_MENU_OPENSTORAGE_CMD *v4; // eax@3
  char *v5; // edi@4
  std::_Tree_nod<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> >::_Node *v6; // eax@6
  int v7; // eax@7
  PROTO_ITEMPACKET_INFORM *v8; // ebx@7
  Item *v9; // esi@9
  int v10; // edi@12
  Item *v11; // ebx@14
  NiPointer<Item> *v12; // ecx@22
  int v13; // edx@22
  Item *v14; // edi@22
  Item **v15; // ebx@22
  std::pair<unsigned char const ,NiPointer<Item> *> _Val; // [sp+10h] [bp-28h]@6
  unsigned int uiBuffSize; // [sp+18h] [bp-20h]@9
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > > iter; // [sp+1Ch] [bp-1Ch]@21
  int v20; // [sp+20h] [bp-18h]@8
  char *pcBuff; // [sp+24h] [bp-14h]@7
  char *_Keyval; // [sp+28h] [bp-10h]@1
  int v23; // [sp+34h] [bp-4h]@3

  v1 = pkProto;
  v2 = &pkProto->curpage;
  v3 = pkProto->curpage;
  _Keyval = &pkProto->curpage;
  Bank::Clear(v3);
  Bank::ms_i64Money = v1->cen;
  Bank::ms_byTotalBankPage = v1->maxpage;
  if ( *v2 >= 0x10u )
  {
    std::_Tree<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,NiPointer<Item> *>>,0>>::find(
      (std::_Tree<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > *)&Bank::ms_mapExtraInv,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > > *)&pkProto,
      v2);
    if ( pkProto == (PROTO_NC_MENU_OPENSTORAGE_CMD *)stru_A8F3B4._Ptr )
    {
      v4 = (PROTO_NC_MENU_OPENSTORAGE_CMD *)operator new[](0x94u);
      pkProto = v4;
      v23 = 0;
      if ( v4 )
      {
        v5 = (char *)&v4->cen + 4;
        LODWORD(v4->cen) = 36;
        `eh vector constructor iterator'(
          (char *)&v4->cen + 4,
          4u,
          36,
          (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
          (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
      }
      else
      {
        v5 = 0;
      }
      v23 = -1;
      memset(v5, 0, 0x90u);
      _Val.first = *_Keyval;
      _Val.second = (NiPointer<Item> *)v5;
      v6 = std::_Tree_val<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,NiPointer<Item> *>>,0>>::_Buynode<std::pair<unsigned char const,NiPointer<Item> *>>(
             (std::_Tree_val<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > *)&Bank::ms_mapExtraInv,
             &_Val);
      std::_Tree<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,NiPointer<Item> *>>,0>>::_Linsert(
        (std::_Tree<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > *)&Bank::ms_mapExtraInv,
        (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > >,bool> *)&_Val,
        v6,
        0);
    }
  }
  v7 = v1->itemcounter;
  v8 = (PROTO_ITEMPACKET_INFORM *)&v1[1];
  pcBuff = (char *)&v1[1];
  if ( v7 )
  {
    v20 = v7;
    do
    {
      v9 = Item::Create(v8, (ITEM_INVEN *)&pkProto, &uiBuffSize);
      _Val.second = (NiPointer<Item> *)v9;
      if ( v9 )
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
      v23 = 1;
      if ( ((unsigned __int16)pkProto & 0xFC00) != 6144
        || (v10 = (unsigned __int16)pkProto & 0x3FF, v10 >= 36 * Bank::ms_byTotalBankPage) )
      {
        if ( v9 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
            v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
          v9 = 0;
        }
      }
      else if ( ((unsigned __int16)pkProto & 0x3FFu) >= 0x240 )
      {
        std::_Tree<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,NiPointer<Item> *>>,0>>::find(
          (std::_Tree<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > *)&Bank::ms_mapExtraInv,
          &iter,
          _Keyval);
        if ( iter._Ptr == (std::_Tree_nod<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> >::_Node *)stru_A8F3B4._Ptr )
          goto LABEL_34;
        v12 = iter._Ptr->_Myval.second;
        v13 = (unsigned __int16)(v10 % 36);
        v14 = v12[v13].m_pObject;
        v15 = &v12[v13].m_pObject;
        if ( v14 != v9 )
        {
          if ( v14 && !InterlockedDecrement((volatile LONG *)&v14->m_uiRefCount) && v14 )
            v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
          *v15 = v9;
          if ( v9 )
            InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
        }
      }
      else
      {
        v11 = *(Item **)&Bank::ms_aspInv[4 * v10];
        if ( v11 != v9 )
        {
          if ( v11 && !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
            v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
          *(_DWORD *)&Bank::ms_aspInv[4 * v10] = v9;
          if ( v9 )
            InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
        }
      }
      v8 = (PROTO_ITEMPACKET_INFORM *)&pcBuff[uiBuffSize];
      pcBuff += uiBuffSize;
LABEL_34:
      v23 = -1;
      if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
        v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      --v20;
    }
    while ( v20 );
  }
  return 1;
}
// A8EAA0: using guessed type __int64 Bank::ms_i64Money;
// A8EAA8: using guessed type unsigned __int8 Bank::ms_byTotalBankPage;

//----- (006144D0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > _Where)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v4; // edi@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v5; // eax@7
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v6; // esi@8
  std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *v7; // ecx@10
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v8; // eax@10
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v9; // eax@17
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v10; // ecx@20
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v11; // ecx@29
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v12; // ecx@31
  char v13; // cl@34
  std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *v14; // ecx@36
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v15; // eax@38
  unsigned int v16; // eax@59
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > *v17; // eax@61
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *_Erasednode; // [sp+10h] [bp-8h]@3
  std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *v19; // [sp+14h] [bp-4h]@1

  v3 = _Where._Ptr;
  v19 = this;
  if ( _Where._Ptr->_Isnil )
    std::_Xout_of_range("invalid map/set<T> iterator");
  _Erasednode = _Where._Ptr;
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const,int>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&_Where);
  if ( v3->_Left->_Isnil )
  {
    v4 = (std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *)v3->_Right;
LABEL_8:
    v6 = (std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *)v3->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v7 = v19;
    v8 = v19->_Myhead;
    if ( v8->_Parent == v3 )
    {
      v8->_Parent = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v4;
    }
    else if ( (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v6->_Left == v3 )
    {
      v6->_Left = v4;
    }
    else
    {
      v6->_Right = v4;
    }
    if ( v19->_Myhead->_Left == v3 )
    {
      if ( v4->_Isnil )
      {
        v9 = v6;
      }
      else
      {
        v9 = std::_Tree_val<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Min(v4);
        v7 = v19;
      }
      v7->_Myhead->_Left = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v9;
    }
    v10 = v7->_Myhead;
    if ( v10->_Right == v3 )
    {
      if ( v4->_Isnil )
        v10->_Right = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v6;
      else
        v10->_Right = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int>>,0>>::_Max(v4);
    }
    goto LABEL_35;
  }
  if ( v3->_Right->_Isnil )
  {
    v4 = (std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *)v3->_Left;
    goto LABEL_8;
  }
  v5 = _Where._Ptr;
  v4 = (std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *)_Where._Ptr->_Right;
  if ( _Where._Ptr == v3 )
    goto LABEL_8;
  v3->_Left->_Parent = _Where._Ptr;
  v5->_Left = v3->_Left;
  if ( v5 == v3->_Right )
  {
    v6 = (std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *)v5;
  }
  else
  {
    v6 = (std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *)v5->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v6->_Left = v4;
    v5->_Right = v3->_Right;
    v3->_Right->_Parent = v5;
  }
  v11 = v19->_Myhead;
  if ( v11->_Parent == v3 )
  {
    v11->_Parent = v5;
  }
  else
  {
    v12 = v3->_Parent;
    if ( v12->_Left == v3 )
      v12->_Left = v5;
    else
      v12->_Right = v5;
  }
  v5->_Parent = v3->_Parent;
  v13 = v5->_Color;
  v5->_Color = v3->_Color;
  v3->_Color = v13;
LABEL_35:
  if ( _Erasednode->_Color == 1 )
  {
    v14 = (std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *)v19;
    if ( v4 != (std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *)v19->_Myhead->_Parent )
    {
      do
      {
        if ( v4->_Color != 1 )
          break;
        v15 = v6->_Left;
        if ( v4 == v6->_Left )
        {
          v15 = v6->_Right;
          if ( !v15->_Color )
          {
            v15->_Color = 1;
            v6->_Color = 0;
            std::_Tree<std::_Tmap_traits<enum  OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const,EffectViewInfo *>>> *,std::less<enum  OscTarget>,std::allocator<std::pair<enum  OscTarget const,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const,EffectViewInfo *>>> *>>,0>>::_Lrotate(
              v14,
              v6);
            v15 = v6->_Right;
            v14 = (std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *)v19;
          }
          if ( v15->_Isnil )
            goto LABEL_53;
          if ( v15->_Left->_Color != 1 || v15->_Right->_Color != 1 )
          {
            if ( v15->_Right->_Color == 1 )
            {
              v15->_Left->_Color = 1;
              v15->_Color = 0;
              std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::_Rrotate(
                v14,
                v15);
              v15 = v6->_Right;
              v14 = (std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *)v19;
            }
            v15->_Color = v6->_Color;
            v6->_Color = 1;
            v15->_Right->_Color = 1;
            std::_Tree<std::_Tmap_traits<enum  OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const,EffectViewInfo *>>> *,std::less<enum  OscTarget>,std::allocator<std::pair<enum  OscTarget const,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const,EffectViewInfo *>>> *>>,0>>::_Lrotate(
              v14,
              v6);
            break;
          }
        }
        else
        {
          if ( !v15->_Color )
          {
            v15->_Color = 1;
            v6->_Color = 0;
            std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::_Rrotate(
              v14,
              v6);
            v15 = v6->_Left;
            v14 = (std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *)v19;
          }
          if ( v15->_Isnil )
            goto LABEL_53;
          if ( v15->_Right->_Color != 1 || v15->_Left->_Color != 1 )
          {
            if ( v15->_Left->_Color == 1 )
            {
              v15->_Right->_Color = 1;
              v15->_Color = 0;
              std::_Tree<std::_Tmap_traits<enum  OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const,EffectViewInfo *>>> *,std::less<enum  OscTarget>,std::allocator<std::pair<enum  OscTarget const,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const,EffectViewInfo *>>> *>>,0>>::_Lrotate(
                v14,
                v15);
              v15 = v6->_Left;
              v14 = (std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *)v19;
            }
            v15->_Color = v6->_Color;
            v6->_Color = 1;
            v15->_Left->_Color = 1;
            std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::_Rrotate(
              v14,
              v6);
            break;
          }
        }
        v15->_Color = 0;
LABEL_53:
        v4 = v6;
        v6 = v6->_Parent;
      }
      while ( v4 != v14->_Myhead->_Parent );
    }
    v4->_Color = 1;
  }
  operator delete(_Erasednode);
  v16 = v19->_Mysize;
  if ( v16 )
    v19->_Mysize = v16 - 1;
  v17 = result;
  result->_Ptr = _Where._Ptr;
  return v17;
}

//----- (00614720) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > _Last)
{
  std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v6; // ecx@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *v7; // eax@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > v8; // edx@5
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v9; // eax@6
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v10; // ecx@7
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *j; // eax@7
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *i; // eax@10
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > v13; // [sp+4h] [bp-4h]@14

  v4 = this;
  v5 = this->_Myhead;
  v6 = _First._Ptr;
  if ( _First._Ptr != v5->_Left || _Last._Ptr != v5 )
  {
    for ( ; _First._Ptr != _Last._Ptr; v6 = _First._Ptr )
    {
      v8._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v6;
      if ( !v6->_Isnil )
      {
        v9 = v6->_Right;
        if ( v9->_Isnil )
        {
          for ( i = v6->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v6 != i->_Right )
              break;
            v6 = i;
          }
          _First._Ptr = i;
        }
        else
        {
          v10 = v6->_Right;
          for ( j = v9->_Left; !j->_Isnil; j = j->_Left )
            v10 = j;
          _First._Ptr = v10;
        }
      }
      std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
        (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)v4,
        &v13,
        v8);
    }
    v7 = result;
    result->_Ptr = v6;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::clear(v4);
    v7 = result;
    result->_Ptr = v4->_Myhead->_Left;
  }
  return v7;
}

//----- (006147C0) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,NiPointer<Item> *>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> >::_Node *_Node, bool _Leftish)
{
  std::_Tree<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > *v4; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> >::_Node *v5; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> >::_Node *v6; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v7; // esi@1
  bool v8; // cl@1
  char v9; // dl@2
  std::_Tree_nod<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> >::_Node *v10; // edi@10
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v11; // edx@12
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > >,bool> *v12; // eax@12
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v13; // ecx@15
  bool _Addleft; // [sp+Ch] [bp-4h]@1

  v4 = this;
  v5 = this->_Myhead;
  v6 = v5->_Parent;
  v7 = (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)v5;
  v8 = 1;
  _Addleft = 1;
  if ( !v6->_Isnil )
  {
    v9 = _Node->_Myval.first;
    do
    {
      v7 = (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)v6;
      if ( _Leftish )
        v8 = v6->_Myval.first >= (unsigned __int8)v9;
      else
        v8 = (unsigned __int8)v9 < v6->_Myval.first;
      _Addleft = v8;
      if ( v8 )
        v6 = v6->_Left;
      else
        v6 = v6->_Right;
    }
    while ( !v6->_Isnil );
  }
  v10 = (std::_Tree_nod<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> >::_Node *)v7;
  *(_DWORD *)&_Leftish = v7;
  if ( v8 )
  {
    if ( (std::_Tree_nod<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> >::_Node *)v7 == v4->_Myhead->_Left )
    {
      v11 = std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
              (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)v4,
              (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)&_Leftish,
              1,
              v7,
              (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)_Node)->_Ptr;
      v12 = result;
      result->first._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> >::_Node *)v11;
      result->second = 1;
      return v12;
    }
    std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,GuildNameCache::GuildNameStorage *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,GuildNameCache::GuildNameStorage *>>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&_Leftish);
    v10 = (std::_Tree_nod<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> >::_Node *)_Leftish;
  }
  if ( (const unsigned __int8)v10->_Myval.first >= _Node->_Myval.first )
  {
    operator delete(_Node);
    v12 = result;
    result->first._Ptr = v10;
    result->second = 0;
  }
  else
  {
    v13 = std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
            (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)v4,
            (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)&_Leftish,
            _Addleft,
            v7,
            (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)_Node)->_Ptr;
    v12 = result;
    result->first._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> >::_Node *)v13;
    result->second = 1;
  }
  return v12;
}

//----- (006148A0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,NiPointer<Item> *>>,0>>::find(std::_Tree<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > > *result, const char *_Keyval)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> >::_Node *v3; // edx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> >::_Node *v4; // eax@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > > *v5; // eax@8

  v3 = this->_Myhead;
  v4 = v3->_Parent;
  while ( !v4->_Isnil )
  {
    if ( v4->_Myval.first >= (const unsigned __int8)*_Keyval )
    {
      v3 = v4;
      v4 = v4->_Left;
    }
    else
    {
      v4 = v4->_Right;
    }
  }
  if ( v3 == this->_Myhead || (const unsigned __int8)*_Keyval < v3->_Myval.first )
  {
    v5 = result;
    result->_Ptr = this->_Myhead;
  }
  else
  {
    v5 = result;
    result->_Ptr = v3;
  }
  return v5;
}

//----- (00614910) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,NiPointer<Item> *>>,0>>::_Buynode<std::pair<unsigned char const,NiPointer<Item> *>>(std::_Tree_val<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > *this, std::pair<unsigned char const ,NiPointer<Item> *> *_Val)
{
  std::_Tree_val<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> >::_Node *result; // eax@1
  std::exception pExceptionObject; // [sp+4h] [bp-Ch]@5

  v2 = this;
  result = (std::_Tree_nod<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> >::_Node *)operator new(0x18u);
  if ( !result )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  result->_Left = v2->_Myhead;
  result->_Parent = v2->_Myhead;
  result->_Right = v2->_Myhead;
  *(_WORD *)&result->_Color = 0;
  if ( result != (std::_Tree_nod<std::_Tmap_traits<unsigned char,NiPointer<Item> *,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,NiPointer<Item> *> >,0> >::_Node *)-12 )
    result->_Myval = *_Val;
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00614980) --------------------------------------------------------
bool __stdcall ICharDeadEvent::MatchProcessingHandle(unsigned __int16 hTarget)
{
  return 0;
}

//----- (00614990) --------------------------------------------------------
void __thiscall CharDeadEvent_DropItem::OnDead(CharDeadEvent_DropItem *this)
{
  CharDeadEvent_DropItem *v1; // esi@1
  Char *v2; // eax@1
  NiPoint3 *v3; // eax@2

  v1 = this;
  DropItemMgr::Add(&g_kDropItemMgr, &this->m_kProto);
  v2 = CharMgr::GetChar(&g_kCharMgr, v1->m_kProto.dropmobhandle);
  if ( v2 )
  {
    v3 = (NiPoint3 *)((int (__thiscall *)(_DWORD))v2->vfptr[6].Deaffect)(v2);
    SoundMgr::PlayItemDropSound(&g_kSoundMgr, v1->m_kProto.itemid, v3);
  }
}

//----- (006149E0) --------------------------------------------------------
bool __thiscall CharDeadEvent_DropItem::MatchProcessingHandle(CharDeadEvent_DropItem *this, unsigned __int16 hTarget)
{
  return this->m_kProto.handle == hTarget;
}

//----- (00614A00) --------------------------------------------------------
char __thiscall ICharDeadEvent::Update(ICharDeadEvent *this)
{
  ICharDeadEvent *v1; // edi@1
  Char *v2; // eax@1
  Char *v3; // esi@1
  char result; // al@5

  v1 = this;
  v2 = CharMgr::GetChar(&g_kCharMgr, this->m_kCharHandle);
  v3 = v2;
  if ( !v2
    || v2->m_bUserCharacter
    || Char::IsNPC(v2)
    || ((int (__thiscall *)(_DWORD))v3->vfptr[2].~AbStateInfectee)(v3) <= 0 )
  {
    v1->vfptr->OnDead(v1);
    result = 0;
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (00614A50) --------------------------------------------------------
void __cdecl ICharDeadEvent::TerminateAll()
{
  NiTListItem<NiD3DShaderInterface *> *v0; // eax@2
  NiTListItem<NiD3DShaderInterface *> *v1; // ecx@2
  NiD3DShaderInterface *v2; // esi@5

  while ( ICharDeadEvent::ms_kEventList.m_kAllocator.m_uiCount )
  {
    v0 = ICharDeadEvent::ms_kEventList.m_pkHead;
    v1 = ICharDeadEvent::ms_kEventList.m_pkHead->m_pkNext;
    ICharDeadEvent::ms_kEventList.m_pkHead = v1;
    if ( v1 )
      v1->m_pkPrev = 0;
    else
      ICharDeadEvent::ms_kEventList.m_pkTail = 0;
    v2 = v0->m_element;
    ICharDeadEvent::ms_kEventList.vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&ICharDeadEvent::ms_kEventList,
      v0);
    --ICharDeadEvent::ms_kEventList.m_kAllocator.m_uiCount;
    operator delete(v2);
  }
}

//----- (00614AB0) --------------------------------------------------------
void __thiscall ICharDeadEvent::ICharDeadEvent(ICharDeadEvent *this, PgFrameWork *pkFrameWork)
{
  ICharDeadEvent *v2; // esi@1
  NiTListItem<NiD3DShaderInterface *> *v3; // eax@1

  v2 = this;
  this->m_pkFrameWork = pkFrameWork;
  this->vfptr = (ICharDeadEventVtbl *)&ICharDeadEvent::`vftable';
  v3 = ICharDeadEvent::ms_kEventList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&ICharDeadEvent::ms_kEventList);
  v3->m_element = (NiD3DShaderInterface *)v2;
  v3->m_pkNext = 0;
  v3->m_pkPrev = ICharDeadEvent::ms_kEventList.m_pkTail;
  if ( ICharDeadEvent::ms_kEventList.m_pkTail )
    ICharDeadEvent::ms_kEventList.m_pkTail->m_pkNext = v3;
  else
    ICharDeadEvent::ms_kEventList.m_pkHead = v3;
  ++ICharDeadEvent::ms_kEventList.m_kAllocator.m_uiCount;
  ICharDeadEvent::ms_kEventList.m_pkTail = v3;
  v2->m_eEventType = 0;
}
// 9B6CAC: using guessed type int (*ICharDeadEvent::`vftable')();

//----- (00614B10) --------------------------------------------------------
void __cdecl ICharDeadEvent::UpdateAll()
{
  NiTListItem<NiD3DShaderInterface *> *v0; // esi@1
  NiD3DShaderInterface *v1; // ebx@2
  unsigned __int16 v2; // ax@2
  Char *v3; // eax@2
  Char *v4; // edi@2
  NiD3DShaderInterface *v5; // eax@6
  void *currIter; // [sp+4h] [bp-4h]@2

  v0 = ICharDeadEvent::ms_kEventList.m_pkHead;
  if ( ICharDeadEvent::ms_kEventList.m_pkHead )
  {
    do
    {
      v1 = v0->m_element;
      v2 = (unsigned __int16)v1->m_pszName;
      currIter = v0;
      v0 = v0->m_pkNext;
      v3 = CharMgr::GetChar(&g_kCharMgr, v2);
      v4 = v3;
      if ( !v3
        || v3->m_bUserCharacter
        || Char::IsNPC(v3)
        || ((int (__thiscall *)(_DWORD))v4->vfptr[2].~AbStateInfectee)(v4) <= 0 )
      {
        ((void (__thiscall *)(_DWORD))v1->vfptr->__vecDelDtor)(v1);
        v5 = NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
               &ICharDeadEvent::ms_kEventList,
               &currIter);
        operator delete(v5);
      }
    }
    while ( v0 );
  }
}

//----- (00614B90) --------------------------------------------------------
void __thiscall CharDeadEvent_LevelUp::CharDeadEvent_LevelUp(CharDeadEvent_LevelUp *this, PgFrameWork *pkFrameWork, PROTO_NC_BAT_LEVELUP_CMD *rkProto)
{
  CharDeadEvent_LevelUp *v3; // ebx@1
  NiTListItem<NiD3DShaderInterface *> *v4; // eax@1
  unsigned __int16 v5; // dx@4

  v3 = this;
  this->m_pkFrameWork = pkFrameWork;
  this->vfptr = (ICharDeadEventVtbl *)&ICharDeadEvent::`vftable';
  v4 = ICharDeadEvent::ms_kEventList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&ICharDeadEvent::ms_kEventList);
  v4->m_element = (NiD3DShaderInterface *)v3;
  v4->m_pkNext = 0;
  v4->m_pkPrev = ICharDeadEvent::ms_kEventList.m_pkTail;
  if ( ICharDeadEvent::ms_kEventList.m_pkTail )
    ICharDeadEvent::ms_kEventList.m_pkTail->m_pkNext = v4;
  else
    ICharDeadEvent::ms_kEventList.m_pkHead = v4;
  ICharDeadEvent::ms_kEventList.m_pkTail = v4;
  ++ICharDeadEvent::ms_kEventList.m_kAllocator.m_uiCount;
  v3->m_eEventType = 0;
  v3->vfptr = (ICharDeadEventVtbl *)&CharDeadEvent_LevelUp::`vftable';
  qmemcpy(&v3->m_kProto, rkProto, sizeof(v3->m_kProto));
  v5 = v3->m_kProto.mobhandle;
  v3->m_eEventType = 1;
  v3->m_kCharHandle = v5;
}
// 9B6CAC: using guessed type int (*ICharDeadEvent::`vftable')();
// 9B6CB8: using guessed type void (__thiscall *CharDeadEvent_LevelUp::`vftable')(CharDeadEvent_LevelUp *__hidden this);

//----- (00614C20) --------------------------------------------------------
void __thiscall CharDeadEvent_LevelUp::OnDead(CharDeadEvent_LevelUp *this)
{
  CharDeadEvent_LevelUp *v1; // esi@1
  unsigned int v2; // edi@1
  unsigned int v3; // ebx@1
  char *v4; // eax@2
  char *v5; // eax@2
  PgFrameWork *v6; // ecx@2
  char *v7; // eax@5
  char *v8; // eax@5
  PgFrameWork *v9; // ecx@5
  int v10; // ST10_4@8
  char *v11; // eax@8
  char *v12; // eax@8
  PgFrameWork *v13; // ecx@8
  int v14; // ST10_4@11
  char *v15; // eax@11
  char *v16; // eax@11
  PgFrameWork *v17; // ecx@11
  char *v18; // ST10_4@14
  char *v19; // eax@14
  char *v20; // eax@14
  PgFrameWork *v21; // ecx@14
  unsigned int dwDummy; // [sp+14h] [bp-14h]@1
  SoundIndex rkIndex; // [sp+18h] [bp-10h]@1
  int iIntDelta; // [sp+20h] [bp-8h]@1
  int iDexDelta; // [sp+24h] [bp-4h]@1

  v1 = this;
  User::SetLv(&g_kUser, this->m_kProto.level);
  EffectMgr::CreateAttachEffect(
    &g_kEffectMgr,
    &dwDummy,
    "LevelUp",
    g_pkMainChar->m_spScene.m_pObject,
    Timer::ms_fCurTime,
    0);
  v2 = v1->m_kProto.newparam.Strength.base - User::BaseStr(&g_kUser);
  v3 = v1->m_kProto.newparam.Constitute.base - User::BaseCon(&g_kUser);
  iDexDelta = v1->m_kProto.newparam.Dexterity.base - User::BaseDex(&g_kUser);
  iIntDelta = v1->m_kProto.newparam.Intelligence.base - User::BaseInt(&g_kUser);
  rkIndex.m_acFilename = (char *)(v1->m_kProto.newparam.MentalPower.base - User::BaseMen(&g_kUser));
  if ( v2 )
  {
    v4 = (char *)TextData::Get(0xE70707EA);
    v5 = fs(v4, v2);
    v6 = v1->m_pkFrameWork;
    if ( v6 )
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v6->vfptr->SendDirectMessage)(25, v5, 0);
  }
  if ( v3 )
  {
    v7 = (char *)TextData::Get(0x93F7FDF7);
    v8 = fs(v7, v3);
    v9 = v1->m_pkFrameWork;
    if ( v9 )
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v9->vfptr->SendDirectMessage)(25, v8, 0);
  }
  if ( iDexDelta )
  {
    v10 = iDexDelta;
    v11 = (char *)TextData::Get(0xD8F807F0);
    v12 = fs(v11, v10);
    v13 = v1->m_pkFrameWork;
    if ( v13 )
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v13->vfptr->SendDirectMessage)(25, v12, 0);
  }
  if ( iIntDelta )
  {
    v14 = iIntDelta;
    v15 = (char *)TextData::Get(0xE1FD07EC);
    v16 = fs(v15, v14);
    v17 = v1->m_pkFrameWork;
    if ( v17 )
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v17->vfptr->SendDirectMessage)(25, v16, 0);
  }
  if ( rkIndex.m_acFilename )
  {
    v18 = rkIndex.m_acFilename;
    v19 = (char *)TextData::Get(0xDC0B07EB);
    v20 = fs(v19, v18);
    v21 = v1->m_pkFrameWork;
    if ( v21 )
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v21->vfptr->SendDirectMessage)(25, v20, 0);
  }
  User::SetParam(&g_kUser, &v1->m_kProto.newparam);
  rkIndex.m_dwIndex = 9;
  rkIndex.m_acFilename = 0;
  SoundGroupStatic::PlaySoundA((SoundGroupStatic *)&g_kSoundMgr.m_pkInterfaceGroup->vfptr, &rkIndex, 0, 0);
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00614DE0) --------------------------------------------------------
void __thiscall CharDeadEvent_DropItem::CharDeadEvent_DropItem(CharDeadEvent_DropItem *this, PgFrameWork *pkFrameWork, PROTO_NC_BRIEFINFO_DROPEDITEM_CMD *rkProto)
{
  CharDeadEvent_DropItem *v3; // esi@1
  NiTListItem<NiD3DShaderInterface *> *v4; // eax@1

  v3 = this;
  this->m_pkFrameWork = pkFrameWork;
  this->vfptr = (ICharDeadEventVtbl *)&ICharDeadEvent::`vftable';
  v4 = ICharDeadEvent::ms_kEventList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&ICharDeadEvent::ms_kEventList);
  v4->m_element = (NiD3DShaderInterface *)v3;
  v4->m_pkNext = 0;
  v4->m_pkPrev = ICharDeadEvent::ms_kEventList.m_pkTail;
  if ( ICharDeadEvent::ms_kEventList.m_pkTail )
    ICharDeadEvent::ms_kEventList.m_pkTail->m_pkNext = v4;
  else
    ICharDeadEvent::ms_kEventList.m_pkHead = v4;
  ++ICharDeadEvent::ms_kEventList.m_kAllocator.m_uiCount;
  ICharDeadEvent::ms_kEventList.m_pkTail = v4;
  v3->m_eEventType = 0;
  v3->vfptr = (ICharDeadEventVtbl *)&CharDeadEvent_DropItem::`vftable';
  *(_DWORD *)&v3->m_kProto.handle = *(_DWORD *)&rkProto->handle;
  v3->m_kProto.location.x = rkProto->location.x;
  v3->m_kProto.location.y = rkProto->location.y;
  v3->m_kProto.dropmobhandle = rkProto->dropmobhandle;
  v3->m_kProto.attr = rkProto->attr;
  v3->m_kCharHandle = v3->m_kProto.dropmobhandle;
  v3->m_eEventType = 2;
}
// 9B6CAC: using guessed type int (*ICharDeadEvent::`vftable')();
// 9B6CC4: using guessed type void (__thiscall *CharDeadEvent_DropItem::`vftable')(CharDeadEvent_DropItem *__hidden this);

//----- (00614E80) --------------------------------------------------------
void __thiscall CharDeadEvent_ExpGain::CharDeadEvent_ExpGain(CharDeadEvent_ExpGain *this, PgFrameWork *pkFrameWork, PROTO_NC_BAT_EXPGAIN_CMD *rkProto)
{
  CharDeadEvent_ExpGain *v3; // esi@1
  NiTListItem<NiD3DShaderInterface *> *v4; // eax@1
  unsigned __int16 v5; // ax@4

  v3 = this;
  this->m_pkFrameWork = pkFrameWork;
  this->vfptr = (ICharDeadEventVtbl *)&ICharDeadEvent::`vftable';
  v4 = ICharDeadEvent::ms_kEventList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&ICharDeadEvent::ms_kEventList);
  v4->m_element = (NiD3DShaderInterface *)v3;
  v4->m_pkNext = 0;
  v4->m_pkPrev = ICharDeadEvent::ms_kEventList.m_pkTail;
  if ( ICharDeadEvent::ms_kEventList.m_pkTail )
    ICharDeadEvent::ms_kEventList.m_pkTail->m_pkNext = v4;
  else
    ICharDeadEvent::ms_kEventList.m_pkHead = v4;
  ++ICharDeadEvent::ms_kEventList.m_kAllocator.m_uiCount;
  ICharDeadEvent::ms_kEventList.m_pkTail = v4;
  v3->m_eEventType = 0;
  v3->vfptr = (ICharDeadEventVtbl *)&CharDeadEvent_ExpGain::`vftable';
  v3->m_kProto.expgain = rkProto->expgain;
  v5 = rkProto->mobhandle;
  v3->m_kProto.mobhandle = v5;
  v3->m_kCharHandle = v5;
  v3->m_eEventType = 3;
}
// 9B6CAC: using guessed type int (*ICharDeadEvent::`vftable')();
// 9B6CD0: using guessed type void (__thiscall *CharDeadEvent_ExpGain::`vftable')(CharDeadEvent_ExpGain *__hidden this);

//----- (00614F10) --------------------------------------------------------
void __thiscall CharDeadEvent_ExpGain::OnDead(CharDeadEvent_ExpGain *this)
{
  CharDeadEvent_ExpGain *v1; // esi@1
  unsigned int v2; // ST08_4@2
  char *v3; // eax@2
  char *v4; // eax@2
  PgFrameWork *v5; // ecx@2

  v1 = this;
  User::AddCurExp(&g_kUser, this->m_kProto.expgain);
  if ( v1->m_kProto.expgain )
  {
    v2 = v1->m_kProto.expgain;
    v3 = (char *)TextData::Get(0xE0EB073C);
    v4 = fs(v3, v2);
    v5 = v1->m_pkFrameWork;
    if ( v5 )
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v5->vfptr->SendDirectMessage)(25, v4, 0);
  }
}

//----- (00614F60) --------------------------------------------------------
void __thiscall CharDeadEvent_SomeoneLevelUp::CharDeadEvent_SomeoneLevelUp(CharDeadEvent_SomeoneLevelUp *this, PgFrameWork *pkFrameWork, PROTO_NC_BAT_SUMEONELEVELUP_CMD *rkProto)
{
  CharDeadEvent_SomeoneLevelUp *v3; // esi@1
  NiTListItem<NiD3DShaderInterface *> *v4; // eax@1

  v3 = this;
  this->m_pkFrameWork = pkFrameWork;
  this->vfptr = (ICharDeadEventVtbl *)&ICharDeadEvent::`vftable';
  v4 = ICharDeadEvent::ms_kEventList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&ICharDeadEvent::ms_kEventList);
  v4->m_element = (NiD3DShaderInterface *)v3;
  v4->m_pkNext = 0;
  v4->m_pkPrev = ICharDeadEvent::ms_kEventList.m_pkTail;
  if ( ICharDeadEvent::ms_kEventList.m_pkTail )
    ICharDeadEvent::ms_kEventList.m_pkTail->m_pkNext = v4;
  else
    ICharDeadEvent::ms_kEventList.m_pkHead = v4;
  ++ICharDeadEvent::ms_kEventList.m_kAllocator.m_uiCount;
  ICharDeadEvent::ms_kEventList.m_pkTail = v4;
  v3->m_eEventType = 0;
  v3->vfptr = (ICharDeadEventVtbl *)&CharDeadEvent_SomeoneLevelUp::`vftable';
  v3->m_kProto = *rkProto;
  v3->m_kCharHandle = v3->m_kProto.mobhandle;
  v3->m_eEventType = 4;
}
// 9B6CAC: using guessed type int (*ICharDeadEvent::`vftable')();
// 9B6CDC: using guessed type void (__thiscall *CharDeadEvent_SomeoneLevelUp::`vftable')(CharDeadEvent_SomeoneLevelUp *__hidden this);

//----- (00614FE0) --------------------------------------------------------
void __thiscall CharDeadEvent_SomeoneLevelUp::OnDead(CharDeadEvent_SomeoneLevelUp *this)
{
  Char *v1; // eax@1
  unsigned int dwDummy; // [sp+8h] [bp-4h]@1

  dwDummy = (unsigned int)this;
  v1 = CharMgr::GetChar(&g_kCharMgr, this->m_kProto.ply);
  if ( v1 )
    EffectMgr::CreateAttachEffect(&g_kEffectMgr, &dwDummy, "LevelUp", v1->m_spScene.m_pObject, Timer::ms_fCurTime, 0);
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00615030) --------------------------------------------------------
void __thiscall CharDeadEvent_InformWhoKilledMe::OnDead(CharDeadEvent_InformWhoKilledMe *this)
{
  CharDeadEvent_InformWhoKilledMe *v1; // esi@1
  char *v2; // ST04_4@1
  char *v3; // eax@1
  char *v4; // eax@1
  PgFrameWork *v5; // ecx@1

  v1 = this;
  v2 = this->m_acCharName;
  v3 = (char *)TextData::Get(0xD0483643);
  v4 = fs(v3, v2);
  v5 = v1->m_pkFrameWork;
  if ( v5 )
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v5->vfptr->SendDirectMessage)(26, v4, 0);
}

//----- (00615070) --------------------------------------------------------
bool __cdecl ICharDeadEvent::CheckEventExistOnQueue(DeadEventType eEventType, int hTarget, bool bDelete)
{
  NiTListItem<NiD3DShaderInterface *> *v3; // edi@1
  NiD3DShaderInterface *v4; // esi@2
  NiTListItem<NiD3DShaderInterface *> *v5; // eax@6
  NiD3DShaderInterface **v6; // ecx@7
  NiTListItem<NiD3DShaderInterface *> *v7; // edx@7
  void *kPos; // [sp+4h] [bp-10Ch]@10
  bool re; // [sp+Bh] [bp-105h]@1
  char dst; // [sp+Ch] [bp-104h]@12
  char temp[128]; // [sp+8Ch] [bp-84h]@1

  re = 0;
  memset(temp, 0, 0x80u);
  sprintf(temp, "ItemDrop Queue Delete Start: %d \n", ICharDeadEvent::ms_kEventList.m_kAllocator.m_uiCount);
  OutputDebugStringA(temp);
  v3 = ICharDeadEvent::ms_kEventList.m_pkHead;
  if ( ICharDeadEvent::ms_kEventList.m_pkHead )
  {
    do
    {
      v4 = v3->m_element;
      v3 = v3->m_pkNext;
      if ( v4 )
      {
        if ( eEventType == v4->m_uiImplementation )
        {
          if ( (unsigned __int8)v4->vfptr[1].__vecDelDtor((NiRefObject *)v4, hTarget) )
          {
            re = 1;
            if ( bDelete == 1 )
            {
              v5 = ICharDeadEvent::ms_kEventList.m_pkHead;
              if ( ICharDeadEvent::ms_kEventList.m_pkHead )
              {
                while ( 1 )
                {
                  v6 = &v5->m_element;
                  v7 = v5;
                  v5 = v5->m_pkNext;
                  if ( v4 == *v6 )
                    break;
                  if ( !v5 )
                    goto LABEL_9;
                }
              }
              else
              {
LABEL_9:
                v7 = 0;
              }
              kPos = v7;
              if ( v7 )
                NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
                  &ICharDeadEvent::ms_kEventList,
                  &kPos);
              operator delete(v4);
              memset(&dst, 0, 0x80u);
              sprintf(
                &dst,
                "ItemDrop Queue Delete: %d(%d) \n",
                (unsigned __int16)hTarget,
                ICharDeadEvent::ms_kEventList.m_kAllocator.m_uiCount);
              OutputDebugStringA(&dst);
            }
          }
        }
      }
    }
    while ( v3 );
  }
  memset(temp, 0, 0x80u);
  sprintf(temp, "ItemDrop Queue Delete End: %d \n", ICharDeadEvent::ms_kEventList.m_kAllocator.m_uiCount);
  OutputDebugStringA(temp);
  return re;
}

//----- (006151F0) --------------------------------------------------------
void __thiscall CharDeadEvent_InformWhoKilledMe::CharDeadEvent_InformWhoKilledMe(CharDeadEvent_InformWhoKilledMe *this, PgFrameWork *pkFrameWork, unsigned __int16 myHandle, unsigned __int16 attacker)
{
  CharDeadEvent_InformWhoKilledMe *v4; // esi@1
  NiTListItem<NiD3DShaderInterface *> *v5; // eax@1
  unsigned __int16 v6; // dx@4
  unsigned __int16 v7; // ST00_2@4
  Char *v8; // eax@4
  Char *v9; // edi@4
  NiTListItem<NiD3DShaderInterface *> *v10; // eax@5
  NiD3DShaderInterface **v11; // ecx@6
  NiTListItem<NiD3DShaderInterface *> *v12; // edx@6
  NiTListItem<NiD3DShaderInterface *> *v13; // eax@13
  NiD3DShaderInterface **v14; // ecx@14
  NiTListItem<NiD3DShaderInterface *> *v15; // edx@14
  char *v16; // eax@20
  int v17; // edx@20
  char v18; // cl@21

  v4 = this;
  this->m_pkFrameWork = pkFrameWork;
  this->vfptr = (ICharDeadEventVtbl *)&ICharDeadEvent::`vftable';
  v5 = ICharDeadEvent::ms_kEventList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&ICharDeadEvent::ms_kEventList);
  v5->m_element = (NiD3DShaderInterface *)v4;
  v5->m_pkNext = 0;
  v5->m_pkPrev = ICharDeadEvent::ms_kEventList.m_pkTail;
  if ( ICharDeadEvent::ms_kEventList.m_pkTail )
    ICharDeadEvent::ms_kEventList.m_pkTail->m_pkNext = v5;
  else
    ICharDeadEvent::ms_kEventList.m_pkHead = v5;
  ++ICharDeadEvent::ms_kEventList.m_kAllocator.m_uiCount;
  v6 = myHandle;
  ICharDeadEvent::ms_kEventList.m_pkTail = v5;
  v7 = attacker;
  v4->m_eEventType = 0;
  v4->vfptr = (ICharDeadEventVtbl *)&CharDeadEvent_InformWhoKilledMe::`vftable';
  v4->m_kCharHandle = v6;
  v8 = CharMgr::GetChar(&g_kCharMgr, v7);
  v9 = v8;
  if ( v8 )
  {
    if ( (unsigned __int8)((int (__thiscall *)(Char *))v8->vfptr[1].Affect)(v8) )
    {
      v13 = ICharDeadEvent::ms_kEventList.m_pkHead;
      if ( ICharDeadEvent::ms_kEventList.m_pkHead )
      {
        while ( 1 )
        {
          v14 = &v13->m_element;
          v15 = v13;
          v13 = v13->m_pkNext;
          if ( (NiD3DShaderInterface *)v4 == *v14 )
            break;
          if ( !v13 )
            goto LABEL_16;
        }
      }
      else
      {
LABEL_16:
        v15 = 0;
      }
      *(_DWORD *)&myHandle = v15;
      if ( v15 )
        NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
          &ICharDeadEvent::ms_kEventList,
          (void **)&myHandle);
      operator delete(v4);
    }
    else
    {
      v16 = (char *)((int (__thiscall *)(Char *))v9->vfptr[2].DeleteAbStateByAbstateIndex)(v9);
      v17 = v4->m_acCharName - v16;
      do
      {
        v18 = *v16;
        v16[v17] = *v16;
        ++v16;
      }
      while ( v18 );
      v4->m_eEventType = 5;
    }
  }
  else
  {
    v10 = ICharDeadEvent::ms_kEventList.m_pkHead;
    if ( ICharDeadEvent::ms_kEventList.m_pkHead )
    {
      while ( 1 )
      {
        v11 = &v10->m_element;
        v12 = v10;
        v10 = v10->m_pkNext;
        if ( (NiD3DShaderInterface *)v4 == *v11 )
          break;
        if ( !v10 )
          goto LABEL_8;
      }
    }
    else
    {
LABEL_8:
      v12 = 0;
    }
    *(_DWORD *)&myHandle = v12;
    if ( v12 )
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
        &ICharDeadEvent::ms_kEventList,
        (void **)&myHandle);
    operator delete(v4);
  }
}
// 9B6CAC: using guessed type int (*ICharDeadEvent::`vftable')();
// 9B6CE8: using guessed type void (__thiscall *CharDeadEvent_InformWhoKilledMe::`vftable')(CharDeadEvent_InformWhoKilledMe *__hidden this);

//----- (00615320) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *>::~NiTListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *>(NiTListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *> *this)
{
  this->vfptr = (NiTListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *>Vtbl *)&NiTListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *>::`vftable';
}
// 9B6C7C: using guessed type int (__thiscall *NiTListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *>::`vftable')(void *p, char);

//----- (00615330) --------------------------------------------------------
NiTListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *> *__thiscall NiTListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *>::`scalar deleting destructor'(NiTListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *> *this, unsigned int a2)
{
  NiTListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *>Vtbl *)&NiTListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9B6C7C: using guessed type int (__thiscall *NiTListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *>::`vftable')(void *p, char);

//----- (00615360) --------------------------------------------------------
NiTPointerListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *> *__thiscall NiTList<ICharDeadEvent *>::`scalar deleting destructor'(NiTPointerListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *> *this, unsigned int a2)
{
  NiTPointerListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *> *v2; // edi@1
  NiTListItem<ICharDeadEvent *> *v3; // esi@1
  NiTListItem<ICharDeadEvent *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *>Vtbl *)&NiTPointerListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *>Vtbl *)&NiTListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B6C7C: using guessed type int (__thiscall *NiTListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *>::`vftable')(void *p, char);
// 9B6C8C: using guessed type int (__thiscall *NiTPointerListBase<DFALL<ICharDeadEvent *>,ICharDeadEvent *>::`vftable')(void *p, char);

//----- (006153F0) --------------------------------------------------------
void GuildTournamentStorage::GuildTournamentStorage()
{
  ;
}

//----- (00615410) --------------------------------------------------------
signed int __cdecl GuildTournamentStorage::GetInvIdxLotIsNotMax()
{
  return -1;
}

//----- (00615420) --------------------------------------------------------
__int64 __cdecl GuildTournamentStorage::GetMoney()
{
  return GuildTournamentStorage::ms_i64Money;
}
// A8F3C0: using guessed type __int64 GuildTournamentStorage::ms_i64Money;

//----- (00615430) --------------------------------------------------------
void __cdecl GuildTournamentStorage::SetMoney(__int64 i64Money)
{
  GuildTournamentStorage::ms_i64Money = i64Money;
}
// A8F3C0: using guessed type __int64 GuildTournamentStorage::ms_i64Money;

//----- (00615450) --------------------------------------------------------
unsigned __int64 __cdecl GuildTournamentStorage::GetToken()
{
  return GuildTournamentStorage::ms_uiToken;
}
// A8F3C8: using guessed type unsigned __int64 GuildTournamentStorage::ms_uiToken;

//----- (00615460) --------------------------------------------------------
void __cdecl GuildTournamentStorage::Clear()
{
  unsigned int v0; // edi@1
  int v1; // esi@2

  v0 = 0;
  do
  {
    v1 = GuildTournamentStorage::ms_aspInv[v0];
    if ( v1 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v1 + 4)) && v1 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v1)(v1, 1);
      GuildTournamentStorage::ms_aspInv[v0] = 0;
    }
    ++v0;
  }
  while ( v0 < 36 );
  GuildTournamentStorage::ms_i64Money = 0i64;
  GuildTournamentStorage::ms_uiToken = 0i64;
}
// A8F3C0: using guessed type __int64 GuildTournamentStorage::ms_i64Money;
// A8F3C8: using guessed type unsigned __int64 GuildTournamentStorage::ms_uiToken;
// A8F3D0: using guessed type int GuildTournamentStorage::ms_aspInv[];

//----- (006154D0) --------------------------------------------------------
bool __cdecl GuildTournamentStorage::IsEmpty(unsigned int uiIndex)
{
  bool result; // al@2

  if ( uiIndex < 0x24 )
    result = GuildTournamentStorage::ms_aspInv[uiIndex] == 0;
  else
    result = 0;
  return result;
}
// A8F3D0: using guessed type int GuildTournamentStorage::ms_aspInv[];

//----- (006154F0) --------------------------------------------------------
Item *__cdecl GuildTournamentStorage::Get(unsigned int uiIndex)
{
  Item *result; // eax@2

  if ( uiIndex < 0x24 )
    result = (Item *)GuildTournamentStorage::ms_aspInv[uiIndex];
  else
    result = 0;
  return result;
}
// A8F3D0: using guessed type int GuildTournamentStorage::ms_aspInv[];

//----- (00615510) --------------------------------------------------------
void __cdecl GuildTournamentStorage::Add(Item *pkItem, unsigned int uiIndex)
{
  Item *v2; // esi@2

  if ( uiIndex < 0x24 )
  {
    v2 = (Item *)GuildTournamentStorage::ms_aspInv[uiIndex];
    if ( v2 != pkItem )
    {
      if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
      GuildTournamentStorage::ms_aspInv[uiIndex] = (int)pkItem;
      if ( pkItem )
        InterlockedIncrement((volatile LONG *)&pkItem->m_uiRefCount);
    }
  }
}
// A8F3D0: using guessed type int GuildTournamentStorage::ms_aspInv[];

//----- (00615570) --------------------------------------------------------
void __cdecl GuildTournamentStorage::Remove(unsigned int uiIndex)
{
  int v1; // esi@2

  if ( uiIndex < 0x24 )
  {
    v1 = GuildTournamentStorage::ms_aspInv[uiIndex];
    if ( v1 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v1 + 4)) )
      {
        if ( v1 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v1)(v1, 1);
      }
      GuildTournamentStorage::ms_aspInv[uiIndex] = 0;
    }
  }
}
// A8F3D0: using guessed type int GuildTournamentStorage::ms_aspInv[];

//----- (006155C0) --------------------------------------------------------
signed int __cdecl GuildTournamentStorage::GetEmpty()
{
  signed int result; // eax@1

  result = 0;
  while ( GuildTournamentStorage::ms_aspInv[result] )
  {
    if ( (unsigned int)++result >= 0x24 )
      return -1;
  }
  return result;
}
// A8F3D0: using guessed type int GuildTournamentStorage::ms_aspInv[];

//----- (006155E0) --------------------------------------------------------
char __cdecl GuildTournamentStorage::SetContents(PROTO_NC_GUILD_STORAGEOPEN_ACK *pkProto)
{
  int v1; // ecx@1
  PROTO_ITEMPACKET_INFORM *v2; // edi@1
  Item *v3; // eax@3
  Item *v4; // esi@3
  int v5; // edi@7
  Item **v6; // ebx@7
  unsigned int uiBuffSize; // [sp+14h] [bp-18h]@3
  int v9; // [sp+18h] [bp-14h]@2
  char *pcBuff; // [sp+1Ch] [bp-10h]@1
  int v11; // [sp+28h] [bp-4h]@5

  GuildTournamentStorage::Clear();
  v1 = pkProto->itemcounter;
  GuildTournamentStorage::ms_uiToken = pkProto->nToken;
  LODWORD(GuildTournamentStorage::ms_i64Money) = pkProto->cen;
  v2 = (PROTO_ITEMPACKET_INFORM *)&pkProto[1];
  HIDWORD(GuildTournamentStorage::ms_i64Money) = HIDWORD(pkProto->cen);
  pcBuff = (char *)&pkProto[1];
  if ( v1 )
  {
    v9 = v1;
    do
    {
      v3 = Item::Create(v2, (ITEM_INVEN *)&pkProto, &uiBuffSize);
      v4 = v3;
      if ( v3 )
        InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
      v11 = 0;
      if ( ((unsigned __int16)pkProto & 0xFC00) != 4096 || ((unsigned __int16)pkProto & 0x3FFu) >= 0x24 )
      {
        if ( v4 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
            v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
          v4 = 0;
        }
      }
      else
      {
        v5 = GuildTournamentStorage::ms_aspInv[(unsigned __int16)pkProto & 0x3FF];
        v6 = (Item **)(4 * ((unsigned __int16)pkProto & 0x3FF) + 11072464);
        if ( (Item *)v5 != v4 )
        {
          if ( v5 && !InterlockedDecrement((volatile LONG *)(v5 + 4)) && v5 )
            (**(void (__thiscall ***)(_DWORD, _DWORD))v5)(v5, 1);
          *v6 = v4;
          if ( v4 )
            InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
        }
      }
      v2 = (PROTO_ITEMPACKET_INFORM *)&pcBuff[uiBuffSize];
      v11 = -1;
      pcBuff += uiBuffSize;
      if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      --v9;
    }
    while ( v9 );
  }
  return 1;
}
// A8F3C0: using guessed type __int64 GuildTournamentStorage::ms_i64Money;
// A8F3C8: using guessed type unsigned __int64 GuildTournamentStorage::ms_uiToken;
// A8F3D0: using guessed type int GuildTournamentStorage::ms_aspInv[];

//----- (00615750) --------------------------------------------------------
void __thiscall MagicField::OnEffectDestory(MagicField *this, Effect *pkEffect)
{
  if ( pkEffect )
  {
    if ( pkEffect == this->m_pkFirstEffect )
      this->m_pkFirstEffect = 0;
    if ( pkEffect == this->m_pkLoopingEffect )
      this->m_pkLoopingEffect = 0;
    if ( pkEffect == this->m_pkLastEffect )
      this->m_pkLastEffect = 0;
  }
}

//----- (00615780) --------------------------------------------------------
void __cdecl MagicField::DeleteMagicField(unsigned __int16 handle)
{
  NiTListItem<NiD3DShaderInterface *> *v1; // eax@1
  NiD3DShaderInterface *v2; // esi@2
  void *iter; // [sp+0h] [bp-4h]@1

  v1 = MagicField::ms_kMagicFieldList.m_pkHead;
  iter = MagicField::ms_kMagicFieldList.m_pkHead;
  if ( MagicField::ms_kMagicFieldList.m_pkHead )
  {
    while ( 1 )
    {
      v2 = v1->m_element;
      if ( LOWORD(v2->m_pkD3DRenderer) == handle )
        break;
      v1 = v1->m_pkNext;
      if ( !v1 )
      {
        iter = 0;
        return;
      }
    }
    iter = v1;
    EffectMgr::RemoveEffect(&g_kEffectMgr, (Effect *)v2[1].m_uiRefCount);
    if ( v2[1].m_uiRefCount )
      (*(void (__thiscall **)(_DWORD))(*(_DWORD *)(v2[1].m_uiRefCount + 8) + 12))(v2[1].m_uiRefCount + 8);
    EffectMgr::RemoveEffect(&g_kEffectMgr, (Effect *)v2[1].m_pszName);
    if ( v2[1].m_uiImplementation )
      EffectMgr::PlayEffect(&g_kEffectMgr, (Effect *)v2[1].m_uiImplementation);
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(&MagicField::ms_kMagicFieldList, &iter);
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  }
}

//----- (00615810) --------------------------------------------------------
void __thiscall MagicField::~MagicField(MagicField *this)
{
  this->vfptr = (IEffectDestroyMessengerVtbl *)&MagicField::`vftable';
  this->m_pkFirstEffect = 0;
  this->m_pkLoopingEffect = 0;
  this->m_pkLastEffect = 0;
  IEffectDestroyMessenger::~IEffectDestroyMessenger((IEffectDestroyMessenger *)&this->vfptr);
}
// 9B6D70: using guessed type int (__thiscall *MagicField::`vftable')(void *p, char);

//----- (00615830) --------------------------------------------------------
void __thiscall MagicField::MagicField(MagicField *this, PROTO_NC_BRIEFINFO_MAGICFIELDSPREAD_CMD *rkProto)
{
  this->m_pkEffectDestoryMessengerList.vfptr = (NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>Vtbl *)&NiTList<IEffectDestroyMessenger *>::`vftable';
  this->m_pkEffectDestoryMessengerList.m_kAllocator.m_uiCount = 0;
  this->m_pkEffectDestoryMessengerList.m_pkHead = 0;
  this->m_pkEffectDestoryMessengerList.m_pkTail = 0;
  this->m_pkFirstEffect = 0;
  this->m_pkLoopingEffect = 0;
  this->m_pkLastEffect = 0;
  this->vfptr = (IEffectDestroyMessengerVtbl *)&MagicField::`vftable';
  this->m_kProto = *rkProto;
}
// 9B6D60: using guessed type int (__thiscall *NiTList<IEffectDestroyMessenger *>::`vftable')(void *p, char);
// 9B6D70: using guessed type int (__thiscall *MagicField::`vftable')(void *p, char);

//----- (00615880) --------------------------------------------------------
void __cdecl MagicField::AddMagicField(PROTO_NC_BRIEFINFO_MAGICFIELDSPREAD_CMD *rkProto, NiPoint3 *kDir, bool bSetDir)
{
  void *v3; // eax@1
  PROTO_NC_BRIEFINFO_MAGICFIELDSPREAD_CMD *v4; // ebx@1
  void *v5; // edi@1
  int v6; // esi@3
  ActiveSkillViewInfo **v7; // eax@5
  float fYPos; // ST18_4@7
  float fXPos; // ST14_4@7
  _BYTE v10[12]; // ST10_12@7
  _BYTE v11[12]; // ST04_12@7
  _BYTE v12[12]; // ST10_12@7
  _BYTE v13[12]; // ST04_12@7
  Effect *v14; // eax@7
  int v15; // esi@8
  int v16; // ebx@8
  int v17; // ecx@10
  int v18; // eax@11
  bool v19; // zf@12
  int v20; // ecx@14
  int v21; // eax@17
  int v22; // eax@19
  int v23; // eax@21
  NiTListItem<NiD3DShaderInterface *> *v24; // eax@23
  NiPoint3 kPos; // [sp+20h] [bp-14h]@7
  float fLoopKeepTime; // [sp+2Ch] [bp-8h]@12
  float fLoopWaitTime; // [sp+30h] [bp-4h]@14
  ActiveSkillViewInfo *pkInfo; // [sp+3Ch] [bp+8h]@3
  ActiveSkillViewInfo *pkInfoa; // [sp+3Ch] [bp+8h]@6

  v3 = operator new(0x30u);
  v4 = rkProto;
  v5 = 0;
  if ( v3 )
  {
    *((_DWORD *)v3 + 4) = 0;
    *((_DWORD *)v3 + 2) = 0;
    *((_DWORD *)v3 + 3) = 0;
    *((_DWORD *)v3 + 1) = &NiTList<IEffectDestroyMessenger *>::`vftable';
    *((_DWORD *)v3 + 9) = 0;
    *((_DWORD *)v3 + 10) = 0;
    *((_DWORD *)v3 + 11) = 0;
    *(_DWORD *)v3 = &MagicField::`vftable';
    *(PROTO_NC_BRIEFINFO_MAGICFIELDSPREAD_CMD *)((char *)v3 + 20) = *rkProto;
    v5 = v3;
  }
  v6 = ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable;
  pkInfo = (ActiveSkillViewInfo *)rkProto->skillid;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable
                                                           + 16))(
                          ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable,
                          v4->skillid) )
  {
    if ( (unsigned __int16)pkInfo <= *(_WORD *)(v6 + 200) )
    {
      v7 = (ActiveSkillViewInfo **)(*(_DWORD *)(v6 + 196) + 4 * (unsigned __int16)pkInfo);
      if ( *v7 )
      {
        pkInfoa = *v7;
        if ( *v7 )
        {
          fXPos = (double)v4->location.x;
          fYPos = (double)v4->location.y;
          World::GetGroundPos(&g_kWorld, fXPos, fYPos, &kPos, 0);
          *(float *)v10 = kDir->x;
          *(_QWORD *)&v10[4] = *(_QWORD *)&kDir->y;
          *(float *)v11 = kPos.x;
          *(_QWORD *)&v11[4] = *(_QWORD *)&kPos.y;
          *((_DWORD *)v5 + 9) = EffectMgr::JustCreateEffect(
                                  &g_kEffectMgr,
                                  pkInfoa->DOTRageEft,
                                  *(NiPoint3 *)v11,
                                  *(NiPoint3 *)v10,
                                  Timer::ms_fCurTime,
                                  bSetDir);
          *(float *)v12 = kDir->x;
          *(_QWORD *)&v12[4] = *(_QWORD *)&kDir->y;
          *(float *)v13 = kPos.x;
          *(_QWORD *)&v13[4] = *(_QWORD *)&kPos.y;
          v14 = EffectMgr::JustCreateEffect(
                  &g_kEffectMgr,
                  pkInfoa->DOTRageEftLoop,
                  *(NiPoint3 *)v13,
                  *(NiPoint3 *)v12,
                  Timer::ms_fCurTime,
                  bSetDir);
          *((_DWORD *)v5 + 10) = v14;
          if ( v14 )
          {
            v15 = v4->skillid;
            v16 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
            if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                                  + 16))(
                                    ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                                    v15) )
            {
              if ( (unsigned __int16)v15 <= *(_WORD *)(v16 + 200) )
              {
                v17 = *(_DWORD *)(v16 + 196);
                if ( *(_DWORD *)(v17 + 4 * v15) )
                {
                  v18 = *(_DWORD *)(v17 + 4 * v15);
                  if ( v18 )
                  {
                    v19 = *(_DWORD *)(v18 + 539) == 14;
                    fLoopKeepTime = 0.0;
                    if ( v19 )
                      fLoopKeepTime = (double)*(unsigned int *)(v18 + 543) / 1000.0;
                    v20 = *((_DWORD *)v5 + 9);
                    fLoopWaitTime = 0.0;
                    if ( v20 )
                      fLoopWaitTime = *(float *)((*(int (**)(void))(*(_DWORD *)v20 + 16))() + 12);
                    Effect::SetLoopInfo(
                      *((Effect **)v5 + 10),
                      pkInfoa->DOTRageEftLoopSnd,
                      fLoopKeepTime,
                      fLoopWaitTime,
                      Timer::ms_fCurTime);
                  }
                }
              }
            }
          }
          v21 = *((_DWORD *)v5 + 9);
          if ( v21 )
          {
            *(_DWORD *)(v21 + 144) = *((_DWORD *)v5 + 10);
            EffectMgr::PlayEffect(&g_kEffectMgr, *((Effect **)v5 + 9));
            SoundMgr::CreateSound(&g_kSoundMgr, pkInfoa->DOTRageEftSnd, &kPos);
          }
          v22 = *((_DWORD *)v5 + 9);
          if ( v22 )
            (*(void (__thiscall **)(int, void *))(*(_DWORD *)(v22 + 8) + 4))(v22 + 8, v5);
          v23 = *((_DWORD *)v5 + 10);
          if ( v23 )
            (*(void (__thiscall **)(int, void *))(*(_DWORD *)(v23 + 8) + 4))(v23 + 8, v5);
          v24 = MagicField::ms_kMagicFieldList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&MagicField::ms_kMagicFieldList);
          v24->m_element = (NiD3DShaderInterface *)v5;
          v24->m_pkNext = 0;
          v24->m_pkPrev = MagicField::ms_kMagicFieldList.m_pkTail;
          if ( MagicField::ms_kMagicFieldList.m_pkTail )
          {
            MagicField::ms_kMagicFieldList.m_pkTail->m_pkNext = v24;
            ++MagicField::ms_kMagicFieldList.m_kAllocator.m_uiCount;
            MagicField::ms_kMagicFieldList.m_pkTail = v24;
          }
          else
          {
            ++MagicField::ms_kMagicFieldList.m_kAllocator.m_uiCount;
            MagicField::ms_kMagicFieldList.m_pkHead = v24;
            MagicField::ms_kMagicFieldList.m_pkTail = v24;
          }
        }
      }
    }
  }
}
// 9B6D60: using guessed type int (__thiscall *NiTList<IEffectDestroyMessenger *>::`vftable')(void *p, char);
// 9B6D70: using guessed type int (__thiscall *MagicField::`vftable')(void *p, char);
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
// A8CAA0: using guessed type int ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable;

//----- (00615B70) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<MagicField *>,MagicField *>::~NiTListBase<DFALL<MagicField *>,MagicField *>(NiTListBase<DFALL<MagicField *>,MagicField *> *this)
{
  this->vfptr = (NiTListBase<DFALL<MagicField *>,MagicField *>Vtbl *)&NiTListBase<DFALL<MagicField *>,MagicField *>::`vftable';
}
// 9B6CFC: using guessed type int (__thiscall *NiTListBase<DFALL<MagicField *>,MagicField *>::`vftable')(void *p, char);

//----- (00615B80) --------------------------------------------------------
NiTListBase<DFALL<MagicField *>,MagicField *> *__thiscall NiTListBase<DFALL<MagicField *>,MagicField *>::`scalar deleting destructor'(NiTListBase<DFALL<MagicField *>,MagicField *> *this, unsigned int a2)
{
  NiTListBase<DFALL<MagicField *>,MagicField *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<MagicField *>,MagicField *>Vtbl *)&NiTListBase<DFALL<MagicField *>,MagicField *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9B6CFC: using guessed type int (__thiscall *NiTListBase<DFALL<MagicField *>,MagicField *>::`vftable')(void *p, char);

//----- (00615BB0) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>::~NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>(NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *> *this)
{
  this->vfptr = (NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>Vtbl *)&NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>::`vftable';
}
// 9B6D0C: using guessed type int (__thiscall *NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>::`vftable')(void *p, char);

//----- (00615BC0) --------------------------------------------------------
NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *> *__thiscall NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>::`vector deleting destructor'(NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *> *this, unsigned int a2)
{
  NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>Vtbl *)&NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9B6D0C: using guessed type int (__thiscall *NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>::`vftable')(void *p, char);

//----- (00615BF0) --------------------------------------------------------
NiTMapItem<char const *,NiD3DGlobalConstantEntry *> *NiTPointerListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>::NewItem()
{
  NiTMapItem<char const *,NiD3DGlobalConstantEntry *> *result; // eax@1

  result = (NiTMapItem<char const *,NiD3DGlobalConstantEntry *> *)operator new(0xCu);
  result->m_val = 0;
  return result;
}

//----- (00615C10) --------------------------------------------------------
NiTPointerListBase<DFALL<MagicField *>,MagicField *> *__thiscall NiTPointerListBase<DFALL<MagicField *>,MagicField *>::`vector deleting destructor'(NiTPointerListBase<DFALL<MagicField *>,MagicField *> *this, unsigned int a2)
{
  NiTPointerListBase<DFALL<MagicField *>,MagicField *> *v2; // edi@1
  NiTListItem<MagicField *> *v3; // esi@1
  NiTListItem<MagicField *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<MagicField *>,MagicField *>Vtbl *)&NiTPointerListBase<DFALL<MagicField *>,MagicField *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<DFALL<MagicField *>,MagicField *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<MagicField *>,MagicField *>Vtbl *)&NiTListBase<DFALL<MagicField *>,MagicField *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B6CFC: using guessed type int (__thiscall *NiTListBase<DFALL<MagicField *>,MagicField *>::`vftable')(void *p, char);
// 9B6D2C: using guessed type int (__thiscall *NiTPointerListBase<DFALL<MagicField *>,MagicField *>::`vftable')(void *p, char);

//----- (00615CA0) --------------------------------------------------------
void __thiscall IEffectDestroyMessenger::~IEffectDestroyMessenger(IEffectDestroyMessenger *this)
{
  char *v1; // edi@1
  NiTListItem<IEffectDestroyMessenger *> *v2; // esi@1
  NiTListItem<IEffectDestroyMessenger *> *v3; // ST00_4@2

  v1 = (char *)&this->m_pkEffectDestoryMessengerList;
  this->vfptr = (IEffectDestroyMessengerVtbl *)&IEffectDestroyMessenger::`vftable';
  this->m_pkEffectDestoryMessengerList.vfptr = (NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>Vtbl *)&NiTPointerListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>::`vftable';
  v2 = this->m_pkEffectDestoryMessengerList.m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v1 + 8))(v1, v3);
  }
  *((_DWORD *)v1 + 3) = 0;
  *((_DWORD *)v1 + 1) = 0;
  *((_DWORD *)v1 + 2) = 0;
  *(_DWORD *)v1 = &NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>::`vftable';
}
// 9B6D0C: using guessed type int (__thiscall *NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>::`vftable')(void *p, char);
// 9B6D1C: using guessed type int (__thiscall *NiTPointerListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>::`vftable')(void *p, char);
// 9B6D4C: using guessed type int (__thiscall *IEffectDestroyMessenger::`vftable')(void *p, char);

//----- (00615D20) --------------------------------------------------------
NiTList<IEffectDestroyMessenger *> *__thiscall NiTPointerListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>::`vector deleting destructor'(NiTList<IEffectDestroyMessenger *> *this, unsigned int a2)
{
  NiTList<IEffectDestroyMessenger *> *v2; // edi@1
  NiTListItem<IEffectDestroyMessenger *> *v3; // esi@1
  NiTListItem<IEffectDestroyMessenger *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>Vtbl *)&NiTPointerListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>Vtbl *)&NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B6D0C: using guessed type int (__thiscall *NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>::`vftable')(void *p, char);
// 9B6D1C: using guessed type int (__thiscall *NiTPointerListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>::`vftable')(void *p, char);

//----- (00615DB0) --------------------------------------------------------
MagicField *__thiscall MagicField::`vector deleting destructor'(MagicField *this, unsigned int a2)
{
  MagicField *v2; // esi@1

  v2 = this;
  this->vfptr = (IEffectDestroyMessengerVtbl *)&MagicField::`vftable';
  this->m_pkFirstEffect = 0;
  this->m_pkLoopingEffect = 0;
  this->m_pkLastEffect = 0;
  IEffectDestroyMessenger::~IEffectDestroyMessenger((IEffectDestroyMessenger *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B6D70: using guessed type int (__thiscall *MagicField::`vftable')(void *p, char);

//----- (00615E00) --------------------------------------------------------
void __thiscall MapNavigator::MapNavigator(MapNavigator *this)
{
  MapNavigator *v1; // esi@1
  int v2; // ST00_4@1

  v1 = this;
  NiObject::NiObject((NiObject *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&MapNavigator::`vftable';
  CWayPoint::CWayPoint(&v1->m_WayPoint);
  v1->m_kMobID = -1;
  v1->m_bIsWorking = 0;
  v1->m_pTargetDot = 0;
  v1->m_bEnableAutoWay = 0;
  v2 = (int)&v1->m_acRememberDestMap;
  *(_DWORD *)(v2 + 8) = 0;
  *(_DWORD *)(v2 + 4) = 0;
  *(_DWORD *)v2 = 0;
  strncpy(v1->m_acRememberDestMap.n3_name, &byte_9B6D80, 0xCu);
}
// 9B6D8C: using guessed type int (__thiscall *MapNavigator::`vftable')(void *p, char);

//----- (00615E90) --------------------------------------------------------
void __thiscall MapNavigator::~MapNavigator(MapNavigator *this)
{
  MapNavigator *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&MapNavigator::`vftable';
  CWayPoint::~CWayPoint(&this->m_WayPoint);
  NiRefObject::~NiRefObject((CPostProcessEffect *)v1);
}
// 9B6D8C: using guessed type int (__thiscall *MapNavigator::`vftable')(void *p, char);

//----- (00615EF0) --------------------------------------------------------
void __cdecl MapNavigator::Create()
{
  MapNavigator *v0; // eax@2
  int v1; // eax@3
  int v2; // esi@3
  void (__thiscall ***v3)(_DWORD, _DWORD); // edi@7

  if ( !MapNavigator::ms_spMapNavigatorTask )
  {
    v0 = (MapNavigator *)operator new(0x68u);
    if ( v0 )
    {
      MapNavigator::MapNavigator(v0);
      v2 = v1;
    }
    else
    {
      v2 = 0;
    }
    if ( MapNavigator::ms_spMapNavigatorTask != v2 )
    {
      if ( MapNavigator::ms_spMapNavigatorTask )
      {
        v3 = (void (__thiscall ***)(_DWORD, _DWORD))MapNavigator::ms_spMapNavigatorTask;
        if ( !InterlockedDecrement((volatile LONG *)(MapNavigator::ms_spMapNavigatorTask + 4)) )
        {
          if ( v3 )
            (**v3)(v3, 1);
        }
      }
      MapNavigator::ms_spMapNavigatorTask = v2;
      if ( v2 )
        InterlockedIncrement((volatile LONG *)(v2 + 4));
    }
  }
}
// A8F460: using guessed type int MapNavigator::ms_spMapNavigatorTask;

//----- (00615FA0) --------------------------------------------------------
void __cdecl MapNavigator::Terminate()
{
  void (__thiscall ***v0)(_DWORD, _DWORD); // esi@1

  v0 = (void (__thiscall ***)(_DWORD, _DWORD))MapNavigator::ms_spMapNavigatorTask;
  if ( MapNavigator::ms_spMapNavigatorTask )
  {
    if ( !InterlockedDecrement((volatile LONG *)(MapNavigator::ms_spMapNavigatorTask + 4)) )
    {
      if ( v0 )
        (**v0)(v0, 1);
    }
    MapNavigator::ms_spMapNavigatorTask = 0;
  }
}
// A8F460: using guessed type int MapNavigator::ms_spMapNavigatorTask;

//----- (00615FE0) --------------------------------------------------------
char __thiscall MapNavigator::Init(MapNavigator *this)
{
  int v1; // eax@1
  MapNavigator *v2; // ebx@1
  int v3; // eax@2
  int v4; // ecx@4
  int v5; // ecx@5
  CWayPoint *v6; // ebx@7
  signed int i; // edi@7
  char *v8; // eax@8
  char *v9; // esi@8
  int v10; // ecx@9
  int v11; // edx@9
  MapViewInfo *v12; // eax@9
  unsigned int v13; // esi@12
  char *v14; // eax@13
  unsigned int v15; // esi@15
  char *v16; // eax@16
  MapNavigator *v18; // [sp+Ch] [bp-18h]@1
  char acstr[13]; // [sp+10h] [bp-14h]@9

  v1 = *(_DWORD *)(ITableBase<MapInfo,MapInfoTab>::ms_pkTable + 56);
  v2 = this;
  v18 = this;
  if ( v1 )
    v3 = *(_DWORD *)(v1 + 40);
  else
    v3 = 0;
  v4 = *(_DWORD *)(ITableBase<MapWayPoint,MapWayPointTab>::ms_pkTable + 56);
  if ( v4 )
    v5 = *(_DWORD *)(v4 + 40);
  else
    v5 = 0;
  v6 = &v2->m_WayPoint;
  CWayPoint::Init(v6, v5, v3, 4);
  for ( i = 0; i < (signed int)ITableBase<MapInfo,MapInfoTab>::GetTotal(); ++i )
  {
    v8 = CDataReader::GetRecord((CDataReader *)(ITableBase<MapInfo,MapInfoTab>::ms_pkTable + 4), i);
    v9 = v8;
    if ( v8 )
    {
      v10 = *(_DWORD *)(v8 + 6);
      *(_DWORD *)acstr = *(_DWORD *)(v8 + 2);
      v11 = *(_DWORD *)(v8 + 10);
      *(_DWORD *)&acstr[4] = v10;
      *(_DWORD *)&acstr[8] = v11;
      acstr[12] = 0;
      v12 = MapViewInfoTab::GetByMapName((Name3 *)(v8 + 2));
      if ( !v12 )
        goto LABEL_19;
      CWayPoint::Add_Map(v6, acstr, *(_WORD *)v9, v12->MWP_IsMove);
    }
  }
  v13 = 0;
  if ( (signed int)MapWayPointTab::GetTotal() <= 0 )
  {
LABEL_15:
    v15 = 0;
    if ( (signed int)MapLinkPointTab::GetTotal() <= 0 )
    {
LABEL_18:
      v18->m_bInitialFinished = 1;
      v18->m_bEnableAutoWay = User::Lv(&g_kUser) <= 0x3C;
      return 1;
    }
    while ( 1 )
    {
      v16 = CDataReader::GetRecord((CDataReader *)(ITableBase<MapLinkPoint,MapLinkPointTab>::ms_pkTable + 4), v15);
      if ( !v16 )
        break;
      CWayPoint::Add_Link(
        v6,
        *(_DWORD *)v16,
        *((_DWORD *)v16 + 1),
        (LINK_TYPE)*((_WORD *)v16 + 6),
        *((_DWORD *)v16 + 2));
      if ( (signed int)++v15 >= (signed int)MapLinkPointTab::GetTotal() )
        goto LABEL_18;
    }
  }
  else
  {
    while ( 1 )
    {
      v14 = CDataReader::GetRecord((CDataReader *)(ITableBase<MapWayPoint,MapWayPointTab>::ms_pkTable + 4), v13);
      if ( !v14 )
        break;
      CWayPoint::Add_Dot(
        v6,
        *(_WORD *)v14,
        *(_DWORD *)(v14 + 2),
        *(_DWORD *)(v14 + 6),
        (DOT_TYPE)(unsigned __int8)v14[10]);
      if ( (signed int)++v13 >= (signed int)MapWayPointTab::GetTotal() )
        goto LABEL_15;
    }
  }
LABEL_19:
  v18->m_bInitialFinished = 0;
  return 0;
}
// A89D38: using guessed type int ITableBase<MapInfo,MapInfoTab>::ms_pkTable;
// A8C1E4: using guessed type int ITableBase<MapWayPoint,MapWayPointTab>::ms_pkTable;
// A8C1E8: using guessed type int ITableBase<MapLinkPoint,MapLinkPointTab>::ms_pkTable;

//----- (00616170) --------------------------------------------------------
void __thiscall MapNavigator::Arrive(MapNavigator *this, NiPoint3 *kPos)
{
  MapNavigator *v2; // esi@1
  PgFrameWork *v3; // eax@1
  GTInformWin *v4; // edi@2
  int v5; // eax@3
  MobInfo *v6; // eax@4
  D3DXCOLOR v7; // ST08_16@5
  int v8; // ST04_4@5
  char *v9; // eax@5
  char *v10; // eax@5
  double v11; // st6@6
  double v12; // st5@6
  double v13; // st6@6
  double v14; // st7@6
  int v15; // eax@6
  NiPoint3 CurPos; // [sp+Ch] [bp-24h]@6
  float v17; // [sp+18h] [bp-18h]@6
  float v18; // [sp+1Ch] [bp-14h]@6
  float v19; // [sp+20h] [bp-10h]@6
  NiPoint3 V1; // [sp+24h] [bp-Ch]@6

  v2 = this;
  v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v3 )
  {
    v4 = (GTInformWin *)v3[33].m_kMsgQ.m_uiHead;
    if ( v4 )
    {
      GTInformWin::Clear((GTInformWin *)v3[33].m_kMsgQ.m_uiHead);
      v5 = v2->m_kMobID;
      if ( (_WORD)v5 != -1 )
      {
        v6 = IIDTableBase<MobInfo,MobInfoTab,unsigned short>::GetByID(v5);
        if ( v6 )
        {
          *(_QWORD *)&v7.r = *(_QWORD *)&Color::m_kDxGreenColor.r;
          *(_QWORD *)&v7.b = *(_QWORD *)&Color::m_kDxGreenColor.b;
          v8 = (int)v6->Name;
          v9 = (char *)TextData2::Get(0x9F99D2D8);
          v10 = fs(v9, v8);
          GTInformWin::AddText(v4, v10, v7, 0, 5.0);
        }
      }
    }
  }
  ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[6].SetAbStateProperty)(&CurPos);
  v17 = v2->m_kDestPos.x - CurPos.x;
  v11 = v2->m_kDestPos.y;
  V1.x = v17;
  v12 = v11 - CurPos.y;
  v13 = CurPos.y;
  v18 = v12;
  v19 = v2->m_kDestPos.z - CurPos.z;
  V1.x = v17 * 0.800000011920929;
  V1.y = v18 * 0.800000011920929;
  V1.z = 0.800000011920929 * v19;
  v14 = CurPos.z;
  v17 = CurPos.x + V1.x;
  kPos->x = v17;
  v18 = v13 + V1.y;
  kPos->y = v18;
  v19 = v14 + V1.z;
  kPos->z = v19;
  v15 = (int)&v2->m_acRememberDestMap;
  v2->m_bIsWorking = 0;
  v2->m_kMobID = -1;
  *(_DWORD *)(v15 + 8) = 0;
  *(_DWORD *)(v15 + 4) = 0;
  *(_DWORD *)v15 = 0;
  strncpy(v2->m_acRememberDestMap.n3_name, byte_9B6D81, 0xCu);
}

//----- (006162F0) --------------------------------------------------------
bool __thiscall MapNavigator::FindPathAway(MapNavigator *this, NiPoint3 *kCurPos, NiPoint3 *kDest, char *pMapName, char *pDestMap, unsigned __int16 kMobID)
{
  MapNavigator *v6; // esi@1
  PgFrameWork *v7; // eax@1
  GTInformWin *v8; // ebx@2
  char v9; // al@5
  MapViewInfo *v10; // eax@7
  D3DXCOLOR *v11; // eax@9
  D3DXCOLOR v12; // ST04_16@9
  char *v13; // eax@9
  int v14; // ebx@10
  double v15; // st7@10
  char *fLifeTime; // ST18_4@12
  int v17; // eax@14
  NiPoint3 *v18; // eax@14
  int v19; // edx@14
  bool v20; // al@15
  D3DXCOLOR *v21; // eax@17
  D3DXCOLOR v22; // ST04_16@17
  char *v23; // eax@17
  NiPoint3 *v24; // eax@20
  GTInformWin *v25; // ecx@22
  GTInformWin *pkWin; // [sp+14h] [bp-2Ch]@2
  MAP_DOT *kCurDot; // [sp+18h] [bp-28h]@10
  MAP_DOT *kDestDot; // [sp+1Ch] [bp-24h]@11
  char *nm; // [sp+20h] [bp-20h]@1
  NiPoint3 *v30; // [sp+24h] [bp-1Ch]@1
  CWayPoint *v31; // [sp+28h] [bp-18h]@10
  D3DXCOLOR result; // [sp+2Ch] [bp-14h]@7

  v6 = this;
  v30 = kDest;
  nm = pDestMap;
  v7 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( !v7 )
    return 0;
  v8 = (GTInformWin *)v7[33].m_kMsgQ.m_uiHead;
  pkWin = v8;
  if ( !v8 )
    return 0;
  if ( !v6->m_bInitialFinished || !v6->m_bEnableAutoWay || (v9 = g_pkMainChar->m_byMode, v9 == 4) || v9 == 5 )
  {
    v25 = v8;
    goto LABEL_24;
  }
  Name3::Name3((Name3 *)&result.g, pMapName);
  v10 = MapViewInfoTab::GetByMapName((Name3 *)&result.g);
  if ( v10 && v10->MWP_IsMove == 1 )
  {
    GTInformWin::Clear(v8);
    v11 = Color::GetDxColor(&result, -1, -112, 0, -1);
    *(_QWORD *)&v12.r = *(_QWORD *)&v11->r;
    *(_QWORD *)&v12.b = *(_QWORD *)&v11->b;
    v13 = (char *)TextData2::Get(0x8D898CA0);
    GTInformWin::AddText(v8, v13, v12, 0, 3.0);
    return 0;
  }
  v14 = (int)&v6->m_pTargetDot;
  v6->m_kMobID = -1;
  v6->m_pTargetDot = 0;
  v6->m_eDotState = 0;
  v15 = kCurPos->y;
  v31 = &v6->m_WayPoint;
  if ( !CWayPoint::Get_NearDot(&v6->m_WayPoint, pMapName, (signed int)kCurPos->x, (signed int)v15, &kCurDot)
    || !CWayPoint::Get_NearDot(v31, nm, (signed int)v30->x, (signed int)v30->y, &kDestDot) )
  {
    v25 = pkWin;
LABEL_24:
    GTInformWin::Clear(v25);
    return 0;
  }
  fLifeTime = nm;
  v6->m_kMobID = kMobID;
  Name3::operator=(&v6->m_acRememberDestMap, fLifeTime);
  if ( !CWayPoint::Get_BFS_NextDot(v31, kCurDot->nDotNo, kDestDot->nDotNo, &v6->m_pTargetDot) )
  {
    if ( kCurDot == kDestDot )
    {
      v6->m_kStartPos = *kCurPos;
      v24 = v30;
      v6->m_kDestPos.x = v30->x;
      v6->m_kDestPos.y = v24->y;
      v6->m_kDestPos.z = v24->z;
      MapNavigator::Arrive(v6, (NiPoint3 *)&result.g);
      g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[7].dwEffectIndex[0] = 0;
      MainChar::SetStartReserveAct((MainChar *)g_pkMainChar, RESERVEACT_PICKGROUND);
      MainChar::SetRevserveMovePos((MainChar *)g_pkMainChar, (NiPoint3 *)&result.g);
      MainChar::StartMoveTarget((MainChar *)g_pkMainChar);
    }
    return 1;
  }
  if ( *(_DWORD *)v14 )
  {
    CWayPoint::Get_BFS_NextDot(v31, kCurDot->nDotNo, kDestDot->nDotNo, &v6->m_pTargetDot);
    v17 = *(_DWORD *)v14;
    *(float *)&nm = (double)*(signed int *)(*(_DWORD *)v14 + 12);
    result.g = (double)*(signed int *)(v17 + 8);
    result.b = *(float *)&nm;
    result.a = 0.0;
    g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[7].dwEffectIndex[0] = 0;
    MainChar::SetStartReserveAct((MainChar *)g_pkMainChar, RESERVEACT_PICKGROUND);
    MainChar::SetRevserveMovePos((MainChar *)g_pkMainChar, (NiPoint3 *)&result.g);
    MainChar::StartMoveTarget((MainChar *)g_pkMainChar);
    v6->m_bIsWorking = 1;
    dword_B25060->m_uFlags |= 1u;
    v6->m_kStartPos = *kCurPos;
    v18 = v30;
    v6->m_kDestPos.x = v30->x;
    v6->m_kDestPos.y = v18->y;
    v19 = *(_DWORD *)v14;
    v6->m_kDestPos.z = v18->z;
    if ( *(_DWORD *)(v19 + 16) == 2 )
    {
      v6->m_eDotState = 1;
      return 1;
    }
    return 1;
  }
  if ( CWayPoint::Get_LastError(v31) == 100 )
  {
    GTInformWin::Clear(pkWin);
    v21 = Color::GetDxColor(&result, -1, -112, 0, -1);
    *(_QWORD *)&v22.r = *(_QWORD *)&v21->r;
    *(_QWORD *)&v22.b = *(_QWORD *)&v21->b;
    v23 = (char *)TextData2::Get(0xACB7C7Cu);
    GTInformWin::AddText(pkWin, v23, v22, 0, 3.0);
    v20 = 1;
  }
  else
  {
    GTInformWin::Clear(pkWin);
    v20 = 1;
  }
  return v20;
}

//----- (006166C0) --------------------------------------------------------
void __thiscall MapNavigator::OnIdle(MapNavigator *this, float fTime)
{
  MapNavigator *v2; // ebx@1
  bool v3; // zf@8
  const void **v4; // edi@8
  PgFrameWork *v5; // eax@12
  GTInformWin *v6; // esi@13
  D3DXCOLOR *v7; // eax@14
  D3DXCOLOR v8; // ST08_16@14
  char *v9; // eax@14
  signed int *v10; // eax@16
  void (__thiscall *v11)(AbStateInfectee *, ABSTATEINDEX, bool, int); // edx@16
  MapNavigator::DOT_STATE v12; // esi@16
  Name3 *v13; // eax@18
  unsigned int v14; // eax@19
  MobCoordinate *v15; // eax@19
  MobCoordinate *v16; // esi@19
  signed int v17; // eax@20
  double v18; // st7@20
  void (__thiscall *v19)(AbStateInfectee *, ABSTATEINDEX, bool, int); // edx@22
  Name3 *v20; // eax@22
  unsigned int v21; // ecx@22
  unsigned int v22; // eax@22
  unsigned int v23; // edx@22
  unsigned __int16 fLifeTime; // ST1C_2@22
  unsigned int v25; // eax@22
  signed int *v26; // edi@23
  double v27; // st7@23
  NiPoint3 *v28; // edx@25
  int *v29; // edi@30
  int v30; // edi@30
  MapViewInfo *v31; // eax@31
  PgFrameWork *v32; // eax@35
  GTInformWin *v33; // esi@36
  int v34; // eax@37
  MobInfo *v35; // eax@38
  D3DXCOLOR v36; // ST08_16@39
  int v37; // ST04_4@39
  char *v38; // eax@39
  char *v39; // eax@39
  double v40; // st7@40
  double v41; // st7@40
  AbStateInfecteeVtbl *v42; // edx@43
  void (__thiscall *v43)(AbStateInfectee *, ABSTATEINDEX, bool, int); // edx@43
  int v44; // esi@43
  Char *v45; // edi@44
  float v46; // eax@47
  Char *v47; // eax@50
  GameFrameWork *v48; // eax@51
  signed int *v49; // edi@55
  double v50; // st7@56
  signed int *v51; // edi@57
  double v52; // st7@58
  signed int *v53; // edi@63
  double v54; // st7@64
  MAP_DOT kOldDot; // [sp+14h] [bp-198h]@30
  NiPoint3 kCurPos; // [sp+40h] [bp-16Ch]@22
  NiPoint3 kPos; // [sp+4Ch] [bp-160h]@16
  float v58; // [sp+58h] [bp-154h]@46
  signed int hMob; // [sp+5Ch] [bp-150h]@26
  Name3 result; // [sp+60h] [bp-14Ch]@20
  float fMinLength; // [sp+6Ch] [bp-140h]@8
  NiPoint3 kTargetPos; // [sp+70h] [bp-13Ch]@16
  NiPoint3 kNewPos; // [sp+7Ch] [bp-130h]@18
  char strMapName[256]; // [sp+88h] [bp-124h]@31
  D3DXCOLOR acMapName; // [sp+188h] [bp-24h]@14
  char acDestMapName[13]; // [sp+198h] [bp-14h]@22

  v2 = this;
  if ( this->m_bInitialFinished )
  {
    if ( ChargedItemList::IsEffecting(EE_AUTOPATHFIND) == 1 )
      v2->m_bEnableAutoWay = 1;
    if ( v2->m_bEnableAutoWay && !ChargedItemList::IsEffecting(EE_AUTOPATHFIND) )
      v2->m_bEnableAutoWay = User::Lv(&g_kUser) <= 0x3C;
    if ( v2->m_bIsWorking )
    {
      v3 = v2->m_pTargetDot == 0;
      v4 = (const void **)&v2->m_pTargetDot;
      LODWORD(fMinLength) = (char *)v2 + 56;
      if ( !v3 )
      {
        if ( Char::IsActProducing(g_pkMainChar)
          || Char::IsActGathering(g_pkMainChar)
          || Char::IsActItemCasting(g_pkMainChar) )
        {
          v5 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
          if ( v5 )
          {
            v6 = (GTInformWin *)v5[33].m_kMsgQ.m_uiHead;
            if ( v6 )
            {
              GTInformWin::Clear((GTInformWin *)v5[33].m_kMsgQ.m_uiHead);
              v7 = Color::GetDxColor(&acMapName, -1, -112, 0, -1);
              *(_QWORD *)&v8.r = *(_QWORD *)&v7->r;
              *(_QWORD *)&v8.b = *(_QWORD *)&v7->b;
              v9 = (char *)TextData2::Get(0x3C517589u);
              GTInformWin::AddText(v6, v9, v8, 0, 3.0);
            }
          }
          v2->m_bIsWorking = 0;
        }
        v10 = (signed int *)*v4;
        v11 = g_pkMainChar->vfptr[6].SetAbStateProperty;
        kTargetPos.x = (double)*((signed int *)*v4 + 2);
        kTargetPos.y = (double)v10[3];
        ((void (__stdcall *)(NiPoint3 *))v11)(&kPos);
        v12 = v2->m_eDotState;
        kPos.x = kPos.x - kTargetPos.x;
        kPos.y = kPos.y - kTargetPos.y;
        kPos.z = 0.0 - 0.0;
        if ( v12 == 3 )
        {
          v3 = *v4 == 0;
          v2->m_eDotState = 0;
          if ( v3 )
          {
            MapNavigator::Arrive(v2, &kTargetPos);
          }
          else
          {
            v13 = World::GetMapName(&g_kWorld, (Name3 *)&kNewPos);
            if ( Name3::operator==(&v2->m_acRememberDestMap, v13) )
            {
              v14 = MobCoordinateTab::GetRecordNum(v2->m_kMobID);
              v15 = ITableBase<MobCoordinate,MobCoordinateTab>::GetByIndex(v14);
              v16 = v15;
              if ( v15 )
              {
                v17 = v15->CenterY;
                *(float *)&result.n3_code[0] = (double)v16->CenterX;
                v18 = (double)(signed int)v16->CenterY;
                if ( v17 < 0 )
                  v18 = v18 + 4294967300.0;
                *(float *)&result.n3_code[1] = v18;
                *(float *)&result.n3_code[2] = 0.0;
                *(_QWORD *)&kCurPos.x = *(_QWORD *)&result.n3_name[0];
                v19 = g_pkMainChar->vfptr[6].SetAbStateProperty;
                kCurPos.z = 0.0;
                ((void (__stdcall *)(NiPoint3 *))v19)(&kNewPos);
                v20 = World::GetMapName(&g_kWorld, &result);
                LODWORD(acMapName.r) = v20->n3_code[0];
                v21 = v16->MapName.n3_code[0];
                LODWORD(acMapName.g) = v20->n3_code[1];
                v22 = v20->n3_code[2];
                v23 = v16->MapName.n3_code[1];
                *(_DWORD *)acDestMapName = v21;
                fLifeTime = v2->m_kMobID;
                LODWORD(acMapName.b) = v22;
                v25 = v16->MapName.n3_code[2];
                *(_DWORD *)&acDestMapName[4] = v23;
                *(_DWORD *)&acDestMapName[8] = v25;
                LOBYTE(acMapName.a) = 0;
                acDestMapName[12] = 0;
                MapNavigator::FindPathAway(v2, &kNewPos, &kCurPos, (char *)&acMapName, acDestMapName, fLifeTime);
                return;
              }
            }
            v26 = (signed int *)*v4;
            *(float *)&result.n3_code[0] = (double)v26[2];
            v27 = (double)v26[3];
            LODWORD(kTargetPos.x) = result.n3_code[0];
            *(float *)&result.n3_code[1] = v27;
            LODWORD(kTargetPos.y) = result.n3_code[1];
            *(float *)&result.n3_code[2] = 0.0;
            kTargetPos.z = 0.0;
          }
          g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[7].dwEffectIndex[0] = 0;
          MainChar::SetStartReserveAct((MainChar *)g_pkMainChar, RESERVEACT_PICKGROUND);
          v28 = &kTargetPos;
        }
        else
        {
          *(float *)&hMob = kPos.z * kPos.z + kPos.x * kPos.x + kPos.y * kPos.y;
          *(float *)&hMob = sqrt(*(float *)&hMob);
          if ( *(float *)&hMob < 50.0 && v12 != 2 )
          {
            if ( v12 == 1 )
            {
              if ( *((_DWORD *)*v4 + 4) == 2 )
              {
                qmemcpy(&kOldDot, *v4, sizeof(kOldDot));
                v29 = (int *)LODWORD(fMinLength);
                CWayPoint::Get_BFS_NextDot(&v2->m_WayPoint, -1, -1, (MAP_DOT **)LODWORD(fMinLength));
                v30 = *v29;
                if ( v30 )
                {
                  strMapName[0] = 0;
                  memset(&strMapName[1], 0, 0xFFu);
                  CWayPoint::Get_MapName(&v2->m_WayPoint, *(_DWORD *)(v30 + 4), strMapName);
                  Name3::Name3((Name3 *)&kNewPos, strMapName);
                  v31 = MapViewInfoTab::GetByMapName((Name3 *)&kNewPos);
                  v4 = (const void **)LODWORD(fMinLength);
                  if ( kOldDot.nMapID == *(_DWORD *)(*(_DWORD *)LODWORD(fMinLength) + 4) )
                  {
                    v2->m_eDotState = 0;
                  }
                  else if ( v31 && v31->MWP_IsMove == 1 )
                  {
                    v2->m_eDotState = 0;
                    v32 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
                    if ( v32 )
                    {
                      v33 = (GTInformWin *)v32[33].m_kMsgQ.m_uiHead;
                      if ( v33 )
                      {
                        GTInformWin::Clear((GTInformWin *)v32[33].m_kMsgQ.m_uiHead);
                        v34 = v2->m_kMobID;
                        if ( (_WORD)v34 != -1 )
                        {
                          v35 = IIDTableBase<MobInfo,MobInfoTab,unsigned short>::GetByID(v34);
                          if ( v35 )
                          {
                            *(_QWORD *)&v36.r = *(_QWORD *)&Color::m_kDxGreenColor.r;
                            *(_QWORD *)&v36.b = *(_QWORD *)&Color::m_kDxGreenColor.b;
                            v37 = (int)v35->Name;
                            v38 = (char *)TextData2::Get(0xDCEAC7E9);
                            v39 = fs(v38, v37);
                            GTInformWin::AddText(v33, v39, v36, 0, 5.0);
                          }
                        }
                      }
                    }
                    v40 = (double)kOldDot.X;
                    *v4 = 0;
                    v2->m_bIsWorking = 0;
                    kTargetPos.x = v40;
                    v41 = (double)kOldDot.Y;
                    result.n3_code[0] = LODWORD(kTargetPos.x);
                    v2->m_kMobID = -1;
                    kTargetPos.y = v41;
                    result.n3_code[1] = LODWORD(kTargetPos.y);
                    kTargetPos.z = 0.0;
                    *(float *)&result.n3_code[2] = 0.0;
                  }
                }
                else
                {
                  v2->m_eDotState = 0;
                  MapNavigator::Arrive(v2, (NiPoint3 *)&result);
                  v4 = (const void **)LODWORD(fMinLength);
                }
              }
              if ( v2->m_eDotState )
              {
                v42 = g_pkMainChar->vfptr;
                fMinLength = 9999.0;
                v43 = v42[6].SetAbStateProperty;
                hMob = 0xFFFF;
                ((void (__stdcall *)(NiPoint3 *))v43)(&kCurPos);
                v44 = unk_A96B24;
                if ( unk_A96B24 )
                {
                  do
                  {
                    v45 = *(Char **)(v44 + 8);
                    v44 = *(_DWORD *)v44;
                    if ( v45 )
                    {
                      if ( Char::IsLinkGate(v45) )
                      {
                        ((void (__thiscall *)(Char *, NiPoint3 *))v45->vfptr[6].SetAbStateProperty)(v45, &kTargetPos);
                        kNewPos.x = kCurPos.x - kTargetPos.x;
                        kNewPos.y = kCurPos.y - kTargetPos.y;
                        kNewPos.z = kCurPos.z - kTargetPos.z;
                        v58 = NiPoint3::Length(&kNewPos);
                        if ( v58 < (double)fMinLength )
                        {
                          LODWORD(v46) = v45->m_kHandle;
                          fMinLength = v58;
                          *(float *)&hMob = v46;
                        }
                      }
                    }
                  }
                  while ( v44 );
                  if ( (_WORD)hMob != -1 )
                  {
                    v47 = CharMgr::GetChar(&g_kCharMgr, hMob);
                    ((void (__thiscall *)(Char *, Name3 *))v47->vfptr[6].SetAbStateProperty)(v47, &result);
                  }
                }
                v48 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
                if ( v48 )
                {
                  GameFrameWork::NcActAutoWayFindingUseGateReq(v48);
                  if ( v2->m_bIsWorking )
                  {
                    if ( v2->m_eDotState == 1 )
                      v2->m_eDotState = 2;
                  }
                }
              }
              else
              {
                v49 = (signed int *)*v4;
                if ( v49 )
                {
                  kTargetPos.x = (double)v49[2];
                  v50 = (double)v49[3];
                  result.n3_code[0] = LODWORD(kTargetPos.x);
                  kTargetPos.y = v50;
                  result.n3_code[1] = LODWORD(kTargetPos.y);
                  kTargetPos.z = 0.0;
                  *(float *)&result.n3_code[2] = 0.0;
                }
              }
            }
            else
            {
              CWayPoint::Get_BFS_NextDot(&v2->m_WayPoint, -1, -1, &v2->m_pTargetDot);
              v51 = (signed int *)*v4;
              v2->m_eDotState = 0;
              if ( v51 )
              {
                kTargetPos.x = (double)v51[2];
                v52 = (double)v51[3];
                result.n3_code[0] = LODWORD(kTargetPos.x);
                kTargetPos.y = v52;
                result.n3_code[1] = LODWORD(kTargetPos.y);
                kTargetPos.z = 0.0;
                *(float *)&result.n3_code[2] = 0.0;
                if ( v51[4] == 2 )
                  v2->m_eDotState = 1;
              }
              else
              {
                MapNavigator::Arrive(v2, (NiPoint3 *)&result);
              }
            }
            g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[7].dwEffectIndex[0] = 0;
            MainChar::SetStartReserveAct((MainChar *)g_pkMainChar, RESERVEACT_PICKGROUND);
            MainChar::SetRevserveMovePos((MainChar *)g_pkMainChar, (NiPoint3 *)&result);
            goto LABEL_66;
          }
          if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[7].GetAbstateColor)() )
            return;
          v53 = (signed int *)*v4;
          if ( !v53 )
            return;
          kTargetPos.x = (double)v53[2];
          v54 = (double)v53[3];
          kNewPos.x = kTargetPos.x;
          kTargetPos.y = v54;
          kNewPos.y = kTargetPos.y;
          kTargetPos.z = 0.0;
          kNewPos.z = 0.0;
          g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[7].dwEffectIndex[0] = 0;
          MainChar::SetStartReserveAct((MainChar *)g_pkMainChar, RESERVEACT_PICKGROUND);
          v28 = &kNewPos;
        }
        MainChar::SetRevserveMovePos((MainChar *)g_pkMainChar, v28);
LABEL_66:
        MainChar::StartMoveTarget((MainChar *)g_pkMainChar);
        return;
      }
    }
  }
}

//----- (00616F20) --------------------------------------------------------
NiRTTI *NiObject::GetRTTI()
{
  return &NiObject::m_RTTI;
}

//----- (00616F30) --------------------------------------------------------
unsigned int __cdecl MapWayPointTab::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<MapWayPoint,MapWayPointTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C1E4: using guessed type int ITableBase<MapWayPoint,MapWayPointTab>::ms_pkTable;

//----- (00616F50) --------------------------------------------------------
unsigned int __cdecl MapLinkPointTab::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<MapLinkPoint,MapLinkPointTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C1E8: using guessed type int ITableBase<MapLinkPoint,MapLinkPointTab>::ms_pkTable;

//----- (00616F70) --------------------------------------------------------
MapNavigator *__thiscall MapNavigator::`scalar deleting destructor'(MapNavigator *this, unsigned int a2)
{
  MapNavigator *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&MapNavigator::`vftable';
  CWayPoint::~CWayPoint(&this->m_WayPoint);
  NiRefObject::~NiRefObject((CPostProcessEffect *)v2);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B6D8C: using guessed type int (__thiscall *MapNavigator::`vftable')(void *p, char);

//----- (00616FE0) --------------------------------------------------------
void __cdecl Market::Clear()
{
  Market::ms_uiTotalWeapon = 0;
  Market::ms_uiTotalArmor = 0;
  Market::ms_uiTotalAcc = 0;
  Market::ms_uiTotalRepurchase = 0;
  Market::ms_uiTotalFigPassiveSkill = 0;
  Market::ms_uiTotalClePassiveSkill = 0;
  Market::ms_uiTotalArcPassiveSkill = 0;
  Market::ms_uiTotalMagPassiveSkill = 0;
  Market::ms_uiTotalJokPassiveSkill = 0;
  Market::ms_uiTotalFigActiveSkill = 0;
  Market::ms_uiTotalCleActiveSkill = 0;
  Market::ms_uiTotalArcActiveSkill = 0;
  Market::ms_uiTotalMagActiveSkill = 0;
  Market::ms_uiTotalJokActiveSkill = 0;
  Market::ms_uiTotalProdSkill = 0;
  Market::ms_uiTotalEnchantItem = 0;
  Market::ms_uiTotalWeapontitleItem = 0;
  Market::ms_uiTotalSenActiveSkill = 0;
  Market::ms_uiTotalSenPassiveSkill = 0;
}
// A8F480: using guessed type unsigned int Market::ms_uiTotalWeapontitleItem;
// A8F484: using guessed type unsigned int Market::ms_uiTotalEnchantItem;
// A8F6E0: using guessed type unsigned int Market::ms_uiTotalProdSkill;
// A8F6E4: using guessed type unsigned int Market::ms_uiTotalSenActiveSkill;
// A917B8: using guessed type unsigned int Market::ms_uiTotalSenPassiveSkill;
// A917BC: using guessed type unsigned int Market::ms_uiTotalJokActiveSkill;
// A917C0: using guessed type unsigned int Market::ms_uiTotalJokPassiveSkill;
// A917C4: using guessed type unsigned int Market::ms_uiTotalMagActiveSkill;
// A917C8: using guessed type unsigned int Market::ms_uiTotalMagPassiveSkill;
// A917CC: using guessed type unsigned int Market::ms_uiTotalArcActiveSkill;
// A917D0: using guessed type unsigned int Market::ms_uiTotalArcPassiveSkill;
// A917D4: using guessed type unsigned int Market::ms_uiTotalCleActiveSkill;
// A917D8: using guessed type unsigned int Market::ms_uiTotalClePassiveSkill;
// A917DC: using guessed type unsigned int Market::ms_uiTotalFigActiveSkill;
// A917E0: using guessed type unsigned int Market::ms_uiTotalFigPassiveSkill;
// A917E4: using guessed type unsigned int Market::ms_uiTotalRepurchase;
// A92530: using guessed type unsigned int Market::ms_uiTotalAcc;
// A92534: using guessed type unsigned int Market::ms_uiTotalArmor;
// A92538: using guessed type unsigned int Market::ms_uiTotalWeapon;

//----- (00617050) --------------------------------------------------------
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetEnchantItem(unsigned int uiIndex)
{
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *result; // eax@2

  if ( uiIndex < Market::ms_uiTotalEnchantItem )
    result = (PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *)((char *)&Market::ms_akEnchantItems + 3 * uiIndex);
  else
    result = 0;
  return result;
}
// A8F484: using guessed type unsigned int Market::ms_uiTotalEnchantItem;

//----- (00617070) --------------------------------------------------------
unsigned int __cdecl Market::GetTotalEnchantItem()
{
  return Market::ms_uiTotalEnchantItem;
}
// A8F484: using guessed type unsigned int Market::ms_uiTotalEnchantItem;

//----- (00617080) --------------------------------------------------------
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetWeapontitleItem(unsigned int uiIndex)
{
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *result; // eax@2

  if ( uiIndex < Market::ms_uiTotalWeapontitleItem )
    result = (PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *)((char *)&Market::ms_akWeapontitleItems + 3 * uiIndex);
  else
    result = 0;
  return result;
}
// A8F480: using guessed type unsigned int Market::ms_uiTotalWeapontitleItem;

//----- (006170A0) --------------------------------------------------------
unsigned int __cdecl Market::GetTotalWeapontitleItem()
{
  return Market::ms_uiTotalWeapontitleItem;
}
// A8F480: using guessed type unsigned int Market::ms_uiTotalWeapontitleItem;

//----- (006170B0) --------------------------------------------------------
unsigned int __cdecl Market::GetTotalWeapon()
{
  return Market::ms_uiTotalWeapon;
}
// A92538: using guessed type unsigned int Market::ms_uiTotalWeapon;

//----- (006170C0) --------------------------------------------------------
unsigned int __cdecl Market::GetTotalArmor()
{
  return Market::ms_uiTotalArmor;
}
// A92534: using guessed type unsigned int Market::ms_uiTotalArmor;

//----- (006170D0) --------------------------------------------------------
unsigned int __cdecl Market::GetTotalAcc()
{
  return Market::ms_uiTotalAcc;
}
// A92530: using guessed type unsigned int Market::ms_uiTotalAcc;

//----- (006170E0) --------------------------------------------------------
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetWeaopn(unsigned int uiIndex)
{
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *result; // eax@2

  if ( uiIndex < Market::ms_uiTotalWeapon )
    result = (PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *)((char *)&Market::ms_akWeapon + 3 * uiIndex);
  else
    result = 0;
  return result;
}
// A92538: using guessed type unsigned int Market::ms_uiTotalWeapon;

//----- (00617100) --------------------------------------------------------
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetArmor(unsigned int uiIndex)
{
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *result; // eax@2

  if ( uiIndex < Market::ms_uiTotalArmor )
    result = (PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *)((char *)&Market::ms_akArmor + 3 * uiIndex);
  else
    result = 0;
  return result;
}
// A92534: using guessed type unsigned int Market::ms_uiTotalArmor;

//----- (00617120) --------------------------------------------------------
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetAcc(unsigned int uiIndex)
{
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *result; // eax@2

  if ( uiIndex < Market::ms_uiTotalAcc )
    result = (PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *)((char *)&Market::ms_akAcc + 3 * uiIndex);
  else
    result = 0;
  return result;
}
// A92530: using guessed type unsigned int Market::ms_uiTotalAcc;

//----- (00617140) --------------------------------------------------------
unsigned int __cdecl Market::GetTotalRepurchase()
{
  return Market::ms_uiTotalRepurchase;
}
// A917E4: using guessed type unsigned int Market::ms_uiTotalRepurchase;

//----- (00617150) --------------------------------------------------------
ItemRepurchase *__cdecl Market::GetRepurchase(unsigned int uiIndex)
{
  ItemRepurchase *result; // eax@2

  if ( uiIndex < Market::ms_uiTotalRepurchase )
    result = (ItemRepurchase *)(8 * uiIndex + 11081704);
  else
    result = 0;
  return result;
}
// A917E4: using guessed type unsigned int Market::ms_uiTotalRepurchase;

//----- (00617170) --------------------------------------------------------
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetFigActSkill(unsigned int uiIndex)
{
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *result; // eax@2

  if ( uiIndex < Market::ms_uiTotalFigActiveSkill )
    result = (PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *)((char *)&Market::ms_akFigActSkill + 3 * uiIndex);
  else
    result = 0;
  return result;
}
// A917DC: using guessed type unsigned int Market::ms_uiTotalFigActiveSkill;

//----- (00617190) --------------------------------------------------------
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetCleActSkill(unsigned int uiIndex)
{
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *result; // eax@2

  if ( uiIndex < Market::ms_uiTotalCleActiveSkill )
    result = (PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *)((char *)&Market::ms_akCleActSkill + 3 * uiIndex);
  else
    result = 0;
  return result;
}
// A917D4: using guessed type unsigned int Market::ms_uiTotalCleActiveSkill;

//----- (006171B0) --------------------------------------------------------
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetArcActSkill(unsigned int uiIndex)
{
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *result; // eax@2

  if ( uiIndex < Market::ms_uiTotalArcActiveSkill )
    result = (PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *)((char *)&Market::ms_akArcActSkill + 3 * uiIndex);
  else
    result = 0;
  return result;
}
// A917CC: using guessed type unsigned int Market::ms_uiTotalArcActiveSkill;

//----- (006171D0) --------------------------------------------------------
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetMagActSkill(unsigned int uiIndex)
{
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *result; // eax@2

  if ( uiIndex < Market::ms_uiTotalMagActiveSkill )
    result = (PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *)((char *)&Market::ms_akMagActSkill + 3 * uiIndex);
  else
    result = 0;
  return result;
}
// A917C4: using guessed type unsigned int Market::ms_uiTotalMagActiveSkill;

//----- (006171F0) --------------------------------------------------------
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetFigPasSkill(unsigned int uiIndex)
{
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *result; // eax@2

  if ( uiIndex < Market::ms_uiTotalFigPassiveSkill )
    result = (PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *)((char *)&Market::ms_akFigPasSkill + 3 * uiIndex);
  else
    result = 0;
  return result;
}
// A917E0: using guessed type unsigned int Market::ms_uiTotalFigPassiveSkill;

//----- (00617210) --------------------------------------------------------
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetClePasSkill(unsigned int uiIndex)
{
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *result; // eax@2

  if ( uiIndex < Market::ms_uiTotalClePassiveSkill )
    result = (PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *)((char *)&Market::ms_akClePasSkill + 3 * uiIndex);
  else
    result = 0;
  return result;
}
// A917D8: using guessed type unsigned int Market::ms_uiTotalClePassiveSkill;

//----- (00617230) --------------------------------------------------------
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetArcPasSkill(unsigned int uiIndex)
{
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *result; // eax@2

  if ( uiIndex < Market::ms_uiTotalArcPassiveSkill )
    result = (PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *)((char *)&Market::ms_akArcPasSkill + 3 * uiIndex);
  else
    result = 0;
  return result;
}
// A917D0: using guessed type unsigned int Market::ms_uiTotalArcPassiveSkill;

//----- (00617250) --------------------------------------------------------
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetMagPasSkill(unsigned int uiIndex)
{
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *result; // eax@2

  if ( uiIndex < Market::ms_uiTotalMagPassiveSkill )
    result = (PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *)((char *)&Market::ms_akMagPasSkill + 3 * uiIndex);
  else
    result = 0;
  return result;
}
// A917C8: using guessed type unsigned int Market::ms_uiTotalMagPassiveSkill;

//----- (00617270) --------------------------------------------------------
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetJokActSkill(unsigned int uiIndex)
{
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *result; // eax@2

  if ( uiIndex < Market::ms_uiTotalJokActiveSkill )
    result = (PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *)((char *)&Market::ms_akJokActSkill + 3 * uiIndex);
  else
    result = 0;
  return result;
}
// A917BC: using guessed type unsigned int Market::ms_uiTotalJokActiveSkill;

//----- (00617290) --------------------------------------------------------
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetJokPasSkill(unsigned int uiIndex)
{
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *result; // eax@2

  if ( uiIndex < Market::ms_uiTotalJokPassiveSkill )
    result = (PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *)((char *)&Market::ms_akJokPasSkill + 3 * uiIndex);
  else
    result = 0;
  return result;
}
// A917C0: using guessed type unsigned int Market::ms_uiTotalJokPassiveSkill;

//----- (006172B0) --------------------------------------------------------
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetSenActSkill(unsigned int uiIndex)
{
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *result; // eax@2

  if ( uiIndex < Market::ms_uiTotalSenActiveSkill )
    result = (PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *)((char *)&Market::ms_akSenActSkill + 3 * uiIndex);
  else
    result = 0;
  return result;
}
// A8F6E4: using guessed type unsigned int Market::ms_uiTotalSenActiveSkill;

//----- (006172D0) --------------------------------------------------------
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetSenPasSkill(unsigned int uiIndex)
{
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *result; // eax@2

  if ( uiIndex < Market::ms_uiTotalSenPassiveSkill )
    result = (PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *)((char *)&Market::ms_akSenPasSkill + 3 * uiIndex);
  else
    result = 0;
  return result;
}
// A917B8: using guessed type unsigned int Market::ms_uiTotalSenPassiveSkill;

//----- (00617310) --------------------------------------------------------
void __cdecl Market::SetRepurchaseItem(PROTO_NC_ITEM_SELL_ITEM_LIST_CMD *pkItemData)
{
  unsigned int v1; // edi@1
  __int16 *v2; // eax@1
  unsigned int v3; // ebx@4
  PROTO_NC_ITEM_SELL_ITEM_LIST_CMD *v4; // esi@5
  struct ItemRepurchase *v5; // eax@6
  char *v6; // ecx@6
  __int16 v7; // cx@7
  unsigned int uiBuffSize; // [sp+4h] [bp-4h]@4

  v1 = 0;
  Market::ms_uiTotalRepurchase = 0;
  v2 = word_A917EC;
  do
  {
    *((_DWORD *)v2 - 1) = 0;
    *v2 = -1;
    v2 += 4;
  }
  while ( (signed int)v2 < (signed int)&unk_A9193C );
  if ( pkItemData )
  {
    v3 = pkItemData->NumOfSellItem;
    uiBuffSize = 0;
    if ( v3 )
    {
      v4 = pkItemData + 1;
      if ( v3 > 0 )
      {
        do
        {
          v5 = (struct ItemRepurchase *)Item::Create(&v4->NumOfSellItem, (ITEM_INVEN *)&pkItemData, &uiBuffSize);
          v6 = &v4[1].NumOfSellItem;
          v4 += uiBuffSize;
          if ( v5 )
          {
            (&Market::ms_akRepurchase)[v1] = v5;
            v7 = (unsigned __int8)*v6;
            ++Market::ms_uiTotalRepurchase;
            word_A917EC[4 * v1] = v7;
          }
          ++v1;
        }
        while ( v1 < v3 );
      }
    }
  }
}
// A917E4: using guessed type unsigned int Market::ms_uiTotalRepurchase;
// A917E8: using guessed type struct ItemRepurchase *Market::ms_akRepurchase;
// A917EC: using guessed type __int16 word_A917EC[];

//----- (00617390) --------------------------------------------------------
void __cdecl Market::DeleteRepurchase(unsigned int uiIndex)
{
  unsigned int v1; // ecx@2
  unsigned int v2; // eax@3

  if ( (&Market::ms_akRepurchase)[uiIndex] )
  {
    v1 = Market::ms_uiTotalRepurchase - uiIndex;
    if ( Market::ms_uiTotalRepurchase != uiIndex )
    {
      v2 = 8 * uiIndex + 11081712;
      do
      {
        *(_DWORD *)(v2 - 8) = *(_DWORD *)v2;
        *(_WORD *)(v2 - 4) = *(_WORD *)(v2 + 4);
        *(_DWORD *)v2 = 0;
        *(_WORD *)(v2 + 4) = -1;
        v2 += 8;
        --v1;
      }
      while ( v1 );
    }
    --Market::ms_uiTotalRepurchase;
  }
}
// A917E4: using guessed type unsigned int Market::ms_uiTotalRepurchase;
// A917E8: using guessed type struct ItemRepurchase *Market::ms_akRepurchase;

//----- (006173E0) --------------------------------------------------------
ItemRepurchase *__cdecl Market::AddRepurchase(PROTO_NC_ITEM_SELL_ITEM_INSERT_CMD *pkRepurItem)
{
  unsigned int v1; // esi@1
  struct ItemRepurchase *v2; // eax@1
  unsigned __int16 v3; // cx@2

  v1 = Market::ms_uiTotalRepurchase;
  v2 = (struct ItemRepurchase *)Item::Create(&pkRepurItem->ItemInfo);
  if ( v2 )
  {
    (&Market::ms_akRepurchase)[v1] = v2;
    v3 = pkRepurItem->nHandle;
    ++Market::ms_uiTotalRepurchase;
    word_A917EC[4 * v1] = v3;
  }
  return (ItemRepurchase *)(8 * v1 + 11081704);
}
// A917E4: using guessed type unsigned int Market::ms_uiTotalRepurchase;
// A917E8: using guessed type struct ItemRepurchase *Market::ms_akRepurchase;
// A917EC: using guessed type __int16 word_A917EC[];

//----- (00617430) --------------------------------------------------------
unsigned int __cdecl Market::FindRepurchase(unsigned __int16 nHandle)
{
  unsigned int result; // eax@1
  unsigned int v2; // ecx@1

  result = 0;
  v2 = 0;
  if ( Market::ms_uiTotalRepurchase )
  {
    while ( word_A917EC[4 * v2] != nHandle )
    {
      if ( ++v2 >= Market::ms_uiTotalRepurchase )
        return result;
    }
    result = v2;
  }
  return result;
}
// A917E4: using guessed type unsigned int Market::ms_uiTotalRepurchase;
// A917EC: using guessed type __int16 word_A917EC[];

//----- (00617460) --------------------------------------------------------
void __cdecl Market::SetSoulStone(PROTO_NC_MENU_SHOPOPENSOULSTONE_CMD *pkProto)
{
  Market::Clear();
  Market::ms_kSoulStone.hp.recover = pkProto->hp.recover;
  dword_A8F46C = pkProto->hp.maxnum;
  dword_A8F470 = pkProto->hp.price;
  dword_A8F474 = pkProto->sp.recover;
  dword_A8F478 = pkProto->sp.maxnum;
  dword_A8F47C = pkProto->sp.price;
}
// A8F468: using guessed type struct PROTO_NC_MENU_SHOPOPENSOULSTONE_CMD Market::ms_kSoulStone;
// A8F46C: using guessed type int dword_A8F46C;
// A8F470: using guessed type int dword_A8F470;
// A8F474: using guessed type int dword_A8F474;
// A8F478: using guessed type int dword_A8F478;
// A8F47C: using guessed type int dword_A8F47C;

//----- (006174B0) --------------------------------------------------------
PROTO_NC_MENU_SHOPOPENSOULSTONE_CMD::SOULSTONEMENU *__cdecl Market::GetHPSoulStoneInfo()
{
  return (PROTO_NC_MENU_SHOPOPENSOULSTONE_CMD::SOULSTONEMENU *)&Market::ms_kSoulStone;
}
// A8F468: using guessed type struct PROTO_NC_MENU_SHOPOPENSOULSTONE_CMD Market::ms_kSoulStone;

//----- (006174C0) --------------------------------------------------------
PROTO_NC_MENU_SHOPOPENSOULSTONE_CMD::SOULSTONEMENU *__cdecl Market::GetSPSoulStoneInfo()
{
  return (PROTO_NC_MENU_SHOPOPENSOULSTONE_CMD::SOULSTONEMENU *)&dword_A8F474;
}
// A8F474: using guessed type int dword_A8F474;

//----- (006174D0) --------------------------------------------------------
unsigned int __cdecl Market::GetTotalFigPassiveSkill()
{
  return Market::ms_uiTotalFigPassiveSkill;
}
// A917E0: using guessed type unsigned int Market::ms_uiTotalFigPassiveSkill;

//----- (006174E0) --------------------------------------------------------
unsigned int __cdecl Market::GetTotalClePassiveSkill()
{
  return Market::ms_uiTotalClePassiveSkill;
}
// A917D8: using guessed type unsigned int Market::ms_uiTotalClePassiveSkill;

//----- (006174F0) --------------------------------------------------------
unsigned int __cdecl Market::GetTotalArcPassiveSkill()
{
  return Market::ms_uiTotalArcPassiveSkill;
}
// A917D0: using guessed type unsigned int Market::ms_uiTotalArcPassiveSkill;

//----- (00617500) --------------------------------------------------------
unsigned int __cdecl Market::GetTotalMagPassiveSkill()
{
  return Market::ms_uiTotalMagPassiveSkill;
}
// A917C8: using guessed type unsigned int Market::ms_uiTotalMagPassiveSkill;

//----- (00617510) --------------------------------------------------------
unsigned int __cdecl Market::GetTotalFigActiveSkill()
{
  return Market::ms_uiTotalFigActiveSkill;
}
// A917DC: using guessed type unsigned int Market::ms_uiTotalFigActiveSkill;

//----- (00617520) --------------------------------------------------------
unsigned int __cdecl Market::GetTotalCleActiveSkill()
{
  return Market::ms_uiTotalCleActiveSkill;
}
// A917D4: using guessed type unsigned int Market::ms_uiTotalCleActiveSkill;

//----- (00617530) --------------------------------------------------------
unsigned int __cdecl Market::GetTotalArcActiveSkill()
{
  return Market::ms_uiTotalArcActiveSkill;
}
// A917CC: using guessed type unsigned int Market::ms_uiTotalArcActiveSkill;

//----- (00617540) --------------------------------------------------------
unsigned int __cdecl Market::GetTotalMagActiveSkill()
{
  return Market::ms_uiTotalMagActiveSkill;
}
// A917C4: using guessed type unsigned int Market::ms_uiTotalMagActiveSkill;

//----- (00617550) --------------------------------------------------------
unsigned int __cdecl Market::GetTotalJokPassiveSkill()
{
  return Market::ms_uiTotalJokPassiveSkill;
}
// A917C0: using guessed type unsigned int Market::ms_uiTotalJokPassiveSkill;

//----- (00617560) --------------------------------------------------------
unsigned int __cdecl Market::GetTotalJokActiveSkill()
{
  return Market::ms_uiTotalJokActiveSkill;
}
// A917BC: using guessed type unsigned int Market::ms_uiTotalJokActiveSkill;

//----- (00617570) --------------------------------------------------------
unsigned int __cdecl Market::GetTotalSenPassiveSkill()
{
  return Market::ms_uiTotalSenPassiveSkill;
}
// A917B8: using guessed type unsigned int Market::ms_uiTotalSenPassiveSkill;

//----- (00617580) --------------------------------------------------------
unsigned int __cdecl Market::GetTotalSenActiveSkill()
{
  return Market::ms_uiTotalSenActiveSkill;
}
// A8F6E4: using guessed type unsigned int Market::ms_uiTotalSenActiveSkill;

//----- (00617590) --------------------------------------------------------
unsigned int __cdecl Market::GetTotalProdSkill()
{
  return Market::ms_uiTotalProdSkill;
}
// A8F6E0: using guessed type unsigned int Market::ms_uiTotalProdSkill;

//----- (006175A0) --------------------------------------------------------
PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *__cdecl Market::GetProdSkill(unsigned int uiIndex)
{
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *result; // eax@2

  if ( uiIndex < Market::ms_uiTotalProdSkill )
    result = (PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *)((char *)&Market::ms_akProdSkill + 3 * uiIndex);
  else
    result = 0;
  return result;
}
// A8F6E0: using guessed type unsigned int Market::ms_uiTotalProdSkill;

//----- (006175C0) --------------------------------------------------------
int (__thiscall ***__cdecl ItemMarket::GetItemSellInfoList())(void *p, char)
{
  return &ItemMarket::ms_kItemSellInfoList;
}
// A72C90: using guessed type int (__thiscall **ItemMarket::ms_kItemSellInfoList)(void *p, char);

//----- (006175D0) --------------------------------------------------------
void __cdecl Market::SetWeapon(PROTO_NC_MENU_SHOPOPENTABLE_CMD *pkProto)
{
  char *v1; // ebx@1
  unsigned int *v2; // esi@1
  PROTO_NC_MENU_SHOPOPENTABLE_CMD *v3; // edi@2
  int v4; // eax@4
  int v5; // eax@7
  bool v6; // zf@7
  int *v7; // eax@7
  int v8; // eax@11
  int v9; // eax@18
  int v10; // eax@20
  int v11; // [sp+Ch] [bp-10h]@3
  unsigned __int16 v12; // [sp+10h] [bp-Ch]@3
  int i; // [sp+14h] [bp-8h]@1

  Market::Clear();
  v1 = 0;
  v2 = 0;
  i = 0;
  if ( pkProto->itemnum > 0u )
  {
    v3 = pkProto + 1;
    do
    {
      v12 = *(unsigned __int16 *)((char *)&v3->itemnum + 1);
      v11 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      if ( (unsigned __int8)(*(int (__stdcall **)(_DWORD))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(*(unsigned __int16 *)((char *)&v3->itemnum + 1)) )
      {
        if ( v12 <= *(_WORD *)(v11 + 200) )
        {
          v5 = *(_DWORD *)(v11 + 196);
          v6 = *(_DWORD *)(v5 + 4 * v12) == 0;
          v7 = (int *)(v5 + 4 * v12);
          if ( v6 )
            v4 = 0;
          else
            v4 = *v7;
        }
        else
        {
          v4 = 0;
        }
      }
      else
      {
        v4 = 0;
      }
      if ( !LOBYTE(v3->itemnum) )
      {
        v8 = *(_DWORD *)(v4 + 102);
        if ( v8 == 5 )
        {
          v1 = (char *)&Market::ms_akWeapon;
          v2 = &Market::ms_uiTotalWeapon;
        }
        else if ( (unsigned int)(v8 - 6) > 2 )
        {
          v1 = (char *)&Market::ms_akAcc;
          v2 = &Market::ms_uiTotalAcc;
        }
        else
        {
          v1 = (char *)&Market::ms_akArmor;
          v2 = &Market::ms_uiTotalArmor;
        }
      }
      if ( *v2 >= LOBYTE(v3->itemnum) )
      {
LABEL_19:
        if ( *v2 < 0xC8 )
        {
          v10 = (int)(&v1[2 * *v2] + *v2);
          *(_WORD *)v10 = v3->itemnum;
          *(_BYTE *)(v10 + 2) = v3->npc;
          ++*v2;
        }
      }
      else
      {
        while ( *v2 < 0xC8 )
        {
          v9 = (int)(&v1[2 * *v2] + *v2);
          *(_WORD *)v9 = -256;
          *(_BYTE *)(v9 + 2) = -1;
          if ( ++*v2 >= LOBYTE(v3->itemnum) )
            goto LABEL_19;
        }
      }
      v3 = (PROTO_NC_MENU_SHOPOPENTABLE_CMD *)((char *)v3 + 3);
      ++i;
    }
    while ( i < pkProto->itemnum );
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
// A92530: using guessed type unsigned int Market::ms_uiTotalAcc;
// A92534: using guessed type unsigned int Market::ms_uiTotalArmor;
// A92538: using guessed type unsigned int Market::ms_uiTotalWeapon;

//----- (00617710) --------------------------------------------------------
void __cdecl Market::SetItemEnchant(PROTO_NC_MENU_SHOPOPENTABLE_CMD *pkProto)
{
  PROTO_NC_MENU_SHOPOPENTABLE_CMD *v1; // edi@1
  signed int v2; // ebx@1
  unsigned int *v3; // esi@1
  char *v4; // edi@2
  const char *v5; // eax@3
  int v6; // edi@6
  int v7; // ebx@7
  int v8; // eax@8
  int *v9; // eax@11
  int v10; // eax@15
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *v11; // edx@17
  int v12; // eax@22
  int v13; // eax@24
  unsigned __int16 v14; // [sp+Ch] [bp-10h]@7
  int i; // [sp+10h] [bp-Ch]@5
  PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *pkCurrItemSellInfoTab; // [sp+14h] [bp-8h]@1

  Market::Clear();
  v1 = pkProto;
  v2 = 0;
  v3 = 0;
  pkCurrItemSellInfoTab = 0;
  if ( pkProto->itemnum > 0u )
  {
    v4 = (char *)&pkProto[1] + 1;
    do
    {
      v5 = fs("Sell ITem = %d. Index = %d\n", *(_WORD *)v4, (unsigned __int8)*(v4 - 1));
      OutputDebugStringA(v5);
      ++v2;
      v4 += 3;
    }
    while ( v2 < pkProto->itemnum );
    v1 = pkProto;
  }
  i = 0;
  if ( v1->itemnum > 0u )
  {
    v6 = (int)&v1[1];
    while ( 1 )
    {
      v7 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      v14 = *(_WORD *)(v6 + 1);
      if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                               + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              *(_WORD *)(v6 + 1)) )
      {
        if ( v14 <= *(_WORD *)(v7 + 200) )
        {
          v9 = (int *)(*(_DWORD *)(v7 + 196) + 4 * v14);
          if ( *v9 )
            v8 = *v9;
          else
            v8 = 0;
        }
        else
        {
          v8 = 0;
        }
      }
      else
      {
        v8 = 0;
      }
      if ( *(_BYTE *)v6 )
        goto LABEL_19;
      v10 = *(_DWORD *)(v8 + 102);
      if ( v10 == 16 )
        break;
      if ( v10 != 34 )
        goto LABEL_19;
      v11 = (PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *)&Market::ms_akEnchantItems;
      pkCurrItemSellInfoTab = (PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *)&Market::ms_akEnchantItems;
      v3 = &Market::ms_uiTotalEnchantItem;
LABEL_20:
      if ( *v3 >= *(_BYTE *)v6 )
      {
LABEL_23:
        if ( *v3 < 0xC8 )
        {
          v13 = (int)(&v11->slot + 2 * *v3 + *v3);
          *(_WORD *)v13 = *(_WORD *)v6;
          *(_BYTE *)(v13 + 2) = *(_BYTE *)(v6 + 2);
          ++*v3;
        }
      }
      else
      {
        while ( *v3 < 0xC8 )
        {
          v12 = (int)(&v11->slot + 2 * *v3 + *v3);
          *(_WORD *)v12 = -256;
          *(_BYTE *)(v12 + 2) = -1;
          if ( ++*v3 >= *(_BYTE *)v6 )
            goto LABEL_23;
        }
      }
      v6 += 3;
      if ( ++i >= pkProto->itemnum )
        return;
    }
    pkCurrItemSellInfoTab = (PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *)&Market::ms_akWeapontitleItems;
    v3 = &Market::ms_uiTotalWeapontitleItem;
LABEL_19:
    v11 = pkCurrItemSellInfoTab;
    goto LABEL_20;
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
// A8F480: using guessed type unsigned int Market::ms_uiTotalWeapontitleItem;
// A8F484: using guessed type unsigned int Market::ms_uiTotalEnchantItem;

//----- (00617870) --------------------------------------------------------
char __cdecl Market::Add(int kItemID)
{
  int v1; // esi@1
  int *v2; // eax@3
  int v3; // eax@4
  int v5; // eax@6
  unsigned int v6; // eax@7
  unsigned int v7; // eax@12
  unsigned int v8; // eax@14

  v1 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  if ( !(unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                           ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                           kItemID) )
    return 0;
  if ( (unsigned __int16)kItemID > *(_WORD *)(v1 + 200) )
    return 0;
  v2 = (int *)(*(_DWORD *)(v1 + 196) + 4 * (unsigned __int16)kItemID);
  if ( !*v2 )
    return 0;
  v3 = *v2;
  if ( !v3 )
    return 0;
  v5 = *(_DWORD *)(v3 + 102);
  if ( v5 == 5 )
  {
    v6 = Market::ms_uiTotalWeapon;
    if ( Market::ms_uiTotalWeapon < 0xC8 )
    {
      *(__int16 *)((char *)&word_A922D9 + 3 * Market::ms_uiTotalWeapon) = kItemID;
      Market::ms_uiTotalWeapon = v6 + 1;
      return 1;
    }
  }
  else if ( v5 == 6 || v5 == 7 || v5 == 8 )
  {
    v8 = Market::ms_uiTotalArmor;
    if ( Market::ms_uiTotalArmor < 0xC8 )
    {
      *(__int16 *)((char *)&word_A92081 + 3 * Market::ms_uiTotalArmor) = kItemID;
      Market::ms_uiTotalArmor = v8 + 1;
    }
  }
  else
  {
    v7 = Market::ms_uiTotalAcc;
    if ( Market::ms_uiTotalAcc < 0xC8 )
    {
      *(__int16 *)((char *)&word_A91E29 + 3 * Market::ms_uiTotalAcc) = kItemID;
      Market::ms_uiTotalAcc = v7 + 1;
      return 1;
    }
  }
  return 1;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
// A91E29: using guessed type __int16 word_A91E29;
// A92081: using guessed type __int16 word_A92081;
// A922D9: using guessed type __int16 word_A922D9;
// A92530: using guessed type unsigned int Market::ms_uiTotalAcc;
// A92534: using guessed type unsigned int Market::ms_uiTotalArmor;
// A92538: using guessed type unsigned int Market::ms_uiTotalWeapon;

//----- (00617930) --------------------------------------------------------
void __cdecl ItemMarket::Clear()
{
  int v0; // eax@2
  int v1; // ecx@2
  void *v2; // esi@5

  while ( dword_A72C9C )
  {
    v0 = dword_A72C94;
    v1 = *(_DWORD *)dword_A72C94;
    dword_A72C94 = v1;
    if ( v1 )
      *(_DWORD *)(v1 + 4) = 0;
    else
      dword_A72C98 = 0;
    v2 = *(void **)(v0 + 8);
    ItemMarket::ms_kItemSellInfoList[2](&ItemMarket::ms_kItemSellInfoList, v0);
    --dword_A72C9C;
    operator delete(v2);
  }
}
// A72C90: using guessed type int (__thiscall **ItemMarket::ms_kItemSellInfoList)(void *p, char);
// A72C94: using guessed type int dword_A72C94;
// A72C98: using guessed type int dword_A72C98;
// A72C9C: using guessed type int dword_A72C9C;

//----- (00617990) --------------------------------------------------------
void __cdecl ItemMarket::SetItem(PROTO_NC_MENU_SHOPOPENTABLE_CMD *pkProto)
{
  int v1; // ebx@1
  PROTO_NC_MENU_SHOPOPENTABLE_CMD *v2; // edi@2
  _BYTE *v3; // esi@3
  int v4; // eax@3
  char v5; // dl@7
  int iItemIndex; // [sp+8h] [bp-8h]@1

  Market::Clear();
  ItemMarket::Clear();
  v1 = 0;
  iItemIndex = 0;
  if ( pkProto->itemnum > 0u )
  {
    v2 = pkProto + 1;
    do
    {
      v3 = operator new(3u);
      v4 = ((int (__thiscall *)(int (__thiscall ***)(void *, char)))ItemMarket::ms_kItemSellInfoList[1])(&ItemMarket::ms_kItemSellInfoList);
      *(_DWORD *)(v4 + 8) = v3;
      *(_DWORD *)v4 = 0;
      *(_DWORD *)(v4 + 4) = dword_A72C98;
      if ( dword_A72C98 )
        *(_DWORD *)dword_A72C98 = v4;
      else
        dword_A72C94 = v4;
      dword_A72C98 = v4;
      ++dword_A72C9C;
      if ( LOBYTE(v2->itemnum) == v1 )
      {
        ++iItemIndex;
        *(_WORD *)v3 = v2->itemnum;
        v5 = v2->npc;
        v2 = (PROTO_NC_MENU_SHOPOPENTABLE_CMD *)((char *)v2 + 3);
      }
      else
      {
        v5 = -1;
        *(_WORD *)v3 = -256;
      }
      ++v1;
      v3[2] = v5;
    }
    while ( iItemIndex < pkProto->itemnum );
  }
}
// A72C90: using guessed type int (__thiscall **ItemMarket::ms_kItemSellInfoList)(void *p, char);
// A72C94: using guessed type int dword_A72C94;
// A72C98: using guessed type int dword_A72C98;
// A72C9C: using guessed type int dword_A72C9C;

//----- (00617A60) --------------------------------------------------------
void __cdecl Market::SetSkill(PROTO_NC_MENU_SHOPOPENTABLE_CMD *pkProto)
{
  char *v1; // edi@1
  unsigned int *v2; // esi@1
  int v3; // ebx@3
  int *v4; // eax@5
  int v5; // ebx@6
  __int64 v6; // kr00_8@15
  int v7; // eax@41
  int v8; // eax@43
  unsigned __int16 v9; // [sp+10h] [bp-14h]@3
  int i; // [sp+14h] [bp-10h]@1
  PROTO_NC_MENU_SHOPOPENTABLE_CMD *v11; // [sp+18h] [bp-Ch]@2
  bool bIsActiveSkillNotPassive; // [sp+23h] [bp-1h]@12

  Market::Clear();
  i = 0;
  v1 = 0;
  v2 = 0;
  if ( pkProto->itemnum > 0u )
  {
    v11 = pkProto + 1;
    do
    {
      v3 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      v9 = *(unsigned __int16 *)((char *)&v11->itemnum + 1);
      if ( !(unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                                + 16))(
                               ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                               *(unsigned __int16 *)((char *)&v11->itemnum + 1)) )
        goto LABEL_44;
      if ( v9 > *(_WORD *)(v3 + 200) )
        goto LABEL_44;
      v4 = (int *)(*(_DWORD *)(v3 + 196) + 4 * v9);
      if ( !*v4 )
        goto LABEL_44;
      v5 = *v4;
      if ( !*v4 || *(_DWORD *)(v5 + 102) != 11 )
        goto LABEL_44;
      if ( LOBYTE(v11->itemnum) )
        goto LABEL_39;
      if ( (unsigned __int8)Skill::IsProduceSkill(*(_WORD *)v5) )
      {
        v1 = (char *)&Market::ms_akProdSkill;
        v2 = &Market::ms_uiTotalProdSkill;
        goto LABEL_39;
      }
      if ( ActSkillInfoTab::GetByInxName((char *)(v5 + 2)) )
      {
        bIsActiveSkillNotPassive = 1;
      }
      else
      {
        if ( !PasSkillViewInfoTab::GetByInxName((char *)(v5 + 2)) )
          goto LABEL_44;
        bIsActiveSkillNotPassive = 0;
      }
      v6 = CharClass::GetBitbyClassType((UseClassType)*(_DWORD *)(v5 + 207));
      if ( CharClass::TestChrBaseClassMask(v6, 1) )
      {
        if ( bIsActiveSkillNotPassive )
        {
          v1 = (char *)&Market::ms_akFigActSkill;
          v2 = &Market::ms_uiTotalFigActiveSkill;
        }
        else
        {
          v1 = (char *)&Market::ms_akFigPasSkill;
          v2 = &Market::ms_uiTotalFigPassiveSkill;
        }
        goto LABEL_39;
      }
      if ( CharClass::TestChrBaseClassMask(v6, 11) )
      {
        if ( bIsActiveSkillNotPassive )
        {
          v1 = (char *)&Market::ms_akArcActSkill;
          v2 = &Market::ms_uiTotalArcActiveSkill;
        }
        else
        {
          v1 = (char *)&Market::ms_akArcPasSkill;
          v2 = &Market::ms_uiTotalArcPassiveSkill;
        }
        goto LABEL_39;
      }
      if ( CharClass::TestChrBaseClassMask(v6, 6) )
      {
        if ( bIsActiveSkillNotPassive )
        {
          v1 = (char *)&Market::ms_akCleActSkill;
          v2 = &Market::ms_uiTotalCleActiveSkill;
        }
        else
        {
          v1 = (char *)&Market::ms_akClePasSkill;
          v2 = &Market::ms_uiTotalClePassiveSkill;
        }
        goto LABEL_39;
      }
      if ( CharClass::TestChrBaseClassMask(v6, 16) )
      {
        if ( bIsActiveSkillNotPassive )
        {
          v1 = (char *)&Market::ms_akMagActSkill;
          v2 = &Market::ms_uiTotalMagActiveSkill;
        }
        else
        {
          v1 = (char *)&Market::ms_akMagPasSkill;
          v2 = &Market::ms_uiTotalMagPassiveSkill;
        }
        goto LABEL_39;
      }
      if ( CharClass::TestChrBaseClassMask(v6, 21) )
      {
        if ( bIsActiveSkillNotPassive )
        {
          v1 = (char *)&Market::ms_akJokActSkill;
          v2 = &Market::ms_uiTotalJokActiveSkill;
        }
        else
        {
          v1 = (char *)&Market::ms_akJokPasSkill;
          v2 = &Market::ms_uiTotalJokPassiveSkill;
        }
        goto LABEL_39;
      }
      if ( CharClass::TestChrBaseClassMask(v6, 26) )
      {
        if ( bIsActiveSkillNotPassive )
        {
          v1 = (char *)&Market::ms_akSenActSkill;
          v2 = &Market::ms_uiTotalSenActiveSkill;
        }
        else
        {
          v1 = (char *)&Market::ms_akSenPasSkill;
          v2 = &Market::ms_uiTotalSenPassiveSkill;
        }
LABEL_39:
        if ( *v2 >= LOBYTE(v11->itemnum) )
        {
LABEL_42:
          if ( *v2 < 0xC8 )
          {
            v8 = (int)(&v1[2 * *v2] + *v2);
            *(_WORD *)v8 = v11->itemnum;
            *(_BYTE *)(v8 + 2) = v11->npc;
            ++*v2;
          }
        }
        else
        {
          while ( *v2 < 0xC8 )
          {
            v7 = (int)(&v1[2 * *v2] + *v2);
            *(_WORD *)v7 = -256;
            *(_BYTE *)(v7 + 2) = -1;
            if ( ++*v2 >= LOBYTE(v11->itemnum) )
              goto LABEL_42;
          }
        }
      }
LABEL_44:
      v11 = (PROTO_NC_MENU_SHOPOPENTABLE_CMD *)((char *)v11 + 3);
      ++i;
    }
    while ( i < pkProto->itemnum );
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
// A8F6E0: using guessed type unsigned int Market::ms_uiTotalProdSkill;
// A8F6E4: using guessed type unsigned int Market::ms_uiTotalSenActiveSkill;
// A917B8: using guessed type unsigned int Market::ms_uiTotalSenPassiveSkill;
// A917BC: using guessed type unsigned int Market::ms_uiTotalJokActiveSkill;
// A917C0: using guessed type unsigned int Market::ms_uiTotalJokPassiveSkill;
// A917C4: using guessed type unsigned int Market::ms_uiTotalMagActiveSkill;
// A917C8: using guessed type unsigned int Market::ms_uiTotalMagPassiveSkill;
// A917CC: using guessed type unsigned int Market::ms_uiTotalArcActiveSkill;
// A917D0: using guessed type unsigned int Market::ms_uiTotalArcPassiveSkill;
// A917D4: using guessed type unsigned int Market::ms_uiTotalCleActiveSkill;
// A917D8: using guessed type unsigned int Market::ms_uiTotalClePassiveSkill;
// A917DC: using guessed type unsigned int Market::ms_uiTotalFigActiveSkill;
// A917E0: using guessed type unsigned int Market::ms_uiTotalFigPassiveSkill;

//----- (00617D10) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>::~NiTListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>(NiTListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *> *this)
{
  this->vfptr = (NiTListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>Vtbl *)&NiTListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>::`vftable';
}
// 9B6DEC: using guessed type int (__thiscall *NiTListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>::`vftable')(void *p, char);

//----- (00617D20) --------------------------------------------------------
NiTListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *> *__thiscall NiTListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>::`scalar deleting destructor'(NiTListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *> *this, unsigned int a2)
{
  NiTListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>Vtbl *)&NiTListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9B6DEC: using guessed type int (__thiscall *NiTListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>::`vftable')(void *p, char);

//----- (00617D50) --------------------------------------------------------
NiTList<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *> *__thiscall NiTList<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>::`scalar deleting destructor'(NiTList<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *> *this, unsigned int a2)
{
  NiTList<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *> *v2; // edi@1
  NiTListItem<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *> *v3; // esi@1
  NiTListItem<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>Vtbl *)&NiTPointerListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem(
      (NiTListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *> *)v2,
      v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>Vtbl *)&NiTListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B6DEC: using guessed type int (__thiscall *NiTListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>::`vftable')(void *p, char);
// 9B6DFC: using guessed type int (__thiscall *NiTPointerListBase<DFALL<PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>,PROTO_NC_MENU_SHOPOPENTABLE_CMD::MENUITEM *>::`vftable')(void *p, char);

//----- (00617DE0) --------------------------------------------------------
char __thiscall SpStream::PushInt(SpStream *this, int iValue)
{
  unsigned int v2; // eax@1
  char result; // al@2

  v2 = this->m_uiTailIndex;
  if ( this->m_uiMaxSize < v2 + 4 )
  {
    result = 0;
  }
  else
  {
    *(_DWORD *)&this->m_abyData[v2] = iValue;
    this->m_uiTailIndex += 4;
    result = 1;
  }
  return result;
}

//----- (00617E10) --------------------------------------------------------
char __thiscall SpStream::PushShort(SpStream *this, __int16 sValue)
{
  unsigned int v2; // eax@1
  char result; // al@2

  v2 = this->m_uiTailIndex;
  if ( this->m_uiMaxSize < v2 + 2 )
  {
    result = 0;
  }
  else
  {
    *(_WORD *)&this->m_abyData[v2] = sValue;
    this->m_uiTailIndex += 2;
    result = 1;
  }
  return result;
}

//----- (00617E40) --------------------------------------------------------
char __thiscall SpStream::PushByte(SpStream *this, char byValue)
{
  unsigned int v2; // eax@1
  char result; // al@2

  v2 = this->m_uiTailIndex;
  if ( this->m_uiMaxSize < v2 + 1 )
  {
    result = 0;
  }
  else
  {
    this->m_abyData[v2] = byValue;
    result = 1;
    ++this->m_uiTailIndex;
  }
  return result;
}

//----- (00617E70) --------------------------------------------------------
int __thiscall SpStream::PopInt(SpStream *this)
{
  unsigned int v1; // eax@1
  unsigned int v2; // edx@1
  int result; // eax@2

  v1 = this->m_uiHeadIndex;
  v2 = v1 + 4;
  if ( this->m_uiTailIndex < v1 + 4 )
  {
    result = 0;
  }
  else
  {
    result = *(_DWORD *)&this->m_abyData[v1];
    this->m_uiHeadIndex = v2;
  }
  return result;
}

//----- (00617E90) --------------------------------------------------------
int __thiscall SpStream::PopShort(SpStream *this)
{
  unsigned int v1; // eax@1
  unsigned int v2; // edx@1
  int result; // eax@2

  v1 = this->m_uiHeadIndex;
  v2 = v1 + 2;
  if ( this->m_uiTailIndex < v1 + 2 )
  {
    result = 0;
  }
  else
  {
    result = *(_WORD *)&this->m_abyData[v1];
    this->m_uiHeadIndex = v2;
  }
  return result;
}

//----- (00617EB0) --------------------------------------------------------
char __thiscall SpStream::PopByte(SpStream *this)
{
  unsigned int v1; // eax@1
  unsigned int v2; // edx@1
  char result; // al@2

  v1 = this->m_uiHeadIndex;
  v2 = v1 + 1;
  if ( this->m_uiTailIndex < v1 + 1 )
  {
    result = 0;
  }
  else
  {
    result = this->m_abyData[v1];
    this->m_uiHeadIndex = v2;
  }
  return result;
}

//----- (00617ED0) --------------------------------------------------------
char __thiscall SpStream::PushMem(SpStream *this, void *pbyMem, unsigned int uiSize)
{
  SpStream *v3; // esi@1
  unsigned int v4; // eax@1
  char result; // al@2

  v3 = this;
  v4 = this->m_uiTailIndex;
  if ( this->m_uiMaxSize < v4 + uiSize )
  {
    result = 0;
  }
  else
  {
    memcpy(&this->m_abyData[v4], (char *)pbyMem, uiSize);
    v3->m_uiTailIndex += uiSize;
    result = 1;
  }
  return result;
}

//----- (00617F10) --------------------------------------------------------
char __thiscall SpStream::PopMem(SpStream *this, void *pbyMem, unsigned int uiSize)
{
  SpStream *v3; // esi@1
  unsigned int v4; // eax@1
  char result; // al@2

  v3 = this;
  v4 = this->m_uiHeadIndex;
  if ( this->m_uiTailIndex < v4 + uiSize )
  {
    result = 0;
  }
  else
  {
    memcpy((char *)pbyMem, &this->m_abyData[v4], uiSize);
    v3->m_uiHeadIndex += uiSize;
    result = 1;
  }
  return result;
}

//----- (00617F50) --------------------------------------------------------
void __thiscall OptionManager::Clear(OptionManager *this)
{
  NiTListItem<IOptionBase *> *v1; // esi@1
  char *v2; // edi@1
  NiTListItem<IOptionBase *> *v3; // ST00_4@2

  v1 = this->m_kOptionList.m_pkHead;
  v2 = (char *)&this->m_kOptionList;
  while ( v1 )
  {
    v3 = v1;
    v1 = v1->m_pkNext;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v2 + 8))(v2, v3);
  }
  *((_DWORD *)v2 + 3) = 0;
  *((_DWORD *)v2 + 1) = 0;
  *((_DWORD *)v2 + 2) = 0;
}

//----- (00617F90) --------------------------------------------------------
char __thiscall OptionManager::LoadOption(OptionManager *this, SpStream *rkStream)
{
  NiTListItem<IOptionBase *> *v2; // esi@1
  bool (__thiscall *v3)(IOptionBase *, SpStream *); // edx@2
  char result; // al@4

  v2 = this->m_kOptionList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = v2->m_element->vfptr->LoadOption;
      v2 = v2->m_pkNext;
      if ( !(unsigned __int8)((int (__stdcall *)(_DWORD))v3)(rkStream) )
        break;
      if ( !v2 )
        goto LABEL_4;
    }
    result = 0;
  }
  else
  {
LABEL_4:
    result = 1;
  }
  return result;
}

//----- (00617FD0) --------------------------------------------------------
void __thiscall OptionManager::SaveOption(OptionManager *this, SpStream *rkStream)
{
  NiTListItem<IOptionBase *> *v2; // esi@1
  void (__thiscall *v3)(IOptionBase *, SpStream *); // edx@2

  v2 = this->m_kOptionList.m_pkHead;
  while ( v2 )
  {
    v3 = v2->m_element->vfptr->SaveOption;
    v2 = v2->m_pkNext;
    ((void (__stdcall *)(_DWORD))v3)(rkStream);
  }
}

//----- (00618000) --------------------------------------------------------
void __thiscall OptionManager::Register(OptionManager *this, IOptionBase *pkOptionBase)
{
  char *v2; // esi@1
  NiTListItem<IOptionBase *> *v3; // eax@1
  NiTListItem<IOptionBase *> **v4; // ecx@1

  v2 = (char *)&this->m_kOptionList;
  v3 = this->m_kOptionList.vfptr->NewItem((NiTListBase<DFALL<IOptionBase *>,IOptionBase *> *)&this->m_kOptionList);
  v3->m_element = pkOptionBase;
  v3->m_pkNext = 0;
  v3->m_pkPrev = (NiTListItem<IOptionBase *> *)*((_DWORD *)v2 + 2);
  v4 = (NiTListItem<IOptionBase *> **)*((_DWORD *)v2 + 2);
  if ( v4 )
  {
    *v4 = v3;
    ++*((_DWORD *)v2 + 3);
    *((_DWORD *)v2 + 2) = v3;
  }
  else
  {
    ++*((_DWORD *)v2 + 3);
    *((_DWORD *)v2 + 1) = v3;
    *((_DWORD *)v2 + 2) = v3;
  }
}

//----- (00618050) --------------------------------------------------------
signed int __thiscall ShortCut::CopyTypeToMemory(ShortCut *this, char *pucBuff)
{
  *(_DWORD *)pucBuff = ((int (*)(void))this->vfptr[1].__vecDelDtor)();
  return 4;
}

//----- (00618070) --------------------------------------------------------
signed int __cdecl ShortCut::LoadTypeToMemory(char *pucBuff, unsigned int *uiType)
{
  *uiType = *(_DWORD *)pucBuff;
  return 4;
}

//----- (00618090) --------------------------------------------------------
char __thiscall ShortCutInvPosItem::LoadFromPacket(ShortCutInvPosItem *this, SHORT_CUT_DATA *pkData)
{
  char result; // al@2

  if ( pkData )
  {
    this->m_uiInvPos = pkData->nValue;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006180B0) --------------------------------------------------------
signed int __thiscall ShortCutSkill::CopyToMemory(ShortCutSkill *this, char *pucBuff)
{
  *(_WORD *)pucBuff = this->m_kSkillID;
  return 2;
}

//----- (006180D0) --------------------------------------------------------
char __thiscall ShortCutSkill::LoadFromPacket(ShortCutSkill *this, SHORT_CUT_DATA *pkData)
{
  char result; // al@2

  if ( pkData )
  {
    this->m_kSkillID = pkData->nValue;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006180F0) --------------------------------------------------------
signed int __thiscall ShortCutSkill::LoadFromMemory(ShortCutSkill *this, char *pucBuff)
{
  this->m_kSkillID = *(_WORD *)pucBuff;
  return 2;
}

//----- (00618110) --------------------------------------------------------
char __thiscall ShortCutSkill::ConfirmInstance(ShortCutSkill *this)
{
  return Skill::IsLearnSkill(this->m_kSkillID);
}

//----- (00618120) --------------------------------------------------------
signed int __thiscall ShortCutAction::CopyToMemory(ShortCutAction *this, char *pucBuff)
{
  *(_DWORD *)pucBuff = this->m_uiTableIndexNum;
  *((_DWORD *)pucBuff + 1) = this->m_uiInvType;
  *((_DWORD *)pucBuff + 2) = this->m_uiActionNum;
  return 12;
}

//----- (00618140) --------------------------------------------------------
signed int __thiscall ShortCutAction::LoadFromMemory(ShortCutAction *this, char *pucBuff)
{
  this->m_uiTableIndexNum = *(_DWORD *)pucBuff;
  this->m_uiInvType = *((_DWORD *)pucBuff + 1);
  this->m_uiActionNum = *((_DWORD *)pucBuff + 2);
  return 12;
}

//----- (00618160) --------------------------------------------------------
char __thiscall ShortCutItem::LoadFromPacket(ShortCutItem *this, SHORT_CUT_DATA *pkData)
{
  char result; // al@2
  int v3; // eax@3

  if ( pkData )
  {
    v3 = LOWORD(pkData->nValue);
    this->m_kItemID = v3;
    (*(void (__stdcall **)(int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(v3);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (00618190) --------------------------------------------------------
Item *__thiscall ShortCutItem::CopyToMemory(ShortCutItem *this, char *pucBuff)
{
  Item *result; // eax@1
  unsigned __int16 v3; // ax@2

  result = this->m_spItem.m_pObject;
  if ( result )
  {
    v3 = result->m_kStruct.itemid;
    this->m_kItemID = v3;
    *(_WORD *)pucBuff = v3;
    (*(void (__stdcall **)(_DWORD))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(this->m_kItemID);
    result = (Item *)2;
  }
  return result;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (006181D0) --------------------------------------------------------
signed int __thiscall ShortCutItem::LoadFromMemory(ShortCutItem *this, char *pucBuff)
{
  ShortCutItem *v2; // edi@1
  Item *v3; // esi@1
  int v4; // eax@6

  v2 = this;
  v3 = this->m_spItem.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spItem.m_pObject = 0;
  }
  v4 = *(_WORD *)pucBuff;
  v2->m_kItemID = v4;
  (*(void (__stdcall **)(int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(v4);
  return 2;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (00618230) --------------------------------------------------------
void __thiscall ShortCutItem::SetItem(ShortCutItem *this, Item *pkItem)
{
  ShortCutItem *v2; // ebx@1
  Item *v3; // esi@1

  v2 = this;
  v3 = this->m_spItem.m_pObject;
  if ( v3 != pkItem )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
    {
      if ( v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
    v2->m_spItem.m_pObject = pkItem;
    if ( !pkItem )
      goto LABEL_9;
    InterlockedIncrement((volatile LONG *)&pkItem->m_uiRefCount);
  }
  if ( !pkItem )
  {
LABEL_9:
    v2->m_kItemID = -1;
    return;
  }
  v2->m_kItemID = v2->m_spItem.m_pObject->m_kStruct.itemid;
}

//----- (006182A0) --------------------------------------------------------
void __thiscall ShortCutInvPosItem::ShortCutInvPosItem(ShortCutInvPosItem *this)
{
  ShortCutInvPosItem *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v1->vfptr = (NiRefObjectVtbl *)&ShortCutInvPosItem::`vftable';
  v1->m_uiInvPos = 0;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9B6E1C: using guessed type int (__thiscall *ShortCutInvPosItem::`vftable')(void *p, char);

//----- (006182D0) --------------------------------------------------------
void __thiscall ShortCutInvPosItem::~ShortCutInvPosItem(ShortCutInvPosItem *this)
{
  this->m_uiInvPos = 0;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);

//----- (006182F0) --------------------------------------------------------
void __thiscall ShortCutSkill::ShortCutSkill(ShortCutSkill *this)
{
  ShortCutSkill *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v1->m_kSkillID = -1;
  v1->vfptr = (NiRefObjectVtbl *)&ShortCutSkill::`vftable';
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9B6E38: using guessed type int (__thiscall *ShortCutSkill::`vftable')(void *p, char);

//----- (00618320) --------------------------------------------------------
void __thiscall ShortCutSkill::~ShortCutSkill(ShortCutSkill *this)
{
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);

//----- (00618340) --------------------------------------------------------
void __thiscall ShortCutAction::ShortCutAction(ShortCutAction *this)
{
  ShortCutAction *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v1->vfptr = (NiRefObjectVtbl *)&ShortCutAction::`vftable';
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9B6E54: using guessed type int (__thiscall *ShortCutAction::`vftable')(void *p, char);

//----- (00618370) --------------------------------------------------------
void __thiscall ShortCutAction::~ShortCutAction(ShortCutAction *this)
{
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);

//----- (00618390) --------------------------------------------------------
void __thiscall ShortCutSoulStone::ShortCutSoulStone(ShortCutSoulStone *this)
{
  ShortCutSoulStone *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v1->vfptr = (NiRefObjectVtbl *)&ShortCutSoulStone::`vftable';
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9B6E70: using guessed type int (__thiscall *ShortCutSoulStone::`vftable')(void *p, char);

//----- (006183C0) --------------------------------------------------------
void __thiscall ShortCutSoulStone::~ShortCutSoulStone(ShortCutSoulStone *this)
{
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);

//----- (006183E0) --------------------------------------------------------
signed int __thiscall ShortCutAction::GetActionType(ShortCutAction *this)
{
  int v1; // esi@1
  int v2; // edi@1
  int v3; // ecx@3
  int v4; // eax@4
  signed int result; // eax@5
  int v6; // eax@6
  int v7; // eax@7

  v1 = ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;
  v2 = LOWORD(this->m_uiTableIndexNum);
  if ( !(unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable
                                                         + 16))(
                           ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable,
                           v2) )
    return 0;
  if ( (unsigned __int16)v2 > *(_WORD *)(v1 + 200) )
    return 0;
  v3 = *(_DWORD *)(v1 + 196);
  if ( !*(_DWORD *)(v3 + 4 * v2) )
    return 0;
  v4 = *(_DWORD *)(v3 + 4 * v2);
  if ( !v4 )
    return 0;
  v6 = *(_DWORD *)(v4 + 101);
  if ( v6 )
  {
    v7 = v6 - 1;
    if ( v7 )
    {
      if ( v7 != 1 )
        return 0;
      result = 6;
    }
    else
    {
      result = 5;
    }
  }
  else
  {
    result = 4;
  }
  return result;
}
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;

//----- (00618450) --------------------------------------------------------
void __thiscall ShortCutItem::ShortCutItem(ShortCutItem *this)
{
  ShortCutItem *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v1->vfptr = (NiRefObjectVtbl *)&ShortCutItem::`vftable';
  v1->m_spItem.m_pObject = 0;
  v1->m_kItemID = -1;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9B6E8C: using guessed type int (__thiscall *ShortCutItem::`vftable')(void *p, char);

//----- (006184F0) --------------------------------------------------------
void __thiscall ShortCutItem::~ShortCutItem(ShortCutItem *this)
{
  ShortCutItem *v1; // esi@1
  Item *v2; // edi@1
  Item *v3; // edi@6

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ShortCutItem::`vftable';
  v2 = this->m_spItem.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spItem.m_pObject = 0;
  }
  v1->m_kItemID = -1;
  v3 = v1->m_spItem.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v1->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9B6E8C: using guessed type int (__thiscall *ShortCutItem::`vftable')(void *p, char);

//----- (006185A0) --------------------------------------------------------
signed int __thiscall ShortCutInvPosItem::CopyToMemory(ShortCutInvPosItem *this, char *pucBuff)
{
  unsigned int v2; // ecx@1
  Item *v3; // eax@2

  *(_DWORD *)pucBuff = this->m_uiInvPos;
  v2 = this->m_uiInvPos;
  if ( v2 < 0xC0 )
  {
    v3 = g_kInventory.m_aspInv[v2].m_pObject;
    if ( v3 )
      (*(void (__stdcall **)(_DWORD))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(v3->m_kStruct.itemid);
  }
  return 4;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (006185E0) --------------------------------------------------------
signed int __thiscall ShortCutInvPosItem::LoadFromMemory(ShortCutInvPosItem *this, char *pucBuff)
{
  unsigned int v2; // eax@1
  Item *v3; // eax@2

  v2 = *(_DWORD *)pucBuff;
  this->m_uiInvPos = *(_DWORD *)pucBuff;
  if ( v2 < 0xC0 )
  {
    v3 = g_kInventory.m_aspInv[v2].m_pObject;
    if ( v3 )
      (*(void (__stdcall **)(_DWORD))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(v3->m_kStruct.itemid);
  }
  return 4;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (00618620) --------------------------------------------------------
char __thiscall ShortCutAction::LoadFromPacket(ShortCutAction *this, SHORT_CUT_DATA *pkData)
{
  int v2; // esi@1
  int v3; // edi@1
  ShortCutAction *v4; // ebx@1
  ActionViewInfo **v5; // eax@3
  ActionViewInfo *v6; // ecx@4
  char result; // al@5

  v2 = ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;
  v3 = LOWORD(pkData->nValue);
  v4 = this;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable
                                                        + 16))(
                          ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable,
                          v3)
    && (unsigned __int16)v3 <= *(_WORD *)(v2 + 200)
    && (v5 = (ActionViewInfo **)(*(_DWORD *)(v2 + 196) + 4 * v3), *v5)
    && (v6 = *v5) != 0 )
  {
    v4->m_uiTableIndexNum = pkData->nValue;
    switch ( pkData->nCodeNo )
    {
      case 4u:
        v4->m_uiInvType = 4;
        break;
      case 5u:
        v4->m_uiInvType = 5;
        break;
      case 6u:
        v4->m_uiInvType = 6;
        break;
    }
    v4->m_uiActionNum = ActionViewTable::GetActionNum(v6);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;

//----- (006186C0) --------------------------------------------------------
void __thiscall NiRefObject::~NiRefObject(CPostProcessEffect *this)
{
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);

//----- (006186E0) --------------------------------------------------------
unsigned int __cdecl ActionViewTable::GetActionNum(ActionViewInfo *pkInfo)
{
  ActionViewInfo *v1; // ebx@1
  unsigned int v2; // esi@1
  unsigned int result; // eax@2
  int v4; // eax@3
  unsigned int v5; // edi@4
  char *v6; // eax@7
  unsigned int uiNum; // [sp+10h] [bp+8h]@3

  v1 = pkInfo;
  v2 = 0;
  if ( pkInfo )
  {
    v4 = *(_DWORD *)(ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable + 56);
    uiNum = 0;
    if ( v4 )
      v5 = *(_DWORD *)(v4 + 40);
    else
      v5 = 0;
    if ( v5 > 0 )
    {
      do
      {
        v6 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable + 4), v2);
        if ( *(_DWORD *)(v6 + 101) == v1->eActionType )
        {
          if ( (ActionViewInfo *)v6 == v1 )
            break;
          if ( *(_WORD *)(v6 + 65) >= v5 )
            ++uiNum;
        }
        ++v2;
      }
      while ( v2 < v5 );
    }
    result = uiNum;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;

//----- (00618750) --------------------------------------------------------
ShortCutInvPosItem *__thiscall ActorTextKeyMatch::`scalar deleting destructor'(ShortCutInvPosItem *this, unsigned int a2)
{
  ShortCutInvPosItem *v2; // esi@1

  v2 = this;
  this->m_uiInvPos = 0;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);

//----- (00618790) --------------------------------------------------------
ShortCutItem *__thiscall ShortCutItem::`scalar deleting destructor'(ShortCutItem *this, unsigned int a2)
{
  ShortCutItem *v2; // esi@1

  v2 = this;
  ShortCutItem::~ShortCutItem(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006187C0) --------------------------------------------------------
char ShortCutMgr::Init()
{
  return 1;
}

//----- (006187D0) --------------------------------------------------------
char ShortCutMgr::LoadFromNet()
{
  return 1;
}

//----- (006187F0) --------------------------------------------------------
char __stdcall ShortCutMgr::LoadOption(SpStream *rkStream)
{
  SpStream::PopInt(rkStream);
  return 1;
}

//----- (00618810) --------------------------------------------------------
void __stdcall ShortCutMgr::CreateShortCut(ShortCut::Type eType)
{
  ShortCutInvPosItem *v2; // eax@2
  ShortCutItem *v3; // eax@4
  ShortCutSkill *v4; // eax@6
  ShortCutAction *v5; // eax@8
  ShortCutSoulStone *v6; // eax@10

  switch ( eType )
  {
    case 5:
      v2 = (ShortCutInvPosItem *)operator new(0xCu);
      if ( v2 )
        ShortCutInvPosItem::ShortCutInvPosItem(v2);
      break;
    case 4:
      v3 = (ShortCutItem *)operator new(0x10u);
      if ( v3 )
        ShortCutItem::ShortCutItem(v3);
      break;
    case 1:
      v4 = (ShortCutSkill *)operator new(0xCu);
      if ( v4 )
        ShortCutSkill::ShortCutSkill(v4);
      break;
    case 2:
      v5 = (ShortCutAction *)operator new(0x14u);
      if ( v5 )
        ShortCutAction::ShortCutAction(v5);
      break;
    case 3:
      v6 = (ShortCutSoulStone *)operator new(8u);
      if ( v6 )
        ShortCutSoulStone::ShortCutSoulStone(v6);
      break;
    default:
      return;
  }
}

//----- (00618980) --------------------------------------------------------
bool __thiscall ShortCutMgr::ShortCutChanged(ShortCutMgr *this)
{
  return this->m_bShortCutChanged;
}

//----- (00618990) --------------------------------------------------------
void __thiscall ShortCutMgr::SetShortCutChanged(ShortCutMgr *this, bool b)
{
  this->m_bShortCutChanged = b;
}

//----- (006189A0) --------------------------------------------------------
bool __thiscall ShortCutMgr::ShortCutSizeChanged(ShortCutMgr *this)
{
  return this->m_bShortCutSizeChanged;
}

//----- (006189B0) --------------------------------------------------------
void __thiscall ShortCutMgr::SetShortCutSizeChanged(ShortCutMgr *this, bool b)
{
  this->m_bShortCutSizeChanged = b;
}

//----- (006189C0) --------------------------------------------------------
bool ShortCutMgr::SendOptToChange()
{
  return 0;
}

//----- (006189D0) --------------------------------------------------------
void __thiscall ShortCutMgr::SetInvPosItem(ShortCutMgr *this, unsigned __int16 uiExchangePos, unsigned __int16 uiLocationPos, bool bOnlyLocation)
{
  char *v4; // edi@1
  int v5; // eax@4
  int v6; // ecx@4
  signed int v7; // [sp+Ch] [bp-4h]@1

  v4 = (char *)this->m_aspShortCut;
  v7 = 100;
  do
  {
    if ( *(_DWORD *)v4 && (*(int (**)(void))(**(_DWORD **)v4 + 4))() == 5 )
    {
      v5 = *(_DWORD *)v4;
      v6 = *(_DWORD *)(*(_DWORD *)v4 + 8);
      if ( v6 == uiLocationPos )
        *(_DWORD *)(v5 + 8) = uiExchangePos;
      if ( !bOnlyLocation && v6 == uiExchangePos )
        *(_DWORD *)(v5 + 8) = uiLocationPos;
    }
    v4 += 4;
    --v7;
  }
  while ( v7 );
}

//----- (00618A30) --------------------------------------------------------
char __thiscall ShortCutMgr::SyncShortCutAndActionWinKey(ShortCutMgr *this, int nViewTableIndex, int nWinIndex)
{
  char result; // al@2
  char *v4; // esi@5
  signed int v5; // edi@5
  int v6; // eax@8

  if ( nViewTableIndex >= 0 )
  {
    if ( nWinIndex >= 0 )
    {
      v4 = (char *)this->m_aspShortCut;
      v5 = 100;
      do
      {
        if ( *(_DWORD *)v4 )
        {
          if ( (*(int (**)(void))(**(_DWORD **)v4 + 4))() == 2 )
          {
            v6 = *(_DWORD *)v4;
            if ( *(_DWORD *)v4 )
            {
              if ( *(_DWORD *)(v6 + 8) == nViewTableIndex && *(_DWORD *)(v6 + 16) != nWinIndex )
                *(_DWORD *)(v6 + 16) = nWinIndex;
            }
          }
        }
        v4 += 4;
        --v5;
      }
      while ( v5 );
      result = 1;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00618A90) --------------------------------------------------------
void __thiscall ShortCutMgr::Clear(ShortCutMgr *this)
{
  char *v1; // edi@1
  signed int v2; // ebx@1
  int v3; // esi@2

  v1 = (char *)this->m_aspShortCut;
  v2 = 100;
  do
  {
    v3 = *(_DWORD *)v1;
    if ( *(_DWORD *)v1 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v3 + 4)) )
      {
        if ( v3 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v3)(v3, 1);
      }
      *(_DWORD *)v1 = 0;
    }
    v1 += 4;
    --v2;
  }
  while ( v2 );
}

//----- (00618AE0) --------------------------------------------------------
void __thiscall ShortCutMgr::CheckContents(ShortCutMgr *this)
{
  char *v1; // edi@1
  signed int v2; // ebx@1
  int v3; // esi@4
  int v4; // esi@7

  v1 = (char *)this->m_aspShortCut;
  v2 = 100;
  do
  {
    if ( *(_DWORD *)v1 )
    {
      if ( (*(int (**)(void))(**(_DWORD **)v1 + 4))() == 1 )
      {
        v3 = *(_DWORD *)v1;
        if ( *(_DWORD *)v1 )
        {
          if ( !Skill::IsLearnSkill(*(_WORD *)(v3 + 8))
            && !(unsigned __int8)Skill::IsProduceBaseSkill(*(_WORD *)(v3 + 8)) )
          {
            v4 = *(_DWORD *)v1;
            if ( *(_DWORD *)v1 )
            {
              if ( !InterlockedDecrement((volatile LONG *)(v4 + 4)) )
              {
                if ( v4 )
                  (**(void (__thiscall ***)(_DWORD, _DWORD))v4)(v4, 1);
              }
              *(_DWORD *)v1 = 0;
            }
          }
        }
      }
    }
    v1 += 4;
    --v2;
  }
  while ( v2 );
}

//----- (00618B70) --------------------------------------------------------
void __thiscall ShortCutMgr::~ShortCutMgr(ShortCutMgr *this)
{
  ShortCutMgr *v1; // esi@1
  int *v2; // eax@1

  v1 = this;
  this->vfptr = (IOptionBaseVtbl *)&ShortCutMgr::`vftable';
  v2 = this->m_vecChanged._Myfirst;
  if ( v2 )
    operator delete(v2);
  v1->m_vecChanged._Myfirst = 0;
  v1->m_vecChanged._Mylast = 0;
  v1->m_vecChanged._Myend = 0;
  zlibUtil2::~zlibUtil2(&v1->m_zlibUtil2);
  `eh vector destructor iterator'(
    v1->m_aspShortCut,
    4u,
    100,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
}
// 9B6EA8: using guessed type bool (__thiscall *ShortCutMgr::`vftable')(ShortCutMgr *this, struct SpStream *);

//----- (00618C00) --------------------------------------------------------
void __thiscall ShortCutMgr::ShortCutMgr(ShortCutMgr *this)
{
  ShortCutMgr *v1; // esi@1
  char *v2; // ecx@1
  char *v3; // ebx@1
  __int16 v4; // [sp+18h] [bp-10h]@0

  v1 = this;
  this->vfptr = (IOptionBaseVtbl *)&ShortCutMgr::`vftable';
  `eh vector constructor iterator'(
    this->m_aspShortCut,
    4u,
    100,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  *(_DWORD *)&v1->m_kVersion.year = 0;
  v1->m_kVersion.hour = 0;
  ZlibUtil::ZlibUtil(&v1->m_zlibUtil);
  zlibUtil2::zlibUtil2(&v1->m_zlibUtil2);
  v1->m_vecChanged._Myfirst = 0;
  v1->m_vecChanged._Mylast = 0;
  v1->m_vecChanged._Myend = 0;
  LOBYTE(v4) = 0;
  *(_DWORD *)&v1->m_kVersion.year = 184879062;
  *(_WORD *)&v1->m_kVersion.hour = v4;
  *(_WORD *)&v1->m_bShortCutChanged = 0;
  v2 = (char *)v1->m_vecChanged._Mylast;
  v3 = (char *)v1->m_vecChanged._Myfirst;
  if ( v3 != v2 )
  {
    memmove(v3, v2, 0);
    v1->m_vecChanged._Mylast = (int *)v3;
  }
  std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
    (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&v1->m_vecChanged,
    0x14u);
  ShortCutMgr::Clear(v1);
}
// 9B6EA8: using guessed type bool (__thiscall *ShortCutMgr::`vftable')(ShortCutMgr *this, struct SpStream *);

//----- (00618D10) --------------------------------------------------------
void __thiscall ShortCutMgr::Update(ShortCutMgr *this, float fCurTime)
{
  ShortCutMgr *v2; // edi@1
  int *v3; // ebx@3
  int *v4; // esi@3
  char *v5; // esi@6
  ShortCutAction *v6; // eax@9
  unsigned int v7; // ecx@10
  Item *v8; // ecx@11
  int v9; // ecx@12
  ShortCut *v10; // eax@16
  ShortCut *v11; // eax@18
  ShortCutAction *v12; // ecx@20
  __int16 v13; // ax@21
  char *v14; // ecx@26
  char *v15; // ebx@26
  int Index; // [sp+0h] [bp-10Ch]@3
  ShortCutAction *pkShortCutAction; // [sp+4h] [bp-108h]@9
  ShortCutAction *pkShortCutActiona; // [sp+4h] [bp-108h]@20
  char Dummy[256]; // [sp+8h] [bp-104h]@5

  v2 = this;
  if ( !(_S3_6 & 1) )
  {
    _S3_6 |= 1u;
    fLastSend = fCurTime;
  }
  v3 = this->m_vecChanged._Myfirst;
  v4 = this->m_vecChanged._Mylast;
  Index = 0;
  if ( v3 != v4 && fLastSend + 1.0 < fCurTime )
  {
    fLastSend = fCurTime;
    memset(&Dummy[1], 0, 0xFFu);
    Dummy[0] = v4 - v3;
    if ( v3 != v4 )
    {
      v5 = &Dummy[2];
      do
      {
        if ( v2->m_aspShortCut[*v3].m_pObject )
        {
          switch ( ((int (*)(void))v2->m_aspShortCut[*v3].m_pObject->vfptr[1].__vecDelDtor)() )
          {
            case 5:
              *(_WORD *)v5 = 2;
              v6 = (ShortCutAction *)v2->m_aspShortCut[*v3].m_pObject;
              pkShortCutAction = v6;
              if ( !v6 )
                break;
              v7 = v6->m_uiTableIndexNum;
              if ( v7 >= 0xC0 )
                break;
              v8 = g_kInventory.m_aspInv[v7].m_pObject;
              if ( !v8 )
                break;
              v9 = v8->m_kStruct.itemid;
              if ( (_WORD)v9 == -1 )
                goto LABEL_15;
              if ( IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(v9) )
              {
                v6 = pkShortCutAction;
LABEL_15:
                *(_DWORD *)(v5 + 2) = v6->m_uiTableIndexNum;
                *(v5 - 1) = *(_BYTE *)v3;
                goto LABEL_24;
              }
              break;
            case 4:
              *(_WORD *)v5 = 1;
              v10 = v2->m_aspShortCut[*v3].m_pObject;
              if ( v10 )
              {
                *(_DWORD *)(v5 + 2) = LOWORD(v10[1].m_uiRefCount);
                *(v5 - 1) = *(_BYTE *)v3;
                goto LABEL_24;
              }
              break;
            case 1:
              *(_WORD *)v5 = 3;
              v11 = v2->m_aspShortCut[*v3].m_pObject;
              if ( v11 )
              {
                *(_DWORD *)(v5 + 2) = LOWORD(v11[1].vfptr);
                *(v5 - 1) = *(_BYTE *)v3;
                goto LABEL_24;
              }
              break;
            case 2:
              v12 = (ShortCutAction *)v2->m_aspShortCut[*v3].m_pObject;
              pkShortCutActiona = v12;
              if ( v12 )
              {
                v13 = ShortCutAction::GetActionType(v12);
                *(_WORD *)v5 = v13;
                if ( v13 )
                {
                  *(_DWORD *)(v5 + 2) = pkShortCutActiona->m_uiTableIndexNum;
                  *(v5 - 1) = *(_BYTE *)v3;
                  goto LABEL_24;
                }
              }
              break;
            default:
              break;
          }
        }
        else
        {
          *(_DWORD *)(v5 + 2) = 0;
          *(_WORD *)v5 = 0;
          *(v5 - 1) = *(_BYTE *)v3;
LABEL_24:
          ++Index;
          v5 += 7;
        }
        ++v3;
      }
      while ( v3 != v2->m_vecChanged._Mylast );
    }
    v14 = (char *)v2->m_vecChanged._Mylast;
    v15 = (char *)v2->m_vecChanged._Myfirst;
    if ( v15 != v14 )
    {
      memmove(v15, v14, 0);
      v2->m_vecChanged._Mylast = (int *)v15;
    }
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Cu, 0x37u, Dummy, 7 * Index + 4);
  }
}

//----- (00618F80) --------------------------------------------------------
void __thiscall ShortCutMgr::ChangeIndex(ShortCutMgr *this, int Index)
{
  int v2; // edi@1
  int *v3; // eax@2
  std::vector<CBaseObject *,std::allocator<CBaseObject *> > *v4; // esi@2
  int *v5; // ecx@2
  unsigned int v6; // eax@5
  CBaseObject **v7; // edx@6
  CBaseObject **v8; // ecx@7
  int v9; // edi@7
  unsigned int v10; // eax@8
  unsigned int v11; // eax@10
  unsigned int v12; // ecx@10
  unsigned int v13; // ecx@12
  CBaseObject **v14; // eax@17
  CBaseObject **v15; // ecx@19
  unsigned int v16; // eax@20
  unsigned int v17; // eax@22
  unsigned int v18; // ecx@22
  unsigned int v19; // ecx@24
  _DWORD *v20; // eax@29

  v2 = Index;
  if ( Index < 100 )
  {
    v3 = this->m_vecChanged._Myfirst;
    v4 = (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&this->m_vecChanged;
    v5 = this->m_vecChanged._Mylast;
    if ( v3 == v5 )
    {
LABEL_5:
      v6 = (unsigned int)v4->_Mylast;
      if ( (unsigned int)&Index >= v6 || (v7 = v4->_Myfirst, v4->_Myfirst > (CBaseObject **)&Index) )
      {
        v15 = v4->_Myend;
        if ( (CBaseObject **)v6 == v15 )
        {
          v16 = (signed int)(v6 - (unsigned int)v4->_Myfirst) >> 2;
          if ( v16 > 0x3FFFFFFE )
            std::_Xlength_error("vector<T> too long");
          v17 = v16 + 1;
          v18 = v15 - v4->_Myfirst;
          if ( v17 > v18 )
          {
            if ( 0x3FFFFFFF - (v18 >> 1) >= v18 )
              v19 = (v18 >> 1) + v18;
            else
              v19 = 0;
            if ( v19 < v17 )
              v19 = v17;
            std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v4, v19);
          }
        }
        v20 = v4->_Mylast;
        if ( v20 )
          *v20 = v2;
      }
      else
      {
        v8 = v4->_Myend;
        v9 = ((char *)&Index - (char *)v7) >> 2;
        if ( (CBaseObject **)v6 == v8 )
        {
          v10 = (signed int)(v6 - (_DWORD)v7) >> 2;
          if ( v10 > 0x3FFFFFFE )
            std::_Xlength_error("vector<T> too long");
          v11 = v10 + 1;
          v12 = v8 - v7;
          if ( v11 > v12 )
          {
            if ( 0x3FFFFFFF - (v12 >> 1) >= v12 )
              v13 = (v12 >> 1) + v12;
            else
              v13 = 0;
            if ( v13 < v11 )
              v13 = v11;
            std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v4, v13);
          }
        }
        v14 = v4->_Mylast;
        if ( v14 )
        {
          *v14 = v4->_Myfirst[v9];
          ++v4->_Mylast;
          return;
        }
      }
      ++v4->_Mylast;
    }
    else
    {
      while ( *v3 != Index )
      {
        ++v3;
        if ( v3 == v5 )
          goto LABEL_5;
      }
    }
  }
}

//----- (006190A0) --------------------------------------------------------
bool __thiscall ShortCutMgr::InitShortCutFromInventory(ShortCutMgr *this)
{
  signed int v1; // esi@1
  char *v2; // edi@1
  ShortCutItem *v3; // ebx@4
  int v4; // esi@5
  Item *v5; // eax@6
  int v6; // edi@8
  Item *v7; // eax@11
  unsigned int v8; // eax@17
  Item *v9; // ecx@18
  char *v11; // [sp+Ch] [bp-78h]@1
  int i; // [sp+10h] [bp-74h]@1
  bool b_success; // [sp+17h] [bp-6Dh]@1
  SHINE_ITEM_STRUCT kItemStruct; // [sp+18h] [bp-6Ch]@11

  v1 = 0;
  v2 = (char *)this->m_aspShortCut;
  b_success = 1;
  i = 0;
  v11 = (char *)this->m_aspShortCut;
  while ( 1 )
  {
    if ( *(_DWORD *)v2 )
    {
      if ( (*(int (**)(void))(**(_DWORD **)v2 + 4))() != 4 )
      {
        if ( !*(_DWORD *)v2 )
          goto LABEL_22;
        if ( (*(int (**)(void))(**(_DWORD **)v2 + 4))() != 5 )
          goto LABEL_22;
        if ( !*(_DWORD *)v2 )
          goto LABEL_22;
        v8 = *(_DWORD *)(*(_DWORD *)v2 + 8);
        if ( v8 < 0xC0 )
        {
          v9 = g_kInventory.m_aspInv[v8].m_pObject;
          if ( v9 )
          {
            if ( (unsigned __int8)((int (*)(void))v9->vfptr[1].__vecDelDtor)() == 24 )
              goto LABEL_22;
          }
        }
        ShortCutMgr::SetShortCut(&g_kShortCutMgr, 0, v1, 0);
        goto LABEL_21;
      }
      v3 = *(ShortCutItem **)v2;
      if ( *(_DWORD *)v2 )
        break;
    }
LABEL_22:
    v1 = i + 1;
    v2 += 4;
    i = v1;
    v11 = v2;
    if ( v1 >= 100 )
      return b_success;
  }
  v4 = v3->m_kItemID;
  if ( (_WORD)v4 == -1 )
    goto LABEL_21;
  v5 = Inventory::GetItemByID(&g_kInventory, v3->m_kItemID);
  if ( v5 )
  {
    ShortCutItem::SetItem(v3, v5);
    goto LABEL_22;
  }
  v6 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                          ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                          v4)
    && (unsigned __int16)v4 <= *(_WORD *)(v6 + 200)
    && *(_DWORD *)(*(_DWORD *)(v6 + 196) + 4 * v4) )
  {
    memset((char *)&kItemStruct, 0, 0x67u);
    kItemStruct.itemid = v4;
    v7 = Item::Create(&kItemStruct);
    if ( v7 )
    {
      ShortCutItem::SetItem(v3, v7);
      v2 = v11;
      goto LABEL_22;
    }
    ShortCutMgr::SetShortCut(&g_kShortCutMgr, 0, i, 0);
    v2 = v11;
LABEL_21:
    b_success = 0;
    goto LABEL_22;
  }
  return 0;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (00619220) --------------------------------------------------------
char __thiscall ShortCutMgr::LoadFromPacket(ShortCutMgr *this, SHORT_CUT_DATA *pkData)
{
  ShortCutMgr *v2; // ebx@1
  char result; // al@2
  ShortCutItem *v4; // eax@4
  ShortCut *v5; // eax@5
  ShortCutInvPosItem *v6; // eax@6
  ShortCutAction *v7; // eax@9
  ShortCut *v8; // esi@12

  v2 = this;
  if ( pkData )
  {
    switch ( pkData->nCodeNo )
    {
      case 1u:
        v4 = (ShortCutItem *)operator new(0x10u);
        if ( !v4 )
          goto LABEL_11;
        ShortCutItem::ShortCutItem(v4);
        goto LABEL_12;
      case 2u:
        v6 = (ShortCutInvPosItem *)operator new(0xCu);
        if ( !v6 )
          goto LABEL_11;
        ShortCutInvPosItem::ShortCutInvPosItem(v6);
        goto LABEL_12;
      case 3u:
        ShortCutMgr::CreateShortCut(ITEM);
        goto LABEL_12;
      case 4u:
      case 5u:
      case 6u:
        v7 = (ShortCutAction *)operator new(0x14u);
        if ( v7 )
          ShortCutAction::ShortCutAction(v7);
        else
LABEL_11:
          v5 = 0;
LABEL_12:
        v8 = v5;
        if ( v5 )
        {
          v5->vfptr[4].__vecDelDtor((NiRefObject *)v5, (unsigned int)pkData);
          ShortCutMgr::SetShortCut(v2, v8, pkData->nSlotNo, 0);
        }
        break;
      default:
        break;
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00619340) --------------------------------------------------------
unsigned int *__cdecl UserTrade::GetMyInvIndex(unsigned int uiIndex)
{
  unsigned int *result; // eax@2

  if ( uiIndex < 0xC )
    result = (&UserTrade::ms_auiInventoryIndex)[uiIndex];
  else
    result = (unsigned int *)-1;
  return result;
}
// A96794: using guessed type unsigned int *UserTrade::ms_auiInventoryIndex;

//----- (00619360) --------------------------------------------------------
void __cdecl UserTrade::LockOpp(bool b)
{
  UserTrade::ms_bOppLock = b;
}
// A967C4: using guessed type bool UserTrade::ms_bOppLock;

//----- (00619370) --------------------------------------------------------
void __cdecl UserTrade::LockMy(bool b)
{
  UserTrade::ms_bMyLock = b;
}
// A967C5: using guessed type bool UserTrade::ms_bMyLock;

//----- (00619380) --------------------------------------------------------
bool __cdecl UserTrade::GetLockOpp()
{
  return UserTrade::ms_bOppLock;
}
// A967C4: using guessed type bool UserTrade::ms_bOppLock;

//----- (00619390) --------------------------------------------------------
bool __cdecl UserTrade::GetLockMy()
{
  return UserTrade::ms_bMyLock;
}
// A967C5: using guessed type bool UserTrade::ms_bMyLock;

//----- (006193A0) --------------------------------------------------------
void __cdecl UserTrade::AgreeOpp(bool b)
{
  UserTrade::ms_bOppAgree = b;
}
// A967C6: using guessed type bool UserTrade::ms_bOppAgree;

//----- (006193B0) --------------------------------------------------------
bool __cdecl UserTrade::GetAgreeOpp()
{
  return UserTrade::ms_bOppAgree;
}
// A967C6: using guessed type bool UserTrade::ms_bOppAgree;

//----- (006193C0) --------------------------------------------------------
bool __cdecl UserTrade::IsProposing()
{
  return UserTrade::ms_bProposing;
}
// A967C7: using guessed type bool UserTrade::ms_bProposing;

//----- (006193D0) --------------------------------------------------------
void __cdecl UserTrade::SetProposing(bool bPropose)
{
  UserTrade::ms_bProposing = bPropose;
}
// A967C7: using guessed type bool UserTrade::ms_bProposing;

//----- (006193E0) --------------------------------------------------------
bool __cdecl UserTrade::IsTrading()
{
  return UserTrade::ms_bTrading;
}
// A967C8: using guessed type bool UserTrade::ms_bTrading;

//----- (006193F0) --------------------------------------------------------
void __cdecl UserTrade::SetTrading(bool bTrading)
{
  UserTrade::ms_bTrading = bTrading;
}
// A967C8: using guessed type bool UserTrade::ms_bTrading;

//----- (00619400) --------------------------------------------------------
void __cdecl UserTrade::Clear()
{
  unsigned int v0; // esi@1
  int v1; // edi@2
  int v2; // edi@7

  v0 = 0;
  do
  {
    v1 = UserTrade::ms_aspOppInv[v0];
    if ( v1 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v1 + 4)) && v1 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v1)(v1, 1);
      UserTrade::ms_aspOppInv[v0] = 0;
    }
    v2 = UserTrade::ms_aspMyInv[v0];
    if ( v2 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v2 + 4)) && v2 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v2)(v2, 1);
      UserTrade::ms_aspMyInv[v0] = 0;
    }
    (&UserTrade::ms_auiInventoryIndex)[v0] = 0;
    ++v0;
  }
  while ( v0 < 12 );
  UserTrade::ms_bOppLock = 0;
  UserTrade::ms_bMyLock = 0;
  UserTrade::ms_bOppAgree = 0;
  UserTrade::ms_bProposing = 0;
}
// A96794: using guessed type unsigned int *UserTrade::ms_auiInventoryIndex;
// A967C4: using guessed type bool UserTrade::ms_bOppLock;
// A967C5: using guessed type bool UserTrade::ms_bMyLock;
// A967C6: using guessed type bool UserTrade::ms_bOppAgree;
// A967C7: using guessed type bool UserTrade::ms_bProposing;
// A967CC: using guessed type int UserTrade::ms_aspOppInv[];
// A967FC: using guessed type int UserTrade::ms_aspMyInv[];

//----- (006194A0) --------------------------------------------------------
Item *__cdecl UserTrade::GetOpp(unsigned int uiIndex)
{
  Item *result; // eax@2

  if ( uiIndex < 0xC )
    result = (Item *)UserTrade::ms_aspOppInv[uiIndex];
  else
    result = 0;
  return result;
}
// A967CC: using guessed type int UserTrade::ms_aspOppInv[];

//----- (006194C0) --------------------------------------------------------
Item *__cdecl UserTrade::GetMy(unsigned int uiIndex)
{
  Item *result; // eax@2

  if ( uiIndex < 0xC )
    result = (Item *)UserTrade::ms_aspMyInv[uiIndex];
  else
    result = 0;
  return result;
}
// A967FC: using guessed type int UserTrade::ms_aspMyInv[];

//----- (006194E0) --------------------------------------------------------
void __cdecl UserTrade::AddOpp(Item *pkItem, unsigned int uiIndex)
{
  Item *v2; // esi@2

  if ( uiIndex < 0xC )
  {
    v2 = (Item *)UserTrade::ms_aspOppInv[uiIndex];
    if ( v2 != pkItem )
    {
      if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
      UserTrade::ms_aspOppInv[uiIndex] = (int)pkItem;
      if ( pkItem )
        InterlockedIncrement((volatile LONG *)&pkItem->m_uiRefCount);
    }
  }
}
// A967CC: using guessed type int UserTrade::ms_aspOppInv[];

//----- (00619540) --------------------------------------------------------
void __cdecl UserTrade::AddMy(Item *pkItem, unsigned int uiIndex, unsigned int uiInventoryIndex)
{
  Item *v3; // esi@2

  if ( uiIndex < 0xC )
  {
    v3 = (Item *)UserTrade::ms_aspMyInv[uiIndex];
    if ( v3 != pkItem )
    {
      if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      UserTrade::ms_aspMyInv[uiIndex] = (int)pkItem;
      if ( pkItem )
        InterlockedIncrement((volatile LONG *)&pkItem->m_uiRefCount);
    }
    (&UserTrade::ms_auiInventoryIndex)[uiIndex] = (unsigned int *)uiInventoryIndex;
  }
}
// A96794: using guessed type unsigned int *UserTrade::ms_auiInventoryIndex;
// A967FC: using guessed type int UserTrade::ms_aspMyInv[];

//----- (006195A0) --------------------------------------------------------
void __cdecl UserTrade::RemoveOpp(unsigned int uiIndex)
{
  int v1; // esi@2

  if ( uiIndex < 0xC )
  {
    v1 = UserTrade::ms_aspOppInv[uiIndex];
    if ( v1 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v1 + 4)) )
      {
        if ( v1 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v1)(v1, 1);
      }
      UserTrade::ms_aspOppInv[uiIndex] = 0;
    }
  }
}
// A967CC: using guessed type int UserTrade::ms_aspOppInv[];

//----- (006195F0) --------------------------------------------------------
unsigned int *__cdecl UserTrade::RemoveMy(unsigned int uiIndex)
{
  unsigned int *result; // eax@2
  int v2; // esi@3

  if ( uiIndex < 0xC )
  {
    v2 = UserTrade::ms_aspMyInv[uiIndex];
    if ( v2 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v2 + 4)) )
      {
        if ( v2 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v2)(v2, 1);
      }
      UserTrade::ms_aspMyInv[uiIndex] = 0;
    }
    result = (&UserTrade::ms_auiInventoryIndex)[uiIndex];
  }
  else
  {
    result = (unsigned int *)-1;
  }
  return result;
}
// A96794: using guessed type unsigned int *UserTrade::ms_auiInventoryIndex;
// A967FC: using guessed type int UserTrade::ms_aspMyInv[];

//----- (00619640) --------------------------------------------------------
signed int __cdecl UserTrade::GetEmptyMy()
{
  signed int result; // eax@1

  result = 0;
  while ( UserTrade::ms_aspMyInv[result] )
  {
    if ( (unsigned int)++result >= 0xC )
      return -1;
  }
  return result;
}
// A967FC: using guessed type int UserTrade::ms_aspMyInv[];

//----- (00619660) --------------------------------------------------------
int __thiscall CWayPoint::Init(CWayPoint *this, int nDotCnt, int nMapCnt, int nMaxCanUseGateCnt)
{
  int v4; // ebx@1
  CWayPoint *v5; // esi@1
  MAP *v6; // eax@5
  int v8; // eax@9
  MAP_DOT *nDotCnta; // [sp+14h] [bp+8h]@4

  v4 = nDotCnt;
  v5 = this;
  if ( nDotCnt <= 0 )
    return 0;
  if ( nMapCnt <= 0 )
    return 0;
  if ( nMaxCanUseGateCnt <= 0 )
    return 0;
  nDotCnta = (MAP_DOT *)malloc(44 * nDotCnt);
  v5->m_pDotData = nDotCnta;
  if ( !nDotCnta )
    return 0;
  v6 = (MAP *)malloc(20 * nMapCnt);
  v5->m_pMapData = v6;
  if ( !v6 )
  {
    free(nDotCnta);
    return 0;
  }
  v5->m_nMaxDotCnt = v4;
  v5->m_nMaxMapCnt = nMapCnt;
  v5->m_nMaxCanUseGateCnt = nMaxCanUseGateCnt;
  v5->m_nAddDotCnt = 0;
  v5->m_nAddMapCnt = 0;
  if ( v4 > 0 )
  {
    v8 = 0;
    do
    {
      v5->m_pDotData[v8].nDotNo = -1;
      v5->m_pDotData[v8].nMapID = -1;
      v5->m_pDotData[v8].X = -1;
      v5->m_pDotData[v8].Y = -1;
      v5->m_pDotData[v8].DotType = 0;
      v5->m_pDotData[v8].BFS_Data.nSearchNo = -1;
      v5->m_pDotData[v8].BFS_Data.BFSDotStatus = 0;
      v5->m_pDotData[v8].pNextLink = 0;
      ++v8;
      --v4;
    }
    while ( v4 );
  }
  return 1;
}

//----- (00619730) --------------------------------------------------------
int __thiscall CWayPoint::ErrorCheck(CWayPoint *this)
{
  int result; // eax@2
  int v2; // edx@4
  int v3; // eax@5

  if ( this->m_pDotData
    && this->m_pMapData
    && (v2 = this->m_nMaxDotCnt, v2 > 0)
    && (v3 = this->m_nMaxMapCnt, v3 > 0)
    && this->m_nAddDotCnt <= v2 )
  {
    result = this->m_nAddMapCnt <= v3;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00619760) --------------------------------------------------------
int __thiscall CWayPoint::Get_LastError(CWayPoint *this)
{
  int result; // eax@1

  result = this->m_nLastError;
  this->m_nLastError = 0;
  return result;
}

//----- (00619770) --------------------------------------------------------
void __thiscall CMinWeightSort::CMinWeightSort(CMinWeightSort *this)
{
  this->m_pLinkSort = 0;
}

//----- (00619780) --------------------------------------------------------
void __thiscall CMinWeightSort::~CMinWeightSort(CMinWeightSort *this)
{
  CMinWeightSort *v1; // esi@1
  WeightSortLink *v2; // ST00_4@2

  v1 = this;
  while ( v1->m_pLinkSort )
  {
    v2 = v1->m_pLinkSort;
    v1->m_pLinkSort = v1->m_pLinkSort->pNext;
    free(v2);
  }
  v1->m_pLinkSort = 0;
}

//----- (006197B0) --------------------------------------------------------
int __thiscall CMinWeightSort::Del_SameWeightDot(CMinWeightSort *this, MAP_DOT *pDot)
{
  WeightSortLink *v3; // edx@4
  WeightSortLink *v4; // eax@4

  if ( !pDot )
    return 0;
  if ( this->m_pLinkSort )
  {
    v3 = 0;
    v4 = this->m_pLinkSort;
    while ( v4->pDot != pDot )
    {
      v3 = v4;
      v4 = v4->pNext;
      if ( !v4 )
        return 1;
    }
    if ( !v3 )
    {
      this->m_pLinkSort = this->m_pLinkSort->pNext;
      free(v4);
      return 1;
    }
    v3->pNext = v4->pNext;
    free(v4);
  }
  return 1;
}

//----- (00619820) --------------------------------------------------------
int __thiscall CMinWeightSort::Add_WeightDot(CMinWeightSort *this, MAP_DOT *pDot, int nFromDotNo, int nFromDotWeight, int nLinkWeight, int nSearchNo)
{
  WeightSortLink *v7; // eax@8
  WeightSortLink *v8; // edx@10
  WeightSortLink *v9; // ecx@12
  WeightSortLink *v10; // esi@12
  CMinWeightSort *v11; // [sp+4h] [bp-4h]@1

  v11 = this;
  if ( !pDot )
    return 0;
  if ( nFromDotWeight < 0 )
    return 0;
  if ( nLinkWeight < 0 )
    return 0;
  if ( pDot->BFS_Data.nSearchNo != nSearchNo || pDot->BFS_Data.nMinWeightSum >= nFromDotWeight + nLinkWeight )
  {
    v7 = (WeightSortLink *)malloc(8u);
    if ( !v7 )
      return 0;
    v7->pNext = 0;
    v7->pDot = pDot;
    pDot->BFS_Data.nSearchNo = nSearchNo;
    pDot->BFS_Data.nFromDot = nFromDotNo;
    pDot->BFS_Data.nMinWeightSum = nFromDotWeight + nLinkWeight;
    pDot->BFS_Data.BFSDotStatus = 1;
    v8 = v11->m_pLinkSort;
    if ( !v11->m_pLinkSort )
    {
      v11->m_pLinkSort = v7;
      return 1;
    }
    v9 = v11->m_pLinkSort;
    v10 = 0;
    if ( v8 )
    {
      do
      {
        if ( v9->pDot->BFS_Data.nMinWeightSum > nFromDotWeight + nLinkWeight )
          break;
        v10 = v9;
        v9 = v9->pNext;
      }
      while ( v9 );
    }
    if ( !v10 )
    {
      v7->pNext = v8;
      v11->m_pLinkSort = v7;
      return 1;
    }
    if ( v9 )
      v7->pNext = v9;
    v10->pNext = v7;
  }
  return 1;
}

//----- (00619900) --------------------------------------------------------
int __thiscall CMinWeightSort::Get_MinWeightDot(CMinWeightSort *this, MAP_DOT **pDot)
{
  int result; // eax@2
  WeightSortLink *v3; // eax@3

  if ( pDot )
  {
    v3 = this->m_pLinkSort;
    if ( this->m_pLinkSort )
    {
      v3->pDot->BFS_Data.BFSDotStatus = 2;
      *pDot = this->m_pLinkSort->pDot;
      this->m_pLinkSort = this->m_pLinkSort->pNext;
      free(v3);
      result = 1;
    }
    else
    {
      *pDot = 0;
      result = 1;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00619950) --------------------------------------------------------
void __thiscall CMinWeightPath::CMinWeightPath(CMinWeightPath *this)
{
  this->m_pWeightPath = 0;
}

//----- (00619960) --------------------------------------------------------
void __thiscall CMinWeightPath::~CMinWeightPath(CMinWeightPath *this)
{
  CMinWeightPath *v1; // esi@1
  WeightPath *v2; // ST00_4@2

  v1 = this;
  while ( v1->m_pWeightPath )
  {
    v2 = v1->m_pWeightPath;
    v1->m_pWeightPath = v1->m_pWeightPath->pNext;
    free(v2);
  }
  v1->m_pWeightPath = 0;
}

//----- (00619990) --------------------------------------------------------
int __thiscall CMinWeightPath::Init(CMinWeightPath *this)
{
  CMinWeightPath *v1; // esi@1
  WeightPath *v2; // ST00_4@2

  v1 = this;
  while ( v1->m_pWeightPath )
  {
    v2 = v1->m_pWeightPath;
    v1->m_pWeightPath = v1->m_pWeightPath->pNext;
    free(v2);
  }
  v1->m_pWeightPath = 0;
  return 1;
}

//----- (006199C0) --------------------------------------------------------
WeightPath *__thiscall CMinWeightPath::Add_PathDot(CMinWeightPath *this, MAP_DOT *pDot)
{
  CMinWeightPath *v2; // esi@1
  WeightPath *result; // eax@1

  v2 = this;
  result = (WeightPath *)malloc(8u);
  if ( result )
  {
    result->pDot = pDot;
    result->pNext = 0;
    if ( v2->m_pWeightPath )
      result->pNext = v2->m_pWeightPath;
    v2->m_pWeightPath = result;
    result = (WeightPath *)1;
  }
  return result;
}

//----- (00619A00) --------------------------------------------------------
int __thiscall CMinWeightPath::Get_PathDot(CMinWeightPath *this, MAP_DOT **pDot)
{
  int result; // eax@2
  WeightPath *v3; // ST00_4@3

  if ( this->m_pWeightPath )
  {
    *pDot = this->m_pWeightPath->pDot;
    v3 = this->m_pWeightPath;
    this->m_pWeightPath = this->m_pWeightPath->pNext;
    free(v3);
    result = 1;
  }
  else
  {
    *pDot = 0;
    result = 1;
  }
  return result;
}

//----- (00619A40) --------------------------------------------------------
void __thiscall CWayPoint::CWayPoint(CWayPoint *this)
{
  this->m_MinWeightPath.m_pWeightPath = 0;
  this->m_nMaxDotCnt = 0;
  this->m_nMaxMapCnt = 0;
  this->m_nAddDotCnt = 0;
  this->m_nAddMapCnt = 0;
  this->m_pDotData = 0;
  this->m_pMapData = 0;
  this->m_nSearchNo = 0;
  this->m_nLastError = 0;
}

//----- (00619A60) --------------------------------------------------------
void __thiscall CWayPoint::~CWayPoint(CWayPoint *this)
{
  CWayPoint *v1; // esi@1
  WeightPath *v2; // ST00_4@2

  v1 = this;
  while ( v1->m_MinWeightPath.m_pWeightPath )
  {
    v2 = v1->m_MinWeightPath.m_pWeightPath;
    v1->m_MinWeightPath.m_pWeightPath = v1->m_MinWeightPath.m_pWeightPath->pNext;
    free(v2);
  }
  v1->m_MinWeightPath.m_pWeightPath = 0;
}

//----- (00619AA0) --------------------------------------------------------
int __thiscall CWayPoint::Add_Map(CWayPoint *this, char *pMapName, int nMapID, WPMType nWPMType)
{
  CWayPoint *v4; // esi@1
  MAP *v5; // eax@2
  int v6; // ecx@3
  int v7; // edx@4
  int v8; // ecx@6
  int result; // eax@7
  int v10; // edi@11
  int v11; // ebx@12
  int v12; // eax@16

  v4 = this;
  if ( this->m_pDotData
    && (v5 = this->m_pMapData) != 0
    && (v6 = this->m_nMaxDotCnt, v6 > 0)
    && (v7 = v4->m_nMaxMapCnt, v7 > 0)
    && v4->m_nAddDotCnt <= v6
    && (v8 = v4->m_nAddMapCnt, v8 <= v7)
    && pMapName
    && nMapID >= 0
    && v8 < v7 )
  {
    v10 = 0;
    if ( v8 <= 0 )
    {
LABEL_16:
      strncpy(v4->m_pMapData[v4->m_nAddMapCnt].sMapName, pMapName, 0xCu);
      v12 = v10;
      v4->m_pMapData[v12].nMapID = nMapID;
      v4->m_pMapData[v12].nWPMType = nWPMType;
      result = 1;
      ++v4->m_nAddMapCnt;
    }
    else
    {
      v11 = 0;
      while ( strncmp(pMapName, v5[v11].sMapName, 0xCu) )
      {
        v5 = v4->m_pMapData;
        if ( v5[v11].nMapID == nMapID )
          break;
        ++v10;
        ++v11;
        if ( v10 >= v4->m_nAddMapCnt )
          goto LABEL_16;
      }
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00619B70) --------------------------------------------------------
int __thiscall CWayPoint::Get_IsValid_Dot(CWayPoint *this, int nDotNo)
{
  MAP_DOT *v2; // edi@1
  int v3; // eax@3
  int v4; // edx@4
  int v5; // esi@5
  DOT_TYPE v6; // edx@9
  int result; // eax@11

  v2 = this->m_pDotData;
  if ( v2
    && this->m_pMapData
    && (v3 = this->m_nMaxDotCnt, v3 > 0)
    && (v4 = this->m_nMaxMapCnt, v4 > 0)
    && (v5 = this->m_nAddDotCnt, v5 <= v3)
    && this->m_nAddMapCnt <= v4
    && nDotNo >= 0
    && nDotNo < v5
    && ((v6 = v2[nDotNo].DotType, v6 == 1) || v6 == 2) )
  {
    result = v2[nDotNo].nDotNo == nDotNo;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00619BE0) --------------------------------------------------------
int __thiscall CWayPoint::Get_IsValid_MapName(CWayPoint *this, char *pMapName)
{
  CWayPoint *v2; // esi@1
  int v3; // eax@3
  int v4; // ecx@4
  int v5; // eax@6
  int result; // eax@7
  int v7; // ebx@9
  int v8; // edi@10

  v2 = this;
  if ( this->m_pDotData
    && this->m_pMapData
    && (v3 = this->m_nMaxDotCnt, v3 > 0)
    && (v4 = this->m_nMaxMapCnt, v4 > 0)
    && v2->m_nAddDotCnt <= v3
    && (v5 = v2->m_nAddMapCnt, v5 <= v4)
    && pMapName )
  {
    v7 = 0;
    if ( v5 <= 0 )
    {
LABEL_13:
      result = 0;
    }
    else
    {
      v8 = 0;
      while ( strncmp(pMapName, v2->m_pMapData[v8].sMapName, 0xCu) )
      {
        ++v7;
        ++v8;
        if ( v7 >= v2->m_nAddMapCnt )
          goto LABEL_13;
      }
      result = 1;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00619C60) --------------------------------------------------------
int __thiscall CWayPoint::Get_IsValid_MapID(CWayPoint *this, int nMapID)
{
  MAP *v2; // edx@2
  int v3; // esi@3
  int v4; // eax@4
  int v5; // ecx@6
  int result; // eax@7

  if ( !this->m_pDotData )
    goto LABEL_11;
  v2 = this->m_pMapData;
  if ( !v2 )
    goto LABEL_11;
  v3 = this->m_nMaxDotCnt;
  if ( v3 <= 0 )
    goto LABEL_11;
  v4 = this->m_nMaxMapCnt;
  if ( v4 <= 0 )
    goto LABEL_11;
  if ( this->m_nAddDotCnt > v3 )
    goto LABEL_11;
  v5 = this->m_nAddMapCnt;
  if ( v5 > v4 )
    goto LABEL_11;
  result = 0;
  if ( nMapID < 0 )
    return result;
  if ( v5 > 0 )
  {
    while ( v2->nMapID != nMapID )
    {
      ++result;
      ++v2;
      if ( result >= v5 )
        goto LABEL_11;
    }
    result = 1;
  }
  else
  {
LABEL_11:
    result = 0;
  }
  return result;
}

//----- (00619CC0) --------------------------------------------------------
int __thiscall CWayPoint::Get_Dot(CWayPoint *this, int nDotNo, MAP_DOT **pDot)
{
  MAP_DOT *v3; // edi@1
  int v4; // eax@3
  int v5; // edx@4
  int v6; // esi@5
  int result; // eax@10

  v3 = this->m_pDotData;
  if ( v3
    && this->m_pMapData
    && (v4 = this->m_nMaxDotCnt, v4 > 0)
    && (v5 = this->m_nMaxMapCnt, v5 > 0)
    && (v6 = this->m_nAddDotCnt, v6 <= v4)
    && this->m_nAddMapCnt <= v5
    && nDotNo >= 0
    && nDotNo < v6
    && pDot )
  {
    *pDot = &v3[nDotNo];
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00619D20) --------------------------------------------------------
int __thiscall CWayPoint::Get_MapName(CWayPoint *this, int nMapID, char *pMapName)
{
  MAP *v3; // ebx@2
  int v4; // edx@3
  int v5; // eax@4
  int v6; // ecx@6
  int result; // eax@7
  MAP *v8; // edx@11

  if ( this->m_pDotData
    && (v3 = this->m_pMapData) != 0
    && (v4 = this->m_nMaxDotCnt, v4 > 0)
    && (v5 = this->m_nMaxMapCnt, v5 > 0)
    && this->m_nAddDotCnt <= v4
    && (v6 = this->m_nAddMapCnt, v6 <= v5) )
  {
    result = 0;
    if ( nMapID >= 0 && pMapName )
    {
      if ( v6 <= 0 )
      {
LABEL_14:
        result = 0;
      }
      else
      {
        v8 = v3;
        while ( v8->nMapID != nMapID )
        {
          ++result;
          ++v8;
          if ( result >= v6 )
            goto LABEL_14;
        }
        strncpy(pMapName, v3[result].sMapName, 0xCu);
        result = 1;
      }
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00619DB0) --------------------------------------------------------
int __thiscall CWayPoint::Get_MapID(CWayPoint *this, char *pMapName, int *pMapID)
{
  CWayPoint *v3; // esi@1
  int v4; // ecx@3
  int v5; // eax@4
  int v6; // ecx@6
  int result; // eax@7
  int v8; // edi@10
  int v9; // ebx@11

  v3 = this;
  if ( this->m_pDotData
    && this->m_pMapData
    && (v4 = this->m_nMaxDotCnt, v4 > 0)
    && (v5 = v3->m_nMaxMapCnt, v5 > 0)
    && v3->m_nAddDotCnt <= v4
    && (v6 = v3->m_nAddMapCnt, v6 <= v5)
    && pMapName
    && pMapID )
  {
    v8 = 0;
    if ( v6 <= 0 )
    {
LABEL_14:
      result = 0;
    }
    else
    {
      v9 = 0;
      while ( strncmp(pMapName, v3->m_pMapData[v9].sMapName, 0xCu) )
      {
        ++v8;
        ++v9;
        if ( v8 >= v3->m_nAddMapCnt )
          goto LABEL_14;
      }
      *pMapID = v3->m_pMapData[v8].nMapID;
      result = 1;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00619E50) --------------------------------------------------------
int __thiscall CWayPoint::Get_MapType(CWayPoint *this, int nMapID, WPMType *pWPMType)
{
  MAP *v3; // ebx@2
  int v4; // edx@3
  int v5; // eax@4
  int v6; // ecx@6
  int result; // eax@7
  MAP *v8; // edx@11

  if ( this->m_pDotData
    && (v3 = this->m_pMapData) != 0
    && (v4 = this->m_nMaxDotCnt, v4 > 0)
    && (v5 = this->m_nMaxMapCnt, v5 > 0)
    && this->m_nAddDotCnt <= v4
    && (v6 = this->m_nAddMapCnt, v6 <= v5) )
  {
    result = 0;
    if ( nMapID >= 0 && pWPMType )
    {
      if ( v6 <= 0 )
      {
LABEL_14:
        result = 0;
      }
      else
      {
        v8 = v3;
        while ( v8->nMapID != nMapID )
        {
          ++result;
          ++v8;
          if ( result >= v6 )
            goto LABEL_14;
        }
        *pWPMType = v3[result].nWPMType;
        result = 1;
      }
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00619ED0) --------------------------------------------------------
int __thiscall CWayPoint::Get_MapType(CWayPoint *this, char *pMapName, WPMType *pWPMType)
{
  CWayPoint *v3; // esi@1
  int v4; // ecx@3
  int v5; // eax@4
  int v6; // ecx@6
  int result; // eax@7
  int v8; // edi@10
  int v9; // ebx@11

  v3 = this;
  if ( this->m_pDotData
    && this->m_pMapData
    && (v4 = this->m_nMaxDotCnt, v4 > 0)
    && (v5 = v3->m_nMaxMapCnt, v5 > 0)
    && v3->m_nAddDotCnt <= v4
    && (v6 = v3->m_nAddMapCnt, v6 <= v5)
    && pMapName
    && pWPMType )
  {
    v8 = 0;
    if ( v6 <= 0 )
    {
LABEL_14:
      result = 0;
    }
    else
    {
      v9 = 0;
      while ( strncmp(pMapName, v3->m_pMapData[v9].sMapName, 0xCu) )
      {
        ++v8;
        ++v9;
        if ( v8 >= v3->m_nAddMapCnt )
          goto LABEL_14;
      }
      *pWPMType = v3->m_pMapData[v8].nWPMType;
      result = 1;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00619F70) --------------------------------------------------------
int __thiscall CWayPoint::Make_BFS_DotList(CWayPoint *this, int nStartDot, int nEndDot)
{
  CWayPoint *v3; // edi@1
  int v4; // eax@3
  int v5; // ecx@4
  int v6; // ebx@5
  int v8; // eax@8
  int v9; // esi@8
  int v10; // eax@14
  int v11; // ecx@15
  int v12; // eax@23
  int i; // ebx@25
  int v14; // esi@26
  int v15; // ecx@28
  MAP_DOT *v16; // eax@40
  int v17; // ebx@40
  int v18; // esi@40
  int v19; // ecx@44
  int v20; // ecx@46
  int v21; // edx@49
  bool v22; // zf@49
  bool v23; // sf@49
  unsigned __int8 v24; // of@49
  MAP_DOT *v25; // ebx@54
  int v26; // ebx@55
  MAP_DOT *pNextDot; // [sp+8h] [bp-8h]@26
  CMinWeightSort MinWeightSort; // [sp+Ch] [bp-4h]@1

  v3 = this;
  v22 = this->m_pDotData == 0;
  MinWeightSort.m_pLinkSort = 0;
  if ( v22 )
    return 0;
  if ( !this->m_pMapData )
    return 0;
  v4 = this->m_nMaxDotCnt;
  if ( v4 <= 0 )
    return 0;
  v5 = this->m_nMaxMapCnt;
  if ( v5 <= 0 )
    return 0;
  v6 = v3->m_nAddDotCnt;
  if ( v6 > v4 || v3->m_nAddMapCnt > v5 )
    return 0;
  v8 = nEndDot;
  v9 = nStartDot;
  v3->m_nLastError = 0;
  if ( v9 == v8 )
    return 0;
  if ( v9 < 0 || v8 < 0 || v9 >= v6 || v8 >= v6 )
  {
LABEL_37:
    CMinWeightSort::~CMinWeightSort(&MinWeightSort);
    return 0;
  }
  if ( !CWayPoint::Get_Dot(v3, v8, (MAP_DOT **)&nStartDot) )
    goto LABEL_36;
  v10 = nStartDot;
  if ( !*(_DWORD *)(nStartDot + 20) )
  {
    v11 = 0;
    if ( v6 > 0 )
    {
      do
      {
        if ( *(_DWORD *)(v10 + 20) == 1 )
        {
          *(_DWORD *)(v10 + 24) = v3->m_nSearchNo;
          *(_DWORD *)(v10 + 28) = 0;
        }
        ++v11;
      }
      while ( v11 < v3->m_nAddDotCnt );
    }
  }
  if ( !CWayPoint::Get_Dot(v3, v9, (MAP_DOT **)&nStartDot) )
    goto LABEL_37;
  if ( !CMinWeightSort::Add_WeightDot(&MinWeightSort, (MAP_DOT *)nStartDot, -1, 0, 0, v3->m_nSearchNo) )
  {
    ++v3->m_nSearchNo;
    CMinWeightSort::~CMinWeightSort(&MinWeightSort);
    return 0;
  }
  if ( !CMinWeightSort::Get_MinWeightDot(&MinWeightSort, (MAP_DOT **)&nStartDot) )
    goto LABEL_36;
  while ( 1 )
  {
    v12 = nStartDot;
    if ( !nStartDot || *(_DWORD *)nStartDot == nEndDot )
      break;
    for ( i = *(_DWORD *)(nStartDot + 40); i; i = *(_DWORD *)(i + 12) )
    {
      v14 = *(_DWORD *)(i + 8);
      pNextDot = (MAP_DOT *)v14;
      if ( !v14 )
        goto LABEL_36;
      if ( *(_DWORD *)(v14 + 24) == v3->m_nSearchNo )
      {
        v15 = *(_DWORD *)(v14 + 36);
        if ( v15 == 2 || v15 != 1 || *(_DWORD *)(v14 + 28) <= *(_DWORD *)(v12 + 28) + *(_DWORD *)i )
          continue;
        CMinWeightSort::Del_SameWeightDot(&MinWeightSort, (MAP_DOT *)v14);
        CMinWeightSort::Add_WeightDot(
          &MinWeightSort,
          (MAP_DOT *)v14,
          *(_DWORD *)nStartDot,
          *(_DWORD *)(nStartDot + 28),
          *(_DWORD *)i,
          v3->m_nSearchNo);
      }
      else
      {
        CMinWeightSort::Add_WeightDot(
          &MinWeightSort,
          (MAP_DOT *)v14,
          *(_DWORD *)v12,
          *(_DWORD *)(v12 + 28),
          *(_DWORD *)i,
          v3->m_nSearchNo);
      }
      v12 = nStartDot;
    }
    if ( !CMinWeightSort::Get_MinWeightDot(&MinWeightSort, (MAP_DOT **)&nStartDot) )
      goto LABEL_36;
  }
  if ( !CWayPoint::Get_Dot(v3, nEndDot, (MAP_DOT **)&nStartDot) )
    goto LABEL_36;
  v16 = (MAP_DOT *)nStartDot;
  v17 = *(_DWORD *)(nStartDot + 4);
  v18 = 0;
  if ( *(_DWORD *)(nStartDot + 24) != v3->m_nSearchNo )
    goto LABEL_47;
  while ( 1 )
  {
    if ( v17 != v16->nMapID && v16->DotType == 2 )
    {
      ++v18;
      v17 = v16->nMapID;
    }
    v19 = v16->BFS_Data.nFromDot;
    if ( v19 == -1 )
      break;
    if ( CWayPoint::Get_Dot(v3, v19, &pNextDot) )
    {
      v16 = pNextDot;
      v20 = pNextDot->BFS_Data.nSearchNo;
      nStartDot = (int)pNextDot;
      if ( v20 == v3->m_nSearchNo )
        continue;
    }
    goto LABEL_47;
  }
  if ( v16->nWPMType == 1 )
  {
    v21 = v3->m_nMaxCanUseGateCnt + 1;
    v24 = __OFSUB__(v18, v21);
    v22 = v18 == v21;
    v23 = v18 - v21 < 0;
  }
  else
  {
    v24 = __OFSUB__(v18, v3->m_nMaxCanUseGateCnt);
    v22 = v18 == v3->m_nMaxCanUseGateCnt;
    v23 = v18 - v3->m_nMaxCanUseGateCnt < 0;
  }
  if ( !((unsigned __int8)(v23 ^ v24) | v22) )
  {
    ++v3->m_nSearchNo;
    v3->m_nLastError = 100;
    CMinWeightSort::~CMinWeightSort(&MinWeightSort);
    return 0;
  }
  if ( !CWayPoint::Get_Dot(v3, nEndDot, (MAP_DOT **)&nStartDot) )
  {
LABEL_47:
    ++v3->m_nSearchNo;
    CMinWeightSort::~CMinWeightSort(&MinWeightSort);
    return 0;
  }
  CMinWeightPath::Init(&v3->m_MinWeightPath);
  v25 = (MAP_DOT *)nStartDot;
  if ( *(_DWORD *)(nStartDot + 24) != v3->m_nSearchNo )
  {
LABEL_36:
    ++v3->m_nSearchNo;
    goto LABEL_37;
  }
  while ( 1 )
  {
    CMinWeightPath::Add_PathDot(&v3->m_MinWeightPath, v25);
    v26 = v25->BFS_Data.nFromDot;
    if ( v26 == -1 )
      break;
    if ( CWayPoint::Get_Dot(v3, v26, &pNextDot) )
    {
      v25 = pNextDot;
      if ( pNextDot->BFS_Data.nSearchNo == v3->m_nSearchNo )
        continue;
    }
    goto LABEL_36;
  }
  ++v3->m_nSearchNo;
  CMinWeightSort::~CMinWeightSort(&MinWeightSort);
  return 1;
}

//----- (0061A250) --------------------------------------------------------
int __thiscall CWayPoint::Add_Dot(CWayPoint *this, int nMapID, int X, int Y, DOT_TYPE DotType)
{
  CWayPoint *v5; // esi@1
  int v6; // eax@3
  int v7; // ecx@4
  int v8; // edi@5
  int result; // eax@7
  int v10; // ebx@8

  v5 = this;
  if ( this->m_pDotData
    && this->m_pMapData
    && (v6 = this->m_nMaxDotCnt, v6 > 0)
    && (v7 = this->m_nMaxMapCnt, v7 > 0)
    && (v8 = v5->m_nAddDotCnt, v8 <= v6)
    && v5->m_nAddMapCnt <= v7 )
  {
    v10 = nMapID;
    if ( nMapID >= 0
      && X >= 0
      && Y >= 0
      && (DotType == 1 || DotType == 2)
      && CWayPoint::Get_IsValid_MapID(v5, nMapID)
      && CWayPoint::Get_MapType(v5, v10, (WPMType *)&nMapID) )
    {
      v5->m_pDotData[v8].nDotNo = v8;
      v5->m_pDotData[v5->m_nAddDotCnt].nMapID = v10;
      v5->m_pDotData[v5->m_nAddDotCnt].X = X;
      v5->m_pDotData[v5->m_nAddDotCnt].Y = Y;
      v5->m_pDotData[v5->m_nAddDotCnt].DotType = DotType;
      v5->m_pDotData[v5->m_nAddDotCnt].nWPMType = nMapID;
      result = 1;
      v5->m_pDotData[v5->m_nAddDotCnt++].pNextLink = 0;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0061A350) --------------------------------------------------------
int __thiscall CWayPoint::Add_Link(CWayPoint *this, int nLinkDot_1, int nLinkDot_2, LINK_TYPE LinkType, int nWeight)
{
  CWayPoint *v5; // esi@1
  int v6; // eax@3
  int v7; // edx@4
  int v8; // ecx@5
  int result; // eax@7
  int v10; // edi@10
  int v11; // esi@15
  int v12; // ebx@15
  int v13; // ecx@17
  int v14; // eax@17
  int *v15; // eax@20
  int v16; // ecx@21
  void *v17; // edi@23
  int *v18; // eax@24
  int v19; // ecx@27

  v5 = this;
  if ( !this->m_pDotData )
    return 0;
  if ( !this->m_pMapData )
    return 0;
  v6 = this->m_nMaxDotCnt;
  if ( v6 <= 0 )
    return 0;
  v7 = this->m_nMaxMapCnt;
  if ( v7 <= 0 )
    return 0;
  v8 = this->m_nAddDotCnt;
  if ( v8 > v6 || v5->m_nAddMapCnt > v7 || nLinkDot_1 < 0 || nLinkDot_1 >= v8 )
    return 0;
  v10 = nLinkDot_2;
  if ( nLinkDot_2 >= 0
    && nLinkDot_2 < v8
    && nLinkDot_1 != nLinkDot_2
    && CWayPoint::Get_Dot(v5, nLinkDot_1, (MAP_DOT **)&nLinkDot_1)
    && CWayPoint::Get_Dot(v5, v10, (MAP_DOT **)&nLinkDot_2) )
  {
    v11 = nLinkDot_1;
    v12 = nLinkDot_2;
    if ( nWeight < 0 )
    {
      if ( *(_DWORD *)(nLinkDot_1 + 4) == *(_DWORD *)(nLinkDot_2 + 4) )
      {
        v13 = *(_DWORD *)(nLinkDot_1 + 12) - *(_DWORD *)(nLinkDot_2 + 12);
        v14 = *(_DWORD *)(nLinkDot_1 + 8) - *(_DWORD *)(nLinkDot_2 + 8);
        nWeight = v14 * v14 + v13 * v13;
        *(float *)&nWeight = sqrt((double)nWeight);
        nWeight = (signed int)*(float *)&nWeight;
      }
      else
      {
        *(float *)&nWeight = 0.0;
      }
    }
    if ( LinkType == 1 )
    {
      v15 = (int *)malloc(0x10u);
      if ( v15 )
      {
        v16 = nWeight;
        v15[2] = v12;
        *v15 = v16;
        v15[3] = *(_DWORD *)(v11 + 40);
        *(_DWORD *)(v11 + 40) = v15;
        return 1;
      }
      return 0;
    }
    if ( LinkType )
      return 0;
    v17 = malloc(0x10u);
    if ( !v17 )
      return 0;
    v18 = (int *)malloc(0x10u);
    if ( !v18 )
    {
      free(v17);
      return 0;
    }
    v19 = nWeight;
    *((_DWORD *)v17 + 2) = v12;
    *(_DWORD *)v17 = v19;
    *((_DWORD *)v17 + 3) = *(_DWORD *)(v11 + 40);
    *(_DWORD *)(v11 + 40) = v17;
    v18[2] = v11;
    *v18 = v19;
    v18[3] = *(_DWORD *)(v12 + 40);
    *(_DWORD *)(v12 + 40) = v18;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0061A4C0) --------------------------------------------------------
int __thiscall CWayPoint::Get_BFS_NextDot(CWayPoint *this, int nStartDot, int nEndDot, MAP_DOT **pNextDot)
{
  CWayPoint *v4; // esi@1
  int v5; // eax@3
  int v6; // ecx@4
  int v7; // edx@5

  v4 = this;
  if ( !this->m_pDotData )
    return 0;
  if ( !this->m_pMapData )
    return 0;
  v5 = this->m_nMaxDotCnt;
  if ( v5 <= 0 )
    return 0;
  v6 = this->m_nMaxMapCnt;
  if ( v6 <= 0 )
    return 0;
  v7 = v4->m_nAddDotCnt;
  if ( v7 > v5 || v4->m_nAddMapCnt > v6 || !pNextDot )
    return 0;
  if ( (nStartDot != nEndDot || nStartDot <= 0 || nEndDot <= 0) && nStartDot < v7 && nEndDot < v7 )
  {
    if ( nStartDot >= 0 )
    {
      if ( nEndDot >= 0 )
      {
        CMinWeightPath::Init(&v4->m_MinWeightPath);
        CWayPoint::Make_BFS_DotList(v4, nStartDot, nEndDot);
        return CMinWeightPath::Get_PathDot(&v4->m_MinWeightPath, pNextDot) != 0;
      }
    }
    else if ( nEndDot < 0 )
    {
      return CMinWeightPath::Get_PathDot(&v4->m_MinWeightPath, pNextDot) != 0;
    }
  }
  return 0;
}

//----- (0061A570) --------------------------------------------------------
int __thiscall CWayPoint::Add_Dot(CWayPoint *this, char *pMapName, int X, int Y, DOT_TYPE DotType)
{
  CWayPoint *v5; // esi@1
  int v6; // ecx@3
  int v7; // eax@4
  int result; // eax@7
  int v9; // ebx@10
  DOT_TYPE v10; // edi@12

  v5 = this;
  if ( this->m_pDotData
    && this->m_pMapData
    && (v6 = this->m_nMaxDotCnt, v6 > 0)
    && (v7 = v5->m_nMaxMapCnt, v7 > 0)
    && v5->m_nAddDotCnt <= v6
    && v5->m_nAddMapCnt <= v7
    && pMapName
    && X >= 0 )
  {
    v9 = Y;
    if ( Y >= 0 )
    {
      v10 = DotType;
      if ( (DotType == 1 || DotType == 2) && CWayPoint::Get_MapID(v5, pMapName, (int *)&pMapName) )
        result = CWayPoint::Add_Dot(v5, (int)pMapName, X, v9, v10);
      else
        result = 0;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0061A600) --------------------------------------------------------
int __thiscall CWayPoint::Get_NearDot(CWayPoint *this, int nMapID, int X, int Y, MAP_DOT **pNearDot)
{
  CWayPoint *v5; // esi@1
  int v6; // edi@1
  int v7; // ecx@3
  int v8; // eax@4
  int v9; // ebx@7
  Name3 *v10; // eax@12
  int v11; // eax@13
  int v12; // ebx@14
  int v13; // edx@14
  int v14; // edi@15
  int *v15; // ecx@15
  unsigned int v16; // eax@17
  int v17; // ecx@17
  int v18; // eax@23
  MAP_DOT *v19; // eax@26
  int v21; // eax@37
  int v22; // edx@38
  int v23; // ecx@44
  Name3 result; // [sp+10h] [bp-47Ch]@12
  NiPoint2 pos2End; // [sp+1Ch] [bp-470h]@26
  std::vector<int,std::allocator<int> > vecCollusionData; // [sp+24h] [bp-468h]@13
  MAP_DOT **v27; // [sp+34h] [bp-458h]@1
  int k; // [sp+38h] [bp-454h]@13
  int nResultWayCnt; // [sp+3Ch] [bp-450h]@26
  int nNearDotWeight; // [sp+40h] [bp-44Ch]@14
  int *v31; // [sp+44h] [bp-448h]@15
  int nNearDotNo; // [sp+48h] [bp-444h]@14
  bool m_bIsFindEndPoint; // [sp+4Fh] [bp-43Dh]@26
  Name3 sMapName; // [sp+50h] [bp-43Ch]@12
  NiPoint2 aPos2Arr[100]; // [sp+5Ch] [bp-430h]@26
  char strMapName[256]; // [sp+37Ch] [bp-110h]@12
  int v37; // [sp+488h] [bp-4h]@13

  v5 = this;
  v6 = 0;
  v27 = pNearDot;
  if ( !this->m_pDotData )
    return 0;
  if ( !this->m_pMapData )
    return 0;
  v7 = this->m_nMaxDotCnt;
  if ( v7 <= 0 )
    return 0;
  v8 = v5->m_nMaxMapCnt;
  if ( v8 <= 0 )
    return 0;
  if ( v5->m_nAddDotCnt > v7 )
    return 0;
  if ( v5->m_nAddMapCnt > v8 )
    return 0;
  v9 = nMapID;
  if ( nMapID < 0 || X < 0 || Y < 0 || !pNearDot || !CWayPoint::Get_IsValid_MapID(v5, nMapID) )
    return 0;
  strMapName[0] = 0;
  memset(&strMapName[1], 0, 0xFFu);
  CWayPoint::Get_MapName(v5, nMapID, strMapName);
  Name3::Name3(&sMapName, strMapName);
  v10 = World::GetMapName(&g_kWorld, &result);
  if ( !Name3::operator==(v10, &sMapName) )
  {
    v21 = -1;
    nNearDotWeight = 0x7FFFFFFF;
    nNearDotNo = -1;
    if ( v5->m_nAddDotCnt > 0 )
    {
      v22 = 0;
      nResultWayCnt = (int)&v5->m_pDotData->nDotNo;
      v31 = (int *)(nResultWayCnt + 4);
      while ( 1 )
      {
        if ( *v31 == v9 )
        {
          if ( (v5->m_pDotData[v22].X - X) * (v5->m_pDotData[v22].X - X)
             + (v5->m_pDotData[v22].Y - Y) * (v5->m_pDotData[v22].Y - Y) >= nNearDotWeight )
          {
            v21 = nNearDotNo;
          }
          else
          {
            nNearDotWeight = (v5->m_pDotData[v22].X - X) * (v5->m_pDotData[v22].X - X)
                           + (v5->m_pDotData[v22].Y - Y) * (v5->m_pDotData[v22].Y - Y);
            v21 = v6;
            nNearDotNo = v6;
          }
        }
        v23 = v5->m_nAddDotCnt;
        v31 += 11;
        ++v6;
        ++v22;
        if ( v6 >= v23 )
          break;
        v9 = nMapID;
      }
      if ( v21 >= 0 && v21 < v23 )
      {
        *v27 = (MAP_DOT *)(nResultWayCnt + 44 * v21);
        return 1;
      }
    }
    return 0;
  }
  vecCollusionData._Myfirst = 0;
  vecCollusionData._Mylast = 0;
  vecCollusionData._Myend = 0;
  v11 = v5->m_nAddDotCnt;
  v37 = 0;
  k = 0;
  if ( v11 <= 0 )
  {
LABEL_31:
    std::vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>::~vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>((std::vector<HeightMapMaker::TriangleIndex *,std::allocator<HeightMapMaker::TriangleIndex *> > *)&vecCollusionData);
    return 0;
  }
  while ( 1 )
  {
    v12 = -1;
    v13 = 0;
    nNearDotWeight = 0x7FFFFFFF;
    nNearDotNo = -1;
    if ( v11 <= 0 )
    {
LABEL_35:
      if ( vecCollusionData._Myfirst )
        operator delete(vecCollusionData._Myfirst);
      return 0;
    }
    v14 = 0;
    v15 = &v5->m_pDotData->nMapID;
    v31 = &v5->m_pDotData->nMapID;
    do
    {
      if ( *v15 != nMapID )
        goto LABEL_23;
      v16 = vecCollusionData._Mylast - vecCollusionData._Myfirst;
      v17 = 0;
      if ( v16 )
      {
        while ( vecCollusionData._Myfirst[v17] != v13 )
        {
          if ( ++v17 >= v16 )
            goto LABEL_20;
        }
      }
      else
      {
LABEL_20:
        if ( (v5->m_pDotData[v14].X - X) * (v5->m_pDotData[v14].X - X)
           + (v5->m_pDotData[v14].Y - Y) * (v5->m_pDotData[v14].Y - Y) < nNearDotWeight )
        {
          v12 = v13;
          nNearDotWeight = (v5->m_pDotData[v14].X - X) * (v5->m_pDotData[v14].X - X)
                         + (v5->m_pDotData[v14].Y - Y) * (v5->m_pDotData[v14].Y - Y);
          nNearDotNo = v13;
          goto LABEL_23;
        }
      }
      v12 = nNearDotNo;
LABEL_23:
      v18 = v5->m_nAddDotCnt;
      ++v13;
      v15 = v31 + 11;
      ++v14;
      v31 += 11;
    }
    while ( v13 < v18 );
    if ( v12 < 0 || v12 >= v18 )
      goto LABEL_35;
    v19 = v5->m_pDotData;
    *(float *)&result.n3_code[1] = (double)v19[v12].X;
    *(float *)&result.n3_code[2] = (double)v19[v12].Y;
    m_bIsFindEndPoint = 0;
    pos2End.x = (double)X;
    pos2End.y = (double)Y;
    World::SearchWayPointsNew(
      &g_kWorld,
      *(NiPoint2 *)&result.n3_code[1],
      pos2End,
      100,
      aPos2Arr,
      &nResultWayCnt,
      &m_bIsFindEndPoint);
    if ( nResultWayCnt )
      break;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&vecCollusionData,
      (const unsigned int *)&nNearDotNo);
LABEL_30:
    v11 = v5->m_nAddDotCnt;
    if ( ++k >= v11 )
      goto LABEL_31;
  }
  if ( !m_bIsFindEndPoint )
  {
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&vecCollusionData,
      (const unsigned int *)&nNearDotNo);
    goto LABEL_30;
  }
  *v27 = &v5->m_pDotData[v12];
  std::vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>::~vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>((std::vector<HeightMapMaker::TriangleIndex *,std::allocator<HeightMapMaker::TriangleIndex *> > *)&vecCollusionData);
  return 1;
}

//----- (0061A9C0) --------------------------------------------------------
int __thiscall CWayPoint::Get_NearDot(CWayPoint *this, char *pMapName, int X, int Y, MAP_DOT **pNearDot)
{
  CWayPoint *v5; // esi@1
  int v6; // ecx@3
  int v7; // eax@4
  int result; // eax@7
  int v9; // ebx@10
  MAP_DOT **v10; // edi@12

  v5 = this;
  if ( this->m_pDotData
    && this->m_pMapData
    && (v6 = this->m_nMaxDotCnt, v6 > 0)
    && (v7 = v5->m_nMaxMapCnt, v7 > 0)
    && v5->m_nAddDotCnt <= v6
    && v5->m_nAddMapCnt <= v7
    && pMapName
    && X >= 0 )
  {
    v9 = Y;
    if ( Y >= 0 )
    {
      v10 = pNearDot;
      if ( pNearDot && CWayPoint::Get_MapID(v5, pMapName, (int *)&pMapName) )
        result = CWayPoint::Get_NearDot(v5, (int)pMapName, X, v9, v10);
      else
        result = 0;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0061AA50) --------------------------------------------------------
void __cdecl CharScreenBoardBase::SetMaxDistance(float fMaxDistance)
{
  CharScreenBoardBase::ms_fMaxDistance = fMaxDistance;
}
// A72D8C: using guessed type float CharScreenBoardBase::ms_fMaxDistance;

//----- (0061AA60) --------------------------------------------------------
void __cdecl CharScreenBoardBase::SetTransNear(float fNear)
{
  CharScreenBoardBase::ms_fTransNear = fNear;
}
// A72D90: using guessed type float CharScreenBoardBase::ms_fTransNear;

//----- (0061AA70) --------------------------------------------------------
void __cdecl CharScreenBoardBase::SetTransFar(float fFar)
{
  CharScreenBoardBase::ms_fTransFar = fFar;
}
// A72D94: using guessed type float CharScreenBoardBase::ms_fTransFar;

//----- (0061AA80) --------------------------------------------------------
void __thiscall CharScreenBoardBase::SetNameBDMove(CharScreenBoardBase *this, bool b)
{
  this->m_bNameBDMove = b;
}

//----- (0061AA90) --------------------------------------------------------
unsigned __int16 __thiscall CharScreenBoardBase::GetCharHandle(CharScreenBoardBase *this)
{
  return this->m_kCharHandle;
}

//----- (0061AAA0) --------------------------------------------------------
NiScreenElements *__thiscall CharScreenBoardUserChar::GetIconGeometry(CharScreenBoardUserChar *this)
{
  return IConBD::GetGeometry(&this->m_IconBD);
}

//----- (0061AAB0) --------------------------------------------------------
void __thiscall CharScreenBoardUserChar::CreateNameIcon(CharScreenBoardUserChar *this, const char *pkFileName)
{
  IConBD::Create(&this->m_IconBD, pkFileName);
}

//----- (0061AAC0) --------------------------------------------------------
signed int CharScreenBoardUserChar::GetNickNameColor()
{
  return 0xFFFF;
}

//----- (0061AAD0) --------------------------------------------------------
signed int CharScreenBoardMiniHouse::GetNameColor()
{
  return 0xFFFF;
}

//----- (0061AAE0) --------------------------------------------------------
void __thiscall CharScreenBoardBase::CharScreenBoardBase(CharScreenBoardBase *this)
{
  this->vfptr = (CharScreenBoardBaseVtbl *)&CharScreenBoardBase::`vftable';
  this->m_spNodeBoard.m_pObject = 0;
  this->m_kCharHandle = -1;
  this->m_bNameBDMove = 0;
}
// 9B6EDC: using guessed type int (__thiscall *CharScreenBoardBase::`vftable')(void *p, char);

//----- (0061AB00) --------------------------------------------------------
NiNode *__thiscall CharScreenBoardBase::GetGeometry(CharScreenBoardBase *this)
{
  return this->m_spNodeBoard.m_pObject;
}

//----- (0061AB10) --------------------------------------------------------
char __thiscall CharScreenBoardBase::UpDatePostion(CharScreenBoardBase *this, NiPoint3 *rPos, NiCamera *pkWorldCamera)
{
  NiPoint3 *v3; // ebx@1
  CharScreenBoardBase *v4; // esi@1
  _BYTE v5[12]; // ST0C_12@1
  float fScreenHeight; // ST08_4@1
  float fScreenWidth; // ST04_4@1
  char result; // al@2
  Char *v9; // edi@3
  Mover *v10; // ecx@5
  float CharLengthvector; // ST28_4@14
  float CharLengthvector_4; // ST2C_4@14
  float CharLengthvector_8; // ST30_4@14
  float *v14; // eax@14
  NiNode *v15; // edx@16
  float v16; // ecx@17
  float v17; // edx@17
  NiPoint3 k2DOrthoPos; // [sp+30h] [bp-Ch]@1

  v3 = rPos;
  v4 = this;
  *(float *)v5 = rPos->x;
  *(_QWORD *)&v5[4] = *(_QWORD *)&rPos->y;
  fScreenHeight = (double)PgWin::ms_uiScreenHeight;
  fScreenWidth = (double)PgWin::ms_uiScreenWidth;
  if ( !PgUtil::Get2DOrthoPosFrom3DPos(pkWorldCamera, fScreenWidth, fScreenHeight, *(NiPoint3 *)v5, &k2DOrthoPos)
    || (v9 = CharMgr::GetChar(&g_kCharMgr, v4->m_kCharHandle)) != 0
    && ((unsigned __int8)((int (__thiscall *)(Char *))v9->vfptr[20].AddAbStateByAbstateIndex)(v9)
     || (v10 = v9->m_pkMover) != 0 && !Mover::IsSlotView(v10, v9->m_uiMoverSlot, 0)) )
  {
    v4->m_spNodeBoard.m_pObject->m_uFlags |= 1u;
    result = 0;
  }
  else
  {
    v4->m_spNodeBoard.m_pObject->m_uFlags &= 0xFFFEu;
    if ( byte_B4FF93 == 1 )
      k2DOrthoPos.y = k2DOrthoPos.y - 15.0;
    if ( CharMgr::GetChar(&g_kCharMgr, v4->m_kCharHandle) == g_pkMainChar )
      k2DOrthoPos.y = k2DOrthoPos.y - 8.0;
    if ( !v4->m_bNameBDMove )
      v4->m_spNodeBoard.m_pObject->m_kLocal.m_Translate = k2DOrthoPos;
    if ( byte_B4FF93 == 1 )
    {
      CharLengthvector = pkWorldCamera->m_kWorld.m_Translate.x - v3->x;
      CharLengthvector_4 = pkWorldCamera->m_kWorld.m_Translate.y - v3->y;
      CharLengthvector_8 = pkWorldCamera->m_kWorld.m_Translate.z - v3->z;
      *(float *)&pkWorldCamera = CharLengthvector_4 * CharLengthvector_4
                               + CharLengthvector * CharLengthvector
                               + CharLengthvector_8 * CharLengthvector_8;
      *(float *)&pkWorldCamera = sqrt(*(float *)&pkWorldCamera);
      *(float *)&pkWorldCamera = *(float *)&pkWorldCamera / (double)StandLength;
      *(float *)&rPos = 1.0;
      v14 = (float *)&pkWorldCamera;
      if ( *(float *)&pkWorldCamera >= 1.0 )
        v14 = (float *)&rPos;
      v15 = v4->m_spNodeBoard.m_pObject;
      *(float *)&pkWorldCamera = *v14 * 0.1000000014901161;
      *(float *)&pkWorldCamera = 1.0 - *(float *)&pkWorldCamera;
      *(float *)&pkWorldCamera = fabs(*(float *)&pkWorldCamera);
      v15->m_kLocal.m_fScale = *(float *)&pkWorldCamera;
    }
    v16 = k2DOrthoPos.y;
    v17 = k2DOrthoPos.z;
    v4->m_k2DOrthoPos.x = k2DOrthoPos.x;
    v4->m_k2DOrthoPos.y = v16;
    v4->m_k2DOrthoPos.z = v17;
    result = 1;
  }
  return result;
}
// B4FF93: using guessed type char byte_B4FF93;

//----- (0061ACF0) --------------------------------------------------------
GUILD_EMBLEM_INFO *__thiscall CharScreenBoardUserChar::MakeEmblemInfo(CharScreenBoardUserChar *this)
{
  GUILD_EMBLEM_INFO *result; // eax@1

  result = (GUILD_EMBLEM_INFO *)CharMgr::GetChar(&g_kCharMgr, this->m_kCharHandle);
  if ( result )
    result = GuildTask::GetEmblemInfo(*(_DWORD *)&result[340].nPTFileNo);
  return result;
}

//----- (0061AD20) --------------------------------------------------------
void __thiscall CharScreenBoardUserChar::SetAlpha(CharScreenBoardUserChar *this, float fAlpha)
{
  CharScreenBoardUserChar *v2; // esi@1
  ScreenBoardGeometry *v3; // ecx@1
  ScreenBoardGeometry *v4; // ecx@3
  ScreenBoardGeometry *v5; // ecx@5
  GuildEmblemIcon *v6; // ecx@7

  v2 = this;
  v3 = this->m_spNameBoard.m_pObject;
  if ( v3 )
    ScreenBoardGeometry::SetAlpha(v3, fAlpha);
  v4 = v2->m_spGuildBoard.m_pObject;
  if ( v4 )
    ScreenBoardGeometry::SetAlpha(v4, fAlpha);
  v5 = v2->m_spNickNameBoard.m_pObject;
  if ( v5 )
    ScreenBoardGeometry::SetAlpha(v5, fAlpha);
  v6 = v2->m_spEmblemIcon.m_pObject;
  if ( v6 )
    GuildEmblemIcon::SetAlpha(v6, &fAlpha);
}

//----- (0061AD80) --------------------------------------------------------
signed int __thiscall CharScreenBoardUserChar::GetGuildColor(CharScreenBoardUserChar *this)
{
  Char *v1; // eax@1
  Char *v2; // esi@1
  signed int result; // eax@2
  unsigned int v4; // ST00_4@3
  signed int v5; // edi@3
  CClientGuild *v6; // eax@3
  unsigned int v7; // ST00_4@5
  CClientGuild *v8; // eax@5

  v1 = CharMgr::GetChar(&g_kCharMgr, this->m_kCharHandle);
  v2 = v1;
  if ( v1 )
  {
    v4 = v1->m_dwGuildRegNum;
    v5 = 65280;
    v6 = GuildTask::GetGuild();
    if ( CClientGuild::IsAttackableEnemyGuild(v6, v4) )
    {
      v5 = 0xFFFF;
    }
    else
    {
      v7 = v2->m_dwGuildRegNum;
      v8 = GuildTask::GetGuild();
      if ( CClientGuild::IsEnemyGuild(v8, v7) )
        v5 = 255;
    }
    GuildTask::GetGuildName(v2->m_dwGuildRegNum);
    if ( v2->m_GuildAcademyMemberFlag == 1 )
      v5 = 65280;
    result = v5;
  }
  else
  {
    result = 65280;
  }
  return result;
}

//----- (0061AE00) --------------------------------------------------------
void __thiscall CharScreenBoardUserChar::CreateEmblemIcon(CharScreenBoardUserChar *this, tagSIZE BoardSize, GUILD_EMBLEM_INFO *pEmblemInfo)
{
  CharScreenBoardUserChar *v3; // esi@1
  GuildEmblemIcon *v4; // eax@1
  GuildEmblemIcon *v5; // edi@1
  GuildEmblemIcon *v6; // ebx@1
  GuildEmblemIcon *v7; // ecx@8

  v3 = this;
  v4 = GuildEmblemIcon::CreateWin(
         -(signed int)((double)BoardSize.cx * 0.5 + 32.0 + 3.0),
         -(signed int)((double)BoardSize.cy + (double)BoardSize.cy + 3.0),
         0,
         0,
         0,
         0x20u,
         0x20u);
  v5 = v3->m_spEmblemIcon.m_pObject;
  v6 = v4;
  if ( v5 != v4 )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v3->m_spEmblemIcon.m_pObject = v6;
    if ( v6 )
      InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  }
  v7 = v3->m_spEmblemIcon.m_pObject;
  if ( v7 )
  {
    GuildEmblemIcon::SetEmblemIcon(v7, &v3->m_EmblemInfo.nPTFileNo, &v3->m_EmblemInfo.nPTIconNo, 1);
    ((void (__stdcall *)(_DWORD, _DWORD))v3->m_spNodeBoard.m_pObject->vfptr[29].__vecDelDtor)(
      v3->m_spEmblemIcon.m_pObject,
      0);
  }
}

//----- (0061AEC0) --------------------------------------------------------
void __thiscall CharScreenBoardDropItem::SetAlpha(CharScreenBoardDropItem *this, float fAlpha)
{
  ScreenBoardGeometry *v2; // ecx@1

  v2 = this->m_spNameBoard.m_pObject;
  if ( v2 )
    ScreenBoardGeometry::SetAlpha(v2, fAlpha);
}

//----- (0061AEE0) --------------------------------------------------------
void __thiscall CharScreenBoardMiniHouse::SetAlpha(CharScreenBoardMiniHouse *this, float fAlpha)
{
  ScreenBoardGeometry *v2; // ecx@1

  v2 = this->m_spNameBoard.m_pObject;
  if ( v2 )
    ScreenBoardGeometry::SetAlpha(v2, fAlpha);
}

//----- (0061AF00) --------------------------------------------------------
bool __cdecl CharScreenBoardBase::IsInShowRange(NiPoint3 *kPos)
{
  float v1; // ST00_4@1
  float v2; // ST04_4@1
  float v3; // ST08_4@1
  NiPoint3 *kPosa; // [sp+14h] [bp+8h]@1
  NiPoint3 *kPosb; // [sp+14h] [bp+8h]@1

  v1 = pkWorldCamera->m_kLocal.m_Translate.x - kPos->x;
  v2 = pkWorldCamera->m_kLocal.m_Translate.y - kPos->y;
  v3 = pkWorldCamera->m_kLocal.m_Translate.z - kPos->z;
  *(float *)&kPosa = v1 * v1 + v2 * v2 + v3 * v3;
  *(float *)&kPosb = sqrt(*(float *)&kPosa);
  return *(float *)&kPosb <= (double)CharScreenBoardBase::ms_fMaxDistance;
}
// A72D8C: using guessed type float CharScreenBoardBase::ms_fMaxDistance;

//----- (0061AF80) --------------------------------------------------------
void __thiscall CharScreenBoardBase::SetAlphaByDistance(CharScreenBoardBase *this, NiPoint3 *rPos)
{
  CharScreenBoardBase *v2; // esi@1
  float v3; // ST08_4@1
  float v4; // ST0C_4@1
  float v5; // ST10_4@1
  double v6; // st7@1
  double v7; // st6@1
  Char *v8; // eax@2
  double v9; // rt1@8
  float fDistNFa; // [sp+1Ch] [bp+8h]@1
  float fDistNFb; // [sp+1Ch] [bp+8h]@1
  float fDistNF; // [sp+1Ch] [bp+8h]@7
  float fDistNFc; // [sp+1Ch] [bp+8h]@8
  float fDistNFd; // [sp+1Ch] [bp+8h]@8

  v2 = this;
  v3 = pkWorldCamera->m_kLocal.m_Translate.x - rPos->x;
  v4 = pkWorldCamera->m_kLocal.m_Translate.y - rPos->y;
  v5 = pkWorldCamera->m_kLocal.m_Translate.z - rPos->z;
  fDistNFa = v3 * v3 + v4 * v4 + v5 * v5;
  fDistNFb = sqrt(fDistNFa);
  v6 = fDistNFb;
  v7 = CharScreenBoardBase::ms_fTransNear;
  if ( CharScreenBoardBase::ms_fTransNear > (double)fDistNFb )
  {
    v8 = CharMgr::GetChar(&g_kCharMgr, this->m_kCharHandle);
    if ( !v8 || !v8->m_bSS_Hide )
    {
      ((void (__thiscall *)(CharScreenBoardBase *, _DWORD))v2->vfptr->SetAlpha)(v2, 1.0);
      return;
    }
    goto LABEL_6;
  }
  if ( CharScreenBoardBase::ms_fTransFar < v6 )
  {
LABEL_6:
    ((void (__thiscall *)(CharScreenBoardBase *, _DWORD))v2->vfptr->SetAlpha)(v2, 0.0);
    return;
  }
  fDistNF = CharScreenBoardBase::ms_fTransFar - v7;
  if ( 0.0 != fDistNF )
  {
    v9 = fDistNF;
    fDistNFc = v6 - v7;
    fDistNFd = 1.0 - fDistNFc / v9;
    ((void (__thiscall *)(CharScreenBoardBase *, _DWORD))this->vfptr->SetAlpha)(this, LODWORD(fDistNFd));
  }
}
// A72D90: using guessed type float CharScreenBoardBase::ms_fTransNear;
// A72D94: using guessed type float CharScreenBoardBase::ms_fTransFar;

//----- (0061B0A0) --------------------------------------------------------
void __userpurge CharScreenBoardUserChar::Update(CharScreenBoardUserChar *this@<ecx>, int a2@<ebx>, float fTime, NiCamera *pkWorldCamera, PgWinCamera *pkScreenCamera)
{
  CharScreenBoardUserChar *v5; // esi@1
  Char *v6; // eax@1
  Char *v7; // edi@1
  NiPoint3 *v8; // eax@2
  _BYTE v9[12]; // ST00_12@4
  NiPoint3 result; // [sp+10h] [bp-18h]@2
  NiPoint3 kWorldPos; // [sp+1Ch] [bp-Ch]@2

  v5 = this;
  v6 = CharMgr::GetChar(&g_kCharMgr, this->m_kCharHandle);
  v7 = v6;
  if ( v6 )
  {
    v8 = Char::GetHeightPos(v6, a2, &result);
    CharScreenBoardBase::SetAlphaByDistance((CharScreenBoardBase *)&v5->vfptr, v8);
    Char::GetHeightPos(v7, a2, &kWorldPos);
    kWorldPos.z = kWorldPos.z + 3.0;
    CharScreenBoardBase::UpDatePostion((CharScreenBoardBase *)&v5->vfptr, &kWorldPos, pkWorldCamera);
    if ( !v5->m_bNameBDMove )
      NiAVObject::Update((NiAVObject *)&v5->m_spNodeBoard.m_pObject->vfptr, fTime, 1);
    ((void (__thiscall *)(CharScreenBoardUserChar *))v5->vfptr[1].Init)(v5);
    *(float *)v9 = v5->m_k2DOrthoPos.x;
    *(_QWORD *)&v9[4] = *(_QWORD *)&v5->m_k2DOrthoPos.y;
    IConBD::Update(&v5->m_IconBD, *(NiPoint3 *)v9, fTime);
  }
}

//----- (0061B150) --------------------------------------------------------
char __usercall CharScreenBoardUserChar::IsVisible@<al>(int a1@<ebx>, unsigned __int16 kHandle)
{
  Char *v2; // eax@1
  Char *v3; // esi@1
  MobType v5; // eax@21
  NiPoint3 kPos; // [sp+4h] [bp-Ch]@4

  v2 = CharMgr::GetChar(&g_kCharMgr, kHandle);
  v3 = v2;
  if ( !v2 )
    return 0;
  if ( !Char::IsUpdate(v2) )
    return 0;
  if ( v3->m_bCulled == 1 )
    return 0;
  Char::GetHeightPos(v3, a1, &kPos);
  if ( !CharScreenBoardBase::IsInShowRange(&kPos) || v3->m_byMode == 5 )
    return 0;
  if ( (Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1] != v3
    && g_pkMouseOvereMob != v3 )
  {
    if ( Char::IsNPC(v3) )
    {
      if ( !byte_B4FF68 )
        return 0;
    }
    else if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v3->vfptr[1].Affect)(v3) )
    {
      if ( !byte_B4FF69 )
        return 0;
    }
    else if ( g_pkMainChar == v3 )
    {
      if ( !byte_B4FF66 )
        return 0;
    }
    else if ( !byte_B4FF67 )
    {
      return 0;
    }
  }
  if ( !v3->vfptr->IsVisible((AbStateInfectee *)v3) )
    return 0;
  if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v3->vfptr[1].Affect)(v3) )
  {
    v5 = Char::GetMobInfo(v3)->Type;
    if ( v5 == 13 || v5 == 19 || v5 == 27 || v5 == 29 || v5 == 20 || v5 == 24 )
      return 0;
  }
  return 1;
}
// A96A50: using guessed type struct Char *g_pkMouseOvereMob;
// B4FF66: using guessed type char byte_B4FF66;
// B4FF67: using guessed type char byte_B4FF67;
// B4FF68: using guessed type char byte_B4FF68;
// B4FF69: using guessed type char byte_B4FF69;

//----- (0061B270) --------------------------------------------------------
void __thiscall CharScreenBoardDropItem::Update(CharScreenBoardDropItem *this, float fTime, NiCamera *pkWorldCamera, PgWinCamera *pkScreenCamera)
{
  CharScreenBoardDropItem *v4; // esi@1
  DropItem *v5; // eax@1
  DropItem *v6; // edi@1
  NiNode *v7; // eax@2
  float v8; // ecx@2
  double v9; // st7@2
  NiPoint3 kWorldPos; // [sp+10h] [bp-Ch]@2

  v4 = this;
  v5 = DropItemMgr::GetByHandle(&g_kDropItemMgr, this->m_kCharHandle);
  v6 = v5;
  if ( v5 )
  {
    CharScreenBoardBase::SetAlphaByDistance(
      (CharScreenBoardBase *)&v4->vfptr,
      &v5->m_spNode.m_pObject->m_kLocal.m_Translate);
    v7 = v6->m_spNode.m_pObject;
    v8 = v7->m_kLocal.m_Translate.y;
    kWorldPos.x = v7->m_kLocal.m_Translate.x;
    v9 = v7->m_kLocal.m_Translate.z + 12.0;
    kWorldPos.y = v8;
    kWorldPos.z = v9;
    CharScreenBoardBase::UpDatePostion((CharScreenBoardBase *)&v4->vfptr, &kWorldPos, pkWorldCamera);
    if ( !v4->m_bNameBDMove )
      NiAVObject::Update((NiAVObject *)&v4->m_spNodeBoard.m_pObject->vfptr, fTime, 1);
  }
}

//----- (0061B2F0) --------------------------------------------------------
DropItem *__thiscall CharScreenBoardDropItem::GetNameColor(CharScreenBoardDropItem *this)
{
  DropItem *result; // eax@1
  int v2; // esi@2
  int v3; // edi@2
  int v4; // edx@4
  int v5; // eax@5

  result = DropItemMgr::GetByHandle(&g_kDropItemMgr, this->m_kCharHandle);
  if ( result )
  {
    v2 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    v3 = result->m_kItemID;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v3)
      && (unsigned __int16)v3 <= *(_WORD *)(v2 + 200)
      && (v4 = *(_DWORD *)(v2 + 196), *(_DWORD *)(v4 + 4 * v3))
      && (v5 = *(_DWORD *)(v4 + 4 * v3)) != 0 )
    {
      switch ( *(_DWORD *)(v5 + 118) )
      {
        default:
          result = (DropItem *)0xFFFFFF;
          break;
        case 1:
          result = (DropItem *)65280;
          break;
        case 2:
        case 5:
          result = (DropItem *)16695821;
          break;
        case 3:
          result = (DropItem *)58623;
          break;
        case 4:
          result = (DropItem *)15671549;
          break;
        case 6:
          result = (DropItem *)33023;
          break;
        case 7:
          result = (DropItem *)16711935;
          break;
      }
    }
    else
    {
      result = (DropItem *)3339263;
    }
  }
  return result;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0061B3B0) --------------------------------------------------------
bool __cdecl CharScreenBoardDropItem::IsVisible(unsigned __int16 kHandle)
{
  DropItem *v1; // eax@1
  struct DropItem *v2; // esi@1
  bool result; // al@2
  NiNode *v4; // eax@3
  float v5; // ecx@3
  float v6; // edx@3
  float v7; // eax@3
  NiPoint3 kPos; // [sp+4h] [bp-Ch]@3

  v1 = DropItemMgr::GetByHandle(&g_kDropItemMgr, kHandle);
  v2 = v1;
  result = 0;
  if ( v1 )
  {
    v4 = v1->m_spNode.m_pObject;
    v5 = v4->m_kLocal.m_Translate.x;
    v6 = v4->m_kLocal.m_Translate.y;
    v7 = v4->m_kLocal.m_Translate.z;
    kPos.x = v5;
    kPos.y = v6;
    kPos.z = v7;
    if ( CharScreenBoardBase::IsInShowRange(&kPos) && (byte_B4FF6A || g_pkMouseOverDropItem == v2) )
      result = 1;
  }
  return result;
}
// A98118: using guessed type struct DropItem *g_pkMouseOverDropItem;
// B4FF6A: using guessed type char byte_B4FF6A;

//----- (0061B410) --------------------------------------------------------
void __thiscall CharScreenBoardBase::~CharScreenBoardBase(CharScreenBoardBase *this)
{
  CharScreenBoardBase *v1; // esi@1
  NiNode *v2; // eax@1
  NiNode *v3; // edi@2
  NiNode *v4; // esi@7

  v1 = this;
  this->vfptr = (CharScreenBoardBaseVtbl *)&CharScreenBoardBase::`vftable';
  v2 = this->m_spNodeBoard.m_pObject;
  if ( v2 )
  {
    NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v2->m_kChildren);
    v3 = v1->m_spNodeBoard.m_pObject;
    if ( v3 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      v1->m_spNodeBoard.m_pObject = 0;
    }
  }
  v4 = v1->m_spNodeBoard.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
  {
    if ( v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  }
}
// 9B6EDC: using guessed type int (__thiscall *CharScreenBoardBase::`vftable')(void *p, char);

//----- (0061B4C0) --------------------------------------------------------
void __thiscall CharScreenBoardUserChar::~CharScreenBoardUserChar(CharScreenBoardUserChar *this)
{
  CharScreenBoardUserChar *v1; // esi@1
  ScreenBoardGeometry *v2; // edi@1
  ScreenBoardGeometry *v3; // edi@6
  ScreenBoardGeometry *v4; // edi@11
  GuildEmblemIcon *v5; // edi@16
  GuildEmblemIcon *v6; // edi@21
  ScreenBoardGeometry *v7; // edi@25
  ScreenBoardGeometry *v8; // edi@29
  ScreenBoardGeometry *v9; // edi@33

  v1 = this;
  this->vfptr = (CharScreenBoardBaseVtbl *)&CharScreenBoardUserChar::`vftable';
  v2 = this->m_spNameBoard.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spNameBoard.m_pObject = 0;
  }
  v3 = v1->m_spNickNameBoard.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spNickNameBoard.m_pObject = 0;
  }
  v4 = v1->m_spGuildBoard.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spGuildBoard.m_pObject = 0;
  }
  v5 = v1->m_spEmblemIcon.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spEmblemIcon.m_pObject = 0;
  }
  v1->m_EmblemInfo = (GUILD_EMBLEM_INFO)-1;
  IConBD::~IConBD(&v1->m_IconBD);
  v6 = v1->m_spEmblemIcon.m_pObject;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  v7 = v1->m_spGuildBoard.m_pObject;
  if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  v8 = v1->m_spNickNameBoard.m_pObject;
  if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
    v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
  v9 = v1->m_spNameBoard.m_pObject;
  if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
    v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
  CharScreenBoardBase::~CharScreenBoardBase((CharScreenBoardBase *)&v1->vfptr);
}
// 9B6F0C: using guessed type int (__thiscall *CharScreenBoardUserChar::`vftable')(void *p, char);

//----- (0061B660) --------------------------------------------------------
char __usercall CharScreenBoardUserChar::IsAlive@<al>(CharScreenBoardUserChar *this@<ecx>, int a2@<ebx>)
{
  CharScreenBoardUserChar *v2; // esi@1
  char result; // al@2

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[1].__vecDelDtor)() == 1
    || (unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[1].Init)(v2) == 1 )
  {
    result = 0;
  }
  else
  {
    result = CharScreenBoardUserChar::IsVisible(a2, v2->m_kCharHandle);
  }
  return result;
}

//----- (0061B690) --------------------------------------------------------
void __thiscall CharScreenBoardDropItem::~CharScreenBoardDropItem(CharScreenBoardDropItem *this)
{
  CharScreenBoardDropItem *v1; // edi@1
  NiNode *v2; // esi@1
  ScreenBoardGeometry *v3; // esi@6
  ScreenBoardGeometry *v4; // esi@11

  v1 = this;
  this->vfptr = (CharScreenBoardBaseVtbl *)&CharScreenBoardDropItem::`vftable';
  v2 = this->m_spNodeBoard.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spNodeBoard.m_pObject = 0;
  }
  v3 = v1->m_spNameBoard.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spNameBoard.m_pObject = 0;
  }
  v4 = v1->m_spNameBoard.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  CharScreenBoardBase::~CharScreenBoardBase((CharScreenBoardBase *)&v1->vfptr);
}
// 9B6F2C: using guessed type int (__thiscall *CharScreenBoardDropItem::`vftable')(void *p, char);

//----- (0061B770) --------------------------------------------------------
bool __thiscall CharScreenBoardDropItem::IsAlive(CharScreenBoardDropItem *this)
{
  DropItem *v1; // eax@1
  struct DropItem *v2; // esi@1
  bool result; // al@2
  NiNode *v4; // eax@3
  float v5; // ecx@3
  float v6; // edx@3
  float v7; // eax@3
  NiPoint3 kPos; // [sp+4h] [bp-Ch]@3

  v1 = DropItemMgr::GetByHandle(&g_kDropItemMgr, this->m_kCharHandle);
  v2 = v1;
  result = 0;
  if ( v1 )
  {
    v4 = v1->m_spNode.m_pObject;
    v5 = v4->m_kLocal.m_Translate.x;
    v6 = v4->m_kLocal.m_Translate.y;
    v7 = v4->m_kLocal.m_Translate.z;
    kPos.x = v5;
    kPos.y = v6;
    kPos.z = v7;
    if ( CharScreenBoardBase::IsInShowRange(&kPos) && (byte_B4FF6A || g_pkMouseOverDropItem == v2) )
      result = 1;
  }
  return result;
}
// A98118: using guessed type struct DropItem *g_pkMouseOverDropItem;
// B4FF6A: using guessed type char byte_B4FF6A;

//----- (0061B7D0) --------------------------------------------------------
void __thiscall CharScreenBoardMiniHouse::~CharScreenBoardMiniHouse(CharScreenBoardMiniHouse *this)
{
  CharScreenBoardMiniHouse *v1; // edi@1
  ScreenBoardGeometry *v2; // esi@1

  v1 = this;
  this->vfptr = (CharScreenBoardBaseVtbl *)&CharScreenBoardMiniHouse::`vftable';
  v2 = this->m_spNameBoard.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  CharScreenBoardBase::~CharScreenBoardBase((CharScreenBoardBase *)&v1->vfptr);
}
// 9B6F44: using guessed type int (__thiscall *CharScreenBoardMiniHouse::`vftable')(void *p, char);

//----- (0061B850) --------------------------------------------------------
signed int __thiscall CharScreenBoardUserChar::GetNameColor(CharScreenBoardUserChar *this)
{
  Char *v1; // eax@1
  Char *v2; // esi@1
  signed int result; // eax@2
  CMiniHouseMgr *v4; // eax@10
  stMINIHOUSEINFO *v5; // eax@10
  CClientGuild *v6; // eax@13
  MobInfo *v7; // eax@17
  int v8; // eax@19
  signed int v9; // eax@19
  signed int v10; // edi@22
  const char *v11; // eax@22
  Name5 v12; // [sp-14h] [bp-20h]@22
  int v13; // [sp-4h] [bp-10h]@10
  Name5 *v14; // [sp+8h] [bp-4h]@22

  v1 = CharMgr::GetChar(&g_kCharMgr, this->m_kCharHandle);
  v2 = v1;
  if ( !v1 )
    return 16711935;
  if ( v1 == g_pkMainChar )
    return 14286592;
  if ( Char::IsNPC(v1) )
    return 3342335;
  if ( Char::IsResource(v2) )
    return 16417535;
  if ( (unsigned __int8)((int (__thiscall *)(Char *))v2->vfptr[1].Affect)(v2) )
  {
    v13 = v2->m_kHandle;
    CGuildMonster::GetInstance();
    v5 = CGuildMonster::GetGuildEumFromMob(v4, v13);
    if ( v5 && v5 == (stMINIHOUSEINFO *)g_pkMainChar->m_dwGuildRegNum )
      return 0xFFFFFF;
    v6 = GuildTask::GetGuild();
    if ( v6 && v6->m_GttEnemyInfo.uiStatus == 2 && g_pkMainChar->m_dwGuildRegNum != v2->m_dwGuildRegNum )
    {
      result = 255;
    }
    else
    {
      v7 = Char::GetMobInfo(v2);
      if ( v7 && v7->Type == 25 )
        return 3342335;
      v8 = ((int (__thiscall *)(Char *))v2->vfptr[5].Deaffect)(v2);
      v9 = Char::GetLvGapIndex(g_pkMainChar, v8);
      if ( v9 == 5 )
        return 16711935;
      result = LevelGapColor[v9];
    }
  }
  else
  {
    if ( (unsigned __int8)((int (__thiscall *)(Char *))v2->vfptr[20].DeleteAbStateByAbstateIndex)(v2) )
      return 0xFFFFFF;
    v10 = 0xFFFFFF;
    v11 = (const char *)((int (__thiscall *)(Char *))v2->vfptr[2].DeleteAbStateByAbstateIndex)(v2);
    v14 = &v12;
    Name5::Name5(&v12, v11);
    if ( Party::GetMemberInfo(&g_kParty, v12) )
      v10 = 16433206;
    if ( MainChar::GetTargetType((MainChar *)g_pkMainChar, v2) == 3 )
      v10 = 255;
    result = v10;
  }
  return result;
}

//----- (0061B9D0) --------------------------------------------------------
bool __thiscall CharScreenBoardUserChar::ColorCheckChange(CharScreenBoardUserChar *this)
{
  CharScreenBoardUserChar *v1; // esi@1
  bool result; // al@2
  ScreenBoardGeometry *v3; // ecx@3
  ScreenBoardGeometry::BoardInfo *v4; // edi@4
  ScreenBoardGeometry *v5; // ecx@5
  ScreenBoardGeometry *v6; // ecx@7
  ScreenBoardGeometry::BoardInfo *v7; // edi@8

  v1 = this;
  if ( CharMgr::GetChar(&g_kCharMgr, this->m_kCharHandle) )
  {
    v3 = v1->m_spNameBoard.m_pObject;
    result = 1;
    if ( !v3 || (v4 = ScreenBoardGeometry::GetInfo(v3), CharScreenBoardUserChar::GetNameColor(v1) == v4->color) )
    {
      v5 = v1->m_spNickNameBoard.m_pObject;
      if ( !v5 || ScreenBoardGeometry::GetInfo(v5)->color == 0xFFFF )
      {
        v6 = v1->m_spGuildBoard.m_pObject;
        if ( !v6 || (v7 = ScreenBoardGeometry::GetInfo(v6), CharScreenBoardUserChar::GetGuildColor(v1) == v7->color) )
          result = 0;
      }
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0061BA40) --------------------------------------------------------
void __thiscall CharScreenBoardMiniHouse::Update(CharScreenBoardMiniHouse *this, float fTime, NiCamera *pkWorldCamera, PgWinCamera *pkScreenCamera)
{
  CharScreenBoardMiniHouse *v4; // edi@1
  stMINIHOUSEINFO *v5; // esi@2
  NiNode *v6; // eax@3
  float v7; // ecx@3
  float v8; // edx@3
  float v9; // eax@3
  int v10; // eax@3
  double v11; // st7@4
  int kHousePos; // ST14_4@4
  int kHousePos_4; // ST18_4@4
  NiPoint3 kCurPos; // [sp+20h] [bp-14h]@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > > result; // [sp+2Ch] [bp-8h]@1
  unsigned __int16 _Keyval[2]; // [sp+30h] [bp-4h]@1

  v4 = this;
  *(_DWORD *)_Keyval = this->m_kCharHandle;
  std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,long>>,0>>::find(
    &g_kMiniHouseMgr,
    &result,
    _Keyval);
  if ( result._Ptr != (std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *)stru_B5C138._Ptr )
  {
    v5 = result._Ptr->_Myval.second;
    if ( v5 )
    {
      v6 = v5->pkNode;
      v7 = v6->m_kWorld.m_Translate.x;
      v8 = v6->m_kWorld.m_Translate.y;
      v9 = v6->m_kWorld.m_Translate.z;
      kCurPos.x = v7;
      kCurPos.y = v8;
      kCurPos.z = v9;
      CharScreenBoardBase::SetAlphaByDistance((CharScreenBoardBase *)&v4->vfptr, &kCurPos);
      v10 = ((int (__stdcall *)(const char *))v5->pkNode->vfptr[18].__vecDelDtor)("Name");
      if ( v10 )
      {
        v11 = *(float *)(v10 + 148);
        kHousePos = *(_DWORD *)(v10 + 140);
        kHousePos_4 = *(_DWORD *)(v10 + 144);
      }
      else
      {
        v11 = kCurPos.z + 56.0;
      }
      kCurPos.z = v11;
      CharScreenBoardBase::UpDatePostion((CharScreenBoardBase *)&v4->vfptr, &kCurPos, pkWorldCamera);
      if ( !v4->m_bNameBDMove )
        NiAVObject::Update((NiAVObject *)&v4->m_spNodeBoard.m_pObject->vfptr, fTime, 1);
    }
  }
}

//----- (0061BB20) --------------------------------------------------------
bool __cdecl CharScreenBoardMiniHouse::IsVisible(unsigned __int16 kHandle)
{
  stMINIHOUSEINFO *v1; // eax@2
  bool v2; // al@3
  NiNode *v3; // eax@4
  float v4; // ecx@4
  float v5; // edx@4
  float v6; // eax@4
  NiPoint3 kPos; // [sp+0h] [bp-10h]@4
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > > result; // [sp+Ch] [bp-4h]@1

  *(_DWORD *)&kHandle = kHandle;
  std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,long>>,0>>::find(
    &g_kMiniHouseMgr,
    &result,
    &kHandle);
  if ( result._Ptr != (std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *)stru_B5C138._Ptr
    && (v1 = result._Ptr->_Myval.second) != 0 )
  {
    v3 = v1->pkNode;
    v4 = v3->m_kWorld.m_Translate.x;
    v5 = v3->m_kWorld.m_Translate.y;
    v6 = v3->m_kWorld.m_Translate.z;
    kPos.x = v4;
    kPos.y = v5;
    kPos.z = v6;
    v2 = CharScreenBoardBase::IsInShowRange(&kPos) != 0;
  }
  else
  {
    v2 = 0;
  }
  return v2;
}

//----- (0061BB90) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall CharScreenBoardUserChar::MakeGuildName(CharScreenBoardUserChar *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result)
{
  Char *v2; // eax@1
  unsigned int v3; // edi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v4; // eax@2
  char *v5; // eax@3
  unsigned int v6; // esi@3
  NiUnsharedGeometryGroup *v7; // eax@6
  const char *v8; // eax@6

  v2 = CharMgr::GetChar(&g_kCharMgr, this->m_kCharHandle);
  v3 = (unsigned int)v2;
  if ( v2 )
  {
    v5 = GuildTask::GetGuildName(v2->m_dwGuildRegNum);
    v6 = (unsigned int)v5;
    if ( v5 )
    {
      if ( *(_BYTE *)(v3 + 684) == 1 )
      {
        v7 = TextData::Get(0x86A3E3E4);
        v8 = fs("[%s][%s]", v7, v6);
      }
      else
      {
        v8 = fs("[%s]", v5);
      }
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        result,
        v8);
      v4 = result;
    }
    else
    {
      v4 = result;
      result->_Mysize = v6;
      result->_Myres = 15;
      result->_Bx._Buf[0] = 0;
    }
  }
  else
  {
    v4 = result;
    result->_Mysize = v3;
    result->_Myres = 15;
    result->_Bx._Buf[0] = 0;
  }
  return v4;
}

//----- (0061BC40) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__userpurge CharScreenBoardUserChar::MakeCharName@<eax>(CharScreenBoardUserChar *this@<ecx>, int a2@<edi>, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result)
{
  Char *v3; // eax@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v4; // eax@2
  int v5; // ST08_4@4
  NiUnsharedGeometryGroup *v6; // eax@4
  const char *v7; // eax@5
  char buffer[260]; // [sp+Ch] [bp-108h]@4

  v3 = CharMgr::GetChar(&g_kCharMgr, this->m_kCharHandle);
  if ( v3 )
  {
    if ( v3->m_byMode == 4 )
    {
      v5 = ((int (*)(void))v3->vfptr[2].DeleteAbStateByAbstateIndex)();
      v6 = TextData::Get(0x93B1FCE9);
      sprintf(buffer, (const char *)v6, v5);
      result->_Myres = 15;
      result->_Mysize = 0;
      result->_Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(result, buffer, strlen(buffer));
      v4 = result;
    }
    else
    {
      v7 = (const char *)((int (__stdcall *)(int))v3->vfptr[2].DeleteAbStateByAbstateIndex)(a2);
      result->_Myres = 15;
      result->_Mysize = 0;
      result->_Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(result, v7, strlen(v7));
      v4 = result;
    }
  }
  else
  {
    result->_Mysize = 0;
    result->_Myres = 15;
    result->_Bx._Buf[0] = 0;
    v4 = result;
  }
  return v4;
}

//----- (0061BD50) --------------------------------------------------------
char __thiscall CharScreenBoardDropItem::Init(CharScreenBoardDropItem *this, unsigned __int16 kHandle, ScreenBoardTexture *pBoardData)
{
  CharScreenBoardDropItem *v3; // esi@1
  NiNode *v4; // ebx@1
  char result; // al@2
  NiNode *v6; // eax@3
  NiNode *v7; // eax@4
  NiNode *v8; // edi@5
  ScreenBoardGeometry *v9; // eax@12
  ScreenBoardGeometry *v10; // eax@13
  ScreenBoardGeometry *v11; // ebx@13
  ScreenBoardGeometry *v12; // edi@15
  const char *v13; // eax@22
  ScreenBoardGeometry *v14; // ecx@22
  NiRefObjectVtbl **v15; // ebx@22
  NiRefObjectVtbl *v16; // edi@22
  NiScreenElements *v17; // eax@22
  DropItem *pkDropItem; // [sp+18h] [bp-3Ch]@1
  ScreenBoardGeometry::BoardInfo NameInfo; // [sp+1Ch] [bp-38h]@22
  int v20; // [sp+50h] [bp-4h]@3

  v3 = this;
  this->m_kCharHandle = kHandle;
  v4 = 0;
  pkDropItem = DropItemMgr::GetByHandle(&g_kDropItemMgr, kHandle);
  if ( pkDropItem )
  {
    v6 = (NiNode *)operator new(0xE8u);
    v20 = 0;
    if ( v6 )
    {
      NiNode::NiNode(v6, 0);
      v4 = v7;
    }
    v8 = v3->m_spNodeBoard.m_pObject;
    v20 = -1;
    if ( v8 != v4 )
    {
      if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
        v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      v3->m_spNodeBoard.m_pObject = v4;
      if ( v4 )
        InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
    }
    v9 = (ScreenBoardGeometry *)operator new(0x70u);
    v20 = 1;
    if ( v9 )
    {
      ScreenBoardGeometry::ScreenBoardGeometry(v9, pBoardData);
      v11 = v10;
    }
    else
    {
      v11 = 0;
    }
    v12 = v3->m_spNameBoard.m_pObject;
    v20 = -1;
    if ( v12 != v11 )
    {
      if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
        v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
      v3->m_spNameBoard.m_pObject = v11;
      if ( v11 )
        InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
    }
    NameInfo.Name._Myres = 15;
    NameInfo.Name._Mysize = 0;
    NameInfo.Name._Bx._Buf[0] = 0;
    v20 = 2;
    NameInfo.color = (unsigned int)CharScreenBoardDropItem::GetNameColor(v3);
    v13 = DropItem::GetItemName(pkDropItem);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&NameInfo.Name, v13, strlen(v13));
    v14 = v3->m_spNameBoard.m_pObject;
    NameInfo.CorectionPos = NiPoint2::ZERO;
    ScreenBoardGeometry::SetBoardInfo(v14, &NameInfo);
    v15 = &v3->m_spNodeBoard.m_pObject->vfptr;
    v16 = *v15;
    v17 = ScreenBoardGeometry::GetGeometry(v3->m_spNameBoard.m_pObject);
    ((void (__thiscall *)(NiRefObjectVtbl **, NiScreenElements *, _DWORD))v16[29].__vecDelDtor)(v15, v17, 0);
    if ( NameInfo.Name._Myres >= 0x10 )
      operator delete(NameInfo.Name._Bx._Ptr);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// B62540: using guessed type const struct NiPoint2 NiPoint2::ZERO;

//----- (0061BF20) --------------------------------------------------------
char __thiscall CharScreenBoardMiniHouse::Init(CharScreenBoardMiniHouse *this, unsigned __int16 kHandle, ScreenBoardTexture *pBoardData)
{
  CharScreenBoardMiniHouse *v3; // esi@1
  NiNode *v4; // ebx@2
  char result; // al@3
  NiNode *v6; // eax@4
  NiNode *v7; // eax@5
  NiNode *v8; // edi@6
  ScreenBoardGeometry *v9; // eax@13
  ScreenBoardGeometry *v10; // eax@14
  ScreenBoardGeometry *v11; // ebx@14
  ScreenBoardGeometry *v12; // edi@16
  ScreenBoardGeometry *v13; // ecx@23
  NiRefObjectVtbl **v14; // edi@23
  ScreenBoardGeometry *v15; // ecx@23
  NiRefObjectVtbl *v16; // esi@23
  NiScreenElements *v17; // eax@23
  stMINIHOUSEINFO *pstInfo; // [sp+14h] [bp-D8h]@1
  unsigned __int16 _Keyval[2]; // [sp+18h] [bp-D4h]@1
  ScreenBoardGeometry::BoardInfo NameInfo; // [sp+1Ch] [bp-D0h]@23
  char speechText[128]; // [sp+44h] [bp-A8h]@23
  char acName[21]; // [sp+C4h] [bp-28h]@23
  int v23; // [sp+E8h] [bp-4h]@4

  v3 = this;
  this->m_kCharHandle = kHandle;
  *(_DWORD *)_Keyval = kHandle;
  std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,long>>,0>>::find(
    &g_kMiniHouseMgr,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > > *)&pstInfo,
    _Keyval);
  if ( pstInfo != (stMINIHOUSEINFO *)stru_B5C138._Ptr
    && (v4 = 0, (pstInfo = *(stMINIHOUSEINFO **)((char *)&pstInfo->charid.n5_code[0] + 2)) != 0) )
  {
    v6 = (NiNode *)operator new(0xE8u);
    *(_DWORD *)_Keyval = v6;
    v23 = 0;
    if ( v6 )
    {
      NiNode::NiNode(v6, 0);
      v4 = v7;
    }
    v8 = v3->m_spNodeBoard.m_pObject;
    v23 = -1;
    if ( v8 != v4 )
    {
      if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
        v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      v3->m_spNodeBoard.m_pObject = v4;
      if ( v4 )
        InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
    }
    v9 = (ScreenBoardGeometry *)operator new(0x70u);
    *(_DWORD *)_Keyval = v9;
    v23 = 1;
    if ( v9 )
    {
      ScreenBoardGeometry::ScreenBoardGeometry(v9, pBoardData);
      v11 = v10;
    }
    else
    {
      v11 = 0;
    }
    v12 = v3->m_spNameBoard.m_pObject;
    v23 = -1;
    if ( v12 != v11 )
    {
      if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
        v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
      v3->m_spNameBoard.m_pObject = v11;
      if ( v11 )
        InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
    }
    speechText[0] = 0;
    memset(&speechText[1], 0, 0x7Fu);
    *(_QWORD *)acName = *(_QWORD *)&pstInfo->charid.n5_name[0];
    *(_QWORD *)&acName[8] = *(_QWORD *)&pstInfo->charid.n5_code[2];
    *(_DWORD *)&acName[16] = pstInfo->charid.n5_code[4];
    acName[20] = 0;
    sprintf(speechText, "[%s] %s", acName, pstInfo->title);
    NameInfo.Name._Myres = 15;
    NameInfo.Name._Mysize = 0;
    NameInfo.Name._Bx._Buf[0] = 0;
    v23 = 2;
    NameInfo.color = 0xFFFF;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &NameInfo.Name,
      speechText,
      strlen(speechText));
    v13 = v3->m_spNameBoard.m_pObject;
    NameInfo.CorectionPos = NiPoint2::ZERO;
    ScreenBoardGeometry::SetBoardInfo(v13, &NameInfo);
    v14 = &v3->m_spNodeBoard.m_pObject->vfptr;
    v15 = v3->m_spNameBoard.m_pObject;
    v16 = *v14;
    v17 = ScreenBoardGeometry::GetGeometry(v15);
    ((void (__thiscall *)(NiRefObjectVtbl **, NiScreenElements *, _DWORD))v16[29].__vecDelDtor)(v14, v17, 0);
    if ( NameInfo.Name._Myres >= 0x10 )
      operator delete(NameInfo.Name._Bx._Ptr);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// B62540: using guessed type const struct NiPoint2 NiPoint2::ZERO;

//----- (0061C1A0) --------------------------------------------------------
bool __thiscall CharScreenBoardMiniHouse::IsAlive(CharScreenBoardMiniHouse *this)
{
  return CharScreenBoardMiniHouse::IsVisible(this->m_kCharHandle);
}

//----- (0061C1B0) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall CharScreenBoardUserChar::MakeCharTitle(CharScreenBoardUserChar *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result)
{
  Char *v2; // eax@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > NickName; // [sp+14h] [bp-2Ch]@4
  int v5; // [sp+3Ch] [bp-4h]@4

  v2 = CharMgr::GetChar(&g_kCharMgr, this->m_kCharHandle);
  if ( v2 && v2->m_bUseCharTitle )
  {
    NickName._Myres = 15;
    NickName._Mysize = 0;
    NickName._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &NickName,
      v2->m_CharTitleName,
      strlen(v2->m_CharTitleName));
    v5 = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&NickName, " ", 1u);
    result->_Myres = 15;
    result->_Mysize = 0;
    result->_Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(result, &NickName);
    if ( NickName._Myres >= 0x10 )
      operator delete(NickName._Bx._Ptr);
  }
  else
  {
    result->_Myres = 15;
    result->_Mysize = 0;
    result->_Bx._Buf[0] = 0;
  }
  return result;
}

//----- (0061C2A0) --------------------------------------------------------
char __thiscall CharScreenBoardUserChar::CheckNameChange(CharScreenBoardUserChar *this)
{
  CharScreenBoardUserChar *v1; // esi@1
  Char *v2; // eax@1
  ScreenBoardGeometry *v3; // ecx@2
  ScreenBoardGeometry::BoardInfo *v4; // eax@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v5; // edi@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v6; // eax@3
  bool v7; // cf@3
  unsigned int v8; // ecx@3
  bool v9; // bl@5
  ScreenBoardGeometry *v10; // ecx@11
  ScreenBoardGeometry::BoardInfo *v11; // edi@12
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v12; // eax@12
  char v13; // bl@12
  ScreenBoardGeometry *v15; // ecx@19
  ScreenBoardGeometry::BoardInfo *v16; // edi@20
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v17; // eax@20
  char v18; // bl@20
  GUILD_EMBLEM_INFO *v19; // eax@22
  Char *pkChar; // [sp+10h] [bp-4Ch]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v21; // [sp+14h] [bp-48h]@20
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+30h] [bp-2Ch]@3
  int v23; // [sp+58h] [bp-4h]@3

  v1 = this;
  v2 = CharMgr::GetChar(&g_kCharMgr, this->m_kCharHandle);
  pkChar = v2;
  if ( !v2 )
    return 0;
  v3 = v1->m_spNameBoard.m_pObject;
  if ( v3 )
  {
    v4 = ScreenBoardGeometry::GetInfo(v3);
    v5 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v4;
    v6 = CharScreenBoardUserChar::MakeCharName(v1, (int)v4, &result);
    v7 = v6->_Myres < 0x10;
    v8 = v6->_Mysize;
    v23 = 0;
    if ( !v7 )
      v6 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v6->_Bx._Ptr;
    v9 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
           v5,
           0,
           v5->_Mysize,
           v6->_Bx._Buf,
           v8) != 0;
    v23 = -1;
    if ( result._Myres >= 0x10 )
      operator delete(result._Bx._Ptr);
    if ( v9 )
      return 1;
    v2 = pkChar;
  }
  if ( v2->m_bUseCharTitle && v2->m_byMode != 4 )
  {
    v10 = v1->m_spNickNameBoard.m_pObject;
    if ( !v10 )
      return 1;
    v11 = ScreenBoardGeometry::GetInfo(v10);
    v12 = CharScreenBoardUserChar::MakeCharTitle(v1, &result);
    v23 = 1;
    v13 = std::operator!=<char,std::char_traits<char>,std::allocator<char>>(&v11->Name, v12);
    v23 = -1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&result);
    if ( v13 )
      return 1;
    v2 = pkChar;
  }
  else if ( v1->m_spNickNameBoard.m_pObject )
  {
    return 1;
  }
  if ( v2->m_bUserCharacter != 1 || !v2->m_dwGuildRegNum )
  {
    if ( !v1->m_spGuildBoard.m_pObject )
      return 0;
    return 1;
  }
  v15 = v1->m_spGuildBoard.m_pObject;
  if ( !v15 )
    return 1;
  v16 = ScreenBoardGeometry::GetInfo(v15);
  v17 = CharScreenBoardUserChar::MakeGuildName(v1, &v21);
  v23 = 2;
  v18 = std::operator!=<char,std::char_traits<char>,std::allocator<char>>(&v16->Name, v17);
  v23 = -1;
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v21);
  if ( v18 )
    return 1;
  if ( byte_B4FF93 != 1 )
    return 0;
  v19 = CharScreenBoardUserChar::MakeEmblemInfo(v1);
  if ( !v19 )
    return 1;
  if ( v1->m_EmblemInfo.nPTFileNo != v19->nPTFileNo || v1->m_EmblemInfo.nPTIconNo != v19->nPTIconNo )
    return 1;
  return 0;
}
// B4FF93: using guessed type char byte_B4FF93;

//----- (0061C450) --------------------------------------------------------
char __thiscall CharScreenBoardUserChar::Init(CharScreenBoardUserChar *this, unsigned __int16 kHandle, ScreenBoardTexture *pBoardTexture)
{
  CharScreenBoardUserChar *v3; // esi@1
  NiNode *v4; // ebx@1
  NiNode *v5; // eax@2
  NiNode *v6; // eax@3
  NiNode *v7; // edi@4
  ScreenBoardGeometry *v8; // eax@11
  ScreenBoardGeometry *v9; // eax@12
  ScreenBoardGeometry *v10; // ebx@12
  int v11; // edi@14
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v12; // eax@21
  ScreenBoardGeometry *v13; // eax@25
  ScreenBoardTexture *v14; // ebx@25
  NiD3DDefaultShader *v15; // eax@26
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v16; // eax@28
  void *v17; // eax@30
  void *v18; // eax@32
  int v19; // edx@34
  double v20; // st7@34
  int v21; // edx@34
  ScreenBoardGeometry *v22; // ecx@34
  NiRefObjectVtbl **v23; // ebx@34
  NiRefObjectVtbl *v24; // edi@34
  NiScreenElements *v25; // eax@34
  NiRefObjectVtbl **v26; // ebx@36
  NiRefObjectVtbl *v27; // edi@36
  NiScreenElements *v28; // eax@36
  void *v29; // eax@39
  ScreenBoardTexture *v30; // edi@41
  ScreenBoardGeometry *v31; // eax@41
  NiD3DDefaultShader *v32; // eax@42
  signed int v33; // eax@44
  ScreenBoardGeometry *v34; // ecx@44
  NiRefObjectVtbl **v35; // ebx@44
  NiRefObjectVtbl *v36; // edi@44
  NiScreenElements *v37; // eax@44
  GUILD_EMBLEM_INFO *v38; // eax@45
  tagSIZE NickNameSize; // [sp+10h] [bp-9Ch]@34
  tagSIZE NameSize; // [sp+18h] [bp-94h]@32
  Char *pkChar; // [sp+20h] [bp-8Ch]@1
  ScreenBoardTexture *pBoardData; // [sp+24h] [bp-88h]@1
  float v44; // [sp+28h] [bp-84h]@34
  float v45; // [sp+2Ch] [bp-80h]@2
  ScreenBoardGeometry::BoardInfo NameInfo; // [sp+30h] [bp-7Ch]@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strGuildName; // [sp+58h] [bp-54h]@21
  ScreenBoardGeometry::BoardInfo GuildNameInfo; // [sp+74h] [bp-38h]@28
  int v49; // [sp+A8h] [bp-4h]@2

  v3 = this;
  pBoardData = pBoardTexture;
  this->m_kCharHandle = kHandle;
  v4 = 0;
  pkChar = CharMgr::GetChar(&g_kCharMgr, kHandle);
  if ( !pkChar )
    return 0;
  v5 = (NiNode *)operator new(0xE8u);
  v45 = *(float *)&v5;
  v49 = 0;
  if ( v5 )
  {
    NiNode::NiNode(v5, 0);
    v4 = v6;
  }
  v7 = v3->m_spNodeBoard.m_pObject;
  v49 = -1;
  if ( v7 != v4 )
  {
    if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v3->m_spNodeBoard.m_pObject = v4;
    if ( v4 )
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  }
  v8 = (ScreenBoardGeometry *)operator new(0x70u);
  v45 = *(float *)&v8;
  v49 = 1;
  if ( v8 )
  {
    ScreenBoardGeometry::ScreenBoardGeometry(v8, pBoardData);
    v10 = v9;
  }
  else
  {
    v10 = 0;
  }
  v11 = (int)v3->m_spNameBoard.m_pObject;
  v49 = -1;
  if ( (ScreenBoardGeometry *)v11 != v10 )
  {
    if ( v11 && !InterlockedDecrement((volatile LONG *)(v11 + 4)) && v11 )
      (**(void (__thiscall ***)(_DWORD, _DWORD))v11)(v11, 1);
    v3->m_spNameBoard.m_pObject = v10;
    if ( v10 )
      InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
  }
  NameInfo.Name._Myres = 15;
  NameInfo.Name._Mysize = 0;
  NameInfo.Name._Bx._Buf[0] = 0;
  v49 = 2;
  NameInfo.color = CharScreenBoardUserChar::GetNameColor(v3);
  v12 = CharScreenBoardUserChar::MakeCharName(v3, v11, &strGuildName);
  LOBYTE(v49) = 3;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&NameInfo.Name, v12);
  LOBYTE(v49) = 2;
  if ( strGuildName._Myres >= 0x10 )
    operator delete(strGuildName._Bx._Ptr);
  NameInfo.CorectionPos = NiPoint2::ZERO;
  if ( pkChar->m_bUseCharTitle && pkChar->m_byMode != 4 )
  {
    v13 = (ScreenBoardGeometry *)operator new(0x70u);
    v45 = *(float *)&v13;
    v14 = pBoardData;
    LOBYTE(v49) = 4;
    if ( v13 )
      ScreenBoardGeometry::ScreenBoardGeometry(v13, pBoardData);
    else
      v15 = 0;
    LOBYTE(v49) = 2;
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_spNickNameBoard, v15);
    GuildNameInfo.Name._Myres = 15;
    GuildNameInfo.Name._Mysize = 0;
    GuildNameInfo.Name._Bx._Buf[0] = 0;
    LOBYTE(v49) = 5;
    v16 = CharScreenBoardUserChar::MakeCharTitle(v3, &strGuildName);
    LOBYTE(v49) = 6;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&GuildNameInfo.Name, v16);
    LOBYTE(v49) = 5;
    if ( strGuildName._Myres >= 0x10 )
      operator delete(strGuildName._Bx._Ptr);
    v17 = NameInfo.Name._Bx._Ptr;
    GuildNameInfo.color = 0xFFFF;
    if ( NameInfo.Name._Myres < 0x10 )
      v17 = &NameInfo;
    ((void (__thiscall *)(ScreenBoardTexture *, tagSIZE *, void *))pBoardData->vfptr->GetTextRenderSize)(
      pBoardData,
      &NameSize,
      v17);
    v18 = GuildNameInfo.Name._Bx._Ptr;
    if ( GuildNameInfo.Name._Myres < 0x10 )
      v18 = &GuildNameInfo;
    ((void (__thiscall *)(ScreenBoardTexture *, tagSIZE *, void *))v14->vfptr->GetTextRenderSize)(
      v14,
      &NickNameSize,
      v18);
    v19 = NickNameSize.cx / 2 + NameSize.cx / 2;
    NameSize.cx /= 2;
    v20 = (double)(NickNameSize.cx / 2);
    v21 = v19 - NickNameSize.cx / 2;
    NickNameSize.cx /= 2;
    v44 = v20;
    NameInfo.CorectionPos.x = v44;
    v45 = *(float *)&v21;
    NameInfo.CorectionPos.y = 0.0;
    v22 = v3->m_spNickNameBoard.m_pObject;
    v44 = -(double)v21;
    GuildNameInfo.CorectionPos.x = v44;
    v45 = 0.0;
    GuildNameInfo.CorectionPos.y = 0.0;
    ScreenBoardGeometry::SetBoardInfo(v22, &GuildNameInfo);
    v23 = &v3->m_spNodeBoard.m_pObject->vfptr;
    v24 = *v23;
    v25 = ScreenBoardGeometry::GetGeometry(v3->m_spNickNameBoard.m_pObject);
    ((void (__thiscall *)(NiRefObjectVtbl **, NiScreenElements *, _DWORD))v24[29].__vecDelDtor)(v23, v25, 0);
    LOBYTE(v49) = 2;
    if ( GuildNameInfo.Name._Myres >= 0x10 )
      operator delete(GuildNameInfo.Name._Bx._Ptr);
  }
  ScreenBoardGeometry::SetBoardInfo(v3->m_spNameBoard.m_pObject, &NameInfo);
  v26 = &v3->m_spNodeBoard.m_pObject->vfptr;
  v27 = *v26;
  v28 = ScreenBoardGeometry::GetGeometry(v3->m_spNameBoard.m_pObject);
  ((void (__thiscall *)(NiRefObjectVtbl **, NiScreenElements *, _DWORD))v27[29].__vecDelDtor)(v26, v28, 0);
  if ( pkChar->m_bUserCharacter == 1 && pkChar->m_dwGuildRegNum )
  {
    CharScreenBoardUserChar::MakeGuildName(v3, &strGuildName);
    LOBYTE(v49) = 7;
    if ( strGuildName._Mysize )
    {
      v29 = strGuildName._Bx._Ptr;
      if ( strGuildName._Myres < 0x10 )
        v29 = &strGuildName;
      v30 = pBoardData;
      ((void (__thiscall *)(ScreenBoardTexture *, tagSIZE *, void *))pBoardData->vfptr->GetTextRenderSize)(
        pBoardData,
        &NameSize,
        v29);
      v31 = (ScreenBoardGeometry *)operator new(0x70u);
      v45 = *(float *)&v31;
      LOBYTE(v49) = 8;
      if ( v31 )
        ScreenBoardGeometry::ScreenBoardGeometry(v31, v30);
      else
        v32 = 0;
      LOBYTE(v49) = 7;
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_spGuildBoard, v32);
      GuildNameInfo.Name._Myres = 15;
      GuildNameInfo.Name._Mysize = 0;
      GuildNameInfo.Name._Bx._Buf[0] = 0;
      LOBYTE(v49) = 9;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &GuildNameInfo.Name,
        &strGuildName,
        0,
        0xFFFFFFFF);
      v33 = CharScreenBoardUserChar::GetGuildColor(v3);
      v44 = 0.0;
      GuildNameInfo.color = v33;
      GuildNameInfo.CorectionPos.x = 0.0;
      v34 = v3->m_spGuildBoard.m_pObject;
      v45 = -((double)NameSize.cy + 2.0);
      GuildNameInfo.CorectionPos.y = v45;
      ScreenBoardGeometry::SetBoardInfo(v34, &GuildNameInfo);
      v35 = &v3->m_spNodeBoard.m_pObject->vfptr;
      v36 = *v35;
      v37 = ScreenBoardGeometry::GetGeometry(v3->m_spGuildBoard.m_pObject);
      ((void (__thiscall *)(NiRefObjectVtbl **, NiScreenElements *, _DWORD))v36[29].__vecDelDtor)(v35, v37, 0);
      if ( pkChar->m_GuildAcademyMemberFlag != 1 )
      {
        v38 = CharScreenBoardUserChar::MakeEmblemInfo(v3);
        if ( !v38 )
        {
          std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&GuildNameInfo);
          std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&strGuildName);
          std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&NameInfo);
          return 0;
        }
        v3->m_EmblemInfo = *v38;
        if ( byte_B4FF93 == 1 )
          CharScreenBoardUserChar::CreateEmblemIcon(v3, NameSize, v38);
      }
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&GuildNameInfo);
    }
    if ( strGuildName._Myres >= 0x10 )
      operator delete(strGuildName._Bx._Ptr);
  }
  if ( NameInfo.Name._Myres >= 0x10 )
    operator delete(NameInfo.Name._Bx._Ptr);
  return 1;
}
// B4FF93: using guessed type char byte_B4FF93;
// B62540: using guessed type const struct NiPoint2 NiPoint2::ZERO;

//----- (0061C930) --------------------------------------------------------
double __thiscall World::GetDistanceToCamera(World *this, NiPoint3 *kPos)
{
  NiCamera *v2; // eax@1
  float v3; // ST00_4@1
  float v4; // ST04_4@1
  float v5; // ST08_4@1
  NiPoint3 *kPosa; // [sp+14h] [bp+8h]@1
  NiPoint3 *kPosb; // [sp+14h] [bp+8h]@1

  v2 = this->m_spCamera.m_pObject;
  v3 = v2->m_kLocal.m_Translate.x - kPos->x;
  v4 = v2->m_kLocal.m_Translate.y - kPos->y;
  v5 = v2->m_kLocal.m_Translate.z - kPos->z;
  *(float *)&kPosa = v3 * v3 + v4 * v4 + v5 * v5;
  *(float *)&kPosb = sqrt(*(float *)&kPosa);
  return *(float *)&kPosb;
}

//----- (0061C990) --------------------------------------------------------
CharScreenBoardUserChar *__thiscall CharScreenBoardUserChar::`vector deleting destructor'(CharScreenBoardUserChar *this, unsigned int a2)
{
  CharScreenBoardUserChar *v2; // esi@1

  v2 = this;
  CharScreenBoardUserChar::~CharScreenBoardUserChar(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0061C9C0) --------------------------------------------------------
void __thiscall std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>(std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *this)
{
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *v1; // esi@1

  v1 = this;
  if ( this->first._Myres >= 0x10 )
    operator delete(this->first._Bx._Ptr);
  v1->first._Myres = 15;
  v1->first._Mysize = 0;
  v1->first._Bx._Buf[0] = 0;
}

//----- (0061C9F0) --------------------------------------------------------
CharScreenBoardDropItem *__thiscall CharScreenBoardDropItem::`scalar deleting destructor'(CharScreenBoardDropItem *this, unsigned int a2)
{
  CharScreenBoardDropItem *v2; // esi@1

  v2 = this;
  CharScreenBoardDropItem::~CharScreenBoardDropItem(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0061CA20) --------------------------------------------------------
CharScreenBoardMiniHouse *__thiscall CharScreenBoardMiniHouse::`vector deleting destructor'(CharScreenBoardMiniHouse *this, unsigned int a2)
{
  CharScreenBoardMiniHouse *v2; // edi@1
  ScreenBoardGeometry *v3; // esi@1

  v2 = this;
  this->vfptr = (CharScreenBoardBaseVtbl *)&CharScreenBoardMiniHouse::`vftable';
  v3 = this->m_spNameBoard.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  CharScreenBoardBase::~CharScreenBoardBase((CharScreenBoardBase *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B6F44: using guessed type int (__thiscall *CharScreenBoardMiniHouse::`vftable')(void *p, char);

//----- (0061CAB0) --------------------------------------------------------
CharScreenBoardBase *__thiscall CharScreenBoardBase::`scalar deleting destructor'(CharScreenBoardBase *this, unsigned int a2)
{
  CharScreenBoardBase *v2; // esi@1

  v2 = this;
  CharScreenBoardBase::~CharScreenBoardBase(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0061CAE0) --------------------------------------------------------
void __thiscall GuildBD::ReAlloc(GuildBD *this, unsigned int uiSize)
{
  GuildBD *v2; // esi@1
  char *v3; // eax@1

  v2 = this;
  operator delete[](this->m_pcSpeech);
  v3 = (char *)operator new[](uiSize + 1);
  v2->m_uiSpeechLen = uiSize;
  v2->m_pcSpeech = v3;
}

//----- (0061CB10) --------------------------------------------------------
bool __thiscall GuildBD::IsAlive(GuildBD *this, float fTime)
{
  return this->m_bAlive != 0;
}

//----- (0061CB20) --------------------------------------------------------
void __thiscall GuildBD::EndDraw(GuildBD *this)
{
  GuildBD *v1; // esi@1

  v1 = this;
  if ( this->m_lpSurSrc )
    this->m_lpSurSrc->lpVtbl->Release((IUnknown *)this->m_lpSurSrc);
  if ( v1->m_lpSurDest )
    v1->m_lpSurDest->lpVtbl->Release((IUnknown *)v1->m_lpSurDest);
}

//----- (0061CB50) --------------------------------------------------------
void __usercall GuildBD::DrawTextA(GuildBD *this@<ecx>, void **a2@<edi>)
{
  GuildBD *v2; // esi@1
  int v3; // edi@2
  int v4; // ebx@3
  GuildBD::EnemyStatus v5; // eax@4
  int v6; // eax@5
  int iTextXPos; // [sp+4h] [bp-Ch]@2
  unsigned int i; // [sp+8h] [bp-8h]@2
  HDC__ *hDC; // [sp+Ch] [bp-4h]@2

  v2 = this;
  if ( this->m_lpSurSrc )
  {
    this->m_lpSurSrc->lpVtbl[5].QueryInterface((IUnknown *)this->m_lpSurSrc, (_GUID *const )&hDC, a2);
    SetBkMode(hDC, 1);
    SetTextColor(hDC, v2->m_kColorRef);
    SelectObject(hDC, GuildBD::ms_hFont);
    v3 = v2->m_iTextYPos;
    iTextXPos = v2->m_iTextXPos;
    i = 0;
    if ( v2->m_uiTotalLine )
    {
      v4 = (int)v2->m_apcLineText;
      while ( 1 )
      {
        v5 = v2->m_eEnemyStatus;
        if ( v5 == ES_NOENEMY )
          break;
        v6 = v5 - 1;
        if ( v6 )
        {
          if ( v6 != 1 )
            break;
          SetTextColor(hDC, 0xFFu);
        }
        else
        {
          SetTextColor(hDC, 0xFFFFu);
        }
LABEL_10:
        TextOutA(hDC, iTextXPos, v3, *(LPCSTR *)v4, *(_DWORD *)(v4 + 4));
        v3 += v2->m_uiLineHeight + 1;
        v4 += 4;
        if ( ++i >= v2->m_uiTotalLine )
          goto LABEL_11;
      }
      SetTextColor(hDC, 0xFF00u);
      goto LABEL_10;
    }
LABEL_11:
    v2->m_lpSurSrc->lpVtbl[5].AddRef((IUnknown *)v2->m_lpSurSrc);
  }
}

//----- (0061CC30) --------------------------------------------------------
void __thiscall GuildBD::SetChar(GuildBD *this, unsigned __int16 kHandle)
{
  this->m_kCharHandle = kHandle;
}

//----- (0061CC40) --------------------------------------------------------
void __thiscall GuildBD::SetGuildBDMove(GuildBD *this, bool b)
{
  this->m_bGuildBDMove = b;
}

//----- (0061CC50) --------------------------------------------------------
void __usercall CalculateStrlenInWidth(char *pcText@<eax>, unsigned int *dwStrLen@<ebx>, unsigned int *dwWidth@<esi>, HDC__ *hDC, unsigned int dwMaxWidth)
{
  char *v5; // edi@1
  char v6; // al@2
  int v7; // eax@4
  tagSIZE kSize; // [sp+4h] [bp-8h]@4

  v5 = pcText;
  *dwStrLen = 0;
  *dwWidth = 0;
  if ( pcText )
  {
    v6 = *pcText;
    if ( v6 )
    {
      do
      {
        if ( IsDBCSLeadByte(v6) )
        {
          GetTextExtentPoint32A(hDC, v5, 2, &kSize);
          v7 = kSize.cx;
          if ( kSize.cx + *dwWidth > dwMaxWidth )
            return;
          v5 += 2;
          *dwStrLen += 2;
        }
        else
        {
          GetTextExtentPoint32A(hDC, v5, 1, &kSize);
          v7 = kSize.cx;
          if ( kSize.cx + *dwWidth > dwMaxWidth )
            return;
          ++v5;
          ++*dwStrLen;
        }
        *dwWidth += v7;
        v6 = *v5;
      }
      while ( *v5 );
    }
  }
}

//----- (0061CCD0) --------------------------------------------------------
bool __thiscall GuildBD::BeginDraw(GuildBD *this)
{
  GuildBD *v1; // edi@1
  NiTexture::RendererData *v2; // ecx@1
  bool result; // al@2
  int v4; // eax@3
  int v5; // ecx@5
  int v6; // eax@6

  v1 = this;
  v2 = this->m_pkTexture->m_pkRendererData;
  if ( v2 && (v4 = ((int (*)(void))v2->vfptr[1].GetWidth)()) != 0 )
  {
    (*(void (__stdcall **)(int, _DWORD, IDirect3DSurface9 **))(*(_DWORD *)v4 + 72))(v4, 0, &v1->m_lpSurDest);
    if ( v1->m_lpSurDest
      && (v5 = *(_DWORD *)(GuildBD::ms_spTempTexture + 40)) != 0
      && (v6 = (*(int (**)(void))(*(_DWORD *)v5 + 20))()) != 0 )
    {
      (*(void (__stdcall **)(int, _DWORD, IDirect3DSurface9 **))(*(_DWORD *)v6 + 72))(v6, 0, &v1->m_lpSurSrc);
      result = v1->m_lpSurSrc != 0;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A96834: using guessed type int GuildBD::ms_spTempTexture;

//----- (0061CD40) --------------------------------------------------------
void __thiscall GuildBD::CalculateLine(GuildBD *this)
{
  GuildBD *v1; // edi@1
  IDirect3DSurface9 *v2; // eax@1
  char *v3; // eax@3
  HDC__ *v4; // ST08_4@3
  unsigned int v5; // eax@6
  unsigned int v6; // esi@7
  unsigned int v7; // eax@7
  int v8; // edx@7
  void **v9; // [sp+0h] [bp-3Ch]@0
  tagSIZE kSize; // [sp+8h] [bp-34h]@2
  unsigned int dwTextWidth; // [sp+10h] [bp-2Ch]@3
  unsigned int dwStrLen; // [sp+14h] [bp-28h]@3
  unsigned int i; // [sp+18h] [bp-24h]@2
  unsigned int *v14; // [sp+1Ch] [bp-20h]@2
  char *pcText; // [sp+20h] [bp-1Ch]@2
  HDC__ *hDC; // [sp+24h] [bp-18h]@2
  tagRECT kRect; // [sp+28h] [bp-14h]@2

  v1 = this;
  v2 = this->m_lpSurSrc;
  if ( v2 )
  {
    this->m_uiTotalLine = 0;
    this->m_uiTextWidth = 0;
    this->m_uiTextHeight = 0;
    this->m_uiLineHeight = 0;
    v2->lpVtbl[5].QueryInterface((IUnknown *)v2, (_GUID *const )&hDC, v9);
    SetRect(&kRect, 0, 0, 209, 22);
    FillRect(hDC, &kRect, GuildBD::ms_hEraseBrush);
    SelectObject(hDC, GuildBD::ms_hFont);
    pcText = v1->m_pcSpeech;
    GetTextExtentPoint32A(hDC, "W", 1, &kSize);
    v1->m_uiLineHeight = kSize.cy;
    i = 0;
    v14 = v1->m_auiLineStrLen;
    do
    {
      v3 = pcText;
      v4 = hDC;
      *(v14 - 1) = (unsigned int)pcText;
      CalculateStrlenInWidth(v3, &dwStrLen, &dwTextWidth, v4, 0xC8u);
      if ( !dwStrLen )
        break;
      pcText += dwStrLen;
      *v14 = dwStrLen;
      if ( v1->m_uiTextWidth < dwTextWidth )
        v1->m_uiTextWidth = dwTextWidth;
      v5 = i;
      ++v1->m_uiTotalLine;
      ++v14;
      i = v5 + 1;
    }
    while ( v5 + 1 < 1 );
    v6 = v1->m_uiTextWidth;
    v7 = (209 - v6) >> 1;
    v8 = v1->m_uiTotalLine * (v1->m_uiLineHeight + 1) - 1;
    v1->m_iTextXPos = v7;
    v1->m_iTextYPos = 16 - v8;
    v1->m_kTextRect.left = v7 - 1;
    v1->m_kTextRect.right = v6 + v7;
    v1->m_kTextRect.bottom = 16;
    v1->m_uiTextHeight = v8;
    v1->m_kTextRect.top = 16 - v8 - 1;
    v1->m_lpSurSrc->lpVtbl[5].AddRef((IUnknown *)v1->m_lpSurSrc);
  }
}
// 61CD40: could not find valid save-restore pair for ebx

//----- (0061CE90) --------------------------------------------------------
void __thiscall GuildBD::CopyTexture(GuildBD *this)
{
  GuildBD *v1; // esi@1
  IDirect3DSurface9 *v2; // eax@3
  unsigned int v3; // ebx@3
  int v4; // ecx@4
  IDirect3DSurface9 *v5; // eax@4
  char *v6; // edx@5
  int v7; // edi@7
  char *v8; // esi@7
  bool v9; // zf@7
  unsigned int v10; // eax@8
  signed int v11; // ebx@9
  signed int v12; // esi@10
  char *v13; // ecx@11
  int v14; // eax@11
  char *v15; // ecx@15
  unsigned int uiSrcSkipBytes; // [sp+Ch] [bp-38h]@5
  unsigned int uiDestSkipBytes; // [sp+10h] [bp-34h]@5
  _D3DLOCKED_RECT kLockRectSrc; // [sp+14h] [bp-30h]@3
  char *pSrcBytes; // [sp+1Ch] [bp-28h]@5
  _D3DLOCKED_RECT kLockRectDest; // [sp+20h] [bp-24h]@4
  GuildBD *v21; // [sp+28h] [bp-1Ch]@1
  char *pTempDest; // [sp+2Ch] [bp-18h]@5
  tagRECT rc; // [sp+30h] [bp-14h]@3

  v1 = this;
  v21 = this;
  if ( this->m_lpSurSrc )
  {
    if ( this->m_lpSurDest )
    {
      v2 = this->m_lpSurSrc;
      v3 = 22;
      rc.left = 0;
      rc.top = 0;
      rc.right = 209;
      rc.bottom = 22;
      if ( !((int (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v2->lpVtbl[4].AddRef)(v2, &kLockRectSrc, &rc, 0) )
      {
        v4 = v1->m_uiTextureYPos;
        rc.left = v1->m_uiTextureXPos;
        rc.top = v4;
        rc.right = rc.left + 209;
        v5 = v1->m_lpSurDest;
        rc.bottom = v4 + 22;
        if ( !((int (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v5->lpVtbl[4].AddRef)(v5, &kLockRectDest, &rc, 0) )
        {
          v6 = (char *)kLockRectDest.pBits;
          pSrcBytes = (char *)kLockRectSrc.pBits;
          uiDestSkipBytes = kLockRectDest.Pitch - 836;
          uiSrcSkipBytes = kLockRectSrc.Pitch - 836;
          pTempDest = (char *)kLockRectDest.pBits;
          do
          {
            memset(pTempDest, 0, 0x344u);
            pTempDest += kLockRectDest.Pitch;
            --v3;
          }
          while ( v3 );
          v7 = (int)v21;
          v8 = &v6[4 * v1->m_kTextRect.left - 12] + kLockRectDest.Pitch * (v1->m_kTextRect.top - 1);
          v9 = v21->m_uiTextHeight == -4;
          pTempDest = v8;
          if ( !v9 )
          {
            do
            {
              memset32(pTempDest, 2147483648, *(_DWORD *)(v7 + 72) + 8);
              v8 += kLockRectDest.Pitch;
              ++v3;
              v10 = v21->m_uiTextHeight + 4;
              pTempDest = v8;
              v7 = (int)v21;
            }
            while ( v3 < v10 );
          }
          v11 = 22;
          do
          {
            v12 = 209;
            do
            {
              v13 = pSrcBytes;
              v14 = *(_DWORD *)pSrcBytes & 0xFFFFFF;
              if ( v14 == 16712191 )
              {
                v6[3] = -128;
              }
              else if ( v14 != 16711935 )
              {
                *(_DWORD *)v6 = v14;
                v6[3] = -1;
              }
              v15 = v13 + 4;
              v6 += 4;
              --v12;
              pSrcBytes = v15;
            }
            while ( v12 );
            v6 += uiDestSkipBytes;
            --v11;
            pSrcBytes = &v15[uiSrcSkipBytes];
          }
          while ( v11 );
          (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v7 + 56) + 56))(*(_DWORD *)(v7 + 56));
          (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v7 + 52) + 56))(*(_DWORD *)(v7 + 52));
        }
      }
    }
  }
}

//----- (0061D030) --------------------------------------------------------
bool __cdecl GuildBD::IsInShowRange(NiPoint3 *kPos)
{
  float v1; // ST00_4@1
  float v2; // ST04_4@1
  float v3; // ST08_4@1
  NiPoint3 *kPosa; // [sp+14h] [bp+8h]@1
  NiPoint3 *kPosb; // [sp+14h] [bp+8h]@1

  v1 = pkWorldCamera->m_kLocal.m_Translate.x - kPos->x;
  v2 = pkWorldCamera->m_kLocal.m_Translate.y - kPos->y;
  v3 = pkWorldCamera->m_kLocal.m_Translate.z - kPos->z;
  *(float *)&kPosa = v1 * v1 + v2 * v2 + v3 * v3;
  *(float *)&kPosb = sqrt(*(float *)&kPosa);
  return *(float *)&kPosb <= (double)GuildBD::ms_fMaxDistance;
}
// A72E4C: using guessed type float GuildBD::ms_fMaxDistance;

//----- (0061D0B0) --------------------------------------------------------
void __thiscall GuildBD::~GuildBD(GuildBD *this)
{
  GuildBD *v1; // esi@1
  NiNode *v2; // edi@1
  NiScreenElements *v3; // edi@6
  NiNode *v4; // edi@11
  NiScreenElements *v5; // esi@15

  v1 = this;
  this->vfptr = (GuildBDVtbl *)&GuildBD::`vftable';
  v2 = this->m_spNode.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spNode.m_pObject = 0;
  }
  v3 = v1->m_spScreenGeom.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spScreenGeom.m_pObject = 0;
  }
  operator delete[](v1->m_pcSpeech);
  v4 = v1->m_spNode.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v5 = v1->m_spScreenGeom.m_pObject;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
  {
    if ( v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  }
}
// 9B6F7C: using guessed type int (__thiscall *GuildBD::`vftable')(void *p, char);

//----- (0061D1B0) --------------------------------------------------------
void __thiscall GuildBD::SetSpeech(GuildBD *this, char *pcSpeech, GuildBD::EnemyStatus eEnemyStatus)
{
  GuildBD *v3; // esi@1
  char *v4; // ecx@3
  char v5; // bl@3
  unsigned int v6; // eax@8
  char *v7; // edx@10
  char *v8; // ecx@10
  char v9; // al@11
  char *v10; // eax@15

  v3 = this;
  if ( pcSpeech && *pcSpeech )
  {
    this->m_spNode.m_pObject->m_uFlags &= 0xFFFEu;
    v4 = this->m_pcSpeech;
    v5 = 0;
    if ( !v4 || strcmp(pcSpeech, v4) )
      v5 = 1;
    if ( v3->m_eEnemyStatus != eEnemyStatus || v5 )
    {
      v3->m_eEnemyStatus = eEnemyStatus;
      v6 = strlen(pcSpeech);
      if ( v3->m_uiSpeechLen < v6 )
        GuildBD::ReAlloc(v3, v6);
      v7 = v3->m_pcSpeech;
      v8 = pcSpeech;
      do
      {
        v9 = *v8;
        *v7++ = *v8++;
      }
      while ( v9 );
      if ( GuildBD::BeginDraw(v3) )
      {
        GuildBD::CalculateLine(v3);
        GuildBD::DrawTextA(v3, (void **)pcSpeech);
        GuildBD::CopyTexture(v3);
        GuildBD::EndDraw(v3);
      }
    }
  }
  else
  {
    v10 = this->m_pcSpeech;
    if ( v10 )
    {
      *v10 = 0;
      this->m_uiTotalLine = 0;
    }
    this->m_spNode.m_pObject->m_uFlags |= 1u;
  }
}

//----- (0061D2A0) --------------------------------------------------------
void __thiscall GuildBD::Update(GuildBD *this, float fTime, NiCamera *pkWorldCamera, PgWinCamera *pkScreenCamera)
{
  GuildBD *v4; // esi@1
  Char *v5; // eax@1
  Char *v6; // ebx@1
  NiPoint3 *v7; // eax@4
  double v8; // st7@4
  double v9; // st6@7
  NiProperty *v10; // eax@8
  NiProperty *v11; // eax@10
  double v12; // rt0@12
  _BYTE v13[12]; // ST0C_12@13
  float fScreenHeight; // ST08_4@13
  float fScreenWidth; // ST04_4@13
  float fAlpha; // ST18_4@14
  CClientGuild *v17; // eax@14
  float v18; // ST18_4@16
  CClientGuild *v19; // eax@16
  char *v20; // eax@18
  char *v21; // edi@18
  NiUnsharedGeometryGroup *v22; // eax@20
  char *v23; // eax@20
  char *v24; // eax@21
  char *v25; // eax@22
  NiScreenElements *v26; // eax@27
  bool v27; // zf@27
  float v28; // ecx@27
  float v29; // edx@27
  NiPoint3 kWorldPos; // [sp+24h] [bp-1Ch]@13
  NiPoint3 k2DOrthoPos; // [sp+30h] [bp-10h]@13
  float fDistNF; // [sp+3Ch] [bp-4h]@4
  GuildBD::EnemyStatus eStatus; // [sp+4Ch] [bp+Ch]@14

  v4 = this;
  v5 = CharMgr::GetChar(&g_kCharMgr, this->m_kCharHandle);
  v6 = v5;
  if ( !v5 )
    goto LABEL_31;
  if ( v5->m_byMode == 5 )
  {
LABEL_3:
    v4->m_spScreenGeom.m_pObject->m_uFlags |= 1u;
    return;
  }
  v7 = (NiPoint3 *)((int (__thiscall *)(Char *))v5->vfptr[6].Deaffect)(v5);
  fDistNF = World::GetDistanceToCamera(&g_kWorld, v7);
  v8 = fDistNF;
  if ( fDistNF <= (double)GuildBD::ms_fMaxDistance && v6->m_dwGuildRegNum )
  {
    v9 = GuildBD::ms_fTransNear;
    if ( GuildBD::ms_fTransNear <= v8 )
    {
      if ( GuildBD::ms_fTransFar >= v8 )
      {
        fDistNF = GuildBD::ms_fTransFar - v9;
        if ( 0.0 != fDistNF )
        {
          v12 = fDistNF;
          fDistNF = v8 - v9;
          fDistNF = 1.0 - fDistNF / v12;
          GuildBD::SetAlpha(v4, fDistNF);
        }
      }
      else
      {
        v11 = NiAVObject::GetProperty((NiAVObject *)&v4->m_spScreenGeom.m_pObject->vfptr, 3);
        ++v11[3].m_uiRefCount;
        *(float *)&v11[3].vfptr = 0.0;
      }
    }
    else
    {
      v10 = NiAVObject::GetProperty((NiAVObject *)&v4->m_spScreenGeom.m_pObject->vfptr, 3);
      ++v10[3].m_uiRefCount;
      *(float *)&v10[3].vfptr = 1.0;
    }
    Char::GetHeightPos(v6, (int)v6, &kWorldPos);
    kWorldPos.z = kWorldPos.z + 3.0;
    *(float *)v13 = kWorldPos.x;
    *(_QWORD *)&v13[4] = *(_QWORD *)&kWorldPos.y;
    fScreenHeight = (double)PgWin::ms_uiScreenHeight;
    fScreenWidth = (double)PgWin::ms_uiScreenWidth;
    if ( !PgUtil::Get2DOrthoPosFrom3DPos(pkWorldCamera, fScreenWidth, fScreenHeight, *(NiPoint3 *)v13, &k2DOrthoPos) )
      goto LABEL_3;
    fAlpha = *(float *)&v6->m_dwGuildRegNum;
    eStatus = 0;
    v17 = GuildTask::GetGuild();
    if ( CClientGuild::IsAttackableEnemyGuild(v17, LODWORD(fAlpha)) )
    {
      eStatus = 2;
    }
    else
    {
      v18 = *(float *)&v6->m_dwGuildRegNum;
      v19 = GuildTask::GetGuild();
      if ( CClientGuild::IsEnemyGuild(v19, LODWORD(v18)) )
        eStatus = 1;
    }
    v20 = GuildTask::GetGuildName(v6->m_dwGuildRegNum);
    v21 = v20;
    if ( v20 )
    {
      if ( v6->m_GuildAcademyMemberFlag == 1 )
      {
        v22 = TextData::Get(0x86A3E3E4);
        v23 = fs("[%s][%s]", v22, v21);
        GuildBD::SetSpeech(v4, v23, 0);
      }
      else
      {
        v24 = fs("[%s]", v20);
        GuildBD::SetSpeech(v4, v24, eStatus);
      }
    }
    else
    {
      v25 = v4->m_pcSpeech;
      if ( v25 )
      {
        *v25 = 0;
        v4->m_uiTotalLine = 0;
      }
      v4->m_spNode.m_pObject->m_uFlags |= 1u;
    }
    v4->m_spScreenGeom.m_pObject->m_uFlags &= 0xFFFEu;
    k2DOrthoPos.x = k2DOrthoPos.x - 104.0;
    k2DOrthoPos.y = k2DOrthoPos.y - 22.0;
    if ( v6 == g_pkMainChar )
      k2DOrthoPos.y = k2DOrthoPos.y - 8.0;
    v26 = v4->m_spScreenGeom.m_pObject;
    k2DOrthoPos.y = k2DOrthoPos.y - 17.0;
    v26->m_kLocal.m_Translate = k2DOrthoPos;
    v27 = v4->m_bGuildBDMove == 0;
    v28 = k2DOrthoPos.y;
    v29 = k2DOrthoPos.z;
    v4->m_k2DOrthoPos.x = k2DOrthoPos.x;
    v4->m_k2DOrthoPos.y = v28;
    v4->m_k2DOrthoPos.z = v29;
    if ( v27 )
      NiAVObject::Update((NiAVObject *)&v4->m_spScreenGeom.m_pObject->vfptr, fTime, 1);
  }
  else
  {
LABEL_31:
    v4->m_bAlive = 0;
  }
}
// A72E4C: using guessed type float GuildBD::ms_fMaxDistance;
// A72E50: using guessed type float GuildBD::ms_fTransNear;
// A72E54: using guessed type float GuildBD::ms_fTransFar;

//----- (0061D580) --------------------------------------------------------
void __thiscall GuildBD::CreateGeometry(GuildBD *this, NiTexture *pkTexture, int iTexturePosIndex)
{
  GuildBD *v3; // esi@1
  NiTexture *v4; // ebx@1
  unsigned int v5; // edi@1
  unsigned int v6; // eax@1
  unsigned int v7; // ecx@1
  NiTexture *v8; // ST0C_4@1
  NiScreenElementsData *v9; // edi@1
  NiTexture *v10; // eax@1
  NiTexture *v11; // eax@2
  NiTexture *v12; // edi@4
  NiTexture *v13; // eax@12
  NiTexture *v14; // eax@13
  NiTexture *v15; // edi@15
  NiTexture *v16; // eax@23
  int v17; // eax@24
  int v18; // edi@24
  NiTexture *v19; // eax@28
  int v20; // eax@29
  int v21; // edi@29

  v3 = this;
  v4 = pkTexture;
  v5 = ((int (__thiscall *)(NiTexture *))pkTexture->vfptr[15].__vecDelDtor)(pkTexture);
  pkTexture = (NiTexture *)((int (__thiscall *)(NiTexture *))v4->vfptr[16].__vecDelDtor)(v4);
  v6 = 22 * (iTexturePosIndex / (v5 / 0xD1));
  v7 = 209 * (iTexturePosIndex % (v5 / 0xD1));
  v3->m_uiTextureYPos = v6;
  v8 = pkTexture;
  v3->m_uiTextureXPos = v7;
  v9 = PgUtil::CreateScreenGeometryData(v5, (unsigned int)v8, v7, v6, 0xD0u, 0x15u);
  v3->m_pkTexture = v4;
  v10 = (NiTexture *)operator new(0xC4u);
  pkTexture = v10;
  if ( v10 )
  {
    NiScreenElements::NiScreenElements((NiScreenElements *)v10, v9);
    pkTexture = v11;
  }
  else
  {
    pkTexture = 0;
    v11 = 0;
  }
  v12 = (NiTexture *)v3->m_spScreenGeom.m_pObject;
  if ( v12 != v11 )
  {
    if ( v12 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
        v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
      v11 = pkTexture;
    }
    v3->m_spScreenGeom.m_pObject = (NiScreenElements *)v11;
    if ( v11 )
      InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
  }
  v13 = (NiTexture *)operator new(0xE8u);
  pkTexture = v13;
  if ( v13 )
  {
    NiNode::NiNode((NiNode *)v13, 0);
    pkTexture = v14;
  }
  else
  {
    pkTexture = 0;
    v14 = 0;
  }
  v15 = (NiTexture *)v3->m_spNode.m_pObject;
  if ( v15 != v14 )
  {
    if ( v15 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) && v15 )
        v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
      v14 = pkTexture;
    }
    v3->m_spNode.m_pObject = (NiNode *)v14;
    if ( v14 )
      InterlockedIncrement((volatile LONG *)&v14->m_uiRefCount);
  }
  ((void (__stdcall *)(NiScreenElements *, _DWORD))v3->m_spNode.m_pObject->vfptr[29].__vecDelDtor)(
    v3->m_spScreenGeom.m_pObject,
    0);
  v16 = (NiTexture *)operator new(0x44u);
  pkTexture = v16;
  if ( v16 )
  {
    NiTexturingProperty::NiTexturingProperty((NiTexturingProperty *)v16);
    v18 = v17;
  }
  else
  {
    v18 = 0;
  }
  NiTexturingProperty::SetBaseTexture((NiTexturingProperty *)v18, v4);
  NiTexturingProperty::SetBaseFilterMode((NiTexturingProperty *)v18, 0);
  *(_DWORD *)(v18 + 28) = 2;
  NiTexturingProperty::SetBaseClampMode((NiTexturingProperty *)v18, 0);
  iTexturePosIndex = (int)v3->m_spScreenGeom.m_pObject;
  pkTexture = (NiTexture *)v18;
  InterlockedIncrement((volatile LONG *)(v18 + 4));
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(iTexturePosIndex + 156),
    (NiPointer<NiRoom> *)&pkTexture);
  if ( !InterlockedDecrement((volatile LONG *)(v18 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v18)(v18, 1);
  v19 = (NiTexture *)operator new(0x60u);
  pkTexture = v19;
  if ( v19 )
  {
    NiMaterialProperty::NiMaterialProperty((NiMaterialProperty *)v19);
    v21 = v20;
  }
  else
  {
    v21 = 0;
  }
  ++*(_DWORD *)(v21 + 88);
  *(float *)(v21 + 68) = 1.0;
  *(float *)(v21 + 72) = 1.0;
  *(float *)(v21 + 76) = 1.0;
  iTexturePosIndex = (int)v3->m_spScreenGeom.m_pObject;
  pkTexture = (NiTexture *)v21;
  InterlockedIncrement((volatile LONG *)(v21 + 4));
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(iTexturePosIndex + 156),
    (NiPointer<NiRoom> *)&pkTexture);
  if ( !InterlockedDecrement((volatile LONG *)(v21 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v21)(v21, 1);
  NiAVObject::UpdateProperties((NiAVObject *)&v3->m_spScreenGeom.m_pObject->vfptr);
  NiAVObject::Update((NiAVObject *)&v3->m_spScreenGeom.m_pObject->vfptr, 0.0, 0);
  v3->m_spScreenGeom.m_pObject->m_uFlags |= 1u;
}

//----- (0061D850) --------------------------------------------------------
void __thiscall GuildBD::GuildBD(GuildBD *this, NiTexture *pkTexture, int iTexturePosIndex)
{
  GuildBD *v3; // esi@1

  v3 = this;
  this->vfptr = (GuildBDVtbl *)&GuildBD::`vftable';
  this->m_spScreenGeom.m_pObject = 0;
  this->m_spNode.m_pObject = 0;
  this->m_kCharHandle = -1;
  this->m_bAlive = 1;
  this->m_pcSpeech = 0;
  this->m_uiSpeechLen = 0;
  this->m_iTextureIndex = iTexturePosIndex;
  if ( pkTexture )
    GuildBD::CreateGeometry(this, pkTexture, iTexturePosIndex);
  v3->m_kColorRef = 0xFFFFFF;
  v3->m_eEnemyStatus = 0;
  v3->m_bGuildBDMove = 0;
}
// 9B6F7C: using guessed type int (__thiscall *GuildBD::`vftable')(void *p, char);

//----- (0061D8E0) --------------------------------------------------------
void __thiscall GuildBD::SetAlpha(GuildBD *this, float fAlpha)
{
  NiProperty *v2; // eax@1

  v2 = NiAVObject::GetProperty((NiAVObject *)&this->m_spScreenGeom.m_pObject->vfptr, 3);
  ++v2[3].m_uiRefCount;
  *(float *)&v2[3].vfptr = fAlpha;
}

//----- (0061D900) --------------------------------------------------------
GuildBD *__thiscall GuildBD::`vector deleting destructor'(GuildBD *this, unsigned int a2)
{
  GuildBD *v2; // esi@1

  v2 = this;
  GuildBD::~GuildBD(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0061D930) --------------------------------------------------------
void __thiscall IConBD::Create(IConBD *this, const char *pkFileName)
{
  IConBD *v2; // esi@1

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->m_spIconWin.m_pObject->vfptr[64].__vecDelDtor)(1);
  AniIconWin::CreateAniTexture(v2->m_spIconWin.m_pObject, pkFileName);
}

//----- (0061D960) --------------------------------------------------------
NiScreenElements *__thiscall IConBD::GetGeometry(IConBD *this)
{
  AniIconWin *v1; // ecx@1
  NiScreenElements *result; // eax@2

  v1 = this->m_spIconWin.m_pObject;
  if ( v1 )
    result = AniIconWin::GetGeometry(v1);
  else
    result = 0;
  return result;
}

//----- (0061D970) --------------------------------------------------------
void __thiscall IConBD::IConBD(IConBD *this)
{
  IConBD *v1; // esi@1
  AniIconWin *v2; // eax@1
  AniIconWin *v3; // edi@1
  AniIconWin *v4; // ebx@1

  v1 = this;
  this->vfptr = (IConBDVtbl *)&IConBD::`vftable';
  this->m_spIconWin.m_pObject = 0;
  v2 = AniIconWin::CreateWin(0, 0, 16, 16, 0);
  v3 = v1->m_spIconWin.m_pObject;
  v4 = v2;
  if ( v3 != v2 )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spIconWin.m_pObject = v4;
    if ( v4 )
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  }
  ((void (__cdecl *)(_DWORD))v1->m_spIconWin.m_pObject->vfptr[64].__vecDelDtor)(0);
}
// 9B6F9C: using guessed type int (__thiscall *IConBD::`vftable')(void *p, char);

//----- (0061DA20) --------------------------------------------------------
void __thiscall IConBD::~IConBD(IConBD *this)
{
  IConBD *v1; // edi@1
  AniIconWin *v2; // esi@1
  AniIconWin *v3; // edi@6

  v1 = this;
  this->vfptr = (IConBDVtbl *)&IConBD::`vftable';
  v2 = this->m_spIconWin.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spIconWin.m_pObject = 0;
  }
  v3 = v1->m_spIconWin.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
  {
    if ( v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  }
}
// 9B6F9C: using guessed type int (__thiscall *IConBD::`vftable')(void *p, char);

//----- (0061DAC0) --------------------------------------------------------
void __thiscall IConBD::Update(IConBD *this, NiPoint3 WorldPos, float ftime)
{
  AniIconWin *v3; // ecx@1
  NiScreenElements *v4; // eax@2

  v3 = this->m_spIconWin.m_pObject;
  if ( v3 )
  {
    WorldPos.x = WorldPos.x - 16.0;
    v4 = AniIconWin::GetGeometry(v3);
    v4->m_kLocal.m_Translate = WorldPos;
    NiAVObject::Update((NiAVObject *)&v4->vfptr, ftime, 1);
  }
}

//----- (0061DB10) --------------------------------------------------------
IConBD *__thiscall IConBD::`scalar deleting destructor'(IConBD *this, unsigned int a2)
{
  IConBD *v2; // esi@1

  v2 = this;
  IConBD::~IConBD(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0061DB40) --------------------------------------------------------
bool __thiscall NameBD::IsAlive(NameBD *this, float fTime)
{
  return this->m_bAlive != 0;
}

//----- (0061DB50) --------------------------------------------------------
void __thiscall NameBD::EndDraw(NameBD *this)
{
  NameBD *v1; // esi@1

  v1 = this;
  if ( this->m_lpSurSrc )
    this->m_lpSurSrc->lpVtbl->Release((IUnknown *)this->m_lpSurSrc);
  if ( v1->m_lpSurDest )
    v1->m_lpSurDest->lpVtbl->Release((IUnknown *)v1->m_lpSurDest);
}

//----- (0061DB80) --------------------------------------------------------
void __thiscall NameBD::SetNameBDMove(NameBD *this, bool b)
{
  this->m_bNameBDMove = b;
}

//----- (0061DB90) --------------------------------------------------------
void __usercall CalculateStrlenInWidth_0(char *pcText@<eax>, unsigned int *dwStrLen@<ebx>, unsigned int *dwWidth@<esi>, HDC__ *hDC, unsigned int dwMaxWidth)
{
  char *v5; // edi@1
  char v6; // al@2
  int v7; // eax@4
  tagSIZE kSize; // [sp+4h] [bp-8h]@4

  v5 = pcText;
  *dwStrLen = 0;
  *dwWidth = 0;
  if ( pcText )
  {
    v6 = *pcText;
    if ( v6 )
    {
      do
      {
        if ( IsDBCSLeadByte(v6) )
        {
          GetTextExtentPoint32A(hDC, v5, 2, &kSize);
          v7 = kSize.cx;
          if ( kSize.cx + *dwWidth > dwMaxWidth )
            return;
          v5 += 2;
          *dwStrLen += 2;
        }
        else
        {
          GetTextExtentPoint32A(hDC, v5, 1, &kSize);
          v7 = kSize.cx;
          if ( kSize.cx + *dwWidth > dwMaxWidth )
            return;
          ++v5;
          ++*dwStrLen;
        }
        *dwWidth += v7;
        v6 = *v5;
      }
      while ( *v5 );
    }
  }
}

//----- (0061DC10) --------------------------------------------------------
void __thiscall NameBD::~NameBD(NameBD *this)
{
  NameBD *v1; // esi@1
  NiScreenElements *v2; // edi@1
  NiScreenElements *v3; // esi@6

  v1 = this;
  this->vfptr = (NameBDVtbl *)&NameBD::`vftable';
  v2 = this->m_spScreenGeom.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spScreenGeom.m_pObject = 0;
  }
  operator delete[](v1->m_pcSpeech);
  IConBD::~IConBD(&v1->m_IconBD);
  v3 = v1->m_spScreenGeom.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
  {
    if ( v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  }
}
// 9B6FF0: using guessed type int (__thiscall *NameBD::`vftable')(void *p, char);

//----- (0061DCD0) --------------------------------------------------------
bool __thiscall NameBD::BeginDraw(NameBD *this)
{
  NameBD *v1; // edi@1
  NiTexture::RendererData *v2; // ecx@1
  bool result; // al@2
  int v4; // eax@3
  int v5; // ecx@5
  int v6; // eax@6

  v1 = this;
  v2 = this->m_pkTexture->m_pkRendererData;
  if ( v2 && (v4 = ((int (*)(void))v2->vfptr[1].GetWidth)()) != 0 )
  {
    (*(void (__stdcall **)(int, _DWORD, IDirect3DSurface9 **))(*(_DWORD *)v4 + 72))(v4, 0, &v1->m_lpSurDest);
    if ( v1->m_lpSurDest
      && (v5 = *(_DWORD *)(NameBD::ms_spTempTexture + 40)) != 0
      && (v6 = (*(int (**)(void))(*(_DWORD *)v5 + 20))()) != 0 )
    {
      (*(void (__stdcall **)(int, _DWORD, IDirect3DSurface9 **))(*(_DWORD *)v6 + 72))(v6, 0, &v1->m_lpSurSrc);
      result = v1->m_lpSurSrc != 0;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A96848: using guessed type int NameBD::ms_spTempTexture;

//----- (0061DD40) --------------------------------------------------------
void __thiscall NameBD::CalculateLine(NameBD *this)
{
  NameBD *v1; // edi@1
  IDirect3DSurface9 *v2; // eax@1
  char *v3; // ecx@2
  char *v4; // eax@3
  HDC__ *v5; // ST08_4@3
  unsigned int v6; // eax@6
  unsigned int v7; // esi@7
  unsigned int v8; // eax@7
  int v9; // edx@7
  void **v10; // [sp+0h] [bp-3Ch]@0
  unsigned int dwStrLen; // [sp+8h] [bp-34h]@3
  unsigned int dwTextWidth; // [sp+Ch] [bp-30h]@3
  tagSIZE kSize; // [sp+10h] [bp-2Ch]@2
  unsigned int i; // [sp+18h] [bp-24h]@2
  unsigned int *v15; // [sp+1Ch] [bp-20h]@2
  char *pcText; // [sp+20h] [bp-1Ch]@2
  HDC__ *hDC; // [sp+24h] [bp-18h]@2
  tagRECT kRect; // [sp+28h] [bp-14h]@2

  v1 = this;
  v2 = this->m_lpSurSrc;
  if ( v2 )
  {
    this->m_uiTotalLine = 0;
    this->m_uiTextWidth = 0;
    this->m_uiTextHeight = 0;
    this->m_uiLineHeight = 0;
    v2->lpVtbl[5].QueryInterface((IUnknown *)v2, (_GUID *const )&hDC, v10);
    SetRect(&kRect, 0, 0, 279, 22);
    FillRect(hDC, &kRect, NameBD::ms_hEraseBrush);
    SelectObject(hDC, NameBD::ms_hFont);
    v3 = v1->m_pcSpeech;
    kSize.cx = 0;
    kSize.cy = 0;
    pcText = v3;
    GetTextExtentPoint32A(hDC, "W", 1, &kSize);
    v1->m_uiLineHeight = kSize.cy;
    i = 0;
    v15 = v1->m_auiLineStrLen;
    do
    {
      v4 = pcText;
      v5 = hDC;
      *(v15 - 1) = (unsigned int)pcText;
      CalculateStrlenInWidth_0(v4, &dwStrLen, &dwTextWidth, v5, 0x10Eu);
      if ( !dwStrLen )
        break;
      pcText += dwStrLen;
      *v15 = dwStrLen;
      if ( v1->m_uiTextWidth < dwTextWidth )
        v1->m_uiTextWidth = dwTextWidth;
      v6 = i;
      ++v1->m_uiTotalLine;
      ++v15;
      i = v6 + 1;
    }
    while ( v6 + 1 < 1 );
    v7 = v1->m_uiTextWidth;
    v8 = (279 - v7) >> 1;
    v9 = v1->m_uiTotalLine * (v1->m_uiLineHeight + 1) - 1;
    v1->m_iTextXPos = v8;
    v1->m_iTextYPos = 16 - v9;
    v1->m_kTextRect.left = v8 - 1;
    v1->m_kTextRect.right = v7 + v8;
    v1->m_kTextRect.bottom = 16;
    v1->m_uiTextHeight = v9;
    v1->m_kTextRect.top = 16 - v9 - 1;
    v1->m_lpSurSrc->lpVtbl[5].AddRef((IUnknown *)v1->m_lpSurSrc);
  }
}
// 61DD40: could not find valid save-restore pair for ebx

//----- (0061DE90) --------------------------------------------------------
void __usercall NameBD::DrawTextA(NameBD *this@<ecx>, void **a2@<esi>)
{
  NameBD *v2; // edi@1
  int v3; // ecx@2
  unsigned int v4; // esi@2
  unsigned int v5; // ebx@3
  int v6; // esi@5
  unsigned int v7; // edx@6
  int v8; // edx@6
  int v9; // ebx@6
  unsigned int dwTextWidth; // [sp+4h] [bp-11Ch]@5
  unsigned int i; // [sp+8h] [bp-118h]@2
  unsigned int dwStrLen; // [sp+Ch] [bp-114h]@3
  int iTextYPos; // [sp+10h] [bp-110h]@2
  int iTextXPos; // [sp+14h] [bp-10Ch]@2
  HDC__ *hDC; // [sp+18h] [bp-108h]@2
  char characterTitleText[256]; // [sp+1Ch] [bp-104h]@5

  v2 = this;
  if ( this->m_lpSurSrc )
  {
    this->m_lpSurSrc->lpVtbl[5].QueryInterface((IUnknown *)this->m_lpSurSrc, (_GUID *const )&hDC, a2);
    SetBkMode(hDC, 1);
    SetTextColor(hDC, v2->m_kColorRef);
    SelectObject(hDC, NameBD::ms_hFont);
    v3 = v2->m_iTextYPos;
    v4 = 0;
    iTextXPos = v2->m_iTextXPos;
    iTextYPos = v3;
    i = 0;
    if ( v2->m_uiTotalLine )
    {
      do
      {
        v5 = 0;
        dwStrLen = 0;
        if ( v2->m_uiCharacterTitleLen )
        {
          if ( !v4 )
          {
            SetTextColor(hDC, 0xFFFFu);
            characterTitleText[0] = 0;
            memset(&characterTitleText[1], 0, 0xFFu);
            strncpy(characterTitleText, v2->m_apcLineText[0], v2->m_uiCharacterTitleLen);
            CalculateStrlenInWidth_0(characterTitleText, &dwStrLen, &dwTextWidth, hDC, 0x10Eu);
            v5 = dwStrLen;
            v6 = iTextXPos;
            TextOutA(hDC, iTextXPos, iTextYPos, characterTitleText, dwStrLen);
            iTextXPos = dwTextWidth + v6;
            v4 = i;
          }
        }
        SetTextColor(hDC, v2->m_kColorRef);
        v7 = v2->m_auiLineStrLen[v4];
        v2->m_apcLineText[v4] += v2->m_uiCharacterTitleLen;
        v8 = v7 - v5;
        v9 = iTextYPos;
        TextOutA(hDC, iTextXPos, iTextYPos, v2->m_apcLineText[v4++], v8);
        iTextYPos = v9 + v2->m_uiLineHeight + 1;
        i = v4;
      }
      while ( v4 < v2->m_uiTotalLine );
    }
    v2->m_lpSurSrc->lpVtbl[5].AddRef((IUnknown *)v2->m_lpSurSrc);
  }
}

//----- (0061E060) --------------------------------------------------------
void __thiscall NameBD::CopyTexture(NameBD *this)
{
  NameBD *v1; // esi@1
  IDirect3DSurface9 *v2; // eax@3
  unsigned int v3; // ebx@3
  int v4; // ecx@4
  IDirect3DSurface9 *v5; // eax@4
  char *v6; // edx@5
  int v7; // edi@7
  char *v8; // esi@7
  bool v9; // zf@7
  unsigned int v10; // eax@8
  signed int v11; // esi@10
  char *v12; // ecx@11
  int v13; // eax@11
  int v14; // eax@15
  int v15; // eax@19
  char *v16; // ecx@23
  unsigned int uiSrcSkipBytes; // [sp+Ch] [bp-38h]@5
  unsigned int uiDestSkipBytes; // [sp+10h] [bp-34h]@5
  _D3DLOCKED_RECT kLockRectSrc; // [sp+14h] [bp-30h]@3
  char *pSrcBytes; // [sp+1Ch] [bp-28h]@5
  _D3DLOCKED_RECT kLockRectDest; // [sp+20h] [bp-24h]@4
  char *pTempDest; // [sp+28h] [bp-1Ch]@5
  NameBD *v23; // [sp+2Ch] [bp-18h]@1
  tagRECT rc; // [sp+30h] [bp-14h]@3

  v1 = this;
  v23 = this;
  if ( this->m_lpSurSrc )
  {
    if ( this->m_lpSurDest )
    {
      v2 = this->m_lpSurSrc;
      v3 = 22;
      rc.left = 0;
      rc.top = 0;
      rc.right = 279;
      rc.bottom = 22;
      if ( !((int (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v2->lpVtbl[4].AddRef)(v2, &kLockRectSrc, &rc, 0) )
      {
        v4 = v1->m_uiTextureYPos;
        rc.left = v1->m_uiTextureXPos;
        rc.top = v4;
        rc.right = rc.left + 279;
        v5 = v1->m_lpSurDest;
        rc.bottom = v4 + 22;
        if ( !((int (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v5->lpVtbl[4].AddRef)(v5, &kLockRectDest, &rc, 0) )
        {
          v6 = (char *)kLockRectDest.pBits;
          pSrcBytes = (char *)kLockRectSrc.pBits;
          uiDestSkipBytes = kLockRectDest.Pitch - 1116;
          uiSrcSkipBytes = kLockRectSrc.Pitch - 1116;
          pTempDest = (char *)kLockRectDest.pBits;
          do
          {
            memset(pTempDest, 0, 0x45Cu);
            pTempDest += kLockRectDest.Pitch;
            --v3;
          }
          while ( v3 );
          v7 = (int)v23;
          v8 = &v6[4 * v1->m_kTextRect.left - 12] + kLockRectDest.Pitch * (v1->m_kTextRect.top - 1);
          v9 = v23->m_uiTextHeight == -4;
          pTempDest = v8;
          if ( !v9 )
          {
            do
            {
              memset32(pTempDest, 2147483648, *(_DWORD *)(v7 + 64) + 8);
              v8 += kLockRectDest.Pitch;
              ++v3;
              v10 = v23->m_uiTextHeight + 4;
              pTempDest = v8;
              v7 = (int)v23;
            }
            while ( v3 < v10 );
          }
          v23 = (NameBD *)22;
          do
          {
            v11 = 93;
            do
            {
              v12 = pSrcBytes;
              v13 = *(_DWORD *)pSrcBytes & 0xFFFFFF;
              if ( v13 == 16712191 )
              {
                v6[3] = -128;
              }
              else if ( v13 != 16711935 )
              {
                *(_DWORD *)v6 = v13;
                v6[3] = -1;
              }
              v14 = *((_DWORD *)v12 + 1) & 0xFFFFFF;
              if ( v14 == 16712191 )
              {
                v6[7] = -128;
              }
              else if ( v14 != 16711935 )
              {
                *((_DWORD *)v6 + 1) = v14;
                v6[7] = -1;
              }
              v15 = *((_DWORD *)v12 + 2) & 0xFFFFFF;
              if ( v15 == 16712191 )
              {
                v6[11] = -128;
              }
              else if ( v15 != 16711935 )
              {
                *((_DWORD *)v6 + 2) = v15;
                v6[11] = -1;
              }
              v16 = v12 + 12;
              v6 += 12;
              --v11;
              pSrcBytes = v16;
            }
            while ( v11 );
            v6 += uiDestSkipBytes;
            v9 = v23 == (NameBD *)1;
            v23 = (NameBD *)((char *)v23 - 1);
            pSrcBytes = &v16[uiSrcSkipBytes];
          }
          while ( !v9 );
          (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v7 + 48) + 56))(*(_DWORD *)(v7 + 48));
          (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v7 + 44) + 56))(*(_DWORD *)(v7 + 44));
        }
      }
    }
  }
}

//----- (0061E250) --------------------------------------------------------
bool __cdecl NameBD::IsInShowRange(NiPoint3 *kPos)
{
  float v1; // ST00_4@1
  float v2; // ST04_4@1
  float v3; // ST08_4@1
  NiPoint3 *kPosa; // [sp+14h] [bp+8h]@1
  NiPoint3 *kPosb; // [sp+14h] [bp+8h]@1

  v1 = pkWorldCamera->m_kLocal.m_Translate.x - kPos->x;
  v2 = pkWorldCamera->m_kLocal.m_Translate.y - kPos->y;
  v3 = pkWorldCamera->m_kLocal.m_Translate.z - kPos->z;
  *(float *)&kPosa = v1 * v1 + v2 * v2 + v3 * v3;
  *(float *)&kPosb = sqrt(*(float *)&kPosa);
  return *(float *)&kPosb <= (double)NameBD::ms_fMaxDistance;
}
// A72E88: using guessed type float NameBD::ms_fMaxDistance;

//----- (0061E2D0) --------------------------------------------------------
void __thiscall NameBD::SetSpeech(NameBD *this, char *pcSpeech)
{
  NameBD *v2; // esi@1
  char *v3; // eax@3
  unsigned int v4; // edx@7
  unsigned int v5; // edi@7
  char *v6; // edx@9
  char *v7; // ecx@9
  char v8; // al@10
  IDirect3DSurface9 *v9; // eax@12
  IDirect3DSurface9 *v10; // esi@14
  char *v11; // eax@16

  v2 = this;
  if ( pcSpeech && *pcSpeech )
  {
    v3 = this->m_pcSpeech;
    if ( !v3
      || strcmp(v3, pcSpeech)
      || v2->m_kColorRef != v2->m_kPrevColorRef
      || v2->m_uiPreCharacterTitleLen != v2->m_uiCharacterTitleLen )
    {
      v4 = v2->m_kColorRef;
      v2->m_uiPreCharacterTitleLen = v2->m_uiCharacterTitleLen;
      v2->m_kPrevColorRef = v4;
      v5 = strlen(pcSpeech);
      if ( v2->m_uiSpeechLen < v5 )
      {
        operator delete[](v2->m_pcSpeech);
        v2->m_pcSpeech = (char *)operator new[](v5 + 1);
        v2->m_uiSpeechLen = v5;
      }
      v6 = v2->m_pcSpeech;
      v7 = pcSpeech;
      do
      {
        v8 = *v7;
        *v6++ = *v7++;
      }
      while ( v8 );
      if ( NameBD::BeginDraw(v2) )
      {
        NameBD::CalculateLine(v2);
        NameBD::DrawTextA(v2, (void **)&v2->vfptr);
        NameBD::CopyTexture(v2);
        v9 = v2->m_lpSurSrc;
        if ( v9 )
          v9->lpVtbl->Release((IUnknown *)v2->m_lpSurSrc);
        v10 = v2->m_lpSurDest;
        if ( v10 )
          v10->lpVtbl->Release((IUnknown *)v10);
      }
    }
  }
  else
  {
    v11 = this->m_pcSpeech;
    if ( v11 )
    {
      *v11 = 0;
      this->m_uiTotalLine = 0;
    }
  }
}

//----- (0061E3F0) --------------------------------------------------------
void __thiscall NameBD::SetDropItem(NameBD *this, unsigned __int16 kHandle)
{
  NameBD *v2; // esi@1
  DropItem *v3; // eax@1
  DropItem *v4; // edi@1
  char *v5; // eax@2
  char *v6; // eax@2

  v2 = this;
  this->m_kCharHandle = kHandle;
  v3 = DropItemMgr::GetByHandle(&g_kDropItemMgr, kHandle);
  v4 = v3;
  if ( v3 )
  {
    v2->m_kColorRef = 2082559;
    v5 = DropItem::GetItemName(v3);
    NameBD::SetSpeech(v2, v5);
    v6 = DropItem::GetItemName(v4);
    sprintf(v2->m_kBDText, "%s", v6);
  }
}

//----- (0061E450) --------------------------------------------------------
void __thiscall NameBD::UpdateDropItem(NameBD *this, float fTime, NiCamera *pkWorldCamera, PgWinCamera *pkScreenCamera)
{
  NameBD *v4; // esi@1
  DropItem *v5; // eax@1
  DropItem *v6; // edi@1
  NiNode *v7; // eax@2
  float kWorldPos; // ST28_4@2
  float kWorldPos_4; // ST2C_4@2
  float kWorldPos_8; // ST30_4@2
  double v11; // st7@2
  double v12; // st6@4
  NiProperty *v13; // eax@5
  double v14; // st7@5
  float fDistance; // ST34_4@9
  NiNode *v16; // eax@11
  float v17; // ST30_4@11
  _BYTE v18[12]; // ST0C_12@11
  float fScreenHeight; // ST08_4@11
  float fScreenWidth; // ST04_4@11
  ItemInfo *v21; // eax@13
  char *v22; // eax@23
  NiScreenElements *v23; // eax@23
  NiScreenElements *v24; // eax@23
  float v25; // eax@23
  double v26; // st5@23
  float v27; // ecx@23
  double v28; // st7@23
  NiPoint3 k2DOrthoPos; // [sp+34h] [bp-114h]@11
  float fDistNF; // [sp+40h] [bp-108h]@2
  char pkSpeechText[256]; // [sp+44h] [bp-104h]@23

  v4 = this;
  v5 = DropItemMgr::GetByHandle(&g_kDropItemMgr, this->m_kCharHandle);
  v6 = v5;
  if ( !v5
    || (v7 = v5->m_spNode.m_pObject,
        kWorldPos = ::pkWorldCamera->m_kLocal.m_Translate.x - v7->m_kLocal.m_Translate.x,
        kWorldPos_4 = ::pkWorldCamera->m_kLocal.m_Translate.y - v7->m_kLocal.m_Translate.y,
        kWorldPos_8 = ::pkWorldCamera->m_kLocal.m_Translate.z - v7->m_kLocal.m_Translate.z,
        fDistNF = kWorldPos_4 * kWorldPos_4 + kWorldPos * kWorldPos + kWorldPos_8 * kWorldPos_8,
        fDistNF = sqrt(fDistNF),
        v11 = fDistNF,
        fDistNF > (double)NameBD::ms_fMaxDistance) )
  {
    v4->m_bAlive = 0;
    return;
  }
  v12 = NameBD::ms_fTransNear;
  if ( NameBD::ms_fTransNear <= v11 )
  {
    if ( NameBD::ms_fTransFar >= v11 )
    {
      fDistNF = NameBD::ms_fTransFar - v12;
      if ( 0.0 == fDistNF )
        goto LABEL_11;
      v13 = NiAVObject::GetProperty((NiAVObject *)&v4->m_spScreenGeom.m_pObject->vfptr, 3);
      fDistance = v11 - v12;
      v14 = 1.0 - fDistance / fDistNF;
    }
    else
    {
      v13 = NiAVObject::GetProperty((NiAVObject *)&v4->m_spScreenGeom.m_pObject->vfptr, 3);
      v14 = 0.0;
    }
  }
  else
  {
    v13 = NiAVObject::GetProperty((NiAVObject *)&v4->m_spScreenGeom.m_pObject->vfptr, 3);
    v14 = 1.0;
  }
  ++v13[3].m_uiRefCount;
  *(float *)&v13[3].vfptr = v14;
LABEL_11:
  v16 = v6->m_spNode.m_pObject;
  v17 = v16->m_kLocal.m_Translate.z + 12.0;
  *(_QWORD *)v18 = *(_QWORD *)&v16->m_kLocal.m_Translate.x;
  *(float *)&v18[8] = v17;
  fScreenHeight = (double)PgWin::ms_uiScreenHeight;
  fScreenWidth = (double)PgWin::ms_uiScreenWidth;
  if ( PgUtil::Get2DOrthoPosFrom3DPos(pkWorldCamera, fScreenWidth, fScreenHeight, *(NiPoint3 *)v18, &k2DOrthoPos) )
  {
    v21 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(v6->m_kItemID);
    if ( v21 )
    {
      switch ( v21->ItemGradeType )
      {
        default:
          v4->m_kColorRef = 0xFFFFFF;
          break;
        case 1:
          v4->m_kColorRef = 65280;
          break;
        case 2:
        case 5:
          v4->m_kColorRef = 16695821;
          break;
        case 3:
          v4->m_kColorRef = 58623;
          break;
        case 4:
          v4->m_kColorRef = 15671549;
          break;
        case 6:
          v4->m_kColorRef = 33023;
          break;
        case 7:
          v4->m_kColorRef = 16711935;
          break;
      }
    }
    else
    {
      v4->m_kColorRef = 3339263;
    }
    v22 = DropItem::GetItemName(v6);
    sprintf(pkSpeechText, "%s", v22);
    NameBD::SetSpeech(v4, pkSpeechText);
    sprintf(v4->m_kBDText, "%s", pkSpeechText);
    v23 = v4->m_spScreenGeom.m_pObject;
    v4->m_uiCharacterTitleLen = 0;
    v23->m_uFlags &= 0xFFFEu;
    v24 = v4->m_spScreenGeom.m_pObject;
    k2DOrthoPos.x = k2DOrthoPos.x - 139.0;
    k2DOrthoPos.y = k2DOrthoPos.y - 22.0;
    v24->m_kLocal.m_Translate = k2DOrthoPos;
    v25 = k2DOrthoPos.y;
    v26 = k2DOrthoPos.x;
    v27 = k2DOrthoPos.z;
    v28 = (double)v4->m_kTextRect.left + k2DOrthoPos.x;
    v4->m_k2DOrthoPos.x = k2DOrthoPos.x;
    v4->m_k2DOrthoPos.y = v25;
    v4->m_k2DOrthoPos.z = v27;
    if ( (signed int)PgWin::ms_iMsX > (signed int)v28
      && (signed int)PgWin::ms_iMsX < (signed int)(v26 + (double)v4->m_kTextRect.right)
      && PgWin::ms_iMsY > (signed int)((double)v4->m_kTextRect.top + k2DOrthoPos.y)
      && PgWin::ms_iMsY < (signed int)(k2DOrthoPos.y + (double)v4->m_kTextRect.bottom)
      && (!g_ClickedNameBD || g_ClickedNameBD->m_k2DOrthoPos.z > (double)v4->m_k2DOrthoPos.z) )
    {
      g_ClickedNameBD = v4;
    }
    NiAVObject::Update((NiAVObject *)&v4->m_spScreenGeom.m_pObject->vfptr, fTime, 1);
  }
  else
  {
    v4->m_spScreenGeom.m_pObject->m_uFlags |= 1u;
  }
}
// A72E88: using guessed type float NameBD::ms_fMaxDistance;
// A72E8C: using guessed type float NameBD::ms_fTransNear;
// A72E90: using guessed type float NameBD::ms_fTransFar;

//----- (0061E830) --------------------------------------------------------
void __thiscall NameBD::CreateGeometry(NameBD *this, NiTexture *pkTexture, int iTexturePosIndex)
{
  NameBD *v3; // esi@1
  NiTexture *v4; // ebx@1
  unsigned int v5; // edi@1
  unsigned int v6; // eax@1
  unsigned int v7; // ecx@1
  NiTexture *v8; // ST08_4@1
  NiScreenElementsData *v9; // edi@1
  NiTexture *v10; // eax@1
  NiTexture *v11; // eax@2
  NiTexture *v12; // edi@4
  NiTexture *v13; // eax@12
  int v14; // eax@13
  int v15; // edi@13
  NiTexture *v16; // eax@17
  int v17; // eax@18
  int v18; // edi@18

  v3 = this;
  v4 = pkTexture;
  v5 = ((int (__thiscall *)(NiTexture *))pkTexture->vfptr[15].__vecDelDtor)(pkTexture);
  pkTexture = (NiTexture *)((int (__thiscall *)(NiTexture *))v4->vfptr[16].__vecDelDtor)(v4);
  v6 = 22 * (iTexturePosIndex / (v5 / 0x117));
  v7 = 279 * (iTexturePosIndex % (v5 / 0x117));
  v3->m_uiTextureYPos = v6;
  v8 = pkTexture;
  v3->m_uiTextureXPos = v7;
  v9 = PgUtil::CreateScreenGeometryData(v5, (unsigned int)v8, v7, v6, 0x116u, 0x15u);
  v3->m_pkTexture = v4;
  v10 = (NiTexture *)operator new(0xC4u);
  pkTexture = v10;
  if ( v10 )
  {
    NiScreenElements::NiScreenElements((NiScreenElements *)v10, v9);
    pkTexture = v11;
  }
  else
  {
    pkTexture = 0;
    v11 = 0;
  }
  v12 = (NiTexture *)v3->m_spScreenGeom.m_pObject;
  if ( v12 != v11 )
  {
    if ( v12 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
        v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
      v11 = pkTexture;
    }
    v3->m_spScreenGeom.m_pObject = (NiScreenElements *)v11;
    if ( v11 )
      InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
  }
  v13 = (NiTexture *)operator new(0x44u);
  pkTexture = v13;
  if ( v13 )
  {
    NiTexturingProperty::NiTexturingProperty((NiTexturingProperty *)v13);
    v15 = v14;
  }
  else
  {
    v15 = 0;
  }
  NiTexturingProperty::SetBaseTexture((NiTexturingProperty *)v15, v4);
  NiTexturingProperty::SetBaseFilterMode((NiTexturingProperty *)v15, 0);
  *(_DWORD *)(v15 + 28) = 2;
  NiTexturingProperty::SetBaseClampMode((NiTexturingProperty *)v15, 0);
  iTexturePosIndex = (int)v3->m_spScreenGeom.m_pObject;
  pkTexture = (NiTexture *)v15;
  InterlockedIncrement((volatile LONG *)(v15 + 4));
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(iTexturePosIndex + 156),
    (NiPointer<NiRoom> *)&pkTexture);
  if ( !InterlockedDecrement((volatile LONG *)(v15 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v15)(v15, 1);
  v16 = (NiTexture *)operator new(0x60u);
  pkTexture = v16;
  if ( v16 )
  {
    NiMaterialProperty::NiMaterialProperty((NiMaterialProperty *)v16);
    v18 = v17;
  }
  else
  {
    v18 = 0;
  }
  ++*(_DWORD *)(v18 + 88);
  *(float *)(v18 + 68) = 1.0;
  *(float *)(v18 + 72) = 1.0;
  *(float *)(v18 + 76) = 1.0;
  iTexturePosIndex = (int)v3->m_spScreenGeom.m_pObject;
  pkTexture = (NiTexture *)v18;
  InterlockedIncrement((volatile LONG *)(v18 + 4));
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(iTexturePosIndex + 156),
    (NiPointer<NiRoom> *)&pkTexture);
  if ( !InterlockedDecrement((volatile LONG *)(v18 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v18)(v18, 1);
  NiAVObject::UpdateProperties((NiAVObject *)&v3->m_spScreenGeom.m_pObject->vfptr);
  NiAVObject::Update((NiAVObject *)&v3->m_spScreenGeom.m_pObject->vfptr, 0.0, 0);
  v3->m_spScreenGeom.m_pObject->m_uFlags |= 1u;
}

//----- (0061EA80) --------------------------------------------------------
void __thiscall NameBD::NameBD(NameBD *this, NiTexture *pkTexture, int iTexturePosIndex)
{
  NameBD *v3; // esi@1

  v3 = this;
  this->vfptr = (NameBDVtbl *)&NameBD::`vftable';
  this->m_spScreenGeom.m_pObject = 0;
  IConBD::IConBD(&this->m_IconBD);
  v3->m_kCharHandle = -1;
  v3->m_bAlive = 1;
  v3->m_pcSpeech = 0;
  v3->m_uiSpeechLen = 0;
  v3->m_iTextureIndex = iTexturePosIndex;
  if ( pkTexture )
    NameBD::CreateGeometry(v3, pkTexture, iTexturePosIndex);
  v3->m_kColorRef = 0xFFFFFF;
  v3->m_kPrevColorRef = 0xFFFFFF;
  v3->m_uiCharacterTitleLen = 0;
  v3->m_uiNameBDType = 0;
  v3->m_uiPreCharacterTitleLen = 0;
  v3->m_bNameBDMove = 0;
}
// 9B6FF0: using guessed type int (__thiscall *NameBD::`vftable')(void *p, char);

//----- (0061EB30) --------------------------------------------------------
void __thiscall NameBD::Update(NameBD *this, float fTime, NiCamera *pkWorldCamera, PgWinCamera *pkScreenCamera)
{
  NameBD *v4; // edi@1
  Char *v5; // eax@1
  Char *v6; // esi@1
  int v7; // eax@2
  double v8; // st7@2
  double v9; // st6@4
  NiProperty *v10; // eax@5
  double v11; // st7@5
  float fScreenWidth; // ST04_4@11
  CClientGuild *v13; // ebx@16
  CMiniHouseMgr *v14; // eax@16
  stMINIHOUSEINFO *v15; // eax@16
  const char *v16; // eax@27
  CClientGuild *v17; // eax@29
  AbStateInfecteeVtbl *v18; // eax@31
  const char *v19; // eax@31
  RaidMemberInfo *v20; // eax@31
  char v21; // al@35
  unsigned int v22; // ecx@36
  CClientGuild *v23; // eax@51
  CClientGuild *v24; // eax@55
  CClientGuildAcademy *v25; // eax@59
  CClientGuildAcademy *v26; // eax@63
  CClientGuildAcademy *v27; // eax@69
  CClientGuildAcademy *v28; // eax@71
  CClientGuildAcademy *v29; // eax@73
  char v30; // al@73
  CClientGuild *v31; // eax@74
  CClientGuild *v32; // eax@76
  CClientGuild *v33; // eax@78
  CClientGuild *v34; // eax@81
  char v35; // al@91
  char *v36; // eax@93
  char v37; // cl@94
  char v38; // al@97
  NiUnsharedGeometryGroup *v39; // eax@99
  double v40; // st7@106
  float v41; // eax@106
  float v42; // ecx@106
  double v43; // st5@106
  float fScreenHeight; // [sp+4h] [bp-154h]@11
  float v45; // [sp+8h] [bp-150h]@11
  float v46; // [sp+Ch] [bp-14Ch]@11
  float v47; // [sp+10h] [bp-148h]@11
  int v48; // [sp+14h] [bp-144h]@14
  float v49; // [sp+24h] [bp-134h]@2
  float v50; // [sp+28h] [bp-130h]@2
  float v51; // [sp+2Ch] [bp-12Ch]@2
  NiPoint3 kWorldPos; // [sp+30h] [bp-128h]@11
  float fDistance; // [sp+3Ch] [bp-11Ch]@2
  NiPoint3 k2DOrthoPos; // [sp+40h] [bp-118h]@11
  char byPkGrade; // [sp+4Fh] [bp-109h]@31
  float fDistNF; // [sp+50h] [bp-108h]@2
  char pkSpeechText[256]; // [sp+54h] [bp-104h]@13

  v4 = this;
  v5 = CharMgr::GetChar(&g_kCharMgr, this->m_kCharHandle);
  v6 = v5;
  if ( !v5
    || (v7 = ((int (__thiscall *)(Char *))v5->vfptr[6].Deaffect)(v5),
        v49 = ::pkWorldCamera->m_kLocal.m_Translate.x - *(float *)v7,
        v50 = ::pkWorldCamera->m_kLocal.m_Translate.y - *(float *)(v7 + 4),
        v51 = ::pkWorldCamera->m_kLocal.m_Translate.z - *(float *)(v7 + 8),
        fDistNF = v50 * v50 + v49 * v49 + v51 * v51,
        fDistNF = sqrt(fDistNF),
        fDistance = fDistNF,
        v8 = fDistNF,
        fDistNF > (double)NameBD::ms_fMaxDistance) )
  {
    v4->m_bAlive = 0;
    return;
  }
  v9 = NameBD::ms_fTransNear;
  if ( NameBD::ms_fTransNear <= v8 )
  {
    if ( NameBD::ms_fTransFar >= v8 )
    {
      fDistance = v8 - v9;
      fDistNF = NameBD::ms_fTransFar - v9;
      if ( 0.0 == fDistNF )
        goto LABEL_11;
      v10 = NiAVObject::GetProperty((NiAVObject *)&v4->m_spScreenGeom.m_pObject->vfptr, 3);
      v11 = 1.0 - fDistance / fDistNF;
    }
    else
    {
      v10 = NiAVObject::GetProperty((NiAVObject *)&v4->m_spScreenGeom.m_pObject->vfptr, 3);
      v11 = 0.0;
    }
  }
  else
  {
    v10 = NiAVObject::GetProperty((NiAVObject *)&v4->m_spScreenGeom.m_pObject->vfptr, 3);
    v11 = 1.0;
  }
  ++v10[3].m_uiRefCount;
  *(float *)&v10[3].vfptr = v11;
LABEL_11:
  Char::GetHeightPos(v6, (int)pkWorldCamera, &kWorldPos);
  kWorldPos.z = kWorldPos.z + 3.0;
  v45 = kWorldPos.x;
  v46 = kWorldPos.y;
  v47 = kWorldPos.z;
  fScreenHeight = (double)PgWin::ms_uiScreenHeight;
  fScreenWidth = (double)PgWin::ms_uiScreenWidth;
  if ( !PgUtil::Get2DOrthoPosFrom3DPos(pkWorldCamera, fScreenWidth, fScreenHeight, *(NiPoint3 *)&v45, &k2DOrthoPos) )
  {
LABEL_12:
    v4->m_spScreenGeom.m_pObject->m_uFlags |= 1u;
    return;
  }
  pkSpeechText[0] = 0;
  if ( Char::IsNPC(v6) )
  {
    v4->m_kColorRef = 42495;
    v48 = ((int (__thiscall *)(Char *))v6->vfptr[2].DeleteAbStateByAbstateIndex)(v6);
    sprintf(pkSpeechText, "%s", v48);
    v45 = COERCE_FLOAT(pkSpeechText);
    fScreenHeight = COERCE_FLOAT("%s");
LABEL_89:
    sprintf(v4->m_kBDText, (const char *)LODWORD(fScreenHeight), v45, v46, v47, v48);
    goto LABEL_90;
  }
  if ( !(unsigned __int8)((int (__thiscall *)(Char *))v6->vfptr[1].Affect)(v6) )
  {
    if ( (unsigned __int8)((int (__thiscall *)(Char *))v6->vfptr[20].DeleteAbStateByAbstateIndex)(v6) )
    {
      v4->m_kColorRef = 0xFFFFFF;
      v48 = ((int (__thiscall *)(Char *))v6->vfptr[2].DeleteAbStateByAbstateIndex)(v6);
      sprintf(pkSpeechText, "%s", v48);
      v45 = COERCE_FLOAT(pkSpeechText);
      fScreenHeight = COERCE_FLOAT("%s");
      goto LABEL_89;
    }
    if ( v6 == g_pkMainChar )
    {
      v4->m_kColorRef = 13886081;
      v48 = ((int (__thiscall *)(_DWORD))v6->vfptr[2].DeleteAbStateByAbstateIndex)(v6);
      sprintf(pkSpeechText, "%s", v48);
      v45 = COERCE_FLOAT(pkSpeechText);
      fScreenHeight = COERCE_FLOAT("%s");
      goto LABEL_89;
    }
    v4->m_kColorRef = 0xFFFFFF;
    v16 = (const char *)((int (__thiscall *)(_DWORD))v6->vfptr[2].DeleteAbStateByAbstateIndex)(v6);
    fDistNF = COERCE_FLOAT(&fScreenHeight);
    Name5::Name5((Name5 *)&fScreenHeight, v16);
    fDistNF = COERCE_FLOAT(Party::GetMemberInfo(&g_kParty, *(Name5 *)&fScreenHeight));
    if ( fDistNF != 0.0 )
      v4->m_kColorRef = 16433206;
    v48 = v6->m_dwGuildRegNum;
    v17 = GuildTask::GetGuild();
    if ( CClientGuild::IsAttackableEnemyGuild(v17, v48) )
      v4->m_kColorRef = 255;
    v18 = v6->vfptr;
    byPkGrade = BYTE3(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]);
    v19 = (const char *)((int (__thiscall *)(Char *))v18[2].DeleteAbStateByAbstateIndex)(v6);
    fDistance = COERCE_FLOAT(&fScreenHeight);
    Name5::Name5((Name5 *)&fScreenHeight, v19);
    v20 = RaidInfo::GetRaidMemberInfo(&g_kRaidinfo, *(Name5 *)&fScreenHeight);
    if ( fDistNF != 0.0 || v20 || !(byPkGrade & 3) )
      goto LABEL_66;
    if ( unk_B25074 != 4 )
    {
LABEL_65:
      v4->m_kColorRef = 255;
      goto LABEL_66;
    }
    v21 = v6->m_GuildAcademyMemberFlag;
    if ( v21 != 1 )
    {
      v22 = v6->m_dwGuildRegNum;
      if ( g_pkMainChar->m_dwGuildRegNum == v22 )
      {
        if ( !v22 )
          goto LABEL_42;
LABEL_41:
        v4->m_kColorRef = 0xFFFFFF;
LABEL_42:
        if ( !v6->m_dwGuildRegNum )
          v4->m_kColorRef = 255;
        if ( !v6->m_GuildAcademyMemberFlag && !g_pkMainChar->m_dwGuildRegNum )
          v4->m_kColorRef = 255;
        if ( v6->m_GuildAcademyMemberFlag == 1 && !g_pkMainChar->m_dwGuildRegNum )
          v4->m_kColorRef = 255;
        if ( !v6->m_GuildAcademyMemberFlag )
        {
          v48 = v6->m_dwGuildRegNum;
          v23 = GuildTask::GetGuild();
          if ( !CClientGuild::IsAttackableEnemyGuild(v23, v48) && v6->m_dwGuildRegNum != g_pkMainChar->m_dwGuildRegNum )
            v4->m_kColorRef = 255;
        }
        if ( v6->m_GuildAcademyMemberFlag == 1 )
        {
          v48 = v6->m_dwGuildRegNum;
          v24 = GuildTask::GetGuild();
          if ( !CClientGuild::IsAttackableEnemyGuild(v24, v48) && v6->m_dwGuildRegNum != g_pkMainChar->m_dwGuildRegNum )
            v4->m_kColorRef = 255;
        }
        if ( !v6->m_GuildAcademyMemberFlag )
        {
          v48 = v6->m_dwGuildRegNum;
          v25 = GuildAcademyTask::GetGuildAcademy();
          if ( !CClientGuildAcademy::FindEnemyGuildAcademyMember(v25, v48)
            && v6->m_dwGuildRegNum != g_pkMainChar->m_dwGuildRegNum )
          {
            v4->m_kColorRef = 255;
          }
        }
        if ( v6->m_GuildAcademyMemberFlag == 1 )
        {
          v48 = v6->m_dwGuildRegNum;
          v26 = GuildAcademyTask::GetGuildAcademy();
          if ( !CClientGuildAcademy::FindEnemyGuildAcademyMember(v26, v48)
            && v6->m_dwGuildRegNum != g_pkMainChar->m_dwGuildRegNum )
          {
            goto LABEL_65;
          }
        }
LABEL_66:
        if ( unk_B25074 != 4 || !(byPkGrade & 1) || fDistNF == 0.0 )
          goto LABEL_81;
        v27 = GuildAcademyTask::GetGuildAcademy();
        if ( CClientGuildAcademy::IsGuildWar(v27) )
        {
          if ( v6->m_GuildAcademyMemberFlag != 1 )
          {
LABEL_73:
            v48 = v6->m_dwGuildRegNum;
            v29 = GuildAcademyTask::GetGuildAcademy();
            v30 = CClientGuildAcademy::FindEnemyGuildAcademyMember(v29, v48);
            goto LABEL_79;
          }
          v48 = v6->m_dwGuildRegNum;
          v28 = GuildAcademyTask::GetGuildAcademy();
          if ( !CClientGuildAcademy::FindEnemyGuildAcademyMember(v28, v48) )
          {
            if ( v6->m_GuildAcademyMemberFlag == 1 )
              goto LABEL_81;
            goto LABEL_73;
          }
LABEL_80:
          v4->m_kColorRef = 255;
LABEL_81:
          v34 = GuildTask::GetGuild();
          if ( v34 && v34->m_GttEnemyInfo.uiStatus == 2 && g_pkMainChar->m_dwGuildRegNum != v6->m_dwGuildRegNum )
            v4->m_kColorRef = 255;
          if ( g_pkMainChar->m_kAbStateProperty.iKarenCaptivateStateCount > 0
            || v6->m_kAbStateProperty.iKarenCaptivateStateCount > 0 )
          {
            v4->m_kColorRef = 255;
          }
          v48 = ((int (__thiscall *)(_DWORD))v6->vfptr[2].DeleteAbStateByAbstateIndex)(v6);
          sprintf(pkSpeechText, "%s", v48);
          v45 = COERCE_FLOAT(pkSpeechText);
          fScreenHeight = COERCE_FLOAT("%s");
          goto LABEL_89;
        }
        v48 = v6->m_dwGuildRegNum;
        v31 = GuildTask::GetGuild();
        if ( !CClientGuild::IsEnemyGuild(v31, v48) )
          goto LABEL_81;
        if ( v6->m_GuildAcademyMemberFlag != 1 )
        {
          v48 = v6->m_dwGuildRegNum;
          v32 = GuildTask::GetGuild();
          if ( CClientGuild::IsEnemyGuild(v32, v48) )
            goto LABEL_80;
          if ( v6->m_GuildAcademyMemberFlag != 1 )
            goto LABEL_81;
        }
        v48 = v6->m_dwGuildRegNum;
        v33 = GuildTask::GetGuild();
        v30 = CClientGuild::IsAttackableEnemyGuild(v33, v48);
LABEL_79:
        if ( !v30 )
          goto LABEL_81;
        goto LABEL_80;
      }
      if ( v21 != 1 )
        goto LABEL_42;
    }
    if ( g_pkMainChar->m_dwGuildRegNum != v6->m_dwGuildRegNum )
      goto LABEL_42;
    goto LABEL_41;
  }
  v13 = GuildTask::GetGuild();
  v48 = v6->m_kHandle;
  CGuildMonster::GetInstance();
  v15 = CGuildMonster::GetGuildEumFromMob(v14, v48);
  if ( v15 && v15 == (stMINIHOUSEINFO *)g_pkMainChar->m_dwGuildRegNum )
  {
    v4->m_kColorRef = 0xFFFFFF;
  }
  else if ( v13 && v13->m_GttEnemyInfo.uiStatus == 2 && g_pkMainChar->m_dwGuildRegNum != v6->m_dwGuildRegNum )
  {
    v4->m_kColorRef = 255;
  }
LABEL_90:
  if ( v6->m_bUseCharTitle && (v35 = v6->m_byMode, v35 != 4) && v35 != 5 )
  {
    v36 = v6->m_CharTitleName;
    do
      v37 = *v36++;
    while ( v37 );
    v4->m_uiCharacterTitleLen = v36 - &v6->m_CharTitleName[1];
    v48 = ((int (__thiscall *)(_DWORD))v6->vfptr[2].DeleteAbStateByAbstateIndex)(v6);
    LODWORD(v47) = (char *)v6 + 213;
    sprintf(pkSpeechText, "%s %s", v6->m_CharTitleName, v48);
    fScreenHeight = COERCE_FLOAT(pkSpeechText);
    sprintf(v4->m_kBDText, "%s", pkSpeechText, v45, v46, v47, v48);
  }
  else
  {
    v4->m_uiCharacterTitleLen = 0;
  }
  v38 = v6->m_byMode;
  if ( v38 == 5 )
    goto LABEL_12;
  if ( v38 == 4 )
  {
    v48 = ((int (__thiscall *)(_DWORD))v6->vfptr[2].DeleteAbStateByAbstateIndex)(v6);
    v39 = TextData::Get(0x93B1FCE9);
    sprintf(pkSpeechText, (const char *)v39, v48);
    v45 = COERCE_FLOAT(pkSpeechText);
    sprintf(v4->m_kBDText, "%s", pkSpeechText, v46, v47);
  }
  if ( pkSpeechText[0] )
    NameBD::SetSpeech(v4, pkSpeechText);
  v4->m_spScreenGeom.m_pObject->m_uFlags &= 0xFFFEu;
  k2DOrthoPos.x = k2DOrthoPos.x - 139.0;
  k2DOrthoPos.y = k2DOrthoPos.y - 22.0;
  if ( v6 == g_pkMainChar )
    k2DOrthoPos.y = k2DOrthoPos.y - 8.0;
  if ( !v4->m_bNameBDMove )
    v4->m_spScreenGeom.m_pObject->m_kLocal.m_Translate = k2DOrthoPos;
  v40 = (double)v4->m_kTextRect.left;
  v41 = k2DOrthoPos.y;
  v42 = k2DOrthoPos.z;
  v43 = k2DOrthoPos.x;
  v4->m_k2DOrthoPos.x = k2DOrthoPos.x;
  v4->m_k2DOrthoPos.y = v41;
  v4->m_k2DOrthoPos.z = v42;
  if ( (signed int)PgWin::ms_iMsX > (signed int)(v40 + v43)
    && (signed int)PgWin::ms_iMsX < (signed int)(v43 + (double)v4->m_kTextRect.right)
    && PgWin::ms_iMsY > (signed int)((double)v4->m_kTextRect.top + k2DOrthoPos.y)
    && PgWin::ms_iMsY < (signed int)(k2DOrthoPos.y + (double)v4->m_kTextRect.bottom) )
  {
    if ( g_ClickedNameBD )
    {
      if ( g_ClickedNameBD->m_k2DOrthoPos.z > (double)v4->m_k2DOrthoPos.z )
        g_ClickedNameBD = v4;
    }
    else
    {
      g_ClickedNameBD = v4;
    }
  }
  if ( !v4->m_bNameBDMove )
  {
    v48 = 1;
    v47 = v42;
    NiAVObject::Update((NiAVObject *)&v4->m_spScreenGeom.m_pObject->vfptr, fTime, 1);
  }
}
// A72E88: using guessed type float NameBD::ms_fMaxDistance;
// A72E8C: using guessed type float NameBD::ms_fTransNear;
// A72E90: using guessed type float NameBD::ms_fTransFar;

//----- (0061F410) --------------------------------------------------------
void __thiscall NameBD::SetChar(NameBD *this, unsigned __int16 kHandle)
{
  NameBD *v2; // edi@1
  Char *v3; // eax@1
  Char *v4; // esi@1
  unsigned __int16 v5; // ST08_2@9
  CMiniHouseMgr *v6; // eax@9
  stMINIHOUSEINFO *v7; // eax@9
  int v8; // eax@11
  char *v9; // eax@18
  int v10; // eax@18

  v2 = this;
  this->m_kCharHandle = kHandle;
  v3 = CharMgr::GetChar(&g_kCharMgr, kHandle);
  v4 = v3;
  if ( v3 )
  {
    if ( v3 == g_pkMainChar )
    {
      v2->m_kColorRef = 2082559;
    }
    else if ( Char::IsNPC(v3) )
    {
LABEL_5:
      v2->m_kColorRef = 3339263;
    }
    else
    {
      if ( !Char::IsResource(v4) )
      {
        if ( (unsigned __int8)((int (__thiscall *)(Char *))v4->vfptr[1].Affect)(v4) )
        {
          v5 = v4->m_kHandle;
          CGuildMonster::GetInstance();
          v7 = CGuildMonster::GetGuildEumFromMob(v6, v5);
          if ( !v7 || v7 != (stMINIHOUSEINFO *)g_pkMainChar->m_dwGuildRegNum )
          {
            v8 = ((int (__thiscall *)(Char *))v4->vfptr[5].Deaffect)(v4);
            switch ( Char::GetLvGapIndex(g_pkMainChar, v8) )
            {
              case 2:
                goto LABEL_5;
              case 0:
                v2->m_kColorRef = 1910206;
                break;
              case 1:
                v2->m_kColorRef = 2466047;
                break;
              case 3:
                v2->m_kColorRef = (unsigned int)&loc_56E75A;
                break;
              default:
                v2->m_kColorRef = 12632256;
                break;
            }
            goto LABEL_18;
          }
        }
        else if ( !(unsigned __int8)((int (__thiscall *)(Char *))v4->vfptr[20].DeleteAbStateByAbstateIndex)(v4) )
        {
          goto LABEL_18;
        }
        v2->m_kColorRef = 0xFFFFFF;
        goto LABEL_18;
      }
      v2->m_kColorRef = 15631086;
    }
LABEL_18:
    v9 = (char *)((int (__thiscall *)(Char *))v4->vfptr[2].DeleteAbStateByAbstateIndex)(v4);
    NameBD::SetSpeech(v2, v9);
    v10 = ((int (__thiscall *)(Char *))v4->vfptr[2].DeleteAbStateByAbstateIndex)(v4);
    sprintf(v2->m_kBDText, "%s", v10);
  }
}

//----- (0061F550) --------------------------------------------------------
void __thiscall NameBD::UpdateMiniHause(NameBD *this, float fTime, NiCamera *pkWorldCamera, PgWinCamera *pkScreenCamera)
{
  NameBD *v4; // esi@1
  int v5; // edi@2
  int v6; // eax@3
  float v7; // ebx@3
  int v8; // edx@3
  float kHousePos; // ST38_4@3
  float kHousePos_4; // ST3C_4@3
  float kHousePos_8; // ST40_4@3
  double v12; // st7@3
  double v13; // st6@5
  NiProperty *v14; // eax@6
  double v15; // st7@6
  int v16; // eax@12
  double v17; // st7@13
  int v18; // ST38_4@13
  int v19; // ST3C_4@13
  _BYTE v20[12]; // ST0C_12@15
  float fScreenHeight; // ST08_4@15
  float fScreenWidth; // ST04_4@15
  NiScreenElements *v23; // eax@17
  NiScreenElements *v24; // eax@17
  float v25; // eax@17
  double v26; // st5@17
  float v27; // ecx@17
  double v28; // st7@17
  __int64 kCurPos_4; // [sp+30h] [bp-2Ch]@3
  float fDistance; // [sp+44h] [bp-18h]@1
  NiPoint3 k2DOrthoPos; // [sp+48h] [bp-14h]@3
  float fDistNF; // [sp+54h] [bp-8h]@1

  v4 = this;
  LODWORD(fDistNF) = this->m_kCharHandle;
  std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,long>>,0>>::find(
    &g_kMiniHouseMgr,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > > *)&fDistance,
    (const unsigned __int16 *)&fDistNF);
  if ( (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)LODWORD(fDistance) == stru_B5C138._Ptr
    || (v5 = *(_DWORD *)(LODWORD(fDistance) + 16)) == 0
    || (v6 = *(_DWORD *)(v5 + 36),
        v8 = *(_DWORD *)(v6 + 148),
        LODWORD(kCurPos_4) = *(_DWORD *)(v6 + 144),
        k2DOrthoPos.x = *(float *)(v6 + 140),
        v7 = k2DOrthoPos.x,
        HIDWORD(kCurPos_4) = v8,
        k2DOrthoPos.y = *(float *)(v6 + 144),
        k2DOrthoPos.z = *(float *)(v6 + 148),
        kHousePos = ::pkWorldCamera->m_kLocal.m_Translate.x - k2DOrthoPos.x,
        kHousePos_4 = ::pkWorldCamera->m_kLocal.m_Translate.y - k2DOrthoPos.y,
        kHousePos_8 = ::pkWorldCamera->m_kLocal.m_Translate.z - k2DOrthoPos.z,
        fDistNF = kHousePos_4 * kHousePos_4 + kHousePos * kHousePos + kHousePos_8 * kHousePos_8,
        fDistNF = sqrt(fDistNF),
        fDistance = fDistNF,
        v12 = fDistNF,
        fDistNF > (double)NameBD::ms_fMaxDistance) )
  {
    v4->m_bAlive = 0;
    return;
  }
  v13 = NameBD::ms_fTransNear;
  if ( NameBD::ms_fTransNear <= v12 )
  {
    if ( NameBD::ms_fTransFar >= v12 )
    {
      fDistance = v12 - v13;
      fDistNF = NameBD::ms_fTransFar - v13;
      if ( 0.0 == fDistNF )
        goto LABEL_12;
      v14 = NiAVObject::GetProperty((NiAVObject *)&v4->m_spScreenGeom.m_pObject->vfptr, 3);
      v15 = 1.0 - fDistance / fDistNF;
    }
    else
    {
      v14 = NiAVObject::GetProperty((NiAVObject *)&v4->m_spScreenGeom.m_pObject->vfptr, 3);
      v15 = 0.0;
    }
  }
  else
  {
    v14 = NiAVObject::GetProperty((NiAVObject *)&v4->m_spScreenGeom.m_pObject->vfptr, 3);
    v15 = 1.0;
  }
  ++v14[3].m_uiRefCount;
  *(float *)&v14[3].vfptr = v15;
LABEL_12:
  v16 = (*(int (__stdcall **)(const char *))(**(_DWORD **)(v5 + 36) + 72))("Name");
  if ( v16 )
  {
    v17 = *(float *)(v16 + 148);
    v18 = *(_DWORD *)(v16 + 140);
    v19 = *(_DWORD *)(v16 + 144);
  }
  else
  {
    v17 = *((float *)&kCurPos_4 + 1) + 56.0;
  }
  *((float *)&kCurPos_4 + 1) = v17;
  *(float *)v20 = v7;
  *(_QWORD *)&v20[4] = kCurPos_4;
  fScreenHeight = (double)PgWin::ms_uiScreenHeight;
  fScreenWidth = (double)PgWin::ms_uiScreenWidth;
  if ( PgUtil::Get2DOrthoPosFrom3DPos(pkWorldCamera, fScreenWidth, fScreenHeight, *(NiPoint3 *)v20, &k2DOrthoPos) )
  {
    v23 = v4->m_spScreenGeom.m_pObject;
    v4->m_kColorRef = 0xFFFF;
    v4->m_uiCharacterTitleLen = 0;
    v23->m_uFlags &= 0xFFFEu;
    v24 = v4->m_spScreenGeom.m_pObject;
    k2DOrthoPos.x = k2DOrthoPos.x - 139.0;
    k2DOrthoPos.y = k2DOrthoPos.y - 22.0;
    v24->m_kLocal.m_Translate = k2DOrthoPos;
    v25 = k2DOrthoPos.y;
    v26 = k2DOrthoPos.x;
    v27 = k2DOrthoPos.z;
    v28 = (double)v4->m_kTextRect.left + k2DOrthoPos.x;
    v4->m_k2DOrthoPos.x = k2DOrthoPos.x;
    v4->m_k2DOrthoPos.y = v25;
    v4->m_k2DOrthoPos.z = v27;
    if ( (signed int)PgWin::ms_iMsX > (signed int)v28
      && (signed int)PgWin::ms_iMsX < (signed int)(v26 + (double)v4->m_kTextRect.right)
      && PgWin::ms_iMsY > (signed int)((double)v4->m_kTextRect.top + k2DOrthoPos.y)
      && PgWin::ms_iMsY < (signed int)(k2DOrthoPos.y + (double)v4->m_kTextRect.bottom)
      && (!g_ClickedMiniHouseBD || g_ClickedNameBD && g_ClickedNameBD->m_k2DOrthoPos.z > (double)v4->m_k2DOrthoPos.z) )
    {
      g_ClickedMiniHouseBD = v4;
    }
    NiAVObject::Update((NiAVObject *)&v4->m_spScreenGeom.m_pObject->vfptr, fTime, 1);
  }
  else
  {
    v4->m_spScreenGeom.m_pObject->m_uFlags |= 1u;
  }
}
// A72E88: using guessed type float NameBD::ms_fMaxDistance;
// A72E8C: using guessed type float NameBD::ms_fTransNear;
// A72E90: using guessed type float NameBD::ms_fTransFar;
// A96840: using guessed type struct NameBD *g_ClickedMiniHouseBD;

//----- (0061F880) --------------------------------------------------------
NameBD *__thiscall NameBD::`scalar deleting destructor'(NameBD *this, unsigned int a2)
{
  NameBD *v2; // esi@1

  v2 = this;
  NameBD::~NameBD(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0061F8B0) --------------------------------------------------------
void __usercall DrawVLine(unsigned int uiPitch@<esi>, unsigned int uiY1@<edx>, unsigned int uiY2@<eax>, unsigned int uiColor@<edi>, unsigned int *puiDest, unsigned int uiX)
{
  unsigned int v6; // eax@1
  char *i; // ecx@1

  v6 = uiY2 - uiY1 + 1;
  for ( i = (char *)&puiDest[uiX] + uiY1 * uiPitch; v6; --v6 )
  {
    *(_DWORD *)i = uiColor;
    i += uiPitch;
  }
}

//----- (0061F8E0) --------------------------------------------------------
void __usercall FillSpr(unsigned int uiPitch@<eax>, unsigned int uiSrcWidth@<ebx>, unsigned int uiSrcHeight@<edx>, unsigned int *puiDest, unsigned int uiX, unsigned int uiY, char *pbySrc, unsigned int uiSolidColor, unsigned int uiTransColor)
{
  char *v9; // esi@1
  char *v10; // ecx@1
  unsigned int v11; // eax@1
  unsigned int v12; // edi@4
  unsigned int v13; // edx@6
  unsigned int uiYa; // [sp+18h] [bp+10h]@2

  v9 = pbySrc;
  v10 = (char *)&puiDest[uiX] + uiY * uiPitch;
  v11 = uiPitch - 4 * uiSrcWidth;
  if ( uiSrcHeight )
  {
    uiYa = uiSrcHeight;
    while ( !uiSrcWidth )
    {
LABEL_11:
      v10 += v11;
      if ( !--uiYa )
        return;
    }
    v12 = uiSrcWidth;
    while ( *v9 != 1 )
    {
      if ( *v9 == 2 )
      {
        v13 = uiTransColor;
        goto LABEL_9;
      }
LABEL_10:
      v10 += 4;
      ++v9;
      if ( !--v12 )
        goto LABEL_11;
    }
    v13 = uiSolidColor;
LABEL_9:
    *(_DWORD *)v10 = v13;
    goto LABEL_10;
  }
}

//----- (0061F940) --------------------------------------------------------
bool __thiscall PrivateStoreBD::IsAlive(PrivateStoreBD *this, float fTime)
{
  return this->m_bAlive && fTime - this->m_fStartTime <= PrivateStoreBD::ms_fLifeTime;
}
// A72EFC: using guessed type float PrivateStoreBD::ms_fLifeTime;

//----- (0061F970) --------------------------------------------------------
void __thiscall PrivateStoreBD::EndDraw(PrivateStoreBD *this)
{
  PrivateStoreBD *v1; // esi@1

  v1 = this;
  if ( this->m_lpSurSrc )
    this->m_lpSurSrc->lpVtbl->Release((IUnknown *)this->m_lpSurSrc);
  if ( v1->m_lpSurDest )
    v1->m_lpSurDest->lpVtbl->Release((IUnknown *)v1->m_lpSurDest);
}

//----- (0061F9A0) --------------------------------------------------------
void __usercall DrawHLine(unsigned int uiPitch@<ecx>, unsigned int uiX1@<edx>, unsigned int uiX2@<eax>, unsigned int *puiDest, unsigned int uiY, unsigned int uiColor)
{
  memset32((char *)&puiDest[uiX1] + uiY * uiPitch, uiColor, uiX2 - uiX1 + 1);
}

//----- (0061F9D0) --------------------------------------------------------
void __usercall CalculateStrlenInWidth_1(char *pcText@<eax>, unsigned int *dwStrLen@<ebx>, unsigned int *dwWidth@<esi>, HDC__ *hDC, unsigned int dwMaxWidth)
{
  char *v5; // edi@1
  char v6; // al@2
  int v7; // eax@4
  tagSIZE kSize; // [sp+4h] [bp-8h]@4

  v5 = pcText;
  *dwStrLen = 0;
  *dwWidth = 0;
  if ( pcText )
  {
    v6 = *pcText;
    if ( v6 )
    {
      do
      {
        if ( IsDBCSLeadByte(v6) )
        {
          GetTextExtentPoint32A(hDC, v5, 2, &kSize);
          v7 = kSize.cx;
          if ( kSize.cx + *dwWidth > dwMaxWidth )
            return;
          v5 += 2;
          *dwStrLen += 2;
        }
        else
        {
          if ( *v5 == 10 )
          {
            ++*dwStrLen;
            return;
          }
          GetTextExtentPoint32A(hDC, v5, 1, &kSize);
          v7 = kSize.cx;
          if ( kSize.cx + *dwWidth > dwMaxWidth )
            return;
          ++v5;
          ++*dwStrLen;
        }
        *dwWidth += v7;
        v6 = *v5;
      }
      while ( *v5 );
    }
  }
}

//----- (0061FA60) --------------------------------------------------------
bool __thiscall PrivateStoreBD::BeginDraw(PrivateStoreBD *this)
{
  PrivateStoreBD *v1; // edi@1
  NiTexture::RendererData *v2; // ecx@1
  bool result; // al@2
  int v4; // eax@3
  int v5; // ecx@5
  int v6; // eax@6

  v1 = this;
  v2 = this->m_pkTexture->m_pkRendererData;
  if ( v2 && (v4 = ((int (*)(void))v2->vfptr[1].GetWidth)()) != 0 )
  {
    (*(void (__stdcall **)(int, _DWORD, IDirect3DSurface9 **))(*(_DWORD *)v4 + 72))(v4, 0, &v1->m_lpSurDest);
    if ( v1->m_lpSurDest
      && (v5 = *(_DWORD *)(PrivateStoreBD::ms_spTempTexture + 40)) != 0
      && (v6 = (*(int (**)(void))(*(_DWORD *)v5 + 20))()) != 0 )
    {
      (*(void (__stdcall **)(int, _DWORD, IDirect3DSurface9 **))(*(_DWORD *)v6 + 72))(v6, 0, &v1->m_lpSurSrc);
      result = v1->m_lpSurSrc != 0;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A96858: using guessed type int PrivateStoreBD::ms_spTempTexture;

//----- (0061FAD0) --------------------------------------------------------
void __usercall PrivateStoreBD::CalculateLine(PrivateStoreBD *this@<ecx>, void **a2@<ebx>)
{
  PrivateStoreBD *v2; // edi@1
  IDirect3DSurface9 *v3; // eax@1
  const char *v4; // ebx@2
  char *v5; // eax@2
  HDC__ *v6; // ST0C_4@4
  unsigned int v7; // eax@7
  unsigned int v8; // esi@8
  unsigned int v9; // eax@8
  int v10; // edx@8
  tagSIZE kSize; // [sp+8h] [bp-34h]@2
  unsigned int dwTextWidth; // [sp+10h] [bp-2Ch]@4
  unsigned int dwStrLen; // [sp+14h] [bp-28h]@4
  unsigned int i; // [sp+18h] [bp-24h]@2
  char *pcText; // [sp+1Ch] [bp-20h]@2
  unsigned int *v16; // [sp+20h] [bp-1Ch]@2
  HDC__ *hDC; // [sp+24h] [bp-18h]@2
  tagRECT kRect; // [sp+28h] [bp-14h]@2

  v2 = this;
  v3 = this->m_lpSurSrc;
  if ( v3 )
  {
    this->m_uiTotalLine = 0;
    this->m_uiTextWidth = 0;
    this->m_uiTextHeight = 0;
    this->m_uiLineHeight = 0;
    v3->lpVtbl[5].QueryInterface((IUnknown *)v3, (_GUID *const )&hDC, a2);
    SetRect(&kRect, 0, 0, 228, 81);
    FillRect(hDC, &kRect, PrivateStoreBD::ms_hEraseBrush);
    SelectObject(hDC, PrivateStoreBD::ms_hFont);
    v4 = v2->m_pcSpeech;
    GetTextExtentPoint32A(hDC, "W", 1, &kSize);
    v2->m_uiLineHeight = kSize.cy;
    v5 = fs(0);
    strcpy(v5, v4);
    v5[strlen(v5) + 1] = 0;
    pcText = v5;
    i = 0;
    v16 = v2->m_auiLineStrLen;
    while ( 1 )
    {
      v6 = hDC;
      *(v16 - 4) = (unsigned int)v5;
      CalculateStrlenInWidth_1(v5, &dwStrLen, &dwTextWidth, v6, 0xC8u);
      if ( !dwStrLen )
        break;
      pcText += dwStrLen;
      *v16 = dwStrLen;
      if ( v2->m_uiTextWidth < dwTextWidth )
        v2->m_uiTextWidth = dwTextWidth;
      v7 = i;
      ++v2->m_uiTotalLine;
      ++v16;
      i = v7 + 1;
      if ( v7 + 1 >= 4 )
        break;
      v5 = pcText;
    }
    v8 = v2->m_uiTextWidth;
    v9 = (228 - v8) >> 1;
    v10 = v2->m_uiTotalLine * (v2->m_uiLineHeight + 1) - 1;
    v2->m_iTextXPos = v9;
    v2->m_iTextYPos = 69 - v10;
    v2->m_kTextRect.left = v9 - 5;
    v2->m_kTextRect.right = v9 + v8 + 4;
    v2->m_kTextRect.bottom = 73;
    v2->m_kTextRect.top = 69 - v10 - 5;
    v2->m_uiTextWidth = v8 + 9;
    v2->m_uiTextHeight = v10 + 9;
    v2->m_lpSurSrc->lpVtbl[5].AddRef((IUnknown *)v2->m_lpSurSrc);
  }
}

//----- (0061FC60) --------------------------------------------------------
void __thiscall PrivateStoreBD::DrawFrame(PrivateStoreBD *this)
{
  PrivateStoreBD *v1; // esi@1
  IDirect3DSurface9 *v2; // eax@2
  char *v3; // edx@3
  char *v4; // eax@3
  signed int v5; // ebx@3
  signed int v6; // edi@4
  char *v7; // edx@11
  char *v8; // eax@11
  signed int v9; // ebx@11
  signed int v10; // edi@12
  char *v11; // edx@19
  char *v12; // eax@19
  signed int v13; // ebx@19
  signed int v14; // edi@20
  char *v15; // edx@27
  char *v16; // eax@27
  signed int v17; // ebx@27
  signed int v18; // edi@28
  int v19; // eax@35
  char *v20; // ST18_4@35
  int v21; // eax@35
  unsigned int v22; // edx@35
  int v23; // ecx@35
  char *v24; // edi@35
  int v25; // eax@35
  char *v26; // edx@38
  int v27; // eax@38
  _D3DLOCKED_RECT kLockRectSrc; // [sp+Ch] [bp-20h]@2
  char *v29; // [sp+14h] [bp-18h]@3
  tagRECT rc; // [sp+18h] [bp-14h]@2

  v1 = this;
  if ( this->m_lpSurSrc )
  {
    v2 = this->m_lpSurSrc;
    rc.left = 0;
    rc.top = 0;
    rc.right = 227;
    rc.bottom = 80;
    if ( !((int (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v2->lpVtbl[4].AddRef)(v2, &kLockRectSrc, &rc, 0) )
    {
      v3 = ms_abyBoardLeftTopSpr;
      v4 = (char *)kLockRectSrc.pBits + 4 * v1->m_kTextRect.left + kLockRectSrc.Pitch * (v1->m_kTextRect.top - 3) - 12;
      v29 = (char *)(kLockRectSrc.Pitch - 16);
      v5 = 4;
      do
      {
        v6 = 4;
        do
        {
          if ( *v3 == 1 )
          {
            *(_DWORD *)v4 = 0xFFFFFF;
          }
          else if ( *v3 == 2 )
          {
            *(_DWORD *)v4 = 16712191;
          }
          v4 += 4;
          ++v3;
          --v6;
        }
        while ( v6 );
        v4 = &v4[(_DWORD)v29];
        --v5;
      }
      while ( v5 );
      v7 = ms_abyBoardLeftBottomSpr;
      v8 = (char *)kLockRectSrc.pBits + 4 * v1->m_kTextRect.left + kLockRectSrc.Pitch * v1->m_kTextRect.bottom - 12;
      v29 = (char *)(kLockRectSrc.Pitch - 16);
      v9 = 4;
      do
      {
        v10 = 4;
        do
        {
          if ( *v7 == 1 )
          {
            *(_DWORD *)v8 = 0xFFFFFF;
          }
          else if ( *v7 == 2 )
          {
            *(_DWORD *)v8 = 16712191;
          }
          v8 += 4;
          ++v7;
          --v10;
        }
        while ( v10 );
        v8 = &v8[(_DWORD)v29];
        --v9;
      }
      while ( v9 );
      v11 = ms_abyBoardRightTopSpr;
      v12 = (char *)kLockRectSrc.pBits + 4 * v1->m_kTextRect.right + kLockRectSrc.Pitch * (v1->m_kTextRect.top - 3);
      v29 = (char *)(kLockRectSrc.Pitch - 16);
      v13 = 4;
      do
      {
        v14 = 4;
        do
        {
          if ( *v11 == 1 )
          {
            *(_DWORD *)v12 = 0xFFFFFF;
          }
          else if ( *v11 == 2 )
          {
            *(_DWORD *)v12 = 16712191;
          }
          v12 += 4;
          ++v11;
          --v14;
        }
        while ( v14 );
        v12 = &v12[(_DWORD)v29];
        --v13;
      }
      while ( v13 );
      v15 = ms_abyBoardRightBottomSpr;
      v16 = (char *)kLockRectSrc.pBits + 4 * v1->m_kTextRect.right + kLockRectSrc.Pitch * v1->m_kTextRect.bottom;
      v29 = (char *)(kLockRectSrc.Pitch - 16);
      v17 = 4;
      do
      {
        v18 = 4;
        do
        {
          if ( *v15 == 1 )
          {
            *(_DWORD *)v16 = 0xFFFFFF;
          }
          else if ( *v15 == 2 )
          {
            *(_DWORD *)v16 = 16712191;
          }
          v16 += 4;
          ++v15;
          --v18;
        }
        while ( v18 );
        v16 = &v16[(_DWORD)v29];
        --v17;
      }
      while ( v17 );
      v19 = v1->m_kTextRect.left;
      v20 = (char *)kLockRectSrc.pBits + 4 * v19 + kLockRectSrc.Pitch * (v1->m_kTextRect.top - 2);
      v29 = (char *)(v1->m_kTextRect.right - v19 + 1);
      memset32(v20, 0xFFFFFF, (unsigned int)v29);
      v21 = v1->m_kTextRect.left;
      v22 = v1->m_kTextRect.right - v21 + 1;
      v29 = (char *)kLockRectSrc.pBits + 4 * v21 + kLockRectSrc.Pitch * (v1->m_kTextRect.bottom + 2);
      memset32(v29, 0xFFFFFF, v22);
      v23 = kLockRectSrc.Pitch;
      v24 = (char *)kLockRectSrc.pBits + 4 * v1->m_kTextRect.left + kLockRectSrc.Pitch * v1->m_kTextRect.top - 8;
      v25 = v1->m_kTextRect.bottom - v1->m_kTextRect.top + 1;
      if ( v1->m_kTextRect.bottom - v1->m_kTextRect.top != -1 )
      {
        do
        {
          *(_DWORD *)v24 = 0xFFFFFF;
          v24 += v23;
          --v25;
        }
        while ( v25 );
        v23 = kLockRectSrc.Pitch;
      }
      v26 = (char *)kLockRectSrc.pBits + 4 * v1->m_kTextRect.right + v23 * v1->m_kTextRect.top + 8;
      v27 = v1->m_kTextRect.bottom - v1->m_kTextRect.top + 1;
      if ( v1->m_kTextRect.bottom - v1->m_kTextRect.top != -1 )
      {
        do
        {
          *(_DWORD *)v26 = 0xFFFFFF;
          v26 += v23;
          --v27;
        }
        while ( v27 );
      }
      v1->m_lpSurSrc->lpVtbl[4].Release((IUnknown *)v1->m_lpSurSrc);
    }
  }
}

//----- (0061FED0) --------------------------------------------------------
void __usercall PrivateStoreBD::DrawTextA(PrivateStoreBD *this@<ecx>, void **a2@<edi>)
{
  PrivateStoreBD *v2; // esi@1
  Char *v3; // eax@3
  int v4; // edi@7
  int v5; // ebx@8
  int iTextXPos; // [sp+4h] [bp-Ch]@7
  unsigned int i; // [sp+8h] [bp-8h]@7
  HDC__ *hDC; // [sp+Ch] [bp-4h]@7

  v2 = this;
  if ( this->m_lpSurSrc )
  {
    if ( this->m_kCharHandle != -1 )
    {
      v3 = CharMgr::GetChar(&g_kCharMgr, this->m_kCharHandle);
      if ( v3 )
      {
        if ( g_ClickedPrivateStoreBD != v2 )
        {
          v2->m_kColorRef = 15776401;
          if ( v3->m_bIsSell )
            v2->m_kColorRef = 12436211;
        }
        v2->m_lpSurSrc->lpVtbl[5].QueryInterface((IUnknown *)v2->m_lpSurSrc, (_GUID *const )&hDC, a2);
        SetBkMode(hDC, 1);
        SetTextColor(hDC, v2->m_kColorRef);
        SelectObject(hDC, PrivateStoreBD::ms_hFont);
        v4 = v2->m_iTextYPos;
        iTextXPos = v2->m_iTextXPos;
        i = 0;
        if ( v2->m_uiTotalLine )
        {
          v5 = (int)v2->m_apcLineText;
          do
          {
            TextOutA(hDC, iTextXPos, v4, *(LPCSTR *)v5, *(_DWORD *)(v5 + 16));
            v5 += 4;
            v4 += v2->m_uiLineHeight + 1;
            ++i;
          }
          while ( i < v2->m_uiTotalLine );
        }
        v2->m_lpSurSrc->lpVtbl[5].AddRef((IUnknown *)v2->m_lpSurSrc);
      }
    }
  }
}

//----- (0061FFD0) --------------------------------------------------------
void __thiscall PrivateStoreBD::CopyTexture(PrivateStoreBD *this)
{
  PrivateStoreBD *v1; // esi@1
  IDirect3DSurface9 *v2; // eax@3
  signed int v3; // ebx@3
  int v4; // ecx@4
  IDirect3DSurface9 *v5; // eax@4
  char *v6; // edx@5
  unsigned int v7; // ebx@7
  int v8; // eax@8
  int v9; // ecx@11
  int v10; // eax@11
  int v11; // ecx@11
  char *v12; // ebx@11
  bool v13; // zf@12
  signed int v14; // ebx@13
  signed int v15; // edi@14
  int v16; // eax@15
  int v17; // ecx@19
  unsigned int uiDestSkipBytes; // [sp+8h] [bp-40h]@5
  unsigned int uiSrcSkipBytes; // [sp+Ch] [bp-3Ch]@5
  char *pSrcBytes; // [sp+14h] [bp-34h]@5
  _D3DLOCKED_RECT kLockRectSrc; // [sp+1Ch] [bp-2Ch]@3
  unsigned int v22; // [sp+24h] [bp-24h]@8
  _D3DLOCKED_RECT kLockRectDest; // [sp+28h] [bp-20h]@4
  char *pTempDest; // [sp+30h] [bp-18h]@5
  tagRECT rc; // [sp+34h] [bp-14h]@3

  v1 = this;
  if ( this->m_lpSurSrc )
  {
    if ( this->m_lpSurDest )
    {
      v2 = this->m_lpSurSrc;
      v3 = 81;
      rc.left = 0;
      rc.top = 0;
      rc.right = 228;
      rc.bottom = 81;
      if ( !((int (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v2->lpVtbl[4].AddRef)(v2, &kLockRectSrc, &rc, 0) )
      {
        v4 = v1->m_uiTextureYPos;
        rc.left = v1->m_uiTextureXPos;
        rc.top = v4;
        rc.right = rc.left + 228;
        v5 = v1->m_lpSurDest;
        rc.bottom = v4 + 81;
        if ( !((int (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v5->lpVtbl[4].AddRef)(v5, &kLockRectDest, &rc, 0) )
        {
          v6 = (char *)kLockRectDest.pBits;
          pSrcBytes = (char *)kLockRectSrc.pBits;
          uiDestSkipBytes = kLockRectDest.Pitch - 912;
          uiSrcSkipBytes = kLockRectSrc.Pitch - 912;
          pTempDest = (char *)kLockRectDest.pBits;
          do
          {
            memset(pTempDest, 0, 0x390u);
            pTempDest += kLockRectDest.Pitch;
            --v3;
          }
          while ( v3 );
          pTempDest = &v6[4 * v1->m_kTextRect.left] + kLockRectDest.Pitch * (v1->m_kTextRect.top - 3);
          v7 = 4;
          do
          {
            v22 = v1->m_uiTextWidth;
            memset32(pTempDest, 2147483648, v22);
            v8 = kLockRectDest.Pitch;
            pTempDest += kLockRectDest.Pitch;
            --v7;
          }
          while ( v7 );
          pTempDest = &v6[4 * v1->m_kTextRect.left - 12] + kLockRectDest.Pitch * (v1->m_kTextRect.top + 1);
          if ( v1->m_uiTextHeight > 0 )
          {
            do
            {
              v22 = v1->m_uiTextWidth + 7;
              memset32(pTempDest, 2147483648, v22);
              v8 = kLockRectDest.Pitch;
              pTempDest += kLockRectDest.Pitch;
              ++v7;
            }
            while ( v7 < v1->m_uiTextHeight );
          }
          v9 = v8 * v1->m_kTextRect.bottom;
          v10 = v1->m_kTextRect.left;
          v11 = (int)&v6[v9];
          v12 = (char *)(v11 + 4 * v10);
          pTempDest = (char *)(v11 + 4 * v10);
          v22 = 4;
          do
          {
            memset32(pTempDest, 2147483648, v1->m_uiTextWidth);
            v12 += kLockRectDest.Pitch;
            v13 = v22-- == 1;
            pTempDest = v12;
          }
          while ( !v13 );
          v14 = 81;
          do
          {
            v15 = 228;
            do
            {
              v16 = *(_DWORD *)pSrcBytes & 0xFFFFFF;
              if ( v16 == 16712191 )
              {
                *(_DWORD *)v6 = 2147483648;
                v6[3] = -128;
              }
              else if ( v16 != 16711935 )
              {
                *(_DWORD *)v6 = v16;
                v6[3] = -1;
              }
              v17 = (int)(pSrcBytes + 4);
              v6 += 4;
              --v15;
              pSrcBytes += 4;
            }
            while ( v15 );
            v6 += uiDestSkipBytes;
            --v14;
            pSrcBytes = (char *)(uiSrcSkipBytes + v17);
          }
          while ( v14 );
          v1->m_lpSurDest->lpVtbl[4].Release((IUnknown *)v1->m_lpSurDest);
          v1->m_lpSurSrc->lpVtbl[4].Release((IUnknown *)v1->m_lpSurSrc);
        }
      }
    }
  }
}

//----- (006201D0) --------------------------------------------------------
void __thiscall PrivateStoreBD::~PrivateStoreBD(PrivateStoreBD *this)
{
  PrivateStoreBD *v1; // esi@1
  NiScreenElements *v2; // edi@1
  NiScreenElements *v3; // esi@6

  v1 = this;
  this->vfptr = (PrivateStoreBDVtbl *)&PrivateStoreBD::`vftable';
  v2 = this->m_spScreenGeom.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spScreenGeom.m_pObject = 0;
  }
  operator delete[](v1->m_pcSpeech);
  v3 = v1->m_spScreenGeom.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
  {
    if ( v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  }
}
// 9B7010: using guessed type int (__thiscall *PrivateStoreBD::`vftable')(void *p, char);

//----- (00620280) --------------------------------------------------------
void __userpurge PrivateStoreBD::SetSpeech(PrivateStoreBD *this@<ecx>, void **a2@<edi>, char *pcSpeech)
{
  PrivateStoreBD *v3; // esi@1
  unsigned int v4; // kr00_4@3
  char *v5; // edx@5
  char *v6; // ecx@5
  char v7; // al@6
  IDirect3DSurface9 *v8; // eax@8
  IDirect3DSurface9 *v9; // eax@10
  char *v10; // eax@13

  v3 = this;
  if ( pcSpeech && *pcSpeech )
  {
    v4 = strlen(pcSpeech);
    if ( v3->m_uiSpeechLen < v4 )
    {
      operator delete[](v3->m_pcSpeech);
      v3->m_pcSpeech = (char *)operator new[](v4 + 1);
      v3->m_uiSpeechLen = v4;
    }
    v5 = v3->m_pcSpeech;
    v6 = pcSpeech;
    do
    {
      v7 = *v6;
      *v5++ = *v6++;
    }
    while ( v7 );
    if ( PrivateStoreBD::BeginDraw(v3) )
    {
      PrivateStoreBD::CalculateLine(v3, (void **)pcSpeech);
      PrivateStoreBD::DrawFrame(v3);
      PrivateStoreBD::DrawTextA(v3, a2);
      PrivateStoreBD::CopyTexture(v3);
      v8 = v3->m_lpSurSrc;
      if ( v8 )
        v8->lpVtbl->Release((IUnknown *)v3->m_lpSurSrc);
      v9 = v3->m_lpSurDest;
      if ( v9 )
        v9->lpVtbl->Release((IUnknown *)v3->m_lpSurDest);
    }
    sprintf(v3->m_kBDText, "%s", pcSpeech);
  }
  else
  {
    v10 = this->m_pcSpeech;
    if ( v10 )
    {
      *v10 = 0;
      this->m_uiTotalLine = 0;
    }
  }
}
// 620280: could not find valid save-restore pair for edi

//----- (00620360) --------------------------------------------------------
void __thiscall PrivateStoreBD::Update(PrivateStoreBD *this, float fTime, NiCamera *pkWorldCamera, PgWinCamera *pkScreenCamera)
{
  PrivateStoreBD *v4; // esi@1
  unsigned __int16 v5; // ST18_2@1
  Char *v6; // eax@1
  Char *v7; // edi@1
  int v8; // eax@2
  double v9; // st7@2
  double v10; // st6@4
  NiProperty *v11; // eax@5
  double v12; // st7@5
  _BYTE v13[12]; // ST0C_12@11
  float fScreenHeight; // ST08_4@11
  float fScreenWidth; // ST04_4@11
  float v16; // eax@15
  double v17; // st5@15
  float v18; // ecx@15
  double v19; // st7@15
  void **v20; // edi@15
  NiPoint3 kWorldPos; // [sp+24h] [bp-2Ch]@11
  float v22; // [sp+30h] [bp-20h]@2
  float v23; // [sp+34h] [bp-1Ch]@2
  float v24; // [sp+38h] [bp-18h]@2
  NiPoint3 k2DOrthoPos; // [sp+3Ch] [bp-14h]@11
  float fDistNF; // [sp+48h] [bp-8h]@2
  float fDistance; // [sp+4Ch] [bp-4h]@2

  v4 = this;
  v5 = this->m_kCharHandle;
  this->m_kColorRef = 0xFFFFFF;
  v6 = CharMgr::GetChar(&g_kCharMgr, v5);
  v7 = v6;
  if ( !v6
    || (v8 = ((int (__thiscall *)(Char *))v6->vfptr[6].Deaffect)(v6),
        v22 = ::pkWorldCamera->m_kLocal.m_Translate.x - *(float *)v8,
        v23 = ::pkWorldCamera->m_kLocal.m_Translate.y - *(float *)(v8 + 4),
        v24 = ::pkWorldCamera->m_kLocal.m_Translate.z - *(float *)(v8 + 8),
        fDistNF = v22 * v22 + v23 * v23 + v24 * v24,
        fDistNF = sqrt(fDistNF),
        fDistance = fDistNF,
        v9 = fDistNF,
        fDistNF > (double)PrivateStoreBD::ms_fMaxDistance) )
  {
    v4->m_bAlive = 0;
    return;
  }
  v10 = PrivateStoreBD::ms_fTransNear;
  if ( PrivateStoreBD::ms_fTransNear <= v9 )
  {
    if ( PrivateStoreBD::ms_fTransFar >= v9 )
    {
      fDistance = v9 - v10;
      fDistNF = PrivateStoreBD::ms_fTransFar - v10;
      if ( 0.0 == fDistNF )
        goto LABEL_11;
      v11 = NiAVObject::GetProperty((NiAVObject *)&v4->m_spScreenGeom.m_pObject->vfptr, 3);
      v12 = 1.0 - fDistance / fDistNF;
    }
    else
    {
      v11 = NiAVObject::GetProperty((NiAVObject *)&v4->m_spScreenGeom.m_pObject->vfptr, 3);
      v12 = 0.0;
    }
  }
  else
  {
    v11 = NiAVObject::GetProperty((NiAVObject *)&v4->m_spScreenGeom.m_pObject->vfptr, 3);
    v12 = 1.0;
  }
  ++v11[3].m_uiRefCount;
  *(float *)&v11[3].vfptr = v12;
LABEL_11:
  Char::GetHeightPos(v7, 1, &kWorldPos);
  kWorldPos.z = kWorldPos.z + 3.0;
  *(float *)v13 = kWorldPos.x;
  *(_QWORD *)&v13[4] = *(_QWORD *)&kWorldPos.y;
  fScreenHeight = (double)PgWin::ms_uiScreenHeight;
  fScreenWidth = (double)PgWin::ms_uiScreenWidth;
  if ( PgUtil::Get2DOrthoPosFrom3DPos(pkWorldCamera, fScreenWidth, fScreenHeight, *(NiPoint3 *)v13, &k2DOrthoPos) )
  {
    v4->m_spScreenGeom.m_pObject->m_uFlags &= 0xFFFEu;
    k2DOrthoPos.x = k2DOrthoPos.x - 114.0;
    k2DOrthoPos.y = k2DOrthoPos.y - 102.0;
    if ( v7 == g_pkMainChar )
      k2DOrthoPos.y = k2DOrthoPos.y - 8.0;
    v4->m_spScreenGeom.m_pObject->m_kLocal.m_Translate = k2DOrthoPos;
    v16 = k2DOrthoPos.y;
    v17 = k2DOrthoPos.x;
    v18 = k2DOrthoPos.z;
    v19 = (double)v4->m_kTextRect.left + k2DOrthoPos.x;
    v4->m_k2DOrthoPos.x = k2DOrthoPos.x;
    v4->m_k2DOrthoPos.y = v16;
    v4->m_k2DOrthoPos.z = v18;
    v20 = (void **)PgWin::ms_iMsX;
    if ( (signed int)PgWin::ms_iMsX > (signed int)v19
      && (signed int)PgWin::ms_iMsX < (signed int)(v17 + (double)v4->m_kTextRect.right) )
    {
      v20 = (void **)PgWin::ms_iMsY;
      if ( PgWin::ms_iMsY > (signed int)((double)v4->m_kTextRect.top + k2DOrthoPos.y)
        && PgWin::ms_iMsY < (signed int)(k2DOrthoPos.y + (double)v4->m_kTextRect.bottom) )
      {
        if ( g_ClickedPrivateStoreBD )
        {
          if ( g_ClickedPrivateStoreBD->m_k2DOrthoPos.z > (double)v4->m_k2DOrthoPos.z )
          {
            g_ClickedPrivateStoreBD = v4;
            v4->m_bMouseOver = 1;
          }
        }
        else
        {
          g_ClickedPrivateStoreBD = v4;
          v4->m_bMouseOver = 1;
        }
      }
    }
    NiAVObject::Update((NiAVObject *)&v4->m_spScreenGeom.m_pObject->vfptr, fTime, 1);
    if ( v4->m_bMouseOver )
    {
      if ( g_ClickedPrivateStoreBD != v4 )
      {
        PrivateStoreBD::SetSpeech(v4, v20, v4->m_kBDText);
        v4->m_bMouseOver = 0;
      }
    }
  }
  else
  {
    v4->m_spScreenGeom.m_pObject->m_uFlags |= 1u;
  }
}
// A72F00: using guessed type float PrivateStoreBD::ms_fMaxDistance;
// A72F04: using guessed type float PrivateStoreBD::ms_fTransNear;
// A72F08: using guessed type float PrivateStoreBD::ms_fTransFar;

//----- (00620640) --------------------------------------------------------
void __thiscall PrivateStoreBD::CreateGeometry(PrivateStoreBD *this, NiTexture *pkTexture, int iTexturePosIndex)
{
  PrivateStoreBD *v3; // esi@1
  NiTexture *v4; // edi@1
  unsigned int v5; // ebx@1
  unsigned int v6; // eax@1
  unsigned int v7; // ecx@1
  NiTexture *v8; // ST08_4@1
  NiScreenElementsData *v9; // ebx@1
  NiTexture *v10; // eax@1
  NiTexture *v11; // eax@2
  NiTexture *v12; // ebx@4
  NiTexture *v13; // eax@12
  int v14; // eax@13
  int v15; // ebx@13
  NiTexture *v16; // eax@17
  int v17; // eax@18
  int v18; // edi@18

  v3 = this;
  v4 = pkTexture;
  v5 = ((int (__thiscall *)(NiTexture *))pkTexture->vfptr[15].__vecDelDtor)(pkTexture);
  pkTexture = (NiTexture *)((int (__thiscall *)(NiTexture *))v4->vfptr[16].__vecDelDtor)(v4);
  v6 = 81 * (iTexturePosIndex / (v5 / 0xE4));
  v7 = 228 * (iTexturePosIndex % (v5 / 0xE4));
  v3->m_uiTextureYPos = v6;
  v8 = pkTexture;
  v3->m_uiTextureXPos = v7;
  v9 = PgUtil::CreateScreenGeometryData(v5, (unsigned int)v8, v7, v6, 0xE4u, 0x51u);
  v3->m_pkTexture = v4;
  v10 = (NiTexture *)operator new(0xC4u);
  pkTexture = v10;
  if ( v10 )
  {
    NiScreenElements::NiScreenElements((NiScreenElements *)v10, v9);
    pkTexture = v11;
  }
  else
  {
    pkTexture = 0;
    v11 = 0;
  }
  v12 = (NiTexture *)v3->m_spScreenGeom.m_pObject;
  if ( v12 != v11 )
  {
    if ( v12 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
        v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
      v11 = pkTexture;
    }
    v3->m_spScreenGeom.m_pObject = (NiScreenElements *)v11;
    if ( v11 )
      InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
  }
  v13 = (NiTexture *)operator new(0x44u);
  pkTexture = v13;
  if ( v13 )
  {
    NiTexturingProperty::NiTexturingProperty((NiTexturingProperty *)v13);
    v15 = v14;
  }
  else
  {
    v15 = 0;
  }
  NiTexturingProperty::SetBaseTexture((NiTexturingProperty *)v15, v4);
  NiTexturingProperty::SetBaseFilterMode((NiTexturingProperty *)v15, 0);
  *(_DWORD *)(v15 + 28) = 2;
  iTexturePosIndex = (int)v3->m_spScreenGeom.m_pObject;
  pkTexture = (NiTexture *)v15;
  InterlockedIncrement((volatile LONG *)(v15 + 4));
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(iTexturePosIndex + 156),
    (NiPointer<NiRoom> *)&pkTexture);
  if ( !InterlockedDecrement((volatile LONG *)(v15 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v15)(v15, 1);
  v16 = (NiTexture *)operator new(0x60u);
  pkTexture = v16;
  if ( v16 )
  {
    NiMaterialProperty::NiMaterialProperty((NiMaterialProperty *)v16);
    v18 = v17;
  }
  else
  {
    v18 = 0;
  }
  ++*(_DWORD *)(v18 + 88);
  *(float *)(v18 + 68) = 1.0;
  *(float *)(v18 + 72) = 1.0;
  *(float *)(v18 + 76) = 1.0;
  iTexturePosIndex = (int)v3->m_spScreenGeom.m_pObject;
  pkTexture = (NiTexture *)v18;
  InterlockedIncrement((volatile LONG *)(v18 + 4));
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(iTexturePosIndex + 156),
    (NiPointer<NiRoom> *)&pkTexture);
  if ( !InterlockedDecrement((volatile LONG *)(v18 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v18)(v18, 1);
  NiAVObject::UpdateProperties((NiAVObject *)&v3->m_spScreenGeom.m_pObject->vfptr);
  NiAVObject::Update((NiAVObject *)&v3->m_spScreenGeom.m_pObject->vfptr, 0.0, 0);
  v3->m_spScreenGeom.m_pObject->m_uFlags |= 1u;
}

//----- (00620880) --------------------------------------------------------
void __thiscall PrivateStoreBD::PrivateStoreBD(PrivateStoreBD *this, NiTexture *pkTexture, int iTexturePosIndex)
{
  PrivateStoreBD *v3; // esi@1

  v3 = this;
  this->vfptr = (PrivateStoreBDVtbl *)&PrivateStoreBD::`vftable';
  this->m_spScreenGeom.m_pObject = 0;
  this->m_fStartTime = 0.0;
  this->m_kCharHandle = -1;
  this->m_bAlive = 1;
  this->m_pcSpeech = 0;
  this->m_uiSpeechLen = 0;
  this->m_iTextureIndex = iTexturePosIndex;
  if ( pkTexture )
    PrivateStoreBD::CreateGeometry(this, pkTexture, iTexturePosIndex);
  v3->m_kColorRef = 0xFFFFFF;
  v3->m_bMouseOver = 0;
}
// 9B7010: using guessed type int (__thiscall *PrivateStoreBD::`vftable')(void *p, char);

//----- (00620910) --------------------------------------------------------
PrivateStoreBD *__thiscall PrivateStoreBD::`vector deleting destructor'(PrivateStoreBD *this, unsigned int a2)
{
  PrivateStoreBD *v2; // esi@1

  v2 = this;
  PrivateStoreBD::~PrivateStoreBD(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00620940) --------------------------------------------------------
ScreenBoardTexture *__thiscall ScreenBDMgr::GetScreenNameData(ScreenBDMgr *this)
{
  return &this->m_ScreenNameData;
}

//----- (00620950) --------------------------------------------------------
void __thiscall ScreenBDMgr::Draw(ScreenBDMgr *this)
{
  NiDrawScene(
    (NiCamera *)&this->m_spScreenSpaceCamera.m_pObject->vfptr,
    (NiAVObject *)&this->m_pkRootScene->vfptr,
    &this->m_kCuller,
    0);
}

//----- (00620970) --------------------------------------------------------
CharScreenBoardBase *__thiscall ScreenBDMgr::GetCharBD(ScreenBDMgr *this, unsigned __int16 kHandle)
{
  NiTListItem<CharScreenBoardBase *> *v2; // esi@1
  CharScreenBoardBase *v3; // edi@2
  CharScreenBoardBase *result; // eax@4

  v2 = this->m_kCharDBList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      v2 = v2->m_pkNext;
      if ( CharScreenBoardBase::GetCharHandle(v3) == kHandle )
        break;
      if ( !v2 )
        goto LABEL_4;
    }
    result = v3;
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}

//----- (006209B0) --------------------------------------------------------
CharScreenBoardBase *__thiscall ScreenBDMgr::GetMostFarCharBD(ScreenBDMgr *this, NiPoint3 *kPos)
{
  ScreenBDMgr *v2; // esi@1
  CharScreenBoardBase *v3; // ebx@1
  int v4; // eax@1
  NiTListItem<CharScreenBoardBase *> *v5; // esi@1
  float v6; // ST10_4@1
  float v7; // ST14_4@1
  float v8; // ST18_4@1
  CharScreenBoardBase *v9; // edi@2
  unsigned __int16 v10; // ax@3
  Char *v11; // eax@3
  int v12; // eax@4
  float fFarDist; // ST28_4@4
  float v15; // [sp+8h] [bp-1Ch]@4
  float v16; // [sp+Ch] [bp-18h]@4
  float v17; // [sp+10h] [bp-14h]@4
  float kMainPos; // [sp+14h] [bp-10h]@1
  float kMainPos_4; // [sp+18h] [bp-Ch]@1
  float kMainPos_8; // [sp+1Ch] [bp-8h]@1
  float fMostFarDist; // [sp+2Ch] [bp+8h]@1

  v2 = this;
  v3 = 0;
  v4 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
  kMainPos_8 = *(float *)(v4 + 8);
  kMainPos = *(float *)v4;
  kMainPos_4 = *(float *)(v4 + 4);
  v5 = v2->m_kCharDBList.m_pkHead;
  v6 = *(float *)v4 - kPos->x;
  v7 = kMainPos_4 - kPos->y;
  v8 = kMainPos_8 - kPos->z;
  fMostFarDist = v7 * v7 + v6 * v6 + v8 * v8;
  while ( v5 )
  {
    v9 = v5->m_element;
    v5 = v5->m_pkNext;
    if ( v9 )
    {
      v10 = CharScreenBoardBase::GetCharHandle(v9);
      v11 = CharMgr::GetChar(&g_kCharMgr, v10);
      if ( v11 )
      {
        v12 = ((int (__thiscall *)(Char *))v11->vfptr[6].Deaffect)(v11);
        v15 = kMainPos - *(float *)v12;
        v16 = kMainPos_4 - *(float *)(v12 + 4);
        v17 = kMainPos_8 - *(float *)(v12 + 8);
        fFarDist = v16 * v16 + v15 * v15 + v17 * v17;
        if ( fFarDist > (double)fMostFarDist )
        {
          fMostFarDist = v16 * v16 + v15 * v15 + v17 * v17;
          v3 = v9;
        }
      }
    }
  }
  return v3;
}

//----- (00620AC0) --------------------------------------------------------
char __thiscall ScreenBDMgr::RemoveCharBD(ScreenBDMgr *this, CharScreenBoardBase *pkCharBD)
{
  CharScreenBoardBase *v2; // ebx@1
  ScreenBDMgr *v3; // edi@1
  NiTListItem<CharScreenBoardBase *> *v4; // eax@1
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *v5; // ecx@1
  CharScreenBoardBase **v6; // edx@2
  CharScreenBoardBase *v7; // esi@2
  NiRefObjectVtbl *v8; // esi@7
  NiNode *v9; // eax@7
  CharScreenBoardBase *v10; // esi@8

  v2 = pkCharBD;
  v3 = this;
  v4 = this->m_kCharDBList.m_pkHead;
  v5 = (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&this->m_kCharDBList;
  if ( v4 )
  {
    while ( 1 )
    {
      v6 = &v4->m_element;
      v7 = (CharScreenBoardBase *)v4;
      v4 = v4->m_pkNext;
      if ( pkCharBD == *v6 )
        break;
      if ( !v4 )
        goto LABEL_4;
    }
  }
  else
  {
LABEL_4:
    v7 = 0;
  }
  pkCharBD = v7;
  if ( v7 )
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(v5, (void **)&pkCharBD);
  v8 = v3->m_pkNameBDScene->vfptr;
  v9 = CharScreenBoardBase::GetGeometry(v2);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v8[30].__vecDelDtor)(v3->m_pkNameBDScene, &pkCharBD, v9);
  if ( pkCharBD )
  {
    v10 = pkCharBD;
    if ( !InterlockedDecrement((volatile LONG *)&pkCharBD->m_kCharHandle) )
    {
      if ( v10 )
        v10->vfptr->__vecDelDtor(v10, 1u);
    }
  }
  if ( v2 )
    v2->vfptr->__vecDelDtor(v2, 1u);
  return 1;
}

//----- (00620B60) --------------------------------------------------------
void __thiscall ScreenBDMgr::RemoveAllCharBD(ScreenBDMgr *this)
{
  ScreenBDMgr *v1; // esi@1
  NiTListItem<CharScreenBoardBase *> *v2; // ebx@1
  CharScreenBoardBase *v3; // edi@4
  NiTListItem<CharScreenBoardBase *> **v4; // eax@4
  CharScreenBoardBase **v5; // ecx@5
  NiTListItem<CharScreenBoardBase *> **v6; // edx@5
  NiRefObjectVtbl *v7; // esi@10
  NiNode *v8; // eax@10
  void (__thiscall ***v9)(_DWORD, _DWORD); // esi@11
  int v10; // [sp+8h] [bp-Ch]@10
  void *kPos; // [sp+Ch] [bp-8h]@8
  ScreenBDMgr *v12; // [sp+10h] [bp-4h]@1

  v1 = this;
  v2 = this->m_kCharDBList.m_pkHead;
  v12 = this;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      v4 = &v1->m_kCharDBList.m_pkHead->m_pkNext;
      v2 = v2->m_pkNext;
      if ( v4 )
      {
        while ( 1 )
        {
          v5 = (CharScreenBoardBase **)(v4 + 2);
          v6 = v4;
          v4 = (NiTListItem<CharScreenBoardBase *> **)*v4;
          if ( v3 == *v5 )
            break;
          if ( !v4 )
            goto LABEL_7;
        }
      }
      else
      {
LABEL_7:
        v6 = 0;
      }
      kPos = v6;
      if ( v6 )
        NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&v1->m_kCharDBList,
          &kPos);
      v7 = v1->m_pkNameBDScene->vfptr;
      v8 = CharScreenBoardBase::GetGeometry(v3);
      ((void (__thiscall *)(NiNode *, int *, NiNode *))v7[30].__vecDelDtor)(v12->m_pkNameBDScene, &v10, v8);
      if ( v10 )
      {
        v9 = (void (__thiscall ***)(_DWORD, _DWORD))v10;
        if ( !InterlockedDecrement((volatile LONG *)(v10 + 4)) )
        {
          if ( v9 )
            (**v9)(v9, 1);
        }
      }
      if ( v3 )
        v3->vfptr->__vecDelDtor(v3, 1u);
      if ( !v2 )
        break;
      v1 = v12;
    }
  }
}

//----- (00620C20) --------------------------------------------------------
void __thiscall ScreenBDMgr::TerminateCharBD(ScreenBDMgr *this)
{
  ScreenBDMgr *v1; // esi@1

  v1 = this;
  ScreenBDMgr::RemoveAllCharBD(this);
  ScreenBoardTexture::Terminate(&v1->m_ScreenNameData);
}

//----- (00620C50) --------------------------------------------------------
void __thiscall ScreenBDMgr::Terminate(ScreenBDMgr *this)
{
  ScreenBDMgr *v1; // esi@1
  PgWinCamera *v2; // edi@1

  v1 = this;
  ScreenBDMgr::TerminateSpeechBD(this, (signed int)this);
  ScreenBDMgr::RemoveAllCharBD(v1);
  ScreenBoardTexture::Terminate(&v1->m_ScreenNameData);
  ScreenBDMgr::TerminateMainCharHPBar(v1);
  ScreenBDMgr::TerminatePrivateStoreBD(v1);
  ScreenBDMgr::TerminateGuildBD(v1, (signed int)v1);
  v2 = v1->m_spScreenSpaceCamera.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spScreenSpaceCamera.m_pObject = 0;
  }
  v1->m_pkRootScene = 0;
}

//----- (00620CC0) --------------------------------------------------------
void __thiscall ScreenBDMgr::Clear(ScreenBDMgr *this)
{
  ScreenBDMgr *v1; // esi@1

  v1 = this;
  ScreenBDMgr::ClearSpeechBD(this);
  ScreenBDMgr::RemoveAllCharBD(v1);
  ScreenBDMgr::ClearMainCharHPBar(v1);
  ScreenBDMgr::ClearPrivateStoreBD(v1);
  ScreenBDMgr::ClearGuildBD(v1);
}

//----- (00620CF0) --------------------------------------------------------
char __thiscall ScreenBDMgr::InitCharBD(ScreenBDMgr *this, bool Is3DNamePanelEnable)
{
  ScreenBDMgr *v2; // esi@1
  signed int v3; // edi@1
  signed int v4; // ebx@1
  ScreenBoardTexture *v5; // ecx@3
  char result; // al@5

  v2 = this;
  v3 = 510;
  v4 = 14;
  if ( Is3DNamePanelEnable == 1 )
  {
    v3 = 1020;
    v4 = 42;
  }
  ScreenBDMgr::RemoveAllCharBD(this);
  v5 = &v2->m_ScreenNameData;
  if ( Is3DNamePanelEnable == 1 )
  {
    if ( !ScreenBoardTexture::Init(v5, (tagSIZE)__PAIR__(v4, v3), NAMEPANEL3D, 100) )
      return 0;
    v2->m_ScreenNameData.m_IsRenderBackGround = 1;
    v2->m_ScreenNameData.m_kChangeDescColor = 0;
    result = 1;
  }
  else
  {
    if ( !ScreenBoardTexture::Init(v5, (tagSIZE)__PAIR__(v4, v3), 0, 190) )
      return 0;
    v2->m_ScreenNameData.m_IsRenderBackGround = 0;
    v2->m_ScreenNameData.m_kChangeDescColor = 2063597568;
    result = 1;
  }
  return result;
}

//----- (00620D90) --------------------------------------------------------
void __thiscall ScreenBDMgr::AddCharBD(ScreenBDMgr *this, int kHandle, NiPoint3 *rPos, ScreenBDMgr::NameBoardType nb_type)
{
  ScreenBDMgr *v4; // ebx@1
  CharScreenBoardBase *v5; // eax@2
  NiTListItem<CharScreenBoardBase *> *v6; // esi@4
  CharScreenBoardBase *v7; // edi@5
  CharScreenBoardMiniHouse *v8; // eax@12
  CharScreenBoardBase *v9; // eax@13
  CharScreenBoardDropItem *v10; // eax@14
  CharScreenBoardUserChar *v11; // eax@16
  int v12; // eax@20
  _DWORD *v13; // ecx@20
  NiNode *v14; // esi@23

  v4 = this;
  if ( ScreenBoardTexture::IsReleaseBuffer(&this->m_ScreenNameData) )
  {
LABEL_4:
    v6 = v4->m_kCharDBList.m_pkHead;
    if ( v6 )
    {
      while ( 1 )
      {
        v7 = v6->m_element;
        v6 = v6->m_pkNext;
        if ( CharScreenBoardBase::GetCharHandle(v7) == (_WORD)kHandle )
          break;
        if ( !v6 )
          goto LABEL_7;
      }
    }
    else
    {
LABEL_7:
      v7 = 0;
    }
    if ( v7 )
      return;
    if ( nb_type )
    {
      if ( nb_type == 1 )
      {
        v10 = (CharScreenBoardDropItem *)operator new(0x20u);
        if ( v10 )
        {
          CharScreenBoardDropItem::CharScreenBoardDropItem(v10);
          goto LABEL_19;
        }
      }
      else
      {
        if ( nb_type != 2 )
        {
LABEL_20:
          v12 = (int)v4->m_kCharDBList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *> *)&v4->m_kCharDBList);
          *(_DWORD *)(v12 + 8) = v7;
          *(_DWORD *)v12 = 0;
          *(_DWORD *)(v12 + 4) = v4->m_kCharDBList.m_pkTail;
          v13 = &v4->m_kCharDBList.m_pkTail->m_pkNext;
          if ( v13 )
            *v13 = v12;
          else
            v4->m_kCharDBList.m_pkHead = (NiTListItem<CharScreenBoardBase *> *)v12;
          ++v4->m_kCharDBList.m_kAllocator.m_uiCount;
          v4->m_kCharDBList.m_pkTail = (NiTListItem<CharScreenBoardBase *> *)v12;
          v7->vfptr->Init(v7, kHandle, &v4->m_ScreenNameData);
          v14 = CharScreenBoardBase::GetGeometry(v7);
          if ( v14 )
          {
            ((void (__stdcall *)(NiNode *, signed int))v4->m_pkNameBDScene->vfptr[29].__vecDelDtor)(v14, 1);
            NiAVObject::UpdateProperties((NiAVObject *)&v14->vfptr);
            NiAVObject::UpdateEffects((NiAVObject *)&v14->vfptr);
            NiAVObject::Update((NiAVObject *)&v14->vfptr, 0.0, 1);
          }
          return;
        }
        v8 = (CharScreenBoardMiniHouse *)operator new(0x20u);
        if ( v8 )
        {
          CharScreenBoardMiniHouse::CharScreenBoardMiniHouse(v8);
LABEL_19:
          v7 = v9;
          goto LABEL_20;
        }
      }
    }
    else
    {
      v11 = (CharScreenBoardUserChar *)operator new(0x38u);
      if ( v11 )
      {
        CharScreenBoardUserChar::CharScreenBoardUserChar(v11);
        goto LABEL_19;
      }
    }
    v9 = 0;
    goto LABEL_19;
  }
  while ( 1 )
  {
    v5 = ScreenBDMgr::GetMostFarCharBD(v4, rPos);
    if ( !v5 )
      break;
    ScreenBDMgr::RemoveCharBD(v4, v5);
    if ( ScreenBoardTexture::IsReleaseBuffer(&v4->m_ScreenNameData) )
      goto LABEL_4;
  }
}

//----- (00620F50) --------------------------------------------------------
bool __thiscall ScreenBDMgr::Init(ScreenBDMgr *this)
{
  ScreenBDMgr *v1; // esi@1
  NiRoom *v2; // eax@1
  PgWinCamera *v3; // ebx@1
  PgWinCamera *v4; // eax@2
  PgWinCamera *v5; // edi@3
  NiRoom *v6; // eax@10
  int v7; // eax@11
  int v8; // edi@11
  NiRoom *v9; // eax@13
  NiNode *v10; // eax@14
  NiRoom *v11; // eax@16
  NiNode *v12; // eax@17
  NiRoom *v13; // eax@19
  NiNode *v14; // eax@20
  NiRoom *v15; // eax@22
  NiNode *v16; // eax@23
  NiRoom *v17; // eax@25
  NiNode *v18; // eax@26
  void (__thiscall *v19)(int, _DWORD, _DWORD); // edx@28
  float fTime; // ST40_4@28
  PgWinCamera *v21; // ebx@28
  NiRenderer *v22; // edi@28
  NiRoom *v23; // ecx@28
  NiProperty *v24; // eax@36
  NiRoom *v25; // eax@36
  NiRoom *v26; // edi@36
  unsigned __int16 v27; // cx@39
  NiRoom *v28; // eax@41
  int v29; // eax@42
  int v30; // edi@42
  NiAVObject *v31; // ecx@44
  NiProperty *v32; // eax@44
  bool result; // al@47
  NiPointer<NiRoom> v34; // [sp+64h] [bp-14h]@1
  NiPointer<NiRoom> element; // [sp+68h] [bp-10h]@28
  int v36; // [sp+74h] [bp-4h]@1

  v1 = this;
  v2 = (NiRoom *)operator new(0x130u);
  v34.m_pObject = v2;
  v3 = 0;
  v36 = 0;
  if ( v2 )
  {
    PgWinCamera::PgWinCamera((PgWinCamera *)v2);
    v3 = v4;
  }
  v5 = v1->m_spScreenSpaceCamera.m_pObject;
  v36 = -1;
  if ( v5 != v3 )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spScreenSpaceCamera.m_pObject = v3;
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
  v1->m_pkRootScene = v1->m_spScreenSpaceCamera.m_pObject->m_spScene.m_pObject;
  v6 = (NiRoom *)operator new(0xECu);
  v34.m_pObject = v6;
  v36 = 1;
  if ( v6 )
  {
    NiSortAdjustNode::NiSortAdjustNode((NiSortAdjustNode *)v6);
    v8 = v7;
  }
  else
  {
    v8 = 0;
  }
  *(_DWORD *)(v8 + 232) = 0;
  v9 = (NiRoom *)operator new(0xE8u);
  v34.m_pObject = v9;
  v36 = 2;
  if ( v9 )
    NiNode::NiNode((NiNode *)&v9->vfptr, 0);
  else
    v10 = 0;
  v1->m_pkSpeechBDScene = v10;
  v11 = (NiRoom *)operator new(0xE8u);
  v34.m_pObject = v11;
  v36 = 3;
  if ( v11 )
    NiNode::NiNode((NiNode *)&v11->vfptr, 0);
  else
    v12 = 0;
  v1->m_pkNameBDScene = v12;
  v13 = (NiRoom *)operator new(0xE8u);
  v34.m_pObject = v13;
  v36 = 4;
  if ( v13 )
    NiNode::NiNode((NiNode *)&v13->vfptr, 0);
  else
    v14 = 0;
  v1->m_pkHPBarScene = v14;
  v15 = (NiRoom *)operator new(0xE8u);
  v34.m_pObject = v15;
  v36 = 5;
  if ( v15 )
    NiNode::NiNode((NiNode *)&v15->vfptr, 0);
  else
    v16 = 0;
  v1->m_pkPrivateStoreBDScene = v16;
  v17 = (NiRoom *)operator new(0xE8u);
  v34.m_pObject = v17;
  v36 = 6;
  if ( v17 )
    NiNode::NiNode((NiNode *)&v17->vfptr, 0);
  else
    v18 = 0;
  v1->m_pkGuildBDScene = v18;
  v19 = *(void (__thiscall **)(int, _DWORD, _DWORD))(*(_DWORD *)v8 + 116);
  fTime = *(float *)&v1->m_pkSpeechBDScene;
  v36 = -1;
  v19(v8, LODWORD(fTime), 0);
  (*(void (__thiscall **)(int, NiNode *, _DWORD))(*(_DWORD *)v8 + 116))(v8, v1->m_pkNameBDScene, 0);
  (*(void (__thiscall **)(int, NiNode *, _DWORD))(*(_DWORD *)v8 + 116))(v8, v1->m_pkHPBarScene, 0);
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD))(*(_DWORD *)v8 + 116))(v8, v1->m_pkPrivateStoreBDScene, 0);
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD))(*(_DWORD *)v8 + 116))(v8, v1->m_pkGuildBDScene, 0);
  ((void (__stdcall *)(int, _DWORD))v1->m_pkRootScene->vfptr[29].__vecDelDtor)(v8, 0);
  v21 = v1->m_spScreenSpaceCamera.m_pObject;
  v22 = v21->m_spRenderer.m_pObject;
  v23 = (NiRoom *)NiRenderer::ms_pkRenderer;
  element.m_pObject = (NiRoom *)NiRenderer::ms_pkRenderer;
  if ( v22 != NiRenderer::ms_pkRenderer )
  {
    if ( v22 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v22->m_uiRefCount) && v22 )
        v22->vfptr->__vecDelDtor((NiRefObject *)v22, 1u);
      v23 = element.m_pObject;
    }
    v21->m_spRenderer.m_pObject = (NiRenderer *)v23;
    if ( v23 )
      InterlockedIncrement((volatile LONG *)&v23->m_uiRefCount);
  }
  v24 = NiAVObject::GetProperty((NiAVObject *)&v1->m_pkRootScene->vfptr, 11);
  LOWORD(v24[1].vfptr) = (unsigned int)v24[1].vfptr & 0xFFFE | 2;
  v25 = (NiRoom *)operator new(0x20u);
  v26 = v25;
  v34.m_pObject = v25;
  v36 = 7;
  if ( v25 )
  {
    NiObjectNET::NiObjectNET((NiObjectNET *)&v25->vfptr);
    v26->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
    v26->m_uFlags = 236;
    *((_BYTE *)&v26->m_uFlags + 2) = 0;
  }
  else
  {
    v26 = 0;
  }
  v27 = v26->m_uFlags & 0xFBFF | 0x1A01;
  *((_BYTE *)&v26->m_uFlags + 2) = 10;
  v26->m_uFlags = v27;
  v34.m_pObject = (NiRoom *)v1->m_pkRootScene;
  element.m_pObject = v26;
  InterlockedIncrement((volatile LONG *)&v26->m_uiRefCount);
  v36 = 8;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v34.m_pObject->m_kPropertyList,
    &element);
  v36 = -1;
  if ( !InterlockedDecrement((volatile LONG *)&v26->m_uiRefCount) )
    v26->vfptr->__vecDelDtor((NiRefObject *)v26, 1u);
  v28 = (NiRoom *)operator new(0x60u);
  v34.m_pObject = v28;
  v36 = 9;
  if ( v28 )
  {
    NiMaterialProperty::NiMaterialProperty((NiMaterialProperty *)v28);
    v30 = v29;
  }
  else
  {
    v30 = 0;
  }
  ++*(_DWORD *)(v30 + 88);
  *(float *)(v30 + 68) = 1.0;
  *(float *)(v30 + 72) = 1.0;
  *(float *)(v30 + 76) = 1.0;
  v31 = (NiAVObject *)&v1->m_pkRootScene->vfptr;
  v36 = -1;
  v32 = NiAVObject::GetProperty(v31, 3);
  NiAVObject::DetachProperty((NiAVObject *)&v1->m_pkRootScene->vfptr, v32);
  element.m_pObject = (NiRoom *)v1->m_pkRootScene;
  v34.m_pObject = (NiRoom *)v30;
  InterlockedIncrement((volatile LONG *)(v30 + 4));
  v36 = 10;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&element.m_pObject->m_kPropertyList,
    &v34);
  v36 = -1;
  if ( !InterlockedDecrement((volatile LONG *)(v30 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v30)(v30, 1);
  NiAVObject::UpdateProperties((NiAVObject *)&v1->m_pkRootScene->vfptr);
  NiAVObject::UpdateEffects((NiAVObject *)&v1->m_pkRootScene->vfptr);
  NiAVObject::Update((NiAVObject *)&v1->m_pkRootScene->vfptr, 0.0, 1);
  PgWinCamera::UpdateRenderTargetBounds(v1->m_spScreenSpaceCamera.m_pObject);
  NiAVObject::Update((NiAVObject *)&v1->m_spScreenSpaceCamera.m_pObject->vfptr, 0.0, 1);
  if ( ScreenBDMgr::InitSpeechBD(v1) && ScreenBDMgr::InitCharBD(v1, byte_B4FF93) && ScreenBDMgr::InitMainCharHPBar() )
    result = ScreenBDMgr::InitPrivateStoreBD(v1) != 0;
  else
    result = 0;
  return result;
}
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);
// B4FF93: using guessed type char byte_B4FF93;

//----- (006213A0) --------------------------------------------------------
void __thiscall ScreenBDMgr::UpdateCharBD(ScreenBDMgr *this, float fTime, NiCamera *pkWorldCamera)
{
  ScreenBDMgr *v3; // ebx@1
  NiTListItem<CharScreenBoardBase *> *v4; // esi@1
  CharScreenBoardBase *v5; // edi@2
  stMINIHOUSEINFO *v6; // eax@5
  int v7; // edi@8
  NiTListItem<CharScreenBoardBase *> *v8; // esi@9
  int v9; // esi@18
  NiPoint3 *v10; // eax@18
  NiTListItem<DropItem *> *v11; // eax@20
  DropItem *v12; // ebx@23
  NiTListItem<CharScreenBoardBase *> *v13; // esi@24
  CharScreenBoardBase *v14; // edi@25
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v15; // ebx@32
  stMINIHOUSEINFO *v16; // edi@33
  NiTListItem<CharScreenBoardBase *> *v17; // esi@34
  CharScreenBoardBase *v18; // edi@35
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v19; // ecx@43
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v20; // eax@44
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *i; // eax@47
  NiTListItem<CharScreenBoardBase *> *v22; // esi@52
  void (__thiscall *v23)(CharScreenBoardBase *, float, NiCamera *, PgWinCamera *); // edx@53
  unsigned __int16 v24; // [sp+8h] [bp-1Ch]@14
  __int16 v25; // [sp+18h] [bp-Ch]@9
  unsigned __int16 v26; // [sp+18h] [bp-Ch]@24
  unsigned __int16 v27; // [sp+18h] [bp-Ch]@34
  stMINIHOUSEINFO *pstInfo; // [sp+1Ch] [bp-8h]@8
  stMINIHOUSEINFO *pstInfoa; // [sp+1Ch] [bp-8h]@23
  stMINIHOUSEINFO *pstInfob; // [sp+1Ch] [bp-8h]@33
  ScreenBDMgr *v31; // [sp+20h] [bp-4h]@1

  v3 = this;
  v4 = this->m_kCharDBList.m_pkHead;
  v31 = this;
  while ( v4 )
  {
    v5 = v4->m_element;
    v4 = v4->m_pkNext;
    if ( !v5->vfptr->IsAlive(v5) )
      ScreenBDMgr::RemoveCharBD(v3, v5);
  }
  v6 = (stMINIHOUSEINFO *)unk_A96B24;
  if ( unk_A96B24 )
  {
    while ( 1 )
    {
      v7 = *(_DWORD *)&v6->camp.dummy[4];
      pstInfo = *(stMINIHOUSEINFO **)&v6->handle;
      if ( v7 )
      {
        v8 = v3->m_kCharDBList.m_pkHead;
        v25 = *(_WORD *)(v7 + 552);
        if ( !v8 )
          goto LABEL_14;
        while ( 1 )
        {
          v3 = (ScreenBDMgr *)v8->m_element;
          v8 = v8->m_pkNext;
          if ( CharScreenBoardBase::GetCharHandle((CharScreenBoardBase *)v3) == v25 )
            break;
          if ( !v8 )
            goto LABEL_14;
        }
        if ( !v3 )
        {
LABEL_14:
          v24 = *(_WORD *)(v7 + 552);
          if ( *(_BYTE *)(v7 + 1920) == 5 )
          {
            if ( !ScreenBDMgr::GetPrivateStoreBD(v31, v24) )
              ScreenBDMgr::AddPrivateStoreBD(v31, *(_WORD *)(v7 + 552));
          }
          else if ( CharScreenBoardUserChar::IsVisible((int)v3, v24) )
          {
            v9 = *(_WORD *)(v7 + 552);
            v10 = (NiPoint3 *)(*(int (__thiscall **)(int))(*(_DWORD *)v7 + 196))(v7);
            ScreenBDMgr::AddCharBD(v31, v9, v10, 0);
          }
        }
      }
      if ( !pstInfo )
        break;
      v6 = pstInfo;
      v3 = v31;
    }
  }
  v11 = g_kDropItemMgr.m_kList.m_pkHead;
  if ( g_kDropItemMgr.m_kList.m_pkHead )
  {
    while ( 1 )
    {
      v12 = v11->m_element;
      pstInfoa = (stMINIHOUSEINFO *)v11->m_pkNext;
      if ( v12 )
      {
        v13 = v31->m_kCharDBList.m_pkHead;
        v26 = v12->m_kHandle;
        if ( !v13 )
          goto LABEL_29;
        while ( 1 )
        {
          v14 = v13->m_element;
          v13 = v13->m_pkNext;
          if ( CharScreenBoardBase::GetCharHandle(v14) == v26 )
            break;
          if ( !v13 )
            goto LABEL_29;
        }
        if ( !v14 )
        {
LABEL_29:
          if ( CharScreenBoardDropItem::IsVisible(v12->m_kHandle) )
            ScreenBDMgr::AddCharBD(v31, v12->m_kHandle, &v12->m_spNode.m_pObject->m_kLocal.m_Translate, NBT_ITEM);
        }
      }
      if ( !pstInfoa )
        break;
      v11 = (NiTListItem<DropItem *> *)pstInfoa;
    }
  }
  v15 = stru_B5C138._Ptr->_Left;
  while ( v15 != stru_B5C138._Ptr )
  {
    v16 = (stMINIHOUSEINFO *)v15->_Myval.second;
    pstInfob = v16;
    if ( v16 )
    {
      v17 = v31->m_kCharDBList.m_pkHead;
      v27 = v16->handle;
      if ( v17 )
      {
        while ( 1 )
        {
          v18 = v17->m_element;
          v17 = v17->m_pkNext;
          if ( CharScreenBoardBase::GetCharHandle(v18) == v27 )
            break;
          if ( !v17 )
            goto LABEL_39;
        }
        if ( v18 )
          goto LABEL_42;
LABEL_39:
        v16 = pstInfob;
      }
      if ( CharScreenBoardMiniHouse::IsVisible(v16->handle) )
        ScreenBDMgr::AddCharBD(v31, v16->handle, &v16->pkNode->m_kWorld.m_Translate, NBT_MINIHOUSE);
    }
LABEL_42:
    if ( !v15->_Isnil )
    {
      v19 = v15->_Right;
      if ( v19->_Isnil )
      {
        for ( i = v15->_Parent; !i->_Isnil; i = i->_Parent )
        {
          if ( v15 != i->_Right )
            break;
          v15 = i;
        }
        v15 = i;
      }
      else
      {
        v20 = v19->_Left;
        if ( !v19->_Left->_Isnil )
        {
          do
          {
            v19 = v20;
            v20 = v20->_Left;
          }
          while ( !v20->_Isnil );
        }
        v15 = v19;
      }
    }
  }
  v22 = v31->m_kCharDBList.m_pkHead;
  while ( v22 )
  {
    v23 = v22->m_element->vfptr->Update;
    v22 = v22->m_pkNext;
    ((void (__stdcall *)(_DWORD, NiCamera *, PgWinCamera *))v23)(
      LODWORD(fTime),
      pkWorldCamera,
      v31->m_spScreenSpaceCamera.m_pObject);
  }
}

//----- (00621630) --------------------------------------------------------
void __thiscall ScreenBDMgr::Update(ScreenBDMgr *this, float fTime, NiCamera *pkWorldCamera)
{
  ScreenBDMgr *v3; // esi@1
  Char *v4; // eax@2
  Char *v5; // eax@6

  v3 = this;
  g_ClickedPrivateStoreBD = 0;
  g_ClickedNameBD = 0;
  g_ClickedMiniHouseBD = 0;
  ScreenBDMgr::UpdateCharBD(this, fTime, pkWorldCamera);
  ScreenBDMgr::UpdatePrivateStoreBD(v3, 0.0, pkWorldCamera);
  if ( g_ClickedNameBD )
  {
    v4 = CharMgr::GetChar(&g_kCharMgr, g_ClickedNameBD->m_kCharHandle);
    if ( v4 )
    {
      if ( v4->m_byMode == 5 )
      {
        g_ClickedNameBD->m_kColorRef = (unsigned int)&loc_808080;
        NameBD::SetSpeech(g_ClickedNameBD, g_ClickedNameBD->m_kBDText);
      }
    }
  }
  if ( g_ClickedPrivateStoreBD )
  {
    v5 = CharMgr::GetChar(&g_kCharMgr, g_ClickedPrivateStoreBD->m_kCharHandle);
    if ( v5 )
    {
      if ( v5->m_byMode == 5 )
      {
        g_ClickedPrivateStoreBD->m_kColorRef = (unsigned int)&loc_808080;
        PrivateStoreBD::SetSpeech(
          g_ClickedPrivateStoreBD,
          (void **)&pkWorldCamera->vfptr,
          g_ClickedPrivateStoreBD->m_kBDText);
      }
    }
  }
  ScreenBDMgr::UpdateSpeechBD(v3, fTime, pkWorldCamera);
  ScreenBDMgr::UpdateMainCharHPBar(v3, fTime, pkWorldCamera);
  NiAVObject::Update((NiAVObject *)&v3->m_pkRootScene->vfptr, fTime, 1);
  NiAVObject::Update((NiAVObject *)&v3->m_spScreenSpaceCamera.m_pObject->vfptr, fTime, 1);
}
// A96840: using guessed type struct NameBD *g_ClickedMiniHouseBD;

//----- (00621740) --------------------------------------------------------
void __thiscall ScreenBDMgr::~ScreenBDMgr(ScreenBDMgr *this)
{
  ScreenBDMgr *v1; // esi@1
  NiSourceTexture *v2; // edi@1
  int v3; // edi@5
  NiTListItem<GuildBD *> **v4; // ebx@5
  NiTListItem<GuildBD *> **v5; // ST10_4@6
  NiSourceTexture *v6; // edi@7
  int v7; // edi@11
  NiTListItem<PrivateStoreBD *> **v8; // ebx@11
  NiTListItem<PrivateStoreBD *> **v9; // ST10_4@12
  NiPointer<PgSprData> *v10; // ecx@13
  int v11; // edi@15
  NiTListItem<CharScreenBoardBase *> **v12; // ebx@15
  NiTListItem<CharScreenBoardBase *> **v13; // ST10_4@16
  NiSourceTexture *v14; // edi@17
  int v15; // edi@21
  NiTListItem<NameBD *> **v16; // ebx@21
  NiTListItem<NameBD *> **v17; // ST10_4@22
  NiSourceTexture *v18; // edi@23
  int v19; // edi@27
  NiTListItem<SpeechBD *> **v20; // ebx@27
  NiTListItem<SpeechBD *> **v21; // ST10_4@28
  PgWinCamera *v22; // esi@29

  v1 = this;
  v2 = this->m_spGuildBDTexture.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = (int)&v1->m_kGuildBDList;
  v1->m_kGuildBDList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>Vtbl *)&PgTList<GuildBD *>::`vftable';
  v4 = &v1->m_kGuildBDList.m_pkHead->m_pkNext;
  while ( v4 )
  {
    v5 = v4;
    v4 = (NiTListItem<GuildBD *> **)*v4;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v3 + 8))(&v1->m_kGuildBDList, v5);
  }
  v1->m_kGuildBDList.m_kAllocator.m_uiCount = 0;
  v1->m_kGuildBDList.m_pkHead = 0;
  v1->m_kGuildBDList.m_pkTail = 0;
  *(_DWORD *)v3 = &NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::`vftable';
  v6 = v1->m_spPrivateStoreBDTexture.m_pObject;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  v7 = (int)&v1->m_kPrivateStoreBDList;
  v1->m_kPrivateStoreBDList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>Vtbl *)&PgTList<PrivateStoreBD *>::`vftable';
  v8 = &v1->m_kPrivateStoreBDList.m_pkHead->m_pkNext;
  while ( v8 )
  {
    v9 = v8;
    v8 = (NiTListItem<PrivateStoreBD *> **)*v8;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v7 + 8))(&v1->m_kPrivateStoreBDList, v9);
  }
  v1->m_kPrivateStoreBDList.m_kAllocator.m_uiCount = 0;
  v1->m_kPrivateStoreBDList.m_pkHead = 0;
  v1->m_kPrivateStoreBDList.m_pkTail = 0;
  *(_DWORD *)v7 = &NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::`vftable';
  v10 = (NiPointer<PgSprData> *)v1->m_ScreenNameData.m_UseChecks._Myfirst;
  if ( v10 )
  {
    std::_Destroy_range<std::allocator<NiPointer<PgSprData>>>(
      v10,
      (NiPointer<PgSprData> *)v1->m_ScreenNameData.m_UseChecks._Mylast);
    operator delete(v1->m_ScreenNameData.m_UseChecks._Myfirst);
  }
  v11 = (int)&v1->m_kCharDBList;
  v1->m_ScreenNameData.m_UseChecks._Myfirst = 0;
  v1->m_ScreenNameData.m_UseChecks._Mylast = 0;
  v1->m_ScreenNameData.m_UseChecks._Myend = 0;
  v1->m_kCharDBList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>Vtbl *)&PgTList<CharScreenBoardBase *>::`vftable';
  v12 = &v1->m_kCharDBList.m_pkHead->m_pkNext;
  while ( v12 )
  {
    v13 = v12;
    v12 = (NiTListItem<CharScreenBoardBase *> **)*v12;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v11 + 8))(&v1->m_kCharDBList, v13);
  }
  v1->m_kCharDBList.m_kAllocator.m_uiCount = 0;
  v1->m_kCharDBList.m_pkHead = 0;
  v1->m_kCharDBList.m_pkTail = 0;
  *(_DWORD *)v11 = &NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::`vftable';
  NiCullingProcess::~NiCullingProcess(&v1->m_kCuller);
  operator delete(v1->m_kVisible.m_ppkArray);
  v14 = v1->m_spNameBDTexture.m_pObject;
  if ( v14 && !InterlockedDecrement((volatile LONG *)&v14->m_uiRefCount) && v14 )
    v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
  v15 = (int)&v1->m_kNameBDList;
  v1->m_kNameBDList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>Vtbl *)&PgTList<NameBD *>::`vftable';
  v16 = &v1->m_kNameBDList.m_pkHead->m_pkNext;
  while ( v16 )
  {
    v17 = v16;
    v16 = (NiTListItem<NameBD *> **)*v16;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v15 + 8))(&v1->m_kNameBDList, v17);
  }
  v1->m_kNameBDList.m_kAllocator.m_uiCount = 0;
  v1->m_kNameBDList.m_pkHead = 0;
  v1->m_kNameBDList.m_pkTail = 0;
  *(_DWORD *)v15 = &NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>::`vftable';
  v18 = v1->m_spSpeechBDTexture.m_pObject;
  if ( v18 && !InterlockedDecrement((volatile LONG *)&v18->m_uiRefCount) && v18 )
    v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
  v19 = (int)&v1->m_kSpeechBDList;
  v1->m_kSpeechBDList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>Vtbl *)&PgTList<SpeechBD *>::`vftable';
  v20 = &v1->m_kSpeechBDList.m_pkHead->m_pkNext;
  while ( v20 )
  {
    v21 = v20;
    v20 = (NiTListItem<SpeechBD *> **)*v20;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v19 + 8))(&v1->m_kSpeechBDList, v21);
  }
  v1->m_kSpeechBDList.m_kAllocator.m_uiCount = 0;
  v1->m_kSpeechBDList.m_pkHead = 0;
  v1->m_kSpeechBDList.m_pkTail = 0;
  *(_DWORD *)v19 = &NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::`vftable';
  v22 = v1->m_spScreenSpaceCamera.m_pObject;
  if ( v22 && !InterlockedDecrement((volatile LONG *)&v22->m_uiRefCount) )
  {
    if ( v22 )
      v22->vfptr->__vecDelDtor((NiRefObject *)v22, 1u);
  }
}
// 9B702C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::`vftable')(void *p, char);
// 9B703C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>::`vftable')(void *p, char);
// 9B704C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::`vftable')(void *p, char);
// 9B705C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::`vftable')(void *p, char);
// 9B706C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::`vftable')(void *p, char);
// 9B70CC: using guessed type int (__thiscall *PgTList<SpeechBD *>::`vftable')(void *p, char);
// 9B70DC: using guessed type int (__thiscall *PgTList<NameBD *>::`vftable')(void *p, char);
// 9B70EC: using guessed type int (__thiscall *PgTList<CharScreenBoardBase *>::`vftable')(void *p, char);
// 9B70FC: using guessed type int (__thiscall *PgTList<PrivateStoreBD *>::`vftable')(void *p, char);
// 9B710C: using guessed type int (__thiscall *PgTList<GuildBD *>::`vftable')(void *p, char);

//----- (006219E0) --------------------------------------------------------
void __thiscall ScreenBDMgr::ScreenBDMgr(ScreenBDMgr *this)
{
  ScreenBDMgr *v1; // esi@1
  NiVisibleArray *v2; // ebx@1

  v1 = this;
  this->m_spScreenSpaceCamera.m_pObject = 0;
  this->m_kSpeechBDList.m_kAllocator.m_uiCount = 0;
  this->m_kSpeechBDList.m_pkHead = 0;
  this->m_kSpeechBDList.m_pkTail = 0;
  this->m_kSpeechBDList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>Vtbl *)&PgTList<SpeechBD *>::`vftable';
  this->m_spSpeechBDTexture.m_pObject = 0;
  this->m_kNameBDList.m_kAllocator.m_uiCount = 0;
  this->m_kNameBDList.m_pkHead = 0;
  this->m_kNameBDList.m_pkTail = 0;
  this->m_kNameBDList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>Vtbl *)&PgTList<NameBD *>::`vftable';
  this->m_spNameBDTexture.m_pObject = 0;
  v2 = &this->m_kVisible;
  v2->m_ppkArray = 0;
  v2->m_uiCurrentSize = 0;
  v2->m_uiAllocatedSize = 0;
  v2->m_uiGrowBy = 1024;
  NiVisibleArray::SetAllocatedSize(&this->m_kVisible, 0x400u);
  NiCullingProcess::NiCullingProcess(&v1->m_kCuller, v2);
  v1->m_kCharDBList.m_kAllocator.m_uiCount = 0;
  v1->m_kCharDBList.m_pkHead = 0;
  v1->m_kCharDBList.m_pkTail = 0;
  v1->m_kCharDBList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>Vtbl *)&PgTList<CharScreenBoardBase *>::`vftable';
  ScreenBoardTexture::ScreenBoardTexture(&v1->m_ScreenNameData);
  v1->m_kPrivateStoreBDList.m_kAllocator.m_uiCount = 0;
  v1->m_kPrivateStoreBDList.m_pkHead = 0;
  v1->m_kPrivateStoreBDList.m_pkTail = 0;
  v1->m_kPrivateStoreBDList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>Vtbl *)&PgTList<PrivateStoreBD *>::`vftable';
  v1->m_spPrivateStoreBDTexture.m_pObject = 0;
  v1->m_kGuildBDList.m_kAllocator.m_uiCount = 0;
  v1->m_kGuildBDList.m_pkHead = 0;
  v1->m_kGuildBDList.m_pkTail = 0;
  v1->m_kGuildBDList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>Vtbl *)&PgTList<GuildBD *>::`vftable';
  v1->m_spGuildBDTexture.m_pObject = 0;
  v1->m_iTotalSpeechBDTextureIndex = 0;
  v1->m_pabUseSpeechBD = 0;
  v1->m_iMaxPrivateStoreView = 40;
}
// 9B70CC: using guessed type int (__thiscall *PgTList<SpeechBD *>::`vftable')(void *p, char);
// 9B70DC: using guessed type int (__thiscall *PgTList<NameBD *>::`vftable')(void *p, char);
// 9B70EC: using guessed type int (__thiscall *PgTList<CharScreenBoardBase *>::`vftable')(void *p, char);
// 9B70FC: using guessed type int (__thiscall *PgTList<PrivateStoreBD *>::`vftable')(void *p, char);
// 9B710C: using guessed type int (__thiscall *PgTList<GuildBD *>::`vftable')(void *p, char);

//----- (00621B00) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::~NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>(NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::`vftable';
}
// 9B702C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::`vftable')(void *p, char);

//----- (00621B10) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>::~NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>(NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>::`vftable';
}
// 9B703C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>::`vftable')(void *p, char);

//----- (00621B20) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::~NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>(NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::`vftable';
}
// 9B704C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::`vftable')(void *p, char);

//----- (00621B30) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::~NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>(NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::`vftable';
}
// 9B705C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::`vftable')(void *p, char);

//----- (00621B40) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::~NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>(NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::`vftable';
}
// 9B706C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::`vftable')(void *p, char);

//----- (00621B50) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9B702C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::`vftable')(void *p, char);

//----- (00621B80) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9B703C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>::`vftable')(void *p, char);

//----- (00621BB0) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9B704C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::`vftable')(void *p, char);

//----- (00621BE0) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9B705C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::`vftable')(void *p, char);

//----- (00621C10) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9B706C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::`vftable')(void *p, char);

//----- (00621C40) --------------------------------------------------------
void __thiscall NiTPointerList<SpeechBD *>::~NiTPointerList<SpeechBD *>(NiTPointerList<SpeechBD *> *this)
{
  NiTPointerList<SpeechBD *> *v1; // edi@1
  NiTListItem<SpeechBD *> *v2; // esi@1
  NiTListItem<SpeechBD *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::`vftable';
}
// 9B702C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::`vftable')(void *p, char);
// 9B707C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::`vftable')(void *p, char);

//----- (00621CC0) --------------------------------------------------------
void __thiscall NiTPointerList<NameBD *>::~NiTPointerList<NameBD *>(NiTPointerList<NameBD *> *this)
{
  NiTPointerList<NameBD *> *v1; // edi@1
  NiTListItem<NameBD *> *v2; // esi@1
  NiTListItem<NameBD *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,NameBD *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>::`vftable';
}
// 9B703C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>::`vftable')(void *p, char);
// 9B708C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NameBD *>::`vftable')(void *p, char);

//----- (00621D40) --------------------------------------------------------
void __thiscall NiTPointerList<CharScreenBoardBase *>::~NiTPointerList<CharScreenBoardBase *>(NiTPointerList<CharScreenBoardBase *> *this)
{
  NiTPointerList<CharScreenBoardBase *> *v1; // edi@1
  NiTListItem<CharScreenBoardBase *> *v2; // esi@1
  NiTListItem<CharScreenBoardBase *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::`vftable';
}
// 9B704C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::`vftable')(void *p, char);
// 9B709C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::`vftable')(void *p, char);

//----- (00621DC0) --------------------------------------------------------
void __thiscall NiTPointerList<PrivateStoreBD *>::~NiTPointerList<PrivateStoreBD *>(NiTPointerList<PrivateStoreBD *> *this)
{
  NiTPointerList<PrivateStoreBD *> *v1; // edi@1
  NiTListItem<PrivateStoreBD *> *v2; // esi@1
  NiTListItem<PrivateStoreBD *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::`vftable';
}
// 9B705C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::`vftable')(void *p, char);
// 9B70AC: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::`vftable')(void *p, char);

//----- (00621E40) --------------------------------------------------------
void __thiscall NiTPointerList<GuildBD *>::~NiTPointerList<GuildBD *>(NiTPointerList<GuildBD *> *this)
{
  NiTPointerList<GuildBD *> *v1; // edi@1
  NiTListItem<GuildBD *> *v2; // esi@1
  NiTListItem<GuildBD *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::`vftable';
}
// 9B706C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::`vftable')(void *p, char);
// 9B70BC: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::`vftable')(void *p, char);

//----- (00621EC0) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,SpeechBD *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,SpeechBD *> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,SpeechBD *> *v2; // edi@1
  NiTListItem<SpeechBD *> *v3; // esi@1
  NiTListItem<SpeechBD *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B702C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::`vftable')(void *p, char);
// 9B707C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::`vftable')(void *p, char);

//----- (00621F50) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NameBD *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NameBD *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NameBD *> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NameBD *> *v2; // edi@1
  NiTListItem<NameBD *> *v3; // esi@1
  NiTListItem<NameBD *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,NameBD *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B703C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>::`vftable')(void *p, char);
// 9B708C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NameBD *>::`vftable')(void *p, char);

//----- (00621FE0) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *> *v2; // edi@1
  NiTListItem<CharScreenBoardBase *> *v3; // esi@1
  NiTListItem<CharScreenBoardBase *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B704C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::`vftable')(void *p, char);
// 9B709C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::`vftable')(void *p, char);

//----- (00622070) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *> *v2; // edi@1
  NiTListItem<PrivateStoreBD *> *v3; // esi@1
  NiTListItem<PrivateStoreBD *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B705C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::`vftable')(void *p, char);
// 9B70AC: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::`vftable')(void *p, char);

//----- (00622100) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,GuildBD *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,GuildBD *> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,GuildBD *> *v2; // edi@1
  NiTListItem<GuildBD *> *v3; // esi@1
  NiTListItem<GuildBD *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B706C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::`vftable')(void *p, char);
// 9B70BC: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::`vftable')(void *p, char);

//----- (00622190) --------------------------------------------------------
void __thiscall CharScreenBoardUserChar::CharScreenBoardUserChar(CharScreenBoardUserChar *this)
{
  CharScreenBoardUserChar *v1; // esi@1

  v1 = this;
  CharScreenBoardBase::CharScreenBoardBase((CharScreenBoardBase *)&this->vfptr);
  v1->vfptr = (CharScreenBoardBaseVtbl *)&CharScreenBoardUserChar::`vftable';
  v1->m_spNameBoard.m_pObject = 0;
  v1->m_spNickNameBoard.m_pObject = 0;
  v1->m_spGuildBoard.m_pObject = 0;
  v1->m_spEmblemIcon.m_pObject = 0;
  IConBD::IConBD(&v1->m_IconBD);
}
// 9B6F0C: using guessed type int (__thiscall *CharScreenBoardUserChar::`vftable')(void *p, char);

//----- (00622200) --------------------------------------------------------
void __thiscall CharScreenBoardDropItem::CharScreenBoardDropItem(CharScreenBoardDropItem *this)
{
  CharScreenBoardDropItem *v1; // esi@1

  v1 = this;
  CharScreenBoardBase::CharScreenBoardBase((CharScreenBoardBase *)&this->vfptr);
  v1->vfptr = (CharScreenBoardBaseVtbl *)&CharScreenBoardDropItem::`vftable';
  v1->m_spNameBoard.m_pObject = 0;
}
// 9B6F2C: using guessed type int (__thiscall *CharScreenBoardDropItem::`vftable')(void *p, char);

//----- (00622220) --------------------------------------------------------
void __thiscall CharScreenBoardMiniHouse::CharScreenBoardMiniHouse(CharScreenBoardMiniHouse *this)
{
  CharScreenBoardMiniHouse *v1; // esi@1

  v1 = this;
  CharScreenBoardBase::CharScreenBoardBase((CharScreenBoardBase *)&this->vfptr);
  v1->vfptr = (CharScreenBoardBaseVtbl *)&CharScreenBoardMiniHouse::`vftable';
  v1->m_spNameBoard.m_pObject = 0;
}
// 9B6F44: using guessed type int (__thiscall *CharScreenBoardMiniHouse::`vftable')(void *p, char);

//----- (00622240) --------------------------------------------------------
void __thiscall PgTList<SpeechBD *>::~PgTList<SpeechBD *>(PgTList<SpeechBD *> *this)
{
  PgTList<SpeechBD *> *v1; // edi@1
  NiTListItem<SpeechBD *> *v2; // esi@1
  NiTListItem<SpeechBD *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>Vtbl *)&PgTList<SpeechBD *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::`vftable';
}
// 9B702C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::`vftable')(void *p, char);
// 9B70CC: using guessed type int (__thiscall *PgTList<SpeechBD *>::`vftable')(void *p, char);

//----- (006222C0) --------------------------------------------------------
void __thiscall PgTList<NameBD *>::~PgTList<NameBD *>(PgTList<NameBD *> *this)
{
  PgTList<NameBD *> *v1; // edi@1
  NiTListItem<NameBD *> *v2; // esi@1
  NiTListItem<NameBD *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>Vtbl *)&PgTList<NameBD *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>::`vftable';
}
// 9B703C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>::`vftable')(void *p, char);
// 9B70DC: using guessed type int (__thiscall *PgTList<NameBD *>::`vftable')(void *p, char);

//----- (00622340) --------------------------------------------------------
void __thiscall PgTList<CharScreenBoardBase *>::~PgTList<CharScreenBoardBase *>(PgTList<CharScreenBoardBase *> *this)
{
  PgTList<CharScreenBoardBase *> *v1; // edi@1
  NiTListItem<CharScreenBoardBase *> *v2; // esi@1
  NiTListItem<CharScreenBoardBase *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>Vtbl *)&PgTList<CharScreenBoardBase *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::`vftable';
}
// 9B704C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::`vftable')(void *p, char);
// 9B70EC: using guessed type int (__thiscall *PgTList<CharScreenBoardBase *>::`vftable')(void *p, char);

//----- (006223C0) --------------------------------------------------------
void __thiscall PgTList<PrivateStoreBD *>::~PgTList<PrivateStoreBD *>(PgTList<PrivateStoreBD *> *this)
{
  PgTList<PrivateStoreBD *> *v1; // edi@1
  NiTListItem<PrivateStoreBD *> *v2; // esi@1
  NiTListItem<PrivateStoreBD *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>Vtbl *)&PgTList<PrivateStoreBD *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::`vftable';
}
// 9B705C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::`vftable')(void *p, char);
// 9B70FC: using guessed type int (__thiscall *PgTList<PrivateStoreBD *>::`vftable')(void *p, char);

//----- (00622440) --------------------------------------------------------
void __thiscall PgTList<GuildBD *>::~PgTList<GuildBD *>(PgTList<GuildBD *> *this)
{
  PgTList<GuildBD *> *v1; // edi@1
  NiTListItem<GuildBD *> *v2; // esi@1
  NiTListItem<GuildBD *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>Vtbl *)&PgTList<GuildBD *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::`vftable';
}
// 9B706C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::`vftable')(void *p, char);
// 9B710C: using guessed type int (__thiscall *PgTList<GuildBD *>::`vftable')(void *p, char);

//----- (006224C0) --------------------------------------------------------
PgTList<SpeechBD *> *__thiscall PgTList<SpeechBD *>::`scalar deleting destructor'(PgTList<SpeechBD *> *this, unsigned int a2)
{
  PgTList<SpeechBD *> *v2; // edi@1
  NiTListItem<SpeechBD *> *v3; // esi@1
  NiTListItem<SpeechBD *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>Vtbl *)&PgTList<SpeechBD *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B702C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,SpeechBD *>::`vftable')(void *p, char);
// 9B70CC: using guessed type int (__thiscall *PgTList<SpeechBD *>::`vftable')(void *p, char);

//----- (00622550) --------------------------------------------------------
PgTList<NameBD *> *__thiscall PgTList<NameBD *>::`scalar deleting destructor'(PgTList<NameBD *> *this, unsigned int a2)
{
  PgTList<NameBD *> *v2; // edi@1
  NiTListItem<NameBD *> *v3; // esi@1
  NiTListItem<NameBD *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>Vtbl *)&PgTList<NameBD *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B703C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NameBD *>::`vftable')(void *p, char);
// 9B70DC: using guessed type int (__thiscall *PgTList<NameBD *>::`vftable')(void *p, char);

//----- (006225E0) --------------------------------------------------------
PgTList<CharScreenBoardBase *> *__thiscall PgTList<CharScreenBoardBase *>::`scalar deleting destructor'(PgTList<CharScreenBoardBase *> *this, unsigned int a2)
{
  PgTList<CharScreenBoardBase *> *v2; // edi@1
  NiTListItem<CharScreenBoardBase *> *v3; // esi@1
  NiTListItem<CharScreenBoardBase *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>Vtbl *)&PgTList<CharScreenBoardBase *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B704C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,CharScreenBoardBase *>::`vftable')(void *p, char);
// 9B70EC: using guessed type int (__thiscall *PgTList<CharScreenBoardBase *>::`vftable')(void *p, char);

//----- (00622670) --------------------------------------------------------
PgTList<PrivateStoreBD *> *__thiscall PgTList<PrivateStoreBD *>::`scalar deleting destructor'(PgTList<PrivateStoreBD *> *this, unsigned int a2)
{
  PgTList<PrivateStoreBD *> *v2; // edi@1
  NiTListItem<PrivateStoreBD *> *v3; // esi@1
  NiTListItem<PrivateStoreBD *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>Vtbl *)&PgTList<PrivateStoreBD *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B705C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PrivateStoreBD *>::`vftable')(void *p, char);
// 9B70FC: using guessed type int (__thiscall *PgTList<PrivateStoreBD *>::`vftable')(void *p, char);

//----- (00622700) --------------------------------------------------------
PgTList<GuildBD *> *__thiscall PgTList<GuildBD *>::`scalar deleting destructor'(PgTList<GuildBD *> *this, unsigned int a2)
{
  PgTList<GuildBD *> *v2; // edi@1
  NiTListItem<GuildBD *> *v3; // esi@1
  NiTListItem<GuildBD *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>Vtbl *)&PgTList<GuildBD *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B706C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,GuildBD *>::`vftable')(void *p, char);
// 9B710C: using guessed type int (__thiscall *PgTList<GuildBD *>::`vftable')(void *p, char);

//----- (00622790) --------------------------------------------------------
void __cdecl std::_Destroy_range<std::allocator<NiPointer<PgSprData>>>(NiPointer<PgSprData> *_First, NiPointer<PgSprData> *_Last)
{
  NiPointer<PgSprData> *i; // edi@1
  NiPointer<PgSprData> v3; // esi@2

  for ( i = _First; i != _Last; ++i )
  {
    v3.m_pObject = i->m_pObject;
    if ( i->m_pObject && !InterlockedDecrement((volatile LONG *)&v3.m_pObject->m_uiRefCount) )
    {
      if ( v3.m_pObject )
        v3.m_pObject->vfptr->__vecDelDtor((NiRefObject *)v3.m_pObject, 1u);
    }
  }
}

//----- (006227D0) --------------------------------------------------------
void __thiscall ScreenBoardTexture::~ScreenBoardTexture(ScreenBoardTexture *this)
{
  ScreenBoardTexture *v1; // esi@1
  NiPointer<PgSprData> *v2; // eax@1

  v1 = this;
  v2 = (NiPointer<PgSprData> *)this->m_UseChecks._Myfirst;
  if ( v2 )
  {
    std::_Destroy_range<std::allocator<NiPointer<PgSprData>>>(v2, (NiPointer<PgSprData> *)this->m_UseChecks._Mylast);
    operator delete(v1->m_UseChecks._Myfirst);
  }
  v1->m_UseChecks._Myfirst = 0;
  v1->m_UseChecks._Mylast = 0;
  v1->m_UseChecks._Myend = 0;
}

//----- (00622820) --------------------------------------------------------
ScreenBoardGeometry::BoardInfo *__thiscall ScreenBoardGeometry::GetInfo(ScreenBoardGeometry *this)
{
  return &this->m_Info;
}

//----- (00622830) --------------------------------------------------------
void __thiscall ScreenBoardGeometry::Update(ScreenBoardGeometry *this, float fTime)
{
  NiAVObject::Update((NiAVObject *)&this->m_spScreenGeom.m_pObject->vfptr, fTime, 1);
}

//----- (00622850) --------------------------------------------------------
NiScreenElementsData *__thiscall ScreenBoardGeometry::CreateScreenGeometryData(ScreenBoardGeometry *this, NiPoint2 RenderSize, NiPoint2 TextureStartPos)
{
  ScreenBoardGeometry *v3; // esi@1
  unsigned int v4; // edi@1
  unsigned int v5; // eax@1
  double v6; // st6@1
  float fLeft; // ST40_4@1
  float fTop; // ST38_4@1
  float v9; // ST4C_4@1
  float fBottom; // ST44_4@1
  float v11; // ST44_4@3
  double v12; // st4@3
  float v13; // ST40_4@3
  float v14; // ST4C_4@3
  float v15; // ST38_4@3
  double v16; // st6@3
  float v17; // ST4C_4@3
  float v18; // ST44_4@3
  NiScreenElementsData *v19; // eax@3
  int v20; // esi@3
  NiScreenElementsData *v21; // eax@4
  NiScreenElementsData *v22; // ebx@4
  NiPoint2 *v23; // edi@6
  float fCorRectionPos; // [sp+28h] [bp-54h]@1
  NiPoint2 pkPts[4]; // [sp+2Ch] [bp-50h]@1
  NiPoint2 pkTUVs[4]; // [sp+4Ch] [bp-30h]@3
  int v28; // [sp+78h] [bp-4h]@3

  v3 = this;
  v4 = ((int (*)(void))this->m_pkTexture->vfptr[15].__vecDelDtor)();
  v5 = ((int (*)(void))v3->m_pkTexture->vfptr[16].__vecDelDtor)();
  v6 = 0.5 * RenderSize.x;
  fLeft = v3->m_Info.CorectionPos.x - v6;
  fTop = v3->m_Info.CorectionPos.y - RenderSize.y;
  v9 = v6 + v3->m_Info.CorectionPos.x;
  fBottom = v3->m_Info.CorectionPos.y + 0.0;
  pkPts[0].x = fLeft;
  pkPts[0].y = fTop;
  pkPts[1].x = fLeft;
  pkPts[1].y = fBottom;
  pkPts[2].x = v9;
  pkPts[2].y = fBottom;
  pkPts[3].x = v9;
  pkPts[3].y = fTop;
  fCorRectionPos = 0.0;
  if ( byte_B4FF93 == 1 )
    fCorRectionPos = 1.0;
  v11 = (double)v4;
  v12 = fCorRectionPos;
  v13 = (TextureStartPos.x + fCorRectionPos) / v11;
  v14 = (double)v5;
  v15 = (TextureStartPos.y + v12) / v14;
  v16 = v14;
  v17 = (RenderSize.x + TextureStartPos.x - v12) / v11;
  v18 = (TextureStartPos.y + RenderSize.y - v12) / v16;
  pkTUVs[0].x = v13;
  pkTUVs[0].y = v15;
  pkTUVs[1].x = v13;
  pkTUVs[1].y = v18;
  pkTUVs[2].x = v17;
  pkTUVs[2].y = v18;
  pkTUVs[3].x = v17;
  pkTUVs[3].y = v15;
  v19 = (NiScreenElementsData *)operator new(0x70u);
  v20 = 0;
  v28 = 0;
  if ( v19 )
  {
    NiScreenElementsData::NiScreenElementsData(v19, 0, 1, 1u, 1, 1, 4, 1, 2, 1);
    v22 = v21;
  }
  else
  {
    v22 = 0;
  }
  v28 = -1;
  NiScreenElementsData::Insert(v22, 4u, 0, 0);
  v23 = pkPts;
  do
  {
    NiScreenElementsData::SetVertex(v22, 0, v20++, v23);
    ++v23;
  }
  while ( v20 < 4 );
  NiScreenElementsData::UpdateBound(v22);
  NiScreenElementsData::SetTextures(v22, 0, 0, pkTUVs, &pkTUVs[1], &pkTUVs[2], &pkTUVs[3]);
  return v22;
}
// B4FF93: using guessed type char byte_B4FF93;

//----- (00622AA0) --------------------------------------------------------
NiScreenElements *__thiscall ScreenBoardGeometry::GetGeometry(ScreenBoardGeometry *this)
{
  return this->m_spScreenGeom.m_pObject;
}

//----- (00622AB0) --------------------------------------------------------
void __thiscall ScreenBoardGeometry::SetAlpha(ScreenBoardGeometry *this, float fAlpha)
{
  NiProperty *v2; // eax@1

  v2 = NiAVObject::GetProperty((NiAVObject *)&this->m_spScreenGeom.m_pObject->vfptr, 3);
  ++v2[3].m_uiRefCount;
  *(float *)&v2[3].vfptr = fAlpha;
}

//----- (00622AD0) --------------------------------------------------------
void __thiscall ScreenBoardGeometry::~ScreenBoardGeometry(ScreenBoardGeometry *this)
{
  ScreenBoardGeometry *v1; // esi@1
  NiScreenElements *v2; // edi@1
  ScreenBoardTexture::DescInfo *v3; // edi@6
  NiScreenElements *v4; // edi@13
  ScreenBoardTexture::DescInfo *v5; // edi@19

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ScreenBoardGeometry::`vftable';
  v2 = this->m_spScreenGeom.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spScreenGeom.m_pObject = 0;
  }
  v3 = v1->m_spDescInfo.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spDescInfo.m_pObject = 0;
  }
  if ( v1->m_strNameSpeech._Myres >= 0x10 )
    operator delete(v1->m_strNameSpeech._Bx._Ptr);
  v1->m_strNameSpeech._Myres = 15;
  v1->m_strNameSpeech._Mysize = 0;
  v1->m_strNameSpeech._Bx._Buf[0] = 0;
  v4 = v1->m_spScreenGeom.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  if ( v1->m_Info.Name._Myres >= 0x10 )
    operator delete(v1->m_Info.Name._Bx._Ptr);
  v1->m_Info.Name._Myres = 15;
  v1->m_Info.Name._Mysize = 0;
  v1->m_Info.Name._Bx._Buf[0] = 0;
  v5 = v1->m_spDescInfo.m_pObject;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  v1->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9B711C: using guessed type int (__thiscall *ScreenBoardGeometry::`vftable')(void *p, char);

//----- (00622C10) --------------------------------------------------------
void __thiscall ScreenBoardGeometry::ScreenBoardGeometry(ScreenBoardGeometry *this, ScreenBoardTexture *pBoardData)
{
  ScreenBoardGeometry *v2; // esi@1
  ScreenBoardTexture::DescInfo *v3; // edi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v2->vfptr = (NiRefObjectVtbl *)&ScreenBoardGeometry::`vftable';
  v2->m_spDescInfo.m_pObject = 0;
  v2->m_Info.Name._Myres = 15;
  v2->m_Info.Name._Mysize = 0;
  v2->m_Info.Name._Bx._Buf[0] = 0;
  v2->m_spScreenGeom.m_pObject = 0;
  v2->m_strNameSpeech._Myres = 15;
  v2->m_strNameSpeech._Mysize = 0;
  v2->m_strNameSpeech._Bx._Buf[0] = 0;
  v2->m_pBoardData = pBoardData;
  v3 = v2->m_spDescInfo.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
    {
      if ( v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
    v2->m_spDescInfo.m_pObject = 0;
  }
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9B711C: using guessed type int (__thiscall *ScreenBoardGeometry::`vftable')(void *p, char);

//----- (00622CC0) --------------------------------------------------------
void __thiscall ScreenBoardGeometry::SetBoardInfo(ScreenBoardGeometry *this, ScreenBoardGeometry::BoardInfo *info)
{
  ScreenBoardGeometry *v2; // esi@1
  ScreenBoardGeometry::BoardInfo *v3; // ebx@1
  char *v4; // edi@1
  char *v5; // eax@2
  ScreenBoardTexture *v6; // eax@5
  NiPointer<ScreenBoardTexture::DescInfo> *v7; // ebx@7
  ScreenBoardTexture::DescInfo *v8; // edi@7
  ScreenBoardTexture::DescInfo *v9; // ebx@12
  ScreenBoardGeometry::BoardInfo *v10; // edi@14
  ScreenBoardTexture::DescInfo *v11; // ecx@18
  NiSourceTexture *v12; // eax@19
  ScreenBoardTexture::DescInfo *v13; // ecx@19
  double v14; // st7@19
  NiPoint2 v15; // ST34_8@19
  NiPoint2 *v16; // eax@19
  NiScreenElementsData *v17; // ebx@19
  NiScreenElements *v18; // edi@20
  ScreenBoardGeometry::BoardInfo *v19; // eax@25
  NiScreenElements *v20; // eax@26
  NiScreenElements *v21; // ebx@26
  NiScreenElements *v22; // edi@28
  ScreenBoardGeometry::BoardInfo *v23; // eax@35
  int v24; // eax@36
  int v25; // edi@36
  NiTexture *v26; // ST1C_4@38
  ScreenBoardGeometry::BoardInfo *v27; // eax@40
  int v28; // eax@41
  NiAVObject *v29; // ecx@43
  tagSIZE RenderSize; // [sp+3Ch] [bp-1Ch]@4
  NiPoint2 result; // [sp+44h] [bp-14h]@19
  int v32; // [sp+54h] [bp-4h]@7

  v2 = this;
  v3 = info;
  v4 = this->m_Info.Name._Bx._Buf;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &this->m_Info.Name,
    &info->Name,
    0,
    0xFFFFFFFF);
  *((_DWORD *)v4 + 7) = v3->color;
  *((_DWORD *)v4 + 8) = LODWORD(v3->CorectionPos.x);
  *((_DWORD *)v4 + 9) = LODWORD(v3->CorectionPos.y);
  if ( *((_DWORD *)v4 + 5) < 0x10u )
    v5 = v4;
  else
    v5 = *(char **)v4;
  ((void (__stdcall *)(tagSIZE *, char *))v2->m_pBoardData->vfptr->GetTextRenderSize)(&RenderSize, v5);
  if ( RenderSize.cx )
  {
    v6 = v2->m_pBoardData;
    v6->m_DestCorrectionPos.cx = 0;
    v6->m_DestCorrectionPos.cy = 0;
    if ( *((_DWORD *)v4 + 5) >= 0x10u )
      v4 = *(char **)v4;
    v7 = ScreenBoardTexture::TextOutA(
           v2->m_pBoardData,
           (NiPointer<ScreenBoardTexture::DescInfo> *)&info,
           v4,
           v2->m_Info.color);
    v8 = v2->m_spDescInfo.m_pObject;
    v32 = 0;
    if ( v8 != v7->m_pObject )
    {
      if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
        v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      v9 = v7->m_pObject;
      v2->m_spDescInfo.m_pObject = v9;
      if ( v9 )
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
    }
    v10 = info;
    v32 = -1;
    if ( *(float *)&info != 0.0 && !InterlockedDecrement((volatile LONG *)&info->Name._Bx._Alias[4]) && v10 )
      (*(void (__thiscall **)(ScreenBoardGeometry::BoardInfo *, signed int))v10->Name._Bx._Ptr)(v10, 1);
    v11 = v2->m_spDescInfo.m_pObject;
    if ( v11 )
    {
      v12 = ScreenBoardTexture::DescInfo::GetTexture(v11);
      v13 = v2->m_spDescInfo.m_pObject;
      *(float *)&info = (double)RenderSize.cx;
      v14 = (double)RenderSize.cy;
      v2->m_pkTexture = (NiTexture *)v12;
      result.y = v14;
      v15.x = *(float *)&info;
      v15.y = result.y;
      v16 = ScreenBoardTexture::DescInfo::GetRenderStartPos(v13, &result);
      v17 = ScreenBoardGeometry::CreateScreenGeometryData(v2, v15, *v16);
      if ( v2->m_spScreenGeom.m_pObject )
      {
        v18 = v2->m_spScreenGeom.m_pObject;
        if ( v18 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v18->m_uiRefCount) && v18 )
            v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
          v2->m_spScreenGeom.m_pObject = 0;
        }
      }
      v19 = (ScreenBoardGeometry::BoardInfo *)operator new(0xC4u);
      info = v19;
      v32 = 1;
      if ( v19 )
      {
        NiScreenElements::NiScreenElements((NiScreenElements *)v19, v17);
        v21 = v20;
      }
      else
      {
        v21 = 0;
      }
      v22 = v2->m_spScreenGeom.m_pObject;
      v32 = -1;
      if ( v22 != v21 )
      {
        if ( v22 && !InterlockedDecrement((volatile LONG *)&v22->m_uiRefCount) && v22 )
          v22->vfptr->__vecDelDtor((NiRefObject *)v22, 1u);
        v2->m_spScreenGeom.m_pObject = v21;
        if ( v21 )
          InterlockedIncrement((volatile LONG *)&v21->m_uiRefCount);
      }
      v23 = (ScreenBoardGeometry::BoardInfo *)operator new(0x44u);
      info = v23;
      v32 = 2;
      if ( v23 )
      {
        NiTexturingProperty::NiTexturingProperty((NiTexturingProperty *)v23);
        v25 = v24;
      }
      else
      {
        v25 = 0;
      }
      v26 = v2->m_pkTexture;
      v32 = -1;
      NiTexturingProperty::SetBaseTexture((NiTexturingProperty *)v25, v26);
      NiTexturingProperty::SetBaseFilterMode((NiTexturingProperty *)v25, FILTER_BILERP);
      if ( !byte_B4FF93 )
        NiTexturingProperty::SetBaseFilterMode((NiTexturingProperty *)v25, 0);
      *(_DWORD *)(v25 + 28) = 2;
      NiTexturingProperty::SetBaseClampMode((NiTexturingProperty *)v25, 0);
      NiAVObject::AttachProperty((NiAVObject *)&v2->m_spScreenGeom.m_pObject->vfptr, (NiProperty *)v25);
      v27 = (ScreenBoardGeometry::BoardInfo *)operator new(0x60u);
      info = v27;
      v32 = 3;
      if ( v27 )
        NiMaterialProperty::NiMaterialProperty((NiMaterialProperty *)v27);
      else
        v28 = 0;
      ++*(_DWORD *)(v28 + 88);
      *(float *)(v28 + 68) = 1.0;
      *(float *)(v28 + 72) = 1.0;
      *(float *)(v28 + 76) = 1.0;
      v29 = (NiAVObject *)&v2->m_spScreenGeom.m_pObject->vfptr;
      v32 = -1;
      NiAVObject::AttachProperty(v29, (NiProperty *)v28);
      NiAVObject::UpdateProperties((NiAVObject *)&v2->m_spScreenGeom.m_pObject->vfptr);
      NiAVObject::Update((NiAVObject *)&v2->m_spScreenGeom.m_pObject->vfptr, 0.0, 0);
      v2->m_spScreenGeom.m_pObject->m_uFlags &= 0xFFFEu;
    }
  }
}
// B4FF93: using guessed type char byte_B4FF93;

//----- (00622FA0) --------------------------------------------------------
ScreenBoardGeometry *__thiscall ScreenBoardGeometry::`vector deleting destructor'(ScreenBoardGeometry *this, unsigned int a2)
{
  ScreenBoardGeometry *v2; // esi@1

  v2 = this;
  ScreenBoardGeometry::~ScreenBoardGeometry(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00622FD0) --------------------------------------------------------
int __thiscall ScreenBDMgr::GetNotUsedGuildBDTextureIndex(ScreenBDMgr *this)
{
  int v1; // edx@1
  int result; // eax@1
  bool *v3; // ecx@2

  v1 = this->m_iTotalGuildBDTextureIndex;
  result = 0;
  if ( v1 <= 0 )
  {
LABEL_5:
    result = -1;
  }
  else
  {
    v3 = this->m_pabUseGuildBD;
    while ( v3[result] )
    {
      if ( ++result >= v1 )
        goto LABEL_5;
    }
  }
  return result;
}

//----- (00623000) --------------------------------------------------------
GuildBD *__thiscall ScreenBDMgr::GetGuildBD(ScreenBDMgr *this, unsigned __int16 kHandle)
{
  NiTListItem<GuildBD *> *v2; // ecx@1
  GuildBD *result; // eax@2

  v2 = this->m_kGuildBDList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      result = v2->m_element;
      v2 = v2->m_pkNext;
      if ( result->m_kCharHandle == kHandle )
        break;
      if ( !v2 )
        goto LABEL_4;
    }
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}

//----- (00623030) --------------------------------------------------------
GuildBD *__thiscall ScreenBDMgr::GetMostFarGuildBD(ScreenBDMgr *this, NiPoint3 *kPos)
{
  ScreenBDMgr *v2; // esi@1
  GuildBD *v3; // ebx@1
  int v4; // eax@1
  NiTListItem<GuildBD *> *v5; // esi@1
  float v6; // ST10_4@1
  float v7; // ST14_4@1
  float v8; // ST18_4@1
  GuildBD *v9; // edi@2
  Char *v10; // eax@3
  int v11; // eax@4
  float fFarDist; // ST28_4@4
  float v14; // [sp+8h] [bp-1Ch]@4
  float v15; // [sp+Ch] [bp-18h]@4
  float v16; // [sp+10h] [bp-14h]@4
  float kMainPos; // [sp+14h] [bp-10h]@1
  float kMainPos_4; // [sp+18h] [bp-Ch]@1
  float kMainPos_8; // [sp+1Ch] [bp-8h]@1
  float fMostFarDist; // [sp+2Ch] [bp+8h]@1

  v2 = this;
  v3 = 0;
  v4 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
  kMainPos_8 = *(float *)(v4 + 8);
  kMainPos = *(float *)v4;
  kMainPos_4 = *(float *)(v4 + 4);
  v5 = v2->m_kGuildBDList.m_pkHead;
  v6 = *(float *)v4 - kPos->x;
  v7 = kMainPos_4 - kPos->y;
  v8 = kMainPos_8 - kPos->z;
  fMostFarDist = v7 * v7 + v6 * v6 + v8 * v8;
  while ( v5 )
  {
    v9 = v5->m_element;
    v5 = v5->m_pkNext;
    if ( v9 )
    {
      v10 = CharMgr::GetChar(&g_kCharMgr, v9->m_kCharHandle);
      if ( v10 )
      {
        v11 = ((int (__thiscall *)(Char *))v10->vfptr[6].Deaffect)(v10);
        v14 = kMainPos - *(float *)v11;
        v15 = kMainPos_4 - *(float *)(v11 + 4);
        v16 = kMainPos_8 - *(float *)(v11 + 8);
        fFarDist = v15 * v15 + v14 * v14 + v16 * v16;
        if ( fFarDist > (double)fMostFarDist )
        {
          fMostFarDist = v15 * v15 + v14 * v14 + v16 * v16;
          v3 = v9;
        }
      }
    }
  }
  return v3;
}

//----- (00623130) --------------------------------------------------------
bool __thiscall ScreenBDMgr::InitGuildBD(ScreenBDMgr *this)
{
  ScreenBDMgr *v1; // ebx@1
  NiPixelData *v2; // eax@1
  NiPixelData *v3; // eax@2
  NiSourceTexture *v4; // esi@4
  int v5; // eax@4
  void (__thiscall ***v6)(_DWORD, _DWORD); // edi@6
  NiPixelData *v8; // eax@13
  NiPixelData *v9; // eax@14
  NiSourceTexture *v10; // eax@16
  NiSourceTexture *v11; // esi@16
  NiSourceTexture *v12; // edi@16
  char *v13; // eax@24
  unsigned int v14; // ST0C_4@24
  struct Font::FontDefine **v15; // eax@25
  NiTexture::FormatPrefs kPrefs; // [sp+10h] [bp-60h]@1
  NiPixelData *v17; // [sp+1Ch] [bp-54h]@1
  bool bOldbDestroyAppData; // [sp+23h] [bp-4Dh]@1
  tagLOGFONTA LogFont; // [sp+24h] [bp-4Ch]@25
  int v20; // [sp+6Ch] [bp-4h]@1

  v1 = this;
  kPrefs.m_eAlphaFmt = 3;
  kPrefs.m_ePixelLayout = 2;
  kPrefs.m_eMipMapped = 0;
  bOldbDestroyAppData = NiSourceTexture::ms_bDestroyAppData;
  NiSourceTexture::ms_bDestroyAppData = 1;
  v2 = (NiPixelData *)operator new(0x70u);
  v17 = v2;
  v20 = 0;
  if ( v2 )
    NiPixelData::NiPixelData(v2, 0x100u, 0x20u, &NiPixelFormat::RGB24, 1u, 1u);
  else
    v3 = 0;
  v20 = -1;
  v4 = NiSourceTexture::Create(v3, &kPrefs);
  v5 = GuildBD::ms_spTempTexture;
  if ( (NiSourceTexture *)GuildBD::ms_spTempTexture != v4 )
  {
    if ( GuildBD::ms_spTempTexture )
    {
      v6 = (void (__thiscall ***)(_DWORD, _DWORD))GuildBD::ms_spTempTexture;
      if ( !InterlockedDecrement((volatile LONG *)(GuildBD::ms_spTempTexture + 4)) )
      {
        if ( v6 )
          (**v6)(v6, 1);
      }
    }
    GuildBD::ms_spTempTexture = (int)v4;
    if ( !v4 )
      return 0;
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
    v5 = GuildBD::ms_spTempTexture;
  }
  if ( !v5 )
    return 0;
  v8 = (NiPixelData *)operator new(0x70u);
  v17 = v8;
  v20 = 1;
  if ( v8 )
    NiPixelData::NiPixelData(v8, 0x200u, 0x100u, &NiPixelFormat::RGBA32, 1u, 1u);
  else
    v9 = 0;
  v20 = -1;
  v10 = NiSourceTexture::Create(v9, &kPrefs);
  v11 = v1->m_spGuildBDTexture.m_pObject;
  v12 = v10;
  if ( v11 != v10 )
  {
    if ( v11 && !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    v1->m_spGuildBDTexture.m_pObject = v12;
    if ( v12 )
      InterlockedIncrement((volatile LONG *)&v12->m_uiRefCount);
  }
  if ( !v1->m_spGuildBDTexture.m_pObject )
    return 0;
  NiSourceTexture::ms_bDestroyAppData = bOldbDestroyAppData;
  v1->m_iTotalGuildBDTextureIndex = 22;
  v13 = (char *)operator new[](0x16u);
  v14 = v1->m_iTotalGuildBDTextureIndex;
  v1->m_pabUseGuildBD = (bool *)v13;
  memset(v13, 0, v14);
  GuildBD::ms_hEraseBrush = CreateSolidBrush(0xFF00FFu);
  if ( !GuildBD::ms_hEraseBrush )
    return 0;
  v15 = Font::GetFontDefine(0);
  *(_WORD *)&LogFont.lfUnderline = 0;
  LogFont.lfItalic = 0;
  LogFont.lfEscapement = 0;
  LogFont.lfOrientation = 0;
  LogFont.lfOutPrecision = *((_BYTE *)v15 + 20);
  LogFont.lfClipPrecision = 0;
  LogFont.lfHeight = (int)*v15;
  LogFont.lfWidth = 0;
  LogFont.lfCharSet = *((_BYTE *)v15 + 16);
  LogFont.lfQuality = *((_BYTE *)v15 + 24);
  LogFont.lfWeight = (int)v15[2];
  LogFont.lfPitchAndFamily = *((_BYTE *)v15 + 28);
  lstrcpyA(LogFont.lfFaceName, (LPCSTR)v15[8]);
  GuildBD::ms_hFont = CreateFontIndirectA(&LogFont);
  return GuildBD::ms_hFont != 0;
}
// A96834: using guessed type int GuildBD::ms_spTempTexture;
// B6248C: using guessed type bool NiSourceTexture::ms_bDestroyAppData;

//----- (00623380) --------------------------------------------------------
void __thiscall ScreenBDMgr::RemoveGuildBD(ScreenBDMgr *this, GuildBD *pkGuildBD)
{
  GuildBD *v2; // esi@1
  ScreenBDMgr *v3; // edi@1
  NiTListItem<GuildBD *> *v4; // eax@1
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *v5; // ecx@1
  GuildBD **v6; // edx@2
  GuildBD *v7; // ebx@2
  GuildBD *v8; // edi@8

  v2 = pkGuildBD;
  v3 = this;
  this->m_pabUseGuildBD[pkGuildBD->m_iTextureIndex] = 0;
  v4 = this->m_kGuildBDList.m_pkHead;
  v5 = (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&this->m_kGuildBDList;
  if ( v4 )
  {
    while ( 1 )
    {
      v6 = &v4->m_element;
      v7 = (GuildBD *)v4;
      v4 = v4->m_pkNext;
      if ( v2 == *v6 )
        break;
      if ( !v4 )
        goto LABEL_4;
    }
  }
  else
  {
LABEL_4:
    v7 = 0;
  }
  pkGuildBD = v7;
  if ( v7 )
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(v5, (void **)&pkGuildBD);
  ((void (__stdcall *)(_DWORD, _DWORD))v3->m_pkGuildBDScene->vfptr[30].__vecDelDtor)(&pkGuildBD, v2->m_spNode.m_pObject);
  if ( pkGuildBD )
  {
    v8 = pkGuildBD;
    if ( !InterlockedDecrement((volatile LONG *)&pkGuildBD->m_eEnemyStatus) )
    {
      if ( v8 )
        v8->vfptr->__vecDelDtor(v8, 1u);
    }
  }
  v2->vfptr->__vecDelDtor(v2, 1u);
}

//----- (00623420) --------------------------------------------------------
void __usercall ScreenBDMgr::RemoveAllGuildBD(ScreenBDMgr *this@<ecx>, signed int a2@<esi>)
{
  ScreenBDMgr *v2; // ebx@1
  NiTListItem<GuildBD *> *v3; // edi@1
  GuildBD *v4; // esi@3
  NiTListItem<GuildBD *> **v5; // eax@3
  GuildBD **v6; // ecx@4
  NiTListItem<GuildBD *> **v7; // edx@4
  void (__thiscall ***v8)(_DWORD, _DWORD); // ebx@10
  signed int v9; // [sp-4h] [bp-18h]@2
  int v10; // [sp+8h] [bp-Ch]@9
  void *kPos; // [sp+Ch] [bp-8h]@7
  ScreenBDMgr *v12; // [sp+10h] [bp-4h]@1

  v2 = this;
  v3 = this->m_kGuildBDList.m_pkHead;
  v12 = this;
  if ( v3 )
  {
    v9 = a2;
    do
    {
      v4 = v3->m_element;
      v3 = v3->m_pkNext;
      v2->m_pabUseGuildBD[v4->m_iTextureIndex] = 0;
      v5 = &v2->m_kGuildBDList.m_pkHead->m_pkNext;
      if ( v5 )
      {
        while ( 1 )
        {
          v6 = (GuildBD **)(v5 + 2);
          v7 = v5;
          v5 = (NiTListItem<GuildBD *> **)*v5;
          if ( v4 == *v6 )
            break;
          if ( !v5 )
            goto LABEL_6;
        }
      }
      else
      {
LABEL_6:
        v7 = 0;
      }
      kPos = v7;
      if ( v7 )
        NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&v2->m_kGuildBDList,
          &kPos);
      ((void (__stdcall *)(int *, NiNode *, signed int))v2->m_pkGuildBDScene->vfptr[30].__vecDelDtor)(
        &v10,
        v4->m_spNode.m_pObject,
        v9);
      if ( v10 )
      {
        v8 = (void (__thiscall ***)(_DWORD, _DWORD))v10;
        if ( !InterlockedDecrement((volatile LONG *)(v10 + 4)) )
        {
          if ( v8 )
            (**v8)(v8, 1);
        }
        v2 = v12;
      }
      v9 = 1;
      ((void (__thiscall *)(GuildBD *))v4->vfptr->__vecDelDtor)(v4);
    }
    while ( v3 );
  }
}
// 623420: could not find valid save-restore pair for esi

//----- (006234F0) --------------------------------------------------------
void __thiscall ScreenBDMgr::AddGuildBD(ScreenBDMgr *this, unsigned __int16 kHandle)
{
  ScreenBDMgr *v2; // esi@1
  Char *v3; // edi@1
  int v4; // eax@2
  int v5; // ebx@5
  NiPoint3 *v6; // eax@6
  GuildBD *v7; // eax@6
  GuildBD *v8; // eax@8
  GuildBD *v9; // edi@8
  GuildBD *v10; // eax@9
  NiAVObject *v11; // edi@10
  GuildBD *pkGuildBD; // [sp+20h] [bp-18h]@2
  float v13; // [sp+24h] [bp-14h]@2
  float v14; // [sp+28h] [bp-10h]@2
  int v15; // [sp+34h] [bp-4h]@8

  v2 = this;
  v3 = CharMgr::GetChar(&g_kCharMgr, kHandle);
  if ( v3 )
  {
    v4 = ((int (__thiscall *)(Char *))v3->vfptr[6].Deaffect)(v3);
    v13 = pkWorldCamera->m_kLocal.m_Translate.x - *(float *)v4;
    v14 = pkWorldCamera->m_kLocal.m_Translate.y - *(float *)(v4 + 4);
    *(float *)&pkGuildBD = pkWorldCamera->m_kLocal.m_Translate.z - *(float *)(v4 + 8);
    *(float *)&pkGuildBD = v14 * v14 + v13 * v13 + *(float *)&pkGuildBD * *(float *)&pkGuildBD;
    *(float *)&pkGuildBD = sqrt(*(float *)&pkGuildBD);
    if ( GuildBD::ms_fMaxDistance >= (double)*(float *)&pkGuildBD
      && v3->m_dwGuildRegNum
      && !ScreenBDMgr::GetGuildBD(v2, kHandle) )
    {
      v5 = ScreenBDMgr::GetNotUsedGuildBDTextureIndex(v2);
      if ( v5 == -1 )
      {
        v6 = (NiPoint3 *)((int (__thiscall *)(Char *))v3->vfptr[6].Deaffect)(v3);
        v7 = ScreenBDMgr::GetMostFarGuildBD(v2, v6);
        if ( !v7 )
          return;
        v5 = v7->m_iTextureIndex;
        ScreenBDMgr::RemoveGuildBD(v2, v7);
      }
      v2->m_pabUseGuildBD[v5] = 1;
      v8 = (GuildBD *)operator new(0x180u);
      pkGuildBD = v8;
      v9 = 0;
      v15 = 0;
      if ( v8 )
      {
        GuildBD::GuildBD(v8, (NiTexture *)&v2->m_spGuildBDTexture.m_pObject->vfptr, v5);
        v9 = v10;
      }
      v15 = -1;
      pkGuildBD = v9;
      GuildBD::SetChar(v9, kHandle);
      NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v2->m_kGuildBDList,
        (NiD3DXEffectParameter *const *)&pkGuildBD);
      v11 = (NiAVObject *)&v9->m_spNode.m_pObject->vfptr;
      if ( v11 )
      {
        ((void (__stdcall *)(NiAVObject *, signed int))v2->m_pkGuildBDScene->vfptr[29].__vecDelDtor)(v11, 1);
        NiAVObject::UpdateProperties(v11);
        NiAVObject::UpdateEffects(v11);
        NiAVObject::Update((NiAVObject *)&v2->m_pkGuildBDScene->vfptr, 0.0, 1);
      }
    }
  }
}
// A72E4C: using guessed type float GuildBD::ms_fMaxDistance;

//----- (006236A0) --------------------------------------------------------
void __thiscall ScreenBDMgr::UpdateGuildBD(ScreenBDMgr *this, float fTime, NiCamera *pkWorldCamera)
{
  ScreenBDMgr *v3; // ebx@1
  void *v4; // ecx@1
  float v5; // edi@2
  Char *v6; // esi@4
  NiTListItem<GuildBD *> *v7; // eax@5
  float v8; // ecx@6
  int v9; // eax@12
  bool v10; // zf@27
  NiTListItem<GuildBD *> *v11; // esi@32
  GuildBD *v12; // edi@33
  NiTListItem<GuildBD *> **v13; // esi@36
  GuildBD **v14; // eax@37
  NiPoint3 kPos; // [sp+18h] [bp-10h]@12
  void *kIter; // [sp+24h] [bp-4h]@3

  v3 = this;
  v4 = (void *)unk_A96B24;
  if ( unk_A96B24 )
  {
    v5 = fTime;
    while ( 1 )
    {
      v6 = (Char *)*((_DWORD *)v4 + 2);
      kIter = *(void **)v4;
      if ( !v6 )
        break;
      v7 = v3->m_kGuildBDList.m_pkHead;
      if ( v7 )
      {
        while ( 1 )
        {
          v8 = *(float *)&v7->m_element;
          v7 = v7->m_pkNext;
          if ( *(_WORD *)(LODWORD(v8) + 12) == v6->m_kHandle )
            break;
          if ( !v7 )
            goto LABEL_8;
        }
        v5 = v8;
      }
      else
      {
LABEL_8:
        v5 = 0.0;
      }
      if ( !Char::IsUpdate(v6) || v6->m_bCulled )
        break;
      if ( !v6->m_bIsDoor )
      {
        v9 = ((int (__thiscall *)(Char *))v6->vfptr[6].Deaffect)(v6);
        kPos.x = *(float *)v9;
        kPos.y = *(float *)(v9 + 4);
        kPos.z = *(float *)(v9 + 8);
        if ( GuildBD::IsInShowRange(&kPos) == 1 )
        {
          if ( v5 != 0.0 )
          {
            if ( (byte_B4FF66 || g_pkMainChar != v6)
              && (byte_B4FF67
               || g_pkMainChar == v6
               || (unsigned __int8)((int (__thiscall *)(Char *))v6->vfptr[1].Affect)(v6)) )
            {
              v10 = v6->m_bCulled == 0;
LABEL_29:
              if ( v10 )
                goto LABEL_31;
            }
            *(_BYTE *)(LODWORD(v5) + 28) = 0;
            goto LABEL_31;
          }
          if ( byte_B4FF66 && g_pkMainChar == v6 )
          {
            ScreenBDMgr::AddGuildBD(v3, v6->m_kHandle);
          }
          else if ( byte_B4FF67
                 && g_pkMainChar != v6
                 && !(unsigned __int8)((int (__thiscall *)(Char *))v6->vfptr[1].Affect)(v6) )
          {
            ScreenBDMgr::AddGuildBD(v3, v6->m_kHandle);
          }
        }
      }
LABEL_31:
      if ( !kIter )
        goto LABEL_32;
      v4 = kIter;
    }
    v10 = LODWORD(v5) == 0;
    goto LABEL_29;
  }
LABEL_32:
  v11 = v3->m_kGuildBDList.m_pkHead;
  while ( v11 )
  {
    v12 = v11->m_element;
    v11 = v11->m_pkNext;
    if ( !GuildBD::IsAlive(v12, fTime) )
      ScreenBDMgr::RemoveGuildBD(v3, v12);
  }
  v13 = &v3->m_kGuildBDList.m_pkHead->m_pkNext;
  while ( v13 )
  {
    v14 = (GuildBD **)(v13 + 2);
    v13 = (NiTListItem<GuildBD *> **)*v13;
    GuildBD::Update(*v14, fTime, pkWorldCamera, v3->m_spScreenSpaceCamera.m_pObject);
  }
  NiAVObject::Update((NiAVObject *)&v3->m_pkGuildBDScene->vfptr, fTime, 1);
}
// B4FF66: using guessed type char byte_B4FF66;
// B4FF67: using guessed type char byte_B4FF67;

//----- (00623870) --------------------------------------------------------
void __usercall ScreenBDMgr::TerminateGuildBD(ScreenBDMgr *this@<ecx>, signed int a2@<esi>)
{
  ScreenBDMgr *v2; // edi@1
  void (__thiscall ***v3)(_DWORD, _DWORD); // esi@2
  NiSourceTexture *v4; // esi@6

  v2 = this;
  ScreenBDMgr::RemoveAllGuildBD(this, a2);
  if ( GuildBD::ms_spTempTexture )
  {
    v3 = (void (__thiscall ***)(_DWORD, _DWORD))GuildBD::ms_spTempTexture;
    if ( !InterlockedDecrement((volatile LONG *)(GuildBD::ms_spTempTexture + 4)) && v3 )
      (**v3)(v3, 1);
    GuildBD::ms_spTempTexture = 0;
  }
  v4 = v2->m_spGuildBDTexture.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v2->m_spGuildBDTexture.m_pObject = 0;
  }
  operator delete[](v2->m_pabUseGuildBD);
  v2->m_pabUseGuildBD = 0;
  DeleteObject(GuildBD::ms_hEraseBrush);
  DeleteObject(GuildBD::ms_hFont);
}
// A96834: using guessed type int GuildBD::ms_spTempTexture;

//----- (00623910) --------------------------------------------------------
char ScreenBDMgr::InitMainCharHPBar()
{
  return 1;
}

//----- (00623950) --------------------------------------------------------
int __thiscall ScreenBDMgr::GetNotUsedPrivateStoreBDTextureIndex(ScreenBDMgr *this)
{
  int v1; // edx@1
  int result; // eax@1
  bool *v3; // ecx@2

  v1 = this->m_iTotalPrivateStoreBDTextureIndex;
  result = 0;
  if ( v1 <= 0 )
  {
LABEL_5:
    result = -1;
  }
  else
  {
    v3 = this->m_pabUsePrivateStoreBD;
    while ( v3[result] )
    {
      if ( ++result >= v1 )
        goto LABEL_5;
    }
  }
  return result;
}

//----- (00623980) --------------------------------------------------------
void __thiscall ScreenBDMgr::MarkAsUsePrivateStoreBD(ScreenBDMgr *this, int iTextureIndex)
{
  this->m_pabUsePrivateStoreBD[iTextureIndex] = 1;
}

//----- (006239A0) --------------------------------------------------------
void __thiscall ScreenBDMgr::MarkAsUnusePrivateStoreBD(ScreenBDMgr *this, int iTextureIndex)
{
  this->m_pabUsePrivateStoreBD[iTextureIndex] = 0;
}

//----- (006239C0) --------------------------------------------------------
PrivateStoreBD *__thiscall ScreenBDMgr::GetPrivateStoreBD(ScreenBDMgr *this, unsigned __int16 kHandle)
{
  NiTListItem<PrivateStoreBD *> *v2; // ecx@1
  PrivateStoreBD *result; // eax@2

  v2 = this->m_kPrivateStoreBDList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      result = v2->m_element;
      v2 = v2->m_pkNext;
      if ( result->m_kCharHandle == kHandle )
        break;
      if ( !v2 )
        goto LABEL_4;
    }
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}

//----- (006239F0) --------------------------------------------------------
NiTListItem<PrivateStoreBD *> *__thiscall ScreenBDMgr::GetMostOldPrivateStoreBD(ScreenBDMgr *this)
{
  NiTListItem<PrivateStoreBD *> *result; // eax@1

  result = this->m_kPrivateStoreBDList.m_pkHead;
  if ( result )
    result = (NiTListItem<PrivateStoreBD *> *)result->m_element;
  return result;
}

//----- (00623A00) --------------------------------------------------------
char __thiscall ScreenBDMgr::InitPrivateStoreBD(ScreenBDMgr *this)
{
  NiPixelData *v1; // esi@1
  NiPixelData *v2; // eax@1
  NiPixelData *v3; // eax@2
  NiSourceTexture *v4; // edi@6
  int v5; // eax@6
  void (__thiscall ***v6)(_DWORD, _DWORD); // ebx@8
  char result; // al@17
  NiPixelData *v8; // eax@18
  NiPixelData *v9; // eax@19
  NiPixelData *v10; // edi@19
  NiSourceTexture *v11; // eax@27
  ScreenBDMgr *v12; // ecx@27
  NiSourceTexture *v13; // edi@27
  NiSourceTexture *v14; // ebx@27
  unsigned int v15; // eax@39
  char *v16; // eax@39
  ScreenBDMgr *v17; // ecx@39
  struct Font::FontDefine **v18; // eax@44
  NiTexture::FormatPrefs kPrefs; // [sp+10h] [bp-68h]@1
  NiPixelData *v20; // [sp+1Ch] [bp-5Ch]@1
  NiPointer<NiPixelData> pkRaw; // [sp+20h] [bp-58h]@1
  ScreenBDMgr *v22; // [sp+24h] [bp-54h]@1
  bool bOldbDestroyAppData; // [sp+2Bh] [bp-4Dh]@1
  tagLOGFONTA LogFont; // [sp+2Ch] [bp-4Ch]@44
  int v25; // [sp+74h] [bp-4h]@1

  v1 = 0;
  v22 = this;
  kPrefs.m_eAlphaFmt = 3;
  kPrefs.m_ePixelLayout = 2;
  kPrefs.m_eMipMapped = 0;
  bOldbDestroyAppData = NiSourceTexture::ms_bDestroyAppData;
  NiSourceTexture::ms_bDestroyAppData = 1;
  pkRaw.m_pObject = 0;
  v25 = 0;
  v2 = (NiPixelData *)operator new(0x70u);
  v20 = v2;
  LOBYTE(v25) = 1;
  if ( v2 )
    NiPixelData::NiPixelData(v2, 0x200u, 0x200u, &NiPixelFormat::RGB24, 1u, 1u);
  else
    v3 = 0;
  LOBYTE(v25) = 0;
  if ( v3 )
  {
    v1 = v3;
    pkRaw.m_pObject = v3;
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
  v4 = NiSourceTexture::Create(v1, &kPrefs);
  v5 = PrivateStoreBD::ms_spTempTexture;
  if ( (NiSourceTexture *)PrivateStoreBD::ms_spTempTexture != v4 )
  {
    if ( PrivateStoreBD::ms_spTempTexture )
    {
      v6 = (void (__thiscall ***)(_DWORD, _DWORD))PrivateStoreBD::ms_spTempTexture;
      if ( !InterlockedDecrement((volatile LONG *)(PrivateStoreBD::ms_spTempTexture + 4)) )
      {
        if ( v6 )
          (**v6)(v6, 1);
      }
    }
    PrivateStoreBD::ms_spTempTexture = (int)v4;
    if ( !v4 )
      goto LABEL_14;
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
    v5 = PrivateStoreBD::ms_spTempTexture;
  }
  if ( !v5 )
  {
LABEL_14:
    v25 = -1;
    if ( v1 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
        v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
    }
    return 0;
  }
  v8 = (NiPixelData *)operator new(0x70u);
  v20 = v8;
  LOBYTE(v25) = 2;
  if ( v8 )
  {
    NiPixelData::NiPixelData(v8, 0x400u, 0x400u, &NiPixelFormat::RGBA32, 1u, 1u);
    v10 = v9;
  }
  else
  {
    v10 = 0;
  }
  LOBYTE(v25) = 0;
  if ( v1 != v10 )
  {
    if ( v1 && !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
      v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
    v1 = v10;
    pkRaw.m_pObject = v10;
    if ( v10 )
      InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
  }
  v11 = NiSourceTexture::Create(v1, &kPrefs);
  v12 = v22;
  v13 = v22->m_spPrivateStoreBDTexture.m_pObject;
  v14 = v11;
  if ( v13 != v11 )
  {
    if ( v13 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) && v13 )
        v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
      v12 = v22;
    }
    v12->m_spPrivateStoreBDTexture.m_pObject = v14;
    if ( v14 )
    {
      InterlockedIncrement((volatile LONG *)&v14->m_uiRefCount);
      v12 = v22;
    }
  }
  if ( v12->m_spPrivateStoreBDTexture.m_pObject )
  {
    NiSourceTexture::ms_bDestroyAppData = bOldbDestroyAppData;
    v15 = v12->m_iMaxPrivateStoreView;
    v12->m_iTotalPrivateStoreBDTextureIndex = v15;
    v16 = (char *)operator new[](v15);
    v17 = v22;
    v22->m_pabUsePrivateStoreBD = (bool *)v16;
    memset(v16, 0, v17->m_iTotalPrivateStoreBDTextureIndex);
    PrivateStoreBD::ms_hEraseBrush = CreateSolidBrush(0xFF00FFu);
    if ( PrivateStoreBD::ms_hEraseBrush )
    {
      v18 = Font::GetFontDefine(BOLD);
      *(_WORD *)&LogFont.lfUnderline = 0;
      LogFont.lfItalic = 0;
      LogFont.lfEscapement = 0;
      LogFont.lfOrientation = 0;
      LogFont.lfOutPrecision = *((_BYTE *)v18 + 20);
      LogFont.lfClipPrecision = 0;
      LogFont.lfHeight = (int)*v18;
      LogFont.lfWidth = 0;
      LogFont.lfCharSet = *((_BYTE *)v18 + 16);
      LogFont.lfQuality = *((_BYTE *)v18 + 24);
      LogFont.lfWeight = (int)v18[2];
      LogFont.lfPitchAndFamily = *((_BYTE *)v18 + 28);
      lstrcpyA(LogFont.lfFaceName, (LPCSTR)v18[8]);
      PrivateStoreBD::ms_hFont = CreateFontIndirectA(&LogFont);
      v25 = -1;
      if ( PrivateStoreBD::ms_hFont )
      {
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkRaw);
        result = 1;
      }
      else
      {
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkRaw);
        result = 0;
      }
    }
    else
    {
      v25 = -1;
      if ( v1 && !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
        v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
      result = 0;
    }
  }
  else
  {
    v25 = -1;
    if ( !v1 || InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
      return 0;
    v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
    result = 0;
  }
  return result;
}
// A96858: using guessed type int PrivateStoreBD::ms_spTempTexture;
// B6248C: using guessed type bool NiSourceTexture::ms_bDestroyAppData;

//----- (00623D40) --------------------------------------------------------
void __thiscall ScreenBDMgr::AddPrivateStoreBD(ScreenBDMgr *this, unsigned __int16 kHandle)
{
  ScreenBDMgr *v2; // esi@1
  Char *v3; // ebx@2
  NiPoint3 *v4; // eax@3
  int v5; // edi@5
  NiTListItem<PrivateStoreBD *> *v6; // eax@6
  PrivateStoreBD *v7; // eax@10
  PrivateStoreBD *v8; // eax@11
  PrivateStoreBD *v9; // edi@11
  NiAVObject *v10; // edi@15
  NiUnsharedGeometryGroup *fTime; // ST10_4@20
  int v12; // ST0C_4@20
  NiUnsharedGeometryGroup *v13; // ST08_4@20
  NiUnsharedGeometryGroup *v14; // eax@19
  float v15; // ST10_4@24
  int v16; // ST0C_4@24
  NiUnsharedGeometryGroup *v17; // ST08_4@24
  PrivateStoreBD *v18; // esi@25
  char *v19; // [sp+Ch] [bp-1CCh]@19
  PrivateStoreBD *pkPrivateStoreBD; // [sp+24h] [bp-1B4h]@4
  char speechText[256]; // [sp+28h] [bp-1B0h]@20
  char nextLineText[128]; // [sp+128h] [bp-B0h]@18
  char singboardName[30]; // [sp+1A8h] [bp-30h]@17
  __int16 v24; // [sp+1C6h] [bp-12h]@25
  int v25; // [sp+1D4h] [bp-4h]@10

  v2 = this;
  if ( this->m_kPrivateStoreBDList.m_kAllocator.m_uiCount < this->m_iMaxPrivateStoreView )
  {
    v3 = CharMgr::GetChar(&g_kCharMgr, kHandle);
    if ( v3 )
    {
      v4 = (NiPoint3 *)((int (__thiscall *)(Char *))v3->vfptr[6].Deaffect)(v3);
      if ( PrivateStoreBD::ms_fMaxDistance >= World::GetDistanceToCamera(&g_kWorld, v4) )
      {
        pkPrivateStoreBD = ScreenBDMgr::GetPrivateStoreBD(v2, kHandle);
        if ( !pkPrivateStoreBD )
        {
          v5 = ScreenBDMgr::GetNotUsedPrivateStoreBDTextureIndex(v2);
          if ( v5 == -1 )
          {
            v6 = v2->m_kPrivateStoreBDList.m_pkHead;
            if ( v6 )
              v5 = v6->m_element->m_iTextureIndex;
            else
              v5 = ::v8;
          }
          else
          {
            v2->m_pabUsePrivateStoreBD[v5] = 1;
          }
          v7 = (PrivateStoreBD *)operator new(0x190u);
          pkPrivateStoreBD = v7;
          v25 = 0;
          if ( v7 )
          {
            PrivateStoreBD::PrivateStoreBD(v7, (NiTexture *)&v2->m_spPrivateStoreBDTexture.m_pObject->vfptr, v5);
            v9 = v8;
          }
          else
          {
            v9 = 0;
          }
          v9->m_kCharHandle = kHandle;
          v25 = -1;
          pkPrivateStoreBD = v9;
          NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
            (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v2->m_kPrivateStoreBDList,
            (NiD3DXEffectParameter *const *)&pkPrivateStoreBD);
          if ( (unsigned __int8)((int (__thiscall *)(Char *))v3->vfptr[1].Affect)(v3) )
            PrivateStoreBD::ms_fLifeTime = 20.0;
          v10 = (NiAVObject *)&v9->m_spScreenGeom.m_pObject->vfptr;
          if ( v10 )
          {
            ((void (__stdcall *)(NiAVObject *, signed int))v2->m_pkPrivateStoreBDScene->vfptr[29].__vecDelDtor)(v10, 1);
            NiAVObject::UpdateProperties(v10);
            NiAVObject::UpdateEffects(v10);
            NiAVObject::Update((NiAVObject *)&v2->m_pkPrivateStoreBDScene->vfptr, 0.0, 1);
          }
        }
        qmemcpy(singboardName, &v3->m_stSignboard, sizeof(singboardName));
        singboardName[29] = 0;
        if ( (signed int)strlen(singboardName) <= 0 )
        {
          if ( v3->m_bIsSell )
          {
            v19 = (char *)&unk_9B7121;
            v14 = TextData::Get(0xF5D4F4C6);
          }
          else
          {
            v19 = (char *)&unk_9B7122;
            v14 = TextData::Get(0xA9E104B5);
          }
        }
        else
        {
          nextLineText[0] = 0;
          memset(&nextLineText[1], 0, 0x7Fu);
          sprintf(nextLineText, "\n %s", singboardName);
          if ( !v3->m_bIsSell )
          {
            fTime = TextData::Get(0xA9E104B5);
            v12 = ((int (__thiscall *)(Char *))v3->vfptr[2].DeleteAbStateByAbstateIndex)(v3);
            v13 = TextData::Get(0x4A88AF73u);
            sprintf(speechText, (const char *)v13, v12, fTime, nextLineText);
LABEL_25:
            v18 = pkPrivateStoreBD;
            PrivateStoreBD::SetSpeech(pkPrivateStoreBD, (void **)&v24, speechText);
            v18->m_fStartTime = Timer::ms_fCurTime;
            return;
          }
          v19 = nextLineText;
          v14 = TextData::Get(0xF5D4F4C6);
        }
        v15 = *(float *)&v14;
        v16 = ((int (__thiscall *)(Char *))v3->vfptr[2].DeleteAbStateByAbstateIndex)(v3);
        v17 = TextData::Get(0x4A88AF73u);
        sprintf(speechText, (const char *)v17, v16, v15, v19);
        goto LABEL_25;
      }
    }
  }
}
// A72EFC: using guessed type float PrivateStoreBD::ms_fLifeTime;
// A72F00: using guessed type float PrivateStoreBD::ms_fMaxDistance;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00623FF0) --------------------------------------------------------
void __userpurge ScreenBDMgr::RemovePrivateStoreBD(ScreenBDMgr *this@<ecx>, int a2@<edi>, PrivateStoreBD *pkPrivateStoreBD)
{
  PrivateStoreBD *v3; // esi@1
  ScreenBDMgr *v4; // ebx@1
  NiTListItem<PrivateStoreBD *> *v5; // eax@2
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *v6; // ecx@2
  PrivateStoreBD **v7; // edx@3
  PrivateStoreBD *v8; // edi@3
  PrivateStoreBD *v9; // edi@9
  int v10; // [sp-4h] [bp-Ch]@2

  v3 = pkPrivateStoreBD;
  v4 = this;
  if ( pkPrivateStoreBD )
  {
    this->m_pabUsePrivateStoreBD[pkPrivateStoreBD->m_iTextureIndex] = 0;
    v5 = this->m_kPrivateStoreBDList.m_pkHead;
    v6 = (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&this->m_kPrivateStoreBDList;
    v10 = a2;
    if ( v5 )
    {
      while ( 1 )
      {
        v7 = &v5->m_element;
        v8 = (PrivateStoreBD *)v5;
        v5 = v5->m_pkNext;
        if ( v3 == *v7 )
          break;
        if ( !v5 )
          goto LABEL_5;
      }
    }
    else
    {
LABEL_5:
      v8 = 0;
    }
    pkPrivateStoreBD = v8;
    if ( v8 )
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(v6, (void **)&pkPrivateStoreBD);
    ((void (__stdcall *)(PrivateStoreBD **, NiScreenElements *, int))v4->m_pkPrivateStoreBDScene->vfptr[30].__vecDelDtor)(
      &pkPrivateStoreBD,
      v3->m_spScreenGeom.m_pObject,
      v10);
    if ( pkPrivateStoreBD )
    {
      v9 = pkPrivateStoreBD;
      if ( !InterlockedDecrement((volatile LONG *)&pkPrivateStoreBD->m_kColorRef) )
      {
        if ( v9 )
          v9->vfptr->__vecDelDtor(v9, 1u);
      }
    }
    ((void (__thiscall *)(PrivateStoreBD *))v3->vfptr->__vecDelDtor)(v3);
  }
}
// 623FF0: could not find valid save-restore pair for edi

//----- (00624090) --------------------------------------------------------
void __usercall ScreenBDMgr::RemoveAllPrivateStoreBD(ScreenBDMgr *this@<ecx>, signed int a2@<edi>)
{
  ScreenBDMgr *v2; // ebx@1
  void **v3; // ecx@1
  _DWORD *v4; // esi@4
  NiTListItem<PrivateStoreBD *> **v5; // eax@5
  void **v6; // edx@6
  NiTListItem<PrivateStoreBD *> **v7; // edi@6
  void (__thiscall ***v8)(_DWORD, _DWORD); // edi@12
  signed int v9; // [sp-8h] [bp-18h]@2
  int v10; // [sp+4h] [bp-Ch]@11
  void *kPos; // [sp+8h] [bp-8h]@9
  void *kIter; // [sp+Ch] [bp-4h]@3

  v2 = this;
  v3 = (void **)&this->m_kPrivateStoreBDList.m_pkHead->m_pkNext;
  if ( v3 )
  {
    v9 = a2;
    while ( 1 )
    {
      v4 = v3[2];
      kIter = *v3;
      if ( v4 )
      {
        v2->m_pabUsePrivateStoreBD[v4[2]] = 0;
        v5 = &v2->m_kPrivateStoreBDList.m_pkHead->m_pkNext;
        if ( v5 )
        {
          while ( 1 )
          {
            v6 = (void **)(v5 + 2);
            v7 = v5;
            v5 = (NiTListItem<PrivateStoreBD *> **)*v5;
            if ( v4 == *v6 )
              break;
            if ( !v5 )
              goto LABEL_8;
          }
        }
        else
        {
LABEL_8:
          v7 = 0;
        }
        kPos = v7;
        if ( v7 )
          NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
            (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&v2->m_kPrivateStoreBDList,
            &kPos);
        ((void (__stdcall *)(int *, _DWORD, signed int))v2->m_pkPrivateStoreBDScene->vfptr[30].__vecDelDtor)(
          &v10,
          v4[9],
          v9);
        if ( v10 )
        {
          v8 = (void (__thiscall ***)(_DWORD, _DWORD))v10;
          if ( !InterlockedDecrement((volatile LONG *)(v10 + 4)) )
          {
            if ( v8 )
              (**v8)(v8, 1);
          }
        }
        v9 = 1;
        (*(void (__thiscall **)(_DWORD *))*v4)(v4);
      }
      if ( !kIter )
        break;
      v3 = (void **)kIter;
    }
  }
}
// 624090: could not find valid save-restore pair for edi

//----- (00624160) --------------------------------------------------------
void __thiscall ScreenBDMgr::UpdatePrivateStoreBD(ScreenBDMgr *this, float fTime, NiCamera *pkWorldCamera)
{
  ScreenBDMgr *v3; // ebx@1
  NiTListItem<PrivateStoreBD *> *v4; // edi@1
  PrivateStoreBD *v5; // esi@2
  Char *v6; // eax@4
  NiTListItem<PrivateStoreBD *> **v7; // esi@8
  PrivateStoreBD **v8; // eax@9

  v3 = this;
  v4 = this->m_kPrivateStoreBDList.m_pkHead;
  while ( v4 )
  {
    v5 = v4->m_element;
    v4 = v4->m_pkNext;
    if ( v5 )
    {
      if ( !PrivateStoreBD::IsAlive(v5, fTime)
        || (v6 = CharMgr::GetChar(&g_kCharMgr, v5->m_kCharHandle)) == 0
        || v6->m_byMode != 5 )
      {
        ScreenBDMgr::RemovePrivateStoreBD(v3, (int)v4, v5);
      }
    }
  }
  v7 = &v3->m_kPrivateStoreBDList.m_pkHead->m_pkNext;
  while ( v7 )
  {
    v8 = (PrivateStoreBD **)(v7 + 2);
    v7 = (NiTListItem<PrivateStoreBD *> **)*v7;
    PrivateStoreBD::Update(*v8, fTime, pkWorldCamera, v3->m_spScreenSpaceCamera.m_pObject);
  }
  NiAVObject::Update((NiAVObject *)&v3->m_pkPrivateStoreBDScene->vfptr, fTime, 1);
}

//----- (00624210) --------------------------------------------------------
void __thiscall ScreenBDMgr::TerminatePrivateStoreBD(ScreenBDMgr *this)
{
  ScreenBDMgr *v1; // edi@1
  void (__thiscall ***v2)(_DWORD, _DWORD); // esi@2
  NiSourceTexture *v3; // esi@6

  v1 = this;
  ScreenBDMgr::RemoveAllPrivateStoreBD(this, (signed int)this);
  if ( PrivateStoreBD::ms_spTempTexture )
  {
    v2 = (void (__thiscall ***)(_DWORD, _DWORD))PrivateStoreBD::ms_spTempTexture;
    if ( !InterlockedDecrement((volatile LONG *)(PrivateStoreBD::ms_spTempTexture + 4)) && v2 )
      (**v2)(v2, 1);
    PrivateStoreBD::ms_spTempTexture = 0;
  }
  v3 = v1->m_spPrivateStoreBDTexture.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spPrivateStoreBDTexture.m_pObject = 0;
  }
  operator delete[](v1->m_pabUsePrivateStoreBD);
  v1->m_pabUsePrivateStoreBD = 0;
  DeleteObject(PrivateStoreBD::ms_hEraseBrush);
  DeleteObject(PrivateStoreBD::ms_hFont);
}
// A96858: using guessed type int PrivateStoreBD::ms_spTempTexture;

//----- (006242B0) --------------------------------------------------------
char __thiscall ScreenBDMgr::InitSpeechBD(ScreenBDMgr *this)
{
  NiPixelData *v1; // esi@1
  NiPixelData *v2; // eax@1
  NiPixelData *v3; // eax@2
  NiSourceTexture *v4; // edi@6
  int v5; // eax@6
  void (__thiscall ***v6)(_DWORD, _DWORD); // ebx@8
  char result; // al@17
  NiPixelData *v8; // eax@18
  NiPixelData *v9; // eax@19
  NiPixelData *v10; // edi@19
  NiSourceTexture *v11; // eax@27
  NiSourceTexture *v12; // edi@27
  NiSourceTexture *v13; // ebx@27
  char *v14; // eax@39
  unsigned int v15; // ST0C_4@39
  struct Font::FontDefine **v16; // eax@43
  NiTexture::FormatPrefs kPrefs; // [sp+10h] [bp-68h]@1
  NiPixelData *v18; // [sp+1Ch] [bp-5Ch]@1
  ScreenBDMgr *v19; // [sp+20h] [bp-58h]@1
  NiPointer<NiPixelData> pkRaw; // [sp+24h] [bp-54h]@1
  bool bOldbDestroyAppData; // [sp+2Bh] [bp-4Dh]@1
  tagLOGFONTA LogFont; // [sp+2Ch] [bp-4Ch]@43
  int v23; // [sp+74h] [bp-4h]@1

  v1 = 0;
  v19 = this;
  kPrefs.m_eAlphaFmt = 3;
  kPrefs.m_ePixelLayout = 2;
  kPrefs.m_eMipMapped = 0;
  bOldbDestroyAppData = NiSourceTexture::ms_bDestroyAppData;
  NiSourceTexture::ms_bDestroyAppData = 1;
  pkRaw.m_pObject = 0;
  v23 = 0;
  v2 = (NiPixelData *)operator new(0x70u);
  v18 = v2;
  LOBYTE(v23) = 1;
  if ( v2 )
    NiPixelData::NiPixelData(v2, 0x100u, 0x80u, &NiPixelFormat::RGB24, 1u, 1u);
  else
    v3 = 0;
  LOBYTE(v23) = 0;
  if ( v3 )
  {
    v1 = v3;
    pkRaw.m_pObject = v3;
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
  v4 = NiSourceTexture::Create(v1, &kPrefs);
  v5 = SpeechBD::ms_spTempTexture;
  if ( (NiSourceTexture *)SpeechBD::ms_spTempTexture != v4 )
  {
    if ( SpeechBD::ms_spTempTexture )
    {
      v6 = (void (__thiscall ***)(_DWORD, _DWORD))SpeechBD::ms_spTempTexture;
      if ( !InterlockedDecrement((volatile LONG *)(SpeechBD::ms_spTempTexture + 4)) )
      {
        if ( v6 )
          (**v6)(v6, 1);
      }
    }
    SpeechBD::ms_spTempTexture = (int)v4;
    if ( !v4 )
      goto LABEL_14;
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
    v5 = SpeechBD::ms_spTempTexture;
  }
  if ( !v5 )
  {
LABEL_14:
    v23 = -1;
    if ( v1 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
        v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
    }
    return 0;
  }
  v8 = (NiPixelData *)operator new(0x70u);
  v18 = v8;
  LOBYTE(v23) = 2;
  if ( v8 )
  {
    NiPixelData::NiPixelData(v8, 0x400u, 0x200u, &NiPixelFormat::RGBA32, 1u, 1u);
    v10 = v9;
  }
  else
  {
    v10 = 0;
  }
  LOBYTE(v23) = 0;
  if ( v1 != v10 )
  {
    if ( v1 && !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
      v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
    v1 = v10;
    pkRaw.m_pObject = v10;
    if ( v10 )
      InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
  }
  v11 = NiSourceTexture::Create(v1, &kPrefs);
  v12 = v19->m_spSpeechBDTexture.m_pObject;
  v13 = v11;
  if ( v12 != v11 )
  {
    if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
      v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
    v19->m_spSpeechBDTexture.m_pObject = v13;
    if ( v13 )
      InterlockedIncrement((volatile LONG *)&v13->m_uiRefCount);
  }
  if ( v19->m_spSpeechBDTexture.m_pObject )
  {
    NiSourceTexture::ms_bDestroyAppData = bOldbDestroyAppData;
    v19->m_iTotalSpeechBDTextureIndex = 36;
    v14 = (char *)operator new[](0x24u);
    v15 = v19->m_iTotalSpeechBDTextureIndex;
    v19->m_pabUseSpeechBD = (bool *)v14;
    memset(v14, 0, v15);
    SpeechBD::ms_hEraseBrush = CreateSolidBrush(0xFF00FFu);
    if ( SpeechBD::ms_hEraseBrush )
    {
      v16 = Font::GetFontDefine(0);
      *(_WORD *)&LogFont.lfUnderline = 0;
      LogFont.lfItalic = 0;
      LogFont.lfEscapement = 0;
      LogFont.lfOrientation = 0;
      LogFont.lfOutPrecision = *((_BYTE *)v16 + 20);
      LogFont.lfClipPrecision = 0;
      LogFont.lfHeight = (int)*v16;
      LogFont.lfWidth = 0;
      LogFont.lfCharSet = *((_BYTE *)v16 + 16);
      LogFont.lfQuality = 3;
      LogFont.lfWeight = (int)v16[2];
      LogFont.lfPitchAndFamily = *((_BYTE *)v16 + 28);
      lstrcpyA(LogFont.lfFaceName, (LPCSTR)v16[8]);
      SpeechBD::ms_hFont = CreateFontIndirectA(&LogFont);
      v23 = -1;
      if ( SpeechBD::ms_hFont )
      {
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkRaw);
        result = 1;
      }
      else
      {
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkRaw);
        result = 0;
      }
    }
    else
    {
      v23 = -1;
      if ( !v1 || InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
        return 0;
      v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
      result = 0;
    }
  }
  else
  {
    v23 = -1;
    if ( v1 && !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
      v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
    result = 0;
  }
  return result;
}
// A96A20: using guessed type int SpeechBD::ms_spTempTexture;
// B6248C: using guessed type bool NiSourceTexture::ms_bDestroyAppData;

//----- (006245D0) --------------------------------------------------------
void __thiscall ScreenBDMgr::EndSpeechBD(ScreenBDMgr *this, unsigned __int16 kHandle)
{
  NiTListItem<SpeechBD *> *v2; // eax@1
  SpeechBD *v3; // ecx@2

  v2 = this->m_kSpeechBDList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      v2 = v2->m_pkNext;
      if ( v3->m_kCharHandle == kHandle )
        break;
      if ( !v2 )
        return;
    }
    v3->m_fLifeTime = 0.0;
  }
}

//----- (00624600) --------------------------------------------------------
void __thiscall ScreenBDMgr::AddSpeechBD(ScreenBDMgr *this, unsigned __int16 kHandle, char *pcSpeech)
{
  ScreenBDMgr *v3; // ebx@1
  Char *v4; // eax@1
  int v5; // eax@2
  NiTListItem<SpeechBD *> *v6; // eax@3
  SpeechBD *v7; // ecx@4
  SpeechBD *v8; // edi@7
  int v9; // ecx@8
  int v10; // eax@8
  bool *v11; // edx@9
  int v12; // esi@13
  NiTListItem<SpeechBD *> *v13; // eax@14
  SpeechBD *v14; // eax@18
  SpeechBD *v15; // eax@19
  SpeechBD *v16; // esi@19
  NiAVObject *v17; // esi@23
  Char *pkChar; // [sp+20h] [bp-1Ch]@1
  SpeechBD *pkSpeechBD; // [sp+24h] [bp-18h]@2
  float v20; // [sp+28h] [bp-14h]@2
  float v21; // [sp+2Ch] [bp-10h]@2
  int v22; // [sp+38h] [bp-4h]@18

  v3 = this;
  v4 = CharMgr::GetChar(&g_kCharMgr, kHandle);
  pkChar = v4;
  if ( v4 )
  {
    v5 = ((int (__thiscall *)(Char *))v4->vfptr[6].Deaffect)(v4);
    v20 = pkWorldCamera->m_kLocal.m_Translate.x - *(float *)v5;
    v21 = pkWorldCamera->m_kLocal.m_Translate.y - *(float *)(v5 + 4);
    *(float *)&pkSpeechBD = pkWorldCamera->m_kLocal.m_Translate.z - *(float *)(v5 + 8);
    *(float *)&pkSpeechBD = v21 * v21 + v20 * v20 + *(float *)&pkSpeechBD * *(float *)&pkSpeechBD;
    *(float *)&pkSpeechBD = sqrt(*(float *)&pkSpeechBD);
    if ( SpeechBD::ms_fMaxDistance >= (double)*(float *)&pkSpeechBD )
    {
      v6 = v3->m_kSpeechBDList.m_pkHead;
      if ( v6 )
      {
        while ( 1 )
        {
          v7 = v6->m_element;
          v6 = v6->m_pkNext;
          if ( v7->m_kCharHandle == kHandle )
            break;
          if ( !v6 )
            goto LABEL_6;
        }
      }
      else
      {
LABEL_6:
        v7 = 0;
      }
      v8 = v7;
      if ( !v7 )
      {
        v9 = v3->m_iTotalSpeechBDTextureIndex;
        v10 = 0;
        if ( v9 <= 0 )
          goto LABEL_14;
        v11 = v3->m_pabUseSpeechBD;
        while ( v11[v10] )
        {
          if ( ++v10 >= v9 )
            goto LABEL_14;
        }
        v12 = v10;
        if ( v10 != -1 )
        {
          v11[v10] = 1;
        }
        else
        {
LABEL_14:
          v13 = v3->m_kSpeechBDList.m_pkHead;
          if ( v13 )
            v12 = v13->m_element->m_iTextureIndex;
          else
            v12 = ::v4;
        }
        v14 = (SpeechBD *)operator new(0x88u);
        pkSpeechBD = v14;
        v22 = 0;
        if ( v14 )
        {
          SpeechBD::SpeechBD(v14, (NiTexture *)&v3->m_spSpeechBDTexture.m_pObject->vfptr, v12);
          v16 = v15;
        }
        else
        {
          v16 = 0;
        }
        v16->m_kCharHandle = kHandle;
        v8 = v16;
        v22 = -1;
        pkSpeechBD = v16;
        NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v3->m_kSpeechBDList,
          (NiD3DXEffectParameter *const *)&pkSpeechBD);
        if ( (unsigned __int8)((int (*)(void))pkChar->vfptr[1].Affect)() )
          v16->m_fLifeTime = 20.0;
        v17 = (NiAVObject *)&v16->m_spScreenGeom.m_pObject->vfptr;
        if ( v17 )
        {
          ((void (__stdcall *)(NiAVObject *, signed int))v3->m_pkSpeechBDScene->vfptr[29].__vecDelDtor)(v17, 1);
          NiAVObject::UpdateProperties(v17);
          NiAVObject::UpdateEffects(v17);
          NiAVObject::Update((NiAVObject *)&v3->m_pkSpeechBDScene->vfptr, 0.0, 1);
        }
      }
      SpeechBD::SetSpeech(v8, (void **)&v8->vfptr, pcSpeech);
      v8->m_fStartTime = Timer::ms_fCurTime;
    }
  }
}
// A734F8: using guessed type float SpeechBD::ms_fMaxDistance;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006247E0) --------------------------------------------------------
void __thiscall ScreenBDMgr::AddSpeechBD(ScreenBDMgr *this, unsigned __int16 kHandle, char *pcSpeech, float fLifeTime)
{
  ScreenBDMgr *v4; // esi@1
  NiTListItem<SpeechBD *> *v5; // eax@1
  SpeechBD *v6; // ecx@2

  v4 = this;
  ScreenBDMgr::AddSpeechBD(this, kHandle, pcSpeech);
  v5 = v4->m_kSpeechBDList.m_pkHead;
  if ( v5 )
  {
    while ( 1 )
    {
      v6 = v5->m_element;
      v5 = v5->m_pkNext;
      if ( v6->m_kCharHandle == kHandle )
        break;
      if ( !v5 )
        return;
    }
    v6->m_fLifeTime = fLifeTime;
  }
}

//----- (00624830) --------------------------------------------------------
void __thiscall ScreenBDMgr::AddSpeechBD(ScreenBDMgr *this, unsigned __int16 kHandle, char *pcSpeech, char kColorID, char kOutLineColorID)
{
  ScreenBDMgr *v5; // ebx@1
  Char *v6; // eax@1
  int v7; // eax@2
  NiTListItem<SpeechBD *> *v8; // eax@3
  SpeechBD *v9; // ecx@4
  SpeechBD *v10; // edi@7
  int v11; // ecx@8
  int v12; // eax@8
  bool *v13; // edx@9
  int v14; // esi@13
  NiTListItem<SpeechBD *> *v15; // eax@14
  SpeechBD *v16; // eax@18
  SpeechBD *v17; // eax@19
  SpeechBD *v18; // esi@19
  NiAVObject *v19; // esi@23
  Char *pkChar; // [sp+20h] [bp-1Ch]@1
  SpeechBD *pkSpeechBD; // [sp+24h] [bp-18h]@2
  float v22; // [sp+28h] [bp-14h]@2
  float v23; // [sp+2Ch] [bp-10h]@2
  int v24; // [sp+38h] [bp-4h]@18

  v5 = this;
  v6 = CharMgr::GetChar(&g_kCharMgr, kHandle);
  pkChar = v6;
  if ( v6 )
  {
    v7 = ((int (__thiscall *)(Char *))v6->vfptr[6].Deaffect)(v6);
    v22 = pkWorldCamera->m_kLocal.m_Translate.x - *(float *)v7;
    v23 = pkWorldCamera->m_kLocal.m_Translate.y - *(float *)(v7 + 4);
    *(float *)&pkSpeechBD = pkWorldCamera->m_kLocal.m_Translate.z - *(float *)(v7 + 8);
    *(float *)&pkSpeechBD = v23 * v23 + v22 * v22 + *(float *)&pkSpeechBD * *(float *)&pkSpeechBD;
    *(float *)&pkSpeechBD = sqrt(*(float *)&pkSpeechBD);
    if ( SpeechBD::ms_fMaxDistance >= (double)*(float *)&pkSpeechBD )
    {
      v8 = v5->m_kSpeechBDList.m_pkHead;
      if ( v8 )
      {
        while ( 1 )
        {
          v9 = v8->m_element;
          v8 = v8->m_pkNext;
          if ( v9->m_kCharHandle == kHandle )
            break;
          if ( !v8 )
            goto LABEL_6;
        }
      }
      else
      {
LABEL_6:
        v9 = 0;
      }
      v10 = v9;
      if ( !v9 )
      {
        v11 = v5->m_iTotalSpeechBDTextureIndex;
        v12 = 0;
        if ( v11 <= 0 )
          goto LABEL_14;
        v13 = v5->m_pabUseSpeechBD;
        while ( v13[v12] )
        {
          if ( ++v12 >= v11 )
            goto LABEL_14;
        }
        v14 = v12;
        if ( v12 != -1 )
        {
          v13[v12] = 1;
        }
        else
        {
LABEL_14:
          v15 = v5->m_kSpeechBDList.m_pkHead;
          if ( v15 )
            v14 = v15->m_element->m_iTextureIndex;
          else
            v14 = v4;
        }
        v16 = (SpeechBD *)operator new(0x88u);
        pkSpeechBD = v16;
        v24 = 0;
        if ( v16 )
        {
          SpeechBD::SpeechBD(v16, (NiTexture *)&v5->m_spSpeechBDTexture.m_pObject->vfptr, v14);
          v18 = v17;
        }
        else
        {
          v18 = 0;
        }
        v18->m_kCharHandle = kHandle;
        v10 = v18;
        v24 = -1;
        pkSpeechBD = v18;
        NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v5->m_kSpeechBDList,
          (NiD3DXEffectParameter *const *)&pkSpeechBD);
        if ( (unsigned __int8)((int (*)(void))pkChar->vfptr[1].Affect)() )
          v18->m_fLifeTime = 20.0;
        v19 = (NiAVObject *)&v18->m_spScreenGeom.m_pObject->vfptr;
        if ( v19 )
        {
          ((void (__stdcall *)(NiAVObject *, signed int))v5->m_pkSpeechBDScene->vfptr[29].__vecDelDtor)(v19, 1);
          NiAVObject::UpdateProperties(v19);
          NiAVObject::UpdateEffects(v19);
          NiAVObject::Update((NiAVObject *)&v5->m_pkSpeechBDScene->vfptr, 0.0, 1);
        }
      }
      SpeechBD::SetTextColorID(v10, kColorID);
      SpeechBD::SetOutLineColorID(v10, kOutLineColorID);
      SpeechBD::SetSpeech(v10, (void **)&v10->vfptr, pcSpeech);
      v10->m_fStartTime = Timer::ms_fCurTime;
    }
  }
}
// A734F8: using guessed type float SpeechBD::ms_fMaxDistance;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00624A20) --------------------------------------------------------
void __thiscall ScreenBDMgr::RemoveSpeechBD(ScreenBDMgr *this, SpeechBD *pkSpeechBD)
{
  SpeechBD *v2; // esi@1
  ScreenBDMgr *v3; // edi@1
  NiTListItem<SpeechBD *> *v4; // eax@1
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *v5; // ecx@1
  SpeechBD **v6; // edx@2
  SpeechBD *v7; // ebx@2
  SpeechBD *v8; // edi@8

  v2 = pkSpeechBD;
  v3 = this;
  this->m_pabUseSpeechBD[pkSpeechBD->m_iTextureIndex] = 0;
  v4 = this->m_kSpeechBDList.m_pkHead;
  v5 = (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&this->m_kSpeechBDList;
  if ( v4 )
  {
    while ( 1 )
    {
      v6 = &v4->m_element;
      v7 = (SpeechBD *)v4;
      v4 = v4->m_pkNext;
      if ( v2 == *v6 )
        break;
      if ( !v4 )
        goto LABEL_4;
    }
  }
  else
  {
LABEL_4:
    v7 = 0;
  }
  pkSpeechBD = v7;
  if ( v7 )
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(v5, (void **)&pkSpeechBD);
  ((void (__stdcall *)(_DWORD, _DWORD))v3->m_pkSpeechBDScene->vfptr[30].__vecDelDtor)(
    &pkSpeechBD,
    v2->m_spScreenGeom.m_pObject);
  if ( pkSpeechBD )
  {
    v8 = pkSpeechBD;
    if ( !InterlockedDecrement((volatile LONG *)&pkSpeechBD->m_iTextureIndex) )
    {
      if ( v8 )
        v8->vfptr->__vecDelDtor(v8, 1u);
    }
  }
  v2->vfptr->__vecDelDtor(v2, 1u);
}

//----- (00624AB0) --------------------------------------------------------
void __usercall ScreenBDMgr::RemoveAllSpeechBD(ScreenBDMgr *this@<ecx>, signed int a2@<esi>)
{
  ScreenBDMgr *v2; // ebx@1
  NiTListItem<SpeechBD *> *v3; // edi@1
  SpeechBD *v4; // esi@3
  NiTListItem<SpeechBD *> **v5; // eax@3
  SpeechBD **v6; // ecx@4
  NiTListItem<SpeechBD *> **v7; // edx@4
  void (__thiscall ***v8)(_DWORD, _DWORD); // ebx@10
  signed int v9; // [sp-4h] [bp-18h]@2
  int v10; // [sp+8h] [bp-Ch]@9
  void *kPos; // [sp+Ch] [bp-8h]@7
  ScreenBDMgr *v12; // [sp+10h] [bp-4h]@1

  v2 = this;
  v3 = this->m_kSpeechBDList.m_pkHead;
  v12 = this;
  if ( v3 )
  {
    v9 = a2;
    do
    {
      v4 = v3->m_element;
      v3 = v3->m_pkNext;
      v2->m_pabUseSpeechBD[v4->m_iTextureIndex] = 0;
      v5 = &v2->m_kSpeechBDList.m_pkHead->m_pkNext;
      if ( v5 )
      {
        while ( 1 )
        {
          v6 = (SpeechBD **)(v5 + 2);
          v7 = v5;
          v5 = (NiTListItem<SpeechBD *> **)*v5;
          if ( v4 == *v6 )
            break;
          if ( !v5 )
            goto LABEL_6;
        }
      }
      else
      {
LABEL_6:
        v7 = 0;
      }
      kPos = v7;
      if ( v7 )
        NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&v2->m_kSpeechBDList,
          &kPos);
      ((void (__stdcall *)(int *, NiScreenElements *, signed int))v2->m_pkSpeechBDScene->vfptr[30].__vecDelDtor)(
        &v10,
        v4->m_spScreenGeom.m_pObject,
        v9);
      if ( v10 )
      {
        v8 = (void (__thiscall ***)(_DWORD, _DWORD))v10;
        if ( !InterlockedDecrement((volatile LONG *)(v10 + 4)) )
        {
          if ( v8 )
            (**v8)(v8, 1);
        }
        v2 = v12;
      }
      v9 = 1;
      ((void (__thiscall *)(SpeechBD *))v4->vfptr->__vecDelDtor)(v4);
    }
    while ( v3 );
  }
}
// 624AB0: could not find valid save-restore pair for esi

//----- (00624B70) --------------------------------------------------------
void __thiscall ScreenBDMgr::UpdateSpeechBD(ScreenBDMgr *this, float fTime, NiCamera *pkWorldCamera)
{
  ScreenBDMgr *v3; // edi@1
  NiTListItem<SpeechBD *> *v4; // esi@1
  SpeechBD *v5; // ebx@2
  NiTListItem<SpeechBD *> **v6; // esi@5
  SpeechBD **v7; // eax@6
  NiNode *v8; // edi@7

  v3 = this;
  v4 = this->m_kSpeechBDList.m_pkHead;
  while ( v4 )
  {
    v5 = v4->m_element;
    v4 = v4->m_pkNext;
    if ( !SpeechBD::IsAlive(v5, fTime) )
      ScreenBDMgr::RemoveSpeechBD(v3, v5);
  }
  v6 = &v3->m_kSpeechBDList.m_pkHead->m_pkNext;
  while ( v6 )
  {
    v7 = (SpeechBD **)(v6 + 2);
    v6 = (NiTListItem<SpeechBD *> **)*v6;
    SpeechBD::Update(*v7, (int)pkWorldCamera, fTime, pkWorldCamera, v3->m_spScreenSpaceCamera.m_pObject);
  }
  NiAVObject::Update((NiAVObject *)&v3->m_pkSpeechBDScene->vfptr, fTime, 1);
  v8 = v3->m_pkSpeechBDScene;
  if ( byte_B4FF6E )
    v8->m_uFlags &= 0xFFFEu;
  else
    v8->m_uFlags |= 1u;
}
// B4FF6E: using guessed type char byte_B4FF6E;

//----- (00624C20) --------------------------------------------------------
void __usercall ScreenBDMgr::TerminateSpeechBD(ScreenBDMgr *this@<ecx>, signed int a2@<esi>)
{
  ScreenBDMgr *v2; // edi@1
  void (__thiscall ***v3)(_DWORD, _DWORD); // esi@2
  NiSourceTexture *v4; // esi@6

  v2 = this;
  ScreenBDMgr::RemoveAllSpeechBD(this, a2);
  if ( SpeechBD::ms_spTempTexture )
  {
    v3 = (void (__thiscall ***)(_DWORD, _DWORD))SpeechBD::ms_spTempTexture;
    if ( !InterlockedDecrement((volatile LONG *)(SpeechBD::ms_spTempTexture + 4)) && v3 )
      (**v3)(v3, 1);
    SpeechBD::ms_spTempTexture = 0;
  }
  v4 = v2->m_spSpeechBDTexture.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v2->m_spSpeechBDTexture.m_pObject = 0;
  }
  operator delete[](v2->m_pabUseSpeechBD);
  v2->m_pabUseSpeechBD = 0;
  DeleteObject(SpeechBD::ms_hEraseBrush);
  DeleteObject(SpeechBD::ms_hFont);
}
// A96A20: using guessed type int SpeechBD::ms_spTempTexture;

//----- (00624CC0) --------------------------------------------------------
void __thiscall ScreenBoardTexture::EndDraw(ScreenBoardTexture *this)
{
  ScreenBoardTexture *v1; // esi@1
  HDC__ *v2; // eax@2
  HDC v3; // eax@7
  IDirect3DSurface9 *v4; // eax@10

  v1 = this;
  if ( this->m_lpSurSrc )
  {
    v2 = this->m_hDC;
    if ( v2 )
    {
      SelectObject(v2, this->m_hFont);
      ((void (__stdcall *)(_DWORD, _DWORD))v1->m_lpSurSrc->lpVtbl[5].AddRef)(v1->m_lpSurSrc, v1->m_hDC);
      v1->m_hDC = 0;
    }
    v1->m_lpSurSrc->lpVtbl->Release((IUnknown *)v1->m_lpSurSrc);
  }
  if ( v1->m_IsRenderBackGround == 1 && v1->m_lpSurSrcShadow )
  {
    v3 = v1->m_hShadowDC;
    if ( v3 )
    {
      SelectObject(v3, v1->m_hFont);
      ((void (__stdcall *)(_DWORD, _DWORD))v1->m_lpSurSrcShadow->lpVtbl[5].AddRef)(
        v1->m_lpSurSrcShadow,
        v1->m_hShadowDC);
      v1->m_hShadowDC = 0;
    }
    v1->m_lpSurSrcShadow->lpVtbl->Release((IUnknown *)v1->m_lpSurSrcShadow);
  }
  v4 = v1->m_lpSurDest;
  if ( v4 )
    v4->lpVtbl->Release((IUnknown *)v1->m_lpSurDest);
  v1->m_lpSurDest = 0;
  v1->m_lpSurSrc = 0;
}

//----- (00624D50) --------------------------------------------------------
void __usercall ScreenBoardTexture::DrawTextA(ScreenBoardTexture *this@<ecx>, int a2@<ebx>, const char *a3@<edi>)
{
  ScreenBoardTexture *v3; // esi@1
  bool v4; // zf@2
  const char *v5; // ecx@3
  int v6; // ST10_4@3
  signed int v7; // ST0C_4@3
  IDirect3DSurface9 *v8; // eax@4
  IDirect3DSurface9 *v9; // eax@8
  char *v10; // edx@11
  _BYTE *v11; // edi@11
  int v12; // eax@11
  unsigned int v13; // ecx@11
  bool v14; // sf@13
  int v15; // ebx@14
  int v16; // ecx@15
  unsigned int v17; // eax@20
  _D3DLOCKED_RECT kLockRectShadow; // [sp+4h] [bp-5Ch]@9
  _D3DLOCKED_RECT kLockRectSrc; // [sp+Ch] [bp-54h]@6
  _D3DLOCKED_RECT kLockRectDest; // [sp+14h] [bp-4Ch]@10
  unsigned int Green; // [sp+1Ch] [bp-44h]@13
  unsigned int Blue; // [sp+20h] [bp-40h]@13
  unsigned int uiDestSkipBytes; // [sp+24h] [bp-3Ch]@11
  unsigned int Red; // [sp+28h] [bp-38h]@13
  unsigned int uiShadowSrcSkipBytes; // [sp+2Ch] [bp-34h]@12
  unsigned int uiSrcSkipBytes; // [sp+30h] [bp-30h]@11
  char *pShadowSrcBytes; // [sp+34h] [bp-2Ch]@12
  int y; // [sp+38h] [bp-28h]@3
  tagRECT rc; // [sp+3Ch] [bp-24h]@10
  tagRECT kRect; // [sp+4Ch] [bp-14h]@2

  v3 = this;
  if ( this->m_lpSurSrc )
  {
    SetRect(&kRect, 0, 0, this->m_TextSize.cx, this->m_TextSize.cy);
    FillRect(v3->m_hDC, &kRect, v3->m_hEraseBrush);
    SetBkMode(v3->m_hDC, 1);
    SetTextColor(v3->m_hDC, 0xFFFFFFu);
    TextOutA(v3->m_hDC, v3->m_SpaceSize.cx / 2, v3->m_SpaceSize.cy / 2, v3->m_pkText, v3->m_dwMaxLength);
    SelectObject(v3->m_hDC, v3->m_hFont);
    ((void (__stdcall *)(IDirect3DSurface9 *, HDC__ *))v3->m_lpSurSrc->lpVtbl[5].AddRef)(v3->m_lpSurSrc, v3->m_hDC);
    v4 = v3->m_IsRenderBackGround == 1;
    v3->m_hDC = 0;
    if ( v4 )
    {
      FillRect(v3->m_hShadowDC, &kRect, v3->m_hEraseBrush);
      SetBkMode(v3->m_hShadowDC, 1);
      SetTextColor(v3->m_hShadowDC, 0xFFFFFFu);
      v5 = v3->m_pkText;
      v6 = v3->m_dwMaxLength;
      y = v3->m_SpaceSize.cy / 2;
      v7 = (signed int)((double)y + v3->m_ShadowScrMovePos.y);
      y = v3->m_SpaceSize.cx / 2;
      TextOutA(v3->m_hShadowDC, (signed int)((double)y + v3->m_ShadowScrMovePos.x), v6, a3, a2);
      SelectObject(v3->m_hShadowDC, v3->m_hFont);
      ((void (__cdecl *)(IDirect3DSurface9 *, HDC__ *))v3->m_lpSurSrcShadow->lpVtbl[5].AddRef)(
        v3->m_lpSurSrcShadow,
        v3->m_hShadowDC);
      v3->m_hShadowDC = 0;
    }
    v8 = v3->m_lpSurSrc;
    if ( v8 )
    {
      if ( v3->m_lpSurDest )
      {
        if ( !((int (__stdcall *)(IDirect3DSurface9 *, _D3DLOCKED_RECT *, tagRECT *, _DWORD))v8->lpVtbl[4].AddRef)(
                v8,
                &kLockRectSrc,
                &kRect,
                0) )
        {
          if ( v3->m_IsRenderBackGround != 1
            || (v9 = v3->m_lpSurSrcShadow) != 0
            && !((int (__stdcall *)(IDirect3DSurface9 *, _D3DLOCKED_RECT *, tagRECT *, _DWORD))v9->lpVtbl[4].AddRef)(
                  v9,
                  &kLockRectShadow,
                  &kRect,
                  0) )
          {
            SetRect(
              &rc,
              v3->m_DestCorrectionPos.cx,
              v3->m_DestCorrectionPos.cy,
              v3->m_DestCorrectionPos.cx + v3->m_TextSize.cx,
              v3->m_DestCorrectionPos.cy + v3->m_TextSize.cy);
            if ( !((int (__stdcall *)(IDirect3DSurface9 *, _D3DLOCKED_RECT *, tagRECT *, _DWORD))v3->m_lpSurDest->lpVtbl[4].AddRef)(
                    v3->m_lpSurDest,
                    &kLockRectDest,
                    &rc,
                    0) )
            {
              v10 = (char *)kLockRectDest.pBits;
              v11 = kLockRectSrc.pBits;
              v12 = 4 * v3->m_TextSize.cx;
              v13 = kLockRectDest.Pitch - v12;
              v4 = v3->m_IsRenderBackGround == 0;
              uiDestSkipBytes = kLockRectDest.Pitch - v12;
              uiSrcSkipBytes = kLockRectSrc.Pitch - v12;
              if ( !v4 )
              {
                pShadowSrcBytes = (char *)kLockRectShadow.pBits;
                uiShadowSrcSkipBytes = kLockRectShadow.Pitch - v12;
              }
              v4 = v3->m_TextSize.cy == 0;
              v14 = v3->m_TextSize.cy < 0;
              Red = BYTE2(v3->m_kColorRef);
              Green = BYTE1(v3->m_kColorRef);
              Blue = LOBYTE(v3->m_kColorRef);
              y = 0;
              if ( v14 || v4 )
                goto LABEL_26;
              while ( 1 )
              {
                v15 = 0;
                if ( v3->m_TextSize.cx <= 0 )
                  goto LABEL_25;
                do
                {
                  v16 = 0;
                  if ( v3->m_IsRenderBackGround == 1 )
                    v16 = (unsigned __int8)*pShadowSrcBytes;
                  if ( *v11 )
                  {
                    v17 = Red | ((Green | ((Blue | (*v11 << 8)) << 8)) << 8);
                  }
                  else
                  {
                    if ( v16 )
                    {
                      *(_DWORD *)v10 = ((unsigned int)&loc_585857 + 1) | (v16 << 24);
                      goto LABEL_23;
                    }
                    v17 = v3->m_kChangeDescColor;
                  }
                  *(_DWORD *)v10 = v17;
LABEL_23:
                  pShadowSrcBytes += 4;
                  ++v15;
                  v10 += 4;
                  v11 += 4;
                }
                while ( v15 < v3->m_TextSize.cx );
                v13 = uiDestSkipBytes;
LABEL_25:
                pShadowSrcBytes += uiShadowSrcSkipBytes;
                v11 += uiSrcSkipBytes;
                v10 += v13;
                if ( ++y >= v3->m_TextSize.cy )
                {
LABEL_26:
                  v3->m_lpSurDest->lpVtbl[4].Release((IUnknown *)v3->m_lpSurDest);
                  v3->m_lpSurSrc->lpVtbl[4].Release((IUnknown *)v3->m_lpSurSrc);
                  if ( v3->m_IsRenderBackGround == 1 )
                    v3->m_lpSurSrcShadow->lpVtbl[4].Release((IUnknown *)v3->m_lpSurSrcShadow);
                  return;
                }
              }
            }
          }
        }
      }
    }
  }
}
// 624D50: could not find valid save-restore pair for ebx
// 624D50: could not find valid save-restore pair for edi

//----- (00625030) --------------------------------------------------------
int __thiscall ScreenBoardTexture::GetMaxSize(ScreenBoardTexture *this, int a2)
{
  int v2; // edx@1
  int result; // eax@1
  int v4; // ecx@1

  v2 = this->m_MaxSize.cx;
  result = a2;
  v4 = this->m_MaxSize.cy;
  *(_DWORD *)a2 = v2;
  *(_DWORD *)(a2 + 4) = v4;
  return result;
}

//----- (00625050) --------------------------------------------------------
int __thiscall ScreenBoardTexture::GetSpaceSize(ScreenBoardTexture *this, int a2)
{
  int v2; // edx@1
  int result; // eax@1
  int v4; // ecx@1

  v2 = this->m_SpaceSize.cx;
  result = a2;
  v4 = this->m_SpaceSize.cy;
  *(_DWORD *)a2 = v2;
  *(_DWORD *)(a2 + 4) = v4;
  return result;
}

//----- (00625070) --------------------------------------------------------
int __thiscall ScreenBoardTexture::GetDescSize(ScreenBoardTexture *this, int a2)
{
  int result; // eax@1
  int v3; // edx@1
  int v4; // ecx@1

  result = a2;
  *(_DWORD *)a2 = this->m_MaxSize.cx;
  *(_DWORD *)(a2 + 4) = this->m_MaxSize.cy;
  v3 = this->m_SpaceSize.cx;
  v4 = this->m_SpaceSize.cy;
  *(_DWORD *)result += v3;
  *(_DWORD *)(result + 4) += v4;
  return result;
}

//----- (00625090) --------------------------------------------------------
int __thiscall ScreenBoardTexture::DescInfo::GetIndex(ScreenBoardTexture::DescInfo *this)
{
  return this->m_nIndex;
}

//----- (006250A0) --------------------------------------------------------
std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned long> *__thiscall ScreenBoardTexture::DescInfo::GetIndexKey(ScreenBoardTexture::DescInfo *this)
{
  return &this->m_IndexKey;
}

//----- (006250B0) --------------------------------------------------------
int __thiscall FrameScreenBoardTexture::GetDescSize(FrameScreenBoardTexture *this, int a2)
{
  int result; // eax@1
  int v3; // edx@1
  int v4; // ecx@1

  result = a2;
  *(_DWORD *)a2 = this->m_MaxSize.cx;
  *(_DWORD *)(a2 + 4) = this->m_MaxSize.cy;
  v3 = this->m_SpaceSize.cx;
  v4 = this->m_SpaceSize.cy;
  *(_DWORD *)result += v3;
  *(_DWORD *)(result + 4) += v4;
  return result;
}

//----- (006250D0) --------------------------------------------------------
void __usercall FrameScreenBoardTexture::DrawTextA(FrameScreenBoardTexture *this@<ecx>, int a2@<ebx>)
{
  FrameScreenBoardTexture *v2; // esi@1
  char *v3; // edi@1
  HDC v4; // edi@1
  const char *v5; // [sp+0h] [bp-8h]@0

  v2 = this;
  v3 = (char *)&this->m_hDC;
  ((void (__stdcall *)(_DWORD, _DWORD))this->m_lpSurSrc->lpVtbl[5].QueryInterface)(this->m_lpSurSrc, &this->m_hDC);
  v4 = *(HDC *)v3;
  if ( v4 )
  {
    SelectObject(v4, v2->m_hFont);
    ScreenBoardTexture::DrawTextA((ScreenBoardTexture *)&v2->vfptr, a2, v5);
  }
}

//----- (00625100) --------------------------------------------------------
char __thiscall ScreenBoardTexture::CalculateStrSize(ScreenBoardTexture *this, const char *pcText, unsigned int *dwStrLen, tagSIZE *tSize)
{
  bool v4; // zf@1
  char result; // al@2
  const char *v6; // edi@3
  int v7; // ST20_4@3
  BYTE v8; // al@4
  int v9; // eax@6
  int v10; // eax@10
  int v11; // [sp+8h] [bp-14h]@3
  tagSIZE kSize; // [sp+10h] [bp-Ch]@6
  ScreenBoardTexture *v13; // [sp+18h] [bp-4h]@1

  *dwStrLen = 0;
  tSize->cx = 0;
  tSize->cy = 0;
  v4 = this->m_hDC == 0;
  v13 = this;
  if ( v4 )
  {
    result = 0;
  }
  else
  {
    v6 = pcText;
    v11 = this->m_MaxSize.cx;
    v7 = this->m_MaxSize.cy;
    if ( pcText && (v8 = *pcText) != 0 )
    {
      do
      {
        if ( IsDBCSLeadByte(v8) )
        {
          GetTextExtentPoint32A(v13->m_hDC, v6, 2, &kSize);
          v9 = kSize.cx;
          if ( kSize.cx + tSize->cx > v11 )
            goto LABEL_14;
          v6 += 2;
          *dwStrLen += 2;
        }
        else
        {
          GetTextExtentPoint32A(v13->m_hDC, v6, 1, &kSize);
          v9 = kSize.cx;
          if ( kSize.cx + tSize->cx > v11 )
            goto LABEL_14;
          ++v6;
          ++*dwStrLen;
        }
        tSize->cx += v9;
        v10 = tSize->cy;
        if ( v10 < kSize.cy )
          v10 = kSize.cy;
        tSize->cy = v10;
        v8 = *v6;
      }
      while ( *v6 );
      result = 1;
    }
    else
    {
LABEL_14:
      result = 0;
    }
  }
  return result;
}

//----- (006251E0) --------------------------------------------------------
char __thiscall ScreenBoardTexture::BeginDraw(ScreenBoardTexture *this, NiTexture *pDescTexture)
{
  ScreenBoardTexture *v2; // esi@1
  NiD3DRenderStateGroup *v3; // ecx@1
  int v5; // eax@3
  IDirect3DSurface9 **v6; // edi@4
  HDC v7; // ebx@6
  NiD3DRenderStateGroup *v8; // ecx@8
  int v9; // eax@9
  NiTexture::RendererData *v10; // ecx@13
  int v11; // eax@14
  IDirect3DSurface9 **v12; // esi@15

  v2 = this;
  v3 = ScreenBoardTexture::sm_spSrcTexture.m_pObject->m_pkRenderStateGroup;
  if ( !v3 )
    return 0;
  v5 = (*(int (**)(void))(*(_DWORD *)&v3->m_bRendererOwned + 20))();
  if ( !v5 )
    return 0;
  v6 = &v2->m_lpSurSrc;
  (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(*(_DWORD *)v5 + 72))(v5, 0, &v2->m_lpSurSrc);
  if ( !v2->m_lpSurSrc )
    return 0;
  ((void (__stdcall *)(_DWORD, _DWORD))(*v6)->lpVtbl[5].QueryInterface)(*v6, &v2->m_hDC);
  v7 = v2->m_hDC;
  if ( !v7 )
    return 0;
  SelectObject(v7, v2->m_hFont);
  if ( v2->m_IsRenderBackGround == 1 )
  {
    v8 = ScreenBoardTexture::sm_spShadowSrcTexture.m_pObject->m_pkRenderStateGroup;
    if ( !v8 )
      return 0;
    v9 = (*(int (**)(void))(*(_DWORD *)&v8->m_bRendererOwned + 20))();
    if ( !v9 )
      return 0;
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(*(_DWORD *)v9 + 72))(v9, 0, &v2->m_lpSurSrcShadow);
    if ( !*v6 )
      return 0;
    ((void (__stdcall *)(_DWORD, _DWORD))v2->m_lpSurSrcShadow->lpVtbl[5].QueryInterface)(
      v2->m_lpSurSrcShadow,
      &v2->m_hShadowDC);
    SelectObject(v2->m_hShadowDC, v2->m_hFont);
  }
  if ( pDescTexture )
  {
    v10 = pDescTexture->m_pkRendererData;
    if ( !v10 )
      return 0;
    v11 = ((int (*)(void))v10->vfptr[1].GetWidth)();
    if ( !v11 )
      return 0;
    v12 = &v2->m_lpSurDest;
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(*(_DWORD *)v11 + 72))(v11, 0, v12);
    if ( !*v12 )
      return 0;
  }
  return 1;
}

//----- (006252D0) --------------------------------------------------------
NiSourceTexture *__thiscall ScreenBoardTexture::DescInfo::GetTexture(ScreenBoardTexture::DescInfo *this)
{
  return this->m_spTexture.m_pObject;
}

//----- (006252E0) --------------------------------------------------------
NiPoint2 *__thiscall ScreenBoardTexture::DescInfo::GetRenderStartPos(ScreenBoardTexture::DescInfo *this, NiPoint2 *result)
{
  ScreenBoardTexture::DescInfo *v2; // esi@1
  double v3; // st6@1
  NiPoint2 *v4; // eax@2
  float v5; // edx@2
  int v6; // edx@3
  float CurSize; // [sp+4h] [bp-18h]@1
  float CurSize_4; // [sp+8h] [bp-14h]@1
  tagSIZE DescSize; // [sp+Ch] [bp-10h]@1
  NiPoint2 RenderIndex; // [sp+14h] [bp-8h]@3

  v2 = this;
  ((void (__stdcall *)(tagSIZE *))this->m_pScreenData->vfptr->GetDescSize)(&DescSize);
  CurSize = (double)DescSize.cx;
  CurSize_4 = (double)DescSize.cy;
  DescSize.cy = ((int (*)(void))v2->m_spTexture.m_pObject->vfptr[15].__vecDelDtor)();
  v3 = (double)(unsigned int)DescSize.cy / CurSize;
  if ( (signed int)v3 )
  {
    v6 = v2->m_nIndex % (signed int)v3;
    DescSize.cy = v2->m_nIndex / (signed int)v3;
    v4 = result;
    RenderIndex.x = (double)v6;
    RenderIndex.y = (double)DescSize.cy;
    result->x = CurSize * RenderIndex.x;
    result->y = CurSize_4 * RenderIndex.y;
  }
  else
  {
    v4 = result;
    v5 = *(float *)&dword_B62544;
    result->x = NiPoint2::ZERO.x;
    result->y = v5;
  }
  return v4;
}
// B62540: using guessed type const struct NiPoint2 NiPoint2::ZERO;
// B62544: using guessed type int dword_B62544;

//----- (00625380) --------------------------------------------------------
const char *__thiscall ScreenBoardTexture::GetTextRenderSize(ScreenBoardTexture *this, const char *pkText, const char *pkTexta)
{
  ScreenBoardTexture *v3; // esi@1
  tagSIZE *v4; // edi@1
  int v5; // edx@2
  const char *result; // eax@2
  int v7; // ebx@3
  int v8; // edi@3

  v3 = this;
  v4 = &this->m_TextSize;
  this->m_TextSize.cy = 0;
  this->m_TextSize.cx = 0;
  if ( ScreenBoardTexture::BeginDraw(this, 0) )
  {
    ScreenBoardTexture::CalculateStrSize(v3, pkTexta, &v3->m_dwMaxLength, v4);
    ScreenBoardTexture::EndDraw(v3);
    v7 = v3->m_SpaceSize.cx + v4->cx;
    v8 = v3->m_SpaceSize.cy + v4->cy;
    if ( v3->m_IsRenderBackGround == 1 )
    {
      v7 += (signed int)v3->m_ShadowScrMovePos.x;
      v8 += (signed int)v3->m_ShadowScrMovePos.y;
    }
    result = pkText;
    *(_DWORD *)pkText = v7;
    *((_DWORD *)pkText + 1) = v8;
  }
  else
  {
    v5 = v4->cy;
    result = pkText;
    *(_DWORD *)pkText = v4->cx;
    *((_DWORD *)pkText + 1) = v5;
  }
  return result;
}

//----- (00625410) --------------------------------------------------------
bool __thiscall ScreenBoardTexture::IsReleaseBuffer(ScreenBoardTexture *this)
{
  ScreenBoardTexture *v1; // esi@1
  unsigned int v2; // eax@1
  bool result; // al@2
  unsigned int v4; // edi@3
  NiPointer<ScreenBoardTexture::DescInfo> *v5; // eax@4
  unsigned int v6; // edx@5

  v1 = this;
  v2 = this->m_UseCount;
  if ( v2 >= this->m_UseChecks._Mylast - this->m_UseChecks._Myfirst )
  {
    v4 = 0;
    if ( v2 )
    {
      do
      {
        v5 = v1->m_UseChecks._Myfirst;
        if ( v5[v4].m_pObject->m_uiRefCount == 1 )
        {
          v6 = v1->m_UseCount;
          if ( v6 )
          {
            std::swap<NiPointer<ScreenBoardTexture::DescInfo>>(&v5[v4], &v5[v6 - 1]);
            --v1->m_UseCount;
            --v4;
          }
        }
        ++v4;
      }
      while ( v4 < v1->m_UseCount );
    }
    result = v1->m_UseCount < v1->m_UseChecks._Mylast - v1->m_UseChecks._Myfirst;
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (00625470) --------------------------------------------------------
void __thiscall ScreenBoardTexture::DescInfo::~DescInfo(ScreenBoardTexture::DescInfo *this)
{
  ScreenBoardTexture::DescInfo *v1; // esi@1
  NiSourceTexture *v2; // edi@3

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ScreenBoardTexture::DescInfo::`vftable';
  if ( this->m_IndexKey.first._Myres >= 0x10 )
    operator delete(this->m_IndexKey.first._Bx._Ptr);
  v1->m_IndexKey.first._Myres = 15;
  v1->m_IndexKey.first._Mysize = 0;
  v1->m_IndexKey.first._Bx._Buf[0] = 0;
  v2 = v1->m_spTexture.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v1->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9B7134: using guessed type int (__thiscall *ScreenBoardTexture::DescInfo::`vftable')(void *p, char);

//----- (00625510) --------------------------------------------------------
void __thiscall ScreenBoardTexture::DescInfo::DescInfo(ScreenBoardTexture::DescInfo *this, ScreenBoardTexture *pScreenData, NiPointer<NiSourceTexture> spTexture, int nIndex)
{
  ScreenBoardTexture::DescInfo *v4; // esi@1
  NiSourceTexture *v5; // edi@1
  NiSourceTexture *v6; // eax@1
  NiSourceTexture *v7; // edi@10

  v4 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v4->vfptr = (NiRefObjectVtbl *)&ScreenBoardTexture::DescInfo::`vftable';
  v4->m_spTexture.m_pObject = 0;
  v4->m_IndexKey.first._Myres = 15;
  v4->m_IndexKey.first._Mysize = 0;
  v4->m_IndexKey.first._Bx._Buf[0] = 0;
  v4->m_IndexKey.second = 0;
  v4->m_pScreenData = pScreenData;
  v5 = v4->m_spTexture.m_pObject;
  v6 = spTexture.m_pObject;
  if ( v5 != spTexture.m_pObject )
  {
    if ( v5 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      v6 = spTexture.m_pObject;
    }
    v4->m_spTexture.m_pObject = v6;
    if ( v6 )
    {
      InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
      v6 = spTexture.m_pObject;
    }
  }
  v4->m_nIndex = nIndex;
  if ( v6 )
  {
    v7 = v6;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
    {
      if ( v7 )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    }
  }
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9B7134: using guessed type int (__thiscall *ScreenBoardTexture::DescInfo::`vftable')(void *p, char);

//----- (00625600) --------------------------------------------------------
NiPointer<ScreenBoardTexture::DescInfo> *__thiscall ScreenBoardTexture::TextOutA(ScreenBoardTexture *this, NiPointer<ScreenBoardTexture::DescInfo> *result, const char *pkText, unsigned int kColorRef)
{
  ScreenBoardTexture *v4; // esi@1
  ScreenBoardTexture::DescInfo *v5; // ebx@1
  ScreenBoardTexture::DescInfo *v6; // edi@3
  unsigned int v7; // ebx@3
  const char *v8; // edx@4
  unsigned int v9; // ecx@6
  const char *v10; // eax@8
  int v11; // eax@10
  bool v12; // zf@10
  signed int v13; // eax@12
  bool v14; // cf@20
  NiPointer<ScreenBoardTexture::DescInfo> *v15; // esi@20
  NiPointer<ScreenBoardTexture::DescInfo> *v16; // eax@21
  ScreenBoardTexture::DescInfo *v17; // eax@22
  ScreenBoardTexture::DescInfo *v18; // edi@27
  NiPointer<ScreenBoardTexture::DescInfo> *v19; // ecx@27
  ScreenBoardTexture::DescInfo *v20; // eax@27
  signed int v21; // eax@29
  NiPointer<ScreenBoardTexture::DescInfo> *v22; // esi@30
  int *v23; // edi@35
  int v24; // ecx@35
  double v25; // st7@36
  NiPointer<ScreenBoardTexture::DescInfo> *v26; // edi@37
  NiPoint2 pos; // [sp+10h] [bp-4Ch]@29
  int v28; // [sp+18h] [bp-44h]@1
  NiPointer<ScreenBoardTexture::DescInfo> *v29; // [sp+1Ch] [bp-40h]@2
  unsigned int i; // [sp+20h] [bp-3Ch]@1
  NiPointer<ScreenBoardTexture::DescInfo> spInfo; // [sp+24h] [bp-38h]@1
  NiPointer<ScreenBoardTexture::DescInfo> *v32; // [sp+28h] [bp-34h]@1
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned long> key; // [sp+2Ch] [bp-30h]@1
  int v34; // [sp+58h] [bp-4h]@1

  v4 = this;
  v5 = 0;
  v28 = 0;
  v32 = result;
  this->m_pkText = pkText;
  this->m_kColorRef = kColorRef;
  spInfo.m_pObject = 0;
  v34 = 1;
  key.first._Myres = 15;
  key.first._Mysize = 0;
  key.first._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&key.first, pkText, strlen(pkText));
  key.second = kColorRef;
  v12 = v4->m_UseCount == 0;
  LOBYTE(v34) = 2;
  i = 0;
  if ( !v12 )
  {
    v29 = v4->m_UseChecks._Myfirst;
    while ( 1 )
    {
      v6 = v29->m_pObject;
      v7 = v29->m_pObject->m_IndexKey.first._Mysize;
      if ( v29->m_pObject->m_IndexKey.first._Myres < 0x10 )
        v8 = v6->m_IndexKey.first._Bx._Buf;
      else
        v8 = v6->m_IndexKey.first._Bx._Ptr;
      v9 = key.first._Mysize;
      if ( key.first._Mysize >= v7 )
        v9 = v29->m_pObject->m_IndexKey.first._Mysize;
      v10 = key.first._Bx._Ptr;
      if ( key.first._Myres < 0x10 )
        v10 = (const char *)&key;
      v11 = std::char_traits<char>::compare(v10, v8, v9);
      v12 = v11 == 0;
      if ( !v11 )
      {
        if ( key.first._Mysize >= v7 )
          v13 = key.first._Mysize != v7;
        else
          v13 = -1;
        v12 = v13 == 0;
      }
      if ( v12 && kColorRef == v6->m_IndexKey.second )
        break;
      ++v29;
      if ( ++i >= v4->m_UseCount )
      {
        v5 = spInfo.m_pObject;
        goto LABEL_19;
      }
    }
    v17 = v4->m_UseChecks._Myfirst[i].m_pObject;
    v15 = v32;
    v32->m_pObject = v17;
    if ( v17 )
      InterlockedIncrement((volatile LONG *)&v17->m_uiRefCount);
    if ( key.first._Myres >= 0x10 )
      operator delete(key.first._Bx._Ptr);
    return v15;
  }
LABEL_19:
  if ( !ScreenBoardTexture::IsReleaseBuffer(v4) )
  {
    v14 = key.first._Myres < 0x10;
    v15 = v32;
    v32->m_pObject = 0;
    if ( !v14 )
    {
      operator delete(key.first._Bx._Ptr);
      return v15;
    }
    return v15;
  }
  v18 = v4->m_UseChecks._Myfirst[v4->m_UseCount].m_pObject;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &v18->m_IndexKey.first,
    &key.first,
    0,
    0xFFFFFFFF);
  v18->m_IndexKey.second = key.second;
  v19 = v4->m_UseChecks._Myfirst;
  v20 = v19[v4->m_UseCount].m_pObject;
  if ( v20 )
  {
    spInfo.m_pObject = v19[v4->m_UseCount].m_pObject;
    InterlockedIncrement((volatile LONG *)&v20->m_uiRefCount);
    v5 = spInfo.m_pObject;
  }
  ++v4->m_UseCount;
  ScreenBoardTexture::DescInfo::GetRenderStartPos(v5, &pos);
  v21 = (signed int)pos.y;
  v4->m_DestCorrectionPos.cx = (signed int)pos.x;
  v4->m_DestCorrectionPos.cy = v21;
  if ( ScreenBoardTexture::BeginDraw(v4, (NiTexture *)&v5->m_spTexture.m_pObject->vfptr) )
  {
    v23 = &v4->m_TextSize.cx;
    ScreenBoardTexture::CalculateStrSize(v4, v4->m_pkText, &v4->m_dwMaxLength, &v4->m_TextSize);
    v24 = v4->m_SpaceSize.cy;
    *v23 += v4->m_SpaceSize.cx;
    v4->m_TextSize.cy += v24;
    if ( v4->m_IsRenderBackGround == 1 )
    {
      v25 = v4->m_ShadowScrMovePos.y;
      *v23 += (signed int)v4->m_ShadowScrMovePos.x;
      v4->m_TextSize.cy += (signed int)v25;
    }
    v4->vfptr->DrawTextA(v4);
    ScreenBoardTexture::EndDraw(v4);
    v26 = v32;
    v4->m_pkText = 0;
    v26->m_pObject = v5;
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
    v28 = 1;
    if ( key.first._Myres >= 0x10 )
      operator delete(key.first._Bx._Ptr);
    key.first._Myres = 15;
    key.first._Mysize = 0;
    key.first._Bx._Buf[0] = 0;
    LOBYTE(v34) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v16 = v26;
  }
  else
  {
    v14 = key.first._Myres < 0x10;
    v22 = v32;
    v32->m_pObject = 0;
    v28 = 1;
    if ( !v14 )
      operator delete(key.first._Bx._Ptr);
    key.first._Myres = 15;
    key.first._Mysize = 0;
    key.first._Bx._Buf[0] = 0;
    LOBYTE(v34) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v16 = v22;
  }
  return v16;
}

//----- (00625900) --------------------------------------------------------
void __thiscall ScreenBoardTexture::ScreenBoardTexture(ScreenBoardTexture *this)
{
  this->vfptr = (ScreenBoardTextureVtbl *)&ScreenBoardTexture::`vftable';
  this->m_UseChecks._Myfirst = 0;
  this->m_UseChecks._Mylast = 0;
  this->m_UseChecks._Myend = 0;
  this->m_hFont = 0;
  this->m_hEraseBrush = 0;
  this->m_kChangeDescColor = 0;
  this->m_IsRenderBackGround = 0;
}
// 9B713C: using guessed type struct tagSIZE (__thiscall *ScreenBoardTexture::`vftable')(ScreenBoardTexture *this, const char *);

//----- (00625920) --------------------------------------------------------
void __thiscall ScreenBoardTexture::Clear(ScreenBoardTexture *this)
{
  ScreenBoardTexture *v1; // esi@1
  NiPointer<NiAVObject> *v2; // eax@1
  NiPointer<NiAVObject> *v3; // ecx@1
  NiPointer<NiAVObject> *v4; // edi@2
  HFONT__ *v5; // eax@3

  v1 = this;
  v2 = (NiPointer<NiAVObject> *)this->m_UseChecks._Mylast;
  v3 = (NiPointer<NiAVObject> *)this->m_UseChecks._Myfirst;
  if ( v3 != v2 )
  {
    v4 = std::_Move<NiPointer<NiAVObject> *,NiPointer<NiAVObject> *>(v2, v2, v3);
    std::_Destroy_range<std::allocator<NiPointer<PgSprData>>>(
      (NiPointer<PgSprData> *)v4,
      (NiPointer<PgSprData> *)v1->m_UseChecks._Mylast);
    v1->m_UseChecks._Mylast = (NiPointer<ScreenBoardTexture::DescInfo> *)v4;
  }
  v5 = v1->m_hFont;
  v1->m_UseCount = 0;
  if ( v5 )
  {
    DeleteObject(v5);
    v1->m_hFont = 0;
  }
  if ( v1->m_hEraseBrush )
  {
    DeleteObject(v1->m_hEraseBrush);
    v1->m_hEraseBrush = 0;
  }
}

//----- (00625990) --------------------------------------------------------
void __thiscall FrameScreenBoardTexture::~FrameScreenBoardTexture(FrameScreenBoardTexture *this)
{
  FrameScreenBoardTexture *v1; // esi@1
  NiPointer<PgSprData> *v2; // eax@1

  v1 = this;
  this->vfptr = (ScreenBoardTextureVtbl *)&FrameScreenBoardTexture::`vftable';
  v2 = (NiPointer<PgSprData> *)this->m_UseChecks._Myfirst;
  if ( v2 )
  {
    std::_Destroy_range<std::allocator<NiPointer<PgSprData>>>(v2, (NiPointer<PgSprData> *)this->m_UseChecks._Mylast);
    operator delete(v1->m_UseChecks._Myfirst);
  }
  v1->m_UseChecks._Myfirst = 0;
  v1->m_UseChecks._Mylast = 0;
  v1->m_UseChecks._Myend = 0;
}
// 9B714C: using guessed type struct tagSIZE (__thiscall *FrameScreenBoardTexture::`vftable')(ScreenBoardTexture *this, const char *);

//----- (006259E0) --------------------------------------------------------
bool __thiscall ScreenBoardTexture::Init(ScreenBoardTexture *this, tagSIZE MaxSize, Font::Type fonttype, int nBufferCount)
{
  ScreenBoardTexture *v4; // ebx@1
  float v5; // eax@1
  float v6; // ecx@1
  double v7; // st7@1
  signed int v8; // eax@1
  double v9; // st7@1
  signed int v10; // edi@1
  signed int v11; // esi@1
  NiPixelData *v13; // eax@5
  NiPixelData *v14; // eax@6
  NiD3DDefaultShader *v15; // eax@8
  NiPixelData *v16; // eax@10
  NiPixelData *v17; // eax@11
  NiD3DDefaultShader *v18; // eax@13
  int v19; // ecx@14
  int v20; // eax@15
  int v21; // esi@16
  PgSprData *v22; // eax@19
  NiPixelData *v23; // eax@20
  NiSourceTexture *v24; // eax@22
  NiSourceTexture *v25; // edi@22
  PgSprData *v26; // esi@26
  PgSprData *v27; // eax@27
  PgSprData *v28; // esi@31
  HBRUSH v29; // eax@39
  struct Font::FontDefine **v30; // eax@40
  HFONT v31; // eax@40
  NiPointer<NiSourceTexture> v32; // [sp-8h] [bp-98h]@27
  int v33; // [sp-4h] [bp-94h]@27
  NiPointer<NiSourceTexture> spDescTexture; // [sp+10h] [bp-80h]@22
  NiTexture::FormatPrefs kPrefs; // [sp+14h] [bp-7Ch]@4
  Font::Type eType; // [sp+20h] [bp-70h]@1
  float v37; // [sp+24h] [bp-6Ch]@1
  float v38; // [sp+28h] [bp-68h]@1
  int nTextureNum; // [sp+2Ch] [bp-64h]@16
  int nOneTextureBufferCount; // [sp+30h] [bp-60h]@16
  int nIndex; // [sp+34h] [bp-5Ch]@25
  NiPointer<PgSprData> _Val; // [sp+38h] [bp-58h]@19
  int i; // [sp+3Ch] [bp-54h]@5
  bool bOldbDestroyAppData; // [sp+43h] [bp-4Dh]@4
  tagLOGFONTA LogFont; // [sp+44h] [bp-4Ch]@40
  int v46; // [sp+8Ch] [bp-4h]@5

  v37 = 0.0;
  v4 = this;
  v38 = 1.0;
  eType = fonttype;
  this->m_SpaceSize.cx = 2;
  this->m_SpaceSize.cy = 2;
  v5 = v37;
  this->m_MaxSize = MaxSize;
  v6 = v38;
  v4->m_ShadowScrMovePos.x = v5;
  v7 = v4->m_ShadowScrMovePos.x;
  v4->m_ShadowScrMovePos.y = v6;
  v8 = (signed int)v7;
  v9 = v4->m_ShadowScrMovePos.y;
  v4->m_MaxSize.cx += v8;
  v4->m_MaxSize.cy += (signed int)v9;
  v10 = v4->m_MaxSize.cx + 2;
  v11 = v4->m_MaxSize.cy + 2;
  if ( v10 > 1024 || v11 > 256 )
    return 0;
  kPrefs.m_eAlphaFmt = 3;
  kPrefs.m_ePixelLayout = 2;
  kPrefs.m_eMipMapped = 0;
  bOldbDestroyAppData = NiSourceTexture::ms_bDestroyAppData;
  NiSourceTexture::ms_bDestroyAppData = 1;
  if ( !ScreenBoardTexture::sm_spSrcTexture.m_pObject )
  {
    v13 = (NiPixelData *)operator new(0x70u);
    i = (int)v13;
    v46 = 0;
    if ( v13 )
      NiPixelData::NiPixelData(v13, 0x400u, 0x100u, &NiPixelFormat::RGB24, 1u, 1u);
    else
      v14 = 0;
    v46 = -1;
    v15 = (NiD3DDefaultShader *)NiSourceTexture::Create(v14, &kPrefs);
    NiPointer<PopupMenuWin>::operator=(&ScreenBoardTexture::sm_spSrcTexture, v15);
    if ( !ScreenBoardTexture::sm_spSrcTexture.m_pObject )
      return 0;
  }
  if ( !ScreenBoardTexture::sm_spShadowSrcTexture.m_pObject )
  {
    v16 = (NiPixelData *)operator new(0x70u);
    i = (int)v16;
    v46 = 1;
    if ( v16 )
      NiPixelData::NiPixelData(v16, 0x400u, 0x100u, &NiPixelFormat::RGB24, 1u, 1u);
    else
      v17 = 0;
    v46 = -1;
    v18 = (NiD3DDefaultShader *)NiSourceTexture::Create(v17, &kPrefs);
    NiPointer<PopupMenuWin>::operator=(&ScreenBoardTexture::sm_spShadowSrcTexture, v18);
    if ( !ScreenBoardTexture::sm_spShadowSrcTexture.m_pObject )
      return 0;
  }
  v19 = 1024 / v10;
  if ( !(1024 / v10) )
    return 0;
  v20 = 1024 / v11;
  if ( !(1024 / v11) )
    return 0;
  nOneTextureBufferCount = v20 * v19;
  v21 = nBufferCount / (v20 * v19);
  nTextureNum = nBufferCount / (v20 * v19);
  if ( nBufferCount % (v20 * v19) )
    nTextureNum = ++v21;
  ScreenBoardTexture::Clear(v4);
  i = 0;
  if ( v21 > 0 )
  {
    do
    {
      v22 = (PgSprData *)operator new(0x70u);
      _Val.m_pObject = v22;
      v46 = 2;
      if ( v22 )
        NiPixelData::NiPixelData((NiPixelData *)v22, 0x400u, 0x400u, &NiPixelFormat::RGBA32, 1u, 1u);
      else
        v23 = 0;
      v46 = -1;
      v24 = NiSourceTexture::Create(v23, &kPrefs);
      v25 = v24;
      spDescTexture.m_pObject = v24;
      if ( v24 )
        InterlockedIncrement((volatile LONG *)&v24->m_uiRefCount);
      v46 = 3;
      if ( !v25 )
        return 0;
      nIndex = 0;
      if ( nOneTextureBufferCount > 0 )
      {
        do
        {
          v26 = (PgSprData *)operator new(0x34u);
          _Val.m_pObject = v26;
          LOBYTE(v46) = 4;
          if ( v26 )
          {
            v33 = nIndex;
            v38 = COERCE_FLOAT(&v32);
            v32.m_pObject = v25;
            InterlockedIncrement((volatile LONG *)&v25->m_uiRefCount);
            ScreenBoardTexture::DescInfo::DescInfo((ScreenBoardTexture::DescInfo *)v26, v4, v32, v33);
          }
          else
          {
            v27 = 0;
          }
          _Val.m_pObject = v27;
          if ( v27 )
            InterlockedIncrement((volatile LONG *)&v27->m_uiRefCount);
          LOBYTE(v46) = 5;
          std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData>>>::push_back(
            (std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData> > > *)&v4->m_UseChecks,
            &_Val);
          v28 = _Val.m_pObject;
          LOBYTE(v46) = 3;
          if ( _Val.m_pObject && !InterlockedDecrement((volatile LONG *)&_Val.m_pObject->m_uiRefCount) )
            v28->vfptr->__vecDelDtor((NiRefObject *)v28, 1u);
          ++nIndex;
        }
        while ( nIndex < nOneTextureBufferCount );
        v21 = nTextureNum;
      }
      v46 = -1;
      if ( !InterlockedDecrement((volatile LONG *)&v25->m_uiRefCount) )
        v25->vfptr->__vecDelDtor((NiRefObject *)v25, 1u);
    }
    while ( ++i < v21 );
  }
  NiSourceTexture::ms_bDestroyAppData = bOldbDestroyAppData;
  v33 = 0;
  v4->m_UseCount = 0;
  v29 = CreateSolidBrush(v33);
  v4->m_hEraseBrush = v29;
  if ( !v29 )
    return 0;
  v30 = Font::GetFontDefine(eType);
  *(_WORD *)&LogFont.lfUnderline = 0;
  *(_WORD *)&LogFont.lfItalic = *((_BYTE *)v30 + 12);
  LogFont.lfEscapement = 0;
  LogFont.lfOrientation = 0;
  LogFont.lfOutPrecision = *((_BYTE *)v30 + 20);
  LogFont.lfClipPrecision = 0;
  LogFont.lfHeight = (int)*v30;
  LogFont.lfWidth = 0;
  LogFont.lfCharSet = *((_BYTE *)v30 + 16);
  LogFont.lfQuality = *((_BYTE *)v30 + 24);
  LogFont.lfWeight = (int)v30[2];
  LogFont.lfPitchAndFamily = *((_BYTE *)v30 + 28);
  lstrcpyA(LogFont.lfFaceName, (LPCSTR)v30[8]);
  v31 = CreateFontIndirectA(&LogFont);
  v4->m_hFont = v31;
  return v31 != 0;
}
// B6248C: using guessed type bool NiSourceTexture::ms_bDestroyAppData;

//----- (00625DB0) --------------------------------------------------------
void __thiscall ScreenBoardTexture::Terminate(ScreenBoardTexture *this)
{
  ScreenBoardTexture *v1; // ebx@1
  NiD3DDefaultShader *v2; // esi@2
  NiD3DDefaultShader *v3; // esi@6

  v1 = this;
  if ( ScreenBoardTexture::sm_spSrcTexture.m_pObject )
  {
    v2 = ScreenBoardTexture::sm_spSrcTexture.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&ScreenBoardTexture::sm_spSrcTexture.m_pObject->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    ScreenBoardTexture::sm_spSrcTexture.m_pObject = 0;
  }
  v3 = ScreenBoardTexture::sm_spShadowSrcTexture.m_pObject;
  if ( ScreenBoardTexture::sm_spShadowSrcTexture.m_pObject )
  {
    if ( !InterlockedDecrement((volatile LONG *)&ScreenBoardTexture::sm_spShadowSrcTexture.m_pObject->m_uiRefCount)
      && v3 )
    {
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
    ScreenBoardTexture::sm_spShadowSrcTexture.m_pObject = 0;
  }
  ScreenBoardTexture::Clear(v1);
}

//----- (00625E20) --------------------------------------------------------
void __thiscall FrameScreenBoardTexture::FrameScreenBoardTexture(FrameScreenBoardTexture *this)
{
  this->m_UseChecks._Myfirst = 0;
  this->m_UseChecks._Mylast = 0;
  this->m_UseChecks._Myend = 0;
  this->m_hFont = 0;
  this->m_hEraseBrush = 0;
  this->m_kChangeDescColor = 0;
  this->m_IsRenderBackGround = 0;
  this->vfptr = (ScreenBoardTextureVtbl *)&FrameScreenBoardTexture::`vftable';
}
// 9B714C: using guessed type struct tagSIZE (__thiscall *FrameScreenBoardTexture::`vftable')(ScreenBoardTexture *this, const char *);

//----- (00625E40) --------------------------------------------------------
void __cdecl std::swap<NiPointer<ScreenBoardTexture::DescInfo>>(NiPointer<ScreenBoardTexture::DescInfo> *_Left, NiPointer<ScreenBoardTexture::DescInfo> *_Right)
{
  ScreenBoardTexture::DescInfo *v2; // edi@1
  ScreenBoardTexture::DescInfo *v3; // esi@3
  ScreenBoardTexture::DescInfo *v4; // eax@8
  ScreenBoardTexture::DescInfo *v5; // esi@10

  v2 = _Left->m_pObject;
  if ( _Left->m_pObject )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v3 = _Left->m_pObject;
  if ( _Left->m_pObject != _Right->m_pObject )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v4 = _Right->m_pObject;
    _Left->m_pObject = _Right->m_pObject;
    if ( v4 )
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  }
  v5 = _Right->m_pObject;
  if ( _Right->m_pObject != v2 )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    _Right->m_pObject = v2;
    if ( v2 )
      InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  }
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  }
}

//----- (00625F40) --------------------------------------------------------
NiPointer<NiAVObject> *__cdecl std::_Move<NiPointer<NiAVObject> *,NiPointer<NiAVObject> *>(NiPointer<NiAVObject> *_First, NiPointer<NiAVObject> *_Last, NiPointer<NiAVObject> *_Dest)
{
  NiPointer<NiAVObject> *v3; // edi@1
  NiPointer<NiAVObject> *v4; // ebx@2
  NiPointer<NiAVObject> v5; // esi@3
  NiPointer<NiAVObject> v6; // eax@8
  NiPointer<NiAVObject> *result; // eax@11

  v3 = _First;
  if ( _First == _Last )
  {
    result = _Dest;
  }
  else
  {
    v4 = _Dest;
    do
    {
      v5.m_pObject = v4->m_pObject;
      if ( v4->m_pObject != v3->m_pObject )
      {
        if ( v5.m_pObject && !InterlockedDecrement((volatile LONG *)&v5.m_pObject->m_uiRefCount) && v5.m_pObject )
          v5.m_pObject->vfptr->__vecDelDtor((NiRefObject *)v5.m_pObject, 1u);
        v6.m_pObject = v3->m_pObject;
        v4->m_pObject = v3->m_pObject;
        if ( v6.m_pObject )
          InterlockedIncrement((volatile LONG *)&v6.m_pObject->m_uiRefCount);
      }
      ++v3;
      ++v4;
    }
    while ( v3 != _Last );
    result = v4;
  }
  return result;
}

//----- (00625FB0) --------------------------------------------------------
ScreenBoardTexture::DescInfo *__thiscall ScreenBoardTexture::DescInfo::`scalar deleting destructor'(ScreenBoardTexture::DescInfo *this, unsigned int a2)
{
  ScreenBoardTexture::DescInfo *v2; // esi@1

  v2 = this;
  ScreenBoardTexture::DescInfo::~DescInfo(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00625FE0) --------------------------------------------------------
void __usercall DrawVLine_0(unsigned int uiPitch@<esi>, unsigned int uiY1@<edx>, unsigned int uiY2@<eax>, unsigned int uiColor@<edi>, unsigned int *puiDest, unsigned int uiX)
{
  unsigned int v6; // eax@1
  char *i; // ecx@1

  v6 = uiY2 - uiY1 + 1;
  for ( i = (char *)&puiDest[uiX] + uiY1 * uiPitch; v6; --v6 )
  {
    *(_DWORD *)i = uiColor;
    i += uiPitch;
  }
}

//----- (00626010) --------------------------------------------------------
void __usercall FillSpr_0(unsigned int uiPitch@<eax>, unsigned int uiSrcWidth@<ebx>, unsigned int uiSrcHeight@<edx>, unsigned int *puiDest, unsigned int uiX, unsigned int uiY, char *pbySrc, unsigned int uiSolidColor, unsigned int uiTransColor)
{
  char *v9; // esi@1
  char *v10; // ecx@1
  unsigned int v11; // eax@1
  unsigned int v12; // edi@4
  unsigned int v13; // edx@6
  unsigned int uiYa; // [sp+18h] [bp+10h]@2

  v9 = pbySrc;
  v10 = (char *)&puiDest[uiX] + uiY * uiPitch;
  v11 = uiPitch - 4 * uiSrcWidth;
  if ( uiSrcHeight )
  {
    uiYa = uiSrcHeight;
    while ( !uiSrcWidth )
    {
LABEL_11:
      v10 += v11;
      if ( !--uiYa )
        return;
    }
    v12 = uiSrcWidth;
    while ( *v9 != 1 )
    {
      if ( *v9 == 2 )
      {
        v13 = uiTransColor;
        goto LABEL_9;
      }
LABEL_10:
      v10 += 4;
      ++v9;
      if ( !--v12 )
        goto LABEL_11;
    }
    v13 = uiSolidColor;
LABEL_9:
    *(_DWORD *)v10 = v13;
    goto LABEL_10;
  }
}

//----- (00626070) --------------------------------------------------------
bool __thiscall SpeechBD::IsAlive(SpeechBD *this, float fTime)
{
  return this->m_bAlive && fTime - this->m_fStartTime <= this->m_fLifeTime;
}

//----- (006260A0) --------------------------------------------------------
void __thiscall SpeechBD::EndDraw(SpeechBD *this)
{
  SpeechBD *v1; // esi@1

  v1 = this;
  if ( this->m_lpSurSrc )
    this->m_lpSurSrc->lpVtbl->Release((IUnknown *)this->m_lpSurSrc);
  if ( v1->m_lpSurDest )
    v1->m_lpSurDest->lpVtbl->Release((IUnknown *)v1->m_lpSurDest);
}

//----- (006260D0) --------------------------------------------------------
void __usercall SpeechBD::DrawTextA(SpeechBD *this@<ecx>, void **a2@<edi>)
{
  SpeechBD *v2; // esi@1
  int v3; // edi@2
  int v4; // ebx@3
  int iTextXPos; // [sp+4h] [bp-Ch]@2
  unsigned int i; // [sp+8h] [bp-8h]@2
  HDC__ *hDC; // [sp+Ch] [bp-4h]@2

  v2 = this;
  if ( this->m_lpSurSrc )
  {
    this->m_lpSurSrc->lpVtbl[5].QueryInterface((IUnknown *)this->m_lpSurSrc, (_GUID *const )&hDC, a2);
    SetBkMode(hDC, 1);
    SelectObject(hDC, SpeechBD::ms_hFont);
    v3 = v2->m_iTextYPos;
    iTextXPos = v2->m_iTextXPos;
    i = 0;
    if ( v2->m_uiTotalLine )
    {
      v4 = (int)v2->m_apcLineText;
      do
      {
        TextOutA(hDC, iTextXPos, v3, *(LPCSTR *)v4, *(_DWORD *)(v4 + 16));
        v3 += v2->m_uiLineHeight + 1;
        v4 += 4;
        ++i;
      }
      while ( i < v2->m_uiTotalLine );
    }
    v2->m_lpSurSrc->lpVtbl[5].AddRef((IUnknown *)v2->m_lpSurSrc);
  }
}

//----- (00626180) --------------------------------------------------------
void __usercall DrawHLine_0(unsigned int uiPitch@<ecx>, unsigned int uiX1@<edx>, unsigned int uiX2@<eax>, unsigned int *puiDest, unsigned int uiY, unsigned int uiColor)
{
  memset32((char *)&puiDest[uiX1] + uiY * uiPitch, uiColor, uiX2 - uiX1 + 1);
}

//----- (006261B0) --------------------------------------------------------
void __usercall CalculateStrlenInWidth_2(char *pcText@<eax>, unsigned int *dwStrLen@<ebx>, unsigned int *dwWidth@<esi>, HDC__ *hDC, unsigned int dwMaxWidth)
{
  char *v5; // edi@1
  char v6; // al@2
  int v7; // eax@4
  tagSIZE kSize; // [sp+4h] [bp-8h]@4

  v5 = pcText;
  *dwStrLen = 0;
  *dwWidth = 0;
  if ( pcText )
  {
    v6 = *pcText;
    if ( v6 )
    {
      do
      {
        if ( IsDBCSLeadByte(v6) )
        {
          GetTextExtentPoint32A(hDC, v5, 2, &kSize);
          v7 = kSize.cx;
          if ( kSize.cx + *dwWidth > dwMaxWidth )
            return;
          v5 += 2;
          *dwStrLen += 2;
        }
        else
        {
          GetTextExtentPoint32A(hDC, v5, 1, &kSize);
          v7 = kSize.cx;
          if ( kSize.cx + *dwWidth > dwMaxWidth )
            return;
          ++v5;
          ++*dwStrLen;
        }
        *dwWidth += v7;
        v6 = *v5;
      }
      while ( *v5 );
    }
  }
}

//----- (00626230) --------------------------------------------------------
bool __thiscall SpeechBD::BeginDraw(SpeechBD *this)
{
  SpeechBD *v1; // edi@1
  NiTexture::RendererData *v2; // ecx@1
  bool result; // al@2
  int v4; // eax@3
  int v5; // ecx@5
  int v6; // eax@6

  v1 = this;
  v2 = this->m_pkTexture->m_pkRendererData;
  if ( v2 && (v4 = ((int (*)(void))v2->vfptr[1].GetWidth)()) != 0 )
  {
    (*(void (__stdcall **)(int, _DWORD, IDirect3DSurface9 **))(*(_DWORD *)v4 + 72))(v4, 0, &v1->m_lpSurDest);
    if ( v1->m_lpSurDest
      && (v5 = *(_DWORD *)(SpeechBD::ms_spTempTexture + 40)) != 0
      && (v6 = (*(int (**)(void))(*(_DWORD *)v5 + 20))()) != 0 )
    {
      (*(void (__stdcall **)(int, _DWORD, IDirect3DSurface9 **))(*(_DWORD *)v6 + 72))(v6, 0, &v1->m_lpSurSrc);
      result = v1->m_lpSurSrc != 0;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A96A20: using guessed type int SpeechBD::ms_spTempTexture;

//----- (006262A0) --------------------------------------------------------
void __thiscall SpeechBD::CalculateLine(SpeechBD *this)
{
  SpeechBD *v1; // edi@1
  IDirect3DSurface9 *v2; // eax@1
  char *v3; // eax@3
  HDC__ *v4; // ST08_4@3
  unsigned int v5; // eax@6
  unsigned int v6; // esi@7
  unsigned int v7; // eax@7
  int v8; // edx@7
  void **v9; // [sp+0h] [bp-3Ch]@0
  tagSIZE kSize; // [sp+8h] [bp-34h]@2
  unsigned int dwTextWidth; // [sp+10h] [bp-2Ch]@3
  unsigned int dwStrLen; // [sp+14h] [bp-28h]@3
  unsigned int i; // [sp+18h] [bp-24h]@2
  unsigned int *v14; // [sp+1Ch] [bp-20h]@2
  char *pcText; // [sp+20h] [bp-1Ch]@2
  HDC__ *hDC; // [sp+24h] [bp-18h]@2
  tagRECT kRect; // [sp+28h] [bp-14h]@2

  v1 = this;
  v2 = this->m_lpSurSrc;
  if ( v2 )
  {
    this->m_uiTotalLine = 0;
    this->m_uiTextWidth = 0;
    this->m_uiTextHeight = 0;
    this->m_uiLineHeight = 0;
    v2->lpVtbl[5].QueryInterface((IUnknown *)v2, (_GUID *const )&hDC, v9);
    SetRect(&kRect, 0, 0, 148, 81);
    FillRect(hDC, &kRect, (HBRUSH)SpeechBD::ms_hEraseBrush);
    SelectObject(hDC, SpeechBD::ms_hFont);
    pcText = v1->m_pcSpeech;
    GetTextExtentPoint32A(hDC, "W", 1, &kSize);
    v1->m_uiLineHeight = kSize.cy;
    i = 0;
    v14 = v1->m_auiLineStrLen;
    do
    {
      v3 = pcText;
      v4 = hDC;
      *(v14 - 4) = (unsigned int)pcText;
      CalculateStrlenInWidth_2(v3, &dwStrLen, &dwTextWidth, v4, 0x78u);
      if ( !dwStrLen )
        break;
      pcText += dwStrLen;
      *v14 = dwStrLen;
      if ( v1->m_uiTextWidth < dwTextWidth )
        v1->m_uiTextWidth = dwTextWidth;
      v5 = i;
      ++v1->m_uiTotalLine;
      ++v14;
      i = v5 + 1;
    }
    while ( v5 + 1 < 4 );
    v6 = v1->m_uiTextWidth;
    v7 = (148 - v6) >> 1;
    v8 = v1->m_uiTotalLine * (v1->m_uiLineHeight + 1) - 1;
    v1->m_iTextXPos = v7;
    v1->m_iTextYPos = 69 - v8;
    v1->m_kTextRect.left = v7 - 5;
    v1->m_kTextRect.right = v7 + v6 + 4;
    v1->m_kTextRect.bottom = 73;
    v1->m_kTextRect.top = 69 - v8 - 5;
    v1->m_uiTextWidth = v6 + 9;
    v1->m_uiTextHeight = v8 + 9;
    v1->m_lpSurSrc->lpVtbl[5].AddRef((IUnknown *)v1->m_lpSurSrc);
  }
}
// 6262A0: could not find valid save-restore pair for ebx

//----- (00626400) --------------------------------------------------------
void __thiscall SpeechBD::DrawFrame(SpeechBD *this)
{
  SpeechBD *v1; // esi@1
  IDirect3DSurface9 *v2; // eax@1
  int v3; // eax@4
  char *v4; // edx@4
  char *v5; // eax@4
  signed int v6; // ebx@4
  signed int v7; // edi@5
  char *v8; // edx@12
  char *v9; // eax@12
  signed int v10; // ebx@12
  signed int v11; // edi@13
  char *v12; // edx@20
  char *v13; // eax@20
  signed int v14; // ebx@20
  signed int v15; // edi@21
  char *v16; // edx@28
  char *v17; // eax@28
  signed int v18; // ebx@28
  signed int v19; // edi@29
  int v20; // eax@36
  char *v21; // ST18_4@36
  int v22; // eax@36
  unsigned int v23; // ecx@36
  int v24; // ecx@36
  char *v25; // edi@36
  int v26; // eax@36
  char *v27; // edx@39
  int v28; // eax@39
  int dwLineColor; // [sp+Ch] [bp-24h]@4
  _D3DLOCKED_RECT kLockRectSrc; // [sp+10h] [bp-20h]@2
  char *v31; // [sp+18h] [bp-18h]@4
  tagRECT rc; // [sp+1Ch] [bp-14h]@2

  v1 = this;
  v2 = this->m_lpSurSrc;
  if ( v2 )
  {
    rc.left = 0;
    rc.top = 0;
    rc.right = 147;
    rc.bottom = 80;
    if ( !((int (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v2->lpVtbl[4].AddRef)(v2, &kLockRectSrc, &rc, 0) )
    {
      if ( kLockRectSrc.pBits )
      {
        v3 = v1->m_kTextRect.top;
        BYTE3(v1->m_dwOutLineColor) = 0;
        dwLineColor = v1->m_dwOutLineColor;
        v4 = ms_abyBoardLeftTopSpr_0;
        v5 = (char *)kLockRectSrc.pBits + 4 * v1->m_kTextRect.left + kLockRectSrc.Pitch * (v3 - 3) - 12;
        v31 = (char *)(kLockRectSrc.Pitch - 16);
        v6 = 4;
        do
        {
          v7 = 4;
          do
          {
            if ( *v4 == 1 )
            {
              *(_DWORD *)v5 = dwLineColor;
            }
            else if ( *v4 == 2 )
            {
              *(_DWORD *)v5 = 16712191;
            }
            v5 += 4;
            ++v4;
            --v7;
          }
          while ( v7 );
          v5 = &v5[(_DWORD)v31];
          --v6;
        }
        while ( v6 );
        v8 = ms_abyBoardLeftBottomSpr_0;
        v9 = (char *)kLockRectSrc.pBits + 4 * v1->m_kTextRect.left + kLockRectSrc.Pitch * v1->m_kTextRect.bottom - 12;
        v31 = (char *)(kLockRectSrc.Pitch - 16);
        v10 = 4;
        do
        {
          v11 = 4;
          do
          {
            if ( *v8 == 1 )
            {
              *(_DWORD *)v9 = dwLineColor;
            }
            else if ( *v8 == 2 )
            {
              *(_DWORD *)v9 = 16712191;
            }
            v9 += 4;
            ++v8;
            --v11;
          }
          while ( v11 );
          v9 = &v9[(_DWORD)v31];
          --v10;
        }
        while ( v10 );
        v12 = ms_abyBoardRightTopSpr_0;
        v13 = (char *)kLockRectSrc.pBits + 4 * v1->m_kTextRect.right + kLockRectSrc.Pitch * (v1->m_kTextRect.top - 3);
        v31 = (char *)(kLockRectSrc.Pitch - 16);
        v14 = 4;
        do
        {
          v15 = 4;
          do
          {
            if ( *v12 == 1 )
            {
              *(_DWORD *)v13 = dwLineColor;
            }
            else if ( *v12 == 2 )
            {
              *(_DWORD *)v13 = 16712191;
            }
            v13 += 4;
            ++v12;
            --v15;
          }
          while ( v15 );
          v13 = &v13[(_DWORD)v31];
          --v14;
        }
        while ( v14 );
        v16 = ms_abyBoardRightBottomSpr_0;
        v17 = (char *)kLockRectSrc.pBits + 4 * v1->m_kTextRect.right + kLockRectSrc.Pitch * v1->m_kTextRect.bottom;
        v31 = (char *)(kLockRectSrc.Pitch - 16);
        v18 = 4;
        do
        {
          v19 = 4;
          do
          {
            if ( *v16 == 1 )
            {
              *(_DWORD *)v17 = dwLineColor;
            }
            else if ( *v16 == 2 )
            {
              *(_DWORD *)v17 = 16712191;
            }
            v17 += 4;
            ++v16;
            --v19;
          }
          while ( v19 );
          v17 = &v17[(_DWORD)v31];
          --v18;
        }
        while ( v18 );
        v20 = v1->m_kTextRect.left;
        v21 = (char *)kLockRectSrc.pBits + 4 * v20 + kLockRectSrc.Pitch * (v1->m_kTextRect.top - 2);
        v31 = (char *)(v1->m_kTextRect.right - v20 + 1);
        memset32(v21, dwLineColor, (unsigned int)v31);
        v22 = v1->m_kTextRect.left;
        v23 = v1->m_kTextRect.right - v22 + 1;
        v31 = (char *)kLockRectSrc.pBits + 4 * v22 + kLockRectSrc.Pitch * (v1->m_kTextRect.bottom + 2);
        memset32(v31, dwLineColor, v23);
        v24 = kLockRectSrc.Pitch;
        v25 = (char *)kLockRectSrc.pBits + 4 * v1->m_kTextRect.left + kLockRectSrc.Pitch * v1->m_kTextRect.top - 8;
        v26 = v1->m_kTextRect.bottom - v1->m_kTextRect.top + 1;
        if ( v1->m_kTextRect.bottom - v1->m_kTextRect.top != -1 )
        {
          do
          {
            *(_DWORD *)v25 = dwLineColor;
            v25 += v24;
            --v26;
          }
          while ( v26 );
          v24 = kLockRectSrc.Pitch;
        }
        v27 = (char *)kLockRectSrc.pBits + 4 * v1->m_kTextRect.right + v24 * v1->m_kTextRect.top + 8;
        v28 = v1->m_kTextRect.bottom - v1->m_kTextRect.top + 1;
        if ( v1->m_kTextRect.bottom - v1->m_kTextRect.top != -1 )
        {
          do
          {
            *(_DWORD *)v27 = dwLineColor;
            v27 += v24;
            --v28;
          }
          while ( v28 );
        }
        v1->m_lpSurSrc->lpVtbl[4].Release((IUnknown *)v1->m_lpSurSrc);
      }
    }
  }
}

//----- (00626670) --------------------------------------------------------
void __thiscall SpeechBD::CopyTexture(SpeechBD *this)
{
  SpeechBD *v1; // ebx@1
  IDirect3DSurface9 *v2; // eax@3
  int v3; // ecx@4
  IDirect3DSurface9 *v4; // eax@4
  char *v5; // edx@5
  char *v6; // esi@5
  int v7; // eax@8
  bool v8; // zf@9
  signed int v9; // edi@14
  int v10; // eax@15
  int v11; // eax@21
  int v12; // esi@21
  int v13; // eax@21
  int v14; // edx@21
  int v15; // eax@27
  int v16; // esi@27
  int v17; // eax@27
  int v18; // edx@27
  int v19; // eax@33
  int v20; // esi@33
  int v21; // eax@33
  int v22; // edx@33
  unsigned int uiSrcSkipBytes; // [sp+8h] [bp-3Ch]@5
  unsigned int uiDestSkipBytes; // [sp+Ch] [bp-38h]@5
  _D3DLOCKED_RECT kLockRectSrc; // [sp+14h] [bp-30h]@3
  unsigned int v26; // [sp+1Ch] [bp-28h]@8
  _D3DLOCKED_RECT kLockRectDest; // [sp+20h] [bp-24h]@4
  unsigned int y; // [sp+28h] [bp-1Ch]@5
  char *pTempDest; // [sp+2Ch] [bp-18h]@5
  tagRECT rc; // [sp+30h] [bp-14h]@3

  v1 = this;
  if ( this->m_lpSurSrc )
  {
    if ( this->m_lpSurDest )
    {
      v2 = this->m_lpSurSrc;
      rc.left = 0;
      rc.top = 0;
      rc.right = 148;
      rc.bottom = 81;
      if ( !((int (__stdcall *)(IDirect3DSurface9 *, _D3DLOCKED_RECT *, tagRECT *, _DWORD))v2->lpVtbl[4].AddRef)(
              v2,
              &kLockRectSrc,
              &rc,
              0) )
      {
        v3 = v1->m_uiTextureYPos;
        rc.left = v1->m_uiTextureXPos;
        rc.top = v3;
        rc.right = rc.left + 148;
        v4 = v1->m_lpSurDest;
        rc.bottom = v3 + 81;
        if ( !((int (__stdcall *)(IDirect3DSurface9 *, _D3DLOCKED_RECT *, tagRECT *, _DWORD))v4->lpVtbl[4].AddRef)(
                v4,
                &kLockRectDest,
                &rc,
                0) )
        {
          v5 = (char *)kLockRectDest.pBits;
          v6 = (char *)kLockRectSrc.pBits;
          uiDestSkipBytes = kLockRectDest.Pitch - 592;
          uiSrcSkipBytes = kLockRectSrc.Pitch - 592;
          pTempDest = (char *)kLockRectDest.pBits;
          y = 81;
          do
          {
            memset(pTempDest, 0, 0x250u);
            pTempDest += kLockRectDest.Pitch;
            --y;
          }
          while ( y );
          pTempDest = &v5[4 * v1->m_kTextRect.left] + kLockRectDest.Pitch * (v1->m_kTextRect.top - 3);
          y = 4;
          do
          {
            v26 = v1->m_uiTextWidth;
            memset32(pTempDest, 2147483648, v26);
            v7 = kLockRectDest.Pitch;
            pTempDest += kLockRectDest.Pitch;
            --y;
          }
          while ( y );
          v8 = v1->m_uiTextHeight == 0;
          pTempDest = &v5[4 * v1->m_kTextRect.left - 12] + kLockRectDest.Pitch * (v1->m_kTextRect.top + 1);
          y = 0;
          if ( !v8 )
          {
            do
            {
              v26 = v1->m_uiTextWidth + 7;
              memset32(pTempDest, 2147483648, v26);
              v7 = kLockRectDest.Pitch;
              pTempDest += kLockRectDest.Pitch;
              ++y;
            }
            while ( y < v1->m_uiTextHeight );
          }
          pTempDest = &v5[4 * v1->m_kTextRect.left] + v7 * v1->m_kTextRect.bottom;
          y = 4;
          do
          {
            v26 = v1->m_uiTextWidth;
            memset32(pTempDest, 2147483648, v26);
            pTempDest += kLockRectDest.Pitch;
            --y;
          }
          while ( y );
          y = 81;
          while ( 1 )
          {
            v9 = 37;
            do
            {
              v10 = *(_DWORD *)v6 & 0xFFFFFF;
              if ( v10 == 16712191 )
              {
                *(_DWORD *)v5 = 2147483648;
                v5[3] = -128;
                goto LABEL_21;
              }
              if ( v10 != v1->m_dwOutLineColor )
              {
                if ( v10 == 16711935 )
                  goto LABEL_21;
                v10 = v1->m_dwTextColor;
              }
              *(_DWORD *)v5 = v10;
              v5[3] = -1;
LABEL_21:
              v11 = *((_DWORD *)v6 + 1);
              v12 = (int)(v6 + 4);
              v13 = v11 & 0xFFFFFF;
              v14 = (int)(v5 + 4);
              if ( v13 == 16712191 )
              {
                *(_DWORD *)v14 = 2147483648;
                *(_BYTE *)(v14 + 3) = -128;
                goto LABEL_27;
              }
              if ( v13 != v1->m_dwOutLineColor )
              {
                if ( v13 == 16711935 )
                  goto LABEL_27;
                v13 = v1->m_dwTextColor;
              }
              *(_DWORD *)v14 = v13;
              *(_BYTE *)(v14 + 3) = -1;
LABEL_27:
              v15 = *(_DWORD *)(v12 + 4);
              v16 = v12 + 4;
              v17 = v15 & 0xFFFFFF;
              v18 = v14 + 4;
              if ( v17 == 16712191 )
              {
                *(_DWORD *)v18 = 2147483648;
                *(_BYTE *)(v18 + 3) = -128;
                goto LABEL_33;
              }
              if ( v17 != v1->m_dwOutLineColor )
              {
                if ( v17 == 16711935 )
                  goto LABEL_33;
                v17 = v1->m_dwTextColor;
              }
              *(_DWORD *)v18 = v17;
              *(_BYTE *)(v18 + 3) = -1;
LABEL_33:
              v19 = *(_DWORD *)(v16 + 4);
              v20 = v16 + 4;
              v21 = v19 & 0xFFFFFF;
              v22 = v18 + 4;
              if ( v21 == 16712191 )
              {
                *(_DWORD *)v22 = 2147483648;
                *(_BYTE *)(v22 + 3) = -128;
                goto LABEL_39;
              }
              if ( v21 != v1->m_dwOutLineColor )
              {
                if ( v21 == 16711935 )
                  goto LABEL_39;
                v21 = v1->m_dwTextColor;
              }
              *(_DWORD *)v22 = v21;
              *(_BYTE *)(v22 + 3) = -1;
LABEL_39:
              v5 = (char *)(v22 + 4);
              v6 = (char *)(v20 + 4);
              --v9;
            }
            while ( v9 );
            v5 += uiDestSkipBytes;
            v6 += uiSrcSkipBytes;
            if ( !--y )
            {
              v1->m_lpSurDest->lpVtbl[4].Release((IUnknown *)v1->m_lpSurDest);
              v1->m_lpSurSrc->lpVtbl[4].Release((IUnknown *)v1->m_lpSurSrc);
              return;
            }
          }
        }
      }
    }
  }
}

//----- (00626950) --------------------------------------------------------
void __thiscall SpeechBD::~SpeechBD(SpeechBD *this)
{
  SpeechBD *v1; // esi@1
  NiScreenElements *v2; // edi@1
  NiScreenElements *v3; // esi@6

  v1 = this;
  this->vfptr = (SpeechBDVtbl *)&SpeechBD::`vftable';
  v2 = this->m_spScreenGeom.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spScreenGeom.m_pObject = 0;
  }
  operator delete[](v1->m_pcSpeech);
  v3 = v1->m_spScreenGeom.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
  {
    if ( v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  }
}
// 9B7164: using guessed type int (__thiscall *SpeechBD::`vftable')(void *p, char);

//----- (00626A00) --------------------------------------------------------
void __userpurge SpeechBD::Update(SpeechBD *this@<ecx>, int a2@<ebx>, float fTime, NiCamera *pkWorldCamera, PgWinCamera *pkScreenCamera)
{
  SpeechBD *v5; // esi@1
  Char *v6; // eax@1
  Char *v7; // edi@1
  int v8; // eax@2
  float CharLengthvector; // ST28_4@2
  float CharLengthvector_4; // ST2C_4@2
  float CharLengthvector_8; // ST30_4@2
  double v12; // st7@2
  double v13; // st6@4
  NiProperty *v14; // eax@5
  double v15; // st7@5
  _BYTE v16[12]; // ST0C_12@11
  float fScreenHeight; // ST08_4@11
  NiCamera *v18; // ebx@11
  float fScreenWidth; // ST04_4@11
  float v20; // ST28_4@16
  float v21; // ST2C_4@16
  float v22; // ST30_4@16
  NiCamera **v23; // eax@16
  bool v24; // zf@18
  NiPoint3 kWorldPos; // [sp+30h] [bp-20h]@11
  NiPoint3 k2DOrthoPos; // [sp+3Ch] [bp-14h]@11
  float AddPos; // [sp+48h] [bp-8h]@2
  float fDistance; // [sp+4Ch] [bp-4h]@2

  v5 = this;
  v6 = CharMgr::GetChar(&g_kCharMgr, this->m_kCharHandle);
  v7 = v6;
  if ( !v6
    || (v8 = ((int (__thiscall *)(Char *))v6->vfptr[6].Deaffect)(v6),
        CharLengthvector = ::pkWorldCamera->m_kLocal.m_Translate.x - *(float *)v8,
        CharLengthvector_4 = ::pkWorldCamera->m_kLocal.m_Translate.y - *(float *)(v8 + 4),
        CharLengthvector_8 = ::pkWorldCamera->m_kLocal.m_Translate.z - *(float *)(v8 + 8),
        AddPos = CharLengthvector_4 * CharLengthvector_4
               + CharLengthvector * CharLengthvector
               + CharLengthvector_8 * CharLengthvector_8,
        AddPos = sqrt(AddPos),
        fDistance = AddPos,
        v12 = AddPos,
        AddPos > (double)SpeechBD::ms_fMaxDistance) )
  {
    v5->m_bAlive = 0;
    return;
  }
  v13 = SpeechBD::ms_fTransNear;
  if ( SpeechBD::ms_fTransNear <= v12 )
  {
    if ( SpeechBD::ms_fTransFar >= v12 )
    {
      fDistance = v12 - v13;
      AddPos = SpeechBD::ms_fTransFar - v13;
      if ( 0.0 == AddPos )
        goto LABEL_11;
      v14 = NiAVObject::GetProperty((NiAVObject *)&v5->m_spScreenGeom.m_pObject->vfptr, 3);
      v15 = 1.0 - fDistance / AddPos;
    }
    else
    {
      v14 = NiAVObject::GetProperty((NiAVObject *)&v5->m_spScreenGeom.m_pObject->vfptr, 3);
      v15 = 0.0;
    }
  }
  else
  {
    v14 = NiAVObject::GetProperty((NiAVObject *)&v5->m_spScreenGeom.m_pObject->vfptr, 3);
    v15 = 1.0;
  }
  ++v14[3].m_uiRefCount;
  *(float *)&v14[3].vfptr = v15;
LABEL_11:
  Char::GetHeightPos(v7, a2, &kWorldPos);
  kWorldPos.z = kWorldPos.z + 3.0;
  *(float *)v16 = kWorldPos.x;
  *(_QWORD *)&v16[4] = *(_QWORD *)&kWorldPos.y;
  fScreenHeight = (double)PgWin::ms_uiScreenHeight;
  v18 = pkWorldCamera;
  fScreenWidth = (double)PgWin::ms_uiScreenWidth;
  if ( PgUtil::Get2DOrthoPosFrom3DPos(pkWorldCamera, fScreenWidth, fScreenHeight, *(NiPoint3 *)v16, &k2DOrthoPos) )
  {
    v5->m_spScreenGeom.m_pObject->m_uFlags &= 0xFFFEu;
    k2DOrthoPos.x = k2DOrthoPos.x - 74.0;
    k2DOrthoPos.y = k2DOrthoPos.y - 104.0;
    if ( v7->m_dwGuildRegNum )
      k2DOrthoPos.y = k2DOrthoPos.y - 21.0;
    if ( byte_B4FF93 == 1 )
    {
      v20 = v18->m_kWorld.m_Translate.x - kWorldPos.x;
      v21 = v18->m_kWorld.m_Translate.y - kWorldPos.y;
      v22 = v18->m_kWorld.m_Translate.z - kWorldPos.z;
      *(float *)&pkWorldCamera = v21 * v21 + v20 * v20 + v22 * v22;
      *(float *)&pkWorldCamera = sqrt(*(float *)&pkWorldCamera);
      *(float *)&pkWorldCamera = *(float *)&pkWorldCamera / (double)StandLength_0;
      AddPos = 0.69999999;
      v23 = &pkWorldCamera;
      if ( *(float *)&pkWorldCamera >= 0.69999999 )
        v23 = (NiCamera **)&AddPos;
      v24 = v7->m_dwGuildRegNum == 0;
      pkWorldCamera = *v23;
      AddPos = 40.0;
      if ( !v24 )
        AddPos = 60.0;
      k2DOrthoPos.y = k2DOrthoPos.y - (1.0 - *(float *)&pkWorldCamera) * AddPos;
    }
    v5->m_spScreenGeom.m_pObject->m_kLocal.m_Translate = k2DOrthoPos;
    NiAVObject::Update((NiAVObject *)&v5->m_spScreenGeom.m_pObject->vfptr, fTime, 1);
  }
  else
  {
    v5->m_spScreenGeom.m_pObject->m_uFlags |= 1u;
  }
}
// A734F8: using guessed type float SpeechBD::ms_fMaxDistance;
// A734FC: using guessed type float SpeechBD::ms_fTransNear;
// A73500: using guessed type float SpeechBD::ms_fTransFar;
// B4FF93: using guessed type char byte_B4FF93;

//----- (00626CC0) --------------------------------------------------------
void __userpurge SpeechBD::SetSpeech(SpeechBD *this@<ecx>, void **a2@<edi>, char *pcSpeech)
{
  SpeechBD *v3; // esi@1
  unsigned int v4; // kr00_4@3
  char *v5; // edx@8
  char *v6; // ecx@8
  char v7; // al@9
  IDirect3DSurface9 *v8; // eax@11
  IDirect3DSurface9 *v9; // esi@13
  char *v10; // eax@15

  v3 = this;
  if ( pcSpeech && *pcSpeech )
  {
    v4 = strlen(pcSpeech);
    if ( v3->m_uiSpeechLen < v4 )
    {
      operator delete[](v3->m_pcSpeech);
      v3->m_pcSpeech = (char *)operator new[](v4 + 1);
      v3->m_uiSpeechLen = v4;
    }
    if ( g_pkMainChar->m_kAbStateProperty.iCantChatStateCount > 0 && v4 )
      memset(pcSpeech, 32, v4);
    v5 = v3->m_pcSpeech;
    v6 = pcSpeech;
    do
    {
      v7 = *v6;
      *v5++ = *v6++;
    }
    while ( v7 );
    if ( SpeechBD::BeginDraw(v3) )
    {
      SpeechBD::CalculateLine(v3);
      SpeechBD::DrawFrame(v3);
      SpeechBD::DrawTextA(v3, a2);
      SpeechBD::CopyTexture(v3);
      v8 = v3->m_lpSurSrc;
      if ( v8 )
        v8->lpVtbl->Release((IUnknown *)v3->m_lpSurSrc);
      v9 = v3->m_lpSurDest;
      if ( v9 )
        v9->lpVtbl->Release((IUnknown *)v9);
    }
  }
  else
  {
    v10 = this->m_pcSpeech;
    if ( v10 )
    {
      *v10 = 0;
      this->m_uiTotalLine = 0;
    }
  }
}
// 626CC0: could not find valid save-restore pair for edi

//----- (00626DA0) --------------------------------------------------------
void __thiscall SpeechBD::SetOutLineColorID(SpeechBD *this, char kColorID)
{
  SpeechBD *v2; // ebx@1
  ChatColor *v3; // eax@2
  D3DXCOLOR *v4; // ecx@3
  signed int v5; // edi@4
  double v6; // st4@8
  double v7; // st7@8
  signed int v8; // esi@9
  signed int v9; // edx@15
  double v10; // rtt@16
  double v11; // st4@16
  double v12; // st7@16
  double v13; // rt0@19
  signed int v14; // eax@21
  D3DXCOLOR result; // [sp+4h] [bp-18h]@3
  __int64 v16; // [sp+14h] [bp-8h]@7

  v2 = this;
  if ( kColorID )
  {
    v3 = ChatColorTab::GetByID(kColorID);
    if ( v3 )
    {
      v4 = Color::GetDxColor(&result, v3->ColorR, v3->ColorG, v3->ColorB, -1);
      if ( v4->r < 1.0 )
      {
        if ( v4->r > 0.0 )
        {
          v16 = (signed __int64)(v4->r * 255.0 + 0.5);
          v5 = v16;
        }
        else
        {
          v5 = 0;
        }
      }
      else
      {
        v5 = 255;
      }
      v6 = 1.0;
      v7 = 0.0;
      if ( v4->g < 1.0 )
      {
        if ( v4->g > 0.0 )
        {
          v16 = (signed __int64)(v4->g * 255.0 + 0.5);
          v8 = v16;
        }
        else
        {
          v8 = 0;
        }
        v6 = 1.0;
        v7 = 0.0;
      }
      else
      {
        v8 = 255;
      }
      if ( v6 > v4->b )
      {
        v10 = v6;
        v11 = v7;
        v12 = v10;
        if ( v11 < v4->b )
        {
          v16 = (signed __int64)(v4->b * 255.0 + 0.5);
          v9 = v16;
        }
        else
        {
          v9 = 0;
        }
        v13 = v11;
        v6 = v12;
        v7 = v13;
      }
      else
      {
        v9 = 255;
      }
      if ( v6 > v4->a )
      {
        if ( v7 < v4->a )
        {
          v16 = (signed __int64)(255.0 * v4->a + 0.5);
          v14 = v16;
        }
        else
        {
          v14 = 0;
        }
      }
      else
      {
        v14 = 255;
      }
      v2->m_dwOutLineColor = v9 | ((v8 | ((v5 | (v14 << 8)) << 8)) << 8);
    }
  }
}

//----- (00626F30) --------------------------------------------------------
void __thiscall SpeechBD::SetTextColorID(SpeechBD *this, char kColorID)
{
  SpeechBD *v2; // ebx@1
  ChatColor *v3; // eax@2
  D3DXCOLOR *v4; // ecx@3
  signed int v5; // edi@4
  double v6; // st4@8
  double v7; // st7@8
  signed int v8; // esi@9
  signed int v9; // edx@15
  double v10; // rtt@16
  double v11; // st4@16
  double v12; // st7@16
  double v13; // rt0@19
  signed int v14; // eax@21
  D3DXCOLOR result; // [sp+4h] [bp-18h]@3
  __int64 v16; // [sp+14h] [bp-8h]@7

  v2 = this;
  if ( kColorID )
  {
    v3 = ChatColorTab::GetByID(kColorID);
    if ( v3 )
    {
      v4 = Color::GetDxColor(&result, v3->ColorR, v3->ColorG, v3->ColorB, -1);
      if ( v4->r < 1.0 )
      {
        if ( v4->r > 0.0 )
        {
          v16 = (signed __int64)(v4->r * 255.0 + 0.5);
          v5 = v16;
        }
        else
        {
          v5 = 0;
        }
      }
      else
      {
        v5 = 255;
      }
      v6 = 1.0;
      v7 = 0.0;
      if ( v4->g < 1.0 )
      {
        if ( v4->g > 0.0 )
        {
          v16 = (signed __int64)(v4->g * 255.0 + 0.5);
          v8 = v16;
        }
        else
        {
          v8 = 0;
        }
        v6 = 1.0;
        v7 = 0.0;
      }
      else
      {
        v8 = 255;
      }
      if ( v6 > v4->b )
      {
        v10 = v6;
        v11 = v7;
        v12 = v10;
        if ( v11 < v4->b )
        {
          v16 = (signed __int64)(v4->b * 255.0 + 0.5);
          v9 = v16;
        }
        else
        {
          v9 = 0;
        }
        v13 = v11;
        v6 = v12;
        v7 = v13;
      }
      else
      {
        v9 = 255;
      }
      if ( v6 > v4->a )
      {
        if ( v7 < v4->a )
        {
          v16 = (signed __int64)(255.0 * v4->a + 0.5);
          v14 = v16;
        }
        else
        {
          v14 = 0;
        }
      }
      else
      {
        v14 = 255;
      }
      v2->m_dwTextColor = v9 | ((v8 | ((v5 | (v14 << 8)) << 8)) << 8);
    }
  }
}

//----- (006270C0) --------------------------------------------------------
void __thiscall SpeechBD::CreateGeometry(SpeechBD *this, NiTexture *pkTexture, int iTexturePosIndex)
{
  SpeechBD *v3; // esi@1
  NiTexture *v4; // edi@1
  unsigned int v5; // ebx@1
  unsigned int v6; // eax@1
  unsigned int v7; // ecx@1
  NiTexture *v8; // ST08_4@1
  NiScreenElementsData *v9; // ebx@1
  NiTexture *v10; // eax@1
  NiTexture *v11; // eax@2
  NiTexture *v12; // ebx@4
  NiTexture *v13; // eax@12
  int v14; // eax@13
  int v15; // ebx@13
  NiTexture *v16; // eax@17
  int v17; // eax@18
  int v18; // edi@18

  v3 = this;
  v4 = pkTexture;
  v5 = ((int (__thiscall *)(NiTexture *))pkTexture->vfptr[15].__vecDelDtor)(pkTexture);
  pkTexture = (NiTexture *)((int (__thiscall *)(NiTexture *))v4->vfptr[16].__vecDelDtor)(v4);
  v6 = 81 * (iTexturePosIndex / (v5 / 0x94));
  v7 = 148 * (iTexturePosIndex % (v5 / 0x94));
  v3->m_uiTextureYPos = v6;
  v8 = pkTexture;
  v3->m_uiTextureXPos = v7;
  v9 = PgUtil::CreateScreenGeometryData(v5, (unsigned int)v8, v7, v6, 0x94u, 0x51u);
  v3->m_pkTexture = v4;
  v10 = (NiTexture *)operator new(0xC4u);
  pkTexture = v10;
  if ( v10 )
  {
    NiScreenElements::NiScreenElements((NiScreenElements *)v10, v9);
    pkTexture = v11;
  }
  else
  {
    pkTexture = 0;
    v11 = 0;
  }
  v12 = (NiTexture *)v3->m_spScreenGeom.m_pObject;
  if ( v12 != v11 )
  {
    if ( v12 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
        v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
      v11 = pkTexture;
    }
    v3->m_spScreenGeom.m_pObject = (NiScreenElements *)v11;
    if ( v11 )
      InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
  }
  v13 = (NiTexture *)operator new(0x44u);
  pkTexture = v13;
  if ( v13 )
  {
    NiTexturingProperty::NiTexturingProperty((NiTexturingProperty *)v13);
    v15 = v14;
  }
  else
  {
    v15 = 0;
  }
  NiTexturingProperty::SetBaseTexture((NiTexturingProperty *)v15, v4);
  NiTexturingProperty::SetBaseFilterMode((NiTexturingProperty *)v15, 0);
  *(_DWORD *)(v15 + 28) = 2;
  iTexturePosIndex = (int)v3->m_spScreenGeom.m_pObject;
  pkTexture = (NiTexture *)v15;
  InterlockedIncrement((volatile LONG *)(v15 + 4));
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(iTexturePosIndex + 156),
    (NiPointer<NiRoom> *)&pkTexture);
  if ( !InterlockedDecrement((volatile LONG *)(v15 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v15)(v15, 1);
  v16 = (NiTexture *)operator new(0x60u);
  pkTexture = v16;
  if ( v16 )
  {
    NiMaterialProperty::NiMaterialProperty((NiMaterialProperty *)v16);
    v18 = v17;
  }
  else
  {
    v18 = 0;
  }
  ++*(_DWORD *)(v18 + 88);
  *(float *)(v18 + 68) = 1.0;
  *(float *)(v18 + 72) = 1.0;
  *(float *)(v18 + 76) = 1.0;
  iTexturePosIndex = (int)v3->m_spScreenGeom.m_pObject;
  pkTexture = (NiTexture *)v18;
  InterlockedIncrement((volatile LONG *)(v18 + 4));
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(iTexturePosIndex + 156),
    (NiPointer<NiRoom> *)&pkTexture);
  if ( !InterlockedDecrement((volatile LONG *)(v18 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v18)(v18, 1);
  NiAVObject::UpdateProperties((NiAVObject *)&v3->m_spScreenGeom.m_pObject->vfptr);
  NiAVObject::Update((NiAVObject *)&v3->m_spScreenGeom.m_pObject->vfptr, 0.0, 0);
  v3->m_spScreenGeom.m_pObject->m_uFlags |= 1u;
}

//----- (00627300) --------------------------------------------------------
void __thiscall SpeechBD::SpeechBD(SpeechBD *this, NiTexture *pkTexture, int iTexturePosIndex)
{
  SpeechBD *v3; // esi@1
  signed int v4; // edi@1
  D3DXCOLOR *v5; // eax@3
  signed int v6; // ebx@4
  double v7; // st4@8
  double v8; // st7@8
  signed int v9; // edx@14
  double v10; // rtt@15
  double v11; // st4@15
  double v12; // st7@15
  double v13; // rt0@18
  signed int v14; // eax@20
  D3DXCOLOR *v15; // ecx@24
  double v16; // st6@25
  signed int v17; // ebx@25
  double v18; // st5@25
  double v19; // st4@25
  double v20; // st5@27
  double v21; // st4@27
  double v22; // rtt@29
  double v23; // st4@29
  double v24; // rt0@29
  double v25; // rt1@30
  double v26; // st4@30
  double v27; // st7@30
  signed int v28; // edi@31
  signed int v29; // edx@37
  double v30; // rt0@38
  double v31; // st4@38
  double v32; // st7@38
  double v33; // rt1@41
  signed int v34; // eax@43
  double v35; // rt2@44
  double v36; // st5@44
  double v37; // st7@44
  D3DXCOLOR result; // [sp+10h] [bp-28h]@3
  __int64 v39; // [sp+20h] [bp-18h]@7
  SpeechBD *v40; // [sp+28h] [bp-10h]@1
  int v41; // [sp+34h] [bp-4h]@1

  v3 = this;
  v40 = this;
  v4 = 0;
  this->vfptr = (SpeechBDVtbl *)&SpeechBD::`vftable';
  this->m_spScreenGeom.m_pObject = 0;
  this->m_fStartTime = 0.0;
  this->m_kCharHandle = -1;
  v41 = 0;
  this->m_bAlive = 1;
  this->m_pcSpeech = 0;
  this->m_uiSpeechLen = 0;
  this->m_iTextureIndex = iTexturePosIndex;
  if ( pkTexture )
    SpeechBD::CreateGeometry(this, pkTexture, iTexturePosIndex);
  v3->m_fLifeTime = 8.0;
  v5 = Color::GetDxColor(&result, -31, -1, -1, -1);
  if ( v5->r < 1.0 )
  {
    if ( v5->r > 0.0 )
    {
      v39 = (signed __int64)(v5->r * 255.0 + 0.5);
      v6 = v39;
    }
    else
    {
      v6 = 0;
    }
  }
  else
  {
    v6 = 255;
  }
  v7 = 1.0;
  v8 = 0.0;
  if ( v5->g < 1.0 )
  {
    if ( v5->g > 0.0 )
    {
      v39 = (signed __int64)(v5->g * 255.0 + 0.5);
      v4 = v39;
    }
    v7 = 1.0;
    v8 = 0.0;
  }
  else
  {
    v4 = 255;
  }
  if ( v7 > v5->b )
  {
    v10 = v7;
    v11 = v8;
    v12 = v10;
    if ( v11 < v5->b )
    {
      v39 = (signed __int64)(v5->b * 255.0 + 0.5);
      v9 = v39;
    }
    else
    {
      v9 = 0;
    }
    v13 = v11;
    v7 = v12;
    v8 = v13;
  }
  else
  {
    v9 = 255;
  }
  if ( v7 > v5->a )
  {
    if ( v8 < v5->a )
    {
      v39 = (signed __int64)(255.0 * v5->a + 0.5);
      v14 = v39;
    }
    else
    {
      v14 = 0;
    }
  }
  else
  {
    v14 = 255;
  }
  v3->m_dwOutLineColor = v9 | ((v4 | ((v6 | (v14 << 8)) << 8)) << 8);
  v15 = Color::GetDxColor(&result, -28, -38, -78, -1);
  if ( v15->r < 1.0 )
  {
    if ( v15->r > 0.0 )
    {
      v21 = 255.0;
      v20 = 0.5;
      v39 = (signed __int64)(v15->r * 255.0 + 0.5);
      v17 = v39;
    }
    else
    {
      v20 = 0.5;
      v17 = 0;
      v21 = 255.0;
    }
    v22 = v21;
    v23 = v20;
    v18 = v22;
    v24 = v23;
    v19 = 0.0;
    v16 = v24;
  }
  else
  {
    v16 = 0.5;
    v17 = 255;
    v18 = 255.0;
    v19 = 0.0;
  }
  v25 = v19;
  v26 = 1.0;
  v27 = v25;
  if ( v15->g < 1.0 )
  {
    if ( v27 < v15->g )
    {
      v39 = (signed __int64)(v15->g * v18 + v16);
      v28 = v39;
    }
    else
    {
      v28 = 0;
    }
    v26 = 1.0;
  }
  else
  {
    v28 = 255;
  }
  if ( v26 > v15->b )
  {
    v30 = v26;
    v31 = v27;
    v32 = v30;
    if ( v31 < v15->b )
    {
      v39 = (signed __int64)(v15->b * v18 + v16);
      v29 = v39;
    }
    else
    {
      v29 = 0;
    }
    v33 = v31;
    v26 = v32;
    v27 = v33;
  }
  else
  {
    v29 = 255;
  }
  if ( v26 > v15->a )
  {
    v35 = v18;
    v36 = v27;
    v37 = v35;
    if ( v36 < v15->a )
    {
      v39 = (signed __int64)(v37 * v15->a + v16);
      v34 = v39;
    }
    else
    {
      v34 = 0;
    }
  }
  else
  {
    v34 = 255;
  }
  v3->m_dwTextColor = v29 | ((v28 | ((v17 | (v34 << 8)) << 8)) << 8);
}
// 9B7164: using guessed type int (__thiscall *SpeechBD::`vftable')(void *p, char);

//----- (00627660) --------------------------------------------------------
SpeechBD *__thiscall SpeechBD::`vector deleting destructor'(SpeechBD *this, unsigned int a2)
{
  SpeechBD *v2; // esi@1

  v2 = this;
  SpeechBD::~SpeechBD(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00627690) --------------------------------------------------------
void __thiscall GMCommandWin::GMCommandWin(GMCommandWin *this)
{
  GMCommandWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GMCommandWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GMCommandWin::`vftable'{for `IDirectMessenger'};
}
// 9B7238: using guessed type void (__thiscall *GMCommandWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B7254: using guessed type int (__thiscall *GMCommandWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006276B0) --------------------------------------------------------
void __thiscall GMCommandWin::~GMCommandWin(GMCommandWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GMCommandWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GMCommandWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9B7238: using guessed type void (__thiscall *GMCommandWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B7254: using guessed type int (__thiscall *GMCommandWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006276F0) --------------------------------------------------------
char __thiscall GMCommandWin::Create(GMCommandWin *this, PgFrameWork *pkFrameWork)
{
  GMCommandWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  char result; // al@9
  int v8; // edi@10
  PgSprData *v9; // eax@10
  PgSprData *v10; // ebx@10
  NiNode *v11; // esi@11
  PgFont *v12; // eax@16
  PgWinText *v13; // ebx@16
  PgSprData *v14; // ebx@16
  PgSprData::PgHitTester *v15; // eax@16
  unsigned int v16; // ebx@16
  PgFont *v17; // eax@16
  PgWinText *v18; // ebx@16
  PgSprData *v19; // ebx@16
  PgSprData::PgHitTester *v20; // eax@16
  unsigned int v21; // ebx@16
  PgFont *v22; // eax@16
  PgWinText *v23; // ebx@16
  PgSprData *v24; // ebx@16
  PgSprData::PgHitTester *v25; // eax@16
  unsigned int v26; // ebx@16
  PgFont *v27; // eax@16
  PgWinText *v28; // ebx@16
  NiUnsharedGeometryGroup *v29; // eax@16
  PgSprData *v30; // ebx@16
  PgSprData::PgHitTester *v31; // eax@16
  unsigned int v32; // ebx@16
  PgFont *v33; // eax@16
  PgWinText *v34; // edi@16
  NiNode *v35; // esi@17
  unsigned int uiWidth; // [sp+58h] [bp-20h]@10
  unsigned int uiHeight; // [sp+5Ch] [bp-1Ch]@10
  NiPointer<NiNode> spNode; // [sp+60h] [bp-18h]@1
  int uiLeft; // [sp+64h] [bp-14h]@4
  int uiTop; // [sp+68h] [bp-10h]@4
  int v41; // [sp+74h] [bp-4h]@1
  int iYOff; // [sp+80h] [bp+8h]@10
  int iYOffa; // [sp+80h] [bp+8h]@16
  int iYOffb; // [sp+80h] [bp+8h]@16
  int iYOffc; // [sp+80h] [bp+8h]@16
  int iYOffd; // [sp+80h] [bp+8h]@16
  int iYOffe; // [sp+80h] [bp+8h]@16

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v41 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\GMCommand.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "GMCommandWin", 0) )
  {
    v6 = spNode.m_pObject;
    v41 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = uiLeft;
  iYOff = uiTop;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop, v9, (PgWin *)&v2->vfptr, 0, 0);
  v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v10, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(v10, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinCloseBut::CreateWin(uiLeft - v8, uiTop - iYOff, v10, (PgWin *)&v2->vfptr);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v12 = Font::Get(0);
    v13 = PgWinText::CreateWin(uiLeft - v8, uiTop, uiWidth, uiHeight, v12, (PgWin *)&v2->vfptr, 0, 0);
    v13->vfptr[122].__vecDelDtor((NiRefObject *)v13, 1u);
    v13->vfptr[117].__vecDelDtor((NiRefObject *)v13, (unsigned int)&Color::m_kDxWinTitleColor);
    v13->vfptr[118].__vecDelDtor((NiRefObject *)v13, (unsigned int)"GM¸í·É¾î");
    v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Nor", &uiLeft, &uiTop, 0);
    PgWinBut::CreateWin(uiLeft - v8, uiTop, v14, (PgWin *)&v2->vfptr, 1u, 0, 0);
    v15 = v14->m_akHitTester.m_pBase->m_pObject;
    v16 = v15->m_uiHeight;
    iYOffa = v15->m_uiWidth;
    v17 = Font::Get(0);
    v18 = PgWinText::CreateWin(uiLeft - v8, uiTop + 1, iYOffa, v16, v17, (PgWin *)&v2->vfptr, 0, 0);
    v18->vfptr[122].__vecDelDtor((NiRefObject *)v18, 5u);
    v18->vfptr[118].__vecDelDtor((NiRefObject *)v18, (unsigned int)&unk_9B71F0);
    v18->vfptr[60].__vecDelDtor((NiRefObject *)v18, 0);
    v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Nor", &uiLeft, &uiTop, 0);
    PgWinBut::CreateWin(uiLeft - v8, uiTop, v19, (PgWin *)&v2->vfptr, 2u, 0, 0);
    v20 = v19->m_akHitTester.m_pBase->m_pObject;
    v21 = v20->m_uiHeight;
    iYOffb = v20->m_uiWidth;
    v22 = Font::Get(0);
    v23 = PgWinText::CreateWin(uiLeft - v8, uiTop + 1, iYOffb, v21, v22, (PgWin *)&v2->vfptr, 0, 0);
    v23->vfptr[122].__vecDelDtor((NiRefObject *)v23, 5u);
    v23->vfptr[118].__vecDelDtor((NiRefObject *)v23, (unsigned int)&unk_9B7204);
    v23->vfptr[60].__vecDelDtor((NiRefObject *)v23, 0);
    v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Nor", &uiLeft, &uiTop, 0);
    PgWinBut::CreateWin(uiLeft - v8, uiTop, v24, (PgWin *)&v2->vfptr, 3u, 0, 0);
    v25 = v24->m_akHitTester.m_pBase->m_pObject;
    v26 = v25->m_uiHeight;
    iYOffc = v25->m_uiWidth;
    v27 = Font::Get(0);
    v28 = PgWinText::CreateWin(uiLeft - v8, uiTop + 1, iYOffc, v26, v27, (PgWin *)&v2->vfptr, 0, 0);
    v28->vfptr[122].__vecDelDtor((NiRefObject *)v28, 5u);
    iYOffd = (int)v28->vfptr;
    v29 = TextData::Get(0x33414E85u);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(iYOffd + 472))(v28, v29);
    v28->vfptr[60].__vecDelDtor((NiRefObject *)v28, 0);
    v30 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn04Nor", &uiLeft, &uiTop, 0);
    PgWinBut::CreateWin(uiLeft - v8, uiTop, v30, (PgWin *)&v2->vfptr, 4u, 0, 0);
    v31 = v30->m_akHitTester.m_pBase->m_pObject;
    v32 = v31->m_uiHeight;
    iYOffe = v31->m_uiWidth;
    v33 = Font::Get(0);
    v34 = PgWinText::CreateWin(uiLeft - v8, uiTop + 1, iYOffe, v32, v33, (PgWin *)&v2->vfptr, 0, 0);
    v34->vfptr[122].__vecDelDtor((NiRefObject *)v34, 5u);
    v34->vfptr[118].__vecDelDtor((NiRefObject *)v34, (unsigned int)&unk_9B7228);
    v34->vfptr[60].__vecDelDtor((NiRefObject *)v34, 0);
    ((void (__thiscall *)(GMCommandWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      1.0,
      0.5);
    v41 = -1;
    if ( spNode.m_pObject )
    {
      v35 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v35 )
          v35->vfptr->__vecDelDtor((NiRefObject *)v35, 1u);
      }
    }
    result = 1;
  }
  else
  {
    v11 = spNode.m_pObject;
    v41 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v11 )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00627C00) --------------------------------------------------------
GMCommandWin *__cdecl GMCommandWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  GMCommandWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x158u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&GMCommandWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&GMCommandWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (GMCommandWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9B7238: using guessed type void (__thiscall *GMCommandWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B7254: using guessed type int (__thiscall *GMCommandWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00627D40) --------------------------------------------------------
GMCommandWin *__thiscall GMCommandWin::`scalar deleting destructor'(GMCommandWin *this, unsigned int a2)
{
  GMCommandWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GMCommandWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GMCommandWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B7238: using guessed type void (__thiscall *GMCommandWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B7254: using guessed type int (__thiscall *GMCommandWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00627D80) --------------------------------------------------------
void __thiscall GMPrisonWin::GMPrisonWin(GMPrisonWin *this)
{
  GMPrisonWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GMPrisonWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GMPrisonWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkCharNameInputEdit = 0;
}
// 9B7530: using guessed type void (__thiscall *GMPrisonWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B754C: using guessed type int (__thiscall *GMPrisonWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00627DB0) --------------------------------------------------------
void __thiscall GMPrisonWin::~GMPrisonWin(GMPrisonWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GMPrisonWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GMPrisonWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9B7530: using guessed type void (__thiscall *GMPrisonWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B754C: using guessed type int (__thiscall *GMPrisonWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00627DD0) --------------------------------------------------------
void __thiscall GMPrisonWin::OnCmdCancel(GMPrisonWin *this)
{
  PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
}

//----- (00627E00) --------------------------------------------------------
void __thiscall GMPrisonWin::SetCharName(GMPrisonWin *this, const char *name)
{
  if ( this->m_pkCharNameInputEdit )
    ((void (__stdcall *)(_DWORD))this->m_pkCharNameInputEdit->vfptr[116].__vecDelDtor)(name);
}

//----- (00627E40) --------------------------------------------------------
char __thiscall GMPrisonWin::Create(GMPrisonWin *this, PgFrameWork *pkFrameWork)
{
  GMPrisonWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // ebx@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  int v10; // edi@15
  int v11; // ebx@15
  PgSprData *v12; // eax@15
  PgWinSpr *v13; // eax@15
  PgFont *v14; // eax@16
  NiUnsharedGeometryGroup *v15; // eax@16
  PgFont *v16; // eax@17
  NiUnsharedGeometryGroup *v17; // eax@17
  EditWin *v18; // eax@17
  NiNode *v19; // edx@17
  PgFont *v20; // eax@20
  NiUnsharedGeometryGroup *v21; // eax@20
  PgFont *v22; // eax@21
  NiUnsharedGeometryGroup *v23; // eax@21
  EditWin *v24; // eax@21
  NiNode *v25; // edx@21
  PgSprData *v26; // eax@21
  PgSprData *v27; // eax@23
  PgWin *v28; // ST48_4@23
  PgFont *v29; // eax@23
  NiUnsharedGeometryGroup *v30; // ST4C_4@23
  PgSprData *v31; // eax@23
  PgWin *v32; // ST3C_4@23
  PgFont *v33; // eax@23
  PgWinText *v34; // edi@23
  NiRefObjectVtbl *v35; // ebx@23
  NiUnsharedGeometryGroup *v36; // eax@23
  UIUtil ui; // [sp+50h] [bp-3Ch]@17
  NiRefObjectVtbl *v38; // [sp+64h] [bp-28h]@16
  NiSourceTexture *pkTexture; // [sp+68h] [bp-24h]@1
  unsigned int uiWidth; // [sp+6Ch] [bp-20h]@15
  unsigned int uiHeight; // [sp+70h] [bp-1Ch]@15
  NiPointer<NiNode> spNode; // [sp+74h] [bp-18h]@1
  int uiLeft; // [sp+78h] [bp-14h]@11
  int uiTop; // [sp+7Ch] [bp-10h]@11
  int v45; // [sp+88h] [bp-4h]@1
  PgSprData *pkWinTxt; // [sp+94h] [bp+8h]@15
  PgWinText *pkWinTxta; // [sp+94h] [bp+8h]@16
  PgWinText *pkWinTxtb; // [sp+94h] [bp+8h]@17
  PgWinText *pkWinTxtc; // [sp+94h] [bp+8h]@20
  PgWinText *pkWinTxtd; // [sp+94h] [bp+8h]@21
  PgWinText *pkWinTxte; // [sp+94h] [bp+8h]@23

  v2 = this;
  spNode.m_pObject = 0;
  v45 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  pkTexture = v3;
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v45 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
    goto LABEL_5;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "Game\\GMArrest.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "PrivateStoreWin", 0) )
  {
    v4 = spNode.m_pObject;
    v45 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v10 = uiLeft;
  v11 = uiTop;
  pkWinTxt = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(pkWinTxt, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(pkWinTxt, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, pkWinTxt, (PgWin *)&v2->vfptr, 0xCu, 0, 0);
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
  v13 = PgWinSpr::CreateWin(uiLeft - v10, uiTop - v11, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "WinTitle",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight)
    || (v14 = Font::Get(0),
        pkWinTxta = PgWinText::CreateWin(
                      uiLeft - v10,
                      uiTop - v11 + 1,
                      uiWidth,
                      uiHeight,
                      v14,
                      (PgWin *)&v2->vfptr,
                      0,
                      0),
        pkWinTxta->vfptr[122].__vecDelDtor((NiRefObject *)pkWinTxta, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkWinTxta->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v38 = pkWinTxta->vfptr,
        v15 = TextData::Get(0x92A08DDA),
        v38[118].__vecDelDtor((NiRefObject *)pkWinTxta, (unsigned int)v15),
        ((void (__stdcall *)(_DWORD))pkWinTxta->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "ID", &uiLeft, &uiTop, &uiWidth, &uiHeight)) )
  {
LABEL_19:
    v45 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  v16 = Font::Get(0);
  pkWinTxtb = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v16, (PgWin *)&v2->vfptr, 0, 0);
  v38 = pkWinTxtb->vfptr;
  v17 = TextData::Get(0x464C888Au);
  v38[118].__vecDelDtor((NiRefObject *)pkWinTxtb, (unsigned int)v17);
  UIUtil::UIUtil(&ui);
  LOBYTE(v45) = 1;
  UIUtil::SetOffset(&ui, v10, v11 + 2);
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v18 = UIUtil::CreateEdit(&ui, "InputID", 20, NORMAL, pkTexture, 0);
  v19 = spNode.m_pObject;
  v2->m_pkCharNameInputEdit = v18;
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&v19->vfptr, "Time", &uiLeft, &uiTop, &uiWidth, &uiHeight)
    || (v20 = Font::Get(0),
        pkWinTxtc = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v20, (PgWin *)&v2->vfptr, 0, 0),
        v38 = pkWinTxtc->vfptr,
        v21 = TextData::Get(0x8B998D95),
        v38[118].__vecDelDtor((NiRefObject *)pkWinTxtc, (unsigned int)v21),
        v2->m_pkTimeInputEdit = UIUtil::CreateEdit(&ui, "InputTime", 4, NUMBER, pkTexture, 0),
        !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Reason", &uiLeft, &uiTop, &uiWidth, &uiHeight)) )
  {
    LOBYTE(v45) = 0;
    UIUtil::~UIUtil(&ui);
    goto LABEL_19;
  }
  v22 = Font::Get(0);
  pkWinTxtd = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v22, (PgWin *)&v2->vfptr, 0, 0);
  v38 = pkWinTxtd->vfptr;
  v23 = TextData::Get(0x9A8FD7D6);
  v38[118].__vecDelDtor((NiRefObject *)pkWinTxtd, (unsigned int)v23);
  v24 = UIUtil::CreateEdit(&ui, "InputReason", 14, NORMAL, pkTexture, 0);
  v25 = spNode.m_pObject;
  v2->m_pkReasonInputEdit = v24;
  BYTE3(pkWinTxtd) = PgUtil::GetTriShapeRect((NiAVObject *)&v25->vfptr, "Editor", &uiLeft, &uiTop, &uiWidth, &uiHeight);
  v26 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Editor", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop - v11, v26, (PgWin *)&v2->vfptr, 0, 0);
  if ( BYTE3(pkWinTxtd) )
    v2->m_pkRemarkInputEdit = EditWin::CreateWin(
                                uiLeft - v10,
                                uiTop - v11,
                                uiWidth,
                                uiHeight,
                                (PgWin *)&v2->vfptr,
                                MULTILINE,
                                0x100u,
                                4u,
                                0,
                                0,
                                1);
  v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Ok", &uiLeft, &uiTop, pkTexture);
  v2->m_pkOk = PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, v27, (PgWin *)&v2->vfptr, 0xAu, 0, 0);
  PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Ok", &uiLeft, &uiTop, &uiWidth, &uiHeight);
  v28 = (PgWin *)&v2->m_pkOk->vfptr;
  v29 = Font::Get(0);
  pkWinTxte = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v29, v28, 0, 0);
  ((void (__thiscall *)(PgWinText *))pkWinTxte->vfptr[122].__vecDelDtor)(pkWinTxte);
  v38 = pkWinTxte->vfptr;
  v30 = TextData::Get(0x9995E4E0);
  ((void (__thiscall *)(PgWinText *))v38[118].__vecDelDtor)(pkWinTxte);
  ((void (__cdecl *)(_DWORD, NiUnsharedGeometryGroup *, signed int))pkWinTxte->vfptr[60].__vecDelDtor)(0, v30, 5);
  v31 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Modif", &uiLeft, &uiTop, pkTexture);
  v2->m_pkModifBut = PgWinBut::CreateWin(uiLeft - v10, uiTop - v11, v31, (PgWin *)&v2->vfptr, 0xDu, 0, 0);
  PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Modif", &uiLeft, &uiTop, &uiWidth, &uiHeight);
  v32 = (PgWin *)&v2->m_pkModifBut->vfptr;
  v33 = Font::Get(0);
  v34 = PgWinText::CreateWin(uiLeft - v10, uiTop - v11, uiWidth, uiHeight, v33, v32, 0, 0);
  ((void (__thiscall *)(PgWinText *))v34->vfptr[122].__vecDelDtor)(v34);
  v35 = v34->vfptr;
  v36 = TextData::Get(0x2C3D282Fu);
  v35[118].__vecDelDtor((NiRefObject *)v34, (unsigned int)v36);
  v34->vfptr[60].__vecDelDtor((NiRefObject *)v34, 0);
  ((void (__thiscall *)(GMPrisonWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  LOBYTE(v45) = 0;
  UIUtil::~UIUtil(&ui);
  v45 = -1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00628540) --------------------------------------------------------
void __thiscall GMPrisonWin::SendGMReq(GMPrisonWin *this, bool bAdd)
{
  GMPrisonWin *v2; // esi@1
  const char *v3; // edi@1
  char *v4; // eax@1
  EditWin *v5; // ecx@1
  const char *v6; // ebx@1
  const char *v7; // eax@1
  char *v8; // eax@4
  int v9; // edi@11
  int v10; // eax@11
  EditWin *v11; // ecx@11
  int v12; // eax@11
  EditWin *v13; // ecx@11
  int (*v14)(void); // edx@11
  const char *v15; // eax@11
  Name5 v16; // [sp-20h] [bp-34h]@12
  int v17; // [sp-Ch] [bp-20h]@11
  char *v18; // [sp-8h] [bp-1Ch]@11
  char *v19; // [sp-4h] [bp-18h]@3
  char *remark; // [sp+10h] [bp-4h]@1

  v2 = this;
  v3 = (const char *)((int (*)(void))this->m_pkCharNameInputEdit->vfptr[113].__vecDelDtor)();
  v4 = (char *)((int (*)(void))v2->m_pkRemarkInputEdit->vfptr[113].__vecDelDtor)();
  v5 = v2->m_pkReasonInputEdit;
  remark = v4;
  v6 = (const char *)((int (*)(void))v5->vfptr[113].__vecDelDtor)();
  v7 = (const char *)((int (*)(void))v2->m_pkTimeInputEdit->vfptr[113].__vecDelDtor)();
  if ( v3 )
  {
    if ( !strlen(v3) )
    {
      v19 = (char *)-2037871133;
LABEL_4:
      v8 = (char *)TextData::Get((unsigned int)v19);
      MsgBox::Modeless(MSGBOX_OK, v8);
      return;
    }
    if ( !strlen(v7) )
    {
      v19 = (char *)-549244123;
      goto LABEL_4;
    }
    if ( !strlen(v6) )
    {
      v19 = (char *)542255471;
      goto LABEL_4;
    }
    if ( !strlen(remark) )
    {
      v19 = (char *)-733139926;
      goto LABEL_4;
    }
    v9 = (unsigned __int16)atoi(v7);
    v10 = ((int (*)(void))v2->m_pkRemarkInputEdit->vfptr[113].__vecDelDtor)();
    v11 = v2->m_pkReasonInputEdit;
    v19 = (char *)v10;
    v12 = ((int (*)(void))v11->vfptr[113].__vecDelDtor)();
    v13 = v2->m_pkCharNameInputEdit;
    v18 = (char *)v12;
    v14 = (int (*)(void))v13->vfptr[113].__vecDelDtor;
    v17 = v9;
    v15 = (const char *)v14();
    if ( bAdd )
    {
      Name5::Name5(&v16, v15);
      GameFrameWork::NcPrisonAddGMReq((GameFrameWork *)v2->m_pkFrameWork, v16, v17, v18, v19);
    }
    else
    {
      Name5::Name5(&v16, v15);
      GameFrameWork::NcPrisonAlterGMReq((GameFrameWork *)v2->m_pkFrameWork, v16, v17, v18, v19);
    }
  }
}

//----- (006286A0) --------------------------------------------------------
void __thiscall GMPrisonWin::OnModif(GMPrisonWin *this)
{
  GMPrisonWin::SendGMReq(this, 0);
}

//----- (006286B0) --------------------------------------------------------
void __thiscall GMPrisonWin::OnCmdOk(GMPrisonWin *this)
{
  GMPrisonWin::SendGMReq(this, 1);
}

//----- (006286C0) --------------------------------------------------------
void __thiscall GMPrisonWin::OnCommand(GMPrisonWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0xAu:
      GMPrisonWin::SendGMReq(this, 1);
      break;
    case 0xBu:
    case 0xCu:
      PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
      break;
    case 0xDu:
      GMPrisonWin::SendGMReq(this, 0);
      break;
    default:
      return;
  }
}

//----- (00628710) --------------------------------------------------------
GMPrisonWin *__cdecl GMPrisonWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  GMPrisonWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x170u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&GMPrisonWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&GMPrisonWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (GMPrisonWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9B7530: using guessed type void (__thiscall *GMPrisonWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B754C: using guessed type int (__thiscall *GMPrisonWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00628850) --------------------------------------------------------
GMPrisonWin *__thiscall GMPrisonWin::`scalar deleting destructor'(GMPrisonWin *this, unsigned int a2)
{
  GMPrisonWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GMPrisonWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GMPrisonWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B7530: using guessed type void (__thiscall *GMPrisonWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B754C: using guessed type int (__thiscall *GMPrisonWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00628890) --------------------------------------------------------
char __thiscall LinkFrameWork::InitWindow(LinkFrameWork *this, unsigned __int16 mapid)
{
  int v2; // edi@1
  LinkFrameWork *v3; // esi@1
  int v4; // eax@3
  int *v5; // eax@3
  NiSourceTexture *v6; // ebx@3
  int v7; // edi@4
  int v9; // edi@8
  _iobuf *v10; // eax@8
  NiImageConverter *v11; // eax@13
  NiPixelData *v12; // eax@13
  int v13; // edi@18
  int v14; // edi@19
  int *v15; // edi@20
  int v16; // edi@25
  _iobuf *v17; // eax@25
  NiSourceTexture *v18; // eax@30
  PgWinSpr *v19; // eax@35
  PgWinSpr *v20; // eax@35
  NiAlphaController *v21; // eax@35
  NiAlphaController *v22; // edi@35
  NiAlphaController *v23; // ebx@35
  NiProperty *v24; // eax@42
  NiAlphaController *v25; // ecx@42
  PgWinSpr *v26; // eax@42
  int v27; // edi@42
  int v28; // eax@44
  int v29; // eax@45
  int v30; // ecx@46
  int v31; // edx@46
  int v32; // eax@46
  int v33; // [sp+38h] [bp-128h]@3
  NiSourceTexture *spTexture; // [sp+3Ch] [bp-124h]@15
  char acPathName[256]; // [sp+40h] [bp-120h]@8
  char acName[13]; // [sp+140h] [bp-20h]@14
  int v37; // [sp+15Ch] [bp-4h]@17

  v2 = ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable;
  v3 = this;
  if ( !(unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable
                                                            + 16))(
                           ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable,
                           mapid) )
    return 0;
  if ( mapid > *(_WORD *)(v2 + 200) )
    return 0;
  v4 = 4 * mapid;
  v33 = v4;
  v5 = (int *)(*(_DWORD *)(v2 + 196) + v4);
  v6 = 0;
  if ( !*v5 )
    return 0;
  v7 = *v5;
  if ( !*v5 )
    return 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v9 = v7 + 132;
  sprintf(acPathName, "%sLoading\\%s.png", &Folder::m_acMenu, v9);
  v10 = fopen(acPathName, "r");
  if ( v10 )
  {
    fclose(v10);
  }
  else
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    sprintf(acPathName, "%sLoading\\%s.tga", &Folder::m_acMenu, v9);
  }
  v11 = NiImageConverter::GetImageConverter();
  v12 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v11->vfptr[2].__vecDelDtor)(
                         v11,
                         acPathName,
                         0);
  if ( v12 )
  {
    *(_DWORD *)acName = 6;
    *(_DWORD *)&acName[4] = 3;
    *(_DWORD *)&acName[8] = 0;
    v6 = NiSourceTexture::Create(v12, (NiTexture::FormatPrefs *)acName);
  }
  spTexture = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v37 = 0;
  if ( !v6 )
  {
    v13 = ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable
                                                             + 16))(
                            ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable,
                            0) )
    {
      v15 = *(int **)(v13 + 196);
      if ( *v15 )
        v14 = *v15;
      else
        v14 = 0;
    }
    else
    {
      v14 = 0;
    }
    if ( !Folder::m_bInit )
      Folder::Init();
    v16 = v14 + 132;
    sprintf(acPathName, "%sLoading\\%s.png", &Folder::m_acMenu, v16);
    v17 = fopen(acPathName, "r");
    if ( v17 )
    {
      fclose(v17);
    }
    else
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      sprintf(acPathName, "%sLoading\\%s.tga", &Folder::m_acMenu, v16);
    }
    v18 = PgUtil::LoadSourceTexture(acPathName);
    if ( v18 )
    {
      spTexture = v18;
    }
    else
    {
      v18 = MenuTexMgr::GetTexture(2u);
      if ( 0 == v18 )
        goto LABEL_35;
      spTexture = v18;
      if ( !v18 )
        goto LABEL_35;
    }
    InterlockedIncrement((volatile LONG *)&v18->m_uiRefCount);
  }
LABEL_35:
  v19 = PgWinSpr::CreateWin(0, 0, spTexture, 0, 0, 0, 0x400u, 0x300u, 0, 0, 0);
  v3->m_pkBack = v19;
  v19->vfptr[117].__vecDelDtor((NiRefObject *)v19, PgWin::ms_uiScreenWidth);
  ((void (__stdcall *)(unsigned int))v3->m_pkBack->vfptr[118].__vecDelDtor)(PgWin::ms_uiScreenHeight);
  ((void (__stdcall *)(_DWORD))v3->m_pkBack->vfptr[60].__vecDelDtor)(0);
  v20 = PgWinSpr::CreateWin(63, 487, spTexture, 0, 0, 0x30Cu, 0x1D1u, 0x4Du, 0, 0, 0);
  v3->m_pkRainbowBox = v20;
  v20->vfptr[60].__vecDelDtor((NiRefObject *)v20, 0);
  ((void (__stdcall *)(_DWORD))v3->m_pkRainbowBox->vfptr[69].__vecDelDtor)(1.0);
  v21 = PgWinAnim::CreateLoopingAlphaAnim();
  v22 = v3->m_spAlphaCtrl.m_pObject;
  v23 = v21;
  if ( v22 != v21 )
  {
    if ( v22 && !InterlockedDecrement((volatile LONG *)&v22->m_uiRefCount) && v22 )
      v22->vfptr->__vecDelDtor((NiRefObject *)v22, 1u);
    v3->m_spAlphaCtrl.m_pObject = v23;
    if ( v23 )
      InterlockedIncrement((volatile LONG *)&v23->m_uiRefCount);
  }
  v24 = NiAVObject::GetProperty((NiAVObject *)&v3->m_pkRainbowBox->vfptr, 3);
  v25 = v3->m_spAlphaCtrl.m_pObject;
  v3->m_pkMaterialProp = (NiMaterialProperty *)v24;
  ((void (__stdcall *)(NiProperty *))v25->vfptr[18].__vecDelDtor)(v24);
  RewardInvItem::SetItem(
    (NiObjectNET *)&v3->m_pkMaterialProp->vfptr,
    (NiTimeController *)&v3->m_spAlphaCtrl.m_pObject->vfptr);
  v26 = PgWinSpr::CreateWin(63, 487, spTexture, 0, 0, 0x366u, 0x1D1u, 0x4Du, 0, 0, 0);
  v3->m_pkTextBox = v26;
  v26->vfptr[60].__vecDelDtor((NiRefObject *)v26, 0);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkBack->vfptr);
  v27 = ITableBase<MapInfo,MapInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<MapInfo,MapInfoTab>::ms_pkTable + 16))(
                          ITableBase<MapInfo,MapInfoTab>::ms_pkTable,
                          mapid) )
  {
    if ( mapid <= *(_WORD *)(v27 + 200) )
    {
      v28 = *(_DWORD *)(v27 + 196);
      if ( *(_DWORD *)(v28 + v33) )
      {
        v29 = *(_DWORD *)(v28 + v33);
        if ( v29 )
        {
          v30 = *(_DWORD *)(v29 + 2);
          v31 = *(_DWORD *)(v29 + 6);
          v32 = *(_DWORD *)(v29 + 10);
          *(_DWORD *)acName = v30;
          *(_DWORD *)&acName[8] = v32;
          *(_DWORD *)&acName[4] = v31;
          acName[12] = 0;
          if ( !strcmp(acName, "EldPri") )
            v3->m_bShowToolTip = 0;
        }
      }
    }
  }
  v37 = -1;
  if ( spTexture )
  {
    if ( !InterlockedDecrement((volatile LONG *)&spTexture->m_uiRefCount) )
      spTexture->vfptr->__vecDelDtor((NiRefObject *)spTexture, 1u);
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;
// A89D38: using guessed type int ITableBase<MapInfo,MapInfoTab>::ms_pkTable;
// A8C270: using guessed type int ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable;

//----- (00628CF0) --------------------------------------------------------
void __thiscall LinkFrameWork::TerminateWindow(LinkFrameWork *this)
{
  LinkFrameWork *v1; // esi@1
  NiAlphaController *v2; // edi@1

  v1 = this;
  v2 = this->m_spAlphaCtrl.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spAlphaCtrl.m_pObject = 0;
  }
  if ( v1->m_pkBack )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkBack->vfptr);
    v1->m_pkBack = 0;
  }
  if ( v1->m_pkRainbowBox )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkRainbowBox->vfptr);
    v1->m_pkRainbowBox = 0;
  }
  if ( v1->m_pkTextBox )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkTextBox->vfptr);
    v1->m_pkTextBox = 0;
  }
}

//----- (00628D60) --------------------------------------------------------
bool __thiscall LinkFrameWork::InitNet(LinkFrameWork *this)
{
  LinkFrameWork *v1; // ebx@1
  Net *v2; // esi@1
  Net *v3; // edi@1

  v1 = this;
  v2 = this->m_spZoneNet.m_pObject;
  v3 = g_kNetMgr.m_spZone[g_kNetMgr.m_iNowConnectedZone].m_pObject;
  if ( v2 != v3 )
  {
    if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spZoneNet.m_pObject = v3;
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
  return v1->m_spZoneNet.m_pObject != 0;
}

//----- (00628DC0) --------------------------------------------------------
void __thiscall LinkFrameWork::TerminateNet(LinkFrameWork *this)
{
  LinkFrameWork *v1; // edi@1
  Net *v2; // esi@1

  v1 = this;
  v2 = this->m_spZoneNet.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
    v1->m_spZoneNet.m_pObject = 0;
  }
}

//----- (00628E00) --------------------------------------------------------
char __thiscall LinkFrameWork::InitKeyMap(LinkFrameWork *this)
{
  LinkFrameWork *v1; // ebx@1
  KeyMap *v2; // edi@1
  KeyMap *v3; // eax@2
  KeyMap *v4; // eax@3
  KeyMap *v5; // esi@4

  v1 = this;
  v2 = 0;
  if ( !this->m_spKeyMap.m_pObject )
  {
    v3 = (KeyMap *)operator new(0x20u);
    if ( v3 )
    {
      KeyMap::KeyMap(v3);
      v2 = v4;
    }
    v5 = v1->m_spKeyMap.m_pObject;
    if ( v5 != v2 )
    {
      if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      v1->m_spKeyMap.m_pObject = v2;
      if ( v2 )
        InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
    }
    v1->m_spKeyMap.m_pObject->m_pkFrameWork = (PgFrameWork *)v1;
  }
  return 1;
}

//----- (00628EB0) --------------------------------------------------------
void __thiscall LinkFrameWork::TerminateKeyMap(LinkFrameWork *this)
{
  LinkFrameWork *v1; // edi@1
  KeyMap *v2; // esi@1

  v1 = this;
  v2 = this->m_spKeyMap.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
    v1->m_spKeyMap.m_pObject = 0;
  }
}

//----- (00628EF0) --------------------------------------------------------
char __thiscall LinkFrameWork::Init(LinkFrameWork *this, PgMsg::Frame *ptFrameMsg)
{
  LinkFrameWork *v2; // esi@1
  char result; // al@2
  unsigned int v4; // eax@3
  int v5; // ecx@3
  unsigned __int16 v6; // ax@4
  PgMsg::Frame kMsg; // [sp+4h] [bp-18h]@4

  v2 = this;
  if ( ptFrameMsg
    && ((v4 = ptFrameMsg->m_uiFramelParam, v5 = *(_DWORD *)v4, ptFrameMsg->m_uiFrameWParam != 1) ? (*(_DWORD *)&v2->m_kProtoNcMapLinkOtherCmd.link.mapid = v5,
                                                                                                    *(unsigned int *)((char *)&v2->m_kProtoNcMapLinkOtherCmd.link.location.x + 2) = *(_DWORD *)(v4 + 4),
                                                                                                    HIWORD(v2->m_kProtoNcMapLinkOtherCmd.link.location.y) = *(_WORD *)(v4 + 8),
                                                                                                    v2->m_kProtoNcMapLinkOtherCmd.sock.zoneip.n4_code[0] = *(_DWORD *)(v4 + 10),
                                                                                                    v2->m_kProtoNcMapLinkOtherCmd.sock.zoneip.n4_code[1] = *(_DWORD *)(v4 + 14),
                                                                                                    v2->m_kProtoNcMapLinkOtherCmd.sock.zoneip.n4_code[2] = *(_DWORD *)(v4 + 18),
                                                                                                    v2->m_kProtoNcMapLinkOtherCmd.sock.zoneip.n4_code[3] = *(_DWORD *)(v4 + 22),
                                                                                                    v2->m_kProtoNcMapLinkOtherCmd.sock.zoneport = *(_WORD *)(v4 + 26),
                                                                                                    v2->m_kProtoNcMapLinkOtherCmd.wldmanhandle = *(_WORD *)(v4 + 28),
                                                                                                    v6 = v2->m_kProtoNcMapLinkOtherCmd.link.mapid,
                                                                                                    kMsg.m_uiFrameMsg = 10) : (*(_DWORD *)&v2->m_kProtoNcMapLinkSameCmd.mapid = v5, *(unsigned int *)((char *)&v2->m_kProtoNcMapLinkSameCmd.location.x + 2) = *(_DWORD *)(v4 + 4), HIWORD(v2->m_kProtoNcMapLinkSameCmd.location.y) = *(_WORD *)(v4 + 8), v6 = v2->m_kProtoNcMapLinkSameCmd.mapid, kMsg.m_uiFrameMsg = 11),
        LinkFrameWork::InitWindow(v2, v6) && LinkFrameWork::InitNet(v2) && LinkFrameWork::InitKeyMap(v2)) )
  {
    PgFrameWork::PostMsgToMe((PgFrameWork *)&v2->vfptr, &kMsg);
    v2->m_bInit = 1;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00628FE0) --------------------------------------------------------
void __thiscall LinkFrameWork::Terminate(LinkFrameWork *this)
{
  LinkFrameWork *v1; // edi@1
  KeyMap *v2; // esi@1
  Net *v3; // esi@6

  v1 = this;
  v2 = this->m_spKeyMap.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spKeyMap.m_pObject = 0;
  }
  v3 = v1->m_spZoneNet.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spZoneNet.m_pObject = 0;
  }
  LinkFrameWork::TerminateWindow(v1);
  v1->m_bInit = 0;
  v1->m_BackFrameID = 0;
}

//----- (00629050) --------------------------------------------------------
void __thiscall LinkFrameWork::OnErrorMsgClose(LinkFrameWork *this)
{
  PgFrameWork::PostFrameMsgChange((PgFrameWork *)&this->vfptr, AccountFrameWorkID, 0);
}

//----- (00629080) --------------------------------------------------------
void __thiscall LinkFrameWork::OnMapLoginFailMsgClose(LinkFrameWork *this)
{
  LinkFrameWork *v1; // esi@1

  v1 = this;
  Skill::ClearLearnSkill();
  Skill::ClearLearnPassiveSkill();
  NetMgr::SendUserLogOutMsg2AllServer(&g_kNetMgr);
  PgFrameWork::PostFrameMsgChange((PgFrameWork *)&v1->vfptr, AccountFrameWorkID, 0);
}

//----- (006290B0) --------------------------------------------------------
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_BASE_CMD(int iRevBytes, void *pvData)
{
  Skill::SetEmpowerResetable(*((_BYTE *)pvData + 101) & 1);
  User::SetMainCharBaseData(&g_kUser, (PROTO_NC_CHAR_BASE_CMD *)pvData);
  return iRevBytes;
}

//----- (006290E0) --------------------------------------------------------
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_SHAPE_CMD(int iRevBytes, void *pvData)
{
  User::SetMainCharShapeData(&g_kUser, (PROTO_AVATAR_SHAPE_INFO *)pvData);
  return iRevBytes;
}

//----- (00629100) --------------------------------------------------------
int __stdcall LinkFrameWork::On_NC_CHAR_OPTION_SET_SHORTCUTDATA_CMD(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (00629110) --------------------------------------------------------
int __stdcall LinkFrameWork::On_NC_CHAR_OPTION_SET_SHORTCUTSIZE_CMD(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (00629120) --------------------------------------------------------
int __stdcall LinkFrameWork::On_NC_CHAR_OPTION_DB_SET_WINDOWPOS_CMD(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (00629130) --------------------------------------------------------
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_QUEST_DOING_CMD(int iRevBytes, void *pvData)
{
  CClientQuest *v3; // eax@1

  v3 = QuestDataMgr::GetQuest();
  CQuest::Recv_NC_CHAR_QUEST_DOING_CMD_ACK((CQuest *)&v3->vfptr, (PROTO_NC_CHAR_QUEST_DOING_CMD *)pvData);
  return iRevBytes;
}

//----- (00629150) --------------------------------------------------------
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_QUEST_DONE_CMD(int iRevBytes, void *pvData)
{
  CClientQuest *v3; // eax@1

  v3 = QuestDataMgr::GetQuest();
  CQuest::Recv_NC_CHAR_QUEST_DONE_CMD_ACK((CQuest *)&v3->vfptr, (PROTO_NC_CHAR_QUEST_DONE_CMD *)pvData);
  return iRevBytes;
}

//----- (00629170) --------------------------------------------------------
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_QUEST_READ_CMD(int iRevBytes, void *pvData)
{
  CClientQuest *v3; // eax@1

  v3 = QuestDataMgr::GetQuest();
  CQuest::Recv_NC_CHAR_QUEST_READ_CMD_ACK((CQuest *)&v3->vfptr, (PROTO_NC_CHAR_QUEST_READ_CMD *)pvData);
  return iRevBytes;
}

//----- (00629190) --------------------------------------------------------
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_QUEST_REPEAT_CMD(int iRevBytes, void *pvData)
{
  CClientQuest *v3; // eax@1

  v3 = QuestDataMgr::GetQuest();
  CQuest::Recv_NC_CHAR_QUEST_REPEAT_CMD_ACK((CQuest *)&v3->vfptr, (PROTO_NC_CHAR_QUEST_REPEAT_CMD *)pvData);
  return iRevBytes;
}

//----- (006291B0) --------------------------------------------------------
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_ABSTATE_CMD(int iRevBytes, void *pvData)
{
  User::InitABState(&g_kUser, (PROTO_NC_CHAR_ABSTATE_CMD *)pvData);
  return iRevBytes;
}

//----- (006291D0) --------------------------------------------------------
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_SKILL_CMD(int iRevBytes, void *pvData)
{
  Skill::InitSkill((PROTO_NC_CHAR_CLIENT_SKILL_CMD *)pvData);
  return iRevBytes;
}

//----- (006291F0) --------------------------------------------------------
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_PASSIVE_CMD(int iRevBytes, void *pvData)
{
  Skill::InitPassiveSkill((PROTO_NC_CHAR_SKILL_PASSIVE_CMD *)pvData);
  return iRevBytes;
}

//----- (00629210) --------------------------------------------------------
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_ITEM_CMD(int iRevBytes, void *pvData)
{
  Inventory::InitData(&g_kInventory, (PROTO_NC_CHAR_CLIENT_ITEM_CMD *)pvData, (char *)pvData);
  ShortCutMgr::InitShortCutFromInventory(&g_kShortCutMgr);
  return iRevBytes;
}

//----- (00629240) --------------------------------------------------------
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_GAME_CMD(int iRevBytes, void *pvData)
{
  return iRevBytes;
}

//----- (00629250) --------------------------------------------------------
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_CHARTITLE_CMD(int iRevBytes, void *pvData)
{
  MainChar::InitCharactorTitle((MainChar *)g_pkMainChar, (PROTO_NC_CHAR_CLIENT_CHARTITLE_CMD *)pvData);
  return iRevBytes;
}

//----- (00629270) --------------------------------------------------------
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_CHARGEDBUFF_CMD(int iRevBytes, void *pvData)
{
  signed int v3; // edi@1
  PROTO_CHARGEDBUFF_INFO *v4; // esi@2

  ChargedItemList::Clear();
  v3 = 0;
  if ( *(_WORD *)pvData > 0u )
  {
    v4 = (PROTO_CHARGEDBUFF_INFO *)((char *)pvData + 2);
    do
    {
      ChargedItemList::AddUsingItem(v4);
      ++v3;
      ++v4;
    }
    while ( v3 < *(_WORD *)pvData );
  }
  return iRevBytes;
}

//----- (006292B0) --------------------------------------------------------
int __stdcall LinkFrameWork::On_MISC_RESTMINUTE_CMD(int iRevBytes, void *pvData)
{
  if ( *(_BYTE *)pvData == 1 )
    KQuestTimeWin::m_second = *(_WORD *)((char *)pvData + 1);
  return iRevBytes;
}
// A8E1B4: using guessed type unsigned int KQuestTimeWin::m_second;

//----- (006292D0) --------------------------------------------------------
int __stdcall LinkFrameWork::On_NC_CHAR_CLIENT_COININFO_CMD(int iRevBytes, void *pvData)
{
  User::SetCoin(&g_kUser, *(_QWORD *)pvData);
  User::SetExchangeableCoin(&g_kUser, *((_QWORD *)pvData + 1));
  return iRevBytes;
}

//----- (00629310) --------------------------------------------------------
void LinkFrameWork::Draw()
{
  PgWinMgr::Draw(&Pgg_kWinMgr, NiRenderer::ms_pkRenderer);
}

//----- (00629330) --------------------------------------------------------
void __thiscall LinkFrameWork::ProcessInput(LinkFrameWork *this)
{
  KeyMap::Process(this->m_spKeyMap.m_pObject);
}

//----- (00629340) --------------------------------------------------------
void __thiscall LinkFrameWork::OnInitAtSameServer(LinkFrameWork *this)
{
  LinkFrameWork *v1; // esi@1
  int v2; // ebx@1
  int v3; // edi@1
  int v4; // esi@1
  int v5; // edx@3
  int v6; // esi@5
  int v7; // edi@5
  MapViewInfo **v8; // eax@9
  float fAngle; // ST10_4@13
  Name3 *v10; // edi@14
  Name3 *v11; // eax@14
  PgFrameWork *v12; // eax@17
  PgFrameWork *v13; // esi@17
  int v14; // edx@29
  int v15; // eax@29
  PgFrameWork *v16; // esi@31
  float fY; // ST0C_4@31
  float fX; // ST08_4@31
  float v19; // ST10_4@32
  float v20; // ST0C_4@32
  NiPoint3 *v21; // eax@34
  NiPoint3 kPos; // [sp+20h] [bp-70h]@31
  NiPoint3 kSouthDir; // [sp+2Ch] [bp-64h]@1
  int v24; // [sp+38h] [bp-58h]@1
  PgFrameWork *v25; // [sp+3Ch] [bp-54h]@1
  MapViewInfo *pkMapViewInfo; // [sp+40h] [bp-50h]@1
  NiMatrix3 v27; // [sp+44h] [bp-4Ch]@1
  PgMsg::Frame kMsg; // [sp+68h] [bp-28h]@35
  char acMapName[13]; // [sp+7Ch] [bp-14h]@14

  v1 = this;
  v2 = 0;
  v25 = (PgFrameWork *)this;
  v24 = 0;
  *(float *)&pkMapViewInfo = (NI_PI + NI_PI) * 90.0 / 180.0;
  NiMatrix3::MakeZRotation(&v27, *(float *)&pkMapViewInfo);
  NiMatrix3::operator*(&v27, &kSouthDir, &World::ms_kNorthDir);
  ScreenBDMgr::Clear(&g_kScrnBDMgr);
  EffectMgr::RemoveAll(&g_kEffectMgr);
  g_pkMainChar[1].m_bActionHit = 0;
  g_kInventory.m_bWaitingItemDropAck = 0;
  v3 = v1->m_kProtoNcMapLinkSameCmd.mapid;
  v4 = ITableBase<MapInfo,MapInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MapInfo,MapInfoTab>::ms_pkTable + 16))(
                          ITableBase<MapInfo,MapInfoTab>::ms_pkTable,
                          v3) )
  {
    if ( (unsigned __int16)v3 <= *(_WORD *)(v4 + 200) )
    {
      v5 = *(_DWORD *)(v4 + 196);
      if ( *(_DWORD *)(v5 + 4 * v3) )
        v2 = *(_DWORD *)(v5 + 4 * v3);
    }
  }
  v6 = ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable;
  v7 = *(_WORD *)v2;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable,
                          v7) )
  {
    if ( (unsigned __int16)v7 <= *(_WORD *)(v6 + 200) )
    {
      v8 = (MapViewInfo **)(*(_DWORD *)(v6 + 196) + 4 * v7);
      if ( *v8 )
        pkMapViewInfo = *v8;
      else
        *(float *)&pkMapViewInfo = 0.0;
    }
    else
    {
      *(float *)&pkMapViewInfo = 0.0;
    }
  }
  else
  {
    *(float *)&pkMapViewInfo = 0.0;
  }
  g_pkMainChar[1].m_uiSkillActStep = *(_DWORD *)(v2 + 72);
  g_pkMainChar->m_fMaxViewLength = (double)*(unsigned int *)(v2 + 72);
  if ( *(float *)&pkMapViewInfo != 0.0 )
  {
    v24 = pkMapViewInfo->ZoomMax;
    fAngle = (double)v24;
    World::SetCameraZoomMax(&g_kWorld, fAngle);
  }
  v10 = (Name3 *)(v2 + 2);
  v11 = World::GetMapName(&g_kWorld, (Name3 *)acMapName);
  if ( v11->n3_code[0] == *(_DWORD *)(v2 + 2)
    && v11->n3_code[1] == *(_DWORD *)(v2 + 6)
    && v11->n3_code[2] == *(_DWORD *)(v2 + 10) )
  {
    World::LoadMap(&g_kWorld, 1);
    World::RemoveAllChar(&g_kWorld);
  }
  else
  {
    unk_B25074 = *(_BYTE *)(v2 + 58);
    v12 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v13 = v12;
    if ( v12 )
    {
      if ( (unsigned __int8)(*(int (**)(void))(*(_DWORD *)v12[20].m_kMsgQ.m_uiAlloced + 260))() )
        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)v13[20].m_kMsgQ.m_uiAlloced);
      if ( (unsigned __int8)(*(int (**)(void))(**(_DWORD **)(*(_DWORD *)&v13[15].m_bInit + 532) + 260))() )
        PgWinMgr::CloseWin(&Pgg_kWinMgr, *(PgWin **)(*(_DWORD *)&v13[15].m_bInit + 532));
      GameFrameWork::ClosePlayGuideWin((GameFrameWork *)v13);
      GameFrameWork::OpenKQScoreWin((GameFrameWork *)v13, 0);
      GameFrameWork::OpenKDTeamScoreWin((GameFrameWork *)v13, 0);
    }
    unk_B25064 = v10->n3_code[0];
    unk_B25068 = *(_DWORD *)(v2 + 6);
    unk_B2506C = *(_DWORD *)(v2 + 10);
    World::LoadMap(&g_kWorld, 0);
  }
  if ( *(float *)&pkMapViewInfo != 0.0 )
  {
    if ( pkMapViewInfo->MinimapView )
      World::LoadMiniMap(&g_kWorld);
    else
      World::LoadEmptyMiniMap(&g_kWorld);
  }
  SoundMgr::StopAllSound(&g_kSoundMgr);
  v14 = *(_DWORD *)(v2 + 6);
  *(_DWORD *)acMapName = v10->n3_code[0];
  v15 = *(_DWORD *)(v2 + 10);
  *(_DWORD *)&acMapName[4] = v14;
  *(_DWORD *)&acMapName[8] = v15;
  acMapName[12] = 0;
  if ( g_kSoundMgr.m_pkAmbientGroup )
    SoundGroupAmbient::LoadAreaTable(g_kSoundMgr.m_pkAmbientGroup, acMapName);
  CharMgr::RemoveAllWithoutMainChar(&g_kCharMgr);
  MainChar::ResetOnLink((MainChar *)g_pkMainChar);
  v16 = v25;
  fX = (double)*(unsigned int *)((char *)&v25[1].m_BackFrameID + 2);
  fY = (double)*(unsigned int *)(&v25[1].m_bInit + 2);
  if ( World::GetAdvGroundPos(&g_kWorld, fX, fY, &kPos) )
  {
    v20 = (double)*(unsigned int *)((char *)&v16[1].m_BackFrameID + 2);
    v19 = (double)*(unsigned int *)(&v16[1].m_bInit + 2);
    if ( !World::IsBlock(&g_kWorld, v20, v19) )
    {
      *(_DWORD *)&acMapName[8] = 0;
      *(_DWORD *)&acMapName[4] = 0;
      *(_DWORD *)acMapName = 0;
      strncpy(acMapName, "Job1_Dn01", 0xCu);
      if ( Name3::operator==(v10, (Name3 *)acMapName) )
      {
        v21 = NetUtil::NetDir2Point3Dir((NiPoint3 *)acMapName, 0);
        kSouthDir.x = v21->x;
        kSouthDir.y = v21->y;
        kSouthDir.z = v21->z;
      }
      ((void (__stdcall *)(NiPoint3 *, NiPoint3 *))g_pkMainChar->vfptr[5].GetAbstateColor)(&kPos, &kSouthDir);
      ((void (*)(void))g_pkMainChar->vfptr[2].IsVisible)();
      World::AttachChar(&g_kWorld, g_pkMainChar);
      kMsg.m_uiFrameMsg = 10;
      PgFrameWork::PostMsgToFrameWork(GameFrameWorkID, &kMsg);
      PgFrameWork::PostFrameMsgUnPop(v16);
    }
  }
}
// A89D38: using guessed type int ITableBase<MapInfo,MapInfoTab>::ms_pkTable;
// A8C270: using guessed type int ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable;
// B622CC: using guessed type const float NI_PI;

//----- (00629720) --------------------------------------------------------
void __thiscall LinkFrameWork::NcMiscSeedReq(LinkFrameWork *this)
{
  Net *v1; // ecx@1
  LinkFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  v1 = this->m_spZoneNet.m_pObject;
  if ( v1 )
  {
    LOWORD(netcmd) = 2054;
    PgNet::SendNetMsg((PgNet *)&v1->vfptr, &netcmd, 2);
  }
}

//----- (00629750) --------------------------------------------------------
void __thiscall LinkFrameWork::NcMapLoginCompleteCmd(LinkFrameWork *this)
{
  Net *v1; // ecx@1
  PgFrameWork *v2; // eax@3
  PgFrameWork *v3; // eax@5
  LinkFrameWork *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  v1 = this->m_spZoneNet.m_pObject;
  if ( v1 )
  {
    LOWORD(netcmd) = 6147;
    PgNet::SendNetMsg((PgNet *)&v1->vfptr, &netcmd, 2);
    if ( AbStateInfectee::FindNomalAbstate((AbStateInfectee *)&g_pkMainChar->vfptr, STA_OBSERVERHIDEMODE) )
    {
      v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v2 )
        MiniMapWin::ShowGTQuit(*(MiniMapWin **)&v2[15].m_bInit, 1);
    }
    v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v3 )
      LOBYTE(v3[141].m_kMsgQ.m_pBase) = 1;
  }
}

//----- (006297D0) --------------------------------------------------------
void __thiscall LinkFrameWork::~LinkFrameWork(LinkFrameWork *this)
{
  LinkFrameWork *v1; // edi@1
  Net *v2; // esi@1
  KeyMap *v3; // esi@5
  NiAlphaController *v4; // esi@9
  PgMsg::Frame *v5; // ST00_4@13

  v1 = this;
  this->vfptr = (IDirectMessengerVtbl *)&LinkFrameWork::`vftable';
  v2 = this->m_spZoneNet.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_spKeyMap.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v4 = v1->m_spAlphaCtrl.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v5 = v1->m_kMsgQ.m_pBase;
  v1->vfptr = (IDirectMessengerVtbl *)&PgFrameWork::`vftable';
  operator delete[](v5);
}
// 970534: using guessed type void (__thiscall *PgFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B780C: using guessed type void (__thiscall *LinkFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);

//----- (006298A0) --------------------------------------------------------
void __thiscall LinkFrameWork::Update(LinkFrameWork *this, float fCurTime)
{
  LinkFrameWork *v2; // esi@1
  Net *v3; // ecx@1

  v2 = this;
  v3 = this->m_spZoneNet.m_pObject;
  if ( v3 )
    ((void (__stdcall *)(_DWORD, _DWORD))v3->vfptr[4].__vecDelDtor)(v2, 100);
  PgFrameWork::ProcessAllMsg((PgFrameWork *)&v2->vfptr);
  PgWinMgr::DispatchMessageA(&Pgg_kWinMgr);
  PgWinMgr::UpdateWin(&Pgg_kWinMgr, fCurTime);
  ((void (*)(void))v2->m_pkBack->vfptr[67].__vecDelDtor)();
  if ( g_kNetMgr.m_spWorldMgr.m_pObject )
    PgNet::Flush((PgNet *)&g_kNetMgr.m_spWorldMgr.m_pObject->vfptr);
  PrisonTimeWin::m_second = 0;
  KQuestTimeWin::m_second = 0;
}
// A8D47C: using guessed type unsigned int PrisonTimeWin::m_second;
// A8E1B4: using guessed type unsigned int KQuestTimeWin::m_second;

//----- (00629910) --------------------------------------------------------
void __stdcall LinkFrameWork::SendConnectError(int nFailCount, int nType, Name4 *rLinkBeforeAddress)
{
  ;
}

//----- (00629930) --------------------------------------------------------
void __thiscall LinkFrameWork::OnTryConnectToZone(LinkFrameWork *this)
{
  LinkFrameWork *v1; // esi@1
  int v2; // eax@1
  Net *v3; // ecx@1
  signed int v4; // eax@2
  Net *v5; // eax@3
  Net *v6; // edi@3
  Net *v7; // ebx@3
  int nFailCount; // [sp+Ch] [bp-1Ch]@1
  char acstr[17]; // [sp+10h] [bp-18h]@1

  v1 = this;
  v2 = this->m_kProtoNcMapLinkOtherCmd.sock.zoneport;
  *(_QWORD *)&g_kServer.m_kZoneAddr.m_kAddr.n4_name[0] = *(_QWORD *)&this->m_kProtoNcMapLinkOtherCmd.sock.zoneip.n4_name[0];
  *(_QWORD *)&g_kServer.m_kZoneAddr.m_kAddr.n4_code[2] = *(_QWORD *)&this->m_kProtoNcMapLinkOtherCmd.sock.zoneip.n4_code[2];
  g_kServer.m_kZoneAddr.m_iPort = v2;
  LOWORD(v2) = this->m_kProtoNcMapLinkOtherCmd.wldmanhandle;
  *(_QWORD *)acstr = *(_QWORD *)&g_kServer.m_kZoneAddr.m_kAddr.n4_name[0];
  g_kServer.m_kWorldMgrHandle = v2;
  v3 = this->m_spZoneNet.m_pObject;
  *(_QWORD *)&acstr[8] = *(_QWORD *)&g_kServer.m_kZoneAddr.m_kAddr.n4_code[2];
  acstr[16] = 0;
  PgNet::SetAddress((PgNet *)&v3->vfptr, acstr);
  PgNet::SetPortA((PgNet *)&v1->m_spZoneNet.m_pObject->vfptr, g_kServer.m_kZoneAddr.m_iPort);
  for ( nFailCount = 0; ; ++nFailCount )
  {
    v4 = rand();
    Sleep(v4 % 200 + 300);
    if ( nFailCount > 2 )
    {
      v5 = NetMgr::TryAnotherZone(&g_kNetMgr, acstr, g_kServer.m_kZoneAddr.m_iPort);
      v6 = v1->m_spZoneNet.m_pObject;
      v7 = v5;
      if ( v6 != v5 )
      {
        if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
        v1->m_spZoneNet.m_pObject = v7;
        if ( v7 )
          InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
      }
    }
    if ( (unsigned __int8)((int (*)(void))v1->m_spZoneNet.m_pObject->vfptr[2].__vecDelDtor)() )
      break;
  }
}

//----- (00629A50) --------------------------------------------------------
void __thiscall LinkFrameWork::OnInitAtOtherServer(LinkFrameWork *this)
{
  PROTO_NC_CHAR_BASE_CMD::LoginLocation *v1; // esi@1
  Name3 *v2; // eax@1
  PROTO_NC_CHAR_BASE_CMD::LoginLocation *v3; // eax@4
  MapInfo *v4; // eax@4
  int v5; // esi@4
  MapInfo *v6; // ebx@4
  int v7; // edi@4
  int v8; // edi@5
  int v9; // edx@8
  float fAngle; // ST08_4@12
  PROTO_NC_CHAR_BASE_CMD::LoginLocation *v11; // eax@13
  PgFrameWork *v12; // eax@13
  PgFrameWork *v13; // esi@13
  SoundGroupAmbient *v14; // esi@23
  PROTO_NC_CHAR_BASE_CMD::LoginLocation *v15; // eax@23
  PROTO_NC_CHAR_MAPLOGIN_ACK *v16; // esi@25
  float fY; // ST04_4@25
  float fX; // ST00_4@25
  float v19; // ST08_4@26
  float v20; // ST04_4@26
  PROTO_NC_CHAR_BASE_CMD::LoginLocation *v21; // eax@27
  MapInfo *v22; // edi@27
  PgFrameWork *v23; // esi@32
  NiPoint3 kCharPos; // [sp+18h] [bp-6Ch]@25
  NiPoint3 kSouthDir; // [sp+24h] [bp-60h]@1
  PgFrameWork *v26; // [sp+30h] [bp-54h]@1
  float v27; // [sp+34h] [bp-50h]@1
  PgMsg::Frame kMsg; // [sp+38h] [bp-4Ch]@32
  NiMatrix3 v29; // [sp+4Ch] [bp-38h]@1
  char acMapName[13]; // [sp+70h] [bp-14h]@1

  v26 = (PgFrameWork *)this;
  v27 = (NI_PI + NI_PI) * 90.0 / 180.0;
  NiMatrix3::MakeZRotation(&v29, v27);
  NiMatrix3::operator*(&v29, &kSouthDir, &World::ms_kNorthDir);
  ScreenBDMgr::Clear(&g_kScrnBDMgr);
  EffectMgr::RemoveAll(&g_kEffectMgr);
  g_pkMainChar[1].m_bActionHit = 0;
  v1 = User::GetMainCharLoginMapName(&g_kUser);
  v2 = World::GetMapName(&g_kWorld, (Name3 *)acMapName);
  if ( v2->n3_code[0] == v1->currentmap.n3_code[0]
    && v2->n3_code[1] == v1->currentmap.n3_code[1]
    && v2->n3_code[2] == v1->currentmap.n3_code[2] )
  {
    World::LoadMap(&g_kWorld, 1);
    World::RemoveAllChar(&g_kWorld);
  }
  else
  {
    v3 = User::GetMainCharLoginMapName(&g_kUser);
    v4 = MapInfoTab::GetByMapName(&v3->currentmap);
    v5 = ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable;
    v6 = v4;
    v7 = v4->ID;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable
                                                          + 16))(
                            ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable,
                            v7) )
    {
      if ( (unsigned __int16)v7 <= *(_WORD *)(v5 + 200) )
      {
        v9 = *(_DWORD *)(v5 + 196);
        if ( *(_DWORD *)(v9 + 4 * v7) )
          v8 = *(_DWORD *)(v9 + 4 * v7);
        else
          v8 = 0;
      }
      else
      {
        v8 = 0;
      }
    }
    else
    {
      v8 = 0;
    }
    g_pkMainChar[1].m_uiSkillActStep = v6->Sight;
    g_pkMainChar->m_fMaxViewLength = (double)v6->Sight;
    if ( v8 )
    {
      LODWORD(v27) = *(_WORD *)(v8 + 209);
      fAngle = (double)SLODWORD(v27);
      World::SetCameraZoomMax(&g_kWorld, fAngle);
    }
    v11 = User::GetMainCharLoginMapName(&g_kUser);
    unk_B25064 = v11->currentmap.n3_code[0];
    unk_B25068 = v11->currentmap.n3_code[1];
    unk_B2506C = v11->currentmap.n3_code[2];
    unk_B25074 = v6->KingdomMap;
    v12 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v13 = v12;
    if ( v12 )
    {
      if ( (unsigned __int8)(*(int (**)(void))(*(_DWORD *)v12[20].m_kMsgQ.m_uiAlloced + 260))() )
        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)v13[20].m_kMsgQ.m_uiAlloced);
      if ( (unsigned __int8)(*(int (**)(void))(**(_DWORD **)(*(_DWORD *)&v13[15].m_bInit + 532) + 260))() )
        PgWinMgr::CloseWin(&Pgg_kWinMgr, *(PgWin **)(*(_DWORD *)&v13[15].m_bInit + 532));
      GameFrameWork::ClosePlayGuideWin((GameFrameWork *)v13);
      GameFrameWork::OpenKQScoreWin((GameFrameWork *)v13, 0);
      GameFrameWork::OpenKDTeamScoreWin((GameFrameWork *)v13, 0);
    }
    World::LoadMap(&g_kWorld, 0);
    if ( *(_BYTE *)(v8 + 130) )
      World::LoadMiniMap(&g_kWorld);
    else
      World::LoadEmptyMiniMap(&g_kWorld);
  }
  SoundMgr::StopAllSound(&g_kSoundMgr);
  v14 = g_kSoundMgr.m_pkAmbientGroup;
  v15 = User::GetMainCharLoginMapName(&g_kUser);
  *(_DWORD *)acMapName = v15->currentmap.n3_code[0];
  *(_DWORD *)&acMapName[4] = v15->currentmap.n3_code[1];
  *(_DWORD *)&acMapName[8] = v15->currentmap.n3_code[2];
  acMapName[12] = 0;
  if ( v14 )
    SoundGroupAmbient::LoadAreaTable(v14, acMapName);
  CharMgr::RemoveAllWithoutMainChar(&g_kCharMgr);
  MainChar::ResetOnLink((MainChar *)g_pkMainChar);
  v16 = User::GetMainCharMapLoginData(&g_kUser);
  fX = (double)v16->logincoord.x;
  fY = (double)v16->logincoord.y;
  if ( World::GetAdvGroundPos(&g_kWorld, fX, fY, &kCharPos) )
  {
    v20 = (double)v16->logincoord.x;
    v19 = (double)v16->logincoord.y;
    if ( !World::IsBlock(&g_kWorld, v20, v19) )
    {
      v21 = User::GetMainCharLoginMapName(&g_kUser);
      v22 = MapInfoTab::GetByMapName(&v21->currentmap);
      if ( v22 )
      {
        *(_DWORD *)&acMapName[8] = 0;
        *(_DWORD *)&acMapName[4] = 0;
        *(_DWORD *)acMapName = 0;
        strncpy(acMapName, "Job1_Dn01", 0xCu);
        if ( v22->MapName.n3_code[0] == *(_DWORD *)acMapName
          && v22->MapName.n3_code[1] == *(_DWORD *)&acMapName[4]
          && v22->MapName.n3_code[2] == *(_DWORD *)&acMapName[8] )
        {
          v27 = (NI_PI + NI_PI) * 0.0 / 180.0;
          NiMatrix3::MakeZRotation(&v29, v27);
          NiMatrix3::operator*(&v29, (NiPoint3 *)acMapName, &World::ms_kNorthDir);
          kSouthDir = *(NiPoint3 *)acMapName;
        }
      }
      ((void (__stdcall *)(NiPoint3 *, NiPoint3 *))g_pkMainChar->vfptr[5].GetAbstateColor)(&kCharPos, &kSouthDir);
      g_pkMainChar->m_kHandle = v16->charhandle;
      ((void (*)(void))g_pkMainChar->vfptr[2].IsVisible)();
      World::AttachChar(&g_kWorld, g_pkMainChar);
      v23 = v26;
      kMsg.m_uiFrameMsg = 10;
      PgFrameWork::PostMsgToFrameWork(GameFrameWorkID, &kMsg);
      PgFrameWork::PostFrameMsgUnPop(v23);
    }
  }
}
// A8C270: using guessed type int ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable;
// B622CC: using guessed type const float NI_PI;

//----- (00629E90) --------------------------------------------------------
int __thiscall LinkFrameWork::On_NC_MAP_LOGINFAIL_ACK(LinkFrameWork *this, int iRevBytes, void *pvData)
{
  LinkFrameWork *v3; // esi@1
  char *v4; // eax@2
  MsgBox *v5; // eax@2

  v3 = this;
  if ( *(_WORD *)pvData == 327 )
  {
    CShnDataFileCheckSum::GetDataFileName(&ShnDataFile, (SHN_DATA_FILE_INDEX)*((_BYTE *)pvData + 2));
    v4 = (char *)TextData::Get(0x1B353333u);
    v5 = MsgBox::Modal(MSGBOX_OK, v4);
    PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)&v5->vfptr);
  }
  Skill::ClearLearnSkill();
  Skill::ClearLearnPassiveSkill();
  NetMgr::SendUserLogOutMsg2AllServer(&g_kNetMgr);
  PgFrameWork::PostFrameMsgChange((PgFrameWork *)&v3->vfptr, AccountFrameWorkID, 0);
  return iRevBytes;
}

//----- (00629F00) --------------------------------------------------------
int __thiscall LinkFrameWork::On_NC_MAP_LOGIN_ACK(LinkFrameWork *this, int iRevBytes, void *pvData)
{
  LinkFrameWork *v3; // esi@1
  GameFrameWork *v4; // eax@1

  v3 = this;
  User::SetMainCharMapLoginData(&g_kUser, (PROTO_NC_CHAR_MAPLOGIN_ACK *)pvData);
  LinkFrameWork::OnInitAtOtherServer(v3);
  v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  GameFrameWork::InitNet(v4);
  return iRevBytes;
}

//----- (00629F40) --------------------------------------------------------
void __thiscall LinkFrameWork::LinkFrameWork(LinkFrameWork *this)
{
  LinkFrameWork *v1; // esi@1

  v1 = this;
  this->m_pkMsgHooker = 0;
  this->m_uiMessageNum = 0;
  this->vfptr = (IDirectMessengerVtbl *)&PgFrameWork::`vftable';
  this->m_kMsgQ.m_pBase = (PgMsg::Frame *)operator new[](0x14u);
  v1->m_kMsgQ.m_uiTail = 0;
  v1->m_kMsgQ.m_uiAlloced = 1;
  v1->m_kMsgQ.m_uiHead = -1;
  v1->m_BackFrameID = 0;
  v1->m_bInit = 0;
  v1->vfptr = (IDirectMessengerVtbl *)&LinkFrameWork::`vftable';
  v1->m_spAlphaCtrl.m_pObject = 0;
  v1->m_spKeyMap.m_pObject = 0;
  v1->m_spZoneNet.m_pObject = 0;
  v1->m_kProtoNcMapLinkOtherCmd.sock.zoneip.n4_code[3] = 0;
  v1->m_kProtoNcMapLinkOtherCmd.sock.zoneip.n4_code[2] = 0;
  v1->m_kProtoNcMapLinkOtherCmd.sock.zoneip.n4_code[1] = 0;
  v1->m_kProtoNcMapLinkOtherCmd.sock.zoneip.n4_code[0] = 0;
  v1->m_pkBack = 0;
  *(_WORD *)&v1->m_bShowToolTip = 1;
}
// 970534: using guessed type void (__thiscall *PgFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B780C: using guessed type void (__thiscall *LinkFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);

//----- (00629FC0) --------------------------------------------------------
void __thiscall LinkFrameWork::ProcessMsg(LinkFrameWork *this, unsigned int uiMsg, unsigned int uiwParam, unsigned int uilParam)
{
  switch ( uiMsg )
  {
    case 0xAu:
      LinkFrameWork::OnTryConnectToZone(this);
      break;
    case 0xBu:
      LinkFrameWork::OnInitAtSameServer(this);
      break;
    case 0xEu:
      LinkFrameWork::OnMapLoginFailMsgClose(this);
      break;
    default:
      return;
  }
}

//----- (0062A010) --------------------------------------------------------
void __thiscall LinkFrameWork::NcMapLoginReq(LinkFrameWork *this)
{
  LinkFrameWork *v1; // ebx@1
  Net *v2; // ecx@1
  SHN_DATA_FILE_INDEX v3; // edi@1
  char *v4; // esi@2
  Name8 *v5; // eax@3
  PROTO_AVATARINFORMATION *v6; // eax@4
  PgNet *v7; // ecx@4
  NETCOMMAND netcmd; // [sp+10h] [bp-66Ch]@2
  PROTO_NC_MAP_LOGIN_REQ kProto; // [sp+14h] [bp-668h]@2
  int v10; // [sp+678h] [bp-4h]@2

  v1 = this;
  v2 = this->m_spZoneNet.m_pObject;
  v3 = 0;
  if ( v2 )
  {
    netcmd.protocol = 6145;
    PgNet::AddNetMsg((PgNet *)&v2->vfptr, &netcmd, 2);
    *(_QWORD *)&kProto.chardata.charid.n5_code[3] = 0i64;
    *(_QWORD *)&kProto.chardata.charid.n5_code[1] = 0i64;
    kProto.chardata.charid.n5_code[0] = 0;
    `eh vector constructor iterator'(
      kProto.checksum,
      0x20u,
      50,
      (void (__thiscall *)(void *))Name8::Name8,
      (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
    v10 = 0;
    kProto.chardata.wldmanhandle = g_kServer.m_kWorldMgrHandle;
    v4 = &kProto.checksum[0].n8_name[8];
    do
    {
      v5 = CShnDataFileCheckSum::GetDataFileCheckSum(&ShnDataFile, v3);
      *((_DWORD *)v4 - 2) = v5->n8_code[0];
      *((_DWORD *)v4 - 1) = v5->n8_code[1];
      *(_DWORD *)v4 = v5->n8_code[2];
      *((_DWORD *)v4 + 1) = v5->n8_code[3];
      *((_DWORD *)v4 + 2) = v5->n8_code[4];
      *((_DWORD *)v4 + 3) = v5->n8_code[5];
      *((_DWORD *)v4 + 4) = v5->n8_code[6];
      *((_DWORD *)v4 + 5) = v5->n8_code[7];
      ++v3;
      v4 += 32;
    }
    while ( (signed int)v3 < 50 );
    v6 = User::GetSelectedAvatarInfo(&g_kUser);
    *(_QWORD *)&kProto.chardata.charid.n5_name[0] = *(_QWORD *)&v6->name.n5_name[0];
    kProto.chardata.charid.n5_code[2] = v6->name.n5_code[2];
    v7 = (PgNet *)&v1->m_spZoneNet.m_pObject->vfptr;
    *(_QWORD *)&kProto.chardata.charid.n5_code[3] = *(_QWORD *)&v6->name.n5_code[3];
    PgNet::SendNetMsg(v7, &kProto, 1622);
    v10 = -1;
    `eh vector destructor iterator'(
      kProto.checksum,
      0x20u,
      50,
      (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
  }
}

//----- (0062A190) --------------------------------------------------------
int __thiscall LinkFrameWork::On_NC_MISC_SEED_ACK(LinkFrameWork *this, int iRevBytes, void *pvData)
{
  LinkFrameWork *v3; // esi@1

  v3 = this;
  PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  PgNet::SetSendPacketMode((PgNet *)&v3->m_spZoneNet.m_pObject->vfptr, 1);
  ((void (__stdcall *)(_DWORD))v3->m_spZoneNet.m_pObject->vfptr[3].__vecDelDtor)(*(_WORD *)pvData);
  LinkFrameWork::NcMapLoginReq(v3);
  if ( g_kNetMgr.m_spWorldMgr.m_pObject )
    Net::NcMiscGameTimeReq(g_kNetMgr.m_spWorldMgr.m_pObject);
  return iRevBytes;
}

//----- (0062A1E0) --------------------------------------------------------
int __thiscall LinkFrameWork::ProcessNetMsg(LinkFrameWork *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  int result; // eax@1
  CClientQuest *v6; // eax@13
  CClientQuest *v7; // eax@14
  CClientQuest *v8; // eax@15
  CClientQuest *v9; // eax@16

  result = 0;
  switch ( iDepart )
  {
    case 8:
      if ( iCommand == 17 )
$LN25_35:
        result = iRevBytes;
      break;
    case 2:
      if ( iCommand == 7 )
      {
        result = LinkFrameWork::On_NC_MISC_SEED_ACK(this, iRevBytes, pvData);
      }
      else if ( iCommand == 16 )
      {
        if ( *(_BYTE *)pvData == 1 )
          KQuestTimeWin::m_second = *(_WORD *)((char *)pvData + 1);
        result = iRevBytes;
      }
      break;
    case 4:
      switch ( iCommand )
      {
        case 16:
        case 17:
        case 42:
        case 72:
          goto $LN25_35;
        case 56:
          result = LinkFrameWork::On_NC_CHAR_CLIENT_BASE_CMD(iRevBytes, pvData);
          break;
        case 57:
          User::SetMainCharShapeData(&g_kUser, (PROTO_AVATAR_SHAPE_INFO *)pvData);
          result = iRevBytes;
          break;
        case 58:
          v6 = QuestDataMgr::GetQuest();
          CQuest::Recv_NC_CHAR_QUEST_DOING_CMD_ACK((CQuest *)&v6->vfptr, (PROTO_NC_CHAR_QUEST_DOING_CMD *)pvData);
          result = iRevBytes;
          break;
        case 59:
          v7 = QuestDataMgr::GetQuest();
          CQuest::Recv_NC_CHAR_QUEST_DONE_CMD_ACK((CQuest *)&v7->vfptr, (PROTO_NC_CHAR_QUEST_DONE_CMD *)pvData);
          result = iRevBytes;
          break;
        case 206:
          v8 = QuestDataMgr::GetQuest();
          CQuest::Recv_NC_CHAR_QUEST_READ_CMD_ACK((CQuest *)&v8->vfptr, (PROTO_NC_CHAR_QUEST_READ_CMD *)pvData);
          result = iRevBytes;
          break;
        case 215:
          v9 = QuestDataMgr::GetQuest();
          CQuest::Recv_NC_CHAR_QUEST_REPEAT_CMD_ACK((CQuest *)&v9->vfptr, (PROTO_NC_CHAR_QUEST_REPEAT_CMD *)pvData);
          result = iRevBytes;
          break;
        case 60:
          User::InitABState(&g_kUser, (PROTO_NC_CHAR_ABSTATE_CMD *)pvData);
          result = iRevBytes;
          break;
        case 61:
          Skill::InitSkill((PROTO_NC_CHAR_CLIENT_SKILL_CMD *)pvData);
          result = iRevBytes;
          break;
        case 71:
          result = LinkFrameWork::On_NC_CHAR_CLIENT_ITEM_CMD(iRevBytes, pvData);
          break;
        case 62:
          Skill::InitPassiveSkill((PROTO_NC_CHAR_SKILL_PASSIVE_CMD *)pvData);
          result = iRevBytes;
          break;
        case 73:
          MainChar::InitCharactorTitle((MainChar *)g_pkMainChar, (PROTO_NC_CHAR_CLIENT_CHARTITLE_CMD *)pvData);
          result = iRevBytes;
          break;
        case 74:
          result = LinkFrameWork::On_NC_CHAR_CLIENT_CHARGEDBUFF_CMD(iRevBytes, pvData);
          break;
        case 222:
          result = LinkFrameWork::On_NC_CHAR_CLIENT_COININFO_CMD(iRevBytes, pvData);
          break;
        default:
          return result;
      }
      break;
    case 6:
      if ( iCommand == 2 )
      {
        result = LinkFrameWork::On_NC_MAP_LOGIN_ACK(this, iRevBytes, pvData);
      }
      else if ( iCommand == 4 )
      {
        result = LinkFrameWork::On_NC_MAP_LOGINFAIL_ACK(this, iRevBytes, pvData);
      }
      break;
    default:
      return result;
  }
  return result;
}
// A8E1B4: using guessed type unsigned int KQuestTimeWin::m_second;

//----- (0062A4D0) --------------------------------------------------------
NiRTTI *LinkFrameWork::GetRTTI()
{
  return &LinkFrameWork::m_RTTI;
}

//----- (0062A4E0) --------------------------------------------------------
const char *LinkFrameWork::GetFrameWorkName()
{
  return LinkFrameWork::m_RTTI.m_pcName;
}

//----- (0062A4F0) --------------------------------------------------------
LinkFrameWork *__thiscall LinkFrameWork::`scalar deleting destructor'(LinkFrameWork *this, unsigned int a2)
{
  LinkFrameWork *v2; // esi@1

  v2 = this;
  LinkFrameWork::~LinkFrameWork(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0062A520) --------------------------------------------------------
char __thiscall LoadingFrameWork::InitWindow(LoadingFrameWork *this)
{
  LoadingFrameWork *v1; // esi@1
  PROTO_NC_CHAR_BASE_CMD::LoginLocation *v2; // eax@1
  MapViewInfo *v3; // edi@1
  int v5; // edi@5
  _iobuf *v6; // eax@5
  NiImageConverter *v7; // eax@10
  NiPixelData *v8; // eax@10
  NiSourceTexture *v9; // edi@11
  int v10; // ebx@16
  int v11; // ebx@17
  int *v12; // ebx@18
  int v13; // ebx@23
  _iobuf *v14; // eax@23
  NiSourceTexture *v15; // eax@28
  PgWinSpr *v16; // eax@33
  PgWinSpr *v17; // eax@33
  NiAlphaController *v18; // eax@33
  NiAlphaController *v19; // ebx@33
  NiProperty *v20; // eax@41
  NiAlphaController *v21; // ecx@41
  PgWinSpr *v22; // eax@41
  NiTexture::FormatPrefs kPrefs; // [sp+30h] [bp-124h]@12
  NiPointer<NiSourceTexture> spTexture; // [sp+3Ch] [bp-118h]@13
  NiSourceTexture *v25; // [sp+40h] [bp-114h]@11
  char acPathName[256]; // [sp+44h] [bp-110h]@5
  int v27; // [sp+150h] [bp-4h]@15

  v1 = this;
  v2 = User::GetMainCharLoginMapName(&g_kUser);
  v3 = MapViewInfoTab::GetByMapName(&v2->currentmap);
  if ( !v3 )
    return 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = (int)v3->Loading;
  sprintf(acPathName, "%sLoading\\%s.png", &Folder::m_acMenu, v5);
  v6 = fopen(acPathName, "r");
  if ( v6 )
  {
    fclose(v6);
  }
  else
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    sprintf(acPathName, "%sLoading\\%s.tga", &Folder::m_acMenu, v5);
  }
  v7 = NiImageConverter::GetImageConverter();
  v8 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v7->vfptr[2].__vecDelDtor)(
                        v7,
                        acPathName,
                        0);
  if ( v8 )
  {
    kPrefs.m_ePixelLayout = 6;
    kPrefs.m_eAlphaFmt = 3;
    kPrefs.m_eMipMapped = 0;
    v9 = NiSourceTexture::Create(v8, &kPrefs);
    v25 = v9;
  }
  else
  {
    v9 = 0;
    v25 = 0;
  }
  spTexture.m_pObject = v9;
  if ( v9 )
    InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  v27 = 0;
  if ( !v9 )
  {
    v10 = ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable
                                                             + 16))(
                            ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable,
                            0) )
    {
      v12 = *(int **)(v10 + 196);
      if ( *v12 )
        v11 = *v12;
      else
        v11 = 0;
    }
    else
    {
      v11 = 0;
    }
    if ( !Folder::m_bInit )
      Folder::Init();
    v13 = v11 + 132;
    sprintf(acPathName, "%sLoading\\%s.png", &Folder::m_acMenu, v13);
    v14 = fopen(acPathName, "r");
    if ( v14 )
    {
      fclose(v14);
    }
    else
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      sprintf(acPathName, "%sLoading\\%s.tga", &Folder::m_acMenu, v13);
    }
    v15 = PgUtil::LoadSourceTexture(acPathName);
    if ( v15 )
    {
      v9 = v15;
      spTexture.m_pObject = v15;
    }
    else
    {
      v15 = MenuTexMgr::GetTexture(2u);
      if ( v25 == v15 )
        goto LABEL_33;
      v9 = v15;
      spTexture.m_pObject = v15;
      if ( !v15 )
        goto LABEL_33;
    }
    InterlockedIncrement((volatile LONG *)&v15->m_uiRefCount);
  }
LABEL_33:
  v16 = PgWinSpr::CreateWin(0, 0, v9, 0, 0, 0, 0x400u, 0x300u, 0, 0, 0);
  v1->m_pkBack = v16;
  v16->vfptr[117].__vecDelDtor((NiRefObject *)v16, PgWin::ms_uiScreenWidth);
  ((void (__stdcall *)(unsigned int))v1->m_pkBack->vfptr[118].__vecDelDtor)(PgWin::ms_uiScreenHeight);
  ((void (__stdcall *)(_DWORD))v1->m_pkBack->vfptr[60].__vecDelDtor)(0);
  v17 = PgWinSpr::CreateWin(63, 487, v9, 0, 0, 0x30Cu, 0x1D1u, 0x4Du, 0, 0, 0);
  v1->m_pkRainbowBox = v17;
  v17->vfptr[60].__vecDelDtor((NiRefObject *)v17, 0);
  ((void (__stdcall *)(_DWORD))v1->m_pkRainbowBox->vfptr[69].__vecDelDtor)(1.0);
  v18 = PgWinAnim::CreateLoopingAlphaAnim();
  v19 = v1->m_spAlphaCtrl.m_pObject;
  v25 = (NiSourceTexture *)v18;
  if ( v19 != v18 )
  {
    if ( v19 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v19->m_uiRefCount) && v19 )
        v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
      v18 = (NiAlphaController *)v25;
    }
    v1->m_spAlphaCtrl.m_pObject = v18;
    if ( v18 )
      InterlockedIncrement((volatile LONG *)&v18->m_uiRefCount);
  }
  v20 = NiAVObject::GetProperty((NiAVObject *)&v1->m_pkRainbowBox->vfptr, 3);
  v21 = v1->m_spAlphaCtrl.m_pObject;
  v1->m_pkMaterialProp = (NiMaterialProperty *)v20;
  ((void (__stdcall *)(NiProperty *))v21->vfptr[18].__vecDelDtor)(v20);
  RewardInvItem::SetItem(
    (NiObjectNET *)&v1->m_pkMaterialProp->vfptr,
    (NiTimeController *)&v1->m_spAlphaCtrl.m_pObject->vfptr);
  v22 = PgWinSpr::CreateWin(63, 487, v9, 0, 0, 0x366u, 0x1D1u, 0x4Du, 0, 0, 0);
  v1->m_pkTextBox = v22;
  v22->vfptr[60].__vecDelDtor((NiRefObject *)v22, 0);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkBack->vfptr);
  v27 = -1;
  if ( v9 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;
// A8C270: using guessed type int ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable;

//----- (0062A8E0) --------------------------------------------------------
void __thiscall LoadingFrameWork::TerminateWindow(LoadingFrameWork *this)
{
  LoadingFrameWork *v1; // esi@1
  NiAlphaController *v2; // edi@1

  v1 = this;
  v2 = this->m_spAlphaCtrl.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spAlphaCtrl.m_pObject = 0;
  }
  if ( v1->m_pkBack )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkBack->vfptr);
    v1->m_pkBack = 0;
  }
  if ( v1->m_pkRainbowBox )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkRainbowBox->vfptr);
    v1->m_pkRainbowBox = 0;
  }
  if ( v1->m_pkTextBox )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkTextBox->vfptr);
    v1->m_pkTextBox = 0;
  }
}

//----- (0062A950) --------------------------------------------------------
char __thiscall LoadingFrameWork::InitKeyMap(LoadingFrameWork *this)
{
  LoadingFrameWork *v1; // ebx@1
  KeyMap *v2; // edi@1
  KeyMap *v3; // eax@2
  KeyMap *v4; // eax@3
  KeyMap *v5; // esi@4

  v1 = this;
  v2 = 0;
  if ( !this->m_spKeyMap.m_pObject )
  {
    v3 = (KeyMap *)operator new(0x20u);
    if ( v3 )
    {
      KeyMap::KeyMap(v3);
      v2 = v4;
    }
    v5 = v1->m_spKeyMap.m_pObject;
    if ( v5 != v2 )
    {
      if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      v1->m_spKeyMap.m_pObject = v2;
      if ( v2 )
        InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
    }
    v1->m_spKeyMap.m_pObject->m_pkFrameWork = (PgFrameWork *)v1;
  }
  return 1;
}

//----- (0062AA00) --------------------------------------------------------
void __thiscall LoadingFrameWork::TerminateKeyMap(LoadingFrameWork *this)
{
  LoadingFrameWork *v1; // edi@1
  KeyMap *v2; // esi@1

  v1 = this;
  v2 = this->m_spKeyMap.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
    v1->m_spKeyMap.m_pObject = 0;
  }
}

//----- (0062AA40) --------------------------------------------------------
char __thiscall LoadingFrameWork::Init(LoadingFrameWork *this, PgMsg::Frame *ptFrameMsg)
{
  LoadingFrameWork *v2; // esi@1
  char result; // al@2
  PgMsg::Frame kMsg; // [sp+4h] [bp-18h]@4

  v2 = this;
  if ( LoadingFrameWork::InitWindow(this) && LoadingFrameWork::InitKeyMap(v2) )
  {
    kMsg.m_uiFrameMsg = 9;
    PgFrameWork::PostMsgToMe((PgFrameWork *)&v2->vfptr, &kMsg);
    result = 1;
    v2->m_bInit = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0062AAB0) --------------------------------------------------------
void __thiscall LoadingFrameWork::Terminate(LoadingFrameWork *this)
{
  LoadingFrameWork *v1; // esi@1
  KeyMap *v2; // edi@1

  v1 = this;
  v2 = this->m_spKeyMap.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spKeyMap.m_pObject = 0;
  }
  LoadingFrameWork::TerminateWindow(v1);
  v1->m_bInit = 0;
  v1->m_BackFrameID = 0;
}

//----- (0062AB10) --------------------------------------------------------
void LoadingFrameWork::OnStartLoad()
{
  LoadingFrameWork::ms_bLoadDataComplete = 1;
}
// A96A2C: using guessed type bool LoadingFrameWork::ms_bLoadDataComplete;

//----- (0062AB20) --------------------------------------------------------
void LoadingFrameWork::Draw()
{
  PgWinMgr::Draw(&Pgg_kWinMgr, NiRenderer::ms_pkRenderer);
}

//----- (0062AB40) --------------------------------------------------------
void __thiscall LoadingFrameWork::ProcessInput(LoadingFrameWork *this)
{
  KeyMap::Process(this->m_spKeyMap.m_pObject);
}

//----- (0062AB50) --------------------------------------------------------
void __stdcall LoadingFrameWork::ProcessMsg(unsigned int uiMsg, unsigned int uiwParam, unsigned int uilParam)
{
  if ( uiMsg == 9 )
    LoadingFrameWork::ms_bLoadDataComplete = 1;
}
// A96A2C: using guessed type bool LoadingFrameWork::ms_bLoadDataComplete;

//----- (0062AB70) --------------------------------------------------------
void __thiscall LoadingFrameWork::LoadingFrameWork(LoadingFrameWork *this)
{
  LoadingFrameWork *v1; // esi@1

  v1 = this;
  this->m_pkMsgHooker = 0;
  this->m_uiMessageNum = 0;
  this->vfptr = (IDirectMessengerVtbl *)&PgFrameWork::`vftable';
  this->m_kMsgQ.m_pBase = (PgMsg::Frame *)operator new[](0x14u);
  v1->m_kMsgQ.m_uiTail = 0;
  v1->m_kMsgQ.m_uiAlloced = 1;
  v1->m_kMsgQ.m_uiHead = -1;
  v1->m_BackFrameID = 0;
  v1->m_bInit = 0;
  v1->vfptr = (IDirectMessengerVtbl *)&LoadingFrameWork::`vftable';
  v1->m_spAlphaCtrl.m_pObject = 0;
  v1->m_spKeyMap.m_pObject = 0;
  v1->m_pkBack = 0;
}
// 970534: using guessed type void (__thiscall *PgFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B78BC: using guessed type void (__thiscall *LoadingFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);

//----- (0062ABD0) --------------------------------------------------------
void __thiscall LoadingFrameWork::~LoadingFrameWork(LoadingFrameWork *this)
{
  LoadingFrameWork *v1; // edi@1
  KeyMap *v2; // esi@1
  NiAlphaController *v3; // esi@5
  PgMsg::Frame *v4; // ST00_4@9

  v1 = this;
  this->vfptr = (IDirectMessengerVtbl *)&LoadingFrameWork::`vftable';
  v2 = this->m_spKeyMap.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_spAlphaCtrl.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v4 = v1->m_kMsgQ.m_pBase;
  v1->vfptr = (IDirectMessengerVtbl *)&PgFrameWork::`vftable';
  operator delete[](v4);
}
// 970534: using guessed type void (__thiscall *PgFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B78BC: using guessed type void (__thiscall *LoadingFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);

//----- (0062AC80) --------------------------------------------------------
void __thiscall LoadingFrameWork::Update(LoadingFrameWork *this, float fCurTime)
{
  LoadingFrameWork *v2; // esi@1

  v2 = this;
  PgFrameWork::ProcessAllMsg((PgFrameWork *)&this->vfptr);
  PgWinMgr::ProcessInput(&Pgg_kWinMgr, 1);
  PgWinMgr::DispatchMessageA(&Pgg_kWinMgr);
  PgWinMgr::UpdateWin(&Pgg_kWinMgr, fCurTime);
  KeyMap::Process(v2->m_spKeyMap.m_pObject);
  KQuestTimeWin::m_second = 0;
  PrisonTimeWin::m_second = 0;
  if ( LoadingFrameWork::ms_bLoadDataComplete )
    PgFrameWork::PostFrameMsgChange((PgFrameWork *)&v2->vfptr, GameFrameWorkID, 0);
}
// A8D47C: using guessed type unsigned int PrisonTimeWin::m_second;
// A8E1B4: using guessed type unsigned int KQuestTimeWin::m_second;
// A96A2C: using guessed type bool LoadingFrameWork::ms_bLoadDataComplete;

//----- (0062ACF0) --------------------------------------------------------
NiRTTI *LoadingFrameWork::GetRTTI()
{
  return &LoadingFrameWork::m_RTTI;
}

//----- (0062AD00) --------------------------------------------------------
const char *LoadingFrameWork::GetFrameWorkName()
{
  return LoadingFrameWork::m_RTTI.m_pcName;
}

//----- (0062AD10) --------------------------------------------------------
LoadingFrameWork *__thiscall LoadingFrameWork::`scalar deleting destructor'(LoadingFrameWork *this, unsigned int a2)
{
  LoadingFrameWork *v2; // esi@1

  v2 = this;
  LoadingFrameWork::~LoadingFrameWork(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0062AD40) --------------------------------------------------------
void __thiscall ITimer::ITimer(ITimer *this)
{
  this->m_fTriggerTime = -1.0;
  this->vfptr = (ITimerVtbl *)&ITimer::`vftable';
}
// 9B7900: using guessed type int (__thiscall *ITimer::`vftable')(void *p, char);

//----- (0062AD60) --------------------------------------------------------
void __thiscall FrameWorkTimer::OnTimer(FrameWorkTimer *this)
{
  FrameWorkTimer *v1; // esi@1

  v1 = this;
  PgFrameWork::AddMsg(this->m_pkFrameWork, this->m_dwCommand, 0, 0);
  v1->vfptr->__vecDelDtor((ITimer *)v1, 1u);
}

//----- (0062AD80) --------------------------------------------------------
void __cdecl ITimer::ClearTimer()
{
  NiTListItem<NiD3DShaderInterface *> *v0; // esi@1
  NiTListItem<NiD3DShaderInterface *> *v1; // ST00_4@2

  v0 = ITimer::m_kTimerList.m_pkHead;
  if ( ITimer::m_kTimerList.m_pkHead )
  {
    do
    {
      v1 = v0;
      v0 = v0->m_pkNext;
      ITimer::m_kTimerList.vfptr->DeleteItem(
        (NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&ITimer::m_kTimerList,
        v1);
    }
    while ( v0 );
  }
  ITimer::m_kTimerList.m_kAllocator.m_uiCount = 0;
  ITimer::m_kTimerList.m_pkHead = 0;
  ITimer::m_kTimerList.m_pkTail = 0;
}

//----- (0062ADD0) --------------------------------------------------------
void __thiscall ITimer::~ITimer(ITimer *this)
{
  NiTListItem<NiD3DShaderInterface *> *v1; // eax@1
  ITimer **v2; // edx@2
  void *kCurrIter; // [sp+0h] [bp-4h]@1

  kCurrIter = this;
  this->vfptr = (ITimerVtbl *)&ITimer::`vftable';
  v1 = ITimer::m_kTimerList.m_pkHead;
  if ( ITimer::m_kTimerList.m_pkHead )
  {
    while ( 1 )
    {
      v2 = (ITimer **)&v1->m_element;
      kCurrIter = v1;
      v1 = v1->m_pkNext;
      if ( *v2 == this )
        break;
      if ( !v1 )
        return;
    }
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(&ITimer::m_kTimerList, &kCurrIter);
  }
}
// 9B7900: using guessed type int (__thiscall *ITimer::`vftable')(void *p, char);

//----- (0062AE10) --------------------------------------------------------
void __thiscall ITimer::SetTimer(ITimer *this, float fTime)
{
  ITimer *v2; // esi@1
  NiTListItem<NiD3DShaderInterface *> *v3; // eax@1

  v2 = this;
  this->m_fTriggerTime = ITimer::ms_fCurrTime + fTime;
  v3 = ITimer::m_kTimerList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&ITimer::m_kTimerList);
  v3->m_element = (NiD3DShaderInterface *)v2;
  v3->m_pkNext = 0;
  v3->m_pkPrev = ITimer::m_kTimerList.m_pkTail;
  if ( ITimer::m_kTimerList.m_pkTail )
  {
    ITimer::m_kTimerList.m_pkTail->m_pkNext = v3;
    ++ITimer::m_kTimerList.m_kAllocator.m_uiCount;
    ITimer::m_kTimerList.m_pkTail = v3;
  }
  else
  {
    ++ITimer::m_kTimerList.m_kAllocator.m_uiCount;
    ITimer::m_kTimerList.m_pkHead = v3;
    ITimer::m_kTimerList.m_pkTail = v3;
  }
}
// A96A38: using guessed type float ITimer::ms_fCurrTime;

//----- (0062AE80) --------------------------------------------------------
void __cdecl ITimer::Update(float fTime)
{
  NiTListItem<NiD3DShaderInterface *> *v1; // edx@1
  NiTListItem<NiD3DShaderInterface *> *v2; // edi@1
  double v3; // st7@2
  NiD3DShaderInterface **v4; // esi@2
  NiTListItem<NiD3DShaderInterface *> *v5; // ecx@2
  NiTListItem<NiD3DShaderInterface *> *v6; // ecx@4
  NiD3DShaderInterface *v7; // esi@5
  NiTListItem<NiD3DShaderInterface *> *v8; // eax@7
  NiTListItem<NiD3DShaderInterface *> *v9; // ecx@8
  NiTListItem<NiD3DShaderInterface *> **v10; // eax@11
  NiTListItem<NiD3DShaderInterface *> *v11; // edx@11

  v1 = ITimer::m_kTimerList.m_pkHead;
  ITimer::ms_fCurrTime = fTime;
  v2 = ITimer::m_kTimerList.m_pkHead;
  if ( ITimer::m_kTimerList.m_pkHead )
  {
    do
    {
      v3 = *(float *)&v2->m_element->m_uiRefCount;
      v4 = &v2->m_element;
      v5 = v2;
      v2 = v2->m_pkNext;
      if ( fTime >= v3 )
      {
        if ( v5 == v1 )
        {
          v6 = v1->m_pkNext;
          ITimer::m_kTimerList.m_pkHead = v6;
          if ( v6 )
          {
            v6->m_pkPrev = 0;
            v7 = v1->m_element;
            ITimer::m_kTimerList.vfptr->DeleteItem(
              (NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&ITimer::m_kTimerList,
              v1);
          }
          else
          {
            ITimer::m_kTimerList.m_pkTail = 0;
            v7 = v1->m_element;
            ITimer::m_kTimerList.vfptr->DeleteItem(
              (NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&ITimer::m_kTimerList,
              v1);
          }
        }
        else
        {
          v8 = ITimer::m_kTimerList.m_pkTail;
          if ( v5 == ITimer::m_kTimerList.m_pkTail )
          {
            v9 = ITimer::m_kTimerList.m_pkTail->m_pkPrev;
            ITimer::m_kTimerList.m_pkTail = v9;
            if ( v9 )
            {
              v9->m_pkNext = 0;
              v7 = v8->m_element;
              ITimer::m_kTimerList.vfptr->DeleteItem(
                (NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&ITimer::m_kTimerList,
                v8);
            }
            else
            {
              ITimer::m_kTimerList.m_pkHead = 0;
              v7 = v8->m_element;
              ITimer::m_kTimerList.vfptr->DeleteItem(
                (NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&ITimer::m_kTimerList,
                v8);
            }
          }
          else
          {
            v10 = &v5->m_pkPrev->m_pkNext;
            v11 = v5->m_pkNext;
            if ( v10 )
              *v10 = v11;
            if ( v11 )
              v11->m_pkPrev = (NiTListItem<NiD3DShaderInterface *> *)v10;
            v7 = *v4;
            ITimer::m_kTimerList.vfptr->DeleteItem(
              (NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&ITimer::m_kTimerList,
              v5);
          }
        }
        --ITimer::m_kTimerList.m_kAllocator.m_uiCount;
        ((void (*)(void))v7->vfptr[1].__vecDelDtor)();
        v1 = ITimer::m_kTimerList.m_pkHead;
      }
    }
    while ( v2 );
  }
}
// A96A38: using guessed type float ITimer::ms_fCurrTime;

//----- (0062AF60) --------------------------------------------------------
void __thiscall FrameWorkTimer::FrameWorkTimer(FrameWorkTimer *this, float fTime, unsigned int dwCommand, PgFrameWork *pkFrameWork)
{
  FrameWorkTimer *v4; // esi@1
  NiTListItem<NiD3DShaderInterface *> *v5; // eax@1

  v4 = this;
  this->m_fTriggerTime = -1.0;
  this->vfptr = (ITimerVtbl *)&FrameWorkTimer::`vftable';
  this->m_fTriggerTime = ITimer::ms_fCurrTime + fTime;
  v5 = ITimer::m_kTimerList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&ITimer::m_kTimerList);
  v5->m_element = (NiD3DShaderInterface *)v4;
  v5->m_pkNext = 0;
  v5->m_pkPrev = ITimer::m_kTimerList.m_pkTail;
  if ( ITimer::m_kTimerList.m_pkTail )
    ITimer::m_kTimerList.m_pkTail->m_pkNext = v5;
  else
    ITimer::m_kTimerList.m_pkHead = v5;
  ++ITimer::m_kTimerList.m_kAllocator.m_uiCount;
  ITimer::m_kTimerList.m_pkTail = v5;
  v4->m_dwCommand = dwCommand;
  v4->m_pkFrameWork = pkFrameWork;
}
// 9B793C: using guessed type int (__thiscall *FrameWorkTimer::`vftable')(void *p, char);
// A96A38: using guessed type float ITimer::ms_fCurrTime;

//----- (0062B010) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<ITimer *>,ITimer *>::~NiTListBase<DFALL<ITimer *>,ITimer *>(NiTListBase<DFALL<ITimer *>,ITimer *> *this)
{
  this->vfptr = (NiTListBase<DFALL<ITimer *>,ITimer *>Vtbl *)&NiTListBase<DFALL<ITimer *>,ITimer *>::`vftable';
}
// 9B790C: using guessed type int (__thiscall *NiTListBase<DFALL<ITimer *>,ITimer *>::`vftable')(void *p, char);

//----- (0062B020) --------------------------------------------------------
NiTListBase<DFALL<ITimer *>,ITimer *> *__thiscall NiTListBase<DFALL<ITimer *>,ITimer *>::`scalar deleting destructor'(NiTListBase<DFALL<ITimer *>,ITimer *> *this, unsigned int a2)
{
  NiTListBase<DFALL<ITimer *>,ITimer *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<ITimer *>,ITimer *>Vtbl *)&NiTListBase<DFALL<ITimer *>,ITimer *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9B790C: using guessed type int (__thiscall *NiTListBase<DFALL<ITimer *>,ITimer *>::`vftable')(void *p, char);

//----- (0062B050) --------------------------------------------------------
NiTList<ITimer *> *__thiscall NiTPointerListBase<DFALL<ITimer *>,ITimer *>::`vector deleting destructor'(NiTList<ITimer *> *this, unsigned int a2)
{
  NiTList<ITimer *> *v2; // edi@1
  NiTListItem<ITimer *> *v3; // esi@1
  NiTListItem<ITimer *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<ITimer *>,ITimer *>Vtbl *)&NiTPointerListBase<DFALL<ITimer *>,ITimer *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<DFALL<ITimer *>,ITimer *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<ITimer *>,ITimer *>Vtbl *)&NiTListBase<DFALL<ITimer *>,ITimer *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B790C: using guessed type int (__thiscall *NiTListBase<DFALL<ITimer *>,ITimer *>::`vftable')(void *p, char);
// 9B791C: using guessed type int (__thiscall *NiTPointerListBase<DFALL<ITimer *>,ITimer *>::`vftable')(void *p, char);

//----- (0062B0E0) --------------------------------------------------------
FrameWorkTimer *__thiscall FrameWorkTimer::`scalar deleting destructor'(FrameWorkTimer *this, unsigned int a2)
{
  FrameWorkTimer *v2; // esi@1
  NiTListItem<NiD3DShaderInterface *> *v3; // eax@1
  NiD3DShaderInterface **v4; // ecx@2
  void *kPos; // [sp+4h] [bp-4h]@2

  v2 = this;
  this->vfptr = (ITimerVtbl *)&ITimer::`vftable';
  v3 = ITimer::m_kTimerList.m_pkHead;
  if ( ITimer::m_kTimerList.m_pkHead )
  {
    while ( 1 )
    {
      v4 = &v3->m_element;
      kPos = v3;
      v3 = v3->m_pkNext;
      if ( (FrameWorkTimer *)*v4 == v2 )
        break;
      if ( !v3 )
        goto LABEL_6;
    }
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(&ITimer::m_kTimerList, &kPos);
  }
LABEL_6:
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B7900: using guessed type int (__thiscall *ITimer::`vftable')(void *p, char);

//----- (0062B140) --------------------------------------------------------
void __thiscall CHairShopFrameWork::OnErrorGotoAccount(CHairShopFrameWork *this)
{
  PgFrameWork::PostFrameMsgChange((PgFrameWork *)&this->vfptr, AccountFrameWorkID, 0);
}

//----- (0062B150) --------------------------------------------------------
void __thiscall CHairShopFrameWork::ChangeAvatarHair(CHairShopFrameWork *this, char byTargetHairType)
{
  CHairShopFrameWork *v2; // eax@1
  Avatar *v3; // ecx@1

  v2 = this;
  v3 = this->m_pkAvatar;
  if ( v3 )
  {
    if ( *((_BYTE *)&v2->m_kShapeData + 1) != byTargetHairType )
    {
      *((_BYTE *)&v2->m_kShapeData + 1) = byTargetHairType;
      Avatar::ChangeHairTypeShape(v3, &v2->m_kShapeData);
    }
  }
}

//----- (0062B180) --------------------------------------------------------
void __thiscall CHairShopFrameWork::ChangeAvatarHairColor(CHairShopFrameWork *this, char byTargetColor)
{
  CHairShopFrameWork *v2; // eax@1
  Avatar *v3; // ecx@1

  v2 = this;
  v3 = this->m_pkAvatar;
  if ( v3 )
  {
    if ( *((_BYTE *)&v2->m_kShapeData + 2) != byTargetColor )
    {
      *((_BYTE *)&v2->m_kShapeData + 2) = byTargetColor;
      Avatar::ChangeHairColorShape(v3, &v2->m_kShapeData);
    }
  }
}

//----- (0062B1B0) --------------------------------------------------------
void CHairShopFrameWork::OnErrorGotoExit()
{
  NetMgr::SendUserLogOutMsg2AllServer(&g_kNetMgr);
  PgFrameMgr::PostQuitMsg(&Pgg_kFrameMgr, 0);
}

//----- (0062B1D0) --------------------------------------------------------
void __thiscall CHairShopFrameWork::Draw(CHairShopFrameWork *this)
{
  CHairShopFrameWork *v1; // esi@1
  CPostProcessEffectManager *v2; // eax@2
  CPostProcessEffectManager *v3; // eax@2
  NiVisibleArray m_kVisible; // [sp+Ch] [bp-B0h]@2
  NiCullingProcess m_kCuller; // [sp+1Ch] [bp-A0h]@2
  int v6; // [sp+B8h] [bp-4h]@2

  v1 = this;
  if ( this->m_spCamera.m_pObject )
  {
    m_kVisible.m_ppkArray = 0;
    m_kVisible.m_uiCurrentSize = 0;
    m_kVisible.m_uiAllocatedSize = 0;
    m_kVisible.m_uiGrowBy = 1024;
    NiVisibleArray::SetAllocatedSize(&m_kVisible, 0x400u);
    v6 = 0;
    NiCullingProcess::NiCullingProcess(&m_kCuller, &m_kVisible);
    LOBYTE(v6) = 1;
    v2 = CPostProcessEffectManager::GetInstance();
    CPostProcessEffectManager::OnRenderSceneStart(v2);
    NiDrawScene(v1->m_spCamera.m_pObject, (NiAVObject *)&v1->m_spBackgroundScene.m_pObject->vfptr, &m_kCuller, 0);
    v3 = CPostProcessEffectManager::GetInstance();
    CPostProcessEffectManager::OnRenderSceneEnd(v3);
    PgWinMgr::Draw(&Pgg_kWinMgr, NiRenderer::ms_pkRenderer);
    LOBYTE(v6) = 0;
    NiCullingProcess::~NiCullingProcess(&m_kCuller);
    operator delete(m_kVisible.m_ppkArray);
  }
}

//----- (0062B2D0) --------------------------------------------------------
void __thiscall CHairShopFrameWork::SetDefaultLooks(CHairShopFrameWork *this)
{
  CHairShopFrameWork *v1; // esi@1
  Avatar *v2; // ecx@1
  unsigned __int8 v3; // dl@2
  char v4; // al@2
  char v5; // al@6
  char v6; // dl@6

  v1 = this;
  PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkHairShopWin->vfptr);
  v2 = v1->m_pkAvatar;
  if ( v2 )
  {
    v3 = (unsigned __int8)v1->m_kShapeData;
    v4 = v1->m_byBaseGender;
    if ( v3 >> 7 != v4
      || *((_BYTE *)&v1->m_kShapeData + 1) != v1->m_byBaseHairType
      || *((_BYTE *)&v1->m_kShapeData + 2) != v1->m_byBaseHairColor
      || *((_BYTE *)&v1->m_kShapeData + 3) != v1->m_byBaseFaceIndex )
    {
      v5 = v3 & 0x7F | (v4 << 7);
      *((_BYTE *)&v1->m_kShapeData + 1) = v1->m_byBaseHairType;
      v6 = v1->m_byBaseFaceIndex;
      v1->m_kShapeData = (PROTO_AVATAR_SHAPE_INFO)v5;
      *((_BYTE *)&v1->m_kShapeData + 2) = v1->m_byBaseHairColor;
      *((_BYTE *)&v1->m_kShapeData + 3) = v6;
      Avatar::ChangeGenderShape(v2, &v1->m_kShapeData, 2u);
      ((void (__stdcall *)(_DWORD))v1->m_pkAvatar->vfptr[17].AddAbStateByAbstateIndex)(0.0);
      NiAVObject::Update((NiAVObject *)&v1->m_pkCharNode->vfptr, 0.0, 0);
      ((void (__stdcall *)(signed int, _DWORD, _DWORD))v1->m_pkAvatar->vfptr[10].SetAbStateProperty)(102010, 0, 0);
      CharMgr::UpdateAvatar(&g_kCharMgr, 0.0);
    }
  }
}

//----- (0062B3A0) --------------------------------------------------------
void __thiscall CHairShopFrameWork::Exit(CHairShopFrameWork *this)
{
  CHairShopFrameWork *v1; // esi@1
  Net *v2; // ecx@2
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@2
  char pdata; // [sp+Bh] [bp-1h]@3

  v1 = this;
  if ( this->m_bWaitPacketReply != 1 )
  {
    v2 = this->m_spWorldMgrNet.m_pObject;
    netcmd.protocol = 3103;
    if ( v2 )
    {
      PgNet::AddNetMsg((PgNet *)&v2->vfptr, &netcmd, 2);
      PgNet::SendNetMsg((PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr, &pdata, 1);
    }
    v1->m_bWaitPacketReply = 1;
  }
}

//----- (0062B3F0) --------------------------------------------------------
void __thiscall CHairShopFrameWork::ApplyTerrain(CHairShopFrameWork *this, NiNode *pkGroundNode)
{
  NiTListItem<NiPointer<Shadow> > *v2; // ebx@1
  Shadow *v3; // esi@2
  NiNode *v4; // eax@2
  NiNode *v5; // edi@2
  NiCollisionGroup *v6; // ecx@9
  NiAVObject *pkObject; // [sp+4h] [bp-4h]@2

  v2 = this->m_kShadowList.m_pkHead;
  while ( v2 )
  {
    v3 = v2->m_element.m_pObject;
    v4 = v3->m_kDecal.m_spObTerrain.m_pObject;
    v2 = v2->m_pkNext;
    v5 = v4;
    pkObject = (NiAVObject *)&v3->m_kDecal.m_spObTerrain.m_pObject->vfptr;
    if ( v4 != pkGroundNode )
    {
      if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      v3->m_kDecal.m_spObTerrain.m_pObject = pkGroundNode;
      if ( pkGroundNode )
        InterlockedIncrement((volatile LONG *)&pkGroundNode->m_uiRefCount);
    }
    v6 = v3->m_kDecal.m_pkCollisionGroup;
    if ( v6 )
    {
      if ( pkObject )
        NiCollisionGroup::RemoveCollidee(v6, pkObject);
      if ( pkGroundNode )
        NiCollisionGroup::AddCollidee(
          v3->m_kDecal.m_pkCollisionGroup,
          (NiAVObject *)&v3->m_kDecal.m_spObTerrain.m_pObject->vfptr,
          0,
          -1,
          1);
    }
  }
}

//----- (0062B490) --------------------------------------------------------
void __thiscall CHairShopFrameWork::RenderShadow(CHairShopFrameWork *this)
{
  NsPgToonExtraData *v1; // edx@1
  bool v2; // al@1
  CHairShopFrameWork *v3; // ebx@1
  NiTListItem<NiPointer<Shadow> > *v4; // esi@1
  unsigned int v5; // eax@2
  Shadow *v6; // edi@3
  NiNode **v7; // ecx@4
  NiNode *v8; // eax@4
  Shadow *v9; // eax@7
  NiPoint3 kCharPos; // [sp+8h] [bp-18h]@4
  NsPgToonExtraData *pkToonExtraData; // [sp+14h] [bp-Ch]@1
  unsigned int i; // [sp+18h] [bp-8h]@2
  bool bOldToonFlag; // [sp+1Fh] [bp-1h]@1

  v1 = Engine3D::ms_spToonExtraData;
  v2 = Engine3D::ms_spToonExtraData->m_bOn;
  v3 = this;
  Engine3D::ms_spToonExtraData->m_bOn = 0;
  v4 = this->m_kShadowList.m_pkHead;
  pkToonExtraData = v1;
  bOldToonFlag = v2;
  if ( v4 )
  {
    v5 = 0;
    i = 0;
    if ( this->m_nMaxShadowObject )
    {
      do
      {
        v6 = v4->m_element.m_pObject;
        v4 = v4->m_pkNext;
        if ( v6 )
        {
          v7 = &v3->m_vecShadowObject._Myfirst[v5];
          v8 = *v7;
          kCharPos.x = (*v7)->m_kLocal.m_Translate.x;
          kCharPos.y = v8->m_kLocal.m_Translate.y;
          kCharPos.z = v8->m_kLocal.m_Translate.z;
          Shadow::Render(v6, *v7, &kCharPos);
          v1 = pkToonExtraData;
          v6->m_spNode.m_pObject->m_uFlags &= 0xFFFEu;
          v5 = i;
        }
        i = ++v5;
      }
      while ( v5 < v3->m_nMaxShadowObject );
    }
    for ( ; v4; v9->m_spNode.m_pObject->m_uFlags |= 1u )
    {
      v9 = v4->m_element.m_pObject;
      v4 = v4->m_pkNext;
    }
    v1->m_bOn = bOldToonFlag;
  }
}

//----- (0062B540) --------------------------------------------------------
void __thiscall CHairShopFrameWork::TurnRight(CHairShopFrameWork *this)
{
  CHairShopFrameWork *v1; // ebx@1
  Avatar *v2; // eax@1
  float v3; // ST14_4@3
  NiMatrix3 result; // [sp+14h] [bp-70h]@3
  NiMatrix3 mat3OldRot; // [sp+38h] [bp-4Ch]@3
  NiMatrix3 mat3Rot; // [sp+5Ch] [bp-28h]@3

  v1 = this;
  v2 = this->m_pkAvatar;
  if ( v2 )
  {
    if ( v2->m_spScene.m_pObject )
    {
      v3 = Timer::ms_fDeltaTime * -2.0;
      NiMatrix3::MakeZRotation(&mat3Rot, v3);
      qmemcpy(&mat3OldRot, &v1->m_spAvatarPos.m_pObject->m_kLocal, sizeof(mat3OldRot));
      qmemcpy(&mat3Rot, NiMatrix3::operator*(&mat3OldRot, &result, &mat3Rot), sizeof(mat3Rot));
      qmemcpy(&v1->m_spAvatarPos.m_pObject->m_kLocal, &mat3Rot, 0x24u);
    }
  }
}
// A8B980: using guessed type float Timer::ms_fDeltaTime;

//----- (0062B5D0) --------------------------------------------------------
void __thiscall CHairShopFrameWork::TurnLeft(CHairShopFrameWork *this)
{
  CHairShopFrameWork *v1; // ebx@1
  Avatar *v2; // eax@1
  float v3; // ST14_4@3
  NiMatrix3 result; // [sp+14h] [bp-70h]@3
  NiMatrix3 mat3OldRot; // [sp+38h] [bp-4Ch]@3
  NiMatrix3 mat3Rot; // [sp+5Ch] [bp-28h]@3

  v1 = this;
  v2 = this->m_pkAvatar;
  if ( v2 )
  {
    if ( v2->m_spScene.m_pObject )
    {
      v3 = Timer::ms_fDeltaTime + Timer::ms_fDeltaTime;
      NiMatrix3::MakeZRotation(&mat3Rot, v3);
      qmemcpy(&mat3OldRot, &v1->m_spAvatarPos.m_pObject->m_kLocal, sizeof(mat3OldRot));
      qmemcpy(&mat3Rot, NiMatrix3::operator*(&mat3OldRot, &result, &mat3Rot), sizeof(mat3Rot));
      qmemcpy(&v1->m_spAvatarPos.m_pObject->m_kLocal, &mat3Rot, 0x24u);
    }
  }
}
// A8B980: using guessed type float Timer::ms_fDeltaTime;

//----- (0062B660) --------------------------------------------------------
void __thiscall CHairShopFrameWork::ChangeAvatarFace(CHairShopFrameWork *this, char byTargetFaceType)
{
  CHairShopFrameWork *v2; // esi@1
  Avatar *v3; // ecx@3

  v2 = this;
  if ( this->m_pkAvatar )
  {
    if ( CDataReader::GetRecord(
           (CDataReader *)(ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable + 4),
           (unsigned __int8)byTargetFaceType) )
    {
      v3 = v2->m_pkAvatar;
      *((_BYTE *)&v2->m_kShapeData + 3) = byTargetFaceType;
      Avatar::ChangeFaceTextureShape(v3, &v2->m_kShapeData);
    }
  }
}
// A8869C: using guessed type int ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable;

//----- (0062B6A0) --------------------------------------------------------
void __thiscall CHairShopFrameWork::Update(CHairShopFrameWork *this, float fCurTime)
{
  CHairShopFrameWork *v2; // esi@1
  Net *v3; // ecx@1
  PgNet *v4; // ecx@3
  NiAVObject *v5; // ecx@5
  char *v6; // eax@9
  MsgBox *v7; // eax@9
  char *v8; // eax@10
  PgMsg::Frame kMsg; // [sp+14h] [bp-18h]@11

  v2 = this;
  v3 = this->m_spWorldMgrNet.m_pObject;
  if ( v3 )
    ((void (__stdcall *)(_DWORD, _DWORD))v3->vfptr[4].__vecDelDtor)(v2, 100);
  PgFrameWork::ProcessAllMsg((PgFrameWork *)&v2->vfptr);
  PgWinMgr::ProcessInput(&Pgg_kWinMgr, 1);
  PgWinMgr::DispatchMessageA(&Pgg_kWinMgr);
  PgWinMgr::UpdateWin(&Pgg_kWinMgr, fCurTime);
  CHairShopFrameWork::RenderShadow(v2);
  v4 = (PgNet *)&v2->m_spWorldMgrNet.m_pObject->vfptr;
  if ( v4 )
    PgNet::Flush(v4);
  v5 = (NiAVObject *)&v2->m_spBackgroundScene.m_pObject->vfptr;
  if ( v5 )
    NiAVObject::Update(v5, fCurTime, 1);
  if ( v2->m_spWorldMgrNet.m_pObject->m_bCut )
  {
    NetMgr::SendUserLogOutMsg2AllServer(&g_kNetMgr);
    if ( g_kServer.m_bDoubleConnected == 1 )
    {
      v6 = (char *)TextData::Get(0x16526A50u);
      v7 = MsgBox::Modal(MSGBOX_OK, v6);
      g_kServer.m_bDoubleConnected = 0;
    }
    else
    {
      v8 = (char *)TextData::Get(0xCF16104B);
      v7 = MsgBox::Modal(MSGBOX_OK, v8);
    }
    kMsg.m_uiFrameMsg = 12;
    MsgBox::SetFrameWorkMsgOnClose(v7, (PgFrameWork *)&v2->vfptr, &kMsg, 0);
  }
  if ( v2->m_bAutoTurn )
  {
    if ( v2->m_bTurnLeft )
      CHairShopFrameWork::TurnLeft(v2);
    else
      CHairShopFrameWork::TurnRight(v2);
  }
  CharMgr::UpdateAvatar(&g_kCharMgr, fCurTime);
  SoundMgr::Update(&g_kSoundMgr, fCurTime, 0);
}

//----- (0062B7D0) --------------------------------------------------------
char __thiscall CHairShopFrameWork::FindItemGrade(CHairShopFrameWork *this, bool *bChanged)
{
  CHairShopFrameWork *v2; // esi@1
  char result; // al@2
  unsigned __int8 v4; // al@3
  char v5; // bl@3
  char *v6; // eax@4
  HairInfo *v7; // eax@9
  unsigned __int8 v8; // al@13
  char *v9; // eax@14
  char *v10; // eax@20
  unsigned __int8 v11; // al@22
  bool v12; // cf@22
  char *v13; // eax@22
  char byHairGrade; // [sp+4h] [bp-4h]@3
  char byHairColorGrade; // [sp+5h] [bp-3h]@3
  char byFaceGrade; // [sp+6h] [bp-2h]@3
  char byChageState; // [sp+7h] [bp-1h]@3

  v2 = this;
  if ( this->m_byBaseGender == *(_BYTE *)&this->m_kShapeData >> 7 )
  {
    v4 = *((_BYTE *)&this->m_kShapeData + 3);
    v5 = 0;
    byHairGrade = 0;
    byHairColorGrade = 0;
    byFaceGrade = 0;
    byChageState = 0;
    if ( this->m_byBaseFaceIndex == v4 )
    {
      byChageState = 1;
    }
    else
    {
      v6 = CDataReader::GetRecord((CDataReader *)(ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable + 4), v4);
      if ( v6 )
      {
        byFaceGrade = v6[33];
        if ( byFaceGrade )
          --byFaceGrade;
      }
    }
    if ( v2->m_byBaseHairType == *((_BYTE *)&v2->m_kShapeData + 1) )
    {
      byChageState |= 2u;
    }
    else
    {
      v7 = HairInfoTab::GetHairInfo(*((_BYTE *)&v2->m_kShapeData + 1));
      if ( v7 )
      {
        v5 = v7->Grade;
        byHairGrade = v5;
        if ( v5 )
          byHairGrade = --v5;
      }
    }
    v8 = *((_BYTE *)&v2->m_kShapeData + 2);
    if ( v2->m_byBaseHairColor == v8 )
    {
      byChageState |= 4u;
    }
    else
    {
      v9 = CDataReader::GetRecord((CDataReader *)(ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable + 4), v8);
      if ( v9 )
      {
        byHairColorGrade = v9[61];
        if ( byHairColorGrade )
          --byHairColorGrade;
      }
    }
    if ( (byChageState & 7) == 7 )
    {
      *bChanged = 0;
      result = -1;
    }
    else
    {
      *bChanged = 1;
      v10 = &byHairGrade;
      if ( (unsigned __int8)byFaceGrade >= (unsigned __int8)v5 )
        v10 = &byFaceGrade;
      v11 = *v10;
      v12 = v11 < (unsigned __int8)byHairColorGrade;
      BYTE3(bChanged) = v11;
      v13 = &byHairColorGrade;
      if ( !v12 )
        v13 = (char *)&bChanged + 3;
      result = *v13;
    }
  }
  else
  {
    *bChanged = 1;
    result = 5;
  }
  return result;
}
// A8869C: using guessed type int ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable;
// A886A0: using guessed type int ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable;

//----- (0062B8E0) --------------------------------------------------------
void __thiscall CHairShopFrameWork::ChangeApply(CHairShopFrameWork *this)
{
  CHairShopFrameWork *v1; // esi@1
  char v2; // al@1
  char *v3; // eax@2
  char v4; // cl@4
  int v5; // edi@10
  char *v6; // eax@11
  int v7; // ebx@12
  int *v8; // eax@14
  int v9; // eax@15
  int v10; // ST10_4@16
  NiUnsharedGeometryGroup *v11; // eax@16
  MsgBox *v12; // eax@16
  bool bChanged; // [sp+7h] [bp-119h]@1
  PgMsg::Frame kMsg; // [sp+8h] [bp-118h]@16
  char temp[256]; // [sp+1Ch] [bp-104h]@16

  v1 = this;
  bChanged = 0;
  v2 = CHairShopFrameWork::FindItemGrade(this, &bChanged);
  if ( bChanged )
  {
    if ( (unsigned __int8)v2 < 6u )
    {
      v4 = 6;
      if ( v1->m_byBaseGender == *(_BYTE *)&v1->m_kShapeData >> 7 )
        v4 = 5;
      if ( (unsigned __int8)v2 >= (unsigned __int8)v4 )
        goto LABEL_11;
      while ( !v1->m_stItems[(unsigned __int8)v2].ItemTotalLot )
      {
        if ( (unsigned __int8)++v2 >= (unsigned __int8)v4 )
          goto LABEL_11;
      }
      v5 = v1->m_stItems[(unsigned __int8)v2].ItemID;
      if ( (_WORD)v5 != -1 )
      {
        v7 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
        if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                              + 16))(
                                ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                                v5) )
        {
          if ( (unsigned __int16)v5 <= *(_WORD *)(v7 + 200) )
          {
            v8 = (int *)(*(_DWORD *)(v7 + 196) + 4 * v5);
            if ( *v8 )
            {
              v9 = *v8;
              if ( v9 )
              {
                v10 = v9 + 34;
                v11 = TextData::Get(0x8F9E7F6E);
                sprintf(temp, (const char *)v11, v10);
                v12 = MsgBox::Modal(MSGBOX_OKCANCEL, temp);
                kMsg.m_uiFrameMsg = 10;
                MsgBox::SetFrameWorkMsgOnClose(v12, (PgFrameWork *)&v1->vfptr, &kMsg, 0);
              }
            }
          }
        }
      }
      else
      {
LABEL_11:
        v6 = (char *)TextData::Get(0x9DF1C6C1);
        MsgBox::Modal(MSGBOX_OK, v6);
      }
    }
  }
  else
  {
    v3 = (char *)TextData::Get(0x827D7D69);
    MsgBox::Modal(MSGBOX_OK, v3);
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0062BA40) --------------------------------------------------------
void __thiscall CHairShopFrameWork::ProcessMsg(CHairShopFrameWork *this, unsigned int uiMsg, unsigned int uiwParam, unsigned int uilParam)
{
  CHairShopFrameWork *v4; // esi@1
  char *v5; // eax@5
  MsgBox *v6; // eax@5
  char v7; // ST0C_1@6
  char kBaseClassID; // ST20_1@6
  unsigned int *v9; // edi@10
  std::vector<unsigned long,std::allocator<unsigned long> > vecResult; // [sp+14h] [bp-24h]@5
  int v11; // [sp+34h] [bp-4h]@6

  v4 = this;
  switch ( uiMsg )
  {
    case 9u:
      PgFrameWork::PostFrameMsgChange((PgFrameWork *)&this->vfptr, AccountFrameWorkID, 0);
      break;
    case 0xAu:
      if ( this->m_byBaseGender == *(_BYTE *)&this->m_kShapeData >> 7 )
      {
        CHairShopFrameWork::NcCharSetStyleReq(this);
      }
      else
      {
        v5 = (char *)TextData::Get(0x6889597Fu);
        v6 = MsgBox::Modal(MSGBOX_OKCANCEL, v5);
        vecResult._Myend = (unsigned int *)11;
        MsgBox::SetFrameWorkMsgOnClose(v6, (PgFrameWork *)&v4->vfptr, (PgMsg::Frame *)&vecResult, 0);
      }
      break;
    case 0xBu:
      vecResult._Mylast = 0;
      vecResult._Myend = 0;
      *(_DWORD *)&vecResult._Alval.0 = 0;
      v7 = (*(_BYTE *)&this->m_kShapeData >> 2) & 0x1F;
      v11 = 0;
      kBaseClassID = CharClass::GetBaseClassID(v7);
      std::vector<unsigned long,std::allocator<unsigned long>>::clear((std::vector<BasicInfoFind *,std::allocator<BasicInfoFind *> > *)&vecResult._Mylast);
      HairInfoTab::GetEquipableHairType(kBaseClassID, *(_BYTE *)&v4->m_kShapeData >> 7, 0, &vecResult._Mylast);
      if ( ((char *)vecResult._Myend - (char *)vecResult._Mylast) & 0xFFFFFFFC )
        CHairShopFrameWork::ChangeAvatarHair(v4, *(_BYTE *)vecResult._Mylast);
      std::vector<unsigned long,std::allocator<unsigned long>>::clear((std::vector<BasicInfoFind *,std::allocator<BasicInfoFind *> > *)&vecResult._Mylast);
      HairColorInfoTab::GetEquipableHairColor(0, &vecResult._Mylast);
      if ( ((char *)vecResult._Myend - (char *)vecResult._Mylast) & 0xFFFFFFFC )
        CHairShopFrameWork::ChangeAvatarHairColor(v4, *(_BYTE *)vecResult._Mylast);
      std::vector<unsigned long,std::allocator<unsigned long>>::clear((std::vector<BasicInfoFind *,std::allocator<BasicInfoFind *> > *)&vecResult._Mylast);
      FaceInfoTab::GetEquipableFace(0, &vecResult._Mylast);
      v9 = vecResult._Mylast;
      if ( ((char *)vecResult._Myend - (char *)vecResult._Mylast) & 0xFFFFFFFC )
        CHairShopFrameWork::ChangeAvatarFace(v4, *(_BYTE *)vecResult._Mylast);
      CHairShopFrameWork::NcCharSetStyleReq(v4);
      if ( v9 )
        operator delete(v9);
      break;
    case 0xCu:
      NetMgr::SendUserLogOutMsg2AllServer(&g_kNetMgr);
      PgFrameMgr::PostQuitMsg(&Pgg_kFrameMgr, 0);
      break;
    default:
      return;
  }
}

//----- (0062BC00) --------------------------------------------------------
void __thiscall CHairShopFrameWork::ChangeAvatarGender(CHairShopFrameWork *this, bool bIsMale)
{
  CHairShopFrameWork *v2; // esi@1
  unsigned __int8 v3; // al@3
  unsigned int *v4; // eax@12
  unsigned int *v5; // edi@12
  unsigned int *v6; // eax@16
  unsigned int *v7; // edi@16
  unsigned int *v8; // eax@20
  char v9; // cl@24
  char v10; // dl@24
  std::vector<unsigned long,std::allocator<unsigned long> > vecResult; // [sp+24h] [bp-1Ch]@4
  int v12; // [sp+3Ch] [bp-4h]@4
  char kBaseClassID; // [sp+48h] [bp+8h]@5

  v2 = this;
  if ( this->m_pkAvatar && *(_BYTE *)&this->m_kShapeData >> 7 != bIsMale )
  {
    v3 = (bIsMale << 7) | *(_BYTE *)&this->m_kShapeData & 0x7F;
    this->m_kShapeData = (PROTO_AVATAR_SHAPE_INFO)v3;
    if ( v3 >> 7 == this->m_byBaseGender )
    {
      v9 = this->m_byBaseHairColor;
      v10 = v2->m_byBaseFaceIndex;
      *((_BYTE *)&v2->m_kShapeData + 1) = v2->m_byBaseHairType;
      *((_BYTE *)&v2->m_kShapeData + 2) = v9;
      *((_BYTE *)&v2->m_kShapeData + 3) = v10;
    }
    else
    {
      vecResult._Myfirst = 0;
      vecResult._Mylast = 0;
      vecResult._Myend = 0;
      v12 = 0;
      switch ( ((unsigned int)v3 >> 2) & 0x1F )
      {
        case 1u:
        case 2u:
        case 3u:
        case 4u:
        case 5u:
          kBaseClassID = 1;
          break;
        case 6u:
        case 7u:
        case 8u:
        case 9u:
        case 0xAu:
          kBaseClassID = 6;
          break;
        case 0xBu:
        case 0xCu:
        case 0xDu:
        case 0xEu:
        case 0xFu:
          kBaseClassID = 11;
          break;
        case 0x10u:
        case 0x11u:
        case 0x12u:
        case 0x13u:
        case 0x14u:
          kBaseClassID = 16;
          break;
        case 0x15u:
        case 0x16u:
        case 0x17u:
        case 0x18u:
        case 0x19u:
          kBaseClassID = 21;
          break;
        case 0x1Au:
        case 0x1Bu:
          kBaseClassID = 26;
          break;
        default:
          kBaseClassID = 0;
          break;
      }
      HairInfoTab::GetEquipableHairType(kBaseClassID, v3 >> 7, 0, &vecResult);
      v4 = vecResult._Mylast;
      v5 = vecResult._Myfirst;
      if ( ((char *)vecResult._Mylast - (char *)vecResult._Myfirst) & 0xFFFFFFFC )
        *((_BYTE *)&v2->m_kShapeData + 1) = *(_BYTE *)vecResult._Myfirst;
      if ( v5 != v4 )
      {
        memmove((char *)v5, (char *)v4, 0);
        vecResult._Mylast = v5;
      }
      HairColorInfoTab::GetEquipableHairColor(0, &vecResult);
      v6 = vecResult._Mylast;
      v7 = vecResult._Myfirst;
      if ( ((char *)vecResult._Mylast - (char *)vecResult._Myfirst) & 0xFFFFFFFC )
        *((_BYTE *)&v2->m_kShapeData + 2) = *(_BYTE *)vecResult._Myfirst;
      if ( v7 != v6 )
      {
        memmove((char *)v7, (char *)v6, 0);
        vecResult._Mylast = v7;
      }
      FaceInfoTab::GetEquipableFace(0, &vecResult);
      v8 = vecResult._Myfirst;
      if ( ((char *)vecResult._Mylast - (char *)vecResult._Myfirst) & 0xFFFFFFFC )
        *((_BYTE *)&v2->m_kShapeData + 3) = *(_BYTE *)vecResult._Myfirst;
      v12 = -1;
      if ( v8 )
        operator delete(v8);
    }
    Avatar::ChangeGenderShape(v2->m_pkAvatar, &v2->m_kShapeData, 2u);
    ((void (__stdcall *)(_DWORD))v2->m_pkAvatar->vfptr[17].AddAbStateByAbstateIndex)(0.0);
    NiAVObject::Update((NiAVObject *)&v2->m_pkCharNode->vfptr, 0.0, 0);
    ((void (__stdcall *)(signed int, _DWORD, _DWORD))v2->m_pkAvatar->vfptr[10].SetAbStateProperty)(102010, 0, 0);
    CharMgr::UpdateAvatar(&g_kCharMgr, 0.0);
  }
}

//----- (0062BE50) --------------------------------------------------------
void __thiscall std::vector<unsigned long,std::allocator<unsigned long>>::clear(std::vector<BasicInfoFind *,std::allocator<BasicInfoFind *> > *this)
{
  std::vector<BasicInfoFind *,std::allocator<BasicInfoFind *> > *v1; // ebx@1
  char *v2; // ecx@1
  char *v3; // esi@1

  v1 = this;
  v2 = (char *)this->_Mylast;
  v3 = (char *)v1->_Myfirst;
  if ( (char *)v1->_Myfirst != v2 )
  {
    memmove(v3, v2, 0);
    v1->_Mylast = (BasicInfoFind **)v3;
  }
}

//----- (0062BE80) --------------------------------------------------------
char __thiscall CHairShopFrameWork::InitWindow(CHairShopFrameWork *this)
{
  CHairShopFrameWork *v1; // esi@1
  NiSourceTexture *v2; // eax@2
  CHairShopOkCancelWin *v3; // eax@3
  CHairShopViewCtrlWin *v4; // eax@3
  CHairShopwin *v5; // eax@3

  v1 = this;
  *(_WORD *)&this->m_bAutoTurn = 0;
  this->m_bWaitPacketReply = 0;
  if ( !g_pkToolTipWin )
  {
    v2 = MenuTexMgr::GetTexture(1u);
    g_pkToolTipWin = (PgWin *)ToolTipWin::CreateWin(v2, 7u, 7u);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, g_pkToolTipWin);
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[60].__vecDelDtor)(0);
  }
  v3 = CHairShopOkCancelWin::CreateWin((PgFrameWork *)&v1->vfptr);
  v1->m_pkHairShopOkCancelWin = v3;
  PgWinMgr::ShowWinAtAbsoluteFar(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
  v4 = CHairShopViewCtrlWin::CreateWin((PgFrameWork *)&v1->vfptr);
  v1->m_pkHairShopViewCtrlWin = v4;
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v4->vfptr);
  v5 = CHairShopwin::CreateWin((PgFrameWork *)&v1->vfptr);
  v1->m_pkHairShopWin = v5;
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v5->vfptr);
  return 1;
}

//----- (0062BF30) --------------------------------------------------------
void __thiscall CHairShopFrameWork::ClearItemInfo(CHairShopFrameWork *this)
{
  this->m_stItems[0] = (STYLE_ITEM_COUNTS)0xFFFF;
  this->m_stItems[1] = (STYLE_ITEM_COUNTS)0xFFFF;
  this->m_stItems[2] = (STYLE_ITEM_COUNTS)0xFFFF;
  this->m_stItems[3] = (STYLE_ITEM_COUNTS)0xFFFF;
  this->m_stItems[4] = (STYLE_ITEM_COUNTS)0xFFFF;
  this->m_stItems[5] = (STYLE_ITEM_COUNTS)0xFFFF;
}

//----- (0062BF70) --------------------------------------------------------
void __thiscall CHairShopFrameWork::TerminateWindow(CHairShopFrameWork *this)
{
  CHairShopFrameWork *v1; // esi@1
  unsigned int v2; // eax@9

  v1 = this;
  if ( this->m_pkHairShopWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkHairShopWin->vfptr);
    v1->m_pkHairShopWin = 0;
  }
  if ( v1->m_pkHairShopViewCtrlWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkHairShopViewCtrlWin->vfptr);
    v1->m_pkHairShopViewCtrlWin = 0;
  }
  if ( v1->m_pkHairShopOkCancelWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkHairShopOkCancelWin->vfptr);
    v1->m_pkHairShopOkCancelWin = 0;
  }
  if ( g_pkToolTipWin )
  {
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, g_pkToolTipWin);
    g_pkToolTipWin = 0;
  }
  v2 = stru_B6483C.m_uiHead;
  if ( stru_B6483C.m_uiHead != -1 )
  {
    while ( 1 )
    {
      if ( ++v2 == stru_B6483C.m_uiAlloced )
        v2 = 0;
      if ( v2 == stru_B6483C.m_uiTail )
        break;
      if ( v2 == -1 )
      {
        stru_B6483C.m_uiHead = -1;
        return;
      }
    }
    stru_B6483C.m_uiTail = 0;
    stru_B6483C.m_uiHead = -1;
  }
}

//----- (0062C020) --------------------------------------------------------
void __thiscall CHairShopFrameWork::TerminateBackgroundScene(CHairShopFrameWork *this)
{
  CHairShopFrameWork *v1; // esi@1
  NiCamera *v2; // edi@1
  NiNode *v3; // edi@6
  NiNode *v4; // edi@11
  NiCamera *v5; // edi@17
  NiNode *v6; // edi@22

  v1 = this;
  v2 = this->m_spCamera.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spCamera.m_pObject = 0;
  }
  v3 = v1->m_spCharScene.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spCharScene.m_pObject = 0;
  }
  v4 = v1->m_spBackgroundScene.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spBackgroundScene.m_pObject = 0;
  }
  if ( v1->m_spFaceCamera.m_pObject )
  {
    v5 = v1->m_spFaceCamera.m_pObject;
    if ( v5 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      v1->m_spFaceCamera.m_pObject = 0;
    }
  }
  v6 = v1->m_spShadowScene.m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    v1->m_spShadowScene.m_pObject = 0;
  }
}

//----- (0062C0F0) --------------------------------------------------------
char __thiscall CHairShopFrameWork::InitAvatar(CHairShopFrameWork *this)
{
  NsPgToonExtraData *v1; // eax@1
  CHairShopFrameWork *v2; // esi@1
  double v3; // st7@1
  NiCamera *v4; // edx@1
  PROTO_AVATAR_SHAPE_INFO *v5; // edi@1
  PROTO_AVATAR_SHAPE_INFO *v6; // eax@1
  char result; // al@2
  char v8; // al@3
  char v9; // cl@3
  char v10; // dl@3
  unsigned __int8 v11; // al@3
  Avatar *v12; // eax@3
  NiPoint3 kPos; // [sp+24h] [bp-1Ch]@3
  NiPoint3 kDir; // [sp+30h] [bp-10h]@3
  float v15; // [sp+3Ch] [bp-4h]@1

  v1 = Engine3D::ms_spToonExtraData;
  v2 = this;
  v15 = fabs(1.5);
  v3 = v15;
  v4 = this->m_spCamera.m_pObject;
  this->m_pkOldCTCamera = Engine3D::ms_spToonExtraData->m_pCamera;
  v1->m_pCamera = v4;
  this->m_spAvatarPos.m_pObject->m_kLocal.m_fScale = v3;
  this->m_spFaceAvatarPos.m_pObject->m_kLocal.m_fScale = v3;
  CHairShopFrameWork::fToonLineSize = Engine3D::ms_spToonExtraData->m_fLineSize;
  v5 = &this->m_kShapeData;
  Engine3D::ms_spToonExtraData->m_fLineSize = 0.00044999999;
  this->m_kShapeData = 0;
  v6 = User::GetMainCharShapeData(&g_kUser);
  if ( v6
    && (*v5 = *v6,
        kPos.x = 0.0,
        v8 = *((_BYTE *)&v2->m_kShapeData + 1),
        kPos.y = 0.0,
        v9 = *((_BYTE *)&v2->m_kShapeData + 2),
        kPos.z = 0.0,
        v10 = *((_BYTE *)&v2->m_kShapeData + 3),
        kDir.x = 0.0,
        v2->m_byBaseHairType = v8,
        v11 = *(_BYTE *)v5,
        kDir.y = -1.0,
        v2->m_byBaseHairColor = v9,
        kDir.z = 0.0,
        v2->m_byBaseFaceIndex = v10,
        v2->m_byBaseGender = v11 >> 7,
        CharResMgr::RemoveAllCharActor(&g_kCharResMgr),
        v12 = CharMgr::AddAvatar(&g_kCharMgr, v5, &kPos, &kDir, 2u),
        (v2->m_pkAvatar = v12) != 0) )
  {
    v2->m_pkCharNode = v12->m_spScene.m_pObject;
    ((void (__thiscall *)(Avatar *, _DWORD))v12->vfptr[17].AddAbStateByAbstateIndex)(v12, 0.0);
    NiAVObject::Update((NiAVObject *)&v2->m_pkCharNode->vfptr, 0.0, 0);
    ((void (__stdcall *)(NiNode *, _DWORD))v2->m_spAvatarPos.m_pObject->vfptr[29].__vecDelDtor)(v2->m_pkCharNode, 0);
    NiAVObject::UpdateProperties((NiAVObject *)&v2->m_spAvatarPos.m_pObject->vfptr);
    NiAVObject::UpdateEffects((NiAVObject *)&v2->m_spAvatarPos.m_pObject->vfptr);
    NiAVObject::Update((NiAVObject *)&v2->m_spAvatarPos.m_pObject->vfptr, 0.0, 1);
    ((void (__stdcall *)(signed int, _DWORD, _DWORD))v2->m_pkAvatar->vfptr[10].SetAbStateProperty)(102010, 0, 0);
    CharMgr::UpdateAvatar(&g_kCharMgr, 0.0);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A96A3C: using guessed type float CHairShopFrameWork::fToonLineSize;

//----- (0062C250) --------------------------------------------------------
void __thiscall CHairShopFrameWork::TerminateAvatar(CHairShopFrameWork *this)
{
  NsPgToonExtraData *v1; // eax@1
  CHairShopFrameWork *v2; // edi@1
  NiNode *v3; // esi@3

  v1 = Engine3D::ms_spToonExtraData;
  v2 = this;
  if ( Engine3D::ms_spToonExtraData )
  {
    Engine3D::ms_spToonExtraData->m_fLineSize = 0.0017500001;
    v1->m_pCamera = this->m_pkOldCTCamera;
  }
  v3 = this->m_spAvatarPos.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spAvatarPos.m_pObject = 0;
  }
  v2->m_pkAvatar = 0;
  CharMgr::RemoveAllWithoutMainChar(&g_kCharMgr);
}

//----- (0062C2B0) --------------------------------------------------------
char __thiscall CHairShopFrameWork::InitNet(CHairShopFrameWork *this)
{
  CHairShopFrameWork *v1; // ebx@1
  Net *v2; // esi@1
  Net *v3; // edi@1

  v1 = this;
  v2 = this->m_spWorldMgrNet.m_pObject;
  v3 = g_kNetMgr.m_spWorldMgr.m_pObject;
  if ( v2 != g_kNetMgr.m_spWorldMgr.m_pObject )
  {
    if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spWorldMgrNet.m_pObject = v3;
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
  return 1;
}

//----- (0062C300) --------------------------------------------------------
void __thiscall CHairShopFrameWork::TerminateNet(CHairShopFrameWork *this)
{
  CHairShopFrameWork *v1; // edi@1
  Net *v2; // esi@1

  v1 = this;
  v2 = this->m_spWorldMgrNet.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
    v1->m_spWorldMgrNet.m_pObject = 0;
  }
}

//----- (0062C340) --------------------------------------------------------
char __thiscall CHairShopFrameWork::InitShadow(CHairShopFrameWork *this)
{
  CHairShopFrameWork *v1; // esi@1
  NiNode *v2; // ecx@1
  NiTListItem<NiPointer<Shadow> > **v3; // edi@1
  NiTListItem<NiPointer<Shadow> > *v4; // ST30_4@2
  Shadow *v5; // eax@4
  Shadow *v6; // edi@4
  Shadow *v7; // eax@5
  NiNode *v8; // eax@11
  unsigned int v9; // edi@11
  unsigned int v10; // eax@12
  unsigned int v11; // ebx@14
  NiNode *v12; // edi@20
  float v13; // ecx@20
  int v15; // [sp+34h] [bp-34h]@0
  int v16; // [sp+38h] [bp-30h]@0
  int v17; // [sp+3Ch] [bp-2Ch]@0
  int v18; // [sp+40h] [bp-28h]@0
  NiPoint3 kDefaultDirectionalLightDir; // [sp+44h] [bp-24h]@1
  float fTime; // [sp+50h] [bp-18h]@4
  NiPointer<Shadow> spShadow; // [sp+54h] [bp-14h]@6
  unsigned int i; // [sp+58h] [bp-10h]@3
  int v23; // [sp+64h] [bp-4h]@4

  v1 = this;
  v2 = this->m_spShadowScene.m_pObject;
  kDefaultDirectionalLightDir.x = 0.0;
  kDefaultDirectionalLightDir.y = 0.0;
  v1->m_nMaxShadowObject = 1;
  kDefaultDirectionalLightDir.z = 50.0;
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v2->m_kChildren);
  v3 = &v1->m_kShadowList.m_pkHead->m_pkNext;
  while ( v3 )
  {
    v4 = (NiTListItem<NiPointer<Shadow> > *)v3;
    v3 = (NiTListItem<NiPointer<Shadow> > **)*v3;
    v1->m_kShadowList.vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> > *)&v1->m_kShadowList,
      v4);
  }
  v1->m_kShadowList.m_kAllocator.m_uiCount = 0;
  v1->m_kShadowList.m_pkHead = 0;
  v1->m_kShadowList.m_pkTail = 0;
  for ( i = 0; i < v1->m_nMaxShadowObject; ++i )
  {
    *(float *)&v5 = COERCE_FLOAT(operator new(0x84u));
    fTime = *(float *)&v5;
    v6 = 0;
    v23 = 0;
    if ( *(float *)&v5 != 0.0 )
    {
      Shadow::Shadow(v5, &kDefaultDirectionalLightDir, 0, 0, 5u);
      v6 = v7;
    }
    spShadow.m_pObject = v6;
    if ( v6 )
      InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
    v23 = 1;
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *)&v1->m_kShadowList,
      (NiPointer<NiDX92DBufferData> *)&spShadow);
    ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spShadowScene.m_pObject->vfptr[29].__vecDelDtor)(
      v6->m_spNode.m_pObject,
      0);
    v23 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  }
  *(float *)&v8 = COERCE_FLOAT(operator new(0xE8u));
  fTime = *(float *)&v8;
  v9 = 0;
  v23 = 2;
  if ( *(float *)&v8 == 0.0 )
  {
    i = 0;
  }
  else
  {
    NiNode::NiNode(v8, 0);
    i = v10;
  }
  v23 = -1;
  NiObjectNET::SetName((NiObjectNET *)i, "ShadowNode");
  v11 = v1->m_vecBGObjectNode._Mylast - v1->m_vecBGObjectNode._Myfirst;
  if ( v11 )
  {
    do
    {
      ((void (__stdcall *)(NiPointer<Shadow> *, NiNode *))v1->m_spBackgroundScene.m_pObject->vfptr[30].__vecDelDtor)(
        &spShadow,
        v1->m_vecBGObjectNode._Myfirst[v9]);
      if ( *(float *)&spShadow.m_pObject != 0.0 )
      {
        fTime = *(float *)&spShadow.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&spShadow.m_pObject->m_uiRefCount) && fTime != 0.0 )
          (**(void (__stdcall ***)(_DWORD))LODWORD(fTime))(1);
      }
      (*(void (__stdcall **)(NiNode *, _DWORD))(*(_DWORD *)i + 116))(v1->m_vecBGObjectNode._Myfirst[v9++], 0);
    }
    while ( v9 < v11 );
  }
  v12 = (NiNode *)i;
  ((void (__stdcall *)(unsigned int, _DWORD, int, int, int, int, _DWORD, _DWORD, _DWORD, _DWORD, Shadow *))v1->m_spCharScene.m_pObject->vfptr[29].__vecDelDtor)(
    i,
    0,
    v15,
    v16,
    v17,
    v18,
    LODWORD(kDefaultDirectionalLightDir.x),
    LODWORD(kDefaultDirectionalLightDir.y),
    LODWORD(kDefaultDirectionalLightDir.z),
    LODWORD(fTime),
    spShadow.m_pObject);
  spShadow.m_pObject = (Shadow *)1;
  fTime = v13;
  NiAVObject::Update((NiAVObject *)&v1->m_spCharScene.m_pObject->vfptr, 0.0, 1);
  NiAVObject::UpdateProperties((NiAVObject *)&v1->m_spCharScene.m_pObject->vfptr);
  NiAVObject::UpdateEffects((NiAVObject *)&v1->m_spCharScene.m_pObject->vfptr);
  CHairShopFrameWork::ApplyTerrain(v1, v12);
  return 1;
}

//----- (0062C560) --------------------------------------------------------
void __thiscall CHairShopFrameWork::CHairShopFrameWork(CHairShopFrameWork *this)
{
  CHairShopFrameWork *v1; // esi@1

  v1 = this;
  this->m_pkMsgHooker = 0;
  this->m_uiMessageNum = 0;
  this->vfptr = (IDirectMessengerVtbl *)&PgFrameWork::`vftable';
  this->m_kMsgQ.m_pBase = (PgMsg::Frame *)operator new[](0x14u);
  v1->m_kMsgQ.m_uiTail = 0;
  v1->m_kMsgQ.m_uiAlloced = 1;
  v1->m_kMsgQ.m_uiHead = -1;
  v1->m_BackFrameID = 0;
  v1->m_bInit = 0;
  v1->vfptr = (IDirectMessengerVtbl *)&CHairShopFrameWork::`vftable';
  v1->m_spFaceCamera.m_pObject = 0;
  v1->m_spCamera.m_pObject = 0;
  v1->m_spBackgroundScene.m_pObject = 0;
  v1->m_spCharScene.m_pObject = 0;
  v1->m_spAvatarPos.m_pObject = 0;
  v1->m_spFaceAvatarPos.m_pObject = 0;
  v1->m_spWorldMgrNet.m_pObject = 0;
  v1->m_spShadowScene.m_pObject = 0;
  v1->m_kShadowList.m_kAllocator.m_uiCount = 0;
  v1->m_kShadowList.m_pkHead = 0;
  v1->m_kShadowList.m_pkTail = 0;
  v1->m_kShadowList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> >Vtbl *)&PgTList<NiPointer<Shadow>>::`vftable';
  v1->m_vecBGObjectNode._Myfirst = 0;
  v1->m_vecBGObjectNode._Mylast = 0;
  v1->m_vecBGObjectNode._Myend = 0;
  v1->m_vecShadowObject._Myfirst = 0;
  v1->m_vecShadowObject._Mylast = 0;
  v1->m_vecShadowObject._Myend = 0;
  v1->m_pkHairShopOkCancelWin = 0;
  v1->m_pkHairShopViewCtrlWin = 0;
  v1->m_pkHairShopWin = 0;
  v1->m_pkAvatar = 0;
  *(_WORD *)&v1->m_byBaseHairColor = 0;
  v1->m_byBaseHairType = 0;
  v1->m_byBaseGender = 0;
}
// 970534: using guessed type void (__thiscall *PgFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97057C: using guessed type int (__thiscall *PgTList<NiPointer<Shadow>>::`vftable')(void *p, char);
// 9B79BC: using guessed type void (__thiscall *CHairShopFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);

//----- (0062C620) --------------------------------------------------------
void __thiscall CHairShopFrameWork::~CHairShopFrameWork(CHairShopFrameWork *this)
{
  CHairShopFrameWork *v1; // ebx@1
  int v2; // esi@5
  NiTListItem<NiPointer<Shadow> > **v3; // edi@5
  NiTListItem<NiPointer<Shadow> > **v4; // ST00_4@6
  NiNode *v5; // esi@7
  Net *v6; // esi@11
  NiNode *v7; // esi@15
  NiNode *v8; // esi@19
  NiNode *v9; // esi@23
  NiNode *v10; // esi@27
  NiCamera *v11; // esi@31
  NiCamera *v12; // esi@35
  PgMsg::Frame *v13; // ST00_4@39

  v1 = this;
  this->vfptr = (IDirectMessengerVtbl *)&CHairShopFrameWork::`vftable';
  if ( this->m_vecShadowObject._Myfirst )
    operator delete(this->m_vecShadowObject._Myfirst);
  v1->m_vecShadowObject._Myfirst = 0;
  v1->m_vecShadowObject._Mylast = 0;
  v1->m_vecShadowObject._Myend = 0;
  if ( v1->m_vecBGObjectNode._Myfirst )
    operator delete(v1->m_vecBGObjectNode._Myfirst);
  v1->m_vecBGObjectNode._Myfirst = 0;
  v1->m_vecBGObjectNode._Mylast = 0;
  v1->m_vecBGObjectNode._Myend = 0;
  v2 = (int)&v1->m_kShadowList;
  v1->m_kShadowList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> >Vtbl *)&PgTList<NiPointer<Shadow>>::`vftable';
  v3 = &v1->m_kShadowList.m_pkHead->m_pkNext;
  while ( v3 )
  {
    v4 = v3;
    v3 = (NiTListItem<NiPointer<Shadow> > **)*v3;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v2 + 8))(&v1->m_kShadowList, v4);
  }
  v1->m_kShadowList.m_kAllocator.m_uiCount = 0;
  v1->m_kShadowList.m_pkHead = 0;
  v1->m_kShadowList.m_pkTail = 0;
  *(_DWORD *)v2 = &NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable';
  v5 = v1->m_spShadowScene.m_pObject;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  v6 = v1->m_spWorldMgrNet.m_pObject;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  v7 = v1->m_spFaceAvatarPos.m_pObject;
  if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  v8 = v1->m_spAvatarPos.m_pObject;
  if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
    v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
  v9 = v1->m_spCharScene.m_pObject;
  if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
    v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
  v10 = v1->m_spBackgroundScene.m_pObject;
  if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
    v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
  v11 = v1->m_spCamera.m_pObject;
  if ( v11 && !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
    v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
  v12 = v1->m_spFaceCamera.m_pObject;
  if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
    v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
  v13 = v1->m_kMsgQ.m_pBase;
  v1->vfptr = (IDirectMessengerVtbl *)&PgFrameWork::`vftable';
  operator delete[](v13);
}
// 9703D4: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable')(void *p, char);
// 970534: using guessed type void (__thiscall *PgFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 97057C: using guessed type int (__thiscall *PgTList<NiPointer<Shadow>>::`vftable')(void *p, char);
// 9B79BC: using guessed type void (__thiscall *CHairShopFrameWork::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);

//----- (0062C830) --------------------------------------------------------
char __thiscall CHairShopFrameWork::InitBackgroundScene(CHairShopFrameWork *this)
{
  CHairShopFrameWork *v1; // edi@1
  NiNode *v2; // eax@1
  NiNode *v3; // ebx@1
  NiNode *v4; // eax@2
  NiNode *v5; // esi@3
  NiNode *v6; // esi@10
  NiNode *v7; // eax@15
  NiNode *v8; // eax@16
  NiNode *v9; // ebx@16
  NiNode *v10; // esi@18
  NiAlphaProperty *v11; // ebx@25
  NiObjectNET *v12; // eax@25
  NiAlphaProperty *v13; // esi@25
  NiObjectNET *v14; // eax@29
  int v15; // esi@29
  NiObjectNET *v16; // eax@36
  NiObjectNET *v17; // esi@36
  NiNode *v18; // eax@41
  unsigned int v19; // eax@42
  NiNode *v20; // esi@44
  NiAmbientLight *v21; // eax@52
  int v22; // eax@53
  int v23; // esi@53
  int v24; // eax@55
  NiDirectionalLight *v25; // eax@55
  int v26; // eax@56
  int v27; // esi@56
  int v28; // eax@58
  NiNode *v29; // ST70_4@58
  const char *v30; // eax@60
  NiNode *v31; // esi@60
  NiNode *v32; // esi@64
  NiNode *v34; // esi@68
  NiCamera *v35; // eax@73
  NiCamera *v36; // ebx@73
  NiShader *v37; // eax@81
  NiShader *v38; // eax@81
  NiShader *v39; // ebx@81
  unsigned int v40; // eax@86
  NiNode *v41; // eax@88
  NiShader *v42; // eax@90
  NiShader *v43; // eax@90
  NiShader *v44; // ebx@90
  NiNode *v45; // esi@90
  NiNode *v46; // eax@97
  char *v47; // eax@99
  char *v48; // ebx@99
  char *v49; // ecx@101
  char *v50; // esi@101
  NiNode *v51; // esi@103
  NiNode *v52; // esi@107
  NiPointer<NiAlphaProperty> spkAlphaProp; // [sp+98h] [bp-20h]@25
  NiNode *pkObj; // [sp+9Ch] [bp-1Ch]@27
  NiCamera *pkCamera; // [sp+A0h] [bp-18h]@61
  NiNode *v56; // [sp+A4h] [bp-14h]@27
  unsigned int _Val; // [sp+A8h] [bp-10h]@34
  int v58; // [sp+B4h] [bp-4h]@1

  v1 = this;
  v2 = (NiNode *)operator new(0xE8u);
  v3 = 0;
  v58 = 0;
  if ( v2 )
  {
    NiNode::NiNode(v2, 0);
    v3 = v4;
  }
  v5 = v1->m_spBackgroundScene.m_pObject;
  v58 = -1;
  if ( v5 != v3 )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spBackgroundScene.m_pObject = v3;
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
  v6 = v1->m_spShadowScene.m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v1->m_spShadowScene.m_pObject = 0;
  }
  v7 = (NiNode *)operator new(0xE8u);
  v58 = 1;
  if ( v7 )
  {
    NiNode::NiNode(v7, 0);
    v9 = v8;
  }
  else
  {
    v9 = 0;
  }
  v10 = v1->m_spShadowScene.m_pObject;
  v58 = -1;
  if ( v10 != v9 )
  {
    if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    v1->m_spShadowScene.m_pObject = v9;
    if ( v9 )
      InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  }
  v11 = 0;
  spkAlphaProp.m_pObject = 0;
  v58 = 2;
  v12 = (NiObjectNET *)operator new(0x20u);
  v13 = (NiAlphaProperty *)v12;
  LOBYTE(v58) = 3;
  if ( v12 )
  {
    NiObjectNET::NiObjectNET(v12);
    v13->m_ucAlphaTestRef = 0;
    v13->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
    v13->m_uFlags = 236;
    v11 = v13;
    spkAlphaProp.m_pObject = v13;
    InterlockedIncrement((volatile LONG *)&v13->m_uiRefCount);
  }
  v11->m_uFlags |= 1u;
  v11->m_uFlags |= 0x200u;
  v11->m_uFlags = v11->m_uFlags & 0xF3FF | 0x1000;
  v11->m_ucAlphaTestRef = 8;
  v11->m_uFlags = (v11->m_uFlags & 0xFE5F | 0x40) & 0xFFE3 | 2;
  v56 = v1->m_spShadowScene.m_pObject;
  pkObj = (NiNode *)v11;
  InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
  LOBYTE(v58) = 4;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v56->m_kPropertyList,
    (NiPointer<NiRoom> *)&pkObj);
  LOBYTE(v58) = 2;
  if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) )
    v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
  v14 = (NiObjectNET *)operator new(0x28u);
  v15 = (int)v14;
  LOBYTE(v58) = 5;
  if ( v14 )
  {
    NiObjectNET::NiObjectNET(v14);
    *(_DWORD *)v15 = &NiVertexColorProperty::`vftable';
    *(_WORD *)(v15 + 28) = 0;
    *(_DWORD *)(v15 + 32) = 0;
    *(_DWORD *)(v15 + 36) = 1;
  }
  else
  {
    v15 = 0;
  }
  v56 = (NiNode *)v15;
  if ( v15 )
    InterlockedIncrement((volatile LONG *)(v15 + 4));
  *(_DWORD *)(v15 + 32) = 1;
  *(_DWORD *)(v15 + 36) = 1;
  _Val = (unsigned int)v1->m_spShadowScene.m_pObject;
  pkObj = (NiNode *)v15;
  InterlockedIncrement((volatile LONG *)(v15 + 4));
  LOBYTE(v58) = 7;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(_Val + 156),
    (NiPointer<NiRoom> *)&pkObj);
  LOBYTE(v58) = 6;
  if ( !InterlockedDecrement((volatile LONG *)(v15 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v15)(v15, 1);
  v16 = (NiObjectNET *)operator new(0x30u);
  v17 = v16;
  LOBYTE(v58) = 8;
  if ( v16 )
  {
    NiObjectNET::NiObjectNET(v16);
    v17->vfptr = (NiRefObjectVtbl *)&NiFogProperty::`vftable';
    *(float *)&v17[1].m_pcName = 0.0;
    *(float *)&v17[1].m_spControllers.m_pObject = 0.0;
    *(float *)&v17[1].m_ppkExtra = 0.0;
    LOWORD(v17[1].vfptr) = 0;
    *(float *)&v17[1].m_uiRefCount = 1.0;
    *(const struct NiColor *)&v17[1].m_pcName = NiColor::BLACK;
  }
  else
  {
    v17 = 0;
  }
  LOWORD(v17[1].vfptr) &= 0xFFFEu;
  _Val = (unsigned int)v1->m_spShadowScene.m_pObject;
  pkObj = (NiNode *)v17;
  InterlockedIncrement((volatile LONG *)&v17->m_uiRefCount);
  LOBYTE(v58) = 9;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(_Val + 156),
    (NiPointer<NiRoom> *)&pkObj);
  LOBYTE(v58) = 6;
  if ( !InterlockedDecrement((volatile LONG *)&v17->m_uiRefCount) )
    v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
  v18 = (NiNode *)operator new(0xE8u);
  LOBYTE(v58) = 10;
  if ( v18 )
  {
    NiNode::NiNode(v18, 0);
    _Val = v19;
  }
  else
  {
    _Val = 0;
    v19 = 0;
  }
  v20 = v1->m_spCharScene.m_pObject;
  LOBYTE(v58) = 6;
  if ( v20 != (NiNode *)v19 )
  {
    if ( v20 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v20->m_uiRefCount) && v20 )
        v20->vfptr->__vecDelDtor((NiRefObject *)v20, 1u);
      v19 = _Val;
    }
    v1->m_spCharScene.m_pObject = (NiNode *)v19;
    if ( v19 )
      InterlockedIncrement((volatile LONG *)(v19 + 4));
  }
  v21 = (NiAmbientLight *)operator new(0x10Cu);
  LOBYTE(v58) = 11;
  if ( v21 )
  {
    NiAmbientLight::NiAmbientLight(v21);
    v23 = v22;
  }
  else
  {
    v23 = 0;
  }
  *(_DWORD *)(v23 + 188) += 2;
  *(float *)(v23 + 224) = 1.0;
  LOBYTE(v58) = 6;
  *(float *)(v23 + 228) = 0.57999998;
  *(float *)(v23 + 232) = 0.57999998;
  *(float *)(v23 + 236) = 0.57999998;
  v24 = *(_DWORD *)(v23 + 188);
  *(const struct NiColor *)(v23 + 240) = NiColor::WHITE;
  *(_DWORD *)(v23 + 188) = ++v24;
  *(const struct NiColor *)(v23 + 252) = NiColor::BLACK;
  *(_DWORD *)(v23 + 188) = v24 + 1;
  NiDynamicEffect::AttachAffectedNode((NiDynamicEffect *)v23, v1->m_spCharScene.m_pObject);
  *(_BYTE *)(v23 + 176) = 1;
  ((void (__stdcall *)(int, _DWORD))v1->m_spCharScene.m_pObject->vfptr[29].__vecDelDtor)(v23, 0);
  v25 = (NiDirectionalLight *)operator new(0x118u);
  LOBYTE(v58) = 12;
  if ( v25 )
  {
    NiDirectionalLight::NiDirectionalLight(v25);
    v27 = v26;
  }
  else
  {
    v27 = 0;
  }
  v28 = ++*(_DWORD *)(v27 + 188);
  *(float *)(v27 + 224) = 1.0;
  *(const struct NiColor *)(v27 + 228) = NiColor::BLACK;
  *(float *)(v27 + 240) = 1.0;
  *(float *)(v27 + 244) = 1.0;
  v28 += 2;
  *(_DWORD *)(v27 + 188) = v28;
  *(float *)(v27 + 248) = 1.0;
  *(const struct NiColor *)(v27 + 252) = NiColor::BLACK;
  *(_DWORD *)(v27 + 188) = v28 + 1;
  v29 = v1->m_spCharScene.m_pObject;
  LOBYTE(v58) = 6;
  NiDynamicEffect::AttachAffectedNode((NiDynamicEffect *)v27, v29);
  *(_BYTE *)(v27 + 176) = 1;
  ((void (__stdcall *)(int, _DWORD))v1->m_spCharScene.m_pObject->vfptr[29].__vecDelDtor)(v27, 0);
  LOBYTE(v58) = 13;
  if ( !Folder::m_bInit )
    Folder::Init();
  v30 = Folder::Merge(&Folder::m_acMenu, "\\shop\\HairShopBack.nif");
  v31 = PgUtil::LoadNifFile(v30, 0);
  pkObj = v31;
  if ( !v31 )
  {
    v34 = v56;
    LOBYTE(v58) = 2;
    if ( !InterlockedDecrement((volatile LONG *)&v56->m_uiRefCount) )
      v34->vfptr->__vecDelDtor((NiRefObject *)v34, 1u);
    v58 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    return 0;
  }
  InterlockedIncrement((volatile LONG *)&v31->m_uiRefCount);
  pkCamera = 0;
  if ( !PgUtil::CatchCamera((NiAVObject *)&v31->vfptr, &pkCamera) )
  {
    LOBYTE(v58) = 6;
    if ( !InterlockedDecrement((volatile LONG *)&v31->m_uiRefCount) )
      v31->vfptr->__vecDelDtor((NiRefObject *)v31, 1u);
    v32 = v56;
    LOBYTE(v58) = 2;
    if ( !InterlockedDecrement((volatile LONG *)&v56->m_uiRefCount) )
      v32->vfptr->__vecDelDtor((NiRefObject *)v32, 1u);
    v58 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) )
    {
      ((void (__thiscall *)(NiAlphaProperty *))v11->vfptr->__vecDelDtor)(v11);
      return 0;
    }
    return 0;
  }
  v35 = pkCamera;
  v36 = v1->m_spCamera.m_pObject;
  _Val = (unsigned int)pkCamera;
  if ( v36 != pkCamera )
  {
    if ( v36 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v36->m_uiRefCount) && v36 )
        v36->vfptr->__vecDelDtor((NiRefObject *)v36, 1u);
      v35 = (NiCamera *)_Val;
    }
    v1->m_spCamera.m_pObject = v35;
    if ( v35 )
      InterlockedIncrement((volatile LONG *)&v35->m_uiRefCount);
  }
  v37 = (NiShader *)v31->vfptr[18].__vecDelDtor((NiRefObject *)v31, (unsigned int)"Avatar01");
  v38 = CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v37);
  v39 = (NiShader *)v1->m_spAvatarPos.m_pObject;
  _Val = (unsigned int)v38;
  if ( v39 != v38 )
  {
    if ( v39 && !InterlockedDecrement((volatile LONG *)&v39->m_uiRefCount) && v39 )
      v39->vfptr->__vecDelDtor((NiRefObject *)v39, 1u);
    v40 = _Val;
    v1->m_spAvatarPos.m_pObject = (NiNode *)_Val;
    if ( v40 )
      InterlockedIncrement((volatile LONG *)(v40 + 4));
  }
  v41 = v1->m_spAvatarPos.m_pObject;
  if ( v41 )
    ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spCharScene.m_pObject->vfptr[29].__vecDelDtor)(v41, 0);
  v42 = (NiShader *)v31->vfptr[18].__vecDelDtor((NiRefObject *)v31, (unsigned int)"Avatar_Face");
  v43 = CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v42);
  v44 = (NiShader *)v1->m_spFaceAvatarPos.m_pObject;
  v45 = (NiNode *)v43;
  if ( v44 != v43 )
  {
    if ( v44 && !InterlockedDecrement((volatile LONG *)&v44->m_uiRefCount) && v44 )
      v44->vfptr->__vecDelDtor((NiRefObject *)v44, 1u);
    v1->m_spFaceAvatarPos.m_pObject = v45;
    if ( v45 )
      InterlockedIncrement((volatile LONG *)&v45->m_uiRefCount);
  }
  v46 = v1->m_spFaceAvatarPos.m_pObject;
  if ( v46 )
    ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spCharScene.m_pObject->vfptr[29].__vecDelDtor)(v46, 0);
  ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spBackgroundScene.m_pObject->vfptr[29].__vecDelDtor)(pkObj, 0);
  ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spBackgroundScene.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spCharScene.m_pObject,
    0);
  v47 = (char *)v1->m_vecShadowObject._Mylast;
  v48 = (char *)v1->m_vecShadowObject._Myfirst;
  if ( v48 != v47 )
  {
    _Val = 0;
    memmove(v48, v47, 0);
    v1->m_vecShadowObject._Mylast = (NiNode **)&v48[_Val];
  }
  _Val = (unsigned int)v1->m_spAvatarPos.m_pObject;
  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
    (std::vector<unsigned long,std::allocator<unsigned long> > *)&v1->m_vecShadowObject,
    &_Val);
  v49 = (char *)v1->m_vecBGObjectNode._Mylast;
  v50 = (char *)v1->m_vecBGObjectNode._Myfirst;
  if ( v50 != v49 )
  {
    _Val = 0;
    memmove(v50, v49, 0);
    v1->m_vecBGObjectNode._Mylast = (NiNode **)&v50[_Val];
  }
  v51 = pkObj;
  pkObj = (NiNode *)pkObj->vfptr[18].__vecDelDtor((NiRefObject *)pkObj, (unsigned int)"Object33");
  if ( pkObj )
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v1->m_vecBGObjectNode,
      (const unsigned int *)&pkObj);
  ((void (__stdcall *)(_DWORD, _DWORD))v1->m_spCharScene.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spShadowScene.m_pObject,
    0);
  NiAVObject::UpdateProperties((NiAVObject *)&v1->m_spBackgroundScene.m_pObject->vfptr);
  NiAVObject::UpdateEffects((NiAVObject *)&v1->m_spBackgroundScene.m_pObject->vfptr);
  NiAVObject::Update((NiAVObject *)&v1->m_spBackgroundScene.m_pObject->vfptr, 0.0, 1);
  LOBYTE(v58) = 6;
  if ( !InterlockedDecrement((volatile LONG *)&v51->m_uiRefCount) )
    v51->vfptr->__vecDelDtor((NiRefObject *)v51, 1u);
  v52 = v56;
  LOBYTE(v58) = 2;
  if ( !InterlockedDecrement((volatile LONG *)&v56->m_uiRefCount) )
    v52->vfptr->__vecDelDtor((NiRefObject *)v52, 1u);
  v58 = -1;
  if ( !InterlockedDecrement((volatile LONG *)&spkAlphaProp.m_pObject->m_uiRefCount) )
    spkAlphaProp.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spkAlphaProp.m_pObject, 1u);
  return 1;
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);
// 9704EC: using guessed type int (__thiscall *NiFogProperty::`vftable')(void *p, char);
// A7D11C: using guessed type const struct NiColor NiColor::WHITE;
// A8975C: using guessed type bool Folder::m_bInit;
// B6243C: using guessed type const struct NiColor NiColor::BLACK;

//----- (0062D130) --------------------------------------------------------
void __thiscall CHairShopFrameWork::ReleaseShadow(CHairShopFrameWork *this)
{
  CHairShopFrameWork *v1; // esi@1
  char *v2; // ecx@1
  char *v3; // edi@1
  char *v4; // ecx@3
  char *v5; // edi@3
  int v6; // edi@5
  NiTListItem<NiPointer<Shadow> > **v7; // esi@5
  NiTListItem<NiPointer<Shadow> > **v8; // ST08_4@6

  v1 = this;
  v2 = (char *)this->m_vecBGObjectNode._Mylast;
  v3 = (char *)v1->m_vecBGObjectNode._Myfirst;
  if ( v3 != v2 )
  {
    memmove(v3, v2, 0);
    v1->m_vecBGObjectNode._Mylast = (NiNode **)v3;
  }
  v4 = (char *)v1->m_vecShadowObject._Mylast;
  v5 = (char *)v1->m_vecShadowObject._Myfirst;
  if ( v5 != v4 )
  {
    memmove(v5, v4, 0);
    v1->m_vecShadowObject._Mylast = (NiNode **)v5;
  }
  v6 = (int)&v1->m_kShadowList;
  v7 = &v1->m_kShadowList.m_pkHead->m_pkNext;
  while ( v7 )
  {
    v8 = v7;
    v7 = (NiTListItem<NiPointer<Shadow> > **)*v7;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v6 + 8))(v6, v8);
  }
  *(_DWORD *)(v6 + 12) = 0;
  *(_DWORD *)(v6 + 4) = 0;
  *(_DWORD *)(v6 + 8) = 0;
}

//----- (0062D1C0) --------------------------------------------------------
char __thiscall CHairShopFrameWork::Init(CHairShopFrameWork *this, PgMsg::Frame *ptFrameMsg)
{
  CHairShopFrameWork *v2; // esi@1
  char result; // al@2
  CHairShopFrameWork *v4; // ecx@7
  char *v5; // eax@7
  const char *v6; // ST04_4@7
  CDataDocument *v7; // eax@7

  v2 = this;
  if ( CHairShopFrameWork::InitBackgroundScene(this)
    && CHairShopFrameWork::InitAvatar(v2)
    && CHairShopFrameWork::InitWindow(v2)
    && CHairShopFrameWork::InitNet(v2)
    && CHairShopFrameWork::InitShadow(v2) )
  {
    v2->m_bInit = 1;
    CHairShopFrameWork::ClearItemInfo(v2);
    CHairShopFrameWork::NcCharSetStyleItemInfoReq(v4);
    v5 = Folder::Menu();
    v6 = Folder::Merge(v5, "\\shop\\shop.conf");
    v7 = CDataDocument::Instance();
    CDataDocument::Load(v7, v6);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0062D240) --------------------------------------------------------
void __thiscall CHairShopFrameWork::Terminate(CHairShopFrameWork *this)
{
  CHairShopFrameWork *v1; // esi@1
  Net *v2; // edi@1
  NsPgToonExtraData *v3; // eax@6
  NiNode *v4; // edi@8

  v1 = this;
  CHairShopFrameWork::ReleaseShadow(this);
  v2 = v1->m_spWorldMgrNet.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spWorldMgrNet.m_pObject = 0;
  }
  CHairShopFrameWork::TerminateWindow(v1);
  v3 = Engine3D::ms_spToonExtraData;
  if ( Engine3D::ms_spToonExtraData )
  {
    Engine3D::ms_spToonExtraData->m_fLineSize = 0.0017500001;
    v3->m_pCamera = v1->m_pkOldCTCamera;
  }
  v4 = v1->m_spAvatarPos.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spAvatarPos.m_pObject = 0;
  }
  v1->m_pkAvatar = 0;
  CharMgr::RemoveAllWithoutMainChar(&g_kCharMgr);
  CHairShopFrameWork::TerminateBackgroundScene(v1);
  v1->m_bInit = 0;
  v1->m_BackFrameID = 0;
}

//----- (0062D2E0) --------------------------------------------------------
NiRTTI *CHairShopFrameWork::GetRTTI()
{
  return &CHairShopFrameWork::m_RTTI;
}

//----- (0062D2F0) --------------------------------------------------------
const char *CHairShopFrameWork::GetFrameWorkName()
{
  return CHairShopFrameWork::m_RTTI.m_pcName;
}

//----- (0062D300) --------------------------------------------------------
CHairShopFrameWork *__thiscall CHairShopFrameWork::`vector deleting destructor'(CHairShopFrameWork *this, unsigned int a2)
{
  CHairShopFrameWork *v2; // esi@1

  v2 = this;
  CHairShopFrameWork::~CHairShopFrameWork(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0062D330) --------------------------------------------------------
int __stdcall CHairShopFrameWork::On_NC_USER_CONNECTCUT_CMD(int iRevBytes, void *pvData)
{
  int result; // eax@1

  result = iRevBytes;
  if ( *(_WORD *)pvData == 1667 )
    g_kServer.m_bDoubleConnected = 1;
  return result;
}

//----- (0062D350) --------------------------------------------------------
int __thiscall CHairShopFrameWork::On_NC_CHAR_SET_STYLE_GET_INFO_ACK(CHairShopFrameWork *this, int iRevBytes, void *pvData)
{
  if ( *(_WORD *)pvData == 4736 )
  {
    this->m_stItems[0].ItemID = *((_WORD *)pvData + 1);
    this->m_stItems[0].ItemTotalLot = *((_WORD *)pvData + 2);
    this->m_stItems[1].ItemID = *((_WORD *)pvData + 3);
    this->m_stItems[1].ItemTotalLot = *((_WORD *)pvData + 4);
    this->m_stItems[2].ItemID = *((_WORD *)pvData + 5);
    this->m_stItems[2].ItemTotalLot = *((_WORD *)pvData + 6);
    this->m_stItems[3].ItemID = *((_WORD *)pvData + 7);
    this->m_stItems[3].ItemTotalLot = *((_WORD *)pvData + 8);
    this->m_stItems[4].ItemID = *((_WORD *)pvData + 9);
    this->m_stItems[4].ItemTotalLot = *((_WORD *)pvData + 10);
    this->m_stItems[5].ItemID = *((_WORD *)pvData + 11);
    this->m_stItems[5].ItemTotalLot = *((_WORD *)pvData + 12);
  }
  return iRevBytes;
}

//----- (0062D3F0) --------------------------------------------------------
void __thiscall CHairShopFrameWork::NcCharSetStyleReq(CHairShopFrameWork *this)
{
  CHairShopFrameWork *v1; // esi@1
  Net *v2; // ecx@1
  PgNet *v3; // ecx@2
  PROTO_NC_CHAR_SET_STYLE_REQ kProto; // [sp+4h] [bp-8h]@2
  NETCOMMAND netcmd; // [sp+8h] [bp-4h]@2

  v1 = this;
  v2 = this->m_spWorldMgrNet.m_pObject;
  if ( v2 )
  {
    netcmd.protocol = 4216;
    PgNet::AddNetMsg((PgNet *)&v2->vfptr, &netcmd, 2);
    v3 = (PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr;
    kProto.Info = v1->m_kShapeData;
    PgNet::SendNetMsg(v3, &kProto, 4);
  }
}

//----- (0062D430) --------------------------------------------------------
void __thiscall CHairShopFrameWork::NcCharSetStyleItemInfoReq(CHairShopFrameWork *this)
{
  CHairShopFrameWork *v1; // esi@1
  Net *v2; // ecx@1
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@2
  char pdata; // [sp+Bh] [bp-1h]@2

  v1 = this;
  v2 = this->m_spWorldMgrNet.m_pObject;
  if ( v2 )
  {
    netcmd.protocol = 4220;
    PgNet::AddNetMsg((PgNet *)&v2->vfptr, &netcmd, 2);
    PgNet::SendNetMsg((PgNet *)&v1->m_spWorldMgrNet.m_pObject->vfptr, &pdata, 1);
  }
}

//----- (0062D470) --------------------------------------------------------
int __thiscall CHairShopFrameWork::On_NC_USER_LOGINWORLD_ACK(CHairShopFrameWork *this, int iRevBytes, void *pvData)
{
  CHairShopFrameWork *v3; // esi@1

  v3 = this;
  g_kServer.m_kWorldMgrHandle = *(_WORD *)pvData;
  User::SetAvatarInfo(&g_kUser, (PROTO_AVATARINFORMATION *)((char *)pvData + 3), *((_BYTE *)pvData + 2));
  Net::NcMiscGameTimeReq(v3->m_spWorldMgrNet.m_pObject);
  PgFrameWork::PostFrameMsgChange((PgFrameWork *)&v3->vfptr, CharSelectFrameWorkID, 0);
  return iRevBytes;
}

//----- (0062D4C0) --------------------------------------------------------
int __thiscall CHairShopFrameWork::On_NC_CHAR_SET_STYLE_ACK(CHairShopFrameWork *this, int iRevBytes, void *pvData)
{
  int v3; // eax@1
  CHairShopFrameWork *v4; // esi@1
  int v5; // ST10_4@4
  NiUnsharedGeometryGroup *v6; // ST0C_4@4
  char *v7; // eax@4
  int result; // eax@5
  int v9; // ST10_4@6
  NiUnsharedGeometryGroup *v10; // ST0C_4@6
  char *v11; // eax@3
  char *v12; // eax@9
  char v13; // al@9
  unsigned __int16 v14; // cx@10
  unsigned __int16 *v15; // eax@10
  char v16; // dl@12
  char v17; // al@12
  char v18; // cl@12

  v3 = *(_WORD *)pvData;
  v4 = this;
  if ( (_WORD)v3 == 4736 )
  {
    v12 = (char *)TextData::Get(0xA68A81BF);
    MsgBox::Modal(MSGBOX_OK, v12);
    BYTE3(pvData) = 0;
    v13 = CHairShopFrameWork::FindItemGrade(v4, (bool *)&pvData + 3);
    if ( (unsigned __int8)v13 < 6u )
    {
      v14 = v4->m_stItems[(unsigned __int8)v13].ItemTotalLot;
      v15 = &v4->m_stItems[(unsigned __int8)v13].ItemTotalLot;
      if ( v14 )
        *v15 = v14 - 1;
    }
    v16 = *((_BYTE *)&v4->m_kShapeData + 2);
    v17 = *((_BYTE *)&v4->m_kShapeData + 1);
    v4->m_byBaseFaceIndex = *((_BYTE *)&v4->m_kShapeData + 3);
    v18 = *(_BYTE *)&v4->m_kShapeData >> 7;
    v4->m_byBaseHairColor = v16;
    v4->m_byBaseHairType = v17;
    v4->m_byBaseGender = v18;
LABEL_13:
    result = iRevBytes;
  }
  else
  {
    switch ( v3 )
    {
      case 4739:
        v11 = (char *)TextData::Get(0x9DF1C6C1);
        goto LABEL_8;
      case 4737:
      case 4738:
        v5 = *(_WORD *)pvData;
        v6 = TextData::Get(0xD4D93C40);
        v7 = fs("%s(%d)", v6, v5);
        goto LABEL_5;
      case 4740:
        v9 = *(_WORD *)pvData;
        v10 = TextData::Get(0x94E7E8D1);
        v7 = fs("%s(%d)", v10, v9);
LABEL_5:
        MsgBox::Modal(MSGBOX_OK, v7);
        result = iRevBytes;
        break;
      case 4742:
        v11 = (char *)TextData::Get(0x382D6040u);
LABEL_8:
        MsgBox::Modal(MSGBOX_OK, v11);
        result = iRevBytes;
        break;
      default:
        goto LABEL_13;
    }
  }
  return result;
}

//----- (0062D5E0) --------------------------------------------------------
int __thiscall CHairShopFrameWork::ProcessNetMsg(CHairShopFrameWork *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  int result; // eax@1

  result = 0;
  if ( iDepart == 3 )
  {
    if ( iCommand == 20 )
    {
      result = CHairShopFrameWork::On_NC_USER_LOGINWORLD_ACK(this, iRevBytes, pvData);
    }
    else if ( iCommand != 21 && iCommand == 23 )
    {
      if ( *(_WORD *)pvData == 1667 )
        g_kServer.m_bDoubleConnected = 1;
      result = iRevBytes;
    }
  }
  else if ( iDepart == 4 )
  {
    if ( iCommand == 121 )
    {
      result = CHairShopFrameWork::On_NC_CHAR_SET_STYLE_ACK(this, iRevBytes, pvData);
    }
    else if ( iCommand == 125 )
    {
      result = CHairShopFrameWork::On_NC_CHAR_SET_STYLE_GET_INFO_ACK(this, iRevBytes, pvData);
    }
  }
  return result;
}

//----- (0062D660) --------------------------------------------------------
void __thiscall CHairShopOkCancelWin::CHairShopOkCancelWin(CHairShopOkCancelWin *this)
{
  CHairShopOkCancelWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&CHairShopOkCancelWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CHairShopOkCancelWin::`vftable'{for `IDirectMessenger'};
}
// 9B7AD4: using guessed type void (__thiscall *CHairShopOkCancelWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B7AF4: using guessed type int (__thiscall *CHairShopOkCancelWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0062D680) --------------------------------------------------------
void __thiscall CHairShopOkCancelWin::~CHairShopOkCancelWin(CHairShopOkCancelWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&CHairShopOkCancelWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CHairShopOkCancelWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9B7AD4: using guessed type void (__thiscall *CHairShopOkCancelWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B7AF4: using guessed type int (__thiscall *CHairShopOkCancelWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0062D6A0) --------------------------------------------------------
void __thiscall CHairShopOkCancelWin::UpdateMeWin(CHairShopOkCancelWin *this, float fCurTime)
{
  CHairShopOkCancelWin *v2; // esi@1
  PgWinBut *v3; // ecx@3

  v2 = this;
  if ( this->m_dwBtnDelay )
  {
    if ( timeGetTime() - this->m_dwBtnDelay > 0x3E8 )
    {
      v3 = v2->m_pkApplyBut;
      v2->m_dwBtnDelay = 0;
      ((void (__stdcall *)(_DWORD))v3->vfptr[60].__vecDelDtor)(1);
    }
  }
}

//----- (0062D6E0) --------------------------------------------------------
void __thiscall CHairShopOkCancelWin::OnCmdApply(CHairShopOkCancelWin *this)
{
  CHairShopOkCancelWin *v1; // esi@1

  v1 = this;
  if ( !this->m_dwBtnDelay )
  {
    CHairShopFrameWork::ChangeApply((CHairShopFrameWork *)this->m_pkFrameWork);
    ((void (__stdcall *)(_DWORD))v1->m_pkApplyBut->vfptr[60].__vecDelDtor)(0);
    v1->m_dwBtnDelay = timeGetTime();
  }
}

//----- (0062D720) --------------------------------------------------------
void __thiscall CHairShopOkCancelWin::OnCmdCancel(CHairShopOkCancelWin *this)
{
  CHairShopFrameWork::Exit((CHairShopFrameWork *)this->m_pkFrameWork);
}

//----- (0062D730) --------------------------------------------------------
void __thiscall CHairShopOkCancelWin::OnCmdSetDefault(CHairShopOkCancelWin *this)
{
  CHairShopFrameWork::SetDefaultLooks((CHairShopFrameWork *)this->m_pkFrameWork);
}

//----- (0062D740) --------------------------------------------------------
char __thiscall CHairShopOkCancelWin::Create(CHairShopOkCancelWin *this, PgFrameWork *pkFrameWork)
{
  CHairShopOkCancelWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  int v8; // ebx@10
  int v9; // edi@10
  int iOffX; // ST3C_4@10
  PgSprData *v11; // eax@10
  PgWinSpr *v12; // ST20_4@10
  PgFont *v13; // ST1C_4@10
  unsigned int v14; // ST18_4@10
  unsigned int v15; // eax@10
  PgWinText *v16; // eax@10
  NiRefObjectVtbl *v17; // edi@10
  PgFont *v18; // eax@10
  NiRefObjectVtbl *v19; // edi@10
  NiUnsharedGeometryGroup *v20; // eax@10
  PgSprData *v21; // eax@10
  PgWinSpr *v22; // edi@10
  NiRefObjectVtbl *v23; // ebx@10
  int v24; // eax@10
  NiRefObjectVtbl *v25; // ST40_4@10
  int v26; // ebx@10
  int v27; // eax@10
  PgSprData *v28; // edi@10
  int v29; // ebx@10
  PgWinBut *v30; // eax@10
  PgWinBut *v31; // edi@10
  PgWin *v32; // ST20_4@10
  PgFont *v33; // ST1C_4@10
  unsigned int v34; // ST18_4@10
  unsigned int v35; // eax@10
  PgWinText *v36; // eax@10
  NiRefObjectVtbl *v37; // edi@10
  NiUnsharedGeometryGroup *v38; // eax@10
  NiRefObjectVtbl *v39; // edi@10
  PgFont *v40; // eax@10
  PgSprData *v41; // edi@10
  PgWinBut *v42; // ST20_4@10
  PgFont *v43; // ST1C_4@10
  unsigned int v44; // ST18_4@10
  unsigned int v45; // eax@10
  PgWinText *v46; // edi@10
  int v47; // ST3C_4@10
  PgFont *v48; // eax@10
  int v49; // ST3C_4@10
  NiUnsharedGeometryGroup *v50; // eax@10
  PgSprData *v51; // edi@10
  PgWinBut *v52; // ST20_4@10
  PgWinBut *v53; // edi@10
  PgFont *v54; // ST1C_4@10
  unsigned int v55; // ST18_4@10
  unsigned int v56; // eax@10
  PgWinText *v57; // eax@10
  NiRefObjectVtbl *v58; // edi@10
  PgFont *v59; // eax@10
  NiRefObjectVtbl *v60; // edi@10
  NiUnsharedGeometryGroup *v61; // eax@10
  NiRefObjectVtbl *v62; // edi@10
  int v63; // eax@10
  int v64; // eax@10
  NiNode *v65; // esi@11
  int uiLeft; // [sp+18h] [bp-18h]@4
  int uiTop; // [sp+1Ch] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+20h] [bp-10h]@1
  int v69; // [sp+2Ch] [bp-4h]@1
  int iOffY; // [sp+38h] [bp+8h]@10

  v2 = this;
  this->m_dwBtnDelay = 0;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v69 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "\\shop\\ShopPanel.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "CHairShopOkCancelWin", 0) )
  {
    v6 = spNode.m_pObject;
    v69 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = uiLeft;
  v9 = uiTop;
  iOffX = uiLeft;
  iOffY = uiTop;
  v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextPanel", &uiLeft, &uiTop, 0);
  v12 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v11, (PgWin *)&v2->vfptr, 0, 0);
  v13 = Font::Get(0);
  v14 = ((int (__thiscall *)(PgWinSpr *))v12->vfptr[37].__vecDelDtor)(v12);
  v15 = ((int (__thiscall *)(PgWinSpr *))v12->vfptr[36].__vecDelDtor)(v12);
  v16 = PgWinText::CreateWin(0, 2, v15, v14, v13, (PgWin *)&v12->vfptr, 0, 0);
  v2->m_pkBeautyShopTextWin = v16;
  v16->vfptr[122].__vecDelDtor((NiRefObject *)v16, 0);
  ((void (__stdcall *)(_DWORD))v2->m_pkBeautyShopTextWin->vfptr[60].__vecDelDtor)(0);
  SpScreenText::SetVerticalGap((SpScreenText *)&v2->m_pkBeautyShopTextWin->m_spTextGeom.m_pObject->vfptr, 6);
  v17 = v2->m_pkBeautyShopTextWin->vfptr;
  v18 = Font::Get(MENU);
  v17[113].__vecDelDtor((NiRefObject *)v2->m_pkBeautyShopTextWin, (unsigned int)v18);
  v19 = v2->m_pkBeautyShopTextWin->vfptr;
  v20 = TextData::Get(0x8097C8D5);
  v19[118].__vecDelDtor((NiRefObject *)v2->m_pkBeautyShopTextWin, (unsigned int)v20);
  v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane01", &uiLeft, &uiTop, 0);
  v22 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - iOffY, v21, (PgWin *)&v2->vfptr, 0, 0);
  v22->vfptr[60].__vecDelDtor((NiRefObject *)v22, 0);
  v23 = v22->vfptr;
  v24 = ((int (__thiscall *)(CHairShopOkCancelWin *))v2->vfptr[36].__vecDelDtor)(v2);
  v23[43].__vecDelDtor((NiRefObject *)v22, v24 - PgWin::ms_uiScreenWidth);
  v25 = v22->vfptr;
  v26 = ((int (__thiscall *)(PgWinSpr *))v22->vfptr[37].__vecDelDtor)(v22);
  v27 = ((int (__thiscall *)(CHairShopOkCancelWin *))v2->vfptr[37].__vecDelDtor)(v2);
  v25[44].__vecDelDtor((NiRefObject *)v22, v27 - v26);
  v28 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PrePageNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v28, (NiAVObject *)&spNode.m_pObject->vfptr, "PrePageClick");
  PgSprData::Add(v28, (NiAVObject *)&spNode.m_pObject->vfptr, "PrePageOver");
  v29 = iOffX;
  v30 = PgWinBut::CreateWin(uiLeft - iOffX, uiTop - iOffY, v28, (PgWin *)&v2->vfptr, 0, 0, 0);
  v2->m_pkApplyBut = v30;
  v30->m_bEnableClickSound = 0;
  v31 = v2->m_pkApplyBut;
  v32 = (PgWin *)&v2->m_pkApplyBut->vfptr;
  v33 = Font::Get(0);
  v34 = ((int (__thiscall *)(PgWinBut *))v31->vfptr[37].__vecDelDtor)(v31);
  v35 = ((int (__thiscall *)(PgWinBut *))v31->vfptr[36].__vecDelDtor)(v31);
  v36 = PgWinText::CreateWin(0, 3, v35, v34, v33, v32, 0, 0);
  v2->m_pkApplyTextWin = v36;
  v36->vfptr[122].__vecDelDtor((NiRefObject *)v36, 5u);
  v37 = v2->m_pkApplyTextWin->vfptr;
  v38 = TextData::Get(0xDA473531);
  v37[118].__vecDelDtor((NiRefObject *)v2->m_pkApplyTextWin, (unsigned int)v38);
  v39 = v2->m_pkApplyTextWin->vfptr;
  v40 = Font::Get(MENU);
  v39[113].__vecDelDtor((NiRefObject *)v2->m_pkApplyTextWin, (unsigned int)v40);
  SpScreenText::SetShadowOffset((SpScreenText *)&v2->m_pkApplyTextWin->m_spTextGeom.m_pObject->vfptr, 1u);
  ((void (__stdcall *)(_DWORD))v2->m_pkApplyTextWin->vfptr[60].__vecDelDtor)(0);
  v41 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CreatCharNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v41, (NiAVObject *)&spNode.m_pObject->vfptr, "CreatCharClick");
  PgSprData::Add(v41, (NiAVObject *)&spNode.m_pObject->vfptr, "CreatCharOver");
  v42 = PgWinBut::CreateWin(uiLeft - iOffX, uiTop - iOffY, v41, (PgWin *)&v2->vfptr, 2u, 0, 0);
  v43 = Font::Get(0);
  v44 = ((int (__thiscall *)(PgWinBut *))v42->vfptr[37].__vecDelDtor)(v42);
  v45 = ((int (__thiscall *)(PgWinBut *))v42->vfptr[36].__vecDelDtor)(v42);
  v46 = PgWinText::CreateWin(0, 3, v45, v44, v43, (PgWin *)&v42->vfptr, 0, 0);
  v46->vfptr[122].__vecDelDtor((NiRefObject *)v46, 5u);
  v47 = (int)v46->vfptr;
  v48 = Font::Get(MENU);
  (*(void (__thiscall **)(PgWinText *, PgFont *))(v47 + 452))(v46, v48);
  v49 = (int)v46->vfptr;
  v50 = TextData::Get(0xBBE8DC30);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v49 + 472))(v46, v50);
  SpScreenText::SetShadowOffset((SpScreenText *)&v46->m_spTextGeom.m_pObject->vfptr, 1u);
  v46->vfptr[60].__vecDelDtor((NiRefObject *)v46, 0);
  v51 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "StartNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v51, (NiAVObject *)&spNode.m_pObject->vfptr, "StartClick");
  PgSprData::Add(v51, (NiAVObject *)&spNode.m_pObject->vfptr, "StartOver");
  v52 = PgWinBut::CreateWin(uiLeft - v29, uiTop - iOffY, v51, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v2->m_pkCancelBut = v52;
  v53 = v52;
  v54 = Font::Get(0);
  v55 = ((int (__thiscall *)(PgWinBut *))v53->vfptr[37].__vecDelDtor)(v53);
  v56 = ((int (__thiscall *)(PgWinBut *))v53->vfptr[36].__vecDelDtor)(v53);
  v57 = PgWinText::CreateWin(0, 3, v56, v55, v54, (PgWin *)&v52->vfptr, 0, 0);
  v2->m_pkCancelTextWin = v57;
  v57->vfptr[122].__vecDelDtor((NiRefObject *)v57, 5u);
  v58 = v2->m_pkCancelTextWin->vfptr;
  v59 = Font::Get(MENU);
  v58[113].__vecDelDtor((NiRefObject *)v2->m_pkCancelTextWin, (unsigned int)v59);
  v60 = v2->m_pkCancelTextWin->vfptr;
  v61 = TextData::Get(0x45B392ACu);
  v60[118].__vecDelDtor((NiRefObject *)v2->m_pkCancelTextWin, (unsigned int)v61);
  SpScreenText::SetShadowOffset((SpScreenText *)&v2->m_pkCancelTextWin->m_spTextGeom.m_pObject->vfptr, 1u);
  ((void (__stdcall *)(_DWORD))v2->m_pkCancelTextWin->vfptr[60].__vecDelDtor)(0);
  v62 = v2->vfptr;
  v63 = ((int (__thiscall *)(CHairShopOkCancelWin *))v2->vfptr[37].__vecDelDtor)(v2);
  v64 = (int)v2->vfptr[36].__vecDelDtor((NiRefObject *)v2, PgWin::ms_uiScreenHeight - v63);
  v62[77].__vecDelDtor((NiRefObject *)v2, PgWin::ms_uiScreenWidth - v64);
  v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
  v69 = -1;
  if ( spNode.m_pObject )
  {
    v65 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v65 )
        v65->vfptr->__vecDelDtor((NiRefObject *)v65, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0062DD60) --------------------------------------------------------
void __thiscall CHairShopOkCancelWin::OnCommand(CHairShopOkCancelWin *this, unsigned int wParam, int lParam)
{
  CHairShopOkCancelWin *v3; // esi@1

  v3 = this;
  if ( wParam )
  {
    if ( wParam == 1 )
    {
      CHairShopFrameWork::Exit((CHairShopFrameWork *)this->m_pkFrameWork);
    }
    else if ( wParam == 2 )
    {
      CHairShopFrameWork::SetDefaultLooks((CHairShopFrameWork *)this->m_pkFrameWork);
    }
  }
  else if ( !this->m_dwBtnDelay )
  {
    CHairShopFrameWork::ChangeApply((CHairShopFrameWork *)this->m_pkFrameWork);
    ((void (__stdcall *)(_DWORD))v3->m_pkApplyBut->vfptr[60].__vecDelDtor)(0);
    v3->m_dwBtnDelay = timeGetTime();
  }
}

//----- (0062DDD0) --------------------------------------------------------
CHairShopOkCancelWin *__cdecl CHairShopOkCancelWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  CHairShopOkCancelWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x170u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&CHairShopOkCancelWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&CHairShopOkCancelWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (CHairShopOkCancelWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9B7AD4: using guessed type void (__thiscall *CHairShopOkCancelWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B7AF4: using guessed type int (__thiscall *CHairShopOkCancelWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0062DF10) --------------------------------------------------------
CHairShopOkCancelWin *__thiscall CHairShopOkCancelWin::`vector deleting destructor'(CHairShopOkCancelWin *this, unsigned int a2)
{
  CHairShopOkCancelWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&CHairShopOkCancelWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CHairShopOkCancelWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B7AD4: using guessed type void (__thiscall *CHairShopOkCancelWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B7AF4: using guessed type int (__thiscall *CHairShopOkCancelWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0062DF50) --------------------------------------------------------
void __thiscall CHairShopViewCtrlWin::CHairShopViewCtrlWin(CHairShopViewCtrlWin *this)
{
  CHairShopViewCtrlWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_pkFrameWork = 0;
  v1->m_pkTurnLeftBtn = 0;
  v1->m_pkTurnRightBtn = 0;
  v1->vfptr = (NiRefObjectVtbl *)&CHairShopViewCtrlWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CHairShopViewCtrlWin::`vftable'{for `IDirectMessenger'};
}
// 9B7D74: using guessed type void (__thiscall *CHairShopViewCtrlWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B7D94: using guessed type int (__thiscall *CHairShopViewCtrlWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0062DF80) --------------------------------------------------------
void __thiscall CHairShopViewCtrlWin::~CHairShopViewCtrlWin(CHairShopViewCtrlWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&CHairShopViewCtrlWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CHairShopViewCtrlWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9B7D74: using guessed type void (__thiscall *CHairShopViewCtrlWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B7D94: using guessed type int (__thiscall *CHairShopViewCtrlWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0062DFA0) --------------------------------------------------------
void __thiscall CHairShopViewCtrlWin::OnCmdTurnLeft(CHairShopViewCtrlWin *this)
{
  PgFrameWork *v1; // eax@1

  v1 = this->m_pkFrameWork;
  if ( v1 )
  {
    LOBYTE(this->m_pkFrameWork[1].m_uiMessageNum) = LOBYTE(v1[1].m_uiMessageNum) == 0;
    BYTE1(this->m_pkFrameWork[1].m_uiMessageNum) = 1;
  }
}

//----- (0062DFD0) --------------------------------------------------------
void __thiscall CHairShopViewCtrlWin::OnCmdTurnRight(CHairShopViewCtrlWin *this)
{
  PgFrameWork *v1; // eax@1

  v1 = this->m_pkFrameWork;
  if ( v1 )
  {
    LOBYTE(this->m_pkFrameWork[1].m_uiMessageNum) = LOBYTE(v1[1].m_uiMessageNum) == 0;
    BYTE1(this->m_pkFrameWork[1].m_uiMessageNum) = 0;
  }
}

//----- (0062E000) --------------------------------------------------------
void __thiscall CHairShopViewCtrlWin::OnCommand(CHairShopViewCtrlWin *this, unsigned int wParam, int lParam)
{
  PgFrameWork *v3; // eax@3
  PgFrameWork *v4; // eax@5

  if ( wParam )
  {
    if ( wParam == 1 )
    {
      v3 = this->m_pkFrameWork;
      if ( v3 )
      {
        LOBYTE(this->m_pkFrameWork[1].m_uiMessageNum) = LOBYTE(v3[1].m_uiMessageNum) == 0;
        BYTE1(this->m_pkFrameWork[1].m_uiMessageNum) = 0;
      }
    }
  }
  else
  {
    v4 = this->m_pkFrameWork;
    if ( v4 )
    {
      LOBYTE(v4[1].m_uiMessageNum) = LOBYTE(v4[1].m_uiMessageNum) == 0;
      BYTE1(this->m_pkFrameWork[1].m_uiMessageNum) = 1;
    }
  }
}

//----- (0062E060) --------------------------------------------------------
char __thiscall CHairShopViewCtrlWin::Create(CHairShopViewCtrlWin *this, PgFrameWork *pkFrameWork)
{
  CHairShopViewCtrlWin *v2; // esi@1
  PgFrameWork *v3; // edi@1
  NiSourceTexture *v4; // ebx@1
  NiNode *v5; // esi@2
  LONG v6; // eax@3
  const char *v8; // eax@10
  PgSprData *v9; // edi@14
  PgSprData *v10; // edi@14
  PgWinBut *v11; // eax@14
  void *(__thiscall *v12)(NiRefObject *, unsigned int); // edx@14
  NiNode *v13; // esi@15
  NiTexturePalette *pTexturePalette; // [sp+18h] [bp-18h]@8
  int uiLeft; // [sp+1Ch] [bp-14h]@14
  NiPointer<NiNode> spNode; // [sp+20h] [bp-10h]@1
  int v17; // [sp+2Ch] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pkFrameWork;
  v17 = 0;
  this->m_pkFrameWork = pkFrameWork;
  v4 = MenuTexMgr::GetTexture(5u);
  if ( !v4 )
  {
    v5 = spNode.m_pObject;
    v17 = -1;
    if ( spNode.m_pObject )
    {
      v6 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
      goto LABEL_4;
    }
    return 0;
  }
  pTexturePalette = ::pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "\\Shop\\CreatCharTurnButton.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, pTexturePalette);
  if ( !spNode.m_pObject )
    return 0;
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, 0, v3, "HairShopViewCtrlWin", 0) )
  {
    v5 = spNode.m_pObject;
    v17 = -1;
    if ( spNode.m_pObject )
    {
      v6 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
LABEL_4:
      if ( !v6 )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    return 0;
  }
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TurnL", &uiLeft, (int *)&pkFrameWork, v4);
  PgSprData::Add(v9, (NiAVObject *)&spNode.m_pObject->vfptr, "TurnLClick");
  v2->m_pkTurnLeftBtn = PgWinBut::CreateWin(uiLeft, (int)pkFrameWork, v9, (PgWin *)&v2->vfptr, 0, 0, 0);
  v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TurnR", &uiLeft, (int *)&pkFrameWork, v4);
  PgSprData::Add(v10, (NiAVObject *)&spNode.m_pObject->vfptr, "TurnRClick");
  v11 = PgWinBut::CreateWin(uiLeft, (int)pkFrameWork, v10, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v12 = v2->vfptr[59].__vecDelDtor;
  v2->m_pkTurnRightBtn = v11;
  ((void (__thiscall *)(CHairShopViewCtrlWin *, unsigned int, unsigned int, _DWORD, _DWORD))v12)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.33000001,
    0.44);
  v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
  v17 = -1;
  if ( spNode.m_pObject )
  {
    v13 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v13 )
        v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0062E270) --------------------------------------------------------
CHairShopViewCtrlWin *__cdecl CHairShopViewCtrlWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  CHairShopViewCtrlWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x164u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&CHairShopViewCtrlWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&CHairShopViewCtrlWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (CHairShopViewCtrlWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9B7D74: using guessed type void (__thiscall *CHairShopViewCtrlWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B7D94: using guessed type int (__thiscall *CHairShopViewCtrlWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0062E3C0) --------------------------------------------------------
CHairShopViewCtrlWin *__thiscall CHairShopViewCtrlWin::`scalar deleting destructor'(CHairShopViewCtrlWin *this, unsigned int a2)
{
  CHairShopViewCtrlWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&CHairShopViewCtrlWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CHairShopViewCtrlWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B7D74: using guessed type void (__thiscall *CHairShopViewCtrlWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B7D94: using guessed type int (__thiscall *CHairShopViewCtrlWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0062E400) --------------------------------------------------------
void __thiscall CColorIcon::CColorIcon(CColorIcon *this)
{
  CColorIcon *v1; // esi@1

  v1 = this;
  IconWin::IconWin((IconWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&CColorIcon::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CColorIcon::`vftable'{for `IDirectMessenger'};
  v1->m_byColorIndex = -1;
  IconWin::CreateGeometry((IconWin *)&v1->vfptr, 0x20u, 0x20u);
}
// 9B8294: using guessed type void (__thiscall *CColorIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B82B4: using guessed type int (__thiscall *CColorIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (0062E470) --------------------------------------------------------
void __thiscall CColorIcon::~CColorIcon(CColorIcon *this)
{
  this->vfptr = (NiRefObjectVtbl *)&CColorIcon::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CColorIcon::`vftable'{for `IDirectMessenger'};
  IconWin::~IconWin((IconWin *)&this->vfptr);
}
// 9B8294: using guessed type void (__thiscall *CColorIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B82B4: using guessed type int (__thiscall *CColorIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (0062E490) --------------------------------------------------------
bool __thiscall CColorIcon::Create(CColorIcon *this, int iXPos, int iYPos, PgWin *pkParent)
{
  return PgWinLRBut::Create((PgWinLRBut *)&this->vfptr, iXPos, iYPos, 0x20u, 0x20u, pkParent, 0, 0) != 0;
}

//----- (0062E4F0) --------------------------------------------------------
void __thiscall CHairShopwin::ChangeState(CHairShopwin *this, char byDestState)
{
  if ( this->m_byTargetState != byDestState )
    this->m_byTargetState = byDestState;
}

//----- (0062E510) --------------------------------------------------------
void __thiscall CHairShopwin::OnSlideBar(CHairShopwin *this)
{
  if ( this->m_pListWinHairType )
  {
    this->m_pListWinHairType->m_nViewStartPos = this->m_pkSlideBarList.m_pObject->m_nCurPos;
    SlideListWin::UpdateViewList(this->m_pListWinHairType);
  }
}

//----- (0062E540) --------------------------------------------------------
void __thiscall CColorIcon::DoAction(CColorIcon *this)
{
  CColorIcon *v1; // esi@1
  PgWin *v2; // eax@2

  v1 = this;
  if ( this->m_byColorIndex != -1 )
  {
    v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
    if ( v2 )
      PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_byColorIndex);
  }
}

//----- (0062E570) --------------------------------------------------------
void __thiscall CHairShopwin::CHairShopwin(CHairShopwin *this)
{
  CHairShopwin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&CHairShopwin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CHairShopwin::`vftable'{for `IDirectMessenger'};
  v1->m_pkSlideBarList.m_pObject = 0;
  v1->m_pkFrameWork = 0;
  v1->m_pkBtn_HairType = 0;
  v1->m_pkBtn_FaceType = 0;
  v1->m_pkBtn_GenderType = 0;
  v1->m_pkBtn_BacktoPrev = 0;
  v1->m_pkChk[0] = 0;
  v1->m_pkChk[1] = 0;
  v1->m_pkChk[2] = 0;
  v1->m_pkChk[3] = 0;
  v1->m_pkChk_Add[0] = 0;
  v1->m_pkChk_Add[1] = 0;
  v1->m_pkChk_Add[2] = 0;
  v1->m_pkChk_Add[3] = 0;
  *(_WORD *)&v1->m_byState = -256;
  v1->m_pkColorIcon[0] = 0;
  v1->m_pkColorIcon[1] = 0;
  v1->m_pkColorIcon[2] = 0;
  v1->m_pkColorIcon[3] = 0;
  v1->m_pkColorIcon[4] = 0;
  v1->m_pkColorIcon[5] = 0;
  v1->m_pkColorIcon[6] = 0;
  v1->m_pkColorIcon[7] = 0;
  v1->m_pkColorIcon[8] = 0;
  v1->m_pkColorIcon[9] = 0;
  v1->m_pkColorIcon[10] = 0;
  v1->m_pkColorIcon[11] = 0;
  v1->m_pkColorIcon[12] = 0;
  v1->m_pkColorIcon[13] = 0;
  v1->m_pkColorIcon[14] = 0;
  v1->m_pkColorIcon[15] = 0;
  v1->m_pkColorIcon[16] = 0;
  v1->m_pkColorIcon[17] = 0;
  v1->m_pkColorIcon[18] = 0;
  v1->m_pkColorIcon[19] = 0;
  v1->m_pkColorIcon[20] = 0;
  v1->m_pkColorIcon[21] = 0;
  v1->m_pkColorIcon[22] = 0;
  v1->m_pkColorIcon[23] = 0;
  v1->m_pkColorIcon[24] = 0;
  v1->m_pListWinHairType = 0;
}
// 9B851C: using guessed type void (__thiscall *CHairShopwin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B853C: using guessed type int (__thiscall *CHairShopwin::`vftable'{for `NiNode'})(void *p, char);

//----- (0062E690) --------------------------------------------------------
void __thiscall CHairShopwin::~CHairShopwin(CHairShopwin *this)
{
  CHairShopwin *v1; // esi@1
  SlideBar *v2; // edi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&CHairShopwin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CHairShopwin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_pkSlideBarList.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9B851C: using guessed type void (__thiscall *CHairShopwin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B853C: using guessed type int (__thiscall *CHairShopwin::`vftable'{for `NiNode'})(void *p, char);

//----- (0062E720) --------------------------------------------------------
void __thiscall CHairShopwin::UpdateGenderList(CHairShopwin *this)
{
  CHairShopwin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  NiUnsharedGeometryGroup *v3; // eax@2
  unsigned int v4; // eax@2
  NiUnsharedGeometryGroup *v5; // eax@2
  unsigned int v6; // eax@2

  v1 = this;
  v2 = this->m_pListWinHairType;
  if ( v2 )
  {
    SlideListWin::RemoveAllList(v2);
    v3 = TextData::Get(0x42527D6Fu);
    v4 = SlideListWin::AddText(v1->m_pListWinHairType, (const char *)v3);
    SlideListWin::SetData(v1->m_pListWinHairType, v4, 1u);
    v5 = TextData::Get(0x9A937C7D);
    v6 = SlideListWin::AddText(v1->m_pListWinHairType, (const char *)v5);
    SlideListWin::SetData(v1->m_pListWinHairType, v6, 0);
    SlideListWin::AlignText(v1->m_pListWinHairType, 5u);
    SlideListWin::UpdateViewList(v1->m_pListWinHairType);
  }
}

//----- (0062E7A0) --------------------------------------------------------
void __thiscall CColorIcon::SetColorIndex(CColorIcon *this, char byTableIndex)
{
  char v2; // bl@1
  CColorIcon *v3; // esi@1
  int v4; // edi@1
  NiSourceTexture *v5; // eax@2
  NiRefObjectVtbl *byTableIndexa; // [sp+14h] [bp+8h]@2

  v2 = byTableIndex;
  v3 = this;
  v4 = (unsigned __int8)byTableIndex;
  if ( CDataReader::GetRecord(
         (CDataReader *)(ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable + 4),
         (unsigned __int8)byTableIndex) )
  {
    byTableIndexa = v3->vfptr;
    v5 = IconMgr::GetTexture("HairColor");
    ((void (__thiscall *)(CColorIcon *, NiSourceTexture *, int, signed int, signed int))byTableIndexa[146].__vecDelDtor)(
      v3,
      v5,
      v4,
      32,
      32);
    v3->m_uFlags &= 0xFFFEu;
  }
  else
  {
    ((void (__thiscall *)(CColorIcon *, _DWORD, signed int, signed int, signed int))v3->vfptr[146].__vecDelDtor)(
      v3,
      0,
      -1,
      32,
      32);
    v3->m_uFlags |= 1u;
  }
  ((void (__thiscall *)(CColorIcon *))v3->vfptr[60].__vecDelDtor)(v3);
  v3->m_byColorIndex = v2;
}
// A886A0: using guessed type int ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable;

//----- (0062E830) --------------------------------------------------------
void __thiscall CColorIcon::OnFirstHitWin(CColorIcon *this)
{
  CColorIcon *v1; // esi@1
  char *v2; // eax@1

  v1 = this;
  v2 = CDataReader::GetRecord(
         (CDataReader *)(ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable + 4),
         this->m_byColorIndex);
  if ( v2 )
    PgWin::SetToolTipWinText((PgWin *)&v1->vfptr, v2 + 16);
  PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
}
// A886A0: using guessed type int ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable;

//----- (0062E860) --------------------------------------------------------
CColorIcon *__cdecl CColorIcon::CreateWin(int iXPos, int iYPos, PgWin *pkParent)
{
  PgWin *v3; // eax@1
  PgWin *v4; // esi@1
  PgWin *v5; // edi@8
  CColorIcon *v6; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v3 = (PgWin *)operator new(0x180u);
  v4 = v3;
  result.m_pObject = v3;
  v8 = 0;
  if ( v3 )
  {
    IconWin::IconWin((IconWin *)v3);
    LOBYTE(v8) = 1;
    v4->vfptr = (NiRefObjectVtbl *)&CColorIcon::`vftable'{for `NiNode'};
    v4->vfptr = (IDirectMessengerVtbl *)&CColorIcon::`vftable'{for `IDirectMessenger'};
    LOBYTE(v4[1].m_kLocal.m_Translate.y) = -1;
    IconWin::CreateGeometry((IconWin *)v4, 0x20u, 0x20u);
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v8 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, v4);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgWin *))v4->vfptr[152].__vecDelDtor)(
                          v4,
                          iXPos,
                          iYPos,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v4->vfptr[89].__vecDelDtor)(v4);
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = (CColorIcon *)v4;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v4);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = 0;
  }
  return v6;
}
// 9B8294: using guessed type void (__thiscall *CColorIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B82B4: using guessed type int (__thiscall *CColorIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (0062E9C0) --------------------------------------------------------
CHairShopwin *__cdecl CHairShopwin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  CHairShopwin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1FCu);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    CHairShopwin::CHairShopwin((CHairShopwin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (CHairShopwin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (0062EAF0) --------------------------------------------------------
void __thiscall CHairShopwin::UpdateFaceList(CHairShopwin *this, char byEndGrade, char byStartGrade)
{
  CHairShopwin *v3; // esi@1
  SlideListWin *v4; // ecx@1
  int v5; // edi@1
  unsigned int *v6; // ebx@5
  unsigned int v7; // esi@6
  char *v8; // eax@6
  unsigned int v9; // eax@7
  std::vector<unsigned long,std::allocator<unsigned long> > vecResult; // [sp+10h] [bp-20h]@2
  CHairShopwin *v11; // [sp+20h] [bp-10h]@1
  int v12; // [sp+2Ch] [bp-4h]@2
  int size; // [sp+38h] [bp+8h]@5

  v3 = this;
  v11 = this;
  v4 = this->m_pListWinHairType;
  v5 = 0;
  if ( v4 )
  {
    SlideListWin::RemoveAllList(v4);
    vecResult._Myfirst = 0;
    vecResult._Mylast = 0;
    vecResult._Myend = 0;
    v12 = 0;
    if ( byStartGrade == -1 )
      FaceInfoTab::GetEquipableFace(byEndGrade, &vecResult);
    else
      FaceInfoTab::GetExactEquipableFace(byStartGrade, byEndGrade, &vecResult);
    v6 = vecResult._Myfirst;
    size = vecResult._Mylast - vecResult._Myfirst;
    if ( size > 0 )
    {
      do
      {
        v7 = LOBYTE(v6[v5]);
        v8 = CDataReader::GetRecord((CDataReader *)(ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable + 4), v7);
        if ( v8 )
        {
          v9 = SlideListWin::AddText(v11->m_pListWinHairType, v8 + 1);
          SlideListWin::SetData(v11->m_pListWinHairType, v9, v7);
        }
        ++v5;
      }
      while ( v5 < size );
      v3 = v11;
    }
    SlideListWin::AlignText(v3->m_pListWinHairType, 5u);
    SlideListWin::UpdateViewList(v3->m_pListWinHairType);
    if ( v6 )
      operator delete(v6);
  }
}
// A8869C: using guessed type int ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable;

//----- (0062EC00) --------------------------------------------------------
void __thiscall CHairShopwin::UpdateHairList(CHairShopwin *this, char byEndGrade, char byStartGrade)
{
  CHairShopwin *v3; // edi@1
  SlideListWin *v4; // ecx@1
  unsigned __int8 *v5; // eax@2
  unsigned __int8 v6; // cl@3
  char v7; // cl@11
  unsigned int *v8; // esi@14
  signed int v9; // ecx@14
  int v10; // eax@14
  unsigned __int8 v11; // bl@15
  int v12; // eax@15
  unsigned int v13; // edi@16
  unsigned int v14; // esi@18
  char *v15; // eax@19
  CHairShopwin *v16; // esi@22
  unsigned int v17; // eax@22
  std::vector<unsigned long,std::allocator<unsigned long> > vecResult; // [sp+10h] [bp-24h]@11
  CHairShopwin *v19; // [sp+20h] [bp-14h]@1
  int kBaseClassID; // [sp+24h] [bp-10h]@4
  int v21; // [sp+30h] [bp-4h]@11
  int size; // [sp+3Ch] [bp+8h]@14
  int i; // [sp+40h] [bp+Ch]@14

  v3 = this;
  v19 = this;
  v4 = this->m_pListWinHairType;
  if ( v4 )
  {
    SlideListWin::RemoveAllList(v4);
    v5 = (unsigned __int8 *)&v3->m_pkFrameWork[2].m_BackFrameID;
    if ( v3->m_pkFrameWork != (PgFrameWork *)-100 )
    {
      v6 = *v5;
      switch ( ((unsigned int)*v5 >> 2) & 0x1F )
      {
        case 1u:
        case 2u:
        case 3u:
        case 4u:
        case 5u:
          LOBYTE(kBaseClassID) = 1;
          break;
        case 6u:
        case 7u:
        case 8u:
        case 9u:
        case 0xAu:
          LOBYTE(kBaseClassID) = 6;
          break;
        case 0xBu:
        case 0xCu:
        case 0xDu:
        case 0xEu:
        case 0xFu:
          LOBYTE(kBaseClassID) = 11;
          break;
        case 0x10u:
        case 0x11u:
        case 0x12u:
        case 0x13u:
        case 0x14u:
          LOBYTE(kBaseClassID) = 16;
          break;
        case 0x15u:
        case 0x16u:
        case 0x17u:
        case 0x18u:
        case 0x19u:
          LOBYTE(kBaseClassID) = 21;
          break;
        case 0x1Au:
        case 0x1Bu:
          LOBYTE(kBaseClassID) = 26;
          break;
        default:
          LOBYTE(kBaseClassID) = 0;
          break;
      }
      vecResult._Myfirst = 0;
      vecResult._Mylast = 0;
      vecResult._Myend = 0;
      v7 = v6 >> 7;
      v21 = 0;
      if ( byStartGrade == -1 )
        HairInfoTab::GetEquipableHairType(kBaseClassID, v7, byEndGrade, &vecResult);
      else
        HairInfoTab::GetExactEquipableHairType(kBaseClassID, v7, byStartGrade, byEndGrade, &vecResult);
      v8 = vecResult._Myfirst;
      v9 = vecResult._Mylast - vecResult._Myfirst;
      v10 = 0;
      size = v9;
      i = 0;
      if ( v9 > 0 )
      {
        do
        {
          v11 = v8[v10];
          v12 = *(_DWORD *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 56);
          if ( v12 )
            v13 = *(_DWORD *)(v12 + 40);
          else
            v13 = 0;
          v14 = 0;
          if ( v13 )
          {
            while ( 1 )
            {
              v15 = CDataReader::GetRecord((CDataReader *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 4), v14);
              if ( *v15 == v11 )
                break;
              if ( ++v14 >= v13 )
                goto LABEL_23;
            }
            v16 = v19;
            v17 = SlideListWin::AddText(v19->m_pListWinHairType, v15 + 33);
            SlideListWin::SetData(v16->m_pListWinHairType, v17, v11);
LABEL_23:
            v9 = size;
          }
          v8 = vecResult._Myfirst;
          v10 = i + 1;
          i = v10;
        }
        while ( v10 < v9 );
        v3 = v19;
      }
      SlideListWin::AlignText(v3->m_pListWinHairType, 5u);
      SlideListWin::UpdateViewList(v3->m_pListWinHairType);
      if ( v8 )
        operator delete(v8);
    }
  }
}
// A88694: using guessed type int ITableBase<HairInfo,HairInfoTab>::ms_pkTable;

//----- (0062EE10) --------------------------------------------------------
void __thiscall CHairShopwin::RefreshColorIcon(CHairShopwin *this, char byEndGrade, char byStartGrade)
{
  CHairShopwin *v3; // esi@1
  unsigned int *v4; // edi@4
  unsigned __int8 v5; // bl@4
  CColorIcon **v6; // esi@4
  CColorIcon *v7; // ecx@5
  std::vector<unsigned long,std::allocator<unsigned long> > vecResult; // [sp+10h] [bp-1Ch]@1
  int v9; // [sp+28h] [bp-4h]@1
  unsigned __int8 byEndGrade_3; // [sp+37h] [bp+Bh]@4

  v3 = this;
  vecResult._Myfirst = 0;
  vecResult._Mylast = 0;
  vecResult._Myend = 0;
  v9 = 0;
  if ( byStartGrade == -1 )
    HairColorInfoTab::GetEquipableHairColor(byEndGrade, &vecResult);
  else
    HairColorInfoTab::GetExactEquipableHairColor(byStartGrade, byEndGrade, &vecResult);
  v4 = vecResult._Myfirst;
  v5 = 0;
  byEndGrade_3 = vecResult._Mylast - vecResult._Myfirst;
  v6 = v3->m_pkColorIcon;
  do
  {
    v7 = *v6;
    if ( v5 < byEndGrade_3 )
      CColorIcon::SetColorIndex(v7, *(_BYTE *)v4);
    else
      CColorIcon::SetColorIndex(v7, -1);
    ++v5;
    ++v4;
    ++v6;
  }
  while ( v5 < 0x19u );
  if ( vecResult._Myfirst )
    operator delete(vecResult._Myfirst);
}

//----- (0062EED0) --------------------------------------------------------
void __thiscall CHairShopwin::ActivateCheckBtn(CHairShopwin *this, char byIndex)
{
  unsigned __int8 v2; // al@1
  char *v3; // esi@1
  char v4; // al@5

  v2 = 0;
  v3 = (char *)this->m_pkChk;
  do
  {
    if ( *(_DWORD *)v3 )
      *(_BYTE *)(*(_DWORD *)v3 + 380) = byIndex == v2;
    ++v2;
    v3 += 4;
  }
  while ( v2 < 4u );
  v4 = this->m_byState;
  switch ( v4 )
  {
    case 1:
      if ( byIndex )
      {
        if ( byIndex == 1 )
        {
          CHairShopwin::UpdateHairList(this, 4, 4);
        }
        else if ( byIndex == 2 )
        {
          CHairShopwin::UpdateHairList(this, 5, 5);
        }
      }
      else
      {
        CHairShopwin::UpdateHairList(this, 1, 0);
      }
      break;
    case 2:
      if ( byIndex )
      {
        if ( byIndex == 1 )
        {
          CHairShopwin::UpdateFaceList(this, 4, 4);
        }
        else if ( byIndex == 2 )
        {
          CHairShopwin::UpdateFaceList(this, 5, 5);
        }
      }
      else
      {
        CHairShopwin::UpdateFaceList(this, 1, 0);
      }
      break;
    case 3:
      CHairShopwin::UpdateGenderList(this);
      break;
  }
}

//----- (0062EFB0) --------------------------------------------------------
void __thiscall CHairShopwin::ActivateCheckAddBtn(CHairShopwin *this, char byIndex)
{
  CHairShopwin *v2; // ebx@1
  unsigned __int8 v3; // al@1
  char *v4; // edi@1
  char *v5; // edi@10
  unsigned __int8 v6; // bl@10
  CColorIcon **v7; // esi@10
  CColorIcon *v8; // ecx@11
  char *padwResult; // [sp+10h] [bp-20h]@10
  int v10; // [sp+14h] [bp-1Ch]@10
  int v11; // [sp+18h] [bp-18h]@10
  CHairShopwin *v12; // [sp+20h] [bp-10h]@1
  int v13; // [sp+2Ch] [bp-4h]@10
  unsigned __int8 v14; // [sp+3Bh] [bp+Bh]@10

  v2 = this;
  v12 = this;
  v3 = 0;
  v4 = (char *)this->m_pkChk_Add;
  do
  {
    if ( *(_DWORD *)v4 )
    {
      *(_BYTE *)(*(_DWORD *)v4 + 380) = byIndex == v3;
      v2 = v12;
    }
    ++v3;
    v4 += 4;
  }
  while ( v3 < 4u );
  if ( byIndex )
  {
    if ( byIndex == 1 )
    {
      CHairShopwin::RefreshColorIcon(v2, 4, 4);
    }
    else if ( byIndex == 2 )
    {
      CHairShopwin::RefreshColorIcon(v2, 5, 5);
    }
  }
  else
  {
    padwResult = 0;
    v10 = 0;
    v11 = 0;
    v13 = 0;
    HairColorInfoTab::GetExactEquipableHairColor(0, 1, &padwResult);
    v5 = padwResult;
    v6 = 0;
    v14 = (v10 - (signed int)padwResult) >> 2;
    v7 = v12->m_pkColorIcon;
    do
    {
      v8 = *v7;
      if ( v6 < v14 )
        CColorIcon::SetColorIndex(v8, *v5);
      else
        CColorIcon::SetColorIndex(v8, -1);
      ++v6;
      v5 += 4;
      ++v7;
    }
    while ( v6 < 0x19u );
    if ( padwResult )
      operator delete(padwResult);
  }
}

//----- (0062F0E0) --------------------------------------------------------
void __thiscall CHairShopwin::UpdateMeWin(CHairShopwin *this, float fCurTime)
{
  CHairShopwin *v2; // esi@1
  char v3; // al@1
  int v4; // edi@3
  signed int v5; // ebx@3
  int v6; // edi@8
  signed int v7; // ebx@8
  int v8; // edi@13
  signed int v9; // ebx@13

  v2 = this;
  v3 = this->m_byTargetState;
  if ( v3 != -1 )
  {
    this->m_byState = v3;
    this->m_byTargetState = -1;
    switch ( v3 )
    {
      case 0:
        ((void (__stdcall *)(_DWORD))this->m_pkBtn_HairType->vfptr[60].__vecDelDtor)(1);
        ((void (__stdcall *)(_DWORD))v2->m_pkBtn_HairType->vfptr[64].__vecDelDtor)(1);
        ((void (__stdcall *)(_DWORD))v2->m_pkBtn_FaceType->vfptr[60].__vecDelDtor)(1);
        ((void (__stdcall *)(_DWORD))v2->m_pkBtn_FaceType->vfptr[64].__vecDelDtor)(1);
        ((void (__stdcall *)(_DWORD))v2->m_pkBtn_GenderType->vfptr[60].__vecDelDtor)(1);
        ((void (__stdcall *)(_DWORD))v2->m_pkBtn_GenderType->vfptr[64].__vecDelDtor)(1);
        v4 = (int)v2->m_pkChk;
        v5 = 4;
        do
        {
          if ( *(_DWORD *)v4 )
          {
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 240))(0);
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 256))(0);
          }
          v4 += 4;
          --v5;
        }
        while ( v5 );
        SlideListWin::RemoveAllList(v2->m_pListWinHairType);
        break;
      case 1:
      case 2:
        ((void (__stdcall *)(_DWORD))this->m_pkBtn_HairType->vfptr[60].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkBtn_HairType->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkBtn_FaceType->vfptr[60].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkBtn_FaceType->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkBtn_GenderType->vfptr[60].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkBtn_GenderType->vfptr[64].__vecDelDtor)(0);
        v6 = (int)v2->m_pkChk;
        v7 = 4;
        do
        {
          if ( *(_DWORD *)v6 )
          {
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v6 + 240))(1);
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v6 + 256))(1);
          }
          v6 += 4;
          --v7;
        }
        while ( v7 );
        CHairShopwin::ActivateCheckBtn(v2, 0);
        break;
      case 3:
        ((void (__stdcall *)(_DWORD))this->m_pkBtn_HairType->vfptr[60].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkBtn_HairType->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkBtn_FaceType->vfptr[60].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkBtn_FaceType->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkBtn_GenderType->vfptr[60].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkBtn_GenderType->vfptr[64].__vecDelDtor)(0);
        v8 = (int)v2->m_pkChk;
        v9 = 4;
        do
        {
          if ( *(_DWORD *)v8 )
          {
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v8 + 240))(0);
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v8 + 256))(0);
          }
          v8 += 4;
          --v9;
        }
        while ( v9 );
        CHairShopwin::ActivateCheckBtn(v2, 0);
        break;
      default:
        return;
    }
  }
}

//----- (0062F340) --------------------------------------------------------
void __thiscall CHairShopwin::OnCommand(CHairShopwin *this, unsigned int wParam, int lParam)
{
  CHairShopwin *v3; // esi@1
  char v4; // al@6
  signed int v5; // eax@22
  char v6; // al@23

  v3 = this;
  if ( dwTimer )
  {
    if ( timeGetTime() - dwTimer < 0x1F4 )
      return;
    dwTimer = 0;
  }
  else
  {
    dwTimer = timeGetTime();
  }
  switch ( wParam )
  {
    case 0u:
      v4 = 1;
      goto LABEL_7;
    case 1u:
      v4 = 2;
      goto LABEL_7;
    case 2u:
      v4 = 3;
LABEL_7:
      if ( v3->m_byTargetState != v4 )
        v3->m_byTargetState = v4;
      break;
    case 3u:
      CHairShopwin::ActivateCheckBtn(v3, 0);
      break;
    case 4u:
      CHairShopwin::ActivateCheckBtn(v3, 1);
      break;
    case 5u:
      CHairShopwin::ActivateCheckBtn(v3, 2);
      break;
    case 7u:
      if ( v3->m_byState && v3->m_byTargetState )
        v3->m_byTargetState = 0;
      SlideBar::SetCurPos(v3->m_pkSlideBarList.m_pObject, 0);
      v3->m_pListWinHairType->m_nViewStartPos = 0;
      SlideListWin::UpdateViewList(v3->m_pListWinHairType);
      break;
    case 8u:
      CHairShopwin::ActivateCheckAddBtn(v3, 0);
      break;
    case 9u:
      CHairShopwin::ActivateCheckAddBtn(v3, 1);
      break;
    case 0xAu:
      CHairShopwin::ActivateCheckAddBtn(v3, 2);
      break;
    case 0xCu:
      CHairShopFrameWork::ChangeAvatarHairColor((CHairShopFrameWork *)v3->m_pkFrameWork, lParam);
      break;
    case 0xDu:
      v5 = SlideListWin::GetCurSelIndex(v3->m_pListWinHairType);
      if ( v5 >= 0 )
      {
        SlideListWin::GetData(v3->m_pListWinHairType, v5, &wParam);
        v6 = v3->m_byState;
        switch ( v6 )
        {
          case 1:
            CHairShopFrameWork::ChangeAvatarHair((CHairShopFrameWork *)v3->m_pkFrameWork, wParam);
            break;
          case 2:
            CHairShopFrameWork::ChangeAvatarFace((CHairShopFrameWork *)v3->m_pkFrameWork, wParam);
            break;
          case 3:
            CHairShopFrameWork::ChangeAvatarGender((CHairShopFrameWork *)v3->m_pkFrameWork, wParam != 0);
            break;
        }
      }
      break;
    case 0xEu:
      CHairShopwin::OnSlideBar(v3);
      break;
    default:
      return;
  }
}

//----- (0062F520) --------------------------------------------------------
char __thiscall CHairShopwin::Create(CHairShopwin *this, PgFrameWork *pkFrameWork)
{
  CHairShopwin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  char result; // al@6
  NiTexturePalette *v6; // STD0_4@9
  const char *v7; // eax@9
  PgSprData *v8; // eax@10
  int v9; // ebx@11
  PgSprData *v10; // eax@11
  PgSprData *v11; // eax@11
  NiSourceTexture *v12; // eax@11
  PgSprData *v13; // eax@12
  PgFont *v14; // eax@16
  PgWinText *v15; // eax@16
  NiRefObjectVtbl *v16; // edx@16
  NiUnsharedGeometryGroup *v17; // eax@16
  PgFont *v18; // eax@17
  PgWinText *v19; // ebx@17
  NiUnsharedGeometryGroup *v20; // eax@17
  PgSprData *v21; // ebx@17
  PgWinBut *v22; // STC8_4@17
  PgWinBut *v23; // ebx@17
  PgFont *v24; // STC4_4@17
  unsigned int v25; // STC0_4@17
  unsigned int v26; // eax@17
  PgWinText *v27; // ebx@17
  NiUnsharedGeometryGroup *v28; // eax@17
  PgFont *v29; // eax@17
  PgSprData *v30; // ebx@17
  PgWinBut *v31; // STC8_4@17
  PgWinBut *v32; // ebx@17
  PgFont *v33; // STC4_4@17
  unsigned int v34; // STC0_4@17
  unsigned int v35; // eax@17
  PgWinText *v36; // ebx@17
  NiUnsharedGeometryGroup *v37; // eax@17
  PgFont *v38; // eax@17
  PgSprData *v39; // ebx@17
  PgWinBut *v40; // STC8_4@17
  PgWinBut *v41; // ebx@17
  PgFont *v42; // STC4_4@17
  unsigned int v43; // STC0_4@17
  unsigned int v44; // eax@17
  PgWinText *v45; // ebx@17
  NiUnsharedGeometryGroup *v46; // eax@17
  PgFont *v47; // eax@17
  PgSprData *v48; // ebx@17
  ColumnBut *v49; // STC8_4@17
  ColumnBut *v50; // ebx@17
  PgFont *v51; // STC4_4@17
  unsigned int v52; // STC0_4@17
  unsigned int v53; // eax@17
  PgWinText *v54; // ebx@17
  NiUnsharedGeometryGroup *v55; // eax@17
  PgFont *v56; // eax@17
  PgSprData *v57; // ebx@17
  ColumnBut *v58; // STC8_4@17
  ColumnBut *v59; // ebx@17
  PgFont *v60; // STC4_4@17
  unsigned int v61; // STC0_4@17
  unsigned int v62; // eax@17
  PgWinText *v63; // ebx@17
  NiUnsharedGeometryGroup *v64; // eax@17
  PgFont *v65; // eax@17
  PgSprData *v66; // ebx@17
  ColumnBut *v67; // STC8_4@17
  ColumnBut *v68; // ebx@17
  PgFont *v69; // STC4_4@17
  unsigned int v70; // STC0_4@17
  unsigned int v71; // eax@17
  PgWinText *v72; // ebx@17
  NiUnsharedGeometryGroup *v73; // eax@17
  PgFont *v74; // eax@17
  PgSprData *v75; // ebx@17
  PgWinBut *v76; // STC8_4@17
  PgWinBut *v77; // ebx@17
  PgFont *v78; // STC4_4@17
  unsigned int v79; // STC0_4@17
  unsigned int v80; // eax@17
  PgWinText *v81; // ebx@17
  NiUnsharedGeometryGroup *v82; // eax@17
  PgFont *v83; // eax@17
  PgSprData *v84; // ebx@17
  ColumnBut *v85; // STC8_4@17
  ColumnBut *v86; // ebx@17
  PgFont *v87; // STC4_4@17
  unsigned int v88; // STC0_4@17
  unsigned int v89; // eax@17
  PgWinText *v90; // ebx@17
  NiUnsharedGeometryGroup *v91; // eax@17
  PgFont *v92; // eax@17
  PgSprData *v93; // ebx@17
  ColumnBut *v94; // STC8_4@17
  ColumnBut *v95; // ebx@17
  PgFont *v96; // STC4_4@17
  unsigned int v97; // STC0_4@17
  unsigned int v98; // eax@17
  PgWinText *v99; // ebx@17
  NiUnsharedGeometryGroup *v100; // eax@17
  PgFont *v101; // eax@17
  PgSprData *v102; // ebx@17
  ColumnBut *v103; // STC8_4@17
  ColumnBut *v104; // ebx@17
  PgFont *v105; // STC4_4@17
  unsigned int v106; // STC0_4@17
  unsigned int v107; // eax@17
  PgWinText *v108; // ebx@17
  NiUnsharedGeometryGroup *v109; // eax@17
  PgFont *v110; // eax@17
  CColorIcon **v111; // ebx@17
  PgSprData *v112; // eax@18
  CColorIcon *v113; // eax@18
  SLWCreateInfo::Item *v114; // ebx@19
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *v115; // ebx@19
  SLWCreateInfo::Item *v116; // ebx@25
  PgSprData *v117; // eax@27
  SlideListWin *v118; // eax@27
  PgSprData *v119; // eax@27
  NiD3DDefaultShader *v120; // eax@27
  NiTexturePalette **v121; // ebx@27
  NiRefObjectVtbl *v122; // edx@27
  SlideBar *v123; // ecx@27
  int v124; // eax@27
  int v125; // eax@27
  NiNode *v126; // esi@29
  SLWCreateInfo kCreateInfo; // [sp+E4h] [bp-16Ch]@19
  unsigned int uiWidth; // [sp+100h] [bp-150h]@14
  int iOffX; // [sp+104h] [bp-14Ch]@11
  unsigned int uiHeight; // [sp+108h] [bp-148h]@14
  PgWinText *pkTextWin; // [sp+10Ch] [bp-144h]@16
  int iOffY; // [sp+110h] [bp-140h]@11
  int uiTop; // [sp+114h] [bp-13Ch]@10
  int uiLeft; // [sp+118h] [bp-138h]@10
  NiPointer<NiNode> spNode; // [sp+11Ch] [bp-134h]@1
  NiTexturePalette *pTexturePalette; // [sp+120h] [bp-130h]@7
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+124h] [bp-12Ch]@19
  char acIconName[256]; // [sp+140h] [bp-110h]@18
  int v139; // [sp+24Ch] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v139 = 0;
  this->m_pkFrameWork = pkFrameWork;
  v3 = MenuTexMgr::GetTexture(4u);
  if ( !v3 )
    goto LABEL_36;
  pTexturePalette = ::pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = pTexturePalette;
  v7 = Folder::Merge(&Folder::m_acMenu, "\\shop\\HairShopWin.nif");
  PgUtil::LoadNodeNifFile(v7, &spNode, v6);
  if ( !spNode.m_pObject )
    return 0;
  v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v8, 0, pkFrameWork, "HairShopWin", 0) )
  {
LABEL_36:
    v4 = spNode.m_pObject;
    v139 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
    return 0;
  }
  v9 = uiLeft;
  iOffY = uiTop;
  iOffX = uiLeft;
  v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - iOffY, v10, (PgWin *)&v2->vfptr, 0, 0);
  v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel03", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - iOffY, v11, (PgWin *)&v2->vfptr, 0, 0);
  v12 = MenuTexMgr::GetTexture(0x13u);
  if ( v12 )
    v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v12);
  else
    v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - iOffY, v13, (PgWin *)&v2->vfptr, 0, 0);
  if ( PgUtil::GetTriShapeRect(
         (NiAVObject *)&spNode.m_pObject->vfptr,
         "WinTitle01",
         &uiLeft,
         &uiTop,
         &uiWidth,
         &uiHeight)
    && (v14 = Font::Get(MAIN_MENU),
        v15 = PgWinText::CreateWin(uiLeft - v9, uiTop - iOffY + 2, uiWidth, uiHeight, v14, (PgWin *)&v2->vfptr, 0, 0),
        v16 = v15->vfptr,
        pkTextWin = v15,
        v16[122].__vecDelDtor((NiRefObject *)v15, 5u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        pTexturePalette = (NiTexturePalette *)&pkTextWin->vfptr[118],
        v17 = TextData::Get(0x304F827Bu),
        ((void (__thiscall *)(_DWORD, _DWORD))pTexturePalette->vfptr)(pkTextWin, v17),
        ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0),
        PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "WinTitle02",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight)) )
  {
    v18 = Font::Get(MAIN_MENU);
    v19 = PgWinText::CreateWin(uiLeft - v9, uiTop - iOffY + 2, uiWidth, uiHeight, v18, (PgWin *)&v2->vfptr, 0, 0);
    v19->vfptr[122].__vecDelDtor((NiRefObject *)v19, 5u);
    v19->vfptr[117].__vecDelDtor((NiRefObject *)v19, (unsigned int)&Color::m_kDxWinTitleColor);
    pTexturePalette = (NiTexturePalette *)&v19->vfptr[118];
    v20 = TextData::Get(0x44553474u);
    ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pTexturePalette->vfptr)(v19, v20);
    v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
    v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Shape_Tab01_On", &uiLeft, &uiTop, v3);
    PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "Shape_Tab04_Click");
    PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "Shape_Tab04_Over");
    PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "Shape_Tab04_Off");
    v22 = PgWinBut::CreateWin(uiLeft, uiTop, v21, (PgWin *)&v2->vfptr, 0, 0, 0);
    v2->m_pkBtn_HairType = v22;
    v23 = v22;
    v24 = Font::Get(0);
    v25 = ((int (__thiscall *)(PgWinBut *))v23->vfptr[37].__vecDelDtor)(v23);
    v26 = ((int (__thiscall *)(PgWinBut *))v23->vfptr[36].__vecDelDtor)(v23);
    v27 = PgWinText::CreateWin(0, 3, v26, v25, v24, (PgWin *)&v22->vfptr, 0, 0);
    v27->vfptr[122].__vecDelDtor((NiRefObject *)v27, 5u);
    pTexturePalette = (NiTexturePalette *)&v27->vfptr[118];
    v28 = TextData::Get(0x473C2122u);
    ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pTexturePalette->vfptr)(v27, v28);
    pTexturePalette = (NiTexturePalette *)&v27->vfptr[113];
    v29 = Font::Get(MENU);
    ((void (__thiscall *)(PgWinText *, PgFont *))pTexturePalette->vfptr)(v27, v29);
    SpScreenText::SetShadowOffset((SpScreenText *)&v27->m_spTextGeom.m_pObject->vfptr, 1u);
    v27->vfptr[60].__vecDelDtor((NiRefObject *)v27, 0);
    v30 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Shape_Tab02_On", &uiLeft, &uiTop, v3);
    PgSprData::Add(v30, (NiAVObject *)&spNode.m_pObject->vfptr, "Shape_Tab04_Click");
    PgSprData::Add(v30, (NiAVObject *)&spNode.m_pObject->vfptr, "Shape_Tab04_Over");
    PgSprData::Add(v30, (NiAVObject *)&spNode.m_pObject->vfptr, "Shape_Tab04_Off");
    v31 = PgWinBut::CreateWin(uiLeft, uiTop, v30, (PgWin *)&v2->vfptr, 1u, 0, 0);
    v2->m_pkBtn_FaceType = v31;
    v32 = v31;
    v33 = Font::Get(0);
    v34 = ((int (__thiscall *)(PgWinBut *))v32->vfptr[37].__vecDelDtor)(v32);
    v35 = ((int (__thiscall *)(PgWinBut *))v32->vfptr[36].__vecDelDtor)(v32);
    v36 = PgWinText::CreateWin(0, 3, v35, v34, v33, (PgWin *)&v31->vfptr, 0, 0);
    v36->vfptr[122].__vecDelDtor((NiRefObject *)v36, 5u);
    pTexturePalette = (NiTexturePalette *)&v36->vfptr[118];
    v37 = TextData::Get(0x3A362120u);
    ((void (__thiscall *)(_DWORD, _DWORD))pTexturePalette->vfptr)(v36, v37);
    pTexturePalette = (NiTexturePalette *)&v36->vfptr[113];
    v38 = Font::Get(MENU);
    ((void (__thiscall *)(_DWORD, PgFont *))pTexturePalette->vfptr)(v36, v38);
    SpScreenText::SetShadowOffset((SpScreenText *)&v36->m_spTextGeom.m_pObject->vfptr, 1u);
    v36->vfptr[60].__vecDelDtor((NiRefObject *)v36, 0);
    v39 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Shape_Tab03_On", &uiLeft, &uiTop, v3);
    PgSprData::Add(v39, (NiAVObject *)&spNode.m_pObject->vfptr, "Shape_Tab04_Click");
    PgSprData::Add(v39, (NiAVObject *)&spNode.m_pObject->vfptr, "Shape_Tab04_Over");
    PgSprData::Add(v39, (NiAVObject *)&spNode.m_pObject->vfptr, "Shape_Tab04_Off");
    v40 = PgWinBut::CreateWin(uiLeft, uiTop, v39, (PgWin *)&v2->vfptr, 2u, 0, 0);
    v2->m_pkBtn_GenderType = v40;
    v41 = v40;
    v42 = Font::Get(0);
    v43 = ((int (__thiscall *)(PgWinBut *))v41->vfptr[37].__vecDelDtor)(v41);
    v44 = ((int (__thiscall *)(PgWinBut *))v41->vfptr[36].__vecDelDtor)(v41);
    v45 = PgWinText::CreateWin(0, 3, v44, v43, v42, (PgWin *)&v40->vfptr, 0, 0);
    v45->vfptr[122].__vecDelDtor((NiRefObject *)v45, 5u);
    pTexturePalette = (NiTexturePalette *)&v45->vfptr[118];
    v46 = TextData::Get(0xCFD7BBFB);
    ((void (__thiscall *)(_DWORD, _DWORD))pTexturePalette->vfptr)(v45, v46);
    pTexturePalette = (NiTexturePalette *)&v45->vfptr[113];
    v47 = Font::Get(MENU);
    ((void (__thiscall *)(_DWORD, _DWORD))pTexturePalette->vfptr)(v45, v47);
    SpScreenText::SetShadowOffset((SpScreenText *)&v45->m_spTextGeom.m_pObject->vfptr, 1u);
    v45->vfptr[60].__vecDelDtor((NiRefObject *)v45, 0);
    v48 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Shape_Tab01_Off", &uiLeft, &uiTop, v3);
    PgSprData::Add(v48, (NiAVObject *)&spNode.m_pObject->vfptr, "Shape_Tab01_On");
    v49 = ColumnBut::CreateWin(uiLeft, uiTop, v48, (PgWin *)&v2->vfptr, 3u, 0);
    v2->m_pkChk[0] = v49;
    v50 = v49;
    v51 = Font::Get(0);
    v52 = ((int (__thiscall *)(ColumnBut *))v50->vfptr[37].__vecDelDtor)(v50);
    v53 = ((int (__thiscall *)(ColumnBut *))v50->vfptr[36].__vecDelDtor)(v50);
    v54 = PgWinText::CreateWin(0, 3, v53, v52, v51, (PgWin *)&v49->vfptr, 0, 0);
    v54->vfptr[122].__vecDelDtor((NiRefObject *)v54, 5u);
    pTexturePalette = (NiTexturePalette *)&v54->vfptr[118];
    v55 = TextData::Get(0x827E8A77);
    ((void (__thiscall *)(_DWORD, _DWORD))pTexturePalette->vfptr)(v54, v55);
    pTexturePalette = (NiTexturePalette *)&v54->vfptr[113];
    v56 = Font::Get(MENU);
    ((void (__thiscall *)(_DWORD, _DWORD))pTexturePalette->vfptr)(v54, v56);
    SpScreenText::SetShadowOffset((SpScreenText *)&v54->m_spTextGeom.m_pObject->vfptr, 1u);
    v54->vfptr[60].__vecDelDtor((NiRefObject *)v54, 0);
    v57 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Shape_Tab02_Off", &uiLeft, &uiTop, v3);
    PgSprData::Add(v57, (NiAVObject *)&spNode.m_pObject->vfptr, "Shape_Tab02_On");
    v58 = ColumnBut::CreateWin(uiLeft, uiTop, v57, (PgWin *)&v2->vfptr, 4u, 0);
    v2->m_pkChk[1] = v58;
    v59 = v58;
    v60 = Font::Get(0);
    v61 = ((int (__thiscall *)(ColumnBut *))v59->vfptr[37].__vecDelDtor)(v59);
    v62 = ((int (__thiscall *)(ColumnBut *))v59->vfptr[36].__vecDelDtor)(v59);
    v63 = PgWinText::CreateWin(0, 3, v62, v61, v60, (PgWin *)&v58->vfptr, 0, 0);
    v63->vfptr[122].__vecDelDtor((NiRefObject *)v63, 5u);
    pTexturePalette = (NiTexturePalette *)&v63->vfptr[118];
    v64 = TextData::Get(0x788B80B6u);
    ((void (__thiscall *)(_DWORD, _DWORD))pTexturePalette->vfptr)(v63, v64);
    pTexturePalette = (NiTexturePalette *)&v63->vfptr[113];
    v65 = Font::Get(MENU);
    ((void (__thiscall *)(_DWORD, _DWORD))pTexturePalette->vfptr)(v63, v65);
    SpScreenText::SetShadowOffset((SpScreenText *)&v63->m_spTextGeom.m_pObject->vfptr, 1u);
    v63->vfptr[60].__vecDelDtor((NiRefObject *)v63, 0);
    v66 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Shape_Tab03_Off", &uiLeft, &uiTop, v3);
    PgSprData::Add(v66, (NiAVObject *)&spNode.m_pObject->vfptr, "Shape_Tab03_On");
    v67 = ColumnBut::CreateWin(uiLeft, uiTop, v66, (PgWin *)&v2->vfptr, 5u, 0);
    v2->m_pkChk[2] = v67;
    v68 = v67;
    v69 = Font::Get(0);
    v70 = ((int (__thiscall *)(ColumnBut *))v68->vfptr[37].__vecDelDtor)(v68);
    v71 = ((int (__thiscall *)(ColumnBut *))v68->vfptr[36].__vecDelDtor)(v68);
    v72 = PgWinText::CreateWin(0, 3, v71, v70, v69, (PgWin *)&v67->vfptr, 0, 0);
    v72->vfptr[122].__vecDelDtor((NiRefObject *)v72, 5u);
    pTexturePalette = (NiTexturePalette *)&v72->vfptr[118];
    v73 = TextData::Get(0x958D927D);
    ((void (__thiscall *)(_DWORD, _DWORD))pTexturePalette->vfptr)(v72, v73);
    pTexturePalette = (NiTexturePalette *)&v72->vfptr[113];
    v74 = Font::Get(MENU);
    ((void (__thiscall *)(_DWORD, _DWORD))pTexturePalette->vfptr)(v72, v74);
    SpScreenText::SetShadowOffset((SpScreenText *)&v72->m_spTextGeom.m_pObject->vfptr, 1u);
    v72->vfptr[60].__vecDelDtor((NiRefObject *)v72, 0);
    v75 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Shape_Tab04_Nor", &uiLeft, &uiTop, v3);
    PgSprData::Add(v75, (NiAVObject *)&spNode.m_pObject->vfptr, "Shape_Tab04_Click");
    PgSprData::Add(v75, (NiAVObject *)&spNode.m_pObject->vfptr, "Shape_Tab04_Over");
    v76 = PgWinBut::CreateWin(uiLeft, uiTop, v75, (PgWin *)&v2->vfptr, 7u, 0, 0);
    v2->m_pkBtn_BacktoPrev = v76;
    v77 = v76;
    v78 = Font::Get(0);
    v79 = ((int (__thiscall *)(PgWinBut *))v77->vfptr[37].__vecDelDtor)(v77);
    v80 = ((int (__thiscall *)(PgWinBut *))v77->vfptr[36].__vecDelDtor)(v77);
    v81 = PgWinText::CreateWin(0, 3, v80, v79, v78, (PgWin *)&v76->vfptr, 0, 0);
    v81->vfptr[122].__vecDelDtor((NiRefObject *)v81, 5u);
    pTexturePalette = (NiTexturePalette *)&v81->vfptr[118];
    v82 = TextData::Get(0xD4D65134);
    ((void (__thiscall *)(_DWORD, _DWORD))pTexturePalette->vfptr)(v81, v82);
    pTexturePalette = (NiTexturePalette *)&v81->vfptr[113];
    v83 = Font::Get(MENU);
    ((void (__thiscall *)(_DWORD, _DWORD))pTexturePalette->vfptr)(v81, v83);
    SpScreenText::SetShadowOffset((SpScreenText *)&v81->m_spTextGeom.m_pObject->vfptr, 1u);
    v81->vfptr[60].__vecDelDtor((NiRefObject *)v81, 0);
    v84 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Color_Tab01_Off", &uiLeft, &uiTop, v3);
    PgSprData::Add(v84, (NiAVObject *)&spNode.m_pObject->vfptr, "Color_Tab01_On");
    v85 = ColumnBut::CreateWin(uiLeft, uiTop, v84, (PgWin *)&v2->vfptr, 8u, 0);
    v2->m_pkChk_Add[0] = v85;
    v86 = v85;
    v87 = Font::Get(0);
    v88 = ((int (__thiscall *)(ColumnBut *))v86->vfptr[37].__vecDelDtor)(v86);
    v89 = ((int (__thiscall *)(ColumnBut *))v86->vfptr[36].__vecDelDtor)(v86);
    v90 = PgWinText::CreateWin(0, 3, v89, v88, v87, (PgWin *)&v85->vfptr, 0, 0);
    v90->vfptr[122].__vecDelDtor((NiRefObject *)v90, 5u);
    pTexturePalette = (NiTexturePalette *)&v90->vfptr[118];
    v91 = TextData::Get(0x827E8A77);
    ((void (__thiscall *)(_DWORD, _DWORD))pTexturePalette->vfptr)(v90, v91);
    pTexturePalette = (NiTexturePalette *)&v90->vfptr[113];
    v92 = Font::Get(MENU);
    ((void (__thiscall *)(_DWORD, _DWORD))pTexturePalette->vfptr)(v90, v92);
    SpScreenText::SetShadowOffset((SpScreenText *)&v90->m_spTextGeom.m_pObject->vfptr, 1u);
    v90->vfptr[60].__vecDelDtor((NiRefObject *)v90, 0);
    v93 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Color_Tab02_Off", &uiLeft, &uiTop, v3);
    PgSprData::Add(v93, (NiAVObject *)&spNode.m_pObject->vfptr, "Color_Tab02_On");
    v94 = ColumnBut::CreateWin(uiLeft, uiTop, v93, (PgWin *)&v2->vfptr, 9u, 0);
    v2->m_pkChk_Add[1] = v94;
    v95 = v94;
    v96 = Font::Get(0);
    v97 = ((int (__thiscall *)(ColumnBut *))v95->vfptr[37].__vecDelDtor)(v95);
    v98 = ((int (__thiscall *)(ColumnBut *))v95->vfptr[36].__vecDelDtor)(v95);
    v99 = PgWinText::CreateWin(0, 3, v98, v97, v96, (PgWin *)&v94->vfptr, 0, 0);
    v99->vfptr[122].__vecDelDtor((NiRefObject *)v99, 5u);
    pTexturePalette = (NiTexturePalette *)&v99->vfptr[118];
    v100 = TextData::Get(0x788B80B6u);
    ((void (__thiscall *)(_DWORD, _DWORD))pTexturePalette->vfptr)(v99, v100);
    pTexturePalette = (NiTexturePalette *)&v99->vfptr[113];
    v101 = Font::Get(MENU);
    ((void (__thiscall *)(_DWORD, _DWORD))pTexturePalette->vfptr)(v99, v101);
    SpScreenText::SetShadowOffset((SpScreenText *)&v99->m_spTextGeom.m_pObject->vfptr, 1u);
    v99->vfptr[60].__vecDelDtor((NiRefObject *)v99, 0);
    v102 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Color_Tab03_Off", &uiLeft, &uiTop, v3);
    PgSprData::Add(v102, (NiAVObject *)&spNode.m_pObject->vfptr, "Color_Tab03_On");
    v103 = ColumnBut::CreateWin(uiLeft, uiTop, v102, (PgWin *)&v2->vfptr, 0xAu, 0);
    v2->m_pkChk_Add[2] = v103;
    v104 = v103;
    v105 = Font::Get(0);
    v106 = ((int (__thiscall *)(ColumnBut *))v104->vfptr[37].__vecDelDtor)(v104);
    v107 = ((int (__thiscall *)(ColumnBut *))v104->vfptr[36].__vecDelDtor)(v104);
    v108 = PgWinText::CreateWin(0, 3, v107, v106, v105, (PgWin *)&v103->vfptr, 0, 0);
    v108->vfptr[122].__vecDelDtor((NiRefObject *)v108, 5u);
    pTexturePalette = (NiTexturePalette *)&v108->vfptr[118];
    v109 = TextData::Get(0x958D927D);
    ((void (__thiscall *)(_DWORD, _DWORD))pTexturePalette->vfptr)(v108, v109);
    pTexturePalette = (NiTexturePalette *)&v108->vfptr[113];
    v110 = Font::Get(MENU);
    ((void (__thiscall *)(_DWORD, _DWORD))pTexturePalette->vfptr)(v108, v110);
    SpScreenText::SetShadowOffset((SpScreenText *)&v108->m_spTextGeom.m_pObject->vfptr, 1u);
    v108->vfptr[60].__vecDelDtor((NiRefObject *)v108, 0);
    pkTextWin = (PgWinText *)1;
    v111 = v2->m_pkColorIcon;
    pTexturePalette = (NiTexturePalette *)25;
    do
    {
      sprintf(acIconName, "IconSlot%02d", pkTextWin);
      v112 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acIconName, &uiLeft, &uiTop, v3);
      PgWinSpr::CreateWin(uiLeft - iOffX, uiTop - iOffY, v112, (PgWin *)&v2->vfptr, 0, 0);
      v113 = CColorIcon::CreateWin(uiLeft - iOffX + 1, uiTop - iOffY + 1, (PgWin *)&v2->vfptr);
      *v111 = v113;
      v113->vfptr[129].__vecDelDtor((NiRefObject *)v113, 12u);
      CColorIcon::SetColorIndex(*v111, -1);
      (*v111)->m_pkToolTipWin = g_pkToolTipWin;
      pkTextWin = (PgWinText *)((char *)pkTextWin + 1);
      ++v111;
      pTexturePalette = (NiTexturePalette *)((char *)pTexturePalette - 1);
    }
    while ( pTexturePalette );
    kCreateInfo.m_arrItem._Myfirst = 0;
    kCreateInfo.m_arrItem._Mylast = 0;
    kCreateInfo.m_arrItem._Myend = 0;
    kCreateInfo.m_bMakeData = 0;
    kCreateInfo.m_nOffX = 0;
    kCreateInfo.m_nOffY = 0;
    LOBYTE(v139) = 1;
    v114 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
    v114->nItemType = 1;
    v114->pNode = spNode.m_pObject;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarNor", 0xCu);
    v115 = &v114->vecNodeName;
    LOBYTE(v139) = 2;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      v115,
      &_Val);
    LOBYTE(v139) = 1;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarClick", 0xEu);
    LOBYTE(v139) = 3;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      v115,
      &_Val);
    LOBYTE(v139) = 1;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarOver", 0xDu);
    LOBYTE(v139) = 4;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      v115,
      &_Val);
    LOBYTE(v139) = 1;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    v116 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    v116->nItemType = 2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column01", 8u);
    LOBYTE(v139) = 5;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      &v116->vecNodeName,
      &_Val);
    LOBYTE(v139) = 1;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    v116->pNode = spNode.m_pObject;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    kCreateInfo.m_nOffX = 1;
    kCreateInfo.m_nOffY = 0;
    SLWCreateInfo::MakeTempData(&kCreateInfo, v3);
    v117 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextBox", &uiLeft, &uiTop, v3);
    v118 = SlideListWin::CreateWin(uiLeft - iOffX, uiTop - iOffY, v117, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
    v2->m_pListWinHairType = v118;
    v118->m_uiLClickMsg = 13;
    SlideListWin::UpdateViewList(v2->m_pListWinHairType);
    v119 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle", &uiLeft, &uiTop, v3);
    v120 = (NiD3DDefaultShader *)SlideBar::CreateWin(
                                   spNode.m_pObject,
                                   "SlideBar",
                                   "SlideBar_UpBtn",
                                   "SlideBar_DnBtn",
                                   v119,
                                   0,
                                   (PgWin *)&v2->vfptr);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_pkSlideBarList, v120);
    v2->m_pkSlideBarList.m_pObject->m_uiClickMsg = 14;
    v2->m_pkSlideBarList.m_pObject->m_eType = 1;
    v121 = (NiTexturePalette **)v2->m_pkSlideBarList.m_pObject;
    v122 = (*v121)[21].vfptr;
    v123 = v2->m_pkSlideBarList.m_pObject;
    pTexturePalette = *v121;
    v124 = ((int (__thiscall *)(SlideBar *))v122)(v123);
    v125 = ((int (__thiscall *)(NiTexturePalette **, int))(*v121)[20].m_uiRefCount)(v121, v124);
    ((void (__thiscall *)(NiTexturePalette **, int))pTexturePalette[38].m_uiRefCount)(v121, v125);
    SlideBar::SetSplitCnt(v2->m_pkSlideBarList.m_pObject, 9);
    ((void (__thiscall *)(CHairShopwin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.80000001,
      0.40000001);
    if ( v2->m_byTargetState )
      v2->m_byTargetState = 0;
    CHairShopwin::ActivateCheckAddBtn(v2, 0);
    LOBYTE(v139) = 0;
    SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
    v126 = spNode.m_pObject;
    v139 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v126 )
      v126->vfptr->__vecDelDtor((NiRefObject *)v126, 1u);
    result = 1;
  }
  else
  {
    v139 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00630890) --------------------------------------------------------
CColorIcon *__thiscall CColorIcon::`scalar deleting destructor'(CColorIcon *this, unsigned int a2)
{
  CColorIcon *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&CColorIcon::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CColorIcon::`vftable'{for `IDirectMessenger'};
  IconWin::~IconWin((IconWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B8294: using guessed type void (__thiscall *CColorIcon::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B82B4: using guessed type int (__thiscall *CColorIcon::`vftable'{for `NiNode'})(void *p, char);

//----- (006308D0) --------------------------------------------------------
CHairShopwin *__thiscall CHairShopwin::`scalar deleting destructor'(CHairShopwin *this, unsigned int a2)
{
  CHairShopwin *v2; // esi@1
  SlideBar *v3; // edi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&CHairShopwin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CHairShopwin::`vftable'{for `IDirectMessenger'};
  v3 = this->m_pkSlideBarList.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B851C: using guessed type void (__thiscall *CHairShopwin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9B853C: using guessed type int (__thiscall *CHairShopwin::`vftable'{for `NiNode'})(void *p, char);

//----- (00630970) --------------------------------------------------------
void __cdecl FaceInfoTab::GetExactEquipableFace(char ucStartGrade, char ucEndGrade, void *padwResult)
{
  int v3; // eax@1
  unsigned int v4; // edi@2
  unsigned int v5; // esi@4
  char *v6; // eax@5
  unsigned __int8 v7; // al@6
  unsigned int _Val; // [sp+8h] [bp-4h]@8

  v3 = *(_DWORD *)(ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable + 56);
  if ( v3 )
    v4 = *(_DWORD *)(v3 + 40);
  else
    v4 = 0;
  v5 = 0;
  if ( v4 )
  {
    do
    {
      v6 = CDataReader::GetRecord((CDataReader *)(ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable + 4), v5);
      if ( v6 )
      {
        v7 = v6[33];
        if ( v7 >= (unsigned __int8)ucStartGrade && v7 <= (unsigned __int8)ucEndGrade )
        {
          _Val = v5;
          std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
            (std::vector<unsigned long,std::allocator<unsigned long> > *)padwResult,
            &_Val);
        }
      }
      ++v5;
    }
    while ( v5 < v4 );
  }
}
// A8869C: using guessed type int ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable;

//----- (006309D0) --------------------------------------------------------
void __cdecl HairInfoTab::GetExactEquipableHairType(char kClassID, char ucGender, char ucStartGrade, char ucEndGrade, void *padwResult)
{
  char v5; // al@2
  int v6; // ecx@9
  unsigned int v7; // esi@9
  unsigned int v8; // ecx@10
  char v9; // bl@14
  unsigned int v10; // edi@14
  char *v11; // eax@15
  int v12; // ecx@15
  unsigned __int8 v13; // al@20
  char v14; // bl@26
  unsigned int v15; // edi@26
  char *v16; // eax@27
  int v17; // ecx@27
  unsigned __int8 v18; // al@32
  char v19; // bl@38
  unsigned int v20; // edi@38
  char *v21; // eax@39
  int v22; // ecx@39
  unsigned __int8 v23; // al@44
  char v24; // bl@50
  unsigned int v25; // edi@50
  char *v26; // eax@51
  int v27; // ecx@51
  unsigned __int8 v28; // al@56
  char v29; // bl@62
  unsigned int v30; // edi@62
  char *v31; // eax@63
  int v32; // ecx@63
  unsigned __int8 v33; // al@68
  std::vector<unsigned long,std::allocator<unsigned long> > *v34; // edi@74
  char v35; // bl@74
  char *v36; // eax@75
  int v37; // ecx@75
  unsigned __int8 v38; // al@80

  switch ( kClassID )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      v5 = 1;
      break;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      v5 = 6;
      break;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      v5 = 11;
      break;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      v5 = 16;
      break;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      v5 = 21;
      break;
    case 0x1A:
    case 0x1B:
      v5 = 26;
      break;
    default:
      v5 = 0;
      break;
  }
  v6 = *(_DWORD *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 56);
  v7 = 0;
  if ( v6 )
  {
    v8 = *(_DWORD *)(v6 + 40);
    *(_DWORD *)&kClassID = v8;
  }
  else
  {
    *(_DWORD *)&kClassID = 0;
    v8 = 0;
  }
  switch ( v5 )
  {
    case 1:
      if ( v8 > 0 )
      {
        v9 = ucGender;
        v10 = kClassID;
        do
        {
          v11 = CDataReader::GetRecord((CDataReader *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 4), v7);
          v12 = *(_DWORD *)(v11 + 66);
          if ( v12 == 3 || v12 == 1 && v9 == 1 || v12 == 2 && !v9 )
          {
            v13 = v11[65];
            if ( v13 <= (unsigned __int8)ucEndGrade && v13 >= (unsigned __int8)ucStartGrade )
            {
              *(_DWORD *)&kClassID = v7;
              std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
                (std::vector<unsigned long,std::allocator<unsigned long> > *)padwResult,
                (const unsigned int *)&kClassID);
            }
          }
          ++v7;
        }
        while ( v7 < v10 );
      }
      break;
    case 6:
      if ( v8 > 0 )
      {
        v14 = ucGender;
        v15 = kClassID;
        do
        {
          v16 = CDataReader::GetRecord((CDataReader *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 4), v7);
          v17 = *(_DWORD *)(v16 + 74);
          if ( v17 == 3 || v17 == 1 && v14 == 1 || v17 == 2 && !v14 )
          {
            v18 = v16[65];
            if ( v18 <= (unsigned __int8)ucEndGrade && v18 >= (unsigned __int8)ucStartGrade )
            {
              *(_DWORD *)&kClassID = v7;
              std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
                (std::vector<unsigned long,std::allocator<unsigned long> > *)padwResult,
                (const unsigned int *)&kClassID);
            }
          }
          ++v7;
        }
        while ( v7 < v15 );
      }
      break;
    case 0xB:
      if ( v8 > 0 )
      {
        v19 = ucGender;
        v20 = kClassID;
        do
        {
          v21 = CDataReader::GetRecord((CDataReader *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 4), v7);
          v22 = *(_DWORD *)(v21 + 70);
          if ( v22 == 3 || v22 == 1 && v19 == 1 || v22 == 2 && !v19 )
          {
            v23 = v21[65];
            if ( v23 <= (unsigned __int8)ucEndGrade && v23 >= (unsigned __int8)ucStartGrade )
            {
              *(_DWORD *)&kClassID = v7;
              std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
                (std::vector<unsigned long,std::allocator<unsigned long> > *)padwResult,
                (const unsigned int *)&kClassID);
            }
          }
          ++v7;
        }
        while ( v7 < v20 );
      }
      break;
    case 0x10:
      if ( v8 > 0 )
      {
        v24 = ucGender;
        v25 = kClassID;
        do
        {
          v26 = CDataReader::GetRecord((CDataReader *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 4), v7);
          v27 = *(_DWORD *)(v26 + 78);
          if ( v27 == 3 || v27 == 1 && v24 == 1 || v27 == 2 && !v24 )
          {
            v28 = v26[65];
            if ( v28 <= (unsigned __int8)ucEndGrade && v28 >= (unsigned __int8)ucStartGrade )
            {
              *(_DWORD *)&kClassID = v7;
              std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
                (std::vector<unsigned long,std::allocator<unsigned long> > *)padwResult,
                (const unsigned int *)&kClassID);
            }
          }
          ++v7;
        }
        while ( v7 < v25 );
      }
      break;
    case 0x15:
      if ( v8 > 0 )
      {
        v29 = ucGender;
        v30 = kClassID;
        do
        {
          v31 = CDataReader::GetRecord((CDataReader *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 4), v7);
          v32 = *(_DWORD *)(v31 + 78);
          if ( v32 == 3 || v32 == 1 && v29 == 1 || v32 == 2 && !v29 )
          {
            v33 = v31[65];
            if ( v33 <= (unsigned __int8)ucEndGrade && v33 >= (unsigned __int8)ucStartGrade )
            {
              *(_DWORD *)&kClassID = v7;
              std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
                (std::vector<unsigned long,std::allocator<unsigned long> > *)padwResult,
                (const unsigned int *)&kClassID);
            }
          }
          ++v7;
        }
        while ( v7 < v30 );
      }
      break;
    case 0x1A:
      if ( v8 > 0 )
      {
        v34 = (std::vector<unsigned long,std::allocator<unsigned long> > *)padwResult;
        v35 = ucGender;
        do
        {
          v36 = CDataReader::GetRecord((CDataReader *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 4), v7);
          v37 = *(_DWORD *)(v36 + 78);
          if ( v37 == 3 || v37 == 1 && v35 == 1 || v37 == 2 && !v35 )
          {
            v38 = v36[65];
            if ( v38 <= (unsigned __int8)ucEndGrade && v38 >= (unsigned __int8)ucStartGrade )
            {
              padwResult = (void *)v7;
              std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(v34, (const unsigned int *)&padwResult);
            }
          }
          ++v7;
        }
        while ( v7 < kClassID );
      }
      break;
    default:
      return;
  }
}
// A88694: using guessed type int ITableBase<HairInfo,HairInfoTab>::ms_pkTable;

//----- (00630D20) --------------------------------------------------------
void __cdecl HairColorInfoTab::GetExactEquipableHairColor(char ucStartGrade, char ucEndGrade, void *padwResult)
{
  int v3; // eax@1
  unsigned int v4; // edi@2
  unsigned int v5; // esi@4
  char *v6; // eax@5
  unsigned __int8 v7; // al@6
  unsigned int _Val; // [sp+8h] [bp-4h]@8

  v3 = *(_DWORD *)(ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable + 56);
  if ( v3 )
    v4 = *(_DWORD *)(v3 + 40);
  else
    v4 = 0;
  v5 = 0;
  if ( v4 )
  {
    do
    {
      v6 = CDataReader::GetRecord((CDataReader *)(ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable + 4), v5);
      if ( v6 )
      {
        v7 = v6[61];
        if ( v7 >= (unsigned __int8)ucStartGrade && v7 <= (unsigned __int8)ucEndGrade )
        {
          _Val = v5;
          std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
            (std::vector<unsigned long,std::allocator<unsigned long> > *)padwResult,
            &_Val);
        }
      }
      ++v5;
    }
    while ( v5 < v4 );
  }
}
// A886A0: using guessed type int ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable;

//----- (00630D80) --------------------------------------------------------
signed int __cdecl ParseWeaponDemandMask(char *pcStr)
{
  char *v1; // edi@1
  signed int v2; // esi@1
  int v3; // ecx@1
  char v4; // al@2
  char acSubStr[32]; // [sp+8h] [bp-24h]@4

  v1 = pcStr;
  v2 = 0;
  v3 = 0;
  while ( 1 )
  {
    while ( 1 )
    {
      v4 = *v1;
      if ( *v1 == 38 || !v4 )
        break;
      acSubStr[v3++] = v4;
      ++v1;
    }
    acSubStr[v3] = 0;
    if ( _strcmpi(acSubStr, "Sword") )
    {
      if ( _strcmpi(acSubStr, "TwoHand") )
      {
        if ( _strcmpi(acSubStr, "TwoHandAxe") )
        {
          if ( _strcmpi(acSubStr, "Hammer") )
          {
            if ( _strcmpi(acSubStr, "Mace") )
            {
              if ( _strcmpi(acSubStr, off_9B8788) )
              {
                if ( _strcmpi(acSubStr, "CrossBow") )
                {
                  if ( _strcmpi(acSubStr, "Staff") )
                  {
                    if ( _strcmpi(acSubStr, "Wand") )
                    {
                      if ( _strcmpi(acSubStr, "Pickaxe") )
                      {
                        if ( _strcmpi(acSubStr, off_9B87B0) )
                        {
                          if ( _strcmpi(acSubStr, off_9B87B4) )
                          {
                            if ( _strcmpi(acSubStr, "InvincibleHammer") )
                            {
                              if ( _strcmpi(acSubStr, "Claw") )
                              {
                                if ( _strcmpi(acSubStr, "DSword") )
                                {
                                  if ( _strcmpi(acSubStr, "Blade") )
                                  {
                                    if ( _strcmpi(acSubStr, "None")
                                      && (!_strcmpi(acSubStr, off_9B87EC) || !_strcmpi(acSubStr, "-")) )
                                    {
                                      v2 = -1;
                                    }
                                  }
                                  else
                                  {
                                    v2 |= 0x60000u;
                                  }
                                }
                                else
                                {
                                  v2 |= 0x20000u;
                                }
                              }
                              else
                              {
                                v2 |= 0x40000u;
                              }
                            }
                            else
                            {
                              v2 |= 0x10000u;
                            }
                          }
                          else
                          {
                            v2 |= 0x800u;
                          }
                        }
                        else
                        {
                          v2 |= 0x400u;
                        }
                      }
                      else
                      {
                        v2 |= 0x200u;
                      }
                    }
                    else
                    {
                      v2 |= 0x100u;
                    }
                  }
                  else
                  {
                    v2 |= 0x80u;
                  }
                }
                else
                {
                  v2 |= 0x10u;
                }
              }
              else
              {
                v2 |= 8u;
              }
            }
            else
            {
              v2 |= 0x40u;
            }
          }
          else
          {
            v2 |= 0x20u;
          }
        }
        else
        {
          v2 |= 4u;
        }
      }
      else
      {
        v2 |= 2u;
      }
    }
    else
    {
      v2 |= 1u;
    }
    v3 = 0;
    if ( !*v1 )
      break;
    ++v1;
  }
  return v2;
}

//----- (00631000) --------------------------------------------------------
signed int __cdecl MapEquipWeaponToActionWeaponDemandMask(ItemInfo *pkEquipItemInfo)
{
  signed int result; // eax@3

  if ( pkEquipItemInfo )
  {
    switch ( pkEquipItemInfo->WeaponType )
    {
      default:
        goto $LN29_27;
      case 1:
        if ( pkEquipItemInfo->TwoHand )
          goto $LN29_27;
        return 1;
      case 0x15:
        if ( !pkEquipItemInfo->TwoHand )
          goto $LN29_27;
        return 2;
      case 2:
        if ( !pkEquipItemInfo->TwoHand )
          goto $LN29_27;
        return 8;
      case 0xA:
        if ( !pkEquipItemInfo->TwoHand )
          goto $LN29_27;
        return 16;
      case 4:
        if ( !pkEquipItemInfo->TwoHand )
          goto $LN29_27;
        return 4;
      case 5:
        if ( pkEquipItemInfo->TwoHand )
          goto $LN29_27;
        return 64;
      case 0xD:
        if ( pkEquipItemInfo->TwoHand )
          goto $LN29_27;
        return 32;
      case 0xB:
        if ( !pkEquipItemInfo->TwoHand )
          goto $LN29_27;
        return 256;
      case 3:
        if ( !pkEquipItemInfo->TwoHand )
          goto $LN29_27;
        return 128;
      case 0xF:
        if ( _strcmpi(pkEquipItemInfo->InxName, off_9B87F4) )
          result = _strcmpi(pkEquipItemInfo->InxName, off_9B87F8) != 0 ? 512 : 1024;
        else
          result = 2048;
        return result;
      case 0x10:
        return 0x10000;
      case 0x12:
        if ( !pkEquipItemInfo->TwoHand )
          goto $LN29_27;
        return 0x40000;
      case 0x11:
        if ( !pkEquipItemInfo->TwoHand )
          goto $LN29_27;
        return 0x20000;
      case 0x13:
        if ( !pkEquipItemInfo->TwoHand )
          goto $LN29_27;
        result = 393216;
        break;
    }
  }
  else
  {
$LN29_27:
    result = 0;
  }
  return result;
}

//----- (00631160) --------------------------------------------------------
void __thiscall ActionInfoSet::ActionInfoSet(ActionInfoSet *this, unsigned int uiInfoNum)
{
  this->vfptr = (ActionInfoSetVtbl *)&ActionInfoSet::`vftable';
  this->m_uiTotal = uiInfoNum;
  if ( uiInfoNum )
    this->m_pkInfo = (ActionInfo *)operator new[](352 * uiInfoNum);
  else
    this->m_pkInfo = 0;
}
// 9B8968: using guessed type int (__thiscall *ActionInfoSet::`vftable')(void *p, char);

//----- (006311B0) --------------------------------------------------------
void __thiscall ActionInfoSet::~ActionInfoSet(ActionInfoSet *this)
{
  ActionInfo *v1; // ST00_4@1

  v1 = this->m_pkInfo;
  this->vfptr = (ActionInfoSetVtbl *)&ActionInfoSet::`vftable';
  operator delete[](v1);
}
// 9B8968: using guessed type int (__thiscall *ActionInfoSet::`vftable')(void *p, char);

//----- (006311D0) --------------------------------------------------------
ActionInfo *__thiscall ActionInfoSet::GetByEventCode(ActionInfoSet *this, unsigned int dwEventCode)
{
  unsigned int v2; // edx@1
  unsigned int v3; // eax@1
  ActionInfo *v4; // esi@2
  unsigned int *v5; // ecx@2
  ActionInfo *result; // eax@5

  v2 = this->m_uiTotal;
  v3 = 0;
  if ( v2 )
  {
    v4 = this->m_pkInfo;
    v5 = &v4->uiEventCode;
    while ( *v5 != dwEventCode )
    {
      ++v3;
      v5 += 88;
      if ( v3 >= v2 )
        goto LABEL_5;
    }
    result = &v4[v3];
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (00631210) --------------------------------------------------------
ActionInfo *__thiscall ActionInfoSet::GetByInxName(ActionInfoSet *this, const char *pkInxName)
{
  unsigned int v2; // edi@1
  unsigned int v3; // eax@1
  const char *v4; // esi@2
  ActionInfo *result; // eax@5
  ActionInfo *v6; // [sp+Ch] [bp-4h]@2

  v2 = this->m_uiTotal;
  v3 = 0;
  if ( v2 )
  {
    v6 = this->m_pkInfo;
    v4 = v6->InxName;
    while ( strcmp(v4, pkInxName) )
    {
      ++v3;
      v4 += 352;
      if ( v3 >= v2 )
        goto LABEL_5;
    }
    result = &v6[v3];
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (00631290) --------------------------------------------------------
ActionInfo *__thiscall ActionInfoSet::GetProperActionInfo(ActionInfoSet *this, char *acActionName, ItemInfo *pkEquipItemInfo, bool bNoWeaponCheck)
{
  unsigned int v4; // esi@1
  ActionInfoSet *v5; // ebx@1
  signed int v6; // eax@8
  unsigned int v7; // ecx@36
  ActionInfo *result; // eax@41
  unsigned int i; // [sp+Ch] [bp-8h]@1
  int v10; // [sp+10h] [bp-4h]@2

  v4 = 0;
  v5 = this;
  i = 0;
  if ( this->m_uiTotal )
  {
    v10 = 0;
    while ( 1 )
    {
      if ( !_strcmpi(v5->m_pkInfo[v10].ActionName, acActionName) )
      {
        if ( !bNoWeaponCheck )
          break;
        if ( pkEquipItemInfo )
        {
          switch ( pkEquipItemInfo->WeaponType )
          {
            case 1:
              if ( pkEquipItemInfo->TwoHand )
                goto $LN15_55;
              v6 = 1;
              break;
            case 0x15:
              if ( !pkEquipItemInfo->TwoHand )
                goto $LN15_55;
              v6 = 2;
              break;
            case 2:
              if ( !pkEquipItemInfo->TwoHand )
                goto $LN15_55;
              v6 = 8;
              break;
            case 0xA:
              if ( !pkEquipItemInfo->TwoHand )
                goto $LN15_55;
              v6 = 16;
              break;
            case 4:
              if ( !pkEquipItemInfo->TwoHand )
                goto $LN15_55;
              v6 = 4;
              break;
            case 5:
              if ( pkEquipItemInfo->TwoHand )
                goto $LN15_55;
              v6 = 64;
              break;
            case 0xD:
              if ( pkEquipItemInfo->TwoHand )
                goto $LN15_55;
              v6 = 32;
              break;
            case 0xB:
              if ( !pkEquipItemInfo->TwoHand )
                goto $LN15_55;
              v6 = 256;
              break;
            case 3:
              if ( !pkEquipItemInfo->TwoHand )
                goto $LN15_55;
              v6 = 128;
              break;
            case 0xF:
              if ( _strcmpi(pkEquipItemInfo->InxName, off_9B87F4) )
              {
                v4 = i;
                v6 = _strcmpi(pkEquipItemInfo->InxName, off_9B87F8) != 0 ? 512 : 1024;
              }
              else
              {
                v4 = i;
                v6 = 2048;
              }
              break;
            case 0x10:
              v6 = 0x10000;
              break;
            case 0x12:
              if ( !pkEquipItemInfo->TwoHand )
                goto $LN15_55;
              v6 = 0x40000;
              break;
            case 0x11:
              if ( !pkEquipItemInfo->TwoHand )
                goto $LN15_55;
              v6 = 0x20000;
              break;
            case 0x13:
              if ( !pkEquipItemInfo->TwoHand )
                goto $LN15_55;
              v6 = 393216;
              break;
            default:
              goto $LN15_55;
          }
        }
        else
        {
$LN15_55:
          v6 = 0;
        }
        v7 = v5->m_pkInfo[v10].dwWeaponDemandMask;
        if ( v7 == -1 || !v7 && !v6 )
          break;
        if ( v7 & v6 )
          break;
      }
      ++v10;
      i = ++v4;
      if ( v4 >= v5->m_uiTotal )
        goto LABEL_41;
    }
    result = &v5->m_pkInfo[v4];
  }
  else
  {
LABEL_41:
    result = 0;
  }
  return result;
}

//----- (006314A0) --------------------------------------------------------
char __thiscall ActionInfoSet::IsActionExist(ActionInfoSet *this, char *acActionName)
{
  ActionInfoSet *v2; // esi@1
  unsigned int v3; // edi@1
  int v4; // ebx@2
  char result; // al@5

  v2 = this;
  v3 = 0;
  if ( this->m_uiTotal )
  {
    v4 = 0;
    while ( _strcmpi(v2->m_pkInfo[v4].ActionName, acActionName) )
    {
      ++v3;
      ++v4;
      if ( v3 >= v2->m_uiTotal )
        goto LABEL_5;
    }
    result = 1;
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (006314F0) --------------------------------------------------------
ActionInfo *__thiscall ActionInfoSet::GetByID(ActionInfoSet *this, unsigned __int16 ID)
{
  unsigned int v2; // edx@1
  unsigned int v3; // eax@1
  ActionInfo *v4; // esi@2
  ActionInfo *v5; // ecx@2
  ActionInfo *result; // eax@5

  v2 = this->m_uiTotal;
  v3 = 0;
  if ( v2 )
  {
    v4 = this->m_pkInfo;
    v5 = this->m_pkInfo;
    while ( v5->ID != ID )
    {
      ++v3;
      ++v5;
      if ( v3 >= v2 )
        goto LABEL_5;
    }
    result = &v4[v3];
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (00631530) --------------------------------------------------------
int __cdecl ActionInfoTable::GetEffPos(char *pcStr)
{
  int result; // eax@1

  result = strcmp(pcStr, "HairLink");
  if ( result )
  {
    if ( !strcmp(pcStr, "Chest") )
      return 1;
    if ( !strcmp(pcStr, "LeftHand") )
      return 2;
    if ( !strcmp(pcStr, "RightHand") )
      return 3;
    if ( !strcmp(pcStr, "LeftShoesAcc") )
      return 4;
    if ( !strcmp(pcStr, "RightShoesAcc") )
      return 5;
    if ( !strcmp(pcStr, "BC_ChestParallel") )
      return 6;
    if ( !strcmp(pcStr, "BC_ChestToChest") )
      return 7;
    if ( !strcmp(pcStr, "Ground") )
      return 8;
    if ( !strcmp(pcStr, "Op_Ground") )
      return 9;
    if ( !strcmp(pcStr, "Op_Chest") )
    {
      result = 10;
    }
    else if ( !strcmp(pcStr, "World") )
    {
      result = 11;
    }
    else if ( !strcmp(pcStr, "Op_World") )
    {
      result = 12;
    }
    else if ( !strcmp(pcStr, "Spot") )
    {
      result = 13;
    }
    else if ( !strcmp(pcStr, "OP_HairLink") )
    {
      result = 14;
    }
    else if ( !strcmp(pcStr, "TopLink") )
    {
      result = 15;
    }
    else if ( !strcmp(pcStr, "OP_TopLink") )
    {
      result = 16;
    }
    else
    {
      if ( !strcmp(pcStr, "-") )
        return 9;
      if ( !strcmp(pcStr, "0") )
        result = 9;
      else
        result = 8;
    }
  }
  return result;
}

//----- (00631970) --------------------------------------------------------
void __cdecl ActionInfoTable::ClearMobActionInfo()
{
  int v0; // eax@1
  NiTMapItem<unsigned int,NiVBSet *> *v1; // eax@4
  NiTMapItem<unsigned int,NiVBSet *> *v2; // esi@5
  NiVBSet *v3; // edi@6
  unsigned int v4; // eax@9

  v0 = 0;
  if ( ActionInfoTable::m_kCharMap.m_uiHashSize )
  {
    while ( !ActionInfoTable::m_kCharMap.m_ppkHashTable[v0] )
    {
      if ( ++v0 >= ActionInfoTable::m_kCharMap.m_uiHashSize )
        goto LABEL_4;
    }
    v1 = ActionInfoTable::m_kCharMap.m_ppkHashTable[v0];
  }
  else
  {
LABEL_4:
    v1 = 0;
  }
  v2 = v1;
  while ( v2 )
  {
    v3 = v2->m_val;
    if ( v2->m_pkNext )
    {
      v2 = v2->m_pkNext;
    }
    else
    {
      v4 = ActionInfoTable::m_kCharMap.vfptr->KeyToHashIndex(&ActionInfoTable::m_kCharMap, v2->m_key) + 1;
      if ( v4 >= ActionInfoTable::m_kCharMap.m_uiHashSize )
      {
LABEL_12:
        v2 = 0;
      }
      else
      {
        while ( 1 )
        {
          v2 = ActionInfoTable::m_kCharMap.m_ppkHashTable[v4];
          if ( v2 )
            break;
          if ( ++v4 >= ActionInfoTable::m_kCharMap.m_uiHashSize )
            goto LABEL_12;
        }
      }
    }
    if ( v3 )
      (*(void (__thiscall **)(NiVBSet *, signed int))v3->m_uiIndex)(v3, 1);
  }
}

//----- (00631A00) --------------------------------------------------------
void __cdecl ActionInfoTable::ClearCharActionInfo()
{
  int v0; // eax@1
  NiTMapItem<unsigned int,NiVBSet *> *v1; // eax@4
  NiTMapItem<unsigned int,NiVBSet *> *v2; // esi@5
  NiVBSet *v3; // edi@6
  unsigned int v4; // eax@9

  v0 = 0;
  if ( ActionInfoTable::m_kMobMap.m_uiHashSize )
  {
    while ( !ActionInfoTable::m_kMobMap.m_ppkHashTable[v0] )
    {
      if ( ++v0 >= ActionInfoTable::m_kMobMap.m_uiHashSize )
        goto LABEL_4;
    }
    v1 = ActionInfoTable::m_kMobMap.m_ppkHashTable[v0];
  }
  else
  {
LABEL_4:
    v1 = 0;
  }
  v2 = v1;
  while ( v2 )
  {
    v3 = v2->m_val;
    if ( v2->m_pkNext )
    {
      v2 = v2->m_pkNext;
    }
    else
    {
      v4 = ActionInfoTable::m_kMobMap.vfptr->KeyToHashIndex(&ActionInfoTable::m_kMobMap, v2->m_key) + 1;
      if ( v4 >= ActionInfoTable::m_kMobMap.m_uiHashSize )
      {
LABEL_12:
        v2 = 0;
      }
      else
      {
        while ( 1 )
        {
          v2 = ActionInfoTable::m_kMobMap.m_ppkHashTable[v4];
          if ( v2 )
            break;
          if ( ++v4 >= ActionInfoTable::m_kMobMap.m_uiHashSize )
            goto LABEL_12;
        }
      }
    }
    if ( v3 )
      (*(void (__thiscall **)(NiVBSet *, signed int))v3->m_uiIndex)(v3, 1);
  }
}

//----- (00631A90) --------------------------------------------------------
void __cdecl ActionInfoTable::ClearRidePetActionInfo()
{
  int v0; // eax@1
  NiTMapItem<unsigned int,NiVBSet *> *v1; // eax@4
  NiTMapItem<unsigned int,NiVBSet *> *v2; // esi@5
  NiVBSet *v3; // edi@6
  unsigned int v4; // eax@9

  v0 = 0;
  if ( ActionInfoTable::m_kRidePetMap.m_uiHashSize )
  {
    while ( !ActionInfoTable::m_kRidePetMap.m_ppkHashTable[v0] )
    {
      if ( ++v0 >= ActionInfoTable::m_kRidePetMap.m_uiHashSize )
        goto LABEL_4;
    }
    v1 = ActionInfoTable::m_kRidePetMap.m_ppkHashTable[v0];
  }
  else
  {
LABEL_4:
    v1 = 0;
  }
  v2 = v1;
  while ( v2 )
  {
    v3 = v2->m_val;
    if ( v2->m_pkNext )
    {
      v2 = v2->m_pkNext;
    }
    else
    {
      v4 = ActionInfoTable::m_kRidePetMap.vfptr->KeyToHashIndex(&ActionInfoTable::m_kRidePetMap, v2->m_key) + 1;
      if ( v4 >= ActionInfoTable::m_kRidePetMap.m_uiHashSize )
      {
LABEL_12:
        v2 = 0;
      }
      else
      {
        while ( 1 )
        {
          v2 = ActionInfoTable::m_kRidePetMap.m_ppkHashTable[v4];
          if ( v2 )
            break;
          if ( ++v4 >= ActionInfoTable::m_kRidePetMap.m_uiHashSize )
            goto LABEL_12;
        }
      }
    }
    if ( v3 )
      (*(void (__thiscall **)(NiVBSet *, signed int))v3->m_uiIndex)(v3, 1);
  }
}

//----- (00631B20) --------------------------------------------------------
void __cdecl ActionInfoTable::ClearMoverActionInfo()
{
  int v0; // eax@1
  NiTMapItem<unsigned int,NiVBSet *> *v1; // eax@4
  NiTMapItem<unsigned int,NiVBSet *> *v2; // esi@5
  NiVBSet *v3; // edi@6
  unsigned int v4; // eax@9

  v0 = 0;
  if ( ActionInfoTable::m_kMoverMap.m_uiHashSize )
  {
    while ( !ActionInfoTable::m_kMoverMap.m_ppkHashTable[v0] )
    {
      if ( ++v0 >= ActionInfoTable::m_kMoverMap.m_uiHashSize )
        goto LABEL_4;
    }
    v1 = ActionInfoTable::m_kMoverMap.m_ppkHashTable[v0];
  }
  else
  {
LABEL_4:
    v1 = 0;
  }
  v2 = v1;
  while ( v2 )
  {
    v3 = v2->m_val;
    if ( v2->m_pkNext )
    {
      v2 = v2->m_pkNext;
    }
    else
    {
      v4 = ActionInfoTable::m_kMoverMap.vfptr->KeyToHashIndex(&ActionInfoTable::m_kMoverMap, v2->m_key) + 1;
      if ( v4 >= ActionInfoTable::m_kMoverMap.m_uiHashSize )
      {
LABEL_12:
        v2 = 0;
      }
      else
      {
        while ( 1 )
        {
          v2 = ActionInfoTable::m_kMoverMap.m_ppkHashTable[v4];
          if ( v2 )
            break;
          if ( ++v4 >= ActionInfoTable::m_kMoverMap.m_uiHashSize )
            goto LABEL_12;
        }
      }
    }
    if ( v3 )
      (*(void (__thiscall **)(NiVBSet *, signed int))v3->m_uiIndex)(v3, 1);
  }
}

//----- (00631BB0) --------------------------------------------------------
void __cdecl ActionInfoTable::ClearPetActionInfo()
{
  int v0; // eax@1
  NiTMapItem<unsigned int,NiVBSet *> *v1; // eax@4
  NiTMapItem<unsigned int,NiVBSet *> *v2; // esi@5
  NiVBSet *v3; // edi@6
  unsigned int v4; // eax@9

  v0 = 0;
  if ( ActionInfoTable::m_kPetMap.m_uiHashSize )
  {
    while ( !ActionInfoTable::m_kPetMap.m_ppkHashTable[v0] )
    {
      if ( ++v0 >= ActionInfoTable::m_kPetMap.m_uiHashSize )
        goto LABEL_4;
    }
    v1 = ActionInfoTable::m_kPetMap.m_ppkHashTable[v0];
  }
  else
  {
LABEL_4:
    v1 = 0;
  }
  v2 = v1;
  while ( v2 )
  {
    v3 = v2->m_val;
    if ( v2->m_pkNext )
    {
      v2 = v2->m_pkNext;
    }
    else
    {
      v4 = ActionInfoTable::m_kPetMap.vfptr->KeyToHashIndex(&ActionInfoTable::m_kPetMap, v2->m_key) + 1;
      if ( v4 >= ActionInfoTable::m_kPetMap.m_uiHashSize )
      {
LABEL_12:
        v2 = 0;
      }
      else
      {
        while ( 1 )
        {
          v2 = ActionInfoTable::m_kPetMap.m_ppkHashTable[v4];
          if ( v2 )
            break;
          if ( ++v4 >= ActionInfoTable::m_kPetMap.m_uiHashSize )
            goto LABEL_12;
        }
      }
    }
    if ( v3 )
      (*(void (__thiscall **)(NiVBSet *, signed int))v3->m_uiIndex)(v3, 1);
  }
}

//----- (00631C40) --------------------------------------------------------
ActionInfoSet *__cdecl ActionInfoTable::GetCharActionInfo(char kClass, char ucGender)
{
  char v2; // al@2

  switch ( kClass )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      v2 = 1;
      break;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      v2 = 6;
      break;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      v2 = 11;
      break;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      v2 = 16;
      break;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      v2 = 21;
      break;
    case 0x1A:
    case 0x1B:
      v2 = 26;
      break;
    default:
      v2 = 0;
      break;
  }
  *(_DWORD *)&kClass = 0;
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
    &ActionInfoTable::m_kCharMap,
    (unsigned __int8)ucGender | ((unsigned __int8)v2 << 8),
    (NiVBSet **)&kClass);
  return (ActionInfoSet *)kClass;
}

//----- (00631D10) --------------------------------------------------------
_iobuf *__cdecl ActionInfoTable::LoadData(char *pcFileName)
{
  _iobuf *result; // eax@3
  _iobuf *v2; // edi@3
  ActionInfoSet *v3; // esi@4
  unsigned int v4; // eax@5
  unsigned int uiTotal; // [sp+10h] [bp-118h]@4
  char acFileName[260]; // [sp+14h] [bp-114h]@3
  int v7; // [sp+124h] [bp-4h]@4

  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acFileName, "%sAction\\%s.dat", &Folder::m_acSystem, pcFileName);
  result = fopen(acFileName, "rb");
  v2 = result;
  if ( result )
  {
    fread(&uiTotal, 4u, 1u, result);
    v3 = (ActionInfoSet *)operator new(0x8Cu);
    v7 = 0;
    if ( v3 )
    {
      v4 = uiTotal;
      v3->vfptr = (ActionInfoSetVtbl *)&ActionInfoSet::`vftable';
      v3->m_uiTotal = v4;
      if ( v4 )
        v3->m_pkInfo = (ActionInfo *)operator new[](352 * v4);
      else
        v3->m_pkInfo = 0;
    }
    else
    {
      v3 = 0;
    }
    fread(v3->m_pkInfo, 352 * v3->m_uiTotal, 1u, v2);
    fclose(v2);
    result = (_iobuf *)v3;
  }
  return result;
}
// 9B8968: using guessed type int (__thiscall *ActionInfoSet::`vftable')(void *p, char);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00631E30) --------------------------------------------------------
void __cdecl ActionInfoTable::Terminate()
{
  ActionInfoTable::ClearMobActionInfo();
  ActionInfoTable::ClearCharActionInfo();
  ActionInfoTable::ClearRidePetActionInfo();
  ActionInfoTable::ClearMoverActionInfo();
  ActionInfoTable::ClearPetActionInfo();
}

//----- (00631E50) --------------------------------------------------------
char __cdecl ActionInfoTable::LoadChar()
{
  signed int v0; // edi@1
  NiVBSet *v1; // eax@2
  char *v2; // edx@2
  unsigned int *v3; // esi@2
  char v4; // cl@3

  v0 = 0;
  do
  {
    v1 = (NiVBSet *)ActionInfoTable::LoadData(apcFileName_0[v0]);
    v2 = apcFileName_0[v0];
    v3 = &v1->m_uiBlockSize;
    do
    {
      v4 = *v2;
      *(_BYTE *)v3 = *v2++;
      v3 = (unsigned int *)((char *)v3 + 1);
    }
    while ( v4 );
    if ( v1 )
      NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::SetAt(
        &ActionInfoTable::m_kCharMap,
        (unsigned __int8)aucGener[v0] | ((unsigned __int8)akClass[v0] << 8),
        v1);
    ++v0;
  }
  while ( v0 < 12 );
  return 1;
}

//----- (00631EC0) --------------------------------------------------------
ActionInfoSet *__cdecl ActionInfoTable::LoadRidePet(unsigned int kID)
{
  unsigned int v1; // esi@1
  char *v2; // eax@2
  ActionInfoSet *result; // eax@4
  NiVBSet *v4; // eax@5
  ActionInfoSet *v5; // esi@5

  v1 = 0;
  if ( !ITableBase<RIDING,RidePetTable>::GetTotal() )
    goto LABEL_4;
  while ( 1 )
  {
    v2 = CDataReader::GetRecord((CDataReader *)(ITableBase<RIDING,RidePetTable>::ms_pkTable + 4), v1);
    if ( *(_WORD *)v2 == kID )
      break;
    if ( ++v1 >= ITableBase<RIDING,RidePetTable>::GetTotal() )
      goto LABEL_4;
  }
  v4 = (NiVBSet *)ActionInfoTable::LoadData(v2 + 98);
  v5 = (ActionInfoSet *)v4;
  if ( v4 )
  {
    NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::SetAt(
      &ActionInfoTable::m_kRidePetMap,
      kID,
      v4);
    result = v5;
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}
// A8C278: using guessed type int ITableBase<RIDING,RidePetTable>::ms_pkTable;

//----- (00631F30) --------------------------------------------------------
ActionInfoSet *__cdecl ActionInfoTable::GetRidePetActionInfo(unsigned int kID)
{
  ActionInfoSet *result; // eax@1
  ActionInfoSet *pkSet; // [sp+4h] [bp-4h]@1

  pkSet = 0;
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
    &ActionInfoTable::m_kRidePetMap,
    kID,
    (NiVBSet **)&pkSet);
  result = pkSet;
  if ( !pkSet )
    result = ActionInfoTable::LoadRidePet(kID);
  return result;
}

//----- (00631F70) --------------------------------------------------------
ActionInfoSet *__cdecl ActionInfoTable::LoadMob(int kID)
{
  int v1; // esi@1
  ActionInfoSet *result; // eax@4
  MobViewInfo *v3; // eax@5
  NiVBSet *v4; // eax@6
  ActionInfoSet *v5; // esi@6

  v1 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 16))(
                          ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                          kID)
    && (unsigned __int16)kID <= *(_WORD *)(v1 + 200)
    && *(_DWORD *)(*(_DWORD *)(v1 + 196) + 4 * (unsigned __int16)kID)
    && (v3 = MobViewInfoTab::GetByID(kID)) != 0
    && (v4 = (NiVBSet *)ActionInfoTable::LoadData(v3->FileName), (v5 = (ActionInfoSet *)v4) != 0) )
  {
    NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::SetAt(
      &ActionInfoTable::m_kMobMap,
      (unsigned __int16)kID,
      v4);
    result = v5;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;

//----- (00631FF0) --------------------------------------------------------
ActionInfoSet *__cdecl ActionInfoTable::GetMobActionInfo(int kID)
{
  ActionInfoSet *result; // eax@1
  ActionInfoSet *pkSet; // [sp+4h] [bp-4h]@1

  pkSet = 0;
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
    &ActionInfoTable::m_kMobMap,
    (unsigned __int16)kID,
    (NiVBSet **)&pkSet);
  result = pkSet;
  if ( !pkSet )
    result = ActionInfoTable::LoadMob(kID);
  return result;
}

//----- (00632030) --------------------------------------------------------
NiVBSet *__cdecl ActionInfoTable::LoadMover(unsigned int kID)
{
  int v1; // eax@1
  unsigned int v2; // edi@2
  unsigned int v3; // esi@4
  char *v4; // eax@5
  NiVBSet *result; // eax@8
  MoverView *v6; // eax@9
  NiVBSet *v7; // esi@10

  v1 = *(_DWORD *)(ITableBase<MoverMain,MoverMainTab>::ms_pkTable + 56);
  if ( v1 )
    v2 = *(_DWORD *)(v1 + 40);
  else
    v2 = 0;
  v3 = 0;
  if ( !v2 )
    goto LABEL_8;
  while ( 1 )
  {
    v4 = CDataReader::GetRecord((CDataReader *)(ITableBase<MoverMain,MoverMainTab>::ms_pkTable + 4), v3);
    if ( v4 )
    {
      if ( *(_DWORD *)v4 == kID )
        break;
    }
    if ( ++v3 >= v2 )
      goto LABEL_8;
  }
  v6 = MoverViewTab::GetByMoverIdx(v4 + 4);
  if ( v6 )
  {
    v7 = (NiVBSet *)ActionInfoTable::LoadData(v6->FolderName);
    NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::SetAt(
      &ActionInfoTable::m_kMoverMap,
      kID,
      v7);
    result = v7;
  }
  else
  {
LABEL_8:
    result = 0;
  }
  return result;
}
// A89D24: using guessed type int ITableBase<MoverMain,MoverMainTab>::ms_pkTable;

//----- (006320B0) --------------------------------------------------------
NiVBSet *__cdecl ActionInfoTable::LoadPet(unsigned int kID)
{
  int v1; // eax@1
  unsigned int v2; // edi@2
  unsigned int v3; // esi@4
  char *v4; // eax@5
  NiVBSet *result; // eax@8
  PupView *v6; // eax@9
  NiVBSet *v7; // esi@10

  v1 = *(_DWORD *)(ITableBase<PupMain,PetMainTab>::ms_pkTable + 56);
  if ( v1 )
    v2 = *(_DWORD *)(v1 + 40);
  else
    v2 = 0;
  v3 = 0;
  if ( !v2 )
    goto LABEL_8;
  while ( 1 )
  {
    v4 = CDataReader::GetRecord((CDataReader *)(ITableBase<PupMain,PetMainTab>::ms_pkTable + 4), v3);
    if ( v4 )
    {
      if ( *(_DWORD *)v4 == kID )
        break;
    }
    if ( ++v3 >= v2 )
      goto LABEL_8;
  }
  v6 = PetViewTab::GetByPetIdx(v4 + 4);
  if ( v6 )
  {
    v7 = (NiVBSet *)ActionInfoTable::LoadData(v6->FileName);
    NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::SetAt(
      &ActionInfoTable::m_kPetMap,
      kID,
      v7);
    result = v7;
  }
  else
  {
LABEL_8:
    result = 0;
  }
  return result;
}
// A89D30: using guessed type int ITableBase<PupMain,PetMainTab>::ms_pkTable;

//----- (00632130) --------------------------------------------------------
ActionInfoSet *__cdecl ActionInfoTable::GetMoverActionInfo(unsigned int kID)
{
  ActionInfoSet *result; // eax@1
  ActionInfoSet *pkSet; // [sp+4h] [bp-4h]@1

  pkSet = 0;
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
    &ActionInfoTable::m_kMoverMap,
    kID,
    (NiVBSet **)&pkSet);
  result = pkSet;
  if ( !pkSet )
    result = (ActionInfoSet *)ActionInfoTable::LoadMover(kID);
  return result;
}

//----- (00632170) --------------------------------------------------------
ActionInfoSet *__cdecl ActionInfoTable::GetPetActionInfo(unsigned int kID)
{
  ActionInfoSet *result; // eax@1
  ActionInfoSet *pkSet; // [sp+4h] [bp-4h]@1

  pkSet = 0;
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
    &ActionInfoTable::m_kPetMap,
    kID,
    (NiVBSet **)&pkSet);
  result = pkSet;
  if ( !pkSet )
    result = (ActionInfoSet *)ActionInfoTable::LoadPet(kID);
  return result;
}

//----- (006321B0) --------------------------------------------------------
ActionInfoSet *__thiscall ActionInfoSet::`scalar deleting destructor'(ActionInfoSet *this, unsigned int a2)
{
  ActionInfoSet *v2; // esi@1
  ActionInfo *v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pkInfo;
  this->vfptr = (ActionInfoSetVtbl *)&ActionInfoSet::`vftable';
  operator delete[](v3);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B8968: using guessed type int (__thiscall *ActionInfoSet::`vftable')(void *p, char);

//----- (006321E0) --------------------------------------------------------
void __thiscall NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *>::~NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *>(NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *> *this)
{
  NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *> *v1; // esi@1

  v1 = this;
  this->vfptr = (NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *>Vtbl *)&NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v1->m_ppkHashTable);
}
// 9B8970: using guessed type int (__thiscall *NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *>::`vftable')(void *p, char);

//----- (00632200) --------------------------------------------------------
NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *> *__thiscall NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *>::`scalar deleting destructor'(NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *> *this, unsigned int a2)
{
  NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *>Vtbl *)&NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B8970: using guessed type int (__thiscall *NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *>::`vftable')(void *p, char);

//----- (00632240) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<unsigned long,ActionInfoSet *>::`scalar deleting destructor'(NiTMap<unsigned long,ActionInfoSet *> *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // esi@1

  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *>Vtbl *)&NiTMap<unsigned long,ActionInfoSet *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v2);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B8970: using guessed type int (__thiscall *NiTMapBase<DFALL<ActionInfoSet *>,unsigned long,ActionInfoSet *>::`vftable')(void *p, char);
// 9B8990: using guessed type int (__thiscall *NiTMap<unsigned long,ActionInfoSet *>::`vftable')(void *p, char);

//----- (006322C0) --------------------------------------------------------
void __thiscall ActorCallBack::~ActorCallBack(ActorCallBack *this)
{
  this->vfptr = (NiActorManager::CallbackObjectVtbl *)ActorCallBack::`vftable';
}
// 9B89C0: using guessed type void (__thiscall *ActorCallBack::`vftable'[2])(ActorCallBack *this, struct NiActorManager *, NiActorManager *pkManager, float eEventCode, float);

//----- (006322F0) --------------------------------------------------------
int __cdecl GenIdUnique(unsigned __int16 ID)
{
  return ((_BYTE)ID + HIBYTE(ID) + ((char)ID >> 4) + (SHIBYTE(ID) >> 4)) & 0xF;
}

//----- (00632340) --------------------------------------------------------
void __thiscall ActorCallBack::TextKeyEvent(ActorCallBack *this, NiActorManager *pkManager, unsigned int eSequenceID, const char *pcTextKey, NiTextKeyMatch *pkMatchObject, float fCurrentTime, float fEventTime)
{
  ActorCallBack *v7; // esi@1
  char v8; // al@3
  char v9; // al@4
  char v10; // cl@7
  char v11; // al@7

  v7 = this;
  if ( pcTextKey && *pcTextKey == 33 )
  {
    v8 = pcTextKey[1];
    if ( v8 < 97 )
      v9 = v8 - 48;
    else
      v9 = v8 - 87;
    if ( v9 == (((unsigned __int8)this->m_pkCurrActionInfo->ID
               + (this->m_pkCurrActionInfo->ID >> 8)
               + ((char)this->m_pkCurrActionInfo->ID >> 4)
               + ((char)(this->m_pkCurrActionInfo->ID >> 8) >> 4)) & 0xF) )
    {
      v10 = pcTextKey[2];
      v11 = pcTextKey[3] - 48;
      if ( v10 == 69 )
      {
        ((void (__thiscall *)(ActorCallBack *, _DWORD, ActionInfo *))v7->vfptr[1].EndOfSequence)(
          v7,
          v11,
          v7->m_pkCurrActionInfo);
      }
      else if ( v10 == 83 )
      {
        ((void (__thiscall *)(ActorCallBack *, _DWORD, ActionInfo *))v7->vfptr[2].AnimActivated)(
          v7,
          v11,
          v7->m_pkCurrActionInfo);
      }
    }
  }
}

//----- (006323D0) --------------------------------------------------------
void __thiscall ActorTextKeyMatch::ActorTextKeyMatch(ActorTextKeyMatch *this, const char *pcMatchKey)
{
  ActorTextKeyMatch *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v2->m_pcMatchKey = pcMatchKey;
  v2->m_pcLastKeyMatched = 0;
  v2->vfptr = (NiRefObjectVtbl *)&ActorTextKeyMatch::`vftable';
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9B89F4: using guessed type int (__thiscall *ActorTextKeyMatch::`vftable')(void *p, char);

//----- (00632410) --------------------------------------------------------
void __thiscall ActorTextKeyMatch::~ActorTextKeyMatch(ActorTextKeyMatch *this)
{
  this->m_pcLastKeyMatched = 0;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);

//----- (00632430) --------------------------------------------------------
char __thiscall ActorTextKeyMatch::IsKeyMatch(ActorTextKeyMatch *this, const char *pcTextKey)
{
  ActorTextKeyMatch *v2; // edi@1
  int v3; // eax@2
  int v4; // eax@3
  int v5; // eax@4
  char result; // al@5

  v2 = this;
  if ( pcTextKey
    && ((strstr((char *)pcTextKey, (char *)this->m_pcMatchKey), v3)
     || (strstr((char *)pcTextKey, "DE"), v4)
     || (strstr((char *)pcTextKey, "SS"), v5)) )
  {
    v2->m_pcLastKeyMatched = pcTextKey;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00632490) --------------------------------------------------------
void __thiscall ActorCallBack::ActorCallBack(ActorCallBack *this)
{
  this->vfptr = (NiActorManager::CallbackObjectVtbl *)ActorCallBack::`vftable';
}
// 9B89C0: using guessed type void (__thiscall *ActorCallBack::`vftable'[2])(ActorCallBack *this, struct NiActorManager *, NiActorManager *pkManager, float eEventCode, float);

//----- (006324A0) --------------------------------------------------------
void __cdecl CopyTextKey(NiTextKey *pkDest, NiTextKey *pkSrc)
{
  NiTextKey::SetText(pkDest, pkSrc->m_pText);
  pkDest->m_fTime = pkSrc->m_fTime;
}

//----- (006324D0) --------------------------------------------------------
void __cdecl AddTextKeys(NiControllerSequence *pkSeq, AddingTextKeys *pkAdding)
{
  NiTextKeyExtraData *v2; // eax@1
  unsigned int v3; // ecx@2
  NiTextKey *v4; // eax@2
  int v5; // esi@4
  int v6; // ebx@7
  int v7; // edi@7
  const char **v8; // esi@8
  unsigned int v9; // eax@12
  unsigned int v10; // ebx@14
  int v11; // esi@14
  int v12; // ecx@14
  void *v13; // eax@14
  NiTextKey *v14; // edi@15
  NiTextKey *v15; // esi@18
  NiTextKey **v16; // ebx@18
  float *v17; // edi@19
  int v18; // esi@21
  NiTextKey *v19; // edi@22
  int v20; // ebx@25
  NiTextKey *v21; // esi@26
  float *v22; // edi@26
  char *v23; // esi@30
  NiTextKeyExtraData *v24; // eax@31
  NiTextKey *apkShouldBeKeeps[128]; // [sp+10h] [bp-228h]@12
  NiTextKey *pkOldKeys; // [sp+210h] [bp-28h]@2
  NiTextKeyExtraData *pkExtra; // [sp+214h] [bp-24h]@1
  const char *v28; // [sp+218h] [bp-20h]@8
  unsigned int uiNewKeyCount; // [sp+21Ch] [bp-1Ch]@2
  unsigned int uiShouldBeKeepsCount; // [sp+220h] [bp-18h]@2
  unsigned int ui; // [sp+224h] [bp-14h]@2
  NiTextKey *v32; // [sp+228h] [bp-10h]@3
  int v33; // [sp+234h] [bp-4h]@14
  NiTextKey *iNewKeyLast; // [sp+240h] [bp+8h]@3
  int iNewKeyLasta; // [sp+240h] [bp+8h]@17

  v2 = pkSeq->m_spTextKeys.m_pObject;
  pkExtra = v2;
  if ( v2 )
  {
    v3 = v2->m_uiNumKeys;
    v4 = v2->m_pKeys;
    uiShouldBeKeepsCount = 0;
    uiNewKeyCount = v3;
    pkOldKeys = v4;
    ui = 0;
    if ( v3 > 0 )
    {
      v32 = (NiTextKey *)pkAdding->iEffTextKeyCount;
      iNewKeyLast = v4;
      do
      {
        v5 = 0;
        if ( (signed int)v32 <= 0 )
        {
LABEL_7:
          v6 = pkAdding->iSndTextKeyCount;
          v7 = 0;
          if ( v6 <= 0 )
          {
LABEL_11:
            if ( uiShouldBeKeepsCount >= 0x80 )
              break;
            v9 = uiShouldBeKeepsCount;
            apkShouldBeKeeps[uiShouldBeKeepsCount] = iNewKeyLast;
            uiShouldBeKeepsCount = v9 + 1;
          }
          else
          {
            v28 = iNewKeyLast->m_pText;
            v8 = (const char **)pkAdding->apcSndTextKey;
            while ( strcmp(v28, *v8) )
            {
              ++v7;
              ++v8;
              if ( v7 >= v6 )
                goto LABEL_11;
            }
          }
        }
        else
        {
          while ( strcmp(iNewKeyLast->m_pText, pkAdding->apcEffTextKey[v5]) )
          {
            if ( ++v5 >= (signed int)v32 )
              goto LABEL_7;
          }
        }
        ++iNewKeyLast;
        ++ui;
      }
      while ( ui < uiNewKeyCount );
    }
    v10 = uiShouldBeKeepsCount;
    v11 = uiShouldBeKeepsCount + pkAdding->iEffTextKeyCount + pkAdding->iSndTextKeyCount + 1;
    v12 = (unsigned __int64)(unsigned int)v11 >> 29 != 0;
    uiNewKeyCount = uiShouldBeKeepsCount + pkAdding->iEffTextKeyCount + pkAdding->iSndTextKeyCount + 1;
    v13 = operator new[](((8 * v11 | -v12) + 4) | -__CFADD__(8 * v11 | -v12, 4));
    v33 = 0;
    if ( v13 )
    {
      v14 = (NiTextKey *)((char *)v13 + 4);
      *(_DWORD *)v13 = v11;
      `eh vector constructor iterator'(
        (char *)v13 + 4,
        8u,
        v11,
        (void (__thiscall *)(void *))NiTextKey::NiTextKey,
        (void (__thiscall *)(void *))NiTextKey::~NiTextKey);
      v32 = v14;
    }
    else
    {
      v32 = 0;
      v14 = 0;
    }
    v33 = -1;
    NiTextKey::SetText(v14, pText);
    v14->m_fTime = 1.0;
    iNewKeyLasta = 1;
    if ( v10 )
    {
      ui = uiShouldBeKeepsCount;
      v15 = v14 + 1;
      v16 = apkShouldBeKeeps;
      iNewKeyLasta = uiShouldBeKeepsCount + 1;
      do
      {
        v17 = (float *)*v16;
        NiTextKey::SetText(v15, (*v16)->m_pText);
        v15->m_fTime = *v17;
        ++v16;
        ++v15;
        --ui;
      }
      while ( ui );
      v14 = v32;
    }
    v18 = 0;
    if ( pkAdding->iEffTextKeyCount > 0 )
    {
      v19 = &v14[iNewKeyLasta];
      do
      {
        NiTextKey::SetText(v19, pkAdding->apcEffTextKey[v18]);
        ++iNewKeyLasta;
        v19->m_fTime = pkAdding->afEffTextKeyNote[v18++];
        ++v19;
      }
      while ( v18 < pkAdding->iEffTextKeyCount );
      v14 = v32;
    }
    v20 = 0;
    if ( pkAdding->iSndTextKeyCount > 0 )
    {
      v21 = &v14[iNewKeyLasta];
      v22 = pkAdding->afSndTextKeyNote;
      do
      {
        NiTextKey::SetText(v21, *((char **)v22 - 2));
        v21->m_fTime = *v22;
        ++v20;
        ++v21;
        ++v22;
      }
      while ( v20 < pkAdding->iSndTextKeyCount );
      v14 = v32;
    }
    if ( pkOldKeys )
    {
      v23 = (char *)&pkOldKeys[-1].m_pText;
      `eh vector destructor iterator'(
        pkOldKeys,
        8u,
        (int)pkOldKeys[-1].m_pText,
        (void (__thiscall *)(void *))NiTextKey::~NiTextKey);
      operator delete(v23);
    }
    v24 = pkExtra;
    pkExtra->m_uiNumKeys = uiNewKeyCount;
    v24->m_pKeys = v14;
  }
}

//----- (00632770) --------------------------------------------------------
void __thiscall NiTextKey::NiTextKey(NiTextKey *this)
{
  this->m_pText = 0;
}

//----- (00632780) --------------------------------------------------------
ActorCallBack *__thiscall ActorCallBack::`scalar deleting destructor'(ActorCallBack *this, unsigned int a2)
{
  ActorCallBack *v2; // esi@1

  v2 = this;
  this->vfptr = (NiActorManager::CallbackObjectVtbl *)ActorCallBack::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9B89C0: using guessed type void (__thiscall *ActorCallBack::`vftable'[2])(ActorCallBack *this, struct NiActorManager *, NiActorManager *pkManager, float eEventCode, float);

//----- (006327B0) --------------------------------------------------------
char __thiscall NiTextKeyMatch::IsKeyMatch(NiTextKeyMatch *this, const char *pcTextKey)
{
  const char *v2; // edx@2
  char result; // al@4

  if ( pcTextKey && (v2 = this->m_pcMatchKey) != 0 && !strcmp(pcTextKey, v2) )
  {
    this->m_pcLastKeyMatched = pcTextKey;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00632800) --------------------------------------------------------
NiPoint3 *__thiscall Char::GetChestPos(Char *this, NiPoint3 *result)
{
  NiNode *v2; // edx@1
  NiPoint3 *v3; // eax@2
  float v4; // ecx@2
  float v5; // edx@2
  int v6; // ecx@3
  float v7; // edx@3
  float v8; // ecx@3

  v2 = this->m_kCharShape.m_apkLinkNode[5];
  if ( v2 )
  {
    v3 = result;
    result->x = v2->m_kWorld.m_Translate.x;
    v4 = v2->m_kWorld.m_Translate.y;
    v5 = v2->m_kWorld.m_Translate.z;
    result->y = v4;
    result->z = v5;
  }
  else
  {
    v6 = ((int (*)(void))this->vfptr[6].Deaffect)();
    v3 = result;
    result->x = *(float *)v6;
    v7 = *(float *)(v6 + 4);
    v8 = *(float *)(v6 + 8);
    result->y = v7;
    result->z = v8;
    result->z = result->z + 30.0;
  }
  return v3;
}

//----- (00632860) --------------------------------------------------------
NiPoint3 *__thiscall Char::GetRightHandPos(Char *this, NiPoint3 *result)
{
  NiNode *v2; // edx@1
  NiPoint3 *v3; // eax@2
  float v4; // ecx@2
  float v5; // edx@2
  int v6; // ecx@3
  float v7; // edx@3
  float v8; // ecx@3

  v2 = this->m_kCharShape.m_apkLinkNode[12];
  if ( v2 )
  {
    v3 = result;
    result->x = v2->m_kWorld.m_Translate.x;
    v4 = v2->m_kWorld.m_Translate.y;
    v5 = v2->m_kWorld.m_Translate.z;
    result->y = v4;
    result->z = v5;
  }
  else
  {
    v6 = ((int (*)(void))this->vfptr[6].Deaffect)();
    v3 = result;
    result->x = *(float *)v6;
    v7 = *(float *)(v6 + 4);
    v8 = *(float *)(v6 + 8);
    result->y = v7;
    result->z = v8;
    result->z = result->z + 25.0;
  }
  return v3;
}

//----- (006328C0) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<AttackSequence *>,AttackSequence *>::~NiTListBase<DFALL<AttackSequence *>,AttackSequence *>(NiTListBase<DFALL<AttackSequence *>,AttackSequence *> *this)
{
  this->vfptr = (NiTListBase<DFALL<AttackSequence *>,AttackSequence *>Vtbl *)&NiTListBase<DFALL<AttackSequence *>,AttackSequence *>::`vftable';
}
// 9B8A78: using guessed type int (__thiscall *NiTListBase<DFALL<AttackSequence *>,AttackSequence *>::`vftable')(void *p, char);

//----- (006328D0) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<SkillSequence *>,SkillSequence *>::~NiTListBase<DFALL<SkillSequence *>,SkillSequence *>(NiTListBase<DFALL<SkillSequence *>,SkillSequence *> *this)
{
  this->vfptr = (NiTListBase<DFALL<SkillSequence *>,SkillSequence *>Vtbl *)&NiTListBase<DFALL<SkillSequence *>,SkillSequence *>::`vftable';
}
// 9B8A88: using guessed type int (__thiscall *NiTListBase<DFALL<SkillSequence *>,SkillSequence *>::`vftable')(void *p, char);

//----- (006328E0) --------------------------------------------------------
NiTListBase<DFALL<AttackSequence *>,AttackSequence *> *__thiscall NiTListBase<DFALL<AttackSequence *>,AttackSequence *>::`scalar deleting destructor'(NiTListBase<DFALL<AttackSequence *>,AttackSequence *> *this, unsigned int a2)
{
  NiTListBase<DFALL<AttackSequence *>,AttackSequence *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<AttackSequence *>,AttackSequence *>Vtbl *)&NiTListBase<DFALL<AttackSequence *>,AttackSequence *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9B8A78: using guessed type int (__thiscall *NiTListBase<DFALL<AttackSequence *>,AttackSequence *>::`vftable')(void *p, char);

//----- (00632910) --------------------------------------------------------
NiTListBase<DFALL<SkillSequence *>,SkillSequence *> *__thiscall NiTListBase<DFALL<SkillSequence *>,SkillSequence *>::`vector deleting destructor'(NiTListBase<DFALL<SkillSequence *>,SkillSequence *> *this, unsigned int a2)
{
  NiTListBase<DFALL<SkillSequence *>,SkillSequence *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<SkillSequence *>,SkillSequence *>Vtbl *)&NiTListBase<DFALL<SkillSequence *>,SkillSequence *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9B8A88: using guessed type int (__thiscall *NiTListBase<DFALL<SkillSequence *>,SkillSequence *>::`vftable')(void *p, char);

//----- (00632940) --------------------------------------------------------
bool __stdcall AttackSequenceManager::IsSeqFinished(NiControllerSequence *pkSequence)
{
  bool result; // al@2

  if ( pkSequence )
  {
    if ( pkSequence->m_eState == 1 )
      result = pkSequence->m_fEndKeyTime <= (double)pkSequence->m_fLastTime;
    else
      result = 0;
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (00632980) --------------------------------------------------------
void __thiscall AttackSequenceManager::StopAttack(AttackSequenceManager *this)
{
  AttackSequence *v1; // eax@2

  if ( this->m_kAttSeqList.m_kAllocator.m_uiCount )
  {
    v1 = this->m_kAttSeqList.m_pkTail->m_element;
    if ( v1 )
      v1->bLastSequence = 1;
  }
  this->m_bInDuringAttackInServer = 0;
}

//----- (006329A0) --------------------------------------------------------
unsigned int __thiscall AttackSequenceManager::GetAttSeqCount(AttackSequenceManager *this)
{
  return this->m_kAttSeqList.m_kAllocator.m_uiCount;
}

//----- (006329B0) --------------------------------------------------------
bool __thiscall AttackSequenceManager::IsDuringAttackInServer(AttackSequenceManager *this)
{
  return (signed int)this->m_kAttSeqList.m_kAllocator.m_uiCount > 0;
}

//----- (006329C0) --------------------------------------------------------
BOOL __thiscall AttackSequenceManager::IsSkillSequenceEmpty(AttackSequenceManager *this)
{
  return this->m_kSkillSeqList.m_kAllocator.m_uiCount == 0;
}

//----- (006329D0) --------------------------------------------------------
DamageInfoSet *__thiscall AttackSequenceManager::GetSkillDmgInfoSetbyIndex(AttackSequenceManager *this, unsigned __int16 Index)
{
  NiTListItem<SkillSequence *> *v2; // eax@2
  SkillSequence *v3; // ecx@3
  DamageInfoSet *result; // eax@5

  if ( this->m_kSkillSeqList.m_kAllocator.m_uiCount && (v2 = this->m_kSkillSeqList.m_pkHead) != 0 )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      v2 = v2->m_pkNext;
      if ( v3->m_Index == Index )
        break;
      if ( !v2 )
        goto LABEL_5;
    }
    result = &v3->kDamageInfoSet;
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (00632A10) --------------------------------------------------------
DamageInfo *__thiscall DamageInfoSet::GetLastInvalidDmgInfo(DamageInfoSet *this)
{
  NiTListItem<DamageInfo *> *v1; // ecx@1
  DamageInfo *result; // eax@2

  v1 = this->kDamageList.m_pkTail;
  if ( v1 )
  {
    while ( 1 )
    {
      result = v1->m_element;
      v1 = v1->m_pkPrev;
      if ( result )
      {
        if ( result->SeqNum == -1 )
          break;
      }
      if ( !v1 )
        goto LABEL_5;
    }
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (00632A40) --------------------------------------------------------
DamageInfoSet *__thiscall AttackSequenceManager::GetAttDmgInfoSetbySeqNum(AttackSequenceManager *this, __int16 SeqNum)
{
  NiTListItem<AttackSequence *> *v2; // eax@2
  AttackSequence *v3; // ecx@3
  DamageInfoSet *result; // eax@5

  if ( this->m_kAttSeqList.m_kAllocator.m_uiCount && (v2 = this->m_kAttSeqList.m_pkHead) != 0 )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      v2 = v2->m_pkNext;
      if ( v3->m_SeqNum == SeqNum )
        break;
      if ( !v2 )
        goto LABEL_5;
    }
    result = &v3->kDamageInfoSet;
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (00632A80) --------------------------------------------------------
AttackSequence *__thiscall AttackSequenceManager::GetAttSeqbySeqNum(AttackSequenceManager *this, __int16 SeqNum)
{
  NiTListItem<AttackSequence *> *v2; // ecx@2
  AttackSequence *result; // eax@3

  if ( this->m_kAttSeqList.m_kAllocator.m_uiCount && (v2 = this->m_kAttSeqList.m_pkHead) != 0 )
  {
    while ( 1 )
    {
      result = v2->m_element;
      v2 = v2->m_pkNext;
      if ( result->m_SeqNum == SeqNum )
        break;
      if ( !v2 )
        goto LABEL_5;
    }
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (00632AB0) --------------------------------------------------------
AttackSequence *__thiscall AttackSequenceManager::GetInvalidSeq(AttackSequenceManager *this)
{
  NiTListItem<AttackSequence *> *v1; // ecx@2
  AttackSequence *result; // eax@3

  if ( this->m_kAttSeqList.m_kAllocator.m_uiCount && (v1 = this->m_kAttSeqList.m_pkHead) != 0 )
  {
    while ( 1 )
    {
      result = v1->m_element;
      v1 = v1->m_pkNext;
      if ( result->m_SeqNum == -1 )
        break;
      if ( !v1 )
        goto LABEL_5;
    }
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (00632AE0) --------------------------------------------------------
SkillSequence *__thiscall AttackSequenceManager::FindSkillSequence(AttackSequenceManager *this, unsigned __int16 Index, unsigned __int16 kID)
{
  NiTListItem<SkillSequence *> *v3; // ecx@1
  SkillSequence *result; // eax@2

  v3 = this->m_kSkillSeqList.m_pkHead;
  if ( v3 )
  {
    while ( 1 )
    {
      result = v3->m_element;
      v3 = v3->m_pkNext;
      if ( result->m_Index == Index && result->kSkillID == kID )
        break;
      if ( !v3 )
        goto LABEL_5;
    }
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (00632B10) --------------------------------------------------------
void __thiscall DamageInfoSet::AddDamage(DamageInfoSet *this, unsigned int uiDamage, unsigned __int16 kTarget, unsigned int dwHpChangeSeqNo, unsigned int kTargetRestHP, bool bViewDamage, bool bRange, __int16 DmgSeqNum)
{
  DamageInfoSet *v8; // esi@1
  DamageInfo *v9; // eax@2
  unsigned __int16 v10; // di@4
  unsigned int v11; // esi@5
  unsigned int v12; // ebx@5
  DamageInfo *v13; // edi@6
  int v14; // eax@11
  _DWORD *v15; // ecx@11
  Char *v16; // eax@15
  Char *v17; // edi@18
  CClientGuild *v18; // eax@19
  CClientGuild *v19; // eax@23

  v8 = this;
  if ( this->kDamageList.m_kAllocator.m_uiCount && (v9 = this->kDamageList.m_pkTail->m_element) != 0 )
  {
    if ( DmgSeqNum == -1 )
    {
      v10 = kTarget;
      if ( v9->kTargetHandle == kTarget )
      {
        v11 = kTargetRestHP;
        v12 = dwHpChangeSeqNo;
        v9->uiDamage = uiDamage;
        v9->kTargetHandle = kTarget;
        v9->kTargetRestHP = kTargetRestHP;
        v9->dwHpChangeSeqNo = dwHpChangeSeqNo;
        v9->bViewDamage = bViewDamage;
        goto LABEL_15;
      }
    }
    v13 = (DamageInfo *)operator new(0x18u);
    v13->uiDamage = uiDamage;
    v13->kTargetHandle = kTarget;
    v13->kTargetRestHP = kTargetRestHP;
    v13->bViewDamage = bViewDamage;
    v13->DmgNum = DmgSeqNum;
  }
  else
  {
    if ( bRange != 1 || (v13 = DamageInfoSet::GetLastInvalidDmgInfo(this)) == 0 )
      v13 = (DamageInfo *)operator new(0x18u);
    v13->uiDamage = uiDamage;
    v13->kTargetHandle = kTarget;
    v13->kTargetRestHP = kTargetRestHP;
    v13->bViewDamage = bViewDamage;
    v13->DmgNum = DmgSeqNum;
  }
  v12 = dwHpChangeSeqNo;
  v13->dwHpChangeSeqNo = dwHpChangeSeqNo;
  v14 = (int)v8->kDamageList.vfptr->NewItem((NiTListBase<DFALL<DamageInfo *>,DamageInfo *> *)v8);
  *(_DWORD *)(v14 + 8) = v13;
  *(_DWORD *)v14 = 0;
  *(_DWORD *)(v14 + 4) = v8->kDamageList.m_pkTail;
  v15 = &v8->kDamageList.m_pkTail->m_pkNext;
  if ( v15 )
    *v15 = v14;
  else
    v8->kDamageList.m_pkHead = (NiTListItem<DamageInfo *> *)v14;
  ++v8->kDamageList.m_kAllocator.m_uiCount;
  v10 = kTarget;
  v8->kDamageList.m_pkTail = (NiTListItem<DamageInfo *> *)v14;
  v11 = kTargetRestHP;
LABEL_15:
  v16 = CharMgr::GetChar(&g_kCharMgr, v10);
  if ( v16 && v16->m_kHandle == LOWORD(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[7].dwEffectIndex[1]) )
    Char::TOTHpUpdate(v16, v12, v11);
  v17 = CharMgr::GetChar(&g_kCharMgr, v10);
  if ( v17 )
  {
    v18 = GuildTask::GetGuild();
    if ( CClientGuild::IsWarEngaging(v18) && v12 != -65536 && v12 != -131072 )
      Char::HpUpdate(v17, v12, v11);
    v19 = GuildTask::GetGuild();
    if ( CClientGuild::IsGttEngaging(v19) && v12 != -65536 && v12 != -131072 )
      Char::HpUpdate(v17, v12, v11);
    if ( !(uiDamage & 0x20000000) )
      Char::HpUpdate(v17, v12, v11);
  }
}

//----- (00632CB0) --------------------------------------------------------
void __thiscall AttackSequenceManager::AddSkillSeq(AttackSequenceManager *this, SkillSequence *pkSeq)
{
  char *v2; // esi@2
  NiTListItem<SkillSequence *> *v3; // eax@2
  NiTListItem<SkillSequence *> **v4; // ecx@2

  if ( pkSeq )
  {
    v2 = (char *)&this->m_kSkillSeqList;
    this->m_bInDuringAttackInServer = 1;
    v3 = this->m_kSkillSeqList.vfptr->NewItem((NiTListBase<DFALL<SkillSequence *>,SkillSequence *> *)&this->m_kSkillSeqList);
    v3->m_element = pkSeq;
    v3->m_pkNext = 0;
    v3->m_pkPrev = (NiTListItem<SkillSequence *> *)*((_DWORD *)v2 + 2);
    v4 = (NiTListItem<SkillSequence *> **)*((_DWORD *)v2 + 2);
    if ( v4 )
    {
      *v4 = v3;
      ++*((_DWORD *)v2 + 3);
      *((_DWORD *)v2 + 2) = v3;
    }
    else
    {
      ++*((_DWORD *)v2 + 3);
      *((_DWORD *)v2 + 1) = v3;
      *((_DWORD *)v2 + 2) = v3;
    }
  }
}

//----- (00632D00) --------------------------------------------------------
void __thiscall DamageInfo::Applicate(DamageInfo *this, Char *pkAttacker)
{
  DamageInfo *v2; // edi@1
  Char *v3; // eax@2
  Char *v4; // esi@2
  int v5; // ebx@3
  AbStateInfecteeVtbl *v6; // ebx@4
  int v7; // eax@4
  char v8; // al@8
  unsigned int v9; // eax@12
  unsigned int v10; // eax@15
  unsigned int v11; // ST04_4@18
  signed int v12; // eax@18
  char *v13; // ebx@18
  EffectViewInfo *v14; // eax@25
  signed int v15; // edi@27
  NiPoint3 kPos; // [sp+4h] [bp-Ch]@19

  v2 = this;
  if ( pkAttacker )
  {
    v3 = CharMgr::GetChar(&g_kCharMgr, this->kTargetHandle);
    v4 = v3;
    if ( v3 )
    {
      ((void (__thiscall *)(Char *))v3->vfptr[3].Affect)(v3);
      v4->vfptr[2].~AbStateInfectee((AbStateInfectee *)v4);
      v5 = ((int (__thiscall *)(Char *))v4->vfptr[3].Deaffect)(v4);
      if ( ((int (__thiscall *)(Char *))v4->vfptr[2].~AbStateInfectee)(v4) == v5 )
      {
        v6 = v4->vfptr;
        v7 = ((int (__thiscall *)(Char *))v4->vfptr[2].~AbStateInfectee)(v4);
        ((void (__thiscall *)(Char *, int))v6[4].Deaffect)(v4, v7);
      }
      if ( !(v2->uiDamage & 0x34000000) && !Char::CheckActState(v4, 500000) )
        ((void (__thiscall *)(Char *, unsigned int, _DWORD))v4->vfptr[12].GetAbstateColor)(v4, v2->uiDamage, 0);
      v8 = (v2->uiDamage >> 31) & 1;
      if ( !v8 )
        v8 = Char::CheckActState(v4, 500000) == 0;
      if ( v2->bViewDamage )
      {
        if ( v8 )
        {
          v9 = v2->uiDamage;
          if ( !(v9 & 0x4000000) || v9 & 0x21000000 )
            TextEffMgr::AddDamage(&g_kTextEffMgr, v2->kTargetHandle, v9 & 0x77D0FFFF);
        }
      }
      v10 = v2->uiDamage;
      if ( v2->uiDamage & 0x10000000 || (unsigned int)&loc_800000 & v10 )
      {
        if ( v2->uiDamage & 0x10000000 )
          TextEffMgr::AddDamage(&g_kTextEffMgr, v2->kTargetHandle, v10 & 0x1000FFFF);
      }
      else if ( !(v10 & 0x24000000) )
      {
        v11 = ((int (__thiscall *)(Char *))v4->vfptr[16].~AbStateInfectee)(v4);
        v12 = Char::GetWeaponType(pkAttacker);
        v13 = DmgSndTab::Get(v12, v11);
        if ( v13 )
        {
          Char::GetChestPos(v4, &kPos);
          SoundMgr::CreateSound(&g_kSoundMgr, v13, &kPos);
        }
      }
      if ( v2->uiDamage & 0x40000000 && pkAttacker == g_pkMainChar && MachineOpt::ms_kGraphicOption.bScreenShakeEnable )
      {
        v14 = ShakeEffectViewInfoTab::GetByID(1u);
        World::ImpactCamera(&g_kWorld, v14);
      }
      if ( v4->m_byMode != 3 )
      {
        v15 = v2->uiDamage;
        if ( v15 < 0 && !(v15 & 0x4000000) )
          ((void (__thiscall *)(Char *))v4->vfptr[20].Affect)(v4);
      }
    }
  }
}

//----- (00632EC0) --------------------------------------------------------
void __thiscall AttackSequenceManager::AttackSequenceManager(AttackSequenceManager *this)
{
  this->vfptr = (AttackSequenceManagerVtbl *)AttackSequenceManager::`vftable';
  this->m_kAttSeqList.m_kAllocator.m_uiCount = 0;
  this->m_kAttSeqList.m_pkHead = 0;
  this->m_kAttSeqList.m_pkTail = 0;
  this->m_kAttSeqList.vfptr = (NiTListBase<DFALL<AttackSequence *>,AttackSequence *>Vtbl *)&NiTList<AttackSequence *>::`vftable';
  this->m_kSkillSeqList.m_kAllocator.m_uiCount = 0;
  this->m_kSkillSeqList.m_pkHead = 0;
  this->m_kSkillSeqList.m_pkTail = 0;
  this->m_kSkillSeqList.vfptr = (NiTListBase<DFALL<SkillSequence *>,SkillSequence *>Vtbl *)&NiTList<SkillSequence *>::`vftable';
  this->m_fLastSequenceEndTime = 100.0;
  this->m_fCurrFrequency = 1.0;
  this->m_bHardStopAttSeq = 0;
  this->m_fTargetFrequency = 1.0;
  this->m_bInDuringAttackInServer = 0;
  this->m_kLastTargetHandle = -1;
  this->m_iCurrAttSeqCode = 0;
  this->m_iLastAttSeqCode = 0;
  *(_WORD *)&this->m_bSequenceStarted = 0;
}
// 9B8AC8: using guessed type int (__thiscall *NiTList<AttackSequence *>::`vftable')(void *p, char);
// 9B8AD8: using guessed type int (__thiscall *NiTList<SkillSequence *>::`vftable')(void *p, char);
// 9B8AE8: using guessed type int (*AttackSequenceManager::`vftable'[6])();

//----- (00632F20) --------------------------------------------------------
char __thiscall DamageInfoSet::Applicate(DamageInfoSet *this, Char *pkAttacker, bool bAllApplicate)
{
  NiTListItem<DamageInfo *> *v3; // edi@1
  DamageInfo *v4; // esi@3
  NiTListItem<NiD3DShaderInterface *> **v5; // eax@3
  DamageInfo **v6; // ecx@4
  NiTListItem<NiD3DShaderInterface *> **v7; // edx@4
  char result; // al@10
  DamageInfo *v9; // esi@12
  NiTListItem<NiD3DShaderInterface *> **v10; // eax@14
  DamageInfo **v11; // ecx@15
  NiTListItem<NiD3DShaderInterface *> **v12; // edx@15
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *v13; // [sp+Ch] [bp-4h]@1

  v3 = this->kDamageList.m_pkHead;
  v13 = (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)this;
  if ( bAllApplicate == 1 )
  {
    while ( v3 )
    {
      v4 = v3->m_element;
      v3 = v3->m_pkNext;
      DamageInfo::Applicate(v4, pkAttacker);
      operator delete(v4);
      v5 = &v13->m_pkHead->m_pkNext;
      if ( v5 )
      {
        while ( 1 )
        {
          v6 = (DamageInfo **)(v5 + 2);
          v7 = v5;
          v5 = (NiTListItem<NiD3DShaderInterface *> **)*v5;
          if ( v4 == *v6 )
            break;
          if ( !v5 )
            goto LABEL_6;
        }
      }
      else
      {
LABEL_6:
        v7 = 0;
      }
      *(_DWORD *)&bAllApplicate = v7;
      if ( v7 )
        NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(v13, (void **)&bAllApplicate);
    }
    result = 1;
  }
  else if ( v3 )
  {
    while ( 1 )
    {
      v9 = v3->m_element;
      v3 = v3->m_pkNext;
      *(_DWORD *)&bAllApplicate = v9;
      DamageInfo::Applicate(v9, pkAttacker);
      if ( v9->bViewDamage || v9->dwHpChangeSeqNo != -131072 )
        break;
      operator delete(v9);
      v10 = &v13->m_pkHead->m_pkNext;
      if ( v10 )
      {
        while ( 1 )
        {
          v11 = (DamageInfo **)(v10 + 2);
          v12 = v10;
          v10 = (NiTListItem<NiD3DShaderInterface *> **)*v10;
          if ( v9 == *v11 )
            break;
          if ( !v10 )
            goto LABEL_17;
        }
      }
      else
      {
LABEL_17:
        v12 = 0;
      }
      *(_DWORD *)&bAllApplicate = v12;
      if ( v12 )
        NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(v13, (void **)&bAllApplicate);
      if ( !v3 )
        goto LABEL_21;
    }
    operator delete(v9);
    NiTPointerListBase<DFALL<AttackSequence *>,AttackSequence *>::Remove(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *> *)v13,
      (NiLight *const *)&bAllApplicate);
    result = 1;
  }
  else
  {
LABEL_21:
    result = 0;
  }
  return result;
}

//----- (00633030) --------------------------------------------------------
void __thiscall SkillSequence::ApplicateImmediatelyDamageOnly(SkillSequence *this, Char *pkCaster, bool bAllApplicate)
{
  DamageInfoSet *v3; // esi@3

  if ( pkCaster )
  {
    if ( this->kDamageInfoSet.kDamageList.m_kAllocator.m_uiCount )
    {
      v3 = &this->kDamageInfoSet;
      DamageInfoSet::Applicate(&this->kDamageInfoSet, pkCaster, 0);
      DamageInfoSet::Clear(v3);
    }
  }
}

//----- (00633060) --------------------------------------------------------
char __userpurge SkillSequence::ApplicateImmediately@<al>(SkillSequence *this@<ecx>, int a2@<edi>, int a3@<esi>, Char *pkCaster, bool bAllApplicate)
{
  SkillSequence *v5; // ebx@1
  int v7; // ST24_4@4
  int v8; // ST20_4@4
  Char *v9; // eax@4
  int v10; // esi@4
  int v11; // edi@4
  int v12; // edx@4
  int *v13; // eax@6
  int v14; // esi@7
  float fSpeed; // ST18_4@10
  NiPoint3 kPos; // [sp+24h] [bp-10h]@11
  Char *pkTarget; // [sp+30h] [bp-4h]@4

  v5 = this;
  if ( !pkCaster || !this->kDamageInfoSet.kDamageList.m_kAllocator.m_uiCount )
    return 0;
  v7 = a3;
  v8 = a2;
  v9 = CharMgr::GetChar(&g_kCharMgr, this->kDamageInfoSet.kDamageList.m_pkHead->m_element->kTargetHandle);
  v10 = ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable;
  v11 = v5->kSkillID;
  v12 = *(_DWORD *)ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable;
  pkTarget = v9;
  if ( !(unsigned __int8)(*(int (__thiscall **)(int, int, int, int))(v12 + 16))(
                           ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable,
                           v11,
                           v8,
                           v7) )
    return 0;
  if ( (unsigned __int16)v11 > *(_WORD *)(v10 + 200) )
    return 0;
  v13 = (int *)(*(_DWORD *)(v10 + 196) + 4 * v11);
  if ( !*v13 )
    return 0;
  v14 = *v13;
  if ( !*v13 )
    return 0;
  if ( *(_DWORD *)(v14 + 91) == 1 )
  {
    if ( strcmp((const char *)(v14 + 195), (const char *)&unk_9B8A00) )
    {
      fSpeed = (double)*(unsigned int *)(v14 + 191);
      EffectMgr::CreateShootEff(
        &g_kEffectMgr,
        (char *)(v14 + 195),
        (char *)(v14 + 291),
        (char *)(v14 + 327),
        pkCaster,
        pkTarget,
        Timer::ms_fCurTime,
        fSpeed,
        &v5->kDamageInfoSet,
        *(LastEffPos *)(v14 + 323),
        1);
    }
    Char::GetRightHandPos(pkCaster, &kPos);
    SoundMgr::CreateSound(&g_kSoundMgr, (char *)(v14 + 227), &kPos);
    return 0;
  }
  return DamageInfoSet::Applicate(&v5->kDamageInfoSet, pkCaster, bAllApplicate);
}
// 633060: could not find valid save-restore pair for edi
// 633060: could not find valid save-restore pair for esi
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8CAA0: using guessed type int ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable;

//----- (006331C0) --------------------------------------------------------
bool __thiscall AttackSequenceManager::AddAttMultiDmg(AttackSequenceManager *this, __int16 SeqNum, __int16 DmgNum, unsigned int uiDamage, unsigned __int16 kTarget, unsigned int dwHpChangeSeqNo, unsigned int kTargetRestHP, bool bViewDamage)
{
  AttackSequenceManager *v8; // esi@1
  unsigned int v9; // edx@1
  bool v10; // zf@1
  NiTListItem<AttackSequence *> *v11; // eax@2
  AttackSequence *v12; // ecx@3
  __int16 v13; // bx@6
  NiTListItem<AttackSequence *> *v14; // eax@7
  AttackSequence *v15; // edi@8
  Char *v16; // eax@11
  int v17; // eax@12
  ArrowEff *v18; // eax@12
  ArrowEff *v19; // edi@12
  int v20; // eax@13
  bool result; // al@14
  Char *v22; // eax@16
  int v23; // eax@17
  DamageInfoSet *v24; // eax@19
  Char *v25; // eax@20
  int v26; // eax@21
  ArrowEff *v27; // eax@21
  ArrowEff *v28; // esi@21
  DamageInfo *v29; // eax@22
  _DWORD *v30; // eax@26
  Char *v31; // eax@29
  DamageInfoSet pkDmgDummyInfoSet; // [sp+10h] [bp-1Ch]@29
  int v33; // [sp+28h] [bp-4h]@29
  DamageInfoSet *pkInfoSet; // [sp+34h] [bp+8h]@19
  DamageInfoSet *pkInfoSeta; // [sp+34h] [bp+8h]@24

  v8 = this;
  v9 = this->m_kAttSeqList.m_kAllocator.m_uiCount;
  v10 = v9 == 0;
  if ( !v9 )
  {
LABEL_6:
    v13 = SeqNum;
    if ( v10 || (v14 = v8->m_kAttSeqList.m_pkHead) == 0 )
    {
LABEL_10:
      if ( v8->vfptr->GetChar(v8) )
      {
        v16 = v8->vfptr->GetChar(v8);
        if ( Char::IsRangeAttChar(v16) )
        {
          v17 = (int)v8->vfptr->GetChar(v8);
          v18 = EffectMgr::GetArrowEffectInList(&g_kEffectMgr, SeqNum, *(_WORD *)(v17 + 552));
          v19 = v18;
          if ( v18 )
          {
            v20 = ((int (__thiscall *)(ArrowEff *))v18->vfptr[35].__vecDelDtor)(v18);
            if ( v20 )
            {
              *(_DWORD *)(v20 + 4) = uiDamage;
              *(_WORD *)(v20 + 8) = kTarget;
              *(_DWORD *)(v20 + 12) = kTargetRestHP;
              *(_DWORD *)(v20 + 16) = dwHpChangeSeqNo;
              *(_BYTE *)v20 = bViewDamage;
              result = 1;
            }
            else
            {
              ((void (__cdecl *)(unsigned int))v19->vfptr[32].__vecDelDtor)(uiDamage);
              result = 1;
            }
            return result;
          }
        }
      }
      pkDmgDummyInfoSet.kDamageList.m_kAllocator.m_uiCount = 0;
      pkDmgDummyInfoSet.kDamageList.m_pkHead = 0;
      pkDmgDummyInfoSet.kDamageList.m_pkTail = 0;
      pkDmgDummyInfoSet.kDamageList.vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTList<DamageInfo *>::`vftable';
      v33 = 0;
      DamageInfoSet::Clear(&pkDmgDummyInfoSet);
      DamageInfoSet::AddDamage(
        &pkDmgDummyInfoSet,
        uiDamage,
        kTarget,
        dwHpChangeSeqNo,
        kTargetRestHP,
        bViewDamage,
        DmgNum != 0,
        -1);
      v31 = v8->vfptr->GetChar(v8);
      DamageInfoSet::Applicate(&pkDmgDummyInfoSet, v31, 0);
      v33 = -1;
      DamageInfoSet::~DamageInfoSet(&pkDmgDummyInfoSet);
    }
    else
    {
      while ( 1 )
      {
        v15 = v14->m_element;
        v14 = v14->m_pkNext;
        if ( v15->m_SeqNum == SeqNum )
          break;
        if ( !v14 )
          goto LABEL_10;
      }
      v24 = AttackSequenceManager::GetAttDmgInfoSetbySeqNum(v8, SeqNum);
      v15->bDamageRecved = 1;
      pkInfoSet = v24;
      if ( v8->vfptr->GetChar(v8) )
      {
        v25 = v8->vfptr->GetChar(v8);
        if ( Char::IsRangeAttChar(v25) )
        {
          v26 = (int)v8->vfptr->GetChar(v8);
          v27 = EffectMgr::GetArrowEffectInList(&g_kEffectMgr, v13, *(_WORD *)(v26 + 552));
          v28 = v27;
          if ( v27 )
          {
            v29 = (DamageInfo *)((int (__thiscall *)(ArrowEff *))v27->vfptr[35].__vecDelDtor)(v27);
            if ( !v29 )
            {
              ((void (__cdecl *)(unsigned int))v28->vfptr[32].__vecDelDtor)(uiDamage);
              return 1;
            }
          }
          else
          {
            pkInfoSeta = &v15->kDamageInfoSet;
            v29 = DamageInfoSet::GetLastInvalidDmgInfo(&v15->kDamageInfoSet);
            if ( !v29 )
            {
              v30 = operator new(0x18u);
              v30[1] = uiDamage;
              *((_WORD *)v30 + 4) = kTarget;
              v30[3] = kTargetRestHP;
              v30[4] = dwHpChangeSeqNo;
              *(_BYTE *)v30 = bViewDamage;
              DamageInfoSet::AddDamage(
                pkInfoSeta,
                uiDamage,
                kTarget,
                dwHpChangeSeqNo,
                kTargetRestHP,
                bViewDamage,
                DmgNum != 0,
                -1);
              return 1;
            }
          }
          v29->uiDamage = uiDamage;
          v29->kTargetHandle = kTarget;
          v29->kTargetRestHP = kTargetRestHP;
          v29->dwHpChangeSeqNo = dwHpChangeSeqNo;
          v29->bViewDamage = bViewDamage;
          return 1;
        }
        DamageInfoSet::AddDamage(pkInfoSet, uiDamage, kTarget, dwHpChangeSeqNo, kTargetRestHP, bViewDamage, 1, DmgNum);
      }
    }
    return 0;
  }
  v11 = this->m_kAttSeqList.m_pkHead;
  if ( !v11 )
  {
LABEL_5:
    v10 = v9 == 0;
    goto LABEL_6;
  }
  while ( 1 )
  {
    v12 = v11->m_element;
    v11 = v11->m_pkNext;
    if ( v12->m_SeqNum == -1 )
      break;
    if ( !v11 )
      goto LABEL_5;
  }
  v12->m_SeqNum = SeqNum;
  v12->bDamageRecved = 1;
  if ( v8->vfptr->GetChar(v8) )
  {
    v22 = v8->vfptr->GetChar(v8);
    if ( Char::IsRangeAttChar(v22) == 1 )
    {
      v23 = (int)v8->vfptr->GetChar(v8);
      EffectMgr::GetArrowEffectInList(&g_kEffectMgr, SeqNum, *(_WORD *)(v23 + 552));
    }
  }
  return 1;
}
// 973DFC: using guessed type int (__thiscall *NiTList<DamageInfo *>::`vftable')(void *p, char);

//----- (00633560) --------------------------------------------------------
void __thiscall AttackSequenceManager::StartHeadSeq(AttackSequenceManager *this)
{
  AttackSequenceManager *v1; // edi@1
  AttackSequence *v2; // ebx@2
  Char *v3; // eax@5
  Char *v4; // esi@5
  NiKFMTool::Transition *v5; // eax@10
  char v6; // dl@10
  char v7; // al@10
  NiActorManager *v8; // eax@14
  double v9; // st7@17
  NiKFMTool *pkKFM; // [sp+4h] [bp-10h]@11
  NiKFMTool *pkKFMa; // [sp+4h] [bp-10h]@19
  NiKFMTool::Transition *pkTransition; // [sp+8h] [bp-Ch]@2
  float fNextAttTime; // [sp+Ch] [bp-8h]@4
  float fEndSeqTime; // [sp+10h] [bp-4h]@10

  v1 = this;
  if ( !this->m_kAttSeqList.m_kAllocator.m_uiCount )
    return;
  v2 = this->m_kAttSeqList.m_pkHead->m_element;
  pkTransition = (NiKFMTool::Transition *)v2;
  if ( !v2 )
    return;
  if ( v2->bStarted )
    return;
  fNextAttTime = COERCE_FLOAT(((int (*)(void))this->vfptr->GetActor)());
  if ( fNextAttTime == 0.0 )
    return;
  v3 = v1->vfptr->GetChar(v1);
  v4 = v3;
  if ( !v3 )
    return;
  Char::UpdateWeaponEquipState(v3, (int)v2);
  if ( !v2->kDamageInfoSet.kDamageList.m_kAllocator.m_uiCount )
  {
    if ( Char::IsRangeAttChar(v4) != 1 )
      goto LABEL_11;
    if ( !v2->kDamageInfoSet.kDamageList.m_kAllocator.m_uiCount )
    {
      NiTPointerListBase<DFALL<AttackSequence *>,AttackSequence *>::Remove(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *> *)&v1->m_kAttSeqList,
        (NiLight *const *)&pkTransition);
      DamageInfoSet::~DamageInfoSet(&v2->kDamageInfoSet);
      operator delete(v2);
      return;
    }
  }
  v5 = (NiKFMTool::Transition *)CharMgr::GetChar(
                                  &g_kCharMgr,
                                  v2->kDamageInfoSet.kDamageList.m_pkHead->m_element->kTargetHandle);
  v6 = v2->byActionCode;
  fEndSeqTime = *(float *)&v4->vfptr;
  pkTransition = v5;
  v7 = Char::GetAttackActionCode(v4, v6);
  (*(void (__thiscall **)(Char *, NiKFMTool::Transition *, _DWORD))(LODWORD(fEndSeqTime) + 292))(
    v4,
    pkTransition,
    (unsigned __int8)v7);
LABEL_11:
  pkKFM = *(NiKFMTool **)(LODWORD(fNextAttTime) + 8);
  if ( pkKFM )
  {
    fEndSeqTime = COERCE_FLOAT(Char::GetAniCode(v4, 0, 0, 0));
    pkTransition = 0;
    if ( LODWORD(fEndSeqTime) == Char::GetAniCode(v4, 1, 0, 0) )
      pkTransition = NiKFMTool::GetTransition(
                       pkKFM,
                       *(_DWORD *)(LODWORD(fNextAttTime) + 64),
                       *(_DWORD *)(LODWORD(fNextAttTime) + 28));
    v8 = Char::GetSequence(v4, LODWORD(fEndSeqTime));
    if ( v8 )
    {
      fEndSeqTime = v8->m_fTransStartTime;
      if ( pkTransition )
        fEndSeqTime = pkTransition->m_fDuration + fEndSeqTime;
      fNextAttTime = v2->fCoolTime - (Timer::ms_fCurTime - v2->fRecvTime);
      v9 = 0.1;
      if ( fNextAttTime < 0.0 )
        fNextAttTime = 0.1;
      *(float *)&pkKFMa = (fEndSeqTime + 0.0) / (fNextAttTime + 0.0);
      v1->m_fTargetFrequency = *(float *)&pkKFMa;
      if ( *(float *)&pkKFMa < 0.1000000014901161 || (v9 = 3.0, *(float *)&pkKFMa > 3.0) )
        v1->m_fTargetFrequency = v9;
      v1->m_fCurrFrequency = v1->m_fTargetFrequency;
      v2->bStarted = 1;
      v1->m_uiTargetAniCode = Char::GetAniCode(v4, 0, 0, 0);
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00633740) --------------------------------------------------------
void __thiscall AttackSequenceManager::ClearAttSeq(AttackSequenceManager *this)
{
  AttackSequenceManager *v1; // ebx@1
  NiTListItem<AttackSequence *> *v2; // eax@2
  NiTListItem<AttackSequence *> *v3; // ecx@2
  AttackSequence *v4; // esi@5
  DamageInfoSet *v5; // esi@6
  NiTListItem<DamageInfo *> **v6; // edi@6
  NiTListItem<DamageInfo *> *v7; // ST08_4@7
  void (__thiscall *v8)(AttackSequenceManager *, float); // edx@11
  AttackSequence *p; // [sp+20h] [bp-14h]@5
  AttackSequenceManager *v10; // [sp+24h] [bp-10h]@1

  v1 = this;
  v10 = this;
  if ( this->m_kAttSeqList.m_kAllocator.m_uiCount )
  {
    do
    {
      v2 = v1->m_kAttSeqList.m_pkHead;
      v3 = v2->m_pkNext;
      v1->m_kAttSeqList.m_pkHead = v2->m_pkNext;
      if ( v3 )
        v3->m_pkPrev = 0;
      else
        v1->m_kAttSeqList.m_pkTail = 0;
      v4 = v2->m_element;
      p = v2->m_element;
      v1->m_kAttSeqList.vfptr->DeleteItem(
        (NiTListBase<DFALL<AttackSequence *>,AttackSequence *> *)&v1->m_kAttSeqList,
        v2);
      --v1->m_kAttSeqList.m_kAllocator.m_uiCount;
      if ( v4 )
      {
        v5 = &v4->kDamageInfoSet;
        DamageInfoSet::Clear(v5);
        v5->kDamageList.vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTPointerListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable';
        v6 = &v5->kDamageList.m_pkHead->m_pkNext;
        while ( v6 )
        {
          v7 = (NiTListItem<DamageInfo *> *)v6;
          v6 = (NiTListItem<DamageInfo *> **)*v6;
          v5->kDamageList.vfptr->DeleteItem((NiTListBase<DFALL<DamageInfo *>,DamageInfo *> *)v5, v7);
        }
        v5->kDamageList.m_kAllocator.m_uiCount = 0;
        v5->kDamageList.m_pkHead = 0;
        v5->kDamageList.m_pkTail = 0;
        v5->kDamageList.vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable';
        operator delete(p);
      }
    }
    while ( v10->m_kAttSeqList.m_kAllocator.m_uiCount );
    v1 = v10;
  }
  v8 = v1->vfptr->SetAnimationSpeed;
  v1->m_bInDuringAttackInServer = 0;
  ((void (__cdecl *)(_DWORD))v8)(1.0);
  v1->m_bAnimationStopWhenHitTime = 0;
}
// 973DBC: using guessed type int (__thiscall *NiTListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable')(void *p, char);
// 973DEC: using guessed type int (__thiscall *NiTPointerListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable')(void *p, char);

//----- (00633840) --------------------------------------------------------
void __thiscall AttackSequenceManager::ClearSkillSeq(AttackSequenceManager *this)
{
  AttackSequenceManager *v1; // ebx@1
  NiTListItem<SkillSequence *> *v2; // eax@2
  NiTListItem<SkillSequence *> *v3; // ecx@2
  SkillSequence *v4; // esi@5
  DamageInfoSet *v5; // esi@6
  NiTListItem<DamageInfo *> **v6; // edi@6
  NiTListItem<DamageInfo *> *v7; // ST08_4@7
  void (__thiscall *v8)(AttackSequenceManager *, float); // edx@11
  SkillSequence *p; // [sp+20h] [bp-14h]@5
  AttackSequenceManager *v10; // [sp+24h] [bp-10h]@1

  v1 = this;
  v10 = this;
  if ( this->m_kSkillSeqList.m_kAllocator.m_uiCount )
  {
    do
    {
      v2 = v1->m_kSkillSeqList.m_pkHead;
      v3 = v2->m_pkNext;
      v1->m_kSkillSeqList.m_pkHead = v2->m_pkNext;
      if ( v3 )
        v3->m_pkPrev = 0;
      else
        v1->m_kSkillSeqList.m_pkTail = 0;
      v4 = v2->m_element;
      p = v2->m_element;
      v1->m_kSkillSeqList.vfptr->DeleteItem(
        (NiTListBase<DFALL<SkillSequence *>,SkillSequence *> *)&v1->m_kSkillSeqList,
        v2);
      --v1->m_kSkillSeqList.m_kAllocator.m_uiCount;
      if ( v4 )
      {
        v5 = &v4->kDamageInfoSet;
        DamageInfoSet::Clear(v5);
        v5->kDamageList.vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTPointerListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable';
        v6 = &v5->kDamageList.m_pkHead->m_pkNext;
        while ( v6 )
        {
          v7 = (NiTListItem<DamageInfo *> *)v6;
          v6 = (NiTListItem<DamageInfo *> **)*v6;
          v5->kDamageList.vfptr->DeleteItem((NiTListBase<DFALL<DamageInfo *>,DamageInfo *> *)v5, v7);
        }
        v5->kDamageList.m_kAllocator.m_uiCount = 0;
        v5->kDamageList.m_pkHead = 0;
        v5->kDamageList.m_pkTail = 0;
        v5->kDamageList.vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable';
        operator delete(p);
      }
    }
    while ( v10->m_kSkillSeqList.m_kAllocator.m_uiCount );
    v1 = v10;
  }
  v8 = v1->vfptr->SetAnimationSpeed;
  v1->m_bInDuringAttackInServer = 0;
  ((void (__cdecl *)(_DWORD))v8)(1.0);
  v1->m_bAnimationStopWhenHitTime = 0;
}
// 973DBC: using guessed type int (__thiscall *NiTListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable')(void *p, char);
// 973DEC: using guessed type int (__thiscall *NiTPointerListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable')(void *p, char);

//----- (00633940) --------------------------------------------------------
char __thiscall AttackSequenceManager::ApplicateSkillSeqImmediately(AttackSequenceManager *this, Char *pkCaster, bool bAllApplicate, bool bLastHitTime)
{
  AttackSequenceManager *v4; // edi@1
  bool v5; // zf@2
  SkillSequence *v6; // esi@3
  char result; // al@4
  char v8; // al@5
  SkillSequence *pkSeq; // [sp+4h] [bp-8h]@3
  bool b; // [sp+Bh] [bp-1h]@2

  v4 = this;
  if ( ((int (*)(void))this->vfptr->GetChar)() )
  {
    v5 = v4->m_kSkillSeqList.m_kAllocator.m_uiCount == 0;
    b = 1;
    if ( !v5 )
    {
      v6 = v4->m_kSkillSeqList.m_pkHead->m_element;
      pkSeq = v6;
      if ( !v6 )
        return 0;
      v8 = SkillSequence::ApplicateImmediately(v6, (int)v4, (int)v6, pkCaster, bAllApplicate);
      if ( bAllApplicate == 1 )
      {
        NiTPointerListBase<DFALL<AttackSequence *>,AttackSequence *>::Remove(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *> *)&v4->m_kSkillSeqList,
          (NiLight *const *)&pkSeq);
        DamageInfoSet::~DamageInfoSet(&v6->kDamageInfoSet);
        operator delete(v6);
        return b;
      }
      if ( bLastHitTime == 1 && (v8 != 1 || v6->kDamageInfoSet.kDamageList.m_kAllocator.m_uiCount) )
        b = 0;
    }
    result = b;
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (006339E0) --------------------------------------------------------
void __thiscall AttackSequenceManager::ApplicateAttackSeqImmediately(AttackSequenceManager *this, int bAllApplicate)
{
  AttackSequenceManager *v2; // edi@1
  char *v3; // ebx@2
  int v4; // eax@4
  int v5; // ecx@4
  AttackSequence *v6; // esi@7
  DamageInfoSet *v7; // esi@9
  NiTListItem<DamageInfo *> **v8; // edi@9
  NiTListItem<DamageInfo *> *v9; // ST04_4@10
  void *p; // [sp+14h] [bp-14h]@7
  AttackSequenceManager *v11; // [sp+18h] [bp-10h]@1

  v2 = this;
  v11 = this;
  if ( this->m_kAttSeqList.m_kAllocator.m_uiCount )
  {
    v3 = (char *)&this->m_kAttSeqList;
    while ( 1 )
    {
      v4 = *((_DWORD *)v3 + 1);
      v5 = *(_DWORD *)v4;
      *((_DWORD *)v3 + 1) = *(_DWORD *)v4;
      if ( v5 )
        *(_DWORD *)(v5 + 4) = 0;
      else
        *((_DWORD *)v3 + 2) = 0;
      v6 = *(AttackSequence **)(v4 + 8);
      p = *(void **)(v4 + 8);
      (*(void (__thiscall **)(char *, int))(*(_DWORD *)v3 + 8))(v3, v4);
      --*((_DWORD *)v3 + 3);
      ++v2->m_iCurrAttSeqCode;
      if ( v6->bDamageRecved )
        v2->vfptr->ApplicateAttackSeq(v2, v6, bAllApplicate);
      v7 = &v6->kDamageInfoSet;
      DamageInfoSet::Clear(v7);
      v7->kDamageList.vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTPointerListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable';
      v8 = &v7->kDamageList.m_pkHead->m_pkNext;
      while ( v8 )
      {
        v9 = (NiTListItem<DamageInfo *> *)v8;
        v8 = (NiTListItem<DamageInfo *> **)*v8;
        v7->kDamageList.vfptr->DeleteItem((NiTListBase<DFALL<DamageInfo *>,DamageInfo *> *)v7, v9);
      }
      v7->kDamageList.m_kAllocator.m_uiCount = 0;
      v7->kDamageList.m_pkHead = 0;
      v7->kDamageList.m_pkTail = 0;
      v7->kDamageList.vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable';
      operator delete(p);
      if ( !v11->m_kAttSeqList.m_kAllocator.m_uiCount )
        break;
      v2 = v11;
    }
  }
}
// 973DBC: using guessed type int (__thiscall *NiTListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable')(void *p, char);
// 973DEC: using guessed type int (__thiscall *NiTPointerListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable')(void *p, char);

//----- (00633AF0) --------------------------------------------------------
char __thiscall AttackSequenceManager::ApplicateLastSkillSeqImmediately(AttackSequenceManager *this, Char *pkCaster, bool bAllApplicate)
{
  AttackSequenceManager *v3; // edi@1
  char result; // al@2
  SkillSequence *v5; // esi@3
  char v6; // bl@3
  NiTListItem<SkillSequence *> *v7; // ecx@5
  NiTListItem<SkillSequence *> *v8; // eax@5

  v3 = this;
  if ( this->m_kSkillSeqList.m_kAllocator.m_uiCount )
  {
    v5 = this->m_kSkillSeqList.m_pkTail->m_element;
    v6 = SkillSequence::ApplicateImmediately(v5, (int)this, (int)v5, pkCaster, bAllApplicate);
    if ( v5 )
    {
      DamageInfoSet::~DamageInfoSet(&v5->kDamageInfoSet);
      operator delete(v5);
    }
    v7 = v3->m_kSkillSeqList.m_pkTail;
    v8 = v7->m_pkPrev;
    v3->m_kSkillSeqList.m_pkTail = v8;
    if ( v8 )
      v8->m_pkNext = 0;
    else
      v3->m_kSkillSeqList.m_pkHead = 0;
    v3->m_kSkillSeqList.vfptr->DeleteItem(
      (NiTListBase<DFALL<SkillSequence *>,SkillSequence *> *)&v3->m_kSkillSeqList,
      v7);
    --v3->m_kSkillSeqList.m_kAllocator.m_uiCount;
    result = v6;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00633B70) --------------------------------------------------------
char __thiscall AttackSequenceManager::DeleteMissAttSeq(AttackSequenceManager *this)
{
  NiTListItem<AttackSequence *> *v1; // eax@1
  AttackSequence *v2; // esi@2
  char result; // al@5
  NiTListItem<AttackSequence *> *v4; // eax@6
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *v5; // ecx@6
  AttackSequence **v6; // edx@7
  NiTListItem<AttackSequence *> *v7; // edi@7
  void *kPos; // [sp+4h] [bp-4h]@10

  v1 = this->m_kAttSeqList.m_pkHead;
  if ( v1 )
  {
    while ( 1 )
    {
      v2 = v1->m_element;
      v1 = v1->m_pkNext;
      if ( v2 )
      {
        if ( !v2->bDamageRecved )
          break;
      }
      if ( !v1 )
        goto LABEL_5;
    }
    v4 = this->m_kAttSeqList.m_pkHead;
    v5 = (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&this->m_kAttSeqList;
    if ( v4 )
    {
      while ( 1 )
      {
        v6 = &v4->m_element;
        v7 = v4;
        v4 = v4->m_pkNext;
        if ( v2 == *v6 )
          break;
        if ( !v4 )
          goto LABEL_9;
      }
    }
    else
    {
LABEL_9:
      v7 = 0;
    }
    kPos = v7;
    if ( v7 )
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(v5, &kPos);
    DamageInfoSet::~DamageInfoSet(&v2->kDamageInfoSet);
    operator delete(v2);
    result = 1;
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (00633BF0) --------------------------------------------------------
void __thiscall AttackSequenceManager::DeleteSkillSequence(AttackSequenceManager *this, unsigned __int16 Index, unsigned __int16 kID)
{
  NiTListItem<SkillSequence *> *v3; // ebx@1
  SkillSequence *v4; // esi@2
  NiTListItem<SkillSequence *> *v5; // eax@4
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *v6; // ecx@4
  SkillSequence **v7; // edx@5
  NiTListItem<SkillSequence *> *v8; // edi@5
  AttackSequenceManager *v9; // [sp+4h] [bp-8h]@1
  void *kPos; // [sp+8h] [bp-4h]@8

  v3 = this->m_kSkillSeqList.m_pkHead;
  v9 = this;
  while ( v3 )
  {
    v4 = v3->m_element;
    v3 = v3->m_pkNext;
    if ( v4->m_Index == Index && v4->kSkillID == kID )
    {
      this->m_bInDuringAttackInServer = 0;
      v5 = this->m_kSkillSeqList.m_pkHead;
      v6 = (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&this->m_kSkillSeqList;
      if ( v5 )
      {
        while ( 1 )
        {
          v7 = &v5->m_element;
          v8 = v5;
          v5 = v5->m_pkNext;
          if ( v4 == *v7 )
            break;
          if ( !v5 )
            goto LABEL_7;
        }
      }
      else
      {
LABEL_7:
        v8 = 0;
      }
      kPos = v8;
      if ( v8 )
        NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(v6, &kPos);
      DamageInfoSet::~DamageInfoSet(&v4->kDamageInfoSet);
      operator delete(v4);
      this = v9;
    }
  }
}

//----- (00633C80) --------------------------------------------------------
void __thiscall AttackSequenceManager::Update(AttackSequenceManager *this, float fTime)
{
  AttackSequenceManager *v2; // esi@1
  bool v3; // zf@1
  int v4; // edi@2
  int v5; // eax@2
  Char *v6; // ebx@2
  unsigned __int16 v7; // ax@5
  AttackSequence *v8; // edi@5
  Char *v9; // eax@6
  unsigned int v10; // ebx@13
  NiActorManager *v11; // edi@13
  AttackSequence *v12; // ecx@14
  unsigned int v13; // eax@26
  Char *v14; // eax@28
  bool v15; // al@28
  double v16; // st7@29
  void (__thiscall *v17)(AttackSequenceManager *, float); // edx@32
  AttackSequence *v18; // edi@32
  Char *v19; // eax@35
  float v20; // ST18_4@41
  double v21; // st7@41
  AttackSequence *v22; // ebx@44
  Char *v23; // eax@45
  AttackSequence *v24; // edi@48
  Char *v25; // eax@49
  Char *fEndSeqTime; // [sp+10h] [bp-8h]@2
  float fEndSeqTimea; // [sp+10h] [bp-8h]@27
  AttackSequence *pkAttSeq; // [sp+14h] [bp-4h]@5
  float fNextAttTime; // [sp+20h] [bp+8h]@38
  float fNextAttTimea; // [sp+20h] [bp+8h]@54

  v2 = this;
  v3 = this->m_kAttSeqList.m_kAllocator.m_uiCount == 0;
  this->m_bAnimationStopWhenHitTime = 0;
  if ( !v3 )
  {
    v4 = ((int (*)(void))this->vfptr->GetActor)();
    v5 = (int)v2->vfptr->GetChar(v2);
    v6 = (Char *)v5;
    fEndSeqTime = (Char *)v5;
    if ( v4 )
    {
      if ( v5 && !(unsigned __int8)(*(int (__thiscall **)(int))(*(_DWORD *)v5 + 496))(v5) )
      {
        v7 = v2->m_kLastTargetHandle;
        v8 = v2->m_kAttSeqList.m_pkTail->m_element;
        pkAttSeq = v2->m_kAttSeqList.m_pkHead->m_element;
        if ( v7 == -1 )
        {
          v8->bLastSequence = 1;
          v2->m_kLastTargetHandle = -1;
        }
        else
        {
          v9 = CharMgr::GetChar(&g_kCharMgr, v7);
          if ( v9 )
          {
            if ( v9->m_bWillDead )
            {
              v8->bLastSequence = 1;
              v2->m_kLastTargetHandle = -1;
            }
          }
          else
          {
            v8->bLastSequence = 1;
            v2->m_kLastTargetHandle = -1;
          }
        }
        if ( (signed int)v2->m_kAttSeqList.m_kAllocator.m_uiCount <= 0 )
        {
          v8->bLastSequence = 1;
          v2->m_kLastTargetHandle = -1;
        }
        v2->vfptr->GetChar(v2);
        v10 = Char::GetAniCode(v6, 0, 0, 0);
        v11 = Char::GetSequence(fEndSeqTime, v10);
        if ( v11 )
        {
          v12 = pkAttSeq;
          if ( !pkAttSeq->bStarted )
          {
            AttackSequenceManager::StartHeadSeq(v2);
            v12 = pkAttSeq;
          }
          if ( !v2->m_bSequenceStarted )
          {
            if ( v11->m_fTransEndTime < (double)v2->m_fLastSequenceEndTime )
              v2->m_bSequenceStarted = 1;
            v2->m_fTargetFrequency = 1.0;
            v2->m_fCurrFrequency = 1.0;
            goto LABEL_54;
          }
          if ( v11->m_pkCurSequence != (NiControllerSequence *)1 )
          {
            v2->m_fTargetFrequency = 1.0;
            v2->m_fCurrFrequency = 1.0;
LABEL_54:
            fNextAttTimea = v2->m_fTargetFrequency - v2->m_fCurrFrequency;
            if ( fNextAttTimea > 0.0 )
              v2->m_fCurrFrequency = fNextAttTimea * 0.1000000014901161 + v2->m_fCurrFrequency;
            v2->vfptr->GetChar(v2);
            ((void (__thiscall *)(_DWORD, _DWORD))v2->vfptr->SetAnimationSpeed)(v2, v2->m_fCurrFrequency);
            return;
          }
          if ( v10 != v2->m_uiTargetAniCode )
          {
            if ( v12->bStarted )
              v12->bStarted = 0;
            AttackSequenceManager::StartHeadSeq(v2);
            goto LABEL_54;
          }
          v13 = v2->m_kAttSeqList.m_kAllocator.m_uiCount;
          if ( v13 != 1 )
          {
            if ( v13 <= 1 )
              goto LABEL_54;
            v2->vfptr->GetChar(v2);
            v22 = pkAttSeq;
            if ( pkAttSeq->bDamageRecved || (v23 = v2->vfptr->GetChar(v2), Char::IsRangeAttChar(v23)) )
            {
              if ( !AttackSequenceManager::IsSeqFinished((NiControllerSequence *)v11) )
              {
                v21 = 5.0;
LABEL_53:
                v2->m_fTargetFrequency = v21;
                goto LABEL_54;
              }
              v2->m_bSequenceStarted = 0;
              v2->m_fLastSequenceEndTime = v11->m_fTransEndTime;
              v24 = NiTPointerListBase<NiTPointerAllocator<unsigned int>,unsigned int>::RemoveHead((NiTPointerListBase<DFALL<AttackSequence *>,AttackSequence *> *)&v2->m_kAttSeqList.vfptr);
              if ( v24->kDamageInfoSet.kDamageList.m_kAllocator.m_uiCount )
              {
                v25 = v2->vfptr->GetChar(v2);
                DamageInfoSet::Applicate(&v24->kDamageInfoSet, v25, 1);
              }
              DamageInfoSet::~DamageInfoSet(&v24->kDamageInfoSet);
              operator delete(v24);
            }
            else
            {
              OutputDebugStringA("µ¥¹ÌÁö¸¦ ¹ÞÁö ¸øÇß°í ½ÃÄö½º´Â ³¡³µ°í. ½×¿©´Â ÀÖ°í °­Á¦·Î ¼¼ÆÃ..\n");
              NiTPointerListBase<DFALL<AttackSequence *>,AttackSequence *>::Remove(
                (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *> *)&v2->m_kAttSeqList,
                (NiLight *const *)&pkAttSeq);
              DamageInfoSet::~DamageInfoSet(&v22->kDamageInfoSet);
              operator delete(v22);
            }
            ++v2->m_iCurrAttSeqCode;
            AttackSequenceManager::StartHeadSeq(v2);
            return;
          }
          fEndSeqTimea = v11->m_fTransStartTime - v11->m_fTransEndTime;
          if ( !v12->bDamageRecved )
          {
            v14 = v2->vfptr->GetChar(v2);
            v15 = Char::IsRangeAttChar(v14);
            v12 = pkAttSeq;
            if ( !v15 )
            {
              v16 = 0.0;
              v2->m_bAnimationStopWhenHitTime = 1;
LABEL_38:
              fNextAttTime = v12->fCoolTime - (fTime - v12->fRecvTime);
              if ( fNextAttTime < 0.1000000014901161 )
                fNextAttTime = 0.1;
              if ( v16 <= fEndSeqTimea )
              {
                v21 = (fEndSeqTimea + 0.0) / (fNextAttTime + 0.0);
              }
              else
              {
                v20 = v16;
                v21 = (v20 + 0.0) / (fNextAttTime + 0.0);
              }
              goto LABEL_53;
            }
          }
          v16 = 0.0;
          if ( fEndSeqTimea >= 0.0 )
            goto LABEL_38;
          if ( !v12->bLastSequence )
          {
            v16 = 0.0;
            ++v2->m_iCurrAttSeqCode;
            fEndSeqTimea = 0.0;
            goto LABEL_38;
          }
          v17 = v2->vfptr->SetAnimationSpeed;
          v2->m_fLastSequenceEndTime = 1000.0;
          v2->m_bSequenceStarted = 0;
          ((void (__thiscall *)(AttackSequenceManager *, _DWORD))v17)(v2, 1.0);
          v18 = NiTPointerListBase<NiTPointerAllocator<unsigned int>,unsigned int>::RemoveHead((NiTPointerListBase<DFALL<AttackSequence *>,AttackSequence *> *)&v2->m_kAttSeqList.vfptr);
          if ( v18->kDamageInfoSet.kDamageList.m_kAllocator.m_uiCount )
          {
            if ( *(_WORD *)((int)v2->vfptr->GetChar(v2) + 552) == g_pkMainChar->m_kHandle )
              OutputDebugStringA("last sequence -applicate\n");
            v19 = v2->vfptr->GetChar(v2);
            DamageInfoSet::Applicate(&v18->kDamageInfoSet, v19, 1);
          }
          DamageInfoSet::~DamageInfoSet(&v18->kDamageInfoSet);
          operator delete(v18);
        }
      }
    }
  }
}

//----- (00634010) --------------------------------------------------------
void __thiscall AttackSequenceManager::AddAttSeq(AttackSequenceManager *this, AttackSequence *pkSeq)
{
  AttackSequenceManager *v2; // esi@1
  Char *v3; // edi@1
  Char *(__thiscall *v4)(AttackSequenceManager *); // eax@10
  int v5; // eax@10
  DamageInfo *v6; // eax@13
  unsigned int v7; // eax@16
  int v8; // eax@21
  _DWORD *v9; // ecx@21
  unsigned int uiFirstCode; // [sp+Ch] [bp-4h]@2

  v2 = this;
  v3 = (Char *)((int (*)(void))this->vfptr->GetChar)();
  if ( v3
    && (Char::GetAniCode(v3, 0, &uiFirstCode, 0), uiFirstCode != 300000)
    && uiFirstCode != 100000
    && uiFirstCode != 600000
    && uiFirstCode != 700000
    && uiFirstCode != 400000
    && uiFirstCode != 200000 )
  {
    DamageInfoSet::Applicate(&pkSeq->kDamageInfoSet, v3, 1);
    if ( pkSeq )
    {
      DamageInfoSet::~DamageInfoSet(&pkSeq->kDamageInfoSet);
      operator delete(pkSeq);
    }
  }
  else
  {
    v4 = v2->vfptr->GetChar;
    v2->m_bInDuringAttackInServer = 1;
    v5 = (int)v4(v2);
    if ( (unsigned __int8)(*(int (__thiscall **)(int))(*(_DWORD *)v5 + 32))(v5) )
      pkSeq->bLastSequence = 1;
    if ( pkSeq->kDamageInfoSet.kDamageList.m_kAllocator.m_uiCount )
    {
      v6 = pkSeq->kDamageInfoSet.kDamageList.m_pkHead->m_element;
      v2->m_kLastTargetHandle = v6->kTargetHandle;
      if ( v6->uiDamage & 0x80000000 )
      {
        pkSeq->bLastSequence = 1;
        if ( v2->vfptr->GetChar(v2) == g_pkMainChar )
          v2->vfptr->GetChar(v2);
      }
    }
    v7 = v2->m_kAttSeqList.m_kAllocator.m_uiCount;
    if ( v7 )
    {
      if ( v7 > 4 && !AttackSequenceManager::DeleteMissAttSeq(v2) )
      {
        DamageInfoSet::~DamageInfoSet(&pkSeq->kDamageInfoSet);
        operator delete(pkSeq);
        return;
      }
    }
    else
    {
      v2->m_fLastSequenceEndTime = 1000.0;
    }
    v8 = (int)v2->m_kAttSeqList.vfptr->NewItem((NiTListBase<DFALL<AttackSequence *>,AttackSequence *> *)&v2->m_kAttSeqList);
    *(_DWORD *)(v8 + 8) = pkSeq;
    *(_DWORD *)v8 = 0;
    *(_DWORD *)(v8 + 4) = v2->m_kAttSeqList.m_pkTail;
    v9 = &v2->m_kAttSeqList.m_pkTail->m_pkNext;
    if ( v9 )
      *v9 = v8;
    else
      v2->m_kAttSeqList.m_pkHead = (NiTListItem<AttackSequence *> *)v8;
    v2->m_kAttSeqList.m_pkTail = (NiTListItem<AttackSequence *> *)v8;
    ++v2->m_kAttSeqList.m_kAllocator.m_uiCount;
    pkSeq->iAttSeqCode = v2->m_iLastAttSeqCode++;
  }
}

//----- (00634170) --------------------------------------------------------
void __thiscall AttackSequenceManager::SetDamageToLastAttSeq(AttackSequenceManager *this, DamageInfoSet *rkSet)
{
  AttackSequenceManager *v2; // esi@1
  AttackSequence *v3; // esi@2
  _DWORD *v4; // eax@4
  _DWORD *v5; // edi@5
  int v6; // eax@7
  _DWORD *v7; // ecx@7

  v2 = this;
  if ( this->m_kAttSeqList.m_kAllocator.m_uiCount )
  {
    v3 = this->m_kAttSeqList.m_pkTail->m_element;
    if ( v3 )
    {
      DamageInfoSet::Clear(&v3->kDamageInfoSet);
      DamageInfoSet::CopyFrom(&v3->kDamageInfoSet, rkSet);
      v3->bDamageRecved = 1;
    }
  }
  else
  {
    v4 = operator new(0x28u);
    if ( v4 )
    {
      v4[7] = 0;
      v4[5] = 0;
      v4[6] = 0;
      v4[4] = &NiTList<DamageInfo *>::`vftable';
      *((_WORD *)v4 + 6) = 0;
      *((_BYTE *)v4 + 14) = 0;
      v4[8] = -1;
      *((_BYTE *)v4 + 36) = 0;
      *((_WORD *)v4 + 19) = -1;
      v5 = v4;
    }
    else
    {
      v5 = 0;
    }
    *((_BYTE *)v5 + 36) = 1;
    DamageInfoSet::CopyFrom((DamageInfoSet *)v5 + 1, rkSet);
    v6 = (int)v2->m_kAttSeqList.vfptr->NewItem((NiTListBase<DFALL<AttackSequence *>,AttackSequence *> *)&v2->m_kAttSeqList);
    *(_DWORD *)(v6 + 8) = v5;
    *(_DWORD *)v6 = 0;
    *(_DWORD *)(v6 + 4) = v2->m_kAttSeqList.m_pkTail;
    v7 = &v2->m_kAttSeqList.m_pkTail->m_pkNext;
    if ( v7 )
      *v7 = v6;
    else
      v2->m_kAttSeqList.m_pkHead = (NiTListItem<AttackSequence *> *)v6;
    ++v2->m_kAttSeqList.m_kAllocator.m_uiCount;
    v2->m_kAttSeqList.m_pkTail = (NiTListItem<AttackSequence *> *)v6;
    AttackSequenceManager::ApplicateAttackSeqImmediately(v2, 1);
  }
}
// 973DFC: using guessed type int (__thiscall *NiTList<DamageInfo *>::`vftable')(void *p, char);

//----- (00634240) --------------------------------------------------------
void __thiscall AttackSequenceManager::~AttackSequenceManager(AttackSequenceManager *this)
{
  NiTListItem<AttackSequence *> *v1; // eax@2
  char *v2; // esi@2
  NiTListItem<AttackSequence *> *v3; // ecx@2
  AttackSequence *v4; // edi@5
  int v5; // esi@6
  NiTListItem<DamageInfo *> **v6; // edi@6
  NiTListItem<DamageInfo *> **v7; // ST00_4@7
  NiTListItem<SkillSequence *> *v8; // eax@11
  char *v9; // esi@11
  NiTListItem<SkillSequence *> *v10; // ecx@11
  SkillSequence *v11; // edi@14
  int v12; // esi@15
  NiTListItem<DamageInfo *> **v13; // edi@15
  NiTListItem<DamageInfo *> **v14; // ST00_4@16
  char *v15; // esi@19
  NiTListItem<SkillSequence *> *v16; // edi@19
  NiTListItem<SkillSequence *> *v17; // ST00_4@20
  char *v18; // edi@22
  NiTListItem<AttackSequence *> *v19; // esi@22
  NiTListItem<AttackSequence *> *v20; // ST00_4@23
  AttackSequence *p; // [sp+14h] [bp-14h]@5
  SkillSequence *pa; // [sp+14h] [bp-14h]@14
  AttackSequenceManager *v23; // [sp+18h] [bp-10h]@1

  v23 = this;
  for ( this->vfptr = (AttackSequenceManagerVtbl *)AttackSequenceManager::`vftable';
        v23->m_kAttSeqList.m_kAllocator.m_uiCount;
        this = v23 )
  {
    v1 = this->m_kAttSeqList.m_pkHead;
    v2 = (char *)&this->m_kAttSeqList;
    v3 = v1->m_pkNext;
    *((_DWORD *)v2 + 1) = v1->m_pkNext;
    if ( v3 )
      v3->m_pkPrev = 0;
    else
      *((_DWORD *)v2 + 2) = 0;
    v4 = v1->m_element;
    p = v1->m_element;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v2 + 8))(v2, v1);
    --*((_DWORD *)v2 + 3);
    if ( v4 )
    {
      v5 = (int)&v4->kDamageInfoSet;
      DamageInfoSet::Clear(&v4->kDamageInfoSet);
      v4->kDamageInfoSet.kDamageList.vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTPointerListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable';
      v6 = &v4->kDamageInfoSet.kDamageList.m_pkHead->m_pkNext;
      while ( v6 )
      {
        v7 = v6;
        v6 = (NiTListItem<DamageInfo *> **)*v6;
        (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v5 + 8))(v5, v7);
      }
      *(_DWORD *)(v5 + 12) = 0;
      *(_DWORD *)(v5 + 4) = 0;
      *(_DWORD *)(v5 + 8) = 0;
      *(_DWORD *)v5 = &NiTListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable';
      operator delete(p);
    }
  }
  if ( this->m_kSkillSeqList.m_kAllocator.m_uiCount )
  {
    do
    {
      v8 = this->m_kSkillSeqList.m_pkHead;
      v9 = (char *)&this->m_kSkillSeqList;
      v10 = v8->m_pkNext;
      *((_DWORD *)v9 + 1) = v8->m_pkNext;
      if ( v10 )
        v10->m_pkPrev = 0;
      else
        *((_DWORD *)v9 + 2) = 0;
      v11 = v8->m_element;
      pa = v8->m_element;
      (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v9 + 8))(v9, v8);
      --*((_DWORD *)v9 + 3);
      if ( v11 )
      {
        v12 = (int)&v11->kDamageInfoSet;
        DamageInfoSet::Clear(&v11->kDamageInfoSet);
        v11->kDamageInfoSet.kDamageList.vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTPointerListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable';
        v13 = &v11->kDamageInfoSet.kDamageList.m_pkHead->m_pkNext;
        while ( v13 )
        {
          v14 = v13;
          v13 = (NiTListItem<DamageInfo *> **)*v13;
          (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v12 + 8))(v12, v14);
        }
        *(_DWORD *)(v12 + 12) = 0;
        *(_DWORD *)(v12 + 4) = 0;
        *(_DWORD *)(v12 + 8) = 0;
        *(_DWORD *)v12 = &NiTListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable';
        operator delete(pa);
      }
      this = v23;
    }
    while ( v23->m_kSkillSeqList.m_kAllocator.m_uiCount );
  }
  v15 = (char *)&this->m_kSkillSeqList;
  this->m_kSkillSeqList.vfptr = (NiTListBase<DFALL<SkillSequence *>,SkillSequence *>Vtbl *)&NiTPointerListBase<DFALL<SkillSequence *>,SkillSequence *>::`vftable';
  v16 = this->m_kSkillSeqList.m_pkHead;
  if ( v16 )
  {
    do
    {
      v17 = v16;
      v16 = v16->m_pkNext;
      (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v15 + 8))(v15, v17);
    }
    while ( v16 );
    this = v23;
  }
  v18 = (char *)&this->m_kAttSeqList;
  *((_DWORD *)v15 + 3) = 0;
  *((_DWORD *)v15 + 1) = 0;
  *((_DWORD *)v15 + 2) = 0;
  *(_DWORD *)v15 = &NiTListBase<DFALL<SkillSequence *>,SkillSequence *>::`vftable';
  this->m_kAttSeqList.vfptr = (NiTListBase<DFALL<AttackSequence *>,AttackSequence *>Vtbl *)&NiTPointerListBase<DFALL<AttackSequence *>,AttackSequence *>::`vftable';
  v19 = this->m_kAttSeqList.m_pkHead;
  while ( v19 )
  {
    v20 = v19;
    v19 = v19->m_pkNext;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v18 + 8))(v18, v20);
  }
  *((_DWORD *)v18 + 3) = 0;
  *((_DWORD *)v18 + 1) = 0;
  *((_DWORD *)v18 + 2) = 0;
  *(_DWORD *)v18 = &NiTListBase<DFALL<AttackSequence *>,AttackSequence *>::`vftable';
}
// 973DBC: using guessed type int (__thiscall *NiTListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable')(void *p, char);
// 973DEC: using guessed type int (__thiscall *NiTPointerListBase<DFALL<DamageInfo *>,DamageInfo *>::`vftable')(void *p, char);
// 9B8A78: using guessed type int (__thiscall *NiTListBase<DFALL<AttackSequence *>,AttackSequence *>::`vftable')(void *p, char);
// 9B8A88: using guessed type int (__thiscall *NiTListBase<DFALL<SkillSequence *>,SkillSequence *>::`vftable')(void *p, char);
// 9B8AA4: using guessed type int (__thiscall *NiTPointerListBase<DFALL<AttackSequence *>,AttackSequence *>::`vftable')(void *p, char);
// 9B8AB4: using guessed type int (__thiscall *NiTPointerListBase<DFALL<SkillSequence *>,SkillSequence *>::`vftable')(void *p, char);
// 9B8AE8: using guessed type int (*AttackSequenceManager::`vftable'[6])();

//----- (00634440) --------------------------------------------------------
void __thiscall AttackSequenceManager::HardStopAttack(AttackSequenceManager *this)
{
  AttackSequenceManager *v1; // esi@1
  Char *v2; // eax@3
  ActiveSkillInfo *v3; // eax@3
  Char *v4; // eax@6
  Char *v5; // eax@8
  NiActorManager *v6; // edi@8
  Char *v7; // eax@8
  char v8; // [sp+0h] [bp-10h]@4

  v1 = this;
  if ( ((int (*)(void))this->vfptr->GetChar)() )
  {
    v1->vfptr->GetChar(v1);
    AttackSequenceManager::ApplicateAttackSeqImmediately(v1, 1);
    if ( v1->vfptr->GetChar(v1) )
    {
      v2 = v1->vfptr->GetChar(v1);
      v3 = Char::GetCurPlayActiiveSkillInfo(v2);
      if ( v3 )
        v8 = v3->HitID == 0;
      else
        v8 = 1;
      v4 = v1->vfptr->GetChar(v1);
      AttackSequenceManager::ApplicateSkillSeqImmediately(v1, v4, v8, 0);
    }
    if ( v1->vfptr->GetChar(v1) )
    {
      v5 = v1->vfptr->GetChar(v1);
      v6 = Char::GetNowSequence(v5);
      v7 = v1->vfptr->GetChar(v1);
      if ( Char::IsAbStateAction(v7) != 1 || !v6 || !LODWORD(v6->m_fTimelineRefreshTime) )
        ((void (__thiscall *)(_DWORD, _DWORD))v1->vfptr->SetAnimationSpeed)(v1, 1.0);
    }
    v1->m_bAnimationStopWhenHitTime = 0;
  }
}

//----- (00634510) --------------------------------------------------------
NiTList<AttackSequence *> *__thiscall NiTList<AttackSequence *>::`vector deleting destructor'(NiTList<AttackSequence *> *this, unsigned int a2)
{
  NiTList<AttackSequence *> *v2; // edi@1
  NiTListItem<AttackSequence *> *v3; // esi@1
  NiTListItem<AttackSequence *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<AttackSequence *>,AttackSequence *>Vtbl *)&NiTPointerListBase<DFALL<AttackSequence *>,AttackSequence *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<DFALL<AttackSequence *>,AttackSequence *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<AttackSequence *>,AttackSequence *>Vtbl *)&NiTListBase<DFALL<AttackSequence *>,AttackSequence *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B8A78: using guessed type int (__thiscall *NiTListBase<DFALL<AttackSequence *>,AttackSequence *>::`vftable')(void *p, char);
// 9B8AA4: using guessed type int (__thiscall *NiTPointerListBase<DFALL<AttackSequence *>,AttackSequence *>::`vftable')(void *p, char);

//----- (006345A0) --------------------------------------------------------
char *__cdecl DmgSndTab::Get(unsigned int uiWType, unsigned int uiAType)
{
  char *v2; // eax@5
  char *v3; // esi@6
  char *result; // eax@6

  if ( uiWType < 0x16
    && uiAType < 0xC
    && uiWType
    && uiAType
    && (v2 = CDataReader::GetRecord(
               (CDataReader *)(ITableBase<DmgSndMapByArmorType,DmgSndTab>::ms_pkTable + 4),
               uiWType - 1)) != 0 )
  {
    v3 = &v2[32 * (uiAType - 1)];
    result = (char *)strcmp(&v2[32 * (uiAType - 1)], "-");
    if ( result )
      result = v3;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C168: using guessed type int ITableBase<DmgSndMapByArmorType,DmgSndTab>::ms_pkTable;

//----- (00634620) --------------------------------------------------------
void __thiscall NiTList<AttackSequence *>::~NiTList<AttackSequence *>(NiTList<AttackSequence *> *this)
{
  NiTList<AttackSequence *> *v1; // edi@1
  NiTListItem<AttackSequence *> *v2; // esi@1
  NiTListItem<AttackSequence *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<DFALL<AttackSequence *>,AttackSequence *>Vtbl *)&NiTPointerListBase<DFALL<AttackSequence *>,AttackSequence *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<DFALL<AttackSequence *>,AttackSequence *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<DFALL<AttackSequence *>,AttackSequence *>Vtbl *)&NiTListBase<DFALL<AttackSequence *>,AttackSequence *>::`vftable';
}
// 9B8A78: using guessed type int (__thiscall *NiTListBase<DFALL<AttackSequence *>,AttackSequence *>::`vftable')(void *p, char);
// 9B8AA4: using guessed type int (__thiscall *NiTPointerListBase<DFALL<AttackSequence *>,AttackSequence *>::`vftable')(void *p, char);

//----- (006346A0) --------------------------------------------------------
void __thiscall NiTList<SkillSequence *>::~NiTList<SkillSequence *>(NiTList<SkillSequence *> *this)
{
  NiTList<SkillSequence *> *v1; // edi@1
  NiTListItem<SkillSequence *> *v2; // esi@1
  NiTListItem<SkillSequence *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<DFALL<SkillSequence *>,SkillSequence *>Vtbl *)&NiTPointerListBase<DFALL<SkillSequence *>,SkillSequence *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<DFALL<SkillSequence *>,SkillSequence *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<DFALL<SkillSequence *>,SkillSequence *>Vtbl *)&NiTListBase<DFALL<SkillSequence *>,SkillSequence *>::`vftable';
}
// 9B8A88: using guessed type int (__thiscall *NiTListBase<DFALL<SkillSequence *>,SkillSequence *>::`vftable')(void *p, char);
// 9B8AB4: using guessed type int (__thiscall *NiTPointerListBase<DFALL<SkillSequence *>,SkillSequence *>::`vftable')(void *p, char);

//----- (00634720) --------------------------------------------------------
NiTList<SkillSequence *> *__thiscall NiTPointerListBase<DFALL<SkillSequence *>,SkillSequence *>::`vector deleting destructor'(NiTList<SkillSequence *> *this, unsigned int a2)
{
  NiTList<SkillSequence *> *v2; // edi@1
  NiTListItem<SkillSequence *> *v3; // esi@1
  NiTListItem<SkillSequence *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<SkillSequence *>,SkillSequence *>Vtbl *)&NiTPointerListBase<DFALL<SkillSequence *>,SkillSequence *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<DFALL<SkillSequence *>,SkillSequence *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<SkillSequence *>,SkillSequence *>Vtbl *)&NiTListBase<DFALL<SkillSequence *>,SkillSequence *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B8A88: using guessed type int (__thiscall *NiTListBase<DFALL<SkillSequence *>,SkillSequence *>::`vftable')(void *p, char);
// 9B8AB4: using guessed type int (__thiscall *NiTPointerListBase<DFALL<SkillSequence *>,SkillSequence *>::`vftable')(void *p, char);

//----- (006347B0) --------------------------------------------------------
NiKFMTool::Transition *__thiscall NiKFMTool::GetTransition(NiKFMTool *this, unsigned int uiSrcID, unsigned int uiDesID)
{
  NiKFMTool::Transition *result; // eax@3
  char v4; // al@4

  if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
         (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_mapSequences,
         uiSrcID,
         (NiVBSet **)&uiSrcID)
    && uiSrcID )
  {
    v4 = NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
           (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)(uiSrcID + 12),
           uiDesID,
           (NiVBSet **)&uiSrcID);
    result = (NiKFMTool::Transition *)(v4 != 0 ? uiSrcID : 0);
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00634800) --------------------------------------------------------
void __thiscall DamageInfoSet::CopyFrom(DamageInfoSet *this, DamageInfoSet *rkSet)
{
  DamageInfoSet *v2; // ebx@1
  NiTListItem<DamageInfo *> *v3; // ecx@1
  DamageInfo *v4; // edi@4
  _DWORD *v5; // eax@4
  _DWORD *v6; // esi@4
  int v7; // eax@4
  _DWORD *v8; // ecx@4
  NiTListItem<DamageInfo *> *kIter; // [sp+Ch] [bp+8h]@4

  v2 = this;
  v3 = rkSet->kDamageList.m_pkHead;
  if ( v3 )
  {
    while ( 1 )
    {
      v4 = v3->m_element;
      kIter = v3->m_pkNext;
      v5 = operator new(0x18u);
      v6 = v5;
      *v5 = *(_DWORD *)&v4->bViewDamage;
      v5[1] = v4->uiDamage;
      v5[2] = *(_DWORD *)&v4->kTargetHandle;
      v5[3] = v4->kTargetRestHP;
      v5[4] = v4->dwHpChangeSeqNo;
      v5[5] = *(_DWORD *)&v4->SeqNum;
      v7 = (int)v2->kDamageList.vfptr->NewItem((NiTListBase<DFALL<DamageInfo *>,DamageInfo *> *)v2);
      *(_DWORD *)(v7 + 8) = v6;
      *(_DWORD *)v7 = 0;
      *(_DWORD *)(v7 + 4) = v2->kDamageList.m_pkTail;
      v8 = &v2->kDamageList.m_pkTail->m_pkNext;
      if ( v8 )
        *v8 = v7;
      else
        v2->kDamageList.m_pkHead = (NiTListItem<DamageInfo *> *)v7;
      ++v2->kDamageList.m_kAllocator.m_uiCount;
      v2->kDamageList.m_pkTail = (NiTListItem<DamageInfo *> *)v7;
      if ( !kIter )
        break;
      v3 = kIter;
    }
  }
}

//----- (00634890) --------------------------------------------------------
AttackSequenceManager *__thiscall AttackSequenceManager::`scalar deleting destructor'(AttackSequenceManager *this, unsigned int a2)
{
  AttackSequenceManager *v2; // esi@1

  v2 = this;
  AttackSequenceManager::~AttackSequenceManager(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006348C0) --------------------------------------------------------
void __thiscall Avatar::~Avatar(Avatar *this)
{
  this->vfptr = (AbStateInfecteeVtbl *)Avatar::`vftable'{for `AbStateInfectee'};
  this->vfptr = (IEffectHolderVtbl *)&Avatar::`vftable'{for `IEffectHolder'};
  this->vfptr = (AttackSequenceManagerVtbl *)&Avatar::`vftable'{for `AttackSequenceManager'};
  Char::~Char((Char *)&this->vfptr);
}
// 9B8B08: using guessed type struct NiActorManager *(__thiscall *Avatar::`vftable'{for `AttackSequenceManager'})(Char *__hidden this);
// 9B8B28: using guessed type int (__stdcall *Avatar::`vftable'{for `IEffectHolder'})(int);
// 9B8B34: using guessed type void (__thiscall *Avatar::`vftable'{for `AbStateInfectee'}[2])(Char *this, AbStateInst *pkAbState, bool bNoVisual);

//----- (006348E0) --------------------------------------------------------
void __thiscall Avatar::AddCartoonLine(Avatar *this, NiNode *pkNode)
{
  CarToonShader *v2; // eax@3
  CarToonShader *v3; // eax@4

  if ( !Char::ms_bEnableCarToon || (unsigned __int8)((int (*)(void))this->vfptr[16].Affect)() )
  {
    v3 = CarToonShader::GetInstance();
    CarToonShader::SetExceptOutLineCartoonShader(v3, pkNode);
  }
  else
  {
    v2 = CarToonShader::GetInstance();
    CarToonShader::SetCartoonShader(v2, pkNode);
  }
}
// A73BA6: using guessed type bool Char::ms_bEnableCarToon;

//----- (00634930) --------------------------------------------------------
void __thiscall Avatar::Avatar(Avatar *this)
{
  Avatar *v1; // esi@1
  NiNode *v2; // eax@1

  v1 = this;
  Char::Char((Char *)&this->vfptr);
  v2 = v1->m_spScene.m_pObject;
  v1->vfptr = (AbStateInfecteeVtbl *)Avatar::`vftable'{for `AbStateInfectee'};
  v1->vfptr = (IEffectHolderVtbl *)&Avatar::`vftable'{for `IEffectHolder'};
  v1->vfptr = (AttackSequenceManagerVtbl *)&Avatar::`vftable'{for `AttackSequenceManager'};
  v2->m_uFlags &= 0xFFFEu;
}
// 9B8B08: using guessed type struct NiActorManager *(__thiscall *Avatar::`vftable'{for `AttackSequenceManager'})(Char *__hidden this);
// 9B8B28: using guessed type int (__stdcall *Avatar::`vftable'{for `IEffectHolder'})(int);
// 9B8B34: using guessed type void (__thiscall *Avatar::`vftable'{for `AbStateInfectee'}[2])(Char *this, AbStateInst *pkAbState, bool bNoVisual);

//----- (00634960) --------------------------------------------------------
void __thiscall Avatar::Update(Avatar *this, float fTime)
{
  Avatar *v2; // esi@1

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->vfptr[18].SetAbStateProperty)(LODWORD(fTime));
  if ( v2->m_spActor.m_pObject )
  {
    if ( v2->m_spScene.m_pObject )
    {
      Char::UpdateEyeBlinking((Char *)&v2->vfptr);
      NiActorManager::Update(v2->m_spActor.m_pObject, fTime);
      NiAVObject::Update((NiAVObject *)&v2->m_spScene.m_pObject->vfptr, fTime, 1);
      ((void (__thiscall *)(_DWORD, _DWORD))v2->vfptr[18].Affect)(v2, LODWORD(fTime));
    }
  }
}

//----- (006349D0) --------------------------------------------------------
void __thiscall Avatar::EquipAll(Avatar *this)
{
  Avatar *v1; // esi@1
  LODNodeInActivate lod; // [sp+8h] [bp-18h]@1
  int v3; // [sp+1Ch] [bp-4h]@1

  v1 = this;
  CharShape::EquipAllAvatar(&this->m_kCharShape);
  lod.m_pCallBack = 0;
  lod.m_nCurLevel = -1;
  lod.vfptr = (Ns_TourSceneVtbl *)&LODNodeInActivate::`vftable';
  v3 = 0;
  Ns_TourScene::TourScene((Ns_TourScene *)&lod.vfptr, v1->m_spScene.m_pObject, &NiAVObject::m_RTTI, 0);
}
// 9B8DF4: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *LODNodeInActivate::`vftable')(LODNodeInActivate *this, struct NiAVObject *fNear, void *);

//----- (00634A40) --------------------------------------------------------
void __thiscall Avatar::UpdateLod(Avatar *this, float fTime)
{
  NiActorManager *v2; // eax@1
  NiBoneLODController *v3; // eax@2

  v2 = this->m_spActor.m_pObject;
  if ( v2 )
  {
    v3 = v2->m_spBoneLOD.m_pObject;
    if ( v3 )
      NiBoneLODController::SetBoneLOD(v3, 0);
  }
}

//----- (00634A60) --------------------------------------------------------
char __thiscall Avatar::ResetView(Avatar *this, PROTO_AVATAR_SHAPE_INFO *p, unsigned int uiFrame)
{
  Avatar *v3; // esi@1
  char v4; // bl@1
  NiNode *v5; // eax@1
  LODNodeInActivate lod; // [sp+Ch] [bp-18h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v3 = this;
  CharShape::SetShapeInfo(&this->m_kCharShape, p);
  v4 = ((int (__thiscall *)(Avatar *, _DWORD, unsigned int))v3->vfptr[18].DeleteAbStateByAbstateIndex)(v3, 0, uiFrame);
  lod.m_pCallBack = 0;
  lod.m_nCurLevel = -1;
  lod.vfptr = (Ns_TourSceneVtbl *)&LODNodeInActivate::`vftable';
  v5 = v3->m_spScene.m_pObject;
  v8 = 0;
  Ns_TourScene::TourScene((Ns_TourScene *)&lod.vfptr, v5, &NiAVObject::m_RTTI, 0);
  return v4;
}
// 9B8DF4: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *LODNodeInActivate::`vftable')(LODNodeInActivate *this, struct NiAVObject *fNear, void *);

//----- (00634B00) --------------------------------------------------------
char __thiscall Avatar::ChangeClassShape(Avatar *this, PROTO_AVATAR_SHAPE_INFO *pkInfo, unsigned int uiFrame)
{
  char result; // al@2

  if ( pkInfo )
    result = Avatar::ResetView(this, pkInfo, uiFrame);
  else
    result = 0;
  return result;
}

//----- (00634B20) --------------------------------------------------------
char __thiscall Avatar::ChangeGenderShape(Avatar *this, PROTO_AVATAR_SHAPE_INFO *pkInfo, unsigned int uiFrame)
{
  char result; // al@2

  if ( pkInfo )
    result = Avatar::ResetView(this, pkInfo, uiFrame);
  else
    result = 0;
  return result;
}

//----- (00634B40) --------------------------------------------------------
char __thiscall Avatar::ChangeFaceTextureShape(Avatar *this, PROTO_AVATAR_SHAPE_INFO *pkInfo)
{
  Avatar *v2; // esi@1
  PROTO_AVATAR_SHAPE_INFO *v3; // edx@1
  char result; // al@2
  unsigned __int8 v5; // cl@3
  NiNode *v6; // ST08_4@15
  LODNodeInActivate lod; // [sp+Ch] [bp-1Ch]@15
  char byFTIndex; // [sp+1Bh] [bp-Dh]@11
  int v9; // [sp+24h] [bp-4h]@15

  v2 = this;
  v3 = pkInfo;
  if ( pkInfo )
  {
    v5 = *(_BYTE *)pkInfo;
    switch ( ((unsigned int)*(_BYTE *)pkInfo >> 2) & 0x1F )
    {
      case 1u:
      case 2u:
      case 3u:
      case 4u:
      case 5u:
        LOBYTE(pkInfo) = 1;
        break;
      case 6u:
      case 7u:
      case 8u:
      case 9u:
      case 0xAu:
        LOBYTE(pkInfo) = 6;
        break;
      case 0xBu:
      case 0xCu:
      case 0xDu:
      case 0xEu:
      case 0xFu:
        LOBYTE(pkInfo) = 11;
        break;
      case 0x10u:
      case 0x11u:
      case 0x12u:
      case 0x13u:
      case 0x14u:
        LOBYTE(pkInfo) = 16;
        break;
      case 0x15u:
      case 0x16u:
      case 0x17u:
      case 0x18u:
      case 0x19u:
        LOBYTE(pkInfo) = 21;
        break;
      case 0x1Au:
      case 0x1Bu:
        LOBYTE(pkInfo) = 26;
        break;
      default:
        LOBYTE(pkInfo) = 0;
        break;
    }
    FaceInfoTab::GetIndex(*((_BYTE *)v3 + 3), (char)pkInfo, v5 >> 7, (char *)&pkInfo + 3, &byFTIndex);
    if ( BYTE3(pkInfo) != -1 )
      v2->m_kCharShape.m_byFaceShapeType = BYTE3(pkInfo);
    if ( byFTIndex != -1 )
      v2->m_kCharShape.m_byFace = byFTIndex;
    CharShape::UpdateFaceShape(&v2->m_kCharShape);
    lod.m_pCallBack = 0;
    lod.m_nCurLevel = -1;
    lod.vfptr = (Ns_TourSceneVtbl *)&LODNodeInActivate::`vftable';
    v6 = v2->m_spScene.m_pObject;
    v9 = 0;
    Ns_TourScene::TourScene((Ns_TourScene *)&lod.vfptr, v6, &NiAVObject::m_RTTI, 0);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9B8DF4: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *LODNodeInActivate::`vftable')(LODNodeInActivate *this, struct NiAVObject *fNear, void *);

//----- (00634CD0) --------------------------------------------------------
char __thiscall Avatar::ChangeHairTypeShape(Avatar *this, PROTO_AVATAR_SHAPE_INFO *pkInfo)
{
  PROTO_AVATAR_SHAPE_INFO *v2; // edi@1
  int v3; // eax@2
  unsigned int v4; // ebx@3
  unsigned int v5; // esi@5
  char result; // al@8
  NiNode *v7; // ST00_4@10
  LODNodeInActivate lod; // [sp+10h] [bp-1Ch]@10
  Avatar *v9; // [sp+1Ch] [bp-10h]@1
  int v10; // [sp+28h] [bp-4h]@10
  char pkInfoa; // [sp+34h] [bp+8h]@2

  v9 = this;
  v2 = pkInfo;
  if ( !pkInfo )
    goto LABEL_8;
  pkInfoa = *((_BYTE *)pkInfo + 1);
  v3 = *(_DWORD *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 56);
  v4 = v3 ? *(_DWORD *)(v3 + 40) : 0;
  v5 = 0;
  if ( !v4 )
    goto LABEL_8;
  while ( *CDataReader::GetRecord((CDataReader *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 4), v5) != pkInfoa )
  {
    if ( ++v5 >= v4 )
      goto LABEL_8;
  }
  if ( CDataReader::GetRecord(
         (CDataReader *)(ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable + 4),
         *((_BYTE *)v2 + 2)) )
  {
    CharShape::MakeHairSet(&v9->m_kCharShape, *((_BYTE *)v2 + 1));
    CharShape::SetHairDetailMap(&v9->m_kCharShape, *((_BYTE *)v2 + 2));
    lod.m_pCallBack = 0;
    lod.m_nCurLevel = -1;
    lod.vfptr = (Ns_TourSceneVtbl *)&LODNodeInActivate::`vftable';
    v7 = v9->m_spScene.m_pObject;
    v10 = 0;
    Ns_TourScene::TourScene((Ns_TourScene *)&lod.vfptr, v7, &NiAVObject::m_RTTI, 0);
    result = 1;
  }
  else
  {
LABEL_8:
    result = 0;
  }
  return result;
}
// 9B8DF4: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *LODNodeInActivate::`vftable')(LODNodeInActivate *this, struct NiAVObject *fNear, void *);
// A88694: using guessed type int ITableBase<HairInfo,HairInfoTab>::ms_pkTable;
// A886A0: using guessed type int ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable;

//----- (00634DD0) --------------------------------------------------------
char __thiscall Avatar::ChangeHairColorShape(Avatar *this, PROTO_AVATAR_SHAPE_INFO *pkInfo)
{
  Avatar *v2; // edi@1
  char result; // al@2

  v2 = this;
  if ( pkInfo
    && CDataReader::GetRecord(
         (CDataReader *)(ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable + 4),
         *((_BYTE *)pkInfo + 2)) )
  {
    CharShape::SetHairDetailMap(&v2->m_kCharShape, *((_BYTE *)pkInfo + 2));
    v2->m_kCharShape.m_byHairColor = *((_BYTE *)pkInfo + 2);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A886A0: using guessed type int ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable;

//----- (00634E20) --------------------------------------------------------
Avatar *__thiscall Avatar::`vector deleting destructor'(char *this, unsigned int a2)
{
  return Avatar::`scalar deleting destructor'((Avatar *)(this - 88), a2);
}

//----- (00634E30) --------------------------------------------------------
Avatar *__thiscall Avatar::`vector deleting destructor'(char *this, unsigned int a2)
{
  return Avatar::`scalar deleting destructor'((Avatar *)(this - 64), a2);
}

//----- (00634E40) --------------------------------------------------------
int __thiscall Ns_TourScene::ProcessData(Ns_TourScene *this, NiAVObject *_pkObject, void *_pData)
{
  Ns_TourScene::TS_RESULT (__cdecl *v3)(NiAVObject *, void *); // eax@1
  int result; // eax@2

  v3 = this->m_pCallBack;
  if ( v3 )
  {
    result = v3(_pkObject, _pData);
  }
  else
  {
    OutputDebugStringA("Is not CallBack Function");
    result = 0;
  }
  return result;
}

//----- (00634E70) --------------------------------------------------------
Avatar *__thiscall Avatar::`scalar deleting destructor'(Avatar *this, unsigned int a2)
{
  Avatar *v2; // esi@1

  v2 = this;
  this->vfptr = (AbStateInfecteeVtbl *)Avatar::`vftable'{for `AbStateInfectee'};
  this->vfptr = (IEffectHolderVtbl *)&Avatar::`vftable'{for `IEffectHolder'};
  this->vfptr = (AttackSequenceManagerVtbl *)&Avatar::`vftable'{for `AttackSequenceManager'};
  Char::~Char((Char *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B8B08: using guessed type struct NiActorManager *(__thiscall *Avatar::`vftable'{for `AttackSequenceManager'})(Char *__hidden this);
// 9B8B28: using guessed type int (__stdcall *Avatar::`vftable'{for `IEffectHolder'})(int);
// 9B8B34: using guessed type void (__thiscall *Avatar::`vftable'{for `AbStateInfectee'}[2])(Char *this, AbStateInst *pkAbState, bool bNoVisual);

//----- (00634EB0) --------------------------------------------------------
void __cdecl FaceInfoTab::GetIndex(unsigned int uiIndex, char kBaseClassID, char ucGender, char *byResultFaceModelInx, char *byResultFaceTexInx)
{
  char *v5; // eax@1

  *byResultFaceModelInx = -1;
  *byResultFaceTexInx = -1;
  v5 = CDataReader::GetRecord((CDataReader *)(ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable + 4), uiIndex);
  if ( v5 )
  {
    switch ( kBaseClassID )
    {
      case 1:
        if ( ucGender )
        {
          *byResultFaceModelInx = v5[34];
          *byResultFaceTexInx = v5[35];
        }
        else
        {
          *byResultFaceModelInx = v5[36];
          *byResultFaceTexInx = v5[37];
        }
        break;
      case 6:
        if ( ucGender )
        {
          *byResultFaceModelInx = v5[38];
          *byResultFaceTexInx = v5[39];
        }
        else
        {
          *byResultFaceModelInx = v5[40];
          *byResultFaceTexInx = v5[41];
        }
        break;
      case 0xB:
        if ( ucGender )
        {
          *byResultFaceModelInx = v5[42];
          *byResultFaceTexInx = v5[43];
        }
        else
        {
          *byResultFaceModelInx = v5[44];
          *byResultFaceTexInx = v5[45];
        }
        break;
      case 0x10:
        if ( ucGender )
        {
          *byResultFaceModelInx = v5[46];
          *byResultFaceTexInx = v5[47];
        }
        else
        {
          *byResultFaceModelInx = v5[48];
          *byResultFaceTexInx = v5[49];
        }
        break;
      case 0x15:
        if ( ucGender )
        {
          *byResultFaceModelInx = v5[50];
          *byResultFaceTexInx = v5[51];
        }
        else
        {
          *byResultFaceModelInx = v5[52];
          *byResultFaceTexInx = v5[53];
        }
        break;
      case 0x1A:
        if ( ucGender )
        {
          *byResultFaceModelInx = v5[54];
          *byResultFaceTexInx = v5[55];
        }
        else
        {
          *byResultFaceModelInx = v5[56];
          *byResultFaceTexInx = v5[57];
        }
        break;
      default:
        return;
    }
  }
}
// A8869C: using guessed type int ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable;

//----- (00635000) --------------------------------------------------------
signed int __stdcall LODNodeInActivate::ProcessData(NiAVObject *_pkObject, void *_pData)
{
  signed int result; // eax@2
  NiRTTI *v4; // eax@3
  NiShader *v5; // eax@7
  NiRangeLODData *v6; // esi@7
  unsigned int v7; // edi@8
  int v8; // ebx@9
  double v9; // st7@13
  int iNumRanges; // [sp+4h] [bp-4h]@8
  float fNear; // [sp+10h] [bp+8h]@10

  if ( _pkObject )
  {
    v4 = (NiRTTI *)((int (__thiscall *)(NiAVObject *))_pkObject->vfptr[1].__vecDelDtor)(_pkObject);
    if ( v4 )
    {
      while ( v4 != &NiLODNode::m_RTTI )
      {
        v4 = v4->m_pkBaseRTTI;
        if ( !v4 )
          return 1;
      }
      v5 = CPostProcessEffect::DynamicCast(&NiRangeLODData::m_RTTI, (NiShader *)LODWORD(_pkObject[1].m_kLocal.m_fScale));
      v6 = (NiRangeLODData *)v5;
      if ( v5 )
      {
        v7 = 0;
        iNumRanges = (int)v5[2].vfptr;
        if ( iNumRanges > 0 )
        {
          v8 = 0;
          do
          {
            fNear = v6->m_pkRanges[v8].m_fNear;
            if ( 0.0 == fNear )
            {
              if ( v7 >= v6->m_uiNumRanges )
                NiRangeLODData::SetNumRanges(v6, v7 + 1);
              v6->m_pkRanges[v8].m_fNear = fNear;
              v9 = 100000000.0;
            }
            else
            {
              if ( v7 >= v6->m_uiNumRanges )
                NiRangeLODData::SetNumRanges(v6, v7 + 1);
              v6->m_pkRanges[v8].m_fNear = 1.0;
              v9 = 0.0;
            }
            v6->m_pkRanges[v8].m_fFar = v9;
            ++v7;
            ++v8;
          }
          while ( (signed int)v7 < iNumRanges );
        }
      }
    }
    result = 1;
  }
  else
  {
    result = -1;
  }
  return result;
}

//----- (006350E0) --------------------------------------------------------
void __thiscall AbStateInst::OnEffectDestory(AbStateInst *this, Effect *pkEffect)
{
  if ( pkEffect )
  {
    if ( pkEffect == this->pkFirstEffect )
      this->pkFirstEffect = 0;
    if ( pkEffect == this->pkLoopingEffect )
      this->pkLoopingEffect = 0;
  }
}

//----- (00635100) --------------------------------------------------------
AbStateInfectee::AbstateColor __thiscall AbStateInfectee::GetAbstateColor(AbStateInfectee *this, unsigned int *a2)
{
  AbStateInfectee::AbstateColor result; // eax@1

  result.dwRGB = (unsigned int)a2;
  *a2 = this->m_kAbstateColor.dwRGB;
  return result;
}

//----- (00635110) --------------------------------------------------------
void __thiscall AbStateInfectee::SetAbStateProperty(AbStateInfectee *this, ABSTATEINDEX eAbstateIndex, bool bVisible, int iCount)
{
  if ( (signed int)eAbstateIndex > 336 )
  {
    if ( eAbstateIndex == 337 )
    {
      this->m_kAbStateProperty.iCantChatStateCount += iCount;
      return;
    }
    if ( eAbstateIndex == 493 )
    {
LABEL_15:
      this->m_kAbStateProperty.bVisible = bVisible;
      return;
    }
    if ( eAbstateIndex != 562 )
      return;
LABEL_14:
    this->m_kAbStateProperty.iKarenCaptivateStateCount += iCount;
    return;
  }
  if ( eAbstateIndex == 336 )
  {
    this->m_kAbStateProperty.iCantHealStateCount += iCount;
    return;
  }
  if ( (signed int)eAbstateIndex > 199 )
  {
    if ( eAbstateIndex != 335 )
      return;
    goto LABEL_14;
  }
  if ( eAbstateIndex == 199 || eAbstateIndex == 75 )
    goto LABEL_15;
  if ( eAbstateIndex == 77 )
    this->m_kAbStateProperty.bTrapVisible = bVisible;
}

//----- (00635190) --------------------------------------------------------
NiTList<AbStateInst *> *__thiscall AbStateInfectee::GetAbStateList(AbStateInfectee *this)
{
  return &this->m_kAbStateList;
}

//----- (006351A0) --------------------------------------------------------
int __thiscall AbStateInfectee::IsVisible(AbStateInfectee *this)
{
  int result; // eax@2

  if ( this->m_kAbStateProperty.bVisible )
  {
    if ( this->m_kAbStateProperty.bTrapVisible )
      result = 1;
    else
      result = Char::GetClass(g_pkMainChar) == 15;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006351D0) --------------------------------------------------------
int __thiscall AbStateInfectee::GetAddCastingTime(AbStateInfectee *this)
{
  return this->m_kAbStateProperty.nAddCastingTime;
}

//----- (006351E0) --------------------------------------------------------
char __stdcall AbStateInfectee::IsHaveActionIndex(SubAbStateInfo *pkSubInfo, SubAbstateAction ActionIndex, int *pVaule)
{
  char result; // al@4

  if ( pkSubInfo->ActionIndexA == ActionIndex )
  {
    if ( pVaule )
      *pVaule = pkSubInfo->ActionArgA;
    result = 1;
  }
  else if ( pkSubInfo->ActionIndexB == ActionIndex )
  {
    if ( pVaule )
      *pVaule = pkSubInfo->ActionArgB;
    result = 1;
  }
  else if ( pkSubInfo->ActionIndexC == ActionIndex )
  {
    if ( pVaule )
      *pVaule = pkSubInfo->ActionArgC;
    result = 1;
  }
  else if ( pkSubInfo->ActionIndexD == ActionIndex )
  {
    if ( pVaule )
      *pVaule = pkSubInfo->ActionArgD;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00635250) --------------------------------------------------------
void __thiscall AbStateInfectee::Update(AbStateInfectee *this, float fTime)
{
  double v2; // st6@1
  double v3; // st6@2
  double v4; // st7@2
  double v5; // rt1@3
  NiTListItem<AbStateInst *> *v6; // edx@4
  double v7; // st5@5
  double v8; // rt2@6
  AbStateInst *v9; // esi@7
  double v10; // rtt@7
  double v11; // st5@7
  double v12; // st6@7
  float fDT; // [sp+8h] [bp+8h]@2

  v2 = fTime;
  if ( this->m_fPrevTime >= 0.0 )
  {
    fDT = v2 - this->m_fPrevTime;
    v5 = v2;
    v3 = 0.0;
    v4 = v5;
  }
  else
  {
    v3 = 0.0;
    v4 = fTime;
    fDT = 0.0;
  }
  v6 = this->m_kAbStateList.m_pkHead;
  if ( v6 )
  {
    v7 = fDT;
    while ( 1 )
    {
      v9 = v6->m_element;
      v10 = v7;
      v11 = v3;
      v12 = v10;
      v6 = v6->m_pkNext;
      if ( v11 <= v9->fLifeTime )
        v9->fLifeTime = v9->fLifeTime - v12;
      if ( !v6 )
        break;
      v8 = v11;
      v7 = v12;
      v3 = v8;
    }
  }
  this->m_fPrevTime = v4;
}

//----- (006352B0) --------------------------------------------------------
char __thiscall AbStateInfectee::IsInList(AbStateInfectee *this, ABSTATEINDEX wIndex)
{
  NiTListItem<AbStateInst *> *v2; // ebx@1
  AbStateInst *v3; // eax@2
  int v4; // edi@3
  int v5; // esi@3
  int *v6; // eax@5
  int v7; // eax@6
  char result; // al@9

  v2 = this->m_kAbStateList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      v2 = v2->m_pkNext;
      if ( v3 )
      {
        v4 = v3->kID;
        v5 = ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
        if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable
                                                              + 16))(
                                ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable,
                                v4) )
        {
          if ( (unsigned __int16)v4 <= *(_WORD *)(v5 + 200) )
          {
            v6 = (int *)(*(_DWORD *)(v5 + 196) + 4 * v4);
            if ( *v6 )
            {
              v7 = *v6;
              if ( v7 )
              {
                if ( wIndex == *(_DWORD *)(v7 + 34) )
                  break;
              }
            }
          }
        }
      }
      if ( !v2 )
        goto LABEL_9;
    }
    result = 1;
  }
  else
  {
LABEL_9:
    result = 0;
  }
  return result;
}
// A8C2A0: using guessed type int ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;

//----- (00635330) --------------------------------------------------------
void __thiscall AbStateInfectee::ClearAbState(AbStateInfectee *this, int bSudden)
{
  AbStateInfectee *v2; // ebx@1
  NiTListItem<AbStateInst *> *v3; // eax@2
  NiTListItem<AbStateInst *> *v4; // ecx@2
  AbStateInst *v5; // edi@5

  v2 = this;
  if ( this->m_kAbStateList.m_kAllocator.m_uiCount )
  {
    do
    {
      v3 = v2->m_kAbStateList.m_pkHead;
      v4 = v3->m_pkNext;
      v2->m_kAbStateList.m_pkHead = v3->m_pkNext;
      if ( v4 )
        v4->m_pkPrev = 0;
      else
        v2->m_kAbStateList.m_pkTail = 0;
      v5 = v3->m_element;
      v2->m_kAbStateList.vfptr->DeleteItem((NiTListBase<DFALL<AbStateInst *>,AbStateInst *> *)&v2->m_kAbStateList, v3);
      --v2->m_kAbStateList.m_kAllocator.m_uiCount;
      v2->vfptr->Deaffect(v2, v5, bSudden);
      if ( v5 )
        v5->vfptr->__vecDelDtor((IEffectDestroyMessenger *)v5, 1u);
    }
    while ( v2->m_kAbStateList.m_kAllocator.m_uiCount );
    v2->m_kAbstateColor.dwRGB = 0;
  }
  else
  {
    this->m_kAbstateColor.dwRGB = 0;
  }
}

//----- (006353B0) --------------------------------------------------------
bool __thiscall AbStateInfectee::FindNomalAbstate(AbStateInfectee *this, ABSTATEINDEX wIndex)
{
  NiTListItem<AbStateInst *> *v2; // ebx@1
  int v3; // esi@2
  int v4; // edi@2
  int *v5; // eax@4
  int v6; // eax@5
  bool result; // al@7

  v2 = this->m_kAbStateList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
      v4 = v2->m_element->kID;
      v2 = v2->m_pkNext;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable,
                              v4) )
      {
        if ( (unsigned __int16)v4 <= *(_WORD *)(v3 + 200) )
        {
          v5 = (int *)(*(_DWORD *)(v3 + 196) + 4 * v4);
          if ( *v5 )
          {
            v6 = *v5;
            if ( v6 )
              break;
          }
        }
      }
      if ( !v2 )
        goto LABEL_7;
    }
    result = *(_DWORD *)(v6 + 34) == wIndex;
  }
  else
  {
LABEL_7:
    result = 0;
  }
  return result;
}
// A8C2A0: using guessed type int ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;

//----- (00635420) --------------------------------------------------------
void __thiscall AbStateInfectee::~AbStateInfectee(AbStateInfectee *this)
{
  AbStateInfectee *v1; // esi@1
  int v2; // edi@1
  NiTListItem<AbStateInst *> **v3; // esi@1
  NiTListItem<AbStateInst *> **v4; // ST00_4@2

  v1 = this;
  this->vfptr = (AbStateInfecteeVtbl *)AbStateInfectee::`vftable';
  AbStateInfectee::ClearAbState(this, 0);
  v2 = (int)&v1->m_kAbStateList;
  v1->m_kAbStateList.vfptr = (NiTListBase<DFALL<AbStateInst *>,AbStateInst *>Vtbl *)&NiTPointerListBase<DFALL<AbStateInst *>,AbStateInst *>::`vftable';
  v3 = &v1->m_kAbStateList.m_pkHead->m_pkNext;
  while ( v3 )
  {
    v4 = v3;
    v3 = (NiTListItem<AbStateInst *> **)*v3;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v2 + 8))(v2, v4);
  }
  *(_DWORD *)(v2 + 12) = 0;
  *(_DWORD *)(v2 + 4) = 0;
  *(_DWORD *)(v2 + 8) = 0;
  *(_DWORD *)v2 = &NiTListBase<DFALL<AbStateInst *>,AbStateInst *>::`vftable';
}
// 9B8E14: using guessed type int (__thiscall *NiTListBase<DFALL<AbStateInst *>,AbStateInst *>::`vftable')(void *p, char);
// 9B8E24: using guessed type int (__thiscall *NiTPointerListBase<DFALL<AbStateInst *>,AbStateInst *>::`vftable')(void *p, char);
// 9B8E44: using guessed type void (__thiscall *AbStateInfectee::`vftable'[2])(AbStateInfectee *this, struct AbStateInst *nValue, bool bNoVisual);

//----- (006354B0) --------------------------------------------------------
void __thiscall AbStateInfectee::DeleteAbState(AbStateInfectee *this, int kID, bool bSudden)
{
  unsigned __int16 v3; // bx@1
  int v4; // esi@1
  AbStateInfectee *v5; // edi@1
  int v6; // ecx@3
  int v7; // eax@4
  PgFrameWork *v8; // eax@6
  CClientGuild *v9; // eax@8
  NiTListItem<AbStateInst *> *v10; // eax@10
  AbStateInst *v11; // esi@11
  NiTListItem<AbStateInst *> *v12; // ebx@15
  int v13; // edi@16
  int v14; // esi@16
  int *v15; // eax@18
  int v16; // eax@19
  char v17; // cl@20
  char v18; // dl@20
  char v19; // al@20
  AbStateInfectee *v20; // [sp+Ch] [bp-4h]@1

  v3 = kID;
  v4 = ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
  v5 = this;
  v20 = this;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable,
                          kID) )
  {
    if ( v3 <= *(_WORD *)(v4 + 200) )
    {
      v6 = *(_DWORD *)(v4 + 196);
      if ( *(_DWORD *)(v6 + 4 * v3) )
      {
        v7 = *(_DWORD *)(v6 + 4 * v3);
        if ( v7 )
        {
          if ( *(_DWORD *)(v7 + 34) == 289 )
          {
            v8 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
            if ( v8 )
              MiniMapWin::ShowGTQuit(*(MiniMapWin **)&v8[15].m_bInit, 0);
            v9 = GuildTask::GetGuild();
            if ( v9 )
              v9->m_bOpserver = 0;
          }
        }
      }
    }
  }
  v10 = v5->m_kAbStateList.m_pkHead;
  if ( v10 )
  {
    while ( 1 )
    {
      v11 = v10->m_element;
      kID = (int)v10;
      v10 = v10->m_pkNext;
      if ( v11->kID == v3 )
        break;
      if ( !v10 )
        goto LABEL_15;
    }
    v5->vfptr->Deaffect(v5, v11, bSudden);
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&v5->m_kAbStateList,
      (void **)&kID);
    v11->vfptr->__vecDelDtor((IEffectDestroyMessenger *)v11, 1u);
  }
LABEL_15:
  v12 = v5->m_kAbStateList.m_pkHead;
  if ( v12 )
  {
    while ( 1 )
    {
      v13 = v12->m_element->kID;
      v14 = ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;
      v12 = v12->m_pkNext;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable,
                              v13) )
      {
        if ( (unsigned __int16)v13 <= *(_WORD *)(v14 + 200) )
        {
          v15 = (int *)(*(_DWORD *)(v14 + 196) + 4 * v13);
          if ( *v15 )
          {
            v16 = *v15;
            if ( v16 )
            {
              v17 = *(_BYTE *)(v16 + 326);
              v18 = *(_BYTE *)(v16 + 327);
              v19 = *(_BYTE *)(v16 + 328);
              kID = 0;
              LOBYTE(kID) = v17;
              BYTE1(kID) = v18;
              BYTE2(kID) = v19;
              if ( kID )
                break;
            }
          }
        }
      }
      if ( !v12 )
      {
        v5 = v20;
        goto LABEL_23;
      }
    }
    v20->m_kAbstateColor.dwRGB = kID;
  }
  else
  {
LABEL_23:
    v5->m_kAbstateColor.dwRGB = 0;
  }
}
// A8C2A0: using guessed type int ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
// A8C2A4: using guessed type int ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;

//----- (00635610) --------------------------------------------------------
void __thiscall AbStateInfectee::AbStateInfectee(AbStateInfectee *this)
{
  this->vfptr = (AbStateInfecteeVtbl *)AbStateInfectee::`vftable';
  this->m_kAbStateList.m_kAllocator.m_uiCount = 0;
  this->m_kAbStateList.m_pkHead = 0;
  this->m_kAbStateList.m_pkTail = 0;
  this->m_kAbStateList.vfptr = (NiTListBase<DFALL<AbStateInst *>,AbStateInst *>Vtbl *)&NiTList<AbStateInst *>::`vftable';
  this->m_fPrevTime = -1.0;
  this->m_kAbStateProperty.iUnAttackableCount = 0;
  this->m_kAbStateProperty.iUnMovableCount = 0;
  this->m_kAbStateProperty.iFearCount = 0;
  this->m_kAbStateProperty.bVisible = 1;
  this->m_kAbStateProperty.bTrapVisible = 1;
  this->m_kAbStateProperty.iKarenCaptivateStateCount = 0;
  this->m_kAbStateProperty.iCantChatStateCount = 0;
  this->m_kAbStateProperty.iCantHealStateCount = 0;
  this->m_kAbStateProperty.nAddCastingTime = 0;
  this->m_kAbstateColor.dwRGB = 0;
}
// 9B8E34: using guessed type int (__thiscall *NiTList<AbStateInst *>::`vftable')(void *p, char);
// 9B8E44: using guessed type void (__thiscall *AbStateInfectee::`vftable'[2])(AbStateInfectee *this, struct AbStateInst *nValue, bool bNoVisual);

//----- (00635660) --------------------------------------------------------
char __thiscall AbStateInfectee::IsInList(AbStateInfectee *this, SubAbstateAction wSAA)
{
  NiTListItem<AbStateInst *> *v2; // ebx@1
  AbStateInst *v3; // eax@2
  int v4; // edi@3
  int v5; // esi@3
  int v6; // eax@4
  int v7; // ecx@7
  SubAbStateInfo *v8; // eax@10
  char result; // al@16

  v2 = this->m_kAbStateList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      v2 = v2->m_pkNext;
      if ( v3 )
      {
        v4 = v3->kID;
        v5 = ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
        if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable
                                                              + 16))(
                                ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable,
                                v4) )
        {
          if ( (unsigned __int16)v4 <= *(_WORD *)(v5 + 200) )
          {
            v7 = *(_DWORD *)(v5 + 196);
            v6 = *(_DWORD *)(v7 + 4 * v4) ? *(_DWORD *)(v7 + 4 * v4) : 0;
          }
          else
          {
            v6 = 0;
          }
        }
        else
        {
          v6 = 0;
        }
        v8 = SubAbStateInfoTab::GetByInxName((char *)(v6 + 212));
        if ( v8 )
        {
          if ( wSAA == v8->ActionIndexA
            || wSAA == v8->ActionIndexB
            || wSAA == v8->ActionIndexC
            || wSAA == v8->ActionIndexD )
          {
            break;
          }
        }
      }
      if ( !v2 )
        goto LABEL_16;
    }
    result = 1;
  }
  else
  {
LABEL_16:
    result = 0;
  }
  return result;
}
// A8C2A0: using guessed type int ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;

//----- (00635700) --------------------------------------------------------
void __thiscall AbStateInfectee::Affect(AbStateInfectee *this, AbStateInst *pkAbState, bool bNoVisual)
{
  int v3; // esi@1
  int v4; // edi@1
  AbStateInfectee *v5; // ebx@1
  int *v6; // eax@3
  int v7; // esi@4
  char *v8; // esi@5
  SubAbStateInfo *v9; // eax@6
  SubState v10; // ecx@12

  v3 = ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
  v4 = pkAbState->kID;
  v5 = this;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable,
                          v4) )
  {
    if ( (unsigned __int16)v4 <= *(_WORD *)(v3 + 200) )
    {
      v6 = (int *)(*(_DWORD *)(v3 + 196) + 4 * v4);
      if ( *v6 )
      {
        v7 = *v6;
        if ( *v6 )
        {
          v5->vfptr->SetAbStateProperty(v5, *(ABSTATEINDEX *)(v7 + 34), 0, 1);
          v8 = (char *)(v7 + 212);
          if ( *v8 != 45 )
          {
            v9 = SubAbStateInfoTab::GetByInxNameAndStrength(v8, pkAbState->uiSubStateStr);
            if ( v9 || (v9 = SubAbStateInfoTab::GetByInxName(v8)) != 0 )
            {
              if ( v9->ActionIndexA == 19
                || v9->ActionIndexB == 19
                || v9->ActionIndexC == 19
                || v9->ActionIndexD == 19
                || (v10 = v9->Type, v10 == 67)
                || v10 == 68 )
              {
                ++v5->m_kAbStateProperty.iUnMovableCount;
              }
              if ( v9->ActionIndexA == 25
                || v9->ActionIndexB == 25
                || v9->ActionIndexC == 25
                || v9->ActionIndexD == 25
                || v9->Type == 67 )
              {
                ++v5->m_kAbStateProperty.iUnAttackableCount;
              }
              if ( v9->ActionIndexA == 38 || v9->ActionIndexB == 38 || v9->ActionIndexC == 38 || v9->ActionIndexD == 38 )
                ++v5->m_kAbStateProperty.iFearCount;
              pkAbState = 0;
              if ( AbStateInfectee::IsHaveActionIndex(v9, SAA_CASTINGTIMEPLUS, (int *)&pkAbState) == 1 )
                v5->m_kAbStateProperty.nAddCastingTime += (int)pkAbState;
            }
          }
        }
      }
    }
  }
}
// A8C2A0: using guessed type int ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;

//----- (00635830) --------------------------------------------------------
void __thiscall AbStateInfectee::Deaffect(AbStateInfectee *this, AbStateInst *pkAbState, bool bSudden)
{
  int v3; // esi@1
  int v4; // edi@1
  AbStateInfectee *v5; // ebx@1
  int *v6; // eax@3
  int v7; // esi@4
  char *v8; // esi@5
  SubAbStateInfo *v9; // eax@6
  SubState v10; // ecx@12
  bool v11; // zf@27
  bool v12; // sf@27
  AbStateInst **v13; // ecx@27

  v3 = ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
  v4 = pkAbState->kID;
  v5 = this;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable,
                          v4) )
  {
    if ( (unsigned __int16)v4 <= *(_WORD *)(v3 + 200) )
    {
      v6 = (int *)(*(_DWORD *)(v3 + 196) + 4 * v4);
      if ( *v6 )
      {
        v7 = *v6;
        if ( *v6 )
        {
          v5->vfptr->SetAbStateProperty(v5, *(ABSTATEINDEX *)(v7 + 34), 1, -1);
          v8 = (char *)(v7 + 212);
          if ( *v8 != 45 )
          {
            v9 = SubAbStateInfoTab::GetByInxNameAndStrength(v8, pkAbState->uiSubStateStr);
            if ( v9 || (v9 = SubAbStateInfoTab::GetByInxName(v8)) != 0 )
            {
              if ( v9->ActionIndexA == 19
                || v9->ActionIndexB == 19
                || v9->ActionIndexC == 19
                || v9->ActionIndexD == 19
                || (v10 = v9->Type, v10 == 67)
                || v10 == 68 )
              {
                --v5->m_kAbStateProperty.iUnMovableCount;
              }
              if ( v9->ActionIndexA == 25
                || v9->ActionIndexB == 25
                || v9->ActionIndexC == 25
                || v9->ActionIndexD == 25
                || v9->Type == 67 )
              {
                --v5->m_kAbStateProperty.iUnAttackableCount;
              }
              if ( v9->ActionIndexA == 38 || v9->ActionIndexB == 38 || v9->ActionIndexC == 38 || v9->ActionIndexD == 38 )
                --v5->m_kAbStateProperty.iFearCount;
              pkAbState = 0;
              if ( AbStateInfectee::IsHaveActionIndex(v9, SAA_CASTINGTIMEPLUS, (int *)&pkAbState) == 1 )
              {
                v5->m_kAbStateProperty.nAddCastingTime -= (int)pkAbState;
                v11 = v5->m_kAbStateProperty.nAddCastingTime == 0;
                v12 = v5->m_kAbStateProperty.nAddCastingTime < 0;
                pkAbState = 0;
                v13 = (AbStateInst **)&v5->m_kAbStateProperty.nAddCastingTime;
                if ( v12 || v11 )
                  v13 = &pkAbState;
                v5->m_kAbStateProperty.nAddCastingTime = (int)*v13;
              }
            }
          }
        }
      }
    }
  }
}
// A8C2A0: using guessed type int ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;

//----- (00635970) --------------------------------------------------------
AbStateInst *__thiscall AbStateInfectee::FindAbstateInstBySubAbstateType(AbStateInfectee *this, SubState eType)
{
  NiTListItem<AbStateInst *> *v2; // ebx@1
  int v3; // esi@2
  AbStateInst *v4; // eax@2
  int v5; // edi@2
  int v6; // ecx@4
  int v7; // eax@5
  char *v8; // esi@6
  SubAbStateInfo *v9; // eax@7
  AbStateInst *result; // eax@10
  AbStateInst *pkState; // [sp+Ch] [bp-4h]@2

  v2 = this->m_kAbStateList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
      v4 = v2->m_element;
      v5 = v4->kID;
      v2 = v2->m_pkNext;
      pkState = v4;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable,
                              v5) )
      {
        if ( (unsigned __int16)v5 <= *(_WORD *)(v3 + 200) )
        {
          v6 = *(_DWORD *)(v3 + 196);
          if ( *(_DWORD *)(v6 + 4 * v5) )
          {
            v7 = *(_DWORD *)(v6 + 4 * v5);
            if ( v7 )
            {
              v8 = (char *)(v7 + 212);
              if ( strcmp((const char *)(v7 + 212), "-") )
              {
                v9 = SubAbStateInfoTab::GetByInxName(v8);
                if ( v9 )
                {
                  if ( v9->Type == eType )
                    break;
                }
              }
            }
          }
        }
      }
      if ( !v2 )
        goto LABEL_10;
    }
    result = pkState;
  }
  else
  {
LABEL_10:
    result = 0;
  }
  return result;
}
// A8C2A0: using guessed type int ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;

//----- (00635A30) --------------------------------------------------------
char __thiscall AbStateInfectee::SubAbIsInList(AbStateInfectee *this, SubState subType)
{
  NiTListItem<AbStateInst *> *v2; // ebx@1
  int v3; // esi@2
  int v4; // edi@2
  int *v5; // eax@4
  int v6; // eax@5
  SubAbStateInfo *v7; // eax@6
  char result; // al@10

  v2 = this->m_kAbStateList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
      v4 = v2->m_element->kID;
      v2 = v2->m_pkNext;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable,
                              v4) )
      {
        if ( (unsigned __int16)v4 <= *(_WORD *)(v3 + 200) )
        {
          v5 = (int *)(*(_DWORD *)(v3 + 196) + 4 * v4);
          if ( *v5 )
          {
            v6 = *v5;
            if ( v6 )
            {
              v7 = SubAbStateInfoTab::GetByInxName((char *)(v6 + 212));
              if ( v7 )
              {
                if ( v7->InxName[0] != 45 && v7->Type == subType )
                  break;
              }
            }
          }
        }
      }
      if ( !v2 )
        goto LABEL_10;
    }
    result = 1;
  }
  else
  {
LABEL_10:
    result = 0;
  }
  return result;
}
// A8C2A0: using guessed type int ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;

//----- (00635AC0) --------------------------------------------------------
char __thiscall AbStateInfectee::AddAbState(AbStateInfectee *this, int kID, float fLifeTime, int bNoVisual)
{
  int v4; // ebx@1
  int v5; // esi@1
  int (__thiscall *v6)(int, int); // edx@1
  AbStateInst *v7; // edi@1
  int v8; // eax@5
  int v9; // edi@5
  int v10; // esi@8
  int v11; // ecx@10
  NiTListItem<AbStateInst *> *v12; // eax@14
  AbStateInst *v13; // esi@15
  AbStateInst *v14; // eax@17
  AbStateInst *v15; // esi@17
  PgFrameWork *v16; // eax@21
  CClientGuild *v17; // eax@23
  AbStateInfectee *v19; // [sp+Ch] [bp-8h]@1
  AbStateInst *pkState; // [sp+10h] [bp-4h]@1
  AbnormalStateInfo *pkAbstateInfo; // [sp+1Ch] [bp+8h]@2
  AbStateInfectee::AbstateColor kColor; // [sp+20h] [bp+Ch]@26

  v4 = kID;
  v5 = ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
  v6 = *(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable + 16);
  v19 = this;
  v7 = 0;
  pkState = 0;
  if ( !(unsigned __int8)v6(ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable, kID) )
  {
    pkAbstateInfo = 0;
    goto LABEL_14;
  }
  if ( (unsigned __int16)kID > *(_WORD *)(v5 + 200) )
  {
    pkAbstateInfo = 0;
    goto LABEL_14;
  }
  v8 = *(_DWORD *)(v5 + 196);
  v9 = 4 * (unsigned __int16)kID;
  if ( *(_DWORD *)(v8 + v9) )
  {
    pkAbstateInfo = *(AbnormalStateInfo **)(v8 + v9);
    if ( pkAbstateInfo )
    {
      v10 = ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable,
                              v4) )
      {
        if ( (unsigned __int16)v4 <= *(_WORD *)(v10 + 200) )
        {
          v11 = *(_DWORD *)(v10 + 196);
          if ( *(_DWORD *)(v9 + v11) )
          {
            v7 = *(AbStateInst **)(v9 + v11);
            goto LABEL_14;
          }
        }
      }
      pkState = 0;
    }
  }
  else
  {
    pkAbstateInfo = 0;
  }
  v7 = pkState;
LABEL_14:
  v12 = v19->m_kAbStateList.m_pkHead;
  if ( v12 )
  {
    while ( 1 )
    {
      v13 = v12->m_element;
      v12 = v12->m_pkNext;
      if ( v13->kID == (_WORD)v4 )
        break;
      if ( !v12 )
        goto LABEL_17;
    }
    v13->fLifeTime = fLifeTime;
    if ( v7 && v7[3].acLastEffectName[1] == 1 )
    {
      v19->vfptr->Deaffect(v19, v13, 0);
      v19->vfptr->Affect(v19, v13, bNoVisual);
      return 1;
    }
  }
  else
  {
LABEL_17:
    v14 = (AbStateInst *)operator new(0x74u);
    v15 = 0;
    if ( v14 )
    {
      v14->m_pkEffectDestoryMessengerList.m_kAllocator.m_uiCount = 0;
      v14->m_pkEffectDestoryMessengerList.m_pkHead = 0;
      v14->m_pkEffectDestoryMessengerList.m_pkTail = 0;
      v14->m_pkEffectDestoryMessengerList.vfptr = (NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>Vtbl *)&NiTList<IEffectDestroyMessenger *>::`vftable';
      v14->pkFirstEffect = 0;
      v14->pkLoopingEffect = 0;
      v14->vfptr = (IEffectDestroyMessengerVtbl *)&AbStateInst::`vftable';
      v15 = v14;
    }
    v15->kID = v4;
    v15->fLifeTime = fLifeTime;
    v15->pkFirstEffect = 0;
    v15->pkLoopingEffect = 0;
    v15->acLastEffectName[0] = 0;
    pkState = v15;
    v15->uiSubStateStr = 0;
    if ( pkAbstateInfo && pkAbstateInfo->AbStataIndex == 289 )
    {
      v16 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v16 )
        MiniMapWin::ShowGTQuit(*(MiniMapWin **)&v16[15].m_bInit, 1);
      v17 = GuildTask::GetGuild();
      if ( v17 )
        v17->m_bOpserver = 1;
    }
    v19->vfptr->Affect(v19, v15, bNoVisual);
    if ( v7 )
    {
      kColor.dwRGB = v7[2].acLastEffectName[46];
      kColor.byG = v7[2].acLastEffectName[47];
      kColor.byB = v7[2].acLastEffectName[48];
      if ( kColor.dwRGB )
        v19->m_kAbstateColor = kColor;
      if ( !strcmp((const char *)&v7[4].pkFirstEffect + 2, "BUFF") )
      {
        NiTPointerListBase<DFALL<AbStateInst *>,AbStateInst *>::AddHead(
          (NiTPointerListBase<DFALL<AbStateInst *>,AbStateInst *> *)&v19->m_kAbStateList.vfptr,
          &pkState);
        return 1;
      }
      if ( !strcmp((const char *)&v7[4].pkFirstEffect + 2, "DEBUFF") )
        NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v19->m_kAbStateList,
          (NiD3DXEffectParameter *const *)&pkState);
    }
  }
  return 1;
}
// 9B6D60: using guessed type int (__thiscall *NiTList<IEffectDestroyMessenger *>::`vftable')(void *p, char);
// 9B8E68: using guessed type int (__thiscall *AbStateInst::`vftable')(void *p, char);
// A8C2A0: using guessed type int ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
// A8C2A4: using guessed type int ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;

//----- (00635D30) --------------------------------------------------------
void __thiscall AbStateInfectee::HasAbStateAction(AbStateInfectee *this, std::list<AbnormalStateViewInfo *,std::allocator<AbnormalStateViewInfo *> > *lstAAction)
{
  NiTListItem<AbStateInst *> *v2; // eax@1
  std::list<AbnormalStateViewInfo *,std::allocator<AbnormalStateViewInfo *> > *v3; // ebx@2
  AbStateInst *v4; // eax@4
  int v5; // edi@5
  int v6; // esi@5
  AbnormalStateViewInfo *v7; // eax@6
  int v8; // edx@9
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v9; // esi@14
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v10; // eax@14
  unsigned int v11; // ecx@14
  AbnormalStateViewInfo *pkInfo; // [sp+0h] [bp-4h]@1
  NiTListItem<AbStateInst *> *kIter; // [sp+Ch] [bp+8h]@4

  pkInfo = (AbnormalStateViewInfo *)this;
  v2 = this->m_kAbStateList.m_pkHead;
  if ( v2 )
  {
    v3 = lstAAction;
    while ( 1 )
    {
      kIter = v2->m_pkNext;
      v4 = v2->m_element;
      if ( v4 )
      {
        v5 = v4->kID;
        v6 = ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;
        if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable
                                                              + 16))(
                                ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable,
                                v5) )
        {
          if ( (unsigned __int16)v5 <= *(_WORD *)(v6 + 200) )
          {
            v8 = *(_DWORD *)(v6 + 196);
            v7 = (AbnormalStateViewInfo *)(*(_DWORD *)(v8 + 4 * v5) ? *(_DWORD *)(v8 + 4 * v5) : 0);
          }
          else
          {
            v7 = 0;
          }
        }
        else
        {
          v7 = 0;
        }
        pkInfo = v7;
        if ( v7 )
        {
          if ( v7->AniIndex[0] != 45 )
          {
            v9 = (std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *)v3->_Myhead;
            v10 = std::_List_val<char *,std::allocator<char *>>::_Buynode(
                    (std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *)v3->_Myhead,
                    (std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *)v3->_Myhead->_Prev,
                    (ItemViewDummy *const *)&pkInfo);
            v11 = v3->_Mysize;
            if ( 1073741822 - v11 < 1 )
              std::_Xlength_error("list<T> too long");
            v3->_Mysize = v11 + 1;
            v9->_Prev = v10;
            v10->_Prev->_Next = v10;
          }
        }
      }
      if ( !kIter )
        break;
      v2 = kIter;
    }
  }
}
// A8C2A4: using guessed type int ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;

//----- (00635E00) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<AbStateInst *>,AbStateInst *>::~NiTListBase<DFALL<AbStateInst *>,AbStateInst *>(NiTListBase<DFALL<AbStateInst *>,AbStateInst *> *this)
{
  this->vfptr = (NiTListBase<DFALL<AbStateInst *>,AbStateInst *>Vtbl *)&NiTListBase<DFALL<AbStateInst *>,AbStateInst *>::`vftable';
}
// 9B8E14: using guessed type int (__thiscall *NiTListBase<DFALL<AbStateInst *>,AbStateInst *>::`vftable')(void *p, char);

//----- (00635E10) --------------------------------------------------------
NiTListBase<DFALL<AbStateInst *>,AbStateInst *> *__thiscall NiTListBase<DFALL<AbStateInst *>,AbStateInst *>::`vector deleting destructor'(NiTListBase<DFALL<AbStateInst *>,AbStateInst *> *this, unsigned int a2)
{
  NiTListBase<DFALL<AbStateInst *>,AbStateInst *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<AbStateInst *>,AbStateInst *>Vtbl *)&NiTListBase<DFALL<AbStateInst *>,AbStateInst *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9B8E14: using guessed type int (__thiscall *NiTListBase<DFALL<AbStateInst *>,AbStateInst *>::`vftable')(void *p, char);

//----- (00635E40) --------------------------------------------------------
void __thiscall NiTPointerListBase<DFALL<AbStateInst *>,AbStateInst *>::AddHead(NiTPointerListBase<DFALL<AbStateInst *>,AbStateInst *> *this, AbStateInst *const *element)
{
  NiTPointerListBase<DFALL<AbStateInst *>,AbStateInst *> *v2; // esi@1
  int v3; // eax@1
  NiTListItem<AbStateInst *> *v4; // ecx@1

  v2 = this;
  v3 = ((int (*)(void))this->vfptr->NewItem)();
  *(AbStateInst **)(v3 + 8) = *element;
  *(_DWORD *)(v3 + 4) = 0;
  *(_DWORD *)v3 = v2->m_pkHead;
  v4 = v2->m_pkHead;
  if ( v4 )
  {
    v4->m_pkPrev = (NiTListItem<AbStateInst *> *)v3;
    ++v2->m_kAllocator.m_uiCount;
    v2->m_pkHead = (NiTListItem<AbStateInst *> *)v3;
  }
  else
  {
    ++v2->m_kAllocator.m_uiCount;
    v2->m_pkTail = (NiTListItem<AbStateInst *> *)v3;
    v2->m_pkHead = (NiTListItem<AbStateInst *> *)v3;
  }
}

//----- (00635E90) --------------------------------------------------------
NiD3DShaderInterface *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *this, void **kPos)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *v2; // esi@1
  NiTListItem<NiD3DShaderInterface *> *v3; // eax@1
  NiTListItem<NiD3DShaderInterface *> *v4; // ecx@2
  NiTListItem<NiD3DShaderInterface *> *v5; // eax@2
  NiD3DShaderInterface *v6; // edi@3
  NiD3DShaderInterface *result; // eax@3
  void (__thiscall *v8)(NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *, NiTListItem<NiD3DShaderInterface *> *); // eax@4
  NiD3DShaderInterface *v9; // edi@4
  NiTListItem<NiD3DShaderInterface *> *v10; // ecx@6
  NiTListItem<NiD3DShaderInterface *> *v11; // eax@6
  NiD3DShaderInterface *v12; // edi@7
  void (__thiscall *v13)(NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *, NiTListItem<NiD3DShaderInterface *> *); // eax@8
  NiD3DShaderInterface *v14; // edi@8
  NiTListItem<NiD3DShaderInterface *> **v15; // edi@9
  NiTListItem<NiD3DShaderInterface *> **v16; // edx@9
  NiD3DShaderInterface *v17; // edi@13

  v2 = this;
  v3 = (NiTListItem<NiD3DShaderInterface *> *)*kPos;
  if ( *kPos == this->m_pkHead )
  {
    *kPos = v3->m_pkNext;
    v4 = this->m_pkHead;
    v5 = v4->m_pkNext;
    v2->m_pkHead = v4->m_pkNext;
    if ( v5 )
    {
      v5->m_pkPrev = 0;
      v6 = v4->m_element;
      v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)v2, v4);
      --v2->m_kAllocator.m_uiCount;
      result = v6;
    }
    else
    {
      v8 = v2->vfptr->DeleteItem;
      v2->m_pkTail = 0;
      v9 = v4->m_element;
      v8((NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&v2->vfptr, v4);
      --v2->m_kAllocator.m_uiCount;
      result = v9;
    }
  }
  else if ( v3 == this->m_pkTail )
  {
    *kPos = 0;
    v10 = this->m_pkTail;
    v11 = v10->m_pkPrev;
    v2->m_pkTail = v11;
    if ( v11 )
    {
      v11->m_pkNext = 0;
      v12 = v10->m_element;
      v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)v2, v10);
      --v2->m_kAllocator.m_uiCount;
      result = v12;
    }
    else
    {
      v13 = v2->vfptr->DeleteItem;
      v2->m_pkHead = 0;
      v14 = v10->m_element;
      v13((NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&v2->vfptr, v10);
      --v2->m_kAllocator.m_uiCount;
      result = v14;
    }
  }
  else
  {
    v15 = &v3->m_pkPrev->m_pkNext;
    v16 = &v3->m_pkNext->m_pkNext;
    *kPos = v3->m_pkNext;
    if ( v15 )
      *v15 = (NiTListItem<NiD3DShaderInterface *> *)v16;
    if ( v16 )
      v16[1] = (NiTListItem<NiD3DShaderInterface *> *)v15;
    v17 = v3->m_element;
    this->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)this, v3);
    --v2->m_kAllocator.m_uiCount;
    result = v17;
  }
  return result;
}

//----- (00635F70) --------------------------------------------------------
NiTList<AbStateInst *> *__thiscall NiTList<AbStateInst *>::`scalar deleting destructor'(NiTList<AbStateInst *> *this, unsigned int a2)
{
  NiTList<AbStateInst *> *v2; // edi@1
  NiTListItem<AbStateInst *> *v3; // esi@1
  NiTListItem<AbStateInst *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<AbStateInst *>,AbStateInst *>Vtbl *)&NiTPointerListBase<DFALL<AbStateInst *>,AbStateInst *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<DFALL<AbStateInst *>,AbStateInst *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<AbStateInst *>,AbStateInst *>Vtbl *)&NiTListBase<DFALL<AbStateInst *>,AbStateInst *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B8E14: using guessed type int (__thiscall *NiTListBase<DFALL<AbStateInst *>,AbStateInst *>::`vftable')(void *p, char);
// 9B8E24: using guessed type int (__thiscall *NiTPointerListBase<DFALL<AbStateInst *>,AbStateInst *>::`vftable')(void *p, char);

//----- (00636000) --------------------------------------------------------
void __thiscall NiTList<AbStateInst *>::~NiTList<AbStateInst *>(NiTList<AbStateInst *> *this)
{
  NiTList<AbStateInst *> *v1; // edi@1
  NiTListItem<AbStateInst *> *v2; // esi@1
  NiTListItem<AbStateInst *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<DFALL<AbStateInst *>,AbStateInst *>Vtbl *)&NiTPointerListBase<DFALL<AbStateInst *>,AbStateInst *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<DFALL<AbStateInst *>,AbStateInst *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<DFALL<AbStateInst *>,AbStateInst *>Vtbl *)&NiTListBase<DFALL<AbStateInst *>,AbStateInst *>::`vftable';
}
// 9B8E14: using guessed type int (__thiscall *NiTListBase<DFALL<AbStateInst *>,AbStateInst *>::`vftable')(void *p, char);
// 9B8E24: using guessed type int (__thiscall *NiTPointerListBase<DFALL<AbStateInst *>,AbStateInst *>::`vftable')(void *p, char);

//----- (00636080) --------------------------------------------------------
SubAbStateInfo *__cdecl SubAbStateInfoTab::GetByInxNameAndStrength(char *pcInxName, int nStr)
{
  SubAbStateInfo *result; // eax@4
  unsigned int v3; // edi@5

  if ( pcInxName && *pcInxName && nStr )
  {
    v3 = 0;
    if ( ITableBase<SubAbStateInfo,SubAbStateInfoTab>::GetTotal() )
    {
      while ( strcmp(
                CDataReader::GetRecord(
                  (CDataReader *)(ITableBase<SubAbStateInfo,SubAbStateInfoTab>::ms_pkTable + 4),
                  v3)
              + 2,
                pcInxName)
           || *(_DWORD *)(CDataReader::GetRecord(
                            (CDataReader *)(ITableBase<SubAbStateInfo,SubAbStateInfoTab>::ms_pkTable + 4),
                            v3)
                        + 34) != nStr )
      {
        if ( ++v3 >= ITableBase<SubAbStateInfo,SubAbStateInfoTab>::GetTotal() )
          goto LABEL_9;
      }
      result = (SubAbStateInfo *)CDataReader::GetRecord(
                                   (CDataReader *)(ITableBase<SubAbStateInfo,SubAbStateInfoTab>::ms_pkTable + 4),
                                   v3);
    }
    else
    {
LABEL_9:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C2A8: using guessed type int ITableBase<SubAbStateInfo,SubAbStateInfoTab>::ms_pkTable;

//----- (00636130) --------------------------------------------------------
AbStateInfectee *__thiscall AbStateInfectee::`scalar deleting destructor'(AbStateInfectee *this, unsigned int a2)
{
  AbStateInfectee *v2; // esi@1

  v2 = this;
  AbStateInfectee::~AbStateInfectee(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00636160) --------------------------------------------------------
IEffectDestroyMessenger *__thiscall AbStateInst::`scalar deleting destructor'(IEffectDestroyMessenger *this, unsigned int a2)
{
  IEffectDestroyMessenger *v2; // esi@1

  v2 = this;
  IEffectDestroyMessenger::~IEffectDestroyMessenger(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00636190) --------------------------------------------------------
void __cdecl Char::SetDefWalkSpeed(float fSpeed)
{
  Char::ms_fDefaultWalkSpeed = fSpeed;
}
// A96A54: using guessed type float Char::ms_fDefaultWalkSpeed;

//----- (006361A0) --------------------------------------------------------
void __cdecl Char::SetDefRunSpeed(float fSpeed)
{
  Char::ms_fDefaultRunSpeed = fSpeed;
}
// A96A58: using guessed type float Char::ms_fDefaultRunSpeed;

//----- (006361B0) --------------------------------------------------------
double __cdecl Char::GetDefWalkSpeed()
{
  return Char::ms_fDefaultWalkSpeed;
}
// A96A54: using guessed type float Char::ms_fDefaultWalkSpeed;

//----- (006361C0) --------------------------------------------------------
double __cdecl Char::GetDefRunSpeed()
{
  return Char::ms_fDefaultRunSpeed;
}
// A96A58: using guessed type float Char::ms_fDefaultRunSpeed;

//----- (006361D0) --------------------------------------------------------
void __thiscall Char::InitViewInfo(Char *this, PROTO_AVATAR_SHAPE_INFO *pkShape, PROTO_EQUIPMENT *pkEquip)
{
  Char *v3; // esi@1

  v3 = this;
  if ( pkShape )
    CharShape::SetShapeInfo(&this->m_kCharShape, pkShape);
  if ( pkEquip )
    CharShape::SetEquipInfo(&v3->m_kCharShape, pkEquip);
}

//----- (00636230) --------------------------------------------------------
int __stdcall Char::CheckOscillationTime(float fLastTime)
{
  return -1;
}

//----- (00636240) --------------------------------------------------------
NiActorManager *__thiscall Char::GetNowSequence(Char *this)
{
  Char *v1; // esi@1
  unsigned int v2; // edi@1
  NiActorManager *result; // eax@2

  v1 = this;
  v2 = Char::GetAniCode(this, 0, 0, 0);
  if ( ((int (__thiscall *)(_DWORD))v1->vfptr[13].DeleteAbStateByAbstateIndex)(v1) == 4 )
    result = Char::GetSequence(v1, v1->m_uiLayerAniCode[0]);
  else
    result = Char::GetSequence(v1, v2);
  return result;
}

//----- (00636280) --------------------------------------------------------
double Char::GetHitTime()
{
  return 1.0;
}

//----- (00636290) --------------------------------------------------------
void __thiscall Char::EquipAll(Char *this)
{
  CharShape::EquipAll(&this->m_kCharShape);
}

//----- (006362A0) --------------------------------------------------------
void __thiscall Char::ResetEquip(Char *this)
{
  CharShape::EquipAll(&this->m_kCharShape);
}

//----- (006362B0) --------------------------------------------------------
int __thiscall Char::ResetView(Char *this)
{
  return ((int (__stdcall *)(_DWORD, _DWORD))this->vfptr[18].DeleteAbStateByAbstateIndex)(1, 0);
}

//----- (006362C0) --------------------------------------------------------
Char::EmotionState __thiscall Char::GetEmotionState(Char *this)
{
  return this->m_eEmotionState;
}

//----- (006362D0) --------------------------------------------------------
void __thiscall Char::SetEmotionState(Char *this, Char::EmotionState eState)
{
  Char *v2; // esi@1

  v2 = this;
  ((void (*)(void))this->vfptr[13].Deaffect)();
  v2->m_eEmotionState = eState;
}

//----- (006362F0) --------------------------------------------------------
bool __userpurge Char::PauseEmotion@<al>(Char *this@<ecx>, double a2@<st0>, bool bSetTime, float fPauseTime)
{
  Char::EmotionState v4; // edx@1
  bool result; // al@5

  v4 = this->m_eEmotionState;
  if ( v4 == EMOTION_NONE || v4 == 4 )
    goto LABEL_12;
  if ( bSetTime )
  {
    a2 = fPauseTime;
    if ( fPauseTime >= 0.0 )
      return (unsigned __int8)((int (__stdcall *)(_DWORD))this->vfptr[13].SetAbStateProperty)(LODWORD(fPauseTime)) != 0;
  }
  if ( v4 != 2 && (((void (*)(void))this->vfptr[12].~AbStateInfectee)(), a2 >= 0.0) )
    result = 1;
  else
LABEL_12:
    result = 0;
  return result;
}

//----- (00636360) --------------------------------------------------------
Char *__thiscall Char::GetAttackTargetChar(Char *this)
{
  return CharMgr::GetChar(&g_kCharMgr, this->m_AttackTargetHandle);
}

//----- (00636390) --------------------------------------------------------
signed int __thiscall Char::GetEquipWeaponType(Char *this)
{
  signed int result; // eax@2

  switch ( CharShape::Get3thAniEventCodeByWeapon(&this->m_kCharShape) )
  {
    case 20:
    case 30:
    case 40:
    case 60:
    case 70:
    case 80:
      result = 3;
      break;
    case 10:
    case 50:
      result = 2;
      break;
    case 90:
      result = 4;
      break;
    default:
      result = 6;
      break;
  }
  return result;
}

//----- (00636440) --------------------------------------------------------
bool __thiscall Char::GetReserveSkillSmash(Char *this)
{
  return this->m_bReserveSkillSmash;
}

//----- (00636450) --------------------------------------------------------
Char *__thiscall Char::GetChar(Char *this)
{
  return (Char *)((char *)this - 88);
}

//----- (00636460) --------------------------------------------------------
void __thiscall Char::SetAnimationSpeed(Char *this, float fSpeed)
{
  *(float *)&this->m_kCharShape.m_SpactralGlowEffect.m_kShaderName1._Bx._Alias[8] = fSpeed;
}

//----- (00636470) --------------------------------------------------------
unsigned __int16 __thiscall AttackSequenceManager::GetLastTargetHandle(AttackSequenceManager *this)
{
  return this->m_kLastTargetHandle;
}

//----- (00636480) --------------------------------------------------------
ItemInfo *__thiscall Char::GetEquippedWeaponItemInfo(Char *this)
{
  return CharShape::GetEquippedWeaponItemInfo(&this->m_kCharShape);
}

//----- (00636490) --------------------------------------------------------
void __thiscall Char::SetCharTitleName(Char *this, const char *cName)
{
  sprintf(this->m_CharTitleName, "%s", cName);
}

//----- (006364B0) --------------------------------------------------------
bool __thiscall Char::GetSkillTargetGroundPoint(Char *this, unsigned int *x, unsigned int *y)
{
  *x = this->m_dwGroundSkillTargetPointX;
  *y = this->m_dwGroundSkillTargetPointY;
  return this->m_bGroundSkillTargetPointSetted != 0;
}

//----- (006364E0) --------------------------------------------------------
void __thiscall Char::SetSkillTargetGroundPoint(Char *this, unsigned int x, unsigned int y, bool bPosSetting)
{
  this->m_dwGroundSkillTargetPointX = x;
  this->m_dwGroundSkillTargetPointY = y;
  this->m_bGroundSkillTargetPointSetted = bPosSetting;
}

//----- (00636510) --------------------------------------------------------
void __thiscall Char::ResetSkillTargetGroundPoint(Char *this)
{
  this->m_bGroundSkillTargetPointSetted = 0;
}

//----- (00636520) --------------------------------------------------------
void __thiscall Char::RestoreEquipState(Char *this)
{
  Char *v1; // esi@1
  unsigned __int16 v2; // ax@13
  unsigned __int16 v3; // ax@15

  v1 = this;
  if ( this->m_kTargetResourceHandle != -1 )
  {
    if ( this->m_kEquippedBackup.bUnEquipLeftHand )
      CharShape::UnEquip(&this->m_kCharShape, 0xAu);
    if ( v1->m_kEquippedBackup.bUnEquipRightHand )
      CharShape::UnEquip(&v1->m_kCharShape, 0xCu);
    if ( v1->m_kEquippedBackup.bUnEquipLeftHandAcc )
      CharShape::UnEquip(&v1->m_kCharShape, 0xBu);
    if ( v1->m_kEquippedBackup.bUnEquipRightHandAcc )
      CharShape::UnEquip(&v1->m_kCharShape, 0xDu);
    if ( v1->m_kEquippedBackup.bUnEquipShieldAcc )
      CharShape::UnEquip(&v1->m_kCharShape, 0x1Du);
    if ( v1->m_kEquippedBackup.iBackupCase == 1 )
    {
      v2 = v1->m_kEquippedBackup.kCase1.kPrevRightHandEquipItemID;
      if ( v2 != -1 )
      {
        CharShape::Equip(&v1->m_kCharShape, v2, v1->m_kEquippedBackup.kCase1.byPrevRightHandUpgrade);
        v1->m_kEquippedBackup.kCase1.kPrevRightHandEquipItemID = -1;
      }
      v3 = v1->m_kEquippedBackup.kCase1.kPrevLeftHandEquipItemID;
      if ( v3 != -1 )
      {
        CharShape::Equip(&v1->m_kCharShape, v3, v1->m_kEquippedBackup.kCase1.byPrevLeftHandUpgrade);
        v1->m_kEquippedBackup.kCase1.kPrevLeftHandEquipItemID = -1;
      }
      if ( v1->m_kEquippedBackup.kCase1.kPrevRightHandAccItemID != -1 )
      {
        CharShape::Equip(&v1->m_kCharShape, v1->m_kEquippedBackup.kCase1.kPrevRightHandAccItemID);
        v1->m_kEquippedBackup.kCase1.kPrevRightHandAccItemID = -1;
      }
      if ( v1->m_kEquippedBackup.kCase1.kPrevLeftHandAccItemID != -1 )
      {
        CharShape::Equip(&v1->m_kCharShape, v1->m_kEquippedBackup.kCase1.kPrevLeftHandAccItemID);
        v1->m_kEquippedBackup.kCase1.kPrevLeftHandAccItemID = -1;
      }
      if ( v1->m_kEquippedBackup.kCase1.kPrevShieldAccItemID != -1 )
      {
        CharShape::Equip(&v1->m_kCharShape, v1->m_kEquippedBackup.kCase1.kPrevShieldAccItemID);
        v1->m_kEquippedBackup.kCase1.kPrevShieldAccItemID = -1;
      }
    }
    v1->m_kTargetResourceHandle = -1;
  }
}

//----- (006366A0) --------------------------------------------------------
bool __thiscall Char::IsResource(Char *this)
{
  Char *v1; // esi@1
  MobInfo *v2; // eax@2
  MobType v3; // eax@3
  bool result; // al@8

  v1 = this;
  result = 0;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[1].Affect)() )
  {
    v2 = v1->m_pMobinfo;
    if ( v2 )
    {
      v3 = v2->Type;
      if ( v3 == 8 || v3 == 10 || v3 == 9 || v3 == 22 || v3 == 21 )
        result = 1;
    }
  }
  return result;
}

//----- (006366E0) --------------------------------------------------------
void __thiscall Char::SetCampSignBoard(Char *this, STREETBOOTH_SIGNBOARD stBoard, bool bIsSell)
{
  Char *v3; // eax@1
  char *v4; // edi@1
  bool v5; // cl@1

  v3 = this;
  stBoard.signboard[29] = 0;
  qmemcpy(&this->m_stSignboard, &stBoard, 0x1Cu);
  v4 = &this->m_stSignboard.signboard[28];
  v5 = bIsSell;
  *(_WORD *)v4 = *(_WORD *)&stBoard.signboard[28];
  v3->m_bIsSell = v5;
}

//----- (00636710) --------------------------------------------------------
void __thiscall Char::SetCharTitleUse(Char *this, bool bUse)
{
  this->m_bUseCharTitle = bUse;
}

//----- (00636720) --------------------------------------------------------
void __thiscall Char::HpUpdate(Char *this, unsigned __int16 wHpUpdateSeqNo, unsigned int dwHp)
{
  Char *v3; // esi@1
  unsigned int v4; // ecx@1
  int v5; // edi@2
  bool v6; // zf@2

  v3 = this;
  v4 = this->m_dwCurrHpUpdateSeqNo;
  if ( v4 == -65536 )
  {
    v5 = dwHp;
    v3->m_dwCurrHpUpdateSeqNo = wHpUpdateSeqNo;
    v6 = v3 == g_pkMainChar;
    goto LABEL_10;
  }
  if ( v4 > 0xEA60 && wHpUpdateSeqNo < 0x2710u )
  {
    v5 = dwHp;
    v3->m_dwCurrHpUpdateSeqNo = wHpUpdateSeqNo;
    v6 = v3 == g_pkMainChar;
    goto LABEL_10;
  }
  if ( wHpUpdateSeqNo > v4 || (++v3->m_dwHpUpdateSkipCount, v3->m_dwHpUpdateSkipCount > 4) )
  {
    v5 = dwHp;
    v3->m_dwCurrHpUpdateSeqNo = wHpUpdateSeqNo;
    if ( v3 != g_pkMainChar )
    {
LABEL_12:
      ((void (__thiscall *)(_DWORD, _DWORD))v3->vfptr[4].Affect)(v3, v5);
      goto LABEL_13;
    }
    v6 = Char::CheckActState(v3, 500000) == 0;
LABEL_10:
    if ( v6 )
      User::SetHP(&g_kUser, v5);
    goto LABEL_12;
  }
LABEL_13:
  v3->m_dwHpUpdateSkipCount = 0;
}

//----- (006367E0) --------------------------------------------------------
void __thiscall Char::InitHpUpdate(Char *this)
{
  this->m_dwCurrHpUpdateSeqNo = -65536;
}

//----- (006367F0) --------------------------------------------------------
char __thiscall Char::CheckEyelidByAction(Char *this)
{
  Char *v1; // esi@1
  char result; // al@3
  unsigned int ui1stCode; // [sp+8h] [bp-4h]@1

  v1 = this;
  Char::GetAniCode(this, 0, &ui1stCode, 0);
  if ( ui1stCode != 400000 && ui1stCode != 500000 )
  {
    result = 0;
  }
  else
  {
    CharShape::EnableEyeShape(&v1->m_kCharShape, 17);
    result = 1;
    v1->m_stBlinkingInfo.byState = 1;
  }
  return result;
}

//----- (00636840) --------------------------------------------------------
bool __thiscall Char::IsEnableSpectral(Char *this)
{
  return CharShape::IsSpactralGlowEnable(&this->m_kCharShape);
}

//----- (00636850) --------------------------------------------------------
char __thiscall Char::SetEnanleSpectral(Char *this, bool bEnable)
{
  return CharShape::SetSPactralGlowEnable(&this->m_kCharShape, bEnable);
}

//----- (00636870) --------------------------------------------------------
MobInfo *__thiscall Char::GetMobInfo(Char *this)
{
  return this->m_pMobinfo;
}

//----- (00636880) --------------------------------------------------------
void __thiscall Char::TOTHpUpdate(Char *this, unsigned __int16 wHpUpdateSeqNo, unsigned int dwHp)
{
  Char *v3; // esi@1
  unsigned int v4; // ecx@1
  unsigned int v5; // eax@2
  bool (__thiscall *v6)(AbStateInfectee *, ABSTATEINDEX, float, bool); // edx@3

  v3 = this;
  v4 = this->m_dwTOTCurrHpUpdateSeqNo;
  if ( v4 == -65536 )
  {
    v5 = wHpUpdateSeqNo;
LABEL_3:
    v6 = v3->vfptr[5].AddAbStateByAbstateIndex;
    v3->m_dwTOTCurrHpUpdateSeqNo = v5;
    ((void (__thiscall *)(_DWORD, _DWORD))v6)(v3, dwHp);
    v3->m_dwTOTHpUpdateSkipCount = 0;
    return;
  }
  if ( v4 > 0xEA60 && wHpUpdateSeqNo < 0x2710u )
  {
    v5 = wHpUpdateSeqNo;
    goto LABEL_3;
  }
  if ( wHpUpdateSeqNo > v4 || (++v3->m_dwTOTHpUpdateSkipCount, v3->m_dwHpUpdateSkipCount > 4) )
  {
    v3->m_dwTOTCurrHpUpdateSeqNo = wHpUpdateSeqNo;
    ((void (__thiscall *)(_DWORD, _DWORD))v3->vfptr[5].AddAbStateByAbstateIndex)(v3, dwHp);
  }
  v3->m_dwTOTHpUpdateSkipCount = 0;
}

//----- (00636920) --------------------------------------------------------
void __thiscall Char::InitTOTHpUpdate(Char *this)
{
  this->m_dwTOTCurrHpUpdateSeqNo = -65536;
}

//----- (00636930) --------------------------------------------------------
void __thiscall Char::SetHP(Char *this, int iHP)
{
  Char *v2; // esi@1
  unsigned int v3; // eax@3
  int v4; // eax@8

  v2 = this;
  if ( !Char::CheckActState(this, 500000) )
  {
    if ( v2 == g_pkMainChar )
      v3 = User::MaxHP(&g_kUser);
    else
      v3 = ((int (__thiscall *)(_DWORD))v2->vfptr[3].Deaffect)(v2);
    if ( iHP && (iHP != v3 || v2->m_iHP != v3) )
    {
      v4 = v2->m_iHP;
      if ( v4 != iHP )
      {
        v2->m_iPrevHP = v4;
        v2->m_iHP = iHP;
      }
    }
    else
    {
      v2->m_iPrevHP = iHP;
      v2->m_iHP = iHP;
    }
  }
}

//----- (006369A0) --------------------------------------------------------
bool __thiscall Char::IsDash(Char *this)
{
  return 0.0 != this->m_fSaveCharSpeed;
}

//----- (006369C0) --------------------------------------------------------
void __thiscall Char::EnablePolymorph(Char *this, bool b)
{
  this->m_bPolymorph = b;
}

//----- (006369D0) --------------------------------------------------------
double __thiscall Char::GetCharZPos(Char *this, float fSec)
{
  float zero_speed_sec; // ST00_4@1
  double v3; // st7@1
  double v4; // st6@1
  double result; // st7@2
  float fSeca; // [sp+Ch] [bp+8h]@4
  float fSecb; // [sp+Ch] [bp+8h]@6
  float fSecc; // [sp+Ch] [bp+8h]@7

  zero_speed_sec = this->m_fSpeed / this->m_fAcceleration;
  v3 = zero_speed_sec;
  v4 = fSec;
  if ( fSec < v3 + v3 )
  {
    if ( v4 >= v3 )
    {
      if ( v4 <= v3 )
      {
        fSecc = v3 * (this->m_fAcceleration * 0.5 * v3);
        result = fSecc;
      }
      else
      {
        fSecb = v3 * (v3 * (this->m_fAcceleration * 0.5)) - (v3 - v4) * (this->m_fAcceleration * 0.5 * (v3 - v4));
        result = fSecb;
      }
    }
    else
    {
      fSeca = v4 * this->m_fSpeed - fSec * (this->m_fAcceleration * 0.5 * fSec);
      result = fSeca;
    }
  }
  else
  {
    result = 0.0;
  }
  return result;
}

//----- (00636A90) --------------------------------------------------------
double __stdcall Char::GetJustSideDistance(Char *pkTargetChar)
{
  int v2; // edi@3
  int v3; // esi@3
  int *v4; // eax@5
  int v5; // eax@6
  double result; // st7@7
  Char *pkTargetChara; // [sp+10h] [bp+8h]@7

  if ( pkTargetChar
    && (unsigned __int8)((int (__thiscall *)(Char *))pkTargetChar->vfptr[1].Affect)(pkTargetChar)
    && (v2 = pkTargetChar->m_kCharShape.m_kMobID,
        v3 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
        (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 16))(
                           ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                           v2))
    && (unsigned __int16)v2 <= *(_WORD *)(v3 + 200)
    && (v4 = (int *)(*(_DWORD *)(v3 + 196) + 4 * v2), *v4)
    && (v5 = *v4) != 0 )
  {
    *(float *)&pkTargetChara = (double)*(unsigned int *)(v5 + 104) * 50.0 / 1000.0;
    result = *(float *)&pkTargetChara;
  }
  else
  {
    result = 50.0;
  }
  return result;
}
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;

//----- (00636B20) --------------------------------------------------------
double __stdcall Char::GetSkillableDistance(Char *pkTargetChar, int kSkillID)
{
  int v3; // esi@1
  int *v4; // eax@3
  int v5; // edi@4
  MobInfo *v6; // eax@7
  double result; // st7@8

  v3 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                          kSkillID)
    && (unsigned __int16)kSkillID <= *(_WORD *)(v3 + 200)
    && (v4 = (int *)(*(_DWORD *)(v3 + 196) + 4 * (unsigned __int16)kSkillID), *v4)
    && (v5 = *v4) != 0 )
  {
    if ( pkTargetChar )
    {
      if ( !(unsigned __int8)((int (__thiscall *)(Char *))pkTargetChar->vfptr[1].Affect)(pkTargetChar) )
        return (float)((double)*(unsigned int *)(v5 + 180) + 50.0);
      v6 = IIDTableBase<MobInfo,MobInfoTab,unsigned short>::GetByID(pkTargetChar->m_kCharShape.m_kMobID);
      if ( v6 )
        return (float)((double)v6->AbsoluteSize * 50.0 / 1000.0 + (double)*(unsigned int *)(v5 + 180));
    }
    result = (double)*(unsigned int *)(v5 + 180);
  }
  else
  {
    result = 50.0;
  }
  return result;
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (00636C30) --------------------------------------------------------
char __thiscall Char::IsUpdate(Char *this)
{
  char result; // al@1

  result = 1;
  if ( !this->m_bIsUpdate )
  {
    if ( this->m_spScene.m_pObject->m_uFlags & 1 )
      result = 0;
  }
  return result;
}

//----- (00636C50) --------------------------------------------------------
void __thiscall Char::UpdateDirection(Char *this, float fTime)
{
  Char *v2; // ebx@1
  NiPoint3 *v3; // eax@3
  NiMatrix3 kRot; // [sp+Ch] [bp-24h]@3

  v2 = this;
  if ( !(unsigned __int8)((int (*)(void))this->vfptr[1].AddAbStateByAbstateIndex)() )
  {
    NpNs_SmoothRotateControler::Update(&v2->m_kSmoothRotater, fTime);
    if ( ((int (__thiscall *)(_DWORD))v2->vfptr[13].DeleteAbStateByAbstateIndex)(v2) != 4 )
    {
      v3 = (NiPoint3 *)Wml::Segment3<double>::Direction((Wml::Segment3<double> *)&v2->m_kSmoothRotater);
      if ( Math3D::VectToZRot(v3, &kRot) )
        qmemcpy(&v2->m_spScene.m_pObject->m_kLocal, &kRot, 0x24u);
      qmemcpy(&v2->m_spScene.m_pObject->m_kLocal, &kRot, 0x24u);
    }
    DirectionControllers::Update(v2->m_spDirectionCtrls.m_pObject, fTime);
  }
}

//----- (00636CF0) --------------------------------------------------------
bool __thiscall Char::IsOscillationTime(Char *this)
{
  Char *v1; // esi@1
  bool result; // al@2
  unsigned int v3; // eax@3
  NiActorManager *v4; // eax@3
  double v5; // st7@5
  void (__thiscall *v6)(AbStateInfectee *); // eax@5
  unsigned int uiFirstCode; // [sp+8h] [bp-8h]@3
  float v8; // [sp+Ch] [bp-4h]@5

  v1 = this;
  if ( this->m_spActor.m_pObject
    && (v3 = Char::GetAniCode(this, 0, &uiFirstCode, 0), (v4 = Char::GetSequence(v1, v3)) != 0)
    && v4->m_pkCurSequence == (NiControllerSequence *)1 )
  {
    v5 = v4->m_fTransEndTime;
    v6 = v1->vfptr[19].~AbStateInfectee;
    v8 = v5;
    result = ((int (__thiscall *)(Char *, _DWORD))v6)(v1, LODWORD(v8)) != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00636D50) --------------------------------------------------------
bool __thiscall Char::IsAniState(Char *this, NiControllerSequence::AnimState e)
{
  Char *v2; // esi@1
  unsigned int v3; // edi@1
  NiActorManager *v4; // eax@2
  bool result; // al@5

  v2 = this;
  v3 = Char::GetAniCode(this, 0, 0, 0);
  if ( ((int (__thiscall *)(Char *))v2->vfptr[13].DeleteAbStateByAbstateIndex)(v2) == 4 )
    v4 = Char::GetSequence(v2, v2->m_uiLayerAniCode[0]);
  else
    v4 = Char::GetSequence(v2, v3);
  if ( v4 )
    result = (NiControllerSequence *)e == v4->m_pkCurSequence;
  else
    result = 0;
  return result;
}

//----- (00636DA0) --------------------------------------------------------
bool __thiscall Char::IsShakeCondition(Char *this, OscTarget eCondition)
{
  Char *v2; // esi@1
  bool result; // al@8

  v2 = this;
  switch ( eCondition )
  {
    case 1:
    case 5:
      if ( this->m_bUserCharacter != 1
        || (Party::GetMemberInfo(&g_kParty, this->m_kHandle) || !g_kParty.m_uiTotalMember)
        && (!Party::GetMemberInfo(&g_kParty, v2->m_kHandle) || g_kParty.m_uiTotalMember)
        && v2->m_kHandle != g_pkMainChar->m_kHandle )
      {
        goto LABEL_12;
      }
      result = 0;
      break;
    case 2:
    case 6:
      if ( Party::GetMemberInfo(&g_kParty, this->m_kHandle) && g_kParty.m_uiTotalMember )
        goto LABEL_12;
      result = v2->m_kHandle == g_pkMainChar->m_kHandle;
      break;
    default:
LABEL_12:
      result = 1;
      break;
  }
  return result;
}

//----- (00636E80) --------------------------------------------------------
int __stdcall Char::FindShnIndex(NiTextKey *pkKey, unsigned int KeyNum, float fEffectTime)
{
  unsigned int v4; // ebx@1
  int v5; // ecx@1
  double v6; // st7@2
  double v7; // st4@5
  int result; // eax@9
  float TimeGap; // [sp+18h] [bp+Ch]@7

  v4 = KeyNum;
  v5 = 0;
  if ( KeyNum )
  {
    v6 = fEffectTime;
    while ( 1 )
    {
      if ( strlen(pkKey[v5].m_pText) == 2 )
      {
        v7 = pkKey[v5].m_fTime >= v6 ? pkKey[v5].m_fTime - v6 : v6 - pkKey[v5].m_fTime;
        TimeGap = v7;
        if ( TimeGap >= 0.0 && TimeGap <= 0.00009999999747378752 )
          break;
      }
      if ( ++v5 >= v4 )
        goto LABEL_11;
    }
    result = atoi(pkKey[v5].m_pText);
  }
  else
  {
LABEL_11:
    result = 0;
  }
  return result;
}

//----- (00636F20) --------------------------------------------------------
void __thiscall Char::ResetView(Char *this, PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *p)
{
  Char *v2; // esi@1
  NiNode *v3; // eax@4
  char v4; // al@4
  ActionViewInfo *v5; // eax@5
  AbStateInfecteeVtbl *v6; // edx@7
  AbStateInfecteeVtbl *v7; // eax@8
  char v8; // [sp+4h] [bp-Ch]@2
  PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *pa; // [sp+18h] [bp+8h]@6

  v2 = this;
  if ( p )
  {
    v8 = p->mode;
    if ( p->mode == 4 )
    {
      Char::SetMode(this, 4);
      v7 = v2->vfptr;
      v2->m_bIsChangeCampMode = 1;
      v2->m_byMiniHouseSkinID = p->shapedata.notcamp.equip.Equ_Head;
      ((void (__thiscall *)(_DWORD, _DWORD))v7[1].GetAbstateColor)(v2, p);
    }
    else if ( p->mode == 5 )
    {
      Char::SetMode(this, v8);
      v6 = v2->vfptr;
      v2->m_bIsChangeCampMode = 1;
      v2->m_byMiniHouseSkinID = p->shapedata.notcamp.equip.Equ_Head;
      ((void (__thiscall *)(_DWORD, _DWORD))v6[1].GetAbstateColor)(v2, p);
      v2->m_bIsSell = p->shapedata.booth.issell != 0;
    }
    else
    {
      Char::SetMode(this, v8);
      v3 = v2->m_spScene.m_pObject;
      v2->m_bIsChangeCampMode = 1;
      v3->m_uFlags |= 1u;
      v4 = p->emoticon.emoticonid;
      if ( v4 != -1 )
      {
        v5 = IIDTableBase<ActionViewInfo,ActionViewTable,unsigned short>::GetByID((unsigned __int8)v4);
        if ( v5 )
        {
          ((void (__thiscall *)(_DWORD, _DWORD))v2->vfptr[14].Deaffect)(v2, v5->nIndex);
          *(float *)&pa = (double)p->emoticon.emoticonframe / 1000.0;
          ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v2->vfptr[14].IsVisible)(v2, 1, pa);
        }
      }
    }
  }
}

//----- (00637020) --------------------------------------------------------
void __thiscall Char::StartFadeIn(Char *this)
{
  Char *v1; // esi@1
  NiNode *v2; // ecx@1
  NiRTTI *v3; // eax@2

  v1 = this;
  v2 = this->m_spScene.m_pObject;
  if ( v2 )
  {
    v3 = (NiRTTI *)((int (*)(void))v2->vfptr[1].__vecDelDtor)();
    if ( v3 )
    {
      while ( v3 != &NsFadeNode::m_RTTI )
      {
        v3 = v3->m_pkBaseRTTI;
        if ( !v3 )
        {
          v1->m_pOldParent = 0;
          return;
        }
      }
      NsFadeNode::Start((NsFadeNode *)v1->m_spScene.m_pObject, v1->m_fAnimationUpdateTime, 0);
    }
  }
  v1->m_pOldParent = 0;
}

//----- (00637080) --------------------------------------------------------
void __thiscall Char::StartFadeOut(Char *this)
{
  Char *v1; // esi@1
  NiNode *v2; // ecx@1
  NiRTTI *v3; // eax@2

  v1 = this;
  v2 = this->m_spScene.m_pObject;
  if ( v2 )
  {
    v3 = (NiRTTI *)((int (*)(void))v2->vfptr[1].__vecDelDtor)();
    if ( v3 )
    {
      while ( v3 != &NsFadeNode::m_RTTI )
      {
        v3 = v3->m_pkBaseRTTI;
        if ( !v3 )
        {
          v1->m_pOldParent = 0;
          return;
        }
      }
      NsFadeNode::Start((NsFadeNode *)v1->m_spScene.m_pObject, v1->m_fAnimationUpdateTime, 1);
    }
  }
  v1->m_pOldParent = 0;
}

//----- (006370E0) --------------------------------------------------------
bool __thiscall Char::IsFade(Char *this)
{
  Char *v1; // esi@1
  NiNode *v2; // ecx@1
  NiRTTI *v3; // eax@2
  bool result; // al@5

  v1 = this;
  v2 = this->m_spScene.m_pObject;
  if ( v2 && (v3 = (NiRTTI *)((int (*)(void))v2->vfptr[1].__vecDelDtor)()) != 0 )
  {
    while ( v3 != &NsFadeNode::m_RTTI )
    {
      v3 = v3->m_pkBaseRTTI;
      if ( !v3 )
        goto LABEL_5;
    }
    result = LODWORD(v1->m_spScene.m_pObject[1].m_kWorld.m_Rotate.m_pEntry[1][2]) != 0;
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (00637120) --------------------------------------------------------
bool __thiscall Char::IsFadeIn(Char *this)
{
  Char *v1; // esi@1
  NiNode *v2; // ecx@1
  NiRTTI *v3; // eax@2
  bool result; // al@5

  v1 = this;
  v2 = this->m_spScene.m_pObject;
  if ( v2 && (v3 = (NiRTTI *)((int (*)(void))v2->vfptr[1].__vecDelDtor)()) != 0 )
  {
    while ( v3 != &NsFadeNode::m_RTTI )
    {
      v3 = v3->m_pkBaseRTTI;
      if ( !v3 )
        goto LABEL_5;
    }
    result = LODWORD(v1->m_spScene.m_pObject[1].m_kWorld.m_Rotate.m_pEntry[1][2]) == 1;
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (00637160) --------------------------------------------------------
bool __thiscall Char::IsFadeOut(Char *this)
{
  Char *v1; // esi@1
  NiNode *v2; // ecx@1
  NiRTTI *v3; // eax@2
  bool result; // al@5

  v1 = this;
  v2 = this->m_spScene.m_pObject;
  if ( v2 && (v3 = (NiRTTI *)((int (*)(void))v2->vfptr[1].__vecDelDtor)()) != 0 )
  {
    while ( v3 != &NsFadeNode::m_RTTI )
    {
      v3 = v3->m_pkBaseRTTI;
      if ( !v3 )
        goto LABEL_5;
    }
    result = LODWORD(v1->m_spScene.m_pObject[1].m_kWorld.m_Rotate.m_pEntry[1][2]) == 2;
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (006371A0) --------------------------------------------------------
void __thiscall Char::FadeInfoReset(Char *this)
{
  Char *v1; // esi@1
  NiNode *v2; // ecx@1
  NiRTTI *v3; // eax@2

  v1 = this;
  v2 = this->m_spScene.m_pObject;
  if ( v2 )
  {
    v3 = (NiRTTI *)((int (*)(void))v2->vfptr[1].__vecDelDtor)();
    if ( v3 )
    {
      while ( v3 != &NsFadeNode::m_RTTI )
      {
        v3 = v3->m_pkBaseRTTI;
        if ( !v3 )
          return;
      }
      LOBYTE(v1->m_spScene.m_pObject[1].vfptr) = 0;
    }
  }
}

//----- (006371E0) --------------------------------------------------------
bool __thiscall Char::IsMob(Char *this)
{
  bool result; // al@2
  char v2; // al@3

  if ( this->m_bUserCharacter || (v2 = this->m_byMode, v2 == 4) )
    result = 0;
  else
    result = v2 != 5;
  return result;
}

//----- (00637200) --------------------------------------------------------
bool __thiscall Char::IsNPC(Char *this)
{
  bool result; // al@2
  char v2; // al@5
  MobInfo *v3; // ecx@7

  if ( this->m_byType == 4 )
  {
    result = 1;
  }
  else if ( this->m_bUserCharacter || (v2 = this->m_byMode, v2 == 4) || v2 == 5 || (v3 = this->m_pMobinfo) == 0 )
  {
    result = 0;
  }
  else
  {
    result = v3->IsNPC != 0;
  }
  return result;
}

//----- (00637240) --------------------------------------------------------
bool __thiscall Char::IsLinkGate(Char *this)
{
  Char *v1; // esi@1
  char v2; // al@3
  MobInfo *v3; // eax@5
  MobViewInfo *v4; // esi@8
  bool result; // al@10

  v1 = this;
  result = 0;
  if ( this->m_byType == 4
    || !this->m_bUserCharacter && (v2 = this->m_byMode, v2 != 4) && v2 != 5 && (v3 = this->m_pMobinfo) != 0 && v3->IsNPC )
  {
    if ( (unsigned __int8)((int (*)(void))this->vfptr[1].Affect)() )
    {
      v4 = v1->m_pMobViewInfo;
      if ( v4 )
      {
        if ( v4->MiniMapIcon == 5 )
          result = 1;
      }
    }
  }
  return result;
}

//----- (006372A0) --------------------------------------------------------
unsigned int __thiscall Char::GetLv(Char *this)
{
  Char *v1; // esi@1
  MobInfo *v2; // eax@2
  unsigned int result; // eax@3

  v1 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[1].Affect)() && (v2 = v1->m_pMobinfo) != 0 )
    result = v2->Level;
  else
    result = 1;
  return result;
}

//----- (006372D0) --------------------------------------------------------
void __thiscall Char::ChangeWalkAnimationSpeed(Char *this, float fFreq)
{
  Char *v2; // esi@1
  int v3; // eax@2
  NiActorManager *v4; // eax@2

  v2 = this;
  if ( this->m_spActor.m_pObject )
  {
    v3 = ((int (__stdcall *)(_DWORD, _DWORD))this->vfptr[15].Affect)(200000, 1000);
    v4 = Char::GetSequence(v2, v3 + 201000);
    if ( v4 )
      *(float *)&v4->m_bBuildTimeline = fFreq;
  }
}

//----- (00637310) --------------------------------------------------------
void __thiscall Char::ChangeRunAnimationSpeed(Char *this, float fFreq)
{
  Char *v2; // esi@1
  int v3; // eax@2
  NiActorManager *v4; // eax@2

  v2 = this;
  if ( this->m_spActor.m_pObject )
  {
    v3 = ((int (__stdcall *)(_DWORD, _DWORD))this->vfptr[15].Affect)(200000, 2000);
    v4 = Char::GetSequence(v2, v3 + 202000);
    if ( v4 )
      *(float *)&v4->m_bBuildTimeline = fFreq;
  }
}

//----- (00637350) --------------------------------------------------------
unsigned int __thiscall Char::GetCurEmotionCode(Char *this)
{
  NiActorManager *v1; // edx@2
  unsigned int result; // eax@3

  if ( this->m_eEmotionState == EMOTION_NONE
    || (v1 = this->m_spActor.m_pObject) == 0
    || (result = this->m_uiCurEmotionCode, result != v1->m_eCurID) )
  {
    result = -1;
  }
  return result;
}

//----- (00637380) --------------------------------------------------------
double __thiscall Char::GetPausedEmotionFrame(Char *this)
{
  NiActorManager *v1; // edx@1
  double result; // st7@2
  NiActorManager *v3; // eax@5

  v1 = this->m_spActor.m_pObject;
  if ( v1
    && this->m_uiCurEmotionCode == v1->m_eCurID
    && this->m_eEmotionState == 2
    && (v3 = Char::GetSequence(this, this->m_uiCurEmotionCode)) != 0 )
  {
    result = v3->m_fTransEndTime;
  }
  else
  {
    result = -3.4028235e38;
  }
  return result;
}

//----- (006373C0) --------------------------------------------------------
signed int __thiscall Char::GetWeaponType(Char *this)
{
  Char *v1; // esi@1
  MobInfo *v2; // esi@2
  signed int result; // eax@3
  ItemInfo *v4; // eax@5

  v1 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[1].Affect)() )
  {
    v2 = v1->m_pMobinfo;
    if ( v2 )
      result = v2->WeaponType;
    else
      result = 1;
  }
  else
  {
    v4 = CharShape::GetEquippedWeaponItemInfo(&v1->m_kCharShape);
    if ( v4 )
      result = v4->WeaponType;
    else
      result = 7;
  }
  return result;
}

//----- (00637410) --------------------------------------------------------
NiActorManager *__thiscall Char::GetActor(Char *this)
{
  return *(NiActorManager **)&this->m_acLinkGateName[18];
}

//----- (00637420) --------------------------------------------------------
void __thiscall Char::SetAnimationOffset(Char *this, float fOffset)
{
  Char *v2; // edi@1
  unsigned int v3; // eax@2
  NiActorManager *v4; // eax@2

  v2 = this;
  if ( *(_DWORD *)&this->m_acLinkGateName[18] )
  {
    v3 = Char::GetAniCode((Char *)((char *)this - 88), 0, 0, 0);
    v4 = Char::GetSequence((Char *)((char *)v2 - 88), v3);
    if ( v4 )
      *(float *)&v4->m_eNextID = fOffset
                               - *(float *)&v2->m_kCharShape.m_SpactralGlowEffect.m_kShaderName1._Bx._Alias[12];
  }
}

//----- (00637460) --------------------------------------------------------
void __thiscall Char::AddPrivateStoreBD(Char *this)
{
  ScreenBDMgr::AddPrivateStoreBD(&g_kScrnBDMgr, this->m_kHandle);
}

//----- (00637480) --------------------------------------------------------
void __usercall Char::RemovePrivateStoreBD(Char *this@<ecx>, int a2@<edi>)
{
  PrivateStoreBD *v2; // eax@1

  v2 = ScreenBDMgr::GetPrivateStoreBD(&g_kScrnBDMgr, this->m_kHandle);
  ScreenBDMgr::RemovePrivateStoreBD(&g_kScrnBDMgr, a2, v2);
}

//----- (006374A0) --------------------------------------------------------
char *__thiscall Char::GetLinkGateName(Char *this)
{
  Char *v1; // esi@1
  bool v2; // zf@1
  char *result; // eax@1

  v1 = this;
  v2 = Char::IsLinkGate(this) == 0;
  result = v1->m_acLinkGateName;
  if ( v2 )
    result = (char *)&unk_9B8E83;
  return result;
}

//----- (006374C0) --------------------------------------------------------
void __thiscall Char::SetLinkGateName(Char *this, char *pcLinkGateName)
{
  Char *v2; // esi@1

  v2 = this;
  if ( Char::IsLinkGate(this) )
    strcpy(v2->m_acLinkGateName, pcLinkGateName);
}

//----- (006374F0) --------------------------------------------------------
void __usercall Char::UpdateWeaponEquipState(Char *this@<ecx>, int a2@<ebx>)
{
  Char *v2; // esi@1
  unsigned __int16 v3; // ax@12
  int v4; // eax@14
  int v5; // edi@15
  int v6; // ebx@15
  int v7; // edi@16
  int v8; // edx@19
  int v9; // edi@22

  v2 = this;
  if ( this->m_kAttackEquipBackup.iBackupCase )
  {
    if ( this->m_kAttackEquipBackup.bUnEquipLeftHand )
      CharShape::UnEquip(&this->m_kCharShape, 0xAu);
    if ( v2->m_kAttackEquipBackup.bUnEquipRightHand )
      CharShape::UnEquip(&v2->m_kCharShape, 0xCu);
    if ( v2->m_kAttackEquipBackup.bUnEquipLeftHandAcc )
      CharShape::UnEquip(&v2->m_kCharShape, 0xBu);
    if ( v2->m_kAttackEquipBackup.bUnEquipRightHandAcc )
      CharShape::UnEquip(&v2->m_kCharShape, 0xDu);
    if ( v2->m_kAttackEquipBackup.bUnEquipShieldAcc )
      CharShape::UnEquip(&v2->m_kCharShape, 0x1Du);
    v3 = v2->m_kAttackEquipBackup.kCase1.kPrevRightHandEquipItemID;
    if ( v3 != -1 )
    {
      CharShape::Equip(&v2->m_kCharShape, v3, v2->m_kAttackEquipBackup.kCase1.byPrevRightHandUpgrade);
      v2->m_kAttackEquipBackup.kCase1.kPrevRightHandEquipItemID = -1;
      CharShape::ReEquipWeaponCostume(&v2->m_kCharShape, a2);
    }
    v4 = v2->m_kAttackEquipBackup.kCase1.kPrevLeftHandEquipItemID;
    if ( (_WORD)v4 != -1 )
    {
      v5 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      v6 = v2->m_kAttackEquipBackup.kCase1.kPrevLeftHandEquipItemID;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v4) )
      {
        if ( (unsigned __int16)v6 <= *(_WORD *)(v5 + 200) )
        {
          v8 = *(_DWORD *)(v5 + 196);
          if ( *(_DWORD *)(v8 + 4 * v6) )
            v7 = *(_DWORD *)(v8 + 4 * v6);
          else
            v7 = 0;
        }
        else
        {
          v7 = 0;
        }
      }
      else
      {
        v7 = 0;
      }
      CharShape::Equip(
        &v2->m_kCharShape,
        v2->m_kAttackEquipBackup.kCase1.kPrevLeftHandEquipItemID,
        v2->m_kAttackEquipBackup.kCase1.byPrevLeftHandUpgrade);
      v2->m_kAttackEquipBackup.kCase1.kPrevLeftHandEquipItemID = -1;
      v9 = *(_DWORD *)(v7 + 102) - 5;
      if ( v9 )
      {
        if ( v9 == 2 )
          CharShape::ReEquipShieldCostume(&v2->m_kCharShape);
      }
      else
      {
        CharShape::ReEquipWeaponCostume(&v2->m_kCharShape, v6);
      }
    }
    if ( v2->m_kAttackEquipBackup.kCase1.kPrevRightHandAccItemID != -1 )
    {
      CharShape::Equip(&v2->m_kCharShape, v2->m_kAttackEquipBackup.kCase1.kPrevRightHandAccItemID);
      v2->m_kAttackEquipBackup.kCase1.kPrevRightHandAccItemID = -1;
    }
    if ( v2->m_kAttackEquipBackup.kCase1.kPrevLeftHandAccItemID != -1 )
    {
      CharShape::Equip(&v2->m_kCharShape, v2->m_kAttackEquipBackup.kCase1.kPrevLeftHandAccItemID);
      v2->m_kAttackEquipBackup.kCase1.kPrevLeftHandAccItemID = -1;
    }
    if ( v2->m_kAttackEquipBackup.kCase1.kPrevShieldAccItemID != -1 )
    {
      CharShape::Equip(&v2->m_kCharShape, v2->m_kAttackEquipBackup.kCase1.kPrevShieldAccItemID);
      v2->m_kAttackEquipBackup.kCase1.kPrevShieldAccItemID = -1;
      CharShape::ReEquipShieldCostume(&v2->m_kCharShape);
    }
    v2->m_kAttackEquipBackup.iBackupCase = 0;
    v2->m_kAttackEquipBackup.kCase1.kPrevRightHandEquipItemID = -1;
    v2->m_kAttackEquipBackup.kCase1.byPrevRightHandUpgrade = 0;
    v2->m_kAttackEquipBackup.kCase1.kPrevLeftHandEquipItemID = -1;
    v2->m_kAttackEquipBackup.kCase1.byPrevLeftHandUpgrade = 0;
    *(_DWORD *)&v2->m_kAttackEquipBackup.kCase1.kPrevRightHandAccItemID = -1;
    *(_DWORD *)&v2->m_kAttackEquipBackup.bUnEquipLeftHand = 0;
    v2->m_kAttackEquipBackup.kCase1.kPrevShieldAccItemID = -1;
    v2->m_kAttackEquipBackup.bUnEquipShieldAcc = 0;
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (00637730) --------------------------------------------------------
void __thiscall Char::UpdateActbyEquip(Char *this)
{
  Char *v1; // esi@1
  int v2; // eax@4
  unsigned int ui2ndCode; // [sp+4h] [bp-8h]@3
  unsigned int ui1stCode; // [sp+8h] [bp-4h]@3

  v1 = this;
  if ( this->m_spActor.m_pObject && !(unsigned __int8)((int (*)(void))this->vfptr[15].Deaffect)() )
  {
    Char::GetAniCode(v1, 0, &ui1stCode, &ui2ndCode);
    if ( v1->m_uiLayerAniCode[1] == NiActorManager::INVALID_SEQUENCE_ID )
    {
      v2 = ((int (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[15].Affect)(v1, ui1stCode, ui2ndCode);
      v1->vfptr[10].SetAbStateProperty((AbStateInfectee *)v1, (ABSTATEINDEX)(ui2ndCode + ui1stCode + v2), 0, 0);
    }
  }
}
// 9E4E90: using guessed type const unsigned int NiActorManager::INVALID_SEQUENCE_ID;

//----- (006377A0) --------------------------------------------------------
void __thiscall Char::UpdateActionEventByNet(Char *this, unsigned int dwEventActionCode, char byFlag)
{
  if ( this->m_spActor.m_pObject->m_eTargetID != dwEventActionCode )
  {
    this->m_fActionTimer = 0.0;
    this->m_byCharNPCActionState = 2;
    this->m_byEventActionFlag = byFlag;
    Char::ActNonWeightAction(this, dwEventActionCode);
  }
}

//----- (006377E0) --------------------------------------------------------
char __thiscall Char::MakeCharNpcShape(Char *this, CharNPC_ViewInfo *pViewInfo)
{
  CharNPC_ViewInfo *v2; // esi@1
  BaseCharClass v3; // eax@1
  Char *v4; // edi@1
  char v5; // bl@1
  char v7; // cl@3
  char v8; // al@9
  char v9; // cl@10
  char v10; // dl@10
  char v11; // cl@10
  char v12; // al@10
  unsigned __int8 v13; // al@12
  unsigned __int16 v14; // si@13

  v2 = pViewInfo;
  v3 = pViewInfo->Class;
  v4 = this;
  v5 = 64;
  if ( v3 == 5 )
    return 64;
  v7 = 0;
  switch ( v3 )
  {
    case 0:
      v5 = 1;
      break;
    case 1:
      v5 = 6;
      break;
    case 2:
      v5 = 11;
      break;
    case 3:
      v5 = 16;
      break;
    case 4:
      v7 = 1;
      break;
    default:
      break;
  }
  v8 = (unsigned __int8)pViewInfo & 0xFC;
  LOBYTE(pViewInfo) = (unsigned __int8)pViewInfo & 0xFC;
  if ( v7 )
  {
    if ( g_pkMainChar == (Char *)-780 )
      return 64;
    v13 = (v8 ^ 4 * g_pkMainChar->m_kCharShape.m_kClassID) & 0x7C ^ v8;
    LOBYTE(pViewInfo) = v13;
    BYTE3(pViewInfo) = g_pkMainChar->m_kCharShape.m_byFace;
    v5 = (v13 >> 2) & 0x1F;
    LOBYTE(pViewInfo) = v13 & 0x7F | (g_pkMainChar->m_kCharShape.m_byGender << 7);
    BYTE2(pViewInfo) = g_pkMainChar->m_kCharShape.m_byHairColor;
    v12 = g_pkMainChar->m_kCharShape.m_byHairType;
  }
  else
  {
    v9 = v2->Gender;
    BYTE3(pViewInfo) = v2->FaceShape;
    v10 = v2->HairColor;
    v11 = ((v8 ^ 4 * v5) & 0x7C ^ v8) & 0x7F | (v9 << 7);
    v12 = v2->HairType;
    LOBYTE(pViewInfo) = v11;
    BYTE2(pViewInfo) = v10;
  }
  v14 = v4->m_kCharShape.m_kMobID;
  BYTE1(pViewInfo) = v12;
  CharShape::SetShapeInfo(&v4->m_kCharShape, (PROTO_AVATAR_SHAPE_INFO *)&pViewInfo);
  v4->m_kCharShape.m_kMobID = v14;
  return v5;
}

//----- (006378F0) --------------------------------------------------------
void __thiscall Char::ClearBlinkingInfo(Char *this)
{
  Char *v1; // esi@1

  v1 = this;
  this->m_stBlinkingInfo.byState = 0;
  this->m_stBlinkingInfo.dwTime = 0;
  this->m_kCharShape.m_byEyeState = 17;
  CharShape::EnableEyeShape(&this->m_kCharShape, 0);
  v1->m_stBlinkingInfo.dwTime = timeGetTime();
}

//----- (00637930) --------------------------------------------------------
void __thiscall Char::UpdateEyeBlinking(Char *this)
{
  Char *v1; // esi@1
  DWORD v2; // edi@4
  unsigned int puiFirstCode; // [sp+4h] [bp-4h]@1

  v1 = this;
  Char::GetAniCode(this, 0, &puiFirstCode, 0);
  if ( puiFirstCode == 400000 || puiFirstCode == 500000 )
  {
    CharShape::EnableEyeShape(&v1->m_kCharShape, 17);
    v1->m_stBlinkingInfo.byState = 1;
    return;
  }
  v2 = timeGetTime();
  if ( !v1->m_stBlinkingInfo.byState )
  {
    if ( v1->m_stBlinkingInfo.dwTime )
    {
      if ( v2 - v1->m_stBlinkingInfo.dwTime <= 500 * (rand() % 5 + 4) )
        return;
      v1->m_stBlinkingInfo.byState = 1;
      CharShape::EnableEyeShape(&v1->m_kCharShape, 17);
    }
    goto LABEL_11;
  }
  if ( v1->m_stBlinkingInfo.byState == 1 && v2 - v1->m_stBlinkingInfo.dwTime > 0x78 )
  {
    v1->m_stBlinkingInfo.byState = 0;
    CharShape::EnableEyeShape(&v1->m_kCharShape, 0);
LABEL_11:
    v1->m_stBlinkingInfo.dwTime = timeGetTime();
  }
}

//----- (006379F0) --------------------------------------------------------
char __thiscall Char::ModifyExistDyingSeq(Char *this, unsigned __int16 hTargetHandle)
{
  NiTListItem<AttackSequence *> *v2; // edi@1
  AttackSequence *v3; // eax@2
  NiTListItem<DamageInfo *> *v4; // eax@3
  DamageInfo *v5; // esi@4
  signed int v6; // edx@6
  NiTListItem<SkillSequence *> *v7; // edx@10
  SkillSequence *v8; // eax@11
  NiTListItem<DamageInfo *> *v9; // eax@12
  signed int v10; // ecx@15
  Char *v12; // eax@20

  v2 = this->m_kAttSeqList.m_pkTail;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      v2 = v2->m_pkPrev;
      if ( v3 )
      {
        v4 = v3->kDamageInfoSet.kDamageList.m_pkTail;
        if ( v4 )
          break;
      }
LABEL_9:
      if ( !v2 )
        goto LABEL_10;
    }
    while ( 1 )
    {
      v5 = v4->m_element;
      v4 = v4->m_pkPrev;
      if ( v5 )
      {
        if ( v5->kTargetHandle == hTargetHandle )
        {
          v6 = v5->uiDamage;
          if ( v6 < 0 )
            return 0;
          if ( v6 & 0x4080FFFF )
            break;
        }
      }
      if ( !v4 )
        goto LABEL_9;
    }
    v12 = CharMgr::GetChar(&g_kCharMgr, v5->kTargetHandle);
  }
  else
  {
LABEL_10:
    v7 = this->m_kSkillSeqList.m_pkTail;
    if ( !v7 )
      return 1;
    while ( 1 )
    {
      v8 = v7->m_element;
      v7 = v7->m_pkPrev;
      if ( v8 )
      {
        v9 = v8->kDamageInfoSet.kDamageList.m_pkTail;
        if ( v9 )
          break;
      }
LABEL_18:
      if ( !v7 )
        return 1;
    }
    while ( 1 )
    {
      v5 = v9->m_element;
      v9 = v9->m_pkPrev;
      if ( v5 )
      {
        if ( v5->kTargetHandle == hTargetHandle )
        {
          v10 = v5->uiDamage;
          if ( v10 < 0 )
            return 0;
          if ( v10 & 0x4080FFFF )
            break;
        }
      }
      if ( !v9 )
        goto LABEL_18;
    }
    v12 = CharMgr::GetChar(&g_kCharMgr, v5->kTargetHandle);
  }
  v12->m_bWillDead = 1;
  v5->uiDamage |= 0x80000000;
  v5->kTargetRestHP = 0;
  return 0;
}

//----- (00637AD0) --------------------------------------------------------
char __thiscall Char::GetClass(Char *this)
{
  char result; // al@1

  result = this->m_BeforeMetamorphosisClass;
  if ( !result )
    result = this->m_kCharShape.m_kClassID;
  return result;
}

//----- (00637AF0) --------------------------------------------------------
BOOL __thiscall Char::IsMetamorphosis(Char *this)
{
  return this->m_bUserCharacter
      && -1 != this->m_kCharShape.m_kMobID
      && (this->m_BeforeMetamorphosisClass || this->m_kCharShape.m_kClassID);
}

//----- (00637B30) --------------------------------------------------------
NiPoint3 *__thiscall Char::GetPos(Char *this)
{
  return &this->m_spScene.m_pObject->m_kLocal.m_Translate;
}

//----- (00637B40) --------------------------------------------------------
NiPoint3 *__thiscall Char::GetMapHeigthPos(Char *this)
{
  return &this->m_spScene.m_pObject->m_kLocal.m_Translate;
}

//----- (00637B50) --------------------------------------------------------
void __thiscall Char::SaveSkillSwingStartCurTime(Char *this)
{
  this->m_fSkillActstep_Swing_Time = Timer::ms_fCurTime;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00637B60) --------------------------------------------------------
char __thiscall Char::IsRunSkillSequence(Char *this)
{
  Char *v1; // esi@1

  v1 = this;
  if ( 0.0 != this->m_fSkillActstep_Swing_Time )
  {
    if ( (unsigned __int8)AttackSequenceManager::IsSkillSequenceEmpty((AttackSequenceManager *)&this->vfptr)
      && Timer::ms_fCurTime < v1->m_fSkillActstep_Swing_Time + 3.0 )
    {
      return 0;
    }
    v1->m_fSkillActstep_Swing_Time = 0.0;
  }
  return 1;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00637BB0) --------------------------------------------------------
bool __thiscall Char::IsRangeAttChar(Char *this)
{
  Char *v1; // esi@1
  char v2; // al@2
  bool result; // al@5

  v1 = this;
  if ( this->m_bUserCharacter )
  {
    v2 = this->m_BeforeMetamorphosisClass;
    if ( !v2 )
      v2 = this->m_kCharShape.m_kClassID;
    switch ( v2 )
    {
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
        result = 0;
        break;
      case 6:
      case 7:
      case 8:
      case 9:
      case 0xA:
        result = 0;
        break;
      case 0xB:
      case 0xC:
      case 0xD:
      case 0xE:
      case 0xF:
        result = 1;
        break;
      case 0x10:
      case 0x11:
      case 0x12:
      case 0x13:
      case 0x14:
        result = 0;
        break;
      case 0x15:
      case 0x16:
      case 0x17:
      case 0x18:
      case 0x19:
        result = 0;
        break;
      case 0x1A:
      case 0x1B:
        result = 0;
        break;
      default:
        result = 0;
        break;
    }
  }
  else if ( (unsigned __int8)((int (*)(void))this->vfptr[1].Affect)() && v1->m_pMobinfo )
  {
    result = v1->m_pMobViewInfo->AttackType == 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00637CD0) --------------------------------------------------------
NiActorManager *__thiscall Char::GetHitTimeCount(Char *this, unsigned int uiEventCode)
{
  NiActorManager *result; // eax@2
  float v3; // ecx@4
  unsigned int v4; // esi@5
  unsigned int v5; // eax@5
  int v6; // edi@6
  const char *v7; // edx@7
  NiActorManager *HitCount; // [sp+8h] [bp+8h]@4

  if ( uiEventCode )
  {
    result = Char::GetSequence(this, uiEventCode);
    if ( result )
    {
      v3 = result->m_fTime;
      HitCount = 0;
      if ( v3 != 0.0 )
      {
        v4 = *(_DWORD *)(LODWORD(v3) + 12);
        v5 = 0;
        if ( v4 )
        {
          v6 = *(_DWORD *)(LODWORD(v3) + 16);
          do
          {
            v7 = *(const char **)(v6 + 8 * v5 + 4);
            if ( v7 )
            {
              if ( !strcmp((const char *)&off_9B9048, v7) )
                HitCount = (NiActorManager *)((char *)HitCount + 1);
            }
            ++v5;
          }
          while ( v5 < v4 );
        }
      }
      result = HitCount;
    }
  }
  else
  {
    result = (NiActorManager *)this->m_lstfHitTime._Mysize;
  }
  return result;
}
// 9B9048: using guessed type void *off_9B9048;

//----- (00637D60) --------------------------------------------------------
int __thiscall Char::GetEventCodebyAttackNO(Char *this, char byActionCode)
{
  int result; // eax@1

  result = 0;
  switch ( byActionCode )
  {
    case 0:
      result = ((int (__stdcall *)(_DWORD, _DWORD))this->vfptr[15].Affect)(300000, 1000) + 301000;
      break;
    case 1:
      result = ((int (__stdcall *)(_DWORD, _DWORD))this->vfptr[15].Affect)(300000, 2000) + 302000;
      break;
    case 2:
      result = ((int (__stdcall *)(_DWORD, _DWORD))this->vfptr[15].Affect)(300000, 3000) + 303000;
      break;
    case 3:
      result = ((int (__stdcall *)(_DWORD, _DWORD))this->vfptr[15].Affect)(300000, 1500) + 301500;
      break;
    case 4:
      result = ((int (__stdcall *)(_DWORD, _DWORD))this->vfptr[15].Affect)(300000, 2500) + 302500;
      break;
    case 5:
      result = ((int (__stdcall *)(_DWORD, _DWORD))this->vfptr[15].Affect)(300000, 3500) + 303500;
      break;
    case 6:
      result = ((int (__stdcall *)(_DWORD, _DWORD))this->vfptr[15].Affect)(300000, 7000) + 307000;
      break;
    case 7:
      result = ((int (__stdcall *)(_DWORD, _DWORD))this->vfptr[15].Affect)(300000, 8000) + 308000;
      break;
    default:
      return result;
  }
  return result;
}

//----- (00637E90) --------------------------------------------------------
void __userpurge Char::SetItemAutoPickState(Char *this@<ecx>, int a2@<edi>, int bAutoPickItem)
{
  this->m_kCharShape.m_bAutoPickItem = bAutoPickItem;
  CharShape::SetMiniMonEffect(&this->m_kCharShape, a2, bAutoPickItem);
}

//----- (00637EB0) --------------------------------------------------------
void __userpurge Char::SetItemAutoUseState(Char *this@<ecx>, int a2@<esi>, int bAutoUseItem)
{
  this->m_kCharShape.m_bAutoUseItem = bAutoUseItem;
  CharShape::SetMinimonAutoUseEff(&this->m_kCharShape, a2, bAutoUseItem);
}

//----- (00637ED0) --------------------------------------------------------
void __thiscall Char::SetAniMationStop(Char *this, bool b)
{
  Char *v2; // esi@1

  v2 = this;
  if ( b == 1 )
  {
    if ( JumpProcessor::IsJump(&this->m_kJumpProcessor) )
      *(_WORD *)&v2->m_bAniStop = 256;
    else
      v2->m_bAniStop = 1;
  }
  else if ( !b )
  {
    if ( Char::IsActRunning(this) && !Char::CheckActState(v2, 500000) )
      ((void (__thiscall *)(_DWORD))v2->vfptr[10].DeleteAbStateByAbstateIndex)(v2);
    if ( JumpProcessor::IsJump(&v2->m_kJumpProcessor) )
      ((void (__thiscall *)(_DWORD))v2->vfptr[10].DeleteAbStateByAbstateIndex)(v2);
    v2->m_bAniStop = 0;
  }
  PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
}

//----- (00637F60) --------------------------------------------------------
void __thiscall Char::SetAbstateDeaffect(Char *this, AbStateInst *pkAbState)
{
  int v2; // ebx@1
  int v3; // esi@1
  Char *v4; // edi@1
  int *v5; // eax@3
  int v6; // eax@4
  NiTListItem<AbStateInst *> *v7; // edi@14
  AbStateInst *v8; // esi@15
  PgFrameWork *v9; // eax@24
  PgFrameWork *v10; // esi@24
  void (__thiscall *v11)(AttackSequenceManager *, float); // eax@27
  NiTListItem<AbStateInst *> *v12; // eax@31
  AbStateInst *v13; // esi@34
  AbnormalStateViewInfo *v14; // ebx@35
  Effect *v15; // eax@38
  unsigned int *v16; // esi@38
  AbnormalStateInfo *pkAbstateInfo; // [sp+24h] [bp-4h]@35
  NiTListItem<AbStateInst *> *kIter; // [sp+30h] [bp+8h]@34

  v2 = pkAbState->kID;
  v3 = ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
  v4 = this;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable,
                          v2) )
  {
    if ( (unsigned __int16)v2 <= *(_WORD *)(v3 + 200) )
    {
      v5 = (int *)(*(_DWORD *)(v3 + 196) + 4 * v2);
      if ( *v5 )
      {
        v6 = *v5;
        if ( v6 )
        {
          switch ( *(_DWORD *)(v6 + 34) )
          {
            case 0x175:
              if ( !v4->m_bClearChar )
              {
                v4->m_kAbStateProperty.bVisible = 1;
                CharShape::SetSPactralGlowEnable(&v4->m_kCharShape, 0);
                if ( (unsigned __int8)((int (__thiscall *)(Char *))v4->vfptr[15].Deaffect)(v4)
                  && CSpactralGlow_Shader_Controller::IsEnable(&v4->m_kRidePetCtl.m_kShaderCtrl) )
                {
                  CSpactralGlow_Shader_Controller::SetEnable(&v4->m_kRidePetCtl.m_kShaderCtrl, 0);
                }
                if ( (unsigned __int8)((int (__thiscall *)(Char *))v4->vfptr[1].AddAbStateByAbstateIndex)(v4) )
                  CSpactralGlow_Shader_Controller::SetEnable(&v4->m_kRestHouseShader, 0);
                if ( v4 != g_pkMainChar && (signed int)v4->m_kAbStateList.m_kAllocator.m_uiCount > 0 )
                {
                  v7 = v4->m_kAbStateList.m_pkHead;
                  while ( v7 )
                  {
                    v8 = v7->m_element;
                    v7 = v7->m_pkNext;
                    if ( v8
                      && v8->pkLoopingEffect
                      && !(unsigned __int8)((int (__stdcall *)(_DWORD))v8->pkLoopingEffect->vfptr[19].__vecDelDtor)(LODWORD(Timer::ms_fCurTime)) )
                    {
                      ((void (__stdcall *)(signed int))v8->pkLoopingEffect->vfptr[21].__vecDelDtor)(1);
                    }
                  }
                }
              }
              break;
            case 0x178:
              CharShape::SetGTIBomb(&v4->m_kCharShape, 0);
              if ( !v4->m_bClearChar )
                CharShape::RestoreHatAcc(&v4->m_kCharShape);
              break;
            case 0x176:
              if ( v4 == g_pkMainChar )
              {
                v9 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
                v10 = v9;
                if ( v9 )
                {
                  if ( !v4->m_bClearChar )
                  {
                    MiniMapWin::ClearGTEnemyPos(*(MiniMapWin **)&v9[15].m_bInit);
                    MiniMapWin::StopScanEffect(*(MiniMapWin **)&v10[15].m_bInit);
                  }
                }
              }
              break;
            case 0x16F:
              v11 = v4->vfptr->SetAnimationSpeed;
              v4->m_bGtiSpeed = 0;
              ((void (__stdcall *)(_DWORD))v11)(1.0);
              break;
            case 0x174:
              if ( !v4->m_bClearChar )
              {
                if ( AbStateInfectee::IsInList((AbStateInfectee *)&v4->vfptr, STA_GTIBOMB1) )
                {
                  if ( v4->m_kAbStateList.m_kAllocator.m_uiCount )
                  {
                    v12 = v4->m_kAbStateList.m_pkHead;
                    if ( v12 )
                    {
                      while ( 1 )
                      {
                        v13 = v12->m_element;
                        kIter = v12->m_pkNext;
                        if ( v13 )
                        {
                          pkAbstateInfo = IIDTableBase<AbnormalStateInfo,AbnormalStateInfoTab,unsigned short>::GetByID(v13->kID);
                          v14 = IIDTableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab,unsigned short>::GetByID(v13->kID);
                          if ( pkAbstateInfo )
                          {
                            if ( v14 )
                            {
                              if ( pkAbstateInfo->AbStataIndex == 376 )
                              {
                                v15 = v13->pkLoopingEffect;
                                v16 = (unsigned int *)&v13->pkLoopingEffect;
                                if ( v15 )
                                {
                                  EffectMgr::RemoveEffect(&g_kEffectMgr, v15);
                                  *v16 = 0;
                                  EffectMgr::CreateAttachEffect(
                                    &g_kEffectMgr,
                                    v16,
                                    v14->LoopEffect,
                                    v4,
                                    v14->LoopEffPos,
                                    Timer::ms_fCurTime,
                                    1,
                                    0,
                                    0,
                                    1);
                                  *(_BYTE *)(*v16 + 140) = 1;
                                }
                              }
                            }
                          }
                        }
                        if ( !kIter )
                          break;
                        v12 = kIter;
                      }
                    }
                  }
                }
              }
              break;
            default:
              return;
          }
        }
      }
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8C2A0: using guessed type int ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;

//----- (00638250) --------------------------------------------------------
void __thiscall Char::GaleOfRun(Char *this, float fTime)
{
  Char *v2; // esi@1

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[7].GetAbstateColor)() && v2->m_bGtiSpeed )
  {
    if ( CNSTimer_Interval::IsRun_GetCount(&v2->m_kGtiSpeedInterval, fTime) )
    {
      EffectMgr::CreateAttachEffect(
        &g_kEffectMgr,
        (unsigned int *)&fTime,
        "Sta_GTI_Speed",
        v2,
        None,
        Timer::ms_fCurTime,
        0,
        0,
        1,
        1);
      CNSTimer_Interval::ReSet(&v2->m_kGtiSpeedInterval, Timer::ms_fCurTime);
      v2->m_kGtiSpeedInterval.m_fCheckTime = 0.039999999;
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006382E0) --------------------------------------------------------
void __thiscall Char::RisingChar(Char *this, float fTime)
{
  Char *v2; // esi@1
  double v3; // st7@1
  int v4; // eax@2
  double v5; // st6@3
  float v6; // edx@10
  float v7; // edi@10
  float fY; // ST04_4@10
  double v9; // st7@10
  NiNode *v10; // esi@10
  float v11; // edx@10
  NiPoint3 CharPos; // [sp+10h] [bp-10h]@2
  float fMoveTime; // [sp+1Ch] [bp-4h]@1
  float fTimea; // [sp+28h] [bp+8h]@3

  v2 = this;
  fMoveTime = this->m_fSpeed / this->m_fAcceleration;
  v3 = fMoveTime;
  if ( fMoveTime + fMoveTime >= this->m_fCountTime )
  {
    fMoveTime = this->m_RisingTimer.m_fObjectTime;
    v5 = fTime;
    fTimea = fTime - this->m_RisingTimer.m_fStartTime;
    this->m_RisingTimer.m_fObjectTime = fTimea;
    this->m_RisingTimer.m_fElapsedTime = fTimea - fMoveTime;
    if ( this->m_bAirTime )
    {
      if ( this->m_RisingTimer.m_fObjectTime > this->m_fGroudStrikeKeepTime - v3 )
      {
        this->m_bAirTime = 0;
        this->m_bDownTime = 1;
        this->m_RisingTimer.m_fStartTime = v5;
        this->m_RisingTimer.m_fObjectTime = 0.0;
        this->m_RisingTimer.m_fElapsedTime = 0.0;
      }
    }
    else
    {
      if ( this->m_RisingTimer.m_fObjectTime > v3 && !this->m_bDownTime )
        this->m_bAirTime = 1;
      this->m_fCountTime = this->m_RisingTimer.m_fElapsedTime + this->m_fCountTime;
    }
    v6 = this->m_MovePoint.x;
    v7 = this->m_MovePoint.y;
    fY = this->m_fCountTime;
    CharPos.z = this->m_MovePoint.z;
    v9 = Char::GetCharZPos(this, fY) + CharPos.z;
    v10 = v2->m_spScene.m_pObject;
    v10->m_kLocal.m_Translate.x = v11;
    v10->m_kLocal.m_Translate.y = v7;
    CharPos.z = v9;
    v10->m_kLocal.m_Translate.z = CharPos.z;
  }
  else
  {
    v4 = ((int (*)(void))this->vfptr[6].Deaffect)();
    CharPos.x = *(float *)v4;
    CharPos.y = *(float *)(v4 + 4);
    CharPos.z = *(float *)(v4 + 8);
    World::GetAdvGroundPos(&g_kWorld, CharPos.x, CharPos.y, &CharPos);
    ((void (__thiscall *)(Char *, NiPoint3 *))v2->vfptr[5].~AbStateInfectee)(v2, &CharPos);
    v2->m_fCountTime = 0.0;
    v2->m_bShockWave = 0;
    *(_WORD *)&v2->m_bAirTime = 0;
  }
}

//----- (00638470) --------------------------------------------------------
signed int __thiscall Char::GetLvGapIndex(Char *this, int iLv)
{
  AbStateInfecteeVtbl *v2; // eax@1
  int (*v3)(void); // edx@2
  int v4; // ecx@4
  signed int result; // eax@4

  v2 = this->vfptr;
  if ( this->m_bUserCharacter )
    v3 = (int (*)(void))v2[20].IsVisible;
  else
    v3 = (int (*)(void))v2[5].Deaffect;
  v4 = iLv - v3();
  result = 0;
  while ( v4 < LevelGapValue[result] )
  {
    if ( (unsigned int)++result >= 5 )
      return 5;
  }
  return result;
}

//----- (006384B0) --------------------------------------------------------
void __thiscall Char::SetActionEffectStartTime(Char *this)
{
  Char *v1; // esi@1
  unsigned int v2; // edi@1
  NiActorManager *v3; // eax@2

  v1 = this;
  v2 = Char::GetAniCode(this, 0, 0, 0);
  if ( ((int (__thiscall *)(_DWORD))v1->vfptr[13].DeleteAbStateByAbstateIndex)(v1) == 4 )
    v3 = Char::GetSequence(v1, v1->m_uiLayerAniCode[0]);
  else
    v3 = Char::GetSequence(v1, v2);
  if ( v3 && v1->m_uiSkillActStep )
    v1->m_kActionMgr.m_fEffectStartTime = v3->m_fTransStartTime + Timer::ms_fCurTime - *(float *)&v3->m_pcTargetKey;
  else
    v1->m_kActionMgr.m_fEffectStartTime = Timer::ms_fCurTime;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00638520) --------------------------------------------------------
char __thiscall Char::Init(Char *this, PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *p)
{
  Char *v2; // ebx@1
  unsigned int v3; // edx@2
  unsigned int v4; // eax@2
  unsigned int v5; // ecx@2
  unsigned int v6; // edx@2
  AbStateInfecteeVtbl *v7; // eax@2
  AbStateInfectee::AbstateColor (__thiscall *v8)(AbStateInfectee *); // edx@2
  char v9; // dl@2
  Name3 *v10; // eax@2
  MapInfo *v11; // eax@2
  char v12; // al@4
  char v14; // al@8
  bool v15; // al@11
  STREETBOOTH_SIGNBOARD v16; // [sp-18h] [bp-5Ch]@11
  Name3 *v17; // [sp+8h] [bp-3Ch]@2
  Name3 result; // [sp+18h] [bp-2Ch]@2
  char acName[21]; // [sp+28h] [bp-1Ch]@2

  v2 = this;
  this->m_BeforeMetamorphosisClass = 0;
  if ( !p )
    return 0;
  this->m_kHandle = p->handle;
  v3 = p->charid.n5_code[1];
  v4 = p->charid.n5_code[2];
  *(_DWORD *)acName = p->charid.n5_code[0];
  v5 = p->charid.n5_code[3];
  *(_DWORD *)&acName[4] = v3;
  v6 = p->charid.n5_code[4];
  *(_DWORD *)&acName[12] = v5;
  *(_DWORD *)&acName[8] = v4;
  v7 = v2->vfptr;
  *(_DWORD *)&acName[16] = v6;
  v8 = v7[2].GetAbstateColor;
  acName[20] = 0;
  ((void (__thiscall *)(_DWORD, _DWORD))v8)(v2, acName);
  ((void (__thiscall *)(_DWORD, _DWORD))v2->vfptr[8].Deaffect)(v2, LODWORD(Char::ms_fDefaultWalkSpeed));
  ((void (__thiscall *)(_DWORD, _DWORD))v2->vfptr[8].SetAbStateProperty)(v2, LODWORD(Char::ms_fDefaultRunSpeed));
  v2->m_kMoveToTarget.vfptr->Stop((NpNs_MoveToTarget *)&v2->m_kMoveToTarget);
  Char::SetMode(v2, p->mode);
  v2->m_byType = p->type;
  v2->m_kMoverHandle = p->nMoverHnd;
  v2->m_uiMoverSlot = p->nMoverSlot;
  v2->m_byKQTeamType = p->nKQTeamType;
  v9 = p->chrclass;
  v2->m_dwCurrHpUpdateSeqNo = -65536;
  v2->m_dwTOTCurrHpUpdateSeqNo = -65536;
  *(float *)&v17 = COERCE_FLOAT(&result);
  v2->m_kCharShape.m_kClassID = v9;
  v2->m_bConnectServer = 1;
  v10 = World::GetMapName(&g_kWorld, v17);
  v11 = MapInfoTab::GetByMapName(v10);
  if ( v11 )
    v2->m_fMaxViewLength = (double)v11->Sight;
  v12 = p->chrclass;
  if ( v12 != ((*(_BYTE *)&p->shape >> 2) & 0x1F) )
  {
    *(_BYTE *)&p->shape ^= (*(_BYTE *)&p->shape ^ 4 * v12) & 0x7C;
    return 0;
  }
  v2->vfptr[2].Affect((AbStateInfectee *)v2, (AbStateInst *)&p->shape, 0);
  if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[1].AddAbStateByAbstateIndex)(v2) )
  {
    v14 = v2->m_byMode;
    if ( v14 == 4 )
    {
      v2->m_byMiniHouseSkinID = p->shapedata.notcamp.equip.Equ_Head;
    }
    else if ( v14 == 5 )
    {
      v2->m_byMiniHouseSkinID = p->shapedata.notcamp.equip.Equ_Head;
      v15 = p->shapedata.booth.issell != 0;
      v2->m_bIsSell = v15;
      qmemcpy(&v16, (char *)&p->shapedata.ride.equip.Equ_Boot + 1, sizeof(v16));
      Char::SetCampSignBoard(v2, v16, v15);
    }
  }
  else
  {
    Char::GetoutOfPet(v2);
    if ( v2->m_byMode == 6 )
      CharShape::SetRidePetID(&v2->m_kCharShape, p->shapedata.ride.rideinfo.horse);
    v2->vfptr[2].Affect((AbStateInfectee *)v2, 0, (bool)&p->shapedata);
    v2->m_dwGuildRegNum = p->myguild;
  }
  return 1;
}
// A96A54: using guessed type float Char::ms_fDefaultWalkSpeed;
// A96A58: using guessed type float Char::ms_fDefaultRunSpeed;

//----- (00638740) --------------------------------------------------------
signed int __thiscall Char::Init(Char *this, PROTO_AVATARINFORMATION *p)
{
  Char *v2; // esi@1
  char v3; // bl@1
  bool (__thiscall *v4)(AbStateInfectee *, ABSTATEINDEX, float, bool); // edx@1
  MapInfo *v5; // eax@3
  signed int result; // eax@5

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->vfptr[8].Deaffect)(LODWORD(Char::ms_fDefaultWalkSpeed));
  ((void (__thiscall *)(Char *, _DWORD))v2->vfptr[8].SetAbStateProperty)(v2, LODWORD(Char::ms_fDefaultRunSpeed));
  v2->m_kMoveToTarget.vfptr->Stop((NpNs_MoveToTarget *)&v2->m_kMoveToTarget);
  v3 = ((int (__thiscall *)(Char *))v2->vfptr[1].AddAbStateByAbstateIndex)(v2);
  v4 = v2->vfptr[1].AddAbStateByAbstateIndex;
  v2->m_byMode = 1;
  v2->m_eStandMode = 0;
  if ( v3 != (unsigned __int8)((int (__thiscall *)(Char *))v4)(v2) )
    v2->m_bIsChangeCampMode = 1;
  v5 = MapInfoTab::GetByMapName(&p->loginmap);
  if ( v5 )
    v2->m_fMaxViewLength = (double)v5->Sight;
  ((void (__thiscall *)(Char *))v2->vfptr[1].AddAbStateByAbstateIndex)(v2);
  v2->vfptr[2].Affect((AbStateInfectee *)v2, (AbStateInst *)&p->shape, (bool)&p->equip);
  result = -65535;
  v2->m_dwCurrHpUpdateSeqNo = -65536;
  v2->m_dwTOTCurrHpUpdateSeqNo = -65536;
  return result;
}
// A96A54: using guessed type float Char::ms_fDefaultWalkSpeed;
// A96A58: using guessed type float Char::ms_fDefaultRunSpeed;

//----- (00638810) --------------------------------------------------------
double __thiscall Char::GetAttackableDistance(Char *this, Char *pkTargetChar)
{
  Char *v2; // ebx@1
  MobInfo *v3; // eax@3
  MobType v4; // eax@4
  double result; // st7@9
  int v6; // edi@11
  int v7; // esi@11
  int *v8; // eax@13
  int v9; // esi@14
  unsigned int v10; // edx@19
  unsigned int v11; // edx@27
  char pkTargetChara; // [sp+14h] [bp+8h]@16
  Char *pkTargetCharc; // [sp+14h] [bp+8h]@21
  Char *pkTargetChard; // [sp+14h] [bp+8h]@22
  char pkTargetCharb; // [sp+14h] [bp+8h]@24

  v2 = this;
  if ( !pkTargetChar )
    return 50.0;
  if ( (unsigned __int8)((int (__thiscall *)(Char *))pkTargetChar->vfptr[1].Affect)(pkTargetChar) )
  {
    v3 = pkTargetChar->m_pMobinfo;
    if ( v3 )
    {
      v4 = v3->Type;
      if ( v4 == 8 || v4 == 10 || v4 == 9 || v4 == 22 || v4 == 21 )
        return 10.0;
    }
  }
  if ( !(unsigned __int8)((int (__thiscall *)(Char *))pkTargetChar->vfptr[1].Affect)(pkTargetChar) )
  {
    if ( v2->m_BeforeMetamorphosisClass )
      pkTargetCharb = v2->m_BeforeMetamorphosisClass;
    else
      pkTargetCharb = v2->m_kCharShape.m_kClassID;
    if ( CharClass::IsKindOf(pkTargetCharb, 11) )
    {
      v11 = Char::GetAniCode(v2, 0, 0, 0) % 0x64;
      if ( v11 )
      {
        if ( v11 != 80 )
          return 450.0;
      }
    }
    return 50.0;
  }
  v6 = pkTargetChar->m_kCharShape.m_kMobID;
  v7 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
  if ( !(unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 16))(
                           ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                           v6) )
    return 50.0;
  if ( (unsigned __int16)v6 > *(_WORD *)(v7 + 200) )
    return 50.0;
  v8 = (int *)(*(_DWORD *)(v7 + 196) + 4 * v6);
  if ( !*v8 )
    return 50.0;
  v9 = *v8;
  if ( !*v8 )
    return 50.0;
  if ( v2->m_BeforeMetamorphosisClass )
    pkTargetChara = v2->m_BeforeMetamorphosisClass;
  else
    pkTargetChara = v2->m_kCharShape.m_kClassID;
  if ( CharClass::IsKindOf(pkTargetChara, 11) && (v10 = Char::GetAniCode(v2, 0, 0, 0) % 0x64) != 0 && v10 != 80 )
  {
    *(float *)&pkTargetCharc = (double)*(unsigned int *)(v9 + 104) * 50.0 / 1000.0 + 450.0;
    result = *(float *)&pkTargetCharc;
  }
  else
  {
    *(float *)&pkTargetChard = (double)*(unsigned int *)(v9 + 104) * 50.0 / 1000.0;
    result = *(float *)&pkTargetChard;
  }
  return result;
}
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;

//----- (006389D0) --------------------------------------------------------
void __userpurge Char::UpdatePosition(Char *this@<ecx>, int a2@<ebx>, int a3@<edi>, double a4@<st0>, float fTime)
{
  Char *v5; // esi@1
  NiActorManager *v6; // eax@2
  unsigned int v7; // ecx@2
  char v8; // dl@4
  Char::MoveMode v9; // eax@12
  NpNs_MoveToTargetVtbl *v10; // ebx@14
  float fSpeed; // ST14_4@14
  NpNs_MoveToTargetVtbl *v12; // ebx@15
  float v13; // ST14_4@15
  NiPoint3 *v14; // eax@17
  NiPoint3 *v15; // eax@18
  double v16; // st7@23
  AbStateInfecteeVtbl *v17; // eax@24
  int v18; // eax@25
  double v19; // st7@27
  NiNode *v20; // eax@29
  float v21; // ecx@29
  float kOldZ; // ST24_4@29
  float v23; // edx@29
  float v24; // ecx@35
  float v25; // edx@35
  bool v26; // zf@36
  float v27; // ecx@36
  float v28; // edx@36
  int v29; // [sp+1Ch] [bp-30h]@10
  float kCharPos; // [sp+30h] [bp-1Ch]@25
  float kCharPos_4; // [sp+34h] [bp-18h]@25
  float kCharPos_8; // [sp+38h] [bp-14h]@25
  NiPoint3 kPos; // [sp+3Ch] [bp-10h]@27
  float v34; // [sp+48h] [bp-4h]@17
  float fJumpHeight; // [sp+54h] [bp+8h]@18

  v5 = this;
  if ( !Char::IsLinkGate(this) )
  {
    v6 = v5->m_spActor.m_pObject;
    v7 = 0;
    if ( v6 )
      v7 = v6->m_eCurID;
    v8 = 0;
    if ( !v6 || v7 == 801700 || v7 == 801000 || v7 == 801100 && v6->m_eTransitionState == NO_TRANSITION )
      v8 = 1;
    v29 = a2;
    if ( v5->m_eEmotionState || v8 )
    {
      v5->m_kSmoothRotater.m_fSpeed = 0.0;
      v34 = Timer::ms_fCurTime;
      v14 = (NiPoint3 *)NpNs_SmoothRotateControler::GetTargetDirection((NiDX9TextureData *)&v5->m_kSmoothRotater);
      NpNs_SmoothRotateControler::SetTargetDirection(&v5->m_kSmoothRotater, v34, v14);
      MoveToTarget::ChangeSpeed(&v5->m_kMoveToTarget, 0.0);
    }
    else
    {
      v9 = v5->m_eMoveMode;
      if ( v9 )
      {
        if ( v9 == 1 )
        {
          v10 = v5->m_kMoveToTarget.vfptr;
          ((void (__thiscall *)(Char *))v5->vfptr[8].AddAbStateByAbstateIndex)(v5);
          fSpeed = a4;
          (*(void (__thiscall **)(MoveToTarget *, _DWORD))&v10->gap4[4])(&v5->m_kMoveToTarget, LODWORD(fSpeed));
        }
      }
      else
      {
        v12 = v5->m_kMoveToTarget.vfptr;
        v5->vfptr[8].IsVisible((AbStateInfectee *)v5);
        v13 = a4;
        (*(void (__thiscall **)(MoveToTarget *, _DWORD))&v12->gap4[4])(&v5->m_kMoveToTarget, LODWORD(v13));
      }
      v5->m_kSmoothRotater.m_fSpeed = NI_PI * 4.0;
    }
    ((void (__thiscall *)(MoveToTarget *, _DWORD))v5->m_kMoveToTarget.vfptr->Update)(
      &v5->m_kMoveToTarget,
      LODWORD(fTime));
    v15 = v5->m_kMoveToTarget.vfptr->GetCurrentPos((NpNs_MoveToTarget *)&v5->m_kMoveToTarget);
    JumpProcessor::SetCurPos(&v5->m_kJumpProcessor, v15);
    fJumpHeight = JumpProcessor::Update(&v5->m_kJumpProcessor, a3, Timer::ms_fCurTime);
    if ( !(unsigned __int8)((int (__thiscall *)(Char *))v5->vfptr[7].GetAbstateColor)(v5)
      && !v5->m_bOldDuringMove
      && !JumpProcessor::IsJump(&v5->m_kJumpProcessor) )
    {
      goto LABEL_40;
    }
    if ( (unsigned __int8)((int (__thiscall *)(Char *))v5->vfptr[7].GetAbstateColor)(v5) )
    {
      v5->m_bOldDuringMove = 1;
    }
    else
    {
      v16 = v5->m_fSaveCharSpeed;
      v5->m_bOldDuringMove = 0;
      if ( v16 > 0.0 )
      {
        ((void (__thiscall *)(_DWORD, _DWORD))v5->vfptr[8].SetAbStateProperty)(v5, v5->m_fSaveCharSpeed);
        v17 = v5->vfptr;
        v5->m_fSaveCharSpeed = 0.0;
        ((void (__thiscall *)(Char *, signed int))v17[7].AddAbStateByAbstateIndex)(v5, 1);
      }
    }
    v18 = (int)v5->m_kMoveToTarget.vfptr->GetCurrentPos((NpNs_MoveToTarget *)&v5->m_kMoveToTarget);
    kCharPos = *(float *)v18;
    kCharPos_4 = *(float *)(v18 + 4);
    kCharPos_8 = *(float *)(v18 + 8);
    if ( v5->m_kJumpProcessor.m_bJumpFlyStart && JumpProcessor::IsJump(&v5->m_kJumpProcessor) )
    {
      kPos.x = kCharPos;
      kPos.y = kCharPos_4;
      v19 = fJumpHeight;
    }
    else
    {
      if ( World::GetAdvGroundPos(&g_kWorld, kCharPos, kCharPos_4, &kPos) )
      {
LABEL_31:
        if ( v5->m_eEmotionState == 4 )
          kPos.z = kCharPos_8;
        if ( !v5->m_kJumpProcessor.m_bJumpFlyStart && JumpProcessor::IsJump(&v5->m_kJumpProcessor) )
        {
          v24 = kPos.y;
          v25 = kPos.z;
          v5->m_kJumpProcessor.m_pos3StartPos.x = kPos.x;
          v5->m_kJumpProcessor.m_pos3StartPos.y = v24;
          v5->m_kJumpProcessor.m_pos3StartPos.z = v25;
        }
        v26 = v5->m_kJumpProcessor.m_bJumpFlyStart == 0;
        v27 = kPos.y;
        v28 = kPos.z;
        v5->m_pos3CameraPos.x = kPos.x;
        v5->m_pos3CameraPos.y = v27;
        v5->m_pos3CameraPos.z = v28;
        if ( !v26 && JumpProcessor::IsJump(&v5->m_kJumpProcessor) )
          v5->m_pos3CameraPos.z = JumpProcessor::GetCameraPos(&v5->m_kJumpProcessor);
        v5->m_spScene.m_pObject->m_kLocal.m_Translate = kPos;
LABEL_40:
        if ( JumpProcessor::OnEnd(&v5->m_kJumpProcessor) )
        {
          Char::UpdateWeaponEquipState(v5, v29);
          Char::UpdateActbyEquip(v5);
        }
        return;
      }
      v20 = v5->m_spScene.m_pObject;
      v21 = v20->m_kLocal.m_Translate.y;
      kOldZ = v20->m_kLocal.m_Translate.x;
      v23 = v20->m_kLocal.m_Translate.z;
      kPos.x = kCharPos;
      kPos.y = kCharPos_4;
      v19 = v23;
    }
    kPos.z = v19;
    goto LABEL_31;
  }
}
// 6389D0: could not find valid save-restore pair for ebx
// A8B97C: using guessed type float Timer::ms_fCurTime;
// B622CC: using guessed type const float NI_PI;

//----- (00638D10) --------------------------------------------------------
void __thiscall Char::UpdateLod(Char *this, float fTime)
{
  Char *v2; // esi@1
  NiActorManager *v3; // eax@1
  NiBoneLODController *v4; // ebx@2
  NiNode *v5; // eax@3
  float pos3Length; // ST0C_4@3
  float pos3Length_4; // ST10_4@3
  float pos3Length_8; // ST14_4@3
  float fLength; // ST18_4@3
  float v10; // ST18_4@3
  int v11; // ecx@3
  double v12; // st7@3

  v2 = this;
  v3 = this->m_spActor.m_pObject;
  if ( v3 )
  {
    v4 = v3->m_spBoneLOD.m_pObject;
    if ( v4 )
    {
      v5 = this->m_spScene.m_pObject;
      pos3Length = pkWorldCamera->m_kLocal.m_Translate.x - v5->m_kLocal.m_Translate.x;
      pos3Length_4 = pkWorldCamera->m_kLocal.m_Translate.y - v5->m_kLocal.m_Translate.y;
      pos3Length_8 = pkWorldCamera->m_kLocal.m_Translate.z - v5->m_kLocal.m_Translate.z;
      fLength = pos3Length_4 * pos3Length_4 + pos3Length * pos3Length + pos3Length_8 * pos3Length_8;
      v10 = sqrt(fLength);
      v11 = 0;
      v12 = pkWorldCamera->m_fLODAdjust * v10;
      if ( v2->m_fLodLength[0] < v12 )
      {
        v11 = 1;
        if ( v2->m_fLodLength[1] < v12 )
          v11 = 2;
      }
      if ( v2->m_nCurrLODLevel != v11 )
      {
        v2->m_nCurrLODLevel = v11;
        NiBoneLODController::SetBoneLOD(v4, v11);
      }
    }
  }
}

//----- (00638DE0) --------------------------------------------------------
void __thiscall Char::UpdateQuestMark(Char *this)
{
  Char *v1; // esi@1
  char v2; // al@3
  MobInfo *v3; // eax@5
  NiNode *v4; // eax@8
  double v5; // st7@8
  float v6; // ST18_4@8

  v1 = this;
  if ( this->m_byType == 4
    || !this->m_bUserCharacter && (v2 = this->m_byMode, v2 != 4) && v2 != 5 && (v3 = this->m_pMobinfo) != 0 && v3->IsNPC )
  {
    if ( (unsigned __int8)((int (*)(void))this->vfptr[1].Affect)() )
    {
      v4 = v1->m_kQuestInfoView.m_spQuestInfo.m_pObject;
      v5 = v1->m_kCharShape.m_fHeight;
      v4->m_kLocal.m_Translate.x = 0.0;
      v6 = v5;
      v4->m_kLocal.m_Translate.y = 0.0;
      v4->m_kLocal.m_Translate.z = v6;
      if ( QuestDataMgr::m_bUpdate )
      {
        QuestDataMgr::GetQuest();
        CQuestInfoViewMgr::MakeQuestView(&v1->m_kQuestInfoView, v1->m_kCharShape.m_kMobID);
        ((void (__stdcall *)(NiNode *, signed int))v1->m_spScene.m_pObject->vfptr[29].__vecDelDtor)(
          v1->m_kQuestInfoView.m_spQuestInfo.m_pObject,
          1);
        v1->m_pOldParent = 0;
      }
    }
  }
}
// A771B0: using guessed type bool QuestDataMgr::m_bUpdate;

//----- (00638EB0) --------------------------------------------------------
bool __thiscall Char::IsNeverCarToon(Char *this)
{
  return this->m_bIsDoor || !this->m_kCharShape.m_kClassID && Char::IsLinkGate(this);
}

//----- (00638EE0) --------------------------------------------------------
bool __thiscall Char::IsNeverShadow(Char *this)
{
  Char *v1; // esi@1
  bool result; // al@2
  MobInfo *v3; // esi@6

  v1 = this;
  result = 1;
  if ( !this->m_bIsDoor && (this->m_kCharShape.m_kClassID || !Char::IsLinkGate(this)) )
  {
    if ( !(unsigned __int8)((int (__thiscall *)(Char *))v1->vfptr[1].Affect)(v1)
      || (v3 = v1->m_pMobinfo) == 0
      || v3->Type != 11 )
    {
      result = 0;
    }
  }
  return result;
}

//----- (00638F30) --------------------------------------------------------
void __thiscall Char::AddIceEffect(Char *this)
{
  Char *v1; // esi@1
  NiNode *v2; // edi@1

  v1 = this;
  v2 = (NiNode *)this->m_spActor.m_pObject->m_spNIFRoot.m_pObject;
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v2->vfptr[29].__vecDelDtor)(
    this->m_spActor.m_pObject->m_spNIFRoot.m_pObject,
    this->m_kAbStateVisual.spIceLight.m_pObject,
    0);
  NiDynamicEffect::AttachAffectedNode((NiDynamicEffect *)&v1->m_kAbStateVisual.spIceLight.m_pObject->vfptr, v2);
}

//----- (00638F60) --------------------------------------------------------
signed int __thiscall Char::GetEmotionIndex(Char *this, unsigned int uiEventCode)
{
  Char *v2; // esi@1
  signed int result; // eax@2
  signed int v4; // eax@3
  ActionViewInfo *v5; // eax@4

  v2 = this;
  if ( ((int (*)(void))this->vfptr[13].DeleteAbStateByAbstateIndex)() != 4
    && (v4 = ((int (__thiscall *)(_DWORD))v2->vfptr[13].~AbStateInfectee)(v2), v4 >= 0)
    && (v5 = ActionViewTable::GetByEventCode(v4)) != 0 )
  {
    result = v5->nIndex;
  }
  else
  {
    result = 0xFFFF;
  }
  return result;
}

//----- (00638FA0) --------------------------------------------------------
signed int __thiscall Char::GetArmorType(Char *this)
{
  Char *v1; // esi@1
  MobInfo *v2; // eax@2
  int v4; // edi@5
  int v5; // esi@5
  int v6; // ecx@7
  int v7; // eax@8

  v1 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[1].Affect)() )
  {
    v2 = v1->m_pMobinfo;
    if ( v2 )
      return v2->ArmorType;
  }
  else if ( g_kInventory.m_aspEquip[7].m_pObject )
  {
    v4 = g_kInventory.m_aspEquip[7].m_pObject->m_kStruct.itemid;
    v5 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v4) )
    {
      if ( (unsigned __int16)v4 <= *(_WORD *)(v5 + 200) )
      {
        v6 = *(_DWORD *)(v5 + 196);
        if ( *(_DWORD *)(v6 + 4 * v4) )
        {
          v7 = *(_DWORD *)(v6 + 4 * v4);
          if ( v7 )
            return *(_DWORD *)(v7 + 236);
        }
      }
    }
  }
  return 1;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (00639020) --------------------------------------------------------
void __thiscall Char::OnRangeHitTime(Char *this, char *pcEffName)
{
  Char *v2; // edi@1
  ActionInfo *v3; // ebx@1
  AttackSequence *v4; // esi@5
  Char *v5; // eax@7
  DamageInfoSet *v6; // esi@8

  v2 = this;
  v3 = this->m_kActionMgr.m_pkCurPlayActInfo;
  if ( v3 )
  {
    if ( !pcEffName )
      pcEffName = "Arrow";
    if ( !this->m_kAttSeqList.m_kAllocator.m_uiCount )
      goto LABEL_9;
    v4 = this->m_kAttSeqList.m_pkHead->m_element;
    if ( v4 )
    {
      if ( v4->kDamageInfoSet.kDamageList.m_kAllocator.m_uiCount )
      {
        v5 = CharMgr::GetChar(&g_kCharMgr, v4->kDamageInfoSet.kDamageList.m_pkHead->m_element->kTargetHandle);
        if ( v5 )
        {
          v6 = &v4->kDamageInfoSet;
          EffectMgr::CreateShootEff(
            &g_kEffectMgr,
            pcEffName,
            (char *)v3->EffFile,
            v3->SndFile[1],
            v2,
            v5,
            Timer::ms_fCurTime,
            800.0,
            v6,
            0,
            0);
          DamageInfoSet::Clear(v6);
LABEL_9:
          v2->m_bActionHit = 1;
          return;
        }
      }
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006390D0) --------------------------------------------------------
void __thiscall Char::OnMeleeHitTime(Char *this)
{
  AttackSequence *v1; // eax@2
  DamageInfoSet *v2; // esi@3

  if ( this->m_kAttSeqList.m_kAllocator.m_uiCount )
  {
    v1 = this->m_kAttSeqList.m_pkHead->m_element;
    if ( v1 )
    {
      v2 = &v1->kDamageInfoSet;
      DamageInfoSet::Applicate(&v1->kDamageInfoSet, this, 0);
      DamageInfoSet::Clear(v2);
    }
  }
}

//----- (00639100) --------------------------------------------------------
void __thiscall Char::Deaffect(Char *this, AbStateInst *pkAbState, bool bSudden)
{
  Char *v3; // edi@1
  int v4; // edi@7
  int v5; // ebx@7
  int *v6; // eax@9
  int v7; // eax@10
  Char *pkTarget; // [sp+24h] [bp-4h]@1

  v3 = this;
  pkTarget = this;
  AbStateInfectee::Deaffect((AbStateInfectee *)&this->vfptr, pkAbState, bSudden);
  if ( pkAbState->pkLoopingEffect )
  {
    EffectMgr::RemoveEffect(&g_kEffectMgr, pkAbState->pkLoopingEffect);
    pkAbState->pkLoopingEffect = 0;
  }
  if ( pkAbState->pkFirstEffect )
  {
    EffectMgr::RemoveEffect(&g_kEffectMgr, pkAbState->pkFirstEffect);
    pkAbState->pkFirstEffect = 0;
  }
  if ( bSudden || pkAbState->acLastEffectName[0] == 45 )
    goto LABEL_12;
  v4 = ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;
  v5 = pkAbState->kID;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable,
                          v5) )
  {
    if ( (unsigned __int16)v5 <= *(_WORD *)(v4 + 200) )
    {
      v6 = (int *)(*(_DWORD *)(v4 + 196) + 4 * v5);
      if ( *v6 )
      {
        v7 = *v6;
        if ( v7 )
        {
          EffectMgr::CreateAttachEffect(
            &g_kEffectMgr,
            (unsigned int *)&bSudden,
            pkAbState->acLastEffectName,
            pkTarget,
            *(AbnormalStateViewInfo::EffPosEnum *)(v7 + 466),
            Timer::ms_fCurTime,
            0,
            0,
            0,
            1);
          v3 = pkTarget;
LABEL_12:
          Char::SetAbstateDeaffect(v3, pkAbState);
          return;
        }
      }
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8C2A4: using guessed type int ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;

//----- (006391D0) --------------------------------------------------------
char __thiscall Char::GetAttackActionCode(Char *this, char byActionCode)
{
  Char *v2; // esi@1
  unsigned int v3; // eax@4
  char v4; // bl@5
  bool v5; // al@6
  bool v6; // al@10
  bool v7; // al@14
  bool v8; // al@18
  bool v9; // al@24
  bool v10; // al@28

  v2 = this;
  if ( this->m_BeforeMetamorphosisClass || this->m_kCharShape.m_kClassID )
  {
    switch ( CharShape::Get3thAniEventCodeByWeapon(&this->m_kCharShape) )
    {
      default:
        goto $LN22_40;
      case 10:
      case 20:
      case 30:
      case 40:
      case 50:
      case 60:
      case 70:
      case 80:
      case 90:
        v4 = v2->m_BeforeMetamorphosisClass;
        if ( v4 )
          v5 = CharClass::IsKindOf(v2->m_BeforeMetamorphosisClass, 11);
        else
          v5 = CharClass::IsKindOf(v2->m_kCharShape.m_kClassID, 11);
        if ( v5 )
          goto LABEL_21;
        if ( v4 )
          v6 = CharClass::IsKindOf(v4, 1);
        else
          v6 = CharClass::IsKindOf(v2->m_kCharShape.m_kClassID, 1);
        if ( v6 )
          goto LABEL_31;
        v7 = v4 ? CharClass::IsKindOf(v4, 6) : CharClass::IsKindOf(v2->m_kCharShape.m_kClassID, 6);
        if ( v7 )
          goto LABEL_31;
        if ( v4 )
          v8 = CharClass::IsKindOf(v4, 16);
        else
          v8 = CharClass::IsKindOf(v2->m_kCharShape.m_kClassID, 16);
        if ( v8 )
        {
LABEL_21:
          LOBYTE(v3) = byActionCode & 1;
          if ( (byActionCode & 1) < 0 )
            v3 = (((_BYTE)v3 - 1) | 0xFFFFFFFE) + 1;
        }
        else
        {
          if ( v4 )
            v9 = CharClass::IsKindOf(v4, 21);
          else
            v9 = CharClass::IsKindOf(v2->m_kCharShape.m_kClassID, 21);
          if ( v9
            || (v4 ? (v10 = CharClass::IsKindOf(v4, 26)) : (v10 = CharClass::IsKindOf(v2->m_kCharShape.m_kClassID, 26)),
                v10) )
          {
LABEL_31:
            LOBYTE(v3) = (unsigned __int8)byActionCode % 6;
          }
          else
          {
            LOBYTE(v3) = 0;
          }
        }
        break;
    }
  }
  else
  {
$LN22_40:
    LOBYTE(v3) = 0;
  }
  return v3;
}

//----- (006393A0) --------------------------------------------------------
NiPoint3 *__userpurge Char::GetHeightPos@<eax>(Char *this@<ecx>, int a2@<ebx>, NiPoint3 *result)
{
  Char *v3; // edi@1
  int v4; // eax@1
  float v5; // ecx@1
  NiPoint3 *v6; // esi@1
  float v7; // edx@1
  float v8; // eax@1
  char v9; // al@1
  NiActorManager *v10; // eax@3
  int v11; // eax@4
  NiPoint3 *v12; // eax@5
  int v13; // eax@7
  int v14; // ebx@8
  unsigned int v15; // eax@9
  const char *v16; // eax@10
  int v17; // eax@12
  float v18; // ecx@13
  float v19; // edx@13
  float v20; // eax@13
  NiActorManager *v21; // eax@15
  NiAVObject *v22; // ecx@16
  int v23; // eax@17
  float v24; // ecx@18
  float v25; // edx@18
  float v26; // eax@18
  int v27; // ecx@21
  int v28; // edx@21
  NiPoint3 *resulta; // [sp+1Ch] [bp+8h]@5
  NiPoint3 *resultb; // [sp+1Ch] [bp+8h]@14
  NiPoint3 *resultc; // [sp+1Ch] [bp+8h]@19

  v3 = this;
  v4 = ((int (*)(void))this->vfptr[6].Deaffect)();
  v5 = *(float *)v4;
  v6 = result;
  v7 = *(float *)(v4 + 4);
  v8 = *(float *)(v4 + 8);
  result->x = v5;
  result->y = v7;
  result->z = v8;
  v9 = v3->m_byMode;
  if ( v9 == 4 || v9 == 5 )
  {
    v11 = ((int (__stdcall *)(const char *))v3->m_spHouseNode.m_pObject->vfptr[18].__vecDelDtor)("Name");
    if ( v11 )
    {
LABEL_21:
      v27 = *(_DWORD *)(v11 + 140);
      v28 = *(_DWORD *)(v11 + 144);
      result->z = *(float *)(v11 + 148);
      return result;
    }
    v12 = result;
    result->z = result->z + 56.0;
  }
  else
  {
    v10 = v3->m_kRidePetCtl.m_spPetActor.m_pObject;
    if ( v10 )
    {
      v11 = ((int (__stdcall *)(const char *))v10->m_spNIFRoot.m_pObject->vfptr[18].__vecDelDtor)("#Name");
      if ( !v11 )
      {
        v12 = result;
        *(float *)&resulta = v3->m_kCharShape.m_fHeight * 0.5 + result->z;
        v6->z = *(float *)&resulta + v3->m_fChairHeight;
        return v12;
      }
      goto LABEL_21;
    }
    if ( v3->m_pkMover )
    {
      v13 = ((int (__thiscall *)(AttackSequenceManagerVtbl **, int))v3->m_pkMover->vfptr->GetActor)(
              &v3->m_pkMover->vfptr,
              a2);
      if ( v13
        && (v14 = *(_DWORD *)(v13 + 12)) != 0
        && ((v15 = v3->m_uiMoverSlot) != 0 ? (v16 = fs("#Name%02d", v15 + 1)) : (v16 = "#Name"),
            (v17 = (*(int (__thiscall **)(int, const char *))(*(_DWORD *)v14 + 72))(v14, v16)) != 0) )
      {
        v18 = *(float *)(v17 + 140);
        v19 = *(float *)(v17 + 144);
        v20 = *(float *)(v17 + 148);
        result->x = v18;
        result->y = v19;
        result->z = v20;
        v12 = result;
      }
      else
      {
        v12 = result;
        *(float *)&resultb = v3->m_kCharShape.m_fHeight + result->z;
        v6->z = *(float *)&resultb + v3->m_fChairHeight;
      }
    }
    else
    {
      v21 = v3->m_spActor.m_pObject;
      if ( v21
        && (v22 = v21->m_spNIFRoot.m_pObject) != 0
        && (v23 = ((int (__stdcall *)(const char *))v22->vfptr[18].__vecDelDtor)("#Name")) != 0 )
      {
        v24 = *(float *)(v23 + 140);
        v25 = *(float *)(v23 + 144);
        v26 = *(float *)(v23 + 148);
        result->x = v24;
        result->y = v25;
        result->z = v26;
        v12 = result;
      }
      else
      {
        v12 = result;
        *(float *)&resultc = v3->m_kCharShape.m_fHeight + result->z;
        v6->z = *(float *)&resultc + v3->m_fChairHeight;
      }
    }
  }
  return v12;
}

//----- (00639590) --------------------------------------------------------
bool __thiscall Char::Equip(Char *this, int kItemID)
{
  int v2; // ebx@1
  int v3; // edi@1
  Char *v4; // esi@1
  int *v5; // eax@3
  int v6; // edi@4
  int v7; // eax@5
  int v8; // eax@13
  bool result; // al@14
  int v10; // eax@28
  bool v11; // zf@30
  int v12; // eax@37
  unsigned int uiFirstCode; // [sp+Ch] [bp-8h]@24
  bool re; // [sp+13h] [bp-1h]@24

  v2 = kItemID;
  v3 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  v4 = this;
  if ( !(unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                           ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                           kItemID) )
    return 0;
  if ( (unsigned __int16)kItemID > *(_WORD *)(v3 + 200) )
    return 0;
  v5 = (int *)(*(_DWORD *)(v3 + 196) + 4 * (unsigned __int16)kItemID);
  if ( !*v5 )
    return 0;
  v6 = *v5;
  if ( !*v5 )
    return 0;
  v7 = *(_DWORD *)(v6 + 110);
  LOBYTE(v2) = 0;
  if ( v7 == 10 || v7 == 12 || v7 == 11 || v7 == 13 || v7 == 29 )
    LOBYTE(v2) = 1;
  if ( v4->m_kTargetResourceHandle != -1 && (_BYTE)v2 == 1 )
  {
    v4->m_kEquippedBackup.iBackupCase = 1;
    v8 = *(_DWORD *)(v6 + 110);
    if ( v8 == 12 )
    {
      v4->m_kEquippedBackup.kCase1.kPrevRightHandEquipItemID = *(_WORD *)v6;
      v4->m_kEquippedBackup.kCase1.byPrevRightHandUpgrade = 0;
      v4->m_kEquippedBackup.bUnEquipRightHand = 0;
      return 0;
    }
    if ( v8 == 10 )
    {
      v4->m_kEquippedBackup.kCase1.kPrevLeftHandEquipItemID = *(_WORD *)v6;
      v4->m_kEquippedBackup.kCase1.byPrevLeftHandUpgrade = 0;
      v4->m_kEquippedBackup.bUnEquipLeftHand = 0;
      return 0;
    }
    if ( v8 == 13 )
    {
      v4->m_kEquippedBackup.kCase1.kPrevRightHandAccItemID = *(_WORD *)v6;
      v4->m_kEquippedBackup.bUnEquipRightHandAcc = 0;
      return 0;
    }
    if ( v8 == 11 )
    {
      v4->m_kEquippedBackup.kCase1.kPrevLeftHandAccItemID = *(_WORD *)v6;
      v4->m_kEquippedBackup.bUnEquipLeftHand = 0;
      return 0;
    }
    if ( v8 == 29 )
    {
      v4->m_kEquippedBackup.kCase1.kPrevShieldAccItemID = *(_WORD *)v6;
      v4->m_kEquippedBackup.bUnEquipShieldAcc = 0;
    }
    return 0;
  }
  Char::GetAniCode(v4, 0, &uiFirstCode, 0);
  re = 0;
  if ( (_BYTE)v2 )
  {
    if ( uiFirstCode != 300000 && uiFirstCode != 600000 && uiFirstCode != 700000 )
    {
      re = CharShape::Equip(&v4->m_kCharShape, kItemID);
      v10 = *(_DWORD *)(v6 + 110);
      if ( v10 == 10 || v10 == 12 )
      {
        if ( *(_DWORD *)(v6 + 232) )
        {
          CharShape::ReEquipWeaponCostume(&v4->m_kCharShape, v2);
LABEL_36:
          Char::UpdateActbyEquip(v4);
          result = re;
          v4->m_kAttackEquipBackup.kCase1.kPrevRightHandEquipItemID = -1;
          v4->m_kAttackEquipBackup.kCase1.kPrevLeftHandEquipItemID = -1;
          v4->m_kAttackEquipBackup.iBackupCase = 0;
          *(_WORD *)&v4->m_kAttackEquipBackup.bUnEquipLeftHand = 0;
          return result;
        }
        v11 = *(_DWORD *)(v6 + 102) == 7;
      }
      else
      {
        v11 = v10 == 29;
      }
      if ( v11 )
        CharShape::ReEquipShieldCostume(&v4->m_kCharShape);
      goto LABEL_36;
    }
    v4->m_kAttackEquipBackup.iBackupCase = 1;
    v12 = *(_DWORD *)(v6 + 110);
    if ( v12 == 12 )
    {
      v4->m_kAttackEquipBackup.kCase1.kPrevRightHandEquipItemID = *(_WORD *)v6;
      result = re;
      v4->m_kAttackEquipBackup.kCase1.byPrevRightHandUpgrade = 0;
      v4->m_kAttackEquipBackup.bUnEquipRightHand = 0;
      return result;
    }
    if ( v12 == 10 )
    {
      result = re;
      v4->m_kAttackEquipBackup.kCase1.kPrevLeftHandEquipItemID = *(_WORD *)v6;
      v4->m_kAttackEquipBackup.kCase1.byPrevLeftHandUpgrade = 0;
      v4->m_kAttackEquipBackup.bUnEquipLeftHand = 0;
      return result;
    }
    if ( v12 == 13 )
    {
      result = re;
      v4->m_kAttackEquipBackup.kCase1.kPrevRightHandAccItemID = *(_WORD *)v6;
      v4->m_kAttackEquipBackup.bUnEquipRightHandAcc = 0;
      return result;
    }
    if ( v12 == 11 )
    {
      v4->m_kAttackEquipBackup.kCase1.kPrevLeftHandAccItemID = *(_WORD *)v6;
      result = re;
      v4->m_kAttackEquipBackup.bUnEquipLeftHandAcc = 0;
      return result;
    }
    if ( v12 == 29 )
    {
      result = re;
      v4->m_kAttackEquipBackup.kCase1.kPrevShieldAccItemID = *(_WORD *)v6;
      v4->m_kAttackEquipBackup.bUnEquipShieldAcc = 0;
      return result;
    }
  }
  else
  {
    re = CharShape::Equip(&v4->m_kCharShape, kItemID);
  }
  return re;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (00639890) --------------------------------------------------------
bool __thiscall Char::Equip(Char *this, int kItemID, char byUpgrade)
{
  int v3; // ebx@1
  int v4; // edi@1
  Char *v5; // esi@1
  int v6; // edi@2
  int *v7; // eax@5
  int v8; // eax@9
  bool result; // al@15
  unsigned __int16 v10; // dx@16
  int v11; // eax@21
  bool v12; // zf@23
  unsigned __int16 v13; // dx@32
  unsigned int uiFirstCode; // [sp+Ch] [bp-8h]@17
  bool re; // [sp+13h] [bp-1h]@17

  v3 = kItemID;
  v4 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  v5 = this;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                          ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                          kItemID) )
  {
    if ( (unsigned __int16)kItemID <= *(_WORD *)(v4 + 200) )
    {
      v7 = (int *)(*(_DWORD *)(v4 + 196) + 4 * (unsigned __int16)kItemID);
      if ( *v7 )
        v6 = *v7;
      else
        v6 = 0;
    }
    else
    {
      v6 = 0;
    }
  }
  else
  {
    v6 = 0;
  }
  LOBYTE(v3) = 0;
  if ( v6 )
  {
    v8 = *(_DWORD *)(v6 + 110);
    if ( v8 == 10 || v8 == 12 )
      LOBYTE(v3) = 1;
  }
  if ( v5->m_kTargetResourceHandle != -1 && (_BYTE)v3 == 1 )
  {
    v5->m_kEquippedBackup.iBackupCase = 1;
    if ( *(_DWORD *)(v6 + 110) == 12 )
    {
      v5->m_kEquippedBackup.kCase1.kPrevRightHandEquipItemID = *(_WORD *)v6;
      v5->m_kEquippedBackup.kCase1.byPrevRightHandUpgrade = byUpgrade;
      v5->m_kEquippedBackup.bUnEquipRightHand = 0;
      result = 0;
    }
    else
    {
      v10 = *(_WORD *)v6;
      v5->m_kEquippedBackup.kCase1.byPrevLeftHandUpgrade = byUpgrade;
      v5->m_kEquippedBackup.kCase1.kPrevLeftHandEquipItemID = v10;
      v5->m_kEquippedBackup.bUnEquipLeftHand = 0;
      result = 0;
    }
    return result;
  }
  Char::GetAniCode(v5, 0, &uiFirstCode, 0);
  re = 0;
  if ( !(_BYTE)v3 )
    return CharShape::Equip(&v5->m_kCharShape, kItemID, byUpgrade);
  if ( uiFirstCode != 300000 && uiFirstCode != 600000 && uiFirstCode != 700000 )
  {
    re = CharShape::Equip(&v5->m_kCharShape, kItemID, byUpgrade);
    v11 = *(_DWORD *)(v6 + 110);
    if ( v11 == 10 || v11 == 12 )
    {
      if ( *(_DWORD *)(v6 + 232) )
      {
        CharShape::ReEquipWeaponCostume(&v5->m_kCharShape, v3);
LABEL_29:
        Char::UpdateActbyEquip(v5);
        result = re;
        v5->m_kAttackEquipBackup.kCase1.kPrevRightHandEquipItemID = -1;
        v5->m_kAttackEquipBackup.kCase1.kPrevLeftHandEquipItemID = -1;
        v5->m_kAttackEquipBackup.iBackupCase = 0;
        *(_WORD *)&v5->m_kAttackEquipBackup.bUnEquipLeftHand = 0;
        return result;
      }
      v12 = *(_DWORD *)(v6 + 102) == 7;
    }
    else
    {
      v12 = v11 == 29;
    }
    if ( v12 )
      CharShape::ReEquipShieldCostume(&v5->m_kCharShape);
    goto LABEL_29;
  }
  v5->m_kAttackEquipBackup.iBackupCase = 1;
  if ( *(_DWORD *)(v6 + 110) == 12 )
  {
    v5->m_kAttackEquipBackup.kCase1.kPrevRightHandEquipItemID = *(_WORD *)v6;
    result = re;
    v5->m_kAttackEquipBackup.kCase1.byPrevRightHandUpgrade = byUpgrade;
    v5->m_kAttackEquipBackup.bUnEquipRightHand = 0;
  }
  else
  {
    v13 = *(_WORD *)v6;
    v5->m_kAttackEquipBackup.kCase1.byPrevLeftHandUpgrade = byUpgrade;
    result = re;
    v5->m_kAttackEquipBackup.kCase1.kPrevLeftHandEquipItemID = v13;
    v5->m_kAttackEquipBackup.bUnEquipLeftHand = 0;
  }
  return result;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (00639AB0) --------------------------------------------------------
char __thiscall Char::Equip(Char *this, Item *_pItem)
{
  ItemInfo *v2; // edi@1
  char v3; // al@1
  Char *v4; // esi@1
  ItemEquipEnum v5; // ecx@2
  ItemEquipEnum v6; // ecx@4
  ItemEquipEnum v7; // eax@10
  char result; // al@11
  char v9; // al@25
  ItemInfo *v10; // ebx@25
  ItemEquipEnum v11; // eax@25
  bool v12; // zf@27
  ItemEquipEnum v13; // eax@34
  int v14; // edi@37
  unsigned int uiFirstCode; // [sp+Ch] [bp-4h]@22
  bool re_3; // [sp+1Bh] [bp+Bh]@25

  v2 = _pItem->m_pkInfo;
  v3 = 0;
  v4 = this;
  if ( v2 && ((v5 = v2->Equip, v5 == 10) || v5 == 12) || (v6 = v2->Equip, v6 == 11) || v6 == 13 || v6 == 29 )
    v3 = 1;
  if ( v4->m_kTargetResourceHandle != -1 && v3 == 1 )
  {
    v4->m_kEquippedBackup.iBackupCase = 1;
    v7 = v2->Equip;
    switch ( v7 )
    {
      case 12:
        v4->m_kEquippedBackup.kCase1.kPrevRightHandEquipItemID = v2->ID;
        v4->m_kEquippedBackup.kCase1.byPrevRightHandUpgrade = _pItem->m_kStruct.itemattr.blot.lot;
        v4->m_kEquippedBackup.bUnEquipRightHand = 0;
        result = 0;
        break;
      case 10:
        v4->m_kEquippedBackup.kCase1.kPrevLeftHandEquipItemID = v2->ID;
        v4->m_kEquippedBackup.kCase1.byPrevLeftHandUpgrade = 0;
        v4->m_kEquippedBackup.bUnEquipLeftHand = 0;
        result = 0;
        break;
      case 13:
        v4->m_kEquippedBackup.kCase1.kPrevRightHandAccItemID = v2->ID;
        v4->m_kEquippedBackup.bUnEquipRightHandAcc = 0;
        result = 0;
        break;
      case 11:
        v4->m_kEquippedBackup.kCase1.kPrevLeftHandAccItemID = v2->ID;
        v4->m_kEquippedBackup.bUnEquipLeftHandAcc = 0;
        result = 0;
        break;
      default:
        if ( v7 == 29 )
        {
          v4->m_kEquippedBackup.kCase1.kPrevShieldAccItemID = v2->ID;
          v4->m_kEquippedBackup.bUnEquipShieldAcc = 0;
        }
        result = 0;
        break;
    }
    return result;
  }
  if ( !v3 )
    return CharShape::Equip(&v4->m_kCharShape, (int)_pItem, _pItem);
  Char::GetAniCode(v4, 0, &uiFirstCode, 0);
  if ( uiFirstCode != 300000 && uiFirstCode != 600000 && uiFirstCode != 700000 )
  {
    v9 = CharShape::Equip(&v4->m_kCharShape, (int)_pItem, _pItem);
    v10 = _pItem->m_pkInfo;
    re_3 = v9;
    v11 = v10->Equip;
    if ( v11 == 10 || v11 == 12 )
    {
      if ( v10->WeaponType )
      {
        CharShape::ReEquipWeaponCostume(&v4->m_kCharShape, (int)v10);
LABEL_33:
        Char::UpdateActbyEquip(v4);
        v4->m_kAttackEquipBackup.kCase1.kPrevRightHandEquipItemID = -1;
        result = re_3;
        v4->m_kAttackEquipBackup.kCase1.kPrevLeftHandEquipItemID = -1;
        v4->m_kAttackEquipBackup.iBackupCase = 0;
        *(_WORD *)&v4->m_kAttackEquipBackup.bUnEquipLeftHand = 0;
        return result;
      }
      v12 = v2->Class == 7;
    }
    else
    {
      v12 = v11 == 29;
    }
    if ( v12 )
      CharShape::ReEquipShieldCostume(&v4->m_kCharShape);
    goto LABEL_33;
  }
  v4->m_kAttackEquipBackup.iBackupCase = 1;
  v13 = v2->Equip;
  if ( v13 == 12 )
  {
    v4->m_kAttackEquipBackup.kCase1.kPrevRightHandEquipItemID = v2->ID;
    v4->m_kAttackEquipBackup.kCase1.byPrevRightHandUpgrade = _pItem->m_kStruct.itemattr.blot.lot;
    v4->m_kAttackEquipBackup.bUnEquipRightHand = 0;
    return 0;
  }
  switch ( v13 )
  {
    case 10:
      v4->m_kAttackEquipBackup.kCase1.kPrevLeftHandEquipItemID = v2->ID;
      v14 = v2->Class - 5;
      if ( v14 )
      {
        if ( v14 == 2 )
        {
          v4->m_kAttackEquipBackup.kCase1.byPrevLeftHandUpgrade = _pItem->m_kStruct.itemattr.blot.lot;
          v4->m_kAttackEquipBackup.bUnEquipLeftHand = 0;
          return 0;
        }
      }
      else
      {
        v4->m_kAttackEquipBackup.kCase1.byPrevLeftHandUpgrade = _pItem->m_kStruct.itemattr.blot.lot;
      }
      v4->m_kAttackEquipBackup.bUnEquipLeftHand = 0;
      result = 0;
      break;
    case 13:
      v4->m_kAttackEquipBackup.kCase1.kPrevRightHandAccItemID = v2->ID;
      v4->m_kAttackEquipBackup.bUnEquipRightHandAcc = 0;
      result = 0;
      break;
    case 11:
      v4->m_kAttackEquipBackup.kCase1.kPrevLeftHandAccItemID = v2->ID;
      v4->m_kAttackEquipBackup.bUnEquipLeftHandAcc = 0;
      result = 0;
      break;
    default:
      if ( v13 == 29 )
      {
        v4->m_kAttackEquipBackup.kCase1.kPrevShieldAccItemID = v2->ID;
        v4->m_kAttackEquipBackup.bUnEquipShieldAcc = 0;
      }
      result = 0;
      break;
  }
  return result;
}

//----- (00639DB0) --------------------------------------------------------
bool __thiscall Char::UnEquip(Char *this, unsigned int uiEquipPos)
{
  unsigned int v2; // edi@1
  char v3; // al@1
  Char *v4; // esi@1
  bool result; // al@10
  bool v6; // bl@24

  v2 = uiEquipPos;
  v3 = 0;
  v4 = this;
  if ( uiEquipPos == 10 || uiEquipPos == 12 || uiEquipPos == 11 || uiEquipPos == 13 || uiEquipPos == 29 )
    v3 = 1;
  if ( this->m_kTargetResourceHandle == -1 || v3 != 1 )
  {
    if ( v3 )
    {
      Char::GetAniCode(this, 0, &uiEquipPos, 0);
      if ( uiEquipPos == 300000 || uiEquipPos == 600000 || uiEquipPos == 700000 )
      {
        v4->m_kAttackEquipBackup.iBackupCase = 1;
        switch ( v2 )
        {
          case 0xAu:
            v4->m_kAttackEquipBackup.bUnEquipLeftHand = 1;
            v4->m_kAttackEquipBackup.kCase1.kPrevLeftHandEquipItemID = -1;
            v4->m_kAttackEquipBackup.kCase1.byPrevLeftHandUpgrade = 0;
            result = 0;
            break;
          case 0xCu:
            v4->m_kAttackEquipBackup.bUnEquipRightHand = 1;
            v4->m_kAttackEquipBackup.kCase1.kPrevRightHandEquipItemID = -1;
            v4->m_kAttackEquipBackup.kCase1.byPrevRightHandUpgrade = 0;
            result = 0;
            break;
          case 0xDu:
            result = 0;
            v4->m_kAttackEquipBackup.bUnEquipRightHandAcc = 1;
            v4->m_kAttackEquipBackup.kCase1.kPrevRightHandAccItemID = -1;
            break;
          case 0xBu:
            v4->m_kAttackEquipBackup.bUnEquipLeftHandAcc = 1;
            v4->m_kAttackEquipBackup.kCase1.kPrevLeftHandAccItemID = -1;
            result = 0;
            break;
          default:
            if ( v2 == 29 )
            {
              v4->m_kAttackEquipBackup.kCase1.kPrevShieldAccItemID = -1;
              v4->m_kAttackEquipBackup.bUnEquipShieldAcc = 1;
            }
            result = 0;
            break;
        }
      }
      else
      {
        v6 = CharShape::UnEquip(&v4->m_kCharShape, v2);
        Char::UpdateActbyEquip(v4);
        v4->m_kAttackEquipBackup.kCase1.kPrevLeftHandEquipItemID = -1;
        v4->m_kAttackEquipBackup.kCase1.kPrevRightHandEquipItemID = -1;
        v4->m_kAttackEquipBackup.iBackupCase = 0;
        *(_WORD *)&v4->m_kAttackEquipBackup.bUnEquipLeftHand = 0;
        result = v6;
      }
    }
    else
    {
      result = CharShape::UnEquip(&this->m_kCharShape, uiEquipPos);
    }
  }
  else
  {
    switch ( uiEquipPos )
    {
      case 0xAu:
        this->m_kEquippedBackup.bUnEquipLeftHand = 1;
        this->m_kEquippedBackup.kCase1.kPrevLeftHandEquipItemID = -1;
        this->m_kEquippedBackup.kCase1.byPrevLeftHandUpgrade = 0;
        result = 0;
        break;
      case 0xCu:
        result = 0;
        this->m_kEquippedBackup.kCase1.kPrevRightHandEquipItemID = -1;
        this->m_kEquippedBackup.bUnEquipRightHand = 1;
        this->m_kEquippedBackup.kCase1.byPrevRightHandUpgrade = 0;
        break;
      case 0xBu:
        this->m_kEquippedBackup.bUnEquipLeftHandAcc = 1;
        this->m_kEquippedBackup.kCase1.kPrevLeftHandAccItemID = -1;
        result = 0;
        break;
      case 0xDu:
        this->m_kEquippedBackup.bUnEquipRightHandAcc = 1;
        this->m_kEquippedBackup.kCase1.kPrevRightHandAccItemID = -1;
        result = 0;
        break;
      default:
        if ( uiEquipPos == 29 )
        {
          this->m_kEquippedBackup.kCase1.kPrevShieldAccItemID = -1;
          this->m_kEquippedBackup.bUnEquipShieldAcc = 1;
        }
        result = 0;
        break;
    }
  }
  return result;
}

//----- (00639FE0) --------------------------------------------------------
void __thiscall Char::ExecuteDyingProcess(Char *this)
{
  Char *v1; // esi@1
  char v2; // bl@6
  bool (__thiscall *v3)(AbStateInfectee *, ABSTATEINDEX, float, bool); // eax@6

  v1 = this;
  if ( Char::IsActRunning(this) && !Char::CheckActState(v1, 500000) )
    ((void (__thiscall *)(Char *))v1->vfptr[10].DeleteAbStateByAbstateIndex)(v1);
  if ( JumpProcessor::IsJump(&v1->m_kJumpProcessor) )
    ((void (__thiscall *)(Char *))v1->vfptr[10].DeleteAbStateByAbstateIndex)(v1);
  v1->m_bAniStop = 0;
  PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  ((void (__thiscall *)(Char *, _DWORD, signed int))v1->vfptr[1].SetAbStateProperty)(v1, 0, 4);
  AttackSequenceManager::ClearAttSeq((AttackSequenceManager *)&v1->vfptr);
  AttackSequenceManager::ClearSkillSeq((AttackSequenceManager *)&v1->vfptr);
  v2 = ((int (__thiscall *)(Char *))v1->vfptr[1].AddAbStateByAbstateIndex)(v1);
  v1->m_byMode = 3;
  Char::OnDead(v1);
  v3 = v1->vfptr[1].AddAbStateByAbstateIndex;
  v1->m_eStandMode = 0;
  if ( v2 != (unsigned __int8)((int (__thiscall *)(Char *))v3)(v1) )
    v1->m_bIsChangeCampMode = 1;
  ((void (__thiscall *)(Char *, _DWORD))v1->vfptr[4].Affect)(v1, 0);
  ((void (__thiscall *)(Char *, signed int))v1->vfptr[7].AddAbStateByAbstateIndex)(v1, 1);
  ((void (__thiscall *)(Char *))v1->vfptr[14].AddAbStateByAbstateIndex)(v1);
  DecalMgr::RemoveCharDecal(&stru_B26354, v1->m_kHandle);
}

//----- (0063A0D0) --------------------------------------------------------
void __thiscall Char::CorrectAniSequence(Char *this)
{
  Char *v1; // esi@1
  NiActorManager *v2; // eax@1
  NiControllerManager *v3; // ebx@2
  int v4; // ecx@3
  int v5; // edi@3
  NiControllerSequence *v6; // eax@4
  int ncnt; // [sp+4h] [bp-4h]@3

  v1 = this;
  v2 = this->m_spActor.m_pObject;
  if ( v2 )
  {
    v3 = v2->m_spManager.m_pObject;
    if ( v3 )
    {
      v4 = v3->m_kSequenceArray.m_uiSize;
      v5 = 0;
      for ( ncnt = v4; v5 < v4; ++v5 )
      {
        v6 = v3->m_kSequenceArray.m_pBase[v5].m_pObject;
        if ( v6
          && v6->m_eState == 1
          && v1->m_pkLeftSeq != v6
          && v1->m_pkRightSeq != v6
          && v1->m_pkUpSeq != v6
          && v1->m_pkDownSeq != v6 )
        {
          NiActorManager::FindSequenceID(v1->m_spActor.m_pObject, v6->m_pcName);
          v4 = ncnt;
        }
      }
    }
  }
}

//----- (0063A150) --------------------------------------------------------
void __usercall Char::ActNormalStand(Char *this@<ecx>, int a2@<ebx>, int a3@<edi>)
{
  Char *v3; // esi@1
  NiActorManager *v4; // ecx@3
  char v5; // al@11
  MobInfo *v6; // eax@13
  void (__thiscall *v7)(AbStateInfectee *); // eax@16
  Char *v8; // ecx@16
  MobInfo *v9; // eax@23

  v3 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[15].Deaffect)() )
  {
    if ( v3->m_kRidePetCtl.m_spPetActor.m_pObject )
    {
      v3->vfptr[11].~AbStateInfectee((AbStateInfectee *)v3);
      v4 = v3->m_kRidePetCtl.m_spPetActor.m_pObject;
      if ( v3->m_kRidePetCtl.m_uiStandEventCode != v4->m_eTargetID )
      {
        if ( v4 )
          NiActorManager::SetTargetAnimation(v4, v3->m_kRidePetCtl.m_uiStandEventCode);
        CRidePetCtl::StartAction(&v3->m_kRidePetCtl, v3->m_kRidePetCtl.m_uiStandEventCode);
      }
    }
    return;
  }
  if ( !v3->m_BeforeMetamorphosisClass && !v3->m_kCharShape.m_kClassID )
  {
    if ( v3->m_byType != 4 )
    {
      if ( v3->m_bUserCharacter || (v5 = v3->m_byMode, v5 == 4) || v5 == 5 || (v6 = v3->m_pMobinfo) == 0 || !v6->IsNPC )
      {
        if ( !v3->m_bIsDoor )
        {
          v7 = v3->vfptr[10].~AbStateInfectee;
          v8 = v3;
LABEL_26:
          v7((AbStateInfectee *)&v8->vfptr);
          return;
        }
      }
    }
    goto LABEL_27;
  }
  if ( v3->m_bUserCharacter != 1 )
  {
    if ( !Char::IsNPC(v3) && !v3->m_bIsDoor )
    {
      v9 = v3->m_pMobinfo;
      if ( !v9 || v9->Type != 24 )
      {
        v7 = v3->vfptr[10].~AbStateInfectee;
        v8 = v3;
        goto LABEL_26;
      }
    }
LABEL_27:
    Char::ActAction(v3, a2, a3, STAND, NORMALSTAND);
    return;
  }
  if ( !Char::ActAction(v3, a2, a3, STAND, NORMALSTAND)
    && (unsigned __int8)((int (__thiscall *)(_DWORD))v3->vfptr[20].Deaffect)(v3) )
  {
    Char::ActAction(v3, a2, a3, STAND, COMBATSTAND);
  }
}

//----- (0063A290) --------------------------------------------------------
void __userpurge Char::SetItemAutoUseBuff(Char *this@<ecx>, int a2@<esi>, int bUse)
{
  bool v3; // al@1

  v3 = bUse;
  this->m_bBuffItemAutoUse = bUse;
  if ( (_BYTE)bUse || this->m_bChargedItemAutoUse )
    v3 = 1;
  LOBYTE(bUse) = v3;
  this->m_kCharShape.m_bAutoUseItem = v3;
  CharShape::SetMinimonAutoUseEff(&this->m_kCharShape, a2, bUse);
}

//----- (0063A2D0) --------------------------------------------------------
void __userpurge Char::SetItemAutoUseCharged(Char *this@<ecx>, int a2@<esi>, int bUse)
{
  bool v3; // zf@1
  bool v4; // al@1

  v3 = this->m_bBuffItemAutoUse == 0;
  v4 = bUse;
  this->m_bChargedItemAutoUse = bUse;
  if ( !v3 || (_BYTE)bUse )
    v4 = 1;
  LOBYTE(bUse) = v4;
  this->m_kCharShape.m_bAutoUseItem = v4;
  CharShape::SetMinimonAutoUseEff(&this->m_kCharShape, a2, bUse);
}

//----- (0063A310) --------------------------------------------------------
void __thiscall LinkedEffect::Show(LinkedEffect *this, int bShow)
{
  LinkedEffect *v2; // edi@1
  unsigned int *v3; // ecx@1
  int v4; // eax@1
  int v5; // esi@1
  Effect *i; // ecx@3

  v2 = this;
  v3 = this->m_vecEffectHandle._Myfirst;
  v4 = v2->m_vecEffectHandle._Mylast - v3;
  v5 = 0;
  if ( v4 > 0 )
  {
    if ( v4 > 0 )
      goto LABEL_4;
    for ( i = 0; ; i = (Effect *)v3[v5] )
    {
      EffectMgr::SetShow(&g_kEffectMgr, i, bShow, 0);
      v3 = v2->m_vecEffectHandle._Myfirst;
      if ( ++v5 >= v2->m_vecEffectHandle._Mylast - v2->m_vecEffectHandle._Myfirst )
        break;
LABEL_4:
      ;
    }
  }
}

//----- (0063A360) --------------------------------------------------------
void __thiscall Char::Update(Char *this, NiAVObject *pParent)
{
  NiAVObject *v2; // edi@1
  Char *v3; // esi@1
  char v4; // bl@3
  NiActorManager *v5; // eax@5
  NiActorManager *v6; // ecx@15
  unsigned int ui1stBaseCode; // [sp+14h] [bp-4h]@3

  v2 = pParent;
  v3 = this;
  if ( this->m_pOldParent != pParent )
  {
    NiAVObject::UpdateEffects((NiAVObject *)&this->m_spScene.m_pObject->vfptr);
    NiAVObject::UpdateProperties((NiAVObject *)&v3->m_spScene.m_pObject->vfptr);
    v3->m_pOldParent = v2;
  }
  v4 = 1;
  Char::GetAniCode(v3, 1, &ui1stBaseCode, 0);
  Char::GetAniCode(v3, 0, (unsigned int *)&pParent, 0);
  if ( pParent == (NiAVObject *)100000 && ui1stBaseCode == 100000 )
  {
    v5 = v3->m_spActor.m_pObject;
    if ( v5 )
    {
      if ( v5->m_eCurID == v5->m_eTargetID )
        v4 = 0;
    }
  }
  if ( v3->m_bCulledOld != v3->m_bCulled
    || v3->m_bIsUpdateScene
    || v4
    || (unsigned __int8)((int (__thiscall *)(_DWORD))v3->vfptr[7].~AbStateInfectee)(v3)
    || Char::IsFade(v3)
    || CQuestInfoViewMgr::IsHaveQuestState(&v3->m_kQuestInfoView)
    || JumpProcessor::IsJump(&v3->m_kJumpProcessor) )
  {
    v6 = v3->m_spActor.m_pObject;
    if ( v6 )
    {
      if ( v3->m_bAniStop )
        return;
      NiActorManager::Update(v6, v3->m_fAnimationUpdateTime);
    }
    if ( !v3->m_bAniStop )
    {
      CRidePetCtl::Update(&v3->m_kRidePetCtl, v3->m_fAnimationUpdateTime);
      NiAVObject::Update((NiAVObject *)&v3->m_spScene.m_pObject->vfptr, v3->m_fAnimationUpdateTime, 1);
    }
  }
}

//----- (0063A490) --------------------------------------------------------
char __thiscall Char::IsCharNPC(Char *this)
{
  char v1; // al@3
  MobInfo *v2; // eax@5
  char result; // al@7
  MobViewInfo *v4; // ecx@8
  char v5; // bl@8

  if ( this->m_byType == 4
    || !this->m_bUserCharacter && (v1 = this->m_byMode, v1 != 4) && v1 != 5 && (v2 = this->m_pMobinfo) != 0 && v2->IsNPC )
  {
    v4 = this->m_pMobViewInfo;
    v5 = 0;
    if ( v4 && v4->NpcViewIndex )
    {
      if ( NPCViewInfoTab::GetByID(v4->NpcViewIndex) )
        v5 = 1;
    }
    result = v5;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0063A4F0) --------------------------------------------------------
bool __thiscall Char::IsCharMob(Char *this)
{
  MobInfo *v1; // eax@1
  MobViewInfo *v2; // ecx@2
  bool result; // al@6

  v1 = this->m_pMobinfo;
  result = 0;
  if ( v1 )
  {
    v2 = this->m_pMobViewInfo;
    if ( v2 )
    {
      if ( !v1->IsNPC && v2->NpcViewIndex && NPCViewInfoTab::GetByID(v2->NpcViewIndex) )
        result = 1;
    }
  }
  return result;
}

//----- (0063A530) --------------------------------------------------------
bool __thiscall Char::HaveEventNPCAction(Char *this)
{
  return NPCViewInfoTab::GetByID(this->m_pMobViewInfo->NpcViewIndex)->bUseEventAction != 0;
}

//----- (0063A550) --------------------------------------------------------
bool __thiscall Char::ApplyCharNpcBaseAction(Char *this, bool bFirstCall)
{
  Char *v2; // esi@1
  CharNPC_ViewInfo *v3; // edi@1
  NiActorManager *v4; // eax@3
  unsigned int v5; // ecx@3
  bool result; // al@8
  void (__thiscall *v7)(AbStateInfectee *, ABSTATEINDEX, bool, int); // edx@9

  v2 = this;
  v3 = NPCViewInfoTab::GetByID(this->m_pMobViewInfo->NpcViewIndex);
  if ( !v3->BaseActionCode || ((int (__thiscall *)(Char *))v2->vfptr[11].DeleteAbStateByAbstateIndex)(v2) )
  {
    result = 0;
  }
  else
  {
    v4 = v2->m_spActor.m_pObject;
    v5 = v3->BaseActionCode;
    if ( v4->m_eTargetID != v5 || bFirstCall == 1 )
    {
      v7 = v2->vfptr[10].SetAbStateProperty;
      v2->m_fActionTimer = 0.0;
      v2->m_byCharNPCActionState = 0;
      v7((AbStateInfectee *)&v2->vfptr, (ABSTATEINDEX)v3->BaseActionCode, 0, 0);
    }
    else if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
                (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v4->m_kSequenceMap,
                v5,
                (NiVBSet **)&bFirstCall)
           && bFirstCall
           && *(_DWORD *)(bFirstCall + 36) )
    {
      NiActorManager::Reset(v2->m_spActor.m_pObject);
      return 1;
    }
    result = 1;
  }
  return result;
}

//----- (0063A610) --------------------------------------------------------
void __thiscall Char::SetMobID(Char *this, int kMobID)
{
  Char *v2; // ebx@1
  int v3; // esi@1
  MobInfo *v4; // eax@2
  int v5; // ecx@4

  v2 = this;
  this->m_kCharShape.m_kMobID = kMobID;
  v3 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 16))(
                          ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                          kMobID)
    && (unsigned __int16)kMobID <= *(_WORD *)(v3 + 200)
    && (v5 = *(_DWORD *)(v3 + 196), *(_DWORD *)(v5 + 4 * (unsigned __int16)kMobID)) )
  {
    v4 = *(MobInfo **)(v5 + 4 * (unsigned __int16)kMobID);
  }
  else
  {
    v4 = 0;
  }
  v2->m_pMobinfo = v4;
  v2->m_pMobViewInfo = MobViewInfoTab::GetByID(kMobID);
}
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;

//----- (0063A680) --------------------------------------------------------
double __thiscall Char::GetAniSpeedFromAbstate(Char *this, AbnormalStateInfo *pkInfo, unsigned int uiActionEventCode)
{
  AbnormalStateInfo *v3; // esi@1
  NiActorManager *v4; // eax@2
  SubAbStateInfo *v5; // eax@4
  double result; // st7@8
  float fKeepTime; // [sp+Ch] [bp+8h]@4
  float fKeepTimea; // [sp+Ch] [bp+8h]@8
  float fEndTime; // [sp+10h] [bp+Ch]@4

  v3 = pkInfo;
  if ( !pkInfo )
    goto LABEL_12;
  v4 = Char::GetSequence(this, uiActionEventCode);
  if ( !v4 || !LODWORD(v4->m_fTimelineRefreshTime) )
    goto LABEL_12;
  fEndTime = v4->m_fTransStartTime;
  fKeepTime = 0.001;
  v5 = SubAbStateInfoTab::GetByInxName(v3->SubAbState);
  if ( v5 )
    fKeepTime = (double)v5->KeepTime * 0.001000000047497451;
  if ( 0.0 == fEndTime
    || 0.0 == fKeepTime
    || (fKeepTimea = fEndTime / fKeepTime, result = fKeepTimea, fKeepTimea <= 0.0) )
  {
LABEL_12:
    result = 1.0;
  }
  return result;
}

//----- (0063A730) --------------------------------------------------------
char __thiscall Char::AddAbStateByAbstateIndex(Char *this, ABSTATEINDEX wIndex, float fLifeTime, bool bNoVisual)
{
  Char *v4; // esi@1
  AbnormalStateInfo *v5; // eax@1
  AbnormalStateInfo *v6; // edi@1
  SubAbStateInfo *v7; // eax@2
  int v8; // ebx@16
  int v9; // edi@16
  AbnormalStateViewInfo **v10; // eax@18
  AbnormalStateViewInfo *v11; // eax@19
  char v12; // cl@21
  const char *v13; // eax@21
  ActionInfoSet *v14; // ecx@23
  ActionInfo *v15; // ebx@24
  ActiveSkillViewInfo *v16; // eax@27
  const char *v17; // edi@28
  unsigned int v19; // eax@36
  AttackSequenceManagerVtbl *v20; // ebx@38
  float v21; // ST08_4@38
  AbnormalStateInfo *pkInfo; // [sp+14h] [bp-4h]@1
  AbnormalStateViewInfo *pkViewInfo; // [sp+20h] [bp+8h]@19

  v4 = this;
  v5 = AbnormalStateInfoTab::GetByAbstateIndex(wIndex);
  v6 = v5;
  pkInfo = v5;
  if ( !v5 )
    return 0;
  v7 = SubAbStateInfoTab::GetByInxName(v5->SubAbState);
  if ( v6->AbStataIndex == 358 )
  {
    if ( JumpProcessor::IsJump(&v4->m_kJumpProcessor) )
    {
      *(_WORD *)&v4->m_bAniStop = 256;
      PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    }
    else
    {
      v4->m_bAniStop = 1;
      PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    }
  }
  else if ( v7
         && (v7->ActionIndexA == 110 || v7->ActionIndexB == 110 || v7->ActionIndexC == 110 || v7->ActionIndexD == 110) )
  {
    if ( JumpProcessor::IsJump(&v4->m_kJumpProcessor) )
      *(_WORD *)&v4->m_bAniStop = 256;
    else
      v4->m_bAniStop = 1;
    PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  }
  if ( AbStateInfectee::AddAbState((AbStateInfectee *)&v4->vfptr, v6->ID, fLifeTime, bNoVisual) != 1 )
    return 0;
  v8 = v6->ID;
  v9 = ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;
  if ( !(unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable
                                                         + 16))(
                           ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable,
                           v8) )
    return 0;
  if ( (unsigned __int16)v8 > *(_WORD *)(v9 + 200) )
    return 0;
  v10 = (AbnormalStateViewInfo **)(*(_DWORD *)(v9 + 196) + 4 * v8);
  if ( !*v10 )
    return 0;
  v11 = *v10;
  pkViewInfo = v11;
  if ( !v11 )
    return 0;
  if ( v4->m_bWillDead )
    return 0;
  v12 = v11->AniIndex[0];
  v13 = v11->AniIndex;
  if ( v12 == 45 || v12 == 32 )
    return 0;
  v14 = v4->m_kActionMgr.m_pkActInfoSet;
  if ( !v14 || (v15 = ActionInfoSet::GetByInxName(v14, v13)) == 0 )
  {
    ((void (__thiscall *)(Char *))v4->vfptr[10].DeleteAbStateByAbstateIndex)(v4);
    return 0;
  }
  Char::GetAniCode(v4, 0, (unsigned int *)&bNoVisual, 0);
  if ( bNoVisual == 600000 || bNoVisual == 700000 )
  {
    v16 = v4->m_kActionMgr.m_pkCurPlaySkillViewInfo;
    if ( !v16 )
      return 0;
    v17 = v16->InxName;
    if ( !strncmp(v16->InxName, "FatalShadow", 0xBu) )
    {
      if ( strncmp(pkViewInfo->inxName, "StaShadowBinding", 0x10u) )
        return 0;
      goto LABEL_33;
    }
    if ( strncmp(v17, "SD_KingCrabSkill07_N", 0x14u) || strncmp(pkViewInfo->inxName, "StaSDVale01_Wheel", 0x11u) )
      return 0;
  }
LABEL_33:
  if ( JumpProcessor::IsJump(&v4->m_kJumpProcessor) == 1 )
    JumpProcessor::ForceEnd(&v4->m_kJumpProcessor, 1);
  Char::UpdateForceAni(v4);
  if ( Char::ActAction(v4, v15->InxName, 0) == 1 )
  {
    v19 = v15->uiEventCode;
    if ( v19 == 45 )
    {
      ((void (__stdcall *)(_DWORD))v4->vfptr->SetAnimationSpeed)(1.0);
      return 1;
    }
    v20 = v4->vfptr;
    v21 = Char::GetAniSpeedFromAbstate(v4, pkInfo, v19);
    ((void (__thiscall *)(AttackSequenceManagerVtbl **, _DWORD))v20->SetAnimationSpeed)(&v4->vfptr, LODWORD(v21));
  }
  return 1;
}
// A8C2A4: using guessed type int ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;

//----- (0063A9E0) --------------------------------------------------------
void __thiscall Char::DeleteAbStateByAbstateIndex(Char *this, ABSTATEINDEX wIndex)
{
  Char *v2; // esi@1
  AbnormalStateInfo *v3; // eax@1
  AbnormalStateInfo *v4; // edi@1
  SubAbStateInfo *v5; // eax@2

  v2 = this;
  v3 = AbnormalStateInfoTab::GetByAbstateIndex(wIndex);
  v4 = v3;
  if ( v3 )
  {
    v5 = SubAbStateInfoTab::GetByInxName(v3->SubAbState);
    if ( v4->AbStataIndex == 358
      || v5
      && (v5->ActionIndexA == 110 || v5->ActionIndexB == 110 || v5->ActionIndexC == 110 || v5->ActionIndexD == 110) )
    {
      if ( Char::IsActRunning(v2) && !Char::CheckActState(v2, 500000) )
        ((void (__thiscall *)(_DWORD))v2->vfptr[10].DeleteAbStateByAbstateIndex)(v2);
      if ( JumpProcessor::IsJump(&v2->m_kJumpProcessor) )
        ((void (__thiscall *)(_DWORD))v2->vfptr[10].DeleteAbStateByAbstateIndex)(v2);
      v2->m_bAniStop = 0;
      PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    }
    AbStateInfectee::DeleteAbState((AbStateInfectee *)&v2->vfptr, v4->ID, 0);
  }
}

//----- (0063AAA0) --------------------------------------------------------
ActionEffectInfo *__thiscall Char::GetSEFromLastAtk(Char *this, ActionInfo *LastAtkInfo)
{
  ActionEffectInfo *result; // eax@2
  NiControllerSequence *v3; // eax@3

  if ( LastAtkInfo )
  {
    v3 = (NiControllerSequence *)Char::GetSequence(this, LastAtkInfo->uiEventCode);
    result = ActionMgr::GetSE(v3);
    if ( !result )
      result = ActionEffectInfoTab::GetByID(0);
  }
  else
  {
    OutputDebugStringA("shoot! Use Default\n");
    result = ActionEffectInfoTab::GetByID(0);
  }
  return result;
}

//----- (0063AAF0) --------------------------------------------------------
void __thiscall Char::SetAbstateAffect(Char *this, AbStateInst *pkAbState)
{
  int v2; // ebx@1
  int v3; // esi@1
  Char *v4; // edi@1
  int *v5; // eax@3
  int v6; // eax@4
  signed int v7; // eax@5
  CSpactralGlow_Shader_Controller *v8; // eax@9
  NiTListItem<AbStateInst *> *v9; // esi@14
  AbStateInst *v10; // eax@15
  float _fTime; // ST20_4@21
  CClientGuild *v12; // eax@21
  NiTListItem<AbStateInst *> *v13; // edi@24
  AbStateInst *v14; // eax@25
  CharShape *v15; // edi@30
  PgFrameWork *v16; // eax@32
  NiTListItem<AbStateInst *> *v17; // eax@37
  AbStateInst *v18; // esi@40
  AbnormalStateViewInfo *v19; // ebx@41
  Effect *v20; // eax@44
  unsigned int *v21; // esi@44
  AbnormalStateInfo *v22; // eax@51
  SubAbStateInfo *v23; // eax@52
  double v24; // st7@53
  bool v25; // sf@53
  AbnormalStateInfo *v26; // eax@54
  SubAbStateInfo *v27; // eax@55
  AbnormalStateInfo *v28; // eax@50
  AbnormalStateInfo *pkAbstateInfo; // [sp+24h] [bp-4h]@41
  NiTListItem<AbStateInst *> *kIter; // [sp+30h] [bp+8h]@40
  void *kItera; // [sp+30h] [bp+8h]@53

  v2 = pkAbState->kID;
  v3 = ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
  v4 = this;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable,
                          v2) )
  {
    if ( (unsigned __int16)v2 <= *(_WORD *)(v3 + 200) )
    {
      v5 = (int *)(*(_DWORD *)(v3 + 196) + 4 * v2);
      if ( *v5 )
      {
        v6 = *v5;
        if ( v6 )
        {
          v7 = *(_DWORD *)(v6 + 34);
          if ( v7 > 463 )
          {
            switch ( v7 )
            {
              case 558:
                goto $LN14_56;
              case 636:
                v22 = AbnormalStateInfoTab::GetByAbstateIndex(0x27Cu);
                if ( !v22 )
                  return;
                v23 = SubAbStateInfoTab::GetByInxName(v22->SubAbState);
                if ( !v23 )
                  return;
                kItera = (void *)v23->KeepTime;
                v24 = (double)(signed int)kItera;
                v25 = (signed int)kItera < 0;
                goto LABEL_62;
              case 637:
                v26 = AbnormalStateInfoTab::GetByAbstateIndex(0x27Du);
                if ( !v26 )
                  return;
                v27 = SubAbStateInfoTab::GetByInxName(v26->SubAbState);
                if ( !v27 )
                  return;
                v25 = (v27->KeepTime & 0x80000000) != 0;
                goto LABEL_61;
              case 755:
                v28 = AbnormalStateInfoTab::GetByAbstateIndex(0x2F3u);
                goto LABEL_58;
              default:
                return;
            }
          }
          else if ( v7 == 463 )
          {
$LN14_56:
            if ( !v4->m_bShockWave )
            {
              v28 = AbnormalStateInfoTab::GetByAbstateIndex(0x1CFu);
LABEL_58:
              if ( v28 )
              {
                v27 = SubAbStateInfoTab::GetByInxName(v28->SubAbState);
                if ( v27 )
                {
                  v25 = (v27->KeepTime & 0x80000000) != 0;
LABEL_61:
                  v24 = (double)(signed int)v27->KeepTime;
LABEL_62:
                  if ( v25 )
                    v24 = v24 + 4294967300.0;
                  v4->m_fGroudStrikeKeepTime = v24 / 1000.0;
                  Char::SetShockWave(v4, 1);
                }
              }
            }
          }
          else
          {
            switch ( v7 )
            {
              case 373:
                if ( v4->m_dwGuildRegNum == g_pkMainChar->m_dwGuildRegNum )
                {
                  v8 = CharShape::GetShader_Ctrl(&v4->m_kCharShape);
                  CSpactralGlow_Shader_Controller::SetUseShaderName(
                    v8,
                    "FxSkinning_SpactralGlow",
                    "FxNoSkinning_SpactralGlow");
                  CharShape::SetSPactralGlowEnable(&v4->m_kCharShape, 1);
                  if ( (unsigned __int8)((int (__thiscall *)(Char *))v4->vfptr[15].Deaffect)(v4)
                    && !CSpactralGlow_Shader_Controller::IsEnable(&v4->m_kRidePetCtl.m_kShaderCtrl) )
                  {
                    CSpactralGlow_Shader_Controller::SetUseShaderName(
                      &v4->m_kRidePetCtl.m_kShaderCtrl,
                      "FxSkinning_SpactralGlow",
                      "FxNoSkinning_SpactralGlow");
                    CSpactralGlow_Shader_Controller::SetEnable(&v4->m_kRidePetCtl.m_kShaderCtrl, 1);
                  }
                  CSpactralGlow_Shader_Controller::SetUseShaderName(
                    &v4->m_kRestHouseShader,
                    "FxSkinning_SpactralGlow",
                    "FxNoSkinning_SpactralGlow");
                  CSpactralGlow_Shader_Controller::SetEnable(&v4->m_kRestHouseShader, 1);
                  if ( v4 == g_pkMainChar )
                    goto LABEL_67;
                  if ( v4->m_kAbStateList.m_kAllocator.m_uiCount )
                  {
                    v9 = v4->m_kAbStateList.m_pkHead;
                    while ( v9 )
                    {
                      v10 = v9->m_element;
                      v9 = v9->m_pkNext;
                      if ( v10 && v10->pkLoopingEffect )
                        v10->pkLoopingEffect->vfptr[21].__vecDelDtor((NiRefObject *)v10->pkLoopingEffect, 0);
                    }
                  }
                  v4->m_kAbStateProperty.bVisible = 1;
                  if ( v4 == g_pkMainChar )
LABEL_67:
                    v4->m_kAbStateProperty.bVisible = 0;
                }
                _fTime = *(float *)&v4->m_dwGuildRegNum;
                v12 = GuildTask::GetGuild();
                if ( CClientGuild::IsGttAttackableEnemyGuild(v12, LODWORD(_fTime)) )
                {
                  v4->m_kAbStateProperty.bVisible = 0;
                  if ( v4 != g_pkMainChar )
                  {
                    if ( v4->m_kAbStateList.m_kAllocator.m_uiCount )
                    {
                      v13 = v4->m_kAbStateList.m_pkHead;
                      while ( v13 )
                      {
                        v14 = v13->m_element;
                        v13 = v13->m_pkNext;
                        if ( v14 )
                        {
                          if ( v14->pkLoopingEffect )
                            v14->pkLoopingEffect->vfptr[21].__vecDelDtor((NiRefObject *)v14->pkLoopingEffect, 0);
                        }
                      }
                    }
                  }
                }
                break;
              case 376:
                v15 = &v4->m_kCharShape;
                CharShape::SetGTIBomb(v15, 1);
                CharShape::Link(v15, LINK_EYE, 0, 0x1Au);
                CharShape::SetHairPartsVisible(v15, 1);
                CharShape::Link(v15, 0, 0, 0x1Bu);
                break;
              case 374:
                if ( v4 == g_pkMainChar )
                {
                  v16 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
                  if ( v16 )
                    MiniMapWin::StartScanEffect(*(MiniMapWin **)&v16[15].m_bInit);
                }
                break;
              case 367:
                v4->m_bGtiSpeed = 1;
                CNSTimer_Interval::ReSet(&v4->m_kGtiSpeedInterval, Timer::ms_fCurTime);
                v4->m_kGtiSpeedInterval.m_fCheckTime = 0.039999999;
                break;
              case 372:
                Char::CancelSkillAction(v4, 1);
                if ( AbStateInfectee::IsInList((AbStateInfectee *)&v4->vfptr, STA_GTIBOMB1) )
                {
                  if ( v4->m_kAbStateList.m_kAllocator.m_uiCount )
                  {
                    v17 = v4->m_kAbStateList.m_pkHead;
                    if ( v17 )
                    {
                      while ( 1 )
                      {
                        v18 = v17->m_element;
                        kIter = v17->m_pkNext;
                        if ( v18 )
                        {
                          pkAbstateInfo = IIDTableBase<AbnormalStateInfo,AbnormalStateInfoTab,unsigned short>::GetByID(v18->kID);
                          v19 = IIDTableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab,unsigned short>::GetByID(v18->kID);
                          if ( pkAbstateInfo )
                          {
                            if ( v19 )
                            {
                              if ( pkAbstateInfo->AbStataIndex == 376 )
                              {
                                v20 = v18->pkLoopingEffect;
                                v21 = (unsigned int *)&v18->pkLoopingEffect;
                                if ( v20 )
                                {
                                  EffectMgr::RemoveEffect(&g_kEffectMgr, v20);
                                  *v21 = 0;
                                  EffectMgr::CreateAttachEffect(
                                    &g_kEffectMgr,
                                    v21,
                                    v19->LoopEffect,
                                    v4,
                                    v19->LoopEffPos,
                                    Timer::ms_fCurTime,
                                    1,
                                    0,
                                    0,
                                    1);
                                  *(_BYTE *)(*v21 + 140) = 1;
                                }
                              }
                            }
                          }
                        }
                        if ( !kIter )
                          break;
                        v17 = kIter;
                      }
                    }
                  }
                }
                break;
              default:
                return;
            }
          }
        }
      }
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8C2A0: using guessed type int ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;

//----- (0063B040) --------------------------------------------------------
char __thiscall Char::Init(Char *this, int kMobID, unsigned __int16 kHandle)
{
  int v3; // edi@1
  Char *v4; // esi@1
  int *v5; // eax@3
  int v6; // edi@4
  char v7; // al@5
  AbStateInfecteeVtbl *v8; // eax@6
  float v9; // ST10_4@6
  float v10; // ST10_4@6
  Name3 *v11; // eax@6
  MapInfo *v12; // eax@6
  Name3 result; // [sp+20h] [bp-Ch]@6

  v3 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
  v4 = this;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 16))(
                          ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                          kMobID)
    && (unsigned __int16)kMobID <= *(_WORD *)(v3 + 200)
    && (v5 = (int *)(*(_DWORD *)(v3 + 196) + 4 * (unsigned __int16)kMobID), *v5)
    && (v6 = *v5) != 0 )
  {
    v8 = v4->vfptr;
    v4->m_kHandle = kHandle;
    ((void (__thiscall *)(Char *, int))v8[2].GetAbstateColor)(v4, v6 + 34);
    ((void (__thiscall *)(Char *, _DWORD))v4->vfptr[4].SetAbStateProperty)(v4, *(_DWORD *)(v6 + 70));
    v9 = (double)*(unsigned int *)(v6 + 74);
    ((void (__thiscall *)(Char *, _DWORD))v4->vfptr[8].Deaffect)(v4, LODWORD(v9));
    v10 = (double)*(unsigned int *)(v6 + 78);
    ((void (__thiscall *)(Char *, _DWORD))v4->vfptr[8].SetAbStateProperty)(v4, LODWORD(v10));
    v4->m_kMoveToTarget.vfptr->Stop((NpNs_MoveToTarget *)&v4->m_kMoveToTarget);
    Char::SetMode(v4, 1);
    ((void (__thiscall *)(Char *))v4->vfptr[1].AddAbStateByAbstateIndex)(v4);
    v4->m_kCharShape.m_kClassID = 0;
    Char::SetMobID(v4, kMobID);
    v4->m_dwCurrHpUpdateSeqNo = -65536;
    v4->m_dwTOTCurrHpUpdateSeqNo = -65536;
    v4->m_bConnectServer = 1;
    v11 = World::GetMapName(&g_kWorld, &result);
    v12 = MapInfoTab::GetByMapName(v11);
    if ( v12 )
      v4->m_fMaxViewLength = (double)v12->Sight;
    v4->m_bUserCharacter = 0;
    v7 = 1;
  }
  else
  {
    v7 = 0;
  }
  return v7;
}
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;

//----- (0063B190) --------------------------------------------------------
char __userpurge Char::ApplicateAttackSeq@<al>(Char *this@<ecx>, int a2@<esi>, AttackSequence *pkAttSeq, bool bAllApplicate)
{
  AttackSequence *v4; // ebx@1
  Char *v5; // edi@1
  char v7; // al@3
  Char *v8; // esi@3
  int v9; // eax@11
  int v10; // eax@16
  int v11; // eax@24
  ActionEffectInfo *v12; // edi@25
  char v13; // al@28
  int v14; // [sp+18h] [bp-18h]@3
  Char *pkAttack; // [sp+28h] [bp-8h]@3
  const char *pcShootEffName; // [sp+2Ch] [bp-4h]@3
  Char *pkTargetChar; // [sp+38h] [bp+8h]@22
  char pkTargetChar_3; // [sp+3Bh] [bp+Bh]@3
  ActionInfo *pkActionInfo; // [sp+3Ch] [bp+Ch]@19

  v4 = pkAttSeq;
  v5 = this;
  if ( !pkAttSeq )
    return 0;
  v7 = this->m_kRidePetCtl.m_kShaderCtrl.m_kArryChildGeometry.m_uiESize;
  v14 = a2;
  v8 = (Char *)((char *)this - 88);
  pkTargetChar_3 = 0;
  pcShootEffName = 0;
  pkAttack = (Char *)((char *)this - 88);
  if ( !v7 )
    v7 = v8->m_kCharShape.m_kClassID;
  if ( !CharClass::IsKindOf(v7, 11) )
  {
    if ( !v8->m_BeforeMetamorphosisClass && !v8->m_kCharShape.m_kClassID )
    {
      v9 = *(_DWORD *)&v5->m_kRidePetCtl.m_kShaderCtrl.m_kShaderName1._Bx._Alias[8];
      if ( !v9 )
        goto LABEL_15;
      if ( *(_DWORD *)(v9 + 98) == 1 )
      {
        pkTargetChar_3 = 0;
        pcShootEffName = (const char *)(v9 + 102);
        goto LABEL_15;
      }
    }
LABEL_14:
    pkTargetChar_3 = 1;
    goto LABEL_15;
  }
  if ( Char::GetWeaponType((Char *)((char *)v5 - 88)) != 10 && Char::GetWeaponType((Char *)((char *)v5 - 88)) != 2 )
    goto LABEL_14;
  pkTargetChar_3 = 0;
LABEL_15:
  if ( !(unsigned __int8)((int (__thiscall *)(std::allocator<char> *, int))v8->vfptr[20].Deaffect)(
                           &v5[-1].m_kRestHouseShader.m_kShaderName2._Alval,
                           v14)
    || (v10 = *(_DWORD *)&v5->m_kRidePetCtl.m_kShaderCtrl.m_kShaderName1._Bx._Alias[8]) == 0 )
  {
    if ( !pkTargetChar_3 )
      goto LABEL_19;
    return DamageInfoSet::Applicate(&v4->kDamageInfoSet, (Char *)((char *)v5 - 88), bAllApplicate);
  }
  if ( *(_DWORD *)(v10 + 98) != 1 )
    return DamageInfoSet::Applicate(&v4->kDamageInfoSet, (Char *)((char *)v5 - 88), bAllApplicate);
  pcShootEffName = (const char *)(v10 + 102);
LABEL_19:
  pkActionInfo = *(ActionInfo **)&v5->m_bCulled;
  if ( !pcShootEffName )
    pcShootEffName = "Arrow";
  if ( v4->kDamageInfoSet.kDamageList.m_kAllocator.m_uiCount )
  {
    pkTargetChar = CharMgr::GetChar(&g_kCharMgr, v4->kDamageInfoSet.kDamageList.m_pkHead->m_element->kTargetHandle);
    if ( pkTargetChar )
    {
      if ( v4->m_SeqNum != -1 )
      {
        v11 = ((int (__thiscall *)(Char *))v5->vfptr->Deaffect)(v5);
        if ( !EffectMgr::GetArrowEffectInList(&g_kEffectMgr, v4->m_SeqNum, *(_WORD *)(v11 + 552)) )
        {
          v12 = ActionMgr::GetFirstAE((ActionMgr *)&v5->m_mapForcePartyCamShake._Myhead, RANGE_AE, 1);
          if ( !v12 )
            v12 = Char::GetSEFromLastAtk(v8, pkActionInfo);
          if ( ActionInfoTable::GetEffPos(v12->GEffectPos) == 9 )
            v13 = EffectMgr::CreateShootEff(
                    &g_kEffectMgr,
                    (char *)pcShootEffName,
                    v12,
                    pkAttack,
                    pkTargetChar,
                    Timer::ms_fCurTime,
                    800.0,
                    v4->m_SeqNum,
                    &v4->kDamageInfoSet,
                    OP_GROUND,
                    0);
          else
            v13 = EffectMgr::CreateShootEff(
                    &g_kEffectMgr,
                    (char *)pcShootEffName,
                    v12,
                    pkAttack,
                    pkTargetChar,
                    Timer::ms_fCurTime,
                    800.0,
                    v4->m_SeqNum,
                    &v4->kDamageInfoSet,
                    0,
                    0);
          if ( !v13 )
            DamageInfoSet::Applicate(&v4->kDamageInfoSet, pkAttack, 1);
          DamageInfoSet::Clear(&v4->kDamageInfoSet);
        }
      }
    }
  }
  return 0;
}
// 63B190: could not find valid save-restore pair for esi
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0063B3C0) --------------------------------------------------------
void __thiscall Char::Affect(Char *this, AbStateInst *pkAbState, bool bNoVisual)
{
  AbStateInst *v3; // ebx@1
  Char *v4; // esi@1
  int v5; // edi@1
  int v6; // edx@1
  int *v7; // eax@3
  int v8; // edi@4
  MapNavigator *v9; // eax@17
  GTInformWin *v10; // ecx@24
  GTInformWin *v11; // ecx@24
  D3DXCOLOR *v12; // eax@25
  D3DXCOLOR v13; // ST0C_16@25
  char *v14; // eax@25
  char *v15; // eax@27
  char v16; // cl@28
  char v17; // cl@29
  bool v18; // zf@30
  AttachEff *v19; // eax@33
  bool v20; // al@38
  AttachEff *v21; // eax@41
  Effect *v22; // eax@44
  Effect *v23; // eax@61
  Effect *v24; // eax@65
  Effect *v25; // eax@67
  Effect *v26; // eax@69
  Effect *v27; // eax@71
  D3DXCOLOR v28; // [sp+28h] [bp-20h]@25
  GTInformWin *pkWin; // [sp+38h] [bp-10h]@16
  MapNavigator *v30; // [sp+3Ch] [bp-Ch]@18
  NiPointer<MapNavigator> result; // [sp+40h] [bp-8h]@17
  MapNavigator *pkMapNavi; // [sp+44h] [bp-4h]@1
  char *bNoVisuala; // [sp+54h] [bp+Ch]@29

  v3 = pkAbState;
  v4 = this;
  AbStateInfectee::Affect((AbStateInfectee *)&this->vfptr, pkAbState, bNoVisual);
  Char::SetAbstateAffect(v4, pkAbState);
  v5 = ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;
  v6 = *(_DWORD *)ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;
  pkMapNavi = (MapNavigator *)pkAbState->kID;
  if ( !(unsigned __int8)(*(int (__thiscall **)(int, MapNavigator *))(v6 + 16))(
                           ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable,
                           pkMapNavi) )
    return;
  if ( (unsigned __int16)pkMapNavi > *(_WORD *)(v5 + 200) )
    return;
  v7 = (int *)(*(_DWORD *)(v5 + 196) + 4 * (unsigned __int16)pkMapNavi);
  if ( !*v7 )
    return;
  v8 = *v7;
  if ( !*v7 )
    return;
  if ( pkAbState->pkFirstEffect )
  {
    EffectMgr::RemoveEffect(&g_kEffectMgr, pkAbState->pkFirstEffect);
    pkAbState->pkFirstEffect = 0;
  }
  if ( pkAbState->pkLoopingEffect )
  {
    EffectMgr::RemoveEffect(&g_kEffectMgr, pkAbState->pkLoopingEffect);
    pkAbState->pkLoopingEffect = 0;
  }
  if ( v4->m_kAbStateProperty.iUnMovableCount
    && (unsigned __int8)((int (__thiscall *)(Char *))v4->vfptr[7].GetAbstateColor)(v4)
    && !v4->m_bWillDead )
  {
    ((void (__thiscall *)(Char *))v4->vfptr[10].DeleteAbStateByAbstateIndex)(v4);
  }
  if ( g_pkMainChar->m_kHandle == v4->m_kHandle
    && (g_pkMainChar->m_kAbStateProperty.iUnMovableCount || g_pkMainChar->m_kAbStateProperty.iFearCount > 0) )
  {
    pkWin = (GTInformWin *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( pkWin )
    {
      v9 = MapNavigator::GetMapNavigator(&result)->m_pObject;
      pkMapNavi = v9;
      if ( result.m_pObject )
      {
        v30 = result.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) && v30 )
          ((void (__stdcall *)(signed int))v30->vfptr->__vecDelDtor)(1);
        v9 = pkMapNavi;
      }
      if ( v9 )
      {
        if ( v9->m_bIsWorking )
        {
          v10 = pkWin;
          v9->m_bIsWorking = 0;
          v11 = (GTInformWin *)LODWORD(v10[3].m_kWorld.m_Rotate.m_pEntry[1][0]);
          pkWin = v11;
          if ( v11 )
          {
            GTInformWin::Clear(v11);
            v12 = Color::GetDxColor(&v28, -1, -112, 0, -1);
            *(_QWORD *)&v13.r = *(_QWORD *)&v12->r;
            *(_QWORD *)&v13.b = *(_QWORD *)&v12->b;
            v14 = (char *)TextData2::Get(0x3C517589u);
            GTInformWin::AddText(pkWin, v14, v13, 0, 3.0);
          }
        }
      }
    }
  }
  pkAbState->acLastEffectName[0] = 45;
  pkAbState->acLastEffectName[1] = 0;
  if ( bNoVisual )
    return;
  v15 = (char *)(v8 + 434);
  do
  {
    v16 = *v15;
    v15[(_DWORD)pkAbState + -v8 - 386] = *v15;
    ++v15;
  }
  while ( v16 );
  v17 = *(_BYTE *)(v8 + 361);
  bNoVisuala = (char *)(v8 + 361);
  if ( v17 == 45 )
  {
LABEL_55:
    if ( *(_BYTE *)(v8 + 398) != 45 )
    {
      if ( v4 == g_pkMainChar )
      {
        EffectMgr::CreateAttachEffect(
          &g_kEffectMgr,
          (unsigned int *)&pkAbState->pkLoopingEffect,
          (char *)(v8 + 398),
          v4,
          *(AbnormalStateViewInfo::EffPosEnum *)(v8 + 430),
          Timer::ms_fCurTime,
          1,
          0,
          0,
          1);
      }
      else if ( AbStateInfectee::FindNomalAbstate((AbStateInfectee *)&v4->vfptr, STA_GTIHIDE) )
      {
        EffectMgr::CreateAttachEffect(
          &g_kEffectMgr,
          (unsigned int *)&pkAbState->pkLoopingEffect,
          (char *)(v8 + 398),
          v4,
          *(AbnormalStateViewInfo::EffPosEnum *)(v8 + 430),
          Timer::ms_fCurTime,
          1,
          0,
          0,
          0);
      }
      else
      {
        EffectMgr::CreateAttachEffect(
          &g_kEffectMgr,
          (unsigned int *)&pkAbState->pkLoopingEffect,
          (char *)(v8 + 398),
          v4,
          *(AbnormalStateViewInfo::EffPosEnum *)(v8 + 430),
          Timer::ms_fCurTime,
          1,
          0,
          0,
          1);
      }
      v23 = pkAbState->pkLoopingEffect;
      if ( v23 )
        v23->m_bLoop = 1;
    }
    v3 = pkAbState;
    goto LABEL_64;
  }
  v18 = *(_BYTE *)(v8 + 398) == 45;
  pkMapNavi = (MapNavigator *)(v8 + 398);
  if ( v18 )
  {
    if ( v17 != 45 )
    {
      if ( !strcmp((const char *)(v8 + 2), "StaTimeAttack") || !strcmp((const char *)(v8 + 2), "StaTimeAttackMini") )
      {
        EffectMgr::CreateAniCtrlEffect(
          &g_kEffectMgr,
          (unsigned int *)&pkAbState->pkFirstEffect,
          bNoVisuala,
          v4,
          *(AbnormalStateViewInfo::EffPosEnum *)(v8 + 393),
          Timer::ms_fCurTime,
          0,
          pkAbState->kID);
      }
      else if ( v4 == g_pkMainChar )
      {
        EffectMgr::CreateAttachEffect(
          &g_kEffectMgr,
          (unsigned int *)&pkAbState->pkFirstEffect,
          bNoVisuala,
          v4,
          *(AbnormalStateViewInfo::EffPosEnum *)(v8 + 393),
          Timer::ms_fCurTime,
          0,
          0,
          0,
          1);
      }
      else if ( AbStateInfectee::FindNomalAbstate((AbStateInfectee *)&v4->vfptr, STA_GTIHIDE) )
      {
        EffectMgr::CreateAttachEffect(
          &g_kEffectMgr,
          (unsigned int *)&pkAbState->pkFirstEffect,
          bNoVisuala,
          v4,
          *(AbnormalStateViewInfo::EffPosEnum *)(v8 + 393),
          Timer::ms_fCurTime,
          0,
          0,
          0,
          0);
      }
      else
      {
        EffectMgr::CreateAttachEffect(
          &g_kEffectMgr,
          (unsigned int *)&pkAbState->pkFirstEffect,
          bNoVisuala,
          v4,
          *(AbnormalStateViewInfo::EffPosEnum *)(v8 + 393),
          Timer::ms_fCurTime,
          0,
          0,
          0,
          1);
      }
LABEL_64:
      if ( !AbStateInfectee::IsVisible((AbStateInfectee *)&v4->vfptr) )
      {
        v24 = v3->pkFirstEffect;
        if ( v24 )
          EffectMgr::SetShow(&g_kEffectMgr, v24, 0, 1);
        v25 = v3->pkLoopingEffect;
        if ( v25 )
          EffectMgr::SetShow(&g_kEffectMgr, v25, 0, 1);
      }
      v26 = v3->pkFirstEffect;
      if ( v26 )
        v26->vfptr->RegisterEffectMessenger((IEffectDestroyMessenger *)&v26->vfptr, (IEffectDestroyMessenger *)v3);
      v27 = v3->pkLoopingEffect;
      if ( v27 )
        v27->vfptr->RegisterEffectMessenger((IEffectDestroyMessenger *)&v27->vfptr, (IEffectDestroyMessenger *)v3);
      return;
    }
    goto LABEL_55;
  }
  if ( v4 == g_pkMainChar )
  {
    v19 = EffectMgr::JustCreateAttachEffect(
            &g_kEffectMgr,
            (char *)(v8 + 361),
            v4,
            *(AbnormalStateViewInfo::EffPosEnum *)(v8 + 393),
            Timer::ms_fCurTime,
            1);
  }
  else if ( AbStateInfectee::FindNomalAbstate((AbStateInfectee *)&v4->vfptr, STA_GTIHIDE) )
  {
    v19 = EffectMgr::JustCreateAttachEffect(
            &g_kEffectMgr,
            bNoVisuala,
            v4,
            *(AbnormalStateViewInfo::EffPosEnum *)(v8 + 393),
            Timer::ms_fCurTime,
            0);
  }
  else
  {
    v19 = EffectMgr::JustCreateAttachEffect(
            &g_kEffectMgr,
            bNoVisuala,
            v4,
            *(AbnormalStateViewInfo::EffPosEnum *)(v8 + 393),
            Timer::ms_fCurTime,
            1);
  }
  pkAbState->pkFirstEffect = (Effect *)v19;
  if ( v19 )
  {
    if ( v4 == g_pkMainChar
      || (v20 = AbStateInfectee::FindNomalAbstate((AbStateInfectee *)&v4->vfptr, STA_GTIHIDE)) != 0 )
    {
      v21 = EffectMgr::JustCreateAttachEffect(
              &g_kEffectMgr,
              (char *)pkMapNavi,
              v4,
              *(AbnormalStateViewInfo::EffPosEnum *)(v8 + 430),
              Timer::ms_fCurTime,
              0);
    }
    else
    {
      if ( pkAbState->pkFirstEffect )
        v20 = 1;
      v21 = EffectMgr::JustCreateAttachEffect(
              &g_kEffectMgr,
              (char *)pkMapNavi,
              v4,
              *(AbnormalStateViewInfo::EffPosEnum *)(v8 + 430),
              Timer::ms_fCurTime,
              v20 == 0);
    }
    pkAbState->pkLoopingEffect = (Effect *)v21;
    if ( v21 )
    {
      v21->m_bLoop = 1;
      v22 = pkAbState->pkFirstEffect;
      if ( v22 )
      {
        v22->m_pkChainEffect = pkAbState->pkLoopingEffect;
        EffectMgr::PlayEffect(&g_kEffectMgr, pkAbState->pkFirstEffect);
      }
      goto LABEL_64;
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8C2A4: using guessed type int ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;

//----- (0063B940) --------------------------------------------------------
bool __thiscall Char::RefreshNPCAction(Char *this)
{
  Char *v1; // esi@1
  char v2; // cl@1
  bool result; // al@1

  v1 = this;
  v2 = this->m_byCharNPCActionState;
  result = 0;
  if ( (unsigned __int8)v2 <= 1u )
  {
    result = Char::ApplyCharNpcBaseAction(v1, 0);
  }
  else if ( v2 == 2 && v1->m_byEventActionFlag > 0u )
  {
    result = Char::ApplyCharNpcBaseAction(v1, 0);
    v1->m_byEventActionFlag = 0;
  }
  return result;
}

//----- (0063B980) --------------------------------------------------------
char __thiscall Char::ImmediatelyMetamorphosis(Char *this, unsigned __int16 monsterid)
{
  Char *v2; // esi@1
  int v3; // ebx@3
  NiActorManager *v4; // eax@3
  NiActorManager *v5; // edi@3
  char v6; // al@6
  char result; // al@10
  unsigned int uiFirstCode; // [sp+10h] [bp-10h]@3
  int v9; // [sp+1Ch] [bp-4h]@5

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[20].Deaffect)()
    || DirectionControllers::IsRunDirection(v2->m_spDirectionCtrls.m_pObject) )
  {
    goto LABEL_14;
  }
  Char::ResetSkillAction(v2);
  Char::ResetAction(v2);
  AttackSequenceManager::ClearAttSeq((AttackSequenceManager *)&v2->vfptr);
  CharShape::StopWeaponAfterImgEff(&v2->m_kCharShape);
  Char::GetAniCode(v2, 1, &uiFirstCode, 0);
  v3 = monsterid;
  v4 = CharResMgr::GetMobActor(&g_kCharResMgr, monsterid);
  v5 = v4;
  *(_DWORD *)&monsterid = v4;
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v9 = 0;
  if ( !v5 )
  {
LABEL_14:
    result = 0;
  }
  else
  {
    NiPointer<NiActorManager>::operator=((NiPointer<NiPixelData> *)&v2->m_spActor, (NiPointer<NiPixelData> *)&monsterid);
    v6 = v2->m_BeforeMetamorphosisClass;
    if ( !v6 )
      v6 = v2->m_kCharShape.m_kClassID;
    v2->m_BeforeMetamorphosisClass = v6;
    v2->m_kActionMgr_Metamor.m_pkActInfoSet = ActionInfoTable::GetMobActionInfo(v3);
    v2->m_kCharShape.m_kClassID = 0;
    Char::SetMobID(v2, v3);
    ((void (__thiscall *)(Char *, _DWORD))v2->vfptr[18].GetAbstateColor)(v2, 0);
    ((void (__thiscall *)(Char *, signed int))v2->vfptr[10].AddAbStateByAbstateIndex)(v2, 1);
    ((void (__thiscall *)(Char *))v2->vfptr[20].SetAbStateProperty)(v2);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    result = 1;
  }
  return result;
}

//----- (0063BAF0) --------------------------------------------------------
char __thiscall Char::Shape_UnMetamorphosis(Char *this, const char *ptemp)
{
  Char *v2; // esi@1
  char result; // al@1
  char v4; // al@2
  char byGender; // ST1C_1@2
  NiActorManager *v6; // eax@2
  NiActorManager *v7; // edi@2
  NiActorManager *v8; // ebx@2
  AbStateInfectee::AbstateColor (__thiscall *v9)(AbStateInfectee *); // eax@9

  v2 = this;
  result = ((int (*)(void))this->vfptr[20].Deaffect)();
  if ( result )
  {
    v4 = v2->m_BeforeMetamorphosisClass;
    byGender = v2->m_kCharShape.m_byGender;
    v2->m_kCharShape.m_kClassID = v4;
    v6 = CharResMgr::GetCharActor(&g_kCharResMgr, v4, byGender, 1u);
    v7 = v2->m_spActor.m_pObject;
    v8 = v6;
    if ( v7 != v6 )
    {
      if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      v2->m_spActor.m_pObject = v8;
      if ( v8 )
        InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
    }
    v2->m_kActionMgr_Metamor.m_pkActInfoSet = 0;
    Char::SetMobID(v2, 0xFFFF);
    ((void (__thiscall *)(_DWORD, _DWORD))v2->vfptr[18].GetAbstateColor)(v2, 1);
    ((void (__thiscall *)(_DWORD, _DWORD))v2->vfptr[10].AddAbStateByAbstateIndex)(v2, 0);
    v2->m_BeforeMetamorphosisClass = 0;
    Char::ResetSkillAction(v2);
    Char::ResetAction(v2);
    v9 = v2->vfptr[10].GetAbstateColor;
    v2->m_eStandMode = 0;
    v9((AbStateInfectee *)&v2->vfptr);
    result = 1;
  }
  return result;
}

//----- (0063BBF0) --------------------------------------------------------
char __thiscall Char::IsHitTime(Char *this, bool bdelHitTimeInfo)
{
  Char *v2; // esi@1
  unsigned int v3; // edi@1
  NiActorManager *v4; // edi@6
  std::_List_nod<float,std::allocator<float> >::_Node *v5; // ecx@10
  unsigned int uiFirstCode; // [sp+8h] [bp-4h]@1

  v2 = this;
  v3 = Char::GetAniCode(this, 0, &uiFirstCode, 0);
  if ( uiFirstCode != 300000 && uiFirstCode != 600000 && uiFirstCode != 700000 && !Char::IsActGathering(v2) )
    return 0;
  if ( !v2->m_spActor.m_pObject )
    return 0;
  v4 = Char::GetSequence(v2, v3);
  if ( !v4 )
    return 0;
  if ( !Char::IsActGathering(v2) )
  {
    if ( Char::IsAniState(v2, ANIMATING) == 1 )
      goto LABEL_9;
    return 0;
  }
  if ( !Char::IsAniState(v2, ANIMATING) )
    return 0;
LABEL_9:
  if ( !v2->m_lstfHitTime._Mysize )
    return 0;
  v5 = v2->m_lstfHitTime._Myhead->_Next;
  if ( v5->_Myval > (double)*(float *)&v4->m_pcTargetKey )
    return 0;
  if ( bdelHitTimeInfo == 1 )
    ((void (__thiscall *)(_DWORD, _DWORD))v2->vfptr[19].AddAbStateByAbstateIndex)(v2, v5);
  return 1;
}

//----- (0063BCB0) --------------------------------------------------------
void __thiscall Char::DoOscillation(Char *this, OscTarget e)
{
  Char *v2; // edi@1
  unsigned int v3; // esi@2
  NiActorManager *v4; // eax@3
  unsigned int v5; // esi@7
  NiControllerSequence *v6; // eax@8
  std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node **v7; // eax@11
  std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *v8; // ebx@11
  std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *v9; // ecx@12
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v10; // eax@12
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v11; // esi@12
  OscTarget v12; // eax@14
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v13; // eax@29
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *j; // eax@30
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *i; // eax@33
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > result; // [sp+10h] [bp-10h]@27
  std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *kMap; // [sp+14h] [bp-Ch]@12
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > MapItr; // [sp+18h] [bp-8h]@11
  NiControllerSequence *pkSequence; // [sp+1Ch] [bp-4h]@10

  v2 = this;
  if ( MachineOpt::ms_kGraphicOption.bScreenShakeEnable )
  {
    v3 = Char::GetAniCode(this, 0, 0, 0);
    v4 = ((int (__thiscall *)(_DWORD))v2->vfptr[13].DeleteAbStateByAbstateIndex)(v2) == 4 ? Char::GetSequence(
                                                                                              v2,
                                                                                              v2->m_uiLayerAniCode[0]) : Char::GetSequence(v2, v3);
    if ( v4 && v4->m_pkCurSequence == (NiControllerSequence *)1 )
    {
      v5 = Char::GetAniCode(v2, 0, 0, 0);
      v6 = (NiControllerSequence *)(((int (__thiscall *)(_DWORD))v2->vfptr[13].DeleteAbStateByAbstateIndex)(v2) == 4 ? Char::GetSequence(v2, v2->m_uiLayerAniCode[0]) : Char::GetSequence(v2, v5));
      pkSequence = v6;
      if ( v6 )
      {
        v7 = &v2->m_mapShakeInfo._Myhead->_Left;
        v8 = *v7;
        MapItr._Ptr = v8;
        if ( (std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node **)v8 != v7 )
        {
          do
          {
            v9 = v8->_Myval.second;
            v10 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v9->_Myhead;
            v11 = v10->_Left;
            kMap = v8->_Myval.second;
            if ( v11 != v10 )
            {
              do
              {
                if ( *(float *)&v11->_Myval.first > (double)pkSequence->m_fLastScaledTime )
                {
                  if ( !v11->_Isnil )
                  {
                    v13 = v11->_Right;
                    if ( v13->_Isnil )
                    {
                      for ( i = v11->_Parent; !i->_Isnil; i = i->_Parent )
                      {
                        if ( v11 != i->_Right )
                          break;
                        v11 = i;
                      }
                      v11 = i;
                    }
                    else
                    {
                      v11 = v11->_Right;
                      for ( j = v13->_Left; !j->_Isnil; j = j->_Left )
                        v11 = j;
                    }
                  }
                }
                else
                {
                  v12 = v8->_Myval.first;
                  switch ( v12 )
                  {
                    case 4:
                      if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[1].Affect)(v2) )
                      {
                        if ( !Oscillation::IsImpacting(&stru_B24FC0) )
                        {
                          v12 = v8->_Myval.first;
                          goto LABEL_18;
                        }
                      }
                      else if ( v2->m_kHandle == g_pkMainChar->m_kHandle )
                      {
                        World::ImpactCamera(&g_kWorld, (EffectViewInfo *)v11->_Myval.second);
                      }
                      break;
                    case 0:
                    case 1:
                    case 2:
                    case 3:
LABEL_18:
                      if ( Char::IsShakeCondition(v2, v12) == 1 )
                        World::ImpactCamera(&g_kWorld, (EffectViewInfo *)v11->_Myval.second);
                      break;
                    case 5:
                    case 6:
                    case 7:
                      if ( !Oscillation::IsImpacting(&stru_B24FC0) && Char::IsShakeCondition(v2, v8->_Myval.first) == 1 )
                        World::ImpactCamera(&g_kWorld, (EffectViewInfo *)v11->_Myval.second);
                      break;
                    case 8:
                      ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v2->vfptr[12].AddAbStateByAbstateIndex)(
                        v2,
                        v11->_Myval.second,
                        LODWORD(Timer::ms_fCurTime));
                      break;
                    default:
                      OutputDebugStringA("¾Ë¼ö ¾ø´Â Á¤º¸ÀÓ. Char::DoOscillation\n");
                      break;
                  }
                  v11 = std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
                          (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)v8->_Myval.second,
                          &result,
                          (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > >)v11)->_Ptr;
                  v9 = kMap;
                }
              }
              while ( v11 != (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v9->_Myhead );
            }
            std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const,int>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&MapItr);
            v8 = MapItr._Ptr;
          }
          while ( MapItr._Ptr != v2->m_mapShakeInfo._Myhead );
        }
      }
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0063BF00) --------------------------------------------------------
void __thiscall Char::UpdateNPCAction(Char *this, float fTime)
{
  Char *v2; // esi@1
  char v3; // al@2
  bool v4; // al@5
  CharNPC_ViewInfo *v5; // ecx@10
  float v6; // ST18_4@11
  void (__thiscall *v7)(AbStateInfectee *, ABSTATEINDEX, bool, int); // edx@12

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[15].SetAbStateProperty)() )
  {
    v3 = v2->m_byCharNPCActionState;
    if ( (unsigned __int8)v3 <= 1u )
    {
      v4 = Char::ApplyCharNpcBaseAction(v2, 0);
    }
    else
    {
      if ( v3 != 2 || !v2->m_byEventActionFlag )
        goto LABEL_8;
      v4 = Char::ApplyCharNpcBaseAction(v2, 0);
      v2->m_byEventActionFlag = 0;
    }
    if ( !v4 )
    {
LABEL_8:
      ((void (__thiscall *)(Char *))v2->vfptr[10].DeleteAbStateByAbstateIndex)(v2);
      goto LABEL_9;
    }
  }
LABEL_9:
  if ( !v2->m_byCharNPCActionState )
  {
    v5 = NPCViewInfoTab::GetByID(v2->m_pMobViewInfo->NpcViewIndex);
    if ( v5->PeriodActionCode )
    {
      v6 = Timer::ms_fDeltaTime + v2->m_fActionTimer;
      v2->m_fActionTimer = v6;
      if ( v5->ActionDelayTime < (unsigned int)(signed __int64)(v6 * 1000.0) )
      {
        v7 = v2->vfptr[10].SetAbStateProperty;
        v2->m_fActionTimer = 0.0;
        v2->m_byCharNPCActionState = 1;
        v7((AbStateInfectee *)&v2->vfptr, (ABSTATEINDEX)v5->PeriodActionCode, 0, 0);
      }
    }
  }
}
// A8B980: using guessed type float Timer::ms_fDeltaTime;

//----- (0063BFF0) --------------------------------------------------------
void __thiscall LinkedEffect::Clear(LinkedEffect *this)
{
  LinkedEffect *v1; // esi@1
  int v2; // edi@1
  Effect *v3; // eax@3
  char *v4; // ecx@6
  char *v5; // edi@6

  v1 = this;
  v2 = 0;
  if ( (signed int)(((char *)this->m_vecEffectHandle._Mylast - (char *)this->m_vecEffectHandle._Myfirst) & 0xFFFFFFFC) > 0 )
  {
    do
    {
      if ( v2 < v1->m_vecEffectHandle._Mylast - v1->m_vecEffectHandle._Myfirst )
        v3 = (Effect *)v1->m_vecEffectHandle._Myfirst[v2];
      else
        v3 = 0;
      EffectMgr::RemoveEffect(&g_kEffectMgr, v3);
      ++v2;
    }
    while ( v2 < v1->m_vecEffectHandle._Mylast - v1->m_vecEffectHandle._Myfirst );
  }
  v4 = (char *)v1->m_vecEffectHandle._Mylast;
  v5 = (char *)v1->m_vecEffectHandle._Myfirst;
  if ( v1->m_vecEffectHandle._Mylast - v1->m_vecEffectHandle._Myfirst )
  {
    if ( v5 != v4 )
    {
      memmove(v5, v4, 0);
      v1->m_vecEffectHandle._Mylast = (unsigned int *)v5;
    }
  }
}

//----- (0063C070) --------------------------------------------------------
void __thiscall Char::ClearOscTimeMmap(Char *this)
{
  Char *v1; // edi@1
  std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *v4; // eax@3
  std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *j; // eax@4
  std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *i; // eax@7
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > result; // [sp+8h] [bp-4h]@2

  v1 = this;
  v2 = this->m_mapShakeInfo._Myhead;
  v3 = v2->_Left;
  if ( v2->_Left != v2 )
  {
    do
    {
      std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
        (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)v3->_Myval.second,
        &result,
        (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >)v3->_Myval.second->_Myhead->_Left,
        (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >)v3->_Myval.second->_Myhead);
      if ( !v3->_Isnil )
      {
        v4 = v3->_Right;
        if ( v4->_Isnil )
        {
          for ( i = v3->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v3 != i->_Right )
              break;
            v3 = i;
          }
          v3 = i;
        }
        else
        {
          v3 = v3->_Right;
          for ( j = v4->_Left; !j->_Isnil; j = j->_Left )
            v3 = j;
        }
      }
    }
    while ( v3 != v1->m_mapShakeInfo._Myhead );
  }
}

//----- (0063C0F0) --------------------------------------------------------
void __thiscall Char::CatchHitTime(Char *this)
{
  Char *v1; // edi@1
  unsigned int v2; // eax@2
  NiActorManager *v3; // esi@2
  float v4; // ebx@3
  unsigned int v5; // edi@4
  int v6; // esi@5
  const char *v7; // ecx@5
  unsigned int KeyNum; // [sp+4h] [bp-Ch]@5
  Char *v9; // [sp+8h] [bp-8h]@1
  float _Val; // [sp+Ch] [bp-4h]@7

  v1 = this;
  v9 = this;
  if ( this->m_spActor.m_pObject )
  {
    v2 = Char::GetAniCode(this, 0, 0, 0);
    v3 = Char::GetSequence(v1, v2);
    if ( v3 )
    {
      ((void (__thiscall *)(Char *))v1->vfptr[19].DeleteAbStateByAbstateIndex)(v1);
      v4 = v3->m_fTime;
      if ( v4 != 0.0 )
      {
        v5 = 0;
        if ( *(_DWORD *)(LODWORD(v4) + 12) )
        {
          do
          {
            v6 = *(_DWORD *)(LODWORD(v4) + 16);
            v7 = *(const char **)(v6 + 8 * v5 + 4);
            KeyNum = *(_DWORD *)(LODWORD(v4) + 12);
            if ( v7 )
            {
              if ( !strcmp((const char *)&off_9B8ED8, v7) )
              {
                _Val = *(float *)(v6 + 8 * v5);
                std::list<float,std::allocator<float>>::push_back(&v9->m_lstfHitTime, &_Val);
              }
            }
            ++v5;
          }
          while ( v5 < KeyNum );
        }
      }
    }
  }
}
// 9B8ED8: using guessed type void *off_9B8ED8;

//----- (0063C1B0) --------------------------------------------------------
void __thiscall Char::ViewNotCampMode(Char *this, PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *p)
{
  Char *v2; // esi@1

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[1].IsVisible)() )
  {
    Char::CulledTent(v2, 1);
    if ( v2->m_BeforeMetamorphosisClass || v2->m_kCharShape.m_kClassID )
      LinkedEffect::Clear(&v2->kLinkedEffect);
    if ( !v2->m_spActor.m_pObject )
    {
      if ( p )
        v2->vfptr[2].Affect((AbStateInfectee *)v2, (AbStateInst *)&p->shape, (bool)&p->shapedata);
      ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v2->vfptr[18].DeleteAbStateByAbstateIndex)(v2, 1, 0);
    }
  }
}

//----- (0063C220) --------------------------------------------------------
void __thiscall Char::ClearHitTime(Char *this)
{
  Char *v1; // esi@1
  std::_List_nod<float,std::allocator<float> >::_Node *v2; // ecx@1
  std::_List_nod<float,std::allocator<float> >::_Node *v3; // eax@1
  std::_List_nod<float,std::allocator<float> >::_Node *v4; // edi@2

  v1 = this;
  v2 = this->m_lstfHitTime._Myhead;
  v3 = v2->_Next;
  if ( v2->_Next != v2 )
  {
    do
    {
      v4 = v3->_Next;
      if ( v3 != v1->m_lstfHitTime._Myhead )
      {
        v3->_Prev->_Next = v4;
        v3->_Next->_Prev = v3->_Prev;
        operator delete(v3);
        --v1->m_lstfHitTime._Mysize;
      }
      v3 = v4;
    }
    while ( v4 != v1->m_lstfHitTime._Myhead );
  }
}

//----- (0063C270) --------------------------------------------------------
void __thiscall Char::DelHitTime(Char *this, std::_List_iterator<std::_List_val<float,std::allocator<float> > > it)
{
  Char *v2; // esi@1

  v2 = this;
  if ( it._Ptr != this->m_lstfHitTime._Myhead )
  {
    it._Ptr->_Prev->_Next = it._Ptr->_Next;
    it._Ptr->_Next->_Prev = it._Ptr->_Prev;
    operator delete(it._Ptr);
    --v2->m_lstfHitTime._Mysize;
  }
}

//----- (0063C2B0) --------------------------------------------------------
char __thiscall Char::IsAbStateAction(Char *this)
{
  Char *v1; // ebx@1
  std::_List_nod<AbnormalStateViewInfo *,std::allocator<AbnormalStateViewInfo *> >::_Node *v2; // eax@1
  std::_List_nod<AbnormalStateViewInfo *,std::allocator<AbnormalStateViewInfo *> >::_Node *v3; // edx@2
  std::_List_nod<AbnormalStateViewInfo *,std::allocator<AbnormalStateViewInfo *> >::_Node *v4; // edi@3
  ActionInfoSet *v5; // ecx@4
  ActionInfo *v6; // esi@5
  std::_List_nod<AbnormalStateViewInfo *,std::allocator<AbnormalStateViewInfo *> >::_Node *v7; // eax@9
  std::_List_nod<AbnormalStateViewInfo *,std::allocator<AbnormalStateViewInfo *> >::_Node *v8; // ecx@9
  std::_List_nod<AbnormalStateViewInfo *,std::allocator<AbnormalStateViewInfo *> >::_Node *v9; // esi@10
  std::exception pExceptionObject; // [sp+10h] [bp-28h]@13
  std::list<AbnormalStateViewInfo *,std::allocator<AbnormalStateViewInfo *> > lstAbstateAction; // [sp+1Ch] [bp-1Ch]@1
  char *_What; // [sp+28h] [bp-10h]@13
  int v14; // [sp+34h] [bp-4h]@2

  v1 = this;
  lstAbstateAction._Mysize = 0;
  v2 = (std::_List_nod<AbnormalStateViewInfo *,std::allocator<AbnormalStateViewInfo *> >::_Node *)operator new(0xCu);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  lstAbstateAction._Myhead = v2;
  v2->_Next = v2;
  lstAbstateAction._Myhead->_Prev = lstAbstateAction._Myhead;
  v14 = 0;
  AbStateInfectee::HasAbStateAction((AbStateInfectee *)&v1->vfptr, &lstAbstateAction);
  v3 = lstAbstateAction._Myhead;
  if ( lstAbstateAction._Mysize )
  {
    v4 = lstAbstateAction._Myhead->_Next;
    if ( lstAbstateAction._Myhead->_Next != lstAbstateAction._Myhead )
    {
      do
      {
        v5 = v1->m_kActionMgr.m_pkActInfoSet;
        if ( v5 )
        {
          v6 = ActionInfoSet::GetByInxName(v5, v4->_Myval->AniIndex);
          if ( v6 && v6->uiEventCode == Char::GetAniCode(v1, 0, 0, 0) )
          {
            std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~list<ItemViewDummy *,std::allocator<ItemViewDummy *>>((std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)&lstAbstateAction);
            return 1;
          }
          v3 = lstAbstateAction._Myhead;
        }
        v4 = v4->_Next;
      }
      while ( v4 != v3 );
    }
  }
  v7 = v3->_Next;
  v3->_Next = v3;
  lstAbstateAction._Myhead->_Prev = lstAbstateAction._Myhead;
  v8 = lstAbstateAction._Myhead;
  lstAbstateAction._Mysize = 0;
  if ( v7 != lstAbstateAction._Myhead )
  {
    do
    {
      v9 = v7->_Next;
      operator delete(v7);
      v8 = lstAbstateAction._Myhead;
      v7 = v9;
    }
    while ( v9 != lstAbstateAction._Myhead );
  }
  operator delete(v8);
  return 0;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0063C3F0) --------------------------------------------------------
void __thiscall Char::ClearTraceMove(Char *this)
{
  Char *v1; // esi@1
  std::_List_nod<NiPoint3,std::allocator<NiPoint3> >::_Node *v2; // ecx@1
  std::_List_nod<NiPoint3,std::allocator<NiPoint3> >::_Node *v3; // eax@1
  std::_List_nod<NiPoint3,std::allocator<NiPoint3> >::_Node *v4; // edi@2

  v1 = this;
  v2 = this->m_lstTraceMove._Myhead;
  v3 = v2->_Next;
  if ( v2->_Next != v2 )
  {
    do
    {
      v4 = v3->_Next;
      if ( v3 != v1->m_lstTraceMove._Myhead )
      {
        v3->_Prev->_Next = v4;
        v3->_Next->_Prev = v3->_Prev;
        operator delete(v3);
        --v1->m_lstTraceMove._Mysize;
      }
      v3 = v4;
    }
    while ( v4 != v1->m_lstTraceMove._Myhead );
  }
}

//----- (0063C440) --------------------------------------------------------
unsigned int __thiscall Char::GetIdleCode(Char *this)
{
  unsigned int v1; // esi@1
  unsigned int v2; // edi@2
  unsigned int v3; // esi@3
  char *v4; // eax@7
  char *v5; // esi@7
  unsigned int *v6; // edi@11
  unsigned int *v7; // esi@11
  std::vector<unsigned int,std::allocator<unsigned int> > vecAniCode; // [sp+10h] [bp-24h]@2
  unsigned int _Val; // [sp+20h] [bp-14h]@9
  MobInfo *pkInfo; // [sp+24h] [bp-10h]@1
  int v12; // [sp+30h] [bp-4h]@2

  v1 = 0;
  pkInfo = this->m_pMobinfo;
  if ( !pkInfo )
    return v1;
  vecAniCode._Myfirst = 0;
  vecAniCode._Mylast = 0;
  vecAniCode._Myend = 0;
  v12 = 0;
  v2 = 0;
  if ( ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::GetTotal() )
  {
    do
    {
      v3 = v2;
      if ( v2 < ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::GetTotal() )
      {
        while ( !CDataReader::GetRecord(
                   (CDataReader *)(ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::ms_pkTable + 4),
                   v3) )
        {
          if ( ++v3 >= ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::GetTotal() )
            goto LABEL_10;
        }
        v4 = CDataReader::GetRecord(
               (CDataReader *)(ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::ms_pkTable + 4),
               v3);
        v5 = v4;
        if ( v4 && !strcmp(pkInfo->InxName, v4) )
        {
          _Val = *((_DWORD *)v5 + 8);
          std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
            (std::vector<unsigned long,std::allocator<unsigned long> > *)&vecAniCode,
            &_Val);
        }
      }
LABEL_10:
      ++v2;
    }
    while ( v2 < ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::GetTotal() );
    v6 = vecAniCode._Myfirst;
    v7 = vecAniCode._Mylast;
    if ( vecAniCode._Myfirst != vecAniCode._Mylast )
    {
      v1 = v6[rand() % (unsigned int)(v7 - v6)];
      if ( v6 )
        operator delete(v6);
      return v1;
    }
    if ( vecAniCode._Myfirst )
      operator delete(vecAniCode._Myfirst);
  }
  return 0;
}
// A8C1D0: using guessed type int ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::ms_pkTable;

//----- (0063C5A0) --------------------------------------------------------
void __thiscall Char::~Char(Char *this)
{
  Char *v1; // esi@1
  NiActorManager *v2; // edi@1
  NiNode *v3; // edi@6
  NiNode *v4; // edi@11
  NiNode *v5; // edi@16
  NiNode *v6; // edi@21
  NiNode *v7; // edi@26
  NiNode *v8; // edi@31
  NiNode *v9; // edi@36
  NiLight *v10; // edi@41
  NiLight *v11; // edi@46
  std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node **v12; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v13; // edi@51
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > v14; // ecx@52
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v15; // eax@53
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *j; // eax@54
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *i; // eax@57
  DirectionControllers *v18; // edi@62
  NiActorManager *v19; // edi@66
  NiLight *v20; // edi@70
  NiLight *v21; // edi@74
  void **v22; // ecx@78
  std::_List_nod<float,std::allocator<float> >::_Node *v23; // eax@78
  std::_List_nod<float,std::allocator<float> >::_Node *v24; // edi@79
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v25; // ST08_4@80
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v26; // ST04_4@80
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v27; // ST08_4@80
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v28; // ST04_4@80
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v29; // ST08_4@80
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v30; // ST04_4@80
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v31; // ST08_4@80
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v32; // ST04_4@80
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v33; // ST08_4@80
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v34; // ST04_4@80
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v35; // ST08_4@80
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v36; // ST04_4@80
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v37; // ST08_4@80
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v38; // ST04_4@80
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v39; // ST08_4@80
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v40; // ST04_4@80
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v41; // ST08_4@80
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v42; // ST04_4@80
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v43; // ST08_4@80
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v44; // ST04_4@80
  NiNode *v45; // edi@80
  NiMaterialProperty *v46; // edi@84
  NiNode *v47; // edi@88
  NiNode *v48; // edi@92
  NiNode *v49; // edi@96
  NiNode *v50; // edi@100
  NiNode *v51; // edi@104
  NiNode *v52; // edi@108
  NiNode *v53; // edi@112
  NiActorManager *v54; // edi@116
  void **v55; // ecx@120
  std::_List_nod<NiPoint3,std::allocator<NiPoint3> >::_Node *v56; // eax@120
  std::_List_nod<NiPoint3,std::allocator<NiPoint3> >::_Node *v57; // edi@121
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v58; // [sp+10h] [bp-18h]@80
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > result; // [sp+14h] [bp-14h]@61
  Char *v60; // [sp+18h] [bp-10h]@1
  int v61; // [sp+24h] [bp-4h]@1

  v1 = this;
  v60 = this;
  this->vfptr = (AbStateInfecteeVtbl *)Char::`vftable'{for `AbStateInfectee'};
  this->vfptr = (IEffectHolderVtbl *)&Char::`vftable'{for `IEffectHolder'};
  this->vfptr = (AttackSequenceManagerVtbl *)&Char::`vftable'{for `AttackSequenceManager'};
  v2 = this->m_spActor.m_pObject;
  v61 = 37;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spActor.m_pObject = 0;
  }
  v3 = v1->m_spCtrlNode.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spCtrlNode.m_pObject = 0;
  }
  v4 = v1->m_spScene.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spScene.m_pObject = 0;
  }
  v5 = v1->m_spHouseNode.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spHouseNode.m_pObject = 0;
  }
  v6 = v1->m_spCharNode.m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v1->m_spCharNode.m_pObject = 0;
  }
  v7 = v1->m_spCarrierNode.m_pObject;
  if ( v7 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v1->m_spCarrierNode.m_pObject = 0;
  }
  v8 = v1->m_spCharShakeNode.m_pObject;
  if ( v8 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v1->m_spCharShakeNode.m_pObject = 0;
  }
  v9 = v1->m_spCharShakeTranslateNode.m_pObject;
  if ( v9 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v1->m_spCharShakeTranslateNode.m_pObject = 0;
  }
  LinkedEffect::Clear(&v1->kLinkedEffect);
  JumpProcessor::clear(&v1->m_kJumpProcessor);
  v10 = v1->m_kAbStateVisual.spIceLight.m_pObject;
  if ( v10 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    v1->m_kAbStateVisual.spIceLight.m_pObject = 0;
  }
  v11 = v1->m_kAbStateVisual.spPoisonLight.m_pObject;
  if ( v11 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    v1->m_kAbStateVisual.spPoisonLight.m_pObject = 0;
  }
  v1->m_bClearChar = 1;
  AbStateInfectee::ClearAbState((AbStateInfectee *)&v1->vfptr, 1);
  Char::ClearOscTimeMmap(v1);
  v12 = &v1->m_mapShakeInfo._Myhead->_Left;
  v13 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)*v12;
  if ( (std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node **)*v12 != v12 )
  {
    do
    {
      v14._Ptr = v13;
      if ( !v13->_Isnil )
      {
        v15 = v13->_Right;
        if ( v15->_Isnil )
        {
          for ( i = v13->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v13 != i->_Right )
              break;
            v13 = i;
          }
          v13 = i;
        }
        else
        {
          v13 = v13->_Right;
          for ( j = v15->_Left; !j->_Isnil; j = j->_Left )
            v13 = j;
        }
      }
      std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
        (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)&v1->m_mapShakeInfo,
        &result,
        v14);
    }
    while ( v13 != (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v1->m_mapShakeInfo._Myhead );
  }
  v1->m_iCharLevel = -1;
  LOBYTE(v61) = 36;
  CSpactralGlow_Shader_Controller::~CSpactralGlow_Shader_Controller(&v1->m_kRestHouseShader);
  v18 = v1->m_spDirectionCtrls.m_pObject;
  LOBYTE(v61) = 35;
  if ( v18 && !InterlockedDecrement((volatile LONG *)&v18->m_uiRefCount) && v18 )
    v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)&v1->m_kRidePetCtl;
  LOBYTE(v61) = 38;
  CSpactralGlow_Shader_Controller::~CSpactralGlow_Shader_Controller(&v1->m_kRidePetCtl.m_kShaderCtrl);
  v19 = v1->m_kRidePetCtl.m_spPetActor.m_pObject;
  LOBYTE(v61) = 34;
  if ( v19 && !InterlockedDecrement((volatile LONG *)&v19->m_uiRefCount) && v19 )
    v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
  LOBYTE(v61) = 33;
  ActionMgr::~ActionMgr(&v1->m_kRidePetAction);
  LOBYTE(v61) = 32;
  ActionMgr::~ActionMgr(&v1->m_kActionMgr_Metamor);
  LOBYTE(v61) = 31;
  ActionMgr::~ActionMgr(&v1->m_kActionMgr);
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)&v1->m_kAbStateVisual;
  v20 = v1->m_kAbStateVisual.spPoisonLight.m_pObject;
  LOBYTE(v61) = 39;
  if ( v20 && !InterlockedDecrement((volatile LONG *)&v20->m_uiRefCount) && v20 )
    v20->vfptr->__vecDelDtor((NiRefObject *)v20, 1u);
  v21 = v1->m_kAbStateVisual.spIceLight.m_pObject;
  LOBYTE(v61) = 30;
  if ( v21 && !InterlockedDecrement((volatile LONG *)&v21->m_uiRefCount) && v21 )
    v21->vfptr->__vecDelDtor((NiRefObject *)v21, 1u);
  v22 = (void **)&v1->m_lstfHitTime._Myhead->_Next;
  v23 = (std::_List_nod<float,std::allocator<float> >::_Node *)*v22;
  *v22 = v22;
  v1->m_lstfHitTime._Myhead->_Prev = v1->m_lstfHitTime._Myhead;
  v1->m_lstfHitTime._Mysize = 0;
  if ( v23 != v1->m_lstfHitTime._Myhead )
  {
    do
    {
      v24 = v23->_Next;
      operator delete(v23);
      v23 = v24;
    }
    while ( v24 != v1->m_lstfHitTime._Myhead );
  }
  operator delete(v1->m_lstfHitTime._Myhead);
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)&v1->m_mapForceAllCamShake;
  v25._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapForceAllCamShake._Myhead;
  v26._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapForceAllCamShake._Myhead->_Left;
  LOBYTE(v61) = 40;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapForceAllCamShake,
    &v58,
    v26,
    v25);
  operator delete(v1->m_mapForceAllCamShake._Myhead);
  v58._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_mapAllCamShake;
  v27._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapAllCamShake._Myhead;
  v28._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapAllCamShake._Myhead->_Left;
  LOBYTE(v61) = 41;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapAllCamShake,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&result,
    v28,
    v27);
  operator delete(v1->m_mapAllCamShake._Myhead);
  v58._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_mapForcePartyCamShake;
  v29._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapForcePartyCamShake._Myhead;
  v30._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapForcePartyCamShake._Myhead->_Left;
  LOBYTE(v61) = 42;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapForcePartyCamShake,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&result,
    v30,
    v29);
  operator delete(v1->m_mapForcePartyCamShake._Myhead);
  v58._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_mapPartyCamShake;
  v31._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapPartyCamShake._Myhead;
  v32._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapPartyCamShake._Myhead->_Left;
  LOBYTE(v61) = 43;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapPartyCamShake,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&result,
    v32,
    v31);
  operator delete(v1->m_mapPartyCamShake._Myhead);
  v58._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_mapForceEnemeyCamShake;
  v33._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapForceEnemeyCamShake._Myhead;
  v34._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapForceEnemeyCamShake._Myhead->_Left;
  LOBYTE(v61) = 44;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapForceEnemeyCamShake,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&result,
    v34,
    v33);
  operator delete(v1->m_mapForceEnemeyCamShake._Myhead);
  v58._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_mapEnemyCamShake;
  v35._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapEnemyCamShake._Myhead;
  v36._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapEnemyCamShake._Myhead->_Left;
  LOBYTE(v61) = 45;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapEnemyCamShake,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&result,
    v36,
    v35);
  operator delete(v1->m_mapEnemyCamShake._Myhead);
  v58._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_mapForceMyCamShake;
  v37._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapForceMyCamShake._Myhead;
  v38._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapForceMyCamShake._Myhead->_Left;
  LOBYTE(v61) = 46;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapForceMyCamShake,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&result,
    v38,
    v37);
  operator delete(v1->m_mapForceMyCamShake._Myhead);
  v58._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_mapMyCamShake;
  v39._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapMyCamShake._Myhead;
  v40._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapMyCamShake._Myhead->_Left;
  LOBYTE(v61) = 47;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapMyCamShake,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&result,
    v40,
    v39);
  operator delete(v1->m_mapMyCamShake._Myhead);
  v58._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_mapDamShake;
  v41._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapDamShake._Myhead;
  v42._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapDamShake._Myhead->_Left;
  LOBYTE(v61) = 48;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapDamShake,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&result,
    v42,
    v41);
  operator delete(v1->m_mapDamShake._Myhead);
  v58._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_mapShakeInfo;
  v43._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapShakeInfo._Myhead;
  v44._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapShakeInfo._Myhead->_Left;
  LOBYTE(v61) = 49;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapShakeInfo,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&result,
    v44,
    v43);
  operator delete(v1->m_mapShakeInfo._Myhead);
  LOBYTE(v61) = 18;
  CQuestInfoViewMgr::~CQuestInfoViewMgr(&v1->m_kQuestInfoView);
  v58._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_kJumpProcessor;
  LOBYTE(v61) = 50;
  NsEffect::~NsEffect(&v1->m_kJumpProcessor.m_kEffect);
  v45 = v1->m_kJumpProcessor.m_spJumpInfo.m_pObject;
  LOBYTE(v61) = 17;
  if ( v45 && !InterlockedDecrement((volatile LONG *)&v45->m_uiRefCount) && v45 )
    v45->vfptr->__vecDelDtor((NiRefObject *)v45, 1u);
  LOBYTE(v61) = 16;
  MoveToTarget::~MoveToTarget(&v1->m_kMoveToTarget);
  LOBYTE(v61) = 15;
  ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v1->m_kSmoothRotater);
  LOBYTE(v61) = 14;
  CharShape::~CharShape(&v1->m_kCharShape);
  v46 = v1->m_spMaterialProp.m_pObject;
  LOBYTE(v61) = 13;
  if ( v46 && !InterlockedDecrement((volatile LONG *)&v46->m_uiRefCount) && v46 )
    v46->vfptr->__vecDelDtor((NiRefObject *)v46, 1u);
  LOBYTE(v61) = 12;
  OscillationEx::~OscillationEx(&v1->m_kDamageOscillation);
  v47 = v1->m_spCharShakeTranslateNode.m_pObject;
  LOBYTE(v61) = 11;
  if ( v47 && !InterlockedDecrement((volatile LONG *)&v47->m_uiRefCount) && v47 )
    v47->vfptr->__vecDelDtor((NiRefObject *)v47, 1u);
  v48 = v1->m_spCharShakeNode.m_pObject;
  LOBYTE(v61) = 10;
  if ( v48 && !InterlockedDecrement((volatile LONG *)&v48->m_uiRefCount) && v48 )
    v48->vfptr->__vecDelDtor((NiRefObject *)v48, 1u);
  v49 = v1->m_spCtrlNode.m_pObject;
  LOBYTE(v61) = 9;
  if ( v49 && !InterlockedDecrement((volatile LONG *)&v49->m_uiRefCount) && v49 )
    v49->vfptr->__vecDelDtor((NiRefObject *)v49, 1u);
  v50 = v1->m_spHouseNode.m_pObject;
  LOBYTE(v61) = 8;
  if ( v50 && !InterlockedDecrement((volatile LONG *)&v50->m_uiRefCount) && v50 )
    v50->vfptr->__vecDelDtor((NiRefObject *)v50, 1u);
  v51 = v1->m_spCharNode.m_pObject;
  LOBYTE(v61) = 7;
  if ( v51 && !InterlockedDecrement((volatile LONG *)&v51->m_uiRefCount) && v51 )
    v51->vfptr->__vecDelDtor((NiRefObject *)v51, 1u);
  v52 = v1->m_spCarrierNode.m_pObject;
  LOBYTE(v61) = 6;
  if ( v52 && !InterlockedDecrement((volatile LONG *)&v52->m_uiRefCount) && v52 )
    v52->vfptr->__vecDelDtor((NiRefObject *)v52, 1u);
  v53 = v1->m_spScene.m_pObject;
  LOBYTE(v61) = 5;
  if ( v53 && !InterlockedDecrement((volatile LONG *)&v53->m_uiRefCount) && v53 )
    v53->vfptr->__vecDelDtor((NiRefObject *)v53, 1u);
  v54 = v1->m_spActor.m_pObject;
  LOBYTE(v61) = 4;
  if ( v54 && !InterlockedDecrement((volatile LONG *)&v54->m_uiRefCount) && v54 )
    v54->vfptr->__vecDelDtor((NiRefObject *)v54, 1u);
  v55 = (void **)&v1->m_lstTraceMove._Myhead->_Next;
  v56 = (std::_List_nod<NiPoint3,std::allocator<NiPoint3> >::_Node *)*v55;
  *v55 = v55;
  v1->m_lstTraceMove._Myhead->_Prev = v1->m_lstTraceMove._Myhead;
  v1->m_lstTraceMove._Mysize = 0;
  if ( v56 != v1->m_lstTraceMove._Myhead )
  {
    do
    {
      v57 = v56->_Next;
      operator delete(v56);
      v56 = v57;
    }
    while ( v57 != v1->m_lstTraceMove._Myhead );
  }
  operator delete(v1->m_lstTraceMove._Myhead);
  if ( v1->kLinkedEffect.m_vecEffectHandle._Myfirst )
    operator delete(v1->kLinkedEffect.m_vecEffectHandle._Myfirst);
  v1->kLinkedEffect.m_vecEffectHandle._Myfirst = 0;
  v1->kLinkedEffect.m_vecEffectHandle._Mylast = 0;
  v1->kLinkedEffect.m_vecEffectHandle._Myend = 0;
  LOBYTE(v61) = 1;
  AttackSequenceManager::~AttackSequenceManager((AttackSequenceManager *)&v1->vfptr);
  LOBYTE(v61) = 0;
  IEffectHolder::~IEffectHolder((IEffectHolder *)&v1->vfptr);
  v61 = -1;
  AbStateInfectee::~AbStateInfectee((AbStateInfectee *)&v1->vfptr);
}
// 9B919C: using guessed type struct NiActorManager *(__thiscall *Char::`vftable'{for `AttackSequenceManager'})(Char *__hidden this);
// 9B91BC: using guessed type int (__stdcall *Char::`vftable'{for `IEffectHolder'})(int);
// 9B91C4: using guessed type void (__thiscall *Char::`vftable'{for `AbStateInfectee'}[2])(Char *this, AbStateInst *pkAbState, bool bNoVisual);

//----- (0063CDE0) --------------------------------------------------------
char __thiscall Char::UpdateCulling(Char *this, float fTime)
{
  Char *v2; // esi@1
  NiNode *v3; // edi@1
  NiPoint3 *v4; // eax@1
  float v5; // ST10_4@1
  float v6; // ST14_4@1
  float v7; // ST18_4@1
  float v8; // ST20_4@1
  char v9; // al@2
  AbStateInfecteeVtbl *v10; // edx@5
  void (__thiscall *v11)(Char *, float); // eax@6
  char v12; // bl@8
  bool v13; // zf@9
  bool v14; // cl@18
  AbStateInfecteeVtbl *v15; // edx@19
  void (__thiscall *v16)(Char *, float); // eax@20
  MobInfo *v17; // eax@33
  NiNode *v18; // ecx@38
  char v19; // al@48
  MobInfo *v20; // eax@50
  char result; // al@54
  float fLengthServer; // [sp+1Ch] [bp-8h]@1
  float fLengthToMainChar; // [sp+20h] [bp-4h]@1

  v2 = this;
  v3 = this->m_spScene.m_pObject;
  v4 = World::GetCameraLookAtPos(&g_kWorld);
  v5 = v4->x - v3->m_kLocal.m_Translate.x;
  v6 = v4->y - v3->m_kLocal.m_Translate.y;
  v7 = v4->z - v3->m_kLocal.m_Translate.z;
  v8 = v6 * v6 + v5 * v5 + v7 * v7;
  fLengthToMainChar = sqrt(v8);
  v13 = v2->m_kAbStateProperty.bTrapVisible == 0;
  fLengthServer = (double)g_pkMainChar[1].m_uiSkillActStep;
  v2->m_bIsUpdateScene = 0;
  if ( v13 )
  {
    v9 = g_pkMainChar->m_BeforeMetamorphosisClass;
    if ( !v9 )
      v9 = g_pkMainChar->m_kCharShape.m_kClassID;
    if ( v9 != 15 )
    {
      v10 = v2->vfptr;
      if ( v2->m_kActionMgr.m_pkCurPlaySkillViewInfo )
        v11 = (void (__thiscall *)(Char *, float))v10[18].AddAbStateByAbstateIndex;
      else
        v11 = (void (__thiscall *)(Char *, float))v10[18].IsVisible;
      ((void (__thiscall *)(_DWORD, _DWORD))v11)(v2, v2->m_fAnimationUpdateTime);
      v12 = 1;
      v2->m_spScene.m_pObject->m_uFlags |= 1u;
      if ( !v2->m_spActor.m_pObject )
      {
        v13 = v2->m_spHouseNode.m_pObject->m_kChildren.m_uiESize == 0;
        goto LABEL_43;
      }
      goto LABEL_44;
    }
  }
  if ( v2->m_bNeverCullingFlag
    || Char::IsLinkGate(v2)
    || v2->m_bIsDoor
    || fLengthToMainChar < Char::GetMaxViewLength(v2)
    && v2->m_bConnectServer
    && v2->vfptr->IsVisible((AbStateInfectee *)v2) )
  {
    v15 = v2->vfptr;
    if ( v2->m_kActionMgr.m_pkCurPlaySkillViewInfo )
      v16 = (void (__thiscall *)(Char *, float))v15[18].AddAbStateByAbstateIndex;
    else
      v16 = (void (__thiscall *)(Char *, float))v15[18].IsVisible;
    ((void (__thiscall *)(_DWORD, _DWORD))v16)(v2, v2->m_fAnimationUpdateTime);
    v12 = 1;
    if ( v2->m_bVisibleWeapon == 1 )
    {
      if ( (unsigned __int8)((int (__thiscall *)(Char *))v2->vfptr[20].Deaffect)(v2)
        || CharShape::IsSpactralGlowEnable(&v2->m_kCharShape)
        || v2->m_bCulled )
      {
        ItemUpGrade::SetShow(&v2->m_kCharShape.m_kItemUpGrade, 0);
        IEffectHolder::AttachEffectShow((IEffectHolder *)&v2->vfptr, 0);
        LinkedEffect::Show(&v2->kLinkedEffect, 0);
      }
      else
      {
        ItemUpGrade::SetShow(&v2->m_kCharShape.m_kItemUpGrade, 1);
        LinkedEffect::Show(&v2->kLinkedEffect, 1);
        IEffectHolder::AttachEffectShow((IEffectHolder *)&v2->vfptr, 1);
      }
    }
    if ( v2->m_pkMover )
      v2->m_bIsUpdate = 1;
    if ( !v2->m_bIsUpdate && !Char::IsLinkGate(v2) && !v2->m_bIsDoor )
    {
      v17 = v2->m_pMobinfo;
      if ( !v17 || !MobNoFadeInTab::IsNoFadeIn(v17->InxName) )
        Char::StartFadeIn(v2);
    }
    if ( g_pkMainChar != v2 )
    {
      if ( v2->m_bIsUpdate )
      {
        v18 = v2->m_spScene.m_pObject;
        if ( v18->m_uFlags & 1 )
        {
          if ( fLengthToMainChar < 500.0 )
            v18->m_uFlags &= 0xFFFEu;
        }
      }
    }
    v13 = v2->m_spActor.m_pObject == 0;
    v2->m_bIsUpdateScene = 1;
    if ( v13 )
    {
      v13 = v2->m_spHouseNode.m_pObject->m_kChildren.m_uiESize == 0;
LABEL_43:
      if ( v13 )
        goto LABEL_45;
    }
LABEL_44:
    v2->m_bIsUpdate = v12;
    goto LABEL_45;
  }
  if ( v2->m_bIsUpdate )
  {
    Char::StartFadeOut(v2);
    ItemUpGrade::SetShow(&v2->m_kCharShape.m_kItemUpGrade, 0);
    LinkedEffect::Show(&v2->kLinkedEffect, 0);
    IEffectHolder::AttachEffectShow((IEffectHolder *)&v2->vfptr, 0);
  }
  v14 = v2->m_bCulled;
  v12 = 1;
  v2->m_bIsUpdate = 0;
  v2->m_bCulledOld = v14;
  v2->m_bCulled = 1;
LABEL_45:
  if ( v2->vfptr->IsVisible((AbStateInfectee *)v2)
    && (v2->m_byType == 4
     || !v2->m_bUserCharacter && (v19 = v2->m_byMode, v19 != 4) && v19 != 5 && (v20 = v2->m_pMobinfo) != 0 && v20->IsNPC
     || fLengthToMainChar <= (double)fLengthServer)
    || !v2->m_kAbStateProperty.bTrapVisible )
  {
    result = v12;
  }
  else
  {
    ItemUpGrade::SetShow(&v2->m_kCharShape.m_kItemUpGrade, 0);
    LinkedEffect::Show(&v2->kLinkedEffect, 0);
    IEffectHolder::AttachEffectShow((IEffectHolder *)&v2->vfptr, 0);
    result = 0;
  }
  return result;
}

//----- (0063D160) --------------------------------------------------------
void __thiscall Char::CatchOscillationTime(Char *this)
{
  Char *v1; // ebx@1
  unsigned int v2; // eax@1
  NiControllerSequence *v3; // esi@1
  int v4; // edi@2
  NiTextKeyExtraData *v5; // esi@4
  NiTextKey *v6; // edi@8
  unsigned int v7; // eax@8
  const char *v8; // ecx@9
  char *v9; // eax@10
  char v10; // dl@11
  const char *v11; // edx@12
  unsigned int v12; // ebx@14
  unsigned int v13; // esi@14
  unsigned int v14; // ecx@14
  const char *v15; // eax@16
  int v16; // eax@18
  bool v17; // zf@18
  signed int v18; // eax@20
  bool v19; // bl@23
  unsigned int v20; // esi@26
  unsigned __int16 v21; // ax@26
  EffectViewInfo *v22; // eax@26
  double v23; // st7@26
  std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *v24; // esi@26
  std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *v25; // eax@26
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > >,bool> v26; // [sp+14h] [bp-78h]@26
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > result; // [sp+1Ch] [bp-70h]@5
  std::pair<float,EffectViewInfo *> _Val; // [sp+20h] [bp-6Ch]@26
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > itmap; // [sp+28h] [bp-64h]@5
  NiControllerSequence *pkSequence; // [sp+2Ch] [bp-60h]@1
  float v31; // [sp+30h] [bp-5Ch]@26
  Char *v32; // [sp+34h] [bp-58h]@1
  int i; // [sp+38h] [bp-54h]@2
  unsigned int ui; // [sp+3Ch] [bp-50h]@8
  unsigned int KeyNum; // [sp+40h] [bp-4Ch]@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v36; // [sp+44h] [bp-48h]@10
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > NoteName; // [sp+60h] [bp-2Ch]@4
  int v38; // [sp+88h] [bp-4h]@4

  v1 = this;
  v32 = this;
  v2 = Char::GetAniCode(this, 0, 0, 0);
  v3 = (NiControllerSequence *)Char::GetSequence(v1, v2);
  pkSequence = v3;
  if ( v3 )
  {
    Char::ClearOscTimeMmap(v1);
    v4 = 0;
    i = 0;
    while ( 1 )
    {
      NoteName._Myres = 15;
      NoteName._Mysize = 0;
      NoteName._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&NoteName, &byte_9B8E82, 0);
      v38 = 0;
      OscillationEx::GetOscillationStr(&NoteName, (OscTarget)v4);
      v5 = v3->m_spTextKeys.m_pObject;
      if ( v5 )
      {
        KeyNum = v4;
        itmap._Ptr = std::_Tree<std::_Tmap_traits<enum  MHE_STEP,ResElement *,std::less<enum  MHE_STEP>,std::allocator<std::pair<enum  MHE_STEP const,ResElement *>>,0>>::find(
                       (std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *)&v1->m_mapShakeInfo.comp,
                       &result,
                       (OscTarget *)&KeyNum)->_Ptr;
        if ( itmap._Ptr == v1->m_mapShakeInfo._Myhead )
        {
          v38 = -1;
          if ( NoteName._Myres >= 0x10 )
            operator delete(NoteName._Bx._Ptr);
          goto LABEL_32;
        }
        v6 = v5->m_pKeys;
        v7 = 0;
        KeyNum = v5->m_uiNumKeys;
        ui = 0;
        if ( KeyNum )
        {
          do
          {
            v8 = v6[v7].m_pText;
            if ( v8 )
            {
              v9 = v6[v7].m_pText;
              v36._Myres = 15;
              v36._Mysize = 0;
              v36._Bx._Buf[0] = 0;
              do
                v10 = *v9++;
              while ( v10 );
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v36, v8, v9 - (v8 + 1));
              v11 = NoteName._Bx._Ptr;
              if ( NoteName._Myres < 0x10 )
                v11 = (const char *)&NoteName;
              v12 = v36._Mysize;
              v13 = NoteName._Mysize;
              v14 = v36._Mysize;
              if ( v36._Mysize >= NoteName._Mysize )
                v14 = NoteName._Mysize;
              v15 = v36._Bx._Ptr;
              if ( v36._Myres < 0x10 )
                v15 = (const char *)&v36;
              v16 = std::char_traits<char>::compare(v15, v11, v14);
              v17 = v16 == 0;
              if ( !v16 )
              {
                if ( v12 >= v13 )
                  v18 = v12 != v13;
                else
                  v18 = -1;
                v17 = v18 == 0;
              }
              v19 = v17;
              LOBYTE(v38) = 0;
              if ( v36._Myres >= 0x10 )
                operator delete(v36._Bx._Ptr);
              if ( v19 )
              {
                v20 = ui;
                v31 = v6[ui].m_fTime;
                v21 = Char::FindShnIndex(v6, KeyNum, v31);
                v22 = ShakeEffectViewInfoTab::GetByID(v21);
                v23 = v6[v20].m_fTime;
                v24 = itmap._Ptr->_Myval.second;
                _Val.first = v23;
                _Val.second = v22;
                v25 = std::_Tree_val<std::_Tmap_traits<float,ActionEffectInfo *,std::less<float>,std::allocator<std::pair<float const,ActionEffectInfo *>>,1>>::_Buynode<std::pair<float,ActionEffectInfo *>>(
                        (std::_Tree_val<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > *)&v24->comp,
                        &_Val);
                std::_Tree<std::_Tmap_traits<float,ActionEffectInfo *,std::less<float>,std::allocator<std::pair<float const,ActionEffectInfo *>>,1>>::_Linsert(
                  (std::_Tree<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > *)&v24->comp,
                  &v26,
                  v25,
                  0);
              }
            }
            v7 = ui + 1;
            ui = v7;
          }
          while ( v7 < KeyNum );
          v1 = v32;
        }
        v4 = i;
      }
      v38 = -1;
      if ( NoteName._Myres >= 0x10 )
        operator delete(NoteName._Bx._Ptr);
LABEL_32:
      i = ++v4;
      if ( v4 >= 9 )
        return;
      v3 = pkSequence;
    }
  }
}

//----- (0063D3B0) --------------------------------------------------------
bool __thiscall Char::Metamorphosis(Char *this, unsigned __int16 monsterid)
{
  Char *v2; // esi@1
  bool result; // al@1
  DirectionControllers *v4; // ecx@2
  bool v5; // bl@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > rStrName; // [sp+Ch] [bp-2Ch]@2
  int v7; // [sp+34h] [bp-4h]@2

  v2 = this;
  result = Char::ImmediatelyMetamorphosis(this, monsterid);
  if ( result )
  {
    rStrName._Myres = 15;
    rStrName._Mysize = 0;
    rStrName._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&rStrName, "Metamorphosis", 0xDu);
    v4 = v2->m_spDirectionCtrls.m_pObject;
    v7 = 0;
    v5 = DirectionControllers::DoRunDirection(v4, &rStrName) == 0;
    if ( rStrName._Myres >= 0x10 )
      operator delete(rStrName._Bx._Ptr);
    result = v5 == 0;
  }
  return result;
}

//----- (0063D460) --------------------------------------------------------
bool __thiscall Char::UnMetamorphosis(Char *this)
{
  Char *v1; // esi@1
  DirectionControllers *v2; // ecx@3
  bool result; // al@5
  bool v4; // [sp+Bh] [bp-2Dh]@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > rStrName; // [sp+Ch] [bp-2Ch]@3
  int v6; // [sp+34h] [bp-4h]@3

  v1 = this;
  if ( !(unsigned __int8)((int (*)(void))this->vfptr[20].Deaffect)()
    || DirectionControllers::IsRunDirection(v1->m_spDirectionCtrls.m_pObject) )
  {
    result = 0;
  }
  else
  {
    ((void (__thiscall *)(Char *, signed int))v1->vfptr[7].AddAbStateByAbstateIndex)(v1, 1);
    rStrName._Myres = 15;
    rStrName._Mysize = 0;
    rStrName._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&rStrName, "UnMetamorphosis", 0xFu);
    v2 = v1->m_spDirectionCtrls.m_pObject;
    v6 = 0;
    v4 = DirectionControllers::DoRunDirection(v2, &rStrName) == 0;
    if ( rStrName._Myres >= 0x10 )
      operator delete(rStrName._Bx._Ptr);
    result = v4 == 0;
  }
  return result;
}

//----- (0063D530) --------------------------------------------------------
void __thiscall Char::AddTraceMove(Char *this, NiPoint3 *Move)
{
  std::_List_nod<NiPoint3,std::allocator<NiPoint3> >::_Node *v2; // edi@1
  char *v3; // esi@1
  std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *v4; // eax@1
  int v5; // ecx@1

  v2 = this->m_lstTraceMove._Myhead;
  v3 = (char *)&this->m_lstTraceMove;
  v4 = std::_List_val<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo>>::_Buynode(
         (std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *)this->m_lstTraceMove._Myhead,
         (std::_List_nod<QuestPigeonEffect::EffectInfo,std::allocator<QuestPigeonEffect::EffectInfo> >::_Node *)v2->_Prev,
         (QuestPigeonEffect::EffectInfo *)Move);
  v5 = *((_DWORD *)v3 + 1);
  if ( (unsigned int)(357913940 - v5) < 1 )
    std::_Xlength_error("list<T> too long");
  *((_DWORD *)v3 + 1) = v5 + 1;
  v2->_Prev = (std::_List_nod<NiPoint3,std::allocator<NiPoint3> >::_Node *)v4;
  v4->_Prev->_Next = v4;
}

//----- (0063D580) --------------------------------------------------------
void __thiscall Char::UpdateTrace(Char *this)
{
  Char *v1; // esi@1
  std::_List_nod<NiPoint3,std::allocator<NiPoint3> >::_Node *v2; // ecx@2
  float kNextPos_8; // ST28_4@2
  float v4; // ST2C_4@2
  float v5; // eax@2
  float v6; // ST30_4@2
  float v7; // ST34_4@2
  void **v8; // ecx@5
  _DWORD **v9; // eax@5
  float kLen; // [sp+28h] [bp-4h]@2

  v1 = this;
  if ( this->m_lstTraceMove._Mysize )
  {
    v2 = this->m_lstTraceMove._Myhead->_Next;
    kNextPos_8 = v2->_Myval.z;
    v4 = v2->_Myval.x - v1->m_kMoveToTarget.m_pos3End.x;
    v5 = v1->m_kMoveToTarget.m_pos3End.z;
    v6 = v2->_Myval.y - v1->m_kMoveToTarget.m_pos3End.y;
    v7 = 0.0 - 0.0;
    kLen = v6 * v6 + v4 * v4 + v7 * v7;
    if ( kLen <= 10000.0 )
      ((void (__thiscall *)(Char *, NiPoint3 *, _DWORD, NiColor *, _DWORD))v1->vfptr[7].SetAbStateProperty)(
        v1,
        &v2->_Myval,
        0,
        &Char::INVALIDPOINT3,
        0);
    if ( kLen <= 1.0 )
    {
      v8 = (void **)&v1->m_lstTraceMove._Myhead->_Next;
      v9 = (_DWORD **)*v8;
      if ( *v8 != v8 )
      {
        *v9[1] = *v9;
        (*v9)[1] = v9[1];
        operator delete(v9);
        --v1->m_lstTraceMove._Mysize;
      }
    }
  }
}

//----- (0063D670) --------------------------------------------------------
bool __thiscall LinkedEffect::SetNode(LinkedEffect *this, NiNode *_pNode, unsigned __int16 kHandle)
{
  NiNode *v3; // ebx@1
  std::vector<NiTimeController *,std::allocator<NiTimeController *> > *v4; // edi@1
  bool result; // al@2
  NiAVObject **v6; // ecx@3
  unsigned int v7; // edx@3
  signed int v8; // eax@3
  NiNode *v9; // ebx@7
  NiNode *v10; // esi@11
  void *(__thiscall *v11)(NiRefObject *, unsigned int); // edx@11
  NiNode *v12; // ecx@11
  unsigned int v13; // eax@16
  unsigned int v14; // esi@16
  int v15; // esi@18
  NiTimeController **v16; // eax@20
  _DWORD *v17; // eax@24
  NiAVObject **v18; // ecx@32
  void (__stdcall ***v19)(_DWORD); // edx@32
  signed int v20; // eax@32
  NiNode *v21; // ebx@36
  NiNode *v22; // esi@40
  void *(__thiscall *v23)(NiRefObject *, unsigned int); // edx@40
  NiNode *v24; // ecx@40
  NiNode *v25; // ebx@41
  unsigned int v26; // eax@46
  NiTimeController **v27; // edx@47
  NiTimeController **v28; // ecx@48
  int v29; // esi@48
  unsigned int v30; // eax@49
  unsigned int v31; // eax@50
  unsigned int v32; // ecx@50
  unsigned int v33; // ecx@52
  NiTimeController **v34; // eax@57
  NiTimeController **v35; // esi@57
  NiTimeController **v36; // ecx@59
  unsigned int v37; // eax@60
  unsigned int v38; // eax@61
  unsigned int v39; // ecx@61
  unsigned int v40; // ecx@63
  NiTimeController **v41; // eax@68
  NiNode *v42; // [sp+3Ch] [bp-64h]@1
  unsigned int dwEffect; // [sp+40h] [bp-60h]@15
  void (__stdcall ***v44)(_DWORD); // [sp+44h] [bp-5Ch]@11
  int i; // [sp+48h] [bp-58h]@3
  NiTimeController *v46; // [sp+4Ch] [bp-54h]@12
  bool bResult; // [sp+53h] [bp-4Dh]@3
  NsFindObjectByName kFindObject; // [sp+54h] [bp-4Ch]@3
  int v49; // [sp+9Ch] [bp-4h]@3

  v3 = _pNode;
  v4 = (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)this;
  v42 = _pNode;
  LinkedEffect::Clear(this);
  if ( _pNode )
  {
    bResult = 0;
    kFindObject.m_pCallBack = 0;
    kFindObject.m_nCurLevel = -1;
    kFindObject.vfptr = (Ns_TourSceneVtbl *)&NsFindObjectByName::`vftable';
    kFindObject.m_szName._Myres = 15;
    kFindObject.m_szName._Mysize = 0;
    kFindObject.m_szName._Bx._Buf[0] = 0;
    kFindObject.m_vecObject._Myfirst = 0;
    kFindObject.m_vecObject._Mylast = 0;
    kFindObject.m_vecObject._Myend = 0;
    v49 = 0;
    NsFindObjectByName::FindObject(&kFindObject, _pNode, "NOOUTLINE");
    v6 = kFindObject.m_vecObject._Myfirst;
    v7 = 0;
    v8 = kFindObject.m_vecObject._Mylast - kFindObject.m_vecObject._Myfirst;
    i = 0;
    if ( v8 > 0 )
    {
      bResult = 1;
      while ( 1 )
      {
        if ( v7 < v8 )
          v9 = (NiNode *)v6[v7];
        else
          v9 = 0;
        if ( v9 )
          InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
        v10 = v9->m_pkParent;
        v11 = v10->vfptr[30].__vecDelDtor;
        v12 = v9->m_pkParent;
        LOBYTE(v49) = 1;
        ((void (__thiscall *)(NiNode *, void (__stdcall ****)(_DWORD), NiNode *))v11)(v12, &v44, v9);
        if ( v44 )
        {
          v46 = (NiTimeController *)v44;
          if ( !InterlockedDecrement((volatile LONG *)v44 + 1) )
          {
            if ( v46 )
              ((void (__stdcall *)(signed int))v46->vfptr->__vecDelDtor)(1);
          }
        }
        if ( EffectMgr::CreateAttachEffect(&g_kEffectMgr, &dwEffect, v9, v10, Timer::ms_fCurTime, 1, kHandle) )
        {
          v13 = (unsigned int)v4->_Mylast;
          v14 = dwEffect;
          v46 = (NiTimeController *)dwEffect;
          if ( (unsigned int)&v46 >= v13 || v4->_Myfirst > &v46 )
          {
            if ( (NiTimeController **)v13 == v4->_Myend )
              std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(v4, 1u);
            v17 = v4->_Mylast;
            if ( v17 )
              *v17 = v14;
          }
          else
          {
            v15 = &v46 - v4->_Myfirst;
            if ( (NiTimeController **)v13 == v4->_Myend )
              std::vector<BasicInfoFindWord *,std::allocator<BasicInfoFindWord *>>::_Reserve(v4, 1u);
            v16 = v4->_Mylast;
            if ( v16 )
              *v16 = v4->_Myfirst[v15];
          }
          ++v4->_Mylast;
        }
        LOBYTE(v49) = 0;
        if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
          v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
        v6 = kFindObject.m_vecObject._Myfirst;
        v8 = kFindObject.m_vecObject._Mylast - kFindObject.m_vecObject._Myfirst;
        if ( ++i >= v8 )
          break;
        v7 = i;
      }
      v3 = v42;
    }
    if ( NiObjectNET::GetExtraData((NiObjectNET *)&v3->vfptr, off_9B8E84) )
    {
      std::vector<PgWinText *,std::allocator<PgWinText *>>::resize(
        (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&kFindObject.m_vecObject,
        0);
      NsFindObjectByName::FindObject(&kFindObject, v3, "Scene Root");
      v18 = kFindObject.m_vecObject._Myfirst;
      v19 = 0;
      v20 = kFindObject.m_vecObject._Mylast - kFindObject.m_vecObject._Myfirst;
      v44 = 0;
      if ( v20 > 0 )
      {
        while ( 1 )
        {
          if ( (unsigned int)v19 < v20 )
          {
            i = (int)v18[(_DWORD)v19];
            v21 = (NiNode *)i;
          }
          else
          {
            v21 = 0;
            i = 0;
          }
          if ( v21 )
            InterlockedIncrement((volatile LONG *)&v21->m_uiRefCount);
          v22 = v21->m_pkParent;
          v23 = v22->vfptr[30].__vecDelDtor;
          v24 = v21->m_pkParent;
          LOBYTE(v49) = 2;
          ((void (__thiscall *)(NiNode *, NiNode **, NiNode *))v23)(v24, &v42, v21);
          if ( v42 )
          {
            v25 = v42;
            if ( !InterlockedDecrement((volatile LONG *)&v42->m_uiRefCount) && v25 )
              v25->vfptr->__vecDelDtor((NiRefObject *)v25, 1u);
            v21 = (NiNode *)i;
          }
          if ( EffectMgr::CreateAttachEffect(&g_kEffectMgr, &dwEffect, v21, v22, Timer::ms_fCurTime, 1, kHandle) )
          {
            v26 = (unsigned int)v4->_Mylast;
            v46 = (NiTimeController *)dwEffect;
            if ( (unsigned int)&v46 >= v26 || (v27 = v4->_Myfirst, v4->_Myfirst > &v46) )
            {
              v36 = v4->_Myend;
              if ( (NiTimeController **)v26 == v36 )
              {
                v37 = (signed int)(v26 - (unsigned int)v4->_Myfirst) >> 2;
                if ( v37 > 0x3FFFFFFE )
LABEL_75:
                  std::_Xlength_error("vector<T> too long");
                v38 = v37 + 1;
                v39 = v36 - v4->_Myfirst;
                if ( v38 > v39 )
                {
                  if ( 0x3FFFFFFF - (v39 >> 1) >= v39 )
                    v40 = (v39 >> 1) + v39;
                  else
                    v40 = 0;
                  if ( v40 < v38 )
                    v40 = v38;
                  std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
                    (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)v4,
                    v40);
                }
              }
              v41 = v4->_Mylast;
              if ( v41 )
                *v41 = v46;
            }
            else
            {
              v28 = v4->_Myend;
              v29 = &v46 - v27;
              if ( (NiTimeController **)v26 == v28 )
              {
                v30 = (signed int)(v26 - (_DWORD)v27) >> 2;
                if ( v30 > 0x3FFFFFFE )
                  goto LABEL_75;
                v31 = v30 + 1;
                v32 = v28 - v27;
                if ( v31 > v32 )
                {
                  if ( 0x3FFFFFFF - (v32 >> 1) >= v32 )
                    v33 = (v32 >> 1) + v32;
                  else
                    v33 = 0;
                  if ( v33 < v31 )
                    v33 = v31;
                  std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
                    (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)v4,
                    v33);
                  v21 = (NiNode *)i;
                }
              }
              v34 = v4->_Mylast;
              v35 = &v4->_Myfirst[v29];
              if ( v34 )
                *v34 = *v35;
            }
            ++v4->_Mylast;
          }
          bResult = 1;
          LOBYTE(v49) = 0;
          if ( !InterlockedDecrement((volatile LONG *)&v21->m_uiRefCount) )
            v21->vfptr->__vecDelDtor((NiRefObject *)v21, 1u);
          v18 = kFindObject.m_vecObject._Myfirst;
          v20 = kFindObject.m_vecObject._Mylast - kFindObject.m_vecObject._Myfirst;
          v44 = (void (__stdcall ***)(_DWORD))((char *)v44 + 1);
          if ( (signed int)v44 >= v20 )
            break;
          v19 = v44;
        }
      }
    }
    else
    {
      v18 = kFindObject.m_vecObject._Myfirst;
    }
    if ( v18 )
      operator delete(v18);
    kFindObject.m_vecObject._Myfirst = 0;
    kFindObject.m_vecObject._Mylast = 0;
    kFindObject.m_vecObject._Myend = 0;
    if ( kFindObject.m_szName._Myres >= 0x10 )
      operator delete(kFindObject.m_szName._Bx._Ptr);
    result = bResult;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9B9194: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *NsFindObjectByName::`vftable')(NsFindObjectByName *this, NiAVObject *_pkObject, void *);
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0063DA60) --------------------------------------------------------
void __thiscall Char::Char(Char *this)
{
  Char *v1; // esi@1
  std::_List_nod<NiPoint3,std::allocator<NiPoint3> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *v3; // eax@2
  std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *v4; // eax@3
  std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *v5; // eax@4
  std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *v6; // eax@5
  std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *v7; // eax@6
  std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *v8; // eax@7
  std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *v9; // eax@8
  std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *v10; // eax@9
  std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *v11; // eax@10
  std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *v12; // eax@11
  std::_List_nod<float,std::allocator<float> >::_Node *v13; // eax@12
  void (__stdcall **v14)(_DWORD); // eax@13
  _DWORD *v15; // eax@18
  NpNs_MoveToTargetVtbl *v16; // edx@18
  void (__stdcall *v17)(float); // eax@18
  NsFadeNode *v18; // eax@18
  void (__stdcall **v19)(_DWORD); // eax@19
  NiNode *v20; // eax@21
  void (__stdcall **v21)(_DWORD); // eax@26
  NiNode *v22; // eax@28
  void (__stdcall **v23)(_DWORD); // eax@29
  NiNode *v24; // eax@31
  void (__stdcall **v25)(_DWORD); // eax@36
  NiNode *v26; // eax@38
  void (__stdcall **v27)(_DWORD); // eax@39
  NiNode *v28; // eax@41
  void (__stdcall **v29)(_DWORD); // eax@46
  NiNode *v30; // eax@48
  void (__stdcall **v31)(_DWORD); // eax@49
  NiNode *v32; // eax@51
  void (__stdcall **v33)(_DWORD); // eax@56
  NiNode *v34; // eax@58
  void (__stdcall **v35)(_DWORD); // eax@59
  NiNode *v36; // eax@61
  void (__stdcall **v37)(_DWORD); // eax@66
  void ***v38; // ecx@68
  void **v39; // eax@68
  double v40; // st7@70
  NiAmbientLight *v41; // eax@70
  void (__stdcall **v42)(_DWORD); // eax@71
  NiLight *v43; // eax@73
  void (__stdcall **v44)(_DWORD); // eax@78
  NiLight *v45; // eax@80
  NiLight *v46; // eax@80
  NiLight *v47; // eax@80
  int v48; // edx@80
  NiLight *v49; // eax@80
  float v50; // edx@80
  NiAmbientLight *v51; // eax@80
  void (__stdcall **v52)(_DWORD); // eax@81
  NiLight *v53; // eax@83
  void (__stdcall **v54)(_DWORD); // eax@88
  NiLight *v55; // eax@90
  NiLight *v56; // eax@90
  int v57; // edx@90
  NiLight *v58; // eax@90
  float v59; // edx@90
  int v60; // edx@90
  NiLight *v61; // eax@90
  DirectionControllers *v62; // ecx@90
  DirectionControllers *v63; // eax@95
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v64; // eax@121
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v65; // eax@121
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v66; // eax@121
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v67; // eax@121
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v68; // eax@121
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v69; // eax@121
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v70; // eax@121
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v71; // eax@121
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v72; // eax@121
  void **v73; // eax@121
  std::_List_nod<NiPoint3,std::allocator<NiPoint3> >::_Node *v74; // ecx@121
  std::_List_nod<NiPoint3,std::allocator<NiPoint3> >::_Node *v75; // edi@122
  void **v76; // ecx@134
  std::exception v77; // [sp+48h] [bp-3Ch]@126
  std::exception pExceptionObject; // [sp+54h] [bp-30h]@124
  Char *v79; // [sp+60h] [bp-24h]@1
  float v80; // [sp+64h] [bp-20h]@80
  std::pair<int const ,int> _Val; // [sp+68h] [bp-1Ch]@18
  void *p; // [sp+70h] [bp-14h]@13
  void (__stdcall **v83)(_DWORD); // [sp+74h] [bp-10h]@13
  int v84; // [sp+80h] [bp-4h]@1

  v1 = this;
  v79 = this;
  AbStateInfectee::AbStateInfectee((AbStateInfectee *)&this->vfptr);
  v84 = 0;
  IEffectHolder::IEffectHolder((IEffectHolder *)&v1->vfptr);
  AttackSequenceManager::AttackSequenceManager((AttackSequenceManager *)&v1->vfptr);
  v1->vfptr = (AbStateInfecteeVtbl *)Char::`vftable'{for `AbStateInfectee'};
  v1->vfptr = (IEffectHolderVtbl *)&Char::`vftable'{for `IEffectHolder'};
  v1->vfptr = (AttackSequenceManagerVtbl *)&Char::`vftable'{for `AttackSequenceManager'};
  v1->kLinkedEffect.m_vecEffectHandle._Myfirst = 0;
  v1->kLinkedEffect.m_vecEffectHandle._Mylast = 0;
  v1->kLinkedEffect.m_vecEffectHandle._Myend = 0;
  LOBYTE(v84) = 3;
  v1->m_lstTraceMove._Mysize = 0;
  v2 = (std::_List_nod<NiPoint3,std::allocator<NiPoint3> >::_Node *)operator new(0x14u);
  if ( !v2 )
  {
    _Val.second = 0;
    v76 = (void **)&_Val.second;
    goto LABEL_135;
  }
  v1->m_lstTraceMove._Myhead = v2;
  v2->_Next = v2;
  v1->m_lstTraceMove._Myhead->_Prev = v1->m_lstTraceMove._Myhead;
  v1->m_spActor.m_pObject = 0;
  v1->m_spScene.m_pObject = 0;
  v1->m_spCarrierNode.m_pObject = 0;
  v1->m_spCharNode.m_pObject = 0;
  v1->m_spHouseNode.m_pObject = 0;
  v1->m_spCtrlNode.m_pObject = 0;
  v1->m_spCharShakeNode.m_pObject = 0;
  v1->m_spCharShakeTranslateNode.m_pObject = 0;
  OscillationEx::OscillationEx(&v1->m_kDamageOscillation);
  v1->m_spMaterialProp.m_pObject = 0;
  CharShape::CharShape(&v1->m_kCharShape);
  NpNs_SmoothRotateControler::NpNs_SmoothRotateControler(&v1->m_kSmoothRotater);
  MoveToTarget::MoveToTarget(&v1->m_kMoveToTarget);
  JumpProcessor::JumpProcessor(&v1->m_kJumpProcessor);
  CQuestInfoViewMgr::CQuestInfoViewMgr(&v1->m_kQuestInfoView);
  LOBYTE(v84) = 19;
  v1->m_mapShakeInfo._Mysize = 0;
  v3 = (std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *)operator new(0x18u);
  if ( !v3 )
  {
$LN1633:
    _Val.second = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val.second);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_mapShakeInfo._Myhead = v3;
  v3->_Left = v3;
  v1->m_mapShakeInfo._Myhead->_Parent = v1->m_mapShakeInfo._Myhead;
  v1->m_mapShakeInfo._Myhead->_Right = v1->m_mapShakeInfo._Myhead;
  v1->m_mapShakeInfo._Myhead->_Color = 1;
  v1->m_mapShakeInfo._Myhead->_Isnil = 1;
  LOBYTE(v84) = 20;
  v1->m_mapDamShake._Mysize = 0;
  v4 = (std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *)operator new(0x18u);
  if ( !v4 )
  {
$LN1632:
    *(float *)&p = 0.0;
    std::exception::exception(&v77, (const char *const *)&p);
    v77.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&v77, &_TI2_AVbad_alloc_std__);
  }
  v1->m_mapDamShake._Myhead = v4;
  v4->_Left = v4;
  v1->m_mapDamShake._Myhead->_Parent = v1->m_mapDamShake._Myhead;
  v1->m_mapDamShake._Myhead->_Right = v1->m_mapDamShake._Myhead;
  v1->m_mapDamShake._Myhead->_Color = 1;
  v1->m_mapDamShake._Myhead->_Isnil = 1;
  LOBYTE(v84) = 21;
  v1->m_mapMyCamShake._Mysize = 0;
  v5 = (std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *)operator new(0x18u);
  if ( !v5 )
  {
$LN1631:
    _Val.second = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val.second);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_mapMyCamShake._Myhead = v5;
  v5->_Left = v5;
  v1->m_mapMyCamShake._Myhead->_Parent = v1->m_mapMyCamShake._Myhead;
  v1->m_mapMyCamShake._Myhead->_Right = v1->m_mapMyCamShake._Myhead;
  v1->m_mapMyCamShake._Myhead->_Color = 1;
  v1->m_mapMyCamShake._Myhead->_Isnil = 1;
  LOBYTE(v84) = 22;
  v1->m_mapForceMyCamShake._Mysize = 0;
  v6 = (std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *)operator new(0x18u);
  if ( !v6 )
  {
$LN1630:
    *(float *)&p = 0.0;
    std::exception::exception(&v77, (const char *const *)&p);
    v77.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&v77, &_TI2_AVbad_alloc_std__);
  }
  v1->m_mapForceMyCamShake._Myhead = v6;
  v6->_Left = v6;
  v1->m_mapForceMyCamShake._Myhead->_Parent = v1->m_mapForceMyCamShake._Myhead;
  v1->m_mapForceMyCamShake._Myhead->_Right = v1->m_mapForceMyCamShake._Myhead;
  v1->m_mapForceMyCamShake._Myhead->_Color = 1;
  v1->m_mapForceMyCamShake._Myhead->_Isnil = 1;
  LOBYTE(v84) = 23;
  v1->m_mapEnemyCamShake._Mysize = 0;
  v7 = (std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *)operator new(0x18u);
  if ( !v7 )
  {
LABEL_124:
    _Val.second = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val.second);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_mapEnemyCamShake._Myhead = v7;
  v7->_Left = v7;
  v1->m_mapEnemyCamShake._Myhead->_Parent = v1->m_mapEnemyCamShake._Myhead;
  v1->m_mapEnemyCamShake._Myhead->_Right = v1->m_mapEnemyCamShake._Myhead;
  v1->m_mapEnemyCamShake._Myhead->_Color = 1;
  v1->m_mapEnemyCamShake._Myhead->_Isnil = 1;
  LOBYTE(v84) = 24;
  v1->m_mapForceEnemeyCamShake._Mysize = 0;
  v8 = (std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *)operator new(0x18u);
  if ( !v8 )
  {
    *(float *)&p = 0.0;
    v76 = &p;
LABEL_135:
    std::exception::exception(&v77, (const char *const *)v76);
    v77.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&v77, &_TI2_AVbad_alloc_std__);
  }
  v1->m_mapForceEnemeyCamShake._Myhead = v8;
  v8->_Left = v8;
  v1->m_mapForceEnemeyCamShake._Myhead->_Parent = v1->m_mapForceEnemeyCamShake._Myhead;
  v1->m_mapForceEnemeyCamShake._Myhead->_Right = v1->m_mapForceEnemeyCamShake._Myhead;
  v1->m_mapForceEnemeyCamShake._Myhead->_Color = 1;
  v1->m_mapForceEnemeyCamShake._Myhead->_Isnil = 1;
  LOBYTE(v84) = 25;
  v1->m_mapPartyCamShake._Mysize = 0;
  v9 = (std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *)operator new(0x18u);
  if ( !v9 )
    goto $LN1633;
  v1->m_mapPartyCamShake._Myhead = v9;
  v9->_Left = v9;
  v1->m_mapPartyCamShake._Myhead->_Parent = v1->m_mapPartyCamShake._Myhead;
  v1->m_mapPartyCamShake._Myhead->_Right = v1->m_mapPartyCamShake._Myhead;
  v1->m_mapPartyCamShake._Myhead->_Color = 1;
  v1->m_mapPartyCamShake._Myhead->_Isnil = 1;
  LOBYTE(v84) = 26;
  v1->m_mapForcePartyCamShake._Mysize = 0;
  v10 = (std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *)operator new(0x18u);
  if ( !v10 )
    goto $LN1632;
  v1->m_mapForcePartyCamShake._Myhead = v10;
  v10->_Left = v10;
  v1->m_mapForcePartyCamShake._Myhead->_Parent = v1->m_mapForcePartyCamShake._Myhead;
  v1->m_mapForcePartyCamShake._Myhead->_Right = v1->m_mapForcePartyCamShake._Myhead;
  v1->m_mapForcePartyCamShake._Myhead->_Color = 1;
  v1->m_mapForcePartyCamShake._Myhead->_Isnil = 1;
  LOBYTE(v84) = 27;
  v1->m_mapAllCamShake._Mysize = 0;
  v11 = (std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *)operator new(0x18u);
  if ( !v11 )
    goto $LN1631;
  v1->m_mapAllCamShake._Myhead = v11;
  v11->_Left = v11;
  v1->m_mapAllCamShake._Myhead->_Parent = v1->m_mapAllCamShake._Myhead;
  v1->m_mapAllCamShake._Myhead->_Right = v1->m_mapAllCamShake._Myhead;
  v1->m_mapAllCamShake._Myhead->_Color = 1;
  v1->m_mapAllCamShake._Myhead->_Isnil = 1;
  LOBYTE(v84) = 28;
  v1->m_mapForceAllCamShake._Mysize = 0;
  v12 = (std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *)operator new(0x18u);
  if ( !v12 )
    goto $LN1630;
  v1->m_mapForceAllCamShake._Myhead = v12;
  v12->_Left = v12;
  v1->m_mapForceAllCamShake._Myhead->_Parent = v1->m_mapForceAllCamShake._Myhead;
  v1->m_mapForceAllCamShake._Myhead->_Right = v1->m_mapForceAllCamShake._Myhead;
  v1->m_mapForceAllCamShake._Myhead->_Color = 1;
  v1->m_mapForceAllCamShake._Myhead->_Isnil = 1;
  LOBYTE(v84) = 29;
  v1->m_lstfHitTime._Mysize = 0;
  v13 = (std::_List_nod<float,std::allocator<float> >::_Node *)operator new(0xCu);
  if ( !v13 )
    goto LABEL_124;
  v1->m_lstfHitTime._Myhead = v13;
  v13->_Next = v13;
  v1->m_lstfHitTime._Myhead->_Prev = v1->m_lstfHitTime._Myhead;
  v1->m_kAbStateVisual.spIceLight.m_pObject = 0;
  v1->m_kAbStateVisual.spPoisonLight.m_pObject = 0;
  ActionMgr::ActionMgr(&v1->m_kActionMgr);
  ActionMgr::ActionMgr(&v1->m_kActionMgr_Metamor);
  ActionMgr::ActionMgr(&v1->m_kRidePetAction);
  p = &v1->m_kRidePetCtl;
  v1->m_kRidePetCtl.m_spPetActor.m_pObject = 0;
  LOBYTE(v84) = 35;
  CSpactralGlow_Shader_Controller::CSpactralGlow_Shader_Controller(&v1->m_kRidePetCtl.m_kShaderCtrl);
  v14 = (void (__stdcall **)(_DWORD))*((_DWORD *)p + 5);
  LOBYTE(v84) = 36;
  v83 = v14;
  if ( v14 )
  {
    if ( !InterlockedDecrement((volatile LONG *)v14 + 1) && *(float *)&v83 != 0.0 )
      (*(void (__stdcall **)(signed int))*v83)(1);
    *((_DWORD *)p + 5) = 0;
  }
  v15 = p;
  *(_DWORD *)p = 0;
  v15[1] = 0;
  v15[2] = 0;
  v15[3] = 0;
  v1->m_spDirectionCtrls.m_pObject = 0;
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kGtiSpeedInterval);
  CSpactralGlow_Shader_Controller::CSpactralGlow_Shader_Controller(&v1->m_kRestHouseShader);
  v1->m_RisingTimer.m_fStartTime = 0.0;
  v1->m_RisingTimer.m_fObjectTime = 0.0;
  v1->m_RisingTimer.m_fElapsedTime = 0.0;
  LOBYTE(v84) = 39;
  v1->m_kHandle = -1;
  v1->m_acName[0] = 0;
  v1->m_acLinkGateName[0] = 0;
  v1->m_iHP = 0;
  v1->m_iPrevHP = 0;
  v1->m_iMaxHP = 0;
  v1->m_iSP = 0;
  v1->m_iMaxSP = 0;
  v1->m_iAP = 0;
  v1->m_iMaxAP = 0;
  v1->m_bOldDuringMove = 0;
  v1->m_bIsUpdate = 0;
  NpNs_SmoothRotateControler::Init(&v1->m_kSmoothRotater, &World::ms_kNorthDir, &World::ms_kUpDir);
  *(float *)&p = NI_PI * 4.0;
  v1->m_kSmoothRotater.m_fSpeed = *(float *)&p;
  *(_DWORD *)&v1->m_acName[0] = 0;
  *(_DWORD *)&v1->m_acName[4] = 0;
  *(_DWORD *)&v1->m_acName[8] = 0;
  *(_DWORD *)&v1->m_acName[12] = 0;
  *(_DWORD *)&v1->m_acName[16] = 0;
  *(_DWORD *)&v1->m_acName[20] = 0;
  *(_DWORD *)&v1->m_acName[24] = 0;
  *(_DWORD *)&v1->m_acName[28] = 0;
  *(_DWORD *)&v1->m_acName[32] = 0;
  *(_DWORD *)&v1->m_acName[36] = 0;
  v16 = v1->m_kMoveToTarget.vfptr;
  v1->m_uiLayerAniCode[0] = NiActorManager::INVALID_EVENT_CODE;
  v17 = *(void (__stdcall **)(float))&v16->gap4[4];
  v1->m_uiLayerAniCode[1] = NiActorManager::INVALID_EVENT_CODE;
  v1->m_fWalkSpeed = Char::ms_fDefaultWalkSpeed;
  v1->m_fRunSpeed = Char::ms_fDefaultRunSpeed;
  v1->m_fMoveSpeedRate = 1.0;
  ((void (__stdcall *)(_DWORD))v17)(v1->m_fRunSpeed);
  v1->m_kMoveToTarget.vfptr->Stop((NpNs_MoveToTarget *)&v1->m_kMoveToTarget);
  v1->m_byMode = 1;
  v1->m_eStandMode = 0;
  v1->m_eMoveMode = 1;
  v1->m_ReservedHitCharHandle = -1;
  v1->m_eCurPlaySkillType = 0;
  v1->m_kCurPlaySkillID = -1;
  v18 = (NsFadeNode *)operator new(0x168u);
  _Val.second = (int)v18;
  LOBYTE(v84) = 40;
  if ( v18 )
  {
    NsFadeNode::NsFadeNode(v18, 0);
    v83 = v19;
  }
  else
  {
    *(float *)&v83 = 0.0;
  }
  v20 = v1->m_spScene.m_pObject;
  LOBYTE(v84) = 39;
  p = v20;
  if ( (void (__stdcall **)(_DWORD))v20 != v83 )
  {
    if ( *(float *)&v20 != 0.0 && !InterlockedDecrement((volatile LONG *)&v20->m_uiRefCount) && *(float *)&p != 0.0 )
      (**(void (__stdcall ***)(_DWORD))p)(1);
    v21 = v83;
    v1->m_spScene.m_pObject = (NiNode *)v83;
    if ( v21 )
      InterlockedIncrement((volatile LONG *)v21 + 1);
  }
  NiObjectNET::SetName((NiObjectNET *)&v1->m_spScene.m_pObject->vfptr, CharResMgr::ms_pcCharRootNodeName);
  v1->m_spScene.m_pObject->m_uFlags |= 1u;
  v22 = (NiNode *)operator new(0xE8u);
  _Val.second = (int)v22;
  LOBYTE(v84) = 41;
  if ( v22 )
  {
    NiNode::NiNode(v22, 0);
    v83 = v23;
  }
  else
  {
    *(float *)&v83 = 0.0;
  }
  v24 = v1->m_spCtrlNode.m_pObject;
  LOBYTE(v84) = 39;
  p = v24;
  if ( (void (__stdcall **)(_DWORD))v24 != v83 )
  {
    if ( *(float *)&v24 != 0.0 && !InterlockedDecrement((volatile LONG *)&v24->m_uiRefCount) && *(float *)&p != 0.0 )
      (**(void (__stdcall ***)(_DWORD))p)(1);
    v25 = v83;
    v1->m_spCtrlNode.m_pObject = (NiNode *)v83;
    if ( v25 )
      InterlockedIncrement((volatile LONG *)v25 + 1);
  }
  ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spScene.m_pObject->vfptr[29].__vecDelDtor)(v1->m_spCtrlNode.m_pObject, 0);
  v26 = (NiNode *)operator new(0xE8u);
  _Val.second = (int)v26;
  LOBYTE(v84) = 42;
  if ( v26 )
  {
    NiNode::NiNode(v26, 0);
    v83 = v27;
  }
  else
  {
    *(float *)&v83 = 0.0;
  }
  v28 = v1->m_spCharNode.m_pObject;
  LOBYTE(v84) = 39;
  p = v28;
  if ( (void (__stdcall **)(_DWORD))v28 != v83 )
  {
    if ( *(float *)&v28 != 0.0 && !InterlockedDecrement((volatile LONG *)&v28->m_uiRefCount) && *(float *)&p != 0.0 )
      (**(void (__stdcall ***)(_DWORD))p)(1);
    v29 = v83;
    v1->m_spCharNode.m_pObject = (NiNode *)v83;
    if ( v29 )
      InterlockedIncrement((volatile LONG *)v29 + 1);
  }
  ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spCtrlNode.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spCharNode.m_pObject,
    0);
  v1->m_spCharNode.m_pObject->m_uFlags &= 0xFFFEu;
  v30 = (NiNode *)operator new(0xE8u);
  _Val.second = (int)v30;
  LOBYTE(v84) = 43;
  if ( v30 )
  {
    NiNode::NiNode(v30, 0);
    v83 = v31;
  }
  else
  {
    *(float *)&v83 = 0.0;
  }
  v32 = v1->m_spHouseNode.m_pObject;
  LOBYTE(v84) = 39;
  p = v32;
  if ( (void (__stdcall **)(_DWORD))v32 != v83 )
  {
    if ( *(float *)&v32 != 0.0 && !InterlockedDecrement((volatile LONG *)&v32->m_uiRefCount) && *(float *)&p != 0.0 )
      (**(void (__stdcall ***)(_DWORD))p)(1);
    v33 = v83;
    v1->m_spHouseNode.m_pObject = (NiNode *)v83;
    if ( v33 )
      InterlockedIncrement((volatile LONG *)v33 + 1);
  }
  NiMatrix3::MakeRotation(&v1->m_spHouseNode.m_pObject->m_kLocal.m_Rotate, NI_PI, 0.0, 0.0, 1.0);
  ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spCtrlNode.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spHouseNode.m_pObject,
    0);
  v1->m_spHouseNode.m_pObject->m_uFlags |= 1u;
  v34 = (NiNode *)operator new(0xE8u);
  _Val.second = (int)v34;
  LOBYTE(v84) = 44;
  if ( v34 )
  {
    NiNode::NiNode(v34, 0);
    v83 = v35;
  }
  else
  {
    *(float *)&v83 = 0.0;
  }
  v36 = v1->m_spCarrierNode.m_pObject;
  LOBYTE(v84) = 39;
  p = v36;
  if ( (void (__stdcall **)(_DWORD))v36 != v83 )
  {
    if ( *(float *)&v36 != 0.0 && !InterlockedDecrement((volatile LONG *)&v36->m_uiRefCount) && *(float *)&p != 0.0 )
      (**(void (__stdcall ***)(_DWORD))p)(1);
    v37 = v83;
    v1->m_spCarrierNode.m_pObject = (NiNode *)v83;
    if ( v37 )
      InterlockedIncrement((volatile LONG *)v37 + 1);
  }
  ((void (__stdcall *)(_DWORD, _DWORD))v1->m_spCtrlNode.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spCarrierNode.m_pObject,
    0);
  v1->m_spCharNode.m_pObject->m_uFlags &= 0xFFFEu;
  v1->m_uiHitDamage = 0;
  v38 = (void ***)v1->m_lstfHitTime._Myhead;
  v39 = *v38;
  *v38 = (void **)v38;
  v1->m_lstfHitTime._Myhead->_Prev = v1->m_lstfHitTime._Myhead;
  v1->m_lstfHitTime._Mysize = 0;
  if ( v39 != (void **)v1->m_lstfHitTime._Myhead )
  {
    do
    {
      p = *v39;
      operator delete(v39);
      v39 = (void **)p;
    }
    while ( p != v1->m_lstfHitTime._Myhead );
  }
  v1->m_kActionMgr.m_pkActInfoSet = 0;
  v1->m_kActionMgr.m_fActionStartTime = 0.0;
  v1->m_kActionMgr.m_pkChar = 0;
  v1->m_kActionMgr.m_fActionLastUpdateTime = 0.0;
  v1->m_kActionMgr.m_pActor = 0;
  v1->m_kActionMgr.m_pkCurPlaySkillViewInfo = 0;
  v1->m_kActionMgr.m_uiCurEventCode = 0;
  v1->m_kActionMgr.m_pkLastAttackActInfo = 0;
  v1->m_kActionMgr.m_iOldLoopCnt = 0;
  v1->m_kActionMgr.m_bUseActorSequence = 0;
  v1->m_kActionMgr.m_pkCurPlayActInfo = 0;
  *(_WORD *)&v1->m_kActionMgr.m_abActionEff[0] = 0;
  v1->m_kActionMgr.m_abActionEff[2] = 0;
  *(_WORD *)&v1->m_kActionMgr.m_abActionSnd[0] = 0;
  v1->m_kActionMgr.m_fEffectStartTime = 0.0;
  v1->m_kRidePetAction.m_fActionStartTime = 0.0;
  v1->m_kRidePetAction.m_pkActInfoSet = 0;
  v1->m_kRidePetAction.m_fActionLastUpdateTime = 0.0;
  v1->m_kRidePetAction.m_pkChar = 0;
  v1->m_kRidePetAction.m_pActor = 0;
  v1->m_kRidePetAction.m_pkCurPlaySkillViewInfo = 0;
  v1->m_kRidePetAction.m_uiCurEventCode = 0;
  v1->m_kRidePetAction.m_pkLastAttackActInfo = 0;
  v1->m_kRidePetAction.m_iOldLoopCnt = 0;
  v1->m_kRidePetAction.m_bUseActorSequence = 0;
  v1->m_kRidePetAction.m_pkCurPlayActInfo = 0;
  *(_WORD *)&v1->m_kRidePetAction.m_abActionEff[0] = 0;
  v1->m_kRidePetAction.m_abActionEff[2] = 0;
  *(_WORD *)&v1->m_kRidePetAction.m_abActionSnd[0] = 0;
  v1->m_kRidePetAction.m_fEffectStartTime = 0.0;
  v1->m_AttackTargetHandle = -1;
  Char::ResetSkillAction(v1);
  Char::ResetAction(v1);
  v1->m_fLodLength[0] = MachineOpt::ms_kGraphicOption.farrLODLength[0];
  v40 = MachineOpt::ms_kGraphicOption.farrLODLength[1];
  v1->m_bConnectServer = 0;
  v1->m_fLodLength[1] = v40;
  v1->m_bIsChangeCampMode = 0;
  *(_WORD *)&v1->m_kCharAbState.m_bMovable = 1;
  v1->m_fMaxViewLength = 1000.0;
  v1->m_bWillDead = 0;
  v1->m_fMaxLiveLength = 4000.0;
  v1->m_kCharAbState.m_fMoveSpeed = 1.0;
  v1->m_fAnimationUpdateTime = -3.4028235e38;
  v1->m_fLastUpdateTime = -3.4028235e38;
  v1->m_fAnimationSpeed = 1.0;
  Char::CancelEmotion(v1);
  JumpProcessor::clear(&v1->m_kJumpProcessor);
  v1->m_bUseCharTitle = 0;
  memset(v1->m_CharTitleName, 0, 0x100u);
  *(_WORD *)&v1->m_bGroundSkillTargetPointSetted = 0;
  v41 = (NiAmbientLight *)operator new(0x10Cu);
  _Val.second = (int)v41;
  LOBYTE(v84) = 45;
  if ( v41 )
  {
    NiAmbientLight::NiAmbientLight(v41);
    v83 = v42;
  }
  else
  {
    *(float *)&v83 = 0.0;
  }
  v43 = v1->m_kAbStateVisual.spIceLight.m_pObject;
  LOBYTE(v84) = 39;
  p = v43;
  if ( (void (__stdcall **)(_DWORD))v43 != v83 )
  {
    if ( *(float *)&v43 != 0.0 && !InterlockedDecrement((volatile LONG *)&v43->m_uiRefCount) && *(float *)&p != 0.0 )
      (**(void (__stdcall ***)(_DWORD))p)(1);
    v44 = v83;
    v1->m_kAbStateVisual.spIceLight.m_pObject = (NiLight *)v83;
    if ( v44 )
      InterlockedIncrement((volatile LONG *)v44 + 1);
  }
  v45 = v1->m_kAbStateVisual.spIceLight.m_pObject;
  v45->m_fDimmer = 100.0;
  ++v45->m_uiRevID;
  v46 = v1->m_kAbStateVisual.spIceLight.m_pObject;
  v80 = 0.0;
  ++v46->m_uiRevID;
  *(float *)&_Val.first = 0.0;
  v46->m_kAmb.r = v80;
  *(float *)&_Val.second = 1.0;
  *(std::pair<int const ,int> *)&v46->m_kAmb.g = _Val;
  v80 = 0.0;
  *(float *)&_Val.first = 0.0;
  v47 = v1->m_kAbStateVisual.spIceLight.m_pObject;
  *(float *)&_Val.second = 1.0;
  ++v47->m_uiRevID;
  v80 = 0.0;
  v47->m_kDiff.r = 0.0;
  v48 = _Val.first;
  *(float *)&_Val.first = 0.0;
  LODWORD(v47->m_kDiff.g) = v48;
  LODWORD(v47->m_kDiff.b) = _Val.second;
  *(float *)&_Val.second = 1.0;
  v49 = v1->m_kAbStateVisual.spIceLight.m_pObject;
  v50 = v80;
  ++v49->m_uiRevID;
  v49->m_kSpec.r = v50;
  *(std::pair<int const ,int> *)&v49->m_kSpec.g = _Val;
  v1->m_kAbStateVisual.spIceLight.m_pObject->m_bOn = 1;
  v51 = (NiAmbientLight *)operator new(0x10Cu);
  _Val.second = (int)v51;
  LOBYTE(v84) = 46;
  if ( v51 )
  {
    NiAmbientLight::NiAmbientLight(v51);
    v83 = v52;
  }
  else
  {
    *(float *)&v83 = 0.0;
  }
  v53 = v1->m_kAbStateVisual.spPoisonLight.m_pObject;
  LOBYTE(v84) = 39;
  p = v53;
  if ( (void (__stdcall **)(_DWORD))v53 != v83 )
  {
    if ( *(float *)&v53 != 0.0 && !InterlockedDecrement((volatile LONG *)&v53->m_uiRefCount) && *(float *)&p != 0.0 )
      (**(void (__stdcall ***)(_DWORD))p)(1);
    v54 = v83;
    v1->m_kAbStateVisual.spPoisonLight.m_pObject = (NiLight *)v83;
    if ( v54 )
      InterlockedIncrement((volatile LONG *)v54 + 1);
  }
  v55 = v1->m_kAbStateVisual.spPoisonLight.m_pObject;
  v55->m_fDimmer = 1.0;
  ++v55->m_uiRevID;
  v56 = v1->m_kAbStateVisual.spPoisonLight.m_pObject;
  v80 = 0.2;
  ++v56->m_uiRevID;
  *(float *)&_Val.second = 0.2;
  v56->m_kAmb.r = v80;
  *(float *)&_Val.first = 1.0;
  v56->m_kAmb.g = 1.0;
  v80 = 0.2;
  v57 = _Val.second;
  *(float *)&_Val.second = 0.2;
  LODWORD(v56->m_kAmb.b) = v57;
  v58 = v1->m_kAbStateVisual.spPoisonLight.m_pObject;
  *(float *)&_Val.first = 1.0;
  ++v58->m_uiRevID;
  v59 = v80;
  v80 = 0.2;
  v58->m_kDiff.r = v59;
  LODWORD(v58->m_kDiff.g) = _Val.first;
  v60 = _Val.second;
  *(float *)&_Val.second = 0.2;
  LODWORD(v58->m_kDiff.b) = v60;
  v61 = v1->m_kAbStateVisual.spPoisonLight.m_pObject;
  *(float *)&_Val.first = 1.0;
  ++v61->m_uiRevID;
  v61->m_kSpec.r = v80;
  *(std::pair<int const ,int> *)&v61->m_kSpec.g = _Val;
  v1->m_kAbStateVisual.spPoisonLight.m_pObject->m_bOn = 1;
  v1->m_kAttackEquipBackup.kCase1.kPrevRightHandEquipItemID = -1;
  v1->m_kEquippedBackup.kCase1.kPrevRightHandEquipItemID = -1;
  v1->m_kEquippedBackup.kCase1.kPrevLeftHandEquipItemID = -1;
  v1->m_kEquippedBackup.iBackupCase = 0;
  *(_DWORD *)&v1->m_kEquippedBackup.kCase1.kPrevRightHandAccItemID = -1;
  v1->m_kEquippedBackup.bUnEquipLeftHandAcc = 0;
  *(_DWORD *)&v1->m_kEquippedBackup.kCase1.kPrevShieldAccItemID = 0xFFFF;
  v1->m_kAttackEquipBackup.kCase1.kPrevLeftHandEquipItemID = -1;
  v1->m_kAttackEquipBackup.iBackupCase = 0;
  *(_DWORD *)&v1->m_kAttackEquipBackup.kCase1.kPrevRightHandAccItemID = -1;
  *(_WORD *)&v1->m_kEquippedBackup.bUnEquipRightHandAcc = 0;
  v1->m_kAttackEquipBackup.bUnEquipLeftHandAcc = 0;
  *(_DWORD *)&v1->m_kAttackEquipBackup.kCase1.kPrevShieldAccItemID = 0xFFFF;
  v1->m_kAttackEquipBackup.bUnEquipShieldAcc = 0;
  v1->m_kTargetResourceHandle = -1;
  v1->m_fPrevLastTime = 3.4028235e38;
  v1->m_bWasHitTime = 0;
  v1->m_fChairHeight = 0.0;
  v1->m_bIsSell = 1;
  v1->m_fActionTimer = 0.0;
  v1->m_bIsDoor = 0;
  v1->m_byType = 0;
  v1->m_dwGuildRegNum = 0;
  v1->m_byMiniHouseSkinID = 0;
  v1->m_bCulled = 1;
  v1->m_dwHpUpdateSkipCount = 0;
  v1->m_dwTOTHpUpdateSkipCount = 0;
  v1->m_bUserCharacter = 1;
  v1->m_byCharNPCActionState = 3;
  *(_WORD *)&v1->m_byEventActionFlag = 0;
  v1->m_pkDownSeq = 0;
  v1->m_pkUpSeq = 0;
  v1->m_pkRightSeq = 0;
  v1->m_pkLeftSeq = 0;
  v1->m_bEnabledHeadMovement = 0;
  v1->m_fTargetPitchWeight = 0.5;
  v1->m_fTargetYawWeight = 0.5;
  v1->m_bVisibleWeapon = 1;
  v1->m_BeforeMetamorphosisClass = 0;
  v1->m_fSaveCharSpeed = 0.0;
  *(float *)&p = COERCE_FLOAT(CreateMetamorphosisDirection((NiPointer<DirectionControllers> *)&_Val.second, v1));
  v62 = v1->m_spDirectionCtrls.m_pObject;
  LOBYTE(v84) = 47;
  v83 = (void (__stdcall **)(_DWORD))v62;
  if ( v62 != *(DirectionControllers **)p )
  {
    if ( v62 && !InterlockedDecrement((volatile LONG *)&v62->m_uiRefCount) && *(float *)&v83 != 0.0 )
      (*(void (__stdcall **)(signed int))*v83)(1);
    v63 = *(DirectionControllers **)p;
    v1->m_spDirectionCtrls.m_pObject = *(DirectionControllers **)p;
    if ( v63 )
      InterlockedIncrement((volatile LONG *)&v63->m_uiRefCount);
  }
  LOBYTE(v84) = 39;
  if ( _Val.second )
  {
    p = (void *)_Val.second;
    if ( !InterlockedDecrement((volatile LONG *)(_Val.second + 4)) && *(float *)&p != 0.0 )
      (**(void (__stdcall ***)(_DWORD))p)(1);
  }
  v1->m_fSkillActstep_Swing_Time = 0.0;
  v1->m_GuildAcademyMemberFlag = -1;
  v1->m_pMobinfo = 0;
  v1->m_pMobViewInfo = 0;
  ((void (*)(void))v1->m_kDamageOscillation.vfptr->Clear)();
  p = v1->m_mapShakeInfo._Myhead->_Parent;
  v83 = (void (__stdcall **)(_DWORD))p;
  if ( !*((_BYTE *)p + 21) )
  {
    do
    {
      std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Erase(
        (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapShakeInfo,
        (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v83[2]);
      v83 = *(void (__stdcall ***)(_DWORD))v83;
      operator delete(p);
      p = v83;
    }
    while ( !*((_BYTE *)v83 + 21) );
  }
  v1->m_mapShakeInfo._Myhead->_Parent = v1->m_mapShakeInfo._Myhead;
  v1->m_mapShakeInfo._Myhead->_Left = v1->m_mapShakeInfo._Myhead;
  v1->m_mapShakeInfo._Myhead->_Right = v1->m_mapShakeInfo._Myhead;
  v1->m_mapShakeInfo._Mysize = 0;
  p = v1->m_mapDamShake._Myhead->_Parent;
  v83 = (void (__stdcall **)(_DWORD))p;
  if ( !*((_BYTE *)p + 21) )
  {
    do
    {
      std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Erase(
        (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapDamShake,
        (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v83[2]);
      v83 = *(void (__stdcall ***)(_DWORD))v83;
      operator delete(p);
      p = v83;
    }
    while ( !*((_BYTE *)v83 + 21) );
  }
  v1->m_mapDamShake._Myhead->_Parent = v1->m_mapDamShake._Myhead;
  v1->m_mapDamShake._Myhead->_Left = v1->m_mapDamShake._Myhead;
  v1->m_mapDamShake._Myhead->_Right = v1->m_mapDamShake._Myhead;
  v1->m_mapDamShake._Mysize = 0;
  p = v1->m_mapMyCamShake._Myhead->_Parent;
  v83 = (void (__stdcall **)(_DWORD))p;
  if ( !*((_BYTE *)p + 21) )
  {
    do
    {
      std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Erase(
        (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapMyCamShake,
        (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v83[2]);
      v83 = *(void (__stdcall ***)(_DWORD))v83;
      operator delete(p);
      p = v83;
    }
    while ( !*((_BYTE *)v83 + 21) );
  }
  v1->m_mapMyCamShake._Myhead->_Parent = v1->m_mapMyCamShake._Myhead;
  v1->m_mapMyCamShake._Myhead->_Left = v1->m_mapMyCamShake._Myhead;
  v1->m_mapMyCamShake._Myhead->_Right = v1->m_mapMyCamShake._Myhead;
  v1->m_mapMyCamShake._Mysize = 0;
  p = v1->m_mapForceMyCamShake._Myhead->_Parent;
  v83 = (void (__stdcall **)(_DWORD))p;
  if ( !*((_BYTE *)p + 21) )
  {
    do
    {
      std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Erase(
        (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapForceMyCamShake,
        (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v83[2]);
      v83 = *(void (__stdcall ***)(_DWORD))v83;
      operator delete(p);
      p = v83;
    }
    while ( !*((_BYTE *)v83 + 21) );
  }
  v1->m_mapForceMyCamShake._Myhead->_Parent = v1->m_mapForceMyCamShake._Myhead;
  v1->m_mapForceMyCamShake._Myhead->_Left = v1->m_mapForceMyCamShake._Myhead;
  v1->m_mapForceMyCamShake._Myhead->_Right = v1->m_mapForceMyCamShake._Myhead;
  v1->m_mapForceMyCamShake._Mysize = 0;
  p = v1->m_mapEnemyCamShake._Myhead->_Parent;
  v83 = (void (__stdcall **)(_DWORD))p;
  if ( !*((_BYTE *)p + 21) )
  {
    do
    {
      std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Erase(
        (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapEnemyCamShake,
        (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v83[2]);
      v83 = *(void (__stdcall ***)(_DWORD))v83;
      operator delete(p);
      p = v83;
    }
    while ( !*((_BYTE *)v83 + 21) );
  }
  v1->m_mapEnemyCamShake._Myhead->_Parent = v1->m_mapEnemyCamShake._Myhead;
  v1->m_mapEnemyCamShake._Myhead->_Left = v1->m_mapEnemyCamShake._Myhead;
  v1->m_mapEnemyCamShake._Myhead->_Right = v1->m_mapEnemyCamShake._Myhead;
  v1->m_mapEnemyCamShake._Mysize = 0;
  p = v1->m_mapForceEnemeyCamShake._Myhead->_Parent;
  v83 = (void (__stdcall **)(_DWORD))p;
  if ( !*((_BYTE *)p + 21) )
  {
    do
    {
      std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Erase(
        (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapForceEnemeyCamShake,
        (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v83[2]);
      v83 = *(void (__stdcall ***)(_DWORD))v83;
      operator delete(p);
      p = v83;
    }
    while ( !*((_BYTE *)v83 + 21) );
  }
  v1->m_mapForceEnemeyCamShake._Myhead->_Parent = v1->m_mapForceEnemeyCamShake._Myhead;
  v1->m_mapForceEnemeyCamShake._Myhead->_Left = v1->m_mapForceEnemeyCamShake._Myhead;
  v1->m_mapForceEnemeyCamShake._Myhead->_Right = v1->m_mapForceEnemeyCamShake._Myhead;
  v1->m_mapForceEnemeyCamShake._Mysize = 0;
  p = v1->m_mapPartyCamShake._Myhead->_Parent;
  v83 = (void (__stdcall **)(_DWORD))p;
  if ( !*((_BYTE *)p + 21) )
  {
    do
    {
      std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Erase(
        (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapPartyCamShake,
        (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v83[2]);
      v83 = *(void (__stdcall ***)(_DWORD))v83;
      operator delete(p);
      p = v83;
    }
    while ( !*((_BYTE *)v83 + 21) );
  }
  v1->m_mapPartyCamShake._Myhead->_Parent = v1->m_mapPartyCamShake._Myhead;
  v1->m_mapPartyCamShake._Myhead->_Left = v1->m_mapPartyCamShake._Myhead;
  v1->m_mapPartyCamShake._Myhead->_Right = v1->m_mapPartyCamShake._Myhead;
  v1->m_mapPartyCamShake._Mysize = 0;
  p = v1->m_mapForcePartyCamShake._Myhead->_Parent;
  v83 = (void (__stdcall **)(_DWORD))p;
  if ( !*((_BYTE *)p + 21) )
  {
    do
    {
      std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Erase(
        (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapForcePartyCamShake,
        (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v83[2]);
      v83 = *(void (__stdcall ***)(_DWORD))v83;
      operator delete(p);
      p = v83;
    }
    while ( !*((_BYTE *)v83 + 21) );
  }
  v1->m_mapForcePartyCamShake._Myhead->_Parent = v1->m_mapForcePartyCamShake._Myhead;
  v1->m_mapForcePartyCamShake._Myhead->_Left = v1->m_mapForcePartyCamShake._Myhead;
  v1->m_mapForcePartyCamShake._Myhead->_Right = v1->m_mapForcePartyCamShake._Myhead;
  v1->m_mapForcePartyCamShake._Mysize = 0;
  p = v1->m_mapAllCamShake._Myhead->_Parent;
  v83 = (void (__stdcall **)(_DWORD))p;
  if ( !*((_BYTE *)p + 21) )
  {
    do
    {
      std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Erase(
        (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapAllCamShake,
        (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v83[2]);
      v83 = *(void (__stdcall ***)(_DWORD))v83;
      operator delete(p);
      p = v83;
    }
    while ( !*((_BYTE *)v83 + 21) );
  }
  v1->m_mapAllCamShake._Myhead->_Parent = v1->m_mapAllCamShake._Myhead;
  v1->m_mapAllCamShake._Myhead->_Left = v1->m_mapAllCamShake._Myhead;
  v1->m_mapAllCamShake._Myhead->_Right = v1->m_mapAllCamShake._Myhead;
  v1->m_mapAllCamShake._Mysize = 0;
  p = v1->m_mapForceAllCamShake._Myhead->_Parent;
  v83 = (void (__stdcall **)(_DWORD))p;
  if ( !*((_BYTE *)p + 21) )
  {
    do
    {
      std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Erase(
        (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapForceAllCamShake,
        (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v83[2]);
      v83 = *(void (__stdcall ***)(_DWORD))v83;
      operator delete(p);
      p = v83;
    }
    while ( !*((_BYTE *)v83 + 21) );
  }
  v1->m_mapForceAllCamShake._Myhead->_Parent = v1->m_mapForceAllCamShake._Myhead;
  v1->m_mapForceAllCamShake._Myhead->_Left = v1->m_mapForceAllCamShake._Myhead;
  v1->m_mapForceAllCamShake._Myhead->_Right = v1->m_mapForceAllCamShake._Myhead;
  v1->m_mapForceAllCamShake._Mysize = 0;
  _Val.first = 4;
  _Val.second = (int)&v1->m_mapMyCamShake;
  v64 = std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(
          (std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v1->m_mapShakeInfo,
          &_Val);
  std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v1->m_mapShakeInfo,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > >,bool> *)&_Val,
    v64,
    0);
  _Val.second = (int)&v1->m_mapForceMyCamShake;
  _Val.first = 0;
  v65 = std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(
          (std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v1->m_mapShakeInfo,
          &_Val);
  std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v1->m_mapShakeInfo,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > >,bool> *)&_Val,
    v65,
    0);
  _Val.first = 5;
  _Val.second = (int)&v1->m_mapEnemyCamShake;
  v66 = std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(
          (std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v1->m_mapShakeInfo,
          &_Val);
  std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v1->m_mapShakeInfo,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > >,bool> *)&_Val,
    v66,
    0);
  _Val.first = 1;
  _Val.second = (int)&v1->m_mapForceEnemeyCamShake;
  v67 = std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(
          (std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v1->m_mapShakeInfo,
          &_Val);
  std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v1->m_mapShakeInfo,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > >,bool> *)&_Val,
    v67,
    0);
  _Val.second = (int)&v1->m_mapPartyCamShake;
  _Val.first = 6;
  v68 = std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(
          (std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v1->m_mapShakeInfo,
          &_Val);
  std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v1->m_mapShakeInfo,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > >,bool> *)&_Val,
    v68,
    0);
  _Val.first = 2;
  _Val.second = (int)&v1->m_mapForcePartyCamShake;
  v69 = std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(
          (std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v1->m_mapShakeInfo,
          &_Val);
  std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v1->m_mapShakeInfo,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > >,bool> *)&_Val,
    v69,
    0);
  _Val.first = 7;
  _Val.second = (int)&v1->m_mapAllCamShake;
  v70 = std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(
          (std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v1->m_mapShakeInfo,
          &_Val);
  std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v1->m_mapShakeInfo,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > >,bool> *)&_Val,
    v70,
    0);
  _Val.second = (int)&v1->m_mapForceAllCamShake;
  _Val.first = 3;
  v71 = std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(
          (std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v1->m_mapShakeInfo,
          &_Val);
  std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v1->m_mapShakeInfo,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > >,bool> *)&_Val,
    v71,
    0);
  _Val.first = 8;
  _Val.second = (int)&v1->m_mapDamShake;
  v72 = std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(
          (std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v1->m_mapShakeInfo,
          &_Val);
  std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v1->m_mapShakeInfo,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > >,bool> *)&_Val,
    v72,
    0);
  v73 = (void **)&v1->m_lstTraceMove._Myhead->_Next;
  v74 = (std::_List_nod<NiPoint3,std::allocator<NiPoint3> >::_Node *)*v73;
  *v73 = v73;
  v1->m_lstTraceMove._Myhead->_Prev = v1->m_lstTraceMove._Myhead;
  v1->m_lstTraceMove._Mysize = 0;
  if ( v74 != v1->m_lstTraceMove._Myhead )
  {
    do
    {
      v75 = v74->_Next;
      operator delete(v74);
      v74 = v75;
    }
    while ( v75 != v1->m_lstTraceMove._Myhead );
  }
  v1->m_bWaitingAckWhenInvenFull = 0;
  v1->m_iCharLevel = -1;
  v1->m_bAniStop = 0;
  *(_WORD *)&v1->m_bAniStart = 0;
  *(_WORD *)&v1->m_bGtiSpeed = 0;
  v1->m_bClearChar = 0;
  v1->m_bShockWave = 0;
  v1->m_fCountTime = 0.0099999998;
  v1->m_fGroudStrikeKeepTime = 0.0;
  v1->m_fAcceleration = 190.0;
  v1->m_fSpeed = 140.0;
  NiPoint3::Unitize(&v1->m_MovePoint);
  v1->m_pkMover = 0;
  v1->m_kMoverHandle = -1;
  v1->m_uiMoverSlot = 0;
  v1->m_uiConditionAniLevel = 0;
  v1->m_iLP = 0;
  v1->m_iMaxLP = 0;
  v1->m_kSkillID = -1;
  v1->m_bSS_Hide = 0;
  *(_WORD *)&v1->m_byKQTeamType = 2;
  v1->m_bDownTime = 0;
  *(_WORD *)&v1->m_bBuffItemAutoUse = 0;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9B919C: using guessed type struct NiActorManager *(__thiscall *Char::`vftable'{for `AttackSequenceManager'})(Char *__hidden this);
// 9B91BC: using guessed type int (__stdcall *Char::`vftable'{for `IEffectHolder'})(int);
// 9B91C4: using guessed type void (__thiscall *Char::`vftable'{for `AbStateInfectee'}[2])(Char *this, AbStateInst *pkAbState, bool bNoVisual);
// A96A54: using guessed type float Char::ms_fDefaultWalkSpeed;
// A96A58: using guessed type float Char::ms_fDefaultRunSpeed;
// B622CC: using guessed type const float NI_PI;

//----- (0063F170) --------------------------------------------------------
void __thiscall Char::Update(Char *this, float fTime)
{
  Char *v2; // esi@1
  char v3; // al@6
  MobInfo *v4; // eax@8
  int v5; // edi@12
  NiPoint3 *v6; // eax@12
  float v7; // ST28_4@12
  unsigned int v8; // ecx@12
  NiNode *v9; // eax@13
  int v10; // ebx@14
  const char *v11; // ecx@24
  unsigned int v12; // edi@24
  signed int v13; // ecx@24
  const char *v14; // eax@26
  int v15; // eax@28
  bool v16; // zf@28
  signed int v17; // eax@30
  bool v18; // bl@33
  unsigned int v19; // ecx@33
  const char *v20; // eax@35
  int v21; // eax@37
  bool v22; // zf@37
  signed int v23; // eax@39
  NiNode *v24; // eax@43
  double v25; // st7@46
  NiNode *v26; // eax@49
  double v27; // st7@49
  ActiveSkillViewInfo *v28; // eax@49
  Mover *v29; // ecx@61
  NiPoint3 kShakeAxis; // [sp+2Ch] [bp-4Ch]@46
  NiPoint3 kShake; // [sp+38h] [bp-40h]@46
  float fLengthToMainChar; // [sp+44h] [bp-34h]@12
  float fDeltaTime; // [sp+48h] [bp-30h]@12
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kMobIndex; // [sp+4Ch] [bp-2Ch]@24
  int v35; // [sp+74h] [bp-4h]@24

  v2 = this;
  if ( this->m_bAniStart && !JumpProcessor::IsJump(&this->m_kJumpProcessor) )
    *(_WORD *)&v2->m_bAniStop = 1;
  if ( v2->m_byType == 4
    || !v2->m_bUserCharacter && (v3 = v2->m_byMode, v3 != 4) && v3 != 5 && (v4 = v2->m_pMobinfo) != 0 && v4->IsNPC )
  {
    if ( !Char::IsLinkGate(v2) && !v2->m_bIsDoor )
    {
      v5 = ((int (__thiscall *)(Char *))v2->vfptr[6].Deaffect)(v2);
      v6 = World::GetCameraLookAtPos(&g_kWorld);
      v7 = v6->x - *(float *)v5;
      fLengthToMainChar = v6->y - *(float *)(v5 + 4);
      fDeltaTime = v6->z - *(float *)(v5 + 8);
      fDeltaTime = v7 * v7 + fLengthToMainChar * fLengthToMainChar + fDeltaTime * fDeltaTime;
      fDeltaTime = sqrt(fDeltaTime);
      v8 = g_pkMainChar[1].m_uiSkillActStep;
      fLengthToMainChar = fDeltaTime;
      fDeltaTime = (double)v8;
      if ( fLengthToMainChar > (double)fDeltaTime )
      {
        v9 = v2->m_spScene.m_pObject;
        v2->m_bCulledOld = v2->m_bCulled;
        v2->m_bCulled = 1;
        v9->m_uFlags |= 1u;
        v2->m_bIsUpdate = 1;
        return;
      }
    }
  }
  v10 = 0;
  if ( !v2->m_spScene.m_pObject )
  {
    AttackSequenceManager::ApplicateSkillSeqImmediately((AttackSequenceManager *)&v2->vfptr, v2, 1, 0);
    AttackSequenceManager::ApplicateAttackSeqImmediately((AttackSequenceManager *)&v2->vfptr, 1);
    return;
  }
  if ( !v2->m_bIsUpdate || v2->m_bCulled )
  {
    AttackSequenceManager::ApplicateSkillSeqImmediately((AttackSequenceManager *)&v2->vfptr, v2, 1, 0);
    AttackSequenceManager::ApplicateAttackSeqImmediately((AttackSequenceManager *)&v2->vfptr, 1);
  }
  if ( -3.4028235e38 == v2->m_fLastUpdateTime )
  {
    v2->m_fLastUpdateTime = fTime;
    v2->m_fAnimationUpdateTime = fTime;
  }
  else
  {
    fDeltaTime = fTime - v2->m_fLastUpdateTime;
    v2->m_fAnimationUpdateTime = v2->m_fAnimationSpeed * fDeltaTime + v2->m_fAnimationUpdateTime;
    v2->m_fLastUpdateTime = fTime;
  }
  if ( MachineOpt::ms_kGraphicOption.bViewOutLine && v2->m_bIsDoor )
  {
    v11 = v2->m_pMobinfo->InxName;
    kMobIndex._Myres = 15;
    kMobIndex._Mysize = 0;
    kMobIndex._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&kMobIndex, v11, strlen(v11));
    v12 = kMobIndex._Mysize;
    v35 = 0;
    v13 = kMobIndex._Mysize;
    if ( kMobIndex._Mysize >= 7 )
      v13 = 7;
    v14 = kMobIndex._Bx._Ptr;
    if ( kMobIndex._Myres < 0x10 )
      v14 = (const char *)&kMobIndex;
    v15 = std::char_traits<char>::compare(v14, "OX_gate", v13);
    v16 = v15 == 0;
    if ( !v15 )
    {
      if ( v12 >= 7 )
        v17 = v12 != 7;
      else
        v17 = -1;
      v16 = v17 == 0;
    }
    v18 = v16;
    v19 = v12;
    if ( v12 >= 0xC )
      v19 = 12;
    v20 = kMobIndex._Bx._Ptr;
    if ( kMobIndex._Myres < 0x10 )
      v20 = (const char *)&kMobIndex;
    v21 = std::char_traits<char>::compare(v20, "KQSpringDoor", v19);
    v22 = v21 == 0;
    if ( !v21 )
    {
      if ( v12 >= 0xC )
        v23 = v12 != 12;
      else
        v23 = -1;
      v22 = v23 == 0;
    }
    if ( v22 || v18 )
    {
      v24 = v2->m_spScene.m_pObject;
      v2->m_bCulledOld = v2->m_bCulled;
      v2->m_bCulled = 1;
      v24->m_uFlags |= 1u;
      v2->m_bIsUpdate = 1;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&kMobIndex);
      return;
    }
    v35 = -1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&kMobIndex);
  }
  Char::UpdateQuestMark(v2);
  Char::UpdateTrace(v2);
  ((void (__thiscall *)(Char *, _DWORD))v2->vfptr[18].Deaffect)(v2, LODWORD(fTime));
  ((void (__thiscall *)(Char *, _DWORD))v2->vfptr[18].Affect)(v2, LODWORD(fTime));
  ((void (__thiscall *)(Char *, _DWORD))v2->vfptr[18].SetAbStateProperty)(v2, LODWORD(fTime));
  if ( (unsigned __int8)((int (__thiscall *)(Char *, _DWORD))v2->vfptr[17].~AbStateInfectee)(v2, LODWORD(fTime)) )
  {
    Char::UpdateEyeBlinking(v2);
    AttackSequenceManager::Update((AttackSequenceManager *)&v2->vfptr, fTime);
    AbStateInfectee::Update((AbStateInfectee *)&v2->vfptr, fTime);
    Oscillation::Update((Oscillation *)&v2->m_kDamageOscillation.vfptr, fTime);
    kShake.x = pkWorldCamera->m_kWorld.m_Rotate.m_pEntry[0][0];
    v25 = pkWorldCamera->m_kWorld.m_Rotate.m_pEntry[1][0];
    kShakeAxis = kShake;
    kShake.y = v25;
    kShake.z = pkWorldCamera->m_kWorld.m_Rotate.m_pEntry[2][0];
    if ( v2->m_kDamageOscillation.m_eAxis == 1 )
      kShakeAxis.z = 1.0;
    else
      kShakeAxis.y = 0.0;
    NiPoint3::Unitize(&kShakeAxis);
    v26 = v2->m_spCtrlNode.m_pObject;
    fDeltaTime = v2->m_kDamageOscillation.m_fValue;
    v27 = fDeltaTime;
    kShake.x = kShakeAxis.x * fDeltaTime;
    v26->m_kLocal.m_Translate = kShake;
    kShake.y = v27 * kShakeAxis.y;
    kShake.z = v27 * kShakeAxis.z;
    ((void (__thiscall *)(_DWORD, _DWORD))v2->vfptr[13].IsVisible)(v2, v2->m_fAnimationUpdateTime);
    v28 = v2->m_kActionMgr.m_pkCurPlaySkillViewInfo;
    LOBYTE(v10) = 0;
    if ( v28 )
      LOBYTE(v10) = v28->HideHandItem != 0;
    if ( Char::IsActProducing(v2)
      || (_BYTE)v10
      || (unsigned __int8)((int (__thiscall *)(Char *))v2->vfptr[15].Deaffect)(v2) )
    {
      CharShape::ShowLinkNode(&v2->m_kCharShape, LINK_RIGHTHAND, 0);
      CharShape::ShowLinkNode(&v2->m_kCharShape, LINK_LEFTHAND, 0);
      ItemUpGrade::SetShow(&v2->m_kCharShape.m_kItemUpGrade, 0);
      v29 = v2->m_pkMover;
      if ( !v29 || Mover::IsSlotView(v29, v2->m_uiMoverSlot, 1) )
        goto LABEL_64;
    }
    else if ( (unsigned __int8)((int (__thiscall *)(Char *))v2->vfptr[20].Deaffect)(v2) )
    {
      CharShape::ShowLinkNode(&v2->m_kCharShape, LINK_CHEST, 0);
      ItemUpGrade::SetShow(&v2->m_kCharShape.m_kItemUpGrade, 0);
    }
    else
    {
      if ( !(unsigned __int8)((int (__thiscall *)(Char *))v2->vfptr[1].AddAbStateByAbstateIndex)(v2) )
      {
        if ( v2->m_kCharShape.m_bAutoPickItem || v2->m_kCharShape.m_bAutoUseItem )
        {
          CharShape::SetShowMiniMonAutoPickEff(&v2->m_kCharShape, v2->m_kCharShape.m_bAutoPickItem);
          CharShape::ShowMinimonAutoUseEff(&v2->m_kCharShape, v2->m_kCharShape.m_bAutoUseItem);
        }
        goto LABEL_64;
      }
      ItemUpGrade::SetShow(&v2->m_kCharShape.m_kItemUpGrade, 0);
    }
    CharShape::SetShowMiniMonAutoPickEff(&v2->m_kCharShape, 0);
    CharShape::ShowMinimonAutoUseEff(&v2->m_kCharShape, 0);
LABEL_64:
    Char::UpdateAction(v2, fTime);
    Char::CheckStateInNoMovement(v2, v10);
    if ( v2->m_bUserCharacter )
      ((void (__thiscall *)(Char *))v2->vfptr[19].Deaffect)(v2);
    Char::GaleOfRun(v2, fTime);
    if ( v2->m_bShockWave )
      Char::RisingChar(v2, fTime);
  }
}

//----- (0063F740) --------------------------------------------------------
void __thiscall Char::ViewCampMode(Char *this, PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *p)
{
  Char *v2; // esi@1
  NiNode *v3; // eax@2
  NiNode *v4; // edi@3
  CarToonShader *v5; // eax@6
  CarToonShader *v6; // eax@7
  bool v7; // al@8
  CSpactralGlow_Shader_Controller *v8; // ecx@8

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[1].IsVisible)() )
  {
    Char::CulledTent(v2, 0);
    v3 = v2->m_spHouseNode.m_pObject;
    if ( v3 )
    {
      NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v3->m_kChildren);
      v4 = CharResMgr::GetHouse(&g_kCharResMgr, v2->m_byMiniHouseSkinID);
      if ( v4 )
      {
        if ( !Char::ms_bEnableCarToon || (unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[16].Affect)(v2) )
        {
          v6 = CarToonShader::GetInstance();
          CarToonShader::SetExceptOutLineCartoonShader(v6, v4);
        }
        else
        {
          v5 = CarToonShader::GetInstance();
          CarToonShader::SetCartoonShader(v5, v4);
        }
        CSpactralGlow_Shader_Controller::SetTarget(&v2->m_kRestHouseShader, v4);
        v7 = AbStateInfectee::FindNomalAbstate((AbStateInfectee *)&v2->vfptr, STA_GTIHIDE);
        v8 = &v2->m_kRestHouseShader;
        if ( v7 )
        {
          CSpactralGlow_Shader_Controller::SetUseShaderName(v8, "FxSkinning_SpactralGlow", "FxNoSkinning_SpactralGlow");
          CSpactralGlow_Shader_Controller::SetEnable(&v2->m_kRestHouseShader, 1);
        }
        else
        {
          CSpactralGlow_Shader_Controller::SetEnable(v8, 0);
        }
        ((void (__stdcall *)(_DWORD, _DWORD))v2->m_spHouseNode.m_pObject->vfptr[29].__vecDelDtor)(v4, 0);
        NiAVObject::UpdateEffects((NiAVObject *)&v2->m_spHouseNode.m_pObject->vfptr);
        NiAVObject::UpdateProperties((NiAVObject *)&v2->m_spHouseNode.m_pObject->vfptr);
        LinkedEffect::SetNode(&v2->kLinkedEffect, v4, 0xFFFFu);
      }
    }
  }
}
// A73BA6: using guessed type bool Char::ms_bEnableCarToon;

//----- (0063F850) --------------------------------------------------------
char __thiscall Char::InitViewApply(Char *this, bool bEquip)
{
  Char *v2; // ebx@1
  NiActorManager *v3; // eax@1
  bool v4; // zf@1
  double v5; // st7@7
  float fWeight; // ST0C_4@11
  float v7; // ST0C_4@13
  float v8; // ST0C_4@15
  unsigned int v9; // edi@16
  ActionInfoSet *v10; // ecx@16
  ActionInfo *v11; // eax@17
  ActionInfoSet *v12; // ecx@19
  ActionInfo *v13; // eax@20
  ActionInfoSet *v14; // ecx@22
  ActionInfo *v15; // eax@23
  ActionInfoSet *v16; // ecx@25
  ActionInfo *v17; // eax@26
  ActionInfoSet *v18; // ecx@28
  ActionInfo *v19; // eax@29
  NiAVObject *v20; // esi@31
  unsigned __int16 v21; // ST14_2@31
  NiAVObject **v22; // edx@32
  signed int v23; // eax@32
  int v24; // ecx@32
  bool v25; // cf@33
  NiAVObject *v26; // eax@35
  int v27; // eax@37
  unsigned int v28; // esi@42
  NiMatrix3 *v29; // eax@42
  NiNode *v30; // esi@42
  CharShape *v31; // edi@42
  NiActorManager *v32; // eax@42
  NiNode *v33; // ecx@44
  NiRTTI *v34; // eax@45
  NiBoneLODController *v35; // eax@50
  signed int v36; // eax@51
  MobInfo *v37; // eax@54
  MobType v38; // eax@55
  MobInfo *v39; // eax@62
  NiNode *v40; // ST14_4@67
  CarToonShader *v41; // eax@67
  NiNode *v42; // ST14_4@68
  CarToonShader *v43; // eax@68
  char v44; // al@71
  MobInfo *v45; // eax@73
  Mover *v46; // eax@80
  int v47; // eax@83
  MobViewInfo *v48; // ebx@85
  CSpactralGlow_Shader_Controller *v49; // eax@87
  NiColor kColor; // [sp+20h] [bp-D4h]@32
  unsigned int uiJump_DownHill; // [sp+2Ch] [bp-C8h]@16
  unsigned int uiJumpRun_JumpStart; // [sp+30h] [bp-C4h]@16
  unsigned int uiJumpStand_JumpStart; // [sp+34h] [bp-C0h]@16
  unsigned int uiJumpStand_Land; // [sp+38h] [bp-BCh]@16
  NiMatrix3 result; // [sp+3Ch] [bp-B8h]@42
  NiMatrix3 v57; // [sp+60h] [bp-94h]@42
  NiMatrix3 mat; // [sp+84h] [bp-70h]@42
  NsFindObjectByName kFindObject; // [sp+A8h] [bp-4Ch]@32
  int v60; // [sp+F0h] [bp-4h]@32

  v2 = this;
  this->m_pkLeftSeq = (NiControllerSequence *)Char::GetSequence(this, 0x3190Cu);
  v2->m_pkRightSeq = (NiControllerSequence *)Char::GetSequence(v2, 0x31902u);
  v2->m_pkUpSeq = (NiControllerSequence *)Char::GetSequence(v2, 0x31916u);
  v3 = Char::GetSequence(v2, 0x31920u);
  v4 = v2->m_pkLeftSeq == 0;
  v2->m_pkDownSeq = (NiControllerSequence *)v3;
  v2->m_bEnabledHeadMovement = !v4 && v2->m_pkRightSeq && v2->m_pkUpSeq && v3;
  v4 = v2->m_bEnabledHeadMovement == 0;
  v5 = 0.5;
  v2->m_fTargetYawWeight = 0.5;
  v2->m_fTargetPitchWeight = 0.5;
  if ( !v4 )
  {
    if ( NiActorManager::INVALID_SEQUENCE_ID != 203020 )
    {
      NiActorManager::ActivateSequence(
        v2->m_spActor.m_pObject,
        0x3190Cu,
        3,
        0,
        0.5,
        0.0,
        NiKFMTool::SYNC_SEQUENCE_ID_NONE);
      v5 = 0.5;
    }
    if ( NiActorManager::INVALID_SEQUENCE_ID != 203010 )
    {
      fWeight = v5;
      NiActorManager::ActivateSequence(
        v2->m_spActor.m_pObject,
        0x31902u,
        3,
        0,
        fWeight,
        0.0,
        NiKFMTool::SYNC_SEQUENCE_ID_NONE);
      v5 = 0.5;
    }
    if ( NiActorManager::INVALID_SEQUENCE_ID != 203030 )
    {
      v7 = v5;
      NiActorManager::ActivateSequence(
        v2->m_spActor.m_pObject,
        0x31916u,
        3,
        0,
        v7,
        0.0,
        NiKFMTool::SYNC_SEQUENCE_ID_NONE);
      v5 = 0.5;
    }
    if ( NiActorManager::INVALID_SEQUENCE_ID != 203040 )
    {
      v8 = v5;
      NiActorManager::ActivateSequence(
        v2->m_spActor.m_pObject,
        0x31920u,
        3,
        0,
        v8,
        0.0,
        NiKFMTool::SYNC_SEQUENCE_ID_NONE);
    }
  }
  JumpProcessor::clear(&v2->m_kJumpProcessor);
  v9 = 0;
  v2->m_kJumpProcessor.m_pActor = v2->m_spActor.m_pObject;
  v2->m_kJumpProcessor.m_pChar = v2;
  v10 = v2->m_kActionMgr.m_pkActInfoSet;
  uiJumpStand_JumpStart = 0;
  uiJumpRun_JumpStart = 0;
  uiJump_DownHill = 0;
  uiJumpStand_Land = 0;
  if ( v10 )
  {
    v11 = ActionInfoSet::GetByInxName(v10, "JumpStand_JumpStart");
    if ( v11 )
      uiJumpStand_JumpStart = v11->uiEventCode;
  }
  v12 = v2->m_kActionMgr.m_pkActInfoSet;
  if ( v12 )
  {
    v13 = ActionInfoSet::GetByInxName(v12, "JumpRun_JumpStart");
    if ( v13 )
      uiJumpRun_JumpStart = v13->uiEventCode;
  }
  v14 = v2->m_kActionMgr.m_pkActInfoSet;
  if ( v14 )
  {
    v15 = ActionInfoSet::GetByInxName(v14, "Jump_DownHill");
    if ( v15 )
      uiJump_DownHill = v15->uiEventCode;
  }
  v16 = v2->m_kActionMgr.m_pkActInfoSet;
  if ( v16 )
  {
    v17 = ActionInfoSet::GetByInxName(v16, "JumpStand_Land");
    if ( v17 )
      uiJumpStand_Land = v17->uiEventCode;
  }
  v18 = v2->m_kActionMgr.m_pkActInfoSet;
  if ( v18 )
  {
    v19 = ActionInfoSet::GetByInxName(v18, "JumpRun_Land");
    if ( v19 )
      v9 = v19->uiEventCode;
  }
  JumpProcessor::SetJumpAni(
    &v2->m_kJumpProcessor,
    uiJumpStand_JumpStart,
    uiJumpRun_JumpStart,
    uiJump_DownHill,
    uiJumpStand_Land,
    v9);
  v20 = v2->m_spActor.m_pObject->m_spNIFRoot.m_pObject;
  v21 = v2->m_kHandle;
  uiJumpStand_Land = (unsigned int)v20;
  if ( LinkedEffect::SetNode(&v2->kLinkedEffect, (NiNode *)v20, v21) )
  {
    kColor.r = 0.0;
    kColor.g = 0.0;
    kColor.b = 1.0;
    NiOptimizeABV::CreateWireABV(v20, &kColor, 1.0, "WireABVTemp", 0);
    kFindObject.m_pCallBack = 0;
    kFindObject.m_nCurLevel = -1;
    kFindObject.vfptr = (Ns_TourSceneVtbl *)&NsFindObjectByName::`vftable';
    kFindObject.m_szName._Myres = 15;
    kFindObject.m_szName._Mysize = 0;
    kFindObject.m_szName._Bx._Buf[0] = 0;
    kFindObject.m_vecObject._Myfirst = 0;
    kFindObject.m_vecObject._Mylast = 0;
    kFindObject.m_vecObject._Myend = 0;
    v60 = 0;
    NsFindObjectByName::FindObject(&kFindObject, (NiNode *)v20, "WireABVTemp");
    v22 = kFindObject.m_vecObject._Myfirst;
    v23 = kFindObject.m_vecObject._Mylast - kFindObject.m_vecObject._Myfirst;
    v24 = 0;
    if ( v23 > 0 )
    {
      v25 = (unsigned int)v23 > 0;
      do
      {
        if ( v25 )
        {
          v26 = v22[v24];
          if ( v26 )
          {
            v26->m_uFlags |= 1u;
            v22 = kFindObject.m_vecObject._Myfirst;
          }
        }
        ++v24;
        v27 = kFindObject.m_vecObject._Mylast - v22;
        v25 = v24 < (unsigned int)v27;
      }
      while ( v24 < v27 );
    }
    v60 = -1;
    if ( v22 )
      operator delete(v22);
    kFindObject.m_vecObject._Myfirst = 0;
    kFindObject.m_vecObject._Mylast = 0;
    kFindObject.m_vecObject._Myend = 0;
    if ( kFindObject.m_szName._Myres >= 0x10 )
      operator delete(kFindObject.m_szName._Bx._Ptr);
  }
  v28 = uiJumpStand_Land;
  NiAVObject::Update((NiAVObject *)uiJumpStand_Land, 0.0, 1);
  mat.m_pEntry[0][0] = -1.0;
  mat.m_pEntry[1][0] = 0.0;
  mat.m_pEntry[2][0] = 0.0;
  mat.m_pEntry[0][1] = 0.0;
  mat.m_pEntry[2][1] = 0.0;
  mat.m_pEntry[0][2] = 0.0;
  qmemcpy(&v57, (const void *)(v28 + 52), sizeof(v57));
  mat.m_pEntry[1][2] = 0.0;
  mat.m_pEntry[1][1] = -1.0;
  mat.m_pEntry[2][2] = 1.0;
  v29 = NiMatrix3::operator*(&v57, &result, &mat);
  qmemcpy(&v57, v29, sizeof(v57));
  qmemcpy((void *)(uiJumpStand_Land + 52), v29, 0x24u);
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v2->m_spCharNode.m_pObject->m_kChildren);
  v30 = (NiNode *)uiJumpStand_Land;
  ((void (__stdcall *)(unsigned int, _DWORD))v2->m_spCharNode.m_pObject->vfptr[29].__vecDelDtor)(uiJumpStand_Land, 0);
  v31 = &v2->m_kCharShape;
  CharShape::SetModelPart(&v2->m_kCharShape, v30);
  v4 = v2->m_kCharShape.m_kClassID == 0;
  v32 = v2->m_spActor.m_pObject;
  v2->m_kCharShape.m_pkBoneLodController = v32->m_spBoneLOD.m_pObject;
  v2->m_kCharShape.m_pActor = v32;
  v2->m_kActionMgr.m_pActor = v32;
  if ( !v4 )
  {
    CharShape::UpdateFaceShape(&v2->m_kCharShape);
    CharShape::MakeHairSet(&v2->m_kCharShape, v2->m_kCharShape.m_byHairType);
    CharShape::SetHairDetailMap(&v2->m_kCharShape, v2->m_kCharShape.m_byHairColor);
  }
  v33 = v2->m_spScene.m_pObject;
  if ( v33 )
  {
    v34 = (NiRTTI *)((int (*)(void))v33->vfptr[1].__vecDelDtor)();
    if ( v34 )
    {
      while ( v34 != &NsFadeNode::m_RTTI )
      {
        v34 = v34->m_pkBaseRTTI;
        if ( !v34 )
          goto LABEL_50;
      }
      LOBYTE(v2->m_spScene.m_pObject[1].vfptr) = 0;
    }
  }
LABEL_50:
  NiAVObject::Update((NiAVObject *)&v2->m_spScene.m_pObject->vfptr, 0.0, 1);
  v35 = v2->m_spActor.m_pObject->m_spBoneLOD.m_pObject;
  if ( v35 )
    v36 = v35->m_iLOD;
  else
    v36 = -1;
  v2->m_nCurrLODLevel = v36;
  if ( !(unsigned __int8)((int (__thiscall *)(Char *))v2->vfptr[1].Affect)(v2) )
    goto LABEL_91;
  v37 = v2->m_pMobinfo;
  if ( !v37 )
    goto LABEL_91;
  v38 = v37->Type;
  if ( v38 != 8 )
  {
    if ( v38 == 10 )
      goto LABEL_69;
    if ( v38 != 9 && v38 != 22 && v38 != 21 )
      goto LABEL_91;
  }
  if ( v38 != 10 && v38 != 9 )
  {
LABEL_91:
    v39 = v2->m_pMobinfo;
    if ( !v39 || strcmp(v39->InxName, "KQ_Gate5") )
    {
      if ( !Char::ms_bEnableCarToon
        || (unsigned __int8)((int (__thiscall *)(Char *))v2->vfptr[16].Affect)(v2)
        || Char::IsResource(v2) )
      {
        v42 = v2->m_spScene.m_pObject;
        v43 = CarToonShader::GetInstance();
        CarToonShader::SetExceptOutLineCartoonShader(v43, v42);
      }
      else
      {
        v40 = v2->m_spScene.m_pObject;
        v41 = CarToonShader::GetInstance();
        CarToonShader::SetCartoonShader(v41, v40);
      }
    }
  }
LABEL_69:
  Char::UpdateQuestMark(v2);
  if ( v2->m_byType == 4
    || !v2->m_bUserCharacter && (v44 = v2->m_byMode, v44 != 4) && v44 != 5 && (v45 = v2->m_pMobinfo) != 0 && v45->IsNPC )
  {
    QuestDataMgr::m_bUpdate = 1;
  }
  if ( bEquip )
    ((void (__thiscall *)(Char *))v2->vfptr[2].AddAbStateByAbstateIndex)(v2);
  if ( v2->m_byMode == 6 )
  {
    if ( v2->m_kMoverHandle == -1 )
    {
      if ( !v2->m_pkMover )
      {
        v47 = CharShape::GetRidePetID(&v2->m_kCharShape);
        Char::RidePet(v2, v47);
      }
    }
    else
    {
      v46 = (Mover *)CharMgr::GetChar(&g_kCharMgr, v2->m_kMoverHandle);
      v2->m_pkMover = v46;
      if ( v46 )
        Mover::RideOn(v46, v2, v2->m_uiMoverSlot);
    }
  }
  else
  {
    Char::GetoutOfPet(v2);
  }
  NiAVObject::UpdateProperties((NiAVObject *)&v2->m_spScene.m_pObject->vfptr);
  NiAVObject::UpdateEffects((NiAVObject *)&v2->m_spScene.m_pObject->vfptr);
  v2->m_pOldParent = 0;
  v2->m_stBlinkingInfo.byState = 0;
  v2->m_stBlinkingInfo.dwTime = 0;
  v2->m_kCharShape.m_byEyeState = 17;
  CharShape::EnableEyeShape(&v2->m_kCharShape, 0);
  v2->m_stBlinkingInfo.dwTime = timeGetTime();
  v48 = v2->m_pMobViewInfo;
  if ( v48 && v48->SpectralGlow == 1 )
  {
    v49 = CharShape::GetShader_Ctrl(v31);
    CSpactralGlow_Shader_Controller::SetUseShaderName(v49, "FxSkinning_Greyscale", "FxNoSkinning_Greyscale");
    CharShape::SetSPactralGlowEnable(v31, 1);
  }
  return 1;
}
// 9B9194: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *NsFindObjectByName::`vftable')(NsFindObjectByName *this, NiAVObject *_pkObject, void *);
// 9E4E90: using guessed type const unsigned int NiActorManager::INVALID_SEQUENCE_ID;
// A73BA6: using guessed type bool Char::ms_bEnableCarToon;
// A771B0: using guessed type bool QuestDataMgr::m_bUpdate;

//----- (0063FF70) --------------------------------------------------------
void __thiscall Char::MakeCharNpcEquipment(Char *this, CharNPC_ViewInfo *pViewInfo)
{
  Char *v2; // edi@1
  bool v3; // zf@2
  ItemInfo *v4; // eax@5
  ItemInfo *v5; // eax@8
  ItemInfo *v6; // eax@11
  ItemInfo *v7; // eax@14
  ItemInfo *v8; // eax@17
  ItemInfo *v9; // eax@20
  ItemInfo *v10; // eax@23
  ItemInfo *v11; // eax@26
  ItemInfo *v12; // eax@29
  ItemInfo *v13; // eax@32
  ItemInfo *v14; // eax@35
  ItemInfo *v15; // eax@38
  ItemInfo *v16; // eax@41
  ItemInfo *v17; // eax@44
  ItemInfo *v18; // eax@47
  ItemInfo *v19; // eax@50
  ItemInfo *v20; // eax@53
  ItemInfo *v21; // eax@56
  PROTO_EQUIPMENT equipment; // [sp+8h] [bp-30h]@2

  v2 = this;
  if ( pViewInfo )
  {
    memset((char *)&equipment, 0, 0x2Bu);
    v3 = pViewInfo->Class == 4;
    *(_DWORD *)&equipment.Equ_Head = -1;
    *(_DWORD *)&equipment.Equ_RightHand = -1;
    *(_DWORD *)&equipment.Equ_LeftHand = -1;
    *(_DWORD *)&equipment.Equ_Boot = -1;
    *(_DWORD *)&equipment.Equ_AccPant = -1;
    *(_DWORD *)&equipment.Equ_AccHeadA = -1;
    *(_DWORD *)&equipment.Equ_Eye = -1;
    *(_DWORD *)&equipment.Equ_AccRightHand = -1;
    *(_DWORD *)&equipment.Equ_CosEff = -1;
    *(_DWORD *)&equipment.Equ_Minimon = -1;
    if ( v3 && g_pkMainChar != (Char *)-780 )
    {
      CharShape::SetEquipInfo(&v2->m_kCharShape, &g_pkMainChar->m_kCharShape.m_kEquip);
    }
    else
    {
      v4 = ItemInfoTab::GetByInxName(pViewInfo->Equ_RightHand);
      if ( v4 )
        equipment.Equ_RightHand = v4->ID;
      else
        equipment.Equ_RightHand = -1;
      v5 = ItemInfoTab::GetByInxName(pViewInfo->Equ_LeftHand);
      if ( v5 )
        equipment.Equ_LeftHand = v5->ID;
      else
        equipment.Equ_LeftHand = -1;
      v6 = ItemInfoTab::GetByInxName(pViewInfo->Equ_Body);
      if ( v6 )
        equipment.Equ_Body = v6->ID;
      else
        equipment.Equ_Body = -1;
      v7 = ItemInfoTab::GetByInxName(pViewInfo->Equ_Leg);
      if ( v7 )
        equipment.Equ_Pant = v7->ID;
      else
        equipment.Equ_Pant = -1;
      v8 = ItemInfoTab::GetByInxName(pViewInfo->Equ_Shoes);
      if ( v8 )
        equipment.Equ_Boot = v8->ID;
      else
        equipment.Equ_Boot = -1;
      v9 = ItemInfoTab::GetByInxName(pViewInfo->Equ_AccBody);
      if ( v9 )
        equipment.Equ_AccBody = v9->ID;
      else
        equipment.Equ_AccBody = -1;
      v10 = ItemInfoTab::GetByInxName(pViewInfo->Equ_AccLeg);
      if ( v10 )
        equipment.Equ_AccPant = v10->ID;
      else
        equipment.Equ_AccPant = -1;
      v11 = ItemInfoTab::GetByInxName(pViewInfo->Equ_AccShoes);
      if ( v11 )
        equipment.Equ_AccBoot = v11->ID;
      else
        equipment.Equ_AccBoot = -1;
      v12 = ItemInfoTab::GetByInxName(pViewInfo->Equ_AccMouth);
      if ( v12 )
        equipment.Equ_Mouth = v12->ID;
      else
        equipment.Equ_Mouth = -1;
      v13 = ItemInfoTab::GetByInxName(pViewInfo->Equ_MiniMon);
      if ( v13 )
        equipment.Equ_Minimon = v13->ID;
      else
        equipment.Equ_Minimon = -1;
      v14 = ItemInfoTab::GetByInxName(pViewInfo->Equ_AccHeadA);
      if ( v14 )
        equipment.Equ_AccHeadA = v14->ID;
      else
        equipment.Equ_AccHeadA = -1;
      v15 = ItemInfoTab::GetByInxName(pViewInfo->Equ_AccEye);
      if ( v15 )
        equipment.Equ_Eye = v15->ID;
      else
        equipment.Equ_Eye = -1;
      v16 = ItemInfoTab::GetByInxName(pViewInfo->Equ_AccLeftHand);
      if ( v16 )
        equipment.Equ_AccLeftHand = v16->ID;
      else
        equipment.Equ_AccLeftHand = -1;
      v17 = ItemInfoTab::GetByInxName(pViewInfo->Equ_AccRightHand);
      if ( v17 )
        equipment.Equ_AccRightHand = v17->ID;
      else
        equipment.Equ_AccRightHand = -1;
      v18 = ItemInfoTab::GetByInxName(pViewInfo->Equ_AccBack);
      if ( v18 )
        equipment.Equ_AccBack = v18->ID;
      else
        equipment.Equ_AccBack = -1;
      v19 = ItemInfoTab::GetByInxName(pViewInfo->Equ_AccWeast);
      if ( v19 )
        equipment.Equ_CosEff = v19->ID;
      else
        equipment.Equ_CosEff = -1;
      v20 = ItemInfoTab::GetByInxName(pViewInfo->Equ_AccHip);
      if ( v20 )
        equipment.Equ_AccHip = v20->ID;
      else
        equipment.Equ_AccHip = -1;
      v21 = ItemInfoTab::GetByInxName(pViewInfo->Equ_MiniMon_R);
      if ( v21 )
        equipment.Equ_MiniMon_R = v21->ID;
      else
        equipment.Equ_MiniMon_R = -1;
      CharShape::SetEquipInfo(&v2->m_kCharShape, &equipment);
    }
  }
}

//----- (006402C0) --------------------------------------------------------
char __thiscall Char::InitView(Char *this, int bEquip, unsigned int uiFrame)
{
  Char *v3; // esi@1
  AbStateInfectee::AbstateColor (__thiscall *v4)(AbStateInfectee *); // edx@4
  NiNode *v5; // ecx@4
  NiRTTI *v6; // eax@5
  char result; // al@10
  int v8; // edi@11
  MobViewInfo *v9; // eax@12
  unsigned int v10; // eax@13
  CharNPC_ViewInfo *v11; // eax@14
  NiActorManager **v12; // ebx@16
  NiD3DDefaultShader *v13; // eax@16
  char v14; // al@16
  char v15; // cl@16
  NiD3DDefaultShader *v16; // eax@17
  ActionInfoSet *v17; // eax@17
  NiD3DDefaultShader *v18; // eax@18
  NiActorManager *v19; // eax@19
  NiActorManager *v20; // ecx@19
  NiActorManager *kClassID; // [sp+14h] [bp-8h]@19
  char classid; // [sp+18h] [bp-4h]@15
  CharNPC_ViewInfo *pkNpcViewInfo; // [sp+28h] [bp+Ch]@14
  CharNPC_ViewInfo *pkNpcViewInfoa; // [sp+28h] [bp+Ch]@19

  v3 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[20].Deaffect)() )
    Char::Shape_UnMetamorphosis(v3, 0);
  Char::CulledTent(v3, 1);
  if ( !(unsigned __int8)((int (__thiscall *)(_DWORD))v3->vfptr[1].AddAbStateByAbstateIndex)(v3) )
  {
    v3->m_kActionMgr.m_pkActInfoSet = 0;
    v3->m_kActionMgr.m_fActionStartTime = 0.0;
    v3->m_kActionMgr.m_pkChar = 0;
    v3->m_kActionMgr.m_fActionLastUpdateTime = 0.0;
    v3->m_kActionMgr.m_pActor = 0;
    v3->m_kActionMgr.m_pkCurPlaySkillViewInfo = 0;
    v3->m_kActionMgr.m_uiCurEventCode = 0;
    v3->m_kActionMgr.m_pkLastAttackActInfo = 0;
    v3->m_kActionMgr.m_iOldLoopCnt = 0;
    v3->m_kActionMgr.m_bUseActorSequence = 0;
    v3->m_kActionMgr.m_pkCurPlayActInfo = 0;
    *(_WORD *)&v3->m_kActionMgr.m_abActionEff[0] = 0;
    v3->m_kActionMgr.m_abActionEff[2] = 0;
    v8 = (int)&v3->m_kActionMgr;
    *(_WORD *)(v8 + 79) = 0;
    *(float *)(v8 + 100) = 0.0;
    v3->m_kRidePetAction.m_fActionStartTime = 0.0;
    v3->m_kRidePetAction.m_pkActInfoSet = 0;
    v3->m_kRidePetAction.m_fActionLastUpdateTime = 0.0;
    v3->m_kRidePetAction.m_pkChar = 0;
    v3->m_kRidePetAction.m_pActor = 0;
    v3->m_kRidePetAction.m_pkCurPlaySkillViewInfo = 0;
    v3->m_kRidePetAction.m_uiCurEventCode = 0;
    v3->m_kRidePetAction.m_pkLastAttackActInfo = 0;
    v3->m_kRidePetAction.m_iOldLoopCnt = 0;
    v3->m_kRidePetAction.m_bUseActorSequence = 0;
    v3->m_kRidePetAction.m_pkCurPlayActInfo = 0;
    *(_WORD *)&v3->m_kRidePetAction.m_abActionEff[0] = 0;
    v3->m_kRidePetAction.m_abActionEff[2] = 0;
    *(_WORD *)&v3->m_kRidePetAction.m_abActionSnd[0] = 0;
    v3->m_kRidePetAction.m_fEffectStartTime = 0.0;
    if ( v3->m_bUserCharacter )
    {
      v19 = CharResMgr::GetCharActor(&g_kCharResMgr, v3->m_kCharShape.m_kClassID, v3->m_kCharShape.m_byGender, uiFrame);
      v20 = v3->m_spActor.m_pObject;
      v12 = &v3->m_spActor.m_pObject;
      pkNpcViewInfoa = (CharNPC_ViewInfo *)v19;
      kClassID = v20;
      if ( v20 != v19 )
      {
        if ( v20 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v20->m_uiRefCount) && kClassID )
            ((void (__stdcall *)(_DWORD))kClassID->vfptr->__vecDelDtor)(1);
          v19 = (NiActorManager *)pkNpcViewInfoa;
        }
        *v12 = v19;
        if ( v19 )
          InterlockedIncrement((volatile LONG *)&v19->m_uiRefCount);
      }
      v14 = v3->m_kCharShape.m_byGender;
      v15 = v3->m_kCharShape.m_kClassID;
    }
    else
    {
      v9 = v3->m_pMobViewInfo;
      if ( !v9
        || (v10 = v9->NpcViewIndex, (unsigned __int16)v10 <= 0u)
        || (v11 = NPCViewInfoTab::GetByID(v10), (pkNpcViewInfo = v11) == 0) )
      {
        v12 = &v3->m_spActor.m_pObject;
        v18 = (NiD3DDefaultShader *)CharResMgr::GetMobActor(&g_kCharResMgr, v3->m_kCharShape.m_kMobID);
        NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_spActor, v18);
        v17 = ActionInfoTable::GetMobActionInfo(v3->m_kCharShape.m_kMobID);
        goto LABEL_29;
      }
      classid = Char::MakeCharNpcShape(v3, v11);
      if ( classid == 64 )
      {
        v12 = &v3->m_spActor.m_pObject;
        v16 = (NiD3DDefaultShader *)CharResMgr::GetMobActor(&g_kCharResMgr, pkNpcViewInfo->Gender);
        NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_spActor, v16);
        v17 = ActionInfoTable::GetMobActionInfo(pkNpcViewInfo->Gender);
        goto LABEL_29;
      }
      Char::MakeCharNpcEquipment(v3, pkNpcViewInfo);
      v12 = &v3->m_spActor.m_pObject;
      v13 = (NiD3DDefaultShader *)CharResMgr::GetCharActor(&g_kCharResMgr, classid, pkNpcViewInfo->Gender, 0);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_spActor, v13);
      v14 = pkNpcViewInfo->Gender;
      v15 = classid;
    }
    v17 = ActionInfoTable::GetCharActionInfo(v15, v14);
LABEL_29:
    v3->m_kActionMgr.m_pkActInfoSet = v17;
    v3->m_kActionMgr.m_pkChar = v3;
    v3->m_kRidePetAction.m_pkChar = v3;
    if ( Char::IsLinkGate(v3) || v3->m_bIsDoor )
      v3->m_spScene.m_pObject->m_uFlags &= 0xFFFEu;
    if ( *v12 )
    {
      (*v12)->m_pkCallbackObject = (NiActorManager::CallbackObject *)v8;
      NiActorManager::RegisterCallback(*v12, TEXT_KEY_EVENT, NiActorManager::ANY_SEQUENCE_ID, g_kTextKeyMatch);
      result = ((int (__thiscall *)(_DWORD, _DWORD))v3->vfptr[18].GetAbstateColor)(v3, bEquip);
    }
    else
    {
      result = 0;
    }
    return result;
  }
  v4 = v3->vfptr[1].GetAbstateColor;
  v3->m_bIsChangeCampMode = 1;
  ((void (__thiscall *)(_DWORD, _DWORD))v4)(v3, 0);
  v5 = v3->m_spScene.m_pObject;
  if ( v5 )
  {
    v6 = (NiRTTI *)((int (*)(void))v5->vfptr[1].__vecDelDtor)();
    if ( v6 )
    {
      while ( v6 != &NsFadeNode::m_RTTI )
      {
        v6 = v6->m_pkBaseRTTI;
        if ( !v6 )
          goto LABEL_10;
      }
      LOBYTE(v3->m_spScene.m_pObject[1].vfptr) = 0;
    }
  }
LABEL_10:
  NiAVObject::UpdateProperties((NiAVObject *)&v3->m_spScene.m_pObject->vfptr);
  NiAVObject::UpdateEffects((NiAVObject *)&v3->m_spScene.m_pObject->vfptr);
  NiAVObject::Update((NiAVObject *)&v3->m_spScene.m_pObject->vfptr, 0.call ;
  return 1;
}

//----- (00640640) --------------------------------------------------------
void __thiscall NiAVObject::SetRotate(NiAVObject *this, float fAngle, float x, float y, float z)
{
  NiMatrix3::MakeRotation(&this->m_kLocal.m_Rotate, fAngle, x, y, z);
}

//----- (00640670) --------------------------------------------------------
char __thiscall CQuestInfoViewMgr::IsHaveQuestState(CQuestInfoViewMgr *this)
{
  char result; // al@2

  switch ( this->m_kNpcState.eResultState )
  {
    case 4:
    case 5:
    case 6:
    case 8:
    case 0x14:
      result = 1;
      break;
    default:
      result = 0;
      break;
  }
  return result;
}

//----- (006406B0) --------------------------------------------------------
void __thiscall Char::SetShockWave(Char *this, bool bShockWave)
{
  Char *v2; // esi@1
  int v3; // eax@1
  int v4; // eax@2
  float v5; // eax@2
  NiPoint3 kCharPos; // [sp+10h] [bp-Ch]@1

  v2 = this;
  v3 = ((int (*)(void))this->vfptr[6].Deaffect)();
  kCharPos.x = *(float *)v3;
  kCharPos.y = *(float *)(v3 + 4);
  kCharPos.z = *(float *)(v3 + 8);
  World::GetAdvGroundPos(&g_kWorld, kCharPos.x, kCharPos.y, &kCharPos);
  ((void (__thiscall *)(_DWORD, _DWORD))v2->vfptr[5].~AbStateInfectee)(v2, &kCharPos);
  v2->m_bShockWave = bShockWave;
  if ( bShockWave == 1 )
  {
    v2->m_RisingTimer.m_fStartTime = Timer::ms_fCurTime;
    v2->m_RisingTimer.m_fObjectTime = 0.0;
    v2->m_RisingTimer.m_fElapsedTime = 0.0;
    v4 = ((int (__thiscall *)(_DWORD))v2->vfptr[6].Deaffect)(v2);
    v2->m_MovePoint.x = *(float *)v4;
    v2->m_MovePoint.y = *(float *)(v4 + 4);
    v5 = *(float *)(v4 + 8);
    v2->m_fCountTime = 0.0099999998;
    v2->m_MovePoint.z = v5;
  }
  else if ( !bShockWave )
  {
    v2->m_bAirTime = 0;
    v2->m_fCountTime = 0.0;
    v2->m_bDownTime = 0;
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00640790) --------------------------------------------------------
NiPointer<NiPixelData> *__thiscall NiPointer<NiActorManager>::operator=(NiPointer<NiPixelData> *this, NiPointer<NiPixelData> *ptr)
{
  NiPointer<NiPixelData> *v2; // edi@1
  NiPixelData *v3; // esi@1
  NiPixelData *v4; // eax@6

  v2 = this;
  v3 = this->m_pObject;
  if ( this->m_pObject != ptr->m_pObject )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v4 = ptr->m_pObject;
    v2->m_pObject = ptr->m_pObject;
    if ( v4 )
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  }
  return v2;
}

//----- (006407E0) --------------------------------------------------------
void __thiscall JumpProcessor::~JumpProcessor(JumpProcessor *this)
{
  JumpProcessor *v1; // esi@1
  NiNode *v2; // esi@1

  v1 = this;
  NsEffect::~NsEffect(&this->m_kEffect);
  v2 = v1->m_spJumpInfo.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
  {
    if ( v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  }
}

//----- (00640860) --------------------------------------------------------
void __thiscall CRidePetCtl::~CRidePetCtl(CRidePetCtl *this)
{
  CRidePetCtl *v1; // esi@1
  NiActorManager *v2; // esi@1

  v1 = this;
  CSpactralGlow_Shader_Controller::~CSpactralGlow_Shader_Controller(&this->m_kShaderCtrl);
  v2 = v1->m_spPetActor.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
  {
    if ( v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  }
}

//----- (006408E0) --------------------------------------------------------
unsigned int __cdecl ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C1D0: using guessed type int ITableBase<MobRandomIdleAni,MobRandomIdleAniTab>::ms_pkTable;

//----- (00640900) --------------------------------------------------------
NiAVObject *__thiscall NsFindObjectByName::GetAt(NsFindObjectByName *this, unsigned int uiIndex)
{
  NiAVObject *result; // eax@2

  if ( uiIndex < this->m_vecObject._Mylast - this->m_vecObject._Myfirst )
    result = this->m_vecObject._Myfirst[uiIndex];
  else
    result = 0;
  return result;
}

//----- (00640930) --------------------------------------------------------
void __thiscall CQuestInfoViewMgr::CQuestInfoViewMgr(CQuestInfoViewMgr *this)
{
  CQuestInfoViewMgr *v1; // esi@1
  NiNode *v2; // ebx@1
  NiNode *v3; // eax@1
  NiNode *v4; // eax@2
  NiNode *v5; // edi@3

  v1 = this;
  v2 = 0;
  this->m_spQuestInfo.m_pObject = 0;
  v3 = (NiNode *)operator new(0xE8u);
  if ( v3 )
  {
    NiNode::NiNode(v3, 0);
    v2 = v4;
  }
  v5 = v1->m_spQuestInfo.m_pObject;
  if ( v1->m_spQuestInfo.m_pObject != v2 )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spQuestInfo.m_pObject = v2;
    if ( v2 )
      InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  }
  v1->m_kNpcState.eResultState = 0;
  v1->m_kNpcState.lpQuestData = 0;
  v1->m_kNpcState.nLevel = 0;
  v1->m_kNpcState.hID = 0;
}

//----- (006409F0) --------------------------------------------------------
void __thiscall CQuestInfoViewMgr::~CQuestInfoViewMgr(CQuestInfoViewMgr *this)
{
  CQuestInfoViewMgr *v1; // edi@1
  NiNode *v2; // esi@1
  NiNode *v3; // esi@6

  v1 = this;
  v2 = this->m_spQuestInfo.m_pObject;
  if ( this->m_spQuestInfo.m_pObject )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spQuestInfo.m_pObject = 0;
  }
  v3 = v1->m_spQuestInfo.m_pObject;
  if ( v1->m_spQuestInfo.m_pObject && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
  {
    if ( v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  }
}

//----- (00640A90) --------------------------------------------------------
void __thiscall CRidePetCtl::StartAction(CRidePetCtl *this, unsigned int uiEventCode)
{
  CRidePetCtl *v2; // esi@1
  ActionInfoSet *v3; // eax@1
  ActionInfo *v4; // ecx@1
  ActionMgr *v5; // eax@1
  ActionMgr *v6; // edi@1
  unsigned int v7; // edx@2

  v2 = this;
  v3 = ActionInfoTable::GetRidePetActionInfo(this->m_uiID);
  v4 = ActionInfoSet::GetByEventCode(v3, uiEventCode);
  v5 = v2->m_pkActionMgr;
  v5->m_pkCurPlayActInfo = 0;
  *(_WORD *)&v5->m_abActionEff[0] = 0;
  v5->m_abActionEff[2] = 0;
  *(_WORD *)&v5->m_abActionSnd[0] = 0;
  v6 = v2->m_pkActionMgr;
  v6->m_pkCurPlayActInfo = v4;
  if ( v4 )
  {
    v7 = v4->uiEventCode;
    v6->m_uiCurEventCode = v7;
    if ( 10000 * (v7 / 0x2710) == 300000 )
      v6->m_pkLastAttackActInfo = v4;
  }
  ActionMgr::SetActionStartTime(v2->m_pkActionMgr, Timer::ms_fCurTime);
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00640B10) --------------------------------------------------------
void __thiscall CRidePetCtl::ActStand(CRidePetCtl *this)
{
  CRidePetCtl *v1; // esi@1
  NiActorManager *v2; // ecx@1

  v1 = this;
  v2 = this->m_spPetActor.m_pObject;
  if ( v1->m_uiStandEventCode != v2->m_eTargetID )
  {
    if ( v2 )
      NiActorManager::SetTargetAnimation(v2, v1->m_uiStandEventCode);
    CRidePetCtl::StartAction(v1, v1->m_uiStandEventCode);
  }
}

//----- (00640B40) --------------------------------------------------------
double __thiscall Char::GetMaxViewLength(Char *this)
{
  char v1; // al@3
  MobInfo *v2; // eax@5
  float v3; // ST00_4@7
  double result; // st7@7

  if ( this->m_byType == 4
    || !this->m_bUserCharacter && (v1 = this->m_byMode, v1 != 4) && v1 != 5 && (v2 = this->m_pMobinfo) != 0 && v2->IsNPC )
  {
    v3 = this->m_fMaxViewLength + 500.0;
    result = v3;
  }
  else
  {
    result = this->m_fMaxViewLength;
  }
  return result;
}

//----- (00640BA0) --------------------------------------------------------
void __thiscall Char::CulledTent(Char *this, bool bCullTent)
{
  Char *v2; // esi@1
  void (__thiscall ***v3)(_DWORD, _DWORD); // edi@3
  void (__thiscall ***v4)(_DWORD, _DWORD); // edi@8

  v2 = this;
  if ( bCullTent )
  {
    this->m_spHouseNode.m_pObject->m_uFlags |= 1u;
    this->m_spCharNode.m_pObject->m_uFlags &= 0xFFFEu;
    ((void (__stdcall *)(bool *, NiNode *))this->m_spCtrlNode.m_pObject->vfptr[30].__vecDelDtor)(
      &bCullTent,
      this->m_spHouseNode.m_pObject);
    if ( bCullTent )
    {
      v3 = (void (__thiscall ***)(_DWORD, _DWORD))bCullTent;
      if ( !InterlockedDecrement((volatile LONG *)(bCullTent + 4)) )
      {
        if ( v3 )
          (**v3)(v3, 1);
      }
    }
    ((void (__stdcall *)(NiNode *, signed int))v2->m_spCtrlNode.m_pObject->vfptr[29].__vecDelDtor)(
      v2->m_spCharNode.m_pObject,
      1);
  }
  else
  {
    ((void (__stdcall *)(bool *, NiNode *))this->m_spCtrlNode.m_pObject->vfptr[30].__vecDelDtor)(
      &bCullTent,
      this->m_spCharNode.m_pObject);
    if ( bCullTent )
    {
      v4 = (void (__thiscall ***)(_DWORD, _DWORD))bCullTent;
      if ( !InterlockedDecrement((volatile LONG *)(bCullTent + 4)) )
      {
        if ( v4 )
          (**v4)(v4, 1);
      }
    }
    ((void (__stdcall *)(NiNode *, signed int))v2->m_spCtrlNode.m_pObject->vfptr[29].__vecDelDtor)(
      v2->m_spHouseNode.m_pObject,
      1);
    v2->m_spHouseNode.m_pObject->m_uFlags &= 0xFFFEu;
    v2->m_spCharNode.m_pObject->m_uFlags |= 1u;
  }
  NiAVObject::UpdateEffects((NiAVObject *)&v2->m_spScene.m_pObject->vfptr);
  NiAVObject::UpdateProperties((NiAVObject *)&v2->m_spScene.m_pObject->vfptr);
}

//----- (00640CB0) --------------------------------------------------------
void __thiscall CRidePetCtl::Update(CRidePetCtl *this, float ftime)
{
  CRidePetCtl *v2; // esi@1
  NiActorManager *v3; // edi@1
  unsigned int v4; // ecx@2
  unsigned int v5; // edx@2
  NiVBSet *val; // [sp+Ch] [bp-4h]@4

  v2 = this;
  v3 = this->m_spPetActor.m_pObject;
  if ( v3 )
  {
    v4 = this->m_uiSpecialEventCode;
    v5 = v3->m_eCurID;
    if ( v5 == v4
      && v3->m_eTargetID == v4
      && NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
           (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v3->m_kSequenceMap,
           v5,
           &val)
      && val
      && *(float *)&val->m_apkBlocks.m_uiGrowBy <= (double)*(float *)&val->m_pkBlockList )
    {
      CRidePetCtl::ActStand(v2);
    }
    NiActorManager::Update(v2->m_spPetActor.m_pObject, ftime);
  }
}

//----- (00640D20) --------------------------------------------------------
void __thiscall Char::UpdateForceAni(Char *this)
{
  Char *v1; // esi@1
  NiActorManager *v2; // ecx@1

  v1 = this;
  v2 = this->m_spActor.m_pObject;
  if ( v2 )
  {
    if ( !v1->m_bCulled )
    {
      NiActorManager::Update(v2, v1->m_fAnimationUpdateTime);
      CRidePetCtl::Update(&v1->m_kRidePetCtl, v1->m_fAnimationUpdateTime);
      NiAVObject::Update((NiAVObject *)&v1->m_spScene.m_pObject->vfptr, v1->m_fAnimationUpdateTime, 1);
    }
  }
}

//----- (00640D80) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Erase(std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *_Rootnode)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v2; // edi@1
  std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *i; // esi@1

  v2 = _Rootnode;
  v3 = this;
  for ( i = _Rootnode; !i->_Isnil; v2 = i )
  {
    std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Erase(
      v3,
      i->_Right);
    i = i->_Left;
    operator delete(v2);
  }
}

//----- (00640DC0) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<float,ActionEffectInfo *,std::less<float>,std::allocator<std::pair<float const,ActionEffectInfo *>>,1>>::_Linsert(std::_Tree<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *_Node, bool _Leftish)
{
  std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *v4; // edx@1
  std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *v5; // edi@1
  std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *v6; // esi@1
  std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *v7; // ecx@10
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > >,bool> *v8; // eax@10
  char _Addleft; // [sp+14h] [bp+Ch]@1

  v4 = this->_Myhead->_Parent;
  v5 = _Node;
  v6 = this->_Myhead;
  _Addleft = 1;
  while ( !v4->_Isnil )
  {
    v6 = v4;
    if ( _Leftish )
    {
      _Addleft = v5->_Myval.first <= (double)v4->_Myval.first;
      if ( v5->_Myval.first > (double)v4->_Myval.first )
        goto LABEL_8;
      v4 = v4->_Left;
    }
    else
    {
      if ( v4->_Myval.first <= (double)v5->_Myval.first )
      {
        _Addleft = 0;
LABEL_8:
        v4 = v4->_Right;
        continue;
      }
      v4 = v4->_Left;
      _Addleft = 1;
    }
  }
  v7 = (std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *)std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert((std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)this, (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)&_Leftish, _Addleft, (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)v6, (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)v5)->_Ptr;
  v8 = result;
  result->first._Ptr = v7;
  result->second = 1;
  return v8;
}

//----- (00640E60) --------------------------------------------------------
void __thiscall NsFindObjectByName::NsFindObjectByName(NsFindObjectByName *this)
{
  this->m_pCallBack = 0;
  this->m_nCurLevel = -1;
  this->vfptr = (Ns_TourSceneVtbl *)&NsFindObjectByName::`vftable';
  this->m_szName._Myres = 15;
  this->m_szName._Mysize = 0;
  this->m_szName._Bx._Buf[0] = 0;
  this->m_vecObject._Myfirst = 0;
  this->m_vecObject._Mylast = 0;
  this->m_vecObject._Myend = 0;
}
// 9B9194: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *NsFindObjectByName::`vftable')(NsFindObjectByName *this, NiAVObject *_pkObject, void *);

//----- (00640E90) --------------------------------------------------------
void __thiscall NsFindObjectByName::~NsFindObjectByName(NsFindObjectByName *this)
{
  NsFindObjectByName *v1; // esi@1

  v1 = this;
  if ( this->m_vecObject._Myfirst )
    operator delete(this->m_vecObject._Myfirst);
  v1->m_vecObject._Myfirst = 0;
  v1->m_vecObject._Mylast = 0;
  v1->m_vecObject._Myend = 0;
  if ( v1->m_szName._Myres >= 0x10 )
    operator delete(v1->m_szName._Bx._Ptr);
  v1->m_szName._Mysize = 0;
  v1->m_szName._Myres = 15;
  v1->m_szName._Bx._Buf[0] = 0;
  v1->vfptr = (Ns_TourSceneVtbl *)&Ns_TourScene::`vftable';
}
// 9B8DD0: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *Ns_TourScene::`vftable')(Ns_TourScene *this, NiAVObject *_pkObject, void *);

//----- (00640EE0) --------------------------------------------------------
void __thiscall std::list<float,std::allocator<float>>::push_back(std::list<float,std::allocator<float> > *this, float *_Val)
{
  std::list<float,std::allocator<float> > *v2; // esi@1
  std::_List_nod<float,std::allocator<float> >::_Node *v3; // edi@1
  std::_List_nod<float,std::allocator<float> >::_Node *v4; // eax@1
  unsigned int v5; // ecx@1

  v2 = this;
  v3 = this->_Myhead;
  v4 = std::_List_val<float,std::allocator<float>>::_Buynode(this->_Myhead, this->_Myhead->_Prev, _Val);
  v5 = v2->_Mysize;
  if ( 1073741822 - v5 < 1 )
    std::_Xlength_error("list<T> too long");
  v2->_Mysize = v5 + 1;
  v3->_Prev = v4;
  v4->_Prev->_Next = v4;
}

//----- (00640F30) --------------------------------------------------------
signed int __stdcall NsFindObjectByName::ProcessData(NiAVObject *_pkObject, void *_pData)
{
  void *v3; // esi@1
  signed int result; // eax@2

  v3 = _pData;
  if ( NsUtil::MatchTag((NiObjectNET *)&_pkObject->vfptr, *(const char **)_pData) )
  {
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      *((std::vector<unsigned long,std::allocator<unsigned long> > **)v3 + 1),
      (const unsigned int *)&_pkObject);
    result = -1;
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (00640F70) --------------------------------------------------------
Char *__thiscall Char::`vector deleting destructor'(char *this, unsigned int a2)
{
  return Char::`vector deleting destructor'((Char *)(this - 64), a2);
}

//----- (00640F80) --------------------------------------------------------
Char *__thiscall Char::`vector deleting destructor'(char *this, unsigned int a2)
{
  return Char::`vector deleting destructor'((Char *)(this - 88), a2);
}

//----- (00640F90) --------------------------------------------------------
bool __thiscall NsFindObjectByName::FindObject(NsFindObjectByName *this, NiNode *_pObject, const char *_szName)
{
  NsFindObjectByName *v3; // ebx@1
  NsFindObjectByName::Data data; // [sp+Ch] [bp-8h]@2

  v3 = this;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&this->m_szName, _szName, strlen(_szName));
  std::vector<PgWinText *,std::allocator<PgWinText *>>::resize(
    (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v3->m_vecObject,
    0);
  if ( v3->m_szName._Myres < 0x10 )
    data.szName = v3->m_szName._Bx._Buf;
  else
    data.szName = v3->m_szName._Bx._Ptr;
  data.pvector = &v3->m_vecObject;
  Ns_TourScene::TourScene((Ns_TourScene *)&v3->vfptr, _pObject, &NiAVObject::m_RTTI, &data);
  v3->m_uiSize = v3->m_vecObject._Mylast - v3->m_vecObject._Myfirst;
  return (((char *)v3->m_vecObject._Mylast - (char *)v3->m_vecObject._Myfirst) & 0xFFFFFFFC) != 0;
}

//----- (00641010) --------------------------------------------------------
Char *__thiscall Char::`vector deleting destructor'(Char *this, unsigned int a2)
{
  Char *v2; // esi@1

  v2 = this;
  Char::~Char(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00641040) --------------------------------------------------------
void __thiscall Char::StopMoveTarget(Char *this)
{
  this->m_kMoveToTarget.vfptr->Stop((NpNs_MoveToTarget *)&this->m_kMoveToTarget);
}

//----- (00641060) --------------------------------------------------------
bool __thiscall Char::IsDuringSkillCasting(Char *this)
{
  Char *v1; // esi@1
  unsigned int v2; // eax@2
  bool result; // al@5

  v1 = this;
  result = 0;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[15].AddAbStateByAbstateIndex)() )
  {
    v2 = v1->m_uiSkillActStep;
    if ( v2 == 4 || v2 == 2 || v2 == 3 )
      result = 1;
  }
  return result;
}

//----- (00641090) --------------------------------------------------------
void __thiscall Char::SetCurPlaySkill(Char *this, Skill::Type eSkillType, unsigned __int16 kSkillID)
{
  this->m_eCurPlaySkillType = eSkillType;
  this->m_kCurPlaySkillID = kSkillID;
}

//----- (006410B0) --------------------------------------------------------
Skill::Type __thiscall Char::GetCurPlaySkillType(Char *this)
{
  return this->m_eCurPlaySkillType;
}

//----- (006410C0) --------------------------------------------------------
unsigned __int16 __thiscall Char::GetCurPlaySkillID(Char *this)
{
  return this->m_kCurPlaySkillID;
}

//----- (006410D0) --------------------------------------------------------
void __thiscall Char::ActDamageShaking(Char *this, float fAmplitude, float fPeriod, float fDamp, EffectAxisEnum eValue, float fStartTime)
{
  OscillationEx::ImPact(&this->m_kDamageOscillation, fAmplitude, fPeriod, fDamp, eValue, fStartTime);
}

//----- (00641110) --------------------------------------------------------
void __thiscall Char::ActDamageShaking(Char *this, EffectViewInfo *pkShakeInfo, float fStartTime)
{
  if ( pkShakeInfo )
    OscillationEx::Impact(&this->m_kDamageOscillation, pkShakeInfo, fStartTime);
}

//----- (00641140) --------------------------------------------------------
void __thiscall Char::ActResourceAppearing(Char *this)
{
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))this->vfptr[10].SetAbStateProperty)(100, 0, 0);
}

//----- (00641160) --------------------------------------------------------
void __thiscall Char::ActResourceDisappearing(Char *this)
{
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))this->vfptr[10].SetAbStateProperty)(300, 0, 0);
}

//----- (00641180) --------------------------------------------------------
void __thiscall Char::SetReserveSkillSmash(Char *this, bool bSmash)
{
  Char *v2; // esi@1
  unsigned int v3; // eax@2
  void (__thiscall *v4)(AttackSequenceManager *, float); // edx@4

  v2 = this;
  if ( this->m_bReserveSkillSmash )
    goto LABEL_5;
  v3 = this->m_uiSkillActStep;
  if ( v3 == 6 )
  {
    this->m_bReserveSkillSmash = bSmash;
  }
  else
  {
    if ( v3 )
    {
      v4 = this->vfptr->SetAnimationSpeed;
      this->m_uiSkillActStep = 5;
      ((void (__stdcall *)(_DWORD))v4)(1.0);
LABEL_5:
      v2->m_bReserveSkillSmash = bSmash;
      return;
    }
    this->m_bReserveSkillSmash = bSmash;
  }
}

//----- (006411F0) --------------------------------------------------------
void __thiscall Char::CancelEmotion(Char *this)
{
  this->m_eEmotionState = 0;
  this->m_uiEmotionIndex = 0xFFFF;
  this->m_uiCurEmotionCode = 0;
}

//----- (00641210) --------------------------------------------------------
void __thiscall Char::StartMHEmotion(Char *this)
{
  Char *v1; // esi@1

  v1 = this;
  ((void (*)(void))this->vfptr[13].Deaffect)();
  ((void (__thiscall *)(_DWORD, _DWORD))v1->vfptr[13].AddAbStateByAbstateIndex)(v1, 4);
}

//----- (00641230) --------------------------------------------------------
void __thiscall Char::StopGathering(Char *this)
{
  Char *v1; // esi@1

  v1 = this;
  if ( this->m_kTargetResourceHandle != -1 )
  {
    Char::RestoreEquipState(this);
    ((void (__thiscall *)(_DWORD))v1->vfptr[10].DeleteAbStateByAbstateIndex)(v1);
  }
}

//----- (00641260) --------------------------------------------------------
void __thiscall Char::StopItemCasting(Char *this)
{
  ((void (*)(void))this->vfptr[10].DeleteAbStateByAbstateIndex)();
}

//----- (00641270) --------------------------------------------------------
void __thiscall Char::StartEmotion(Char *this)
{
  Char *v1; // esi@1

  v1 = this;
  if ( this->m_eEmotionState == 4 )
    ((void (*)(void))this->vfptr[13].Deaffect)();
  if ( v1->m_eEmotionState != 3 )
    v1->m_eEmotionState = 1;
  ((void (__stdcall *)(_DWORD))v1->vfptr->SetAnimationSpeed)(1.0);
}

//----- (006412B0) --------------------------------------------------------
unsigned int __thiscall Char::GetAniCode(Char *this, bool bFindingBaseAction, unsigned int *puiFirstCode, unsigned int *puiSecondCode)
{
  unsigned int v4; // esi@1
  Char *v5; // edi@1
  unsigned int v7; // ecx@12

  v4 = NiActorManager::INVALID_EVENT_CODE;
  v5 = this;
  if ( ((int (*)(void))this->vfptr[13].DeleteAbStateByAbstateIndex)() == 4 )
    return v5->m_uiLayerAniCode[0];
  if ( !bFindingBaseAction && v5->m_uiLayerAniCode[1] != NiActorManager::INVALID_EVENT_CODE )
    v4 = v5->m_uiLayerAniCode[1];
  if ( v4 != NiActorManager::INVALID_EVENT_CODE
    || (v4 = v5->m_uiLayerAniCode[0], v4 != NiActorManager::INVALID_EVENT_CODE) )
  {
    v7 = 10000 * (v4 / 0x2710);
    if ( puiFirstCode )
      *puiFirstCode = v7;
    if ( puiSecondCode )
      *puiSecondCode = 100 * (v4 / 0x64) - v7;
  }
  else
  {
    if ( puiFirstCode )
      *puiFirstCode = -1;
    if ( puiSecondCode )
    {
      *puiSecondCode = -1;
      return v4;
    }
  }
  return v4;
}

//----- (00641360) --------------------------------------------------------
char __thiscall Char::CheckActState(Char *this, int nAniEventCode)
{
  char result; // al@1
  unsigned int n2ndCode; // [sp+0h] [bp-8h]@1
  unsigned int n1stCode; // [sp+4h] [bp-4h]@1

  Char::GetAniCode(this, 0, &n1stCode, &n2ndCode);
  result = 0;
  if ( n1stCode == nAniEventCode )
  {
    result = 1;
  }
  else if ( n2ndCode == nAniEventCode )
  {
    result = 2;
  }
  return result;
}

//----- (006413A0) --------------------------------------------------------
void __thiscall Char::StopFlagCapture(Char *this)
{
  ((void (*)(void))this->vfptr[10].DeleteAbStateByAbstateIndex)();
}

//----- (006413B0) --------------------------------------------------------
bool __thiscall Char::IsMoverMovable(Char *this)
{
  Mover *v1; // ecx@1
  bool result; // al@2

  v1 = this->m_pkMover;
  if ( v1 )
    result = Mover::IsMoverMovable(v1);
  else
    result = 1;
  return result;
}

//----- (006413D0) --------------------------------------------------------
signed int __stdcall Char::GetMoveCharAniType(AniEventCode::Code2 eCode2)
{
  signed int result; // eax@2

  if ( eCode2 == 1000 )
    result = 2;
  else
    result = eCode2 != 2000 ? 0 : 3;
  return result;
}

//----- (00641400) --------------------------------------------------------
signed int __stdcall Char::GetDamageCharAniType(AniEventCode::Code2 eCode2)
{
  signed int result; // eax@2

  if ( eCode2 == 1000 )
    result = 7;
  else
    result = eCode2 != 2000 ? 0 : 6;
  return result;
}

//----- (00641430) --------------------------------------------------------
void __thiscall Char::StopMove(Char *this, bool bAbstateTest)
{
  Char *v2; // esi@1
  unsigned int puiSecondCode; // [sp+4h] [bp-4h]@3

  v2 = this;
  if ( bAbstateTest != 1 || !this->m_kAbStateProperty.iUnMovableCount )
  {
    this->m_kMoveToTarget.vfptr->Stop((NpNs_MoveToTarget *)&this->m_kMoveToTarget);
    Char::GetAniCode(v2, 0, (unsigned int *)&bAbstateTest, &puiSecondCode);
    if ( bAbstateTest != 100000 && puiSecondCode != 100000 )
      ((void (__thiscall *)(_DWORD))v2->vfptr[10].DeleteAbStateByAbstateIndex)(v2);
  }
}

//----- (00641490) --------------------------------------------------------
void __thiscall Char::TestSetPos(Char *this, NiPoint3 *kPos)
{
  Char *v2; // edi@1

  v2 = this;
  this->m_kMoveToTarget.vfptr->Stop((NpNs_MoveToTarget *)&this->m_kMoveToTarget);
  v2->m_kMoveToTarget.vfptr->SetCurrentPos((NpNs_MoveToTarget *)&v2->m_kMoveToTarget, kPos);
  v2->m_spScene.m_pObject->m_kLocal.m_Translate = *kPos;
  v2->m_pos3CameraPos = *kPos;
}

//----- (00641500) --------------------------------------------------------
void __thiscall Char::StopMove(Char *this, float fXPos, float fYPos, bool bAbstateTest)
{
  Char *v4; // esi@1
  float v5; // eax@4
  float v6; // ecx@4
  NiPoint3 kPos; // [sp+14h] [bp-Ch]@3

  v4 = this;
  if ( bAbstateTest != 1 || !this->m_kAbStateProperty.iUnMovableCount )
  {
    this->m_kMoveToTarget.vfptr->Stop((NpNs_MoveToTarget *)&this->m_kMoveToTarget);
    if ( World::GetAdvGroundPos(&g_kWorld, fXPos, fYPos, &kPos) == 1 )
    {
      v4->m_kMoveToTarget.vfptr->SetCurrentPos((NpNs_MoveToTarget *)&v4->m_kMoveToTarget, &kPos);
      v4->m_spScene.m_pObject->m_kLocal.m_Translate = kPos;
      v5 = kPos.y;
      v6 = kPos.z;
      v4->m_pos3CameraPos.x = kPos.x;
      v4->m_pos3CameraPos.y = v5;
      v4->m_pos3CameraPos.z = v6;
    }
  }
}

//----- (006415A0) --------------------------------------------------------
void __thiscall Char::TurnToChar(Char *this, Char *pkChar)
{
  Char *v2; // esi@1
  NiPoint3 kMyPos; // [sp+8h] [bp-24h]@3
  NiPoint3 kDestPos; // [sp+14h] [bp-18h]@3
  NiPoint3 kDir; // [sp+20h] [bp-Ch]@3

  v2 = this;
  if ( pkChar )
  {
    if ( pkChar != this )
    {
      ((void (__stdcall *)(_DWORD))this->vfptr[6].SetAbStateProperty)(&kMyPos);
      ((void (__thiscall *)(_DWORD, _DWORD))pkChar->vfptr[6].SetAbStateProperty)(pkChar, &kDestPos);
      kDir.x = kDestPos.x - kMyPos.x;
      kDir.y = kDestPos.y - kMyPos.y;
      kDir.z = kDestPos.z - kMyPos.z;
      NiPoint3::Unitize(&kDir);
      NpNs_SmoothRotateControler::SetTargetDirection(&v2->m_kSmoothRotater, &kDir);
    }
  }
}

//----- (00641620) --------------------------------------------------------
void __thiscall Char::TurnToPosition(Char *this, NiPoint3 *kPos)
{
  Char *v2; // esi@1
  float v3; // edx@1
  float v4; // eax@1
  NiPoint3 kMyPos; // [sp+4h] [bp-24h]@1
  NiPoint3 kDir; // [sp+10h] [bp-18h]@1
  NiPoint3 kDestPos; // [sp+1Ch] [bp-Ch]@1

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->vfptr[6].SetAbStateProperty)(&kMyPos);
  v3 = kPos->y;
  v4 = kPos->z;
  kDestPos.x = kPos->x;
  kDestPos.y = v3;
  kDestPos.z = v4;
  kDir.x = kDestPos.x - kMyPos.x;
  kDir.y = v3 - kMyPos.y;
  kDir.z = v4 - kMyPos.z;
  NiPoint3::Unitize(&kDir);
  NpNs_SmoothRotateControler::SetTargetDirection(&v2->m_kSmoothRotater, &kDir);
}

//----- (00641690) --------------------------------------------------------
bool __thiscall Char::CheckExceptional3rdCode(Char *this, unsigned int eAniCode1, unsigned int eAniCode2, unsigned int *eResultAniCode3)
{
  Char *v4; // edi@1
  char v5; // bl@1
  char v6; // al@2
  bool result; // al@17
  unsigned int *v8; // eax@38
  bool v9; // zf@40
  unsigned int *v10; // eax@58
  bool v11; // zf@60
  unsigned int *v12; // esi@73
  int v13; // eax@77

  v4 = this;
  v5 = 0;
  switch ( this->m_kCharShape.m_kClassID )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      v6 = 1;
      break;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      v6 = 6;
      break;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      v6 = 11;
      break;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      v6 = 16;
      break;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      v6 = 21;
      break;
    case 0x1A:
    case 0x1B:
      v6 = 26;
      break;
    default:
      v6 = 0;
      break;
  }
  if ( eAniCode1 != 100000 && eAniCode1 != 200000 )
  {
    if ( eAniCode1 == 300000 )
    {
      if ( v6 == 1 )
      {
        if ( eAniCode2 == 1500 || eAniCode2 == 2500 || eAniCode2 == 3500 )
        {
          v5 = 1;
          if ( *eResultAniCode3 != 10 )
          {
            *eResultAniCode3 = 20;
            return 1;
          }
        }
      }
      else if ( v6 == 21 )
      {
        if ( eAniCode2 == 1500 || eAniCode2 == 2500 || eAniCode2 == 3500 )
        {
          *eResultAniCode3 = Char::GetWeaponType(this) != 18 ? 20 : 90;
          return 1;
        }
      }
      else if ( v6 == 26 && (eAniCode2 == 1500 || eAniCode2 == 2500 || eAniCode2 == 3500) )
      {
        v5 = 1;
        if ( Char::GetWeaponType(this) == 19 )
        {
          result = 1;
          *eResultAniCode3 = 20;
          return result;
        }
      }
    }
    return v5;
  }
  if ( v6 == 1 )
  {
    if ( (eAniCode1 == 100000 || eAniCode1 == 200000) && !*eResultAniCode3 && (eAniCode2 == 1000 || eAniCode2 == 2000) )
    {
      result = 1;
      *eResultAniCode3 = 10;
      return result;
    }
    return v5;
  }
  if ( v6 == 6 )
  {
    if ( eAniCode1 == 100000 )
    {
      v8 = eResultAniCode3;
      if ( *eResultAniCode3 )
        return v5;
      if ( eAniCode2 == 1000 )
      {
LABEL_45:
        *v8 = 10;
        return 1;
      }
      v9 = eAniCode2 == 2000;
    }
    else
    {
      if ( eAniCode1 != 200000 )
        return v5;
      v8 = eResultAniCode3;
      if ( *eResultAniCode3 )
        return v5;
      v9 = eAniCode2 == 1000;
    }
    if ( v9 )
      goto LABEL_45;
    return v5;
  }
  if ( v6 == 11 )
  {
    if ( eAniCode1 == 100000 )
    {
      if ( !*eResultAniCode3 && (eAniCode2 == 1000 || eAniCode2 == 2000) )
      {
        *eResultAniCode3 = 40;
        return 1;
      }
    }
    else if ( eAniCode1 == 200000 && !*eResultAniCode3 && eAniCode2 == 1000 )
    {
      *eResultAniCode3 = 30;
      return 1;
    }
    return v5;
  }
  if ( v6 == 16 )
  {
    if ( eAniCode1 == 100000 )
    {
      v10 = eResultAniCode3;
      if ( *eResultAniCode3 )
        return v5;
      if ( eAniCode2 == 1000 )
      {
LABEL_65:
        *v10 = 60;
        return 1;
      }
      v11 = eAniCode2 == 2000;
    }
    else
    {
      if ( eAniCode1 != 200000 )
        return v5;
      v10 = eResultAniCode3;
      if ( *eResultAniCode3 )
        return v5;
      v11 = eAniCode2 == 1000;
    }
    if ( !v11 )
      return v5;
    goto LABEL_65;
  }
  if ( v6 != 21 )
  {
    if ( v6 != 26 )
      return v5;
    if ( eAniCode1 == 100000 )
    {
      if ( eAniCode2 == 2000 )
      {
        *eResultAniCode3 = Char::GetWeaponType(this) != 19 ? 0 : 20;
        return 0;
      }
      goto LABEL_82;
    }
    if ( eAniCode1 != 200000 )
      return v5;
    v12 = eResultAniCode3;
    if ( *eResultAniCode3 )
      return v5;
    if ( eAniCode2 != 1000 )
    {
      v13 = Char::GetWeaponType(this) - 19;
LABEL_88:
      *v12 = v13 != 0 ? 0 : 20;
      return v5;
    }
    return 1;
  }
  if ( eAniCode1 != 100000 )
  {
    if ( eAniCode1 != 200000 )
      return v5;
    v12 = eResultAniCode3;
    if ( *eResultAniCode3 )
      return v5;
    if ( eAniCode2 != 1000 )
    {
      if ( Char::GetWeaponType(this) == 18 )
      {
        *eResultAniCode3 = 90;
        return 0;
      }
      v13 = Char::GetWeaponType(v4) - 17;
      goto LABEL_88;
    }
    return 1;
  }
  if ( eAniCode2 != 2000 )
  {
LABEL_82:
    result = 0;
    *eResultAniCode3 = 0;
    return result;
  }
  if ( Char::GetWeaponType(this) == 18 )
  {
    *eResultAniCode3 = 90;
    result = 0;
  }
  else
  {
    *eResultAniCode3 = Char::GetWeaponType(v4) != 17 ? 0 : 20;
    result = 0;
  }
  return result;
}

//----- (00641AE0) --------------------------------------------------------
bool __thiscall Char::IsDuringAction(Char *this)
{
  return this->m_kActionMgr.m_pkCurPlayActInfo != 0;
}

//----- (00641AF0) --------------------------------------------------------
ActiveSkillViewInfo *__thiscall Char::GetCurPlayActiiveSkillViewInfo(Char *this)
{
  return this->m_kActionMgr.m_pkCurPlaySkillViewInfo;
}

//----- (00641B00) --------------------------------------------------------
ActiveSkillInfo *__thiscall Char::GetCurPlayActiiveSkillInfo(Char *this)
{
  ActiveSkillViewInfo *v1; // eax@1
  int v2; // esi@2
  int v3; // edi@2
  ActiveSkillInfo *result; // eax@3
  int v5; // ecx@5

  v1 = this->m_kActionMgr.m_pkCurPlaySkillViewInfo;
  if ( v1 )
  {
    v2 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
    v3 = v1->ID;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                          + 16))(
                            ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                            v3)
      && (unsigned __int16)v3 <= *(_WORD *)(v2 + 200)
      && (v5 = *(_DWORD *)(v2 + 196), *(_DWORD *)(v5 + 4 * v3)) )
    {
      result = *(ActiveSkillInfo **)(v5 + 4 * v3);
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (00641B50) --------------------------------------------------------
ActionInfo *__thiscall Char::GetCurPlayActInfo(Char *this)
{
  return this->m_kActionMgr.m_pkCurPlayActInfo;
}

//----- (00641B60) --------------------------------------------------------
bool __thiscall Char::IsDuringSkillAction(Char *this)
{
  return this->m_kActionMgr.m_pkCurPlaySkillViewInfo != 0;
}

//----- (00641B70) --------------------------------------------------------
bool __thiscall Char::IsDuringSkillActionAndHitTimeNotPassed(Char *this)
{
  Char *v1; // esi@1

  v1 = this;
  return (unsigned __int8)((int (*)(void))this->vfptr[15].AddAbStateByAbstateIndex)()
      && (v1->m_uiSkillActStep != 6 || v1->m_lstfHitTime._Mysize);
}

//----- (00641BA0) --------------------------------------------------------
void __thiscall Char::ActStand(Char *this)
{
  Char *v1; // esi@1
  Char::StandMode v2; // eax@8

  v1 = this;
  if ( this->m_eEmotionState != 4 )
    ((void (__stdcall *)(_DWORD))this->vfptr[13].AddAbStateByAbstateIndex)(0);
  if ( !Char::IsResource(v1) && !JumpProcessor::IsJump(&v1->m_kJumpProcessor) && v1->m_byMode != 3 )
  {
    if ( Char::GetClass(v1) )
    {
      v2 = v1->m_eStandMode;
      v1->m_fAnimationSpeed = 1.0;
      if ( v2 )
      {
        if ( v2 == 1 )
          v1->vfptr[10].~AbStateInfectee((AbStateInfectee *)v1);
      }
      else
      {
        v1->vfptr[10].GetAbstateColor((AbStateInfectee *)v1);
      }
    }
    else
    {
      v1->vfptr[10].GetAbstateColor((AbStateInfectee *)v1);
    }
  }
}

//----- (00641C30) --------------------------------------------------------
void __thiscall Char::ActMove(Char *this)
{
  Char *v1; // esi@1
  void (__thiscall *v2)(AbStateInfectee *, AbStateInst *, bool); // edx@2
  Char::MoveMode v3; // eax@2
  void (__thiscall *v4)(Char *); // edx@4
  ActiveSkillInfo *v5; // eax@7

  v1 = this;
  if ( JumpProcessor::IsJump(&this->m_kJumpProcessor) )
    return;
  v2 = v1->vfptr[13].Deaffect;
  v1->m_fAnimationSpeed = 1.0;
  ((void (__thiscall *)(_DWORD))v2)(v1);
  v3 = v1->m_eMoveMode;
  if ( v3 == MOVE_MODE_WALK )
  {
    v4 = (void (__thiscall *)(Char *))v1->vfptr[11].SetAbStateProperty;
    goto LABEL_6;
  }
  if ( v3 == 1 )
  {
    v4 = (void (__thiscall *)(Char *))v1->vfptr[11].IsVisible;
LABEL_6:
    v4(v1);
  }
  v5 = Char::GetCurPlayActiiveSkillInfo(v1);
  if ( !v5 || !v5->IsMovingSkill )
    AttackSequenceManager::HardStopAttack((AttackSequenceManager *)&v1->vfptr);
}

//----- (00641CA0) --------------------------------------------------------
bool __thiscall Char::IsSkillCasRdyActExist(Char *this)
{
  ActiveSkillViewInfo *v1; // eax@1
  bool result; // al@2

  v1 = this->m_kActionMgr.m_pkCurPlaySkillViewInfo;
  if ( v1 )
    result = v1->CastingType != 0;
  else
    result = 0;
  return result;
}

//----- (00641CC0) --------------------------------------------------------
bool __thiscall Char::IsSkillShootActExist(Char *this)
{
  ActiveSkillViewInfo *v1; // eax@1
  bool result; // al@2

  v1 = this->m_kActionMgr.m_pkCurPlaySkillViewInfo;
  if ( v1 )
    result = v1->ActionType == 1;
  else
    result = 0;
  return result;
}

//----- (00641CE0) --------------------------------------------------------
bool __thiscall Char::IsActGathering(Char *this)
{
  ActionInfo *v1; // eax@1
  bool result; // al@2

  v1 = this->m_kActionMgr.m_pkCurPlayActInfo;
  if ( v1 )
    result = strcmp(v1->ActionName, "ActionCollect") == 0;
  else
    result = 0;
  return result;
}

//----- (00641D30) --------------------------------------------------------
bool __thiscall Char::IsBrokenResource(Char *this)
{
  NiActorManager *v1; // eax@1
  bool result; // al@2
  unsigned int v3; // eax@3

  v1 = this->m_spActor.m_pObject;
  result = 0;
  if ( v1 )
  {
    v3 = v1->m_eTargetID;
    if ( v3 == 300 || v3 == 400 )
      result = 1;
  }
  return result;
}

//----- (00641D60) --------------------------------------------------------
ActionInfo *__thiscall Char::GetActionInfo(Char *this, AniEventCode::Code1 eCode1, AniEventCode::Code2 eCode2)
{
  ActionInfoSet *v3; // ebx@1
  ActionInfo *result; // eax@2
  int v5; // eax@3
  unsigned int v6; // edx@3
  unsigned __int32 v7; // eax@3
  unsigned int v8; // ecx@3
  ActionInfo *v9; // esi@4

  v3 = this->m_kActionMgr.m_pkActInfoSet;
  if ( v3 )
  {
    v5 = ((int (__stdcall *)(AniEventCode::Code1, AniEventCode::Code2))this->vfptr[15].Affect)(eCode1, eCode2);
    v6 = v3->m_uiTotal;
    v7 = eCode2 + eCode1 + v5;
    v8 = 0;
    if ( v6 )
    {
      v9 = v3->m_pkInfo;
      while ( v7 != v9->uiEventCode )
      {
        ++v8;
        ++v9;
        if ( v8 >= v6 )
          goto LABEL_7;
      }
      result = v9;
    }
    else
    {
LABEL_7:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00641DD0) --------------------------------------------------------
bool __thiscall Char::IsActProducing(Char *this)
{
  ActionInfo *v1; // eax@1
  bool result; // al@2

  v1 = this->m_kActionMgr.m_pkCurPlayActInfo;
  if ( v1 )
    result = strcmp(v1->ActionName, "ActionProduct") == 0;
  else
    result = 0;
  return result;
}

//----- (00641E20) --------------------------------------------------------
bool __thiscall Char::IsActItemCasting(Char *this)
{
  ActionInfo *v1; // eax@1
  bool result; // al@2

  v1 = this->m_kActionMgr.m_pkCurPlayActInfo;
  if ( v1 )
    result = strcmp(v1->ActionName, ActionName::ITEM_CASTING) == 0;
  else
    result = 0;
  return result;
}

//----- (00641E70) --------------------------------------------------------
void __thiscall Char::ActEmotionIndex(Char *this, unsigned int uiEmotionIndex)
{
  Char *v2; // esi@1
  unsigned int v3; // edi@1
  unsigned int v4; // eax@6
  int v5; // edi@13
  int *v6; // eax@15
  int v7; // edi@16
  int v8; // eax@17
  void (__thiscall *v9)(AbStateInfectee *, ABSTATEINDEX, bool, int); // edx@18
  ActionViewInfo *v10; // eax@19
  NiActorManager *v11; // ecx@20
  void (__thiscall *v12)(AbStateInfectee *, ABSTATEINDEX, bool, int); // edx@22

  v2 = this;
  v3 = NiActorManager::INVALID_EVENT_CODE;
  if ( ((int (*)(void))this->vfptr[13].DeleteAbStateByAbstateIndex)() == 4 )
  {
    v4 = uiEmotionIndex;
  }
  else
  {
    if ( v2->m_uiLayerAniCode[1] != NiActorManager::INVALID_EVENT_CODE )
      v3 = v2->m_uiLayerAniCode[1];
    if ( v3 == NiActorManager::INVALID_EVENT_CODE )
    {
      v3 = v2->m_uiLayerAniCode[0];
      if ( v3 == NiActorManager::INVALID_EVENT_CODE )
        return;
    }
    v4 = 10000 * (v3 / 0x2710);
  }
  if ( (v4 == 100000 || v4 == 800000) && !JumpProcessor::IsJump(&v2->m_kJumpProcessor) )
  {
    if ( v2->m_eEmotionState == 2 )
    {
      ((void (__thiscall *)(Char *))v2->vfptr[13].Affect)(v2);
      return;
    }
    v5 = ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, unsigned int))(*(_DWORD *)ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable
                                                                   + 16))(
                            ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable,
                            uiEmotionIndex) )
    {
      if ( (unsigned __int16)uiEmotionIndex <= *(_WORD *)(v5 + 200) )
      {
        v6 = (int *)(*(_DWORD *)(v5 + 196) + 4 * (unsigned __int16)uiEmotionIndex);
        if ( *v6 )
        {
          v7 = *v6;
          if ( *v6 )
          {
            v8 = *(_WORD *)(v7 + 65);
            if ( (_WORD)v8 == -1 )
            {
LABEL_18:
              v9 = v2->vfptr[14].SetAbStateProperty;
              v2->m_uiEmotionIndex = uiEmotionIndex;
              ((void (__thiscall *)(Char *, _DWORD))v9)(v2, *(_DWORD *)(v7 + 105));
              return;
            }
            v10 = IIDTableBase<ActionViewInfo,ActionViewTable,unsigned short>::GetByID(v8);
            if ( v10 )
            {
              v11 = v2->m_spActor.m_pObject;
              if ( v11 )
              {
                if ( v10->nAfterCode == v11->m_eCurID )
                  goto LABEL_18;
                v12 = v2->vfptr[14].SetAbStateProperty;
                v2->m_uiEmotionIndex = v10->nIndex;
                ((void (__thiscall *)(Char *, unsigned int))v12)(v2, v10->nEventCode);
              }
            }
          }
        }
      }
    }
  }
}
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;

//----- (00641FB0) --------------------------------------------------------
void __thiscall Char::ActEmotionEventCode(Char *this, unsigned int uiEventCode)
{
  Char *v2; // esi@1
  void (__thiscall *v3)(AbStateInfectee *, ABSTATEINDEX, bool, int); // edx@2
  void (__thiscall *v4)(AbStateInfectee *, ABSTATEINDEX, bool, int); // edx@2

  v2 = this;
  if ( this->m_spActor.m_pObject )
  {
    ((void (*)(void))this->vfptr[13].Affect)();
    v3 = v2->vfptr[10].SetAbStateProperty;
    v2->m_eEmotionState = 1;
    v3((AbStateInfectee *)&v2->vfptr, (ABSTATEINDEX)uiEventCode, 0, 0);
    v4 = v2->vfptr[19].SetAbStateProperty;
    v2->m_uiCurEmotionCode = uiEventCode;
    ((void (__thiscall *)(_DWORD))v4)(v2);
    ActionMgr::CatchAEEff(&v2->m_kActionMgr, 0);
  }
}

//----- (00642010) --------------------------------------------------------
bool __thiscall Char::HaveCurrentSkillMoveAttrib(Char *this)
{
  ActiveSkillViewInfo *v1; // eax@1

  v1 = this->m_kActionMgr.m_pkCurPlaySkillViewInfo;
  return v1 && Skill::IsMovingSkill(v1->ID);
}

//----- (00642030) --------------------------------------------------------
void __thiscall Char::AdjustHeadWeightsValue(Char *this)
{
  Char *v1; // esi@1
  NiControllerSequence *v2; // ecx@5
  double v3; // st6@5
  double v4; // st2@8
  float v5; // ST04_4@13
  float v6; // ST04_4@19
  NiControllerSequence *v7; // ecx@21
  float v8; // ST04_4@21
  NiControllerSequence *v9; // ecx@23
  double v10; // st3@26
  float v11; // ST04_4@32
  double v12; // st7@35
  float v13; // ST04_4@38
  NiControllerSequence *v14; // ecx@40
  float v15; // ST04_4@40
  float v16; // [sp+4h] [bp-8h]@15
  float v17; // [sp+4h] [bp-8h]@34
  float fWeightDiff; // [sp+8h] [bp-4h]@7
  float fWeightDiffa; // [sp+8h] [bp-4h]@13
  float fWeightDiffb; // [sp+8h] [bp-4h]@25
  float fWeightDiffc; // [sp+8h] [bp-4h]@32

  v1 = this;
  if ( this->m_bEnabledHeadMovement )
  {
    if ( ((int (*)(void))this->vfptr[2].~AbStateInfectee)() <= 0 || v1->m_bWillDead )
    {
      v1->m_fTargetYawWeight = 0.5;
      v1->m_fTargetPitchWeight = 0.25;
    }
    v2 = v1->m_pkLeftSeq;
    v3 = 0.0;
    if ( v2 )
    {
      if ( v1->m_pkRightSeq )
      {
        fWeightDiff = v2->m_fSeqWeight;
        if ( fWeightDiff != v1->m_fTargetYawWeight )
        {
          v4 = 1.0;
          if ( v1->m_fTargetYawWeight <= 1.0 )
          {
            if ( v1->m_fTargetYawWeight < 0.0 )
              v1->m_fTargetYawWeight = 0.0;
            v4 = 1.0;
            v3 = 0.0;
          }
          else
          {
            v1->m_fTargetYawWeight = 1.0;
          }
          fWeightDiffa = v1->m_fTargetYawWeight - fWeightDiff;
          v5 = fabs(fWeightDiffa);
          if ( v5 < 0.0099999998 )
            fWeightDiffa = v3;
          v16 = fWeightDiffa * 0.006000000052154064 + v1->m_fTargetYawWeight;
          v1->m_fTargetYawWeight = v16;
          if ( v16 <= v4 )
          {
            if ( v16 < v3 )
              v1->m_fTargetYawWeight = v3;
          }
          else
          {
            v1->m_fTargetYawWeight = v4;
          }
          v6 = v1->m_fTargetYawWeight;
          v2->m_fSeqWeight = v6;
          if ( v6 < v3 )
            v2->m_fSeqWeight = v3;
          v7 = v1->m_pkRightSeq;
          v8 = 1.0 - v1->m_fTargetYawWeight;
          v7->m_fSeqWeight = v8;
          if ( v8 < v3 )
            v7->m_fSeqWeight = v3;
        }
      }
    }
    v9 = v1->m_pkUpSeq;
    if ( v9 )
    {
      if ( v1->m_pkDownSeq )
      {
        fWeightDiffb = v9->m_fSeqWeight;
        if ( fWeightDiffb != v1->m_fTargetPitchWeight )
        {
          v10 = 0.5;
          if ( v1->m_fTargetPitchWeight <= 0.5 )
          {
            if ( v3 > v1->m_fTargetPitchWeight )
              v1->m_fTargetPitchWeight = v3;
            v10 = 0.5;
          }
          else
          {
            v1->m_fTargetPitchWeight = 0.5;
          }
          fWeightDiffc = v1->m_fTargetPitchWeight - fWeightDiffb;
          v11 = fabs(fWeightDiffc);
          if ( v11 < 0.0099999998 )
            fWeightDiffc = v3;
          v17 = 0.006000000052154064 * fWeightDiffc + v1->m_fTargetPitchWeight;
          v1->m_fTargetPitchWeight = v17;
          if ( v17 <= v10 )
          {
            v12 = v3;
            if ( v3 > v17 )
              v1->m_fTargetPitchWeight = v3;
          }
          else
          {
            v12 = v3;
            v1->m_fTargetPitchWeight = v10;
          }
          v13 = v1->m_fTargetPitchWeight;
          v9->m_fSeqWeight = v13;
          if ( v13 < v12 )
            v9->m_fSeqWeight = v12;
          v14 = v1->m_pkDownSeq;
          v15 = 0.5 - v1->m_fTargetPitchWeight;
          v14->m_fSeqWeight = v15;
          if ( v15 < v12 )
            v14->m_fSeqWeight = v12;
        }
      }
    }
  }
}

//----- (006422D0) --------------------------------------------------------
bool __thiscall Char::IsActFlagCapture(Char *this)
{
  ActionInfo *v1; // eax@1
  bool result; // al@2

  v1 = this->m_kActionMgr.m_pkCurPlayActInfo;
  if ( v1 )
    result = strcmp(v1->ActionName, "ActionFlag") == 0;
  else
    result = 0;
  return result;
}

//----- (00642320) --------------------------------------------------------
bool __thiscall Char::IsActRunning(Char *this)
{
  ActionInfo *v1; // eax@1
  const char *v2; // esi@2
  bool result; // al@3

  v1 = this->m_kActionMgr.m_pkCurPlayActInfo;
  result = 0;
  if ( v1 )
  {
    v2 = v1->ActionName;
    if ( !strcmp(v1->ActionName, "Run_Bow")
      || !strcmp(v2, "Run_CBow")
      || !strcmp(v2, "Run_Non")
      || !strcmp(v2, "Run_Sp-Ham")
      || !strcmp(v2, "Run_One")
      || !strcmp(v2, "Run_Two")
      || !strcmp(v2, "Run_TwoHandAxe")
      || !strcmp(v2, "Run_TwoS")
      || !strcmp(v2, "Run_1Claw")
      || !strcmp(v2, "Run_1DSWord") )
    {
      result = 1;
    }
  }
  return result;
}

//----- (00642550) --------------------------------------------------------
unsigned int __thiscall Char::GetSpecialEventCode(Char *this)
{
  ActionInfoSet *v1; // ecx@1
  ActionInfo *v2; // eax@2
  unsigned int result; // eax@3

  v1 = this->m_kActionMgr.m_pkActInfoSet;
  if ( v1 && (v2 = ActionInfoSet::GetByInxName(v1, "JumpStand_JumpStart")) != 0 )
    result = v2->uiEventCode;
  else
    result = 0;
  return result;
}

//----- (00642580) --------------------------------------------------------
signed int __stdcall Char::GetCharAniType(AniEventCode::Code1 eCode1, AniEventCode::Code2 eCode2)
{
  signed int result; // eax@6

  if ( (signed int)eCode1 > 400000 )
  {
    if ( eCode1 == 500000 )
    {
      result = 8;
    }
    else
    {
      if ( eCode1 != 600000 )
        return 0;
      result = 9;
    }
  }
  else
  {
    if ( eCode1 != 400000 )
    {
      if ( eCode1 == 100000 )
        return 1;
      if ( eCode1 == 200000 )
        return Char::GetMoveCharAniType(eCode2);
      if ( eCode1 == 300000 )
        return 5;
      return 0;
    }
    if ( eCode2 == 1000 )
      result = 7;
    else
      result = eCode2 != 2000 ? 0 : 6;
  }
  return result;
}

//----- (00642610) --------------------------------------------------------
unsigned int __thiscall Char::Get3thAniEventCode(Char *this, unsigned int eAniCode1, unsigned int eAniCode2)
{
  Char *v3; // edi@1
  bool v5; // zf@10
  unsigned int uiEventCode; // [sp+4h] [bp-4h]@3

  v3 = this;
  if ( !Char::GetClass(this) )
    return 0;
  uiEventCode = 0;
  if ( eAniCode1 > 0x7A120 )
  {
    if ( eAniCode1 > 0xC3500 )
    {
      v5 = eAniCode1 == 900000;
      goto LABEL_18;
    }
    if ( eAniCode1 != 800000 )
    {
      if ( eAniCode1 != 600000 && eAniCode1 != 700000 )
        goto LABEL_20;
      if ( eAniCode2 != 9000 )
      {
        uiEventCode = CharShape::Get3thAniEventCodeByWeapon(&v3->m_kCharShape);
        goto LABEL_20;
      }
    }
LABEL_19:
    uiEventCode = 0;
    goto LABEL_20;
  }
  if ( eAniCode1 == 500000 )
    goto LABEL_19;
  if ( eAniCode1 <= 0x493E0 )
  {
    if ( eAniCode1 == 300000 || eAniCode1 == 100000 || eAniCode1 == 200000 )
      uiEventCode = CharShape::Get3thAniEventCodeByWeapon(&v3->m_kCharShape);
    goto LABEL_20;
  }
  v5 = eAniCode1 == 400000;
LABEL_18:
  if ( v5 )
    goto LABEL_19;
LABEL_20:
  if ( v3->m_bPolymorph )
    uiEventCode = 0;
  Char::CheckExceptional3rdCode(v3, eAniCode1, eAniCode2, &uiEventCode);
  return uiEventCode;
}

//----- (006426E0) --------------------------------------------------------
char __thiscall Char::ActJump(Char *this)
{
  Char *v1; // esi@1
  char result; // al@6
  float v3; // ST14_4@10
  int v4; // eax@10
  _BYTE v5[12]; // ST04_12@10

  v1 = this;
  if ( AbStateInfectee::FindNomalAbstate((AbStateInfectee *)&this->vfptr, STA_PARALYSIS)
    || AbStateInfectee::IsInList((AbStateInfectee *)&v1->vfptr, SAA_STOPANI) )
  {
    return 1;
  }
  if ( (unsigned __int8)((int (__thiscall *)(Char *))v1->vfptr[15].Deaffect)(v1) )
  {
    if ( v1->m_kRidePetCtl.m_spPetActor.m_pObject )
    {
      CRidePetCtl::SpecialAction(&v1->m_kRidePetCtl);
      return 1;
    }
    if ( !v1->m_pkMover || v1->m_uiMoverSlot )
      return 1;
    ((void (*)(void))v1->m_pkMover->vfptr[11].Deaffect)();
    result = 1;
  }
  else
  {
    ((void (__thiscall *)(Char *))v1->vfptr[13].Deaffect)(v1);
    ((void (__thiscall *)(Char *))v1->vfptr[10].DeleteAbStateByAbstateIndex)(v1);
    v3 = Timer::ms_fCurTime;
    v4 = ((int (__thiscall *)(Char *))v1->vfptr[6].Deaffect)(v1);
    *(_DWORD *)v5 = *(_DWORD *)v4;
    *(_QWORD *)&v5[4] = *(_QWORD *)(v4 + 4);
    result = JumpProcessor::Jump(&v1->m_kJumpProcessor, v3, *(NiPoint3 *)v5);
  }
  return result;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006427B0) --------------------------------------------------------
void __thiscall Char::ResetAction(Char *this)
{
  this->m_kActionMgr.m_pkCurPlayActInfo = 0;
  *(_WORD *)&this->m_kActionMgr.m_abActionEff[0] = 0;
  this->m_kActionMgr.m_abActionEff[2] = 0;
  *(_WORD *)&this->m_kActionMgr.m_abActionSnd[0] = 0;
  this->m_bActionHit = 0;
}

//----- (006427E0) --------------------------------------------------------
void __thiscall Char::ResetSkillAction(Char *this)
{
  Char *v1; // esi@1
  unsigned int v2; // ecx@1
  unsigned int v3; // eax@2
  NiVBSet *val; // [sp+8h] [bp-4h]@4

  v1 = this;
  v2 = this->m_uiLayerAniCode[1];
  if ( v2 != NiActorManager::INVALID_EVENT_CODE )
  {
    v3 = 10000 * (v2 / 0x2710);
    if ( (v3 == 600000 || v3 == 700000)
      && NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
           (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v1->m_spActor.m_pObject->m_kSequenceMap,
           v2,
           &val)
      && val
      && val[1].m_uiFlags == 1 )
    {
      NiActorManager::DeactivateSequence(v1->m_spActor.m_pObject, v1->m_uiLayerAniCode[1], 0.0);
      v1->m_uiLayerAniCode[1] = NiActorManager::INVALID_EVENT_CODE;
    }
  }
  v1->m_uiSkillActStep = 0;
  v1->m_kActionMgr.m_pkCurPlaySkillViewInfo = 0;
  v1->m_bReserveSkillSmash = 0;
  Char::ResetSkillTargetGroundPoint(v1);
}

//----- (00642890) --------------------------------------------------------
char __thiscall Char::ActAction(Char *this, char *pcActInxName, eActionWeight eActWeight)
{
  Char *v3; // esi@1
  int v5; // ecx@3
  ItemInfo *v6; // eax@3
  ActionInfoSet *v7; // edi@3
  ItemInfo *v8; // ebx@3
  ActionInfoSet *v9; // ecx@5
  bool v10; // al@8
  ActionInfo *v11; // edi@11
  ActionInfoSet *v12; // ecx@13
  ActionInfo *v13; // eax@14
  bool v14; // zf@17
  AbStateInfecteeVtbl *v15; // eax@17
  bool v16; // [sp+Ch] [bp-14h]@6
  ActionMgr *v17; // [sp+1Ch] [bp-4h]@3

  v3 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[1].AddAbStateByAbstateIndex)() == 1 )
    return 0;
  v5 = (int)&v3->m_kActionMgr;
  *(_DWORD *)(v5 + 20) = 0;
  *(_WORD *)(v5 + 76) = 0;
  *(_BYTE *)(v5 + 78) = 0;
  *(_WORD *)(v5 + 79) = 0;
  v17 = &v3->m_kActionMgr;
  v3->m_bActionHit = 0;
  v6 = Char::GetEquippedWeaponItemInfo(v3);
  v7 = v3->m_kActionMgr.m_pkActInfoSet;
  v8 = v6;
  if ( !v7 )
    return 0;
  if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v3->vfptr[20].Deaffect)(v3) )
  {
    v9 = v3->m_kActionMgr_Metamor.m_pkActInfoSet;
    if ( !v9 )
      return 0;
    v16 = 1;
  }
  else
  {
    if ( v3->m_bUserCharacter || (v10 = Char::IsCharMob(v3)) != 0 )
      v10 = 1;
    v16 = v10;
    v9 = v7;
  }
  v11 = ActionInfoSet::GetProperActionInfo(v9, pcActInxName, v8, v16);
  if ( !v11 )
    return 0;
  v12 = v3->m_kActionMgr.m_pkActInfoSet;
  if ( v12 )
  {
    v13 = ActionInfoSet::GetByEventCode(v12, v3->m_spActor.m_pObject->m_eTargetID);
    if ( v13 )
    {
      if ( v13->InxName[0] == 38 )
        ((void (__thiscall *)(_DWORD))v3->vfptr[10].DeleteAbStateByAbstateIndex)(v3);
    }
  }
  v14 = strcmp(pcActInxName, "ActionCollect") == 0;
  v15 = v3->vfptr;
  if ( v14 )
  {
    v15[10].SetAbStateProperty((AbStateInfectee *)v3, (ABSTATEINDEX)v11->uiEventCode, 0, 1);
  }
  else if ( eActWeight )
  {
    if ( !(unsigned __int8)((int (__thiscall *)(_DWORD))v15[7].GetAbstateColor)(v3)
      && (unsigned __int8)((int (__thiscall *)(_DWORD))v3->vfptr[8].Affect)(v3) == 1 )
    {
      ((void (__thiscall *)(_DWORD, _DWORD))v3->vfptr[11].Affect)(v3, 0.0);
    }
    ((void (__thiscall *)(_DWORD, _DWORD))v3->vfptr[10].IsVisible)(v3, v11->uiEventCode);
  }
  else
  {
    v15[10].SetAbStateProperty((AbStateInfectee *)v3, (ABSTATEINDEX)v11->uiEventCode, 0, 0);
  }
  ActionMgr::SetCurPlayActInfo(v17, v11);
  ActionMgr::SetActionStartTime(v17, Timer::ms_fCurTime);
  ActionMgr::CatchAEEff(v17, 1);
  return 1;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00642A30) --------------------------------------------------------
char __thiscall Char::ActNonWeightAction(Char *this, unsigned int dwAniCode)
{
  char result; // al@2

  this->m_kActionMgr.m_pkCurPlayActInfo = 0;
  *(_WORD *)&this->m_kActionMgr.m_abActionEff[0] = 0;
  this->m_kActionMgr.m_abActionEff[2] = 0;
  *(_WORD *)&this->m_kActionMgr.m_abActionSnd[0] = 0;
  this->m_bActionHit = 0;
  if ( this->m_spActor.m_pObject )
  {
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))this->vfptr[10].SetAbStateProperty)(dwAniCode, 0, 0);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00642A80) --------------------------------------------------------
void __thiscall Char::UpdateAction(Char *this, float fTime)
{
  Char *v2; // esi@1
  ActiveSkillInfo *v3; // eax@2
  NiNode *v4; // eax@4
  NiActorManager *v5; // eax@7
  float v6; // ST20_4@8
  ActionInfo *v7; // eax@14
  unsigned int v8; // ebx@15
  ActionInfoSet *v9; // edi@20
  int v10; // edi@26
  int v11; // ebx@26
  int *v12; // eax@28
  int v13; // edi@29
  NiActorManager *v14; // ebx@34
  bool v15; // dl@36
  NiAVObject *v16; // ecx@36
  NiAVObject *v17; // ecx@40
  Char *pkTargetChar; // [sp+10h] [bp-8h]@13
  float fLastTime; // [sp+14h] [bp-4h]@35

  v2 = this;
  if ( this->m_bSS_Hide == 1 )
  {
    v3 = Char::GetCurPlayActiiveSkillInfo(this);
    if ( !v3 || v3->SpecialIndexB != 67 )
    {
      v2->m_bCulledOld = v2->m_bCulled;
      v4 = v2->m_spScene.m_pObject;
      v2->m_bSS_Hide = 0;
      v2->m_bCulled = 0;
      v4->m_uFlags &= 0xFFFEu;
      v2->m_kSkillID = -1;
    }
  }
  if ( v2->m_bDoorAnimation )
  {
    if ( v2->m_bIsDoor )
    {
      v5 = Char::GetNowSequence(v2);
      if ( v5 )
      {
        v6 = (v5->m_fTransStartTime - *(float *)&v5->m_eTransitionState) / *(float *)&v5->m_bBuildTimeline;
        if ( v6 < (double)v5->m_fTransEndTime )
        {
          if ( v2->m_eDoorState )
            Char::CloseDoor(v2);
          else
            Char::OpenDoor(v2);
          v2->m_bDoorAnimation = 0;
        }
      }
    }
  }
  pkTargetChar = CharMgr::GetChar(&g_kCharMgr, v2->m_AttackTargetHandle);
  ((void (__thiscall *)(ActionMgr *, Char *))v2->m_kRidePetAction.vfptr[1].EndOfSequence)(
    &v2->m_kRidePetAction,
    pkTargetChar);
  ((void (__thiscall *)(ActionMgr *, Char *))v2->m_kActionMgr.vfptr[1].EndOfSequence)(&v2->m_kActionMgr, pkTargetChar);
  if ( ((int (__thiscall *)(Char *))v2->vfptr[13].DeleteAbStateByAbstateIndex)(v2) == 4 )
  {
    v8 = NiActorManager::INVALID_EVENT_CODE;
    if ( ((int (__thiscall *)(Char *))v2->vfptr[13].DeleteAbStateByAbstateIndex)(v2) == 4 )
      goto LABEL_45;
    if ( v2->m_uiLayerAniCode[1] != NiActorManager::INVALID_EVENT_CODE )
      v8 = v2->m_uiLayerAniCode[1];
    if ( v8 == NiActorManager::INVALID_EVENT_CODE )
LABEL_45:
      v8 = v2->m_uiLayerAniCode[0];
    v9 = v2->m_kActionMgr.m_pkActInfoSet;
    if ( v9 )
      v7 = ActionInfoSet::GetByEventCode(v9, v8);
    else
      v7 = 0;
    v2->m_AttackTargetHandle = v2->m_kHandle;
  }
  else
  {
    v7 = v2->m_kActionMgr.m_pkCurPlayActInfo;
  }
  if ( v7 && v2->m_spActor.m_pObject )
  {
    v10 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
    v11 = v2->m_kSkillID;
    if ( !(unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                           + 16))(
                             ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                             v11)
      || (unsigned __int16)v11 > *(_WORD *)(v10 + 200)
      || (v12 = (int *)(*(_DWORD *)(v10 + 196) + 4 * v11), !*v12)
      || (v13 = *v12) == 0
      || *(_DWORD *)(v13 + 539) != 67 )
    {
LABEL_41:
      if ( !pkTargetChar )
        v2->m_AttackTargetHandle = -1;
      return;
    }
    if ( -1 == v2->m_AttackTargetHandle )
      v2->m_AttackTargetHandle = v2->m_kHandle;
    if ( CharMgr::GetChar(&g_kCharMgr, v2->m_AttackTargetHandle) )
    {
      v14 = Char::GetNowSequence(v2);
      if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
      {
        fLastTime = *(float *)&v14->m_pcTargetKey;
        if ( (double)*(unsigned int *)(v13 + 551) / 1000.0 <= fLastTime )
        {
          v15 = v2->m_bCulled;
          v16 = (NiAVObject *)&v2->m_spScene.m_pObject->vfptr;
          v2->m_bSS_Hide = 1;
          v2->m_bCulledOld = v15;
          v2->m_bCulled = 1;
          NiAVObject::SetAppCulled(v16, 1);
        }
        if ( (double)*(unsigned int *)(v13 + 543) / 1000.0 <= fLastTime )
          ((void (__thiscall *)(Char *, unsigned int, unsigned int, _DWORD))v2->vfptr[9].~AbStateInfectee)(
            v2,
            v2->m_kTo.x,
            v2->m_kTo.y,
            v2->m_kSkillID);
        if ( (double)*(unsigned int *)(v13 + 559) / 1000.0 <= fLastTime )
        {
          v2->m_bCulledOld = v2->m_bCulled;
          v17 = (NiAVObject *)&v2->m_spScene.m_pObject->vfptr;
          v2->m_bSS_Hide = 0;
          v2->m_bCulled = 0;
          NiAVObject::SetAppCulled(v17, 0);
          v2->m_kSkillID = -1;
        }
        goto LABEL_41;
      }
    }
  }
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (00642DC0) --------------------------------------------------------
void __thiscall Char::ActGathering(Char *this, Char *pkTargetChar, int id)
{
  Char *v3; // esi@1
  unsigned __int16 v4; // ax@5
  unsigned __int16 v5; // ax@7

  v3 = this;
  if ( pkTargetChar )
  {
    if ( pkTargetChar != this )
      ((void (__stdcall *)(_DWORD))this->vfptr[8].~AbStateInfectee)(pkTargetChar);
    if ( v3->m_kTargetResourceHandle != -1 )
    {
      CharShape::UnEquip(&v3->m_kCharShape, 0xAu);
      CharShape::UnEquip(&v3->m_kCharShape, 0xCu);
      v4 = v3->m_kEquippedBackup.kCase1.kPrevRightHandEquipItemID;
      if ( v4 != -1 )
      {
        CharShape::Equip(&v3->m_kCharShape, v4, v3->m_kEquippedBackup.kCase1.byPrevRightHandUpgrade);
        v3->m_kEquippedBackup.kCase1.kPrevRightHandEquipItemID = -1;
      }
      v5 = v3->m_kEquippedBackup.kCase1.kPrevLeftHandEquipItemID;
      if ( v5 != -1 )
      {
        CharShape::Equip(&v3->m_kCharShape, v5, v3->m_kEquippedBackup.kCase1.byPrevLeftHandUpgrade);
        v3->m_kEquippedBackup.kCase1.kPrevLeftHandEquipItemID = -1;
      }
      if ( v3->m_kEquippedBackup.kCase1.kPrevRightHandAccItemID != -1 )
      {
        CharShape::Equip(&v3->m_kCharShape, v3->m_kEquippedBackup.kCase1.kPrevRightHandAccItemID);
        v3->m_kEquippedBackup.kCase1.kPrevRightHandEquipItemID = -1;
      }
      if ( v3->m_kEquippedBackup.kCase1.kPrevLeftHandAccItemID != -1 )
      {
        CharShape::Equip(&v3->m_kCharShape, v3->m_kEquippedBackup.kCase1.kPrevLeftHandEquipItemID);
        v3->m_kEquippedBackup.kCase1.kPrevLeftHandAccItemID = -1;
      }
    }
    v3->m_kEquippedBackup.kCase1.kPrevRightHandEquipItemID = CharShape::GetRightHandEquipppedItemID(
                                                               &v3->m_kCharShape,
                                                               &v3->m_kEquippedBackup.kCase1.byPrevRightHandUpgrade);
    v3->m_kEquippedBackup.kCase1.kPrevLeftHandEquipItemID = CharShape::GetLeftHandEquippedItemID(
                                                              &v3->m_kCharShape,
                                                              &v3->m_kEquippedBackup.kCase1.byPrevLeftHandUpgrade);
    v3->m_kEquippedBackup.kCase1.kPrevRightHandAccItemID = CharShape::GetRightHandAccItemID(&v3->m_kCharShape);
    v3->m_kEquippedBackup.kCase1.kPrevLeftHandAccItemID = CharShape::GetLeftHandAccItemID(&v3->m_kCharShape);
    v3->m_kEquippedBackup.kCase1.kPrevShieldAccItemID = CharShape::GetCosShieldItemID(&v3->m_kCharShape);
    v3->m_kEquippedBackup.iBackupCase = 1;
    *(_WORD *)&v3->m_kEquippedBackup.bUnEquipLeftHand = 257;
    CharShape::UnEquip(&v3->m_kCharShape, 0xAu);
    CharShape::UnEquip(&v3->m_kCharShape, 0xCu);
    *(_WORD *)&v3->m_kEquippedBackup.bUnEquipLeftHandAcc = 257;
    v3->m_kEquippedBackup.bUnEquipShieldAcc = 1;
    CharShape::UnEquip(&v3->m_kCharShape, 0xBu);
    CharShape::UnEquip(&v3->m_kCharShape, 0xDu);
    CharShape::Equip(&v3->m_kCharShape, id);
    CharShape::UnEquip(&v3->m_kCharShape, 0x1Du);
    Char::ActAction(v3, "ActionCollect", 0);
    ((void (__stdcall *)(_DWORD))v3->vfptr->SetAnimationSpeed)(1.0);
    v3->m_kTargetResourceHandle = pkTargetChar->m_kHandle;
  }
}

//----- (00642FE0) --------------------------------------------------------
void __thiscall Char::ActProducing(Char *this)
{
  Char *v1; // esi@1

  v1 = this;
  Char::ActAction(this, "ActionProduct", 0);
  ((void (__stdcall *)(_DWORD))v1->vfptr->SetAnimationSpeed)(1.0);
}

//----- (00643010) --------------------------------------------------------
void __thiscall Char::ActItemCasting(Char *this)
{
  Char *v1; // esi@1

  v1 = this;
  Char::ActAction(this, ActionName::ITEM_CASTING, 0);
  ((void (__stdcall *)(_DWORD))v1->vfptr->SetAnimationSpeed)(1.0);
}

//----- (00643040) --------------------------------------------------------
NiActorManager *__thiscall Char::GetSequence(Char *this, unsigned int uiAniEventCode)
{
  Char *v2; // esi@1
  NiActorManager *result; // eax@1
  unsigned int v4; // edi@2
  char v5; // ST04_1@5
  char v6; // al@5
  NiControllerSequence *v7; // eax@5
  char v8; // al@7

  v2 = this;
  result = this->m_spActor.m_pObject;
  if ( result )
  {
    v4 = uiAniEventCode;
    if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
           (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&result->m_kSequenceMap,
           uiAniEventCode,
           (NiVBSet **)&uiAniEventCode)
      && uiAniEventCode
      || (unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[20].Deaffect)(v2) )
    {
      goto LABEL_7;
    }
    LOBYTE(uiAniEventCode) = v2->m_kCharShape.m_byGender;
    v5 = uiAniEventCode;
    v6 = Char::GetClass(v2);
    v7 = CharResMgr::GetControllerSequence(&g_kCharResMgr, v6, v5, v4);
    if ( v7 )
    {
      NiActorManager::ChangeSequence(v2->m_spActor.m_pObject, v4, v7);
LABEL_7:
      v8 = NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
             (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v2->m_spActor.m_pObject->m_kSequenceMap,
             v4,
             (NiVBSet **)&uiAniEventCode);
      return (NiActorManager *)(v8 != 0 ? uiAniEventCode : 0);
    }
    result = 0;
  }
  return result;
}

//----- (006430E0) --------------------------------------------------------
char __thiscall Char::ResetPosEmotion(Char *this, float fResetTime)
{
  Char *v2; // esi@1
  NiActorManager *v3; // edi@1
  char result; // al@2
  void (__thiscall *v5)(AbStateInfectee *, ABSTATEINDEX, bool, int); // edx@4
  unsigned int v6; // ST04_4@4

  v2 = this;
  v3 = Char::GetSequence(this, this->m_uiCurEmotionCode);
  if ( v3 && v2->m_spActor.m_pObject )
  {
    v5 = v2->vfptr[10].SetAbStateProperty;
    v6 = v2->m_uiCurEmotionCode;
    v2->m_eEmotionState = 2;
    v5((AbStateInfectee *)&v2->vfptr, (ABSTATEINDEX)v6, 0, 0);
    ((void (__stdcall *)(_DWORD))v2->vfptr->SetAnimationSpeed)(0.0);
    result = 1;
    *(float *)&v3->m_eNextID = fResetTime - v2->m_fAnimationUpdateTime;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00643150) --------------------------------------------------------
void __usercall Char::CheckStateInNoMovement(Char *this@<ecx>, int a2@<ebx>)
{
  Char *v2; // esi@1
  unsigned int v3; // edi@14
  unsigned int v4; // edi@19
  bool v5; // zf@33
  unsigned int ui2ndBaseCode; // [sp+4h] [bp-8h]@21
  unsigned int ui1stBaseCode; // [sp+8h] [bp-4h]@22

  v2 = this;
  if ( Char::IsResource(this) )
    return;
  if ( unk_B25074 == 7 )
  {
    if ( Char::IsCharNPC(v2) && (unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[15].SetAbStateProperty)(v2) )
      ((void (__thiscall *)(_DWORD))v2->vfptr[10].DeleteAbStateByAbstateIndex)(v2);
  }
  else if ( Char::IsCharNPC(v2) )
  {
    return;
  }
  if ( Char::IsActGathering(v2)
    || Char::IsActProducing(v2)
    || Char::IsActItemCasting(v2)
    || Char::IsActFlagCapture(v2)
    || (unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[7].GetAbstateColor)(v2)
    || !(unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[8].Affect)(v2) )
  {
    return;
  }
  v3 = NiActorManager::INVALID_EVENT_CODE;
  if ( ((int (__thiscall *)(_DWORD))v2->vfptr[13].DeleteAbStateByAbstateIndex)(v2) == 4 )
  {
    v4 = ui2ndBaseCode;
  }
  else
  {
    if ( v2->m_uiLayerAniCode[1] != NiActorManager::INVALID_EVENT_CODE )
      v3 = v2->m_uiLayerAniCode[1];
    if ( v3 != NiActorManager::INVALID_EVENT_CODE
      || (v3 = v2->m_uiLayerAniCode[0], v3 != NiActorManager::INVALID_EVENT_CODE) )
    {
      v4 = 10000 * (v3 / 0x2710);
    }
    else
    {
      v4 = -1;
    }
  }
  Char::GetAniCode(v2, 1, &ui1stBaseCode, &ui2ndBaseCode);
  if ( ui1stBaseCode == 500000 || v4 == 910000 )
    return;
  if ( ui1stBaseCode == 200000 )
  {
LABEL_40:
    ((void (__thiscall *)(_DWORD))v2->vfptr[10].DeleteAbStateByAbstateIndex)(v2);
    return;
  }
  if ( ui1stBaseCode == 100000 )
  {
    if ( v4 == 600000 || v4 == 700000 )
      return;
    if ( ui2ndBaseCode != 3000 && ui2ndBaseCode != 4000 )
    {
      v5 = ui2ndBaseCode == 5000;
      goto LABEL_39;
    }
    goto LABEL_40;
  }
  if ( v4 == ui1stBaseCode
    && (unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[15].SetAbStateProperty)(v2)
    && !v2->m_kAttSeqList.m_kAllocator.m_uiCount
    && v2->m_eEmotionState == EMOTION_NONE
    && !v2->m_uiSkillActStep )
  {
    if ( !(unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[1].Affect)(v2) )
      Char::UpdateWeaponEquipState(v2, a2);
    v5 = Char::IsAbStateAction(v2) == 0;
LABEL_39:
    if ( !v5 )
      return;
    goto LABEL_40;
  }
}

//----- (00643320) --------------------------------------------------------
void __thiscall Char::ActFlagCapture(Char *this)
{
  Char *v1; // esi@1

  v1 = this;
  Char::ActAction(this, "ActionFlag", 0);
  ((void (__stdcall *)(_DWORD))v1->vfptr->SetAnimationSpeed)(1.0);
}

//----- (00643350) --------------------------------------------------------
char __thiscall Char::ActBlendAction(Char *this, unsigned int uiBaseEventCode, unsigned int uiBlendEventCode)
{
  Char *v3; // esi@1
  char result; // al@2
  NiActorManager *v5; // ebx@4
  unsigned int v6; // edi@6
  NiActorManager *v7; // eax@9
  unsigned int v8; // eax@11
  unsigned int v9; // eax@17
  unsigned int uiBaseEventCodea; // [sp+1Ch] [bp+8h]@22
  NiControllerSequence *pSequence2; // [sp+20h] [bp+Ch]@11

  v3 = this;
  this->m_kActionMgr.m_pkCurPlayActInfo = 0;
  *(_WORD *)&this->m_kActionMgr.m_abActionEff[0] = 0;
  this->m_kActionMgr.m_abActionEff[2] = 0;
  *(_WORD *)&this->m_kActionMgr.m_abActionSnd[0] = 0;
  this->m_bActionHit = 0;
  if ( !this->m_spActor.m_pObject || this->m_bWillDead )
  {
    result = 0;
  }
  else
  {
    v5 = Char::GetSequence(this, uiBaseEventCode);
    if ( v5 )
    {
      v6 = uiBlendEventCode;
      if ( uiBlendEventCode && uiBlendEventCode != 1 && uiBlendEventCode != NiActorManager::INVALID_EVENT_CODE )
        v7 = Char::GetSequence(v3, uiBlendEventCode);
      else
        v7 = Char::GetSequence(v3, v3->m_uiLayerAniCode[1]);
      pSequence2 = (NiControllerSequence *)v7;
      v8 = v3->m_uiLayerAniCode[1];
      if ( v8 != NiActorManager::INVALID_EVENT_CODE )
        NiActorManager::DeactivateSequence(v3->m_spActor.m_pObject, v8, 0.0);
      if ( v6 )
      {
        if ( v6 == 1 )
          v3->m_uiLayerAniCode[1] = NiActorManager::INVALID_EVENT_CODE;
        else
          v3->m_uiLayerAniCode[1] = v6;
      }
      v9 = v3->m_uiLayerAniCode[1];
      if ( v9 != NiActorManager::INVALID_EVENT_CODE
        && NiActorManager::ActivateSequence(
             v3->m_spActor.m_pObject,
             v9,
             1,
             1,
             1.0,
             0.0,
             NiKFMTool::SYNC_SEQUENCE_ID_NONE) )
      {
        pSequence2->m_fBeginKeyTime = 0.0;
      }
      if ( uiBaseEventCode == v3->m_uiLayerAniCode[0] )
      {
        *(float *)&uiBaseEventCodea = (v5->m_fTransStartTime - *(float *)&v5->m_eTransitionState)
                                    / *(float *)&v5->m_bBuildTimeline;
        if ( *(float *)&uiBaseEventCodea < (double)v5->m_fTransEndTime )
        {
          if ( LODWORD(v5->m_fTimelineRefreshTime) )
            ((void (__stdcall *)(_DWORD))v3->vfptr->SetAnimationOffset)(0.0);
        }
        result = 1;
      }
      else
      {
        v3->vfptr[10].SetAbStateProperty((AbStateInfectee *)v3, (ABSTATEINDEX)uiBaseEventCode, 0, 0);
        result = 1;
      }
    }
    else
    {
      result = 0;
    }
  }
  return result;
}

//----- (006434C0) --------------------------------------------------------
void __thiscall Char::SetDoorAnimation(Char *this, float fTime, Char::DoorState eState)
{
  Char *v3; // esi@1
  signed int v4; // eax@1
  char v5; // al@3

  v3 = this;
  v4 = 20;
  this->m_eDoorState = eState;
  if ( eState == 1 )
    v4 = 30;
  v5 = ((int (__stdcall *)(int, _DWORD, _DWORD))this->vfptr[10].SetAbStateProperty)(v4 + 906000, 0, 0);
  v3->m_bDoorAnimation = v5;
  if ( v5 )
  {
    ActionMgr::SetActionStartTime(&v3->m_kActionMgr, fTime);
  }
  else if ( eState == 1 )
  {
    Char::CloseDoor(v3);
  }
}

//----- (00643530) --------------------------------------------------------
unsigned int __thiscall Char::GetConditionAni(Char *this, CharAniType eType)
{
  MobInfo *v2; // edx@1
  unsigned int result; // eax@2

  v2 = this->m_pMobinfo;
  if ( v2 )
  {
    if ( eType && this->m_uiConditionAniLevel )
      result = MobConditionViewTab::GetEventCode(v2->InxName, eType, this->m_uiConditionAniLevel);
    else
      result = 0;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00643570) --------------------------------------------------------
void __thiscall Char::GetoutOfPet(Char *this)
{
  Char *v1; // esi@1
  unsigned int v2; // eax@2
  RIDING *v3; // eax@2
  const char *v4; // eax@3
  ActionInfoSet *v5; // ecx@4
  unsigned int v6; // edi@4
  ActionInfo *v7; // eax@5
  NiActorManager *v8; // ecx@7
  NiActorManager *v9; // edi@9
  NiNode *v10; // ecx@14
  NiNode *v11; // eax@14
  AbStateInfecteeVtbl *v12; // eax@14
  bool v13; // zf@14
  AbStateInfecteeVtbl *v14; // eax@14

  v1 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[15].Deaffect)() )
  {
    v2 = CharShape::GetRidePetID(&v1->m_kCharShape);
    v3 = RidePetTable::GetByID(v2);
    if ( v3 )
    {
      v4 = v3->BodyType;
      if ( v4 )
      {
        v5 = v1->m_kActionMgr.m_pkActInfoSet;
        v6 = 0;
        if ( v5 )
        {
          v7 = ActionInfoSet::GetByInxName(v5, v4);
          if ( v7 )
            v6 = v7->uiEventCode;
        }
        v8 = v1->m_spActor.m_pObject;
        if ( v8 )
          NiActorManager::DeactivateSequence(v8, v6, 0.0);
      }
    }
    v9 = v1->m_kRidePetCtl.m_spPetActor.m_pObject;
    if ( v9 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
        v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      v1->m_kRidePetCtl.m_spPetActor.m_pObject = 0;
    }
    v10 = v1->m_spCtrlNode.m_pObject;
    v11 = v1->m_spCharNode.m_pObject;
    v1->m_kRidePetAction.m_pActor = 0;
    ((void (__stdcall *)(_DWORD))v10->vfptr[29].__vecDelDtor)(v11);
    NiMatrix3::MakeRotation(&v1->m_spCharNode.m_pObject->m_kLocal.m_Rotate, 0.0, 0.0, 0.0, 1.0);
    NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v1->m_spCarrierNode.m_pObject->m_kChildren);
    v12 = v1->vfptr;
    v1->m_fChairHeight = 0.0;
    v13 = (unsigned __int8)((int (__thiscall *)(_DWORD))v12[7].GetAbstateColor)(v1) == 0;
    v14 = v1->vfptr;
    if ( !v13 )
      JUMPOUT(__CS__, v14[11].AddAbStateByAbstateIndex);
    JUMPOUT(__CS__, v14[10].DeleteAbStateByAbstateIndex);
  }
}

//----- (00643690) --------------------------------------------------------
void __thiscall Char::RidePet(Char *this, int _nID)
{
  Char *v2; // esi@1
  NiActorManager *v3; // edi@1
  int v4; // edi@6
  NiActorManager *v5; // eax@6
  NiActorManager *v6; // ebx@6
  LONG v7; // eax@12
  ActionInfoSet *v8; // ecx@14
  unsigned int v9; // edi@14
  ActionInfo *v10; // eax@15
  NiAVObject *v11; // edi@17
  int v12; // eax@19
  NiNode *v13; // ecx@21
  CarToonShader *v14; // eax@21
  bool v15; // al@21
  CSpactralGlow_Shader_Controller *v16; // ecx@21
  NiActorManager *v17; // ecx@25
  bool v18; // zf@27
  AbStateInfecteeVtbl *v19; // eax@27
  void (__thiscall *v20)(Char *); // edx@28
  char *v21; // [sp+44h] [bp-14h]@9
  NiPointer<NiNode> spCairNode; // [sp+48h] [bp-10h]@19

  v2 = this;
  v3 = this->m_kRidePetCtl.m_spPetActor.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_kRidePetCtl.m_spPetActor.m_pObject = 0;
  }
  ((void (__stdcall *)(_DWORD, _DWORD))v2->m_spCtrlNode.m_pObject->vfptr[29].__vecDelDtor)(
    v2->m_spCharNode.m_pObject,
    0);
  NiMatrix3::MakeRotation(&v2->m_spCharNode.m_pObject->m_kLocal.m_Rotate, 0.0, 0.0, 0.0, 1.0);
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v2->m_spCarrierNode.m_pObject->m_kChildren);
  v4 = _nID;
  v2->m_fChairHeight = 0.0;
  v5 = CharResMgr::GetRidePetActor(&g_kCharResMgr, v4);
  v6 = v5;
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  _nID = 0;
  if ( !ITableBase<RIDING,RidePetTable>::GetTotal() )
  {
LABEL_11:
    if ( !v6 )
      return;
    v7 = InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount);
    goto LABEL_35;
  }
  while ( 1 )
  {
    v21 = CDataReader::GetRecord((CDataReader *)(ITableBase<RIDING,RidePetTable>::ms_pkTable + 4), _nID);
    if ( *(_WORD *)v21 == v4 )
      break;
    if ( ++_nID >= ITableBase<RIDING,RidePetTable>::GetTotal() )
      goto LABEL_11;
  }
  if ( v6 )
  {
    v2->m_kRidePetCtl.m_pkActionMgr = &v2->m_kRidePetAction;
    v2->m_kRidePetAction.m_pActor = v6;
    v6->m_pkCallbackObject = (NiActorManager::CallbackObject *)&v2->m_kRidePetAction.vfptr;
    NiActorManager::RegisterCallback(v6, TEXT_KEY_EVENT, NiActorManager::ANY_SEQUENCE_ID, g_kTextKeyMatch);
    v2->m_kRidePetAction.m_bUseActorSequence = 1;
    CharShape::SetRidePetID(&v2->m_kCharShape, v4);
    v2->m_kRidePetCtl.m_uiID = v4;
    NiD3DShaderLibrary::SetShaderLibraryDesc((NiD3DShaderLibrary *)&v2->m_kRidePetCtl, (NiShaderLibraryDesc *)v6);
    v2->m_kRidePetCtl.m_uiRunEventCode = 202000;
    v2->m_kRidePetCtl.m_uiWalkEventCode = 201000;
    v2->m_kRidePetCtl.m_uiStandEventCode = 101000;
    v8 = v2->m_kActionMgr.m_pkActInfoSet;
    v9 = 0;
    if ( v8 )
    {
      v10 = ActionInfoSet::GetByInxName(v8, "JumpStand_JumpStart");
      if ( v10 )
        v9 = v10->uiEventCode;
    }
    v2->m_kRidePetCtl.m_uiSpecialEventCode = v9;
    v11 = v6->m_spNIFRoot.m_pObject;
    if ( v11 )
      InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
    NiMatrix3::MakeRotation(&v11->m_kLocal.m_Rotate, NI_PI, 0.0, 0.0, 1.0);
    v12 = (int)v11->vfptr[18].__vecDelDtor((NiRefObject *)v11, (unsigned int)"#Chair");
    spCairNode.m_pObject = (NiNode *)v12;
    if ( v12 )
      InterlockedIncrement((volatile LONG *)(v12 + 4));
    NiAVObject::Update(v11, 0.0, 1);
    v13 = v2->m_spCharNode.m_pObject;
    v2->m_fChairHeight = spCairNode.m_pObject->m_kWorld.m_Translate.z;
    NiMatrix3::MakeRotation(&v13->m_kLocal.m_Rotate, NI_PI, 0.0, 0.0, 1.0);
    v14 = CarToonShader::GetInstance();
    CarToonShader::SetCartoonShader(v14, (NiNode *)v11);
    CSpactralGlow_Shader_Controller::SetTarget(&v2->m_kRidePetCtl.m_kShaderCtrl, (NiNode *)v11);
    v15 = AbStateInfectee::FindNomalAbstate((AbStateInfectee *)&v2->vfptr, STA_GTIHIDE);
    v16 = &v2->m_kRidePetCtl.m_kShaderCtrl;
    if ( v15 )
    {
      CSpactralGlow_Shader_Controller::SetUseShaderName(v16, "FxSkinning_SpactralGlow", "FxNoSkinning_SpactralGlow");
      CSpactralGlow_Shader_Controller::SetEnable(&v2->m_kRidePetCtl.m_kShaderCtrl, 1);
    }
    else
    {
      CSpactralGlow_Shader_Controller::SetEnable(v16, 0);
    }
    ((void (__stdcall *)(_DWORD, _DWORD))v2->m_spCarrierNode.m_pObject->vfptr[29].__vecDelDtor)(v11, 0);
    ((void (__stdcall *)(_DWORD, _DWORD))spCairNode.m_pObject->vfptr[29].__vecDelDtor)(v2->m_spCharNode.m_pObject, 0);
    NiAVObject::UpdateEffects(v11);
    NiAVObject::UpdateProperties(v11);
    if ( v21 != (char *)-66 )
    {
      _nID = 0;
      ActionMgr::GetEventCode(&v2->m_kActionMgr, v21 + 66, (unsigned int *)&_nID);
      Char::GetSequence(v2, _nID);
      v17 = v2->m_spActor.m_pObject;
      if ( v17 )
        NiActorManager::ActivateSequence(v17, _nID, 1, 0, 1.0, 0.0, NiKFMTool::SYNC_SEQUENCE_ID_NONE);
    }
    v18 = (unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[7].GetAbstateColor)(v2) == 0;
    v19 = v2->vfptr;
    if ( v18 )
      v20 = (void (__thiscall *)(Char *))v19[10].DeleteAbStateByAbstateIndex;
    else
      v20 = (void (__thiscall *)(Char *))v19[11].AddAbStateByAbstateIndex;
    v20(v2);
    if ( !InterlockedDecrement((volatile LONG *)&spCairNode.m_pObject->m_uiRefCount) )
      spCairNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spCairNode.m_pObject, 1u);
    if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    v7 = InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount);
LABEL_35:
    if ( !v7 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  }
}
// A8C278: using guessed type int ITableBase<RIDING,RidePetTable>::ms_pkTable;
// B622CC: using guessed type const float NI_PI;

//----- (00643A60) --------------------------------------------------------
void __thiscall Char::Move(Char *this, NiPoint3 *kTargetPos, bool bChangeMode, NiPoint3 *kForceDir, bool bSkillCancel)
{
  Char *v5; // esi@1
  unsigned __int16 *v6; // eax@1
  NiPoint3 *v7; // ebx@5
  NiPoint3 *v8; // ebx@6
  NiPoint3 *v9; // eax@9
  double v10; // st7@9
  int v11; // eax@10
  int v12; // eax@10
  NiPoint3 result; // [sp+8h] [bp-30h]@9
  NiPoint3 kCurPos; // [sp+14h] [bp-24h]@5
  float v15; // [sp+20h] [bp-18h]@5
  float v16; // [sp+24h] [bp-14h]@5
  float v17; // [sp+28h] [bp-10h]@5
  NiPoint3 pos3Dir; // [sp+2Ch] [bp-Ch]@9

  v5 = this;
  ((void (*)(void))this->vfptr[13].Deaffect)();
  Char::SetAniMationStop(v5, 0);
  v6 = &v5->m_kActionMgr.m_pkCurPlaySkillViewInfo->ID;
  if ( v6 && !Skill::IsMovingSkill(*v6) && bSkillCancel == 1 )
  {
    AttackSequenceManager::ApplicateSkillSeqImmediately((AttackSequenceManager *)&v5->vfptr, v5, 1, 0);
    Char::ResetSkillAction(v5);
    v5->m_kActionMgr.m_pkCurPlayActInfo = 0;
    *(_WORD *)&v5->m_kActionMgr.m_abActionEff[0] = 0;
    v5->m_kActionMgr.m_abActionEff[2] = 0;
    *(_WORD *)&v5->m_kActionMgr.m_abActionSnd[0] = 0;
    v5->m_bActionHit = 0;
  }
  ((void (__thiscall *)(Char *, NiPoint3 *))v5->vfptr[6].SetAbStateProperty)(v5, &kCurPos);
  v7 = kTargetPos;
  v15 = kCurPos.x - kTargetPos->x;
  v16 = kCurPos.y - kTargetPos->y;
  v17 = kCurPos.z - kTargetPos->z;
  *(float *)&kTargetPos = v16 * v16 + v15 * v15 + v17 * v17;
  *(float *)&kTargetPos = sqrt(*(float *)&kTargetPos);
  if ( *(float *)&kTargetPos >= 1.0 )
  {
    v5->m_kMoveToTarget.vfptr->SetCurrentPos((NpNs_MoveToTarget *)&v5->m_kMoveToTarget, &kCurPos);
    v5->m_kMoveToTarget.vfptr->StartMove((NpNs_MoveToTarget *)&v5->m_kMoveToTarget, v7);
    v8 = kForceDir;
    if ( Char::INVALIDPOINT3.r == kForceDir->x
      && Char::INVALIDPOINT3.g == kForceDir->y
      && Char::INVALIDPOINT3.b == kForceDir->z )
    {
      v11 = (int)v5->m_kMoveToTarget.vfptr->GetMoveDir((NpNs_MoveToTarget *)&v5->m_kMoveToTarget);
      pos3Dir.x = *(float *)v11;
      pos3Dir.y = *(float *)(v11 + 4);
      v12 = *(_DWORD *)(v11 + 8);
    }
    else
    {
      v9 = Char::GetDirToPosition(v5, &result, kForceDir);
      v15 = v9->x * -1.0;
      v16 = v9->y * -1.0;
      v10 = -1.0 * v9->z;
      pos3Dir.x = v15;
      pos3Dir.y = v16;
      v17 = v10;
    }
    pos3Dir.z = 0.0;
    *(float *)&kTargetPos = pos3Dir.y * pos3Dir.y + pos3Dir.x * pos3Dir.x + 0.0 * 0.0;
    if ( *(float *)&kTargetPos > 0.0099999998 )
      NpNs_SmoothRotateControler::SetTargetDirection(&v5->m_kSmoothRotater, &pos3Dir);
    Char::GetAniCode(v5, 0, (unsigned int *)&kTargetPos, (unsigned int *)&kForceDir);
    if ( (kTargetPos != (NiPoint3 *)200000 && kForceDir != (NiPoint3 *)200000 || bChangeMode)
      && Char::INVALIDPOINT3.r == v8->x
      && Char::INVALIDPOINT3.g == v8->y
      && Char::INVALIDPOINT3.b == v8->z
      && !Char::IsAbStateAction(v5)
      && bSkillCancel == 1 )
    {
      ((void (__thiscall *)(Char *))v5->vfptr[11].AddAbStateByAbstateIndex)(v5);
    }
  }
}

//----- (00643CC0) --------------------------------------------------------
char __userpurge Char::Move@<al>(Char *this@<ecx>, int a2@<ebx>, NiPoint3 *kTargetPos, float fCurTime, bool bChangeMode, NiPoint3 *kForceDir, bool bSkillCancel)
{
  Char *v7; // esi@1
  char v8; // al@2
  unsigned __int16 *v9; // eax@3
  NiPoint3 *v10; // ebx@7
  NiPoint3 *v11; // ebx@9
  NiPoint3 *v12; // eax@10
  double v13; // st7@10
  int v14; // eax@11
  int v15; // eax@11
  NiPoint3 result; // [sp+4h] [bp-30h]@10
  NiPoint3 kCurPos; // [sp+10h] [bp-24h]@7
  float v18; // [sp+1Ch] [bp-18h]@7
  float v19; // [sp+20h] [bp-14h]@7
  float v20; // [sp+24h] [bp-10h]@7
  NiPoint3 pos3Dir; // [sp+28h] [bp-Ch]@10

  v7 = this;
  if ( DirectionControllers::IsRunDirection(this->m_spDirectionCtrls.m_pObject) )
  {
    v8 = 0;
  }
  else
  {
    v9 = &v7->m_kActionMgr.m_pkCurPlaySkillViewInfo->ID;
    if ( v9 && !Skill::IsMovingSkill(*v9) && bSkillCancel == 1 )
    {
      AttackSequenceManager::ApplicateSkillSeqImmediately((AttackSequenceManager *)&v7->vfptr, v7, 1, 0);
      Char::ResetSkillAction(v7);
      v7->m_kActionMgr.m_pkCurPlayActInfo = 0;
      *(_WORD *)&v7->m_kActionMgr.m_abActionEff[0] = 0;
      v7->m_kActionMgr.m_abActionEff[2] = 0;
      *(_WORD *)&v7->m_kActionMgr.m_abActionSnd[0] = 0;
      v7->m_bActionHit = 0;
    }
    ((void (__thiscall *)(Char *, NiPoint3 *, int))v7->vfptr[6].SetAbStateProperty)(v7, &kCurPos, a2);
    v10 = kTargetPos;
    v18 = kCurPos.x - kTargetPos->x;
    v19 = kCurPos.y - kTargetPos->y;
    v20 = kCurPos.z - kTargetPos->z;
    *(float *)&kTargetPos = v19 * v19 + v18 * v18 + v20 * v20;
    *(float *)&kTargetPos = sqrt(*(float *)&kTargetPos);
    if ( *(float *)&kTargetPos >= 1.0 )
    {
      v7->m_kMoveToTarget.vfptr->SetCurrentPos((NpNs_MoveToTarget *)&v7->m_kMoveToTarget, &kCurPos);
      v7->m_kMoveToTarget.vfptr->StartMove((NpNs_MoveToTarget *)&v7->m_kMoveToTarget, v10);
      v11 = kForceDir;
      if ( (unsigned __int8)NiColor::operator!=((NiColor *)kForceDir, &Char::INVALIDPOINT3) )
      {
        v12 = Char::GetDirToPosition(v7, &result, v11);
        v18 = v12->x * -1.0;
        v19 = v12->y * -1.0;
        v13 = -1.0 * v12->z;
        pos3Dir.x = v18;
        pos3Dir.y = v19;
        v20 = v13;
      }
      else
      {
        v14 = (int)v7->m_kMoveToTarget.vfptr->GetMoveDir((NpNs_MoveToTarget *)&v7->m_kMoveToTarget);
        pos3Dir.x = *(float *)v14;
        pos3Dir.y = *(float *)(v14 + 4);
        v15 = *(_DWORD *)(v14 + 8);
      }
      pos3Dir.z = 0.0;
      *(float *)&kTargetPos = pos3Dir.y * pos3Dir.y + pos3Dir.x * pos3Dir.x + 0.0 * 0.0;
      if ( *(float *)&kTargetPos > 0.0099999998 )
        NpNs_SmoothRotateControler::SetTargetDirection(&v7->m_kSmoothRotater, &pos3Dir);
      Char::GetAniCode(v7, 0, (unsigned int *)&kTargetPos, (unsigned int *)&kForceDir);
      if ( (kTargetPos != (NiPoint3 *)200000 && kForceDir != (NiPoint3 *)200000 || bChangeMode)
        && Char::INVALIDPOINT3.r == v11->x
        && Char::INVALIDPOINT3.g == v11->y
        && Char::INVALIDPOINT3.b == v11->z
        && !Char::IsAbStateAction(v7)
        && bSkillCancel == 1 )
      {
        ((void (__thiscall *)(Char *))v7->vfptr[11].AddAbStateByAbstateIndex)(v7);
      }
      v8 = 1;
    }
    else
    {
      v8 = 0;
    }
  }
  return v8;
}

//----- (00643F10) --------------------------------------------------------
bool __thiscall Char::IsAnimationEnd(Char *this)
{
  Char *v1; // esi@1
  NiActorManager *v2; // eax@1
  bool result; // al@2
  unsigned int v4; // ebx@3
  unsigned int v5; // edi@3
  NiActorManager *v6; // eax@12

  v1 = this;
  v2 = this->m_spActor.m_pObject;
  if ( v2 )
  {
    v4 = v2->m_eCurID;
    v5 = NiActorManager::INVALID_EVENT_CODE;
    if ( ((int (*)(void))this->vfptr[13].DeleteAbStateByAbstateIndex)() != 4 )
    {
      if ( v1->m_uiLayerAniCode[1] != NiActorManager::INVALID_EVENT_CODE )
        v5 = v1->m_uiLayerAniCode[1];
      if ( v5 != NiActorManager::INVALID_EVENT_CODE )
        goto LABEL_19;
    }
    v5 = v1->m_uiLayerAniCode[0];
    if ( v5 != NiActorManager::INVALID_EVENT_CODE )
    {
LABEL_19:
      if ( v4 != v5 )
        v4 = v5;
    }
    result = 1;
    if ( v4 != NiActorManager::INVALID_EVENT_CODE && v4 != NiActorManager::ANY_EVENT_CODE )
    {
      v6 = Char::GetSequence(v1, v4);
      if ( v6 )
      {
        if ( v6->m_pkCurSequence != (NiControllerSequence *)1 || v6->m_fTransStartTime > (double)v6->m_fTransEndTime )
          result = 0;
      }
    }
  }
  else
  {
    result = 1;
  }
  return result;
}
// 9E4E98: using guessed type const unsigned int NiActorManager::ANY_EVENT_CODE;

//----- (00643FA0) --------------------------------------------------------
char __thiscall Char::ResetSequence(Char *this, unsigned int dwAniEventCode)
{
  NiActorManager *v2; // eax@2

  if ( this->m_spActor.m_pObject )
  {
    v2 = Char::GetSequence(this, dwAniEventCode);
    if ( v2 )
      *(float *)&v2->m_eNextID = -3.4028235e38;
  }
  return 1;
}

//----- (00643FD0) --------------------------------------------------------
void __thiscall Char::ActSkillStand(Char *this, float fModifiedStartTime)
{
  Char *v2; // edi@1
  int v3; // edx@1
  unsigned __int16 *v4; // eax@1
  int v5; // ebx@2
  int v6; // esi@2
  int *v7; // eax@4
  int v8; // esi@5
  int v9; // esi@10
  signed int v10; // esi@13
  NiActorManager *v11; // eax@14
  NiActorManager *v12; // ebx@17
  int v13; // esi@18
  NiActorManager *v14; // eax@19
  float v15; // ST14_4@22
  float v16; // ST14_4@24
  double v17; // st7@24
  float v18; // ST14_4@25
  double v19; // st7@25
  signed int uiTarget; // [sp+Ch] [bp-18h]@1
  float fBeginKeyTime; // [sp+10h] [bp-14h]@24
  unsigned int temp[3]; // [sp+14h] [bp-10h]@1

  v2 = this;
  temp[0] = 103000;
  temp[1] = 104000;
  temp[2] = 105000;
  v3 = rand() % 3;
  v4 = &v2->m_kActionMgr.m_pkCurPlaySkillViewInfo->ID;
  uiTarget = temp[v3];
  if ( v4 )
  {
    v5 = *v4;
    v6 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                          + 16))(
                            ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                            v5) )
    {
      if ( (unsigned __int16)v5 <= *(_WORD *)(v6 + 200) )
      {
        v7 = (int *)(*(_DWORD *)(v6 + 196) + 4 * v5);
        if ( *v7 )
        {
          v8 = *v7;
          if ( *v7 )
          {
            if ( *(_BYTE *)(v8 + 192) )
            {
              if ( *(_DWORD *)(v8 + 188) )
                uiTarget = 105000;
              else
                uiTarget = rand() % 2 != 0 ? 104000 : 103000;
            }
            v9 = *(_DWORD *)(v8 + 531);
            if ( v9 == 36 || v9 == 38 )
              uiTarget = 102000;
          }
        }
      }
    }
  }
  v10 = 0;
  do
  {
    v11 = Char::GetSequence(v2, temp[v10]);
    if ( v11 )
      LODWORD(v11->m_fTimelineRefreshTime) = 2;
    ++v10;
  }
  while ( v10 < 3 );
  v12 = Char::GetSequence(v2, uiTarget);
  if ( v12 )
  {
    v13 = 0;
    while ( 1 )
    {
      v14 = Char::GetSequence(v2, temp[v13]);
      if ( v14 )
      {
        if ( v14->m_pkCurSequence )
          break;
      }
      if ( ++v13 >= 3 )
      {
        v15 = (v12->m_fTransStartTime - *(float *)&v12->m_eTransitionState) / *(float *)&v12->m_bBuildTimeline;
        if ( fModifiedStartTime < (double)v15 )
        {
          *(float *)&v12->m_eNextID = -3.4028235e38;
          *(float *)&v12->m_eTransitionState = 0.0;
          NiActorManager::SetTargetAnimation(v2->m_spActor.m_pObject, uiTarget);
          v2->m_uiLayerAniCode[0] = uiTarget;
        }
        else if ( !v12->m_pkCurSequence )
        {
          *(float *)&v12->m_eNextID = -3.4028235e38;
          *(float *)&v12->m_eTransitionState = 0.0;
          v16 = (v12->m_fTransStartTime - 0.0) / *(float *)&v12->m_bBuildTimeline;
          v17 = v16;
          fBeginKeyTime = fModifiedStartTime - v16;
          if ( fBeginKeyTime <= v17 )
          {
            v19 = fBeginKeyTime;
          }
          else
          {
            v18 = fBeginKeyTime - v17;
            v19 = v18;
          }
          *(float *)&v12->m_eTransitionState = v19;
          NiActorManager::SetTargetAnimation(v2->m_spActor.m_pObject, uiTarget);
        }
        return;
      }
    }
  }
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (006441E0) --------------------------------------------------------
void __userpurge Char::ActInitStand(Char *this@<ecx>, int a2@<edi>, bool bIsMob)
{
  Char *v3; // esi@1
  void (__thiscall *v4)(AbStateInfectee *, ABSTATEINDEX, bool, int); // edx@2
  signed int v5; // ebx@6
  ActionInfo *v6; // eax@8
  unsigned int v7; // edx@9
  unsigned int v8; // edi@11
  AbStateInfecteeVtbl *v9; // edx@12
  NiActorManager *v10; // eax@13
  NiActorManager *v11; // eax@21
  float fResetTime; // ST18_4@22

  v3 = this;
  if ( Char::IsResource(this) )
  {
    v4 = v3->vfptr[10].SetAbStateProperty;
    if ( v3->m_byMode == 3 )
      v4((AbStateInfectee *)&v3->vfptr, STA_POISONDMGADD, 0, 0);
    else
      v4((AbStateInfectee *)&v3->vfptr, STA_KINGSLIMEBLOODING, 0, 0);
  }
  else
  {
    v3->m_fAnimationSpeed = 1.0;
    ActionMgr::SetActionStartTime(&v3->m_kActionMgr, Timer::ms_fCurTime);
    v3->m_fAnimationUpdateTime = 0.0;
    v3->m_kActionMgr.m_pkCurPlayActInfo = 0;
    *(_WORD *)&v3->m_kActionMgr.m_abActionEff[0] = 0;
    v3->m_kActionMgr.m_abActionEff[2] = 0;
    *(_WORD *)&v3->m_kActionMgr.m_abActionSnd[0] = 0;
    v3->m_bActionHit = 0;
    if ( bIsMob )
      v5 = Char::IsNPC(v3) != 0 ? 1000 : 2000;
    else
      v5 = 1000;
    v6 = Char::GetActionInfo(v3, STAND, (AniEventCode::Code2)v5);
    v3->m_kActionMgr.m_pkCurPlayActInfo = v6;
    if ( v6 )
    {
      v7 = v6->uiEventCode;
      v3->m_kActionMgr.m_uiCurEventCode = v7;
      if ( 10000 * (v7 / 0x2710) == 300000 )
        v3->m_kActionMgr.m_pkLastAttackActInfo = v6;
    }
    v8 = ((int (__thiscall *)(Char *, signed int, signed int, int))v3->vfptr[15].Affect)(v3, 100000, v5, a2)
       + v5
       + 100000;
    if ( v3->m_spActor.m_pObject )
    {
      v9 = v3->vfptr;
      if ( v3->m_byMode == 3 )
      {
        ((void (__thiscall *)(Char *))v9[14].AddAbStateByAbstateIndex)(v3);
        v10 = Char::GetSequence(v3, v8);
        if ( v10 )
          NiActorManager::Update(v3->m_spActor.m_pObject, v10->m_fTransStartTime);
      }
      else if ( (unsigned __int8)((int (__thiscall *)(Char *))v9[15].Deaffect)(v3) )
      {
        if ( v3->m_kRidePetCtl.m_spPetActor.m_pObject )
          v3->vfptr[11].~AbStateInfectee((AbStateInfectee *)v3);
      }
      else
      {
        if ( !(unsigned __int8)((int (__thiscall *)(Char *, unsigned int, _DWORD, _DWORD))v3->vfptr[10].SetAbStateProperty)(
                                 v3,
                                 v8,
                                 0,
                                 0)
          && Char::IsCharNPC(v3) )
        {
          v3->vfptr[10].SetAbStateProperty((AbStateInfectee *)v3, (ABSTATEINDEX)(v5 + 100000), 0, 0);
        }
        v11 = Char::GetSequence(v3, v8);
        if ( v11 )
        {
          fResetTime = v11->m_fTransStartTime;
          *(float *)&v11->m_eNextID = (double)(rand() % 100) / 100.0 * fResetTime - v3->m_fAnimationUpdateTime;
        }
      }
    }
  }
}
// 6441E0: could not find valid save-restore pair for ebx
// 6441E0: could not find valid save-restore pair for edi
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006443F0) --------------------------------------------------------
void __thiscall Char::UpdateAnimation(Char *this, float fTime)
{
  Char *v2; // esi@1
  Char *v3; // eax@3
  Char *v4; // eax@25
  Char *v5; // edi@25
  AbStateInfecteeVtbl *v6; // ebx@26
  float v7; // ST14_4@26
  EffectViewInfo *v8; // eax@26
  Char::MoveMode v9; // eax@31
  Char::MoveMode v10; // eax@36
  unsigned int puiSecondCode; // [sp+24h] [bp-4h]@15

  v2 = this;
  if ( this->m_spActor.m_pObject )
  {
    if ( this->m_AttackTargetHandle != -1 )
    {
      v3 = CharMgr::GetChar(&g_kCharMgr, this->m_AttackTargetHandle);
      if ( !v3 || !(unsigned __int8)((int (__thiscall *)(Char *))v3->vfptr[1].Deaffect)(v3) )
        v2->m_AttackTargetHandle = -1;
    }
    CharShape::Update(&v2->m_kCharShape, fTime);
    if ( Char::IsResource(v2) )
    {
      if ( v2->m_spActor.m_pObject->m_eTargetID == 100
        && (unsigned __int8)((int (__thiscall *)(Char *))v2->vfptr[15].SetAbStateProperty)(v2) )
      {
        v2->vfptr[10].SetAbStateProperty((AbStateInfectee *)v2, STA_MOBMRPLUS, 0, 0);
      }
      if ( v2->m_spActor.m_pObject->m_eTargetID == 300 )
      {
        if ( (unsigned __int8)((int (__thiscall *)(Char *))v2->vfptr[15].SetAbStateProperty)(v2) )
          v2->vfptr[10].SetAbStateProperty((AbStateInfectee *)v2, STA_POISONDMGADD, 0, 0);
      }
    }
    else
    {
      if ( Char::IsCharNPC(v2) )
        Char::UpdateNPCAction(v2, fTime);
      Char::GetAniCode(v2, 0, (unsigned int *)&fTime, &puiSecondCode);
      if ( (LODWORD(fTime) == 300000 || puiSecondCode == 300000)
        && v2->m_ReservedHitCharHandle != -1
        && (unsigned __int8)((int (__thiscall *)(Char *, _DWORD))v2->vfptr[18].~AbStateInfectee)(v2, 0)
        && v2->m_kAttSeqList.m_kAllocator.m_uiCount
        && v2->vfptr->ApplicateAttackSeq((AttackSequenceManager *)&v2->vfptr, v2->m_kAttSeqList.m_pkHead->m_element, 0) == 1 )
      {
        ((void (__thiscall *)(Char *, signed int))v2->vfptr[18].~AbStateInfectee)(v2, 1);
      }
      if ( Char::IsActGathering(v2) )
      {
        if ( (unsigned __int8)((int (__thiscall *)(Char *, signed int))v2->vfptr[18].~AbStateInfectee)(v2, 1) )
        {
          if ( !v2->m_bWasHitTime )
          {
            v4 = CharMgr::GetChar(&g_kCharMgr, v2->m_kTargetResourceHandle);
            v5 = v4;
            if ( v4 )
            {
              v6 = v4->vfptr;
              v7 = Timer::ms_fCurTime;
              v8 = ShakeEffectViewInfoTab::GetByID(0);
              ((void (__thiscall *)(Char *, EffectViewInfo *, _DWORD))v6[12].AddAbStateByAbstateIndex)(
                v5,
                v8,
                LODWORD(v7));
            }
          }
          v2->m_bWasHitTime = 1;
        }
        else
        {
          v2->m_bWasHitTime = 0;
        }
      }
      Char::DoOscillation(v2, OSC_MAX_NUM);
      if ( (unsigned __int8)((int (__thiscall *)(Char *))v2->vfptr[7].GetAbstateColor)(v2) )
      {
        if ( v2->m_kRidePetCtl.m_spPetActor.m_pObject )
        {
          v9 = v2->m_eMoveMode;
          if ( v9 )
          {
            if ( v9 == 1 )
              CRidePetCtl::ActRun(&v2->m_kRidePetCtl);
          }
          else
          {
            CRidePetCtl::ActWalk(&v2->m_kRidePetCtl);
          }
        }
        else if ( (unsigned __int8)((int (__thiscall *)(Char *))v2->vfptr[20].AddAbStateByAbstateIndex)(v2) )
        {
          v10 = v2->m_eMoveMode;
          if ( v10 )
          {
            if ( v10 == 1 )
              v2->vfptr[11].IsVisible((AbStateInfectee *)v2);
          }
          else
          {
            ((void (__thiscall *)(Char *))v2->vfptr[11].SetAbStateProperty)(v2);
          }
        }
      }
      else
      {
        if ( (unsigned __int8)((int (__thiscall *)(Char *))v2->vfptr[20].AddAbStateByAbstateIndex)(v2)
          && v2->m_spActor.m_pObject->m_eCurID == 202000 )
        {
          ((void (__thiscall *)(Char *))v2->vfptr[10].DeleteAbStateByAbstateIndex)(v2);
          NiActorManager::SetTargetAnimation(v2->m_spActor.m_pObject, 0x18A88u);
        }
        if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[20].AddAbStateByAbstateIndex)(v2)
          && v2->m_spActor.m_pObject->m_eCurID == 201000 )
        {
          ((void (__thiscall *)(Char *))v2->vfptr[10].DeleteAbStateByAbstateIndex)(v2);
          NiActorManager::SetTargetAnimation(v2->m_spActor.m_pObject, 0x18A88u);
        }
      }
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006446F0) --------------------------------------------------------
void __thiscall Char::TryActDamage(Char *this, unsigned int uiDamage, bool bDotDmg)
{
  Char *v3; // esi@1
  EffectViewInfo *v4; // eax@3
  AbStateInfecteeVtbl *v5; // edx@7
  signed int v6; // ecx@9
  double v7; // st6@9
  unsigned int v8; // eax@11
  double v9; // st7@11
  float v10; // ST04_4@11
  void (__thiscall *v11)(AbStateInfectee *, ABSTATEINDEX); // edx@11
  MobViewInfo *v12; // eax@12
  unsigned __int16 v13; // ax@13
  AbStateInfecteeVtbl *v14; // edi@14
  float v15; // ST0C_4@14
  EffectViewInfo *v16; // eax@14
  EffectViewInfo *v17; // eax@15
  AbStateInfecteeVtbl *v18; // edx@17
  signed int v19; // ecx@17
  double v20; // st6@17
  unsigned int v21; // eax@19
  double v22; // st7@19
  float v23; // ST04_4@19
  void (__thiscall *v24)(AbStateInfectee *, ABSTATEINDEX); // edx@19
  float v25; // [sp+8h] [bp-14h]@9
  float v26; // [sp+8h] [bp-14h]@17
  EffectAxisEnum v27; // [sp+Ch] [bp-10h]@9
  EffectAxisEnum v28; // [sp+Ch] [bp-10h]@17
  unsigned int puiSecondCode; // [sp+18h] [bp-4h]@21

  v3 = this;
  if ( this->m_bUserCharacter == 1 )
  {
    if ( this->m_kCharShape.m_byGender == 1 )
      v4 = ShakeEffectViewInfoTab::GetByID(4u);
    else
      v4 = ShakeEffectViewInfoTab::GetByID(5u);
    if ( !v4 )
    {
      OutputDebugStringA("ShakeInfo Faile TryActDamage- with MainChar\n");
      return;
    }
    v5 = v3->vfptr;
    if ( bDotDmg )
    {
      v27 = v4->Axis;
      v6 = v4->Period;
      *(float *)&bDotDmg = (double)v4->Damp * 0.009999999776482582;
      v25 = *(float *)&bDotDmg;
      v7 = (double)(signed int)v4->Period;
      if ( v6 < 0 )
        v7 = v7 + 4294967300.0;
      v8 = v4->Amplitude;
      *(float *)&bDotDmg = 0.009999999776482582 * v7;
      v9 = *(float *)&bDotDmg;
      *(_DWORD *)&bDotDmg = v8;
      v10 = v9;
      v11 = v5[12].DeleteAbStateByAbstateIndex;
      *(float *)&bDotDmg = (double)v8 * 0.002499999944120646;
      ((void (__thiscall *)(Char *, _DWORD, _DWORD, _DWORD, EffectAxisEnum, _DWORD))v11)(
        v3,
        bDotDmg,
        LODWORD(v10),
        LODWORD(v25),
        v27,
        LODWORD(Timer::ms_fCurTime));
    }
    else
    {
      ((void (__thiscall *)(Char *, EffectViewInfo *, _DWORD))v5[12].AddAbStateByAbstateIndex)(
        v3,
        v4,
        LODWORD(Timer::ms_fCurTime));
    }
  }
  else
  {
    v12 = this->m_pMobViewInfo;
    if ( v12 )
    {
      v13 = v12->EffectViewID;
      if ( bDotDmg )
      {
        v17 = ShakeEffectViewInfoTab::GetByID(v13);
        if ( !v17 )
        {
          OutputDebugStringA("ShakeInfo Faile TryActDamage- with Dot\n");
          return;
        }
        v18 = v3->vfptr;
        v28 = v17->Axis;
        v19 = v17->Period;
        *(float *)&bDotDmg = (double)v17->Damp * 0.009999999776482582;
        v26 = *(float *)&bDotDmg;
        v20 = (double)(signed int)v17->Period;
        if ( v19 < 0 )
          v20 = v20 + 4294967300.0;
        v21 = v17->Amplitude;
        *(float *)&bDotDmg = 0.009999999776482582 * v20;
        v22 = *(float *)&bDotDmg;
        *(_DWORD *)&bDotDmg = v21;
        v23 = v22;
        v24 = v18[12].DeleteAbStateByAbstateIndex;
        *(float *)&bDotDmg = (double)v21 * 0.002499999944120646;
        ((void (__thiscall *)(Char *, _DWORD, _DWORD, _DWORD, EffectAxisEnum, _DWORD))v24)(
          v3,
          bDotDmg,
          LODWORD(v23),
          LODWORD(v26),
          v28,
          LODWORD(Timer::ms_fCurTime));
      }
      else
      {
        v14 = this->vfptr;
        v15 = Timer::ms_fCurTime;
        v16 = ShakeEffectViewInfoTab::GetByID(v13);
        ((void (__thiscall *)(Char *, EffectViewInfo *, _DWORD))v14[12].AddAbStateByAbstateIndex)(v3, v16, LODWORD(v15));
      }
    }
    else
    {
      OutputDebugStringA("ShakeInfo Faile TryActDamage\n");
    }
  }
  Char::GetAniCode(v3, 0, (unsigned int *)&bDotDmg, &puiSecondCode);
  if ( (bDotDmg == 100000 || puiSecondCode == 100000)
    && !(unsigned __int8)((int (__thiscall *)(Char *))v3->vfptr[15].Deaffect)(v3) )
  {
    ((void (__thiscall *)(Char *))v3->vfptr[12].SetAbStateProperty)(v3);
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00644900) --------------------------------------------------------
void __thiscall Char::ActAction_BaseMode(Char *this, const char *pcActInxName)
{
  Char::ActAction(this, (char *)pcActInxName, 0);
}

//----- (00644920) --------------------------------------------------------
void __thiscall Char::UpdateEmotion(Char *this, float fTime)
{
  Char *v2; // esi@1
  Char::EmotionState v3; // eax@5
  NiActorManager *v4; // eax@7
  ActionViewInfo *v5; // eax@10
  AbStateInfecteeVtbl *v6; // edx@12
  unsigned int v7; // eax@12

  v2 = this;
  CharShape::ShowLinkNode(&this->m_kCharShape, LINK_RIGHTHAND, 1);
  CharShape::ShowLinkNode(&v2->m_kCharShape, LINK_LEFTHAND, 1);
  if ( JumpProcessor::IsJump(&v2->m_kJumpProcessor) )
    ((void (__thiscall *)(_DWORD))v2->vfptr[13].Deaffect)(v2);
  if ( v2->m_eEmotionState )
  {
    CharShape::ShowLinkNode(&v2->m_kCharShape, LINK_RIGHTHAND, 0);
    CharShape::ShowLinkNode(&v2->m_kCharShape, LINK_LEFTHAND, 0);
    ItemUpGrade::SetShow(&v2->m_kCharShape.m_kItemUpGrade, 0);
    if ( v2->m_spActor.m_pObject )
    {
      v3 = v2->m_eEmotionState;
      if ( v3 != 2 && v3 != 4 )
      {
        v4 = Char::GetSequence(v2, v2->m_uiCurEmotionCode);
        if ( v4 )
        {
          if ( v2->m_spActor.m_pObject->m_eCurID == v2->m_spActor.m_pObject->m_eTargetID
            && v4->m_fTransStartTime <= (double)v4->m_fTransEndTime )
          {
            v5 = IIDTableBase<ActionViewInfo,ActionViewTable,unsigned short>::GetByID(LOWORD(v2->m_uiEmotionIndex));
            if ( v5 && v5->nAfterCode )
            {
              v6 = v2->vfptr;
              v2->m_eEmotionState = 3;
              v7 = v5->nAfterCode;
              v2->m_uiCurEmotionCode = v7;
              v6[10].SetAbStateProperty((AbStateInfectee *)v2, (ABSTATEINDEX)v7, 0, 0);
            }
            else
            {
              ((void (__thiscall *)(_DWORD))v2->vfptr[13].Deaffect)(v2);
              ((void (__thiscall *)(_DWORD))v2->vfptr[10].DeleteAbStateByAbstateIndex)(v2);
            }
          }
        }
      }
    }
  }
}

//----- (00644A50) --------------------------------------------------------
double __thiscall Char::StopEmotion(Char *this)
{
  Char *v1; // esi@1
  double result; // st7@2
  NiActorManager *v3; // eax@3
  void (__thiscall *v4)(AttackSequenceManager *, float); // eax@6
  NiActorManager *v5; // eax@6

  v1 = this;
  if ( this->m_eEmotionState == 4 )
    return -3.4028235e38;
  v3 = this->m_spActor.m_pObject;
  if ( v3 )
  {
    if ( this->m_uiCurEmotionCode != v3->m_eCurID )
      return -3.4028235e38;
    v4 = this->vfptr->SetAnimationSpeed;
    this->m_eEmotionState = 2;
    ((void (__stdcall *)(_DWORD))v4)(0.0);
    v5 = Char::GetSequence(v1, v1->m_uiCurEmotionCode);
    if ( !v5 )
      return -3.4028235e38;
    result = v5->m_fTransEndTime;
  }
  else
  {
    result = 3.4028235e38;
  }
  return result;
}

//----- (00644AC0) --------------------------------------------------------
char __userpurge Char::ActAction@<al>(Char *this@<ecx>, int a2@<ebx>, int a3@<edi>, AniEventCode::Code1 eCode1, AniEventCode::Code2 eCode2)
{
  Char *v5; // esi@1
  char result; // al@2
  ActionInfo *v7; // eax@5
  NiActorManager *v8; // ecx@5
  ActionInfo *v9; // edi@5
  unsigned int v10; // eax@6
  unsigned int v11; // edx@6
  unsigned int v12; // eax@9
  unsigned __int32 v13; // eax@12
  int v14; // edi@12
  int v15; // edx@12
  int v16; // ebx@12
  int v17; // edx@16
  int v18; // edi@19
  int v19; // ebx@19
  int v20; // edi@20
  int v21; // edx@23
  WeaponAttrib *v22; // ebx@26
  WeaponTypeEnum v23; // edi@30
  unsigned int v24; // eax@34
  signed int v25; // eax@37
  unsigned int v26; // eax@37
  unsigned int v27; // ecx@49
  int v28; // [sp+1Ch] [bp-18h]@5
  ActionInfo *pkInfo; // [sp+28h] [bp-Ch]@5
  unsigned int uiAniCode; // [sp+2Ch] [bp-8h]@12
  unsigned int uiFirst; // [sp+30h] [bp-4h]@12

  v5 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[1].AddAbStateByAbstateIndex)() == 1 )
    return 0;
  if ( !(unsigned __int8)((int (__thiscall *)(Char *))v5->vfptr[15].AddAbStateByAbstateIndex)(v5) )
  {
    v5->m_kActionMgr.m_pkCurPlayActInfo = 0;
    *(_WORD *)&v5->m_kActionMgr.m_abActionEff[0] = 0;
    v5->m_kActionMgr.m_abActionEff[2] = 0;
    *(_WORD *)&v5->m_kActionMgr.m_abActionSnd[0] = 0;
    v5->m_bActionHit = 0;
  }
  v28 = a3;
  v7 = Char::GetActionInfo(v5, eCode1, eCode2);
  v8 = v5->m_spActor.m_pObject;
  v9 = v7;
  pkInfo = v7;
  if ( v8 )
  {
    v10 = v5->m_uiLayerAniCode[0];
    v11 = NiActorManager::INVALID_EVENT_CODE;
    if ( v10 != NiActorManager::INVALID_EVENT_CODE && v10 >= 0xC3500 && v10 < 0xDBBA0 )
    {
      v12 = v5->m_uiLayerAniCode[1];
      if ( v12 != NiActorManager::INVALID_EVENT_CODE )
      {
        NiActorManager::DeactivateSequence(v8, v12, 0.0);
        v11 = NiActorManager::INVALID_EVENT_CODE;
      }
      v5->m_uiLayerAniCode[1] = v11;
    }
    Char::GetAniCode(v5, 0, &uiFirst, &uiAniCode);
    v13 = eCode1
        + ((int (__thiscall *)(Char *, AniEventCode::Code1, AniEventCode::Code2, int, int))v5->vfptr[15].Affect)(
            v5,
            eCode1,
            eCode2,
            v28,
            a2);
    v14 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    v15 = *(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    v16 = v5->m_kCharShape.m_kEquip.Equ_LeftHand;
    uiAniCode = eCode2 + v13;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(v15 + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v16) )
    {
      if ( (unsigned __int16)v16 <= *(_WORD *)(v14 + 200) )
      {
        v17 = *(_DWORD *)(v14 + 196);
        if ( *(_DWORD *)(v17 + 4 * v16) )
          uiFirst = *(_DWORD *)(v17 + 4 * v16);
        else
          uiFirst = 0;
      }
      else
      {
        uiFirst = 0;
      }
    }
    else
    {
      uiFirst = 0;
    }
    v18 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    v19 = v5->m_kCharShape.m_kEquip.Equ_RightHand;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v19) )
    {
      if ( (unsigned __int16)v19 <= *(_WORD *)(v18 + 200) )
      {
        v21 = *(_DWORD *)(v18 + 196);
        if ( *(_DWORD *)(v21 + 4 * v19) )
          v20 = *(_DWORD *)(v21 + 4 * v19);
        else
          v20 = 0;
      }
      else
      {
        v20 = 0;
      }
    }
    else
    {
      v20 = 0;
    }
    v22 = 0;
    if ( uiFirst && *(_DWORD *)(uiFirst + 232) != 15 )
      v22 = WeaponAttribTab::GetWeaponAttrib(*(WeaponTypeEnum *)(uiFirst + 232));
    if ( v20 )
    {
      v23 = *(_DWORD *)(v20 + 232);
      if ( v23 != 15 )
        v22 = WeaponAttribTab::GetWeaponAttrib(v23);
    }
    if ( eCode1 == 100000 && eCode2 == 1000 )
    {
      v24 = ((int (__thiscall *)(Char *))v5->vfptr[11].DeleteAbStateByAbstateIndex)(v5);
      if ( v24 )
        uiAniCode = v24;
    }
    if ( v5->m_uiConditionAniLevel )
    {
      v25 = Char::GetCharAniType(eCode1, eCode2);
      v26 = Char::GetConditionAni(v5, (CharAniType)v25);
      if ( v26 )
        uiAniCode = v26;
    }
    if ( v22 && v22->IsUsableInMoving && (eCode1 == 300000 || eCode1 == 600000 || eCode1 == 700000) )
    {
      result = v5->vfptr[10].IsVisible((AbStateInfectee *)v5);
      if ( !result )
        return result;
    }
    else
    {
      result = ((int (__thiscall *)(Char *, unsigned int))v5->vfptr[10].SetAbStateProperty)(v5, uiAniCode);
      if ( !result )
        return result;
    }
    v9 = pkInfo;
  }
  if ( v9 )
  {
    v5->m_kActionMgr.m_pkCurPlayActInfo = v9;
    v27 = v9->uiEventCode;
    v5->m_kActionMgr.m_uiCurEventCode = v27;
    if ( 10000 * (v27 / 0x2710) == 300000 )
      v5->m_kActionMgr.m_pkLastAttackActInfo = v9;
  }
  ActionMgr::SetActionStartTime(&v5->m_kActionMgr, Timer::ms_fCurTime);
  return 1;
}
// 644AC0: could not find valid save-restore pair for ebx
// 644AC0: could not find valid save-restore pair for edi
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (00644D90) --------------------------------------------------------
void __thiscall Char::CancelSkillAction(Char *this, bool bMoveStop)
{
  Char *v2; // esi@1
  void (__thiscall *v3)(Char *); // edx@4
  unsigned int v4; // edi@9
  NiActorManager *v5; // eax@14
  float fOffset; // [sp+14h] [bp+8h]@9

  v2 = this;
  if ( this->m_kActionMgr.m_pkCurPlaySkillViewInfo )
  {
    if ( this->m_kAbStateProperty.iUnMovableCount
      || (unsigned __int8)((int (*)(void))this->vfptr[7].GetAbstateColor)() != 1 )
    {
      v3 = (void (__thiscall *)(Char *))v2->vfptr[10].DeleteAbStateByAbstateIndex;
    }
    else
    {
      v3 = (void (__thiscall *)(Char *))v2->vfptr[11].AddAbStateByAbstateIndex;
    }
    v3(v2);
    ActionMgr::ClearAEEff(&v2->m_kActionMgr);
  }
  Char::ResetSkillAction(v2);
  v2->m_kActionMgr.m_pkCurPlayActInfo = 0;
  *(_WORD *)&v2->m_kActionMgr.m_abActionEff[0] = 0;
  v2->m_kActionMgr.m_abActionEff[2] = 0;
  *(_WORD *)&v2->m_kActionMgr.m_abActionSnd[0] = 0;
  v2->m_bActionHit = 0;
  if ( bMoveStop == 1 )
    ((void (__thiscall *)(_DWORD, _DWORD))v2->vfptr[7].AddAbStateByAbstateIndex)(v2, 1);
  Char::ResetSkillTargetGroundPoint(v2);
  fOffset = 0.0;
  v4 = NiActorManager::INVALID_EVENT_CODE;
  if ( ((int (__thiscall *)(_DWORD))v2->vfptr[13].DeleteAbStateByAbstateIndex)(v2) == 4 )
    goto LABEL_19;
  if ( v2->m_uiLayerAniCode[1] != NiActorManager::INVALID_EVENT_CODE )
    v4 = v2->m_uiLayerAniCode[1];
  if ( v4 == NiActorManager::INVALID_EVENT_CODE )
LABEL_19:
    v4 = v2->m_uiLayerAniCode[0];
  v5 = Char::GetSequence(v2, v4);
  if ( v5 )
    fOffset = v2->m_fAnimationUpdateTime + *(float *)&v5->m_eNextID;
  ((void (__stdcall *)(_DWORD))v2->vfptr->SetAnimationOffset)(LODWORD(fOffset));
}

//----- (00644E90) --------------------------------------------------------
char __thiscall Char::SetTargetAnimation(Char *this, unsigned int uiAniEventCode, bool bForceToAnimate, bool bForceLoopAni)
{
  Char *v4; // esi@1
  NiActorManager *v5; // eax@1
  char result; // al@2
  NiKFMTool *v7; // ecx@6
  NiKFMTool::Transition *v8; // eax@7
  int v9; // ebx@9
  unsigned int v10; // edi@12
  char v11; // ST04_1@14
  char v12; // al@14
  NiControllerSequence *v13; // eax@14
  NiActorManager *v14; // eax@17
  NiActorManager *v15; // edi@17
  unsigned int v16; // ebx@24
  unsigned int uiNumChainAnims; // [sp+4h] [bp-Ch]@9
  NiVBSet *val; // [sp+Ch] [bp-4h]@12
  NiKFMTool::Transition *pkTransition; // [sp+1Ch] [bp+Ch]@7

  v4 = this;
  v5 = this->m_spActor.m_pObject;
  if ( v5 && (bForceToAnimate || !this->m_bWillDead) && !this->m_bAniStop && (v7 = v5->m_spKFMTool.m_pObject) != 0 )
  {
    v8 = NiKFMTool::GetTransition(v7, v5->m_eCurID, uiAniEventCode);
    pkTransition = v8;
    if ( v8 )
    {
      if ( v8->m_eType == 3 )
      {
        v9 = 0;
        uiNumChainAnims = v8->m_aChainInfo.m_uiUsed;
        if ( uiNumChainAnims )
        {
          while ( 1 )
          {
            v10 = v8->m_aChainInfo.m_pBase[v9].m_uiSequenceID;
            if ( !NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
                    (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v4->m_spActor.m_pObject->m_kSequenceMap,
                    v8->m_aChainInfo.m_pBase[v9].m_uiSequenceID,
                    &val)
              || !val )
            {
              v11 = v4->m_kCharShape.m_byGender;
              v12 = Char::GetClass(v4);
              v13 = CharResMgr::GetControllerSequence(&g_kCharResMgr, v12, v11, v10);
              if ( !v13 )
                goto LABEL_18;
              NiActorManager::ChangeSequence(v4->m_spActor.m_pObject, v10, v13);
            }
            if ( ++v9 >= uiNumChainAnims )
              break;
            v8 = pkTransition;
          }
        }
      }
    }
    v14 = Char::GetSequence(v4, uiAniEventCode);
    v15 = v14;
    if ( v14 )
    {
      if ( bForceLoopAni )
      {
        LODWORD(v14->m_fTimelineRefreshTime) = 0;
      }
      else if ( uiAniEventCode == 301000 )
      {
        LODWORD(v14->m_fTimelineRefreshTime) = 2;
      }
      v4->m_uiLayerAniCode[0] = uiAniEventCode;
      if ( v14->m_pkCurSequence == (NiControllerSequence *)1 )
      {
        v16 = NiActorManager::INVALID_EVENT_CODE;
        if ( ((int (__thiscall *)(Char *))v4->vfptr[13].DeleteAbStateByAbstateIndex)(v4) == 4 )
          goto LABEL_34;
        if ( v4->m_uiLayerAniCode[1] != NiActorManager::INVALID_EVENT_CODE )
          v16 = v4->m_uiLayerAniCode[1];
        if ( v16 == NiActorManager::INVALID_EVENT_CODE )
LABEL_34:
          v16 = v4->m_uiLayerAniCode[0];
        if ( uiAniEventCode == v16 )
          *(float *)&v15->m_eNextID = -3.4028235e38;
      }
      NiActorManager::SetTargetAnimation(v4->m_spActor.m_pObject, uiAniEventCode);
      result = 1;
    }
    else
    {
LABEL_18:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00645000) --------------------------------------------------------
char __thiscall Char::SetWeightedTargetAnimation(Char *this, unsigned int uiAniEventCode, eActionWeight eActWeight)
{
  Char *v3; // esi@1
  char result; // al@2
  unsigned int v5; // eax@7

  v3 = this;
  if ( !this->m_spActor.m_pObject || this->m_bWillDead || this->m_bAniStop )
  {
    result = 0;
  }
  else if ( Char::GetSequence(this, uiAniEventCode) )
  {
    v5 = v3->m_uiLayerAniCode[1];
    if ( v5 != NiActorManager::INVALID_EVENT_CODE )
      NiActorManager::DeactivateSequence(v3->m_spActor.m_pObject, v5, 0.0);
    v3->m_uiLayerAniCode[1] = uiAniEventCode;
    NiActorManager::ActivateSequence(
      v3->m_spActor.m_pObject,
      uiAniEventCode,
      eActWeight,
      1,
      1.0,
      0.0,
      NiKFMTool::SYNC_SEQUENCE_ID_NONE);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006450A0) --------------------------------------------------------
void __thiscall Char::OnDead(Char *this)
{
  Char *v1; // esi@1
  MainChar *v2; // ecx@4

  v1 = this;
  Char::RestoreEquipState(this);
  if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v1->vfptr[15].Deaffect)(v1) )
    Char::GetoutOfPet(v1);
  AttackSequenceManager::ClearAttSeq((AttackSequenceManager *)&v1->vfptr);
  AbStateInfectee::ClearAbState((AbStateInfectee *)&v1->vfptr, 1);
  ((void (__thiscall *)(_DWORD, _DWORD))v1->vfptr[8].Deaffect)(v1, LODWORD(Char::ms_fDefaultWalkSpeed));
  ((void (__thiscall *)(_DWORD, _DWORD))v1->vfptr[8].SetAbStateProperty)(v1, LODWORD(Char::ms_fDefaultRunSpeed));
  AttackSequenceManager::ApplicateSkillSeqImmediately((AttackSequenceManager *)&v1->vfptr, v1, 1, 0);
  v1->m_AttackTargetHandle = -1;
  Char::ResetSkillAction(v1);
  if ( v1 == g_pkMainChar )
  {
    MainChar::SetTargetChar((MainChar *)g_pkMainChar, 0);
    g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[0] = 0;
    v2 = (MainChar *)g_pkMainChar;
    g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[8].dwEffectIndex[1] = 0;
    v2->m_kReserveSkillID = -1;
    MainChar::SetStartReserveAct(v2, 0);
    LOBYTE(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[11].dwEffectIndex[0]) = 0;
    BYTE2(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[7].dwEffectIndex[1]) = 0;
  }
}
// A96A54: using guessed type float Char::ms_fDefaultWalkSpeed;
// A96A58: using guessed type float Char::ms_fDefaultRunSpeed;

//----- (00645180) --------------------------------------------------------
void __usercall Char::ActCombatStand(Char *this@<ecx>, int a2@<ebx>, unsigned int a3@<edi>)
{
  Char *v3; // esi@1
  NiActorManager *v4; // ecx@3
  unsigned __int16 *v5; // eax@8
  unsigned int v6; // eax@15
  NiControllerSequence *v7; // eax@19
  unsigned int v8; // ST10_4@20
  unsigned int ui1stCode; // [sp+Ch] [bp-4h]@0

  v3 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[15].Deaffect)() )
  {
    if ( v3->m_kRidePetCtl.m_spPetActor.m_pObject )
    {
      v3->vfptr[11].~AbStateInfectee((AbStateInfectee *)v3);
      v4 = v3->m_kRidePetCtl.m_spPetActor.m_pObject;
      if ( v3->m_kRidePetCtl.m_uiStandEventCode != v4->m_eTargetID )
      {
        if ( v4 )
          NiActorManager::SetTargetAnimation(v4, v3->m_kRidePetCtl.m_uiStandEventCode);
        CRidePetCtl::StartAction(&v3->m_kRidePetCtl, v3->m_kRidePetCtl.m_uiStandEventCode);
      }
    }
    return;
  }
  if ( !v3->m_bUserCharacter )
    goto LABEL_22;
  v5 = &v3->m_kActionMgr.m_pkCurPlaySkillViewInfo->ID;
  if ( !v5 || !IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::GetByID(*v5) )
    goto LABEL_22;
  a3 = NiActorManager::INVALID_EVENT_CODE;
  if ( ((int (__thiscall *)(_DWORD))v3->vfptr[13].DeleteAbStateByAbstateIndex)(v3) == 4 )
  {
    v6 = ui1stCode;
  }
  else
  {
    if ( v3->m_uiLayerAniCode[1] != NiActorManager::INVALID_EVENT_CODE )
      a3 = v3->m_uiLayerAniCode[1];
    if ( a3 == NiActorManager::INVALID_EVENT_CODE )
    {
      a3 = v3->m_uiLayerAniCode[0];
      if ( a3 == NiActorManager::INVALID_EVENT_CODE )
        goto LABEL_22;
    }
    v6 = 10000 * (a3 / 0x2710);
  }
  if ( v6 != 600000 && v6 != 700000
    || (v7 = NiActorManager::GetSequence(v3->m_spActor.m_pObject, v3->m_uiLayerAniCode[1])) == 0 )
  {
LABEL_22:
    Char::ActAction(v3, a2, a3, STAND, COMBATSTAND);
    return;
  }
  *(float *)&v8 = (v7->m_fEndKeyTime - v7->m_fBeginKeyTime) / v7->m_fFrequency;
  if ( *(float *)&v8 > (double)v7->m_fLastScaledTime )
    ((void (__thiscall *)(_DWORD, _DWORD))v3->vfptr[11].Affect)(v3, v7->m_fLastTime);
}

//----- (006452E0) --------------------------------------------------------
void __userpurge Char::OnWarpMove(Char *this@<ecx>, int a2@<esi>, SHINE_XY_TYPE targetpoint, int SkillID)
{
  Char *v4; // edi@1
  int v5; // ebx@2
  int v6; // esi@2
  int *v7; // eax@4
  int v8; // eax@5
  int v9; // eax@6
  float v10; // ST10_4@8
  float fCurTime; // ST0C_4@8
  AbStateInfecteeVtbl *v12; // edx@9
  void (__thiscall *v13)(AbStateInfectee *, ABSTATEINDEX, bool, int); // edx@9
  float v14; // ST14_4@10
  float v15; // ST10_4@10
  double v16; // st7@11
  int v17; // [sp+18h] [bp-30h]@2
  NiPoint3 kCurPos; // [sp+24h] [bp-24h]@9
  NiPoint3 pos; // [sp+30h] [bp-18h]@9
  char v20[12]; // [sp+3Ch] [bp-Ch]@9
  float SkillIDa; // [sp+58h] [bp+10h]@9
  float SkillIDb; // [sp+58h] [bp+10h]@9
  float SkillIDc; // [sp+58h] [bp+10h]@13

  v4 = this;
  if ( !(unsigned __int8)((int (*)(void))this->vfptr[10].Affect)() )
  {
    v5 = SkillID;
    v17 = a2;
    v6 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                          + 16))(
                            ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                            SkillID) )
    {
      if ( (unsigned __int16)SkillID <= *(_WORD *)(v6 + 200) )
      {
        v7 = (int *)(*(_DWORD *)(v6 + 196) + 4 * (unsigned __int16)SkillID);
        if ( *v7 )
        {
          v8 = *v7;
          if ( v8 )
          {
            v9 = *(_DWORD *)(v8 + 531);
            if ( v9 == 36 || v9 == 38 )
            {
              pos.x = (double)targetpoint.x;
              v12 = v4->vfptr;
              pos.y = (double)targetpoint.y;
              v13 = v12[6].SetAbStateProperty;
              pos.z = 0.0;
              ((void (__thiscall *)(Char *, NiPoint3 *, int))v13)(v4, &kCurPos, v17);
              *(float *)v20 = kCurPos.x - pos.x;
              kCurPos = *(NiPoint3 *)v20;
              *(float *)&v20[4] = kCurPos.y - pos.y;
              *(float *)&v20[8] = 0.0 - pos.z;
              SkillIDa = *(float *)&v20[4] * *(float *)&v20[4]
                       + *(float *)v20 * *(float *)v20
                       + *(float *)&v20[8] * *(float *)&v20[8];
              SkillIDb = sqrt(SkillIDa);
              if ( SkillIDb >= 40.0 )
              {
                Char::Move(v4, v5, &pos, Timer::ms_fCurTime, 0, (NiPoint3 *)&Char::INVALIDPOINT3, 0);
                v16 = v4->m_fSaveCharSpeed;
                if ( 0.0 == v16 )
                {
                  ((void (__thiscall *)(Char *))v4->vfptr[8].AddAbStateByAbstateIndex)(v4);
                  v4->m_fSaveCharSpeed = v16;
                  PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
                }
                SkillIDc = v4->m_fSaveCharSpeed * 10.0;
                ((void (__thiscall *)(Char *))v4->vfptr[8].SetAbStateProperty)(v4);
              }
              else
              {
                v14 = (double)targetpoint.y;
                v15 = (double)targetpoint.x;
                ((void (__thiscall *)(Char *, _DWORD, _DWORD))v4->vfptr[7].IsVisible)(v4, LODWORD(v15), LODWORD(v14));
              }
            }
            else
            {
              v10 = (double)targetpoint.y;
              fCurTime = (double)targetpoint.x;
              ((void (__thiscall *)(Char *, _DWORD, _DWORD, signed int))v4->vfptr[7].IsVisible)(
                v4,
                LODWORD(fCurTime),
                LODWORD(v10),
                1);
            }
          }
        }
      }
    }
  }
}
// 6452E0: could not find valid save-restore pair for esi
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (00645500) --------------------------------------------------------
void __userpurge Char::Attack(Char *this@<ecx>, int a2@<ebx>, Char *pkChar, char ucAttackNo)
{
  Char *v4; // esi@1
  bool v5; // zf@3
  unsigned __int16 v6; // ax@3

  v4 = this;
  if ( pkChar && pkChar != this )
  {
    ((void (__stdcall *)(_DWORD))this->vfptr[8].~AbStateInfectee)(pkChar);
    v5 = v4->m_bUserCharacter == 0;
    v6 = pkChar->m_kHandle;
    v4->m_AttackTargetHandle = v6;
    v4->m_ReservedHitCharHandle = v6;
    v4->m_AttackTargetHandle = pkChar->m_kHandle;
    if ( v5 )
      ((void (__thiscall *)(_DWORD))v4->vfptr[14].DeleteAbStateByAbstateIndex)(v4);
    switch ( ucAttackNo )
    {
      case 0:
        ((void (__thiscall *)(_DWORD))v4->vfptr[14].DeleteAbStateByAbstateIndex)(v4);
        v4->vfptr[19].GetAbstateColor((AbStateInfectee *)v4);
        return;
      case 1:
        v4->vfptr[14].GetAbstateColor((AbStateInfectee *)v4);
        v4->vfptr[19].GetAbstateColor((AbStateInfectee *)v4);
        return;
      case 2:
        v4->vfptr[14].~AbStateInfectee((AbStateInfectee *)v4);
        v4->vfptr[19].GetAbstateColor((AbStateInfectee *)v4);
        return;
      case 3:
        ((void (__thiscall *)(_DWORD))v4->vfptr[13].Deaffect)(v4);
        Char::ActAction(v4, a2, (int)pkChar, ATTACK, ATTACK2_1);
        goto LABEL_10;
      case 4:
        ((void (__thiscall *)(_DWORD))v4->vfptr[13].Deaffect)(v4);
        Char::ActAction(v4, a2, (int)pkChar, ATTACK, ATTACK2_2);
        goto LABEL_10;
      case 5:
        ((void (__thiscall *)(_DWORD))v4->vfptr[13].Deaffect)(v4);
        Char::ActAction(v4, a2, (int)pkChar, ATTACK, ATTACK2_3);
LABEL_10:
        CharShape::StartWeaponAfterImgEff(&v4->m_kCharShape, v4->m_fAnimationUpdateTime, 1.5);
        v4->vfptr[19].GetAbstateColor((AbStateInfectee *)v4);
        return;
      case 6:
        Char::ActAction(v4, a2, (int)pkChar, ATTACK, ATTACK_CRI1_1);
        break;
      case 7:
        Char::ActAction(v4, a2, (int)pkChar, ATTACK, ATTACK_CRI1_2);
        break;
      default:
        break;
    }
    v4->vfptr[19].GetAbstateColor((AbStateInfectee *)v4);
  }
}

//----- (00645690) --------------------------------------------------------
char __thiscall Char::CancelSkillActionWhenHitTimePassed(Char *this)
{
  Char *v1; // esi@1
  char result; // al@4

  v1 = this;
  if ( !(unsigned __int8)((int (*)(void))this->vfptr[15].AddAbStateByAbstateIndex)()
    || v1->m_uiSkillActStep != 6
    || v1->m_lstfHitTime._Mysize )
  {
    result = 0;
  }
  else
  {
    Char::CancelSkillAction(v1, 1);
    result = 1;
  }
  return result;
}

//----- (006456D0) --------------------------------------------------------
void __usercall Char::ActWalk(Char *this@<ecx>, int a2@<ebx>, int a3@<edi>, double a4@<st0>)
{
  Char *v4; // esi@1
  NiActorManager *v5; // ecx@3
  float fSpeed; // ST04_4@8

  v4 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[15].Deaffect)() )
  {
    if ( v4->m_kRidePetCtl.m_spPetActor.m_pObject )
    {
      v4->vfptr[11].GetAbstateColor((AbStateInfectee *)v4);
      v5 = v4->m_kRidePetCtl.m_spPetActor.m_pObject;
      if ( v4->m_kRidePetCtl.m_uiWalkEventCode != v5->m_eTargetID )
      {
        if ( v5 )
          NiActorManager::SetTargetAnimation(v5, v4->m_kRidePetCtl.m_uiWalkEventCode);
        CRidePetCtl::StartAction(&v4->m_kRidePetCtl, v4->m_kRidePetCtl.m_uiWalkEventCode);
      }
    }
  }
  else
  {
    Char::ActAction(v4, a2, a3, MOVE, NORMALSTAND);
  }
  v4->vfptr[8].IsVisible((AbStateInfectee *)v4);
  fSpeed = a4;
  MoveToTarget::ChangeSpeed(&v4->m_kMoveToTarget, fSpeed);
}

//----- (00645760) --------------------------------------------------------
void __usercall Char::ActRun(Char *this@<ecx>, int a2@<ebx>, int a3@<edi>, double a4@<st0>)
{
  Char *v4; // esi@1
  NiActorManager *v5; // ecx@3
  float fSpeed; // ST04_4@8

  v4 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[15].Deaffect)() )
  {
    if ( v4->m_kRidePetCtl.m_spPetActor.m_pObject )
    {
      v4->vfptr[11].GetAbstateColor((AbStateInfectee *)v4);
      v5 = v4->m_kRidePetCtl.m_spPetActor.m_pObject;
      if ( v4->m_kRidePetCtl.m_uiRunEventCode != v5->m_eTargetID )
      {
        if ( v5 )
          NiActorManager::SetTargetAnimation(v5, v4->m_kRidePetCtl.m_uiRunEventCode);
        CRidePetCtl::StartAction(&v4->m_kRidePetCtl, v4->m_kRidePetCtl.m_uiRunEventCode);
      }
    }
  }
  else
  {
    Char::ActAction(v4, a2, a3, MOVE, COMBATSTAND);
  }
  ((void (__thiscall *)(Char *))v4->vfptr[8].AddAbStateByAbstateIndex)(v4);
  fSpeed = a4;
  MoveToTarget::ChangeSpeed(&v4->m_kMoveToTarget, fSpeed);
}

//----- (006457F0) --------------------------------------------------------
void __usercall Char::ActCriticalStun(Char *this@<ecx>, int a2@<ebx>, int a3@<edi>)
{
  Char *v3; // esi@1

  v3 = this;
  ((void (*)(void))this->vfptr[13].Deaffect)();
  v3->m_fAnimationSpeed = 1.0;
  AttackSequenceManager::HardStopAttack((AttackSequenceManager *)&v3->vfptr);
  Char::ActAction(v3, a2, a3, DAMAGE, COMBATSTAND);
}

//----- (00645820) --------------------------------------------------------
void __usercall Char::ActDamage1(Char *this@<ecx>, int a2@<ebx>, int a3@<edi>)
{
  Char *v3; // esi@1

  v3 = this;
  ((void (*)(void))this->vfptr[13].Deaffect)();
  v3->m_fAnimationSpeed = 1.0;
  Char::ActAction(v3, a2, a3, DAMAGE, NORMALSTAND);
}

//----- (00645850) --------------------------------------------------------
void __usercall Char::ActDie1(Char *this@<ecx>, int a2@<ebx>, int a3@<edi>)
{
  this->m_fAnimationSpeed = 1.0;
  Char::ActAction(this, a2, a3, DIE, NORMALSTAND);
}

//----- (00645870) --------------------------------------------------------
void __usercall Char::ActAttack1_1(Char *this@<ecx>, int a2@<ebx>, int a3@<edi>)
{
  Char *v3; // esi@1

  v3 = this;
  ((void (*)(void))this->vfptr[13].Deaffect)();
  Char::ActAction(v3, a2, a3, ATTACK, NORMALSTAND);
  CharShape::StartWeaponAfterImgEff(&v3->m_kCharShape, v3->m_fAnimationUpdateTime, 1.5);
}

//----- (006458C0) --------------------------------------------------------
void __usercall Char::ActAttack1_2(Char *this@<ecx>, int a2@<ebx>, int a3@<edi>)
{
  Char *v3; // esi@1

  v3 = this;
  ((void (*)(void))this->vfptr[13].Deaffect)();
  Char::ActAction(v3, a2, a3, ATTACK, COMBATSTAND);
  CharShape::StartWeaponAfterImgEff(&v3->m_kCharShape, v3->m_fAnimationUpdateTime, 1.5);
}

//----- (00645910) --------------------------------------------------------
void __usercall Char::ActAttack1_3(Char *this@<ecx>, int a2@<ebx>, int a3@<edi>)
{
  Char *v3; // esi@1

  v3 = this;
  ((void (*)(void))this->vfptr[13].Deaffect)();
  Char::ActAction(v3, a2, a3, ATTACK, SKILLSTAND_1);
  CharShape::StartWeaponAfterImgEff(&v3->m_kCharShape, v3->m_fAnimationUpdateTime, 1.5);
}

//----- (00645960) --------------------------------------------------------
void __thiscall Char::ActSkill(Char *this, Char *pkChar, Skill::Type eSkillType, int kSkillID)
{
  Char *v4; // esi@1
  NiNode *v5; // edi@2
  NiPoint3 *v6; // eax@2
  float v7; // ST18_4@2
  float v8; // ST1C_4@2
  float v9; // ST20_4@2
  double v10; // st7@3
  bool v11; // ST08_1@7
  int v12; // edi@12
  ActiveSkillViewInfo **v13; // eax@14
  ActiveSkillViewInfo *v14; // eax@15
  void (__thiscall *v15)(AttackSequenceManager *, float); // eax@19
  float fLengthToMainChar; // [sp+24h] [bp-4h]@2
  Skill::Type eSkillTypea; // [sp+34h] [bp+Ch]@2
  Skill::Type eSkillTypeb; // [sp+34h] [bp+Ch]@2
  Skill::Type eSkillTypec; // [sp+34h] [bp+Ch]@5

  v4 = this;
  if ( eSkillType == 1 )
  {
    ((void (*)(void))this->vfptr[13].Deaffect)();
    v5 = v4->m_spScene.m_pObject;
    v6 = World::GetCameraLookAtPos(&g_kWorld);
    v7 = v6->x - v5->m_kLocal.m_Translate.x;
    v8 = v6->y - v5->m_kLocal.m_Translate.y;
    v9 = v6->z - v5->m_kLocal.m_Translate.z;
    *(float *)&eSkillTypea = v8 * v8 + v7 * v7 + v9 * v9;
    *(float *)&eSkillTypeb = sqrt(*(float *)&eSkillTypea);
    fLengthToMainChar = *(float *)&eSkillTypeb;
    v10 = Char::IsNPC(v4) ? v4->m_fMaxViewLength + 500.0 : v4->m_fMaxViewLength;
    *(float *)&eSkillTypec = v10;
    if ( fLengthToMainChar <= (double)*(float *)&eSkillTypec )
    {
      Char::SetActionEffectStartTime(v4);
      AttackSequenceManager::ApplicateSkillSeqImmediately((AttackSequenceManager *)&v4->vfptr, v4, 1, 0);
      if ( AbStateInfectee::SubAbIsInList((AbStateInfectee *)&v4->vfptr, SUBAB_KNOCKBACK) )
      {
        Char::CancelSkillAction(v4, 0);
      }
      else
      {
        v11 = Skill::IsMovingSkill(kSkillID) == 0;
        Char::CancelSkillAction(v4, v11);
      }
      v4->m_AttackTargetHandle = pkChar ? pkChar->m_kHandle : -1;
      v4->m_ReservedHitCharHandle = v4->m_AttackTargetHandle;
      v12 = ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable,
                              kSkillID) )
      {
        if ( (unsigned __int16)kSkillID <= *(_WORD *)(v12 + 200) )
        {
          v13 = (ActiveSkillViewInfo **)(*(_DWORD *)(v12 + 196) + 4 * (unsigned __int16)kSkillID);
          if ( *v13 )
          {
            v14 = *v13;
            if ( v14 )
            {
              v4->m_kActionMgr.m_pkCurPlaySkillViewInfo = v14;
              v4->m_uiSkillActStep = 0;
              if ( pkChar )
              {
                if ( pkChar != v4 )
                  ((void (__thiscall *)(Char *, Char *))v4->vfptr[8].~AbStateInfectee)(v4, pkChar);
              }
              v15 = v4->vfptr->SetAnimationSpeed;
              v4->m_bReserveSkillSmash = 0;
              ((void (__stdcall *)(_DWORD))v15)(1.0);
            }
          }
        }
      }
    }
  }
}
// A8CAA0: using guessed type int ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable;

//----- (00645B00) --------------------------------------------------------
void __thiscall Char::ActSkill(Char *this, unsigned int x, unsigned int y, Skill::Type eSkillType, int kSkillID)
{
  Char *v5; // esi@1
  NiNode *v6; // edi@2
  NiPoint3 *v7; // eax@2
  double v8; // st7@3
  bool v9; // ST08_1@7
  int v10; // edi@9
  ActiveSkillViewInfo **v11; // eax@11
  ActiveSkillViewInfo *v12; // eax@12
  AbStateInfecteeVtbl *v13; // edx@13
  void (__thiscall *v14)(AbStateInfectee *, AbStateInst *, bool); // edx@13
  void (__thiscall *v15)(AttackSequenceManager *, float); // edx@13
  float v16; // [sp+18h] [bp-10h]@2
  float v17; // [sp+1Ch] [bp-Ch]@2
  float v18; // [sp+20h] [bp-8h]@2
  float fLengthToMainChar; // [sp+24h] [bp-4h]@2
  Skill::Type eSkillTypea; // [sp+38h] [bp+10h]@2
  float eSkillTypeb; // [sp+38h] [bp+10h]@2
  Skill::Type eSkillTypec; // [sp+38h] [bp+10h]@5

  v5 = this;
  if ( eSkillType == 1 )
  {
    ((void (*)(void))this->vfptr[13].Deaffect)();
    v6 = v5->m_spScene.m_pObject;
    v7 = World::GetCameraLookAtPos(&g_kWorld);
    v16 = v7->x - v6->m_kLocal.m_Translate.x;
    v17 = v7->y - v6->m_kLocal.m_Translate.y;
    v18 = v7->z - v6->m_kLocal.m_Translate.z;
    *(float *)&eSkillTypea = v16 * v16 + v17 * v17 + v18 * v18;
    eSkillTypeb = sqrt(*(float *)&eSkillTypea);
    fLengthToMainChar = eSkillTypeb;
    v8 = Char::IsNPC(v5) ? v5->m_fMaxViewLength + 500.0 : v5->m_fMaxViewLength;
    *(float *)&eSkillTypec = v8;
    if ( fLengthToMainChar <= (double)*(float *)&eSkillTypec )
    {
      AttackSequenceManager::ApplicateSkillSeqImmediately((AttackSequenceManager *)&v5->vfptr, v5, 1, 0);
      if ( AbStateInfectee::SubAbIsInList((AbStateInfectee *)&v5->vfptr, SUBAB_KNOCKBACK) )
      {
        Char::CancelSkillAction(v5, 0);
      }
      else
      {
        v9 = Skill::IsMovingSkill(kSkillID) == 0;
        Char::CancelSkillAction(v5, v9);
      }
      v10 = ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable,
                              kSkillID) )
      {
        if ( (unsigned __int16)kSkillID <= *(_WORD *)(v10 + 200) )
        {
          v11 = (ActiveSkillViewInfo **)(*(_DWORD *)(v10 + 196) + 4 * (unsigned __int16)kSkillID);
          if ( *v11 )
          {
            v12 = *v11;
            if ( v12 )
            {
              v5->m_uiSkillActStep = 0;
              v5->m_kActionMgr.m_pkCurPlaySkillViewInfo = v12;
              v16 = (double)x;
              v13 = v5->vfptr;
              v17 = (double)y;
              v14 = v13[9].Affect;
              v18 = 0.0;
              ((void (__thiscall *)(Char *, float *))v14)(v5, &v16);
              v15 = v5->vfptr->SetAnimationSpeed;
              v5->m_bReserveSkillSmash = 0;
              ((void (__thiscall *)(AttackSequenceManagerVtbl **, _DWORD))v15)(&v5->vfptr, 1.0);
            }
          }
        }
      }
    }
  }
}
// A8CAA0: using guessed type int ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable;

//----- (00645C90) --------------------------------------------------------
char __thiscall Char::RideOn(Char *this, Char *pkMover, NiPointer<NiNode> spMoverCarrierNode, bool bViewChar, unsigned int uiSlot)
{
  Char *v5; // esi@1
  Mover *v6; // edi@1
  NiNode *v7; // esi@2
  NiActorManager *v9; // eax@8
  NiActorManager *v10; // ebx@8
  NiNode *v11; // esi@11
  NiNode *v12; // ebx@16
  NiAVObject *v13; // ecx@22
  NiPoint3 kPos; // [sp+2Ch] [bp-20h]@22
  NiPointer<NiActorManager> spMoverActor; // [sp+38h] [bp-14h]@8
  NiPointer<NiNode> spMoverNode; // [sp+3Ch] [bp-10h]@16
  int v17; // [sp+48h] [bp-4h]@1

  v5 = this;
  v6 = (Mover *)pkMover;
  v17 = 0;
  if ( !pkMover )
  {
    v7 = spMoverCarrierNode.m_pObject;
    v17 = -1;
    if ( spMoverCarrierNode.m_pObject
      && !InterlockedDecrement((volatile LONG *)&spMoverCarrierNode.m_pObject->m_uiRefCount) )
    {
      if ( v7 )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    }
    return 0;
  }
  if ( !spMoverCarrierNode.m_pObject )
    return 0;
  v9 = (NiActorManager *)pkMover->vfptr->GetActor(&pkMover->vfptr);
  v10 = v9;
  spMoverActor.m_pObject = v9;
  if ( v9 )
    InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  if ( v10 )
  {
    v12 = (NiNode *)v10->m_spNIFRoot.m_pObject;
    spMoverNode.m_pObject = v12;
    if ( v12 )
      InterlockedIncrement((volatile LONG *)&v12->m_uiRefCount);
    LOBYTE(v17) = 2;
    if ( v12 )
    {
      Mover::GetSlotNode(v6, (NiPointer<NiNode> *)&pkMover, uiSlot);
      LOBYTE(v17) = 3;
      if ( pkMover )
      {
        ((void (__cdecl *)(NiNode *, _DWORD))spMoverCarrierNode.m_pObject->vfptr[29].__vecDelDtor)(
          v5->m_spCharNode.m_pObject,
          0);
        v13 = (NiAVObject *)&v5->m_spCharNode.m_pObject->vfptr;
        v5->m_fChairHeight = *(float *)&pkMover->m_iLastAttSeqCode;
        NiAVObject::SetRotate(v13, NI_PI, 0.0, 0.0, 1.0);
        ((void (__cdecl *)(NiNode *, _DWORD))pkMover->vfptr[3].DeleteAbStateByAbstateIndex)(
          v5->m_spCharNode.m_pObject,
          0);
        NiAVObject::SetAppCulled((NiAVObject *)&v5->m_spCharNode.m_pObject->vfptr, bViewChar == 0);
        v5->m_uiMoverSlot = uiSlot;
        v5->m_pkMover = v6;
        v5->m_kMoverHandle = v6->m_kHandle;
        Char::SetMode(v5, 6);
        ((void (__thiscall *)(Mover *, NiPoint3 *))v6->vfptr[6].SetAbStateProperty)(v6, &kPos);
        v5->m_spScene.m_pObject->m_kLocal.m_Translate = kPos;
        NiAVObject::Update((NiAVObject *)&v12->vfptr, 0.0, 1);
        NiAVObject::UpdateEffects((NiAVObject *)&v12->vfptr);
        NiAVObject::UpdateProperties((NiAVObject *)&v12->vfptr);
        NiAVObject::Update((NiAVObject *)&v5->m_spCharNode.m_pObject->vfptr, 0.0, 1);
        NiAVObject::UpdateEffects((NiAVObject *)&v5->m_spCharNode.m_pObject->vfptr);
        NiAVObject::UpdateProperties((NiAVObject *)&v5->m_spCharNode.m_pObject->vfptr);
        NiAVObject::Update((NiAVObject *)&v5->m_spScene.m_pObject->vfptr, 0.0, 1);
        NiAVObject::UpdateEffects((NiAVObject *)&v5->m_spScene.m_pObject->vfptr);
        NiAVObject::UpdateProperties((NiAVObject *)&v5->m_spScene.m_pObject->vfptr);
        LOBYTE(v17) = 2;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkMover);
        LOBYTE(v17) = 1;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spMoverNode);
        LOBYTE(v17) = 0;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spMoverActor);
        v17 = -1;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spMoverCarrierNode);
        return 1;
      }
      LOBYTE(v17) = 2;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkMover);
    }
    LOBYTE(v17) = 1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spMoverNode);
    LOBYTE(v17) = 0;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spMoverActor);
    v17 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spMoverCarrierNode);
    return 0;
  }
  v11 = spMoverCarrierNode.m_pObject;
  v17 = -1;
  if ( spMoverCarrierNode.m_pObject
    && !InterlockedDecrement((volatile LONG *)&spMoverCarrierNode.m_pObject->m_uiRefCount)
    && v11 )
  {
    v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
  }
  return 0;
}
// B622CC: using guessed type const float NI_PI;

//----- (00645F70) --------------------------------------------------------
char __thiscall Char::RideOff(Char *this)
{
  Char *v1; // esi@1
  Mover *v2; // ecx@1
  int v3; // eax@2
  void (__thiscall *v4)(AbStateInfectee *); // edx@2
  float v5; // eax@2
  float v6; // ecx@2
  int v7; // eax@2
  void (__thiscall *v8)(AbStateInfectee *, AbStateInst *, bool); // edx@2
  NiTArray<NiPointer<NiGeometry> > *v9; // ecx@3
  NiNode *v10; // ecx@3
  char v11; // bl@3
  bool (__thiscall *v12)(AbStateInfectee *, ABSTATEINDEX, float, bool); // edx@3
  NiPoint3 kDir; // [sp+20h] [bp-18h]@2
  NiPoint3 kPos; // [sp+2Ch] [bp-Ch]@2

  v1 = this;
  v2 = this->m_pkMover;
  if ( v2 )
  {
    v3 = ((int (*)(void))v2->vfptr[6].Deaffect)();
    kPos.x = *(float *)v3;
    kPos.y = *(float *)(v3 + 4);
    v4 = v1->vfptr[5].~AbStateInfectee;
    kPos.z = *(float *)(v3 + 8);
    ((void (__thiscall *)(Char *, NiPoint3 *))v4)(v1, &kPos);
    v1->m_spScene.m_pObject->m_kLocal.m_Translate = kPos;
    v5 = kPos.y;
    v6 = kPos.z;
    v1->m_pos3CameraPos.x = kPos.x;
    v1->m_pos3CameraPos.y = v5;
    v1->m_pos3CameraPos.z = v6;
    v7 = ((int (*)(void))v1->m_pkMover->vfptr[6].DeleteAbStateByAbstateIndex)();
    kDir.x = *(float *)v7;
    kDir.y = *(float *)(v7 + 4);
    v8 = v1->vfptr[6].Affect;
    kDir.z = *(float *)(v7 + 8);
    ((void (__thiscall *)(Char *, NiPoint3 *))v8)(v1, &kDir);
  }
  v9 = (NiTArray<NiPointer<NiGeometry> > *)&v1->m_spCarrierNode.m_pObject->m_kChildren;
  v1->m_uiLayerAniCode[1] = NiActorManager::INVALID_EVENT_CODE;
  v1->m_pkMover = 0;
  NiTArray<NiPointer<NiNode>>::RemoveAll(v9);
  v10 = v1->m_spCharNode.m_pObject;
  v1->m_fChairHeight = 0.0;
  NiMatrix3::MakeRotation(&v10->m_kLocal.m_Rotate, 0.0, 0.0, 0.0, 1.0);
  v1->m_spCharNode.m_pObject->m_uFlags &= 0xFFFEu;
  ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spCtrlNode.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spCharNode.m_pObject,
    0);
  NiAVObject::Update((NiAVObject *)&v1->m_spCharNode.m_pObject->vfptr, 0.0, 1);
  NiAVObject::UpdateEffects((NiAVObject *)&v1->m_spCharNode.m_pObject->vfptr);
  NiAVObject::UpdateProperties((NiAVObject *)&v1->m_spCharNode.m_pObject->vfptr);
  v11 = ((int (__thiscall *)(Char *))v1->vfptr[1].AddAbStateByAbstateIndex)(v1);
  v12 = v1->vfptr[1].AddAbStateByAbstateIndex;
  v1->m_byMode = 1;
  v1->m_eStandMode = 0;
  if ( v11 != (unsigned __int8)((int (__thiscall *)(Char *))v12)(v1) )
    v1->m_bIsChangeCampMode = 1;
  ((void (__thiscall *)(Char *))v1->vfptr[10].DeleteAbStateByAbstateIndex)(v1);
  return 1;
}

//----- (00646100) --------------------------------------------------------
char __thiscall Char::AnimationStopWhenHitTime(Char *this)
{
  Char *v1; // edi@1
  unsigned int v2; // ebx@3
  NiActorManager *v3; // eax@8
  unsigned int v4; // edx@12
  float v5; // ST10_4@12
  float v6; // ST10_4@13
  float fLastTime; // [sp+10h] [bp-4h]@9

  v1 = this;
  if ( *(&this->m_bShow + 1) )
  {
    if ( !*(_DWORD *)&this->m_acLinkGateName[18] )
      return 1;
    v2 = NiActorManager::INVALID_EVENT_CODE;
    if ( (*(int (__thiscall **)(std::allocator<char> *))(*(_DWORD *)&this[-1].m_kRestHouseShader.m_kShaderName2._Alval.0
                                                       + 436))(&this[-1].m_kRestHouseShader.m_kShaderName2._Alval) == 4 )
      goto LABEL_18;
    if ( v1->m_kJumpProcessor.m_kEffect.vfptr != (NsEffectVtbl *)NiActorManager::INVALID_EVENT_CODE )
      v2 = (unsigned int)v1->m_kJumpProcessor.m_kEffect.vfptr;
    if ( v2 == NiActorManager::INVALID_EVENT_CODE )
LABEL_18:
      v2 = v1->m_kJumpProcessor.m_uiResultLandingCode;
    v3 = Char::GetSequence((Char *)((char *)v1 - 88), v2);
    if ( !v3 )
      return 1;
    fLastTime = v3->m_fTransEndTime;
    if ( *(_WORD *)&v1->m_CharTitleName[251] == g_pkMainChar->m_kHandle
      && Char::IsAniState((Char *)((char *)v1 - 88), ANIMATING) == 1 )
    {
      if ( *(_DWORD *)&v1->m_mapEnemyCamShake._Alnod.0 )
      {
        v4 = v1->m_mapEnemyCamShake._Mysize;
        v5 = *(float *)(*(_DWORD *)v4 + 8) - fLastTime;
        if ( v5 > 0.05000000074505806 )
        {
          v6 = *(float *)(*(_DWORD *)v4 + 8) - 0.009999999776482582;
          ((void (__thiscall *)(Char *, _DWORD))v1->vfptr->IsVisible)(v1, LODWORD(v6));
          ((void (__thiscall *)(Char *, _DWORD))v1->vfptr->SetAbStateProperty)(v1, 0.0);
          return 1;
        }
      }
    }
  }
  return 0;
}

//----- (00646200) --------------------------------------------------------
char __thiscall Char::Shoot(Char *this)
{
  Char *v1; // ebx@1
  char result; // al@2
  NiTListItem<SkillSequence *> *v3; // esi@4
  SkillSequence *v4; // eax@5
  ActiveSkillViewInfo *v5; // esi@6
  float fSpeed; // ST18_4@7
  NiTListItem<SkillSequence *> *v7; // eax@9
  NiTListItem<SkillSequence *> *v8; // ecx@9
  SkillSequence *v9; // edi@12
  DamageInfoSet DamInfoSet; // [sp+24h] [bp-30h]@3
  NiPoint3 kPos; // [sp+34h] [bp-20h]@8
  Char *pkTarget; // [sp+44h] [bp-10h]@1
  int v13; // [sp+50h] [bp-4h]@3

  v1 = this;
  pkTarget = CharMgr::GetChar(&g_kCharMgr, this->m_AttackTargetHandle);
  if ( pkTarget )
  {
    DamInfoSet.kDamageList.m_kAllocator.m_uiCount = 0;
    DamInfoSet.kDamageList.m_pkHead = 0;
    DamInfoSet.kDamageList.m_pkTail = 0;
    DamInfoSet.kDamageList.vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTList<DamageInfo *>::`vftable';
    v13 = 0;
    if ( v1->m_kSkillSeqList.m_kAllocator.m_uiCount )
    {
      v3 = v1->m_kSkillSeqList.m_pkHead;
      while ( v3 )
      {
        v4 = v3->m_element;
        v3 = v3->m_pkNext;
        DamageInfoSet::CopyFrom(&DamInfoSet, &v4->kDamageInfoSet);
      }
      v5 = v1->m_kActionMgr.m_pkCurPlaySkillViewInfo;
      if ( strcmp(v5->ShoEffect, (const char *)&unk_9B9580) )
      {
        fSpeed = (double)v5->ShoEfSpd;
        EffectMgr::CreateShootEff(
          &g_kEffectMgr,
          v5->ShoEffect,
          v5->LastEffectA,
          v5->LastEfASnd,
          v1,
          pkTarget,
          Timer::ms_fCurTime,
          fSpeed,
          &DamInfoSet,
          v5->eLastEffPos,
          1);
      }
      Char::GetRightHandPos(v1, &kPos);
      SoundMgr::CreateSound(&g_kSoundMgr, v5->ShoSnd, &kPos);
      while ( v1->m_kSkillSeqList.m_kAllocator.m_uiCount )
      {
        v7 = v1->m_kSkillSeqList.m_pkHead;
        v8 = v7->m_pkNext;
        v1->m_kSkillSeqList.m_pkHead = v7->m_pkNext;
        if ( v8 )
          v8->m_pkPrev = 0;
        else
          v1->m_kSkillSeqList.m_pkTail = 0;
        v9 = v7->m_element;
        v1->m_kSkillSeqList.vfptr->DeleteItem(
          (NiTListBase<DFALL<SkillSequence *>,SkillSequence *> *)&v1->m_kSkillSeqList,
          v7);
        --v1->m_kSkillSeqList.m_kAllocator.m_uiCount;
        if ( v9 )
        {
          DamageInfoSet::~DamageInfoSet(&v9->kDamageInfoSet);
          operator delete(v9);
        }
      }
    }
    v13 = -1;
    DamageInfoSet::~DamageInfoSet(&DamInfoSet);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 973DFC: using guessed type int (__thiscall *NiTList<DamageInfo *>::`vftable')(void *p, char);
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006463C0) --------------------------------------------------------
void __thiscall Char::UpdateSkillAnimation(Char *this, float fTime)
{
  Char *v2; // esi@1
  ActiveSkillViewInfo *v3; // edi@5
  eActionWeight v4; // ebx@5
  unsigned int v5; // edx@9
  AttackSequenceManagerVtbl *v6; // ebx@12
  ActiveSkillViewInfo *v7; // edi@17
  eActionWeight v8; // ebx@17
  ActiveSkillViewInfo *v9; // edi@21
  ActiveSkillInfo *v10; // eax@21
  bool v11; // zf@21
  SkillSpecial v12; // eax@21
  unsigned int v13; // edi@26
  NiActorManager *v14; // eax@31
  bool v15; // al@34
  AbStateInfecteeVtbl *v16; // edx@34
  unsigned int v17; // edi@35
  float v18; // eax@40
  unsigned __int16 *v19; // eax@53
  float v20; // eax@63
  float v21; // ecx@63
  void (__thiscall *v22)(AbStateInfectee *, ABSTATEINDEX, bool, int); // edx@63
  Char *v23; // ecx@64
  bool v24; // al@66
  NiPoint3 v25; // [sp+14h] [bp-24h]@63
  NiPoint3 kCurPos; // [sp+20h] [bp-18h]@63
  float v27; // [sp+2Ch] [bp-Ch]@63
  double v28; // [sp+30h] [bp-8h]@10
  ActiveSkillInfo *bLastHitTime; // [sp+40h] [bp+8h]@5
  unsigned int *bLastHitTimea; // [sp+40h] [bp+8h]@9
  float bLastHitTimec; // [sp+40h] [bp+8h]@12
  bool bLastHitTimeb; // [sp+40h] [bp+8h]@55

  v2 = this;
  if ( !this->m_spActor.m_pObject )
    return;
  CharShape::Update(&this->m_kCharShape, fTime);
  switch ( v2->m_uiSkillActStep )
  {
    case 0u:
      v2->m_uiSkillActStep = 1;
      v2->m_fSkillActionStartTime = fTime;
      goto LABEL_65;
    case 1u:
      if ( Char::IsSkillCasRdyActExist(v2) )
      {
        v3 = v2->m_kActionMgr.m_pkCurPlaySkillViewInfo;
        bLastHitTime = IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::GetByID(v3->ID);
        v4 = bLastHitTime->IsMovingSkill != 0;
        if ( v4 == 1 )
          OutputDebugStringA("ÀÌ°Ô ¹«ºù½ºÅ³!\n");
        if ( !Char::ActAction(v2, v3->CasRdyAction, v4) )
        {
          Char::ResetSkillAction(v2);
          Char::ResetAction(v2);
          return;
        }
        v5 = bLastHitTime->CastTime;
        bLastHitTimea = &bLastHitTime->CastTime;
        if ( (double)v5 > 0.0 )
        {
          HIDWORD(v28) = AbStateInfectee::GetAddCastingTime((AbStateInfectee *)&v2->vfptr);
          if ( (double)SHIDWORD(v28) > 0.0 && !strcmp(v3->CasAction, (const char *)&unk_9B9568) )
          {
            v6 = v2->vfptr;
            v28 = (double)*bLastHitTimea;
            bLastHitTimec = v28
                          / (double)(*bLastHitTimea + AbStateInfectee::GetAddCastingTime((AbStateInfectee *)&v2->vfptr));
            ((void (__thiscall *)(AttackSequenceManagerVtbl **, _DWORD))v6->SetAnimationSpeed)(
              &v2->vfptr,
              LODWORD(bLastHitTimec));
          }
        }
        v2->m_uiSkillActStep = 2;
      }
      else
      {
        v2->m_uiSkillActStep = 5;
      }
      goto LABEL_65;
    case 2u:
      if ( (unsigned __int8)((int (__thiscall *)(Char *))v2->vfptr[15].SetAbStateProperty)(v2) )
      {
        ((void (__stdcall *)(_DWORD))v2->vfptr->SetAnimationSpeed)(1.0);
        v2->m_uiSkillActStep = 2
                             * (strcmp(v2->m_kActionMgr.m_pkCurPlaySkillViewInfo->CasAction, (const char *)&unk_9B956C) == 0)
                             + 3;
      }
      goto LABEL_65;
    case 3u:
      v7 = v2->m_kActionMgr.m_pkCurPlaySkillViewInfo;
      v8 = IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::GetByID(v7->ID)->IsMovingSkill != 0;
      if ( v8 == 1 )
        OutputDebugStringA("ÀÌ°Ô ¹«ºù½ºÅ³!\n");
      if ( !Char::ActAction(v2, v7->CasAction, v8) )
        return;
      v2->m_uiSkillActStep = 4;
      goto LABEL_65;
    case 5u:
      v9 = v2->m_kActionMgr.m_pkCurPlaySkillViewInfo;
      v10 = IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::GetByID(v9->ID);
      v11 = v10->IsMovingSkill == 0;
      v12 = v10->SpecialIndexA;
      if ( v12 == 36 || v12 == 38 )
      {
        Char::ActAction(v2, v9->SwingAction, 0);
      }
      else if ( !Char::ActAction(v2, v9->SwingAction, (eActionWeight)!v11) )
      {
        Char::ResetSkillAction(v2);
        Char::ResetAction(v2);
        goto LABEL_65;
      }
      v13 = NiActorManager::INVALID_EVENT_CODE;
      if ( ((int (__thiscall *)(Char *))v2->vfptr[13].DeleteAbStateByAbstateIndex)(v2) == 4 )
        goto LABEL_70;
      if ( v2->m_uiLayerAniCode[1] != NiActorManager::INVALID_EVENT_CODE )
        v13 = v2->m_uiLayerAniCode[1];
      if ( v13 == NiActorManager::INVALID_EVENT_CODE )
LABEL_70:
        v13 = v2->m_uiLayerAniCode[0];
      v14 = Char::GetSequence(v2, v13);
      if ( v14 )
        CharShape::StartWeaponAfterImgEff(&v2->m_kCharShape, v2->m_fAnimationUpdateTime, v14->m_fTransStartTime);
      v2->vfptr[19].GetAbstateColor((AbStateInfectee *)v2);
      v2->m_uiSkillActStep = 6;
      Char::SaveSkillSwingStartCurTime(v2);
      goto LABEL_65;
    case 6u:
      v15 = Char::IsSkillShootActExist(v2);
      v16 = v2->vfptr;
      if ( v15 )
      {
        v17 = NiActorManager::INVALID_EVENT_CODE;
        if ( ((int (*)(void))v16[13].DeleteAbStateByAbstateIndex)() == 4 )
        {
          v18 = fTime;
        }
        else
        {
          if ( v2->m_uiLayerAniCode[1] != NiActorManager::INVALID_EVENT_CODE )
            v17 = v2->m_uiLayerAniCode[1];
          if ( v17 == NiActorManager::INVALID_EVENT_CODE )
          {
            v17 = v2->m_uiLayerAniCode[0];
            if ( v17 == NiActorManager::INVALID_EVENT_CODE )
            {
LABEL_45:
              if ( !Char::IsActGathering(v2) )
              {
                AttackSequenceManager::ApplicateSkillSeqImmediately((AttackSequenceManager *)&v2->vfptr, v2, 1, 0);
                Char::ResetSkillAction(v2);
                Char::ResetAction(v2);
LABEL_49:
                if ( v2->m_bActionHit
                  && (unsigned __int8)((int (__thiscall *)(Char *))v2->vfptr[15].SetAbStateProperty)(v2) )
                {
                  Char::ResetSkillAction(v2);
                  Char::ResetAction(v2);
                }
                goto LABEL_65;
              }
LABEL_47:
              if ( (unsigned __int8)((int (__thiscall *)(Char *, _DWORD))v2->vfptr[18].~AbStateInfectee)(v2, 0) )
              {
                Char::Shoot(v2);
                v2->m_bActionHit = 1;
              }
              goto LABEL_49;
            }
          }
          LODWORD(v18) = 10000 * (v17 / 0x2710);
        }
        if ( LODWORD(v18) == 300000 || LODWORD(v18) == 600000 || LODWORD(v18) == 700000 )
          goto LABEL_47;
        goto LABEL_45;
      }
      if ( (unsigned __int8)((int (__stdcall *)(_DWORD))v16[18].~AbStateInfectee)(0) )
      {
        v19 = &v2->m_kActionMgr.m_pkCurPlaySkillViewInfo->ID;
        v2->m_bActionHit = 1;
        v11 = IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::GetByID(*v19)->HitID == 0;
        BYTE4(v28) = 1;
        if ( !v11 )
          BYTE4(v28) = 0;
        bLastHitTimeb = 0;
        if ( v2->m_lstfHitTime._Mysize == 1 )
          bLastHitTimeb = 1;
        if ( AttackSequenceManager::ApplicateSkillSeqImmediately(
               (AttackSequenceManager *)&v2->vfptr,
               v2,
               SBYTE4(v28),
               bLastHitTimeb) == 1
          || (unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[15].SetAbStateProperty)(v2) )
        {
          ((void (__thiscall *)(Char *, signed int))v2->vfptr[18].~AbStateInfectee)(v2, 1);
        }
        goto LABEL_65;
      }
      if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[15].SetAbStateProperty)(v2) )
      {
        AttackSequenceManager::ApplicateSkillSeqImmediately((AttackSequenceManager *)&v2->vfptr, v2, 1, 0);
LABEL_64:
        Char::ResetSkillAction(v2);
        Char::ResetAction(v2);
        Char::ResetSkillTargetGroundPoint(v23);
        goto LABEL_65;
      }
      if ( (unsigned __int8)((int (__thiscall *)(Char *))v2->vfptr[10].Affect)(v2) )
      {
        v20 = v2->m_kMoveToTarget.m_pos3End.z;
        v21 = v2->m_kMoveToTarget.m_pos3End.x;
        *(float *)&v28 = v2->m_kMoveToTarget.m_pos3End.y;
        v22 = v2->vfptr[6].SetAbStateProperty;
        *((float *)&v28 + 1) = v20;
        v27 = v21;
        ((void (__thiscall *)(Char *, NiPoint3 *))v22)(v2, &kCurPos);
        kCurPos.z = 0.0;
        v25.x = kCurPos.x - v27;
        v25.y = kCurPos.y - *(float *)&v28;
        v25.z = 0.0 - *((float *)&v28 + 1);
        if ( NiPoint3::Length(&v25) < 50.0 )
          goto LABEL_64;
      }
LABEL_65:
      Char::DoOscillation(v2, OSC_MAX_NUM);
      if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[15].SetAbStateProperty)(v2) )
      {
        v24 = v2->m_bCulled;
        if ( v24 )
        {
          v2->m_bCulledOld = v24;
          v2->m_bCulled = 0;
          v2->m_spScene.m_pObject->m_uFlags &= 0xFFFEu;
        }
      }
      return;
    default:
      goto LABEL_65;
  }
}

//----- (00646980) --------------------------------------------------------
NiPoint3 *__cdecl operator*(NiPoint3 *result, float fScalar, NiPoint3 *pt)
{
  NiPoint3 *v3; // eax@1

  v3 = result;
  result->x = pt->x * fScalar;
  result->y = pt->y * fScalar;
  result->z = fScalar * pt->z;
  return v3;
}

//----- (006469B0) --------------------------------------------------------
void __thiscall NiCollisionData::SetCollisionMode(NiCollisionData *this, NiCollisionData::CollisionMode eCollision)
{
  this->m_eCollisionMode = eCollision;
  NiCollisionData::SetPrecacheAttributes(this->m_pkSceneObject, eCollision);
}

//----- (006469D0) --------------------------------------------------------
void __thiscall NiD3DShaderLibrary::SetShaderLibraryDesc(NiD3DShaderLibrary *this, NiShaderLibraryDesc *pkLibDesc)
{
  NiD3DShaderLibrary *v2; // ebx@1
  NiShaderLibraryDesc *v3; // esi@1

  v2 = this;
  v3 = this->m_spShaderLibraryDesc.m_pObject;
  if ( v3 != pkLibDesc )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spShaderLibraryDesc.m_pObject = pkLibDesc;
    if ( pkLibDesc )
      InterlockedIncrement((volatile LONG *)&pkLibDesc->m_uiRefCount);
  }
}

//----- (00646A20) --------------------------------------------------------
void __thiscall CRidePetCtl::ActRun(CRidePetCtl *this)
{
  CRidePetCtl *v1; // esi@1
  NiActorManager *v2; // ecx@1

  v1 = this;
  v2 = this->m_spPetActor.m_pObject;
  if ( v1->m_uiRunEventCode != v2->m_eTargetID )
  {
    if ( v2 )
      NiActorManager::SetTargetAnimation(v2, v1->m_uiRunEventCode);
    CRidePetCtl::StartAction(v1, v1->m_uiRunEventCode);
  }
}

//----- (00646A50) --------------------------------------------------------
void __thiscall CRidePetCtl::ActWalk(CRidePetCtl *this)
{
  CRidePetCtl *v1; // esi@1
  NiActorManager *v2; // ecx@1

  v1 = this;
  v2 = this->m_spPetActor.m_pObject;
  if ( v1->m_uiWalkEventCode != v2->m_eTargetID )
  {
    if ( v2 )
      NiActorManager::SetTargetAnimation(v2, v1->m_uiWalkEventCode);
    CRidePetCtl::StartAction(v1, v1->m_uiWalkEventCode);
  }
}

//----- (00646A80) --------------------------------------------------------
void __thiscall CRidePetCtl::SpecialAction(CRidePetCtl *this)
{
  CRidePetCtl *v1; // esi@1
  NiActorManager *v2; // ecx@1

  v1 = this;
  v2 = this->m_spPetActor.m_pObject;
  if ( v1->m_uiSpecialEventCode != v2->m_eTargetID )
  {
    if ( v2 )
      NiActorManager::SetTargetAnimation(v2, v1->m_uiSpecialEventCode);
    CRidePetCtl::StartAction(v1, v1->m_uiSpecialEventCode);
  }
}

//----- (00646AB0) --------------------------------------------------------
void __thiscall Char::OpenDoor(Char *this)
{
  Char *v1; // esi@1
  void (*v2)(void); // edx@2
  NiCollisionObject *v3; // edi@2
  NiCollisionData *v4; // eax@3
  NiCollisionObject *v5; // eax@4
  NiAVObject *v6; // ST00_4@7

  v1 = this;
  if ( this->m_bIsDoor )
  {
    v2 = (void (*)(void))this->vfptr[10].~AbStateInfectee;
    this->m_fAnimationSpeed = 1.0;
    this->m_eStandMode = 1;
    v2();
    v3 = v1->m_spScene.m_pObject->m_spCollisionObject.m_pObject;
    if ( !v3 )
    {
      v4 = (NiCollisionData *)operator new(0x50u);
      if ( v4 )
        NiCollisionData::NiCollisionData(v4, (NiAVObject *)&v1->m_spScene.m_pObject->vfptr);
      else
        v5 = 0;
      v3 = v5;
    }
    v6 = v3->m_pkSceneObject;
    v3[3].m_uiRefCount = 3;
    NiCollisionData::SetPrecacheAttributes(v6, NOTEST);
    v3[3].vfptr = (NiRefObjectVtbl *)3;
  }
}

//----- (00646B70) --------------------------------------------------------
void __thiscall Char::CloseDoor(Char *this)
{
  Char *v1; // esi@1
  void (*v2)(void); // edx@2
  NiCollisionObject *v3; // esi@2
  NiAVObject *v4; // ST00_4@3

  v1 = this;
  if ( this->m_bIsDoor )
  {
    v2 = (void (*)(void))this->vfptr[10].GetAbstateColor;
    this->m_fAnimationSpeed = 1.0;
    this->m_eStandMode = 0;
    v2();
    v3 = v1->m_spScene.m_pObject->m_spCollisionObject.m_pObject;
    if ( v3 )
    {
      v4 = v3->m_pkSceneObject;
      v3[3].m_uiRefCount = 3;
      NiCollisionData::SetPrecacheAttributes(v4, NOTEST);
      v3[3].vfptr = (NiRefObjectVtbl *)2;
    }
  }
}

//----- (00646BD0) --------------------------------------------------------
unsigned int __cdecl MobConditionViewTab::GetEventCode(const char *pcMobInx, CharAniType AniType, unsigned int AniLv)
{
  int v3; // eax@1
  unsigned int v4; // edi@1
  char *v5; // eax@5
  char *v6; // esi@5
  unsigned int result; // eax@10
  unsigned int v8; // [sp+Ch] [bp-4h]@2

  v3 = *(_DWORD *)(ITableBase<MobConditionView,MobConditionViewTab>::ms_pkTable + 56);
  v4 = 0;
  if ( v3 )
    v8 = *(_DWORD *)(v3 + 40);
  else
    v8 = 0;
  if ( v8 <= 0 )
  {
LABEL_10:
    result = 0;
  }
  else
  {
    while ( 1 )
    {
      v5 = CDataReader::GetRecord((CDataReader *)(ITableBase<MobConditionView,MobConditionViewTab>::ms_pkTable + 4), v4);
      v6 = v5;
      if ( v5 )
      {
        if ( !strncmp(v5, pcMobInx, strlen(v5)) && *((_DWORD *)v6 + 8) == AniType && (unsigned __int8)v6[36] == AniLv )
          break;
      }
      if ( ++v4 >= v8 )
        goto LABEL_10;
    }
    result = *(_DWORD *)(v6 + 37);
  }
  return result;
}
// A8C24C: using guessed type int ITableBase<MobConditionView,MobConditionViewTab>::ms_pkTable;

//----- (00646C60) --------------------------------------------------------
bool __thiscall CSpactralGlow_Shader_Controller::IsEnable(CSpactralGlow_Shader_Controller *this)
{
  return this->m_bEnable;
}

//----- (00646C70) --------------------------------------------------------
bool __thiscall CarToonShader::ToonShader(CarToonShader *this, NiGeometry *pTargetGeo)
{
  NiSkinInstance *v2; // eax@1
  CarToonShader *v3; // edi@1
  bool result; // al@5
  NiProperty *v5; // eax@6
  NiProperty *v6; // esi@6
  NiTimeController *v7; // eax@7
  NiShaderFactory *v8; // ecx@17
  int v9; // eax@17
  NiShader *v10; // esi@21

  v2 = pTargetGeo->m_spSkinInstance.m_pObject;
  v3 = this;
  if ( (!v2 || !v2->m_spSkinPartition.m_pObject) && Char::ms_bEnableCarToon && Engine3D::ms_spCarToon )
  {
    ((void (__stdcall *)(NiGeometry *, NiRenderer *, _DWORD, signed int, signed int))Engine3D::ms_spCarToon->vfptr[4].__vecDelDtor)(
      pTargetGeo,
      NiRenderer::ms_pkRenderer,
      0,
      20,
      4);
    return 1;
  }
  v5 = NiAVObject::GetProperty((NiAVObject *)&pTargetGeo->vfptr, 8);
  v6 = v5;
  if ( !v5 )
    return 1;
  v7 = v5[1].m_spControllers.m_pObject;
  if ( !v7->vfptr )
    goto LABEL_26;
  if ( (v7->m_uiRefCount || LODWORD(v7->m_fFrequency) || LODWORD(v7->m_fPhase) || LODWORD(v7->m_fLoKeyTime))
    && Char::ms_bEnableCarToon
    && Engine3D::ms_spCarToon )
  {
    ((void (__stdcall *)(NiGeometry *, NiRenderer *, _DWORD, signed int, signed int))Engine3D::ms_spCarToon->vfptr[4].__vecDelDtor)(
      pTargetGeo,
      NiRenderer::ms_pkRenderer,
      0,
      20,
      4);
    return 1;
  }
  if ( !v7->vfptr[1].__vecDelDtor )
    goto LABEL_26;
  v8 = NiShaderFactory::GetInstance();
  v9 = (int)&v3->m_strDetailMapShaderName;
  if ( !*(_DWORD *)&v6[1].m_spControllers.m_pObject->m_uFlags )
    v9 = (int)&v3->m_strBaseMapShaderName;
  if ( *(_DWORD *)(v9 + 20) >= 0x10u )
    v9 = *(_DWORD *)v9;
  v10 = (NiShader *)((int (__stdcall *)(int, signed int, _DWORD))v8->vfptr[1].__vecDelDtor)(v9, -1, 0);
  if ( v10 )
  {
    NiShaderFactory::DetachShader(pTargetGeo);
    result = NiShaderFactory::AttachShader(pTargetGeo, v10) != 0;
  }
  else
  {
LABEL_26:
    result = 0;
  }
  return result;
}
// A73BA6: using guessed type bool Char::ms_bEnableCarToon;

//----- (00646D80) --------------------------------------------------------
bool __stdcall CarToonShader::EraseToonShader(NiGeometry *pTargetGeo)
{
  NiSkinInstance *v2; // eax@1
  NiProperty *v3; // eax@3
  NiProperty *v4; // esi@3
  NiTimeController *v5; // eax@4
  void *(__thiscall *v6)(NiRefObject *, unsigned int); // edx@9
  int v7; // eax@10
  NiShader *v8; // esi@12
  bool result; // al@13

  v2 = pTargetGeo->m_spSkinInstance.m_pObject;
  if ( !v2 || !v2->m_spSkinPartition.m_pObject )
  {
    NiShaderFactory::DetachShader(pTargetGeo);
    return 1;
  }
  v3 = NiAVObject::GetProperty((NiAVObject *)&pTargetGeo->vfptr, 8);
  v4 = v3;
  if ( !v3 )
    return 1;
  v5 = v3[1].m_spControllers.m_pObject;
  if ( v5->m_uiRefCount || LODWORD(v5->m_fFrequency) || LODWORD(v5->m_fPhase) || LODWORD(v5->m_fLoKeyTime) )
  {
    NiShaderFactory::DetachShader(pTargetGeo);
    return 1;
  }
  if ( v5->vfptr[1].__vecDelDtor
    && ((v6 = NiShaderFactory::GetInstance()->vfptr[1].__vecDelDtor,
         !*(_DWORD *)&v4[1].m_spControllers.m_pObject->m_uFlags) ? (v7 = ((int (__stdcall *)(const char *, signed int, _DWORD))v6)(
                                                                           "FxSkinningBaseMap",
                                                                           -1,
                                                                           0)) : (v7 = ((int (__stdcall *)(const char *, signed int, _DWORD))v6)(
                                                                                         "FxSkinningHairDetailMap",
                                                                                         -1,
                                                                                         0)),
        (v8 = (NiShader *)v7) != 0) )
  {
    NiShaderFactory::DetachShader(pTargetGeo);
    result = NiShaderFactory::AttachShader(pTargetGeo, v8) != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00646E50) --------------------------------------------------------
void __thiscall CSpactralGlow_Shader_Controller::CSpactralGlow_Shader_Controller(CSpactralGlow_Shader_Controller *this)
{
  CSpactralGlow_Shader_Controller *v1; // esi@1
  int v2; // eax@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v1->vfptr = (NiRefObjectVtbl *)&CSpactralGlow_Shader_Controller::`vftable';
  v1->m_spTexture.m_pObject = 0;
  v1->m_pTargetObjNode = 0;
  *(_WORD *)&v1->m_bEnable = 0;
  v1->m_kArryChildGeometry.vfptr = (NiTArray<NiGeometry *>Vtbl *)&NiTArray<NiGeometry *>::`vftable';
  v1->m_kArryChildGeometry.m_uiMaxSize = 0;
  v1->m_kArryChildGeometry.m_uiGrowBy = 1;
  v1->m_kArryChildGeometry.m_uiSize = 0;
  v1->m_kArryChildGeometry.m_uiESize = 0;
  v1->m_kArryChildGeometry.m_pBase = 0;
  v2 = (int)&v1->m_kShaderName1;
  *(_DWORD *)(v2 + 20) = 15;
  *(_BYTE *)v2 = 0;
  v1->m_kShaderName2._Myres = 15;
  v1->m_kShaderName2._Mysize = 0;
  v1->m_kShaderName2._Bx._Buf[0] = 0;
  *(_DWORD *)(v2 + 16) = 0;
  if ( v1->m_kShaderName1._Myres >= 0x10 )
    v2 = *(_DWORD *)v2;
  *(_BYTE *)v2 = 0;
  v1->m_kShaderName2._Mysize = 0;
  if ( v1->m_kShaderName2._Myres < 0x10 )
    v1->m_kShaderName2._Bx._Buf[0] = 0;
  else
    *v1->m_kShaderName2._Bx._Ptr = 0;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9B976C: using guessed type int (__thiscall *NiTArray<NiGeometry *>::`vftable')(void *p, char);
// 9B9784: using guessed type int (__thiscall *CSpactralGlow_Shader_Controller::`vftable')(void *p, char);

//----- (00646F20) --------------------------------------------------------
void __thiscall CSpactralGlow_Shader_Controller::~CSpactralGlow_Shader_Controller(CSpactralGlow_Shader_Controller *this)
{
  CSpactralGlow_Shader_Controller *v1; // ebx@1
  char *v2; // eax@2
  char *v3; // eax@5
  NiGeometry **v4; // ST00_4@11
  NiSourceTexture *v5; // esi@11

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&CSpactralGlow_Shader_Controller::`vftable';
  this->m_kShaderName1._Mysize = 0;
  if ( this->m_kShaderName1._Myres < 0x10 )
    v2 = this->m_kShaderName1._Bx._Buf;
  else
    v2 = this->m_kShaderName1._Bx._Ptr;
  *v2 = 0;
  this->m_kShaderName2._Mysize = 0;
  if ( this->m_kShaderName2._Myres < 0x10 )
    v3 = this->m_kShaderName2._Bx._Buf;
  else
    v3 = this->m_kShaderName2._Bx._Ptr;
  *v3 = 0;
  if ( this->m_kShaderName2._Myres >= 0x10 )
    operator delete(this->m_kShaderName2._Bx._Ptr);
  v1->m_kShaderName2._Myres = 15;
  v1->m_kShaderName2._Mysize = 0;
  v1->m_kShaderName2._Bx._Buf[0] = 0;
  if ( v1->m_kShaderName1._Myres >= 0x10 )
    operator delete(v1->m_kShaderName1._Bx._Ptr);
  v1->m_kShaderName1._Myres = 15;
  v1->m_kShaderName1._Mysize = 0;
  v1->m_kShaderName1._Bx._Buf[0] = 0;
  v4 = v1->m_kArryChildGeometry.m_pBase;
  v1->m_kArryChildGeometry.vfptr = (NiTArray<NiGeometry *>Vtbl *)&NiTArray<NiGeometry *>::`vftable';
  operator delete[](v4);
  v5 = v1->m_spTexture.m_pObject;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  v1->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9B976C: using guessed type int (__thiscall *NiTArray<NiGeometry *>::`vftable')(void *p, char);
// 9B9784: using guessed type int (__thiscall *CSpactralGlow_Shader_Controller::`vftable')(void *p, char);

//----- (00647020) --------------------------------------------------------
char __thiscall CSpactralGlow_Shader_Controller::SetTarget(CSpactralGlow_Shader_Controller *this, NiNode *pTargetObjNode)
{
  NiTArray<NiTPointerList<NiPointer<NiProperty> > *> *v2; // esi@1
  unsigned int v3; // eax@1
  unsigned int v4; // eax@3
  unsigned int v5; // edi@4
  NiGeometry **v6; // ebx@4
  FindChildGeometry kFindChildGeometry; // [sp+10h] [bp-30h]@3
  int v9; // [sp+3Ch] [bp-4h]@3
  unsigned int i; // [sp+48h] [bp+8h]@3

  this->m_pTargetObjNode = pTargetObjNode;
  v2 = (NiTArray<NiTPointerList<NiPointer<NiProperty> > *> *)&this->m_kArryChildGeometry;
  v3 = 0;
  if ( this->m_kArryChildGeometry.m_uiSize )
  {
    do
      this->m_kArryChildGeometry.m_pBase[v3++] = 0;
    while ( v3 < this->m_kArryChildGeometry.m_uiSize );
  }
  this->m_kArryChildGeometry.m_uiSize = 0;
  this->m_kArryChildGeometry.m_uiESize = 0;
  kFindChildGeometry.m_pCallBack = 0;
  kFindChildGeometry.m_nCurLevel = -1;
  kFindChildGeometry.vfptr = (Ns_TourSceneVtbl *)&FindChildGeometry::`vftable';
  kFindChildGeometry.m_kArryGeometry.vfptr = (NiTArray<NiGeometry *>Vtbl *)&NiTArray<NiGeometry *>::`vftable';
  kFindChildGeometry.m_kArryGeometry.m_uiMaxSize = 0;
  kFindChildGeometry.m_kArryGeometry.m_uiGrowBy = 1;
  kFindChildGeometry.m_kArryGeometry.m_uiSize = 0;
  kFindChildGeometry.m_kArryGeometry.m_uiESize = 0;
  kFindChildGeometry.m_kArryGeometry.m_pBase = 0;
  v9 = 1;
  Ns_TourScene::TourScene((Ns_TourScene *)&kFindChildGeometry.vfptr, this->m_pTargetObjNode, &NiGeometry::m_RTTI, this);
  v4 = 0;
  for ( i = 0; v4 < kFindChildGeometry.m_kArryGeometry.m_uiSize; i = v4 )
  {
    v5 = v2->m_uiSize;
    v6 = &kFindChildGeometry.m_kArryGeometry.m_pBase[v4];
    if ( v5 < v2->m_uiMaxSize
      || (NiTArray<NiGeometry *>::SetSize(v2, v5 + v2->m_uiGrowBy), v4 = i, v5 < v2->m_uiMaxSize) )
    {
      if ( v5 < v2->m_uiSize )
      {
        if ( *v6 )
        {
          if ( !v2->m_pBase[v5] )
            ++v2->m_uiESize;
        }
        else if ( v2->m_pBase[v5] )
        {
          --v2->m_uiESize;
        }
      }
      else
      {
        v2->m_uiSize = v5 + 1;
        if ( *v6 )
          ++v2->m_uiESize;
      }
      v2->m_pBase[v5] = (NiTPointerList<NiPointer<NiProperty> > *)*v6;
    }
    ++v4;
  }
  kFindChildGeometry.m_kArryGeometry.vfptr = (NiTArray<NiGeometry *>Vtbl *)&NiTArray<NiGeometry *>::`vftable';
  operator delete[](kFindChildGeometry.m_kArryGeometry.m_pBase);
  return 1;
}
// 9B976C: using guessed type int (__thiscall *NiTArray<NiGeometry *>::`vftable')(void *p, char);
// 9B9774: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *FindChildGeometry::`vftable')(FindChildGeometry *this, NiGeometry *pGeome, void *);

//----- (00647160) --------------------------------------------------------
signed int __thiscall FindChildGeometry::ProcessData(FindChildGeometry *this, NiAVObject *_pkObject, void *_pData)
{
  NiAVObject *v3; // esi@1
  FindChildGeometry *v4; // edi@1
  NiRTTI *v5; // eax@2
  NiTArray<NiTPointerList<NiPointer<NiProperty> > *> *v7; // esi@6
  unsigned int v8; // edi@6

  v3 = _pkObject;
  v4 = this;
  if ( _pkObject )
  {
    v5 = (NiRTTI *)((int (__thiscall *)(_DWORD))_pkObject->vfptr[1].__vecDelDtor)(_pkObject);
    if ( v5 )
    {
      while ( v5 != &NiGeometry::m_RTTI )
      {
        v5 = v5->m_pkBaseRTTI;
        if ( !v5 )
          return 1;
      }
      _pkObject = v3;
      v7 = (NiTArray<NiTPointerList<NiPointer<NiProperty> > *> *)&v4->m_kArryGeometry;
      v8 = v4->m_kArryGeometry.m_uiSize;
      if ( v8 >= v7->m_uiMaxSize )
        NiTArray<NiGeometry *>::SetSize(v7, v8 + v7->m_uiGrowBy);
      NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v7, v8, (NiVBChip *const *)&_pkObject);
    }
  }
  return 1;
}

//----- (006471D0) --------------------------------------------------------
void __thiscall CarToonShader::~CarToonShader(CarToonShader *this)
{
  CarToonShader *v1; // esi@1

  v1 = this;
  this->vfptr = (CarToonShaderVtbl *)&CarToonShader::`vftable';
  if ( this->m_strDetailMapShaderName._Myres >= 0x10 )
    operator delete(this->m_strDetailMapShaderName._Bx._Ptr);
  v1->m_strDetailMapShaderName._Myres = 15;
  v1->m_strDetailMapShaderName._Mysize = 0;
  v1->m_strDetailMapShaderName._Bx._Buf[0] = 0;
  if ( v1->m_strBaseMapShaderName._Myres >= 0x10 )
    operator delete(v1->m_strBaseMapShaderName._Bx._Ptr);
  v1->m_strBaseMapShaderName._Mysize = 0;
  v1->m_strBaseMapShaderName._Myres = 15;
  v1->m_strBaseMapShaderName._Bx._Buf[0] = 0;
}
// 9B978C: using guessed type int (__thiscall *CarToonShader::`vftable')(void *p, char);

//----- (00647220) --------------------------------------------------------
char __thiscall CarToonShader::SetCartoonShader(CarToonShader *this, NiNode *pTargetObjNode)
{
  CarToonShader *v2; // ebx@1
  unsigned int j; // edi@1
  unsigned int v4; // ecx@3
  NiNode *v5; // eax@4
  unsigned int k; // edi@5
  FindChildGeometry kFindChildGeometry; // [sp+10h] [bp-78h]@1
  Find_EF_ExtraData kFindExtraData; // [sp+34h] [bp-54h]@3
  FindChildGeometry kFindGeo; // [sp+58h] [bp-30h]@5
  int v11; // [sp+84h] [bp-4h]@1
  unsigned int i; // [sp+90h] [bp+8h]@3

  v2 = this;
  kFindChildGeometry.m_pCallBack = 0;
  kFindChildGeometry.m_nCurLevel = -1;
  kFindChildGeometry.vfptr = (Ns_TourSceneVtbl *)&FindChildGeometry::`vftable';
  kFindChildGeometry.m_kArryGeometry.vfptr = (NiTArray<NiGeometry *>Vtbl *)&NiTArray<NiGeometry *>::`vftable';
  kFindChildGeometry.m_kArryGeometry.m_uiMaxSize = 0;
  kFindChildGeometry.m_kArryGeometry.m_uiGrowBy = 1;
  kFindChildGeometry.m_kArryGeometry.m_uiSize = 0;
  kFindChildGeometry.m_kArryGeometry.m_uiESize = 0;
  kFindChildGeometry.m_kArryGeometry.m_pBase = 0;
  v11 = 1;
  Ns_TourScene::TourScene((Ns_TourScene *)&kFindChildGeometry.vfptr, pTargetObjNode, &NiGeometry::m_RTTI, this);
  for ( j = 0; j < kFindChildGeometry.m_kArryGeometry.m_uiSize; ++j )
    CarToonShader::ToonShader(v2, kFindChildGeometry.m_kArryGeometry.m_pBase[j]);
  kFindExtraData.m_pCallBack = 0;
  kFindExtraData.m_nCurLevel = -1;
  kFindExtraData.vfptr = (Ns_TourSceneVtbl *)&Find_EF_ExtraData::`vftable';
  kFindExtraData.m_kArryAVObj.vfptr = (NiTArray<NiNode *>Vtbl *)&NiTArray<NiNode *>::`vftable';
  kFindExtraData.m_kArryAVObj.m_uiMaxSize = 0;
  kFindExtraData.m_kArryAVObj.m_uiGrowBy = 1;
  kFindExtraData.m_kArryAVObj.m_uiSize = 0;
  kFindExtraData.m_kArryAVObj.m_uiESize = 0;
  kFindExtraData.m_kArryAVObj.m_pBase = 0;
  LOBYTE(v11) = 3;
  Ns_TourScene::TourScene((Ns_TourScene *)&kFindExtraData.vfptr, pTargetObjNode, &NiNode::m_RTTI, v2);
  v4 = 0;
  for ( i = 0; v4 < kFindExtraData.m_kArryAVObj.m_uiSize; i = v4 )
  {
    v5 = kFindExtraData.m_kArryAVObj.m_pBase[v4];
    if ( v5 )
    {
      kFindGeo.m_pCallBack = 0;
      kFindGeo.m_nCurLevel = -1;
      kFindGeo.vfptr = (Ns_TourSceneVtbl *)&FindChildGeometry::`vftable';
      kFindGeo.m_kArryGeometry.vfptr = (NiTArray<NiGeometry *>Vtbl *)&NiTArray<NiGeometry *>::`vftable';
      kFindGeo.m_kArryGeometry.m_uiMaxSize = 0;
      kFindGeo.m_kArryGeometry.m_uiGrowBy = 1;
      kFindGeo.m_kArryGeometry.m_uiSize = 0;
      kFindGeo.m_kArryGeometry.m_uiESize = 0;
      kFindGeo.m_kArryGeometry.m_pBase = 0;
      LOBYTE(v11) = 5;
      Ns_TourScene::TourScene((Ns_TourScene *)&kFindGeo.vfptr, v5, &NiGeometry::m_RTTI, v2);
      for ( k = 0; k < kFindGeo.m_kArryGeometry.m_uiSize; ++k )
        CarToonShader::EraseToonShader(kFindGeo.m_kArryGeometry.m_pBase[k]);
      LOBYTE(v11) = 3;
      kFindGeo.m_kArryGeometry.vfptr = (NiTArray<NiGeometry *>Vtbl *)&NiTArray<NiGeometry *>::`vftable';
      operator delete[](kFindGeo.m_kArryGeometry.m_pBase);
      v4 = i;
    }
    ++v4;
  }
  kFindExtraData.m_kArryAVObj.vfptr = (NiTArray<NiNode *>Vtbl *)&NiTArray<NiNode *>::`vftable';
  operator delete[](kFindExtraData.m_kArryAVObj.m_pBase);
  kFindChildGeometry.m_kArryGeometry.vfptr = (NiTArray<NiGeometry *>Vtbl *)&NiTArray<NiGeometry *>::`vftable';
  operator delete[](kFindChildGeometry.m_kArryGeometry.m_pBase);
  return 1;
}
// 9B9764: using guessed type int (__thiscall *NiTArray<NiNode *>::`vftable')(void *p, char);
// 9B976C: using guessed type int (__thiscall *NiTArray<NiGeometry *>::`vftable')(void *p, char);
// 9B9774: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *FindChildGeometry::`vftable')(FindChildGeometry *this, NiGeometry *pGeome, void *);
// 9B977C: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *Find_EF_ExtraData::`vftable')(Find_EF_ExtraData *this, NiAVObject *_pkObject, void *);

//----- (006473C0) --------------------------------------------------------
char __thiscall CSpactralGlow_Shader_Controller::ShaderSetting_Geometry(CSpactralGlow_Shader_Controller *this, NiGeometry *pTargetGeo)
{
  CSpactralGlow_Shader_Controller *v2; // edi@1
  char *v3; // edx@2
  NiSkinInstance *v4; // eax@4
  const char *v5; // edx@7
  NiShaderFactory *v6; // eax@10
  void *v7; // ecx@10
  NiShader *v8; // eax@12
  char result; // al@15
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strShaderName; // [sp+10h] [bp-2Ch]@4
  int v11; // [sp+38h] [bp-4h]@4

  v2 = this;
  if ( this->m_kShaderName1._Myres < 0x10 )
    v3 = this->m_kShaderName1._Bx._Buf;
  else
    v3 = this->m_kShaderName1._Bx._Ptr;
  strShaderName._Myres = 15;
  strShaderName._Mysize = 0;
  strShaderName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strShaderName, v3, strlen(v3));
  v4 = pTargetGeo->m_spSkinInstance.m_pObject;
  v11 = 0;
  if ( !v4 || !v4->m_spSkinPartition.m_pObject )
  {
    if ( v2->m_kShaderName2._Myres < 0x10 )
      v5 = v2->m_kShaderName2._Bx._Buf;
    else
      v5 = v2->m_kShaderName2._Bx._Ptr;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strShaderName, v5, strlen(v5));
  }
  v6 = NiShaderFactory::GetInstance();
  v7 = strShaderName._Bx._Ptr;
  if ( strShaderName._Myres < 0x10 )
    v7 = &strShaderName;
  v8 = (NiShader *)((int (__thiscall *)(NiShaderFactory *, void *, signed int, _DWORD))v6->vfptr[1].__vecDelDtor)(
                     v6,
                     v7,
                     -1,
                     0);
  if ( !v8 )
  {
    if ( strShaderName._Myres >= 0x10 )
      operator delete(strShaderName._Bx._Ptr);
    return 0;
  }
  if ( NiShaderFactory::AttachShader(pTargetGeo, v8) )
  {
    if ( strShaderName._Myres >= 0x10 )
      operator delete(strShaderName._Bx._Ptr);
    result = 1;
  }
  else
  {
    if ( strShaderName._Myres < 0x10 )
      return 0;
    operator delete(strShaderName._Bx._Ptr);
    result = 0;
  }
  return result;
}

//----- (00647510) --------------------------------------------------------
void __thiscall CSpactralGlow_Shader_Controller::SetUseShaderName(CSpactralGlow_Shader_Controller *this, char *pcShaderName1, char *pcShaderName2)
{
  CSpactralGlow_Shader_Controller *v3; // esi@1

  v3 = this;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &this->m_kShaderName1,
    pcShaderName1,
    strlen(pcShaderName1));
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &v3->m_kShaderName2,
    pcShaderName2,
    strlen(pcShaderName2));
}

//----- (00647560) --------------------------------------------------------
char __thiscall CarToonShader::SetOutLine(CarToonShader *this, bool bOutLine)
{
  CarToonShader *v2; // edi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // ecx@1
  NiShaderFactory *v4; // eax@2
  int v5; // ecx@3

  v2 = this;
  v3 = &this->m_strBaseMapShaderName;
  if ( bOutLine )
  {
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      v3,
      "FxSkinningBaseMapWithOutLine",
      0x1Cu);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v2->m_strDetailMapShaderName,
      "FxSkinningDMWithOutLine",
      0x17u);
    v4 = NiShaderFactory::GetInstance();
    if ( v2->m_strBaseMapShaderName._Myres < 0x10 )
      v5 = (int)&v2->m_strBaseMapShaderName;
    else
      v5 = (int)v2->m_strBaseMapShaderName._Bx._Ptr;
    if ( !((int (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD))v4->vfptr[1].__vecDelDtor)(v4, v5, -1, 0) )
    {
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v2->m_strBaseMapShaderName,
        "FxSkinningBaseMap",
        0x11u);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v2->m_strDetailMapShaderName,
        "FxSkinningHairDetailMap",
        0x17u);
      return 0;
    }
  }
  else
  {
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(v3, "FxSkinningBaseMap", 0x11u);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v2->m_strDetailMapShaderName,
      "FxSkinningHairDetailMap",
      0x17u);
  }
  v2->m_bOutLineEnable = bOutLine;
  return 1;
}

//----- (00647610) --------------------------------------------------------
char __thiscall CSpactralGlow_Shader_Controller::ShaderSetting(CSpactralGlow_Shader_Controller *this)
{
  CSpactralGlow_Shader_Controller *v1; // esi@1
  int v2; // edi@1
  char result; // al@4

  v1 = this;
  CSpactralGlow_Shader_Controller::SetTarget(this, this->m_pTargetObjNode);
  v2 = 0;
  if ( v1->m_kArryChildGeometry.m_uiSize )
  {
    while ( CSpactralGlow_Shader_Controller::ShaderSetting_Geometry(v1, v1->m_kArryChildGeometry.m_pBase[v2]) )
    {
      if ( ++v2 >= v1->m_kArryChildGeometry.m_uiSize )
        goto LABEL_4;
    }
    result = 0;
  }
  else
  {
LABEL_4:
    result = 1;
  }
  return result;
}

//----- (00647650) --------------------------------------------------------
signed int __thiscall Find_EF_ExtraData::ProcessData(Find_EF_ExtraData *this, NiAVObject *_pkObject, void *_pData)
{
  NiVBChip *v3; // ebx@1
  NiRTTI *v4; // eax@2
  char *v5; // eax@7
  NiAVObject **v6; // ecx@8
  signed int v7; // eax@8
  signed int v8; // esi@8
  Find_EF_ExtraData *v9; // ebx@9
  bool v10; // cf@9
  NiVBChip *v11; // ecx@11
  unsigned int v12; // edi@13
  signed int v13; // eax@15
  const char *v14; // eax@21
  int v15; // esi@23
  unsigned int v16; // edi@23
  NiVBChip *element; // [sp+10h] [bp-58h]@13
  Find_EF_ExtraData *v19; // [sp+14h] [bp-54h]@1
  NiVBChip *v20; // [sp+18h] [bp-50h]@1
  NsFindObjectByName kFindObject; // [sp+1Ch] [bp-4Ch]@8
  int v22; // [sp+64h] [bp-4h]@8

  v3 = (NiVBChip *)_pkObject;
  v19 = this;
  v20 = (NiVBChip *)_pkObject;
  if ( _pkObject )
  {
    v4 = (NiRTTI *)((int (__thiscall *)(NiAVObject *))_pkObject->vfptr[1].__vecDelDtor)(_pkObject);
    if ( v4 )
    {
      while ( v4 != &NiNode::m_RTTI )
      {
        v4 = v4->m_pkBaseRTTI;
        if ( !v4 )
          return 1;
      }
      if ( NiObjectNET::GetExtraData((NiObjectNET *)&_pkObject->vfptr, off_9B9668) )
      {
        v5 = _pkObject->m_pcName;
        if ( v5 )
        {
          kFindObject.m_pCallBack = 0;
          kFindObject.m_nCurLevel = -1;
          kFindObject.vfptr = (Ns_TourSceneVtbl *)&NsFindObjectByName::`vftable';
          kFindObject.m_szName._Myres = 15;
          kFindObject.m_szName._Mysize = 0;
          kFindObject.m_szName._Bx._Buf[0] = 0;
          kFindObject.m_vecObject._Myfirst = 0;
          kFindObject.m_vecObject._Mylast = 0;
          kFindObject.m_vecObject._Myend = 0;
          v22 = 0;
          NsFindObjectByName::FindObject(&kFindObject, (NiNode *)_pkObject, v5);
          v6 = kFindObject.m_vecObject._Myfirst;
          v7 = kFindObject.m_vecObject._Mylast - kFindObject.m_vecObject._Myfirst;
          v8 = 0;
          if ( v7 > 0 )
          {
            v9 = v19;
            v10 = (unsigned int)v7 > 0;
            do
            {
              if ( v10 )
                v11 = (NiVBChip *)v6[v8];
              else
                v11 = 0;
              v12 = v9->m_kArryAVObj.m_uiSize;
              element = v11;
              if ( v12 >= v9->m_kArryAVObj.m_uiMaxSize )
                NiTArray<NiGeometry *>::SetSize(
                  (NiTArray<NiTPointerList<NiPointer<NiProperty> > *> *)&v9->m_kArryAVObj,
                  v12 + v9->m_kArryAVObj.m_uiGrowBy);
              NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)&v9->m_kArryAVObj, v12, &element);
              v6 = kFindObject.m_vecObject._Myfirst;
              ++v8;
              v13 = kFindObject.m_vecObject._Mylast - kFindObject.m_vecObject._Myfirst;
              v10 = v8 < (unsigned int)v13;
            }
            while ( v8 < v13 );
            v3 = v20;
          }
          v22 = -1;
          if ( v6 )
            operator delete(v6);
          kFindObject.m_vecObject._Myfirst = 0;
          kFindObject.m_vecObject._Mylast = 0;
          kFindObject.m_vecObject._Myend = 0;
          if ( kFindObject.m_szName._Myres >= 0x10 )
            operator delete(kFindObject.m_szName._Bx._Ptr);
        }
      }
      v14 = (const char *)v3->m_pkVB;
      if ( v14 && !strcmp(v14, "NOOUTLINE") )
      {
        v15 = (int)v19;
        v16 = v19->m_kArryAVObj.m_uiSize;
        v20 = v3;
        if ( v16 >= v19->m_kArryAVObj.m_uiMaxSize )
          NiTArray<NiGeometry *>::SetSize(
            (NiTArray<NiTPointerList<NiPointer<NiProperty> > *> *)&v19->m_kArryAVObj,
            v16 + v19->m_kArryAVObj.m_uiGrowBy);
        NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)(v15 + 12), v16, &v20);
      }
    }
  }
  return 1;
}
// 9B9194: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *NsFindObjectByName::`vftable')(NsFindObjectByName *this, NiAVObject *_pkObject, void *);

//----- (00647820) --------------------------------------------------------
void __thiscall CarToonShader::CarToonShader(CarToonShader *this)
{
  CarToonShader *v1; // ebx@1
  NiShaderFactory *v2; // eax@1
  int v3; // ecx@2

  v1 = this;
  this->vfptr = (CarToonShaderVtbl *)&CarToonShader::`vftable';
  this->m_strBaseMapShaderName._Myres = 15;
  this->m_strBaseMapShaderName._Mysize = 0;
  this->m_strBaseMapShaderName._Bx._Buf[0] = 0;
  this->m_strDetailMapShaderName._Myres = 15;
  this->m_strDetailMapShaderName._Mysize = 0;
  this->m_strDetailMapShaderName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &this->m_strBaseMapShaderName,
    "FxSkinningBaseMapWithOutLine",
    0x1Cu);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &v1->m_strDetailMapShaderName,
    "FxSkinningDMWithOutLine",
    0x17u);
  v2 = NiShaderFactory::GetInstance();
  if ( v1->m_strBaseMapShaderName._Myres < 0x10 )
    v3 = (int)&v1->m_strBaseMapShaderName;
  else
    v3 = (int)v1->m_strBaseMapShaderName._Bx._Ptr;
  if ( ((int (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD))v2->vfptr[1].__vecDelDtor)(v2, v3, -1, 0) )
  {
    v1->m_bOutLineEnable = 1;
  }
  else
  {
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v1->m_strBaseMapShaderName,
      "FxSkinningBaseMap",
      0x11u);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v1->m_strDetailMapShaderName,
      "FxSkinningHairDetailMap",
      0x17u);
  }
}
// 9B978C: using guessed type int (__thiscall *CarToonShader::`vftable')(void *p, char);

//----- (00647900) --------------------------------------------------------
CarToonShader *__cdecl CarToonShader::GetInstance()
{
  if ( !(_S3_7 & 1) )
  {
    _S3_7 |= 1u;
    CarToonShader::CarToonShader(&shader);
    atexit(CarToonShader::GetInstance_::_2_::_dynamic_atexit_destructor_for__shader__);
  }
  return &shader;
}

//----- (00647970) --------------------------------------------------------
char __thiscall CarToonShader::SetExceptOutLineCartoonShader(CarToonShader *this, NiNode *pTargetObjNode)
{
  CarToonShader *v2; // esi@1
  bool bSaveOutLine; // ST14_1@1

  v2 = this;
  bSaveOutLine = this->m_bOutLineEnable;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &this->m_strBaseMapShaderName,
    "FxSkinningBaseMap",
    0x11u);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &v2->m_strDetailMapShaderName,
    "FxSkinningHairDetailMap",
    0x17u);
  v2->m_bOutLineEnable = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &v2->m_strBaseMapShaderName,
    "FxSkinningBaseMap",
    0x11u);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &v2->m_strDetailMapShaderName,
    "FxSkinningHairDetailMap",
    0x17u);
  CarToonShader::SetCartoonShader(v2, pTargetObjNode);
  CarToonShader::SetOutLine(v2, bSaveOutLine);
  return 1;
}

//----- (006479E0) --------------------------------------------------------
char __thiscall CSpactralGlow_Shader_Controller::NormalSetting(CSpactralGlow_Shader_Controller *this)
{
  CSpactralGlow_Shader_Controller *v1; // esi@1
  int v2; // edi@1
  char result; // al@6

  v1 = this;
  CSpactralGlow_Shader_Controller::SetTarget(this, this->m_pTargetObjNode);
  v2 = 0;
  if ( v1->m_kArryChildGeometry.m_uiSize )
  {
    while ( NiShaderFactory::DetachShader(v1->m_kArryChildGeometry.m_pBase[v2]) )
    {
      if ( ++v2 >= v1->m_kArryChildGeometry.m_uiSize )
        goto LABEL_4;
    }
    result = 0;
  }
  else
  {
LABEL_4:
    if ( !(_S3_7 & 1) )
    {
      _S3_7 |= 1u;
      CarToonShader::CarToonShader(&shader);
      atexit(CarToonShader::GetInstance_::_2_::_dynamic_atexit_destructor_for__shader__);
    }
    CarToonShader::SetCartoonShader(&shader, v1->m_pTargetObjNode);
    result = 1;
  }
  return result;
}

//----- (00647AA0) --------------------------------------------------------
char __thiscall CSpactralGlow_Shader_Controller::SetEnable(CSpactralGlow_Shader_Controller *this, bool bEnalbe)
{
  CSpactralGlow_Shader_Controller *v2; // esi@1
  NiShaderFactory *v3; // edi@2
  char **v4; // eax@2
  char **v5; // eax@5

  v2 = this;
  if ( !this->m_bHardwareSupport )
  {
    v3 = NiShaderFactory::GetInstance();
    v4 = &v2->m_kShaderName1._Bx._Ptr;
    if ( v2->m_kShaderName1._Myres >= 0x10 )
      v4 = (char **)*v4;
    if ( ((int (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD))v3->vfptr[1].__vecDelDtor)(v3, v4, -1, 0) )
    {
      v5 = &v2->m_kShaderName2._Bx._Ptr;
      if ( v2->m_kShaderName2._Myres >= 0x10 )
        v5 = (char **)*v5;
      if ( ((int (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD))v3->vfptr[1].__vecDelDtor)(v3, v5, -1, 0) )
        v2->m_bHardwareSupport = 1;
    }
    if ( !v2->m_bHardwareSupport )
      return 0;
  }
  if ( !v2->m_pTargetObjNode )
    return 0;
  if ( bEnalbe )
  {
    if ( CSpactralGlow_Shader_Controller::ShaderSetting(v2) )
    {
      v2->m_bEnable = 1;
      return 1;
    }
    return 0;
  }
  if ( !CSpactralGlow_Shader_Controller::NormalSetting(v2) )
    return 0;
  v2->m_bEnable = 0;
  return 1;
}

//----- (00647B40) --------------------------------------------------------
char __thiscall CSpactralGlow_Shader_Controller::SetupRecursive(CSpactralGlow_Shader_Controller *this, NiNode *pTarget)
{
  CSpactralGlow_Shader_Controller *v2; // esi@1
  int v3; // edi@1
  char result; // al@4
  FindChildGeometry kFindChildGeometry; // [sp+Ch] [bp-30h]@1
  int v6; // [sp+38h] [bp-4h]@1

  v2 = this;
  v3 = 0;
  kFindChildGeometry.m_pCallBack = 0;
  kFindChildGeometry.m_nCurLevel = -1;
  kFindChildGeometry.vfptr = (Ns_TourSceneVtbl *)&FindChildGeometry::`vftable';
  kFindChildGeometry.m_kArryGeometry.vfptr = (NiTArray<NiGeometry *>Vtbl *)&NiTArray<NiGeometry *>::`vftable';
  kFindChildGeometry.m_kArryGeometry.m_uiMaxSize = 0;
  kFindChildGeometry.m_kArryGeometry.m_uiGrowBy = 1;
  kFindChildGeometry.m_kArryGeometry.m_uiSize = 0;
  kFindChildGeometry.m_kArryGeometry.m_uiESize = 0;
  kFindChildGeometry.m_kArryGeometry.m_pBase = 0;
  v6 = 1;
  Ns_TourScene::TourScene((Ns_TourScene *)&kFindChildGeometry.vfptr, pTarget, &NiGeometry::m_RTTI, this);
  if ( kFindChildGeometry.m_kArryGeometry.m_uiSize <= 0 )
  {
LABEL_4:
    CSpactralGlow_Shader_Controller::SetEnable(v2, v2->m_bEnable);
    kFindChildGeometry.m_kArryGeometry.vfptr = (NiTArray<NiGeometry *>Vtbl *)&NiTArray<NiGeometry *>::`vftable';
    operator delete[](kFindChildGeometry.m_kArryGeometry.m_pBase);
    result = 1;
  }
  else
  {
    while ( CSpactralGlow_Shader_Controller::ShaderSetting_Geometry(v2, kFindChildGeometry.m_kArryGeometry.m_pBase[v3]) )
    {
      if ( ++v3 >= kFindChildGeometry.m_kArryGeometry.m_uiSize )
        goto LABEL_4;
    }
    kFindChildGeometry.m_kArryGeometry.vfptr = (NiTArray<NiGeometry *>Vtbl *)&NiTArray<NiGeometry *>::`vftable';
    operator delete[](kFindChildGeometry.m_kArryGeometry.m_pBase);
    result = 0;
  }
  return result;
}
// 9B976C: using guessed type int (__thiscall *NiTArray<NiGeometry *>::`vftable')(void *p, char);
// 9B9774: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *FindChildGeometry::`vftable')(FindChildGeometry *this, NiGeometry *pGeome, void *);

//----- (00647C30) --------------------------------------------------------
NiTArray<NiNode *> *__thiscall NiTArray<NiNode *>::`scalar deleting destructor'(NiTArray<NiNode *> *this, unsigned int a2)
{
  NiTArray<NiNode *> *v2; // esi@1
  NiNode **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pBase;
  this->vfptr = (NiTArray<NiNode *>Vtbl *)&NiTArray<NiNode *>::`vftable';
  operator delete[](v3);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B9764: using guessed type int (__thiscall *NiTArray<NiNode *>::`vftable')(void *p, char);

//----- (00647C60) --------------------------------------------------------
NiTArray<NiGeometry *> *__thiscall NiTArray<NiGeometry *>::`scalar deleting destructor'(NiTArray<NiGeometry *> *this, unsigned int a2)
{
  NiTArray<NiGeometry *> *v2; // esi@1
  NiGeometry **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pBase;
  this->vfptr = (NiTArray<NiGeometry *>Vtbl *)&NiTArray<NiGeometry *>::`vftable';
  operator delete[](v3);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B976C: using guessed type int (__thiscall *NiTArray<NiGeometry *>::`vftable')(void *p, char);

//----- (00647C90) --------------------------------------------------------
void __thiscall FindChildGeometry::~FindChildGeometry(FindChildGeometry *this)
{
  FindChildGeometry *v1; // esi@1
  NiGeometry **v2; // ST00_4@1

  v1 = this;
  v2 = this->m_kArryGeometry.m_pBase;
  this->m_kArryGeometry.vfptr = (NiTArray<NiGeometry *>Vtbl *)&NiTArray<NiGeometry *>::`vftable';
  operator delete[](v2);
  v1->vfptr = (Ns_TourSceneVtbl *)&Ns_TourScene::`vftable';
}
// 9B8DD0: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *Ns_TourScene::`vftable')(Ns_TourScene *this, NiAVObject *_pkObject, void *);
// 9B976C: using guessed type int (__thiscall *NiTArray<NiGeometry *>::`vftable')(void *p, char);

//----- (00647CB0) --------------------------------------------------------
void __thiscall Find_EF_ExtraData::~Find_EF_ExtraData(Find_EF_ExtraData *this)
{
  Find_EF_ExtraData *v1; // esi@1
  NiNode **v2; // ST00_4@1

  v1 = this;
  v2 = this->m_kArryAVObj.m_pBase;
  this->m_kArryAVObj.vfptr = (NiTArray<NiNode *>Vtbl *)&NiTArray<NiNode *>::`vftable';
  operator delete[](v2);
  v1->vfptr = (Ns_TourSceneVtbl *)&Ns_TourScene::`vftable';
}
// 9B8DD0: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *Ns_TourScene::`vftable')(Ns_TourScene *this, NiAVObject *_pkObject, void *);
// 9B9764: using guessed type int (__thiscall *NiTArray<NiNode *>::`vftable')(void *p, char);

//----- (00647CD0) --------------------------------------------------------
CSpactralGlow_Shader_Controller *__thiscall CSpactralGlow_Shader_Controller::`scalar deleting destructor'(CSpactralGlow_Shader_Controller *this, unsigned int a2)
{
  CSpactralGlow_Shader_Controller *v2; // esi@1

  v2 = this;
  CSpactralGlow_Shader_Controller::~CSpactralGlow_Shader_Controller(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00647D00) --------------------------------------------------------
CarToonShader *__thiscall CarToonShader::`vector deleting destructor'(CarToonShader *this, unsigned int a2)
{
  CarToonShader *v2; // esi@1

  v2 = this;
  this->vfptr = (CarToonShaderVtbl *)&CarToonShader::`vftable';
  if ( this->m_strDetailMapShaderName._Myres >= 0x10 )
    operator delete(this->m_strDetailMapShaderName._Bx._Ptr);
  v2->m_strDetailMapShaderName._Myres = 15;
  v2->m_strDetailMapShaderName._Mysize = 0;
  v2->m_strDetailMapShaderName._Bx._Buf[0] = 0;
  if ( v2->m_strBaseMapShaderName._Myres >= 0x10 )
    operator delete(v2->m_strBaseMapShaderName._Bx._Ptr);
  v2->m_strBaseMapShaderName._Mysize = 0;
  v2->m_strBaseMapShaderName._Myres = 15;
  v2->m_strBaseMapShaderName._Bx._Buf[0] = 0;
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B978C: using guessed type int (__thiscall *CarToonShader::`vftable')(void *p, char);

//----- (00647D70) --------------------------------------------------------
char __cdecl CharClass::GetRace(char kClassID)
{
  char result; // al@2

  switch ( kClassID )
  {
    case 1:
    case 3:
    case 5:
    case 6:
    case 8:
    case 9:
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      result = 1;
      break;
    case 0xB:
    case 0xD:
    case 0xF:
    case 0x1A:
    case 0x1B:
      result = 2;
      break;
    case 0x10:
    case 0x12:
    case 0x14:
      result = 3;
      break;
    default:
      result = 0;
      break;
  }
  return result;
}

//----- (00647E00) --------------------------------------------------------
char __cdecl CharClass::TestChrBaseClassMask(__int64 kClassMask, char kBaseClassID)
{
  signed int v2; // esi@1
  signed int v3; // edx@1
  char v4; // al@5

  v2 = 1;
  v3 = 1;
  while ( 1 )
  {
    v2 *= 2;
    if ( (unsigned int)kClassMask & v2 && (_BYTE)v3 )
    {
      switch ( (unsigned __int8)v3 )
      {
        case 1u:
        case 2u:
        case 3u:
        case 4u:
        case 5u:
          v4 = 1;
          break;
        case 6u:
        case 7u:
        case 8u:
        case 9u:
        case 0xAu:
          v4 = 6;
          break;
        case 0xBu:
        case 0xCu:
        case 0xDu:
        case 0xEu:
        case 0xFu:
          v4 = 11;
          break;
        case 0x10u:
        case 0x11u:
        case 0x12u:
        case 0x13u:
        case 0x14u:
          v4 = 16;
          break;
        case 0x15u:
        case 0x16u:
        case 0x17u:
        case 0x18u:
        case 0x19u:
          v4 = 21;
          break;
        case 0x1Au:
        case 0x1Bu:
          v4 = 26;
          break;
        default:
          v4 = 0;
          break;
      }
      if ( v4 == kBaseClassID )
        break;
    }
    if ( (unsigned int)++v3 > 0x20 )
      return 0;
  }
  return 1;
}

//----- (00647EE0) --------------------------------------------------------
char __cdecl CharClass::GetMinimumChrClass(__int64 kClassMask, char kBaseClassID)
{
  int v2; // ebx@1
  char result; // al@4

  v2 = (unsigned __int8)kBaseClassID;
  if ( (signed int)(unsigned __int8)kBaseClassID >= 28 )
  {
LABEL_4:
    result = 0;
  }
  else
  {
    while ( !(kClassMask & (1i64 << v2)) )
    {
      if ( ++v2 >= 28 )
        goto LABEL_4;
    }
    result = v2;
  }
  return result;
}

//----- (00647F20) --------------------------------------------------------
#error "647F20: too complex function (funcsize=161)"

//----- (006480A0) --------------------------------------------------------
void __cdecl CharClass::GetEquipableClassStr(__int64 kClassMask, char *pcStr, unsigned int uiStrLen)
{
  char *v3; // edi@1
  int v4; // esi@2
  signed int v5; // ebx@2
  char *v6; // eax@4
  const char *v7; // eax@5
  char *v8; // ecx@10
  char v9; // dl@11
  const char *v10; // ecx@13
  char v11; // dl@14
  unsigned int v12; // eax@15
  const char *v13; // esi@15
  char *v14; // edi@15
  char v15; // cl@16
  int ClassCount; // [sp+4h] [bp-4h]@7

  v3 = pcStr;
  if ( pcStr )
  {
    *pcStr = 0;
    v4 = 0;
    v5 = 1;
    do
    {
      if ( kClassMask & (1i64 << v5) )
      {
        v6 = CDataReader::GetRecord(
               (CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4),
               (unsigned __int8)v5);
        if ( v6 )
        {
          v7 = v6 + 21;
          if ( !v7 )
            goto LABEL_18;
        }
        else
        {
          v7 = (const char *)&unk_96F8EB;
        }
        ClassCount = v4 + 1;
        if ( v4 + 1 > 2 || strlen(v7) + strlen(v3) + 2 >= uiStrLen )
          return;
        if ( ClassCount > 1 )
        {
          v8 = pcStr - 1;
          do
            v9 = (v8++)[1];
          while ( v9 );
          *(_WORD *)v8 = 8236;
          v8[2] = 0;
        }
        v10 = v7;
        do
          v11 = *v7++;
        while ( v11 );
        v12 = v7 - v10;
        v13 = v10;
        v14 = pcStr - 1;
        do
          v15 = (v14++)[1];
        while ( v15 );
        qmemcpy(v14, v13, v12);
        v4 = ClassCount;
        v3 = pcStr;
      }
LABEL_18:
      ++v5;
    }
    while ( v5 < 28 );
  }
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (006481A0) --------------------------------------------------------
void __cdecl CharClass::GetEquipableClassSortStr(__int64 kClassMask, char *pcStr, unsigned int uiStrLen)
{
  char *v3; // esi@1
  unsigned int v4; // edi@1
  char v5; // al@1
  NiUnsharedGeometryGroup *v6; // eax@7
  char *v7; // esi@7
  char v8; // cl@8
  char v9; // al@10
  char *v10; // edi@13
  char v11; // al@14
  NiUnsharedGeometryGroup *v12; // eax@15
  NiUnsharedGeometryGroup *v13; // ecx@15
  char v14; // dl@16
  unsigned int v15; // eax@17
  NiUnsharedGeometryGroup *v16; // edx@17
  char *v17; // esi@17
  char v18; // cl@18
  char *v19; // eax@20
  const char *v20; // edx@20
  char *v21; // eax@23
  char *v22; // edi@23
  char v23; // cl@24
  unsigned int v24; // eax@25
  char *v25; // esi@25
  char v26; // cl@26
  char v27; // al@29
  char *v28; // edi@34
  char v29; // al@35
  NiUnsharedGeometryGroup *v30; // eax@36
  NiUnsharedGeometryGroup *v31; // ecx@36
  char v32; // dl@37
  char v33; // cl@39
  char *v34; // eax@41
  const char *v35; // edx@41
  char *v36; // eax@44
  char *v37; // edi@44
  char v38; // cl@45
  unsigned int v39; // eax@46
  char *v40; // esi@46
  char v41; // cl@47
  char v42; // al@50
  char *v43; // edi@55
  char v44; // al@56
  NiUnsharedGeometryGroup *v45; // eax@57
  NiUnsharedGeometryGroup *v46; // ecx@57
  char v47; // dl@58
  char v48; // cl@60
  char *v49; // eax@62
  const char *v50; // edx@62
  char *v51; // eax@65
  char *v52; // edi@65
  char v53; // cl@66
  unsigned int v54; // eax@67
  char *v55; // esi@67
  char v56; // cl@68
  char v57; // al@71
  char *v58; // edi@76
  char v59; // al@77
  NiUnsharedGeometryGroup *v60; // eax@78
  NiUnsharedGeometryGroup *v61; // ecx@78
  char v62; // dl@79
  char v63; // cl@81
  char *v64; // eax@83
  const char *v65; // edx@83
  char *v66; // eax@86
  char *v67; // edi@86
  char v68; // cl@87
  unsigned int v69; // eax@88
  char *v70; // esi@88
  char v71; // cl@89
  char v72; // al@92
  char *v73; // edi@97
  char v74; // al@98
  NiUnsharedGeometryGroup *v75; // eax@99
  NiUnsharedGeometryGroup *v76; // ecx@99
  char v77; // dl@100
  char v78; // cl@102
  char *v79; // eax@104
  const char *v80; // edx@104
  char *v81; // eax@107
  char *v82; // edi@107
  char v83; // cl@108
  unsigned int v84; // eax@109
  char *v85; // esi@109
  char v86; // cl@110
  char *v87; // edi@118
  char v88; // al@119
  NiUnsharedGeometryGroup *v89; // eax@120
  NiUnsharedGeometryGroup *v90; // ecx@120
  char v91; // dl@121
  char v92; // cl@123
  NiUnsharedGeometryGroup *v93; // eax@125
  char *v94; // eax@126
  char *v95; // ecx@126
  char v96; // dl@127
  unsigned int v97; // eax@128
  char *v98; // edx@128
  char *v99; // esi@128
  char v100; // cl@129
  NiUnsharedGeometryGroup *v101; // eax@137
  NiUnsharedGeometryGroup *v102; // ecx@137
  char v103; // dl@138
  char v104; // cl@140
  char kClassID; // [sp+Eh] [bp-Ah]@113
  char bFighterAble; // [sp+12h] [bp-6h]@1
  bool bSentinelAble; // [sp+13h] [bp-5h]@1
  char bJokerAble; // [sp+14h] [bp-4h]@1
  char bMageAble; // [sp+15h] [bp-3h]@1
  char bClericAble; // [sp+16h] [bp-2h]@1
  char bArcherAble; // [sp+17h] [bp-1h]@1

  v3 = pcStr;
  v4 = kClassMask;
  *pcStr = 0;
  bFighterAble = CharClass::TestChrBaseClassMask(kClassMask, 1);
  bArcherAble = CharClass::TestChrBaseClassMask(kClassMask, 11);
  bClericAble = CharClass::TestChrBaseClassMask(kClassMask, 6);
  bMageAble = CharClass::TestChrBaseClassMask(kClassMask, 16);
  bJokerAble = CharClass::TestChrBaseClassMask(kClassMask, 21);
  v5 = CharClass::TestChrBaseClassMask(kClassMask, 26);
  bSentinelAble = v5;
  if ( bFighterAble )
  {
    if ( bArcherAble && bClericAble && bMageAble && bJokerAble && v5 )
    {
      v6 = TextData::Get(0x96FED6E1);
      v7 = (char *)(pcStr - (char *)v6);
      do
      {
        v8 = (char)v6->vfptr;
        *((_BYTE *)&v6->vfptr + (_DWORD)v7) = v6->vfptr;
        v6 = (NiUnsharedGeometryGroup *)((char *)v6 + 1);
      }
      while ( v8 );
      return;
    }
    v9 = CharClass::GetMinimumChrClass(kClassMask, 1);
    if ( v9 == 4 && kClassMask > 16 )
    {
      CharClass::GetEquipableClassStr(kClassMask, pcStr, uiStrLen);
      if ( strlen((const char *)TextData::Get(0xEA04D9F3)) + strlen(pcStr) + 2 >= uiStrLen )
        return;
      v10 = pcStr - 1;
      do
        v11 = (v10++)[1];
      while ( v11 );
      *(_WORD *)v10 = 32;
      v12 = TextData::Get(0xEA04D9F3);
      v13 = v12;
      do
      {
        v14 = (char)v12->vfptr;
        v12 = (NiUnsharedGeometryGroup *)((char *)v12 + 1);
      }
      while ( v14 );
      v15 = (char *)v12 - (char *)v13;
      v16 = v13;
      v17 = pcStr - 1;
      do
        v18 = (v17++)[1];
      while ( v18 );
      goto LABEL_141;
    }
    v19 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), (unsigned __int8)v9);
    v20 = (const char *)&unk_96F8EB;
    if ( v19 )
      v20 = v19 + 21;
    if ( strlen(v20) + 1 >= uiStrLen )
      return;
    v21 = fs("%s ", v20);
    v22 = v21;
    do
      v23 = *v21++;
    while ( v23 );
    v24 = v21 - v22;
    v25 = pcStr - 1;
    do
      v26 = (v25++)[1];
    while ( v26 );
    qmemcpy(v25, v22, v24);
    v3 = pcStr;
    v4 = kClassMask;
  }
  if ( bArcherAble )
  {
    v27 = CharClass::GetMinimumChrClass(__PAIR__(HIDWORD(kClassMask), v4), 11);
    if ( v27 == 14 && SHIDWORD(kClassMask) >= 0 && (SHIDWORD(kClassMask) > 0 || v4 > 0x4000) )
    {
      CharClass::GetEquipableClassStr(__PAIR__(HIDWORD(kClassMask), v4), v3, uiStrLen);
      if ( strlen((const char *)TextData::Get(0xEA04D9F3)) + strlen(v3) + 2 >= uiStrLen )
        return;
      v28 = v3 - 1;
      do
        v29 = (v28++)[1];
      while ( v29 );
      *(_WORD *)v28 = 32;
      v30 = TextData::Get(0xEA04D9F3);
      v31 = v30;
      do
      {
        v32 = (char)v30->vfptr;
        v30 = (NiUnsharedGeometryGroup *)((char *)v30 + 1);
      }
      while ( v32 );
      v15 = (char *)v30 - (char *)v31;
      v16 = v31;
      v17 = v3 - 1;
      do
        v33 = (v17++)[1];
      while ( v33 );
      goto LABEL_141;
    }
    v34 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), (unsigned __int8)v27);
    v35 = (const char *)&unk_96F8EB;
    if ( v34 )
      v35 = v34 + 21;
    if ( strlen(v35) + 1 >= uiStrLen )
      return;
    v36 = fs("%s ", v35);
    v37 = v36;
    do
      v38 = *v36++;
    while ( v38 );
    v39 = v36 - v37;
    v40 = v3 - 1;
    do
      v41 = (v40++)[1];
    while ( v41 );
    qmemcpy(v40, v37, v39);
    v3 = pcStr;
    v4 = kClassMask;
  }
  if ( bClericAble )
  {
    v42 = CharClass::GetMinimumChrClass(__PAIR__(HIDWORD(kClassMask), v4), 6);
    if ( v42 == 9 && SHIDWORD(kClassMask) >= 0 && (SHIDWORD(kClassMask) > 0 || v4 > 0x200) )
    {
      CharClass::GetEquipableClassStr(__PAIR__(HIDWORD(kClassMask), v4), v3, uiStrLen);
      if ( strlen((const char *)TextData::Get(0xEA04D9F3)) + strlen(v3) + 2 >= uiStrLen )
        return;
      v43 = v3 - 1;
      do
        v44 = (v43++)[1];
      while ( v44 );
      *(_WORD *)v43 = 32;
      v45 = TextData::Get(0xEA04D9F3);
      v46 = v45;
      do
      {
        v47 = (char)v45->vfptr;
        v45 = (NiUnsharedGeometryGroup *)((char *)v45 + 1);
      }
      while ( v47 );
      v15 = (char *)v45 - (char *)v46;
      v16 = v46;
      v17 = v3 - 1;
      do
        v48 = (v17++)[1];
      while ( v48 );
      goto LABEL_141;
    }
    v49 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), (unsigned __int8)v42);
    v50 = (const char *)&unk_96F8EB;
    if ( v49 )
      v50 = v49 + 21;
    if ( strlen(v50) + 1 >= uiStrLen )
      return;
    v51 = fs("%s ", v50);
    v52 = v51;
    do
      v53 = *v51++;
    while ( v53 );
    v54 = v51 - v52;
    v55 = v3 - 1;
    do
      v56 = (v55++)[1];
    while ( v56 );
    qmemcpy(v55, v52, v54);
    v3 = pcStr;
    v4 = kClassMask;
  }
  if ( bMageAble )
  {
    v57 = CharClass::GetMinimumChrClass(__PAIR__(HIDWORD(kClassMask), v4), 16);
    if ( v57 == 19 && SHIDWORD(kClassMask) >= 0 && (SHIDWORD(kClassMask) > 0 || v4 > 0x80000) )
    {
      CharClass::GetEquipableClassStr(__PAIR__(HIDWORD(kClassMask), v4), v3, uiStrLen);
      if ( strlen((const char *)TextData::Get(0xEA04D9F3)) + strlen(v3) + 2 >= uiStrLen )
        return;
      v58 = v3 - 1;
      do
        v59 = (v58++)[1];
      while ( v59 );
      *(_WORD *)v58 = 32;
      v60 = TextData::Get(0xEA04D9F3);
      v61 = v60;
      do
      {
        v62 = (char)v60->vfptr;
        v60 = (NiUnsharedGeometryGroup *)((char *)v60 + 1);
      }
      while ( v62 );
      v15 = (char *)v60 - (char *)v61;
      v16 = v61;
      v17 = v3 - 1;
      do
        v63 = (v17++)[1];
      while ( v63 );
      goto LABEL_141;
    }
    v64 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), (unsigned __int8)v57);
    v65 = (const char *)&unk_96F8EB;
    if ( v64 )
      v65 = v64 + 21;
    if ( strlen(v65) + 1 >= uiStrLen )
      return;
    v66 = fs("%s ", v65);
    v67 = v66;
    do
      v68 = *v66++;
    while ( v68 );
    v69 = v66 - v67;
    v70 = v3 - 1;
    do
      v71 = (v70++)[1];
    while ( v71 );
    qmemcpy(v70, v67, v69);
    v3 = pcStr;
    v4 = kClassMask;
  }
  if ( bJokerAble )
  {
    v72 = CharClass::GetMinimumChrClass(__PAIR__(HIDWORD(kClassMask), v4), 21);
    if ( v72 == 24 && SHIDWORD(kClassMask) >= 0 && (SHIDWORD(kClassMask) > 0 || v4 > 0x1000000) )
    {
      CharClass::GetEquipableClassStr(__PAIR__(HIDWORD(kClassMask), v4), v3, uiStrLen);
      if ( strlen((const char *)TextData::Get(0xEA04D9F3)) + strlen(v3) + 2 >= uiStrLen )
        return;
      v73 = v3 - 1;
      do
        v74 = (v73++)[1];
      while ( v74 );
      *(_WORD *)v73 = 32;
      v75 = TextData::Get(0xEA04D9F3);
      v76 = v75;
      do
      {
        v77 = (char)v75->vfptr;
        v75 = (NiUnsharedGeometryGroup *)((char *)v75 + 1);
      }
      while ( v77 );
      v15 = (char *)v75 - (char *)v76;
      v16 = v76;
      v17 = v3 - 1;
      do
        v78 = (v17++)[1];
      while ( v78 );
      goto LABEL_141;
    }
    v79 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), (unsigned __int8)v72);
    v80 = (const char *)&unk_96F8EB;
    if ( v79 )
      v80 = v79 + 21;
    if ( strlen(v80) + 1 >= uiStrLen )
      return;
    v81 = fs("%s ", v80);
    v82 = v81;
    do
      v83 = *v81++;
    while ( v83 );
    v84 = v81 - v82;
    v85 = v3 - 1;
    do
      v86 = (v85++)[1];
    while ( v86 );
    qmemcpy(v85, v82, v84);
    v3 = pcStr;
    v4 = kClassMask;
  }
  if ( bSentinelAble )
  {
    kClassID = CharClass::GetMinimumChrClass(__PAIR__(HIDWORD(kClassMask), v4), 26);
    if ( kClassID == 27 && SHIDWORD(kClassMask) >= 0 && (SHIDWORD(kClassMask) > 0 || v4 > 0x8000000) )
    {
      CharClass::GetEquipableClassStr(__PAIR__(HIDWORD(kClassMask), v4), v3, uiStrLen);
      if ( strlen((const char *)TextData::Get(0xEA04D9F3)) + strlen(v3) + 2 >= uiStrLen )
        return;
      v87 = v3 - 1;
      do
        v88 = (v87++)[1];
      while ( v88 );
      *(_WORD *)v87 = 32;
      v89 = TextData::Get(0xEA04D9F3);
      v90 = v89;
      do
      {
        v91 = (char)v89->vfptr;
        v89 = (NiUnsharedGeometryGroup *)((char *)v89 + 1);
      }
      while ( v91 );
      v15 = (char *)v89 - (char *)v90;
      v16 = v90;
      v17 = v3 - 1;
      do
        v92 = (v17++)[1];
      while ( v92 );
      goto LABEL_141;
    }
    v93 = CharClass::GetLocalName(kClassID);
    if ( strlen((const char *)v93) + 1 >= uiStrLen )
      return;
    v94 = fs("%s ", v93);
    v95 = v94;
    do
      v96 = *v94++;
    while ( v96 );
    v97 = v94 - v95;
    v98 = v95;
    v99 = v3 - 1;
    do
      v100 = (v99++)[1];
    while ( v100 );
    qmemcpy(v99, v98, v97);
    v3 = pcStr;
  }
  if ( bFighterAble || bArcherAble || bClericAble || bMageAble || bJokerAble || bSentinelAble )
  {
    v101 = TextData::Get(0xEA04D9F3);
    v102 = v101;
    do
    {
      v103 = (char)v101->vfptr;
      v101 = (NiUnsharedGeometryGroup *)((char *)v101 + 1);
    }
    while ( v103 );
    v15 = (char *)v101 - (char *)v102;
    v16 = v102;
    v17 = v3 - 1;
    do
      v104 = (v17++)[1];
    while ( v104 );
LABEL_141:
    qmemcpy(v17, v16, v15);
  }
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (006489D0) --------------------------------------------------------
UseClassTypeInfo *__cdecl UseCalssTypeTable::GetClassByClassType(UseClassType kClassType)
{
  int v1; // eax@1
  unsigned int v2; // edi@2
  unsigned int v3; // esi@4
  UseClassTypeInfo *result; // eax@7

  v1 = *(_DWORD *)(ITableBase<UseClassTypeInfo,UseCalssTypeTable>::ms_pkTable + 56);
  if ( v1 )
    v2 = *(_DWORD *)(v1 + 40);
  else
    v2 = 0;
  v3 = 0;
  if ( v2 )
  {
    while ( *(_DWORD *)CDataReader::GetRecord(
                         (CDataReader *)(ITableBase<UseClassTypeInfo,UseCalssTypeTable>::ms_pkTable + 4),
                         v3) != kClassType )
    {
      if ( ++v3 >= v2 )
        goto LABEL_7;
    }
    result = (UseClassTypeInfo *)CDataReader::GetRecord(
                                   (CDataReader *)(ITableBase<UseClassTypeInfo,UseCalssTypeTable>::ms_pkTable + 4),
                                   v3);
  }
  else
  {
LABEL_7:
    result = 0;
  }
  return result;
}
// A8C264: using guessed type int ITableBase<UseClassTypeInfo,UseCalssTypeTable>::ms_pkTable;

//----- (00648A30) --------------------------------------------------------
void __thiscall JumpProcessor::ForceEnd(JumpProcessor *this, bool bStop)
{
  this->m_nJumpState = 0;
  this->m_bJumpFlyStart = 0;
  this->m_bEndEvent = 1;
}

//----- (00648A40) --------------------------------------------------------
char __thiscall JumpProcessor::OnEnd(JumpProcessor *this)
{
  char result; // al@2

  if ( this->m_bEndEvent )
  {
    this->m_bEndEvent = 0;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00648A50) --------------------------------------------------------
void __thiscall JumpProcessor::SetCurPos(JumpProcessor *this, NiPoint3 *pos3StartPos)
{
  this->m_pos3CurPos = *pos3StartPos;
}

//----- (00648A70) --------------------------------------------------------
double __thiscall JumpProcessor::GetCameraPos(JumpProcessor *this)
{
  return this->m_pos3StartPos.z;
}

//----- (00648A80) --------------------------------------------------------
bool __thiscall JumpProcessor::IsJump(JumpProcessor *this)
{
  return this->m_nJumpState != 0;
}

//----- (00648A90) --------------------------------------------------------
char __thiscall JumpProcessor::Jump(JumpProcessor *this, float fTime, NiPoint3 pos3StartPos)
{
  JumpProcessor *v3; // esi@1
  Char *v4; // ecx@1
  char result; // al@6

  v3 = this;
  v4 = this->m_pChar;
  if ( v4
    && Char::GetSequence(v4, v3->m_uiEC_JumpStart_Run)
    && Char::GetSequence(v3->m_pChar, v3->m_uiEC_JumpStart_Stand) )
  {
    if ( !v3->m_nJumpState )
    {
      v3->m_fJumpTime = 0.0;
      v3->m_fJumpStartTime = 0.0;
      v3->m_pos3StartPos = pos3StartPos;
      v3->m_bJumpButPress = 1;
      v3->m_nJumpState = 0;
      v3->m_bJumpFlyStart = 0;
      v3->m_uiResultLandingCode = 0;
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00648B00) --------------------------------------------------------
void __thiscall JumpProcessor::SetJumpAni(JumpProcessor *this, unsigned int uiJumpStart_Stand, unsigned int uiJumpStart_Run, unsigned int uiJumpFly, unsigned int uiJumpLandingStand, unsigned int uiJumpLandingMove)
{
  this->m_uiEC_JumpStart_Stand = uiJumpStart_Stand;
  this->m_uiEC_JumpStart_Run = uiJumpStart_Run;
  this->m_uiEC_JumpFly = uiJumpFly;
  this->m_uiEC_JumpLandingStand = uiJumpLandingStand;
  this->m_uiEC_JumpLandingMove = uiJumpLandingMove;
}

//----- (00648B30) --------------------------------------------------------
void __thiscall ActionMgr::PlaySoundA(ActionMgr *this, int iSndIndex, ActionInfo *pkActionInfo)
{
  ActionMgr *v3; // esi@1
  Char *v4; // eax@2

  v3 = this;
  if ( pkActionInfo == this->m_pkCurPlayActInfo )
  {
    v4 = Char::GetAttackTargetChar(this->m_pkChar);
    SoundMgr::CreateSound(&g_kSoundMgr, v3->m_pkCurPlayActInfo, iSndIndex, v3->m_pkChar, v4);
  }
}

//----- (00648B70) --------------------------------------------------------
int __stdcall ActionMgr::GetKeyStrToInt(char *KeywordStr)
{
  int result; // eax@2

  if ( KeywordStr && strlen(KeywordStr) == 7 )
    result = atoi(KeywordStr + 2);
  else
    result = 0;
  return result;
}

//----- (00648BB0) --------------------------------------------------------
void __thiscall JumpProcessor::clear(JumpProcessor *this)
{
  JumpProcessor *v1; // esi@1
  NiNode *v2; // edi@1

  v1 = this;
  this->m_bJumpButPress = 0;
  this->m_nJumpState = 0;
  v2 = this->m_spJumpInfo.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spJumpInfo.m_pObject = 0;
  }
  v1->m_bJumpFlyStart = 0;
  v1->m_fJumpTime = 0.0;
  v1->m_bEndEvent = 0;
  v1->m_uiEC_JumpFly = 0;
  v1->m_fJumpStartTime = 0.0;
  v1->m_uiEC_JumpLandingStand = 0;
  v1->m_uiEC_JumpLandingMove = 0;
  v1->m_uiEC_JumpStart_Stand = 0;
  v1->m_uiEC_JumpStart_Run = 0;
  v1->m_uiResultLandingCode = 0;
  v1->m_uiResultJumpStartCode = 0;
  v1->m_pActor = 0;
  v1->m_pChar = 0;
  v1->m_pos3StartPos = NiPoint3::ZERO;
  v1->m_pos3CurPos = NiPoint3::ZERO;
}

//----- (00648C50) --------------------------------------------------------
void __thiscall JumpProcessor::JumpProcessor(JumpProcessor *this)
{
  JumpProcessor *v1; // esi@1

  v1 = this;
  this->m_spJumpInfo.m_pObject = 0;
  NsEffect::NsEffect(&this->m_kEffect);
  JumpProcessor::clear(v1);
}

//----- (00648CB0) --------------------------------------------------------
char __thiscall JumpProcessor::IsJumpEnd(JumpProcessor *this, float fHeight)
{
  JumpProcessor *v2; // esi@1
  float v3; // eax@1
  float v4; // ecx@1
  float v5; // edx@1
  char result; // al@4
  NiPoint3 kPos; // [sp+10h] [bp-Ch]@1

  v2 = this;
  v3 = this->m_pos3CurPos.x;
  v4 = this->m_pos3CurPos.y;
  v5 = v2->m_pos3CurPos.z;
  kPos.x = v3;
  kPos.y = v4;
  kPos.z = v5;
  if ( World::GetAdvGroundPos(&g_kWorld, v3, v4, &kPos) && v2->m_bJumpFlyStart && kPos.z > (double)fHeight )
  {
    v2->m_pos3StartPos.z = kPos.z;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00648D20) --------------------------------------------------------
char __thiscall JumpProcessor::IsJumpAniState(JumpProcessor *this)
{
  NiActorManager *v1; // eax@1
  unsigned int v2; // edx@1
  unsigned int v3; // eax@1
  unsigned int v4; // esi@1
  char v5; // bl@1
  unsigned int v6; // edi@7
  unsigned int v7; // ecx@9
  char result; // al@11
  char v9; // dl@12
  unsigned int v10; // [sp+Ch] [bp-8h]@5
  unsigned int v11; // [sp+10h] [bp-4h]@3

  v1 = this->m_pActor;
  v2 = v1->m_eCurID;
  v3 = v1->m_eTargetID;
  v4 = this->m_uiEC_JumpStart_Stand;
  v5 = 0;
  if ( v4 == v2 )
    v5 = 1;
  v11 = this->m_uiEC_JumpStart_Run;
  if ( v11 == v2 )
    v5 = 1;
  v10 = this->m_uiEC_JumpFly;
  if ( v10 == v2 )
    v5 = 1;
  v6 = this->m_uiEC_JumpLandingStand;
  if ( v6 == v2 )
    v5 = 1;
  v7 = this->m_uiEC_JumpLandingMove;
  if ( v7 != v2 && !v5 )
    goto LABEL_25;
  v9 = 0;
  if ( v4 == v3 )
    v9 = 1;
  if ( v11 == v3 )
    v9 = 1;
  if ( v10 == v3 )
    v9 = 1;
  if ( v6 == v3 )
    v9 = 1;
  if ( v7 == v3 || v9 )
    result = 1;
  else
LABEL_25:
    result = 0;
  return result;
}

//----- (00648DA0) --------------------------------------------------------
void __thiscall ActionMgr::PlayEffect(ActionMgr *this, int iEffIndex, ActionInfo *pkActionInfo)
{
  ActionMgr *v3; // esi@1
  Char *v4; // edi@2
  unsigned __int16 *v5; // eax@2
  ActiveSkillInfo *v6; // eax@4
  Char *v7; // edx@6

  v3 = this;
  if ( pkActionInfo == this->m_pkCurPlayActInfo )
  {
    v4 = Char::GetAttackTargetChar(this->m_pkChar);
    v5 = &v3->m_pkCurPlaySkillViewInfo->ID;
    if ( !v5 || iEffIndex )
    {
      EffectMgr::CreateActionEffect(&g_kEffectMgr, v3->m_pkCurPlayActInfo, iEffIndex, v3->m_pkChar, v4, 0);
    }
    else
    {
      v6 = IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::GetByID(*v5);
      if ( v6 )
      {
        if ( v6->First == 4 && (v7 = v3->m_pkChar, v7->m_bGroundSkillTargetPointSetted) )
          EffectMgr::CreateActionEffect(&g_kEffectMgr, v3->m_pkCurPlayActInfo, 0, v7, v4, 1);
        else
          EffectMgr::CreateActionEffect(&g_kEffectMgr, v3->m_pkCurPlayActInfo, 0, v3->m_pkChar, v4, 0);
      }
    }
  }
}

//----- (00648E50) --------------------------------------------------------
BOOL __thiscall ActionMgr::UseOldActionEffect(ActionMgr *this)
{
  return !this->m_mapMelee._Mysize && !this->m_mapRange._Mysize;
}

//----- (00648E70) --------------------------------------------------------
double __userpurge JumpProcessor::Update@<st0>(JumpProcessor *this@<ecx>, int a2@<edi>, float fTime)
{
  JumpProcessor *v3; // esi@1
  double result; // st7@2
  char *v5; // eax@7
  const char *v6; // eax@7
  NiObjectNET *v7; // eax@7
  Char *v8; // ecx@8
  int v9; // ecx@15
  double v10; // st7@16
  int v11; // ecx@22
  int v12; // eax@26
  NiControllerSequence *v13; // eax@28
  NiActorManager *v14; // ecx@32
  unsigned int v15; // eax@32
  NiActorManager *v16; // eax@35
  Char *v17; // ecx@38
  unsigned int v18; // eax@38
  NiActorManager *v19; // edi@41
  unsigned int v20; // ebx@42
  NiActorManager *v21; // eax@46
  int v22; // ecx@49
  bool v23; // zf@49
  AbStateInfecteeVtbl *v24; // eax@49
  const char *v25; // [sp+Ch] [bp-20h]@39
  const char *v26; // [sp+10h] [bp-1Ch]@39
  int v27; // [sp+18h] [bp-14h]@4
  int v28; // [sp+1Ch] [bp-10h]@0
  float fUpTime; // [sp+24h] [bp-8h]@13
  float fUpTimea; // [sp+24h] [bp-8h]@29
  float fJumpHeight; // [sp+28h] [bp-4h]@4

  v3 = this;
  if ( !this->m_pActor || !this->m_pChar )
    return 0.0;
  v27 = a2;
  fJumpHeight = this->m_pos3StartPos.z;
  if ( !this->m_bJumpButPress )
  {
    if ( !this->m_nJumpState )
      goto LABEL_54;
LABEL_13:
    fUpTime = Timer::ms_fCurTime - this->m_fJumpStartTime;
    this->m_fJumpTime = fUpTime;
    if ( this->m_bJumpFlyStart )
      NiAVObject::Update((NiAVObject *)&this->m_spJumpInfo.m_pObject->vfptr, fUpTime, 1);
    v9 = ((int (__stdcall *)(const char *))v3->m_spJumpInfo.m_pObject->vfptr[18].__vecDelDtor)("Jump");
    if ( v3->m_fJumpTime >= (double)v3->m_kEffect.m_fMaxTime )
    {
      if ( v3->m_nJumpState != 3 )
        v3->m_pos3StartPos.z = v3->m_pos3StartPos.z - Timer::ms_fDeltaTime * 200.0;
      v10 = v3->m_pos3StartPos.z;
    }
    else
    {
      v10 = *(float *)(v9 + 148) + fJumpHeight;
    }
    fJumpHeight = v10;
    if ( v3->m_nJumpState != 3 && JumpProcessor::IsJumpEnd(v3, fJumpHeight) )
    {
      v11 = (int)&v3->m_pChar->m_kMoveToTarget;
      v3->m_nJumpState = 3;
      if ( (unsigned __int8)(*(int (__stdcall **)(int))(*(_DWORD *)v11 + 4))(a2) )
        v3->m_uiResultLandingCode = v3->m_uiEC_JumpLandingMove;
      else
        v3->m_uiResultLandingCode = v3->m_uiEC_JumpLandingStand;
      v27 = 0;
      ((void (__stdcall *)(unsigned int, _DWORD))v3->m_pChar->vfptr[10].SetAbStateProperty)(
        v3->m_uiResultLandingCode,
        0);
      fJumpHeight = v3->m_pos3StartPos.z;
      v3->m_bJumpFlyStart = 0;
    }
    v12 = v3->m_nJumpState;
    if ( v12 == 1 )
    {
      if ( v3->m_pActor )
      {
        v13 = (NiControllerSequence *)Char::GetSequence(v3->m_pChar, v3->m_uiResultJumpStartCode);
        if ( !v13 )
        {
LABEL_36:
          result = -1.0;
          v3->m_nJumpState = 0;
          v3->m_bJumpFlyStart = 0;
          v3->m_bEndEvent = 1;
          return result;
        }
        fUpTimea = NiControllerSequence::GetKeyTimeAt(v13, "Jump");
        if ( !v3->m_bJumpFlyStart && v3->m_fJumpTime > (double)fUpTimea )
        {
          v3->m_fJumpTime = 0.0;
          v3->m_fJumpStartTime = Timer::ms_fCurTime;
          v3->m_bJumpFlyStart = 1;
          NsEffect::Start(&v3->m_kEffect, v3->m_fJumpStartTime);
          NiAVObject::Update((NiAVObject *)&v3->m_spJumpInfo.m_pObject->vfptr, 0.0, 1);
        }
        v14 = v3->m_pActor;
        v15 = v3->m_uiResultJumpStartCode;
        if ( v15 == v14->m_eCurID || v14->m_eTransitionState == 3 && v15 == v14->m_eTargetID )
        {
          v16 = Char::GetSequence(v3->m_pChar, v3->m_uiResultJumpStartCode);
          if ( !v16 )
            goto LABEL_36;
          if ( v16->m_fTransStartTime <= (double)v16->m_fTransEndTime )
          {
            v17 = v3->m_pChar;
            v18 = v3->m_uiEC_JumpFly;
            v3->m_bJumpFlyStart = 1;
            v3->m_nJumpState = 2;
            ((void (__stdcall *)(unsigned int, _DWORD, _DWORD))v17->vfptr[10].SetAbStateProperty)(v18, 0, 0);
            result = fJumpHeight;
            v3->m_bJumpButPress = 0;
            return result;
          }
        }
LABEL_54:
        result = fJumpHeight;
        v3->m_bJumpButPress = 0;
        return result;
      }
      v26 = "Jump error";
      v25 = "not Found Ani";
    }
    else
    {
      if ( v12 != 3 )
        goto LABEL_54;
      v19 = v3->m_pActor;
      if ( v19 )
      {
        v20 = v3->m_uiResultLandingCode;
        if ( v20 == v19->m_eCurID
          || !JumpProcessor::IsJumpAniState(v3)
          || v19->m_eTransitionState == 3 && v20 == v19->m_eTargetID )
        {
          v21 = Char::GetSequence(v3->m_pChar, v20);
          if ( !v21 || v21->m_fTransStartTime <= (double)v21->m_fTransEndTime || !JumpProcessor::IsJumpAniState(v3) )
          {
            v22 = (int)&v3->m_pChar->m_kMoveToTarget;
            v3->m_nJumpState = 0;
            v3->m_bJumpFlyStart = 0;
            v3->m_bEndEvent = 1;
            v23 = (unsigned __int8)(*(int (__stdcall **)(int))(*(_DWORD *)v22 + 4))(v27) == 0;
            v24 = v3->m_pChar->vfptr;
            if ( v23 )
            {
              ((void (__stdcall *)(int))v24[10].DeleteAbStateByAbstateIndex)(v28);
              result = fJumpHeight;
              v3->m_bJumpButPress = 0;
            }
            else
            {
              ((void (__stdcall *)(int))v24[11].AddAbStateByAbstateIndex)(v28);
              result = fJumpHeight;
              v3->m_bJumpButPress = 0;
            }
            return result;
          }
        }
        goto LABEL_54;
      }
      v26 = "Jump error";
      v25 = "not Found Ani";
    }
    MessageBoxA(0, v25, v26, 0);
    goto LABEL_54;
  }
  if ( this->m_nJumpState )
    goto LABEL_13;
  if ( !this->m_spJumpInfo.m_pObject )
  {
    v5 = Folder::System();
    v6 = Folder::Merge(v5, "jump.nif");
    v7 = Ns_LoadNifFile(v6, 0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_spJumpInfo, (NiD3DDefaultShader *)v7);
    NsEffect::SetEffectNode(&v3->m_kEffect, (NiAVObject *)&v3->m_spJumpInfo.m_pObject->vfptr);
  }
  v3->m_fJumpTime = 0.0;
  NiAVObject::Update((NiAVObject *)&v3->m_spJumpInfo.m_pObject->vfptr, 0.0, 1);
  v8 = v3->m_pChar;
  v3->m_fJumpStartTime = Timer::ms_fCurTime;
  v3->m_nJumpState = 1;
  if ( (unsigned __int8)(*(int (__stdcall **)(int))&v8->m_kMoveToTarget.vfptr->gap4[0])(a2) )
    v3->m_uiResultJumpStartCode = v3->m_uiEC_JumpStart_Run;
  else
    v3->m_uiResultJumpStartCode = v3->m_uiEC_JumpStart_Stand;
  ((void (__stdcall *)(unsigned int, _DWORD))v3->m_pChar->vfptr[10].SetAbStateProperty)(v3->m_uiResultJumpStartCode, 0);
  result = fJumpHeight;
  v3->m_bJumpButPress = 0;
  return result;
}
// 648E70: could not find valid save-restore pair for edi
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8B980: using guessed type float Timer::ms_fDeltaTime;

//----- (00649210) --------------------------------------------------------
void __thiscall ActionMgr::UpdateActionTable(ActionMgr *this, Char *pkTargetChar)
{
  ActionMgr *v2; // esi@1
  Char *v3; // ebx@2
  unsigned int v4; // eax@6
  ActionInfoSet *v5; // ecx@6
  ActionInfo *v6; // eax@7
  Char *v7; // eax@11
  bool v8; // zf@14
  double v9; // st5@15
  double v10; // st6@15
  signed int v11; // edi@15
  double v12; // st7@21
  Char *v13; // ecx@24
  char v14; // al@25
  Char *v15; // edx@28
  MobViewInfo *v16; // eax@29
  ActionInfo *v17; // ecx@32
  unsigned __int16 *v18; // eax@37
  ActiveSkillInfo *v19; // eax@38
  Char *v20; // edx@40
  ActionInfo *v21; // ecx@45
  ActionInfo *v22; // ecx@50
  ActionInfo *v23; // ecx@55
  ActionInfo *v24; // ecx@60
  float fPastTime; // [sp+4h] [bp-4h]@14
  float fPastTimea; // [sp+4h] [bp-4h]@15

  v2 = this;
  if ( this->m_pActor )
  {
    v3 = pkTargetChar;
    if ( *(float *)&pkTargetChar != 0.0 )
    {
      if ( ((int (__thiscall *)(Char *))pkTargetChar->vfptr[13].DeleteAbStateByAbstateIndex)(pkTargetChar) == 4 )
      {
        if ( ((int (__thiscall *)(Char *))v3->vfptr[13].DeleteAbStateByAbstateIndex)(v3) == 4 )
        {
          v4 = Char::GetAniCode(v3, 0, 0, 0);
          v5 = v2->m_pkActInfoSet;
          v2->m_uiCurEventCode = v4;
          if ( v5 )
            v6 = ActionInfoSet::GetByEventCode(v5, v4);
          else
            v6 = 0;
          v2->m_pkCurPlayActInfo = v6;
        }
      }
      else
      {
        NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
          (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v2->m_pActor->m_kSequenceMap,
          v2->m_uiCurEventCode,
          (NiVBSet **)&pkTargetChar);
      }
    }
    if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
           (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v2->m_pActor->m_kSequenceMap,
           v2->m_uiCurEventCode,
           (NiVBSet **)&pkTargetChar) )
    {
      v7 = pkTargetChar;
      if ( *(float *)&pkTargetChar != 0.0
        && (*(_DWORD *)&pkTargetChar->m_bShow == 1 || *(_DWORD *)&pkTargetChar->m_bShow == 5) )
      {
        v8 = pkTargetChar->m_kAbStateProperty.bVisible == 0;
        pkTargetChar = (Char *)pkTargetChar->m_kAbStateProperty.iCantChatStateCount;
        fPastTime = *(float *)&v7->m_kAbStateProperty.iCantHealStateCount;
        if ( v8 )
        {
          v9 = fPastTime / *(float *)&pkTargetChar;
          v10 = *(float *)&pkTargetChar;
          v11 = (signed int)v9;
          pkTargetChar = (Char *)(signed int)v9;
          fPastTimea = fPastTime - (double)(signed int)v9 * v10;
          if ( (signed int)(v2->m_fActionLastUpdateTime / v10) != (signed int)v9 )
          {
            *(_DWORD *)&v2->m_abActionEff[0] = 0;
            v2->m_abActionSnd[1] = 0;
            if ( v3 )
            {
              if ( ((int (__thiscall *)(Char *))v3->vfptr[13].DeleteAbStateByAbstateIndex)(v3) == 4
                && v11
                && v11 != v2->m_iOldLoopCnt )
              {
                v2->m_iOldLoopCnt = v11;
                v2->m_fActionLastUpdateTime = 0.0;
              }
            }
          }
        }
        else
        {
          v12 = fPastTime;
          if ( fPastTime > (double)*(float *)&pkTargetChar )
            v12 = 0.0;
          fPastTimea = v12;
        }
        v13 = v2->m_pkChar;
        if ( v13 )
        {
          v14 = Char::GetClass(v13);
          if ( CharClass::IsKindOf(v14, 11) && Char::CheckActState(v2->m_pkChar, 300000) )
            v2->m_abActionEff[0] = 1;
          v15 = v2->m_pkChar;
          if ( !v15->m_bUserCharacter )
          {
            v16 = v15->m_pMobViewInfo;
            if ( v16 )
            {
              if ( v16->AttackType == 1 )
                v2->m_abActionEff[0] = 1;
            }
          }
          v17 = v2->m_pkCurPlayActInfo;
          if ( v17 )
          {
            if ( v17->EffFile[0][0] != 45 && !v2->m_abActionEff[0] )
            {
              *(float *)&pkTargetChar = (double)v17->EffNote[0] / 1000.0;
              if ( v2->m_fActionLastUpdateTime <= (double)*(float *)&pkTargetChar
                && fPastTimea > (double)*(float *)&pkTargetChar )
              {
                v18 = &v2->m_pkCurPlaySkillViewInfo->ID;
                if ( v18 )
                {
                  v19 = IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::GetByID(*v18);
                  if ( v19 )
                  {
                    if ( v19->First == 4 && (v20 = v2->m_pkChar, v20->m_bGroundSkillTargetPointSetted) )
                      EffectMgr::CreateActionEffect(&g_kEffectMgr, v2->m_pkCurPlayActInfo, 0, v20, v3, 1);
                    else
                      EffectMgr::CreateActionEffect(&g_kEffectMgr, v2->m_pkCurPlayActInfo, 0, v2->m_pkChar, v3, 0);
                  }
                }
                else
                {
                  EffectMgr::CreateActionEffect(&g_kEffectMgr, v17, 0, v15, v3, 0);
                }
                v2->m_abActionEff[0] = 1;
              }
            }
            v21 = v2->m_pkCurPlayActInfo;
            if ( v21->EffFile[1][0] != 45 && !v2->m_abActionEff[1] )
            {
              *(float *)&pkTargetChar = (double)v21->EffNote[1] / 1000.0;
              if ( v2->m_fActionLastUpdateTime <= (double)*(float *)&pkTargetChar
                && fPastTimea > (double)*(float *)&pkTargetChar )
              {
                EffectMgr::CreateActionEffect(&g_kEffectMgr, v21, 1, v2->m_pkChar, v3, 0);
                v2->m_abActionEff[1] = 1;
              }
            }
            v22 = v2->m_pkCurPlayActInfo;
            if ( v22->EffFile[2][0] != 45 && !v2->m_abActionEff[2] )
            {
              *(float *)&pkTargetChar = (double)v22->EffNote[2] / 1000.0;
              if ( v2->m_fActionLastUpdateTime <= (double)*(float *)&pkTargetChar
                && fPastTimea > (double)*(float *)&pkTargetChar )
              {
                EffectMgr::CreateActionEffect(&g_kEffectMgr, v22, 2, v2->m_pkChar, v3, 0);
                v2->m_abActionEff[2] = 1;
              }
            }
            v23 = v2->m_pkCurPlayActInfo;
            if ( v23->SndFile[0][0] != 45 && !v2->m_abActionSnd[0] )
            {
              *(float *)&pkTargetChar = (double)v23->SndNote[0] / 1000.0;
              if ( v2->m_fActionLastUpdateTime <= (double)*(float *)&pkTargetChar
                && fPastTimea > (double)*(float *)&pkTargetChar )
              {
                SoundMgr::CreateSound(&g_kSoundMgr, v23, 0, v2->m_pkChar, v3);
                v2->m_abActionSnd[0] = 1;
              }
            }
            v24 = v2->m_pkCurPlayActInfo;
            if ( v24->SndFile[1][0] == 45
              || v2->m_abActionSnd[1]
              || (*(float *)&pkTargetChar = (double)v24->SndNote[1] / 1000.0,
                  v2->m_fActionLastUpdateTime > (double)*(float *)&pkTargetChar)
              || fPastTimea <= (double)*(float *)&pkTargetChar )
            {
              v2->m_fActionLastUpdateTime = fPastTimea;
            }
            else
            {
              SoundMgr::CreateSound(&g_kSoundMgr, v24, 1, v2->m_pkChar, v3);
              v2->m_fActionLastUpdateTime = fPastTimea;
              v2->m_abActionSnd[1] = 1;
            }
          }
        }
      }
    }
  }
}

//----- (00649610) --------------------------------------------------------
ActionEffectInfo *__stdcall ActionMgr::GetSE(NiControllerSequence *pkCatchedSeq)
{
  ActionEffectInfo *result; // eax@1
  NiTextKeyExtraData *v3; // ebx@2
  int v4; // esi@3
  NiTextKey *v5; // edi@4
  const char *v6; // ecx@4
  char *v7; // esi@9
  unsigned __int16 v8; // ax@12
  unsigned int KeyNum; // [sp+0h] [bp-4h]@4

  result = (ActionEffectInfo *)pkCatchedSeq;
  if ( pkCatchedSeq )
  {
    v3 = pkCatchedSeq->m_spTextKeys.m_pObject;
    if ( v3 && (v4 = 0, v3->m_uiNumKeys) )
    {
      while ( 1 )
      {
        v5 = v3->m_pKeys;
        v6 = v5[v4].m_pText;
        KeyNum = v3->m_uiNumKeys;
        if ( v6 )
        {
          if ( strlen(v6) == 7 && !strncmp("SE", v6, 2u) )
            break;
        }
        if ( ++v4 >= KeyNum )
          goto LABEL_8;
      }
      v7 = v5[v4].m_pText;
      if ( v7 && strlen(v7) == 7 )
      {
        v8 = atoi(v7 + 2);
        result = ActionEffectInfoTab::GetByID(v8);
      }
      else
      {
        result = ActionEffectInfoTab::GetByID(0);
      }
    }
    else
    {
LABEL_8:
      result = 0;
    }
  }
  return result;
}

//----- (006496E0) --------------------------------------------------------
void __thiscall ActionMgr::TextKeyEvent(ActionMgr *this, NiActorManager *pkManager, unsigned int eSequenceID, const char *pcTextKey, NiTextKeyMatch *pkMatchObject, float fCurrentTime, float fEventTime)
{
  const char *v7; // edi@1
  ActionMgr *v8; // ebx@1
  const char *v9; // esi@5
  int v10; // eax@6
  unsigned __int16 v11; // ax@9
  ActionEffectInfo *v12; // eax@11
  ActionEffectInfo *v13; // edi@11
  unsigned __int16 *v14; // eax@11
  ActiveSkillInfo *v15; // esi@12
  char v16; // al@13
  NiControllerSequence *v17; // eax@13
  bool v18; // cl@15
  Char *v19; // ST10_4@18
  unsigned int v20; // eax@18
  const char *v21; // esi@19
  NiMilesListener *v22; // eax@20
  float v23; // ecx@21
  float v24; // edx@21
  float v25; // eax@21
  NiPoint3 kPos; // [sp+24h] [bp-10h]@21
  Char *pkTargetChar; // [sp+30h] [bp-4h]@5

  v7 = pcTextKey;
  v8 = this;
  if ( !pcTextKey )
  {
    OutputDebugStringA("pcTextKey == NULL \n");
    return;
  }
  if ( !pkManager )
  {
    OutputDebugStringA("pkManager == NULL \n");
    return;
  }
  pkTargetChar = Char::GetAttackTargetChar(this->m_pkChar);
  v9 = (const char *)operator new(8u);
  if ( v9 )
  {
    strstr((char *)v7, "SS");
    *(_DWORD *)v9 = 0;
    *((_BYTE *)v9 + 4) = v10 != 0;
    pcTextKey = v9;
  }
  else
  {
    pcTextKey = 0;
  }
  if ( strlen(v7) == 7 )
    v11 = atoi(v7 + 2);
  else
    v11 = 0;
  v12 = ActionEffectInfoTab::GetByID(v11);
  v13 = v12;
  *(_DWORD *)pcTextKey = v12;
  v14 = &v8->m_pkCurPlaySkillViewInfo->ID;
  if ( v14 )
  {
    v15 = IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::GetByID(*v14);
    if ( v15 )
    {
      v16 = NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
              (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&pkManager->m_kSequenceMap,
              eSequenceID,
              (NiVBSet **)&pkManager);
      v17 = (NiControllerSequence *)(v16 != 0 ? (unsigned int)pkManager : 0);
      v18 = v15->First == 4 && v8->m_pkChar->m_bGroundSkillTargetPointSetted;
      EffectMgr::CreateActionEffect(
        &g_kEffectMgr,
        v13,
        v8->m_uiCurEventCode,
        0.0,
        v8->m_pkChar,
        pkTargetChar,
        v18,
        v8->m_pkCurPlaySkillViewInfo->ID,
        v17);
    }
  }
  else
  {
    v19 = v8->m_pkChar;
    v20 = Char::GetAniCode(v19, 0, 0, 0);
    EffectMgr::CreateActionEffect(&g_kEffectMgr, v13, v20, 0.0, v19, pkTargetChar, 0, 0xFFFF, 0);
  }
  v21 = pcTextKey;
  if ( pcTextKey[4] )
  {
    v22 = SoundMgr::GetListener(&g_kSoundMgr);
    if ( v22 )
    {
      v23 = v22->m_kWorld.m_Translate.x;
      v24 = v22->m_kWorld.m_Translate.y;
      v25 = v22->m_kWorld.m_Translate.z;
      kPos.x = v23;
      kPos.y = v24;
      kPos.z = v25;
      SoundMgr::CreateSound(&g_kSoundMgr, v13, &kPos);
      operator delete((void *)v21);
      return;
    }
  }
  else
  {
    SoundMgr::CreateSound(&g_kSoundMgr, v13, v8->m_pkChar, pkTargetChar);
  }
  operator delete((void *)v21);
}

//----- (006498B0) --------------------------------------------------------
void __thiscall ActionMgr::ClearAEEff(ActionMgr *this)
{
  ActionMgr *v1; // edi@1
  std::_Tree_nod<std::_Tmap_traits<enum ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> > > *,std::less<enum ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum ActionMgr::eACTIONEFF_TYPE const ,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> > > *> >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<enum ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> > > *,std::less<enum ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum ActionMgr::eACTIONEFF_TYPE const ,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> > > *> >,0> >::_Node *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<enum ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> > > *,std::less<enum ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum ActionMgr::eACTIONEFF_TYPE const ,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> > > *> >,0> >::_Node *v4; // eax@3
  std::_Tree_nod<std::_Tmap_traits<enum ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> > > *,std::less<enum ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum ActionMgr::eACTIONEFF_TYPE const ,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> > > *> >,0> >::_Node *j; // eax@4
  std::_Tree_nod<std::_Tmap_traits<enum ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> > > *,std::less<enum ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum ActionMgr::eACTIONEFF_TYPE const ,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> > > *> >,0> >::_Node *i; // eax@7
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > result; // [sp+8h] [bp-4h]@2

  v1 = this;
  v2 = this->m_mapAEEffInfo._Myhead;
  v3 = v2->_Left;
  if ( v2->_Left != v2 )
  {
    do
    {
      std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
        (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)v3->_Myval.second,
        &result,
        (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >)v3->_Myval.second->_Myhead->_Left,
        (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >)v3->_Myval.second->_Myhead);
      if ( !v3->_Isnil )
      {
        v4 = v3->_Right;
        if ( v4->_Isnil )
        {
          for ( i = v3->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v3 != i->_Right )
              break;
            v3 = i;
          }
          v3 = i;
        }
        else
        {
          v3 = v3->_Right;
          for ( j = v4->_Left; !j->_Isnil; j = j->_Left )
            v3 = j;
        }
      }
    }
    while ( v3 != v1->m_mapAEEffInfo._Myhead );
  }
}

//----- (00649930) --------------------------------------------------------
void __thiscall ActionMgr::UpdateAE(ActionMgr *this, Char *pkTargetChar, NiControllerSequence *pkSeq)
{
  ActionMgr *v3; // esi@1
  double v4; // st7@3
  std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> > > *v5; // eax@5
  std::_Tree_nod<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> >,1> >::_Node **v6; // eax@5
  std::_Tree_nod<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> >,1> >::_Node *v7; // edi@5
  ActionMgr::ActionEffectInfoEx *v8; // ebx@9
  unsigned __int16 *v9; // eax@12
  int v10; // ebx@13
  int v11; // edi@13
  int *v12; // eax@15
  int v13; // eax@16
  bool v14; // al@19
  int v15; // ST1C_4@21
  unsigned int v16; // edx@21
  Char *v17; // ST10_4@21
  NiMilesListener *v18; // eax@25
  float v19; // ecx@26
  float v20; // edx@26
  float v21; // eax@26
  Char *v22; // ecx@27
  Char *v23; // ST10_4@27
  float fOffSet; // ST0C_4@27
  unsigned int v25; // eax@27
  NiPoint3 kPos; // [sp+28h] [bp-28h]@26
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > result; // [sp+34h] [bp-1Ch]@30
  float v28; // [sp+38h] [bp-18h]@21
  ActionMgr::ActionEffectInfoEx *pkInfoEx; // [sp+3Ch] [bp-14h]@2
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> > > *,std::less<enum ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum ActionMgr::eACTIONEFF_TYPE const ,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> > > *> >,0> > > mIter; // [sp+40h] [bp-10h]@2
  float fLastTime; // [sp+44h] [bp-Ch]@5
  ActionEffectInfo *pkInfo; // [sp+48h] [bp-8h]@10
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> >,1> > > eIter; // [sp+4Ch] [bp-4h]@5

  v3 = this;
  if ( pkSeq->m_eState )
  {
    *(float *)&pkInfoEx = 0.0;
    std::_Tree<std::_Tmap_traits<enum  MHE_STEP,ResElement *,std::less<enum  MHE_STEP>,std::allocator<std::pair<enum  MHE_STEP const,ResElement *>>,0>>::find(
      (std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *)&this->m_mapAEEffInfo,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > *)&mIter,
      (OscTarget *)&pkInfoEx);
    if ( pkSeq->m_fLastScaledTime >= 0.0 )
    {
      v4 = pkSeq->m_fLastScaledTime;
      *(float *)&pkInfoEx = (pkSeq->m_fEndKeyTime - pkSeq->m_fBeginKeyTime) / pkSeq->m_fFrequency;
      if ( *(float *)&pkInfoEx > v4 && v3->m_fEffectStartTime <= (double)Timer::ms_fCurTime )
      {
        v5 = mIter._Ptr->_Myval.second;
        fLastTime = pkSeq->m_fLastScaledTime;
        v6 = &v5->_Myhead->_Left;
        v7 = *v6;
        eIter._Ptr = v7;
        if ( (std::_Tree_nod<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> >,1> >::_Node **)v7 != v6 )
        {
          while ( 1 )
          {
            if ( v7->_Myval.first > (double)fLastTime )
            {
              std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const,int>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&eIter);
            }
            else
            {
              v8 = v7->_Myval.second;
              pkInfoEx = v8;
              if ( *(float *)&v8 != 0.0 )
                pkInfo = v8->m_pkInfo;
              else
                pkInfo = 0;
              v9 = &v3->m_pkCurPlaySkillViewInfo->ID;
              if ( v9 )
              {
                v10 = *v9;
                v11 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
                if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                                      + 16))(
                                        ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                                        v10) )
                {
                  if ( (unsigned __int16)v10 <= *(_WORD *)(v11 + 200) )
                  {
                    v12 = (int *)(*(_DWORD *)(v11 + 196) + 4 * v10);
                    if ( *v12 )
                    {
                      v13 = *v12;
                      if ( v13 )
                      {
                        v14 = *(_DWORD *)(v13 + 184) == 4 && v3->m_pkChar->m_bGroundSkillTargetPointSetted;
                        v15 = v3->m_pkCurPlaySkillViewInfo->ID;
                        v16 = v3->m_uiCurEventCode;
                        v17 = v3->m_pkChar;
                        v28 = fLastTime - (float)eIter._Ptr->_Myval.first;
                        EffectMgr::CreateActionEffect(
                          &g_kEffectMgr,
                          pkInfo,
                          v16,
                          v28,
                          v17,
                          pkTargetChar,
                          v14,
                          v15,
                          pkSeq);
                      }
                    }
                  }
                }
                v8 = pkInfoEx;
                v7 = eIter._Ptr;
              }
              else
              {
                v22 = v3->m_pkChar;
                v28 = fLastTime - (float)v7->_Myval.first;
                v23 = v22;
                fOffSet = v28;
                v25 = Char::GetAniCode(v22, 0, 0, 0);
                EffectMgr::CreateActionEffect(&g_kEffectMgr, pkInfo, v25, fOffSet, v23, pkTargetChar, 0, 0xFFFF, 0);
              }
              if ( *(float *)&v8 != 0.0 )
              {
                if ( v8->m_bSpecialSound )
                {
                  v18 = SoundMgr::GetListener(&g_kSoundMgr);
                  if ( v18 )
                  {
                    v19 = v18->m_kWorld.m_Translate.x;
                    v20 = v18->m_kWorld.m_Translate.y;
                    v21 = v18->m_kWorld.m_Translate.z;
                    kPos.x = v19;
                    kPos.y = v20;
                    kPos.z = v21;
                    SoundMgr::CreateSound(&g_kSoundMgr, pkInfo, &kPos);
                  }
                }
                else
                {
                  SoundMgr::CreateSound(&g_kSoundMgr, pkInfo, v3->m_pkChar, pkTargetChar);
                }
                operator delete(v8);
              }
              eIter._Ptr = (std::_Tree_nod<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> >,1> >::_Node *)std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase((std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)mIter._Ptr->_Myval.second, &result, (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > >)v7)->_Ptr;
            }
            if ( eIter._Ptr == mIter._Ptr->_Myval.second->_Myhead )
              break;
            v7 = eIter._Ptr;
          }
        }
      }
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (00649B80) --------------------------------------------------------
ActionEffectInfo *__thiscall ActionMgr::GetFirstAE(ActionMgr *this, ActionMgr::eACTIONEFF_TYPE eType, bool bDelInfo)
{
  ActionMgr *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<enum ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> > > *,std::less<enum ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum ActionMgr::eACTIONEFF_TYPE const ,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> > > *> >,0> >::_Node *v4; // edi@1
  std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> > > *v5; // eax@2
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node **v6; // edx@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > v7; // esi@3
  ActionEffectInfo **v8; // eax@3
  ActionEffectInfo *v9; // ebx@3
  ActionEffectInfo *result; // eax@5
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> > > *,std::less<enum ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum ActionMgr::eACTIONEFF_TYPE const ,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> > > *> >,0> > > it; // [sp+8h] [bp-4h]@1

  v3 = this;
  std::_Tree<std::_Tmap_traits<enum  MHE_STEP,ResElement *,std::less<enum  MHE_STEP>,std::allocator<std::pair<enum  MHE_STEP const,ResElement *>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *)&this->m_mapAEEffInfo,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > *)&it,
    (OscTarget *)&eType);
  v4 = it._Ptr;
  if ( it._Ptr != v3->m_mapAEEffInfo._Myhead && (v5 = it._Ptr->_Myval.second, v5->_Mysize) )
  {
    v6 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node **)v5->_Myhead;
    v7._Ptr = *v6;
    v8 = (ActionEffectInfo **)(*v6)->_Myval.second;
    v9 = *v8;
    if ( bDelInfo == 1 )
    {
      operator delete(v8);
      std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
        (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)v4->_Myval.second,
        (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > *)&bDelInfo,
        v7);
    }
    result = v9;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00649BF0) --------------------------------------------------------
void __thiscall ActionMgr::~ActionMgr(ActionMgr *this)
{
  ActionMgr *v1; // edi@1
  std::_Tree_nod<std::_Tmap_traits<enum ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> > > *,std::less<enum ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum ActionMgr::eACTIONEFF_TYPE const ,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> > > *> >,0> >::_Node **v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v3; // esi@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > v4; // ecx@2
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v5; // eax@3
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *j; // eax@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *i; // eax@7
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v8; // ST08_4@12
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v9; // ST04_4@12
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v10; // ST08_4@12
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v11; // ST04_4@12
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v12; // ST08_4@12
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v13; // ST04_4@12
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v14; // [sp+10h] [bp-18h]@12
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > result; // [sp+14h] [bp-14h]@11
  ActionMgr *v16; // [sp+18h] [bp-10h]@1
  int v17; // [sp+24h] [bp-4h]@1

  v1 = this;
  v16 = this;
  this->vfptr = (NiActorManager::CallbackObjectVtbl *)ActionMgr::`vftable';
  v17 = 2;
  ActionMgr::ClearAEEff(this);
  v2 = &v1->m_mapAEEffInfo._Myhead->_Left;
  v3 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)*v2;
  if ( (std::_Tree_nod<std::_Tmap_traits<enum ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> > > *,std::less<enum ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum ActionMgr::eACTIONEFF_TYPE const ,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> > > *> >,0> >::_Node **)*v2 != v2 )
  {
    do
    {
      v4._Ptr = v3;
      if ( !v3->_Isnil )
      {
        v5 = v3->_Right;
        if ( v5->_Isnil )
        {
          for ( i = v3->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v3 != i->_Right )
              break;
            v3 = i;
          }
          v3 = i;
        }
        else
        {
          v3 = v3->_Right;
          for ( j = v5->_Left; !j->_Isnil; j = j->_Left )
            v3 = j;
        }
      }
      std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
        (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)&v1->m_mapAEEffInfo,
        &result,
        v4);
    }
    while ( v3 != (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v1->m_mapAEEffInfo._Myhead );
  }
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)&v1->m_mapRange;
  v8._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapRange._Myhead;
  v9._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapRange._Myhead->_Left;
  LOBYTE(v17) = 3;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapRange,
    &v14,
    v9,
    v8);
  operator delete(v1->m_mapRange._Myhead);
  v14._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_mapMelee;
  v10._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapMelee._Myhead;
  v11._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapMelee._Myhead->_Left;
  LOBYTE(v17) = 4;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapMelee,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&result,
    v11,
    v10);
  operator delete(v1->m_mapMelee._Myhead);
  v14._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_mapAEEffInfo;
  v12._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapAEEffInfo._Myhead;
  v13._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapAEEffInfo._Myhead->_Left;
  v17 = 5;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapAEEffInfo,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&result,
    v13,
    v12);
  operator delete(v1->m_mapAEEffInfo._Myhead);
}
// 9B98C4: using guessed type void (__thiscall *ActionMgr::`vftable'[2])(ActionMgr *this, struct NiActorManager *, unsigned __int16 *usStrips, const unsigned __int16 **pusStripLengths, float);

//----- (00649D20) --------------------------------------------------------
char __thiscall ActionMgr::AddAEEff(ActionMgr *this, ActionMgr::eACTIONEFF_TYPE eType, NiTextKey *Value, ActionMgr::ActionEffectInfoEx *pkInfoEx)
{
  ActionMgr *v4; // esi@1
  EffectViewInfo *v5; // ebx@1
  char result; // al@2
  NiTextKey *v7; // edi@3
  char *v8; // edx@3
  unsigned __int16 v9; // ax@4
  char *v10; // eax@5
  char v11; // cl@6
  ActionEffectInfo *v12; // esi@10
  ActionMgr::ActionEffectInfoEx *v13; // eax@12
  std::_Tree_val<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > *v14; // esi@16
  std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *v15; // eax@16
  std::pair<float,EffectViewInfo *> _Val; // [sp+8h] [bp-8h]@1

  v4 = this;
  std::_Tree<std::_Tmap_traits<enum  MHE_STEP,ResElement *,std::less<enum  MHE_STEP>,std::allocator<std::pair<enum  MHE_STEP const,ResElement *>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *)&this->m_mapAEEffInfo,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > *)&_Val.second,
    (OscTarget *)&eType);
  v5 = _Val.second;
  if ( _Val.second == (EffectViewInfo *)v4->m_mapAEEffInfo._Myhead )
  {
    result = 0;
  }
  else
  {
    v7 = Value;
    v8 = Value->m_pText;
    if ( v8 )
    {
      v10 = Value->m_pText;
      do
        v11 = *v10++;
      while ( v11 );
      if ( v10 - (v8 + 1) == 7 )
        v9 = atoi(v8 + 2);
      else
        v9 = 0;
    }
    else
    {
      v9 = 0;
    }
    v12 = ActionEffectInfoTab::GetByID(v9);
    if ( v12 )
    {
      v13 = pkInfoEx;
      if ( !pkInfoEx )
      {
        v13 = (ActionMgr::ActionEffectInfoEx *)operator new(8u);
        if ( v13 )
        {
          v13->m_pkInfo = 0;
          v13->m_bSpecialSound = 0;
        }
        else
        {
          v13 = 0;
        }
      }
      v13->m_pkInfo = v12;
      v14 = *(std::_Tree_val<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > **)((char *)&v5->Axis + 2);
      _Val.first = v7->m_fTime;
      _Val.second = (EffectViewInfo *)v13;
      v15 = std::_Tree_val<std::_Tmap_traits<float,ActionEffectInfo *,std::less<float>,std::allocator<std::pair<float const,ActionEffectInfo *>>,1>>::_Buynode<std::pair<float,ActionEffectInfo *>>(
              v14,
              &_Val);
      std::_Tree<std::_Tmap_traits<float,ActionEffectInfo *,std::less<float>,std::allocator<std::pair<float const,ActionEffectInfo *>>,1>>::_Linsert(
        (std::_Tree<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > *)v14,
        (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > >,bool> *)&_Val,
        v15,
        0);
      result = 1;
    }
    else
    {
      result = 0;
    }
  }
  return result;
}

//----- (00649DF0) --------------------------------------------------------
void __thiscall ActionMgr::ActionMgr(ActionMgr *this)
{
  ActionMgr *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<enum ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> > > *,std::less<enum ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum ActionMgr::eACTIONEFF_TYPE const ,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> > > *> >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> >,1> >::_Node *v3; // eax@2
  std::_Tree_nod<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> >,1> >::_Node *v4; // eax@3
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v5; // eax@4
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v6; // eax@4
  std::exception v7; // [sp+10h] [bp-34h]@7
  std::exception pExceptionObject; // [sp+1Ch] [bp-28h]@5
  ActionMgr *v9; // [sp+28h] [bp-1Ch]@1
  std::pair<int const ,int> _Val; // [sp+2Ch] [bp-18h]@4
  char *_What; // [sp+34h] [bp-10h]@5
  int v12; // [sp+40h] [bp-4h]@2

  v1 = this;
  v9 = this;
  this->vfptr = (NiActorManager::CallbackObjectVtbl *)ActionMgr::`vftable';
  this->m_mapAEEffInfo._Mysize = 0;
  v2 = (std::_Tree_nod<std::_Tmap_traits<enum ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> > > *,std::less<enum ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum ActionMgr::eACTIONEFF_TYPE const ,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> > > *> >,0> >::_Node *)operator new(0x18u);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_mapAEEffInfo._Myhead = v2;
  v2->_Left = v2;
  v1->m_mapAEEffInfo._Myhead->_Parent = v1->m_mapAEEffInfo._Myhead;
  v1->m_mapAEEffInfo._Myhead->_Right = v1->m_mapAEEffInfo._Myhead;
  v1->m_mapAEEffInfo._Myhead->_Color = 1;
  v1->m_mapAEEffInfo._Myhead->_Isnil = 1;
  v12 = 0;
  v1->m_mapMelee._Mysize = 0;
  v3 = (std::_Tree_nod<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> >,1> >::_Node *)operator new(0x18u);
  if ( !v3 )
  {
    _Val.second = 0;
    std::exception::exception(&v7, (const char *const *)&_Val.second);
    v7.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&v7, &_TI2_AVbad_alloc_std__);
  }
  v1->m_mapMelee._Myhead = v3;
  v3->_Left = v3;
  v1->m_mapMelee._Myhead->_Parent = v1->m_mapMelee._Myhead;
  v1->m_mapMelee._Myhead->_Right = v1->m_mapMelee._Myhead;
  v1->m_mapMelee._Myhead->_Color = 1;
  v1->m_mapMelee._Myhead->_Isnil = 1;
  LOBYTE(v12) = 1;
  v1->m_mapRange._Mysize = 0;
  v4 = (std::_Tree_nod<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const ,ActionMgr::ActionEffectInfoEx *> >,1> >::_Node *)operator new(0x18u);
  if ( !v4 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_mapRange._Myhead = v4;
  v4->_Left = v4;
  v1->m_mapRange._Myhead->_Parent = v1->m_mapRange._Myhead;
  v1->m_mapRange._Myhead->_Right = v1->m_mapRange._Myhead;
  v1->m_mapRange._Myhead->_Color = 1;
  v1->m_mapRange._Myhead->_Isnil = 1;
  v1->m_fActionStartTime = 0.0;
  v1->m_pkActInfoSet = 0;
  v1->m_fActionLastUpdateTime = 0.0;
  v1->m_pkChar = 0;
  v1->m_pActor = 0;
  v1->m_pkCurPlaySkillViewInfo = 0;
  v1->m_uiCurEventCode = 0;
  v1->m_pkLastAttackActInfo = 0;
  v1->m_iOldLoopCnt = 0;
  v1->m_bUseActorSequence = 0;
  v1->m_pkCurPlayActInfo = 0;
  *(_WORD *)&v1->m_abActionEff[0] = 0;
  v1->m_abActionEff[2] = 0;
  *(_WORD *)&v1->m_abActionSnd[0] = 0;
  v1->m_fEffectStartTime = 0.0;
  LOBYTE(v12) = 2;
  std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::clear((std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapAEEffInfo);
  std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::clear((std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapMelee);
  std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::clear((std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapRange);
  _Val.first = 0;
  _Val.second = (int)&v1->m_mapMelee;
  v5 = std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(
         (std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v1->m_mapAEEffInfo,
         &_Val);
  std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v1->m_mapAEEffInfo,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > >,bool> *)&_Val,
    v5,
    0);
  _Val.first = 1;
  _Val.second = (int)&v1->m_mapRange;
  v6 = std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(
         (std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v1->m_mapAEEffInfo,
         &_Val);
  std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v1->m_mapAEEffInfo,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > >,bool> *)&_Val,
    v6,
    0);
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9B98C4: using guessed type void (__thiscall *ActionMgr::`vftable'[2])(ActionMgr *this, struct NiActorManager *, unsigned __int16 *usStrips, const unsigned __int16 **pusStripLengths, float);

//----- (0064A000) --------------------------------------------------------
void __thiscall ActionMgr::SetActionStartTime(ActionMgr *this, float fTime)
{
  Char *v2; // ecx@1

  this->m_fActionStartTime = fTime;
  this->m_fActionLastUpdateTime = 0.0;
  v2 = this->m_pkChar;
  if ( v2 )
    ((void (*)(void))v2->vfptr[19].SetAbStateProperty)();
}

//----- (0064A050) --------------------------------------------------------
ActionMgr *__thiscall ActionMgr::`scalar deleting destructor'(ActionMgr *this, unsigned int a2)
{
  ActionMgr *v2; // esi@1

  v2 = this;
  ActionMgr::~ActionMgr(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0064A090) --------------------------------------------------------
char __userpurge CharMgr::LoadChar@<al>(CharMgr *this@<ecx>, int a2@<edi>, CharMgr::LoadData *Chardata)
{
  char result; // al@2
  unsigned int v4; // esi@3
  char v5; // bl@3
  char v6; // al@7
  int v7; // esi@8
  int v8; // ebx@8
  _BYTE **v9; // eax@10
  _BYTE *v10; // eax@11

  if ( this->m_kLoadDataList._Mysize )
  {
    ((void (__stdcall *)(signed int, _DWORD, int))Chardata->pkChar->vfptr[18].DeleteAbStateByAbstateIndex)(1, 0, a2);
    v4 = 0;
    v5 = 1;
    do
    {
      if ( (unsigned __int8)v5 & Chardata->CharData.abstatebit.statebit[v4 >> 3] )
        ((void (__stdcall *)(unsigned int, _DWORD, _DWORD))Chardata->pkChar->vfptr->AddAbStateByAbstateIndex)(
          v4,
          -1.0,
          0);
      ++v4;
      v5 = __ROL1__(v5, 1);
    }
    while ( (signed int)v4 < 822 );
    ((void (__cdecl *)(_DWORD))Chardata->pkChar->vfptr[10].AddAbStateByAbstateIndex)(0);
    v6 = Chardata->CharData.emoticon.emoticonid;
    if ( v6 != -1 )
    {
      v7 = ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;
      v8 = (unsigned __int8)v6;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable
                                                               + 16))(
                              ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable,
                              (unsigned __int8)v6) )
      {
        if ( (unsigned __int16)v8 <= *(_WORD *)(v7 + 200) )
        {
          v9 = (_BYTE **)(*(_DWORD *)(v7 + 196) + 4 * v8);
          if ( *v9 )
          {
            v10 = *v9;
            if ( v10 )
              ((void (__stdcall *)(_DWORD))Chardata->pkChar->vfptr[14].Deaffect)(*v10);
          }
        }
      }
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 64A090: could not find valid save-restore pair for edi
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;

//----- (0064A160) --------------------------------------------------------
void __thiscall CharMgr::UpdateAvatar(CharMgr *this, float fCurTime)
{
  NiTListItem<Char *> *v2; // esi@1
  bool (__thiscall *v3)(AbStateInfectee *, ABSTATEINDEX, float, bool); // eax@2

  v2 = this->m_kList.m_pkHead->m_pkNext;
  while ( v2 )
  {
    v3 = v2->m_element->vfptr[17].AddAbStateByAbstateIndex;
    v2 = v2->m_pkNext;
    ((void (__stdcall *)(_DWORD))v3)(LODWORD(fCurTime));
  }
}

//----- (0064A1A0) --------------------------------------------------------
Char *__thiscall CharMgr::GetChar(CharMgr *this, char *pcName)
{
  Char *result; // eax@2
  NiTListItem<Char *> *v3; // edi@3
  Char *v4; // ebx@4

  if ( pcName )
  {
    v3 = this->m_kList.m_pkHead;
    if ( v3 )
    {
      while ( 1 )
      {
        v4 = v3->m_element;
        v3 = v3->m_pkNext;
        if ( !strcmp((const char *)((int (__thiscall *)(Char *))v4->vfptr[2].DeleteAbStateByAbstateIndex)(v4), pcName) )
          break;
        if ( !v3 )
          goto LABEL_6;
      }
      result = v4;
    }
    else
    {
LABEL_6:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0064A220) --------------------------------------------------------
Char *__thiscall CharMgr::GetChar(CharMgr *this, Name5 kID)
{
  NiTListItem<Char *> *v2; // edi@1
  Char *v3; // ebx@2
  Char *result; // eax@4
  char acName[21]; // [sp+Ch] [bp-1Ch]@1

  *(Name5 *)acName = kID;
  v2 = this->m_kList.m_pkHead;
  acName[20] = 0;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      v2 = v2->m_pkNext;
      if ( !strcmp((const char *)((int (__thiscall *)(Char *))v3->vfptr[2].DeleteAbStateByAbstateIndex)(v3), acName) )
        break;
      if ( !v2 )
        goto LABEL_4;
    }
    result = v3;
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}

//----- (0064A2D0) --------------------------------------------------------
Char *__thiscall CharMgr::GetChar(CharMgr *this, Char *_pkChar)
{
  NiTListItem<Char *> *v2; // ecx@2
  Char *result; // eax@3

  if ( _pkChar && (v2 = this->m_kList.m_pkHead) != 0 )
  {
    while ( 1 )
    {
      result = v2->m_element;
      v2 = v2->m_pkNext;
      if ( _pkChar == result )
        break;
      if ( !v2 )
        goto LABEL_5;
    }
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (0064A300) --------------------------------------------------------
signed __int16 __thiscall CharMgr::FindFirstCharHandleByMobID(CharMgr *this, unsigned __int16 MobID)
{
  NiTListItem<Char *> *v2; // esi@1
  Char *v3; // edi@2
  signed __int16 result; // ax@5

  v2 = this->m_kList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      v2 = v2->m_pkNext;
      if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v3->vfptr[1].Affect)(v3) )
      {
        if ( v3->m_kCharShape.m_kMobID == MobID )
          break;
      }
      if ( !v2 )
        goto LABEL_5;
    }
    result = v3->m_kHandle;
  }
  else
  {
LABEL_5:
    result = -1;
  }
  return result;
}

//----- (0064A350) --------------------------------------------------------
void __thiscall CharMgr::OutLineEnable(CharMgr *this, bool bEnable)
{
  CharMgr *v2; // esi@1
  CarToonShader *v3; // eax@1
  NiTListItem<Char *> *v4; // esi@1
  Char *v5; // ebx@2
  MobInfo *v6; // eax@6
  const char *v7; // edi@7
  char v8; // al@10
  CarToonShader *v9; // eax@11
  CarToonShader *v10; // eax@12
  NiNode *v11; // [sp-Ch] [bp-10h]@10

  v2 = this;
  v3 = CarToonShader::GetInstance();
  CarToonShader::SetOutLine(v3, bEnable);
  v4 = v2->m_kList.m_pkHead;
  while ( v4 )
  {
    v5 = v4->m_element;
    v4 = v4->m_pkNext;
    if ( !Char::IsResource(v5) || Char::GetMobInfo(v5)->Type != 10 && Char::GetMobInfo(v5)->Type != 9 )
    {
      if ( !(unsigned __int8)((int (__thiscall *)(Char *))v5->vfptr[1].Affect)(v5)
        || (v6 = Char::GetMobInfo(v5)) == 0
        || (v7 = v6->InxName, strcmp(v6->InxName, "KQ_Gate5")) && strcmp(v7, "Barrier01") && strcmp(v7, "Barrier02") )
      {
        v8 = ((int (__thiscall *)(Char *))v5->vfptr[16].Affect)(v5);
        v11 = v5->m_spScene.m_pObject;
        if ( v8 )
        {
          v10 = CarToonShader::GetInstance();
          CarToonShader::SetExceptOutLineCartoonShader(v10, v11);
        }
        else
        {
          v9 = CarToonShader::GetInstance();
          CarToonShader::SetCartoonShader(v9, v11);
        }
      }
    }
  }
}

//----- (0064A4A0) --------------------------------------------------------
Char *__thiscall CharMgr::GetUserChar(CharMgr *this, Name5 kID)
{
  NiTListItem<Char *> *v2; // edi@1
  Char *v3; // ebx@2
  Char *result; // eax@5
  char acName[21]; // [sp+Ch] [bp-1Ch]@1

  *(Name5 *)acName = kID;
  v2 = this->m_kList.m_pkHead;
  acName[20] = 0;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      v2 = v2->m_pkNext;
      if ( !strcmp((const char *)((int (__thiscall *)(Char *))v3->vfptr[2].DeleteAbStateByAbstateIndex)(v3), acName) )
      {
        if ( v3->m_bUserCharacter )
          break;
      }
      if ( !v2 )
        goto LABEL_5;
    }
    result = v3;
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (0064A560) --------------------------------------------------------
Char *__thiscall CharMgr::GetUserChar(CharMgr *this, char *pcName)
{
  Char *result; // eax@2
  NiTListItem<Char *> *v3; // edi@3
  Char *v4; // ebx@4

  if ( pcName )
  {
    v3 = this->m_kList.m_pkHead;
    if ( v3 )
    {
      while ( 1 )
      {
        v4 = v3->m_element;
        v3 = v3->m_pkNext;
        if ( !strcmp((const char *)((int (__thiscall *)(Char *))v4->vfptr[2].DeleteAbStateByAbstateIndex)(v4), pcName) )
        {
          if ( v4->m_bUserCharacter )
            break;
        }
        if ( !v3 )
          goto LABEL_7;
      }
      result = v4;
    }
    else
    {
LABEL_7:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0064A5E0) --------------------------------------------------------
void __thiscall CharMgr::UpdateNpcActionEvent(CharMgr *this, PROTO_NC_SCENARIO_PLAYERLIKEMOB_ANIMATE_CMD *pkProto)
{
  std::_List_nod<Char *,std::allocator<Char *> >::_Node *v2; // edx@1
  std::_List_nod<Char *,std::allocator<Char *> >::_Node *v3; // eax@1
  Char *v4; // ecx@2

  v2 = this->m_listCharNPC._Myhead;
  v3 = v2->_Next;
  if ( v2->_Next != v2 )
  {
    while ( 1 )
    {
      v4 = v3->_Myval;
      if ( v4->m_kCharShape.m_kMobID == pkProto->handle )
        break;
      v3 = v3->_Next;
      if ( v3 == v2 )
        return;
    }
    Char::UpdateActionEventByNet(v4, pkProto->actioncode, pkProto->flag);
  }
}

//----- (0064A620) --------------------------------------------------------
Char *__thiscall CharMgr::GetCharByNodePtr(CharMgr *this, NiNode *pkNode)
{
  CharMgr *v2; // esi@1
  Char *result; // eax@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *> >,0> > > iter; // [sp+4h] [bp-4h]@2

  v2 = this;
  if ( pkNode
    && (std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::find(
          (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&this->m_mapByCharNode,
          (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&iter,
          (const unsigned int *)&pkNode),
        iter._Ptr != v2->m_mapByCharNode._Myhead) )
  {
    result = iter._Ptr->_Myval.second;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0064A660) --------------------------------------------------------
Char *__thiscall CharMgr::GetChar(CharMgr *this, unsigned __int16 kHandle)
{
  unsigned __int16 v2; // di@1
  CharMgr *v3; // esi@1
  Char *result; // eax@3
  NiTListItem<Char *> *v5; // ecx@5
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,Char *> >,0> > > iter; // [sp+8h] [bp-4h]@2

  v2 = kHandle;
  v3 = this;
  if ( kHandle == -1 )
    goto LABEL_8;
  std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,long>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > *)&this->m_mapByHandle,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > > *)&iter,
    &kHandle);
  if ( iter._Ptr != v3->m_mapByHandle._Myhead )
    return iter._Ptr->_Myval.second;
  result = g_pkMainChar;
  if ( g_pkMainChar->m_kHandle != v2 )
  {
    v5 = v3->m_kList.m_pkHead;
    while ( v5 )
    {
      result = v5->m_element;
      v5 = v5->m_pkNext;
      if ( result->m_kHandle == v2 )
        return result;
    }
LABEL_8:
    result = 0;
  }
  return result;
}

//----- (0064A6E0) --------------------------------------------------------
char __thiscall CharMgr::Init(CharMgr *this)
{
  CharMgr *v1; // edi@1
  MainChar *v2; // eax@1
  Char *v3; // eax@2
  NiTListItem<Char *> *(__thiscall *v4)(NiTListBase<NiTPointerAllocator<unsigned int>,Char *> *); // edx@4
  Char *v5; // ebx@4
  int v6; // eax@4
  _DWORD *v7; // ecx@4
  NiNode *v8; // edx@7
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v9; // eax@7
  unsigned __int16 v10; // dx@7
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *v11; // eax@7
  std::pair<int const ,int> _Val; // [sp+10h] [bp-14h]@1
  int v14; // [sp+20h] [bp-4h]@1

  v1 = this;
  *(_WORD *)&this->m_bEnableSoloMode = 0;
  v2 = (MainChar *)operator new(0x1544u);
  _Val.second = (int)v2;
  v14 = 0;
  if ( v2 )
    MainChar::MainChar(v2);
  else
    v3 = 0;
  g_pkMainChar = v3;
  v3->m_bNeverCullingFlag = 1;
  v4 = v1->m_kList.vfptr->NewItem;
  v5 = g_pkMainChar;
  v14 = -1;
  v6 = (int)v4((NiTListBase<NiTPointerAllocator<unsigned int>,Char *> *)&v1->m_kList.vfptr);
  *(_DWORD *)(v6 + 8) = v5;
  *(_DWORD *)v6 = 0;
  *(_DWORD *)(v6 + 4) = v1->m_kList.m_pkTail;
  v7 = &v1->m_kList.m_pkTail->m_pkNext;
  if ( v7 )
    *v7 = v6;
  else
    v1->m_kList.m_pkHead = (NiTListItem<Char *> *)v6;
  ++v1->m_kList.m_kAllocator.m_uiCount;
  v1->m_kList.m_pkTail = (NiTListItem<Char *> *)v6;
  v8 = g_pkMainChar->m_spScene.m_pObject;
  _Val.second = (int)g_pkMainChar;
  _Val.first = (const int)v8;
  v9 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v1->m_mapByCharNode, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapByCharNode,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >,bool> *)&_Val,
    v9,
    0);
  v10 = g_pkMainChar->m_kHandle;
  _Val.second = (int)g_pkMainChar;
  LOWORD(_Val.first) = v10;
  v11 = std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned long>>,0>>::_Buynode<std::pair<unsigned short const,unsigned long>>(
          (std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)&v1->m_mapByHandle,
          (std::pair<unsigned short const ,unsigned long> *)&_Val);
  std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)&v1->m_mapByHandle,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > >,bool> *)&_Val,
    v11,
    0);
  return 1;
}

//----- (0064A800) --------------------------------------------------------
Char *__thiscall CharMgr::AddCharQue(CharMgr *this, char kClassID, char byGender, NiPoint3 *kPos, NiPoint3 *kDir, unsigned int uiEquipLevel)
{
  unsigned int v6; // edi@1
  char *v7; // esi@2
  __int64 v8; // rax@2
  signed int v9; // ecx@2
  char v10; // al@7
  unsigned __int16 v11; // cx@19
  unsigned __int16 v12; // dx@20
  unsigned __int16 v13; // ax@21
  char v14; // al@26
  Char *v15; // eax@26
  Char *v16; // eax@27
  Char *v17; // esi@27
  void (__thiscall *v18)(AbStateInfectee *, ABSTATEINDEX, bool, int); // edx@29
  bool v19; // zf@29
  AbStateInfecteeVtbl *v20; // eax@29
  Char *result; // eax@30
  int v22; // eax@31
  _DWORD *v23; // ecx@31
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v24; // eax@34
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *v25; // eax@34
  CharMgr *v26; // [sp+18h] [bp-10Ch]@1
  __int64 kWhoEquip; // [sp+1Ch] [bp-108h]@2
  PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD p; // [sp+24h] [bp-100h]@1
  int v29; // [sp+120h] [bp-4h]@26

  v26 = this;
  *(_QWORD *)&p.charid.n5_code[3] = 0i64;
  *(_QWORD *)&p.charid.n5_code[1] = 0i64;
  p.charid.n5_code[0] = 0;
  strncpy(p.charid.n5_name, byte_9B98E6, 0x14u);
  p.chrclass = kClassID;
  *(_QWORD *)&p.shapedata.ride.equip.Equ_RightHand = -1i64;
  *(_TBYTE *)&p.shapedata.ride.equip.Equ_Boot = -2.37946299071446353e4932/*NaN*/;
  p.shapedata.notcamp.equip.Equ_Mouth = -1;
  *(_QWORD *)&p.shapedata.ride.equip.Equ_Eye = -1i64;
  *(_QWORD *)&p.shapedata.ride.equip.Equ_CosEff = -1i64;
  p.shapedata.notcamp.equip.Equ_MiniMon_R = -1;
  v6 = 0;
  if ( ITableBase<ItemInfo,ItemInfoTab>::GetTotal() )
  {
    do
    {
      v7 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v6);
      v8 = CharClass::GetBitbyClassType((UseClassType)*(_DWORD *)(v7 + 207));
      HIDWORD(kWhoEquip) = HIDWORD(v8);
      v9 = 1;
      while ( !((1 << v9) & (unsigned int)v8) )
      {
        if ( ++v9 >= 28 )
        {
          LOBYTE(v9) = 0;
          break;
        }
      }
      switch ( (unsigned __int8)v9 )
      {
        case 1u:
        case 2u:
        case 3u:
        case 4u:
        case 5u:
          v10 = 1;
          break;
        case 6u:
        case 7u:
        case 8u:
        case 9u:
        case 0xAu:
          v10 = 6;
          break;
        case 0xBu:
        case 0xCu:
        case 0xDu:
        case 0xEu:
        case 0xFu:
          v10 = 11;
          break;
        case 0x10u:
        case 0x11u:
        case 0x12u:
        case 0x13u:
        case 0x14u:
          v10 = 16;
          break;
        case 0x15u:
        case 0x16u:
        case 0x17u:
        case 0x18u:
        case 0x19u:
          v10 = 21;
          break;
        case 0x1Au:
        case 0x1Bu:
          v10 = 26;
          break;
        default:
          v10 = 0;
          break;
      }
      if ( p.chrclass == v10 )
      {
        if ( *(_DWORD *)(v7 + 127) < uiEquipLevel )
          goto LABEL_25;
        switch ( *(_DWORD *)(v7 + 110) )
        {
          case 7:
            v13 = *(_WORD *)v7;
            p.shapedata.booth.signboard.signboard[28] &= 0xF0u;
            p.shapedata.notcamp.equip.Equ_Body = v13;
            break;
          case 0x13:
            v12 = *(_WORD *)v7;
            p.shapedata.booth.signboard.signboard[28] &= 0xFu;
            p.shapedata.notcamp.equip.Equ_Pant = v12;
            break;
          case 0x15:
            v11 = *(_WORD *)v7;
            p.shapedata.booth.signboard.signboard[29] &= 0xF0u;
            p.shapedata.notcamp.equip.Equ_Boot = v11;
            break;
        }
      }
      if ( p.shapedata.notcamp.equip.Equ_Body != -1
        && p.shapedata.notcamp.equip.Equ_Pant != -1
        && p.shapedata.notcamp.equip.Equ_Boot != -1 )
      {
        break;
      }
LABEL_25:
      ++v6;
    }
    while ( v6 < ITableBase<ItemInfo,ItemInfoTab>::GetTotal() );
  }
  p.handle = rand();
  p.mode = 1;
  p.shape = (PROTO_AVATAR_SHAPE_INFO)((byGender << 7) | ((*(_BYTE *)&p.shape ^ 4 * kClassID) & 0x7C ^ *(_BYTE *)&p.shape) & 0x7F);
  *((_WORD *)&p.shape + 1) = 0;
  *((_BYTE *)&p.shape + 1) = 0;
  v14 = CharClass::GetRace(kClassID);
  *(_BYTE *)&p.shape ^= (v14 ^ *(_BYTE *)&p.shape) & 3;
  v15 = (Char *)operator new(0xB7Cu);
  HIDWORD(kWhoEquip) = v15;
  v29 = 0;
  if ( v15 )
  {
    Char::Char(v15);
    v17 = v16;
  }
  else
  {
    v17 = 0;
  }
  v18 = v17->vfptr[17].SetAbStateProperty;
  v29 = -1;
  v19 = (unsigned __int8)((int (__thiscall *)(Char *, PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *))v18)(v17, &p) == 0;
  v20 = v17->vfptr;
  if ( v19 )
  {
    ((void (__thiscall *)(Char *, signed int))v20->~AbStateInfectee)(v17, 1);
    result = 0;
  }
  else
  {
    ((void (__thiscall *)(Char *, NiPoint3 *, NiPoint3 *))v20[5].GetAbstateColor)(v17, kPos, kDir);
    v22 = (int)v26->m_kList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,Char *> *)&v26->m_kList);
    *(_DWORD *)(v22 + 8) = v17;
    *(_DWORD *)v22 = 0;
    *(_DWORD *)(v22 + 4) = v26->m_kList.m_pkTail;
    v23 = &v26->m_kList.m_pkTail->m_pkNext;
    if ( v23 )
      *v23 = v22;
    else
      v26->m_kList.m_pkHead = (NiTListItem<Char *> *)v22;
    ++v26->m_kList.m_kAllocator.m_uiCount;
    v26->m_kList.m_pkTail = (NiTListItem<Char *> *)v22;
    LODWORD(kWhoEquip) = v17->m_spScene.m_pObject;
    HIDWORD(kWhoEquip) = v17;
    v24 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v26->m_mapByCharNode, (std::pair<int const ,int> *)&kWhoEquip);
    std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
      (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v26->m_mapByCharNode,
      (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >,bool> *)&kWhoEquip,
      v24,
      0);
    LOWORD(kWhoEquip) = v17->m_kHandle;
    HIDWORD(kWhoEquip) = v17;
    v25 = std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned long>>,0>>::_Buynode<std::pair<unsigned short const,unsigned long>>(
            (std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)&v26->m_mapByHandle,
            (std::pair<unsigned short const ,unsigned long> *)&kWhoEquip);
    std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::_Linsert(
      (std::_Tree<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)&v26->m_mapByHandle,
      (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > >,bool> *)&kWhoEquip,
      v25,
      0);
    World::AttachChar(&g_kWorld, v17);
    result = v17;
  }
  return result;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0064AC00) --------------------------------------------------------
Mover *__thiscall CharMgr::AddMover(CharMgr *this, unsigned int kMoverID, unsigned __int16 kMoverHandle, int iHP, char nGrade, NiPoint3 *kPos, NiPoint3 *kDir)
{
  CharMgr *v7; // edi@1
  int v8; // ebx@1
  Mover *v9; // esi@1
  Mover *v10; // eax@2
  Mover *v11; // eax@3
  char v12; // al@5
  AbStateInfecteeVtbl *v13; // edx@5
  AbStateInfecteeVtbl *v15; // ebx@10
  unsigned __int8 v16; // al@10
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v17; // eax@10
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *v18; // eax@10
  std::pair<int const ,int> _Val; // [sp+10h] [bp-18h]@10
  Mover *pkMover; // [sp+18h] [bp-10h]@4
  int v21; // [sp+24h] [bp-4h]@4

  v7 = this;
  v8 = kMoverHandle;
  v9 = (Mover *)CharMgr::GetChar(this, kMoverHandle);
  if ( !v9 )
  {
    v10 = (Mover *)operator new(0xBA8u);
    *(_DWORD *)&kMoverHandle = v10;
    if ( v10 )
    {
      Mover::Mover(v10);
      v9 = v11;
    }
    v21 = -1;
    pkMover = v9;
    if ( !v9 )
      return 0;
    v12 = ((int (__thiscall *)(Mover *, unsigned int, int, int))v9->vfptr[20].GetAbstateColor)(v9, kMoverID, v8, iHP);
    v13 = v9->vfptr;
    if ( !v12 )
    {
      ((void (__thiscall *)(Mover *, signed int))v13->~AbStateInfectee)(v9, 1);
      return 0;
    }
    if ( !(unsigned __int8)((int (__thiscall *)(Mover *, signed int, _DWORD))v13[18].DeleteAbStateByAbstateIndex)(
                             v9,
                             1,
                             0) )
    {
      v9->vfptr->~AbStateInfectee((AbStateInfectee *)v9);
      return 0;
    }
    Mover::SetMoverEffect(v9, 1, v9, nGrade);
    v15 = v9->vfptr;
    v16 = ((int (__thiscall *)(Mover *))v9->vfptr[1].Affect)(v9);
    ((void (__thiscall *)(Mover *, _DWORD))v15[10].AddAbStateByAbstateIndex)(v9, v16);
    *(_DWORD *)&kMoverHandle = v9;
    NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v7->m_kList,
      (NiD3DXEffectParameter *const *)&kMoverHandle);
    _Val.first = (const int)v9->m_spScene.m_pObject;
    _Val.second = (int)v9;
    v17 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v7->m_mapByCharNode, &_Val);
    std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
      (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v7->m_mapByCharNode,
      (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >,bool> *)&_Val,
      v17,
      0);
    LOWORD(_Val.first) = v9->m_kHandle;
    _Val.second = (int)v9;
    v18 = std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned long>>,0>>::_Buynode<std::pair<unsigned short const,unsigned long>>(
            (std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)&v7->m_mapByHandle,
            (std::pair<unsigned short const ,unsigned long> *)&_Val);
    std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::_Linsert(
      (std::_Tree<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)&v7->m_mapByHandle,
      (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > >,bool> *)&_Val,
      v18,
      0);
    World::AttachChar(&g_kWorld, (Char *)&v9->vfptr);
    v9 = pkMover;
  }
  ((void (__thiscall *)(Mover *, NiPoint3 *, NiPoint3 *))v9->vfptr[5].GetAbstateColor)(v9, kPos, kDir);
  ((void (*)(void))v9->vfptr[10].DeleteAbStateByAbstateIndex)();
  return v9;
}

//----- (0064ADB0) --------------------------------------------------------
Mover *__thiscall CharMgr::AddMover(CharMgr *this, PROTO_NC_BRIEFINFO_REGENMOVER_CMD *p)
{
  CharMgr *v2; // edi@1
  float fY; // ST10_4@1
  float fX; // ST0C_4@1
  unsigned int v5; // eax@1
  Mover *v6; // eax@2
  NiPoint3 kPos; // [sp+14h] [bp-50h]@1
  NiPoint3 result; // [sp+20h] [bp-44h]@1
  NiPoint3 kDir; // [sp+2Ch] [bp-38h]@1
  float v10; // [sp+38h] [bp-2Ch]@1
  NiMatrix3 v11; // [sp+3Ch] [bp-28h]@1

  v2 = this;
  fX = (double)p->nCoord.xy.x;
  fY = (double)p->nCoord.xy.y;
  World::GetAdvGroundPos(&g_kWorld, fX, fY, &kPos);
  v10 = (NI_PI + NI_PI) * (double)p->nCoord.dir / 180.0;
  NiMatrix3::MakeZRotation(&v11, v10);
  NiMatrix3::operator*(&v11, &result, &World::ms_kNorthDir);
  kDir.y = result.y;
  v5 = p->nID;
  kDir.x = result.x;
  kDir.z = result.z;
  if ( v5 == 0xFFFF )
    v6 = 0;
  else
    v6 = CharMgr::AddMover(v2, v5, p->nHandle, p->nHP, p->nGrade, &kPos, &kDir);
  return v6;
}
// B622CC: using guessed type const float NI_PI;

//----- (0064AEA0) --------------------------------------------------------
char __thiscall CharMgr::AddMover(CharMgr *this, PROTO_NC_BRIEFINFO_MOVER_CMD *p)
{
  unsigned int v2; // edi@1
  bool v3; // zf@1
  PROTO_NC_BRIEFINFO_MOVER_CMD *v4; // esi@2
  float fY; // ST10_4@3
  float fX; // ST0C_4@3
  unsigned int v7; // eax@3
  char v8; // al@6
  NiPoint3 kTargetPos; // [sp+18h] [bp-54h]@3
  NiPoint3 kDir; // [sp+24h] [bp-48h]@3
  NiPoint3 result; // [sp+30h] [bp-3Ch]@3
  CharMgr *v12; // [sp+3Ch] [bp-30h]@1
  float v13; // [sp+40h] [bp-2Ch]@3
  NiMatrix3 v14; // [sp+44h] [bp-28h]@3

  v2 = 0;
  v3 = p->nMoverNum == 0;
  v12 = this;
  if ( v3 )
  {
LABEL_6:
    v8 = 1;
  }
  else
  {
    v4 = p + 11;
    while ( 1 )
    {
      fX = (double)*(unsigned int *)&v4->nMoverNum;
      fY = (double)*(unsigned int *)&v4[4].nMoverNum;
      World::GetAdvGroundPos(&g_kWorld, fX, fY, &kTargetPos);
      LODWORD(v13) = v4[8].nMoverNum;
      v13 = (double)SLODWORD(v13) * (NI_PI + NI_PI) / 180.0;
      NiMatrix3::MakeZRotation(&v14, v13);
      NiMatrix3::operator*(&v14, &result, &World::ms_kNorthDir);
      kDir.y = result.y;
      v7 = *(_DWORD *)&v4[-8].nMoverNum;
      kDir.x = result.x;
      kDir.z = result.z;
      if ( v7 == 0xFFFF
        || !CharMgr::AddMover(
              v12,
              v7,
              *(_WORD *)&v4[-10].nMoverNum,
              *(_DWORD *)&v4[-4].nMoverNum,
              v4[112].nMoverNum,
              &kTargetPos,
              &kDir) )
      {
        break;
      }
      ++v2;
      v4 += 143;
      if ( v2 >= p->nMoverNum )
        goto LABEL_6;
    }
    v8 = 0;
  }
  return v8;
}
// B622CC: using guessed type const float NI_PI;

//----- (0064AFC0) --------------------------------------------------------
Avatar *__thiscall CharMgr::AddAvatar(CharMgr *this, PROTO_AVATARINFORMATION *p, NiPoint3 *kPos, NiPoint3 *kDir, unsigned int uiFrame)
{
  CharMgr *v5; // ebx@1
  Avatar *v6; // eax@1
  Avatar *v7; // esi@1
  Avatar *v8; // eax@2
  void (__thiscall *v9)(AbStateInfectee *, AbStateInst *, bool); // edx@3
  bool v10; // zf@3
  AbStateInfecteeVtbl *v11; // eax@3
  Avatar *result; // eax@4
  AbStateInfecteeVtbl *v13; // eax@5
  int v14; // eax@9
  _DWORD *v15; // ecx@9
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v16; // eax@12
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *v17; // eax@12
  std::pair<int const ,int> _Val; // [sp+10h] [bp-14h]@1
  int v19; // [sp+20h] [bp-4h]@1

  v5 = this;
  v6 = (Avatar *)operator new(0xB7Cu);
  _Val.second = (int)v6;
  v7 = 0;
  v19 = 0;
  if ( v6 )
  {
    Avatar::Avatar(v6);
    v7 = v8;
  }
  v9 = v7->vfptr[17].Affect;
  v19 = -1;
  v10 = (unsigned __int8)((int (__thiscall *)(Avatar *, PROTO_AVATARINFORMATION *))v9)(v7, p) == 0;
  v11 = v7->vfptr;
  if ( v10 )
  {
    v11->~AbStateInfectee((AbStateInfectee *)v7);
    result = 0;
  }
  else
  {
    v10 = (unsigned __int8)((int (__thiscall *)(Avatar *, signed int, unsigned int))v11[18].DeleteAbStateByAbstateIndex)(
                             v7,
                             1,
                             uiFrame) == 0;
    v13 = v7->vfptr;
    if ( v10 )
    {
      v13->~AbStateInfectee((AbStateInfectee *)v7);
      result = 0;
    }
    else
    {
      ((void (__thiscall *)(Avatar *, NiPoint3 *, NiPoint3 *))v13[5].GetAbstateColor)(v7, kPos, kDir);
      if ( !uiFrame )
        ((void (__thiscall *)(Avatar *))v7->vfptr[10].DeleteAbStateByAbstateIndex)(v7);
      v14 = (int)v5->m_kList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,Char *> *)&v5->m_kList);
      *(_DWORD *)(v14 + 8) = v7;
      *(_DWORD *)v14 = 0;
      *(_DWORD *)(v14 + 4) = v5->m_kList.m_pkTail;
      v15 = &v5->m_kList.m_pkTail->m_pkNext;
      if ( v15 )
        *v15 = v14;
      else
        v5->m_kList.m_pkHead = (NiTListItem<Char *> *)v14;
      ++v5->m_kList.m_kAllocator.m_uiCount;
      v5->m_kList.m_pkTail = (NiTListItem<Char *> *)v14;
      _Val.first = (const int)v7->m_spScene.m_pObject;
      _Val.second = (int)v7;
      v16 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v5->m_mapByCharNode, &_Val);
      std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
        (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v5->m_mapByCharNode,
        (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >,bool> *)&_Val,
        v16,
        0);
      LOWORD(_Val.first) = v7->m_kHandle;
      _Val.second = (int)v7;
      v17 = std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned long>>,0>>::_Buynode<std::pair<unsigned short const,unsigned long>>(
              (std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)&v5->m_mapByHandle,
              (std::pair<unsigned short const ,unsigned long> *)&_Val);
      std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::_Linsert(
        (std::_Tree<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)&v5->m_mapByHandle,
        (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > >,bool> *)&_Val,
        v17,
        0);
      result = v7;
    }
  }
  return result;
}

//----- (0064B140) --------------------------------------------------------
Avatar *__thiscall CharMgr::AddAvatar(CharMgr *this, PROTO_AVATAR_SHAPE_INFO *pkInfo, NiPoint3 *kPos, NiPoint3 *kDir, unsigned int uiFrame)
{
  CharMgr *v5; // ebx@1
  Avatar *v6; // eax@1
  Avatar *v7; // esi@1
  Avatar *v8; // eax@2
  Avatar *result; // eax@6
  int v10; // eax@9
  _DWORD *v11; // ecx@9
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v12; // eax@12
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *v13; // eax@12
  std::pair<int const ,int> _Val; // [sp+10h] [bp-14h]@1
  int v15; // [sp+20h] [bp-4h]@1

  v5 = this;
  v6 = (Avatar *)operator new(0xB7Cu);
  _Val.second = (int)v6;
  v7 = 0;
  v15 = 0;
  if ( v6 )
  {
    Avatar::Avatar(v6);
    v7 = v8;
  }
  v15 = -1;
  if ( Avatar::ResetView(v7, pkInfo, uiFrame) )
  {
    ((void (__thiscall *)(Avatar *, NiPoint3 *, NiPoint3 *))v7->vfptr[5].GetAbstateColor)(v7, kPos, kDir);
    if ( !uiFrame )
      ((void (__thiscall *)(Avatar *))v7->vfptr[10].DeleteAbStateByAbstateIndex)(v7);
    v10 = (int)v5->m_kList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,Char *> *)&v5->m_kList);
    *(_DWORD *)(v10 + 8) = v7;
    *(_DWORD *)v10 = 0;
    *(_DWORD *)(v10 + 4) = v5->m_kList.m_pkTail;
    v11 = &v5->m_kList.m_pkTail->m_pkNext;
    if ( v11 )
      *v11 = v10;
    else
      v5->m_kList.m_pkHead = (NiTListItem<Char *> *)v10;
    ++v5->m_kList.m_kAllocator.m_uiCount;
    v5->m_kList.m_pkTail = (NiTListItem<Char *> *)v10;
    _Val.first = (const int)v7->m_spScene.m_pObject;
    _Val.second = (int)v7;
    v12 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v5->m_mapByCharNode, &_Val);
    std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
      (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v5->m_mapByCharNode,
      (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >,bool> *)&_Val,
      v12,
      0);
    LOWORD(_Val.first) = v7->m_kHandle;
    _Val.second = (int)v7;
    v13 = std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned long>>,0>>::_Buynode<std::pair<unsigned short const,unsigned long>>(
            (std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)&v5->m_mapByHandle,
            (std::pair<unsigned short const ,unsigned long> *)&_Val);
    std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::_Linsert(
      (std::_Tree<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)&v5->m_mapByHandle,
      (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > >,bool> *)&_Val,
      v13,
      0);
    result = v7;
  }
  else
  {
    if ( v7 )
      ((void (__thiscall *)(Avatar *, signed int))v7->vfptr->~AbStateInfectee)(v7, 1);
    result = 0;
  }
  return result;
}

//----- (0064B290) --------------------------------------------------------
void __thiscall CharMgr::~CharMgr(CharMgr *this)
{
  CharMgr *v1; // esi@1
  char *v2; // edi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,Char *> >,0> >::_Node *v3; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v4; // ST04_4@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v5; // ST08_4@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v6; // ST04_4@1
  void **v7; // eax@1
  std::_List_nod<Char *,std::allocator<Char *> >::_Node *v8; // ecx@1
  std::_List_nod<Char *,std::allocator<Char *> >::_Node *v9; // edi@2
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v10; // edi@3
  NiTListItem<Char *> **v11; // ebx@3
  NiTListItem<Char *> **v12; // ST08_4@4
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > v13; // ST08_4@5
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > v14; // ST04_4@5
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > v15; // ST08_4@5
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > v16; // ST04_4@5
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > result; // [sp+10h] [bp-18h]@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v18; // [sp+14h] [bp-14h]@1
  CharMgr *v19; // [sp+18h] [bp-10h]@1
  int v20; // [sp+24h] [bp-4h]@1

  v1 = this;
  v19 = this;
  v20 = 0;
  v2 = (char *)&this->m_mapByHandle;
  v18._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&this->m_mapByHandle;
  v3 = this->m_mapByHandle._Myhead;
  v4._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v3->_Left;
  LOBYTE(v20) = 6;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&this->m_mapByHandle,
    &result,
    v4,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >)v3);
  operator delete(*((void **)v2 + 1));
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_mapByCharNode;
  v5._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapByCharNode._Myhead;
  v6._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapByCharNode._Myhead->_Left;
  LOBYTE(v20) = 7;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapByCharNode,
    &v18,
    v6,
    v5);
  operator delete(v1->m_mapByCharNode._Myhead);
  v7 = (void **)&v1->m_listCharNPC._Myhead->_Next;
  v8 = (std::_List_nod<Char *,std::allocator<Char *> >::_Node *)*v7;
  *v7 = v7;
  v1->m_listCharNPC._Myhead->_Prev = v1->m_listCharNPC._Myhead;
  v1->m_listCharNPC._Mysize = 0;
  if ( v8 != v1->m_listCharNPC._Myhead )
  {
    do
    {
      v9 = v8->_Next;
      operator delete(v8);
      v8 = v9;
    }
    while ( v9 != v1->m_listCharNPC._Myhead );
  }
  operator delete(v1->m_listCharNPC._Myhead);
  v10 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_kList;
  result._Ptr = v10;
  v10->_Left = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&PgTList<Char *>::`vftable';
  v11 = &v1->m_kList.m_pkHead->m_pkNext;
  LOBYTE(v20) = 8;
  while ( v11 )
  {
    v12 = v11;
    v11 = (NiTListItem<Char *> **)*v11;
    ((void (__thiscall *)(PgTList<Char *> *, NiTListItem<Char *> **))v10->_Left->_Right)(&v1->m_kList, v12);
  }
  v1->m_kList.m_kAllocator.m_uiCount = 0;
  v1->m_kList.m_pkHead = 0;
  v1->m_kList.m_pkTail = 0;
  v10->_Left = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&NiTListBase<NiTPointerAllocator<unsigned int>,Char *>::`vftable';
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_kmapFadeOutDeletedChar;
  v13._Ptr = v1->m_kmapFadeOutDeletedChar._Myhead;
  v14._Ptr = v1->m_kmapFadeOutDeletedChar._Myhead->_Left;
  LOBYTE(v20) = 10;
  std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::erase(
    (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v1->m_kmapFadeOutDeletedChar.comp,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *)&v18,
    v14,
    v13);
  operator delete(v1->m_kmapFadeOutDeletedChar._Myhead);
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_kmapDeletedChar;
  v15._Ptr = v1->m_kmapDeletedChar._Myhead;
  v16._Ptr = v1->m_kmapDeletedChar._Myhead->_Left;
  LOBYTE(v20) = 11;
  std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::erase(
    (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v1->m_kmapDeletedChar.comp,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *)&v18,
    v16,
    v15);
  operator delete(v1->m_kmapDeletedChar._Myhead);
  std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::_Tidy(&v1->m_kLoadDataList);
  operator delete(v1->m_kLoadDataList._Myproxy);
  v1->m_kLoadDataList._Myproxy = 0;
}
// 9B9940: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,Char *>::`vftable')(void *p, char);
// 9B9960: using guessed type int (__thiscall *PgTList<Char *>::`vftable')(void *p, char);

//----- (0064B410) --------------------------------------------------------
Char *__thiscall CharMgr::AddChar(CharMgr *this, char kClassID, char byGender, NiPoint3 *kPos, NiPoint3 *kDir, unsigned int uiEquipLevel)
{
  Char *result; // eax@1
  Char *v7; // ebx@1
  _BYTE v8[12]; // ST18_12@2
  _BYTE v9[12]; // ST0C_12@2
  CharMgr::LoadData *v10; // eax@2
  CharMgr::LoadData v11; // [sp+Ch] [bp-118h]@2
  std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *v12; // [sp+120h] [bp-4h]@1

  v12 = (std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *)this;
  result = CharMgr::AddCharQue(this, kClassID, byGender, kPos, kDir, uiEquipLevel);
  v7 = result;
  if ( result )
  {
    *(float *)v8 = kDir->x;
    *(_QWORD *)&v8[4] = *(_QWORD *)&kDir->y;
    *(float *)v9 = kPos->x;
    *(_QWORD *)&v9[4] = *(_QWORD *)&kPos->y;
    CharMgr::LoadData::LoadData(&v11, result, kClassID, byGender, *(NiPoint3 *)v9, *(NiPoint3 *)v8, uiEquipLevel);
    std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::push_back(v12, v10);
    result = v7;
  }
  return result;
}

//----- (0064B4A0) --------------------------------------------------------
void __thiscall CharMgr::DeleteChar(CharMgr *this, Char *pkChar)
{
  Char *v2; // edi@1
  CharMgr *v3; // ebx@1
  Mover *v4; // ecx@2
  NiTListItem<Char *> **v5; // eax@6
  Char **v6; // edx@7
  Char *v7; // esi@7
  std::_List_nod<Char *,std::allocator<Char *> >::_Node **v8; // ecx@16
  std::_List_nod<Char *,std::allocator<Char *> >::_Node *v9; // eax@16
  std::_List_nod<Char *,std::allocator<Char *> >::_Node *v10; // edx@21
  std::_List_nod<Char *,std::allocator<Char *> >::_Node *v11; // ecx@21
  unsigned int v12; // ecx@25
  std::_Container_base12 *v13; // esi@27
  std::_Container_proxy *v14; // edx@29
  int v15; // eax@29
  std::_Container_proxy *v16; // [sp-Ch] [bp-38h]@34
  int v17; // [sp-8h] [bp-34h]@34
  std::_List_nod<Char *,std::allocator<Char *> >::_Node *v18; // [sp-4h] [bp-30h]@21
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > iterEnd; // [sp+Ch] [bp-20h]@25
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > iter; // [sp+18h] [bp-14h]@25
  std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *v21; // [sp+24h] [bp-8h]@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > result; // [sp+28h] [bp-4h]@12

  v2 = pkChar;
  v3 = this;
  v21 = (std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *)this;
  if ( pkChar )
  {
    World::DetachChar(&g_kWorld, pkChar);
    v4 = v2->m_pkMover;
    if ( v4 )
      Mover::RideOff(v4, v2->m_uiMoverSlot);
    if ( (unsigned __int8)((int (__thiscall *)(Char *))v2->vfptr[20].AddAbStateByAbstateIndex)(v2) )
      Mover::RideAllOff((Mover *)v2);
    v5 = &v3->m_kList.m_pkHead->m_pkNext;
    if ( v5 )
    {
      while ( 1 )
      {
        v6 = (Char **)(v5 + 2);
        v7 = (Char *)v5;
        v5 = (NiTListItem<Char *> **)*v5;
        if ( v2 == *v6 )
          break;
        if ( !v5 )
          goto LABEL_9;
      }
    }
    else
    {
LABEL_9:
      v7 = 0;
    }
    pkChar = v7;
    if ( v7 )
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&v3->m_kList,
        (void **)&pkChar);
    pkChar = (Char *)v2->m_spScene.m_pObject;
    std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::find(
      (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v3->m_mapByCharNode,
      &result,
      (const unsigned int *)&pkChar);
    if ( result._Ptr != (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v3->m_mapByCharNode._Myhead )
      std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
        (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)&v3->m_mapByCharNode,
        (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > *)&pkChar,
        (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > >)result._Ptr);
    pkChar = (Char *)v2->m_kHandle;
    std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,long>>,0>>::find(
      (std::_Tree<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > *)&v3->m_mapByHandle,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > > *)&result,
      (const unsigned __int16 *)&pkChar);
    if ( result._Ptr != (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v3->m_mapByHandle._Myhead )
      std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
        (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)&v3->m_mapByHandle,
        (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > *)&pkChar,
        (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > >)result._Ptr);
    v8 = &v3->m_listCharNPC._Myhead->_Next;
    v9 = *v8;
    if ( (std::_List_nod<Char *,std::allocator<Char *> >::_Node **)*v8 != v8 )
    {
      while ( v9->_Myval != v2 )
      {
        v9 = v9->_Next;
        if ( (std::_List_nod<Char *,std::allocator<Char *> >::_Node **)v9 == v8 )
          goto LABEL_22;
      }
      if ( (std::_List_nod<Char *,std::allocator<Char *> >::_Node **)v9 != v8 )
      {
        v9->_Prev->_Next = v9->_Next;
        v10 = v9->_Next;
        v11 = v9->_Prev;
        v18 = v9;
        v10->_Prev = v11;
        operator delete(v18);
        --v3->m_listCharNPC._Mysize;
      }
    }
LABEL_22:
    if ( g_pkMainChar && (Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1] == v2 )
      MainChar::SetTargetChar((MainChar *)g_pkMainChar, 0);
    std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::begin(&v3->m_kLoadDataList, &iter);
    std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::end(&v3->m_kLoadDataList, &iterEnd);
    v12 = iter._Myoff;
    if ( iter._Myoff != iterEnd._Myoff )
    {
      while ( 1 )
      {
        if ( iter._Myproxy )
          v13 = iter._Myproxy->_Mycont;
        else
          v13 = 0;
        v14 = v13[2]._Myproxy;
        v15 = v12;
        if ( (unsigned int)v14 <= v12 )
          v15 = v12 - (_DWORD)v14;
        if ( (Char *)(&v13[1]._Myproxy->_Mycont)[v15][60]._Myproxy == v2 )
          break;
        if ( ++v12 == iterEnd._Myoff )
          goto LABEL_38;
      }
      pkChar = (Char *)&v16;
      v16 = 0;
      v17 = 0;
      if ( iter._Myproxy && iter._Myproxy->_Mycont )
        v16 = iter._Myproxy->_Mycont->_Myproxy;
      v18 = (std::_List_nod<Char *,std::allocator<Char *> >::_Node *)v12;
      std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::erase(
        v21,
        &iterEnd,
        *(std::_Deque_const_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *)&v16);
    }
LABEL_38:
    if ( g_pkMainChar == v2 )
      g_pkMainChar = 0;
    ((void (__thiscall *)(Char *, signed int))v2->vfptr->~AbStateInfectee)(v2, 1);
  }
}

//----- (0064B680) --------------------------------------------------------
char __thiscall CharMgr::ImmediatelyLoadQueueingChar(CharMgr *this, Char *pkChar)
{
  CharMgr *v2; // ebx@1
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *v3; // eax@2
  unsigned int v4; // esi@2
  std::_Container_base12 *v5; // edx@5
  std::_Container_proxy *v6; // ecx@7
  int v7; // eax@7
  std::_Container_base12 *v8; // edi@9
  std::_Container_proxy *v9; // edx@10
  NiTListItem<Char *> *v10; // eax@11
  Char *v11; // ecx@12
  char v12; // al@18
  std::_Container_proxy *v13; // eax@19
  unsigned int v14; // esi@19
  char v15; // bl@19
  unsigned __int8 v16; // al@23
  int v17; // esi@24
  int v18; // ebx@24
  int v19; // edx@26
  _BYTE *v20; // eax@27
  std::_Container_proxy *v21; // [sp+4h] [bp-34h]@29
  float v22; // [sp+8h] [bp-30h]@29
  unsigned int v23; // [sp+Ch] [bp-2Ch]@32
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > result; // [sp+1Ch] [bp-1Ch]@2
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > iter; // [sp+28h] [bp-10h]@2
  std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *v26; // [sp+34h] [bp-4h]@1
  Char *pkChara; // [sp+40h] [bp+8h]@3

  v2 = this;
  v26 = (std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *)this;
  if ( pkChar
    && (std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::begin(&this->m_kLoadDataList, &iter),
        v3 = std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::end(&v2->m_kLoadDataList, &result),
        v4 = iter._Myoff,
        iter._Myoff != v3->_Myoff) )
  {
    pkChara = (Char *)pkChar->m_kHandle;
    while ( 1 )
    {
      if ( iter._Myproxy )
        v5 = iter._Myproxy->_Mycont;
      else
        v5 = 0;
      v6 = v5[2]._Myproxy;
      v7 = v4;
      if ( (unsigned int)v6 <= v4 )
        v7 = v4 - (_DWORD)v6;
      v8 = (&v5[1]._Myproxy->_Mycont)[v7];
      if ( (_WORD)pkChara == LOWORD(v8->_Myproxy) )
      {
        v9 = v8[60]._Myproxy;
        if ( v9 )
        {
          v10 = v2->m_kList.m_pkHead;
          if ( v10 )
          {
            while ( 1 )
            {
              v11 = v10->m_element;
              v10 = v10->m_pkNext;
              if ( (Char *)v9 == v11 )
                break;
              if ( !v10 )
                goto LABEL_16;
            }
            if ( v11 )
              break;
          }
        }
      }
LABEL_16:
      if ( ++v4 == std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::end(&v2->m_kLoadDataList, &result)->_Myoff )
      {
        iter._Myoff = v4;
        goto LABEL_18;
      }
    }
    v13 = v9->_Mycont[149]._Myproxy;
    iter._Myoff = v4;
    ((void (__stdcall *)(signed int, _DWORD))v13)(1, 0);
    v14 = 0;
    v15 = 1;
    do
    {
      if ( (unsigned __int8)v15 & *((_BYTE *)&v8[22]._Myproxy + (v14 >> 3) + 3) )
        ((void (__stdcall *)(unsigned int, _DWORD, _DWORD))v8[60]._Myproxy->_Mycont[4]._Myproxy)(v14, -1.0, 0);
      ++v14;
      v15 = __ROL1__(v15, 1);
    }
    while ( (signed int)v14 < 822 );
    ((void (__stdcall *)(_DWORD))v8[60]._Myproxy->_Mycont[84]._Myproxy)(0);
    v16 = (unsigned __int8)v8[21]._Myproxy;
    if ( v16 != -1 )
    {
      v17 = ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;
      v18 = v16;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable
                                                               + 16))(
                              ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable,
                              v16) )
      {
        if ( (unsigned __int16)v18 <= *(_WORD *)(v17 + 200) )
        {
          v19 = *(_DWORD *)(v17 + 196);
          if ( *(_DWORD *)(v19 + 4 * v18) )
          {
            v20 = *(_BYTE **)(v19 + 4 * v18);
            if ( v20 )
              ((void (__thiscall *)(std::_Container_proxy *, _DWORD))v8[60]._Myproxy->_Mycont[113]._Myproxy)(
                v8[60]._Myproxy,
                *v20);
          }
        }
      }
    }
    v21 = 0;
    v22 = 0.0;
    if ( iter._Myproxy )
    {
      if ( iter._Myproxy->_Mycont )
        v21 = iter._Myproxy->_Mycont->_Myproxy;
    }
    v23 = iter._Myoff;
    std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::erase(
      v26,
      &result,
      *(std::_Deque_const_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *)&v21);
    v12 = 1;
  }
  else
  {
LABEL_18:
    v12 = 0;
  }
  return v12;
}
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;

//----- (0064B820) --------------------------------------------------------
void __thiscall CharMgr::CharMgr(CharMgr *this)
{
  CharMgr *v1; // esi@1
  std::_Container_proxy *v2; // eax@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v3; // eax@2
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v4; // eax@3
  std::_List_nod<Char *,std::allocator<Char *> >::_Node *v5; // eax@4
  std::_Tree_nod<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *> >,0> >::_Node *v6; // eax@5
  std::_Tree_nod<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,Char *> >,0> >::_Node *v7; // eax@6
  std::exception v8; // [sp+14h] [bp-30h]@10
  std::exception pExceptionObject; // [sp+20h] [bp-24h]@8
  CharMgr *v10; // [sp+2Ch] [bp-18h]@1
  char *v11; // [sp+30h] [bp-14h]@10
  char *_What; // [sp+34h] [bp-10h]@8
  int v13; // [sp+40h] [bp-4h]@2

  v1 = this;
  v10 = this;
  this->m_kLoadDataList._Myproxy = 0;
  v2 = (std::_Container_proxy *)operator new(8u);
  if ( !v2 )
  {
    v11 = 0;
    std::exception::exception(&v8, (const char *const *)&v11);
    v8.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&v8, &_TI2_AVbad_alloc_std__);
  }
  v1->m_kLoadDataList._Myproxy = v2;
  v2->_Mycont = 0;
  v2->_Myfirstiter = 0;
  v1->m_kLoadDataList._Myproxy->_Mycont = (std::_Container_base12 *)v1;
  v1->m_kLoadDataList._Map = 0;
  v1->m_kLoadDataList._Mapsize = 0;
  v1->m_kLoadDataList._Myoff = 0;
  v1->m_kLoadDataList._Mysize = 0;
  v13 = 0;
  v1->m_kmapDeletedChar._Mysize = 0;
  v3 = (std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *)operator new(0x10u);
  if ( !v3 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_kmapDeletedChar._Myhead = v3;
  v3->_Left = v3;
  v1->m_kmapDeletedChar._Myhead->_Parent = v1->m_kmapDeletedChar._Myhead;
  v1->m_kmapDeletedChar._Myhead->_Right = v1->m_kmapDeletedChar._Myhead;
  v1->m_kmapDeletedChar._Myhead->_Color = 1;
  v1->m_kmapDeletedChar._Myhead->_Isnil = 1;
  LOBYTE(v13) = 1;
  v1->m_kmapFadeOutDeletedChar._Mysize = 0;
  v4 = (std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *)operator new(0x10u);
  if ( !v4 )
  {
    v11 = 0;
    std::exception::exception(&v8, (const char *const *)&v11);
    v8.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&v8, &_TI2_AVbad_alloc_std__);
  }
  v1->m_kmapFadeOutDeletedChar._Myhead = v4;
  v4->_Left = v4;
  v1->m_kmapFadeOutDeletedChar._Myhead->_Parent = v1->m_kmapFadeOutDeletedChar._Myhead;
  v1->m_kmapFadeOutDeletedChar._Myhead->_Right = v1->m_kmapFadeOutDeletedChar._Myhead;
  v1->m_kmapFadeOutDeletedChar._Myhead->_Color = 1;
  v1->m_kmapFadeOutDeletedChar._Myhead->_Isnil = 1;
  v1->m_kList.m_kAllocator.m_uiCount = 0;
  v1->m_kList.m_pkHead = 0;
  v1->m_kList.m_pkTail = 0;
  v1->m_kList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,Char *>Vtbl *)&PgTList<Char *>::`vftable';
  LOBYTE(v13) = 3;
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kSoloKeyPush);
  v1->m_listCharNPC._Mysize = 0;
  v5 = (std::_List_nod<Char *,std::allocator<Char *> >::_Node *)operator new(0xCu);
  if ( !v5 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_listCharNPC._Myhead = v5;
  v5->_Next = v5;
  v1->m_listCharNPC._Myhead->_Prev = v1->m_listCharNPC._Myhead;
  LOBYTE(v13) = 4;
  v1->m_mapByCharNode._Mysize = 0;
  v6 = (std::_Tree_nod<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *> >,0> >::_Node *)operator new(0x18u);
  if ( !v6 )
  {
    v11 = 0;
    std::exception::exception(&v8, (const char *const *)&v11);
    v8.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&v8, &_TI2_AVbad_alloc_std__);
  }
  v1->m_mapByCharNode._Myhead = v6;
  v6->_Left = v6;
  v1->m_mapByCharNode._Myhead->_Parent = v1->m_mapByCharNode._Myhead;
  v1->m_mapByCharNode._Myhead->_Right = v1->m_mapByCharNode._Myhead;
  v1->m_mapByCharNode._Myhead->_Color = 1;
  v1->m_mapByCharNode._Myhead->_Isnil = 1;
  LOBYTE(v13) = 5;
  v1->m_mapByHandle._Mysize = 0;
  v7 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,Char *> >,0> >::_Node *)operator new(0x18u);
  if ( !v7 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_mapByHandle._Myhead = v7;
  v7->_Left = v7;
  v1->m_mapByHandle._Myhead->_Parent = v1->m_mapByHandle._Myhead;
  v1->m_mapByHandle._Myhead->_Right = v1->m_mapByHandle._Myhead;
  v1->m_mapByHandle._Myhead->_Color = 1;
  v1->m_mapByHandle._Myhead->_Isnil = 1;
  LOBYTE(v13) = 6;
  CNSTimer_Interval::ReSet(&v1->m_kSoloKeyPush, Timer::ms_fCurTime);
  v1->m_kSoloKeyPush.m_fCheckTime = 5.0;
  *(_WORD *)&v1->m_bEnableSoloMode = 0;
  v1->m_iFrameCount = 0;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9B9960: using guessed type int (__thiscall *PgTList<Char *>::`vftable')(void *p, char);
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0064BAC0) --------------------------------------------------------
void __thiscall CharMgr::Remove(CharMgr *this, Char *pkChar)
{
  CharMgr::DeleteChar(this, pkChar);
}

//----- (0064BAD0) --------------------------------------------------------
void __thiscall CharMgr::RemoveAll(CharMgr *this)
{
  CharMgr *v1; // esi@1
  NiTListItem<Char *> *v2; // edi@1
  Char *v3; // eax@2
  void **v4; // ecx@3
  std::_List_nod<Char *,std::allocator<Char *> >::_Node *v5; // eax@3
  std::_List_nod<Char *,std::allocator<Char *> >::_Node *v6; // edi@4

  v1 = this;
  v2 = this->m_kList.m_pkHead;
  while ( v2 )
  {
    v3 = v2->m_element;
    v2 = v2->m_pkNext;
    CharMgr::DeleteChar(v1, v3);
  }
  std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::clear((std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v1->m_kmapDeletedChar.comp);
  std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::clear((std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v1->m_kmapFadeOutDeletedChar.comp);
  std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::_Tidy(&v1->m_kLoadDataList);
  v4 = (void **)&v1->m_listCharNPC._Myhead->_Next;
  v5 = (std::_List_nod<Char *,std::allocator<Char *> >::_Node *)*v4;
  *v4 = v4;
  v1->m_listCharNPC._Myhead->_Prev = v1->m_listCharNPC._Myhead;
  v1->m_listCharNPC._Mysize = 0;
  if ( v5 != v1->m_listCharNPC._Myhead )
  {
    do
    {
      v6 = v5->_Next;
      operator delete(v5);
      v5 = v6;
    }
    while ( v6 != v1->m_listCharNPC._Myhead );
  }
}

//----- (0064BB40) --------------------------------------------------------
void __thiscall CharMgr::RemoveAllWithoutMainChar(CharMgr *this)
{
  CharMgr *v1; // esi@1
  NiTListItem<Char *> *v2; // eax@1
  NiTListItem<Char *> *v3; // edi@2
  Char *v4; // eax@3
  void **v5; // ecx@4
  std::_List_nod<Char *,std::allocator<Char *> >::_Node *v6; // eax@4
  std::_List_nod<Char *,std::allocator<Char *> >::_Node *v7; // edi@5

  v1 = this;
  v2 = this->m_kList.m_pkHead;
  if ( v2 )
  {
    v3 = v2->m_pkNext;
    if ( v2->m_pkNext )
    {
      do
      {
        v4 = v3->m_element;
        v3 = v3->m_pkNext;
        CharMgr::DeleteChar(v1, v4);
      }
      while ( v3 );
    }
    std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::clear((std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v1->m_kmapDeletedChar.comp);
    std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::clear((std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v1->m_kmapFadeOutDeletedChar.comp);
    std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::_Tidy(&v1->m_kLoadDataList);
    v5 = (void **)&v1->m_listCharNPC._Myhead->_Next;
    v6 = (std::_List_nod<Char *,std::allocator<Char *> >::_Node *)*v5;
    *v5 = v5;
    v1->m_listCharNPC._Myhead->_Prev = v1->m_listCharNPC._Myhead;
    v1->m_listCharNPC._Mysize = 0;
    if ( v6 != v1->m_listCharNPC._Myhead )
    {
      do
      {
        v7 = v6->_Next;
        operator delete(v6);
        v6 = v7;
      }
      while ( v7 != v1->m_listCharNPC._Myhead );
    }
  }
}

//----- (0064BBB0) --------------------------------------------------------
void __thiscall CharMgr::RemoveAllWithoutMainCharAndNPC(CharMgr *this)
{
  CharMgr *v1; // ebx@1
  NiTListItem<Char *> *v2; // eax@1
  NiTListItem<Char *> *v3; // edi@2
  Mover *v4; // esi@3

  v1 = this;
  v2 = this->m_kList.m_pkHead;
  if ( v2 )
  {
    v3 = v2->m_pkNext;
    if ( v2->m_pkNext )
    {
      do
      {
        v4 = (Mover *)v3->m_element;
        v3 = v3->m_pkNext;
        if ( !Char::IsNPC((Char *)&v4->vfptr) && v4 != g_pkMainChar->m_pkMover )
        {
          if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v4->vfptr[20].AddAbStateByAbstateIndex)(v4) )
            Mover::RideAllOff(v4);
          CharMgr::DeleteChar(v1, (Char *)&v4->vfptr);
        }
      }
      while ( v3 );
    }
  }
}

//----- (0064BC10) --------------------------------------------------------
void __thiscall CharMgr::RemoveFarCharWithoutMainChar(CharMgr *this)
{
  NiTListItem<Char *> *v1; // eax@1
  NiTListItem<Char *> *v2; // ebx@2
  Char *v3; // esi@3
  int v4; // edi@4
  int v5; // eax@4
  float v6; // ST10_4@4
  float v7; // ST14_4@4
  float v8; // ST18_4@4
  float v9; // ST20_4@4
  float v10; // ST24_4@4
  float v11; // ST24_4@4
  CharMgr *v12; // [sp+Ch] [bp-Ch]@1

  v1 = this->m_kList.m_pkHead;
  v12 = this;
  if ( v1 )
  {
    v2 = v1->m_pkNext;
    if ( v1->m_pkNext )
    {
      do
      {
        v3 = v2->m_element;
        v2 = v2->m_pkNext;
        if ( v3 )
        {
          v4 = ((int (__thiscall *)(Char *))v3->vfptr[6].Deaffect)(v3);
          v5 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
          v6 = *(float *)v5 - *(float *)v4;
          v7 = *(float *)(v5 + 4) - *(float *)(v4 + 4);
          v8 = *(float *)(v5 + 8) - *(float *)(v4 + 8);
          v9 = (double)g_pkMainChar[1].m_uiSkillActStep;
          v10 = v7 * v7 + v6 * v6 + v8 * v8;
          v11 = sqrt(v10);
          if ( v9 < (double)v11 )
            CharMgr::DeleteChar(v12, v3);
        }
      }
      while ( v2 );
    }
  }
}

//----- (0064BCF0) --------------------------------------------------------
void __thiscall CharMgr::Update(CharMgr *this, float fCurTime)
{
  CharMgr *v2; // ebx@1
  unsigned int v3; // esi@1
  bool v4; // zf@1
  bool v5; // sf@1
  unsigned __int8 v6; // of@1
  CharMgr::LoadData *v7; // edi@5
  Char *v8; // edx@5
  NiTListItem<Char *> *v9; // eax@6
  Char *v10; // ecx@7
  char v11; // bl@14
  char v12; // al@18
  int v13; // esi@19
  int v14; // ebx@19
  int v15; // edx@21
  _BYTE *v16; // eax@22
  unsigned int v17; // eax@27
  int v18; // eax@30
  int v19; // ecx@33
  Char *v20; // esi@36
  bool (__thiscall *v21)(AbStateInfectee *, ABSTATEINDEX, float, bool); // eax@36
  int v22; // ecx@36
  unsigned __int16 v23; // dx@36
  int v24; // eax@36
  int v25; // eax@41
  int *v26; // eax@43
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > v27; // edi@45
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v28; // eax@47
  int v29; // eax@47
  const char *v30; // eax@47
  int v31; // ecx@49
  int v32; // eax@49
  int v33; // eax@54
  int *v34; // eax@56
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > v35; // edi@58
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > >,bool> v36; // [sp+30h] [bp-24h]@47
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > v37; // [sp+38h] [bp-1Ch]@59
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > result; // [sp+3Ch] [bp-18h]@47
  int v39; // [sp+40h] [bp-14h]@57
  int v40; // [sp+44h] [bp-10h]@44
  int v41; // [sp+48h] [bp-Ch]@41
  int i; // [sp+4Ch] [bp-8h]@3
  CharMgr *hHandle; // [sp+50h] [bp-4h]@1

  v2 = this;
  ++v2->m_iFrameCount;
  v3 = 0;
  v6 = __OFSUB__(this->m_iFrameCount, 1000);
  v4 = this->m_iFrameCount == 1000;
  v5 = this->m_iFrameCount - 1000 < 0;
  hHandle = this;
  if ( !((unsigned __int8)(v5 ^ v6) | v4) )
    this->m_iFrameCount = 0;
  i = 0;
  do
  {
    if ( !v2->m_kLoadDataList._Mysize )
      break;
    v7 = std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::front(&v2->m_kLoadDataList);
    v8 = v7->pkChar;
    if ( v8 )
    {
      v9 = v2->m_kList.m_pkHead;
      if ( v9 )
      {
        while ( 1 )
        {
          v10 = v9->m_element;
          v9 = v9->m_pkNext;
          if ( v8 == v10 )
            break;
          if ( !v9 )
            goto LABEL_27;
        }
        if ( v10 )
        {
          if ( v2->m_iFrameCount < 2 )
            break;
          v2->m_iFrameCount = 0;
          ((void (__stdcall *)(signed int, _DWORD))v7->pkChar->vfptr[18].DeleteAbStateByAbstateIndex)(1, 0);
          if ( v7->CharData.polymorph != -1 )
          {
            Char::EnablePolymorph(v7->pkChar, 1);
            Char::ImmediatelyMetamorphosis(v7->pkChar, v7->CharData.polymorph);
          }
          v11 = 1;
          do
          {
            if ( (unsigned __int8)v11 & v7->CharData.abstatebit.statebit[v3 >> 3] )
              ((void (__stdcall *)(unsigned int, _DWORD, _DWORD))v7->pkChar->vfptr->AddAbStateByAbstateIndex)(
                v3,
                -1.0,
                0);
            ++v3;
            v11 = __ROL1__(v11, 1);
          }
          while ( (signed int)v3 < 822 );
          ((void (__stdcall *)(_DWORD))v7->pkChar->vfptr[10].AddAbStateByAbstateIndex)(0);
          v12 = v7->CharData.emoticon.emoticonid;
          if ( v12 != -1 )
          {
            v13 = ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;
            v14 = (unsigned __int8)v12;
            if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable
                                                                     + 16))(
                                    ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable,
                                    (unsigned __int8)v12) )
            {
              if ( (unsigned __int16)v14 <= *(_WORD *)(v13 + 200) )
              {
                v15 = *(_DWORD *)(v13 + 196);
                if ( *(_DWORD *)(v15 + 4 * v14) )
                {
                  v16 = *(_BYTE **)(v15 + 4 * v14);
                  if ( v16 )
                    ((void (__stdcall *)(_DWORD))v7->pkChar->vfptr[14].Deaffect)(*v16);
                }
              }
            }
          }
          if ( strcmp(v7->CharData.sAnimation, (const char *)&unk_9B98E4) == 1 )
            Char::ActAction(v7->pkChar, v7->CharData.sAnimation, 0);
          v2 = hHandle;
          v3 = 0;
        }
      }
    }
LABEL_27:
    v17 = v2->m_kLoadDataList._Mysize;
    if ( v17 )
    {
      if ( v2->m_kLoadDataList._Mapsize <= ++v2->m_kLoadDataList._Myoff )
        v2->m_kLoadDataList._Myoff = 0;
      v18 = v17 - 1;
      v2->m_kLoadDataList._Mysize = v18;
      if ( !v18 )
        v2->m_kLoadDataList._Myoff = 0;
    }
    ++i;
  }
  while ( i < 1 );
  v19 = (int)v2->m_kList.m_pkHead;
  if ( v19 )
  {
    while ( 1 )
    {
      v20 = *(Char **)(v19 + 8);
      v21 = v20->vfptr[17].AddAbStateByAbstateIndex;
      i = *(_DWORD *)v19;
      ((void (__thiscall *)(Char *, _DWORD))v21)(v20, LODWORD(fCurTime));
      v22 = (int)v2->m_kmapFadeOutDeletedChar._Myhead;
      v23 = v20->m_kHandle;
      v24 = *(_DWORD *)(v22 + 4);
      v4 = *(_BYTE *)(v24 + 15) == 0;
      hHandle = (CharMgr *)v20->m_kHandle;
      if ( v4 )
      {
        do
        {
          if ( *(_WORD *)(v24 + 12) >= v23 )
          {
            v22 = v24;
            v24 = *(_DWORD *)v24;
          }
          else
          {
            v24 = *(_DWORD *)(v24 + 8);
          }
        }
        while ( !*(_BYTE *)(v24 + 15) );
      }
      v25 = (int)v2->m_kmapFadeOutDeletedChar._Myhead;
      v41 = v22;
      if ( v22 == v25 || v23 < *(_WORD *)(v22 + 12) )
      {
        v40 = v25;
        v26 = &v40;
      }
      else
      {
        v26 = &v41;
      }
      v27._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *)*v26;
      if ( (std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *)*v26 != v2->m_kmapFadeOutDeletedChar._Myhead )
      {
        if ( !Char::IsFade(v20) )
        {
          std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::erase(
            (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v2->m_kmapFadeOutDeletedChar.comp,
            &result,
            v27);
          v28 = std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Buynode<unsigned short>(
                  (std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v2->m_kmapDeletedChar.comp,
                  (unsigned __int16 *)&hHandle);
          std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::_Linsert(
            (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v2->m_kmapDeletedChar.comp,
            &v36,
            v28,
            0);
          v29 = ((int (__thiscall *)(Char *))v20->vfptr[2].DeleteAbStateByAbstateIndex)(v20);
          v30 = fs("Insert DeletedChar[ %s ]\n", v29);
          OutputDebugStringA(v30);
        }
        v23 = (unsigned __int16)hHandle;
      }
      v31 = (int)v2->m_kmapDeletedChar._Myhead;
      v32 = *(_DWORD *)(v31 + 4);
      while ( !*(_BYTE *)(v32 + 15) )
      {
        if ( *(_WORD *)(v32 + 12) >= v23 )
        {
          v31 = v32;
          v32 = *(_DWORD *)v32;
        }
        else
        {
          v32 = *(_DWORD *)(v32 + 8);
        }
      }
      v33 = (int)v2->m_kmapDeletedChar._Myhead;
      v41 = v31;
      if ( v31 == v33 || v23 < *(_WORD *)(v31 + 12) )
      {
        v39 = v33;
        v34 = &v39;
      }
      else
      {
        v34 = &v41;
      }
      v35._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *)*v34;
      if ( (std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *)*v34 != v2->m_kmapDeletedChar._Myhead )
      {
        CharMgr::DeleteChar(v2, v20);
        std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::erase(
          (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v2->m_kmapDeletedChar.comp,
          &v37,
          v35);
      }
      if ( !i )
        break;
      v19 = i;
    }
  }
  QuestDataMgr::m_bUpdate = 0;
}
// A771B0: using guessed type bool QuestDataMgr::m_bUpdate;
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;

//----- (0064C020) --------------------------------------------------------
Char *__thiscall CharMgr::AddMob(CharMgr *this, int kMobID, unsigned __int16 kHandle, NiPoint3 *kPos, NiPoint3 *kDir, bool bDoor, bool bDead)
{
  CharMgr *v7; // ebx@1
  int v8; // edi@1
  Char *v9; // eax@1
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v10; // eax@2
  Char *v11; // eax@4
  int v12; // esi@4
  int v13; // eax@5
  int v14; // eax@7
  bool v15; // zf@9
  int v16; // eax@9
  Char *result; // eax@10
  int v18; // eax@18
  _DWORD *v19; // ecx@18
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v20; // eax@21
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *v21; // eax@21
  std::pair<int const ,int> _Val; // [sp+10h] [bp-14h]@2
  int v23; // [sp+20h] [bp-4h]@4

  v7 = this;
  v8 = kHandle;
  v9 = CharMgr::GetChar(this, kHandle);
  if ( v9 )
  {
    CharMgr::DeleteChar(v7, v9);
    v10 = std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::find(
            (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v7->m_kmapFadeOutDeletedChar.comp,
            (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *)&_Val.second,
            &kHandle)->_Ptr;
    if ( v10 != v7->m_kmapFadeOutDeletedChar._Myhead )
      std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::erase(
        (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v7->m_kmapFadeOutDeletedChar.comp,
        (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > *)&kHandle,
        (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > >)v10);
  }
  v11 = (Char *)operator new(0xB7Cu);
  *(_DWORD *)&kHandle = v11;
  v12 = 0;
  v23 = 0;
  if ( v11 )
  {
    Char::Char(v11);
    v12 = v13;
  }
  v23 = -1;
  *(_DWORD *)&kHandle = v12;
  if ( bDoor )
  {
    v14 = *(_DWORD *)(v12 + 704);
    *(_BYTE *)(v12 + 2494) = 1;
    if ( v14 )
      *(_WORD *)(v14 + 28) &= 0xFFFEu;
  }
  v15 = (unsigned __int8)(*(int (__thiscall **)(int, int, int))(*(_DWORD *)v12 + 548))(v12, kMobID, v8) == 0;
  v16 = *(_DWORD *)v12;
  if ( v15 )
  {
    (*(void (__thiscall **)(int))(v16 + 28))(v12);
    result = 0;
  }
  else if ( (unsigned __int8)(*(int (__thiscall **)(int, signed int, _DWORD))(v16 + 596))(v12, 1, 0) )
  {
    if ( bDead )
      Char::SetMode((Char *)v12, 3);
    (*(void (__thiscall **)(int, NiPoint3 *, NiPoint3 *))(*(_DWORD *)v12 + 184))(v12, kPos, kDir);
    (*(void (__thiscall **)(int, signed int))(*(_DWORD *)v12 + 336))(v12, 1);
    if ( Char::IsCharNPC((Char *)v12) )
    {
      Char::ApplyCharNpcBaseAction((Char *)v12, 1);
      if ( Char::HaveEventNPCAction((Char *)v12) )
        std::list<enum  ABSTATEINDEX,std::allocator<enum  ABSTATEINDEX>>::push_back(
          (std::list<enum ABSTATEINDEX,std::allocator<enum ABSTATEINDEX> > *)&v7->m_listCharNPC,
          (ABSTATEINDEX *)&kHandle);
    }
    v18 = (int)v7->m_kList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,Char *> *)&v7->m_kList);
    *(_DWORD *)(v18 + 8) = v12;
    *(_DWORD *)v18 = 0;
    *(_DWORD *)(v18 + 4) = v7->m_kList.m_pkTail;
    v19 = &v7->m_kList.m_pkTail->m_pkNext;
    if ( v19 )
      *v19 = v18;
    else
      v7->m_kList.m_pkHead = (NiTListItem<Char *> *)v18;
    ++v7->m_kList.m_kAllocator.m_uiCount;
    v7->m_kList.m_pkTail = (NiTListItem<Char *> *)v18;
    _Val.first = *(_DWORD *)(v12 + 704);
    _Val.second = v12;
    v20 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v7->m_mapByCharNode, &_Val);
    std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
      (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v7->m_mapByCharNode,
      (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >,bool> *)&_Val,
      v20,
      0);
    LOWORD(_Val.first) = *(_WORD *)(v12 + 552);
    _Val.second = v12;
    v21 = std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned long>>,0>>::_Buynode<std::pair<unsigned short const,unsigned long>>(
            (std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)&v7->m_mapByHandle,
            (std::pair<unsigned short const ,unsigned long> *)&_Val);
    std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::_Linsert(
      (std::_Tree<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)&v7->m_mapByHandle,
      (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > >,bool> *)&_Val,
      v21,
      0);
    World::AttachChar(&g_kWorld, (Char *)v12);
    result = (Char *)v12;
  }
  else
  {
    (*(void (__thiscall **)(int))(*(_DWORD *)v12 + 28))(v12);
    result = 0;
  }
  return result;
}

//----- (0064C240) --------------------------------------------------------
Char *__thiscall CharMgr::AddMob(CharMgr *this, PROTO_NC_BRIEFINFO_BUILDDOOR_CMD *p)
{
  CharMgr *v2; // edi@1
  float fY; // ST10_4@1
  float fX; // ST0C_4@1
  int v5; // eax@1
  Char *v7; // edi@3
  void (__thiscall *v8)(AbStateInfectee *, ABSTATEINDEX, bool, int); // edx@4
  unsigned int v9; // ecx@4
  unsigned int v10; // edx@4
  unsigned int v11; // eax@4
  unsigned int v12; // edx@4
  unsigned int v13; // ecx@4
  unsigned int v14; // eax@4
  unsigned int v15; // ecx@4
  char *v16; // eax@4
  char v17; // cl@5
  char v18; // al@6
  NiPoint3 kPos; // [sp+14h] [bp-44h]@1
  NiPoint3 kDir; // [sp+20h] [bp-38h]@1
  float v21; // [sp+2Ch] [bp-2Ch]@1
  NiMatrix3 szBlockName; // [sp+30h] [bp-28h]@1

  v2 = this;
  fX = (double)p->coord.xy.x;
  fY = (double)p->coord.xy.y;
  World::GetAdvGroundPos(&g_kWorld, fX, fY, &kPos);
  v21 = (double)(((unsigned int)p->coord.dir + 90) % 0xB4) * (NI_PI + NI_PI) / 180.0;
  NiMatrix3::MakeZRotation(&szBlockName, v21);
  NiMatrix3::operator*(&szBlockName, &kDir, &World::ms_kNorthDir);
  v5 = p->mobid;
  if ( (_WORD)v5 == -1 )
    return 0;
  v7 = CharMgr::AddMob(v2, v5, p->handle, &kPos, &kDir, 1, 0);
  if ( !v7 )
    return 0;
  LODWORD(v21) = p->scale;
  v8 = v7->vfptr[16].SetAbStateProperty;
  v21 = (double)SLODWORD(v21) / 1000.0;
  ((void (__thiscall *)(Char *, _DWORD))v8)(v7, LODWORD(v21));
  v9 = p->blockindex.n8_code[1];
  v10 = p->blockindex.n8_code[2];
  LODWORD(szBlockName.m_pEntry[0][0]) = p->blockindex.n8_code[0];
  v11 = p->blockindex.n8_code[3];
  LODWORD(szBlockName.m_pEntry[0][2]) = v10;
  v12 = p->blockindex.n8_code[5];
  LODWORD(szBlockName.m_pEntry[0][1]) = v9;
  v13 = p->blockindex.n8_code[4];
  LODWORD(szBlockName.m_pEntry[1][0]) = v11;
  v14 = p->blockindex.n8_code[6];
  LODWORD(szBlockName.m_pEntry[1][2]) = v12;
  LODWORD(szBlockName.m_pEntry[1][1]) = v13;
  v15 = p->blockindex.n8_code[7];
  LODWORD(szBlockName.m_pEntry[2][0]) = v14;
  v16 = v7->m_szBlockName;
  LODWORD(szBlockName.m_pEntry[2][1]) = v15;
  LOBYTE(szBlockName.m_pEntry[2][2]) = 0;
  do
  {
    v17 = v16[(char *)&szBlockName - v7->m_szBlockName];
    *v16++ = v17;
  }
  while ( v17 );
  v18 = p->doorstate;
  if ( v18 )
  {
    if ( (unsigned __int8)(v18 - 1) <= 1u )
    {
      Char::OpenDoor(v7);
      return v7;
    }
  }
  else
  {
    Char::CloseDoor(v7);
  }
  return v7;
}
// B622CC: using guessed type const float NI_PI;

//----- (0064C3E0) --------------------------------------------------------
Char *__thiscall CharMgr::AddMob(CharMgr *this, PROTO_NC_BRIEFINFO_REGENMOB_CMD *p)
{
  double v2; // st7@1
  float fY; // ST10_4@1
  float fX; // ST0C_4@1
  int v5; // edi@1
  int v6; // ebx@1
  int v7; // edx@1
  int *v8; // eax@3
  bool v9; // bl@3
  int v10; // eax@4
  unsigned int v11; // ecx@6
  int v12; // eax@9
  Char *result; // eax@10
  bool v14; // zf@11
  Char *v15; // edi@13
  char v16; // al@14
  unsigned int v17; // edx@15
  AbStateInfecteeVtbl *v18; // eax@15
  char v19; // al@16
  MapInfo *v20; // eax@17
  unsigned int v21; // edi@20
  char v22; // bl@20
  NiPoint3 kPos; // [sp+18h] [bp-54h]@1
  NiPoint3 kDir; // [sp+24h] [bp-48h]@9
  CharMgr *v25; // [sp+30h] [bp-3Ch]@1
  Char *pkMob; // [sp+34h] [bp-38h]@1
  NiMatrix3 v27; // [sp+38h] [bp-34h]@9
  char dest[4]; // [sp+5Ch] [bp-10h]@17
  int v29; // [sp+60h] [bp-Ch]@17
  int v30; // [sp+64h] [bp-8h]@17

  v2 = (double)p->coord.xy.y;
  v25 = this;
  fX = (double)p->coord.xy.x;
  fY = v2;
  World::GetAdvGroundPos(&g_kWorld, fX, fY, &kPos);
  v5 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
  v6 = p->mobid;
  v7 = *(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
  pkMob = (Char *)p->coord.dir;
  if ( !(unsigned __int8)(*(int (__thiscall **)(int, int))(v7 + 16))(ITableBase<MobInfo,MobInfoTab>::ms_pkTable, v6)
    || (unsigned __int16)v6 > *(_WORD *)(v5 + 200) )
  {
    v9 = 0;
LABEL_8:
    LOBYTE(v11) = (_BYTE)pkMob;
    goto LABEL_9;
  }
  v8 = (int *)(*(_DWORD *)(v5 + 196) + 4 * v6);
  v9 = 0;
  if ( !*v8 )
    goto LABEL_8;
  v10 = *v8;
  if ( !v10 || !*(_BYTE *)(v10 + 82) )
    goto LABEL_8;
  v11 = ((unsigned int)&pkMob->vfptr + 2) % 0xB4;
LABEL_9:
  *(float *)&pkMob = (NI_PI + NI_PI) * (double)(unsigned __int8)v11 / 180.0;
  NiMatrix3::MakeZRotation(&v27, *(float *)&pkMob);
  NiMatrix3::operator*(&v27, &kDir, &World::ms_kNorthDir);
  v12 = p->mobid;
  if ( (_WORD)v12 == -1 )
    goto LABEL_32;
  v14 = p->mode == 3;
  LOBYTE(pkMob) = 0;
  if ( v14 )
    LOBYTE(pkMob) = 1;
  v15 = CharMgr::AddMob(v25, v12, p->handle, &kPos, &kDir, v9, (bool)pkMob);
  pkMob = v15;
  if ( v15 )
  {
    v16 = p->nAnimationLevel;
    if ( v16 )
    {
      v17 = (unsigned __int8)v16;
      v18 = v15->vfptr;
      v15->m_uiConditionAniLevel = v17;
      ((void (__thiscall *)(Char *))v18[10].DeleteAbStateByAbstateIndex)(v15);
    }
    v19 = p->flagstate;
    if ( v19 == 1 )
    {
      v30 = 0;
      v29 = 0;
      *(_DWORD *)dest = 0;
      strncpy(dest, p->flag.abstatebit.statebit, 0xCu);
      v20 = MapInfoTab::GetByMapName((Name3 *)dest);
      if ( v20 )
        Char::SetLinkGateName(v15, v20->Name);
    }
    else if ( !v19 )
    {
      v21 = 0;
      v22 = 1;
      do
      {
        if ( (unsigned __int8)v22 & p->flag.abstatebit.statebit[v21 >> 3] )
          ((void (__stdcall *)(unsigned int, _DWORD, _DWORD))pkMob->vfptr->AddAbStateByAbstateIndex)(v21, -1.0, 0);
        ++v21;
        v22 = __ROL1__(v22, 1);
      }
      while ( (signed int)v21 < 822 );
      v15 = pkMob;
    }
    if ( strcmp(p->sAnimation, (const char *)&unk_9B98E5) == 1 )
      Char::ActAction(v15, p->sAnimation, 0);
    v15->m_byKQTeamType = p->nKQTeamType;
    if ( p->bRegenAni )
      Char::ActAction(v15, (int)p->sAnimation, (int)v15, REGEN, 0);
    result = v15;
  }
  else
  {
LABEL_32:
    result = 0;
  }
  return result;
}
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
// B622CC: using guessed type const float NI_PI;

//----- (0064C640) --------------------------------------------------------
char __thiscall CharMgr::AddMob(CharMgr *this, PROTO_NC_BRIEFINFO_MOB_CMD *p)
{
  bool v2; // zf@1
  PROTO_NC_BRIEFINFO_MOB_CMD *v3; // edi@2
  float fY; // ST10_4@3
  float fX; // ST0C_4@3
  int v6; // esi@3
  int v7; // edx@3
  unsigned int v8; // ebx@3
  int *v9; // eax@5
  int v10; // eax@6
  int v11; // eax@9
  Char *v12; // esi@12
  char v13; // al@13
  unsigned int v14; // edx@14
  AbStateInfecteeVtbl *v15; // eax@14
  char v16; // al@15
  MapInfo *v17; // eax@16
  unsigned int v18; // esi@19
  char v19; // bl@19
  int v20; // ecx@28
  char v21; // al@29
  NiPoint3 result; // [sp+18h] [bp-60h]@9
  NiPoint3 kTargetPos; // [sp+24h] [bp-54h]@3
  CharMgr *v24; // [sp+30h] [bp-48h]@1
  PROTO_NC_BRIEFINFO_MOB_CMD *v25; // [sp+34h] [bp-44h]@1
  bool bDead[4]; // [sp+38h] [bp-40h]@10
  int i; // [sp+3Ch] [bp-3Ch]@1
  float v28; // [sp+40h] [bp-38h]@3
  NiMatrix3 v29; // [sp+44h] [bp-34h]@9
  char dest[4]; // [sp+68h] [bp-10h]@16
  int v31; // [sp+6Ch] [bp-Ch]@16
  int v32; // [sp+70h] [bp-8h]@16

  v2 = p->mobnum == 0;
  v24 = this;
  v25 = p;
  i = 0;
  if ( v2 )
  {
LABEL_29:
    v21 = 1;
  }
  else
  {
    v3 = p + 119;
    while ( 1 )
    {
      fX = (double)*(unsigned int *)&v3[-113].mobnum;
      fY = (double)*(unsigned int *)&v3[-109].mobnum;
      World::GetAdvGroundPos(&g_kWorld, fX, fY, &kTargetPos);
      v6 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
      v7 = *(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
      v8 = v3[-105].mobnum;
      LODWORD(v28) = *(_WORD *)&v3[-115].mobnum;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(v7 + 16))(
                              ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                              LODWORD(v28)) )
      {
        if ( LOWORD(v28) <= *(_WORD *)(v6 + 200) )
        {
          v9 = (int *)(*(_DWORD *)(v6 + 196) + 4 * LOWORD(v28));
          if ( *v9 )
          {
            v10 = *v9;
            if ( v10 )
            {
              if ( *(_BYTE *)(v10 + 82) )
                v8 = (v8 + 90) % 0xB4;
            }
          }
        }
      }
      v28 = (NI_PI + NI_PI) * (double)(unsigned __int8)v8 / 180.0;
      NiMatrix3::MakeZRotation(&v29, v28);
      NiMatrix3::operator*(&v29, &result, &World::ms_kNorthDir);
      v11 = *(_WORD *)&v3[-115].mobnum;
      if ( (_WORD)v11 == -1 )
        break;
      v2 = v3[-116].mobnum == 3;
      bDead[0] = 0;
      if ( v2 )
        bDead[0] = 1;
      v12 = CharMgr::AddMob(v24, v11, *(_WORD *)&v3[-118].mobnum, &kTargetPos, &result, 0, bDead[0]);
      v28 = *(float *)&v12;
      if ( !v12 )
        break;
      v13 = v3[32].mobnum;
      if ( v13 )
      {
        v14 = (unsigned __int8)v13;
        v15 = v12->vfptr;
        v12->m_uiConditionAniLevel = v14;
        ((void (__thiscall *)(Char *))v15[10].DeleteAbStateByAbstateIndex)(v12);
      }
      v16 = v3[-104].mobnum;
      if ( v16 == 1 )
      {
        v32 = 0;
        v31 = 0;
        *(_DWORD *)dest = 0;
        strncpy(dest, &v3[-103].mobnum, 0xCu);
        v17 = MapInfoTab::GetByMapName((Name3 *)dest);
        if ( v17 )
          Char::SetLinkGateName(v12, v17->Name);
      }
      else if ( !v16 )
      {
        v18 = 0;
        v19 = 1;
        do
        {
          if ( (unsigned __int8)v19 & v3[(v18 >> 3) - 103].mobnum )
            (*(void (__stdcall **)(unsigned int, _DWORD, _DWORD))(*(_DWORD *)LODWORD(v28) + 16))(v18, -1.0, 0);
          ++v18;
          v19 = __ROL1__(v19, 1);
        }
        while ( (signed int)v18 < 822 );
        v12 = (Char *)LODWORD(v28);
      }
      if ( strcmp(&v3->mobnum, (const char *)&unk_9B98E5) == 1 )
        Char::ActAction(v12, &v3->mobnum, 0);
      v12->m_byKQTeamType = v3[33].mobnum;
      if ( v3[34].mobnum )
        Char::ActAction(v12, 0, (int)v3, REGEN, 0);
      v20 = v25->mobnum;
      v3 += 153;
      if ( ++i >= v20 )
        goto LABEL_29;
    }
    v21 = 0;
  }
  return v21;
}
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
// B622CC: using guessed type const float NI_PI;

//----- (0064C8D0) --------------------------------------------------------
Char *__thiscall CharMgr::AddCharQue(CharMgr *this, PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *p)
{
  unsigned __int16 fAngle; // ST14_2@1
  Char *v3; // ebx@1
  unsigned int v4; // edx@2
  unsigned int v5; // eax@2
  unsigned int v6; // ecx@2
  unsigned int v7; // edx@2
  AbStateInfecteeVtbl *v8; // eax@2
  void (__thiscall *v9)(AbStateInfectee *, ABSTATEINDEX); // edx@2
  float fY; // ST10_4@3
  float fX; // ST0C_4@3
  Char *v13; // eax@5
  float v14; // esi@5
  float v15; // eax@6
  int (__thiscall *v16)(_DWORD, PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *); // edx@7
  float v17; // ST10_4@9
  float v18; // ST0C_4@9
  char v19; // al@9
  char v20; // al@11
  int v21; // ebx@12
  int v22; // edx@12
  _BYTE **v23; // eax@14
  _BYTE *v24; // eax@15
  void (__thiscall *v25)(_DWORD, signed int, _DWORD); // edx@16
  char *v26; // eax@20
  char *v27; // eax@18
  CharMgr *v28; // ebx@24
  NiTListItem<Char *> *v29; // eax@24
  NiTListItem<Char *> **v30; // ecx@24
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v31; // eax@27
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *v32; // eax@27
  NiPoint3 kPos; // [sp+28h] [bp-74h]@9
  NiPoint3 kDir; // [sp+34h] [bp-68h]@9
  CharMgr *v35; // [sp+40h] [bp-5Ch]@1
  NiPoint3 result; // [sp+44h] [bp-58h]@3
  NiMatrix3 v37; // [sp+50h] [bp-4Ch]@3
  char acName[21]; // [sp+74h] [bp-28h]@2
  int v39; // [sp+98h] [bp-4h]@5

  fAngle = p->handle;
  v35 = this;
  v3 = CharMgr::GetChar(this, fAngle);
  if ( v3 )
  {
    v4 = p->charid.n5_code[1];
    v5 = p->charid.n5_code[2];
    *(_DWORD *)acName = p->charid.n5_code[0];
    v6 = p->charid.n5_code[3];
    *(_DWORD *)&acName[4] = v4;
    v7 = p->charid.n5_code[4];
    *(_DWORD *)&acName[8] = v5;
    v8 = v3->vfptr;
    *(_DWORD *)&acName[12] = v6;
    *(_DWORD *)&acName[16] = v7;
    v9 = v8[2].DeleteAbStateByAbstateIndex;
    acName[20] = 0;
    if ( !strcmp((const char *)((int (__thiscall *)(Char *))v9)(v3), acName) )
    {
      v3->m_bConnectServer = 1;
      fX = (double)p->coord.xy.x;
      fY = (double)p->coord.xy.y;
      World::GetAdvGroundPos(&g_kWorld, fX, fY, (NiPoint3 *)&acName[8]);
      *(float *)&v35 = (double)p->coord.dir * (NI_PI + NI_PI) / 180.0;
      NiMatrix3::MakeZRotation(&v37, *(float *)&v35);
      NiMatrix3::operator*(&v37, &result, &World::ms_kNorthDir);
      ((void (__thiscall *)(Char *, char *, NiPoint3 *))v3->vfptr[5].GetAbstateColor)(v3, &acName[8], &result);
      ((void (__thiscall *)(Char *, PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *))v3->vfptr[2].SetAbStateProperty)(v3, p);
      return v3;
    }
    CharMgr::DeleteChar(v35, v3);
  }
  v13 = (Char *)operator new(0xB7Cu);
  LODWORD(result.z) = v13;
  v14 = 0.0;
  v39 = 0;
  if ( v13 )
  {
    Char::Char(v13);
    v14 = v15;
  }
  v16 = *(int (__thiscall **)(_DWORD, PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *))(*(_DWORD *)LODWORD(v14) + 552);
  v39 = -1;
  if ( !(unsigned __int8)v16(LODWORD(v14), p) )
  {
    (*(void (__thiscall **)(_DWORD, signed int))(*(_DWORD *)LODWORD(v14) + 28))(LODWORD(v14), 1);
    return 0;
  }
  v18 = (double)p->coord.xy.x;
  v17 = (double)p->coord.xy.y;
  World::GetAdvGroundPos(&g_kWorld, v18, v17, &kPos);
  LODWORD(result.z) = p->coord.dir;
  result.z = (double)SLODWORD(result.z) * (NI_PI + NI_PI) / 180.0;
  NiMatrix3::MakeZRotation(&v37, result.z);
  NiMatrix3::operator*(&v37, &kDir, &World::ms_kNorthDir);
  (*(void (__thiscall **)(_DWORD, NiPoint3 *, NiPoint3 *))(*(_DWORD *)LODWORD(v14) + 184))(LODWORD(v14), &kPos, &kDir);
  v19 = p->mode;
  if ( (unsigned __int8)v19 < 4u || (unsigned __int8)v19 > 5u )
  {
    v20 = p->emoticon.emoticonid;
    if ( v20 != -1 )
    {
      v21 = ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;
      v22 = *(_DWORD *)ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;
      LODWORD(result.z) = (unsigned __int8)v20;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(v22 + 16))(
                              ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable,
                              (unsigned __int8)v20) )
      {
        if ( LOWORD(result.z) <= *(_WORD *)(v21 + 200) )
        {
          v23 = (_BYTE **)(*(_DWORD *)(v21 + 196) + 4 * LOWORD(result.z));
          if ( *v23 )
          {
            v24 = *v23;
            if ( v24 )
            {
              (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)LODWORD(v14) + 452))(LODWORD(v14), *v24);
              LODWORD(result.z) = p->emoticon.emoticonframe;
              v25 = *(void (__thiscall **)(_DWORD, signed int, _DWORD))(*(_DWORD *)LODWORD(v14) + 460);
              result.z = (double)SLODWORD(result.z) / 1000.0;
              v25(LODWORD(v14), 1, LODWORD(result.z));
            }
          }
        }
      }
    }
  }
  *(_DWORD *)(LODWORD(v14) + 680) = p->myguild;
  *(_BYTE *)(LODWORD(v14) + 684) = p->isGuildAcademyMember;
  *(_DWORD *)(LODWORD(v14) + 176) = p->chartitle.Type;
  if ( p->chartitle.Type )
  {
    if ( p->chartitle.Type == 10 )
    {
      v26 = WeaponTitleTab::GetWeaponTitleStringByLevel(p->chartitle.MobID, p->chartitle.ElementNo);
      if ( v26 )
      {
        Char::SetCharTitleName((Char *)LODWORD(v14), v26);
        Char::SetCharTitleUse((Char *)LODWORD(v14), 1);
      }
      goto LABEL_24;
    }
    Char::SetCharTitleUse((Char *)LODWORD(v14), 1);
    v27 = CCharacterTitleData::GetTitleString(&g_characterTitleData, p->chartitle.Type, p->chartitle.ElementNo);
  }
  else
  {
    Char::SetCharTitleUse((Char *)LODWORD(v14), 0);
    v27 = CCharacterTitleData::GetTitleString(&g_characterTitleData, p->chartitle.Type, 0);
  }
  Char::SetCharTitleName((Char *)LODWORD(v14), v27);
LABEL_24:
  v28 = v35;
  v29 = v35->m_kList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,Char *> *)&v35->m_kList);
  *(float *)&v29->m_element = v14;
  v29->m_pkNext = 0;
  v29->m_pkPrev = v28->m_kList.m_pkTail;
  v30 = &v28->m_kList.m_pkTail->m_pkNext;
  if ( v30 )
    *v30 = v29;
  else
    v28->m_kList.m_pkHead = v29;
  ++v28->m_kList.m_kAllocator.m_uiCount;
  v28->m_kList.m_pkTail = v29;
  result.y = *(float *)(LODWORD(v14) + 704);
  result.z = v14;
  v31 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v28->m_mapByCharNode, (std::pair<int const ,int> *)&result.y);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v28->m_mapByCharNode,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >,bool> *)&result.y,
    v31,
    0);
  LOWORD(result.y) = *(_WORD *)(LODWORD(v14) + 552);
  result.z = v14;
  v32 = std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned long>>,0>>::_Buynode<std::pair<unsigned short const,unsigned long>>(
          (std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)&v28->m_mapByHandle,
          (std::pair<unsigned short const ,unsigned long> *)&result.y);
  std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)&v28->m_mapByHandle,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > >,bool> *)&result.y,
    v32,
    0);
  World::AttachChar(&g_kWorld, (Char *)LODWORD(v14));
  return (Char *)LODWORD(v14);
}
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;
// B622CC: using guessed type const float NI_PI;

//----- (0064CCC0) --------------------------------------------------------
Char *__thiscall CharMgr::AddChar(CharMgr *this, PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *p, unsigned int uiFrameWork)
{
  CharMgr *v3; // edi@1
  Char *v4; // esi@1
  Char *v5; // eax@1
  int v6; // ecx@2
  std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *v7; // eax@2
  unsigned __int16 _Keyval[2]; // [sp+Ch] [bp-120h]@2
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > result; // [sp+10h] [bp-11Ch]@2
  char dst; // [sp+14h] [bp-118h]@2
  Char *v11; // [sp+104h] [bp-28h]@2

  v3 = this;
  v4 = CharMgr::AddCharQue(this, p);
  v5 = 0;
  if ( v4 )
  {
    v11 = v4;
    memset(&dst, 0, 0xEFu);
    PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD::operator=((PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *)&dst, p);
    std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::push_back(
      &v3->m_kLoadDataList,
      (CharMgr::LoadData *)&dst);
    v6 = v4->m_kHandle;
    v4->m_kCharShape.m_bAutoPickItem = p->IsAutoPick != 0;
    v4->m_byKQTeamType = p->nKQTeamType;
    *(_DWORD *)_Keyval = v6;
    v7 = std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::find(
           (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v3->m_kmapDeletedChar.comp,
           &result,
           _Keyval)->_Ptr;
    if ( v7 != v3->m_kmapDeletedChar._Myhead )
      std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::erase(
        (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v3->m_kmapDeletedChar.comp,
        &result,
        (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > >)v7);
    v5 = v4;
  }
  return v5;
}

//----- (0064CDC0) --------------------------------------------------------
char __thiscall CharMgr::AddChar(CharMgr *this, PROTO_NC_BRIEFINFO_CHARACTER_CMD *p)
{
  char v2; // di@1
  bool v3; // zf@1
  CharMgr *v4; // ebx@1
  Char *v5; // eax@3
  int v6; // esi@3
  unsigned int v7; // edi@6
  unsigned int v8; // eax@6
  CharMgr::LoadData *v9; // eax@9
  char *v10; // edi@11
  PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *v11; // edi@13
  int v12; // edx@13
  int v13; // eax@13
  unsigned __int16 v14; // si@13
  int v15; // eax@18
  int *v16; // eax@20
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > v17; // eax@22
  int v18; // edx@24
  char v19; // al@28
  std::exception pExceptionObject; // [sp+Ch] [bp-140h]@26
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > > result; // [sp+18h] [bp-134h]@23
  char *_What; // [sp+1Ch] [bp-130h]@26
  int v23; // [sp+20h] [bp-12Ch]@21
  PROTO_NC_BRIEFINFO_CHARACTER_CMD *v24; // [sp+24h] [bp-128h]@1
  int i; // [sp+28h] [bp-124h]@1
  Char *v26; // [sp+2Ch] [bp-120h]@3
  PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *__that; // [sp+30h] [bp-11Ch]@2
  char dst; // [sp+34h] [bp-118h]@4
  Char *v29; // [sp+124h] [bp-28h]@4

  v2 = 0;
  v3 = p->charnum == 0;
  v4 = this;
  v24 = p;
  i = 0;
  if ( v3 )
  {
LABEL_29:
    v19 = 1;
  }
  else
  {
    __that = (PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *)&p[1];
    while ( 1 )
    {
      v5 = CharMgr::AddCharQue(v4, __that);
      v6 = (int)v5;
      v26 = v5;
      if ( !v5 )
        break;
      v29 = v5;
      memset(&dst, v2, 0xEFu);
      PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD::operator=((PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *)&dst, __that);
      if ( v4->m_kLoadDataList._Mapsize <= v4->m_kLoadDataList._Mysize + 1 )
        std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::_Growmap(&v4->m_kLoadDataList, 1u);
      v7 = v4->m_kLoadDataList._Mysize + v4->m_kLoadDataList._Myoff;
      v8 = v4->m_kLoadDataList._Mapsize;
      if ( v8 <= v7 )
        v7 -= v8;
      if ( !v4->m_kLoadDataList._Map[v7] )
      {
        v9 = (CharMgr::LoadData *)operator new(0x114u);
        if ( !v9 )
        {
          _What = 0;
          std::exception::exception(&pExceptionObject, (const char *const *)&_What);
          pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
          _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
        }
        v4->m_kLoadDataList._Map[v7] = v9;
      }
      v10 = (char *)v4->m_kLoadDataList._Map[v7];
      if ( v10 )
      {
        qmemcpy(v10, &dst, 0x114u);
        v6 = (int)v26;
      }
      ++v4->m_kLoadDataList._Mysize;
      v11 = __that;
      *(_BYTE *)(v6 + 1444) = __that->IsAutoPick != 0;
      *(_BYTE *)(v6 + 2936) = v11->nKQTeamType;
      v12 = (int)v4->m_kmapDeletedChar._Myhead;
      v13 = *(_DWORD *)(v12 + 4);
      v14 = *(_WORD *)(v6 + 552);
      while ( !*(_BYTE *)(v13 + 15) )
      {
        if ( *(_WORD *)(v13 + 12) >= v14 )
        {
          v12 = v13;
          v13 = *(_DWORD *)v13;
        }
        else
        {
          v13 = *(_DWORD *)(v13 + 8);
        }
      }
      v15 = (int)v4->m_kmapDeletedChar._Myhead;
      v26 = (Char *)v12;
      if ( v12 == v15 || v14 < *(_WORD *)(v12 + 12) )
      {
        v23 = v15;
        v16 = &v23;
      }
      else
      {
        v16 = (int *)&v26;
      }
      v17._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> >::_Node *)*v16;
      if ( v17._Ptr != v4->m_kmapDeletedChar._Myhead )
        std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0>>::erase(
          (std::_Tree<std::_Tset_traits<unsigned short,std::less<unsigned short>,std::allocator<unsigned short>,0> > *)&v4->m_kmapDeletedChar.comp,
          &result,
          v17);
      v18 = v24->charnum;
      ++i;
      __that = v11 + 1;
      if ( i >= v18 )
        goto LABEL_29;
      v2 = 0;
    }
    v19 = 0;
  }
  return v19;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0064CFF0) --------------------------------------------------------
Pet *__thiscall CharMgr::AddPet(CharMgr *this, unsigned int kPetID, int kPetHandle, NiPoint3 *kPos, NiPoint3 *kDir, const char *pcName)
{
  CharMgr *v6; // ebx@1
  Char *v7; // eax@1
  Char *v8; // esi@1
  Pet *v9; // eax@3
  Char *v10; // eax@4
  AbStateInfectee::AbstateColor (__thiscall *v11)(AbStateInfectee *); // eax@5
  char v12; // al@5
  AbStateInfecteeVtbl *v13; // edx@5
  Pet *result; // eax@6
  char v15; // al@7
  AbStateInfecteeVtbl *v16; // edx@7
  int v17; // eax@9
  _DWORD *v18; // ecx@9
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v19; // eax@12
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *v20; // eax@12
  std::pair<int const ,int> _Val; // [sp+10h] [bp-14h]@12
  int v22; // [sp+20h] [bp-4h]@3

  v6 = this;
  v7 = CharMgr::GetChar(this, kPetHandle);
  v8 = 0;
  if ( v7 )
    CharMgr::DeleteChar(v6, v7);
  v9 = (Pet *)operator new(0xB80u);
  v22 = 0;
  if ( v9 )
  {
    Pet::Pet(v9);
    v8 = v10;
  }
  v11 = v8->vfptr[20].GetAbstateColor;
  v22 = -1;
  v12 = ((int (__thiscall *)(Char *, unsigned int, int, const char *))v11)(v8, kPetID, kPetHandle, pcName);
  v13 = v8->vfptr;
  if ( v12 )
  {
    v15 = ((int (__thiscall *)(Char *, signed int, _DWORD))v13[18].DeleteAbStateByAbstateIndex)(v8, 1, 0);
    v16 = v8->vfptr;
    if ( v15 )
    {
      ((void (__thiscall *)(Char *, NiPoint3 *, NiPoint3 *))v16[5].GetAbstateColor)(v8, kPos, kDir);
      ((void (__thiscall *)(Char *, signed int))v8->vfptr[10].AddAbStateByAbstateIndex)(v8, 1);
      v17 = (int)v6->m_kList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,Char *> *)&v6->m_kList);
      *(_DWORD *)(v17 + 8) = v8;
      *(_DWORD *)v17 = 0;
      *(_DWORD *)(v17 + 4) = v6->m_kList.m_pkTail;
      v18 = &v6->m_kList.m_pkTail->m_pkNext;
      if ( v18 )
        *v18 = v17;
      else
        v6->m_kList.m_pkHead = (NiTListItem<Char *> *)v17;
      ++v6->m_kList.m_kAllocator.m_uiCount;
      v6->m_kList.m_pkTail = (NiTListItem<Char *> *)v17;
      _Val.first = (const int)v8->m_spScene.m_pObject;
      _Val.second = (int)v8;
      v19 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v6->m_mapByCharNode, &_Val);
      std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
        (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v6->m_mapByCharNode,
        (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >,bool> *)&_Val,
        v19,
        0);
      LOWORD(_Val.first) = v8->m_kHandle;
      _Val.second = (int)v8;
      v20 = std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned long>>,0>>::_Buynode<std::pair<unsigned short const,unsigned long>>(
              (std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)&v6->m_mapByHandle,
              (std::pair<unsigned short const ,unsigned long> *)&_Val);
      std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::_Linsert(
        (std::_Tree<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)&v6->m_mapByHandle,
        (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > >,bool> *)&_Val,
        v20,
        0);
      World::AttachChar(&g_kWorld, v8);
      result = (Pet *)v8;
    }
    else
    {
      v16->~AbStateInfectee((AbStateInfectee *)v8);
      result = 0;
    }
  }
  else
  {
    v13->~AbStateInfectee((AbStateInfectee *)v8);
    result = 0;
  }
  return result;
}

//----- (0064D190) --------------------------------------------------------
Pet *__thiscall CharMgr::AddPet(CharMgr *this, PROTO_NC_BRIEFINFO_REGENPET_CMD *p)
{
  CharMgr *v2; // edi@1
  Pet *v3; // eax@2
  float fY; // ST0C_4@3
  float fX; // ST08_4@3
  unsigned int v6; // eax@3
  unsigned int v7; // edx@3
  unsigned int v8; // ecx@3
  unsigned int v9; // edx@3
  int v10; // eax@3
  unsigned int v11; // ecx@3
  NiPoint3 kPos; // [sp+14h] [bp-64h]@3
  NiPoint3 result; // [sp+20h] [bp-58h]@3
  NiPoint3 kDir; // [sp+2Ch] [bp-4Ch]@3
  float v15; // [sp+38h] [bp-40h]@3
  NiMatrix3 v16; // [sp+3Ch] [bp-3Ch]@3
  char acName[17]; // [sp+60h] [bp-18h]@3

  v2 = this;
  if ( p->nID == -1 )
  {
    v3 = 0;
  }
  else
  {
    fX = (double)p->XYDir.xy.x;
    fY = (double)p->XYDir.xy.y;
    World::GetAdvGroundPos(&g_kWorld, fX, fY, &kPos);
    LODWORD(v15) = p->XYDir.dir;
    v15 = (NI_PI + NI_PI) * (double)SLODWORD(v15) / 180.0;
    NiMatrix3::MakeZRotation(&v16, v15);
    NiMatrix3::operator*(&v16, &result, &World::ms_kNorthDir);
    kDir.y = result.y;
    v6 = p->sPetName.n4_code[1];
    kDir.x = result.x;
    v7 = p->sPetName.n4_code[0];
    kDir.z = result.z;
    v8 = p->sPetName.n4_code[2];
    *(_DWORD *)&acName[4] = v6;
    *(_DWORD *)acName = v7;
    v9 = p->sPetName.n4_code[3];
    *(_DWORD *)&acName[8] = v8;
    v10 = p->nHandle;
    v11 = p->nID;
    *(_DWORD *)&acName[12] = v9;
    acName[16] = 0;
    v3 = CharMgr::AddPet(v2, v11, v10, &kPos, &kDir, acName);
  }
  return v3;
}
// B622CC: using guessed type const float NI_PI;

//----- (0064D2A0) --------------------------------------------------------
char __thiscall CharMgr::AddPet(CharMgr *this, PROTO_NC_BRIEFINFO_PET_CMD *p)
{
  unsigned int v2; // edi@1
  bool v3; // zf@1
  PROTO_NC_BRIEFINFO_PET_CMD *v4; // esi@2
  float fY; // ST0C_4@4
  float fX; // ST08_4@4
  int v7; // eax@4
  int v8; // edx@4
  int v9; // ecx@4
  int v10; // edx@4
  int v11; // eax@4
  unsigned int v12; // ecx@4
  char v13; // al@6
  NiPoint3 kTargetPos; // [sp+18h] [bp-68h]@4
  NiPoint3 result; // [sp+24h] [bp-5Ch]@4
  NiPoint3 kDir; // [sp+30h] [bp-50h]@4
  CharMgr *v17; // [sp+3Ch] [bp-44h]@1
  float v18; // [sp+40h] [bp-40h]@4
  NiMatrix3 v19; // [sp+44h] [bp-3Ch]@4
  char pcName[4]; // [sp+68h] [bp-18h]@4
  int v21; // [sp+6Ch] [bp-14h]@4
  int v22; // [sp+70h] [bp-10h]@4
  int v23; // [sp+74h] [bp-Ch]@4
  char v24; // [sp+78h] [bp-8h]@4

  v2 = 0;
  v3 = p->nPetCnt == 0;
  v17 = this;
  if ( v3 )
  {
LABEL_6:
    v13 = 1;
  }
  else
  {
    v4 = p + 24;
    while ( *(_DWORD *)&v4[-21].nPetCnt != -1 )
    {
      fX = (double)*(unsigned int *)&v4[-17].nPetCnt;
      fY = (double)*(unsigned int *)&v4[-13].nPetCnt;
      World::GetAdvGroundPos(&g_kWorld, fX, fY, &kTargetPos);
      LODWORD(v18) = v4[-9].nPetCnt;
      v18 = (double)SLODWORD(v18) * (NI_PI + NI_PI) / 180.0;
      NiMatrix3::MakeZRotation(&v19, v18);
      NiMatrix3::operator*(&v19, &result, &World::ms_kNorthDir);
      kDir.y = result.y;
      v7 = *(_DWORD *)&v4[-4].nPetCnt;
      kDir.x = result.x;
      v8 = *(_DWORD *)&v4[-8].nPetCnt;
      kDir.z = result.z;
      v9 = *(_DWORD *)&v4->nPetCnt;
      v21 = v7;
      *(_DWORD *)pcName = v8;
      v10 = *(_DWORD *)&v4[4].nPetCnt;
      v22 = v9;
      v11 = *(_WORD *)&v4[-23].nPetCnt;
      v12 = *(_DWORD *)&v4[-21].nPetCnt;
      v23 = v10;
      v24 = 0;
      if ( !CharMgr::AddPet(v17, v12, v11, &kTargetPos, &kDir, pcName) )
        break;
      ++v2;
      v4 += 63;
      if ( v2 >= p->nPetCnt )
        goto LABEL_6;
    }
    v13 = 0;
  }
  return v13;
}
// B622CC: using guessed type const float NI_PI;

//----- (0064D3E0) --------------------------------------------------------
char __thiscall CharMgr::DeleteChar(CharMgr *this, PROTO_NC_MAP_LOGOUT_CMD *p)
{
  NiTListItem<Char *> *v2; // eax@1
  Char *v3; // edx@2
  char result; // al@4

  v2 = this->m_kList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      v2 = v2->m_pkNext;
      if ( v3->m_kHandle == p->handle )
        break;
      if ( !v2 )
        goto LABEL_4;
    }
    CharMgr::DeleteChar(this, v3);
    result = 1;
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}

//----- (0064D420) --------------------------------------------------------
void __thiscall CharMgr::Terminate(CharMgr *this)
{
  CharMgr::RemoveAll(this);
  g_pkMainChar = 0;
}

//----- (0064D430) --------------------------------------------------------
char __thiscall CharMgr::AddMob(CharMgr *this, PROTO_NC_BRIEFINFO_DOOR_CMD *p)
{
  signed int v2; // ebx@1
  PROTO_NC_BRIEFINFO_DOOR_CMD *v3; // esi@2
  float fY; // ST10_4@3
  float fX; // ST0C_4@3
  int v6; // eax@3
  Char *v7; // edi@4
  void (__thiscall *v8)(AbStateInfectee *, ABSTATEINDEX, bool, int); // edx@5
  int v9; // ecx@5
  int v10; // edx@5
  int v11; // eax@5
  int v12; // edx@5
  int v13; // ecx@5
  int v14; // eax@5
  int v15; // ecx@5
  char *v16; // eax@5
  char v17; // cl@6
  char v18; // al@7
  char v19; // al@12
  NiPoint3 kTargetPos; // [sp+18h] [bp-70h]@3
  NiPoint3 result; // [sp+24h] [bp-64h]@3
  CharMgr *v22; // [sp+30h] [bp-58h]@1
  PROTO_NC_BRIEFINFO_DOOR_CMD *v23; // [sp+34h] [bp-54h]@1
  float v24; // [sp+38h] [bp-50h]@3
  NiMatrix3 v25; // [sp+3Ch] [bp-4Ch]@3
  int v26; // [sp+60h] [bp-28h]@5
  int v27; // [sp+64h] [bp-24h]@5
  int v28; // [sp+68h] [bp-20h]@5
  int v29; // [sp+6Ch] [bp-1Ch]@5
  int v30; // [sp+70h] [bp-18h]@5
  int v31; // [sp+74h] [bp-14h]@5
  int v32; // [sp+78h] [bp-10h]@5
  int v33; // [sp+7Ch] [bp-Ch]@5
  char v34; // [sp+80h] [bp-8h]@5

  v2 = 0;
  v22 = this;
  v23 = p;
  if ( p->doornum )
  {
    v3 = p + 23;
    while ( 1 )
    {
      fX = (double)*(unsigned int *)&v3[-18].doornum;
      fY = (double)*(unsigned int *)&v3[-14].doornum;
      World::GetAdvGroundPos(&g_kWorld, fX, fY, &kTargetPos);
      LODWORD(v24) = ((unsigned int)v3[-10].doornum + 90) % 0xB4;
      v24 = (double)SLODWORD(v24) * (NI_PI + NI_PI) / 180.0;
      NiMatrix3::MakeZRotation(&v25, v24);
      NiMatrix3::operator*(&v25, &result, &World::ms_kNorthDir);
      v6 = *(_WORD *)&v3[-20].doornum;
      if ( (_WORD)v6 == -1 )
        break;
      v7 = CharMgr::AddMob(v22, v6, *(_WORD *)&v3[-22].doornum, &kTargetPos, &result, 1, 0);
      if ( !v7 )
        break;
      LODWORD(v24) = *(_WORD *)&v3[24].doornum;
      v8 = v7->vfptr[16].SetAbStateProperty;
      v24 = (double)SLODWORD(v24) / 1000.0;
      ((void (__thiscall *)(Char *, _DWORD))v8)(v7, LODWORD(v24));
      v9 = *(_DWORD *)&v3[-4].doornum;
      v10 = *(_DWORD *)&v3->doornum;
      v26 = *(_DWORD *)&v3[-8].doornum;
      v11 = *(_DWORD *)&v3[4].doornum;
      v28 = v10;
      v12 = *(_DWORD *)&v3[12].doornum;
      v27 = v9;
      v13 = *(_DWORD *)&v3[8].doornum;
      v29 = v11;
      v14 = *(_DWORD *)&v3[16].doornum;
      v31 = v12;
      v30 = v13;
      v15 = *(_DWORD *)&v3[20].doornum;
      v32 = v14;
      v16 = v7->m_szBlockName;
      v33 = v15;
      v34 = 0;
      do
      {
        v17 = v16[(char *)&v26 - v7->m_szBlockName];
        *v16++ = v17;
      }
      while ( v17 );
      v18 = v3[-9].doornum;
      if ( v18 )
      {
        if ( (unsigned __int8)(v18 - 1) <= 1u )
          Char::OpenDoor(v7);
      }
      else
      {
        Char::CloseDoor(v7);
      }
      ++v2;
      v3 += 48;
      if ( v2 >= v23->doornum )
        goto LABEL_12;
    }
    v19 = 0;
  }
  else
  {
LABEL_12:
    v19 = 1;
  }
  return v19;
}
// B622CC: using guessed type const float NI_PI;

//----- (0064D600) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Min(std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *_Pnode)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v2; // ecx@1

  result = _Pnode;
  v2 = _Pnode->_Left;
  if ( !_Pnode->_Left->_Isnil )
  {
    do
    {
      result = v2;
      v2 = v2->_Left;
    }
    while ( !v2->_Isnil );
  }
  return result;
}

//----- (0064D620) --------------------------------------------------------
PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *__thiscall PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD::operator=(PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *this, PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *__that)
{
  PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *result; // eax@1
  char *v3; // esi@1
  signed int v4; // ecx@1

  result = this;
  this->handle = __that->handle;
  *(_QWORD *)&this->charid.n5_name[0] = *(_QWORD *)&__that->charid.n5_name[0];
  *(_QWORD *)&this->charid.n5_code[2] = *(_QWORD *)&__that->charid.n5_code[2];
  this->charid.n5_code[4] = __that->charid.n5_code[4];
  this->coord.xy.x = __that->coord.xy.x;
  this->coord.xy.y = __that->coord.xy.y;
  this->coord.dir = __that->coord.dir;
  this->mode = __that->mode;
  this->chrclass = __that->chrclass;
  this->shape = __that->shape;
  qmemcpy(&this->shapedata, &__that->shapedata, 0x36u);
  qmemcpy(&this->abstatebit, &__that->abstatebit, 0x6Fu);
  v3 = this->sAnimation;
  v4 = 32;
  do
  {
    *v3 = v3[(char *)__that - (char *)result];
    ++v3;
    --v4;
  }
  while ( v4 );
  result->nMoverHnd = __that->nMoverHnd;
  result->nMoverSlot = __that->nMoverSlot;
  result->nKQTeamType = __that->nKQTeamType;
  result->IsUseItemMinimon = __that->IsUseItemMinimon;
  return result;
}

//----- (0064D750) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,Char *>::~NiTListBase<NiTPointerAllocator<unsigned int>,Char *>(NiTListBase<NiTPointerAllocator<unsigned int>,Char *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,Char *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,Char *>::`vftable';
}
// 9B9940: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,Char *>::`vftable')(void *p, char);

//----- (0064D760) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,Char *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,Char *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,Char *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,Char *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,Char *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,Char *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9B9940: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,Char *>::`vftable')(void *p, char);

//----- (0064D790) --------------------------------------------------------
CharMgr::LoadData *__thiscall CharMgr::LoadData::operator=(CharMgr::LoadData *this, CharMgr::LoadData *__that)
{
  CharMgr::LoadData *v2; // esi@1

  v2 = this;
  PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD::operator=(&this->CharData, &__that->CharData);
  v2->pkChar = __that->pkChar;
  v2->kClassID = __that->kClassID;
  v2->byGender = __that->byGender;
  v2->kPos.x = __that->kPos.x;
  v2->kPos.y = __that->kPos.y;
  v2->kPos.z = __that->kPos.z;
  v2->kDir.x = __that->kDir.x;
  v2->kDir.y = __that->kDir.y;
  v2->kDir.z = __that->kDir.z;
  v2->nEquipLevel = __that->nEquipLevel;
  return v2;
}

//----- (0064D820) --------------------------------------------------------
void __thiscall CharMgr::LoadData::LoadData(CharMgr::LoadData *this, Char *_pkChar, char _kClassID, char _byGender, NiPoint3 _kPos, NiPoint3 _kDir, int _nEquipLevel)
{
  *(_QWORD *)&this->CharData.charid.n5_code[3] = 0i64;
  *(_QWORD *)&this->CharData.charid.n5_code[1] = 0i64;
  this->CharData.charid.n5_code[0] = 0;
  this->pkChar = _pkChar;
  this->kClassID = _kClassID;
  this->kPos = _kPos;
  this->byGender = _byGender;
  this->kDir = _kDir;
  this->nEquipLevel = _nEquipLevel;
}

//----- (0064D8A0) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,Char *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,Char *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,Char *> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,Char *> *v2; // edi@1
  NiTListItem<Char *> *v3; // esi@1
  NiTListItem<Char *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,Char *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,Char *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,Char *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,Char *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,Char *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B9940: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,Char *>::`vftable')(void *p, char);
// 9B9950: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,Char *>::`vftable')(void *p, char);

//----- (0064D930) --------------------------------------------------------
void __thiscall NiTPointerList<Char *>::~NiTPointerList<Char *>(NiTPointerList<Char *> *this)
{
  NiTPointerList<Char *> *v1; // edi@1
  NiTListItem<Char *> *v2; // esi@1
  NiTListItem<Char *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,Char *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,Char *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,Char *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,Char *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,Char *>::`vftable';
}
// 9B9940: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,Char *>::`vftable')(void *p, char);
// 9B9950: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,Char *>::`vftable')(void *p, char);

//----- (0064D9B0) --------------------------------------------------------
void __thiscall PgTList<Char *>::~PgTList<Char *>(PgTList<Char *> *this)
{
  PgTList<Char *> *v1; // edi@1
  NiTListItem<Char *> *v2; // esi@1
  NiTListItem<Char *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,Char *>Vtbl *)&PgTList<Char *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,Char *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,Char *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,Char *>::`vftable';
}
// 9B9940: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,Char *>::`vftable')(void *p, char);
// 9B9960: using guessed type int (__thiscall *PgTList<Char *>::`vftable')(void *p, char);

//----- (0064DA30) --------------------------------------------------------
PgTList<Char *> *__thiscall PgTList<Char *>::`vector deleting destructor'(PgTList<Char *> *this, unsigned int a2)
{
  PgTList<Char *> *v2; // edi@1
  NiTListItem<Char *> *v3; // esi@1
  NiTListItem<Char *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,Char *>Vtbl *)&PgTList<Char *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,Char *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,Char *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,Char *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B9940: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,Char *>::`vftable')(void *p, char);
// 9B9960: using guessed type int (__thiscall *PgTList<Char *>::`vftable')(void *p, char);

//----- (0064DAC0) --------------------------------------------------------
void __thiscall std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::_Growmap(std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *this, unsigned int _Count)
{
  std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *v2; // ebx@1
  unsigned int v3; // ecx@1
  unsigned int v4; // edi@1
  unsigned int v5; // eax@3
  unsigned int v6; // esi@8
  unsigned int v7; // eax@8
  CharMgr::LoadData **v8; // ecx@11
  signed int v9; // esi@11
  int v10; // eax@11
  char *v11; // eax@11
  char *v12; // ecx@11
  int v13; // eax@12
  unsigned int v14; // ecx@14
  char *v15; // edi@15
  CharMgr::LoadData **v16; // eax@16
  unsigned int v17; // esi@16
  int v18; // eax@16
  std::exception pExceptionObject; // [sp+8h] [bp-18h]@22
  unsigned int v20; // [sp+14h] [bp-Ch]@11
  unsigned int _Myboff; // [sp+18h] [bp-8h]@8
  char *dst; // [sp+1Ch] [bp-4h]@8

  v2 = this;
  v3 = this->_Mapsize;
  v4 = _Count;
  if ( 15561475 - v3 < _Count )
    std::_Xlength_error("deque<T> too long");
  v5 = v3 >> 1;
  if ( v3 >> 1 < 8 )
    v5 = 8;
  if ( _Count < v5 && v3 <= 15561475 - v5 )
  {
    _Count = v5;
    v4 = v5;
  }
  v6 = v2->_Myoff;
  v7 = v3 + v4;
  _Myboff = v2->_Myoff;
  dst = 0;
  if ( v3 + v4 )
  {
    if ( v7 > 0x3FFFFFFF || (dst = (char *)operator new(4 * v7)) == 0 )
    {
      _Count = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&_Count);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
  }
  v8 = v2->_Map;
  v9 = 4 * v6;
  v20 = 4 * ((signed int)((signed int)v8 + 4 * v2->_Mapsize - (_DWORD)&v8[v9 / 4u]) >> 2);
  memmove(&dst[v9], (char *)&v8[v9 / 4u], v20);
  v11 = (char *)(v20 + v10);
  v12 = (char *)v2->_Map;
  if ( _Myboff > v4 )
  {
    memmove(v11, v12, 4 * ((signed int)(4 * v4) >> 2));
    v16 = v2->_Map;
    v17 = 4 * (((signed int)v16 + v9 - (signed int)&v16[v4]) >> 2);
    memmove(dst, (char *)&v16[v4], v17);
    if ( !v4 )
      goto LABEL_19;
    v14 = v4;
    v15 = (char *)(v17 + v18);
    goto LABEL_18;
  }
  v20 = 4 * (v9 >> 2);
  memmove(v11, v12, v20);
  if ( v4 != _Myboff )
  {
    memset((void *)(v20 + v13), 0, 4 * (v4 - _Myboff));
    v4 = _Count;
  }
  v14 = _Myboff;
  if ( _Myboff )
  {
    v15 = dst;
LABEL_18:
    memset(v15, 0, 4 * v14);
    v4 = _Count;
  }
LABEL_19:
  if ( v2->_Map )
    operator delete(v2->_Map);
  v2->_Mapsize += v4;
  v2->_Map = (CharMgr::LoadData **)dst;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0064DC50) --------------------------------------------------------
std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *__thiscall std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::_Make_iter(std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *this, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *result, std::_Deque_const_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _Where)
{
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *v3; // eax@1

  v3 = result;
  result->_Myproxy = 0;
  result->_Mynextiter = 0;
  if ( this )
  {
    result->_Myproxy = this->_Myproxy;
    result->_Myoff = _Where._Myoff;
  }
  else
  {
    result->_Myoff = _Where._Myoff;
  }
  return v3;
}

//----- (0064DC80) --------------------------------------------------------
std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *__thiscall std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::operator+(std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *this, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *result, int _Off)
{
  std::_Container_proxy ***v3; // edx@1
  std::_Container_base12 *v4; // eax@2
  unsigned int v5; // ecx@4
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *v6; // eax@4
  std::_Container_proxy **v7; // edx@5

  v3 = 0;
  if ( this->_Myproxy )
  {
    v4 = this->_Myproxy->_Mycont;
    if ( v4 )
      v3 = (std::_Container_proxy ***)v4->_Myproxy;
  }
  v5 = _Off + this->_Myoff;
  v6 = result;
  result->_Myproxy = 0;
  result->_Mynextiter = 0;
  result->_Myoff = v5;
  if ( v3 )
  {
    v7 = *v3;
    if ( v7 )
      result->_Myproxy = *v7;
  }
  return v6;
}

//----- (0064DCC0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *_Newnode)
{
  unsigned int v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v6; // edi@4
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v7; // edx@4
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v8; // edx@7
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v9; // edx@9
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v10; // eax@11
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v11; // edx@12
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v12; // esi@12
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v13; // esi@13
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v14; // edx@16
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v15; // esi@18
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v16; // esi@20
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v17; // edx@24
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v18; // esi@24
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v19; // edi@24
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v20; // edi@26
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v21; // edi@28
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v22; // esi@31
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v23; // edx@34
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v24; // esi@34
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v25; // esi@36
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v26; // esi@38
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v27; // edi@44
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v28; // edi@46
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v29; // ecx@52
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *v30; // eax@52

  v5 = this->_Mysize;
  if ( v5 >= 0x1FFFFFFE )
  {
    operator delete(_Newnode);
    std::_Xlength_error("map/set<T> too long");
  }
  this->_Mysize = v5 + 1;
  v6 = _Newnode;
  _Newnode->_Parent = _Wherenode;
  v7 = this->_Myhead;
  if ( _Wherenode == v7 )
  {
    v7->_Parent = _Newnode;
    this->_Myhead->_Left = _Newnode;
    this->_Myhead->_Right = _Newnode;
  }
  else if ( _Addleft )
  {
    _Wherenode->_Left = _Newnode;
    v8 = this->_Myhead;
    if ( _Wherenode == v8->_Left )
      v8->_Left = _Newnode;
  }
  else
  {
    _Wherenode->_Right = _Newnode;
    v9 = this->_Myhead;
    if ( _Wherenode == v9->_Right )
      v9->_Right = _Newnode;
  }
  v10 = _Newnode;
  while ( !v10->_Parent->_Color )
  {
    v11 = v10->_Parent;
    v12 = v11->_Parent;
    if ( v11 == v12->_Left )
    {
      v13 = v12->_Right;
      if ( v13->_Color )
      {
        if ( v10 == v11->_Right )
        {
          v10 = v10->_Parent;
          v14 = v11->_Right;
          v10->_Right = v14->_Left;
          if ( !v14->_Left->_Isnil )
            v14->_Left->_Parent = v10;
          v14->_Parent = v10->_Parent;
          v15 = this->_Myhead;
          if ( v10 == v15->_Parent )
          {
            v15->_Parent = v14;
          }
          else
          {
            v16 = v10->_Parent;
            if ( v10 == v16->_Left )
              v16->_Left = v14;
            else
              v16->_Right = v14;
          }
          v14->_Left = v10;
          v10->_Parent = v14;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Left;
        v17->_Left = v17->_Left->_Right;
        v19 = v18->_Right;
        if ( !v19->_Isnil )
          v19->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v20 = this->_Myhead;
        if ( v17 == v20->_Parent )
        {
          v20->_Parent = v18;
          v18->_Right = v17;
        }
        else
        {
          v21 = v17->_Parent;
          if ( v17 == v21->_Right )
          {
            v21->_Right = v18;
            v18->_Right = v17;
          }
          else
          {
            v21->_Left = v18;
            v18->_Right = v17;
          }
        }
LABEL_50:
        v6 = _Newnode;
        v17->_Parent = v18;
        continue;
      }
      v11->_Color = 1;
      v13->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
    else
    {
      v22 = v12->_Left;
      if ( v22->_Color )
      {
        if ( v10 == v11->_Left )
        {
          v10 = v10->_Parent;
          v23 = v11->_Left;
          v10->_Left = v23->_Right;
          v24 = v23->_Right;
          if ( !v24->_Isnil )
            v24->_Parent = v10;
          v23->_Parent = v10->_Parent;
          v25 = this->_Myhead;
          if ( v10 == v25->_Parent )
          {
            v25->_Parent = v23;
          }
          else
          {
            v26 = v10->_Parent;
            if ( v10 == v26->_Right )
              v26->_Right = v23;
            else
              v26->_Left = v23;
          }
          v23->_Right = v10;
          v10->_Parent = v23;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Right;
        v17->_Right = v18->_Left;
        if ( !v18->_Left->_Isnil )
          v18->_Left->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v27 = this->_Myhead;
        if ( v17 == v27->_Parent )
        {
          v27->_Parent = v18;
        }
        else
        {
          v28 = v17->_Parent;
          if ( v17 == v28->_Left )
            v28->_Left = v18;
          else
            v28->_Right = v18;
        }
        v18->_Left = v17;
        goto LABEL_50;
      }
      v11->_Color = 1;
      v22->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
  }
  v29 = this->_Myhead->_Parent;
  v30 = result;
  result->_Ptr = v6;
  v29->_Color = 1;
  return v30;
}

//----- (0064DEF0) --------------------------------------------------------
std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *__cdecl std::_Move_backward<std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>,std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>>(std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *result, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _First, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _Last, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _Dest)
{
  unsigned int v4; // eax@1
  _DWORD *v5; // ecx@2
  unsigned int v6; // eax@2
  unsigned int v7; // edx@4
  CharMgr::LoadData *v8; // esi@6
  unsigned int v9; // eax@6
  std::_Container_base12 *v10; // edx@7
  std::_Container_proxy *v11; // ecx@9
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *v12; // eax@12
  unsigned int _Last_8; // [sp+20h] [bp+20h]@2

  v4 = _Last._Myoff;
  if ( _First._Myoff != _Last._Myoff )
  {
    do
    {
      v5 = &_Last._Myproxy->_Mycont;
      v6 = v4 - 1;
      _Last._Myoff = v6;
      if ( _Last._Myproxy )
        v5 = &_Last._Myproxy->_Mycont->_Myproxy;
      v7 = v5[2];
      if ( v7 <= v6 )
        v6 -= v7;
      v8 = *(CharMgr::LoadData **)(v5[1] + 4 * v6);
      v9 = _Dest._Myoff-- - 1;
      if ( _Dest._Myproxy )
        v10 = _Dest._Myproxy->_Mycont;
      else
        v10 = 0;
      v11 = v10[2]._Myproxy;
      if ( (unsigned int)v11 <= v9 )
        v9 -= (unsigned int)v11;
      CharMgr::LoadData::operator=((CharMgr::LoadData *)(&v10[1]._Myproxy->_Mycont)[v9], v8);
      v4 = _Last_8;
    }
    while ( _First._Myoff != _Last_8 );
  }
  v12 = result;
  result->_Myproxy = 0;
  result->_Mynextiter = 0;
  if ( !_Dest._Myproxy )
    goto LABEL_15;
  if ( _Dest._Myproxy->_Mycont )
  {
    result->_Myproxy = _Dest._Myproxy->_Mycont->_Myproxy;
LABEL_15:
    result->_Myoff = _Dest._Myoff;
    return v12;
  }
  result->_Myoff = _Dest._Myoff;
  return v12;
}

//----- (0064DF80) --------------------------------------------------------
std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *__cdecl std::_Move<std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>,std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>>(std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *result, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _First, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _Last, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _Dest)
{
  unsigned int v4; // eax@1
  unsigned int i; // ecx@1
  std::_Container_base12 *v6; // edi@3
  std::_Container_proxy *v7; // edx@5
  _DWORD *v8; // edx@7
  unsigned int v9; // esi@9
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *v10; // eax@12

  v4 = _First._Myoff;
  for ( i = _Dest._Myoff; v4 != _Last._Myoff; _First._Myoff = v4 )
  {
    if ( _First._Myproxy )
      v6 = _First._Myproxy->_Mycont;
    else
      v6 = 0;
    v7 = v6[2]._Myproxy;
    if ( (unsigned int)v7 <= v4 )
      v4 -= (unsigned int)v7;
    v8 = &_Dest._Myproxy->_Mycont;
    if ( _Dest._Myproxy )
      v8 = &_Dest._Myproxy->_Mycont->_Myproxy;
    v9 = v8[2];
    if ( v9 <= i )
      i -= v9;
    CharMgr::LoadData::operator=(
      *(CharMgr::LoadData **)(v8[1] + 4 * i),
      (CharMgr::LoadData *)(&v6[1]._Myproxy->_Mycont)[v4]);
    v4 = _First._Myoff + 1;
    i = _Dest._Myoff++ + 1;
  }
  v10 = result;
  result->_Myproxy = 0;
  result->_Mynextiter = 0;
  result->_Myoff = i;
  if ( _Dest._Myproxy )
  {
    if ( _Dest._Myproxy->_Mycont )
      result->_Myproxy = _Dest._Myproxy->_Mycont->_Myproxy;
  }
  return v10;
}

//----- (0064E010) --------------------------------------------------------
void __thiscall std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::push_back(std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *this, CharMgr::LoadData *_Val)
{
  std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *v2; // ebx@1
  unsigned int v3; // esi@3
  unsigned int v4; // eax@3
  CharMgr::LoadData *v5; // eax@6
  CharMgr::LoadData *v6; // edi@8
  std::exception pExceptionObject; // [sp+Ch] [bp-10h]@11
  char *_What; // [sp+18h] [bp-4h]@11

  v2 = this;
  if ( this->_Mapsize <= this->_Mysize + 1 )
    std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::_Growmap(this, 1u);
  v3 = v2->_Mysize + v2->_Myoff;
  v4 = v2->_Mapsize;
  if ( v4 <= v3 )
    v3 -= v4;
  if ( !v2->_Map[v3] )
  {
    v5 = (CharMgr::LoadData *)operator new(0x114u);
    if ( !v5 )
    {
      _What = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&_What);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
    v2->_Map[v3] = v5;
  }
  v6 = v2->_Map[v3];
  if ( v6 )
    qmemcpy(v6, _Val, sizeof(CharMgr::LoadData));
  ++v2->_Mysize;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0064E0B0) --------------------------------------------------------
CharMgr::LoadData *__thiscall std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::front(std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *this)
{
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *v1; // eax@1
  std::_Container_proxy *v2; // ecx@1
  unsigned int v3; // eax@3
  std::_Container_base12 *v4; // edx@3
  CharMgr::LoadData *v5; // eax@4
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > result; // [sp+0h] [bp-Ch]@1

  v1 = std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::begin(this, &result);
  v2 = v1->_Myproxy;
  if ( v1->_Myproxy )
    v2 = (std::_Container_proxy *)&v2->_Mycont->_Myproxy;
  v3 = v1->_Myoff;
  v4 = v2[1]._Mycont;
  if ( (unsigned int)v4 > v3 )
    v5 = (CharMgr::LoadData *)*((_DWORD *)&v2->_Myfirstiter->_Myproxy + v3);
  else
    v5 = (CharMgr::LoadData *)*((_DWORD *)&v2->_Myfirstiter->_Myproxy + v3 - (_DWORD)v4);
  return v5;
}

//----- (0064E0F0) --------------------------------------------------------
std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *__cdecl std::_Move_backward<std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>,std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>>(std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *result, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _First, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _Last, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _Dest)
{
  std::_Container_proxy *v5; // [sp-28h] [bp-30h]@7
  int v6; // [sp-24h] [bp-2Ch]@7
  unsigned int v7; // [sp-20h] [bp-28h]@10
  std::_Container_proxy *v8; // [sp-1Ch] [bp-24h]@4
  int v9; // [sp-18h] [bp-20h]@4
  unsigned int v10; // [sp-14h] [bp-1Ch]@7
  std::_Container_proxy *v11; // [sp-10h] [bp-18h]@1
  int v12; // [sp-Ch] [bp-14h]@1
  unsigned int v13; // [sp-8h] [bp-10h]@4
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *v14; // [sp-4h] [bp-Ch]@1
  std::_Container_proxy **v15; // [sp+4h] [bp-4h]@1

  v14 = result;
  v11 = 0;
  v12 = 0;
  v15 = &v11;
  if ( _Dest._Myproxy && _Dest._Myproxy->_Mycont )
    v11 = _Dest._Myproxy->_Mycont->_Myproxy;
  v13 = _Dest._Myoff;
  v8 = 0;
  v9 = 0;
  v15 = &v8;
  if ( _Last._Myproxy && _Last._Myproxy->_Mycont )
    v8 = _Last._Myproxy->_Mycont->_Myproxy;
  v10 = _Last._Myoff;
  v5 = 0;
  v6 = 0;
  v15 = &v5;
  if ( _First._Myproxy && _First._Myproxy->_Mycont )
    v5 = _First._Myproxy->_Mycont->_Myproxy;
  v7 = _First._Myoff;
  std::_Move_backward<std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>,std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>>(
    result,
    *(std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *)&v5,
    *(std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *)&v8,
    *(std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *)&v11);
  return result;
}

//----- (0064E180) --------------------------------------------------------
std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *__cdecl std::_Move<std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>,std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>>(std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *result, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _First, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _Last, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _Dest)
{
  std::_Container_proxy *v5; // [sp-28h] [bp-30h]@7
  int v6; // [sp-24h] [bp-2Ch]@7
  unsigned int v7; // [sp-20h] [bp-28h]@10
  std::_Container_proxy *v8; // [sp-1Ch] [bp-24h]@4
  int v9; // [sp-18h] [bp-20h]@4
  unsigned int v10; // [sp-14h] [bp-1Ch]@7
  std::_Container_proxy *v11; // [sp-10h] [bp-18h]@1
  int v12; // [sp-Ch] [bp-14h]@1
  unsigned int v13; // [sp-8h] [bp-10h]@4
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *v14; // [sp-4h] [bp-Ch]@1
  std::_Container_proxy **v15; // [sp+4h] [bp-4h]@1

  v14 = result;
  v11 = 0;
  v12 = 0;
  v15 = &v11;
  if ( _Dest._Myproxy && _Dest._Myproxy->_Mycont )
    v11 = _Dest._Myproxy->_Mycont->_Myproxy;
  v13 = _Dest._Myoff;
  v8 = 0;
  v9 = 0;
  v15 = &v8;
  if ( _Last._Myproxy && _Last._Myproxy->_Mycont )
    v8 = _Last._Myproxy->_Mycont->_Myproxy;
  v10 = _Last._Myoff;
  v5 = 0;
  v6 = 0;
  v15 = &v5;
  if ( _First._Myproxy && _First._Myproxy->_Mycont )
    v5 = _First._Myproxy->_Mycont->_Myproxy;
  v7 = _First._Myoff;
  std::_Move<std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>,std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>>(
    result,
    *(std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *)&v5,
    *(std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *)&v8,
    *(std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *)&v11);
  return result;
}

//----- (0064E210) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *this, std::pair<int const ,int> *_Val)
{
  std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *result; // eax@1
  std::exception pExceptionObject; // [sp+4h] [bp-Ch]@5

  v2 = this;
  result = (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)operator new(0x18u);
  if ( !result )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  result->_Left = v2->_Myhead;
  result->_Parent = v2->_Myhead;
  result->_Right = v2->_Myhead;
  *(_WORD *)&result->_Color = 0;
  if ( result != (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)-12 )
    result->_Myval = *_Val;
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0064E280) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,long>>,0>>::find(std::_Tree<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > > *result, const unsigned __int16 *_Keyval)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *v3; // edx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *v4; // eax@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > > *v5; // eax@8

  v3 = this->_Myhead;
  v4 = v3->_Parent;
  while ( !v4->_Isnil )
  {
    if ( v4->_Myval.first >= *_Keyval )
    {
      v3 = v4;
      v4 = v4->_Left;
    }
    else
    {
      v4 = v4->_Right;
    }
  }
  if ( v3 == this->_Myhead || *_Keyval < v3->_Myval.first )
  {
    v5 = result;
    result->_Ptr = this->_Myhead;
  }
  else
  {
    v5 = result;
    result->_Ptr = v3;
  }
  return v5;
}

//----- (0064E2F0) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned long>>,0>>::_Buynode<std::pair<unsigned short const,unsigned long>>(std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *this, std::pair<unsigned short const ,unsigned long> *_Val)
{
  std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *result; // eax@1
  std::exception pExceptionObject; // [sp+4h] [bp-Ch]@5

  v2 = this;
  result = (std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *)operator new(0x18u);
  if ( !result )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  result->_Left = v2->_Myhead;
  result->_Parent = v2->_Myhead;
  result->_Right = v2->_Myhead;
  *(_WORD *)&result->_Color = 0;
  if ( result != (std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *)-12 )
    result->_Myval = *_Val;
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0064E360) --------------------------------------------------------
void __thiscall std::list<enum  ABSTATEINDEX,std::allocator<enum  ABSTATEINDEX>>::push_back(std::list<enum ABSTATEINDEX,std::allocator<enum ABSTATEINDEX> > *this, ABSTATEINDEX *_Val)
{
  std::list<enum ABSTATEINDEX,std::allocator<enum ABSTATEINDEX> > *v2; // esi@1
  std::_List_nod<enum ABSTATEINDEX,std::allocator<enum ABSTATEINDEX> >::_Node *v3; // edi@1
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v4; // eax@1
  unsigned int v5; // ecx@1

  v2 = this;
  v3 = this->_Myhead;
  v4 = std::_List_val<char *,std::allocator<char *>>::_Buynode(
         (std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *)this->_Myhead,
         (std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *)this->_Myhead->_Prev,
         (ItemViewDummy *const *)_Val);
  v5 = v2->_Mysize;
  if ( 1073741822 - v5 < 1 )
    std::_Xlength_error("list<T> too long");
  v2->_Mysize = v5 + 1;
  v3->_Prev = (std::_List_nod<enum ABSTATEINDEX,std::allocator<enum ABSTATEINDEX> >::_Node *)v4;
  v4->_Prev->_Next = v4;
}

//----- (0064E3B0) --------------------------------------------------------
std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *__thiscall std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::erase(std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *this, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *result, std::_Deque_const_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _First_arg, std::_Deque_const_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _Last_arg)
{
  std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *v4; // esi@1
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *v5; // eax@7
  unsigned int v6; // edi@7
  unsigned int v7; // ebx@7
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *v8; // eax@7
  bool v9; // zf@7
  unsigned int v10; // ecx@15
  unsigned int v11; // eax@30
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *v12; // eax@36
  std::_Container_proxy *v14; // [sp-24h] [bp-5Ch]@14
  int v15; // [sp-20h] [bp-58h]@26
  unsigned int v16; // [sp-1Ch] [bp-54h]@29
  std::_Container_proxy *v17; // [sp-18h] [bp-50h]@11
  int v18; // [sp-14h] [bp-4Ch]@11
  unsigned int v19; // [sp-10h] [bp-48h]@14
  std::_Container_proxy *v20; // [sp-Ch] [bp-44h]@1
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *v21; // [sp-8h] [bp-40h]@1
  int v22; // [sp-4h] [bp-3Ch]@4
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > v23; // [sp+Ch] [bp-2Ch]@7
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _Last; // [sp+18h] [bp-20h]@7
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _First; // [sp+24h] [bp-14h]@4
  std::_Container_proxy **v26; // [sp+30h] [bp-8h]@7
  unsigned int _Off; // [sp+34h] [bp-4h]@1

  v4 = this;
  v20 = 0;
  v21 = 0;
  _Off = (unsigned int)&v20;
  if ( _First_arg._Myproxy && _First_arg._Myproxy->_Mycont )
    v20 = _First_arg._Myproxy->_Mycont->_Myproxy;
  v22 = _First_arg._Myoff;
  std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::_Make_iter(
    this,
    &_First,
    *(std::_Deque_const_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *)&v20);
  v20 = 0;
  v21 = 0;
  _Off = (unsigned int)&v20;
  if ( _Last_arg._Myproxy && _Last_arg._Myproxy->_Mycont )
    v20 = _Last_arg._Myproxy->_Mycont->_Myproxy;
  v22 = _Last_arg._Myoff;
  std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::_Make_iter(
    v4,
    &_Last,
    *(std::_Deque_const_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *)&v20);
  v5 = std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::begin(v4, &v23);
  v6 = _Last._Myoff;
  _Off = _First._Myoff - v5->_Myoff;
  v7 = _Last._Myoff - _First._Myoff;
  v8 = std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::end(v4, &v23);
  v9 = _Off >= v8->_Myoff - v6;
  v26 = &v20;
  v20 = 0;
  v21 = 0;
  if ( v9 )
  {
    if ( _First._Myproxy && _First._Myproxy->_Mycont )
      v20 = _First._Myproxy->_Mycont->_Myproxy;
    v22 = _First._Myoff;
    v26 = &v17;
    std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::end(
      v4,
      (std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *)&v17);
    v14 = 0;
    v15 = 0;
    v26 = &v14;
    if ( _Last._Myproxy && _Last._Myproxy->_Mycont )
      v14 = _Last._Myproxy->_Mycont->_Myproxy;
    v16 = _Last._Myoff;
    std::_Move<std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>,std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>>(
      &v23,
      *(std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *)&v14,
      *(std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *)&v17,
      *(std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *)&v20);
    if ( v7 > 0 )
    {
      v11 = v4->_Mysize;
      do
      {
        if ( v11 )
        {
          if ( !--v11 )
            v4->_Myoff = 0;
        }
        --v7;
      }
      while ( v7 );
      v4->_Mysize = v11;
    }
  }
  else
  {
    if ( _Last._Myproxy && _Last._Myproxy->_Mycont )
      v20 = _Last._Myproxy->_Mycont->_Myproxy;
    v22 = _Last._Myoff;
    v17 = 0;
    v18 = 0;
    v26 = &v17;
    if ( _First._Myproxy && _First._Myproxy->_Mycont )
      v17 = _First._Myproxy->_Mycont->_Myproxy;
    v19 = _First._Myoff;
    v26 = &v14;
    std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::begin(
      v4,
      (std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *)&v14);
    std::_Move_backward<std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>,std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>>(
      &v23,
      *(std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *)&v14,
      *(std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *)&v17,
      *(std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *)&v20);
    if ( v7 > 0 )
    {
      v10 = v4->_Mysize;
      do
      {
        if ( v10 )
        {
          if ( v4->_Mapsize <= ++v4->_Myoff )
            v4->_Myoff = 0;
          if ( !--v10 )
            v4->_Myoff = 0;
        }
        --v7;
      }
      while ( v7 );
      v4->_Mysize = v10;
    }
  }
  v22 = _Off;
  v21 = result;
  v12 = std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::begin(v4, &v23);
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::operator+(v12, v21, v22);
  return result;
}

//----- (0064E590) --------------------------------------------------------
void __thiscall std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::_Tidy(std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *this)
{
  std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *v1; // esi@1
  unsigned int v2; // eax@1
  unsigned int v3; // edi@6
  CharMgr::LoadData **v4; // eax@7
  bool v5; // zf@7
  void **v6; // eax@7

  v1 = this;
  v2 = this->_Mysize;
  if ( v2 )
  {
    do
    {
      if ( v2 )
      {
        this->_Mysize = --v2;
        if ( !v2 )
          this->_Myoff = 0;
      }
    }
    while ( this->_Mysize );
  }
  v3 = this->_Mapsize;
  while ( v3 > 0 )
  {
    v4 = v1->_Map;
    v5 = v4[--v3] == 0;
    v6 = (void **)&v4[v3];
    if ( !v5 )
      operator delete(*v6);
  }
  if ( v1->_Map )
    operator delete(v1->_Map);
  v1->_Map = 0;
  v1->_Mapsize = 0;
}

//----- (0064E600) --------------------------------------------------------
void __thiscall std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::~deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>(std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *this)
{
  std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *v1; // esi@1

  v1 = this;
  std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::_Tidy(this);
  operator delete(v1->_Myproxy);
  v1->_Myproxy = 0;
}

//----- (0064E620) --------------------------------------------------------
std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *__thiscall std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::erase(std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *this, std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *result, std::_Deque_const_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > _Where)
{
  std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *v3; // edi@1
  std::_Container_proxy *v5; // [sp-18h] [bp-24h]@1
  int v6; // [sp-14h] [bp-20h]@1
  unsigned int v7; // [sp-10h] [bp-1Ch]@4
  std::_Deque_const_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > v8; // [sp-Ch] [bp-18h]@1
  _DWORD *v9; // [sp+8h] [bp-4h]@1

  v9 = &v8;
  v3 = this;
  std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::operator+(
    (std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *)&_Where,
    (std::_Deque_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *)&v8,
    1);
  v5 = 0;
  v6 = 0;
  v9 = &v5;
  if ( _Where._Myproxy && _Where._Myproxy->_Mycont )
    v5 = _Where._Myproxy->_Mycont->_Myproxy;
  v7 = _Where._Myoff;
  std::deque<CharMgr::LoadData,std::allocator<CharMgr::LoadData>>::erase(
    v3,
    result,
    *(std::_Deque_const_iterator<CharMgr::LoadData,std::allocator<CharMgr::LoadData> > *)&v5,
    v8);
  return result;
}

//----- (0064E680) --------------------------------------------------------
void __thiscall std::map<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int>>>::~map<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int>>>(std::map<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *> > > *this)
{
  std::map<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *> > > *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *> >,0> >::_Node *v2; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v3; // ST04_4@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > result; // [sp+8h] [bp-14h]@1
  std::map<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *> > > *v5; // [sp+Ch] [bp-10h]@1
  int v6; // [sp+18h] [bp-4h]@1

  v1 = this;
  v5 = this;
  v2 = this->_Myhead;
  v3._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v2->_Left;
  v6 = 0;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)this,
    &result,
    v3,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >)v2);
  operator delete(v1->_Myhead);
}

//----- (0064E6E0) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::_Max(std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *_Pnode)
{
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *i; // ecx@1

  result = _Pnode;
  for ( i = _Pnode->_Right; !i->_Isnil; i = i->_Right )
    result = i;
  return result;
}

//----- (0064E700) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Min(std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *_Pnode)
{
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v2; // ecx@1

  result = _Pnode;
  v2 = _Pnode->_Left;
  if ( !_Pnode->_Left->_Isnil )
  {
    do
    {
      result = v2;
      v2 = v2->_Left;
    }
    while ( !v2->_Isnil );
  }
  return result;
}

//----- (0064E720) --------------------------------------------------------
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>,std::_Iterator_base0>::operator++(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >,std::_Iterator_base0> *this)
{
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >,std::_Iterator_base0> *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v2; // edx@1
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v3; // ecx@2
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v4; // edx@3
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *i; // edx@6

  result = this;
  v2 = this->_Ptr;
  if ( !this->_Ptr->_Isnil )
  {
    v3 = v2->_Right;
    if ( v3->_Isnil )
    {
      for ( i = v2->_Parent; !i->_Isnil; i = i->_Parent )
      {
        if ( result->_Ptr != i->_Right )
          break;
        result->_Ptr = i;
      }
      result->_Ptr = i;
    }
    else
    {
      v4 = v3->_Left;
      if ( !v3->_Left->_Isnil )
      {
        do
        {
          v3 = v4;
          v4 = v4->_Left;
        }
        while ( !v4->_Isnil );
      }
      result->_Ptr = v3;
    }
  }
  return result;
}

//----- (0064E770) --------------------------------------------------------
char **__cdecl Folder::Item()
{
  if ( !Folder::m_bInit )
    Folder::Init();
  return &Folder::m_acItem;
}
// A89130: using guessed type char *Folder::m_acItem;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0064E790) --------------------------------------------------------
char *__cdecl Folder::Ctrl()
{
  if ( !Folder::m_bInit )
    Folder::Init();
  return &Folder::m_acCtrl;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0064E7B0) --------------------------------------------------------
signed int __cdecl CharClass::GetChrClassType(char kClassID)
{
  signed int result; // eax@2

  switch ( kClassID )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      result = 0;
      break;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      result = 2;
      break;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      result = 1;
      break;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      result = 3;
      break;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      result = 4;
      break;
    case 0x1A:
    case 0x1B:
      result = 5;
      break;
    default:
      result = 7;
      break;
  }
  return result;
}

//----- (0064E830) --------------------------------------------------------
void __thiscall NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *this, unsigned int key, NiPointer<PgWinBut> val)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v3; // esi@1
  unsigned int (__thiscall *v4)(NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *, unsigned int); // edx@1
  int v5; // ebx@1
  NiTMapItem<unsigned long,NiPointer<PgWinBut> > *v6; // edi@1
  NiTMapItem<unsigned long,NiPointer<PgWinBut> > *v7; // edi@4
  PgWinBut *v8; // [sp+0h] [bp-20h]@4
  PgWinBut **v9; // [sp+10h] [bp-10h]@4
  int v10; // [sp+1Ch] [bp-4h]@1

  v3 = this;
  v4 = this->vfptr->KeyToHashIndex;
  v10 = 0;
  v5 = ((int (__stdcall *)(unsigned int))v4)(key);
  v6 = v3->m_ppkHashTable[v5];
  if ( v6 )
  {
    while ( !v3->vfptr->IsKeysEqual(v3, key, v6->m_key) )
    {
      v6 = v6->m_pkNext;
      if ( !v6 )
        goto LABEL_4;
    }
    ((void (__thiscall *)(NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *, NiTMapItem<unsigned long,NiPointer<PgWinBut> > *, PgWinBut *))v3->vfptr->ClearValue)(
      v3,
      v6,
      v8);
    v8 = val.m_pObject;
    v9 = &v8;
    if ( val.m_pObject )
      InterlockedIncrement((volatile LONG *)&val.m_pObject->m_uiRefCount);
    ((void (__thiscall *)(NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *, NiTMapItem<unsigned long,NiPointer<PgWinBut> > *, unsigned int))v3->vfptr->SetValue)(
      v3,
      v6,
      key);
  }
  else
  {
LABEL_4:
    v7 = (NiTMapItem<unsigned long,NiPointer<PgWinBut> > *)((int (__thiscall *)(NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *, PgWinBut *))v3->vfptr->NewItem)(
                                                             v3,
                                                             v8);
    v8 = val.m_pObject;
    v9 = &v8;
    if ( val.m_pObject )
      InterlockedIncrement((volatile LONG *)&val.m_pObject->m_uiRefCount);
    ((void (__thiscall *)(NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *, NiTMapItem<unsigned long,NiPointer<PgWinBut> > *, unsigned int))v3->vfptr->SetValue)(
      v3,
      v7,
      key);
    v7->m_pkNext = v3->m_ppkHashTable[v5];
    v3->m_ppkHashTable[v5] = v7;
    ++v3->m_kAllocator.m_uiCount;
  }
  v10 = -1;
  if ( val.m_pObject && !InterlockedDecrement((volatile LONG *)&val.m_pObject->m_uiRefCount) )
  {
    if ( val.m_pObject )
      val.m_pObject->vfptr->__vecDelDtor((NiRefObject *)val.m_pObject, 1u);
  }
}

//----- (0064E960) --------------------------------------------------------
void __thiscall FindCullUpdateNode::~FindCullUpdateNode(FindRoomNode *this)
{
  this->vfptr = (Ns_TourSceneVtbl *)&Ns_TourScene::`vftable';
}
// 9B8DD0: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *Ns_TourScene::`vftable')(Ns_TourScene *this, NiAVObject *_pkObject, void *);

//----- (0064E970) --------------------------------------------------------
void __thiscall CharResMgr::RemoveAllMobActor(CharResMgr *this)
{
  CharResMgr *v1; // esi@1

  v1 = this;
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kMobActorMap);
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kRidePetMap);
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kMoverMap);
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kPetMap);
}

//----- (0064E9A0) --------------------------------------------------------
void __thiscall CharResMgr::RemoveAllCharSet(CharResMgr *this)
{
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kCharSetMap);
}

//----- (0064E9B0) --------------------------------------------------------
void __thiscall CharResMgr::RemoveAllHair(CharResMgr *this)
{
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kHairMap);
}

//----- (0064E9C0) --------------------------------------------------------
void __thiscall CharResMgr::RemoveAllFace(CharResMgr *this)
{
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kFaceMap);
}

//----- (0064E9D0) --------------------------------------------------------
void __thiscall CharResMgr::RemoveAllDropItem(CharResMgr *this)
{
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kDropItemMap);
}

//----- (0064E9E0) --------------------------------------------------------
void __thiscall CharResMgr::RemoveAllItemUpgradeTextureEffect(CharResMgr *this)
{
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kItemUpgradeTextureEffectMap);
}

//----- (0064E9F0) --------------------------------------------------------
void __thiscall CharResMgr::RemoveAllHairDetailTexture(CharResMgr *this)
{
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kHairDetailTextureMap);
}

//----- (0064EA00) --------------------------------------------------------
void __thiscall CharResMgr::RemoveAllFaceTexture(CharResMgr *this)
{
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kFaceTextureMap);
}

//----- (0064EA10) --------------------------------------------------------
void __thiscall CharResMgr::RemoveAllFaceTattoo(CharResMgr *this)
{
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kFaceTattooMap);
}

//----- (0064EA20) --------------------------------------------------------
void __thiscall CharResMgr::RemoveAllClosedEye(CharResMgr *this)
{
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kClosedEyeMap);
}

//----- (0064EA30) --------------------------------------------------------
void __thiscall CharResMgr::RemoveAllSetTexture(CharResMgr *this)
{
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kSetTextureMap);
}

//----- (0064EA40) --------------------------------------------------------
void __thiscall CharResMgr::RemoveAllController(CharResMgr *this)
{
  CharResMgr *v1; // edi@1
  NiTransformController *v2; // esi@1

  v1 = this;
  v2 = this->m_spDamageContrl.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
    v1->m_spDamageContrl.m_pObject = 0;
  }
}

//----- (0064EA80) --------------------------------------------------------
void __thiscall CharResMgr::RemoveQuestInfo(CharResMgr *this)
{
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kQuestInfoMap);
}

//----- (0064EA90) --------------------------------------------------------
void __thiscall BonePartitionReCreate::BonePartitionReCreate(BonePartitionReCreate *this, int BoneNum)
{
  this->m_pCallBack = 0;
  this->m_nCurLevel = -1;
  this->vfptr = (Ns_TourSceneVtbl *)&BonePartitionReCreate::`vftable';
  this->m_nBoneNum = BoneNum;
}
// 9BA028: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *BonePartitionReCreate::`vftable')(BonePartitionReCreate *this, NiAVObject *_pkObject, void *);

//----- (0064EAC0) --------------------------------------------------------
NiActorManager *__thiscall CharResMgr::GetPigeonActor(CharResMgr *this)
{
  CharResMgr *v1; // ebx@1
  NiActorManager *v2; // ecx@1
  NiActorManager *result; // eax@2
  NiActorManager *v4; // eax@5
  NiActorManager *v5; // edi@5
  NiActorManager *v6; // esi@6
  char acFileName[260]; // [sp+4h] [bp-108h]@5

  v1 = this;
  v2 = this->m_spPigeonActor.m_pObject;
  if ( v2 )
  {
    result = NiActorManager::Clone(v2);
  }
  else
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    sprintf(acFileName, "%s%s\\%s.kfm", &Folder::m_acCharacter, "LetterWing", "LetterWing");
    v4 = NiActorManager::Create(acFileName, 0, 1, 0);
    v5 = v4;
    if ( v4 )
    {
      v6 = v1->m_spPigeonActor.m_pObject;
      if ( v6 != v4 )
      {
        if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
        {
          if ( v6 )
            v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
        }
        v1->m_spPigeonActor.m_pObject = v5;
        InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
      }
      NiObjectNET::ms_eCopyType = 1;
      result = NiActorManager::Clone(v5);
    }
    else
    {
      result = 0;
    }
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (0064EBB0) --------------------------------------------------------
char __thiscall CharResMgr::CreateAnimationController(CharResMgr *this)
{
  CharResMgr *v1; // ebx@1
  const char *v2; // eax@3
  NiTimeController *v3; // eax@4
  NiTransformController *v4; // esi@4
  NiTransformController *v5; // edi@4
  NiTransformController *v6; // eax@11
  NiNode *v7; // esi@12
  NiNode *v9; // eax@17
  NiNode *v10; // eax@18
  NiNode *v11; // edi@18
  NiNode *v12; // esi@20
  NiNode *v13; // esi@28
  NiPointer<NiNode> spNode; // [sp+14h] [bp-10h]@1
  int v15; // [sp+20h] [bp-4h]@1

  v1 = this;
  spNode.m_pObject = 0;
  v15 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v2 = Folder::Merge(&Folder::m_acCtrl, "CharDamageShake.nif");
  PgUtil::LoadNodeNifFile(v2, &spNode, 0);
  if ( !spNode.m_pObject )
    return 0;
  v3 = PgUtil::GetControllerWithChild((NiAVObject *)&spNode.m_pObject->vfptr, &NiTransformController::m_RTTI);
  v4 = v1->m_spDamageContrl.m_pObject;
  v5 = (NiTransformController *)v3;
  if ( (NiTimeController *)v4 != v3 )
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spDamageContrl.m_pObject = v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  }
  v6 = v1->m_spDamageContrl.m_pObject;
  if ( !v6 )
  {
    v7 = spNode.m_pObject;
    v15 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v7 )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    }
    return 0;
  }
  v6->m_uFlags = v6->m_uFlags & 0xFFF7 | 1;
  v9 = (NiNode *)operator new(0xE8u);
  LOBYTE(v15) = 1;
  if ( v9 )
  {
    NiNode::NiNode(v9, 0);
    v11 = v10;
  }
  else
  {
    v11 = 0;
  }
  v12 = v1->m_spCharShakeNode.m_pObject;
  LOBYTE(v15) = 0;
  if ( v12 != v11 )
  {
    if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
      v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
    v1->m_spCharShakeNode.m_pObject = v11;
    if ( v11 )
      InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
  }
  ((void (__stdcall *)(NiNode *))v1->m_spDamageContrl.m_pObject->vfptr[18].__vecDelDtor)(v1->m_spCharShakeNode.m_pObject);
  v15 = -1;
  if ( spNode.m_pObject )
  {
    v13 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v13 )
        v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
    }
  }
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0064ED90) --------------------------------------------------------
char __thiscall CharResMgr::CreateCharShakeNode(CharResMgr *this)
{
  CharResMgr *v1; // edi@1
  const char *v2; // eax@3
  NiNode *v3; // eax@3
  NiAVObject *v4; // esi@3
  NiNode *v5; // edi@4
  NiTimeController *v6; // eax@10
  volatile LONG *v8; // [sp-4h] [bp-28h]@10
  CharResMgr *v9; // [sp+10h] [bp-14h]@1

  v1 = this;
  v9 = this;
  if ( !Folder::m_bInit )
    Folder::Init();
  v2 = Folder::Merge(&Folder::m_acCtrl, "CharDamageShake.nif");
  v3 = PgUtil::LoadNifFile(v2, 0);
  v4 = (NiAVObject *)v3;
  if ( !v3 )
    return 0;
  InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v5 = v1->m_spCharShakeNode.m_pObject;
  if ( (NiAVObject *)v5 != v4 )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v9->m_spCharShakeNode.m_pObject = (NiNode *)v4;
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  }
  v6 = PgUtil::GetControllerWithChild(v4, &NiTransformController::m_RTTI);
  v8 = (volatile LONG *)&v4->m_uiRefCount;
  if ( !v6 )
  {
    if ( !InterlockedDecrement(v8) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v6->m_uFlags = v6->m_uFlags & 0xFFF7 | 1;
  if ( !InterlockedDecrement(v8) )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0064EEC0) --------------------------------------------------------
NiShader *__thiscall CharResMgr::GetCharShakeNode(CharResMgr *this)
{
  NiNode *v1; // ecx@1
  NiShader *v2; // eax@2
  NiShader *result; // eax@2

  v1 = this->m_spCharShakeNode.m_pObject;
  if ( v1 )
  {
    v2 = (NiShader *)NiObject::Clone((NiObject *)&v1->vfptr);
    result = CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v2);
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0064EEF0) --------------------------------------------------------
signed int __thiscall BonePartitionReCreate::ProcessData(BonePartitionReCreate *this, NiAVObject *_pkObject, void *_pData)
{
  BonePartitionReCreate *v3; // edi@1
  NiShader *v4; // eax@2
  NiShader *v5; // esi@2
  unsigned int v6; // eax@3
  NiTriBasedGeomData *v7; // eax@5

  v3 = this;
  if ( _pkObject )
  {
    v4 = CPostProcessEffect::DynamicCast(&NiTriBasedGeom::m_RTTI, (NiShader *)_pkObject);
    v5 = v4;
    if ( v4 )
    {
      v6 = v4[11].m_uiImplementation;
      if ( v6 )
      {
        if ( *(_DWORD *)(v6 + 12) )
        {
          v7 = (NiTriBasedGeomData *)CPostProcessEffect::DynamicCast(
                                       &NiTriBasedGeomData::m_RTTI,
                                       (NiShader *)v5[11].m_pszName);
          if ( v7 )
            NiSkinPartition::MakePartitions(
              *(NiSkinPartition **)(v5[11].m_uiImplementation + 12),
              v7,
              *(NiSkinData **)(v5[11].m_uiImplementation + 8),
              v3->m_nBoneNum,
              4,
              1);
        }
      }
    }
  }
  return 1;
}

//----- (0064EF70) --------------------------------------------------------
NiNode *__thiscall CharResMgr::GetQuestInfo(CharResMgr *this, unsigned int dwQuestInfo, bool bLowRepeat)
{
  CharResMgr *v3; // edi@1
  NiNode *result; // eax@1
  NiNode *v5; // esi@13
  const char *v6; // [sp-8h] [bp-120h]@8
  char *v7; // [sp-4h] [bp-11Ch]@3
  char **v8; // [sp+Ch] [bp-10Ch]@14
  char acFileName[260]; // [sp+10h] [bp-108h]@4

  v3 = this;
  result = CharResMgr::GetQuestInfoFromMap(this, dwQuestInfo);
  if ( !result )
  {
    switch ( dwQuestInfo )
    {
      case 4u:
        v7 = Folder::System();
        if ( bLowRepeat )
          sprintf(acFileName, "%sGetQuestLowLevel.nif", v7);
        else
          sprintf(acFileName, "%sGetQuest.nif", v7);
        goto LABEL_13;
      case 5u:
      case 0x14u:
        if ( !Folder::m_bInit )
          Folder::Init();
        v7 = &Folder::m_acSystem;
        v6 = "%sGetQuest.nif";
        goto LABEL_12;
      case 6u:
        v7 = Folder::System();
        sprintf(acFileName, "%sIngQuest.nif", v7);
        goto LABEL_13;
      case 8u:
        v7 = Folder::System();
        sprintf(acFileName, "%sFinQuest.nif", v7);
        goto LABEL_13;
      case 9u:
        v7 = Folder::System();
        v6 = "%sGetQuestLowLevel.nif";
LABEL_12:
        sprintf(acFileName, v6, v7);
LABEL_13:
        v7 = (char *)1;
        v5 = PgUtil::LoadNifFile(acFileName, 0);
        if ( !v5 )
          goto LABEL_15;
        v8 = &v7;
        v7 = (char *)v5;
        InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
        NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
          (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v3->m_kQuestInfoMap,
          dwQuestInfo,
          (NiPointer<PgWinBut>)v7);
        result = (NiNode *)NiObject::Clone((NiObject *)&v5->vfptr);
        break;
      default:
LABEL_15:
        result = 0;
        break;
    }
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0064F0D0) --------------------------------------------------------
NiActorManager *__thiscall CharResMgr::GetRidePetActor(CharResMgr *this, unsigned __int16 kPetID)
{
  NiActorManager *result; // eax@1
  RIDING *v3; // edi@2
  int v4; // esi@5
  NiActorManager *v5; // ebx@5
  const char *v6; // edi@8
  NiSourceTexture *v7; // eax@8
  NiSourceTexture *v8; // esi@8
  NiNode *v9; // eax@17
  NiActorManager *v10; // edi@19
  NiPointer<PgWinBut> v11; // [sp-4h] [bp-144h]@8
  NiPointer<PgWinBut> *v12; // [sp+10h] [bp-130h]@19
  ResetTexture kResetTexture; // [sp+14h] [bp-12Ch]@18
  unsigned int key; // [sp+20h] [bp-120h]@2
  NiPointer<NiSourceTexture> spTexture; // [sp+24h] [bp-11Ch]@8
  CharResMgr *v16; // [sp+28h] [bp-118h]@1
  char acFileName[260]; // [sp+2Ch] [bp-114h]@5
  int v18; // [sp+13Ch] [bp-4h]@10

  v16 = this;
  result = CharResMgr::GetRidePetActorFromMap(this, kPetID);
  if ( !result )
  {
    key = kPetID;
    v3 = RidePetTable::GetByID(kPetID);
    if ( !v3 )
      goto LABEL_26;
    if ( !Folder::m_bInit )
      Folder::Init();
    v4 = (int)v3->Shape;
    sprintf(acFileName, "%s%s\\%s.kfm", &Folder::m_acCharacter, v3->Shape, v3->Shape);
    v5 = NiActorManager::Create(acFileName, 0, 1, 0);
    if ( v5 )
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      v6 = v3->Texture;
      v11.m_pObject = (PgWinBut *)v6;
      sprintf(acFileName, "%s%s\\%s.dds", &Folder::m_acCharacter, v4, v6);
      v7 = NiSourceTexture::Create(acFileName, &NiSourceTexture::ms_kDefaultPrefs, 0);
      v8 = v7;
      spTexture.m_pObject = v7;
      if ( v7 )
        InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
      v18 = 0;
      if ( !strcmp(v6, "-") || !strcmp(v6, (const char *)&unk_9B99B6) )
      {
        if ( v8 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
            v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
          v8 = 0;
          spTexture.m_pObject = 0;
        }
      }
      else if ( v8 )
      {
        v9 = (NiNode *)v5->m_spNIFRoot.m_pObject;
        if ( v9 )
        {
          kResetTexture.m_pCallBack = 0;
          kResetTexture.m_nCurLevel = -1;
          kResetTexture.vfptr = (Ns_TourSceneVtbl *)&ResetTexture::`vftable';
          LOBYTE(v18) = 1;
          Ns_TourScene::TourScene((Ns_TourScene *)&kResetTexture.vfptr, v9, &NiAVObject::m_RTTI, v8);
          LOBYTE(v18) = 0;
          kResetTexture.vfptr = (Ns_TourSceneVtbl *)&Ns_TourScene::`vftable';
        }
      }
      v11.m_pObject = (PgWinBut *)v5;
      v12 = &v11;
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v16->m_kRidePetMap,
        key,
        v11);
      NiObjectNET::ms_eCopyType = 1;
      v10 = NiActorManager::Clone(v5);
      v18 = -1;
      if ( v8 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      }
      result = v10;
    }
    else
    {
LABEL_26:
      result = 0;
    }
  }
  return result;
}
// 9B8DD0: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *Ns_TourScene::`vftable')(Ns_TourScene *this, NiAVObject *_pkObject, void *);
// 9BA020: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *ResetTexture::`vftable')(ResetTexture *this, NiAVObject *_pkObject, void *);
// A8975C: using guessed type bool Folder::m_bInit;
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (0064F330) --------------------------------------------------------
NiActorManager *__thiscall CharResMgr::GetMobActor(CharResMgr *this, unsigned __int16 kMobID)
{
  NiActorManager *result; // eax@1
  MobViewInfo *v3; // eax@2
  int v4; // esi@2
  MobViewInfo *v5; // edi@2
  MobInfo **v6; // eax@6
  int v7; // esi@12
  const char *v8; // edi@14
  NiSourceTexture *v9; // ebx@14
  NiD3DDefaultShader *v10; // eax@16
  NiActorManager *v11; // edi@17
  NiNode *v12; // eax@18
  unsigned int v13; // esi@20
  NiActorManager *v14; // esi@20
  NiPointer<PgWinBut> v15; // [sp-4h] [bp-148h]@14
  ResetTexture kResetTexture; // [sp+10h] [bp-134h]@19
  CharResMgr *v17; // [sp+1Ch] [bp-128h]@1
  NiPointer<NiSourceTexture> spTexture; // [sp+20h] [bp-124h]@14
  NiPointer<PgWinBut> *v19; // [sp+24h] [bp-120h]@1
  MobInfo *pkMobInfo; // [sp+28h] [bp-11Ch]@3
  NiActorManager *pkActor; // [sp+2Ch] [bp-118h]@12
  char acFileName[260]; // [sp+30h] [bp-114h]@12
  int v23; // [sp+140h] [bp-4h]@14

  v17 = this;
  v19 = (NiPointer<PgWinBut> *)kMobID;
  result = CharResMgr::GetMobActorFromMap(this, kMobID);
  if ( result )
    return result;
  v3 = MobViewInfoTab::GetByID(kMobID);
  v4 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
  v5 = v3;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 16))(
                          ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                          kMobID) )
  {
    if ( kMobID <= *(_WORD *)(v4 + 200) )
    {
      v6 = (MobInfo **)(*(_DWORD *)(v4 + 196) + 4 * kMobID);
      if ( *v6 )
        pkMobInfo = *v6;
      else
        pkMobInfo = 0;
    }
    else
    {
      pkMobInfo = 0;
    }
  }
  else
  {
    pkMobInfo = 0;
  }
  if ( !v5 )
    return 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v7 = (int)v5->FileName;
  sprintf(acFileName, "%s%s\\%s.kfm", &Folder::m_acCharacter, v5->FileName, v5->FileName);
  *(float *)&pkActor = COERCE_FLOAT(NiActorManager::Create(acFileName, 0, 1, 0));
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = v5->Texture;
  v15.m_pObject = (PgWinBut *)v8;
  sprintf(acFileName, "%s%s\\%s.dds", &Folder::m_acCharacter, v7, v8);
  v9 = 0;
  spTexture.m_pObject = 0;
  v23 = 0;
  if ( strcmp(v8, "-") && strcmp(v8, (const char *)&unk_9B99D6) )
  {
    v10 = (NiD3DDefaultShader *)NiSourceTexture::Create(acFileName, &NiSourceTexture::ms_kDefaultPrefs, 0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&spTexture, v10);
    v9 = spTexture.m_pObject;
  }
  v11 = pkActor;
  if ( *(float *)&pkActor == 0.0 )
  {
    v23 = -1;
    if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    return 0;
  }
  v12 = (NiNode *)pkActor->m_spNIFRoot.m_pObject;
  *(float *)&pkActor = (double)pkMobInfo->Size / 1000.0;
  *(float *)&pkActor = fabs(*(float *)&pkActor);
  v12->m_kLocal.m_fScale = *(float *)&pkActor;
  if ( v9 )
  {
    kResetTexture.m_pCallBack = 0;
    kResetTexture.m_nCurLevel = -1;
    kResetTexture.vfptr = (Ns_TourSceneVtbl *)&ResetTexture::`vftable';
    LOBYTE(v23) = 1;
    Ns_TourScene::TourScene((Ns_TourScene *)&kResetTexture.vfptr, v12, &NiAVObject::m_RTTI, v9);
    LOBYTE(v23) = 0;
    kResetTexture.vfptr = (Ns_TourSceneVtbl *)&Ns_TourScene::`vftable';
  }
  v13 = (unsigned __int16)v19;
  v15.m_pObject = (PgWinBut *)v11;
  v19 = &v15;
  InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
  NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
    (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v17->m_kMobActorMap,
    v13,
    v15);
  NiObjectNET::ms_eCopyType = 1;
  v14 = NiActorManager::Clone(v11);
  v23 = -1;
  if ( v9 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
  }
  return v14;
}
// 9B8DD0: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *Ns_TourScene::`vftable')(Ns_TourScene *this, NiAVObject *_pkObject, void *);
// 9BA020: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *ResetTexture::`vftable')(ResetTexture *this, NiAVObject *_pkObject, void *);
// A8975C: using guessed type bool Folder::m_bInit;
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (0064F630) --------------------------------------------------------
CharSet *__thiscall CharResMgr::GetCharSet(CharResMgr *this, char kClassID, char byGender, unsigned __int16 wNo)
{
  char v4; // bl@2
  CharSet *result; // eax@9
  NiUnsharedGeometryGroup *v6; // ST0C_4@14
  NiUnsharedGeometryGroup *v7; // ST0C_4@21
  CharSet *v8; // edi@26
  NiNode *v9; // eax@26
  NiNode *v10; // esi@26
  CharSet *v11; // eax@27
  CharSet *v12; // eax@28
  int v13; // esi@29
  const char *v14; // [sp-10h] [bp-140h]@17
  char *v15; // [sp-Ch] [bp-13Ch]@17
  NiUnsharedGeometryGroup *v16; // [sp-8h] [bp-138h]@17
  NiUnsharedGeometryGroup *v17; // [sp-4h] [bp-134h]@14
  CharResMgr *v18; // [sp+10h] [bp-120h]@1
  NiUnsharedGeometryGroup **v19; // [sp+14h] [bp-11Ch]@1
  char v20[4]; // [sp+18h] [bp-118h]@9
  char acFileName[260]; // [sp+1Ch] [bp-114h]@14
  int v22; // [sp+12Ch] [bp-4h]@27

  v18 = this;
  v19 = (NiUnsharedGeometryGroup **)wNo;
  switch ( kClassID )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      v4 = 1;
      break;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      v4 = 6;
      break;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      v4 = 11;
      break;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      v4 = 16;
      break;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      v4 = 21;
      break;
    case 0x1A:
    case 0x1B:
      v4 = 26;
      break;
    default:
      v4 = 0;
      break;
  }
  v20[0] = v4;
  result = CharResMgr::GetCharSetFromMap(this, v4, byGender, wNo);
  if ( !result )
  {
    if ( byGender == 1 )
    {
      if ( !wNo )
      {
        if ( !Folder::m_bInit )
          Folder::Init();
        v17 = CharClass::GetBaseEngName(v20[0]);
        v6 = CharClass::GetBaseEngName(v20[0]);
        sprintf(acFileName, "%s%s-m\\%s-m.nif", &Folder::m_acCharacter, v6, v17);
        goto LABEL_26;
      }
      if ( !Folder::m_bInit )
        Folder::Init();
      v17 = (NiUnsharedGeometryGroup *)wNo;
      v16 = CharClass::GetBaseEngName(v20[0]);
      v15 = &Folder::m_acCharacter;
      v14 = "%s%s-m\\set%03d.nif";
    }
    else
    {
      if ( !wNo )
      {
        if ( !Folder::m_bInit )
          Folder::Init();
        v17 = CharClass::GetBaseEngName(v20[0]);
        v7 = CharClass::GetBaseEngName(v20[0]);
        sprintf(acFileName, "%s%s-f\\%s-f.nif", &Folder::m_acCharacter, v7, v17);
        goto LABEL_26;
      }
      if ( !Folder::m_bInit )
        Folder::Init();
      v17 = (NiUnsharedGeometryGroup *)wNo;
      v16 = CharClass::GetBaseEngName(v20[0]);
      v15 = &Folder::m_acCharacter;
      v14 = "%s%s-f\\set%03d.nif";
    }
    sprintf(acFileName, v14, v15, v16, v17);
LABEL_26:
    v17 = (NiUnsharedGeometryGroup *)1;
    v8 = 0;
    v9 = PgUtil::LoadNifFile(acFileName, 0);
    v10 = v9;
    if ( v9 )
    {
      NiObjectNET::SetName((NiObjectNET *)&v9->vfptr, "CharSet");
      v11 = (CharSet *)operator new(0x34u);
      *(_DWORD *)v20 = v11;
      v22 = 0;
      if ( v11 )
      {
        CharSet::CharSet(v11);
        v8 = v12;
      }
      v22 = -1;
      CharSet::Init(v8, v10);
      v13 = (unsigned __int16)v19 | (((unsigned __int8)byGender | ((unsigned __int8)v4 << 8)) << 16);
      v19 = &v17;
      v17 = (NiUnsharedGeometryGroup *)v8;
      if ( v8 )
        InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v18->m_kCharSetMap,
        v13,
        (NiPointer<PgWinBut>)v17);
      result = v8;
    }
    else
    {
      result = 0;
    }
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0064F8C0) --------------------------------------------------------
NiShaderLibrary *__thiscall CharResMgr::GetHairDetailTexture(CharResMgr *this, unsigned int dwID, const char *pchFileName)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v3; // edi@1
  NiShaderLibrary *v4; // esi@1
  NiImageConverter *v5; // eax@6
  NiPixelData *v6; // eax@6
  NiSourceTexture *v7; // eax@8
  const char *v9; // [sp-4h] [bp-138h]@6
  NiTexture::FormatPrefs kPrefs; // [sp+10h] [bp-124h]@8
  NiPointer<NiShaderLibrary> val; // [sp+1Ch] [bp-118h]@1
  char acFileName[260]; // [sp+20h] [bp-114h]@6
  int v13; // [sp+130h] [bp-4h]@1

  val.m_pObject = 0;
  v13 = 0;
  v3 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kHairDetailTextureMap;
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kHairDetailTextureMap,
    (const char *)dwID,
    &val);
  v4 = val.m_pObject;
  v13 = -1;
  if ( val.m_pObject )
  {
    if ( !InterlockedDecrement((volatile LONG *)&val.m_pObject->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  }
  else
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    v9 = pchFileName;
    sprintf(acFileName, "%sHDetail\\%s.tga", &Folder::m_acCharacter, pchFileName);
    v5 = NiImageConverter::GetImageConverter();
    v6 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v5->vfptr[2].__vecDelDtor)(
                          v5,
                          acFileName,
                          0);
    if ( v6 )
    {
      kPrefs.m_ePixelLayout = 6;
      kPrefs.m_eAlphaFmt = 3;
      kPrefs.m_eMipMapped = 0;
      v7 = NiSourceTexture::Create(v6, &kPrefs);
      v4 = (NiShaderLibrary *)v7;
      if ( v7 )
      {
        NiObjectNET::SetName((NiObjectNET *)&v7->vfptr, "HairDetailTexture");
        val.m_pObject = (NiShaderLibrary *)&v9;
        v9 = (const char *)v4;
        InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
        NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
          v3,
          dwID,
          (NiPointer<PgWinBut>)v9);
      }
    }
    else
    {
      v4 = 0;
    }
  }
  return v4;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0064FA10) --------------------------------------------------------
NiNode *__thiscall CharResMgr::GetFace(CharResMgr *this, char kClassID, char byGender, unsigned __int16 wFaceType)
{
  char v4; // bl@2
  NiNode *result; // eax@9
  NiUnsharedGeometryGroup *v6; // ST0C_4@13
  NiUnsharedGeometryGroup *v7; // ST0C_4@16
  NiNode *v8; // eax@17
  NiObject *v9; // edi@17
  int v10; // esi@18
  int v11; // esi@18
  NiPointer<PgWinBut> v12; // [sp-4h] [bp-124h]@17
  CharResMgr *v13; // [sp+Ch] [bp-114h]@1
  char v14[4]; // [sp+10h] [bp-110h]@1
  char v15[4]; // [sp+14h] [bp-10Ch]@13
  char acFileName[260]; // [sp+18h] [bp-108h]@13

  v13 = this;
  v14[0] = byGender;
  switch ( kClassID )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      v4 = 1;
      break;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      v4 = 6;
      break;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      v4 = 11;
      break;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      v4 = 16;
      break;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      v4 = 21;
      break;
    case 0x1A:
    case 0x1B:
      v4 = 26;
      break;
    default:
      v4 = 0;
      break;
  }
  result = CharResMgr::GetFaceFromMap(this, v4, v14[0], wFaceType);
  if ( !result )
  {
    if ( v14[0] == 1 )
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      *(_DWORD *)v15 = wFaceType;
      v6 = CharClass::GetBaseEngName(v4);
      sprintf(acFileName, "%s%s-m\\Face%03d.nif", &Folder::m_acCharacter, v6, wFaceType);
    }
    else
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      *(_DWORD *)v15 = wFaceType;
      v7 = CharClass::GetBaseEngName(v4);
      sprintf(acFileName, "%s%s-f\\Face%03d.nif", &Folder::m_acCharacter, v7, wFaceType);
    }
    v12.m_pObject = (PgWinBut *)1;
    v8 = PgUtil::LoadNifFile(acFileName, 0);
    v9 = (NiObject *)v8;
    if ( v8 )
    {
      NiObjectNET::SetName((NiObjectNET *)&v8->vfptr, "Face");
      v10 = (unsigned __int8)v14[0] | ((unsigned __int8)v4 << 8);
      *(_DWORD *)v14 = &v12;
      v11 = *(_DWORD *)v15 | (v10 << 16);
      v12.m_pObject = (PgWinBut *)v9;
      InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v13->m_kFaceMap,
        v11,
        v12);
      NiObjectNET::ms_eCopyType = 1;
      result = (NiNode *)NiObject::Clone(v9);
    }
    else
    {
      result = 0;
    }
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (0064FC10) --------------------------------------------------------
NiSourceTexture *__thiscall CharResMgr::GetFaceTexture(CharResMgr *this, char kClassID, char byGender, unsigned __int16 wNo)
{
  char v4; // bl@2
  NiSourceTexture *result; // eax@9
  NiSourceTexture *v6; // edi@9
  NiUnsharedGeometryGroup *v7; // esi@10
  NiPointer<PgWinBut> *v8; // eax@13
  NiImageConverter *v9; // eax@17
  NiPixelData *v10; // eax@17
  NiSourceTexture *v11; // eax@18
  int v12; // esi@19
  char *v13; // [sp-18h] [bp-148h]@13
  const char *v14; // [sp-14h] [bp-144h]@13
  char *v15; // [sp-10h] [bp-140h]@13
  NiUnsharedGeometryGroup *v16; // [sp-Ch] [bp-13Ch]@13
  NiUnsharedGeometryGroup *v17; // [sp-8h] [bp-138h]@13
  NiPointer<PgWinBut> v18; // [sp-4h] [bp-134h]@13
  NiTexture::FormatPrefs kPrefs; // [sp+Ch] [bp-124h]@18
  CharResMgr *v20; // [sp+18h] [bp-118h]@1
  char v21[4]; // [sp+1Ch] [bp-114h]@1
  NiPointer<PgWinBut> *v22; // [sp+20h] [bp-110h]@1
  char v23[4]; // [sp+24h] [bp-10Ch]@9
  char acFileName[260]; // [sp+28h] [bp-108h]@13

  v21[0] = byGender;
  v20 = this;
  v22 = (NiPointer<PgWinBut> *)wNo;
  switch ( kClassID )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      v4 = 1;
      break;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      v4 = 6;
      break;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      v4 = 11;
      break;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      v4 = 16;
      break;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      v4 = 21;
      break;
    case 0x1A:
    case 0x1B:
      v4 = 26;
      break;
    default:
      v4 = 0;
      break;
  }
  v23[0] = v4;
  result = CharResMgr::GetFaceTextureFromMap(this, v4, v21[0], wNo);
  v6 = 0;
  if ( !result )
  {
    v7 = CharClass::GetBaseEngName(v4);
    if ( v21[0] == 1 )
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      v8 = (NiPointer<PgWinBut> *)(unsigned __int16)v22;
      v18.m_pObject = (PgWinBut *)(unsigned __int16)v22;
      v17 = v7;
      v16 = v7;
      v15 = &Folder::m_acCharacter;
      v14 = "%s%s-m\\%s-m-face%03d.dds";
      v13 = acFileName;
    }
    else
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      v8 = (NiPointer<PgWinBut> *)(unsigned __int16)v22;
      v18.m_pObject = (PgWinBut *)(unsigned __int16)v22;
      v17 = v7;
      v16 = v7;
      v15 = &Folder::m_acCharacter;
      v14 = "%s%s-f\\%s-f-face%03d.dds";
      v13 = acFileName;
    }
    v22 = v8;
    sprintf(v13, v14, v15, v16, v17, v18.m_pObject);
    v9 = NiImageConverter::GetImageConverter();
    v10 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v9->vfptr[2].__vecDelDtor)(
                           v9,
                           acFileName,
                           0);
    if ( v10 )
    {
      kPrefs.m_ePixelLayout = 6;
      kPrefs.m_eAlphaFmt = 3;
      kPrefs.m_eMipMapped = 0;
      v11 = NiSourceTexture::Create(v10, &kPrefs);
      v6 = v11;
      if ( v11 )
      {
        NiObjectNET::SetName((NiObjectNET *)&v11->vfptr, "FaceTexture");
        v12 = (unsigned int)v22 | (((unsigned __int8)v21[0] | ((unsigned __int8)v4 << 8)) << 16);
        v18.m_pObject = (PgWinBut *)v6;
        v22 = &v18;
        InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
        NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
          (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v20->m_kFaceTextureMap,
          v12,
          v18);
      }
    }
    result = v6;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0064FE20) --------------------------------------------------------
NiShaderLibrary *__thiscall CharResMgr::GetFaceTattoo(CharResMgr *this, unsigned __int16 wNo)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // ebx@1
  NiShaderLibrary *v3; // esi@1
  NiImageConverter *v4; // eax@6
  NiPixelData *v5; // eax@6
  NiSourceTexture *v6; // eax@7
  NiPointer<PgWinBut> v8; // [sp-4h] [bp-138h]@6
  NiTexture::FormatPrefs kPrefs; // [sp+10h] [bp-124h]@7
  NiPointer<NiShaderLibrary> val; // [sp+1Ch] [bp-118h]@1
  char acFileName[260]; // [sp+20h] [bp-114h]@6
  int v12; // [sp+130h] [bp-4h]@1

  val.m_pObject = 0;
  v12 = 0;
  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kFaceTattooMap;
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kFaceTattooMap,
    (const char *)wNo,
    &val);
  v3 = val.m_pObject;
  v12 = -1;
  if ( val.m_pObject )
  {
    if ( !InterlockedDecrement((volatile LONG *)&val.m_pObject->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  }
  else
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    v8.m_pObject = (PgWinBut *)wNo;
    sprintf(acFileName, "%s\\tattoo%03d.tga", &Folder::m_acCharacter, wNo);
    v4 = NiImageConverter::GetImageConverter();
    v3 = 0;
    v5 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v4->vfptr[2].__vecDelDtor)(
                          v4,
                          acFileName,
                          0);
    if ( v5 )
    {
      kPrefs.m_ePixelLayout = 6;
      kPrefs.m_eAlphaFmt = 3;
      kPrefs.m_eMipMapped = 0;
      v6 = NiSourceTexture::Create(v5, &kPrefs);
      v3 = (NiShaderLibrary *)v6;
      if ( v6 )
      {
        NiObjectNET::SetName((NiObjectNET *)&v6->vfptr, "FaceTattoo");
        val.m_pObject = (NiShaderLibrary *)&v8;
        v8.m_pObject = (PgWinBut *)v3;
        InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
        NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(v2, wNo, v8);
      }
    }
  }
  return v3;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0064FF70) --------------------------------------------------------
NiSourceTexture *__thiscall CharResMgr::GetClosedEyeTexture(CharResMgr *this, char kClassID, char byGender, unsigned __int16 wNo)
{
  char v4; // bl@2
  NiSourceTexture *result; // eax@9
  NiUnsharedGeometryGroup *v6; // edi@10
  int v7; // eax@13
  NiImageConverter *v8; // eax@17
  NiPixelData *v9; // eax@17
  NiSourceTexture *v10; // eax@18
  NiSourceTexture *v11; // edi@18
  int v12; // esi@19
  char *v13; // [sp-14h] [bp-144h]@13
  const char *v14; // [sp-10h] [bp-140h]@13
  char *v15; // [sp-Ch] [bp-13Ch]@13
  NiUnsharedGeometryGroup *v16; // [sp-8h] [bp-138h]@13
  NiPointer<PgWinBut> v17; // [sp-4h] [bp-134h]@13
  NiTexture::FormatPrefs kPrefs; // [sp+Ch] [bp-124h]@18
  CharResMgr *v19; // [sp+18h] [bp-118h]@1
  char v20[4]; // [sp+1Ch] [bp-114h]@1
  NiPointer<PgWinBut> *v21; // [sp+20h] [bp-110h]@1
  char v22[4]; // [sp+24h] [bp-10Ch]@9
  char acFileName[260]; // [sp+28h] [bp-108h]@13

  v20[0] = byGender;
  v19 = this;
  v21 = (NiPointer<PgWinBut> *)wNo;
  switch ( kClassID )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      v4 = 1;
      break;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      v4 = 6;
      break;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      v4 = 11;
      break;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      v4 = 16;
      break;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      v4 = 21;
      break;
    case 0x1A:
    case 0x1B:
      v4 = 26;
      break;
    default:
      v4 = 0;
      break;
  }
  v22[0] = v4;
  result = CharResMgr::GetClosedEyeFromMap(this, v4, v20[0], wNo);
  if ( !result )
  {
    v6 = CharClass::GetBaseEngName(v22[0]);
    if ( v20[0] == 1 )
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      v7 = (unsigned __int16)v21;
      v17.m_pObject = (PgWinBut *)(unsigned __int16)v21;
      v16 = v6;
      v15 = &Folder::m_acCharacter;
      v14 = "%s%s-m\\EyeShape%03d.dds";
      v13 = acFileName;
    }
    else
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      v7 = (unsigned __int16)v21;
      v17.m_pObject = (PgWinBut *)(unsigned __int16)v21;
      v16 = v6;
      v15 = &Folder::m_acCharacter;
      v14 = "%s%s-f\\EyeShape%03d.dds";
      v13 = acFileName;
    }
    *(_DWORD *)v22 = v7;
    sprintf(v13, v14, v15, v16, v17.m_pObject);
    v8 = NiImageConverter::GetImageConverter();
    v9 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v8->vfptr[2].__vecDelDtor)(
                          v8,
                          acFileName,
                          0);
    if ( v9
      && (kPrefs.m_ePixelLayout = 6,
          kPrefs.m_eAlphaFmt = 3,
          kPrefs.m_eMipMapped = 0,
          v10 = NiSourceTexture::Create(v9, &kPrefs),
          (v11 = v10) != 0) )
    {
      NiObjectNET::SetName((NiObjectNET *)&v10->vfptr, "EyeTexture");
      v17.m_pObject = (PgWinBut *)v11;
      v21 = &v17;
      v12 = *(_DWORD *)v22 | (((unsigned __int8)v20[0] | ((unsigned __int8)v4 << 8)) << 16);
      InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v19->m_kClosedEyeMap,
        v12,
        v17);
      result = v11;
    }
    else if ( (_WORD)v21 )
    {
      result = CharResMgr::GetClosedEyeTexture(v19, v4, v20[0], 0);
    }
    else
    {
      result = 0;
    }
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006501D0) --------------------------------------------------------
NiNode *__thiscall CharResMgr::GetDropItem(CharResMgr *this, unsigned __int16 kItemID)
{
  CharResMgr *v2; // edi@1
  NiNode *result; // eax@1
  NiNode *v4; // eax@4
  NiObjectNET *v5; // esi@4
  NiTimeController *v6; // eax@5
  const char *v7; // [sp-4h] [bp-118h]@4
  const char **v8; // [sp+8h] [bp-10Ch]@7
  char acFileName[260]; // [sp+Ch] [bp-108h]@4

  v2 = this;
  result = CharResMgr::GetDropItemFromMap(this, 0);
  if ( !result )
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    v7 = "GroundItem";
    sprintf(acFileName, "%s%s.nif", &Folder::m_acItem, "GroundItem");
    v4 = PgUtil::LoadNifFile(acFileName, 0);
    v5 = (NiObjectNET *)v4;
    if ( v4 )
    {
      v6 = PgUtil::GetControllerWithChild((NiAVObject *)&v4->vfptr, &NiTransformController::m_RTTI);
      if ( v6 )
        v6->m_uFlags = v6->m_uFlags & 0xFFF7 | 1;
      NiObjectNET::SetName(v5, "DropItem");
      v8 = &v7;
      v7 = (const char *)v5;
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v2->m_kDropItemMap,
        0,
        (NiPointer<PgWinBut>)v7);
      NiObjectNET::ms_eCopyType = 1;
      result = (NiNode *)NiObject::Clone((NiObject *)&v5->vfptr);
    }
    else
    {
      result = 0;
    }
  }
  return result;
}
// A89130: using guessed type char *Folder::m_acItem;
// A8975C: using guessed type bool Folder::m_bInit;
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (006502D0) --------------------------------------------------------
NiNode *__thiscall CharResMgr::GetItemUpgradeTextureEffect(CharResMgr *this, char ucEffNo)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // ebx@1
  NiNode *v3; // edi@1
  NiNode *result; // eax@4
  NiNode *v5; // eax@7
  NiNode *v6; // edi@7
  NiPointer<PgWinBut> v7; // [sp-4h] [bp-12Ch]@8
  NiPointer<NiShaderLibrary> val; // [sp+10h] [bp-118h]@1
  char acFileName[260]; // [sp+14h] [bp-114h]@7
  int v10; // [sp+124h] [bp-4h]@1

  val.m_pObject = 0;
  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kDropItemMap;
  v10 = 0;
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kDropItemMap,
    (const char *)(unsigned __int8)ucEffNo,
    &val);
  v3 = (NiNode *)val.m_pObject;
  v10 = -1;
  if ( val.m_pObject )
  {
    if ( !InterlockedDecrement((volatile LONG *)&val.m_pObject->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    result = v3;
  }
  else
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    sprintf(acFileName, "%sUpgradeTexEff%02u.nif", &Folder::m_acItem, (unsigned __int8)ucEffNo);
    v5 = PgUtil::LoadNifFile(acFileName, 0);
    v6 = v5;
    if ( v5 )
    {
      v7.m_pObject = (PgWinBut *)v5;
      val.m_pObject = (NiShaderLibrary *)&v7;
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(v2, (unsigned __int8)ucEffNo, v7);
      result = v6;
    }
    else
    {
      result = 0;
    }
  }
  return result;
}
// A89130: using guessed type char *Folder::m_acItem;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006503D0) --------------------------------------------------------
void __thiscall CharResMgr::ResetProperty(CharResMgr *this, NiAVObject *pkObject)
{
  NiAVObject *v2; // ebx@1
  CharResMgr *v3; // esi@1
  NiProperty *v4; // eax@3
  NiVertexColorProperty *v5; // edi@3
  NiProperty *v6; // eax@12
  NiMaterialProperty *v7; // edi@12
  NiAVObject *pkObjecta; // [sp+10h] [bp+8h]@3
  NiAVObject *pkObjectb; // [sp+10h] [bp+8h]@12

  v2 = pkObject;
  v3 = this;
  if ( pkObject )
  {
    if ( !this->m_spVertProp.m_pObject )
    {
      v4 = PgUtil::GetPropertyWithChild(pkObject, 9);
      v5 = v3->m_spVertProp.m_pObject;
      pkObjecta = (NiAVObject *)v4;
      if ( (NiProperty *)v5 != v4 )
      {
        if ( v5 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
            v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
          v4 = (NiProperty *)pkObjecta;
        }
        v3->m_spVertProp.m_pObject = (NiVertexColorProperty *)v4;
        if ( v4 )
          InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
      }
    }
    if ( !v3->m_spMatProp.m_pObject )
    {
      v6 = PgUtil::GetPropertyWithChild(v2, 3);
      v7 = v3->m_spMatProp.m_pObject;
      pkObjectb = (NiAVObject *)v6;
      if ( (NiProperty *)v7 != v6 )
      {
        if ( v7 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
            v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
          v6 = (NiProperty *)pkObjectb;
        }
        v3->m_spMatProp.m_pObject = (NiMaterialProperty *)v6;
        if ( v6 )
          InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
      }
    }
    PgUtil::RemovePropWithChild(v2, 9);
    PgUtil::RemovePropWithChild(v2, 3);
    NiAVObject::AttachProperty(v2, (NiProperty *)&v3->m_spVertProp.m_pObject->vfptr);
    NiAVObject::AttachProperty(v2, (NiProperty *)&v3->m_spMatProp.m_pObject->vfptr);
    NiAVObject::UpdateProperties(v2);
  }
}

//----- (006504D0) --------------------------------------------------------
char __stdcall CharResMgr::GetResourcePath(char *pResultPath, bool bNIFFile, const char *pcResourceName, char byGender, char kClassID)
{
  const char *v6; // edi@1
  char v7; // bl@2
  char *v8; // eax@12
  char v9; // cl@13
  char v10; // cl@15
  char v11; // al@17
  char *v12; // edi@23
  char v13; // al@24
  char *v14; // edi@26
  char v15; // al@27
  NiUnsharedGeometryGroup *v16; // ST08_4@30
  NiUnsharedGeometryGroup *v17; // ST08_4@31
  unsigned int v18; // eax@35
  char *v19; // edi@35
  char v20; // cl@36
  char *v21; // edi@37
  char *v22; // esi@37
  char v23; // cl@37
  char result; // al@37
  char byResultType; // [sp+17h] [bp-45h]@1
  char temp[64]; // [sp+18h] [bp-44h]@32

  v6 = pcResourceName;
  byResultType = 0;
  switch ( kClassID )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      v7 = 1;
      break;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      v7 = 6;
      break;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      v7 = 11;
      break;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      v7 = 16;
      break;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      v7 = 21;
      break;
    case 0x1A:
    case 0x1B:
      v7 = 26;
      break;
    default:
      v7 = 0;
      break;
  }
  if ( *pcResourceName != 95 )
    goto LABEL_40;
  sprintf(pResultPath, "Common\\");
  if ( pcResourceName[1] == 67 )
  {
    byResultType = 1;
    goto LABEL_32;
  }
  v8 = pResultPath - 1;
  if ( byGender == 1 )
  {
    do
      v9 = (v8++)[1];
    while ( v9 );
    *(_WORD *)v8 = 23629;
  }
  else
  {
    do
      v10 = (v8++)[1];
    while ( v10 );
    *(_WORD *)v8 = 23622;
  }
  v8[2] = 0;
  v11 = pcResourceName[1];
  if ( v11 == 83 )
  {
    byResultType = 2;
    goto LABEL_32;
  }
  if ( v11 != 71 )
  {
LABEL_40:
    if ( byGender == 1 )
    {
      v16 = CharClass::GetBaseEngName(kClassID);
      sprintf(pResultPath, "%s-m\\", v16);
    }
    else
    {
      v17 = CharClass::GetBaseEngName(kClassID);
      sprintf(pResultPath, "%s-f\\", v17);
    }
    goto LABEL_32;
  }
  byResultType = 3;
  if ( v7 == 1 || v7 == 6 || v7 == 21 )
  {
    v14 = pResultPath - 1;
    do
      v15 = (v14++)[1];
    while ( v15 );
    *(_DWORD *)v14 = (char *)&loc_5C4345 + 1;
    v6 = pcResourceName;
  }
  else
  {
    v12 = pResultPath - 1;
    do
      v13 = (v12++)[1];
    while ( v13 );
    *(_DWORD *)v12 = (char *)&loc_5C4D3F + 2;
    v6 = pcResourceName;
  }
LABEL_32:
  memset(temp, 0, 0x36u);
  if ( bNIFFile )
    sprintf(temp, "%s.nif", v6);
  else
    sprintf(temp, "%s.dds", v6);
  v18 = strlen(temp) + 1;
  v19 = pResultPath - 1;
  do
    v20 = (v19++)[1];
  while ( v20 );
  qmemcpy(v19, temp, 4 * (v18 >> 2));
  v22 = &temp[4 * (v18 >> 2)];
  v21 = &v19[4 * (v18 >> 2)];
  v23 = v18;
  result = byResultType;
  qmemcpy(v21, v22, v23 & 3);
  return result;
}

//----- (00650700) --------------------------------------------------------
char __thiscall CharResMgr::LoadCharSetRes(CharResMgr *this, char kClassID)
{
  int v2; // edi@2
  const char *v3; // ebx@2
  NiShaderLibrary *v4; // esi@2
  char v5; // al@7
  char *v6; // eax@14
  NiUnsharedGeometryGroup *v7; // edi@14
  char v8; // al@17
  char *v9; // eax@24
  NiUnsharedGeometryGroup *v10; // esi@24
  char v11; // al@30
  char *v12; // eax@37
  NiUnsharedGeometryGroup *v13; // esi@37
  NiNode *v14; // eax@42
  NiNode *v15; // edi@42
  CharSet *v16; // eax@43
  CharSet *v17; // eax@44
  CharSet *v18; // esi@44
  int v19; // edi@53
  NiShaderLibrary *v20; // esi@55
  char v21; // al@60
  char *v22; // eax@67
  NiUnsharedGeometryGroup *v23; // edi@67
  char v24; // al@70
  char *v25; // eax@77
  NiUnsharedGeometryGroup *v26; // esi@77
  char v27; // al@83
  char *v28; // eax@90
  NiUnsharedGeometryGroup *v29; // esi@90
  NiNode *v30; // eax@95
  NiNode *v31; // edi@95
  NiShaderLibrary *v32; // eax@96
  CharSet *v33; // eax@97
  CharSet *v34; // esi@97
  const char *v35; // ebx@107
  NiShaderLibrary *v36; // esi@107
  char v37; // al@111
  char *v38; // eax@118
  NiUnsharedGeometryGroup *v39; // esi@118
  NiNode *v40; // eax@122
  NiNode *v41; // edi@122
  CharSet *v42; // eax@123
  CharSet *v43; // eax@124
  CharSet *v44; // esi@124
  int v45; // ebx@134
  NiShaderLibrary *v46; // esi@134
  char v47; // al@138
  char *v48; // eax@145
  NiUnsharedGeometryGroup *v49; // esi@145
  NiNode *v50; // eax@149
  NiNode *v51; // edi@149
  CharSet *v52; // eax@150
  CharSet *v53; // eax@151
  CharSet *v54; // esi@151
  int v55; // ebx@160
  NiShaderLibrary *v56; // esi@160
  char v57; // al@164
  char *v58; // eax@171
  NiUnsharedGeometryGroup *v59; // esi@171
  NiNode *v60; // eax@175
  NiNode *v61; // edi@175
  CharSet *v62; // eax@176
  CharSet *v63; // eax@177
  CharSet *v64; // esi@177
  int v65; // ebx@185
  NiShaderLibrary *v66; // esi@185
  char v67; // al@189
  char *v68; // eax@196
  NiUnsharedGeometryGroup *v69; // esi@196
  NiNode *v70; // eax@200
  NiNode *v71; // edi@200
  CharSet *v72; // eax@201
  CharSet *v73; // eax@202
  CharSet *v74; // esi@202
  int v76; // [sp-4h] [bp-13Ch]@28
  int v77; // [sp+10h] [bp-128h]@1
  unsigned int key; // [sp+14h] [bp-124h]@43
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *v79; // [sp+18h] [bp-120h]@1
  int i; // [sp+1Ch] [bp-11Ch]@1
  NiPointer<NiShaderLibrary> val; // [sp+20h] [bp-118h]@2
  char acFileName[260]; // [sp+24h] [bp-114h]@28
  int v83; // [sp+134h] [bp-4h]@2

  i = 0;
  v77 = (unsigned __int8)kClassID << 24;
  v79 = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kCharSetMap;
  do
  {
    v2 = i;
    v3 = (const char *)(v77 | (unsigned __int16)i | 0x10000);
    val.m_pObject = 0;
    v83 = 0;
    NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(v79, v3, &val);
    v4 = val.m_pObject;
    v83 = -1;
    if ( val.m_pObject )
    {
      if ( !InterlockedDecrement((volatile LONG *)&val.m_pObject->m_uiRefCount) )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
    else
    {
      if ( v2 )
      {
        switch ( kClassID )
        {
          case 1:
          case 2:
          case 3:
          case 4:
          case 5:
            v11 = 1;
            break;
          case 6:
          case 7:
          case 8:
          case 9:
          case 0xA:
            v11 = 6;
            break;
          case 0xB:
          case 0xC:
          case 0xD:
          case 0xE:
          case 0xF:
            v11 = 11;
            break;
          case 0x10:
          case 0x11:
          case 0x12:
          case 0x13:
          case 0x14:
            v11 = 16;
            break;
          case 0x15:
          case 0x16:
          case 0x17:
          case 0x18:
          case 0x19:
            v11 = 21;
            break;
          case 0x1A:
          case 0x1B:
            v11 = 26;
            break;
          default:
            v11 = 0;
            break;
        }
        v12 = CDataReader::GetRecord(
                (CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4),
                (unsigned __int8)v11);
        v13 = &unk_96F8EB;
        if ( v12 )
          v13 = (NiUnsharedGeometryGroup *)(v12 + 5);
        if ( !Folder::m_bInit )
          Folder::Init();
        sprintf(acFileName, "%s%s-m\\set%03d.nif", &Folder::m_acCharacter, v13, v2);
      }
      else
      {
        switch ( kClassID )
        {
          case 1:
          case 2:
          case 3:
          case 4:
          case 5:
            v5 = 1;
            break;
          case 6:
          case 7:
          case 8:
          case 9:
          case 0xA:
            v5 = 6;
            break;
          case 0xB:
          case 0xC:
          case 0xD:
          case 0xE:
          case 0xF:
            v5 = 11;
            break;
          case 0x10:
          case 0x11:
          case 0x12:
          case 0x13:
          case 0x14:
            v5 = 16;
            break;
          case 0x15:
          case 0x16:
          case 0x17:
          case 0x18:
          case 0x19:
            v5 = 21;
            break;
          case 0x1A:
          case 0x1B:
            v5 = 26;
            break;
          default:
            v5 = 0;
            break;
        }
        v6 = CDataReader::GetRecord(
               (CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4),
               (unsigned __int8)v5);
        v7 = &unk_96F8EB;
        if ( v6 )
          v7 = (NiUnsharedGeometryGroup *)(v6 + 5);
        switch ( kClassID )
        {
          case 1:
          case 2:
          case 3:
          case 4:
          case 5:
            v8 = 1;
            break;
          case 6:
          case 7:
          case 8:
          case 9:
          case 0xA:
            v8 = 6;
            break;
          case 0xB:
          case 0xC:
          case 0xD:
          case 0xE:
          case 0xF:
            v8 = 11;
            break;
          case 0x10:
          case 0x11:
          case 0x12:
          case 0x13:
          case 0x14:
            v8 = 16;
            break;
          case 0x15:
          case 0x16:
          case 0x17:
          case 0x18:
          case 0x19:
            v8 = 21;
            break;
          case 0x1A:
          case 0x1B:
            v8 = 26;
            break;
          default:
            v8 = 0;
            break;
        }
        v9 = CDataReader::GetRecord(
               (CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4),
               (unsigned __int8)v8);
        v10 = &unk_96F8EB;
        if ( v9 )
          v10 = (NiUnsharedGeometryGroup *)(v9 + 5);
        if ( !Folder::m_bInit )
          Folder::Init();
        v76 = (int)v7;
        sprintf(acFileName, "%s%s-m\\%s-m.nif", &Folder::m_acCharacter, v10, v7);
      }
      v76 = 1;
      v14 = PgUtil::LoadNifFile(acFileName, 0);
      v15 = v14;
      if ( v14 )
      {
        NiObjectNET::SetName((NiObjectNET *)&v14->vfptr, "CharSet");
        v16 = (CharSet *)operator new(0x34u);
        key = (unsigned int)v16;
        v83 = 1;
        if ( v16 )
        {
          CharSet::CharSet(v16);
          v18 = v17;
        }
        else
        {
          v18 = 0;
        }
        v83 = -1;
        if ( CharSet::Init(v18, v15) )
        {
          key = (unsigned int)&v76;
          v76 = (int)v18;
          if ( v18 )
            InterlockedIncrement((volatile LONG *)&v18->m_uiRefCount);
          NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
            (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)v79,
            (unsigned int)v3,
            (NiPointer<PgWinBut>)v76);
        }
        else if ( v18 )
        {
          v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
        }
      }
    }
    ++i;
  }
  while ( i < 5 );
  v19 = 0;
  for ( i = 0; ; v19 = i )
  {
    val.m_pObject = 0;
    key = v77 | (unsigned __int16)v19;
    v83 = 2;
    NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
      v79,
      (const char *)(v77 | (unsigned __int16)v19),
      &val);
    v20 = val.m_pObject;
    v83 = -1;
    if ( val.m_pObject )
    {
      if ( !InterlockedDecrement((volatile LONG *)&val.m_pObject->m_uiRefCount) )
        v20->vfptr->__vecDelDtor((NiRefObject *)v20, 1u);
    }
    else
    {
      if ( v19 )
      {
        switch ( kClassID )
        {
          case 1:
          case 2:
          case 3:
          case 4:
          case 5:
            v27 = 1;
            break;
          case 6:
          case 7:
          case 8:
          case 9:
          case 0xA:
            v27 = 6;
            break;
          case 0xB:
          case 0xC:
          case 0xD:
          case 0xE:
          case 0xF:
            v27 = 11;
            break;
          case 0x10:
          case 0x11:
          case 0x12:
          case 0x13:
          case 0x14:
            v27 = 16;
            break;
          case 0x15:
          case 0x16:
          case 0x17:
          case 0x18:
          case 0x19:
            v27 = 21;
            break;
          case 0x1A:
          case 0x1B:
            v27 = 26;
            break;
          default:
            v27 = 0;
            break;
        }
        v28 = CDataReader::GetRecord(
                (CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4),
                (unsigned __int8)v27);
        v29 = &unk_96F8EB;
        if ( v28 )
          v29 = (NiUnsharedGeometryGroup *)(v28 + 5);
        if ( !Folder::m_bInit )
          Folder::Init();
        sprintf(acFileName, "%s%s-f\\set%03d.nif", &Folder::m_acCharacter, v29, v19);
      }
      else
      {
        switch ( kClassID )
        {
          case 1:
          case 2:
          case 3:
          case 4:
          case 5:
            v21 = 1;
            break;
          case 6:
          case 7:
          case 8:
          case 9:
          case 0xA:
            v21 = 6;
            break;
          case 0xB:
          case 0xC:
          case 0xD:
          case 0xE:
          case 0xF:
            v21 = 11;
            break;
          case 0x10:
          case 0x11:
          case 0x12:
          case 0x13:
          case 0x14:
            v21 = 16;
            break;
          case 0x15:
          case 0x16:
          case 0x17:
          case 0x18:
          case 0x19:
            v21 = 21;
            break;
          case 0x1A:
          case 0x1B:
            v21 = 26;
            break;
          default:
            v21 = 0;
            break;
        }
        v22 = CDataReader::GetRecord(
                (CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4),
                (unsigned __int8)v21);
        v23 = &unk_96F8EB;
        if ( v22 )
          v23 = (NiUnsharedGeometryGroup *)(v22 + 5);
        switch ( kClassID )
        {
          case 1:
          case 2:
          case 3:
          case 4:
          case 5:
            v24 = 1;
            break;
          case 6:
          case 7:
          case 8:
          case 9:
          case 0xA:
            v24 = 6;
            break;
          case 0xB:
          case 0xC:
          case 0xD:
          case 0xE:
          case 0xF:
            v24 = 11;
            break;
          case 0x10:
          case 0x11:
          case 0x12:
          case 0x13:
          case 0x14:
            v24 = 16;
            break;
          case 0x15:
          case 0x16:
          case 0x17:
          case 0x18:
          case 0x19:
            v24 = 21;
            break;
          case 0x1A:
          case 0x1B:
            v24 = 26;
            break;
          default:
            v24 = 0;
            break;
        }
        v25 = CDataReader::GetRecord(
                (CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4),
                (unsigned __int8)v24);
        v26 = &unk_96F8EB;
        if ( v25 )
          v26 = (NiUnsharedGeometryGroup *)(v25 + 5);
        if ( !Folder::m_bInit )
          Folder::Init();
        v76 = (int)v23;
        sprintf(acFileName, "%s%s-f\\%s-f.nif", &Folder::m_acCharacter, v26, v23);
      }
      v76 = 1;
      v30 = PgUtil::LoadNifFile(acFileName, 0);
      v31 = v30;
      if ( v30 )
      {
        NiObjectNET::SetName((NiObjectNET *)&v30->vfptr, "CharSet");
        v32 = (NiShaderLibrary *)operator new(0x34u);
        val.m_pObject = v32;
        v83 = 3;
        if ( v32 )
        {
          CharSet::CharSet((CharSet *)v32);
          v34 = v33;
        }
        else
        {
          v34 = 0;
        }
        v83 = -1;
        if ( CharSet::Init(v34, v31) )
        {
          val.m_pObject = (NiShaderLibrary *)&v76;
          v76 = (int)v34;
          if ( v34 )
            InterlockedIncrement((volatile LONG *)&v34->m_uiRefCount);
          NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
            (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)v79,
            key,
            (NiPointer<PgWinBut>)v76);
        }
        else if ( v34 )
        {
          v34->vfptr->__vecDelDtor((NiRefObject *)v34, 1u);
        }
      }
    }
    if ( ++i >= 5 )
      break;
  }
  i = 10;
  do
  {
    val.m_pObject = 0;
    v35 = (const char *)(v77 | (unsigned __int16)i | 0x10000);
    v83 = 4;
    NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(v79, v35, &val);
    v36 = val.m_pObject;
    v83 = -1;
    if ( val.m_pObject )
    {
      if ( !InterlockedDecrement((volatile LONG *)&val.m_pObject->m_uiRefCount) )
        v36->vfptr->__vecDelDtor((NiRefObject *)v36, 1u);
    }
    else
    {
      switch ( kClassID )
      {
        case 1:
        case 2:
        case 3:
        case 4:
        case 5:
          v37 = 1;
          break;
        case 6:
        case 7:
        case 8:
        case 9:
        case 0xA:
          v37 = 6;
          break;
        case 0xB:
        case 0xC:
        case 0xD:
        case 0xE:
        case 0xF:
          v37 = 11;
          break;
        case 0x10:
        case 0x11:
        case 0x12:
        case 0x13:
        case 0x14:
          v37 = 16;
          break;
        case 0x15:
        case 0x16:
        case 0x17:
        case 0x18:
        case 0x19:
          v37 = 21;
          break;
        case 0x1A:
        case 0x1B:
          v37 = 26;
          break;
        default:
          v37 = 0;
          break;
      }
      v38 = CDataReader::GetRecord(
              (CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4),
              (unsigned __int8)v37);
      v39 = &unk_96F8EB;
      if ( v38 )
        v39 = (NiUnsharedGeometryGroup *)(v38 + 5);
      if ( !Folder::m_bInit )
        Folder::Init();
      v76 = i;
      sprintf(acFileName, "%s%s-m\\set%03d.nif", &Folder::m_acCharacter, v39, i);
      v40 = PgUtil::LoadNifFile(acFileName, 0);
      v41 = v40;
      if ( v40 )
      {
        NiObjectNET::SetName((NiObjectNET *)&v40->vfptr, "CharSet");
        v42 = (CharSet *)operator new(0x34u);
        key = (unsigned int)v42;
        v83 = 5;
        if ( v42 )
        {
          CharSet::CharSet(v42);
          v44 = v43;
        }
        else
        {
          v44 = 0;
        }
        v83 = -1;
        if ( CharSet::Init(v44, v41) )
        {
          key = (unsigned int)&v76;
          v76 = (int)v44;
          if ( v44 )
            InterlockedIncrement((volatile LONG *)&v44->m_uiRefCount);
          NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
            (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)v79,
            (unsigned int)v35,
            (NiPointer<PgWinBut>)v76);
        }
        else if ( v44 )
        {
          v44->vfptr->__vecDelDtor((NiRefObject *)v44, 1u);
        }
      }
    }
    ++i;
  }
  while ( i < 23 );
  i = 10;
  do
  {
    v45 = v77 | (unsigned __int16)i;
    val.m_pObject = 0;
    v83 = 6;
    NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
      v79,
      (const char *)(v77 | (unsigned __int16)i),
      &val);
    v46 = val.m_pObject;
    v83 = -1;
    if ( val.m_pObject )
    {
      if ( !InterlockedDecrement((volatile LONG *)&val.m_pObject->m_uiRefCount) )
        v46->vfptr->__vecDelDtor((NiRefObject *)v46, 1u);
    }
    else
    {
      switch ( kClassID )
      {
        case 1:
        case 2:
        case 3:
        case 4:
        case 5:
          v47 = 1;
          break;
        case 6:
        case 7:
        case 8:
        case 9:
        case 0xA:
          v47 = 6;
          break;
        case 0xB:
        case 0xC:
        case 0xD:
        case 0xE:
        case 0xF:
          v47 = 11;
          break;
        case 0x10:
        case 0x11:
        case 0x12:
        case 0x13:
        case 0x14:
          v47 = 16;
          break;
        case 0x15:
        case 0x16:
        case 0x17:
        case 0x18:
        case 0x19:
          v47 = 21;
          break;
        case 0x1A:
        case 0x1B:
          v47 = 26;
          break;
        default:
          v47 = 0;
          break;
      }
      v48 = CDataReader::GetRecord(
              (CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4),
              (unsigned __int8)v47);
      v49 = &unk_96F8EB;
      if ( v48 )
        v49 = (NiUnsharedGeometryGroup *)(v48 + 5);
      if ( !Folder::m_bInit )
        Folder::Init();
      v76 = i;
      sprintf(acFileName, "%s%s-f\\set%03d.nif", &Folder::m_acCharacter, v49, i);
      v50 = PgUtil::LoadNifFile(acFileName, 0);
      v51 = v50;
      if ( v50 )
      {
        NiObjectNET::SetName((NiObjectNET *)&v50->vfptr, "CharSet");
        v52 = (CharSet *)operator new(0x34u);
        key = (unsigned int)v52;
        v83 = 7;
        if ( v52 )
        {
          CharSet::CharSet(v52);
          v54 = v53;
        }
        else
        {
          v54 = 0;
        }
        v83 = -1;
        if ( CharSet::Init(v54, v51) )
        {
          key = (unsigned int)&v76;
          v76 = (int)v54;
          if ( v54 )
            InterlockedIncrement((volatile LONG *)&v54->m_uiRefCount);
          NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
            (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)v79,
            v45,
            (NiPointer<PgWinBut>)v76);
        }
        else if ( v54 )
        {
          v54->vfptr->__vecDelDtor((NiRefObject *)v54, 1u);
        }
      }
    }
    ++i;
  }
  while ( i < 20 );
  v55 = v77 | 0x100FF;
  val.m_pObject = 0;
  v83 = 8;
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(v79, (const char *)(v77 | 0x100FF), &val);
  v56 = val.m_pObject;
  v83 = -1;
  if ( val.m_pObject )
  {
    if ( !InterlockedDecrement((volatile LONG *)&val.m_pObject->m_uiRefCount) )
      v56->vfptr->__vecDelDtor((NiRefObject *)v56, 1u);
  }
  else
  {
    switch ( kClassID )
    {
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
        v57 = 1;
        break;
      case 6:
      case 7:
      case 8:
      case 9:
      case 0xA:
        v57 = 6;
        break;
      case 0xB:
      case 0xC:
      case 0xD:
      case 0xE:
      case 0xF:
        v57 = 11;
        break;
      case 0x10:
      case 0x11:
      case 0x12:
      case 0x13:
      case 0x14:
        v57 = 16;
        break;
      case 0x15:
      case 0x16:
      case 0x17:
      case 0x18:
      case 0x19:
        v57 = 21;
        break;
      case 0x1A:
      case 0x1B:
        v57 = 26;
        break;
      default:
        v57 = 0;
        break;
    }
    v58 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), (unsigned __int8)v57);
    v59 = &unk_96F8EB;
    if ( v58 )
      v59 = (NiUnsharedGeometryGroup *)(v58 + 5);
    if ( !Folder::m_bInit )
      Folder::Init();
    v76 = 255;
    sprintf(acFileName, "%s%s-m\\set%03d.nif", &Folder::m_acCharacter, v59, 255);
    v60 = PgUtil::LoadNifFile(acFileName, 0);
    v61 = v60;
    if ( v60 )
    {
      NiObjectNET::SetName((NiObjectNET *)&v60->vfptr, "CharSet");
      v62 = (CharSet *)operator new(0x34u);
      key = (unsigned int)v62;
      v83 = 9;
      if ( v62 )
      {
        CharSet::CharSet(v62);
        v64 = v63;
      }
      else
      {
        v64 = 0;
      }
      v83 = -1;
      if ( CharSet::Init(v64, v61) )
      {
        key = (unsigned int)&v76;
        v76 = (int)v64;
        if ( v64 )
          InterlockedIncrement((volatile LONG *)&v64->m_uiRefCount);
        NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
          (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)v79,
          v55,
          (NiPointer<PgWinBut>)v76);
      }
      else if ( v64 )
      {
        v64->vfptr->__vecDelDtor((NiRefObject *)v64, 1u);
      }
    }
  }
  v65 = v77 | 0xFF;
  val.m_pObject = 0;
  v83 = 10;
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(v79, (const char *)(v77 | 0xFF), &val);
  v66 = val.m_pObject;
  v83 = -1;
  if ( val.m_pObject )
  {
    if ( !InterlockedDecrement((volatile LONG *)&val.m_pObject->m_uiRefCount) )
      v66->vfptr->__vecDelDtor((NiRefObject *)v66, 1u);
  }
  else
  {
    switch ( kClassID )
    {
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
        v67 = 1;
        break;
      case 6:
      case 7:
      case 8:
      case 9:
      case 0xA:
        v67 = 6;
        break;
      case 0xB:
      case 0xC:
      case 0xD:
      case 0xE:
      case 0xF:
        v67 = 11;
        break;
      case 0x10:
      case 0x11:
      case 0x12:
      case 0x13:
      case 0x14:
        v67 = 16;
        break;
      case 0x15:
      case 0x16:
      case 0x17:
      case 0x18:
      case 0x19:
        v67 = 21;
        break;
      case 0x1A:
      case 0x1B:
        v67 = 26;
        break;
      default:
        v67 = 0;
        break;
    }
    v68 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), (unsigned __int8)v67);
    v69 = &unk_96F8EB;
    if ( v68 )
      v69 = (NiUnsharedGeometryGroup *)(v68 + 5);
    if ( !Folder::m_bInit )
      Folder::Init();
    v76 = 255;
    sprintf(acFileName, "%s%s-f\\set%03d.nif", &Folder::m_acCharacter, v69, 255);
    v70 = PgUtil::LoadNifFile(acFileName, 0);
    v71 = v70;
    if ( v70 )
    {
      NiObjectNET::SetName((NiObjectNET *)&v70->vfptr, "CharSet");
      v72 = (CharSet *)operator new(0x34u);
      key = (unsigned int)v72;
      v83 = 11;
      if ( v72 )
      {
        CharSet::CharSet(v72);
        v74 = v73;
      }
      else
      {
        v74 = 0;
      }
      v83 = -1;
      if ( CharSet::Init(v74, v71) )
      {
        key = (unsigned int)&v76;
        v76 = (int)v74;
        if ( v74 )
          InterlockedIncrement((volatile LONG *)&v74->m_uiRefCount);
        NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
          (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)v79,
          v65,
          (NiPointer<PgWinBut>)v76);
      }
      else if ( v74 )
      {
        v74->vfptr->__vecDelDtor((NiRefObject *)v74, 1u);
      }
    }
  }
  return 1;
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00651660) --------------------------------------------------------
char __thiscall CharResMgr::LoadFaceTexture(CharResMgr *this, char kClassID)
{
  CharResMgr *v2; // edi@1
  char v3; // al@2
  char *v4; // eax@9
  int v5; // eax@12
  PgWinBut *v6; // ebx@12
  const char *v7; // esi@14
  NiShaderLibrary *v8; // edi@14
  NiImageConverter *v9; // eax@19
  NiPixelData *v10; // eax@19
  NiSourceTexture *v11; // eax@20
  PgWinBut *v12; // edi@20
  signed int v13; // ebx@23
  int v14; // edi@24
  NiShaderLibrary *v15; // esi@24
  NiImageConverter *v16; // eax@29
  NiPixelData *v17; // eax@29
  NiSourceTexture *v18; // eax@30
  PgWinBut *v19; // esi@30
  NiPointer<PgWinBut> v21; // [sp-4h] [bp-150h]@19
  NiTexture::FormatPrefs kPrefs; // [sp+10h] [bp-13Ch]@20
  NiTexture::FormatPrefs v23; // [sp+1Ch] [bp-130h]@30
  int v24; // [sp+28h] [bp-124h]@12
  NiUnsharedGeometryGroup *v25; // [sp+2Ch] [bp-120h]@10
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *v26; // [sp+30h] [bp-11Ch]@12
  NiPointer<NiShaderLibrary> val; // [sp+34h] [bp-118h]@14
  char acFileName[260]; // [sp+38h] [bp-114h]@19
  int v29; // [sp+148h] [bp-4h]@14

  v2 = this;
  switch ( kClassID )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      v3 = 1;
      break;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      v3 = 6;
      break;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      v3 = 11;
      break;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      v3 = 16;
      break;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      v3 = 21;
      break;
    case 0x1A:
    case 0x1B:
      v3 = 26;
      break;
    default:
      v3 = 0;
      break;
  }
  v4 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), (unsigned __int8)v3);
  if ( v4 )
    v25 = (NiUnsharedGeometryGroup *)(v4 + 5);
  else
    v25 = &unk_96F8EB;
  v5 = (unsigned __int8)kClassID << 24;
  v6 = 0;
  v24 = (unsigned __int8)kClassID << 24;
  v26 = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&v2->m_kFaceTextureMap;
  while ( 1 )
  {
    v7 = (const char *)(v5 | (unsigned __int16)v6 | 0x10000);
    val.m_pObject = 0;
    v29 = 0;
    NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(v26, v7, &val);
    v8 = val.m_pObject;
    v29 = -1;
    if ( val.m_pObject )
    {
      if ( !InterlockedDecrement((volatile LONG *)&val.m_pObject->m_uiRefCount) )
        v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    }
    else
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      v21.m_pObject = v6;
      sprintf(acFileName, "%s%s-m\\%s-m-face%03d.dds", &Folder::m_acCharacter, v25, v25, v6);
      v9 = NiImageConverter::GetImageConverter();
      v10 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v9->vfptr[2].__vecDelDtor)(
                             v9,
                             acFileName,
                             0);
      if ( v10 )
      {
        kPrefs.m_ePixelLayout = 6;
        kPrefs.m_eAlphaFmt = 3;
        kPrefs.m_eMipMapped = 0;
        v11 = NiSourceTexture::Create(v10, &kPrefs);
        v12 = (PgWinBut *)v11;
        if ( v11 )
        {
          NiObjectNET::SetName((NiObjectNET *)&v11->vfptr, "FaceTexture");
          v21.m_pObject = v12;
          val.m_pObject = (NiShaderLibrary *)&v21;
          InterlockedIncrement((volatile LONG *)&v12->m_uiRefCount);
          NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
            (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)v26,
            (unsigned int)v7,
            v21);
        }
      }
    }
    v6 = (PgWinBut *)((char *)v6 + 1);
    if ( (signed int)v6 >= 16 )
      break;
    v5 = v24;
  }
  v13 = 0;
  do
  {
    v14 = v24 | (unsigned __int16)v13;
    val.m_pObject = 0;
    v29 = 1;
    NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
      v26,
      (const char *)(v24 | (unsigned __int16)v13),
      &val);
    v15 = val.m_pObject;
    v29 = -1;
    if ( val.m_pObject )
    {
      if ( !InterlockedDecrement((volatile LONG *)&val.m_pObject->m_uiRefCount) )
        v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
    }
    else
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      v21.m_pObject = (PgWinBut *)v13;
      sprintf(acFileName, "%s%s-f\\%s-f-face%03d.dds", &Folder::m_acCharacter, v25, v25, v13);
      v16 = NiImageConverter::GetImageConverter();
      v17 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v16->vfptr[2].__vecDelDtor)(
                             v16,
                             acFileName,
                             0);
      if ( v17 )
      {
        v23.m_ePixelLayout = 6;
        v23.m_eAlphaFmt = 3;
        v23.m_eMipMapped = 0;
        v18 = NiSourceTexture::Create(v17, &v23);
        v19 = (PgWinBut *)v18;
        if ( v18 )
        {
          NiObjectNET::SetName((NiObjectNET *)&v18->vfptr, "FaceTexture");
          v21.m_pObject = v19;
          val.m_pObject = (NiShaderLibrary *)&v21;
          InterlockedIncrement((volatile LONG *)&v19->m_uiRefCount);
          NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
            (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)v26,
            v14,
            v21);
        }
      }
    }
    ++v13;
  }
  while ( v13 < 16 );
  return 1;
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006519D0) --------------------------------------------------------
char __thiscall CharResMgr::PreLoadItemUgradeTextureEffects(CharResMgr *this)
{
  signed int v1; // ebx@1
  NiShaderLibrary *v2; // edi@2
  NiNode *v3; // eax@7
  NiPointer<PgWinBut> v5; // [sp-4h] [bp-130h]@7
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *v6; // [sp+10h] [bp-11Ch]@1
  NiPointer<NiShaderLibrary> val; // [sp+14h] [bp-118h]@2
  char string; // [sp+18h] [bp-114h]@7
  int v9; // [sp+128h] [bp-4h]@2

  v1 = 2;
  v6 = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kDropItemMap;
  do
  {
    val.m_pObject = 0;
    v9 = 0;
    NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
      v6,
      (const char *)(unsigned __int8)v1,
      &val);
    v2 = val.m_pObject;
    v9 = -1;
    if ( val.m_pObject )
    {
      if ( !InterlockedDecrement((volatile LONG *)&val.m_pObject->m_uiRefCount) )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
    else
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      v5.m_pObject = (PgWinBut *)(unsigned __int8)v1;
      sprintf(&string, "%sUpgradeTexEff%02u.nif", &Folder::m_acItem, (unsigned __int8)v1);
      v3 = PgUtil::LoadNifFile(&string, 0);
      if ( v3 )
      {
        v5.m_pObject = (PgWinBut *)v3;
        val.m_pObject = (NiShaderLibrary *)&v5;
        InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
        NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
          (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)v6,
          (unsigned __int8)v1,
          v5);
      }
    }
    ++v1;
  }
  while ( v1 < 6 );
  return 1;
}
// A89130: using guessed type char *Folder::m_acItem;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00651AE0) --------------------------------------------------------
NiSourceTexture *__thiscall CharResMgr::GetSetTexture(CharResMgr *this, char kClassID, char byGender, unsigned __int16 kItemID)
{
  char v4; // bl@2
  int v5; // esi@9
  int v6; // edx@11
  int v7; // eax@12
  NiSourceTexture *result; // eax@13
  char v9; // di@14
  int v10; // eax@14
  int v11; // eax@15
  NiSourceTexture *v12; // eax@25
  NiSourceTexture *v13; // esi@25
  CharResMgr *v14; // [sp+10h] [bp-218h]@1
  char v15; // [sp+18h] [bp-210h]@9
  char acPath[260]; // [sp+1Ch] [bp-20Ch]@14
  char acFileName[260]; // [sp+120h] [bp-108h]@25

  v14 = this;
  switch ( kClassID )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      v4 = 1;
      break;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      v4 = 6;
      break;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      v4 = 11;
      break;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      v4 = 16;
      break;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      v4 = 21;
      break;
    case 0x1A:
    case 0x1B:
      v4 = 26;
      break;
    default:
      v4 = 0;
      break;
  }
  v5 = ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;
  v15 = v4;
  if ( !(unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable
                                                            + 16))(
                           ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable,
                           kItemID) )
    return 0;
  if ( kItemID > *(_WORD *)(v5 + 200) )
    return 0;
  v6 = *(_DWORD *)(v5 + 196);
  if ( !*(_DWORD *)(v6 + 4 * kItemID) )
    return 0;
  v7 = *(_DWORD *)(v6 + 4 * kItemID);
  if ( !v7 )
    return 0;
  v9 = byGender;
  v10 = (unsigned __int8)CharResMgr::GetResourcePath(acPath, 0, (const char *)(v7 + 202), byGender, v4) - 1;
  if ( !v10 )
  {
    v9 = 0;
    goto LABEL_21;
  }
  v11 = v10 - 1;
  if ( !v11 )
  {
LABEL_21:
    v15 = 0;
    goto LABEL_22;
  }
  if ( v11 == 1 )
  {
    switch ( v4 )
    {
      default:
        v15 = 11;
        break;
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
      case 6:
      case 7:
      case 8:
      case 9:
      case 0xA:
      case 0x15:
      case 0x16:
      case 0x17:
      case 0x18:
      case 0x19:
      case 0x1A:
      case 0x1B:
        v15 = 1;
        break;
    }
  }
LABEL_22:
  result = CharResMgr::GetSetTextureFromMap(v14, v15, v9, kItemID);
  if ( !result )
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    sprintf(acFileName, "%s%s", &Folder::m_acCharacter, acPath);
    v12 = PgUtil::LoadSourceTexture(acFileName);
    v13 = v12;
    if ( !v12 )
      return 0;
    NiObjectNET::SetName((NiObjectNET *)&v12->vfptr, "SetTexture");
    CharResMgr::AddSetTextureToMap(v14, v13, v15, v9, kItemID);
    result = v13;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;
// A8C298: using guessed type int ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;

//----- (00651D30) --------------------------------------------------------
bool __thiscall CharResMgr::LoadAllCharSetRes(CharResMgr *this)
{
  CharResMgr *v1; // esi@1
  bool result; // al@2

  v1 = this;
  if ( CharResMgr::LoadCharSetRes(this, 1)
    && CharResMgr::LoadCharSetRes(v1, 6)
    && CharResMgr::LoadCharSetRes(v1, 11)
    && CharResMgr::LoadCharSetRes(v1, 16)
    && CharResMgr::LoadCharSetRes(v1, 21) )
  {
    result = CharResMgr::LoadCharSetRes(v1, 26) != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00651D90) --------------------------------------------------------
bool __thiscall CharResMgr::LoadAllFaceTexture(CharResMgr *this)
{
  CharResMgr *v1; // esi@1
  bool result; // al@2

  v1 = this;
  if ( CharResMgr::LoadFaceTexture(this, 1)
    && CharResMgr::LoadFaceTexture(v1, 6)
    && CharResMgr::LoadFaceTexture(v1, 11)
    && CharResMgr::LoadFaceTexture(v1, 16)
    && CharResMgr::LoadFaceTexture(v1, 21) )
  {
    result = CharResMgr::LoadFaceTexture(v1, 26) != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00651DF0) --------------------------------------------------------
NiControllerSequence *__thiscall CharResMgr::GetControllerSequence(CharResMgr *this, char kClassID, char byGender, unsigned int dwAniEventCode)
{
  CharResMgr *v4; // edi@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *v5; // eax@9
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v6; // esi@9
  NiControllerSequence *result; // eax@10
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v8; // eax@11

  v4 = this;
  switch ( kClassID )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      kClassID = 1;
      break;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      kClassID = 6;
      break;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      kClassID = 11;
      break;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      kClassID = 16;
      break;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      kClassID = 21;
      break;
    case 0x1A:
    case 0x1B:
      kClassID = 26;
      break;
    default:
      kClassID = 0;
      break;
  }
  *(_DWORD *)&kClassID = CharResMgr::GetCharActorFromMap_NoClone(this, kClassID, byGender);
  v5 = std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::find(
         (std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *)&v4->m_kKfMap.comp,
         (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *)&byGender,
         (NiActorManager *const *)&kClassID);
  v6 = v5->_Ptr;
  if ( v5->_Ptr == v4->m_kKfMap._Myhead
    || (v8 = std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::find(
               (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v6->_Myval.second,
               (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&kClassID,
               &dwAniEventCode)->_Ptr,
        v8 == (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v6->_Myval.second._Myhead) )
  {
    result = 0;
  }
  else
  {
    result = (NiControllerSequence *)NiObject::Clone((NiObject *)v8->_Myval.second);
  }
  return result;
}

//----- (00651F00) --------------------------------------------------------
NiActorManager *__thiscall CharResMgr::GetMoverActor(CharResMgr *this, unsigned int kMoverID)
{
  NiActorManager *result; // eax@1
  MoverMain *v3; // eax@2
  MoverView *v4; // edi@3
  int v5; // esi@6
  const char *v6; // edi@9
  NiSourceTexture *v7; // eax@9
  NiSourceTexture *v8; // esi@9
  NiNode *v9; // eax@18
  NiActorManager *v10; // esi@20
  NiActorManager *v11; // esi@20
  ResetTexture kResetTexture; // [sp+10h] [bp-130h]@19
  CharResMgr *v13; // [sp+1Ch] [bp-124h]@1
  unsigned int v14; // [sp+20h] [bp-120h]@1
  NiActorManager *pkActor; // [sp+24h] [bp-11Ch]@6
  NiPointer<NiSourceTexture> spTexture; // [sp+28h] [bp-118h]@9
  char acFileName[260]; // [sp+2Ch] [bp-114h]@6
  int v18; // [sp+13Ch] [bp-4h]@11

  v13 = this;
  v14 = kMoverID;
  result = CharResMgr::GetMoverActorFromMap(this, kMoverID);
  if ( !result )
  {
    v3 = MoverMainTab::GetByMoverID(kMoverID);
    if ( !v3 )
      goto LABEL_24;
    v4 = MoverViewTab::GetByMoverIdx(v3->MoverIDX);
    if ( !v4 )
      goto LABEL_24;
    if ( !Folder::m_bInit )
      Folder::Init();
    v5 = (int)v4->FolderName;
    sprintf(acFileName, "%s%s\\%s.kfm", &Folder::m_acCharacter, v4->FolderName, v4->FolderName);
    pkActor = NiActorManager::Create(acFileName, 0, 1, 0);
    if ( pkActor )
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      v6 = v4->Texture;
      sprintf(acFileName, "%s%s\\%s.dds", &Folder::m_acCharacter, v5, v6);
      v7 = NiSourceTexture::Create(acFileName, &NiSourceTexture::ms_kDefaultPrefs, 0);
      v8 = v7;
      spTexture.m_pObject = v7;
      if ( v7 )
        InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
      v18 = 0;
      if ( !strcmp(v6, "-") || !strcmp(v6, (const char *)&unk_9B99B7) )
      {
        if ( v8 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
            v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
          spTexture.m_pObject = 0;
        }
      }
      else if ( v8 )
      {
        v9 = (NiNode *)pkActor->m_spNIFRoot.m_pObject;
        if ( v9 )
        {
          kResetTexture.m_pCallBack = 0;
          kResetTexture.m_nCurLevel = -1;
          kResetTexture.vfptr = (Ns_TourSceneVtbl *)&ResetTexture::`vftable';
          LOBYTE(v18) = 1;
          Ns_TourScene::TourScene((Ns_TourScene *)&kResetTexture.vfptr, v9, &NiAVObject::m_RTTI, v8);
          LOBYTE(v18) = 0;
          kResetTexture.vfptr = (Ns_TourSceneVtbl *)&Ns_TourScene::`vftable';
        }
      }
      v10 = pkActor;
      CharResMgr::AddMoverActorToMap(v13, pkActor, v14);
      NiObjectNET::ms_eCopyType = 1;
      v11 = NiActorManager::Clone(v10);
      v18 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexture);
      result = v11;
    }
    else
    {
LABEL_24:
      result = 0;
    }
  }
  return result;
}
// 9B8DD0: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *Ns_TourScene::`vftable')(Ns_TourScene *this, NiAVObject *_pkObject, void *);
// 9BA020: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *ResetTexture::`vftable')(ResetTexture *this, NiAVObject *_pkObject, void *);
// A8975C: using guessed type bool Folder::m_bInit;
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (00652150) --------------------------------------------------------
NiActorManager *__thiscall CharResMgr::GetPetActor(CharResMgr *this, unsigned int kPetID)
{
  NiActorManager *result; // eax@1
  PupMain *v3; // eax@2
  PupView *v4; // esi@3
  int v5; // edi@6
  NiActorManager *v6; // eax@6
  NiNode *v7; // ecx@7
  const char *v8; // esi@8
  char *v9; // eax@8
  const char *v10; // eax@8
  NiSourceTexture *v11; // edi@8
  ResetTexture kResetTexture; // [sp+Ch] [bp-134h]@17
  CharResMgr *v13; // [sp+18h] [bp-128h]@1
  NiNode *pkRoot; // [sp+1Ch] [bp-124h]@7
  unsigned int v15; // [sp+20h] [bp-120h]@1
  NiActorManager *pkActor; // [sp+24h] [bp-11Ch]@6
  NiPointer<NiSourceTexture> spTexture; // [sp+28h] [bp-118h]@8
  char acFileName[260]; // [sp+2Ch] [bp-114h]@6
  int v19; // [sp+13Ch] [bp-4h]@10

  v13 = this;
  v15 = kPetID;
  result = CharResMgr::GetPetActorFromMap(this, kPetID);
  if ( !result )
  {
    v3 = PetMainTab::GetByPetID(kPetID);
    if ( !v3 )
      goto LABEL_23;
    v4 = PetViewTab::GetByPetIdx(v3->PupIDX);
    if ( !v4 )
      goto LABEL_23;
    if ( !Folder::m_bInit )
      Folder::Init();
    v5 = (int)v4->FileName;
    sprintf(acFileName, "%s%s\\%s.kfm", &Folder::m_acCharacter, v4->FileName, v4->FileName);
    v6 = NiActorManager::Create(acFileName, 0, 1, 0);
    pkActor = v6;
    if ( v6 )
    {
      v7 = (NiNode *)v6->m_spNIFRoot.m_pObject;
      pkRoot = v7;
      if ( v7 )
      {
        spTexture.m_pObject = (NiSourceTexture *)v4->PupSize;
        v8 = v4->Texture;
        *(float *)&spTexture.m_pObject = (double)(signed int)spTexture.m_pObject / 1000.0;
        *(float *)&spTexture.m_pObject = fabs(*(float *)&spTexture.m_pObject);
        v7->m_kLocal.m_fScale = *(float *)&spTexture.m_pObject;
        v9 = Folder::Character();
        v10 = fs("%s%s\\%s.dds", v9, v5, v8);
        v11 = NiSourceTexture::Create(v10, &NiSourceTexture::ms_kDefaultPrefs, 0);
        spTexture.m_pObject = v11;
        if ( v11 )
          InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
        v19 = 0;
        if ( !strcmp(v8, "-") || !strcmp(v8, (const char *)&unk_9B99D5) )
        {
          if ( v11 )
          {
            if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) )
              v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
            *(float *)&spTexture.m_pObject = 0.0;
          }
        }
        else if ( v11 )
        {
          kResetTexture.m_pCallBack = 0;
          kResetTexture.m_nCurLevel = -1;
          kResetTexture.vfptr = (Ns_TourSceneVtbl *)&ResetTexture::`vftable';
          LOBYTE(v19) = 1;
          Ns_TourScene::TourScene((Ns_TourScene *)&kResetTexture.vfptr, pkRoot, &NiAVObject::m_RTTI, v11);
          kResetTexture.vfptr = (Ns_TourSceneVtbl *)&Ns_TourScene::`vftable';
        }
        v19 = -1;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexture);
        v6 = pkActor;
      }
      CharResMgr::AddPetActorToMap(v13, v6, v15);
      NiObjectNET::ms_eCopyType = 1;
      result = NiActorManager::Clone(pkActor);
    }
    else
    {
LABEL_23:
      result = 0;
    }
  }
  return result;
}
// 9B8DD0: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *Ns_TourScene::`vftable')(Ns_TourScene *this, NiAVObject *_pkObject, void *);
// 9BA020: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *ResetTexture::`vftable')(ResetTexture *this, NiAVObject *_pkObject, void *);
// A8975C: using guessed type bool Folder::m_bInit;
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (006523D0) --------------------------------------------------------
NiTexture *__thiscall CharResMgr::GetHairBaseTexFromMap(CharResMgr *this, HairInfo *pkHairInfo, char kClassID, char byGender, unsigned int uiType)
{
  CharResMgr *v5; // esi@1
  const char *v6; // edi@2
  char acPath[260]; // [sp+8h] [bp-108h]@1

  v5 = this;
  acPath[0] = 0;
  memset(&acPath[1], 0, 0x103u);
  switch ( uiType )
  {
    case 1u:
      v6 = pkHairInfo->FrontTex;
      goto LABEL_8;
    case 2u:
      v6 = pkHairInfo->BottomTex;
      goto LABEL_8;
    case 3u:
      v6 = pkHairInfo->TopTex;
      goto LABEL_8;
    case 4u:
      v6 = pkHairInfo->Acc1Tex;
      goto LABEL_8;
    case 5u:
      v6 = pkHairInfo->Acc2Tex;
      goto LABEL_8;
    case 6u:
      v6 = pkHairInfo->Acc3Tex;
LABEL_8:
      CharResMgr::GetResourcePath(acPath, 0, v6, byGender, kClassID);
      break;
    default:
      return CharResMgr::GetHairTextureFromMap(v5, acPath);
  }
  return CharResMgr::GetHairTextureFromMap(v5, acPath);
}

//----- (006524A0) --------------------------------------------------------
void __thiscall CharResMgr::RemoveAllItem(CharResMgr *this)
{
  CharResMgr *v1; // edi@1

  v1 = this;
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kItemMap);
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::_Erase(
    (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *)&v1->m_kSubItemMap,
    (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)v1->m_kSubItemMap._Myhead->_Parent);
  v1->m_kSubItemMap._Myhead->_Parent = v1->m_kSubItemMap._Myhead;
  v1->m_kSubItemMap._Myhead->_Left = v1->m_kSubItemMap._Myhead;
  v1->m_kSubItemMap._Myhead->_Right = v1->m_kSubItemMap._Myhead;
  v1->m_kSubItemMap._Mysize = 0;
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::_Erase(
    (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *)&v1->m_kSubItemTextureMap.comp,
    v1->m_kSubItemTextureMap._Myhead->_Parent);
  v1->m_kSubItemTextureMap._Myhead->_Parent = v1->m_kSubItemTextureMap._Myhead;
  v1->m_kSubItemTextureMap._Myhead->_Left = v1->m_kSubItemTextureMap._Myhead;
  v1->m_kSubItemTextureMap._Myhead->_Right = v1->m_kSubItemTextureMap._Myhead;
  v1->m_kSubItemTextureMap._Mysize = 0;
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::_Erase(
    (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *)&v1->m_kItemTextureMap.comp,
    v1->m_kItemTextureMap._Myhead->_Parent);
  v1->m_kItemTextureMap._Myhead->_Parent = v1->m_kItemTextureMap._Myhead;
  v1->m_kItemTextureMap._Myhead->_Left = v1->m_kItemTextureMap._Myhead;
  v1->m_kItemTextureMap._Myhead->_Right = v1->m_kItemTextureMap._Myhead;
  v1->m_kItemTextureMap._Mysize = 0;
}

//----- (00652560) --------------------------------------------------------
void __thiscall CharResMgr::RemoveAllHairTexture(CharResMgr *this)
{
  char *v1; // esi@1

  v1 = (char *)&this->m_kHairTextureMap;
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::_Erase(
    (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *)&this->m_kHairTextureMap.comp,
    this->m_kHairTextureMap._Myhead->_Parent);
  *(_DWORD *)(*((_DWORD *)v1 + 1) + 4) = *((_DWORD *)v1 + 1);
  **((_DWORD **)v1 + 1) = *((_DWORD *)v1 + 1);
  *(_DWORD *)(*((_DWORD *)v1 + 1) + 8) = *((_DWORD *)v1 + 1);
  *((_DWORD *)v1 + 2) = 0;
}

//----- (006525A0) --------------------------------------------------------
void __thiscall CharResMgr::RemoveAllHouse(CharResMgr *this)
{
  CharResMgr *v1; // esi@1

  v1 = this;
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kHouseMap);
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::_Erase(
    (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *)&v1->m_kMiniHouseTextureMap.comp,
    v1->m_kMiniHouseTextureMap._Myhead->_Parent);
  v1->m_kMiniHouseTextureMap._Myhead->_Parent = v1->m_kMiniHouseTextureMap._Myhead;
  v1->m_kMiniHouseTextureMap._Myhead->_Left = v1->m_kMiniHouseTextureMap._Myhead;
  v1->m_kMiniHouseTextureMap._Myhead->_Right = v1->m_kMiniHouseTextureMap._Myhead;
  v1->m_kMiniHouseTextureMap._Mysize = 0;
}

//----- (006525F0) --------------------------------------------------------
NiNode *__thiscall CharResMgr::GetHouse(CharResMgr *this, unsigned int dwHouse)
{
  CharResMgr *v2; // esi@1
  NiNode *result; // eax@1
  MiniHouse *v4; // eax@2
  ItemInfo *v5; // eax@3
  int v6; // eax@4
  ItemViewInfo *v7; // ebx@4
  NiNode *v8; // edi@7
  const char *v9; // ebx@8
  NiNode *v10; // eax@10
  NiTexture *v11; // esi@10
  char *v12; // eax@11
  NiSourceTexture *v13; // eax@11
  NiNode *v14; // eax@16
  NiNode *v15; // esi@19
  NiNode *v16; // edi@22
  NiPointer<PgWinBut> v17; // [sp-4h] [bp-250h]@4
  Ns_TourScene v18; // [sp+10h] [bp-23Ch]@16
  ResetTexture kResetTexture; // [sp+1Ch] [bp-230h]@10
  CharResMgr *v20; // [sp+28h] [bp-224h]@1
  unsigned int dwHouseID; // [sp+2Ch] [bp-220h]@1
  NiPointer<NiTexture> spSubItemTexture; // [sp+30h] [bp-21Ch]@13
  char szFileName[260]; // [sp+34h] [bp-218h]@11
  char acFileName[260]; // [sp+138h] [bp-114h]@7
  int v25; // [sp+248h] [bp-4h]@10

  v2 = this;
  v20 = this;
  dwHouseID = dwHouse;
  result = CharResMgr::GetHouseFromMap(this, dwHouse);
  if ( result )
    return result;
  v4 = MiniHouseTable::GetByHandle(dwHouse);
  if ( !v4
    || (v5 = ItemInfoTab::GetByInxName(v4->ItemID)) == 0
    || (v6 = v5->ID,
        v17.m_pObject = (PgWinBut *)1,
        (v7 = IIDTableBase<ItemViewInfo,ItemViewInfoTab,unsigned short>::GetByID(v6)) == 0) )
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    sprintf(acFileName, "%s\\MiniHouse\\%s.nif", &Folder::m_acCharacter, "mushroom");
    v16 = PgUtil::LoadNifFile(acFileName, 0);
    if ( v16 )
    {
      spSubItemTexture.m_pObject = (NiTexture *)&v17;
      v17.m_pObject = (PgWinBut *)v16;
      InterlockedIncrement((volatile LONG *)&v16->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v2->m_kHouseMap,
        0,
        v17);
      return (NiNode *)NiObject::Clone((NiObject *)&v16->vfptr);
    }
    return 0;
  }
  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acFileName, "%s\\MiniHouse\\%s.nif", &Folder::m_acCharacter, v7->LinkFile);
  v8 = PgUtil::LoadNifFile(acFileName, 0);
  if ( !v8 )
    return 0;
  v9 = v7->TextureFile;
  if ( _mbscmp(v9, "-") )
  {
    kResetTexture.m_pCallBack = 0;
    kResetTexture.m_nCurLevel = -1;
    kResetTexture.vfptr = (Ns_TourSceneVtbl *)&ResetTexture::`vftable';
    v25 = 0;
    v10 = (NiNode *)NiNode::GetAt(v8, 0);
    Ns_TourScene::TourScene((Ns_TourScene *)&kResetTexture.vfptr, v10, &NiAVObject::m_RTTI, 0);
    NiObjectNET::ms_eCopyType = 1;
    v11 = CharResMgr::GetMiniHouseTextureMap(v2, v9);
    if ( !v11 )
    {
      v12 = Folder::Character();
      sprintf(szFileName, "%s\\MiniHouse\\%s.dds", v12, v9);
      v13 = PgUtil::LoadSourceTexture(szFileName);
      v11 = (NiTexture *)v13;
      if ( v13 )
        CharResMgr::AddMiniHouseTextureToMap(v20, (NiTexture *)&v13->vfptr, v9);
    }
    spSubItemTexture.m_pObject = v11;
    if ( v11 )
      InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
    LOBYTE(v25) = 1;
    if ( v11 )
    {
      v18.m_pCallBack = 0;
      v18.m_nCurLevel = -1;
      v18.vfptr = (Ns_TourSceneVtbl *)&ResetTexture::`vftable';
      LOBYTE(v25) = 2;
      v14 = (NiNode *)NiNode::GetAt(v8, 0);
      if ( v14 )
        Ns_TourScene::TourScene(&v18, v14, &NiAVObject::m_RTTI, v11);
      LOBYTE(v25) = 1;
    }
    CharResMgr::AddHouseToMap(v20, v8, dwHouseID);
    v15 = (NiNode *)NiObject::Clone((NiObject *)&v8->vfptr);
    LOBYTE(v25) = 0;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spSubItemTexture);
    result = v15;
  }
  else
  {
    CharResMgr::AddHouseToMap(v2, v8, dwHouseID);
    result = (NiNode *)NiObject::Clone((NiObject *)&v8->vfptr);
  }
  return result;
}
// 9BA020: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *ResetTexture::`vftable')(ResetTexture *this, NiAVObject *_pkObject, void *);
// A8975C: using guessed type bool Folder::m_bInit;
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (006528A0) --------------------------------------------------------
NiNode *__thiscall CharResMgr::GetHair(CharResMgr *this, char kClassID, char byGender, char byHairIndexID, char byPartsNum, const char *pchModelName, const char *pchTexName)
{
  char v7; // bl@1
  CharResMgr *v8; // edi@1
  int v9; // eax@1
  int v10; // eax@2
  char v11; // bl@12
  NiNode *v12; // esi@19
  NiSourceTexture *v13; // eax@20
  NiObjectNET *v14; // edi@20
  int v15; // edx@23
  int v16; // esi@23
  NiTexture *v17; // ebx@28
  NiSourceTexture *v18; // edi@28
  NiImageConverter *v19; // eax@31
  NiPixelData *v20; // eax@31
  bool v21; // zf@41
  NiNode *v22; // eax@42
  char *v24; // [sp-4h] [bp-254h]@20
  NiPointer<NiSourceTexture> spTexture; // [sp+10h] [bp-240h]@20
  char byID[4]; // [sp+14h] [bp-23Ch]@1
  ResetTexture kResetTexture; // [sp+18h] [bp-238h]@32
  NiPointer<NiTexture> spSubItemTexture; // [sp+24h] [bp-22Ch]@1
  char v29[4]; // [sp+28h] [bp-228h]@1
  CharResMgr *v30; // [sp+2Ch] [bp-224h]@1
  char v31[4]; // [sp+30h] [bp-220h]@1
  char v32[4]; // [sp+34h] [bp-21Ch]@1
  char acFileName[260]; // [sp+38h] [bp-218h]@11
  char acPath[260]; // [sp+13Ch] [bp-114h]@1
  int v35; // [sp+24Ch] [bp-4h]@22

  v7 = kClassID;
  v8 = this;
  byID[0] = byHairIndexID;
  v29[0] = byPartsNum;
  v32[0] = kClassID;
  v31[0] = byGender;
  spSubItemTexture.m_pObject = (NiTexture *)pchTexName;
  v30 = this;
  v9 = (unsigned __int8)CharResMgr::GetResourcePath(acPath, 1, pchModelName, byGender, kClassID) - 1;
  if ( v9 )
  {
    v10 = v9 - 1;
    if ( v10 )
    {
      if ( v10 == 1 )
      {
        switch ( kClassID )
        {
          default:
            v7 = 11;
            break;
          case 1:
          case 2:
          case 3:
          case 4:
          case 5:
          case 6:
          case 7:
          case 8:
          case 9:
          case 0xA:
          case 0x15:
          case 0x16:
          case 0x17:
          case 0x18:
          case 0x19:
          case 0x1A:
          case 0x1B:
            v7 = 1;
            break;
        }
      }
    }
    else
    {
      v7 = 0;
    }
  }
  else
  {
    v7 = 0;
    v31[0] = 0;
  }
  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acFileName, "%s%s", &Folder::m_acCharacter, acPath);
  switch ( v7 )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      v11 = 1;
      break;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      v11 = 6;
      break;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      v11 = 11;
      break;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      v11 = 16;
      break;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      v11 = 21;
      break;
    case 0x1A:
    case 0x1B:
      v11 = 26;
      break;
    default:
      v11 = 0;
      break;
  }
  v32[0] = v11;
  v12 = CharResMgr::GetHairFromMap(v8, v11, v31[0], byID[0], v29[0]);
  if ( !v12 )
  {
    v24 = (char *)1;
    v13 = (NiSourceTexture *)PgUtil::LoadNifFile(acFileName, 0);
    v14 = (NiObjectNET *)v13;
    spTexture.m_pObject = v13;
    if ( v13 )
      InterlockedIncrement((volatile LONG *)&v13->m_uiRefCount);
    v35 = 0;
    if ( !v14 )
      return 0;
    NiObjectNET::SetName(v14, "Hair");
    v15 = (unsigned __int8)v29[0];
    *(_DWORD *)v29 = &v24;
    v16 = v15 | (((unsigned __int8)byID[0] | (((unsigned __int8)v31[0] | ((unsigned __int8)v11 << 8)) << 8)) << 8);
    v24 = (char *)v14;
    InterlockedIncrement((volatile LONG *)&v14->m_uiRefCount);
    NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
      (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v30->m_kHairMap,
      v16,
      (NiPointer<PgWinBut>)v24);
    NiObjectNET::ms_eCopyType = 1;
    v12 = (NiNode *)NiObject::Clone((NiObject *)&v14->vfptr);
    v35 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v14->m_uiRefCount) )
      v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
    v8 = v30;
  }
  memset(acFileName, 0, 0x104u);
  memset(acPath, 0, 0x104u);
  CharResMgr::GetResourcePath(acPath, 0, (const char *)spSubItemTexture.m_pObject, v31[0], v32[0]);
  if ( !Folder::m_bInit )
    Folder::Init();
  v24 = acPath;
  sprintf(acFileName, "%s%s", &Folder::m_acCharacter, acPath);
  v17 = CharResMgr::GetHairTextureFromMap(v8, acPath);
  v18 = 0;
  spSubItemTexture.m_pObject = v17;
  if ( v17 )
    InterlockedIncrement((volatile LONG *)&v17->m_uiRefCount);
  v35 = 1;
  if ( v17 )
    goto LABEL_53;
  v19 = NiImageConverter::GetImageConverter();
  v20 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v19->vfptr[2].__vecDelDtor)(
                         v19,
                         acFileName,
                         0);
  if ( v20 )
  {
    kResetTexture.vfptr = (Ns_TourSceneVtbl *)6;
    kResetTexture.m_pCallBack = (Ns_TourScene::TS_RESULT (__cdecl *)(NiAVObject *, void *))3;
    kResetTexture.m_nCurLevel = 0;
    v18 = NiSourceTexture::Create(v20, (NiTexture::FormatPrefs *)&kResetTexture);
  }
  spTexture.m_pObject = v18;
  if ( v18 )
    InterlockedIncrement((volatile LONG *)&v18->m_uiRefCount);
  LOBYTE(v35) = 2;
  if ( v18 )
  {
    CharResMgr::AddHairTextureToMap(v30, (NiTexture *)&v18->vfptr, acPath);
    v17 = (NiTexture *)v18;
    spSubItemTexture.m_pObject = (NiTexture *)v18;
    InterlockedIncrement((volatile LONG *)&v18->m_uiRefCount);
  }
  LOBYTE(v35) = 1;
  if ( v18 && !InterlockedDecrement((volatile LONG *)&v18->m_uiRefCount) )
    v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
  if ( v17 )
  {
LABEL_53:
    kResetTexture.m_pCallBack = 0;
    kResetTexture.m_nCurLevel = -1;
    kResetTexture.vfptr = (Ns_TourSceneVtbl *)&ResetTexture::`vftable';
    v21 = v12->m_kChildren.m_uiSize == 0;
    LOBYTE(v35) = 3;
    if ( !v21 )
    {
      v22 = (NiNode *)v12->m_kChildren.m_pBase->m_pObject;
      if ( v22 )
        Ns_TourScene::TourScene((Ns_TourScene *)&kResetTexture.vfptr, v22, &NiAVObject::m_RTTI, v17);
    }
    kResetTexture.vfptr = (Ns_TourSceneVtbl *)&Ns_TourScene::`vftable';
  }
  v35 = -1;
  if ( v17 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v17->m_uiRefCount) )
      v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
  }
  return v12;
}
// 9B8DD0: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *Ns_TourScene::`vftable')(Ns_TourScene *this, NiAVObject *_pkObject, void *);
// 9BA020: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *ResetTexture::`vftable')(ResetTexture *this, NiAVObject *_pkObject, void *);
// A8975C: using guessed type bool Folder::m_bInit;
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (00652D40) --------------------------------------------------------
void __stdcall CharResMgr::SetHairTexture2TargetNode(NiNode *pkTargetNode, char byGender, char kClassID, const char *pchTexName)
{
  NiTexture *v5; // edi@3
  NiImageConverter *v6; // eax@6
  NiPixelData *v7; // eax@6
  NiSourceTexture *v8; // esi@7
  ResetTexture kResetTexture; // [sp+1Ch] [bp-224h]@8
  char acFileName[260]; // [sp+28h] [bp-218h]@1
  char acPath[260]; // [sp+12Ch] [bp-114h]@1
  int v12; // [sp+23Ch] [bp-4h]@5

  memset(acFileName, 0, 0x104u);
  memset(acPath, 0, 0x104u);
  CharResMgr::GetResourcePath(acPath, 0, pchTexName, byGender, kClassID);
  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acFileName, "%s%s", &Folder::m_acCharacter, acPath);
  v5 = CharResMgr::GetHairTextureFromMap(&g_kCharResMgr, acPath);
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v12 = 0;
  if ( v5 )
    goto LABEL_23;
  v6 = NiImageConverter::GetImageConverter();
  v7 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v6->vfptr[2].__vecDelDtor)(
                        v6,
                        acFileName,
                        0);
  if ( v7 )
  {
    kResetTexture.vfptr = (Ns_TourSceneVtbl *)6;
    kResetTexture.m_pCallBack = (Ns_TourScene::TS_RESULT (__cdecl *)(NiAVObject *, void *))3;
    kResetTexture.m_nCurLevel = 0;
    v8 = NiSourceTexture::Create(v7, (NiTexture::FormatPrefs *)&kResetTexture);
  }
  else
  {
    v8 = 0;
  }
  if ( v8 )
    InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  LOBYTE(v12) = 1;
  if ( v8 )
  {
    CharResMgr::AddHairTextureToMap(&g_kCharResMgr, (NiTexture *)&v8->vfptr, acPath);
    v5 = (NiTexture *)v8;
    InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  }
  LOBYTE(v12) = 0;
  if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
    v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
  if ( v5 )
  {
LABEL_23:
    kResetTexture.m_pCallBack = 0;
    kResetTexture.m_nCurLevel = -1;
    kResetTexture.vfptr = (Ns_TourSceneVtbl *)&ResetTexture::`vftable';
    LOBYTE(v12) = 2;
    Ns_TourScene::TourScene((Ns_TourScene *)&kResetTexture.vfptr, pkTargetNode, &NiAVObject::m_RTTI, v5);
    kResetTexture.vfptr = (Ns_TourSceneVtbl *)&Ns_TourScene::`vftable';
  }
  v12 = -1;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  }
}
// 9B8DD0: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *Ns_TourScene::`vftable')(Ns_TourScene *this, NiAVObject *_pkObject, void *);
// 9BA020: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *ResetTexture::`vftable')(ResetTexture *this, NiAVObject *_pkObject, void *);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00652F50) --------------------------------------------------------
NiSourceTexture *__thiscall CharResMgr::GetItemTexture(CharResMgr *this, const char *szName, char byPathRuleType)
{
  CharResMgr *v3; // edi@1
  NiSourceTexture *result; // eax@1
  NiImageConverter *v5; // eax@18
  NiPixelData *v6; // eax@18
  NiSourceTexture *v7; // esi@19
  NiSourceTexture *v8; // eax@20
  const char *v9; // [sp-Ch] [bp-32Ch]@6
  char **v10; // [sp-8h] [bp-328h]@6
  const char *v11; // [sp-4h] [bp-324h]@6
  NiTexture::FormatPrefs kPrefs; // [sp+Ch] [bp-314h]@20
  char strKey[512]; // [sp+18h] [bp-308h]@1
  char szFileName[260]; // [sp+218h] [bp-108h]@10

  v3 = this;
  sprintf(strKey, "%d_%s", (unsigned __int8)byPathRuleType, szName);
  result = (NiSourceTexture *)CharResMgr::GetItemTextureMap(v3, strKey);
  if ( result )
    return result;
  if ( byPathRuleType == -1 )
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    v11 = szName;
    v10 = &Folder::m_acItem;
    v9 = "%s%s.dds";
  }
  else
  {
    if ( *szName != 95 )
    {
      if ( byPathRuleType )
      {
        if ( !Folder::m_bInit )
          Folder::Init();
        sprintf(szFileName, "%sMale\\%s.dds", &Folder::m_acItem, szName);
      }
      else
      {
        if ( !Folder::m_bInit )
          Folder::Init();
        sprintf(szFileName, "%sFemale\\%s.dds", &Folder::m_acItem, szName);
      }
      goto LABEL_18;
    }
    if ( !Folder::m_bInit )
      Folder::Init();
    v11 = szName;
    v10 = &Folder::m_acItem;
    v9 = "%s%s.dds";
  }
  sprintf(szFileName, v9, v10, v11);
LABEL_18:
  v5 = NiImageConverter::GetImageConverter();
  v6 = (NiPixelData *)((int (__thiscall *)(_DWORD, _DWORD, _DWORD))v5->vfptr[2].__vecDelDtor)(v5, szFileName, 0);
  if ( v6 )
  {
    kPrefs.m_ePixelLayout = 6;
    kPrefs.m_eAlphaFmt = 3;
    kPrefs.m_eMipMapped = 0;
    v8 = NiSourceTexture::Create(v6, &kPrefs);
    v7 = v8;
    if ( v8 )
      CharResMgr::AddItemTextureToMap(v3, (NiTexture *)&v8->vfptr, strKey);
  }
  else
  {
    v7 = 0;
  }
  return v7;
}
// A89130: using guessed type char *Folder::m_acItem;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006530B0) --------------------------------------------------------
NiNode *__thiscall CharResMgr::GetSubItem(CharResMgr *this, const char *szName, char kClassID, char byGender, const char *szTexName)
{
  CharResMgr *v5; // edi@1
  NiNode *v6; // esi@1
  NiNode *v7; // eax@4
  NiObjectNET *v8; // esi@4
  NiSourceTexture *v9; // esi@9
  NiTexture *v10; // eax@11
  void *v11; // ebx@11
  NiImageConverter *v12; // eax@14
  NiPixelData *v13; // eax@14
  bool v14; // zf@24
  NiNode *v15; // eax@25
  ResetTexture kResetTexture; // [sp+14h] [bp-22Ch]@15
  NiPointer<NiTexture> spSubItemTexture; // [sp+20h] [bp-220h]@1
  NiPointer<NiNode> spLoadData; // [sp+24h] [bp-21Ch]@1
  char acFileName[260]; // [sp+28h] [bp-218h]@3
  char acPath[260]; // [sp+12Ch] [bp-114h]@1
  int v22; // [sp+23Ch] [bp-4h]@6

  v5 = this;
  spSubItemTexture.m_pObject = (NiTexture *)szTexName;
  CharResMgr::GetResourcePath(acPath, 1, szName, byGender, kClassID);
  v6 = CharResMgr::GetSubItemFromMap(v5, acPath);
  spLoadData.m_pObject = v6;
  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acFileName, "%s%s", &Folder::m_acCharacter, acPath);
  if ( !v6 )
  {
    v7 = PgUtil::LoadNifFile(acFileName, 0);
    v8 = (NiObjectNET *)v7;
    spLoadData.m_pObject = v7;
    if ( v7 )
      InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
    v22 = 0;
    if ( !v8 )
      return 0;
    NiObjectNET::SetName(v8, szName);
    CharResMgr::AddSubItemToMap(v5, (NiNode *)v8, acPath);
    NiObjectNET::ms_eCopyType = 1;
    spLoadData.m_pObject = (NiNode *)NiObject::Clone((NiObject *)&v8->vfptr);
    v22 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
  }
  memset(acFileName, 0, 0x104u);
  v9 = 0;
  memset(acPath, 0, 0x104u);
  CharResMgr::GetResourcePath(acPath, 0, (const char *)spSubItemTexture.m_pObject, byGender, kClassID);
  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acFileName, "%s%s", &Folder::m_acCharacter, acPath);
  v10 = CharResMgr::GetSubItemTextureMap(v5, acPath);
  v11 = v10;
  spSubItemTexture.m_pObject = v10;
  if ( v10 )
    InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
  v22 = 1;
  if ( v11 )
    goto LABEL_36;
  v12 = NiImageConverter::GetImageConverter();
  v13 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v12->vfptr[2].__vecDelDtor)(
                         v12,
                         acFileName,
                         0);
  if ( v13 )
  {
    kResetTexture.vfptr = (Ns_TourSceneVtbl *)6;
    kResetTexture.m_pCallBack = (Ns_TourScene::TS_RESULT (__cdecl *)(NiAVObject *, void *))3;
    kResetTexture.m_nCurLevel = 0;
    v9 = NiSourceTexture::Create(v13, (NiTexture::FormatPrefs *)&kResetTexture);
  }
  if ( v9 )
    InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  LOBYTE(v22) = 2;
  if ( v9 )
  {
    CharResMgr::AddSubItemTextureToMap(v5, (NiTexture *)&v9->vfptr, acPath);
    v11 = v9;
    spSubItemTexture.m_pObject = (NiTexture *)v9;
    InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  }
  LOBYTE(v22) = 1;
  if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
    v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
  if ( v11 )
  {
LABEL_36:
    kResetTexture.m_pCallBack = 0;
    kResetTexture.m_nCurLevel = -1;
    kResetTexture.vfptr = (Ns_TourSceneVtbl *)&ResetTexture::`vftable';
    v14 = spLoadData.m_pObject->m_kChildren.m_uiSize == 0;
    LOBYTE(v22) = 3;
    if ( !v14 )
    {
      v15 = (NiNode *)spLoadData.m_pObject->m_kChildren.m_pBase->m_pObject;
      if ( v15 )
        Ns_TourScene::TourScene((Ns_TourScene *)&kResetTexture.vfptr, v15, &NiAVObject::m_RTTI, v11);
    }
    kResetTexture.vfptr = (Ns_TourSceneVtbl *)&Ns_TourScene::`vftable';
  }
  v22 = -1;
  if ( v11 )
  {
    if ( !InterlockedDecrement((volatile LONG *)v11 + 1) )
      (**(void (__thiscall ***)(void *, signed int))v11)(v11, 1);
  }
  return spLoadData.m_pObject;
}
// 9B8DD0: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *Ns_TourScene::`vftable')(Ns_TourScene *this, NiAVObject *_pkObject, void *);
// 9BA020: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *ResetTexture::`vftable')(ResetTexture *this, NiAVObject *_pkObject, void *);
// A8975C: using guessed type bool Folder::m_bInit;
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (006533D0) --------------------------------------------------------
void __thiscall CharResMgr::LoadHairParts(CharResMgr *this, char kClassID, char byGender, char byIndexID, char byPartsIndex, bool bUseLink, const char *pchModelName, const char *pchTexName)
{
  if ( strlen(pchModelName) && strcmp(pchModelName, "-") && bUseLink )
    CharResMgr::GetHair(this, kClassID, byGender, byIndexID, byPartsIndex, pchModelName, pchTexName);
}

//----- (00653450) --------------------------------------------------------
char __thiscall CharResMgr::PreLoadMinihouseRes(CharResMgr *this)
{
  CharResMgr::GetHouse(this, 0);
  return 1;
}

//----- (00653460) --------------------------------------------------------
NiNode *__thiscall CharResMgr::GetItem(CharResMgr *this, unsigned __int16 kItemID, char byPathRuleType)
{
  CharResMgr *v3; // ebx@1
  NiNode *result; // eax@1
  int v5; // esi@2
  int v6; // ecx@4
  bool v7; // zf@4
  int *v8; // eax@4
  int v9; // esi@5
  char **v10; // ST08_4@13
  NiNode *v11; // edi@18
  NiSourceTexture *v12; // eax@19
  NiSourceTexture *v13; // ebx@19
  NiNode *v14; // eax@21
  int v15; // esi@25
  NiObject *v16; // esi@25
  const char *v17; // [sp-Ch] [bp-14Ch]@12
  char **v18; // [sp-8h] [bp-148h]@12
  int v19; // [sp-4h] [bp-144h]@11
  NiPointer<NiTexture> spSubItemTexture; // [sp+10h] [bp-130h]@19
  ResetTexture kResetTexture; // [sp+14h] [bp-12Ch]@22
  CharResMgr *v22; // [sp+20h] [bp-120h]@1
  int *v23; // [sp+24h] [bp-11Ch]@4
  char byParsingType[4]; // [sp+28h] [bp-118h]@1
  char acFileName[260]; // [sp+2Ch] [bp-114h]@10
  int v26; // [sp+13Ch] [bp-4h]@21

  v3 = this;
  byParsingType[0] = byPathRuleType;
  v22 = this;
  result = CharResMgr::GetItemFromMap(this, kItemID, byPathRuleType);
  if ( result )
    return result;
  v5 = ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;
  if ( !(unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable
                                                            + 16))(
                           ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable,
                           kItemID) )
    return 0;
  if ( kItemID > *(_WORD *)(v5 + 200) )
    return 0;
  v6 = *(_DWORD *)(v5 + 196);
  v7 = *(_DWORD *)(v6 + 4 * kItemID) == 0;
  v23 = (int *)kItemID;
  v8 = (int *)(v6 + 4 * kItemID);
  if ( v7 )
    return 0;
  v9 = *v8;
  if ( !*v8 )
    return 0;
  if ( byParsingType[0] == -1 )
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    v19 = v9 + 170;
    v18 = &Folder::m_acItem;
    v17 = "%s%s.nif";
LABEL_17:
    sprintf(acFileName, v17, v18, v19);
    goto LABEL_18;
  }
  if ( *(_BYTE *)(v9 + 170) != 95 )
  {
    v19 = v9 + 170;
    if ( byParsingType[0] )
    {
      v10 = Folder::Item();
      sprintf(acFileName, "%sMale\\%s.nif", v10, v19);
      goto LABEL_18;
    }
    v18 = Folder::Item();
    v17 = "%sFemale\\%s.nif";
    goto LABEL_17;
  }
  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acFileName, "%s%s.nif", &Folder::m_acItem, v9 + 170);
LABEL_18:
  v19 = 1;
  v11 = PgUtil::LoadNifFile(acFileName, 0);
  if ( !v11 )
    return 0;
  v12 = CharResMgr::GetItemTexture(v3, (const char *)(v9 + 202), byParsingType[0]);
  v13 = v12;
  spSubItemTexture.m_pObject = (NiTexture *)v12;
  if ( v12 )
    InterlockedIncrement((volatile LONG *)&v12->m_uiRefCount);
  v14 = 0;
  v26 = 0;
  if ( v13 )
  {
    kResetTexture.m_pCallBack = 0;
    kResetTexture.m_nCurLevel = -1;
    kResetTexture.vfptr = (Ns_TourSceneVtbl *)&ResetTexture::`vftable';
    LOBYTE(v26) = 1;
    if ( v11->m_kChildren.m_uiSize > 0 )
      v14 = (NiNode *)v11->m_kChildren.m_pBase->m_pObject;
    Ns_TourScene::TourScene((Ns_TourScene *)&kResetTexture.vfptr, v14, &NiAVObject::m_RTTI, v13);
    LOBYTE(v26) = 0;
    kResetTexture.vfptr = (Ns_TourSceneVtbl *)&Ns_TourScene::`vftable';
  }
  NiObjectNET::SetName((NiObjectNET *)&v11->vfptr, (const char *)(v9 + 2));
  v15 = (unsigned int)v23 | ((unsigned __int8)byParsingType[0] << 24);
  v19 = (int)v11;
  v23 = &v19;
  InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
  NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
    (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v22->m_kItemMap,
    v15,
    (NiPointer<PgWinBut>)v19);
  NiObjectNET::ms_eCopyType = 1;
  v16 = NiObject::Clone((NiObject *)&v11->vfptr);
  v26 = -1;
  if ( v13 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) )
      v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
  }
  return (NiNode *)v16;
}
// 9B8DD0: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *Ns_TourScene::`vftable')(Ns_TourScene *this, NiAVObject *_pkObject, void *);
// 9BA020: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *ResetTexture::`vftable')(ResetTexture *this, NiAVObject *_pkObject, void *);
// A89130: using guessed type char *Folder::m_acItem;
// A8975C: using guessed type bool Folder::m_bInit;
// A8C298: using guessed type int ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (006536D0) --------------------------------------------------------
char __thiscall CharResMgr::LoadHairSet(CharResMgr *this, char kClassID, char byGender, HairInfo *pkHairInfo)
{
  HairInfo *v4; // esi@1
  CharResMgr *v5; // edi@1

  v4 = pkHairInfo;
  v5 = this;
  CharResMgr::LoadHairParts(
    this,
    kClassID,
    byGender,
    pkHairInfo->ID,
    0,
    pkHairInfo->ucIsLink_Front != 0,
    pkHairInfo->acModelName_Front,
    pkHairInfo->FrontTex);
  CharResMgr::LoadHairParts(
    v5,
    kClassID,
    byGender,
    v4->ID,
    1,
    v4->ucIsLink_Bottom != 0,
    v4->acModelName_Bottom,
    v4->BottomTex);
  CharResMgr::LoadHairParts(v5, kClassID, byGender, v4->ID, 2, v4->ucIsLink_Top != 0, v4->acModelName_Top, v4->TopTex);
  CharResMgr::LoadHairParts(v5, kClassID, byGender, v4->ID, 3, v4->ucIsLink_Acc != 0, v4->acModelName_Acc, v4->Acc1Tex);
  CharResMgr::LoadHairParts(
    v5,
    kClassID,
    byGender,
    v4->ID,
    4,
    v4->ucIsLink_Acc2 != 0,
    v4->acModelName_Acc2,
    v4->Acc2Tex);
  CharResMgr::LoadHairParts(
    v5,
    kClassID,
    byGender,
    v4->ID,
    5,
    v4->ucIsLink_Acc3 != 0,
    v4->acModelName_Acc3,
    v4->Acc3Tex);
  return 1;
}

//----- (00653800) --------------------------------------------------------
char __thiscall CharResMgr::PreLoadItemRes(CharResMgr *this)
{
  unsigned int v1; // esi@1
  char *v2; // eax@2
  char *v3; // ebx@2
  int v4; // esi@3
  int v5; // edi@3
  int v6; // ecx@4
  _DWORD *v7; // eax@7
  int v8; // eax@13
  CharResMgr *v10; // [sp+4h] [bp-8h]@1
  unsigned int i; // [sp+8h] [bp-4h]@1

  v1 = 0;
  v10 = this;
  i = 0;
  if ( ITableBase<ItemViewInfo,ItemViewInfoTab>::GetTotal() )
  {
    do
    {
      v2 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable + 4), v1);
      v3 = v2;
      if ( v2 )
      {
        v4 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
        v5 = *(_WORD *)v2;
        if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                              + 16))(
                                ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                                v5) )
        {
          if ( (unsigned __int16)v5 <= *(_WORD *)(v4 + 200) )
          {
            v7 = (_DWORD *)(*(_DWORD *)(v4 + 196) + 4 * v5);
            v6 = *v7 ? *v7 : 0;
          }
          else
          {
            v6 = 0;
          }
        }
        else
        {
          v6 = 0;
        }
        if ( v3[170] != 45 )
        {
          if ( *(_DWORD *)(v3 + 166) == 1 && *(_DWORD *)(v6 + 110) == 7
            || (v8 = *(_DWORD *)(v6 + 110), v8 == 19)
            || v8 == 21
            || v8 == 12
            || v8 == 10 )
          {
            CharResMgr::GetItem(v10, *(_WORD *)v6, -1);
          }
        }
      }
      v1 = ++i;
    }
    while ( i < ITableBase<ItemViewInfo,ItemViewInfoTab>::GetTotal() );
  }
  return 1;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
// A8C298: using guessed type int ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;

//----- (006538E0) --------------------------------------------------------
char __thiscall CharResMgr::LoadAllHairSetRes(CharResMgr *this)
{
  int v1; // eax@1
  CharResMgr *v2; // edi@1
  char *v3; // eax@5
  char *v4; // esi@5
  int v5; // eax@18
  int v6; // eax@22
  int v7; // eax@26
  char result; // al@31
  unsigned int v9; // [sp+4h] [bp-8h]@2
  unsigned int i; // [sp+8h] [bp-4h]@4

  v1 = *(_DWORD *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 56);
  v2 = this;
  if ( v1 )
    v9 = *(_DWORD *)(v1 + 40);
  else
    v9 = 0;
  i = 0;
  if ( v9 <= 0 )
  {
    result = 1;
  }
  else
  {
    do
    {
      v3 = CDataReader::GetRecord((CDataReader *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 4), i);
      v4 = v3;
      if ( v3 )
      {
        if ( *(_DWORD *)(v3 + 66) == 2 )
        {
          CharResMgr::LoadHairSet(v2, 1, 0, (HairInfo *)v3);
        }
        else if ( *(_DWORD *)(v3 + 78) == 1 )
        {
          CharResMgr::LoadHairSet(v2, 1, 1, (HairInfo *)v3);
        }
        if ( *(_DWORD *)(v4 + 74) == 2 )
        {
          CharResMgr::LoadHairSet(v2, 6, 0, (HairInfo *)v4);
        }
        else if ( *(_DWORD *)(v4 + 78) == 1 )
        {
          CharResMgr::LoadHairSet(v2, 6, 1, (HairInfo *)v4);
        }
        if ( *(_DWORD *)(v4 + 70) == 2 )
        {
          CharResMgr::LoadHairSet(v2, 16, 0, (HairInfo *)v4);
        }
        else if ( *(_DWORD *)(v4 + 78) == 1 )
        {
          CharResMgr::LoadHairSet(v2, 16, 1, (HairInfo *)v4);
        }
        v5 = *(_DWORD *)(v4 + 78);
        if ( v5 == 2 )
        {
          CharResMgr::LoadHairSet(v2, 11, 0, (HairInfo *)v4);
        }
        else if ( v5 == 1 )
        {
          CharResMgr::LoadHairSet(v2, 11, 1, (HairInfo *)v4);
        }
        v6 = *(_DWORD *)(v4 + 82);
        if ( v6 == 2 )
        {
          CharResMgr::LoadHairSet(v2, 21, 0, (HairInfo *)v4);
        }
        else if ( v6 == 1 )
        {
          CharResMgr::LoadHairSet(v2, 21, 1, (HairInfo *)v4);
        }
        v7 = *(_DWORD *)(v4 + 86);
        if ( v7 == 2 )
        {
          CharResMgr::LoadHairSet(v2, 26, 0, (HairInfo *)v4);
        }
        else if ( v7 == 1 )
        {
          CharResMgr::LoadHairSet(v2, 26, 1, (HairInfo *)v4);
        }
      }
      ++i;
    }
    while ( i < v9 );
    result = 1;
  }
  return result;
}
// A88694: using guessed type int ITableBase<HairInfo,HairInfoTab>::ms_pkTable;

//----- (00653A00) --------------------------------------------------------
char __thiscall CharResMgr::PreLoadCharRes(CharResMgr *this)
{
  CharResMgr *v1; // esi@1
  char result; // al@7

  v1 = this;
  if ( CharResMgr::LoadCharSetRes(this, 1)
    && CharResMgr::LoadCharSetRes(v1, 6)
    && CharResMgr::LoadCharSetRes(v1, 11)
    && CharResMgr::LoadCharSetRes(v1, 16)
    && CharResMgr::LoadCharSetRes(v1, 21)
    && CharResMgr::LoadCharSetRes(v1, 26)
    && CharResMgr::LoadAllHairSetRes(v1)
    && CharResMgr::LoadAllFaceTexture(v1) )
  {
    CharResMgr::GetHouse(v1, 0);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00653A80) --------------------------------------------------------
void __thiscall CharResMgr::RemoveAllCharActor(CharResMgr *this)
{
  CharResMgr *v1; // esi@1

  v1 = this;
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Erase(
    (std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *)&v1->m_kKfMap.comp,
    v1->m_kKfMap._Myhead->_Parent);
  v1->m_kKfMap._Myhead->_Parent = v1->m_kKfMap._Myhead;
  v1->m_kKfMap._Myhead->_Left = v1->m_kKfMap._Myhead;
  v1->m_kKfMap._Myhead->_Right = v1->m_kKfMap._Myhead;
  v1->m_kKfMap._Mysize = 0;
}

//----- (00653AC0) --------------------------------------------------------
void __thiscall CharResMgr::Terminate(CharResMgr *this)
{
  CharResMgr *v1; // esi@1
  NiTransformController *v2; // edi@1
  NiNode *v3; // edi@6
  NiVertexColorProperty *v4; // edi@11
  NiMaterialProperty *v5; // edi@16

  v1 = this;
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Erase(
    (std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *)&v1->m_kKfMap.comp,
    v1->m_kKfMap._Myhead->_Parent);
  v1->m_kKfMap._Myhead->_Parent = v1->m_kKfMap._Myhead;
  v1->m_kKfMap._Myhead->_Left = v1->m_kKfMap._Myhead;
  v1->m_kKfMap._Myhead->_Right = v1->m_kKfMap._Myhead;
  v1->m_kKfMap._Mysize = 0;
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kMobActorMap);
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kRidePetMap);
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kMoverMap);
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kPetMap);
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kCharSetMap);
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kHairMap);
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kFaceMap);
  CharResMgr::RemoveAllItem(v1);
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kDropItemMap);
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kItemUpgradeTextureEffectMap);
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::_Erase(
    (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *)&v1->m_kHairTextureMap.comp,
    v1->m_kHairTextureMap._Myhead->_Parent);
  v1->m_kHairTextureMap._Myhead->_Parent = v1->m_kHairTextureMap._Myhead;
  v1->m_kHairTextureMap._Myhead->_Left = v1->m_kHairTextureMap._Myhead;
  v1->m_kHairTextureMap._Myhead->_Right = v1->m_kHairTextureMap._Myhead;
  v1->m_kHairTextureMap._Mysize = 0;
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kHairDetailTextureMap);
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kFaceTextureMap);
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kFaceTattooMap);
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kSetTextureMap);
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kHouseMap);
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::_Erase(
    (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *)&v1->m_kMiniHouseTextureMap.comp,
    v1->m_kMiniHouseTextureMap._Myhead->_Parent);
  v1->m_kMiniHouseTextureMap._Myhead->_Parent = v1->m_kMiniHouseTextureMap._Myhead;
  v1->m_kMiniHouseTextureMap._Myhead->_Left = v1->m_kMiniHouseTextureMap._Myhead;
  v1->m_kMiniHouseTextureMap._Myhead->_Right = v1->m_kMiniHouseTextureMap._Myhead;
  v1->m_kMiniHouseTextureMap._Mysize = 0;
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kClosedEyeMap);
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kQuestInfoMap);
  v2 = v1->m_spDamageContrl.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spDamageContrl.m_pObject = 0;
  }
  v3 = v1->m_spCharShakeNode.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spCharShakeNode.m_pObject = 0;
  }
  v4 = v1->m_spVertProp.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spVertProp.m_pObject = 0;
  }
  v5 = v1->m_spMatProp.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
    {
      if ( v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
    v1->m_spMatProp.m_pObject = 0;
  }
}

//----- (00653CC0) --------------------------------------------------------
void __thiscall CharResMgr::~CharResMgr(CharResMgr *this)
{
  CharResMgr *v1; // esi@1
  HANDLE v2; // eax@1
  NiMaterialProperty *v3; // edi@1
  NiVertexColorProperty *v4; // edi@5
  NiNode *v5; // edi@9
  NiTransformController *v6; // edi@13
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v7; // edi@17
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v8; // edi@17
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v9; // edi@17
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v10; // edi@17
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v11; // edi@17
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node **v12; // eax@17
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > v13; // ecx@17
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > v14; // ST08_4@17
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > v15; // ST04_4@17
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > v16; // ST08_4@17
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > v17; // ST04_4@17
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > v18; // ST08_4@17
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > v19; // ST04_4@17
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > v20; // ST08_4@17
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > v21; // ST04_4@17
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v22; // edi@17
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v23; // edi@17
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v24; // edi@17
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v25; // edi@17
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v26; // edi@17
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v27; // edi@17
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v28; // edi@17
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v29; // edi@17
  NiActorManager *v30; // edi@17
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > v31; // ST08_4@21
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > v32; // ST04_4@21
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v33; // edi@21
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v34; // edi@21
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v35; // edi@21
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v36; // edi@21
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > result; // [sp+10h] [bp-18h]@17
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > v38; // [sp+14h] [bp-14h]@17
  CharResMgr *v39; // [sp+18h] [bp-10h]@1
  int v40; // [sp+24h] [bp-4h]@1

  v1 = this;
  v39 = this;
  v40 = 28;
  v2 = GetCurrentProcess();
  TerminateProcess(v2, 0);
  CharResMgr::Terminate(v1);
  v3 = v1->m_spMatProp.m_pObject;
  LOBYTE(v40) = 27;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v4 = v1->m_spVertProp.m_pObject;
  LOBYTE(v40) = 26;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v5 = v1->m_spCharShakeNode.m_pObject;
  LOBYTE(v40) = 25;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  v6 = v1->m_spDamageContrl.m_pObject;
  LOBYTE(v40) = 24;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  v7 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&v1->m_kClosedEyeMap;
  v38._Ptr = v7;
  v7->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMap<unsigned long,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kClosedEyeMap);
  LOBYTE(v40) = 23;
  v7->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kClosedEyeMap);
  operator delete[](v1->m_kClosedEyeMap.m_ppkHashTable);
  v8 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&v1->m_kHairDetailTextureMap;
  v38._Ptr = v8;
  v8->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMap<unsigned long,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kHairDetailTextureMap);
  LOBYTE(v40) = 22;
  v8->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kHairDetailTextureMap);
  operator delete[](v1->m_kHairDetailTextureMap.m_ppkHashTable);
  v9 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&v1->m_kSetTextureMap;
  v38._Ptr = v9;
  v9->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMap<unsigned long,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kSetTextureMap);
  LOBYTE(v40) = 21;
  v9->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kSetTextureMap);
  operator delete[](v1->m_kSetTextureMap.m_ppkHashTable);
  v10 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&v1->m_kFaceTattooMap;
  v38._Ptr = v10;
  v10->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMap<unsigned long,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kFaceTattooMap);
  LOBYTE(v40) = 20;
  v10->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kFaceTattooMap);
  operator delete[](v1->m_kFaceTattooMap.m_ppkHashTable);
  v11 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&v1->m_kFaceTextureMap;
  v38._Ptr = v11;
  v11->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMap<unsigned long,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kFaceTextureMap);
  LOBYTE(v40) = 19;
  v11->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kFaceTextureMap);
  operator delete[](v1->m_kFaceTextureMap.m_ppkHashTable);
  v38._Ptr = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&v1->m_kHairTextureMap;
  v12 = &v1->m_kHairTextureMap._Myhead->_Left;
  v13._Ptr = *v12;
  LOBYTE(v40) = 34;
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *)&v1->m_kHairTextureMap.comp,
    &result,
    v13,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > >)v12);
  operator delete(v1->m_kHairTextureMap._Myhead);
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&v1->m_kMiniHouseTextureMap;
  v14._Ptr = v1->m_kMiniHouseTextureMap._Myhead;
  v15._Ptr = v1->m_kMiniHouseTextureMap._Myhead->_Left;
  LOBYTE(v40) = 35;
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *)&v1->m_kMiniHouseTextureMap.comp,
    &v38,
    v15,
    v14);
  operator delete(v1->m_kMiniHouseTextureMap._Myhead);
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&v1->m_kItemTextureMap;
  v16._Ptr = v1->m_kItemTextureMap._Myhead;
  v17._Ptr = v1->m_kItemTextureMap._Myhead->_Left;
  LOBYTE(v40) = 36;
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *)&v1->m_kItemTextureMap.comp,
    &v38,
    v17,
    v16);
  operator delete(v1->m_kItemTextureMap._Myhead);
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&v1->m_kSubItemTextureMap;
  v18._Ptr = v1->m_kSubItemTextureMap._Myhead;
  v19._Ptr = v1->m_kSubItemTextureMap._Myhead->_Left;
  LOBYTE(v40) = 37;
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *)&v1->m_kSubItemTextureMap.comp,
    &v38,
    v19,
    v18);
  operator delete(v1->m_kSubItemTextureMap._Myhead);
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&v1->m_kSubItemMap;
  v20._Ptr = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)v1->m_kSubItemMap._Myhead;
  v21._Ptr = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)v1->m_kSubItemMap._Myhead->_Left;
  LOBYTE(v40) = 38;
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *)&v1->m_kSubItemMap,
    &v38,
    v21,
    v20);
  operator delete(v1->m_kSubItemMap._Myhead);
  v22 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&v1->m_kItemUpgradeTextureEffectMap;
  result._Ptr = v22;
  v22->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMap<unsigned char,NiPointer<NiNode>>::`vftable';
  LOBYTE(v40) = 39;
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kItemUpgradeTextureEffectMap);
  LOBYTE(v40) = 13;
  v22->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned char,NiPointer<NiNode>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kItemUpgradeTextureEffectMap);
  operator delete[](v1->m_kItemUpgradeTextureEffectMap.m_ppkHashTable);
  v23 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&v1->m_kDropItemMap;
  result._Ptr = v23;
  v23->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMap<unsigned long,NiPointer<NiNode>>::`vftable';
  LOBYTE(v40) = 40;
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kDropItemMap);
  LOBYTE(v40) = 12;
  v23->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kDropItemMap);
  operator delete[](v1->m_kDropItemMap.m_ppkHashTable);
  v24 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&v1->m_kItemMap;
  result._Ptr = v24;
  v24->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMap<unsigned long,NiPointer<NiNode>>::`vftable';
  LOBYTE(v40) = 41;
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kItemMap);
  LOBYTE(v40) = 11;
  v24->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kItemMap);
  operator delete[](v1->m_kItemMap.m_ppkHashTable);
  v25 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&v1->m_kFaceMap;
  result._Ptr = v25;
  v25->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMap<unsigned long,NiPointer<NiNode>>::`vftable';
  LOBYTE(v40) = 42;
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kFaceMap);
  LOBYTE(v40) = 10;
  v25->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kFaceMap);
  operator delete[](v1->m_kFaceMap.m_ppkHashTable);
  v26 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&v1->m_kHairMap;
  result._Ptr = v26;
  v26->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMap<unsigned long,NiPointer<NiNode>>::`vftable';
  LOBYTE(v40) = 43;
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kHairMap);
  LOBYTE(v40) = 9;
  v26->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kHairMap);
  operator delete[](v1->m_kHairMap.m_ppkHashTable);
  v27 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&v1->m_kQuestInfoMap;
  result._Ptr = v27;
  v27->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMap<unsigned long,NiPointer<NiNode>>::`vftable';
  LOBYTE(v40) = 44;
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kQuestInfoMap);
  LOBYTE(v40) = 8;
  v27->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kQuestInfoMap);
  operator delete[](v1->m_kQuestInfoMap.m_ppkHashTable);
  v28 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&v1->m_kHouseMap;
  result._Ptr = v28;
  v28->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMap<unsigned long,NiPointer<NiNode>>::`vftable';
  LOBYTE(v40) = 45;
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kHouseMap);
  LOBYTE(v40) = 7;
  v28->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kHouseMap);
  operator delete[](v1->m_kHouseMap.m_ppkHashTable);
  v29 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&v1->m_kCharSetMap;
  result._Ptr = v29;
  v29->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMap<unsigned long,NiPointer<CharSet>>::`vftable';
  LOBYTE(v40) = 46;
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kCharSetMap);
  LOBYTE(v40) = 6;
  v29->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMapBase<DFALL<NiPointer<CharSet>>,unsigned long,NiPointer<CharSet>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kCharSetMap);
  operator delete[](v1->m_kCharSetMap.m_ppkHashTable);
  v30 = v1->m_spPigeonActor.m_pObject;
  LOBYTE(v40) = 5;
  if ( v30 && !InterlockedDecrement((volatile LONG *)&v30->m_uiRefCount) && v30 )
    v30->vfptr->__vecDelDtor((NiRefObject *)v30, 1u);
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&v1->m_kKfMap;
  v31._Ptr = v1->m_kKfMap._Myhead;
  v32._Ptr = v1->m_kKfMap._Myhead->_Left;
  LOBYTE(v40) = 47;
  std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *)&v1->m_kKfMap.comp,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *)&v38,
    v32,
    v31);
  operator delete(v1->m_kKfMap._Myhead);
  v33 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&v1->m_kPetMap;
  result._Ptr = v33;
  v33->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMap<unsigned long,NiPointer<NiActorManager>>::`vftable';
  LOBYTE(v40) = 48;
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kPetMap);
  LOBYTE(v40) = 3;
  v33->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kPetMap);
  operator delete[](v1->m_kPetMap.m_ppkHashTable);
  v34 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&v1->m_kMoverMap;
  result._Ptr = v34;
  v34->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMap<unsigned long,NiPointer<NiActorManager>>::`vftable';
  LOBYTE(v40) = 49;
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kMoverMap);
  LOBYTE(v40) = 2;
  v34->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kMoverMap);
  operator delete[](v1->m_kMoverMap.m_ppkHashTable);
  v35 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&v1->m_kRidePetMap;
  result._Ptr = v35;
  v35->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMap<unsigned long,NiPointer<NiActorManager>>::`vftable';
  LOBYTE(v40) = 50;
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kRidePetMap);
  LOBYTE(v40) = 1;
  v35->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kRidePetMap);
  operator delete[](v1->m_kRidePetMap.m_ppkHashTable);
  v36 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&v1->m_kMobActorMap;
  result._Ptr = v36;
  v36->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMap<unsigned long,NiPointer<NiActorManager>>::`vftable';
  LOBYTE(v40) = 51;
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kMobActorMap);
  LOBYTE(v40) = 0;
  v36->_Left = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)&NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kMobActorMap);
  operator delete[](v1->m_kMobActorMap.m_ppkHashTable);
  v1->m_kCharActorMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiActorManager> >,unsigned long,NiPointer<NiActorManager> >Vtbl *)&NiTMap<unsigned long,NiPointer<NiActorManager>>::`vftable';
  v40 = 52;
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)v1);
  v40 = -1;
  v1->m_kCharActorMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiActorManager> >,unsigned long,NiPointer<NiActorManager> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)v1);
  operator delete[](v1->m_kCharActorMap.m_ppkHashTable);
}
// 9B9F80: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>::`vftable')(void *p, char);
// 9B9FA0: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<CharSet>>,unsigned long,NiPointer<CharSet>>::`vftable')(void *p, char);
// 9B9FC0: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::`vftable')(void *p, char);
// 9B9FE0: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned char,NiPointer<NiNode>>::`vftable')(void *p, char);
// 9BA000: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>::`vftable')(void *p, char);
// 9BA03C: using guessed type int (__thiscall *NiTMap<unsigned long,NiPointer<NiActorManager>>::`vftable')(void *p, char);
// 9BA05C: using guessed type int (__thiscall *NiTMap<unsigned long,NiPointer<CharSet>>::`vftable')(void *p, char);
// 9BA07C: using guessed type int (__thiscall *NiTMap<unsigned long,NiPointer<NiNode>>::`vftable')(void *p, char);
// 9BA09C: using guessed type int (__thiscall *NiTMap<unsigned char,NiPointer<NiNode>>::`vftable')(void *p, char);
// 9BA0BC: using guessed type int (__thiscall *NiTMap<unsigned long,NiPointer<NiSourceTexture>>::`vftable')(void *p, char);

//----- (006542B0) --------------------------------------------------------
NiActorManager *__thiscall CharResMgr::GetCharActor(CharResMgr *this, char kClassID, char byGender, unsigned int uiFrame)
{
  NiActorManager *result; // eax@9
  NiUnsharedGeometryGroup *v5; // ST0C_4@15
  NiUnsharedGeometryGroup *v6; // ST0C_4@18
  NiUnsharedGeometryGroup *v7; // ST0C_4@25
  char *v8; // ST08_4@25
  NiUnsharedGeometryGroup *v9; // ST0C_4@29
  char *v10; // ST08_4@29
  bool v11; // bl@34
  NiActorManager *v12; // eax@36
  NiActorManager *v13; // edi@38
  int v14; // ebx@38
  float v15; // eax@41
  std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *v16; // eax@41
  NiKFMTool *v17; // esi@41
  char *v18; // eax@42
  NiAVObject *v19; // eax@43
  unsigned int v20; // eax@45
  unsigned int v21; // esi@47
  NiKFMTool::Sequence *v22; // eax@49
  unsigned int v23; // ebx@50
  NiUnsharedGeometryGroup *v24; // ST0C_4@51
  char *v25; // ST08_4@51
  NiUnsharedGeometryGroup *v26; // ST0C_4@52
  char *v27; // ST08_4@52
  NiD3DDefaultShader *v28; // eax@54
  std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *v29; // eax@54
  NiPointer<NiPixelData> *v30; // eax@54
  NiAVObject *v31; // eax@59
  unsigned int v32; // esi@59
  const char *v33; // [sp-4h] [bp-16Ch]@22
  char *v34; // [sp+0h] [bp-168h]@22
  NiUnsharedGeometryGroup *v35; // [sp+4h] [bp-164h]@22
  float fTime; // [sp+8h] [bp-160h]@15
  std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > v37; // [sp+1Ch] [bp-14Ch]@41
  NiKFMTool *pKfmTool; // [sp+2Ch] [bp-13Ch]@41
  unsigned int _Keyval; // [sp+30h] [bp-138h]@54
  NiActorManager *pkActor; // [sp+34h] [bp-134h]@38
  char v41[4]; // [sp+38h] [bp-130h]@1
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v42; // [sp+3Ch] [bp-12Ch]@1
  unsigned int uiNumIDs; // [sp+40h] [bp-128h]@44
  unsigned int *pSequenceIDs; // [sp+44h] [bp-124h]@44
  int i; // [sp+48h] [bp-120h]@45
  NiPointer<NiControllerSequence> spSequence; // [sp+4Ch] [bp-11Ch]@53
  char v47[4]; // [sp+50h] [bp-118h]@2
  char acFileName[260]; // [sp+54h] [bp-114h]@15
  int v49; // [sp+164h] [bp-4h]@41

  v42 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  v41[0] = byGender;
  switch ( kClassID )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      v47[0] = 1;
      break;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      v47[0] = 6;
      break;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      v47[0] = 11;
      break;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      v47[0] = 16;
      break;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      v47[0] = 21;
      break;
    case 0x1A:
    case 0x1B:
      v47[0] = 26;
      break;
    default:
      v47[0] = 0;
      break;
  }
  result = CharResMgr::GetCharActorFromMap(this, v47[0], v41[0]);
  if ( !result )
  {
    if ( uiFrame == 1 )
    {
      if ( byGender == 1 )
      {
        if ( !Folder::m_bInit )
          Folder::Init();
        v9 = CharClass::GetBaseEngName(v47[0]);
        v10 = Folder::Merge(&Folder::m_acMenu, "CharSelect\\CharSelectAni\\");
        sprintf(acFileName, "%s%s%s", v10, v9, "-m.kfm");
        goto LABEL_34;
      }
      if ( !Folder::m_bInit )
        Folder::Init();
      fTime = COERCE_FLOAT("-f.kfm");
      v35 = CharClass::GetBaseEngName(v47[0]);
      v34 = Folder::Merge(&Folder::m_acMenu, "CharSelect\\CharSelectAni\\");
      v33 = "%s%s%s";
    }
    else
    {
      if ( uiFrame != 2 )
      {
        if ( byGender == 1 )
        {
          if ( !Folder::m_bInit )
            Folder::Init();
          fTime = COERCE_FLOAT(CharClass::GetBaseEngName(v47[0]));
          v5 = CharClass::GetBaseEngName(v47[0]);
          sprintf(acFileName, "%s%s-m\\%s-m.kfm", &Folder::m_acCharacter, v5, fTime);
        }
        else
        {
          if ( !Folder::m_bInit )
            Folder::Init();
          fTime = COERCE_FLOAT(CharClass::GetBaseEngName(v47[0]));
          v6 = CharClass::GetBaseEngName(v47[0]);
          sprintf(acFileName, "%s%s-f\\%s-f.kfm", &Folder::m_acCharacter, v6, fTime);
        }
        goto LABEL_34;
      }
      if ( byGender != 1 )
      {
        if ( !Folder::m_bInit )
          Folder::Init();
        v7 = CharClass::GetBaseEngName(v47[0]);
        v8 = Folder::Merge(&Folder::m_acMenu, "charcreate\\CharCreateAni\\");
        sprintf(acFileName, "%s%s%s", v8, v7, "-f.kfm");
        goto LABEL_34;
      }
      if ( !Folder::m_bInit )
        Folder::Init();
      fTime = COERCE_FLOAT("-m.kfm");
      v35 = CharClass::GetBaseEngName(v47[0]);
      v34 = Folder::Merge(&Folder::m_acMenu, "charcreate\\CharCreateAni\\");
      v33 = "%s%s%s";
    }
    sprintf(acFileName, v33, v34, v35, fTime);
LABEL_34:
    v11 = NiSourceTexture::ms_bDestroyAppData;
    NiSourceTexture::ms_bDestroyAppData = 1;
    if ( uiFrame == 1 || uiFrame == 2 )
      v12 = NiActorManager::Create(acFileName, 0, 1, 0);
    else
      v12 = NiActorManager::Create(acFileName, 0, 0, 0);
    v13 = v12;
    NiSourceTexture::ms_bDestroyAppData = v11;
    v14 = 0;
    pkActor = v12;
    if ( v12 )
    {
      if ( uiFrame != 1 && uiFrame != 2 )
      {
        mhGameMainConnectMgr::mhGameMainConnectMgr(&v37);
        fTime = v15;
        v49 = 0;
        v16 = std::map<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>>::operator[](
                (std::map<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > > > *)&v42[5],
                &pkActor);
        std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>::operator=(
          v16,
          (std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *)LODWORD(fTime));
        v49 = -1;
        std::map<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>>::~map<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>>(&v37);
        v17 = v13->m_spKFMTool.m_pObject;
        pKfmTool = v17;
        if ( v17 )
        {
          v18 = NiKFMTool::GetFullModelPath(v17);
          if ( v18 )
          {
            v19 = (NiAVObject *)Ns_LoadNifFile(v18, 0);
            if ( v19 )
            {
              NiActorManager::ChangeNIFRoot(v13, 0, v19);
              pSequenceIDs = 0;
              NiKFMTool::GetSequenceIDs(v17, &pSequenceIDs, &uiNumIDs);
              if ( pSequenceIDs )
              {
                v20 = uiNumIDs;
                i = 0;
                if ( (signed int)(uiNumIDs + 1) > 0 )
                {
                  do
                  {
                    if ( v14 == v20 )
                      v21 = 801100;
                    else
                      v21 = pSequenceIDs[v14];
                    v22 = NiKFMTool::GetSequence(pKfmTool, v21);
                    if ( v22 )
                    {
                      v23 = v22->m_iAnimIndex;
                      fTime = *(float *)&v22->m_pcFilename;
                      if ( v41[0] == 1 )
                      {
                        v24 = CharClass::GetBaseEngName(v47[0]);
                        v25 = Folder::Character();
                        sprintf(acFileName, "%s%s-m\\%s", v25, v24, fTime);
                      }
                      else
                      {
                        v26 = CharClass::GetBaseEngName(v47[0]);
                        v27 = Folder::Character();
                        sprintf(acFileName, "%s%s-f\\%s", v27, v26, fTime);
                      }
                      NiControllerSequence::CreateSequenceFromFile(&spSequence, acFileName, v23);
                      v49 = 1;
                      if ( spSequence.m_pObject )
                      {
                        v28 = (NiD3DDefaultShader *)NiObject::Clone((NiObject *)&spSequence.m_pObject->vfptr);
                        NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&spSequence, v28);
                        _Keyval = v21;
                        v29 = std::map<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>>::operator[](
                                (std::map<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > > > *)&v42[5],
                                &pkActor);
                        v30 = (NiPointer<NiPixelData> *)std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>::operator[](
                                                          v29,
                                                          &_Keyval);
                        NiPointer<NiActorManager>::operator=(v30, (NiPointer<NiPixelData> *)&spSequence);
                        if ( i == uiNumIDs )
                          NiActorManager::ChangeSequence(v13, v21, spSequence.m_pObject);
                      }
                      v49 = -1;
                      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spSequence);
                      v14 = i;
                    }
                    v20 = uiNumIDs;
                    i = ++v14;
                  }
                  while ( v14 < (signed int)(uiNumIDs + 1) );
                }
                operator delete(pSequenceIDs);
              }
            }
          }
        }
      }
      v31 = (NiAVObject *)((int (__stdcall *)(const char *))v13->m_spNIFRoot.m_pObject->vfptr[18].__vecDelDtor)("Haduri Light");
      PgUtil::TurnOnLightsInNode(v31, 0);
      NiActorManager::Update(v13, 0.0);
      LODWORD(fTime) = 1;
      NiAVObject::Update(v13->m_spNIFRoot.m_pObject, 0.0, 1);
      _Keyval = (unsigned int)&fTime;
      v32 = ((unsigned __int8)v41[0] | ((unsigned __int8)v47[0] << 8)) << 16;
      fTime = *(float *)&v13;
      InterlockedIncrement((volatile LONG *)&v13->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(v42, v32, LODWORD(fTime));
      result = NiActorManager::Clone(v13);
    }
    else
    {
      result = 0;
    }
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;
// B6248C: using guessed type bool NiSourceTexture::ms_bDestroyAppData;

//----- (00654860) --------------------------------------------------------
void __thiscall CharResMgr::CharResMgr(CharResMgr *this)
{
  CharResMgr *v1; // esi@1
  char *v2; // eax@1
  unsigned int v3; // ST38_4@1
  char *v4; // eax@1
  unsigned int v5; // ST28_4@1
  char *v6; // eax@1
  unsigned int v7; // ST18_4@1
  char *v8; // eax@1
  unsigned int v9; // ST08_4@1
  char *v10; // eax@1
  unsigned int v11; // ST38_4@1
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v12; // eax@1
  char *v13; // eax@2
  unsigned int v14; // ST38_4@2
  char *v15; // eax@2
  unsigned int v16; // ST28_4@2
  char *v17; // eax@2
  unsigned int v18; // ST18_4@2
  char *v19; // eax@2
  unsigned int v20; // ST08_4@2
  char *v21; // eax@2
  unsigned int v22; // ST38_4@2
  char *v23; // eax@2
  unsigned int v24; // ST28_4@2
  char *v25; // eax@2
  unsigned int v26; // ST18_4@2
  char *v27; // eax@2
  unsigned int v28; // ST08_4@2
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiNode>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiNode> > >,0> >::_Node *v29; // eax@2
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v30; // eax@3
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v31; // eax@4
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v32; // eax@5
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v33; // eax@6
  char *v34; // eax@7
  unsigned int v35; // ST38_4@7
  char *v36; // eax@7
  unsigned int v37; // ST28_4@7
  char *v38; // eax@7
  unsigned int v39; // ST18_4@7
  char *v40; // eax@7
  unsigned int v41; // ST08_4@7
  char *v42; // eax@7
  unsigned int v43; // ST38_4@7
  std::exception v44; // [sp+10h] [bp-30h]@10
  std::exception pExceptionObject; // [sp+1Ch] [bp-24h]@8
  CharResMgr *v46; // [sp+28h] [bp-18h]@1
  char *v47; // [sp+2Ch] [bp-14h]@10
  char *_What; // [sp+30h] [bp-10h]@8
  int v49; // [sp+3Ch] [bp-4h]@1

  v1 = this;
  v46 = this;
  this->m_kCharActorMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiActorManager> >,unsigned long,NiPointer<NiActorManager> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>::`vftable';
  this->m_kCharActorMap.m_uiHashSize = 37;
  this->m_kCharActorMap.m_kAllocator.m_uiCount = 0;
  v2 = (char *)operator new[](0x94u);
  v3 = 4 * v1->m_kCharActorMap.m_uiHashSize;
  v1->m_kCharActorMap.m_ppkHashTable = (NiTMapItem<unsigned long,NiPointer<NiActorManager> > **)v2;
  memset(v2, 0, v3);
  v1->m_kCharActorMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiActorManager> >,unsigned long,NiPointer<NiActorManager> >Vtbl *)&NiTMap<unsigned long,NiPointer<NiActorManager>>::`vftable';
  v49 = 0;
  v1->m_kMobActorMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiActorManager> >,unsigned long,NiPointer<NiActorManager> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>::`vftable';
  v1->m_kMobActorMap.m_uiHashSize = 37;
  v1->m_kMobActorMap.m_kAllocator.m_uiCount = 0;
  v4 = (char *)operator new[](0x94u);
  v5 = 4 * v1->m_kMobActorMap.m_uiHashSize;
  v1->m_kMobActorMap.m_ppkHashTable = (NiTMapItem<unsigned long,NiPointer<NiActorManager> > **)v4;
  memset(v4, 0, v5);
  v1->m_kMobActorMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiActorManager> >,unsigned long,NiPointer<NiActorManager> >Vtbl *)&NiTMap<unsigned long,NiPointer<NiActorManager>>::`vftable';
  LOBYTE(v49) = 1;
  v1->m_kRidePetMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiActorManager> >,unsigned long,NiPointer<NiActorManager> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>::`vftable';
  v1->m_kRidePetMap.m_uiHashSize = 37;
  v1->m_kRidePetMap.m_kAllocator.m_uiCount = 0;
  v6 = (char *)operator new[](0x94u);
  v7 = 4 * v1->m_kRidePetMap.m_uiHashSize;
  v1->m_kRidePetMap.m_ppkHashTable = (NiTMapItem<unsigned long,NiPointer<NiActorManager> > **)v6;
  memset(v6, 0, v7);
  v1->m_kRidePetMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiActorManager> >,unsigned long,NiPointer<NiActorManager> >Vtbl *)&NiTMap<unsigned long,NiPointer<NiActorManager>>::`vftable';
  LOBYTE(v49) = 2;
  v1->m_kMoverMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiActorManager> >,unsigned long,NiPointer<NiActorManager> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>::`vftable';
  v1->m_kMoverMap.m_uiHashSize = 37;
  v1->m_kMoverMap.m_kAllocator.m_uiCount = 0;
  v8 = (char *)operator new[](0x94u);
  v9 = 4 * v1->m_kMoverMap.m_uiHashSize;
  v1->m_kMoverMap.m_ppkHashTable = (NiTMapItem<unsigned long,NiPointer<NiActorManager> > **)v8;
  memset(v8, 0, v9);
  v1->m_kMoverMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiActorManager> >,unsigned long,NiPointer<NiActorManager> >Vtbl *)&NiTMap<unsigned long,NiPointer<NiActorManager>>::`vftable';
  LOBYTE(v49) = 3;
  v1->m_kPetMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiActorManager> >,unsigned long,NiPointer<NiActorManager> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>::`vftable';
  v1->m_kPetMap.m_uiHashSize = 37;
  v1->m_kPetMap.m_kAllocator.m_uiCount = 0;
  v10 = (char *)operator new[](0x94u);
  v11 = 4 * v1->m_kPetMap.m_uiHashSize;
  v1->m_kPetMap.m_ppkHashTable = (NiTMapItem<unsigned long,NiPointer<NiActorManager> > **)v10;
  memset(v10, 0, v11);
  v1->m_kPetMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiActorManager> >,unsigned long,NiPointer<NiActorManager> >Vtbl *)&NiTMap<unsigned long,NiPointer<NiActorManager>>::`vftable';
  LOBYTE(v49) = 4;
  v1->m_kKfMap._Mysize = 0;
  v12 = (std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *)operator new(0x24u);
  if ( !v12 )
  {
    v47 = 0;
    std::exception::exception(&v44, (const char *const *)&v47);
    v44.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&v44, &_TI2_AVbad_alloc_std__);
  }
  v1->m_kKfMap._Myhead = v12;
  v12->_Left = v12;
  v1->m_kKfMap._Myhead->_Parent = v1->m_kKfMap._Myhead;
  v1->m_kKfMap._Myhead->_Right = v1->m_kKfMap._Myhead;
  v1->m_kKfMap._Myhead->_Color = 1;
  v1->m_kKfMap._Myhead->_Isnil = 1;
  v1->m_spPigeonActor.m_pObject = 0;
  LOBYTE(v49) = 6;
  v1->m_kCharSetMap.vfptr = (NiTMapBase<DFALL<NiPointer<CharSet> >,unsigned long,NiPointer<CharSet> >Vtbl *)&NiTMapBase<DFALL<NiPointer<CharSet>>,unsigned long,NiPointer<CharSet>>::`vftable';
  v1->m_kCharSetMap.m_uiHashSize = 37;
  v1->m_kCharSetMap.m_kAllocator.m_uiCount = 0;
  v13 = (char *)operator new[](0x94u);
  v14 = 4 * v1->m_kCharSetMap.m_uiHashSize;
  v1->m_kCharSetMap.m_ppkHashTable = (NiTMapItem<unsigned long,NiPointer<CharSet> > **)v13;
  memset(v13, 0, v14);
  v1->m_kCharSetMap.vfptr = (NiTMapBase<DFALL<NiPointer<CharSet> >,unsigned long,NiPointer<CharSet> >Vtbl *)&NiTMap<unsigned long,NiPointer<CharSet>>::`vftable';
  LOBYTE(v49) = 7;
  v1->m_kHouseMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned long,NiPointer<NiNode> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::`vftable';
  v1->m_kHouseMap.m_uiHashSize = 37;
  v1->m_kHouseMap.m_kAllocator.m_uiCount = 0;
  v15 = (char *)operator new[](0x94u);
  v16 = 4 * v1->m_kHouseMap.m_uiHashSize;
  v1->m_kHouseMap.m_ppkHashTable = (NiTMapItem<unsigned long,NiPointer<NiNode> > **)v15;
  memset(v15, 0, v16);
  v1->m_kHouseMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned long,NiPointer<NiNode> >Vtbl *)&NiTMap<unsigned long,NiPointer<NiNode>>::`vftable';
  LOBYTE(v49) = 8;
  v1->m_kQuestInfoMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned long,NiPointer<NiNode> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::`vftable';
  v1->m_kQuestInfoMap.m_uiHashSize = 37;
  v1->m_kQuestInfoMap.m_kAllocator.m_uiCount = 0;
  v17 = (char *)operator new[](0x94u);
  v18 = 4 * v1->m_kQuestInfoMap.m_uiHashSize;
  v1->m_kQuestInfoMap.m_ppkHashTable = (NiTMapItem<unsigned long,NiPointer<NiNode> > **)v17;
  memset(v17, 0, v18);
  v1->m_kQuestInfoMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned long,NiPointer<NiNode> >Vtbl *)&NiTMap<unsigned long,NiPointer<NiNode>>::`vftable';
  LOBYTE(v49) = 9;
  v1->m_kHairMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned long,NiPointer<NiNode> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::`vftable';
  v1->m_kHairMap.m_uiHashSize = 37;
  v1->m_kHairMap.m_kAllocator.m_uiCount = 0;
  v19 = (char *)operator new[](0x94u);
  v20 = 4 * v1->m_kHairMap.m_uiHashSize;
  v1->m_kHairMap.m_ppkHashTable = (NiTMapItem<unsigned long,NiPointer<NiNode> > **)v19;
  memset(v19, 0, v20);
  v1->m_kHairMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned long,NiPointer<NiNode> >Vtbl *)&NiTMap<unsigned long,NiPointer<NiNode>>::`vftable';
  LOBYTE(v49) = 10;
  v1->m_kFaceMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned long,NiPointer<NiNode> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::`vftable';
  v1->m_kFaceMap.m_uiHashSize = 37;
  v1->m_kFaceMap.m_kAllocator.m_uiCount = 0;
  v21 = (char *)operator new[](0x94u);
  v22 = 4 * v1->m_kFaceMap.m_uiHashSize;
  v1->m_kFaceMap.m_ppkHashTable = (NiTMapItem<unsigned long,NiPointer<NiNode> > **)v21;
  memset(v21, 0, v22);
  v1->m_kFaceMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned long,NiPointer<NiNode> >Vtbl *)&NiTMap<unsigned long,NiPointer<NiNode>>::`vftable';
  LOBYTE(v49) = 11;
  v1->m_kItemMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned long,NiPointer<NiNode> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::`vftable';
  v1->m_kItemMap.m_uiHashSize = 37;
  v1->m_kItemMap.m_kAllocator.m_uiCount = 0;
  v23 = (char *)operator new[](0x94u);
  v24 = 4 * v1->m_kItemMap.m_uiHashSize;
  v1->m_kItemMap.m_ppkHashTable = (NiTMapItem<unsigned long,NiPointer<NiNode> > **)v23;
  memset(v23, 0, v24);
  v1->m_kItemMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned long,NiPointer<NiNode> >Vtbl *)&NiTMap<unsigned long,NiPointer<NiNode>>::`vftable';
  LOBYTE(v49) = 12;
  v1->m_kDropItemMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned long,NiPointer<NiNode> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::`vftable';
  v1->m_kDropItemMap.m_uiHashSize = 37;
  v1->m_kDropItemMap.m_kAllocator.m_uiCount = 0;
  v25 = (char *)operator new[](0x94u);
  v26 = 4 * v1->m_kDropItemMap.m_uiHashSize;
  v1->m_kDropItemMap.m_ppkHashTable = (NiTMapItem<unsigned long,NiPointer<NiNode> > **)v25;
  memset(v25, 0, v26);
  v1->m_kDropItemMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned long,NiPointer<NiNode> >Vtbl *)&NiTMap<unsigned long,NiPointer<NiNode>>::`vftable';
  LOBYTE(v49) = 13;
  v1->m_kItemUpgradeTextureEffectMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned char,NiPointer<NiNode> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned char,NiPointer<NiNode>>::`vftable';
  v1->m_kItemUpgradeTextureEffectMap.m_uiHashSize = 37;
  v1->m_kItemUpgradeTextureEffectMap.m_kAllocator.m_uiCount = 0;
  v27 = (char *)operator new[](0x94u);
  v28 = 4 * v1->m_kItemUpgradeTextureEffectMap.m_uiHashSize;
  v1->m_kItemUpgradeTextureEffectMap.m_ppkHashTable = (NiTMapItem<unsigned char,NiPointer<NiNode> > **)v27;
  memset(v27, 0, v28);
  v1->m_kItemUpgradeTextureEffectMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned char,NiPointer<NiNode> >Vtbl *)&NiTMap<unsigned char,NiPointer<NiNode>>::`vftable';
  LOBYTE(v49) = 14;
  v1->m_kSubItemMap._Mysize = 0;
  v29 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiNode>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiNode> > >,0> >::_Node *)operator new(0x30u);
  if ( !v29 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_kSubItemMap._Myhead = v29;
  v29->_Left = v29;
  v1->m_kSubItemMap._Myhead->_Parent = v1->m_kSubItemMap._Myhead;
  v1->m_kSubItemMap._Myhead->_Right = v1->m_kSubItemMap._Myhead;
  v1->m_kSubItemMap._Myhead->_Color = 1;
  v1->m_kSubItemMap._Myhead->_Isnil = 1;
  LOBYTE(v49) = 15;
  v1->m_kSubItemTextureMap._Mysize = 0;
  v30 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)operator new(0x30u);
  if ( !v30 )
  {
    v47 = 0;
    std::exception::exception(&v44, (const char *const *)&v47);
    v44.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&v44, &_TI2_AVbad_alloc_std__);
  }
  v1->m_kSubItemTextureMap._Myhead = v30;
  v30->_Left = v30;
  v1->m_kSubItemTextureMap._Myhead->_Parent = v1->m_kSubItemTextureMap._Myhead;
  v1->m_kSubItemTextureMap._Myhead->_Right = v1->m_kSubItemTextureMap._Myhead;
  v1->m_kSubItemTextureMap._Myhead->_Color = 1;
  v1->m_kSubItemTextureMap._Myhead->_Isnil = 1;
  LOBYTE(v49) = 16;
  v1->m_kItemTextureMap._Mysize = 0;
  v31 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)operator new(0x30u);
  if ( !v31 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_kItemTextureMap._Myhead = v31;
  v31->_Left = v31;
  v1->m_kItemTextureMap._Myhead->_Parent = v1->m_kItemTextureMap._Myhead;
  v1->m_kItemTextureMap._Myhead->_Right = v1->m_kItemTextureMap._Myhead;
  v1->m_kItemTextureMap._Myhead->_Color = 1;
  v1->m_kItemTextureMap._Myhead->_Isnil = 1;
  LOBYTE(v49) = 17;
  v1->m_kMiniHouseTextureMap._Mysize = 0;
  v32 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)operator new(0x30u);
  if ( !v32 )
  {
    v47 = 0;
    std::exception::exception(&v44, (const char *const *)&v47);
    v44.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&v44, &_TI2_AVbad_alloc_std__);
  }
  v1->m_kMiniHouseTextureMap._Myhead = v32;
  v32->_Left = v32;
  v1->m_kMiniHouseTextureMap._Myhead->_Parent = v1->m_kMiniHouseTextureMap._Myhead;
  v1->m_kMiniHouseTextureMap._Myhead->_Right = v1->m_kMiniHouseTextureMap._Myhead;
  v1->m_kMiniHouseTextureMap._Myhead->_Color = 1;
  v1->m_kMiniHouseTextureMap._Myhead->_Isnil = 1;
  LOBYTE(v49) = 18;
  v1->m_kHairTextureMap._Mysize = 0;
  v33 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)operator new(0x30u);
  if ( !v33 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_kHairTextureMap._Myhead = v33;
  v33->_Left = v33;
  v1->m_kHairTextureMap._Myhead->_Parent = v1->m_kHairTextureMap._Myhead;
  v1->m_kHairTextureMap._Myhead->_Right = v1->m_kHairTextureMap._Myhead;
  v1->m_kHairTextureMap._Myhead->_Color = 1;
  v1->m_kHairTextureMap._Myhead->_Isnil = 1;
  LOBYTE(v49) = 19;
  v1->m_kFaceTextureMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,unsigned long,NiPointer<NiSourceTexture> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>::`vftable';
  v1->m_kFaceTextureMap.m_uiHashSize = 37;
  v1->m_kFaceTextureMap.m_kAllocator.m_uiCount = 0;
  v34 = (char *)operator new[](0x94u);
  v35 = 4 * v1->m_kFaceTextureMap.m_uiHashSize;
  v1->m_kFaceTextureMap.m_ppkHashTable = (NiTMapItem<unsigned long,NiPointer<NiSourceTexture> > **)v34;
  memset(v34, 0, v35);
  v1->m_kFaceTextureMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,unsigned long,NiPointer<NiSourceTexture> >Vtbl *)&NiTMap<unsigned long,NiPointer<NiSourceTexture>>::`vftable';
  LOBYTE(v49) = 20;
  v1->m_kFaceTattooMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,unsigned long,NiPointer<NiSourceTexture> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>::`vftable';
  v1->m_kFaceTattooMap.m_uiHashSize = 37;
  v1->m_kFaceTattooMap.m_kAllocator.m_uiCount = 0;
  v36 = (char *)operator new[](0x94u);
  v37 = 4 * v1->m_kFaceTattooMap.m_uiHashSize;
  v1->m_kFaceTattooMap.m_ppkHashTable = (NiTMapItem<unsigned long,NiPointer<NiSourceTexture> > **)v36;
  memset(v36, 0, v37);
  v1->m_kFaceTattooMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,unsigned long,NiPointer<NiSourceTexture> >Vtbl *)&NiTMap<unsigned long,NiPointer<NiSourceTexture>>::`vftable';
  LOBYTE(v49) = 21;
  v1->m_kSetTextureMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,unsigned long,NiPointer<NiSourceTexture> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>::`vftable';
  v1->m_kSetTextureMap.m_uiHashSize = 37;
  v1->m_kSetTextureMap.m_kAllocator.m_uiCount = 0;
  v38 = (char *)operator new[](0x94u);
  v39 = 4 * v1->m_kSetTextureMap.m_uiHashSize;
  v1->m_kSetTextureMap.m_ppkHashTable = (NiTMapItem<unsigned long,NiPointer<NiSourceTexture> > **)v38;
  memset(v38, 0, v39);
  v1->m_kSetTextureMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,unsigned long,NiPointer<NiSourceTexture> >Vtbl *)&NiTMap<unsigned long,NiPointer<NiSourceTexture>>::`vftable';
  LOBYTE(v49) = 22;
  v1->m_kHairDetailTextureMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,unsigned long,NiPointer<NiSourceTexture> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>::`vftable';
  v1->m_kHairDetailTextureMap.m_uiHashSize = 37;
  v1->m_kHairDetailTextureMap.m_kAllocator.m_uiCount = 0;
  v40 = (char *)operator new[](0x94u);
  v41 = 4 * v1->m_kHairDetailTextureMap.m_uiHashSize;
  v1->m_kHairDetailTextureMap.m_ppkHashTable = (NiTMapItem<unsigned long,NiPointer<NiSourceTexture> > **)v40;
  memset(v40, 0, v41);
  v1->m_kHairDetailTextureMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,unsigned long,NiPointer<NiSourceTexture> >Vtbl *)&NiTMap<unsigned long,NiPointer<NiSourceTexture>>::`vftable';
  LOBYTE(v49) = 23;
  v1->m_kClosedEyeMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,unsigned long,NiPointer<NiSourceTexture> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>::`vftable';
  v1->m_kClosedEyeMap.m_uiHashSize = 37;
  v1->m_kClosedEyeMap.m_kAllocator.m_uiCount = 0;
  v42 = (char *)operator new[](0x94u);
  v43 = 4 * v1->m_kClosedEyeMap.m_uiHashSize;
  v1->m_kClosedEyeMap.m_ppkHashTable = (NiTMapItem<unsigned long,NiPointer<NiSourceTexture> > **)v42;
  memset(v42, 0, v43);
  v1->m_kClosedEyeMap.vfptr = (NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,unsigned long,NiPointer<NiSourceTexture> >Vtbl *)&NiTMap<unsigned long,NiPointer<NiSourceTexture>>::`vftable';
  v1->m_spDamageContrl.m_pObject = 0;
  v1->m_spCharShakeNode.m_pObject = 0;
  v1->m_spVertProp.m_pObject = 0;
  v1->m_spMatProp.m_pObject = 0;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9B9F80: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>::`vftable')(void *p, char);
// 9B9FA0: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<CharSet>>,unsigned long,NiPointer<CharSet>>::`vftable')(void *p, char);
// 9B9FC0: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::`vftable')(void *p, char);
// 9B9FE0: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned char,NiPointer<NiNode>>::`vftable')(void *p, char);
// 9BA000: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>::`vftable')(void *p, char);
// 9BA03C: using guessed type int (__thiscall *NiTMap<unsigned long,NiPointer<NiActorManager>>::`vftable')(void *p, char);
// 9BA05C: using guessed type int (__thiscall *NiTMap<unsigned long,NiPointer<CharSet>>::`vftable')(void *p, char);
// 9BA07C: using guessed type int (__thiscall *NiTMap<unsigned long,NiPointer<NiNode>>::`vftable')(void *p, char);
// 9BA09C: using guessed type int (__thiscall *NiTMap<unsigned char,NiPointer<NiNode>>::`vftable')(void *p, char);
// 9BA0BC: using guessed type int (__thiscall *NiTMap<unsigned long,NiPointer<NiSourceTexture>>::`vftable')(void *p, char);

//----- (006550C0) --------------------------------------------------------
char __thiscall CharResMgr::CreateCharActorAndBaseSet(CharResMgr *this, char kClassID, char byGender)
{
  char v3; // bl@2
  CharSet *v4; // edi@9
  NiActorManager *v5; // esi@9
  CharSet *v6; // eax@10
  CharSet *v7; // eax@11
  char result; // al@17
  signed int v9; // eax@18
  int v10; // esi@24
  NiNode *v11; // [sp-4h] [bp-30h]@12
  CharSet *v12; // [sp+10h] [bp-1Ch]@10
  CharResMgr *v13; // [sp+14h] [bp-18h]@1
  NiPointer<NiActorManager> spActor; // [sp+18h] [bp-14h]@9
  NiActorManager *v15; // [sp+1Ch] [bp-10h]@9
  int v16; // [sp+28h] [bp-4h]@9

  v13 = this;
  switch ( kClassID )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      v3 = 1;
      break;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      v3 = 6;
      break;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      v3 = 11;
      break;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      v3 = 16;
      break;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      v3 = 21;
      break;
    case 0x1A:
    case 0x1B:
      v3 = 26;
      break;
    default:
      v3 = 0;
      break;
  }
  v4 = 0;
  spActor.m_pObject = 0;
  v16 = 0;
  v5 = CharResMgr::GetCharActor(this, v3, byGender, 0);
  v15 = v5;
  if ( !v5 )
    return 0;
  spActor.m_pObject = v5;
  InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v6 = (CharSet *)operator new(0x34u);
  v12 = v6;
  LOBYTE(v16) = 1;
  if ( v6 )
  {
    CharSet::CharSet(v6);
    v4 = v7;
  }
  v11 = (NiNode *)v5->m_spNIFRoot.m_pObject;
  LOBYTE(v16) = 0;
  if ( !CharSet::Init(v4, v11) )
  {
    if ( v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v16 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    return 0;
  }
  v9 = CharClass::GetChrClassType(v3);
  if ( v9 == 7 )
  {
    if ( v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v16 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    result = 0;
  }
  else
  {
    v10 = (unsigned __int8)ChrBasicEquipTab::GetByIndex((ChrClassType)v9, byGender) | (((unsigned __int8)byGender | ((unsigned __int8)v3 << 8)) << 16);
    v11 = (NiNode *)v4;
    if ( v4 )
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
    NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
      (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v13->m_kCharSetMap,
      v10,
      (NiPointer<PgWinBut>)v11);
    if ( !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) )
      ((void (__stdcall *)(signed int))v15->vfptr->__vecDelDtor)(1);
    result = 1;
  }
  return result;
}

//----- (006552F0) --------------------------------------------------------
bool __thiscall CharResMgr::Init(CharResMgr *this)
{
  CharResMgr *v1; // esi@1
  bool result; // al@2

  v1 = this;
  if ( CharResMgr::CreateAnimationController(this)
    && CharResMgr::CreateCharActorAndBaseSet(v1, 1, 1)
    && CharResMgr::CreateCharActorAndBaseSet(v1, 1, 0)
    && CharResMgr::CreateCharActorAndBaseSet(v1, 6, 1)
    && CharResMgr::CreateCharActorAndBaseSet(v1, 6, 0)
    && CharResMgr::CreateCharActorAndBaseSet(v1, 11, 1)
    && CharResMgr::CreateCharActorAndBaseSet(v1, 11, 0)
    && CharResMgr::CreateCharActorAndBaseSet(v1, 16, 1)
    && CharResMgr::CreateCharActorAndBaseSet(v1, 16, 0)
    && CharResMgr::CreateCharActorAndBaseSet(v1, 21, 1)
    && CharResMgr::CreateCharActorAndBaseSet(v1, 21, 0)
    && CharResMgr::CreateCharActorAndBaseSet(v1, 26, 1) )
  {
    result = CharResMgr::CreateCharActorAndBaseSet(v1, 26, 0) != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006553D0) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Lrotate(std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *this, std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *_Wherenode)
{
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v3; // ecx@3
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v4; // ecx@5

  v2 = _Wherenode->_Right;
  _Wherenode->_Right = v2->_Left;
  if ( !v2->_Left->_Isnil )
    v2->_Left->_Parent = _Wherenode;
  v2->_Parent = _Wherenode->_Parent;
  v3 = this->_Myhead;
  if ( _Wherenode == v3->_Parent )
  {
    v3->_Parent = v2;
    v2->_Left = _Wherenode;
    _Wherenode->_Parent = v2;
  }
  else
  {
    v4 = _Wherenode->_Parent;
    if ( _Wherenode == v4->_Left )
    {
      v4->_Left = v2;
      v2->_Left = _Wherenode;
      _Wherenode->_Parent = v2;
    }
    else
    {
      v4->_Right = v2;
      v2->_Left = _Wherenode;
      _Wherenode->_Parent = v2;
    }
  }
}

//----- (00655430) --------------------------------------------------------
unsigned int __cdecl ITableBase<ChrBasicEquip,ChrBasicEquipTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<ChrBasicEquip,ChrBasicEquipTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C268: using guessed type int ITableBase<ChrBasicEquip,ChrBasicEquipTab>::ms_pkTable;

//----- (00655450) --------------------------------------------------------
signed int __stdcall ResetTexture::ProcessData(NiAVObject *_pkObject, void *_pData)
{
  signed int result; // eax@2
  char *v4; // edx@3
  NiTexturingProperty *v5; // eax@5

  if ( !_pkObject || (v4 = _pkObject->m_pcName) != 0 && !strcmp("Scene Root", v4) )
  {
    result = -1;
  }
  else
  {
    v5 = (NiTexturingProperty *)NiAVObject::GetProperty(_pkObject, 8);
    if ( v5 )
      NiTexturingProperty::SetBaseTexture(v5, (NiTexture *)_pData);
    result = 1;
  }
  return result;
}

//----- (006554C0) --------------------------------------------------------
void __thiscall CharResMgr::AddHouseToMap(CharResMgr *this, NiNode *pkNode, unsigned int dwHouseID)
{
  CharResMgr *v3; // esi@1
  NiNode *v4; // [sp-4h] [bp-Ch]@1
  NiNode **v5; // [sp+4h] [bp-4h]@1

  v3 = this;
  v5 = &v4;
  v4 = pkNode;
  if ( pkNode )
    InterlockedIncrement((volatile LONG *)&pkNode->m_uiRefCount);
  NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
    (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v3->m_kHouseMap,
    dwHouseID,
    (NiPointer<PgWinBut>)v4);
}

//----- (00655500) --------------------------------------------------------
void __thiscall NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>::~NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>(NiTMapBase<DFALL<NiPointer<NiActorManager> >,unsigned long,NiPointer<NiActorManager> > *this)
{
  NiTMapBase<DFALL<NiPointer<NiActorManager> >,unsigned long,NiPointer<NiActorManager> > *v1; // esi@1

  v1 = this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<NiActorManager> >,unsigned long,NiPointer<NiActorManager> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v1->m_ppkHashTable);
}
// 9B9F80: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>::`vftable')(void *p, char);

//----- (00655520) --------------------------------------------------------
void __thiscall NiTMap<unsigned long,NiPointer<NiActorManager>>::~NiTMap<unsigned long,NiPointer<NiActorManager>>(NiTMap<unsigned long,NiPointer<NiActorManager> > *this)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v1; // esi@1

  v1 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<NiActorManager> >,unsigned long,NiPointer<NiActorManager> >Vtbl *)&NiTMap<unsigned long,NiPointer<NiActorManager>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v1->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v1);
  operator delete[](v1->m_ppkHashTable);
}
// 9B9F80: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>::`vftable')(void *p, char);
// 9BA03C: using guessed type int (__thiscall *NiTMap<unsigned long,NiPointer<NiActorManager>>::`vftable')(void *p, char);

//----- (00655590) --------------------------------------------------------
void __thiscall NiTMapBase<DFALL<NiPointer<CharSet>>,unsigned long,NiPointer<CharSet>>::~NiTMapBase<DFALL<NiPointer<CharSet>>,unsigned long,NiPointer<CharSet>>(NiTMapBase<DFALL<NiPointer<CharSet> >,unsigned long,NiPointer<CharSet> > *this)
{
  NiTMapBase<DFALL<NiPointer<CharSet> >,unsigned long,NiPointer<CharSet> > *v1; // esi@1

  v1 = this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<CharSet> >,unsigned long,NiPointer<CharSet> >Vtbl *)&NiTMapBase<DFALL<NiPointer<CharSet>>,unsigned long,NiPointer<CharSet>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v1->m_ppkHashTable);
}
// 9B9FA0: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<CharSet>>,unsigned long,NiPointer<CharSet>>::`vftable')(void *p, char);

//----- (006555B0) --------------------------------------------------------
void __thiscall NiTMap<unsigned long,NiPointer<CharSet>>::~NiTMap<unsigned long,NiPointer<CharSet>>(NiTMap<unsigned long,NiPointer<CharSet> > *this)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v1; // esi@1

  v1 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<CharSet> >,unsigned long,NiPointer<CharSet> >Vtbl *)&NiTMap<unsigned long,NiPointer<CharSet>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v1->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<CharSet>>,unsigned long,NiPointer<CharSet>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v1);
  operator delete[](v1->m_ppkHashTable);
}
// 9B9FA0: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<CharSet>>,unsigned long,NiPointer<CharSet>>::`vftable')(void *p, char);
// 9BA05C: using guessed type int (__thiscall *NiTMap<unsigned long,NiPointer<CharSet>>::`vftable')(void *p, char);

//----- (00655620) --------------------------------------------------------
void __thiscall NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::~NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>(NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned long,NiPointer<NiNode> > *this)
{
  NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned long,NiPointer<NiNode> > *v1; // esi@1

  v1 = this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned long,NiPointer<NiNode> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v1->m_ppkHashTable);
}
// 9B9FC0: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::`vftable')(void *p, char);

//----- (00655640) --------------------------------------------------------
void __thiscall NiTMap<unsigned long,NiPointer<NiNode>>::~NiTMap<unsigned long,NiPointer<NiNode>>(NiTMap<unsigned long,NiPointer<NiNode> > *this)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v1; // esi@1

  v1 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned long,NiPointer<NiNode> >Vtbl *)&NiTMap<unsigned long,NiPointer<NiNode>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v1->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v1);
  operator delete[](v1->m_ppkHashTable);
}
// 9B9FC0: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::`vftable')(void *p, char);
// 9BA07C: using guessed type int (__thiscall *NiTMap<unsigned long,NiPointer<NiNode>>::`vftable')(void *p, char);

//----- (006556B0) --------------------------------------------------------
void __thiscall NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned char,NiPointer<NiNode>>::~NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned char,NiPointer<NiNode>>(NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned char,NiPointer<NiNode> > *this)
{
  NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned char,NiPointer<NiNode> > *v1; // esi@1

  v1 = this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned char,NiPointer<NiNode> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned char,NiPointer<NiNode>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v1->m_ppkHashTable);
}
// 9B9FE0: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned char,NiPointer<NiNode>>::`vftable')(void *p, char);

//----- (006556D0) --------------------------------------------------------
void __thiscall NiTMap<unsigned char,NiPointer<NiNode>>::~NiTMap<unsigned char,NiPointer<NiNode>>(NiTMap<unsigned char,NiPointer<NiNode> > *this)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v1; // esi@1

  v1 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned char,NiPointer<NiNode> >Vtbl *)&NiTMap<unsigned char,NiPointer<NiNode>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v1->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned char,NiPointer<NiNode>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v1);
  operator delete[](v1->m_ppkHashTable);
}
// 9B9FE0: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned char,NiPointer<NiNode>>::`vftable')(void *p, char);
// 9BA09C: using guessed type int (__thiscall *NiTMap<unsigned char,NiPointer<NiNode>>::`vftable')(void *p, char);

//----- (00655740) --------------------------------------------------------
void __thiscall NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>::~NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>(NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,unsigned long,NiPointer<NiSourceTexture> > *this)
{
  NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,unsigned long,NiPointer<NiSourceTexture> > *v1; // esi@1

  v1 = this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,unsigned long,NiPointer<NiSourceTexture> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v1->m_ppkHashTable);
}
// 9BA000: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>::`vftable')(void *p, char);

//----- (00655760) --------------------------------------------------------
void __thiscall NiTMap<unsigned long,NiPointer<NiSourceTexture>>::~NiTMap<unsigned long,NiPointer<NiSourceTexture>>(NiTMap<unsigned long,NiPointer<NiSourceTexture> > *this)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v1; // esi@1

  v1 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,unsigned long,NiPointer<NiSourceTexture> >Vtbl *)&NiTMap<unsigned long,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v1->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v1);
  operator delete[](v1->m_ppkHashTable);
}
// 9BA000: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>::`vftable')(void *p, char);
// 9BA0BC: using guessed type int (__thiscall *NiTMap<unsigned long,NiPointer<NiSourceTexture>>::`vftable')(void *p, char);

//----- (006557D0) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<NiActorManager> >,unsigned long,NiPointer<NiActorManager> > *__thiscall NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>::`scalar deleting destructor'(NiTMapBase<DFALL<NiPointer<NiActorManager> >,unsigned long,NiPointer<NiActorManager> > *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<NiActorManager> >,unsigned long,NiPointer<NiActorManager> > *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<NiActorManager> >,unsigned long,NiPointer<NiActorManager> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B9F80: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>::`vftable')(void *p, char);

//----- (00655810) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<unsigned long,NiPointer<NiActorManager>>::`scalar deleting destructor'(NiTMap<unsigned long,NiPointer<NiActorManager> > *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // esi@1

  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<NiActorManager> >,unsigned long,NiPointer<NiActorManager> >Vtbl *)&NiTMap<unsigned long,NiPointer<NiActorManager>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v2);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B9F80: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiActorManager>>,unsigned long,NiPointer<NiActorManager>>::`vftable')(void *p, char);
// 9BA03C: using guessed type int (__thiscall *NiTMap<unsigned long,NiPointer<NiActorManager>>::`vftable')(void *p, char);

//----- (00655890) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<CharSet> >,unsigned long,NiPointer<CharSet> > *__thiscall NiTMapBase<DFALL<NiPointer<CharSet>>,unsigned long,NiPointer<CharSet>>::`vector deleting destructor'(NiTMapBase<DFALL<NiPointer<CharSet> >,unsigned long,NiPointer<CharSet> > *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<CharSet> >,unsigned long,NiPointer<CharSet> > *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<CharSet> >,unsigned long,NiPointer<CharSet> >Vtbl *)&NiTMapBase<DFALL<NiPointer<CharSet>>,unsigned long,NiPointer<CharSet>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B9FA0: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<CharSet>>,unsigned long,NiPointer<CharSet>>::`vftable')(void *p, char);

//----- (006558D0) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<unsigned long,NiPointer<CharSet>>::`scalar deleting destructor'(NiTMap<unsigned long,NiPointer<CharSet> > *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // esi@1

  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<CharSet> >,unsigned long,NiPointer<CharSet> >Vtbl *)&NiTMap<unsigned long,NiPointer<CharSet>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<CharSet>>,unsigned long,NiPointer<CharSet>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v2);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B9FA0: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<CharSet>>,unsigned long,NiPointer<CharSet>>::`vftable')(void *p, char);
// 9BA05C: using guessed type int (__thiscall *NiTMap<unsigned long,NiPointer<CharSet>>::`vftable')(void *p, char);

//----- (00655950) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned long,NiPointer<NiNode> > *__thiscall NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::`vector deleting destructor'(NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned long,NiPointer<NiNode> > *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned long,NiPointer<NiNode> > *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned long,NiPointer<NiNode> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B9FC0: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::`vftable')(void *p, char);

//----- (00655990) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<unsigned long,NiPointer<NiNode>>::`vector deleting destructor'(NiTMap<unsigned long,NiPointer<NiNode> > *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // esi@1

  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned long,NiPointer<NiNode> >Vtbl *)&NiTMap<unsigned long,NiPointer<NiNode>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v2);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B9FC0: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::`vftable')(void *p, char);
// 9BA07C: using guessed type int (__thiscall *NiTMap<unsigned long,NiPointer<NiNode>>::`vftable')(void *p, char);

//----- (00655A10) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned char,NiPointer<NiNode> > *__thiscall NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned char,NiPointer<NiNode>>::`vector deleting destructor'(NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned char,NiPointer<NiNode> > *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned char,NiPointer<NiNode> > *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned char,NiPointer<NiNode> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned char,NiPointer<NiNode>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B9FE0: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned char,NiPointer<NiNode>>::`vftable')(void *p, char);

//----- (00655A50) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<unsigned char,NiPointer<NiNode>>::`scalar deleting destructor'(NiTMap<unsigned char,NiPointer<NiNode> > *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // esi@1

  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<NiNode> >,unsigned char,NiPointer<NiNode> >Vtbl *)&NiTMap<unsigned char,NiPointer<NiNode>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned char,NiPointer<NiNode>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v2);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9B9FE0: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned char,NiPointer<NiNode>>::`vftable')(void *p, char);
// 9BA09C: using guessed type int (__thiscall *NiTMap<unsigned char,NiPointer<NiNode>>::`vftable')(void *p, char);

//----- (00655AD0) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,unsigned long,NiPointer<NiSourceTexture> > *__thiscall NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>::`vector deleting destructor'(NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,unsigned long,NiPointer<NiSourceTexture> > *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,unsigned long,NiPointer<NiSourceTexture> > *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,unsigned long,NiPointer<NiSourceTexture> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BA000: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>::`vftable')(void *p, char);

//----- (00655B10) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<unsigned long,NiPointer<NiSourceTexture>>::`vector deleting destructor'(NiTMap<unsigned long,NiPointer<NiSourceTexture> > *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // esi@1

  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<DFALL<NiPointer<NiSourceTexture> >,unsigned long,NiPointer<NiSourceTexture> >Vtbl *)&NiTMap<unsigned long,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v2);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BA000: using guessed type int (__thiscall *NiTMapBase<DFALL<NiPointer<NiSourceTexture>>,unsigned long,NiPointer<NiSourceTexture>>::`vftable')(void *p, char);
// 9BA0BC: using guessed type int (__thiscall *NiTMap<unsigned long,NiPointer<NiSourceTexture>>::`vftable')(void *p, char);

//----- (00655B90) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::_Lrotate(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *this, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *_Wherenode)
{
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v3; // ecx@3
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v4; // ecx@5

  v2 = _Wherenode->_Right;
  _Wherenode->_Right = v2->_Left;
  if ( !v2->_Left->_Isnil )
    v2->_Left->_Parent = _Wherenode;
  v2->_Parent = _Wherenode->_Parent;
  v3 = this->_Myhead;
  if ( _Wherenode == v3->_Parent )
  {
    v3->_Parent = v2;
    v2->_Left = _Wherenode;
    _Wherenode->_Parent = v2;
  }
  else
  {
    v4 = _Wherenode->_Parent;
    if ( _Wherenode == v4->_Left )
    {
      v4->_Left = v2;
      v2->_Left = _Wherenode;
      _Wherenode->_Parent = v2;
    }
    else
    {
      v4->_Right = v2;
      v2->_Left = _Wherenode;
      _Wherenode->_Parent = v2;
    }
  }
}

//----- (00655BF0) --------------------------------------------------------
char __cdecl ChrBasicEquipTab::GetByIndex(ChrClassType eChrClassType, char byGender)
{
  unsigned int v2; // esi@1
  char *v3; // eax@2
  char result; // al@4

  v2 = 0;
  if ( ITableBase<ChrBasicEquip,ChrBasicEquipTab>::GetTotal() )
  {
    while ( 1 )
    {
      v3 = CDataReader::GetRecord((CDataReader *)(ITableBase<ChrBasicEquip,ChrBasicEquipTab>::ms_pkTable + 4), v2);
      if ( *(_DWORD *)v3 == eChrClassType )
        break;
      if ( ++v2 >= ITableBase<ChrBasicEquip,ChrBasicEquipTab>::GetTotal() )
        goto LABEL_4;
    }
    if ( byGender == 1 )
      result = v3[4];
    else
      result = v3[5];
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}
// A8C268: using guessed type int ITableBase<ChrBasicEquip,ChrBasicEquipTab>::ms_pkTable;

//----- (00655C40) --------------------------------------------------------
NiKFMTool::Sequence *__thiscall NiKFMTool::GetSequence(NiKFMTool *this, unsigned int uiSequenceID)
{
  char v2; // al@1

  v2 = NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
         (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_mapSequences,
         uiSequenceID,
         (NiVBSet **)&uiSequenceID);
  return (NiKFMTool::Sequence *)(v2 != 0 ? uiSequenceID : 0);
}

//----- (00655C70) --------------------------------------------------------
NiUnsharedGeometryGroup *__cdecl CharClass::GetBaseEngName(char kClassID)
{
  char v1; // al@2
  char *v2; // eax@9
  NiUnsharedGeometryGroup *result; // eax@10

  switch ( kClassID )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      v1 = 1;
      break;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      v1 = 6;
      break;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      v1 = 11;
      break;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      v1 = 16;
      break;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      v1 = 21;
      break;
    case 0x1A:
    case 0x1B:
      v1 = 26;
      break;
    default:
      v1 = 0;
      break;
  }
  v2 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), (unsigned __int8)v1);
  if ( v2 )
    result = (NiUnsharedGeometryGroup *)(v2 + 5);
  else
    result = &unk_96F8EB;
  return result;
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (00655D30) --------------------------------------------------------
NiActorManager *__thiscall CharResMgr::GetCharActorFromMap(CharResMgr *this, char kClassID, char byGender)
{
  const char *v3; // eax@1
  int v4; // esi@1
  NiActorManager *v5; // edi@2
  NiActorManager *result; // eax@4

  v3 = (const char *)(((unsigned __int8)byGender | ((unsigned __int8)kClassID << 8)) << 16);
  *(_DWORD *)&kClassID = 0;
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)this,
    v3,
    (NiPointer<NiShaderLibrary> *)&kClassID);
  v4 = kClassID;
  if ( kClassID )
  {
    NiObjectNET::ms_eCopyType = 1;
    v5 = NiActorManager::Clone((NiActorManager *)kClassID);
    if ( !InterlockedDecrement((volatile LONG *)(v4 + 4)) )
      (**(void (__thiscall ***)(_DWORD, _DWORD))v4)(v4, 1);
    result = v5;
  }
  else
  {
    result = 0;
  }
  return result;
}
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (00655DE0) --------------------------------------------------------
NiActorManager *__thiscall CharResMgr::GetCharActorFromMap_NoClone(CharResMgr *this, char kClassID, char byGender)
{
  const char *v3; // eax@1
  NiActorManager *v4; // esi@1
  NiActorManager *result; // eax@4

  v3 = (const char *)(((unsigned __int8)byGender | ((unsigned __int8)kClassID << 8)) << 16);
  *(_DWORD *)&kClassID = 0;
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)this,
    v3,
    (NiPointer<NiShaderLibrary> *)&kClassID);
  v4 = (NiActorManager *)kClassID;
  if ( kClassID )
  {
    if ( !InterlockedDecrement((volatile LONG *)(kClassID + 4)) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    result = v4;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00655E80) --------------------------------------------------------
NiActorManager *__thiscall CharResMgr::GetRidePetActorFromMap(CharResMgr *this, unsigned __int16 wPetID)
{
  NiActorManager *v2; // esi@1
  NiActorManager *v3; // edi@2
  NiActorManager *result; // eax@4
  NiPointer<NiActorManager> spActor; // [sp+Ch] [bp-10h]@1
  int v6; // [sp+18h] [bp-4h]@1

  spActor.m_pObject = 0;
  v6 = 0;
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kRidePetMap,
    (const char *)wPetID,
    (NiPointer<NiShaderLibrary> *)&spActor);
  v2 = spActor.m_pObject;
  if ( spActor.m_pObject )
  {
    NiObjectNET::ms_eCopyType = 1;
    v3 = NiActorManager::Clone(spActor.m_pObject);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    result = v3;
  }
  else
  {
    result = 0;
  }
  return result;
}
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (00655F30) --------------------------------------------------------
NiActorManager *__thiscall CharResMgr::GetMoverActorFromMap(CharResMgr *this, unsigned int kMoverID)
{
  NiActorManager *v2; // esi@1
  NiActorManager *v3; // edi@2
  NiActorManager *result; // eax@4
  NiPointer<NiActorManager> spActor; // [sp+Ch] [bp-10h]@1
  int v6; // [sp+18h] [bp-4h]@1

  spActor.m_pObject = 0;
  v6 = 0;
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kMoverMap,
    (const char *)kMoverID,
    (NiPointer<NiShaderLibrary> *)&spActor);
  v2 = spActor.m_pObject;
  if ( spActor.m_pObject )
  {
    NiObjectNET::ms_eCopyType = 1;
    v3 = NiActorManager::Clone(spActor.m_pObject);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    result = v3;
  }
  else
  {
    result = 0;
  }
  return result;
}
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (00655FD0) --------------------------------------------------------
NiActorManager *__thiscall CharResMgr::GetPetActorFromMap(CharResMgr *this, unsigned int kPetID)
{
  NiActorManager *v2; // esi@1
  NiActorManager *v3; // edi@2
  NiActorManager *result; // eax@4
  NiPointer<NiActorManager> spActor; // [sp+Ch] [bp-10h]@1
  int v6; // [sp+18h] [bp-4h]@1

  spActor.m_pObject = 0;
  v6 = 0;
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kPetMap,
    (const char *)kPetID,
    (NiPointer<NiShaderLibrary> *)&spActor);
  v2 = spActor.m_pObject;
  if ( spActor.m_pObject )
  {
    NiObjectNET::ms_eCopyType = 1;
    v3 = NiActorManager::Clone(spActor.m_pObject);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    result = v3;
  }
  else
  {
    result = 0;
  }
  return result;
}
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (00656070) --------------------------------------------------------
NiActorManager *__thiscall CharResMgr::GetMobActorFromMap(CharResMgr *this, unsigned __int16 kMobID)
{
  const char *v2; // eax@1
  int v3; // esi@1
  NiActorManager *v4; // edi@2
  NiActorManager *result; // eax@4

  v2 = (const char *)kMobID;
  *(_DWORD *)&kMobID = 0;
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kMobActorMap,
    v2,
    (NiPointer<NiShaderLibrary> *)&kMobID);
  v3 = kMobID;
  NiObjectNET::ms_eCopyType = 1;
  if ( kMobID )
  {
    NiObjectNET::ms_eCopyType = 1;
    v4 = NiActorManager::Clone((NiActorManager *)kMobID);
    if ( !InterlockedDecrement((volatile LONG *)(v3 + 4)) )
      (**(void (__thiscall ***)(_DWORD, _DWORD))v3)(v3, 1);
    result = v4;
  }
  else
  {
    result = 0;
  }
  return result;
}
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (00656120) --------------------------------------------------------
CharSet *__thiscall CharResMgr::GetCharSetFromMap(CharResMgr *this, char kClassID, char byGender, unsigned __int16 wNo)
{
  const char *v4; // eax@1
  void (__thiscall ***v5)(_DWORD, _DWORD); // esi@1

  v4 = (const char *)(wNo | (((unsigned __int8)byGender | ((unsigned __int8)kClassID << 8)) << 16));
  *(_DWORD *)&kClassID = 0;
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kCharSetMap,
    v4,
    (NiPointer<NiShaderLibrary> *)&kClassID);
  v5 = (void (__thiscall ***)(_DWORD, _DWORD))kClassID;
  if ( kClassID && !InterlockedDecrement((volatile LONG *)(kClassID + 4)) )
    (**v5)(v5, 1);
  return (CharSet *)v5;
}

//----- (006561B0) --------------------------------------------------------
NiNode *__thiscall CharResMgr::GetHouseFromMap(CharResMgr *this, unsigned int dwHouseID)
{
  NiNode *v2; // esi@1
  NiNode *v3; // edi@2
  NiNode *result; // eax@4
  NiPointer<NiNode> spNode; // [sp+Ch] [bp-10h]@1
  int v6; // [sp+18h] [bp-4h]@1

  spNode.m_pObject = 0;
  v6 = 0;
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kHouseMap,
    (const char *)dwHouseID,
    (NiPointer<NiShaderLibrary> *)&spNode);
  v2 = spNode.m_pObject;
  if ( spNode.m_pObject )
  {
    NiObjectNET::ms_eCopyType = 1;
    v3 = (NiNode *)NiObject::Clone((NiObject *)&spNode.m_pObject->vfptr);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    result = v3;
  }
  else
  {
    result = 0;
  }
  return result;
}
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (00656250) --------------------------------------------------------
NiNode *__thiscall CharResMgr::GetQuestInfoFromMap(CharResMgr *this, unsigned int dwQuestInfo)
{
  NiNode *v2; // esi@1
  NiNode *v3; // edi@2
  NiNode *result; // eax@4
  NiPointer<NiNode> spNode; // [sp+Ch] [bp-10h]@1
  int v6; // [sp+18h] [bp-4h]@1

  spNode.m_pObject = 0;
  v6 = 0;
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kQuestInfoMap,
    (const char *)dwQuestInfo,
    (NiPointer<NiShaderLibrary> *)&spNode);
  v2 = spNode.m_pObject;
  if ( spNode.m_pObject )
  {
    NiObjectNET::ms_eCopyType = 1;
    v3 = (NiNode *)NiObject::Clone((NiObject *)&spNode.m_pObject->vfptr);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    result = v3;
  }
  else
  {
    result = 0;
  }
  return result;
}
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (00656300) --------------------------------------------------------
NiNode *__thiscall CharResMgr::GetHairFromMap(CharResMgr *this, char kClassID, char byGender, char byID, char byPartsNum)
{
  const char *v5; // eax@1
  int v6; // esi@1
  NiNode *v7; // edi@2
  NiNode *result; // eax@4

  v5 = (const char *)((unsigned __int8)byPartsNum | (((unsigned __int8)byID | (((unsigned __int8)byGender | ((unsigned __int8)kClassID << 8)) << 8)) << 8));
  *(_DWORD *)&kClassID = 0;
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kHairMap,
    v5,
    (NiPointer<NiShaderLibrary> *)&kClassID);
  v6 = kClassID;
  if ( kClassID )
  {
    NiObjectNET::ms_eCopyType = 1;
    v7 = (NiNode *)NiObject::Clone((NiObject *)kClassID);
    if ( !InterlockedDecrement((volatile LONG *)(v6 + 4)) )
      (**(void (__thiscall ***)(_DWORD, _DWORD))v6)(v6, 1);
    result = v7;
  }
  else
  {
    result = 0;
  }
  return result;
}
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (006563C0) --------------------------------------------------------
NiNode *__thiscall CharResMgr::GetFaceFromMap(CharResMgr *this, char kClassID, char byGender, unsigned __int16 wType)
{
  const char *v4; // eax@1
  int v5; // esi@1
  NiNode *v6; // edi@2
  NiNode *result; // eax@4

  v4 = (const char *)(wType | (((unsigned __int8)byGender | ((unsigned __int8)kClassID << 8)) << 16));
  *(_DWORD *)&kClassID = 0;
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kFaceMap,
    v4,
    (NiPointer<NiShaderLibrary> *)&kClassID);
  v5 = kClassID;
  if ( kClassID )
  {
    NiObjectNET::ms_eCopyType = 1;
    v6 = (NiNode *)NiObject::Clone((NiObject *)kClassID);
    if ( !InterlockedDecrement((volatile LONG *)(v5 + 4)) )
      (**(void (__thiscall ***)(_DWORD, _DWORD))v5)(v5, 1);
    result = v6;
  }
  else
  {
    result = 0;
  }
  return result;
}
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (00656480) --------------------------------------------------------
NiNode *__thiscall CharResMgr::GetItemFromMap(CharResMgr *this, unsigned __int16 kItemID, char byParsingType)
{
  const char *v3; // eax@1
  int v4; // esi@1
  NiNode *v5; // edi@2
  NiNode *result; // eax@4

  v3 = (const char *)(kItemID | ((unsigned __int8)byParsingType << 24));
  *(_DWORD *)&byParsingType = 0;
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kItemMap,
    v3,
    (NiPointer<NiShaderLibrary> *)&byParsingType);
  v4 = byParsingType;
  if ( byParsingType )
  {
    NiObjectNET::ms_eCopyType = 1;
    v5 = (NiNode *)NiObject::Clone((NiObject *)byParsingType);
    if ( !InterlockedDecrement((volatile LONG *)(v4 + 4)) )
      (**(void (__thiscall ***)(_DWORD, _DWORD))v4)(v4, 1);
    result = v5;
  }
  else
  {
    result = 0;
  }
  return result;
}
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (00656530) --------------------------------------------------------
NiNode *__thiscall CharResMgr::GetDropItemFromMap(CharResMgr *this, unsigned __int16 kItemID)
{
  const char *v2; // eax@1
  int v3; // esi@1
  NiNode *v4; // edi@2
  NiNode *result; // eax@4

  v2 = (const char *)kItemID;
  *(_DWORD *)&kItemID = 0;
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kDropItemMap,
    v2,
    (NiPointer<NiShaderLibrary> *)&kItemID);
  v3 = kItemID;
  if ( kItemID )
  {
    NiObjectNET::ms_eCopyType = 1;
    v4 = (NiNode *)NiObject::Clone((NiObject *)kItemID);
    if ( !InterlockedDecrement((volatile LONG *)(v3 + 4)) )
      (**(void (__thiscall ***)(_DWORD, _DWORD))v3)(v3, 1);
    result = v4;
  }
  else
  {
    result = 0;
  }
  return result;
}
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (006565E0) --------------------------------------------------------
NiSourceTexture *__thiscall CharResMgr::GetFaceTextureFromMap(CharResMgr *this, char kClassID, char byGender, unsigned __int16 wNo)
{
  const char *v4; // eax@1
  void (__thiscall ***v5)(_DWORD, _DWORD); // esi@1

  v4 = (const char *)(wNo | (((unsigned __int8)byGender | ((unsigned __int8)kClassID << 8)) << 16));
  *(_DWORD *)&kClassID = 0;
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kFaceTextureMap,
    v4,
    (NiPointer<NiShaderLibrary> *)&kClassID);
  v5 = (void (__thiscall ***)(_DWORD, _DWORD))kClassID;
  if ( kClassID && !InterlockedDecrement((volatile LONG *)(kClassID + 4)) )
    (**v5)(v5, 1);
  return (NiSourceTexture *)v5;
}

//----- (00656680) --------------------------------------------------------
NiSourceTexture *__thiscall CharResMgr::GetSetTextureFromMap(CharResMgr *this, char kClassID, char byGender, unsigned __int16 kItemID)
{
  const char *v4; // eax@1
  void (__thiscall ***v5)(_DWORD, _DWORD); // esi@1

  v4 = (const char *)(kItemID | (((unsigned __int8)byGender | ((unsigned __int8)kClassID << 8)) << 16));
  *(_DWORD *)&kClassID = 0;
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kSetTextureMap,
    v4,
    (NiPointer<NiShaderLibrary> *)&kClassID);
  v5 = (void (__thiscall ***)(_DWORD, _DWORD))kClassID;
  if ( kClassID && !InterlockedDecrement((volatile LONG *)(kClassID + 4)) )
    (**v5)(v5, 1);
  return (NiSourceTexture *)v5;
}

//----- (00656720) --------------------------------------------------------
void __thiscall CharResMgr::AddMoverActorToMap(CharResMgr *this, NiActorManager *pkActor, unsigned int kMoverID)
{
  CharResMgr *v3; // esi@1
  NiActorManager *v4; // [sp-4h] [bp-Ch]@1
  NiActorManager **v5; // [sp+4h] [bp-4h]@1

  v3 = this;
  v5 = &v4;
  v4 = pkActor;
  if ( pkActor )
    InterlockedIncrement((volatile LONG *)&pkActor->m_uiRefCount);
  NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
    (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v3->m_kMoverMap,
    kMoverID,
    (NiPointer<PgWinBut>)v4);
}

//----- (00656760) --------------------------------------------------------
void __thiscall CharResMgr::AddPetActorToMap(CharResMgr *this, NiActorManager *pkActor, unsigned int kPetID)
{
  CharResMgr *v3; // esi@1
  NiActorManager *v4; // [sp-4h] [bp-Ch]@1
  NiActorManager **v5; // [sp+4h] [bp-4h]@1

  v3 = this;
  v5 = &v4;
  v4 = pkActor;
  if ( pkActor )
    InterlockedIncrement((volatile LONG *)&pkActor->m_uiRefCount);
  NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
    (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v3->m_kPetMap,
    kPetID,
    (NiPointer<PgWinBut>)v4);
}

//----- (006567A0) --------------------------------------------------------
NiSourceTexture *__thiscall CharResMgr::GetClosedEyeFromMap(CharResMgr *this, char kClassID, char byGender, unsigned __int16 wNo)
{
  const char *v4; // eax@1
  void (__thiscall ***v5)(_DWORD, _DWORD); // esi@1

  v4 = (const char *)(wNo | (((unsigned __int8)byGender | ((unsigned __int8)kClassID << 8)) << 16));
  *(_DWORD *)&kClassID = 0;
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kClosedEyeMap,
    v4,
    (NiPointer<NiShaderLibrary> *)&kClassID);
  v5 = (void (__thiscall ***)(_DWORD, _DWORD))kClassID;
  if ( kClassID && !InterlockedDecrement((volatile LONG *)(kClassID + 4)) )
    (**v5)(v5, 1);
  return (NiSourceTexture *)v5;
}

//----- (00656840) --------------------------------------------------------
void __thiscall CharResMgr::AddSetTextureToMap(CharResMgr *this, NiSourceTexture *pkTexture, char kClassID, char byGender, unsigned __int16 kItemID)
{
  CharResMgr *v5; // edi@1
  NiSourceTexture *v6; // [sp-4h] [bp-Ch]@1

  v5 = this;
  v6 = pkTexture;
  if ( pkTexture )
    InterlockedIncrement((volatile LONG *)&pkTexture->m_uiRefCount);
  NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
    (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v5->m_kSetTextureMap,
    kItemID | (((unsigned __int8)byGender | ((unsigned __int8)kClassID << 8)) << 16),
    (NiPointer<PgWinBut>)v6);
}

//----- (00656890) --------------------------------------------------------
void __stdcall NiTMap<unsigned long,NiPointer<NiActorManager>>::DeleteItem(NiTMapItem<char const *,NiPointer<NiD3DXEffectTechniqueSet> > *pkItem)
{
  NiD3DXEffectTechniqueSet *v2; // esi@1
  NiD3DXEffectTechniqueSet *v3; // esi@7

  v2 = pkItem->m_val.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    pkItem->m_val.m_pObject = 0;
  }
  if ( pkItem )
  {
    v3 = pkItem->m_val.m_pObject;
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
    {
      if ( v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
    operator delete(pkItem);
  }
}

//----- (00656900) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::find(std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *result, NiActorManager *const *_Keyval)
{
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v3; // edx@1
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v4; // eax@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *v5; // eax@8

  v3 = this->_Myhead;
  v4 = v3->_Parent;
  while ( !v4->_Isnil )
  {
    if ( v4->_Myval.first >= *_Keyval )
    {
      v3 = v4;
      v4 = v4->_Left;
    }
    else
    {
      v4 = v4->_Right;
    }
  }
  if ( v3 == this->_Myhead || *_Keyval < v3->_Myval.first )
  {
    v5 = result;
    result->_Ptr = this->_Myhead;
  }
  else
  {
    v5 = result;
    result->_Ptr = v3;
  }
  return v5;
}

//----- (00656970) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Buynode<std::pair<int,NiPointer<stGlobalLightInfo>> &>(std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *this, std::pair<unsigned long const ,NiPointer<NiControllerSequence> > *_Val)
{
  std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *v2; // edi@1
  void *v3; // eax@1
  _WORD *v4; // esi@1
  unsigned int *v5; // eax@2
  std::pair<unsigned long const ,NiPointer<NiControllerSequence> > *v6; // ecx@3
  NiControllerSequence *v7; // ecx@3
  std::exception pExceptionObject; // [sp+8h] [bp-Ch]@6

  v2 = this;
  v3 = operator new(0x18u);
  v4 = v3;
  if ( !v3 )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  *(_DWORD *)v3 = v2->_Myhead;
  *((_DWORD *)v3 + 1) = v2->_Myhead;
  *((_DWORD *)v3 + 2) = v2->_Myhead;
  v5 = (unsigned int *)((char *)v3 + 12);
  v4[10] = 0;
  if ( v4 != (_WORD *)-12 )
  {
    v6 = _Val;
    *v5 = _Val->first;
    v7 = v6->second.m_pObject;
    *((_DWORD *)v4 + 4) = v7;
    if ( v7 )
      InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  }
  return (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)v4;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00656A00) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,NiPointer<NiSourceTexture>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,NiPointer<NiSourceTexture>>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *_Node, bool _Leftish)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v4; // edx@1
  std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *v5; // edi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v6; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v7; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v8; // esi@1
  bool v9; // cl@1
  unsigned int v10; // ebx@2
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v11; // ebx@10
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v12; // edx@12
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > >,bool> *v13; // eax@12
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v14; // ecx@15
  NiControllerSequence *v15; // esi@16
  bool _Addleft; // [sp+Ch] [bp-4h]@1

  v4 = _Node;
  v5 = this;
  v6 = this->_Myhead;
  v7 = v6->_Parent;
  v8 = v6;
  v9 = 1;
  _Addleft = 1;
  if ( !v7->_Isnil )
  {
    v10 = _Node->_Myval.first;
    do
    {
      v8 = v7;
      if ( _Leftish )
        v9 = v7->_Myval.first >= v10;
      else
        v9 = v10 < v7->_Myval.first;
      _Addleft = v9;
      if ( v9 )
        v7 = v7->_Left;
      else
        v7 = v7->_Right;
    }
    while ( !v7->_Isnil );
  }
  v11 = v8;
  *(_DWORD *)&_Leftish = v8;
  if ( v9 )
  {
    if ( v8 == v5->_Myhead->_Left )
    {
      v12 = std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Insert(
              v5,
              (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *)&_Leftish,
              1,
              v8,
              _Node)->_Ptr;
      v13 = result;
      result->first._Ptr = v12;
      result->second = 1;
      return v13;
    }
    std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,GuildNameCache::GuildNameStorage *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,GuildNameCache::GuildNameStorage *>>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&_Leftish);
    v11 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)_Leftish;
    v4 = _Node;
  }
  if ( v11->_Myval.first >= v4->_Myval.first )
  {
    v15 = v4->_Myval.second.m_pObject;
    if ( v15 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) )
      {
        if ( v15 )
          v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
      }
      v4 = _Node;
    }
    operator delete(v4);
    v13 = result;
    result->first._Ptr = v11;
    result->second = 0;
  }
  else
  {
    v14 = std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Insert(
            v5,
            (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *)&_Leftish,
            _Addleft,
            v8,
            v4)->_Ptr;
    v13 = result;
    result->first._Ptr = v14;
    result->second = 1;
  }
  return v13;
}

//----- (00656B00) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::_Erase(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *this, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *_Rootnode)
{
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v3; // edi@1
  int v4; // esi@4
  int v5; // ebx@4
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *v6; // [sp+14h] [bp-10h]@1

  v6 = this;
  v2 = _Rootnode;
  v3 = _Rootnode;
  if ( !_Rootnode->_Isnil )
  {
    while ( 1 )
    {
      std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::_Erase(
        v6,
        v3->_Right);
      v3 = v3->_Left;
      v4 = (int)&v2->_Myval;
      v5 = *(_DWORD *)(v4 + 28);
      if ( v5 && !InterlockedDecrement((volatile LONG *)(v5 + 4)) && v5 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v5)(v5, 1);
      if ( *(_DWORD *)(v4 + 20) >= 0x10u )
        operator delete(*(void **)v4);
      *(_DWORD *)(v4 + 20) = 15;
      *(_DWORD *)(v4 + 16) = 0;
      *(_BYTE *)v4 = 0;
      operator delete(_Rootnode);
      _Rootnode = v3;
      if ( v3->_Isnil )
        break;
      v2 = v3;
    }
  }
}

//----- (00656BE0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::erase(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > _Where)
{
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v3; // ebx@3
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v4; // edi@4
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v5; // eax@7
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v6; // esi@8
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v7; // eax@10
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node **v8; // ebx@15
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v9; // eax@17
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v10; // ebx@20
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v11; // ecx@29
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v12; // ecx@31
  char v13; // cl@34
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *v14; // ecx@36
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v15; // eax@38
  void **v16; // esi@59
  NiTexture *v17; // edi@59
  unsigned int v18; // eax@65
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > *v19; // eax@67
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *_Erasednode; // [sp+14h] [bp-14h]@3
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *v21; // [sp+18h] [bp-10h]@1

  v21 = this;
  if ( _Where._Ptr->_Isnil )
    std::_Xout_of_range("invalid map/set<T> iterator");
  v3 = _Where._Ptr;
  _Erasednode = _Where._Ptr;
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiAmbientLight>>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >,std::_Iterator_base0> *)&_Where);
  if ( v3->_Left->_Isnil )
  {
    v4 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v3->_Right;
LABEL_8:
    v6 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v3->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v7 = v21->_Myhead;
    if ( v7->_Parent == v3 )
    {
      v7->_Parent = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)v4;
    }
    else if ( (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)v6->_Left == v3 )
    {
      v6->_Left = v4;
    }
    else
    {
      v6->_Right = v4;
    }
    v8 = &v21->_Myhead->_Left;
    if ( *v8 == _Erasednode )
    {
      if ( v4->_Isnil )
        v9 = v6;
      else
        v9 = std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiAmbientLight>>>,0>>::_Min(v4);
      *v8 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)v9;
    }
    v10 = v21->_Myhead;
    if ( v10->_Right == _Erasednode )
    {
      if ( v4->_Isnil )
        v10->_Right = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)v6;
      else
        v10->_Right = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::_Max(v4);
    }
    goto LABEL_35;
  }
  if ( v3->_Right->_Isnil )
  {
    v4 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v3->_Left;
    goto LABEL_8;
  }
  v5 = _Where._Ptr;
  v4 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)_Where._Ptr->_Right;
  if ( _Where._Ptr == v3 )
    goto LABEL_8;
  v3->_Left->_Parent = _Where._Ptr;
  v5->_Left = v3->_Left;
  if ( v5 == v3->_Right )
  {
    v6 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v5;
  }
  else
  {
    v6 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v5->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v6->_Left = v4;
    v5->_Right = v3->_Right;
    v3->_Right->_Parent = v5;
  }
  v11 = v21->_Myhead;
  if ( v11->_Parent == v3 )
  {
    v11->_Parent = v5;
  }
  else
  {
    v12 = v3->_Parent;
    if ( v12->_Left == v3 )
      v12->_Left = v5;
    else
      v12->_Right = v5;
  }
  v5->_Parent = v3->_Parent;
  v13 = v5->_Color;
  v5->_Color = v3->_Color;
  v3->_Color = v13;
LABEL_35:
  if ( _Erasednode->_Color == 1 )
  {
    v14 = (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *)v21;
    if ( v4 != (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v21->_Myhead->_Parent )
    {
      do
      {
        if ( v4->_Color != 1 )
          break;
        v15 = v6->_Left;
        if ( v4 == v6->_Left )
        {
          v15 = v6->_Right;
          if ( !v15->_Color )
          {
            v15->_Color = 1;
            v6->_Color = 0;
            std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::_Lrotate(
              v14,
              v6);
            v15 = v6->_Right;
            v14 = (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *)v21;
          }
          if ( v15->_Isnil )
            goto LABEL_53;
          if ( v15->_Left->_Color != 1 || v15->_Right->_Color != 1 )
          {
            if ( v15->_Right->_Color == 1 )
            {
              v15->_Left->_Color = 1;
              v15->_Color = 0;
              std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>,0>>::_Rrotate(
                v14,
                v15);
              v15 = v6->_Right;
              v14 = (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *)v21;
            }
            v15->_Color = v6->_Color;
            v6->_Color = 1;
            v15->_Right->_Color = 1;
            std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::_Lrotate(
              v14,
              v6);
            break;
          }
        }
        else
        {
          if ( !v15->_Color )
          {
            v15->_Color = 1;
            v6->_Color = 0;
            std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>,0>>::_Rrotate(
              v14,
              v6);
            v15 = v6->_Left;
            v14 = (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *)v21;
          }
          if ( v15->_Isnil )
            goto LABEL_53;
          if ( v15->_Right->_Color != 1 || v15->_Left->_Color != 1 )
          {
            if ( v15->_Left->_Color == 1 )
            {
              v15->_Right->_Color = 1;
              v15->_Color = 0;
              std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::_Lrotate(
                v14,
                v15);
              v15 = v6->_Left;
              v14 = (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *)v21;
            }
            v15->_Color = v6->_Color;
            v6->_Color = 1;
            v15->_Left->_Color = 1;
            std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>,0>>::_Rrotate(
              v14,
              v6);
            break;
          }
        }
        v15->_Color = 0;
LABEL_53:
        v4 = v6;
        v6 = v6->_Parent;
      }
      while ( v4 != v14->_Myhead->_Parent );
    }
    v4->_Color = 1;
  }
  v16 = (void **)&_Erasednode->_Myval.first._Bx._Ptr;
  v17 = _Erasednode->_Myval.second.m_pObject;
  if ( v17 && !InterlockedDecrement((volatile LONG *)&v17->m_uiRefCount) && v17 )
    v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
  if ( _Erasednode->_Myval.first._Myres >= 0x10 )
    operator delete(*v16);
  _Erasednode->_Myval.first._Myres = 15;
  _Erasednode->_Myval.first._Mysize = 0;
  *(_BYTE *)v16 = 0;
  operator delete(_Erasednode);
  v18 = v21->_Mysize;
  if ( v18 )
    v21->_Mysize = v18 - 1;
  v19 = result;
  result->_Ptr = _Where._Ptr;
  return v19;
}

//----- (00656EC0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > _Where, std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *_Node)
{
  std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v6; // edi@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *v7; // eax@2
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v8; // eax@7
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v9; // ecx@20
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > >,bool> v10; // [sp+8h] [bp-8h]@20

  v4 = this;
  v5 = this->_Myhead;
  v6 = _Node;
  if ( !this->_Mysize )
  {
    std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Insert(
      this,
      result,
      1,
      v5,
      _Node);
    return result;
  }
  if ( _Where._Ptr == v5->_Left )
  {
    if ( _Node->_Myval.first < _Where._Ptr->_Myval.first )
    {
      std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Insert(
        this,
        result,
        1,
        _Where._Ptr,
        _Node);
      return result;
    }
    goto LABEL_20;
  }
  if ( _Where._Ptr == v5 )
  {
    v8 = v5->_Right;
    if ( v8->_Myval.first < _Node->_Myval.first )
    {
      std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Insert(
        this,
        result,
        0,
        v8,
        _Node);
      return result;
    }
    goto LABEL_20;
  }
  if ( _Node->_Myval.first >= _Where._Ptr->_Myval.first
    || (_Node = _Where._Ptr,
        std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,GuildNameCache::GuildNameStorage *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,GuildNameCache::GuildNameStorage *>>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&_Node),
        _Node->_Myval.first >= v6->_Myval.first) )
  {
    if ( _Where._Ptr->_Myval.first >= v6->_Myval.first
      || (_Node = _Where._Ptr,
          std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const,int>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&_Node),
          _Node != v4->_Myhead)
      && v6->_Myval.first >= _Node->_Myval.first )
    {
LABEL_20:
      v9 = std::_Tree<std::_Tmap_traits<unsigned int,NiPointer<NiSourceTexture>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,NiPointer<NiSourceTexture>>>,0>>::_Linsert(
             v4,
             &v10,
             v6,
             0)->first._Ptr;
      v7 = result;
      result->_Ptr = v9;
      return v7;
    }
    if ( _Where._Ptr->_Right->_Isnil )
    {
      std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Insert(
        v4,
        result,
        0,
        _Where._Ptr,
        v6);
      v7 = result;
    }
    else
    {
      std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Insert(
        v4,
        result,
        1,
        _Node,
        v6);
      v7 = result;
    }
  }
  else if ( _Node->_Right->_Isnil )
  {
    std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Insert(
      v4,
      result,
      0,
      _Node,
      v6);
    v7 = result;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Insert(
      v4,
      result,
      1,
      _Where._Ptr,
      v6);
    v7 = result;
  }
  return v7;
}

//----- (00657020) --------------------------------------------------------
NiNode *__thiscall CharResMgr::GetSubItemFromMap(CharResMgr *this, const char *szName)
{
  CharResMgr *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v3; // eax@1
  int v4; // esi@1
  unsigned int v5; // edi@2
  int v6; // eax@2
  unsigned int v7; // ebx@4
  unsigned int v8; // edx@4
  const char *v9; // ecx@6
  int v10; // eax@8
  bool v11; // sf@8
  signed int v12; // eax@10
  int *v13; // eax@14
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiNode>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiNode> > >,0> >::_Node *v14; // esi@16
  NiObject *v15; // ecx@19
  NiNode *result; // eax@20
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v17; // [sp+10h] [bp-38h]@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiNode>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiNode> > >,0> > > iterEnd; // [sp+14h] [bp-34h]@1
  int v19; // [sp+18h] [bp-30h]@15
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Keyval; // [sp+1Ch] [bp-2Ch]@1
  int v21; // [sp+44h] [bp-4h]@1

  v2 = this;
  iterEnd._Ptr = this->m_kSubItemMap._Myhead;
  _Keyval._Myres = 15;
  _Keyval._Mysize = 0;
  _Keyval._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Keyval, szName, strlen(szName));
  v21 = 0;
  v3 = std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::_Lbound(
         (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > *)&v2->m_kSubItemMap,
         &_Keyval);
  v4 = (int)v2->m_kSubItemMap._Myhead;
  v17 = v3;
  if ( v3 == (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)v4 )
    goto LABEL_24;
  v5 = v3->_Myval.first._Mysize;
  v6 = (int)&v3->_Myval;
  if ( *(_DWORD *)(v6 + 20) >= 0x10u )
    v6 = *(_DWORD *)v6;
  v7 = _Keyval._Mysize;
  v8 = _Keyval._Mysize;
  if ( _Keyval._Mysize >= v5 )
    v8 = v5;
  v9 = _Keyval._Bx._Ptr;
  if ( _Keyval._Myres < 0x10 )
    v9 = (const char *)&_Keyval;
  v10 = std::char_traits<char>::compare(v9, (const char *)v6, v8);
  v11 = v10 < 0;
  if ( !v10 )
  {
    if ( v7 >= v5 )
      v12 = v7 != v5;
    else
      v12 = -1;
    v11 = v12 < 0;
  }
  if ( v11 )
  {
LABEL_24:
    v19 = v4;
    v13 = &v19;
  }
  else
  {
    v13 = (int *)&v17;
  }
  v14 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiNode>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiNode> > >,0> >::_Node *)*v13;
  v21 = -1;
  if ( _Keyval._Myres >= 0x10 )
    operator delete(_Keyval._Bx._Ptr);
  _Keyval._Myres = 15;
  _Keyval._Mysize = 0;
  _Keyval._Bx._Buf[0] = 0;
  if ( v14 != iterEnd._Ptr && (v15 = (NiObject *)&v14->_Myval.second.m_pObject->vfptr) != 0 )
  {
    NiObjectNET::ms_eCopyType = 1;
    result = (NiNode *)NiObject::Clone(v15);
  }
  else
  {
    result = 0;
  }
  return result;
}
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (00657170) --------------------------------------------------------
NiTexture *__thiscall CharResMgr::GetSubItemTextureMap(CharResMgr *this, const char *szName)
{
  CharResMgr *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v3; // eax@1
  int v4; // esi@1
  unsigned int v5; // edi@2
  int v6; // eax@2
  unsigned int v7; // ebx@4
  unsigned int v8; // edx@4
  const char *v9; // ecx@6
  int v10; // eax@8
  bool v11; // sf@8
  signed int v12; // eax@10
  int *v13; // eax@14
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v14; // esi@16
  NiObject *v15; // ecx@19
  NiTexture *result; // eax@20
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v17; // [sp+10h] [bp-38h]@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > iterEnd; // [sp+14h] [bp-34h]@1
  int v19; // [sp+18h] [bp-30h]@15
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Keyval; // [sp+1Ch] [bp-2Ch]@1
  int v21; // [sp+44h] [bp-4h]@1

  v2 = this;
  iterEnd._Ptr = this->m_kSubItemTextureMap._Myhead;
  _Keyval._Myres = 15;
  _Keyval._Mysize = 0;
  _Keyval._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Keyval, szName, strlen(szName));
  v21 = 0;
  v3 = std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::_Lbound(
         (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > *)&v2->m_kSubItemTextureMap,
         &_Keyval);
  v4 = (int)v2->m_kSubItemTextureMap._Myhead;
  v17 = v3;
  if ( v3 == (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)v4 )
    goto LABEL_24;
  v5 = v3->_Myval.first._Mysize;
  v6 = (int)&v3->_Myval;
  if ( *(_DWORD *)(v6 + 20) >= 0x10u )
    v6 = *(_DWORD *)v6;
  v7 = _Keyval._Mysize;
  v8 = _Keyval._Mysize;
  if ( _Keyval._Mysize >= v5 )
    v8 = v5;
  v9 = _Keyval._Bx._Ptr;
  if ( _Keyval._Myres < 0x10 )
    v9 = (const char *)&_Keyval;
  v10 = std::char_traits<char>::compare(v9, (const char *)v6, v8);
  v11 = v10 < 0;
  if ( !v10 )
  {
    if ( v7 >= v5 )
      v12 = v7 != v5;
    else
      v12 = -1;
    v11 = v12 < 0;
  }
  if ( v11 )
  {
LABEL_24:
    v19 = v4;
    v13 = &v19;
  }
  else
  {
    v13 = (int *)&v17;
  }
  v14 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)*v13;
  v21 = -1;
  if ( _Keyval._Myres >= 0x10 )
    operator delete(_Keyval._Bx._Ptr);
  _Keyval._Myres = 15;
  _Keyval._Mysize = 0;
  _Keyval._Bx._Buf[0] = 0;
  if ( v14 != iterEnd._Ptr && (v15 = (NiObject *)&v14->_Myval.second.m_pObject->vfptr) != 0 )
  {
    NiObjectNET::ms_eCopyType = 1;
    result = (NiTexture *)NiObject::Clone(v15);
  }
  else
  {
    result = 0;
  }
  return result;
}
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (006572C0) --------------------------------------------------------
NiTexture *__thiscall CharResMgr::GetItemTextureMap(CharResMgr *this, const char *szName)
{
  CharResMgr *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v3; // eax@1
  int v4; // esi@1
  unsigned int v5; // edi@2
  int v6; // eax@2
  unsigned int v7; // ebx@4
  unsigned int v8; // edx@4
  const char *v9; // ecx@6
  int v10; // eax@8
  bool v11; // sf@8
  signed int v12; // eax@10
  int *v13; // eax@14
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v14; // esi@16
  NiObject *v15; // ecx@19
  NiTexture *result; // eax@20
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v17; // [sp+10h] [bp-38h]@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > iterEnd; // [sp+14h] [bp-34h]@1
  int v19; // [sp+18h] [bp-30h]@15
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Keyval; // [sp+1Ch] [bp-2Ch]@1
  int v21; // [sp+44h] [bp-4h]@1

  v2 = this;
  iterEnd._Ptr = this->m_kItemTextureMap._Myhead;
  _Keyval._Myres = 15;
  _Keyval._Mysize = 0;
  _Keyval._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Keyval, szName, strlen(szName));
  v21 = 0;
  v3 = std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::_Lbound(
         (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > *)&v2->m_kItemTextureMap,
         &_Keyval);
  v4 = (int)v2->m_kItemTextureMap._Myhead;
  v17 = v3;
  if ( v3 == (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)v4 )
    goto LABEL_24;
  v5 = v3->_Myval.first._Mysize;
  v6 = (int)&v3->_Myval;
  if ( *(_DWORD *)(v6 + 20) >= 0x10u )
    v6 = *(_DWORD *)v6;
  v7 = _Keyval._Mysize;
  v8 = _Keyval._Mysize;
  if ( _Keyval._Mysize >= v5 )
    v8 = v5;
  v9 = _Keyval._Bx._Ptr;
  if ( _Keyval._Myres < 0x10 )
    v9 = (const char *)&_Keyval;
  v10 = std::char_traits<char>::compare(v9, (const char *)v6, v8);
  v11 = v10 < 0;
  if ( !v10 )
  {
    if ( v7 >= v5 )
      v12 = v7 != v5;
    else
      v12 = -1;
    v11 = v12 < 0;
  }
  if ( v11 )
  {
LABEL_24:
    v19 = v4;
    v13 = &v19;
  }
  else
  {
    v13 = (int *)&v17;
  }
  v14 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)*v13;
  v21 = -1;
  if ( _Keyval._Myres >= 0x10 )
    operator delete(_Keyval._Bx._Ptr);
  _Keyval._Myres = 15;
  _Keyval._Mysize = 0;
  _Keyval._Bx._Buf[0] = 0;
  if ( v14 != iterEnd._Ptr && (v15 = (NiObject *)&v14->_Myval.second.m_pObject->vfptr) != 0 )
  {
    NiObjectNET::ms_eCopyType = 1;
    result = (NiTexture *)NiObject::Clone(v15);
  }
  else
  {
    result = 0;
  }
  return result;
}
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (00657410) --------------------------------------------------------
NiTexture *__thiscall CharResMgr::GetMiniHouseTextureMap(CharResMgr *this, const char *szName)
{
  CharResMgr *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v3; // eax@1
  int v4; // esi@1
  unsigned int v5; // edi@2
  int v6; // eax@2
  unsigned int v7; // ebx@4
  unsigned int v8; // edx@4
  const char *v9; // ecx@6
  int v10; // eax@8
  bool v11; // sf@8
  signed int v12; // eax@10
  int *v13; // eax@14
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v14; // esi@16
  NiObject *v15; // ecx@19
  NiTexture *result; // eax@20
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v17; // [sp+10h] [bp-38h]@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > iterEnd; // [sp+14h] [bp-34h]@1
  int v19; // [sp+18h] [bp-30h]@15
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Keyval; // [sp+1Ch] [bp-2Ch]@1
  int v21; // [sp+44h] [bp-4h]@1

  v2 = this;
  iterEnd._Ptr = this->m_kMiniHouseTextureMap._Myhead;
  _Keyval._Myres = 15;
  _Keyval._Mysize = 0;
  _Keyval._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Keyval, szName, strlen(szName));
  v21 = 0;
  v3 = std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::_Lbound(
         (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > *)&v2->m_kMiniHouseTextureMap,
         &_Keyval);
  v4 = (int)v2->m_kMiniHouseTextureMap._Myhead;
  v17 = v3;
  if ( v3 == (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)v4 )
    goto LABEL_24;
  v5 = v3->_Myval.first._Mysize;
  v6 = (int)&v3->_Myval;
  if ( *(_DWORD *)(v6 + 20) >= 0x10u )
    v6 = *(_DWORD *)v6;
  v7 = _Keyval._Mysize;
  v8 = _Keyval._Mysize;
  if ( _Keyval._Mysize >= v5 )
    v8 = v5;
  v9 = _Keyval._Bx._Ptr;
  if ( _Keyval._Myres < 0x10 )
    v9 = (const char *)&_Keyval;
  v10 = std::char_traits<char>::compare(v9, (const char *)v6, v8);
  v11 = v10 < 0;
  if ( !v10 )
  {
    if ( v7 >= v5 )
      v12 = v7 != v5;
    else
      v12 = -1;
    v11 = v12 < 0;
  }
  if ( v11 )
  {
LABEL_24:
    v19 = v4;
    v13 = &v19;
  }
  else
  {
    v13 = (int *)&v17;
  }
  v14 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)*v13;
  v21 = -1;
  if ( _Keyval._Myres >= 0x10 )
    operator delete(_Keyval._Bx._Ptr);
  _Keyval._Myres = 15;
  _Keyval._Mysize = 0;
  _Keyval._Bx._Buf[0] = 0;
  if ( v14 != iterEnd._Ptr && (v15 = (NiObject *)&v14->_Myval.second.m_pObject->vfptr) != 0 )
  {
    NiObjectNET::ms_eCopyType = 1;
    result = (NiTexture *)NiObject::Clone(v15);
  }
  else
  {
    result = 0;
  }
  return result;
}
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (00657560) --------------------------------------------------------
NiTexture *__thiscall CharResMgr::GetHairTextureFromMap(CharResMgr *this, const char *szName)
{
  CharResMgr *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v3; // eax@1
  int v4; // esi@1
  unsigned int v5; // edi@2
  int v6; // eax@2
  unsigned int v7; // ebx@4
  unsigned int v8; // edx@4
  const char *v9; // ecx@6
  int v10; // eax@8
  bool v11; // sf@8
  signed int v12; // eax@10
  int *v13; // eax@14
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v14; // esi@16
  NiObject *v15; // ecx@19
  NiTexture *result; // eax@20
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v17; // [sp+10h] [bp-38h]@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > iterEnd; // [sp+14h] [bp-34h]@1
  int v19; // [sp+18h] [bp-30h]@15
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Keyval; // [sp+1Ch] [bp-2Ch]@1
  int v21; // [sp+44h] [bp-4h]@1

  v2 = this;
  iterEnd._Ptr = this->m_kHairTextureMap._Myhead;
  _Keyval._Myres = 15;
  _Keyval._Mysize = 0;
  _Keyval._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Keyval, szName, strlen(szName));
  v21 = 0;
  v3 = std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::_Lbound(
         (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > *)&v2->m_kHairTextureMap,
         &_Keyval);
  v4 = (int)v2->m_kHairTextureMap._Myhead;
  v17 = v3;
  if ( v3 == (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)v4 )
    goto LABEL_24;
  v5 = v3->_Myval.first._Mysize;
  v6 = (int)&v3->_Myval;
  if ( *(_DWORD *)(v6 + 20) >= 0x10u )
    v6 = *(_DWORD *)v6;
  v7 = _Keyval._Mysize;
  v8 = _Keyval._Mysize;
  if ( _Keyval._Mysize >= v5 )
    v8 = v5;
  v9 = _Keyval._Bx._Ptr;
  if ( _Keyval._Myres < 0x10 )
    v9 = (const char *)&_Keyval;
  v10 = std::char_traits<char>::compare(v9, (const char *)v6, v8);
  v11 = v10 < 0;
  if ( !v10 )
  {
    if ( v7 >= v5 )
      v12 = v7 != v5;
    else
      v12 = -1;
    v11 = v12 < 0;
  }
  if ( v11 )
  {
LABEL_24:
    v19 = v4;
    v13 = &v19;
  }
  else
  {
    v13 = (int *)&v17;
  }
  v14 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)*v13;
  v21 = -1;
  if ( _Keyval._Myres >= 0x10 )
    operator delete(_Keyval._Bx._Ptr);
  _Keyval._Myres = 15;
  _Keyval._Mysize = 0;
  _Keyval._Bx._Buf[0] = 0;
  if ( v14 != iterEnd._Ptr && (v15 = (NiObject *)&v14->_Myval.second.m_pObject->vfptr) != 0 )
  {
    NiObjectNET::ms_eCopyType = 1;
    result = (NiTexture *)NiObject::Clone(v15);
  }
  else
  {
    result = 0;
  }
  return result;
}
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (006576B0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *_Newnode)
{
  unsigned int v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v6; // edi@4
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v7; // edx@4
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v8; // edx@7
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v9; // edx@9
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v10; // eax@11
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v11; // edx@12
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v12; // esi@12
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v13; // esi@13
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v14; // edx@16
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v15; // esi@18
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v16; // esi@20
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v17; // edx@24
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v18; // esi@24
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v19; // edi@24
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v20; // edi@26
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v21; // edi@28
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v22; // esi@31
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v23; // edx@34
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v24; // esi@34
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v25; // esi@36
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v26; // esi@38
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v27; // edi@44
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v28; // edi@46
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v29; // ecx@52
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > *v30; // eax@52

  v5 = this->_Mysize;
  if ( v5 >= 0x7FFFFFE )
  {
    std::_Dest_val<std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>(
      &this->_Alval,
      &_Newnode->_Myval);
    operator delete(_Newnode);
    std::_Xlength_error("map/set<T> too long");
  }
  v6 = _Newnode;
  this->_Mysize = v5 + 1;
  _Newnode->_Parent = _Wherenode;
  v7 = this->_Myhead;
  if ( _Wherenode == v7 )
  {
    v7->_Parent = _Newnode;
    this->_Myhead->_Left = _Newnode;
    this->_Myhead->_Right = _Newnode;
  }
  else if ( _Addleft )
  {
    _Wherenode->_Left = _Newnode;
    v8 = this->_Myhead;
    if ( _Wherenode == v8->_Left )
      v8->_Left = _Newnode;
  }
  else
  {
    _Wherenode->_Right = _Newnode;
    v9 = this->_Myhead;
    if ( _Wherenode == v9->_Right )
      v9->_Right = _Newnode;
  }
  v10 = _Newnode;
  while ( !v10->_Parent->_Color )
  {
    v11 = v10->_Parent;
    v12 = v11->_Parent;
    if ( v11 == v12->_Left )
    {
      v13 = v12->_Right;
      if ( v13->_Color )
      {
        if ( v10 == v11->_Right )
        {
          v10 = v10->_Parent;
          v14 = v11->_Right;
          v10->_Right = v14->_Left;
          if ( !v14->_Left->_Isnil )
            v14->_Left->_Parent = v10;
          v14->_Parent = v10->_Parent;
          v15 = this->_Myhead;
          if ( v10 == v15->_Parent )
          {
            v15->_Parent = v14;
          }
          else
          {
            v16 = v10->_Parent;
            if ( v10 == v16->_Left )
              v16->_Left = v14;
            else
              v16->_Right = v14;
          }
          v14->_Left = v10;
          v10->_Parent = v14;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Left;
        v17->_Left = v17->_Left->_Right;
        v19 = v18->_Right;
        if ( !v19->_Isnil )
          v19->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v20 = this->_Myhead;
        if ( v17 == v20->_Parent )
        {
          v20->_Parent = v18;
          v18->_Right = v17;
        }
        else
        {
          v21 = v17->_Parent;
          if ( v17 == v21->_Right )
          {
            v21->_Right = v18;
            v18->_Right = v17;
          }
          else
          {
            v21->_Left = v18;
            v18->_Right = v17;
          }
        }
LABEL_50:
        v6 = _Newnode;
        v17->_Parent = v18;
        continue;
      }
      v11->_Color = 1;
      v13->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
    else
    {
      v22 = v12->_Left;
      if ( v22->_Color )
      {
        if ( v10 == v11->_Left )
        {
          v10 = v10->_Parent;
          v23 = v11->_Left;
          v10->_Left = v23->_Right;
          v24 = v23->_Right;
          if ( !v24->_Isnil )
            v24->_Parent = v10;
          v23->_Parent = v10->_Parent;
          v25 = this->_Myhead;
          if ( v10 == v25->_Parent )
          {
            v25->_Parent = v23;
          }
          else
          {
            v26 = v10->_Parent;
            if ( v10 == v26->_Right )
              v26->_Right = v23;
            else
              v26->_Left = v23;
          }
          v23->_Right = v10;
          v10->_Parent = v23;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Right;
        v17->_Right = v18->_Left;
        if ( !v18->_Left->_Isnil )
          v18->_Left->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v27 = this->_Myhead;
        if ( v17 == v27->_Parent )
        {
          v27->_Parent = v18;
        }
        else
        {
          v28 = v17->_Parent;
          if ( v17 == v28->_Left )
            v28->_Left = v18;
          else
            v28->_Right = v18;
        }
        v18->_Left = v17;
        goto LABEL_50;
      }
      v11->_Color = 1;
      v22->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
  }
  v29 = this->_Myhead->_Parent;
  v30 = result;
  result->_Ptr = v6;
  v29->_Color = 1;
  return v30;
}

//----- (006578E0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::erase(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > _Last)
{
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v6; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node **v7; // ecx@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > *v8; // eax@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > v9; // edx@5
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v10; // eax@6
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v11; // ecx@7
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *j; // eax@7
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *i; // eax@10
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > v14; // [sp+4h] [bp-4h]@14

  v4 = this;
  v5 = this->_Myhead;
  v6 = _First._Ptr;
  if ( _First._Ptr != v5->_Left || _Last._Ptr != v5 )
  {
    for ( ; _First._Ptr != _Last._Ptr; v6 = _First._Ptr )
    {
      v9._Ptr = v6;
      if ( !v6->_Isnil )
      {
        v10 = v6->_Right;
        if ( v10->_Isnil )
        {
          for ( i = v6->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v6 != i->_Right )
              break;
            v6 = i;
          }
          _First._Ptr = i;
        }
        else
        {
          v11 = v6->_Right;
          for ( j = v10->_Left; !j->_Isnil; j = j->_Left )
            v11 = j;
          _First._Ptr = v11;
        }
      }
      std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::erase(
        v4,
        &v14,
        v9);
    }
    v8 = result;
    result->_Ptr = v6;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::_Erase(
      v4,
      v5->_Parent);
    v4->_Myhead->_Parent = v4->_Myhead;
    v4->_Myhead->_Left = v4->_Myhead;
    v4->_Myhead->_Right = v4->_Myhead;
    v7 = &v4->_Myhead->_Left;
    v8 = result;
    v4->_Mysize = 0;
    result->_Ptr = *v7;
  }
  return v8;
}

//----- (006579A0) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>(std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *this, std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *_Right)
{
  std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v3; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v4; // eax@3
  unsigned int v5; // eax@3
  std::exception pExceptionObject; // [sp+10h] [bp-20h]@5
  std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *v7; // [sp+1Ch] [bp-14h]@1
  char *_What; // [sp+20h] [bp-10h]@5
  int v9; // [sp+2Ch] [bp-4h]@2

  v2 = this;
  v7 = this;
  this->_Mysize = 0;
  v3 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)operator new(0x18u);
  if ( !v3 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v2->_Myhead = v3;
  v3->_Left = v3;
  v2->_Myhead->_Parent = v2->_Myhead;
  v2->_Myhead->_Right = v2->_Myhead;
  v2->_Myhead->_Color = 1;
  v2->_Myhead->_Isnil = 1;
  v9 = 0;
  if ( v2 != _Right )
  {
    std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::_Erase(
      v2,
      v2->_Myhead->_Parent);
    v2->_Myhead->_Parent = v2->_Myhead;
    v2->_Myhead->_Left = v2->_Myhead;
    v2->_Myhead->_Right = v2->_Myhead;
    v2->_Mysize = 0;
    v4 = v2->_Myhead;
    v2->_Myhead = _Right->_Myhead;
    _Right->_Myhead = v4;
    v5 = v2->_Mysize;
    v2->_Mysize = _Right->_Mysize;
    _Right->_Mysize = v5;
  }
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00657A80) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *_Node, bool _Leftish)
{
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v4; // edx@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v5; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v6; // edi@1
  bool v7; // al@1
  unsigned int v8; // ecx@2
  const char *v9; // eax@4
  const char *v10; // edx@6
  unsigned int v11; // esi@8
  unsigned int v12; // ecx@8
  int v13; // eax@12
  bool v14; // sf@12
  unsigned int v15; // edi@17
  unsigned int v16; // esi@19
  unsigned int v17; // edx@21
  char *v18; // ecx@24
  int v19; // eax@26
  bool v20; // sf@26
  signed int v21; // eax@28
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v22; // esi@37
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > *v23; // eax@39
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v24; // ecx@40
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > >,bool> *v25; // eax@40
  bool v26; // cf@42
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > *v27; // ebx@42
  unsigned int v28; // edx@42
  const char *v29; // eax@43
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *_Wherenode; // [sp+Ch] [bp-14h]@4
  unsigned int v31; // [sp+10h] [bp-10h]@2
  unsigned int v32; // [sp+14h] [bp-Ch]@2
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *v33; // [sp+18h] [bp-8h]@1
  bool _Addleft; // [sp+1Ch] [bp-4h]@1

  v4 = _Node;
  v5 = this->_Myhead->_Parent;
  v6 = this->_Myhead;
  v7 = 1;
  v33 = this;
  _Addleft = 1;
  if ( !v5->_Isnil )
  {
    v8 = _Node->_Myval.first._Mysize;
    v32 = _Node->_Myval.first._Mysize;
    v31 = _Node->_Myval.first._Myres;
    while ( 1 )
    {
      _Wherenode = v5;
      v9 = v5->_Myval.first._Bx._Buf;
      if ( _Leftish )
      {
        if ( v31 < 0x10 )
          v10 = v4->_Myval.first._Bx._Buf;
        else
          v10 = v4->_Myval.first._Bx._Ptr;
        v11 = v5->_Myval.first._Mysize;
        v12 = v5->_Myval.first._Mysize;
        if ( v11 >= v32 )
          v12 = v32;
        if ( v5->_Myval.first._Myres >= 0x10 )
          v9 = *(const char **)v9;
        v13 = std::char_traits<char>::compare(v9, v10, v12);
        v14 = v13 < 0;
        if ( !v13 )
        {
          if ( v11 < v32 )
          {
            v7 = 0;
            goto LABEL_32;
          }
          v14 = (v11 != v32) < 0;
        }
        v7 = !v14;
      }
      else
      {
        v15 = v5->_Myval.first._Mysize;
        if ( v5->_Myval.first._Myres >= 0x10 )
          v9 = *(const char **)v9;
        v16 = _Node->_Myval.first._Mysize;
        if ( v8 < v16 )
          v16 = v8;
        v17 = v16;
        if ( v16 >= v15 )
          v17 = v5->_Myval.first._Mysize;
        if ( v31 < 0x10 )
          v18 = _Node->_Myval.first._Bx._Buf;
        else
          v18 = _Node->_Myval.first._Bx._Ptr;
        v19 = std::char_traits<char>::compare(v18, v9, v17);
        v20 = v19 < 0;
        if ( !v19 )
        {
          if ( v16 >= v15 )
            v21 = v16 != v15;
          else
            v21 = -1;
          v20 = v21 < 0;
        }
        v7 = v20;
      }
LABEL_32:
      _Addleft = v7;
      if ( v7 )
        v5 = v5->_Left;
      else
        v5 = v5->_Right;
      v4 = _Node;
      if ( v5->_Isnil )
      {
        v6 = _Wherenode;
        this = v33;
        break;
      }
      v8 = v32;
    }
  }
  v22 = v6;
  *(_DWORD *)&_Leftish = v6;
  if ( v7 )
  {
    if ( v6 == this->_Myhead->_Left )
    {
      v23 = std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>,0>>::_Insert(
              this,
              (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > *)&_Leftish,
              1,
              v6,
              v4);
LABEL_40:
      v24 = v23->_Ptr;
      v25 = result;
      result->first._Ptr = v24;
      result->second = 1;
      return v25;
    }
    std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,bool,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,bool>>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >,std::_Iterator_base0> *)&_Leftish);
    v22 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)_Leftish;
    v4 = _Node;
  }
  v26 = v4->_Myval.first._Myres < 0x10;
  v27 = &v4->_Myval;
  v28 = v4->_Myval.first._Mysize;
  if ( v26 )
    v29 = (const char *)v27;
  else
    v29 = v27->first._Bx._Ptr;
  if ( std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
         &v22->_Myval.first,
         0,
         v22->_Myval.first._Mysize,
         v29,
         v28) < 0 )
  {
    v23 = std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>,0>>::_Insert(
            v33,
            (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > *)&_Leftish,
            _Addleft,
            v6,
            _Node);
    goto LABEL_40;
  }
  std::_Dest_val<std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>(
    &v33->_Alval,
    v27);
  operator delete(_Node);
  v25 = result;
  result->first._Ptr = v22;
  result->second = 0;
  return v25;
}

//----- (00657C30) --------------------------------------------------------
NiPointer<NiControllerSequence> *__thiscall std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>::operator[](std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *this, const unsigned int *_Keyval)
{
  std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v3; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v4; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > v5; // edi@1
  unsigned int v6; // ecx@8
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v7; // eax@8
  NiPointer<NiControllerSequence> *result; // eax@8
  std::pair<unsigned long const ,NiPointer<NiControllerSequence> > _Val; // [sp+Ch] [bp-18h]@8
  int v10; // [sp+14h] [bp-10h]@8
  int v11; // [sp+20h] [bp-4h]@8

  v2 = this;
  v3 = this->_Myhead;
  v4 = v3->_Parent;
  v5._Ptr = v3;
  while ( !v4->_Isnil )
  {
    if ( v4->_Myval.first >= *_Keyval )
    {
      v5._Ptr = v4;
      v4 = v4->_Left;
    }
    else
    {
      v4 = v4->_Right;
    }
  }
  if ( v5._Ptr != v2->_Myhead && *_Keyval >= v5._Ptr->_Myval.first )
  {
    result = &v5._Ptr->_Myval.second;
  }
  else
  {
    v10 = 0;
    v6 = *_Keyval;
    v11 = 0;
    _Val.first = v6;
    _Val.second.m_pObject = 0;
    LOBYTE(v11) = 1;
    v7 = std::_Tree_val<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Buynode<std::pair<int,NiPointer<stGlobalLightInfo>> &>(
           (std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)&v2->comp,
           &_Val);
    std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::_Insert(
      (std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)&v2->comp,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *)&_Keyval,
      v5,
      v7);
    result = (NiPointer<NiControllerSequence> *)(_Keyval + 4);
  }
  return result;
}

//----- (00657D00) --------------------------------------------------------
std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *__thiscall std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>::operator=(std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *this, std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *_Right)
{
  std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v3; // eax@2
  unsigned int v4; // eax@2

  v2 = this;
  if ( this != _Right )
  {
    std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::_Erase(
      (std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)&this->comp,
      this->_Myhead->_Parent);
    v2->_Myhead->_Parent = v2->_Myhead;
    v2->_Myhead->_Left = v2->_Myhead;
    v2->_Myhead->_Right = v2->_Myhead;
    v2->_Mysize = 0;
    v3 = v2->_Myhead;
    v2->_Myhead = _Right->_Myhead;
    _Right->_Myhead = v3;
    v4 = v2->_Mysize;
    v2->_Mysize = _Right->_Mysize;
    _Right->_Mysize = v4;
  }
  return v2;
}

//----- (00657D60) --------------------------------------------------------
void __thiscall std::map<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>>::~map<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>>(std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *this)
{
  std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v2; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > v3; // ST04_4@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > result; // [sp+8h] [bp-14h]@1
  std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *v5; // [sp+Ch] [bp-10h]@1
  int v6; // [sp+18h] [bp-4h]@1

  v1 = this;
  v5 = this;
  v2 = this->_Myhead;
  v3._Ptr = v2->_Left;
  v6 = 0;
  std::_Tree<std::_Tmap_traits<unsigned int,NiPointer<NiNode>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,NiPointer<NiNode>>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)&this->comp,
    &result,
    v3,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > >)v2);
  operator delete(v1->_Myhead);
}

//----- (00657DC0) --------------------------------------------------------
void __thiscall mhGameMainConnectMgr::mhGameMainConnectMgr(std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *this)
{
  std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v2; // eax@1
  std::exception pExceptionObject; // [sp+4h] [bp-10h]@3
  char *_What; // [sp+10h] [bp-4h]@3

  v1 = this;
  this->_Mysize = 0;
  v2 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)operator new(0x18u);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->_Myhead = v2;
  v2->_Left = v2;
  v1->_Myhead->_Parent = v1->_Myhead;
  v1->_Myhead->_Right = v1->_Myhead;
  v1->_Myhead->_Color = 1;
  v1->_Myhead->_Isnil = 1;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00657E30) --------------------------------------------------------
void __thiscall std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>::~pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>(std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > *this)
{
  char *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v2; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > v3; // ST04_4@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > result; // [sp+8h] [bp-14h]@1
  std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *v5; // [sp+Ch] [bp-10h]@1
  int v6; // [sp+18h] [bp-4h]@1

  v1 = (char *)&this->second;
  v5 = &this->second;
  v2 = this->second._Myhead;
  v3._Ptr = v2->_Left;
  v6 = 0;
  std::_Tree<std::_Tmap_traits<unsigned int,NiPointer<NiNode>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,NiPointer<NiNode>>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)&this->second.comp,
    &result,
    v3,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > >)v2);
  operator delete(*((void **)v1 + 1));
}

//----- (00657EA0) --------------------------------------------------------
void __thiscall CharResMgr::AddSubItemToMap(CharResMgr *this, NiNode *pkNode, const char *szName)
{
  CharResMgr *v3; // esi@1
  NiNode **v4; // edi@1
  NiNode *v5; // esi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Keyval; // [sp+10h] [bp-2Ch]@1
  int v7; // [sp+38h] [bp-4h]@1

  v3 = this;
  _Keyval._Myres = 15;
  _Keyval._Mysize = 0;
  _Keyval._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Keyval, szName, strlen(szName));
  v7 = 0;
  v4 = (NiNode **)std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiAmbientLight>>>>::operator[](
                    (std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > > > *)&v3->m_kSubItemMap,
                    &_Keyval);
  v5 = *v4;
  if ( *v4 != pkNode )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    *v4 = pkNode;
    if ( pkNode )
      InterlockedIncrement((volatile LONG *)&pkNode->m_uiRefCount);
  }
  if ( _Keyval._Myres >= 0x10 )
    operator delete(_Keyval._Bx._Ptr);
}

//----- (00657F80) --------------------------------------------------------
void __thiscall CharResMgr::AddSubItemTextureToMap(CharResMgr *this, NiTexture *pkTexture, const char *szName)
{
  CharResMgr *v3; // esi@1
  NiPointer<NiTexture> *v4; // edi@1
  NiTexture *v5; // esi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Keyval; // [sp+10h] [bp-2Ch]@1
  int v7; // [sp+38h] [bp-4h]@1

  v3 = this;
  _Keyval._Myres = 15;
  _Keyval._Mysize = 0;
  _Keyval._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Keyval, szName, strlen(szName));
  v7 = 0;
  v4 = std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiAmbientLight>>>>::operator[](
         &v3->m_kSubItemTextureMap,
         &_Keyval);
  v5 = v4->m_pObject;
  if ( v4->m_pObject != pkTexture )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v4->m_pObject = pkTexture;
    if ( pkTexture )
      InterlockedIncrement((volatile LONG *)&pkTexture->m_uiRefCount);
  }
  if ( _Keyval._Myres >= 0x10 )
    operator delete(_Keyval._Bx._Ptr);
}

//----- (00658060) --------------------------------------------------------
void __thiscall CharResMgr::AddItemTextureToMap(CharResMgr *this, NiTexture *pkTexture, const char *szName)
{
  CharResMgr *v3; // esi@1
  NiPointer<NiTexture> *v4; // edi@1
  NiTexture *v5; // esi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Keyval; // [sp+10h] [bp-2Ch]@1
  int v7; // [sp+38h] [bp-4h]@1

  v3 = this;
  _Keyval._Myres = 15;
  _Keyval._Mysize = 0;
  _Keyval._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Keyval, szName, strlen(szName));
  v7 = 0;
  v4 = std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiAmbientLight>>>>::operator[](
         &v3->m_kItemTextureMap,
         &_Keyval);
  v5 = v4->m_pObject;
  if ( v4->m_pObject != pkTexture )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v4->m_pObject = pkTexture;
    if ( pkTexture )
      InterlockedIncrement((volatile LONG *)&pkTexture->m_uiRefCount);
  }
  if ( _Keyval._Myres >= 0x10 )
    operator delete(_Keyval._Bx._Ptr);
}

//----- (00658140) --------------------------------------------------------
void __thiscall CharResMgr::AddMiniHouseTextureToMap(CharResMgr *this, NiTexture *pkTexture, const char *szName)
{
  CharResMgr *v3; // esi@1
  NiPointer<NiTexture> *v4; // edi@1
  NiTexture *v5; // esi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Keyval; // [sp+10h] [bp-2Ch]@1
  int v7; // [sp+38h] [bp-4h]@1

  v3 = this;
  _Keyval._Myres = 15;
  _Keyval._Mysize = 0;
  _Keyval._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Keyval, szName, strlen(szName));
  v7 = 0;
  v4 = std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiAmbientLight>>>>::operator[](
         &v3->m_kMiniHouseTextureMap,
         &_Keyval);
  v5 = v4->m_pObject;
  if ( v4->m_pObject != pkTexture )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v4->m_pObject = pkTexture;
    if ( pkTexture )
      InterlockedIncrement((volatile LONG *)&pkTexture->m_uiRefCount);
  }
  if ( _Keyval._Myres >= 0x10 )
    operator delete(_Keyval._Bx._Ptr);
}

//----- (00658220) --------------------------------------------------------
void __thiscall CharResMgr::AddHairTextureToMap(CharResMgr *this, NiTexture *pkTexture, const char *szName)
{
  CharResMgr *v3; // esi@1
  NiPointer<NiTexture> *v4; // edi@1
  NiTexture *v5; // esi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Keyval; // [sp+10h] [bp-2Ch]@1
  int v7; // [sp+38h] [bp-4h]@1

  v3 = this;
  _Keyval._Myres = 15;
  _Keyval._Mysize = 0;
  _Keyval._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Keyval, szName, strlen(szName));
  v7 = 0;
  v4 = std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiAmbientLight>>>>::operator[](
         &v3->m_kHairTextureMap,
         &_Keyval);
  v5 = v4->m_pObject;
  if ( v4->m_pObject != pkTexture )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v4->m_pObject = pkTexture;
    if ( pkTexture )
      InterlockedIncrement((volatile LONG *)&pkTexture->m_uiRefCount);
  }
  if ( _Keyval._Myres >= 0x10 )
    operator delete(_Keyval._Bx._Ptr);
}

//----- (00658300) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *_Newnode)
{
  unsigned int v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v6; // edi@1
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v7; // edx@4
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v8; // edx@7
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v9; // edx@9
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v10; // eax@11
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v11; // edx@12
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v12; // esi@12
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v13; // esi@13
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v14; // edx@16
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v15; // esi@18
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v16; // esi@20
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v17; // edx@24
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v18; // esi@24
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v19; // edi@24
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v20; // edi@26
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v21; // edi@28
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v22; // esi@31
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v23; // edx@34
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v24; // esi@34
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v25; // esi@36
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v26; // esi@38
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v27; // edi@44
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v28; // edi@46
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *v29; // eax@52

  v5 = this->_Mysize;
  v6 = _Newnode;
  if ( v5 >= 0xCCCCCCB )
  {
    std::_Tree<std::_Tmap_traits<unsigned int,NiPointer<NiNode>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,NiPointer<NiNode>>>,0>>::erase(
      (std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)&_Newnode->_Myval.second.comp,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *)&_Newnode,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > >)_Newnode->_Myval.second._Myhead->_Left,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > >)_Newnode->_Myval.second._Myhead);
    operator delete(v6->_Myval.second._Myhead);
    operator delete(v6);
    std::_Xlength_error("map/set<T> too long");
  }
  this->_Mysize = v5 + 1;
  v6->_Parent = _Wherenode;
  v7 = this->_Myhead;
  if ( _Wherenode == v7 )
  {
    v7->_Parent = v6;
    this->_Myhead->_Left = v6;
    this->_Myhead->_Right = v6;
  }
  else if ( _Addleft )
  {
    _Wherenode->_Left = v6;
    v8 = this->_Myhead;
    if ( _Wherenode == v8->_Left )
      v8->_Left = v6;
  }
  else
  {
    _Wherenode->_Right = v6;
    v9 = this->_Myhead;
    if ( _Wherenode == v9->_Right )
      v9->_Right = v6;
  }
  v10 = v6;
  while ( !v10->_Parent->_Color )
  {
    v11 = v10->_Parent;
    v12 = v11->_Parent;
    if ( v11 == v12->_Left )
    {
      v13 = v12->_Right;
      if ( v13->_Color )
      {
        if ( v10 == v11->_Right )
        {
          v10 = v10->_Parent;
          v14 = v11->_Right;
          v10->_Right = v14->_Left;
          if ( !v14->_Left->_Isnil )
            v14->_Left->_Parent = v10;
          v14->_Parent = v10->_Parent;
          v15 = this->_Myhead;
          if ( v10 == v15->_Parent )
          {
            v15->_Parent = v14;
          }
          else
          {
            v16 = v10->_Parent;
            if ( v10 == v16->_Left )
              v16->_Left = v14;
            else
              v16->_Right = v14;
          }
          v14->_Left = v10;
          v10->_Parent = v14;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Left;
        v17->_Left = v17->_Left->_Right;
        v19 = v18->_Right;
        if ( !v19->_Isnil )
          v19->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v20 = this->_Myhead;
        if ( v17 == v20->_Parent )
        {
          v20->_Parent = v18;
          v18->_Right = v17;
        }
        else
        {
          v21 = v17->_Parent;
          if ( v17 == v21->_Right )
          {
            v21->_Right = v18;
            v18->_Right = v17;
          }
          else
          {
            v21->_Left = v18;
            v18->_Right = v17;
          }
        }
LABEL_50:
        v6 = _Newnode;
        v17->_Parent = v18;
        continue;
      }
      v11->_Color = 1;
      v13->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
    else
    {
      v22 = v12->_Left;
      if ( v22->_Color )
      {
        if ( v10 == v11->_Left )
        {
          v10 = v10->_Parent;
          v23 = v11->_Left;
          v10->_Left = v23->_Right;
          v24 = v23->_Right;
          if ( !v24->_Isnil )
            v24->_Parent = v10;
          v23->_Parent = v10->_Parent;
          v25 = this->_Myhead;
          if ( v10 == v25->_Parent )
          {
            v25->_Parent = v23;
          }
          else
          {
            v26 = v10->_Parent;
            if ( v10 == v26->_Right )
              v26->_Right = v23;
            else
              v26->_Left = v23;
          }
          v23->_Right = v10;
          v10->_Parent = v23;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Right;
        v17->_Right = v18->_Left;
        if ( !v18->_Left->_Isnil )
          v18->_Left->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v27 = this->_Myhead;
        if ( v17 == v27->_Parent )
        {
          v27->_Parent = v18;
        }
        else
        {
          v28 = v17->_Parent;
          if ( v17 == v28->_Left )
            v28->_Left = v18;
          else
            v28->_Right = v18;
        }
        v18->_Left = v17;
        goto LABEL_50;
      }
      v11->_Color = 1;
      v22->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
  }
  v29 = result;
  this->_Myhead->_Parent->_Color = 1;
  result->_Ptr = v6;
  return v29;
}

//----- (00658580) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Buynode<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>(std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *this, std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > *_Val)
{
  std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *v2; // edi@1
  void *v3; // eax@1
  void *v4; // esi@1
  NiActorManager **v5; // eax@2
  std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *v6; // edx@3
  int v8; // [sp+0h] [bp-38h]@1
  std::exception pExceptionObject; // [sp+10h] [bp-28h]@5
  char *v10; // [sp+1Ch] [bp-1Ch]@2
  char *v11; // [sp+20h] [bp-18h]@2
  void *p; // [sp+24h] [bp-14h]@1
  int *v13; // [sp+28h] [bp-10h]@1
  int v14; // [sp+34h] [bp-4h]@2

  v13 = &v8;
  v2 = this;
  v3 = operator new(0x24u);
  v4 = v3;
  p = v3;
  if ( !v3 )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  *(_DWORD *)v3 = v2->_Myhead;
  *((_DWORD *)v3 + 1) = v2->_Myhead;
  *((_DWORD *)v3 + 2) = v2->_Myhead;
  v5 = (NiActorManager **)((char *)v3 + 12);
  *((_WORD *)v4 + 16) = 0;
  v14 = 0;
  v11 = (char *)v4 + 12;
  v10 = (char *)v4 + 12;
  LOBYTE(v14) = 1;
  if ( v4 != (void *)-12 )
  {
    v6 = (std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)&_Val->second.comp;
    *v5 = _Val->first;
    std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>(
      (std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)v4
    + 1,
      v6);
  }
  return (std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *)v4;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00658650) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Erase(std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *this, std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *_Rootnode)
{
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v2; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *i; // esi@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > v4; // ST08_4@2
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > v5; // ST04_4@2
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v6; // ST08_4@2
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > result; // [sp+10h] [bp-14h]@2
  std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *v8; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@2

  v8 = this;
  v2 = _Rootnode;
  for ( i = _Rootnode; !i->_Isnil; v2 = i )
  {
    std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Erase(
      v8,
      i->_Right);
    i = i->_Left;
    v4._Ptr = v2->_Myval.second._Myhead;
    v5._Ptr = v2->_Myval.second._Myhead->_Left;
    v9 = 0;
    std::_Tree<std::_Tmap_traits<unsigned int,NiPointer<NiNode>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,NiPointer<NiNode>>>,0>>::erase(
      (std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)&v2->_Myval.second.comp,
      &result,
      v5,
      v4);
    v6 = v2->_Myval.second._Myhead;
    v9 = -1;
    operator delete(v6);
    operator delete(v2);
  }
}

//----- (006586F0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::erase(std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > _Where)
{
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v4; // edi@4
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v5; // eax@7
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v6; // esi@8
  std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *v7; // ecx@10
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v8; // eax@10
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v9; // eax@17
  std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *v10; // ecx@20
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v11; // ecx@29
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v12; // ecx@31
  char v13; // cl@34
  std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *i; // ecx@36
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v15; // eax@38
  char *v16; // esi@59
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v17; // ST08_4@59
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v18; // ST04_4@59
  unsigned int v19; // eax@59
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *v20; // eax@61
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > v21; // [sp+10h] [bp-1Ch]@59
  std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *v22; // [sp+14h] [bp-18h]@20
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *_Erasednode; // [sp+18h] [bp-14h]@3
  std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *v24; // [sp+1Ch] [bp-10h]@1
  int v25; // [sp+28h] [bp-4h]@59

  v24 = (std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *)this;
  v3 = _Where._Ptr;
  if ( _Where._Ptr->_Isnil )
    std::_Xout_of_range("invalid map/set<T> iterator");
  _Erasednode = _Where._Ptr;
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >,std::_Iterator_base0> *)&_Where);
  if ( v3->_Left->_Isnil )
  {
    v4 = (std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *)v3->_Right;
LABEL_8:
    v6 = (std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *)v3->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v7 = v24;
    v8 = v24->_Myhead;
    if ( (std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *)v8->_Parent == v3 )
    {
      v8->_Parent = v4;
    }
    else if ( (std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *)v6->_Left == v3 )
    {
      v6->_Left = v4;
    }
    else
    {
      v6->_Right = v4;
    }
    if ( (std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *)v7->_Myhead->_Left == v3 )
    {
      if ( v4->_Isnil )
      {
        v9 = v6;
      }
      else
      {
        v9 = std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Min(v4);
        v7 = v24;
      }
      v7->_Myhead->_Left = v9;
    }
    v10 = (std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *)v7->_Myhead;
    v22 = v10;
    if ( (std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *)v10->_Mysize == v3 )
    {
      if ( v4->_Isnil )
        v10->_Mysize = (unsigned int)v6;
      else
        v22->_Mysize = (unsigned int)std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::_Max(v4);
    }
    goto LABEL_35;
  }
  if ( v3->_Right->_Isnil )
  {
    v4 = (std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *)v3->_Left;
    goto LABEL_8;
  }
  v5 = _Where._Ptr;
  v4 = (std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *)_Where._Ptr->_Right;
  if ( _Where._Ptr == v3 )
    goto LABEL_8;
  v3->_Left->_Parent = _Where._Ptr;
  v5->_Left = v3->_Left;
  if ( v5 == v3->_Right )
  {
    v6 = (std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *)v5;
  }
  else
  {
    v6 = (std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *)v5->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v6->_Left = v4;
    v5->_Right = v3->_Right;
    v3->_Right->_Parent = v5;
  }
  v11 = v24->_Myhead;
  if ( (std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *)v11->_Parent == v3 )
  {
    v11->_Parent = (std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *)v5;
  }
  else
  {
    v12 = v3->_Parent;
    if ( v12->_Left == v3 )
      v12->_Left = v5;
    else
      v12->_Right = v5;
  }
  v5->_Parent = v3->_Parent;
  v13 = v5->_Color;
  v5->_Color = v3->_Color;
  v3->_Color = v13;
LABEL_35:
  if ( _Erasednode->_Color == 1 )
  {
    for ( i = v24; v4 != i->_Myhead->_Parent; v6 = v6->_Parent )
    {
      if ( v4->_Color != 1 )
        break;
      v15 = v6->_Left;
      if ( v4 == v6->_Left )
      {
        v15 = v6->_Right;
        if ( !v15->_Color )
        {
          v15->_Color = 1;
          v6->_Color = 0;
          std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Lrotate(
            i,
            v6);
          v15 = v6->_Right;
          i = v24;
        }
        if ( v15->_Isnil )
          goto LABEL_53;
        if ( v15->_Left->_Color != 1 || v15->_Right->_Color != 1 )
        {
          if ( v15->_Right->_Color == 1 )
          {
            v15->_Left->_Color = 1;
            v15->_Color = 0;
            std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Rrotate(
              i,
              v15);
            v15 = v6->_Right;
            i = v24;
          }
          v15->_Color = v6->_Color;
          v6->_Color = 1;
          v15->_Right->_Color = 1;
          std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Lrotate(
            i,
            v6);
          break;
        }
      }
      else
      {
        if ( !v15->_Color )
        {
          v15->_Color = 1;
          v6->_Color = 0;
          std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Rrotate(
            i,
            v6);
          v15 = v6->_Left;
          i = v24;
        }
        if ( v15->_Isnil )
          goto LABEL_53;
        if ( v15->_Right->_Color != 1 || v15->_Left->_Color != 1 )
        {
          if ( v15->_Left->_Color == 1 )
          {
            v15->_Right->_Color = 1;
            v15->_Color = 0;
            std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Lrotate(
              i,
              v15);
            v15 = v6->_Left;
            i = v24;
          }
          v15->_Color = v6->_Color;
          v6->_Color = 1;
          v15->_Left->_Color = 1;
          std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Rrotate(
            i,
            v6);
          break;
        }
      }
      v15->_Color = 0;
LABEL_53:
      v4 = v6;
    }
    v4->_Color = 1;
  }
  v16 = (char *)&_Erasednode->_Myval.second;
  v22 = &_Erasednode->_Myval.second;
  v17 = _Erasednode->_Myval.second._Myhead;
  v18 = _Erasednode->_Myval.second._Myhead->_Left;
  v25 = 0;
  std::_Tree<std::_Tmap_traits<unsigned int,NiPointer<NiNode>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,NiPointer<NiNode>>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)&_Erasednode->_Myval.second.comp,
    &v21,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > >)v18,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > >)v17);
  operator delete(*((void **)v16 + 1));
  operator delete(_Erasednode);
  v19 = v24->_Mysize;
  if ( v19 )
    v24->_Mysize = v19 - 1;
  v20 = result;
  result->_Ptr = _Where._Ptr;
  return v20;
}

//----- (006589A0) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *_Node, bool _Leftish)
{
  std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *v4; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v5; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v6; // eax@1
  bool v7; // zf@1
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v8; // edx@1
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v9; // esi@1
  bool v10; // cl@1
  NiActorManager *v11; // edi@2
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v12; // edi@10
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *v13; // eax@12
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v14; // ecx@13
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > >,bool> *v15; // eax@13
  int v16; // esi@17
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > v17; // ST0C_4@17
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > v18; // ST08_4@17
  int _Addleft; // [sp+10h] [bp-10h]@1
  int v20; // [sp+1Ch] [bp-4h]@17

  v4 = this;
  v5 = this->_Myhead;
  v6 = v5->_Parent;
  v7 = v6->_Isnil == 0;
  v8 = _Node;
  v9 = v5;
  v10 = 1;
  LOBYTE(_Addleft) = 1;
  if ( v7 )
  {
    v11 = _Node->_Myval.first;
    do
    {
      v9 = v6;
      if ( _Leftish )
        v10 = v6->_Myval.first >= v11;
      else
        v10 = v11 < v6->_Myval.first;
      LOBYTE(_Addleft) = v10;
      if ( v10 )
        v6 = v6->_Left;
      else
        v6 = v6->_Right;
    }
    while ( !v6->_Isnil );
  }
  v12 = v9;
  *(_DWORD *)&_Leftish = v9;
  if ( v10 )
  {
    if ( v9 == v4->_Myhead->_Left )
    {
      v13 = std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Insert(
              v4,
              (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *)&_Leftish,
              1,
              v9,
              _Node);
LABEL_13:
      v14 = v13->_Ptr;
      v15 = result;
      result->first._Ptr = v14;
      result->second = 1;
      return v15;
    }
    std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >,std::_Iterator_base0> *)&_Leftish);
    v12 = (std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *)_Leftish;
    v8 = _Node;
  }
  if ( v12->_Myval.first < v8->_Myval.first )
  {
    v13 = std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Insert(
            v4,
            (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *)&_Leftish,
            _Addleft,
            v9,
            v8);
    goto LABEL_13;
  }
  v16 = (int)&v8->_Myval.second;
  *(_DWORD *)&_Leftish = (char *)v8 + 16;
  v17._Ptr = v8->_Myval.second._Myhead;
  v18._Ptr = v8->_Myval.second._Myhead->_Left;
  v20 = 0;
  std::_Tree<std::_Tmap_traits<unsigned int,NiPointer<NiNode>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,NiPointer<NiNode>>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)&v8->_Myval.second.comp,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *)&_Addleft,
    v18,
    v17);
  operator delete(*(void **)(v16 + 4));
  operator delete(_Node);
  v15 = result;
  result->first._Ptr = v12;
  result->second = 0;
  return v15;
}

//----- (00658AC0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::erase(std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > _Last)
{
  std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v6; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node **v7; // ecx@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *v8; // eax@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > v9; // edx@5
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v10; // eax@6
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v11; // ecx@7
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *j; // eax@7
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *i; // eax@10
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > v14; // [sp+4h] [bp-4h]@14

  v4 = this;
  v5 = this->_Myhead;
  v6 = _First._Ptr;
  if ( _First._Ptr != v5->_Left || _Last._Ptr != v5 )
  {
    for ( ; _First._Ptr != _Last._Ptr; v6 = _First._Ptr )
    {
      v9._Ptr = v6;
      if ( !v6->_Isnil )
      {
        v10 = v6->_Right;
        if ( v10->_Isnil )
        {
          for ( i = v6->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v6 != i->_Right )
              break;
            v6 = i;
          }
          _First._Ptr = i;
        }
        else
        {
          v11 = v6->_Right;
          for ( j = v10->_Left; !j->_Isnil; j = j->_Left )
            v11 = j;
          _First._Ptr = v11;
        }
      }
      std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::erase(
        v4,
        &v14,
        v9);
    }
    v8 = result;
    result->_Ptr = v6;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Erase(
      v4,
      v5->_Parent);
    v4->_Myhead->_Parent = v4->_Myhead;
    v4->_Myhead->_Left = v4->_Myhead;
    v4->_Myhead->_Right = v4->_Myhead;
    v7 = &v4->_Myhead->_Left;
    v8 = result;
    v4->_Mysize = 0;
    result->_Ptr = *v7;
  }
  return v8;
}

//----- (00658B80) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > _Where, std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *_Node)
{
  std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v6; // edi@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *v7; // eax@2
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v8; // eax@7
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v9; // ecx@20
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > >,bool> v10; // [sp+8h] [bp-8h]@20

  v4 = this;
  v5 = this->_Myhead;
  v6 = _Node;
  if ( !this->_Mysize )
  {
    std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Insert(
      this,
      result,
      1,
      v5,
      _Node);
    return result;
  }
  if ( _Where._Ptr == v5->_Left )
  {
    if ( _Node->_Myval.first < _Where._Ptr->_Myval.first )
    {
      std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Insert(
        this,
        result,
        1,
        _Where._Ptr,
        _Node);
      return result;
    }
    goto LABEL_20;
  }
  if ( _Where._Ptr == v5 )
  {
    v8 = v5->_Right;
    if ( v8->_Myval.first < _Node->_Myval.first )
    {
      std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Insert(
        this,
        result,
        0,
        v8,
        _Node);
      return result;
    }
    goto LABEL_20;
  }
  if ( _Node->_Myval.first >= _Where._Ptr->_Myval.first
    || (_Node = _Where._Ptr,
        std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >,std::_Iterator_base0> *)&_Node),
        _Node->_Myval.first >= v6->_Myval.first) )
  {
    if ( _Where._Ptr->_Myval.first >= v6->_Myval.first
      || (_Node = _Where._Ptr,
          std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >,std::_Iterator_base0> *)&_Node),
          _Node != v4->_Myhead)
      && v6->_Myval.first >= _Node->_Myval.first )
    {
LABEL_20:
      v9 = std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Linsert(
             v4,
             &v10,
             v6,
             0)->first._Ptr;
      v7 = result;
      result->_Ptr = v9;
      return v7;
    }
    if ( _Where._Ptr->_Right->_Isnil )
    {
      std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Insert(
        v4,
        result,
        0,
        _Where._Ptr,
        v6);
      v7 = result;
    }
    else
    {
      std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Insert(
        v4,
        result,
        1,
        _Node,
        v6);
      v7 = result;
    }
  }
  else if ( _Node->_Right->_Isnil )
  {
    std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Insert(
      v4,
      result,
      0,
      _Node,
      v6);
    v7 = result;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Insert(
      v4,
      result,
      1,
      _Where._Ptr,
      v6);
    v7 = result;
  }
  return v7;
}

//----- (00658CE0) --------------------------------------------------------
std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *__thiscall std::map<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>>::operator[](std::map<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > > > *this, NiActorManager *const *_Keyval)
{
  std::map<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > > > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v3; // edi@1
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v4; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v5; // eax@8
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v6; // eax@9
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v7; // ST04_4@9
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v8; // ST04_4@9
  std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > _Val; // [sp+10h] [bp-40h]@9
  std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > _Right; // [sp+24h] [bp-2Ch]@8
  std::exception pExceptionObject; // [sp+34h] [bp-1Ch]@11
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > result; // [sp+40h] [bp-10h]@9
  int v14; // [sp+4Ch] [bp-4h]@9

  v2 = this;
  v3 = this->_Myhead;
  v4 = v3->_Parent;
  while ( !v4->_Isnil )
  {
    if ( v4->_Myval.first >= *_Keyval )
    {
      v3 = v4;
      v4 = v4->_Left;
    }
    else
    {
      v4 = v4->_Right;
    }
  }
  if ( v3 == this->_Myhead || *_Keyval < v3->_Myval.first )
  {
    _Right._Mysize = 0;
    v5 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)operator new(0x18u);
    if ( !v5 )
    {
      result._Ptr = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&result);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
    _Right._Myhead = v5;
    v5->_Left = v5;
    _Right._Myhead->_Parent = _Right._Myhead;
    _Right._Myhead->_Right = _Right._Myhead;
    _Right._Myhead->_Color = 1;
    _Right._Myhead->_Isnil = 1;
    _Val.first = *_Keyval;
    v14 = 0;
    std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>(
      (std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)&_Val.second.comp,
      &_Right);
    LOBYTE(v14) = 1;
    v6 = std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Buynode<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>(
           (std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *)&v2->comp,
           &_Val);
    std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Insert(
      (std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *)&v2->comp,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > *)&_Keyval,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > >)v3,
      v6);
    v3 = (std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *)_Keyval;
    _Keyval = (NiActorManager *const *)&_Val.second;
    v7 = _Val.second._Myhead->_Left;
    LOBYTE(v14) = 2;
    std::_Tree<std::_Tmap_traits<unsigned int,NiPointer<NiNode>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,NiPointer<NiNode>>>,0>>::erase(
      (std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)&_Val.second.comp,
      &result,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > >)v7,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > >)_Val.second._Myhead);
    operator delete(_Val.second._Myhead);
    v8 = _Right._Myhead->_Left;
    v14 = 3;
    std::_Tree<std::_Tmap_traits<unsigned int,NiPointer<NiNode>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,NiPointer<NiNode>>>,0>>::erase(
      &_Right,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *)&_Keyval,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > >)v8,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > >)_Right._Myhead);
    operator delete(_Right._Myhead);
  }
  return &v3->_Myval.second;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00658E40) --------------------------------------------------------
void __thiscall std::map<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>>::~map<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>>(std::map<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > > > *this)
{
  std::map<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > > > *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> >::_Node *v2; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > v3; // ST04_4@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > > result; // [sp+8h] [bp-14h]@1
  std::map<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > > > *v5; // [sp+Ch] [bp-10h]@1
  int v6; // [sp+18h] [bp-4h]@1

  v1 = this;
  v5 = this;
  v2 = this->_Myhead;
  v3._Ptr = v2->_Left;
  v6 = 0;
  std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > *)&this->comp,
    &result,
    v3,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > >,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > > >,0> > >)v2);
  operator delete(v1->_Myhead);
}

//----- (00658EA0) --------------------------------------------------------
void __thiscall CharSet::CharSet(CharSet *this)
{
  CharSet *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v1->vfptr = (NiRefObjectVtbl *)&CharSet::`vftable';
  v1->m_spRootNode.m_pObject = 0;
  v1->m_nSetGeoCnt = 0;
  v1->m_pkBodyGeom[0] = 0;
  v1->m_pkBodyGeom[1] = 0;
  v1->m_pkBodyGeom[2] = 0;
  v1->m_pkLegGeom[0] = 0;
  v1->m_pkLegGeom[1] = 0;
  v1->m_pkLegGeom[2] = 0;
  v1->m_pkShoesGeom[0] = 0;
  v1->m_pkShoesGeom[1] = 0;
  v1->m_pkShoesGeom[2] = 0;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9BA0DC: using guessed type int (__thiscall *CharSet::`vftable')(void *p, char);

//----- (00658EF0) --------------------------------------------------------
void __thiscall CharSet::~CharSet(CharSet *this)
{
  CharSet *v1; // edi@1
  NiNode *v2; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&CharSet::`vftable';
  v2 = this->m_spRootNode.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v1->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9BA0DC: using guessed type int (__thiscall *CharSet::`vftable')(void *p, char);

//----- (00658F70) --------------------------------------------------------
char __thiscall CharSet::SetNormalGeometry(CharSet *this)
{
  CharSet *v1; // esi@1
  NiGeometry **v2; // ST04_4@1
  NiAVObject *v3; // eax@1
  char result; // al@2
  NiAVObject *v5; // eax@3
  NiAVObject *v6; // eax@4

  v1 = this;
  v2 = this->m_pkBodyGeom;
  v3 = (NiAVObject *)((int (__stdcall *)(_DWORD))this->m_spRootNode.m_pObject->vfptr[18].__vecDelDtor)(off_A742EC[0]);
  if ( PgUtil::CatchGeometry(v3, v2)
    && (v5 = (NiAVObject *)((int (__stdcall *)(_DWORD))v1->m_spRootNode.m_pObject->vfptr[18].__vecDelDtor)(off_A74318),
        PgUtil::CatchGeometry(v5, v1->m_pkLegGeom))
    && (v6 = (NiAVObject *)((int (__stdcall *)(_DWORD))v1->m_spRootNode.m_pObject->vfptr[18].__vecDelDtor)(off_A7431C[0]),
        PgUtil::CatchGeometry(v6, v1->m_pkShoesGeom)) )
  {
    result = 1;
    ++v1->m_nSetGeoCnt;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A742EC: using guessed type char *off_A742EC[23];
// A74318: using guessed type void *off_A74318;
// A7431C: using guessed type char *off_A7431C[11];

//----- (00658FF0) --------------------------------------------------------
char __thiscall CharSet::SetLodGeometry(CharSet *this, int _nLodLevel, const char *_pLodNodeName)
{
  CharSet *v3; // edi@1
  char result; // al@2
  NiShader *v5; // eax@3
  NiShader *v6; // esi@3
  NiAVObject *v7; // eax@4
  NiAVObject *v8; // eax@5
  NiAVObject *v9; // eax@6

  v3 = this;
  if ( _nLodLevel < 3 )
  {
    v5 = (NiShader *)((int (__stdcall *)(_DWORD))this->m_spRootNode.m_pObject->vfptr[18].__vecDelDtor)(_pLodNodeName);
    v6 = CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v5);
    if ( v6
      && (v7 = (NiAVObject *)v6->vfptr[18].__vecDelDtor((NiRefObject *)v6, (unsigned int)off_A742EC[0]),
          PgUtil::CatchGeometry(v7, &v3->m_pkBodyGeom[_nLodLevel]))
      && (v8 = (NiAVObject *)v6->vfptr[18].__vecDelDtor((NiRefObject *)v6, (unsigned int)off_A74318),
          PgUtil::CatchGeometry(v8, &v3->m_pkLegGeom[_nLodLevel]))
      && (v9 = (NiAVObject *)v6->vfptr[18].__vecDelDtor((NiRefObject *)v6, (unsigned int)off_A7431C[0]),
          PgUtil::CatchGeometry(v9, &v3->m_pkShoesGeom[_nLodLevel])) )
    {
      result = 1;
      ++v3->m_nSetGeoCnt;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A742EC: using guessed type char *off_A742EC[23];
// A74318: using guessed type void *off_A74318;
// A7431C: using guessed type char *off_A7431C[11];

//----- (006590B0) --------------------------------------------------------
bool __thiscall CharSet::Init(CharSet *this, NiNode *pkNode)
{
  CharSet *v2; // esi@1
  NiNode *v3; // edi@1

  v2 = this;
  v3 = this->m_spRootNode.m_pObject;
  if ( v3 != pkNode )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spRootNode.m_pObject = pkNode;
    if ( pkNode )
      InterlockedIncrement((volatile LONG *)&pkNode->m_uiRefCount);
  }
  v2->m_pkBodyGeom[0] = 0;
  v2->m_pkBodyGeom[1] = 0;
  v2->m_pkBodyGeom[2] = 0;
  v2->m_pkLegGeom[0] = 0;
  v2->m_pkLegGeom[1] = 0;
  v2->m_pkLegGeom[2] = 0;
  v2->m_pkShoesGeom[0] = 0;
  v2->m_pkShoesGeom[1] = 0;
  v2->m_pkShoesGeom[2] = 0;
  return pkNode
      && (CharSet::SetLodGeometry(v2, 0, pLodNodeName)
       && CharSet::SetLodGeometry(v2, 1, off_A7432C)
       && CharSet::SetLodGeometry(v2, 2, off_A74330)
       || CharSet::SetNormalGeometry(v2));
}

//----- (00659170) --------------------------------------------------------
CharSet *__thiscall CharSet::`scalar deleting destructor'(CharSet *this, unsigned int a2)
{
  CharSet *v2; // esi@1
  NiNode *v3; // edi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&CharSet::`vftable';
  v3 = this->m_spRootNode.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v2->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9BA0DC: using guessed type int (__thiscall *CharSet::`vftable')(void *p, char);

//----- (00659200) --------------------------------------------------------
void __thiscall CharShape::SetRidePetID(CharShape *this, unsigned int uiID)
{
  this->m_uiRidePetID = uiID;
}

//----- (00659210) --------------------------------------------------------
unsigned int __thiscall CharShape::GetRidePetID(CharShape *this)
{
  return this->m_uiRidePetID;
}

//----- (00659220) --------------------------------------------------------
void __thiscall CharShape::ClearEquipInfo(CharShape *this)
{
  CharShape *v1; // esi@1
  char *v2; // edi@1

  v1 = this;
  v2 = (char *)&this->m_kEquip;
  *(_WORD *)&this->m_barrRemoveShape[0] = 0;
  this->m_barrRemoveShape[2] = 0;
  memset((char *)&this->m_kEquip, 0, 0x2Bu);
  *(_WORD *)v2 = -1;
  *(_DWORD *)&v1->m_kEquip.Equ_RightHand = -1;
  *(_DWORD *)&v1->m_kEquip.Equ_LeftHand = -1;
  *(_DWORD *)&v1->m_kEquip.Equ_Boot = -1;
  *(_DWORD *)&v1->m_kEquip.Equ_AccPant = -1;
  v1->m_kEquip.Equ_AccHeadA = -1;
  v1->m_kEquip.Equ_Mouth = -1;
  v1->m_kEquip.Equ_Minimon = -1;
  *(_DWORD *)&v1->m_kEquip.Equ_Eye = -1;
  *(_DWORD *)&v1->m_kEquip.Equ_AccRightHand = -1;
  *(_DWORD *)&v1->m_kEquip.Equ_CosEff = -1;
  v1->m_kEquip.Equ_MiniMon_R = -1;
  v1->m_uiEquipPos = 0;
  v1->m_kEquip.Equ_AccShield = -1;
}

//----- (006592D0) --------------------------------------------------------
unsigned __int16 __thiscall CharShape::GetRightHandEquipppedItemID(CharShape *this, char *rbyUpgrade)
{
  *rbyUpgrade = *(_BYTE *)&this->m_kEquip.upgrade >> 4;
  return this->m_kEquip.Equ_RightHand;
}

//----- (006592F0) --------------------------------------------------------
unsigned __int16 __thiscall CharShape::GetLeftHandEquippedItemID(CharShape *this, char *rbyUpgrade)
{
  *rbyUpgrade = *(_BYTE *)&this->m_kEquip.upgrade & 0xF;
  return this->m_kEquip.Equ_LeftHand;
}

//----- (00659310) --------------------------------------------------------
unsigned __int16 __thiscall CharShape::GetRightHandAccItemID(CharShape *this)
{
  return this->m_kEquip.Equ_AccRightHand;
}

//----- (00659320) --------------------------------------------------------
unsigned __int16 __thiscall CharShape::GetLeftHandAccItemID(CharShape *this)
{
  return this->m_kEquip.Equ_AccLeftHand;
}

//----- (00659330) --------------------------------------------------------
unsigned __int16 __thiscall CharShape::GetCosShieldItemID(CharShape *this)
{
  return this->m_kEquip.Equ_AccShield;
}

//----- (00659340) --------------------------------------------------------
void __thiscall CharShape::ShowLinkNode(CharShape *this, CharShape::LinkIndex eLinkIndex, bool bShow)
{
  NiNode *v3; // eax@1

  v3 = this->m_apkLinkNode[eLinkIndex];
  if ( v3 && (signed int)eLinkIndex < 27 )
  {
    if ( bShow )
      v3->m_uFlags &= 0xFFFEu;
    else
      v3->m_uFlags |= 1u;
  }
}

//----- (00659370) --------------------------------------------------------
void __thiscall CharShape::ShowAllLinkNode(CharShape *this, bool bShow)
{
  signed int v2; // edi@1
  char *v3; // ecx@1
  int v4; // eax@2
  int v5; // eax@6
  int v6; // eax@10

  v2 = 9;
  v3 = (char *)&this->m_apkLinkNode[1];
  do
  {
    v4 = *((_DWORD *)v3 - 1);
    if ( v4 )
    {
      if ( bShow )
        *(_WORD *)(v4 + 28) &= 0xFFFEu;
      else
        *(_WORD *)(v4 + 28) |= 1u;
    }
    v5 = *(_DWORD *)v3;
    if ( *(_DWORD *)v3 )
    {
      if ( bShow )
        *(_WORD *)(v5 + 28) &= 0xFFFEu;
      else
        *(_WORD *)(v5 + 28) |= 1u;
    }
    v6 = *((_DWORD *)v3 + 1);
    if ( v6 )
    {
      if ( bShow )
        *(_WORD *)(v6 + 28) &= 0xFFFEu;
      else
        *(_WORD *)(v6 + 28) |= 1u;
    }
    v3 += 12;
    --v2;
  }
  while ( v2 );
}

//----- (006593E0) --------------------------------------------------------
void __thiscall CharShape::SetAnotherEyeShape(CharShape *this, NiNode *pkShapeNode)
{
  CharShape *v2; // edi@1
  NiNode *v3; // eax@1
  NiNode *v4; // esi@3
  NiNode *v5; // eax@4

  v2 = this;
  v3 = this->m_pkEyeShapeNode;
  if ( v3 )
  {
    if ( pkShapeNode )
    {
      v4 = this->m_apkLinkNode[2];
      if ( v4 )
      {
        v3->m_uFlags |= 1u;
        v5 = this->m_pkEyeShapeAnotherNode;
        if ( v5 )
        {
          v5->m_uFlags |= 1u;
          this->m_pkEyeShapeAnotherNode = 0;
        }
        ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v4->vfptr[29].__vecDelDtor)(v4, pkShapeNode, 0);
        NiAVObject::Update((NiAVObject *)&v4->vfptr, 0.0, 0);
        NiAVObject::UpdateProperties((NiAVObject *)&v4->vfptr);
        NiAVObject::UpdateEffects((NiAVObject *)&v4->vfptr);
        v2->m_pkEyeShapeAnotherNode = pkShapeNode;
      }
    }
  }
}

//----- (00659460) --------------------------------------------------------
void __thiscall CharShape::ResetAnotherEyeShape(CharShape *this)
{
  if ( this->m_pkEyeShapeAnotherNode )
  {
    if ( this->m_apkLinkNode[2] )
      this->m_pkEyeShapeAnotherNode = 0;
  }
}

//----- (00659480) --------------------------------------------------------
bool __thiscall CharShape::IsSpactralGlowEnable(CharShape *this)
{
  return CSpactralGlow_Shader_Controller::IsEnable(&this->m_SpactralGlowEffect);
}

//----- (00659490) --------------------------------------------------------
char __thiscall CharShape::SetSPactralGlowEnable(CharShape *this, bool bEnable)
{
  return CSpactralGlow_Shader_Controller::SetEnable(&this->m_SpactralGlowEffect, bEnable);
}

//----- (006594A0) --------------------------------------------------------
void __thiscall CharShape::SetShowMiniMonAutoPickEff(CharShape *this, int bShow)
{
  Effect *v2; // eax@1

  v2 = (Effect *)this->m_hMiniMonAutoPickEff;
  if ( v2 )
    EffectMgr::SetShow(&g_kEffectMgr, v2, bShow, 1);
}

//----- (006594D0) --------------------------------------------------------
void __thiscall CharShape::ShowMinimonAutoUseEff(CharShape *this, int bShow)
{
  Effect *v2; // eax@1

  v2 = (Effect *)this->m_hMinimonAutoUseEff;
  if ( v2 )
    EffectMgr::SetShow(&g_kEffectMgr, v2, bShow, 1);
}

//----- (00659500) --------------------------------------------------------
CSpactralGlow_Shader_Controller *__thiscall CharShape::GetShader_Ctrl(CharShape *this)
{
  return &this->m_SpactralGlowEffect;
}

//----- (00659510) --------------------------------------------------------
void __thiscall CharShape::SetGTIBomb(CharShape *this, bool b)
{
  this->m_bGTIBomb = b;
}

//----- (00659530) --------------------------------------------------------
void __thiscall ItemUpGrade::GetEffectHandle(ItemUpGrade *this, unsigned int _uiEquipPos, unsigned int *_dwEffectIndex0, unsigned int *_dwEffectIndex1)
{
  *_dwEffectIndex0 = this->m_arrLinkData[_uiEquipPos].dwEffectIndex[0];
  *_dwEffectIndex1 = this->m_arrLinkData[_uiEquipPos].dwEffectIndex[1];
}

//----- (00659550) --------------------------------------------------------
void __thiscall ItemUpGrade::RemoveEffect(ItemUpGrade *this, unsigned int _uiEquipPos)
{
  ItemUpGrade *v2; // esi@1
  unsigned int v3; // edi@1
  Effect *v4; // eax@1
  Effect *v5; // ecx@1
  unsigned int *v6; // ebx@1
  unsigned int _dwEffectIndex1; // [sp+14h] [bp+8h]@1

  v2 = this;
  v3 = _uiEquipPos;
  v4 = (Effect *)this->m_arrLinkData[_uiEquipPos].dwEffectIndex[0];
  v5 = (Effect *)this->m_arrLinkData[_uiEquipPos].dwEffectIndex[1];
  v6 = &v2->m_arrLinkData[_uiEquipPos].dwEffectIndex[1];
  _dwEffectIndex1 = (unsigned int)v5;
  if ( v4 )
  {
    EffectMgr::RemoveEffect(&g_kEffectMgr, v4);
    v5 = (Effect *)_dwEffectIndex1;
  }
  if ( v5 )
    EffectMgr::RemoveEffect(&g_kEffectMgr, v5);
  v2->m_arrLinkData[v3].dwEffectIndex[0] = 0;
  *v6 = 0;
}

//----- (006595A0) --------------------------------------------------------
void __thiscall ItemUpGrade::SetShow(ItemUpGrade *this, int _bShow)
{
  ItemUpGrade *v2; // ebx@1
  signed int v3; // esi@1
  Effect *v4; // eax@2
  Effect *v5; // edi@2

  v2 = this;
  v3 = 0;
  do
  {
    v4 = (Effect *)v2->m_arrLinkData[v3].dwEffectIndex[0];
    v5 = (Effect *)v2->m_arrLinkData[v3].dwEffectIndex[1];
    if ( v4 )
      EffectMgr::SetShow(&g_kEffectMgr, v4, _bShow, 1);
    if ( v5 )
      EffectMgr::SetShow(&g_kEffectMgr, v5, _bShow, 1);
    ++v3;
  }
  while ( v3 < 30 );
}

//----- (006595F0) --------------------------------------------------------
void __thiscall ItemUpGrade::SetShow(ItemUpGrade *this, unsigned int _uiEquipPos, int _bShow)
{
  Effect *v3; // eax@2
  Effect *v4; // esi@2

  if ( _uiEquipPos < 0x1E )
  {
    v3 = (Effect *)this->m_arrLinkData[_uiEquipPos].dwEffectIndex[0];
    v4 = (Effect *)this->m_arrLinkData[_uiEquipPos].dwEffectIndex[1];
    if ( v3 )
      EffectMgr::SetShow(&g_kEffectMgr, v3, _bShow, 0);
    if ( v4 )
      EffectMgr::SetShow(&g_kEffectMgr, v4, _bShow, 0);
  }
}

//----- (00659640) --------------------------------------------------------
void __thiscall CharShape::SetEquipInfo(CharShape *this, PROTO_EQUIPMENT *pkInfo)
{
  if ( pkInfo )
    qmemcpy(&this->m_kEquip, pkInfo, sizeof(this->m_kEquip));
  else
    CharShape::ClearEquipInfo(this);
}

//----- (00659670) --------------------------------------------------------
void __thiscall CharShape::CatchHeight(CharShape *this)
{
  NiNode *v1; // eax@1
  float kPos; // ST00_4@2
  float v3; // edx@2

  v1 = this->m_apkLinkNode[1];
  if ( v1 )
  {
    kPos = v1->m_kWorld.m_Translate.x;
    v3 = v1->m_kWorld.m_Translate.y;
    this->m_fHeight = v1->m_kWorld.m_Translate.z;
  }
  else
  {
    this->m_fHeight = 53.0;
  }
}

//----- (006596C0) --------------------------------------------------------
char __thiscall CharShape::Equip(CharShape *this, unsigned __int16 kItemID, char byUpdrade)
{
  int v3; // esi@1
  CharShape *v4; // ebx@1
  int *v5; // eax@3
  int v6; // esi@4
  char result; // al@5
  Item *v8; // esi@10
  char v9; // bl@10
  SHINE_ITEM_STRUCT kItemStruct; // [sp+Ch] [bp-6Ch]@6

  v3 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  v4 = this;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                          ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                          kItemID)
    && kItemID <= *(_WORD *)(v3 + 200)
    && (v5 = (int *)(*(_DWORD *)(v3 + 196) + 4 * kItemID), *v5)
    && (v6 = *v5) != 0 )
  {
    memset((char *)&kItemStruct, 0, 0x67u);
    kItemStruct.itemid = kItemID;
    switch ( *(_DWORD *)(v6 + 102) )
    {
      case 7:
        kItemStruct.itemattr.blot.lot = byUpdrade;
        break;
      case 6:
        kItemStruct.itemattr.blot.lot = byUpdrade;
        break;
      case 5:
      case 8:
        kItemStruct.itemattr.blot.lot = byUpdrade;
        break;
      default:
        break;
    }
    v8 = Item::Create(&kItemStruct);
    v9 = CharShape::Equip(v4, (int)v4, v8);
    if ( v8 )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    result = v9;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (006597B0) --------------------------------------------------------
char __thiscall CharShape::TextureFace(CharShape *this, NiTexture *pkTexture)
{
  NiNode *v2; // eax@1
  char result; // al@2
  ResetTexture kResetTexture; // [sp+4h] [bp-18h]@3
  int v5; // [sp+18h] [bp-4h]@3

  v2 = this->m_spFaceNode.m_pObject;
  if ( v2 )
  {
    kResetTexture.m_pCallBack = 0;
    kResetTexture.m_nCurLevel = -1;
    kResetTexture.vfptr = (Ns_TourSceneVtbl *)&ResetTexture::`vftable';
    v5 = 0;
    Ns_TourScene::TourScene((Ns_TourScene *)&kResetTexture.vfptr, v2, &NiAVObject::m_RTTI, pkTexture);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9BA020: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *ResetTexture::`vftable')(ResetTexture *this, NiAVObject *_pkObject, void *);

//----- (00659830) --------------------------------------------------------
char __thiscall CharShape::SetLodGeometry(CharShape *this, int _nLodLevel, const char *_pLodNodeName)
{
  CharShape *v3; // edi@1
  NiNode *v4; // ecx@1
  char result; // al@2
  NiShader *v6; // eax@5
  NiShader *v7; // esi@5
  NiAVObject *v8; // eax@6
  NiAVObject *v9; // eax@7
  NiAVObject *v10; // eax@8

  v3 = this;
  v4 = this->m_pkRootNode;
  if ( v4 )
  {
    if ( _nLodLevel < 3 )
    {
      v6 = (NiShader *)((int (__stdcall *)(_DWORD))v4->vfptr[18].__vecDelDtor)(_pLodNodeName);
      v7 = CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v6);
      if ( v7
        && (v8 = (NiAVObject *)v7->vfptr[18].__vecDelDtor((NiRefObject *)v7, (unsigned int)off_A742EC[0]),
            PgUtil::CatchGeometry(v8, &v3->m_apkLodGeom[_nLodLevel]))
        && (v9 = (NiAVObject *)v7->vfptr[18].__vecDelDtor((NiRefObject *)v7, (unsigned int)off_A74318),
            PgUtil::CatchGeometry(v9, &v3->m_apkLodGeom[_nLodLevel + 3]))
        && (v10 = (NiAVObject *)v7->vfptr[18].__vecDelDtor((NiRefObject *)v7, (unsigned int)off_A7431C[0]),
            PgUtil::CatchGeometry(v10, &v3->m_apkLodGeom[_nLodLevel + 6])) )
      {
        result = 1;
        ++v3->m_nSetLodGeoCnt;
      }
      else
      {
        result = 0;
      }
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A742EC: using guessed type char *off_A742EC[23];
// A74318: using guessed type void *off_A74318;
// A7431C: using guessed type char *off_A7431C[11];

//----- (00659900) --------------------------------------------------------
char __thiscall CharShape::Link(CharShape *this, CharShape::LinkIndex eLinkIndex, NiNode *pkItemNode, unsigned int uiEquipPos)
{
  CharShape::LinkIndex v4; // edi@1
  CharShape *v5; // esi@1
  char result; // al@2
  unsigned int v7; // ebx@3
  Effect *v8; // eax@3
  char *v9; // ecx@3
  Effect *v10; // ecx@3
  int v11; // eax@7
  void (__thiscall ***v12)(_DWORD, _DWORD); // ebx@9
  NiNode *v13; // ebx@12
  NiNode *v14; // ST1C_4@13
  CarToonShader *v15; // eax@13

  v4 = eLinkIndex;
  v5 = this;
  if ( this->m_apkLinkNode[eLinkIndex] )
  {
    v7 = uiEquipPos;
    v8 = (Effect *)this->m_kItemUpGrade.m_arrLinkData[uiEquipPos].dwEffectIndex[0];
    v9 = (char *)&this->m_kItemUpGrade.m_arrLinkData[uiEquipPos].dwEffectIndex[1];
    uiEquipPos = (unsigned int)v9;
    v10 = *(Effect **)v9;
    eLinkIndex = (CharShape::LinkIndex)v10;
    if ( v8 )
    {
      EffectMgr::RemoveEffect(&g_kEffectMgr, v8);
      v10 = (Effect *)eLinkIndex;
    }
    if ( v10 )
      EffectMgr::RemoveEffect(&g_kEffectMgr, v10);
    *(_DWORD *)uiEquipPos = 0;
    v5->m_kItemUpGrade.m_arrLinkData[v7].dwEffectIndex[0] = 0;
    v11 = ((int (__stdcall *)(const char *))v5->m_apkLinkNode[v4]->vfptr[18].__vecDelDtor)("EquipedNode");
    if ( v11 )
    {
      ((void (__stdcall *)(CharShape::LinkIndex *, int))v5->m_apkLinkNode[v4]->vfptr[30].__vecDelDtor)(&eLinkIndex, v11);
      if ( eLinkIndex )
      {
        v12 = (void (__thiscall ***)(_DWORD, _DWORD))eLinkIndex;
        if ( !InterlockedDecrement((volatile LONG *)(eLinkIndex + 4)) )
        {
          if ( v12 )
            (**v12)(v12, 1);
        }
      }
    }
    v13 = pkItemNode;
    if ( pkItemNode )
    {
      v14 = pkItemNode;
      v15 = CarToonShader::GetInstance();
      CarToonShader::SetCartoonShader(v15, v14);
      if ( CSpactralGlow_Shader_Controller::IsEnable(&v5->m_SpactralGlowEffect) )
        CSpactralGlow_Shader_Controller::SetupRecursive(&v5->m_SpactralGlowEffect, v13);
      if ( v4 == 1 )
        NiObjectNET::SetName((NiObjectNET *)&v13->vfptr, "HairPartsNode");
      else
        NiObjectNET::SetName((NiObjectNET *)&v13->vfptr, "EquipedNode");
      ((void (__stdcall *)(NiNode *, _DWORD))v5->m_apkLinkNode[v4]->vfptr[29].__vecDelDtor)(v13, 0);
      NiAVObject::UpdateProperties((NiAVObject *)&v5->m_apkLinkNode[v4]->vfptr);
      NiAVObject::UpdateEffects((NiAVObject *)&v5->m_apkLinkNode[v4]->vfptr);
    }
    NiAVObject::Update((NiAVObject *)&v5->m_apkLinkNode[v4]->vfptr, 0.0, 1);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00659A40) --------------------------------------------------------
char __thiscall CharShape::CatchFaceGeom(CharShape *this, NiAVObject *pkObject)
{
  CharShape *v2; // ebx@1
  NiNode *v3; // esi@1

  v2 = this;
  v3 = this->m_spFaceNode.m_pObject;
  if ( (NiAVObject *)v3 != pkObject )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spFaceNode.m_pObject = (NiNode *)pkObject;
    if ( pkObject )
      InterlockedIncrement((volatile LONG *)&pkObject->m_uiRefCount);
  }
  return 1;
}

//----- (00659A90) --------------------------------------------------------
char __thiscall CharShape::LookAt(CharShape *this, NiPoint3 *kLookAt)
{
  float v2; // edx@1
  CharShape *v3; // esi@1
  float v4; // eax@1
  char result; // al@1
  NiNode *v6; // eax@2
  NiMatrix3 kRot; // [sp+4h] [bp-30h]@1
  NiPoint3 kVect; // [sp+28h] [bp-Ch]@1

  v2 = kLookAt->y;
  v3 = this;
  v4 = kLookAt->z;
  kVect.x = kLookAt->x;
  kVect.y = v2;
  kVect.z = -v4;
  result = Math3D::FrontVectToRot(&kVect, &kRot);
  if ( result )
  {
    v6 = v3->m_apkLinkNode[2];
    if ( v6 )
      qmemcpy(&v6->m_kLocal, &kRot, 0x24u);
    result = 1;
  }
  return result;
}

//----- (00659AF0) --------------------------------------------------------
void __thiscall CharShape::SetHairPartsVisible(CharShape *this, char byVisibleMask)
{
  NiNode *v2; // eax@1
  NiNode *v3; // eax@4
  NiNode *v4; // eax@6
  NiNode *v5; // eax@8
  NiNode *v6; // eax@10
  NiNode *v7; // eax@12
  NiNode *v8; // eax@14
  NiNode *v9; // eax@19
  NiNode *v10; // eax@21
  NiNode *v11; // eax@23
  NiNode *v12; // eax@25
  NiNode *v13; // eax@27
  NiNode *v14; // eax@29
  NiNode *v15; // eax@31
  NiNode *v16; // eax@33
  NiNode *v17; // eax@36
  NiNode *v18; // eax@39
  NiNode *v19; // eax@42
  NiNode *v20; // eax@45
  NiNode *v21; // eax@48

  v2 = this->m_aspHairNode[0].m_pObject;
  if ( byVisibleMask & 1 )
  {
    if ( v2 )
      v2->m_uFlags &= 0xFFFEu;
    v3 = this->m_aspHairNode[1].m_pObject;
    if ( v3 )
      v3->m_uFlags &= 0xFFFEu;
    v4 = this->m_aspHairNode[2].m_pObject;
    if ( v4 )
      v4->m_uFlags &= 0xFFFEu;
    v5 = this->m_aspHairNode[3].m_pObject;
    if ( v5 )
      v5->m_uFlags &= 0xFFFEu;
    v6 = this->m_aspHairNode[4].m_pObject;
    if ( v6 )
      v6->m_uFlags &= 0xFFFEu;
    v7 = this->m_aspHairNode[5].m_pObject;
    if ( v7 )
      v7->m_uFlags &= 0xFFFEu;
    v8 = this->m_spFaceNode.m_pObject;
    if ( !v8 )
      goto LABEL_16;
    goto LABEL_15;
  }
  if ( v2 )
    v2->m_uFlags |= 1u;
  v9 = this->m_aspHairNode[1].m_pObject;
  if ( v9 )
    v9->m_uFlags |= 1u;
  v10 = this->m_aspHairNode[2].m_pObject;
  if ( v10 )
    v10->m_uFlags |= 1u;
  v11 = this->m_aspHairNode[3].m_pObject;
  if ( v11 )
    v11->m_uFlags |= 1u;
  v12 = this->m_aspHairNode[4].m_pObject;
  if ( v12 )
    v12->m_uFlags |= 1u;
  v13 = this->m_aspHairNode[5].m_pObject;
  if ( v13 )
    v13->m_uFlags |= 1u;
  v14 = this->m_pkEyeShapeNode;
  if ( v14 )
    v14->m_uFlags |= 1u;
  v15 = this->m_pkEyeShapeAnotherNode;
  if ( v15 )
    v15->m_uFlags |= 1u;
  v16 = this->m_aspHairNode[0].m_pObject;
  if ( v16 && byVisibleMask & 2 )
    v16->m_uFlags &= 0xFFFEu;
  v17 = this->m_aspHairNode[1].m_pObject;
  if ( v17 && byVisibleMask & 4 )
    v17->m_uFlags &= 0xFFFEu;
  v18 = this->m_aspHairNode[2].m_pObject;
  if ( v18 && byVisibleMask & 8 )
    v18->m_uFlags &= 0xFFFEu;
  v19 = this->m_aspHairNode[3].m_pObject;
  if ( v19 && byVisibleMask & 0x10 )
    v19->m_uFlags &= 0xFFFEu;
  v20 = this->m_aspHairNode[4].m_pObject;
  if ( v20 && byVisibleMask & 0x20 )
    v20->m_uFlags &= 0xFFFEu;
  v21 = this->m_aspHairNode[5].m_pObject;
  if ( v21 && byVisibleMask & 0x40 )
    v21->m_uFlags &= 0xFFFEu;
  v8 = this->m_spFaceNode.m_pObject;
  if ( v8 )
  {
    if ( byVisibleMask < 0 )
    {
LABEL_15:
      v8->m_uFlags &= 0xFFFEu;
LABEL_16:
      this->m_bFaceCulling = 0;
      return;
    }
    if ( v8 )
      v8->m_uFlags |= 1u;
  }
  this->m_bFaceCulling = 1;
}

//----- (00659C80) --------------------------------------------------------
ItemInfo *__thiscall CharShape::GetEquippedWeaponItemInfo(CharShape *this)
{
  int v1; // esi@1
  int v2; // edi@1
  ItemInfo *v3; // ebx@2
  int v4; // ecx@5
  int v5; // edi@8
  int v6; // esi@8
  int v7; // ecx@10
  ItemInfo *result; // eax@11
  CharShape *v9; // [sp+Ch] [bp-4h]@1

  v1 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  v2 = this->m_kEquip.Equ_LeftHand;
  v9 = this;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                          ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                          v2) )
  {
    if ( (unsigned __int16)v2 <= *(_WORD *)(v1 + 200) )
    {
      v4 = *(_DWORD *)(v1 + 196);
      if ( *(_DWORD *)(v4 + 4 * v2) )
        v3 = *(ItemInfo **)(v4 + 4 * v2);
      else
        v3 = 0;
    }
    else
    {
      v3 = 0;
    }
  }
  else
  {
    v3 = 0;
  }
  v5 = v9->m_kEquip.Equ_RightHand;
  v6 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  if ( !(unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                           ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                           v5)
    || (unsigned __int16)v5 > *(_WORD *)(v6 + 200)
    || (v7 = *(_DWORD *)(v6 + 196), !*(_DWORD *)(v7 + 4 * v5))
    || (result = *(ItemInfo **)(v7 + 4 * v5)) == 0
    || result->WeaponType == WT_NONE )
  {
    result = v3;
  }
  return result;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (00659D20) --------------------------------------------------------
signed int __thiscall CharShape::Get3thAniEventCodeByWeapon(CharShape *this)
{
  int v1; // eax@1
  int v2; // edi@3
  int v3; // esi@3
  ItemInfo *v4; // ebx@4
  int v5; // ecx@7
  int v6; // edi@10
  int v7; // esi@10
  ItemInfo **v8; // eax@12
  int v9; // esi@13
  int v10; // edi@13
  int v11; // edx@17
  int v12; // edi@20
  int v13; // esi@20
  ItemInfo *v14; // esi@24
  CharShape *v16; // [sp+Ch] [bp-4h]@1

  v1 = this->m_kEquip.Equ_AccLeftHand;
  v16 = this;
  if ( (_WORD)v1 != -1 || this->m_kEquip.Equ_AccRightHand != -1 )
  {
    v9 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    v10 = this->m_kEquip.Equ_AccLeftHand;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v1) )
    {
      if ( (unsigned __int16)v10 <= *(_WORD *)(v9 + 200) )
      {
        v11 = *(_DWORD *)(v9 + 196);
        if ( *(_DWORD *)(v11 + 4 * v10) )
          v4 = *(ItemInfo **)(v11 + 4 * v10);
        else
          v4 = 0;
      }
      else
      {
        v4 = 0;
      }
    }
    else
    {
      v4 = 0;
    }
    v12 = v16->m_kEquip.Equ_AccRightHand;
    v13 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    if ( !(unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                             ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                             v12)
      || (unsigned __int16)v12 > *(_WORD *)(v13 + 200) )
    {
      goto LABEL_41;
    }
    v8 = (ItemInfo **)(*(_DWORD *)(v13 + 196) + 4 * v12);
  }
  else
  {
    v2 = this->m_kEquip.Equ_LeftHand;
    v3 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(_DWORD, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                             + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v2) )
    {
      if ( (unsigned __int16)v2 <= *(_WORD *)(v3 + 200) )
      {
        v5 = *(_DWORD *)(v3 + 196);
        if ( *(_DWORD *)(v5 + 4 * v2) )
          v4 = *(ItemInfo **)(v5 + 4 * v2);
        else
          v4 = 0;
      }
      else
      {
        v4 = 0;
      }
    }
    else
    {
      v4 = 0;
    }
    v6 = v16->m_kEquip.Equ_RightHand;
    v7 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    if ( !(unsigned __int8)(*(int (__thiscall **)(_DWORD, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                              + 16))(
                             ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                             v6)
      || (unsigned __int16)v6 > *(_WORD *)(v7 + 200) )
    {
      goto LABEL_41;
    }
    v8 = (ItemInfo **)(*(_DWORD *)(v7 + 196) + 4 * v6);
  }
  if ( *v8 )
  {
    v14 = *v8;
    if ( *v8 )
    {
      if ( ItemInfoTab::IsOneHandSwordAniType(*v8) )
        return 10;
      if ( ItemInfoTab::IsTwoHandSwordAniType(v14) )
        return 20;
      if ( ItemInfoTab::IsCrossBowAniType(v14) )
        return 40;
      if ( ItemInfoTab::IsOneHandStaffAniType() )
        return 50;
      if ( ItemInfoTab::IsTwoHandStaffAniType(v14) )
        return 60;
      if ( ItemInfoTab::IsTwoHandAxeAniType(v14) )
        return 70;
      if ( ItemInfoTab::IsInvincibleHammerType(v14) )
        return 80;
      if ( ItemInfoTab::IsDualWeaponAniType(v14) )
        return 90;
      return 0;
    }
  }
LABEL_41:
  if ( v4 && ItemInfoTab::IsBowAniType(v4) )
    return 30;
  return 0;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (00659F40) --------------------------------------------------------
void __thiscall CharShape::StopWeaponAfterImgEff(CharShape *this)
{
  CharShape *v1; // edi@1
  AfterImgEff *v2; // ecx@1
  NiNode *v3; // eax@2
  AfterImgEff *v4; // esi@2

  v1 = this;
  v2 = this->m_spAuraOfWeapon.m_pObject;
  if ( v2 )
  {
    v3 = (NiNode *)((int (*)(void))v2->vfptr[2].__vecDelDtor)();
    World::DetachEffect(&g_kWorld, v3);
    v4 = v1->m_spAuraOfWeapon.m_pObject;
    if ( v4 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
      v1->m_spAuraOfWeapon.m_pObject = 0;
    }
  }
}

//----- (00659FA0) --------------------------------------------------------
void __thiscall CharShape::EnableEyeShape(CharShape *this, char byEnableType)
{
  NiNode *v2; // eax@4

  if ( this->m_kClassID )
  {
    if ( !this->m_bFaceCulling && this->m_byEyeState != byEnableType )
    {
      v2 = this->m_pkEyeShapeAnotherNode;
      if ( v2 || (v2 = this->m_pkEyeShapeNode) != 0 )
      {
        this->m_byEyeState = byEnableType;
        v2->m_uFlags |= 1u;
        if ( byEnableType & 1 )
          v2->m_uFlags &= 0xFFFEu;
        if ( byEnableType & 0x10 )
          v2->m_uFlags &= 0xFFFEu;
        NiAVObject::Update((NiAVObject *)&v2->m_pkParent->vfptr, 0.0, 0);
      }
    }
  }
}

//----- (0065A020) --------------------------------------------------------
void __stdcall CharShape::DetachOtherSideNode(NiNode *pkNode, char *kNodeName)
{
  int v3; // eax@3
  int v4; // ecx@4

  if ( pkNode )
  {
    if ( kNodeName )
    {
      v3 = ((int (__stdcall *)(char *))pkNode->vfptr[18].__vecDelDtor)(kNodeName);
      if ( v3 )
      {
        v4 = *(_DWORD *)(v3 + 32);
        if ( v4 )
        {
          (*(void (__stdcall **)(NiNode **, int))(*(_DWORD *)v4 + 120))(&pkNode, v3);
          NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkNode);
        }
      }
    }
  }
}

//----- (0065A060) --------------------------------------------------------
ItemInfo *__thiscall CharShape::GetEquippedShiledItemInfo(CharShape *this)
{
  int v1; // esi@1
  int v2; // edi@1
  int v3; // ecx@3
  ItemInfo *result; // eax@4

  v1 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  v2 = this->m_kEquip.Equ_LeftHand;
  if ( !(unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                           ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                           v2)
    || (unsigned __int16)v2 > *(_WORD *)(v1 + 200)
    || (v3 = *(_DWORD *)(v1 + 196), !*(_DWORD *)(v3 + 4 * v2))
    || (result = *(ItemInfo **)(v3 + 4 * v2)) == 0 )
  {
    result = 0;
  }
  return result;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0065A0B0) --------------------------------------------------------
void __thiscall ItemUpGrade::SetEffectHandle(ItemUpGrade *this, unsigned int _uiEquipPos, unsigned int _dwEffectIndex0, unsigned int _dwEffectIndex1)
{
  ItemUpGrade *v4; // esi@1
  unsigned int v5; // edi@1
  Effect *v6; // eax@1
  Effect *v7; // ecx@1
  unsigned int *v8; // ebx@1
  unsigned int _uiEquipPosa; // [sp+14h] [bp+8h]@1

  v4 = this;
  v5 = _uiEquipPos;
  v6 = (Effect *)this->m_arrLinkData[_uiEquipPos].dwEffectIndex[0];
  v7 = (Effect *)this->m_arrLinkData[_uiEquipPos].dwEffectIndex[1];
  v8 = &v4->m_arrLinkData[_uiEquipPos].dwEffectIndex[1];
  _uiEquipPosa = (unsigned int)v7;
  if ( v6 )
  {
    EffectMgr::RemoveEffect(&g_kEffectMgr, v6);
    v7 = (Effect *)_uiEquipPosa;
  }
  if ( v7 )
  {
    EffectMgr::RemoveEffect(&g_kEffectMgr, v7);
    v4->m_arrLinkData[v5].dwEffectIndex[0] = _dwEffectIndex0;
    *v8 = _dwEffectIndex1;
  }
  else
  {
    v4->m_arrLinkData[v5].dwEffectIndex[0] = _dwEffectIndex0;
    *v8 = _dwEffectIndex1;
  }
}

//----- (0065A110) --------------------------------------------------------
void __thiscall CharShape::SetShapeInfo(CharShape *this, PROTO_AVATAR_SHAPE_INFO *pkInfo)
{
  PROTO_AVATAR_SHAPE_INFO *v2; // edi@1
  CharShape *v3; // esi@1
  char byFTIndex; // [sp+Bh] [bp-1h]@9

  v2 = pkInfo;
  v3 = this;
  this->m_kClassID = (*(_BYTE *)pkInfo >> 2) & 0x1F;
  this->m_kMobID = -1;
  this->m_byRace = *(_BYTE *)v2 & 3;
  this->m_byGender = *(_BYTE *)v2 >> 7;
  this->m_byHairType = *((_BYTE *)v2 + 1);
  this->m_byHairColor = *((_BYTE *)v2 + 2);
  switch ( ((unsigned int)*(_BYTE *)v2 >> 2) & 0x1F )
  {
    case 1u:
    case 2u:
    case 3u:
    case 4u:
    case 5u:
      LOBYTE(pkInfo) = 1;
      break;
    case 6u:
    case 7u:
    case 8u:
    case 9u:
    case 0xAu:
      LOBYTE(pkInfo) = 6;
      break;
    case 0xBu:
    case 0xCu:
    case 0xDu:
    case 0xEu:
    case 0xFu:
      LOBYTE(pkInfo) = 11;
      break;
    case 0x10u:
    case 0x11u:
    case 0x12u:
    case 0x13u:
    case 0x14u:
      LOBYTE(pkInfo) = 16;
      break;
    case 0x15u:
    case 0x16u:
    case 0x17u:
    case 0x18u:
    case 0x19u:
      LOBYTE(pkInfo) = 21;
      break;
    case 0x1Au:
    case 0x1Bu:
      LOBYTE(pkInfo) = 26;
      break;
    default:
      LOBYTE(pkInfo) = 0;
      break;
  }
  FaceInfoTab::GetIndex(*((_BYTE *)v2 + 3), (char)pkInfo, *(_BYTE *)v2 >> 7, (char *)&pkInfo + 3, &byFTIndex);
  if ( BYTE3(pkInfo) != -1 )
    v3->m_byFaceShapeType = BYTE3(pkInfo);
  if ( byFTIndex == -1 )
  {
    v3->m_uiFaceTypeIndex = *((_BYTE *)v2 + 3);
  }
  else
  {
    v3->m_byFace = byFTIndex;
    v3->m_uiFaceTypeIndex = *((_BYTE *)v2 + 3);
  }
}

//----- (0065A270) --------------------------------------------------------
void __thiscall CharShape::SetVisibleSubParts(CharShape *this, CharShape::LinkIndex enumIndex, bool bVisible)
{
  NiNode *v3; // ebx@1
  unsigned int v4; // edi@2
  NiAVObject *v5; // esi@4
  const char *v6; // ecx@5
  unsigned int unChildCnt; // [sp+Ch] [bp+8h]@2

  v3 = this->m_apkLinkNode[enumIndex];
  if ( v3 )
  {
    v4 = 0;
    unChildCnt = v3->m_kChildren.m_uiSize;
    if ( unChildCnt )
    {
      do
      {
        if ( v3->m_kChildren.m_uiSize > v4 )
        {
          v5 = v3->m_kChildren.m_pBase[v4].m_pObject;
          if ( v5 )
          {
            v6 = v5->m_pcName;
            if ( v6 )
            {
              if ( strcmp("EquipedNode", v6) )
              {
                if ( bVisible )
                  v5->m_uFlags &= 0xFFFEu;
                else
                  v5->m_uFlags |= 1u;
              }
            }
          }
        }
        ++v4;
      }
      while ( v4 < unChildCnt );
    }
  }
}

//----- (0065A300) --------------------------------------------------------
NiNode *__thiscall CharShape::SetSubItem(CharShape *this, CharShape::LinkIndex enumIndex, const char *szNifName, const char *szSubItemTextureName, const char *szSubItemNode, CharShape::AttachType eAttachType)
{
  CharShape *v6; // edi@1
  NiNode *v7; // esi@1
  NiNode *v8; // ebx@1
  NiNode *v10; // eax@7
  NiNode *v11; // eax@8
  NiObject *v12; // eax@9
  NiObject *v13; // edi@9
  unsigned int v14; // eax@11
  int v15; // esi@11
  int j; // eax@13
  NiNode *v17; // eax@17
  NiNode *v18; // eax@18
  NiObject *v19; // eax@19
  NiObject *v20; // edi@19
  unsigned int v21; // eax@21
  int v22; // esi@21
  int i; // eax@23
  NiNode *pkTargetLinkNode; // [sp+30h] [bp+Ch]@3
  NiNode *pkResultNode; // [sp+34h] [bp+10h]@9

  v6 = this;
  v7 = CharResMgr::GetSubItem(&g_kCharResMgr, szNifName, this->m_kClassID, this->m_byGender, szSubItemTextureName);
  v8 = 0;
  if ( !v7 )
    return 0;
  pkTargetLinkNode = v6->m_apkLinkNode[enumIndex];
  if ( !pkTargetLinkNode )
    return 0;
  if ( eAttachType )
  {
    if ( eAttachType == 1 )
    {
      v17 = (NiNode *)operator new(0xE8u);
      if ( v17 )
      {
        NiNode::NiNode(v17, 0);
        v8 = v18;
      }
      pkResultNode = v8;
      v19 = (NiObject *)v7->vfptr[18].__vecDelDtor((NiRefObject *)v7, (unsigned int)"Left");
      v20 = v19;
      if ( v19 )
      {
        if ( NiObject::IsKindOf(&NiNode::m_RTTI, v19) )
        {
          v21 = v20[23].m_uiRefCount;
          v22 = 0;
          if ( v21 )
          {
            if ( v21 > 0 )
              goto LABEL_24;
            for ( i = 0; ; i = *(_DWORD *)(v20[22].m_uiRefCount + 4 * v22) )
            {
              ((void (__thiscall *)(NiNode *, int, _DWORD))v8->vfptr[29].__vecDelDtor)(v8, i, 0);
              if ( v20[23].m_uiRefCount <= ++v22 )
                break;
LABEL_24:
              ;
            }
          }
        }
      }
    }
    else
    {
      if ( eAttachType != 2 )
        return 0;
      v10 = (NiNode *)operator new(0xE8u);
      if ( v10 )
      {
        NiNode::NiNode(v10, 0);
        v8 = v11;
      }
      pkResultNode = v8;
      v12 = (NiObject *)v7->vfptr[18].__vecDelDtor((NiRefObject *)v7, (unsigned int)"Right");
      v13 = v12;
      if ( v12 )
      {
        if ( NiObject::IsKindOf(&NiNode::m_RTTI, v12) )
        {
          v14 = v13[23].m_uiRefCount;
          v15 = 0;
          if ( v14 )
          {
            if ( v14 > 0 )
              goto LABEL_14;
            for ( j = 0; ; j = *(_DWORD *)(v13[22].m_uiRefCount + 4 * v15) )
            {
              ((void (__thiscall *)(NiNode *, int, _DWORD))v8->vfptr[29].__vecDelDtor)(v8, j, 0);
              if ( v13[23].m_uiRefCount <= ++v15 )
                break;
LABEL_14:
              ;
            }
          }
        }
      }
    }
  }
  else
  {
    pkResultNode = v7;
  }
  if ( !pkResultNode )
    return 0;
  NiObjectNET::SetName((NiObjectNET *)&pkResultNode->vfptr, szSubItemNode);
  ((void (__cdecl *)(NiNode *))pkTargetLinkNode->vfptr[29].__vecDelDtor)(pkResultNode);
  return pkResultNode;
}

//----- (0065A500) --------------------------------------------------------
char __thiscall CharShape::Equip(CharShape *this, unsigned int uiEquipPos, unsigned __int16 kItemID, char byUpdrade)
{
  this->m_uiEquipPos = uiEquipPos;
  return CharShape::Equip(this, kItemID, byUpdrade);
}

//----- (0065A520) --------------------------------------------------------
char __thiscall CharShape::Equip_LinkItem(CharShape *this, ItemInfo *pkItemInfo, unsigned int uiEquipPos, NiNode *pkNode, bool _bTwoHand)
{
  CharShape *v5; // esi@1
  char result; // al@2
  WeaponTypeEnum v7; // eax@16
  NiNode *v8; // eax@19
  NiNode *v9; // eax@21
  WeaponTypeEnum v10; // eax@25
  NiNode *v11; // eax@28
  NiNode *v12; // eax@30

  v5 = this;
  if ( pkItemInfo )
  {
    switch ( uiEquipPos )
    {
      case 1u:
        return CharShape::Link(this, 0, pkNode, 0x1Bu);
      case 0x1Bu:
        return CharShape::Link(this, 0, pkNode, 0x1Bu);
      case 0x1Au:
        return CharShape::Link(this, LINK_EYE, pkNode, 0x1Au);
      case 0x19u:
        CharShape::DetachOtherSideNode(pkNode, "Right");
        CharShape::Link(v5, LINK_CHEST, pkNode, 0x19u);
        goto $LN38_22;
      default:
        goto $LN38_22;
      case 0x1Cu:
        CharShape::DetachOtherSideNode(pkNode, "Left");
        CharShape::Link(v5, LINK_CHEST_R, pkNode, 0x1Cu);
        return 0;
      case 4u:
        return CharShape::Link(this, LINK_MOUTH, pkNode, 4u);
      case 0x18u:
        return CharShape::Link(this, LINK_MOUTH, pkNode, 0x18u);
      case 9u:
        return CharShape::Link(this, LINK_BACK, pkNode, 9u);
      case 0xAu:
        return CharShape::Link(this, LINK_LEFTHAND, pkNode, 0xAu);
      case 0xBu:
        return CharShape::Link(this, LINK_LEFTHAND, pkNode, 0xBu);
      case 0xCu:
        if ( !pkNode )
          goto $LN38_22;
        v7 = pkItemInfo->WeaponType;
        if ( v7 == 18 || v7 == 17 )
        {
          v8 = (NiNode *)pkNode->vfptr[18].__vecDelDtor((NiRefObject *)pkNode, (unsigned int)"Left");
          if ( v8 )
          {
            v8->m_kLocal.m_Translate.x = 0.0;
            v8->m_kLocal.m_Translate.y = 0.0;
            v8->m_kLocal.m_Translate.z = 0.0;
          }
          CharShape::Link(v5, LINK_LEFTHAND, v8, 0xAu);
          v9 = (NiNode *)pkNode->vfptr[18].__vecDelDtor((NiRefObject *)pkNode, (unsigned int)"Right");
          if ( v9 )
          {
            v9->m_kLocal.m_Translate.x = 0.0;
            v9->m_kLocal.m_Translate.y = 0.0;
            v9->m_kLocal.m_Translate.z = 0.0;
          }
          result = CharShape::Link(v5, LINK_RIGHTHAND, v9, 0xCu);
        }
        else
        {
          result = CharShape::Link(this, LINK_RIGHTHAND, pkNode, 0xCu);
        }
        break;
      case 0xDu:
        if ( pkNode )
        {
          v10 = pkItemInfo->WeaponType;
          if ( v10 == 18 || v10 == 17 )
          {
            v11 = (NiNode *)pkNode->vfptr[18].__vecDelDtor((NiRefObject *)pkNode, (unsigned int)"Right");
            if ( v11 )
            {
              v11->m_kLocal.m_Translate.x = 0.0;
              v11->m_kLocal.m_Translate.y = 0.0;
              v11->m_kLocal.m_Translate.z = 0.0;
            }
            CharShape::Link(v5, LINK_RIGHTHAND, v11, 0xCu);
            v12 = (NiNode *)pkNode->vfptr[18].__vecDelDtor((NiRefObject *)pkNode, (unsigned int)"Left");
            if ( v12 )
            {
              v12->m_kLocal.m_Translate.x = 0.0;
              v12->m_kLocal.m_Translate.y = 0.0;
              v12->m_kLocal.m_Translate.z = 0.0;
            }
            result = CharShape::Link(v5, LINK_LEFTHAND, v12, 0xAu);
          }
          else
          {
            result = CharShape::Link(this, LINK_RIGHTHAND, pkNode, 0xDu);
          }
        }
        else
        {
$LN38_22:
          result = 0;
        }
        break;
      case 0xEu:
        CharShape::Link(this, LINK_LEFTBRACELET, pkNode, 0xEu);
        CharShape::Link(v5, LINK_RIGHTBRACELET, pkNode, 0xEu);
        result = 1;
        break;
      case 0x11u:
        result = CharShape::Link(this, LINK_WORLD_COS, pkNode, 0x11u);
        break;
      case 0x12u:
        result = CharShape::Link(this, LINK_TAIL, pkNode, 0x12u);
        break;
      case 0x16u:
        CharShape::Link(this, LINK_LEFTSHOESACC, pkNode, 0x16u);
        CharShape::Link(v5, LINK_RIGHTSHOESACC, pkNode, 0x16u);
        result = 1;
        break;
      case 0x1Du:
        result = CharShape::Link(this, LINK_LEFTHAND, pkNode, 0x1Du);
        break;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0065A8C0) --------------------------------------------------------
char __stdcall CharShape::TextureFace(NiNode *pkTargetNode, NiTexture *pkTexture)
{
  char result; // al@2
  ResetTexture kResetTexture; // [sp+4h] [bp-18h]@3
  int v5; // [sp+18h] [bp-4h]@3

  if ( pkTargetNode )
  {
    kResetTexture.m_pCallBack = 0;
    kResetTexture.m_nCurLevel = -1;
    kResetTexture.vfptr = (Ns_TourSceneVtbl *)&ResetTexture::`vftable';
    v5 = 0;
    Ns_TourScene::TourScene((Ns_TourScene *)&kResetTexture.vfptr, pkTargetNode, &NiAVObject::m_RTTI, pkTexture);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9BA020: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *ResetTexture::`vftable')(ResetTexture *this, NiAVObject *_pkObject, void *);

//----- (0065A940) --------------------------------------------------------
char __stdcall CharShape::TextureClosedEye(NiNode *pkTargetNode, NiTexture *pkTexture)
{
  char result; // al@2
  signed int v4; // ebx@4
  unsigned int v5; // esi@4
  NiAVObject *v6; // ecx@6
  NiTexturingProperty *v7; // eax@7

  if ( pkTargetNode && pkTexture )
  {
    v4 = pkTargetNode->m_kChildren.m_uiESize;
    v5 = 0;
    if ( v4 > 0 )
    {
      do
      {
        if ( pkTargetNode->m_kChildren.m_uiSize > v5 )
        {
          v6 = pkTargetNode->m_kChildren.m_pBase[v5].m_pObject;
          if ( v6 )
          {
            v7 = (NiTexturingProperty *)NiAVObject::GetProperty(v6, 8);
            if ( v7 )
              NiTexturingProperty::SetBaseTexture(v7, pkTexture);
          }
        }
        ++v5;
      }
      while ( (signed int)v5 < v4 );
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0065A9A0) --------------------------------------------------------
char __thiscall CharShape::TextureFaceTattoo(CharShape *this, NiTexture *pkTexture)
{
  NiGeometry *v2; // ecx@1
  char result; // al@2
  NiTexturingProperty *v4; // eax@3
  NiTexturingProperty *v5; // esi@3
  NiTexturingProperty::Map *v6; // ecx@5
  NiTexturingProperty::Map *v7; // eax@7
  NiTexturingProperty::Map *v8; // eax@8

  v2 = this->m_apkGeom[1];
  if ( v2 )
  {
    v4 = (NiTexturingProperty *)NiAVObject::GetProperty((NiAVObject *)&v2->vfptr, 8);
    v5 = v4;
    if ( v4 )
    {
      if ( pkTexture )
      {
        v6 = (NiTexturingProperty::Map *)*((_DWORD *)v4->m_kMaps.m_pBase + 6);
        if ( v6 )
        {
          NiD3DTextureStage::SetTexture(v6, pkTexture);
        }
        else
        {
          v7 = (NiTexturingProperty::Map *)operator new(0x18u);
          if ( v7 )
          {
            NiTexturingProperty::Map::Map(v7, pkTexture, 1u, WRAP_S_WRAP_T, FILTER_TRILERP, 0);
            NiTexturingProperty::SetDecalMap(v5, 0, v8);
          }
          else
          {
            NiTexturingProperty::SetDecalMap(v5, 0, 0);
          }
        }
      }
      else
      {
        NiTexturingProperty::SetDecalMap(v4, 0, 0);
      }
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0065AA70) --------------------------------------------------------
char __thiscall CharShape::TextureBody(CharShape *this, NiTexture *pkTexture)
{
  CharShape *v2; // esi@1
  NiGeometry *v3; // ecx@1
  char result; // al@2
  NiTexturingProperty *v5; // eax@3
  NiAVObject **v6; // esi@5
  signed int v7; // edi@5
  NiTexturingProperty *v8; // eax@7

  v2 = this;
  v3 = this->m_apkGeom[2];
  if ( v3 )
  {
    v5 = (NiTexturingProperty *)NiAVObject::GetProperty((NiAVObject *)&v3->vfptr, 8);
    if ( v5 )
      NiTexturingProperty::SetBaseTexture(v5, pkTexture);
    v6 = (NiAVObject **)v2->m_apkLodGeom;
    v7 = 3;
    do
    {
      if ( *v6 )
      {
        v8 = (NiTexturingProperty *)NiAVObject::GetProperty(*v6, 8);
        if ( v8 )
          NiTexturingProperty::SetBaseTexture(v8, pkTexture);
      }
      ++v6;
      --v7;
    }
    while ( v7 );
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0065AAE0) --------------------------------------------------------
char __thiscall CharShape::TextureLeg(CharShape *this, NiTexture *pkTexture)
{
  CharShape *v2; // esi@1
  NiGeometry *v3; // ecx@1
  char result; // al@2
  NiTexturingProperty *v5; // eax@3
  NiAVObject **v6; // esi@5
  signed int v7; // edi@5
  NiTexturingProperty *v8; // eax@7

  v2 = this;
  v3 = this->m_apkGeom[3];
  if ( v3 )
  {
    v5 = (NiTexturingProperty *)NiAVObject::GetProperty((NiAVObject *)&v3->vfptr, 8);
    if ( v5 )
      NiTexturingProperty::SetBaseTexture(v5, pkTexture);
    v6 = (NiAVObject **)&v2->m_apkLodGeom[3];
    v7 = 3;
    do
    {
      if ( *v6 )
      {
        v8 = (NiTexturingProperty *)NiAVObject::GetProperty(*v6, 8);
        if ( v8 )
          NiTexturingProperty::SetBaseTexture(v8, pkTexture);
      }
      ++v6;
      --v7;
    }
    while ( v7 );
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0065AB50) --------------------------------------------------------
char __thiscall CharShape::TextureShoes(CharShape *this, NiTexture *pkTexture)
{
  CharShape *v2; // esi@1
  NiGeometry *v3; // ecx@1
  char result; // al@2
  NiTexturingProperty *v5; // eax@3
  NiAVObject **v6; // esi@5
  signed int v7; // edi@5
  NiTexturingProperty *v8; // eax@7

  v2 = this;
  v3 = this->m_apkGeom[4];
  if ( v3 )
  {
    v5 = (NiTexturingProperty *)NiAVObject::GetProperty((NiAVObject *)&v3->vfptr, 8);
    if ( v5 )
      NiTexturingProperty::SetBaseTexture(v5, pkTexture);
    v6 = (NiAVObject **)&v2->m_apkLodGeom[6];
    v7 = 3;
    do
    {
      if ( *v6 )
      {
        v8 = (NiTexturingProperty *)NiAVObject::GetProperty(*v6, 8);
        if ( v8 )
          NiTexturingProperty::SetBaseTexture(v8, pkTexture);
      }
      ++v6;
      --v7;
    }
    while ( v7 );
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0065ABC0) --------------------------------------------------------
NiNode *__cdecl FindBoneRootNodes(NiNode *pkNode)
{
  int v1; // edi@1
  NiExtraData *v2; // esi@2
  NiRTTI *v3; // eax@3
  char v4; // al@6
  unsigned int v5; // eax@7
  char *v6; // eax@8
  int v7; // eax@9
  unsigned int v8; // eax@11
  int v9; // edi@11
  NiPointer<NiAVObject> *v10; // ecx@13
  NiNode *v11; // esi@13
  NiRTTI *v12; // eax@14
  NiNode *result; // eax@19

  v1 = 0;
  if ( pkNode->m_uiExtraDataSize )
  {
    while ( 1 )
    {
      v2 = pkNode->m_ppkExtra[v1];
      if ( v2 )
      {
        v3 = (NiRTTI *)((int (__thiscall *)(NiExtraData *))v2->vfptr[1].__vecDelDtor)(v2);
        if ( v3 )
        {
          while ( v3 != &NiStringExtraData::m_RTTI )
          {
            v3 = v3->m_pkBaseRTTI;
            if ( !v3 )
              goto LABEL_6;
          }
          v4 = 1;
        }
        else
        {
LABEL_6:
          v4 = 0;
        }
        v5 = v4 != 0 ? (unsigned int)v2 : 0;
        if ( v5 )
        {
          v6 = *(char **)(v5 + 12);
          if ( v6 )
          {
            strstr(v6, "NiBoneLOD#BoneRoot");
            if ( v7 )
              break;
          }
        }
      }
      if ( ++v1 >= pkNode->m_uiExtraDataSize )
        goto LABEL_11;
    }
    result = pkNode;
  }
  else
  {
LABEL_11:
    v8 = pkNode->m_kChildren.m_uiSize;
    v9 = 0;
    if ( v8 )
    {
      if ( v8 <= 0 )
        goto LABEL_21;
      while ( 1 )
      {
        v10 = pkNode->m_kChildren.m_pBase;
        v11 = (NiNode *)v10[v9].m_pObject;
        if ( v11 )
        {
          v12 = (NiRTTI *)((int (__thiscall *)(NiAVObject *))v11->vfptr[1].__vecDelDtor)(v10[v9].m_pObject);
          if ( v12 )
          {
            while ( v12 != &NiNode::m_RTTI )
            {
              v12 = v12->m_pkBaseRTTI;
              if ( !v12 )
                goto LABEL_21;
            }
            result = FindBoneRootNodes(v11);
            if ( result )
              break;
          }
        }
LABEL_21:
        if ( pkNode->m_kChildren.m_uiSize <= ++v9 )
          goto LABEL_22;
      }
    }
    else
    {
LABEL_22:
      result = 0;
    }
  }
  return result;
}

//----- (0065AC90) --------------------------------------------------------
void __thiscall CharShape::SetHairParts(CharShape *this, char byPartsIndex, char byIndexID, bool bUseLink, const char *pchModelName, const char *pchTexName)
{
  CharShape *v6; // ebx@1
  NiNode *v7; // esi@4
  NiD3DDefaultShader *v8; // eax@11
  NiNode *v9; // edi@11
  NiPointer<NiNode> spNode; // [sp+1Ch] [bp-118h]@1
  char temp[260]; // [sp+20h] [bp-114h]@11
  int v12; // [sp+130h] [bp-4h]@6

  v6 = this;
  LOBYTE(spNode.m_pObject) = byIndexID;
  if ( strlen(pchModelName) && strcmp(pchModelName, "-") )
  {
    if ( bUseLink )
    {
      v7 = CharResMgr::GetHair(
             &g_kCharResMgr,
             v6->m_kClassID,
             v6->m_byGender,
             (char)spNode.m_pObject,
             byPartsIndex,
             pchModelName,
             pchTexName);
      spNode.m_pObject = v7;
      if ( v7 )
        InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
      v12 = 0;
      if ( v7 )
      {
        CharShape::Link(v6, LINK_HAIR, v7, 0);
        NiPointer<NiActorManager>::operator=(
          (NiPointer<NiPixelData> *)&v6->m_aspHairNode[(unsigned __int8)byPartsIndex],
          (NiPointer<NiPixelData> *)&spNode);
      }
      v12 = -1;
      if ( v7 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      }
    }
    else
    {
      memset(temp, 0, 0x104u);
      sprintf(temp, off_9BA1B0, pchModelName);
      v8 = (NiD3DDefaultShader *)((int (__stdcall *)(char *))v6->m_pkRootNode->vfptr[18].__vecDelDtor)(temp);
      v9 = (NiNode *)v8;
      if ( v8 )
      {
        NiPointer<PopupMenuWin>::operator=(
          (NiPointer<NiD3DDefaultShader> *)&v6->m_aspHairNode[(unsigned __int8)byPartsIndex],
          v8);
        v6->m_aspHairNode[(unsigned __int8)byPartsIndex].m_pObject->m_uFlags &= 0xFFFEu;
        if ( strlen(pchTexName) )
        {
          if ( strcmp(pchTexName, (const char *)&unk_9BA1B4) )
            CharResMgr::SetHairTexture2TargetNode(v9, v6->m_byGender, v6->m_kClassID, pchTexName);
        }
      }
    }
  }
}

//----- (0065AEC0) --------------------------------------------------------
void __thiscall CharShape::EquipAllAvatar(CharShape *this)
{
  CharShape *v1; // ebx@1
  unsigned __int16 v2; // ST00_2@1
  unsigned __int16 v3; // ST00_2@1
  PROTO_EQUIPMENT kEquip; // [sp+Ch] [bp-2Ch]@1

  v1 = this;
  qmemcpy(&kEquip, &this->m_kEquip, sizeof(kEquip));
  CharShape::Equip(this, kEquip.Equ_Head, 0);
  CharShape::Equip(v1, kEquip.Equ_Body, *((_BYTE *)&kEquip.upgrade + 1) & 0xF);
  CharShape::Equip(v1, kEquip.Equ_Pant, *((_BYTE *)&kEquip.upgrade + 1) >> 4);
  CharShape::Equip(v1, kEquip.Equ_Boot, *((_BYTE *)&kEquip.upgrade + 2) & 0xF);
  CharShape::Equip(v1, kEquip.Equ_AccBody, 0);
  CharShape::Equip(v1, kEquip.Equ_AccPant, 0);
  CharShape::Equip(v1, kEquip.Equ_AccBoot, 0);
  v2 = kEquip.Equ_Minimon;
  v1->m_uiEquipPos = 25;
  CharShape::Equip(v1, v2, 0);
  CharShape::Equip(v1, kEquip.Equ_AccHeadA, 0);
  CharShape::Equip(v1, kEquip.Equ_Eye, 0);
  CharShape::Equip(v1, kEquip.Equ_Mouth, 0);
  v3 = kEquip.Equ_MiniMon_R;
  v1->m_uiEquipPos = 28;
  CharShape::Equip(v1, v3, 0);
  CharShape::Equip(v1, kEquip.Equ_AccBack, 0);
  CharShape::Equip(v1, kEquip.Equ_CosEff, 0);
  CharShape::Equip(v1, kEquip.Equ_AccHip, 0);
}

//----- (0065AFE0) --------------------------------------------------------
void __thiscall CharShape::EquipAll(CharShape *this)
{
  CharShape *v1; // ebx@1
  unsigned __int16 v2; // ST00_2@1
  unsigned __int16 v3; // ST00_2@1
  PROTO_EQUIPMENT kEquip; // [sp+Ch] [bp-2Ch]@1

  v1 = this;
  qmemcpy(&kEquip, &this->m_kEquip, sizeof(kEquip));
  CharShape::ClearEquipInfo(this);
  CharShape::Equip(v1, kEquip.Equ_Head, 0);
  CharShape::Equip(v1, kEquip.Equ_Body, *((_BYTE *)&kEquip.upgrade + 1) & 0xF);
  CharShape::Equip(v1, kEquip.Equ_LeftHand, *(_BYTE *)&kEquip.upgrade & 0xF);
  CharShape::Equip(v1, kEquip.Equ_RightHand, *(_BYTE *)&kEquip.upgrade >> 4);
  CharShape::Equip(v1, kEquip.Equ_Pant, *((_BYTE *)&kEquip.upgrade + 1) >> 4);
  CharShape::Equip(v1, kEquip.Equ_Boot, *((_BYTE *)&kEquip.upgrade + 2) & 0xF);
  CharShape::Equip(v1, kEquip.Equ_AccLeftHand, 0);
  CharShape::Equip(v1, kEquip.Equ_AccRightHand, 0);
  CharShape::Equip(v1, kEquip.Equ_AccBody, 0);
  CharShape::Equip(v1, kEquip.Equ_AccPant, 0);
  CharShape::Equip(v1, kEquip.Equ_AccBoot, 0);
  v2 = kEquip.Equ_Minimon;
  v1->m_uiEquipPos = 25;
  CharShape::Equip(v1, v2, 0);
  CharShape::Equip(v1, kEquip.Equ_AccHeadA, 0);
  CharShape::Equip(v1, kEquip.Equ_Eye, 0);
  CharShape::Equip(v1, kEquip.Equ_Mouth, 0);
  v3 = kEquip.Equ_MiniMon_R;
  v1->m_uiEquipPos = 28;
  CharShape::Equip(v1, v3, 0);
  CharShape::Equip(v1, kEquip.Equ_AccBack, 0);
  CharShape::Equip(v1, kEquip.Equ_CosEff, 0);
  CharShape::Equip(v1, kEquip.Equ_AccHip, 0);
  CharShape::Equip(v1, kEquip.Equ_AccShield, 0);
}

//----- (0065B150) --------------------------------------------------------
void __thiscall CharShape::Update(CharShape *this, float fTime)
{
  CharShape *v2; // esi@1
  AfterImgEff *v3; // ecx@1

  v2 = this;
  v3 = this->m_spAuraOfWeapon.m_pObject;
  if ( v3 )
  {
    if ( (unsigned __int8)((int (__stdcall *)(_DWORD))v3->vfptr[19].__vecDelDtor)(LODWORD(fTime)) )
      CharShape::StopWeaponAfterImgEff(v2);
    else
      ((void (__stdcall *)(_DWORD))v2->m_spAuraOfWeapon.m_pObject->vfptr[14].__vecDelDtor)(LODWORD(fTime));
  }
}

//----- (0065B1B0) --------------------------------------------------------
void __userpurge CharShape::SetMiniMonEffect(CharShape *this@<ecx>, int a2@<edi>, int bIsAttach)
{
  CharShape *v3; // ebx@1
  Effect *v4; // eax@1
  int v5; // eax@4
  int v6; // esi@6
  int v7; // ST14_4@6
  int v8; // edi@6
  _DWORD *v9; // eax@10
  int v10; // esi@13
  int v11; // edi@13
  _DWORD *v12; // eax@17
  char v13; // bl@22
  MinimonInfo *v14; // esi@22
  MinimonInfo *v15; // edi@22
  MinimonInfo *v16; // eax@23
  MinimonInfo *v17; // eax@27
  CharShape *v18; // esi@34
  NiNode *v19; // ecx@35
  NiNode *v20; // eax@42
  CharShape *v21; // [sp+20h] [bp-Ch]@1
  ItemInfo *pkRightMiniMonInfo; // [sp+24h] [bp-8h]@14
  ItemInfo *pkLeftMiniMonInfo; // [sp+28h] [bp-4h]@7

  v3 = this;
  v4 = (Effect *)this->m_hMiniMonAutoPickEff;
  v21 = this;
  if ( v4 )
  {
    EffectMgr::RemoveEffect(&g_kEffectMgr, v4);
    v3->m_hMiniMonAutoPickEff = 0;
  }
  if ( !(_BYTE)bIsAttach )
  {
    v3->m_bAutoPickItem = 0;
    return;
  }
  v5 = v3->m_kEquip.Equ_Minimon;
  if ( (_WORD)v5 != -1 || v3->m_kEquip.Equ_MiniMon_R != -1 )
  {
    v6 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    v7 = a2;
    v8 = v3->m_kEquip.Equ_Minimon;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                               + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v5,
                            v7) )
    {
      if ( (unsigned __int16)v8 <= *(_WORD *)(v6 + 200) )
      {
        v9 = (_DWORD *)(*(_DWORD *)(v6 + 196) + 4 * v8);
        pkLeftMiniMonInfo = (ItemInfo *)(*v9 ? *v9 : 0);
      }
      else
      {
        pkLeftMiniMonInfo = 0;
      }
    }
    else
    {
      pkLeftMiniMonInfo = 0;
    }
    v10 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    v11 = v3->m_kEquip.Equ_MiniMon_R;
    if ( (unsigned __int8)(*(int (__thiscall **)(int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable) )
    {
      if ( (unsigned __int16)v11 <= *(_WORD *)(v10 + 200) )
      {
        v12 = (_DWORD *)(*(_DWORD *)(v10 + 196) + 4 * v11);
        pkRightMiniMonInfo = (ItemInfo *)(*v12 ? *v12 : 0);
      }
      else
      {
        pkRightMiniMonInfo = 0;
      }
    }
    else
    {
      pkRightMiniMonInfo = 0;
    }
    if ( pkLeftMiniMonInfo || pkRightMiniMonInfo )
    {
      v13 = 0;
      v14 = 0;
      v15 = 0;
      BYTE3(bIsAttach) = 0;
      if ( pkLeftMiniMonInfo )
      {
        v16 = MinimonInfoTable::GetMinimonInfoByIDX(pkLeftMiniMonInfo->InxName);
        v14 = v16;
        if ( v16 )
        {
          if ( v16->MinimonRole == 1 )
            v13 = 1;
        }
      }
      if ( pkRightMiniMonInfo )
      {
        v17 = MinimonInfoTable::GetMinimonInfoByIDX(pkRightMiniMonInfo->InxName);
        v15 = v17;
        if ( v17 )
        {
          if ( v17->MinimonRole == 1 )
            BYTE3(bIsAttach) = 1;
        }
      }
      if ( v13 || BYTE3(bIsAttach) )
      {
        if ( v14 && v14->MinimonRole == 1 )
        {
          v18 = v21;
          if ( v21->m_kEquip.Equ_Minimon == pkLeftMiniMonInfo->ID )
          {
            v19 = v21->m_apkLinkNode[5];
            if ( v19 )
              goto LABEL_42;
          }
        }
        else
        {
          v18 = v21;
        }
        if ( v15 )
        {
          if ( v15->MinimonRole == 1 && v18->m_kEquip.Equ_MiniMon_R == pkRightMiniMonInfo->ID )
          {
            v19 = v18->m_apkLinkNode[6];
            if ( v19 )
            {
LABEL_42:
              v20 = (NiNode *)((int (__stdcall *)(const char *))v19->vfptr[18].__vecDelDtor)("Mini");
              if ( v20 )
              {
                bIsAttach = 0;
                EffectMgr::CreateAttachEffect(
                  &g_kEffectMgr,
                  (unsigned int *)&bIsAttach,
                  "MiniMon_Auto",
                  v20,
                  Timer::ms_fCurTime,
                  1);
                v18->m_hMiniMonAutoPickEff = bIsAttach;
              }
              return;
            }
          }
        }
      }
    }
  }
}
// 65B1B0: could not find valid save-restore pair for edi
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0065B3C0) --------------------------------------------------------
void __userpurge CharShape::SetMinimonAutoUseEff(CharShape *this@<ecx>, int a2@<esi>, int bIsAttach)
{
  CharShape *v3; // edi@1
  int v4; // eax@4
  int v5; // ST14_4@6
  int v6; // esi@6
  int v7; // ebx@6
  _DWORD *v8; // eax@10
  int v9; // esi@13
  int v10; // ebx@13
  _DWORD *v11; // eax@17
  MinimonInfo *v12; // esi@22
  MinimonInfo *v13; // ebx@22
  MinimonInfo *v14; // eax@23
  MinimonInfo *v15; // eax@27
  NiNode *v16; // ecx@35
  NiNode *v17; // eax@40
  ItemInfo *pkLeftInfo; // [sp+20h] [bp-Ch]@7
  ItemInfo *pkRightInfo; // [sp+24h] [bp-8h]@14
  bool bRightUseItem; // [sp+2Bh] [bp-1h]@22

  v3 = this;
  if ( this->m_hMinimonAutoUseEff )
  {
    EffectMgr::RemoveEffect(&g_kEffectMgr, (Effect *)this->m_hMinimonAutoUseEff);
    v3->m_hMinimonAutoUseEff = 0;
  }
  if ( (_BYTE)bIsAttach )
  {
    v4 = v3->m_kEquip.Equ_Minimon;
    if ( (_WORD)v4 != -1 || v3->m_kEquip.Equ_MiniMon_R != -1 )
    {
      v5 = a2;
      v6 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      v7 = v3->m_kEquip.Equ_Minimon;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                                 + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v4,
                              v5) )
      {
        if ( (unsigned __int16)v7 <= *(_WORD *)(v6 + 200) )
        {
          v8 = (_DWORD *)(*(_DWORD *)(v6 + 196) + 4 * v7);
          pkLeftInfo = (ItemInfo *)(*v8 ? *v8 : 0);
        }
        else
        {
          pkLeftInfo = 0;
        }
      }
      else
      {
        pkLeftInfo = 0;
      }
      v9 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      v10 = v3->m_kEquip.Equ_MiniMon_R;
      if ( (unsigned __int8)(*(int (__thiscall **)(int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable) )
      {
        if ( (unsigned __int16)v10 <= *(_WORD *)(v9 + 200) )
        {
          v11 = (_DWORD *)(*(_DWORD *)(v9 + 196) + 4 * v10);
          pkRightInfo = (ItemInfo *)(*v11 ? *v11 : 0);
        }
        else
        {
          pkRightInfo = 0;
        }
      }
      else
      {
        pkRightInfo = 0;
      }
      if ( pkLeftInfo || pkRightInfo )
      {
        v12 = 0;
        v13 = 0;
        BYTE3(bIsAttach) = 0;
        bRightUseItem = 0;
        v3->m_bAutoUseItem = 1;
        if ( pkLeftInfo )
        {
          v14 = MinimonInfoTable::GetMinimonInfoByIDX(pkLeftInfo->InxName);
          v12 = v14;
          if ( v14 )
          {
            if ( v14->MinimonRole == 2 )
              BYTE3(bIsAttach) = 1;
          }
        }
        if ( pkRightInfo )
        {
          v15 = MinimonInfoTable::GetMinimonInfoByIDX(pkRightInfo->InxName);
          v13 = v15;
          if ( v15 )
          {
            if ( v15->MinimonRole == 2 )
              bRightUseItem = 1;
          }
        }
        if ( BYTE3(bIsAttach) || bRightUseItem )
        {
          if ( v12
            && v12->MinimonRole == 2
            && v3->m_kEquip.Equ_Minimon == pkLeftInfo->ID
            && (v16 = v3->m_apkLinkNode[5]) != 0
            || v13
            && v13->MinimonRole == 2
            && v3->m_kEquip.Equ_MiniMon_R == pkRightInfo->ID
            && (v16 = v3->m_apkLinkNode[6]) != 0 )
          {
            v17 = (NiNode *)((int (__stdcall *)(const char *))v16->vfptr[18].__vecDelDtor)("Mini");
            if ( v17 )
            {
              bIsAttach = 0;
              EffectMgr::CreateAttachEffect(
                &g_kEffectMgr,
                (unsigned int *)&bIsAttach,
                "Minimon_AutoItemUse",
                v17,
                Timer::ms_fCurTime,
                1);
              v3->m_hMinimonAutoUseEff = bIsAttach;
            }
          }
        }
      }
    }
  }
  else
  {
    v3->m_bAutoUseItem = 0;
  }
}
// 65B3C0: could not find valid save-restore pair for esi
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0065B5D0) --------------------------------------------------------
void __thiscall CharShape::StartChestAfterImgEff(CharShape *this)
{
  CharShape *v1; // esi@1
  NiNode *v2; // eax@1
  AfterImgEff *v3; // eax@3
  AfterImgEff *v4; // edi@3
  AfterImgEff *v5; // ebx@3
  AfterImgEff *v6; // ecx@10
  NiNode *v7; // eax@11

  v1 = this;
  v2 = this->m_apkLinkNode[5];
  if ( this->m_pActor && v2 )
  {
    v3 = AfterImgEff::CreateBySourceNode(v2);
    v4 = v1->m_spChestBlur.m_pObject;
    v5 = v3;
    if ( v4 != v3 )
    {
      if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      v1->m_spChestBlur.m_pObject = v5;
      if ( v5 )
        InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
    }
    v6 = v1->m_spChestBlur.m_pObject;
    if ( v6 )
    {
      AfterImgEff::SetActor(v6, v1->m_pActor);
      ((void (__stdcall *)(_DWORD))v1->m_spChestBlur.m_pObject->vfptr[18].__vecDelDtor)(60.0);
      ((void (__stdcall *)(_DWORD))v1->m_spChestBlur.m_pObject->vfptr[15].__vecDelDtor)(LODWORD(Timer::ms_fCurTime));
      v7 = (NiNode *)((int (*)(void))v1->m_spChestBlur.m_pObject->vfptr[2].__vecDelDtor)();
      World::AttachEffect(&g_kWorld, v7);
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0065B6A0) --------------------------------------------------------
void __cdecl CatchAllGeometry(NiAVObject *pkObject, PgTList<NiGeometry *> *kList)
{
  NiAVObject *v2; // edi@1
  NiRTTI *v3; // eax@2
  NiRTTI *v4; // eax@5
  NiTimeController *v5; // esi@9
  PgTList<NiGeometry *> *v6; // ebx@10
  NiAVObject *v7; // eax@12

  v2 = pkObject;
  if ( pkObject )
  {
    v3 = (NiRTTI *)((int (__thiscall *)(_DWORD))pkObject->vfptr[1].__vecDelDtor)(pkObject);
    if ( v3 )
    {
      while ( v3 != &NiNode::m_RTTI )
      {
        v3 = v3->m_pkBaseRTTI;
        if ( !v3 )
          goto LABEL_5;
      }
      v5 = 0;
      if ( v2[1].m_ppkExtra )
      {
        v6 = kList;
        do
        {
          if ( v2[1].m_spControllers.m_pObject > v5 )
            v7 = *(NiAVObject **)(v2[1].m_uiRefCount + 4 * (_DWORD)v5);
          else
            v7 = 0;
          CatchAllGeometry(v7, v6);
          v5 = (NiTimeController *)((char *)v5 + 1);
        }
        while ( (NiExtraData **)v5 < v2[1].m_ppkExtra );
      }
    }
    else
    {
LABEL_5:
      v4 = (NiRTTI *)((int (__thiscall *)(_DWORD))v2->vfptr[1].__vecDelDtor)(v2);
      if ( v4 )
      {
        while ( v4 != &NiGeometry::m_RTTI )
        {
          v4 = v4->m_pkBaseRTTI;
          if ( !v4 )
            return;
        }
        pkObject = v2;
        NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)kList,
          (NiD3DXEffectParameter *const *)&pkObject);
      }
    }
  }
}

//----- (0065B740) --------------------------------------------------------
void __thiscall CharShape::UpdateFaceShape(CharShape *this)
{
  CharShape *v1; // esi@1
  NiNode *v2; // eax@1
  NiNode *v3; // eax@3
  NiNode *v4; // edi@5
  NiNode *v5; // ebx@10
  NiNode *v6; // edi@10
  NiAVObject *v7; // ecx@17
  NiTexturingProperty *v8; // eax@18
  NiNode *v9; // eax@26
  NiNode *v10; // edi@26
  NiNode *v11; // eax@27
  NiAVObject *v12; // ecx@27
  NiTexturingProperty *v13; // eax@28
  NiNode *v14; // eax@30
  NiSourceTexture *pkClosedEyeTex; // [sp+1Ch] [bp-14h]@1
  NiSourceTexture *pkTexture; // [sp+20h] [bp-10h]@1

  v1 = this;
  pkTexture = CharResMgr::GetFaceTexture(&g_kCharResMgr, this->m_kClassID, this->m_byGender, this->m_byFace);
  pkClosedEyeTex = CharResMgr::GetClosedEyeTexture(&g_kCharResMgr, v1->m_kClassID, v1->m_byGender, v1->m_byFace);
  v2 = v1->m_pkBaseFaceShapeNode;
  if ( v1->m_byFaceShapeType )
  {
    if ( v2 )
      v2->m_uFlags |= 1u;
    v9 = CharResMgr::GetFace(&g_kCharResMgr, v1->m_kClassID, v1->m_byGender, v1->m_byFaceShapeType);
    v10 = v9;
    if ( v9 )
    {
      InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
      v11 = (NiNode *)v10->vfptr[18].__vecDelDtor((NiRefObject *)v10, (unsigned int)"LODGroup01");
      CharShape::LinkFace(v1, v11);
      CharShape::TextureFace(v1->m_apkLinkNode[2], (NiTexture *)&pkTexture->vfptr);
      v12 = (NiAVObject *)&v1->m_apkGeom[1]->vfptr;
      if ( v12 )
      {
        v13 = (NiTexturingProperty *)NiAVObject::GetProperty(v12, 8);
        if ( v13 )
          NiTexturingProperty::SetDecalMap(v13, 0, 0);
      }
      v14 = (NiNode *)v10->vfptr[18].__vecDelDtor((NiRefObject *)v10, (unsigned int)"EyeShape");
      CharShape::SetAnotherEyeShape(v1, v14);
      CharShape::TextureClosedEye(v1->m_pkEyeShapeAnotherNode, (NiTexture *)&pkClosedEyeTex->vfptr);
      if ( !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
  }
  else if ( v2 )
  {
    v2->m_uFlags &= 0xFFFEu;
    v3 = v1->m_apkLinkNode[2];
    if ( v3 )
    {
      NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v3->m_kChildren);
      NiAVObject::Update((NiAVObject *)&v1->m_apkLinkNode[2]->vfptr, 0.0, 1);
    }
    v4 = v1->m_spFaceNode.m_pObject;
    if ( v4 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      v1->m_spFaceNode.m_pObject = 0;
    }
    v5 = v1->m_pkBaseFaceShapeNode;
    v6 = v1->m_spFaceNode.m_pObject;
    if ( v6 != v5 )
    {
      if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      v1->m_spFaceNode.m_pObject = v5;
      if ( v5 )
        InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
    }
    CharShape::TextureFace(v1, (NiTexture *)&pkTexture->vfptr);
    v7 = (NiAVObject *)&v1->m_apkGeom[1]->vfptr;
    if ( v7 )
    {
      v8 = (NiTexturingProperty *)NiAVObject::GetProperty(v7, 8);
      if ( v8 )
        NiTexturingProperty::SetDecalMap(v8, 0, 0);
    }
    if ( v1->m_pkEyeShapeAnotherNode )
    {
      if ( v1->m_apkLinkNode[2] )
        v1->m_pkEyeShapeAnotherNode = 0;
    }
    CharShape::TextureClosedEye(v1->m_pkEyeShapeNode, (NiTexture *)&pkClosedEyeTex->vfptr);
  }
}

//----- (0065B9C0) --------------------------------------------------------
void __thiscall CharShape::RemoveMinimonEff(CharShape *this, unsigned int uiUnEquipPos, MinimonRoleType RoleType)
{
  CharShape *v3; // edi@1
  signed int v4; // esi@1
  int v5; // ebx@6
  int *v6; // eax@8
  int v7; // eax@9
  MinimonInfo *v8; // eax@10
  int v9; // esi@10

  v3 = this;
  v4 = 0xFFFF;
  if ( uiUnEquipPos == 25 )
  {
    v4 = this->m_kEquip.Equ_MiniMon_R;
  }
  else if ( uiUnEquipPos == 28 )
  {
    v4 = this->m_kEquip.Equ_Minimon;
  }
  this->m_bAutoPickItem = 0;
  this->m_bAutoUseItem = 0;
  if ( (_WORD)v4 != -1 )
  {
    v5 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, signed int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                                 + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v4) )
    {
      if ( (unsigned __int16)v4 <= *(_WORD *)(v5 + 200) )
      {
        v6 = (int *)(*(_DWORD *)(v5 + 196) + 4 * (unsigned __int16)v4);
        if ( *v6 )
        {
          v7 = *v6;
          if ( v7 )
          {
            v8 = MinimonInfoTable::GetMinimonInfoByIDX((char *)(v7 + 2));
            v9 = (int)v8;
            if ( v8 )
            {
              if ( v8->MinimonRole == 1 && !v3->m_hMiniMonAutoPickEff )
              {
                v3->m_bAutoPickItem = 1;
                CharShape::SetMiniMonEffect(v3, (int)v3, 1);
              }
              if ( *(_DWORD *)(v9 + 36) == 2 && !v3->m_hMinimonAutoUseEff )
              {
                v3->m_bAutoUseItem = 1;
                CharShape::SetMinimonAutoUseEff(v3, v9, 1);
              }
            }
          }
        }
      }
    }
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0065BAA0) --------------------------------------------------------
void __thiscall CharShape::ClearModelPart(CharShape *this)
{
  std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *v1; // edi@1
  std::_Tree_nod<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> >::_Node *v2; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> >::_Node *i; // esi@1

  this->m_pkRootNode = 0;
  this->m_apkLinkNode[0] = 0;
  this->m_apkLinkNode[1] = 0;
  this->m_apkLinkNode[2] = 0;
  this->m_apkLinkNode[3] = 0;
  this->m_apkLinkNode[4] = 0;
  this->m_apkLinkNode[5] = 0;
  this->m_apkLinkNode[6] = 0;
  this->m_apkLinkNode[7] = 0;
  this->m_apkLinkNode[8] = 0;
  this->m_apkLinkNode[9] = 0;
  this->m_apkLinkNode[10] = 0;
  this->m_apkLinkNode[11] = 0;
  this->m_apkLinkNode[12] = 0;
  this->m_apkLinkNode[13] = 0;
  this->m_apkLinkNode[14] = 0;
  this->m_apkLinkNode[15] = 0;
  this->m_apkLinkNode[16] = 0;
  this->m_apkLinkNode[17] = 0;
  this->m_apkLinkNode[18] = 0;
  this->m_apkLinkNode[19] = 0;
  this->m_apkLinkNode[20] = 0;
  this->m_apkLinkNode[21] = 0;
  this->m_apkLinkNode[22] = 0;
  this->m_apkLinkNode[23] = 0;
  this->m_apkLinkNode[24] = 0;
  this->m_apkLinkNode[25] = 0;
  this->m_apkLinkNode[26] = 0;
  this->m_apkGeom[0] = 0;
  this->m_apkGeom[1] = 0;
  this->m_apkGeom[2] = 0;
  this->m_apkGeom[3] = 0;
  this->m_apkGeom[4] = 0;
  this->m_apkLodGeom[0] = 0;
  this->m_apkLodGeom[1] = 0;
  this->m_apkLodGeom[2] = 0;
  this->m_apkLodGeom[3] = 0;
  this->m_apkLodGeom[4] = 0;
  this->m_apkLodGeom[5] = 0;
  this->m_apkLodGeom[6] = 0;
  this->m_apkLodGeom[7] = 0;
  this->m_apkLodGeom[8] = 0;
  v1 = (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&this->m_mapDummyLinkNode;
  v2 = this->m_mapDummyLinkNode._Myhead->_Parent;
  for ( i = v2; !i->_Isnil; v2 = i )
  {
    std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Erase(
      v1,
      (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)i->_Right);
    i = i->_Left;
    operator delete(v2);
  }
  v1->_Myhead->_Parent = v1->_Myhead;
  v1->_Myhead->_Left = v1->_Myhead;
  v1->_Myhead->_Right = v1->_Myhead;
  v1->_Mysize = 0;
}

//----- (0065BBB0) --------------------------------------------------------
char __thiscall CharShape::SetMobModelPart(CharShape *this, NiNode *pkNode)
{
  CharShape *v2; // edi@1
  char result; // al@2
  NiShader *v4; // eax@3
  NiShader *v5; // eax@3
  NiShader *v6; // eax@3
  NiShader *v7; // eax@3
  NiShader *v8; // eax@3
  NiShader *v9; // eax@3
  NiShader *v10; // eax@3

  v2 = this;
  CharShape::ClearModelPart(this);
  if ( pkNode )
  {
    v2->m_pkRootNode = pkNode;
    CSpactralGlow_Shader_Controller::SetTarget(&v2->m_SpactralGlowEffect, pkNode);
    v4 = (NiShader *)pkNode->vfptr[18].__vecDelDtor((NiRefObject *)pkNode, (unsigned int)off_A742D4[0]);
    v2->m_apkLinkNode[1] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v4);
    v5 = (NiShader *)pkNode->vfptr[18].__vecDelDtor((NiRefObject *)pkNode, (unsigned int)off_A742E4[0]);
    v2->m_apkLinkNode[5] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v5);
    v6 = (NiShader *)pkNode->vfptr[18].__vecDelDtor((NiRefObject *)pkNode, (unsigned int)off_A74300[0]);
    v2->m_apkLinkNode[11] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v6);
    v7 = (NiShader *)pkNode->vfptr[18].__vecDelDtor((NiRefObject *)pkNode, (unsigned int)off_A74304[0]);
    v2->m_apkLinkNode[12] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v7);
    v8 = (NiShader *)pkNode->vfptr[18].__vecDelDtor((NiRefObject *)pkNode, (unsigned int)off_A74320[0]);
    v2->m_apkLinkNode[17] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v8);
    v9 = (NiShader *)pkNode->vfptr[18].__vecDelDtor((NiRefObject *)pkNode, (unsigned int)off_A74324[0]);
    v2->m_apkLinkNode[18] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v9);
    v10 = (NiShader *)pkNode->vfptr[18].__vecDelDtor((NiRefObject *)pkNode, (unsigned int)off_A742F4[0]);
    v2->m_apkLinkNode[8] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v10);
    if ( v2->m_pkEyeShapeNode )
      v2->m_pkEyeShapeNode = 0;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A742D4: using guessed type char *off_A742D4[29];
// A742E4: using guessed type char *off_A742E4[25];
// A742F4: using guessed type char *off_A742F4[21];
// A74300: using guessed type char *off_A74300[18];
// A74304: using guessed type char *off_A74304[17];
// A74320: using guessed type char *off_A74320[10];
// A74324: using guessed type char *off_A74324[9];

//----- (0065BCE0) --------------------------------------------------------
char __stdcall ItemUpGrade::SetUpgradeTextureEff(NiNode *_pNode, char ucEffNo, std::list<char *,std::allocator<char *> > *AttachedNode)
{
  NiNode *v4; // eax@1
  NiNode *v5; // esi@1
  int v7; // eax@5
  int v8; // ebx@5
  int v9; // eax@7
  NiObject *v10; // ecx@8
  int *v11; // edi@8
  NiDynamicEffect *v12; // esi@9
  NiTListItem<NiDynamicEffect *> *i; // eax@13
  NiTimeController *v14; // eax@15
  NiTexturingProperty::Map *v15; // edx@15
  NiTexturingProperty::Map *v16; // eax@15
  std::list<char *,std::allocator<char *> > *v17; // ebx@15
  NiAVObject *v18; // eax@17
  NiTListItem<NiGeometry *> *v19; // esi@18
  void *v20; // ecx@18
  void *v21; // edx@21
  NiAVObject *v22; // ecx@21
  NiProperty *v23; // edi@21
  signed int v24; // ebx@21
  NiTexturingProperty::Map *v25; // esi@23
  NiVBChip *v26; // eax@24
  NiTexturingProperty::Map *v27; // eax@25
  NiTexturingProperty::Map *v28; // esi@25
  NiTexturingProperty::Map *v29; // ecx@30
  NiTexturingProperty::Map *v30; // ecx@34
  NiTexturingProperty::Map *v31; // ecx@38
  NiTextureTransformController *v32; // eax@45
  NiTListItem<NiGeometry *> *v33; // ST04_4@49
  NiTexturingProperty::Map *pkOrgMap[4]; // [sp+10h] [bp-40h]@15
  PgTList<NiGeometry *> kList; // [sp+20h] [bp-30h]@18
  NiVBChip *element; // [sp+30h] [bp-20h]@24
  NiGeometry *pkGeom; // [sp+34h] [bp-1Ch]@3
  void *kIter; // [sp+38h] [bp-18h]@20
  NiTexturingProperty::Map *pkNewMap; // [sp+3Ch] [bp-14h]@22
  NiTextureTransformController *pkOrgCtrl; // [sp+40h] [bp-10h]@15
  int v41; // [sp+4Ch] [bp-4h]@18
  NiProperty *it; // [sp+5Ch] [bp+Ch]@4
  std::_List_nod<char *,std::allocator<char *> >::_Node *ita; // [sp+5Ch] [bp+Ch]@16

  v4 = CharResMgr::GetItemUpgradeTextureEffect(&g_kCharResMgr, ucEffNo);
  v5 = v4;
  if ( !v4 )
    return 0;
  if ( !PgUtil::CatchGeometry((NiAVObject *)&v4->vfptr, &pkGeom) )
    return 0;
  it = NiAVObject::GetProperty((NiAVObject *)&pkGeom->vfptr, 8);
  if ( !it )
    return 0;
  v7 = (int)v5->vfptr[18].__vecDelDtor((NiRefObject *)v5, (unsigned int)"EffectNode");
  v8 = v7;
  if ( v7 && *(_DWORD *)(v7 + 212) > 0u )
  {
    v9 = *(_DWORD *)(v7 + 204);
    if ( v9 )
    {
      do
      {
        v10 = *(NiObject **)(v9 + 8);
        v11 = *(int **)v9;
        if ( v10 )
        {
          v12 = (NiDynamicEffect *)NiObject::Clone(v10);
          NiDynamicEffect::AttachAffectedNode(v12, _pNode);
          NiNode::AttachEffect(_pNode, v12);
        }
        if ( !v11 )
          break;
        v9 = *v11;
      }
      while ( *v11 );
    }
    NiAVObject::UpdateEffects((NiAVObject *)&_pNode->vfptr);
    if ( *(_DWORD *)(v8 + 212) > 0u )
    {
      for ( i = _pNode->m_kEffectList.m_pkHead; i; i = i->m_pkNext )
        ;
    }
  }
  v14 = it[1].m_spControllers.m_pObject;
  pkOrgMap[1] = (NiTexturingProperty::Map *)LODWORD(v14->m_fPhase);
  v15 = (NiTexturingProperty::Map *)v14->m_uiRefCount;
  v16 = *(NiTexturingProperty::Map **)&v14->m_uFlags;
  pkOrgMap[0] = 0;
  pkOrgMap[2] = v15;
  pkOrgMap[3] = v16;
  v17 = AttachedNode;
  pkOrgCtrl = (NiTextureTransformController *)NiObjectNET::GetController(
                                                (NiObjectNET *)&it->vfptr,
                                                &NiTextureTransformController::m_RTTI);
  if ( !AttachedNode->_Mysize )
    return 0;
  ita = AttachedNode->_Myhead->_Next;
  if ( ita == AttachedNode->_Myhead )
    return 1;
  do
  {
    v18 = (NiAVObject *)((int (__stdcall *)(char *))_pNode->vfptr[18].__vecDelDtor)(ita->_Myval);
    if ( !v18 )
      goto LABEL_51;
    kList.m_kAllocator.m_uiCount = 0;
    kList.m_pkHead = 0;
    kList.m_pkTail = 0;
    kList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>Vtbl *)&PgTList<NiGeometry *>::`vftable';
    v41 = 0;
    CatchAllGeometry(v18, &kList);
    v19 = kList.m_pkHead;
    v20 = kList.m_pkHead;
    if ( !kList.m_pkHead )
      goto LABEL_48;
    while ( 2 )
    {
      v21 = *(void **)v20;
      v22 = (NiAVObject *)*((_DWORD *)v20 + 2);
      kIter = v21;
      v23 = NiAVObject::GetProperty(v22, 8);
      v24 = 0;
      if ( !v23 )
        goto LABEL_46;
      pkNewMap = 0;
      do
      {
        v25 = pkOrgMap[v24];
        if ( !v25 )
          goto LABEL_43;
        v26 = (NiVBChip *)operator new(0x18u);
        element = v26;
        LOBYTE(v41) = 1;
        if ( v26 )
        {
          NiTexturingProperty::Map::Map((NiTexturingProperty::Map *)v26, v25);
          v28 = v27;
        }
        else
        {
          v28 = 0;
        }
        LOBYTE(v41) = 0;
        pkNewMap = v28;
        if ( v24 == 1 )
        {
          v31 = (NiTexturingProperty::Map *)LODWORD(v23[1].m_spControllers.m_pObject->m_fPhase);
          element = (NiVBChip *)v28;
          if ( v28 != v31 )
          {
            if ( v31 )
              ((void (__stdcall *)(signed int))v31->vfptr->__vecDelDtor)(1);
            NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)&v23[1].m_pcName, 4u, &element);
          }
        }
        else if ( v24 == 2 )
        {
          v30 = (NiTexturingProperty::Map *)v23[1].m_spControllers.m_pObject->m_uiRefCount;
          element = (NiVBChip *)v28;
          if ( v28 != v30 )
          {
            if ( v30 )
              ((void (__stdcall *)(signed int))v30->vfptr->__vecDelDtor)(1);
            NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)&v23[1].m_pcName, 1u, &element);
          }
        }
        else
        {
          if ( v24 != 3 )
            goto LABEL_43;
          v29 = *(NiTexturingProperty::Map **)&v23[1].m_spControllers.m_pObject->m_uFlags;
          element = (NiVBChip *)v28;
          if ( v28 != v29 )
          {
            if ( v29 )
              ((void (__stdcall *)(signed int))v29->vfptr->__vecDelDtor)(1);
            NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)&v23[1].m_pcName, 2u, &element);
          }
        }
        NiTexturingProperty::SetMultiTexture((NiTexturingProperty *)v23, v28);
LABEL_43:
        ++v24;
      }
      while ( v24 < 4 );
      if ( pkOrgCtrl )
      {
        NiObjectNET::ms_eCopyType = 1;
        v32 = (NiTextureTransformController *)NiObject::Clone((NiObject *)&pkOrgCtrl->vfptr);
        NiTextureTransformController::SetMap(v32, pkNewMap, (NiTexturingProperty *)v23);
      }
LABEL_46:
      if ( kIter )
      {
        v20 = kIter;
        continue;
      }
      break;
    }
    v19 = kList.m_pkHead;
    v17 = AttachedNode;
LABEL_48:
    kList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>Vtbl *)&PgTList<NiGeometry *>::`vftable';
    v41 = 2;
    while ( v19 )
    {
      v33 = v19;
      v19 = v19->m_pkNext;
      kList.vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *> *)&kList, v33);
    }
    kList.m_kAllocator.m_uiCount = 0;
    kList.m_pkHead = 0;
    kList.m_pkTail = 0;
    v41 = -1;
    kList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::`vftable';
LABEL_51:
    ita = ita->_Next;
  }
  while ( ita != v17->_Myhead );
  return 1;
}
// 9BA240: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::`vftable')(void *p, char);
// 9BA2CC: using guessed type int (__thiscall *PgTList<NiGeometry *>::`vftable')(void *p, char);
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (0065BFE0) --------------------------------------------------------
void __thiscall CharShape::RemoveAllSubItem(CharShape *this, unsigned int uiEquipPos_Enum)
{
  CharShape *v2; // esi@1
  NiAVObject *v3; // edi@1
  std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *v4; // esi@3
  NiNode *v5; // esi@5
  NiRTTI *v6; // eax@6
  NiNode *v7; // ecx@10
  NiAVObject *v8; // eax@11
  NiAVObject *v9; // esi@12
  NiAVObject *v10; // esi@17
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v11; // ecx@23
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v12; // eax@23
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v13; // edx@23
  signed int v14; // edi@24
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v15; // eax@30
  std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *v16; // [sp+Ch] [bp-20h]@1
  ItemEquipEnum _Keyval; // [sp+10h] [bp-1Ch]@1
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > >,std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > > > result; // [sp+14h] [bp-18h]@1
  NiPointer<NiAVObject> spNode; // [sp+1Ch] [bp-10h]@1
  int v20; // [sp+28h] [bp-4h]@11

  v2 = this;
  _Keyval = uiEquipPos_Enum;
  v16 = (std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *)&this->m_mapDummyLinkNode;
  std::_Tree<std::_Tmap_traits<enum  ItemEquipEnum,NiNode *,std::less<enum  ItemEquipEnum>,std::allocator<std::pair<enum  ItemEquipEnum const,NiNode *>>,1>>::_Eqrange(
    (std::_Tree<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > *)&this->m_mapDummyLinkNode.comp,
    &result,
    &_Keyval);
  spNode.m_pObject = 0;
  std::_Distance2<std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<enum  ItemEquipEnum,NiNode *,std::less<enum  ItemEquipEnum>,std::allocator<std::pair<enum  ItemEquipEnum const,NiNode *>>,1>>>,unsigned int>(
    result.first,
    result.second,
    (unsigned int *)&spNode);
  v3 = spNode.m_pObject;
  if ( spNode.m_pObject && v2->m_pkRootNode )
  {
    v4 = (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)v16;
    _Keyval = uiEquipPos_Enum;
    std::_Tree<std::_Tmap_traits<enum  MHE_STEP,ResElement *,std::less<enum  MHE_STEP>,std::allocator<std::pair<enum  MHE_STEP const,ResElement *>>,0>>::find(
      v16,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > *)&result.second,
      (OscTarget *)&_Keyval);
    if ( v3 )
    {
      _Keyval = (ItemEquipEnum)v3;
      do
      {
        v5 = result.second._Ptr->_Myval.second;
        if ( v5 )
        {
          v6 = (NiRTTI *)((int (__thiscall *)(NiNode *))v5->vfptr[1].__vecDelDtor)(result.second._Ptr->_Myval.second);
          if ( v6 )
          {
            while ( v6 != &NiNode::m_RTTI )
            {
              v6 = v6->m_pkBaseRTTI;
              if ( !v6 )
                goto LABEL_21;
            }
            v7 = v5->m_pkParent;
            if ( v7 )
            {
              ((void (__stdcall *)(NiPointer<NiAVObject> *, NiNode *))v7->vfptr[30].__vecDelDtor)(&spNode, v5);
              v8 = spNode.m_pObject;
              v20 = 0;
              if ( spNode.m_pObject )
              {
                v9 = spNode.m_pObject;
                if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v9 )
                  v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
                v8 = 0;
                spNode.m_pObject = 0;
              }
              v20 = -1;
              if ( v8 )
              {
                v10 = v8;
                if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
                {
                  if ( v10 )
                    v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
                }
              }
            }
            std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const,int>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&result.second);
          }
        }
LABEL_21:
        --_Keyval;
      }
      while ( _Keyval );
      v4 = (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)v16;
    }
    v11._Ptr = v4->_Myhead;
    v12 = v11._Ptr->_Parent;
    v13._Ptr = v4->_Myhead;
    if ( v12->_Isnil )
    {
      v14 = uiEquipPos_Enum;
    }
    else
    {
      do
      {
        v14 = uiEquipPos_Enum;
        if ( (const signed int)v12->_Myval.first >= (signed int)uiEquipPos_Enum )
        {
          v13._Ptr = v12;
          v12 = v12->_Left;
        }
        else
        {
          v12 = v12->_Right;
        }
      }
      while ( !v12->_Isnil );
    }
    v15 = v11._Ptr->_Parent;
    while ( !v15->_Isnil )
    {
      if ( v14 >= (const signed int)v15->_Myval.first )
      {
        v15 = v15->_Right;
      }
      else
      {
        v11._Ptr = v15;
        v15 = v15->_Left;
      }
    }
    std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
      v4,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&uiEquipPos_Enum,
      v13,
      v11);
  }
}

//----- (0065C1A0) --------------------------------------------------------
char __thiscall CharShape::SetCharModelPart(CharShape *this, NiNode *pkNode)
{
  CharShape *v2; // edi@1
  NiNode *v3; // esi@1
  char result; // al@2
  NiNode *v5; // ST08_4@3
  NiShader *v6; // eax@3
  NiShader *v7; // eax@3
  NiShader *v8; // eax@3
  NiShader *v9; // eax@3
  NiShader *v10; // eax@3
  NiShader *v11; // eax@3
  NiShader *v12; // eax@3
  NiShader *v13; // eax@3
  NiShader *v14; // eax@3
  NiShader *v15; // eax@3
  NiShader *v16; // eax@3
  NiShader *v17; // eax@3
  NiShader *v18; // eax@3
  NiShader *v19; // eax@3
  NiShader *v20; // eax@3
  NiShader *v21; // eax@3
  NiShader *v22; // eax@3
  NiShader *v23; // eax@3
  NiShader *v24; // eax@3
  NiShader *v25; // eax@3
  NiShader *v26; // eax@3
  NiShader *v27; // eax@3
  NiShader *v28; // eax@3
  NiShader *v29; // eax@3
  NiShader *v30; // eax@3
  NiShader *v31; // eax@3
  NiShader *v32; // eax@3
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v33; // eax@3
  NiNode *v34; // ST00_4@4
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v35; // ecx@4
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v36; // eax@4
  NiGeometry *v37; // eax@14
  NiGeometry *v38; // ecx@14
  NiAVObject *v39; // eax@15
  NiAVObject *v40; // eax@15
  NiAVObject *v41; // eax@15
  NiShader *v42; // eax@16
  NiShader *v43; // eax@16
  std::exception pExceptionObject; // [sp+10h] [bp-30h]@19
  FindFaceNode kFindFaceNode; // [sp+1Ch] [bp-24h]@4
  std::list<NiAVObject *,std::allocator<NiAVObject *> > listFaceNode; // [sp+28h] [bp-18h]@3
  int v47; // [sp+3Ch] [bp-4h]@4

  v2 = this;
  CharShape::ClearModelPart(this);
  v3 = pkNode;
  if ( pkNode )
  {
    v5 = pkNode;
    v2->m_pkRootNode = pkNode;
    CSpactralGlow_Shader_Controller::SetTarget(&v2->m_SpactralGlowEffect, v5);
    v6 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)ModelPartName::ms_apcModelPartName);
    v2->m_apkLinkNode[0] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v6);
    v7 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A742D4[0]);
    v2->m_apkLinkNode[1] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v7);
    v8 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A742D8[0]);
    v2->m_apkLinkNode[2] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v8);
    v9 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A742DC);
    v2->m_apkLinkNode[3] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v9);
    v10 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A742E0[0]);
    v2->m_apkLinkNode[4] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v10);
    v11 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A742E4[0]);
    v2->m_apkLinkNode[5] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v11);
    v12 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A742E8[0]);
    v2->m_apkLinkNode[6] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v12);
    v13 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A742F0[0]);
    v2->m_apkLinkNode[7] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v13);
    v14 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A742F4[0]);
    v2->m_apkLinkNode[8] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v14);
    v15 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A742F8[0]);
    v2->m_apkLinkNode[9] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v15);
    v16 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A742FC[0]);
    v2->m_apkLinkNode[10] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v16);
    v17 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A74300[0]);
    v2->m_apkLinkNode[11] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v17);
    v18 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A74304[0]);
    v2->m_apkLinkNode[12] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v18);
    v19 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A74308[0]);
    v2->m_apkLinkNode[13] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v19);
    v20 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A7430C[0]);
    v2->m_apkLinkNode[14] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v20);
    v21 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A74310[0]);
    v2->m_apkLinkNode[15] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v21);
    v22 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A74314[0]);
    v2->m_apkLinkNode[16] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v22);
    v23 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A74320[0]);
    v2->m_apkLinkNode[17] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v23);
    v24 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A74324[0]);
    v2->m_apkLinkNode[18] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v24);
    v25 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A74334[0]);
    v2->m_apkLinkNode[19] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v25);
    v26 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A74338[0]);
    v2->m_apkLinkNode[20] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v26);
    v27 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A7433C[0]);
    v2->m_apkLinkNode[21] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v27);
    v28 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A74340[0]);
    v2->m_apkLinkNode[22] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v28);
    v29 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A74344);
    v2->m_apkLinkNode[23] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v29);
    v30 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A74348);
    v2->m_apkLinkNode[24] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v30);
    v31 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A7434C[0]);
    v2->m_apkLinkNode[25] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v31);
    v32 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A74350);
    v2->m_apkLinkNode[26] = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v32);
    listFaceNode._Mysize = 0;
    v33 = (std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *)operator new(0xCu);
    if ( !v33 )
    {
      pkNode = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&pkNode);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
    listFaceNode._Myhead = v33;
    v33->_Next = v33;
    listFaceNode._Myhead->_Prev = listFaceNode._Myhead;
    v47 = 0;
    kFindFaceNode.m_pCallBack = 0;
    kFindFaceNode.m_nCurLevel = -1;
    kFindFaceNode.vfptr = (Ns_TourSceneVtbl *)&FindFaceNode::`vftable';
    v34 = v2->m_pkRootNode;
    LOBYTE(v47) = 1;
    Ns_TourScene::TourScene((Ns_TourScene *)&kFindFaceNode.vfptr, v34, &NiNode::m_RTTI, &listFaceNode);
    v35 = listFaceNode._Myhead;
    v36 = listFaceNode._Myhead->_Next;
    if ( listFaceNode._Myhead->_Next != listFaceNode._Myhead )
    {
      while ( !v36->_Myval )
      {
        if ( v36 != v35 )
        {
          v36->_Prev->_Next = v36->_Next;
          v36->_Next->_Prev = v36->_Prev;
          operator delete(v36);
          v35 = listFaceNode._Myhead;
          --listFaceNode._Mysize;
        }
        v36 = v35->_Next;
        if ( v35->_Next == v35 )
          goto LABEL_11;
      }
      v2->m_pkBaseFaceShapeNode = (NiNode *)CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, (NiShader *)v36->_Myval);
    }
LABEL_11:
    if ( CharShape::SetLodGeometry(v2, 0, pLodNodeName)
      && CharShape::SetLodGeometry(v2, 1, off_A7432C)
      && CharShape::SetLodGeometry(v2, 2, off_A74330) )
    {
      v37 = v2->m_apkLodGeom[3];
      v38 = v2->m_apkLodGeom[6];
      v2->m_apkGeom[2] = v2->m_apkLodGeom[0];
      v2->m_apkGeom[3] = v37;
      v2->m_apkGeom[4] = v38;
    }
    else
    {
      v39 = (NiAVObject *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A742EC[0]);
      PgUtil::CatchGeometry(v39, &v2->m_apkGeom[2]);
      v40 = (NiAVObject *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A74318);
      PgUtil::CatchGeometry(v40, &v2->m_apkGeom[3]);
      v41 = (NiAVObject *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)off_A7431C[0]);
      PgUtil::CatchGeometry(v41, &v2->m_apkGeom[4]);
    }
    v42 = (NiShader *)v3->vfptr[18].__vecDelDtor((NiRefObject *)v3, (unsigned int)"EyeShape");
    v43 = CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v42);
    v2->m_pkEyeShapeNode = (NiNode *)v43;
    if ( v43 )
      LOWORD(v43[1].m_uiImplementation) |= 1u;
    kFindFaceNode.vfptr = (Ns_TourSceneVtbl *)&Ns_TourScene::`vftable';
    std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~list<ItemViewDummy *,std::allocator<ItemViewDummy *>>((std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)&listFaceNode);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9B8DD0: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *Ns_TourScene::`vftable')(Ns_TourScene *this, NiAVObject *_pkObject, void *);
// 9BA254: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *FindFaceNode::`vftable')(FindFaceNode *this, NiAVObject *_pkObject, void *);
// A742D0: using guessed type const char **ModelPartName::ms_apcModelPartName;
// A742D4: using guessed type char *off_A742D4[29];
// A742D8: using guessed type char *off_A742D8[28];
// A742DC: using guessed type void *off_A742DC;
// A742E0: using guessed type char *off_A742E0[26];
// A742E4: using guessed type char *off_A742E4[25];
// A742E8: using guessed type char *off_A742E8[24];
// A742EC: using guessed type char *off_A742EC[23];
// A742F0: using guessed type char *off_A742F0[22];
// A742F4: using guessed type char *off_A742F4[21];
// A742F8: using guessed type char *off_A742F8[20];
// A742FC: using guessed type char *off_A742FC[19];
// A74300: using guessed type char *off_A74300[18];
// A74304: using guessed type char *off_A74304[17];
// A74308: using guessed type char *off_A74308[16];
// A7430C: using guessed type char *off_A7430C[15];
// A74310: using guessed type char *off_A74310[14];
// A74314: using guessed type char *off_A74314[13];
// A74318: using guessed type void *off_A74318;
// A7431C: using guessed type char *off_A7431C[11];
// A74320: using guessed type char *off_A74320[10];
// A74324: using guessed type char *off_A74324[9];
// A74334: using guessed type char *off_A74334[5];
// A74338: using guessed type char *off_A74338[4];
// A7433C: using guessed type char *off_A7433C[3];
// A74340: using guessed type char *off_A74340[2];
// A74344: using guessed type char *off_A74344;
// A74348: using guessed type void *off_A74348;
// A7434C: using guessed type char *off_A7434C[2];
// A74350: using guessed type char *off_A74350;

//----- (0065C760) --------------------------------------------------------
void __thiscall CharShape::HideAllHair(CharShape *this)
{
  CharShape *v1; // esi@1
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v2; // eax@1
  NiNode *v3; // ST10_4@2
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v4; // ecx@2
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v5; // eax@2
  NiAVObject *v6; // eax@3
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v7; // eax@5
  int i; // eax@9
  void (__thiscall ***v9)(_DWORD, _DWORD); // edi@11
  NiPointer<NiNode> *v10; // edi@16
  signed int v11; // ebx@16
  NiNode *v12; // esi@17
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v13; // eax@23
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v14; // ecx@23
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v15; // esi@24
  std::exception pExceptionObject; // [sp+2Ch] [bp-38h]@26
  FindHairNode kFindHairNode; // [sp+38h] [bp-2Ch]@2
  std::list<NiAVObject *,std::allocator<NiAVObject *> > listHairNode; // [sp+44h] [bp-20h]@1
  char *_What; // [sp+50h] [bp-14h]@26
  int v20; // [sp+54h] [bp-10h]@10
  int v21; // [sp+60h] [bp-4h]@2

  v1 = this;
  listHairNode._Mysize = 0;
  v2 = (std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *)operator new(0xCu);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  listHairNode._Myhead = v2;
  v2->_Next = v2;
  listHairNode._Myhead->_Prev = listHairNode._Myhead;
  v21 = 0;
  kFindHairNode.m_pCallBack = 0;
  kFindHairNode.m_nCurLevel = -1;
  kFindHairNode.vfptr = (Ns_TourSceneVtbl *)&FindHairNode::`vftable';
  v3 = v1->m_pkRootNode;
  LOBYTE(v21) = 1;
  Ns_TourScene::TourScene((Ns_TourScene *)&kFindHairNode.vfptr, v3, &NiNode::m_RTTI, &listHairNode);
  v4 = listHairNode._Myhead;
  v5 = listHairNode._Myhead->_Next;
  if ( listHairNode._Myhead->_Next != listHairNode._Myhead )
  {
    do
    {
      v6 = v5->_Myval;
      if ( v6 )
      {
        v6->m_uFlags |= 1u;
        v4 = listHairNode._Myhead;
      }
      v7 = v4->_Next;
      if ( v4->_Next != v4 )
      {
        v7->_Prev->_Next = v7->_Next;
        v7->_Next->_Prev = v7->_Prev;
        operator delete(v7);
        v4 = listHairNode._Myhead;
        --listHairNode._Mysize;
      }
      v5 = v4->_Next;
    }
    while ( v4->_Next != v4 );
  }
  if ( v1->m_apkLinkNode[1] )
  {
    for ( i = ((int (__stdcall *)(const char *))v1->m_apkLinkNode[1]->vfptr[18].__vecDelDtor)("HairPartsNode");
          i;
          i = ((int (__stdcall *)(const char *))v1->m_apkLinkNode[1]->vfptr[18].__vecDelDtor)("HairPartsNode") )
    {
      ((void (__stdcall *)(int *, int))v1->m_apkLinkNode[1]->vfptr[30].__vecDelDtor)(&v20, i);
      if ( v20 )
      {
        v9 = (void (__thiscall ***)(_DWORD, _DWORD))v20;
        if ( !InterlockedDecrement((volatile LONG *)(v20 + 4)) )
        {
          if ( v9 )
            (**v9)(v9, 1);
        }
      }
    }
    NiAVObject::Update((NiAVObject *)&v1->m_apkLinkNode[1]->vfptr, 0.0, 1);
  }
  v10 = v1->m_aspHairNode;
  v11 = 6;
  do
  {
    v12 = v10->m_pObject;
    if ( v10->m_pObject )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
        v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
      v10->m_pObject = 0;
    }
    ++v10;
    --v11;
  }
  while ( v11 );
  kFindHairNode.vfptr = (Ns_TourSceneVtbl *)&Ns_TourScene::`vftable';
  v13 = listHairNode._Myhead->_Next;
  listHairNode._Myhead->_Next = listHairNode._Myhead;
  listHairNode._Myhead->_Prev = listHairNode._Myhead;
  v14 = listHairNode._Myhead;
  listHairNode._Mysize = 0;
  if ( v13 != listHairNode._Myhead )
  {
    do
    {
      v15 = v13->_Next;
      operator delete(v13);
      v14 = listHairNode._Myhead;
      v13 = v15;
    }
    while ( v15 != listHairNode._Myhead );
  }
  operator delete(v14);
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9B8DD0: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *Ns_TourScene::`vftable')(Ns_TourScene *this, NiAVObject *_pkObject, void *);
// 9BA25C: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *FindHairNode::`vftable')(FindHairNode *this, NiAVObject *_pkObject, void *);

//----- (0065C940) --------------------------------------------------------
char __thiscall CharShape::SetHairDetailMap(CharShape *this, unsigned int uiHaircolorID)
{
  CharShape *v2; // esi@1
  char *v3; // ecx@1
  int v5; // eax@3
  char v6; // bl@3
  unsigned int v7; // edi@4
  unsigned int v8; // esi@6
  HairInfo *v9; // eax@7
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v10; // eax@11
  unsigned int v11; // esi@12
  NiNode *v12; // eax@13
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v13; // eax@14
  NiAVObject *v14; // esi@15
  NiRTTI *v15; // eax@16
  NiProperty *v16; // eax@21
  NiProperty *v17; // esi@21
  NiTimeController *v18; // eax@22
  int v19; // edi@22
  NiTexturingProperty::Map *v20; // ebx@22
  HairDummyType v21; // eax@24
  HairDummyType v22; // eax@26
  int v23; // edi@29
  void (__stdcall ***v24)(_DWORD); // ecx@34
  NiTexture *v25; // edi@36
  NiTexturingProperty::Map *v26; // eax@37
  NiTexturingProperty::Map *v27; // eax@38
  NiTexturingProperty::Map *v28; // ecx@42
  NiTexturingProperty::Map *v29; // eax@47
  NiTexturingProperty::Map *v30; // eax@48
  NiTexturingProperty::Map *v31; // edi@48
  NiTexturingProperty::Map *v32; // ecx@50
  NiTexture *v33; // esi@55
  NiTexture *v34; // eax@60
  int v35; // esi@62
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v36; // ecx@68
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v37; // eax@68
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v38; // eax@74
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v39; // ecx@74
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v40; // esi@75
  std::exception pExceptionObject; // [sp+10h] [bp-40h]@77
  FindGeometry kFindGeometry; // [sp+1Ch] [bp-34h]@12
  std::list<NiAVObject *,std::allocator<NiAVObject *> > listGeometry; // [sp+28h] [bp-28h]@11
  NiTexturingProperty::Map *pDetailMap; // [sp+34h] [bp-1Ch]@22
  CharShape *v45; // [sp+38h] [bp-18h]@1
  HairInfo *pkHairInfo; // [sp+3Ch] [bp-14h]@10
  NiTexture *pkTexture; // [sp+40h] [bp-10h]@11
  int v48; // [sp+4Ch] [bp-4h]@12

  v2 = this;
  v45 = this;
  v3 = CDataReader::GetRecord(
         (CDataReader *)(ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable + 4),
         uiHaircolorID);
  uiHaircolorID = (unsigned int)v3;
  if ( !v3 )
    return 0;
  v5 = *(_DWORD *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 56);
  v6 = v2->m_byHairType;
  if ( v5 )
    v7 = *(_DWORD *)(v5 + 40);
  else
    v7 = 0;
  v8 = 0;
  if ( v7 )
  {
    while ( 1 )
    {
      v9 = (HairInfo *)CDataReader::GetRecord((CDataReader *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 4), v8);
      if ( v9->ID == v6 )
        break;
      if ( ++v8 >= v7 )
      {
        v3 = (char *)uiHaircolorID;
        goto LABEL_10;
      }
    }
    v3 = (char *)uiHaircolorID;
    pkHairInfo = v9;
  }
  else
  {
LABEL_10:
    pkHairInfo = 0;
  }
  pkTexture = (NiTexture *)CharResMgr::GetHairDetailTexture(&g_kCharResMgr, (unsigned __int8)*v3, v3 + 46);
  listGeometry._Mysize = 0;
  v10 = (std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *)operator new(0xCu);
  if ( !v10 )
  {
    uiHaircolorID = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&uiHaircolorID);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  listGeometry._Myhead = v10;
  v10->_Next = v10;
  listGeometry._Myhead->_Prev = listGeometry._Myhead;
  v48 = 0;
  kFindGeometry.m_pCallBack = 0;
  kFindGeometry.m_nCurLevel = -1;
  kFindGeometry.vfptr = (Ns_TourSceneVtbl *)&FindGeometry::`vftable';
  v11 = 0;
  LOBYTE(v48) = 1;
  uiHaircolorID = 0;
  do
  {
    v12 = v45->m_aspHairNode[v11].m_pObject;
    if ( v12 )
    {
      Ns_TourScene::TourScene((Ns_TourScene *)&kFindGeometry.vfptr, v12, &NiGeometry::m_RTTI, &listGeometry);
      v13 = listGeometry._Myhead->_Next;
      if ( listGeometry._Myhead->_Next != listGeometry._Myhead )
      {
        do
        {
          v14 = v13->_Myval;
          if ( !v14 )
            break;
          v15 = (NiRTTI *)((int (__thiscall *)(NiAVObject *))v14->vfptr[1].__vecDelDtor)(v14);
          if ( v15 )
          {
            while ( v15 != &NiGeometry::m_RTTI )
            {
              v15 = v15->m_pkBaseRTTI;
              if ( !v15 )
                goto LABEL_68;
            }
            v16 = NiAVObject::GetProperty(v14, 8);
            v17 = v16;
            if ( v16 )
            {
              v18 = v16[1].m_spControllers.m_pObject;
              v19 = *(_DWORD *)&v18->m_uFlags;
              v20 = (NiTexturingProperty::Map *)v18->vfptr;
              pDetailMap = *(NiTexturingProperty::Map **)&v18->m_uFlags;
              if ( pkTexture )
              {
                if ( pkHairInfo
                  && ((v21 = pkHairInfo->Exception1) != 0 && v21 == uiHaircolorID + 1
                   || (v22 = pkHairInfo->Exception2) != 0 && v22 == uiHaircolorID + 1) )
                {
                  if ( v19 )
                  {
                    v23 = *(_DWORD *)(v19 + 4);
                    if ( v23 )
                    {
                      if ( !InterlockedDecrement((volatile LONG *)(v23 + 4)) && v23 )
                        (**(void (__thiscall ***)(_DWORD, _DWORD))v23)(v23, 1);
                      pDetailMap->m_spTexture.m_pObject = 0;
                    }
                  }
                  v24 = *(void (__stdcall ****)(_DWORD))&v17[1].m_spControllers.m_pObject->m_uFlags;
                  pDetailMap = 0;
                  if ( v24 )
                  {
                    (**v24)(1);
                    NiTArray<NiCollisionGroup::Record *>::SetAt(
                      (NiTArray<NiVBChip *> *)&v17[1].m_pcName,
                      2u,
                      (NiVBChip *const *)&pDetailMap);
                  }
                  NiTexturingProperty::SetMultiTexture((NiTexturingProperty *)v17, 0);
                  v25 = CharResMgr::GetHairBaseTexFromMap(
                          &g_kCharResMgr,
                          pkHairInfo,
                          v45->m_kClassID,
                          v45->m_byGender,
                          uiHaircolorID + 1);
                  if ( !v20 )
                  {
                    v26 = (NiTexturingProperty::Map *)operator new(0x18u);
                    pDetailMap = v26;
                    LOBYTE(v48) = 2;
                    if ( v26 )
                      NiTexturingProperty::Map::Map(v26, v25, 0, WRAP_S_WRAP_T, FILTER_TRILERP, 0);
                    else
                      v27 = 0;
                    LOBYTE(v48) = 1;
                    v20 = v27;
                    if ( !v27 )
                    {
                      std::list<NiAVObject *,std::allocator<NiAVObject *>>::pop_front(&listGeometry);
LABEL_70:
                      v36 = listGeometry._Myhead;
                      goto LABEL_71;
                    }
                  }
                  NiD3DTextureStage::SetTexture(v20, v25);
                  v28 = (NiTexturingProperty::Map *)v17[1].m_spControllers.m_pObject->vfptr;
                  pDetailMap = v20;
                  if ( v20 != v28 )
                  {
                    if ( v28 )
                      ((void (__stdcall *)(signed int))v28->vfptr->__vecDelDtor)(1);
                    NiTArray<NiCollisionGroup::Record *>::SetAt(
                      (NiTArray<NiVBChip *> *)&v17[1].m_pcName,
                      0,
                      (NiVBChip *const *)&pDetailMap);
                  }
                }
                else if ( v19 )
                {
                  v33 = *(NiTexture **)(v19 + 4);
                  if ( v33 != pkTexture )
                  {
                    if ( v33 && !InterlockedDecrement((volatile LONG *)&v33->m_uiRefCount) && v33 )
                      v33->vfptr->__vecDelDtor((NiRefObject *)v33, 1u);
                    v34 = pkTexture;
                    *(_DWORD *)(v19 + 4) = pkTexture;
                    InterlockedIncrement((volatile LONG *)&v34->m_uiRefCount);
                  }
                }
                else
                {
                  v29 = (NiTexturingProperty::Map *)operator new(0x18u);
                  pDetailMap = v29;
                  LOBYTE(v48) = 3;
                  if ( v29 )
                  {
                    NiTexturingProperty::Map::Map(v29, pkTexture, 0, WRAP_S_WRAP_T, FILTER_TRILERP, 0);
                    v31 = v30;
                  }
                  else
                  {
                    v31 = 0;
                  }
                  v32 = *(NiTexturingProperty::Map **)&v17[1].m_spControllers.m_pObject->m_uFlags;
                  LOBYTE(v48) = 1;
                  pDetailMap = v31;
                  if ( v31 != v32 )
                  {
                    if ( v32 )
                      ((void (__stdcall *)(signed int))v32->vfptr->__vecDelDtor)(1);
                    NiTArray<NiCollisionGroup::Record *>::SetAt(
                      (NiTArray<NiVBChip *> *)&v17[1].m_pcName,
                      2u,
                      (NiVBChip *const *)&pDetailMap);
                  }
                  NiTexturingProperty::SetMultiTexture((NiTexturingProperty *)v17, v31);
                }
              }
              else if ( v19 )
              {
                v35 = *(_DWORD *)(v19 + 4);
                if ( v35 )
                {
                  if ( !InterlockedDecrement((volatile LONG *)(v35 + 4)) && v35 )
                    (**(void (__thiscall ***)(_DWORD, _DWORD))v35)(v35, 1);
                  *(_DWORD *)(v19 + 4) = 0;
                }
              }
              else
              {
                pDetailMap = 0;
                NiTexturingProperty::SetMultiTexture((NiTexturingProperty *)v17, 0);
              }
            }
          }
LABEL_68:
          v36 = listGeometry._Myhead;
          v37 = listGeometry._Myhead->_Next;
          if ( listGeometry._Myhead->_Next != listGeometry._Myhead )
          {
            v37->_Prev->_Next = v37->_Next;
            v37->_Next->_Prev = v37->_Prev;
            operator delete(v37);
            --listGeometry._Mysize;
            goto LABEL_70;
          }
LABEL_71:
          v13 = v36->_Next;
        }
        while ( v36->_Next != v36 );
      }
      v11 = uiHaircolorID;
      NiAVObject::UpdateProperties((NiAVObject *)&v45->m_aspHairNode[uiHaircolorID].m_pObject->vfptr);
    }
    uiHaircolorID = ++v11;
  }
  while ( v11 < 6 );
  kFindGeometry.vfptr = (Ns_TourSceneVtbl *)&Ns_TourScene::`vftable';
  v38 = listGeometry._Myhead->_Next;
  listGeometry._Myhead->_Next = listGeometry._Myhead;
  listGeometry._Myhead->_Prev = listGeometry._Myhead;
  v39 = listGeometry._Myhead;
  listGeometry._Mysize = 0;
  if ( v38 != listGeometry._Myhead )
  {
    do
    {
      v40 = v38->_Next;
      operator delete(v38);
      v39 = listGeometry._Myhead;
      v38 = v40;
    }
    while ( v40 != listGeometry._Myhead );
  }
  operator delete(v39);
  return 1;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9B8DD0: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *Ns_TourScene::`vftable')(Ns_TourScene *this, NiAVObject *_pkObject, void *);
// 9BA264: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *FindGeometry::`vftable')(FindGeometry *this, NiAVObject *_pkObject, void *);
// A88694: using guessed type int ITableBase<HairInfo,HairInfoTab>::ms_pkTable;
// A886A0: using guessed type int ITableBase<HairColorInfo,HairColorInfoTab>::ms_pkTable;

//----- (0065CDD0) --------------------------------------------------------
void __thiscall CharShape::~CharShape(CharShape *this)
{
  CharShape *v1; // esi@1
  AfterImgEff *v2; // ecx@1
  NiNode *v3; // eax@2
  AfterImgEff *v4; // edi@2
  AfterImgEff *v5; // edi@7
  NiNode *v6; // edi@16
  AfterImgEff *v7; // edi@21
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v8; // ST0C_4@25
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v9; // ST08_4@25
  AfterImgEff *v10; // edi@25
  NiNode *v11; // edi@29
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > result; // [sp+10h] [bp-18h]@25
  std::multimap<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> > > *v13; // [sp+14h] [bp-14h]@25
  CharShape *v14; // [sp+18h] [bp-10h]@1
  int v15; // [sp+24h] [bp-4h]@1

  v1 = this;
  v14 = this;
  this->vfptr = (CharShapeVtbl *)&CharShape::`vftable';
  v2 = this->m_spAuraOfWeapon.m_pObject;
  v15 = 6;
  if ( v2 )
  {
    v3 = (NiNode *)((int (*)(void))v2->vfptr[2].__vecDelDtor)();
    World::DetachEffect(&g_kWorld, v3);
    v4 = v1->m_spAuraOfWeapon.m_pObject;
    if ( v4 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      v1->m_spAuraOfWeapon.m_pObject = 0;
    }
  }
  v5 = v1->m_spAuraOfWeapon.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spAuraOfWeapon.m_pObject = 0;
  }
  ItemUpGrade::RemoveAll(&v1->m_kItemUpGrade);
  if ( v1->m_hMiniMonAutoPickEff )
  {
    EffectMgr::RemoveEffect(&g_kEffectMgr, (Effect *)v1->m_hMiniMonAutoPickEff);
    v1->m_hMiniMonAutoPickEff = 0;
  }
  if ( v1->m_hMinimonAutoUseEff )
  {
    EffectMgr::RemoveEffect(&g_kEffectMgr, (Effect *)v1->m_hMinimonAutoUseEff);
    v1->m_hMinimonAutoUseEff = 0;
  }
  v6 = v1->m_spFaceNode.m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v1->m_spFaceNode.m_pObject = 0;
  }
  v7 = v1->m_spChestBlur.m_pObject;
  LOBYTE(v15) = 5;
  if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  LOBYTE(v15) = 4;
  CSpactralGlow_Shader_Controller::~CSpactralGlow_Shader_Controller(&v1->m_SpactralGlowEffect);
  v13 = &v1->m_mapDummyLinkNode;
  v8._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapDummyLinkNode._Myhead;
  v9._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapDummyLinkNode._Myhead->_Left;
  LOBYTE(v15) = 7;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapDummyLinkNode,
    &result,
    v9,
    v8);
  operator delete(v1->m_mapDummyLinkNode._Myhead);
  LOBYTE(v15) = 2;
  ItemUpGrade::RemoveAll(&v1->m_kItemUpGrade);
  v10 = v1->m_spAuraOfWeapon.m_pObject;
  LOBYTE(v15) = 1;
  if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
    v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
  v11 = v1->m_spFaceNode.m_pObject;
  LOBYTE(v15) = 0;
  if ( v11 && !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
    v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
  v15 = -1;
  `eh vector destructor iterator'(
    v1->m_aspHairNode,
    4u,
    6,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
}
// 9BA2EC: using guessed type int (__thiscall *CharShape::`vftable')(void *p, char);

//----- (0065CFE0) --------------------------------------------------------
char __thiscall CharShape::SetModelPart(CharShape *this, NiNode *pkNode)
{
  CharShape *v2; // esi@1
  char result; // al@2
  NiNode *v4; // ecx@4
  float v5; // ST08_4@5
  float v6; // edx@5

  v2 = this;
  if ( this->m_kClassID )
    result = CharShape::SetCharModelPart(this, pkNode);
  else
    result = CharShape::SetMobModelPart(this, pkNode);
  v4 = v2->m_apkLinkNode[1];
  if ( v4 )
  {
    v5 = v4->m_kWorld.m_Translate.x;
    v6 = v4->m_kWorld.m_Translate.y;
    v2->m_fHeight = v4->m_kWorld.m_Translate.z;
  }
  else
  {
    v2->m_fHeight = 53.0;
  }
  return result;
}

//----- (0065D050) --------------------------------------------------------
void __thiscall CharShape::MakeHairSet(CharShape *this, char byID)
{
  int v2; // eax@1
  unsigned int v3; // ebx@1
  CharShape *v4; // edi@1
  char *v5; // esi@5
  unsigned int v6; // [sp+8h] [bp-4h]@2

  v2 = *(_DWORD *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 56);
  v3 = 0;
  v4 = this;
  if ( v2 )
    v6 = *(_DWORD *)(v2 + 40);
  else
    v6 = 0;
  if ( v6 > 0 )
  {
    while ( 1 )
    {
      v5 = CDataReader::GetRecord((CDataReader *)(ITableBase<HairInfo,HairInfoTab>::ms_pkTable + 4), v3);
      if ( *v5 == byID )
        break;
      if ( ++v3 >= v6 )
        return;
    }
    v4->m_byHairType = byID;
    CharShape::HideAllHair(v4);
    CharShape::SetHairParts(v4, 0, *v5, v5[90] != 0, v5 + 91, v5 + 123);
    CharShape::SetHairParts(v4, 1, *v5, v5[155] != 0, v5 + 156, v5 + 188);
    CharShape::SetHairParts(v4, 2, *v5, v5[220] != 0, v5 + 221, v5 + 253);
    CharShape::SetHairParts(v4, 3, *v5, v5[293] != 0, v5 + 294, v5 + 326);
    CharShape::SetHairParts(v4, 4, *v5, v5[358] != 0, v5 + 359, v5 + 391);
    CharShape::SetHairParts(v4, 5, *v5, v5[423] != 0, v5 + 424, v5 + 456);
    CharShape::SetHairDetailMap(v4, v4->m_byHairColor);
  }
}
// A88694: using guessed type int ITableBase<HairInfo,HairInfoTab>::ms_pkTable;

//----- (0065D1C0) --------------------------------------------------------
void __thiscall CharShape::CharShape(CharShape *this)
{
  CharShape *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> >::_Node *v2; // eax@1
  AfterImgEff *v3; // edi@2
  NiPointer<NiNode> *v4; // eax@7
  NiNode *v5; // edi@8
  bool v6; // zf@13
  NiNode *v7; // edi@14
  std::exception pExceptionObject; // [sp+10h] [bp-24h]@20
  CharShape *v9; // [sp+1Ch] [bp-18h]@1
  char *_What; // [sp+20h] [bp-14h]@7
  NiPointer<NiNode> *v11; // [sp+24h] [bp-10h]@7
  int v12; // [sp+30h] [bp-4h]@1

  v1 = this;
  v9 = this;
  this->vfptr = (CharShapeVtbl *)&CharShape::`vftable';
  `eh vector constructor iterator'(
    this->m_aspHairNode,
    4u,
    6,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v12 = 0;
  v1->m_spFaceNode.m_pObject = 0;
  v1->m_spAuraOfWeapon.m_pObject = 0;
  memset((char *)&v1->m_kItemUpGrade, 0, 0xF0u);
  v1->m_kItemUpGrade.m_WeaponUpgradeStat.nUpLevel = 0;
  v1->m_kItemUpGrade.m_WeaponUpgradeStat.pkUpEff = 0;
  LOBYTE(v12) = 3;
  v1->m_mapDummyLinkNode._Mysize = 0;
  v2 = (std::_Tree_nod<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> >::_Node *)operator new(0x18u);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_mapDummyLinkNode._Myhead = v2;
  v2->_Left = v2;
  v1->m_mapDummyLinkNode._Myhead->_Parent = v1->m_mapDummyLinkNode._Myhead;
  v1->m_mapDummyLinkNode._Myhead->_Right = v1->m_mapDummyLinkNode._Myhead;
  v1->m_mapDummyLinkNode._Myhead->_Color = 1;
  v1->m_mapDummyLinkNode._Myhead->_Isnil = 1;
  LOBYTE(v12) = 4;
  CSpactralGlow_Shader_Controller::CSpactralGlow_Shader_Controller(&v1->m_SpactralGlowEffect);
  v1->m_spChestBlur.m_pObject = 0;
  v1->m_fHeight = 30.0;
  v1->m_kClassID = 0;
  v1->m_kMobID = -1;
  *(_DWORD *)&v1->m_byRace = 16711936;
  v1->m_byFace = 0;
  v1->m_byFaceShapeType = 0;
  v1->m_pkBaseFaceShapeNode = 0;
  v1->m_pkEyeShapeNode = 0;
  v1->m_byEyeState = 1;
  v1->m_pkEyeShapeAnotherNode = 0;
  v1->m_nSetLodGeoCnt = 0;
  v1->m_pkBoneLodController = 0;
  v1->m_pActor = 0;
  v3 = v1->m_spAuraOfWeapon.m_pObject;
  LOBYTE(v12) = 6;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spAuraOfWeapon.m_pObject = 0;
  }
  v4 = v1->m_aspHairNode;
  v1->m_pkRootNode = 0;
  v11 = v1->m_aspHairNode;
  _What = (char *)6;
  do
  {
    v5 = v4->m_pObject;
    if ( v4->m_pObject )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      v11->m_pObject = 0;
    }
    v4 = v11 + 1;
    v6 = _What-- == (char *)1;
    ++v11;
  }
  while ( !v6 );
  v7 = v1->m_spFaceNode.m_pObject;
  if ( v7 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v1->m_spFaceNode.m_pObject = 0;
  }
  v1->m_uiRidePetID = -1;
  CharShape::ClearModelPart(v1);
  CharShape::ClearEquipInfo(v1);
  v1->m_bFaceCulling = 0;
  v1->m_bAutoPickItem = 0;
  v1->m_hMiniMonAutoPickEff = 0;
  v1->m_uiEquipPos = 0;
  v1->m_bAutoUseItem = 0;
  v1->m_hMinimonAutoUseEff = 0;
  v1->m_bGTIBomb = 0;
  v1->m_uiFaceTypeIndex = 0;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9BA2EC: using guessed type int (__thiscall *CharShape::`vftable')(void *p, char);

//----- (0065D420) --------------------------------------------------------
char __thiscall CharShape::SetSubItem(CharShape *this, ItemEquipEnum eEquipPos, DummyTypeEnum eInx, const char *szNifName, const char *szSubItemTextureName, const char *szSubItemNode)
{
  CharShape *v6; // esi@1
  char v7; // al@2
  NiNode *v8; // ebx@3
  NiNode *v9; // edi@13
  NiNode *v10; // eax@4
  CarToonShader *v11; // eax@34
  CarToonShader *v12; // eax@36
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > >,bool> result; // [sp+4h] [bp-10h]@34
  std::pair<enum ItemEquipEnum const ,NiNode *> _Val; // [sp+Ch] [bp-8h]@34

  v6 = this;
  if ( eInx )
  {
    v8 = 0;
    switch ( eInx )
    {
      case 1:
        v10 = CharShape::SetSubItem(this, 0, szNifName, szSubItemTextureName, szSubItemNode, 0);
        goto LABEL_32;
      case 2:
        v10 = CharShape::SetSubItem(this, LINK_HAIR, szNifName, szSubItemTextureName, szSubItemNode, 0);
        goto LABEL_32;
      case 3:
        v10 = CharShape::SetSubItem(this, LINK_FACE, szNifName, szSubItemTextureName, szSubItemNode, 0);
        goto LABEL_32;
      case 4:
        v10 = CharShape::SetSubItem(this, LINK_EYE, szNifName, szSubItemTextureName, szSubItemNode, 0);
        goto LABEL_32;
      case 5:
        v10 = CharShape::SetSubItem(this, LINK_MOUTH, szNifName, szSubItemTextureName, szSubItemNode, 0);
        goto LABEL_32;
      case 6:
        v10 = CharShape::SetSubItem(this, LINK_CHEST, szNifName, szSubItemTextureName, szSubItemNode, 0);
        goto LABEL_32;
      case 7:
        v10 = CharShape::SetSubItem(this, LINK_BACK, szNifName, szSubItemTextureName, szSubItemNode, 0);
        goto LABEL_32;
      case 9:
        v10 = CharShape::SetSubItem(this, LINK_BELT, szNifName, szSubItemTextureName, szSubItemNode, 0);
        goto LABEL_32;
      case 10:
        v10 = CharShape::SetSubItem(this, LINK_TAIL, szNifName, szSubItemTextureName, szSubItemNode, 0);
        goto LABEL_32;
      case 11:
        v9 = CharShape::SetSubItem(this, LINK_LEFTSHOULDER, szNifName, szSubItemTextureName, szSubItemNode, Left);
        v8 = CharShape::SetSubItem(v6, LINK_RIGHTSHOULDER, szNifName, szSubItemTextureName, szSubItemNode, Right);
        goto LABEL_33;
      case 12:
        v10 = CharShape::SetSubItem(this, LINK_LEFTSHOULDER, szNifName, szSubItemTextureName, szSubItemNode, Left);
        goto LABEL_32;
      case 13:
        v10 = CharShape::SetSubItem(this, LINK_RIGHTSHOULDER, szNifName, szSubItemTextureName, szSubItemNode, Right);
        goto LABEL_32;
      case 14:
        v9 = CharShape::SetSubItem(this, LINK_LEFTUPPERARM, szNifName, szSubItemTextureName, szSubItemNode, Left);
        v8 = CharShape::SetSubItem(v6, LINK_RIGHTUPPERARM, szNifName, szSubItemTextureName, szSubItemNode, Right);
        goto LABEL_33;
      case 15:
        v10 = CharShape::SetSubItem(this, LINK_LEFTUPPERARM, szNifName, szSubItemTextureName, szSubItemNode, Left);
        goto LABEL_32;
      case 16:
        v10 = CharShape::SetSubItem(this, LINK_RIGHTUPPERARM, szNifName, szSubItemTextureName, szSubItemNode, Right);
        goto LABEL_32;
      case 20:
        v9 = CharShape::SetSubItem(this, LINK_LEFTTHIGH, szNifName, szSubItemTextureName, szSubItemNode, Left);
        v8 = CharShape::SetSubItem(v6, LINK_RIGHTTHIGH, szNifName, szSubItemTextureName, szSubItemNode, Right);
        goto LABEL_33;
      case 21:
        v10 = CharShape::SetSubItem(this, LINK_LEFTTHIGH, szNifName, szSubItemTextureName, szSubItemNode, Left);
        goto LABEL_32;
      case 22:
        v10 = CharShape::SetSubItem(this, LINK_RIGHTTHIGH, szNifName, szSubItemTextureName, szSubItemNode, Right);
        goto LABEL_32;
      case 23:
        v9 = CharShape::SetSubItem(this, LINK_LEFTCALF, szNifName, szSubItemTextureName, szSubItemNode, Left);
        v8 = CharShape::SetSubItem(v6, LINK_RIGHTCALF, szNifName, szSubItemTextureName, szSubItemNode, Right);
        goto LABEL_33;
      case 24:
        v10 = CharShape::SetSubItem(this, LINK_LEFTCALF, szNifName, szSubItemTextureName, szSubItemNode, Left);
        goto LABEL_32;
      case 25:
        v10 = CharShape::SetSubItem(this, LINK_RIGHTCALF, szNifName, szSubItemTextureName, szSubItemNode, Right);
        goto LABEL_32;
      case 17:
        v9 = CharShape::SetSubItem(this, LINK_RIGHTBRACELET, szNifName, szSubItemTextureName, szSubItemNode, Right);
        v8 = CharShape::SetSubItem(v6, LINK_LEFTBRACELET, szNifName, szSubItemTextureName, szSubItemNode, Left);
        goto LABEL_33;
      case 18:
        v10 = CharShape::SetSubItem(this, LINK_LEFTBRACELET, szNifName, szSubItemTextureName, szSubItemNode, Left);
        goto LABEL_32;
      case 19:
        v10 = CharShape::SetSubItem(this, LINK_RIGHTBRACELET, szNifName, szSubItemTextureName, szSubItemNode, Right);
        goto LABEL_32;
      case 26:
        v9 = CharShape::SetSubItem(this, LINK_LEFTSHOESACC, szNifName, szSubItemTextureName, szSubItemNode, Left);
        v8 = CharShape::SetSubItem(v6, LINK_RIGHTSHOESACC, szNifName, szSubItemTextureName, szSubItemNode, Right);
        goto LABEL_33;
      case 27:
        v10 = CharShape::SetSubItem(this, LINK_LEFTSHOESACC, szNifName, szSubItemTextureName, szSubItemNode, 0);
        goto LABEL_32;
      case 28:
        v10 = CharShape::SetSubItem(this, LINK_RIGHTSHOESACC, szNifName, szSubItemTextureName, szSubItemNode, 0);
        goto LABEL_32;
      case 29:
        v10 = CharShape::SetSubItem(this, LINK_WORLD_COS, szNifName, szSubItemTextureName, szSubItemNode, 0);
LABEL_32:
        v9 = v10;
LABEL_33:
        if ( v9 )
        {
          _Val.first = eEquipPos;
          _Val.second = v9;
          std::_Tree<std::_Tmap_traits<enum  ItemEquipEnum,NiNode *,std::less<enum  ItemEquipEnum>,std::allocator<std::pair<enum  ItemEquipEnum const,NiNode *>>,1>>::insert<std::pair<enum  ItemEquipEnum const,NiNode *>>(
            (std::_Tree<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > *)&v6->m_mapDummyLinkNode.comp,
            &result,
            &_Val);
          v11 = CarToonShader::GetInstance();
          CarToonShader::SetCartoonShader(v11, v9);
        }
        if ( v8 )
        {
          _Val.first = eEquipPos;
          _Val.second = v8;
          std::_Tree<std::_Tmap_traits<enum  ItemEquipEnum,NiNode *,std::less<enum  ItemEquipEnum>,std::allocator<std::pair<enum  ItemEquipEnum const,NiNode *>>,1>>::insert<std::pair<enum  ItemEquipEnum const,NiNode *>>(
            (std::_Tree<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > *)&v6->m_mapDummyLinkNode.comp,
            &result,
            &_Val);
          v12 = CarToonShader::GetInstance();
          CarToonShader::SetCartoonShader(v12, v8);
        }
        break;
      default:
        break;
    }
    v7 = 1;
  }
  else
  {
    v7 = 0;
  }
  return v7;
}

//----- (0065D820) --------------------------------------------------------
char __thiscall ItemUpGrade::UpGradeItem(ItemUpGrade *this, Item *_pItem, NiNode *_pNode, ItemEquipEnum eEquipNum)
{
  char result; // al@2
  ItemViewInfo *v5; // esi@4
  int v6; // ebx@5
  UpEffectData *v7; // eax@5
  UpEffectData *v8; // edi@5
  ItemUpGrade *v9; // esi@6
  int v10; // ecx@8
  signed int v11; // eax@8
  NiNode *v12; // esi@10
  int v13; // eax@12
  WeaponTypeEnum v14; // eax@21
  std::list<char *,std::allocator<char *> > AttachedNode; // [sp+18h] [bp-98h]@21
  unsigned int dwEffectHandle1; // [sp+24h] [bp-8Ch]@9
  int i; // [sp+28h] [bp-88h]@9
  NiNode *_pObject; // [sp+2Ch] [bp-84h]@1
  UpEffectData *pkUpEff; // [sp+30h] [bp-80h]@5
  unsigned int dwEffectHandle0; // [sp+34h] [bp-7Ch]@9
  ItemUpGrade *v21; // [sp+38h] [bp-78h]@1
  ItemInfo *pkItemInfo; // [sp+3Ch] [bp-74h]@3
  NsFindObjectByName kFindObject; // [sp+40h] [bp-70h]@8
  char szEffectFileName[33]; // [sp+7Ch] [bp-34h]@11
  int v25; // [sp+ACh] [bp-4h]@8

  v21 = this;
  _pObject = _pNode;
  if ( _pNode
    && (pkItemInfo = _pItem->m_pkInfo) != 0
    && (v5 = _pItem->m_pkViewInfo) != 0
    && (v6 = ((int (*)(void))_pItem->vfptr[9].__vecDelDtor)() - 1,
        v7 = UpEffectTab::GetObjByID(v5->UpEffect),
        v8 = v7,
        (pkUpEff = v7) != 0)
    && (v9 = v21, v21->m_WeaponUpgradeStat.pkUpEff = v7, v9->m_WeaponUpgradeStat.nUpLevel = v6, v6 > 0) )
  {
    if ( v7->UpEffect[v6] != -1 )
    {
      NsFindObjectByName::NsFindObjectByName(&kFindObject);
      v25 = 0;
      NsFindObjectByName::FindObject(&kFindObject, _pObject, off_9BA1F8);
      v10 = 0;
      v11 = kFindObject.m_vecObject._Mylast - kFindObject.m_vecObject._Myfirst;
      if ( v11 )
      {
        dwEffectHandle0 = 0;
        dwEffectHandle1 = 0;
        i = 0;
        if ( v11 > 0 )
        {
          do
          {
            v12 = (NiNode *)NsFindObjectByName::GetAt(&kFindObject, v10);
            if ( NiObject::IsKindOf(&NiNode::m_RTTI, (NiObject *)&v12->vfptr) )
            {
              sprintf(szEffectFileName, "itemeffect%03d", v8->UpEffect[v6]);
              if ( strlen(v12->m_pcName) == 5 )
              {
                v13 = atoi((const char *)v12->m_pcName + 3) - 1;
                if ( v13 )
                {
                  if ( v13 == 1 )
                    EffectMgr::CreateAttachEffect(
                      &g_kEffectMgr,
                      &dwEffectHandle1,
                      szEffectFileName,
                      v12,
                      Timer::ms_fCurTime,
                      1);
                }
                else
                {
                  EffectMgr::CreateAttachEffect(
                    &g_kEffectMgr,
                    &dwEffectHandle0,
                    szEffectFileName,
                    v12,
                    Timer::ms_fCurTime,
                    1);
                }
              }
            }
            v8 = pkUpEff;
            v10 = i + 1;
            i = v10;
          }
          while ( v10 < kFindObject.m_vecObject._Mylast - kFindObject.m_vecObject._Myfirst );
          v9 = v21;
        }
        ItemUpGrade::SetEffectHandle(v9, eEquipNum, dwEffectHandle0, dwEffectHandle1);
      }
      v25 = -1;
      NsFindObjectByName::~NsFindObjectByName(&kFindObject);
    }
    if ( v8->UpTexture[v6] != -1 )
    {
      std::list<enum  ABSTATEINDEX,std::allocator<enum  ABSTATEINDEX>>::list<enum  ABSTATEINDEX,std::allocator<enum  ABSTATEINDEX>>((std::list<enum ABSTATEINDEX,std::allocator<enum ABSTATEINDEX> > *)&AttachedNode);
      v14 = pkItemInfo->WeaponType;
      v25 = 1;
      if ( v14 == 17 || v14 == 18 )
      {
        pkItemInfo = (ItemInfo *)"LODGroup02";
        std::list<enum  ABSTATEINDEX,std::allocator<enum  ABSTATEINDEX>>::push_back(
          (std::list<enum ABSTATEINDEX,std::allocator<enum ABSTATEINDEX> > *)&AttachedNode,
          (ABSTATEINDEX *)&pkItemInfo);
        pkItemInfo = (ItemInfo *)"LODGroup03";
        std::list<enum  ABSTATEINDEX,std::allocator<enum  ABSTATEINDEX>>::push_back(
          (std::list<enum ABSTATEINDEX,std::allocator<enum ABSTATEINDEX> > *)&AttachedNode,
          (ABSTATEINDEX *)&pkItemInfo);
      }
      else
      {
        pkItemInfo = (ItemInfo *)"LODGroup01";
        std::list<enum  ABSTATEINDEX,std::allocator<enum  ABSTATEINDEX>>::push_back(
          (std::list<enum ABSTATEINDEX,std::allocator<enum ABSTATEINDEX> > *)&AttachedNode,
          (ABSTATEINDEX *)&pkItemInfo);
      }
      ItemUpGrade::SetUpgradeTextureEff(_pObject, v8->UpTexture[v6], &AttachedNode);
      v25 = -1;
      std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~list<ItemViewDummy *,std::allocator<ItemViewDummy *>>((std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)&AttachedNode);
    }
    ItemUpGrade::SetShow(v21, 0);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0065DAB0) --------------------------------------------------------
void __thiscall CharShape::CreateWeaponCostumeEffect(CharShape *this, ItemInfo *pkItemInfo, NiNode *pkNode)
{
  CharShape *v3; // esi@1
  ItemInfo *v4; // edi@1
  unsigned __int16 v5; // cx@2
  ItemEquipEnum v6; // edi@2
  unsigned __int8 v7; // al@3
  Item *v8; // eax@8
  Item *v9; // edi@8
  ItemInfo *v10; // eax@9
  WeaponTypeEnum v11; // edx@10
  SHINE_ITEM_STRUCT kItemStruct; // [sp+Ch] [bp-6Ch]@2

  v3 = this;
  v4 = CharShape::GetEquippedWeaponItemInfo(this);
  if ( v4 )
  {
    memset((char *)&kItemStruct, 0, 0x67u);
    v5 = v4->ID;
    v6 = v4->Equip;
    kItemStruct.itemid = v5;
    if ( v6 == 10 )
    {
      v7 = *(_BYTE *)&v3->m_kEquip.upgrade & 0xF;
      kItemStruct.itemattr.blot.lot = *(_BYTE *)&v3->m_kEquip.upgrade & 0xF;
    }
    else if ( v6 == 12 )
    {
      v7 = *(_BYTE *)&v3->m_kEquip.upgrade >> 4;
      kItemStruct.itemattr.blot.lot = *(_BYTE *)&v3->m_kEquip.upgrade >> 4;
    }
    else
    {
      v7 = kItemStruct.itemattr.blot.lot;
    }
    if ( v7 >= 1u )
    {
      v8 = Item::Create(&kItemStruct);
      v9 = v8;
      if ( v8 )
      {
        v10 = v8->m_pkInfo;
        if ( v10->WeaponType )
        {
          v11 = pkItemInfo->WeaponType;
          if ( v11 == 17 || v11 == 18 )
          {
            if ( v10->UpLimit )
            {
              ItemUpGrade::UpGradeItem(&v3->m_kItemUpGrade, v9, v3->m_apkLinkNode[12], ITEMEQUIP_RIGHTHAND);
              ItemUpGrade::UpGradeItem(&v3->m_kItemUpGrade, v9, v3->m_apkLinkNode[11], ITEMEQUIP_LEFTHAND);
            }
          }
          else
          {
            ItemUpGrade::UpGradeItem(&v3->m_kItemUpGrade, v9, pkNode, pkItemInfo->Equip);
          }
        }
      }
    }
  }
}

//----- (0065DBA0) --------------------------------------------------------
void __thiscall CharShape::CreateShieldCostumeEffect(CharShape *this, ItemInfo *pkItemInfo, NiNode *pkNode)
{
  CharShape *v3; // ebx@1
  int v4; // esi@3
  int v5; // edi@3
  int *v6; // eax@5
  int v7; // esi@6
  bool v8; // zf@7
  unsigned __int8 v9; // al@8
  Item *v10; // eax@11
  SHINE_ITEM_STRUCT kItemStruct; // [sp+8h] [bp-6Ch]@7

  v3 = this;
  if ( pkItemInfo )
  {
    if ( pkNode )
    {
      v4 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      v5 = this->m_kEquip.Equ_LeftHand;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v5) )
      {
        if ( (unsigned __int16)v5 <= *(_WORD *)(v4 + 200) )
        {
          v6 = (int *)(*(_DWORD *)(v4 + 196) + 4 * v5);
          if ( *v6 )
          {
            v7 = *v6;
            if ( *v6 )
            {
              memset((char *)&kItemStruct, 0, 0x67u);
              v8 = *(_DWORD *)(v7 + 110) == 10;
              kItemStruct.itemid = *(_WORD *)v7;
              if ( v8 )
              {
                v9 = *(_BYTE *)&v3->m_kEquip.upgrade & 0xF;
                kItemStruct.itemattr.blot.lot = *(_BYTE *)&v3->m_kEquip.upgrade & 0xF;
              }
              else
              {
                v9 = kItemStruct.itemattr.blot.lot;
              }
              if ( v9 >= 1u )
              {
                v10 = Item::Create(&kItemStruct);
                if ( v10 )
                  ItemUpGrade::UpGradeItem(&v3->m_kItemUpGrade, v10, pkNode, pkItemInfo->Equip);
              }
            }
          }
        }
      }
    }
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0065DC80) --------------------------------------------------------
void __thiscall CharShape::EquipSubItem(CharShape *this, ItemInfo *pkItemInfo, ItemViewInfo *pkViewInfo)
{
  CharShape *v3; // edi@1
  ItemInfo *v4; // esi@2
  unsigned int v5; // ebx@4
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v6; // eax@6
  std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > *v7; // eax@7
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *i; // esi@7
  ItemViewDummy *v9; // eax@8
  std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > result; // [sp+10h] [bp-30h]@7
  std::exception pExceptionObject; // [sp+1Ch] [bp-24h]@15
  std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > dummys; // [sp+28h] [bp-18h]@6
  int v13; // [sp+3Ch] [bp-4h]@7
  char *pcSubItemNode; // [sp+48h] [bp+8h]@6

  v3 = this;
  if ( this->m_pkRootNode )
  {
    v4 = pkItemInfo;
    if ( pkItemInfo )
    {
      if ( pkViewInfo )
      {
        v5 = pkItemInfo->Equip;
        if ( v5 == 1 )
          v5 = 27;
        CharShape::RemoveAllSubItem(this, v5);
        pcSubItemNode = fs("_SubItem%02d", v5);
        dummys._Mysize = 0;
        v6 = (std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *)operator new(0xCu);
        if ( !v6 )
        {
          pkViewInfo = 0;
          std::exception::exception(&pExceptionObject, (const char *const *)&pkViewInfo);
          pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
          _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
        }
        v6->_Next = v6;
        dummys._Myhead = v6;
        v6->_Prev = v6;
        v13 = 0;
        v7 = ItemViewDummyTab::GetListByInxName(&result, v4->InxName);
        LOBYTE(v13) = 1;
        std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::_Assign_rv(&dummys, v7);
        LOBYTE(v13) = 0;
        std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~list<ItemViewDummy *,std::allocator<ItemViewDummy *>>((std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)&result);
        for ( i = dummys._Myhead->_Next; i != dummys._Myhead; i = i->_Next )
        {
          v9 = i->_Myval;
          if ( v5 == 17 )
          {
            CharShape::SetSubItem(v3, ITEMEQUIP_COSEFF, v9->DummyType, v9->Nif, v9->ArmorTexture, pcSubItemNode);
          }
          else if ( (v9->IsMale != 0) == (v3->m_byGender == 1) )
          {
            CharShape::SetSubItem(v3, (ItemEquipEnum)v5, v9->DummyType, v9->Nif, v9->ArmorTexture, pcSubItemNode);
          }
        }
        std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::~list<ItemViewDummy *,std::allocator<ItemViewDummy *>>((std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *)&dummys);
      }
    }
  }
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0065DDE0) --------------------------------------------------------
char __thiscall CharShape::ChangeBoneLODController(CharShape *this, int _nLodLevel, NiGeometry *_pkDestGeom, NiGeometry *_pkSrcGeom, NiGeometry *_pkNewGeom)
{
  NiSkinInstance *v5; // eax@6
  NiSkinInstance *v6; // ecx@6
  NiNode *v7; // eax@8
  NiNode *v8; // edi@8
  NiNode *v9; // esi@10
  NiNode *v10; // eax@10
  NiObjectNET *v11; // ebx@10
  NiBoneLODController *v12; // edi@12
  NiBoneLODController *v13; // esi@12
  unsigned int v14; // eax@14
  NiSkinInstance *v15; // esi@17
  unsigned int v16; // ebx@18
  NiSkinInstance *v17; // edi@18
  NiAVObject **v18; // eax@19
  NiObjectNET *v19; // eax@19
  NiObjectNET *v20; // ebx@19
  NiTimeController *v21; // ST0C_4@21
  NiAVObject **v22; // edi@21
  unsigned int v23; // esi@21
  NiNode *v24; // ST04_4@22
  NiBoneLODController *v25; // esi@25
  char result; // al@25
  FindBoneNode kFindBone; // [sp+10h] [bp-48h]@22
  NiBoneLODController *pkBoneLODCntDest; // [sp+34h] [bp-24h]@12
  int nSetIndex; // [sp+38h] [bp-20h]@16
  NiNode *pkRootParentDest; // [sp+3Ch] [bp-1Ch]@8
  CharShape *v31; // [sp+40h] [bp-18h]@1
  NiSkinInstance *pkLodSkinInstSrc; // [sp+44h] [bp-14h]@14
  NiSkinInstance *pkLodSkinInstDest; // [sp+48h] [bp-10h]@14
  int v34; // [sp+54h] [bp-4h]@18
  unsigned int uiBoneCount; // [sp+68h] [bp+10h]@18

  v31 = this;
  if ( this->m_pkRootNode
    && _nLodLevel >= 0
    && _pkDestGeom
    && _pkSrcGeom
    && _pkNewGeom
    && (v5 = _pkDestGeom->m_spSkinInstance.m_pObject, v6 = _pkSrcGeom->m_spSkinInstance.m_pObject, v5)
    && v6
    && (v7 = (NiNode *)v5->m_pkRootParent, v8 = (NiNode *)v6->m_pkRootParent, (pkRootParentDest = v7) != 0)
    && v8
    && (v9 = FindBoneRootNodes(v7), v10 = FindBoneRootNodes(v8), v11 = (NiObjectNET *)v10, v9)
    && v10
    && (v12 = (NiBoneLODController *)NiObjectNET::GetController((NiObjectNET *)&v9->vfptr, &NiBoneLODController::m_RTTI),
        pkBoneLODCntDest = v12,
        v13 = (NiBoneLODController *)NiObjectNET::GetController(v11, &NiBoneLODController::m_RTTI),
        v12)
    && v13
    && (pkLodSkinInstDest = 0, pkLodSkinInstSrc = 0, v14 = v12->m_kSkinArray.m_uiSize, v14 >= _nLodLevel)
    && v14 == v13->m_kSkinArray.m_uiSize
    && (nSetIndex = NiBoneLODController::GetSetAt(v12, _nLodLevel, (NiTriBasedGeom *)_pkDestGeom, &pkLodSkinInstDest),
        NiBoneLODController::GetSetAt(v13, _nLodLevel, (NiTriBasedGeom *)_pkSrcGeom, &pkLodSkinInstSrc),
        pkLodSkinInstDest)
    && (v15 = pkLodSkinInstSrc) != 0 )
  {
    v16 = pkLodSkinInstSrc->m_spSkinData.m_pObject->m_uiBones;
    uiBoneCount = pkLodSkinInstSrc->m_spSkinData.m_pObject->m_uiBones;
    v17 = (NiSkinInstance *)operator new(0x2Cu);
    pkLodSkinInstSrc = v17;
    v34 = 0;
    if ( v17 )
    {
      v18 = (NiAVObject **)operator new[](4 * v16);
      NiSkinInstance::NiSkinInstance(v17, v15->m_spSkinData.m_pObject, (NiAVObject *)&pkRootParentDest->vfptr, v18);
      v20 = v19;
    }
    else
    {
      v20 = 0;
    }
    v21 = (NiTimeController *)v15->m_spSkinPartition.m_pObject;
    v34 = -1;
    RewardInvItem::SetItem(v20, v21);
    v22 = v15->m_ppkBones;
    v23 = 0;
    if ( uiBoneCount )
    {
      do
      {
        FindBoneNode::FindBoneNode(&kFindBone, v31->m_apkLinkNode, 27, v22[v23]->m_pcName);
        v24 = v31->m_pkRootNode;
        v34 = 1;
        Ns_TourScene::TourScene((Ns_TourScene *)&kFindBone.vfptr, v24, &NiNode::m_RTTI, 0);
        if ( kFindBone.m_pkBone )
          *(_DWORD *)(v20->m_uiExtraDataSize + 4 * v23) = kFindBone.m_pkBone;
        v34 = -1;
        FindBoneNode::~FindBoneNode(&kFindBone);
        ++v23;
      }
      while ( v23 < uiBoneCount );
    }
    v25 = pkBoneLODCntDest;
    NiBoneLODController::SetAt(
      pkBoneLODCntDest,
      _nLodLevel,
      nSetIndex,
      (NiTriBasedGeom *)_pkNewGeom,
      (NiSkinInstance *)v20);
    NiBoneLODController::ReplaceSkinSet(v25, (NiTriBasedGeom *)_pkDestGeom, (NiTriBasedGeom *)_pkNewGeom);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0065E040) --------------------------------------------------------
char __thiscall CharShape::ChangeGeom(CharShape *this, NiGeometry **pkCurGeom, NiGeometry *pkChgGeom, int nLodLevel)
{
  NiNode *v4; // esi@4
  NiNode *v5; // ecx@4
  NiObject *v6; // eax@4
  NiNode *v7; // ebx@4
  NiNode *v8; // edx@4
  NiGeometry *v9; // eax@4
  NiSkinInstance *v10; // esi@4
  NiSkinInstance *v11; // edi@6
  NiAVObject **v12; // eax@7
  NiSkinInstance *v13; // eax@7
  NiSkinInstance *v14; // edi@7
  NiGeometry *v15; // edx@9
  unsigned int v16; // esi@9
  NiNode *v17; // ST10_4@11
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *v18; // ST14_4@11
  NiNode *v19; // esi@12
  std::set<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *> > *v20; // edi@12
  CarToonShader *v21; // eax@16
  CharShape *v22; // edi@16
  NiGeometry *v23; // ecx@18
  NiSkinInstance *v24; // ecx@18
  char result; // al@18
  FindBoneNode kFindBone; // [sp+2Ch] [bp-44h]@10
  std::set<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *> > *v27; // [sp+50h] [bp-20h]@6
  NiGeometry *pkChgNodeBL; // [sp+54h] [bp-1Ch]@4
  NiSkinInstance *pkCurSkin; // [sp+58h] [bp-18h]@4
  NiNode *pkCurNode; // [sp+5Ch] [bp-14h]@4
  CharShape *v31; // [sp+60h] [bp-10h]@1
  int v32; // [sp+6Ch] [bp-4h]@6

  v31 = this;
  if ( this->m_pkRootNode && *pkCurGeom && pkChgGeom )
  {
    NiObjectNET::ms_eCopyType = 1;
    v5 = pkChgGeom->m_pkParent;
    pkCurNode = (*pkCurGeom)->m_pkParent;
    v4 = pkCurNode;
    pkChgNodeBL = pkChgGeom;
    v6 = NiObject::Clone((NiObject *)&v5->vfptr);
    v7 = (NiNode *)v6;
    v6[11].vfptr = (NiRefObjectVtbl *)LODWORD(pkCurNode->m_kLocal.m_Translate.x);
    v8 = pkCurNode;
    v6[11].m_uiRefCount = LODWORD(v4->m_kLocal.m_Translate.y);
    v6[12].vfptr = (NiRefObjectVtbl *)LODWORD(v4->m_kLocal.m_Translate.z);
    qmemcpy(&v6[6].m_uiRefCount, &v4->m_kLocal, 0x24u);
    *(float *)&pkCurSkin = fabs(v8->m_kLocal.m_fScale);
    v6[12].m_uiRefCount = (unsigned int)pkCurSkin;
    PgUtil::CatchGeometry((NiAVObject *)v6, &pkChgGeom);
    v9 = *pkCurGeom;
    v10 = pkChgGeom->m_spSkinInstance.m_pObject;
    pkCurSkin = (*pkCurGeom)->m_spSkinInstance.m_pObject;
    if ( nLodLevel >= 0 )
      CharShape::ChangeBoneLODController(v31, nLodLevel, v9, pkChgNodeBL, pkChgGeom);
    nLodLevel = v10->m_spSkinData.m_pObject->m_uiBones;
    v11 = (NiSkinInstance *)operator new(0x2Cu);
    v27 = (std::set<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *> > *)v11;
    v32 = 0;
    if ( v11 )
    {
      v12 = (NiAVObject **)operator new[](4 * nLodLevel);
      NiSkinInstance::NiSkinInstance(v11, v10->m_spSkinData.m_pObject, pkCurSkin->m_pkRootParent, v12);
      v14 = v13;
    }
    else
    {
      v14 = 0;
    }
    v32 = -1;
    NiGeometry::SetSkinInstance(pkChgGeom, v14);
    RewardInvItem::SetItem((NiObjectNET *)v14, (NiTimeController *)v10->m_spSkinPartition.m_pObject);
    v15 = (NiGeometry *)v10->m_ppkBones;
    v16 = 0;
    pkChgNodeBL = v15;
    if ( nLodLevel )
    {
      v27 = &kFindBone.m_setLinkNode;
      do
      {
        FindBoneNode::FindBoneNode(
          &kFindBone,
          v31->m_apkLinkNode,
          27,
          (const char *)(&pkChgNodeBL->vfptr)[v16][2].__vecDelDtor);
        v17 = v31->m_pkRootNode;
        v32 = 1;
        Ns_TourScene::TourScene((Ns_TourScene *)&kFindBone.vfptr, v17, &NiNode::m_RTTI, 0);
        v14->m_ppkBones[v16] = kFindBone.m_pkBone;
        v18 = kFindBone.m_setLinkNode._Myhead->_Left;
        v32 = 3;
        std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::erase(
          (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&kFindBone.m_setLinkNode,
          (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *)&pkCurSkin,
          (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >)v18,
          (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >)kFindBone.m_setLinkNode._Myhead);
        operator delete(kFindBone.m_setLinkNode._Myhead);
        ++v16;
        v32 = -1;
      }
      while ( v16 < nLodLevel );
    }
    v19 = pkCurNode->m_pkParent;
    ((void (__thiscall *)(NiNode *, std::set<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *> > **, NiNode *))v19->vfptr[30].__vecDelDtor)(
      pkCurNode->m_pkParent,
      &v27,
      pkCurNode);
    v20 = v27;
    if ( v27 && !InterlockedDecrement((volatile LONG *)&v27->_Myhead) && v20 )
      (**(void (__thiscall ***)(std::set<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *> > *, signed int))&v20->comp.0)(
        v20,
        1);
    v21 = CarToonShader::GetInstance();
    CarToonShader::SetCartoonShader(v21, v7);
    v22 = v31;
    if ( CSpactralGlow_Shader_Controller::IsEnable(&v31->m_SpactralGlowEffect) )
      CSpactralGlow_Shader_Controller::SetupRecursive(&v22->m_SpactralGlowEffect, v7);
    ((void (__thiscall *)(NiNode *, NiNode *, _DWORD))v19->vfptr[29].__vecDelDtor)(v19, v7, 0);
    v23 = pkChgGeom;
    *pkCurGeom = pkChgGeom;
    NiAVObject::UpdateProperties((NiAVObject *)&v23->vfptr);
    NiAVObject::UpdateEffects((NiAVObject *)&(*pkCurGeom)->vfptr);
    pkCurNode = (NiNode *)1;
    pkCurSkin = v24;
    NiAVObject::Update((NiAVObject *)&(*pkCurGeom)->vfptr, 0.0, 1);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (0065E2E0) --------------------------------------------------------
char __thiscall CharShape::SetBody(CharShape *this, CharSet *pkSet)
{
  signed int v2; // esi@1
  NiGeometry **v3; // ebx@4
  NiGeometry *v4; // edi@5
  NiGeometry *v5; // eax@7
  char result; // al@15
  NiGeometry *v7; // eax@21
  CharShape *v8; // [sp+14h] [bp-14h]@1
  NiGeometry **v9; // [sp+18h] [bp-10h]@4

  v8 = this;
  v2 = 0;
  if ( this->m_nSetLodGeoCnt && pkSet->m_nSetGeoCnt > 0 )
  {
    if ( this->m_pkBoneLodController )
    {
      v3 = this->m_apkLodGeom;
      v9 = pkSet->m_pkBodyGeom;
      while ( 1 )
      {
        v4 = *v3;
        if ( *v3 )
          InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
        v5 = 0;
        if ( v2 < 3 && v2 < pkSet->m_nSetGeoCnt )
          v5 = *v9;
        if ( !CharShape::ChangeGeom(v8, v3, v5, v2) )
          break;
        if ( v4 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
            v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
        }
        ++v9;
        ++v2;
        ++v3;
        if ( v2 >= 3 )
        {
          v8->m_apkGeom[2] = v8->m_apkLodGeom[0];
          return 1;
        }
      }
      if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
    result = 0;
  }
  else
  {
    if ( pkSet->m_nSetGeoCnt > 0 )
      v7 = pkSet->m_pkBodyGeom[0];
    else
      v7 = 0;
    this->m_apkLodGeom[0] = 0;
    this->m_apkLodGeom[1] = 0;
    this->m_apkLodGeom[2] = 0;
    result = CharShape::ChangeGeom(this, &this->m_apkGeom[2], v7, -1);
  }
  return result;
}

//----- (0065E450) --------------------------------------------------------
char __thiscall CharShape::SetLeg(CharShape *this, CharSet *pkSet)
{
  signed int v2; // esi@1
  NiGeometry **v3; // ebx@4
  NiGeometry *v4; // edi@5
  NiGeometry *v5; // eax@7
  char result; // al@15
  NiGeometry *v7; // eax@21
  CharShape *v8; // [sp+14h] [bp-14h]@1
  NiGeometry **v9; // [sp+18h] [bp-10h]@4

  v8 = this;
  v2 = 0;
  if ( this->m_nSetLodGeoCnt && pkSet->m_nSetGeoCnt > 0 )
  {
    if ( this->m_pkBoneLodController )
    {
      v3 = &this->m_apkLodGeom[3];
      v9 = pkSet->m_pkLegGeom;
      while ( 1 )
      {
        v4 = *v3;
        if ( *v3 )
          InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
        v5 = 0;
        if ( v2 < 3 && v2 < pkSet->m_nSetGeoCnt )
          v5 = *v9;
        if ( !CharShape::ChangeGeom(v8, v3, v5, v2) )
          break;
        if ( v4 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
            v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
        }
        ++v9;
        ++v2;
        ++v3;
        if ( v2 >= 3 )
        {
          v8->m_apkGeom[3] = v8->m_apkLodGeom[3];
          return 1;
        }
      }
      if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
    result = 0;
  }
  else
  {
    if ( pkSet->m_nSetGeoCnt > 0 )
      v7 = pkSet->m_pkLegGeom[0];
    else
      v7 = 0;
    this->m_apkLodGeom[3] = 0;
    this->m_apkLodGeom[4] = 0;
    this->m_apkLodGeom[5] = 0;
    result = CharShape::ChangeGeom(this, &this->m_apkGeom[3], v7, -1);
  }
  return result;
}

//----- (0065E5C0) --------------------------------------------------------
char __thiscall CharShape::SetShoes(CharShape *this, CharSet *pkSet)
{
  signed int v2; // esi@1
  NiGeometry **v3; // ebx@4
  NiGeometry *v4; // edi@5
  NiGeometry *v5; // eax@7
  char result; // al@15
  NiGeometry *v7; // eax@21
  CharShape *v8; // [sp+14h] [bp-14h]@1
  NiGeometry **v9; // [sp+18h] [bp-10h]@4

  v8 = this;
  v2 = 0;
  if ( this->m_nSetLodGeoCnt && pkSet->m_nSetGeoCnt > 0 )
  {
    if ( this->m_pkBoneLodController )
    {
      v3 = &this->m_apkLodGeom[6];
      v9 = pkSet->m_pkShoesGeom;
      while ( 1 )
      {
        v4 = *v3;
        if ( *v3 )
          InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
        v5 = 0;
        if ( v2 < 3 && v2 < pkSet->m_nSetGeoCnt )
          v5 = *v9;
        if ( !CharShape::ChangeGeom(v8, v3, v5, v2) )
          break;
        if ( v4 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
            v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
        }
        ++v9;
        ++v2;
        ++v3;
        if ( v2 >= 3 )
        {
          v8->m_apkGeom[4] = v8->m_apkLodGeom[6];
          return 1;
        }
      }
      if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
    result = 0;
  }
  else
  {
    if ( pkSet->m_nSetGeoCnt > 0 )
      v7 = pkSet->m_pkShoesGeom[0];
    else
      v7 = 0;
    this->m_apkLodGeom[6] = 0;
    this->m_apkLodGeom[7] = 0;
    this->m_apkLodGeom[8] = 0;
    result = CharShape::ChangeGeom(this, &this->m_apkGeom[4], v7, -1);
  }
  return result;
}

//----- (0065E730) --------------------------------------------------------
char __thiscall CharShape::Equip_SetItem(CharShape *this, unsigned int uiEquipPos, CharSet *pkSet, NiTexture *pkTexture)
{
  CharShape *v4; // esi@1
  char result; // al@4

  v4 = this;
  if ( pkSet )
  {
    switch ( uiEquipPos )
    {
      case 7u:
      case 8u:
        if ( !CharShape::SetBody(this, pkSet) )
          goto LABEL_9;
        result = CharShape::TextureBody(v4, pkTexture);
        break;
      case 0x13u:
      case 0x14u:
        if ( !CharShape::SetLeg(this, pkSet) )
          goto LABEL_9;
        result = CharShape::TextureLeg(v4, pkTexture);
        break;
      case 0x15u:
      case 0x16u:
        if ( !CharShape::SetShoes(this, pkSet) )
          goto LABEL_9;
        result = CharShape::TextureShoes(v4, pkTexture);
        break;
      default:
        goto LABEL_9;
    }
  }
  else
  {
LABEL_9:
    result = 0;
  }
  return result;
}

//----- (0065E7E0) --------------------------------------------------------
char __thiscall CharShape::ResetBody(CharShape *this)
{
  CharShape *v1; // edi@1
  char v2; // dl@1
  ChrClassType v3; // ecx@2
  char kClassID; // ST14_1@3
  char v5; // ST18_1@3
  char v6; // al@3
  CharSet *v7; // eax@3
  CharSet *v8; // esi@3
  char result; // al@5
  NiProperty *v10; // eax@14
  NiTimeController *v11; // ecx@15

  v1 = this;
  v2 = this->m_kClassID;
  switch ( this->m_kClassID )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      v3 = 0;
      goto LABEL_3;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      v3 = 2;
      goto LABEL_3;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      v3 = 1;
      goto LABEL_3;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      v3 = 3;
      goto LABEL_3;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      v3 = 4;
      goto LABEL_3;
    case 0x1A:
    case 0x1B:
      v3 = 5;
LABEL_3:
      kClassID = v2;
      v5 = v1->m_byGender;
      v6 = ChrBasicEquipTab::GetByIndex(v3, v1->m_byGender);
      v7 = CharResMgr::GetCharSet(&g_kCharResMgr, kClassID, v5, (unsigned __int8)v6);
      v8 = v7;
      if ( v7 && CharShape::SetBody(v1, v7) )
      {
        if ( v8->m_nSetGeoCnt > 0
          && v8 != (CharSet *)-16
          && (v10 = NiAVObject::GetProperty((NiAVObject *)&v8->m_pkBodyGeom[0]->vfptr, 8)) != 0
          && (v11 = v10[1].m_spControllers.m_pObject, v11->vfptr) )
        {
          result = CharShape::TextureBody(v1, (NiTexture *)v11->vfptr[1].__vecDelDtor);
        }
        else
        {
          result = CharShape::TextureBody(v1, 0);
        }
      }
      else
      {
        result = 0;
      }
      break;
    default:
      result = 0;
      break;
  }
  return result;
}

//----- (0065E900) --------------------------------------------------------
char __thiscall CharShape::ResetLeg(CharShape *this)
{
  CharShape *v1; // edi@1
  char v2; // dl@1
  ChrClassType v3; // ecx@2
  char kClassID; // ST14_1@3
  char v5; // ST18_1@3
  char v6; // al@3
  CharSet *v7; // eax@3
  CharSet *v8; // esi@3
  char result; // al@5
  NiProperty *v10; // eax@14
  NiTimeController *v11; // ecx@15

  v1 = this;
  v2 = this->m_kClassID;
  switch ( this->m_kClassID )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      v3 = 0;
      goto LABEL_3;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      v3 = 2;
      goto LABEL_3;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      v3 = 1;
      goto LABEL_3;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      v3 = 3;
      goto LABEL_3;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      v3 = 4;
      goto LABEL_3;
    case 0x1A:
    case 0x1B:
      v3 = 5;
LABEL_3:
      kClassID = v2;
      v5 = v1->m_byGender;
      v6 = ChrBasicEquipTab::GetByIndex(v3, v1->m_byGender);
      v7 = CharResMgr::GetCharSet(&g_kCharResMgr, kClassID, v5, (unsigned __int8)v6);
      v8 = v7;
      if ( v7 && CharShape::SetLeg(v1, v7) )
      {
        if ( v8->m_nSetGeoCnt > 0
          && v8 != (CharSet *)-28
          && (v10 = NiAVObject::GetProperty((NiAVObject *)&v8->m_pkLegGeom[0]->vfptr, 8)) != 0
          && (v11 = v10[1].m_spControllers.m_pObject, v11->vfptr) )
        {
          result = CharShape::TextureLeg(v1, (NiTexture *)v11->vfptr[1].__vecDelDtor);
        }
        else
        {
          result = CharShape::TextureLeg(v1, 0);
        }
      }
      else
      {
        result = 0;
      }
      break;
    default:
      result = 0;
      break;
  }
  return result;
}

//----- (0065EA20) --------------------------------------------------------
char __thiscall CharShape::ResetShoes(CharShape *this)
{
  CharShape *v1; // edi@1
  char v2; // dl@1
  ChrClassType v3; // ecx@2
  char kClassID; // ST14_1@3
  char v5; // ST18_1@3
  char v6; // al@3
  CharSet *v7; // eax@3
  CharSet *v8; // esi@3
  char result; // al@5
  NiProperty *v10; // eax@14
  NiTimeController *v11; // ecx@15

  v1 = this;
  v2 = this->m_kClassID;
  switch ( this->m_kClassID )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      v3 = 0;
      goto LABEL_3;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      v3 = 2;
      goto LABEL_3;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      v3 = 1;
      goto LABEL_3;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      v3 = 3;
      goto LABEL_3;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      v3 = 4;
      goto LABEL_3;
    case 0x1A:
    case 0x1B:
      v3 = 5;
LABEL_3:
      kClassID = v2;
      v5 = v1->m_byGender;
      v6 = ChrBasicEquipTab::GetByIndex(v3, v1->m_byGender);
      v7 = CharResMgr::GetCharSet(&g_kCharResMgr, kClassID, v5, (unsigned __int8)v6);
      v8 = v7;
      if ( v7 && CharShape::SetShoes(v1, v7) )
      {
        if ( v8->m_nSetGeoCnt > 0
          && v8 != (CharSet *)-40
          && (v10 = NiAVObject::GetProperty((NiAVObject *)&v8->m_pkShoesGeom[0]->vfptr, 8)) != 0
          && (v11 = v10[1].m_spControllers.m_pObject, v11->vfptr) )
        {
          result = CharShape::TextureShoes(v1, (NiTexture *)v11->vfptr[1].__vecDelDtor);
        }
        else
        {
          result = CharShape::TextureShoes(v1, 0);
        }
      }
      else
      {
        result = 0;
      }
      break;
    default:
      result = 0;
      break;
  }
  return result;
}

//----- (0065EB40) --------------------------------------------------------
char __thiscall CharShape::EquipBody(CharShape *this)
{
  CharShape *v1; // esi@1

  v1 = this;
  if ( !CharShape::Equip(this, this->m_kEquip.Equ_Body, *((_BYTE *)&this->m_kEquip.upgrade + 1) & 0xF)
    && v1->m_kEquip.Equ_AccBody == -1 )
  {
    CharShape::ResetBody(v1);
  }
  return 1;
}

//----- (0065EB80) --------------------------------------------------------
char __thiscall CharShape::EquipLeg(CharShape *this)
{
  CharShape *v1; // esi@1

  v1 = this;
  if ( !CharShape::Equip(this, this->m_kEquip.Equ_Pant, *((_BYTE *)&this->m_kEquip.upgrade + 1) >> 4)
    && v1->m_kEquip.Equ_AccPant == -1 )
  {
    CharShape::ResetLeg(v1);
  }
  return 1;
}

//----- (0065EBC0) --------------------------------------------------------
char __thiscall CharShape::EquipShoes(CharShape *this)
{
  CharShape *v1; // esi@1

  v1 = this;
  if ( !CharShape::Equip(this, this->m_kEquip.Equ_Boot, *((_BYTE *)&this->m_kEquip.upgrade + 2) & 0xF)
    && v1->m_kEquip.Equ_AccBoot == -1 )
  {
    CharShape::ResetShoes(v1);
  }
  return 1;
}

//----- (0065EC00) --------------------------------------------------------
char __thiscall CharShape::RemoveBody(CharShape *this)
{
  CharShape *v1; // edi@1
  CharSet *v2; // eax@1
  CharSet *v3; // esi@1
  char result; // al@2
  NiProperty *v5; // eax@6
  NiTimeController *v6; // ecx@7

  v1 = this;
  v2 = CharResMgr::GetCharSet(&g_kCharResMgr, this->m_kClassID, this->m_byGender, 0xFFu);
  v3 = v2;
  if ( v2 && CharShape::SetBody(v1, v2) )
  {
    if ( v3->m_nSetGeoCnt > 0
      && v3 != (CharSet *)-16
      && (v5 = NiAVObject::GetProperty((NiAVObject *)&v3->m_pkBodyGeom[0]->vfptr, 8)) != 0
      && (v6 = v5[1].m_spControllers.m_pObject, v6->vfptr) )
    {
      result = CharShape::TextureBody(v1, (NiTexture *)v6->vfptr[1].__vecDelDtor);
    }
    else
    {
      result = CharShape::TextureBody(v1, 0);
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0065ECA0) --------------------------------------------------------
char __thiscall CharShape::RemoveLeg(CharShape *this)
{
  CharShape *v1; // edi@1
  CharSet *v2; // eax@1
  CharSet *v3; // esi@1
  char result; // al@2
  NiProperty *v5; // eax@6
  NiTimeController *v6; // ecx@7

  v1 = this;
  v2 = CharResMgr::GetCharSet(&g_kCharResMgr, this->m_kClassID, this->m_byGender, 0xFFu);
  v3 = v2;
  if ( v2 && CharShape::SetLeg(v1, v2) )
  {
    if ( v3->m_nSetGeoCnt > 0
      && v3 != (CharSet *)-28
      && (v5 = NiAVObject::GetProperty((NiAVObject *)&v3->m_pkLegGeom[0]->vfptr, 8)) != 0
      && (v6 = v5[1].m_spControllers.m_pObject, v6->vfptr) )
    {
      result = CharShape::TextureLeg(v1, (NiTexture *)v6->vfptr[1].__vecDelDtor);
    }
    else
    {
      result = CharShape::TextureLeg(v1, 0);
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0065ED40) --------------------------------------------------------
char __thiscall CharShape::RemoveShoes(CharShape *this)
{
  CharShape *v1; // edi@1
  CharSet *v2; // eax@1
  CharSet *v3; // esi@1
  char result; // al@2
  NiProperty *v5; // eax@6
  NiTimeController *v6; // ecx@7

  v1 = this;
  v2 = CharResMgr::GetCharSet(&g_kCharResMgr, this->m_kClassID, this->m_byGender, 0xFFu);
  v3 = v2;
  if ( v2 && CharShape::SetShoes(v1, v2) )
  {
    if ( v3->m_nSetGeoCnt > 0
      && v3 != (CharSet *)-40
      && (v5 = NiAVObject::GetProperty((NiAVObject *)&v3->m_pkShoesGeom[0]->vfptr, 8)) != 0
      && (v6 = v5[1].m_spControllers.m_pObject, v6->vfptr) )
    {
      result = CharShape::TextureShoes(v1, (NiTexture *)v6->vfptr[1].__vecDelDtor);
    }
    else
    {
      result = CharShape::TextureShoes(v1, 0);
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0065EDE0) --------------------------------------------------------
void __thiscall CharShape::CheckOldCos(CharShape *this, ItemViewInfo *pkOldViewInfo, ItemEquipEnum eItemEquipType, bool *pbaRemovedStateFlag)
{
  CharShape *v4; // edi@1
  char *v5; // eax@2
  char *v6; // esi@2

  v4 = this;
  if ( pkOldViewInfo )
  {
    v5 = CDataReader::GetRecord(
           (CDataReader *)(ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::ms_pkTable + 4),
           pkOldViewInfo->IVET_Index);
    v6 = v5;
    if ( v5 )
    {
      if ( v5[4] && !*pbaRemovedStateFlag && eItemEquipType != 8 )
      {
        v4->m_barrRemoveShape[0] = 0;
        CharShape::EquipBody(v4);
      }
      if ( v6[5] && !pbaRemovedStateFlag[1] && eItemEquipType != 20 )
      {
        v4->m_barrRemoveShape[1] = 0;
        CharShape::EquipLeg(v4);
      }
      if ( v6[6] && !pbaRemovedStateFlag[2] && eItemEquipType != 22 )
      {
        v4->m_barrRemoveShape[2] = 0;
        CharShape::EquipShoes(v4);
      }
    }
  }
}
// A8C13C: using guessed type int ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::ms_pkTable;

//----- (0065EE80) --------------------------------------------------------
void __thiscall CharShape::MultiSlotCosUnEquip(CharShape *this, ItemViewInfo *pkOldViewInfo)
{
  CharShape *v2; // edi@1
  char *v3; // eax@2
  char *v4; // esi@2

  v2 = this;
  if ( pkOldViewInfo )
  {
    v3 = CDataReader::GetRecord(
           (CDataReader *)(ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::ms_pkTable + 4),
           pkOldViewInfo->IVET_Index);
    v4 = v3;
    if ( v3 )
    {
      if ( v3[4] )
      {
        v2->m_barrRemoveShape[0] = 0;
        CharShape::EquipBody(v2);
      }
      if ( v4[5] )
      {
        v2->m_barrRemoveShape[1] = 0;
        CharShape::EquipLeg(v2);
      }
      if ( v4[6] )
      {
        v2->m_barrRemoveShape[2] = 0;
        CharShape::EquipShoes(v2);
      }
    }
  }
}
// A8C13C: using guessed type int ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::ms_pkTable;

//----- (0065EEF0) --------------------------------------------------------
char __thiscall CharShape::MultiSlotCosProcess(CharShape *this, ItemInfo *pkItemInfo)
{
  int v2; // ebx@1
  int v3; // edi@1
  CharShape *v4; // esi@1
  int *v5; // eax@3
  int v6; // eax@4
  unsigned int v8; // ST0C_4@6
  char *v9; // eax@6
  char *v10; // edi@6
  ItemEquipEnum v11; // eax@19
  ItemViewInfo *v12; // eax@20
  ItemEquipEnum v13; // [sp-8h] [bp-18h]@20
  bool *v14; // [sp-4h] [bp-14h]@20
  bool barrRemoveShape[3]; // [sp+Ch] [bp-4h]@6

  v2 = pkItemInfo->ID;
  v3 = ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;
  v4 = this;
  if ( !(unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable
                                                         + 16))(
                           ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable,
                           v2) )
    return 0;
  if ( (unsigned __int16)v2 > *(_WORD *)(v3 + 200) )
    return 0;
  v5 = (int *)(*(_DWORD *)(v3 + 196) + 4 * v2);
  if ( !*v5 )
    return 0;
  v6 = *v5;
  if ( !v6 )
    return 0;
  v8 = *(_DWORD *)(v6 + 376);
  *(_WORD *)barrRemoveShape = 0;
  barrRemoveShape[2] = 0;
  v9 = CDataReader::GetRecord(
         (CDataReader *)(ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::ms_pkTable + 4),
         v8);
  v10 = v9;
  if ( !v9 )
    return 0;
  if ( v9[4] )
  {
    if ( pkItemInfo->Equip != 8 )
    {
      barrRemoveShape[0] = 1;
      if ( !v4->m_barrRemoveShape[0] )
      {
        v4->m_barrRemoveShape[0] = 1;
        CharShape::RemoveAllSubItem(v4, 7u);
        CharShape::RemoveBody(v4);
      }
    }
  }
  if ( v10[5] )
  {
    if ( pkItemInfo->Equip != 20 )
    {
      barrRemoveShape[1] = 1;
      if ( !v4->m_barrRemoveShape[1] )
      {
        v4->m_barrRemoveShape[1] = 1;
        CharShape::RemoveAllSubItem(v4, 0x13u);
        CharShape::RemoveLeg(v4);
      }
    }
  }
  if ( v10[6] && pkItemInfo->Equip != 22 )
  {
    barrRemoveShape[2] = 1;
    if ( !v4->m_barrRemoveShape[2] )
    {
      v4->m_barrRemoveShape[2] = 1;
      CharShape::RemoveAllSubItem(v4, 0x15u);
      CharShape::RemoveShoes(v4);
    }
  }
  v11 = pkItemInfo->Equip;
  if ( v11 == 8 )
  {
    v14 = barrRemoveShape;
    v13 = 8;
    v12 = IIDTableBase<ItemViewInfo,ItemViewInfoTab,unsigned short>::GetByID(v4->m_kEquip.Equ_AccBody);
LABEL_25:
    CharShape::CheckOldCos(v4, v12, v13, v14);
    return 1;
  }
  if ( v11 == 20 )
  {
    v14 = barrRemoveShape;
    v13 = 20;
    v12 = IIDTableBase<ItemViewInfo,ItemViewInfoTab,unsigned short>::GetByID(v4->m_kEquip.Equ_AccPant);
    goto LABEL_25;
  }
  if ( v11 == 22 )
  {
    v14 = barrRemoveShape;
    v13 = 22;
    v12 = IIDTableBase<ItemViewInfo,ItemViewInfoTab,unsigned short>::GetByID(v4->m_kEquip.Equ_Minimon);
    goto LABEL_25;
  }
  return 1;
}
// A8C13C: using guessed type int ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::ms_pkTable;
// A8C298: using guessed type int ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;

//----- (0065F060) --------------------------------------------------------
char __userpurge CharShape::Equip@<al>(CharShape *this@<ecx>, int a2@<ebx>, Item *_pItem)
{
  CharShape *v3; // esi@1
  ItemInfo *v5; // edi@3
  int v6; // ST08_4@5
  int v7; // ebx@5
  ItemViewInfo **v8; // eax@7
  unsigned int v9; // eax@9
  char v10; // bl@9
  EquipTypeEnum v11; // eax@19
  ItemInfo *v12; // eax@31
  WeaponTypeEnum v13; // eax@32
  ItemInfo *v14; // eax@34
  WeaponTypeEnum v15; // eax@35
  ItemInfo *v16; // eax@40
  WeaponTypeEnum v17; // eax@41
  bool v18; // zf@59
  ItemViewEquipTypeInfo *v19; // eax@61
  ItemViewEquipTypeInfo *v20; // eax@64
  NiNode *v21; // ebx@74
  NiNode *v22; // eax@73
  WeaponTypeEnum v23; // eax@77
  ItemEquipEnum v24; // eax@82
  GameFrameWork *v25; // eax@99
  unsigned __int16 v26; // ax@104
  CharSet *v27; // ebx@106
  NiSourceTexture *v28; // eax@108
  NiAVObject *v29; // ecx@113
  unsigned __int16 uiEquipPos; // [sp+8h] [bp-8h]@5
  unsigned int uiEquipPosa; // [sp+8h] [bp-8h]@9
  ItemViewInfo *pkViewInfo; // [sp+Ch] [bp-4h]@8

  v3 = this;
  if ( !_pItem )
    return 0;
  v5 = _pItem->m_pkInfo;
  if ( !v5 )
    return 0;
  v6 = a2;
  v7 = ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;
  uiEquipPos = v5->ID;
  if ( !(unsigned __int8)(*(int (__thiscall **)(int, _DWORD, int))(*(_DWORD *)ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable
                                                                 + 16))(
                           ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable,
                           v5->ID,
                           v6) )
    return 0;
  if ( uiEquipPos > *(_WORD *)(v7 + 200) )
    return 0;
  v8 = (ItemViewInfo **)(*(_DWORD *)(v7 + 196) + 4 * uiEquipPos);
  if ( !*v8 )
    return 0;
  pkViewInfo = *v8;
  if ( !*v8 )
    return 0;
  v9 = v5->Equip;
  v10 = 1;
  uiEquipPosa = v9;
  if ( v9 == 25 && v3->m_uiEquipPos )
  {
    v9 = v3->m_uiEquipPos;
    uiEquipPosa = v3->m_uiEquipPos;
  }
  switch ( v9 )
  {
    case 7u:
      if ( v3->m_barrRemoveShape[0] || v3->m_kEquip.Equ_AccBody != -1 )
        v10 = 0;
      else
        CharShape::RemoveAllSubItem(v3, 8u);
      v3->m_kEquip.Equ_Body = v5->ID;
      *((_BYTE *)&v3->m_kEquip.upgrade + 1) ^= (((int (*)(void))_pItem->vfptr[9].__vecDelDtor)() ^ *((_BYTE *)&v3->m_kEquip.upgrade + 1)) & 0xF;
      goto LABEL_18;
    default:
      break;
    case 8u:
      CharShape::MultiSlotCosProcess(v3, v5);
      v3->m_kEquip.Equ_AccBody = v5->ID;
      CharShape::RemoveAllSubItem(v3, 7u);
      break;
    case 0xAu:
      if ( v3->m_kEquip.Equ_AccLeftHand == -1 )
        CharShape::RemoveAllSubItem(v3, 0xBu);
      else
        v10 = 0;
      v3->m_kEquip.Equ_LeftHand = v5->ID;
      *(_BYTE *)&v3->m_kEquip.upgrade ^= (((int (*)(void))_pItem->vfptr[9].__vecDelDtor)() ^ *(_BYTE *)&v3->m_kEquip.upgrade) & 0xF;
      goto LABEL_18;
    case 0xBu:
      v3->m_kEquip.Equ_AccLeftHand = v5->ID;
      goto LABEL_27;
    case 0xCu:
      if ( v3->m_kEquip.Equ_AccRightHand == -1 )
        CharShape::RemoveAllSubItem(v3, 0xDu);
      else
        v10 = 0;
      v12 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(v3->m_kEquip.Equ_RightHand);
      if ( v12 )
      {
        v13 = v12->WeaponType;
        if ( v13 == 17 || v13 == 18 )
        {
          v14 = CharShape::GetEquippedCosWeaponItemInfo(v3);
          if ( v14 )
          {
            v15 = v14->WeaponType;
            if ( v15 != 17 && v15 != 18 )
              CharShape::Link(v3, LINK_LEFTHAND, 0, 0xBu);
          }
          CharShape::Link(v3, LINK_LEFTHAND, 0, 0xAu);
        }
      }
      v3->m_kEquip.Equ_RightHand = v5->ID;
      v3->m_kEquip.upgrade = ($050E0EECA9116B4E3A3935292D917DD5)(16 * ((int (*)(void))_pItem->vfptr[9].__vecDelDtor)() | *(_BYTE *)&v3->m_kEquip.upgrade & 0xF);
      goto LABEL_18;
    case 0xDu:
      v3->m_kEquip.Equ_AccRightHand = v5->ID;
      CharShape::RemoveAllSubItem(v3, 0xCu);
      v16 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(v3->m_kEquip.Equ_RightHand);
      if ( v16 )
      {
        v17 = v16->WeaponType;
        if ( v17 == 17 || v17 == 18 )
        {
          CharShape::Link(v3, LINK_LEFTHAND, 0, 0xAu);
          ItemUpGrade::RemoveEffect(&v3->m_kItemUpGrade, 0xAu);
        }
      }
      ItemUpGrade::RemoveEffect(&v3->m_kItemUpGrade, 0xCu);
      break;
    case 0x13u:
      if ( v3->m_barrRemoveShape[1] || v3->m_kEquip.Equ_AccPant != -1 )
        v10 = 0;
      else
        CharShape::RemoveAllSubItem(v3, 0x14u);
      v3->m_kEquip.Equ_Pant = v5->ID;
      *((_BYTE *)&v3->m_kEquip.upgrade + 1) = 16 * ((int (*)(void))_pItem->vfptr[9].__vecDelDtor)() | *((_BYTE *)&v3->m_kEquip.upgrade + 1) & 0xF;
      goto LABEL_18;
    case 0x14u:
      CharShape::MultiSlotCosProcess(v3, v5);
      v3->m_kEquip.Equ_AccPant = v5->ID;
      CharShape::RemoveAllSubItem(v3, 0x13u);
      break;
    case 0x15u:
      if ( v3->m_barrRemoveShape[2] || v3->m_kEquip.Equ_AccBoot != -1 )
        v10 = 0;
      else
        CharShape::RemoveAllSubItem(v3, 0x16u);
      v3->m_kEquip.Equ_Boot = v5->ID;
      *((_BYTE *)&v3->m_kEquip.upgrade + 2) ^= (((int (*)(void))_pItem->vfptr[9].__vecDelDtor)() ^ *((_BYTE *)&v3->m_kEquip.upgrade + 2)) & 0xF;
LABEL_18:
      if ( v10 )
        break;
      return 1;
    case 0x16u:
      CharShape::MultiSlotCosProcess(v3, v5);
      v3->m_kEquip.Equ_AccBoot = v5->ID;
      CharShape::RemoveAllSubItem(v3, 0x15u);
      break;
    case 9u:
      v3->m_kEquip.Equ_AccBack = v5->ID;
      CharShape::RemoveAllSubItem(v3, 9u);
      break;
    case 0x12u:
      v3->m_kEquip.Equ_AccHip = v5->ID;
      CharShape::RemoveAllSubItem(v3, 0x12u);
      break;
    case 1u:
      v18 = v3->m_bGTIBomb == 0;
      v3->m_kEquip.Equ_Head = v5->ID;
      if ( !v18 || v3->m_kEquip.Equ_AccHeadA != -1 )
        return 1;
      CharShape::RemoveAllSubItem(v3, 0x1Bu);
      CharShape::Link(v3, 0, 0, 0x1Bu);
      v19 = ItemViewEquipTypeInfoTab::GetByIVET(pkViewInfo->IVET_Index);
      if ( v19 )
        CharShape::SetHairPartsVisible(v3, v19->HairVisibleState);
      break;
    case 0x1Bu:
      if ( v3->m_bGTIBomb )
        return 1;
      v3->m_kEquip.Equ_AccHeadA = v5->ID;
      CharShape::RemoveAllSubItem(v3, 0x1Bu);
      v20 = ItemViewEquipTypeInfoTab::GetByIVET(pkViewInfo->IVET_Index);
      if ( v20 )
        CharShape::SetHairPartsVisible(v3, v20->HairVisibleState);
      break;
    case 0x1Au:
      v18 = v3->m_bGTIBomb == 0;
      v3->m_kEquip.Equ_Eye = v5->ID;
      if ( !v18 )
        return 1;
      CharShape::RemoveAllSubItem(v3, 0x1Au);
      break;
    case 0x18u:
      v3->m_kEquip.Equ_Mouth = v5->ID;
      CharShape::RemoveAllSubItem(v3, 0x18u);
      break;
    case 0x19u:
      v3->m_kEquip.Equ_Minimon = v5->ID;
      CharShape::RemoveAllSubItem(v3, 0x19u);
      break;
    case 0x1Cu:
      v3->m_kEquip.Equ_MiniMon_R = v5->ID;
      CharShape::RemoveAllSubItem(v3, 0x1Cu);
      break;
    case 0x11u:
      v3->m_kEquip.Equ_CosEff = v5->ID;
      CharShape::RemoveAllSubItem(v3, 0x11u);
      break;
    case 0x1Du:
      v3->m_kEquip.Equ_AccShield = v5->ID;
LABEL_27:
      CharShape::RemoveAllSubItem(v3, 0xAu);
      ItemUpGrade::RemoveEffect(&v3->m_kItemUpGrade, 0xAu);
      break;
  }
  ItemUpGrade::RemoveEffect(&v3->m_kItemUpGrade, v5->Equip);
  v11 = pkViewInfo->EquipType;
  if ( v11 != 1 )
  {
    if ( v11 != 2 )
      goto LABEL_109;
    if ( v3->m_byGender == 1 )
      v26 = pkViewInfo->MSetNo;
    else
      v26 = pkViewInfo->FSetNo;
    v27 = CharResMgr::GetCharSet(&g_kCharResMgr, v3->m_kClassID, v3->m_byGender, v26);
    if ( v27 )
    {
      CharShape::EquipSubItem(v3, v5, pkViewInfo);
      v28 = CharResMgr::GetSetTexture(&g_kCharResMgr, v3->m_kClassID, v3->m_byGender, pkViewInfo->ID);
      CharShape::Equip_SetItem(v3, v5->Equip, v27, (NiTexture *)&v28->vfptr);
      goto LABEL_109;
    }
    return 0;
  }
  CharShape::EquipSubItem(v3, v5, pkViewInfo);
  switch ( v5->Equip )
  {
    case 1:
    case 9:
    case 0x12:
    case 0x18:
    case 0x1A:
    case 0x1B:
      v22 = CharResMgr::GetItem(&g_kCharResMgr, pkViewInfo->ID, v3->m_byGender);
      goto LABEL_76;
    case 0x11:
      v21 = 0;
      break;
    default:
      v22 = CharResMgr::GetItem(&g_kCharResMgr, pkViewInfo->ID, -1);
LABEL_76:
      v21 = v22;
      break;
  }
  CharShape::Equip_LinkItem(v3, v5, uiEquipPosa, v21, v5->TwoHand != 0);
  v23 = v5->WeaponType;
  if ( v23 == 17 || v23 == 18 )
  {
    if ( v5->UpLimit )
    {
      ItemUpGrade::UpGradeItem(&v3->m_kItemUpGrade, _pItem, v3->m_apkLinkNode[12], ITEMEQUIP_RIGHTHAND);
      ItemUpGrade::UpGradeItem(&v3->m_kItemUpGrade, _pItem, v3->m_apkLinkNode[11], ITEMEQUIP_LEFTHAND);
    }
  }
  else
  {
    ItemUpGrade::UpGradeItem(&v3->m_kItemUpGrade, _pItem, v21, v5->Equip);
  }
  v24 = v5->Equip;
  if ( v24 == 11 || v24 == 13 )
  {
    if ( (unsigned __int8)((int (*)(void))_pItem->vfptr[1].__vecDelDtor)() == 26 )
      CharShape::CreateWeaponCostumeEffect(v3, v5, v21);
  }
  else if ( v24 == 29 && (unsigned __int8)((int (*)(void))_pItem->vfptr[1].__vecDelDtor)() == 37 )
  {
    CharShape::CreateShieldCostumeEffect(v3, v5, v21);
  }
  if ( v5->Equip == 25 )
  {
    if ( v3->m_bAutoPickItem )
    {
      CharShape::SetMiniMonEffect(v3, (int)v5, 1);
    }
    else
    {
      if ( v3->m_hMiniMonAutoPickEff )
      {
        EffectMgr::RemoveEffect(&g_kEffectMgr, (Effect *)v3->m_hMiniMonAutoPickEff);
        v3->m_hMiniMonAutoPickEff = 0;
      }
      v3->m_bAutoPickItem = 0;
    }
    if ( v3->m_bAutoUseItem )
    {
      CharShape::SetMinimonAutoUseEff(v3, (int)v3, 1);
    }
    else
    {
      if ( v3->m_hMinimonAutoUseEff )
      {
        EffectMgr::RemoveEffect(&g_kEffectMgr, (Effect *)v3->m_hMinimonAutoUseEff);
        v3->m_hMinimonAutoUseEff = 0;
      }
      v3->m_bAutoUseItem = 0;
      if ( GameFrameWork::ms_bGameFrameStart )
      {
        v25 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
        if ( v25 )
          GameFrameWork::OpenPlayGuideWin(v25, BIL_ITEM_12);
      }
    }
  }
LABEL_109:
  if ( v3->m_kEquip.Equ_AccBack != -1 )
    CharShape::SetVisibleSubParts(v3, LINK_BACK, 0);
  if ( v3->m_kEquip.Equ_AccHip != -1 )
    CharShape::SetVisibleSubParts(v3, LINK_TAIL, 0);
  v29 = (NiAVObject *)&v3->m_pkRootNode->vfptr;
  if ( v29 )
  {
    NiAVObject::UpdateEffects(v29);
    NiAVObject::UpdateProperties((NiAVObject *)&v3->m_pkRootNode->vfptr);
  }
  return 1;
}
// 65F060: could not find valid save-restore pair for ebx
// A8C298: using guessed type int ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;
// A8CAFF: using guessed type bool GameFrameWork::ms_bGameFrameStart;

//----- (0065F8A0) --------------------------------------------------------
char __userpurge CharShape::Equip@<al>(CharShape *this@<ecx>, int a2@<ebx>, ItemInfo *pkItemInfo)
{
  CharShape *v3; // edi@1
  char result; // al@2
  Item *v5; // esi@3
  char v6; // bl@3
  SHINE_ITEM_STRUCT kItemStruct; // [sp+8h] [bp-6Ch]@3

  v3 = this;
  if ( pkItemInfo )
  {
    memset((char *)&kItemStruct, 0, 0x67u);
    kItemStruct.itemid = pkItemInfo->ID;
    v5 = Item::Create(&kItemStruct);
    v6 = CharShape::Equip(v3, a2, v5);
    if ( v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    result = v6;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0065F920) --------------------------------------------------------
void __usercall CharShape::ReEquipWeaponCostume(CharShape *this@<ecx>, int a2@<ebx>)
{
  CharShape *v2; // esi@1
  unsigned __int16 v3; // ax@1
  unsigned __int16 v4; // di@5
  Item *v5; // eax@6
  unsigned int v6; // [sp-4h] [bp-78h]@2
  SHINE_ITEM_STRUCT kItemStruct; // [sp+8h] [bp-6Ch]@6

  v2 = this;
  v3 = this->m_kEquip.Equ_AccLeftHand;
  if ( v3 == -1 )
  {
    v3 = this->m_kEquip.Equ_AccRightHand;
    if ( v3 == -1 )
      return;
    v6 = 13;
  }
  else
  {
    v6 = 11;
  }
  v4 = v3;
  CharShape::UnEquip(this, v6);
  if ( v4 != -1 )
  {
    memset((char *)&kItemStruct, 0, 0x67u);
    kItemStruct.itemid = v4;
    v5 = Item::Create(&kItemStruct);
    if ( v5 )
      CharShape::Equip(v2, a2, v5);
  }
}

//----- (0065F9B0) --------------------------------------------------------
char __thiscall CharShape::Equip(CharShape *this, int kItemID)
{
  int v2; // esi@1
  CharShape *v3; // ebx@1
  char result; // al@2
  int v5; // ecx@4

  v2 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  v3 = this;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                          ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                          kItemID)
    && (unsigned __int16)kItemID <= *(_WORD *)(v2 + 200)
    && (v5 = *(_DWORD *)(v2 + 196), *(_DWORD *)(v5 + 4 * (unsigned __int16)kItemID)) )
  {
    result = CharShape::Equip(v3, (int)v3, *(ItemInfo **)(v5 + 4 * (unsigned __int16)kItemID));
  }
  else
  {
    result = CharShape::Equip(v3, (int)v3, 0);
  }
  return result;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0065FA10) --------------------------------------------------------
bool __thiscall CharShape::UnEquip(CharShape *this, unsigned int uiEquipPos)
{
  int v2; // ebx@1
  CharShape *v3; // esi@1
  Effect *v4; // eax@1
  Effect **v5; // ecx@1
  Effect *v6; // ecx@1
  ItemViewInfo *v7; // eax@9
  char v8; // dl@9
  bool v9; // zf@11
  char v10; // al@12
  WeaponTypeEnum v11; // eax@16
  ItemInfo *v12; // eax@18
  char v13; // cl@21
  ItemViewInfo *v14; // eax@29
  char v15; // cl@29
  ItemViewInfo *v16; // eax@34
  char v17; // dl@34
  CharShape *v18; // ecx@49
  CharShape *v19; // ecx@51
  char v20; // al@51
  char v21; // cl@53
  char v22; // al@12
  bool v23; // zf@60
  int v24; // eax@61
  ItemInfo *pkInfo; // [sp+Ch] [bp-8h]@1
  ItemInfo *pkInfoa; // [sp+Ch] [bp-8h]@13
  Effect *v28; // [sp+10h] [bp-4h]@1

  v2 = uiEquipPos;
  v3 = this;
  CharShape::RemoveAllSubItem(this, uiEquipPos);
  v4 = (Effect *)v3->m_kItemUpGrade.m_arrLinkData[uiEquipPos].dwEffectIndex[0];
  v5 = (Effect **)&v3->m_kItemUpGrade.m_arrLinkData[uiEquipPos].dwEffectIndex[1];
  pkInfo = (ItemInfo *)v5;
  v6 = *v5;
  v28 = v6;
  if ( v4 )
  {
    EffectMgr::RemoveEffect(&g_kEffectMgr, v4);
    v6 = v28;
  }
  if ( v6 )
    EffectMgr::RemoveEffect(&g_kEffectMgr, v6);
  *(_DWORD *)&pkInfo->ID = 0;
  v3->m_kItemUpGrade.m_arrLinkData[uiEquipPos].dwEffectIndex[0] = 0;
  LOBYTE(v2) = 0;
  switch ( uiEquipPos )
  {
    case 7u:
      v9 = v3->m_barrRemoveShape[0] == 0;
      v3->m_kEquip.Equ_Body = -1;
      if ( v9 && -1 == v3->m_kEquip.Equ_AccBody )
        CharShape::ResetBody(v3);
      goto LABEL_57;
    case 8u:
      v7 = IIDTableBase<ItemViewInfo,ItemViewInfoTab,unsigned short>::GetByID(v3->m_kEquip.Equ_AccBody);
      CharShape::MultiSlotCosUnEquip(v3, v7);
      v8 = *((_BYTE *)&v3->m_kEquip.upgrade + 1) & 0xF;
      v3->m_kEquip.Equ_AccBody = -1;
      if ( !CharShape::Equip(v3, v3->m_kEquip.Equ_Body, v8) )
        CharShape::ResetBody(v3);
      goto LABEL_57;
    case 0xAu:
      v9 = -1 == v3->m_kEquip.Equ_AccLeftHand;
      v3->m_kEquip.Equ_LeftHand = -1;
      goto LABEL_55;
    case 0xBu:
      v10 = *(_BYTE *)&v3->m_kEquip.upgrade & 0xF;
      v3->m_kEquip.Equ_AccLeftHand = -1;
      v22 = CharShape::Equip(v3, v3->m_kEquip.Equ_LeftHand, v10);
      goto LABEL_54;
    case 0xCu:
      pkInfoa = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(v3->m_kEquip.Equ_RightHand);
      v3->m_kEquip.Equ_RightHand = -1;
      if ( -1 == v3->m_kEquip.Equ_AccRightHand )
        CharShape::Link(v3, LINK_RIGHTHAND, 0, 0xCu);
      LOBYTE(v2) = 1;
      if ( pkInfoa )
      {
        v11 = pkInfoa->WeaponType;
        if ( v11 == 18 || v11 == 17 )
        {
          v12 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(v3->m_kEquip.Equ_AccRightHand);
          if ( !v12 || v12->Class != 26 )
          {
            v3->m_kEquip.Equ_LeftHand = -1;
            CharShape::Link(v3, LINK_LEFTHAND, 0, 0xAu);
            ItemUpGrade::SetEffectHandle(&v3->m_kItemUpGrade, 0xAu, 0, 0);
          }
        }
      }
      break;
    case 0xDu:
      v2 = (int)IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(v3->m_kEquip.Equ_AccRightHand);
      v13 = *(_BYTE *)&v3->m_kEquip.upgrade >> 4;
      v3->m_kEquip.Equ_AccRightHand = -1;
      if ( !CharShape::Equip(v3, v3->m_kEquip.Equ_RightHand, v13) )
      {
        CharShape::Link(v3, LINK_RIGHTHAND, 0, 0xCu);
        if ( v2 )
        {
          v2 = *(_DWORD *)(v2 + 232);
          if ( v2 == 18 || v2 == 17 )
          {
            CharShape::Link(v3, LINK_LEFTHAND, 0, 0xAu);
            ItemUpGrade::SetEffectHandle(&v3->m_kItemUpGrade, 0xAu, 0, 0);
          }
        }
      }
      goto LABEL_57;
    case 0x13u:
      v9 = v3->m_barrRemoveShape[1] == 0;
      v3->m_kEquip.Equ_Pant = -1;
      if ( v9 && -1 == v3->m_kEquip.Equ_AccPant )
        CharShape::ResetLeg(v3);
      goto LABEL_57;
    case 0x14u:
      v14 = IIDTableBase<ItemViewInfo,ItemViewInfoTab,unsigned short>::GetByID(v3->m_kEquip.Equ_AccPant);
      CharShape::MultiSlotCosUnEquip(v3, v14);
      v15 = *((_BYTE *)&v3->m_kEquip.upgrade + 1) >> 4;
      v3->m_kEquip.Equ_AccPant = -1;
      if ( !CharShape::Equip(v3, v3->m_kEquip.Equ_Pant, v15) )
        CharShape::ResetLeg(v3);
      goto LABEL_57;
    case 0x15u:
      v9 = v3->m_barrRemoveShape[2] == 0;
      v3->m_kEquip.Equ_Boot = -1;
      if ( v9 && -1 == v3->m_kEquip.Equ_AccBoot )
        CharShape::ResetShoes(v3);
      goto LABEL_57;
    case 0x16u:
      v16 = IIDTableBase<ItemViewInfo,ItemViewInfoTab,unsigned short>::GetByID(v3->m_kEquip.Equ_AccBoot);
      CharShape::MultiSlotCosUnEquip(v3, v16);
      v17 = *((_BYTE *)&v3->m_kEquip.upgrade + 2) & 0xF;
      v3->m_kEquip.Equ_AccBoot = -1;
      if ( !CharShape::Equip(v3, v3->m_kEquip.Equ_Boot, v17) )
        CharShape::ResetShoes(v3);
      goto LABEL_57;
    case 9u:
      v3->m_kEquip.Equ_AccBack = -1;
      LOBYTE(v2) = CharShape::Link(v3, LINK_BACK, 0, 9u);
      CharShape::SetVisibleSubParts(v3, LINK_BACK, 1);
      break;
    case 0x12u:
      v3->m_kEquip.Equ_AccHip = -1;
      LOBYTE(v2) = CharShape::Link(v3, LINK_TAIL, 0, 0x12u);
      CharShape::SetVisibleSubParts(v3, LINK_TAIL, 1);
      break;
    case 0x1Au:
      v3->m_kEquip.Equ_Eye = -1;
      LOBYTE(v2) = CharShape::Link(v3, LINK_EYE, 0, 0x1Au);
      break;
    case 0x18u:
      v3->m_kEquip.Equ_Mouth = -1;
      LOBYTE(v2) = CharShape::Link(v3, LINK_MOUTH, 0, 0x18u);
      break;
    case 0x19u:
      v3->m_kEquip.Equ_Minimon = -1;
      LOBYTE(v2) = CharShape::Link(v3, LINK_CHEST, 0, 0x19u);
      if ( v3->m_hMiniMonAutoPickEff )
      {
        EffectMgr::RemoveEffect(&g_kEffectMgr, (Effect *)v3->m_hMiniMonAutoPickEff);
        v3->m_hMiniMonAutoPickEff = 0;
        CharShape::RemoveMinimonEff(v3, 0x19u, 0);
      }
      if ( v3->m_hMinimonAutoUseEff )
      {
        EffectMgr::RemoveEffect(&g_kEffectMgr, (Effect *)v3->m_hMinimonAutoUseEff);
        v3->m_hMinimonAutoUseEff = 0;
        CharShape::RemoveMinimonEff(v3, 0x19u, 0);
      }
      break;
    case 0x1Cu:
      v3->m_kEquip.Equ_MiniMon_R = -1;
      LOBYTE(v2) = CharShape::Link(v3, LINK_CHEST_R, 0, 0x1Cu);
      if ( v3->m_hMiniMonAutoPickEff )
      {
        EffectMgr::RemoveEffect(&g_kEffectMgr, (Effect *)v3->m_hMiniMonAutoPickEff);
        v3->m_hMiniMonAutoPickEff = 0;
        CharShape::RemoveMinimonEff(v3, 0x1Cu, 0);
      }
      if ( v3->m_hMinimonAutoUseEff )
      {
        EffectMgr::RemoveEffect(&g_kEffectMgr, (Effect *)v3->m_hMinimonAutoUseEff);
        v3->m_hMinimonAutoUseEff = 0;
        CharShape::RemoveMinimonEff(v3, 0x1Cu, 0);
      }
      break;
    case 1u:
      v3->m_kEquip.Equ_Head = -1;
      if ( v3->m_kEquip.Equ_AccHeadA == -1 )
      {
        CharShape::SetHairPartsVisible(v3, 1);
        LOBYTE(v2) = CharShape::Link(v18, 0, 0, 1u);
      }
      CharShape::SetVisibleSubParts(v3, 0, 1);
      break;
    case 0x1Bu:
      CharShape::SetHairPartsVisible(v3, 1);
      v20 = CharShape::Link(v19, 0, 0, 0x1Bu);
      v3->m_kEquip.Equ_AccHeadA = -1;
      LOBYTE(v2) = v20;
      CharShape::SetVisibleSubParts(v3, 0, 1);
      CharShape::Equip(v3, v3->m_kEquip.Equ_Head);
      break;
    case 0x11u:
      v3->m_kEquip.Equ_CosEff = -1;
      LOBYTE(v2) = CharShape::Link(v3, LINK_WORLD_COS, 0, 0x11u);
      break;
    case 0x1Du:
      IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(v3->m_kEquip.Equ_AccShield);
      v21 = *(_BYTE *)&v3->m_kEquip.upgrade & 0xF;
      v3->m_kEquip.Equ_AccShield = -1;
      v22 = CharShape::Equip(v3, v3->m_kEquip.Equ_LeftHand, v21);
LABEL_54:
      v9 = v22 == 0;
LABEL_55:
      if ( v9 )
        CharShape::Link(v3, LINK_LEFTHAND, 0, 0xAu);
LABEL_57:
      LOBYTE(v2) = 1;
      break;
    default:
      break;
  }
  if ( uiEquipPos != 10 )
  {
    if ( uiEquipPos != 12 )
    {
      v23 = uiEquipPos == 29;
      goto LABEL_63;
    }
LABEL_65:
    CharShape::ReEquipWeaponCostume(v3, v2);
    return v2;
  }
  v24 = v3->m_kEquip.Equ_AccShield;
  if ( (_WORD)v24 == -1 )
    goto LABEL_65;
  v23 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(v24)->Equip == 29;
LABEL_63:
  if ( v23 )
  {
    CharShape::ReEquipShieldCostume(v3);
    return v2;
  }
  return v2;
}

//----- (006600C0) --------------------------------------------------------
void __thiscall CharShape::ReEquipShieldCostume(CharShape *this)
{
  CharShape *v1; // esi@1
  int v2; // ebx@2
  Effect *v3; // edi@2
  char v4; // dl@6
  Item *v5; // eax@9
  SHINE_ITEM_STRUCT kItemStruct; // [sp+4h] [bp-6Ch]@9

  v1 = this;
  if ( this->m_kEquip.Equ_AccShield != -1 )
  {
    v2 = this->m_kEquip.Equ_AccShield;
    CharShape::RemoveAllSubItem(this, 0x1Du);
    v3 = (Effect *)v1->m_kItemUpGrade.m_arrLinkData[29].dwEffectIndex[1];
    if ( v1->m_kItemUpGrade.m_arrLinkData[29].dwEffectIndex[0] )
      EffectMgr::RemoveEffect(&g_kEffectMgr, (Effect *)v1->m_kItemUpGrade.m_arrLinkData[29].dwEffectIndex[0]);
    if ( v3 )
      EffectMgr::RemoveEffect(&g_kEffectMgr, v3);
    v1->m_kItemUpGrade.m_arrLinkData[29].dwEffectIndex[0] = 0;
    v1->m_kItemUpGrade.m_arrLinkData[29].dwEffectIndex[1] = 0;
    IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(v1->m_kEquip.Equ_AccShield);
    v4 = *(_BYTE *)&v1->m_kEquip.upgrade & 0xF;
    v1->m_kEquip.Equ_AccShield = -1;
    if ( !CharShape::Equip(v1, v1->m_kEquip.Equ_LeftHand, v4) )
      CharShape::Link(v1, LINK_LEFTHAND, 0, 0xAu);
    CharShape::ReEquipShieldCostume(v1);
    if ( (_WORD)v2 != -1 )
    {
      memset((char *)&kItemStruct, 0, 0x67u);
      kItemStruct.itemid = v2;
      v5 = Item::Create(&kItemStruct);
      if ( v5 )
        CharShape::Equip(v1, v2, v5);
    }
  }
}

//----- (006601D0) --------------------------------------------------------
void __thiscall CharShape::RestoreHatAcc(CharShape *this)
{
  CharShape *v1; // ebx@1
  int v2; // eax@1
  int v3; // esi@2
  int v4; // edi@2
  ItemInfo *v5; // eax@3
  int v6; // edx@6
  int v7; // esi@11
  int v8; // edi@11
  int v9; // edx@14

  v1 = this;
  v2 = this->m_kEquip.Equ_Head;
  if ( (_WORD)v2 != -1 )
  {
    v3 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    v4 = this->m_kEquip.Equ_Head;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v2) )
    {
      if ( (unsigned __int16)v4 <= *(_WORD *)(v3 + 200) )
      {
        v6 = *(_DWORD *)(v3 + 196);
        if ( *(_DWORD *)(v6 + 4 * v4) )
          v5 = *(ItemInfo **)(v6 + 4 * v4);
        else
          v5 = 0;
      }
      else
      {
        v5 = 0;
      }
    }
    else
    {
      v5 = 0;
    }
    CharShape::Equip(v1, (int)v1, v5);
  }
  if ( v1->m_kEquip.Equ_Eye != -1 )
  {
    v7 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    v8 = v1->m_kEquip.Equ_Eye;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v8)
      && (unsigned __int16)v8 <= *(_WORD *)(v7 + 200)
      && (v9 = *(_DWORD *)(v7 + 196), *(_DWORD *)(v9 + 4 * v8)) )
    {
      CharShape::Equip(v1, (int)v1, *(ItemInfo **)(v9 + 4 * v8));
    }
    else
    {
      CharShape::Equip(v1, (int)v1, 0);
    }
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (00660290) --------------------------------------------------------
void __thiscall ItemUpGrade::RemoveAll(ItemUpGrade *this)
{
  ItemUpGrade *v1; // edi@1
  signed int v2; // esi@1
  Effect *v3; // ebx@2

  v1 = this;
  v2 = 0;
  do
  {
    v3 = (Effect *)v1->m_arrLinkData[v2].dwEffectIndex[1];
    if ( v1->m_arrLinkData[v2].dwEffectIndex[0] )
      EffectMgr::RemoveEffect(&g_kEffectMgr, (Effect *)v1->m_arrLinkData[v2].dwEffectIndex[0]);
    if ( v3 )
      EffectMgr::RemoveEffect(&g_kEffectMgr, v3);
    v1->m_arrLinkData[v2].dwEffectIndex[0] = 0;
    v1->m_arrLinkData[v2++].dwEffectIndex[1] = 0;
  }
  while ( v2 < 30 );
}

//----- (006602F0) --------------------------------------------------------
char __cdecl Math3D::FrontVectToRot(NiPoint3 *kFrontVect, NiMatrix3 *kRot)
{
  float v2; // edx@1
  float v3; // eax@1
  char v4; // al@2
  NiPoint3 *v5; // eax@4
  float v6; // ecx@4
  float v7; // edx@4
  NiPoint3 *v8; // eax@4
  float v9; // ecx@4
  float v10; // edx@4
  NiPoint3 result; // [sp+0h] [bp-30h]@4
  NiPoint3 kUp; // [sp+Ch] [bp-24h]@4
  NiPoint3 kRight; // [sp+18h] [bp-18h]@4
  NiPoint3 kFront; // [sp+24h] [bp-Ch]@1
  NiPoint3 *kFrontVecta; // [sp+38h] [bp+8h]@1
  NiPoint3 *kFrontVectb; // [sp+38h] [bp+8h]@1
  NiPoint3 *kFrontVectc; // [sp+38h] [bp+8h]@3
  NiPoint3 *kFrontVectd; // [sp+38h] [bp+8h]@3

  v2 = kFrontVect->y;
  v3 = kFrontVect->z;
  kFront.x = kFrontVect->x;
  kFront.y = v2;
  kFront.z = v3;
  NiPoint3::Unitize(&kFront);
  *(float *)&kFrontVecta = kFront.x * kFront.x + kFront.y * kFront.y + kFront.z * kFront.z;
  *(float *)&kFrontVectb = sqrt(*(float *)&kFrontVecta);
  if ( *(float *)&kFrontVectb < 0.000001
    || (*(float *)&kFrontVectc = World::ms_kUpDir.x * kFront.x
                               + World::ms_kUpDir.y * kFront.y
                               + World::ms_kUpDir.z * kFront.z,
        *(float *)&kFrontVectd = fabs(*(float *)&kFrontVectc),
        1.0 - *(float *)&kFrontVectd < 0.0000009999999974752427) )
  {
    v4 = 0;
  }
  else
  {
    v5 = NiPoint3::UnitCross(&kFront, &kUp, &World::ms_kUpDir);
    v6 = v5->y;
    kRight.x = v5->x;
    v7 = v5->z;
    kRight.y = v6;
    kRight.z = v7;
    v8 = NiPoint3::UnitCross(&kRight, &result, &kFront);
    v9 = v8->y;
    kUp.x = v8->x;
    v10 = v8->z;
    kRot->m_pEntry[0][0] = kRight.x;
    kUp.y = v9;
    kUp.z = v10;
    kRot->m_pEntry[1][0] = kRight.y;
    kRot->m_pEntry[2][0] = kRight.z;
    kRot->m_pEntry[0][1] = kFront.x;
    kRot->m_pEntry[1][1] = kFront.y;
    kRot->m_pEntry[2][1] = kFront.z;
    kRot->m_pEntry[0][2] = kUp.x;
    kRot->m_pEntry[1][2] = kUp.y;
    kRot->m_pEntry[2][2] = kUp.z;
    v4 = 1;
  }
  return v4;
}

//----- (00660410) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::~NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>(NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::`vftable';
}
// 9BA240: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::`vftable')(void *p, char);

//----- (00660420) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BA240: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::`vftable')(void *p, char);

//----- (00660450) --------------------------------------------------------
void __thiscall NiSkinInstance::NiSkinInstance(NiSkinInstance *this, NiSkinData *pkSkinData, NiAVObject *pkRootParent, NiAVObject **ppkBones)
{
  NiSkinInstance *v4; // esi@1

  v4 = this;
  NiObject::NiObject((NiObject *)&this->vfptr);
  v4->vfptr = (NiRefObjectVtbl *)&NiSkinInstance::`vftable';
  v4->m_spSkinData.m_pObject = pkSkinData;
  if ( pkSkinData )
    InterlockedIncrement((volatile LONG *)&pkSkinData->m_uiRefCount);
  v4->m_spSkinPartition.m_pObject = 0;
  v4->m_uiNumMatrices = 0;
  v4->m_pvBoneMatrices = 0;
  v4->m_uiNumRegisters = 0;
  v4->m_pvSkinToWorldWorldToSkinMatrix = 0;
  v4->m_pkRootParent = pkRootParent;
  v4->m_ppkBones = ppkBones;
  v4->m_uiFrameID = -1;
}
// 9BA27C: using guessed type int (__thiscall *NiSkinInstance::`vftable')(void *p, char);

//----- (006604B0) --------------------------------------------------------
NiRTTI *NiSkinInstance::GetRTTI()
{
  return &NiSkinInstance::m_RTTI;
}

//----- (006604C0) --------------------------------------------------------
NiSkinInstance *__thiscall NiSkinInstance::`vector deleting destructor'(NiSkinInstance *this, unsigned int a2)
{
  NiSkinInstance *v2; // esi@1

  v2 = this;
  NiSkinInstance::~NiSkinInstance(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006604F0) --------------------------------------------------------
void __thiscall RewardInvItem::SetItem(NiObjectNET *this, NiTimeController *pkControl)
{
  NiObjectNET *v2; // ebx@1
  NiTimeController *v3; // esi@1

  v2 = this;
  v3 = this->m_spControllers.m_pObject;
  if ( v3 != pkControl )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spControllers.m_pObject = pkControl;
    if ( pkControl )
      InterlockedIncrement((volatile LONG *)&pkControl->m_uiRefCount);
  }
}

//----- (00660540) --------------------------------------------------------
unsigned int __thiscall NiBoneLODController::GetSetAt(NiBoneLODController *this, int nInLodLevel, NiTriBasedGeom *pkInGeom, NiSkinInstance **pkOutSkinInst)
{
  NiTSet<NiBoneLODController::SkinInfo *> *v4; // ecx@1
  unsigned int v5; // edx@1
  unsigned int result; // eax@1
  NiBoneLODController::SkinInfo **v7; // ecx@2

  v4 = this->m_kSkinArray.m_pBase[nInLodLevel];
  v5 = v4->m_uiUsed;
  result = 0;
  if ( v5 )
  {
    v7 = v4->m_pBase;
    while ( (*v7)->m_pkSkinGeom != pkInGeom )
    {
      ++result;
      ++v7;
      if ( result >= v5 )
        goto LABEL_5;
    }
    *pkOutSkinInst = (*v7)->m_spSkinInst.m_pObject;
  }
  else
  {
LABEL_5:
    *pkOutSkinInst = 0;
    result = 0;
  }
  return result;
}

//----- (00660590) --------------------------------------------------------
char __thiscall NiBoneLODController::SetAt(NiBoneLODController *this, int nLodLevel, int nIndex, NiTriBasedGeom *pkGeom, NiSkinInstance *pkSkinInst)
{
  NiTSet<NiBoneLODController::SkinInfo *> *v5; // eax@1
  char result; // al@2
  NiBoneLODController::SkinInfo *v7; // edi@3
  NiSkinInstance *v8; // esi@5

  v5 = this->m_kSkinArray.m_pBase[nLodLevel];
  if ( v5 )
  {
    v7 = v5->m_pBase[nIndex];
    if ( v7 )
    {
      v7->m_pkSkinGeom = pkGeom;
      v8 = v7->m_spSkinInst.m_pObject;
      if ( v8 != pkSkinInst )
      {
        if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
        v7->m_spSkinInst.m_pObject = pkSkinInst;
        if ( pkSkinInst )
          InterlockedIncrement((volatile LONG *)&pkSkinInst->m_uiRefCount);
      }
      result = 1;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00660610) --------------------------------------------------------
void __thiscall NiBoneLODController::ReplaceSkinSet(NiBoneLODController *this, NiTriBasedGeom *pkOldSkin, NiTriBasedGeom *pkNewSkin)
{
  unsigned int v3; // eax@1
  NiTriBasedGeom **v4; // edx@2
  bool v5; // zf@2
  NiTriBasedGeom **v6; // edx@2

  v3 = 0;
  if ( this->m_kSkinSet.m_uiUsed )
  {
    do
    {
      v4 = this->m_kSkinSet.m_pBase;
      v5 = v4[v3] == pkOldSkin;
      v6 = &v4[v3];
      if ( v5 && v3 < this->m_kSkinSet.m_uiUsed )
        *v6 = pkNewSkin;
      ++v3;
    }
    while ( v3 < this->m_kSkinSet.m_uiUsed );
  }
}

//----- (00660640) --------------------------------------------------------
void __cdecl std::_Distance2<std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<enum  ItemEquipEnum,NiNode *,std::less<enum  ItemEquipEnum>,std::allocator<std::pair<enum  ItemEquipEnum const,NiNode *>>,1>>>,unsigned int>(std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > > _Last, unsigned int *_Off)
{
  std::_Tree_nod<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> >::_Node *v3; // ecx@1
  unsigned int v4; // edx@2
  std::_Tree_nod<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> >::_Node *v5; // eax@4
  std::_Tree_nod<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> >::_Node *j; // eax@5
  std::_Tree_nod<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> >::_Node *i; // eax@8

  v3 = _First._Ptr;
  if ( _First._Ptr != _Last._Ptr )
  {
    v4 = *_Off;
    do
    {
      *_Off = ++v4;
      if ( !v3->_Isnil )
      {
        v5 = v3->_Right;
        if ( v5->_Isnil )
        {
          for ( i = v3->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v3 != i->_Right )
              break;
            v3 = i;
          }
          v3 = i;
        }
        else
        {
          v3 = v3->_Right;
          for ( j = v5->_Left; !j->_Isnil; j = j->_Left )
            v3 = j;
        }
      }
    }
    while ( v3 != _Last._Ptr );
  }
}

//----- (006606B0) --------------------------------------------------------
void __thiscall NiGeometry::SetSkinInstance(NiGeometry *this, NiSkinInstance *pSkinInstance)
{
  NiGeometry *v2; // ebx@1
  NiSkinInstance *v3; // esi@1

  v2 = this;
  v3 = this->m_spSkinInstance.m_pObject;
  if ( v3 != pSkinInstance )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spSkinInstance.m_pObject = pSkinInstance;
    if ( pSkinInstance )
      InterlockedIncrement((volatile LONG *)&pSkinInstance->m_uiRefCount);
  }
}

//----- (00660700) --------------------------------------------------------
void __thiscall AfterImgEff::SetActor(AfterImgEff *this, NiActorManager *_pActor)
{
  AfterImgEff *v2; // ebx@1
  NiActorManager *v3; // esi@1

  v2 = this;
  v3 = this->m_spActor.m_pObject;
  if ( v3 != _pActor )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spActor.m_pObject = _pActor;
    if ( _pActor )
      InterlockedIncrement((volatile LONG *)&_pActor->m_uiRefCount);
  }
}

//----- (00660750) --------------------------------------------------------
ItemInfo *__thiscall CharShape::GetEquippedCosWeaponItemInfo(CharShape *this)
{
  int v1; // esi@1
  int v2; // edi@1
  ItemInfo *result; // eax@2
  int v4; // ecx@4

  v1 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  v2 = this->m_kEquip.Equ_AccRightHand;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                          ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                          v2)
    && (unsigned __int16)v2 <= *(_WORD *)(v1 + 200)
    && (v4 = *(_DWORD *)(v1 + 196), *(_DWORD *)(v4 + 4 * v2)) )
  {
    result = *(ItemInfo **)(v4 + 4 * v2);
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (006607A0) --------------------------------------------------------
char __thiscall CharShape::LinkFace(CharShape *this, NiNode *pkNode)
{
  CharShape *v2; // edi@1
  NiNode *v3; // esi@2
  char result; // al@9

  v2 = this;
  if ( CharShape::Link(this, LINK_FACE, pkNode, 0) == 1 )
  {
    v3 = v2->m_spFaceNode.m_pObject;
    if ( v3 != pkNode )
    {
      if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      v2->m_spFaceNode.m_pObject = pkNode;
      if ( pkNode )
        InterlockedIncrement((volatile LONG *)&pkNode->m_uiRefCount);
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00660810) --------------------------------------------------------
void __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::~NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>(NiTPointerList<NiGeometry *> *this)
{
  NiTPointerList<NiGeometry *> *v1; // edi@1
  NiTListItem<NiGeometry *> *v2; // esi@1
  NiTListItem<NiGeometry *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::`vftable';
}
// 9BA240: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::`vftable')(void *p, char);
// 9BA26C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::`vftable')(void *p, char);

//----- (00660890) --------------------------------------------------------
NiTPointerList<NiGeometry *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::`scalar deleting destructor'(NiTPointerList<NiGeometry *> *this, unsigned int a2)
{
  NiTPointerList<NiGeometry *> *v2; // edi@1
  NiTListItem<NiGeometry *> *v3; // esi@1
  NiTListItem<NiGeometry *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BA240: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::`vftable')(void *p, char);
// 9BA26C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::`vftable')(void *p, char);

//----- (00660920) --------------------------------------------------------
void __thiscall PgTList<NiGeometry *>::~PgTList<NiGeometry *>(PgTList<NiGeometry *> *this)
{
  PgTList<NiGeometry *> *v1; // edi@1
  NiTListItem<NiGeometry *> *v2; // esi@1
  NiTListItem<NiGeometry *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>Vtbl *)&PgTList<NiGeometry *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::`vftable';
}
// 9BA240: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::`vftable')(void *p, char);
// 9BA2CC: using guessed type int (__thiscall *PgTList<NiGeometry *>::`vftable')(void *p, char);

//----- (006609A0) --------------------------------------------------------
ItemViewEquipTypeInfo *__cdecl ItemViewEquipTypeInfoTab::GetByIVET(IVEType eType)
{
  return (ItemViewEquipTypeInfo *)CDataReader::GetRecord(
                                    (CDataReader *)(ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::ms_pkTable
                                                  + 4),
                                    eType);
}
// A8C13C: using guessed type int ITableBase<ItemViewEquipTypeInfo,ItemViewEquipTypeInfoTab>::ms_pkTable;

//----- (006609C0) --------------------------------------------------------
UpEffectData *__cdecl UpEffectTab::GetObjByID(unsigned __int16 ID)
{
  int v1; // eax@1
  unsigned int v2; // edi@2
  unsigned int v3; // esi@4
  UpEffectData *result; // eax@7

  v1 = *(_DWORD *)(ITableBase<UpEffectData,UpEffectTab>::ms_pkTable + 56);
  if ( v1 )
    v2 = *(_DWORD *)(v1 + 40);
  else
    v2 = 0;
  v3 = 0;
  if ( v2 )
  {
    while ( *(_WORD *)CDataReader::GetRecord((CDataReader *)(ITableBase<UpEffectData,UpEffectTab>::ms_pkTable + 4), v3) != ID )
    {
      if ( ++v3 >= v2 )
        goto LABEL_7;
    }
    result = (UpEffectData *)CDataReader::GetRecord(
                               (CDataReader *)(ITableBase<UpEffectData,UpEffectTab>::ms_pkTable + 4),
                               v3);
  }
  else
  {
LABEL_7:
    result = 0;
  }
  return result;
}
// A8C160: using guessed type int ITableBase<UpEffectData,UpEffectTab>::ms_pkTable;

//----- (00660A20) --------------------------------------------------------
PgTList<NiGeometry *> *__thiscall PgTList<NiGeometry *>::`vector deleting destructor'(PgTList<NiGeometry *> *this, unsigned int a2)
{
  PgTList<NiGeometry *> *v2; // edi@1
  NiTListItem<NiGeometry *> *v3; // esi@1
  NiTListItem<NiGeometry *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>Vtbl *)&PgTList<NiGeometry *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BA240: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>::`vftable')(void *p, char);
// 9BA2CC: using guessed type int (__thiscall *PgTList<NiGeometry *>::`vftable')(void *p, char);

//----- (00660AB0) --------------------------------------------------------
std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > >,std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > > > *__thiscall std::_Tree<std::_Tmap_traits<enum  ItemEquipEnum,NiNode *,std::less<enum  ItemEquipEnum>,std::allocator<std::pair<enum  ItemEquipEnum const,NiNode *>>,1>>::_Eqrange(std::_Tree<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > *this, std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > >,std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > > > *result, ItemEquipEnum *_Keyval)
{
  std::_Tree_nod<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> >::_Node *v3; // edx@1
  std::_Tree_nod<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> >::_Node *v4; // eax@1
  std::_Tree_nod<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> >::_Node *v5; // ebx@1
  ItemEquipEnum v6; // edi@2
  ItemEquipEnum v7; // esi@3
  std::_Tree_nod<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> >::_Node *v8; // eax@11
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > >,std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > > > *v9; // eax@18

  v3 = this->_Myhead;
  v4 = v3->_Parent;
  v5 = this->_Myhead;
  if ( !v4->_Isnil )
  {
    v6 = *_Keyval;
    do
    {
      v7 = v4->_Myval.first;
      if ( v7 >= v6 )
      {
        if ( v3->_Isnil && v6 < v7 )
          v3 = v4;
        v5 = v4;
        v4 = v4->_Left;
      }
      else
      {
        v4 = v4->_Right;
      }
    }
    while ( !v4->_Isnil );
  }
  if ( v3->_Isnil )
    v8 = this->_Myhead->_Parent;
  else
    v8 = v3->_Left;
  while ( !v8->_Isnil )
  {
    if ( *_Keyval >= v8->_Myval.first )
    {
      v8 = v8->_Right;
    }
    else
    {
      v3 = v8;
      v8 = v8->_Left;
    }
  }
  v9 = result;
  result->first._Ptr = v5;
  result->second._Ptr = v3;
  return v9;
}

//----- (00660B40) --------------------------------------------------------
void __thiscall std::list<enum  ABSTATEINDEX,std::allocator<enum  ABSTATEINDEX>>::list<enum  ABSTATEINDEX,std::allocator<enum  ABSTATEINDEX>>(std::list<enum ABSTATEINDEX,std::allocator<enum ABSTATEINDEX> > *this)
{
  std::list<enum ABSTATEINDEX,std::allocator<enum ABSTATEINDEX> > *v1; // esi@1
  std::_List_nod<enum ABSTATEINDEX,std::allocator<enum ABSTATEINDEX> >::_Node *v2; // eax@1
  std::exception pExceptionObject; // [sp+4h] [bp-10h]@3
  char *_What; // [sp+10h] [bp-4h]@3

  v1 = this;
  this->_Mysize = 0;
  v2 = (std::_List_nod<enum ABSTATEINDEX,std::allocator<enum ABSTATEINDEX> >::_Node *)operator new(0xCu);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->_Myhead = v2;
  v2->_Next = v2;
  v1->_Myhead->_Prev = v1->_Myhead;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00660BA0) --------------------------------------------------------
void __thiscall std::list<NiAVObject *,std::allocator<NiAVObject *>>::pop_front(std::list<NiAVObject *,std::allocator<NiAVObject *> > *this)
{
  std::list<NiAVObject *,std::allocator<NiAVObject *> > *v1; // esi@1
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v2; // ecx@1
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v3; // eax@1

  v1 = this;
  v2 = this->_Myhead;
  v3 = v2->_Next;
  if ( v2->_Next != v2 )
  {
    v3->_Prev->_Next = v3->_Next;
    v3->_Next->_Prev = v3->_Prev;
    operator delete(v3);
    --v1->_Mysize;
  }
}

//----- (00660BD0) --------------------------------------------------------
signed int __stdcall FindHairNode::ProcessData(NiAVObject *_pkObject, void *_pData)
{
  _DWORD *v3; // esi@2
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v4; // edi@2
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v5; // eax@2
  int v6; // ecx@2
  signed int result; // eax@4

  if ( NsUtil::MatchTag((NiObjectNET *)&_pkObject->vfptr, "#Hair") )
  {
    v3 = _pData;
    v4 = *(std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node **)_pData;
    v5 = std::_List_val<char *,std::allocator<char *>>::_Buynode(
           *(std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node **)_pData,
           *(std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node **)(*(_DWORD *)_pData + 4),
           (ItemViewDummy *const *)&_pkObject);
    v6 = v3[1];
    if ( (unsigned int)(1073741822 - v6) < 1 )
      std::_Xlength_error("list<T> too long");
    v3[1] = v6 + 1;
    v4->_Prev = v5;
    v5->_Prev->_Next = v5;
    result = -1;
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (00660C40) --------------------------------------------------------
signed int __stdcall FindFaceNode::ProcessData(NiAVObject *_pkObject, void *_pData)
{
  _DWORD *v3; // esi@2
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v4; // edi@2
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v5; // eax@2
  int v6; // ecx@2
  signed int result; // eax@4

  if ( NsUtil::MatchTag((NiObjectNET *)&_pkObject->vfptr, "#Face") )
  {
    v3 = _pData;
    v4 = *(std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node **)_pData;
    v5 = std::_List_val<char *,std::allocator<char *>>::_Buynode(
           *(std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node **)_pData,
           *(std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node **)(*(_DWORD *)_pData + 4),
           (ItemViewDummy *const *)&_pkObject);
    v6 = v3[1];
    if ( (unsigned int)(1073741822 - v6) < 1 )
      std::_Xlength_error("list<T> too long");
    v3[1] = v6 + 1;
    v4->_Prev = v5;
    v5->_Prev->_Next = v5;
    result = -1;
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (00660CB0) --------------------------------------------------------
signed int __stdcall FindGeometry::ProcessData(NiAVObject *_pkObject, void *_pData)
{
  NiRTTI *v3; // eax@2
  signed int result; // eax@5
  _DWORD *v5; // esi@6
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v6; // edi@6
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v7; // eax@6
  int v8; // ecx@6

  if ( _pkObject && (v3 = (NiRTTI *)((int (*)(void))_pkObject->vfptr[1].__vecDelDtor)()) != 0 )
  {
    while ( v3 != &NiGeometry::m_RTTI )
    {
      v3 = v3->m_pkBaseRTTI;
      if ( !v3 )
        goto LABEL_5;
    }
    v5 = _pData;
    v6 = *(std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node **)_pData;
    v7 = std::_List_val<char *,std::allocator<char *>>::_Buynode(
           *(std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node **)_pData,
           *(std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node **)(*(_DWORD *)_pData + 4),
           (ItemViewDummy *const *)&_pkObject);
    v8 = v5[1];
    if ( (unsigned int)(1073741822 - v8) < 1 )
      std::_Xlength_error("list<T> too long");
    v5[1] = v8 + 1;
    v6->_Prev = v7;
    v7->_Prev->_Next = v7;
    result = -1;
  }
  else
  {
LABEL_5:
    result = 1;
  }
  return result;
}

//----- (00660D30) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<enum  ItemEquipEnum,NiNode *,std::less<enum  ItemEquipEnum>,std::allocator<std::pair<enum  ItemEquipEnum const,NiNode *>>,1>>::insert<std::pair<enum  ItemEquipEnum const,NiNode *>>(std::_Tree<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > >,bool> *result, std::pair<enum ItemEquipEnum const ,NiNode *> *_Val)
{
  std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v4; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v5; // edx@1
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v6; // ecx@1
  bool v7; // zf@1
  int v8; // edi@2
  std::_Tree_nod<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> >::_Node *v9; // ecx@7
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > >,bool> *v10; // eax@7

  v3 = (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)this;
  v4 = std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(
         (std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)this,
         (std::pair<int const ,int> *)_Val);
  v5 = v3->_Myhead;
  v6 = v5->_Parent;
  v7 = v6->_Isnil == 0;
  LOBYTE(_Val) = 1;
  if ( v7 )
  {
    v8 = v4->_Myval.first;
    do
    {
      v5 = v6;
      LOBYTE(_Val) = v8 < v6->_Myval.first;
      if ( (_BYTE)_Val )
        v6 = v6->_Left;
      else
        v6 = v6->_Right;
    }
    while ( !v6->_Isnil );
  }
  v9 = (std::_Tree_nod<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> >::_Node *)std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(v3, (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)&_Val, (bool)_Val, v5, v4)->_Ptr;
  v10 = result;
  result->first._Ptr = v9;
  result->second = 1;
  return v10;
}

//----- (00660DA0) --------------------------------------------------------
std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > *__cdecl ItemViewDummyTab::GetListByInxName(std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > *result, const char *InxName)
{
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v2; // eax@4
  std::exception pExceptionObject; // [sp+10h] [bp-3Ch]@6
  std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > v5; // [sp+1Ch] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Keyval; // [sp+20h] [bp-2Ch]@1
  int v7; // [sp+48h] [bp-4h]@1

  v5._Ptr = 0;
  _Keyval._Myres = 15;
  _Keyval._Mysize = 0;
  _Keyval._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Keyval, InxName, strlen(InxName));
  v7 = 0;
  std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ActiveSkillInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>>,0>>::lower_bound(
    &ItemViewDummyTab::m_DummyMap,
    &v5,
    &_Keyval);
  v7 = -1;
  if ( _Keyval._Myres >= 0x10 )
    operator delete(_Keyval._Bx._Ptr);
  _Keyval._Myres = 15;
  _Keyval._Mysize = 0;
  _Keyval._Bx._Buf[0] = 0;
  if ( v5._Ptr == (std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *)stru_A89C68._Myhead )
  {
    result->_Mysize = 0;
    v2 = (std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *)operator new(0xCu);
    if ( !v2 )
    {
      v5._Ptr = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&v5);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
    result->_Myhead = v2;
    v2->_Next = v2;
    result->_Myhead->_Prev = result->_Myhead;
  }
  else
  {
    std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>(
      result,
      (std::list<ItemViewDummy *,std::allocator<ItemViewDummy *> > *)&v5._Ptr->_Myval.second);
  }
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00660EB0) --------------------------------------------------------
CharShape *__thiscall CharShape::`vector deleting destructor'(CharShape *this, unsigned int a2)
{
  CharShape *v2; // esi@1

  v2 = this;
  CharShape::~CharShape(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00660EE0) --------------------------------------------------------
void __thiscall FindBoneNode::~FindBoneNode(FindBoneNode *this)
{
  FindBoneNode *v1; // edi@1
  char *v2; // esi@1
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *v3; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > v4; // ST04_4@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > result; // [sp+Ch] [bp-18h]@1
  std::set<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *> > *v6; // [sp+10h] [bp-14h]@1
  FindBoneNode *v7; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v1 = this;
  v7 = this;
  v2 = (char *)&this->m_setLinkNode;
  v8 = 0;
  v6 = &this->m_setLinkNode;
  v3 = this->m_setLinkNode._Myhead;
  v4._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v3->_Left;
  LOBYTE(v8) = 1;
  std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::erase(
    (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&this->m_setLinkNode,
    &result,
    v4,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >)v3);
  operator delete(*((void **)v2 + 1));
  v1->vfptr = (Ns_TourSceneVtbl *)&Ns_TourScene::`vftable';
}
// 9B8DD0: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *Ns_TourScene::`vftable')(Ns_TourScene *this, NiAVObject *_pkObject, void *);

//----- (00660F60) --------------------------------------------------------
void __thiscall FindBoneNode::FindBoneNode(FindBoneNode *this, NiNode **ppNode, int nArry, const char *szName)
{
  FindBoneNode *v4; // ebx@1
  int v5; // edi@1
  const char *v6; // eax@1
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *v7; // eax@1
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v8; // eax@4
  std::exception pExceptionObject; // [sp+10h] [bp-28h]@7
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >,bool> result; // [sp+1Ch] [bp-1Ch]@4
  FindBoneNode *v11; // [sp+24h] [bp-14h]@1
  char *_What; // [sp+28h] [bp-10h]@7
  int v13; // [sp+34h] [bp-4h]@1

  v4 = this;
  v11 = this;
  v5 = 0;
  this->m_pCallBack = 0;
  this->m_nCurLevel = -1;
  v6 = szName;
  this->vfptr = (Ns_TourSceneVtbl *)&FindBoneNode::`vftable';
  this->m_szName = v6;
  v13 = 0;
  this->m_setLinkNode._Mysize = 0;
  v7 = (std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *)operator new(0x14u);
  if ( !v7 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v4->m_setLinkNode._Myhead = v7;
  v7->_Left = v7;
  v4->m_setLinkNode._Myhead->_Parent = v4->m_setLinkNode._Myhead;
  v4->m_setLinkNode._Myhead->_Right = v4->m_setLinkNode._Myhead;
  v4->m_setLinkNode._Myhead->_Color = 1;
  v4->m_setLinkNode._Myhead->_Isnil = 1;
  LOBYTE(v13) = 1;
  if ( nArry > 0 )
  {
    do
    {
      if ( ppNode[v5] )
      {
        szName = (const char *)ppNode[v5];
        v8 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
               (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setLinkNode,
               (unsigned int *)&szName);
        std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
          (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v4->m_setLinkNode,
          &result,
          v8,
          0);
      }
      ++v5;
    }
    while ( v5 < nArry );
  }
  v4->m_pkBone = 0;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9BA2F4: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *FindBoneNode::`vftable')(FindBoneNode *this, NiAVObject *_pkObject, void *);

//----- (00661060) --------------------------------------------------------
int __thiscall FindBoneNode::ProcessData(FindBoneNode *this, NiAVObject *_pkObject, void *_pData)
{
  NiAVObject *v3; // ebx@1
  char *v4; // esi@1
  FindBoneNode *v5; // edi@1
  int v6; // eax@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0> > > result; // [sp+Ch] [bp-4h]@2

  v3 = _pkObject;
  v4 = _pkObject->m_pcName;
  v5 = this;
  if ( !v4 )
    goto LABEL_9;
  if ( this->m_setLinkNode._Myhead != (std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *)std::_Tree<std::_Tset_traits<Effect *,std::less<Effect *>,std::allocator<Effect *>,0>>::find((std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0> > *)&this->m_setLinkNode, &result, (PgWin *const *)&_pkObject)->_Ptr )
    return -1;
  v6 = strcmp(v4, v5->m_szName);
  if ( v6 )
LABEL_9:
    v6 = 1;
  else
    v5->m_pkBone = v3;
  return v6;
}

//----- (00661100) --------------------------------------------------------
signed int __thiscall MainChar::ChooseAttack(MainChar *this)
{
  signed int result; // eax@3
  unsigned int n2ndCode; // [sp+0h] [bp-8h]@1
  unsigned int n1stCode; // [sp+4h] [bp-4h]@1

  Char::GetAniCode((Char *)&this->vfptr, 0, &n1stCode, &n2ndCode);
  if ( n1stCode != 300000 )
    goto LABEL_9;
  if ( n2ndCode == 1000 )
    return 1;
  if ( n2ndCode != 2000 )
LABEL_9:
    result = 0;
  else
    result = 2;
  return result;
}

//----- (00661150) --------------------------------------------------------
bool __thiscall MainChar::PositionSinkTest(MainChar *this, float fXPos, float fYPos)
{
  return 0.0 != this->m_fSaveCharSpeed;
}

//----- (00661170) --------------------------------------------------------
void __thiscall MainChar::SetRevserveMovePos(MainChar *this, NiPoint3 *kPos)
{
  this->m_kRevMovePos.x = kPos->x;
  this->m_kRevMovePos.y = kPos->y;
  this->m_kRevMovePos.z = 0.0;
  this->m_bPathFindingStart = 1;
}

//----- (006611A0) --------------------------------------------------------
NiPoint3 *__thiscall MainChar::GetRevserveMovePos(MainChar *this)
{
  return &this->m_kRevMovePos;
}

//----- (006611B0) --------------------------------------------------------
BOOL __thiscall MainChar::IsEndPathFinding(MainChar *this)
{
  return this->m_bWay == 0;
}

//----- (006611C0) --------------------------------------------------------
bool __thiscall MainChar::IsDuringMove(MainChar *this)
{
  return (unsigned __int8)(*(int (__thiscall **)(MoveToTarget *))&this->m_kMoveToTarget.vfptr->gap4[0])(&this->m_kMoveToTarget) != 0;
}

//----- (006611E0) --------------------------------------------------------
void __thiscall MainChar::AdjustHeadWeightsValue(MainChar *this)
{
  MainChar *v1; // esi@1
  MainChar *v2; // eax@1
  int v3; // edi@5
  int v4; // eax@5
  float v5; // ebx@5
  double v6; // st7@5
  double v7; // st7@5
  float v8; // edi@5
  _BYTE v9[12]; // ST18_12@5
  _BYTE v10[12]; // ST0C_12@5
  _BYTE v11[12]; // ST00_12@5
  double v12; // st7@5
  double v13; // st7@6
  float v14; // ecx@8
  _BYTE v15[12]; // ST18_12@8
  _BYTE v16[12]; // ST0C_12@8
  _BYTE v17[12]; // ST00_12@8
  double v18; // st7@8
  NiPoint3 kDir; // [sp+Ch] [bp-54h]@5
  NiPoint3 kTargetPos; // [sp+18h] [bp-48h]@5
  NiPoint3 kRight; // [sp+24h] [bp-3Ch]@5
  float v22; // [sp+30h] [bp-30h]@5
  float v23; // [sp+34h] [bp-2Ch]@5
  float v24; // [sp+38h] [bp-28h]@5
  NiPoint3 kUp; // [sp+3Ch] [bp-24h]@5
  const float cMaxPitch; // [sp+48h] [bp-18h]@5
  float fDegreePitch; // [sp+4Ch] [bp-14h]@5
  float fDegreeYaw; // [sp+50h] [bp-10h]@5
  unsigned int ui1stCode; // [sp+54h] [bp-Ch]@3
  const float cHalfPI; // [sp+58h] [bp-8h]@5
  bool bApplied; // [sp+5Fh] [bp-1h]@5

  v1 = this;
  v2 = (MainChar *)this->m_pkTargetChar;
  if ( v2
    && v2 != this
    && ((Char::GetAniCode((Char *)&this->vfptr, 0, &ui1stCode, 0), ui1stCode == 100000) || ui1stCode == 200000) )
  {
    ((void (__thiscall *)(MainChar *, NiPoint3 *))v1->vfptr[6].~AbStateInfectee)(v1, &kDir);
    v3 = ((int (__thiscall *)(MainChar *))v1->vfptr[6].Deaffect)(v1);
    v4 = ((int (*)(void))v1->m_pkTargetChar->vfptr[6].Deaffect)();
    v22 = *(float *)v4 - *(float *)v3;
    v23 = *(float *)(v4 + 4) - *(float *)(v3 + 4);
    v5 = v23;
    v6 = *(float *)(v4 + 8);
    kTargetPos.y = v23;
    v7 = v6 - *(float *)(v3 + 8);
    v8 = v22;
    kTargetPos.x = v22;
    v24 = v7;
    kTargetPos.z = v24;
    cHalfPI = 0.5 * NI_PI;
    fDegreePitch = 65.0 * NI_PI / 180.0;
    cMaxPitch = NI_PI * 25.0 / 180.0;
    kUp.x = 0.0;
    kUp.y = 0.0;
    kUp.z = 1.0;
    NiPoint3::UnitCross(&kUp, &kRight, &kTargetPos);
    NiPoint3::UnitCross(&kRight, &kTargetPos, &kUp);
    *(float *)v9 = kUp.x;
    *(_QWORD *)&v9[4] = *(_QWORD *)&kUp.y;
    *(float *)v10 = v8;
    *(_QWORD *)&v10[4] = __PAIR__(LODWORD(v24), LODWORD(v5));
    bApplied = 0;
    *(float *)v11 = kDir.x;
    *(_QWORD *)&v11[4] = *(_QWORD *)&kDir.y;
    fDegreeYaw = NpNs_GetAngle(*(NiPoint3 *)v11, *(NiPoint3 *)v10, *(NiPoint3 *)v9, 0);
    v12 = fDegreeYaw;
    fDegreeYaw = fabs(fDegreeYaw);
    if ( fDegreePitch < (double)fDegreeYaw )
    {
      v13 = 0.5;
    }
    else
    {
      bApplied = 1;
      v13 = (v12 + cHalfPI) / NI_PI;
    }
    v14 = kRight.x;
    v1->m_fTargetYawWeight = v13;
    *(float *)v15 = v14;
    *(_QWORD *)&v15[4] = *(_QWORD *)&kRight.y;
    *(float *)v16 = kTargetPos.x;
    *(_QWORD *)&v16[4] = *(_QWORD *)&kTargetPos.y;
    *(float *)v17 = v8;
    *(_QWORD *)&v17[4] = __PAIR__(LODWORD(v24), LODWORD(v5));
    fDegreePitch = NpNs_GetAngle(*(NiPoint3 *)v17, *(NiPoint3 *)v16, *(NiPoint3 *)v15, 0);
    v18 = fDegreePitch;
    fDegreePitch = fabs(fDegreePitch);
    if ( cMaxPitch >= (double)fDegreePitch && bApplied )
    {
      cMaxPitch = (v18 + cHalfPI) / NI_PI;
      v1->m_fTargetPitchWeight = cMaxPitch * 0.5;
      Char::AdjustHeadWeightsValue((Char *)&v1->vfptr);
      return;
    }
  }
  else
  {
    v1->m_fTargetYawWeight = 0.5;
  }
  v1->m_fTargetPitchWeight = 0.25;
  Char::AdjustHeadWeightsValue((Char *)&v1->vfptr);
}
// B622CC: using guessed type const float NI_PI;

//----- (00661420) --------------------------------------------------------
int __thiscall MainChar::IsVisible(MainChar *this)
{
  MainChar *v1; // esi@1
  CSpactralGlow_Shader_Controller *v3; // eax@5

  v1 = this;
  if ( AbStateInfectee::IsVisible((AbStateInfectee *)&this->vfptr) )
  {
    if ( Char::IsEnableSpectral((Char *)&v1->vfptr) )
    {
      Char::SetEnanleSpectral((Char *)&v1->vfptr, 0);
      return 1;
    }
  }
  else if ( !Char::IsEnableSpectral((Char *)&v1->vfptr) )
  {
    v3 = CharShape::GetShader_Ctrl(&v1->m_kCharShape);
    CSpactralGlow_Shader_Controller::SetUseShaderName(v3, "FxSkinning_SpactralGlow", "FxNoSkinning_SpactralGlow");
    Char::SetEnanleSpectral((Char *)&v1->vfptr, 1);
  }
  return 1;
}

//----- (00661480) --------------------------------------------------------
void __thiscall MainChar::SetReserveAct(MainChar *this, MainChar::ReserveAct eReserveAct)
{
  if ( eReserveAct == 1 && this->m_eReserveAct == 4 )
    this->m_eReserveAct = 1;
  if ( this->m_eReserveAct == RESERVEACT_NONE )
    this->m_eReserveAct = eReserveAct;
}

//----- (006614B0) --------------------------------------------------------
void __thiscall MainChar::SetStartReserveAct(MainChar *this, MainChar::ReserveAct _eReserveAct)
{
  this->m_eStartReserveAct = _eReserveAct;
}

//----- (006614C0) --------------------------------------------------------
void __thiscall MainChar::SetTOTChar(MainChar *this, unsigned __int16 pkChar)
{
  this->m_pkTOTChar = pkChar;
}

//----- (006614E0) --------------------------------------------------------
MobType __thiscall MainChar::GetMetamorphosisType(MainChar *this)
{
  MobInfo *v1; // eax@1
  MobType result; // eax@2

  v1 = Char::GetMobInfo((Char *)&this->vfptr);
  if ( !v1 || (result = v1->Type, result != 17) && result != 30 )
    result = 0;
  return result;
}

//----- (00661500) --------------------------------------------------------
bool __thiscall MainChar::IsMetamorphosis(MainChar *this)
{
  MobInfo *v1; // eax@1
  MobType v2; // eax@2
  bool result; // al@4

  v1 = Char::GetMobInfo((Char *)&this->vfptr);
  result = 0;
  if ( v1 )
  {
    v2 = v1->Type;
    if ( v2 == 17 || v2 == 30 )
      result = 1;
  }
  return result;
}

//----- (00661520) --------------------------------------------------------
void __thiscall MainChar::EndPathFind(MainChar *this, NiPoint3 *kEndPos)
{
  this->m_eStartMoveTarget = 0;
  this->m_bWay = 0;
  this->m_kFinalMoveTargetPos = *kEndPos;
  this->m_kRevMovePos = *kEndPos;
}

//----- (00661570) --------------------------------------------------------
bool __thiscall MainChar::GetIsNotTargetChangeAndNotMoveMsg(MainChar *this)
{
  return this->m_IsTargetChangeView;
}

//----- (00661580) --------------------------------------------------------
void __thiscall MainChar::SetIsNotTargetChangeAndNotMoveMsg(MainChar *this, bool val)
{
  this->m_IsTargetChangeView = val;
}

//----- (00661590) --------------------------------------------------------
void __thiscall MainChar::EnableAirBorne(MainChar *this, bool b, unsigned __int16 kID)
{
  this->m_bAirBorne = b;
  this->m_kAirBorneID = kID;
}

//----- (006615B0) --------------------------------------------------------
bool __thiscall MainChar::IsAirBorneState(MainChar *this)
{
  return this->m_bAirBorne != 0;
}

//----- (006615C0) --------------------------------------------------------
unsigned __int16 __thiscall MainChar::GetAirBorneID(MainChar *this)
{
  return this->m_kAirBorneID;
}

//----- (006615D0) --------------------------------------------------------
unsigned int MainChar::GetCharLevel()
{
  return User::Lv(&g_kUser);
}

//----- (006615E0) --------------------------------------------------------
void __thiscall MainChar::MainChar(MainChar *this)
{
  MainChar *v1; // esi@1
  int v2; // eax@1
  signed int v3; // ecx@1
  NiNode *v4; // eax@3

  v1 = this;
  Char::Char((Char *)&this->vfptr);
  v1->vfptr = (AbStateInfecteeVtbl *)&MainChar::`vftable'{for `AbStateInfectee'};
  v1->vfptr = (IEffectHolderVtbl *)&MainChar::`vftable'{for `IEffectHolder'};
  v1->vfptr = (AttackSequenceManagerVtbl *)&MainChar::`vftable'{for `AttackSequenceManager'};
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kMainCharMotionPTimer);
  v1->m_spCollider.m_pObject = 0;
  v1->m_pChainEffect.m_pObject = 0;
  v1->m_kItemSkill.m_bUse = 0;
  v1->m_kItemSkill.m_uiInvenSlot = 0;
  v2 = (int)&v1->m_pos3ArrWP[0].y;
  v3 = 100;
  do
  {
    *(float *)(v2 - 4) = 0.0;
    v2 += 12;
    --v3;
    *(float *)(v2 - 12) = 0.0;
    *(float *)(v2 - 8) = 0.0;
  }
  while ( v3 );
  v1->m_kReserveSkillID = -1;
  v4 = v1->m_spScene.m_pObject;
  v1->m_fPowAutoStepLength = 250.0;
  v1->m_pkTargetChar = 0;
  v1->m_bNewClickChar = 0;
  v1->m_eReserveAct = 0;
  v1->m_eReserveSkillType = 0;
  v1->m_eStartReserveAct = 0;
  v1->m_eStartMoveTarget = 0;
  v1->m_bWay = 0;
  v1->m_nWPCnt = 0;
  v1->m_nCurWP = 0;
  *(_WORD *)&v1->m_bIsFindEndPoint = 0;
  v1->m_nCurCornerCnt = 0;
  *(_WORD *)&v1->m_bAttackWill = 0;
  v1->m_byCurrSkillAttCode = 0;
  v1->m_pkAttackTarget = 0;
  v1->m_bFinalMoveTargetPos = 0;
  v1->ms_uiTotalCharTitle = 0;
  v1->ms_uiTotalCTWeaponTitle = 0;
  v4->m_uFlags &= 0xFFFEu;
  v1->m_kAirBorneID = -1;
  v1->m_byPkGrade = 0;
  v1->m_pkTOTChar = -1;
  v1->m_uiPlayerSight = 0;
  *(_WORD *)&v1->m_bMainCharAura = 0;
  v1->m_bAirBorne = 0;
  v1->m_kSkillID = -1;
}
// 9BA3AC: using guessed type struct NiActorManager *(__thiscall *MainChar::`vftable'{for `AttackSequenceManager'})(Char *__hidden this);
// 9BA3CC: using guessed type int (__stdcall *MainChar::`vftable'{for `IEffectHolder'})(int);
// 9BA3D4: using guessed type void (__thiscall *MainChar::`vftable'{for `AbStateInfectee'})(MainChar *this, AbStateInst *pkAbState, bool);

//----- (00661740) --------------------------------------------------------
void __thiscall MainChar::~MainChar(MainChar *this)
{
  MainChar *v1; // esi@1
  NiNode *v2; // edi@1
  NiNode *v3; // edi@5

  v1 = this;
  this->vfptr = (AbStateInfecteeVtbl *)&MainChar::`vftable'{for `AbStateInfectee'};
  this->vfptr = (IEffectHolderVtbl *)&MainChar::`vftable'{for `IEffectHolder'};
  this->vfptr = (AttackSequenceManagerVtbl *)&MainChar::`vftable'{for `AttackSequenceManager'};
  v2 = this->m_pChainEffect.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_spCollider.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  Char::~Char((Char *)&v1->vfptr);
}
// 9BA3AC: using guessed type struct NiActorManager *(__thiscall *MainChar::`vftable'{for `AttackSequenceManager'})(Char *__hidden this);
// 9BA3CC: using guessed type int (__stdcall *MainChar::`vftable'{for `IEffectHolder'})(int);
// 9BA3D4: using guessed type void (__thiscall *MainChar::`vftable'{for `AbStateInfectee'})(MainChar *this, AbStateInst *pkAbState, bool);

//----- (00661800) --------------------------------------------------------
char __thiscall MainChar::Init(MainChar *this, PROTO_NC_CHAR_MAPLOGIN_ACK *p)
{
  MainChar *v2; // esi@1
  PROTO_NC_CHAR_BASE_CMD *v3; // edi@1
  int v4; // eax@1
  void (__thiscall *v5)(MainChar *, char *); // edx@1
  unsigned int v6; // eax@1
  unsigned int v7; // eax@1
  bool (__thiscall *v8)(AbStateInfectee *, ABSTATEINDEX, float, bool); // edx@1
  int (__thiscall *v9)(AbStateInfectee *); // eax@3
  float fY; // ST20_4@3
  float fX; // ST1C_4@3
  float fAngle; // ST24_4@4
  float v13; // ST20_4@4
  char result; // al@5
  NiPoint3 kCharPos; // [sp+34h] [bp-64h]@3
  NiPoint3 kCharDir; // [sp+40h] [bp-58h]@5
  AbStateInfecteeVtbl *v17; // [sp+4Ch] [bp-4Ch]@1
  char v18; // [sp+53h] [bp-45h]@1
  PROTO_AVATAR_SHAPE_INFO *pkShapeData; // [sp+54h] [bp-44h]@1
  NiMatrix3 v20; // [sp+58h] [bp-40h]@5
  char acName[21]; // [sp+7Ch] [bp-1Ch]@1

  v2 = this;
  v3 = User::GetMainCharBaseData(&g_kUser);
  *(float *)&pkShapeData = COERCE_FLOAT(User::GetMainCharShapeData(&g_kUser));
  User::GetSelectedAvatarInfo(&g_kUser);
  v2->m_kHandle = p->charhandle;
  *(_DWORD *)acName = v3->charid.n5_code[0];
  *(_DWORD *)&acName[4] = v3->charid.n5_code[1];
  *(_DWORD *)&acName[8] = v3->charid.n5_code[2];
  v4 = (int)v2->vfptr;
  *(_DWORD *)&acName[12] = v3->charid.n5_code[3];
  *(_DWORD *)&acName[16] = v3->charid.n5_code[4];
  v5 = *(void (__thiscall **)(MainChar *, char *))(v4 + 88);
  acName[20] = 0;
  v5(v2, acName);
  v17 = v2->vfptr;
  v6 = User::MaxHP(&g_kUser);
  ((void (__thiscall *)(MainChar *, unsigned int))v17[4].SetAbStateProperty)(v2, v6);
  v17 = v2->vfptr;
  v7 = User::MaxSP(&g_kUser);
  ((void (__thiscall *)(MainChar *, unsigned int))v17[4].AddAbStateByAbstateIndex)(v2, v7);
  ((void (__thiscall *)(MainChar *, unsigned int))v2->vfptr[4].Affect)(v2, v3->CurHP);
  ((void (__thiscall *)(MainChar *, unsigned int))v2->vfptr[4].IsVisible)(v2, v3->CurSP);
  v2->vfptr[4].DeleteAbStateByAbstateIndex((AbStateInfectee *)v2, 0);
  v18 = ((int (__thiscall *)(MainChar *))v2->vfptr[1].AddAbStateByAbstateIndex)(v2);
  v8 = v2->vfptr[1].AddAbStateByAbstateIndex;
  v2->m_byMode = 1;
  v2->m_eStandMode = 0;
  if ( v18 != (unsigned __int8)((int (__thiscall *)(MainChar *))v8)(v2) )
    v2->m_bIsChangeCampMode = 1;
  CharShape::SetShapeInfo(&v2->m_kCharShape, pkShapeData);
  CharShape::SetEquipInfo(&v2->m_kCharShape, 0);
  v9 = v2->vfptr[21].IsVisible;
  v2->m_bConnectServer = 1;
  v2->m_byPkGrade = 0;
  ((void (__thiscall *)(MainChar *, _DWORD))v9)(v2, 0);
  unk_B25064 = v3->logininfo.currentmap.n3_code[0];
  unk_B25068 = v3->logininfo.currentmap.n3_code[1];
  unk_B2506C = v3->logininfo.currentmap.n3_code[2];
  fX = (double)p->logincoord.x;
  fY = (double)p->logincoord.y;
  if ( !World::GetAdvGroundPos(&g_kWorld, fX, fY, &kCharPos)
    || (v13 = (double)p->logincoord.x, fAngle = (double)p->logincoord.y, World::IsBlock(&g_kWorld, v13, fAngle)) )
  {
    result = 0;
  }
  else
  {
    v2->m_dwGuildRegNum = 0;
    *(float *)&pkShapeData = (NI_PI + NI_PI) * 90.0 / 180.0;
    NiMatrix3::MakeZRotation(&v20, *(float *)&pkShapeData);
    NiMatrix3::operator*(&v20, &kCharDir, &World::ms_kNorthDir);
    ((void (__thiscall *)(MainChar *, NiPoint3 *, NiPoint3 *))v2->vfptr[5].GetAbstateColor)(v2, &kCharPos, &kCharDir);
    Char::InitHpUpdate((Char *)&v2->vfptr);
    result = 1;
    v2->m_pkTOTChar = -1;
  }
  return result;
}
// B622CC: using guessed type const float NI_PI;

//----- (00661A90) --------------------------------------------------------
char __thiscall MainChar::TryMove(MainChar *this, float fCurTime)
{
  MainChar *v2; // esi@1
  bool v3; // al@2
  MoveToTarget kMove; // [sp+10h] [bp-78h]@2
  int v6; // [sp+84h] [bp-4h]@2

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[7].GetAbstateColor)() )
  {
    MoveToTarget::MoveToTarget(&kMove);
    v6 = 0;
    MoveToTarget::Copy(&v2->m_kMoveToTarget, &kMove);
    NpNs_MoveToTarget::Update((NpNs_MoveToTarget *)&kMove.vfptr, fCurTime);
    v3 = World::IsBlock(&g_kWorld, kMove.m_pos3Cur.x, kMove.m_pos3Cur.y);
    v6 = -1;
    if ( v3 )
    {
      MoveToTarget::~MoveToTarget(&kMove);
      return 0;
    }
    MoveToTarget::~MoveToTarget(&kMove);
  }
  return 1;
}

//----- (00661B50) --------------------------------------------------------
char __thiscall MainChar::TryMove8(MainChar *this, float fCurTime)
{
  MainChar *v2; // esi@1
  bool v3; // al@2
  MoveToTarget kMove; // [sp+10h] [bp-78h]@2
  int v6; // [sp+84h] [bp-4h]@2

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[7].GetAbstateColor)() )
  {
    MoveToTarget::MoveToTarget(&kMove);
    v6 = 0;
    MoveToTarget::Copy(&v2->m_kMoveToTarget, &kMove);
    NpNs_MoveToTarget::Update((NpNs_MoveToTarget *)&kMove.vfptr, fCurTime);
    v3 = World::IsBlock8(&g_kWorld, kMove.m_pos3Cur.x, kMove.m_pos3Cur.y);
    v6 = -1;
    if ( v3 )
    {
      MoveToTarget::~MoveToTarget(&kMove);
      return 0;
    }
    MoveToTarget::~MoveToTarget(&kMove);
  }
  return 1;
}

//----- (00661C10) --------------------------------------------------------
void __thiscall MainChar::StopMove(MainChar *this, int bAbstateTest)
{
  MainChar *v2; // esi@1
  Mover *v3; // ecx@1

  v2 = this;
  v3 = this->m_pkMover;
  if ( v3 && !v2->m_uiMoverSlot )
    ((void (__stdcall *)(_DWORD))v3->vfptr[7].AddAbStateByAbstateIndex)(bAbstateTest);
  if ( (_BYTE)bAbstateTest != 1 || !v2->m_kAbStateProperty.iUnMovableCount )
  {
    v2->m_kMoveToTarget.vfptr->Stop((NpNs_MoveToTarget *)&v2->m_kMoveToTarget);
    if ( !Char::CheckActState((Char *)&v2->vfptr, 100000) )
      ((void (__thiscall *)(_DWORD))v2->vfptr[10].DeleteAbStateByAbstateIndex)(v2);
    v2->m_eStartMoveTarget = 0;
    v2->m_bWay = 0;
    v2->m_eReserveAct = 0;
  }
}

//----- (00661CA0) --------------------------------------------------------
void __thiscall MainChar::StopMove(MainChar *this, float fXPos, float fYPos, int bAbstateTest)
{
  MainChar *v4; // esi@1
  Mover *v5; // ecx@1
  NiPoint3 kPos; // [sp+20h] [bp-Ch]@6

  v4 = this;
  v5 = this->m_pkMover;
  if ( v5 && !v4->m_uiMoverSlot )
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v5->vfptr[7].IsVisible)(LODWORD(fXPos), LODWORD(fYPos), bAbstateTest);
  if ( (_BYTE)bAbstateTest != 1 || !v4->m_kAbStateProperty.iUnMovableCount )
  {
    v4->m_kMoveToTarget.vfptr->Stop((NpNs_MoveToTarget *)&v4->m_kMoveToTarget);
    if ( World::GetAdvGroundPos(&g_kWorld, fXPos, fYPos, &kPos) == 1 )
    {
      ((void (__thiscall *)(_DWORD, _DWORD))v4->vfptr[5].~AbStateInfectee)(v4, &kPos);
      v4->m_spScene.m_pObject->m_kLocal.m_Translate = kPos;
    }
    v4->m_eStartMoveTarget = 0;
    v4->m_bWay = 0;
  }
}

//----- (00661D60) --------------------------------------------------------
void __thiscall MainChar::StartPathFinding(MainChar *this)
{
  MainChar *v1; // esi@1
  float pos2Start; // ST28_4@3
  int v3; // eax@3
  double v4; // st7@3
  NiPoint2 v5; // ST00_8@3
  int v6; // ecx@3
  int v7; // eax@4
  int v8; // ecx@5
  double v9; // st6@6
  int nResultWayCnt; // [sp+18h] [bp-4h]@3

  v1 = this;
  if ( !(_S3_8 & 1) )
    _S3_8 |= 1u;
  pos2Start = *(float *)this->m_kMoveToTarget.vfptr->GetCurrentPos((NpNs_MoveToTarget *)&this->m_kMoveToTarget);
  v3 = (int)v1->m_kMoveToTarget.vfptr->GetCurrentPos((NpNs_MoveToTarget *)&v1->m_kMoveToTarget);
  v4 = v1->m_kRevMovePos.y;
  v5.y = *(float *)(v3 + 4);
  v5.x = pos2Start;
  World::SearchWayPointsNew(
    &g_kWorld,
    v5,
    COERCE_NIPOINT2(*(double *)&v1->m_kRevMovePos.x),
    100,
    (NiPoint2 *)aPos2Arr,
    &nResultWayCnt,
    &v1->m_bIsFindEndPoint);
  v6 = nResultWayCnt;
  if ( nResultWayCnt )
  {
    v7 = 0;
    v1->m_bWay = 1;
    v1->m_nWPCnt = v6;
    v1->m_nCurWP = 0;
    if ( v6 > 0 )
    {
      v8 = (int)&v1->m_pos3ArrWP[0].y;
      do
      {
        v9 = aPos2Arr[2 * v7++];
        *(float *)(v8 - 4) = v9;
        v8 += 12;
        *(float *)(v8 - 12) = *((float *)&g_pkMainChar + 2 * v7);
        *(float *)(v8 - 8) = 0.0;
      }
      while ( v7 < v1->m_nWPCnt );
    }
    if ( v1->m_bIsFindEndPoint )
    {
      *((float *)&v1->vfptr + 3 * v1->m_nWPCnt + 1041) = v1->m_kRevMovePos.x;
      *(&v1->m_pos3MoveDir.z + 3 * v1->m_nWPCnt) = v1->m_kRevMovePos.y;
    }
  }
}

//----- (00661E70) --------------------------------------------------------
void __thiscall MainChar::UpdatePathFinding(MainChar *this)
{
  MainChar *v1; // esi@1
  float v2; // eax@2
  float v3; // ecx@2
  float v4; // edx@2
  int v5; // ecx@5
  int v6; // eax@6
  float v7; // eax@6
  bool v8; // zf@8
  float v9; // edx@9
  float v10; // eax@9

  v1 = this;
  if ( this->m_bPathFindingStart )
  {
    v2 = this->m_kRevMovePos.x;
    v3 = this->m_kRevMovePos.y;
    v4 = v1->m_kRevMovePos.z;
    v1->m_pos3InputTargetPos.x = v2;
    v1->m_pos3InputTargetPos.y = v3;
    v1->m_nCurCornerCnt = 0;
    v1->m_bPathFindingStart = 0;
    v1->m_eStartMoveTarget = 3;
    v1->m_pos3InputTargetPos.z = v4;
    MainChar::StartPathFinding(v1);
  }
  if ( v1->m_bWay && v1->m_eStartMoveTarget == 3 )
  {
    v5 = v1->m_nCurWP;
    if ( v5 >= v1->m_nWPCnt )
    {
      v8 = v1->m_bIsFindEndPoint == 0;
      v1->m_bWay = 0;
      if ( v8 )
      {
        v9 = v1->m_pos3InputTargetPos.y;
        v10 = v1->m_pos3InputTargetPos.z;
        v1->m_kRevMovePos.x = v1->m_pos3InputTargetPos.x;
        v1->m_kRevMovePos.y = v9;
        v1->m_kRevMovePos.z = v10;
        MainChar::StartPathFinding(v1);
      }
    }
    else
    {
      v6 = (int)v1 + 4 * (3 * v5 + 1044);
      v1->m_eStartMoveTarget = 1;
      v1->m_kRevMovePos.x = *(float *)v6;
      v1->m_kRevMovePos.y = *(float *)(v6 + 4);
      v7 = *(float *)(v6 + 8);
      ++v1->m_nCurCornerCnt;
      v1->m_kRevMovePos.z = v7;
      v1->m_nCurWP = v5 + 1;
    }
  }
}

//----- (00661F60) --------------------------------------------------------
void __thiscall MainChar::CulNextMovePosition(MainChar *this)
{
  MainChar *v1; // esi@1
  float v2; // eax@1
  float v3; // ST1C_4@1
  float v4; // ecx@1
  float v5; // edx@1
  float v6; // ST10_4@1
  float v7; // ST14_4@1
  float v8; // ST18_4@1
  float v9; // ST04_4@1
  float v10; // ST08_4@1
  double v11; // st7@1
  float v12; // ST0C_4@1
  float v13; // ST04_4@1
  float v14; // ST08_4@1
  float v15; // ST0C_4@1
  float v16; // ST1C_4@1
  float v17; // ST1C_4@1
  float v18; // ecx@2
  float v19; // edx@2
  float v20; // ecx@3
  float v21; // edx@3

  v1 = this;
  v2 = this->m_kNextMovePos.x;
  v3 = this->m_fPowAutoStepLength;
  v4 = this->m_kNextMovePos.y;
  v5 = v1->m_kNextMovePos.z;
  v1->m_kStartMovePos.x = v2;
  v1->m_kStartMovePos.y = v4;
  v1->m_kStartMovePos.z = v5;
  v6 = v1->m_pos3MoveDir.x * v3;
  v7 = v1->m_pos3MoveDir.y * v3;
  v8 = v3 * v1->m_pos3MoveDir.z;
  v9 = v1->m_kStartMovePos.x + v6;
  v10 = v1->m_kStartMovePos.y + v7;
  v11 = v1->m_kStartMovePos.z;
  v1->m_kRevMovePos.x = v9;
  v1->m_kRevMovePos.y = v10;
  v12 = v11 + v8;
  v1->m_kRevMovePos.z = v12;
  v13 = v1->m_kRevMovePos.x - v1->m_kResStartSPos.x;
  v14 = v1->m_kRevMovePos.y - v1->m_kResStartSPos.y;
  v15 = v1->m_kRevMovePos.z - v1->m_kResStartSPos.z;
  v16 = v14 * v14 + v13 * v13 + v15 * v15;
  v17 = sqrt(v16);
  if ( v1->m_fTotalMoveLength <= (double)v17 )
  {
    v18 = v1->m_kFinalMoveTargetPos.y;
    v19 = v1->m_kFinalMoveTargetPos.z;
    v1->m_kRevMovePos.x = v1->m_kFinalMoveTargetPos.x;
    v1->m_kRevMovePos.y = v18;
    v1->m_bFinalMoveTargetPos = 1;
    v1->m_kRevMovePos.z = v19;
  }
  v20 = v1->m_kRevMovePos.y;
  v21 = v1->m_kRevMovePos.z;
  v1->m_kNextMovePos.x = v1->m_kRevMovePos.x;
  v1->m_kNextMovePos.y = v20;
  v1->m_kNextMovePos.z = v21;
}

//----- (006620C0) --------------------------------------------------------
char __thiscall MainChar::IsPassTargetPosition(MainChar *this)
{
  MainChar *v1; // esi@1
  NiPoint3 *v2; // eax@1
  double v3; // st7@1
  float v4; // ST0C_4@1
  float v5; // ST10_4@1
  float v6; // ST14_4@1
  char result; // al@3
  NiPoint3 pos3CurPos; // [sp+14h] [bp-10h]@1
  float fSqrLength; // [sp+20h] [bp-4h]@1

  v1 = this;
  v2 = this->m_kMoveToTarget.vfptr->GetCalcuCurrentPos((NpNs_MoveToTarget *)&this->m_kMoveToTarget);
  pos3CurPos.x = v2->x;
  v3 = pos3CurPos.x - v1->m_kStartMovePos.x;
  pos3CurPos.y = v2->y;
  v4 = v3;
  pos3CurPos.z = v2->z;
  v5 = pos3CurPos.y - v1->m_kStartMovePos.y;
  v6 = pos3CurPos.z - v1->m_kStartMovePos.z;
  fSqrLength = v5 * v5 + v4 * v4 + v6 * v6;
  fSqrLength = sqrt(fSqrLength);
  if ( v1->m_fPowAutoStepLength <= (double)fSqrLength
    || (fSqrLength = fSqrLength - v1->m_fPowAutoStepLength, fSqrLength = fabs(fSqrLength), fSqrLength < 1.0) )
  {
    v1->m_kMoveToTarget.vfptr->SetCurrentPos((NpNs_MoveToTarget *)&v1->m_kMoveToTarget, &pos3CurPos);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006621A0) --------------------------------------------------------
bool __thiscall MainChar::IsPassResTargetPosition(MainChar *this)
{
  MainChar *v1; // esi@1
  NiPoint3 *v2; // eax@1
  float v3; // ST04_4@1
  float v4; // ST08_4@1
  float v5; // ST0C_4@1
  float v6; // ST1C_4@1
  float v7; // ST1C_4@2
  float v8; // ST1C_4@2
  bool result; // al@3
  float fSqrLength; // [sp+1Ch] [bp-4h]@1

  v1 = this;
  v2 = this->m_kMoveToTarget.vfptr->GetCalcuCurrentPos((NpNs_MoveToTarget *)&this->m_kMoveToTarget);
  v3 = v2->x - v1->m_kResStartSPos.x;
  v4 = v2->y - v1->m_kResStartSPos.y;
  v5 = v2->z - v1->m_kResStartSPos.z;
  v6 = v4 * v4 + v3 * v3 + v5 * v5;
  fSqrLength = sqrt(v6);
  result = 1;
  if ( v1->m_fTotalMoveLength > (double)fSqrLength )
  {
    v7 = fSqrLength - v1->m_fTotalMoveLength;
    v8 = fabs(v7);
    if ( v8 >= 1.0 )
      result = 0;
  }
  return result;
}

//----- (00662260) --------------------------------------------------------
bool __thiscall MainChar::IsView(MainChar *this, NiPoint3 *pos3Pos)
{
  MainChar *v2; // esi@1
  NiPoint3 *v3; // eax@1
  float v4; // ST04_4@1
  float v5; // ST08_4@1
  float v6; // ST0C_4@1
  double v7; // st7@2
  float fLengthToMainChar; // [sp+10h] [bp-4h]@1
  NiPoint3 *pos3Posa; // [sp+1Ch] [bp+8h]@1
  NiPoint3 *pos3Posb; // [sp+1Ch] [bp+8h]@1
  NiPoint3 *pos3Posc; // [sp+1Ch] [bp+8h]@4

  v2 = this;
  v3 = World::GetCameraLookAtPos(&g_kWorld);
  v4 = v3->x - pos3Pos->x;
  v5 = v3->y - pos3Pos->y;
  v6 = v3->z - pos3Pos->z;
  *(float *)&pos3Posa = v4 * v4 + v5 * v5 + v6 * v6;
  *(float *)&pos3Posb = sqrt(*(float *)&pos3Posa);
  fLengthToMainChar = *(float *)&pos3Posb;
  if ( Char::IsNPC((Char *)&v2->vfptr) )
    v7 = v2->m_fMaxViewLength + 500.0;
  else
    v7 = v2->m_fMaxViewLength;
  *(float *)&pos3Posc = v7;
  return fLengthToMainChar < (double)*(float *)&pos3Posc;
}

//----- (00662300) --------------------------------------------------------
char __thiscall MainChar::InitCharactorWeaponTitle(MainChar *this, char currentTitle, unsigned __int16 currentTitleMobID)
{
  MainChar *v3; // ebx@1
  __int16 v4; // di@1
  Item *v5; // esi@1
  int v6; // esi@3
  char *v7; // eax@3
  int v8; // esi@3
  unsigned __int16 v9; // di@4
  bool v10; // zf@6
  char *v11; // eax@10
  int v12; // esi@12
  int v13; // eax@13
  char *v14; // edi@14
  char *v16; // [sp+Ch] [bp-78h]@3
  int iWTIndex; // [sp+10h] [bp-74h]@1
  unsigned int i; // [sp+14h] [bp-70h]@3
  unsigned int ia; // [sp+14h] [bp-70h]@11
  SHINE_ITEM_STRUCT kStruct; // [sp+18h] [bp-6Ch]@3

  v3 = this;
  v4 = 0;
  this->ms_uiTotalCTWeaponTitle = 0;
  v5 = Inventory::GetEquipedWeapon(&g_kInventory);
  iWTIndex = 0;
  if ( v5 && (unsigned __int8)((int (__thiscall *)(Item *))v5->vfptr[1].__vecDelDtor)(v5) == 5 )
  {
    v6 = (int)&v5->m_kStruct;
    qmemcpy(&kStruct, (const void *)v6, 0x64u);
    v6 += 100;
    *((_WORD *)&kStruct.itemattr.Bracelet + 49) = *(_WORD *)v6;
    v7 = (char *)&kStruct.itemattr.armor.deletetime;
    *((_BYTE *)&kStruct.itemattr.Bracelet + 100) = *(_BYTE *)(v6 + 2);
    v16 = (char *)&kStruct.itemattr.armor.deletetime;
    v8 = (int)&v3->ms_ctwtInfo[0].MobID;
    i = 3;
    do
    {
      v9 = *(_WORD *)v7;
      if ( *(_WORD *)v7 != -1 )
      {
        ++iWTIndex;
        *(_BYTE *)(v8 - 2) = CWeaponTitle::GetLevel(&WeaponTitleTab::ms_kTab, v9, *(_DWORD *)(v7 + 2) & 0xFFFFFFF);
        v7 = v16;
        *(_WORD *)v8 = v9;
        *(_BYTE *)(v8 + 2) = 2;
        v8 += 6;
      }
      v7 += 6;
      v10 = i-- == 1;
      v16 = v7;
    }
    while ( !v10 );
    v4 = 0;
  }
  v3->ms_uiTotalCTWeaponTitle = iWTIndex;
  if ( currentTitle != 10 )
    return 1;
  v3->m_uiCurrCharTitleType = 10;
  if ( currentTitleMobID == -1 )
  {
    MainChar::InitCharactorWeaponTitle(v3, v4, v4);
    *((_BYTE *)&v3->ms_ctInfo[0] + 1) |= 0xC0u;
    Char::SetCharTitleUse((Char *)&v3->vfptr, v4);
    v11 = CCharacterTitleData::GetTitleString(&g_characterTitleData, v4, v4);
    Char::SetCharTitleName((Char *)&v3->vfptr, v11);
  }
  ia = 0;
  if ( v3->ms_uiTotalCTWeaponTitle <= 0 )
    return 1;
  v12 = (int)&v3->ms_ctwtInfo[0].MobID;
  while ( 1 )
  {
    v13 = *(_WORD *)v12;
    if ( (_WORD)v13 == currentTitleMobID )
      break;
LABEL_16:
    v12 += 6;
    if ( ++ia >= v3->ms_uiTotalCTWeaponTitle )
      return 1;
  }
  v14 = WeaponTitleTab::GetWeaponTitleStringByLevel(v13, *(_BYTE *)(v12 - 2));
  if ( v14 )
  {
    *(_BYTE *)(v12 + 2) = 3;
    *((_BYTE *)&v3->ms_ctInfo[0] + 1) = *((_BYTE *)&v3->ms_ctInfo[0] + 1) & 0x3F | 0x80;
    Char::SetCharTitleUse((Char *)&v3->vfptr, 1);
    Char::SetCharTitleName((Char *)&v3->vfptr, v14);
    goto LABEL_16;
  }
  return 0;
}

//----- (00662490) --------------------------------------------------------
signed int __stdcall MainChar::GetObjType(Char *pkTargetObj)
{
  signed int result; // eax@2
  int v3; // edi@4
  int v4; // esi@4
  int v5; // ecx@6
  int v6; // eax@7
  int v7; // eax@8

  if ( !pkTargetObj )
    return 0;
  if ( !(unsigned __int8)((int (__thiscall *)(Char *))pkTargetObj->vfptr[1].Affect)(pkTargetObj) )
    goto LABEL_21;
  v3 = pkTargetObj->m_kCharShape.m_kMobID;
  v4 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
  if ( !(unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 16))(
                           ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                           v3) )
    goto LABEL_21;
  if ( (unsigned __int16)v3 > *(_WORD *)(v4 + 200) )
    goto LABEL_21;
  v5 = *(_DWORD *)(v4 + 196);
  if ( !*(_DWORD *)(v5 + 4 * v3) )
    goto LABEL_21;
  v6 = *(_DWORD *)(v5 + 4 * v3);
  if ( !v6 )
    goto LABEL_21;
  v7 = *(_DWORD *)(v6 + 99);
  if ( v7 == 10 )
    return 4;
  if ( v7 == 9 )
    return 5;
  if ( v7 == 8 )
    return 6;
  if ( v7 == 22 )
    return 7;
  if ( v7 == 21 )
    result = 8;
  else
LABEL_21:
    result = 0;
  return result;
}
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;

//----- (00662550) --------------------------------------------------------
void __userpurge MainChar::GetCameraLookAt(MainChar *this@<ecx>, double a2@<st0>, NiPoint3 *kLookAt)
{
  MainChar *v3; // esi@1
  int v4; // eax@2
  int v5; // eax@3

  v3 = this;
  if ( this->m_pkMover )
  {
    v4 = ((int (*)(void))this->m_pkMover->vfptr[6].AddAbStateByAbstateIndex)();
  }
  else
  {
    v5 = ((int (__stdcall *)(const char *))this->m_spScene.m_pObject->vfptr[18].__vecDelDtor)("LookAtCamera");
    if ( v5 )
    {
      kLookAt->x = *(float *)(v5 + 140);
      kLookAt->y = *(float *)(v5 + 144);
      kLookAt->z = *(float *)(v5 + 148);
      return;
    }
    v4 = ((int (__thiscall *)(MainChar *))v3->vfptr[6].AddAbStateByAbstateIndex)(v3);
  }
  kLookAt->x = *(float *)v4;
  kLookAt->y = *(float *)(v4 + 4);
  kLookAt->z = *(float *)(v4 + 8);
  v3->vfptr[20].~AbStateInfectee((AbStateInfectee *)v3);
  kLookAt->z = a2 + kLookAt->z;
}

//----- (006625F0) --------------------------------------------------------
void __thiscall MainChar::OnWarpMove(MainChar *this, SHINE_XY_TYPE targetpoint, int SkillID)
{
  int v3; // esi@1
  MainChar *v4; // ebx@1
  int *v5; // eax@3
  int v6; // eax@4
  int v7; // eax@5
  unsigned __int16 *v8; // eax@7

  v3 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  v4 = this;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                          SkillID) )
  {
    if ( (unsigned __int16)SkillID <= *(_WORD *)(v3 + 200) )
    {
      v5 = (int *)(*(_DWORD *)(v3 + 196) + 4 * (unsigned __int16)SkillID);
      if ( *v5 )
      {
        v6 = *v5;
        if ( v6 )
        {
          v7 = *(_DWORD *)(v6 + 531);
          if ( v7 == 36 || v7 == 38 )
          {
            v8 = &v4->m_kActionMgr.m_pkCurPlaySkillViewInfo->ID;
            if ( v8 && *v8 != (_WORD)SkillID )
              ((void (__thiscall *)(MainChar *, signed int))v4->vfptr[7].AddAbStateByAbstateIndex)(v4, 1);
          }
        }
      }
    }
  }
  Char::OnWarpMove((Char *)&v4->vfptr, v3, targetpoint, SkillID);
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (00662680) --------------------------------------------------------
bool __thiscall MainChar::IsAvailableStateReserveSkill(MainChar *this)
{
  MainChar *v1; // esi@1
  bool result; // al@2
  Mover *v3; // ecx@6

  v1 = this;
  result = 0;
  if ( !Char::CheckActState((Char *)&this->vfptr, 500000)
    && !v1->m_bWillDead
    && !(unsigned __int8)((int (__thiscall *)(MainChar *))v1->vfptr[1].AddAbStateByAbstateIndex)(v1) )
  {
    if ( !(unsigned __int8)((int (__thiscall *)(MainChar *))v1->vfptr[15].Deaffect)(v1)
      || (v3 = v1->m_pkMover) != 0 && Mover::IsAbility(v3) )
    {
      result = 1;
    }
  }
  return result;
}

//----- (006626E0) --------------------------------------------------------
void __thiscall MainChar::InitJump(MainChar *this)
{
  MainChar *v1; // esi@1
  ActionInfoSet *v2; // ecx@2
  unsigned int v3; // ebx@2
  ActionInfo *v4; // eax@3
  ActionInfoSet *v5; // ecx@5
  ActionInfo *v6; // eax@6
  ActionInfoSet *v7; // ecx@8
  ActionInfo *v8; // eax@9
  ActionInfoSet *v9; // ecx@11
  ActionInfo *v10; // eax@12
  ActionInfoSet *v11; // ecx@14
  ActionInfo *v12; // eax@15
  unsigned int uiJumpStand_JumpStart; // [sp+8h] [bp-10h]@2
  unsigned int uiJumpRun_JumpStart; // [sp+Ch] [bp-Ch]@2
  unsigned int uiJump_DownHill; // [sp+10h] [bp-8h]@2
  unsigned int uiJumpStand_Land; // [sp+14h] [bp-4h]@2

  v1 = this;
  if ( JumpProcessor::IsJump(&this->m_kJumpProcessor) )
  {
    JumpProcessor::clear(&v1->m_kJumpProcessor);
    v1->m_kJumpProcessor.m_pActor = v1->m_spActor.m_pObject;
    v1->m_kJumpProcessor.m_pChar = (Char *)v1;
    v2 = v1->m_kActionMgr.m_pkActInfoSet;
    v3 = 0;
    uiJumpStand_JumpStart = 0;
    uiJumpRun_JumpStart = 0;
    uiJump_DownHill = 0;
    uiJumpStand_Land = 0;
    if ( v2 )
    {
      v4 = ActionInfoSet::GetByInxName(v2, "JumpStand_JumpStart");
      if ( v4 )
        uiJumpStand_JumpStart = v4->uiEventCode;
    }
    v5 = v1->m_kActionMgr.m_pkActInfoSet;
    if ( v5 )
    {
      v6 = ActionInfoSet::GetByInxName(v5, "JumpRun_JumpStart");
      if ( v6 )
        uiJumpRun_JumpStart = v6->uiEventCode;
    }
    v7 = v1->m_kActionMgr.m_pkActInfoSet;
    if ( v7 )
    {
      v8 = ActionInfoSet::GetByInxName(v7, "Jump_DownHill");
      if ( v8 )
        uiJump_DownHill = v8->uiEventCode;
    }
    v9 = v1->m_kActionMgr.m_pkActInfoSet;
    if ( v9 )
    {
      v10 = ActionInfoSet::GetByInxName(v9, "JumpStand_Land");
      if ( v10 )
        uiJumpStand_Land = v10->uiEventCode;
    }
    v11 = v1->m_kActionMgr.m_pkActInfoSet;
    if ( v11 )
    {
      v12 = ActionInfoSet::GetByInxName(v11, "JumpRun_Land");
      if ( v12 )
        v3 = v12->uiEventCode;
    }
    JumpProcessor::SetJumpAni(
      &v1->m_kJumpProcessor,
      uiJumpStand_JumpStart,
      uiJumpRun_JumpStart,
      uiJump_DownHill,
      uiJumpStand_Land,
      v3);
  }
}

//----- (006627F0) --------------------------------------------------------
bool __thiscall MainChar::IsSkillUsableState(MainChar *this)
{
  return this->m_kAbStateProperty.iKarenCaptivateStateCount <= 0
      && !this->m_kAbStateProperty.iUnAttackableCount
      && this->m_kAbStateProperty.iFearCount <= 0;
}

//----- (00662810) --------------------------------------------------------
bool __thiscall MainChar::IsCharTargetableState(MainChar *this, Char *pkChar)
{
  MainChar *v2; // edi@1
  bool result; // al@2
  MobInfo *v4; // eax@12

  v2 = this;
  if ( !pkChar
    || (unsigned __int8)((int (__thiscall *)(Char *))pkChar->vfptr[1].Affect)(pkChar)
    && Char::GetMobInfo(pkChar)
    && (Char::CheckActState(pkChar, 500000)
     || Char::GetMobInfo(pkChar)->Type == 12
     || Char::GetMobInfo(pkChar)->Type == 24
     || Char::GetMobInfo(pkChar)->Type == 27
     || Char::GetMobInfo(pkChar)->Type == 18
     || Char::GetMobInfo(pkChar)->Type == 19
     || Char::GetMobInfo(pkChar)->Type == 13)
    || (v4 = Char::GetMobInfo((Char *)&v2->vfptr)) != 0 && v4->Type == 17
    || g_pkMainChar->m_kAbStateProperty.iKarenCaptivateStateCount > 0
    || AbStateInfectee::IsInList((AbStateInfectee *)&v2->vfptr, STA_CANNOTCHANGETARGET) == 1 )
  {
    result = 0;
  }
  else
  {
    result = Char::IsFadeOut(pkChar) == 0;
  }
  return result;
}

//----- (006628F0) --------------------------------------------------------
void __thiscall MainChar::CancelMHEmotion(MainChar *this)
{
  MainChar *v1; // esi@1

  v1 = this;
  if ( this->m_eReserveAct != 7 )
  {
    if ( this->m_eEmotionState == 4 )
      MiniHouseIndoor::SetCharEmotion(&g_kWorld.m_MiniHouseIndoorMode, 0xFFFFu, -1, 0);
    Char::CancelEmotion((Char *)&v1->vfptr);
  }
}

//----- (00662930) --------------------------------------------------------
void __thiscall MainChar::CancelEmotion(MainChar *this)
{
  MainChar *v1; // esi@1
  GameFrameWork *v2; // eax@4

  v1 = this;
  if ( this->m_eReserveAct != 7 )
  {
    if ( this->m_eEmotionState == 4
      && MiniHouseIndoor::SetCharEmotion(&g_kWorld.m_MiniHouseIndoorMode, 0xFFFFu, -1, 0) == 1 )
    {
      v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      GameFrameWork::On_NC_MINIHOUSE_FURNITURE_EMOTION_CANCEL_REQ(v2);
    }
    Char::CancelEmotion((Char *)&v1->vfptr);
  }
}

//----- (00662980) --------------------------------------------------------
void __thiscall MainChar::Affect(MainChar *this, AbStateInst *pkAbState, bool bNoVisual)
{
  MainChar *v3; // ebx@1
  int v4; // edi@2
  int v5; // esi@2
  int *v6; // eax@4
  int v7; // eax@5

  v3 = this;
  Char::Affect((Char *)&this->vfptr, pkAbState, bNoVisual);
  if ( pkAbState )
  {
    v4 = pkAbState->kID;
    v5 = ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable
                                                          + 16))(
                            ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable,
                            v4) )
    {
      if ( (unsigned __int16)v4 <= *(_WORD *)(v5 + 200) )
      {
        v6 = (int *)(*(_DWORD *)(v5 + 196) + 4 * v4);
        if ( *v6 )
        {
          v7 = *v6;
          if ( v7 )
          {
            if ( *(_DWORD *)(v7 + 34) == 392 )
              v3->m_IsTargetChangeView = 1;
            if ( *(_DWORD *)(v7 + 34) == 350 )
              v3->m_IsTargetChangeView = 1;
          }
        }
      }
    }
  }
}
// A8C2A0: using guessed type int ITableBase<AbnormalStateInfo,AbnormalStateInfoTab>::ms_pkTable;

//----- (00662A00) --------------------------------------------------------
bool __thiscall MainChar::InitView(MainChar *this, unsigned int uiFrame)
{
  MainChar *v2; // edi@1
  bool result; // al@1
  NiShader *v4; // eax@2
  NiShader *v5; // eax@2
  NiShader *v6; // esi@2
  NiNode *v7; // ebx@2

  v2 = this;
  result = Char::InitView((Char *)&this->vfptr, 1, uiFrame);
  if ( result )
  {
    v4 = (NiShader *)((int (__stdcall *)(void **))v2->m_spScene.m_pObject->vfptr[18].__vecDelDtor)(&off_9BA2F8);
    v5 = CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v4);
    v6 = (NiShader *)v2->m_spCollider.m_pObject;
    v7 = (NiNode *)v5;
    if ( v6 != v5 )
    {
      if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      v2->m_spCollider.m_pObject = v7;
      if ( v7 )
        InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
    }
    result = v2->m_spCollider.m_pObject != 0;
  }
  return result;
}
// 9BA2F8: using guessed type void *off_9BA2F8;

//----- (00662A90) --------------------------------------------------------
void __thiscall MainChar::UpdateMoveProgress(MainChar *this)
{
  MainChar *v1; // esi@1
  MainChar::MoveState v2; // eax@1
  NiPoint3 *v3; // eax@2
  float v4; // ST10_4@2
  float v5; // ST14_4@2
  float v6; // ST18_4@2
  float v7; // ST18_4@2
  float v8; // ST18_4@2
  float v9; // ecx@2
  float v10; // edx@2
  float v11; // eax@2
  int v12; // ecx@2
  float v13; // ST10_4@2
  float v14; // ST14_4@2
  double v15; // st7@2
  float v16; // ST18_4@2
  bool v17; // zf@2
  float v18; // eax@2
  float v19; // ecx@2
  float v20; // edx@2
  int v21; // eax@9
  MainChar::ReserveAct v22; // eax@10
  float v23; // edx@13
  float v24; // eax@13
  Char *v25; // ecx@16
  float v26; // eax@16
  float v27; // edx@16
  int v28; // eax@17
  MainChar::ReserveAct v29; // eax@23
  Char *v30; // edi@25
  float v31; // ST18_4@26
  MainChar::ReserveAct v32; // ST00_4@27
  int v33; // eax@27

  v1 = this;
  v2 = this->m_eStartMoveTarget;
  if ( v2 == 1 )
  {
    v3 = this->m_kMoveToTarget.vfptr->GetCurrentPos((NpNs_MoveToTarget *)&this->m_kMoveToTarget);
    v1->m_kResStartSPos.x = v3->x;
    v1->m_kResStartSPos.y = v3->y;
    v1->m_kResStartSPos.z = 0.0;
    v4 = v1->m_kResStartSPos.x - v1->m_kRevMovePos.x;
    v5 = v1->m_kResStartSPos.y - v1->m_kRevMovePos.y;
    v6 = v1->m_kResStartSPos.z - v1->m_kRevMovePos.z;
    v7 = v5 * v5 + v4 * v4 + v6 * v6;
    v8 = sqrt(v7);
    v9 = v1->m_kRevMovePos.x;
    v10 = v1->m_kRevMovePos.y;
    v1->m_fTotalMoveLength = v8;
    v11 = v1->m_kRevMovePos.z;
    v1->m_kFinalMoveTargetPos.x = v9;
    v1->m_kFinalMoveTargetPos.y = v10;
    v1->m_kFinalMoveTargetPos.z = v11;
    v12 = (int)&v1->m_pos3MoveDir;
    v13 = v1->m_kRevMovePos.x - v1->m_kResStartSPos.x;
    v14 = v1->m_kRevMovePos.y - v1->m_kResStartSPos.y;
    v15 = v1->m_kRevMovePos.z - v1->m_kResStartSPos.z;
    *(float *)v12 = v13;
    *(float *)(v12 + 4) = v14;
    v16 = v15;
    *(float *)(v12 + 8) = v16;
    NiPoint3::Unitize(&v1->m_pos3MoveDir);
    v17 = v1->m_eReserveAct == 4;
    v18 = v1->m_kResStartSPos.x;
    v19 = v1->m_kResStartSPos.y;
    v20 = v1->m_kResStartSPos.z;
    v1->m_kStartMovePos.x = v18;
    v1->m_kRevMovePos.x = v18;
    v1->m_kNextMovePos.x = v18;
    v1->m_kStartMovePos.y = v19;
    v1->m_kRevMovePos.y = v19;
    v1->m_kNextMovePos.y = v19;
    v1->m_kStartMovePos.z = v20;
    v1->m_kRevMovePos.z = v20;
    v1->m_kNextMovePos.z = v20;
    v1->m_bFinalMoveTargetPos = 0;
    if ( v17 )
      v1->m_eReserveAct = 1;
    if ( v1->m_eReserveAct == RESERVEACT_NONE )
      v1->m_eReserveAct = 1;
    v1->m_eStartMoveTarget = 2;
    MainChar::CulNextMovePosition(v1);
  }
  else if ( v2 == 2 )
  {
    if ( MainChar::IsPassResTargetPosition(this) )
    {
      v21 = v1->m_nCurWP + 1;
      v1->m_eStartMoveTarget = 3;
      if ( v21 >= v1->m_nWPCnt )
      {
        v22 = v1->m_eStartReserveAct;
        if ( v22 != 1 )
        {
          if ( v22 == 3 )
            v1->m_bAttackWill = 1;
          MainChar::SetReserveAct(v1, v22);
          v23 = v1->m_kFinalMoveTargetPos.y;
          v24 = v1->m_kFinalMoveTargetPos.z;
          v1->m_kRevMovePos.x = v1->m_kFinalMoveTargetPos.x;
          v1->m_kRevMovePos.y = v23;
          v1->m_kRevMovePos.z = v24;
        }
      }
    }
    else if ( MainChar::IsPassTargetPosition(v1) )
    {
      if ( v1->m_pkAttackTarget )
      {
        v25 = v1->m_pkTargetChar;
        v26 = v1->m_pos3InputTargetPos.y;
        v1->m_kRevMovePos.x = v1->m_pos3InputTargetPos.x;
        v27 = v1->m_pos3InputTargetPos.z;
        v1->m_kRevMovePos.y = v26;
        v1->m_nCurCornerCnt = 0;
        v1->m_eStartMoveTarget = 3;
        v1->m_kRevMovePos.z = v27;
        if ( v25 )
        {
          v28 = ((int (*)(void))v25->vfptr[6].Deaffect)();
          v1->m_kRevMovePos.x = *(float *)v28;
          v1->m_kRevMovePos.y = *(float *)(v28 + 4);
          v1->m_kRevMovePos.z = *(float *)(v28 + 8);
        }
        MainChar::StartPathFinding(v1);
      }
      else
      {
        MainChar::CulNextMovePosition(v1);
        v1->m_kMoveToTarget.vfptr->SetCurrentPos((NpNs_MoveToTarget *)&v1->m_kMoveToTarget, &v1->m_kStartMovePos);
        if ( v1->m_eReserveAct == 4 )
          v1->m_eReserveAct = 1;
        if ( v1->m_eReserveAct == RESERVEACT_NONE )
          v1->m_eReserveAct = 1;
      }
    }
    else
    {
      v29 = v1->m_eStartReserveAct;
      if ( v29 == 3 || v29 == 4 )
      {
        v30 = v1->m_pkTargetChar;
        if ( v30 )
        {
          v31 = Char::GetDistanceToChar((Char *)&v1->vfptr, v1->m_pkTargetChar);
          ((void (__thiscall *)(MainChar *, Char *))v1->vfptr[9].SetAbStateProperty)(v1, v30);
          if ( v31 + 50.0 - 10.0 > v31 )
          {
            v32 = v1->m_eStartReserveAct;
            v1->m_bAttackWill = 1;
            MainChar::SetReserveAct(v1, v32);
            v33 = ((int (*)(void))v1->vfptr[6].Deaffect)();
            v1->m_kRevMovePos.x = *(float *)v33;
            v1->m_kRevMovePos.y = *(float *)(v33 + 4);
            v1->m_kRevMovePos.z = *(float *)(v33 + 8);
          }
        }
      }
    }
  }
}

//----- (00662E10) --------------------------------------------------------
char __thiscall MainChar::InitCharactorTitle(MainChar *this, PROTO_NC_CHAR_CLIENT_CHARTITLE_CMD *pkProto)
{
  MainChar *v2; // edi@1
  char *v3; // eax@1
  unsigned __int16 v4; // ax@1
  char result; // al@2
  int v6; // eax@4
  char *v7; // esi@4
  int v8; // edx@4
  char v9; // cl@5
  char v10; // cl@8
  unsigned int v11; // ebx@17
  int v12; // esi@18
  char v13; // cl@19
  char *v14; // eax@20
  unsigned int i; // [sp+Ch] [bp-Ch]@3
  unsigned int uiCtInfoIndex; // [sp+10h] [bp-8h]@1

  v2 = this;
  this->ms_ctInfo[0] = (CT_INFO)-16384;
  Char::SetCharTitleUse((Char *)&this->vfptr, 0);
  v3 = CCharacterTitleData::GetTitleString(&g_characterTitleData, 0, 0);
  Char::SetCharTitleName((Char *)&v2->vfptr, v3);
  v2->ms_uiTotalCharTitle = 1;
  v4 = pkProto->NumOfTitle;
  uiCtInfoIndex = 0;
  if ( v4 <= 0x210u )
  {
    i = 0;
    if ( v4 > 0u )
    {
      v6 = (int)&v2->ms_ctInfo[0] + 1;
      v7 = &pkProto[1].CurrentTitleElement;
      v8 = (int)v2->ms_ctInfo;
      do
      {
        *(_BYTE *)(v8 + 2) = *(v7 - 1);
        v9 = *v7 ^ *(_BYTE *)(v6 + 2);
        ++uiCtInfoIndex;
        v6 += 2;
        v8 += 2;
        *(_BYTE *)v6 ^= v9 & 0x3F;
        *(_BYTE *)v6 = *v7 ^ (*(_BYTE *)v6 ^ *v7) & 0x3F;
        if ( (*v7 & 0xC0) == -64 && *(v7 - 1) != 10 )
          *((_BYTE *)&v2->ms_ctInfo[0] + 1) = *((_BYTE *)&v2->ms_ctInfo[0] + 1) & 0x3F | 0x80;
        v10 = *(_BYTE *)v8;
        if ( *(_BYTE *)v8 && v10 != 10 )
        {
          if ( (pkProto->CurrentTitle != v10
             || pkProto->CurrentTitleElement != (*(_BYTE *)v6 & 0x3F)
             || (*(_BYTE *)v6 & 0xC0) != -64)
            && (*v7 & 0xC0) == -64 )
          {
            *(_BYTE *)v6 = *(_BYTE *)v6 & 0x3F | 0x80;
          }
        }
        else
        {
          --uiCtInfoIndex;
          v8 -= 2;
          v6 -= 2;
        }
        v7 += 2;
        ++i;
      }
      while ( i < pkProto->NumOfTitle );
    }
    v2->ms_uiTotalCharTitle += uiCtInfoIndex;
    v11 = 0;
    if ( v2->ms_uiTotalCharTitle != 1 )
    {
      v12 = (int)&v2->ms_ctInfo[0] + 1;
      do
      {
        v13 = *(_BYTE *)(v12 + 2);
        v12 += 2;
        if ( (v13 & 0xC0) == -64 )
        {
          *((_BYTE *)&v2->ms_ctInfo[0] + 1) = *((_BYTE *)&v2->ms_ctInfo[0] + 1) & 0x3F | 0x80;
          Char::SetCharTitleUse((Char *)&v2->vfptr, 1);
          v14 = CCharacterTitleData::GetTitleString(&g_characterTitleData, *(_BYTE *)(v12 - 1), *(_BYTE *)v12 & 0x3F);
          Char::SetCharTitleName((Char *)&v2->vfptr, v14);
        }
        ++v11;
      }
      while ( v11 < v2->ms_uiTotalCharTitle - 1 );
    }
    MainChar::InitCharactorWeaponTitle(v2, pkProto->CurrentTitle, pkProto->CurrentTitleMobID);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00662FD0) --------------------------------------------------------
void __thiscall MainChar::SetTargetChar(MainChar *this, Char *pkChar)
{
  MainChar *v2; // edi@1
  bool v3; // bl@1
  Char *v4; // edi@2
  NiUnsharedGeometryGroup *v5; // eax@27
  MainChar *v6; // [sp+Ch] [bp-8h]@1
  DirectUserMsgBody_TargetCharSoulCount_Clear pvBody; // [sp+13h] [bp-1h]@1

  v2 = this;
  v3 = 1;
  v6 = this;
  pvBody.m_bShowUI = 1;
  switch ( Char::GetClass((Char *)&this->vfptr) )
  {
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      v4 = v2->m_pkTargetChar;
      if ( v4 )
      {
        if ( pkChar )
        {
          if ( !(unsigned __int8)((int (__thiscall *)(_DWORD))pkChar->vfptr[1].Affect)(pkChar)
            && !pkChar->m_bUserCharacter )
          {
            v3 = 0;
          }
          if ( Char::IsResource(pkChar) || Char::IsLinkGate(pkChar) || Char::IsNPC(pkChar) )
            v3 = 0;
          pvBody.m_bShowUI = v3;
          if ( v4->m_kHandle != pkChar->m_kHandle )
            ITask::DirectDispatchAll(76, &pvBody);
          goto LABEL_13;
        }
      }
      else if ( pkChar )
      {
        if ( !(unsigned __int8)((int (__thiscall *)(_DWORD))pkChar->vfptr[1].Affect)(pkChar)
          && !pkChar->m_bUserCharacter )
        {
          v3 = 0;
        }
        if ( Char::IsResource(pkChar) || Char::IsLinkGate(pkChar) || Char::IsNPC(pkChar) )
          v3 = 0;
      }
      pvBody.m_bShowUI = v3;
      ITask::DirectDispatchAll(76, &pvBody);
LABEL_13:
      v2 = v6;
      goto LABEL_14;
    default:
      pvBody.m_bShowUI = 0;
      ITask::DirectDispatchAll(76, &pvBody);
LABEL_14:
      if ( pkChar )
      {
        if ( (unsigned int)(nowState - 3) > 3 )
        {
          v2->m_pkTargetChar = pkChar;
        }
        else
        {
          v5 = TextData2::Get(0x1275B71u);
          ITask::DirectDispatchAll(25, v5);
        }
      }
      else
      {
        v2->m_pkTargetChar = 0;
      }
      return;
  }
}

//----- (00663150) --------------------------------------------------------
void __thiscall MainChar::MetamorphosisTargetClear(MainChar *this)
{
  MainChar *v1; // esi@1
  MobInfo *v2; // eax@1
  char pvBody; // [sp+7h] [bp-1h]@3

  v1 = this;
  v2 = Char::GetMobInfo((Char *)&this->vfptr);
  if ( v2 && v2->Type == 17 )
  {
    pvBody = 1;
    switch ( Char::GetClass((Char *)&v1->vfptr) )
    {
      case 0x15:
      case 0x16:
      case 0x17:
      case 0x18:
      case 0x19:
        pvBody = 1;
        ITask::DirectDispatchAll(76, &pvBody);
        break;
      default:
        pvBody = 0;
        ITask::DirectDispatchAll(76, &pvBody);
        break;
    }
    v1->m_pkTargetChar = 0;
  }
}

//----- (006631E0) --------------------------------------------------------
void __thiscall MainChar::ExecuteDyingProcess(MainChar *this)
{
  PgFrameWork *v1; // eax@1
  PgFrameWork *v2; // esi@1
  ServerMenuWin *v3; // edi@2
  ReviveMenuWin *v4; // ebx@2
  unsigned __int8 v5; // bl@4
  UserTradeWin *v6; // edi@6
  MapNavigator *v7; // edi@8
  MapNavigator *v8; // ebx@9
  GTInformWin *v9; // esi@13
  D3DXCOLOR *v10; // eax@14
  D3DXCOLOR v11; // ST04_16@14
  char *v12; // eax@14
  D3DXCOLOR v13; // [sp+14h] [bp-18h]@14
  Char *v14; // [sp+24h] [bp-8h]@1
  NiPointer<MapNavigator> result; // [sp+28h] [bp-4h]@8

  v14 = (Char *)this;
  v1 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  v2 = v1;
  if ( v1 )
  {
    PrivateStoreWin::SetPrivateStoreOpen((PrivateStoreWin *)v1[20].m_kMsgQ.m_uiAlloced, 0);
    InventoryWin::LockAllItem((InventoryWin *)v2[19].m_BackFrameID);
    v3 = (ServerMenuWin *)v2[26].m_pkMsgHooker;
    v4 = (ReviveMenuWin *)v2[26].m_kMsgQ.m_pBase;
    if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v3->vfptr[65].__vecDelDtor)(v2[26].m_pkMsgHooker) )
    {
      if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v4->vfptr[65].__vecDelDtor)(v4) )
      {
        v5 = ReviveMenuWin::GetPriority(v4);
        if ( (unsigned __int8)ServerMenuWin::GetPriority(v3) < v5 )
          ServerMenuWin::OnBut2(v3);
      }
    }
    v6 = (UserTradeWin *)v2[25].m_BackFrameID;
    if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v6->vfptr[65].__vecDelDtor)(v2[25].m_BackFrameID) )
      UserTradeWin::OnCmdCancel(v6);
    v7 = MapNavigator::GetMapNavigator(&result)->m_pObject;
    if ( result.m_pObject )
    {
      v8 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v8 )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      }
    }
    if ( v7->m_bIsWorking )
    {
      v7->m_bIsWorking = 0;
      v9 = (GTInformWin *)v2[33].m_kMsgQ.m_uiHead;
      if ( v9 )
      {
        GTInformWin::Clear(v9);
        v10 = Color::GetDxColor(&v13, -1, -112, 0, -1);
        *(_QWORD *)&v11.r = *(_QWORD *)&v10->r;
        *(_QWORD *)&v11.b = *(_QWORD *)&v10->b;
        v12 = (char *)TextData2::Get(0x3C517589u);
        GTInformWin::AddText(v9, v12, v11, 0, 3.0);
      }
    }
  }
  Char::ExecuteDyingProcess(v14);
}

//----- (00663340) --------------------------------------------------------
void __thiscall MainChar::Update(MainChar *this, float fTime)
{
  MainChar *v2; // esi@1
  unsigned int v3; // eax@5
  unsigned int v4; // eax@7
  GameFrameWork *v5; // eax@6
  Mover *v6; // eax@13
  char _fTime[8]; // [sp+0h] [bp-8h]@6

  v2 = this;
  Char::Update((Char *)&this->vfptr, fTime);
  MainChar::UpdatePathFinding(v2);
  MainChar::UpdateMoveProgress(v2);
  if ( ((int (__thiscall *)(_DWORD))v2->vfptr[13].DeleteAbStateByAbstateIndex)(v2) == 2 )
  {
    if ( !b_sMainCharPause )
    {
      CNSTimer_Interval::ReSet(&v2->m_kMainCharMotionPTimer, Timer::ms_fCurTime);
      v2->m_kMainCharMotionPTimer.m_fCheckTime = 3.0;
      b_sMainCharPause = 1;
    }
    if ( CNSTimer_Interval::IsRun_GetCount(&v2->m_kMainCharMotionPTimer, fTime) )
    {
      v3 = ((int (__thiscall *)(_DWORD))v2->vfptr[13].~AbStateInfectee)(v2);
      if ( (unsigned __int16)Char::GetEmotionIndex((Char *)&v2->vfptr, v3) == -1 )
      {
        _fTime[0] = 0;
        v5 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      }
      else
      {
        v4 = ((int (__thiscall *)(_DWORD))v2->vfptr[13].~AbStateInfectee)(v2);
        *(_DWORD *)_fTime = (unsigned __int8)Char::GetEmotionIndex((Char *)&v2->vfptr, v4);
        v5 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      }
      GameFrameWork::NcActEmoticon_Cmd(v5, _fTime[0]);
    }
  }
  else
  {
    b_sMainCharPause = 0;
  }
  if ( v2->m_bAirBorne && Skill::IsSkillUsePossible(v2->m_kAirBorneID) )
    v2->m_bAirBorne = 0;
  v6 = v2->m_pkMover;
  if ( v6 )
    v6->m_bWay = v2->m_bWay;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00663460) --------------------------------------------------------
void __thiscall MainChar::StartMoveTarget(MainChar *this)
{
  MainChar *v1; // esi@1
  float v2; // ecx@2
  float v3; // edx@2

  v1 = this;
  if ( this->m_bPathFindingStart )
  {
    v2 = this->m_kRevMovePos.y;
    v3 = v1->m_kRevMovePos.z;
    v1->m_nCurCornerCnt = 0;
    v1->m_bPathFindingStart = 0;
    v1->m_pos3InputTargetPos.x = v1->m_kRevMovePos.x;
    v1->m_pos3InputTargetPos.y = v2;
    v1->m_eStartMoveTarget = 3;
    v1->m_pos3InputTargetPos.z = v3;
    MainChar::StartPathFinding(v1);
  }
  MainChar::UpdatePathFinding(v1);
  MainChar::UpdateMoveProgress(v1);
}

//----- (006634C0) --------------------------------------------------------
void __thiscall MainChar::ActEmotionIndex(MainChar *this, unsigned int uiEmotionIndex)
{
  MainChar *v2; // esi@1
  int v3; // edi@7
  int *v4; // eax@9
  int v5; // edi@10
  char v6; // cl@13
  unsigned __int8 v7; // bl@13
  MHEmotion *v8; // esi@13
  GameFrameWork *v9; // eax@14
  AbStateInfecteeVtbl *v10; // esi@16
  int v11; // eax@16
  int v12; // eax@17
  unsigned int v13; // eax@18
  ActionViewInfo *v14; // eax@19
  NiActorManager *v15; // ecx@20
  void (__thiscall *v16)(AbStateInfectee *, ABSTATEINDEX, bool, int); // edx@22
  NiPoint3 kGroundPos; // [sp+4h] [bp-1Ch]@14
  mhCharEmotionInfo Info; // [sp+10h] [bp-10h]@13
  unsigned int ui1stAniCode; // [sp+1Ch] [bp-4h]@1

  v2 = this;
  Char::GetAniCode((Char *)&this->vfptr, 0, &ui1stAniCode, 0);
  if ( (ui1stAniCode == 100000 || ui1stAniCode == 800000 || v2->m_eEmotionState == 4)
    && !JumpProcessor::IsJump(&v2->m_kJumpProcessor) )
  {
    if ( v2->m_eEmotionState == 2 )
    {
      ((void (__thiscall *)(MainChar *))v2->vfptr[13].Affect)(v2);
      return;
    }
    v3 = ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, unsigned int))(*(_DWORD *)ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable
                                                                   + 16))(
                            ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable,
                            uiEmotionIndex) )
    {
      if ( (unsigned __int16)uiEmotionIndex <= *(_WORD *)(v3 + 200) )
      {
        v4 = (int *)(*(_DWORD *)(v3 + 196) + 4 * (unsigned __int16)uiEmotionIndex);
        if ( *v4 )
        {
          v5 = *v4;
          if ( *v4 )
          {
            if ( v2->m_eEmotionState != 4 || nowState == MH_STATE_NO )
            {
              v12 = *(_WORD *)(v5 + 65);
              if ( (_WORD)v12 == -1 )
              {
                v2->m_uiEmotionIndex = uiEmotionIndex;
                v13 = *(_DWORD *)(v5 + 105);
              }
              else
              {
                v14 = IIDTableBase<ActionViewInfo,ActionViewTable,unsigned short>::GetByID(v12);
                if ( !v14 )
                  return;
                v15 = v2->m_spActor.m_pObject;
                if ( !v15 )
                  return;
                if ( v14->nAfterCode == v15->m_eCurID )
                {
                  v16 = v2->vfptr[14].SetAbStateProperty;
                  v2->m_uiEmotionIndex = uiEmotionIndex;
                  ((void (__thiscall *)(MainChar *, _DWORD))v16)(v2, *(_DWORD *)(v5 + 105));
                  return;
                }
                v2->m_uiEmotionIndex = v14->nIndex;
                v13 = v14->nEventCode;
              }
              ((void (__thiscall *)(MainChar *, unsigned int))v2->vfptr[14].SetAbStateProperty)(v2, v13);
              return;
            }
            v6 = *(_BYTE *)v5;
            v7 = *((_BYTE *)&qword_A99558 + 4);
            *(_DWORD *)&Info.TargetObjID = *(_DWORD *)&qword_A99558;
            v8 = MiniHouseEmotionTab::GetNonMenuEmotion(*unk_A99560, v6);
            if ( v8 )
            {
              v9 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
              GameFrameWork::GetGroundPosCam(v9, &kGroundPos);
              if ( Info.TargetObjID == -1 )
              {
                ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[13].AddAbStateByAbstateIndex)(0);
                v10 = g_pkMainChar->vfptr;
                v11 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
                ((void (__thiscall *)(Char *, int))v10[6].Affect)(g_pkMainChar, v11);
              }
              else
              {
                MiniHouseIndoor::StartMHCharEmotion(&g_kWorld.m_MiniHouseIndoorMode, &kGroundPos, v7, v8->ActionIndex);
              }
            }
          }
        }
      }
    }
  }
}
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;

//----- (006636B0) --------------------------------------------------------
int __thiscall MainChar::GetTargetType(MainChar *this, Char *pkTarget)
{
  MainChar *v2; // ebx@1
  int v3; // eax@5
  MobInfo *v4; // edi@5
  MobType v6; // eax@8
  CMiniHouseMgr *v7; // eax@11
  stMINIHOUSEINFO *v8; // eax@11
  const char *v9; // eax@16
  PartyMemberInfo *v10; // edi@16
  const char *v11; // eax@16
  RaidMemberInfo *v12; // eax@16
  char v13; // cl@20
  const char *v14; // eax@21
  const char *v15; // eax@22
  unsigned int v16; // ecx@24
  char v17; // al@25
  const char *v18; // eax@30
  const char *v19; // eax@31
  CClientGuildAcademy *v20; // eax@33
  CClientGuildAcademy *v21; // eax@35
  CClientGuildAcademy *v22; // eax@37
  CClientGuild *v23; // eax@39
  CClientGuild *v24; // eax@41
  CClientGuild *v25; // eax@43
  char v26; // al@45
  CClientGuild *v27; // eax@48
  CClientGuild *v28; // edi@48
  unsigned int v29; // esi@49
  Name5 v30; // [sp-14h] [bp-20h]@16
  signed int v31; // [sp-4h] [bp-10h]@5

  v2 = this;
  if ( !pkTarget || (MainChar *)pkTarget == this )
    return 0;
  if ( pkTarget->m_byType == 5 )
    return 3;
  if ( (unsigned __int8)((int (__thiscall *)(Char *))pkTarget->vfptr[1].Affect)(pkTarget) )
  {
    v3 = pkTarget->m_kCharShape.m_kMobID;
    v31 = 1;
    v4 = IIDTableBase<MobInfo,MobInfoTab,unsigned short>::GetByID(v3);
    if ( !v4 )
      goto LABEL_54;
    if ( Char::IsNPC(pkTarget) )
      return (v4->IsPlayerSide == 2) + 1;
    v6 = v4->Type;
    if ( v6 == 25 )
      return 1;
    if ( v6 != 27 )
    {
LABEL_54:
      if ( v4->Type == 24 )
        return 1;
      v31 = pkTarget->m_kHandle;
      CGuildMonster::GetInstance();
      v8 = CGuildMonster::GetGuildEumFromMob(v7, v31);
      if ( v8 )
      {
        if ( (stMINIHOUSEINFO *)v2->m_dwGuildRegNum == v8 )
          return 1;
      }
      return 3;
    }
    return 0;
  }
  if ( (unsigned __int8)((int (__thiscall *)(Char *))pkTarget->vfptr[20].DeleteAbStateByAbstateIndex)(pkTarget) )
    return 9;
  v9 = (const char *)((int (__thiscall *)(Char *))pkTarget->vfptr[2].DeleteAbStateByAbstateIndex)(pkTarget);
  Name5::Name5(&v30, v9);
  v10 = Party::GetMemberInfo(&g_kParty, v30);
  v11 = (const char *)((int (__thiscall *)(Char *))pkTarget->vfptr[2].DeleteAbStateByAbstateIndex)(pkTarget);
  Name5::Name5(&v30, v11);
  v12 = RaidInfo::GetRaidMemberInfo(&g_kRaidinfo, v30);
  if ( !v10 && !v12 && v2->m_byPkGrade & 2 || pkTarget->m_kAbStateProperty.iKarenCaptivateStateCount > 0 )
    return 3;
  v13 = v2->m_byPkGrade;
  if ( !(v13 & 1) )
  {
    v26 = v2->m_byKQTeamType;
    if ( v26 == 2 || !(v13 & 4) || v26 == pkTarget->m_byKQTeamType )
      goto LABEL_48;
    return 3;
  }
  v14 = (const char *)((int (__thiscall *)(_DWORD))pkTarget->vfptr[2].DeleteAbStateByAbstateIndex)(pkTarget);
  Name5::Name5(&v30, v14);
  if ( Party::GetMemberInfo(&g_kParty, v30)
    || (v15 = (const char *)((int (__thiscall *)(_DWORD))pkTarget->vfptr[2].DeleteAbStateByAbstateIndex)(pkTarget),
        Name5::Name5(&v30, v15),
        RaidInfo::GetRaidMemberInfo(&g_kRaidinfo, v30)) )
  {
    v18 = (const char *)((int (__thiscall *)(_DWORD))pkTarget->vfptr[2].DeleteAbStateByAbstateIndex)(pkTarget);
    Name5::Name5(&v30, v18);
    if ( !Party::GetMemberInfo(&g_kParty, v30) )
    {
      v19 = (const char *)((int (__thiscall *)(_DWORD))pkTarget->vfptr[2].DeleteAbStateByAbstateIndex)(pkTarget);
      Name5::Name5(&v30, v19);
      if ( !RaidInfo::GetRaidMemberInfo(&g_kRaidinfo, v30) )
        goto LABEL_48;
    }
    if ( unk_B25074 != 4 )
      goto LABEL_48;
    v20 = GuildAcademyTask::GetGuildAcademy();
    if ( CClientGuildAcademy::IsGuildWar(v20) )
    {
      if ( pkTarget->m_GuildAcademyMemberFlag != 1 )
        goto LABEL_37;
      v31 = pkTarget->m_dwGuildRegNum;
      v21 = GuildAcademyTask::GetGuildAcademy();
      if ( !CClientGuildAcademy::FindEnemyGuildAcademyMember(v21, v31) )
      {
        if ( pkTarget->m_GuildAcademyMemberFlag != 1 )
        {
LABEL_37:
          v31 = pkTarget->m_dwGuildRegNum;
          v22 = GuildAcademyTask::GetGuildAcademy();
          if ( CClientGuildAcademy::FindEnemyGuildAcademyMember(v22, v31) )
            return 3;
        }
LABEL_48:
        v27 = GuildTask::GetGuild();
        v28 = v27;
        if ( !v27 )
          return 0;
        v29 = pkTarget->m_dwGuildRegNum;
        if ( !CClientGuild::IsAttackableEnemyGuild(v27, v29) && !CClientGuild::IsGttAttackableEnemyGuild(v28, v29) )
          return 0;
        return 3;
      }
    }
    else
    {
      v31 = pkTarget->m_dwGuildRegNum;
      v23 = GuildTask::GetGuild();
      if ( !CClientGuild::IsEnemyGuild(v23, v31) )
        goto LABEL_48;
      if ( pkTarget->m_GuildAcademyMemberFlag != 1
        || (v31 = pkTarget->m_dwGuildRegNum, v24 = GuildTask::GetGuild(),
                                             !CClientGuild::IsAttackableEnemyGuild(v24, v31)) )
      {
        if ( !pkTarget->m_GuildAcademyMemberFlag )
        {
          v31 = pkTarget->m_dwGuildRegNum;
          v25 = GuildTask::GetGuild();
          if ( CClientGuild::IsAttackableEnemyGuild(v25, v31) )
            return 3;
        }
        goto LABEL_48;
      }
    }
    return 3;
  }
  if ( unk_B25074 != 4 )
    return 3;
  v16 = pkTarget->m_dwGuildRegNum;
  if ( !v16 )
    return 3;
  v17 = pkTarget->m_GuildAcademyMemberFlag;
  if ( (v17 != 1 || g_pkMainChar->m_dwGuildRegNum != v16) && (v17 || g_pkMainChar->m_dwGuildRegNum != v16) )
    return 3;
  return 0;
}

//----- (00663A10) --------------------------------------------------------
void __thiscall MainChar::ResetOnLink(MainChar *this)
{
  MainChar *v1; // esi@1
  bool (__thiscall *v2)(AbStateInfectee *, ABSTATEINDEX, float, bool); // eax@4
  char v3; // al@4
  AbStateInfecteeVtbl *v4; // edx@4
  bool (__thiscall *v5)(AbStateInfectee *, ABSTATEINDEX, float, bool); // eax@4
  char v6; // al@4
  std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *v7; // eax@6
  int v8; // edi@8
  MsgBox *v9; // ebx@9
  const char *v10; // eax@9
  EffectObjectMgr *v11; // eax@15
  char pvBody; // [sp+Bh] [bp-1h]@1

  v1 = this;
  ((void (*)(void))this->vfptr[13].Deaffect)();
  ((void (__thiscall *)(MainChar *))v1->vfptr[10].DeleteAbStateByAbstateIndex)(v1);
  Char::ResetSkillAction((Char *)&v1->vfptr);
  v1->m_AttackTargetHandle = -1;
  Char::ResetAction((Char *)&v1->vfptr);
  v1->m_kReserveSkillID = -1;
  v1->m_eReserveAct = 0;
  v1->m_eReserveSkillType = 0;
  v1->m_eStartReserveAct = 0;
  v1->m_bAttackWill = 0;
  pvBody = 1;
  switch ( Char::GetClass((Char *)&v1->vfptr) )
  {
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      pvBody = 1;
      ITask::DirectDispatchAll(76, &pvBody);
      break;
    default:
      pvBody = 0;
      ITask::DirectDispatchAll(76, &pvBody);
      break;
  }
  v2 = v1->vfptr[1].AddAbStateByAbstateIndex;
  v1->m_pkTargetChar = 0;
  v1->m_bNewClickChar = 0;
  v3 = ((int (__thiscall *)(MainChar *))v2)(v1);
  v4 = v1->vfptr;
  pvBody = v3;
  v5 = v4[1].AddAbStateByAbstateIndex;
  v1->m_byMode = 1;
  v1->m_eStandMode = 0;
  v6 = ((int (__thiscall *)(MainChar *))v5)(v1);
  if ( pvBody != v6 )
    v1->m_bIsChangeCampMode = 1;
  AttackSequenceManager::ClearAttSeq((AttackSequenceManager *)&v1->vfptr);
  AbStateInfectee::ClearAbState((AbStateInfectee *)&v1->vfptr, 1);
  v1->m_bWillDead = 0;
  Char::InitHpUpdate((Char *)&v1->vfptr);
  v1->m_pkMover = 0;
  Char::RideOff((Char *)&v1->vfptr);
  ((void (__thiscall *)(MainChar *, signed int))v1->vfptr[7].AddAbStateByAbstateIndex)(v1, 1);
  ITask::DirectDispatchAll(32, v1);
  CGuildMonster::GetInstance();
  std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::clear(v7);
  if ( (unsigned __int8)((int (__thiscall *)(MainChar *))v1->vfptr[15].Deaffect)(v1) )
    Char::GetoutOfPet((Char *)&v1->vfptr);
  StatPointReqTask::ClearState();
  v8 = unk_B64830;
  while ( v8 )
  {
    v9 = *(MsgBox **)(v8 + 8);
    v10 = v9->m_pcName;
    v8 = *(_DWORD *)v8;
    if ( v10 && !strncmp(v10, "MsgBox", 6u) )
    {
      MsgBox::CloseWithCancel(v9);
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v9->vfptr);
    }
  }
  if ( ISingletonTask<ItemUseTask>::ms_pkSingletonTask )
    *(_DWORD *)(ISingletonTask<ItemUseTask>::ms_pkSingletonTask + 20) = 2;
  v1->m_byPkGrade = 0;
  v11 = EffectObjectMgr::GetMgr();
  if ( v11 )
    EffectObjectMgr::RemoveAllEffectObject(v11);
}
// A8CAC0: using guessed type int ISingletonTask<ItemUseTask>::ms_pkSingletonTask;

//----- (00663BF0) --------------------------------------------------------
NiPoint3 *__thiscall NpNs_MoveToTarget::GetCurrentPos(NpNs_MoveToTarget *this)
{
  return &this->m_pos3Cur;
}

//----- (00663C00) --------------------------------------------------------
MainChar *__thiscall MainChar::`vector deleting destructor'(char *this, unsigned int a2)
{
  return MainChar::`scalar deleting destructor'((MainChar *)(this - 88), a2);
}

//----- (00663C10) --------------------------------------------------------
MainChar *__thiscall MainChar::`vector deleting destructor'(char *this, unsigned int a2)
{
  return MainChar::`scalar deleting destructor'((MainChar *)(this - 64), a2);
}

//----- (00663C20) --------------------------------------------------------
char __thiscall MainChar::SetTargetAnimation(MainChar *this, unsigned int uiAniEventCode)
{
  return Char::SetTargetAnimation((Char *)&this->vfptr, uiAniEventCode, 0, 0);
}

//----- (00663C40) --------------------------------------------------------
double MainChar::GetCameraLookHeight()
{
  return 32.0;
}

//----- (00663C50) --------------------------------------------------------
void __thiscall MainChar::SetDir(Char *this, NiPoint3 *kDir)
{
  NiPoint3 kUpDir; // [sp+0h] [bp-Ch]@1

  kUpDir.x = 0.0;
  kUpDir.y = 0.0;
  kUpDir.z = 1.0;
  NpNs_SmoothRotateControler::SetDirection(&this->m_kSmoothRotater, kDir, &kUpDir);
}

//----- (00663C80) --------------------------------------------------------
void __thiscall MainChar::StopMoveTarget(MainChar *this)
{
  MainChar *v1; // esi@1

  v1 = this;
  Char::StopMoveTarget((Char *)&this->vfptr);
  v1->m_eStartMoveTarget = 0;
  v1->m_bWay = 0;
}

//----- (00663CA0) --------------------------------------------------------
NiNode *__thiscall MainChar::GetCollider(MainChar *this)
{
  return this->m_spCollider.m_pObject;
}

//----- (00663CB0) --------------------------------------------------------
void __thiscall MainChar::InitPos(MainChar *this, NiPoint3 *kPos, NiPoint3 *kDir)
{
  MainChar *v3; // esi@1
  float v4; // ecx@1
  float v5; // edi@1

  v3 = this;
  ((void (*)(void))this->vfptr[21].SetAbStateProperty)();
  Char::InitPos((Char *)&v3->vfptr, kPos, kDir);
  v4 = kPos->y;
  v5 = kPos->z;
  v3->m_kFinalMoveTargetPos.x = kPos->x;
  v3->m_kFinalMoveTargetPos.y = v4;
  v3->m_kFinalMoveTargetPos.z = v5;
}

//----- (00663CF0) --------------------------------------------------------
void __thiscall MainChar::SetPos(MainChar *this, NiPoint3 *kPos)
{
  MainChar *v2; // esi@1
  NiNode *v3; // esi@1

  v2 = this;
  this->m_kMoveToTarget.vfptr->SetCurrentPos((NpNs_MoveToTarget *)&this->m_kMoveToTarget, kPos);
  v2->m_pos3CameraPos = *kPos;
  v3 = v2->m_spCollider.m_pObject;
  if ( v3 )
    v3->m_kLocal.m_Translate = *kPos;
}

//----- (00663D50) --------------------------------------------------------
MainChar *__thiscall MainChar::`scalar deleting destructor'(MainChar *this, unsigned int a2)
{
  MainChar *v2; // esi@1

  v2 = this;
  MainChar::~MainChar(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00663D80) --------------------------------------------------------
void __thiscall MoveToTarget::Copy(MoveToTarget *this, MoveToTarget *kMoveToTarget)
{
  kMoveToTarget->m_bmove = this->m_bmove;
  kMoveToTarget->m_fStartTime = this->m_fStartTime;
  kMoveToTarget->m_fOldTime = this->m_fOldTime;
  kMoveToTarget->m_pos3Start.x = this->m_pos3Start.x;
  kMoveToTarget->m_pos3Start.y = this->m_pos3Start.y;
  kMoveToTarget->m_pos3Start.z = this->m_pos3Start.z;
  kMoveToTarget->m_pos3End.x = this->m_pos3End.x;
  kMoveToTarget->m_pos3End.y = this->m_pos3End.y;
  kMoveToTarget->m_pos3End.z = this->m_pos3End.z;
  kMoveToTarget->m_pos3Cur.x = this->m_pos3Cur.x;
  kMoveToTarget->m_pos3Cur.y = this->m_pos3Cur.y;
  kMoveToTarget->m_pos3Cur.z = this->m_pos3Cur.z;
  kMoveToTarget->m_pos3OldPos.x = this->m_pos3OldPos.x;
  kMoveToTarget->m_pos3OldPos.y = this->m_pos3OldPos.y;
  kMoveToTarget->m_pos3OldPos.z = this->m_pos3OldPos.z;
  kMoveToTarget->m_pos3DirMove.x = this->m_pos3DirMove.x;
  kMoveToTarget->m_pos3DirMove.y = this->m_pos3DirMove.y;
  kMoveToTarget->m_pos3DirMove.z = this->m_pos3DirMove.z;
  kMoveToTarget->m_fMoveLength = this->m_fMoveLength;
  kMoveToTarget->m_fSpeed = this->m_fSpeed;
  kMoveToTarget->m_bmove = this->m_bmove;
}

//----- (00663E10) --------------------------------------------------------
void __thiscall MoveToTarget::MoveToTarget(MoveToTarget *this)
{
  MoveToTarget *v1; // esi@1

  v1 = this;
  NpNs_MoveToTarget::NpNs_MoveToTarget((NpNs_MoveToTarget *)&this->vfptr);
  v1->m_fFlateHeight = 0.0;
  v1->vfptr = (NpNs_MoveToTargetVtbl *)&MoveToTarget::`vftable';
  v1->m_fWillSpeed = 0.0;
  v1->m_bEmotion = 0;
}
// 9BA834: using guessed type int (__thiscall *MoveToTarget::`vftable')(void *p, char);

//----- (00663E30) --------------------------------------------------------
void __thiscall MoveToTarget::~MoveToTarget(MoveToTarget *this)
{
  this->vfptr = (NpNs_MoveToTargetVtbl *)&Ns_XYFlatMoveToTarget::`vftable';
  NpNs_MoveToTarget::~NpNs_MoveToTarget((NpNs_MoveToTarget *)&this->vfptr);
}
// 9BA7E4: using guessed type int (__thiscall *Ns_XYFlatMoveToTarget::`vftable')(void *p, char);

//----- (00663E40) --------------------------------------------------------
void __thiscall MoveToTarget::ChangeSpeed(MoveToTarget *this, float fSpeed)
{
  MoveToTarget *v2; // esi@1
  NpNs_MoveToTargetVtbl *v3; // eax@1

  v2 = this;
  v3 = this->vfptr;
  this->m_fSpeed = fSpeed;
  if ( (unsigned __int8)(*(int (**)(void))&v3->gap4[0])() )
    ((void (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD))v2->vfptr->StartMove)(
      v2,
      LODWORD(Timer::ms_fCurTime),
      &v2->m_pos3Cur,
      &v2->m_pos3End);
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00663E80) --------------------------------------------------------
void __userpurge MoveToTarget::SetEmotion(MoveToTarget *this@<ecx>, double a2@<st0>, bool bEmotion)
{
  MoveToTarget *v3; // esi@1
  int (*v4)(void); // edx@2
  int (__thiscall *v5)(MoveToTarget *); // eax@4

  v3 = this;
  this->m_bEmotion = bEmotion;
  if ( bEmotion )
  {
    ((void (*)(void))this->vfptr->GetSpeed)();
    v3->m_fWillSpeed = a2;
    v5 = *(int (__thiscall **)(MoveToTarget *))&v3->vfptr->gap4[0];
    v3->m_fSpeed = 0.0;
    if ( (unsigned __int8)v5(v3) )
      ((void (__thiscall *)(MoveToTarget *, _DWORD, NiPoint3 *, NiPoint3 *))v3->vfptr->StartMove)(
        v3,
        LODWORD(Timer::ms_fCurTime),
        &v3->m_pos3Cur,
        &v3->m_pos3End);
  }
  else
  {
    v4 = *(int (**)(void))&this->vfptr->gap4[0];
    this->m_fSpeed = this->m_fWillSpeed;
    if ( (unsigned __int8)v4() )
      ((void (__thiscall *)(MoveToTarget *, _DWORD, NiPoint3 *, NiPoint3 *))v3->vfptr->StartMove)(
        v3,
        LODWORD(Timer::ms_fCurTime),
        &v3->m_pos3Cur,
        &v3->m_pos3End);
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00663F00) --------------------------------------------------------
void __thiscall MoveToTarget::SetSpeed(MoveToTarget *this, float _fMovingSpeed)
{
  bool v2; // zf@1

  v2 = this->m_bEmotion == 0;
  this->m_fWillSpeed = _fMovingSpeed;
  if ( v2 )
    this->m_fSpeed = _fMovingSpeed;
}

//----- (00663F20) --------------------------------------------------------
void __thiscall NpNs_MoveToTarget::SetSpeed(NpNs_MoveToTarget *this, float _fMovingSpeed)
{
  this->m_fSpeed = _fMovingSpeed;
}

//----- (00663F30) --------------------------------------------------------
bool __thiscall NpNs_MoveToTarget::IsMove(NpNs_MoveToTarget *this)
{
  return this->m_bmove;
}

//----- (00663F40) --------------------------------------------------------
double __thiscall NpNs_MoveToTarget::GetSpeed(NpNs_MoveToTarget *this)
{
  return this->m_fSpeed;
}

//----- (00663F50) --------------------------------------------------------
void __thiscall NpNs_MoveToTarget::SetCurrentPos(NpNs_MoveToTarget *this, NiPoint3 *_pos3)
{
  NpNs_MoveToTarget *v2; // esi@1

  v2 = this;
  ((void (*)(void))this->vfptr->Stop)();
  v2->vfptr->SetCalcuCurrentPos(v2, _pos3);
  v2->m_pos3Cur = *_pos3;
}

//----- (00663F90) --------------------------------------------------------
NiPoint3 *__thiscall NpNs_MoveToTarget::GetMoveDir(NpNs_MoveToTarget *this)
{
  return &this->m_pos3DirMove;
}

//----- (00663FA0) --------------------------------------------------------
NiPoint3 *__thiscall NpNs_MoveToTarget::GetOldPos(NpNs_MoveToTarget *this)
{
  return &this->m_pos3OldPos;
}

//----- (00663FB0) --------------------------------------------------------
void __thiscall NpNs_MoveToTarget::GetCurrentPos(NpNs_MoveToTarget *this, NiPoint3 *pos3_)
{
  pos3_->x = this->m_pos3Cur.x;
  pos3_->y = this->m_pos3Cur.y;
  pos3_->z = this->m_pos3Cur.z;
}

//----- (00663FD0) --------------------------------------------------------
void __thiscall NpNs_MoveToTarget::GetMoveDir(NpNs_MoveToTarget *this, NiPoint3 *pos3_)
{
  pos3_->x = this->m_pos3DirMove.x;
  pos3_->y = this->m_pos3DirMove.y;
  pos3_->z = this->m_pos3DirMove.z;
}

//----- (00663FF0) --------------------------------------------------------
void __thiscall NpNs_MoveToTarget::GetOldPos(NpNs_MoveToTarget *this, NiPoint3 *pos3_)
{
  pos3_->x = this->m_pos3OldPos.x;
  pos3_->y = this->m_pos3OldPos.y;
  pos3_->z = this->m_pos3OldPos.z;
}

//----- (00664010) --------------------------------------------------------
void __thiscall Ns_XYFlatMoveToTarget::StartMove(Ns_XYFlatMoveToTarget *this, float _fTime, NiPoint3 *_pos3Start, NiPoint3 *_pos3Target)
{
  NiPoint3 pos3Start; // [sp+Ch] [bp-18h]@1
  NiPoint3 pos3Target; // [sp+18h] [bp-Ch]@1

  pos3Start.x = _pos3Start->x;
  pos3Start.y = _pos3Start->y;
  pos3Start.z = 0.0;
  pos3Target.x = _pos3Target->x;
  pos3Target.y = _pos3Target->y;
  pos3Target.z = 0.0;
  NpNs_MoveToTarget::StartMove((NpNs_MoveToTarget *)&this->vfptr, _fTime, &pos3Start, &pos3Target);
}

//----- (00664060) --------------------------------------------------------
void __thiscall Ns_XYFlatMoveToTarget::StartMove(Ns_XYFlatMoveToTarget *this, float _fTime, NiPoint3 *_pos3Target)
{
  NpNs_MoveToTarget::StartMove((NpNs_MoveToTarget *)&this->vfptr, _fTime, _pos3Target);
}

//----- (00664080) --------------------------------------------------------
void __thiscall Ns_XYFlatMoveToTarget::StartMove(Ns_XYFlatMoveToTarget *this, NiPoint3 *_pos3Start, NiPoint3 *_pos3Target)
{
  NiPoint3 pos3Start; // [sp+0h] [bp-18h]@1
  NiPoint3 pos3Target; // [sp+Ch] [bp-Ch]@1

  pos3Start.x = _pos3Start->x;
  pos3Start.y = _pos3Start->y;
  pos3Start.z = 0.0;
  pos3Target.x = _pos3Target->x;
  pos3Target.y = _pos3Target->y;
  pos3Target.z = 0.0;
  NpNs_MoveToTarget::StartMove((NpNs_MoveToTarget *)&this->vfptr, &pos3Start, &pos3Target);
}

//----- (006640C0) --------------------------------------------------------
void __thiscall Ns_XYFlatMoveToTarget::StartMove(Ns_XYFlatMoveToTarget *this, NiPoint3 *_pos3Target)
{
  NiPoint3 pos3Target; // [sp+0h] [bp-Ch]@1

  pos3Target.x = _pos3Target->x;
  pos3Target.y = _pos3Target->y;
  pos3Target.z = 0.0;
  NpNs_MoveToTarget::StartMove((NpNs_MoveToTarget *)&this->vfptr, &pos3Target);
}

//----- (006640F0) --------------------------------------------------------
void __thiscall Ns_XYFlatMoveToTarget::SetCalcuCurrentPos(Ns_XYFlatMoveToTarget *this, NiPoint3 *_pos3)
{
  this->m_pos3CalcuCur.x = _pos3->x;
  this->m_pos3CalcuCur.y = _pos3->y;
  this->m_pos3CalcuCur.z = 0.0;
}

//----- (00664110) --------------------------------------------------------
MoveToTarget *__thiscall Ns_XYFlatMoveToTarget::`vector deleting destructor'(MoveToTarget *this, unsigned int a2)
{
  MoveToTarget *v2; // esi@1

  v2 = this;
  this->vfptr = (NpNs_MoveToTargetVtbl *)&Ns_XYFlatMoveToTarget::`vftable';
  NpNs_MoveToTarget::~NpNs_MoveToTarget((NpNs_MoveToTarget *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BA7E4: using guessed type int (__thiscall *Ns_XYFlatMoveToTarget::`vftable')(void *p, char);

//----- (00664140) --------------------------------------------------------
void __thiscall ObjectChar::ObjectChar(ObjectChar *this)
{
  ObjectChar *v1; // esi@1

  v1 = this;
  Char::Char((Char *)&this->vfptr);
  v1->vfptr = (AbStateInfecteeVtbl *)ObjectChar::`vftable'{for `AbStateInfectee'};
  v1->vfptr = (IEffectHolderVtbl *)&ObjectChar::`vftable'{for `IEffectHolder'};
  v1->vfptr = (AttackSequenceManagerVtbl *)&ObjectChar::`vftable'{for `AttackSequenceManager'};
}
// 9BA884: using guessed type struct NiActorManager *(__thiscall *ObjectChar::`vftable'{for `AttackSequenceManager'})(Char *__hidden this);
// 9BA8A4: using guessed type int (__stdcall *ObjectChar::`vftable'{for `IEffectHolder'})(int);
// 9BA8AC: using guessed type void (__thiscall *ObjectChar::`vftable'{for `AbStateInfectee'}[2])(Char *this, AbStateInst *pkAbState, bool bNoVisual);

//----- (00664160) --------------------------------------------------------
void __thiscall ObjectChar::~ObjectChar(ObjectChar *this)
{
  this->vfptr = (AbStateInfecteeVtbl *)ObjectChar::`vftable'{for `AbStateInfectee'};
  this->vfptr = (IEffectHolderVtbl *)&ObjectChar::`vftable'{for `IEffectHolder'};
  this->vfptr = (AttackSequenceManagerVtbl *)&ObjectChar::`vftable'{for `AttackSequenceManager'};
  Char::~Char((Char *)&this->vfptr);
}
// 9BA884: using guessed type struct NiActorManager *(__thiscall *ObjectChar::`vftable'{for `AttackSequenceManager'})(Char *__hidden this);
// 9BA8A4: using guessed type int (__stdcall *ObjectChar::`vftable'{for `IEffectHolder'})(int);
// 9BA8AC: using guessed type void (__thiscall *ObjectChar::`vftable'{for `AbStateInfectee'}[2])(Char *this, AbStateInst *pkAbState, bool bNoVisual);

//----- (00664180) --------------------------------------------------------
void __userpurge ObjectChar::ActInitStand(ObjectChar *this@<ecx>, int a2@<edi>, bool bIsMob)
{
  ObjectChar *v3; // esi@1

  v3 = this;
  Char::ActInitStand((Char *)&this->vfptr, a2, bIsMob);
  ((void (__thiscall *)(_DWORD))v3->vfptr[10].DeleteAbStateByAbstateIndex)(v3);
  Char::StartFadeIn((Char *)&v3->vfptr);
  ((void (__thiscall *)(_DWORD, _DWORD))v3->vfptr[14].SetAbStateProperty)(v3, 801000);
}

//----- (006641D0) --------------------------------------------------------
void __usercall ObjectChar::ActDie1(ObjectChar *this@<ecx>, int a2@<ebx>, int a3@<edi>)
{
  ObjectChar *v3; // esi@1

  v3 = this;
  Char::ActDie1((Char *)&this->vfptr, a2, a3);
  v3->m_bNeverCullingFlag = 1;
}

//----- (006641F0) --------------------------------------------------------
ObjectChar *__thiscall ObjectChar::`vector deleting destructor'(char *this, unsigned int a2)
{
  return ObjectChar::`scalar deleting destructor'((ObjectChar *)(this - 88), a2);
}

//----- (00664200) --------------------------------------------------------
ObjectChar *__thiscall ObjectChar::`vector deleting destructor'(char *this, unsigned int a2)
{
  return ObjectChar::`scalar deleting destructor'((ObjectChar *)(this - 64), a2);
}

//----- (00664210) --------------------------------------------------------
ObjectChar *__thiscall ObjectChar::`scalar deleting destructor'(ObjectChar *this, unsigned int a2)
{
  ObjectChar *v2; // esi@1

  v2 = this;
  this->vfptr = (AbStateInfecteeVtbl *)ObjectChar::`vftable'{for `AbStateInfectee'};
  this->vfptr = (IEffectHolderVtbl *)&ObjectChar::`vftable'{for `IEffectHolder'};
  this->vfptr = (AttackSequenceManagerVtbl *)&ObjectChar::`vftable'{for `AttackSequenceManager'};
  Char::~Char((Char *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BA884: using guessed type struct NiActorManager *(__thiscall *ObjectChar::`vftable'{for `AttackSequenceManager'})(Char *__hidden this);
// 9BA8A4: using guessed type int (__stdcall *ObjectChar::`vftable'{for `IEffectHolder'})(int);
// 9BA8AC: using guessed type void (__thiscall *ObjectChar::`vftable'{for `AbStateInfectee'}[2])(Char *this, AbStateInst *pkAbState, bool bNoVisual);

//----- (00664250) --------------------------------------------------------
int __cdecl PortraitTextureBuffer::MatchCharacterPortraitFaceIDWithDatabase(char SHNID)
{
  int result; // eax@1

  result = (unsigned __int8)SHNID;
  switch ( SHNID )
  {
    case 0:
      result = 0;
      break;
    case 4:
      result = 4;
      break;
    case 5:
      result = 5;
      break;
    case 6:
      result = 6;
      break;
    case 7:
      result = 7;
      break;
    case 8:
      result = 8;
      break;
    case 9:
      result = 9;
      break;
    case 0xA:
      result = 10;
      break;
    case 0xB:
      result = 11;
      break;
    case 0xC:
      result = 12;
      break;
    case 0xD:
      result = 13;
      break;
    case 0xE:
      result = 14;
      break;
    case 0xF:
      result = 15;
      break;
    case 0x10:
      result = 16;
      break;
    case 0x11:
      result = 17;
      break;
    case 0x12:
      result = 18;
      break;
    case 0x13:
      result = 19;
      break;
    case 0x14:
      result = 20;
      break;
    case 0x15:
      result = 21;
      break;
    case 0x16:
      result = 22;
      break;
    case 0x17:
      result = 23;
      break;
    case 0x18:
      result = 24;
      break;
    case 0x19:
      result = 25;
      break;
    case 0x1A:
      result = 26;
      break;
    case 0x1B:
      result = 27;
      break;
    case 0x1C:
      result = 28;
      break;
    case 0x1D:
      result = 29;
      break;
    case 0x1E:
      result = 30;
      break;
    case 0x1F:
      result = 31;
      break;
    case 0x20:
      result = 32;
      break;
    case 0x21:
      result = 33;
      break;
    case 0x22:
      result = 34;
      break;
    case 0x23:
      result = 35;
      break;
    case 0x24:
      result = 36;
      break;
    case 0x25:
      result = 37;
      break;
    case 0x2B:
      result = 38;
      break;
    case 0x2C:
      result = 39;
      break;
    case 0x2D:
      result = 40;
      break;
    case 0x2E:
      result = 41;
      break;
    case 0x2F:
      result = 42;
      break;
    case 0x30:
      result = 43;
      break;
    case 0x31:
      result = 44;
      break;
    case 0x32:
      result = 45;
      break;
    case 0x33:
      result = 46;
      break;
    case 0x34:
      result = 47;
      break;
    case 0x26:
      result = 48;
      break;
    case 0x27:
      result = 49;
      break;
    case 0x28:
      result = 50;
      break;
    case 0x29:
      result = 51;
      break;
    case 0x2A:
      result = 52;
      break;
    default:
      return result;
  }
  return result;
}

//----- (006644A0) --------------------------------------------------------
NiSourceTexture *__cdecl PortraitTextureBuffer::GetBlackTexture()
{
  NiSourceTexture *result; // eax@1
  NiSourceTexture *v1; // esi@2
  void (__thiscall ***v2)(_DWORD, _DWORD); // edi@4

  result = *(NiSourceTexture **)PortraitTextureBuffer::ms_spBlackTexture;
  if ( !*(_DWORD *)PortraitTextureBuffer::ms_spBlackTexture )
  {
    v1 = PgUtil::Create1PixelSourceTexture(
           PortraitTextureBuffer::ms_spBlackTexture[0],
           PortraitTextureBuffer::ms_spBlackTexture[0],
           PortraitTextureBuffer::ms_spBlackTexture[0],
           -1);
    result = *(NiSourceTexture **)PortraitTextureBuffer::ms_spBlackTexture;
    if ( *(NiSourceTexture **)PortraitTextureBuffer::ms_spBlackTexture != v1 )
    {
      if ( *(_DWORD *)PortraitTextureBuffer::ms_spBlackTexture )
      {
        v2 = *(void (__thiscall ****)(_DWORD, _DWORD))PortraitTextureBuffer::ms_spBlackTexture;
        if ( !InterlockedDecrement((volatile LONG *)(*(_DWORD *)PortraitTextureBuffer::ms_spBlackTexture + 4)) )
        {
          if ( v2 )
            (**v2)(v2, 1);
        }
      }
      result = v1;
      *(_DWORD *)PortraitTextureBuffer::ms_spBlackTexture = v1;
      if ( v1 )
      {
        InterlockedIncrement((volatile LONG *)&v1->m_uiRefCount);
        result = *(NiSourceTexture **)PortraitTextureBuffer::ms_spBlackTexture;
      }
    }
  }
  return result;
}

//----- (00664510) --------------------------------------------------------
NiSourceTexture *__cdecl PortraitTextureBuffer::GetDefaultTexture()
{
  NiSourceTexture *result; // eax@1
  char *v1; // esi@4
  NiImageConverter *v2; // eax@5
  NiPixelData *v3; // eax@5
  void (__thiscall ***v4)(_DWORD, _DWORD); // edi@10
  NiTexture::FormatPrefs kPrefs; // [sp+4h] [bp-Ch]@7

  result = (NiSourceTexture *)PortraitTextureBuffer::ms_spDefaultTexture;
  if ( !PortraitTextureBuffer::ms_spDefaultTexture )
  {
    if ( Folder::m_bInit == (_BYTE)PortraitTextureBuffer::ms_spDefaultTexture )
      Folder::Init();
    v1 = fs("%sgame\\MobPortrait\\MP_None.png", &Folder::m_acMenu);
    if ( v1 )
    {
      v2 = NiImageConverter::GetImageConverter();
      v3 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v2->vfptr[2].__vecDelDtor)(v2, v1, 0);
      if ( v3 )
      {
        kPrefs.m_ePixelLayout = 6;
        kPrefs.m_eAlphaFmt = 3;
        kPrefs.m_eMipMapped = 0;
        v1 = (char *)NiSourceTexture::Create(v3, &kPrefs);
      }
      else
      {
        v1 = 0;
      }
    }
    result = (NiSourceTexture *)PortraitTextureBuffer::ms_spDefaultTexture;
    if ( (char *)PortraitTextureBuffer::ms_spDefaultTexture != v1 )
    {
      if ( PortraitTextureBuffer::ms_spDefaultTexture )
      {
        v4 = (void (__thiscall ***)(_DWORD, _DWORD))PortraitTextureBuffer::ms_spDefaultTexture;
        if ( !InterlockedDecrement((volatile LONG *)(PortraitTextureBuffer::ms_spDefaultTexture + 4)) )
        {
          if ( v4 )
            (**v4)(v4, 1);
        }
      }
      PortraitTextureBuffer::ms_spDefaultTexture = (int)v1;
      if ( !v1 )
        return PortraitTextureBuffer::GetBlackTexture();
      InterlockedIncrement((volatile LONG *)v1 + 1);
      result = (NiSourceTexture *)PortraitTextureBuffer::ms_spDefaultTexture;
    }
    if ( result )
      return result;
    return PortraitTextureBuffer::GetBlackTexture();
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;
// A9705C: using guessed type int PortraitTextureBuffer::ms_spDefaultTexture;

//----- (006645E0) --------------------------------------------------------
NiSourceTexture *__cdecl PortraitTextureBuffer::GetMetaMobPortrait(unsigned __int16 id)
{
  MobViewInfo *v1; // esi@1
  char *v2; // esi@4
  NiImageConverter *v3; // eax@5
  NiPixelData *v4; // eax@5
  NiSourceTexture *result; // eax@6
  NiTexture::FormatPrefs kPrefs; // [sp+4h] [bp-Ch]@6

  v1 = MobViewInfoTab::GetByID(id);
  if ( !v1 )
    goto LABEL_10;
  if ( !Folder::m_bInit )
    Folder::Init();
  v2 = fs("%sgame\\MobPortrait\\CharInfo\\%s.png", &Folder::m_acMenu, v1->MobPortrait);
  if ( !v2
    || (v3 = NiImageConverter::GetImageConverter(),
        (v4 = (NiPixelData *)((int (__thiscall *)(_DWORD, _DWORD, _DWORD))v3->vfptr[2].__vecDelDtor)(v3, v2, 0)) == 0)
    || (kPrefs.m_ePixelLayout = 6,
        kPrefs.m_eAlphaFmt = 3,
        kPrefs.m_eMipMapped = 0,
        (result = NiSourceTexture::Create(v4, &kPrefs)) == 0) )
  {
LABEL_10:
    result = PortraitTextureBuffer::GetDefaultTexture();
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00664670) --------------------------------------------------------
NiSourceTexture *__cdecl PortraitTextureBuffer::GetMainCharPortrait(Char *pkChar)
{
  char v2; // al@4
  unsigned int v3; // ebx@11
  FaceInfo *v4; // eax@11
  unsigned int v5; // ebx@12
  int v6; // ebx@14
  unsigned int v7; // esi@14
  Studio *v8; // eax@20

  if ( (unsigned __int8)((int (__thiscall *)(_DWORD))pkChar->vfptr[20].Deaffect)(pkChar) )
    return PortraitTextureBuffer::GetMetaMobPortrait(pkChar->m_kCharShape.m_kMobID);
  switch ( pkChar->m_kCharShape.m_kClassID )
  {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      v2 = 1;
      break;
    case 6:
    case 7:
    case 8:
    case 9:
    case 0xA:
      v2 = 6;
      break;
    case 0xB:
    case 0xC:
    case 0xD:
    case 0xE:
    case 0xF:
      v2 = 11;
      break;
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
      v2 = 16;
      break;
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
      v2 = 21;
      break;
    case 0x1A:
    case 0x1B:
      v2 = 26;
      break;
    default:
      v2 = 0;
      break;
  }
  v3 = v2 & 0x3F | ((pkChar->m_kCharShape.m_byGender & 1) << 6);
  v4 = FaceInfoTab::GetFaceInfo(
         v3 & 0x3F,
         (v3 >> 6) & 1,
         pkChar->m_kCharShape.m_byFaceShapeType,
         pkChar->m_kCharShape.m_byFace);
  if ( v4 )
    v5 = ((unsigned __int16)v3 ^ (unsigned __int16)((unsigned __int16)PortraitTextureBuffer::MatchCharacterPortraitFaceIDWithDatabase(v4->ID) << 7)) & 0x3F80 ^ v3;
  else
    v5 = v3 & 0xFFFFC07F;
  v6 = v5 & 0xF0003FFF;
  v7 = v6 | ((pkChar->m_kCharShape.m_byHairType & 0x7F | ((pkChar->m_kCharShape.m_byHairColor & 0x7F) << 7)) << 14);
  if ( PortraitTextureBuffer::ms_dwMainCharTag == v7 )
  {
    LOBYTE(v6) = 0;
    if ( AbStateInfectee::IsInList((AbStateInfectee *)&pkChar->vfptr, STA_GTIMETASLIME) )
      LOBYTE(v6) = 1;
    if ( !AbStateInfectee::IsInList((AbStateInfectee *)&pkChar->vfptr, STA_SNOWMAN) && !(_BYTE)v6 )
    {
      PortraitTextureBuffer::ms_bIsMeta = 0;
      return (NiSourceTexture *)PortraitTextureBuffer::ms_pkMainCharStillCut->m_spRenderedTexture.m_pObject;
    }
    if ( PortraitTextureBuffer::ms_bIsMeta )
      return (NiSourceTexture *)PortraitTextureBuffer::ms_pkMainCharStillCut->m_spRenderedTexture.m_pObject;
    v8 = PortraitStudio::CreateStudio(
           v6,
           *(float *)&pkChar,
           v7 & 0x3F,
           (v7 >> 6) & 1,
           (v7 >> 7) & 0x7F,
           (v7 >> 14) & 0x7F,
           (v7 >> 21) & 0x7F,
           7u,
           0xFFFF,
           0);
    PortraitTextureBuffer::ms_pkMainCharStillCut = v8;
    PortraitTextureBuffer::ms_dwMainCharTag = v7;
    if ( v8 )
    {
      PortraitTextureBuffer::ms_bIsMeta = 1;
      return (NiSourceTexture *)v8->m_spRenderedTexture.m_pObject;
    }
  }
  else
  {
    v8 = PortraitStudio::CreateStudio(
           v6,
           *(float *)&pkChar,
           v6 & 0x3F,
           ((v6 | ((pkChar->m_kCharShape.m_byHairType & 0x7F | ((pkChar->m_kCharShape.m_byHairColor & 0x7Fu) << 7)) << 14)) >> 6) & 1,
           ((v6 | ((pkChar->m_kCharShape.m_byHairType & 0x7F | ((pkChar->m_kCharShape.m_byHairColor & 0x7Fu) << 7)) << 14)) >> 7) & 0x7F,
           ((v6 | ((pkChar->m_kCharShape.m_byHairType & 0x7F | ((pkChar->m_kCharShape.m_byHairColor & 0x7Fu) << 7)) << 14)) >> 14) & 0x7F,
           ((v6 | ((pkChar->m_kCharShape.m_byHairType & 0x7F | ((pkChar->m_kCharShape.m_byHairColor & 0x7Fu) << 7)) << 14)) >> 21) & 0x7F,
           7u,
           0xFFFF,
           0);
    PortraitTextureBuffer::ms_pkMainCharStillCut = v8;
    PortraitTextureBuffer::ms_dwMainCharTag = v7;
    if ( v8 )
      return (NiSourceTexture *)v8->m_spRenderedTexture.m_pObject;
  }
  return PortraitTextureBuffer::GetDefaultTexture();
}
// A743D0: using guessed type unsigned __int32 PortraitTextureBuffer::ms_dwMainCharTag;
// A97044: using guessed type bool PortraitTextureBuffer::ms_bIsMeta;

//----- (006648F0) --------------------------------------------------------
void __cdecl PortraitTextureBuffer::Terminate()
{
  void (__thiscall ***v0)(_DWORD, _DWORD); // esi@2
  void (__thiscall ***v1)(_DWORD, _DWORD); // esi@6
  Studio *v2; // esi@11
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *i; // esi@13
  void *v4; // edi@14
  NiTListItem<NiPointer<NiDX92DBufferData> > *v5; // esi@17
  NiTListItem<NiPointer<NiDX92DBufferData> > *v6; // ST04_4@18
  NiTListItem<NiPointer<NiDX92DBufferData> > *v7; // esi@19
  NiTListItem<NiPointer<NiDX92DBufferData> > *v8; // ST04_4@20
  NiTListItem<NiPointer<NiDX92DBufferData> > *v9; // esi@21
  NiTListItem<NiPointer<NiDX92DBufferData> > *v10; // ST04_4@22
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > result; // [sp+Ch] [bp-4h]@16

  if ( *(_DWORD *)PortraitTextureBuffer::ms_spBlackTexture )
  {
    v0 = *(void (__thiscall ****)(_DWORD, _DWORD))PortraitTextureBuffer::ms_spBlackTexture;
    if ( !InterlockedDecrement((volatile LONG *)(*(_DWORD *)PortraitTextureBuffer::ms_spBlackTexture + 4)) && v0 )
      (**v0)(v0, 1);
    *(_DWORD *)PortraitTextureBuffer::ms_spBlackTexture = 0;
  }
  v1 = (void (__thiscall ***)(_DWORD, _DWORD))PortraitTextureBuffer::ms_spDefaultTexture;
  if ( PortraitTextureBuffer::ms_spDefaultTexture )
  {
    if ( !InterlockedDecrement((volatile LONG *)(PortraitTextureBuffer::ms_spDefaultTexture + 4)) && v1 )
      (**v1)(v1, 1);
    PortraitTextureBuffer::ms_spDefaultTexture = 0;
  }
  v2 = PortraitTextureBuffer::ms_pkMainCharStillCut;
  if ( PortraitTextureBuffer::ms_pkMainCharStillCut )
  {
    Studio::~Studio(PortraitTextureBuffer::ms_pkMainCharStillCut);
    operator delete(v2);
  }
  PortraitTextureBuffer::ms_pkMainCharStillCut = 0;
  PortraitTextureBuffer::ms_dwMainCharTag = -1;
  for ( i = stru_A9704C._Ptr->_Left;
        i != stru_A9704C._Ptr;
        i = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(&PortraitTextureBuffer::ms_kOtherFaceTextureMap, &result, (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > >)i)->_Ptr )
  {
    v4 = (void *)i->_Myval.second;
    if ( v4 )
    {
      Studio::~Studio((Studio *)i->_Myval.second);
      operator delete(v4);
    }
  }
  v5 = PortraitTextureBuffer::ms_kMobFaceTextureList.m_pkHead;
  if ( PortraitTextureBuffer::ms_kMobFaceTextureList.m_pkHead )
  {
    do
    {
      v6 = v5;
      v5 = v5->m_pkNext;
      PortraitTextureBuffer::ms_kMobFaceTextureList.vfptr->DeleteItem(
        (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *)&PortraitTextureBuffer::ms_kMobFaceTextureList,
        v6);
    }
    while ( v5 );
  }
  PortraitTextureBuffer::ms_kMobFaceTextureList.m_kAllocator.m_uiCount = 0;
  PortraitTextureBuffer::ms_kMobFaceTextureList.m_pkHead = 0;
  PortraitTextureBuffer::ms_kMobFaceTextureList.m_pkTail = 0;
  std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::clear(&PortraitTextureBuffer::ms_kMobFaceTextureMap);
  v7 = PortraitTextureBuffer::ms_kMoverFaceTextureList.m_pkHead;
  if ( PortraitTextureBuffer::ms_kMoverFaceTextureList.m_pkHead )
  {
    do
    {
      v8 = v7;
      v7 = v7->m_pkNext;
      PortraitTextureBuffer::ms_kMoverFaceTextureList.vfptr->DeleteItem(
        (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *)&PortraitTextureBuffer::ms_kMoverFaceTextureList,
        v8);
    }
    while ( v7 );
  }
  PortraitTextureBuffer::ms_kMoverFaceTextureList.m_kAllocator.m_uiCount = 0;
  PortraitTextureBuffer::ms_kMoverFaceTextureList.m_pkHead = 0;
  PortraitTextureBuffer::ms_kMoverFaceTextureList.m_pkTail = 0;
  std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::clear(&PortraitTextureBuffer::ms_kMoverFaceTextureMap);
  v9 = PortraitTextureBuffer::ms_kPetFaceTextureList.m_pkHead;
  if ( PortraitTextureBuffer::ms_kPetFaceTextureList.m_pkHead )
  {
    do
    {
      v10 = v9;
      v9 = v9->m_pkNext;
      PortraitTextureBuffer::ms_kPetFaceTextureList.vfptr->DeleteItem(
        (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *)&PortraitTextureBuffer::ms_kPetFaceTextureList,
        v10);
    }
    while ( v9 );
  }
  PortraitTextureBuffer::ms_kPetFaceTextureList.m_kAllocator.m_uiCount = 0;
  PortraitTextureBuffer::ms_kPetFaceTextureList.m_pkHead = 0;
  PortraitTextureBuffer::ms_kPetFaceTextureList.m_pkTail = 0;
  std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::clear(&PortraitTextureBuffer::ms_kPetFaceTextureMap);
}
// A743D0: using guessed type unsigned __int32 PortraitTextureBuffer::ms_dwMainCharTag;
// A9705C: using guessed type int PortraitTextureBuffer::ms_spDefaultTexture;

//----- (00664A80) --------------------------------------------------------
NiSourceTexture *__usercall PortraitTextureBuffer::GetOtherCharPortrait@<eax>(int a1@<ebx>, unsigned int uiClass, unsigned int uiGender, unsigned int uiFace, unsigned int uiHair, unsigned int uiColor, unsigned __int16 kMobID, unsigned int uiLvGapIndex, unsigned int uiCamPos)
{
  int v9; // edi@1
  unsigned int v10; // edx@1
  unsigned int v11; // eax@1
  unsigned int v12; // esi@1
  int v13; // eax@1
  NiSourceTexture *result; // eax@2
  Studio *v15; // esi@3

  v9 = kMobID;
  v10 = uiGender & 1;
  v11 = uiClass & 0x3F;
  v12 = v11 | ((v10 | 2
                    * (uiFace & 0x7F | ((uiHair & 0x7F | ((uiColor & 0x7F | ((uiLvGapIndex & 3 | 4 * (kMobID == -1)) << 7)) << 7)) << 7))) << 6);
  *(_DWORD *)&kMobID = v11 | ((v10 | 2
                                   * (uiFace & 0x7F | ((uiHair & 0x7F | ((uiColor & 0x7F | ((uiLvGapIndex & 3 | 4 * (kMobID == -1)) << 7)) << 7)) << 7))) << 6);
  v13 = *std::map<unsigned long,NiTexture *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiTexture *>>>::operator[](
           (std::map<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> > > *)&PortraitTextureBuffer::ms_kOtherFaceTextureMap,
           (const unsigned int *)&kMobID);
  if ( v13 )
  {
    result = *(NiSourceTexture **)(v13 + 8);
  }
  else
  {
    v15 = PortraitStudio::CreateStudio(
            a1,
            *(float *)&v9,
            v12 & 0x3F,
            (v12 >> 6) & 1,
            (v12 >> 7) & 0x7F,
            (v12 >> 14) & 0x7F,
            (v12 >> 21) & 0x7F,
            6u,
            v9,
            uiCamPos);
    if ( v15 )
    {
      *std::map<unsigned long,NiTexture *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiTexture *>>>::operator[](
         (std::map<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> > > *)&PortraitTextureBuffer::ms_kOtherFaceTextureMap,
         (const unsigned int *)&kMobID) = (unsigned int)v15;
      result = (NiSourceTexture *)v15->m_spRenderedTexture.m_pObject;
    }
    else
    {
      result = PortraitTextureBuffer::GetDefaultTexture();
    }
  }
  return result;
}

//----- (00664B60) --------------------------------------------------------
NiSourceTexture *__cdecl PortraitTextureBuffer::GetMobPortrait(unsigned __int16 id)
{
  NiSourceTexture *result; // eax@1
  MobViewInfo *v2; // esi@2
  int v3; // edi@5
  const char *v4; // eax@5
  NiSourceTexture *v5; // esi@5
  const char *v6; // eax@8
  NiPointer<NiDX92DBufferData> element; // [sp+Ch] [bp-10h]@10
  int v8; // [sp+18h] [bp-4h]@12

  result = (NiSourceTexture *)*std::map<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,NiTexture *>>>::operator[](
                                 (std::map<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,NiTexture *> > > *)&PortraitTextureBuffer::ms_kMobFaceTextureMap,
                                 &id);
  if ( !result )
  {
    v2 = MobViewInfoTab::GetByID(id);
    if ( !v2 )
      goto LABEL_18;
    if ( !Folder::m_bInit )
      Folder::Init();
    v3 = (int)v2->MobPortrait;
    v4 = fs("%sgame\\MobPortrait\\%s.png", &Folder::m_acMenu, v2->MobPortrait);
    v5 = PgUtil::LoadSourceTexture(v4);
    if ( !v5 )
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      v6 = fs("%sgame\\MobPortrait\\%s.tga", &Folder::m_acMenu, v3);
      v5 = PgUtil::LoadSourceTexture(v6);
      if ( !v5 )
LABEL_18:
        v5 = PortraitTextureBuffer::GetDefaultTexture();
    }
    element.m_pObject = (NiDX92DBufferData *)v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
    v8 = 0;
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(
      &PortraitTextureBuffer::ms_kMobFaceTextureList,
      &element);
    v8 = -1;
    if ( v5 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
    *std::map<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,NiTexture *>>>::operator[](
       (std::map<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,NiTexture *> > > *)&PortraitTextureBuffer::ms_kMobFaceTextureMap,
       &id) = (NiTexture *)v5;
    result = v5;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00664C90) --------------------------------------------------------
NiSourceTexture *__cdecl PortraitTextureBuffer::GetMoverPortrait(unsigned int kMoverID)
{
  NiSourceTexture *v1; // esi@1
  MoverMain *v2; // eax@2
  MoverView *v4; // esi@4
  int v5; // edi@7
  const char *v6; // eax@7
  const char *v7; // eax@10
  NiPointer<NiDX92DBufferData> element; // [sp+Ch] [bp-10h]@12
  int v9; // [sp+18h] [bp-4h]@14

  v1 = (NiSourceTexture *)*std::map<unsigned long,NiTexture *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiTexture *>>>::operator[](
                             (std::map<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> > > *)&PortraitTextureBuffer::ms_kMoverFaceTextureMap,
                             &kMoverID);
  if ( !v1 )
  {
    v2 = MoverMainTab::GetByMoverID(kMoverID);
    if ( !v2 )
      return 0;
    v4 = MoverViewTab::GetByMoverIdx(v2->MoverIDX);
    if ( !v4 )
      return 0;
    if ( !Folder::m_bInit )
      Folder::Init();
    v5 = (int)v4->Normalmage;
    v6 = fs("%sgame\\MobPortrait\\%s.png", &Folder::m_acMenu, v4->Normalmage);
    v1 = PgUtil::LoadSourceTexture(v6);
    if ( !v1 )
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      v7 = fs("%sgame\\MobPortrait\\%s.tga", &Folder::m_acMenu, v5);
      v1 = PgUtil::LoadSourceTexture(v7);
      if ( !v1 )
        v1 = PortraitTextureBuffer::GetDefaultTexture();
    }
    element.m_pObject = (NiDX92DBufferData *)v1;
    if ( v1 )
      InterlockedIncrement((volatile LONG *)&v1->m_uiRefCount);
    v9 = 0;
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(
      &PortraitTextureBuffer::ms_kMoverFaceTextureList,
      &element);
    v9 = -1;
    if ( v1 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
        v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
    }
    *std::map<unsigned long,NiTexture *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiTexture *>>>::operator[](
       (std::map<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> > > *)&PortraitTextureBuffer::ms_kMoverFaceTextureMap,
       &kMoverID) = (unsigned int)v1;
  }
  return v1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00664DE0) --------------------------------------------------------
NiSourceTexture *__cdecl PortraitTextureBuffer::GetPetPortrait(unsigned int kPetID)
{
  NiSourceTexture *v1; // esi@1
  PupMain *v2; // eax@2
  PupView *v4; // esi@4
  int v5; // edi@7
  const char *v6; // eax@7
  const char *v7; // eax@10
  NiPointer<NiDX92DBufferData> element; // [sp+Ch] [bp-10h]@12
  int v9; // [sp+18h] [bp-4h]@14

  v1 = (NiSourceTexture *)*std::map<unsigned long,NiTexture *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiTexture *>>>::operator[](
                             (std::map<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> > > *)&PortraitTextureBuffer::ms_kPetFaceTextureMap,
                             &kPetID);
  if ( !v1 )
  {
    v2 = PetMainTab::GetByPetID(kPetID);
    if ( !v2 )
      return 0;
    v4 = PetViewTab::GetByPetIdx(v2->PupIDX);
    if ( !v4 )
      return 0;
    if ( !Folder::m_bInit )
      Folder::Init();
    v5 = (int)v4->FileName;
    v6 = fs("%sgame\\MobPortrait\\%s.png", &Folder::m_acMenu, v4->FileName);
    v1 = PgUtil::LoadSourceTexture(v6);
    if ( !v1 )
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      v7 = fs("%sgame\\MobPortrait\\%s.tga", &Folder::m_acMenu, v5);
      v1 = PgUtil::LoadSourceTexture(v7);
      if ( !v1 )
        v1 = PortraitTextureBuffer::GetDefaultTexture();
    }
    element.m_pObject = (NiDX92DBufferData *)v1;
    if ( v1 )
      InterlockedIncrement((volatile LONG *)&v1->m_uiRefCount);
    v9 = 0;
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(
      &PortraitTextureBuffer::ms_kPetFaceTextureList,
      &element);
    v9 = -1;
    if ( v1 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
        v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
    }
    *std::map<unsigned long,NiTexture *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiTexture *>>>::operator[](
       (std::map<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> > > *)&PortraitTextureBuffer::ms_kPetFaceTextureMap,
       &kPetID) = (unsigned int)v1;
  }
  return v1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00664F30) --------------------------------------------------------
NiSourceTexture *__cdecl PortraitTextureBuffer::GetOtherCharPortrait(Char *pkChar)
{
  Char *v1; // esi@1
  NiSourceTexture *result; // eax@2
  FaceInfo *v3; // eax@4
  signed int v4; // edi@13
  int v5; // eax@14
  char v6; // cl@16
  char kMobID; // [sp+4h] [bp-10h]@3
  unsigned __int16 kMobIDa; // [sp+4h] [bp-10h]@13
  char byFaceModelInx; // [sp+8h] [bp-Ch]@3
  char byFaceTexInx; // [sp+Ch] [bp-8h]@3
  char byFaceID_3; // [sp+1Fh] [bp+Bh]@3

  v1 = pkChar;
  if ( (unsigned __int8)((int (__thiscall *)(_DWORD))pkChar->vfptr[20].Deaffect)(pkChar) )
  {
    result = PortraitTextureBuffer::GetMetaMobPortrait(pkChar->m_kCharShape.m_kMobID);
  }
  else
  {
    byFaceTexInx = pkChar->m_kCharShape.m_byFace;
    byFaceID_3 = 0;
    byFaceModelInx = v1->m_kCharShape.m_byFaceShapeType;
    kMobID = v1->m_kCharShape.m_byGender;
    switch ( v1->m_kCharShape.m_kClassID )
    {
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
        v3 = FaceInfoTab::GetFaceInfo(1, kMobID, byFaceModelInx, byFaceTexInx);
        break;
      case 6:
      case 7:
      case 8:
      case 9:
      case 0xA:
        v3 = FaceInfoTab::GetFaceInfo(6, kMobID, byFaceModelInx, byFaceTexInx);
        break;
      case 0xB:
      case 0xC:
      case 0xD:
      case 0xE:
      case 0xF:
        v3 = FaceInfoTab::GetFaceInfo(11, kMobID, byFaceModelInx, byFaceTexInx);
        break;
      case 0x10:
      case 0x11:
      case 0x12:
      case 0x13:
      case 0x14:
        v3 = FaceInfoTab::GetFaceInfo(16, kMobID, byFaceModelInx, byFaceTexInx);
        break;
      case 0x15:
      case 0x16:
      case 0x17:
      case 0x18:
      case 0x19:
        v3 = FaceInfoTab::GetFaceInfo(21, kMobID, byFaceModelInx, byFaceTexInx);
        break;
      case 0x1A:
      case 0x1B:
        v3 = FaceInfoTab::GetFaceInfo(26, kMobID, byFaceModelInx, byFaceTexInx);
        break;
      default:
        v3 = FaceInfoTab::GetFaceInfo(0, kMobID, byFaceModelInx, byFaceTexInx);
        break;
    }
    if ( v3 )
      byFaceID_3 = v3->ID;
    kMobIDa = v1->m_kCharShape.m_kMobID;
    v4 = 5;
    if ( kMobIDa != -1 )
    {
      v5 = ((int (__thiscall *)(_DWORD))v1->vfptr[5].Deaffect)(v1);
      v4 = Char::GetLvGapIndex(g_pkMainChar, v5);
    }
    switch ( v1->m_kCharShape.m_kClassID )
    {
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
        v6 = 1;
        break;
      case 6:
      case 7:
      case 8:
      case 9:
      case 0xA:
        v6 = 6;
        break;
      case 0xB:
      case 0xC:
      case 0xD:
      case 0xE:
      case 0xF:
        v6 = 11;
        break;
      case 0x10:
      case 0x11:
      case 0x12:
      case 0x13:
      case 0x14:
        v6 = 16;
        break;
      case 0x15:
      case 0x16:
      case 0x17:
      case 0x18:
      case 0x19:
        v6 = 21;
        break;
      case 0x1A:
      case 0x1B:
        v6 = 26;
        break;
      default:
        v6 = 0;
        break;
    }
    result = PortraitTextureBuffer::GetOtherCharPortrait(
               v1->m_kCharShape.m_byGender,
               (unsigned __int8)v6,
               v1->m_kCharShape.m_byGender,
               (unsigned __int8)byFaceID_3,
               v1->m_kCharShape.m_byHairType,
               v1->m_kCharShape.m_byHairColor,
               kMobIDa,
               v4,
               0);
  }
  return result;
}

//----- (00665160) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<NiPointer<NiTexture>>,NiPointer<NiTexture>>::~NiTListBase<DFALL<NiPointer<NiTexture>>,NiPointer<NiTexture>>(NiTListBase<DFALL<NiPointer<NiTexture> >,NiPointer<NiTexture> > *this)
{
  this->vfptr = (NiTListBase<DFALL<NiPointer<NiTexture> >,NiPointer<NiTexture> >Vtbl *)&NiTListBase<DFALL<NiPointer<NiTexture>>,NiPointer<NiTexture>>::`vftable';
}
// 9BAC34: using guessed type int (__thiscall *NiTListBase<DFALL<NiPointer<NiTexture>>,NiPointer<NiTexture>>::`vftable')(void *p, char);

//----- (00665170) --------------------------------------------------------
NiTListBase<DFALL<NiPointer<NiTexture> >,NiPointer<NiTexture> > *__thiscall NiTListBase<DFALL<NiPointer<NiTexture>>,NiPointer<NiTexture>>::`vector deleting destructor'(NiTListBase<DFALL<NiPointer<NiTexture> >,NiPointer<NiTexture> > *this, unsigned int a2)
{
  NiTListBase<DFALL<NiPointer<NiTexture> >,NiPointer<NiTexture> > *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<NiPointer<NiTexture> >,NiPointer<NiTexture> >Vtbl *)&NiTListBase<DFALL<NiPointer<NiTexture>>,NiPointer<NiTexture>>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BAC34: using guessed type int (__thiscall *NiTListBase<DFALL<NiPointer<NiTexture>>,NiPointer<NiTexture>>::`vftable')(void *p, char);

//----- (006651A0) --------------------------------------------------------
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,GuildNameCache::GuildNameStorage *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,GuildNameCache::GuildNameStorage *>>,0>>,std::_Iterator_base0>::operator--(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *this)
{
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v2; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *i; // edx@3
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v4; // ecx@4
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v5; // edx@5

  result = this;
  v2 = this->_Ptr;
  if ( v2->_Isnil )
  {
    result->_Ptr = v2->_Right;
    return result;
  }
  i = v2->_Left;
  if ( !v2->_Left->_Isnil )
  {
    v4 = i->_Right;
    if ( !v4->_Isnil )
    {
      do
      {
        v5 = v4;
        v4 = v4->_Right;
      }
      while ( !v4->_Isnil );
      result->_Ptr = v5;
      return result;
    }
LABEL_11:
    result->_Ptr = i;
    return result;
  }
  for ( i = v2->_Parent; !i->_Isnil; i = i->_Parent )
  {
    if ( result->_Ptr != i->_Left )
      break;
    result->_Ptr = i;
  }
  if ( !result->_Ptr->_Isnil )
    goto LABEL_11;
  return result;
}

//----- (00665200) --------------------------------------------------------
NiTList<NiPointer<NiTexture> > *__thiscall NiTPointerListBase<DFALL<NiPointer<NiTexture>>,NiPointer<NiTexture>>::`scalar deleting destructor'(NiTList<NiPointer<NiTexture> > *this, unsigned int a2)
{
  NiTList<NiPointer<NiTexture> > *v2; // edi@1
  NiTListItem<NiPointer<NiTexture> > *v3; // esi@1
  NiTListItem<NiPointer<NiTexture> > *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<NiPointer<NiTexture> >,NiPointer<NiTexture> >Vtbl *)&NiTPointerListBase<DFALL<NiPointer<NiTexture>>,NiPointer<NiTexture>>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<DFALL<NiPointer<NiTexture> >,NiPointer<NiTexture> > *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<NiPointer<NiTexture> >,NiPointer<NiTexture> >Vtbl *)&NiTListBase<DFALL<NiPointer<NiTexture>>,NiPointer<NiTexture>>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BAC34: using guessed type int (__thiscall *NiTListBase<DFALL<NiPointer<NiTexture>>,NiPointer<NiTexture>>::`vftable')(void *p, char);
// 9BAC44: using guessed type int (__thiscall *NiTPointerListBase<DFALL<NiPointer<NiTexture>>,NiPointer<NiTexture>>::`vftable')(void *p, char);

//----- (00665290) --------------------------------------------------------
void __thiscall std::_Tree_val<std::_Tmap_traits<unsigned long,NiTexture *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiTexture *>>,0>>::~_Tree_val<std::_Tmap_traits<unsigned long,NiTexture *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiTexture *>>,0>>(std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *this)
{
  operator delete(this->_Myhead);
}

//----- (006652A0) --------------------------------------------------------
FaceInfo *__cdecl FaceInfoTab::GetFaceInfo(char kBaseClassID, char ucGender, char byFaceModelInx, char byFaceTexInx)
{
  int v4; // eax@1
  unsigned int v5; // edi@2
  unsigned int v6; // esi@4
  FaceInfo *result; // eax@8
  char byListFTIndex; // [sp+Eh] [bp-2h]@5
  char byListFMIndex; // [sp+Fh] [bp-1h]@5

  v4 = *(_DWORD *)(ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable + 56);
  if ( v4 )
    v5 = *(_DWORD *)(v4 + 40);
  else
    v5 = 0;
  v6 = 0;
  if ( v5 )
  {
    while ( 1 )
    {
      FaceInfoTab::GetIndex(v6, kBaseClassID, ucGender, &byListFMIndex, &byListFTIndex);
      if ( byListFMIndex == byFaceModelInx && byListFTIndex == byFaceTexInx )
        break;
      if ( ++v6 >= v5 )
        goto LABEL_8;
    }
    result = (FaceInfo *)CDataReader::GetRecord((CDataReader *)(ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable + 4), v6);
  }
  else
  {
LABEL_8:
    result = 0;
  }
  return result;
}
// A8869C: using guessed type int ITableBase<FaceInfo,FaceInfoTab>::ms_pkTable;

//----- (00665310) --------------------------------------------------------
Char *__cdecl PortraitStudio::CreateCharacter(unsigned int uiClass, unsigned int uiGender, unsigned int uiFace, unsigned int uiHair, unsigned int uiColor, unsigned __int16 kMobID)
{
  char v6; // al@1
  Char *v7; // eax@1
  Char *v8; // eax@2
  Char *v9; // esi@2
  char v10; // al@5
  Char *result; // eax@7
  NiNode *v12; // ST10_4@10
  MobViewInfo *v13; // eax@12
  CSpactralGlow_Shader_Controller *v14; // eax@14
  NiNode *v15; // ST18_4@14
  CSpactralGlow_Shader_Controller *v16; // eax@14
  AbStateInfectee::AbstateColor (__thiscall *v17)(AbStateInfectee *); // edx@15
  BonePartitionReCreate BoneReCreate; // [sp+2Ch] [bp-120h]@10
  Char *v19; // [sp+3Ch] [bp-110h]@1
  float v20; // [sp+40h] [bp-10Ch]@15
  float v21; // [sp+44h] [bp-108h]@15
  float v22; // [sp+48h] [bp-104h]@15
  PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD p; // [sp+4Ch] [bp-100h]@1
  int v24; // [sp+148h] [bp-4h]@1

  *(_QWORD *)&p.charid.n5_code[3] = 0i64;
  *(_QWORD *)&p.charid.n5_code[1] = 0i64;
  p.charid.n5_code[0] = 0;
  strncpy(p.charid.n5_name, (char *)&unk_96F8EB, 0x14u);
  p.chrclass = uiClass;
  *(_DWORD *)&p.shapedata.notcamp.equip.Equ_Head = -1;
  *(_QWORD *)&p.shapedata.ride.equip.Equ_RightHand = -1i64;
  *(_TBYTE *)&p.shapedata.ride.equip.Equ_Boot = -2.37946299071446353e4932/*NaN*/;
  *(_QWORD *)&p.shapedata.ride.equip.Equ_Eye = -1i64;
  *(_QWORD *)&p.shapedata.ride.equip.Equ_CosEff = -1i64;
  p.shapedata.notcamp.equip.Equ_MiniMon_R = -1;
  p.handle = rand();
  *((_BYTE *)&p.shape + 3) = uiFace;
  p.shape = (PROTO_AVATAR_SHAPE_INFO)(((_BYTE)uiGender << 7) | ((*(_BYTE *)&p.shape ^ 4 * uiClass) & 0x7C ^ *(_BYTE *)&p.shape) & 0x7F);
  p.mode = 1;
  *((_BYTE *)&p.shape + 2) = uiColor;
  *((_BYTE *)&p.shape + 1) = uiHair;
  v6 = CharClass::GetRace(uiClass);
  *(_BYTE *)&p.shape ^= (*(_BYTE *)&p.shape ^ v6) & 3;
  v7 = (Char *)operator new(0xB7Cu);
  v19 = v7;
  v24 = 0;
  if ( v7 )
  {
    Char::Char(v7);
    v9 = v8;
  }
  else
  {
    v9 = 0;
  }
  v24 = -1;
  if ( MainChar::GetMetamorphosisType((MainChar *)g_pkMainChar) == 17 )
    v10 = ((int (__thiscall *)(Char *, _DWORD, _DWORD))v9->vfptr[17].Deaffect)(
            v9,
            g_pkMainChar->m_kCharShape.m_kMobID,
            *(_DWORD *)&p.handle);
  else
    v10 = ((int (__thiscall *)(Char *, PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *))v9->vfptr[17].SetAbStateProperty)(
            v9,
            &p);
  if ( v10
    && (unsigned __int8)((int (__thiscall *)(Char *, signed int, _DWORD))v9->vfptr[18].DeleteAbStateByAbstateIndex)(
                          v9,
                          1,
                          0) )
  {
    BonePartitionReCreate::BonePartitionReCreate(&BoneReCreate, 4);
    v12 = v9->m_spScene.m_pObject;
    v24 = 1;
    Ns_TourScene::TourScene((Ns_TourScene *)&BoneReCreate.vfptr, v12, &NiAVObject::m_RTTI, 0);
    if ( Engine3D::ms_spCarToon )
      INpShader::Setuprecursive(Engine3D::ms_spCarToon, v9->m_spScene.m_pObject, NiRenderer::ms_pkRenderer, 0x14u, 4u);
    v13 = MobViewInfoTab::GetByID(kMobID);
    if ( v13 )
    {
      if ( v13->SpectralGlow )
      {
        v14 = CharShape::GetShader_Ctrl(&v9->m_kCharShape);
        CSpactralGlow_Shader_Controller::SetUseShaderName(v14, "FxSkinning_Greyscale", "FxNoSkinning_Greyscale");
        Char::SetEnanleSpectral(v9, 1);
        v15 = v9->m_spScene.m_pObject;
        v16 = CharShape::GetShader_Ctrl(&v9->m_kCharShape);
        CSpactralGlow_Shader_Controller::SetupRecursive(v16, v15);
      }
    }
    v17 = v9->vfptr[5].GetAbstateColor;
    v20 = 0.0;
    v21 = -1.0;
    v22 = 0.0;
    ((void (__thiscall *)(Char *, NiPoint3 *, float *))v17)(v9, &NiPoint3::ZERO, &v20);
    ((void (__thiscall *)(Char *))v9->vfptr[10].DeleteAbStateByAbstateIndex)(v9);
    ((void (__thiscall *)(Char *, _DWORD))v9->vfptr[18].IsVisible)(v9, 0.0);
    result = v9;
  }
  else
  {
    ((void (__thiscall *)(Char *, signed int))v9->vfptr->~AbStateInfectee)(v9, 1);
    result = 0;
  }
  return result;
}

//----- (00665610) --------------------------------------------------------
Studio *__usercall PortraitStudio::CreateStudio@<eax>(int a1@<ebx>, float a2@<edi>, unsigned int uiClass, unsigned int uiGender, unsigned int uiFace, unsigned int uiHair, unsigned int uiColor, unsigned int uiDetail, int kMobID, unsigned int uiCamPos)
{
  Studio *result; // eax@1
  Studio *v11; // esi@1
  MobInfo *v12; // eax@4
  double v13; // st7@7
  double v14; // st6@7
  float v15; // ST30_4@9
  double v16; // st7@10
  double v17; // st6@10
  float v18; // ST30_4@12
  double v19; // st7@13
  float v20; // ST30_4@14
  unsigned int v21; // edx@23
  NiNode *v22; // edi@23
  NiRefObjectVtbl *v23; // ebx@25
  char *v24; // eax@25
  NiAVObject *v25; // eax@25
  NiAVObject *v26; // eax@28
  float v27; // [sp+10h] [bp-24h]@2
  int v28; // [sp+14h] [bp-20h]@2
  float v29; // [sp+1Ch] [bp-18h]@7
  float v30; // [sp+1Ch] [bp-18h]@10
  float v31; // [sp+1Ch] [bp-18h]@13
  float v32; // [sp+20h] [bp-14h]@7
  float v33; // [sp+20h] [bp-14h]@10
  float v34; // [sp+20h] [bp-14h]@13
  float v35; // [sp+24h] [bp-10h]@8
  float v36; // [sp+24h] [bp-10h]@11
  float v37; // [sp+24h] [bp-10h]@13
  NiCamera *pkHaduri; // [sp+2Ch] [bp-8h]@26
  Char *pkChar; // [sp+30h] [bp-4h]@2

  result = Studio::Create(NiRenderer::ms_pkRenderer, uiDetail);
  v11 = result;
  if ( result )
  {
    v28 = a1;
    v27 = a2;
    pkChar = PortraitStudio::CreateCharacter(uiClass, uiGender, uiFace, uiHair, uiColor, kMobID);
    if ( pkChar )
    {
      v11->m_bgColor.r = 0.0;
      v11->m_bgColor.g = 0.0;
      v11->m_bgColor.b = 0.0;
      v11->m_bgColor.a = 1.0;
      if ( (_WORD)kMobID == -1 )
      {
        switch ( uiClass )
        {
          case 0xBu:
            v19 = 1.0;
            v31 = 0.0;
            v34 = 1.0;
            v37 = 0.74117649;
            goto LABEL_14;
          case 6u:
            v13 = 1.0;
            v29 = 0.0;
            v32 = 1.0;
            v14 = 0.97254902;
            goto LABEL_8;
          case 1u:
            v16 = 1.0;
            v30 = 1.0;
            v33 = 0.73725492;
            v17 = 0.53725493;
LABEL_11:
            v36 = v17;
            goto LABEL_12;
          case 0x10u:
            v19 = 1.0;
            v31 = 1.0;
            v34 = 0.53725493;
            v37 = 0.96862745;
LABEL_14:
            v20 = v19;
            v11->m_bgColor.r = v31;
            v11->m_bgColor.g = v34;
            v11->m_bgColor.b = v37;
            v11->m_bgColor.a = v20;
            break;
          case 0x15u:
            v29 = 0.47058824;
            v14 = 0.0;
            v13 = 1.0;
            v32 = 0.0;
LABEL_8:
            v35 = v14;
            goto LABEL_9;
          case 0x1Au:
            v16 = 1.0;
            v30 = 0.0;
            v36 = 0.0;
            v33 = 1.0;
LABEL_12:
            v18 = v16;
            v11->m_bgColor.r = v30;
            v11->m_bgColor.g = v33;
            v11->m_bgColor.b = v36;
            v11->m_bgColor.a = v18;
            break;
          default:
            break;
        }
      }
      else
      {
        v12 = IIDTableBase<MobInfo,MobInfoTab,unsigned short>::GetByID(kMobID);
        if ( v12 )
        {
          switch ( Char::GetLvGapIndex(g_pkMainChar, v12->Level) )
          {
            case 0:
              v11->m_bgColor.r = 0.74509805;
              v11->m_bgColor.g = 0.14509805;
              v11->m_bgColor.b = 0.11372549;
              v11->m_bgColor.a = 1.0;
              goto LABEL_23;
            case 1:
              v13 = 1.0;
              v29 = 1.0;
              v32 = 0.627451;
              v14 = 0.14509805;
              goto LABEL_8;
            case 2:
              v16 = 1.0;
              v30 = 1.0;
              v33 = 0.95294118;
              v17 = 0.19607843;
              goto LABEL_11;
            case 3:
              v31 = 0.35294119;
              v34 = 0.90588236;
              v37 = 0.33725491;
              v19 = 1.0;
              goto LABEL_14;
            default:
              v29 = 0.75294119;
              v32 = 0.75294119;
              v35 = 0.75294119;
              v13 = 1.0;
              break;
          }
LABEL_9:
          v15 = v13;
          v11->m_bgColor.r = v29;
          v11->m_bgColor.g = v32;
          v11->m_bgColor.b = v35;
          v11->m_bgColor.a = v15;
        }
      }
LABEL_23:
      v21 = uiCamPos;
      v22 = pkChar->m_spScene.m_pObject;
      if ( !uiCamPos )
        v21 = rand() % 3 + 1;
      v23 = v22->vfptr;
      v24 = fs("Haduri%02d", v21);
      v25 = (NiAVObject *)((int (__thiscall *)(NiNode *, char *, _DWORD, int))v23[18].__vecDelDtor)(
                            v22,
                            v24,
                            LODWORD(v27),
                            v28);
      if ( v25 )
      {
        if ( PgUtil::CatchCamera(v25, &pkHaduri) )
          Studio::SetCamera(v11, pkHaduri);
      }
      v26 = (NiAVObject *)((int (__thiscall *)(NiNode *))v22->vfptr[18].__vecDelDtor)(v22);
      PgUtil::TurnOnLightsInNode(v26, 1);
      NiAVObject::UpdateProperties((NiAVObject *)&v22->vfptr);
      NiAVObject::UpdateEffects((NiAVObject *)&v22->vfptr);
      NiAVObject::Update((NiAVObject *)&v22->vfptr, 0.0, 1);
      v22->m_uFlags &= 0xFFFEu;
      Studio::SetSubject((Ni2DBuffer *)v11, (Ni2DBuffer::RendererData *)v22);
      Studio::ClickAndStuff(v11, 0.0);
      ((void (__cdecl *)(signed int))pkChar->vfptr->~AbStateInfectee)(1);
    }
    result = v11;
  }
  return result;
}
// 665610: could not find valid save-restore pair for ebx
// 665610: could not find valid save-restore pair for edi

//----- (00665970) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::clear(std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *this)
{
  std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *v1; // edi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v4; // esi@1

  v1 = this;
  v2 = this->_Myhead;
  v3 = v2->_Parent;
  v4 = v2->_Parent;
  if ( !v3->_Isnil )
  {
    do
    {
      std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Erase(
        v1,
        v4->_Right);
      v4 = v4->_Left;
      operator delete(v3);
      v3 = v4;
    }
    while ( !v4->_Isnil );
  }
  v1->_Myhead->_Parent = v1->_Myhead;
  v1->_Myhead->_Left = v1->_Myhead;
  v1->_Myhead->_Right = v1->_Myhead;
  v1->_Mysize = 0;
}

//----- (006659C0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,NiTexture *> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,NiTexture *>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,NiTexture *> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,NiTexture *> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,NiTexture *> >,0> > > _Where, std::_Tree_nod<std::_Tmap_traits<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,NiTexture *> >,0> >::_Node *_Node)
{
  std::_Tree<std::_Tmap_traits<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,NiTexture *> >,0> > *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *v6; // edi@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,NiTexture *> >,0> > > *v7; // eax@2
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v8; // eax@7
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *v9; // ecx@20
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > >,bool> v10; // [sp+8h] [bp-8h]@20

  v4 = this;
  v5 = (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)this->_Myhead;
  v6 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *)_Node;
  if ( !this->_Mysize )
  {
    std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
      (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)this,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)result,
      1,
      v5,
      (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)_Node);
    return result;
  }
  if ( _Where._Ptr == (std::_Tree_nod<std::_Tmap_traits<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,NiTexture *> >,0> >::_Node *)v5->_Left )
  {
    if ( _Node->_Myval.first < _Where._Ptr->_Myval.first )
    {
      std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
        (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)this,
        (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)result,
        1,
        (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)_Where._Ptr,
        (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)_Node);
      return result;
    }
    goto LABEL_20;
  }
  if ( (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)_Where._Ptr == v5 )
  {
    v8 = v5->_Right;
    if ( LOWORD(v8->_Myval.first) < _Node->_Myval.first )
    {
      std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
        (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)this,
        (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)result,
        0,
        v8,
        (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)_Node);
      return result;
    }
    goto LABEL_20;
  }
  if ( _Node->_Myval.first >= _Where._Ptr->_Myval.first
    || (_Node = _Where._Ptr,
        std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,GuildNameCache::GuildNameStorage *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,GuildNameCache::GuildNameStorage *>>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&_Node),
        _Node->_Myval.first >= v6->_Myval.first) )
  {
    if ( _Where._Ptr->_Myval.first >= v6->_Myval.first
      || (_Node = _Where._Ptr,
          std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const,int>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&_Node),
          _Node != v4->_Myhead)
      && v6->_Myval.first >= _Node->_Myval.first )
    {
LABEL_20:
      v9 = std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::_Linsert(
             (std::_Tree<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)v4,
             &v10,
             v6,
             0)->first._Ptr;
      v7 = result;
      result->_Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,NiTexture *> >,0> >::_Node *)v9;
      return v7;
    }
    if ( _Where._Ptr->_Right->_Isnil )
    {
      std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
        (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)v4,
        (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)result,
        0,
        (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)_Where._Ptr,
        (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)v6);
      v7 = result;
    }
    else
    {
      std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
        (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)v4,
        (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)result,
        1,
        (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)_Node,
        (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)v6);
      v7 = result;
    }
  }
  else if ( _Node->_Right->_Isnil )
  {
    std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
      (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)v4,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)result,
      0,
      (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)_Node,
      (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)v6);
    v7 = result;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
      (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)v4,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)result,
      1,
      (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)_Where._Ptr,
      (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)v6);
    v7 = result;
  }
  return v7;
}

//----- (00665B30) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned long,NiTexture *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiTexture *>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > _Where, std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *_Node)
{
  std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v6; // edi@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *v7; // eax@2
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v8; // eax@7
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v9; // ecx@20
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >,bool> v10; // [sp+8h] [bp-8h]@20

  v4 = this;
  v5 = (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)this->_Myhead;
  v6 = _Node;
  if ( !this->_Mysize )
  {
    std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
      (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)this,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)result,
      1,
      v5,
      (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)_Node);
    return result;
  }
  if ( _Where._Ptr == (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v5->_Left )
  {
    if ( _Node->_Myval.first < _Where._Ptr->_Myval.first )
    {
      std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
        (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)this,
        (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)result,
        1,
        (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)_Where._Ptr,
        (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)_Node);
      return result;
    }
    goto LABEL_20;
  }
  if ( (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)_Where._Ptr == v5 )
  {
    v8 = v5->_Right;
    if ( v8->_Myval.first < _Node->_Myval.first )
    {
      std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
        (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)this,
        (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)result,
        0,
        v8,
        (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)_Node);
      return result;
    }
    goto LABEL_20;
  }
  if ( _Node->_Myval.first >= _Where._Ptr->_Myval.first
    || (_Node = _Where._Ptr,
        std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,GuildNameCache::GuildNameStorage *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,GuildNameCache::GuildNameStorage *>>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&_Node),
        _Node->_Myval.first >= v6->_Myval.first) )
  {
    if ( _Where._Ptr->_Myval.first >= v6->_Myval.first
      || (_Node = _Where._Ptr,
          std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const,int>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&_Node),
          _Node != v4->_Myhead)
      && v6->_Myval.first >= _Node->_Myval.first )
    {
LABEL_20:
      v9 = std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
             v4,
             &v10,
             v6,
             0)->first._Ptr;
      v7 = result;
      result->_Ptr = v9;
      return v7;
    }
    if ( _Where._Ptr->_Right->_Isnil )
    {
      std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
        (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)v4,
        (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)result,
        0,
        (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)_Where._Ptr,
        (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)v6);
      v7 = result;
    }
    else
    {
      std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
        (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)v4,
        (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)result,
        1,
        (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)_Node,
        (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)v6);
      v7 = result;
    }
  }
  else if ( _Node->_Right->_Isnil )
  {
    std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
      (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)v4,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)result,
      0,
      (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)_Node,
      (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)v6);
    v7 = result;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
      (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)v4,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)result,
      1,
      (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)_Where._Ptr,
      (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)v6);
    v7 = result;
  }
  return v7;
}

//----- (00665C90) --------------------------------------------------------
NiTexture **__thiscall std::map<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,NiTexture *>>>::operator[](std::map<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,NiTexture *> > > *this, const unsigned __int16 *_Keyval)
{
  std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,NiTexture *> >,0> >::_Node *v3; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,NiTexture *> >,0> >::_Node *v4; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,NiTexture *> >,0> > > v5; // edi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,NiTexture *> >,0> >::_Node *v6; // eax@8
  NiTexture **result; // eax@8
  std::pair<unsigned short const ,unsigned long> _Val; // [sp+8h] [bp-8h]@8

  v2 = (std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)this;
  v3 = this->_Myhead;
  v4 = v3->_Parent;
  v5._Ptr = v3;
  while ( !v4->_Isnil )
  {
    if ( v4->_Myval.first >= *_Keyval )
    {
      v5._Ptr = v4;
      v4 = v4->_Left;
    }
    else
    {
      v4 = v4->_Right;
    }
  }
  if ( v5._Ptr != (std::_Tree_nod<std::_Tmap_traits<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,NiTexture *> >,0> >::_Node *)v2->_Myhead
    && *_Keyval >= v5._Ptr->_Myval.first )
  {
    result = &v5._Ptr->_Myval.second;
  }
  else
  {
    _Val.first = *_Keyval;
    _Val.second = 0;
    v6 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,NiTexture *> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned long>>,0>>::_Buynode<std::pair<unsigned short const,unsigned long>>(v2, &_Val);
    std::_Tree<std::_Tmap_traits<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,NiTexture *>>,0>>::_Insert(
      (std::_Tree<std::_Tmap_traits<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,NiTexture *> >,0> > *)v2,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,NiTexture *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,NiTexture *> >,0> > > *)&_Keyval,
      v5,
      v6);
    result = (NiTexture **)(_Keyval + 8);
  }
  return result;
}

//----- (00665D20) --------------------------------------------------------
unsigned int *__thiscall std::map<unsigned long,NiTexture *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiTexture *>>>::operator[](std::map<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> > > *this, const unsigned int *_Keyval)
{
  std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v3; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v4; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v5; // edi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v6; // eax@8
  unsigned int *result; // eax@8
  std::pair<int const ,int> _Val; // [sp+8h] [bp-8h]@8

  v2 = (std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)this;
  v3 = this->_Myhead;
  v4 = v3->_Parent;
  v5._Ptr = v3;
  while ( !v4->_Isnil )
  {
    if ( v4->_Myval.first >= *_Keyval )
    {
      v5._Ptr = v4;
      v4 = v4->_Left;
    }
    else
    {
      v4 = v4->_Right;
    }
  }
  if ( v5._Ptr != (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v2->_Myhead
    && *_Keyval >= v5._Ptr->_Myval.first )
  {
    result = &v5._Ptr->_Myval.second;
  }
  else
  {
    _Val.first = *_Keyval;
    _Val.second = 0;
    v6 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(v2, &_Val);
    std::_Tree<std::_Tmap_traits<unsigned long,NiTexture *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiTexture *>>,0>>::_Insert(
      (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)v2,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&_Keyval,
      v5,
      v6);
    result = (unsigned int *)(_Keyval + 4);
  }
  return result;
}

//----- (00665DA0) --------------------------------------------------------
void __thiscall CQuestInfoViewMgr::MakeQuestView(CQuestInfoViewMgr *this, unsigned __int16 hID)
{
  CQuestInfoViewMgr *v2; // esi@1
  CClientQuest *v3; // edi@1
  unsigned int v4; // eax@1
  QUEST_DATA *v5; // eax@1
  int v6; // ecx@1
  unsigned int v7; // eax@1
  unsigned int v8; // eax@3
  NiNode *v9; // eax@6
  NiNode *v10; // edi@6
  NiTArray<NiPointer<NiGeometry> > *v11; // ecx@8
  CQuest::NPC_QUEST_STATUS kNpcState; // [sp+Ch] [bp-1Ch]@1
  int v13; // [sp+24h] [bp-4h]@8

  v2 = this;
  v3 = QuestDataMgr::GetQuest();
  CQuest::AllDoingQuestUpdateStatus((CQuest *)&v3->vfptr);
  kNpcState.hID = hID;
  v4 = User::Lv(&g_kUser);
  CQuest::GetQuestStatusWithNPC((CQuest *)&v3->vfptr, &kNpcState, PQS_ING, v4, 0);
  v5 = kNpcState.lpQuestData;
  v6 = kNpcState.nLevel;
  *(_DWORD *)&v2->m_kNpcState.hID = *(_DWORD *)&kNpcState.hID;
  v2->m_kNpcState.lpQuestData = v5;
  v7 = kNpcState.eResultState;
  v2->m_kNpcState.eResultState = kNpcState.eResultState;
  v2->m_kNpcState.nLevel = v6;
  if ( v7 == 4 && v6 != -1 )
  {
    v8 = User::Lv(&g_kUser);
    if ( v8 <= kNpcState.nLevel + 5 )
    {
      v7 = kNpcState.eResultState;
    }
    else
    {
      v7 = 9;
      kNpcState.eResultState = 9;
    }
  }
  v9 = CharResMgr::GetQuestInfo(&g_kCharResMgr, v7, 0);
  v10 = v9;
  if ( v9 )
    InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  v11 = (NiTArray<NiPointer<NiGeometry> > *)&v2->m_spQuestInfo.m_pObject->m_kChildren;
  v13 = 0;
  NiTArray<NiPointer<NiNode>>::RemoveAll(v11);
  if ( v10 )
  {
    ((void (__stdcall *)(NiNode *, signed int))v2->m_spQuestInfo.m_pObject->vfptr[29].__vecDelDtor)(v10, 1);
    v13 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
  }
}

//----- (00665EC0) --------------------------------------------------------
void CDoorObject::CDoorObject()
{
  ;
}

//----- (00665EE0) --------------------------------------------------------
void __thiscall AreaInfoMgr::AddRequestAreaTest(AreaInfoMgr *this, Name8 AreaID, int nTestType, int nID)
{
  std::_List_nod<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData> >::_Node *v4; // edi@1
  char *v5; // esi@1
  std::_List_nod<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData> >::_Node *v6; // ecx@1
  std::_List_nod<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData> >::_Node *v7; // eax@1
  int v8; // ecx@1
  AreaInfoMgr::TestData _Val; // [sp+8h] [bp-28h]@1

  _Val.m_nID = nID;
  _Val.m_kAreaID = AreaID;
  v4 = this->m_listRequest._Myhead;
  v5 = (char *)&this->m_listRequest;
  v6 = v4->_Prev;
  _Val.m_eTestType = nTestType;
  v7 = std::_List_val<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData>>::_Buynode<AreaInfoMgr::TestData>(
         v4,
         v6,
         &_Val);
  v8 = *((_DWORD *)v5 + 1);
  if ( (unsigned int)(107374181 - v8) < 1 )
    std::_Xlength_error("list<T> too long");
  *((_DWORD *)v5 + 1) = v8 + 1;
  v4->_Prev = v7;
  v7->_Prev->_Next = v7;
}

//----- (00665F70) --------------------------------------------------------
void __thiscall AreaInfoMgr::RemoveAreaInfo(AreaInfoMgr *this, Name8 dwAreaID)
{
  AreaInfoMgr *v2; // edi@1
  std::_List_nod<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData> >::_Node *v3; // eax@1
  std::_List_nod<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData> >::_Node *v4; // esi@1
  std::_List_nod<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData> >::_Node *i; // [sp+8h] [bp-4h]@1

  v2 = this;
  v3 = this->m_listRequest._Myhead;
  v4 = v3->_Next;
  for ( i = this->m_listRequest._Myhead; v3 != v4; v4 = v4->_Next )
  {
    if ( v4->_Myval.m_kAreaID.n8_code[0] == dwAreaID.n8_code[0]
      && *(_QWORD *)&v4->_Myval.m_kAreaID.n8_code[1] == *(_QWORD *)&dwAreaID.n8_code[1]
      && *(_QWORD *)&v4->_Myval.m_kAreaID.n8_code[3] == *(_QWORD *)&dwAreaID.n8_code[3]
      && *(_QWORD *)&v4->_Myval.m_kAreaID.n8_code[5] == *(_QWORD *)&dwAreaID.n8_code[5]
      && v4->_Myval.m_kAreaID.n8_code[7] == dwAreaID.n8_code[7]
      && v4 != v2->m_listRequest._Myhead )
    {
      v4->_Prev->_Next = v4->_Next;
      v4->_Next->_Prev = v4->_Prev;
      operator delete(v4);
      v3 = i;
      --v2->m_listRequest._Mysize;
    }
  }
}

//----- (00666000) --------------------------------------------------------
void __thiscall AreaInfoMgr::Update(AreaInfoMgr *this)
{
  std::_List_nod<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData> >::_Node *v1; // eax@2
  std::_List_nod<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData> >::_Node *v2; // ebx@2
  int v3; // edi@3
  float *v4; // esi@4
  int v5; // eax@4
  bool v6; // al@4
  std::_List_nod<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData> >::_Node *v7; // esi@4
  std::_List_nod<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData> >::_Node *v8; // [sp+14h] [bp-8Ch]@2
  AreaInfoMgr *v9; // [sp+18h] [bp-88h]@1
  char szName[128]; // [sp+1Ch] [bp-84h]@3

  v9 = this;
  if ( this->m_pkFrameWork )
  {
    v1 = this->m_listRequest._Myhead;
    v2 = v1->_Next;
    v8 = this->m_listRequest._Myhead;
    if ( v1 != v1->_Next )
    {
      do
      {
        v3 = (int)&v2->_Myval.m_nID;
        *(_DWORD *)szName = v2->_Myval.m_kAreaID.n8_code[0];
        *(_DWORD *)&szName[4] = v2->_Myval.m_kAreaID.n8_code[1];
        *(_DWORD *)&szName[8] = v2->_Myval.m_kAreaID.n8_code[2];
        *(_DWORD *)&szName[12] = v2->_Myval.m_kAreaID.n8_code[3];
        *(_DWORD *)&szName[16] = v2->_Myval.m_kAreaID.n8_code[4];
        *(_DWORD *)&szName[20] = v2->_Myval.m_kAreaID.n8_code[5];
        *(_DWORD *)&szName[24] = v2->_Myval.m_kAreaID.n8_code[6];
        *(_DWORD *)&szName[28] = v2->_Myval.m_kAreaID.n8_code[7];
        szName[32] = 0;
        if ( g_pkMainChar )
        {
          v4 = (float *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
          v5 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
          v6 = World::TestArea(&g_kWorld, szName, *v4, *(float *)(v5 + 4));
          v7 = v2;
          v2 = v2->_Next;
          if ( v6 )
          {
            if ( *(_DWORD *)(v3 + 36) == 1 && *(_DWORD *)v3 == -1 )
            {
              GameFrameWork::NcScenarioAreaEntryAck((GameFrameWork *)v9->m_pkFrameWork, szName);
              if ( v7 != v9->m_listRequest._Myhead )
              {
                v7->_Prev->_Next = v7->_Next;
                v7->_Next->_Prev = v7->_Prev;
                operator delete(v7);
                --v9->m_listRequest._Mysize;
              }
            }
          }
          else if ( *(_DWORD *)(v3 + 36) == 2 && *(_DWORD *)v3 == -1 )
          {
            GameFrameWork::NcScenarioAreaLeaveAck((GameFrameWork *)v9->m_pkFrameWork, szName);
            if ( v7 != v9->m_listRequest._Myhead )
            {
              v7->_Prev->_Next = v7->_Next;
              v7->_Next->_Prev = v7->_Prev;
              operator delete(v7);
              --v9->m_listRequest._Mysize;
            }
          }
        }
      }
      while ( v8 != v2 );
    }
  }
}

//----- (00666170) --------------------------------------------------------
std::_List_nod<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData> >::_Node *__stdcall std::_List_val<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData>>::_Buynode<AreaInfoMgr::TestData>(std::_List_nod<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData> >::_Node *_Next, std::_List_nod<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData> >::_Node *_Prev, AreaInfoMgr::TestData *_Val)
{
  std::_List_nod<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData> >::_Node *result; // eax@1
  std::_List_nod<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData> >::_Node *v5; // edx@2
  std::exception pExceptionObject; // [sp+0h] [bp-Ch]@5

  result = (std::_List_nod<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData> >::_Node *)operator new(0x30u);
  if ( !result )
  {
    _Next = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Next);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v5 = _Prev;
  result->_Next = _Next;
  result->_Prev = v5;
  if ( result != (std::_List_nod<AreaInfoMgr::TestData,std::allocator<AreaInfoMgr::TestData> >::_Node *)-8 )
    qmemcpy(&result->_Myval, _Val, sizeof(result->_Myval));
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (006661E0) --------------------------------------------------------
int __thiscall User::GetTotalAvatarInfo(User *this)
{
  return this->m_iTotalAvatarInfo;
}

//----- (006661F0) --------------------------------------------------------
PROTO_AVATARINFORMATION *__thiscall User::GetAvatarInfo(User *this, int iIndex)
{
  PROTO_AVATARINFORMATION *result; // eax@2

  if ( iIndex < this->m_iTotalAvatarInfo )
    result = &this->m_kAvatarInfo[iIndex];
  else
    result = 0;
  return result;
}

//----- (00666220) --------------------------------------------------------
PROTO_AVATARINFORMATION *__thiscall User::GetAvatarInfoBySlot(User *this, char bySlot)
{
  int v2; // esi@1
  int v3; // eax@1
  char *v4; // edx@2
  PROTO_AVATARINFORMATION *result; // eax@5

  v2 = this->m_iTotalAvatarInfo;
  v3 = 0;
  if ( v2 <= 0 )
  {
LABEL_5:
    result = 0;
  }
  else
  {
    v4 = &this->m_kAvatarInfo[0].slot;
    while ( *v4 != bySlot )
    {
      ++v3;
      v4 += 130;
      if ( v3 >= v2 )
        goto LABEL_5;
    }
    result = &this->m_kAvatarInfo[v3];
  }
  return result;
}

//----- (00666270) --------------------------------------------------------
PROTO_AVATARINFORMATION *__thiscall User::GetSelectedAvatarInfo(User *this)
{
  return User::GetAvatarInfoBySlot(this, this->m_bySelectedAvatartSlot);
}

//----- (00666280) --------------------------------------------------------
void __thiscall User::SetAvatarInfo(User *this, PROTO_AVATARINFORMATION *p, int iAvatarNum)
{
  this->m_iTotalAvatarInfo = iAvatarNum;
  if ( iAvatarNum > 6 )
    this->m_iTotalAvatarInfo = 6;
  memcpy((char *)this->m_kAvatarInfo, (char *)p, 130 * this->m_iTotalAvatarInfo);
}

//----- (006662C0) --------------------------------------------------------
char __thiscall User::GetSelectedAvatarSlot(User *this)
{
  return this->m_bySelectedAvatartSlot;
}

//----- (006662D0) --------------------------------------------------------
void __thiscall User::SetSelectedAvatarSlot(User *this, char bySlot)
{
  this->m_bySelectedAvatartSlot = bySlot;
}

//----- (006662E0) --------------------------------------------------------
int __thiscall User::GetEmptyAvatarSlot(User *this)
{
  int v1; // esi@1
  unsigned __int8 v2; // bl@1
  int v3; // eax@2
  char *v4; // edx@3

  v1 = this->m_iTotalAvatarInfo;
  v2 = 0;
  do
  {
    v3 = 0;
    if ( v1 <= 0 )
      return v2;
    v4 = &this->m_kAvatarInfo[0].slot;
    while ( *v4 != v2 )
    {
      ++v3;
      v4 += 130;
      if ( v3 >= v1 )
        return v2;
    }
    if ( (User *)((char *)this + 130 * v3) == (User *)-344 )
      return v2;
    ++v2;
  }
  while ( v2 < 6u );
  return -1;
}

//----- (00666340) --------------------------------------------------------
void __thiscall User::MarkAsErased(User *this, char bySlot)
{
  PROTO_AVATARINFORMATION *v2; // eax@1

  v2 = User::GetAvatarInfoBySlot(this, bySlot);
  if ( v2 )
    v2->delinfo.day = 6;
}

//----- (00666360) --------------------------------------------------------
bool __stdcall User::IsAvatarErased(PROTO_AVATARINFORMATION *pkInfo)
{
  return pkInfo->delinfo.day != 99;
}

//----- (00666380) --------------------------------------------------------
PROTO_NC_CHAR_BASE_CMD *__thiscall User::GetMainCharBaseData(User *this)
{
  return &this->m_kMainCharBaseData;
}

//----- (00666390) --------------------------------------------------------
void __thiscall User::SetMainCharShapeData(User *this, PROTO_AVATAR_SHAPE_INFO *p)
{
  this->m_kMainCharShapeData = *p;
}

//----- (006663B0) --------------------------------------------------------
PROTO_AVATAR_SHAPE_INFO *__thiscall User::GetMainCharShapeData(User *this)
{
  return &this->m_kMainCharShapeData;
}

//----- (006663C0) --------------------------------------------------------
void __thiscall User::SetMainCharMapLoginData(User *this, PROTO_NC_CHAR_MAPLOGIN_ACK *p)
{
  qmemcpy(&this->m_kMapLoginData, p, sizeof(this->m_kMapLoginData));
}

//----- (006663E0) --------------------------------------------------------
PROTO_NC_CHAR_MAPLOGIN_ACK *__thiscall User::GetMainCharMapLoginData(User *this)
{
  return &this->m_kMapLoginData;
}

//----- (006663F0) --------------------------------------------------------
PROTO_NC_CHAR_BASE_CMD::LoginLocation *__thiscall User::GetMainCharLoginMapName(User *this)
{
  return &this->m_kMainCharBaseData.logininfo;
}

//----- (00666400) --------------------------------------------------------
void __thiscall User::SetPKCount(User *this, unsigned int *kVal)
{
  this->m_kMainCharBaseData.pkcount = *kVal;
}

//----- (00666420) --------------------------------------------------------
char __thiscall User::GetMainCharClass(User *this)
{
  return (*(_BYTE *)&this->m_kMainCharShapeData >> 2) & 0x1F;
}

//----- (00666430) --------------------------------------------------------
void __thiscall User::SetMainCharClass(User *this, char kClass)
{
  *(_BYTE *)&this->m_kMainCharShapeData ^= (*(_BYTE *)&this->m_kMainCharShapeData ^ 4 * kClass) & 0x7C;
}

//----- (00666450) --------------------------------------------------------
Name5 *__thiscall User::GetMainCharID(User *this)
{
  return &this->m_kMainCharBaseData.charid;
}

//----- (00666460) --------------------------------------------------------
void __thiscall User::SetMainCharGender(User *this, char byGender)
{
  this->m_kMainCharShapeData = (PROTO_AVATAR_SHAPE_INFO)((byGender << 7) | *(_BYTE *)&this->m_kMainCharShapeData & 0x7F);
}

//----- (00666480) --------------------------------------------------------
char __thiscall User::GetMainCharGender(User *this)
{
  return *(_BYTE *)&this->m_kMainCharShapeData >> 7;
}

//----- (00666490) --------------------------------------------------------
void __thiscall User::SetMainCharHairType(User *this, char byHair)
{
  *((_BYTE *)&this->m_kMainCharShapeData + 1) = byHair;
}

//----- (006664A0) --------------------------------------------------------
void __thiscall User::SetMainCharFaceType(User *this, char byFace)
{
  *((_BYTE *)&this->m_kMainCharShapeData + 3) = byFace;
}

//----- (006664B0) --------------------------------------------------------
void __thiscall User::SetMainCharLoginMapInitPos(User *this, int iX, int iY)
{
  this->m_kMainCharBaseData.logininfo.currentcoord.xy.x = iX;
  this->m_kMainCharBaseData.logininfo.currentcoord.xy.y = iY;
}

//----- (006664D0) --------------------------------------------------------
unsigned int __thiscall User::Lv(User *this)
{
  return this->m_kMainCharBaseData.Level;
}

//----- (006664E0) --------------------------------------------------------
void __thiscall User::SetLv(User *this, char ucLv)
{
  this->m_kMainCharBaseData.Level = ucLv;
}

//----- (006664F0) --------------------------------------------------------
unsigned __int64 __thiscall User::PrevExp(User *this)
{
  return this->m_kMapLoginData.param.PrevExp;
}

//----- (00666500) --------------------------------------------------------
unsigned __int64 __thiscall User::CurExp(User *this)
{
  return this->m_kMainCharBaseData.Experience;
}

//----- (00666510) --------------------------------------------------------
unsigned __int64 __thiscall User::NextExp(User *this)
{
  return this->m_kMapLoginData.param.NextExp;
}

//----- (00666520) --------------------------------------------------------
void __thiscall User::AddCurExp(User *this, unsigned int uiExp)
{
  this->m_kMainCharBaseData.Experience += uiExp;
}

//----- (00666540) --------------------------------------------------------
void __thiscall User::SubCurExp(User *this, unsigned int uiExp)
{
  this->m_kMainCharBaseData.Experience -= uiExp;
}

//----- (00666560) --------------------------------------------------------
void __thiscall User::SetCurExp(User *this, __int64 i64Exp)
{
  this->m_kMainCharBaseData.Experience = i64Exp;
}

//----- (00666580) --------------------------------------------------------
void __thiscall User::SetParam(User *this, CHAR_PARAMETER_DATA *pkData)
{
  if ( pkData )
    qmemcpy(&this->m_kMapLoginData.param, pkData, sizeof(this->m_kMapLoginData.param));
}

//----- (006665A0) --------------------------------------------------------
unsigned int __thiscall User::BaseStr(User *this)
{
  return this->m_kMapLoginData.param.Strength.base;
}

//----- (006665B0) --------------------------------------------------------
unsigned int __thiscall User::BaseDex(User *this)
{
  return this->m_kMapLoginData.param.Dexterity.base;
}

//----- (006665C0) --------------------------------------------------------
unsigned int __thiscall User::BaseCon(User *this)
{
  return this->m_kMapLoginData.param.Constitute.base;
}

//----- (006665D0) --------------------------------------------------------
unsigned int __thiscall User::BaseWiz(User *this)
{
  return this->m_kMapLoginData.param.Wizdom.base;
}

//----- (006665E0) --------------------------------------------------------
unsigned int __thiscall User::BaseInt(User *this)
{
  return this->m_kMapLoginData.param.Intelligence.base;
}

//----- (006665F0) --------------------------------------------------------
unsigned int __thiscall User::BaseMen(User *this)
{
  return this->m_kMapLoginData.param.MentalPower.base;
}

//----- (00666600) --------------------------------------------------------
unsigned int __thiscall User::BaseWClow(User *this)
{
  return this->m_kMapLoginData.param.WClow.base;
}

//----- (00666610) --------------------------------------------------------
unsigned int __thiscall User::BaseWChigh(User *this)
{
  return this->m_kMapLoginData.param.WChigh.base;
}

//----- (00666620) --------------------------------------------------------
unsigned int __thiscall User::BaseAC(User *this)
{
  return this->m_kMapLoginData.param.AC.base;
}

//----- (00666630) --------------------------------------------------------
unsigned int __thiscall User::BaseTH(User *this)
{
  return this->m_kMapLoginData.param.TH.base;
}

//----- (00666640) --------------------------------------------------------
unsigned int __thiscall User::BaseTB(User *this)
{
  return this->m_kMapLoginData.param.TB.base;
}

//----- (00666650) --------------------------------------------------------
unsigned int __thiscall User::BaseMAlow(User *this)
{
  return this->m_kMapLoginData.param.MAlow.base;
}

//----- (00666660) --------------------------------------------------------
unsigned int __thiscall User::BaseMAhigh(User *this)
{
  return this->m_kMapLoginData.param.MAhigh.base;
}

//----- (00666670) --------------------------------------------------------
unsigned int __thiscall User::BaseMR(User *this)
{
  return this->m_kMapLoginData.param.MR.base;
}

//----- (00666680) --------------------------------------------------------
unsigned int __thiscall User::BaseMH(User *this)
{
  return this->m_kMapLoginData.param.MH.base;
}

//----- (00666690) --------------------------------------------------------
unsigned int __thiscall User::BaseMB(User *this)
{
  return this->m_kMapLoginData.param.MB.base;
}

//----- (006666A0) --------------------------------------------------------
unsigned int __thiscall User::BasePainR(User *this)
{
  return this->m_kMapLoginData.param.PainRes.base;
}

//----- (006666B0) --------------------------------------------------------
unsigned int __thiscall User::BaseRestraintR(User *this)
{
  return this->m_kMapLoginData.param.RestraintRes.base;
}

//----- (006666C0) --------------------------------------------------------
unsigned int __thiscall User::BaseShockR(User *this)
{
  return this->m_kMapLoginData.param.ShockRes.base;
}

//----- (006666D0) --------------------------------------------------------
unsigned int __thiscall User::BaseCurseR(User *this)
{
  return this->m_kMapLoginData.param.CurseRes.base;
}

//----- (006666E0) --------------------------------------------------------
unsigned int __thiscall User::ChangeStr(User *this)
{
  return this->m_kMapLoginData.param.Strength.change;
}

//----- (006666F0) --------------------------------------------------------
unsigned int __thiscall User::ChangeDex(User *this)
{
  return this->m_kMapLoginData.param.Dexterity.change;
}

//----- (00666700) --------------------------------------------------------
unsigned int __thiscall User::ChangeCon(User *this)
{
  return this->m_kMapLoginData.param.Constitute.change;
}

//----- (00666710) --------------------------------------------------------
unsigned int __thiscall User::ChangeWiz(User *this)
{
  return this->m_kMapLoginData.param.Wizdom.change;
}

//----- (00666720) --------------------------------------------------------
unsigned int __thiscall User::ChangeInt(User *this)
{
  return this->m_kMapLoginData.param.Intelligence.change;
}

//----- (00666730) --------------------------------------------------------
unsigned int __thiscall User::ChangeMen(User *this)
{
  return this->m_kMapLoginData.param.MentalPower.change;
}

//----- (00666740) --------------------------------------------------------
unsigned int __thiscall User::ChangeWClow(User *this)
{
  return this->m_kMapLoginData.param.WClow.change;
}

//----- (00666750) --------------------------------------------------------
unsigned int __thiscall User::ChangeWChigh(User *this)
{
  return this->m_kMapLoginData.param.WChigh.change;
}

//----- (00666760) --------------------------------------------------------
unsigned int __thiscall User::ChangeAC(User *this)
{
  return this->m_kMapLoginData.param.AC.change;
}

//----- (00666770) --------------------------------------------------------
unsigned int __thiscall User::ChangeTH(User *this)
{
  return this->m_kMapLoginData.param.TH.change;
}

//----- (00666780) --------------------------------------------------------
unsigned int __thiscall User::ChangeTB(User *this)
{
  return this->m_kMapLoginData.param.TB.change;
}

//----- (00666790) --------------------------------------------------------
unsigned int __thiscall User::ChangeMAlow(User *this)
{
  return this->m_kMapLoginData.param.MAlow.change;
}

//----- (006667A0) --------------------------------------------------------
unsigned int __thiscall User::ChangeMAhigh(User *this)
{
  return this->m_kMapLoginData.param.MAhigh.change;
}

//----- (006667B0) --------------------------------------------------------
unsigned int __thiscall User::ChangeMR(User *this)
{
  return this->m_kMapLoginData.param.MR.change;
}

//----- (006667C0) --------------------------------------------------------
unsigned int __thiscall User::ChangeMH(User *this)
{
  return this->m_kMapLoginData.param.MH.change;
}

//----- (006667D0) --------------------------------------------------------
unsigned int __thiscall User::ChangeMB(User *this)
{
  return this->m_kMapLoginData.param.MB.change;
}

//----- (006667E0) --------------------------------------------------------
unsigned int __thiscall User::ChangePainR(User *this)
{
  return this->m_kMapLoginData.param.PainRes.change;
}

//----- (006667F0) --------------------------------------------------------
unsigned int __thiscall User::ChangeRestraintR(User *this)
{
  return this->m_kMapLoginData.param.RestraintRes.change;
}

//----- (00666800) --------------------------------------------------------
unsigned int __thiscall User::ChangeShockR(User *this)
{
  return this->m_kMapLoginData.param.ShockRes.change;
}

//----- (00666810) --------------------------------------------------------
unsigned int __thiscall User::ChangeCurseR(User *this)
{
  return this->m_kMapLoginData.param.CurseRes.change;
}

//----- (00666820) --------------------------------------------------------
unsigned int __thiscall User::HP(User *this)
{
  return this->m_kMainCharBaseData.CurHP;
}

//----- (00666830) --------------------------------------------------------
unsigned int __thiscall User::SP(User *this)
{
  return this->m_kMainCharBaseData.CurSP;
}

//----- (00666840) --------------------------------------------------------
int User::AP()
{
  return 0;
}

//----- (00666850) --------------------------------------------------------
unsigned int __thiscall User::LP(User *this)
{
  return this->m_kMainCharBaseData.CurLP;
}

//----- (00666860) --------------------------------------------------------
void __thiscall User::SetHP(User *this, int iHP)
{
  GameFrameWork *v2; // eax@2

  this->m_kMainCharBaseData.CurHP = iHP;
  if ( (double)(unsigned int)iHP < (double)this->m_kMapLoginData.param.MaxHp * 0.5 )
  {
    v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v2 )
      GameFrameWork::OpenPlayGuideWin(v2, BIL_BATTLE_5);
  }
}

//----- (006668D0) --------------------------------------------------------
void __thiscall User::SetSP(User *this, int iSP)
{
  this->m_kMainCharBaseData.CurSP = iSP;
}

//----- (006668E0) --------------------------------------------------------
void __thiscall User::SetLP(User *this, int iLP)
{
  this->m_kMainCharBaseData.CurLP = iLP;
}

//----- (00666900) --------------------------------------------------------
unsigned int __thiscall User::MaxHP(User *this)
{
  return this->m_kMapLoginData.param.MaxHp;
}

//----- (00666910) --------------------------------------------------------
unsigned int __thiscall User::MaxSP(User *this)
{
  return this->m_kMapLoginData.param.MaxSp;
}

//----- (00666920) --------------------------------------------------------
unsigned int __thiscall User::MaxAP(User *this)
{
  return this->m_kMapLoginData.param.MaxAp;
}

//----- (00666930) --------------------------------------------------------
unsigned int __thiscall User::MaxLP(User *this)
{
  return this->m_kMapLoginData.param.MaxLp;
}

//----- (00666940) --------------------------------------------------------
int __thiscall User::PwrStone(User *this)
{
  return this->m_kMainCharBaseData.CurPwrStone;
}

//----- (00666950) --------------------------------------------------------
int __thiscall User::GrdStone(User *this)
{
  return this->m_kMainCharBaseData.CurGrdStone;
}

//----- (00666960) --------------------------------------------------------
int __thiscall User::HPStone(User *this)
{
  return this->m_kMainCharBaseData.CurHPStone;
}

//----- (00666970) --------------------------------------------------------
int __thiscall User::SPStone(User *this)
{
  return this->m_kMainCharBaseData.CurSPStone;
}

//----- (00666980) --------------------------------------------------------
unsigned int __thiscall User::MaxPwrStone(User *this)
{
  return this->m_kMapLoginData.param.PwrStone.MaxStone;
}

//----- (00666990) --------------------------------------------------------
unsigned int __thiscall User::MaxGrdStone(User *this)
{
  return this->m_kMapLoginData.param.GrdStone.MaxStone;
}

//----- (006669A0) --------------------------------------------------------
unsigned int __thiscall User::MaxHPStone(User *this)
{
  return this->m_kMapLoginData.param.MaxHPStone;
}

//----- (006669B0) --------------------------------------------------------
unsigned int __thiscall User::MaxSPStone(User *this)
{
  return this->m_kMapLoginData.param.MaxSPStone;
}

//----- (006669C0) --------------------------------------------------------
void __thiscall User::SetPwrStone(User *this, int iVal)
{
  this->m_kMainCharBaseData.CurPwrStone = iVal;
}

//----- (006669E0) --------------------------------------------------------
void __thiscall User::SetGrdStone(User *this, int iVal)
{
  this->m_kMainCharBaseData.CurGrdStone = iVal;
}

//----- (00666A00) --------------------------------------------------------
void __thiscall User::SetHPStone(User *this, int iVal)
{
  this->m_kMainCharBaseData.CurHPStone = iVal;
}

//----- (00666A20) --------------------------------------------------------
void __thiscall User::SetSPStone(User *this, int iVal)
{
  this->m_kMainCharBaseData.CurSPStone = iVal;
}

//----- (00666A40) --------------------------------------------------------
void __thiscall User::SetMaxPwrStone(User *this, int iVal)
{
  this->m_kMapLoginData.param.PwrStone.MaxStone = iVal;
}

//----- (00666A50) --------------------------------------------------------
void __thiscall User::SetMaxGrdStone(User *this, int iVal)
{
  this->m_kMapLoginData.param.GrdStone.MaxStone = iVal;
}

//----- (00666A60) --------------------------------------------------------
void __thiscall User::SetMaxHPStone(User *this, int iVal)
{
  this->m_kMapLoginData.param.MaxHPStone = iVal;
}

//----- (00666A70) --------------------------------------------------------
void __thiscall User::SetMaxSPStone(User *this, int iVal)
{
  this->m_kMapLoginData.param.MaxSPStone = iVal;
}

//----- (00666A80) --------------------------------------------------------
bool __thiscall User::IsPwrStroneActive(User *this)
{
  return this->m_kMapLoginData.param.PwrStone.flag != 0;
}

//----- (00666A90) --------------------------------------------------------
bool __thiscall User::IsGrdStroneActive(User *this)
{
  return this->m_kMapLoginData.param.GrdStone.flag != 0;
}

//----- (00666AA0) --------------------------------------------------------
unsigned __int64 __thiscall User::GetMoney(User *this)
{
  return this->m_kMainCharBaseData.Cen;
}

//----- (00666AB0) --------------------------------------------------------
void __thiscall User::SetMoney(User *this, __int64 i64Money)
{
  this->m_kMainCharBaseData.Cen = i64Money;
}

//----- (00666AD0) --------------------------------------------------------
__int64 __cdecl User::GetGem(__int64 i64Money)
{
  return i64Money / 100000000;
}

//----- (00666AF0) --------------------------------------------------------
__int64 __cdecl User::GetGold(__int64 i64Money)
{
  return i64Money / 1000000 - 100 * (i64Money / 100000000);
}

//----- (00666B40) --------------------------------------------------------
__int64 __cdecl User::GetSilver(__int64 i64Money)
{
  return i64Money / 1000 - 1000 * (i64Money / 1000000);
}

//----- (00666BA0) --------------------------------------------------------
__int64 __cdecl User::GetCopper(__int64 i64Money)
{
  return i64Money % 1000;
}

//----- (00666BE0) --------------------------------------------------------
__int64 __cdecl User::ConvertMoney(__int64 i64Copper, __int64 i64Silver, __int64 i64Gold, __int64 i64Gem)
{
  return i64Copper + 1000 * (i64Silver + 1000 * (i64Gold + 100 * i64Gem));
}

//----- (00666C30) --------------------------------------------------------
void __thiscall User::InitABState(User *this, PROTO_NC_CHAR_ABSTATE_CMD *pkProto)
{
  int v2; // esi@1
  int v3; // ebx@1
  char *v4; // edx@2
  PROTO_NC_CHAR_ABSTATE_CMD *v5; // eax@2

  v2 = pkProto->number;
  v3 = 0;
  this->m_iTotalAbStateInfo = v2;
  if ( v2 > 0 )
  {
    v4 = (char *)this->m_akAbStateInfo;
    v5 = pkProto + 1;
    do
    {
      qmemcpy(v4, v5, 0x24u);
      ++v3;
      v5 += 6;
      v4 += 36;
    }
    while ( v3 < this->m_iTotalAbStateInfo );
  }
}

//----- (00666C80) --------------------------------------------------------
void __thiscall User::SetStr(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.Strength.base = *kVal;
}

//----- (00666CA0) --------------------------------------------------------
void __thiscall User::SetCon(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.Constitute.base = *kVal;
}

//----- (00666CC0) --------------------------------------------------------
void __thiscall User::SetDex(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.Dexterity.base = *kVal;
}

//----- (00666CE0) --------------------------------------------------------
void __thiscall User::SetInt(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.Intelligence.base = *kVal;
}

//----- (00666D00) --------------------------------------------------------
void __thiscall User::SetWiz(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.Wizdom.base = *kVal;
}

//----- (00666D20) --------------------------------------------------------
void __thiscall User::SetMen(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.MentalPower.base = *kVal;
}

//----- (00666D40) --------------------------------------------------------
void __thiscall User::SetWCLow(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.WClow.base = *kVal;
}

//----- (00666D60) --------------------------------------------------------
void __thiscall User::SetWCHigh(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.WChigh.base = *kVal;
}

//----- (00666D80) --------------------------------------------------------
void __thiscall User::SetAC(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.AC.base = *kVal;
}

//----- (00666DA0) --------------------------------------------------------
void __thiscall User::SetTH(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.TH.base = *kVal;
}

//----- (00666DC0) --------------------------------------------------------
void __thiscall User::SetTB(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.TB.base = *kVal;
}

//----- (00666DE0) --------------------------------------------------------
void __thiscall User::SetMALow(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.MAlow.base = *kVal;
}

//----- (00666E00) --------------------------------------------------------
void __thiscall User::SetMAHigh(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.MAhigh.base = *kVal;
}

//----- (00666E20) --------------------------------------------------------
void __thiscall User::SetMR(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.MR.base = *kVal;
}

//----- (00666E40) --------------------------------------------------------
void __thiscall User::SetMH(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.MH.base = *kVal;
}

//----- (00666E60) --------------------------------------------------------
void __thiscall User::SetMB(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.MB.base = *kVal;
}

//----- (00666E80) --------------------------------------------------------
void __thiscall User::SetChangeStr(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.Strength.change = *kVal;
}

//----- (00666EA0) --------------------------------------------------------
void __thiscall User::SetChangeCon(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.Constitute.change = *kVal;
}

//----- (00666EC0) --------------------------------------------------------
void __thiscall User::SetChangeDex(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.Dexterity.change = *kVal;
}

//----- (00666EE0) --------------------------------------------------------
void __thiscall User::SetChangeInt(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.Intelligence.change = *kVal;
}

//----- (00666F00) --------------------------------------------------------
void __thiscall User::SetChangeWiz(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.Wizdom.change = *kVal;
}

//----- (00666F20) --------------------------------------------------------
void __thiscall User::SetChangeMen(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.MentalPower.change = *kVal;
}

//----- (00666F40) --------------------------------------------------------
void __thiscall User::SetChangeWCLow(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.WClow.change = *kVal;
}

//----- (00666F60) --------------------------------------------------------
void __thiscall User::SetChangeWCHigh(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.WChigh.change = *kVal;
}

//----- (00666F80) --------------------------------------------------------
void __thiscall User::SetChangeAC(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.AC.change = *kVal;
}

//----- (00666FA0) --------------------------------------------------------
void __thiscall User::SetChangeTH(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.TH.change = *kVal;
}

//----- (00666FC0) --------------------------------------------------------
void __thiscall User::SetChangeTB(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.TB.change = *kVal;
}

//----- (00666FE0) --------------------------------------------------------
void __thiscall User::SetChangeMALow(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.MAlow.change = *kVal;
}

//----- (00667000) --------------------------------------------------------
void __thiscall User::SetChangeMAHigh(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.MAhigh.change = *kVal;
}

//----- (00667020) --------------------------------------------------------
void __thiscall User::SetChangeMR(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.MR.change = *kVal;
}

//----- (00667040) --------------------------------------------------------
void __thiscall User::SetChangeMH(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.MH.change = *kVal;
}

//----- (00667060) --------------------------------------------------------
void __thiscall User::SetChangeMB(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.MB.change = *kVal;
}

//----- (00667080) --------------------------------------------------------
void __thiscall User::SetMaxHP(User *this, unsigned int *kVal)
{
  unsigned int v2; // eax@1

  v2 = *kVal;
  this->m_kMapLoginData.param.MaxHp = *kVal;
  if ( g_pkMainChar )
    ((void (__stdcall *)(_DWORD))g_pkMainChar->vfptr[4].SetAbStateProperty)(v2);
}

//----- (006670B0) --------------------------------------------------------
void __thiscall User::SetMaxSP(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.MaxSp = *kVal;
}

//----- (006670D0) --------------------------------------------------------
void __thiscall User::SetMaxLP(User *this, unsigned int *kVal)
{
  this->m_kMapLoginData.param.MaxLp = *kVal;
}

//----- (00667120) --------------------------------------------------------
NiTList<int> *__thiscall User::GetStatTitleList(User *this)
{
  return &this->m_kStatTitleList;
}

//----- (00667130) --------------------------------------------------------
int __thiscall User::GetStatDistribute(User *this, char byStatDistribute)
{
  int result; // eax@2

  switch ( byStatDistribute )
  {
    case 0:
      result = this->m_kMainCharBaseData.statdistribute.Strength;
      break;
    case 1:
      result = this->m_kMainCharBaseData.statdistribute.Constitute;
      break;
    case 2:
      result = this->m_kMainCharBaseData.statdistribute.Dexterity;
      break;
    case 3:
      result = this->m_kMainCharBaseData.statdistribute.Intelligence;
      break;
    case 4:
      result = this->m_kMainCharBaseData.statdistribute.MentalPower;
      break;
    default:
      result = 0;
      break;
  }
  return result;
}

//----- (006671A0) --------------------------------------------------------
void __thiscall User::ClearDistributeStatPoint(User *this)
{
  *(_DWORD *)&this->m_kMainCharBaseData.statdistribute.Strength = 0;
  this->m_kMainCharBaseData.statdistribute.MentalPower = 0;
}

//----- (006671C0) --------------------------------------------------------
unsigned __int16 *__thiscall User::GetValidate_new(User *this)
{
  return this->m_wValidate;
}

//----- (006671D0) --------------------------------------------------------
void __thiscall User::SetValidata_new(User *this, unsigned __int16 *pValidate)
{
  qmemcpy(this->m_wValidate, pValidate, sizeof(this->m_wValidate));
}

//----- (006671F0) --------------------------------------------------------
void __thiscall User::SetCoin(User *this, unsigned __int64 nCoin)
{
  this->m_kCoin = nCoin;
}

//----- (00667210) --------------------------------------------------------
void __thiscall User::SetExchangeableCoin(User *this, unsigned __int64 nCoin)
{
  this->m_kExchangeableCoin = nCoin;
}

//----- (00667230) --------------------------------------------------------
unsigned __int64 __thiscall User::Coin(User *this)
{
  return this->m_kCoin;
}

//----- (00667240) --------------------------------------------------------
unsigned __int64 __thiscall User::ExchangeableCoin(User *this)
{
  return this->m_kExchangeableCoin;
}

//----- (00667250) --------------------------------------------------------
void __thiscall User::DeleteAvatar(User *this, char bySlot)
{
  int v2; // edi@1
  int v3; // eax@1
  char *v4; // esi@2
  int v5; // edx@7
  char *v6; // eax@8

  v2 = this->m_iTotalAvatarInfo;
  v3 = 0;
  if ( v2 > 0 )
  {
    v4 = &this->m_kAvatarInfo[0].slot;
    while ( *v4 != bySlot )
    {
      ++v3;
      v4 += 130;
      if ( v3 >= v2 )
        return;
    }
    if ( v3 != -1 )
    {
      v5 = v3;
      if ( v3 < v2 - 1 )
      {
        v6 = &this->m_kAvatarInfo[v3].name.n5_name[4];
        do
        {
          *((_DWORD *)v6 - 2) = *(_DWORD *)(v6 + 122);
          *((_DWORD *)v6 - 1) = *(_DWORD *)(v6 + 126);
          *(_DWORD *)v6 = *(_DWORD *)(v6 + 130);
          *((_DWORD *)v6 + 1) = *(_DWORD *)(v6 + 134);
          *((_DWORD *)v6 + 2) = *(_DWORD *)(v6 + 138);
          *((_DWORD *)v6 + 3) = *(_DWORD *)(v6 + 142);
          *((_WORD *)v6 + 8) = *((_WORD *)v6 + 73);
          v6[18] = v6[148];
          *(_DWORD *)(v6 + 19) = *(_DWORD *)(v6 + 149);
          *(_DWORD *)(v6 + 23) = *(_DWORD *)(v6 + 153);
          *(_DWORD *)(v6 + 27) = *(_DWORD *)(v6 + 157);
          *(_DWORD *)(v6 + 31) = *(_DWORD *)(v6 + 161);
          v6[35] = v6[165];
          *((_DWORD *)v6 + 9) = *(_DWORD *)(v6 + 166);
          qmemcpy(v6 + 40, v6 + 170, 0x52u);
          ++v5;
          v6 += 130;
        }
        while ( v5 < this->m_iTotalAvatarInfo - 1 );
      }
      --this->m_iTotalAvatarInfo;
    }
  }
}

//----- (006673D0) --------------------------------------------------------
void __thiscall User::SetMainCharLoginMapName(User *this, Name3 *kMapName)
{
  *(_QWORD *)&this->m_kMainCharBaseData.logininfo.currentmap.n3_name[0] = *(_QWORD *)&kMapName->n3_code[0];
  this->m_kMainCharBaseData.logininfo.currentmap.n3_code[2] = kMapName->n3_code[2];
}

//----- (00667400) --------------------------------------------------------
void __thiscall User::SetMainCharID(User *this, Name5 *kCharID)
{
  *(_QWORD *)&this->m_kMainCharBaseData.charid.n5_name[0] = *(_QWORD *)&kCharID->n5_code[0];
  *(_QWORD *)&this->m_kMainCharBaseData.charid.n5_code[2] = *(_QWORD *)&kCharID->n5_code[2];
  this->m_kMainCharBaseData.charid.n5_code[4] = kCharID->n5_code[4];
}

//----- (00667440) --------------------------------------------------------
void __thiscall User::ChangeParam(User *this, CHAR_PARAMCHANGE_CMD *pkParam)
{
  switch ( pkParam->flag )
  {
    case 0:
      this->m_kMapLoginData.param.Strength.base = pkParam->value;
      break;
    case 1:
      this->m_kMapLoginData.param.Constitute.base = pkParam->value;
      break;
    case 2:
      this->m_kMapLoginData.param.Dexterity.base = pkParam->value;
      break;
    case 3:
      this->m_kMapLoginData.param.Intelligence.base = pkParam->value;
      break;
    case 4:
      this->m_kMapLoginData.param.Wizdom.base = pkParam->value;
      break;
    case 5:
      this->m_kMapLoginData.param.MentalPower.base = pkParam->value;
      break;
    case 6:
      this->m_kMapLoginData.param.WClow.base = pkParam->value;
      break;
    case 7:
      this->m_kMapLoginData.param.WChigh.base = pkParam->value;
      break;
    case 8:
      this->m_kMapLoginData.param.AC.base = pkParam->value;
      break;
    case 9:
      this->m_kMapLoginData.param.TH.base = pkParam->value;
      break;
    case 0xA:
      this->m_kMapLoginData.param.TB.base = pkParam->value;
      break;
    case 0xB:
      this->m_kMapLoginData.param.MAlow.base = pkParam->value;
      break;
    case 0xC:
      this->m_kMapLoginData.param.MAhigh.base = pkParam->value;
      break;
    case 0xD:
      this->m_kMapLoginData.param.MR.base = pkParam->value;
      break;
    case 0xE:
      this->m_kMapLoginData.param.MH.base = pkParam->value;
      break;
    case 0xF:
      this->m_kMapLoginData.param.MB.base = pkParam->value;
      break;
    case 0x10:
      User::SetMaxHP(this, &pkParam->value);
      break;
    case 0x11:
      this->m_kMapLoginData.param.MaxSp = pkParam->value;
      break;
    case 0x12:
      this->m_kFreeStatPoint.dwFreeWC = pkParam->value;
      break;
    case 0x13:
      this->m_kFreeStatPoint.dwFreeAC = pkParam->value;
      break;
    case 0x14:
      this->m_kFreeStatPoint.dwFreeMA = pkParam->value;
      break;
    case 0x15:
      this->m_kFreeStatPoint.dwFreeMR = pkParam->value;
      break;
    case 0x16:
      this->m_kFreeStatPoint.dwFreeTH = pkParam->value;
      break;
    case 0x17:
      this->m_kFreeStatPoint.dwFreeTB = pkParam->value;
      break;
    case 0x18:
      this->m_kFreeStatPoint.dwFreeCRITICAL = pkParam->value;
      break;
    case 0x19:
      this->m_kFreeStatPoint.dwFreeBLOCK = pkParam->value;
      break;
    case 0x1A:
      this->m_kFreeStatPoint.dwFreeMAXHP = pkParam->value;
      break;
    case 0x1B:
      this->m_kFreeStatPoint.dwFreeMAXSP = pkParam->value;
      break;
    case 0x24:
      this->m_kMapLoginData.param.MaxLp = pkParam->value;
      break;
    default:
      return;
  }
}

//----- (00667670) --------------------------------------------------------
void __thiscall User::ChangeChangeParam(User *this, CHAR_PARAMCHANGE_CMD *pkParam)
{
  switch ( pkParam->flag )
  {
    case 0:
      this->m_kMapLoginData.param.Strength.change = pkParam->value;
      break;
    case 1:
      this->m_kMapLoginData.param.Constitute.change = pkParam->value;
      break;
    case 2:
      this->m_kMapLoginData.param.Dexterity.change = pkParam->value;
      break;
    case 3:
      this->m_kMapLoginData.param.Intelligence.change = pkParam->value;
      break;
    case 4:
      this->m_kMapLoginData.param.Wizdom.change = pkParam->value;
      break;
    case 5:
      this->m_kMapLoginData.param.MentalPower.change = pkParam->value;
      break;
    case 6:
      this->m_kMapLoginData.param.WClow.change = pkParam->value;
      break;
    case 7:
      this->m_kMapLoginData.param.WChigh.change = pkParam->value;
      break;
    case 8:
      this->m_kMapLoginData.param.AC.change = pkParam->value;
      break;
    case 9:
      this->m_kMapLoginData.param.TH.change = pkParam->value;
      break;
    case 0xA:
      this->m_kMapLoginData.param.TB.change = pkParam->value;
      break;
    case 0xB:
      this->m_kMapLoginData.param.MAlow.change = pkParam->value;
      break;
    case 0xC:
      this->m_kMapLoginData.param.MAhigh.change = pkParam->value;
      break;
    case 0xD:
      this->m_kMapLoginData.param.MR.change = pkParam->value;
      break;
    case 0xE:
      this->m_kMapLoginData.param.MH.change = pkParam->value;
      break;
    case 0xF:
      this->m_kMapLoginData.param.MB.change = pkParam->value;
      break;
    case 0x10:
      User::SetMaxHP(this, &pkParam->value);
      break;
    case 0x11:
      this->m_kMapLoginData.param.MaxSp = pkParam->value;
      break;
    case 0x12:
      this->m_kFreeStatPoint.dwFreeWC = pkParam->value;
      break;
    case 0x13:
      this->m_kFreeStatPoint.dwFreeAC = pkParam->value;
      break;
    case 0x14:
      this->m_kFreeStatPoint.dwFreeMA = pkParam->value;
      break;
    case 0x15:
      this->m_kFreeStatPoint.dwFreeMR = pkParam->value;
      break;
    case 0x16:
      this->m_kFreeStatPoint.dwFreeTH = pkParam->value;
      break;
    case 0x17:
      this->m_kFreeStatPoint.dwFreeTB = pkParam->value;
      break;
    case 0x18:
      this->m_kFreeStatPoint.dwFreeCRITICAL = pkParam->value;
      break;
    case 0x19:
      this->m_kFreeStatPoint.dwFreeBLOCK = pkParam->value;
      break;
    case 0x1A:
      this->m_kFreeStatPoint.dwFreeMAXHP = pkParam->value;
      break;
    case 0x1B:
      this->m_kFreeStatPoint.dwFreeMAXSP = pkParam->value;
      break;
    case 0x24:
      this->m_kMapLoginData.param.MaxLp = pkParam->value;
      break;
    default:
      return;
  }
}

//----- (006678A0) --------------------------------------------------------
void __thiscall User::StatChangeByDistributePoint(User *this, char byStatDistribute, int iChange)
{
  this->m_kMainCharBaseData.statdistribute.RedistributePoint += iChange;
  unk_A97D74 -= iChange;
  switch ( byStatDistribute )
  {
    case 0:
      this->m_kMainCharBaseData.statdistribute.Strength += iChange;
      break;
    case 1:
      this->m_kMainCharBaseData.statdistribute.Constitute += iChange;
      break;
    case 2:
      this->m_kMainCharBaseData.statdistribute.Dexterity += iChange;
      break;
    case 3:
      this->m_kMainCharBaseData.statdistribute.Intelligence += iChange;
      break;
    case 4:
      this->m_kMainCharBaseData.statdistribute.MentalPower += iChange;
      break;
    default:
      return;
  }
}

//----- (00667910) --------------------------------------------------------
PROTO_AVATARINFORMATION *__thiscall User::GetAvatarInfo(User *this, Name5 *CharName)
{
  signed int v2; // edx@1
  char *v3; // eax@1

  v2 = 0;
  v3 = &this->m_kAvatarInfo[0].name.n5_name[8];
  while ( *((_DWORD *)v3 - 2) != CharName->n5_code[0]
       || *((_DWORD *)v3 - 1) != CharName->n5_code[1]
       || *(_DWORD *)v3 != CharName->n5_code[2]
       || *((_DWORD *)v3 + 1) != CharName->n5_code[3]
       || *((_DWORD *)v3 + 2) != CharName->n5_code[4] )
  {
    ++v2;
    v3 += 130;
    if ( v2 >= 6 )
      return 0;
  }
  return &this->m_kAvatarInfo[v2];
}

//----- (00667970) --------------------------------------------------------
void __thiscall User::~User(User *this)
{
  User *v1; // ebx@1
  char *v2; // edi@1
  NiTListItem<int> *v3; // esi@1
  NiTListItem<int> *v4; // ST0C_4@2

  v1 = this;
  v2 = (char *)&this->m_kStatTitleList;
  this->m_kStatTitleList.vfptr = (NiTListBase<DFALL<int>,int>Vtbl *)&NiTPointerListBase<DFALL<int>,int>::`vftable';
  v3 = this->m_kStatTitleList.m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v2 + 8))(v2, v4);
  }
  *((_DWORD *)v2 + 3) = 0;
  *((_DWORD *)v2 + 1) = 0;
  *((_DWORD *)v2 + 2) = 0;
  *(_DWORD *)v2 = &NiTListBase<DFALL<int>,int>::`vftable';
  `eh vector destructor iterator'(
    v1->m_kAvatarInfo,
    0x82u,
    6,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
}
// 9BACFC: using guessed type int (__thiscall *NiTListBase<DFALL<int>,int>::`vftable')(void *p, char);
// 9BAD0C: using guessed type int (__thiscall *NiTPointerListBase<DFALL<int>,int>::`vftable')(void *p, char);

//----- (00667A20) --------------------------------------------------------
char __thiscall User::AddAvatarInfo(User *this, PROTO_AVATARINFORMATION *p)
{
  User *v2; // esi@1
  int v3; // eax@1
  char result; // al@2

  v2 = this;
  v3 = this->m_iTotalAvatarInfo;
  if ( v3 < 6 )
  {
    PROTO_AVATARINFORMATION::operator=(&this->m_kAvatarInfo[v3], p);
    result = 1;
    ++v2->m_iTotalAvatarInfo;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00667A60) --------------------------------------------------------
void __thiscall User::ChangeParam(User *this, PROTO_NC_CHAR_BASEPARAMCHANGE_CMD *pkProto)
{
  PROTO_NC_CHAR_BASEPARAMCHANGE_CMD *v2; // edx@1
  signed int v3; // ebx@1
  User *v4; // edi@1
  PROTO_NC_CHAR_BASEPARAMCHANGE_CMD *v5; // esi@2
  int v6; // eax@20

  v2 = pkProto;
  v3 = 0;
  v4 = this;
  if ( pkProto->changenum )
  {
    v5 = pkProto + 2;
    do
    {
      switch ( v5[-1].changenum )
      {
        case 0:
          v4->m_kMapLoginData.param.Strength.base = *(_DWORD *)&v5->changenum;
          break;
        case 1:
          v4->m_kMapLoginData.param.Constitute.base = *(_DWORD *)&v5->changenum;
          break;
        case 2:
          v4->m_kMapLoginData.param.Dexterity.base = *(_DWORD *)&v5->changenum;
          break;
        case 3:
          v4->m_kMapLoginData.param.Intelligence.base = *(_DWORD *)&v5->changenum;
          break;
        case 4:
          v4->m_kMapLoginData.param.Wizdom.base = *(_DWORD *)&v5->changenum;
          break;
        case 5:
          v4->m_kMapLoginData.param.MentalPower.base = *(_DWORD *)&v5->changenum;
          break;
        case 6:
          v4->m_kMapLoginData.param.WClow.base = *(_DWORD *)&v5->changenum;
          break;
        case 7:
          v4->m_kMapLoginData.param.WChigh.base = *(_DWORD *)&v5->changenum;
          break;
        case 8:
          v4->m_kMapLoginData.param.AC.base = *(_DWORD *)&v5->changenum;
          break;
        case 9:
          v4->m_kMapLoginData.param.TH.base = *(_DWORD *)&v5->changenum;
          break;
        case 0xA:
          v4->m_kMapLoginData.param.TB.base = *(_DWORD *)&v5->changenum;
          break;
        case 0xB:
          v4->m_kMapLoginData.param.MAlow.base = *(_DWORD *)&v5->changenum;
          break;
        case 0xC:
          v4->m_kMapLoginData.param.MAhigh.base = *(_DWORD *)&v5->changenum;
          break;
        case 0xD:
          v4->m_kMapLoginData.param.MR.base = *(_DWORD *)&v5->changenum;
          break;
        case 0xE:
          v4->m_kMapLoginData.param.MH.base = *(_DWORD *)&v5->changenum;
          break;
        case 0xF:
          v4->m_kMapLoginData.param.MB.base = *(_DWORD *)&v5->changenum;
          break;
        case 0x10:
          v6 = *(_DWORD *)&v5->changenum;
          v4->m_kMapLoginData.param.MaxHp = *(_DWORD *)&v5->changenum;
          if ( g_pkMainChar )
          {
            ((void (__stdcall *)(int))g_pkMainChar->vfptr[4].SetAbStateProperty)(v6);
            v2 = pkProto;
          }
          break;
        case 0x11:
          v4->m_kMapLoginData.param.MaxSp = *(_DWORD *)&v5->changenum;
          break;
        case 0x12:
          v4->m_kFreeStatPoint.dwFreeWC = *(_DWORD *)&v5->changenum;
          break;
        case 0x13:
          v4->m_kFreeStatPoint.dwFreeAC = *(_DWORD *)&v5->changenum;
          break;
        case 0x14:
          v4->m_kFreeStatPoint.dwFreeMA = *(_DWORD *)&v5->changenum;
          break;
        case 0x15:
          v4->m_kFreeStatPoint.dwFreeMR = *(_DWORD *)&v5->changenum;
          break;
        case 0x16:
          v4->m_kFreeStatPoint.dwFreeTH = *(_DWORD *)&v5->changenum;
          break;
        case 0x17:
          v4->m_kFreeStatPoint.dwFreeTB = *(_DWORD *)&v5->changenum;
          break;
        case 0x18:
          v4->m_kFreeStatPoint.dwFreeCRITICAL = *(_DWORD *)&v5->changenum;
          break;
        case 0x19:
          v4->m_kFreeStatPoint.dwFreeBLOCK = *(_DWORD *)&v5->changenum;
          break;
        case 0x1A:
          v4->m_kFreeStatPoint.dwFreeMAXHP = *(_DWORD *)&v5->changenum;
          break;
        case 0x1B:
          v4->m_kFreeStatPoint.dwFreeMAXSP = *(_DWORD *)&v5->changenum;
          break;
        case 0x24:
          v4->m_kMapLoginData.param.MaxLp = *(_DWORD *)&v5->changenum;
          break;
        default:
          break;
      }
      ++v3;
      v5 += 5;
    }
    while ( v3 < v2->changenum );
  }
}

//----- (00667CB0) --------------------------------------------------------
void __thiscall User::ChangeChangeParam(User *this, PROTO_NC_CHAR_BASEPARAMCHANGE_CMD *pkProto)
{
  PROTO_NC_CHAR_BASEPARAMCHANGE_CMD *v2; // edx@1
  signed int v3; // ebx@1
  User *v4; // edi@1
  PROTO_NC_CHAR_BASEPARAMCHANGE_CMD *v5; // esi@2
  int v6; // eax@20

  v2 = pkProto;
  v3 = 0;
  v4 = this;
  if ( pkProto->changenum )
  {
    v5 = pkProto + 2;
    do
    {
      switch ( v5[-1].changenum )
      {
        case 0:
          v4->m_kMapLoginData.param.Strength.change = *(_DWORD *)&v5->changenum;
          break;
        case 1:
          v4->m_kMapLoginData.param.Constitute.change = *(_DWORD *)&v5->changenum;
          break;
        case 2:
          v4->m_kMapLoginData.param.Dexterity.change = *(_DWORD *)&v5->changenum;
          break;
        case 3:
          v4->m_kMapLoginData.param.Intelligence.change = *(_DWORD *)&v5->changenum;
          break;
        case 4:
          v4->m_kMapLoginData.param.Wizdom.change = *(_DWORD *)&v5->changenum;
          break;
        case 5:
          v4->m_kMapLoginData.param.MentalPower.change = *(_DWORD *)&v5->changenum;
          break;
        case 6:
          v4->m_kMapLoginData.param.WClow.change = *(_DWORD *)&v5->changenum;
          break;
        case 7:
          v4->m_kMapLoginData.param.WChigh.change = *(_DWORD *)&v5->changenum;
          break;
        case 8:
          v4->m_kMapLoginData.param.AC.change = *(_DWORD *)&v5->changenum;
          break;
        case 9:
          v4->m_kMapLoginData.param.TH.change = *(_DWORD *)&v5->changenum;
          break;
        case 0xA:
          v4->m_kMapLoginData.param.TB.change = *(_DWORD *)&v5->changenum;
          break;
        case 0xB:
          v4->m_kMapLoginData.param.MAlow.change = *(_DWORD *)&v5->changenum;
          break;
        case 0xC:
          v4->m_kMapLoginData.param.MAhigh.change = *(_DWORD *)&v5->changenum;
          break;
        case 0xD:
          v4->m_kMapLoginData.param.MR.change = *(_DWORD *)&v5->changenum;
          break;
        case 0xE:
          v4->m_kMapLoginData.param.MH.change = *(_DWORD *)&v5->changenum;
          break;
        case 0xF:
          v4->m_kMapLoginData.param.MB.change = *(_DWORD *)&v5->changenum;
          break;
        case 0x10:
          v6 = *(_DWORD *)&v5->changenum;
          v4->m_kMapLoginData.param.MaxHp = *(_DWORD *)&v5->changenum;
          if ( g_pkMainChar )
          {
            ((void (__stdcall *)(int))g_pkMainChar->vfptr[4].SetAbStateProperty)(v6);
            v2 = pkProto;
          }
          break;
        case 0x11:
          v4->m_kMapLoginData.param.MaxSp = *(_DWORD *)&v5->changenum;
          break;
        case 0x12:
          v4->m_kFreeStatPoint.dwFreeWC = *(_DWORD *)&v5->changenum;
          break;
        case 0x13:
          v4->m_kFreeStatPoint.dwFreeAC = *(_DWORD *)&v5->changenum;
          break;
        case 0x14:
          v4->m_kFreeStatPoint.dwFreeMA = *(_DWORD *)&v5->changenum;
          break;
        case 0x15:
          v4->m_kFreeStatPoint.dwFreeMR = *(_DWORD *)&v5->changenum;
          break;
        case 0x16:
          v4->m_kFreeStatPoint.dwFreeTH = *(_DWORD *)&v5->changenum;
          break;
        case 0x17:
          v4->m_kFreeStatPoint.dwFreeTB = *(_DWORD *)&v5->changenum;
          break;
        case 0x18:
          v4->m_kFreeStatPoint.dwFreeCRITICAL = *(_DWORD *)&v5->changenum;
          break;
        case 0x19:
          v4->m_kFreeStatPoint.dwFreeBLOCK = *(_DWORD *)&v5->changenum;
          break;
        case 0x1A:
          v4->m_kFreeStatPoint.dwFreeMAXHP = *(_DWORD *)&v5->changenum;
          break;
        case 0x1B:
          v4->m_kFreeStatPoint.dwFreeMAXSP = *(_DWORD *)&v5->changenum;
          break;
        case 0x24:
          v4->m_kMapLoginData.param.MaxLp = *(_DWORD *)&v5->changenum;
          break;
        default:
          break;
      }
      ++v3;
      v5 += 5;
    }
    while ( v3 < v2->changenum );
  }
}

//----- (00667F00) --------------------------------------------------------
void __thiscall User::User(User *this)
{
  User *v1; // esi@1
  __int64 v2; // kr00_8@1
  __int64 v3; // kr08_8@1
  unsigned int v4; // ecx@1
  unsigned int v5; // edx@1
  Name5 kCharID; // [sp+8h] [bp-24h]@1
  Name3 kMapName; // [sp+1Ch] [bp-10h]@1

  v1 = this;
  `eh vector constructor iterator'(
    this->m_kAvatarInfo,
    0x82u,
    6,
    (void (__thiscall *)(void *))PROTO_AVATARINFORMATION::PROTO_AVATARINFORMATION,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
  v1->m_kMainCharBaseData.charid.n5_code[4] = 0;
  v1->m_kMainCharBaseData.charid.n5_code[3] = 0;
  v1->m_kMainCharBaseData.charid.n5_code[2] = 0;
  v1->m_kMainCharBaseData.charid.n5_code[1] = 0;
  v1->m_kMainCharBaseData.charid.n5_code[0] = 0;
  v1->m_kMainCharBaseData.logininfo.currentmap.n3_code[2] = 0;
  v1->m_kMainCharBaseData.logininfo.currentmap.n3_code[1] = 0;
  v1->m_kMainCharBaseData.logininfo.currentmap.n3_code[0] = 0;
  v1->m_kStatTitleList.m_kAllocator.m_uiCount = 0;
  v1->m_kStatTitleList.m_pkHead = 0;
  v1->m_kStatTitleList.m_pkTail = 0;
  v1->m_kStatTitleList.vfptr = (NiTListBase<DFALL<int>,int>Vtbl *)&NiTList<int>::`vftable';
  v1->m_iTotalAvatarInfo = 0;
  v1->m_bySelectedAvatartSlot = -1;
  v1->m_iTotalAbStateInfo = 0;
  *(_QWORD *)&kMapName.n3_code[1] = 0i64;
  kMapName.n3_code[0] = 0;
  strncpy(kMapName.n3_name, off_9BACEC, 0xCu);
  v2 = *(_QWORD *)&kMapName.n3_code[1];
  v1->m_kMainCharBaseData.logininfo.currentmap.n3_code[0] = kMapName.n3_code[0];
  *(_QWORD *)&v1->m_kMainCharBaseData.logininfo.currentmap.n3_code[1] = v2;
  v1->m_kMainCharShapeData = (PROTO_AVATAR_SHAPE_INFO)(*(_BYTE *)&v1->m_kMainCharShapeData & 0x87 | 4);
  *(_QWORD *)&kCharID.n5_code[3] = 0i64;
  *(_QWORD *)&kCharID.n5_code[1] = 0i64;
  kCharID.n5_code[0] = 0;
  strncpy(kCharID.n5_name, "Tester", 0x14u);
  v3 = *(_QWORD *)&kCharID.n5_code[1];
  v1->m_kMainCharBaseData.charid.n5_code[0] = kCharID.n5_code[0];
  v4 = kCharID.n5_code[3];
  v1->m_kMainCharBaseData.charid.n5_code[1] = v3;
  v5 = kCharID.n5_code[4];
  v1->m_kMainCharBaseData.charid.n5_code[2] = HIDWORD(v3);
  v1->m_kMainCharBaseData.charid.n5_code[3] = v4;
  v1->m_kMainCharBaseData.charid.n5_code[4] = v5;
  v1->m_kMainCharBaseData.logininfo.currentcoord.xy.x = 3550;
  v1->m_kMainCharBaseData.logininfo.currentcoord.xy.y = 3634;
  v1->m_kFreeStatPoint.dwFreeWC = 0;
  v1->m_kFreeStatPoint.dwFreeAC = 0;
  v1->m_kFreeStatPoint.dwFreeMA = 0;
  v1->m_kFreeStatPoint.dwFreeMR = 0;
  v1->m_kFreeStatPoint.dwFreeTH = 0;
  v1->m_kFreeStatPoint.dwFreeTB = 0;
  v1->m_kFreeStatPoint.dwFreeCRITICAL = 0;
  v1->m_kFreeStatPoint.dwFreeBLOCK = 0;
  v1->m_kFreeStatPoint.dwFreeMAXHP = 0;
  v1->m_kFreeStatPoint.dwFreeMAXSP = 0;
  LODWORD(v1->m_kCoin) = 0;
  HIDWORD(v1->m_kCoin) = 0;
  LODWORD(v1->m_kExchangeableCoin) = 0;
  HIDWORD(v1->m_kExchangeableCoin) = 0;
  memset((char *)v1->m_wValidate, 0, 0x40u);
}
// 9BAD1C: using guessed type int (__thiscall *NiTList<int>::`vftable')(void *p, char);

//----- (006680C0) --------------------------------------------------------
void __thiscall User::SetMainCharBaseData(User *this, PROTO_NC_CHAR_BASE_CMD *p)
{
  PROTO_NC_CHAR_BASE_CMD::operator=(&this->m_kMainCharBaseData, p);
}

//----- (006680D0) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<int>,int>::NiTListBase<DFALL<int>,int>(NiTListBase<DFALL<int>,int> *this)
{
  this->vfptr = (NiTListBase<DFALL<int>,int>Vtbl *)&NiTListBase<DFALL<int>,int>::`vftable';
  this->m_kAllocator.m_uiCount = 0;
  this->m_pkHead = 0;
  this->m_pkTail = 0;
}
// 9BACFC: using guessed type int (__thiscall *NiTListBase<DFALL<int>,int>::`vftable')(void *p, char);

//----- (006680F0) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<int>,int>::~NiTListBase<DFALL<int>,int>(NiTListBase<DFALL<int>,int> *this)
{
  this->vfptr = (NiTListBase<DFALL<int>,int>Vtbl *)&NiTListBase<DFALL<int>,int>::`vftable';
}
// 9BACFC: using guessed type int (__thiscall *NiTListBase<DFALL<int>,int>::`vftable')(void *p, char);

//----- (00668100) --------------------------------------------------------
NiTListBase<DFALL<int>,int> *__thiscall NiTListBase<DFALL<int>,int>::`vector deleting destructor'(NiTListBase<DFALL<int>,int> *this, unsigned int a2)
{
  NiTListBase<DFALL<int>,int> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<int>,int>Vtbl *)&NiTListBase<DFALL<int>,int>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BACFC: using guessed type int (__thiscall *NiTListBase<DFALL<int>,int>::`vftable')(void *p, char);

//----- (00668130) --------------------------------------------------------
void __thiscall PROTO_AVATARINFORMATION::PROTO_AVATARINFORMATION(PROTO_AVATARINFORMATION *this)
{
  *(_QWORD *)&this->name.n5_code[3] = 0i64;
  *(_QWORD *)&this->name.n5_code[1] = 0i64;
  this->name.n5_code[0] = 0;
  *(_QWORD *)&this->loginmap.n3_code[1] = 0i64;
  this->loginmap.n3_code[0] = 0;
  *(_QWORD *)&this->sKQMapName.n3_code[1] = 0i64;
  this->sKQMapName.n3_code[0] = 0;
}

//----- (00668160) --------------------------------------------------------
PROTO_AVATARINFORMATION *__thiscall PROTO_AVATARINFORMATION::operator=(PROTO_AVATARINFORMATION *this, PROTO_AVATARINFORMATION *__that)
{
  PROTO_AVATARINFORMATION *result; // eax@1

  result = this;
  this->chrregnum = __that->chrregnum;
  *(_QWORD *)&this->name.n5_name[0] = *(_QWORD *)&__that->name.n5_name[0];
  *(_QWORD *)&this->name.n5_code[2] = *(_QWORD *)&__that->name.n5_code[2];
  this->name.n5_code[4] = __that->name.n5_code[4];
  this->level = __that->level;
  this->slot = __that->slot;
  *(_QWORD *)&this->loginmap.n3_name[0] = *(_QWORD *)&__that->loginmap.n3_name[0];
  this->loginmap.n3_code[2] = __that->loginmap.n3_code[2];
  *(_DWORD *)&this->delinfo.year = *(_DWORD *)&__that->delinfo.year;
  this->delinfo.min = __that->delinfo.min;
  this->shape = __that->shape;
  qmemcpy(&this->equip, &__that->equip, 0x52u);
  return result;
}

//----- (00668220) --------------------------------------------------------
void __thiscall NiTList<int>::~NiTList<int>(NiTList<int> *this)
{
  NiTList<int> *v1; // edi@1
  NiTListItem<int> *v2; // esi@1
  NiTListItem<int> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<DFALL<int>,int>Vtbl *)&NiTPointerListBase<DFALL<int>,int>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<DFALL<int>,int> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<DFALL<int>,int>Vtbl *)&NiTListBase<DFALL<int>,int>::`vftable';
}
// 9BACFC: using guessed type int (__thiscall *NiTListBase<DFALL<int>,int>::`vftable')(void *p, char);
// 9BAD0C: using guessed type int (__thiscall *NiTPointerListBase<DFALL<int>,int>::`vftable')(void *p, char);

//----- (006682A0) --------------------------------------------------------
NiTList<int> *__thiscall NiTList<int>::`vector deleting destructor'(NiTList<int> *this, unsigned int a2)
{
  NiTList<int> *v2; // edi@1
  NiTListItem<int> *v3; // esi@1
  NiTListItem<int> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<int>,int>Vtbl *)&NiTPointerListBase<DFALL<int>,int>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<DFALL<int>,int> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<int>,int>Vtbl *)&NiTListBase<DFALL<int>,int>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BACFC: using guessed type int (__thiscall *NiTListBase<DFALL<int>,int>::`vftable')(void *p, char);
// 9BAD0C: using guessed type int (__thiscall *NiTPointerListBase<DFALL<int>,int>::`vftable')(void *p, char);

//----- (00668330) --------------------------------------------------------
PROTO_NC_CHAR_BASE_CMD *__thiscall PROTO_NC_CHAR_BASE_CMD::operator=(PROTO_NC_CHAR_BASE_CMD *this, PROTO_NC_CHAR_BASE_CMD *__that)
{
  PROTO_NC_CHAR_BASE_CMD *result; // eax@1

  result = this;
  this->chrregnum = __that->chrregnum;
  *(_QWORD *)&this->charid.n5_name[0] = *(_QWORD *)&__that->charid.n5_name[0];
  *(_QWORD *)&this->charid.n5_code[2] = *(_QWORD *)&__that->charid.n5_code[2];
  this->charid.n5_code[4] = __that->charid.n5_code[4];
  this->slotno = __that->slotno;
  this->Level = __that->Level;
  this->Experience = __that->Experience;
  this->CurPwrStone = __that->CurPwrStone;
  this->CurGrdStone = __that->CurGrdStone;
  this->CurHPStone = __that->CurHPStone;
  this->CurSPStone = __that->CurSPStone;
  this->CurHP = __that->CurHP;
  this->CurSP = __that->CurSP;
  this->CurLP = __that->CurLP;
  this->fame = __that->fame;
  this->Cen = __that->Cen;
  *(_QWORD *)&this->logininfo.currentmap.n3_name[0] = *(_QWORD *)&__that->logininfo.currentmap.n3_name[0];
  this->logininfo.currentmap.n3_code[2] = __that->logininfo.currentmap.n3_code[2];
  this->logininfo.currentcoord.xy.x = __that->logininfo.currentcoord.xy.x;
  this->logininfo.currentcoord.xy.y = __that->logininfo.currentcoord.xy.y;
  this->logininfo.currentcoord.dir = __that->logininfo.currentcoord.dir;
  *(_DWORD *)&this->statdistribute.Strength = *(_DWORD *)&__that->statdistribute.Strength;
  *(_WORD *)&this->statdistribute.MentalPower = *(_WORD *)&__that->statdistribute.MentalPower;
  this->pkyellowtime = __that->pkyellowtime;
  this->pkcount = __that->pkcount;
  this->prisonmin = __that->prisonmin;
  this->adminlevel = __that->adminlevel;
  this->flags.bin = __that->flags.bin;
  return result;
}

//----- (00668420) --------------------------------------------------------
ItemAuthority *__thiscall ItemAuthority::`scalar deleting destructor'(ItemAuthority *this, unsigned int a2)
{
  ItemAuthority *v2; // esi@1

  v2 = this;
  this->vfptr = (CItemAuthorityBaseVtbl *)&ItemAuthority::`vftable';
  CItemAuthorityBase::~CItemAuthorityBase((CItemAuthorityBase *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BAD2C: using guessed type int (__thiscall *ItemAuthority::`vftable')(void *p, char);

//----- (00668450) --------------------------------------------------------
bool __thiscall ItemAuthority::IsAllFalse(ItemAuthority *this, E_BelongType eBelongType)
{
  int v2; // eax@1

  v2 = ((int (__stdcall *)(E_BelongType))this->vfptr->IA_GetBelongTypeInfo)(eBelongType);
  return v2
      && !*(_BYTE *)(v2 + 4)
      && !*(_BYTE *)(v2 + 5)
      && !*(_BYTE *)(v2 + 6)
      && !*(_BYTE *)(v2 + 7)
      && !*(_BYTE *)(v2 + 8)
      && !*(_BYTE *)(v2 + 9);
}

//----- (006684A0) --------------------------------------------------------
BelongTypeInfo *__stdcall ItemAuthority::IA_GetBelongTypeInfo(E_BelongType idx)
{
  return BelongTypeInfoTab::GetBTInfo(idx);
}

//----- (006684C0) --------------------------------------------------------
unsigned int __cdecl ITableBase<BelongTypeInfo,BelongTypeInfoTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<BelongTypeInfo,BelongTypeInfoTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C1EC: using guessed type int ITableBase<BelongTypeInfo,BelongTypeInfoTab>::ms_pkTable;

//----- (006684E0) --------------------------------------------------------
BelongTypeInfo *__cdecl BelongTypeInfoTab::GetBTInfo(E_BelongType eType)
{
  unsigned int v1; // esi@1
  BelongTypeInfo *result; // eax@4

  v1 = 0;
  if ( ITableBase<BelongTypeInfo,BelongTypeInfoTab>::GetTotal() )
  {
    while ( *(_DWORD *)CDataReader::GetRecord(
                         (CDataReader *)(ITableBase<BelongTypeInfo,BelongTypeInfoTab>::ms_pkTable + 4),
                         v1) != eType )
    {
      if ( ++v1 >= ITableBase<BelongTypeInfo,BelongTypeInfoTab>::GetTotal() )
        goto LABEL_4;
    }
    result = (BelongTypeInfo *)CDataReader::GetRecord(
                                 (CDataReader *)(ITableBase<BelongTypeInfo,BelongTypeInfoTab>::ms_pkTable + 4),
                                 v1);
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}
// A8C1EC: using guessed type int ITableBase<BelongTypeInfo,BelongTypeInfoTab>::ms_pkTable;

//----- (00668540) --------------------------------------------------------
void __thiscall DropItem::DropItem(DropItem *this)
{
  this->vfptr = (DropItemVtbl *)&DropItem::`vftable';
  this->m_spNode.m_pObject = 0;
  this->m_bPickable = 0;
  this->m_bOutPlayerSight = 0;
}
// 9BAE20: using guessed type int (__thiscall *DropItem::`vftable')(void *p, char);

//----- (00668560) --------------------------------------------------------
void __thiscall DropItem::~DropItem(DropItem *this)
{
  NiNode *v1; // esi@1

  this->vfptr = (DropItemVtbl *)&DropItem::`vftable';
  v1 = this->m_spNode.m_pObject;
  if ( v1 && !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
  {
    if ( v1 )
      v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
  }
}
// 9BAE20: using guessed type int (__thiscall *DropItem::`vftable')(void *p, char);

//----- (00668590) --------------------------------------------------------
char *__thiscall DropItem::GetItemName(DropItem *this)
{
  int v1; // esi@1
  int v2; // edi@1
  char *result; // eax@2
  int v4; // ecx@4

  v1 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  v2 = this->m_kItemID;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                          ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                          v2)
    && (unsigned __int16)v2 <= *(_WORD *)(v1 + 200)
    && (v4 = *(_DWORD *)(v1 + 196), *(_DWORD *)(v4 + 4 * v2)) )
  {
    result = (char *)(*(_DWORD *)(v4 + 4 * v2) + 34);
  }
  else
  {
    result = (char *)34;
  }
  return result;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (006685E0) --------------------------------------------------------
bool __thiscall DropItemMgr::LoadEff(DropItemMgr *this)
{
  DropItemMgr *v1; // ebx@1
  NiNode *v2; // eax@3
  NiNode *v3; // esi@3
  NiNode *v4; // edi@3
  bool result; // al@11
  NiNode *v6; // eax@14
  NiNode *v7; // esi@14
  NiNode *v8; // edi@14
  char acFileName[260]; // [sp+Ch] [bp-108h]@3

  v1 = this;
  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acFileName, "%sGroundItem\\GrdNIFLargeEffect_Loop.nif", &Folder::m_acItem);
  v2 = PgUtil::LoadNifFile(acFileName, 0);
  v3 = v1->m_spLoopEff.m_pObject;
  v4 = v2;
  if ( v3 != v2 )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spLoopEff.m_pObject = v4;
    if ( v4 )
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  }
  if ( v1->m_spLoopEff.m_pObject )
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    sprintf(acFileName, "%sGroundItem\\GrdNIFLargeEffect_Noloop.nif", &Folder::m_acItem);
    v6 = PgUtil::LoadNifFile(acFileName, 0);
    v7 = v1->m_spStartEff.m_pObject;
    v8 = v6;
    if ( v7 != v6 )
    {
      if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      v1->m_spStartEff.m_pObject = v8;
      if ( v8 )
        InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
    }
    result = v1->m_spStartEff.m_pObject != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A89130: using guessed type char *Folder::m_acItem;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00668710) --------------------------------------------------------
bool __thiscall DropItemMgr::Init(DropItemMgr *this)
{
  DropItemMgr *v1; // ebx@1
  DynaminUV *v2; // eax@1
  DynaminUV *v3; // edi@1
  DynaminUV *v4; // eax@2
  DynaminUV *v5; // esi@3

  v1 = this;
  v2 = (DynaminUV *)operator new(0x11Cu);
  v3 = 0;
  if ( v2 )
  {
    DynaminUV::DynaminUV(v2);
    v3 = v4;
  }
  v5 = v1->m_spDynamicUV.m_pObject;
  if ( v5 != v3 )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spDynamicUV.m_pObject = v3;
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
  return DropItemMgr::LoadEff(v1) != 0;
}

//----- (006687C0) --------------------------------------------------------
void __thiscall DropItemMgr::RemoveAll(DropItemMgr *this)
{
  DropItemMgr *v1; // edi@1
  NiTListItem<DropItem *> *v2; // esi@1
  DropItem *v3; // ecx@2
  NiTListItem<DropItem *> **v4; // esi@5
  NiTListItem<DropItem *> *v5; // ST00_4@6

  v1 = this;
  v2 = this->m_kList.m_pkHead;
  while ( v2 )
  {
    v3 = v2->m_element;
    v2 = v2->m_pkNext;
    if ( v3 )
      ((void (__stdcall *)(_DWORD))v3->vfptr->__vecDelDtor)(1);
  }
  v4 = &v1->m_kList.m_pkHead->m_pkNext;
  while ( v4 )
  {
    v5 = (NiTListItem<DropItem *> *)v4;
    v4 = (NiTListItem<DropItem *> **)*v4;
    v1->m_kList.vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *> *)v1, v5);
  }
  v1->m_kList.m_kAllocator.m_uiCount = 0;
  v1->m_kList.m_pkHead = 0;
  v1->m_kList.m_pkTail = 0;
}

//----- (00668820) --------------------------------------------------------
DropItem *__thiscall DropItemMgr::GetByHandle(DropItemMgr *this, unsigned __int16 kHandle)
{
  NiTListItem<DropItem *> *v2; // ecx@1
  DropItem *result; // eax@2

  v2 = this->m_kList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      result = v2->m_element;
      v2 = v2->m_pkNext;
      if ( result->m_kHandle == kHandle )
        break;
      if ( !v2 )
        goto LABEL_4;
    }
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}

//----- (00668850) --------------------------------------------------------
DropItem *__thiscall DropItemMgr::GetByNode(DropItemMgr *this, NiNode *pkNode)
{
  NiTListItem<DropItem *> *v2; // ecx@2
  DropItem *result; // eax@3

  if ( pkNode && (v2 = this->m_kList.m_pkHead) != 0 )
  {
    while ( 1 )
    {
      result = v2->m_element;
      v2 = v2->m_pkNext;
      if ( result->m_spNode.m_pObject == pkNode )
        break;
      if ( !v2 )
        goto LABEL_5;
    }
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (00668880) --------------------------------------------------------
DropItem *__thiscall DropItemMgr::GetDropItemByNodePtr(DropItemMgr *this, NiNode *pkNode)
{
  NiTListItem<DropItem *> *v2; // ecx@1
  DropItem *result; // eax@2

  v2 = this->m_kList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      result = v2->m_element;
      v2 = v2->m_pkNext;
      if ( result->m_spNode.m_pObject == pkNode )
        break;
      if ( !v2 )
        goto LABEL_4;
    }
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}

//----- (006688B0) --------------------------------------------------------
void __stdcall DropItemMgr::SetTexture(NiNode *pkNode, NiSourceTexture *pkTexture)
{
  NiTexturingProperty *v3; // eax@2
  NiGeometry *pkGeom; // [sp+0h] [bp-4h]@1

  pkGeom = 0;
  if ( PgUtil::CatchGeometry((NiAVObject *)&pkNode->vfptr, &pkGeom) )
  {
    v3 = (NiTexturingProperty *)NiAVObject::GetProperty((NiAVObject *)&pkGeom->vfptr, 8);
    if ( v3 )
      NiTexturingProperty::SetBaseTexture(v3, (NiTexture *)&pkTexture->vfptr);
  }
}

//----- (006688F0) --------------------------------------------------------
NiNode *__thiscall DropItemMgr::GetNodeFromMap(DropItemMgr *this, const char *pcNifName)
{
  char v2; // al@1
  NiNode *v3; // esi@1
  NiNode *result; // eax@5
  NiNode *v5; // edi@6
  NiPointer<NiNode> spNode; // [sp+Ch] [bp-10h]@1
  int v7; // [sp+18h] [bp-4h]@1

  spNode.m_pObject = 0;
  v7 = 0;
  v2 = NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
         (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kNodeMap,
         pcNifName,
         (NiPointer<NiShaderLibrary> *)&spNode);
  v3 = spNode.m_pObject;
  if ( v2 )
  {
    v5 = (NiNode *)NiObject::Clone((NiObject *)&spNode.m_pObject->vfptr);
    v7 = -1;
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    result = v5;
  }
  else
  {
    v7 = -1;
    if ( spNode.m_pObject )
    {
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
    result = 0;
  }
  return result;
}

//----- (006689C0) --------------------------------------------------------
NiSourceTexture *__thiscall DropItemMgr::GetTextureFromMap(DropItemMgr *this, const char *pcTexName)
{
  char v2; // al@1
  NiSourceTexture *v3; // esi@1
  NiSourceTexture *result; // eax@5
  NiPointer<NiSourceTexture> spTex; // [sp+8h] [bp-10h]@1
  int v6; // [sp+14h] [bp-4h]@1

  spTex.m_pObject = 0;
  v6 = 0;
  v2 = NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
         (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kTextureMap,
         pcTexName,
         (NiPointer<NiShaderLibrary> *)&spTex);
  v3 = spTex.m_pObject;
  v6 = -1;
  if ( v2 )
  {
    if ( spTex.m_pObject && !InterlockedDecrement((volatile LONG *)&spTex.m_pObject->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    result = v3;
  }
  else
  {
    if ( spTex.m_pObject )
    {
      if ( !InterlockedDecrement((volatile LONG *)&spTex.m_pObject->m_uiRefCount) )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
    result = 0;
  }
  return result;
}

//----- (00668A70) --------------------------------------------------------
unsigned int __thiscall DropItemMgr::GetItemCountByItemID(DropItemMgr *this, unsigned __int16 kItemID)
{
  NiTListItem<DropItem *> *v2; // ecx@1
  unsigned int result; // eax@1
  DropItem *v4; // edx@2

  v2 = this->m_kList.m_pkHead;
  result = 0;
  while ( v2 )
  {
    v4 = v2->m_element;
    v2 = v2->m_pkNext;
    if ( v4->m_kItemID == kItemID )
      ++result;
  }
  return result;
}

//----- (00668AA0) --------------------------------------------------------
void __thiscall DropItemMgr::~DropItemMgr(DropItemMgr *this)
{
  DropItemMgr *v1; // esi@1
  DynaminUV *v2; // edi@1
  NiNode *v3; // edi@5
  NiNode *v4; // edi@9
  NiTListItem<DropItem *> **v5; // edi@13
  NiTListItem<DropItem *> *v6; // ST00_4@14

  v1 = this;
  v2 = this->m_spDynamicUV.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_spStartEff.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v4 = v1->m_spLoopEff.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSourceTexture>>,NiPointer<NiSourceTexture>>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSourceTexture>>,NiPointer<NiSourceTexture>>((NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSourceTexture> >,NiPointer<NiSourceTexture> > *)&v1->m_kTextureMap.vfptr);
  NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiNode>>,NiPointer<NiNode>>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiNode>>,NiPointer<NiNode>>((NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiNode> >,NiPointer<NiNode> > *)&v1->m_kNodeMap.vfptr);
  v1->m_kList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>Vtbl *)&PgTList<DropItem *>::`vftable';
  v5 = &v1->m_kList.m_pkHead->m_pkNext;
  while ( v5 )
  {
    v6 = (NiTListItem<DropItem *> *)v5;
    v5 = (NiTListItem<DropItem *> **)*v5;
    v1->m_kList.vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *> *)v1, v6);
  }
  v1->m_kList.m_kAllocator.m_uiCount = 0;
  v1->m_kList.m_pkHead = 0;
  v1->m_kList.m_pkTail = 0;
  v1->m_kList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>::`vftable';
}
// 9BADD0: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>::`vftable')(void *p, char);
// 9BAEB8: using guessed type int (__thiscall *PgTList<DropItem *>::`vftable')(void *p, char);

//----- (00668BB0) --------------------------------------------------------
void __thiscall DropItemMgr::Terminate(DropItemMgr *this)
{
  DropItemMgr *v1; // esi@1
  NiNode *v2; // edi@1
  NiNode *v3; // edi@6
  DynaminUV *v4; // edi@11

  v1 = this;
  DropItemMgr::RemoveAll(this);
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kNodeMap);
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kTextureMap);
  v2 = v1->m_spLoopEff.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spLoopEff.m_pObject = 0;
  }
  v3 = v1->m_spStartEff.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spStartEff.m_pObject = 0;
  }
  v4 = v1->m_spDynamicUV.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
    {
      if ( v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
    v1->m_spDynamicUV.m_pObject = 0;
  }
}

//----- (00668C50) --------------------------------------------------------
char __thiscall DropItemMgr::Remove(DropItemMgr *this, unsigned __int16 kHandle)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *v2; // edi@1
  NiTListItem<DropItem *> *v3; // eax@1
  DropItem *v4; // esi@2
  char result; // al@4
  NiTListItem<NiD3DShaderInterface *> **v6; // eax@6
  DropItem **v7; // ecx@7
  NiTListItem<NiD3DShaderInterface *> **v8; // edx@7

  v2 = (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)this;
  v3 = this->m_kList.m_pkHead;
  if ( !v3 )
    goto LABEL_4;
  while ( 1 )
  {
    v4 = v3->m_element;
    v3 = v3->m_pkNext;
    if ( v4->m_kHandle == kHandle )
      break;
    if ( !v3 )
      goto LABEL_4;
  }
  if ( v4 )
  {
    World::DetachDropItem(&g_kWorld, v4->m_spNode.m_pObject);
    v6 = &v2->m_pkHead->m_pkNext;
    if ( v6 )
    {
      while ( 1 )
      {
        v7 = (DropItem **)(v6 + 2);
        v8 = v6;
        v6 = (NiTListItem<NiD3DShaderInterface *> **)*v6;
        if ( v4 == *v7 )
          break;
        if ( !v6 )
          goto LABEL_9;
      }
    }
    else
    {
LABEL_9:
      v8 = 0;
    }
    *(_DWORD *)&kHandle = v8;
    if ( v8 )
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(v2, (void **)&kHandle);
    v4->vfptr->__vecDelDtor(v4, 1u);
    result = 1;
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}

//----- (00668CD0) --------------------------------------------------------
void __thiscall DropItemMgr::Update(DropItemMgr *this, float fCurTime)
{
  NiTListItem<DropItem *> *v2; // ebx@1
  DropItem *v3; // edi@2
  NiNode *v4; // esi@2
  int v5; // eax@2
  float pos3Length; // ST10_4@2
  float pos3Length_4; // ST14_4@2
  float pos3Length_8; // ST18_4@2
  float v9; // ST20_4@2
  NiNode *v10; // eax@2
  DropItemMgr *v11; // [sp+10h] [bp-8h]@1
  float fLength; // [sp+14h] [bp-4h]@2

  v2 = this->m_kList.m_pkHead;
  v11 = this;
  while ( v2 )
  {
    v3 = v2->m_element;
    v4 = v3->m_spNode.m_pObject;
    v2 = v2->m_pkNext;
    v5 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
    pos3Length = v4->m_kLocal.m_Translate.x - *(float *)v5;
    pos3Length_4 = v4->m_kLocal.m_Translate.y - *(float *)(v5 + 4);
    pos3Length_8 = v4->m_kLocal.m_Translate.z - *(float *)(v5 + 8);
    v9 = pos3Length_4 * pos3Length_4 + pos3Length * pos3Length + pos3Length_8 * pos3Length_8;
    fLength = sqrt(v9);
    v10 = v3->m_spNode.m_pObject;
    if ( (double)g_pkMainChar[1].m_uiSkillActStep - 1000.0 <= fLength )
    {
      if ( v10 )
        v10->m_uFlags |= 1u;
    }
    else if ( v10 )
    {
      v10->m_uFlags &= 0xFFFEu;
    }
    if ( (double)g_pkMainChar[1].m_uiSkillActStep < fLength )
      DropItemMgr::Remove(v11, v3->m_kHandle);
  }
}

//----- (00668DE0) --------------------------------------------------------
NiNode *__thiscall DropItemMgr::GetNode(DropItemMgr *this, const char *pcNifName)
{
  NiNode *result; // eax@1
  NiNode *v3; // eax@4
  NiObject *v4; // esi@4
  NiNode *v5; // ebx@8
  NiPointer<PgWinBut> v6; // [sp-4h] [bp-134h]@8
  NiPointer<PgWinBut> *v7; // [sp+10h] [bp-120h]@8
  NiPointer<NiNode> spNode; // [sp+14h] [bp-11Ch]@4
  DropItemMgr *v9; // [sp+18h] [bp-118h]@1
  char acFileName[260]; // [sp+1Ch] [bp-114h]@4
  int v11; // [sp+12Ch] [bp-4h]@6

  v9 = this;
  result = DropItemMgr::GetNodeFromMap(this, pcNifName);
  if ( !result )
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    sprintf(acFileName, "%sGroundItem\\%s.nif", &Folder::m_acItem, pcNifName);
    v3 = PgUtil::LoadNifFile(acFileName, 0);
    v4 = (NiObject *)v3;
    spNode.m_pObject = v3;
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
    v11 = 0;
    if ( v4 )
    {
      v7 = &v6;
      v6.m_pObject = (PgWinBut *)v4;
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v9->m_kNodeMap,
        (unsigned int)pcNifName,
        v6);
      v5 = (NiNode *)NiObject::Clone(v4);
      v11 = -1;
      if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      result = v5;
    }
    else
    {
      result = 0;
    }
  }
  return result;
}
// A89130: using guessed type char *Folder::m_acItem;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00668EF0) --------------------------------------------------------
NiSourceTexture *__thiscall DropItemMgr::GetTexture(DropItemMgr *this, const char *pcTexName)
{
  DropItemMgr *v2; // ebx@1
  NiSourceTexture *result; // eax@1
  NiImageConverter *v4; // eax@4
  NiPixelData *v5; // eax@4
  NiSourceTexture *v6; // esi@5
  const char *v7; // [sp-4h] [bp-128h]@4
  const char **v8; // [sp+Ch] [bp-118h]@6
  NiTexture::FormatPrefs kPrefs; // [sp+10h] [bp-114h]@5
  char acFileName[260]; // [sp+1Ch] [bp-108h]@4

  v2 = this;
  result = DropItemMgr::GetTextureFromMap(this, pcTexName);
  if ( !result )
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    v7 = pcTexName;
    sprintf(acFileName, "%sIcon\\%s.dds", &Folder::m_acMenu, pcTexName);
    v4 = NiImageConverter::GetImageConverter();
    v5 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v4->vfptr[2].__vecDelDtor)(
                          v4,
                          acFileName,
                          0);
    if ( v5
      && (kPrefs.m_ePixelLayout = 6,
          kPrefs.m_eAlphaFmt = 3,
          kPrefs.m_eMipMapped = 0,
          (v6 = NiSourceTexture::Create(v5, &kPrefs)) != 0) )
    {
      v8 = &v7;
      v7 = (const char *)v6;
      InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
      NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v2->m_kTextureMap,
        (unsigned int)pcTexName,
        (NiPointer<PgWinBut>)v7);
      result = v6;
    }
    else
    {
      result = 0;
    }
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00668FE0) --------------------------------------------------------
NiNode *__thiscall DropItemMgr::Get(DropItemMgr *this, const char *pcNifName, const char *pcTexName, bool bStartEff, bool bEffOn)
{
  DropItemMgr *v5; // ebx@1
  NiNode *v6; // edi@1
  NiNode *result; // eax@2
  NiSourceTexture *v8; // esi@3
  NiTexturingProperty *v9; // eax@5
  const char *v10; // eax@7
  NiObjectNET *v11; // esi@7
  NiObjectNET *v12; // eax@8
  NiObject *v13; // ecx@10
  NiRefObjectVtbl *v14; // edi@11
  NiObject *v15; // eax@11
  NiObject *v16; // ecx@13
  NiRefObjectVtbl *v17; // edi@14
  NiObject *v18; // eax@14

  v5 = this;
  v6 = DropItemMgr::GetNode(this, pcNifName);
  if ( v6 && (v8 = DropItemMgr::GetTexture(v5, pcTexName)) != 0 )
  {
    pcNifName = 0;
    if ( PgUtil::CatchGeometry((NiAVObject *)&v6->vfptr, (NiGeometry **)&pcNifName) )
    {
      v9 = (NiTexturingProperty *)NiAVObject::GetProperty((NiAVObject *)pcNifName, 8);
      if ( v9 )
        NiTexturingProperty::SetBaseTexture(v9, (NiTexture *)&v8->vfptr);
    }
    v10 = (const char *)operator new(0xE8u);
    pcTexName = v10;
    v11 = 0;
    if ( v10 )
    {
      NiNode::NiNode((NiNode *)v10, 0);
      v11 = v12;
    }
    NiObjectNET::SetName(v11, DropItem::ms_pcRootNodeName);
    ((void (__thiscall *)(NiObjectNET *, NiNode *, _DWORD))v11->vfptr[29].__vecDelDtor)(v11, v6, 0);
    if ( bEffOn )
    {
      v13 = (NiObject *)&v5->m_spLoopEff.m_pObject->vfptr;
      if ( v13 )
      {
        v14 = v11->vfptr;
        v15 = NiObject::Clone(v13);
        ((void (__thiscall *)(NiObjectNET *, NiObject *, _DWORD))v14[29].__vecDelDtor)(v11, v15, 0);
      }
      if ( bStartEff )
      {
        v16 = (NiObject *)&v5->m_spStartEff.m_pObject->vfptr;
        if ( v16 )
        {
          v17 = v11->vfptr;
          v18 = NiObject::Clone(v16);
          ((void (__thiscall *)(NiObjectNET *, NiObject *, _DWORD))v17[29].__vecDelDtor)(v11, v18, 0);
        }
      }
    }
    NiAVObject::UpdateProperties((NiAVObject *)v11);
    NiAVObject::UpdateEffects((NiAVObject *)v11);
    NiAVObject::Update((NiAVObject *)v11, 0.0, 1);
    result = (NiNode *)v11;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00669120) --------------------------------------------------------
void __thiscall DropItemMgr::DropItemMgr(DropItemMgr *this)
{
  DropItemMgr *v1; // esi@1
  char *v2; // eax@1
  unsigned int v3; // ST18_4@1
  char *v4; // eax@1
  unsigned int v5; // ST08_4@1

  v1 = this;
  this->m_kList.m_kAllocator.m_uiCount = 0;
  this->m_kList.m_pkHead = 0;
  this->m_kList.m_pkTail = 0;
  this->m_kList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>Vtbl *)&PgTList<DropItem *>::`vftable';
  this->m_kNodeMap.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode> >Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode>>::`vftable';
  this->m_kNodeMap.m_uiHashSize = 37;
  this->m_kNodeMap.m_kAllocator.m_uiCount = 0;
  v2 = (char *)operator new[](0x94u);
  v3 = 4 * v1->m_kNodeMap.m_uiHashSize;
  v1->m_kNodeMap.m_ppkHashTable = (NiTMapItem<char const *,NiPointer<NiNode> > **)v2;
  memset(v2, 0, v3);
  v1->m_kNodeMap.m_bCopy = 1;
  v1->m_kNodeMap.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode> >Vtbl *)&NiTStringPointerMap<NiPointer<NiNode>>::`vftable';
  v1->m_kTextureMap.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture> >Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture>>::`vftable';
  v1->m_kTextureMap.m_uiHashSize = 37;
  v1->m_kTextureMap.m_kAllocator.m_uiCount = 0;
  v4 = (char *)operator new[](0x94u);
  v5 = 4 * v1->m_kTextureMap.m_uiHashSize;
  v1->m_kTextureMap.m_ppkHashTable = (NiTMapItem<char const *,NiPointer<NiSourceTexture> > **)v4;
  memset(v4, 0, v5);
  v1->m_kTextureMap.m_bCopy = 1;
  v1->m_kTextureMap.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture> >Vtbl *)&NiTStringPointerMap<NiPointer<NiSourceTexture>>::`vftable';
  v1->m_spLoopEff.m_pObject = 0;
  v1->m_spStartEff.m_pObject = 0;
  v1->m_spDynamicUV.m_pObject = 0;
}
// 9BADE0: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode>>::`vftable')(void *p, char);
// 9BAE00: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture>>::`vftable')(void *p, char);
// 9BAEB8: using guessed type int (__thiscall *PgTList<DropItem *>::`vftable')(void *p, char);
// 9BAEC8: using guessed type int (__thiscall *NiTStringPointerMap<NiPointer<NiNode>>::`vftable')(void *p, char);
// 9BAEE8: using guessed type int (__thiscall *NiTStringPointerMap<NiPointer<NiSourceTexture>>::`vftable')(void *p, char);

//----- (00669240) --------------------------------------------------------
char __thiscall DropItemMgr::Add(DropItemMgr *this, int kItemID, unsigned __int16 kHandle, bool bPickable, NiPoint3 *kPos, bool bStartEff)
{
  DropItemMgr *v6; // edi@1
  char result; // al@2
  int v8; // esi@3
  ItemViewInfo **v9; // eax@5
  _DWORD *v10; // esi@5
  ItemViewInfo *v11; // ebx@6
  NiNode *v12; // ebx@7
  DynaminUV *v13; // eax@7
  NiAVObject **v14; // ecx@8
  unsigned int v15; // edx@8
  signed int v16; // eax@8
  NiGeometry *v17; // ebx@12
  NiIntegerExtraData *v18; // esi@14
  unsigned int v19; // edx@15
  _DWORD *v20; // eax@28
  int v21; // eax@30
  int v22; // eax@36
  _DWORD *v23; // ecx@36
  int v24; // esi@39
  NsFindGeometry kFindGeometry; // [sp+10h] [bp-3Ch]@8
  NiPointer<NiIntegerExtraData> spIconNum; // [sp+30h] [bp-1Ch]@14
  NiNode *pkNode; // [sp+34h] [bp-18h]@7
  unsigned int v28; // [sp+38h] [bp-14h]@15
  ItemViewInfo *pkViewInfo; // [sp+3Ch] [bp-10h]@6
  int v30; // [sp+48h] [bp-4h]@8
  int i; // [sp+64h] [bp+18h]@8
  int ib; // [sp+64h] [bp+18h]@28
  void (__stdcall ***ia)(_DWORD); // [sp+64h] [bp+18h]@30

  v6 = this;
  if ( kHandle == -1 )
    goto LABEL_44;
  v8 = ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;
  if ( !(unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable
                                                         + 16))(
                           ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable,
                           kItemID) )
    goto LABEL_44;
  if ( (unsigned __int16)kItemID > *(_WORD *)(v8 + 200) )
    goto LABEL_44;
  v9 = (ItemViewInfo **)(*(_DWORD *)(v8 + 196) + 4 * (unsigned __int16)kItemID);
  v10 = 0;
  if ( !*v9 )
    goto LABEL_44;
  v11 = *v9;
  pkViewInfo = v11;
  if ( !v11 )
    goto LABEL_44;
  DropItemMgr::Remove(v6, kHandle);
  v12 = DropItemMgr::Get(v6, "GrdNIFLarge", v11->IconFile, bStartEff, bPickable);
  v13 = v6->m_spDynamicUV.m_pObject;
  pkNode = v12;
  if ( v13 )
  {
    kFindGeometry.m_pCallBack = 0;
    kFindGeometry.m_nCurLevel = -1;
    kFindGeometry.vfptr = (Ns_TourSceneVtbl *)&NsFindGeometry::`vftable';
    kFindGeometry.m_vecObject._Myfirst = 0;
    kFindGeometry.m_vecObject._Mylast = 0;
    kFindGeometry.m_vecObject._Myend = 0;
    v30 = 0;
    NsFindGeometry::FindObject(&kFindGeometry, v12, &NiGeometry::m_RTTI);
    v14 = kFindGeometry.m_vecObject._Myfirst;
    v15 = 0;
    v16 = kFindGeometry.m_vecObject._Mylast - kFindGeometry.m_vecObject._Myfirst;
    i = 0;
    if ( v16 > 0 )
    {
      while ( 1 )
      {
        if ( v15 < v16 )
          v17 = (NiGeometry *)v14[v15];
        else
          v17 = 0;
        NiShaderFactory::AttachShader(v17, (NiShader *)&v6->m_spDynamicUV.m_pObject->vfptr);
        v18 = (NiIntegerExtraData *)operator new(0x10u);
        spIconNum.m_pObject = v18;
        LOBYTE(v30) = 1;
        if ( v18 )
        {
          v28 = pkViewInfo->IconIndex;
          NiExtraData::NiExtraData((NiExtraData *)&v18->vfptr);
          v19 = v28;
          v18->vfptr = (NiRefObjectVtbl *)&NiIntegerExtraData::`vftable';
          v18->m_iValue = v19;
        }
        else
        {
          v18 = 0;
        }
        spIconNum.m_pObject = v18;
        if ( v18 )
          InterlockedIncrement((volatile LONG *)&v18->m_uiRefCount);
        LOBYTE(v30) = 2;
        NiObjectNET::AddExtraData((NiObjectNET *)&v17->vfptr, "*icon", (NiExtraData *)&v18->vfptr);
        LOBYTE(v30) = 0;
        if ( v18 && !InterlockedDecrement((volatile LONG *)&v18->m_uiRefCount) )
          v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
        v14 = kFindGeometry.m_vecObject._Myfirst;
        v16 = kFindGeometry.m_vecObject._Mylast - kFindGeometry.m_vecObject._Myfirst;
        v10 = 0;
        if ( ++i >= v16 )
          break;
        v15 = i;
      }
      v12 = pkNode;
    }
    v30 = -1;
    if ( v14 )
      operator delete(v14);
    kFindGeometry.m_vecObject._Myfirst = 0;
    kFindGeometry.m_vecObject._Mylast = 0;
    kFindGeometry.m_vecObject._Myend = 0;
    kFindGeometry.vfptr = (Ns_TourSceneVtbl *)&Ns_TourScene::`vftable';
  }
  if ( v12 )
  {
    *(float *)&ib = fabs(pkViewInfo->GrnItemSize);
    v12->m_kLocal.m_fScale = *(float *)&ib;
    v20 = operator new(0x14u);
    if ( v20 )
    {
      *v20 = &DropItem::`vftable';
      v20[3] = 0;
      *((_BYTE *)v20 + 8) = 0;
      *((_BYTE *)v20 + 16) = 0;
      v10 = v20;
    }
    v21 = v10[3];
    ia = (void (__stdcall ***)(_DWORD))v21;
    if ( (NiNode *)v21 != v12 )
    {
      if ( v21 && !InterlockedDecrement((volatile LONG *)(v21 + 4)) && ia )
        (**ia)(1);
      v10[3] = v12;
      InterlockedIncrement((volatile LONG *)&v12->m_uiRefCount);
    }
    *((_BYTE *)v10 + 8) = bPickable;
    v22 = (int)v6->m_kList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *> *)v6);
    *(_DWORD *)(v22 + 8) = v10;
    *(_DWORD *)v22 = 0;
    *(_DWORD *)(v22 + 4) = v6->m_kList.m_pkTail;
    v23 = &v6->m_kList.m_pkTail->m_pkNext;
    if ( v23 )
      *v23 = v22;
    else
      v6->m_kList.m_pkHead = (NiTListItem<DropItem *> *)v22;
    ++v6->m_kList.m_kAllocator.m_uiCount;
    v6->m_kList.m_pkTail = (NiTListItem<DropItem *> *)v22;
    World::AttachDropItem(&g_kWorld, v12);
    *((_WORD *)v10 + 2) = kItemID;
    *((_WORD *)v10 + 3) = kHandle;
    v24 = v10[3];
    if ( v24 )
      *(NiPoint3 *)(v24 + 88) = *kPos;
    result = 1;
  }
  else
  {
LABEL_44:
    result = 0;
  }
  return result;
}
// 981C24: using guessed type int (__thiscall *NiIntegerExtraData::`vftable')(void *p, char);
// 9B8DD0: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *Ns_TourScene::`vftable')(Ns_TourScene *this, NiAVObject *_pkObject, void *);
// 9BAE20: using guessed type int (__thiscall *DropItem::`vftable')(void *p, char);
// 9BAF08: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *NsFindGeometry::`vftable')(NsFindGeometry *this, NiAVObject *_pkObject, void *);
// A8C298: using guessed type int ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;

//----- (00669510) --------------------------------------------------------
char __thiscall DropItemMgr::Add(DropItemMgr *this, PROTO_NC_BRIEFINFO_DROPEDITEM_CMD *p)
{
  DropItemMgr *v2; // edi@1
  float fY; // ST0C_4@1
  float fX; // ST08_4@1
  NiPoint3 kPos; // [sp+14h] [bp-Ch]@1

  v2 = this;
  fX = (double)p->location.x;
  fY = (double)p->location.y;
  World::GetAdvGroundPos(&g_kWorld, fX, fY, &kPos);
  return DropItemMgr::Add(v2, p->itemid, p->handle, (*(unsigned __int8 *)&p->attr >> 3) & 1, &kPos, 0);
}

//----- (00669580) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>::~NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>(NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>::`vftable';
}
// 9BADD0: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>::`vftable')(void *p, char);

//----- (00669590) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BADD0: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>::`vftable')(void *p, char);

//----- (006695C0) --------------------------------------------------------
void __thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode>>::~NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode>>(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode> > *this)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode> > *v1; // esi@1

  v1 = this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode> >Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v1->m_ppkHashTable);
}
// 9BADE0: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode>>::`vftable')(void *p, char);

//----- (006695E0) --------------------------------------------------------
void __stdcall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NpSIF_Tool>>::SetValue(NiTMapItem<char const *,NiPointer<NiTexturingProperty> > *pkItem, const char *key, NiPointer<NiTexturingProperty> val)
{
  NiTexturingProperty *v4; // esi@1
  NiTexturingProperty *v5; // eax@1
  NiTexturingProperty *v6; // esi@10

  pkItem->m_key = key;
  v4 = pkItem->m_val.m_pObject;
  v5 = val.m_pObject;
  if ( v4 != val.m_pObject )
  {
    if ( v4 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      v5 = val.m_pObject;
    }
    pkItem->m_val.m_pObject = v5;
    if ( v5 )
    {
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
      v5 = val.m_pObject;
    }
  }
  if ( v5 )
  {
    v6 = v5;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
  }
}

//----- (006696A0) --------------------------------------------------------
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiNode>>,NiPointer<NiNode>>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiNode>>,NiPointer<NiNode>>(NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiNode> >,NiPointer<NiNode> > *this)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v1; // edi@1
  bool v2; // zf@1
  unsigned int v3; // ebx@2
  NiTMapItem<unsigned long,NiPointer<PgWinBut> > *v4; // esi@3
  void *v5; // eax@4

  v1 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  v2 = this->m_bCopy == 0;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode> >Vtbl *)&NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiNode>>,NiPointer<NiNode>>::`vftable';
  if ( !v2 )
  {
    v3 = 0;
    if ( this->m_uiHashSize )
    {
      do
      {
        v4 = v1->m_ppkHashTable[v3];
        while ( v4 )
        {
          v5 = (void *)v4->m_key;
          v4 = v4->m_pkNext;
          operator delete[](v5);
        }
        ++v3;
      }
      while ( v3 < v1->m_uiHashSize );
    }
  }
  v1->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTPointerMap<char const *,NiPointer<NiNode>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v1);
  v1->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v1);
  operator delete[](v1->m_ppkHashTable);
}
// 9BADE0: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode>>::`vftable')(void *p, char);
// 9BAE38: using guessed type int (__thiscall *NiTPointerMap<char const *,NiPointer<NiNode>>::`vftable')(void *p, char);
// 9BAE58: using guessed type int (__thiscall *NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiNode>>,NiPointer<NiNode>>::`vftable')(void *p, char);

//----- (00669750) --------------------------------------------------------
void __thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture>>::~NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture>>(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture> > *this)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture> > *v1; // esi@1

  v1 = this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture> >Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v1->m_ppkHashTable);
}
// 9BAE00: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture>>::`vftable')(void *p, char);

//----- (00669770) --------------------------------------------------------
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSourceTexture>>,NiPointer<NiSourceTexture>>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSourceTexture>>,NiPointer<NiSourceTexture>>(NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSourceTexture> >,NiPointer<NiSourceTexture> > *this)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v1; // edi@1
  bool v2; // zf@1
  unsigned int v3; // ebx@2
  NiTMapItem<unsigned long,NiPointer<PgWinBut> > *v4; // esi@3
  void *v5; // eax@4

  v1 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  v2 = this->m_bCopy == 0;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture> >Vtbl *)&NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSourceTexture>>,NiPointer<NiSourceTexture>>::`vftable';
  if ( !v2 )
  {
    v3 = 0;
    if ( this->m_uiHashSize )
    {
      do
      {
        v4 = v1->m_ppkHashTable[v3];
        while ( v4 )
        {
          v5 = (void *)v4->m_key;
          v4 = v4->m_pkNext;
          operator delete[](v5);
        }
        ++v3;
      }
      while ( v3 < v1->m_uiHashSize );
    }
  }
  v1->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTPointerMap<char const *,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v1);
  v1->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v1);
  operator delete[](v1->m_ppkHashTable);
}
// 9BAE00: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture>>::`vftable')(void *p, char);
// 9BAE78: using guessed type int (__thiscall *NiTPointerMap<char const *,NiPointer<NiSourceTexture>>::`vftable')(void *p, char);
// 9BAE98: using guessed type int (__thiscall *NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSourceTexture>>,NiPointer<NiSourceTexture>>::`vftable')(void *p, char);

//----- (00669820) --------------------------------------------------------
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NpSIF_Tool>>,NiPointer<NpSIF_Tool>>::SetValue(NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiActorManager> >,NiPointer<NiActorManager> > *this, NiTMapItem<char const *,NiPointer<NiActorManager> > *pkItem, const char *pcKey, NiPointer<NiActorManager> val)
{
  unsigned int v4; // kr00_4@2
  const char *v5; // eax@2
  NiTMapItem<char const *,NiPointer<NiActorManager> > *v6; // edi@2
  NiActorManager *v7; // esi@4
  NiActorManager *v8; // eax@4
  NiActorManager *v9; // esi@13

  if ( this->m_bCopy )
  {
    v4 = strlen(pcKey);
    v5 = (const char *)operator new[](v4 + 1);
    v6 = pkItem;
    pkItem->m_key = v5;
    strcpy_s((char *)v5, v4 + 1, pcKey);
  }
  else
  {
    v6 = pkItem;
    pkItem->m_key = pcKey;
  }
  v7 = v6->m_val.m_pObject;
  v8 = val.m_pObject;
  if ( v7 != val.m_pObject )
  {
    if ( v7 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      v8 = val.m_pObject;
    }
    v6->m_val.m_pObject = v8;
    if ( v8 )
    {
      InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
      v8 = val.m_pObject;
    }
  }
  if ( v8 )
  {
    v9 = v8;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
    {
      if ( v9 )
        v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    }
  }
}

//----- (00669910) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,DropItem *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,DropItem *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,DropItem *> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,DropItem *> *v2; // edi@1
  NiTListItem<DropItem *> *v3; // esi@1
  NiTListItem<DropItem *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,DropItem *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BADD0: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>::`vftable')(void *p, char);
// 9BAE28: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,DropItem *>::`vftable')(void *p, char);

//----- (006699A0) --------------------------------------------------------
void __thiscall NiTPointerList<DropItem *>::~NiTPointerList<DropItem *>(NiTPointerList<DropItem *> *this)
{
  NiTPointerList<DropItem *> *v1; // edi@1
  NiTListItem<DropItem *> *v2; // esi@1
  NiTListItem<DropItem *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,DropItem *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>::`vftable';
}
// 9BADD0: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>::`vftable')(void *p, char);
// 9BAE28: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,DropItem *>::`vftable')(void *p, char);

//----- (00669A20) --------------------------------------------------------
NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode> > *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode>>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode> > *this, unsigned int a2)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode> > *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode> >Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BADE0: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode>>::`vftable')(void *p, char);

//----- (00669A60) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTPointerMap<char const *,NiPointer<NiNode>>::`vector deleting destructor'(NiTPointerMap<char const *,NiPointer<NiNode> > *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // esi@1

  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode> >Vtbl *)&NiTPointerMap<char const *,NiPointer<NiNode>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v2);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BADE0: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode>>::`vftable')(void *p, char);
// 9BAE38: using guessed type int (__thiscall *NiTPointerMap<char const *,NiPointer<NiNode>>::`vftable')(void *p, char);

//----- (00669AE0) --------------------------------------------------------
NiTStringPointerMap<NiPointer<NiNode> > *__thiscall NiTStringPointerMap<NiPointer<NiNode>>::`vector deleting destructor'(NiTStringPointerMap<NiPointer<NiNode> > *this, unsigned int a2)
{
  NiTStringPointerMap<NiPointer<NiNode> > *v2; // esi@1

  v2 = this;
  NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiNode>>,NiPointer<NiNode>>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiNode>>,NiPointer<NiNode>>((NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiNode> >,NiPointer<NiNode> > *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00669B10) --------------------------------------------------------
NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture> > *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture>>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture> > *this, unsigned int a2)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture> > *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture> >Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BAE00: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture>>::`vftable')(void *p, char);

//----- (00669B50) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTPointerMap<char const *,NiPointer<NiSourceTexture>>::`vector deleting destructor'(NiTPointerMap<char const *,NiPointer<NiSourceTexture> > *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // esi@1

  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture> >Vtbl *)&NiTPointerMap<char const *,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v2);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BAE00: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSourceTexture>>::`vftable')(void *p, char);
// 9BAE78: using guessed type int (__thiscall *NiTPointerMap<char const *,NiPointer<NiSourceTexture>>::`vftable')(void *p, char);

//----- (00669BD0) --------------------------------------------------------
NiTStringPointerMap<NiPointer<NiSourceTexture> > *__thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSourceTexture>>,NiPointer<NiSourceTexture>>::`scalar deleting destructor'(NiTStringPointerMap<NiPointer<NiSourceTexture> > *this, unsigned int a2)
{
  NiTStringPointerMap<NiPointer<NiSourceTexture> > *v2; // esi@1

  v2 = this;
  NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSourceTexture>>,NiPointer<NiSourceTexture>>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSourceTexture>>,NiPointer<NiSourceTexture>>((NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSourceTexture> >,NiPointer<NiSourceTexture> > *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00669C00) --------------------------------------------------------
DropItem *__thiscall DropItem::`scalar deleting destructor'(DropItem *this, unsigned int a2)
{
  DropItem *v2; // edi@1
  NiNode *v3; // esi@1

  v2 = this;
  this->vfptr = (DropItemVtbl *)&DropItem::`vftable';
  v3 = this->m_spNode.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BAE20: using guessed type int (__thiscall *DropItem::`vftable')(void *p, char);

//----- (00669C70) --------------------------------------------------------
void __thiscall PgTList<DropItem *>::~PgTList<DropItem *>(PgTList<DropItem *> *this)
{
  PgTList<DropItem *> *v1; // edi@1
  NiTListItem<DropItem *> *v2; // esi@1
  NiTListItem<DropItem *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>Vtbl *)&PgTList<DropItem *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>::`vftable';
}
// 9BADD0: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>::`vftable')(void *p, char);
// 9BAEB8: using guessed type int (__thiscall *PgTList<DropItem *>::`vftable')(void *p, char);

//----- (00669CF0) --------------------------------------------------------
PgTList<DropItem *> *__thiscall PgTList<DropItem *>::`vector deleting destructor'(PgTList<DropItem *> *this, unsigned int a2)
{
  PgTList<DropItem *> *v2; // edi@1
  NiTListItem<DropItem *> *v3; // esi@1
  NiTListItem<DropItem *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>Vtbl *)&PgTList<DropItem *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BADD0: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,DropItem *>::`vftable')(void *p, char);
// 9BAEB8: using guessed type int (__thiscall *PgTList<DropItem *>::`vftable')(void *p, char);

//----- (00669D80) --------------------------------------------------------
void __thiscall NsFindGeometry::~NsFindGeometry(NsFindGeometry *this)
{
  NsFindGeometry *v1; // esi@1

  v1 = this;
  if ( this->m_vecObject._Myfirst )
    operator delete(this->m_vecObject._Myfirst);
  v1->m_vecObject._Myfirst = 0;
  v1->m_vecObject._Mylast = 0;
  v1->m_vecObject._Myend = 0;
  v1->vfptr = (Ns_TourSceneVtbl *)&Ns_TourScene::`vftable';
}
// 9B8DD0: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *Ns_TourScene::`vftable')(Ns_TourScene *this, NiAVObject *_pkObject, void *);

//----- (00669DB0) --------------------------------------------------------
bool __thiscall NsFindGeometry::FindObject(NsFindGeometry *this, NiNode *_pObject, NiRTTI *_pRtti)
{
  NsFindGeometry *v3; // edi@1
  std::vector<NiAVObject *,std::allocator<NiAVObject *> > *v4; // esi@1
  NsFindGeometry::Data data; // [sp+8h] [bp-4h]@1

  v3 = this;
  v4 = &this->m_vecObject;
  std::vector<PgWinText *,std::allocator<PgWinText *>>::resize(
    (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&this->m_vecObject,
    0);
  data.pvector = v4;
  Ns_TourScene::TourScene((Ns_TourScene *)&v3->vfptr, _pObject, _pRtti, &data);
  v3->m_uiSize = v4->_Mylast - v4->_Myfirst;
  return (((char *)v4->_Mylast - (char *)v4->_Myfirst) & 0xFFFFFFFC) != 0;
}

//----- (00669E00) --------------------------------------------------------
signed int __stdcall NsFindGeometry::ProcessData(NiAVObject *_pkObject, void *_pData)
{
  std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
    *(std::vector<unsigned long,std::allocator<unsigned long> > **)_pData,
    (const unsigned int *)&_pkObject);
  return 1;
}

//----- (00669E20) --------------------------------------------------------
void __thiscall DynaminUV::DynaminUV(DynaminUV *this)
{
  NiShaderLibrary *v1; // esi@1

  v1 = (NiShaderLibrary *)this;
  NiD3DDefaultShader::NiD3DDefaultShader((NiD3DDefaultShader *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&DynaminUV::`vftable';
  v1[23].vfptr = 0;
  v1[23].m_uiRefCount = 0;
  NiShader::SetName(v1, "SHDynamicUV");
}
// 9BAF34: using guessed type int (__thiscall *DynaminUV::`vftable')(void *p, char);

//----- (00669EA0) --------------------------------------------------------
void __thiscall DynaminUV::~DynaminUV(DynaminUV *this)
{
  DynaminUV *v1; // esi@1
  NiD3DPass *v2; // ecx@1
  bool v3; // zf@2
  NiD3DPass *v4; // ecx@5

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&DynaminUV::`vftable';
  v2 = this->m_spPassOne.m_pObject;
  if ( v2 )
  {
    v3 = v2->m_uiRefCount-- == 1;
    if ( v3 )
      NiD3DPass::ReturnPassToPool(v2);
    v1->m_spPassOne.m_pObject = 0;
  }
  v4 = v1->m_spPassOne.m_pObject;
  if ( v4 )
  {
    v3 = v4->m_uiRefCount-- == 1;
    if ( v3 )
      NiD3DPass::ReturnPassToPool(v4);
  }
  NiD3DDefaultShader::~NiD3DDefaultShader((NiD3DDefaultShader *)&v1->vfptr);
}
// 9BAF34: using guessed type int (__thiscall *DynaminUV::`vftable')(void *p, char);

//----- (00669F30) --------------------------------------------------------
char __thiscall DynaminUV::CreateStagesAndPasses(DynaminUV *this)
{
  DynaminUV *v1; // esi@1
  NiD3DTextureStage *v2; // edi@1
  NiTexture *v3; // ebx@1
  NiD3DTextureStageGroup *v4; // ecx@6
  NiPointer<NiD3DPass> *v5; // edi@6
  NiD3DPass *v6; // ecx@6
  bool v7; // zf@8
  NiD3DPass *v8; // edi@10
  NiD3DPass *v9; // eax@12
  NiD3DPass *v10; // edi@15
  NiD3DPass *v11; // edi@17
  NiD3DPass *v12; // edi@19
  NiD3DPass *v13; // edi@21
  NiD3DPass *v14; // edi@23
  NiD3DPass *v15; // edi@25
  NiD3DPass *v16; // edi@27
  NiD3DPass *v17; // edi@29
  NiD3DPass *v18; // edi@31
  NiD3DPass *v19; // edi@33
  NiD3DPass *v20; // esi@35
  NiD3DTextureStage *v21; // eax@37
  NiPointer<NiD3DPass> result; // [sp+10h] [bp-14h]@6
  NiPointer<NiD3DTextureStage> spStage; // [sp+14h] [bp-10h]@1
  int v25; // [sp+20h] [bp-4h]@1

  v1 = this;
  NiD3DTextureStage::CreateNewStage(&spStage);
  v2 = spStage.m_pObject;
  spStage.m_pObject->m_uiStage = 0;
  v3 = v2->m_spTexture.m_pObject;
  v25 = 0;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spTexture.m_pObject = 0;
  }
  NiD3DTextureStageGroup::SetStageState(v2->m_pkTextureStageGroup, 0xBu, 0, 0);
  v4 = v2->m_pkTextureStageGroup;
  v2->m_bTextureTransform = 1;
  NiD3DTextureStageGroup::SetStageState(v4, 0x18u, 2u, 0);
  NiD3DTextureStageGroup::SetStageState(spStage.m_pObject->m_pkTextureStageGroup, 1u, 4u, 0);
  NiD3DTextureStageGroup::SetStageState(spStage.m_pObject->m_pkTextureStageGroup, 2u, 2u, 0);
  NiD3DTextureStageGroup::SetStageState(spStage.m_pObject->m_pkTextureStageGroup, 3u, 0, 0);
  NiD3DTextureStageGroup::SetStageState(spStage.m_pObject->m_pkTextureStageGroup, 4u, 4u, 0);
  NiD3DTextureStageGroup::SetStageState(spStage.m_pObject->m_pkTextureStageGroup, 5u, 2u, 0);
  NiD3DTextureStageGroup::SetStageState(spStage.m_pObject->m_pkTextureStageGroup, 6u, 0, 0);
  NiD3DTextureStageGroup::SetStageState(spStage.m_pObject->m_pkTextureStageGroup, 0xBu, 0, 0);
  v5 = NiD3DPass::CreateNewPass(&result);
  v6 = v1->m_spPassOne.m_pObject;
  LOBYTE(v25) = 1;
  if ( v6 != v5->m_pObject )
  {
    if ( v6 )
    {
      v7 = v6->m_uiRefCount-- == 1;
      if ( v7 )
        NiD3DPass::ReturnPassToPool(v6);
    }
    v8 = v5->m_pObject;
    v1->m_spPassOne.m_pObject = v8;
    if ( v8 )
      ++v8->m_uiRefCount;
  }
  v9 = result.m_pObject;
  LOBYTE(v25) = 0;
  if ( result.m_pObject )
  {
    --result.m_pObject->m_uiRefCount;
    if ( !v9->m_uiRefCount )
      NiD3DPass::ReturnPassToPool(v9);
  }
  NiD3DPass::SetStage(v1->m_spPassOne.m_pObject, v1->m_spPassOne.m_pObject->m_uiCurrentStage, spStage.m_pObject);
  v10 = v1->m_spPassOne.m_pObject;
  if ( !v10->m_pkRenderStateGroup )
    v10->m_pkRenderStateGroup = NiD3DRenderStateGroup::GetFreeRenderStateGroup();
  NiD3DRenderStateGroup::SetRenderState(v10->m_pkRenderStateGroup, 0x16u, 2u, 0);
  v11 = v1->m_spPassOne.m_pObject;
  if ( !v11->m_pkRenderStateGroup )
    v11->m_pkRenderStateGroup = NiD3DRenderStateGroup::GetFreeRenderStateGroup();
  NiD3DRenderStateGroup::SetRenderState(v11->m_pkRenderStateGroup, 7u, 1u, 0);
  v12 = v1->m_spPassOne.m_pObject;
  if ( !v12->m_pkRenderStateGroup )
    v12->m_pkRenderStateGroup = NiD3DRenderStateGroup::GetFreeRenderStateGroup();
  NiD3DRenderStateGroup::SetRenderState(v12->m_pkRenderStateGroup, 0xEu, 1u, 0);
  v13 = v1->m_spPassOne.m_pObject;
  if ( !v13->m_pkRenderStateGroup )
    v13->m_pkRenderStateGroup = NiD3DRenderStateGroup::GetFreeRenderStateGroup();
  NiD3DRenderStateGroup::SetRenderState(v13->m_pkRenderStateGroup, 0x1Bu, 1u, 0);
  v14 = v1->m_spPassOne.m_pObject;
  if ( !v14->m_pkRenderStateGroup )
    v14->m_pkRenderStateGroup = NiD3DRenderStateGroup::GetFreeRenderStateGroup();
  NiD3DRenderStateGroup::SetRenderState(v14->m_pkRenderStateGroup, 0x13u, 5u, 0);
  v15 = v1->m_spPassOne.m_pObject;
  if ( !v15->m_pkRenderStateGroup )
    v15->m_pkRenderStateGroup = NiD3DRenderStateGroup::GetFreeRenderStateGroup();
  NiD3DRenderStateGroup::SetRenderState(v15->m_pkRenderStateGroup, 0x14u, 6u, 0);
  v16 = v1->m_spPassOne.m_pObject;
  if ( !v16->m_pkRenderStateGroup )
    v16->m_pkRenderStateGroup = NiD3DRenderStateGroup::GetFreeRenderStateGroup();
  NiD3DRenderStateGroup::SetRenderState(v16->m_pkRenderStateGroup, 0x1Cu, 1u, 0);
  v17 = v1->m_spPassOne.m_pObject;
  if ( !v17->m_pkRenderStateGroup )
    v17->m_pkRenderStateGroup = NiD3DRenderStateGroup::GetFreeRenderStateGroup();
  NiD3DRenderStateGroup::SetRenderState(v17->m_pkRenderStateGroup, 0x89u, 1u, 0);
  v18 = v1->m_spPassOne.m_pObject;
  if ( !v18->m_pkRenderStateGroup )
    v18->m_pkRenderStateGroup = NiD3DRenderStateGroup::GetFreeRenderStateGroup();
  NiD3DRenderStateGroup::SetRenderState(v18->m_pkRenderStateGroup, 0xFu, 1u, 0);
  v19 = v1->m_spPassOne.m_pObject;
  if ( !v19->m_pkRenderStateGroup )
    v19->m_pkRenderStateGroup = NiD3DRenderStateGroup::GetFreeRenderStateGroup();
  NiD3DRenderStateGroup::SetRenderState(v19->m_pkRenderStateGroup, 0x19u, 7u, 0);
  v20 = v1->m_spPassOne.m_pObject;
  if ( !v20->m_pkRenderStateGroup )
    v20->m_pkRenderStateGroup = NiD3DRenderStateGroup::GetFreeRenderStateGroup();
  NiD3DRenderStateGroup::SetRenderState(v20->m_pkRenderStateGroup, 0x18u, 0x10u, 0);
  v21 = spStage.m_pObject;
  v25 = -1;
  if ( spStage.m_pObject )
  {
    --spStage.m_pObject->m_uiRefCount;
    if ( !v21->m_uiRefCount )
      NiD3DTextureStage::ReturnStageToPool(v21);
  }
  return 1;
}

//----- (0066A250) --------------------------------------------------------
char __thiscall DynaminUV::Initialize(DynaminUV *this, NiDX9Renderer *pkRenderer)
{
  DynaminUV *v2; // esi@1
  char result; // al@1

  v2 = this;
  result = NiD3DDefaultShader::Initialize((NiD3DDefaultShader *)&this->vfptr, pkRenderer);
  if ( result )
  {
    DynaminUV::CreateStagesAndPasses(v2);
    result = 1;
  }
  return result;
}

//----- (0066A280) --------------------------------------------------------
signed int __thiscall DynaminUV::UpdatePipeline(DynaminUV *this, NiGeometry *pkGeometry, NiSkinInstance *pkSkin, NiGeometryBufferData *pkBuffData, NiPropertyState *pkState, NiDynamicEffectState *pkEffects, NiTransform *kWorld, NiBound *kWorldBound)
{
  DynaminUV *v8; // edi@1
  NiD3DPass **v9; // esi@3
  NiProperty *v10; // edi@3
  NiD3DTextureStage *v11; // eax@3
  NiD3DTextureStage *v12; // esi@3
  NiRefObjectVtbl *v13; // eax@5
  NiTexture *v14; // ebx@6
  NiTexture *v15; // edi@8
  NiExtraData *v16; // eax@15
  NiExtraData *v17; // edi@15
  bool v18; // zf@19
  signed int result; // eax@21
  signed int v20; // eax@22
  signed int v21; // edx@22

  v8 = this;
  if ( !this->m_kPasses.m_uiMaxSize )
    NiTArray<NiPointer<NiD3DPass>>::SetSize(&this->m_kPasses, this->m_kPasses.m_uiGrowBy);
  v9 = &v8->m_spPassOne.m_pObject;
  NiTArray<NiPointer<NiD3DPass>>::SetAt(&v8->m_kPasses, 0, &v8->m_spPassOne);
  v8->m_uiPassCount = 1;
  v10 = pkState->m_aspProps[8].m_pObject;
  v11 = NiD3DPass::GetStage(*v9, 0);
  v12 = v11;
  if ( v11 )
    ++v11->m_uiRefCount;
  v13 = v10[1].m_spControllers.m_pObject->vfptr;
  if ( v13 )
    v14 = (NiTexture *)v13[1].__vecDelDtor;
  else
    v14 = 0;
  v15 = v12->m_spTexture.m_pObject;
  if ( v15 != v14 )
  {
    if ( v15 && !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) && v15 )
      v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
    v12->m_spTexture.m_pObject = v14;
    if ( v14 )
      InterlockedIncrement((volatile LONG *)&v14->m_uiRefCount);
  }
  v16 = NiObjectNET::GetExtraData((NiObjectNET *)&pkGeometry->vfptr, "*icon");
  v17 = v16;
  if ( v16 )
    InterlockedIncrement((volatile LONG *)&v16->m_uiRefCount);
  v12->m_kTextureTransformation._11 = 1.0;
  v12->m_kTextureTransformation._21 = 0.0;
  v12->m_kTextureTransformation._31 = 0.0;
  v12->m_kTextureTransformation._41 = 0.0;
  v12->m_kTextureTransformation._12 = 0.0;
  v12->m_kTextureTransformation._32 = 0.0;
  v12->m_kTextureTransformation._42 = 0.0;
  v12->m_kTextureTransformation._13 = 0.0;
  v12->m_kTextureTransformation._23 = 0.0;
  v12->m_kTextureTransformation._43 = 0.0;
  v12->m_kTextureTransformation._14 = 0.0;
  v12->m_kTextureTransformation._24 = 0.0;
  v12->m_kTextureTransformation._34 = 0.0;
  v12->m_kTextureTransformation._22 = 1.0;
  v12->m_kTextureTransformation._33 = 1.0;
  v12->m_kTextureTransformation._44 = 1.0;
  if ( v17 )
  {
    v20 = (signed int)v17[1].vfptr;
    v21 = (signed int)v17[1].vfptr;
    v12->m_kTextureTransformation._11 = 0.125;
    v12->m_kTextureTransformation._22 = 0.125;
    v12->m_kTextureTransformation._31 = (double)(v21 % 8) * 0.125;
    v12->m_kTextureTransformation._32 = 0.125 * (double)(v20 / 8);
    if ( !InterlockedDecrement((volatile LONG *)&v17->m_uiRefCount) )
      v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
    if ( v12 )
    {
      v18 = v12->m_uiRefCount-- == 1;
      if ( v18 )
        NiD3DTextureStage::ReturnStageToPool(v12);
    }
    result = 1;
  }
  else
  {
    if ( v12 )
    {
      v18 = v12->m_uiRefCount-- == 1;
      if ( v18 )
        NiD3DTextureStage::ReturnStageToPool(v12);
    }
    result = 0;
  }
  return result;
}

//----- (0066A450) --------------------------------------------------------
NiRTTI *DynaminUV::GetRTTI()
{
  return &DynaminUV::m_RTTI;
}

//----- (0066A460) --------------------------------------------------------
DynaminUV *__thiscall DynaminUV::`scalar deleting destructor'(DynaminUV *this, unsigned int a2)
{
  DynaminUV *v2; // esi@1
  NiD3DPass *v3; // ecx@1
  bool v4; // zf@2
  NiD3DPass *v5; // ecx@5

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&DynaminUV::`vftable';
  v3 = this->m_spPassOne.m_pObject;
  if ( v3 )
  {
    v4 = v3->m_uiRefCount-- == 1;
    if ( v4 )
      NiD3DPass::ReturnPassToPool(v3);
    v2->m_spPassOne.m_pObject = 0;
  }
  v5 = v2->m_spPassOne.m_pObject;
  if ( v5 )
  {
    v4 = v5->m_uiRefCount-- == 1;
    if ( v4 )
      NiD3DPass::ReturnPassToPool(v5);
  }
  NiD3DDefaultShader::~NiD3DDefaultShader((NiD3DDefaultShader *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BAF34: using guessed type int (__thiscall *DynaminUV::`vftable')(void *p, char);

//----- (0066A500) --------------------------------------------------------
bool __stdcall Inventory::IsHandedItem(ItemInfo *pkInfo)
{
  ItemClassEnum v2; // eax@1

  v2 = pkInfo->Class;
  return v2 == 5 || v2 == 26 || v2 == 37 || v2 == 7;
}

//----- (0066A530) --------------------------------------------------------
void __thiscall Inventory::ClearMiniHouseInv(Inventory *this)
{
  char *v1; // edi@1
  signed int v2; // ebx@1
  int v3; // esi@2

  v1 = (char *)this->m_aspMiniHouseInv;
  v2 = 192;
  do
  {
    v3 = *(_DWORD *)v1;
    if ( *(_DWORD *)v1 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v3 + 4)) )
      {
        if ( v3 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v3)(v3, 1);
      }
      *(_DWORD *)v1 = 0;
    }
    v1 += 4;
    --v2;
  }
  while ( v2 );
}

//----- (0066A580) --------------------------------------------------------
void __thiscall Inventory::ClearMiniHouseEquip(Inventory *this)
{
  char *v1; // edi@1
  signed int v2; // ebx@1
  int v3; // esi@2

  v1 = (char *)this->m_aspMiniHouseEquip;
  v2 = 11;
  do
  {
    v3 = *(_DWORD *)v1;
    if ( *(_DWORD *)v1 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v3 + 4)) )
      {
        if ( v3 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v3)(v3, 1);
      }
      *(_DWORD *)v1 = 0;
    }
    v1 += 4;
    --v2;
  }
  while ( v2 );
}

//----- (0066A5D0) --------------------------------------------------------
void __thiscall Inventory::ClearInv(Inventory *this)
{
  char *v1; // edi@1
  signed int v2; // ebx@1
  int v3; // esi@2

  v1 = (char *)this->m_aspInv;
  v2 = 192;
  do
  {
    v3 = *(_DWORD *)v1;
    if ( *(_DWORD *)v1 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v3 + 4)) )
      {
        if ( v3 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v3)(v3, 1);
      }
      *(_DWORD *)v1 = 0;
    }
    v1 += 4;
    --v2;
  }
  while ( v2 );
}

//----- (0066A620) --------------------------------------------------------
void __thiscall Inventory::ClearEquip(Inventory *this)
{
  char *v1; // edi@1
  signed int v2; // ebx@1
  int v3; // esi@2

  v1 = (char *)this->m_aspEquip;
  v2 = 30;
  do
  {
    v3 = *(_DWORD *)v1;
    if ( *(_DWORD *)v1 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v3 + 4)) )
      {
        if ( v3 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v3)(v3, 1);
      }
      *(_DWORD *)v1 = 0;
    }
    v1 += 4;
    --v2;
  }
  while ( v2 );
}

//----- (0066A670) --------------------------------------------------------
void __thiscall Inventory::ClearRewardInv(Inventory *this)
{
  char *v1; // edi@1
  signed int v2; // ebx@1
  int v3; // esi@2
  Inventory *v4; // [sp+Ch] [bp-4h]@1

  v4 = this;
  v1 = (char *)this->m_aspRewardInv;
  v2 = 192;
  do
  {
    v3 = *(_DWORD *)v1;
    if ( *(_DWORD *)v1 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v3 + 4)) && v3 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v3)(v3, 1);
      *(_DWORD *)v1 = 0;
    }
    v1 += 4;
    --v2;
  }
  while ( v2 );
  v4->m_uiRewardCount = 0;
}

//----- (0066A6D0) --------------------------------------------------------
void __thiscall Inventory::ClearPremiumActionInv(Inventory *this)
{
  char *v1; // edi@1
  signed int v2; // ebx@1
  int v3; // esi@2
  Inventory *v4; // [sp+Ch] [bp-4h]@1

  v4 = this;
  v1 = (char *)this->m_aspPremiumActionInv;
  v2 = 42;
  do
  {
    v3 = *(_DWORD *)v1;
    if ( *(_DWORD *)v1 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v3 + 4)) && v3 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v3)(v3, 1);
      *(_DWORD *)v1 = 0;
    }
    v1 += 4;
    --v2;
  }
  while ( v2 );
  v4->m_uiPremiumActionCount = 0;
}

//----- (0066A730) --------------------------------------------------------
void __thiscall Inventory::ClearMiniHouseTileAllItemInv(Inventory *this)
{
  char *v1; // edi@1
  signed int v2; // ebx@1
  int v3; // esi@2

  v1 = (char *)this->m_aspMiniHouseTileAllItemInv;
  v2 = 98;
  do
  {
    v3 = *(_DWORD *)v1;
    if ( *(_DWORD *)v1 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v3 + 4)) )
      {
        if ( v3 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v3)(v3, 1);
      }
      *(_DWORD *)v1 = 0;
    }
    v1 += 4;
    --v2;
  }
  while ( v2 );
}

//----- (0066A780) --------------------------------------------------------
void __thiscall Inventory::ClearMiniHouseFurnitureItemInv(Inventory *this)
{
  char *v1; // edi@1
  signed int v2; // ebx@1
  int v3; // esi@2

  v1 = (char *)this->m_aspMiniHouseFurnitureItemInv;
  v2 = 98;
  do
  {
    v3 = *(_DWORD *)v1;
    if ( *(_DWORD *)v1 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v3 + 4)) )
      {
        if ( v3 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v3)(v3, 1);
      }
      *(_DWORD *)v1 = 0;
    }
    v1 += 4;
    --v2;
  }
  while ( v2 );
}

//----- (0066A7D0) --------------------------------------------------------
void __thiscall Inventory::ClearMiniHouseAccessoryItemInv(Inventory *this)
{
  char *v1; // edi@1
  signed int v2; // ebx@1
  int v3; // esi@2

  v1 = (char *)this->m_aspMiniHouseAccessoryItemInv;
  v2 = 98;
  do
  {
    v3 = *(_DWORD *)v1;
    if ( *(_DWORD *)v1 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v3 + 4)) )
      {
        if ( v3 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v3)(v3, 1);
      }
      *(_DWORD *)v1 = 0;
    }
    v1 += 4;
    --v2;
  }
  while ( v2 );
}

//----- (0066A820) --------------------------------------------------------
void __thiscall Inventory::ClearMiniHouseMinigameItemInv(Inventory *this)
{
  char *v1; // edi@1
  signed int v2; // ebx@1
  int v3; // esi@2

  v1 = (char *)this->m_aspMiniHouseMinigameAllItemInv;
  v2 = 98;
  do
  {
    v3 = *(_DWORD *)v1;
    if ( *(_DWORD *)v1 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v3 + 4)) )
      {
        if ( v3 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v3)(v3, 1);
      }
      *(_DWORD *)v1 = 0;
    }
    v1 += 4;
    --v2;
  }
  while ( v2 );
}

//----- (0066A870) --------------------------------------------------------
bool __thiscall Inventory::AddMHItemInv(Inventory *this, unsigned int uiInvType, unsigned int uiIndex, Item *pkItem)
{
  bool result; // al@3

  switch ( uiInvType )
  {
    case 0xEu:
      if ( uiIndex >= 0x62 )
        goto LABEL_10;
      NiPointer<PopupMenuWin>::operator=(
        (NiPointer<NiD3DDefaultShader> *)&this->m_aspMiniHouseTileAllItemInv[uiIndex],
        (NiD3DDefaultShader *)pkItem);
      result = pkItem != 0;
      break;
    case 3u:
      if ( uiIndex >= 0x62 )
        goto LABEL_10;
      NiPointer<PopupMenuWin>::operator=(
        (NiPointer<NiD3DDefaultShader> *)&this->m_aspMiniHouseFurnitureItemInv[uiIndex],
        (NiD3DDefaultShader *)pkItem);
      result = pkItem != 0;
      break;
    case 0xDu:
      if ( uiIndex >= 0x62 )
        goto LABEL_10;
      NiPointer<PopupMenuWin>::operator=(
        (NiPointer<NiD3DDefaultShader> *)&this->m_aspMiniHouseAccessoryItemInv[uiIndex],
        (NiD3DDefaultShader *)pkItem);
      result = pkItem != 0;
      break;
    case 0x10u:
      if ( uiIndex >= 0x62 )
        goto LABEL_10;
      NiPointer<PopupMenuWin>::operator=(
        (NiPointer<NiD3DDefaultShader> *)&this->m_aspMiniHouseMinigameAllItemInv[uiIndex],
        (NiD3DDefaultShader *)pkItem);
      result = pkItem != 0;
      break;
    default:
LABEL_10:
      result = 0;
      break;
  }
  return result;
}

//----- (0066A950) --------------------------------------------------------
void __thiscall Inventory::RemoveMHItemInv(Inventory *this, unsigned int uiInvType, unsigned int uiIndex)
{
  Inventory *v3; // esi@1
  Item *v4; // edi@3
  Item *v5; // edi@9
  Item *v6; // edi@15
  Item *v7; // edi@21

  v3 = this;
  switch ( uiInvType )
  {
    case 0xEu:
      if ( uiIndex < 0x62 )
      {
        v4 = this->m_aspMiniHouseTileAllItemInv[uiIndex].m_pObject;
        if ( v4 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
          {
            if ( v4 )
              v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
          }
          v3->m_aspMiniHouseTileAllItemInv[uiIndex].m_pObject = 0;
        }
      }
      break;
    case 3u:
      if ( uiIndex < 0x62 )
      {
        v5 = this->m_aspMiniHouseFurnitureItemInv[uiIndex].m_pObject;
        if ( v5 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
            v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
          v3->m_aspMiniHouseFurnitureItemInv[uiIndex].m_pObject = 0;
        }
      }
      break;
    case 0xDu:
      if ( uiIndex < 0x62 )
      {
        v6 = this->m_aspMiniHouseAccessoryItemInv[uiIndex].m_pObject;
        if ( v6 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
            v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
          v3->m_aspMiniHouseAccessoryItemInv[uiIndex].m_pObject = 0;
        }
      }
      break;
    case 0x10u:
      if ( uiIndex < 0x62 )
      {
        v7 = this->m_aspMiniHouseMinigameAllItemInv[uiIndex].m_pObject;
        if ( v7 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
            v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
          v3->m_aspMiniHouseMinigameAllItemInv[uiIndex].m_pObject = 0;
        }
      }
      break;
    default:
      return;
  }
}

//----- (0066AAB0) --------------------------------------------------------
int __thiscall Inventory::GetTotalInv(Inventory *this)
{
  int result; // eax@1
  char *v2; // ecx@1
  signed int v3; // edx@1

  result = 0;
  v2 = (char *)&this->m_aspInv[1];
  v3 = 32;
  do
  {
    if ( *((_DWORD *)v2 - 1) )
      ++result;
    if ( *(_DWORD *)v2 )
      ++result;
    if ( *((_DWORD *)v2 + 1) )
      ++result;
    if ( *((_DWORD *)v2 + 2) )
      ++result;
    if ( *((_DWORD *)v2 + 3) )
      ++result;
    if ( *((_DWORD *)v2 + 4) )
      ++result;
    v2 += 24;
    --v3;
  }
  while ( v3 );
  return result;
}

//----- (0066AAF0) --------------------------------------------------------
Item *__thiscall Inventory::GetRightHandEquip(Inventory *this)
{
  return this->m_aspEquip[12].m_pObject;
}

//----- (0066AB00) --------------------------------------------------------
Item *__thiscall Inventory::GetLeftHandEquip(Inventory *this)
{
  return this->m_aspEquip[10].m_pObject;
}

//----- (0066AB10) --------------------------------------------------------
Item *__thiscall Inventory::GetRightHandAccEquip(Inventory *this)
{
  return this->m_aspEquip[13].m_pObject;
}

//----- (0066AB20) --------------------------------------------------------
Item *__thiscall Inventory::GetLeftHandAccEquip(Inventory *this)
{
  return this->m_aspEquip[11].m_pObject;
}

//----- (0066AB30) --------------------------------------------------------
Item *__thiscall Inventory::GetShieldAccEquip(Inventory *this)
{
  return this->m_aspEquip[29].m_pObject;
}

//----- (0066AB40) --------------------------------------------------------
Item *__thiscall Inventory::GetEquipedWeaponAcc(Inventory *this)
{
  Inventory *v1; // edi@1
  Item *v2; // esi@1
  Item *result; // eax@3

  v1 = this;
  v2 = this->m_aspEquip[13].m_pObject;
  if ( v2
    && (unsigned __int8)((int (__thiscall *)(Item *))v2->vfptr[1].__vecDelDtor)(this->m_aspEquip[13].m_pObject) == 26
    || (v2 = v1->m_aspEquip[11].m_pObject) != 0
    && (unsigned __int8)((int (__thiscall *)(Item *))v2->vfptr[1].__vecDelDtor)(v1->m_aspEquip[11].m_pObject) == 26 )
  {
    result = v2;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0066AB80) --------------------------------------------------------
Item *__thiscall Inventory::GetEquipedShieldAcc(Inventory *this)
{
  Item *v1; // esi@1
  Item *result; // eax@3

  v1 = this->m_aspEquip[29].m_pObject;
  if ( v1
    && (unsigned __int8)((int (__thiscall *)(Item *))v1->vfptr[1].__vecDelDtor)(this->m_aspEquip[29].m_pObject) == 37 )
  {
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0066ABA0) --------------------------------------------------------
bool __stdcall Inventory::CanIEquipWeapon(ItemInfo *pkInfo)
{
  Item *v2; // esi@1
  bool result; // al@5
  ItemInfo *v4; // esi@6

  v2 = g_kInventory.m_aspEquip[13].m_pObject;
  result = 1;
  if ( g_kInventory.m_aspEquip[13].m_pObject
    && (unsigned __int8)((int (__thiscall *)(Item *))g_kInventory.m_aspEquip[13].m_pObject->vfptr[1].__vecDelDtor)(g_kInventory.m_aspEquip[13].m_pObject) == 26
    || (v2 = g_kInventory.m_aspEquip[11].m_pObject) != 0
    && (unsigned __int8)((int (__thiscall *)(Item *))g_kInventory.m_aspEquip[11].m_pObject->vfptr[1].__vecDelDtor)(g_kInventory.m_aspEquip[11].m_pObject) == 26 )
  {
    v4 = v2->m_pkInfo;
    if ( v4->WeaponType != pkInfo->WeaponType || v4->TwoHand != pkInfo->TwoHand )
      result = 0;
  }
  return result;
}

//----- (0066AC00) --------------------------------------------------------
bool __stdcall Inventory::CanIEquipWeaponCostume(ItemInfo *pkInfo)
{
  Item *v2; // esi@1
  bool result; // al@4
  Item *v4; // esi@6

  v2 = g_kInventory.m_aspEquip[10].m_pObject;
  result = 0;
  if ( !g_kInventory.m_aspEquip[10].m_pObject
    || ((unsigned __int8)((int (__thiscall *)(Item *))g_kInventory.m_aspEquip[10].m_pObject->vfptr[1].__vecDelDtor)(g_kInventory.m_aspEquip[10].m_pObject) != 5
     || v2->m_pkInfo->WeaponType == pkInfo->WeaponType)
    && v2->m_pkInfo->TwoHand == pkInfo->TwoHand )
  {
    v4 = g_kInventory.m_aspEquip[12].m_pObject;
    if ( !g_kInventory.m_aspEquip[12].m_pObject
      || ((unsigned __int8)((int (__thiscall *)(Item *))g_kInventory.m_aspEquip[12].m_pObject->vfptr[1].__vecDelDtor)(g_kInventory.m_aspEquip[12].m_pObject) != 5
       || v4->m_pkInfo->WeaponType == pkInfo->WeaponType)
      && v4->m_pkInfo->TwoHand == pkInfo->TwoHand )
    {
      result = 1;
    }
  }
  return result;
}

//----- (0066AC80) --------------------------------------------------------
bool __stdcall Inventory::CanIEquipShield(ItemInfo *pkInfo)
{
  Item *v2; // esi@1
  bool result; // al@5

  v2 = g_kInventory.m_aspEquip[13].m_pObject;
  if ( g_kInventory.m_aspEquip[13].m_pObject
    && (unsigned __int8)((int (__thiscall *)(Item *))g_kInventory.m_aspEquip[13].m_pObject->vfptr[1].__vecDelDtor)(g_kInventory.m_aspEquip[13].m_pObject) == 26
    || (v2 = g_kInventory.m_aspEquip[11].m_pObject) != 0
    && (unsigned __int8)((int (__thiscall *)(Item *))g_kInventory.m_aspEquip[11].m_pObject->vfptr[1].__vecDelDtor)(g_kInventory.m_aspEquip[11].m_pObject) == 26 )
  {
    result = v2->m_pkInfo->TwoHand == pkInfo->TwoHand;
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (0066ACD0) --------------------------------------------------------
bool __stdcall Inventory::CanIEquipShieldCostume(ItemInfo *pkInfo)
{
  bool result; // al@2
  Item *v3; // esi@7

  if ( !pkInfo
    || g_kInventory.m_aspEquip[10].m_pObject
    && (unsigned __int8)((int (*)(void))g_kInventory.m_aspEquip[10].m_pObject->vfptr[1].__vecDelDtor)() != 7
    || g_kInventory.m_aspEquip[12].m_pObject
    && g_kInventory.m_aspEquip[12].m_pObject->m_pkInfo->TwoHand != pkInfo->TwoHand )
  {
    result = 0;
  }
  else
  {
    v3 = g_kInventory.m_aspEquip[13].m_pObject;
    result = (!g_kInventory.m_aspEquip[13].m_pObject
           || (unsigned __int8)((int (__thiscall *)(Item *))g_kInventory.m_aspEquip[13].m_pObject->vfptr[1].__vecDelDtor)(g_kInventory.m_aspEquip[13].m_pObject) != 26)
          && ((v3 = g_kInventory.m_aspEquip[11].m_pObject) == 0
           || (unsigned __int8)((int (__thiscall *)(Item *))g_kInventory.m_aspEquip[11].m_pObject->vfptr[1].__vecDelDtor)(g_kInventory.m_aspEquip[11].m_pObject) != 26)
          || v3->m_pkInfo->TwoHand == pkInfo->TwoHand;
  }
  return result;
}

//----- (0066AD60) --------------------------------------------------------
void __thiscall Inventory::DecreaeWeaponAccCharged(Inventory *this)
{
  Inventory *v1; // edi@1
  Item *v2; // esi@1
  int v3; // eax@5
  NiRefObjectVtbl *v4; // edx@5

  v1 = this;
  v2 = this->m_aspEquip[13].m_pObject;
  if ( v2
    && (unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[1].__vecDelDtor)(this->m_aspEquip[13].m_pObject) == 26
    || (v2 = v1->m_aspEquip[11].m_pObject) != 0
    && (unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[1].__vecDelDtor)(v1->m_aspEquip[11].m_pObject) == 26 )
  {
    v3 = ((int (__thiscall *)(_DWORD))v2->vfptr[19].__vecDelDtor)(v2);
    v4 = v2->vfptr;
    if ( v3 )
      v4[20].__vecDelDtor((NiRefObject *)v2, v3 - 1);
    else
      v4[20].__vecDelDtor((NiRefObject *)v2, 0);
  }
}

//----- (0066ADC0) --------------------------------------------------------
void __thiscall Inventory::DecreaeShieldAccCharged(Inventory *this)
{
  Item *v1; // esi@1
  int v2; // eax@3
  NiRefObjectVtbl *v3; // edx@3

  v1 = this->m_aspEquip[29].m_pObject;
  if ( v1
    && (unsigned __int8)((int (__thiscall *)(_DWORD))v1->vfptr[1].__vecDelDtor)(this->m_aspEquip[29].m_pObject) == 37 )
  {
    v2 = ((int (__thiscall *)(_DWORD))v1->vfptr[19].__vecDelDtor)(v1);
    v3 = v1->vfptr;
    if ( v2 )
      v3[20].__vecDelDtor((NiRefObject *)v1, v2 - 1);
    else
      v3[20].__vecDelDtor((NiRefObject *)v1, 0);
  }
}

//----- (0066AE00) --------------------------------------------------------
bool __thiscall Inventory::IsAttackAbleEquip(Inventory *this)
{
  Item *v1; // eax@1
  bool result; // al@3

  v1 = this->m_aspEquip[12].m_pObject;
  if ( v1 || (v1 = this->m_aspEquip[10].m_pObject) != 0 )
    result = (unsigned __int8)((int (__thiscall *)(Item *))v1->vfptr[1].__vecDelDtor)(v1) == 5;
  else
    result = 0;
  return result;
}

//----- (0066AE30) --------------------------------------------------------
char __thiscall Inventory::IsReaminSlot(Inventory *this, unsigned __int16 kID)
{
  signed int v2; // edi@1
  char *v3; // ebx@1
  int v4; // esi@2
  unsigned int v5; // ST0C_4@4

  v2 = 0;
  v3 = (char *)this->m_aspInv;
  while ( 1 )
  {
    v4 = *(_DWORD *)v3;
    if ( !*(_DWORD *)v3 )
      break;
    if ( *(_WORD *)(v4 + 8) == kID )
    {
      v5 = (*(int (__thiscall **)(int))(*(_DWORD *)v4 + 16))(*(_DWORD *)v3);
      if ( (*(int (__thiscall **)(int))(*(_DWORD *)v4 + 12))(v4) < v5 )
        break;
    }
    ++v2;
    v3 += 4;
    if ( v2 >= 192 )
      return 0;
  }
  return 1;
}

//----- (0066AE90) --------------------------------------------------------
void __thiscall Inventory::UpdateWeaponTitleWhenMobDead(Inventory *this, unsigned __int16 kDeadMobID)
{
  Item *v2; // esi@1
  unsigned __int16 v3; // di@4
  ShineDateTime *v4; // esi@4
  signed int v5; // ebx@4
  WEAPON_TITLE_DATA *v6; // eax@6

  v2 = this->m_aspEquip[12].m_pObject;
  if ( v2 || (v2 = this->m_aspEquip[10].m_pObject) != 0 )
  {
    if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[1].__vecDelDtor)(v2) == 5 )
    {
      v3 = kDeadMobID;
      v4 = (ShineDateTime *)((char *)&v2->m_kStruct.itemattr.boot.deletetime + 2);
      v5 = 3;
      do
      {
        if ( *((_WORD *)&v4[-1] + 1) == v3 )
        {
          v6 = CWeaponTitle::GetLevelData(
                 &WeaponTitleTab::ms_kTab,
                 v3,
                 *(_DWORD *)v4 & 0xFFFFFFF,
                 (unsigned int *)&kDeadMobID);
          if ( v6 )
          {
            if ( (*(_DWORD *)v4 & 0xFFFFFFFu) < v6->MobKillCount )
              *(_DWORD *)v4 ^= (*(_DWORD *)v4 ^ (*(_DWORD *)v4 + 1)) & 0xFFFFFFF;
          }
        }
        v4 = (ShineDateTime *)((char *)v4 + 6);
        --v5;
      }
      while ( v5 );
    }
  }
}

//----- (0066AF10) --------------------------------------------------------
Item *__thiscall Inventory::GetEquipedWeapon(Inventory *this)
{
  Inventory *v1; // edi@1
  Item *v2; // esi@1
  Item *result; // eax@3

  v1 = this;
  v2 = this->m_aspEquip[12].m_pObject;
  if ( v2
    && (unsigned __int8)((int (__thiscall *)(Item *))v2->vfptr[1].__vecDelDtor)(this->m_aspEquip[12].m_pObject) == 5
    || (v2 = v1->m_aspEquip[10].m_pObject) != 0
    && (unsigned __int8)((int (__thiscall *)(Item *))v2->vfptr[1].__vecDelDtor)(v1->m_aspEquip[10].m_pObject) == 5 )
  {
    result = v2;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0066AF50) --------------------------------------------------------
WeaponTypeEnum __thiscall Inventory::GetEquipWeponType(Inventory *this)
{
  Inventory *v1; // edi@1
  Item *v2; // esi@1
  int v3; // edi@3
  int v4; // esi@3
  WeaponTypeEnum result; // eax@4
  int v6; // eax@6
  Item *v7; // esi@8
  int v8; // edi@10
  int v9; // esi@10

  v1 = this;
  v2 = this->m_aspEquip[12].m_pObject;
  if ( v2
    && (unsigned __int8)((int (__thiscall *)(Item *))v2->vfptr[1].__vecDelDtor)(this->m_aspEquip[12].m_pObject) == 5 )
  {
    v3 = v2->m_kStruct.itemid;
    v4 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v3) )
    {
      if ( (unsigned __int16)v3 <= *(_WORD *)(v4 + 200) )
      {
        v6 = *(_DWORD *)(v4 + 196) + 4 * v3;
        if ( *(_DWORD *)v6 )
          return *(_DWORD *)(*(_DWORD *)v6 + 232);
      }
    }
    return vE8;
  }
  v7 = v1->m_aspEquip[10].m_pObject;
  if ( v7 && (unsigned __int8)((int (__thiscall *)(Item *))v7->vfptr[1].__vecDelDtor)(v1->m_aspEquip[10].m_pObject) == 5 )
  {
    v8 = v7->m_kStruct.itemid;
    v9 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    if ( !(unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                             ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                             v8)
      || (unsigned __int16)v8 > *(_WORD *)(v9 + 200) )
    {
      return vE8;
    }
    v6 = *(_DWORD *)(v9 + 196) + 4 * v8;
    if ( *(_DWORD *)v6 )
      return *(_DWORD *)(*(_DWORD *)v6 + 232);
    result = vE8;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0066B010) --------------------------------------------------------
bool __thiscall Inventory::IsDemandType(Inventory *this, WeaponDemandType eDemand)
{
  Inventory *v2; // ebx@1
  Item *v3; // edi@1
  ItemInfo *v4; // esi@1
  int v5; // esi@3
  int v6; // edi@3
  ItemInfo **v7; // eax@7
  Item *v8; // edi@10
  WeaponDemandType v9; // edi@13
  Item *v10; // ecx@14
  bool result; // al@17
  bool v12; // dl@17
  bool v13; // bl@17
  bool v14; // cl@17
  WeaponTypeEnum v15; // ecx@18
  char v16; // dl@19
  bool bShield; // [sp+Dh] [bp-7h]@13
  bool bDSword; // [sp+Eh] [bp-6h]@17
  bool bWand; // [sp+Fh] [bp-5h]@17
  bool bStaff; // [sp+10h] [bp-4h]@17
  bool bCBow; // [sp+11h] [bp-3h]@17
  bool bBow; // [sp+12h] [bp-2h]@17
  bool bHammer; // [sp+13h] [bp-1h]@17
  bool bMace_3; // [sp+1Fh] [bp+Bh]@17

  v2 = this;
  v3 = this->m_aspEquip[12].m_pObject;
  v4 = 0;
  if ( v3 && (unsigned __int8)((int (__thiscall *)(Item *))v3->vfptr[1].__vecDelDtor)(v3) == 5 )
  {
    v5 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    v6 = v3->m_kStruct.itemid;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v6) )
    {
      if ( (unsigned __int16)v6 <= *(_WORD *)(v5 + 200) )
      {
        v7 = (ItemInfo **)(*(_DWORD *)(v5 + 196) + 4 * v6);
        if ( *v7 )
        {
          v4 = *v7;
          if ( *v7 )
            goto LABEL_13;
        }
        else
        {
          v4 = 0;
        }
      }
      else
      {
        v4 = 0;
      }
    }
    else
    {
      v4 = 0;
    }
  }
  v8 = v2->m_aspEquip[10].m_pObject;
  if ( v8 && (unsigned __int8)((int (__thiscall *)(Item *))v8->vfptr[1].__vecDelDtor)(v2->m_aspEquip[10].m_pObject) == 5 )
    v4 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(v8->m_kStruct.itemid);
LABEL_13:
  v9 = eDemand;
  bShield = 0;
  if ( eDemand == 7 )
  {
    v10 = v2->m_aspEquip[10].m_pObject;
    if ( v10 )
    {
      if ( (unsigned __int8)((int (*)(void))v10->vfptr[1].__vecDelDtor)() == 7 )
        bShield = 1;
    }
  }
  result = 0;
  v12 = 0;
  v13 = 0;
  v14 = 0;
  bMace_3 = 0;
  bHammer = 0;
  bBow = 0;
  bCBow = 0;
  bStaff = 0;
  bWand = 0;
  bDSword = 0;
  if ( v4 )
  {
    v15 = v4->WeaponType;
    if ( v15 == 16 )
      return 0;
    v16 = v4->TwoHand;
    result = v16 == 1;
    v12 = v16 == 0;
    bMace_3 = v15 == 5;
    bHammer = v15 == 13;
    bBow = v15 == 2;
    bCBow = v15 == 10;
    bStaff = v15 == 3;
    bWand = v15 == 11;
    bDSword = v15 == 17;
    v13 = v15 == 18;
    v14 = v15 == 19;
  }
  switch ( v9 )
  {
    case 2:
    case 6:
      result = 1;
      break;
    case 4:
      result = bHammer;
      break;
    case 5:
      result = bMace_3;
      break;
    case 0:
      result = v12;
      break;
    case 3:
      result = result || v12 || bMace_3 || bHammer || bBow || bCBow || bStaff || bWand || bDSword || v13 || v14;
      break;
    case 7:
      result = bShield;
      break;
    case 8:
      result = bBow;
      break;
    case 9:
      result = bCBow;
      break;
    case 10:
      result = bStaff;
      break;
    case 11:
      result = bWand;
      break;
    case 13:
      result = bDSword;
      break;
    case 12:
      result = v13;
      break;
    case 14:
      result = v14;
      break;
    case 1:
      return result;
    default:
      return 0;
  }
  return result;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0066B280) --------------------------------------------------------
int __thiscall Inventory::GetItemCnt(Inventory *this, unsigned __int16 kID)
{
  int v2; // ebx@1
  char *v3; // edi@1
  int v4; // esi@2
  signed int v6; // [sp+Ch] [bp-4h]@1

  v2 = 0;
  v3 = (char *)this->m_aspInv;
  v6 = 192;
  do
  {
    v4 = *(_DWORD *)v3;
    if ( *(_DWORD *)v3 && *(_WORD *)(v4 + 8) == kID )
    {
      if ( (*(int (__thiscall **)(int))(*(_DWORD *)v4 + 16))(*(_DWORD *)v3) == 1 )
        ++v2;
      else
        v2 += (*(int (__thiscall **)(int))(*(_DWORD *)v4 + 12))(v4);
    }
    v3 += 4;
    --v6;
  }
  while ( v6 );
  return v2;
}

//----- (0066B2E0) --------------------------------------------------------
Item *__thiscall Inventory::GetItemByID(Inventory *this, unsigned __int16 kItemID)
{
  Item *result; // eax@2
  signed int v3; // eax@3
  char *v4; // edx@3
  signed int v5; // eax@7
  char *v6; // edx@7

  if ( kItemID == -1 )
  {
    result = 0;
  }
  else
  {
    v3 = 0;
    v4 = (char *)this->m_aspEquip;
    do
    {
      if ( *(_DWORD *)v4 && *(_WORD *)(*(_DWORD *)v4 + 8) == kItemID )
        return this->m_aspEquip[v3].m_pObject;
      ++v3;
      v4 += 4;
    }
    while ( v3 < 30 );
    v5 = 0;
    v6 = (char *)this->m_aspInv;
    while ( !*(_DWORD *)v6 || *(_WORD *)(*(_DWORD *)v6 + 8) != kItemID )
    {
      ++v5;
      v6 += 4;
      if ( v5 >= 192 )
        return 0;
    }
    result = this->m_aspInv[v5].m_pObject;
  }
  return result;
}

//----- (0066B360) --------------------------------------------------------
int __thiscall Inventory::GetItemLot(Inventory *this, unsigned __int16 kItemID)
{
  Inventory *v2; // ebx@1
  char *v3; // esi@1
  signed int v4; // edi@1
  int v5; // ecx@2
  int v6; // esi@7
  signed int v7; // edi@7
  int v8; // ecx@8
  int iLot; // [sp+Ch] [bp-4h]@1

  v2 = this;
  iLot = 0;
  v3 = (char *)this->m_aspEquip;
  v4 = 30;
  do
  {
    v5 = *(_DWORD *)v3;
    if ( *(_DWORD *)v3 && *(_WORD *)(v5 + 8) == kItemID && (unsigned int)(*(int (**)(void))(*(_DWORD *)v5 + 16))() > 1 )
      iLot += (*(int (**)(void))(**(_DWORD **)v3 + 12))();
    v3 += 4;
    --v4;
  }
  while ( v4 );
  v6 = (int)v2->m_aspInv;
  v7 = 192;
  do
  {
    v8 = *(_DWORD *)v6;
    if ( *(_DWORD *)v6 && *(_WORD *)(v8 + 8) == kItemID && (unsigned int)(*(int (**)(void))(*(_DWORD *)v8 + 16))() >= 1 )
      iLot += (*(int (**)(void))(**(_DWORD **)v6 + 12))();
    v6 += 4;
    --v7;
  }
  while ( v7 );
  return iLot;
}

//----- (0066B3F0) --------------------------------------------------------
unsigned int __thiscall Inventory::GetStatInitialPoint(Inventory *this)
{
  char *v1; // ebx@1
  int v2; // edi@3
  int v3; // esi@3
  int v4; // ecx@5
  int v5; // eax@6
  signed int v7; // [sp+Ch] [bp-8h]@1
  unsigned int uiCount; // [sp+10h] [bp-4h]@1

  uiCount = 0;
  v1 = (char *)this->m_aspInv;
  v7 = 192;
  do
  {
    if ( *(_DWORD *)v1 )
    {
      v2 = *(_WORD *)(*(_DWORD *)v1 + 8);
      v3 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v2) )
      {
        if ( (unsigned __int16)v2 <= *(_WORD *)(v3 + 200) )
        {
          v4 = *(_DWORD *)(v3 + 196);
          if ( *(_DWORD *)(v4 + 4 * v2) )
          {
            v5 = *(_DWORD *)(v4 + 4 * v2);
            if ( v5 )
            {
              if ( !strcmp((const char *)(v5 + 2), "FreeStatusReloadOne") )
                uiCount += (*(int (**)(void))(**(_DWORD **)v1 + 12))();
            }
          }
        }
      }
    }
    v1 += 4;
    --v7;
  }
  while ( v7 );
  return uiCount;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0066B4B0) --------------------------------------------------------
unsigned int __thiscall Inventory::GetSkillEmpowerInitialPoint(Inventory *this)
{
  char *v1; // ebx@1
  int v2; // edi@3
  int v3; // esi@3
  int v4; // ecx@5
  int v5; // eax@6
  signed int v7; // [sp+Ch] [bp-8h]@1
  unsigned int uiCount; // [sp+10h] [bp-4h]@1

  uiCount = 0;
  v1 = (char *)this->m_aspInv;
  v7 = 192;
  do
  {
    if ( *(_DWORD *)v1 )
    {
      v2 = *(_WORD *)(*(_DWORD *)v1 + 8);
      v3 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v2) )
      {
        if ( (unsigned __int16)v2 <= *(_WORD *)(v3 + 200) )
        {
          v4 = *(_DWORD *)(v3 + 196);
          if ( *(_DWORD *)(v4 + 4 * v2) )
          {
            v5 = *(_DWORD *)(v4 + 4 * v2);
            if ( v5 )
            {
              if ( !strcmp((const char *)(v5 + 2), "SkillReloadbundleOne") )
                uiCount += (*(int (**)(void))(**(_DWORD **)v1 + 12))();
            }
          }
        }
      }
    }
    v1 += 4;
    --v7;
  }
  while ( v7 );
  return uiCount;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0066B570) --------------------------------------------------------
char __thiscall Inventory::FindEnchantSoketAdd(Inventory *this, ITEM_INVEN *rkInven)
{
  signed int v2; // ebx@1
  char *v3; // ecx@1
  int v4; // edi@3
  int v5; // esi@3
  int *v6; // eax@5
  int v7; // eax@6
  char *v9; // [sp+Ch] [bp-4h]@1

  v2 = 0;
  v3 = (char *)this->m_aspInv;
  v9 = v3;
  while ( 1 )
  {
    if ( *(_DWORD *)v3 )
    {
      v4 = *(_WORD *)(*(_DWORD *)v3 + 8);
      v5 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v4) )
      {
        if ( (unsigned __int16)v4 <= *(_WORD *)(v5 + 200) )
        {
          v6 = (int *)(*(_DWORD *)(v5 + 196) + 4 * v4);
          if ( *v6 )
          {
            v7 = *v6;
            if ( v7 )
            {
              if ( !strcmp((const char *)(v7 + 2), "EnchantSocketAdd") )
                break;
            }
          }
        }
      }
    }
    ++v2;
    v3 = v9 + 4;
    v9 += 4;
    if ( v2 >= 192 )
      return 0;
  }
  rkInven->Inven = v2 & 0x3FF | 0x2400;
  return 1;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0066B630) --------------------------------------------------------
char __thiscall Inventory::FindEnchantSoketReload(Inventory *this, ITEM_INVEN *rkInven)
{
  signed int v2; // ebx@1
  char *v3; // ecx@1
  int v4; // edi@3
  int v5; // esi@3
  int *v6; // eax@5
  int v7; // eax@6
  char *v9; // [sp+Ch] [bp-4h]@1

  v2 = 0;
  v3 = (char *)this->m_aspInv;
  v9 = v3;
  while ( 1 )
  {
    if ( *(_DWORD *)v3 )
    {
      v4 = *(_WORD *)(*(_DWORD *)v3 + 8);
      v5 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v4) )
      {
        if ( (unsigned __int16)v4 <= *(_WORD *)(v5 + 200) )
        {
          v6 = (int *)(*(_DWORD *)(v5 + 196) + 4 * v4);
          if ( *v6 )
          {
            v7 = *v6;
            if ( v7 )
            {
              if ( !strcmp((const char *)(v7 + 2), "EnchantSocketReload") )
                break;
            }
          }
        }
      }
    }
    ++v2;
    v3 = v9 + 4;
    v9 += 4;
    if ( v2 >= 192 )
      return 0;
  }
  rkInven->Inven = v2 & 0x3FF | 0x2400;
  return 1;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0066B6F0) --------------------------------------------------------
char __thiscall Inventory::FindWeaponTitleRemoveInven(Inventory *this, ITEM_INVEN *rkInven)
{
  signed int v2; // ebx@1
  char *v3; // ecx@1
  int v4; // edi@3
  int v5; // esi@3
  int *v6; // eax@5
  int v7; // eax@6
  char *v9; // [sp+Ch] [bp-4h]@1

  v2 = 0;
  v3 = (char *)this->m_aspInv;
  v9 = v3;
  while ( 1 )
  {
    if ( *(_DWORD *)v3 )
    {
      v4 = *(_WORD *)(*(_DWORD *)v3 + 8);
      v5 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v4) )
      {
        if ( (unsigned __int16)v4 <= *(_WORD *)(v5 + 200) )
        {
          v6 = (int *)(*(_DWORD *)(v5 + 196) + 4 * v4);
          if ( *v6 )
          {
            v7 = *v6;
            if ( v7 )
            {
              if ( !strcmp((const char *)(v7 + 2), "LicenseClear") )
                break;
            }
          }
        }
      }
    }
    ++v2;
    v3 = v9 + 4;
    v9 += 4;
    if ( v2 >= 192 )
      return 0;
  }
  rkInven->Inven = v2 & 0x3FF | 0x2400;
  return 1;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0066B7B0) --------------------------------------------------------
unsigned int __thiscall Inventory::GetInvIdxLotIsNotMax(Inventory *this, Item *pkItem)
{
  Inventory *v2; // edi@1
  unsigned int v3; // edx@1
  unsigned int v4; // esi@1
  NiPointer<Item> *v5; // edi@1
  Item *v6; // ebx@5
  unsigned int v7; // ST1C_4@5
  NiPointer<Item> *v8; // ecx@8
  unsigned int result; // eax@8
  NiPointer<Item> *v10; // [sp+Ch] [bp-10h]@1
  unsigned int uiUsing; // [sp+10h] [bp-Ch]@1
  unsigned int dwValue; // [sp+18h] [bp-4h]@1

  v2 = this;
  ChargedItemList::GetTotalEffectingValue(EE_MOREINVENTORY, &dwValue);
  v3 = 8 * (3 * dwValue + 6);
  v4 = 0;
  v5 = v2->m_aspInv;
  uiUsing = 8 * (3 * dwValue + 6);
  v10 = v5;
  do
  {
    if ( v4 >= v3 )
      break;
    if ( v5->m_pObject && v5->m_pObject->m_kStruct.itemid == pkItem->m_kStruct.itemid )
    {
      v6 = v5->m_pObject;
      v7 = ((int (__thiscall *)(Item *))v5->m_pObject->vfptr[3].__vecDelDtor)(v5->m_pObject);
      if ( ((int (__thiscall *)(Item *))v6->vfptr[4].__vecDelDtor)(v6) > v7 )
        return v4;
      v3 = uiUsing;
    }
    ++v4;
    ++v5;
  }
  while ( v4 < 0xC0 );
  v8 = v10;
  result = 0;
  do
  {
    if ( result >= v3 )
      break;
    if ( !v8->m_pObject )
      return result;
    ++result;
    ++v8;
  }
  while ( result < 0x240 );
  return -1;
}

//----- (0066B860) --------------------------------------------------------
Item *__thiscall Inventory::GetMHItemByObjID(Inventory *this, int iGUID)
{
  signed int v2; // eax@1
  char *v3; // edx@1
  signed int v4; // eax@5
  char *v5; // edx@5
  signed int v6; // eax@9
  char *v7; // edx@9
  signed int v8; // eax@13
  char *v9; // edx@13

  v2 = 0;
  v3 = (char *)this->m_aspMiniHouseFurnitureItemInv;
  do
  {
    if ( *(_DWORD *)v3 && *(_WORD *)(*(_DWORD *)v3 + 11) == iGUID )
      return this->m_aspMiniHouseFurnitureItemInv[v2].m_pObject;
    ++v2;
    v3 += 4;
  }
  while ( v2 < 98 );
  v4 = 0;
  v5 = (char *)this->m_aspMiniHouseAccessoryItemInv;
  do
  {
    if ( *(_DWORD *)v5 && *(_WORD *)(*(_DWORD *)v5 + 11) == iGUID )
      return this->m_aspMiniHouseAccessoryItemInv[v4].m_pObject;
    ++v4;
    v5 += 4;
  }
  while ( v4 < 98 );
  v6 = 0;
  v7 = (char *)this->m_aspMiniHouseTileAllItemInv;
  do
  {
    if ( *(_DWORD *)v7 && *(_WORD *)(*(_DWORD *)v7 + 11) == iGUID )
      return this->m_aspMiniHouseTileAllItemInv[v6].m_pObject;
    ++v6;
    v7 += 4;
  }
  while ( v6 < 98 );
  v8 = 0;
  v9 = (char *)this->m_aspMiniHouseMinigameAllItemInv;
  while ( !*(_DWORD *)v9 || *(_WORD *)(*(_DWORD *)v9 + 11) != iGUID )
  {
    ++v8;
    v9 += 4;
    if ( v8 >= 98 )
      return 0;
  }
  return this->m_aspMiniHouseMinigameAllItemInv[v8].m_pObject;
}

//----- (0066B930) --------------------------------------------------------
char __thiscall Inventory::FindItemByItemClass(Inventory *this, ItemClassEnum eItemClass)
{
  signed int v2; // esi@1
  char *v3; // edi@1

  v2 = 0;
  v3 = (char *)this->m_aspInv;
  while ( !*(_DWORD *)v3 || (unsigned __int8)(*(int (**)(void))(**(_DWORD **)v3 + 4))() != eItemClass )
  {
    ++v2;
    v3 += 4;
    if ( v2 >= 192 )
      return 0;
  }
  return 1;
}

//----- (0066B980) --------------------------------------------------------
int __thiscall Inventory::GetSlotByID(Inventory *this, unsigned __int16 kID)
{
  int result; // eax@1
  char *v3; // ecx@1

  result = 0;
  v3 = (char *)this->m_aspInv;
  while ( !*(_DWORD *)v3 || *(_WORD *)(*(_DWORD *)v3 + 8) != kID )
  {
    ++result;
    v3 += 4;
    if ( result >= 192 )
      return -1;
  }
  return result;
}

//----- (0066B9B0) --------------------------------------------------------
unsigned int __thiscall Inventory::GetRandomOptRecoverItemCount(Inventory *this, ITEM_INVEN *rkInven)
{
  char *v2; // ebx@1
  int v3; // edi@3
  int v4; // esi@3
  int v5; // ecx@5
  int v6; // eax@6
  unsigned int result; // eax@11
  signed int v8; // [sp+Ch] [bp-8h]@1
  unsigned int iRecoveryItemCount; // [sp+10h] [bp-4h]@1

  iRecoveryItemCount = 0;
  v2 = (char *)this->m_aspInv;
  v8 = 192;
  do
  {
    if ( *(_DWORD *)v2 )
    {
      v3 = *(_WORD *)(*(_DWORD *)v2 + 8);
      v4 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v3) )
      {
        if ( (unsigned __int16)v3 <= *(_WORD *)(v4 + 200) )
        {
          v5 = *(_DWORD *)(v4 + 196);
          if ( *(_DWORD *)(v5 + 4 * v3) )
          {
            v6 = *(_DWORD *)(v5 + 4 * v3);
            if ( v6 )
            {
              if ( !strcmp((const char *)(v6 + 2), "RandomOption_Recover") )
                iRecoveryItemCount += (*(int (**)(void))(**(_DWORD **)v2 + 12))();
            }
          }
        }
      }
    }
    v2 += 4;
    --v8;
  }
  while ( v8 );
  if ( iRecoveryItemCount >= 1 )
  {
    rkInven->Inven = rkInven->Inven & 0x3FF | 0x2400;
    result = iRecoveryItemCount;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0066BA90) --------------------------------------------------------
void __thiscall Inventory::~Inventory(Inventory *this)
{
  Inventory *v1; // esi@1

  v1 = this;
  `eh vector destructor iterator'(
    this->m_aspPremiumActionInv,
    4u,
    42,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_aspRewardInv,
    4u,
    192,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_aspMiniHouseMinigameAllItemInv,
    4u,
    98,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_aspMiniHouseTileAllItemInv,
    4u,
    98,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_aspMiniHouseAccessoryItemInv,
    4u,
    98,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_aspMiniHouseFurnitureItemInv,
    4u,
    98,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_aspMiniHouseEquip,
    4u,
    11,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_aspMiniHouseInv,
    4u,
    192,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_aspEquip,
    4u,
    30,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_aspInv,
    4u,
    192,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
}

//----- (0066BBE0) --------------------------------------------------------
bool __thiscall Inventory::EquipMiniHouse(Inventory *this, unsigned int uiIndex)
{
  return uiIndex < 0xC0 && this->m_aspInv[uiIndex].m_pObject;
}

//----- (0066BC00) --------------------------------------------------------
bool __thiscall Inventory::UnEquipMiniHouse(Inventory *this, unsigned int uiIndex)
{
  return uiIndex < 0x1E && this->m_aspEquip[uiIndex].m_pObject;
}

//----- (0066BC30) --------------------------------------------------------
void __thiscall Inventory::Add(Inventory *this, unsigned int uiInvenType, Item *pkItem, unsigned int uiIndex)
{
  switch ( uiInvenType )
  {
    case 8u:
      Inventory::AddEquip(this, pkItem, uiIndex);
      break;
    case 9u:
      Inventory::AddInv(this, pkItem, uiIndex);
      break;
    case 0xCu:
      if ( uiIndex <= 0xA )
        Inventory::AddMiniHouseEquip(this, pkItem, uiIndex);
      else
        Inventory::AddMiniHouseInv(this, pkItem, uiIndex - 11);
      break;
    case 2u:
      Inventory::AddRewardInv(this, pkItem, uiIndex);
      break;
    case 0xFu:
      Inventory::AddPremiumActionInv(this, pkItem, uiIndex);
      break;
    default:
      return;
  }
}

//----- (0066BCE0) --------------------------------------------------------
char __thiscall Inventory::Equip(Inventory *this, unsigned int uiIndex)
{
  Inventory *v2; // edi@1
  Item *v3; // eax@2
  char result; // al@3
  ItemInfo *v5; // ecx@4
  Item *v6; // esi@5

  v2 = this;
  if ( uiIndex >= 0xC0 || (v3 = this->m_aspInv[uiIndex].m_pObject) == 0 || (v5 = v3->m_pkInfo, v5->Type) )
  {
    result = 0;
  }
  else
  {
    Inventory::AddEquip(v2, v3, v5->Equip);
    v6 = v2->m_aspInv[uiIndex].m_pObject;
    if ( v6 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
      v2->m_aspInv[uiIndex].m_pObject = 0;
    }
    result = 1;
  }
  return result;
}

//----- (0066BD50) --------------------------------------------------------
char __thiscall Inventory::UnEquip(Inventory *this, unsigned int uiIndex)
{
  Inventory *v2; // edi@1
  Item *v3; // edx@2
  char result; // al@3
  unsigned int v5; // eax@5
  char *v6; // ecx@5
  Item *v7; // esi@9

  v2 = this;
  if ( uiIndex >= 0x1E || (v3 = this->m_aspEquip[uiIndex].m_pObject) == 0 || v3->m_pkInfo->Type )
  {
    result = 0;
  }
  else
  {
    v5 = 0;
    v6 = (char *)this->m_aspInv;
    while ( *(_DWORD *)v6 )
    {
      ++v5;
      v6 += 4;
      if ( v5 >= 0xC0 )
      {
        v5 = -1;
        break;
      }
    }
    Inventory::AddInv(v2, v3, v5);
    v7 = v2->m_aspEquip[uiIndex].m_pObject;
    if ( v7 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      {
        if ( v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      }
      v2->m_aspEquip[uiIndex].m_pObject = 0;
    }
    result = 1;
  }
  return result;
}

//----- (0066BDE0) --------------------------------------------------------
void __thiscall Inventory::ClearMiniHouseAllItemInv(Inventory *this)
{
  Inventory *v1; // esi@1

  v1 = this;
  Inventory::ClearMiniHouseTileAllItemInv(this);
  Inventory::ClearMiniHouseFurnitureItemInv(v1);
  Inventory::ClearMiniHouseAccessoryItemInv(v1);
  Inventory::ClearMiniHouseMinigameItemInv(v1);
}

//----- (0066BE00) --------------------------------------------------------
signed int __thiscall Inventory::InitData(Inventory *this, PROTO_NC_CHAR_CLIENT_ITEM_CMD *pkItemData, char *pbyItemDataStartAddress)
{
  PROTO_NC_CHAR_CLIENT_ITEM_CMD *v3; // edi@1
  char v4; // al@1
  Inventory *v5; // esi@1
  int v6; // eax@12
  signed int result; // eax@13
  char *v8; // ebx@14
  Item *v9; // eax@16
  NiPointer<NiD3DDefaultShader> *v10; // ecx@20
  unsigned int v11; // edx@22
  NiD3DDefaultShader *v12; // [sp-8h] [bp-1Ch]@22
  int v13; // [sp+8h] [bp-Ch]@15
  ITEM_INVEN kInven; // [sp+Ch] [bp-8h]@16
  unsigned int uiBuffSize; // [sp+10h] [bp-4h]@12
  unsigned int uiTotalBuffSize; // [sp+1Ch] [bp+8h]@12

  v3 = pkItemData;
  v4 = pkItemData->box;
  v5 = this;
  this->m_bWaitingItemDropAck = 0;
  if ( *(_BYTE *)&pkItemData->flag & 1 )
  {
    switch ( v4 )
    {
      case 9:
        Inventory::ClearInv(this);
        break;
      case 8:
        Inventory::ClearEquip(this);
        break;
      case 0xC:
        Inventory::ClearMiniHouseInv(this);
        Inventory::ClearMiniHouseEquip(v5);
        break;
      case 3:
        Inventory::ClearMiniHouseFurnitureItemInv(this);
        break;
      case 0xD:
        Inventory::ClearMiniHouseAccessoryItemInv(this);
        break;
      case 0xE:
        Inventory::ClearMiniHouseTileAllItemInv(this);
        break;
      case 0x10:
        Inventory::ClearMiniHouseMinigameItemInv(this);
        break;
      case 2:
        Inventory::ClearRewardInv(this);
        break;
      case 0xF:
        Inventory::ClearPremiumActionInv(this);
        break;
      default:
        break;
    }
  }
  v6 = pkItemData->numofitem;
  uiBuffSize = 0;
  uiTotalBuffSize = 3;
  if ( v6 )
  {
    v8 = &v3[1].numofitem;
    if ( v6 )
    {
      v13 = v6;
      do
      {
        v9 = Item::Create(v8, &kInven, &uiBuffSize);
        if ( v9 )
        {
          uiTotalBuffSize += uiBuffSize;
          v8 += uiBuffSize;
          switch ( (unsigned int)kInven.Inven >> 10 )
          {
            case 7u:
              v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
              break;
            case 8u:
              v10 = (NiPointer<NiD3DDefaultShader> *)&v5->m_aspEquip[kInven.Inven & 0x3FF];
              goto LABEL_36;
            case 9u:
              v10 = (NiPointer<NiD3DDefaultShader> *)&v5->m_aspInv[kInven.Inven & 0x3FF];
              goto LABEL_36;
            case 0xCu:
              v11 = kInven.Inven & 0x3FF;
              v12 = (NiD3DDefaultShader *)v9;
              if ( v11 < 0xB )
                v10 = (NiPointer<NiD3DDefaultShader> *)&v5->m_aspMiniHouseEquip[v11];
              else
                v10 = (NiPointer<NiD3DDefaultShader> *)&v5->m_aspEquip[v11 + 19];
              goto LABEL_37;
            case 3u:
              if ( (kInven.Inven & 0x3FFu) < 0x62 )
              {
                v10 = (NiPointer<NiD3DDefaultShader> *)&v5->m_aspMiniHouseFurnitureItemInv[kInven.Inven & 0x3FF];
                if ( !v10->m_pObject )
                  goto LABEL_36;
              }
              break;
            case 0xDu:
              if ( (kInven.Inven & 0x3FFu) >= 0x62 )
                break;
              v10 = (NiPointer<NiD3DDefaultShader> *)&v5->m_aspMiniHouseAccessoryItemInv[kInven.Inven & 0x3FF];
              goto LABEL_36;
            case 0xEu:
              if ( (kInven.Inven & 0x3FFu) >= 0x62 )
                break;
              v10 = (NiPointer<NiD3DDefaultShader> *)&v5->m_aspMiniHouseTileAllItemInv[kInven.Inven & 0x3FF];
              goto LABEL_36;
            case 0x10u:
              if ( (kInven.Inven & 0x3FFu) >= 0x62 )
                break;
              v10 = (NiPointer<NiD3DDefaultShader> *)&v5->m_aspMiniHouseMinigameAllItemInv[kInven.Inven & 0x3FF];
              goto LABEL_36;
            case 2u:
              v10 = (NiPointer<NiD3DDefaultShader> *)&v5->m_aspRewardInv[kInven.Inven & 0x3FF];
              goto LABEL_36;
            case 0xFu:
              v10 = (NiPointer<NiD3DDefaultShader> *)&v5->m_aspPremiumActionInv[kInven.Inven & 0x3FF];
LABEL_36:
              v12 = (NiD3DDefaultShader *)v9;
LABEL_37:
              NiPointer<PopupMenuWin>::operator=(v10, v12);
              break;
            default:
              break;
          }
        }
        else
        {
          uiTotalBuffSize += uiBuffSize;
          v8 += uiBuffSize;
        }
        --v13;
      }
      while ( v13 );
    }
    result = uiTotalBuffSize;
  }
  else
  {
    result = 3;
  }
  return result;
}

//----- (0066C070) --------------------------------------------------------
bool __stdcall Inventory::CanIEquipHandedItem(ItemInfo *pkInfo)
{
  bool result; // al@1

  result = 1;
  switch ( pkInfo->Class )
  {
    case 5:
      result = Inventory::CanIEquipWeapon(pkInfo);
      break;
    case 0x1A:
      result = Inventory::CanIEquipWeaponCostume(pkInfo);
      break;
    case 7:
      result = Inventory::CanIEquipShield(pkInfo);
      break;
    case 0x25:
      result = Inventory::CanIEquipShieldCostume(pkInfo);
      break;
    default:
      return result;
  }
  return result;
}

//----- (0066C100) --------------------------------------------------------
unsigned __int16 __thiscall Inventory::GetMiniHouseSkin(Inventory *this)
{
  Item *v1; // eax@1
  ItemViewInfo *v2; // eax@3
  MiniHouse *v3; // eax@4
  unsigned __int16 result; // ax@5

  v1 = this->m_aspMiniHouseEquip[0].m_pObject;
  if ( v1
    && v1->m_kStruct.itemid != -1
    && (v2 = v1->m_pkViewInfo) != 0
    && (v3 = MiniHouseTable::GetByInxName(v2->InxName)) != 0 )
  {
    result = v3->Handle;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0066C140) --------------------------------------------------------
char *__thiscall Inventory::GetPlayMiniHouseSound(Inventory *this)
{
  Item *v1; // eax@1
  ItemViewInfo *v2; // eax@3
  MiniHouse *v3; // eax@4
  char *v4; // eax@5
  char *v5; // edx@5
  char v6; // cl@6

  v1 = this->m_aspMiniHouseEquip[0].m_pObject;
  if ( v1 )
  {
    if ( v1->m_kStruct.itemid != -1 )
    {
      v2 = v1->m_pkViewInfo;
      if ( v2 )
      {
        v3 = MiniHouseTable::GetByInxName(v2->InxName);
        if ( v3 )
        {
          v4 = v3->DummyType;
          v5 = (char *)(soundName - v4);
          do
          {
            v6 = *v4;
            v4[(_DWORD)v5] = *v4;
            ++v4;
          }
          while ( v6 );
        }
      }
    }
  }
  return soundName;
}

//----- (0066C190) --------------------------------------------------------
char __thiscall Inventory::IsFull(Inventory *this)
{
  Inventory *v1; // esi@1
  unsigned int v2; // ecx@1
  unsigned int v3; // eax@1
  NiPointer<Item> *v4; // edx@2
  char result; // al@6
  unsigned int dwValue; // [sp+4h] [bp-4h]@1

  v1 = this;
  ChargedItemList::GetTotalEffectingValue(EE_MOREINVENTORY, &dwValue);
  v2 = 0;
  v3 = 8 * (3 * dwValue + 6);
  if ( v3 )
  {
    v4 = v1->m_aspInv;
    while ( v2 < 0xC0 && v4->m_pObject )
    {
      ++v2;
      ++v4;
      if ( v2 >= v3 )
        goto LABEL_6;
    }
    result = 0;
  }
  else
  {
LABEL_6:
    result = 1;
  }
  return result;
}

//----- (0066C1F0) --------------------------------------------------------
unsigned int __thiscall Inventory::GetEmptySlotCount(Inventory *this)
{
  Inventory *v1; // esi@1
  __int64 v2; // rax@1
  unsigned int v3; // ecx@1
  NiPointer<Item> *v4; // esi@2
  unsigned int dwValue; // [sp+4h] [bp-4h]@1

  v1 = this;
  dwValue = 0;
  ChargedItemList::GetTotalEffectingValue(EE_MOREINVENTORY, &dwValue);
  v2 = 0i64;
  v3 = 8 * (3 * dwValue + 6);
  if ( v3 )
  {
    v4 = v1->m_aspInv;
    do
    {
      if ( HIDWORD(v2) >= 0xC0 || !v4->m_pObject )
        LODWORD(v2) = v2 + 1;
      ++HIDWORD(v2);
      ++v4;
    }
    while ( HIDWORD(v2) < v3 );
  }
  return v2;
}

//----- (0066C240) --------------------------------------------------------
void __thiscall Inventory::Inventory(Inventory *this)
{
  Inventory *v1; // esi@1

  v1 = this;
  `eh vector constructor iterator'(
    this->m_aspInv,
    4u,
    192,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_aspEquip,
    4u,
    30,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_aspMiniHouseInv,
    4u,
    192,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_aspMiniHouseEquip,
    4u,
    11,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_aspMiniHouseFurnitureItemInv,
    4u,
    98,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_aspMiniHouseAccessoryItemInv,
    4u,
    98,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_aspMiniHouseTileAllItemInv,
    4u,
    98,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_aspMiniHouseMinigameAllItemInv,
    4u,
    98,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_aspRewardInv,
    4u,
    192,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_aspPremiumActionInv,
    4u,
    42,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_bWaitingItemDropAck = 0;
  v1->m_uiRewardCount = 0;
  v1->m_uiPremiumActionCount = 0;
}

//----- (0066C3D0) --------------------------------------------------------
void __thiscall Inventory::Clear(Inventory *this)
{
  Inventory *v1; // esi@1

  v1 = this;
  Inventory::ClearInv(this);
  Inventory::ClearEquip(v1);
  Inventory::ClearRewardInv(v1);
  Inventory::ClearMiniHouseInv(v1);
  Inventory::ClearMiniHouseEquip(v1);
  Inventory::ClearMiniHouseInv(v1);
  Inventory::ClearMiniHouseEquip(v1);
  Inventory::ClearMiniHouseFurnitureItemInv(v1);
  Inventory::ClearMiniHouseAccessoryItemInv(v1);
  Inventory::ClearMiniHouseTileAllItemInv(v1);
  Inventory::ClearPremiumActionInv(v1);
}

//----- (0066C420) --------------------------------------------------------
char __thiscall Inventory::FindMysteryVault(Inventory *this, ITEM_INVEN *rkInven)
{
  Inventory *v2; // esi@1
  int v3; // esi@1
  int v4; // edi@3
  int v5; // esi@3
  int v6; // edx@5
  int v7; // eax@6
  const char *v8; // edx@10
  unsigned int v9; // esi@12
  unsigned int v10; // edi@12
  unsigned int v11; // ecx@12
  unsigned int v12; // ebx@14
  const char *v13; // eax@14
  int v14; // eax@16
  bool v15; // zf@16
  signed int v16; // eax@18
  int v18; // [sp+14h] [bp-50h]@1
  int i; // [sp+18h] [bp-4Ch]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strMV_Name; // [sp+1Ch] [bp-48h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strItemName; // [sp+38h] [bp-2Ch]@7
  int v22; // [sp+60h] [bp-4h]@1

  v2 = this;
  strMV_Name._Myres = 15;
  strMV_Name._Mysize = 0;
  strMV_Name._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strMV_Name, "MVault", 6u);
  v3 = (int)v2->m_aspInv;
  v22 = 0;
  i = 0;
  v18 = v3;
  while ( 1 )
  {
    if ( *(_DWORD *)v3 )
    {
      v4 = *(_WORD *)(*(_DWORD *)v3 + 8);
      v5 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v4) )
      {
        if ( (unsigned __int16)v4 <= *(_WORD *)(v5 + 200) )
        {
          v6 = *(_DWORD *)(v5 + 196);
          if ( *(_DWORD *)(v6 + 4 * v4) )
          {
            v7 = *(_DWORD *)(v6 + 4 * v4);
            if ( v7 )
              break;
          }
        }
      }
    }
LABEL_24:
    v3 = v18 + 4;
    ++i;
    v18 += 4;
    if ( i >= 192 )
    {
      if ( strMV_Name._Myres >= 0x10 )
        operator delete(strMV_Name._Bx._Ptr);
      return 0;
    }
  }
  strItemName._Myres = 15;
  strItemName._Mysize = 0;
  strItemName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &strItemName,
    (const char *)(v7 + 2),
    strlen((const char *)(v7 + 2)));
  LOBYTE(v22) = 1;
  if ( strMV_Name._Mysize > strItemName._Mysize )
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
      &strItemName,
      strMV_Name._Mysize - strItemName._Mysize,
      0);
  else
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::erase(
      &strItemName,
      strMV_Name._Mysize,
      0xFFFFFFFF);
  v8 = strMV_Name._Bx._Ptr;
  if ( strMV_Name._Myres < 0x10 )
    v8 = (const char *)&strMV_Name;
  v9 = strItemName._Mysize;
  v10 = strMV_Name._Mysize;
  v11 = strItemName._Mysize;
  if ( strItemName._Mysize >= strMV_Name._Mysize )
    v11 = strMV_Name._Mysize;
  v12 = strItemName._Myres;
  v13 = strItemName._Bx._Ptr;
  if ( strItemName._Myres < 0x10 )
    v13 = (const char *)&strItemName;
  v14 = std::char_traits<char>::compare(v13, v8, v11);
  v15 = v14 == 0;
  if ( !v14 )
  {
    if ( v9 >= v10 )
      v16 = v9 != v10;
    else
      v16 = -1;
    v15 = v16 == 0;
  }
  if ( !v15 )
  {
    LOBYTE(v22) = v15;
    if ( v12 >= 0x10 )
      operator delete(strItemName._Bx._Ptr);
    goto LABEL_24;
  }
  rkInven->Inven = i & 0x3FF | 0x2400;
  if ( v12 >= 0x10 )
    operator delete(strItemName._Bx._Ptr);
  strItemName._Myres = 15;
  strItemName._Mysize = 0;
  strItemName._Bx._Buf[0] = 0;
  if ( strMV_Name._Myres >= 0x10 )
    operator delete(strMV_Name._Bx._Ptr);
  return 1;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0066C630) --------------------------------------------------------
void __thiscall Inventory::AddInv(Inventory *this, Item *pkItem, unsigned int uiIndex)
{
  Inventory *v3; // ebx@1
  Item *v4; // esi@1

  v3 = this;
  v4 = this->m_aspInv[uiIndex].m_pObject;
  if ( v4 != pkItem )
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v3->m_aspInv[uiIndex].m_pObject = pkItem;
    if ( pkItem )
      InterlockedIncrement((volatile LONG *)&pkItem->m_uiRefCount);
  }
}

//----- (0066C690) --------------------------------------------------------
void __thiscall Inventory::AddMiniHouseInv(Inventory *this, Item *pkItem, unsigned int uiIndex)
{
  Inventory *v3; // ebx@1
  Item *v4; // esi@1

  v3 = this;
  v4 = this->m_aspMiniHouseInv[uiIndex].m_pObject;
  if ( v4 != pkItem )
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v3->m_aspMiniHouseInv[uiIndex].m_pObject = pkItem;
    if ( pkItem )
      InterlockedIncrement((volatile LONG *)&pkItem->m_uiRefCount);
  }
}

//----- (0066C6F0) --------------------------------------------------------
void __thiscall Inventory::AddMiniHouseEquip(Inventory *this, Item *pkItem, unsigned int uiIndex)
{
  Inventory *v3; // ebx@1
  Item *v4; // esi@1

  v3 = this;
  v4 = this->m_aspMiniHouseEquip[uiIndex].m_pObject;
  if ( v4 != pkItem )
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v3->m_aspMiniHouseEquip[uiIndex].m_pObject = pkItem;
    if ( pkItem )
      InterlockedIncrement((volatile LONG *)&pkItem->m_uiRefCount);
  }
}

//----- (0066C750) --------------------------------------------------------
void __thiscall Inventory::AddPremiumActionInv(Inventory *this, Item *pkItem, unsigned int uiIndex)
{
  Inventory *v3; // esi@1
  Item *v4; // edi@1

  v3 = this;
  v4 = this->m_aspPremiumActionInv[uiIndex].m_pObject;
  if ( v4 != pkItem )
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v3->m_aspPremiumActionInv[uiIndex].m_pObject = pkItem;
    if ( pkItem )
      InterlockedIncrement((volatile LONG *)&pkItem->m_uiRefCount);
  }
  ++v3->m_uiPremiumActionCount;
}

//----- (0066C7B0) --------------------------------------------------------
SHINE_PUT_ON_BELONGED_ITEM __thiscall Item::GetPutOnBelongState(Item *this)
{
  Item *v1; // esi@1
  SHINE_PUT_ON_BELONGED_ITEM result; // eax@2

  v1 = this;
  switch ( (unsigned __int8)((int (*)(void))this->vfptr[1].__vecDelDtor)() )
  {
    case 5u:
    case 6u:
    case 7u:
    case 8u:
      result = v1->m_kStruct.itemattr.weapon.IsPutOnBelonged;
      break;
    case 4u:
    case 0xAu:
      result = v1->m_kStruct.itemattr.amulet.IsPutOnBelonged;
      break;
    case 0x17u:
      result = v1->m_kStruct.itemattr.riding.IsPutOnBelonged;
      break;
    default:
      result = 0;
      break;
  }
  return result;
}

//----- (0066C810) --------------------------------------------------------
char __thiscall ItemWeapon::GetGemResCount(ItemWeapon *this, char SoketIdx)
{
  char result; // al@2

  if ( this->m_kStruct.itemattr.weapon.maxSocketCount <= (unsigned __int8)SoketIdx )
    result = 0;
  else
    result = *((_BYTE *)&this->m_kStruct.itemattr.Bracelet
             + 2 * (unsigned __int8)SoketIdx
             + (unsigned __int8)SoketIdx
             + 50);
  return result;
}

//----- (0066C830) --------------------------------------------------------
void __thiscall ItemWeapon::SetGemResCount(ItemWeapon *this, char SoketIdx, char Amount)
{
  if ( this->m_kStruct.itemattr.weapon.maxSocketCount > (unsigned __int8)SoketIdx )
    *((_BYTE *)&this->m_kStruct.itemattr.Bracelet + 2 * (unsigned __int8)SoketIdx + (unsigned __int8)SoketIdx + 50) = Amount;
}

//----- (0066C850) --------------------------------------------------------
void __thiscall Item::Item(Item *this, SHINE_ITEM_STRUCT *kItemStruct)
{
  Item *v2; // ebx@1
  int v3; // esi@1
  int v4; // edi@1
  ItemInfo *v5; // eax@2
  int v6; // ecx@5
  int v7; // edi@8
  int v8; // esi@8
  ItemViewInfo *v9; // eax@9
  int v10; // edx@11

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v2->vfptr = (NiRefObjectVtbl *)&Item::`vftable';
  qmemcpy(&v2->m_kStruct, kItemStruct, sizeof(v2->m_kStruct));
  v3 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  v4 = v2->m_kStruct.itemid;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                          ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                          v4) )
  {
    if ( (unsigned __int16)v4 <= *(_WORD *)(v3 + 200) )
    {
      v6 = *(_DWORD *)(v3 + 196);
      if ( *(_DWORD *)(v6 + 4 * v4) )
        v5 = *(ItemInfo **)(v6 + 4 * v4);
      else
        v5 = 0;
    }
    else
    {
      v5 = 0;
    }
  }
  else
  {
    v5 = 0;
  }
  v7 = v2->m_kStruct.itemid;
  v2->m_pkInfo = v5;
  v8 = ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable,
                          v7)
    && (unsigned __int16)v7 <= *(_WORD *)(v8 + 200)
    && (v10 = *(_DWORD *)(v8 + 196), *(_DWORD *)(v10 + 4 * v7)) )
  {
    v9 = *(ItemViewInfo **)(v10 + 4 * v7);
  }
  else
  {
    v9 = 0;
  }
  v2->m_pkViewInfo = v9;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9BB03C: using guessed type int (__thiscall *Item::`vftable')(void *p, char);
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
// A8C298: using guessed type int ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;

//----- (0066C940) --------------------------------------------------------
Item *__cdecl Item::Create(char *pbyBuff, unsigned int *puiBuffSize)
{
  int v2; // ebx@1
  int v4; // edi@5
  int v5; // edx@7
  int v6; // eax@8
  int v7; // eax@9
  unsigned int v8; // edi@9
  char *v9; // esi@9
  Item *v10; // ebx@9
  Item *v11; // eax@10
  Item *v12; // esi@10
  Item *v13; // eax@14
  Item *v14; // eax@16
  Item *v15; // eax@20
  Item *v16; // eax@22
  Item *v17; // esi@22
  Item *v18; // ecx@23
  Item *v19; // eax@27
  Item *v20; // eax@29
  Item *v21; // eax@33
  unsigned int v22; // eax@35
  Item *v23; // eax@35
  Item *v24; // eax@37
  Item *v25; // eax@39
  Item *v26; // eax@43
  Item *v27; // eax@45
  Item *v28; // eax@49
  Item *v29; // eax@51
  unsigned int v30; // ecx@53
  unsigned int v31; // edx@53
  Item *v32; // eax@55
  Item *v33; // eax@59
  Item *v34; // eax@61
  Item *v35; // eax@65
  Item *v36; // eax@67
  Item *v37; // eax@71
  Item *v38; // eax@73
  unsigned int v39; // eax@75
  char v40; // cl@75
  Item *v41; // eax@75
  char v42; // cl@77
  Item *v43; // eax@77
  Item *v44; // eax@79
  Item *v45; // eax@83
  Item *v46; // esi@85
  Item *v47; // eax@87
  SHINE_ITEM_STRUCT kStruct; // [sp+18h] [bp-78h]@9
  int v49; // [sp+8Ch] [bp-4h]@10

  v2 = *(_WORD *)pbyBuff;
  if ( (_WORD)v2 == -1 )
  {
    if ( puiBuffSize )
      *puiBuffSize = 2;
    return 0;
  }
  v4 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  if ( !(unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                           ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                           v2) )
    return 0;
  if ( (unsigned __int16)v2 > *(_WORD *)(v4 + 200) )
    return 0;
  v5 = *(_DWORD *)(v4 + 196);
  if ( !*(_DWORD *)(v5 + 4 * v2) )
    return 0;
  v6 = *(_DWORD *)(v5 + 4 * v2);
  if ( !v6 )
    return 0;
  v7 = *(_DWORD *)(v6 + 102);
  v8 = 2;
  kStruct.itemid = v2;
  v9 = pbyBuff + 2;
  v10 = 0;
  switch ( v7 )
  {
    case 0:
      kStruct.itemattr.blot.lot = *v9;
      v8 = 3;
      v11 = (Item *)operator new(0x78u);
      v12 = v11;
      v49 = 0;
      if ( !v11 )
        goto LABEL_89;
      Item::Item(v11, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemByteLot::`vftable';
      goto LABEL_90;
    case 1:
      kStruct.itemattr.wlot.lot = *(_WORD *)v9;
      v8 = 4;
      v12 = (Item *)operator new(0x78u);
      v49 = 1;
      if ( !v12 )
        goto LABEL_89;
      Item::Item(v12, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemWordLot::`vftable';
      goto LABEL_90;
    case 2:
      kStruct.itemattr.dlot.lot = *(_DWORD *)v9;
      v8 = 6;
      v13 = (Item *)operator new(0x78u);
      v12 = v13;
      v49 = 2;
      if ( !v13 )
        goto LABEL_89;
      Item::Item(v13, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemDwrdLot::`vftable';
      goto LABEL_90;
    case 3:
      kStruct.itemattr.wlot.lot = *(_WORD *)v9;
      v8 = 4;
      v14 = (Item *)operator new(0x78u);
      v12 = v14;
      v49 = 3;
      if ( !v14 )
        goto LABEL_89;
      Item::Item(v14, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemQuest::`vftable';
      goto LABEL_90;
    case 4:
      v8 = ItemAmulet::SetStructAttr(&kStruct, v9) + 2;
      v12 = (Item *)operator new(0x78u);
      v49 = 4;
      if ( !v12 )
        goto LABEL_89;
      Item::Item(v12, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemAmulet::`vftable';
      goto LABEL_90;
    case 5:
      v8 = ItemWeapon::SetStructAttr(&kStruct, v9) + 2;
      v15 = (Item *)operator new(0x78u);
      v12 = v15;
      v49 = 5;
      if ( !v15 )
        goto LABEL_89;
      Item::Item(v15, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemWeapon::`vftable';
      goto LABEL_90;
    case 26:
      kStruct.itemattr.dlot.lot = *(_DWORD *)v9;
      v8 = 6;
      v16 = (Item *)operator new(0x7Cu);
      v17 = v16;
      v49 = 6;
      if ( !v16 )
        goto LABEL_24;
      Item::Item(v16, &kStruct);
      v17->vfptr = (NiRefObjectVtbl *)&ItemCostumeWeapon::`vftable';
      v18 = v17;
      goto LABEL_25;
    case 6:
      v8 = ItemBracelet::SetStructAttr(&kStruct, v9) + 2;
      v19 = (Item *)operator new(0x78u);
      v12 = v19;
      v49 = 7;
      if ( !v19 )
        goto LABEL_89;
      Item::Item(v19, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemArmor::`vftable';
      goto LABEL_90;
    case 7:
      v8 = ItemBracelet::SetStructAttr(&kStruct, v9) + 2;
      v20 = (Item *)operator new(0x78u);
      v12 = v20;
      v49 = 8;
      if ( !v20 )
        goto LABEL_89;
      Item::Item(v20, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemShield::`vftable';
      goto LABEL_90;
    case 8:
      v8 = ItemBracelet::SetStructAttr(&kStruct, v9) + 2;
      v12 = (Item *)operator new(0x78u);
      v49 = 9;
      if ( !v12 )
        goto LABEL_89;
      Item::Item(v12, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemBoot::`vftable';
      goto LABEL_90;
    case 9:
      qmemcpy(&kStruct.itemattr, v9, 0x24u);
      v8 = 38;
      v21 = (Item *)operator new(0x78u);
      v12 = v21;
      v49 = 10;
      if ( !v21 )
        goto LABEL_89;
      Item::Item(v21, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemFurniture::`vftable';
      goto LABEL_90;
    case 10:
      v22 = *(_DWORD *)(pbyBuff + 6);
      kStruct.itemattr.dlot.lot = *(_DWORD *)v9;
      kStruct.itemattr.Capsule.content.dwrdkey[1] = v22;
      v8 = 10;
      v23 = (Item *)operator new(0x78u);
      v12 = v23;
      v49 = 11;
      if ( !v23 )
        goto LABEL_89;
      Item::Item(v23, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemDecoration::`vftable';
      goto LABEL_90;
    case 11:
      v8 = 3;
      v24 = (Item *)operator new(0x78u);
      v12 = v24;
      v49 = 12;
      if ( !v24 )
        goto LABEL_89;
      Item::Item(v24, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemSkillScroll::`vftable';
      goto LABEL_90;
    case 12:
      kStruct.itemattr.blot.lot = *v9;
      v8 = 3;
      v25 = (Item *)operator new(0x78u);
      v12 = v25;
      v49 = 13;
      if ( !v25 )
        goto LABEL_89;
      Item::Item(v25, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemRecallScroll::`vftable';
      goto LABEL_90;
    case 14:
      kStruct.itemattr.blot.lot = *v9;
      v8 = 3;
      v12 = (Item *)operator new(0x78u);
      v49 = 14;
      if ( !v12 )
        goto LABEL_89;
      Item::Item(v12, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemUpgradeSource::`vftable';
      goto LABEL_90;
    case 13:
      kStruct.itemattr.blot.lot = *v9;
      memcpy(&kStruct.itemattr.weapon.strengthen, pbyBuff + 3, 10 * (unsigned __int8)kStruct.itemattr.blot.lot);
      v8 = 10 * (unsigned __int8)kStruct.itemattr.blot.lot + 3;
      v26 = (Item *)operator new(0x78u);
      v12 = v26;
      v49 = 15;
      if ( !v26 )
        goto LABEL_89;
      Item::Item(v26, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemBind::`vftable';
      goto LABEL_90;
    case 15:
      v8 = ItemChest::SetStructAttr(&kStruct, v9) + 2;
      v27 = (Item *)operator new(0x78u);
      v12 = v27;
      v49 = 16;
      if ( !v27 )
        goto LABEL_89;
      Item::Item(v27, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemChest::`vftable';
      goto LABEL_90;
    case 34:
      kStruct.itemattr.blot.lot = *v9;
      v8 = 3;
      v12 = (Item *)operator new(0x78u);
      v49 = 17;
      if ( !v12 )
        goto LABEL_89;
      Item::Item(v12, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemEnchant::`vftable';
      goto LABEL_90;
    case 16:
      v8 = 3;
      v28 = (Item *)operator new(0x78u);
      v12 = v28;
      v49 = 18;
      if ( !v28 )
        goto LABEL_89;
      Item::Item(v28, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemWeaponTitleLicense::`vftable';
      goto LABEL_90;
    case 28:
      v8 = 3;
      v29 = (Item *)operator new(0x78u);
      v12 = v29;
      v49 = 19;
      if ( !v29 )
        goto LABEL_89;
      Item::Item(v29, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemGBCoin::`vftable';
      goto LABEL_90;
    case 29:
      v30 = *(_DWORD *)(pbyBuff + 6);
      v31 = *(_DWORD *)(pbyBuff + 10);
      kStruct.itemattr.dlot.lot = *(_DWORD *)v9;
      *(_QWORD *)(&kStruct.itemattr.qstitm + 2) = __PAIR__(v31, v30);
      v8 = 14;
      v12 = (Item *)operator new(0x78u);
      v49 = 20;
      if ( !v12 )
        goto LABEL_89;
      Item::Item(v12, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemCapsule::`vftable';
      goto LABEL_90;
    case 17:
      v32 = (Item *)operator new(0x78u);
      v12 = v32;
      v49 = 21;
      if ( !v32 )
        goto LABEL_89;
      Item::Item(v32, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemKQ::`vftable';
      goto LABEL_90;
    case 18:
      kStruct.itemattr.dlot.lot = *(_DWORD *)v9;
      v8 = 6;
      v12 = (Item *)operator new(0x78u);
      v49 = 22;
      if ( !v12 )
        goto LABEL_89;
      Item::Item(v12, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemHouseSkin::`vftable';
      goto LABEL_90;
    case 19:
      kStruct.itemattr.blot.lot = *v9;
      v8 = 3;
      v33 = (Item *)operator new(0x78u);
      v12 = v33;
      v49 = 23;
      if ( !v33 )
        goto LABEL_89;
      Item::Item(v33, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemUpRed::`vftable';
      goto LABEL_90;
    case 20:
      kStruct.itemattr.blot.lot = *v9;
      v8 = 3;
      v34 = (Item *)operator new(0x78u);
      v12 = v34;
      v49 = 24;
      if ( !v34 )
        goto LABEL_89;
      Item::Item(v34, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemUpBlue::`vftable';
      goto LABEL_90;
    case 21:
      kStruct.itemattr.wlot.lot = *(_WORD *)v9;
      v8 = 4;
      v12 = (Item *)operator new(0x78u);
      v49 = 25;
      if ( !v12 )
        goto LABEL_89;
      Item::Item(v12, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemKQStep::`vftable';
      goto LABEL_90;
    case 22:
      kStruct.itemattr.blot.lot = *v9;
      v8 = 3;
      v35 = (Item *)operator new(0x78u);
      v12 = v35;
      v49 = 26;
      if ( !v35 )
        goto LABEL_89;
      Item::Item(v35, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemFeed::`vftable';
      goto LABEL_90;
    case 23:
      v8 = ItemRiding::SetStructAttr(&kStruct, v9) + 2;
      v36 = (Item *)operator new(0x78u);
      v12 = v36;
      v49 = 27;
      if ( !v36 )
        goto LABEL_89;
      Item::Item(v36, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemRiding::`vftable';
      goto LABEL_90;
    case 24:
      kStruct.itemattr.dlot.lot = *(_DWORD *)v9;
      v8 = 6;
      v12 = (Item *)operator new(0x78u);
      v49 = 28;
      if ( !v12 )
        goto LABEL_89;
      Item::Item(v12, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemAmount::`vftable';
      goto LABEL_90;
    case 25:
      kStruct.itemattr.blot.lot = *v9;
      v8 = 3;
      v37 = (Item *)operator new(0x78u);
      v12 = v37;
      v49 = 29;
      if ( !v37 )
        goto LABEL_89;
      Item::Item(v37, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemUpGold::`vftable';
      goto LABEL_90;
    case 27:
      kStruct.itemattr.dlot.lot = *(_DWORD *)v9;
      v8 = 6;
      v38 = (Item *)operator new(0x78u);
      v12 = v38;
      v49 = 30;
      if ( !v38 )
        goto LABEL_89;
      Item::Item(v38, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemChargedAction::`vftable';
      goto LABEL_90;
    case 30:
      v39 = *(_DWORD *)(pbyBuff + 6);
      v40 = pbyBuff[10];
      kStruct.itemattr.dlot.lot = *(_DWORD *)v9;
      kStruct.itemattr.Capsule.content.dwrdkey[1] = v39;
      kStruct.itemattr.amulet.upgrade = v40;
      v8 = 11;
      v41 = (Item *)operator new(0x78u);
      v12 = v41;
      v49 = 31;
      if ( !v41 )
        goto LABEL_89;
      Item::Item(v41, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemCollectCloseCard::`vftable';
      goto LABEL_90;
    case 31:
      v42 = pbyBuff[6];
      kStruct.itemattr.dlot.lot = *(_DWORD *)v9;
      kStruct.itemattr.MobCard.Star = v42;
      v8 = 7;
      v43 = (Item *)operator new(0x78u);
      v12 = v43;
      v49 = 32;
      if ( !v43 )
        goto LABEL_89;
      Item::Item(v43, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemCollectOpenCard::`vftable';
      goto LABEL_90;
    case 33:
      kStruct.itemattr.blot.lot = *v9;
      v8 = 3;
      v44 = (Item *)operator new(0x78u);
      v12 = v44;
      v49 = 33;
      if ( !v44 )
        goto LABEL_89;
      Item::Item(v44, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemNoEffect::`vftable';
      goto LABEL_90;
    case 35:
      kStruct.itemattr.wlot.lot = *(_WORD *)v9;
      v8 = 4;
      v12 = (Item *)operator new(0x78u);
      v49 = 34;
      if ( !v12 )
        goto LABEL_89;
      Item::Item(v12, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemActiveskill::`vftable';
      goto LABEL_90;
    case 36:
      qmemcpy(&kStruct.itemattr, v9, 0x1Au);
      v8 = 28;
      v45 = (Item *)operator new(0x78u);
      v12 = v45;
      v49 = 35;
      if ( !v45 )
        goto LABEL_89;
      Item::Item(v45, &kStruct);
      v12->vfptr = (NiRefObjectVtbl *)&ItemPet::`vftable';
      goto LABEL_90;
    case 37:
      kStruct.itemattr.dlot.lot = *(_DWORD *)v9;
      v8 = 6;
      v46 = (Item *)operator new(0x7Cu);
      v49 = 36;
      if ( v46 )
      {
        Item::Item(v46, &kStruct);
        v46->vfptr = (NiRefObjectVtbl *)&ItemCostumeShield::`vftable';
        v18 = v46;
      }
      else
      {
LABEL_24:
        v18 = 0;
      }
LABEL_25:
      v49 = -1;
      v10 = v18;
      if ( v18 )
        ((void (*)(void))v18->vfptr[22].__vecDelDtor)();
      break;
    case 38:
      v8 = ItemBracelet::SetStructAttr(&kStruct, v9) + 2;
      v47 = (Item *)operator new(0x78u);
      v12 = v47;
      v49 = 37;
      if ( v47 )
      {
        Item::Item(v47, &kStruct);
        v12->vfptr = (NiRefObjectVtbl *)&ItemBracelet::`vftable';
      }
      else
      {
LABEL_89:
        v12 = 0;
      }
LABEL_90:
      v10 = v12;
      break;
    default:
      break;
  }
  if ( puiBuffSize )
    *puiBuffSize = v8;
  return v10;
}
// 9BB08C: using guessed type int (__thiscall *ItemByteLot::`vftable')(void *p, char);
// 9BB0DC: using guessed type int (__thiscall *ItemWordLot::`vftable')(void *p, char);
// 9BB12C: using guessed type int (__thiscall *ItemDwrdLot::`vftable')(void *p, char);
// 9BB17C: using guessed type int (__thiscall *ItemQuest::`vftable')(void *p, char);
// 9BB1CC: using guessed type int (__thiscall *ItemAmulet::`vftable')(void *p, char);
// 9BB21C: using guessed type int (__thiscall *ItemWeapon::`vftable')(void *p, char);
// 9BB274: using guessed type int (__thiscall *ItemCostumeWeapon::`vftable')(void *p, char);
// 9BB2D4: using guessed type int (__thiscall *ItemArmor::`vftable')(void *p, char);
// 9BB324: using guessed type int (__thiscall *ItemShield::`vftable')(void *p, char);
// 9BB374: using guessed type int (__thiscall *ItemCostumeShield::`vftable')(void *p, char);
// 9BB3D4: using guessed type int (__thiscall *ItemBoot::`vftable')(void *p, char);
// 9BB424: using guessed type int (__thiscall *ItemFurniture::`vftable')(void *p, char);
// 9BB474: using guessed type int (__thiscall *ItemDecoration::`vftable')(void *p, char);
// 9BB4C4: using guessed type int (__thiscall *ItemSkillScroll::`vftable')(void *p, char);
// 9BB514: using guessed type int (__thiscall *ItemRecallScroll::`vftable')(void *p, char);
// 9BB564: using guessed type int (__thiscall *ItemUpgradeSource::`vftable')(void *p, char);
// 9BB5B4: using guessed type int (__thiscall *ItemBind::`vftable')(void *p, char);
// 9BB604: using guessed type int (__thiscall *ItemChest::`vftable')(void *p, char);
// 9BB654: using guessed type int (__thiscall *ItemGBCoin::`vftable')(void *p, char);
// 9BB6A4: using guessed type int (__thiscall *ItemCapsule::`vftable')(void *p, char);
// 9BB6FC: using guessed type int (__thiscall *ItemEnchant::`vftable')(void *p, char);
// 9BB74C: using guessed type int (__thiscall *ItemWeaponTitleLicense::`vftable')(void *p, char);
// 9BB79C: using guessed type int (__thiscall *ItemKQ::`vftable')(void *p, char);
// 9BB7EC: using guessed type int (__thiscall *ItemHouseSkin::`vftable')(void *p, char);
// 9BB83C: using guessed type int (__thiscall *ItemUpRed::`vftable')(void *p, char);
// 9BB88C: using guessed type int (__thiscall *ItemUpBlue::`vftable')(void *p, char);
// 9BB8DC: using guessed type int (__thiscall *ItemKQStep::`vftable')(void *p, char);
// 9BB92C: using guessed type int (__thiscall *ItemFeed::`vftable')(void *p, char);
// 9BB97C: using guessed type int (__thiscall *ItemRiding::`vftable')(void *p, char);
// 9BB9CC: using guessed type int (__thiscall *ItemAmount::`vftable')(void *p, char);
// 9BBA1C: using guessed type int (__thiscall *ItemUpGold::`vftable')(void *p, char);
// 9BBA6C: using guessed type int (__thiscall *ItemChargedAction::`vftable')(void *p, char);
// 9BBABC: using guessed type int (__thiscall *ItemCollectCloseCard::`vftable')(void *p, char);
// 9BBB0C: using guessed type int (__thiscall *ItemCollectOpenCard::`vftable')(void *p, char);
// 9BBB5C: using guessed type int (__thiscall *ItemNoEffect::`vftable')(void *p, char);
// 9BBBAC: using guessed type int (__thiscall *ItemActiveskill::`vftable')(void *p, char);
// 9BBBFC: using guessed type int (__thiscall *ItemPet::`vftable')(void *p, char);
// 9BBC5C: using guessed type int (__thiscall *ItemBracelet::`vftable')(void *p, char);
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0066D440) --------------------------------------------------------
Item *__cdecl Item::Create(SHINE_ITEM_STRUCT *kStruct)
{
  int v1; // ebx@1
  Item *result; // eax@2
  int v3; // esi@3
  int v4; // edx@5
  int v5; // eax@6
  Item *v6; // esi@7
  Item *v7; // eax@8
  Item *v8; // esi@8
  Item *v9; // eax@10
  Item *v10; // esi@10
  Item *v11; // eax@12
  Item *v12; // esi@12
  Item *v13; // eax@14
  Item *v14; // esi@14
  Item *v15; // eax@16
  Item *v16; // esi@16
  Item *v17; // eax@18
  Item *v18; // esi@18
  Item *v19; // eax@20
  Item *v20; // esi@20
  Item *v21; // ecx@21
  Item *v22; // eax@25
  Item *v23; // esi@25
  Item *v24; // eax@27
  Item *v25; // esi@27
  Item *v26; // eax@29
  Item *v27; // esi@29
  Item *v28; // eax@31
  Item *v29; // esi@31
  Item *v30; // eax@33
  Item *v31; // esi@33
  Item *v32; // eax@35
  Item *v33; // esi@35
  Item *v34; // eax@37
  Item *v35; // esi@37
  Item *v36; // eax@39
  Item *v37; // esi@39
  Item *v38; // eax@41
  Item *v39; // esi@41
  Item *v40; // eax@43
  Item *v41; // esi@43
  Item *v42; // eax@45
  Item *v43; // esi@45
  Item *v44; // eax@47
  Item *v45; // esi@47
  Item *v46; // eax@49
  Item *v47; // esi@49
  Item *v48; // eax@51
  Item *v49; // esi@51
  Item *v50; // eax@53
  Item *v51; // esi@53
  Item *v52; // eax@55
  Item *v53; // esi@55
  Item *v54; // eax@57
  Item *v55; // esi@57
  Item *v56; // eax@59
  Item *v57; // esi@59
  Item *v58; // eax@61
  Item *v59; // esi@61
  Item *v60; // eax@63
  Item *v61; // esi@63
  Item *v62; // eax@65
  Item *v63; // esi@65
  Item *v64; // eax@67
  Item *v65; // esi@67
  Item *v66; // eax@69
  Item *v67; // esi@69
  Item *v68; // eax@71
  Item *v69; // esi@71
  Item *v70; // eax@73
  Item *v71; // esi@73
  Item *v72; // eax@75
  Item *v73; // esi@75
  Item *v74; // eax@77
  Item *v75; // esi@77
  Item *v76; // eax@79
  Item *v77; // esi@79
  Item *v78; // eax@81
  Item *v79; // esi@81
  Item *v80; // eax@83
  Item *v81; // esi@83
  Item *v82; // eax@85
  Item *v83; // esi@85

  v1 = kStruct->itemid;
  if ( (_WORD)v1 != -1
    && (v3 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
        (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                            + 16))(
                           ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                           kStruct->itemid))
    && (unsigned __int16)v1 <= *(_WORD *)(v3 + 200)
    && (v4 = *(_DWORD *)(v3 + 196), *(_DWORD *)(v4 + 4 * v1))
    && (v5 = *(_DWORD *)(v4 + 4 * v1)) != 0 )
  {
    v6 = 0;
    switch ( *(_DWORD *)(v5 + 102) )
    {
      case 0:
        v7 = (Item *)operator new(0x78u);
        v8 = v7;
        if ( !v7 )
          goto LABEL_87;
        Item::Item(v7, kStruct);
        v8->vfptr = (NiRefObjectVtbl *)&ItemByteLot::`vftable';
        return v8;
      case 1:
        v9 = (Item *)operator new(0x78u);
        v10 = v9;
        if ( !v9 )
          goto LABEL_87;
        Item::Item(v9, kStruct);
        v10->vfptr = (NiRefObjectVtbl *)&ItemWordLot::`vftable';
        return v10;
      case 2:
        v11 = (Item *)operator new(0x78u);
        v12 = v11;
        if ( !v11 )
          goto LABEL_87;
        Item::Item(v11, kStruct);
        v12->vfptr = (NiRefObjectVtbl *)&ItemDwrdLot::`vftable';
        return v12;
      case 3:
        v13 = (Item *)operator new(0x78u);
        v14 = v13;
        if ( !v13 )
          goto LABEL_87;
        Item::Item(v13, kStruct);
        v14->vfptr = (NiRefObjectVtbl *)&ItemQuest::`vftable';
        return v14;
      case 4:
        v15 = (Item *)operator new(0x78u);
        v16 = v15;
        if ( !v15 )
          goto LABEL_87;
        Item::Item(v15, kStruct);
        v16->vfptr = (NiRefObjectVtbl *)&ItemAmulet::`vftable';
        return v16;
      case 5:
        v17 = (Item *)operator new(0x78u);
        v18 = v17;
        if ( !v17 )
          goto LABEL_87;
        Item::Item(v17, kStruct);
        v18->vfptr = (NiRefObjectVtbl *)&ItemWeapon::`vftable';
        return v18;
      case 0x1A:
        v19 = (Item *)operator new(0x7Cu);
        v20 = v19;
        if ( !v19 )
          goto LABEL_22;
        Item::Item(v19, kStruct);
        v20->vfptr = (NiRefObjectVtbl *)&ItemCostumeWeapon::`vftable';
        v21 = v20;
        goto LABEL_23;
      case 6:
        v22 = (Item *)operator new(0x78u);
        v23 = v22;
        if ( !v22 )
          goto LABEL_87;
        Item::Item(v22, kStruct);
        v23->vfptr = (NiRefObjectVtbl *)&ItemArmor::`vftable';
        return v23;
      case 7:
        v24 = (Item *)operator new(0x78u);
        v25 = v24;
        if ( !v24 )
          goto LABEL_87;
        Item::Item(v24, kStruct);
        v25->vfptr = (NiRefObjectVtbl *)&ItemShield::`vftable';
        return v25;
      case 8:
        v26 = (Item *)operator new(0x78u);
        v27 = v26;
        if ( !v26 )
          goto LABEL_87;
        Item::Item(v26, kStruct);
        v27->vfptr = (NiRefObjectVtbl *)&ItemBoot::`vftable';
        return v27;
      case 9:
        v28 = (Item *)operator new(0x78u);
        v29 = v28;
        if ( !v28 )
          goto LABEL_87;
        Item::Item(v28, kStruct);
        v29->vfptr = (NiRefObjectVtbl *)&ItemFurniture::`vftable';
        return v29;
      case 0xA:
        v30 = (Item *)operator new(0x78u);
        v31 = v30;
        if ( !v30 )
          goto LABEL_87;
        Item::Item(v30, kStruct);
        v31->vfptr = (NiRefObjectVtbl *)&ItemDecoration::`vftable';
        return v31;
      case 0xB:
        v32 = (Item *)operator new(0x78u);
        v33 = v32;
        if ( !v32 )
          goto LABEL_87;
        Item::Item(v32, kStruct);
        v33->vfptr = (NiRefObjectVtbl *)&ItemSkillScroll::`vftable';
        return v33;
      case 0xC:
        v34 = (Item *)operator new(0x78u);
        v35 = v34;
        if ( !v34 )
          goto LABEL_87;
        Item::Item(v34, kStruct);
        v35->vfptr = (NiRefObjectVtbl *)&ItemRecallScroll::`vftable';
        return v35;
      case 0xE:
        v36 = (Item *)operator new(0x78u);
        v37 = v36;
        if ( !v36 )
          goto LABEL_87;
        Item::Item(v36, kStruct);
        v37->vfptr = (NiRefObjectVtbl *)&ItemUpgradeSource::`vftable';
        return v37;
      case 0xD:
        v38 = (Item *)operator new(0x78u);
        v39 = v38;
        if ( !v38 )
          goto LABEL_87;
        Item::Item(v38, kStruct);
        v39->vfptr = (NiRefObjectVtbl *)&ItemBind::`vftable';
        return v39;
      case 0xF:
        v40 = (Item *)operator new(0x78u);
        v41 = v40;
        if ( !v40 )
          goto LABEL_87;
        Item::Item(v40, kStruct);
        v41->vfptr = (NiRefObjectVtbl *)&ItemChest::`vftable';
        return v41;
      case 0x22:
        v42 = (Item *)operator new(0x78u);
        v43 = v42;
        if ( !v42 )
          goto LABEL_87;
        Item::Item(v42, kStruct);
        v43->vfptr = (NiRefObjectVtbl *)&ItemEnchant::`vftable';
        return v43;
      case 0x10:
        v44 = (Item *)operator new(0x78u);
        v45 = v44;
        if ( !v44 )
          goto LABEL_87;
        Item::Item(v44, kStruct);
        v45->vfptr = (NiRefObjectVtbl *)&ItemWeaponTitleLicense::`vftable';
        return v45;
      case 0x1C:
        v46 = (Item *)operator new(0x78u);
        v47 = v46;
        if ( !v46 )
          goto LABEL_87;
        Item::Item(v46, kStruct);
        v47->vfptr = (NiRefObjectVtbl *)&ItemGBCoin::`vftable';
        return v47;
      case 0x1D:
        v48 = (Item *)operator new(0x78u);
        v49 = v48;
        if ( !v48 )
          goto LABEL_87;
        Item::Item(v48, kStruct);
        v49->vfptr = (NiRefObjectVtbl *)&ItemCapsule::`vftable';
        return v49;
      case 0x11:
        v50 = (Item *)operator new(0x78u);
        v51 = v50;
        if ( !v50 )
          goto LABEL_87;
        Item::Item(v50, kStruct);
        v51->vfptr = (NiRefObjectVtbl *)&ItemKQ::`vftable';
        return v51;
      case 0x12:
        v52 = (Item *)operator new(0x78u);
        v53 = v52;
        if ( !v52 )
          goto LABEL_87;
        Item::Item(v52, kStruct);
        v53->vfptr = (NiRefObjectVtbl *)&ItemHouseSkin::`vftable';
        return v53;
      case 0x13:
        v54 = (Item *)operator new(0x78u);
        v55 = v54;
        if ( !v54 )
          goto LABEL_87;
        Item::Item(v54, kStruct);
        v55->vfptr = (NiRefObjectVtbl *)&ItemUpRed::`vftable';
        return v55;
      case 0x14:
        v56 = (Item *)operator new(0x78u);
        v57 = v56;
        if ( !v56 )
          goto LABEL_87;
        Item::Item(v56, kStruct);
        v57->vfptr = (NiRefObjectVtbl *)&ItemUpBlue::`vftable';
        return v57;
      case 0x15:
        v58 = (Item *)operator new(0x78u);
        v59 = v58;
        if ( !v58 )
          goto LABEL_87;
        Item::Item(v58, kStruct);
        v59->vfptr = (NiRefObjectVtbl *)&ItemKQStep::`vftable';
        return v59;
      case 0x16:
        v60 = (Item *)operator new(0x78u);
        v61 = v60;
        if ( !v60 )
          goto LABEL_87;
        Item::Item(v60, kStruct);
        v61->vfptr = (NiRefObjectVtbl *)&ItemFeed::`vftable';
        return v61;
      case 0x17:
        v62 = (Item *)operator new(0x78u);
        v63 = v62;
        if ( !v62 )
          goto LABEL_87;
        Item::Item(v62, kStruct);
        v63->vfptr = (NiRefObjectVtbl *)&ItemRiding::`vftable';
        return v63;
      case 0x18:
        v64 = (Item *)operator new(0x78u);
        v65 = v64;
        if ( !v64 )
          goto LABEL_87;
        Item::Item(v64, kStruct);
        v65->vfptr = (NiRefObjectVtbl *)&ItemAmount::`vftable';
        return v65;
      case 0x19:
        v66 = (Item *)operator new(0x78u);
        v67 = v66;
        if ( !v66 )
          goto LABEL_87;
        Item::Item(v66, kStruct);
        v67->vfptr = (NiRefObjectVtbl *)&ItemUpGold::`vftable';
        return v67;
      case 0x1B:
        v68 = (Item *)operator new(0x78u);
        v69 = v68;
        if ( !v68 )
          goto LABEL_87;
        Item::Item(v68, kStruct);
        v69->vfptr = (NiRefObjectVtbl *)&ItemChargedAction::`vftable';
        return v69;
      case 0x1E:
        v70 = (Item *)operator new(0x78u);
        v71 = v70;
        if ( !v70 )
          goto LABEL_87;
        Item::Item(v70, kStruct);
        v71->vfptr = (NiRefObjectVtbl *)&ItemCollectCloseCard::`vftable';
        return v71;
      case 0x1F:
        v72 = (Item *)operator new(0x78u);
        v73 = v72;
        if ( !v72 )
          goto LABEL_87;
        Item::Item(v72, kStruct);
        v73->vfptr = (NiRefObjectVtbl *)&ItemCollectOpenCard::`vftable';
        return v73;
      case 0x21:
        v74 = (Item *)operator new(0x78u);
        v75 = v74;
        if ( !v74 )
          goto LABEL_87;
        Item::Item(v74, kStruct);
        v75->vfptr = (NiRefObjectVtbl *)&ItemNoEffect::`vftable';
        return v75;
      case 0x23:
        v76 = (Item *)operator new(0x78u);
        v77 = v76;
        if ( !v76 )
          goto LABEL_87;
        Item::Item(v76, kStruct);
        v77->vfptr = (NiRefObjectVtbl *)&ItemActiveskill::`vftable';
        return v77;
      case 0x24:
        v78 = (Item *)operator new(0x78u);
        v79 = v78;
        if ( !v78 )
          goto LABEL_87;
        Item::Item(v78, kStruct);
        v79->vfptr = (NiRefObjectVtbl *)&ItemPet::`vftable';
        return v79;
      case 0x25:
        v80 = (Item *)operator new(0x7Cu);
        v81 = v80;
        if ( v80 )
        {
          Item::Item(v80, kStruct);
          v81->vfptr = (NiRefObjectVtbl *)&ItemCostumeShield::`vftable';
          v21 = v81;
        }
        else
        {
LABEL_22:
          v21 = 0;
        }
LABEL_23:
        v6 = v21;
        if ( !v21 )
          goto LABEL_88;
        ((void (*)(void))v21->vfptr[22].__vecDelDtor)();
        return v6;
      case 0x26:
        v82 = (Item *)operator new(0x78u);
        v83 = v82;
        if ( v82 )
        {
          Item::Item(v82, kStruct);
          v83->vfptr = (NiRefObjectVtbl *)&ItemBracelet::`vftable';
          result = v83;
        }
        else
        {
LABEL_87:
          v6 = 0;
LABEL_88:
          result = v6;
        }
        break;
      default:
        goto LABEL_88;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9BB08C: using guessed type int (__thiscall *ItemByteLot::`vftable')(void *p, char);
// 9BB0DC: using guessed type int (__thiscall *ItemWordLot::`vftable')(void *p, char);
// 9BB12C: using guessed type int (__thiscall *ItemDwrdLot::`vftable')(void *p, char);
// 9BB17C: using guessed type int (__thiscall *ItemQuest::`vftable')(void *p, char);
// 9BB1CC: using guessed type int (__thiscall *ItemAmulet::`vftable')(void *p, char);
// 9BB21C: using guessed type int (__thiscall *ItemWeapon::`vftable')(void *p, char);
// 9BB274: using guessed type int (__thiscall *ItemCostumeWeapon::`vftable')(void *p, char);
// 9BB2D4: using guessed type int (__thiscall *ItemArmor::`vftable')(void *p, char);
// 9BB324: using guessed type int (__thiscall *ItemShield::`vftable')(void *p, char);
// 9BB374: using guessed type int (__thiscall *ItemCostumeShield::`vftable')(void *p, char);
// 9BB3D4: using guessed type int (__thiscall *ItemBoot::`vftable')(void *p, char);
// 9BB424: using guessed type int (__thiscall *ItemFurniture::`vftable')(void *p, char);
// 9BB474: using guessed type int (__thiscall *ItemDecoration::`vftable')(void *p, char);
// 9BB4C4: using guessed type int (__thiscall *ItemSkillScroll::`vftable')(void *p, char);
// 9BB514: using guessed type int (__thiscall *ItemRecallScroll::`vftable')(void *p, char);
// 9BB564: using guessed type int (__thiscall *ItemUpgradeSource::`vftable')(void *p, char);
// 9BB5B4: using guessed type int (__thiscall *ItemBind::`vftable')(void *p, char);
// 9BB604: using guessed type int (__thiscall *ItemChest::`vftable')(void *p, char);
// 9BB654: using guessed type int (__thiscall *ItemGBCoin::`vftable')(void *p, char);
// 9BB6A4: using guessed type int (__thiscall *ItemCapsule::`vftable')(void *p, char);
// 9BB6FC: using guessed type int (__thiscall *ItemEnchant::`vftable')(void *p, char);
// 9BB74C: using guessed type int (__thiscall *ItemWeaponTitleLicense::`vftable')(void *p, char);
// 9BB79C: using guessed type int (__thiscall *ItemKQ::`vftable')(void *p, char);
// 9BB7EC: using guessed type int (__thiscall *ItemHouseSkin::`vftable')(void *p, char);
// 9BB83C: using guessed type int (__thiscall *ItemUpRed::`vftable')(void *p, char);
// 9BB88C: using guessed type int (__thiscall *ItemUpBlue::`vftable')(void *p, char);
// 9BB8DC: using guessed type int (__thiscall *ItemKQStep::`vftable')(void *p, char);
// 9BB92C: using guessed type int (__thiscall *ItemFeed::`vftable')(void *p, char);
// 9BB97C: using guessed type int (__thiscall *ItemRiding::`vftable')(void *p, char);
// 9BB9CC: using guessed type int (__thiscall *ItemAmount::`vftable')(void *p, char);
// 9BBA1C: using guessed type int (__thiscall *ItemUpGold::`vftable')(void *p, char);
// 9BBA6C: using guessed type int (__thiscall *ItemChargedAction::`vftable')(void *p, char);
// 9BBABC: using guessed type int (__thiscall *ItemCollectCloseCard::`vftable')(void *p, char);
// 9BBB0C: using guessed type int (__thiscall *ItemCollectOpenCard::`vftable')(void *p, char);
// 9BBB5C: using guessed type int (__thiscall *ItemNoEffect::`vftable')(void *p, char);
// 9BBBAC: using guessed type int (__thiscall *ItemActiveskill::`vftable')(void *p, char);
// 9BBBFC: using guessed type int (__thiscall *ItemPet::`vftable')(void *p, char);
// 9BBC5C: using guessed type int (__thiscall *ItemBracelet::`vftable')(void *p, char);
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0066DF10) --------------------------------------------------------
Item *__cdecl Item::Create(char *pbyBuff, ITEM_INVEN *kInven, unsigned int *puiBuffSize)
{
  int v3; // eax@1
  Item *result; // eax@4
  int v5; // edi@5
  int v6; // ebx@5
  int v7; // ecx@7
  int v8; // eax@8
  int v9; // eax@12
  Item *v10; // edi@12
  int v11; // ebx@12
  Item *v12; // eax@13
  Item *v13; // esi@13
  Item *v14; // esi@16
  Item *v15; // eax@18
  Item *v16; // esi@18
  Item *v17; // eax@20
  Item *v18; // esi@20
  Item *v19; // esi@22
  Item *v20; // eax@24
  Item *v21; // esi@24
  Item *v22; // eax@26
  Item *v23; // esi@26
  Item *v24; // ecx@27
  Item *v25; // eax@31
  Item *v26; // esi@31
  Item *v27; // eax@33
  Item *v28; // esi@33
  Item *v29; // esi@35
  Item *v30; // eax@37
  Item *v31; // esi@37
  unsigned int v32; // eax@39
  Item *v33; // eax@39
  Item *v34; // esi@39
  Item *v35; // eax@41
  Item *v36; // esi@41
  Item *v37; // eax@43
  Item *v38; // esi@43
  Item *v39; // esi@45
  Item *v40; // eax@47
  Item *v41; // esi@47
  Item *v42; // eax@49
  Item *v43; // esi@49
  Item *v44; // esi@51
  Item *v45; // eax@53
  Item *v46; // esi@53
  Item *v47; // eax@55
  Item *v48; // esi@55
  unsigned int v49; // ecx@57
  unsigned int v50; // edx@57
  Item *v51; // esi@57
  Item *v52; // eax@59
  Item *v53; // esi@59
  Item *v54; // esi@61
  Item *v55; // eax@63
  Item *v56; // esi@63
  Item *v57; // eax@65
  Item *v58; // esi@65
  Item *v59; // esi@67
  Item *v60; // eax@69
  Item *v61; // esi@69
  Item *v62; // eax@71
  Item *v63; // esi@71
  Item *v64; // esi@73
  Item *v65; // eax@75
  Item *v66; // esi@75
  Item *v67; // eax@77
  Item *v68; // esi@77
  unsigned int v69; // eax@79
  char v70; // cl@79
  Item *v71; // eax@79
  Item *v72; // esi@79
  char v73; // cl@81
  Item *v74; // eax@81
  Item *v75; // esi@81
  Item *v76; // eax@83
  Item *v77; // esi@83
  Item *v78; // esi@85
  Item *v79; // eax@87
  Item *v80; // esi@87
  Item *v81; // esi@89
  Item *v82; // eax@91
  Item *v83; // esi@91
  SHINE_ITEM_STRUCT kStruct; // [sp+18h] [bp-78h]@12
  int v85; // [sp+8Ch] [bp-4h]@13

  kInven->Inven = *(unsigned __int16 *)(pbyBuff + 1);
  v3 = *(_WORD *)(pbyBuff + 3);
  if ( (_WORD)v3 == -1 )
  {
    if ( puiBuffSize )
      *puiBuffSize = 5;
    result = 0;
  }
  else
  {
    v5 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    v6 = *(_WORD *)(pbyBuff + 3);
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v3)
      && (unsigned __int16)v6 <= *(_WORD *)(v5 + 200)
      && (v7 = *(_DWORD *)(v5 + 196), *(_DWORD *)(v7 + 4 * v6))
      && (v8 = *(_DWORD *)(v7 + 4 * v6)) != 0 )
    {
      v9 = *(_DWORD *)(v8 + 102);
      v10 = 0;
      v11 = 0;
      kStruct.itemid = *(_WORD *)(pbyBuff + 3);
      switch ( v9 )
      {
        case 0:
          kStruct.itemattr.blot.lot = pbyBuff[5];
          v11 = 1;
          v12 = (Item *)operator new(0x78u);
          v13 = v12;
          v85 = 0;
          if ( !v12 )
            goto LABEL_15;
          Item::Item(v12, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemByteLot::`vftable';
          v10 = v13;
          break;
        case 1:
          kStruct.itemattr.wlot.lot = *(_WORD *)(pbyBuff + 5);
          v11 = 2;
          v14 = (Item *)operator new(0x78u);
          v85 = 1;
          if ( !v14 )
            goto LABEL_15;
          Item::Item(v14, &kStruct);
          v14->vfptr = (NiRefObjectVtbl *)&ItemWordLot::`vftable';
          v10 = v14;
          break;
        case 2:
          kStruct.itemattr.dlot.lot = *(_DWORD *)(pbyBuff + 5);
          v11 = 4;
          v15 = (Item *)operator new(0x78u);
          v16 = v15;
          v85 = 2;
          if ( !v15 )
            goto LABEL_15;
          Item::Item(v15, &kStruct);
          v16->vfptr = (NiRefObjectVtbl *)&ItemDwrdLot::`vftable';
          v10 = v16;
          break;
        case 3:
          kStruct.itemattr.wlot.lot = *(_WORD *)(pbyBuff + 5);
          v11 = 2;
          v17 = (Item *)operator new(0x78u);
          v18 = v17;
          v85 = 3;
          if ( !v17 )
            goto LABEL_15;
          Item::Item(v17, &kStruct);
          v18->vfptr = (NiRefObjectVtbl *)&ItemQuest::`vftable';
          v10 = v18;
          break;
        case 4:
          v11 = ItemAmulet::SetStructAttr(&kStruct, pbyBuff + 5);
          v19 = (Item *)operator new(0x78u);
          v85 = 4;
          if ( !v19 )
            goto LABEL_15;
          Item::Item(v19, &kStruct);
          v19->vfptr = (NiRefObjectVtbl *)&ItemAmulet::`vftable';
          v10 = v19;
          break;
        case 5:
          v11 = ItemWeapon::SetStructAttr(&kStruct, pbyBuff + 5);
          v20 = (Item *)operator new(0x78u);
          v21 = v20;
          v85 = 5;
          if ( !v20 )
            goto LABEL_15;
          Item::Item(v20, &kStruct);
          v21->vfptr = (NiRefObjectVtbl *)&ItemWeapon::`vftable';
          v10 = v21;
          break;
        case 26:
          kStruct.itemattr.dlot.lot = *(_DWORD *)(pbyBuff + 5);
          v11 = 4;
          v22 = (Item *)operator new(0x7Cu);
          v23 = v22;
          v85 = 6;
          if ( !v22 )
            goto LABEL_28;
          Item::Item(v22, &kStruct);
          v23->vfptr = (NiRefObjectVtbl *)&ItemCostumeWeapon::`vftable';
          v24 = v23;
          goto LABEL_29;
        case 6:
          v11 = ItemBracelet::SetStructAttr(&kStruct, pbyBuff + 5);
          v25 = (Item *)operator new(0x78u);
          v26 = v25;
          v85 = 7;
          if ( !v25 )
            goto LABEL_15;
          Item::Item(v25, &kStruct);
          v26->vfptr = (NiRefObjectVtbl *)&ItemArmor::`vftable';
          v10 = v26;
          break;
        case 7:
          v11 = ItemBracelet::SetStructAttr(&kStruct, pbyBuff + 5);
          v27 = (Item *)operator new(0x78u);
          v28 = v27;
          v85 = 8;
          if ( !v27 )
            goto LABEL_15;
          Item::Item(v27, &kStruct);
          v28->vfptr = (NiRefObjectVtbl *)&ItemShield::`vftable';
          v10 = v28;
          break;
        case 8:
          v11 = ItemBracelet::SetStructAttr(&kStruct, pbyBuff + 5);
          v29 = (Item *)operator new(0x78u);
          v85 = 9;
          if ( !v29 )
            goto LABEL_15;
          Item::Item(v29, &kStruct);
          v29->vfptr = (NiRefObjectVtbl *)&ItemBoot::`vftable';
          v10 = v29;
          break;
        case 9:
          qmemcpy(&kStruct.itemattr, pbyBuff + 5, 0x24u);
          v11 = 36;
          v30 = (Item *)operator new(0x78u);
          v31 = v30;
          v85 = 10;
          if ( !v30 )
            goto LABEL_15;
          Item::Item(v30, &kStruct);
          v31->vfptr = (NiRefObjectVtbl *)&ItemFurniture::`vftable';
          v10 = v31;
          break;
        case 10:
          v32 = *(_DWORD *)(pbyBuff + 9);
          kStruct.itemattr.dlot.lot = *(_DWORD *)(pbyBuff + 5);
          kStruct.itemattr.Capsule.content.dwrdkey[1] = v32;
          v11 = 8;
          v33 = (Item *)operator new(0x78u);
          v34 = v33;
          v85 = 11;
          if ( !v33 )
            goto LABEL_15;
          Item::Item(v33, &kStruct);
          v34->vfptr = (NiRefObjectVtbl *)&ItemDecoration::`vftable';
          v10 = v34;
          break;
        case 11:
          v11 = 1;
          v35 = (Item *)operator new(0x78u);
          v36 = v35;
          v85 = 12;
          if ( !v35 )
            goto LABEL_15;
          Item::Item(v35, &kStruct);
          v36->vfptr = (NiRefObjectVtbl *)&ItemSkillScroll::`vftable';
          v10 = v36;
          break;
        case 12:
          kStruct.itemattr.blot.lot = pbyBuff[5];
          v11 = 1;
          v37 = (Item *)operator new(0x78u);
          v38 = v37;
          v85 = 13;
          if ( !v37 )
            goto LABEL_15;
          Item::Item(v37, &kStruct);
          v38->vfptr = (NiRefObjectVtbl *)&ItemRecallScroll::`vftable';
          v10 = v38;
          break;
        case 14:
          kStruct.itemattr.blot.lot = pbyBuff[5];
          v11 = 1;
          v39 = (Item *)operator new(0x78u);
          v85 = 14;
          if ( !v39 )
            goto LABEL_15;
          Item::Item(v39, &kStruct);
          v39->vfptr = (NiRefObjectVtbl *)&ItemUpgradeSource::`vftable';
          v10 = v39;
          break;
        case 13:
          kStruct.itemattr.blot.lot = pbyBuff[5];
          memcpy(&kStruct.itemattr.weapon.strengthen, pbyBuff + 6, 10 * (unsigned __int8)kStruct.itemattr.blot.lot);
          v11 = 10 * (unsigned __int8)kStruct.itemattr.blot.lot + 1;
          v40 = (Item *)operator new(0x78u);
          v41 = v40;
          v85 = 15;
          if ( !v40 )
            goto LABEL_15;
          Item::Item(v40, &kStruct);
          v41->vfptr = (NiRefObjectVtbl *)&ItemBind::`vftable';
          v10 = v41;
          break;
        case 15:
          v11 = ItemChest::SetStructAttr(&kStruct, pbyBuff + 5);
          v42 = (Item *)operator new(0x78u);
          v43 = v42;
          v85 = 16;
          if ( !v42 )
            goto LABEL_15;
          Item::Item(v42, &kStruct);
          v43->vfptr = (NiRefObjectVtbl *)&ItemChest::`vftable';
          v10 = v43;
          break;
        case 34:
          kStruct.itemattr.blot.lot = pbyBuff[5];
          v11 = 1;
          v44 = (Item *)operator new(0x78u);
          v85 = 17;
          if ( !v44 )
            goto LABEL_15;
          Item::Item(v44, &kStruct);
          v44->vfptr = (NiRefObjectVtbl *)&ItemEnchant::`vftable';
          v10 = v44;
          break;
        case 16:
          v11 = 1;
          v45 = (Item *)operator new(0x78u);
          v46 = v45;
          v85 = 18;
          if ( !v45 )
            goto LABEL_15;
          Item::Item(v45, &kStruct);
          v46->vfptr = (NiRefObjectVtbl *)&ItemWeaponTitleLicense::`vftable';
          v10 = v46;
          break;
        case 28:
          v11 = 1;
          v47 = (Item *)operator new(0x78u);
          v48 = v47;
          v85 = 19;
          if ( !v47 )
            goto LABEL_15;
          Item::Item(v47, &kStruct);
          v48->vfptr = (NiRefObjectVtbl *)&ItemGBCoin::`vftable';
          v10 = v48;
          break;
        case 29:
          v49 = *(_DWORD *)(pbyBuff + 9);
          v50 = *(_DWORD *)(pbyBuff + 13);
          kStruct.itemattr.dlot.lot = *(_DWORD *)(pbyBuff + 5);
          *(_QWORD *)(&kStruct.itemattr.qstitm + 2) = __PAIR__(v50, v49);
          v11 = 12;
          v51 = (Item *)operator new(0x78u);
          v85 = 20;
          if ( !v51 )
            goto LABEL_15;
          Item::Item(v51, &kStruct);
          v51->vfptr = (NiRefObjectVtbl *)&ItemCapsule::`vftable';
          v10 = v51;
          break;
        case 17:
          v52 = (Item *)operator new(0x78u);
          v53 = v52;
          v85 = 21;
          if ( !v52 )
            goto LABEL_15;
          Item::Item(v52, &kStruct);
          v53->vfptr = (NiRefObjectVtbl *)&ItemKQ::`vftable';
          v10 = v53;
          break;
        case 18:
          kStruct.itemattr.dlot.lot = *(_DWORD *)(pbyBuff + 5);
          v11 = 4;
          v54 = (Item *)operator new(0x78u);
          v85 = 22;
          if ( !v54 )
            goto LABEL_15;
          Item::Item(v54, &kStruct);
          v54->vfptr = (NiRefObjectVtbl *)&ItemHouseSkin::`vftable';
          v10 = v54;
          break;
        case 19:
          kStruct.itemattr.blot.lot = pbyBuff[5];
          v11 = 1;
          v55 = (Item *)operator new(0x78u);
          v56 = v55;
          v85 = 23;
          if ( !v55 )
            goto LABEL_15;
          Item::Item(v55, &kStruct);
          v56->vfptr = (NiRefObjectVtbl *)&ItemUpRed::`vftable';
          v10 = v56;
          break;
        case 20:
          kStruct.itemattr.blot.lot = pbyBuff[5];
          v11 = 1;
          v57 = (Item *)operator new(0x78u);
          v58 = v57;
          v85 = 24;
          if ( !v57 )
            goto LABEL_15;
          Item::Item(v57, &kStruct);
          v58->vfptr = (NiRefObjectVtbl *)&ItemUpBlue::`vftable';
          v10 = v58;
          break;
        case 21:
          kStruct.itemattr.wlot.lot = *(_WORD *)(pbyBuff + 5);
          v11 = 2;
          v59 = (Item *)operator new(0x78u);
          v85 = 25;
          if ( !v59 )
            goto LABEL_15;
          Item::Item(v59, &kStruct);
          v59->vfptr = (NiRefObjectVtbl *)&ItemKQStep::`vftable';
          v10 = v59;
          break;
        case 22:
          kStruct.itemattr.blot.lot = pbyBuff[5];
          v11 = 1;
          v60 = (Item *)operator new(0x78u);
          v61 = v60;
          v85 = 26;
          if ( !v60 )
            goto LABEL_15;
          Item::Item(v60, &kStruct);
          v61->vfptr = (NiRefObjectVtbl *)&ItemFeed::`vftable';
          v10 = v61;
          break;
        case 23:
          v11 = ItemRiding::SetStructAttr(&kStruct, pbyBuff + 5);
          v62 = (Item *)operator new(0x78u);
          v63 = v62;
          v85 = 27;
          if ( !v62 )
            goto LABEL_15;
          Item::Item(v62, &kStruct);
          v63->vfptr = (NiRefObjectVtbl *)&ItemRiding::`vftable';
          v10 = v63;
          break;
        case 24:
          kStruct.itemattr.dlot.lot = *(_DWORD *)(pbyBuff + 5);
          v11 = 4;
          v64 = (Item *)operator new(0x78u);
          v85 = 28;
          if ( !v64 )
            goto LABEL_15;
          Item::Item(v64, &kStruct);
          v64->vfptr = (NiRefObjectVtbl *)&ItemAmount::`vftable';
          v10 = v64;
          break;
        case 25:
          kStruct.itemattr.blot.lot = pbyBuff[5];
          v11 = 1;
          v65 = (Item *)operator new(0x78u);
          v66 = v65;
          v85 = 29;
          if ( !v65 )
            goto LABEL_15;
          Item::Item(v65, &kStruct);
          v66->vfptr = (NiRefObjectVtbl *)&ItemUpGold::`vftable';
          v10 = v66;
          break;
        case 27:
          kStruct.itemattr.dlot.lot = *(_DWORD *)(pbyBuff + 5);
          v11 = 4;
          v67 = (Item *)operator new(0x78u);
          v68 = v67;
          v85 = 30;
          if ( !v67 )
            goto LABEL_15;
          Item::Item(v67, &kStruct);
          v68->vfptr = (NiRefObjectVtbl *)&ItemChargedAction::`vftable';
          v10 = v68;
          break;
        case 30:
          v69 = *(_DWORD *)(pbyBuff + 9);
          v70 = pbyBuff[13];
          kStruct.itemattr.dlot.lot = *(_DWORD *)(pbyBuff + 5);
          kStruct.itemattr.Capsule.content.dwrdkey[1] = v69;
          kStruct.itemattr.amulet.upgrade = v70;
          v11 = 9;
          v71 = (Item *)operator new(0x78u);
          v72 = v71;
          v85 = 31;
          if ( !v71 )
            goto LABEL_15;
          Item::Item(v71, &kStruct);
          v72->vfptr = (NiRefObjectVtbl *)&ItemCollectCloseCard::`vftable';
          v10 = v72;
          break;
        case 31:
          v73 = pbyBuff[9];
          kStruct.itemattr.dlot.lot = *(_DWORD *)(pbyBuff + 5);
          kStruct.itemattr.MobCard.Star = v73;
          v11 = 5;
          v74 = (Item *)operator new(0x78u);
          v75 = v74;
          v85 = 32;
          if ( !v74 )
            goto LABEL_15;
          Item::Item(v74, &kStruct);
          v75->vfptr = (NiRefObjectVtbl *)&ItemCollectOpenCard::`vftable';
          v10 = v75;
          break;
        case 33:
          kStruct.itemattr.blot.lot = pbyBuff[5];
          v11 = 1;
          v76 = (Item *)operator new(0x78u);
          v77 = v76;
          v85 = 33;
          if ( !v76 )
            goto LABEL_15;
          Item::Item(v76, &kStruct);
          v77->vfptr = (NiRefObjectVtbl *)&ItemNoEffect::`vftable';
          v10 = v77;
          break;
        case 35:
          kStruct.itemattr.wlot.lot = *(_WORD *)(pbyBuff + 5);
          v11 = 2;
          v78 = (Item *)operator new(0x78u);
          v85 = 34;
          if ( !v78 )
            goto LABEL_15;
          Item::Item(v78, &kStruct);
          v78->vfptr = (NiRefObjectVtbl *)&ItemActiveskill::`vftable';
          v10 = v78;
          break;
        case 36:
          qmemcpy(&kStruct.itemattr, pbyBuff + 5, 0x1Au);
          v11 = 26;
          v79 = (Item *)operator new(0x78u);
          v80 = v79;
          v85 = 35;
          if ( !v79 )
            goto LABEL_15;
          Item::Item(v79, &kStruct);
          v80->vfptr = (NiRefObjectVtbl *)&ItemPet::`vftable';
          v10 = v80;
          break;
        case 37:
          kStruct.itemattr.dlot.lot = *(_DWORD *)(pbyBuff + 5);
          v11 = 4;
          v81 = (Item *)operator new(0x7Cu);
          v85 = 36;
          if ( v81 )
          {
            Item::Item(v81, &kStruct);
            v81->vfptr = (NiRefObjectVtbl *)&ItemCostumeShield::`vftable';
            v24 = v81;
          }
          else
          {
LABEL_28:
            v24 = 0;
          }
LABEL_29:
          v85 = -1;
          v10 = v24;
          if ( v24 )
            ((void (*)(void))v24->vfptr[22].__vecDelDtor)();
          break;
        case 38:
          v11 = ItemBracelet::SetStructAttr(&kStruct, pbyBuff + 5);
          v82 = (Item *)operator new(0x78u);
          v83 = v82;
          v85 = 37;
          if ( v82 )
          {
            Item::Item(v82, &kStruct);
            v83->vfptr = (NiRefObjectVtbl *)&ItemBracelet::`vftable';
            v10 = v83;
          }
          else
          {
LABEL_15:
            v10 = 0;
          }
          break;
        default:
          v11 = (unsigned __int8)*pbyBuff;
          break;
      }
      if ( puiBuffSize )
        *puiBuffSize = v11 + 5;
      result = v10;
    }
    else
    {
      if ( puiBuffSize )
        *puiBuffSize = 5;
      result = 0;
    }
  }
  return result;
}
// 9BB08C: using guessed type int (__thiscall *ItemByteLot::`vftable')(void *p, char);
// 9BB0DC: using guessed type int (__thiscall *ItemWordLot::`vftable')(void *p, char);
// 9BB12C: using guessed type int (__thiscall *ItemDwrdLot::`vftable')(void *p, char);
// 9BB17C: using guessed type int (__thiscall *ItemQuest::`vftable')(void *p, char);
// 9BB1CC: using guessed type int (__thiscall *ItemAmulet::`vftable')(void *p, char);
// 9BB21C: using guessed type int (__thiscall *ItemWeapon::`vftable')(void *p, char);
// 9BB274: using guessed type int (__thiscall *ItemCostumeWeapon::`vftable')(void *p, char);
// 9BB2D4: using guessed type int (__thiscall *ItemArmor::`vftable')(void *p, char);
// 9BB324: using guessed type int (__thiscall *ItemShield::`vftable')(void *p, char);
// 9BB374: using guessed type int (__thiscall *ItemCostumeShield::`vftable')(void *p, char);
// 9BB3D4: using guessed type int (__thiscall *ItemBoot::`vftable')(void *p, char);
// 9BB424: using guessed type int (__thiscall *ItemFurniture::`vftable')(void *p, char);
// 9BB474: using guessed type int (__thiscall *ItemDecoration::`vftable')(void *p, char);
// 9BB4C4: using guessed type int (__thiscall *ItemSkillScroll::`vftable')(void *p, char);
// 9BB514: using guessed type int (__thiscall *ItemRecallScroll::`vftable')(void *p, char);
// 9BB564: using guessed type int (__thiscall *ItemUpgradeSource::`vftable')(void *p, char);
// 9BB5B4: using guessed type int (__thiscall *ItemBind::`vftable')(void *p, char);
// 9BB604: using guessed type int (__thiscall *ItemChest::`vftable')(void *p, char);
// 9BB654: using guessed type int (__thiscall *ItemGBCoin::`vftable')(void *p, char);
// 9BB6A4: using guessed type int (__thiscall *ItemCapsule::`vftable')(void *p, char);
// 9BB6FC: using guessed type int (__thiscall *ItemEnchant::`vftable')(void *p, char);
// 9BB74C: using guessed type int (__thiscall *ItemWeaponTitleLicense::`vftable')(void *p, char);
// 9BB79C: using guessed type int (__thiscall *ItemKQ::`vftable')(void *p, char);
// 9BB7EC: using guessed type int (__thiscall *ItemHouseSkin::`vftable')(void *p, char);
// 9BB83C: using guessed type int (__thiscall *ItemUpRed::`vftable')(void *p, char);
// 9BB88C: using guessed type int (__thiscall *ItemUpBlue::`vftable')(void *p, char);
// 9BB8DC: using guessed type int (__thiscall *ItemKQStep::`vftable')(void *p, char);
// 9BB92C: using guessed type int (__thiscall *ItemFeed::`vftable')(void *p, char);
// 9BB97C: using guessed type int (__thiscall *ItemRiding::`vftable')(void *p, char);
// 9BB9CC: using guessed type int (__thiscall *ItemAmount::`vftable')(void *p, char);
// 9BBA1C: using guessed type int (__thiscall *ItemUpGold::`vftable')(void *p, char);
// 9BBA6C: using guessed type int (__thiscall *ItemChargedAction::`vftable')(void *p, char);
// 9BBABC: using guessed type int (__thiscall *ItemCollectCloseCard::`vftable')(void *p, char);
// 9BBB0C: using guessed type int (__thiscall *ItemCollectOpenCard::`vftable')(void *p, char);
// 9BBB5C: using guessed type int (__thiscall *ItemNoEffect::`vftable')(void *p, char);
// 9BBBAC: using guessed type int (__thiscall *ItemActiveskill::`vftable')(void *p, char);
// 9BBBFC: using guessed type int (__thiscall *ItemPet::`vftable')(void *p, char);
// 9BBC5C: using guessed type int (__thiscall *ItemBracelet::`vftable')(void *p, char);
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0066EAB0) --------------------------------------------------------
Item *__cdecl Item::Create(PROTO_ITEMPACKET_INFORM *pkInfo, ITEM_INVEN *kInven, unsigned int *puiBuffSize)
{
  int v3; // eax@1
  Item *result; // eax@4
  int v5; // edi@5
  int v6; // ebx@5
  int v7; // ecx@7
  int v8; // eax@8
  int v9; // eax@12
  Item *v10; // edi@12
  int v11; // ebx@12
  Item *v12; // eax@13
  Item *v13; // esi@13
  Item *v14; // eax@17
  Item *v15; // eax@19
  Item *v16; // eax@23
  Item *v17; // eax@25
  Item *v18; // esi@25
  Item *v19; // eax@30
  Item *v20; // eax@32
  Item *v21; // eax@36
  SHINE_PUT_ON_BELONGED_ITEM v22; // eax@38
  Item *v23; // eax@38
  Item *v24; // eax@40
  Item *v25; // eax@42
  Item *v26; // eax@46
  Item *v27; // eax@48
  Item *v28; // eax@52
  Item *v29; // eax@54
  SHINE_PUT_ON_BELONGED_ITEM v30; // ecx@56
  unsigned int v31; // edx@56
  Item *v32; // eax@58
  Item *v33; // eax@62
  Item *v34; // eax@64
  Item *v35; // eax@68
  Item *v36; // eax@70
  Item *v37; // eax@74
  Item *v38; // eax@76
  SHINE_PUT_ON_BELONGED_ITEM v39; // eax@78
  char v40; // cl@78
  Item *v41; // eax@78
  char v42; // cl@80
  Item *v43; // eax@80
  Item *v44; // eax@82
  Item *v45; // eax@86
  Item *v46; // eax@90
  unsigned int uiBuffSize; // [sp+14h] [bp-80h]@1
  SHINE_ITEM_STRUCT kStruct; // [sp+1Ch] [bp-78h]@12
  int v49; // [sp+90h] [bp-4h]@13

  kInven->Inven = (unsigned __int16)pkInfo->location;
  v3 = pkInfo->info.itemid;
  uiBuffSize = 5;
  if ( (_WORD)v3 == -1 )
  {
    if ( puiBuffSize )
      *puiBuffSize = 5;
    result = 0;
  }
  else
  {
    v5 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    v6 = pkInfo->info.itemid;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v3)
      && (unsigned __int16)v6 <= *(_WORD *)(v5 + 200)
      && (v7 = *(_DWORD *)(v5 + 196), *(_DWORD *)(v7 + 4 * v6))
      && (v8 = *(_DWORD *)(v7 + 4 * v6)) != 0 )
    {
      v9 = *(_DWORD *)(v8 + 102);
      v10 = 0;
      v11 = 0;
      kStruct.itemid = pkInfo->info.itemid;
      switch ( v9 )
      {
        case 0:
          kStruct.itemattr.blot.lot = pkInfo->info.itemattr.blot.lot;
          v11 = 1;
          v12 = (Item *)operator new(0x78u);
          v13 = v12;
          v49 = 0;
          if ( !v12 )
            goto LABEL_92;
          Item::Item(v12, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemByteLot::`vftable';
          goto LABEL_93;
        case 1:
          kStruct.itemattr.wlot.lot = pkInfo->info.itemattr.wlot.lot;
          v11 = 2;
          v13 = (Item *)operator new(0x78u);
          v49 = 1;
          if ( !v13 )
            goto LABEL_92;
          Item::Item(v13, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemWordLot::`vftable';
          goto LABEL_93;
        case 2:
          kStruct.itemattr.dlot.lot = pkInfo->info.itemattr.dlot.lot;
          v11 = 4;
          v14 = (Item *)operator new(0x78u);
          v13 = v14;
          v49 = 2;
          if ( !v14 )
            goto LABEL_92;
          Item::Item(v14, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemDwrdLot::`vftable';
          goto LABEL_93;
        case 3:
          kStruct.itemattr.wlot.lot = pkInfo->info.itemattr.wlot.lot;
          v11 = 2;
          v15 = (Item *)operator new(0x78u);
          v13 = v15;
          v49 = 3;
          if ( !v15 )
            goto LABEL_92;
          Item::Item(v15, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemQuest::`vftable';
          goto LABEL_93;
        case 4:
          v11 = ItemAmulet::SetStructAttr(&kStruct, &pkInfo->info.itemattr.blot.lot);
          v13 = (Item *)operator new(0x78u);
          v49 = 4;
          if ( !v13 )
            goto LABEL_92;
          Item::Item(v13, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemAmulet::`vftable';
          goto LABEL_93;
        case 5:
          v11 = ItemWeapon::SetStructAttr(&kStruct, &pkInfo->info.itemattr.blot.lot);
          v16 = (Item *)operator new(0x78u);
          v13 = v16;
          v49 = 5;
          if ( !v16 )
            goto LABEL_92;
          Item::Item(v16, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemWeapon::`vftable';
          goto LABEL_93;
        case 26:
          kStruct.itemattr.dlot.lot = pkInfo->info.itemattr.dlot.lot;
          v11 = 4;
          v17 = (Item *)operator new(0x7Cu);
          v18 = v17;
          v49 = 6;
          if ( !v17 )
            goto LABEL_27;
          Item::Item(v17, &kStruct);
          v18->vfptr = (NiRefObjectVtbl *)&ItemCostumeWeapon::`vftable';
          goto LABEL_28;
        case 6:
          v11 = ItemBracelet::SetStructAttr(&kStruct, &pkInfo->info.itemattr.blot.lot);
          v19 = (Item *)operator new(0x78u);
          v13 = v19;
          v49 = 7;
          if ( !v19 )
            goto LABEL_92;
          Item::Item(v19, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemArmor::`vftable';
          goto LABEL_93;
        case 7:
          v11 = ItemBracelet::SetStructAttr(&kStruct, &pkInfo->info.itemattr.blot.lot);
          v20 = (Item *)operator new(0x78u);
          v13 = v20;
          v49 = 8;
          if ( !v20 )
            goto LABEL_92;
          Item::Item(v20, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemShield::`vftable';
          goto LABEL_93;
        case 8:
          v11 = ItemBracelet::SetStructAttr(&kStruct, &pkInfo->info.itemattr.blot.lot);
          v13 = (Item *)operator new(0x78u);
          v49 = 9;
          if ( !v13 )
            goto LABEL_92;
          Item::Item(v13, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemBoot::`vftable';
          goto LABEL_93;
        case 9:
          qmemcpy(&kStruct.itemattr, &pkInfo->info.itemattr, 0x24u);
          v11 = 36;
          v21 = (Item *)operator new(0x78u);
          v13 = v21;
          v49 = 10;
          if ( !v21 )
            goto LABEL_92;
          Item::Item(v21, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemFurniture::`vftable';
          goto LABEL_93;
        case 10:
          v22 = pkInfo->info.itemattr.amulet.IsPutOnBelonged;
          kStruct.itemattr.dlot.lot = pkInfo->info.itemattr.dlot.lot;
          kStruct.itemattr.Capsule.content.dwrdkey[1] = v22;
          v11 = 8;
          v23 = (Item *)operator new(0x78u);
          v13 = v23;
          v49 = 11;
          if ( !v23 )
            goto LABEL_92;
          Item::Item(v23, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemDecoration::`vftable';
          goto LABEL_93;
        case 11:
          v11 = 1;
          v24 = (Item *)operator new(0x78u);
          v13 = v24;
          v49 = 12;
          if ( !v24 )
            goto LABEL_92;
          Item::Item(v24, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemSkillScroll::`vftable';
          goto LABEL_93;
        case 12:
          kStruct.itemattr.blot.lot = pkInfo->info.itemattr.blot.lot;
          v11 = 1;
          v25 = (Item *)operator new(0x78u);
          v13 = v25;
          v49 = 13;
          if ( !v25 )
            goto LABEL_92;
          Item::Item(v25, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemRecallScroll::`vftable';
          goto LABEL_93;
        case 14:
          kStruct.itemattr.blot.lot = pkInfo->info.itemattr.blot.lot;
          v11 = 1;
          v13 = (Item *)operator new(0x78u);
          v49 = 14;
          if ( !v13 )
            goto LABEL_92;
          Item::Item(v13, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemUpgradeSource::`vftable';
          goto LABEL_93;
        case 13:
          kStruct.itemattr.blot.lot = pkInfo->info.itemattr.blot.lot;
          memcpy(
            &kStruct.itemattr.weapon.strengthen,
            &pkInfo->info.itemattr.weapon.strengthen,
            10 * (unsigned __int8)kStruct.itemattr.blot.lot);
          v11 = 10 * (unsigned __int8)kStruct.itemattr.blot.lot + 1;
          v26 = (Item *)operator new(0x78u);
          v13 = v26;
          v49 = 15;
          if ( !v26 )
            goto LABEL_92;
          Item::Item(v26, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemBind::`vftable';
          goto LABEL_93;
        case 15:
          v11 = ItemChest::SetStructAttr(&kStruct, &pkInfo->info.itemattr.blot.lot);
          v27 = (Item *)operator new(0x78u);
          v13 = v27;
          v49 = 16;
          if ( !v27 )
            goto LABEL_92;
          Item::Item(v27, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemChest::`vftable';
          goto LABEL_93;
        case 34:
          kStruct.itemattr.blot.lot = pkInfo->info.itemattr.blot.lot;
          v11 = 1;
          v13 = (Item *)operator new(0x78u);
          v49 = 17;
          if ( !v13 )
            goto LABEL_92;
          Item::Item(v13, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemEnchant::`vftable';
          goto LABEL_93;
        case 16:
          v11 = 1;
          v28 = (Item *)operator new(0x78u);
          v13 = v28;
          v49 = 18;
          if ( !v28 )
            goto LABEL_92;
          Item::Item(v28, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemWeaponTitleLicense::`vftable';
          goto LABEL_93;
        case 28:
          v11 = 1;
          v29 = (Item *)operator new(0x78u);
          v13 = v29;
          v49 = 19;
          if ( !v29 )
            goto LABEL_92;
          Item::Item(v29, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemGBCoin::`vftable';
          goto LABEL_93;
        case 29:
          v30 = pkInfo->info.itemattr.amulet.IsPutOnBelonged;
          v31 = pkInfo->info.itemattr.riding.IsPutOnBelonged;
          kStruct.itemattr.dlot.lot = pkInfo->info.itemattr.dlot.lot;
          *(_QWORD *)(&kStruct.itemattr.qstitm + 2) = __PAIR__(v31, v30);
          v11 = 12;
          v13 = (Item *)operator new(0x78u);
          v49 = 20;
          if ( !v13 )
            goto LABEL_92;
          Item::Item(v13, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemCapsule::`vftable';
          goto LABEL_93;
        case 17:
          v32 = (Item *)operator new(0x78u);
          v13 = v32;
          v49 = 21;
          if ( !v32 )
            goto LABEL_92;
          Item::Item(v32, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemKQ::`vftable';
          goto LABEL_93;
        case 18:
          kStruct.itemattr.dlot.lot = pkInfo->info.itemattr.dlot.lot;
          v11 = 4;
          v13 = (Item *)operator new(0x78u);
          v49 = 22;
          if ( !v13 )
            goto LABEL_92;
          Item::Item(v13, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemHouseSkin::`vftable';
          goto LABEL_93;
        case 19:
          kStruct.itemattr.blot.lot = pkInfo->info.itemattr.blot.lot;
          v11 = 1;
          v33 = (Item *)operator new(0x78u);
          v13 = v33;
          v49 = 23;
          if ( !v33 )
            goto LABEL_92;
          Item::Item(v33, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemUpRed::`vftable';
          goto LABEL_93;
        case 20:
          kStruct.itemattr.blot.lot = pkInfo->info.itemattr.blot.lot;
          v11 = 1;
          v34 = (Item *)operator new(0x78u);
          v13 = v34;
          v49 = 24;
          if ( !v34 )
            goto LABEL_92;
          Item::Item(v34, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemUpBlue::`vftable';
          goto LABEL_93;
        case 21:
          kStruct.itemattr.wlot.lot = pkInfo->info.itemattr.wlot.lot;
          v11 = 2;
          v13 = (Item *)operator new(0x78u);
          v49 = 25;
          if ( !v13 )
            goto LABEL_92;
          Item::Item(v13, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemKQStep::`vftable';
          goto LABEL_93;
        case 22:
          kStruct.itemattr.blot.lot = pkInfo->info.itemattr.blot.lot;
          v11 = 1;
          v35 = (Item *)operator new(0x78u);
          v13 = v35;
          v49 = 26;
          if ( !v35 )
            goto LABEL_92;
          Item::Item(v35, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemFeed::`vftable';
          goto LABEL_93;
        case 23:
          v11 = ItemRiding::SetStructAttr(&kStruct, &pkInfo->info.itemattr.blot.lot);
          v36 = (Item *)operator new(0x78u);
          v13 = v36;
          v49 = 27;
          if ( !v36 )
            goto LABEL_92;
          Item::Item(v36, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemRiding::`vftable';
          goto LABEL_93;
        case 24:
          kStruct.itemattr.dlot.lot = pkInfo->info.itemattr.dlot.lot;
          v11 = 4;
          v13 = (Item *)operator new(0x78u);
          v49 = 28;
          if ( !v13 )
            goto LABEL_92;
          Item::Item(v13, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemAmount::`vftable';
          goto LABEL_93;
        case 25:
          kStruct.itemattr.blot.lot = pkInfo->info.itemattr.blot.lot;
          uiBuffSize = 6;
          v37 = (Item *)operator new(0x78u);
          v13 = v37;
          v49 = 29;
          if ( !v37 )
            goto LABEL_92;
          Item::Item(v37, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemUpGold::`vftable';
          goto LABEL_93;
        case 27:
          kStruct.itemattr.dlot.lot = pkInfo->info.itemattr.dlot.lot;
          uiBuffSize = 9;
          v38 = (Item *)operator new(0x78u);
          v13 = v38;
          v49 = 30;
          if ( !v38 )
            goto LABEL_92;
          Item::Item(v38, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemChargedAction::`vftable';
          goto LABEL_93;
        case 30:
          v39 = pkInfo->info.itemattr.amulet.IsPutOnBelonged;
          v40 = pkInfo->info.itemattr.amulet.upgrade;
          kStruct.itemattr.dlot.lot = pkInfo->info.itemattr.dlot.lot;
          kStruct.itemattr.Capsule.content.dwrdkey[1] = v39;
          kStruct.itemattr.amulet.upgrade = v40;
          uiBuffSize = 14;
          v41 = (Item *)operator new(0x78u);
          v13 = v41;
          v49 = 31;
          if ( !v41 )
            goto LABEL_92;
          Item::Item(v41, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemCollectCloseCard::`vftable';
          goto LABEL_93;
        case 31:
          v42 = pkInfo->info.itemattr.MobCard.Star;
          kStruct.itemattr.dlot.lot = pkInfo->info.itemattr.dlot.lot;
          kStruct.itemattr.MobCard.Star = v42;
          uiBuffSize = 10;
          v43 = (Item *)operator new(0x78u);
          v13 = v43;
          v49 = 32;
          if ( !v43 )
            goto LABEL_92;
          Item::Item(v43, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemCollectOpenCard::`vftable';
          goto LABEL_93;
        case 33:
          kStruct.itemattr.blot.lot = pkInfo->info.itemattr.blot.lot;
          uiBuffSize = 6;
          v44 = (Item *)operator new(0x78u);
          v13 = v44;
          v49 = 33;
          if ( !v44 )
            goto LABEL_92;
          Item::Item(v44, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemNoEffect::`vftable';
          goto LABEL_93;
        case 35:
          kStruct.itemattr.wlot.lot = pkInfo->info.itemattr.wlot.lot;
          uiBuffSize = 7;
          v13 = (Item *)operator new(0x78u);
          v49 = 34;
          if ( !v13 )
            goto LABEL_92;
          Item::Item(v13, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemActiveskill::`vftable';
          goto LABEL_93;
        case 36:
          qmemcpy(&kStruct.itemattr, &pkInfo->info.itemattr, 0x1Au);
          uiBuffSize = 31;
          v45 = (Item *)operator new(0x78u);
          v13 = v45;
          v49 = 35;
          if ( !v45 )
            goto LABEL_92;
          Item::Item(v45, &kStruct);
          v13->vfptr = (NiRefObjectVtbl *)&ItemPet::`vftable';
          goto LABEL_93;
        case 37:
          kStruct.itemattr.dlot.lot = pkInfo->info.itemattr.dlot.lot;
          v11 = 4;
          v18 = (Item *)operator new(0x7Cu);
          v49 = 36;
          if ( v18 )
          {
            Item::Item(v18, &kStruct);
            v18->vfptr = (NiRefObjectVtbl *)&ItemCostumeShield::`vftable';
          }
          else
          {
LABEL_27:
            v18 = 0;
          }
LABEL_28:
          v49 = -1;
          v10 = v18;
          if ( v18 )
            ((void (__thiscall *)(Item *))v18->vfptr[22].__vecDelDtor)(v18);
          break;
        case 38:
          v11 = ItemBracelet::SetStructAttr(&kStruct, &pkInfo->info.itemattr.blot.lot);
          v46 = (Item *)operator new(0x78u);
          v13 = v46;
          v49 = 37;
          if ( v46 )
          {
            Item::Item(v46, &kStruct);
            v13->vfptr = (NiRefObjectVtbl *)&ItemBracelet::`vftable';
          }
          else
          {
LABEL_92:
            v13 = 0;
          }
LABEL_93:
          v10 = v13;
          break;
        default:
          break;
      }
      if ( puiBuffSize )
        *puiBuffSize = uiBuffSize + v11;
      result = v10;
    }
    else
    {
      if ( puiBuffSize )
        *puiBuffSize = 5;
      result = 0;
    }
  }
  return result;
}
// 9BB08C: using guessed type int (__thiscall *ItemByteLot::`vftable')(void *p, char);
// 9BB0DC: using guessed type int (__thiscall *ItemWordLot::`vftable')(void *p, char);
// 9BB12C: using guessed type int (__thiscall *ItemDwrdLot::`vftable')(void *p, char);
// 9BB17C: using guessed type int (__thiscall *ItemQuest::`vftable')(void *p, char);
// 9BB1CC: using guessed type int (__thiscall *ItemAmulet::`vftable')(void *p, char);
// 9BB21C: using guessed type int (__thiscall *ItemWeapon::`vftable')(void *p, char);
// 9BB274: using guessed type int (__thiscall *ItemCostumeWeapon::`vftable')(void *p, char);
// 9BB2D4: using guessed type int (__thiscall *ItemArmor::`vftable')(void *p, char);
// 9BB324: using guessed type int (__thiscall *ItemShield::`vftable')(void *p, char);
// 9BB374: using guessed type int (__thiscall *ItemCostumeShield::`vftable')(void *p, char);
// 9BB3D4: using guessed type int (__thiscall *ItemBoot::`vftable')(void *p, char);
// 9BB424: using guessed type int (__thiscall *ItemFurniture::`vftable')(void *p, char);
// 9BB474: using guessed type int (__thiscall *ItemDecoration::`vftable')(void *p, char);
// 9BB4C4: using guessed type int (__thiscall *ItemSkillScroll::`vftable')(void *p, char);
// 9BB514: using guessed type int (__thiscall *ItemRecallScroll::`vftable')(void *p, char);
// 9BB564: using guessed type int (__thiscall *ItemUpgradeSource::`vftable')(void *p, char);
// 9BB5B4: using guessed type int (__thiscall *ItemBind::`vftable')(void *p, char);
// 9BB604: using guessed type int (__thiscall *ItemChest::`vftable')(void *p, char);
// 9BB654: using guessed type int (__thiscall *ItemGBCoin::`vftable')(void *p, char);
// 9BB6A4: using guessed type int (__thiscall *ItemCapsule::`vftable')(void *p, char);
// 9BB6FC: using guessed type int (__thiscall *ItemEnchant::`vftable')(void *p, char);
// 9BB74C: using guessed type int (__thiscall *ItemWeaponTitleLicense::`vftable')(void *p, char);
// 9BB79C: using guessed type int (__thiscall *ItemKQ::`vftable')(void *p, char);
// 9BB7EC: using guessed type int (__thiscall *ItemHouseSkin::`vftable')(void *p, char);
// 9BB83C: using guessed type int (__thiscall *ItemUpRed::`vftable')(void *p, char);
// 9BB88C: using guessed type int (__thiscall *ItemUpBlue::`vftable')(void *p, char);
// 9BB8DC: using guessed type int (__thiscall *ItemKQStep::`vftable')(void *p, char);
// 9BB92C: using guessed type int (__thiscall *ItemFeed::`vftable')(void *p, char);
// 9BB97C: using guessed type int (__thiscall *ItemRiding::`vftable')(void *p, char);
// 9BB9CC: using guessed type int (__thiscall *ItemAmount::`vftable')(void *p, char);
// 9BBA1C: using guessed type int (__thiscall *ItemUpGold::`vftable')(void *p, char);
// 9BBA6C: using guessed type int (__thiscall *ItemChargedAction::`vftable')(void *p, char);
// 9BBABC: using guessed type int (__thiscall *ItemCollectCloseCard::`vftable')(void *p, char);
// 9BBB0C: using guessed type int (__thiscall *ItemCollectOpenCard::`vftable')(void *p, char);
// 9BBB5C: using guessed type int (__thiscall *ItemNoEffect::`vftable')(void *p, char);
// 9BBBAC: using guessed type int (__thiscall *ItemActiveskill::`vftable')(void *p, char);
// 9BBBFC: using guessed type int (__thiscall *ItemPet::`vftable')(void *p, char);
// 9BBC5C: using guessed type int (__thiscall *ItemBracelet::`vftable')(void *p, char);
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0066F620) --------------------------------------------------------
Item *__cdecl Item::Create(unsigned __int16 kID)
{
  int v1; // edi@1
  int (__thiscall *v2)(int, _DWORD); // eax@1
  int v3; // edx@3
  int v4; // eax@4
  Item *v5; // eax@7
  Item *v6; // esi@7
  _BYTE *v7; // eax@7
  SHINE_ITEM_STRUCT kItemStruct; // [sp+8h] [bp-6Ch]@1

  memset((char *)&kItemStruct, 0, 0x67u);
  v1 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  v2 = *(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16);
  kItemStruct.itemid = kID;
  if ( (unsigned __int8)v2(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable, kID) )
  {
    if ( kID <= *(_WORD *)(v1 + 200) )
    {
      v3 = *(_DWORD *)(v1 + 196);
      if ( *(_DWORD *)(v3 + 4 * kID) )
      {
        v4 = *(_DWORD *)(v3 + 4 * kID);
        if ( v4 )
        {
          if ( *(_DWORD *)(v4 + 102) == 5 )
          {
            kItemStruct.itemattr.MobCard_Unident.Group = -1;
            *(_WORD *)(&kItemStruct.itemattr.recallscroll + 13) = -1;
            *(_WORD *)((char *)&kItemStruct.itemattr.minihouseskin + 19) = -1;
          }
        }
      }
    }
  }
  v5 = Item::Create(&kItemStruct);
  v6 = v5;
  v7 = (_BYTE *)((int (__thiscall *)(Item *))v5->vfptr[12].__vecDelDtor)(v5);
  if ( v7 )
    *v7 = 1;
  return v6;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (0066F6D0) --------------------------------------------------------
void __thiscall ItemCostumeWeapon::SetMaxCharged(ItemCostumeWeapon *this)
{
  ItemCostumeWeapon *v1; // esi@1
  ChargedItemEffect *v2; // eax@1

  v1 = this;
  v2 = ChargedEffectTable::GetByInxName(this->m_pkInfo->InxName);
  if ( v2 )
  {
    if ( v2->EffectEnum == 28 )
      v1->m_dwMaxCharged = v2->EffectValue;
  }
}

//----- (0066F700) --------------------------------------------------------
void __thiscall ItemCostumeShield::SetMaxCharged(ItemCostumeShield *this)
{
  ItemCostumeShield *v1; // esi@1
  ChargedItemEffect *v2; // eax@1

  v1 = this;
  v2 = ChargedEffectTable::GetByInxName(this->m_pkInfo->InxName);
  if ( v2 )
  {
    if ( v2->EffectEnum == 28 )
      v1->m_dwMaxCharged = v2->EffectValue;
  }
}

//----- (0066F730) --------------------------------------------------------
int __cdecl ItemAmulet::SetStructAttr(SHINE_ITEM_STRUCT *kStruct, char *pbyBuff)
{
  char v2; // cl@1
  unsigned int v3; // esi@1

  qmemcpy(&kStruct->itemattr, pbyBuff, 0x3Eu);
  v2 = kStruct->itemattr.amulet.option.fixed.optionnumber.bin;
  kStruct->itemattr.amulet.option.fixed.optionnumber.bin = v2;
  v3 = 3 * ((unsigned int)(unsigned __int8)v2 >> 1);
  memcpy(&kStruct->itemattr.weapon.usertitle[11], &kStruct->itemattr.weapon.usertitle[11], v3);
  return v3 + 38;
}

//----- (0066F770) --------------------------------------------------------
int __cdecl ItemWeapon::SetStructAttr(SHINE_ITEM_STRUCT *kStruct, char *pbyBuff)
{
  char v2; // cl@1
  unsigned int v3; // esi@1

  qmemcpy(&kStruct->itemattr, pbyBuff, 0x59u);
  v2 = kStruct->itemattr.weapon.option.fixed.optionnumber.bin;
  kStruct->itemattr.weapon.option.fixed.optionnumber.bin = v2;
  v3 = 3 * ((unsigned int)(unsigned __int8)v2 >> 1);
  memcpy((char *)&kStruct->itemattr.Bracelet + 65, (char *)&kStruct->itemattr.Bracelet + 65, v3);
  return v3 + 65;
}

//----- (0066F7B0) --------------------------------------------------------
int __cdecl ItemBracelet::SetStructAttr(SHINE_ITEM_STRUCT *kStruct, char *pbyBuff)
{
  char v2; // cl@1
  unsigned int v3; // esi@1

  qmemcpy(&kStruct->itemattr, pbyBuff, 0x25u);
  v2 = kStruct->itemattr.armor.option.fixed.optionnumber.bin;
  kStruct->itemattr.armor.option.fixed.optionnumber.bin = v2;
  v3 = 3 * ((unsigned int)(unsigned __int8)v2 >> 1);
  memcpy(&kStruct->itemattr.Pet.sName[5], &kStruct->itemattr.Pet.sName[5], v3);
  return v3 + 13;
}

//----- (0066F7F0) --------------------------------------------------------
int __cdecl ItemChest::SetStructAttr(SHINE_ITEM_STRUCT *kStruct, char *pbyBuff)
{
  int v2; // esi@1

  kStruct->itemattr.blot.lot = *pbyBuff;
  v2 = 8 * (*pbyBuff & 0xF);
  memcpy(&kStruct->itemattr.weapon.strengthen, pbyBuff + 1, 8 * (*pbyBuff & 0xF));
  return v2 + 1;
}

//----- (0066F820) --------------------------------------------------------
signed int __cdecl ItemRiding::SetStructAttr(SHINE_ITEM_STRUCT *kStruct, char *pbyBuff)
{
  kStruct->itemattr.Capsule.content.key = *(_QWORD *)pbyBuff;
  *(_QWORD *)((char *)&kStruct->itemattr.shield.deletetime + 1) = *((_QWORD *)pbyBuff + 1);
  *(_WORD *)((char *)&kStruct->itemattr.itemchest.content[1].key + 7) = *((_WORD *)pbyBuff + 8);
  kStruct->itemattr.Pet.sName[10] = pbyBuff[18];
  return 19;
}

//----- (0066F870) --------------------------------------------------------
unsigned int __thiscall Item::GetMaxLot(Item *this)
{
  return this->m_pkInfo->MaxLot;
}

//----- (0066F880) --------------------------------------------------------
bool __thiscall Item::IsAlike(Item *this, Item *pkItem)
{
  return this->m_kStruct.itemid == pkItem->m_kStruct.itemid
      && LOBYTE(this->m_pkInfo->Type) == LOBYTE(pkItem->m_pkInfo->Type);
}

//----- (0066F8B0) --------------------------------------------------------
bool __thiscall Item::IsSplitable(ItemWordLot *this)
{
  return (unsigned int)((int (*)(void))this->vfptr[3].__vecDelDtor)() > 1;
}

//----- (0066F8C0) --------------------------------------------------------
char ItemDwrdLot::GetClass()
{
  return 2;
}

//----- (0066F8D0) --------------------------------------------------------
void __thiscall ItemDwrdLot::SetLot(ItemDwrdLot *this, char uiLot)
{
  this->m_kStruct.itemattr.dlot.lot = (unsigned __int8)uiLot;
}

//----- (0066F8E0) --------------------------------------------------------
int ItemDwrdLot::GetStructSize()
{
  return 6;
}

//----- (0066F8F0) --------------------------------------------------------
char ItemQuest::GetClass()
{
  return 3;
}

//----- (0066F900) --------------------------------------------------------
char ItemAmulet::GetClass()
{
  return 4;
}

//----- (0066F910) --------------------------------------------------------
signed int ItemAmulet::GetStructSize()
{
  return 64;
}

//----- (0066F920) --------------------------------------------------------
int __thiscall ItemBracelet::GetCurUpGradeLevel(ItemBracelet *this)
{
  return this->m_kStruct.itemattr.amulet.upgrade;
}

//----- (0066F930) --------------------------------------------------------
ShineItemAttr_Decoration *__thiscall ItemAmulet::GetUpgradeOpt(ItemAmulet *this)
{
  return (ShineItemAttr_Decoration *)((char *)&this->m_kStruct.itemattr.decorate + 11);
}

//----- (0066F940) --------------------------------------------------------
ShineItemAttr_Pet *__thiscall ItemAmulet::GetItemOption(ItemAmulet *this)
{
  return (ShineItemAttr_Pet *)((char *)&this->m_kStruct.itemattr.Pet + 37);
}

//----- (0066F950) --------------------------------------------------------
char __thiscall ItemAmulet::GetRandomOptChangedCnt(ItemAmulet *this)
{
  return this->m_kStruct.itemattr.amulet.randomOptionChangedCount;
}

//----- (0066F960) --------------------------------------------------------
char ItemWeapon::GetClass()
{
  return 5;
}

//----- (0066F970) --------------------------------------------------------
signed int ItemWeapon::GetStructSize()
{
  return 91;
}

//----- (0066F980) --------------------------------------------------------
ShineItemAttr_Bracelet *__thiscall ItemWeapon::GetItemOption(ItemWeapon *this)
{
  return (ShineItemAttr_Bracelet *)((char *)&this->m_kStruct.itemattr.Bracelet + 64);
}

//----- (0066F990) --------------------------------------------------------
ShineItemAttr_Bracelet *__thiscall ItemWeapon::GetDeleteTime(ItemWeapon *this)
{
  return (ShineItemAttr_Bracelet *)((char *)&this->m_kStruct.itemattr.Bracelet + 59);
}

//----- (0066F9A0) --------------------------------------------------------
char __thiscall ItemWeapon::GetRandomOptChangedCnt(ItemWeapon *this)
{
  return this->m_kStruct.itemattr.weapon.randomOptionChangedCount;
}

//----- (0066F9B0) --------------------------------------------------------
char ItemCostumeWeapon::GetClass()
{
  return 26;
}

//----- (0066F9C0) --------------------------------------------------------
unsigned int __thiscall ItemCollectCloseCard::GetSerialNumber(ItemCollectOpenCard *this)
{
  return this->m_kStruct.itemattr.dlot.lot;
}

//----- (0066F9D0) --------------------------------------------------------
void __thiscall ItemCostumeShield::SetChargedAmount(ItemCostumeShield *this, unsigned int dwChargedAmount)
{
  this->m_kStruct.itemattr.dlot.lot = dwChargedAmount;
}

//----- (0066F9E0) --------------------------------------------------------
unsigned int __thiscall ItemCostumeShield::GetMaxCharged(ItemCostumeShield *this)
{
  return this->m_dwMaxCharged;
}

//----- (0066F9F0) --------------------------------------------------------
char ItemArmor::GetClass()
{
  return 6;
}

//----- (0066FA00) --------------------------------------------------------
signed int ItemArmor::GetStructSize()
{
  return 39;
}

//----- (0066FA10) --------------------------------------------------------
ShineDateTime *__thiscall ItemArmor::GetDeleteTime(ItemBoot *this)
{
  return &this->m_kStruct.itemattr.armor.deletetime;
}

//----- (0066FA20) --------------------------------------------------------
char ItemShield::GetClass()
{
  return 7;
}

//----- (0066FA30) --------------------------------------------------------
char ItemCostumeShield::GetClass()
{
  return 37;
}

//----- (0066FA40) --------------------------------------------------------
char ItemBoot::GetClass()
{
  return 8;
}

//----- (0066FA50) --------------------------------------------------------
ShineItemAttr_SkillScroll *__thiscall ItemBracelet::GetItemOption(ItemBracelet *this)
{
  return &this->m_kStruct.itemattr.skillscroll + 12;
}

//----- (0066FA60) --------------------------------------------------------
char __thiscall ItemBoot::GetRandomOptChangedCnt(ItemBracelet *this)
{
  return this->m_kStruct.itemattr.amulet.UpgradeOption.fixed.optionnumber.bin;
}

//----- (0066FA70) --------------------------------------------------------
char ItemFurniture::GetClass()
{
  return 9;
}

//----- (0066FA80) --------------------------------------------------------
signed int ItemFurniture::GetStructSize()
{
  return 38;
}

//----- (0066FA90) --------------------------------------------------------
char ItemDecoration::GetClass()
{
  return 10;
}

//----- (0066FAA0) --------------------------------------------------------
char ItemSkillScroll::GetClass()
{
  return 11;
}

//----- (0066FAB0) --------------------------------------------------------
char ItemRecallScroll::GetClass()
{
  return 12;
}

//----- (0066FAC0) --------------------------------------------------------
unsigned int __thiscall ItemShield::GetCurUpGradeLevel(ItemNoEffect *this)
{
  return this->m_kStruct.itemattr.blot.lot;
}

//----- (0066FAD0) --------------------------------------------------------
char ItemUpgradeSource::GetClass()
{
  return 14;
}

//----- (0066FAE0) --------------------------------------------------------
char ItemBind::GetClass()
{
  return 13;
}

//----- (0066FAF0) --------------------------------------------------------
char ItemChest::GetClass()
{
  return 15;
}

//----- (0066FB00) --------------------------------------------------------
char ItemGBCoin::GetClass()
{
  return 28;
}

//----- (0066FB10) --------------------------------------------------------
char ItemCapsule::GetClass()
{
  return 29;
}

//----- (0066FB20) --------------------------------------------------------
signed int ItemCapsule::GetStructSize()
{
  return 14;
}

//----- (0066FB30) --------------------------------------------------------
CPostProcessEffect *__thiscall ShortCutSkill::`scalar deleting destructor'(CPostProcessEffect *this, unsigned int a2)
{
  CPostProcessEffect *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);

//----- (0066FB60) --------------------------------------------------------
char ItemEnchant::GetClass()
{
  return 34;
}

//----- (0066FB70) --------------------------------------------------------
void __thiscall ItemNoEffect::SetLot(ItemNoEffect *this, char uiLot)
{
  this->m_kStruct.itemattr.blot.lot = uiLot;
}

//----- (0066FB80) --------------------------------------------------------
char ItemWeaponTitleLicense::GetClass()
{
  return 16;
}

//----- (0066FB90) --------------------------------------------------------
char ItemKQ::GetClass()
{
  return 17;
}

//----- (0066FBA0) --------------------------------------------------------
char ItemHouseSkin::GetClass()
{
  return 18;
}

//----- (0066FBB0) --------------------------------------------------------
char ItemUpRed::GetClass()
{
  return 19;
}

//----- (0066FBC0) --------------------------------------------------------
char ItemUpBlue::GetClass()
{
  return 20;
}

//----- (0066FBD0) --------------------------------------------------------
char ItemKQStep::GetClass()
{
  return 21;
}

//----- (0066FBE0) --------------------------------------------------------
char ItemFeed::GetClass()
{
  return 22;
}

//----- (0066FBF0) --------------------------------------------------------
char ItemRiding::GetClass()
{
  return 23;
}

//----- (0066FC00) --------------------------------------------------------
signed int ItemRiding::GetStructSize()
{
  return 21;
}

//----- (0066FC10) --------------------------------------------------------
NiPixelFormat *__thiscall NpNs_SmoothRotateControler::GetTargetDirection(NiDX9TextureData *this)
{
  return &this->m_kPixelFormat;
}

//----- (0066FC20) --------------------------------------------------------
int __thiscall ItemRiding::GetCurMoverLevel(ItemRiding *this)
{
  return this->m_kStruct.itemattr.riding.nGrade;
}

//----- (0066FC30) --------------------------------------------------------
char ItemAmount::GetClass()
{
  return 24;
}

//----- (0066FC40) --------------------------------------------------------
char ItemUpGold::GetClass()
{
  return 25;
}

//----- (0066FC50) --------------------------------------------------------
char ItemChargedAction::GetClass()
{
  return 27;
}

//----- (0066FC60) --------------------------------------------------------
char ItemCollectCloseCard::GetClass()
{
  return 30;
}

//----- (0066FC70) --------------------------------------------------------
int ItemCollectCloseCard::GetStructSize()
{
  return 11;
}

//----- (0066FC80) --------------------------------------------------------
unsigned int __thiscall ItemCollectCloseCard::GetCardID(ItemCollectCloseCard *this)
{
  return this->m_kStruct.itemattr.MobCard_Unident.CardID;
}

//----- (0066FC90) --------------------------------------------------------
unsigned int __thiscall ItemCollectCloseCard::GetStar(ItemCollectCloseCard *this)
{
  return this->m_kStruct.itemattr.MobCard_Unident.Star;
}

//----- (0066FCA0) --------------------------------------------------------
unsigned int __thiscall ItemCollectCloseCard::GetGroup(ItemCollectCloseCard *this)
{
  return this->m_kStruct.itemattr.MobCard_Unident.Group;
}

//----- (0066FCB0) --------------------------------------------------------
char ItemCollectOpenCard::GetClass()
{
  return 31;
}

//----- (0066FCC0) --------------------------------------------------------
signed int NiStencilProperty::Type()
{
  return 7;
}

//----- (0066FCD0) --------------------------------------------------------
unsigned int __thiscall ItemCollectOpenCard::GetStar(ItemCollectOpenCard *this)
{
  return this->m_kStruct.itemattr.MobCard.Star;
}

//----- (0066FCE0) --------------------------------------------------------
char ItemNoEffect::GetClass()
{
  return 33;
}

//----- (0066FCF0) --------------------------------------------------------
signed int ItemByteLot::GetStructSize()
{
  return 3;
}

//----- (0066FD00) --------------------------------------------------------
char ItemActiveskill::GetClass()
{
  return 35;
}

//----- (0066FD10) --------------------------------------------------------
void __thiscall ItemQuest::SetLot(ItemActiveskill *this, char uiLot)
{
  this->m_kStruct.itemattr.wlot.lot = (unsigned __int8)uiLot;
}

//----- (0066FD20) --------------------------------------------------------
unsigned int __thiscall ItemWordLot::GetLot(ItemActiveskill *this)
{
  return this->m_kStruct.itemattr.wlot.lot;
}

//----- (0066FD30) --------------------------------------------------------
char ItemPet::GetClass()
{
  return 36;
}

//----- (0066FD40) --------------------------------------------------------
unsigned int __thiscall ItemPet::GetPetID(ItemPet *this)
{
  return this->m_kStruct.itemattr.Capsule.content.dwrdkey[1];
}

//----- (0066FD50) --------------------------------------------------------
char *__thiscall ItemPet::GetName(ItemPet *this)
{
  return &this->m_kStruct.itemattr.amulet.upgrade;
}

//----- (0066FD60) --------------------------------------------------------
bool __thiscall ItemPet::GetSummoning(ItemPet *this)
{
  return this->m_kStruct.itemattr.Pet.bSummoning != 0;
}

//----- (0066FD70) --------------------------------------------------------
signed int ItemPet::GetStructSize()
{
  return 28;
}

//----- (0066FD80) --------------------------------------------------------
char ItemBracelet::GetClass()
{
  return 38;
}

//----- (0066FD90) --------------------------------------------------------
SHINE_ITEM_ATTRIBUTE *__thiscall ItemAmulet::GetDeleteTime(ItemBracelet *this)
{
  return &this->m_kStruct.itemattr;
}

//----- (0066FDA0) --------------------------------------------------------
bool __cdecl ItemInfoTab::IsOneHandSwordAniType(ItemInfo *pkInfo)
{
  bool result; // al@2
  WeaponTypeEnum v2; // eax@3

  result = 0;
  if ( !pkInfo->TwoHand )
  {
    v2 = pkInfo->WeaponType;
    if ( v2 == 1 || v2 == 4 || v2 == 5 || v2 == 6 || v2 == 7 || v2 == 8 || v2 == 9 || v2 == 13 )
      result = 1;
  }
  return result;
}

//----- (0066FDF0) --------------------------------------------------------
bool __cdecl ItemInfoTab::IsDualWeaponAniType(ItemInfo *pkInfo)
{
  return pkInfo->WeaponType == 18;
}

//----- (0066FE10) --------------------------------------------------------
bool __cdecl ItemInfoTab::IsTwoHandSwordAniType(ItemInfo *pkInfo)
{
  bool result; // al@2
  WeaponTypeEnum v2; // eax@3

  result = 0;
  if ( pkInfo->TwoHand )
  {
    v2 = pkInfo->WeaponType;
    if ( v2 == 1 || v2 == 21 || v2 == 5 || v2 == 6 || v2 == 7 || v2 == 8 || v2 == 9 || v2 == 13 || v2 == 17 || v2 == 19 )
      result = 1;
  }
  return result;
}

//----- (0066FE60) --------------------------------------------------------
bool __cdecl ItemInfoTab::IsBowAniType(ItemInfo *pkInfo)
{
  return pkInfo->WeaponType == 2;
}

//----- (0066FE80) --------------------------------------------------------
bool __cdecl ItemInfoTab::IsCrossBowAniType(ItemInfo *pkInfo)
{
  return pkInfo->WeaponType == 10;
}

//----- (0066FEA0) --------------------------------------------------------
bool __cdecl ItemInfoTab::IsOneHandStaffAniType()
{
  return 0;
}

//----- (0066FEB0) --------------------------------------------------------
bool __cdecl ItemInfoTab::IsTwoHandStaffAniType(ItemInfo *pkInfo)
{
  WeaponTypeEnum v1; // eax@1
  bool result; // al@2

  v1 = pkInfo->WeaponType;
  if ( v1 == 3 )
    result = 1;
  else
    result = v1 == 11;
  return result;
}

//----- (0066FED0) --------------------------------------------------------
bool __cdecl ItemInfoTab::IsTwoHandAxeAniType(ItemInfo *pkInfo)
{
  bool result; // al@2

  if ( pkInfo->TwoHand )
    result = pkInfo->WeaponType == 4;
  else
    result = 0;
  return result;
}

//----- (0066FEF0) --------------------------------------------------------
bool __cdecl ItemInfoTab::IsInvincibleHammerType(ItemInfo *pkInfo)
{
  bool result; // al@2

  if ( pkInfo->TwoHand )
    result = pkInfo->WeaponType == 16;
  else
    result = 0;
  return result;
}

//----- (0066FF10) --------------------------------------------------------
const char *__cdecl ItemViewInfoTab::GetAniIconNameByID(int id)
{
  (*(void (__stdcall **)(int))(*(_DWORD *)ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable + 16))(id);
  return 0;
}
// A8C298: using guessed type int ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;

//----- (0066FF30) --------------------------------------------------------
void __cdecl ItemInfoTab::CheckCRC()
{
  int v0; // edi@1
  unsigned int v1; // esi@1
  char *v2; // ebx@2
  char *v3; // ST10_4@2
  char *v4; // ST18_4@2
  char *v5; // ST20_4@2
  char *v6; // ST28_4@2
  char *v7; // ST30_4@2
  char *v8; // STAC_4@2
  char *v9; // ST38_4@2
  char *v10; // ST40_4@2
  char *v11; // ST48_4@2
  char *v12; // ST50_4@2
  char *v13; // ST58_4@2
  char *v14; // ST60_4@2
  char *v15; // ST68_4@2
  char *v16; // ST70_4@2
  char *v17; // ST78_4@2
  char *v18; // ST80_4@2
  char *v19; // ST88_4@2
  char *v20; // ST90_4@2
  char *v21; // ST98_4@2
  char *v22; // STA0_4@2
  char *v23; // STA8_4@2
  char *v24; // STB0_4@2
  char *v25; // STB8_4@2
  char *v26; // STC0_4@2
  char *v27; // STC8_4@2
  char *v28; // STCC_4@2
  char *v29; // ST1C_4@2
  char *v30; // ST74_4@2
  char *v31; // ST44_4@2
  char *v32; // ST7C_4@2
  char *v33; // ST24_4@2
  char *v34; // ST2C_4@2
  char *v35; // ST84_4@2
  char *v36; // ST4C_4@2
  char *v37; // ST8C_4@2
  char *v38; // ST14_4@2
  char *v39; // STB4_4@2
  char *v40; // ST64_4@2
  char *v41; // STBC_4@2
  char *v42; // ST3C_4@2
  char *v43; // STC4_4@2
  char *v44; // ST6C_4@2
  char *v45; // ST94_4@2
  char *v46; // ST54_4@2
  char *v47; // ST9C_4@2
  char *v48; // ST34_4@2
  char *v49; // STA4_4@2
  char *v50; // ST5C_4@2
  char *v51; // eax@2
  int v52; // edx@2

  v0 = 0;
  v1 = 0;
  if ( ITableBase<ItemInfo,ItemInfoTab>::GetTotal() )
  {
    do
    {
      v2 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v3 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v4 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v5 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v6 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v7 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v8 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v9 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v10 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v11 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v12 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v13 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v14 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v15 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v16 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v17 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v18 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v19 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v20 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v21 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v22 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v23 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v24 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v25 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v26 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v27 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v28 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v29 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v30 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v31 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v32 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v33 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v34 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v35 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v36 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v37 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v38 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v39 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v40 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v41 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v42 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v43 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v44 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v45 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v46 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v47 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v48 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v49 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v50 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v51 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v1);
      v52 = *(_DWORD *)(v13 + 139)
          + *(_DWORD *)(v14 + 143)
          + *(_DWORD *)(v15 + 147)
          + *(_DWORD *)(v16 + 151)
          + *(_DWORD *)(v17 + 155)
          + *(_DWORD *)(v18 + 159)
          + *(_DWORD *)(v19 + 163)
          + *(_DWORD *)(v20 + 167)
          + *(_DWORD *)(v21 + 171)
          + *(_DWORD *)(v22 + 175)
          + *(_DWORD *)(v23 + 179)
          + *(_DWORD *)(v24 + 183)
          + *(_DWORD *)(v25 + 187)
          + *(_DWORD *)(v26 + 191)
          + *(_DWORD *)(v27 + 195)
          + *(_DWORD *)(v28 + 199)
          + *(_DWORD *)(v29 + 203)
          + *(_DWORD *)(v30 + 207)
          + *(_DWORD *)(v31 + 211)
          + *(_DWORD *)(v32 + 215)
          + *((_DWORD *)v34 + 55)
          + *((_DWORD *)v35 + 56)
          + *((_DWORD *)v36 + 57)
          + *((_DWORD *)v37 + 58)
          + *((_DWORD *)v38 + 59)
          + *(_DWORD *)(v45 + 250)
          + *(_DWORD *)(v46 + 254)
          + *(_DWORD *)(v47 + 258)
          + *(_DWORD *)(v48 + 262)
          + *(_DWORD *)(v49 + 266)
          + *(_DWORD *)(v50 + 270)
          + *(_DWORD *)(v51 + 274)
          + (unsigned __int8)v8[122]
          + (unsigned __int8)v33[219]
          + (unsigned __int8)v39[240]
          + *(_WORD *)(v40 + 241)
          + *(_WORD *)(v41 + 243)
          + *(_WORD *)(v42 + 245)
          + (unsigned __int8)v43[247]
          + *((_WORD *)v44 + 124);
      ++v1;
      v0 = (*(_DWORD *)(v2 + 98)
          + *(_DWORD *)(v3 + 102)
          + *(_DWORD *)(v4 + 106)
          + *(_DWORD *)(v5 + 110)
          + *(_DWORD *)(v6 + 114)
          + *(_DWORD *)(v7 + 118)
          + *(_DWORD *)(v9 + 123)
          + *(_DWORD *)(v10 + 127)
          + *(_DWORD *)(v11 + 131)
          + *(_DWORD *)(v12 + 135)
          + v52
          + v0) ^ 0x92;
    }
    while ( v1 < ITableBase<ItemInfo,ItemInfoTab>::GetTotal() );
  }
  if ( ItemInfoTab::crcSum != v0 )
    terminate();
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
// A9936C: using guessed type unsigned __int32 ItemInfoTab::crcSum;

//----- (00670520) --------------------------------------------------------
void __cdecl ItemInfoTab::GenerateCRCSum()
{
  unsigned int v0; // esi@1
  char *v1; // edi@2
  char *v2; // ebx@2
  char *v3; // ST10_4@2
  char *v4; // ST18_4@2
  char *v5; // ST20_4@2
  char *v6; // ST28_4@2
  char *v7; // ST5C_4@2
  char *v8; // ST30_4@2
  char *v9; // ST38_4@2
  char *v10; // ST40_4@2
  char *v11; // ST48_4@2
  char *v12; // ST50_4@2
  char *v13; // ST58_4@2
  char *v14; // ST60_4@2
  char *v15; // ST68_4@2
  char *v16; // ST70_4@2
  char *v17; // ST78_4@2
  char *v18; // ST80_4@2
  char *v19; // ST88_4@2
  char *v20; // ST90_4@2
  char *v21; // ST98_4@2
  char *v22; // STA0_4@2
  char *v23; // STA8_4@2
  char *v24; // STB0_4@2
  char *v25; // STB8_4@2
  char *v26; // STC0_4@2
  char *v27; // STC8_4@2
  char *v28; // ST6C_4@2
  char *v29; // ST1C_4@2
  char *v30; // ST74_4@2
  char *v31; // ST44_4@2
  char *v32; // STAC_4@2
  char *v33; // ST7C_4@2
  char *v34; // ST2C_4@2
  char *v35; // ST84_4@2
  char *v36; // ST4C_4@2
  char *v37; // ST8C_4@2
  char *v38; // ST24_4@2
  char *v39; // STB4_4@2
  char *v40; // ST64_4@2
  char *v41; // STBC_4@2
  char *v42; // ST3C_4@2
  char *v43; // STC4_4@2
  char *v44; // ST14_4@2
  char *v45; // ST94_4@2
  char *v46; // ST54_4@2
  char *v47; // ST9C_4@2
  char *v48; // ST34_4@2
  char *v49; // STA4_4@2
  char *v50; // eax@2
  int v51; // edx@2

  v0 = 0;
  ItemInfoTab::crcSum = 0;
  if ( ITableBase<ItemInfo,ItemInfoTab>::GetTotal() )
  {
    do
    {
      v1 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v2 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v3 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v4 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v5 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v6 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v7 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v8 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v9 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v10 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v11 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v12 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v13 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v14 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v15 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v16 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v17 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v18 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v19 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v20 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v21 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v22 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v23 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v24 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v25 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v26 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v27 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v28 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v29 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v30 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v31 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v32 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v33 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v34 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v35 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v36 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v37 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v38 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v39 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v40 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v41 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v42 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v43 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v44 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v45 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v46 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v47 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v48 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v49 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v50 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v51 = *(_DWORD *)(v12 + 139)
          + *(_DWORD *)(v13 + 143)
          + *(_DWORD *)(v14 + 147)
          + *(_DWORD *)(v15 + 151)
          + *(_DWORD *)(v16 + 155)
          + *(_DWORD *)(v17 + 159)
          + *(_DWORD *)(v18 + 163)
          + *(_DWORD *)(v19 + 167)
          + *(_DWORD *)(v20 + 171)
          + *(_DWORD *)(v21 + 175)
          + *(_DWORD *)(v22 + 179)
          + *(_DWORD *)(v23 + 183)
          + *(_DWORD *)(v24 + 187)
          + *(_DWORD *)(v25 + 191)
          + *(_DWORD *)(v26 + 195)
          + *(_DWORD *)(v27 + 199)
          + *(_DWORD *)(v28 + 203)
          + *(_DWORD *)(v29 + 207)
          + *(_DWORD *)(v30 + 211)
          + *(_DWORD *)(v31 + 215)
          + *((_DWORD *)v33 + 55)
          + *((_DWORD *)v34 + 56)
          + *((_DWORD *)v35 + 57)
          + *((_DWORD *)v36 + 58)
          + *((_DWORD *)v37 + 59)
          + *(_DWORD *)(v44 + 250)
          + *(_DWORD *)(v45 + 254)
          + *(_DWORD *)(v46 + 258)
          + *(_DWORD *)(v47 + 262)
          + *(_DWORD *)(v48 + 266)
          + *(_DWORD *)(v49 + 270)
          + *(_DWORD *)(v50 + 274)
          + (unsigned __int8)v7[122]
          + (unsigned __int8)v32[219]
          + (unsigned __int8)v38[240]
          + *(_WORD *)(v39 + 241)
          + *(_WORD *)(v40 + 243)
          + *(_WORD *)(v41 + 245)
          + (unsigned __int8)v42[247]
          + *((_WORD *)v43 + 124);
      ++v0;
      ItemInfoTab::crcSum = (ItemInfoTab::crcSum
                           + *(_DWORD *)(v1 + 98)
                           + *(_DWORD *)(v2 + 102)
                           + *(_DWORD *)(v3 + 106)
                           + *(_DWORD *)(v4 + 110)
                           + *(_DWORD *)(v5 + 114)
                           + *(_DWORD *)(v6 + 118)
                           + *(_DWORD *)(v8 + 123)
                           + *(_DWORD *)(v9 + 127)
                           + *(_DWORD *)(v10 + 131)
                           + *(_DWORD *)(v11 + 135)
                           + v51) ^ 0x92;
    }
    while ( v0 < ITableBase<ItemInfo,ItemInfoTab>::GetTotal() );
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
// A9936C: using guessed type unsigned __int32 ItemInfoTab::crcSum;

//----- (00670B00) --------------------------------------------------------
void __cdecl ItemInfoTab::BuildItemInfoMapByInxName()
{
  unsigned int v0; // edi@1
  const char *v1; // ecx@2
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *> *v2; // eax@2
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *v3; // esi@2
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *v4; // ST04_4@2
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *v5; // ST00_4@2
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *v6; // eax@2
  std::pair<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > >,bool> v7; // [sp+10h] [bp-58h]@3
  ItemInfo *_Val2; // [sp+18h] [bp-50h]@2
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *> result; // [sp+1Ch] [bp-4Ch]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > InxName; // [sp+3Ch] [bp-2Ch]@2
  int v11; // [sp+64h] [bp-4h]@2

  v0 = 0;
  if ( ITableBase<ItemInfo,ItemInfoTab>::GetTotal() )
  {
    do
    {
      v1 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0) + 2;
      InxName._Myres = 15;
      InxName._Mysize = 0;
      InxName._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&InxName, v1, strlen(v1));
      v11 = 0;
      _Val2 = (ItemInfo *)CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), v0);
      v2 = std::make_pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> &,ItemInfo *>(
             &result,
             &InxName,
             &_Val2);
      v3 = stru_A99374._Myhead->_Next;
      v4 = stru_A99374._Myhead->_Next->_Prev;
      v5 = stru_A99374._Myhead->_Next;
      LOBYTE(v11) = 1;
      v6 = std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ActiveSkillInfo *>>(
             v5,
             v4,
             v2);
      if ( 134217726 - stru_A99374._Mysize < 1 )
        std::_Xlength_error("list<T> too long");
      ++stru_A99374._Mysize;
      v3->_Prev = v6;
      v6->_Prev->_Next = v6;
      std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ProduceInfoTable::MaterialInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>>,0>>::_Insert(
        &ItemInfoTab::m_ItemInfoMapByInxName,
        &v7,
        &stru_A99374._Myhead->_Next->_Myval,
        (std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > >)stru_A99374._Myhead->_Next);
      if ( result.first._Myres >= 0x10 )
        operator delete(result.first._Bx._Ptr);
      result.first._Myres = 15;
      result.first._Mysize = 0;
      result.first._Bx._Buf[0] = 0;
      v11 = -1;
      if ( InxName._Myres >= 0x10 )
        operator delete(InxName._Bx._Ptr);
      ++v0;
    }
    while ( v0 < ITableBase<ItemInfo,ItemInfoTab>::GetTotal() );
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (00670C70) --------------------------------------------------------
void __thiscall std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ItemInfo *>>>::_Splice_same(std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > *this, std::_List_const_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > _Where, std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > *_Right, std::_List_const_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > _First, std::_List_const_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > _Last, unsigned int _Count)
{
  unsigned int v6; // edx@2
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *v7; // ecx@5

  if ( this != _Right )
  {
    v6 = this->_Mysize;
    if ( 134217726 - v6 < _Count )
      std::_Xlength_error("list<T> too long");
    this->_Mysize = _Count + v6;
    _Right->_Mysize -= _Count;
  }
  _First._Ptr->_Prev->_Next = _Last._Ptr;
  _Last._Ptr->_Prev->_Next = _Where._Ptr;
  _Where._Ptr->_Prev->_Next = _First._Ptr;
  v7 = _Where._Ptr->_Prev;
  _Where._Ptr->_Prev = _Last._Ptr->_Prev;
  _Last._Ptr->_Prev = _First._Ptr->_Prev;
  _First._Ptr->_Prev = v7;
}

//----- (00670CF0) --------------------------------------------------------
std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *> *__cdecl std::make_pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> &,ItemInfo *>(std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *> *result, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Val1, ItemInfo **_Val2)
{
  ItemInfo *v3; // edi@1

  v3 = *_Val2;
  result->first._Myres = 15;
  result->first._Mysize = 0;
  result->first._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&result->first, _Val1, 0, 0xFFFFFFFF);
  result->second = v3;
  return result;
}

//----- (00670D30) --------------------------------------------------------
std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > *__thiscall std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ItemInfo *>>>::erase(std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > *this, std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > *result, std::_List_const_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > _Where)
{
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *v3; // esi@1
  std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > *v4; // edi@1
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *v5; // ecx@1
  std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > *v6; // eax@4
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *_Wherea; // [sp+14h] [bp+Ch]@1

  v3 = _Where._Ptr;
  v4 = this;
  v5 = _Where._Ptr->_Next;
  _Wherea = _Where._Ptr->_Next;
  if ( v3 == v4->_Myhead )
  {
    v6 = result;
    result->_Ptr = v5;
  }
  else
  {
    v3->_Prev->_Next = v3->_Next;
    v3->_Next->_Prev = v3->_Prev;
    if ( v3->_Myval.first._Myres >= 0x10 )
      operator delete(v3->_Myval.first._Bx._Ptr);
    v3->_Myval.first._Myres = 15;
    v3->_Myval.first._Mysize = 0;
    v3->_Myval.first._Bx._Buf[0] = 0;
    operator delete(v3);
    v6 = result;
    --v4->_Mysize;
    result->_Ptr = _Wherea;
  }
  return v6;
}

//----- (00670DA0) --------------------------------------------------------
void __thiscall std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ItemInfo *>>,0>>::_Check_size(std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> >,0> > *this)
{
  std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> >,0> > *v1; // ebx@1
  double v2; // st7@1
  unsigned int v3; // esi@1
  signed int v4; // eax@2
  std::vector<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,std::allocator<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > > > *v5; // ecx@5
  std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > *v6; // edi@5
  std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > v9; // ST08_4@9
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > _Val; // [sp+8h] [bp-4h]@1

  v1 = this;
  v2 = this->_Max_bucket_size;
  v3 = this->_Maxidx;
  *(float *)&_Val._Ptr = (double)this->_List._Mysize / (double)v3;
  if ( *(float *)&_Val._Ptr > v2 )
  {
    v4 = 0;
    do
    {
      if ( v3 >= 0x1FFFFFFF )
        break;
      ++v4;
      v3 *= 2;
    }
    while ( v4 < 3 );
    v5 = (std::vector<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,std::allocator<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > > > *)&this->_Vec;
    v6 = v1->_Vec._Myfirst;
    _Val._Ptr = (std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *)v1->_List._Myhead;
    if ( v6 != v1->_Vec._Mylast )
    {
      v5 = (std::vector<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,std::allocator<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > > > *)&v1->_Vec;
      v1->_Vec._Mylast = v6;
    }
    std::vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>::_Insert_n(
      v5,
      (std::_Vector_const_iterator<std::_Vector_val<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,std::allocator<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > > > >)v5->_Myfirst,
      2 * v3,
      &_Val);
    v1->_Mask = v3 - 1;
    v9._Ptr = v1->_List._Myhead;
    v1->_Maxidx = v3;
    std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ItemInfo *>>,0>>::_Reinsert(
      v1,
      v9);
  }
}

//----- (00670E50) --------------------------------------------------------
std::pair<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > >,bool> *__thiscall std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ProduceInfoTable::MaterialInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>>,0>>::_Insert(std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> >,0> > *this, std::pair<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > >,bool> *result, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> *_Val, std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > _Plist)
{
  std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> >,0> > *v4; // ebx@1
  unsigned int v5; // esi@1
  int v6; // eax@1
  int v7; // edi@1
  std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > *v8; // edx@3
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *v9; // ecx@3
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *v10; // esi@3
  int v11; // eax@3
  std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > *v12; // edx@3
  unsigned int v13; // ebx@5
  unsigned int v14; // edi@6
  const char *v15; // eax@6
  unsigned int v16; // edx@8
  const char *v17; // ecx@10
  int v18; // eax@12
  bool v19; // sf@12
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *v20; // ecx@18
  std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > *v21; // eax@20
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *v22; // edx@20
  int v23; // eax@20
  const char *v24; // eax@23
  std::pair<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > >,bool> *v25; // eax@27
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *v26; // edx@30
  int v27; // eax@31
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *v28; // [sp+Ch] [bp-14h]@3
  unsigned int v29; // [sp+10h] [bp-10h]@5
  std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > *v30; // [sp+14h] [bp-Ch]@3
  std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> >,0> > *v31; // [sp+18h] [bp-8h]@1
  int v32; // [sp+1Ch] [bp-4h]@1

  v4 = this;
  v5 = this->_Mask;
  v31 = this;
  v6 = stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::operator()(&_Val->first);
  v7 = v5 & v6;
  v32 = v5 & v6;
  if ( v4->_Maxidx <= (v5 & v6) )
  {
    v7 += -1 - (v5 >> 1);
    v32 = v7;
  }
  v8 = v4->_Vec._Myfirst;
  v9 = v8[2 * v7]._Ptr;
  v10 = v4->_List._Myhead;
  v11 = (int)&v8[2 * v7];
  v12 = &v4->_List;
  v28 = v9;
  v30 = &v4->_List;
  if ( v10 == v9
    || (v10 = **(std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node ***)(v11 + 4),
        v10 == v9) )
  {
LABEL_18:
    v20 = _Plist._Ptr;
    if ( v10 != _Plist._Ptr->_Next )
    {
      std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ItemInfo *>>>::_Splice_same(
        v12,
        (std::_List_const_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > >)v10,
        v12,
        (std::_List_const_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > >)_Plist._Ptr,
        (std::_List_const_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > >)_Plist._Ptr->_Next,
        1u);
      v20 = _Plist._Ptr;
    }
    v21 = v4->_Vec._Myfirst;
    v22 = v21[2 * v7]._Ptr;
    v23 = (int)&v21[2 * v7];
    if ( v22 == v30->_Myhead )
    {
      *(_DWORD *)v23 = v20;
      v31->_Vec._Myfirst[2 * v32 + 1]._Ptr = v20;
    }
    else if ( v22 == v10 )
    {
      *(_DWORD *)v23 = v20;
    }
    else
    {
      v26 = **(std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node ***)(v23 + 4);
      *(_DWORD *)(v23 + 4) = v26;
      if ( v26 != v20 )
      {
        v27 = (int)&v31->_Vec._Myfirst[2 * v32 + 1];
        *(_DWORD *)v27 = *(_DWORD *)(*(_DWORD *)v27 + 4);
      }
    }
    std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ItemInfo *>>,0>>::_Check_size(v31);
    v25 = result;
    result->first = _Plist;
    result->second = 1;
    return v25;
  }
  v13 = _Val->first._Mysize;
  v29 = _Val->first._Myres;
  while ( 1 )
  {
    v10 = v10->_Prev;
    v14 = v10->_Myval.first._Mysize;
    v15 = v10->_Myval.first._Bx._Buf;
    if ( v10->_Myval.first._Myres >= 0x10 )
      v15 = *(const char **)v15;
    v16 = v13;
    if ( v13 >= v14 )
      v16 = v10->_Myval.first._Mysize;
    v17 = (const char *)_Val;
    if ( v29 >= 0x10 )
      v17 = _Val->first._Bx._Ptr;
    v18 = std::char_traits<char>::compare(v17, v15, v16);
    v19 = v18 < 0;
    if ( v18 )
      break;
    if ( v13 >= v14 )
    {
      LOBYTE(v18) = v13 != v14;
      v19 = v18 < 0;
      break;
    }
LABEL_16:
    if ( v10 == v28 )
      goto LABEL_17;
  }
  if ( v19 )
    goto LABEL_16;
  if ( v29 < 0x10 )
    v24 = (const char *)_Val;
  else
    v24 = _Val->first._Bx._Ptr;
  if ( std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
         &v10->_Myval.first,
         0,
         v10->_Myval.first._Mysize,
         v24,
         v13) < 0 )
  {
    v10 = v10->_Next;
LABEL_17:
    v4 = v31;
    v7 = v32;
    v12 = v30;
    goto LABEL_18;
  }
  std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ItemInfo *>>>::erase(
    v30,
    (std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > *)&_Val,
    (std::_List_const_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > >)_Plist._Ptr);
  v25 = result;
  result->first._Ptr = v10;
  result->second = 0;
  return v25;
}

//----- (00670FD0) --------------------------------------------------------
void __thiscall std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ItemInfo *>>,0>>::_Reinsert(std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> >,0> > *this, std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > _Last)
{
  std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> >,0> > *v2; // esi@1
  std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > v3; // ST08_4@3
  bool v4; // bl@3
  std::pair<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > >,bool> result; // [sp+4h] [bp-8h]@3
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *_Lasta; // [sp+14h] [bp+8h]@2

  v2 = this;
  if ( this->_List._Myhead->_Next != _Last._Ptr )
  {
    _Lasta = _Last._Ptr->_Prev;
    do
    {
      v3._Ptr = v2->_List._Myhead->_Next;
      v4 = v3._Ptr == _Lasta;
      std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ProduceInfoTable::MaterialInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>>,0>>::_Insert(
        v2,
        &result,
        &v3._Ptr->_Myval,
        v3);
    }
    while ( !v4 );
  }
}

//----- (00671020) --------------------------------------------------------
void __thiscall std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ProduceInfoTable::MaterialInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>>,0>>::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ProduceInfoTable::MaterialInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>>,0>>(std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> >,0> > *this, stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *_Parg, std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > *_Al)
{
  std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> >,0> > *v3; // esi@1
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *v4; // eax@1
  std::vector<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,std::allocator<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > > > *v5; // ecx@2
  stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *v6; // edx@2
  std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > *v7; // edi@2
  std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > *v8; // eax@2
  std::exception pExceptionObject; // [sp+10h] [bp-1Ch]@7
  std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> >,0> > *v12; // [sp+1Ch] [bp-10h]@1
  int v13; // [sp+28h] [bp-4h]@2

  v3 = this;
  v12 = this;
  this->comp = (stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >)_Parg->comp.0;
  this->_List._Mysize = 0;
  v4 = (std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *)operator new(0x28u);
  if ( !v4 )
  {
    _Parg = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Parg);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v3->_List._Myhead = v4;
  v4->_Next = v4;
  v3->_List._Myhead->_Prev = v3->_List._Myhead;
  v5 = (std::vector<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,std::allocator<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > > > *)&v3->_Vec;
  v13 = 0;
  v5->_Myfirst = 0;
  v5->_Mylast = 0;
  v5->_Myend = 0;
  v6 = (stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)v3->_List._Myhead;
  v3->_Max_bucket_size = 1.0;
  v7 = v3->_Vec._Myfirst;
  v8 = v3->_Vec._Mylast;
  LOBYTE(v13) = 1;
  _Parg = v6;
  if ( v7 != v8 )
    v3->_Vec._Mylast = v7;
  std::vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>::_Insert_n(
    v5,
    (std::_Vector_const_iterator<std::_Vector_val<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,std::allocator<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > > > >)v5->_Myfirst,
    0x10u,
    (std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *)&_Parg);
  v3->_Mask = 7;
  v3->_Maxidx = 8;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00671110) --------------------------------------------------------
void __thiscall ItemRepairWin::~ItemRepairWin(ItemRepairWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ItemRepairWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ItemRepairWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9BBE08: using guessed type void (__thiscall *ItemRepairWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9BBE24: using guessed type int (__thiscall *ItemRepairWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00671130) --------------------------------------------------------
void __thiscall ItemRepairWin::OnCommand(ItemRepairWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0xBu:
      ((void (*)(void))this->vfptr[136].__vecDelDtor)();
      break;
    case 0xCu:
      ((void (*)(void))this->vfptr[137].__vecDelDtor)();
      break;
    case 0xDu:
      ((void (*)(void))this->vfptr[138].__vecDelDtor)();
      break;
  }
}

//----- (00671180) --------------------------------------------------------
void __thiscall ItemRepairWin::OnClickWinCloseBtn(ItemRepairWin *this)
{
  ((void (*)(void))this->vfptr[138].__vecDelDtor)();
}

//----- (00671190) --------------------------------------------------------
void __thiscall ItemRepairWin::Initialize(ItemRepairWin *this)
{
  this->m_bSentPacket = 0;
  this->m_pkRepairKit = 0;
  this->m_pkRepairItem = 0;
  this->m_wRepairKitValue = 0;
  this->m_dwCurrentCharged = 0;
  this->m_wMaxCharged = 0;
  this->m_pkMsgBox = 0;
}

//----- (006711D0) --------------------------------------------------------
void __thiscall ItemRepairWin::ItemRepairWin(ItemRepairWin *this)
{
  ItemRepairWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_bSentPacket = 0;
  v1->m_pkRepairKit = 0;
  v1->m_pkRepairItem = 0;
  v1->m_dwCurrentCharged = 0;
  v1->m_pkMsgBox = 0;
  v1->m_pkItemIconWin = 0;
  v1->vfptr = (NiRefObjectVtbl *)&ItemRepairWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ItemRepairWin::`vftable'{for `IDirectMessenger'};
  v1->m_wRepairKitValue = 0;
  v1->m_wMaxCharged = 0;
}
// 9BBE08: using guessed type void (__thiscall *ItemRepairWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9BBE24: using guessed type int (__thiscall *ItemRepairWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00671230) --------------------------------------------------------
void __thiscall ItemRepairWin::UpdateMeWin(ItemRepairWin *this, float fCurTime)
{
  ItemRepairWin *v2; // esi@1
  ItemInfoWin *v3; // ecx@2
  Item *v4; // esi@3

  v2 = this;
  if ( (unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD))this->m_pkItemIconWin->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY) )
  {
    v3 = (ItemInfoWin *)v2->m_pkItemIconWin->m_pkToolTipWin;
    if ( v3 )
    {
      v4 = v2->m_pkRepairItem;
      if ( v4 )
        ItemInfoWin::SetItemInfo(v3, v4);
    }
  }
}

//----- (00671280) --------------------------------------------------------
void __usercall ItemRepairWin::OnShowWin(ItemRepairWin *this@<ecx>, int a2@<edi>)
{
  ItemRepairWin *v2; // esi@1
  Item *v3; // eax@1
  int v4; // ST0C_4@3
  NiRefObjectVtbl *v5; // edi@3
  char *v6; // eax@3
  NiRefObjectVtbl *v7; // ST18_4@3
  float iChargedPercentage; // ST1C_4@3

  v2 = this;
  v3 = this->m_pkRepairItem;
  if ( v3 )
  {
    if ( this->m_pkRepairKit )
    {
      v4 = a2;
      ItemIcon::SetItemAsID(this->m_pkItemIconWin, a2, v3->m_kStruct.itemid);
      v5 = v2->m_pkTextFieldWin[1]->vfptr;
      v6 = fs("%d", v2->m_wRepairKitValue);
      ((void (__thiscall *)(PgWinText *, char *, int))v5[118].__vecDelDtor)(v2->m_pkTextFieldWin[1], v6, v4);
      v7 = v2->m_pkTextFieldWin[2]->vfptr;
      iChargedPercentage = (double)v2->m_dwCurrentCharged / (double)v2->m_wMaxCharged * 100.0;
      fs("(%d/%d) (%d%%)", v2->m_dwCurrentCharged, v2->m_wMaxCharged, (signed int)iChargedPercentage);
      ((void (__thiscall *)(PgWinText *))v7[118].__vecDelDtor)(v2->m_pkTextFieldWin[2]);
    }
  }
}
// 671280: could not find valid save-restore pair for edi

//----- (00671350) --------------------------------------------------------
void __thiscall ItemRepairWin::SetLockRepairItem(ItemRepairWin *this, ITEM_INVEN kFrom, bool bLock)
{
  if ( kFrom.Inven >> 10 == 8 )
  {
    InvWin::SetLock(*((InvWin **)this->m_pkFrameWork[19].m_BackFrameID + (kFrom.Inven & 0x3FF) + 279), bLock);
  }
  else if ( kFrom.Inven >> 10 == 9 )
  {
    InvWin::SetLock(*((InvWin **)this->m_pkFrameWork[19].m_BackFrameID + (kFrom.Inven & 0x3FF) + 87), bLock);
  }
}

//----- (006713C0) --------------------------------------------------------
char __thiscall ItemRepairWin::Create(ItemRepairWin *this, PgFrameWork *pkFrameWork)
{
  ItemRepairWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiNode *v5; // eax@3
  NiNode *v6; // esi@7
  bool v7; // zf@8
  char result; // al@11
  PgSprData *v9; // eax@12
  NiNode *v10; // esi@13
  int v11; // edi@18
  int v12; // ebx@18
  NiSourceTexture *v13; // eax@18
  PgSprData *v14; // eax@19
  NiSourceTexture *v15; // eax@21
  PgSprData *v16; // eax@21
  PgFont *v17; // eax@25
  PgWinText *v18; // edi@25
  NiUnsharedGeometryGroup *v19; // eax@25
  PgSprData *v20; // eax@25
  int v21; // edi@25
  PgSprData *v22; // eax@25
  NiPointer<PgSprData::PgHitTester> *v23; // ecx@25
  unsigned int v24; // ST70_4@25
  PgFont *v25; // eax@25
  PgWinText *v26; // edi@25
  NiUnsharedGeometryGroup *v27; // eax@25
  PgSprData *v28; // edi@25
  NiPointer<PgSprData::PgHitTester> *v29; // edx@25
  unsigned int v30; // edi@25
  PgFont *v31; // eax@25
  PgWinText *v32; // edi@25
  NiRefObjectVtbl *v33; // ebx@25
  NiUnsharedGeometryGroup *v34; // eax@25
  PgSprData::PgHitTester *v35; // eax@25
  unsigned int v36; // edi@25
  unsigned int v37; // ebx@25
  PgFont *v38; // eax@25
  PgWinText *v39; // edi@25
  NiRefObjectVtbl *v40; // ebx@25
  NiUnsharedGeometryGroup *v41; // eax@25
  NiPointer<PgSprData::PgHitTester> *v42; // ecx@25
  unsigned int v43; // edi@25
  unsigned int v44; // ebx@25
  PgFont *v45; // eax@25
  PgWinText *v46; // edi@25
  NiRefObjectVtbl *v47; // ebx@25
  NiUnsharedGeometryGroup *v48; // eax@25
  PgSprData::PgHitTester *v49; // eax@25
  unsigned int v50; // edi@25
  unsigned int v51; // ebx@25
  PgFont *v52; // eax@25
  PgWinText *v53; // eax@25
  NiPointer<PgSprData::PgHitTester> *v54; // ecx@25
  unsigned int v55; // edi@25
  unsigned int v56; // ebx@25
  PgFont *v57; // eax@25
  PgWinText *v58; // eax@25
  ItemIcon *v59; // eax@25
  NiNode *v60; // esi@26
  unsigned int uiWidth; // [sp+74h] [bp-24h]@21
  unsigned int uiHeight; // [sp+78h] [bp-20h]@21
  int iYOff; // [sp+7Ch] [bp-1Ch]@18
  NiPointer<NiNode> spNode; // [sp+80h] [bp-18h]@1
  int iLeft; // [sp+84h] [bp-14h]@12
  int iTop; // [sp+88h] [bp-10h]@12
  int v67; // [sp+94h] [bp-4h]@1
  PgSprData *pkSprData; // [sp+A0h] [bp+8h]@25
  PgSprData *pkSprDataa; // [sp+A0h] [bp+8h]@25
  PgSprData *pkSprDatab; // [sp+A0h] [bp+8h]@25
  PgSprData *pkSprDatac; // [sp+A0h] [bp+8h]@25
  PgSprData *pkSprDatad; // [sp+A0h] [bp+8h]@25
  PgSprData *pkSprDatae; // [sp+A0h] [bp+8h]@25

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v67 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\MyHomeRepairKit.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = spNode.m_pObject;
  if ( !spNode.m_pObject )
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("Game\\MyHomeRepairKit.nif load fail", "LoadFail", 0);
      v5 = spNode.m_pObject;
    }
    v67 = -1;
    if ( !v5 )
      return 0;
    v6 = v5;
    if ( InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      return 0;
    v7 = v6 == 0;
    goto LABEL_9;
  }
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iLeft, &iTop, 0);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "ItemRepairWin", 0) )
  {
    v11 = iTop;
    v12 = iLeft;
    iYOff = iTop;
    v13 = MenuTexMgr::GetTexture(0x13u);
    if ( v13 )
      v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, v13);
    else
      v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft - v12, iTop - v11, v14, (PgWin *)&v2->vfptr, 0, 0);
    v15 = MenuTexMgr::GetTexture(4u);
    v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &iLeft, &iTop, v15);
    PgWinSpr::CreateWin(iLeft - v12, iTop - v11, v16, (PgWin *)&v2->vfptr, 0, 0);
    if ( !PgUtil::GetTriShapeRect(
            (NiAVObject *)&spNode.m_pObject->vfptr,
            "WinTitle",
            &iLeft,
            &iTop,
            &uiWidth,
            &uiHeight) )
    {
      v6 = spNode.m_pObject;
      v67 = -1;
      if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
        return 0;
      v7 = v6 == 0;
LABEL_9:
      if ( !v7 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      return 0;
    }
    v17 = Font::Get(MAIN_MENU);
    v18 = PgWinText::CreateWin(iLeft - v12, iTop - v11, uiWidth, uiHeight, v17, (PgWin *)&v2->vfptr, 0, 0);
    v18->vfptr[122].__vecDelDtor((NiRefObject *)v18, 1u);
    v18->vfptr[117].__vecDelDtor((NiRefObject *)v18, (unsigned int)&Color::m_kDxWinTitleColor);
    pkSprData = (PgSprData *)v18->vfptr;
    v19 = TextData2::Get(0x308D77B0u);
    ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkSprData[5].m_akHitTester.m_uiGrowBy)(v18, v19);
    v18->vfptr[60].__vecDelDtor((NiRefObject *)v18, 0);
    v20 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iLeft, &iTop, 0);
    v21 = iYOff;
    PgWinSpr::CreateWin(iLeft - v12, iTop - iYOff, v20, (PgWin *)&v2->vfptr, 0, 0);
    v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane", &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft - v12, iTop - v21, v22, (PgWin *)&v2->vfptr, 0, 0);
    pkSprDataa = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &iLeft, &iTop, 0);
    PgSprData::Add(pkSprDataa, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
    PgSprData::Add(pkSprDataa, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
    PgWinBut::CreateWin(iLeft - v12, iTop - v21, pkSprDataa, (PgWin *)&v2->vfptr, 0xBu, 0, 0);
    pkSprDatab = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Nor", &iLeft, &iTop, 0);
    PgSprData::Add(pkSprDatab, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
    PgSprData::Add(pkSprDatab, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
    PgWinBut::CreateWin(iLeft - v12, iTop - v21, pkSprDatab, (PgWin *)&v2->vfptr, 0xCu, 0, 0);
    v23 = pkSprDatab->m_akHitTester.m_pBase;
    pkSprDatac = (PgSprData *)v23->m_pObject->m_uiHeight;
    v24 = v23->m_pObject->m_uiWidth;
    v25 = Font::Get(MAIN_MENU);
    v26 = PgWinText::CreateWin(iLeft - v12, iTop - v21, v24, (unsigned int)pkSprDatac, v25, (PgWin *)&v2->vfptr, 0, 0);
    v26->vfptr[122].__vecDelDtor((NiRefObject *)v26, 5u);
    pkSprDatad = (PgSprData *)v26->vfptr;
    v27 = TextData::Get(0x4F5F499Fu);
    ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkSprDatad[5].m_akHitTester.m_uiGrowBy)(v26, v27);
    v26->vfptr[60].__vecDelDtor((NiRefObject *)v26, 0);
    v28 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Nor", &iLeft, &iTop, 0);
    PgSprData::Add(v28, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Click");
    PgSprData::Add(v28, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Over");
    PgWinBut::CreateWin(iLeft - v12, iTop - iYOff, v28, (PgWin *)&v2->vfptr, 0xDu, 0, 0);
    v29 = v28->m_akHitTester.m_pBase;
    v30 = v29->m_pObject->m_uiHeight;
    pkSprDatae = (PgSprData *)v29->m_pObject->m_uiWidth;
    v31 = Font::Get(MAIN_MENU);
    v32 = PgWinText::CreateWin(iLeft - v12, iTop - iYOff, (unsigned int)pkSprDatae, v30, v31, (PgWin *)&v2->vfptr, 0, 0);
    v32->vfptr[122].__vecDelDtor((NiRefObject *)v32, 5u);
    v33 = v32->vfptr;
    v34 = TextData::Get(0x88A297E1);
    v33[118].__vecDelDtor((NiRefObject *)v32, (unsigned int)v34);
    v32->vfptr[60].__vecDelDtor((NiRefObject *)v32, 0);
    v35 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text02", &iLeft, &iTop, 0)->m_akHitTester.m_pBase->m_pObject;
    v36 = v35->m_uiHeight;
    v37 = v35->m_uiWidth;
    v38 = Font::Get(MAIN_MENU);
    v39 = PgWinText::CreateWin(iLeft, iTop, v37, v36, v38, (PgWin *)&v2->vfptr, 0, 0);
    v39->vfptr[122].__vecDelDtor((NiRefObject *)v39, 5u);
    v40 = v39->vfptr;
    v41 = TextData2::Get(0x57819E74u);
    v40[118].__vecDelDtor((NiRefObject *)v39, (unsigned int)v41);
    v39->vfptr[60].__vecDelDtor((NiRefObject *)v39, 0);
    v42 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text03", &iLeft, &iTop, 0)->m_akHitTester.m_pBase;
    v43 = v42->m_pObject->m_uiHeight;
    v44 = v42->m_pObject->m_uiWidth;
    v45 = Font::Get(MAIN_MENU);
    v46 = PgWinText::CreateWin(iLeft, iTop, v44, v43, v45, (PgWin *)&v2->vfptr, 0, 0);
    v46->vfptr[122].__vecDelDtor((NiRefObject *)v46, 5u);
    v47 = v46->vfptr;
    v48 = TextData2::Get(0xD8B71D1A);
    v47[118].__vecDelDtor((NiRefObject *)v46, (unsigned int)v48);
    v46->vfptr[60].__vecDelDtor((NiRefObject *)v46, 0);
    v49 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextVal02", &iLeft, &iTop, 0)->m_akHitTester.m_pBase->m_pObject;
    v50 = v49->m_uiHeight;
    v51 = v49->m_uiWidth;
    v52 = Font::Get(MAIN_MENU);
    v53 = PgWinText::CreateWin(iLeft, iTop, v51, v50, v52, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkTextFieldWin[1] = v53;
    v53->vfptr[122].__vecDelDtor((NiRefObject *)v53, 5u);
    ((void (__stdcall *)(void *))v2->m_pkTextFieldWin[1]->vfptr[118].__vecDelDtor)(&unk_9BBCC1);
    ((void (__stdcall *)(_DWORD))v2->m_pkTextFieldWin[1]->vfptr[60].__vecDelDtor)(0);
    v54 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextVal03", &iLeft, &iTop, 0)->m_akHitTester.m_pBase;
    v55 = v54->m_pObject->m_uiHeight;
    v56 = v54->m_pObject->m_uiWidth;
    v57 = Font::Get(MAIN_MENU);
    v58 = PgWinText::CreateWin(iLeft, iTop, v56, v55, v57, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkTextFieldWin[2] = v58;
    v58->vfptr[122].__vecDelDtor((NiRefObject *)v58, 5u);
    ((void (__stdcall *)(void *))v2->m_pkTextFieldWin[2]->vfptr[118].__vecDelDtor)(&unk_9BBCC2);
    ((void (__stdcall *)(_DWORD))v2->m_pkTextFieldWin[2]->vfptr[60].__vecDelDtor)(0);
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "InvItemSlot001",
      &iLeft,
      &iTop,
      &uiWidth,
      &uiHeight);
    PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "InvItemSlot001", &iLeft, &iTop, 0);
    v59 = ItemIcon::CreateWin(iLeft, iTop, (PgWin *)&v2->vfptr);
    v2->m_pkItemIconWin = v59;
    v59->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
    ((void (__thiscall *)(ItemRepairWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    v67 = -1;
    if ( spNode.m_pObject )
    {
      v60 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v60 )
          v60->vfptr->__vecDelDtor((NiRefObject *)v60, 1u);
      }
    }
    result = 1;
  }
  else
  {
    v10 = spNode.m_pObject;
    v67 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v10 )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00671B80) --------------------------------------------------------
void __thiscall ItemRepairWin::OnClickOKBtn(ItemRepairWin *this)
{
  ItemRepairWin *v1; // esi@1
  int v2; // eax@1
  unsigned int v3; // ecx@1
  GameFrameWork *v4; // esi@3
  NiUnsharedGeometryGroup *v5; // eax@3
  char *v6; // eax@7
  MsgBox *v7; // eax@7
  bool v8; // zf@8
  char v9; // al@8
  unsigned int v10; // [sp-4h] [bp-Ch]@2
  int v11; // [sp+0h] [bp-8h]@0
  PROTO_NC_ITEM_SHIELDENDURE_CHARGE_REQ kProto; // [sp+4h] [bp-4h]@8

  v1 = this;
  v2 = this->m_wMaxCharged;
  v3 = this->m_dwCurrentCharged;
  if ( v3 == v2 )
  {
    v10 = 492846737;
LABEL_3:
    v4 = (GameFrameWork *)v1->m_pkFrameWork;
    v5 = TextData2::Get(v10);
    GameFrameWork::AddSysMsg(v4, (const char *)v5);
    return;
  }
  if ( v1->m_bSentPacket )
  {
    v10 = 123673116;
    goto LABEL_3;
  }
  if ( v1->m_wRepairKitValue <= v2 - v3 )
  {
    v8 = (unsigned __int8)((int (__stdcall *)(int))v1->m_pkRepairItem->vfptr[1].__vecDelDtor)(v11) == 26;
    v9 = v1->m_byRepairKitSlot;
    kProto.ShieldSlot.Inven = v1->ms_ItemSlot.Inven;
    kProto.ChargingSlot = v9;
    if ( v8 )
    {
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x35u, &kProto, 3);
      v1->m_bSentPacket = 1;
    }
    else
    {
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x64u, &kProto, 3);
      v1->m_bSentPacket = 1;
    }
  }
  else
  {
    v6 = (char *)TextData2::Get(0xD8461A2B);
    v7 = MsgBox::Modal(MSGBOX_OKCANCEL, v6);
    v1->m_pkMsgBox = v7;
    ((void (__stdcall *)(IDirectMessengerVtbl **))v7->vfptr->SetMsgHooker)(&v1->vfptr);
  }
}

//----- (00671C70) --------------------------------------------------------
void __thiscall ItemRepairWin::CancelItemRepair(ItemRepairWin *this)
{
  ItemRepairWin *v1; // esi@1
  PgWin *v2; // edi@1
  GameFrameWork *v3; // edi@7
  NiUnsharedGeometryGroup *v4; // eax@7
  NiRefObjectVtbl *v5; // edx@7
  void *(__thiscall *v6)(NiRefObject *, unsigned int); // eax@7

  v1 = this;
  unk_B2534C = 0;
  v2 = (PgWin *)this->m_pkFrameWork[19].m_BackFrameID;
  InventoryWin::ms_uiMode = 0;
  if ( this->m_pkRepairKit )
    InvWin::SetLock((InvWin *)LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][this->m_byRepairKitSlot + 2]), 0);
  if ( v1->m_pkRepairItem )
    ItemRepairWin::SetLockRepairItem(v1, v1->ms_ItemSlot, 0);
  if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[65].__vecDelDtor)(v2) )
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, v2);
    GameFrameWork::OpenInventoryWin((GameFrameWork *)v1->m_pkFrameWork);
  }
  v3 = (GameFrameWork *)v1->m_pkFrameWork;
  v4 = TextData2::Get(0x6EE2F3B5u);
  GameFrameWork::AddSysMsg(v3, (const char *)v4);
  v5 = v1->vfptr;
  v1->m_wRepairKitValue = 0;
  v6 = v5[65].__vecDelDtor;
  v1->m_wMaxCharged = 0;
  v1->m_bSentPacket = 0;
  v1->m_pkRepairKit = 0;
  v1->m_pkRepairItem = 0;
  v1->m_dwCurrentCharged = 0;
  v1->m_pkMsgBox = 0;
  if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v6)(v1) )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (00671D60) --------------------------------------------------------
void __thiscall ItemRepairWin::CompleteItemRepair(ItemRepairWin *this)
{
  ItemRepairWin *v1; // esi@1
  PgWin *v2; // edi@1
  GameFrameWork *v3; // edi@7
  NiUnsharedGeometryGroup *v4; // eax@7
  NiRefObjectVtbl *v5; // edx@7
  void *(__thiscall *v6)(NiRefObject *, unsigned int); // eax@7

  v1 = this;
  unk_B2534C = 0;
  v2 = (PgWin *)this->m_pkFrameWork[19].m_BackFrameID;
  InventoryWin::ms_uiMode = 0;
  if ( this->m_pkRepairKit )
    InvWin::SetLock((InvWin *)LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][this->m_byRepairKitSlot + 2]), 0);
  if ( v1->m_pkRepairItem )
    ItemRepairWin::SetLockRepairItem(v1, v1->ms_ItemSlot, 0);
  if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[65].__vecDelDtor)(v2) )
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, v2);
    GameFrameWork::OpenInventoryWin((GameFrameWork *)v1->m_pkFrameWork);
  }
  v3 = (GameFrameWork *)v1->m_pkFrameWork;
  v4 = TextData2::Get(0x2F2F8D8Cu);
  GameFrameWork::AddSysMsg(v3, (const char *)v4);
  v5 = v1->vfptr;
  v1->m_wRepairKitValue = 0;
  v6 = v5[65].__vecDelDtor;
  v1->m_wMaxCharged = 0;
  v1->m_bSentPacket = 0;
  v1->m_pkRepairKit = 0;
  v1->m_pkRepairItem = 0;
  v1->m_dwCurrentCharged = 0;
  v1->m_pkMsgBox = 0;
  if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v6)(v1) )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (00671E50) --------------------------------------------------------
void __thiscall ItemRepairWin::SetRepairItemSlot(ItemRepairWin *this, ITEM_INVEN kFrom)
{
  ItemRepairWin *v2; // esi@1
  unsigned int v3; // eax@2
  Item *v4; // eax@3
  unsigned int v5; // eax@6
  char v6; // al@10
  unsigned __int16 v7; // ax@12
  Item *v8; // ecx@12

  v2 = this;
  this->ms_ItemSlot = kFrom;
  if ( kFrom.Inven >> 10 == 8 )
  {
    v3 = kFrom.Inven & 0x3FF;
    if ( v3 < 0x1E )
      v4 = g_kInventory.m_aspEquip[v3].m_pObject;
    else
      v4 = 0;
LABEL_9:
    this->m_pkRepairItem = v4;
    goto LABEL_10;
  }
  if ( kFrom.Inven >> 10 == 9 )
  {
    v5 = kFrom.Inven & 0x3FF;
    if ( v5 < 0xC0 )
      v4 = g_kInventory.m_aspInv[v5].m_pObject;
    else
      v4 = 0;
    goto LABEL_9;
  }
LABEL_10:
  ItemRepairWin::SetLockRepairItem(this, kFrom, 1);
  v6 = ((int (*)(void))v2->m_pkRepairItem->vfptr[1].__vecDelDtor)();
  if ( v6 == 26 || v6 == 37 )
  {
    v7 = ((int (*)(void))v2->m_pkRepairItem->vfptr[21].__vecDelDtor)();
    v8 = v2->m_pkRepairItem;
    v2->m_wMaxCharged = v7;
    v2->m_dwCurrentCharged = ((int (*)(void))v8->vfptr[19].__vecDelDtor)();
  }
}

//----- (00671F00) --------------------------------------------------------
void __thiscall ItemRepairWin::DirectMessage(ItemRepairWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  ItemRepairWin *v4; // esi@1
  char v5; // al@4
  char v6; // al@5
  char v7; // al@7

  v4 = this;
  if ( iMsgTag == 27 && pvBody )
  {
    if ( *(_DWORD *)pvBody )
    {
      ItemRepairWin::CancelItemRepair((ItemRepairWin *)((char *)this - 232));
    }
    else
    {
      v5 = (*(int (**)(void))(*(_DWORD *)LODWORD(this->m_kWorld.m_Rotate.m_pEntry[1][1]) + 4))();
      if ( v5 == 26 )
      {
        v6 = LOBYTE(v4->m_kWorld.m_Rotate.m_pEntry[1][2]);
        *(_WORD *)((char *)&iMsgTag + 1) = *(_WORD *)((char *)&v4->m_kWorld.m_Rotate.m_pEntry[1][2] + 1);
        LOBYTE(iMsgTag) = v6;
        NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x35u, &iMsgTag, 3);
      }
      else if ( v5 == 37 )
      {
        v7 = LOBYTE(v4->m_kWorld.m_Rotate.m_pEntry[1][2]);
        *(_WORD *)((char *)&iMsgTag + 1) = *(_WORD *)((char *)&v4->m_kWorld.m_Rotate.m_pEntry[1][2] + 1);
        LOBYTE(iMsgTag) = v7;
        NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x64u, &iMsgTag, 3);
      }
    }
  }
}

//----- (00671F90) --------------------------------------------------------
void __thiscall ItemRepairWin::OnClickCancelBtn(ItemRepairWin *this)
{
  ItemRepairWin *v1; // esi@1
  PgFrameWork *v2; // eax@1

  v1 = this;
  unk_B2534C = 0;
  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
  {
    if ( v2[19].m_BackFrameID )
    {
      ItemRepairWin::CancelItemRepair(v1);
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
    }
  }
}

//----- (00671FD0) --------------------------------------------------------
void __thiscall ItemRepairWin::SetItemRepairKitSlot(ItemRepairWin *this, char byKitSlot)
{
  ItemRepairWin *v2; // esi@1
  Item *v3; // eax@2
  ChargedItemEffect *v4; // eax@4

  v2 = this;
  this->m_byRepairKitSlot = byKitSlot;
  if ( (unsigned __int8)byKitSlot < 0xC0u )
    v3 = g_kInventory.m_aspInv[(unsigned __int8)byKitSlot].m_pObject;
  else
    v3 = 0;
  this->m_pkRepairKit = v3;
  v4 = ChargedEffectTable::GetByInxName(v3->m_pkInfo->InxName);
  if ( v4 )
  {
    if ( v4->EffectEnum == 27 )
      v2->m_wRepairKitValue = v4->EffectValue;
  }
}

//----- (00672030) --------------------------------------------------------
ItemRepairWin *__cdecl ItemRepairWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  ItemRepairWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x188u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    ItemRepairWin::ItemRepairWin((ItemRepairWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (ItemRepairWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00672160) --------------------------------------------------------
ItemRepairWin *__thiscall ItemRepairWin::`vector deleting destructor'(ItemRepairWin *this, unsigned int a2)
{
  ItemRepairWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ItemRepairWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ItemRepairWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BBE08: using guessed type void (__thiscall *ItemRepairWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9BBE24: using guessed type int (__thiscall *ItemRepairWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006721C0) --------------------------------------------------------
void __stdcall ItemRepairTask::On_Recv_NC_ITEM_WEAPONENDURESET_CMD(PROTO_NC_ITEM_WEAPONENDURESET_CMD *pkCmd)
{
  Item *v2; // eax@1

  v2 = Inventory::GetEquipedWeaponAcc(&g_kInventory);
  if ( v2 )
    v2->vfptr[20].__vecDelDtor((NiRefObject *)v2, pkCmd->ChargedNumber);
}

//----- (006721F0) --------------------------------------------------------
void __stdcall ItemRepairTask::On_Recv_NC_ITEM_SHIELDENDURESET_CMD(PROTO_NC_ITEM_SHIELDENDURESET_CMD *pkCmd)
{
  Item *v2; // eax@1

  v2 = Inventory::GetEquipedShieldAcc(&g_kInventory);
  if ( v2 )
    v2->vfptr[20].__vecDelDtor((NiRefObject *)v2, pkCmd->ChargedNumber);
}

//----- (00672220) --------------------------------------------------------
void __cdecl ItemRepairTask::Terminate()
{
  void (__thiscall ***v0)(_DWORD, _DWORD); // esi@1

  v0 = (void (__thiscall ***)(_DWORD, _DWORD))ItemRepairTask::ms_spItemRepairTask;
  if ( ItemRepairTask::ms_spItemRepairTask )
  {
    if ( !InterlockedDecrement((volatile LONG *)(ItemRepairTask::ms_spItemRepairTask + 4)) )
    {
      if ( v0 )
        (**v0)(v0, 1);
    }
    ItemRepairTask::ms_spItemRepairTask = 0;
  }
}
// A9939C: using guessed type int ItemRepairTask::ms_spItemRepairTask;

//----- (00672260) --------------------------------------------------------
void __thiscall ItemRepairTask::OnIdle(ItemRepairTask *this, float fTime)
{
  ItemRepairTask *v2; // edi@1
  Item *v3; // esi@1
  signed int v4; // eax@2
  int v5; // ST08_4@4
  char *v6; // eax@4
  const char *v7; // eax@4
  int v8; // ST08_4@8
  char *v9; // eax@8
  const char *v10; // eax@8
  int v11; // esi@20
  char *v12; // eax@21
  const char *v13; // eax@23
  Item *v14; // esi@26
  signed int v15; // eax@27
  int v16; // ST08_4@29
  char *v17; // eax@29
  const char *v18; // eax@29
  int v19; // ST08_4@33
  char *v20; // eax@33
  const char *v21; // eax@33
  int v22; // esi@45
  char *v23; // eax@46
  const char *v24; // eax@48
  signed int v25; // [sp-8h] [bp-28h]@21
  signed int v26; // [sp-8h] [bp-28h]@46
  int v27; // [sp-4h] [bp-24h]@21
  int v28; // [sp-4h] [bp-24h]@46
  int iChargedPercentage; // [sp+14h] [bp-Ch]@2
  int iChargedPercentagea; // [sp+14h] [bp-Ch]@27
  float fCurrCharged; // [sp+18h] [bp-8h]@2
  float fCurrChargeda; // [sp+18h] [bp-8h]@27
  GameFrameWork *pkGame; // [sp+1Ch] [bp-4h]@2
  GameFrameWork *pkGamea; // [sp+1Ch] [bp-4h]@27

  v2 = this;
  v3 = Inventory::GetEquipedWeaponAcc(&g_kInventory);
  if ( v3 )
  {
    pkGame = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    fCurrCharged = (double)(unsigned int)((int (__thiscall *)(_DWORD))v3->vfptr[19].__vecDelDtor)(v3);
    iChargedPercentage = (signed int)(fCurrCharged
                                    / (double)(unsigned int)((int (__thiscall *)(_DWORD))v3->vfptr[21].__vecDelDtor)(v3)
                                    * 100.0);
    v4 = (signed int)fCurrCharged;
    if ( v4 )
    {
      if ( v4 >= 11 || v2->m_iOldCharged == v4 )
      {
        v2->m_iDisplayCount = 0;
      }
      else
      {
        v8 = (int)v3->m_pkInfo->Name;
        v9 = (char *)TextData2::Get(0x273D858Cu);
        v10 = fs(v9, (signed int)fCurrCharged, v8);
        GameFrameWork::AddSysMsg(pkGame, v10);
      }
      v2->m_iOldCharged = (signed int)fCurrCharged;
    }
    else
    {
      if ( v2->m_iOldCharged )
      {
        v5 = (int)v3->m_pkInfo->Name;
        v6 = (char *)TextData2::Get(0xF3D5672u);
        v7 = fs(v6, (signed int)fCurrCharged, v5);
        GameFrameWork::AddSysMsg(pkGame, v7);
      }
      v2->m_iOldCharged = 0;
    }
    if ( iChargedPercentage == 30 || iChargedPercentage == 10 || iChargedPercentage == 1 || !iChargedPercentage )
    {
      if ( v2->m_iOldChargedPercentage != iChargedPercentage )
      {
        v2->m_bDisplayMsg = 1;
        v2->m_iOldChargedPercentage = iChargedPercentage;
        goto LABEL_20;
      }
      if ( v2->m_bDisplayMsg && v2->m_iDisplayCount < 5 && fTime - v2->m_fPrevRefreshTime > 5.0 )
      {
LABEL_20:
        v11 = (int)v3->m_pkInfo->Name;
        if ( iChargedPercentage )
        {
          v27 = iChargedPercentage;
          v25 = v11;
          v12 = (char *)TextData2::Get(0x6F72F30u);
        }
        else
        {
          v27 = v11;
          v25 = (signed int)fCurrCharged;
          v12 = (char *)TextData2::Get(0xF3D5672u);
        }
        v13 = fs(v12, v25, v27);
        GameFrameWork::AddSysMsg(pkGame, v13);
        ++v2->m_iDisplayCount;
        v2->m_fPrevRefreshTime = fTime;
        goto LABEL_26;
      }
      if ( v2->m_iDisplayCount > 4 )
      {
        v2->m_iDisplayCount = 0;
        v2->m_bDisplayMsg = 0;
      }
    }
  }
LABEL_26:
  v14 = Inventory::GetEquipedWeaponAcc(&g_kInventory);
  if ( v14 )
  {
    pkGamea = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    fCurrChargeda = (double)(unsigned int)((int (__thiscall *)(_DWORD))v14->vfptr[19].__vecDelDtor)(v14);
    iChargedPercentagea = (signed int)(fCurrChargeda
                                     / (double)(unsigned int)((int (__thiscall *)(_DWORD))v14->vfptr[21].__vecDelDtor)(v14)
                                     * 100.0);
    v15 = (signed int)fCurrChargeda;
    if ( v15 )
    {
      if ( v15 >= 11 || v2->m_iShieldCosOldCharged == v15 )
      {
        v2->m_iShieldCosDisplayCount = 0;
      }
      else
      {
        v19 = (int)v14->m_pkInfo->Name;
        v20 = (char *)TextData2::Get(0x273D858Cu);
        v21 = fs(v20, (signed int)fCurrChargeda, v19);
        GameFrameWork::AddSysMsg(pkGamea, v21);
      }
      v2->m_iShieldCosOldCharged = (signed int)fCurrChargeda;
    }
    else
    {
      if ( v2->m_iShieldCosOldCharged )
      {
        v16 = (int)v14->m_pkInfo->Name;
        v17 = (char *)TextData2::Get(0xF3D5672u);
        v18 = fs(v17, (signed int)fCurrChargeda, v16);
        GameFrameWork::AddSysMsg(pkGamea, v18);
      }
      v2->m_iShieldCosOldCharged = 0;
    }
    if ( iChargedPercentagea == 30 || iChargedPercentagea == 10 || iChargedPercentagea == 1 || !iChargedPercentagea )
    {
      if ( v2->m_iShieldCosOldChargedPercentage != iChargedPercentagea )
      {
        v2->m_bShieldCosDisplayMsg = 1;
        v2->m_iShieldCosOldChargedPercentage = iChargedPercentagea;
        goto LABEL_45;
      }
      if ( v2->m_bShieldCosDisplayMsg
        && v2->m_iShieldCosDisplayCount < 5
        && fTime - v2->m_fShieldCosPrevRefreshTime > 5.0 )
      {
LABEL_45:
        v22 = (int)v14->m_pkInfo->Name;
        if ( iChargedPercentagea )
        {
          v28 = iChargedPercentagea;
          v26 = v22;
          v23 = (char *)TextData2::Get(0x6F72F30u);
        }
        else
        {
          v28 = v22;
          v26 = (signed int)fCurrChargeda;
          v23 = (char *)TextData2::Get(0xF3D5672u);
        }
        v24 = fs(v23, v26, v28);
        GameFrameWork::AddSysMsg(pkGamea, v24);
        ++v2->m_iShieldCosDisplayCount;
        v2->m_fShieldCosPrevRefreshTime = fTime;
        return;
      }
      if ( v2->m_iShieldCosDisplayCount > 4 )
      {
        v2->m_iShieldCosDisplayCount = 0;
        v2->m_bShieldCosDisplayMsg = 0;
      }
    }
  }
}

//----- (00672590) --------------------------------------------------------
void __stdcall ItemRepairTask::On_Recv_NC_ITEM_WEAPONENDURE_CHARGE_ACK(PROTO_NC_ITEM_WEAPONENDURE_CHARGE_ACK *pkAck)
{
  PgFrameWork *v2; // eax@1
  GameFrameWork *v3; // esi@1
  unsigned __int16 v4; // ax@2
  __int16 v5; // cx@2
  unsigned int v6; // eax@3
  Item *v7; // edi@4
  unsigned int v8; // eax@9
  Item *v9; // edi@10
  NiUnsharedGeometryGroup *v10; // eax@14
  NiUnsharedGeometryGroup *v11; // eax@20

  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  v3 = (GameFrameWork *)v2;
  if ( pkAck->Error == 6784 )
  {
    v4 = pkAck->WeaponSlot.Inven;
    v5 = pkAck->WeaponSlot.Inven >> 10;
    if ( v5 == 8 )
    {
      v6 = v4 & 0x3FF;
      if ( v6 < 0x1E )
      {
        v7 = g_kInventory.m_aspEquip[v6].m_pObject;
        if ( v7 )
        {
          if ( (unsigned __int8)((int (__thiscall *)(Item *))v7->vfptr[1].__vecDelDtor)(v7) == 26 )
          {
            v7->vfptr[20].__vecDelDtor((NiRefObject *)v7, pkAck->ChargedNumber);
            ItemRepairWin::CompleteItemRepair(v3->m_pkItemRepairWin);
          }
        }
      }
    }
    else if ( v5 == 9 )
    {
      v8 = v4 & 0x3FF;
      if ( v8 < 0xC0 )
      {
        v9 = g_kInventory.m_aspInv[v8].m_pObject;
        if ( v9 )
        {
          if ( (unsigned __int8)((int (__thiscall *)(Item *))v9->vfptr[1].__vecDelDtor)(v9) == 26 )
          {
            v9->vfptr[20].__vecDelDtor((NiRefObject *)v9, pkAck->ChargedNumber);
            ItemRepairWin::CompleteItemRepair(v3->m_pkItemRepairWin);
          }
        }
      }
    }
  }
  else
  {
    ItemRepairWin::CancelItemRepair((ItemRepairWin *)v2[33].m_kMsgQ.m_uiAlloced);
    switch ( pkAck->Error )
    {
      default:
        return;
      case 0x1A81u:
      case 0x1A83u:
      case 0x1A84u:
        v10 = TextData2::Get(0xB2F6D62F);
        goto LABEL_15;
      case 0x1A82u:
        v10 = TextData2::Get(0xF0406790);
        goto LABEL_15;
      case 0x1A86u:
        v10 = TextData2::Get(0x6DD186D7u);
        goto LABEL_15;
      case 0x1A87u:
        v10 = TextData2::Get(0x1D603E91u);
        goto LABEL_15;
      case 0x1A88u:
        v10 = TextData2::Get(0xC11AD1D7);
LABEL_15:
        GameFrameWork::AddSysMsg(v3, (const char *)v10);
        break;
      case 0x1A89u:
        v11 = TextData::Get(0xD4D93C40);
        GameFrameWork::AddSysMsg(v3, (const char *)v11);
        break;
    }
  }
}

//----- (006726F0) --------------------------------------------------------
void __stdcall ItemRepairTask::On_Recv_NC_ITEM_SHIELDENDURE_CHARGE_ACK(PROTO_NC_ITEM_SHIELDENDURE_CHARGE_ACK *pkAck)
{
  PgFrameWork *v2; // eax@1
  GameFrameWork *v3; // esi@1
  unsigned __int16 v4; // ax@2
  __int16 v5; // cx@2
  unsigned int v6; // eax@3
  Item *v7; // edi@4
  unsigned int v8; // eax@9
  Item *v9; // edi@10
  NiUnsharedGeometryGroup *v10; // eax@14
  NiUnsharedGeometryGroup *v11; // eax@20

  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  v3 = (GameFrameWork *)v2;
  if ( pkAck->Error == 6784 )
  {
    v4 = pkAck->ShieldSlot.Inven;
    v5 = pkAck->ShieldSlot.Inven >> 10;
    if ( v5 == 8 )
    {
      v6 = v4 & 0x3FF;
      if ( v6 < 0x1E )
      {
        v7 = g_kInventory.m_aspEquip[v6].m_pObject;
        if ( v7 )
        {
          if ( (unsigned __int8)((int (__thiscall *)(Item *))v7->vfptr[1].__vecDelDtor)(v7) == 37 )
          {
            v7->vfptr[20].__vecDelDtor((NiRefObject *)v7, pkAck->ChargedNumber);
            ItemRepairWin::CompleteItemRepair(v3->m_pkItemRepairWin);
          }
        }
      }
    }
    else if ( v5 == 9 )
    {
      v8 = v4 & 0x3FF;
      if ( v8 < 0xC0 )
      {
        v9 = g_kInventory.m_aspInv[v8].m_pObject;
        if ( v9 )
        {
          if ( (unsigned __int8)((int (__thiscall *)(Item *))v9->vfptr[1].__vecDelDtor)(v9) == 37 )
          {
            v9->vfptr[20].__vecDelDtor((NiRefObject *)v9, pkAck->ChargedNumber);
            ItemRepairWin::CompleteItemRepair(v3->m_pkItemRepairWin);
          }
        }
      }
    }
  }
  else
  {
    ItemRepairWin::CancelItemRepair((ItemRepairWin *)v2[33].m_kMsgQ.m_uiAlloced);
    switch ( pkAck->Error )
    {
      default:
        return;
      case 0x1A81u:
      case 0x1A83u:
      case 0x1A84u:
        v10 = TextData2::Get(0xB2F6D62F);
        goto LABEL_15;
      case 0x1A82u:
        v10 = TextData2::Get(0xF0406790);
        goto LABEL_15;
      case 0x1A86u:
        v10 = TextData2::Get(0x6DD186D7u);
        goto LABEL_15;
      case 0x1A87u:
        v10 = TextData2::Get(0x1D603E91u);
        goto LABEL_15;
      case 0x1A88u:
        v10 = TextData2::Get(0xC11AD1D7);
LABEL_15:
        GameFrameWork::AddSysMsg(v3, (const char *)v10);
        break;
      case 0x1A89u:
        v11 = TextData::Get(0xD4D93C40);
        GameFrameWork::AddSysMsg(v3, (const char *)v11);
        break;
    }
  }
}

//----- (00672850) --------------------------------------------------------
void __thiscall ItemRepairTask::~ItemRepairTask(ItemRepairTask *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ItemRepairTask::`vftable'{for `NiRefObject'};
  this->vfptr = (IDirectMessengerVtbl *)&ItemRepairTask::`vftable'{for `IDirectMessenger'};
  ITask::~ITask((ITask *)&this->vfptr);
}
// 9BC054: using guessed type void (__thiscall *ItemRepairTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9BC070: using guessed type int (__thiscall *ItemRepairTask::`vftable'{for `NiRefObject'})(void *p, char);

//----- (00672870) --------------------------------------------------------
char __stdcall ItemRepairTask::OnProcessNetMsg(int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  char result; // al@3

  if ( iDepart == 12 )
  {
    switch ( iCommand )
    {
      case 54:
        ItemRepairTask::On_Recv_NC_ITEM_WEAPONENDURE_CHARGE_ACK((PROTO_NC_ITEM_WEAPONENDURE_CHARGE_ACK *)pvData);
        result = 1;
        break;
      case 55:
        ItemRepairTask::On_Recv_NC_ITEM_WEAPONENDURESET_CMD((PROTO_NC_ITEM_WEAPONENDURESET_CMD *)pvData);
        result = 1;
        break;
      case 101:
        ItemRepairTask::On_Recv_NC_ITEM_SHIELDENDURE_CHARGE_ACK((PROTO_NC_ITEM_SHIELDENDURE_CHARGE_ACK *)pvData);
        result = 1;
        break;
      case 102:
        ItemRepairTask::On_Recv_NC_ITEM_SHIELDENDURESET_CMD((PROTO_NC_ITEM_SHIELDENDURESET_CMD *)pvData);
        result = 1;
        break;
      default:
        goto LABEL_7;
    }
  }
  else
  {
LABEL_7:
    result = 0;
  }
  return result;
}

//----- (00672920) --------------------------------------------------------
void __thiscall ItemRepairTask::ItemRepairTask(ItemRepairTask *this)
{
  ItemRepairTask *v1; // esi@1

  v1 = this;
  ITask::ITask((ITask *)&this->vfptr, 0);
  v1->m_fPrevRefreshTime = 0.0;
  v1->m_eState = 0;
  v1->m_iDisplayCount = 0;
  v1->m_fShieldCosPrevRefreshTime = 0.0;
  v1->m_bDisplayMsg = 0;
  v1->m_iOldChargedPercentage = 0;
  v1->m_bShieldCosDisplayMsg = 0;
  v1->m_iShieldCosDisplayCount = 0;
  v1->m_iShieldCosOldChargedPercentage = 0;
  v1->m_iShieldCosOldCharged = 0;
  v1->vfptr = (NiRefObjectVtbl *)&ItemRepairTask::`vftable'{for `NiRefObject'};
  v1->vfptr = (IDirectMessengerVtbl *)&ItemRepairTask::`vftable'{for `IDirectMessenger'};
}
// 9BC054: using guessed type void (__thiscall *ItemRepairTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9BC070: using guessed type int (__thiscall *ItemRepairTask::`vftable'{for `NiRefObject'})(void *p, char);

//----- (00672960) --------------------------------------------------------
void __cdecl ItemRepairTask::Create(IDirectMessenger *pkMsgHooker)
{
  int v1; // eax@1
  ITask *v2; // eax@2
  int v3; // esi@2
  void (__thiscall ***v4)(_DWORD, _DWORD); // edi@7

  v1 = ItemRepairTask::ms_spItemRepairTask;
  if ( !ItemRepairTask::ms_spItemRepairTask )
  {
    v2 = (ITask *)operator new(0x6Cu);
    v3 = (int)v2;
    if ( v2 )
    {
      ITask::ITask(v2, 0);
      *(float *)(v3 + 64) = 0.0;
      *(_DWORD *)v3 = &ItemRepairTask::`vftable'{for `NiRefObject'};
      *(float *)(v3 + 92) = 0.0;
      *(_DWORD *)(v3 + 8) = &ItemRepairTask::`vftable'{for `IDirectMessenger'};
      *(_DWORD *)(v3 + 84) = 0;
      *(_DWORD *)(v3 + 68) = 0;
      *(_BYTE *)(v3 + 72) = 0;
      *(_DWORD *)(v3 + 76) = 0;
      *(_BYTE *)(v3 + 88) = 0;
      *(_DWORD *)(v3 + 96) = 0;
      *(_DWORD *)(v3 + 100) = 0;
      *(_DWORD *)(v3 + 104) = 0;
    }
    else
    {
      v3 = 0;
    }
    v1 = ItemRepairTask::ms_spItemRepairTask;
    if ( ItemRepairTask::ms_spItemRepairTask != v3 )
    {
      if ( ItemRepairTask::ms_spItemRepairTask )
      {
        v4 = (void (__thiscall ***)(_DWORD, _DWORD))ItemRepairTask::ms_spItemRepairTask;
        if ( !InterlockedDecrement((volatile LONG *)(ItemRepairTask::ms_spItemRepairTask + 4)) )
        {
          if ( v4 )
            (**v4)(v4, 1);
        }
      }
      v1 = v3;
      ItemRepairTask::ms_spItemRepairTask = v3;
      if ( v3 )
      {
        InterlockedIncrement((volatile LONG *)(v3 + 4));
        v1 = ItemRepairTask::ms_spItemRepairTask;
      }
    }
  }
  (**(void (__cdecl ***)(IDirectMessenger *))(v1 + 8))(pkMsgHooker);
}
// 9BC054: using guessed type void (__thiscall *ItemRepairTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9BC070: using guessed type int (__thiscall *ItemRepairTask::`vftable'{for `NiRefObject'})(void *p, char);
// A9939C: using guessed type int ItemRepairTask::ms_spItemRepairTask;

//----- (00672A50) --------------------------------------------------------
ItemRepairTask *__thiscall ItemRepairTask::`scalar deleting destructor'(ItemRepairTask *this, unsigned int a2)
{
  ItemRepairTask *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ItemRepairTask::`vftable'{for `NiRefObject'};
  this->vfptr = (IDirectMessengerVtbl *)&ItemRepairTask::`vftable'{for `IDirectMessenger'};
  ITask::~ITask((ITask *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BC054: using guessed type void (__thiscall *ItemRepairTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9BC070: using guessed type int (__thiscall *ItemRepairTask::`vftable'{for `NiRefObject'})(void *p, char);

//----- (00672A80) --------------------------------------------------------
void __thiscall Singleton<FadeObjectMgr>::~Singleton<FadeObjectMgr>(Singleton<FadeObjectMgr> *this)
{
  this->vfptr = (Singleton<FadeObjectMgr>Vtbl *)&Singleton<FadeObjectMgr>::`vftable';
  if ( Singleton<FadeObjectMgr>::m_pInstance )
  {
    (**(void (__stdcall ***)(_DWORD))Singleton<FadeObjectMgr>::m_pInstance)(1);
    Singleton<FadeObjectMgr>::m_pInstance = 0;
  }
  Singleton<FadeObjectMgr>::m_bDestroy = 1;
}
// 9BC088: using guessed type int (__thiscall *Singleton<FadeObjectMgr>::`vftable')(void *p, char);
// A993A0: using guessed type int Singleton<FadeObjectMgr>::m_pInstance;
// A993A4: using guessed type char Singleton<FadeObjectMgr>::m_bDestroy;

//----- (00672AB0) --------------------------------------------------------
Singleton<FadeObjectMgr> *__thiscall Singleton<FadeObjectMgr>::`scalar deleting destructor'(Singleton<FadeObjectMgr> *this, unsigned int a2)
{
  Singleton<FadeObjectMgr> *v2; // esi@1

  v2 = this;
  this->vfptr = (Singleton<FadeObjectMgr>Vtbl *)&Singleton<FadeObjectMgr>::`vftable';
  if ( Singleton<FadeObjectMgr>::m_pInstance )
  {
    (**(void (__stdcall ***)(_DWORD))Singleton<FadeObjectMgr>::m_pInstance)(1);
    Singleton<FadeObjectMgr>::m_pInstance = 0;
  }
  Singleton<FadeObjectMgr>::m_bDestroy = 1;
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BC088: using guessed type int (__thiscall *Singleton<FadeObjectMgr>::`vftable')(void *p, char);
// A993A0: using guessed type int Singleton<FadeObjectMgr>::m_pInstance;
// A993A4: using guessed type char Singleton<FadeObjectMgr>::m_bDestroy;

//----- (00672B00) --------------------------------------------------------
NiTArray<FadeObject *> *__thiscall NiTArray<FadeObject *>::`scalar deleting destructor'(NiTArray<FadeObject *> *this, unsigned int a2)
{
  NiTArray<FadeObject *> *v2; // esi@1
  FadeObject **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pBase;
  this->vfptr = (NiTArray<FadeObject *>Vtbl *)&NiTArray<FadeObject *>::`vftable';
  operator delete[](v3);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BC090: using guessed type int (__thiscall *NiTArray<FadeObject *>::`vftable')(void *p, char);

//----- (00672B30) --------------------------------------------------------
NiPointer<NiAVObject> *__thiscall FadeObject::GetObj(FadeObject *this, NiPointer<NiAVObject> *result)
{
  NiAVObject *v2; // eax@1

  v2 = this->m_spObj.m_pObject;
  result->m_pObject = (NiAVObject *)this->m_spObj;
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  return result;
}

//----- (00672B60) --------------------------------------------------------
void __thiscall FadeObjectMgr::FadeObjectMgr(FadeObjectMgr *this)
{
  this->vfptr = (Singleton<FadeObjectMgr>Vtbl *)&FadeObjectMgr::`vftable';
  this->m_kObjectArray.vfptr = (NiTArray<FadeObject *>Vtbl *)&NiTArray<FadeObject *>::`vftable';
  this->m_kObjectArray.m_uiMaxSize = 0;
  this->m_kObjectArray.m_uiGrowBy = 1;
  this->m_kObjectArray.m_uiSize = 0;
  this->m_kObjectArray.m_uiESize = 0;
  this->m_kObjectArray.m_pBase = 0;
}
// 9BC090: using guessed type int (__thiscall *NiTArray<FadeObject *>::`vftable')(void *p, char);
// 9BC098: using guessed type int (__thiscall *FadeObjectMgr::`vftable')(void *p, char);

//----- (00672BC0) --------------------------------------------------------
void __thiscall FadeObjectMgr::~FadeObjectMgr(FadeObjectMgr *this)
{
  FadeObjectMgr *v1; // esi@1
  FadeObject **v2; // ST00_4@1

  v1 = this;
  this->vfptr = (Singleton<FadeObjectMgr>Vtbl *)&FadeObjectMgr::`vftable';
  v2 = this->m_kObjectArray.m_pBase;
  this->m_kObjectArray.vfptr = (NiTArray<FadeObject *>Vtbl *)&NiTArray<FadeObject *>::`vftable';
  operator delete[](v2);
  v1->vfptr = (Singleton<FadeObjectMgr>Vtbl *)&Singleton<FadeObjectMgr>::`vftable';
  if ( Singleton<FadeObjectMgr>::m_pInstance )
  {
    (**(void (__stdcall ***)(_DWORD))Singleton<FadeObjectMgr>::m_pInstance)(1);
    Singleton<FadeObjectMgr>::m_pInstance = 0;
  }
  Singleton<FadeObjectMgr>::m_bDestroy = 1;
}
// 9BC088: using guessed type int (__thiscall *Singleton<FadeObjectMgr>::`vftable')(void *p, char);
// 9BC090: using guessed type int (__thiscall *NiTArray<FadeObject *>::`vftable')(void *p, char);
// 9BC098: using guessed type int (__thiscall *FadeObjectMgr::`vftable')(void *p, char);
// A993A0: using guessed type int Singleton<FadeObjectMgr>::m_pInstance;
// A993A4: using guessed type char Singleton<FadeObjectMgr>::m_bDestroy;

//----- (00672C10) --------------------------------------------------------
char __thiscall FadeObjectMgr::IsInArray(FadeObjectMgr *this, NiPointer<NiAVObject> spObj)
{
  FadeObjectMgr *v2; // eax@1
  unsigned int v3; // edx@1
  int v4; // edi@1
  FadeObject *v5; // ecx@2
  bool v6; // bl@3
  NiAVObject *v7; // esi@4
  FadeObjectMgr *v9; // [sp+10h] [bp-18h]@1
  unsigned int uiSize; // [sp+14h] [bp-14h]@1
  NiPointer<NiAVObject> result; // [sp+18h] [bp-10h]@3
  int v12; // [sp+24h] [bp-4h]@1

  v2 = this;
  v9 = this;
  v3 = this->m_kObjectArray.m_uiSize;
  v4 = 0;
  v12 = 0;
  uiSize = v3;
  if ( !v3 )
  {
LABEL_10:
    v12 = -1;
    if ( spObj.m_pObject && !InterlockedDecrement((volatile LONG *)&spObj.m_pObject->m_uiRefCount) )
    {
      if ( spObj.m_pObject )
        spObj.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spObj.m_pObject, 1u);
    }
    return 0;
  }
  while ( 1 )
  {
    v5 = v2->m_kObjectArray.m_pBase[v4];
    if ( v5 )
      break;
LABEL_9:
    if ( ++v4 >= v3 )
      goto LABEL_10;
  }
  v6 = FadeObject::GetObj(v5, &result)->m_pObject == spObj.m_pObject;
  if ( result.m_pObject )
  {
    v7 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v7 )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    }
  }
  if ( !v6 )
  {
    v3 = uiSize;
    v2 = v9;
    goto LABEL_9;
  }
  v12 = -1;
  if ( spObj.m_pObject && !InterlockedDecrement((volatile LONG *)&spObj.m_pObject->m_uiRefCount) && spObj.m_pObject )
    spObj.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spObj.m_pObject, 1u);
  return 1;
}

//----- (00672D20) --------------------------------------------------------
void __thiscall FadeObject::FadeObject(FadeObject *this)
{
  this->m_fAlphaBlendValue = 0.0;
  this->m_spObj.m_pObject = 0;
  this->m_bEnable = 0;
  this->m_spMaterialProp.m_pObject = 0;
}

//----- (00672D40) --------------------------------------------------------
void __thiscall FadeObject::FadeObject(FadeObject *this, NiPointer<NiAVObject> spObj, bool bEnable)
{
  NiAVObject *v3; // eax@1
  FadeObject *v4; // esi@1
  NiAVObject *v5; // edi@4

  v3 = spObj.m_pObject;
  v4 = this;
  this->m_spObj = spObj;
  if ( spObj.m_pObject )
  {
    InterlockedIncrement((volatile LONG *)&spObj.m_pObject->m_uiRefCount);
    v3 = spObj.m_pObject;
  }
  v4->m_fAlphaBlendValue = 0.0;
  v4->m_bEnable = bEnable;
  v4->m_spMaterialProp.m_pObject = 0;
  if ( v3 )
  {
    v5 = v3;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
    {
      if ( v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
  }
}

//----- (00672DA0) --------------------------------------------------------
void __thiscall FadeObject::~FadeObject(FadeObject *this)
{
  FadeObject *v1; // edi@1
  NiMaterialProperty *v2; // esi@1
  NiAVObject *v3; // esi@5

  v1 = this;
  v2 = this->m_spMaterialProp.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_spObj.m_pObject;
  if ( v1->m_spObj.m_pObject && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
  {
    if ( v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  }
}

//----- (00672E30) --------------------------------------------------------
char __thiscall FadeObject::Init(FadeObject *this)
{
  FadeObject *v1; // esi@1
  NiAVObject *v2; // ecx@1
  char result; // al@2
  double v4; // st7@4
  NiPointer<NiAlphaProperty> spAlphaProp; // ST18_4@6
  NiProperty *v6; // eax@6
  NiMaterialProperty *v7; // edi@6
  NiMaterialProperty *v8; // ebx@6
  NiMaterialProperty *v9; // eax@14
  NiMaterialProperty *v10; // ebx@14
  NiMaterialProperty *v11; // eax@15
  NiMaterialProperty *v12; // edi@16
  NiMaterialProperty *v13; // eax@24
  signed __int16 v14; // bx@24
  double v15; // st7@24
  NiProperty *v16; // eax@24
  NiProperty *v17; // edi@24
  NiObjectNET *v18; // eax@27
  NiObjectNET *v19; // ebx@27

  v1 = this;
  v2 = this->m_spObj.m_pObject;
  if ( v2 )
  {
    if ( v1->m_bEnable )
      v4 = 0.0;
    else
      v4 = 1.0;
    *(float *)&spAlphaProp.m_pObject = v4;
    v1->m_fAlphaBlendValue = *(float *)&spAlphaProp.m_pObject;
    v6 = NiAVObject::GetProperty(v2, 3);
    v7 = v1->m_spMaterialProp.m_pObject;
    v8 = (NiMaterialProperty *)v6;
    if ( (NiProperty *)v7 != v6 )
    {
      if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      v1->m_spMaterialProp.m_pObject = v8;
      if ( v8 )
        InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
    }
    if ( !v1->m_spMaterialProp.m_pObject )
    {
      v9 = (NiMaterialProperty *)operator new(0x60u);
      v10 = 0;
      if ( v9 )
      {
        NiMaterialProperty::NiMaterialProperty(v9);
        v10 = v11;
      }
      v12 = v1->m_spMaterialProp.m_pObject;
      if ( v12 != v10 )
      {
        if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
          v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
        v1->m_spMaterialProp.m_pObject = v10;
        if ( v10 )
          InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
      }
      NiAVObject::AttachProperty(v1->m_spObj.m_pObject, (NiProperty *)&v1->m_spMaterialProp.m_pObject->vfptr);
    }
    v13 = v1->m_spMaterialProp.m_pObject;
    v14 = 1;
    v15 = v1->m_fAlphaBlendValue;
    ++v13->m_uiRevID;
    v13->m_fAlpha = v15;
    v16 = NiAVObject::GetProperty(v1->m_spObj.m_pObject, 0);
    v17 = v16;
    if ( v16 )
      InterlockedIncrement((volatile LONG *)&v16->m_uiRefCount);
    if ( !v17 )
    {
      v18 = (NiObjectNET *)operator new(0x20u);
      v19 = v18;
      if ( v18 )
      {
        NiObjectNET::NiObjectNET(v18);
        v19->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
        LOWORD(v19[1].vfptr) = 236;
        BYTE2(v19[1].vfptr) = 0;
      }
      else
      {
        v19 = 0;
      }
      if ( v19 )
      {
        v17 = (NiProperty *)v19;
        InterlockedIncrement((volatile LONG *)&v19->m_uiRefCount);
      }
      NiAVObject::AttachProperty(v1->m_spObj.m_pObject, v17);
      v14 = 1;
    }
    LOWORD(v17[1].vfptr) |= v14;
    NiAVObject::UpdateProperties(v1->m_spObj.m_pObject);
    if ( !InterlockedDecrement((volatile LONG *)&v17->m_uiRefCount) )
      v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);

//----- (00673010) --------------------------------------------------------
void __thiscall FadeObjectMgr::AddObject(FadeObjectMgr *this, NiPointer<NiAVObject> spObj, bool bEnable)
{
  FadeObjectMgr *v3; // esi@1
  FadeObject *v4; // edi@8
  FadeObject *v5; // eax@11
  unsigned int v6; // edi@13
  NiAVObject *v7; // [sp-8h] [bp-28h]@9
  NiAVObject *v8; // [sp-4h] [bp-24h]@1
  _DWORD *v9; // [sp+10h] [bp-10h]@1
  int v10; // [sp+1Ch] [bp-4h]@1

  v3 = this;
  v8 = spObj.m_pObject;
  v10 = 0;
  v9 = &v8;
  if ( spObj.m_pObject )
    InterlockedIncrement((volatile LONG *)&spObj.m_pObject->m_uiRefCount);
  if ( FadeObjectMgr::IsInArray(v3, (NiPointer<NiAVObject>)v8) )
  {
    v10 = -1;
    if ( spObj.m_pObject && !InterlockedDecrement((volatile LONG *)&spObj.m_pObject->m_uiRefCount) )
    {
      if ( spObj.m_pObject )
        ((void (__cdecl *)(signed int))spObj.m_pObject->vfptr->__vecDelDtor)(1);
    }
  }
  else
  {
    v4 = (FadeObject *)operator new(0x10u);
    v9 = v4;
    LOBYTE(v10) = 1;
    if ( v4 )
    {
      v8 = (NiAVObject *)bEnable;
      v7 = spObj.m_pObject;
      *(_DWORD *)&bEnable = &v7;
      if ( spObj.m_pObject )
        InterlockedIncrement((volatile LONG *)&spObj.m_pObject->m_uiRefCount);
      FadeObject::FadeObject(v4, (NiPointer<NiAVObject>)v7, (bool)v8);
    }
    else
    {
      v5 = 0;
    }
    LOBYTE(v10) = 0;
    *(_DWORD *)&bEnable = v5;
    FadeObject::Init(v5);
    v6 = v3->m_kObjectArray.m_uiSize;
    if ( v6 >= v3->m_kObjectArray.m_uiMaxSize )
    {
      v8 = (NiAVObject *)(v6 + v3->m_kObjectArray.m_uiGrowBy);
      NiTArray<NiGeometry *>::SetSize(
        (NiTArray<NiTPointerList<NiPointer<NiProperty> > *> *)&v3->m_kObjectArray,
        (unsigned int)v8);
    }
    NiTArray<NiCollisionGroup::Record *>::SetAt(
      (NiTArray<NiVBChip *> *)&v3->m_kObjectArray,
      v6,
      (NiVBChip *const *)&bEnable);
    v10 = -1;
    if ( spObj.m_pObject && !InterlockedDecrement((volatile LONG *)&spObj.m_pObject->m_uiRefCount) && spObj.m_pObject )
      spObj.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spObj.m_pObject, 1u);
  }
}

//----- (00673160) --------------------------------------------------------
void __thiscall FadeObjectMgr::Update(FadeObjectMgr *this, float fTime)
{
  FadeObjectMgr *v2; // ebx@1
  unsigned int v3; // eax@1
  FadeObject *v4; // esi@2
  NiMaterialProperty *v5; // edi@5
  NiAVObject *v6; // esi@6
  NiRefObjectVtbl *v7; // edx@7
  NiAVObject *v8; // ecx@7
  bool v9; // zf@8
  double v10; // st7@11
  double v11; // st7@12
  double v12; // st7@18
  NiAVObject *v13; // edi@20
  unsigned int v14; // edx@25
  FadeObject **v15; // eax@26
  FadeObject *v16; // ecx@26
  int v17; // eax@28
  NiAVObject *v18; // esi@34
  unsigned int uiSize; // [sp+10h] [bp-24h]@1
  NiPointer<NiMaterialProperty> spProp; // [sp+14h] [bp-20h]@5
  unsigned int i; // [sp+18h] [bp-1Ch]@1
  float fComputeAlpha; // [sp+1Ch] [bp-18h]@11
  NiPointer<NiAVObject> spObj; // [sp+20h] [bp-14h]@3
  float fAlphaBlendValue; // [sp+24h] [bp-10h]@8
  int v25; // [sp+30h] [bp-4h]@3

  v2 = this;
  v3 = 0;
  uiSize = this->m_kObjectArray.m_uiSize;
  i = 0;
  if ( !uiSize )
    return;
  while ( 1 )
  {
    v4 = v2->m_kObjectArray.m_pBase[v3];
    if ( !v4 )
      goto LABEL_23;
    FadeObject::GetObj(v4, &spObj);
    v25 = 0;
    if ( !spObj.m_pObject )
    {
      v25 = -1;
      goto LABEL_23;
    }
    MainApp::GetRender((MainApp *)v4, (NiPointer<NiRenderer> *)&spProp);
    v5 = spProp.m_pObject;
    LOBYTE(v25) = 1;
    if ( spProp.m_pObject )
      break;
    v6 = spObj.m_pObject;
    v25 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&spObj.m_pObject->m_uiRefCount) )
    {
      v7 = v6->vfptr;
      v8 = v6;
LABEL_22:
      v7->__vecDelDtor(v8, 1);
    }
LABEL_23:
    v3 = i + 1;
    i = v3;
    if ( v3 >= uiSize )
      return;
  }
  v9 = v4->m_bEnable == 0;
  fAlphaBlendValue = v4->m_fAlphaBlendValue;
  if ( !v9 )
  {
    if ( fAlphaBlendValue >= 1.0 )
      goto LABEL_25;
    fAlphaBlendValue = fAlphaBlendValue + Timer::ms_fDeltaTime;
    if ( fAlphaBlendValue >= 1.0 )
    {
      v10 = fAlphaBlendValue;
      fComputeAlpha = 1.0;
LABEL_18:
      v4->m_fAlphaBlendValue = v10;
      v12 = fComputeAlpha;
      ++v5->m_uiRevID;
      v5->m_fAlpha = v12;
      LOBYTE(v25) = 0;
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      v13 = spObj.m_pObject;
      v25 = -1;
      if ( InterlockedDecrement((volatile LONG *)&spObj.m_pObject->m_uiRefCount) )
        goto LABEL_23;
      v7 = v13->vfptr;
      v8 = v13;
      goto LABEL_22;
    }
    fComputeAlpha = fAlphaBlendValue * NI_HALF_PI;
    fComputeAlpha = sin(fComputeAlpha);
    v11 = fComputeAlpha;
    goto LABEL_17;
  }
  if ( fAlphaBlendValue > 0.0 )
  {
    fAlphaBlendValue = fAlphaBlendValue - Timer::ms_fDeltaTime;
    if ( fAlphaBlendValue <= 0.0 )
    {
      v10 = fAlphaBlendValue;
      fComputeAlpha = 0.0;
      goto LABEL_18;
    }
    fComputeAlpha = fAlphaBlendValue * NI_HALF_PI;
    fComputeAlpha = sin(fComputeAlpha);
    v11 = fComputeAlpha;
LABEL_17:
    fComputeAlpha = v11;
    v10 = fAlphaBlendValue;
    goto LABEL_18;
  }
LABEL_25:
  v14 = i;
  if ( i < v2->m_kObjectArray.m_uiSize )
  {
    v15 = &v2->m_kObjectArray.m_pBase[i];
    v16 = *v15;
    *v15 = 0;
    if ( v16 )
      --v2->m_kObjectArray.m_uiESize;
    v17 = v2->m_kObjectArray.m_uiSize - 1;
    if ( v14 == v17 )
      v2->m_kObjectArray.m_uiSize = v17;
    if ( v16 )
      FadeObject::`scalar deleting destructor'(v16, 1u);
  }
  LOBYTE(v25) = 0;
  if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  v18 = spObj.m_pObject;
  v25 = -1;
  if ( !InterlockedDecrement((volatile LONG *)&spObj.m_pObject->m_uiRefCount) )
    v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
}
// A8B980: using guessed type float Timer::ms_fDeltaTime;
// B622D0: using guessed type const float NI_HALF_PI;

//----- (006733A0) --------------------------------------------------------
FadeObjectMgr *__thiscall FadeObjectMgr::`scalar deleting destructor'(FadeObjectMgr *this, unsigned int a2)
{
  FadeObjectMgr *v2; // esi@1
  FadeObject **v3; // ST00_4@1

  v2 = this;
  this->vfptr = (Singleton<FadeObjectMgr>Vtbl *)&FadeObjectMgr::`vftable';
  v3 = this->m_kObjectArray.m_pBase;
  this->m_kObjectArray.vfptr = (NiTArray<FadeObject *>Vtbl *)&NiTArray<FadeObject *>::`vftable';
  operator delete[](v3);
  v2->vfptr = (Singleton<FadeObjectMgr>Vtbl *)&Singleton<FadeObjectMgr>::`vftable';
  if ( Singleton<FadeObjectMgr>::m_pInstance )
  {
    (**(void (__stdcall ***)(_DWORD))Singleton<FadeObjectMgr>::m_pInstance)(1);
    Singleton<FadeObjectMgr>::m_pInstance = 0;
  }
  Singleton<FadeObjectMgr>::m_bDestroy = 1;
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BC088: using guessed type int (__thiscall *Singleton<FadeObjectMgr>::`vftable')(void *p, char);
// 9BC090: using guessed type int (__thiscall *NiTArray<FadeObject *>::`vftable')(void *p, char);
// 9BC098: using guessed type int (__thiscall *FadeObjectMgr::`vftable')(void *p, char);
// A993A0: using guessed type int Singleton<FadeObjectMgr>::m_pInstance;
// A993A4: using guessed type char Singleton<FadeObjectMgr>::m_bDestroy;

//----- (00673400) --------------------------------------------------------
FadeObject *__thiscall FadeObject::`scalar deleting destructor'(FadeObject *this, unsigned int a2)
{
  FadeObject *v2; // edi@1
  NiMaterialProperty *v3; // esi@1
  NiAVObject *v4; // esi@5

  v2 = this;
  v3 = this->m_spMaterialProp.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v4 = v2->m_spObj.m_pObject;
  if ( v2->m_spObj.m_pObject && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006734B0) --------------------------------------------------------
char LightFogCtrl::Init()
{
  return 1;
}

//----- (006734C0) --------------------------------------------------------
void __thiscall LightFogCtrl::Clear(LightFogCtrl *this)
{
  LightFogCtrl *v1; // edi@1
  NiMaterialProperty *v2; // esi@1
  NiMaterialProperty *v3; // esi@6
  NiMaterialProperty *v4; // esi@11
  NiTListItem<NiTimeController *> **v5; // esi@16
  NiTListItem<NiTimeController *> *v6; // ST00_4@17

  v1 = this;
  v2 = this->m_spFogMat.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spFogMat.m_pObject = 0;
  }
  v3 = v1->m_spAmibentLightMat.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spAmibentLightMat.m_pObject = 0;
  }
  v4 = v1->m_spBackgroundColorMat.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spBackgroundColorMat.m_pObject = 0;
  }
  v5 = &v1->m_kCtrlList.m_pkHead->m_pkNext;
  while ( v5 )
  {
    v6 = (NiTListItem<NiTimeController *> *)v5;
    v5 = (NiTListItem<NiTimeController *> **)*v5;
    v1->m_kCtrlList.vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *> *)&v1->m_kCtrlList,
      v6);
  }
  v1->m_kCtrlList.m_kAllocator.m_uiCount = 0;
  v1->m_kCtrlList.m_pkHead = 0;
  v1->m_kCtrlList.m_pkTail = 0;
}

//----- (00673560) --------------------------------------------------------
void __thiscall LightFogCtrl::Update(LightFogCtrl *this, float fTime)
{
  LightFogCtrl *v2; // esi@1
  NiTListItem<NiTimeController *> *v3; // eax@1
  NiTimeController *v4; // ecx@2
  NiMaterialProperty *v5; // ecx@5
  NiMaterialProperty *v6; // ecx@7
  NiMaterialProperty *v7; // ecx@9
  float fGameTime; // [sp+14h] [bp+8h]@5

  v2 = this;
  v3 = this->m_kCtrlList.m_pkHead;
  this->m_fFreq = 1.0 / (Server::ONE_DAY_TIME / 10.0);
  while ( v3 )
  {
    v4 = v3->m_element;
    v3 = v3->m_pkNext;
    if ( v4 )
      v4->m_fFrequency = v2->m_fFreq;
  }
  fGameTime = Server::GetGameTime(&g_kServer, fTime);
  v5 = v2->m_spFogMat.m_pObject;
  if ( v5 )
    ((void (__stdcall *)(_DWORD))v5->vfptr[16].__vecDelDtor)(LODWORD(fGameTime));
  v6 = v2->m_spAmibentLightMat.m_pObject;
  if ( v6 )
    ((void (__stdcall *)(_DWORD))v6->vfptr[16].__vecDelDtor)(LODWORD(fGameTime));
  v7 = v2->m_spBackgroundColorMat.m_pObject;
  if ( v7 )
    ((void (__stdcall *)(_DWORD))v7->vfptr[16].__vecDelDtor)(LODWORD(fGameTime));
}
// A754F0: using guessed type float Server::ONE_DAY_TIME;

//----- (00673600) --------------------------------------------------------
void __thiscall LightFogCtrl::SetCtrl(LightFogCtrl *this, NiMaterialProperty *pkProp)
{
  LightFogCtrl *v2; // edi@1
  NiTimeController *v3; // eax@2
  NiTimeController *v4; // esi@2
  NiRefObjectVtbl *v5; // edx@3
  void *(__thiscall *v6)(NiRefObject *, unsigned int); // eax@3
  int v7; // eax@3
  _DWORD *v8; // ecx@3

  v2 = this;
  if ( pkProp )
  {
    v3 = NiObjectNET::GetController((NiObjectNET *)&pkProp->vfptr, &NiMaterialColorController::m_RTTI);
    v4 = v3;
    if ( v3 )
    {
      v5 = v3->vfptr;
      v3->m_uFlags = v3->m_uFlags & 0xFFF8 | 8;
      v6 = v5[15].__vecDelDtor;
      v4->m_fFrequency = v2->m_fFreq;
      v6((NiRefObject *)&v4->vfptr, COERCE_UNSIGNED_INT(0.0));
      v7 = (int)v2->m_kCtrlList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *> *)&v2->m_kCtrlList);
      *(_DWORD *)(v7 + 8) = v4;
      *(_DWORD *)v7 = 0;
      *(_DWORD *)(v7 + 4) = v2->m_kCtrlList.m_pkTail;
      v8 = &v2->m_kCtrlList.m_pkTail->m_pkNext;
      if ( v8 )
      {
        *v8 = v7;
        ++v2->m_kCtrlList.m_kAllocator.m_uiCount;
        v2->m_kCtrlList.m_pkTail = (NiTListItem<NiTimeController *> *)v7;
      }
      else
      {
        ++v2->m_kCtrlList.m_kAllocator.m_uiCount;
        v2->m_kCtrlList.m_pkHead = (NiTListItem<NiTimeController *> *)v7;
        v2->m_kCtrlList.m_pkTail = (NiTListItem<NiTimeController *> *)v7;
      }
    }
  }
}

//----- (00673690) --------------------------------------------------------
char __thiscall LightFogCtrl::SetNode(LightFogCtrl *this, NiNode *pkNode)
{
  NiNode *v2; // edi@1
  LightFogCtrl *v3; // esi@1
  char result; // al@2
  NiAVObject *v5; // eax@3
  NiD3DDefaultShader *v6; // eax@5
  NiAVObject *v7; // eax@5
  NiD3DDefaultShader *v8; // eax@7
  NiAVObject *v9; // eax@7
  NiD3DDefaultShader *v10; // eax@10

  v2 = pkNode;
  v3 = this;
  if ( pkNode
    && (LightFogCtrl::Clear(this),
        (v5 = (NiAVObject *)v2->vfptr[18].__vecDelDtor((NiRefObject *)v2, (unsigned int)&off_9BC09C)) != 0)
    && PgUtil::CatchGeometry(v5, (NiGeometry **)&pkNode) )
  {
    v6 = (NiD3DDefaultShader *)NiAVObject::GetProperty((NiAVObject *)&pkNode->vfptr, 3);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_spFogMat, v6);
    LightFogCtrl::SetCtrl(v3, v3->m_spFogMat.m_pObject);
    v7 = (NiAVObject *)v2->vfptr[18].__vecDelDtor((NiRefObject *)v2, (unsigned int)"Light");
    if ( v7
      && PgUtil::CatchGeometry(v7, (NiGeometry **)&pkNode)
      && (v8 = (NiD3DDefaultShader *)NiAVObject::GetProperty((NiAVObject *)&pkNode->vfptr, 3),
          NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_spAmibentLightMat, v8),
          LightFogCtrl::SetCtrl(v3, v3->m_spAmibentLightMat.m_pObject),
          (v9 = (NiAVObject *)v2->vfptr[18].__vecDelDtor((NiRefObject *)v2, (unsigned int)"BackGround")) != 0)
      && PgUtil::CatchGeometry(v9, (NiGeometry **)&pkNode) )
    {
      v10 = (NiD3DDefaultShader *)NiAVObject::GetProperty((NiAVObject *)&pkNode->vfptr, 3);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_spBackgroundColorMat, v10);
      LightFogCtrl::SetCtrl(v3, v3->m_spBackgroundColorMat.m_pObject);
      result = 1;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9BC09C: using guessed type void *off_9BC09C;

//----- (00673790) --------------------------------------------------------
void __thiscall LightFogCtrl::~LightFogCtrl(LightFogCtrl *this)
{
  LightFogCtrl *v1; // edi@1
  NiMaterialProperty *v2; // esi@1
  NiMaterialProperty *v3; // esi@5
  NiMaterialProperty *v4; // esi@9
  int v5; // edi@13
  _DWORD *v6; // esi@13
  _DWORD *v7; // ST00_4@14

  v1 = this;
  this->vfptr = (LightFogCtrlVtbl *)&LightFogCtrl::`vftable';
  v2 = this->m_spBackgroundColorMat.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_spAmibentLightMat.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v4 = v1->m_spFogMat.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v5 = (int)&v1->m_kCtrlList;
  *(_DWORD *)v5 = &PgTList<NiTimeController *>::`vftable';
  v6 = *(_DWORD **)(v5 + 4);
  while ( v6 )
  {
    v7 = v6;
    v6 = (_DWORD *)*v6;
    (*(void (__thiscall **)(int, _DWORD *))(*(_DWORD *)v5 + 8))(v5, v7);
  }
  *(_DWORD *)(v5 + 12) = 0;
  *(_DWORD *)(v5 + 4) = 0;
  *(_DWORD *)(v5 + 8) = 0;
  *(_DWORD *)v5 = &NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::`vftable';
}
// 9BC0B8: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::`vftable')(void *p, char);
// 9BC0D8: using guessed type int (__thiscall *PgTList<NiTimeController *>::`vftable')(void *p, char);
// 9BC0E8: using guessed type int (__thiscall *LightFogCtrl::`vftable')(void *p, char);

//----- (00673890) --------------------------------------------------------
void __thiscall LightFogCtrl::LightFogCtrl(LightFogCtrl *this)
{
  this->vfptr = (LightFogCtrlVtbl *)&LightFogCtrl::`vftable';
  this->m_kCtrlList.m_kAllocator.m_uiCount = 0;
  this->m_kCtrlList.m_pkHead = 0;
  this->m_kCtrlList.m_pkTail = 0;
  this->m_kCtrlList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>Vtbl *)&PgTList<NiTimeController *>::`vftable';
  this->m_spFogMat.m_pObject = 0;
  this->m_spAmibentLightMat.m_pObject = 0;
  this->m_spBackgroundColorMat.m_pObject = 0;
  this->m_fFreq = 1.0 / (Server::ONE_DAY_TIME / 10.0);
}
// 9BC0D8: using guessed type int (__thiscall *PgTList<NiTimeController *>::`vftable')(void *p, char);
// 9BC0E8: using guessed type int (__thiscall *LightFogCtrl::`vftable')(void *p, char);
// A754F0: using guessed type float Server::ONE_DAY_TIME;

//----- (006738D0) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::~NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>(NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::`vftable';
}
// 9BC0B8: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::`vftable')(void *p, char);

//----- (006738E0) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BC0B8: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::`vftable')(void *p, char);

//----- (00673910) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiTimeController *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiTimeController *> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiTimeController *> *v2; // edi@1
  NiTListItem<NiTimeController *> *v3; // esi@1
  NiTListItem<NiTimeController *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BC0B8: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::`vftable')(void *p, char);
// 9BC0C8: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::`vftable')(void *p, char);

//----- (006739A0) --------------------------------------------------------
void __thiscall NiTPointerList<NiTimeController *>::~NiTPointerList<NiTimeController *>(NiTPointerList<NiTimeController *> *this)
{
  NiTPointerList<NiTimeController *> *v1; // edi@1
  NiTListItem<NiTimeController *> *v2; // esi@1
  NiTListItem<NiTimeController *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::`vftable';
}
// 9BC0B8: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::`vftable')(void *p, char);
// 9BC0C8: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::`vftable')(void *p, char);

//----- (00673A20) --------------------------------------------------------
void __thiscall PgTList<NiTimeController *>::~PgTList<NiTimeController *>(PgTList<NiTimeController *> *this)
{
  PgTList<NiTimeController *> *v1; // edi@1
  NiTListItem<NiTimeController *> *v2; // esi@1
  NiTListItem<NiTimeController *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>Vtbl *)&PgTList<NiTimeController *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::`vftable';
}
// 9BC0B8: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::`vftable')(void *p, char);
// 9BC0D8: using guessed type int (__thiscall *PgTList<NiTimeController *>::`vftable')(void *p, char);

//----- (00673AA0) --------------------------------------------------------
PgTList<NiTimeController *> *__thiscall PgTList<NiTimeController *>::`vector deleting destructor'(PgTList<NiTimeController *> *this, unsigned int a2)
{
  PgTList<NiTimeController *> *v2; // edi@1
  NiTListItem<NiTimeController *> *v3; // esi@1
  NiTListItem<NiTimeController *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>Vtbl *)&PgTList<NiTimeController *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BC0B8: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiTimeController *>::`vftable')(void *p, char);
// 9BC0D8: using guessed type int (__thiscall *PgTList<NiTimeController *>::`vftable')(void *p, char);

//----- (00673B30) --------------------------------------------------------
LightFogCtrl *__thiscall LightFogCtrl::`scalar deleting destructor'(LightFogCtrl *this, unsigned int a2)
{
  LightFogCtrl *v2; // esi@1

  v2 = this;
  LightFogCtrl::~LightFogCtrl(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00673B60) --------------------------------------------------------
void __thiscall CMagicCircleController::UpdatePosition(CMagicCircleController *this, NiPoint3 *rPos)
{
  this->m_SavePos = *rPos;
}

//----- (00673B80) --------------------------------------------------------
void __thiscall CMagicCircleController::SetEnable(CMagicCircleController *this, bool bEnable)
{
  this->m_bEnable = bEnable;
}

//----- (00673B90) --------------------------------------------------------
bool __thiscall CMagicCircleController::IsEnable(CMagicCircleController *this)
{
  return this->m_bEnable;
}

//----- (00673BA0) --------------------------------------------------------
NiPoint3 *__thiscall CMagicCircleController::GetPos(CMagicCircleController *this)
{
  return &this->m_SavePos;
}

//----- (00673BB0) --------------------------------------------------------
void __thiscall CMagicCircleController::CMagicCircleController(CMagicCircleController *this)
{
  CMagicCircleController *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v1->vfptr = (NiRefObjectVtbl *)&CMagicCircleController::`vftable';
  v1->m_bEnable = 0;
  v1->m_spCircleObject.m_pObject = 0;
  NsDecal::NsDecal(&v1->m_kDecal);
  NsDecal::Init(&v1->m_kDecal);
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9BC0F8: using guessed type int (__thiscall *CMagicCircleController::`vftable')(void *p, char);

//----- (00673C30) --------------------------------------------------------
void __thiscall CMagicCircleController::~CMagicCircleController(CMagicCircleController *this)
{
  CMagicCircleController *v1; // esi@1
  NiNode *v2; // edi@1
  NiNode *v3; // edi@6

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&CMagicCircleController::`vftable';
  NsDecal::Terminate(&this->m_kDecal);
  v2 = v1->m_spCircleObject.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spCircleObject.m_pObject = 0;
  }
  NsDecal::~NsDecal(&v1->m_kDecal);
  v3 = v1->m_spCircleObject.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v1->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9BC0F8: using guessed type int (__thiscall *CMagicCircleController::`vftable')(void *p, char);

//----- (00673CF0) --------------------------------------------------------
double __thiscall CMagicCircleController::GetCircleRadius(CMagicCircleController *this)
{
  return this->m_kDecal.m_fDecalWidth;
}

//----- (00673D00) --------------------------------------------------------
NiNode *__thiscall CMagicCircleController::GetNode(CMagicCircleController *this)
{
  return this->m_spCircleObject.m_pObject;
}

//----- (00673D10) --------------------------------------------------------
void __thiscall CMagicCircleController::Update(CMagicCircleController *this, float fTime)
{
  CMagicCircleController *v2; // esi@1

  v2 = this;
  if ( this->m_bEnable )
  {
    this->m_spCircleObject.m_pObject->m_uFlags &= 0xFFFEu;
    NsDecal::Update(&this->m_kDecal, 0.0, this->m_spCircleObject.m_pObject, &this->m_SavePos);
    NiAVObject::Update((NiAVObject *)&v2->m_spCircleObject.m_pObject->vfptr, fTime, 1);
  }
  else
  {
    this->m_spCircleObject.m_pObject->m_uFlags |= 1u;
  }
}

//----- (00673D70) --------------------------------------------------------
char __thiscall CMagicCircleController::ResetInitTerrain(CMagicCircleController *this, PgNsTerrain *pNsTerrain)
{
  this->m_kDecal.m_pkHpTerrain = pNsTerrain;
  return 1;
}

//----- (00673D80) --------------------------------------------------------
char __thiscall CMagicCircleController::Init(CMagicCircleController *this, const char *pkFileName, PgNsTerrain *pNsTerrain, NiNode *pBuildGround)
{
  CMagicCircleController *v4; // esi@1
  NiNode *v5; // edi@1
  NiNode *v6; // eax@1
  NiNode *v7; // ebx@1
  NiNode *v9; // eax@8
  NiNode *v10; // eax@9
  NiNode *v11; // esi@10
  int v12; // edi@17
  NiNode *v13; // ebx@18
  NiObject *v14; // eax@18
  NiObject *v15; // eax@18
  NiObject *v16; // esi@18
  NiNode *v17; // ST08_4@25
  NiPointer<NiNode> spNode; // [sp+14h] [bp-14h]@1
  CMagicCircleController *v19; // [sp+18h] [bp-10h]@1

  v4 = this;
  v19 = this;
  v5 = 0;
  v6 = PgUtil::LoadNifFile(pkFileName, 0);
  v7 = v6;
  spNode.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  if ( !v7 )
    return 0;
  pkFileName = (const char *)v7->vfptr[18].__vecDelDtor((NiRefObject *)v7, (unsigned int)"Plane01");
  if ( !pkFileName )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    return 0;
  }
  v9 = (NiNode *)operator new(0xE8u);
  if ( v9 )
  {
    NiNode::NiNode(v9, 0);
    v5 = v10;
  }
  v11 = v4->m_spCircleObject.m_pObject;
  if ( v11 != v5 )
  {
    if ( v11 && !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    v19->m_spCircleObject.m_pObject = v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  }
  v12 = *((_DWORD *)pkFileName + 40);
  if ( v12 )
  {
    do
    {
      v13 = v19->m_spCircleObject.m_pObject;
      v14 = *(NiObject **)(v12 + 8);
      v12 = *(_DWORD *)v12;
      v15 = NiObject::Clone(v14);
      v16 = v15;
      pkFileName = (const char *)v15;
      if ( v15 )
        InterlockedIncrement((volatile LONG *)&v15->m_uiRefCount);
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v13->m_kPropertyList,
        (NiPointer<NiRoom> *)&pkFileName);
      if ( v16 && !InterlockedDecrement((volatile LONG *)&v16->m_uiRefCount) )
        v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
    }
    while ( v12 );
    v7 = spNode.m_pObject;
  }
  NiAVObject::UpdateProperties((NiAVObject *)&v19->m_spCircleObject.m_pObject->vfptr);
  v17 = pBuildGround;
  v19->m_kDecal.m_pkHpTerrain = pNsTerrain;
  NsDecal::SetObjectTerrain(&v19->m_kDecal, v17);
  if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  return 1;
}

//----- (00673F50) --------------------------------------------------------
void __thiscall CMagicCircleController::SetCircleRadius(CMagicCircleController *this, float fRadius)
{
  NsDecal::SetDecalSize(&this->m_kDecal, fRadius, fRadius);
}

//----- (00673F70) --------------------------------------------------------
CMagicCircleController *__thiscall CMagicCircleController::`scalar deleting destructor'(CMagicCircleController *this, unsigned int a2)
{
  CMagicCircleController *v2; // esi@1

  v2 = this;
  CMagicCircleController::~CMagicCircleController(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00673FA0) --------------------------------------------------------
char MapObjMgr::Init()
{
  return 1;
}

//----- (00673FE0) --------------------------------------------------------
NiNode *__thiscall MapObjMgr::GetFromMap(MapObjMgr *this, char *pcName)
{
  NiNode *v2; // esi@1
  NiNode *v3; // edi@2
  NiNode *result; // eax@4
  NiPointer<NiNode> spNode; // [sp+Ch] [bp-10h]@1
  int v6; // [sp+18h] [bp-4h]@1

  spNode.m_pObject = 0;
  v6 = 0;
  NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)this,
    pcName,
    (NiPointer<NiShaderLibrary> *)&spNode);
  v2 = spNode.m_pObject;
  if ( spNode.m_pObject )
  {
    NiObjectNET::ms_eCopyType = 1;
    v3 = (NiNode *)NiObject::Clone((NiObject *)&spNode.m_pObject->vfptr);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    result = v3;
  }
  else
  {
    result = 0;
  }
  return result;
}
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (00674080) --------------------------------------------------------
NiNode *__thiscall MapObjMgr::Get(MapObjMgr *this, char *pcName)
{
  MapObjMgr *v2; // edi@1
  char *v3; // esi@1
  NiNode *result; // eax@1
  const char *v5; // eax@4
  NiNode *v6; // edi@8
  char *v7; // esi@9
  char *v8; // [sp-4h] [bp-20h]@6
  char **v9; // [sp+Ch] [bp-10h]@6
  int v10; // [sp+18h] [bp-4h]@2

  v2 = this;
  v3 = pcName;
  result = MapObjMgr::GetFromMap(this, pcName);
  if ( !result )
  {
    pcName = 0;
    v10 = 0;
    if ( !Folder::m_bInit )
      Folder::Init();
    v5 = Folder::Merge(&Folder::m_acMain, v3);
    PgUtil::LoadNodeNifFile(v5, (NiPointer<NiNode> *)&pcName, 0);
    if ( pcName )
    {
      v8 = pcName;
      v9 = &v8;
      if ( pcName )
        InterlockedIncrement((volatile LONG *)pcName + 1);
      NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
        (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)v2,
        (unsigned int)v3,
        (NiPointer<PgWinBut>)v8);
      v6 = (NiNode *)NiObject::Clone((NiObject *)pcName);
      v10 = -1;
      if ( pcName )
      {
        v7 = pcName;
        if ( !InterlockedDecrement((volatile LONG *)pcName + 1) )
        {
          if ( v7 )
            (**(void (__thiscall ***)(char *, signed int))v7)(v7, 1);
        }
      }
      result = v6;
    }
    else
    {
      result = 0;
    }
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00674170) --------------------------------------------------------
void __thiscall MapObjMgr::MapObjMgr(MapObjMgr *this)
{
  MapObjMgr *v1; // esi@1
  char *v2; // eax@1
  unsigned int v3; // ST08_4@1

  v1 = this;
  this->m_kMap.m_uiHashSize = 37;
  this->m_kMap.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode> >Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode>>::`vftable';
  this->m_kMap.m_kAllocator.m_uiCount = 0;
  v2 = (char *)operator new[](0x94u);
  v3 = 4 * v1->m_kMap.m_uiHashSize;
  v1->m_kMap.m_ppkHashTable = (NiTMapItem<char const *,NiPointer<NiNode> > **)v2;
  memset(v2, 0, v3);
  v1->m_kMap.m_bCopy = 1;
  v1->m_kMap.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode> >Vtbl *)&NiTStringPointerMap<NiPointer<NiNode>>::`vftable';
}
// 9BADE0: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode>>::`vftable')(void *p, char);
// 9BAEC8: using guessed type int (__thiscall *NiTStringPointerMap<NiPointer<NiNode>>::`vftable')(void *p, char);

//----- (006741D0) --------------------------------------------------------
void __thiscall Shadow::~Shadow(Shadow *this)
{
  Shadow *v1; // esi@1
  NsShadowObject *v2; // edi@1
  NiNode *v3; // edi@3
  NiNode *v4; // edi@8
  NiNode *v5; // edi@13
  NiNode *v6; // edi@17
  NiNode *v7; // edi@21

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&Shadow::`vftable';
  NsDecal::Terminate(&this->m_kDecal);
  v2 = v1->m_pkShdowObject;
  if ( v2 )
  {
    NsShadowObject::~NsShadowObject(v1->m_pkShdowObject);
    operator delete(v2);
  }
  v3 = v1->m_spNode.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spNode.m_pObject = 0;
  }
  v4 = v1->m_spCircleShadowObject.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spCircleShadowObject.m_pObject = 0;
  }
  v5 = v1->m_spModelShadowObject.m_pObject;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  v6 = v1->m_spCircleShadowObject.m_pObject;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  v7 = v1->m_spNode.m_pObject;
  if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  NsDecal::~NsDecal(&v1->m_kDecal);
  v1->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9BC12C: using guessed type int (__thiscall *Shadow::`vftable')(void *p, char);

//----- (00674310) --------------------------------------------------------
void __thiscall Shadow::Render(Shadow *this, NiNode *pkRenderTarget, NiPoint3 *kPos)
{
  Shadow *v3; // edi@1
  NiRenderer *v4; // esi@4

  v3 = this;
  if ( pkRenderTarget )
  {
    if ( this->m_eShadowMode )
    {
      NsDecal::Update(&this->m_kDecal, 0.0, this->m_spModelShadowObject.m_pObject, kPos);
      NsShadowObject::SetCaster(v3->m_pkShdowObject, pkRenderTarget);
      v4 = NiRenderer::ms_pkRenderer;
      if ( NiRenderer::ms_pkRenderer
        && NiRenderer::ms_pkRenderer->m_eFrameState == FRAMESTATE_OUTSIDE_FRAME
        && NiRenderer::ms_pkRenderer->m_eOffScreenFrameState == FRAMESTATE_OUTSIDE_FRAME
        && (unsigned __int8)((int (__thiscall *)(_DWORD))NiRenderer::ms_pkRenderer->vfptr[66].__vecDelDtor)(NiRenderer::ms_pkRenderer) )
      {
        v4->m_eFrameState = 1;
      }
      NsShadowObject::ClickAndStuff(v3->m_pkShdowObject, 0.0, 0.0);
      if ( v4
        && v4->m_eFrameState == 1
        && v4->m_eOffScreenFrameState == FRAMESTATE_OUTSIDE_FRAME
        && (unsigned __int8)((int (__thiscall *)(_DWORD))v4->vfptr[67].__vecDelDtor)(v4) )
      {
        v4->m_eFrameState = 2;
      }
      if ( v4->m_eFrameState == 2 && v4->m_eOffScreenFrameState == FRAMESTATE_OUTSIDE_FRAME )
      {
        if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v4->vfptr[68].__vecDelDtor)(v4) )
        {
          ++v4->m_uiFrameID;
          v4->m_eFrameState = 0;
        }
      }
    }
    else
    {
      NsDecal::Update(&this->m_kDecal, 0.0, this->m_spCircleShadowObject.m_pObject, kPos);
    }
  }
}

//----- (00674400) --------------------------------------------------------
void __thiscall Shadow::Shadow(Shadow *this, NiPoint3 *pkLightDir, PgNsTerrain *pkTerrain, NiNode *pkGroundNode, unsigned int uiDetail)
{
  Shadow *v5; // esi@1
  NiNode *v6; // ebx@1
  NsShadowObject *v7; // eax@1
  NiNode *v8; // eax@1
  NiNode *v9; // eax@2
  NiNode *v10; // edi@3
  NiNode *v11; // eax@10
  NiNode *v12; // eax@11
  NiNode *v13; // ebx@11
  NiNode *v14; // edi@13
  NiNode *v15; // ebx@20
  NsShadowObject *v16; // edi@20
  NsShadowObject *v17; // eax@22
  NiMaterialProperty *v18; // ecx@22
  float v19; // eax@23
  float v20; // edi@25
  double v21; // st7@25
  int v22; // ecx@25
  float kDir_8; // ST20_4@25

  v5 = this;
  v6 = 0;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v5->vfptr = (NiRefObjectVtbl *)&Shadow::`vftable';
  NsDecal::NsDecal(&v5->m_kDecal);
  v5->m_spNode.m_pObject = 0;
  v5->m_spCircleShadowObject.m_pObject = 0;
  v5->m_spModelShadowObject.m_pObject = 0;
  v5->m_eShadowMode = 1;
  NsDecal::Init(&v5->m_kDecal);
  NsDecal::SetDecalSize(&v5->m_kDecal, 100.0, 100.0);
  v7 = NsShadowObject::Create(NiRenderer::ms_pkRenderer, 7u);
  v5->m_kDecal.m_pkHpTerrain = pkTerrain;
  v5->m_pkShdowObject = v7;
  NsDecal::SetObjectTerrain(&v5->m_kDecal, pkGroundNode);
  v8 = (NiNode *)operator new(0xE8u);
  if ( v8 )
  {
    NiNode::NiNode(v8, 0);
    v6 = v9;
  }
  v10 = v5->m_spNode.m_pObject;
  if ( v10 != v6 )
  {
    if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    v5->m_spNode.m_pObject = v6;
    if ( v6 )
      InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  }
  v11 = (NiNode *)operator new(0xE8u);
  if ( v11 )
  {
    NiNode::NiNode(v11, 0);
    v13 = v12;
  }
  else
  {
    v13 = 0;
  }
  v14 = v5->m_spModelShadowObject.m_pObject;
  if ( v14 != v13 )
  {
    if ( v14 && !InterlockedDecrement((volatile LONG *)&v14->m_uiRefCount) && v14 )
      v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
    v5->m_spModelShadowObject.m_pObject = v13;
    if ( v13 )
      InterlockedIncrement((volatile LONG *)&v13->m_uiRefCount);
  }
  ((void (__stdcall *)(NiNode *, _DWORD))v5->m_spNode.m_pObject->vfptr[29].__vecDelDtor)(
    v5->m_spModelShadowObject.m_pObject,
    0);
  v15 = v5->m_spModelShadowObject.m_pObject;
  v16 = v5->m_pkShdowObject;
  NiDynamicEffect::AttachAffectedNode(
    (NiDynamicEffect *)&v16->m_spShadow.m_pObject->vfptr,
    v5->m_spModelShadowObject.m_pObject);
  if ( v16->m_bUsedMultiEffect )
  {
    NiDynamicEffect::AttachAffectedNode((NiDynamicEffect *)&v16->m_spShadow1.m_pObject->vfptr, v15);
    NiDynamicEffect::AttachAffectedNode((NiDynamicEffect *)&v16->m_spShadow2.m_pObject->vfptr, v15);
    NiDynamicEffect::AttachAffectedNode((NiDynamicEffect *)&v16->m_spShadow3.m_pObject->vfptr, v15);
  }
  v17 = v5->m_pkShdowObject;
  v18 = v17->m_spMat.m_pObject;
  v17->m_kColorShadow.r = 0.77999997;
  v17->m_kColorShadow.g = 0.77999997;
  v17->m_kColorShadow.b = 0.77999997;
  if ( v18 )
  {
    v18->m_emit.r = v17->m_kColorShadow.r;
    v18->m_emit.g = v17->m_kColorShadow.g;
    v19 = v17->m_kColorShadow.b;
    ++v18->m_uiRevID;
    v18->m_emit.b = v19;
  }
  if ( pkLightDir )
  {
    v20 = pkLightDir->y;
    v21 = pkLightDir->z * 3.0;
    v22 = (int)&v5->m_pkShdowObject->m_dir;
    *(float *)v22 = pkLightDir->x;
    kDir_8 = v21;
    *(float *)(v22 + 4) = v20;
    *(float *)(v22 + 8) = kDir_8;
    NiPoint3::Unitize((NiPoint3 *)v22);
  }
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9BC12C: using guessed type int (__thiscall *Shadow::`vftable')(void *p, char);

//----- (00674630) --------------------------------------------------------
void __userpurge Shadow::SetShaderMode(Shadow *this@<ecx>, int a2@<ebx>, int a3@<esi>, Shadow::eShadowMode shadowmode)
{
  Shadow::eShadowMode v4; // eax@1
  Shadow *v5; // edi@1
  const char *v6; // eax@6
  NiNode *v7; // eax@6
  NiNode *v8; // eax@6
  NiNode *v9; // ecx@8
  int v10; // eax@9
  int v11; // esi@10
  NiObject *v12; // eax@11
  NiProperty *v13; // eax@11
  void (__thiscall ***v14)(_DWORD, _DWORD); // esi@13
  void (__thiscall ***v15)(_DWORD, _DWORD); // esi@17
  NiNode *v16; // ecx@20
  double v17; // st7@21
  float fWidth_; // ST30_4@23
  float fHeight_; // ST2C_4@23
  int v20; // [sp+34h] [bp-Ch]@2

  v4 = shadowmode;
  v5 = this;
  if ( this->m_eShadowMode == shadowmode )
    return;
  v20 = a3;
  this->m_eShadowMode = shadowmode;
  if ( v4 || this->m_spCircleShadowObject.m_pObject )
    goto LABEL_12;
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = Folder::Merge(&Folder::m_acSystem, "Misc\\DecalPlane_Shadow.nif");
  v7 = PgUtil::LoadNifFile(v6, 0);
  NiPointer<PopupMenuWin>::operator=(
    (NiPointer<NiD3DDefaultShader> *)&v5->m_spCircleShadowObject,
    (NiD3DDefaultShader *)v7);
  v8 = v5->m_spCircleShadowObject.m_pObject;
  if ( !v8 )
  {
    v5->m_eShadowMode = 1;
    return;
  }
  ((void (__stdcall *)(NiNode *, _DWORD))v5->m_spNode.m_pObject->vfptr[29].__vecDelDtor)(v8, 0);
  v9 = v5->m_spCircleShadowObject.m_pObject;
  if ( v9 )
  {
    v10 = ((int (__stdcall *)(const char *))v9->vfptr[18].__vecDelDtor)("Editable Mesh");
    if ( v10 )
    {
      v11 = *(_DWORD *)(v10 + 160);
      while ( v11 )
      {
        v12 = *(NiObject **)(v11 + 8);
        v11 = *(_DWORD *)v11;
        shadowmode = (Shadow::eShadowMode)v5->m_spCircleShadowObject.m_pObject;
        v13 = (NiProperty *)NiObject::Clone(v12);
        NiAVObject::AttachProperty((NiAVObject *)shadowmode, v13);
      }
LABEL_12:
      ((void (__stdcall *)(Shadow::eShadowMode *, NiNode *, int, int))v5->m_spNode.m_pObject->vfptr[30].__vecDelDtor)(
        &shadowmode,
        v5->m_spCircleShadowObject.m_pObject,
        v20,
        a2);
      if ( shadowmode )
      {
        v14 = (void (__thiscall ***)(_DWORD, _DWORD))shadowmode;
        if ( !InterlockedDecrement((volatile LONG *)(shadowmode + 4)) )
        {
          if ( v14 )
            (**v14)(v14, 1);
        }
      }
      ((void (__stdcall *)(Shadow::eShadowMode *, NiNode *))v5->m_spNode.m_pObject->vfptr[30].__vecDelDtor)(
        &shadowmode,
        v5->m_spModelShadowObject.m_pObject);
      if ( shadowmode )
      {
        v15 = (void (__thiscall ***)(_DWORD, _DWORD))shadowmode;
        if ( !InterlockedDecrement((volatile LONG *)(shadowmode + 4)) )
        {
          if ( v15 )
            (**v15)(v15, 1);
        }
      }
      v16 = v5->m_spNode.m_pObject;
      if ( v5->m_eShadowMode )
      {
        ((void (__cdecl *)(NiNode *))v16->vfptr[29].__vecDelDtor)(v5->m_spModelShadowObject.m_pObject);
        v17 = 100.0;
      }
      else
      {
        ((void (__cdecl *)(NiNode *))v16->vfptr[29].__vecDelDtor)(v5->m_spCircleShadowObject.m_pObject);
        v17 = 50.0;
      }
      fWidth_ = v17;
      fHeight_ = v17;
      NsDecal::SetDecalSize(&v5->m_kDecal, fHeight_, fWidth_);
      return;
    }
  }
}
// 674630: could not find valid save-restore pair for ebx
// 674630: could not find valid save-restore pair for esi
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006747C0) --------------------------------------------------------
void __thiscall NsShadowObject::SetCaster(NsShadowObject *this, NiNode *pCaster)
{
  NsShadowObject *v2; // ebx@1
  NiNode *v3; // esi@1

  v2 = this;
  v3 = this->m_spCaster.m_pObject;
  if ( v3 != pCaster )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spCaster.m_pObject = pCaster;
    if ( pCaster )
      InterlockedIncrement((volatile LONG *)&pCaster->m_uiRefCount);
  }
}

//----- (00674810) --------------------------------------------------------
Shadow *__thiscall Shadow::`vector deleting destructor'(Shadow *this, unsigned int a2)
{
  Shadow *v2; // esi@1

  v2 = this;
  Shadow::~Shadow(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00674840) --------------------------------------------------------
char SkyCtrl::Init()
{
  return 1;
}

//----- (00674870) --------------------------------------------------------
void __thiscall SkyCtrl::~SkyCtrl(SkyCtrl *this)
{
  NiNode *v1; // esi@1

  this->vfptr = (SkyCtrlVtbl *)&SkyCtrl::`vftable';
  v1 = this->m_spNode.m_pObject;
  if ( v1 && !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
  {
    if ( v1 )
      v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
  }
}
// 9BC144: using guessed type int (__thiscall *SkyCtrl::`vftable')(void *p, char);

//----- (006748A0) --------------------------------------------------------
void __thiscall SkyCtrl::Clear(SkyCtrl *this)
{
  SkyCtrl *v1; // edi@1
  NiNode *v2; // esi@1

  v1 = this;
  this->m_nMaxTime = 0;
  v2 = this->m_spNode.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
    v1->m_spNode.m_pObject = 0;
  }
}

//----- (006748E0) --------------------------------------------------------
char __thiscall SkyCtrl::SetNode(SkyCtrl *this, NiNode *pkNode)
{
  SkyCtrl *v2; // esi@1
  NiNode *v3; // edi@1
  NiNode *v4; // edi@6
  NiAVObject *_fTime; // ST08_4@13
  NsEffect kEffect; // [sp+1Ch] [bp-30h]@13
  int v8; // [sp+48h] [bp-4h]@13

  v2 = this;
  this->m_nMaxTime = 0;
  v3 = this->m_spNode.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spNode.m_pObject = 0;
  }
  v4 = v2->m_spNode.m_pObject;
  if ( v4 != pkNode )
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v2->m_spNode.m_pObject = pkNode;
    if ( pkNode )
      InterlockedIncrement((volatile LONG *)&pkNode->m_uiRefCount);
  }
  NsEffect::NsEffect(&kEffect);
  _fTime = (NiAVObject *)&v2->m_spNode.m_pObject->vfptr;
  v8 = 0;
  NsEffect::SetEffectNode(&kEffect, _fTime);
  NsEffect::Start(&kEffect, 0.0);
  v2->m_nMaxTime = (signed int)kEffect.m_fMaxTime;
  v8 = -1;
  NsEffect::~NsEffect(&kEffect);
  return 1;
}

//----- (006749D0) --------------------------------------------------------
void __thiscall SkyCtrl::Terminate(SkyCtrl *this)
{
  SkyCtrl *v1; // edi@1
  NiNode *v2; // esi@1

  v1 = this;
  this->m_nMaxTime = 0;
  v2 = this->m_spNode.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
    v1->m_spNode.m_pObject = 0;
  }
}

//----- (00674A10) --------------------------------------------------------
void __thiscall SkyCtrl::Update(SkyCtrl *this, float fTime)
{
  SkyCtrl *v2; // esi@1
  Name3 *v3; // eax@2
  Name3 *v4; // eax@3
  double v5; // st7@5
  float v6; // ST04_4@7
  Name3 v7; // [sp+Ch] [bp-20h]@3
  float fGameTime; // [sp+18h] [bp-14h]@1
  Name3 result; // [sp+1Ch] [bp-10h]@2

  v2 = this;
  fGameTime = Server::GetGameTime(&g_kServer, fTime);
  if ( v2->m_spNode.m_pObject )
  {
    v3 = World::GetMapName(&g_kWorld, &result);
    if ( MapInfoTab::GetByMapName(v3) )
    {
      *(_QWORD *)&result.n3_code[1] = 0i64;
      *(_QWORD *)&result.n3_name[0] = 0i64;
      strncpy(result.n3_name, "KDVictor", 0xCu);
      v4 = World::GetMapName(&g_kWorld, &v7);
      if ( *(_QWORD *)&v4->n3_code[0] != *(_QWORD *)&result.n3_name[0] || v4->n3_code[2] != result.n3_code[2] )
      {
        fGameTime = fGameTime / (Server::ONE_DAY_TIME / (double)v2->m_nMaxTime);
        v5 = fGameTime;
      }
      else
      {
        v5 = fGameTime;
      }
      v6 = v5;
      NiAVObject::Update((NiAVObject *)&v2->m_spNode.m_pObject->vfptr, v6, 1);
    }
  }
}
// A754F0: using guessed type float Server::ONE_DAY_TIME;

//----- (00674AF0) --------------------------------------------------------
SkyCtrl *__thiscall SkyCtrl::`scalar deleting destructor'(SkyCtrl *this, unsigned int a2)
{
  SkyCtrl *v2; // edi@1
  NiNode *v3; // esi@1

  v2 = this;
  this->vfptr = (SkyCtrlVtbl *)&SkyCtrl::`vftable';
  v3 = this->m_spNode.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BC144: using guessed type int (__thiscall *SkyCtrl::`vftable')(void *p, char);

//----- (00674B40) --------------------------------------------------------
void __thiscall NiTextureAccumulator::CopyMembers(NiTextureAccumulator *this, NiTextureAccumulator *pkDest, NiCloningProcess *kCloning)
{
  NiInterpolator::CopyMembers((NiCollisionObject *)this, (NiCollisionObject *)pkDest, kCloning);
}

//----- (00674B50) --------------------------------------------------------
void __thiscall NiTextureAccumulator::LoadBinary(NiTextureAccumulator *this, NiStream *kStream)
{
  NiLODData::LoadBinary((NiRenderTargetGroup *)this, kStream);
}

//----- (00674B60) --------------------------------------------------------
void __thiscall NiTextureAccumulator::LinkObject(NiTextureAccumulator *this, NiStream *kStream)
{
  NiPosData::LinkObject((NiPSysEmitterCtlrData *)this, kStream);
}

//----- (00674B70) --------------------------------------------------------
int __thiscall NiTextureAccumulator::RegisterStreamables(NiTextureAccumulator *this, NiStream *kStream)
{
  return NiMorphData::RegisterStreamables((NiPSysModifier *)this, kStream);
}

//----- (00674B80) --------------------------------------------------------
void __thiscall NiTextureAccumulator::SaveBinary(NiTextureAccumulator *this, NiStream *kStream)
{
  NiPosData::LinkObject((NiPSysEmitterCtlrData *)this, kStream);
}

//----- (00674B90) --------------------------------------------------------
bool __thiscall NiTextureAccumulator::IsEqual(NiTextureAccumulator *this, NiObject *pkObject)
{
  return NiSequence::IsEqual((NiAccumulator *)&this->vfptr, pkObject) != 0;
}

//----- (00674BB0) --------------------------------------------------------
void __thiscall World::Terminate(World *this)
{
  World *v1; // esi@1

  v1 = this;
  MiniHouseIndoor::Terminate(&this->m_MiniHouseIndoorMode);
  v1->m_MinihouseJoinOpt.bMaster = 0;
  World::TerminatePathFinding(v1);
  World::TerminateMiniMap(v1);
  World::TerminateMisc(v1);
  World::TerminatePick(v1);
  World::TerminateShadow(v1);
  World::TerminateLightFog(v1);
  World::TerminateSkyCtrl(v1);
  World::TerminateCamera(v1);
  World::TerminateScene(v1);
}

//----- (00674C00) --------------------------------------------------------
void __thiscall World::Clear(World *this)
{
  World *v1; // esi@1

  v1 = this;
  World::ClearPathFinding(this);
  World::ClearMiniMap(v1);
  World::ClearMisc(v1);
  World::ClearPick(v1);
  World::ClearShadow(v1);
  World::ClearLightFog(v1);
  World::ClearSkyCtrl(v1);
  World::ClearCamera(v1);
  World::ClearScene(v1);
}

//----- (00674C70) --------------------------------------------------------
stFogInfo *__stdcall World::GetFog(int ID)
{
  return 0;
}

//----- (00674C90) --------------------------------------------------------
char __thiscall World::Init(World *this, float fScreenWidth, float fScreenHeight)
{
  World *v3; // esi@1
  char result; // al@2
  float v5; // ecx@10
  NiAVObject **v6; // edi@11
  signed int v7; // eax@11
  float v8; // [sp+4h] [bp-Ch]@11

  v3 = this;
  if ( World::InitScene(this)
    && World::InitCamera(v3, fScreenWidth, fScreenHeight)
    && World::InitSkyCtrl()
    && World::InitLightFog(v3)
    && World::InitShadow()
    && World::InitPick(v3)
    && World::InitMisc(v3)
    && World::InitMiniMap()
    && World::InitPathFinding(v3)
    && (v8 = v5,
        v6 = (NiAVObject **)&v3->m_spWorldScene,
        NiPointer<NiNode>::NiPointer<NiNode>((NiPointer<NiNode> *)&v8, &v3->m_spWorldScene),
        v7 = MiniHouseIndoor::Create(&v3->m_MiniHouseIndoorMode, LODWORD(v8)),
        v3->m_MinihouseJoinOpt.bMaster = 0,
        v7 == 1) )
  {
    NiAVObject::UpdateEffects(*v6);
    NiAVObject::UpdateProperties(*v6);
    LODWORD(v8) = 1;
    NiAVObject::Update(*v6, 0.0, 1);
    LODWORD(v8) = 1;
    NiAVObject::Update((NiAVObject *)&v3->m_spCamera.m_pObject->vfptr, 0.0, 1);
    v3->m_ItemRepairInfo.eRepairState = 0;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00674D80) --------------------------------------------------------
void __userpurge World::Update(World *this@<ecx>, int a2@<ebx>, int a3@<edi>, float fTime)
{
  World *v4; // esi@1

  v4 = this;
  World::UpdateSkyCtrl(this, fTime);
  World::UpdateLightFog(v4, fTime);
  World::UpdateCamera(v4, *(float *)&a2, a3, (int)v4, fTime);
  World::UpdateMainCharMoveTargetPoint(v4, fTime);
  World::UpdateCharSelectMark(v4, fTime);
  World::UpdateSkyScene(v4, fTime);
  World::DrawShadow(v4);
  if ( v4->m_MiniHouseIndoorMode.m_eState )
    MiniHouseIndoor::Update(&v4->m_MiniHouseIndoorMode, a2, a3, (int)v4, fTime);
  CMagicCircleController::Update(v4->m_spMagicCircleController.m_pObject, fTime);
  World::UpdateCharDecalMark(v4, fTime);
  World::UpdateScene(v4, fTime);
}

//----- (00674E30) --------------------------------------------------------
void __thiscall World::SetMapDirectionalLightAmbientColor(World *this, NiColor *kColor)
{
  NiDirectionalLight *v2; // eax@1
  float v3; // ecx@1

  v2 = this->m_spMapDirectionalLight.m_pObject;
  v2->m_kAmb.r = kColor->r;
  v2->m_kAmb.g = kColor->g;
  v3 = kColor->b;
  ++v2->m_uiRevID;
  v2->m_kAmb.b = v3;
}

//----- (00674E60) --------------------------------------------------------
void __thiscall World::SetMapDirectionalLightDiffuseColor(World *this, NiColor *kColor)
{
  NiDirectionalLight *v2; // eax@1
  float v3; // ecx@1

  v2 = this->m_spMapDirectionalLight.m_pObject;
  v2->m_kDiff.r = kColor->r;
  v2->m_kDiff.g = kColor->g;
  v3 = kColor->b;
  ++v2->m_uiRevID;
  v2->m_kDiff.b = v3;
}

//----- (00674E90) --------------------------------------------------------
NiPointer<NiAVObject> *__userpurge World::GetGroundObject@<eax>(World *this@<ecx>, int a2@<esi>, NiPointer<NiAVObject> *result, const char *pcNodeName)
{
  NiNode *v4; // ecx@1
  NiPointer<NiAVObject> *v5; // eax@2
  NiAVObject *v6; // eax@3

  v4 = this->m_spGroundObject.m_pObject;
  if ( v4 )
  {
    v6 = (NiAVObject *)((int (__stdcall *)(const char *, int))v4->vfptr[18].__vecDelDtor)(pcNodeName, a2);
    result->m_pObject = v6;
    if ( v6 )
      InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
    v5 = result;
  }
  else
  {
    v5 = result;
    result->m_pObject = 0;
  }
  return v5;
}

//----- (00674EE0) --------------------------------------------------------
void __cdecl ShDrawVisibleArrayAppend(NiVisibleArray *kVisibleSet)
{
  NiAccumulator *v1; // esi@2
  unsigned int v2; // edi@6
  unsigned int v3; // esi@6
  NiRenderer *pkRenderer; // [sp+10h] [bp-14h]@1
  NiPointer<NiAccumulator> spSorter; // [sp+14h] [bp-10h]@2

  pkRenderer = NiRenderer::ms_pkRenderer;
  if ( NiRenderer::ms_pkRenderer )
  {
    v1 = NiRenderer::ms_pkRenderer->m_spAccum.m_pObject;
    spSorter.m_pObject = v1;
    if ( v1 )
      InterlockedIncrement((volatile LONG *)&v1->m_uiRefCount);
    if ( v1 )
    {
      v1->vfptr[17].__vecDelDtor((NiRefObject *)v1, (unsigned int)kVisibleSet);
    }
    else
    {
      v2 = kVisibleSet->m_uiCurrentSize;
      v3 = 0;
      if ( v2 )
      {
        do
          ((void (__stdcall *)(_DWORD))kVisibleSet->m_ppkArray[v3++]->vfptr[29].__vecDelDtor)(pkRenderer);
        while ( v3 < v2 );
      }
      v1 = spSorter.m_pObject;
    }
    if ( v1 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
        v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
    }
  }
}

//----- (00674FA0) --------------------------------------------------------
void __thiscall World::GetLoadFolderName(World *this, char *pMapLoadFolderName, const char *pkExt)
{
  World *v3; // esi@1
  Name3 *v4; // edi@1
  MapInfo *v5; // eax@1
  int v6; // eax@1
  char acMapName[13]; // [sp+10h] [bp-14h]@1

  v3 = this;
  v4 = &this->m_kMapName;
  MapViewInfoTab::GetByMapName(&this->m_kMapName);
  v5 = MapInfoTab::GetByMapName(v4);
  *(_DWORD *)acMapName = v5->MapFolderName.n3_code[0];
  *(_DWORD *)&acMapName[4] = v5->MapFolderName.n3_code[1];
  *(_DWORD *)&acMapName[8] = v5->MapFolderName.n3_code[2];
  v6 = v3->m_MapType;
  acMapName[12] = 0;
  switch ( v6 )
  {
    case 0:
    case 6:
    case 7:
      if ( !Folder::m_bInit )
        Folder::Init();
      sprintf(pMapLoadFolderName, "%sfield\\%s\\%s.%s", &Folder::m_acMap, acMapName, acMapName, pkExt);
      break;
    case 1:
      if ( !Folder::m_bInit )
        Folder::Init();
      sprintf(pMapLoadFolderName, "%sKDfield\\%s\\%s.%s", &Folder::m_acMap, acMapName, acMapName, pkExt);
      break;
    case 2:
      if ( !Folder::m_bInit )
        Folder::Init();
      sprintf(pMapLoadFolderName, "%sMHfield\\%s\\%s.%s", &Folder::m_acMap, acMapName, acMapName, pkExt);
      break;
    case 3:
      if ( !Folder::m_bInit )
        Folder::Init();
      sprintf(pMapLoadFolderName, "%sIDfield\\%s\\%s.%s", &Folder::m_acMap, acMapName, acMapName, pkExt);
      break;
    case 4:
      if ( !Folder::m_bInit )
        Folder::Init();
      sprintf(pMapLoadFolderName, "%sfield\\%s\\%s.%s", &Folder::m_acMap, acMapName, acMapName, pkExt);
      break;
    default:
      return;
  }
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00675100) --------------------------------------------------------
void __cdecl ShDrawVisibleArray(NiCamera *pkCamera, NiVisibleArray *kVisibleSet)
{
  NiAccumulator *v2; // esi@3

  if ( NiRenderer::ms_pkRenderer && pkCamera )
  {
    v2 = NiRenderer::ms_pkRenderer->m_spAccum.m_pObject;
    if ( v2 )
      InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
    if ( v2 )
      v2->vfptr[15].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkCamera);
    ShDrawVisibleArrayAppend(kVisibleSet);
    if ( v2 )
      ((void (__thiscall *)(_DWORD))v2->vfptr[16].__vecDelDtor)(v2);
    if ( v2 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
  }
}

//----- (006751C0) --------------------------------------------------------
void __cdecl ShDrawScene(NiCamera *pkCamera, NiAVObject *pkScene, NiCullingProcess *kCuller, NiVisibleArray *pkVisibleSet)
{
  NiVisibleArray *v4; // esi@4

  if ( NiRenderer::ms_pkRenderer )
  {
    if ( pkCamera )
    {
      if ( pkScene )
      {
        v4 = pkVisibleSet;
        if ( pkVisibleSet || (v4 = kCuller->m_pkVisibleSet) != 0 )
        {
          NiRenderer::SetCameraData(NiRenderer::ms_pkRenderer, pkCamera);
          v4->m_uiCurrentSize = 0;
          kCuller->vfptr->Process(kCuller, pkCamera, pkScene, v4);
          ShDrawVisibleArray(pkCamera, v4);
        }
      }
    }
  }
}

//----- (00675220) --------------------------------------------------------
void __thiscall World::Draw(World *this)
{
  World *v1; // esi@1
  NiAVObject *v2; // ST04_4@1
  NiCamera *v3; // ST00_4@1
  int v4; // eax@1
  NiCamera *v5; // esi@1
  NiVisibleArray *v6; // edi@4
  NiAVObject *v7; // ecx@5
  NiVisibleArray m_kVisible; // [sp+10h] [bp-B4h]@1
  NiAVObject *v9; // [sp+20h] [bp-A4h]@1
  NiCullingProcess m_kCuller; // [sp+24h] [bp-A0h]@1
  int v11; // [sp+C0h] [bp-4h]@1

  v1 = this;
  NiCamera::SetViewFrustum(this->m_spCamera.m_pObject, &this->m_kSkyFrustum);
  m_kVisible.m_ppkArray = 0;
  m_kVisible.m_uiCurrentSize = 0;
  m_kVisible.m_uiAllocatedSize = 0;
  m_kVisible.m_uiGrowBy = 1024;
  NiVisibleArray::SetAllocatedSize(&m_kVisible, 0x400u);
  v11 = 0;
  NiCullingProcess::NiCullingProcess(&m_kCuller, &m_kVisible);
  v2 = (NiAVObject *)&v1->m_spSkyScene.m_pObject->vfptr;
  v3 = v1->m_spCamera.m_pObject;
  LOBYTE(v11) = 1;
  NiDrawScene(v3, v2, &m_kCuller, 0);
  NiCamera::SetViewFrustum(v1->m_spCamera.m_pObject, &v1->m_kWorldFrustum);
  v4 = (int)v1->m_spWorldScene.m_pObject;
  v5 = v1->m_spCamera.m_pObject;
  v9 = (NiAVObject *)v4;
  if ( NiRenderer::ms_pkRenderer )
  {
    if ( v5 )
    {
      if ( v4 )
      {
        v6 = m_kCuller.m_pkVisibleSet;
        if ( m_kCuller.m_pkVisibleSet )
        {
          NiRenderer::SetCameraData(NiRenderer::ms_pkRenderer, v5);
          v7 = v9;
          v6->m_uiCurrentSize = 0;
          m_kCuller.vfptr->Process(&m_kCuller, v5, v7, v6);
          ShDrawVisibleArray(v5, v6);
        }
      }
    }
  }
  LOBYTE(v11) = 0;
  NiCullingProcess::~NiCullingProcess(&m_kCuller);
  operator delete(m_kVisible.m_ppkArray);
}

//----- (00675370) --------------------------------------------------------
void __thiscall NiTextureAccumulator::NiTextureAccumulator(NiTextureAccumulator *this)
{
  NiTextureAccumulator *v1; // esi@1

  v1 = this;
  NiAccumulator::NiAccumulator((NiAccumulator *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&NiTextureAccumulator::`vftable';
  v1->m_vecItem._Myfirst = 0;
  v1->m_vecItem._Mylast = 0;
  v1->m_vecItem._Myend = 0;
}
// 9BC3BC: using guessed type int (__thiscall *NiTextureAccumulator::`vftable')(void *p, char);

//----- (00675390) --------------------------------------------------------
NiCollisionObject *__thiscall NiTextureAccumulator::CreateClone(NiTextureAccumulator *this, NiCloningProcess *kCloning)
{
  NiCollisionObject *v2; // ebx@1
  NiAccumulator *v3; // eax@1
  NiCollisionObject *v4; // esi@1

  v2 = (NiCollisionObject *)this;
  v3 = (NiAccumulator *)operator new(0x1Cu);
  v4 = (NiCollisionObject *)v3;
  if ( v3 )
  {
    NiAccumulator::NiAccumulator(v3);
    v4->vfptr = (NiRefObjectVtbl *)&NiTextureAccumulator::`vftable';
    v4[1].vfptr = 0;
    v4[1].m_uiRefCount = 0;
    v4[1].m_pkSceneObject = 0;
  }
  else
  {
    v4 = 0;
  }
  NiInterpolator::CopyMembers(v2, v4, kCloning);
  return v4;
}
// 9BC3BC: using guessed type int (__thiscall *NiTextureAccumulator::`vftable')(void *p, char);

//----- (00675420) --------------------------------------------------------
NiObject *__cdecl NiTextureAccumulator::CreateObject()
{
  NiAccumulator *v0; // eax@1
  NiObject *v1; // esi@1
  NiObject *result; // eax@2

  v0 = (NiAccumulator *)operator new(0x1Cu);
  v1 = (NiObject *)v0;
  if ( v0 )
  {
    NiAccumulator::NiAccumulator(v0);
    v1->vfptr = (NiRefObjectVtbl *)&NiTextureAccumulator::`vftable';
    v1[1].m_uiRefCount = 0;
    v1[2].vfptr = 0;
    v1[2].m_uiRefCount = 0;
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9BC3BC: using guessed type int (__thiscall *NiTextureAccumulator::`vftable')(void *p, char);

//----- (006754A0) --------------------------------------------------------
void __thiscall World::PrintLights(World *this)
{
  World *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> >::_Node **v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> >::_Node *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> >::_Node *v4; // eax@3
  std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> >::_Node *j; // eax@4
  std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> >::_Node *i; // eax@7
  World *v7; // [sp+20h] [bp-208h]@1
  char temp[512]; // [sp+24h] [bp-204h]@2

  v1 = this;
  v7 = this;
  OutputDebugStringA("-----------GlobalLight Iteration Begin-----------\n");
  v2 = &v1->m_mapGlobalLight._Myhead->_Left;
  v3 = *v2;
  if ( (std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> >::_Node **)*v2 != v2 )
  {
    do
    {
      temp[0] = 0;
      memset(&temp[1], 0, 0x1FFu);
      sprintf(
        temp,
        "ID = %d, Color RGB = %f %f %f\n",
        v3->_Myval.first,
        v3->_Myval.second.m_pObject->m_kColor.r,
        v3->_Myval.second.m_pObject->m_kColor.g,
        v3->_Myval.second.m_pObject->m_kColor.b);
      OutputDebugStringA(temp);
      if ( !v3->_Isnil )
      {
        v4 = v3->_Right;
        if ( v4->_Isnil )
        {
          for ( i = v3->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v3 != i->_Right )
              break;
            v3 = i;
          }
          v3 = i;
        }
        else
        {
          v3 = v3->_Right;
          for ( j = v4->_Left; !j->_Isnil; j = j->_Left )
            v3 = j;
        }
      }
    }
    while ( v3 != v7->m_mapGlobalLight._Myhead );
  }
  OutputDebugStringA("-----------GlobalLight Iteration End-----------\n");
}

//----- (006755A0) --------------------------------------------------------
void __thiscall NiTextureAccumulator::~NiTextureAccumulator(NiTextureAccumulator *this)
{
  NiTextureAccumulator *v1; // edi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiTextureAccumulator::`vftable';
  std::vector<PgWinText *,std::allocator<PgWinText *>>::resize(
    (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&this->m_vecItem,
    0);
  if ( v1->m_vecItem._Myfirst )
    operator delete(v1->m_vecItem._Myfirst);
  v1->m_vecItem._Myfirst = 0;
  v1->m_vecItem._Mylast = 0;
  v1->m_vecItem._Myend = 0;
  v1->vfptr = (NiRefObjectVtbl *)&NiAccumulator::`vftable';
  NiRefObject::~NiRefObject((CPostProcessEffect *)v1);
}
// 9BC34C: using guessed type int (__thiscall *NiAccumulator::`vftable')(void *p, char);
// 9BC3BC: using guessed type int (__thiscall *NiTextureAccumulator::`vftable')(void *p, char);

//----- (00675630) --------------------------------------------------------
void __thiscall NiTextureAccumulator::RegisterObjectArray(NiTextureAccumulator *this, NiVisibleArray *kArray)
{
  unsigned int v2; // eax@1
  std::vector<CBaseObject *,std::allocator<CBaseObject *> > *v3; // esi@2
  NiGeometry *v4; // edi@3
  unsigned int v5; // eax@3
  CBaseObject **v6; // edx@4
  CBaseObject **v7; // ecx@5
  int v8; // edi@5
  unsigned int v9; // eax@6
  unsigned int v10; // eax@7
  unsigned int v11; // ecx@7
  unsigned int v12; // ecx@9
  CBaseObject **v13; // eax@14
  CBaseObject **v14; // ecx@16
  unsigned int v15; // eax@17
  unsigned int v16; // eax@18
  unsigned int v17; // ecx@18
  unsigned int v18; // ecx@20
  _DWORD *v19; // eax@25
  unsigned int uiQuantity; // [sp+0h] [bp-Ch]@1
  unsigned int i; // [sp+4h] [bp-8h]@1
  NiGeometry *pkObject; // [sp+8h] [bp-4h]@3

  v2 = 0;
  uiQuantity = kArray->m_uiCurrentSize;
  i = 0;
  if ( uiQuantity )
  {
    v3 = (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&this->m_vecItem;
    do
    {
      v4 = kArray->m_ppkArray[v2];
      v5 = (unsigned int)v3->_Mylast;
      pkObject = v4;
      if ( (unsigned int)&pkObject >= v5 || (v6 = v3->_Myfirst, v3->_Myfirst > (CBaseObject **)&pkObject) )
      {
        v14 = v3->_Myend;
        if ( (CBaseObject **)v5 == v14 )
        {
          v15 = (signed int)(v5 - (unsigned int)v3->_Myfirst) >> 2;
          if ( v15 > 0x3FFFFFFE )
LABEL_29:
            std::_Xlength_error("vector<T> too long");
          v16 = v15 + 1;
          v17 = v14 - v3->_Myfirst;
          if ( v16 > v17 )
          {
            if ( 0x3FFFFFFF - (v17 >> 1) >= v17 )
              v18 = (v17 >> 1) + v17;
            else
              v18 = 0;
            if ( v18 < v16 )
              v18 = v16;
            std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v3, v18);
          }
        }
        v19 = v3->_Mylast;
        if ( v19 )
          *v19 = v4;
      }
      else
      {
        v7 = v3->_Myend;
        v8 = ((char *)&pkObject - (char *)v6) >> 2;
        if ( (CBaseObject **)v5 == v7 )
        {
          v9 = (signed int)(v5 - (_DWORD)v6) >> 2;
          if ( v9 > 0x3FFFFFFE )
            goto LABEL_29;
          v10 = v9 + 1;
          v11 = v7 - v6;
          if ( v10 > v11 )
          {
            if ( 0x3FFFFFFF - (v11 >> 1) >= v11 )
              v12 = (v11 >> 1) + v11;
            else
              v12 = 0;
            if ( v12 < v10 )
              v12 = v10;
            std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v3, v12);
          }
        }
        v13 = v3->_Mylast;
        if ( v13 )
          *v13 = v3->_Myfirst[v8];
      }
      ++v3->_Mylast;
      v2 = i + 1;
      i = v2;
    }
    while ( v2 < uiQuantity );
  }
}

//----- (00675740) --------------------------------------------------------
void __thiscall NiTextureAccumulator::FinishAccumulating(NiTextureAccumulator *this)
{
  NiTextureAccumulator *v1; // ebx@1
  NiGeometry **v2; // esi@2
  NiGeometry **i; // edi@2
  NiRenderer *pkRenderer; // [sp+4h] [bp-4h]@1

  v1 = this;
  pkRenderer = NiRenderer::ms_pkRenderer;
  if ( NiRenderer::ms_pkRenderer )
  {
    ((void (*)(void))this->vfptr[18].__vecDelDtor)();
    v2 = v1->m_vecItem._Myfirst;
    for ( i = v1->m_vecItem._Mylast; v2 != i; ++v2 )
      ((void (__stdcall *)(_DWORD))(*v2)->vfptr[29].__vecDelDtor)(pkRenderer);
    std::vector<PgWinText *,std::allocator<PgWinText *>>::resize(
      (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&v1->m_vecItem,
      0);
    NiAccumulator::FinishAccumulating((NiExtraData *)v1);
  }
}

//----- (006757A0) --------------------------------------------------------
NiPointer<stGlobalLightInfo> *__thiscall World::GetGlobalLight(World *this, NiPointer<stGlobalLightInfo> *result, int ID)
{
  World *v3; // esi@1
  NiPointer<stGlobalLightInfo> *v4; // eax@2
  stGlobalLightInfo *v5; // eax@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> > > itResult; // [sp+4h] [bp-4h]@1

  v3 = this;
  itResult._Ptr = 0;
  std::_Tree<std::_Tmap_traits<enum  MHE_STEP,ResElement *,std::less<enum  MHE_STEP>,std::allocator<std::pair<enum  MHE_STEP const,ResElement *>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *)&this->m_mapGlobalLight,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > *)&itResult,
    (OscTarget *)&ID);
  if ( itResult._Ptr == v3->m_mapGlobalLight._Myhead )
  {
    v4 = result;
    result->m_pObject = 0;
  }
  else
  {
    v5 = itResult._Ptr->_Myval.second.m_pObject;
    result->m_pObject = v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
    v4 = result;
  }
  return v4;
}

//----- (00675800) --------------------------------------------------------
void __thiscall World::ChangeGlobalAmbLight(World *this, int ToID)
{
  World *v2; // edi@1
  stGlobalLightInfo *v3; // esi@1
  NiPointer<stGlobalLightInfo> pkLight; // [sp+28h] [bp-214h]@1
  char temp[512]; // [sp+2Ch] [bp-210h]@2
  int v6; // [sp+238h] [bp-4h]@1

  v2 = this;
  World::GetGlobalLight(this, &pkLight, ToID);
  v3 = pkLight.m_pObject;
  v6 = 0;
  if ( pkLight.m_pObject )
  {
    World::SetAmbientLightAmbientColor(v2, &pkLight.m_pObject->m_kColor);
    v2->m_globalLightIndex = ToID;
    temp[0] = 0;
    memset(&temp[1], 0, 0x1FFu);
    sprintf(temp, "NewID : ID = %d, Color RGB = %f %f %f\n", ToID, v3->m_kColor.r, v3->m_kColor.g, v3->m_kColor.b);
    OutputDebugStringA(temp);
  }
  else
  {
    v2->m_globalLightIndex = 0;
  }
  v6 = -1;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  }
}

//----- (00675900) --------------------------------------------------------
void __thiscall World::NowLoadingText(World *this, int LoadingRate)
{
  MapViewInfo *v2; // esi@1
  NiTexturingProperty *v3; // ebx@1
  int v4; // esi@4
  _iobuf *v5; // eax@4
  int v6; // esi@8
  int v7; // esi@9
  int *v8; // esi@10
  int v9; // esi@15
  const char *v10; // eax@22
  NiScreenElements *v11; // esi@22
  NiScreenElementsData *v12; // eax@23
  NiScreenElementsData *v13; // eax@24
  int v14; // eax@24
  int v15; // edi@24
  int v16; // eax@25
  NiScreenElements *v17; // esi@27
  NiScreenElementsData *v18; // eax@28
  NiScreenElementsData *v19; // eax@29
  int v20; // eax@29
  int v21; // esi@29
  int v22; // eax@30
  NiScreenElementsData *v23; // ecx@32
  NiTexturingProperty *v24; // ST38_4@32
  NiTexturingProperty *v25; // eax@32
  NiTexturingProperty *v26; // eax@33
  NiTexturingProperty *v27; // eax@35
  const char *v28; // ecx@36
  NiTexturingProperty *v29; // eax@38
  NiObjectNET *v30; // eax@39
  NiObjectNET *v31; // ebx@39
  NiObjectNET *v32; // eax@42
  NiObjectNET *v33; // ebx@42
  NiRenderer *v34; // ebx@45
  NiRenderTargetGroup *v35; // eax@52
  NiTexturingProperty *v36; // [sp+24h] [bp-130h]@33
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > LoadingTextFileName; // [sp+28h] [bp-12Ch]@22
  char BGFileName[256]; // [sp+44h] [bp-110h]@4
  int v39; // [sp+150h] [bp-4h]@22

  v2 = MapViewInfoTab::GetByMapName(&this->m_kMapName);
  v3 = 0;
  if ( v2 )
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    v4 = (int)v2->Loading;
    sprintf(BGFileName, "%sLoading\\%s.png", &Folder::m_acMenu, v4);
    v5 = fopen(BGFileName, "r");
    if ( v5 )
      goto LABEL_69;
    if ( !Folder::m_bInit )
      Folder::Init();
    sprintf(BGFileName, "%sLoading\\%s.tga", &Folder::m_acMenu, v4);
    v5 = fopen(BGFileName, "r");
    if ( v5 )
      goto LABEL_69;
    v6 = ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable
                                                             + 16))(
                            ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable,
                            0) )
    {
      v8 = *(int **)(v6 + 196);
      if ( *v8 )
        v7 = *v8;
      else
        v7 = 0;
    }
    else
    {
      v7 = 0;
    }
    if ( !Folder::m_bInit )
      Folder::Init();
    v9 = v7 + 132;
    sprintf(BGFileName, "%sLoading\\%s.png", &Folder::m_acMenu, v9);
    v5 = fopen(BGFileName, "r");
    if ( v5 )
    {
LABEL_69:
      fclose(v5);
    }
    else
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      sprintf(BGFileName, "%sLoading\\%s.tga", &Folder::m_acMenu, v9);
    }
    if ( !Folder::m_bInit )
      Folder::Init();
    LoadingTextFileName._Myres = 15;
    LoadingTextFileName._Mysize = 0;
    LoadingTextFileName._Bx._Buf[0] = 0;
    v10 = Folder::Merge(&Folder::m_acMenu, "loading\\NowLoadingTextColor.tga");
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&LoadingTextFileName, v10, strlen(v10));
    v39 = 0;
    v11 = (NiScreenElements *)operator new(0xC4u);
    LOBYTE(v39) = 1;
    if ( v11 )
    {
      v12 = (NiScreenElementsData *)operator new(0x70u);
      LOBYTE(v39) = 2;
      if ( v12 )
      {
        NiScreenElementsData::NiScreenElementsData(v12, 0, 1, 1u, 1, 1, 4, 1, 2, 1);
        LOBYTE(v39) = 1;
        NiScreenElements::NiScreenElements(v11, v13);
        v15 = v14;
      }
      else
      {
        LOBYTE(v39) = 1;
        NiScreenElements::NiScreenElements(v11, 0);
        v15 = v16;
      }
    }
    else
    {
      v15 = 0;
    }
    LOBYTE(v39) = 0;
    v17 = (NiScreenElements *)operator new(0xC4u);
    LOBYTE(v39) = 3;
    if ( v17 )
    {
      v18 = (NiScreenElementsData *)operator new(0x70u);
      LOBYTE(v39) = 4;
      if ( v18 )
      {
        NiScreenElementsData::NiScreenElementsData(v18, 0, 1, 1u, 1, 1, 4, 1, 2, 1);
        LOBYTE(v39) = 3;
        NiScreenElements::NiScreenElements(v17, v19);
        v21 = v20;
      }
      else
      {
        LOBYTE(v39) = 3;
        NiScreenElements::NiScreenElements(v17, 0);
        v21 = v22;
      }
    }
    else
    {
      v21 = 0;
    }
    v23 = *(NiScreenElementsData **)(v15 + 184);
    LOBYTE(v39) = 0;
    NiScreenElementsData::Insert(v23, 4u, 0, 0);
    NiScreenElementsData::Insert(*(NiScreenElementsData **)(v21 + 184), 4u, 0, 0);
    NiScreenElementsData::SetRectangle(*(NiScreenElementsData **)(v15 + 184), 0, 0.0, 0.0, 1.0, 1.0);
    *(float *)&v24 = (double)LoadingRate / 100.0 * 0.5 + 0.5;
    NiScreenElementsData::SetRectangle(*(NiScreenElementsData **)(v21 + 184), 0, 0.0, 0.87900001, *(float *)&v24, 0.121);
    NiScreenElementsData::UpdateBound(*(NiScreenElementsData **)(v15 + 184));
    NiScreenElementsData::UpdateBound(*(NiScreenElementsData **)(v21 + 184));
    NiScreenElementsData::SetColors(*(NiScreenElementsData **)(v15 + 184), 0, &NiColorA::WHITE);
    NiScreenElementsData::SetColors(*(NiScreenElementsData **)(v21 + 184), 0, &NiColorA::WHITE);
    NiScreenElementsData::SetTextures(*(NiScreenElementsData **)(v15 + 184), 0, 0, 0.0, 0.0, 1.0, 1.0);
    NiScreenElementsData::SetTextures(*(NiScreenElementsData **)(v21 + 184), 0, 0, 0.0, 0.0, *(float *)&v24, 1.0);
    v25 = (NiTexturingProperty *)operator new(0x44u);
    LOBYTE(v39) = 5;
    if ( v25 )
    {
      NiTexturingProperty::NiTexturingProperty(v25, BGFileName);
      v36 = v26;
    }
    else
    {
      v36 = 0;
    }
    LOBYTE(v39) = 0;
    NiTexturingProperty::SetBaseClampMode(v36, 0);
    v27 = (NiTexturingProperty *)operator new(0x44u);
    LOBYTE(v39) = 6;
    if ( v27 )
    {
      v28 = LoadingTextFileName._Bx._Ptr;
      if ( LoadingTextFileName._Myres < 0x10 )
        v28 = (const char *)&LoadingTextFileName;
      NiTexturingProperty::NiTexturingProperty(v27, v28);
      v3 = v29;
    }
    LOBYTE(v39) = 0;
    NiTexturingProperty::SetBaseClampMode(v3, 0);
    NiAVObject::AttachProperty((NiAVObject *)v15, (NiProperty *)&v36->vfptr);
    NiAVObject::AttachProperty((NiAVObject *)v21, (NiProperty *)&v3->vfptr);
    v30 = (NiObjectNET *)operator new(0x28u);
    v31 = v30;
    LOBYTE(v39) = 7;
    if ( v30 )
    {
      NiObjectNET::NiObjectNET(v30);
      v31->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
      LOWORD(v31[1].vfptr) = 0;
      v31[1].m_uiRefCount = 0;
      v31[1].m_pcName = (char *)1;
    }
    else
    {
      v31 = 0;
    }
    LOBYTE(v39) = 0;
    v31[1].m_uiRefCount = 1;
    v31[1].m_pcName = 0;
    NiAVObject::AttachProperty((NiAVObject *)v15, (NiProperty *)v31);
    NiAVObject::AttachProperty((NiAVObject *)v21, (NiProperty *)v31);
    v32 = (NiObjectNET *)operator new(0x20u);
    v33 = v32;
    LOBYTE(v39) = 8;
    if ( v32 )
    {
      NiObjectNET::NiObjectNET(v32);
      v33->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
      LOWORD(v33[1].vfptr) = 236;
      BYTE2(v33[1].vfptr) = 0;
    }
    else
    {
      v33 = 0;
    }
    LOWORD(v33[1].vfptr) &= 0xFFFEu;
    LOBYTE(v39) = 0;
    NiAVObject::AttachProperty((NiAVObject *)v15, (NiProperty *)v33);
    NiAVObject::AttachProperty((NiAVObject *)v21, (NiProperty *)v33);
    NiAVObject::UpdateProperties((NiAVObject *)v15);
    NiAVObject::Update((NiAVObject *)v15, 0.0, 1);
    NiAVObject::UpdateProperties((NiAVObject *)v21);
    NiAVObject::Update((NiAVObject *)v21, 0.0, 1);
    v34 = NiRenderer::ms_pkRenderer;
    if ( NiRenderer::ms_pkRenderer->m_eFrameState == FRAMESTATE_OUTSIDE_FRAME
      && NiRenderer::ms_pkRenderer->m_eOffScreenFrameState == FRAMESTATE_OUTSIDE_FRAME
      && (unsigned __int8)((int (__thiscall *)(NiRenderer *))NiRenderer::ms_pkRenderer->vfptr[66].__vecDelDtor)(NiRenderer::ms_pkRenderer) )
    {
      v34->m_eFrameState = 1;
    }
    if ( (v34->m_eFrameState == 1 || v34->m_eOffScreenFrameState == 1) && !v34->m_bRenderTargetGroupActive )
    {
      v35 = (NiRenderTargetGroup *)((int (__thiscall *)(NiRenderer *))v34->vfptr[26].__vecDelDtor)(v34);
      NiRenderer::BeginUsingRenderTargetGroup(v34, v35, 7u);
    }
    if ( (v34->m_eFrameState == 1 || v34->m_eOffScreenFrameState == 1) && v34->m_bRenderTargetGroupActive == 1 )
      v34->vfptr[71].__vecDelDtor((NiRefObject *)v34, 0);
    NiScreenElements::Draw((NiScreenElements *)v15, v34);
    NiScreenElements::Draw((NiScreenElements *)v21, v34);
    NiRenderer::EndUsingRenderTargetGroup(v34);
    if ( v34->m_eFrameState == 1
      && v34->m_eOffScreenFrameState == FRAMESTATE_OUTSIDE_FRAME
      && (unsigned __int8)((int (__thiscall *)(NiRenderer *))v34->vfptr[67].__vecDelDtor)(v34) )
    {
      v34->m_eFrameState = 2;
    }
    if ( v34->m_eFrameState == 2
      && v34->m_eOffScreenFrameState == FRAMESTATE_OUTSIDE_FRAME
      && (unsigned __int8)((int (__thiscall *)(NiRenderer *))v34->vfptr[68].__vecDelDtor)(v34) )
    {
      ++v34->m_uiFrameID;
      v34->m_eFrameState = 0;
    }
    (**(void (__thiscall ***)(_DWORD, _DWORD))v15)(v15, 1);
    (**(void (__thiscall ***)(_DWORD, _DWORD))v21)(v21, 1);
    if ( LoadingTextFileName._Myres >= 0x10 )
      operator delete(LoadingTextFileName._Bx._Ptr);
  }
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);
// A8975C: using guessed type bool Folder::m_bInit;
// A8C270: using guessed type int ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable;

//----- (00675F60) --------------------------------------------------------
void __thiscall World::ClearGlobalLightMap(World *this)
{
  World *v1; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> >::_Node *v2; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > v3; // esi@1
  NiControllerSequence *v4; // edi@2
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *v5; // eax@7
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > result; // [sp+8h] [bp-4h]@7

  v1 = this;
  v2 = this->m_mapGlobalLight._Myhead;
  v3._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)v2->_Left;
  if ( v2->_Left != v2 )
  {
    do
    {
      v4 = v3._Ptr->_Myval.second.m_pObject;
      if ( v4 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
        {
          if ( v4 )
            v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
        }
        v3._Ptr->_Myval.second.m_pObject = 0;
      }
      v5 = std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::erase(
             (std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)&v1->m_mapGlobalLight,
             &result,
             v3);
      v3._Ptr = v5->_Ptr;
    }
    while ( v5->_Ptr != (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)v1->m_mapGlobalLight._Myhead );
  }
}

//----- (00675FC0) --------------------------------------------------------
bool __thiscall World::AddGlobalLight(World *this, int ID, NiColor *kColor)
{
  stGlobalLightInfo *v3; // eax@1
  stGlobalLightInfo *v4; // esi@1
  bool v5; // al@7
  int v6; // ebx@8
  std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> >::_Node *v7; // eax@8
  std::pair<int,NiPointer<stGlobalLightInfo> > pairNewElement; // [sp+10h] [bp-1Ch]@8
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> > >,bool> result; // [sp+18h] [bp-14h]@1
  int v10; // [sp+28h] [bp-4h]@6

  *(_DWORD *)&result.second = this;
  v3 = (stGlobalLightInfo *)operator new(0x14u);
  v4 = v3;
  if ( v3 )
  {
    v3->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
    v3->m_uiRefCount = 0;
    InterlockedIncrement(&NiRefObject::ms_uiObjects);
    v4->vfptr = (NiRefObjectVtbl *)&stGlobalLightInfo::`vftable';
    v4->m_kColor.r = 0.0;
    v4->m_kColor.g = 0.0;
    v4->m_kColor.b = 0.0;
    v4->m_kColor = *kColor;
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v10 = 0;
  if ( v4 )
  {
    LOBYTE(v10) = 1;
    pairNewElement.first = ID;
    pairNewElement.second.m_pObject = v4;
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
    v6 = *(_DWORD *)&result.second;
    v7 = (std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Buynode<std::pair<int,NiPointer<stGlobalLightInfo>> &>((std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)(*(_DWORD *)&result.second + 577416), (std::pair<unsigned long const ,NiPointer<NiControllerSequence> > *)&pairNewElement);
    std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Linsert(
      (std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> > *)(v6 + 577416),
      &result,
      v7,
      0);
    LOBYTE(v10) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v5 = result.second;
  }
  else
  {
    v5 = 0;
  }
  return v5;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9BC3A8: using guessed type int (__thiscall *stGlobalLightInfo::`vftable')(void *p, char);

//----- (006760F0) --------------------------------------------------------
char __thiscall World::LoadLightInfoNode(World *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *MapFolderName)
{
  bool v2; // cf@1
  void *v3; // esi@2
  char *v4; // eax@6
  const char *v5; // eax@6
  NiNode *v6; // eax@6
  World *v7; // esi@8
  NiNode *v8; // ecx@8
  unsigned int v9; // edi@8
  NiAVObject *v10; // eax@10
  void (__thiscall ***v11)(_DWORD, _DWORD); // esi@13
  NiNode *v12; // esi@18
  NiAVObject **v13; // edi@21
  signed int v14; // esi@21
  NiNode *v15; // esi@26
  unsigned int v17; // eax@29
  NiAVObject *v18; // esi@33
  unsigned int v19; // edi@37
  const char *v20; // eax@38
  NiNode *v21; // esi@49
  NiColor kColor; // [sp+10h] [bp-178h]@40
  float fR; // [sp+1Ch] [bp-16Ch]@39
  float fB; // [sp+20h] [bp-168h]@39
  float fG; // [sp+24h] [bp-164h]@39
  void *_data_; // [sp+28h] [bp-160h]@19
  NiPointer<NiAVObject> spLightInfoNode; // [sp+2Ch] [bp-15Ch]@21
  NiPointer<NiNode> gLight; // [sp+30h] [bp-158h]@6
  World *v29; // [sp+34h] [bp-154h]@1
  int i; // [sp+38h] [bp-150h]@12
  NsFindObjectByName kFindObject; // [sp+3Ch] [bp-14Ch]@18
  char acKey[256]; // [sp+78h] [bp-110h]@21
  int j; // [sp+184h] [bp-4h]@8

  v2 = MapFolderName->_Myres < 0x10;
  v29 = this;
  if ( v2 )
    v3 = MapFolderName;
  else
    v3 = MapFolderName->_Bx._Ptr;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = fs("\\field\\%s\\GlobalLight.nif", v3);
  v5 = Folder::Merge(&Folder::m_acMap, v4);
  v6 = PgUtil::LoadNifFile(v5, 0);
  gLight.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v7 = v29;
  v8 = v29->m_spLightArea.m_pObject;
  v9 = 0;
  for ( j = 0; v9 < v8->m_kChildren.m_uiESize; ++v9 )
  {
    if ( v8->m_kChildren.m_uiSize > 0 )
      v10 = v8->m_kChildren.m_pBase->m_pObject;
    else
      v10 = 0;
    ((void (__stdcall *)(int *, NiAVObject *))v8->vfptr[30].__vecDelDtor)(&i, v10);
    if ( i )
    {
      v11 = (void (__thiscall ***)(_DWORD, _DWORD))i;
      if ( !InterlockedDecrement((volatile LONG *)(i + 4)) )
      {
        if ( v11 )
          (**v11)(v11, 1);
      }
    }
    v7 = v29;
    v8 = v29->m_spLightArea.m_pObject;
  }
  if ( !gLight.m_pObject )
    return 0;
  ((void (__stdcall *)(NiNode *, _DWORD))v7->m_spLightArea.m_pObject->vfptr[29].__vecDelDtor)(gLight.m_pObject, 0);
  kFindObject.m_pCallBack = 0;
  kFindObject.m_nCurLevel = -1;
  kFindObject.vfptr = (Ns_TourSceneVtbl *)&NsFindObjectByName::`vftable';
  kFindObject.m_szName._Myres = 15;
  kFindObject.m_szName._Mysize = 0;
  kFindObject.m_szName._Bx._Buf[0] = 0;
  kFindObject.m_vecObject._Myfirst = 0;
  kFindObject.m_vecObject._Mylast = 0;
  kFindObject.m_vecObject._Myend = 0;
  v12 = v7->m_spLightArea.m_pObject;
  LOBYTE(j) = 1;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &kFindObject.m_szName,
    "GlobalLight",
    0xBu);
  std::vector<PgWinText *,std::allocator<PgWinText *>>::resize(
    (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&kFindObject.m_vecObject,
    0);
  if ( kFindObject.m_szName._Myres < 0x10 )
    _data_ = &kFindObject.m_szName;
  else
    _data_ = kFindObject.m_szName._Bx._Ptr;
  spLightInfoNode.m_pObject = (NiAVObject *)&kFindObject.m_vecObject;
  Ns_TourScene::TourScene((Ns_TourScene *)&kFindObject.vfptr, v12, &NiAVObject::m_RTTI, &_data_);
  v13 = kFindObject.m_vecObject._Myfirst;
  v14 = kFindObject.m_vecObject._Mylast - kFindObject.m_vecObject._Myfirst;
  kFindObject.m_uiSize = kFindObject.m_vecObject._Mylast - kFindObject.m_vecObject._Myfirst;
  acKey[0] = 0;
  memset(&acKey[1], 0, 0xFFu);
  if ( !v14 )
  {
    if ( kFindObject.m_vecObject._Myfirst )
      operator delete(kFindObject.m_vecObject._Myfirst);
    kFindObject.m_vecObject._Myfirst = 0;
    kFindObject.m_vecObject._Mylast = 0;
    kFindObject.m_vecObject._Myend = 0;
    if ( kFindObject.m_szName._Myres >= 0x10 )
      operator delete(kFindObject.m_szName._Bx._Ptr);
    v15 = gLight.m_pObject;
    kFindObject.m_szName._Myres = 15;
    kFindObject.m_szName._Mysize = 0;
    kFindObject.m_szName._Bx._Buf[0] = 0;
    kFindObject.vfptr = (Ns_TourSceneVtbl *)&Ns_TourScene::`vftable';
    j = -1;
    if ( !InterlockedDecrement((volatile LONG *)&gLight.m_pObject->m_uiRefCount) )
      v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
    return 0;
  }
  v17 = 0;
  i = 0;
  if ( v14 > 0 )
  {
    while ( 1 )
    {
      if ( v17 < v14 )
        v18 = v13[v17];
      else
        v18 = 0;
      spLightInfoNode.m_pObject = v18;
      if ( v18 )
        InterlockedIncrement((volatile LONG *)&v18->m_uiRefCount);
      v19 = 0;
      for ( LOBYTE(j) = 2; v19 < v18->m_uiExtraDataSize; ++v19 )
      {
        v20 = (const char *)(*v18->m_ppkExtra)[1].vfptr;
        if ( v20 )
        {
          sscanf(v20, "%s %f %f %f %f", acKey, &fR, &fG, &fB);
          if ( !_strnicmp(acKey, "AmbLight", 8u) )
          {
            kColor.r = fR;
            kColor.g = fG;
            kColor.b = fB;
            World::AddGlobalLight(v29, i + 1, &kColor);
          }
        }
        memset(acKey, 0, 0x100u);
      }
      LOBYTE(j) = 1;
      if ( !InterlockedDecrement((volatile LONG *)&v18->m_uiRefCount) )
        v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
      v13 = kFindObject.m_vecObject._Myfirst;
      v14 = kFindObject.m_vecObject._Mylast - kFindObject.m_vecObject._Myfirst;
      if ( ++i >= v14 )
        break;
      v17 = i;
    }
  }
  World::PrintLights(v29);
  if ( kFindObject.m_vecObject._Myfirst )
    operator delete(kFindObject.m_vecObject._Myfirst);
  kFindObject.m_vecObject._Myfirst = 0;
  kFindObject.m_vecObject._Mylast = 0;
  kFindObject.m_vecObject._Myend = 0;
  if ( kFindObject.m_szName._Myres >= 0x10 )
    operator delete(kFindObject.m_szName._Bx._Ptr);
  v21 = gLight.m_pObject;
  kFindObject.m_szName._Myres = 15;
  kFindObject.m_szName._Mysize = 0;
  kFindObject.m_szName._Bx._Buf[0] = 0;
  kFindObject.vfptr = (Ns_TourSceneVtbl *)&Ns_TourScene::`vftable';
  j = -1;
  if ( !InterlockedDecrement((volatile LONG *)&gLight.m_pObject->m_uiRefCount) )
    v21->vfptr->__vecDelDtor((NiRefObject *)v21, 1u);
  return 1;
}
// 9B8DD0: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *Ns_TourScene::`vftable')(Ns_TourScene *this, NiAVObject *_pkObject, void *);
// 9B9194: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *NsFindObjectByName::`vftable')(NsFindObjectByName *this, NiAVObject *_pkObject, void *);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00676560) --------------------------------------------------------
void __thiscall NiTextureAccumulator::Sort(NiTextureAccumulator *this)
{
  std::_Sort<NiGeometry * *,int,TextureSorter>(
    this->m_vecItem._Myfirst,
    this->m_vecItem._Mylast,
    this->m_vecItem._Mylast - this->m_vecItem._Myfirst,
    (TextureSorter)this);
}

//----- (00676590) --------------------------------------------------------
void __thiscall World::~World(World *this)
{
  World *v1; // esi@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > v2; // ST0C_4@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > v3; // ST08_4@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > v4; // ST0C_4@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > v5; // ST08_4@1
  char *v6; // eax@1
  char *v7; // edi@2
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > v8; // ST0C_4@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > v9; // ST08_4@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > v10; // ST0C_4@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > v11; // ST08_4@3
  void **v12; // eax@3
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v13; // ecx@3
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v14; // edi@4
  NiNode *v15; // edi@5
  NiTexturePalette *v16; // edi@9
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > v17; // ST0C_4@13
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > v18; // ST08_4@13
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > v19; // ST0C_4@13
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > v20; // ST08_4@13
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > v21; // ST0C_4@13
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > v22; // ST08_4@13
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > v23; // ST0C_4@13
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > v24; // ST08_4@13
  NiSourceTexture *v25; // edi@13
  NiNode *v26; // edi@17
  NiTransformController *v27; // edi@21
  CMagicCircleController *v28; // edi@25
  NiNode *v29; // edi@29
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v30; // edi@33
  NiTListItem<NiPointer<Shadow> > **v31; // ebx@33
  NiTListItem<NiPointer<Shadow> > **v32; // ST0C_4@34
  NiDirectionalLight *v33; // edi@35
  NiDirectionalLight *v34; // edi@39
  NiAmbientLight *v35; // edi@43
  NiCamera *v36; // edi@47
  char *v37; // eax@51
  NiNode *v38; // edi@53
  NiNode *v39; // edi@57
  NiNode *v40; // edi@61
  NiNode *v41; // edi@65
  NiNode *v42; // edi@69
  NiNode *v43; // edi@73
  NiNode *v44; // edi@77
  NiNode *v45; // edi@81
  NiNode *v46; // edi@85
  NiSortAdjustNode *v47; // edi@89
  NiNode *v48; // edi@93
  NiSortAdjustNode *v49; // edi@97
  NiNode *v50; // edi@101
  NiNode *v51; // edi@105
  NiNode *v52; // edi@109
  NiNode *v53; // edi@113
  NiNode *v54; // edi@117
  NiNode *v55; // edi@121
  NiNode *v56; // edi@125
  NiNode *v57; // edi@129
  NiNode *v58; // edi@133
  NiNode *v59; // edi@137
  NiNode *v60; // edi@141
  NiNode *v61; // edi@145
  NiNode *v62; // edi@149
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > result; // [sp+10h] [bp-18h]@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > v64; // [sp+14h] [bp-14h]@1
  World *v65; // [sp+18h] [bp-10h]@1
  int v66; // [sp+24h] [bp-4h]@1

  v1 = this;
  v65 = this;
  v66 = 63;
  DecalMgr::~DecalMgr(&this->m_kDecalMgr);
  v64._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)&v1->m_mapFogInfo;
  v2._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)v1->m_mapFogInfo._Myhead;
  v3._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)v1->m_mapFogInfo._Myhead->_Left;
  LOBYTE(v66) = 64;
  std::_Tree<std::_Tmap_traits<unsigned int,NiPointer<NiNode>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,NiPointer<NiNode>>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)&v1->m_mapFogInfo,
    &result,
    v3,
    v2);
  operator delete(v1->m_mapFogInfo._Myhead);
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)&v1->m_mapGlobalLight;
  v4._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)v1->m_mapGlobalLight._Myhead;
  v5._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)v1->m_mapGlobalLight._Myhead->_Left;
  LOBYTE(v66) = 65;
  std::_Tree<std::_Tmap_traits<unsigned int,NiPointer<NiNode>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,NiPointer<NiNode>>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)&v1->m_mapGlobalLight,
    &v64,
    v5,
    v4);
  operator delete(v1->m_mapGlobalLight._Myhead);
  LOBYTE(v66) = 60;
  HeightMapMaker::~HeightMapMaker(&v1->m_HeightMapMaker);
  v6 = (char *)v1->m_kCullUPdateData.kCheckedNodes.m_pBase;
  LOBYTE(v66) = 59;
  v1->m_kCullUPdateData.kCheckedNodes.vfptr = (NiTArray<NiPointer<NiNode> >Vtbl *)&NiTArray<NiPointer<NiNode>>::`vftable';
  if ( v6 )
  {
    v7 = v6 - 4;
    `eh vector destructor iterator'(
      v6,
      4u,
      *((_DWORD *)v6 - 1),
      (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
    operator delete[](v7);
  }
  v1->kQaudSceneMakerNotAni.m_pRootScene = 0;
  v1->kQaudSceneMakerAni.m_pRootScene = 0;
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)&v1->m_mapBoundTime;
  v8._Ptr = v1->m_mapBoundTime._Myhead;
  v9._Ptr = v1->m_mapBoundTime._Myhead->_Left;
  LOBYTE(v66) = 66;
  std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *)&v1->m_mapBoundTime.comp,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *)&v64,
    v9,
    v8);
  operator delete(v1->m_mapBoundTime._Myhead);
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)&v1->m_mapBound;
  v10._Ptr = v1->m_mapBound._Myhead;
  v11._Ptr = v1->m_mapBound._Myhead->_Left;
  LOBYTE(v66) = 67;
  std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *)&v1->m_mapBound.comp,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > *)&v64,
    v11,
    v10);
  operator delete(v1->m_mapBound._Myhead);
  v12 = (void **)&v1->m_vecAniObject._Myhead->_Next;
  v13 = (std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *)*v12;
  *v12 = v12;
  v1->m_vecAniObject._Myhead->_Prev = v1->m_vecAniObject._Myhead;
  v1->m_vecAniObject._Mysize = 0;
  if ( v13 != v1->m_vecAniObject._Myhead )
  {
    do
    {
      v14 = v13->_Next;
      operator delete(v13);
      v13 = v14;
    }
    while ( v14 != v1->m_vecAniObject._Myhead );
  }
  operator delete(v1->m_vecAniObject._Myhead);
  LOBYTE(v66) = 53;
  `eh vector destructor iterator'(
    v1->m_kExtraLightScene,
    0xCu,
    30,
    (void (__thiscall *)(void *))World::_unnamed_type_m_kExtraLightScene_::~_unnamed_type_m_kExtraLightScene_);
  v15 = v1->m_spCameraShakeNode.m_pObject;
  LOBYTE(v66) = 52;
  if ( v15 && !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) && v15 )
    v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
  v16 = v1->m_spTexturePalette.m_pObject;
  LOBYTE(v66) = 51;
  if ( v16 && !InterlockedDecrement((volatile LONG *)&v16->m_uiRefCount) && v16 )
    v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)&v1->m_vecUpdateFadeObject;
  v17._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v1->m_vecUpdateFadeObject._Myhead;
  v18._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v1->m_vecUpdateFadeObject._Myhead->_Left;
  LOBYTE(v66) = 68;
  std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::erase(
    (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v1->m_vecUpdateFadeObject,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *)&v64,
    v18,
    v17);
  operator delete(v1->m_vecUpdateFadeObject._Myhead);
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)&v1->m_vecCameraIntersectObject;
  v19._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v1->m_vecCameraIntersectObject._Myhead;
  v20._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v1->m_vecCameraIntersectObject._Myhead->_Left;
  LOBYTE(v66) = 69;
  std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::erase(
    (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v1->m_vecCameraIntersectObject,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *)&v64,
    v20,
    v19);
  operator delete(v1->m_vecCameraIntersectObject._Myhead);
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)&v1->m_vecFadeObject;
  v21._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v1->m_vecFadeObject._Myhead;
  v22._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v1->m_vecFadeObject._Myhead->_Left;
  LOBYTE(v66) = 70;
  std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::erase(
    (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v1->m_vecFadeObject,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *)&v64,
    v22,
    v21);
  operator delete(v1->m_vecFadeObject._Myhead);
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)&v1->m_setChar;
  v23._Ptr = v1->m_setChar._Myhead;
  v24._Ptr = v1->m_setChar._Myhead->_Left;
  LOBYTE(v66) = 71;
  std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::erase(
    (std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > *)&v1->m_setChar.comp,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > *)&v64,
    v24,
    v23);
  operator delete(v1->m_setChar._Myhead);
  v25 = v1->m_spMiniMapTexture.m_pObject;
  LOBYTE(v66) = 46;
  if ( v25 && !InterlockedDecrement((volatile LONG *)&v25->m_uiRefCount) && v25 )
    v25->vfptr->__vecDelDtor((NiRefObject *)v25, 1u);
  LOBYTE(v66) = 45;
  NsMergePortal::~NsMergePortal(&v1->m_kMergePortal);
  LOBYTE(v66) = 44;
  NsDecal::~NsDecal(&v1->m_kCharSelectMarkDecal);
  v26 = v1->m_spCharSelectMarkNode.m_pObject;
  LOBYTE(v66) = 43;
  if ( v26 && !InterlockedDecrement((volatile LONG *)&v26->m_uiRefCount) && v26 )
    v26->vfptr->__vecDelDtor((NiRefObject *)v26, 1u);
  v27 = v1->m_spShakeContrl.m_pObject;
  LOBYTE(v66) = 42;
  if ( v27 && !InterlockedDecrement((volatile LONG *)&v27->m_uiRefCount) && v27 )
    v27->vfptr->__vecDelDtor((NiRefObject *)v27, 1u);
  v28 = v1->m_spMagicCircleController.m_pObject;
  LOBYTE(v66) = 41;
  if ( v28 && !InterlockedDecrement((volatile LONG *)&v28->m_uiRefCount) && v28 )
    v28->vfptr->__vecDelDtor((NiRefObject *)v28, 1u);
  v29 = v1->m_spMoveTargetPointNode.m_pObject;
  LOBYTE(v66) = 40;
  if ( v29 && !InterlockedDecrement((volatile LONG *)&v29->m_uiRefCount) && v29 )
    v29->vfptr->__vecDelDtor((NiRefObject *)v29, 1u);
  v30 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)&v1->m_kShadowList;
  result._Ptr = v30;
  v30->_Left = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)&PgTList<NiPointer<Shadow>>::`vftable';
  v31 = &v1->m_kShadowList.m_pkHead->m_pkNext;
  LOBYTE(v66) = 72;
  while ( v31 )
  {
    v32 = v31;
    v31 = (NiTListItem<NiPointer<Shadow> > **)*v31;
    ((void (__thiscall *)(PgTList<NiPointer<Shadow> > *, NiTListItem<NiPointer<Shadow> > **))v30->_Left->_Right)(
      &v1->m_kShadowList,
      v32);
  }
  v1->m_kShadowList.m_kAllocator.m_uiCount = 0;
  v1->m_kShadowList.m_pkHead = 0;
  v1->m_kShadowList.m_pkTail = 0;
  v30->_Left = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable';
  v33 = v1->m_spMapDirectionalLight.m_pObject;
  LOBYTE(v66) = 38;
  if ( v33 && !InterlockedDecrement((volatile LONG *)&v33->m_uiRefCount) && v33 )
    v33->vfptr->__vecDelDtor((NiRefObject *)v33, 1u);
  v34 = v1->m_spDirectionalLight.m_pObject;
  LOBYTE(v66) = 37;
  if ( v34 && !InterlockedDecrement((volatile LONG *)&v34->m_uiRefCount) && v34 )
    v34->vfptr->__vecDelDtor((NiRefObject *)v34, 1u);
  v35 = v1->m_spAmbientLight.m_pObject;
  LOBYTE(v66) = 36;
  if ( v35 && !InterlockedDecrement((volatile LONG *)&v35->m_uiRefCount) && v35 )
    v35->vfptr->__vecDelDtor((NiRefObject *)v35, 1u);
  LOBYTE(v66) = 35;
  SkyCtrl::~SkyCtrl(&v1->m_kSkyCtrl);
  LOBYTE(v66) = 34;
  OscillationEx::~OscillationEx(&v1->m_kCamOscillation);
  LOBYTE(v66) = 33;
  CameraCtrl::~CameraCtrl(&v1->m_kCameraCtrl);
  v36 = v1->m_spCamera.m_pObject;
  LOBYTE(v66) = 32;
  if ( v36 && !InterlockedDecrement((volatile LONG *)&v36->m_uiRefCount) && v36 )
    v36->vfptr->__vecDelDtor((NiRefObject *)v36, 1u);
  LOBYTE(v66) = 31;
  AreaInfoData::~AreaInfoData(&v1->m_kAreaInfoData);
  v37 = v1->m_kInstantBlock.m_pbyBlockData;
  v1->m_kInstantBlock.vfptr = (InstantBlockVtbl *)&InstantBlock::`vftable';
  v1->m_kInstantBlock.m_uiTotalHeadCnt = 0;
  if ( v37 )
    operator delete[](v37);
  v1->m_kInstantBlock.m_pbyBlockData = 0;
  LOBYTE(v66) = 29;
  CFindWay::~CFindWay(&v1->kPathFindingNew);
  v1->kPathFinding.vfptr = (NsPathFindingVtbl *)&NsPathFinding::`vftable';
  v38 = v1->m_spUseCameraCollidee.m_pObject;
  LOBYTE(v66) = 27;
  if ( v38 && !InterlockedDecrement((volatile LONG *)&v38->m_uiRefCount) && v38 )
    v38->vfptr->__vecDelDtor((NiRefObject *)v38, 1u);
  v39 = v1->m_spBuildingCollidee.m_pObject;
  LOBYTE(v66) = 26;
  if ( v39 && !InterlockedDecrement((volatile LONG *)&v39->m_uiRefCount) && v39 )
    v39->vfptr->__vecDelDtor((NiRefObject *)v39, 1u);
  v40 = v1->m_spGroundObjectCollidee.m_pObject;
  LOBYTE(v66) = 25;
  if ( v40 && !InterlockedDecrement((volatile LONG *)&v40->m_uiRefCount) && v40 )
    v40->vfptr->__vecDelDtor((NiRefObject *)v40, 1u);
  v41 = v1->m_spGroundCollidee.m_pObject;
  LOBYTE(v66) = 24;
  if ( v41 && !InterlockedDecrement((volatile LONG *)&v41->m_uiRefCount) && v41 )
    v41->vfptr->__vecDelDtor((NiRefObject *)v41, 1u);
  v42 = v1->m_spEffectScene.m_pObject;
  LOBYTE(v66) = 23;
  if ( v42 && !InterlockedDecrement((volatile LONG *)&v42->m_uiRefCount) && v42 )
    v42->vfptr->__vecDelDtor((NiRefObject *)v42, 1u);
  v43 = v1->m_spWaterScene.m_pObject;
  LOBYTE(v66) = 22;
  if ( v43 && !InterlockedDecrement((volatile LONG *)&v43->m_uiRefCount) && v43 )
    v43->vfptr->__vecDelDtor((NiRefObject *)v43, 1u);
  v44 = v1->m_spSkyScene.m_pObject;
  LOBYTE(v66) = 21;
  if ( v44 && !InterlockedDecrement((volatile LONG *)&v44->m_uiRefCount) && v44 )
    v44->vfptr->__vecDelDtor((NiRefObject *)v44, 1u);
  v45 = v1->m_spBDNotAni.m_pObject;
  LOBYTE(v66) = 20;
  if ( v45 && !InterlockedDecrement((volatile LONG *)&v45->m_uiRefCount) && v45 )
    v45->vfptr->__vecDelDtor((NiRefObject *)v45, 1u);
  v46 = v1->m_spBDAni.m_pObject;
  LOBYTE(v66) = 19;
  if ( v46 && !InterlockedDecrement((volatile LONG *)&v46->m_uiRefCount) && v46 )
    v46->vfptr->__vecDelDtor((NiRefObject *)v46, 1u);
  v47 = v1->m_spBuildingScene.m_pObject;
  LOBYTE(v66) = 18;
  if ( v47 && !InterlockedDecrement((volatile LONG *)&v47->m_uiRefCount) && v47 )
    v47->vfptr->__vecDelDtor((NiRefObject *)v47, 1u);
  v48 = v1->m_spAllGroundScene.m_pObject;
  LOBYTE(v66) = 17;
  if ( v48 && !InterlockedDecrement((volatile LONG *)&v48->m_uiRefCount) && v48 )
    v48->vfptr->__vecDelDtor((NiRefObject *)v48, 1u);
  v49 = v1->m_spGroundTerrain.m_pObject;
  LOBYTE(v66) = 16;
  if ( v49 && !InterlockedDecrement((volatile LONG *)&v49->m_uiRefCount) && v49 )
    v49->vfptr->__vecDelDtor((NiRefObject *)v49, 1u);
  v50 = v1->m_spWeatherEffectScene.m_pObject;
  LOBYTE(v66) = 15;
  if ( v50 && !InterlockedDecrement((volatile LONG *)&v50->m_uiRefCount) && v50 )
    v50->vfptr->__vecDelDtor((NiRefObject *)v50, 1u);
  v51 = v1->m_spAbstateCharScene.m_pObject;
  LOBYTE(v66) = 14;
  if ( v51 && !InterlockedDecrement((volatile LONG *)&v51->m_uiRefCount) && v51 )
    v51->vfptr->__vecDelDtor((NiRefObject *)v51, 1u);
  v52 = v1->m_spNormalLightScene.m_pObject;
  LOBYTE(v66) = 13;
  if ( v52 && !InterlockedDecrement((volatile LONG *)&v52->m_uiRefCount) && v52 )
    v52->vfptr->__vecDelDtor((NiRefObject *)v52, 1u);
  v53 = v1->m_spMinihouseScene.m_pObject;
  LOBYTE(v66) = 12;
  if ( v53 && !InterlockedDecrement((volatile LONG *)&v53->m_uiRefCount) && v53 )
    v53->vfptr->__vecDelDtor((NiRefObject *)v53, 1u);
  v54 = v1->m_spDirectionalLightScene.m_pObject;
  LOBYTE(v66) = 11;
  if ( v54 && !InterlockedDecrement((volatile LONG *)&v54->m_uiRefCount) && v54 )
    v54->vfptr->__vecDelDtor((NiRefObject *)v54, 1u);
  v55 = v1->m_spGroundObject.m_pObject;
  LOBYTE(v66) = 10;
  if ( v55 && !InterlockedDecrement((volatile LONG *)&v55->m_uiRefCount) && v55 )
    v55->vfptr->__vecDelDtor((NiRefObject *)v55, 1u);
  v56 = v1->m_spShadowScene.m_pObject;
  LOBYTE(v66) = 9;
  if ( v56 && !InterlockedDecrement((volatile LONG *)&v56->m_uiRefCount) && v56 )
    v56->vfptr->__vecDelDtor((NiRefObject *)v56, 1u);
  v57 = v1->m_spGroundScene.m_pObject;
  LOBYTE(v66) = 8;
  if ( v57 && !InterlockedDecrement((volatile LONG *)&v57->m_uiRefCount) && v57 )
    v57->vfptr->__vecDelDtor((NiRefObject *)v57, 1u);
  v58 = v1->m_spDropItemScene.m_pObject;
  LOBYTE(v66) = 7;
  if ( v58 && !InterlockedDecrement((volatile LONG *)&v58->m_uiRefCount) && v58 )
    v58->vfptr->__vecDelDtor((NiRefObject *)v58, 1u);
  v59 = v1->m_spCharScene.m_pObject;
  LOBYTE(v66) = 6;
  if ( v59 && !InterlockedDecrement((volatile LONG *)&v59->m_uiRefCount) && v59 )
    v59->vfptr->__vecDelDtor((NiRefObject *)v59, 1u);
  v60 = v1->m_spWorldScene.m_pObject;
  LOBYTE(v66) = 5;
  if ( v60 && !InterlockedDecrement((volatile LONG *)&v60->m_uiRefCount) && v60 )
    v60->vfptr->__vecDelDtor((NiRefObject *)v60, 1u);
  v61 = v1->m_spFog.m_pObject;
  LOBYTE(v66) = 4;
  if ( v61 && !InterlockedDecrement((volatile LONG *)&v61->m_uiRefCount) && v61 )
    v61->vfptr->__vecDelDtor((NiRefObject *)v61, 1u);
  v62 = v1->m_spLightArea.m_pObject;
  LOBYTE(v66) = 3;
  if ( v62 && !InterlockedDecrement((volatile LONG *)&v62->m_uiRefCount) && v62 )
    v62->vfptr->__vecDelDtor((NiRefObject *)v62, 1u);
  if ( v1->m_vecNearDropItem._Myfirst )
    operator delete(v1->m_vecNearDropItem._Myfirst);
  v1->m_vecNearDropItem._Myfirst = 0;
  v1->m_vecNearDropItem._Mylast = 0;
  v1->m_vecNearDropItem._Myend = 0;
  if ( v1->m_vecNearMob._Myfirst )
    operator delete(v1->m_vecNearMob._Myfirst);
  v1->m_vecNearMob._Myfirst = 0;
  v1->m_vecNearMob._Mylast = 0;
  v1->m_vecNearMob._Myend = 0;
  LOBYTE(v66) = 0;
  LightFogCtrl::~LightFogCtrl(&v1->m_kLightFogCtrl);
  v66 = -1;
  MiniHouseIndoor::~MiniHouseIndoor(&v1->m_MiniHouseIndoorMode);
}
// 9703D4: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow>>::`vftable')(void *p, char);
// 97057C: using guessed type int (__thiscall *PgTList<NiPointer<Shadow>>::`vftable')(void *p, char);
// 9BC398: using guessed type int (__thiscall *NsPathFinding::`vftable')(void *p, char);
// 9BC3A0: using guessed type int (__thiscall *InstantBlock::`vftable')(void *p, char);
// 9BC3B0: using guessed type int (__thiscall *NiTArray<NiPointer<NiNode>>::`vftable')(void *p, char);

//----- (00676EB0) --------------------------------------------------------
void __thiscall World::World(World *this)
{
  World *v1; // ebx@1
  int v2; // edi@1
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v3; // eax@1
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *v4; // eax@2
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *v5; // eax@3
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *v6; // eax@4
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v7; // eax@5
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v8; // eax@6
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v9; // eax@7
  std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> >::_Node *v10; // eax@8
  std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stFogInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stFogInfo> > >,0> >::_Node *v11; // eax@9
  bool v12; // ST18_1@10
  const void *v13; // eax@10
  const void *v14; // eax@10
  const char *v15; // edx@10
  float v16; // eax@10
  NiFrustum v17; // [sp+2Ch] [bp-4Ch]@10
  std::exception v18; // [sp+48h] [bp-30h]@13
  std::exception pExceptionObject; // [sp+54h] [bp-24h]@10
  World *v20; // [sp+60h] [bp-18h]@1
  char *v21; // [sp+64h] [bp-14h]@13
  char *_What; // [sp+68h] [bp-10h]@11
  int v23; // [sp+74h] [bp-4h]@1

  v1 = this;
  v20 = this;
  MiniHouseIndoor::MiniHouseIndoor(&this->m_MiniHouseIndoorMode);
  v23 = 0;
  LightFogCtrl::LightFogCtrl(&v1->m_kLightFogCtrl);
  v1->m_vecNearMob._Myfirst = 0;
  v1->m_vecNearMob._Mylast = 0;
  v1->m_vecNearMob._Myend = 0;
  v1->m_vecNearDropItem._Myfirst = 0;
  v1->m_vecNearDropItem._Mylast = 0;
  v1->m_vecNearDropItem._Myend = 0;
  v1->m_spLightArea.m_pObject = 0;
  v1->m_spFog.m_pObject = 0;
  v1->m_spWorldScene.m_pObject = 0;
  v1->m_spCharScene.m_pObject = 0;
  v1->m_spDropItemScene.m_pObject = 0;
  v1->m_spGroundScene.m_pObject = 0;
  v1->m_spShadowScene.m_pObject = 0;
  v1->m_spGroundObject.m_pObject = 0;
  v1->m_spDirectionalLightScene.m_pObject = 0;
  v1->m_spMinihouseScene.m_pObject = 0;
  v1->m_spNormalLightScene.m_pObject = 0;
  v1->m_spAbstateCharScene.m_pObject = 0;
  v1->m_spWeatherEffectScene.m_pObject = 0;
  v1->m_spGroundTerrain.m_pObject = 0;
  v1->m_spAllGroundScene.m_pObject = 0;
  v1->m_spBuildingScene.m_pObject = 0;
  v1->m_spBDAni.m_pObject = 0;
  v1->m_spBDNotAni.m_pObject = 0;
  v1->m_spSkyScene.m_pObject = 0;
  v1->m_spWaterScene.m_pObject = 0;
  v1->m_spEffectScene.m_pObject = 0;
  v1->m_spGroundCollidee.m_pObject = 0;
  v1->m_spGroundObjectCollidee.m_pObject = 0;
  v1->m_spBuildingCollidee.m_pObject = 0;
  v1->m_spUseCameraCollidee.m_pObject = 0;
  v1->kPathFinding.vfptr = (NsPathFindingVtbl *)&NsPathFinding::`vftable';
  v1->kPathFinding.m_pkBlockInfo = 0;
  CFindWay::CFindWay(&v1->kPathFindingNew);
  v1->m_kInstantBlock.vfptr = (InstantBlockVtbl *)&InstantBlock::`vftable';
  v1->m_kInstantBlock.m_uiTotalHeadCnt = 0;
  v1->m_kInstantBlock.m_pbyBlockData = 0;
  AreaInfoData::AreaInfoData(&v1->m_kAreaInfoData);
  v1->m_spCamera.m_pObject = 0;
  CameraCtrl::CameraCtrl(&v1->m_kCameraCtrl);
  NiFrustum::NiFrustum(&v1->m_kSkyFrustum, 0);
  NiFrustum::NiFrustum(&v1->m_kWorldFrustum, 0);
  OscillationEx::OscillationEx(&v1->m_kCamOscillation);
  SkyCtrl::SkyCtrl(&v1->m_kSkyCtrl);
  v1->m_spAmbientLight.m_pObject = 0;
  v1->m_spDirectionalLight.m_pObject = 0;
  v1->m_spMapDirectionalLight.m_pObject = 0;
  v1->m_kBackGroundColor.r = 0.0;
  v1->m_kBackGroundColor.g = 0.0;
  v1->m_kBackGroundColor.b = 0.0;
  v1->m_kShadowList.m_kAllocator.m_uiCount = 0;
  v1->m_kShadowList.m_pkHead = 0;
  v1->m_kShadowList.m_pkTail = 0;
  v1->m_kShadowList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> >Vtbl *)&PgTList<NiPointer<Shadow>>::`vftable';
  v1->m_spMoveTargetPointNode.m_pObject = 0;
  v2 = (int)&v1->m_kMapName;
  *(_DWORD *)(v2 + 8) = 0;
  *(_DWORD *)(v2 + 4) = 0;
  *(_DWORD *)v2 = 0;
  v1->m_spMagicCircleController.m_pObject = 0;
  v1->m_spShakeContrl.m_pObject = 0;
  v1->m_spCharSelectMarkNode.m_pObject = 0;
  NsDecal::NsDecal(&v1->m_kCharSelectMarkDecal);
  NsMergePortal::NsMergePortal(&v1->m_kMergePortal);
  v1->m_spMiniMapTexture.m_pObject = 0;
  LOBYTE(v23) = 47;
  v1->m_setChar._Mysize = 0;
  v3 = (std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *)operator new(0x14u);
  if ( !v3 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_setChar._Myhead = v3;
  v3->_Left = v3;
  v1->m_setChar._Myhead->_Parent = v1->m_setChar._Myhead;
  v1->m_setChar._Myhead->_Right = v1->m_setChar._Myhead;
  v1->m_setChar._Myhead->_Color = 1;
  v1->m_setChar._Myhead->_Isnil = 1;
  LOBYTE(v23) = 48;
  v1->m_vecFadeObject._Mysize = 0;
  v4 = (std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *)operator new(0x14u);
  if ( !v4 )
    goto $LN790_0;
  v1->m_vecFadeObject._Myhead = v4;
  v4->_Left = v4;
  v1->m_vecFadeObject._Myhead->_Parent = v1->m_vecFadeObject._Myhead;
  v1->m_vecFadeObject._Myhead->_Right = v1->m_vecFadeObject._Myhead;
  v1->m_vecFadeObject._Myhead->_Color = 1;
  v1->m_vecFadeObject._Myhead->_Isnil = 1;
  LOBYTE(v23) = 49;
  v1->m_vecCameraIntersectObject._Mysize = 0;
  v5 = (std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *)operator new(0x14u);
  if ( !v5 )
  {
LABEL_11:
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_vecCameraIntersectObject._Myhead = v5;
  v5->_Left = v5;
  v1->m_vecCameraIntersectObject._Myhead->_Parent = v1->m_vecCameraIntersectObject._Myhead;
  v1->m_vecCameraIntersectObject._Myhead->_Right = v1->m_vecCameraIntersectObject._Myhead;
  v1->m_vecCameraIntersectObject._Myhead->_Color = 1;
  v1->m_vecCameraIntersectObject._Myhead->_Isnil = 1;
  LOBYTE(v23) = 50;
  v1->m_vecUpdateFadeObject._Mysize = 0;
  v6 = (std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *)operator new(0x14u);
  if ( !v6 )
  {
$LN791_0:
    v21 = 0;
    std::exception::exception(&v18, (const char *const *)&v21);
    v18.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&v18, &_TI2_AVbad_alloc_std__);
  }
  v1->m_vecUpdateFadeObject._Myhead = v6;
  v6->_Left = v6;
  v1->m_vecUpdateFadeObject._Myhead->_Parent = v1->m_vecUpdateFadeObject._Myhead;
  v1->m_vecUpdateFadeObject._Myhead->_Right = v1->m_vecUpdateFadeObject._Myhead;
  v1->m_vecUpdateFadeObject._Myhead->_Color = 1;
  v1->m_vecUpdateFadeObject._Myhead->_Isnil = 1;
  v1->m_spTexturePalette.m_pObject = 0;
  v1->m_spCameraShakeNode.m_pObject = 0;
  `eh vector constructor iterator'(
    v1->m_kExtraLightScene,
    0xCu,
    30,
    (void (__thiscall *)(void *))World::_unnamed_type_m_kExtraLightScene_::_unnamed_type_m_kExtraLightScene_,
    (void (__thiscall *)(void *))World::_unnamed_type_m_kExtraLightScene_::~_unnamed_type_m_kExtraLightScene_);
  LOBYTE(v23) = 54;
  v1->m_vecAniObject._Mysize = 0;
  v7 = (std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *)operator new(0xCu);
  if ( !v7 )
  {
$LN790_0:
    v21 = 0;
    std::exception::exception(&v18, (const char *const *)&v21);
    v18.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&v18, &_TI2_AVbad_alloc_std__);
  }
  v1->m_vecAniObject._Myhead = v7;
  v7->_Next = v7;
  v1->m_vecAniObject._Myhead->_Prev = v1->m_vecAniObject._Myhead;
  LOBYTE(v23) = 55;
  v1->m_mapBound._Mysize = 0;
  v8 = (std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *)operator new(0x24u);
  if ( !v8 )
    goto LABEL_11;
  v1->m_mapBound._Myhead = v8;
  v8->_Left = v8;
  v1->m_mapBound._Myhead->_Parent = v1->m_mapBound._Myhead;
  v1->m_mapBound._Myhead->_Right = v1->m_mapBound._Myhead;
  v1->m_mapBound._Myhead->_Color = 1;
  v1->m_mapBound._Myhead->_Isnil = 1;
  LOBYTE(v23) = 56;
  v1->m_mapBoundTime._Mysize = 0;
  v9 = (std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *)operator new(0x1Cu);
  if ( !v9 )
    goto $LN791_0;
  v1->m_mapBoundTime._Myhead = v9;
  v9->_Left = v9;
  v1->m_mapBoundTime._Myhead->_Parent = v1->m_mapBoundTime._Myhead;
  v1->m_mapBoundTime._Myhead->_Right = v1->m_mapBoundTime._Myhead;
  v1->m_mapBoundTime._Myhead->_Color = 1;
  v1->m_mapBoundTime._Myhead->_Isnil = 1;
  v1->kQaudSceneMakerAni.m_fLengthX = 0.0;
  v1->kQaudSceneMakerAni.m_nUsedLevelCnt = 0;
  v1->kQaudSceneMakerAni.m_fLengthY = 0.0;
  v1->kQaudSceneMakerAni.m_nTotalLevel = 0;
  v1->kQaudSceneMakerAni.m_nCountX = 0;
  v1->kQaudSceneMakerAni.m_nCountY = 0;
  v1->kQaudSceneMakerAni.m_pRootScene = 0;
  v1->kQaudSceneMakerNotAni.m_fLengthX = 0.0;
  v1->kQaudSceneMakerNotAni.m_fLengthY = 0.0;
  v1->kQaudSceneMakerNotAni.m_nUsedLevelCnt = 0;
  v1->kQaudSceneMakerNotAni.m_nTotalLevel = 0;
  v1->kQaudSceneMakerNotAni.m_nCountX = 0;
  v1->kQaudSceneMakerNotAni.m_nCountY = 0;
  v1->kQaudSceneMakerNotAni.m_pRootScene = 0;
  v1->m_kCullUPdateData.kCheckedNodes.vfptr = (NiTArray<NiPointer<NiNode> >Vtbl *)&NiTArray<NiPointer<NiNode>>::`vftable';
  v1->m_kCullUPdateData.kCheckedNodes.m_uiMaxSize = 0;
  v1->m_kCullUPdateData.kCheckedNodes.m_uiGrowBy = 1;
  v1->m_kCullUPdateData.kCheckedNodes.m_uiSize = 0;
  v1->m_kCullUPdateData.kCheckedNodes.m_uiESize = 0;
  v1->m_kCullUPdateData.kCheckedNodes.m_pBase = 0;
  HeightMapMaker::HeightMapMaker(&v1->m_HeightMapMaker);
  LOBYTE(v23) = 62;
  v1->m_mapGlobalLight._Mysize = 0;
  v10 = (std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> >::_Node *)operator new(0x18u);
  if ( !v10 )
    goto $LN790_0;
  v1->m_mapGlobalLight._Myhead = v10;
  v10->_Left = v10;
  v1->m_mapGlobalLight._Myhead->_Parent = v1->m_mapGlobalLight._Myhead;
  v1->m_mapGlobalLight._Myhead->_Right = v1->m_mapGlobalLight._Myhead;
  v1->m_mapGlobalLight._Myhead->_Color = 1;
  v1->m_mapGlobalLight._Myhead->_Isnil = 1;
  LOBYTE(v23) = 63;
  v1->m_mapFogInfo._Mysize = 0;
  v11 = (std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stFogInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stFogInfo> > >,0> >::_Node *)operator new(0x18u);
  if ( !v11 )
    goto LABEL_11;
  v1->m_mapFogInfo._Myhead = v11;
  v11->_Left = v11;
  v1->m_mapFogInfo._Myhead->_Parent = v1->m_mapFogInfo._Myhead;
  v1->m_mapFogInfo._Myhead->_Right = v1->m_mapFogInfo._Myhead;
  v1->m_mapFogInfo._Myhead->_Color = 1;
  v1->m_mapFogInfo._Myhead->_Isnil = 1;
  DecalMgr::DecalMgr(&v1->m_kDecalMgr);
  v1->m_fMaxHeight = 2000.0;
  v1->m_pkTerrain = 0;
  v1->m_fMinHeight = 0.0;
  LOBYTE(v23) = 65;
  v1->m_kMapName.n3_code[2] = 0;
  v1->m_kMapName.n3_code[1] = 0;
  *(_DWORD *)v2 = 0;
  strncpy(v1->m_kMapName.n3_name, "nonMap", 0xCu);
  NiFrustum::NiFrustum(&v17, -0.25, 0.25, 0.1875, -0.1875, 10.0, 1000000.0, v1->m_bCameraOrtho);
  v12 = v1->m_bCameraOrtho;
  qmemcpy(&v1->m_kSkyFrustum, v13, sizeof(v1->m_kSkyFrustum));
  NiFrustum::NiFrustum(&v17, -0.25, 0.25, 0.1875, -0.1875, 10.0, 6000.0, v12);
  qmemcpy(&v1->m_kWorldFrustum, v14, sizeof(v1->m_kWorldFrustum));
  v1->m_fNearPlaneRadius = 0.5;
  v1->m_fCameraFOV = 50.0;
  *(float *)&pExceptionObject.vfptr = 1.0;
  *(float *)&pExceptionObject._Mywhat = 1.0;
  *(float *)&pExceptionObject._Mydofree = 1.0;
  v1->m_bCameraOrtho = 0;
  v15 = pExceptionObject._Mywhat;
  v16 = *(float *)&pExceptionObject._Mydofree;
  v1->m_kBackGroundColor.r = 1.0;
  LODWORD(v1->m_kBackGroundColor.g) = v15;
  v1->m_kBackGroundColor.b = v16;
  v1->m_pkPick = 0;
  v1->m_pkBlockInfo = 0;
  v1->m_MapType = 0;
  *(_WORD *)&v1->m_bCameraMove = 0;
  v1->m_eCharShadowLevel = 10;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 97057C: using guessed type int (__thiscall *PgTList<NiPointer<Shadow>>::`vftable')(void *p, char);
// 9BC398: using guessed type int (__thiscall *NsPathFinding::`vftable')(void *p, char);
// 9BC3A0: using guessed type int (__thiscall *InstantBlock::`vftable')(void *p, char);
// 9BC3B0: using guessed type int (__thiscall *NiTArray<NiPointer<NiNode>>::`vftable')(void *p, char);

//----- (00677610) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Rrotate(std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *this, std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *_Wherenode)
{
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v4; // ecx@3
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v5; // ecx@5

  v2 = _Wherenode->_Left;
  _Wherenode->_Left = _Wherenode->_Left->_Right;
  v3 = v2->_Right;
  if ( !v3->_Isnil )
    v3->_Parent = _Wherenode;
  v2->_Parent = _Wherenode->_Parent;
  v4 = this->_Myhead;
  if ( _Wherenode == v4->_Parent )
  {
    v4->_Parent = v2;
    v2->_Right = _Wherenode;
    _Wherenode->_Parent = v2;
  }
  else
  {
    v5 = _Wherenode->_Parent;
    if ( _Wherenode == v5->_Right )
    {
      v5->_Right = v2;
      v2->_Right = _Wherenode;
      _Wherenode->_Parent = v2;
    }
    else
    {
      v5->_Left = v2;
      v2->_Right = _Wherenode;
      _Wherenode->_Parent = v2;
    }
  }
}

//----- (00677670) --------------------------------------------------------
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const,int>>,0>>,std::_Iterator_base0>::operator++(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *this)
{
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v2; // edx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v3; // ecx@2
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v4; // edx@3
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *i; // edx@6

  result = this;
  v2 = this->_Ptr;
  if ( !this->_Ptr->_Isnil )
  {
    v3 = v2->_Right;
    if ( v3->_Isnil )
    {
      for ( i = v2->_Parent; !i->_Isnil; i = i->_Parent )
      {
        if ( result->_Ptr != i->_Right )
          break;
        result->_Ptr = i;
      }
      result->_Ptr = i;
    }
    else
    {
      v4 = v3->_Left;
      if ( !v3->_Left->_Isnil )
      {
        do
        {
          v3 = v4;
          v4 = v4->_Left;
        }
        while ( !v4->_Isnil );
      }
      result->_Ptr = v3;
    }
  }
  return result;
}

//----- (006776C0) --------------------------------------------------------
void __thiscall NiAccumulator::~NiAccumulator(NiAccumulator *this)
{
  this->vfptr = (NiRefObjectVtbl *)&NiAccumulator::`vftable';
  NiRefObject::~NiRefObject((CPostProcessEffect *)this);
}
// 9BC34C: using guessed type int (__thiscall *NiAccumulator::`vftable')(void *p, char);

//----- (006776D0) --------------------------------------------------------
NiRTTI *NiAccumulator::GetRTTI()
{
  return &NiAccumulator::m_RTTI;
}

//----- (006776E0) --------------------------------------------------------
NiAccumulator *__thiscall NiAccumulator::`vector deleting destructor'(NiAccumulator *this, unsigned int a2)
{
  NiAccumulator *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiAccumulator::`vftable';
  NiRefObject::~NiRefObject((CPostProcessEffect *)this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BC34C: using guessed type int (__thiscall *NiAccumulator::`vftable')(void *p, char);

//----- (00677710) --------------------------------------------------------
void __thiscall NsPathFinding::~NsPathFinding(NsPathFinding *this)
{
  this->vfptr = (NsPathFindingVtbl *)&NsPathFinding::`vftable';
}
// 9BC398: using guessed type int (__thiscall *NsPathFinding::`vftable')(void *p, char);

//----- (00677720) --------------------------------------------------------
NsPathFinding *__thiscall NsPathFinding::`vector deleting destructor'(NsPathFinding *this, unsigned int a2)
{
  NsPathFinding *v2; // esi@1

  v2 = this;
  this->vfptr = (NsPathFindingVtbl *)&NsPathFinding::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BC398: using guessed type int (__thiscall *NsPathFinding::`vftable')(void *p, char);

//----- (00677750) --------------------------------------------------------
void __thiscall InstantBlock::RemoveAll(InstantBlock *this)
{
  InstantBlock *v1; // esi@1
  char *v2; // eax@1

  v1 = this;
  v2 = this->m_pbyBlockData;
  this->m_uiTotalHeadCnt = 0;
  if ( v2 )
    operator delete[](v2);
  v1->m_pbyBlockData = 0;
}

//----- (00677780) --------------------------------------------------------
void __thiscall InstantBlock::~InstantBlock(InstantBlock *this)
{
  InstantBlock *v1; // esi@1
  char *v2; // eax@1

  v1 = this;
  v2 = this->m_pbyBlockData;
  this->vfptr = (InstantBlockVtbl *)&InstantBlock::`vftable';
  this->m_uiTotalHeadCnt = 0;
  if ( v2 )
    operator delete[](v2);
  v1->m_pbyBlockData = 0;
}
// 9BC3A0: using guessed type int (__thiscall *InstantBlock::`vftable')(void *p, char);

//----- (006777C0) --------------------------------------------------------
InstantBlock *__thiscall InstantBlock::`scalar deleting destructor'(InstantBlock *this, unsigned int a2)
{
  InstantBlock *v2; // esi@1
  char *v3; // eax@1

  v2 = this;
  v3 = this->m_pbyBlockData;
  this->vfptr = (InstantBlockVtbl *)&InstantBlock::`vftable';
  this->m_uiTotalHeadCnt = 0;
  if ( v3 )
    operator delete[](v3);
  v2->m_pbyBlockData = 0;
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BC3A0: using guessed type int (__thiscall *InstantBlock::`vftable')(void *p, char);

//----- (00677810) --------------------------------------------------------
void __thiscall mhManagerMediator::~mhManagerMediator(mhManagerMediator *this)
{
  mhManagerMediator *v1; // esi@1
  NiCollisionGroup *v2; // edi@1

  v1 = this;
  v2 = &this->m_CollisionManager.m_pkCollisionGroup;
  NiCollisionGroup::RemoveAll(&this->m_CollisionManager.m_pkCollisionGroup);
  NiCollisionGroup::~NiCollisionGroup(v2);
  mhObjectManager::~mhObjectManager(&v1->m_ObjManager);
  mhResTableManager::~mhResTableManager(&v1->m_ResTableManager);
}

//----- (00677890) --------------------------------------------------------
void __thiscall NsMakeQuadScene::~NsMakeQuadScene(NsMakeQuadScene *this)
{
  this->m_pRootScene = 0;
}

//----- (006778A0) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int>>,0>>::_Max(std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *_Pnode)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *i; // ecx@1

  result = _Pnode;
  for ( i = _Pnode->_Right; !i->_Isnil; i = i->_Right )
    result = i;
  return result;
}

//----- (006778C0) --------------------------------------------------------
void __thiscall World::_unnamed_type_m_kExtraLightScene_::_unnamed_type_m_kExtraLightScene_($2855438363EAC391235637C3A76E32E6 *this)
{
  this->spScene.m_pObject = 0;
  this->spLightScene.m_pObject = 0;
}

//----- (006778D0) --------------------------------------------------------
void __thiscall World::_unnamed_type_m_kExtraLightScene_::~_unnamed_type_m_kExtraLightScene_($2855438363EAC391235637C3A76E32E6 *this)
{
  $2855438363EAC391235637C3A76E32E6 *v1; // edi@1
  NiNode *v2; // esi@1
  NiNode *v3; // esi@5

  v1 = this;
  v2 = this->spLightScene.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->spScene.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
  {
    if ( v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  }
}

//----- (00677960) --------------------------------------------------------
NiTArray<NiPointer<NiNode> > *__thiscall NiTArray<NiPointer<NiNode>>::`scalar deleting destructor'(NiTArray<NiPointer<NiNode> > *this, unsigned int a2)
{
  NiTArray<NiPointer<NiNode> > *v2; // esi@1
  NiPointer<NiNode> *v3; // eax@1
  NiPointer<NiNode> *v4; // edi@2

  v2 = this;
  v3 = this->m_pBase;
  this->vfptr = (NiTArray<NiPointer<NiNode> >Vtbl *)&NiTArray<NiPointer<NiNode>>::`vftable';
  if ( v3 )
  {
    v4 = v3 - 1;
    `eh vector destructor iterator'(
      v3,
      4u,
      (int)v3[-1].m_pObject,
      (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
    operator delete[](v4);
  }
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BC3B0: using guessed type int (__thiscall *NiTArray<NiPointer<NiNode>>::`vftable')(void *p, char);

//----- (006779B0) --------------------------------------------------------
void __thiscall FindCullUpdateNode::CullUpdateAreaInfo::~CullUpdateAreaInfo(FindCullUpdateNode::CullUpdateAreaInfo *this)
{
  NiPointer<NiNode> *v1; // eax@1
  NiPointer<NiNode> *v2; // esi@2

  v1 = this->kCheckedNodes.m_pBase;
  this->kCheckedNodes.vfptr = (NiTArray<NiPointer<NiNode> >Vtbl *)&NiTArray<NiPointer<NiNode>>::`vftable';
  if ( v1 )
  {
    v2 = v1 - 1;
    `eh vector destructor iterator'(
      v1,
      4u,
      (int)v1[-1].m_pObject,
      (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
    operator delete[](v2);
  }
}
// 9BC3B0: using guessed type int (__thiscall *NiTArray<NiPointer<NiNode>>::`vftable')(void *p, char);

//----- (006779E0) --------------------------------------------------------
void __cdecl std::_Insertion_sort1<NiGeometry * *,TextureSorter,NiGeometry *>(NiGeometry **_First, NiGeometry **_Last)
{
  NiGeometry **v2; // eax@1
  NiAVObject **v3; // ebx@2
  NiAVObject *v4; // esi@5
  NiAVObject *v5; // ST18_4@5
  NiProperty *v6; // edi@5
  NiProperty *v7; // eax@5
  NiRefObjectVtbl *v8; // ecx@7
  void *(__thiscall *v9)(NiRefObject *, unsigned int); // ecx@8
  NiTimeController *v10; // edx@10
  void *(__thiscall *v11)(NiRefObject *, unsigned int); // eax@11
  NiAVObject *v12; // edi@15
  NiProperty *v13; // esi@15
  NiProperty *v14; // eax@15
  NiTimeController *v15; // edx@17
  void *(__thiscall *v16)(NiRefObject *, unsigned int); // ecx@18
  NiRefObjectVtbl *v17; // eax@20
  void *(__thiscall *v18)(NiRefObject *, unsigned int); // eax@21
  NiGeometry **_Next; // [sp+4h] [bp-Ch]@2
  NiGeometry *_Val; // [sp+8h] [bp-8h]@5
  NiGeometry **_Next1; // [sp+Ch] [bp-4h]@5

  v2 = _First;
  if ( _First != _Last )
  {
    v3 = (NiAVObject **)(_First + 1);
    _Next = _First + 1;
    if ( _First + 1 != _Last )
    {
      while ( 1 )
      {
        v4 = *v3;
        _Next1 = (NiGeometry **)v3;
        _Val = (NiGeometry *)*v3;
        v5 = (NiAVObject *)*v2;
        v6 = NiAVObject::GetProperty(*v3, 8);
        v7 = NiAVObject::GetProperty(v5, 8);
        if ( !v6
          || v7
          && ((v8 = v6[1].m_spControllers.m_pObject->vfptr) == 0 ? (v9 = 0) : (v9 = v8[1].__vecDelDtor),
              (v10 = v7[1].m_spControllers.m_pObject, !v10->vfptr) ? (v11 = 0) : (v11 = v10->vfptr[1].__vecDelDtor),
              (unsigned int)v9 <= (unsigned int)v11) )
        {
          while ( 1 )
          {
            v12 = *(v3 - 1);
            --v3;
            v13 = NiAVObject::GetProperty(v4, 8);
            v14 = NiAVObject::GetProperty(v12, 8);
            if ( !v13 )
              break;
            if ( v14 )
            {
              v15 = v13[1].m_spControllers.m_pObject;
              v16 = v15->vfptr ? v15->vfptr[1].__vecDelDtor : 0;
              v17 = v14[1].m_spControllers.m_pObject->vfptr;
              v18 = v17 ? v17[1].__vecDelDtor : 0;
              if ( (unsigned int)v16 <= (unsigned int)v18 )
                break;
            }
            v4 = (NiAVObject *)_Val;
            *_Next1 = (NiGeometry *)*v3;
            _Next1 = (NiGeometry **)v3;
          }
          v3 = (NiAVObject **)_Next;
          *_Next1 = _Val;
        }
        else
        {
          memmove(
            (char *)&v3[-(((char *)v3 - (char *)_First) >> 2) + 1],
            (char *)_First,
            4 * (((char *)v3 - (char *)_First) >> 2));
          *_First = (NiGeometry *)v4;
        }
        ++v3;
        _Next = (NiGeometry **)v3;
        if ( (NiGeometry **)v3 == _Last )
          break;
        v2 = _First;
      }
    }
  }
}

//----- (00677B00) --------------------------------------------------------
void __cdecl std::_Med3<NiGeometry * *,TextureSorter>(NiGeometry **_First, NiGeometry **_Mid, NiGeometry **_Last)
{
  NiGeometry *v3; // edi@1
  NiProperty *v4; // esi@1
  NiProperty *v5; // eax@1
  NiRefObjectVtbl *v6; // ecx@3
  void *(__thiscall *v7)(NiRefObject *, unsigned int); // ecx@4
  NiTimeController *v8; // edx@6
  void *(__thiscall *v9)(NiRefObject *, unsigned int); // eax@7
  NiGeometry *v10; // eax@10
  NiGeometry *v11; // edi@11
  NiProperty *v12; // esi@11
  NiProperty *v13; // eax@11
  NiRefObjectVtbl *v14; // ecx@13
  void *(__thiscall *v15)(NiRefObject *, unsigned int); // ecx@14
  NiTimeController *v16; // edx@16
  void *(__thiscall *v17)(NiRefObject *, unsigned int); // eax@17
  NiGeometry *v18; // eax@20
  NiGeometry *v19; // edi@21
  NiProperty *v20; // esi@21
  NiProperty *v21; // eax@21
  NiRefObjectVtbl *v22; // ecx@23
  void *(__thiscall *v23)(NiRefObject *, unsigned int); // ecx@24
  NiTimeController *v24; // edx@26
  void *(__thiscall *v25)(NiRefObject *, unsigned int); // eax@27
  NiGeometry *v26; // eax@30

  v3 = *_First;
  v4 = NiAVObject::GetProperty((NiAVObject *)&(*_Mid)->vfptr, 8);
  v5 = NiAVObject::GetProperty((NiAVObject *)&v3->vfptr, 8);
  if ( v4 )
  {
    if ( !v5
      || ((v6 = v4[1].m_spControllers.m_pObject->vfptr) == 0 ? (v7 = 0) : (v7 = v6[1].__vecDelDtor),
          (v8 = v5[1].m_spControllers.m_pObject, !v8->vfptr) ? (v9 = 0) : (v9 = v8->vfptr[1].__vecDelDtor),
          (unsigned int)v7 > (unsigned int)v9) )
    {
      v10 = *_Mid;
      *_Mid = *_First;
      *_First = v10;
    }
  }
  v11 = *_Mid;
  v12 = NiAVObject::GetProperty((NiAVObject *)&(*_Last)->vfptr, 8);
  v13 = NiAVObject::GetProperty((NiAVObject *)&v11->vfptr, 8);
  if ( v12 )
  {
    if ( !v13
      || ((v14 = v12[1].m_spControllers.m_pObject->vfptr) == 0 ? (v15 = 0) : (v15 = v14[1].__vecDelDtor),
          (v16 = v13[1].m_spControllers.m_pObject, !v16->vfptr) ? (v17 = 0) : (v17 = v16->vfptr[1].__vecDelDtor),
          (unsigned int)v15 > (unsigned int)v17) )
    {
      v18 = *_Last;
      *_Last = *_Mid;
      *_Mid = v18;
    }
  }
  v19 = *_First;
  v20 = NiAVObject::GetProperty((NiAVObject *)&(*_Mid)->vfptr, 8);
  v21 = NiAVObject::GetProperty((NiAVObject *)&v19->vfptr, 8);
  if ( v20 )
  {
    if ( !v21
      || ((v22 = v20[1].m_spControllers.m_pObject->vfptr) == 0 ? (v23 = 0) : (v23 = v22[1].__vecDelDtor),
          (v24 = v21[1].m_spControllers.m_pObject, !v24->vfptr) ? (v25 = 0) : (v25 = v24->vfptr[1].__vecDelDtor),
          (unsigned int)v23 > (unsigned int)v25) )
    {
      v26 = *_Mid;
      *_Mid = *_First;
      *_First = v26;
    }
  }
}

//----- (00677C00) --------------------------------------------------------
void __cdecl std::_Push_heap<NiGeometry * *,int,NiGeometry *,TextureSorter>(NiGeometry **_First, int _Hole, int _Top, NiGeometry **_Val)
{
  int v4; // edi@1
  NiGeometry *v5; // ebx@2
  NiProperty *v6; // esi@2
  NiProperty *v7; // eax@2
  NiTimeController *v8; // edx@4
  void *(__thiscall *v9)(NiRefObject *, unsigned int); // ecx@5
  NiRefObjectVtbl *v10; // eax@7
  void *(__thiscall *v11)(NiRefObject *, unsigned int); // eax@8

  v4 = (_Hole - 1) / 2;
  if ( _Top >= _Hole )
  {
    _First[_Hole] = *_Val;
  }
  else
  {
    while ( 1 )
    {
      v5 = *_Val;
      v6 = NiAVObject::GetProperty((NiAVObject *)&_First[v4]->vfptr, 8);
      v7 = NiAVObject::GetProperty((NiAVObject *)&v5->vfptr, 8);
      if ( !v6 )
      {
LABEL_12:
        _First[_Hole] = *_Val;
        return;
      }
      if ( v7 )
      {
        v8 = v6[1].m_spControllers.m_pObject;
        v9 = v8->vfptr ? v8->vfptr[1].__vecDelDtor : 0;
        v10 = v7[1].m_spControllers.m_pObject->vfptr;
        v11 = v10 ? v10[1].__vecDelDtor : 0;
        if ( (unsigned int)v9 <= (unsigned int)v11 )
          break;
      }
      _First[_Hole] = _First[v4];
      _Hole = v4;
      v4 = (v4 - 1) / 2;
      if ( _Top >= _Hole )
        goto LABEL_12;
    }
    _First[_Hole] = *_Val;
  }
}

//----- (00677CC0) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Erase(std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *this, std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *_Rootnode)
{
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v2; // edi@1
  std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *i; // esi@1

  v2 = _Rootnode;
  v3 = this;
  for ( i = _Rootnode; !i->_Isnil; v2 = i )
  {
    std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Erase(
      v3,
      i->_Right);
    i = i->_Left;
    operator delete(v2);
  }
}

//----- (00677D00) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Erase(std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *this, std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *_Rootnode)
{
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v2; // edi@1
  std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *i; // esi@1

  v2 = _Rootnode;
  v3 = this;
  for ( i = _Rootnode; !i->_Isnil; v2 = i )
  {
    std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Erase(
      v3,
      i->_Right);
    i = i->_Left;
    operator delete(v2);
  }
}

//----- (00677D40) --------------------------------------------------------
void __cdecl std::_Median<NiGeometry * *,TextureSorter>(NiGeometry **_First, NiGeometry **_Mid, NiGeometry **_Last)
{
  NiGeometry **v3; // esi@1
  signed int v4; // eax@1
  int v5; // eax@2
  unsigned int v6; // edi@2
  NiGeometry **v7; // ST4C_4@2
  NiGeometry **_Lasta; // [sp+18h] [bp+10h]@2

  v3 = _Last;
  v4 = _Last - _First;
  if ( v4 <= 40 )
  {
    std::_Med3<NiGeometry * *,TextureSorter>(_First, _Mid, _Last);
  }
  else
  {
    v5 = (v4 + 1) / 8;
    _Lasta = (NiGeometry **)(8 * v5);
    v6 = 4 * v5;
    v7 = &_First[v5];
    std::_Med3<NiGeometry * *,TextureSorter>(_First, v7, &_First[2 * v5]);
    std::_Med3<NiGeometry * *,TextureSorter>(&_Mid[-v6 / 4], _Mid, &_Mid[v6 / 4]);
    std::_Med3<NiGeometry * *,TextureSorter>((NiGeometry **)((char *)v3 - (char *)_Lasta), &v3[-v6 / 4], v3);
    std::_Med3<NiGeometry * *,TextureSorter>(v7, _Mid, &v3[-v6 / 4]);
  }
}

//----- (00677DF0) --------------------------------------------------------
void __cdecl std::_Adjust_heap<NiGeometry * *,int,NiGeometry *,TextureSorter>(NiGeometry **_First, int _Hole, int _Bottom, NiGeometry **_Val)
{
  int v4; // eax@1
  int v5; // ecx@1
  int v6; // esi@1
  bool v7; // zf@1
  NiGeometry *v8; // ST20_4@2
  NiProperty *v9; // edi@2
  NiProperty *v10; // eax@2
  NiRefObjectVtbl *v11; // ecx@4
  void *(__thiscall *v12)(NiRefObject *, unsigned int); // ecx@5
  NiTimeController *v13; // edx@7
  void *(__thiscall *v14)(NiRefObject *, unsigned int); // eax@8
  int v15; // ecx@12
  NiGeometry *v16; // eax@12
  int _Top; // [sp+8h] [bp-8h]@1

  v4 = _Hole;
  v5 = _Bottom;
  v6 = 2 * _Hole + 2;
  _Top = _Hole;
  v7 = v6 == _Bottom;
  if ( v6 < _Bottom )
  {
    do
    {
      v8 = _First[v6 - 1];
      v9 = NiAVObject::GetProperty((NiAVObject *)&_First[v6]->vfptr, 8);
      v10 = NiAVObject::GetProperty((NiAVObject *)&v8->vfptr, 8);
      if ( v9 )
      {
        if ( !v10
          || ((v11 = v9[1].m_spControllers.m_pObject->vfptr) == 0 ? (v12 = 0) : (v12 = v11[1].__vecDelDtor),
              (v13 = v10[1].m_spControllers.m_pObject, !v13->vfptr) ? (v14 = 0) : (v14 = v13->vfptr[1].__vecDelDtor),
              (unsigned int)v12 > (unsigned int)v14) )
        {
          --v6;
        }
      }
      v15 = _Hole;
      v16 = _First[v6];
      _Hole = v6;
      v6 = 2 * v6 + 2;
      _First[v15] = v16;
    }
    while ( v6 < _Bottom );
    v5 = _Bottom;
    v4 = _Hole;
    v7 = v6 == _Bottom;
  }
  if ( v7 )
  {
    _First[v4] = _First[v5 - 1];
    v4 = v5 - 1;
  }
  std::_Push_heap<NiGeometry * *,int,NiGeometry *,TextureSorter>(_First, v4, _Top, _Val);
}

//----- (00677EB0) --------------------------------------------------------
std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *__thiscall std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0>>::erase(std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *this, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > _Where)
{
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v3; // ebx@1
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v4; // edi@4
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v5; // eax@7
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v6; // esi@8
  std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *v7; // ecx@10
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v8; // eax@10
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v9; // eax@17
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v10; // ecx@20
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v11; // ecx@29
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v12; // ecx@31
  char v13; // cl@34
  std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *i; // ecx@36
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v15; // eax@38
  unsigned int v16; // eax@59
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *v17; // eax@61
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *_Erasednode; // [sp+10h] [bp-8h]@3
  std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *v19; // [sp+14h] [bp-4h]@1

  v3 = _Where._Ptr;
  v19 = this;
  if ( _Where._Ptr->_Isnil )
    std::_Xout_of_range("invalid map/set<T> iterator");
  _Erasednode = _Where._Ptr;
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<Effect *,std::less<Effect *>,std::allocator<Effect *>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >,std::_Iterator_base0> *)&_Where._Ptr);
  if ( v3->_Left->_Isnil )
  {
    v4 = v3->_Right;
LABEL_8:
    v6 = v3->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v7 = v19;
    v8 = v19->_Myhead;
    if ( v8->_Parent == v3 )
    {
      v8->_Parent = v4;
    }
    else if ( v6->_Left == v3 )
    {
      v6->_Left = v4;
    }
    else
    {
      v6->_Right = v4;
    }
    if ( v19->_Myhead->_Left == v3 )
    {
      if ( v4->_Isnil )
      {
        v9 = v6;
      }
      else
      {
        v9 = std::_Tree_val<std::_Tset_traits<Effect *,std::less<Effect *>,std::allocator<Effect *>,0>>::_Min(v4);
        v7 = v19;
      }
      v7->_Myhead->_Left = v9;
    }
    v10 = v7->_Myhead;
    if ( v10->_Right == v3 )
    {
      if ( v4->_Isnil )
        v10->_Right = v6;
      else
        v10->_Right = std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Max(v4);
    }
    goto LABEL_35;
  }
  if ( v3->_Right->_Isnil )
  {
    v4 = v3->_Left;
    goto LABEL_8;
  }
  v5 = _Where._Ptr;
  v4 = _Where._Ptr->_Right;
  if ( _Where._Ptr == v3 )
    goto LABEL_8;
  v3->_Left->_Parent = _Where._Ptr;
  v5->_Left = v3->_Left;
  if ( v5 == v3->_Right )
  {
    v6 = v5;
  }
  else
  {
    v6 = v5->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v6->_Left = v4;
    v5->_Right = v3->_Right;
    v3->_Right->_Parent = v5;
  }
  v11 = v19->_Myhead;
  if ( v11->_Parent == v3 )
  {
    v11->_Parent = v5;
  }
  else
  {
    v12 = v3->_Parent;
    if ( v12->_Left == v3 )
      v12->_Left = v5;
    else
      v12->_Right = v5;
  }
  v5->_Parent = v3->_Parent;
  v13 = v5->_Color;
  v5->_Color = v3->_Color;
  v3->_Color = v13;
LABEL_35:
  if ( _Erasednode->_Color == 1 )
  {
    for ( i = v19; v4 != i->_Myhead->_Parent; v6 = v6->_Parent )
    {
      if ( v4->_Color != 1 )
        break;
      v15 = v6->_Left;
      if ( v4 == v6->_Left )
      {
        v15 = v6->_Right;
        if ( !v15->_Color )
        {
          v15->_Color = 1;
          v6->_Color = 0;
          std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Lrotate(
            i,
            v6);
          v15 = v6->_Right;
          i = v19;
        }
        if ( v15->_Isnil )
          goto LABEL_53;
        if ( v15->_Left->_Color != 1 || v15->_Right->_Color != 1 )
        {
          if ( v15->_Right->_Color == 1 )
          {
            v15->_Left->_Color = 1;
            v15->_Color = 0;
            std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Rrotate(
              i,
              v15);
            v15 = v6->_Right;
            i = v19;
          }
          v15->_Color = v6->_Color;
          v6->_Color = 1;
          v15->_Right->_Color = 1;
          std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Lrotate(
            i,
            v6);
          break;
        }
      }
      else
      {
        if ( !v15->_Color )
        {
          v15->_Color = 1;
          v6->_Color = 0;
          std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Rrotate(
            i,
            v6);
          v15 = v6->_Left;
          i = v19;
        }
        if ( v15->_Isnil )
          goto LABEL_53;
        if ( v15->_Right->_Color != 1 || v15->_Left->_Color != 1 )
        {
          if ( v15->_Left->_Color == 1 )
          {
            v15->_Right->_Color = 1;
            v15->_Color = 0;
            std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Lrotate(
              i,
              v15);
            v15 = v6->_Left;
            i = v19;
          }
          v15->_Color = v6->_Color;
          v6->_Color = 1;
          v15->_Left->_Color = 1;
          std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Rrotate(
            i,
            v6);
          break;
        }
      }
      v15->_Color = 0;
LABEL_53:
      v4 = v6;
    }
    v4->_Color = 1;
  }
  operator delete(_Erasednode);
  v16 = v19->_Mysize;
  if ( v16 )
    v19->_Mysize = v16 - 1;
  v17 = result;
  result->_Ptr = _Where._Ptr;
  return v17;
}

//----- (00678100) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,unsigned short>>,0>>::_Erase(std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *this, std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *_Rootnode)
{
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v2; // edi@1
  std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *v3; // ebx@1
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *i; // esi@1

  v2 = _Rootnode;
  v3 = this;
  for ( i = _Rootnode; !i->_Isnil; v2 = i )
  {
    std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,unsigned short>>,0>>::_Erase(
      v3,
      i->_Right);
    i = i->_Left;
    operator delete(v2);
  }
}

//----- (00678140) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::erase(std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > _Where)
{
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v4; // edi@4
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v5; // eax@7
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v6; // esi@8
  std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *v7; // ecx@10
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v8; // eax@10
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v9; // eax@17
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v10; // ecx@20
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v11; // ecx@29
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v12; // ecx@31
  char v13; // cl@34
  std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *v14; // ecx@36
  std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *v15; // eax@38
  unsigned int v16; // eax@59
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > *v17; // eax@61
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *_Erasednode; // [sp+10h] [bp-8h]@3
  std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *v19; // [sp+14h] [bp-4h]@1

  v3 = _Where._Ptr;
  v19 = this;
  if ( _Where._Ptr->_Isnil )
    std::_Xout_of_range("invalid map/set<T> iterator");
  _Erasednode = _Where._Ptr;
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >,std::_Iterator_base0> *)&_Where);
  if ( v3->_Left->_Isnil )
  {
    v4 = (std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *)v3->_Right;
LABEL_8:
    v6 = (std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *)v3->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v7 = v19;
    v8 = v19->_Myhead;
    if ( v8->_Parent == v3 )
    {
      v8->_Parent = (std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *)v4;
    }
    else if ( (std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *)v6->_Left == v3 )
    {
      v6->_Left = v4;
    }
    else
    {
      v6->_Right = v4;
    }
    if ( v19->_Myhead->_Left == v3 )
    {
      if ( v4->_Isnil )
      {
        v9 = v6;
      }
      else
      {
        v9 = std::_Tree_val<std::_Tmap_traits<NiActorManager *,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>,std::less<NiActorManager *>,std::allocator<std::pair<NiActorManager * const,std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>>>>,0>>::_Min(v4);
        v7 = v19;
      }
      v7->_Myhead->_Left = (std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *)v9;
    }
    v10 = v7->_Myhead;
    if ( v10->_Right == v3 )
    {
      if ( v4->_Isnil )
        v10->_Right = (std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *)v6;
      else
        v10->_Right = (std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>::_Max(v4);
    }
    goto LABEL_35;
  }
  if ( v3->_Right->_Isnil )
  {
    v4 = (std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *)v3->_Left;
    goto LABEL_8;
  }
  v5 = _Where._Ptr;
  v4 = (std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *)_Where._Ptr->_Right;
  if ( _Where._Ptr == v3 )
    goto LABEL_8;
  v3->_Left->_Parent = _Where._Ptr;
  v5->_Left = v3->_Left;
  if ( v5 == v3->_Right )
  {
    v6 = (std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *)v5;
  }
  else
  {
    v6 = (std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *)v5->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v6->_Left = v4;
    v5->_Right = v3->_Right;
    v3->_Right->_Parent = v5;
  }
  v11 = v19->_Myhead;
  if ( v11->_Parent == v3 )
  {
    v11->_Parent = v5;
  }
  else
  {
    v12 = v3->_Parent;
    if ( v12->_Left == v3 )
      v12->_Left = v5;
    else
      v12->_Right = v5;
  }
  v5->_Parent = v3->_Parent;
  v13 = v5->_Color;
  v5->_Color = v3->_Color;
  v3->_Color = v13;
LABEL_35:
  if ( _Erasednode->_Color == 1 )
  {
    v14 = (std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *)v19;
    if ( v4 != (std::_Tree_nod<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >::_Node *)v19->_Myhead->_Parent )
    {
      do
      {
        if ( v4->_Color != 1 )
          break;
        v15 = v6->_Left;
        if ( v4 == v6->_Left )
        {
          v15 = v6->_Right;
          if ( !v15->_Color )
          {
            v15->_Color = 1;
            v6->_Color = 0;
            std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Lrotate(
              v14,
              v6);
            v15 = v6->_Right;
            v14 = (std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *)v19;
          }
          if ( v15->_Isnil )
            goto LABEL_53;
          if ( v15->_Left->_Color != 1 || v15->_Right->_Color != 1 )
          {
            if ( v15->_Right->_Color == 1 )
            {
              v15->_Left->_Color = 1;
              v15->_Color = 0;
              std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Rrotate(
                v14,
                v15);
              v15 = v6->_Right;
              v14 = (std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *)v19;
            }
            v15->_Color = v6->_Color;
            v6->_Color = 1;
            v15->_Right->_Color = 1;
            std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Lrotate(
              v14,
              v6);
            break;
          }
        }
        else
        {
          if ( !v15->_Color )
          {
            v15->_Color = 1;
            v6->_Color = 0;
            std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Rrotate(
              v14,
              v6);
            v15 = v6->_Left;
            v14 = (std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *)v19;
          }
          if ( v15->_Isnil )
            goto LABEL_53;
          if ( v15->_Right->_Color != 1 || v15->_Left->_Color != 1 )
          {
            if ( v15->_Left->_Color == 1 )
            {
              v15->_Right->_Color = 1;
              v15->_Color = 0;
              std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Lrotate(
                v14,
                v15);
              v15 = v6->_Left;
              v14 = (std::_Tree<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> > *)v19;
            }
            v15->_Color = v6->_Color;
            v6->_Color = 1;
            v15->_Left->_Color = 1;
            std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Rrotate(
              v14,
              v6);
            break;
          }
        }
        v15->_Color = 0;
LABEL_53:
        v4 = v6;
        v6 = v6->_Parent;
      }
      while ( v4 != v14->_Myhead->_Parent );
    }
    v4->_Color = 1;
  }
  operator delete(_Erasednode);
  v16 = v19->_Mysize;
  if ( v16 )
    v19->_Mysize = v16 - 1;
  v17 = result;
  result->_Ptr = _Where._Ptr;
  return v17;
}

//----- (00678390) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::clear(std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *this)
{
  std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *v1; // edi@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v4; // esi@1

  v1 = this;
  v2 = this->_Myhead;
  v3 = v2->_Parent;
  v4 = v2->_Parent;
  if ( !v3->_Isnil )
  {
    do
    {
      std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Erase(
        v1,
        v4->_Right);
      v4 = v4->_Left;
      operator delete(v3);
      v3 = v4;
    }
    while ( !v4->_Isnil );
  }
  v1->_Myhead->_Parent = v1->_Myhead;
  v1->_Myhead->_Left = v1->_Myhead;
  v1->_Myhead->_Right = v1->_Myhead;
  v1->_Mysize = 0;
}

//----- (006783E0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::erase(std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > _Where)
{
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v4; // edi@4
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v5; // eax@7
  std::_Tree_nod<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v6; // esi@8
  std::_Tree<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *v7; // ecx@10
  std::_Tree_nod<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v8; // eax@10
  std::_Tree_nod<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v9; // eax@17
  std::_Tree_nod<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v10; // ecx@20
  std::_Tree_nod<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v11; // ecx@29
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v12; // ecx@31
  char v13; // cl@34
  std::_Tree<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *i; // ecx@36
  std::_Tree_nod<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v15; // eax@38
  unsigned int v16; // eax@59
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *v17; // eax@61
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *_Erasednode; // [sp+10h] [bp-8h]@3
  std::_Tree<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *v19; // [sp+14h] [bp-4h]@1

  v3 = _Where._Ptr;
  v19 = (std::_Tree<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *)this;
  if ( _Where._Ptr->_Isnil )
    std::_Xout_of_range("invalid map/set<T> iterator");
  _Erasednode = _Where._Ptr;
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&_Where);
  if ( v3->_Left->_Isnil )
  {
    v4 = (std::_Tree_nod<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *)v3->_Right;
LABEL_8:
    v6 = (std::_Tree_nod<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *)v3->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v7 = v19;
    v8 = v19->_Myhead;
    if ( (std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *)v8->_Parent == v3 )
    {
      v8->_Parent = v4;
    }
    else if ( (std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *)v6->_Left == v3 )
    {
      v6->_Left = v4;
    }
    else
    {
      v6->_Right = v4;
    }
    if ( (std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *)v19->_Myhead->_Left == v3 )
    {
      if ( v4->_Isnil )
      {
        v9 = v6;
      }
      else
      {
        v9 = std::_Tree_val<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>::_Min(v4);
        v7 = v19;
      }
      v7->_Myhead->_Left = v9;
    }
    v10 = v7->_Myhead;
    if ( (std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *)v10->_Right == v3 )
    {
      if ( v4->_Isnil )
        v10->_Right = v6;
      else
        v10->_Right = std::_Tree_val<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>::_Max(v4);
    }
    goto LABEL_35;
  }
  if ( v3->_Right->_Isnil )
  {
    v4 = (std::_Tree_nod<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *)v3->_Left;
    goto LABEL_8;
  }
  v5 = _Where._Ptr;
  v4 = (std::_Tree_nod<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *)_Where._Ptr->_Right;
  if ( _Where._Ptr == v3 )
    goto LABEL_8;
  v3->_Left->_Parent = _Where._Ptr;
  v5->_Left = v3->_Left;
  if ( v5 == v3->_Right )
  {
    v6 = (std::_Tree_nod<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *)v5;
  }
  else
  {
    v6 = (std::_Tree_nod<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *)v5->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v6->_Left = v4;
    v5->_Right = v3->_Right;
    v3->_Right->_Parent = v5;
  }
  v11 = v19->_Myhead;
  if ( (std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *)v11->_Parent == v3 )
  {
    v11->_Parent = (std::_Tree_nod<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *)v5;
  }
  else
  {
    v12 = v3->_Parent;
    if ( v12->_Left == v3 )
      v12->_Left = v5;
    else
      v12->_Right = v5;
  }
  v5->_Parent = v3->_Parent;
  v13 = v5->_Color;
  v5->_Color = v3->_Color;
  v3->_Color = v13;
LABEL_35:
  if ( _Erasednode->_Color == 1 )
  {
    for ( i = v19; v4 != i->_Myhead->_Parent; v6 = v6->_Parent )
    {
      if ( v4->_Color != 1 )
        break;
      v15 = v6->_Left;
      if ( v4 == v6->_Left )
      {
        v15 = v6->_Right;
        if ( !v15->_Color )
        {
          v15->_Color = 1;
          v6->_Color = 0;
          std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Lrotate(
            i,
            v6);
          v15 = v6->_Right;
          i = v19;
        }
        if ( v15->_Isnil )
          goto LABEL_53;
        if ( v15->_Left->_Color != 1 || v15->_Right->_Color != 1 )
        {
          if ( v15->_Right->_Color == 1 )
          {
            v15->_Left->_Color = 1;
            v15->_Color = 0;
            std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Rrotate(
              i,
              v15);
            v15 = v6->_Right;
            i = v19;
          }
          v15->_Color = v6->_Color;
          v6->_Color = 1;
          v15->_Right->_Color = 1;
          std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Lrotate(
            i,
            v6);
          break;
        }
      }
      else
      {
        if ( !v15->_Color )
        {
          v15->_Color = 1;
          v6->_Color = 0;
          std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Rrotate(
            i,
            v6);
          v15 = v6->_Left;
          i = v19;
        }
        if ( v15->_Isnil )
          goto LABEL_53;
        if ( v15->_Right->_Color != 1 || v15->_Left->_Color != 1 )
        {
          if ( v15->_Left->_Color == 1 )
          {
            v15->_Right->_Color = 1;
            v15->_Color = 0;
            std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Lrotate(
              i,
              v15);
            v15 = v6->_Left;
            i = v19;
          }
          v15->_Color = v6->_Color;
          v6->_Color = 1;
          v15->_Left->_Color = 1;
          std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Rrotate(
            i,
            v6);
          break;
        }
      }
      v15->_Color = 0;
LABEL_53:
      v4 = v6;
    }
    v4->_Color = 1;
  }
  operator delete(_Erasednode);
  v16 = v19->_Mysize;
  if ( v16 )
    v19->_Mysize = v16 - 1;
  v17 = result;
  result->_Ptr = _Where._Ptr;
  return v17;
}

//----- (00678630) --------------------------------------------------------
std::pair<NiGeometry * *,NiGeometry * *> *__cdecl std::_Unguarded_partition<NiGeometry * *,TextureSorter>(std::pair<NiGeometry * *,NiGeometry * *> *result, NiGeometry **_First, NiGeometry **_Last)
{
  NiAVObject **v3; // esi@1
  NiAVObject *v4; // ebx@2
  NiProperty *v5; // edi@2
  NiProperty *v6; // eax@2
  NiTimeController *v7; // edx@4
  void *(__thiscall *v8)(NiRefObject *, unsigned int); // ecx@5
  NiRefObjectVtbl *v9; // eax@7
  void *(__thiscall *v10)(NiRefObject *, unsigned int); // eax@8
  NiAVObject *v11; // ebx@11
  NiProperty *v12; // edi@11
  NiProperty *v13; // eax@11
  NiRefObjectVtbl *v14; // ecx@13
  void *(__thiscall *v15)(NiRefObject *, unsigned int); // ecx@14
  NiTimeController *v16; // edx@16
  void *(__thiscall *v17)(NiRefObject *, unsigned int); // eax@17
  NiAVObject *v18; // ebx@22
  NiProperty *v19; // edi@22
  NiProperty *v20; // eax@22
  NiTimeController *v21; // edx@24
  void *(__thiscall *v22)(NiRefObject *, unsigned int); // ecx@25
  NiRefObjectVtbl *v23; // eax@27
  void *(__thiscall *v24)(NiRefObject *, unsigned int); // eax@28
  NiAVObject *v25; // ebx@31
  NiProperty *v26; // edi@31
  NiProperty *v27; // eax@31
  NiTimeController *v28; // edx@33
  void *(__thiscall *v29)(NiRefObject *, unsigned int); // ecx@34
  NiRefObjectVtbl *v30; // eax@36
  void *(__thiscall *v31)(NiRefObject *, unsigned int); // eax@37
  NiAVObject **v32; // ebx@41
  NiAVObject *v33; // ST20_4@43
  NiProperty *v34; // edi@43
  NiProperty *v35; // eax@43
  NiTimeController *v36; // edx@45
  void *(__thiscall *v37)(NiRefObject *, unsigned int); // ecx@46
  NiRefObjectVtbl *v38; // eax@48
  void *(__thiscall *v39)(NiRefObject *, unsigned int); // eax@49
  NiAVObject *v40; // ST20_4@52
  NiProperty *v41; // edi@52
  NiProperty *v42; // eax@52
  NiTimeController *v43; // edx@54
  void *(__thiscall *v44)(NiRefObject *, unsigned int); // ecx@55
  NiRefObjectVtbl *v45; // eax@57
  void *(__thiscall *v46)(NiRefObject *, unsigned int); // eax@58
  NiAVObject **v47; // eax@61
  NiAVObject *v48; // ecx@61
  NiAVObject *v49; // ebx@65
  NiProperty *v50; // edi@65
  NiProperty *v51; // eax@65
  NiTimeController *v52; // edx@67
  void *(__thiscall *v53)(NiRefObject *, unsigned int); // ecx@68
  NiRefObjectVtbl *v54; // eax@70
  void *(__thiscall *v55)(NiRefObject *, unsigned int); // eax@71
  NiAVObject *v56; // ebx@74
  NiProperty *v57; // edi@74
  NiProperty *v58; // eax@74
  NiTimeController *v59; // edx@76
  void *(__thiscall *v60)(NiRefObject *, unsigned int); // ecx@77
  NiRefObjectVtbl *v61; // eax@79
  void *(__thiscall *v62)(NiRefObject *, unsigned int); // eax@80
  NiGeometry *v63; // ecx@83
  NiAVObject *v64; // edx@88
  NiGeometry **v65; // edx@89
  NiGeometry **v66; // ecx@89
  NiGeometry *v67; // edi@89
  NiGeometry *v68; // eax@89
  NiGeometry **v69; // ecx@90
  NiGeometry **v70; // eax@90
  NiGeometry *v71; // ecx@92
  NiAVObject *v72; // ecx@93
  NiGeometry *v73; // edx@94
  std::pair<NiGeometry * *,NiGeometry * *> *v74; // eax@95
  NiGeometry **_Glast; // [sp+Ch] [bp-Ch]@41
  NiGeometry **_Gfirst; // [sp+10h] [bp-8h]@41
  NiAVObject **_Plast; // [sp+14h] [bp-4h]@1

  v3 = (NiAVObject **)&_First[(_Last - _First) / 2];
  std::_Median<NiGeometry * *,TextureSorter>(_First, &_First[(_Last - _First) / 2], _Last - 1);
  for ( _Plast = v3 + 1; _First < (NiGeometry **)v3; --v3 )
  {
    v4 = *v3;
    v5 = NiAVObject::GetProperty(*(v3 - 1), 8);
    v6 = NiAVObject::GetProperty(v4, 8);
    if ( v5 )
    {
      if ( !v6 )
        break;
      v7 = v5[1].m_spControllers.m_pObject;
      v8 = v7->vfptr ? v7->vfptr[1].__vecDelDtor : 0;
      v9 = v6[1].m_spControllers.m_pObject->vfptr;
      v10 = v9 ? v9[1].__vecDelDtor : 0;
      if ( (unsigned int)v8 > (unsigned int)v10 )
        break;
    }
    v11 = *(v3 - 1);
    v12 = NiAVObject::GetProperty(*v3, 8);
    v13 = NiAVObject::GetProperty(v11, 8);
    if ( v12 )
    {
      if ( !v13 )
        break;
      v14 = v12[1].m_spControllers.m_pObject->vfptr;
      v15 = v14 ? v14[1].__vecDelDtor : 0;
      v16 = v13[1].m_spControllers.m_pObject;
      v17 = v16->vfptr ? v16->vfptr[1].__vecDelDtor : 0;
      if ( (unsigned int)v15 > (unsigned int)v17 )
        break;
    }
  }
  for ( ; _Plast < (NiAVObject **)_Last; ++_Plast )
  {
    v18 = *v3;
    v19 = NiAVObject::GetProperty(*_Plast, 8);
    v20 = NiAVObject::GetProperty(v18, 8);
    if ( v19 )
    {
      if ( !v20 )
        break;
      v21 = v19[1].m_spControllers.m_pObject;
      v22 = v21->vfptr ? v21->vfptr[1].__vecDelDtor : 0;
      v23 = v20[1].m_spControllers.m_pObject->vfptr;
      v24 = v23 ? v23[1].__vecDelDtor : 0;
      if ( (unsigned int)v22 > (unsigned int)v24 )
        break;
    }
    v25 = *_Plast;
    v26 = NiAVObject::GetProperty(*v3, 8);
    v27 = NiAVObject::GetProperty(v25, 8);
    if ( v26 )
    {
      if ( !v27 )
        break;
      v28 = v26[1].m_spControllers.m_pObject;
      v29 = v28->vfptr ? v28->vfptr[1].__vecDelDtor : 0;
      v30 = v27[1].m_spControllers.m_pObject->vfptr;
      v31 = v30 ? v30[1].__vecDelDtor : 0;
      if ( (unsigned int)v29 > (unsigned int)v31 )
        break;
    }
  }
  v32 = _Plast;
  _Gfirst = (NiGeometry **)_Plast;
  _Glast = (NiGeometry **)v3;
  while ( 2 )
  {
    while ( 2 )
    {
      if ( v32 >= (NiAVObject **)_Last )
        goto LABEL_64;
      do
      {
        v33 = *v32;
        v34 = NiAVObject::GetProperty(*v3, 8);
        v35 = NiAVObject::GetProperty(v33, 8);
        if ( v34 )
        {
          if ( !v35 )
            goto LABEL_62;
          v36 = v34[1].m_spControllers.m_pObject;
          v37 = v36->vfptr ? v36->vfptr[1].__vecDelDtor : 0;
          v38 = v35[1].m_spControllers.m_pObject->vfptr;
          v39 = v38 ? v38[1].__vecDelDtor : 0;
          if ( (unsigned int)v37 > (unsigned int)v39 )
            goto LABEL_62;
        }
        v40 = *v3;
        v41 = NiAVObject::GetProperty(*v32, 8);
        v42 = NiAVObject::GetProperty(v40, 8);
        if ( v41 )
        {
          if ( !v42 )
            break;
          v43 = v41[1].m_spControllers.m_pObject;
          v44 = v43->vfptr ? v43->vfptr[1].__vecDelDtor : 0;
          v45 = v42[1].m_spControllers.m_pObject->vfptr;
          v46 = v45 ? v45[1].__vecDelDtor : 0;
          if ( (unsigned int)v44 > (unsigned int)v46 )
            break;
        }
        v47 = _Plast;
        ++_Plast;
        v48 = *v47;
        *v47 = *v32;
        *v32 = v48;
LABEL_62:
        ++v32;
      }
      while ( v32 < (NiAVObject **)_Last );
      _Gfirst = (NiGeometry **)v32;
LABEL_64:
      while ( _First < _Glast )
      {
        v49 = *v3;
        v50 = NiAVObject::GetProperty((NiAVObject *)&(*(_Glast - 1))->vfptr, 8);
        v51 = NiAVObject::GetProperty(v49, 8);
        if ( !v50
          || v51
          && ((v52 = v50[1].m_spControllers.m_pObject, !v52->vfptr) ? (v53 = 0) : (v53 = v52->vfptr[1].__vecDelDtor),
              (v54 = v51[1].m_spControllers.m_pObject->vfptr) == 0 ? (v55 = 0) : (v55 = v54[1].__vecDelDtor),
              (unsigned int)v53 <= (unsigned int)v55) )
        {
          v56 = (NiAVObject *)*(_Glast - 1);
          v57 = NiAVObject::GetProperty(*v3, 8);
          v58 = NiAVObject::GetProperty(v56, 8);
          if ( v57 )
          {
            if ( !v58 )
              break;
            v59 = v57[1].m_spControllers.m_pObject;
            v60 = v59->vfptr ? v59->vfptr[1].__vecDelDtor : 0;
            v61 = v58[1].m_spControllers.m_pObject->vfptr;
            v62 = v61 ? v61[1].__vecDelDtor : 0;
            if ( (unsigned int)v60 > (unsigned int)v62 )
              break;
          }
          v63 = (NiGeometry *)*(v3 - 1);
          --v3;
          *v3 = (NiAVObject *)*(_Glast - 1);
          *(_Glast - 1) = v63;
        }
        --_Glast;
      }
      if ( _Glast != _First )
      {
        v69 = _Gfirst;
        v70 = _Glast - 1;
        --_Glast;
        if ( _Gfirst == _Last )
        {
          --v3;
          if ( (NiAVObject **)v70 != v3 )
          {
            v71 = *v70;
            *v70 = (NiGeometry *)*v3;
            *v3 = (NiAVObject *)v71;
          }
          v72 = *v3;
          v32 = (NiAVObject **)_Gfirst;
          *v3 = *(_Plast - 1);
          --_Plast;
          *_Plast = v72;
        }
        else
        {
          v73 = *_Gfirst;
          *_Gfirst = *v70;
          *v70 = v73;
          ++_Gfirst;
          v32 = (NiAVObject **)(v69 + 1);
        }
        continue;
      }
      break;
    }
    if ( _Gfirst != _Last )
    {
      if ( (NiGeometry **)_Plast != _Gfirst )
      {
        v64 = *v3;
        *v3 = *_Plast;
        *_Plast = v64;
      }
      v65 = (NiGeometry **)v3;
      ++_Plast;
      v66 = _Gfirst;
      v67 = *_Gfirst;
      ++v3;
      ++_Gfirst;
      v68 = *v65;
      v32 = (NiAVObject **)_Gfirst;
      *v65 = v67;
      *v66 = v68;
      continue;
    }
    break;
  }
  v74 = result;
  result->first = (NiGeometry **)v3;
  result->second = (NiGeometry **)_Plast;
  return v74;
}

//----- (006789D0) --------------------------------------------------------
void __cdecl std::_Make_heap<NiGeometry * *,int,NiGeometry *,TextureSorter>(NiGeometry **_First, NiGeometry **_Last, TextureSorter _Pred)
{
  NiGeometry **v3; // edi@1
  signed int v4; // ecx@1
  int v5; // ebx@1
  int v6; // esi@2
  NiGeometry *v7; // eax@4
  int v8; // esi@4
  bool v9; // zf@4
  NiAVObject *v10; // ecx@5
  NiProperty *v11; // ebx@5
  NiProperty *v12; // eax@5
  NiRefObjectVtbl *v13; // ecx@7
  void *(__thiscall *v14)(NiRefObject *, unsigned int); // ecx@8
  NiTimeController *v15; // edx@10
  void *(__thiscall *v16)(NiRefObject *, unsigned int); // eax@11
  int v17; // ecx@15
  NiGeometry *v18; // eax@15
  NiGeometry *_Val; // [sp+8h] [bp-14h]@4
  int v20; // [sp+Ch] [bp-10h]@4
  int _Hole; // [sp+10h] [bp-Ch]@4
  NiAVObject *v22; // [sp+14h] [bp-8h]@5
  int v23; // [sp+18h] [bp-4h]@3
  int _Bottom; // [sp+24h] [bp+8h]@1
  int _Lasta; // [sp+28h] [bp+Ch]@4

  v3 = _First;
  v4 = _Last - _First;
  v5 = v4 / 2;
  _Bottom = _Last - _First;
  if ( v5 > 0 )
  {
    v6 = 2 * v5 + 2;
    while ( 1 )
    {
      v7 = v3[v5-- - 1];
      v8 = v6 - 2;
      _Hole = v5;
      v23 = v8;
      _Val = v7;
      LOBYTE(v20) = _Pred;
      _Lasta = v5;
      v9 = v8 == v4;
      if ( v8 < v4 )
      {
        do
        {
          v10 = (NiAVObject *)&v3[v8]->vfptr;
          v22 = (NiAVObject *)&v3[v8 - 1]->vfptr;
          v11 = NiAVObject::GetProperty(v10, 8);
          v12 = NiAVObject::GetProperty(v22, 8);
          if ( v11 )
          {
            if ( !v12
              || ((v13 = v11[1].m_spControllers.m_pObject->vfptr) == 0 ? (v14 = 0) : (v14 = v13[1].__vecDelDtor),
                  (v15 = v12[1].m_spControllers.m_pObject, !v15->vfptr) ? (v16 = 0) : (v16 = v15->vfptr[1].__vecDelDtor),
                  (unsigned int)v14 > (unsigned int)v16) )
            {
              --v8;
            }
          }
          v17 = _Lasta;
          v18 = v3[v8];
          _Lasta = v8;
          v8 = 2 * v8 + 2;
          v3[v17] = v18;
        }
        while ( v8 < _Bottom );
        v4 = _Bottom;
        v5 = _Hole;
        v9 = v8 == _Bottom;
      }
      if ( v9 )
      {
        v3[_Lasta] = v3[v4 - 1];
        _Lasta = v4 - 1;
      }
      std::_Push_heap<NiGeometry * *,int,NiGeometry *,TextureSorter>(v3, _Lasta, v5, &_Val);
      if ( v5 <= 0 )
        break;
      v6 = v23;
      v4 = _Bottom;
    }
  }
}

//----- (00678AC0) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,unsigned short>>,0>>::clear(std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *this)
{
  std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *v1; // edi@1
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v3; // ebx@1
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v4; // esi@1

  v1 = this;
  v2 = this->_Myhead;
  v3 = v2->_Parent;
  v4 = v2->_Parent;
  if ( !v3->_Isnil )
  {
    do
    {
      std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,unsigned short>>,0>>::_Erase(
        v1,
        v4->_Right);
      v4 = v4->_Left;
      operator delete(v3);
      v3 = v4;
    }
    while ( !v4->_Isnil );
  }
  v1->_Myhead->_Parent = v1->_Myhead;
  v1->_Myhead->_Left = v1->_Myhead;
  v1->_Myhead->_Right = v1->_Myhead;
  v1->_Mysize = 0;
}

//----- (00678B10) --------------------------------------------------------
NiRTTI *NiTextureAccumulator::GetRTTI()
{
  return &NiTextureAccumulator::m_RTTI;
}

//----- (00678B20) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::erase(std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > _Last)
{
  std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v6; // ecx@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > *v7; // eax@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > v8; // edx@5
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v9; // eax@6
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v10; // ecx@7
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *j; // eax@7
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *i; // eax@10
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > v13; // [sp+4h] [bp-4h]@14

  v4 = this;
  v5 = this->_Myhead;
  v6 = _First._Ptr;
  if ( _First._Ptr != v5->_Left || _Last._Ptr != v5 )
  {
    for ( ; _First._Ptr != _Last._Ptr; v6 = _First._Ptr )
    {
      v8._Ptr = v6;
      if ( !v6->_Isnil )
      {
        v9 = v6->_Right;
        if ( v9->_Isnil )
        {
          for ( i = v6->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v6 != i->_Right )
              break;
            v6 = i;
          }
          _First._Ptr = i;
        }
        else
        {
          v10 = v6->_Right;
          for ( j = v9->_Left; !j->_Isnil; j = j->_Left )
            v10 = j;
          _First._Ptr = v10;
        }
      }
      std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::erase(
        v4,
        &v13,
        v8);
    }
    v7 = result;
    result->_Ptr = v6;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::clear(v4);
    v7 = result;
    result->_Ptr = v4->_Myhead->_Left;
  }
  return v7;
}

//----- (00678BC0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::erase(std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > _Last)
{
  std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v6; // ecx@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *v7; // eax@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > v8; // edx@5
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v9; // eax@6
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v10; // ecx@7
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *j; // eax@7
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *i; // eax@10
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > v13; // [sp+4h] [bp-4h]@14

  v4 = this;
  v5 = this->_Myhead;
  v6 = _First._Ptr;
  if ( _First._Ptr != v5->_Left || _Last._Ptr != v5 )
  {
    for ( ; _First._Ptr != _Last._Ptr; v6 = _First._Ptr )
    {
      v8._Ptr = v6;
      if ( !v6->_Isnil )
      {
        v9 = v6->_Right;
        if ( v9->_Isnil )
        {
          for ( i = v6->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v6 != i->_Right )
              break;
            v6 = i;
          }
          _First._Ptr = i;
        }
        else
        {
          v10 = v6->_Right;
          for ( j = v9->_Left; !j->_Isnil; j = j->_Left )
            v10 = j;
          _First._Ptr = v10;
        }
      }
      std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::erase(
        v4,
        &v13,
        v8);
    }
    v7 = result;
    result->_Ptr = v6;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::clear(v4);
    v7 = result;
    result->_Ptr = v4->_Myhead->_Left;
  }
  return v7;
}

//----- (00678C60) --------------------------------------------------------
std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > *__thiscall std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::erase(std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > *this, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > _Where)
{
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v3; // ebx@3
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v4; // edi@4
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v5; // eax@7
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v6; // esi@8
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v7; // eax@10
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node **v8; // ebx@15
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v9; // eax@17
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v10; // ebx@20
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v11; // ecx@29
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v12; // ecx@31
  char v13; // cl@34
  std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *i; // ecx@36
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v15; // eax@38
  NiAVObject *v16; // esi@59
  unsigned int v17; // eax@63
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > *v18; // eax@65
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *_Erasednode; // [sp+0h] [bp-8h]@3
  std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *v20; // [sp+4h] [bp-4h]@1

  v20 = (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)this;
  if ( _Where._Ptr->_Isnil )
    std::_Xout_of_range("invalid map/set<T> iterator");
  v3 = _Where._Ptr;
  _Erasednode = _Where._Ptr;
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<Effect *,std::less<Effect *>,std::allocator<Effect *>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >,std::_Iterator_base0> *)&_Where);
  if ( v3->_Left->_Isnil )
  {
    v4 = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v3->_Right;
LABEL_8:
    v6 = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v3->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v7 = v20->_Myhead;
    if ( (std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *)v7->_Parent == v3 )
    {
      v7->_Parent = v4;
    }
    else if ( (std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *)v6->_Left == v3 )
    {
      v6->_Left = v4;
    }
    else
    {
      v6->_Right = v4;
    }
    v8 = &v20->_Myhead->_Left;
    if ( (std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *)*v8 == _Erasednode )
    {
      if ( v4->_Isnil )
        v9 = v6;
      else
        v9 = std::_Tree_val<std::_Tset_traits<Effect *,std::less<Effect *>,std::allocator<Effect *>,0>>::_Min(v4);
      *v8 = v9;
    }
    v10 = v20->_Myhead;
    if ( (std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *)v10->_Right == _Erasednode )
    {
      if ( v4->_Isnil )
        v10->_Right = v6;
      else
        v10->_Right = std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Max(v4);
    }
    goto LABEL_35;
  }
  if ( v3->_Right->_Isnil )
  {
    v4 = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v3->_Left;
    goto LABEL_8;
  }
  v5 = _Where._Ptr;
  v4 = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)_Where._Ptr->_Right;
  if ( _Where._Ptr == v3 )
    goto LABEL_8;
  v3->_Left->_Parent = _Where._Ptr;
  v5->_Left = v3->_Left;
  if ( v5 == v3->_Right )
  {
    v6 = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v5;
  }
  else
  {
    v6 = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v5->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v6->_Left = v4;
    v5->_Right = v3->_Right;
    v3->_Right->_Parent = v5;
  }
  v11 = v20->_Myhead;
  if ( (std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *)v11->_Parent == v3 )
  {
    v11->_Parent = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v5;
  }
  else
  {
    v12 = v3->_Parent;
    if ( v12->_Left == v3 )
      v12->_Left = v5;
    else
      v12->_Right = v5;
  }
  v5->_Parent = v3->_Parent;
  v13 = v5->_Color;
  v5->_Color = v3->_Color;
  v3->_Color = v13;
LABEL_35:
  if ( _Erasednode->_Color == 1 )
  {
    for ( i = v20; v4 != i->_Myhead->_Parent; v6 = v6->_Parent )
    {
      if ( v4->_Color != 1 )
        break;
      v15 = v6->_Left;
      if ( v4 == v6->_Left )
      {
        v15 = v6->_Right;
        if ( !v15->_Color )
        {
          v15->_Color = 1;
          v6->_Color = 0;
          std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Lrotate(
            i,
            v6);
          v15 = v6->_Right;
          i = v20;
        }
        if ( v15->_Isnil )
          goto LABEL_53;
        if ( v15->_Left->_Color != 1 || v15->_Right->_Color != 1 )
        {
          if ( v15->_Right->_Color == 1 )
          {
            v15->_Left->_Color = 1;
            v15->_Color = 0;
            std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Rrotate(
              i,
              v15);
            v15 = v6->_Right;
            i = v20;
          }
          v15->_Color = v6->_Color;
          v6->_Color = 1;
          v15->_Right->_Color = 1;
          std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Lrotate(
            i,
            v6);
          break;
        }
      }
      else
      {
        if ( !v15->_Color )
        {
          v15->_Color = 1;
          v6->_Color = 0;
          std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Rrotate(
            i,
            v6);
          v15 = v6->_Left;
          i = v20;
        }
        if ( v15->_Isnil )
          goto LABEL_53;
        if ( v15->_Right->_Color != 1 || v15->_Left->_Color != 1 )
        {
          if ( v15->_Left->_Color == 1 )
          {
            v15->_Right->_Color = 1;
            v15->_Color = 0;
            std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Lrotate(
              i,
              v15);
            v15 = v6->_Left;
            i = v20;
          }
          v15->_Color = v6->_Color;
          v6->_Color = 1;
          v15->_Left->_Color = 1;
          std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Rrotate(
            i,
            v6);
          break;
        }
      }
      v15->_Color = 0;
LABEL_53:
      v4 = v6;
    }
    v4->_Color = 1;
  }
  v16 = _Erasednode->_Myval.m_pObject;
  if ( v16 && !InterlockedDecrement((volatile LONG *)&v16->m_uiRefCount) && v16 )
    v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
  operator delete(_Erasednode);
  v17 = v20->_Mysize;
  if ( v17 )
    v20->_Mysize = v17 - 1;
  v18 = result;
  result->_Ptr = _Where._Ptr;
  return v18;
}

//----- (00678EE0) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Erase(std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > *this, std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *_Rootnode)
{
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v2; // ebx@1
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *i; // esi@1
  NiAVObject *v4; // edi@2
  std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > *v5; // [sp+8h] [bp-4h]@1

  v2 = _Rootnode;
  v5 = this;
  for ( i = _Rootnode; !i->_Isnil; v2 = i )
  {
    std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Erase(
      v5,
      i->_Right);
    v4 = v2->_Myval.m_pObject;
    i = i->_Left;
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
    {
      if ( v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
    operator delete(v2);
  }
}

//----- (00678F40) --------------------------------------------------------
std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *__thiscall std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::erase(std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *this, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > _Last)
{
  std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *v4; // esi@1
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v6; // ecx@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *v7; // eax@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > v8; // edx@5
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v9; // eax@6
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v10; // ecx@7
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *j; // eax@7
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *i; // eax@10
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > v13; // [sp+4h] [bp-4h]@14

  v4 = this;
  v5 = this->_Myhead;
  v6 = _First._Ptr;
  if ( _First._Ptr != v5->_Left || _Last._Ptr != v5 )
  {
    for ( ; _First._Ptr != _Last._Ptr; v6 = _First._Ptr )
    {
      v8._Ptr = v6;
      if ( !v6->_Isnil )
      {
        v9 = v6->_Right;
        if ( v9->_Isnil )
        {
          for ( i = v6->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v6 != i->_Right )
              break;
            v6 = i;
          }
          _First._Ptr = i;
        }
        else
        {
          v10 = v6->_Right;
          for ( j = v9->_Left; !j->_Isnil; j = j->_Left )
            v10 = j;
          _First._Ptr = v10;
        }
      }
      std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0>>::erase(
        v4,
        &v13,
        v8);
    }
    v7 = result;
    result->_Ptr = v6;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,unsigned short>>,0>>::clear(v4);
    v7 = result;
    result->_Ptr = v4->_Myhead->_Left;
  }
  return v7;
}

//----- (00678FE0) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> >::_Node *_Node, bool _Leftish)
{
  std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> >::_Node *v4; // edx@1
  std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> > *v5; // edi@1
  std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> >::_Node *v6; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v7; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v8; // esi@1
  bool v9; // cl@1
  int v10; // ebx@2
  std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> >::_Node *v11; // ebx@10
  std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> >::_Node *v12; // edx@12
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> > >,bool> *v13; // eax@12
  std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> >::_Node *v14; // ecx@15
  stGlobalLightInfo *v15; // esi@16
  bool _Addleft; // [sp+Ch] [bp-4h]@1

  v4 = _Node;
  v5 = this;
  v6 = this->_Myhead;
  v7 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)v6->_Parent;
  v8 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)v6;
  v9 = 1;
  _Addleft = 1;
  if ( !v7->_Isnil )
  {
    v10 = _Node->_Myval.first;
    do
    {
      v8 = v7;
      if ( _Leftish )
        v9 = (const signed int)v7->_Myval.first >= v10;
      else
        v9 = v10 < (const signed int)v7->_Myval.first;
      _Addleft = v9;
      if ( v9 )
        v7 = v7->_Left;
      else
        v7 = v7->_Right;
    }
    while ( !v7->_Isnil );
  }
  v11 = (std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> >::_Node *)v8;
  *(_DWORD *)&_Leftish = v8;
  if ( v9 )
  {
    if ( (std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> >::_Node *)v8 == v5->_Myhead->_Left )
    {
      v12 = (std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> >::_Node *)std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Insert((std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)v5, (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *)&_Leftish, 1, v8, (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)_Node)->_Ptr;
      v13 = result;
      result->first._Ptr = v12;
      result->second = 1;
      return v13;
    }
    std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,GuildNameCache::GuildNameStorage *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,GuildNameCache::GuildNameStorage *>>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&_Leftish);
    v11 = (std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> >::_Node *)_Leftish;
    v4 = _Node;
  }
  if ( v11->_Myval.first >= v4->_Myval.first )
  {
    v15 = v4->_Myval.second.m_pObject;
    if ( v15 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) )
      {
        if ( v15 )
          v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
      }
      v4 = _Node;
    }
    operator delete(v4);
    v13 = result;
    result->first._Ptr = v11;
    result->second = 0;
  }
  else
  {
    v14 = (std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> >::_Node *)std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Insert((std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)v5, (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *)&_Leftish, _Addleft, v8, (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)v4)->_Ptr;
    v13 = result;
    result->first._Ptr = v14;
    result->second = 1;
  }
  return v13;
}

//----- (006790E0) --------------------------------------------------------
void __cdecl std::_Sort_heap<NiGeometry * *,TextureSorter>(NiGeometry **_First, NiGeometry **_Last)
{
  signed int v2; // eax@1
  NiGeometry *v3; // ecx@2
  int v4; // edi@2

  v2 = (char *)_Last - (char *)_First;
  if ( (signed int)(((char *)_Last - (char *)_First) & 0xFFFFFFFC) > 4 )
  {
    do
    {
      v3 = *_First;
      _Last = *(NiGeometry ***)((char *)_First + v2 - 4);
      *(NiGeometry **)((char *)_First + v2 - 4) = v3;
      v4 = v2 - 4;
      std::_Adjust_heap<NiGeometry * *,int,NiGeometry *,TextureSorter>(_First, 0, (v2 - 4) >> 2, (NiGeometry **)&_Last);
      v2 = v4;
    }
    while ( (signed int)(v4 & 0xFFFFFFFC) > 4 );
  }
}

//----- (00679130) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::erase(std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > _Where)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v3; // ebx@3
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v4; // edi@4
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v5; // eax@7
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v6; // esi@8
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v7; // eax@10
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node **v8; // ebx@15
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v9; // eax@17
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v10; // ebx@20
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v11; // ecx@29
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v12; // ecx@31
  char v13; // cl@34
  std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *v14; // ecx@36
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v15; // eax@38
  NiControllerSequence *v16; // esi@59
  unsigned int v17; // eax@63
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *v18; // eax@65
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *_Erasednode; // [sp+0h] [bp-8h]@3
  std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *v20; // [sp+4h] [bp-4h]@1

  v20 = this;
  if ( _Where._Ptr->_Isnil )
    std::_Xout_of_range("invalid map/set<T> iterator");
  v3 = _Where._Ptr;
  _Erasednode = _Where._Ptr;
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const,int>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&_Where);
  if ( v3->_Left->_Isnil )
  {
    v4 = (std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *)v3->_Right;
LABEL_8:
    v6 = (std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *)v3->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v7 = v20->_Myhead;
    if ( v7->_Parent == v3 )
    {
      v7->_Parent = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)v4;
    }
    else if ( (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)v6->_Left == v3 )
    {
      v6->_Left = v4;
    }
    else
    {
      v6->_Right = v4;
    }
    v8 = &v20->_Myhead->_Left;
    if ( *v8 == _Erasednode )
    {
      if ( v4->_Isnil )
        v9 = v6;
      else
        v9 = std::_Tree_val<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Min(v4);
      *v8 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)v9;
    }
    v10 = v20->_Myhead;
    if ( v10->_Right == _Erasednode )
    {
      if ( v4->_Isnil )
        v10->_Right = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)v6;
      else
        v10->_Right = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int>>,0>>::_Max(v4);
    }
    goto LABEL_35;
  }
  if ( v3->_Right->_Isnil )
  {
    v4 = (std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *)v3->_Left;
    goto LABEL_8;
  }
  v5 = _Where._Ptr;
  v4 = (std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *)_Where._Ptr->_Right;
  if ( _Where._Ptr == v3 )
    goto LABEL_8;
  v3->_Left->_Parent = _Where._Ptr;
  v5->_Left = v3->_Left;
  if ( v5 == v3->_Right )
  {
    v6 = (std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *)v5;
  }
  else
  {
    v6 = (std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *)v5->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v6->_Left = v4;
    v5->_Right = v3->_Right;
    v3->_Right->_Parent = v5;
  }
  v11 = v20->_Myhead;
  if ( v11->_Parent == v3 )
  {
    v11->_Parent = v5;
  }
  else
  {
    v12 = v3->_Parent;
    if ( v12->_Left == v3 )
      v12->_Left = v5;
    else
      v12->_Right = v5;
  }
  v5->_Parent = v3->_Parent;
  v13 = v5->_Color;
  v5->_Color = v3->_Color;
  v3->_Color = v13;
LABEL_35:
  if ( _Erasednode->_Color == 1 )
  {
    v14 = (std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *)v20;
    if ( v4 != (std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *)v20->_Myhead->_Parent )
    {
      do
      {
        if ( v4->_Color != 1 )
          break;
        v15 = v6->_Left;
        if ( v4 == v6->_Left )
        {
          v15 = v6->_Right;
          if ( !v15->_Color )
          {
            v15->_Color = 1;
            v6->_Color = 0;
            std::_Tree<std::_Tmap_traits<enum  OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const,EffectViewInfo *>>> *,std::less<enum  OscTarget>,std::allocator<std::pair<enum  OscTarget const,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const,EffectViewInfo *>>> *>>,0>>::_Lrotate(
              v14,
              v6);
            v15 = v6->_Right;
            v14 = (std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *)v20;
          }
          if ( v15->_Isnil )
            goto LABEL_53;
          if ( v15->_Left->_Color != 1 || v15->_Right->_Color != 1 )
          {
            if ( v15->_Right->_Color == 1 )
            {
              v15->_Left->_Color = 1;
              v15->_Color = 0;
              std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::_Rrotate(
                v14,
                v15);
              v15 = v6->_Right;
              v14 = (std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *)v20;
            }
            v15->_Color = v6->_Color;
            v6->_Color = 1;
            v15->_Right->_Color = 1;
            std::_Tree<std::_Tmap_traits<enum  OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const,EffectViewInfo *>>> *,std::less<enum  OscTarget>,std::allocator<std::pair<enum  OscTarget const,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const,EffectViewInfo *>>> *>>,0>>::_Lrotate(
              v14,
              v6);
            break;
          }
        }
        else
        {
          if ( !v15->_Color )
          {
            v15->_Color = 1;
            v6->_Color = 0;
            std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::_Rrotate(
              v14,
              v6);
            v15 = v6->_Left;
            v14 = (std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *)v20;
          }
          if ( v15->_Isnil )
            goto LABEL_53;
          if ( v15->_Right->_Color != 1 || v15->_Left->_Color != 1 )
          {
            if ( v15->_Left->_Color == 1 )
            {
              v15->_Right->_Color = 1;
              v15->_Color = 0;
              std::_Tree<std::_Tmap_traits<enum  OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const,EffectViewInfo *>>> *,std::less<enum  OscTarget>,std::allocator<std::pair<enum  OscTarget const,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const,EffectViewInfo *>>> *>>,0>>::_Lrotate(
                v14,
                v15);
              v15 = v6->_Left;
              v14 = (std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *)v20;
            }
            v15->_Color = v6->_Color;
            v6->_Color = 1;
            v15->_Left->_Color = 1;
            std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::_Rrotate(
              v14,
              v6);
            break;
          }
        }
        v15->_Color = 0;
LABEL_53:
        v4 = v6;
        v6 = v6->_Parent;
      }
      while ( v4 != v14->_Myhead->_Parent );
    }
    v4->_Color = 1;
  }
  v16 = _Erasednode->_Myval.second.m_pObject;
  if ( v16 && !InterlockedDecrement((volatile LONG *)&v16->m_uiRefCount) && v16 )
    v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
  operator delete(_Erasednode);
  v17 = v20->_Mysize;
  if ( v17 )
    v20->_Mysize = v17 - 1;
  v18 = result;
  result->_Ptr = _Where._Ptr;
  return v18;
}

//----- (006793B0) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::_Erase(std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *_Rootnode)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v2; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *i; // esi@1
  NiControllerSequence *v4; // edi@2
  std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *v5; // [sp+8h] [bp-4h]@1

  v2 = _Rootnode;
  v5 = this;
  for ( i = _Rootnode; !i->_Isnil; v2 = i )
  {
    std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::_Erase(
      v5,
      i->_Right);
    v4 = v2->_Myval.second.m_pObject;
    i = i->_Left;
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
    {
      if ( v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
    operator delete(v2);
  }
}

//----- (00679410) --------------------------------------------------------
NiTextureAccumulator *__thiscall NiTextureAccumulator::`vector deleting destructor'(NiTextureAccumulator *this, unsigned int a2)
{
  NiTextureAccumulator *v2; // edi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiTextureAccumulator::`vftable';
  std::vector<PgWinText *,std::allocator<PgWinText *>>::resize(
    (std::vector<NiTimeController *,std::allocator<NiTimeController *> > *)&this->m_vecItem,
    0);
  if ( v2->m_vecItem._Myfirst )
    operator delete(v2->m_vecItem._Myfirst);
  v2->m_vecItem._Myfirst = 0;
  v2->m_vecItem._Mylast = 0;
  v2->m_vecItem._Myend = 0;
  v2->vfptr = (NiRefObjectVtbl *)&NiAccumulator::`vftable';
  NiRefObject::~NiRefObject((CPostProcessEffect *)v2);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BC34C: using guessed type int (__thiscall *NiAccumulator::`vftable')(void *p, char);
// 9BC3BC: using guessed type int (__thiscall *NiTextureAccumulator::`vftable')(void *p, char);

//----- (006794B0) --------------------------------------------------------
std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > *__thiscall std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::erase(std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > *this, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > _Last)
{
  std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > *v4; // esi@1
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v6; // ecx@1
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node **v7; // ecx@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > *v8; // eax@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > v9; // edx@5
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v10; // eax@6
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v11; // ecx@7
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *j; // eax@7
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *i; // eax@10
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > v14; // [sp+4h] [bp-4h]@14

  v4 = this;
  v5 = this->_Myhead;
  v6 = _First._Ptr;
  if ( _First._Ptr != v5->_Left || _Last._Ptr != v5 )
  {
    for ( ; _First._Ptr != _Last._Ptr; v6 = _First._Ptr )
    {
      v9._Ptr = v6;
      if ( !v6->_Isnil )
      {
        v10 = v6->_Right;
        if ( v10->_Isnil )
        {
          for ( i = v6->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v6 != i->_Right )
              break;
            v6 = i;
          }
          _First._Ptr = i;
        }
        else
        {
          v11 = v6->_Right;
          for ( j = v10->_Left; !j->_Isnil; j = j->_Left )
            v11 = j;
          _First._Ptr = v11;
        }
      }
      std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::erase(
        v4,
        &v14,
        v9);
    }
    v8 = result;
    result->_Ptr = v6;
  }
  else
  {
    std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Erase(
      v4,
      v5->_Parent);
    v4->_Myhead->_Parent = v4->_Myhead;
    v4->_Myhead->_Left = v4->_Myhead;
    v4->_Myhead->_Right = v4->_Myhead;
    v7 = &v4->_Myhead->_Left;
    v8 = result;
    v4->_Mysize = 0;
    result->_Ptr = *v7;
  }
  return v8;
}

//----- (00679570) --------------------------------------------------------
void __cdecl std::_Dest_val<std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>(std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > > *_Alval, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > *_Pdest)
{
  INsFile_NodeCreater *v2; // esi@1

  v2 = _Pdest->second.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  if ( _Pdest->first._Myres >= 0x10 )
    operator delete(_Pdest->first._Bx._Ptr);
  _Pdest->first._Myres = 15;
  _Pdest->first._Mysize = 0;
  _Pdest->first._Bx._Buf[0] = 0;
}

//----- (00679600) --------------------------------------------------------
void __thiscall std::map<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>>::~map<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>>(std::map<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> > > *this)
{
  std::map<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> > > *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v2; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > v3; // ST04_4@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > result; // [sp+8h] [bp-14h]@1
  std::map<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> > > *v5; // [sp+Ch] [bp-10h]@1
  int v6; // [sp+18h] [bp-4h]@1

  v1 = this;
  v5 = this;
  v2 = this->_Myhead;
  v3._Ptr = v2->_Left;
  v6 = 0;
  std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *)&this->comp,
    &result,
    v3,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > >)v2);
  operator delete(v1->_Myhead);
}

//----- (00679660) --------------------------------------------------------
void __thiscall std::map<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>>::~map<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>>(std::map<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> > > *this)
{
  std::map<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> > > *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v2; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > v3; // ST04_4@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > result; // [sp+8h] [bp-14h]@1
  std::map<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> > > *v5; // [sp+Ch] [bp-10h]@1
  int v6; // [sp+18h] [bp-4h]@1

  v1 = this;
  v5 = this;
  v2 = this->_Myhead;
  v3._Ptr = v2->_Left;
  v6 = 0;
  std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *)&this->comp,
    &result,
    v3,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > >)v2);
  operator delete(v1->_Myhead);
}

//----- (006796C0) --------------------------------------------------------
void __cdecl std::_Sort<NiGeometry * *,int,TextureSorter>(NiGeometry **_First, NiGeometry **_Last, int _Ideal, TextureSorter _Pred)
{
  NiGeometry **v4; // ebx@1
  NiGeometry **v5; // edi@1
  int v6; // eax@1
  signed int v7; // esi@2
  std::pair<NiGeometry * *,NiGeometry * *> _Mid; // [sp+Ch] [bp-8h]@4

  v4 = _First;
  v5 = _Last;
  v6 = _Last - _First;
  if ( v6 <= 32 )
    goto LABEL_8;
  v7 = _Ideal;
  while ( v7 > 0 )
  {
    std::_Unguarded_partition<NiGeometry * *,TextureSorter>(&_Mid, v4, v5);
    v7 = v7 / 2 / 2 + v7 / 2;
    if ( (signed int)((unsigned int)((char *)_Mid.first - (char *)v4) & 0xFFFFFFFC) >= (signed int)(((char *)v5 - (char *)_Mid.second) & 0xFFFFFFFC) )
    {
      std::_Sort<NiGeometry * *,int,TextureSorter>(_Mid.second, v5, v7, _Pred);
      v5 = _Mid.first;
    }
    else
    {
      std::_Sort<NiGeometry * *,int,TextureSorter>(v4, _Mid.first, v7, _Pred);
      v4 = _Mid.second;
    }
    v6 = v5 - v4;
    if ( v6 <= 32 )
      goto LABEL_8;
  }
  if ( v6 <= 32 )
  {
LABEL_8:
    if ( v6 > 1 )
      std::_Insertion_sort1<NiGeometry * *,TextureSorter,NiGeometry *>(v4, v5);
  }
  else
  {
    if ( (signed int)(((char *)v5 - (char *)v4) & 0xFFFFFFFC) > 4 )
      std::_Make_heap<NiGeometry * *,int,NiGeometry *,TextureSorter>(v4, v5, _Pred);
    std::_Sort_heap<NiGeometry * *,TextureSorter>(v4, v5);
  }
}

//----- (006797B0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,NiPointer<NiNode>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,NiPointer<NiNode>>>,0>>::erase(std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > _Last)
{
  std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v6; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node **v7; // ecx@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *v8; // eax@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > v9; // edx@5
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v10; // eax@6
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v11; // ecx@7
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *j; // eax@7
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *i; // eax@10
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > v14; // [sp+4h] [bp-4h]@14

  v4 = this;
  v5 = this->_Myhead;
  v6 = _First._Ptr;
  if ( _First._Ptr != v5->_Left || _Last._Ptr != v5 )
  {
    for ( ; _First._Ptr != _Last._Ptr; v6 = _First._Ptr )
    {
      v9._Ptr = v6;
      if ( !v6->_Isnil )
      {
        v10 = v6->_Right;
        if ( v10->_Isnil )
        {
          for ( i = v6->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v6 != i->_Right )
              break;
            v6 = i;
          }
          _First._Ptr = i;
        }
        else
        {
          v11 = v6->_Right;
          for ( j = v10->_Left; !j->_Isnil; j = j->_Left )
            v11 = j;
          _First._Ptr = v11;
        }
      }
      std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::erase(
        v4,
        &v14,
        v9);
    }
    v8 = result;
    result->_Ptr = v6;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::_Erase(
      v4,
      v5->_Parent);
    v4->_Myhead->_Parent = v4->_Myhead;
    v4->_Myhead->_Left = v4->_Myhead;
    v4->_Myhead->_Right = v4->_Myhead;
    v7 = &v4->_Myhead->_Left;
    v8 = result;
    v4->_Mysize = 0;
    result->_Ptr = *v7;
  }
  return v8;
}

//----- (00679870) --------------------------------------------------------
void __thiscall std::set<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>>::~set<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>>(std::set<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> > > *this)
{
  std::set<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> > > *v1; // esi@1
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v2; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > v3; // ST04_4@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > result; // [sp+8h] [bp-14h]@1
  std::set<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> > > *v5; // [sp+Ch] [bp-10h]@1
  int v6; // [sp+18h] [bp-4h]@1

  v1 = this;
  v5 = this;
  v2 = this->_Myhead;
  v3._Ptr = v2->_Left;
  v6 = 0;
  std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::erase(
    (std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > *)&this->comp,
    &result,
    v3,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > >)v2);
  operator delete(v1->_Myhead);
}

//----- (006798D0) --------------------------------------------------------
void __thiscall mhResTableManager::mhResTableManager(mhResTableManager *this)
{
  mhResTableManager *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const ,mhResTableElement *> >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> >::_Node *v3; // eax@2
  std::exception v4; // [sp+10h] [bp-30h]@6
  std::exception pExceptionObject; // [sp+1Ch] [bp-24h]@4
  mhResTableManager *v6; // [sp+28h] [bp-18h]@1
  char *v7; // [sp+2Ch] [bp-14h]@6
  char *_What; // [sp+30h] [bp-10h]@4
  int v9; // [sp+3Ch] [bp-4h]@2

  v1 = this;
  v6 = this;
  this->m_mapResModel._Mysize = 0;
  v2 = (std::_Tree_nod<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const ,mhResTableElement *> >,0> >::_Node *)operator new(0x18u);
  if ( !v2 )
  {
    v7 = 0;
    std::exception::exception(&v4, (const char *const *)&v7);
    v4.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&v4, &_TI2_AVbad_alloc_std__);
  }
  v1->m_mapResModel._Myhead = v2;
  v2->_Left = v2;
  v1->m_mapResModel._Myhead->_Parent = v1->m_mapResModel._Myhead;
  v1->m_mapResModel._Myhead->_Right = v1->m_mapResModel._Myhead;
  v1->m_mapResModel._Myhead->_Color = 1;
  v1->m_mapResModel._Myhead->_Isnil = 1;
  v9 = 0;
  v1->m_mapResTex._Mysize = 0;
  v3 = (std::_Tree_nod<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> >::_Node *)operator new(0x18u);
  if ( !v3 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_mapResTex._Myhead = v3;
  v3->_Left = v3;
  v1->m_mapResTex._Myhead->_Parent = v1->m_mapResTex._Myhead;
  v1->m_mapResTex._Myhead->_Right = v1->m_mapResTex._Myhead;
  v1->m_mapResTex._Myhead->_Color = 1;
  v1->m_mapResTex._Myhead->_Isnil = 1;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (006799D0) --------------------------------------------------------
void __thiscall MiniHouseIndoor::MiniHouseIndoor(MiniHouseIndoor *this)
{
  MiniHouseIndoor *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiAmbientLight> > >,0> >::_Node *v3; // eax@2
  std::_Tree_nod<std::_Tmap_traits<enum mhUIID,PgWinFrame *,std::less<enum mhUIID>,std::allocator<std::pair<enum mhUIID const ,PgWinFrame *> >,0> >::_Node *v4; // eax@3
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *v5; // eax@4
  NiNode *v6; // edi@5
  std::exception v7; // [sp+10h] [bp-30h]@13
  std::exception pExceptionObject; // [sp+1Ch] [bp-24h]@11
  MiniHouseIndoor *v9; // [sp+28h] [bp-18h]@1
  char *v10; // [sp+2Ch] [bp-14h]@13
  char *_What; // [sp+30h] [bp-10h]@11
  int v12; // [sp+3Ch] [bp-4h]@1

  v1 = this;
  v9 = this;
  mhResTableManager::mhResTableManager(&this->m_ManagerMediator.m_ResTableManager);
  v12 = 0;
  v1->m_ManagerMediator.m_ObjManager.m_mapObject._Mysize = 0;
  v2 = (std::_Tree_nod<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> >::_Node *)operator new(0x18u);
  if ( !v2 )
  {
    v10 = 0;
    std::exception::exception(&v7, (const char *const *)&v10);
    v7.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&v7, &_TI2_AVbad_alloc_std__);
  }
  v1->m_ManagerMediator.m_ObjManager.m_mapObject._Myhead = v2;
  v2->_Left = v2;
  v1->m_ManagerMediator.m_ObjManager.m_mapObject._Myhead->_Parent = v1->m_ManagerMediator.m_ObjManager.m_mapObject._Myhead;
  v1->m_ManagerMediator.m_ObjManager.m_mapObject._Myhead->_Right = v1->m_ManagerMediator.m_ObjManager.m_mapObject._Myhead;
  v1->m_ManagerMediator.m_ObjManager.m_mapObject._Myhead->_Color = 1;
  v1->m_ManagerMediator.m_ObjManager.m_mapObject._Myhead->_Isnil = 1;
  NiCollisionGroup::NiCollisionGroup(&v1->m_ManagerMediator.m_CollisionManager.m_pkCollisionGroup);
  v1->m_GameMainConnectMgr = 0;
  v1->m_RoomInfo.m_spRoomNiNode = 0;
  v1->m_RoomInfo.m_SelectedNodeName._Myres = 15;
  v1->m_RoomInfo.m_SelectedNodeName._Mysize = 0;
  v12 = 2;
  v1->m_RoomInfo.m_SelectedNodeName._Bx._Buf[0] = 0;
  v1->m_eState = 0;
  v1->m_spRootScene.m_pObject = 0;
  v1->m_spNormalScene.m_pObject = 0;
  v1->m_spAbStateEffScene.m_pObject = 0;
  v1->m_PickedObj = 0;
  LOBYTE(v12) = 6;
  v1->m_mapLight._Mysize = 0;
  v3 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiAmbientLight> > >,0> >::_Node *)operator new(0x30u);
  if ( !v3 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_mapLight._Myhead = v3;
  v3->_Left = v3;
  v1->m_mapLight._Myhead->_Parent = v1->m_mapLight._Myhead;
  v1->m_mapLight._Myhead->_Right = v1->m_mapLight._Myhead;
  v1->m_mapLight._Myhead->_Color = 1;
  v1->m_mapLight._Myhead->_Isnil = 1;
  LOBYTE(v12) = 7;
  v1->m_mapUIGroup._Mysize = 0;
  v4 = (std::_Tree_nod<std::_Tmap_traits<enum mhUIID,PgWinFrame *,std::less<enum mhUIID>,std::allocator<std::pair<enum mhUIID const ,PgWinFrame *> >,0> >::_Node *)operator new(0x18u);
  if ( !v4 )
  {
    v10 = 0;
    std::exception::exception(&v7, (const char *const *)&v10);
    v7.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&v7, &_TI2_AVbad_alloc_std__);
  }
  v1->m_mapUIGroup._Myhead = v4;
  v4->_Left = v4;
  v1->m_mapUIGroup._Myhead->_Parent = v1->m_mapUIGroup._Myhead;
  v1->m_mapUIGroup._Myhead->_Right = v1->m_mapUIGroup._Myhead;
  v1->m_mapUIGroup._Myhead->_Color = 1;
  v1->m_mapUIGroup._Myhead->_Isnil = 1;
  LOBYTE(v12) = 8;
  v1->m_mapCharLev._Mysize = 0;
  v5 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *)operator new(0x14u);
  if ( !v5 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_mapCharLev._Myhead = v5;
  v5->_Left = v5;
  v1->m_mapCharLev._Myhead->_Parent = v1->m_mapCharLev._Myhead;
  v1->m_mapCharLev._Myhead->_Right = v1->m_mapCharLev._Myhead;
  v1->m_mapCharLev._Myhead->_Color = 1;
  v1->m_mapCharLev._Myhead->_Isnil = 1;
  *(_DWORD *)&v1->m_PickedCharhWnd = 0xFFFF;
  v1->m_bAskReturnToInvState = 0;
  v1->m_iReturnToInvItemID = -1;
  v1->m_spMsgBox.m_pObject = 0;
  v1->m_spObjEffMsg.m_pObject = 0;
  v1->m_FocusObj.m_Object = 0;
  v1->m_FocusObj.m_eInfo = 0;
  v1->m_spFocusObjEff.m_pObject = 0;
  v1->m_mhCharEmotionInfo.TargetObjID = -1;
  *(_WORD *)&v1->m_mhCharEmotionInfo.ActPos = -1;
  v1->m_mhCharEmotionInfo.EmotionInfo = 0;
  v6 = v1->m_spFocusObjEff.m_pObject;
  LOBYTE(v12) = 12;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v1->m_spFocusObjEff.m_pObject = 0;
  }
  v1->m_RevChangeEndure.e = 1;
  v1->m_RevChangeEndure.iCandidateObjID = -1;
  v1->m_RepairObjID = -1;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00679CC0) --------------------------------------------------------
void __thiscall World::SetCameraZoomRatePerTick(World *this, float fRate)
{
  CameraCtrl::SetZoomRatePerTick(&this->m_kCameraCtrl, fRate);
}

//----- (00679CE0) --------------------------------------------------------
void __thiscall World::SetCameraZoomMin(World *this, float fMin)
{
  CameraCtrl::SetZoomMin(&this->m_kCameraCtrl, fMin);
}

//----- (00679D00) --------------------------------------------------------
void __thiscall World::SetCameraZoomMax(World *this, float fMax)
{
  CameraCtrl *v2; // esi@1

  v2 = &this->m_kCameraCtrl;
  CameraCtrl::SetZoomMax(&this->m_kCameraCtrl, fMax);
  if ( fMax < CameraCtrl::GetZoom(v2) )
    CameraCtrl::SetZoom(v2, fMax);
}

//----- (00679D50) --------------------------------------------------------
void __thiscall World::SetCameraZoomDef(World *this, float fDef)
{
  CameraCtrl::SetZoomDef(&this->m_kCameraCtrl, fDef);
}

//----- (00679D70) --------------------------------------------------------
void __thiscall World::SetControllerMode(World *this, bool bControllerMode)
{
  this->m_bControllerMode = bControllerMode;
}

//----- (00679D80) --------------------------------------------------------
void __thiscall World::SetAutoCameraMode(World *this, bool bAutoCameraMode)
{
  this->m_bAutoCameraMode = bAutoCameraMode;
}

//----- (00679D90) --------------------------------------------------------
void __thiscall World::SetCameraPosDelta(World *this, NiPoint3 kCameraPosDelta)
{
  this->m_kCameraPosDelta = kCameraPosDelta;
}

//----- (00679DC0) --------------------------------------------------------
void __stdcall World::SetCameraAngleDeltaBoundary(float fAngle, float *pkVar)
{
  double v3; // st7@2
  double v4; // st6@2
  double v5; // st4@4
  double v6; // st4@5
  double v7; // rt1@5
  double v8; // rt2@6
  double v9; // st4@6
  double v10; // st6@6
  bool v11; // c0@6
  bool v12; // c3@6
  double v13; // rtt@6
  double v14; // st4@6
  double v15; // st7@6
  double v16; // st4@7
  float fAnglea; // [sp+8h] [bp+8h]@5

  if ( pkVar )
  {
    v3 = fAngle;
    v4 = 0.0;
    if ( fAngle >= 0.0 && v3 <= 360.0 )
    {
      *pkVar = fAngle;
      return;
    }
    v5 = 360.0;
    while ( 1 )
    {
      v8 = v5;
      v9 = v4;
      v10 = v8;
      v11 = v9 < v3;
      v12 = v9 == v3;
      v13 = v9;
      v14 = v3;
      v15 = v13;
      if ( v11 || v12 )
      {
        if ( v14 <= 360.0 )
        {
          *pkVar = v14;
          return;
        }
        v16 = v14 - v10;
      }
      else
      {
        v16 = v14 + v10;
      }
      fAnglea = v16;
      v6 = v15;
      v3 = fAnglea;
      v7 = v6;
      v5 = v10;
      v4 = v7;
    }
  }
}

//----- (00679E30) --------------------------------------------------------
void __thiscall World::SetCameraPosDist(World *this, float Dist)
{
  this->m_fDist = Dist;
}

//----- (00679E40) --------------------------------------------------------
NiPoint3 *__thiscall World::GetCameraLookAtPos(World *this)
{
  return &this->m_kLookAtPos;
}

//----- (00679E50) --------------------------------------------------------
void __thiscall World::AddCameraRotate(World *this, int iX, int iY)
{
  CameraCtrl::AddRotate(&this->m_kCameraCtrl, iX, iY);
}

//----- (00679E60) --------------------------------------------------------
void __thiscall World::AddCameraZoom(World *this, int iZoom)
{
  CameraCtrl::AddZoom(&this->m_kCameraCtrl, iZoom);
}

//----- (00679E70) --------------------------------------------------------
void __thiscall World::SetCameraMove(World *this, bool b)
{
  this->m_bCameraMove = b;
}

//----- (00679E80) --------------------------------------------------------
void __thiscall World::SetCameraAngleDeltaLR(World *this, float AngleLR)
{
  if ( -1.0 == AngleLR )
    this->m_fAngleLRDelta = -1.0;
  else
    World::SetCameraAngleDeltaBoundary(AngleLR, &this->m_fAngleLRDelta);
}

//----- (00679EC0) --------------------------------------------------------
void __thiscall World::SetCameraAngleDeltaUD(World *this, float AngleUD)
{
  if ( -1.0 == AngleUD )
    this->m_fAngleUDDelta = -1.0;
  else
    World::SetCameraAngleDeltaBoundary(AngleUD, &this->m_fAngleUDDelta);
}

//----- (00679F00) --------------------------------------------------------
void __thiscall World::SetCameraJumpData(World *this, NiPoint3 kCameraPosDelta, float AngleLR, float AngleUD, float Dist)
{
  World *v5; // edx@1
  double v6; // st7@2
  int v7; // edx@6

  v5 = this;
  this->m_kCameraPosDelta = kCameraPosDelta;
  if ( -1.0 == AngleLR )
  {
    v6 = -1.0;
    this->m_fAngleLRDelta = -1.0;
  }
  else
  {
    World::SetCameraAngleDeltaBoundary(AngleLR, &this->m_fAngleLRDelta);
    v6 = -1.0;
  }
  if ( v6 == AngleUD )
  {
    v5->m_fAngleUDDelta = v6;
    v5->m_fDist = Dist;
  }
  else
  {
    World::SetCameraAngleDeltaBoundary(AngleUD, &v5->m_fAngleUDDelta);
    *(float *)(v7 + 572524) = Dist;
  }
}

//----- (00679FB0) --------------------------------------------------------
void __thiscall World::SetCameraFOV(World *this, float fFOV, float fScreenWidth, float fScreenHeight)
{
  double v4; // st7@1
  double v5; // st6@1
  double v6; // st5@1
  double v7; // st5@4
  double v8; // rt1@4
  double v9; // st6@4
  float fRight; // [sp+0h] [bp-4h]@1
  float fTop; // [sp+Ch] [bp+8h]@1
  float fTopa; // [sp+Ch] [bp+8h]@1
  float fTopb; // [sp+Ch] [bp+8h]@3
  float fTopc; // [sp+Ch] [bp+8h]@4
  float fTopd; // [sp+Ch] [bp+8h]@4

  this->m_fCameraFOV = fFOV;
  fTop = fFOV / 180.0 * 0.5 * NI_PI;
  fTopa = tan(fTop);
  v4 = fTopa;
  fRight = fTopa;
  v5 = fScreenWidth;
  v6 = fScreenHeight;
  if ( fScreenHeight >= (double)fScreenWidth )
  {
    fTopb = v4 * (v6 / v5);
    v4 = fTopb;
  }
  else
  {
    fRight = v5 / v6 * v4;
  }
  fTopc = -fRight;
  v7 = fTopc;
  this->m_kWorldFrustum.m_fLeft = fTopc;
  this->m_kWorldFrustum.m_fRight = fRight;
  v8 = fRight;
  this->m_kWorldFrustum.m_fTop = v4;
  fTopd = -v4;
  this->m_kWorldFrustum.m_fBottom = fTopd;
  this->m_kSkyFrustum.m_fBottom = fTopd;
  this->m_kSkyFrustum.m_fLeft = *(float *)&v7;
  this->m_kSkyFrustum.m_fRight = *(float *)&v8;
  v9 = v4;
  this->m_kSkyFrustum.m_fTop = *(float *)&v9;
  this->m_fNearPlaneRadius = (v8 + v8) * 7.5;
}
// 679FB0: could not find valid save-restore pair for esi
// B622CC: using guessed type const float NI_PI;

//----- (0067A080) --------------------------------------------------------
void __thiscall World::ImpactCamera(World *this, EffectViewInfo *ImpactInfo)
{
  if ( ImpactInfo )
    OscillationEx::Impact(&this->m_kCamOscillation, ImpactInfo, Timer::ms_fCurTime);
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0067A0B0) --------------------------------------------------------
void __thiscall World::ImpactCamera(World *this, float fAmplitude, float fCurTime)
{
  World *v3; // esi@1

  v3 = this;
  Oscillation::Impact((Oscillation *)&this->m_kCamOscillation.vfptr, fAmplitude, fCurTime);
  v3->m_kCamOscillation.m_fPeriod = 0.02;
  v3->m_kCamOscillation.m_fDampingMagnitude = 40.0;
}

//----- (0067A0F0) --------------------------------------------------------
void __thiscall World::AutoRotateCamera(World *this, float fMsDeltaX)
{
  World *v2; // esi@1
  int (*v3)(void); // edx@1
  int v4; // eax@1
  float v5; // ecx@1
  float v6; // edx@1
  float v7; // eax@1
  NiCamera *v8; // edi@1
  double v9; // st7@6
  float v10; // ST04_4@7
  float kWorldDir; // [sp+10h] [bp-40h]@1
  float kWorldDir_4; // [sp+14h] [bp-3Ch]@1
  NiPoint3 kMainCharDir; // [sp+1Ch] [bp-34h]@1
  NiPoint3 pos3Right; // [sp+28h] [bp-28h]@1
  NiPoint3 pos3Left; // [sp+34h] [bp-1Ch]@1
  float v16; // [sp+40h] [bp-10h]@1
  float v17; // [sp+44h] [bp-Ch]@1
  float fAngleUD; // [sp+48h] [bp-8h]@1
  float fAngle; // [sp+4Ch] [bp-4h]@1

  v2 = this;
  v3 = (int (*)(void))g_pkMainChar->vfptr[6].DeleteAbStateByAbstateIndex;
  fAngle = NI_PI / 180.0;
  fAngleUD = this->m_kCameraCtrl.m_fAngleUD;
  v4 = v3();
  v5 = *(float *)v4;
  v6 = *(float *)(v4 + 4);
  v7 = *(float *)(v4 + 8);
  v8 = v2->m_spCamera.m_pObject;
  fAngleUD = fAngleUD * fAngle;
  kMainCharDir.x = v5;
  kMainCharDir.y = v6;
  kMainCharDir.z = v7;
  fAngleUD = cos(fAngleUD);
  kWorldDir = v8->m_kWorld.m_Rotate.m_pEntry[0][0] / fAngleUD;
  kWorldDir_4 = v8->m_kWorld.m_Rotate.m_pEntry[1][0] / fAngleUD;
  *(double *)&pos3Right.y = kWorldDir_4;
  *(double *)&pos3Left.y = kWorldDir;
  fAngleUD = kWorldDir * v5 + kWorldDir_4 * v6 + v7 * 0.0;
  v16 = fAngleUD;
  fAngleUD = kMainCharDir.z * kMainCharDir.z + kMainCharDir.y * kMainCharDir.y + kMainCharDir.x * kMainCharDir.x;
  fAngleUD = sqrt(fAngleUD);
  v17 = fAngleUD;
  fAngleUD = *(double *)&pos3Left.y * *(double *)&pos3Left.y
           + *(double *)&pos3Right.y * *(double *)&pos3Right.y
           + 0.0 * 0.0;
  fAngleUD = sqrt(fAngleUD);
  v17 = fAngleUD * v17;
  v16 = v16 / v17;
  v16 = acos(v16);
  fAngle = v16 / fAngle;
  if ( fMsDeltaX >= (double)fAngle )
    fAngle = 0.0;
  if ( dword_B647A8 >= 1 || dword_B64784 >= 1 )
  {
    v2->m_dwOldTime = timeGetTime();
  }
  else
  {
    NiPoint3::UnitCross(&kMainCharDir, &pos3Right, &NiPoint3::UNIT_Z);
    NiPoint3::UnitCross(&NiPoint3::UNIT_Z, &pos3Left, &kMainCharDir);
    v16 = pos3Right.z * 0.0 + pos3Right.x * kWorldDir + pos3Right.y * kWorldDir_4;
    v17 = kWorldDir * pos3Left.x + kWorldDir_4 * pos3Left.y + 0.0 * pos3Left.z;
    if ( v17 > (double)v16 )
    {
      v9 = fMsDeltaX;
LABEL_7:
      v10 = v9;
      CameraCtrl::AutoRotate(&v2->m_kCameraCtrl, fAngle, v10);
      return;
    }
    if ( v17 < (double)v16 )
    {
      v9 = -fMsDeltaX;
      goto LABEL_7;
    }
  }
}
// B622CC: using guessed type const float NI_PI;
// B64784: using guessed type int dword_B64784;
// B647A8: using guessed type int dword_B647A8;

//----- (0067A300) --------------------------------------------------------
char __thiscall World::InitCamera(World *this, float fScreenWidth, float fScreenHeight)
{
  World *v3; // esi@1
  NiCamera *v4; // eax@1
  NiCamera *v5; // ebx@1
  NiCamera *v6; // eax@2
  NiCamera *v7; // edi@3
  NiCamera *v8; // eax@10
  NiNode *v9; // eax@10
  NiNode *v10; // eax@11
  NiNode *v11; // ebx@11
  NiNode *v12; // edi@13
  _BYTE ST28_12_20[12]; // ST28_12@20
  _BYTE v14[12]; // ST1C_12@20
  _BYTE v15[12]; // ST10_12@20
  float v16; // ecx@20
  float v17; // edx@20
  int v19; // [sp+18h] [bp-2Ch]@0
  int v20; // [sp+1Ch] [bp-28h]@0
  int v21; // [sp+20h] [bp-24h]@0
  int v22; // [sp+24h] [bp-20h]@0

  v3 = this;
  World::SetCameraFOV(this, this->m_fCameraFOV, fScreenWidth, fScreenHeight);
  v4 = (NiCamera *)operator new(0x128u);
  v5 = 0;
  if ( v4 )
  {
    NiCamera::NiCamera(v4);
    v5 = v6;
  }
  v7 = v3->m_spCamera.m_pObject;
  if ( v7 != v5 )
  {
    if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v3->m_spCamera.m_pObject = v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  }
  NiCamera::SetViewFrustum(v3->m_spCamera.m_pObject, &v3->m_kWorldFrustum);
  v8 = v3->m_spCamera.m_pObject;
  v8->m_kPort.m_left = 0.0;
  v8->m_kPort.m_right = 1.0;
  v8->m_kPort.m_top = 1.0;
  v8->m_kPort.m_bottom = 0.0;
  v3->m_pkRenderer = NiRenderer::ms_pkRenderer;
  v9 = (NiNode *)operator new(0xE8u);
  if ( v9 )
  {
    NiNode::NiNode(v9, 0);
    v11 = v10;
  }
  else
  {
    v11 = 0;
  }
  v12 = v3->m_spCameraShakeNode.m_pObject;
  if ( v12 != v11 )
  {
    if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
      v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
    v3->m_spCameraShakeNode.m_pObject = v11;
    if ( v11 )
      InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
  }
  ((void (__stdcall *)(NiCamera *, _DWORD, int, int, int, int, _DWORD, _DWORD, _DWORD))v3->m_spCameraShakeNode.m_pObject->vfptr[29].__vecDelDtor)(
    v3->m_spCamera.m_pObject,
    0,
    v19,
    v20,
    v21,
    v22,
    0.0,
    1.0,
    1.0);
  *(float *)ST28_12_20 = World::ms_kNorthDir.x;
  *(_QWORD *)&ST28_12_20[4] = *(_QWORD *)&World::ms_kNorthDir.y;
  *(float *)v14 = World::ms_kEastDir.x;
  *(_QWORD *)&v14[4] = qword_A75248;
  *(float *)v15 = World::ms_kUpDir.x;
  *(_QWORD *)&v15[4] = *(_QWORD *)&World::ms_kUpDir.y;
  CameraCtrl::InitDirection(&v3->m_kCameraCtrl, *(NiPoint3 *)v15, *(NiPoint3 *)v14, *(NiPoint3 *)ST28_12_20);
  CameraCtrl::InitZoomMinMax(&v3->m_kCameraCtrl, 40.0, 600.0);
  v3->m_kCameraCtrl.m_fAngleUDMax = 295.0;
  v3->m_kCameraCtrl.m_fAngleUDMin = 89.0;
  CameraCtrl::SetZoom(&v3->m_kCameraCtrl, 300.0);
  CameraCtrl::AddRotate(&v3->m_kCameraCtrl, 0.0, 35.0);
  v3->m_kCamOscillation.vfptr->Clear(&v3->m_kCamOscillation);
  *(_WORD *)&v3->m_bControllerMode = 0;
  v3->m_kLookAtDelta.x = 0.0;
  v3->m_kLookAtDelta.y = 0.0;
  v3->m_kLookAtDelta.z = 0.0;
  v3->m_kCameraPosDelta.x = 0.0;
  v3->m_kCameraPosDelta.y = 0.0;
  v3->m_kCameraPosDelta.z = 0.0;
  v3->m_dwOldTime = 0;
  v3->m_fAngleUDDelta = -1.0;
  v3->m_fAngleLRDelta = -1.0;
  v3->m_fDist = 0.0;
  v16 = NiPoint3::ZERO.y;
  v17 = NiPoint3::ZERO.z;
  v3->m_kLookAtPos.x = NiPoint3::ZERO.x;
  v3->m_kLookAtPos.y = v16;
  v3->m_kLookAtPos.z = v17;
  return 1;
}
// A75244: using guessed type const struct NiPoint3 World::ms_kEastDir;
// A75248: using guessed type __int64 qword_A75248;

//----- (0067A620) --------------------------------------------------------
void __thiscall World::TerminateCamera(World *this)
{
  World *v1; // edi@1
  NiCamera *v2; // esi@2
  NiNode *v3; // esi@8

  v1 = this;
  if ( this->m_spCamera.m_pObject )
  {
    v2 = this->m_spCamera.m_pObject;
    if ( v2 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
      v1->m_spCamera.m_pObject = 0;
    }
  }
  if ( v1->m_spCameraShakeNode.m_pObject )
  {
    v3 = v1->m_spCameraShakeNode.m_pObject;
    if ( v3 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
      v1->m_spCameraShakeNode.m_pObject = 0;
    }
  }
}

//----- (0067A6A0) --------------------------------------------------------
void __thiscall World::SetCameraFrustum(World *this, float fScreenWidth, float fScreenHeight)
{
  World::SetCameraFOV(this, this->m_fCameraFOV, fScreenWidth, fScreenHeight);
}

//----- (0067A6D0) --------------------------------------------------------
bool __thiscall World::GetObjectCameraIntersect(World *this, NiPoint3 kOrigin, NiPoint3 kDir)
{
  NiSortAdjustNode *v3; // ebx@1
  Picking *v4; // esi@1
  NiSortAdjustNode *v5; // edi@1
  std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *v6; // ebx@9
  std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > *v7; // esi@9
  Picking *v8; // ecx@12
  unsigned int v9; // edi@12
  NiAVObject *i; // esi@12
  float fAlpha; // ST08_4@13
  World *v12; // edi@13
  double v13; // st7@13
  NiAVObject *v14; // esi@14
  NiAVObject *v15; // ecx@15
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *v16; // eax@15
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *v17; // edx@15
  NiAVObject **v18; // eax@22
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > v19; // ebx@24
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v20; // eax@24
  NiRTTI *v21; // eax@25
  std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *v22; // esi@29
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v23; // eax@29
  Picking *v24; // ecx@32
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node **v25; // eax@33
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *v26; // edi@33
  NiAVObject *v27; // esi@34
  NiRTTI *v28; // eax@35
  float v29; // ST08_4@39
  World *v30; // esi@39
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v31; // eax@39
  std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *v32; // esi@40
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *v33; // eax@41
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *k; // eax@42
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *j; // eax@45
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v36; // ecx@50
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v37; // edi@50
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v38; // esi@50
  std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *v39; // esi@52
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >,bool> v41; // [sp+18h] [bp-38h]@29
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >,bool> result; // [sp+20h] [bp-30h]@24
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > v43; // [sp+28h] [bp-28h]@30
  NiAVObject *pAvObject; // [sp+2Ch] [bp-24h]@10
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > >,std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > > > v45; // [sp+30h] [bp-20h]@20
  unsigned int uiIndex; // [sp+38h] [bp-18h]@12
  NiAVObject *pkSceneRoot; // [sp+3Ch] [bp-14h]@13
  std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *v48; // [sp+40h] [bp-10h]@9
  std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *v49; // [sp+44h] [bp-Ch]@9
  World *v50; // [sp+48h] [bp-8h]@1
  bool bResult; // [sp+4Fh] [bp-1h]@1

  v3 = this->m_spBuildingScene.m_pObject;
  v4 = this->m_pkPick;
  v5 = (NiSortAdjustNode *)v4->m_spRoot.m_pObject;
  v50 = this;
  bResult = 0;
  if ( v5 != v3 )
  {
    if ( v5 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      this = v50;
    }
    v4->m_spRoot.m_pObject = (NiAVObject *)v3;
    if ( v3 )
    {
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
      this = v50;
    }
  }
  v6 = (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&this->m_vecCameraIntersectObject;
  v7 = (std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > *)&this->m_vecFadeObject.comp;
  v49 = (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&this->m_vecCameraIntersectObject;
  v48 = (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&this->m_vecFadeObject;
  if ( &this->m_vecFadeObject != &this->m_vecCameraIntersectObject )
  {
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::erase(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&this->m_vecFadeObject,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *)&pAvObject,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >)this->m_vecFadeObject._Myhead->_Left,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >)this->m_vecFadeObject._Myhead);
    std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0>>::_Copy(
      v7,
      (std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > *)v6);
    this = v50;
  }
  if ( Picking::PickCharacter(this->m_pkPick, &kOrigin, &kDir) )
  {
    v8 = v50->m_pkPick;
    v9 = 0;
    uiIndex = 0;
    for ( i = Picking::GetAVObject(v8, 0); i; i = Picking::GetAVObject(v24, uiIndex) )
    {
      fAlpha = *(float *)&v9;
      v12 = v50;
      *(float *)&pkSceneRoot = Picking::GetDistance(v50->m_pkPick, LODWORD(fAlpha));
      v13 = CameraCtrl::GetZoom(&v12->m_kCameraCtrl);
      if ( *(float *)&pkSceneRoot >= v13 )
        break;
      *(float *)&v14 = COERCE_FLOAT(NpNs_GetObjectNameRecUp(i, "Scene Root", "[PN]"));
      pkSceneRoot = v14;
      if ( *(float *)&v14 != 0.0 )
      {
        v15 = (NiAVObject *)v6->_Myhead;
        v16 = (std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *)v15->m_uiRefCount;
        v17 = (std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *)v6->_Myhead;
        while ( !v16->_Isnil )
        {
          if ( v16->_Myval >= v14 )
          {
            v17 = v16;
            v16 = v16->_Left;
          }
          else
          {
            v16 = v16->_Right;
          }
        }
        v45.second._Ptr = v17;
        if ( (NiAVObject *)v17 == v15 || v14 < v17->_Myval )
        {
          pAvObject = v15;
          v18 = &pAvObject;
        }
        else
        {
          v18 = (NiAVObject **)&v45.second;
        }
        v19._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)*v18;
        v20 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
                (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v12->m_vecUpdateFadeObject,
                (unsigned int *)&pkSceneRoot);
        std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
          (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v12->m_vecUpdateFadeObject,
          &result,
          v20,
          0);
        if ( v19._Ptr == (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v12->m_vecCameraIntersectObject._Myhead )
        {
          v21 = (NiRTTI *)((int (__thiscall *)(NiAVObject *))v14->vfptr[1].__vecDelDtor)(v14);
          if ( v21 )
          {
            while ( v21 != &NsFadeNode::m_RTTI )
            {
              v21 = v21->m_pkBaseRTTI;
              if ( !v21 )
                goto LABEL_31;
            }
            LOBYTE(v14[2].vfptr) = 0;
            NsFadeNode::Start((NsFadeNode *)v14, Timer::ms_fCurTime, 1);
            NsFadeNode::SetMinAlpha((NsFadeNode *)v14, 0.2);
            v22 = (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)v48;
            v23 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
                    v48,
                    (unsigned int *)&pkSceneRoot);
            std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
              v22,
              &v41,
              v23,
              0);
            bResult = 1;
          }
        }
        else
        {
          std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0>>::erase(
            v49,
            &v43,
            v19);
        }
LABEL_31:
        v6 = v49;
      }
      v24 = v50->m_pkPick;
      v9 = uiIndex++ + 1;
    }
  }
  v25 = &v50->m_vecCameraIntersectObject._Myhead->_Left;
  v26 = *v25;
  if ( (std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node **)*v25 != v25 )
  {
    do
    {
      v27 = v26->_Myval;
      pAvObject = v27;
      if ( v27 )
      {
        v28 = (NiRTTI *)((int (__thiscall *)(NiAVObject *))v27->vfptr[1].__vecDelDtor)(v27);
        if ( v28 )
        {
          while ( v28 != &NsFadeNode::m_RTTI )
          {
            v28 = v28->m_pkBaseRTTI;
            if ( !v28 )
              goto LABEL_40;
          }
          LOBYTE(v27[2].vfptr) = 1;
          v29 = NsFadeNode::GetCurAlpha((NsFadeNode *)v27);
          NsFadeNode::SetMinAlpha((NsFadeNode *)v27, v29);
          NsFadeNode::Start((NsFadeNode *)v27, Timer::ms_fCurTime, 0);
          v30 = v50;
          v31 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
                  (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v50->m_vecUpdateFadeObject,
                  (unsigned int *)&pAvObject);
          std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
            (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v30->m_vecUpdateFadeObject,
            &v41,
            v31,
            0);
        }
      }
LABEL_40:
      v32 = (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)v48;
      std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Eqrange(
        (std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > *)v48,
        &v45,
        &v26->_Myval);
      std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::erase(
        v32,
        &v43,
        (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >)v45.first._Ptr,
        (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >)v45.second._Ptr);
      if ( !v26->_Isnil )
      {
        v33 = v26->_Right;
        if ( v33->_Isnil )
        {
          for ( j = v26->_Parent; !j->_Isnil; j = j->_Parent )
          {
            if ( v26 != j->_Right )
              break;
            v26 = j;
          }
          v26 = j;
        }
        else
        {
          v26 = v26->_Right;
          for ( k = v33->_Left; !k->_Isnil; k = k->_Left )
            v26 = k;
        }
      }
    }
    while ( v26 != v50->m_vecCameraIntersectObject._Myhead );
  }
  v36 = v6->_Myhead;
  v37 = v36->_Parent;
  v38 = v36->_Parent;
  if ( !v37->_Isnil )
  {
    do
    {
      std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,unsigned short>>,0>>::_Erase(
        v6,
        v38->_Right);
      v38 = v38->_Left;
      operator delete(v37);
      v37 = v38;
    }
    while ( !v38->_Isnil );
  }
  v39 = v48;
  v6->_Myhead->_Parent = v6->_Myhead;
  v6->_Myhead->_Left = v6->_Myhead;
  v6->_Myhead->_Right = v6->_Myhead;
  v6->_Mysize = 0;
  if ( (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)v6 != v39 )
  {
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::erase(
      v6,
      &v43,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >)v6->_Myhead->_Left,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >)v6->_Myhead);
    std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0>>::_Copy(
      (std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > *)v6,
      (std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > *)v39);
  }
  return bResult;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0067AA60) --------------------------------------------------------
void __userpurge World::UpdateCamera(World *this@<ecx>, float a2@<ebx>, int a3@<edi>, int a4@<esi>, float fTime)
{
  float fMsDeltaX; // ST1C_4@1
  World *v6; // ebx@1
  double v7; // st7@5
  NiPoint3 *v8; // eax@8
  NiPoint3 *v9; // eax@10
  double v10; // st7@12
  float v11; // edx@12
  float v12; // eax@12
  double v13; // st7@12
  float v14; // ST20_4@12
  float v15; // edx@17
  float v16; // eax@17
  float v17; // ecx@17
  _BYTE ST14_12_20[12]; // ST14_12@20
  _BYTE v19[12]; // ST08_12@20
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node **v20; // eax@20
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > > v21; // esi@20
  bool v22; // zf@21
  NiAVObject *v23; // edi@21
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *v24; // eax@22
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > > v25; // eax@23
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *i; // eax@26
  NiRTTI *v27; // eax@31
  NiCamera *v28; // eax@36
  double v29; // st7@37
  NiAVObject *v30; // ebx@42
  double v31; // st7@42
  double v32; // st6@42
  NiPoint2 pos2Side; // [sp+24h] [bp-98h]@12
  NiPoint3 kNormal; // [sp+2Ch] [bp-90h]@12
  NiPoint3 kGroundPos; // [sp+38h] [bp-84h]@12
  NiPoint3 kCamDir; // [sp+44h] [bp-78h]@5
  NiPoint3 kCameraPos; // [sp+50h] [bp-6Ch]@5
  NiPoint3 kLookAtPos; // [sp+5Ch] [bp-60h]@1
  NiPoint3 kLookAt2GroundDir; // [sp+68h] [bp-54h]@12
  NiPoint3 kShakeAxis; // [sp+74h] [bp-48h]@5
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > > iterCur; // [sp+80h] [bp-3Ch]@8
  NiPoint3 kShake; // [sp+84h] [bp-38h]@11
  float fLength; // [sp+90h] [bp-2Ch]@13
  NiMatrix3 mat; // [sp+94h] [bp-28h]@5

  fMsDeltaX = a2;
  v6 = this;
  CameraCtrl::Update(&this->m_kCameraCtrl, fTime);
  ((void (__stdcall *)(NiPoint3 *, int, int, _DWORD))g_pkMainChar->vfptr[21].Affect)(
    &kLookAtPos,
    a3,
    a4,
    LODWORD(fMsDeltaX));
  if ( v6->m_bControllerMode == 1 )
  {
    if ( v6->m_bAutoCameraMode == 1 )
      World::AutoRotateCamera(v6, 3.0);
    kLookAtPos.z = kLookAtPos.z + 20.0;
  }
  CameraCtrl::SetLookAtPos(&v6->m_kCameraCtrl, &kLookAtPos);
  CameraCtrl::CalCulateCamera(&v6->m_kCameraCtrl, &kCameraPos);
  kShakeAxis.x = -World::ms_kNorthDir.x;
  kShakeAxis.y = -World::ms_kNorthDir.y;
  kCamDir = kShakeAxis;
  qmemcpy(&mat, &NiMatrix3::IDENTITY, sizeof(mat));
  kShakeAxis.z = -World::ms_kNorthDir.z;
  kLookAtPos.x = v6->m_kCameraPosDelta.x + kLookAtPos.x;
  kLookAtPos.y = v6->m_kCameraPosDelta.y + kLookAtPos.y;
  kLookAtPos.z = v6->m_kCameraPosDelta.z + kLookAtPos.z;
  v7 = 0.0;
  if ( v6->m_fAngleUDDelta >= 0.0 || v6->m_fAngleLRDelta >= 0.0 )
  {
    if ( v6->m_fAngleUDDelta >= 0.0 )
    {
      kShakeAxis.x = -World::ms_kWestDir.x;
      kShakeAxis.y = -flt_A75260;
      kShakeAxis.z = -flt_A75264;
      *(float *)&iterCur._Ptr = v6->m_fAngleUDDelta * 0.01745329238474369;
      NiMatrix3::MakeRotation(&mat, *(float *)&iterCur._Ptr, kShakeAxis.x, kShakeAxis.y, kShakeAxis.z);
      v8 = operator*(&kShakeAxis, &kCamDir, &mat);
      v7 = 0.0;
      kCamDir.x = v8->x;
      kCamDir.y = v8->y;
      kCamDir.z = v8->z;
    }
    if ( v7 <= v6->m_fAngleLRDelta )
    {
      *(float *)&iterCur._Ptr = v6->m_fAngleLRDelta * 0.01745329238474369;
      NiMatrix3::MakeRotation(&mat, *(float *)&iterCur._Ptr, World::ms_kUpDir.x, World::ms_kUpDir.y, World::ms_kUpDir.z);
      v9 = operator*(&kShakeAxis, &kCamDir, &mat);
      kCamDir.x = v9->x;
      kCamDir.y = v9->y;
      kCamDir.z = v9->z;
    }
    kShakeAxis.x = -kCamDir.x;
    kShakeAxis.y = -kCamDir.y;
    kShakeAxis.z = -kCamDir.z;
    iterCur._Ptr = (std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *)LODWORD(v6->m_fDist);
    kShake.x = kShakeAxis.x * *(float *)&iterCur._Ptr;
    kShake.y = kShakeAxis.y * *(float *)&iterCur._Ptr;
    kShake.z = *(float *)&iterCur._Ptr * kShakeAxis.z;
    kShakeAxis.x = kShake.x + kLookAtPos.x;
    kCameraPos = kShakeAxis;
    kShakeAxis.y = kShake.y + kLookAtPos.y;
    kShakeAxis.z = kShake.z + kLookAtPos.z;
  }
  v10 = kCameraPos.x - kLookAtPos.x;
  v11 = kLookAtPos.y;
  v12 = kLookAtPos.z;
  v6->m_kLookAtPos.x = kLookAtPos.x;
  kLookAt2GroundDir.x = v10;
  v6->m_kLookAtPos.y = v11;
  v13 = kCameraPos.y;
  v6->m_kLookAtPos.z = v12;
  kShake = kLookAt2GroundDir;
  kShakeAxis = kLookAt2GroundDir;
  kLookAt2GroundDir.y = v13 - kLookAtPos.y;
  kLookAt2GroundDir.z = kCameraPos.z - kLookAtPos.z;
  NiPoint3::Unitize(&kShakeAxis);
  iterCur._Ptr = (std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *)LODWORD(v6->m_kWorldFrustum.m_fNear);
  kNormal = NiPoint3::ZERO;
  v14 = kShakeAxis.x * *(float *)&iterCur._Ptr;
  pos2Side.x = kShakeAxis.y * *(float *)&iterCur._Ptr;
  pos2Side.y = *(float *)&iterCur._Ptr * kShakeAxis.z;
  kShake.x = kLookAt2GroundDir.x - v14;
  kShake.y = kShake.y - pos2Side.x;
  kShake.z = kShake.z - pos2Side.y;
  if ( World::GetCameraPickPos2(v6, &kLookAtPos, &kCameraPos, &kGroundPos, &kNormal, 0) )
  {
    kLookAt2GroundDir.x = kGroundPos.x - kLookAtPos.x;
    kLookAt2GroundDir.y = kGroundPos.y - kLookAtPos.y;
    kLookAt2GroundDir.z = kGroundPos.z - kLookAtPos.z;
    *(float *)&iterCur._Ptr = kShake.z * kShake.z + kShake.x * kShake.x + kShake.y * kShake.y;
    *(float *)&iterCur._Ptr = sqrt(*(float *)&iterCur._Ptr);
    *(double *)&kShake.y = *(float *)&iterCur._Ptr * 1.5;
    fLength = kLookAt2GroundDir.y * kLookAt2GroundDir.y
            + kLookAt2GroundDir.x * kLookAt2GroundDir.x
            + kLookAt2GroundDir.z * kLookAt2GroundDir.z;
    fLength = sqrt(fLength);
    if ( fLength < *(double *)&kShake.y )
    {
      fLength = kNormal.y * kNormal.y + kNormal.x * kNormal.x + kNormal.z * kNormal.z;
      fLength = sqrt(fLength);
      if ( fLength > 0.1000000014901161 )
      {
        NiPoint3::Unitize(&kNormal);
        pos2Side.x = v6->m_kWorldFrustum.m_fTop;
        pos2Side.y = v6->m_kWorldFrustum.m_fRight;
        fLength = pos2Side.y * pos2Side.y + pos2Side.x * pos2Side.x;
        fLength = sqrt(fLength);
        kShake.x = kNormal.x * fLength;
        kShake.y = kNormal.y * fLength;
        kShake.z = fLength * kNormal.z;
        fLength = v6->m_kWorldFrustum.m_fNear;
        kLookAt2GroundDir.x = kShake.x * fLength;
        kLookAt2GroundDir.y = kShake.y * fLength;
        kLookAt2GroundDir.z = fLength * kShake.z;
        kShake.x = kLookAt2GroundDir.x * 1.5;
        kShake.y = kLookAt2GroundDir.y * 1.5;
        kShake.z = 1.5 * kLookAt2GroundDir.z;
        kGroundPos.x = kShake.x + kGroundPos.x;
        kGroundPos.y = kShake.y + kGroundPos.y;
        kGroundPos.z = kShake.z + kGroundPos.z;
      }
      kLookAt2GroundDir.x = kGroundPos.x - kLookAtPos.x;
      kLookAt2GroundDir.y = kGroundPos.y - kLookAtPos.y;
      kLookAt2GroundDir.z = kGroundPos.z - kLookAtPos.z;
      *(double *)&kShake.y = *(float *)&iterCur._Ptr;
      fLength = kLookAt2GroundDir.y * kLookAt2GroundDir.y
              + kLookAt2GroundDir.x * kLookAt2GroundDir.x
              + kLookAt2GroundDir.z * kLookAt2GroundDir.z;
      fLength = sqrt(fLength);
      if ( fLength >= (double)*(float *)&iterCur._Ptr )
      {
        fLength = *(float *)&iterCur._Ptr;
        NiPoint3::Unitize(&kLookAt2GroundDir);
        kShake.x = kLookAt2GroundDir.x * fLength;
        kShake.y = kLookAt2GroundDir.y * fLength;
        kShake.z = fLength * kLookAt2GroundDir.z;
        kLookAt2GroundDir.x = kShake.x + kLookAtPos.x;
        v15 = kLookAt2GroundDir.x;
        kLookAt2GroundDir.y = kShake.y + kLookAtPos.y;
        v16 = kLookAt2GroundDir.y;
        kLookAt2GroundDir.z = kShake.z + kLookAtPos.z;
        v17 = kLookAt2GroundDir.z;
      }
      else
      {
        kShake.x = kLookAt2GroundDir.x + kLookAtPos.x;
        v15 = kShake.x;
        kShake.y = kLookAt2GroundDir.y + kLookAtPos.y;
        v16 = kShake.y;
        kShake.z = kLookAt2GroundDir.z + kLookAtPos.z;
        v17 = kShake.z;
      }
      kCameraPos.z = v17;
      kCameraPos.y = v16;
      kCameraPos.x = v15;
    }
  }
  *(float *)ST14_12_20 = kShakeAxis.x;
  *(_QWORD *)&ST14_12_20[4] = *(_QWORD *)&kShakeAxis.y;
  *(float *)v19 = kLookAtPos.x;
  *(_QWORD *)&v19[4] = *(_QWORD *)&kLookAtPos.y;
  World::GetObjectCameraIntersect(v6, *(NiPoint3 *)v19, *(NiPoint3 *)ST14_12_20);
  v20 = &v6->m_vecUpdateFadeObject._Myhead->_Left;
  v21._Ptr = *v20;
  if ( (std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node **)*v20 != v20 )
  {
    do
    {
      v22 = v21._Ptr->_Isnil == 0;
      v23 = v21._Ptr->_Myval;
      iterCur._Ptr = v21._Ptr;
      if ( v22 )
      {
        v24 = v21._Ptr->_Right;
        if ( v24->_Isnil )
        {
          for ( i = v21._Ptr->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v21._Ptr != i->_Right )
              break;
            v21._Ptr = i;
          }
          v21._Ptr = i;
        }
        else
        {
          v21._Ptr = v21._Ptr->_Right;
          for ( v25._Ptr = v24->_Left; !v25._Ptr->_Isnil; v25._Ptr = v25._Ptr->_Left )
            v21._Ptr = v25._Ptr;
        }
      }
      if ( v23 && (v27 = (NiRTTI *)((int (__thiscall *)(NiAVObject *))v23->vfptr[1].__vecDelDtor)(v23)) != 0 )
      {
        while ( v27 != &NsFadeNode::m_RTTI )
        {
          v27 = v27->m_pkBaseRTTI;
          if ( !v27 )
            goto LABEL_34;
        }
        if ( v23[2].m_uiRefCount )
        {
          NiAVObject::Update(v23, Timer::ms_fCurTime, 1);
        }
        else
        {
          std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Eqrange(
            (std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > *)&v6->m_vecUpdateFadeObject.comp,
            (std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > >,std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > > > *)&kLookAt2GroundDir.y,
            &iterCur._Ptr->_Myval);
          std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::erase(
            (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v6->m_vecUpdateFadeObject,
            (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *)&fLength,
            LODWORD(kLookAt2GroundDir.y),
            LODWORD(kLookAt2GroundDir.z));
        }
      }
      else
      {
LABEL_34:
        std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Eqrange(
          (std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > *)&v6->m_vecUpdateFadeObject.comp,
          (std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > >,std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > > > *)&kShake.y,
          &iterCur._Ptr->_Myval);
        std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::erase(
          (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v6->m_vecUpdateFadeObject,
          (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *)&pos2Side.y,
          LODWORD(kShake.y),
          LODWORD(kShake.z));
      }
    }
    while ( v21._Ptr != v6->m_vecUpdateFadeObject._Myhead );
  }
  v6->m_spCamera.m_pObject->m_kLocal.m_Translate = kCameraPos;
  NiAVObject::Update((NiAVObject *)&v6->m_spCamera.m_pObject->vfptr, 0.0, 1);
  NiCamera::LookAtWorldPoint(v6->m_spCamera.m_pObject, &kLookAtPos, &World::ms_kUpDir);
  NiAVObject::Update((NiAVObject *)&v6->m_spCamera.m_pObject->vfptr, 0.0, 1);
  Oscillation::Update((Oscillation *)&v6->m_kCamOscillation.vfptr, fTime);
  v28 = v6->m_spCamera.m_pObject;
  if ( v6->m_kCamOscillation.m_eAxis == 1 )
  {
    kShake.x = v28->m_kWorld.m_Rotate.m_pEntry[0][1];
    kShake.y = v28->m_kWorld.m_Rotate.m_pEntry[1][1];
    v29 = v28->m_kWorld.m_Rotate.m_pEntry[2][1];
  }
  else
  {
    kShake.x = v28->m_kWorld.m_Rotate.m_pEntry[0][2];
    kShake.y = v28->m_kWorld.m_Rotate.m_pEntry[1][2];
    v29 = v28->m_kWorld.m_Rotate.m_pEntry[2][2];
  }
  kShake.z = v29;
  fLength = v6->m_kCamOscillation.m_fValue;
  v30 = (NiAVObject *)&v6->m_spCameraShakeNode.m_pObject->vfptr;
  kShakeAxis = kShake;
  v31 = fLength;
  kShake.x = kShake.x * fLength;
  v32 = kShake.y;
  v30->m_kLocal.m_Translate = kShake;
  kShake.y = v32 * v31;
  kShake.z = v31 * kShakeAxis.z;
  NiAVObject::Update(v30, fTime, 1);
}
// 67AA60: could not find valid save-restore pair for ebx
// 67AA60: could not find valid save-restore pair for edi
// 67AA60: could not find valid save-restore pair for esi
// A7525C: using guessed type const struct NiPoint3 World::ms_kWestDir;
// A75260: using guessed type float flt_A75260;
// A75264: using guessed type float flt_A75264;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0067B2A0) --------------------------------------------------------
NiPoint3 *__thiscall NiCamera::GetWorldUpVector(NiCamera *this, NiPoint3 *result)
{
  NiPoint3 *v2; // eax@1

  v2 = result;
  result->x = this->m_kWorld.m_Rotate.m_pEntry[0][1];
  result->y = this->m_kWorld.m_Rotate.m_pEntry[1][1];
  result->z = this->m_kWorld.m_Rotate.m_pEntry[2][1];
  return v2;
}

//----- (0067B2C0) --------------------------------------------------------
NiPoint3 *__thiscall NiCamera::GetWorldRightVector(NiCamera *this, NiPoint3 *result)
{
  NiPoint3 *v2; // eax@1

  v2 = result;
  result->x = this->m_kWorld.m_Rotate.m_pEntry[0][2];
  result->y = this->m_kWorld.m_Rotate.m_pEntry[1][2];
  result->z = this->m_kWorld.m_Rotate.m_pEntry[2][2];
  return v2;
}

//----- (0067B2E0) --------------------------------------------------------
std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > >,std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > > > *__thiscall std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Eqrange(std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > *this, std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > >,std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > > > *result, NiAVObject *const *_Keyval)
{
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *v3; // edx@1
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *v4; // eax@1
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *v5; // ebx@1
  NiAVObject *v6; // edi@2
  unsigned int v7; // esi@3
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *v8; // eax@11
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > >,std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > > > *v9; // eax@18

  v3 = this->_Myhead;
  v4 = v3->_Parent;
  v5 = this->_Myhead;
  if ( !v4->_Isnil )
  {
    v6 = *_Keyval;
    do
    {
      v7 = (unsigned int)v4->_Myval;
      if ( v7 >= (unsigned int)v6 )
      {
        if ( v3->_Isnil && (unsigned int)v6 < v7 )
          v3 = v4;
        v5 = v4;
        v4 = v4->_Left;
      }
      else
      {
        v4 = v4->_Right;
      }
    }
    while ( !v4->_Isnil );
  }
  if ( v3->_Isnil )
    v8 = this->_Myhead->_Parent;
  else
    v8 = v3->_Left;
  while ( !v8->_Isnil )
  {
    if ( *_Keyval >= v8->_Myval )
    {
      v8 = v8->_Right;
    }
    else
    {
      v3 = v8;
      v8 = v8->_Left;
    }
  }
  v9 = result;
  result->first._Ptr = v5;
  result->second._Ptr = v3;
  return v9;
}

//----- (0067B370) --------------------------------------------------------
std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *__thiscall std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0>>::_Copy(std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > *this, std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *_Rootnode, std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *_Wherenode)
{
  std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > *v3; // ebx@1
  bool v4; // zf@1
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *v5; // eax@2
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *v6; // ecx@2
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *v7; // esi@2
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *v8; // ST00_4@4
  int v10; // [sp+0h] [bp-28h]@1
  std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *v11; // [sp+10h] [bp-18h]@1
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *_Newroot; // [sp+14h] [bp-14h]@1
  int *v13; // [sp+18h] [bp-10h]@1
  int v14; // [sp+24h] [bp-4h]@4

  v13 = &v10;
  v3 = this;
  v11 = (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)this;
  v4 = _Rootnode->_Isnil == 0;
  _Newroot = this->_Myhead;
  if ( v4 )
  {
    v5 = (std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *)std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>((std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)this, (unsigned int *)&_Rootnode->_Myval);
    v6 = _Newroot;
    v7 = v5;
    v5->_Parent = _Wherenode;
    v5->_Color = _Rootnode->_Color;
    if ( v6->_Isnil )
      _Newroot = v5;
    v8 = _Rootnode->_Left;
    v14 = 0;
    v5->_Left = std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0>>::_Copy(
                  v3,
                  v8,
                  v5);
    v7->_Right = std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0>>::_Copy(
                   v3,
                   _Rootnode->_Right,
                   v7);
  }
  return _Newroot;
}

//----- (0067B430) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0>>::_Copy(std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > *this, std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > *_Right)
{
  std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > *v2; // esi@1
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *v3; // edi@1
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *v4; // edx@1
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *v6; // ecx@2
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *v7; // esi@4
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *v8; // ecx@4
  std::_Tree_nod<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> >::_Node *i; // eax@4

  v2 = this;
  v3 = this->_Myhead;
  v3->_Parent = std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0>>::_Copy(
                  this,
                  _Right->_Myhead->_Parent,
                  this->_Myhead);
  v4 = v2->_Myhead;
  v2->_Mysize = _Right->_Mysize;
  v5 = v4->_Parent;
  if ( v5->_Isnil )
  {
    v4->_Left = v4;
    v2->_Myhead->_Right = v2->_Myhead;
  }
  else
  {
    v6 = v5->_Left;
    if ( !v5->_Left->_Isnil )
    {
      do
      {
        v5 = v6;
        v6 = v6->_Left;
      }
      while ( !v6->_Isnil );
    }
    v4->_Left = v5;
    v7 = v2->_Myhead;
    v8 = v7->_Parent;
    for ( i = v8->_Right; !i->_Isnil; i = i->_Right )
      v8 = i;
    v7->_Right = v8;
  }
}

//----- (0067B4B0) --------------------------------------------------------
void __thiscall World::ClearLightFog(World *this)
{
  LightFogCtrl::Clear(&this->m_kLightFogCtrl);
}

//----- (0067B4C0) --------------------------------------------------------
void __usercall RotateModelXToVector(NiPoint3 *vec@<eax>, NiMatrix3 *rot@<esi>)
{
  float v2; // ecx@1
  float v3; // edx@1
  float v4; // eax@1
  NiPoint3 zvec; // [sp+0h] [bp-24h]@1
  NiPoint3 yvec; // [sp+Ch] [bp-18h]@1
  NiPoint3 xvec; // [sp+18h] [bp-Ch]@1

  v2 = vec->x;
  v3 = vec->y;
  v4 = vec->z;
  xvec.x = v2;
  xvec.y = v3;
  xvec.z = v4;
  NiPoint3::Unitize(&xvec);
  NiPoint3::Perpendicular(&xvec, &yvec);
  NiPoint3::UnitCross(&xvec, &zvec, &yvec);
  rot->m_pEntry[0][0] = xvec.x;
  rot->m_pEntry[1][0] = xvec.y;
  rot->m_pEntry[2][0] = xvec.z;
  rot->m_pEntry[0][1] = yvec.x;
  rot->m_pEntry[1][1] = yvec.y;
  rot->m_pEntry[2][1] = yvec.z;
  rot->m_pEntry[0][2] = zvec.x;
  rot->m_pEntry[1][2] = zvec.y;
  rot->m_pEntry[2][2] = zvec.z;
}

//----- (0067B540) --------------------------------------------------------
void __thiscall World::SetFogColor(World *this, NiColor *kColor)
{
  NiProperty *v2; // eax@1

  v2 = NiAVObject::GetProperty((NiAVObject *)&this->m_spWorldScene.m_pObject->vfptr, 2);
  if ( v2 )
    *(NiColor *)&v2[1].m_pcName = *kColor;
}

//----- (0067B570) --------------------------------------------------------
void __thiscall World::SetFogDepth(World *this, float fDepth)
{
  NiProperty *v2; // ecx@1

  v2 = NiAVObject::GetProperty((NiAVObject *)&this->m_spWorldScene.m_pObject->vfptr, 2);
  if ( v2 )
  {
    if ( fDepth < 0.0 )
      *(float *)&v2[1].m_uiRefCount = 0.0;
    else
      *(float *)&v2[1].m_uiRefCount = fDepth;
  }
}

//----- (0067B5C0) --------------------------------------------------------
void __thiscall World::EnableFog(World *this, bool b)
{
  NiProperty *v2; // eax@1

  v2 = NiAVObject::GetProperty((NiAVObject *)&this->m_spWorldScene.m_pObject->vfptr, 2);
  if ( v2 )
  {
    if ( b )
      LOWORD(v2[1].vfptr) |= 1u;
    else
      LOWORD(v2[1].vfptr) &= 0xFFFEu;
  }
}

//----- (0067B5F0) --------------------------------------------------------
void __thiscall World::SetAmbientLightAmbientColor(World *this, NiColor *kColor)
{
  NiAmbientLight *v2; // eax@1
  float v3; // ecx@2

  v2 = this->m_spAmbientLight.m_pObject;
  if ( v2 )
  {
    v2->m_kAmb.r = kColor->r;
    v2->m_kAmb.g = kColor->g;
    v3 = kColor->b;
    ++v2->m_uiRevID;
    v2->m_kAmb.b = v3;
  }
}

//----- (0067B630) --------------------------------------------------------
void __thiscall World::SetAmbientLightDiffuseColor(World *this, NiColor *kColor)
{
  NiAmbientLight *v2; // eax@1
  float v3; // ecx@2

  v2 = this->m_spAmbientLight.m_pObject;
  if ( v2 )
  {
    v2->m_kDiff.r = kColor->r;
    v2->m_kDiff.g = kColor->g;
    v3 = kColor->b;
    ++v2->m_uiRevID;
    v2->m_kDiff.b = v3;
  }
}

//----- (0067B670) --------------------------------------------------------
void __thiscall World::SetAmbientLightSpecularColor(World *this, NiColor *kColor)
{
  NiAmbientLight *v2; // eax@1
  float v3; // ecx@2

  v2 = this->m_spAmbientLight.m_pObject;
  if ( v2 )
  {
    v2->m_kSpec.r = kColor->r;
    v2->m_kSpec.g = kColor->g;
    v3 = kColor->b;
    ++v2->m_uiRevID;
    v2->m_kSpec.b = v3;
  }
}

//----- (0067B6B0) --------------------------------------------------------
void __thiscall World::SetDirectionalLightAmbientColor(World *this, NiColor *kColor)
{
  NiDirectionalLight *v2; // eax@1
  float v3; // ecx@2

  v2 = this->m_spDirectionalLight.m_pObject;
  if ( v2 )
  {
    v2->m_kAmb.r = kColor->r;
    v2->m_kAmb.g = kColor->g;
    v3 = kColor->b;
    ++v2->m_uiRevID;
    v2->m_kAmb.b = v3;
  }
}

//----- (0067B6F0) --------------------------------------------------------
void __thiscall World::SetDirectionalLightDiffuseColor(World *this, NiColor *kColor)
{
  NiDirectionalLight *v2; // eax@1
  float v3; // ecx@2

  v2 = this->m_spDirectionalLight.m_pObject;
  if ( v2 )
  {
    v2->m_kDiff.r = kColor->r;
    v2->m_kDiff.g = kColor->g;
    v3 = kColor->b;
    ++v2->m_uiRevID;
    v2->m_kDiff.b = v3;
  }
}

//----- (0067B730) --------------------------------------------------------
void __thiscall World::SetDirectionalLightSpecularColor(World *this, NiColor *kColor)
{
  NiDirectionalLight *v2; // eax@1
  float v3; // ecx@2

  v2 = this->m_spDirectionalLight.m_pObject;
  if ( v2 )
  {
    v2->m_kAmb.r = kColor->r;
    v2->m_kAmb.g = kColor->g;
    v3 = kColor->b;
    ++v2->m_uiRevID;
    v2->m_kAmb.b = v3;
  }
}

//----- (0067B770) --------------------------------------------------------
int __stdcall World::GetLightID(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *LightName)
{
  return mhMiscUtil::GetNumFromNodeName(LightName, LightName->_Mysize - 2);
}

//----- (0067B790) --------------------------------------------------------
void __thiscall World::TerminateLightFog(World *this)
{
  World *v1; // edi@1
  NiAmbientLight *v2; // esi@1
  NiDirectionalLight *v3; // esi@6

  v1 = this;
  v2 = this->m_spAmbientLight.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spAmbientLight.m_pObject = 0;
  }
  v3 = v1->m_spDirectionalLight.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spDirectionalLight.m_pObject = 0;
  }
  LightFogCtrl::Terminate(&v1->m_kLightFogCtrl);
}

//----- (0067B810) --------------------------------------------------------
char __thiscall World::InitLightFog(World *this)
{
  World *v1; // ebx@1
  NiAmbientLight *v2; // eax@1
  NiAmbientLight *v3; // eax@2
  NiAmbientLight *v4; // edi@4
  int v5; // eax@9
  NiAmbientLight *v6; // eax@11
  NiAmbientLight *v7; // eax@11
  float v8; // ecx@11
  NiAmbientLight *v9; // eax@11
  float v10; // edx@11
  NiAmbientLight *v11; // eax@11
  float v12; // ecx@11
  NiDirectionalLight *v13; // eax@11
  int v14; // eax@12
  NiDirectionalLight *v15; // edi@14
  NiDirectionalLight *v16; // eax@22
  NiDirectionalLight *v17; // eax@22
  float v18; // ecx@22
  float v19; // edx@22
  NiDirectionalLight *v20; // eax@22
  float v21; // ecx@22
  float v22; // edx@22
  NiDirectionalLight *v23; // eax@22
  float v24; // ecx@22
  NiDirectionalLight *v25; // eax@22
  NiAmbientLight *v26; // eax@23
  NiDirectionalLight *v27; // edi@25
  int v28; // eax@30
  NiDirectionalLight *v29; // eax@32
  float v30; // ecx@32
  float v31; // edx@32
  NiDirectionalLight *v32; // eax@32
  float v33; // ecx@32
  float v34; // edx@32
  float v35; // ecx@32
  NiDirectionalLight *v36; // eax@32
  float v37; // edx@32
  float v38; // ecx@32
  NiDirectionalLight *v39; // eax@32
  NiDirectionalLight *v40; // eax@32
  NiNode *v41; // eax@34
  CWorldConfig *v42; // ecx@36
  CDataDocument *v43; // eax@38
  NiPointer<NiNode> v45; // [sp-8h] [bp-78h]@34
  CBaseObject *v46; // [sp-4h] [bp-74h]@32
  NiMatrix3 kRot; // [sp+10h] [bp-60h]@22
  NiColor kColor; // [sp+34h] [bp-3Ch]@11
  NiAmbientLight *v49; // [sp+40h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Right; // [sp+44h] [bp-2Ch]@36
  int v51; // [sp+6Ch] [bp-4h]@1

  v1 = this;
  v2 = (NiAmbientLight *)operator new(0x10Cu);
  v49 = v2;
  v51 = 0;
  if ( v2 )
  {
    NiAmbientLight::NiAmbientLight(v2);
    v49 = v3;
  }
  else
  {
    v49 = 0;
  }
  v4 = v1->m_spAmbientLight.m_pObject;
  v51 = -1;
  if ( v4 != v49 )
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v5 = (int)v49;
    v1->m_spAmbientLight.m_pObject = v49;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)(v5 + 4));
  }
  v6 = v1->m_spAmbientLight.m_pObject;
  ++v6->m_uiRevID;
  v6->m_fDimmer = 1.0;
  v7 = v1->m_spAmbientLight.m_pObject;
  ++v7->m_uiRevID;
  kColor.r = 0.2;
  kColor.g = 0.2;
  kColor.b = 0.2;
  v7->m_kAmb.r = 0.2;
  v8 = kColor.b;
  v7->m_kAmb.g = 0.2;
  v7->m_kAmb.b = v8;
  v9 = v1->m_spAmbientLight.m_pObject;
  v9->m_kDiff.r = NiColor::WHITE.r;
  v9->m_kDiff.g = NiColor::WHITE.g;
  v10 = NiColor::WHITE.b;
  ++v9->m_uiRevID;
  v9->m_kDiff.b = v10;
  v11 = v1->m_spAmbientLight.m_pObject;
  v11->m_kSpec.r = NiColor::BLACK.r;
  v11->m_kSpec.g = NiColor::BLACK.g;
  v12 = NiColor::BLACK.b;
  ++v11->m_uiRevID;
  v11->m_kSpec.b = v12;
  NiDynamicEffect::AttachAffectedNode(
    (NiDynamicEffect *)&v1->m_spAmbientLight.m_pObject->vfptr,
    v1->m_spNormalLightScene.m_pObject);
  v1->m_spAmbientLight.m_pObject->m_bOn = 1;
  ((void (__stdcall *)(NiAmbientLight *, _DWORD))v1->m_spNormalLightScene.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spAmbientLight.m_pObject,
    0);
  v13 = (NiDirectionalLight *)operator new(0x118u);
  v49 = (NiAmbientLight *)v13;
  v51 = 1;
  if ( v13 )
  {
    NiDirectionalLight::NiDirectionalLight(v13);
    v49 = (NiAmbientLight *)v14;
  }
  else
  {
    v49 = 0;
    v14 = 0;
  }
  v15 = v1->m_spDirectionalLight.m_pObject;
  v51 = -1;
  if ( v15 != (NiDirectionalLight *)v14 )
  {
    if ( v15 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) && v15 )
        v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
      v14 = (int)v49;
    }
    v1->m_spDirectionalLight.m_pObject = (NiDirectionalLight *)v14;
    if ( v14 )
      InterlockedIncrement((volatile LONG *)(v14 + 4));
  }
  v16 = v1->m_spDirectionalLight.m_pObject;
  ++v16->m_uiRevID;
  v16->m_fDimmer = 1.0;
  v17 = v1->m_spDirectionalLight.m_pObject;
  kColor.r = 1.0;
  kColor.g = 1.0;
  v17->m_kAmb.r = NiColor::BLACK.r;
  kColor.b = 1.0;
  v17->m_kAmb.g = NiColor::BLACK.g;
  v18 = NiColor::BLACK.b;
  ++v17->m_uiRevID;
  v19 = kColor.r;
  v17->m_kAmb.b = v18;
  v20 = v1->m_spDirectionalLight.m_pObject;
  ++v20->m_uiRevID;
  v21 = kColor.g;
  v20->m_kDiff.r = v19;
  v22 = kColor.b;
  v20->m_kDiff.g = v21;
  v20->m_kDiff.b = v22;
  v23 = v1->m_spDirectionalLight.m_pObject;
  v23->m_kSpec.r = NiColor::BLACK.r;
  v23->m_kSpec.g = NiColor::BLACK.g;
  v24 = NiColor::BLACK.b;
  ++v23->m_uiRevID;
  v23->m_kSpec.b = v24;
  NiDynamicEffect::AttachAffectedNode(
    (NiDynamicEffect *)&v1->m_spDirectionalLight.m_pObject->vfptr,
    v1->m_spDirectionalLightScene.m_pObject);
  v1->m_spDirectionalLight.m_pObject->m_bOn = 1;
  RotateModelXToVector(&World::ms_kDefaultDirectionalLightDir, &kRot);
  qmemcpy(&v1->m_spDirectionalLight.m_pObject->m_kLocal, &kRot, 0x24u);
  ((void (__stdcall *)(NiDirectionalLight *, _DWORD))v1->m_spDirectionalLightScene.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spDirectionalLight.m_pObject,
    0);
  LightFogCtrl::Init();
  v25 = (NiDirectionalLight *)operator new(0x118u);
  v49 = (NiAmbientLight *)v25;
  v51 = 2;
  if ( v25 )
  {
    NiDirectionalLight::NiDirectionalLight(v25);
    v49 = v26;
  }
  else
  {
    v49 = 0;
  }
  v27 = v1->m_spMapDirectionalLight.m_pObject;
  v51 = -1;
  if ( (NiAmbientLight *)v27 != v49 )
  {
    if ( v27 && !InterlockedDecrement((volatile LONG *)&v27->m_uiRefCount) && v27 )
      v27->vfptr->__vecDelDtor((NiRefObject *)v27, 1u);
    v28 = (int)v49;
    v1->m_spMapDirectionalLight.m_pObject = (NiDirectionalLight *)v49;
    if ( v28 )
      InterlockedIncrement((volatile LONG *)(v28 + 4));
  }
  v29 = v1->m_spMapDirectionalLight.m_pObject;
  ++v29->m_uiRevID;
  kColor.b = 0.75;
  v29->m_kAmb.r = 0.75;
  v30 = kColor.b;
  kColor.r = 1.0;
  v29->m_kAmb.g = 0.75;
  kColor.g = 1.0;
  v31 = kColor.r;
  kColor.b = 1.0;
  v29->m_kAmb.b = v30;
  v32 = v1->m_spMapDirectionalLight.m_pObject;
  kColor.r = 0.0;
  ++v32->m_uiRevID;
  v33 = kColor.g;
  kColor.g = 0.0;
  v32->m_kDiff.r = v31;
  v34 = kColor.b;
  kColor.b = 0.0;
  v32->m_kDiff.g = v33;
  v35 = kColor.r;
  v32->m_kDiff.b = v34;
  v36 = v1->m_spMapDirectionalLight.m_pObject;
  ++v36->m_uiRevID;
  v37 = kColor.g;
  v36->m_kSpec.r = v35;
  v38 = kColor.b;
  v36->m_kSpec.g = v37;
  v36->m_kSpec.b = v38;
  v39 = v1->m_spMapDirectionalLight.m_pObject;
  ++v39->m_uiRevID;
  v39->m_fDimmer = 1.0;
  qmemcpy(&v1->m_spMapDirectionalLight.m_pObject->m_kLocal, &kRot, 0x24u);
  v1->m_spMapDirectionalLight.m_pObject->m_bOn = 1;
  v40 = v1->m_spMapDirectionalLight.m_pObject;
  v49 = (NiAmbientLight *)&v46;
  v46 = (CBaseObject *)v40;
  if ( v40 )
    InterlockedIncrement((volatile LONG *)&v40->m_uiRefCount);
  v41 = v1->m_spAllGroundScene.m_pObject;
  v49 = (NiAmbientLight *)&v45;
  v45.m_pObject = v41;
  if ( v41 )
    InterlockedIncrement((volatile LONG *)&v41->m_uiRefCount);
  CWorldConfig::InitalizeGroundLight(v1->m_pWorldConfig, v45, (NiPointer<NiDirectionalLight>)v46);
  _Right._Myres = 15;
  _Right._Mysize = 0;
  _Right._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Right, "WorldSetting", 0xCu);
  v42 = v1->m_pWorldConfig;
  v51 = 3;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v42->m_strName, &_Right, 0, 0xFFFFFFFF);
  v51 = -1;
  if ( _Right._Myres >= 0x10 )
    operator delete(_Right._Bx._Ptr);
  v46 = (CBaseObject *)&v1->m_pWorldConfig->vfptr;
  _Right._Myres = 15;
  _Right._Mysize = 0;
  _Right._Bx._Buf[0] = 0;
  v43 = CDataDocument::Instance();
  CDataDocument::AddObject(v43, v46);
  return 1;
}
// A7D11C: using guessed type const struct NiColor NiColor::WHITE;
// B6243C: using guessed type const struct NiColor NiColor::BLACK;

//----- (0067BD40) --------------------------------------------------------
void __thiscall World::UpdateLightFog(World *this, float fTime)
{
  World *v2; // esi@1
  NiMaterialProperty *v3; // eax@1
  float v4; // edx@2
  char *v5; // ebx@2
  NiAVObject *v6; // ecx@2
  NiProperty *v7; // eax@2
  float v8; // ecx@3
  float v9; // edx@3
  NiMaterialProperty *v10; // ecx@4
  NiAmbientLight *v11; // eax@5
  float v12; // ecx@6
  NiMaterialProperty *v13; // edi@7
  unsigned int v14; // ebx@9
  NiAVObject *v15; // edi@9
  NiPoint3 *v16; // eax@16
  NiNode *v17; // eax@17
  signed int v18; // eax@18
  NiAVObject *v19; // ebx@20
  const char *v20; // ecx@24
  const char *v21; // eax@24
  int v22; // edi@24
  NiColor kColor; // [sp+14h] [bp-78h]@2
  NiPointer<NiAVObject> FindLightNode; // [sp+20h] [bp-6Ch]@9
  NsFindObjectByName kFindObject; // [sp+24h] [bp-68h]@18
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > SrcName; // [sp+60h] [bp-2Ch]@24
  int v27; // [sp+88h] [bp-4h]@18

  v2 = this;
  LightFogCtrl::Update(&this->m_kLightFogCtrl, fTime);
  v3 = v2->m_kLightFogCtrl.m_spFogMat.m_pObject;
  if ( v3 )
  {
    v4 = v3->m_diff.b;
    v5 = (char *)LODWORD(v3->m_diff.r);
    kColor.g = v3->m_diff.g;
    v6 = (NiAVObject *)&v2->m_spWorldScene.m_pObject->vfptr;
    kColor.b = v4;
    v7 = NiAVObject::GetProperty(v6, 2);
    if ( v7 )
    {
      v8 = kColor.g;
      v9 = kColor.b;
      v7[1].m_pcName = v5;
      *(float *)&v7[1].m_spControllers.m_pObject = v8;
      *(float *)&v7[1].m_ppkExtra = v9;
    }
  }
  v10 = v2->m_kLightFogCtrl.m_spAmibentLightMat.m_pObject;
  if ( v10 )
  {
    v11 = v2->m_spAmbientLight.m_pObject;
    if ( v11 )
    {
      v11->m_kAmb.r = v10->m_diff.r;
      v11->m_kAmb.g = v10->m_diff.g;
      v12 = v10->m_diff.b;
      ++v11->m_uiRevID;
      v11->m_kAmb.b = v12;
    }
  }
  v13 = v2->m_kLightFogCtrl.m_spBackgroundColorMat.m_pObject;
  if ( v13 )
  {
    v2->m_kBackGroundColor.r = v13->m_diff.r;
    v2->m_kBackGroundColor.g = v13->m_diff.g;
    v2->m_kBackGroundColor.b = v13->m_diff.b;
  }
  v14 = (unsigned int)v2->m_spLightArea.m_pObject;
  v15 = v2->m_pkPick->m_spRoot.m_pObject;
  FindLightNode.m_pObject = (NiAVObject *)v2->m_pkPick;
  if ( v15 != (NiAVObject *)v14 )
  {
    if ( v15 && !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) && v15 )
      v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
    FindLightNode.m_pObject->m_uiMaxSize = v14;
    if ( v14 )
      InterlockedIncrement((volatile LONG *)(v14 + 4));
  }
  kColor.r = 1.0;
  kColor.g = 1.0;
  kColor.b = 1.0;
  v16 = (NiPoint3 *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
  if ( Picking::PickCharacter(v2->m_pkPick, v16, (NiPoint3 *)&kColor) == 1 )
  {
    v17 = (NiNode *)Picking::GetAVObject(v2->m_pkPick, 0);
    if ( v17 )
    {
      kFindObject.m_pCallBack = 0;
      kFindObject.m_nCurLevel = -1;
      kFindObject.vfptr = (Ns_TourSceneVtbl *)&NsFindObjectByName::`vftable';
      kFindObject.m_szName._Myres = 15;
      kFindObject.m_szName._Mysize = 0;
      kFindObject.m_szName._Bx._Buf[0] = 0;
      kFindObject.m_vecObject._Myfirst = 0;
      kFindObject.m_vecObject._Mylast = 0;
      kFindObject.m_vecObject._Myend = 0;
      v27 = 0;
      NsFindObjectByName::FindObject(&kFindObject, v17, "GlobalLight");
      v18 = kFindObject.m_vecObject._Mylast - kFindObject.m_vecObject._Myfirst;
      if ( v18 > 0 )
      {
        if ( (unsigned int)v18 > 0 )
          v19 = *kFindObject.m_vecObject._Myfirst;
        else
          v19 = 0;
        FindLightNode.m_pObject = v19;
        if ( v19 )
          InterlockedIncrement((volatile LONG *)&v19->m_uiRefCount);
        v20 = v19->m_pcName;
        v21 = v19->m_pcName;
        SrcName._Mysize = 0;
        LOBYTE(v27) = 1;
        SrcName._Myres = 15;
        SrcName._Bx._Buf[0] = 0;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&SrcName, v20, strlen(v21));
        LOBYTE(v27) = 2;
        v22 = mhMiscUtil::GetNumFromNodeName(&SrcName, SrcName._Mysize - 2);
        LOBYTE(v27) = 1;
        if ( SrcName._Myres >= 0x10 )
          operator delete(SrcName._Bx._Ptr);
        if ( v2->m_globalLightIndex != v22 )
          World::ChangeGlobalAmbLight(v2, v22);
        LOBYTE(v27) = 0;
        if ( !InterlockedDecrement((volatile LONG *)&v19->m_uiRefCount) )
          v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
      }
      NsFindObjectByName::~NsFindObjectByName(&kFindObject);
    }
  }
  else if ( v2->m_globalLightIndex )
  {
    World::ChangeGlobalAmbLight(v2, 0);
  }
}
// 9B9194: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *NsFindObjectByName::`vftable')(NsFindObjectByName *this, NiAVObject *_pkObject, void *);

//----- (0067BFD0) --------------------------------------------------------
NiPoint3 *__thiscall NiPoint3::Perpendicular(NiPoint3 *this, NiPoint3 *result)
{
  float v2; // ST0C_4@2
  NiPoint3 *v3; // eax@3
  double v4; // st7@5
  float v5; // ST0C_4@5
  float v6; // [sp+4h] [bp-8h]@1
  float v7; // [sp+8h] [bp-4h]@1

  v7 = fabs(this->x);
  v6 = fabs(this->y);
  if ( v6 <= (double)v7 )
  {
    v4 = v6;
    v5 = fabs(this->z);
    if ( v5 < v4 )
      goto LABEL_3;
    NiPoint3::UnitCross(this, result, &NiPoint3::UNIT_Y);
    v3 = result;
  }
  else
  {
    v2 = fabs(this->z);
    if ( v2 < (double)v7 )
    {
LABEL_3:
      NiPoint3::UnitCross(this, result, &NiPoint3::UNIT_Z);
      return result;
    }
    NiPoint3::UnitCross(this, result, &NiPoint3::UNIT_X);
    v3 = result;
  }
  return v3;
}

//----- (0067C060) --------------------------------------------------------
void __thiscall NiQuaternion::ToRotation(NiQuaternion *this, NiMatrix3 *rot)
{
  float twy; // ST20_4@1
  float ty; // ST1C_4@1
  float tzz; // ST18_4@1
  double v5; // st7@1
  float twx; // ST00_4@1
  float v7; // ST20_4@1
  float twz; // ST10_4@1
  float txx; // ST08_4@1
  float txy; // ST14_4@1
  float txz; // ST0C_4@1
  float v12; // ST1C_4@1
  float tyz; // ST04_4@1
  float v14; // ST18_4@1

  twy = this->m_fX * 2.0;
  ty = this->m_fY * 2.0;
  tzz = 2.0 * this->m_fZ;
  v5 = twy;
  twx = this->m_fW * twy;
  v7 = this->m_fW * ty;
  twz = this->m_fW * tzz;
  txx = v5 * this->m_fX;
  txy = ty * this->m_fX;
  txz = tzz * this->m_fX;
  v12 = ty * this->m_fY;
  tyz = this->m_fY * tzz;
  v14 = tzz * this->m_fZ;
  rot->m_pEntry[0][0] = 1.0 - (v14 + v12);
  rot->m_pEntry[1][0] = txy + twz;
  rot->m_pEntry[2][0] = txz - v7;
  rot->m_pEntry[0][1] = txy - twz;
  rot->m_pEntry[1][1] = 1.0 - (v14 + txx);
  rot->m_pEntry[2][1] = tyz + twx;
  rot->m_pEntry[0][2] = txz + v7;
  rot->m_pEntry[1][2] = tyz - twx;
  rot->m_pEntry[2][2] = 1.0 - (txx + v12);
}

//----- (0067C160) --------------------------------------------------------
char __thiscall InstantBlock::Load(InstantBlock *this, const char *szName)
{
  InstantBlock *v2; // ebx@1
  _iobuf *v3; // eax@1
  _iobuf *v4; // esi@1
  char result; // al@2
  unsigned int v6; // ecx@3
  unsigned int v7; // eax@3
  int v8; // edi@4
  char *v9; // eax@10
  InstantBlock *v10; // [sp+8h] [bp-Ch]@1
  unsigned int uiInx; // [sp+Ch] [bp-8h]@3
  unsigned int uiTotalHeadCnt; // [sp+10h] [bp-4h]@3
  unsigned int uiTotalDataSize; // [sp+1Ch] [bp+8h]@3

  v2 = this;
  v10 = this;
  v3 = fopen(szName, "r");
  v4 = v3;
  if ( v3 )
  {
    fread(&uiTotalHeadCnt, 4u, 1u, v3);
    v6 = uiTotalHeadCnt;
    v7 = 0;
    v2->m_uiTotalHeadCnt = uiTotalHeadCnt;
    uiTotalDataSize = 0;
    uiInx = 0;
    if ( v6 )
    {
      v8 = (int)&v2->m_pkSaveHeaderData[0].nStartX;
      do
      {
        if ( v7 < 0x100 )
        {
          fread((void *)(v8 - 32), 1u, 0x20u, v4);
          fread((void *)v8, 4u, 1u, v4);
          fread((void *)(v8 + 4), 4u, 1u, v4);
          fread((void *)(v8 + 8), 4u, 1u, v4);
          fread((void *)(v8 + 12), 4u, 1u, v4);
          fread((void *)(v8 + 16), 4u, 1u, v4);
          fread((void *)(v8 + 20), 4u, 1u, v4);
          v2 = v10;
          v6 = uiTotalHeadCnt;
          uiTotalDataSize += 2 * *(_DWORD *)(v8 + 16);
          v7 = uiInx;
        }
        ++v7;
        v8 += 60;
        uiInx = v7;
      }
      while ( v7 < v6 );
    }
    if ( v2->m_pbyBlockData )
      operator delete[](v2->m_pbyBlockData);
    v2->m_pbyBlockData = 0;
    v9 = (char *)operator new[](uiTotalDataSize);
    v2->m_pbyBlockData = v9;
    fread(v9, 1u, uiTotalDataSize, v4);
    fclose(v4);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0067C2A0) --------------------------------------------------------
std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *__cdecl std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::_Max(std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *_Pnode)
{
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *result; // eax@1
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *i; // ecx@1

  result = _Pnode;
  for ( i = _Pnode->_Right; !i->_Isnil; i = i->_Right )
    result = i;
  return result;
}

//----- (0067C2C0) --------------------------------------------------------
bool __thiscall IsAniObject(NiAVObject *pkObject)
{
  int v1; // eax@1
  __int16 v2; // ax@2
  bool result; // al@4

  v1 = ((int (__stdcall *)(const char *))pkObject->vfptr[18].__vecDelDtor)("Scene Root");
  result = 0;
  if ( v1 )
  {
    v2 = *(_WORD *)(v1 + 28);
    if ( ((unsigned __int8)v2 >> 1) & 1 )
    {
      if ( !(((unsigned __int8)v2 >> 4) & 1) )
        result = 1;
    }
  }
  return result;
}

//----- (0067C2F0) --------------------------------------------------------
char __thiscall World::LoadMapLightCtrl(World *this, const char *acMapName)
{
  World *v2; // esi@1
  char result; // al@2
  NiNode *v4; // esi@4
  NiPointer<NiNode> spNode; // [sp+8h] [bp-114h]@1
  char acFileName[256]; // [sp+Ch] [bp-110h]@1
  int v7; // [sp+118h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v7 = 0;
  World::GetLoadFolderName(this, acFileName, pkExt);
  PgUtil::LoadNodeNifFile(acFileName, &spNode, 0);
  if ( spNode.m_pObject )
  {
    LightFogCtrl::SetNode(&v2->m_kLightFogCtrl, spNode.m_pObject);
    v7 = -1;
    if ( spNode.m_pObject )
    {
      v4 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0067C3C0) --------------------------------------------------------
void __cdecl ProcessMNode(NiNode *_pNode, NiNode *_pDestNode)
{
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v2; // eax@1
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *i; // eax@2
  NiAVObject *v4; // ebx@3
  NiNode *v5; // ecx@6
  NiRTTI *v6; // eax@7
  NiAVObject *v7; // esi@12
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v8; // eax@16
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v9; // eax@22
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v10; // ecx@22
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v11; // esi@23
  std::exception pExceptionObject; // [sp+28h] [bp-3Ch]@25
  FindMultiMNode kFindcdNode; // [sp+34h] [bp-30h]@2
  std::list<NiAVObject *,std::allocator<NiAVObject *> > listcdNode; // [sp+40h] [bp-24h]@1
  NiPointer<NiAVObject> spObject; // [sp+4Ch] [bp-18h]@3
  NiPointer<NiAVObject> result; // [sp+50h] [bp-14h]@11
  char *_What; // [sp+54h] [bp-10h]@6
  int v18; // [sp+60h] [bp-4h]@2

  listcdNode._Mysize = 0;
  v2 = (std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *)operator new(0xCu);
  if ( !v2 )
  {
    *(float *)&_What = 0.0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  listcdNode._Myhead = v2;
  v2->_Next = v2;
  listcdNode._Myhead->_Prev = listcdNode._Myhead;
  v18 = 0;
  kFindcdNode.m_pCallBack = 0;
  kFindcdNode.m_nCurLevel = -1;
  kFindcdNode.vfptr = (Ns_TourSceneVtbl *)&FindMultiMNode::`vftable';
  LOBYTE(v18) = 1;
  Ns_TourScene::TourScene((Ns_TourScene *)&kFindcdNode.vfptr, _pNode, &NiAVObject::m_RTTI, &listcdNode);
  for ( i = listcdNode._Myhead->_Next; listcdNode._Myhead->_Next != listcdNode._Myhead; i = listcdNode._Myhead->_Next )
  {
    v4 = i->_Myval;
    spObject.m_pObject = v4;
    if ( v4 )
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
    LOBYTE(v18) = 2;
    if ( v4 )
    {
      v4->m_kLocal.m_Translate.x = v4->m_kWorld.m_Translate.x;
      v4->m_kLocal.m_Translate.y = v4->m_kWorld.m_Translate.y;
      v4->m_kLocal.m_Translate.z = v4->m_kWorld.m_Translate.z;
      qmemcpy(&v4->m_kLocal, &v4->m_kWorld, 0x24u);
      _What = (char *)LODWORD(v4->m_kWorld.m_fScale);
      *(float *)&_What = fabs(*(float *)&_What);
      v4->m_kLocal.m_fScale = *(float *)&_What;
      v5 = v4->m_pkParent;
      if ( v5 )
      {
        v6 = (NiRTTI *)((int (*)(void))v5->vfptr[1].__vecDelDtor)();
        if ( v6 )
        {
          while ( v6 != &NiRoom::m_RTTI )
          {
            v6 = v6->m_pkBaseRTTI;
            if ( !v6 )
              goto LABEL_15;
          }
          NiRoom::DetachFixture((NiRoom *)v4->m_pkParent, &result, v4);
          if ( result.m_pObject )
          {
            v7 = result.m_pObject;
            if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
            {
              if ( v7 )
                v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
            }
          }
        }
      }
LABEL_15:
      v4->m_uFlags &= 0xFFFEu;
      ((void (__stdcall *)(NiAVObject *, signed int))_pDestNode->vfptr[29].__vecDelDtor)(v4, 1);
    }
    v8 = listcdNode._Myhead->_Next;
    if ( listcdNode._Myhead->_Next != listcdNode._Myhead )
    {
      v8->_Prev->_Next = v8->_Next;
      v8->_Next->_Prev = v8->_Prev;
      operator delete(v8);
      --listcdNode._Mysize;
    }
    LOBYTE(v18) = 1;
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  }
  NiAVObject::Update((NiAVObject *)&_pDestNode->vfptr, 0.0, 1);
  kFindcdNode.vfptr = (Ns_TourSceneVtbl *)&Ns_TourScene::`vftable';
  v9 = listcdNode._Myhead->_Next;
  listcdNode._Myhead->_Next = listcdNode._Myhead;
  listcdNode._Myhead->_Prev = listcdNode._Myhead;
  v10 = listcdNode._Myhead;
  listcdNode._Mysize = 0;
  if ( v9 != listcdNode._Myhead )
  {
    do
    {
      v11 = v9->_Next;
      operator delete(v9);
      v10 = listcdNode._Myhead;
      v9 = v11;
    }
    while ( v11 != listcdNode._Myhead );
  }
  operator delete(v10);
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9B8DD0: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *Ns_TourScene::`vftable')(Ns_TourScene *this, NiAVObject *_pkObject, void *);
// 9BC694: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *FindMultiMNode::`vftable')(FindMultiMNode *this, NiAVObject *_pkObject, void *);

//----- (0067C5F0) --------------------------------------------------------
void __cdecl ProcessCDNode(NiNode *_pNode, NiNode *_pDestNode)
{
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v2; // eax@1
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *i; // eax@2
  NiAVObject *v4; // ebx@3
  NiNode *v5; // ecx@6
  NiRTTI *v6; // eax@7
  NiAVObject *v7; // esi@12
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v8; // eax@16
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v9; // eax@22
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v10; // ecx@22
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v11; // esi@23
  std::exception pExceptionObject; // [sp+28h] [bp-3Ch]@25
  FindMultiCDNode kFindcdNode; // [sp+34h] [bp-30h]@2
  std::list<NiAVObject *,std::allocator<NiAVObject *> > listcdNode; // [sp+40h] [bp-24h]@1
  NiPointer<NiAVObject> spObject; // [sp+4Ch] [bp-18h]@3
  NiPointer<NiAVObject> result; // [sp+50h] [bp-14h]@11
  char *_What; // [sp+54h] [bp-10h]@6
  int v18; // [sp+60h] [bp-4h]@2

  listcdNode._Mysize = 0;
  v2 = (std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *)operator new(0xCu);
  if ( !v2 )
  {
    *(float *)&_What = 0.0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  listcdNode._Myhead = v2;
  v2->_Next = v2;
  listcdNode._Myhead->_Prev = listcdNode._Myhead;
  v18 = 0;
  kFindcdNode.m_pCallBack = 0;
  kFindcdNode.m_nCurLevel = -1;
  kFindcdNode.vfptr = (Ns_TourSceneVtbl *)&FindMultiCDNode::`vftable';
  LOBYTE(v18) = 1;
  Ns_TourScene::TourScene((Ns_TourScene *)&kFindcdNode.vfptr, _pNode, &NiAVObject::m_RTTI, &listcdNode);
  for ( i = listcdNode._Myhead->_Next; listcdNode._Myhead->_Next != listcdNode._Myhead; i = listcdNode._Myhead->_Next )
  {
    v4 = i->_Myval;
    spObject.m_pObject = v4;
    if ( v4 )
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
    LOBYTE(v18) = 2;
    if ( v4 )
    {
      v4->m_kLocal.m_Translate.x = v4->m_kWorld.m_Translate.x;
      v4->m_kLocal.m_Translate.y = v4->m_kWorld.m_Translate.y;
      v4->m_kLocal.m_Translate.z = v4->m_kWorld.m_Translate.z;
      qmemcpy(&v4->m_kLocal, &v4->m_kWorld, 0x24u);
      _What = (char *)LODWORD(v4->m_kWorld.m_fScale);
      *(float *)&_What = fabs(*(float *)&_What);
      v4->m_kLocal.m_fScale = *(float *)&_What;
      v5 = v4->m_pkParent;
      if ( v5 )
      {
        v6 = (NiRTTI *)((int (*)(void))v5->vfptr[1].__vecDelDtor)();
        if ( v6 )
        {
          while ( v6 != &NiRoom::m_RTTI )
          {
            v6 = v6->m_pkBaseRTTI;
            if ( !v6 )
              goto LABEL_15;
          }
          NiRoom::DetachFixture((NiRoom *)v4->m_pkParent, &result, v4);
          if ( result.m_pObject )
          {
            v7 = result.m_pObject;
            if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
            {
              if ( v7 )
                v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
            }
          }
        }
      }
LABEL_15:
      v4->m_uFlags &= 0xFFFEu;
      ((void (__stdcall *)(NiAVObject *, signed int))_pDestNode->vfptr[29].__vecDelDtor)(v4, 1);
    }
    v8 = listcdNode._Myhead->_Next;
    if ( listcdNode._Myhead->_Next != listcdNode._Myhead )
    {
      v8->_Prev->_Next = v8->_Next;
      v8->_Next->_Prev = v8->_Prev;
      operator delete(v8);
      --listcdNode._Mysize;
    }
    LOBYTE(v18) = 1;
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  }
  NiAVObject::Update((NiAVObject *)&_pDestNode->vfptr, 0.0, 1);
  kFindcdNode.vfptr = (Ns_TourSceneVtbl *)&Ns_TourScene::`vftable';
  v9 = listcdNode._Myhead->_Next;
  listcdNode._Myhead->_Next = listcdNode._Myhead;
  listcdNode._Myhead->_Prev = listcdNode._Myhead;
  v10 = listcdNode._Myhead;
  listcdNode._Mysize = 0;
  if ( v9 != listcdNode._Myhead )
  {
    do
    {
      v11 = v9->_Next;
      operator delete(v9);
      v10 = listcdNode._Myhead;
      v9 = v11;
    }
    while ( v11 != listcdNode._Myhead );
  }
  operator delete(v10);
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9B8DD0: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *Ns_TourScene::`vftable')(Ns_TourScene *this, NiAVObject *_pkObject, void *);
// 9BC69C: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *FindMultiCDNode::`vftable')(FindMultiCDNode *this, NiAVObject *_pkObject, void *);

//----- (0067C820) --------------------------------------------------------
char __thiscall World::LoadMap(World *this, bool bSameMap)
{
  World *v2; // edi@1
  unsigned int v3; // esi@1
  unsigned int v4; // esi@7
  CMagicCircleController *v6; // ecx@15
  MapInfo *v7; // eax@15
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v8; // esi@29
  NiNode *v9; // esi@31
  NiNode *v10; // eax@31
  _iobuf *v11; // ebx@40
  NiNode *v12; // esi@41
  volatile LONG *v13; // eax@42
  char *v14; // eax@54
  char v15; // cl@55
  char *v16; // eax@58
  const char *v17; // eax@58
  int v18; // esi@62
  float v19; // eax@76
  NiRefObjectVtbl *v20; // edx@76
  _iobuf *v21; // esi@76
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v22; // eax@78
  double v23; // st7@82
  float v24; // ecx@82
  MapViewInfo *v25; // eax@86
  MapViewInfo *v26; // eax@91
  NiNode *v27; // eax@96
  NiD3DDefaultShader *v28; // eax@97
  NiNode *v29; // eax@99
  NiD3DDefaultShader *v30; // eax@100
  float v31; // eax@102
  NiRefObjectVtbl *v32; // edx@102
  float v33; // eax@102
  NiRefObjectVtbl *v34; // edx@102
  NiObject *v35; // eax@111
  NiNode *v36; // esi@111
  NiPointer<NiAVObject> v37; // eax@111
  float v38; // ebx@111
  NiNode *v39; // eax@114
  int v40; // eax@115
  int v41; // edi@115
  void (__thiscall *v42)(int, _DWORD, _DWORD); // eax@117
  bool v43; // zf@118
  NsFadeNode *v44; // eax@119
  NiAVObject *v45; // eax@120
  NiAVObject *v46; // ebx@120
  void *(__thiscall *v47)(NiRefObject *, unsigned int); // edx@124
  NsFadeNode *v48; // eax@131
  NiAVObject *v49; // eax@132
  NiAVObject *v50; // ebx@132
  void *(__thiscall *v51)(NiRefObject *, unsigned int); // eax@136
  World::AniObjectType *v52; // eax@142
  float v53; // edx@142
  NiAVObject *v54; // eax@148
  signed int v55; // esi@148
  NiAVObject *v56; // eax@149
  NiNode *v57; // eax@152
  double v58; // st7@152
  _iobuf *v59; // esi@152
  CDataDocument *v60; // eax@164
  char *v61; // eax@165
  CDataDocument *v62; // eax@165
  void *v63; // [sp+74h] [bp-764h]@72
  float *v64; // [sp+78h] [bp-760h]@72
  float fMult; // [sp+7Ch] [bp-75Ch]@72
  float fTime; // [sp+80h] [bp-758h]@48
  float fDepth; // [sp+84h] [bp-754h]@15
  NsEffect kEffect; // [sp+98h] [bp-740h]@130
  float fFogDepth; // [sp+BCh] [bp-71Ch]@79
  World *v70; // [sp+C0h] [bp-718h]@1
  NiPoint3 kPos; // [sp+C4h] [bp-714h]@110
  float fScale; // [sp+D0h] [bp-708h]@110
  bool b; // [sp+D7h] [bp-701h]@152
  float fFrustumFar; // [sp+D8h] [bp-700h]@83
  bool a; // [sp+DFh] [bp-6F9h]@152
  _iobuf *fp; // [sp+E0h] [bp-6F8h]@40
  float fB; // [sp+E4h] [bp-6F4h]@77
  float fG; // [sp+E8h] [bp-6F0h]@77
  float fR; // [sp+ECh] [bp-6ECh]@77
  NiPointer<NiAVObject> spCD; // [sp+F0h] [bp-6E8h]@5
  NiColor kColor; // [sp+F4h] [bp-6E4h]@6
  int iNum; // [sp+100h] [bp-6D8h]@47
  NiPointer<NsFadeNode> spFadeNode; // [sp+104h] [bp-6D4h]@114
  MapViewInfo *i; // [sp+108h] [bp-6D0h]@5
  NiPointer<NiNode> spNode; // [sp+10Ch] [bp-6CCh]@15
  NsTextCodeV0_3 kFileReader; // [sp+110h] [bp-6C8h]@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v87; // [sp+240h] [bp-598h]@78
  NsFindObjectByName kFindObject; // [sp+25Ch] [bp-57Ch]@45
  float fQuater[4]; // [sp+298h] [bp-540h]@110
  char pMapLoadFolderName; // [sp+2A8h] [bp-530h]@5
  char asdf[256]; // [sp+3ACh] [bp-42Ch]@10
  char acFileName[260]; // [sp+4ACh] [bp-32Ch]@15
  char acTempText[256]; // [sp+5B0h] [bp-228h]@46
  char acFileBuff[256]; // [sp+6B0h] [bp-128h]@45
  char acMapName[13]; // [sp+7B0h] [bp-28h]@5
  char szNonChar[5]; // [sp+7C0h] [bp-18h]@7
  int v97; // [sp+7D4h] [bp-4h]@5

  v2 = this;
  v3 = 0;
  v70 = this;
  this->m_bChangeFogFlag = 0;
  if ( !bSameMap && this->m_MiniHouseIndoorMode.m_eState )
  {
    OutputDebugStringA("MiniHouse Out\n");
    MiniHouseIndoor::Out(&v2->m_MiniHouseIndoorMode);
  }
  World::NowLoadingText(v2, 40);
  if ( bSameMap )
  {
    *(float *)&spCD.m_pObject = 0.0;
    v97 = 0;
    MapInfoTab::GetByMapName(&v2->m_kMapName);
    World::LoadMapLightCtrl(v2, acMapName);
    World::GetLoadFolderName(v2, &pMapLoadFolderName, "shmd");
    NsTextCodeV0_3::NsTextCodeV0_3(&kFileReader);
    LOBYTE(v97) = 1;
    LOWORD(i) = 35;
    std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::clear((std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > *)&kFileReader.m_setOperater.comp);
    do
      std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::insert(
        (std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > *)&kFileReader.m_setOperater.comp,
        (std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > >,bool> *)&kColor.g,
        (const char *)&i + v3++,
        0);
    while ( v3 < 2 );
    szNonChar[4] = 0;
    *(_DWORD *)szNonChar = 218696224;
    std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::clear((std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > *)&kFileReader.m_setNoChar.comp);
    v4 = 0;
    do
      std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::insert(
        (std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > *)&kFileReader.m_setNoChar.comp,
        (std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > >,bool> *)&kColor.g,
        &szNonChar[v4++],
        0);
    while ( v4 < 5 );
    if ( NsTextCodeV0_3::ReadFile(&kFileReader, &pMapLoadFolderName) && NsTextCodeV0_3::GetWord(&kFileReader, asdf) )
    {
      do
      {
        if ( !NiStricmp(asdf, inTwo) )
        {
          NsTextCodeV0_3::GetWord(&kFileReader, asdf);
          *(float *)szNonChar = atof(asdf);
          World::SetFogDepth(v2, *(float *)szNonChar);
        }
      }
      while ( NsTextCodeV0_3::GetWord(&kFileReader, asdf) );
    }
    LOBYTE(v97) = 0;
    v2->m_kWorldFrustum.m_fFar = MachineOpt::ms_kGraphicOption.fViewTerrainRate
                               * MachineOpt::ms_kGraphicOption.fViewTerrainLength;
    NsTextCodeV0_3::~NsTextCodeV0_3(&kFileReader);
    return 1;
  }
  NetMgr::SendHeartBeat2WorldMgrServer(&g_kNetMgr);
  World::Clear(v2);
  v6 = v2->m_spMagicCircleController.m_pObject;
  fDepth = *(float *)&v2->m_pkTerrain;
  *(float *)&v2->m_kCharSelectMarkDecal.m_pkHpTerrain = fDepth;
  CMagicCircleController::ResetInitTerrain(v6, (PgNsTerrain *)LODWORD(fDepth));
  DecalMgr::SetHeightFieldTerrain(&v2->m_kDecalMgr, v2->m_pkTerrain);
  spNode.m_pObject = 0;
  v97 = 2;
  acFileName[0] = 0;
  memset(&acFileName[1], 0, 0x103u);
  i = MapViewInfoTab::GetByMapName(&v2->m_kMapName);
  v7 = MapInfoTab::GetByMapName(&v2->m_kMapName);
  *(_DWORD *)acMapName = v7->MapFolderName.n3_code[0];
  *(_DWORD *)&acMapName[4] = v7->MapFolderName.n3_code[1];
  *(_DWORD *)&acMapName[8] = v7->MapFolderName.n3_code[2];
  acMapName[12] = 0;
  unk_A96B30 = 0;
  if ( !strcmp((const char *)&off_9BC4A0, acMapName) )
    unk_A96B30 = 1;
  if ( !strcmp((const char *)&off_9BC4A4, acMapName) )
    unk_A96B30 = 1;
  if ( !strcmp("RouN", acMapName) )
    unk_A96B30 = 1;
  if ( !strcmp((const char *)&off_9BC4B0, acMapName) )
    unk_A96B30 = 1;
  if ( !strcmp((const char *)&off_9BC4B4, acMapName) )
    unk_A96B30 = 1;
  if ( !strcmp("Bera", acMapName) )
    unk_A96B30 = 1;
  World::GetLoadFolderName(v2, acFileName, off_9BC4C0);
  World::NowLoadingText(v2, 60);
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = &v2->m_pkTerrain->m_kAppRootPath.m_strDefaultPath;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    v8,
    &Folder::m_acMain,
    strlen(&Folder::m_acMain));
  if ( std::basic_string<char,std::char_traits<char>,std::allocator<char>>::rfind(v8, "\\", 0xFFFFFFFF, 1u) < v8->_Mysize - 1 )
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(v8, 1u, 92);
  PgNsTerrain::LoadData(v2->m_pkTerrain, acFileName);
  World::NowLoadingText(v2, 70);
  v9 = v2->m_pkTerrain->m_spScene.m_pObject;
  v10 = spNode.m_pObject;
  if ( spNode.m_pObject != v9 )
  {
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && spNode.m_pObject )
      spNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spNode.m_pObject, 1u);
    spNode.m_pObject = v9;
    if ( !v9 )
      goto LABEL_40;
    InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
    v10 = spNode.m_pObject;
  }
  if ( v10 )
    ((void (__stdcall *)(NiNode *, signed int))v2->m_spGroundTerrain.m_pObject->vfptr[29].__vecDelDtor)(v10, 1);
LABEL_40:
  NetMgr::SendHeartBeat2WorldMgrServer(&g_kNetMgr);
  MapObjMgr::RemoveAll(&g_kMapObjMgr);
  World::GetLoadFolderName(v2, acFileName, "shmd");
  v11 = fopen(acFileName, "r");
  fp = v11;
  if ( !v11 )
  {
    v12 = spNode.m_pObject;
    v97 = -1;
    if ( spNode.m_pObject )
    {
      v13 = (volatile LONG *)&spNode.m_pObject->m_uiRefCount;
LABEL_169:
      if ( !InterlockedDecrement(v13) && v12 )
        v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
      return 0;
    }
    return 0;
  }
  if ( v2->m_MapType == 2 )
  {
    OutputDebugStringA("Welcome To MiniHouse\n");
    MiniHouseIndoor::Join(&v2->m_MiniHouseIndoorMode, unk_A99590);
  }
  kFindObject.m_pCallBack = 0;
  kFindObject.m_nCurLevel = -1;
  kFindObject.vfptr = (Ns_TourSceneVtbl *)&NsFindObjectByName::`vftable';
  kFindObject.m_szName._Myres = 15;
  kFindObject.m_szName._Mysize = 0;
  kFindObject.m_szName._Bx._Buf[0] = 0;
  kFindObject.m_vecObject._Myfirst = 0;
  kFindObject.m_vecObject._Mylast = 0;
  kFindObject.m_vecObject._Myend = 0;
  LOBYTE(v97) = 3;
  if ( !fgets(acFileBuff, 256, v11) )
    goto error;
  fDepth = COERCE_FLOAT(acTempText);
  sscanf(acFileBuff, "%s", acTempText);
  if ( strcmp(acTempText, "shmd0_5") )
    goto error;
  iNum = 0;
  if ( !fgets(acFileBuff, 256, v11) )
    goto error;
  fDepth = COERCE_FLOAT(&iNum);
  fTime = COERCE_FLOAT(acTempText);
  sscanf(acFileBuff, "%s %d", acTempText, &iNum);
  if ( strcmp(acTempText, (const char *)&off_9BC4FC) )
    goto error;
  if ( iNum )
  {
    if ( !fgets(acFileBuff, 256, v11) )
      goto error;
    sscanf(acFileBuff, "%s", acTempText);
    fDepth = COERCE_FLOAT(acTempText);
    fTime = COERCE_FLOAT(Folder::Main());
    sprintf(acFileName, "%s%s", fTime, acTempText);
    PgUtil::LoadNodeNifFile(acFileName, &spNode, 0);
    if ( !spNode.m_pObject )
      goto error;
    ((void (__stdcall *)(NiNode *, signed int))v2->m_spSkyScene.m_pObject->vfptr[29].__vecDelDtor)(spNode.m_pObject, 1);
    v2->m_kSkyCtrl.vfptr->SetNode(&v2->m_kSkyCtrl, spNode.m_pObject);
  }
  NiAVObject::UpdateEffects((NiAVObject *)&v2->m_spSkyScene.m_pObject->vfptr);
  NiAVObject::UpdateProperties((NiAVObject *)&v2->m_spSkyScene.m_pObject->vfptr);
  NiAVObject::Update((NiAVObject *)&v2->m_spSkyScene.m_pObject->vfptr, 0.0, 1);
  if ( i )
  {
    v14 = i->WeatherEffect;
    do
      v15 = *v14++;
    while ( v15 );
    if ( v14 != &i->WeatherEffect[1] )
    {
      if ( strcmp(i->WeatherEffect, "-") )
      {
        LODWORD(fDepth) = (char *)i + 177;
        *(float *)&v16 = COERCE_FLOAT(Folder::Effect());
        fTime = *(float *)&v16;
        v17 = fs("%s%s.nif", v16, fDepth);
        if ( PgUtil::LoadNodeNifFile(v17, &spNode, 0) )
        {
          NiPointer<NiActorManager>::operator=(
            (NiPointer<NiPixelData> *)&v2->m_spWeatherEffectScene,
            (NiPointer<NiPixelData> *)&spNode);
          World::AttachEffect(v2, v2->m_spWeatherEffectScene.m_pObject);
        }
      }
    }
  }
  NetMgr::SendHeartBeat2WorldMgrServer(&g_kNetMgr);
  iNum = 0;
  if ( !fgets(acFileBuff, 256, v11)
    || (fDepth = COERCE_FLOAT(&iNum),
        fTime = COERCE_FLOAT(acTempText),
        sscanf(acFileBuff, "%s %d", acTempText, &iNum),
        strcmp(acTempText, "Water")) )
  {
error:
    fclose(fp);
    NsFindObjectByName::~NsFindObjectByName(&kFindObject);
    v97 = -1;
    if ( spNode.m_pObject )
    {
      v12 = spNode.m_pObject;
      v13 = (volatile LONG *)&spNode.m_pObject->m_uiRefCount;
      goto LABEL_169;
    }
    return 0;
  }
  v18 = 0;
  if ( iNum > 0 )
  {
    while ( fgets(acFileBuff, 256, v11) )
    {
      sscanf(acFileBuff, "%s", acTempText);
      fDepth = COERCE_FLOAT(acTempText);
      fTime = COERCE_FLOAT(Folder::Main());
      sprintf(acFileName, "%s%s", fTime, acTempText);
      PgUtil::LoadNodeNifFile(acFileName, &spNode, 0);
      if ( !spNode.m_pObject )
        break;
      ((void (__stdcall *)(NiNode *, signed int))v2->m_spWaterScene.m_pObject->vfptr[29].__vecDelDtor)(
        spNode.m_pObject,
        1);
      if ( ++v18 >= iNum )
        goto LABEL_66;
    }
    goto error;
  }
LABEL_66:
  World::NowLoadingText(v2, 85);
  NetMgr::SendHeartBeat2WorldMgrServer(&g_kNetMgr);
  iNum = 0;
  if ( !fgets(acFileBuff, 256, v11) )
    goto error;
  fDepth = COERCE_FLOAT(&iNum);
  fTime = COERCE_FLOAT(acTempText);
  sscanf(acFileBuff, "%s %d", acTempText, &iNum);
  if ( strcmp(acTempText, "GroundObject") )
    goto error;
  NsMergePortal::Init(&v2->m_kMergePortal);
  i = 0;
  if ( iNum > 0 )
  {
    while ( fgets(acFileBuff, 256, fp) )
    {
      fDepth = COERCE_FLOAT(acTempText);
      sscanf(acFileBuff, "%s", acTempText);
      fDepth = COERCE_FLOAT(acTempText);
      fTime = COERCE_FLOAT(Folder::Main());
      sprintf(acFileName, "%s%s", fTime, fDepth);
      PgUtil::LoadNodeNifFile(acFileName, &spNode, 0);
      if ( !spNode.m_pObject )
        break;
      _itoa(nnn, asdf, 10);
      NiObjectNET::SetName((NiObjectNET *)&spNode.m_pObject->vfptr, asdf);
      ++nnn;
      NiAVObject::Update((NiAVObject *)&spNode.m_pObject->vfptr, 0.0, 1);
      ProcessCDNode(spNode.m_pObject, v2->m_spGroundObjectCollidee.m_pObject);
      ProcessMNode(spNode.m_pObject, v2->m_spUseCameraCollidee.m_pObject);
      if ( v2->m_MiniHouseIndoorMode.m_eState )
      {
        fMult = 0.0;
        v64 = &fMult;
        fTime = 0.0;
        fDepth = 0.0;
        *(float *)&spCD.m_pObject = COERCE_FLOAT(&v64);
        NiPointer<NiNode>::NiPointer<NiNode>((NiPointer<NiNode> *)&v64, &v2->m_spGroundObjectCollidee);
        v63 = spNode.m_pObject;
        *(float *)&spCD.m_pObject = COERCE_FLOAT(&v63);
        if ( spNode.m_pObject )
          InterlockedIncrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
        MiniHouseIndoor::SetupRoom(
          &v2->m_MiniHouseIndoorMode,
          (NiPointer<NiNode>)v63,
          (NiPointer<NiNode>)v64,
          *(MiniHouseRoomInfo::TexStyleGroup *)&fMult);
      }
      ((void (__stdcall *)(NiNode *, signed int))v2->m_spGroundObject.m_pObject->vfptr[29].__vecDelDtor)(
        spNode.m_pObject,
        1);
      NsMergePortal::process(&v2->m_kMergePortal, spNode.m_pObject);
      i = (MapViewInfo *)((char *)i + 1);
      if ( (signed int)i >= iNum )
        goto LABEL_76;
    }
    goto error;
  }
LABEL_76:
  v19 = *(float *)&v2->m_kMergePortal.m_spRoomGroup.m_pObject;
  v20 = v2->m_spGroundObject.m_pObject->vfptr;
  LODWORD(fDepth) = 1;
  fTime = v19;
  ((void (__stdcall *)(_DWORD, signed int))v20[29].__vecDelDtor)(LODWORD(v19), 1);
  NetMgr::SendHeartBeat2WorldMgrServer(&g_kNetMgr);
  v21 = fp;
  if ( !fgets(acFileBuff, 256, fp) )
    goto error;
  fDepth = COERCE_FLOAT(&fB);
  fTime = COERCE_FLOAT(&fG);
  fMult = COERCE_FLOAT(&fR);
  v64 = (float *)acTempText;
  sscanf(acFileBuff, "%s %f %f %f", acTempText, &fR, &fG, &fB);
  if ( strcmp(acTempText, "GlobalLight") )
    goto error;
  World::ClearGlobalLightMap(v2);
  kColor.r = fR;
  kColor.g = fG;
  kColor.b = fB;
  World::AddGlobalLight(v2, 0, &kColor);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
    &v87,
    acMapName);
  LOBYTE(v97) = 4;
  World::LoadLightInfoNode(v2, v22);
  LOBYTE(v97) = 3;
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v87);
  World::ChangeGlobalAmbLight(v2, 0);
  if ( !fgets(acFileBuff, 256, v21) )
    goto error;
  fDepth = COERCE_FLOAT(&fB);
  fTime = COERCE_FLOAT(&fG);
  fMult = COERCE_FLOAT(&fR);
  v64 = &fFogDepth;
  v63 = acTempText;
  sscanf(acFileBuff, "%s %f %f %f %f", acTempText, &fFogDepth, &fR, &fG, &fB);
  if ( strcmp(acTempText, (const char *)&off_9BC584) )
    goto error;
  kColor.r = fR;
  kColor.g = fG;
  kColor.b = fB;
  World::SetFogColor(v2, &kColor);
  World::SetFogDepth(v2, fFogDepth);
  if ( !fgets(acFileBuff, 256, v21) )
    goto error;
  fDepth = COERCE_FLOAT(&fB);
  fTime = COERCE_FLOAT(&fG);
  fMult = COERCE_FLOAT(&fR);
  v64 = (float *)acTempText;
  sscanf(acFileBuff, "%s %f %f %f", acTempText, &fR, &fG, &fB);
  if ( strcmp(acTempText, "BackGroundColor") )
    goto error;
  fDepth = *(float *)&v21;
  kColor.r = fR;
  v23 = fG;
  v2->m_kBackGroundColor.r = fR;
  kColor.g = v23;
  kColor.b = fB;
  v24 = fB;
  LODWORD(fTime) = 256;
  v2->m_kBackGroundColor.g = kColor.g;
  fMult = COERCE_FLOAT(acFileBuff);
  v2->m_kBackGroundColor.b = v24;
  if ( !fgets((char *)LODWORD(fMult), SLODWORD(fTime), (_iobuf *)LODWORD(fDepth)) )
    goto error;
  fDepth = COERCE_FLOAT(&fFrustumFar);
  fTime = COERCE_FLOAT(acTempText);
  sscanf(acFileBuff, "%s %f", acTempText, &fFrustumFar);
  if ( strcmp(acTempText, "Frustum") )
    goto error;
  if ( fFrustumFar > 20000.0 )
    fFrustumFar = 20000.0;
  MachineOpt::SetViewTerrainLength(fFrustumFar);
  NetMgr::SendHeartBeat2WorldMgrServer(&g_kNetMgr);
  ((void (__stdcall *)(char *, NiNode *))v2->m_spBuildingScene.m_pObject->vfptr[30].__vecDelDtor)(
    szNonChar,
    v2->m_spBDNotAni.m_pObject);
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)szNonChar);
  ((void (__stdcall *)(char *, NiNode *))v2->m_spBuildingScene.m_pObject->vfptr[30].__vecDelDtor)(
    szNonChar,
    v2->m_spBDAni.m_pObject);
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)szNonChar);
  v25 = (MapViewInfo *)v2->m_spBDNotAni.m_pObject;
  i = v25;
  if ( v25 )
  {
    if ( !InterlockedDecrement((volatile LONG *)((char *)&v25->MapName.n3_code[0] + 2)) && i )
      (**(void (__stdcall ***)(_DWORD))&i->ID)(1);
    v2->m_spBDNotAni.m_pObject = 0;
  }
  v26 = (MapViewInfo *)v2->m_spBDAni.m_pObject;
  i = v26;
  if ( v26 )
  {
    if ( !InterlockedDecrement((volatile LONG *)((char *)&v26->MapName.n3_code[0] + 2)) && i )
      (**(void (__stdcall ***)(_DWORD))&i->ID)(1);
    v2->m_spBDAni.m_pObject = 0;
  }
  *(float *)&v27 = COERCE_FLOAT(operator new(0xE8u));
  spCD.m_pObject = (NiAVObject *)v27;
  LOBYTE(v97) = 5;
  if ( *(float *)&v27 == 0.0 )
    v28 = 0;
  else
    NiNode::NiNode(v27, 0);
  LOBYTE(v97) = 3;
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spBDNotAni, v28);
  *(float *)&v29 = COERCE_FLOAT(operator new(0xE8u));
  spCD.m_pObject = (NiAVObject *)v29;
  LOBYTE(v97) = 6;
  if ( *(float *)&v29 == 0.0 )
    v30 = 0;
  else
    NiNode::NiNode(v29, 0);
  LOBYTE(v97) = 3;
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spBDAni, v30);
  v31 = *(float *)&v2->m_spBDAni.m_pObject;
  v32 = v2->m_spBuildingScene.m_pObject->vfptr;
  LODWORD(fDepth) = 1;
  fTime = v31;
  ((void (__stdcall *)(_DWORD, signed int))v32[29].__vecDelDtor)(LODWORD(v31), 1);
  v33 = *(float *)&v2->m_spBDNotAni.m_pObject;
  v34 = v2->m_spBuildingScene.m_pObject->vfptr;
  LODWORD(fDepth) = 1;
  fTime = v33;
  ((void (__stdcall *)(_DWORD, signed int))v34[29].__vecDelDtor)(LODWORD(v33), 1);
  World::ResetShadowTerrian(v2);
  NsMakeQuadScene::SetData(&v2->kQaudSceneMakerAni, 5, 512, 50.0, v2->m_spBDAni.m_pObject);
  NsMakeQuadScene::SetData(&v2->kQaudSceneMakerNotAni, 5, 512, 50.0, v2->m_spBDNotAni.m_pObject);
  std::list<NiAVObject *,std::allocator<NiAVObject *>>::resize(&v2->m_vecAniObject, 0);
  while ( fgets(acFileBuff, 256, fp) )
  {
    fDepth = COERCE_FLOAT(acTempText);
    sscanf(acFileBuff, "%s", acTempText);
    if ( !strcmp(acTempText, "DataObjectLoadingEnd") )
      break;
    fDepth = COERCE_FLOAT(&iNum);
    fTime = COERCE_FLOAT(acTempText);
    if ( sscanf(acFileBuff, "%s %d", acTempText, &iNum) != 2 )
      goto error;
    fDepth = COERCE_FLOAT(acTempText);
    fTime = COERCE_FLOAT(Folder::Main());
    sprintf(acFileName, "%s%s", fTime, fDepth);
    PgUtil::LoadNodeNifFile(acFileName, &spNode, v2->m_spTexturePalette.m_pObject);
    if ( spNode.m_pObject )
      BYTE3(i) = IsAniObject((NiAVObject *)&spNode.m_pObject->vfptr);
    else
      BYTE3(i) = 0;
    *(_DWORD *)szNonChar = 0;
    if ( iNum > 0 )
    {
      while ( fgets(acFileBuff, 256, fp) )
      {
        fDepth = COERCE_FLOAT(&fScale);
        fTime = COERCE_FLOAT(&fQuater[3]);
        fMult = COERCE_FLOAT(&fQuater[2]);
        v64 = &fQuater[1];
        v63 = fQuater;
        sscanf(
          acFileBuff,
          "%f %f %f %f %f %f %f %f",
          &kPos,
          &kPos.y,
          &kPos.z,
          fQuater,
          &fQuater[1],
          &fQuater[2],
          &fQuater[3],
          &fScale);
        *(float *)&v87._Mysize = fQuater[0];
        *(float *)&v87._Myres = fQuater[1];
        COERCE_FLOAT(v87._Alval.0) = fQuater[2];
        *(float *)&v87._Bx._Alias[12] = fQuater[3];
        if ( spNode.m_pObject )
        {
          NiObjectNET::ms_eCopyType = 1;
          v35 = NiObject::Clone((NiObject *)&spNode.m_pObject->vfptr);
          v36 = (NiNode *)v35;
          *(float *)&v37.m_pObject = COERCE_FLOAT((int)v35->vfptr[18].__vecDelDtor(
                                                         (NiRefObject *)v35,
                                                         (unsigned int)&off_9BC5F8));
          v38 = *(float *)&v37.m_pObject;
          spCD.m_pObject = v37.m_pObject;
          if ( *(float *)&v37.m_pObject != 0.0 )
            InterlockedIncrement((volatile LONG *)&v37.m_pObject->m_uiRefCount);
          LOBYTE(v97) = 7;
          if ( v38 != 0.0 )
          {
            *(_WORD *)(LODWORD(v38) + 28) &= 0xFFFEu;
            *(float *)&v39 = COERCE_FLOAT(operator new(0xE8u));
            spFadeNode.m_pObject = (NsFadeNode *)v39;
            LOBYTE(v97) = 8;
            if ( *(float *)&v39 == 0.0 )
            {
              v41 = 0;
            }
            else
            {
              NiNode::NiNode(v39, 0);
              v41 = v40;
            }
            *(NiPoint3 *)(v41 + 88) = kPos;
            LOBYTE(v97) = 7;
            NiQuaternion::ToRotation((NiQuaternion *)&v87._Bx._Alias[12], (NiMatrix3 *)(v41 + 52));
            v42 = *(void (__thiscall **)(int, _DWORD, _DWORD))(*(_DWORD *)v41 + 116);
            *(float *)&spFadeNode.m_pObject = fabs(fScale);
            fDepth = 0.0;
            fTime = v38;
            *(float *)(v41 + 100) = *(float *)&spFadeNode.m_pObject;
            v42(v41, LODWORD(fTime), LODWORD(fDepth));
            ((void (__stdcall *)(int, signed int))v70->m_spGroundObjectCollidee.m_pObject->vfptr[29].__vecDelDtor)(
              v41,
              1);
            v2 = v70;
          }
          v36->m_kLocal.m_Translate = kPos;
          NiQuaternion::ToRotation((NiQuaternion *)&v87._Bx._Alias[12], &v36->m_kLocal.m_Rotate);
          v43 = BYTE3(i) == 0;
          *(float *)&spFadeNode.m_pObject = fabs(fScale);
          v36->m_kLocal.m_fScale = *(float *)&spFadeNode.m_pObject;
          if ( v43 )
          {
            *(float *)&v44 = COERCE_FLOAT(operator new(0x168u));
            spFadeNode.m_pObject = v44;
            LOBYTE(v97) = 9;
            if ( *(float *)&v44 == 0.0 )
            {
              *(float *)&v46 = 0.0;
            }
            else
            {
              NsFadeNode::NsFadeNode(v44, v36, 1);
              v46 = v45;
            }
            spFadeNode.m_pObject = (NsFadeNode *)v46;
            if ( *(float *)&v46 != 0.0 )
              InterlockedIncrement((volatile LONG *)&v46->m_uiRefCount);
            v47 = v36->vfptr->__vecDelDtor;
            LOBYTE(v97) = 10;
            v47((NiRefObject *)&v36->vfptr, 1u);
            NiAVObject::Update(v46, 0.0, 1);
            if ( !NsMakeQuadScene::AddObject(&v2->kQaudSceneMakerNotAni, v46) && *(float *)&v46 != 0.0 )
            {
              if ( !InterlockedDecrement((volatile LONG *)&v46->m_uiRefCount) )
                v46->vfptr->__vecDelDtor((NiRefObject *)v46, 1u);
              *(float *)&spFadeNode.m_pObject = 0.0;
            }
            LOBYTE(v97) = 7;
            NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spFadeNode);
          }
          else
          {
            NiAVObject::Update((NiAVObject *)&v36->vfptr, 0.0, 1);
            NiAVObject::Update((NiAVObject *)&v36->vfptr, 0.0, 1);
            NsEffect::NsEffect(&kEffect);
            LOBYTE(v97) = 11;
            NsEffect::SetEffectNode(&kEffect, (NiAVObject *)&v36->vfptr);
            NsEffect::Start(&kEffect, Timer::ms_fCurTime);
            if ( 0.0 == kEffect.m_fMaxTime )
            {
              *(float *)&v48 = COERCE_FLOAT(operator new(0x168u));
              spFadeNode.m_pObject = v48;
              LOBYTE(v97) = 12;
              if ( *(float *)&v48 == 0.0 )
              {
                *(float *)&v50 = 0.0;
              }
              else
              {
                NsFadeNode::NsFadeNode(v48, v36, 1);
                v50 = v49;
              }
              spFadeNode.m_pObject = (NsFadeNode *)v50;
              if ( *(float *)&v50 != 0.0 )
                InterlockedIncrement((volatile LONG *)&v50->m_uiRefCount);
              v51 = v36->vfptr->__vecDelDtor;
              LOBYTE(v97) = 13;
              v51((NiRefObject *)&v36->vfptr, 1u);
              NiAVObject::Update(v50, 0.0, 1);
              if ( !NsMakeQuadScene::AddObject(&v2->kQaudSceneMakerNotAni, v50) && *(float *)&v50 != 0.0 )
              {
                if ( !InterlockedDecrement((volatile LONG *)&v50->m_uiRefCount) )
                  v50->vfptr->__vecDelDtor((NiRefObject *)v50, 1u);
                *(float *)&spFadeNode.m_pObject = 0.0;
              }
              LOBYTE(v97) = 11;
              NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spFadeNode);
            }
            else
            {
              spFadeNode.m_pObject = (NsFadeNode *)v36;
              std::list<enum  ABSTATEINDEX,std::allocator<enum  ABSTATEINDEX>>::push_back(
                (std::list<enum ABSTATEINDEX,std::allocator<enum ABSTATEINDEX> > *)&v2->m_vecAniObject,
                (ABSTATEINDEX *)&spFadeNode);
              kColor.g = kEffect.m_fMaxTime;
              kColor.b = Timer::ms_fCurTime;
              spFadeNode.m_pObject = (NsFadeNode *)v36;
              v52 = std::map<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>>::operator[](
                      &v2->m_mapBoundTime,
                      (NiAVObject *const *)&spFadeNode);
              v53 = kColor.b;
              v52->fMaxTime = kColor.g;
              fDepth = *(float *)&v36;
              v52->fStartTime = v53;
              if ( !NsMakeQuadScene::AddObject(&v2->kQaudSceneMakerAni, (NiAVObject *)LODWORD(fDepth)) )
                v36->vfptr->__vecDelDtor((NiRefObject *)v36, 1u);
            }
            LOBYTE(v97) = 7;
            NsEffect::~NsEffect(&kEffect);
          }
          LOBYTE(v97) = 3;
          NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spCD);
        }
        if ( ++*(_DWORD *)szNonChar >= iNum )
          goto LABEL_147;
      }
      goto error;
    }
LABEL_147:
    ;
  }
  World::NowLoadingText(v2, 90);
  NiAVObject::Update((NiAVObject *)&v2->m_spGroundObjectCollidee.m_pObject->vfptr, 0.0, 1);
  NiAVObject::SetCollisionObject((NiAVObject *)&v2->m_spGroundObject.m_pObject->vfptr, 0);
  NsMakeQuadScene::Optimize(&v2->kQaudSceneMakerNotAni);
  v54 = (NiAVObject *)&v2->m_spAllGroundScene.m_pObject->vfptr;
  kColor.r = 0.0;
  kColor.g = 0.0;
  kColor.b = 1.0;
  NiOptimizeABV::CreateWireABV(v54, &kColor, 1.0, "WireABVTemp", 0);
  NsFindObjectByName::FindObject(&kFindObject, v2->m_spAllGroundScene.m_pObject, "WireABVTemp");
  v55 = 0;
  if ( (signed int)(((char *)kFindObject.m_vecObject._Mylast - (char *)kFindObject.m_vecObject._Myfirst) & 0xFFFFFFFC) > 0 )
  {
    do
    {
      v56 = NsFindObjectByName::GetAt(&kFindObject, v55);
      if ( v56 )
        v56->m_uFlags |= 1u;
      ++v55;
    }
    while ( v55 < kFindObject.m_vecObject._Mylast - kFindObject.m_vecObject._Myfirst );
  }
  NiAVObject::UpdateProperties((NiAVObject *)&v2->m_spWorldScene.m_pObject->vfptr);
  NiAVObject::UpdateEffects((NiAVObject *)&v2->m_spWorldScene.m_pObject->vfptr);
  ((void (__stdcall *)(bool *, _DWORD, bool *))v2->m_spWorldScene.m_pObject->vfptr[19].__vecDelDtor)(&a, 0, &b);
  NiAVObject::Update((NiAVObject *)&v2->m_spWorldScene.m_pObject->vfptr, 0.0, 0);
  ((void (*)(void))v2->m_spWorldScene.m_pObject->vfptr[16].__vecDelDtor)();
  v57 = v2->m_spWorldScene.m_pObject;
  spCD.m_pObject = (NiAVObject *)LODWORD(v57->m_kWorldBound.m_fRadius);
  v58 = v57->m_kWorldBound.m_kCenter.z;
  fDepth = COERCE_FLOAT(&kColor);
  *(float *)&spCD.m_pObject = v58 + *(float *)&spCD.m_pObject;
  v2->m_fMaxHeight = *(float *)&spCD.m_pObject;
  kColor.r = 0.0;
  kColor.g = 0.0;
  kColor.b = 0.0;
  World::SetMapDirectionalLightAmbientColor(v2, (NiColor *)LODWORD(fDepth));
  v59 = fp;
  if ( fgets(acFileBuff, 256, fp) )
  {
    fDepth = COERCE_FLOAT(&fB);
    fTime = COERCE_FLOAT(&fG);
    fMult = COERCE_FLOAT(&fR);
    v64 = (float *)acTempText;
    sscanf(acFileBuff, "%s %f %f %f", acTempText, &fR, &fG, &fB);
    if ( !strcmp(acTempText, "DirectionLightAmbient") )
    {
      kColor.r = fR;
      kColor.g = fG;
      kColor.b = fB;
      World::SetMapDirectionalLightAmbientColor(v2, &kColor);
    }
  }
  kColor.r = 0.0;
  kColor.g = 0.0;
  kColor.b = 0.0;
  World::SetMapDirectionalLightDiffuseColor(v2, &kColor);
  if ( fgets(acFileBuff, 256, v59) )
  {
    fDepth = COERCE_FLOAT(&fB);
    fTime = COERCE_FLOAT(&fG);
    fMult = COERCE_FLOAT(&fR);
    v64 = (float *)acTempText;
    sscanf(acFileBuff, "%s %f %f %f", acTempText, &fR, &fG, &fB);
    if ( !strcmp(acTempText, "DirectionLightDiffuse") )
    {
      kColor.r = fR;
      kColor.g = fG;
      kColor.b = fB;
      World::SetMapDirectionalLightDiffuseColor(v2, &kColor);
    }
  }
  fclose(v59);
  NetMgr::SendHeartBeat2WorldMgrServer(&g_kNetMgr);
  World::NowLoadingText(v2, 95);
  World::GetLoadFolderName(v2, acFileName, "shbd");
  if ( !(unsigned __int8)((int (__stdcall *)(char *))v2->m_pkBlockInfo->vfptr->Load)(acFileName) )
  {
    NsFindObjectByName::~NsFindObjectByName(&kFindObject);
    v97 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  CFindWay::Load(&v2->kPathFindingNew, acFileName);
  World::GetLoadFolderName(v2, acFileName, off_9BC664);
  InstantBlock::RemoveAll(&v2->m_kInstantBlock);
  if ( InstantBlock::Load(&v2->m_kInstantBlock, acFileName) )
    v2->m_kInstantBlock.pFindWay = &v2->kPathFindingNew;
  World::GetLoadFolderName(v2, acFileName, off_9BC668);
  if ( !AreaInfoData::Load(&v2->m_kAreaInfoData, acFileName) )
    AreaInfoData::RemoveAll(&v2->m_kAreaInfoData);
  World::LoadPathFindingData(v2);
  NetMgr::SendHeartBeat2WorldMgrServer(&g_kNetMgr);
  World::LoadMapLightCtrl(v2, acMapName);
  World::GetLoadFolderName(v2, acFileName, "conf");
  fDepth = COERCE_FLOAT(acFileName);
  v60 = CDataDocument::Instance();
  if ( !CDataDocument::Load(v60, (const char *)LODWORD(fDepth)) )
  {
    fDepth = COERCE_FLOAT("Default.conf");
    v61 = Folder::Main();
    fDepth = COERCE_FLOAT(Folder::Merge(v61, (char *)LODWORD(fDepth)));
    v62 = CDataDocument::Instance();
    CDataDocument::Load(v62, (const char *)LODWORD(fDepth));
  }
  NiAVObject::Update((NiAVObject *)&v2->m_spWorldScene.m_pObject->vfptr, 0.0, 1);
  World::GetLoadFolderName(v2, acFileName, off_9BC684);
  NsFindObjectByName::~NsFindObjectByName(&kFindObject);
  v97 = -1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
  return 1;
}
// 9B9194: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *NsFindObjectByName::`vftable')(NsFindObjectByName *this, NiAVObject *_pkObject, void *);
// 9BC4A0: using guessed type void *off_9BC4A0;
// 9BC4A4: using guessed type void *off_9BC4A4;
// 9BC4B0: using guessed type void *off_9BC4B0;
// 9BC4B4: using guessed type void *off_9BC4B4;
// 9BC4FC: using guessed type void *off_9BC4FC;
// 9BC584: using guessed type void *off_9BC584;
// 9BC5F8: using guessed type void *off_9BC5F8;
// A8975C: using guessed type bool Folder::m_bInit;
// A8B97C: using guessed type float Timer::ms_fCurTime;
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (0067E310) --------------------------------------------------------
void __thiscall NiAVObject::SetCollisionObject(NiAVObject *this, NiCollisionObject *pkCollisionObject)
{
  NiAVObject *v2; // esi@1
  NiCollisionObject *v3; // edi@1
  NiD3DShaderProgram *v4; // ecx@8

  v2 = this;
  v3 = this->m_spCollisionObject.m_pObject;
  if ( v3 != pkCollisionObject )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spCollisionObject.m_pObject = pkCollisionObject;
    if ( pkCollisionObject )
      InterlockedIncrement((volatile LONG *)&pkCollisionObject->m_uiRefCount);
  }
  v4 = (NiD3DShaderProgram *)v2->m_spCollisionObject.m_pObject;
  if ( v4 )
  {
    if ( (NiAVObject *)NiGeometryData::GetGroup(v4) != v2 )
      ((void (__stdcall *)(_DWORD))v2->m_spCollisionObject.m_pObject->vfptr[15].__vecDelDtor)(v2);
  }
}

//----- (0067E390) --------------------------------------------------------
unsigned int __thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::rfind(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, const char *_Ptr, unsigned int _Off, unsigned int _Count)
{
  unsigned int v4; // edx@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v5; // edi@1
  unsigned int result; // eax@1
  unsigned int v7; // eax@5
  const char *i; // esi@9

  v4 = _Count;
  v5 = this;
  result = this->_Mysize;
  if ( _Count )
  {
    if ( _Count > result )
    {
LABEL_17:
      result = -1;
    }
    else
    {
      v7 = result - _Count;
      if ( _Off < v7 )
        v7 = _Off;
      if ( this->_Myres >= 0x10 )
        this = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)this->_Bx._Ptr;
      for ( i = &this->_Bx._Buf[v7]; *i != *_Ptr || std::char_traits<char>::compare(i, _Ptr, v4); --i )
      {
        if ( i == std::basic_string<char,std::char_traits<char>,std::allocator<char>>::c_str(v5) )
          goto LABEL_17;
        v4 = _Count;
      }
      if ( v5->_Myres >= 0x10 )
        v5 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v5->_Bx._Ptr;
      result = i - (const char *)v5;
    }
  }
  else if ( _Off < result )
  {
    result = _Off;
  }
  return result;
}

//----- (0067E420) --------------------------------------------------------
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>,std::_Iterator_base0>::operator--(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >,std::_Iterator_base0> *this)
{
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >,std::_Iterator_base0> *result; // eax@1
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v2; // ecx@1
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *i; // edx@3
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v4; // ecx@4
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v5; // edx@5

  result = this;
  v2 = this->_Ptr;
  if ( v2->_Isnil )
  {
    result->_Ptr = v2->_Right;
    return result;
  }
  i = v2->_Left;
  if ( !v2->_Left->_Isnil )
  {
    v4 = i->_Right;
    if ( !v4->_Isnil )
    {
      do
      {
        v5 = v4;
        v4 = v4->_Right;
      }
      while ( !v4->_Isnil );
      result->_Ptr = v5;
      return result;
    }
LABEL_11:
    result->_Ptr = i;
    return result;
  }
  for ( i = v2->_Parent; !i->_Isnil; i = i->_Parent )
  {
    if ( result->_Ptr != i->_Left )
      break;
    result->_Ptr = i;
  }
  if ( !result->_Ptr->_Isnil )
    goto LABEL_11;
  return result;
}

//----- (0067E480) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::_Lrotate(std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > *this, std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *_Wherenode)
{
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v3; // ecx@3
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v4; // ecx@5

  v2 = _Wherenode->_Right;
  _Wherenode->_Right = v2->_Left;
  if ( !v2->_Left->_Isnil )
    v2->_Left->_Parent = _Wherenode;
  v2->_Parent = _Wherenode->_Parent;
  v3 = this->_Myhead;
  if ( _Wherenode == v3->_Parent )
  {
    v3->_Parent = v2;
    v2->_Left = _Wherenode;
    _Wherenode->_Parent = v2;
  }
  else
  {
    v4 = _Wherenode->_Parent;
    if ( _Wherenode == v4->_Left )
    {
      v4->_Left = v2;
      v2->_Left = _Wherenode;
      _Wherenode->_Parent = v2;
    }
    else
    {
      v4->_Right = v2;
      v2->_Left = _Wherenode;
      _Wherenode->_Parent = v2;
    }
  }
}

//----- (0067E4E0) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::_Rrotate(std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > *this, std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *_Wherenode)
{
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v3; // esi@1
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v4; // ecx@3
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v5; // ecx@5

  v2 = _Wherenode->_Left;
  _Wherenode->_Left = _Wherenode->_Left->_Right;
  v3 = v2->_Right;
  if ( !v3->_Isnil )
    v3->_Parent = _Wherenode;
  v2->_Parent = _Wherenode->_Parent;
  v4 = this->_Myhead;
  if ( _Wherenode == v4->_Parent )
  {
    v4->_Parent = v2;
    v2->_Right = _Wherenode;
    _Wherenode->_Parent = v2;
  }
  else
  {
    v5 = _Wherenode->_Parent;
    if ( _Wherenode == v5->_Right )
    {
      v5->_Right = v2;
      v2->_Right = _Wherenode;
      _Wherenode->_Parent = v2;
    }
    else
    {
      v5->_Left = v2;
      v2->_Right = _Wherenode;
      _Wherenode->_Parent = v2;
    }
  }
}

//----- (0067E540) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::_Erase(std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > *this, std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *_Rootnode)
{
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v2; // edi@1
  std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > *v3; // ebx@1
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *i; // esi@1

  v2 = _Rootnode;
  v3 = this;
  for ( i = _Rootnode; !i->_Isnil; v2 = i )
  {
    std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::_Erase(v3, i->_Right);
    i = i->_Left;
    operator delete(v2);
  }
}

//----- (0067E580) --------------------------------------------------------
std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > > *__thiscall std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::_Insert(std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > *this, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *_Newnode)
{
  unsigned int v5; // eax@1
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v6; // edi@4
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v7; // edx@4
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v8; // edx@7
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v9; // edx@9
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v10; // eax@11
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v11; // edx@12
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v12; // esi@12
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v13; // esi@13
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v14; // edx@16
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v15; // esi@18
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v16; // esi@20
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v17; // edx@24
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v18; // esi@24
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v19; // edi@24
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v20; // edi@26
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v21; // edi@28
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v22; // esi@31
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v23; // edx@34
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v24; // esi@34
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v25; // esi@36
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v26; // esi@38
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v27; // edi@44
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v28; // edi@46
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v29; // ecx@52
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > > *v30; // eax@52

  v5 = this->_Mysize;
  if ( v5 >= 0xFFFFFFFE )
  {
    operator delete(_Newnode);
    std::_Xlength_error("map/set<T> too long");
  }
  this->_Mysize = v5 + 1;
  v6 = _Newnode;
  _Newnode->_Parent = _Wherenode;
  v7 = this->_Myhead;
  if ( _Wherenode == v7 )
  {
    v7->_Parent = _Newnode;
    this->_Myhead->_Left = _Newnode;
    this->_Myhead->_Right = _Newnode;
  }
  else if ( _Addleft )
  {
    _Wherenode->_Left = _Newnode;
    v8 = this->_Myhead;
    if ( _Wherenode == v8->_Left )
      v8->_Left = _Newnode;
  }
  else
  {
    _Wherenode->_Right = _Newnode;
    v9 = this->_Myhead;
    if ( _Wherenode == v9->_Right )
      v9->_Right = _Newnode;
  }
  v10 = _Newnode;
  while ( !v10->_Parent->_Color )
  {
    v11 = v10->_Parent;
    v12 = v11->_Parent;
    if ( v11 == v12->_Left )
    {
      v13 = v12->_Right;
      if ( v13->_Color )
      {
        if ( v10 == v11->_Right )
        {
          v10 = v10->_Parent;
          v14 = v11->_Right;
          v10->_Right = v14->_Left;
          if ( !v14->_Left->_Isnil )
            v14->_Left->_Parent = v10;
          v14->_Parent = v10->_Parent;
          v15 = this->_Myhead;
          if ( v10 == v15->_Parent )
          {
            v15->_Parent = v14;
          }
          else
          {
            v16 = v10->_Parent;
            if ( v10 == v16->_Left )
              v16->_Left = v14;
            else
              v16->_Right = v14;
          }
          v14->_Left = v10;
          v10->_Parent = v14;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Left;
        v17->_Left = v17->_Left->_Right;
        v19 = v18->_Right;
        if ( !v19->_Isnil )
          v19->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v20 = this->_Myhead;
        if ( v17 == v20->_Parent )
        {
          v20->_Parent = v18;
          v18->_Right = v17;
        }
        else
        {
          v21 = v17->_Parent;
          if ( v17 == v21->_Right )
          {
            v21->_Right = v18;
            v18->_Right = v17;
          }
          else
          {
            v21->_Left = v18;
            v18->_Right = v17;
          }
        }
LABEL_50:
        v6 = _Newnode;
        v17->_Parent = v18;
        continue;
      }
      v11->_Color = 1;
      v13->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
    else
    {
      v22 = v12->_Left;
      if ( v22->_Color )
      {
        if ( v10 == v11->_Left )
        {
          v10 = v10->_Parent;
          v23 = v11->_Left;
          v10->_Left = v23->_Right;
          v24 = v23->_Right;
          if ( !v24->_Isnil )
            v24->_Parent = v10;
          v23->_Parent = v10->_Parent;
          v25 = this->_Myhead;
          if ( v10 == v25->_Parent )
          {
            v25->_Parent = v23;
          }
          else
          {
            v26 = v10->_Parent;
            if ( v10 == v26->_Right )
              v26->_Right = v23;
            else
              v26->_Left = v23;
          }
          v23->_Right = v10;
          v10->_Parent = v23;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Right;
        v17->_Right = v18->_Left;
        if ( !v18->_Left->_Isnil )
          v18->_Left->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v27 = this->_Myhead;
        if ( v17 == v27->_Parent )
        {
          v27->_Parent = v18;
        }
        else
        {
          v28 = v17->_Parent;
          if ( v17 == v28->_Left )
            v28->_Left = v18;
          else
            v28->_Right = v18;
        }
        v18->_Left = v17;
        goto LABEL_50;
      }
      v11->_Color = 1;
      v22->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
  }
  v29 = this->_Myhead->_Parent;
  v30 = result;
  result->_Ptr = v6;
  v29->_Color = 1;
  return v30;
}

//----- (0067E7A0) --------------------------------------------------------
std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *__stdcall std::_List_val<NiAVObject *,std::allocator<NiAVObject *>>::_Buynode(std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *_Next, std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *_Prev)
{
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *result; // eax@1
  std::exception pExceptionObject; // [sp+0h] [bp-Ch]@3

  result = (std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *)operator new(0xCu);
  if ( !result )
  {
    _Next = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Next);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  result->_Next = _Next;
  result->_Prev = _Prev;
  result->_Myval = 0;
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0067E7F0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *_Newnode)
{
  unsigned int v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v6; // edi@4
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v7; // edx@4
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v8; // edx@7
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v9; // edx@9
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v10; // eax@11
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v11; // edx@12
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v12; // esi@12
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v13; // esi@13
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v14; // edx@16
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v15; // esi@18
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v16; // esi@20
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v17; // edx@24
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v18; // esi@24
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v19; // edi@24
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v20; // edi@26
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v21; // edi@28
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v22; // esi@31
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v23; // edx@34
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v24; // esi@34
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v25; // esi@36
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v26; // esi@38
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v27; // edi@44
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v28; // edi@46
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v29; // ecx@52
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *v30; // eax@52

  v5 = this->_Mysize;
  if ( v5 >= 0x15555554 )
  {
    operator delete(_Newnode);
    std::_Xlength_error("map/set<T> too long");
  }
  this->_Mysize = v5 + 1;
  v6 = _Newnode;
  _Newnode->_Parent = _Wherenode;
  v7 = this->_Myhead;
  if ( _Wherenode == v7 )
  {
    v7->_Parent = _Newnode;
    this->_Myhead->_Left = _Newnode;
    this->_Myhead->_Right = _Newnode;
  }
  else if ( _Addleft )
  {
    _Wherenode->_Left = _Newnode;
    v8 = this->_Myhead;
    if ( _Wherenode == v8->_Left )
      v8->_Left = _Newnode;
  }
  else
  {
    _Wherenode->_Right = _Newnode;
    v9 = this->_Myhead;
    if ( _Wherenode == v9->_Right )
      v9->_Right = _Newnode;
  }
  v10 = _Newnode;
  while ( !v10->_Parent->_Color )
  {
    v11 = v10->_Parent;
    v12 = v11->_Parent;
    if ( v11 == v12->_Left )
    {
      v13 = v12->_Right;
      if ( v13->_Color )
      {
        if ( v10 == v11->_Right )
        {
          v10 = v10->_Parent;
          v14 = v11->_Right;
          v10->_Right = v14->_Left;
          if ( !v14->_Left->_Isnil )
            v14->_Left->_Parent = v10;
          v14->_Parent = v10->_Parent;
          v15 = this->_Myhead;
          if ( v10 == v15->_Parent )
          {
            v15->_Parent = v14;
          }
          else
          {
            v16 = v10->_Parent;
            if ( v10 == v16->_Left )
              v16->_Left = v14;
            else
              v16->_Right = v14;
          }
          v14->_Left = v10;
          v10->_Parent = v14;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Left;
        v17->_Left = v17->_Left->_Right;
        v19 = v18->_Right;
        if ( !v19->_Isnil )
          v19->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v20 = this->_Myhead;
        if ( v17 == v20->_Parent )
        {
          v20->_Parent = v18;
          v18->_Right = v17;
        }
        else
        {
          v21 = v17->_Parent;
          if ( v17 == v21->_Right )
          {
            v21->_Right = v18;
            v18->_Right = v17;
          }
          else
          {
            v21->_Left = v18;
            v18->_Right = v17;
          }
        }
LABEL_50:
        v6 = _Newnode;
        v17->_Parent = v18;
        continue;
      }
      v11->_Color = 1;
      v13->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
    else
    {
      v22 = v12->_Left;
      if ( v22->_Color )
      {
        if ( v10 == v11->_Left )
        {
          v10 = v10->_Parent;
          v23 = v11->_Left;
          v10->_Left = v23->_Right;
          v24 = v23->_Right;
          if ( !v24->_Isnil )
            v24->_Parent = v10;
          v23->_Parent = v10->_Parent;
          v25 = this->_Myhead;
          if ( v10 == v25->_Parent )
          {
            v25->_Parent = v23;
          }
          else
          {
            v26 = v10->_Parent;
            if ( v10 == v26->_Right )
              v26->_Right = v23;
            else
              v26->_Left = v23;
          }
          v23->_Right = v10;
          v10->_Parent = v23;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Right;
        v17->_Right = v18->_Left;
        if ( !v18->_Left->_Isnil )
          v18->_Left->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v27 = this->_Myhead;
        if ( v17 == v27->_Parent )
        {
          v27->_Parent = v18;
        }
        else
        {
          v28 = v17->_Parent;
          if ( v17 == v28->_Left )
            v28->_Left = v18;
          else
            v28->_Right = v18;
        }
        v18->_Left = v17;
        goto LABEL_50;
      }
      v11->_Color = 1;
      v22->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
  }
  v29 = this->_Myhead->_Parent;
  v30 = result;
  result->_Ptr = v6;
  v29->_Color = 1;
  return v30;
}

//----- (0067EA20) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::clear(std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > *this)
{
  std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > *v1; // edi@1
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v3; // ebx@1
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v4; // esi@1

  v1 = this;
  v2 = this->_Myhead;
  v3 = v2->_Parent;
  v4 = v2->_Parent;
  if ( !v3->_Isnil )
  {
    do
    {
      std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::_Erase(v1, v4->_Right);
      v4 = v4->_Left;
      operator delete(v3);
      v3 = v4;
    }
    while ( !v4->_Isnil );
  }
  v1->_Myhead->_Parent = v1->_Myhead;
  v1->_Myhead->_Left = v1->_Myhead;
  v1->_Myhead->_Right = v1->_Myhead;
  v1->_Mysize = 0;
}

//----- (0067EA70) --------------------------------------------------------
std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *__thiscall std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::_Buynode(std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > *this, const char *_Val)
{
  std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > *v2; // esi@1
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *result; // eax@1
  std::exception pExceptionObject; // [sp+4h] [bp-Ch]@5

  v2 = this;
  result = (std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *)operator new(0x10u);
  if ( !result )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, &_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  result->_Left = v2->_Myhead;
  result->_Parent = v2->_Myhead;
  result->_Right = v2->_Myhead;
  *(_WORD *)&result->_Color = 0;
  if ( result != (std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *)-12 )
    result->_Myval = *_Val;
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0067EAE0) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *_Node, bool _Leftish)
{
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v4; // edx@1
  std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *v5; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v6; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v7; // eax@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v8; // esi@1
  bool v9; // cl@1
  NiAVObject *v10; // edi@2
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v11; // edi@10
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v12; // edx@12
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > >,bool> *v13; // eax@12
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v14; // ecx@15
  bool _Addleft; // [sp+Ch] [bp-4h]@1

  v4 = _Node;
  v5 = this;
  v6 = this->_Myhead;
  v7 = v6->_Parent;
  v8 = v6;
  v9 = 1;
  _Addleft = 1;
  if ( !v7->_Isnil )
  {
    v10 = _Node->_Myval.first;
    do
    {
      v8 = v7;
      if ( _Leftish )
        v9 = v7->_Myval.first >= v10;
      else
        v9 = v10 < v7->_Myval.first;
      _Addleft = v9;
      if ( v9 )
        v7 = v7->_Left;
      else
        v7 = v7->_Right;
    }
    while ( !v7->_Isnil );
  }
  v11 = v8;
  *(_DWORD *)&_Leftish = v8;
  if ( v9 )
  {
    if ( v8 == v5->_Myhead->_Left )
    {
      v12 = std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Insert(
              v5,
              (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *)&_Leftish,
              1,
              v8,
              _Node)->_Ptr;
      v13 = result;
      result->first._Ptr = v12;
      result->second = 1;
      return v13;
    }
    std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&_Leftish);
    v11 = (std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *)_Leftish;
    v4 = _Node;
  }
  if ( v11->_Myval.first >= v4->_Myval.first )
  {
    operator delete(v4);
    v13 = result;
    result->first._Ptr = v11;
    result->second = 0;
  }
  else
  {
    v14 = std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Insert(
            v5,
            (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *)&_Leftish,
            _Addleft,
            v8,
            v4)->_Ptr;
    v13 = result;
    result->first._Ptr = v14;
    result->second = 1;
  }
  return v13;
}

//----- (0067EBC0) --------------------------------------------------------
void __thiscall std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo>>::pop_back(std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > *this)
{
  std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > *v1; // esi@1
  std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *v2; // ecx@1
  std::_List_nod<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> >::_Node *v3; // eax@1

  v1 = this;
  v2 = this->_Myhead;
  v3 = v2->_Prev;
  if ( v3 != v2 )
  {
    v3->_Prev->_Next = v3->_Next;
    v3->_Next->_Prev = v3->_Prev;
    operator delete(v3);
    --v1->_Mysize;
  }
}

//----- (0067EBF0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > _Where, std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *_Node)
{
  std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v6; // edi@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *v7; // eax@2
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v8; // eax@7
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v9; // ecx@20
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > >,bool> v10; // [sp+8h] [bp-8h]@20

  v4 = this;
  v5 = this->_Myhead;
  v6 = _Node;
  if ( !this->_Mysize )
  {
    std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Insert(
      this,
      result,
      1,
      v5,
      _Node);
    return result;
  }
  if ( _Where._Ptr == v5->_Left )
  {
    if ( _Node->_Myval.first < _Where._Ptr->_Myval.first )
    {
      std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Insert(
        this,
        result,
        1,
        _Where._Ptr,
        _Node);
      return result;
    }
    goto LABEL_20;
  }
  if ( _Where._Ptr == v5 )
  {
    v8 = v5->_Right;
    if ( v8->_Myval.first < _Node->_Myval.first )
    {
      std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Insert(
        this,
        result,
        0,
        v8,
        _Node);
      return result;
    }
    goto LABEL_20;
  }
  if ( _Node->_Myval.first >= _Where._Ptr->_Myval.first
    || (_Node = _Where._Ptr,
        std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&_Node),
        _Node->_Myval.first >= v6->_Myval.first) )
  {
    if ( _Where._Ptr->_Myval.first >= v6->_Myval.first
      || (_Node = _Where._Ptr,
          std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&_Node),
          _Node != v4->_Myhead)
      && v6->_Myval.first >= _Node->_Myval.first )
    {
LABEL_20:
      v9 = std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Linsert(
             v4,
             &v10,
             v6,
             0)->first._Ptr;
      v7 = result;
      result->_Ptr = v9;
      return v7;
    }
    if ( _Where._Ptr->_Right->_Isnil )
    {
      std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Insert(
        v4,
        result,
        0,
        _Where._Ptr,
        v6);
      v7 = result;
    }
    else
    {
      std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Insert(
        v4,
        result,
        1,
        _Node,
        v6);
      v7 = result;
    }
  }
  else if ( _Node->_Right->_Isnil )
  {
    std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Insert(
      v4,
      result,
      0,
      _Node,
      v6);
    v7 = result;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Insert(
      v4,
      result,
      1,
      _Where._Ptr,
      v6);
    v7 = result;
  }
  return v7;
}

//----- (0067ED50) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Buynode<std::pair<NiAVObject * const,World::AniObjectType>>(std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *this, std::pair<NiAVObject * const,World::AniObjectType> *_Val)
{
  std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *result; // eax@1
  std::exception pExceptionObject; // [sp+4h] [bp-Ch]@5

  v2 = this;
  result = (std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *)operator new(0x1Cu);
  if ( !result )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  result->_Left = v2->_Myhead;
  result->_Parent = v2->_Myhead;
  result->_Right = v2->_Myhead;
  *(_WORD *)&result->_Color = 0;
  if ( result != (std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *)-12 )
    result->_Myval = *_Val;
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0067EDD0) --------------------------------------------------------
std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > >,bool> *__thiscall std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::insert(std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > *this, std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > >,bool> *result, const char *_Val, bool _Leftish)
{
  std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > *v4; // edi@1
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v5; // ecx@1
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v6; // eax@1
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v7; // esi@1
  bool v8; // cl@1
  char v9; // dl@2
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v10; // edx@10
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v11; // eax@12
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > >,bool> *v12; // eax@12
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v13; // edx@12
  std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *v14; // eax@15
  bool _Addleft; // [sp+8h] [bp-4h]@1

  v4 = this;
  v5 = this->_Myhead;
  v6 = v5->_Parent;
  v7 = v5;
  v8 = 1;
  _Addleft = 1;
  if ( !v6->_Isnil )
  {
    v9 = *_Val;
    do
    {
      v7 = v6;
      if ( _Leftish )
        v8 = v6->_Myval >= v9;
      else
        v8 = v9 < v6->_Myval;
      _Addleft = v8;
      if ( v8 )
        v6 = v6->_Left;
      else
        v6 = v6->_Right;
    }
    while ( !v6->_Isnil );
  }
  v10 = v7;
  *(_DWORD *)&_Leftish = v7;
  if ( v8 )
  {
    if ( v7 == v4->_Myhead->_Left )
    {
      v11 = std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::_Buynode(
              (std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > *)&v4->comp,
              _Val);
      std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::_Insert(
        v4,
        (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > > *)&_Leftish,
        1,
        v7,
        v11);
      v12 = result;
      v13 = (std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *)_Leftish;
      result->second = 1;
      result->first._Ptr = v13;
      return v12;
    }
    std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >,std::_Iterator_base0> *)&_Leftish);
    v10 = (std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *)_Leftish;
  }
  if ( v10->_Myval >= *_Val )
  {
    v12 = result;
    result->second = 0;
    result->first._Ptr = v10;
  }
  else
  {
    v14 = std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::_Buynode(
            (std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > *)&v4->comp,
            _Val);
    std::_Tree<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0>>::_Insert(
      v4,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> > > *)&_Leftish,
      _Addleft,
      v7,
      v14);
    v12 = result;
    result->first._Ptr = (std::_Tree_nod<std::_Tset_traits<char,std::less<char>,std::allocator<char>,0> >::_Node *)_Leftish;
    result->second = 1;
  }
  return v12;
}

//----- (0067EEB0) --------------------------------------------------------
signed int __stdcall FindMultiCDNode::ProcessData(NiAVObject *_pkObject, void *_pData)
{
  _DWORD *v3; // esi@2
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v4; // edi@2
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v5; // eax@2
  int v6; // ecx@2
  signed int result; // eax@4

  if ( NsUtil::MatchTag((NiObjectNET *)&_pkObject->vfptr, "#CD") )
  {
    v3 = _pData;
    v4 = *(std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node **)_pData;
    v5 = std::_List_val<char *,std::allocator<char *>>::_Buynode(
           *(std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node **)_pData,
           *(std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node **)(*(_DWORD *)_pData + 4),
           (ItemViewDummy *const *)&_pkObject);
    v6 = v3[1];
    if ( (unsigned int)(1073741822 - v6) < 1 )
      std::_Xlength_error("list<T> too long");
    v3[1] = v6 + 1;
    v4->_Prev = v5;
    v5->_Prev->_Next = v5;
    result = -1;
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (0067EF20) --------------------------------------------------------
signed int __stdcall FindMultiMNode::ProcessData(NiAVObject *_pkObject, void *_pData)
{
  _DWORD *v3; // esi@2
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v4; // edi@2
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v5; // eax@2
  int v6; // ecx@2
  signed int result; // eax@4

  if ( NsUtil::MatchTag((NiObjectNET *)&_pkObject->vfptr, "#M") )
  {
    v3 = _pData;
    v4 = *(std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node **)_pData;
    v5 = std::_List_val<char *,std::allocator<char *>>::_Buynode(
           *(std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node **)_pData,
           *(std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node **)(*(_DWORD *)_pData + 4),
           (ItemViewDummy *const *)&_pkObject);
    v6 = v3[1];
    if ( (unsigned int)(1073741822 - v6) < 1 )
      std::_Xlength_error("list<T> too long");
    v3[1] = v6 + 1;
    v4->_Prev = v5;
    v5->_Prev->_Next = v5;
    result = -1;
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (0067EF90) --------------------------------------------------------
void __thiscall std::list<NiAVObject *,std::allocator<NiAVObject *>>::resize(std::list<NiAVObject *,std::allocator<NiAVObject *> > *this, unsigned int _Newsize)
{
  std::list<NiAVObject *,std::allocator<NiAVObject *> > *v2; // esi@1
  unsigned int v3; // eax@1
  unsigned int v4; // ebx@1
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v5; // edi@4
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v6; // eax@4
  unsigned int v7; // ecx@4
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v8; // eax@8
  int v9; // [sp+0h] [bp-24h]@1
  std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > *v10; // [sp+10h] [bp-14h]@1
  int *v11; // [sp+14h] [bp-10h]@1
  int v12; // [sp+20h] [bp-4h]@2
  unsigned int _Count; // [sp+2Ch] [bp+8h]@2

  v11 = &v9;
  v2 = this;
  v10 = (std::list<CollectWin::sNewestInfo,std::allocator<CollectWin::sNewestInfo> > *)this;
  v3 = this->_Mysize;
  v4 = _Newsize;
  if ( _Newsize <= v3 )
  {
    if ( _Newsize < v3 )
    {
      do
      {
        v8 = v2->_Myhead->_Prev;
        if ( v8 != v2->_Myhead )
        {
          v8->_Prev->_Next = v8->_Next;
          v8->_Next->_Prev = v8->_Prev;
          operator delete(v8);
          --v2->_Mysize;
        }
      }
      while ( _Newsize < v2->_Mysize );
    }
  }
  else
  {
    _Count = 0;
    v12 = 0;
    while ( v2->_Mysize < v4 )
    {
      v5 = v2->_Myhead;
      v6 = std::_List_val<NiAVObject *,std::allocator<NiAVObject *>>::_Buynode(v2->_Myhead, v2->_Myhead->_Prev);
      v7 = v2->_Mysize;
      if ( 1073741822 - v7 < 1 )
        std::_Xlength_error("list<T> too long");
      ++_Count;
      v2->_Mysize = v7 + 1;
      v5->_Prev = v6;
      v6->_Prev->_Next = v6;
    }
  }
}

//----- (0067F080) --------------------------------------------------------
World::AniObjectType *__thiscall std::map<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>>::operator[](std::map<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> > > *this, NiAVObject *const *_Keyval)
{
  std::map<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> > > *v2; // edi@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v3; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v4; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > v5; // esi@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v6; // eax@8
  World::AniObjectType *result; // eax@8
  std::pair<NiAVObject * const,World::AniObjectType> _Val; // [sp+8h] [bp-14h]@8
  float v9; // [sp+14h] [bp-8h]@8
  float v10; // [sp+18h] [bp-4h]@8

  v2 = this;
  v3 = this->_Myhead;
  v4 = v3->_Parent;
  v5._Ptr = v3;
  while ( !v4->_Isnil )
  {
    if ( v4->_Myval.first >= *_Keyval )
    {
      v5._Ptr = v4;
      v4 = v4->_Left;
    }
    else
    {
      v4 = v4->_Right;
    }
  }
  if ( v5._Ptr != v2->_Myhead && *_Keyval >= v5._Ptr->_Myval.first )
  {
    result = &v5._Ptr->_Myval.second;
  }
  else
  {
    _Val.first = *_Keyval;
    v9 = 0.0;
    v10 = 0.0;
    _Val.second.fMaxTime = 0.0;
    _Val.second.fStartTime = 0.0;
    v6 = std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Buynode<std::pair<NiAVObject * const,World::AniObjectType>>(
           (std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *)&v2->comp,
           &_Val);
    std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Insert(
      (std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *)&v2->comp,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *)&_Keyval,
      v5,
      v6);
    result = (World::AniObjectType *)(_Keyval + 4);
  }
  return result;
}

//----- (0067F110) --------------------------------------------------------
char World::InitMiniMap()
{
  return 1;
}

//----- (0067F120) --------------------------------------------------------
void __thiscall World::TerminateMiniMap(World *this)
{
  World *v1; // edi@1
  NiSourceTexture *v2; // esi@1

  v1 = this;
  v2 = this->m_spMiniMapTexture.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
    v1->m_spMiniMapTexture.m_pObject = 0;
  }
}

//----- (0067F160) --------------------------------------------------------
void __thiscall World::ClearMiniMap(World *this)
{
  World *v1; // edi@1
  NiSourceTexture *v2; // esi@1

  v1 = this;
  v2 = this->m_spMiniMapTexture.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
    v1->m_spMiniMapTexture.m_pObject = 0;
  }
}

//----- (0067F1A0) --------------------------------------------------------
char __thiscall World::LoadEmptyMiniMap(World *this)
{
  World *v1; // ebx@1
  NiSourceTexture *v2; // eax@1
  NiSourceTexture *v3; // esi@1
  NiSourceTexture *v4; // edi@1

  v1 = this;
  v2 = PgUtil::Create1PixelSourceTexture(0, 0, 0, -1);
  v3 = v1->m_spMiniMapTexture.m_pObject;
  v4 = v2;
  if ( v3 != v2 )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spMiniMapTexture.m_pObject = v4;
    if ( v4 )
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  }
  return 1;
}

//----- (0067F200) --------------------------------------------------------
NiSourceTexture *__thiscall World::GetMiniMapTexture(World *this)
{
  return this->m_spMiniMapTexture.m_pObject;
}

//----- (0067F210) --------------------------------------------------------
char __thiscall World::LoadMiniMap(World *this)
{
  World *v1; // ebx@1
  MapInfo *v2; // eax@1
  NiImageConverter *v3; // eax@3
  NiSourceTexture *v4; // edi@3
  NiPixelData *v5; // eax@3
  NiSourceTexture *v6; // esi@5
  NiSourceTexture *v7; // eax@13
  NiSourceTexture *v8; // esi@13
  NiSourceTexture *v9; // edi@13
  char result; // al@20
  NiTexture::FormatPrefs kPrefs; // [sp+Ch] [bp-124h]@4
  char acFileName[260]; // [sp+18h] [bp-118h]@3
  char acMapName[13]; // [sp+11Ch] [bp-14h]@1

  v1 = this;
  v2 = MapInfoTab::GetByMapName(&this->m_kMapName);
  *(_DWORD *)acMapName = v2->MapFolderName.n3_code[0];
  *(_DWORD *)&acMapName[4] = v2->MapFolderName.n3_code[1];
  *(_DWORD *)&acMapName[8] = v2->MapFolderName.n3_code[2];
  acMapName[12] = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acFileName, "%sminimap\\%s.dds", &Folder::m_acMenu, acMapName);
  v3 = NiImageConverter::GetImageConverter();
  v4 = 0;
  v5 = (NiPixelData *)((int (__thiscall *)(_DWORD, _DWORD, _DWORD))v3->vfptr[2].__vecDelDtor)(v3, acFileName, 0);
  if ( v5 )
  {
    kPrefs.m_ePixelLayout = 6;
    kPrefs.m_eAlphaFmt = 3;
    kPrefs.m_eMipMapped = 0;
    v4 = NiSourceTexture::Create(v5, &kPrefs);
  }
  v6 = v1->m_spMiniMapTexture.m_pObject;
  if ( v6 != v4 )
  {
    if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v1->m_spMiniMapTexture.m_pObject = v4;
    if ( v4 )
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  }
  if ( v1->m_spMiniMapTexture.m_pObject )
  {
    result = 1;
  }
  else
  {
    v7 = PgUtil::Create1PixelSourceTexture(0, 0, 0, -1);
    v8 = v1->m_spMiniMapTexture.m_pObject;
    v9 = v7;
    if ( v8 != v7 )
    {
      if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
        v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      v1->m_spMiniMapTexture.m_pObject = v9;
      if ( v9 )
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
    }
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0067F380) --------------------------------------------------------
char __userpurge World::SelectMiniMap@<al>(World *this@<ecx>, int a2@<edi>, Name3 kMapName)
{
  World *v3; // ebx@1
  Name3 *v4; // eax@1
  char v5; // al@3
  MapViewInfo *v6; // eax@4
  int v7; // ST10_4@6
  NiImageConverter *v8; // eax@6
  NiSourceTexture *v9; // edi@6
  NiPixelData *v10; // eax@6
  NiSourceTexture *v11; // esi@8
  NiSourceTexture *v12; // eax@16
  NiSourceTexture *v13; // esi@16
  NiSourceTexture *v14; // edi@16
  Name3 result; // [sp+4h] [bp-124h]@1
  char acFileName[260]; // [sp+10h] [bp-118h]@6
  char acMapName[13]; // [sp+114h] [bp-14h]@4

  v3 = this;
  v4 = World::GetMapName(this, &result);
  if ( kMapName.n3_code[0] != v4->n3_code[0] || *(_QWORD *)&kMapName.n3_code[1] != *(_QWORD *)&v4->n3_code[1] )
  {
    v6 = MapViewInfoTab::GetByMapName(&kMapName);
    *(_DWORD *)acMapName = v6->MapFolderName.n3_code[0];
    *(_DWORD *)&acMapName[4] = v6->MapFolderName.n3_code[1];
    *(_DWORD *)&acMapName[8] = v6->MapFolderName.n3_code[2];
    acMapName[12] = 0;
    if ( !Folder::m_bInit )
      Folder::Init();
    v7 = a2;
    sprintf(acFileName, "%sminimap\\%s.dds", &Folder::m_acMenu, acMapName);
    v8 = NiImageConverter::GetImageConverter();
    v9 = 0;
    v10 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD, int))v8->vfptr[2].__vecDelDtor)(
                           v8,
                           acFileName,
                           0,
                           v7);
    if ( v10 )
    {
      *(_QWORD *)&result.n3_name[0] = 12884901894i64;
      result.n3_code[2] = 0;
      v9 = NiSourceTexture::Create(v10, (NiTexture::FormatPrefs *)&result);
    }
    v11 = v3->m_spMiniMapTexture.m_pObject;
    if ( v11 != v9 )
    {
      if ( v11 && !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
        v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
      v3->m_spMiniMapTexture.m_pObject = v9;
      if ( v9 )
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
    }
    if ( v3->m_spMiniMapTexture.m_pObject )
    {
      v5 = 1;
    }
    else
    {
      v12 = PgUtil::Create1PixelSourceTexture(0, 0, 0, -1);
      v13 = v3->m_spMiniMapTexture.m_pObject;
      v14 = v12;
      if ( v13 != v12 )
      {
        if ( v13 && !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) && v13 )
          v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
        v3->m_spMiniMapTexture.m_pObject = v14;
        if ( v14 )
          InterlockedIncrement((volatile LONG *)&v14->m_uiRefCount);
      }
      v5 = 0;
    }
  }
  else
  {
    v5 = 0;
  }
  return v5;
}
// 67F380: could not find valid save-restore pair for edi
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0067F530) --------------------------------------------------------
void __thiscall World::UpdateCharDecalMark(World *this, float fTime)
{
  DecalMgr::Update(&this->m_kDecalMgr, fTime);
}

//----- (0067F550) --------------------------------------------------------
void __thiscall World::Shake(World *this)
{
  NiTransformController *v1; // ecx@1

  v1 = this->m_spShakeContrl.m_pObject;
  if ( v1 )
    ((void (__stdcall *)(_DWORD))v1->vfptr[15].__vecDelDtor)(LODWORD(Timer::ms_fCurTime));
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0067F570) --------------------------------------------------------
void __thiscall World::SetMagicCirclePos(World *this, NiPoint3 *rkPos)
{
  CMagicCircleController::UpdatePosition(this->m_spMagicCircleController.m_pObject, rkPos);
}

//----- (0067F580) --------------------------------------------------------
void __thiscall World::SetMagicCircleEnable(World *this, bool bEnable)
{
  CMagicCircleController::SetEnable(this->m_spMagicCircleController.m_pObject, bEnable);
}

//----- (0067F590) --------------------------------------------------------
void __thiscall World::SetMagicCircleRadius(World *this, float fRadius)
{
  CMagicCircleController::SetCircleRadius(this->m_spMagicCircleController.m_pObject, fRadius);
}

//----- (0067F5B0) --------------------------------------------------------
void __thiscall World::TerminateMisc(World *this)
{
  World *v1; // esi@1
  NiNode *v2; // edi@1
  NiTransformController *v3; // edi@6
  NiNode *v4; // edi@11
  NiTexturePalette *v5; // edi@16
  CMagicCircleController *v6; // edi@21

  v1 = this;
  v2 = this->m_spMoveTargetPointNode.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spMoveTargetPointNode.m_pObject = 0;
  }
  v3 = v1->m_spShakeContrl.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spShakeContrl.m_pObject = 0;
  }
  v4 = v1->m_spCharSelectMarkNode.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spCharSelectMarkNode.m_pObject = 0;
  }
  NsDecal::Terminate(&v1->m_kCharSelectMarkDecal);
  v5 = v1->m_spTexturePalette.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spTexturePalette.m_pObject = 0;
  }
  v6 = v1->m_spMagicCircleController.m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v1->m_spMagicCircleController.m_pObject = 0;
  }
  DecalMgr::Terminate(&v1->m_kDecalMgr);
}

//----- (0067F6B0) --------------------------------------------------------
void __thiscall World::UpdateMainCharMoveTargetPoint(World *this, float fTime)
{
  World *v2; // esi@1

  v2 = this;
  if ( this->m_spMoveTargetPointNode.m_pObject )
  {
    if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[8].Affect)() )
      v2->m_spMoveTargetPointNode.m_pObject->m_uFlags |= 1u;
    NiAVObject::Update((NiAVObject *)&v2->m_spMoveTargetPointNode.m_pObject->vfptr, fTime, 1);
  }
}

//----- (0067F700) --------------------------------------------------------
void __thiscall World::PlayBGM(World *this)
{
  MapViewInfo *v1; // esi@1
  char acFileName[256]; // [sp+4h] [bp-104h]@3

  v1 = MapViewInfoTab::GetByMapName(&this->m_kMapName);
  if ( v1 && v1->BGM_Name_01[0] != 45 )
  {
    sprintf(acFileName, "%s", v1->BGM_Name_01);
    SoundMgr::PlayBGM(&g_kSoundMgr, v1->ID);
  }
  else
  {
    SoundMgr::StopBGM(&g_kSoundMgr);
  }
}

//----- (0067F780) --------------------------------------------------------
void __thiscall World::UpdateCharSelectMark(World *this, float fTime)
{
  World *v2; // edi@1
  NiNode *v3; // ecx@1
  Char *v4; // esi@2
  NiProperty *v5; // ebx@4
  NiVertexColorProperty *v6; // eax@5
  NiProperty *v7; // eax@6
  NiAVObject *v8; // ecx@8
  NiProperty *v9; // edi@9
  NiMaterialProperty *v10; // eax@10
  NiProperty *v11; // eax@11
  NiAVObject *v12; // ecx@13
  double v13; // st7@15
  float v14; // ebx@16
  int v15; // ebx@18
  signed int v16; // ebx@18
  double v17; // st7@19
  double v18; // st7@21
  char *v19; // eax@31
  char *v20; // eax@33
  float v21; // eax@34
  float v22; // ecx@34
  int v23; // edi@36
  int v24; // eax@36
  double v25; // st7@38
  MobViewInfo *v26; // eax@39
  unsigned int v27; // eax@40
  float v28; // ecx@43
  Name5 v29; // [sp-8h] [bp-5Ch]@31
  int v30; // [sp-4h] [bp-58h]@31
  float _fTime; // [sp+0h] [bp-54h]@31
  float fHeight_; // [sp+4h] [bp-50h]@31
  float fWidth_; // [sp+8h] [bp-4Ch]@31
  NiPoint3 kPos; // [sp+1Ch] [bp-38h]@36
  float v35; // [sp+28h] [bp-2Ch]@15
  float v36; // [sp+2Ch] [bp-28h]@15
  float v37; // [sp+30h] [bp-24h]@16
  NiColor kColor; // [sp+34h] [bp-20h]@14
  _DWORD *v39; // [sp+40h] [bp-14h]@5
  float v40; // [sp+44h] [bp-10h]@1
  int v41; // [sp+50h] [bp-4h]@5

  v2 = this;
  v40 = *(float *)&this;
  v3 = this->m_spCharSelectMarkNode.m_pObject;
  if ( v3 )
  {
    v4 = (Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1];
    if ( v4 && !v4->m_bIsDoor )
    {
      v5 = NiAVObject::GetProperty((NiAVObject *)&v3->vfptr, 9);
      if ( !v5 )
      {
        v6 = (NiVertexColorProperty *)operator new(0x28u);
        v39 = v6;
        v41 = 0;
        if ( v6 )
          NiVertexColorProperty::NiVertexColorProperty(v6);
        else
          v7 = 0;
        v8 = (NiAVObject *)&v2->m_spCharSelectMarkNode.m_pObject->vfptr;
        v41 = -1;
        v5 = v7;
        NiAVObject::AttachProperty(v8, v7);
      }
      v9 = NiAVObject::GetProperty((NiAVObject *)&v2->m_spCharSelectMarkNode.m_pObject->vfptr, 3);
      if ( !v9 )
      {
        v10 = (NiMaterialProperty *)operator new(0x60u);
        v39 = v10;
        v41 = 1;
        if ( v10 )
          NiMaterialProperty::NiMaterialProperty(v10);
        else
          v11 = 0;
        v12 = *(NiAVObject **)(LODWORD(v40) + 572628);
        v41 = -1;
        v9 = v11;
        NiAVObject::AttachProperty(v12, v11);
      }
      kColor.r = 255.0;
      kColor.g = 255.0;
      v5[1].m_uiRefCount = 0;
      kColor.b = 255.0;
      v5[1].m_pcName = 0;
      if ( Char::IsNPC(v4) )
        goto LABEL_15;
      if ( (unsigned __int8)((int (__thiscall *)(Char *))v4->vfptr[1].Affect)(v4) )
      {
        v15 = ((int (__thiscall *)(Char *))v4->vfptr[5].Deaffect)(v4);
        v16 = v15 - User::Lv(&g_kUser);
        if ( v16 >= 6 )
        {
          v35 = 190.0;
          v36 = 37.0;
          v17 = 29.0;
LABEL_25:
          v37 = v17;
          v14 = v35;
          kColor.g = v36;
          kColor.b = v37;
          goto LABEL_31;
        }
        if ( v16 < 3 )
        {
          if ( v16 >= -2 )
          {
LABEL_15:
            v35 = 255.0;
            v36 = 243.0;
            v13 = 50.0;
LABEL_16:
            v37 = v13;
            v14 = v35;
            kColor.g = v36;
            kColor.b = v37;
            goto LABEL_31;
          }
          if ( v16 >= -5 )
          {
            v35 = 90.0;
            v36 = 231.0;
            v17 = 86.0;
            goto LABEL_25;
          }
          v18 = 192.0;
          v35 = 192.0;
          v36 = 192.0;
        }
        else
        {
          v35 = 255.0;
          v36 = 160.0;
          v18 = 37.0;
        }
        v37 = v18;
        v14 = v35;
        kColor.g = v36;
        kColor.b = v37;
      }
      else
      {
        if ( v4 == g_pkMainChar )
        {
          v35 = 225.0;
          v36 = 198.0;
          v13 = 31.0;
          goto LABEL_16;
        }
        v14 = kColor.r;
      }
LABEL_31:
      v19 = (char *)((int (__thiscall *)(Char *))v4->vfptr[2].DeleteAbStateByAbstateIndex)(v4);
      v39 = &v29;
      fWidth_ = 0.0;
      fHeight_ = 0.0;
      _fTime = 0.0;
      v30 = 0;
      v29.n5_code[0] = 0;
      strncpy(v29.n5_name, v19, 0x14u);
      if ( Party::GetMemberInfo(&g_kParty, v29) )
      {
        v35 = 146.0;
        v14 = 146.0;
        v36 = 164.0;
        kColor.g = 164.0;
        v37 = 245.0;
        kColor.b = 245.0;
      }
      v20 = (char *)((int (__thiscall *)(Char *))v4->vfptr[2].DeleteAbStateByAbstateIndex)(v4);
      v39 = &v29;
      fWidth_ = 0.0;
      fHeight_ = 0.0;
      _fTime = 0.0;
      v30 = 0;
      v29.n5_code[0] = 0;
      strncpy(v29.n5_name, v20, 0x14u);
      if ( RaidInfo::GetRaidMemberInfo(&g_kRaidinfo, v29) )
      {
        v35 = 146.0;
        v14 = 146.0;
        v36 = 164.0;
        v21 = 164.0;
        v37 = 245.0;
        v22 = 245.0;
      }
      else
      {
        v22 = kColor.b;
        v21 = kColor.g;
      }
      ++v9[3].m_uiRefCount;
      *(float *)&v9[2].m_spControllers.m_pObject = v14;
      *(float *)&v9[2].m_ppkExtra = v21;
      *(float *)&v9[2].m_uiExtraDataSize = v22;
      v23 = LODWORD(v40);
      NiAVObject::UpdateProperties(*(NiAVObject **)(LODWORD(v40) + 572628));
      *(_WORD *)(*(_DWORD *)(v23 + 572628) + 28) &= 0xFFFEu;
      v24 = v4->vfptr[6].IsVisible((AbStateInfectee *)v4);
      kPos.x = *(float *)v24;
      kPos.y = *(float *)(v24 + 4);
      kPos.z = *(float *)(v24 + 8);
      if ( (unsigned __int8)((int (__thiscall *)(Char *))v4->vfptr[1].Affect)(v4) || Char::IsNPC(v4) )
      {
        v26 = MobViewInfoTab::GetByID(v4->m_kCharShape.m_kMobID);
        if ( !v26 )
          goto LABEL_43;
        v27 = v26->ChrMarkSize;
        if ( !v27 )
          goto LABEL_43;
        v39 = (_DWORD *)v27;
        v40 = (double)v27;
        v25 = v40;
      }
      else
      {
        v25 = 50.0;
      }
      fWidth_ = v25;
      fHeight_ = v25;
      NsDecal::SetDecalSize((NsDecal *)(v23 + 572632), fHeight_, fWidth_);
LABEL_43:
      NsDecal::Update((NsDecal *)(v23 + 572632), 0.0, *(NiNode **)(v23 + 572628), &kPos);
      LODWORD(fWidth_) = 1;
      fHeight_ = v28;
      NiAVObject::Update(*(NiAVObject **)(v23 + 572628), fTime, 1);
      return;
    }
    v3->m_uFlags |= 1u;
  }
}

//----- (0067FB80) --------------------------------------------------------
char __thiscall World::InitMisc(World *this)
{
  World *v1; // esi@1
  const char *v2; // eax@3
  NiNode *v3; // eax@3
  NiNode *v4; // edi@3
  NiNode *v5; // ebx@3
  NiNode *v6; // eax@10
  const char *v7; // eax@13
  NiNode *v8; // edi@13
  int v9; // ebx@14
  NiNode *v11; // eax@18
  NiD3DDefaultShader *v12; // eax@19
  int v13; // ebx@21
  NiObject *v14; // eax@22
  NiRoom *v15; // eax@22
  NiRoom *v16; // edi@22
  NiNode *v17; // eax@28
  NiDefaultTexturePalette *v18; // eax@28
  NiD3DDefaultShader *v19; // eax@29
  CMagicCircleController *v20; // eax@31
  NiD3DDefaultShader *v21; // eax@32
  CMagicCircleController *v22; // ebx@36
  PgNsTerrain *v23; // ST08_4@36
  const char *v24; // eax@36
  NiRefObjectVtbl **v25; // ebx@36
  NiRefObjectVtbl *v26; // edi@36
  NiNode *v27; // eax@36
  NiNode *pBuildGround; // [sp+10h] [bp-1Ch]@22
  NiNode *pBuildGrounda; // [sp+10h] [bp-1Ch]@34
  NiPointer<NiRoom> element; // [sp+14h] [bp-18h]@22
  NiPointer<NiNode> spNode; // [sp+18h] [bp-14h]@1
  NiNode *v32; // [sp+1Ch] [bp-10h]@13
  int v33; // [sp+28h] [bp-4h]@1

  v1 = this;
  spNode.m_pObject = 0;
  v33 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v2 = Folder::Merge(&Folder::m_acSystem, "Misc\\MoveTargetPoint.nif");
  v3 = PgUtil::LoadNifFile(v2, 0);
  v4 = v1->m_spMoveTargetPointNode.m_pObject;
  v5 = v3;
  if ( v4 != v3 )
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spMoveTargetPointNode.m_pObject = v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  }
  v6 = v1->m_spMoveTargetPointNode.m_pObject;
  if ( !v6 )
    return 0;
  ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spWorldScene.m_pObject->vfptr[29].__vecDelDtor)(v6, 0);
  if ( !Folder::m_bInit )
    Folder::Init();
  v7 = Folder::Merge(&Folder::m_acSystem, "Misc\\CharSelectMark.nif");
  v8 = PgUtil::LoadNifFile(v7, 0);
  v32 = v8;
  if ( !v8 )
    return 0;
  spNode.m_pObject = v8;
  InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  v9 = (int)v8->vfptr[18].__vecDelDtor((NiRefObject *)v8, (unsigned int)"Plane01");
  if ( !v9 )
  {
    v33 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    return 0;
  }
  v11 = (NiNode *)operator new(0xE8u);
  LOBYTE(v33) = 1;
  if ( v11 )
    NiNode::NiNode(v11, 0);
  else
    v12 = 0;
  LOBYTE(v33) = 0;
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v1->m_spCharSelectMarkNode, v12);
  v13 = *(_DWORD *)(v9 + 160);
  while ( v13 )
  {
    v14 = *(NiObject **)(v13 + 8);
    v13 = *(_DWORD *)v13;
    pBuildGround = v1->m_spCharSelectMarkNode.m_pObject;
    v15 = (NiRoom *)NiObject::Clone(v14);
    v16 = v15;
    element.m_pObject = v15;
    if ( v15 )
      InterlockedIncrement((volatile LONG *)&v15->m_uiRefCount);
    LOBYTE(v33) = 2;
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&pBuildGround->m_kPropertyList,
      &element);
    LOBYTE(v33) = 0;
    if ( v16 && !InterlockedDecrement((volatile LONG *)&v16->m_uiRefCount) )
      v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
  }
  ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spWorldScene.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spCharSelectMarkNode.m_pObject,
    0);
  NsDecal::Init(&v1->m_kCharSelectMarkDecal);
  v17 = (NiNode *)&v1->m_spBuildingScene.m_pObject->vfptr;
  v1->m_kCharSelectMarkDecal.m_pkHpTerrain = v1->m_pkTerrain;
  NsDecal::SetObjectTerrain(&v1->m_kCharSelectMarkDecal, v17);
  v18 = (NiDefaultTexturePalette *)operator new(0x20u);
  LOBYTE(v33) = 3;
  if ( v18 )
    NiDefaultTexturePalette::NiDefaultTexturePalette(v18, 0);
  else
    v19 = 0;
  LOBYTE(v33) = 0;
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v1->m_spTexturePalette, v19);
  v20 = (CMagicCircleController *)operator new(0x84u);
  LOBYTE(v33) = 4;
  if ( v20 )
    CMagicCircleController::CMagicCircleController(v20);
  else
    v21 = 0;
  LOBYTE(v33) = 0;
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v1->m_spMagicCircleController, v21);
  pBuildGrounda = (NiNode *)&v1->m_spBuildingScene.m_pObject->vfptr;
  if ( !Folder::m_bInit )
    Folder::Init();
  v22 = v1->m_spMagicCircleController.m_pObject;
  v23 = v1->m_pkTerrain;
  v24 = Folder::Merge(&Folder::m_acSystem, "Misc\\SkillAreaMark.nif");
  CMagicCircleController::Init(v22, v24, v23, pBuildGrounda);
  v25 = &v1->m_spWorldScene.m_pObject->vfptr;
  v26 = *v25;
  v27 = CMagicCircleController::GetNode(v1->m_spMagicCircleController.m_pObject);
  ((void (__thiscall *)(NiRefObjectVtbl **, NiNode *, _DWORD))v26[29].__vecDelDtor)(v25, v27, 0);
  DecalMgr::Init(&v1->m_kDecalMgr, v1->m_pkTerrain, (NiNode *)&v1->m_spBuildingScene.m_pObject->vfptr);
  v33 = -1;
  if ( !InterlockedDecrement((volatile LONG *)&v32->m_uiRefCount) )
    ((void (__stdcall *)(signed int))v32->vfptr->__vecDelDtor)(1);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0067FEC0) --------------------------------------------------------
void __thiscall World::ClearMisc(World *this)
{
  World *v1; // edi@1
  NiDefaultTexturePalette *v2; // eax@1
  NiTexturePalette *v3; // ebx@1
  NiTexturePalette *v4; // eax@2
  NiTexturePalette *v5; // esi@3

  v1 = this;
  std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,unsigned short>>,0>>::clear((std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&this->m_vecFadeObject);
  std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,unsigned short>>,0>>::clear((std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v1->m_vecCameraIntersectObject);
  std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,unsigned short>>,0>>::clear((std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v1->m_vecUpdateFadeObject);
  v2 = (NiDefaultTexturePalette *)operator new(0x20u);
  v3 = 0;
  if ( v2 )
  {
    NiDefaultTexturePalette::NiDefaultTexturePalette(v2, 0);
    v3 = v4;
  }
  v5 = v1->m_spTexturePalette.m_pObject;
  if ( v5 != v3 )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spTexturePalette.m_pObject = v3;
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
}

//----- (0067FF80) --------------------------------------------------------
void __thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture>>::~NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture>>(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture> > *this)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture> > *v1; // esi@1

  v1 = this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture> >Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v1->m_ppkHashTable);
}
// 9BC73C: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture>>::`vftable')(void *p, char);

//----- (0067FFA0) --------------------------------------------------------
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexture>>,NiPointer<NiTexture>>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexture>>,NiPointer<NiTexture>>(NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexture> >,NiPointer<NiTexture> > *this)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v1; // edi@1
  bool v2; // zf@1
  unsigned int v3; // ebx@2
  NiTMapItem<unsigned long,NiPointer<PgWinBut> > *v4; // esi@3
  void *v5; // eax@4

  v1 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  v2 = this->m_bCopy == 0;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture> >Vtbl *)&NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexture>>,NiPointer<NiTexture>>::`vftable';
  if ( !v2 )
  {
    v3 = 0;
    if ( this->m_uiHashSize )
    {
      do
      {
        v4 = v1->m_ppkHashTable[v3];
        while ( v4 )
        {
          v5 = (void *)v4->m_key;
          v4 = v4->m_pkNext;
          operator delete[](v5);
        }
        ++v3;
      }
      while ( v3 < v1->m_uiHashSize );
    }
  }
  v1->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTPointerMap<char const *,NiPointer<NiTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v1);
  v1->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v1);
  operator delete[](v1->m_ppkHashTable);
}
// 9BC73C: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture>>::`vftable')(void *p, char);
// 9BC75C: using guessed type int (__thiscall *NiTPointerMap<char const *,NiPointer<NiTexture>>::`vftable')(void *p, char);
// 9BC77C: using guessed type int (__thiscall *NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexture>>,NiPointer<NiTexture>>::`vftable')(void *p, char);

//----- (00680050) --------------------------------------------------------
bool __stdcall NiTStringTemplateMap<NiTPointerMap<char const *,NiD3DShaderProgramCreator *>,NiD3DShaderProgramCreator *>::IsKeysEqual(const char *pcKey1, const char *pcKey2)
{
  return strcmp(pcKey1, pcKey2) == 0;
}

//----- (006800A0) --------------------------------------------------------
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSourceTexture>>,NiPointer<NiSourceTexture>>::ClearValue(NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiActorManager> >,NiPointer<NiActorManager> > *this, NiTMapItem<char const *,NiPointer<NiActorManager> > *pkItem)
{
  if ( this->m_bCopy )
    operator delete[]((void *)pkItem->m_key);
}

//----- (006800C0) --------------------------------------------------------
NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture> > *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture>>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture> > *this, unsigned int a2)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture> > *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture> >Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BC73C: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture>>::`vftable')(void *p, char);

//----- (00680100) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTPointerMap<char const *,NiPointer<NiTexture>>::`vector deleting destructor'(NiTPointerMap<char const *,NiPointer<NiTexture> > *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // esi@1

  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture> >Vtbl *)&NiTPointerMap<char const *,NiPointer<NiTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture>>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v2);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BC73C: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture>>::`vftable')(void *p, char);
// 9BC75C: using guessed type int (__thiscall *NiTPointerMap<char const *,NiPointer<NiTexture>>::`vftable')(void *p, char);

//----- (00680180) --------------------------------------------------------
NiTStringPointerMap<NiPointer<NiTexture> > *__thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexture>>,NiPointer<NiTexture>>::`vector deleting destructor'(NiTStringPointerMap<NiPointer<NiTexture> > *this, unsigned int a2)
{
  NiTStringPointerMap<NiPointer<NiTexture> > *v2; // esi@1

  v2 = this;
  NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexture>>,NiPointer<NiTexture>>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexture>>,NiPointer<NiTexture>>((NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexture> >,NiPointer<NiTexture> > *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006801B0) --------------------------------------------------------
void __thiscall NiDefaultTexturePalette::NiDefaultTexturePalette(NiDefaultTexturePalette *this, bool bSearchGlobalTextureList)
{
  NiDefaultTexturePalette *v2; // esi@1
  char *v3; // eax@1
  unsigned int v4; // ST08_4@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v2->vfptr = (NiRefObjectVtbl *)&NiDefaultTexturePalette::`vftable';
  v2->m_kHash.m_uiHashSize = 37;
  v2->m_kHash.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture> >Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture>>::`vftable';
  v2->m_kHash.m_kAllocator.m_uiCount = 0;
  v3 = (char *)operator new[](0x94u);
  v4 = 4 * v2->m_kHash.m_uiHashSize;
  v2->m_kHash.m_ppkHashTable = (NiTMapItem<char const *,NiPointer<NiTexture> > **)v3;
  memset(v3, 0, v4);
  v2->m_kHash.m_bCopy = 1;
  v2->m_kHash.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture> >Vtbl *)&NiTStringPointerMap<NiPointer<NiTexture>>::`vftable';
  v2->m_bSearchGlobalTextureList = bSearchGlobalTextureList;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9BC73C: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiTexture>>::`vftable')(void *p, char);
// 9BC79C: using guessed type int (__thiscall *NiTStringPointerMap<NiPointer<NiTexture>>::`vftable')(void *p, char);
// 9BC7EC: using guessed type int (__thiscall *NiDefaultTexturePalette::`vftable')(void *p, char);

//----- (00680270) --------------------------------------------------------
void __thiscall NiDefaultTexturePalette::SetSearchGlobalTextureList(NiDefaultTexturePalette *this, bool bSearch)
{
  this->m_bSearchGlobalTextureList = bSearch;
}

//----- (00680280) --------------------------------------------------------
bool __thiscall NiD3DShaderInterface::IsInitialized(NiD3DShaderInterface *this)
{
  return this->m_bInitialized;
}

//----- (00680290) --------------------------------------------------------
void __thiscall NiDefaultTexturePalette::SetTexture(NiDefaultTexturePalette *this, const char *pcPath, NiTexture *pkTex)
{
  NiDefaultTexturePalette *v3; // esi@1
  NiTexture *v4; // [sp-4h] [bp-Ch]@1
  NiTexture **v5; // [sp+4h] [bp-4h]@1

  v3 = this;
  v5 = &v4;
  v4 = pkTex;
  if ( pkTex )
    InterlockedIncrement((volatile LONG *)&pkTex->m_uiRefCount);
  NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
    (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v3->m_kHash,
    (unsigned int)pcPath,
    (NiPointer<PgWinBut>)v4);
}

//----- (006802D0) --------------------------------------------------------
NiTexture *__thiscall NiDefaultTexturePalette::GetTexture(NiDefaultTexturePalette *this, const char *pcPath, NiTexture *pkSelf)
{
  NiDefaultTexturePalette *v3; // esi@1
  NiTexture *v4; // esi@2
  DWORD v6; // eax@7
  struct NiTexture *v7; // esi@7
  NiRTTI *v8; // eax@10
  const char *v9; // eax@14
  NiTexture *v10; // esi@20
  NiTexture *v11; // edi@26
  NiPointer<NiTexture> spTex; // [sp+10h] [bp-10h]@1
  int v13; // [sp+1Ch] [bp-4h]@1

  v3 = this;
  spTex.m_pObject = 0;
  v13 = 0;
  if ( NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
         (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kHash,
         pcPath,
         (NiPointer<NiShaderLibrary> *)&spTex) )
  {
    v4 = spTex.m_pObject;
    v13 = -1;
    if ( spTex.m_pObject )
    {
      if ( !InterlockedDecrement((volatile LONG *)&spTex.m_pObject->m_uiRefCount) )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
    return v4;
  }
  if ( !v3->m_bSearchGlobalTextureList )
    goto LABEL_20;
  EnterCriticalSection(&NiTexture::ms_kTextureListCriticalSection);
  v6 = GetCurrentThreadId();
  v7 = NiTexture::ms_pkHead;
  ++dword_B625C0;
  dword_B625BC = v6;
  if ( !NiTexture::ms_pkHead )
  {
LABEL_17:
    if ( !--dword_B625C0 )
      dword_B625BC = 0;
    LeaveCriticalSection(&NiTexture::ms_kTextureListCriticalSection);
LABEL_20:
    v10 = spTex.m_pObject;
    v13 = -1;
    if ( spTex.m_pObject && !InterlockedDecrement((volatile LONG *)&spTex.m_pObject->m_uiRefCount) )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    return 0;
  }
  while ( 1 )
  {
    if ( v7 != pkSelf )
    {
      if ( v7 )
      {
        v8 = (NiRTTI *)((int (__thiscall *)(struct NiTexture *))v7->vfptr[1].__vecDelDtor)(v7);
        if ( v8 )
        {
          while ( v8 != &NiSourceTexture::m_RTTI )
          {
            v8 = v8->m_pkBaseRTTI;
            if ( !v8 )
              goto LABEL_16;
          }
          v9 = (const char *)v7[1].vfptr;
          if ( v9 )
          {
            if ( !NiStricmp(v9, pcPath) )
              break;
          }
        }
      }
    }
LABEL_16:
    v7 = v7->m_pkNext;
    if ( !v7 )
      goto LABEL_17;
  }
  if ( !--dword_B625C0 )
    dword_B625BC = 0;
  LeaveCriticalSection(&NiTexture::ms_kTextureListCriticalSection);
  v11 = spTex.m_pObject;
  v13 = -1;
  if ( spTex.m_pObject && !InterlockedDecrement((volatile LONG *)&spTex.m_pObject->m_uiRefCount) )
    v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
  return v7;
}
// B62590: using guessed type struct NiTexture *NiTexture::ms_pkHead;
// B625BC: using guessed type int dword_B625BC;
// B625C0: using guessed type int dword_B625C0;

//----- (00680470) --------------------------------------------------------
NiDefaultTexturePalette *__thiscall NiDefaultTexturePalette::`scalar deleting destructor'(NiDefaultTexturePalette *this, unsigned int a2)
{
  NiDefaultTexturePalette *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiDefaultTexturePalette::`vftable';
  NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexture>>,NiPointer<NiTexture>>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexture>>,NiPointer<NiTexture>>((NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiTexture> >,NiPointer<NiTexture> > *)&this->m_kHash.vfptr);
  v2->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9BC7EC: using guessed type int (__thiscall *NiDefaultTexturePalette::`vftable')(void *p, char);

//----- (006804F0) --------------------------------------------------------
void __thiscall World::TerminatePathFinding(World *this)
{
  NsMakeBlockInfo_Byte *v1; // ecx@1

  v1 = this->m_pkBlockInfo;
  if ( v1 )
    ((void (__stdcall *)(_DWORD))v1->vfptr->~IMakeBlockInfo)(1);
}

//----- (00680520) --------------------------------------------------------
bool __thiscall World::SearchWayPoints(World *this, NiPoint2 pos2Start, NiPoint2 pos2End, int nMaxArryCnt, NiPoint2 *pPos2Arr, int *nResultWayCnt)
{
  return NsPathFinding::SearchWayPoints(&this->kPathFinding, pos2Start, pos2End, nMaxArryCnt, pPos2Arr, nResultWayCnt);
}

//----- (00680550) --------------------------------------------------------
int __cdecl DivideFloat(float fOne, float fTwo)
{
  signed int v2; // esi@1
  signed int v3; // eax@1
  int result; // eax@3

  v2 = (signed int)(fOne * 100.0);
  v3 = (signed int)(100.0 * fTwo);
  if ( v2 && v3 )
    result = v2 / v3;
  else
    result = 0;
  return result;
}

//----- (00680590) --------------------------------------------------------
char __thiscall World::SearchWayPointsNew(World *this, NiPoint2 pos2Start, NiPoint2 pos2End, int nMaxArryCnt, NiPoint2 *pPos2Arr, int *nResultWayCnt, bool *bIsFindEndPoint)
{
  World *v7; // esi@1
  signed int v8; // ecx@1
  int v9; // eax@2
  signed int v10; // ecx@4
  int v11; // eax@5
  signed int v12; // ecx@7
  int v13; // eax@8
  signed int v14; // ecx@10
  int v15; // eax@11
  int v16; // eax@13
  unsigned int *v17; // ecx@14
  double v18; // st6@16
  char result; // al@20

  v7 = this;
  v8 = (signed int)(pos2Start.x * 100.0);
  if ( v8 )
    v9 = v8 / 625;
  else
    v9 = 0;
  v7->kPathFindingNew.StartPos.X = v9;
  v10 = (signed int)(pos2Start.y * 100.0);
  if ( v10 )
    v11 = v10 / 625;
  else
    v11 = 0;
  v7->kPathFindingNew.StartPos.Y = v11;
  v12 = (signed int)(pos2End.x * 100.0);
  if ( v12 )
    v13 = v12 / 625;
  else
    v13 = 0;
  v7->kPathFindingNew.EndPos.X = v13;
  v14 = (signed int)(100.0 * pos2End.y);
  if ( v14 )
    v15 = v14 / 625;
  else
    v15 = 0;
  v7->kPathFindingNew.EndPos.Y = v15;
  CFindWay::FindWay(&v7->kPathFindingNew);
  *nResultWayCnt = v7->kPathFindingNew.NumOfJunc;
  v16 = 0;
  if ( v7->kPathFindingNew.NumOfJunc > 0 )
  {
    v17 = &v7->kPathFindingNew.JuncList[0].Y;
    do
    {
      if ( v16 >= nMaxArryCnt )
        break;
      pPos2Arr[v16].x = (double)*(v17 - 1) * 6.25;
      v18 = (double)*v17 * 6.25;
      ++v16;
      v17 += 2;
      *((float *)&pPos2Arr[v16] - 1) = v18;
    }
    while ( v16 < v7->kPathFindingNew.NumOfJunc );
  }
  if ( *nResultWayCnt != 1
    || v7->kPathFindingNew.StartPos.X != v7->kPathFindingNew.JuncList[v16].X
    || v7->kPathFindingNew.StartPos.Y != v7->kPathFindingNew.JuncList[v16].Y )
  {
    *bIsFindEndPoint = v7->kPathFindingNew.GoalReached != 0;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00680700) --------------------------------------------------------
bool __thiscall World::IsBlock8(World *this, float fX, float fY)
{
  CFindWay *v3; // esi@1
  double v4; // st6@1
  unsigned int v5; // ebx@1
  unsigned int v6; // edi@1
  bool result; // al@10
  unsigned int _uiX_4; // [sp+4h] [bp-4h]@2
  unsigned int fXa; // [sp+10h] [bp+8h]@5
  unsigned int fYa; // [sp+14h] [bp+Ch]@2

  v3 = &this->kPathFindingNew;
  v4 = fX / 6.25;
  v5 = (signed __int64)v4;
  v6 = (signed __int64)(fY / 6.25);
  result = 0;
  if ( CFindWay::GetBlock(&this->kPathFindingNew, v5, v6) )
  {
    fYa = v5 + 1;
    _uiX_4 = v6 + 1;
    if ( CFindWay::GetBlock(v3, v5 + 1, v6 + 1)
      && CFindWay::GetBlock(v3, fYa, v6)
      && CFindWay::GetBlock(v3, (signed __int64)v4, _uiX_4) )
    {
      fXa = v6 - 1;
      if ( CFindWay::GetBlock(v3, v5 - 1, v6 - 1)
        && CFindWay::GetBlock(v3, v5 - 1, v6)
        && CFindWay::GetBlock(v3, (signed __int64)v4, fXa)
        && CFindWay::GetBlock(v3, fYa, fXa)
        && CFindWay::GetBlock(v3, v5 - 1, _uiX_4) )
      {
        result = 1;
      }
    }
  }
  return result;
}

//----- (00680820) --------------------------------------------------------
bool __thiscall World::IsBlock(World *this, float fX, float fY)
{
  return CFindWay::GetBlock(&this->kPathFindingNew, fX, fY) != 0;
}

//----- (00680850) --------------------------------------------------------
bool __thiscall World::LineIntersect(World *this, float _fStartX, float _fStartY, float *_fEndX, float *_fEndY)
{
  return NsPathFinding::LineIntersect(&this->kPathFinding, _fStartX, _fStartY, _fEndX, _fEndY) != 0;
}

//----- (00680880) --------------------------------------------------------
bool __thiscall World::TestArea(World *this, const char *szAreaName, float fX, float fY)
{
  AreaInfoData::IAreaData *v4; // eax@1
  bool result; // al@2

  v4 = AreaInfoData::GetData(&this->m_kAreaInfoData, szAreaName);
  if ( v4 )
    result = ((int (__thiscall *)(AreaInfoData::IAreaData *, _DWORD, _DWORD))v4->vfptr->IntersectTest)(
               v4,
               LODWORD(fX),
               LODWORD(fY));
  else
    result = 0;
  return result;
}

//----- (006808C0) --------------------------------------------------------
bool __thiscall World::IsInArea(World *this, const char *szAreaName)
{
  return AreaInfoData::GetData(&this->m_kAreaInfoData, szAreaName) != 0;
}

//----- (006808E0) --------------------------------------------------------
char __thiscall World::InitPathFinding(World *this)
{
  World *v1; // edi@1
  IMakeBlockInfo *v2; // eax@1
  NsMakeBlockInfo_Byte *v3; // esi@1
  char result; // al@2

  v1 = this;
  v2 = (IMakeBlockInfo *)operator new(0x30u);
  v3 = (NsMakeBlockInfo_Byte *)v2;
  if ( v2 )
  {
    IMakeBlockInfo::IMakeBlockInfo(v2);
    v3->vfptr = (IMakeBlockInfoVtbl *)&NsMakeBlockInfo_Byte::`vftable';
    v3->m_pBlockInfoByte = 0;
    v1->m_pkBlockInfo = v3;
    result = 1;
  }
  else
  {
    result = 1;
    v1->m_pkBlockInfo = 0;
  }
  return result;
}
// 9BC80C: using guessed type void (__thiscall *NsMakeBlockInfo_Byte::`vftable')(NsMakeBlockInfo_Byte *this, unsigned int _uiMapSize, unsigned int _uiSplitCnt, float _fTileLength);

//----- (00680970) --------------------------------------------------------
char __thiscall World::LoadPathFindingData(World *this)
{
  NsMakeBlockInfo_Byte *v1; // eax@1
  char result; // al@2

  v1 = this->m_pkBlockInfo;
  if ( v1 )
  {
    this->kPathFinding.m_pkBlockInfo = v1;
    NsPathFinding::Init(&this->kPathFinding, 0x100u, 0x100u);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006809A0) --------------------------------------------------------
void __thiscall World::SetSubBlockData(World *this, const char *szName, bool bClose)
{
  InstantBlock::SetData(&this->m_kInstantBlock, szName, bClose);
}

//----- (006809B0) --------------------------------------------------------
void __thiscall IMakeBlockInfo::SetBlockData(IMakeBlockInfo *this, unsigned int _uiMapSize, unsigned int _uiSplitCnt, float _fTileLength)
{
  IMakeBlockInfo *v4; // esi@1
  bool *v5; // eax@1
  unsigned int v6; // ST00_4@3

  v4 = this;
  this->m_fTileLength = _fTileLength;
  this->m_nSize = _uiMapSize;
  this->m_uiOneSideBlockCnt = _uiSplitCnt * _uiMapSize;
  this->m_bInit = 1;
  this->m_uiSplitCnt = _uiSplitCnt;
  this->m_uiTotalDataSize = _uiSplitCnt * _uiMapSize * _uiSplitCnt * _uiMapSize;
  v5 = this->m_pbOnTable;
  this->m_fSubTileLength = _fTileLength / (double)_uiSplitCnt;
  if ( v5 )
    operator delete[](v5);
  v6 = (v4->m_uiSplitCnt + 1) * (v4->m_uiSplitCnt + 1);
  v4->m_pbOnTable = 0;
  v4->m_pbOnTable = (bool *)operator new[](v6);
}

//----- (00680A20) --------------------------------------------------------
void __thiscall IMakeBlockInfo::DeleteAllData(IMakeBlockInfo *this)
{
  IMakeBlockInfo *v1; // esi@1
  bool *v2; // eax@1

  v1 = this;
  v2 = this->m_pbOnTable;
  this->m_fTileLength = 0.0;
  this->m_fSubTileLength = 0.0;
  this->m_nSize = 0;
  this->m_uiSplitCnt = 0;
  this->m_uiTotalDataSize = 0;
  this->m_uiOneSideBlockCnt = 0;
  this->m_bInit = 0;
  if ( v2 )
    operator delete[](v2);
  v1->m_pbOnTable = 0;
}

//----- (00680A60) --------------------------------------------------------
void __thiscall NsMakeBlockInfo_Byte::DeleteAllData(NsMakeBlockInfo_Byte *this)
{
  NsMakeBlockInfo_Byte *v1; // esi@1
  bool *v2; // eax@1
  char *v3; // eax@3

  v1 = this;
  v2 = this->m_pbOnTable;
  this->m_fTileLength = 0.0;
  this->m_fSubTileLength = 0.0;
  this->m_nSize = 0;
  this->m_uiSplitCnt = 0;
  this->m_uiTotalDataSize = 0;
  this->m_uiOneSideBlockCnt = 0;
  this->m_bInit = 0;
  if ( v2 )
    operator delete[](v2);
  v3 = v1->m_pBlockInfoByte;
  v1->m_pbOnTable = 0;
  v1->m_uiRealTotalBlockSize = 0;
  v1->m_uiRealOneSideDataSize = 0;
  if ( v3 )
    operator delete[](v3);
  v1->m_pBlockInfoByte = 0;
}

//----- (00680AB0) --------------------------------------------------------
void __thiscall NsMakeBlockInfo_Byte::SetBlockData(NsMakeBlockInfo_Byte *this, unsigned int _uiMapSize, unsigned int _uiSplitCnt, float _fTileLength)
{
  NsMakeBlockInfo_Byte *v4; // esi@1
  unsigned int v5; // eax@1
  unsigned int v6; // ecx@1
  int v7; // edx@3
  char *v8; // eax@3
  float v9; // ST0C_4@5
  char *v10; // eax@5
  unsigned int v11; // ST08_4@5

  v4 = this;
  IMakeBlockInfo::SetBlockData((IMakeBlockInfo *)&this->vfptr, _uiMapSize, _uiSplitCnt, _fTileLength);
  v5 = v4->m_uiOneSideBlockCnt;
  v6 = v4->m_uiOneSideBlockCnt >> 3;
  v4->m_uiRealOneSideDataSize = v6;
  if ( v5 & 7 )
    v4->m_uiRealOneSideDataSize = v6 + 1;
  v7 = v5 * v4->m_uiRealOneSideDataSize;
  v8 = v4->m_pBlockInfoByte;
  v4->m_uiRealTotalBlockSize = v7;
  if ( v8 )
    operator delete[](v8);
  v9 = *(float *)&v4->m_uiRealTotalBlockSize;
  v4->m_pBlockInfoByte = 0;
  v10 = (char *)operator new[](LODWORD(v9));
  v11 = v4->m_uiRealTotalBlockSize;
  v4->m_pBlockInfoByte = v10;
  memset(v10, 0, v11);
}

//----- (00680B20) --------------------------------------------------------
char __thiscall NsMakeBlockInfo_Byte::SetBlock(NsMakeBlockInfo_Byte *this, unsigned int _uiGridXIndex, unsigned int _uiGridYIndex, bool bOn)
{
  char *v4; // eax@1
  char v5; // dl@1
  char result; // al@2

  v4 = &this->m_pBlockInfoByte[_uiGridYIndex * this->m_uiRealOneSideDataSize] + (_uiGridXIndex >> 3);
  v5 = 1 << (_uiGridXIndex - 8 * (_uiGridXIndex >> 3));
  if ( bOn )
  {
    *v4 |= v5;
    result = 1;
  }
  else
  {
    *v4 &= ~v5;
    result = 1;
  }
  return result;
}

//----- (00680B70) --------------------------------------------------------
char __thiscall NsMakeBlockInfo_Byte::SetBlock(NsMakeBlockInfo_Byte *this, unsigned int _uiTileIndexX, unsigned int _uiSubIndexX, unsigned int _uiTileIndexY, unsigned int _uiSubIndexY, bool bOn)
{
  unsigned int v6; // edx@1
  char *v7; // eax@1
  char v8; // dl@1
  char result; // al@2

  v6 = _uiSubIndexX + _uiTileIndexX * this->m_uiSplitCnt;
  v7 = &this->m_pBlockInfoByte[this->m_uiRealOneSideDataSize * (_uiSubIndexY + _uiTileIndexY * this->m_uiSplitCnt)]
     + (v6 >> 3);
  v8 = 1 << (v6 - 8 * (v6 >> 3));
  if ( bOn )
  {
    *v7 |= v8;
    result = 1;
  }
  else
  {
    *v7 &= ~v8;
    result = 1;
  }
  return result;
}

//----- (00680BD0) --------------------------------------------------------
char __thiscall NsMakeBlockInfo_Byte::SetBlock(NsMakeBlockInfo_Byte *this, unsigned int _uiIndex, bool bOn)
{
  char *v3; // eax@1
  char v4; // dl@1
  char result; // al@2

  v3 = &this->m_pBlockInfoByte[_uiIndex >> 3];
  v4 = 1 << (_uiIndex - 8 * (_uiIndex >> 3));
  if ( bOn )
  {
    *v3 |= v4;
    result = 1;
  }
  else
  {
    *v3 &= ~v4;
    result = 1;
  }
  return result;
}

//----- (00680C10) --------------------------------------------------------
bool __thiscall NsMakeBlockInfo_Byte::GetBlock(NsMakeBlockInfo_Byte *this, unsigned int _uiX, unsigned int _uiY)
{
  char *v3; // edx@1
  bool result; // al@2
  unsigned int v5; // eax@3

  v3 = this->m_pBlockInfoByte;
  if ( v3 )
  {
    v5 = this->m_uiOneSideBlockCnt;
    if ( _uiX >= v5 || _uiY >= v5 )
      result = 0;
    else
      result = ((unsigned __int8)(1 << (_uiX - 8 * (_uiX >> 3))) & (unsigned __int8)*(&v3[_uiY
                                                                                        * this->m_uiRealOneSideDataSize]
                                                                                    + (_uiX >> 3))) != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00680C70) --------------------------------------------------------
NsMakeBlockInfo_Byte *__thiscall NsMakeBlockInfo_Byte::`scalar deleting destructor'(NsMakeBlockInfo_Byte *this, unsigned int a2)
{
  NsMakeBlockInfo_Byte *v2; // esi@1
  char *v3; // eax@1

  v2 = this;
  v3 = this->m_pBlockInfoByte;
  this->vfptr = (IMakeBlockInfoVtbl *)&NsMakeBlockInfo_Byte::`vftable';
  if ( v3 )
    operator delete[](v3);
  v2->m_pBlockInfoByte = 0;
  IMakeBlockInfo::~IMakeBlockInfo((IMakeBlockInfo *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BC80C: using guessed type void (__thiscall *NsMakeBlockInfo_Byte::`vftable')(NsMakeBlockInfo_Byte *this, unsigned int _uiMapSize, unsigned int _uiSplitCnt, float _fTileLength);

//----- (00680CB0) --------------------------------------------------------
void __thiscall InstantBlock::SetData(InstantBlock *this, const char *szName, bool bClose)
{
  InstantBlock *v3; // edi@1
  unsigned int v4; // esi@1
  char *v5; // ebx@2
  signed int v6; // ecx@7
  int v7; // eax@9
  unsigned int v8; // edi@9
  signed int v9; // esi@9
  int v10; // edi@14
  signed int v11; // eax@14
  unsigned int v12; // edx@16
  char *v13; // eax@16
  unsigned int v14; // edx@18
  char *v15; // eax@18
  const char *v16; // eax@20
  unsigned int v17; // edx@21
  char *v18; // eax@21
  unsigned int v19; // edx@23
  char *v20; // eax@23
  const char *v21; // eax@25
  unsigned int v22; // edx@26
  char *v23; // eax@26
  unsigned int v24; // edx@28
  char *v25; // eax@28
  const char *v26; // eax@30
  unsigned int v27; // edx@31
  char *v28; // eax@31
  unsigned int v29; // edx@33
  char *v30; // eax@33
  bool v31; // zf@35
  int nWidth; // [sp+8h] [bp-1Ch]@7
  int nRealWidth; // [sp+Ch] [bp-18h]@9
  signed int v34; // [sp+10h] [bp-14h]@14
  char *pData; // [sp+14h] [bp-10h]@11
  unsigned int j; // [sp+18h] [bp-Ch]@11
  InstantBlock *v37; // [sp+20h] [bp-4h]@1
  const char *szNamea; // [sp+2Ch] [bp+8h]@14
  const char *szNameb; // [sp+2Ch] [bp+8h]@20
  const char *szNamec; // [sp+2Ch] [bp+8h]@25
  const char *szNamed; // [sp+2Ch] [bp+8h]@30

  v3 = this;
  v4 = 0;
  v37 = this;
  if ( this->m_uiTotalHeadCnt )
  {
    v5 = (char *)this->m_pkSaveHeaderData;
    while ( szName && _strcmpi(v5 + 4, szName) )
    {
      ++v4;
      v5 += 60;
      if ( v4 >= v3->m_uiTotalHeadCnt )
        return;
    }
    v6 = *((_DWORD *)v5 + 11) - *((_DWORD *)v5 + 9) + 1;
    nWidth = *((_DWORD *)v5 + 11) - *((_DWORD *)v5 + 9) + 1;
    if ( (*((_DWORD *)v5 + 12) - *((_DWORD *)v5 + 10) + 1) % 8 )
    {
      MessageBoxA(0, "Error Door Block Data", "Error", 0);
      return;
    }
    v7 = *((_DWORD *)v5 + 14);
    v8 = v6 / 8;
    v9 = 0;
    nRealWidth = v6 / 8;
    if ( !bClose )
      v7 += *((_DWORD *)v5 + 13);
    j = 0;
    pData = &v37->m_pbyBlockData[v7];
    if ( *((_DWORD *)v5 + 13) > 0u )
    {
LABEL_14:
      v34 = 2;
      v10 = *((_DWORD *)v5 + 10) + j / v8;
      v11 = 1;
      szNamea = (const char *)1;
      v9 %= v6;
      while ( 1 )
      {
        if ( (unsigned __int8)v11 & (unsigned __int8)pData[j] )
        {
          v12 = (unsigned int)(v9 + *((_DWORD *)v5 + 9)) >> 3;
          v13 = &v37->pFindWay->m_pBlockInfoByte[v10 * v37->pFindWay->m_uiRealOneSideDataSize] + v12;
          *v13 |= 1 << (v9 + v5[36] - 8 * v12);
        }
        else
        {
          if ( bClose )
            goto LABEL_20;
          v14 = (unsigned int)(v9 + *((_DWORD *)v5 + 9)) >> 3;
          v15 = &v37->pFindWay->m_pBlockInfoByte[v10 * v37->pFindWay->m_uiRealOneSideDataSize] + v14;
          *v15 &= ~(1 << (v9 + v5[36] - 8 * v14));
        }
        v11 = (signed int)szNamea;
LABEL_20:
        v16 = (const char *)__ROL4__(v11, 1);
        szNameb = v16;
        if ( (unsigned __int8)v16 & (unsigned __int8)pData[j] )
        {
          v17 = (unsigned int)(*((_DWORD *)v5 + 9) + v9 + 1) >> 3;
          v18 = &v37->pFindWay->m_pBlockInfoByte[v10 * v37->pFindWay->m_uiRealOneSideDataSize] + v17;
          *v18 |= 1 << (v5[36] + v9 + 1 - 8 * v17);
        }
        else
        {
          if ( bClose )
            goto LABEL_25;
          v19 = (unsigned int)(*((_DWORD *)v5 + 9) + v9 + 1) >> 3;
          v20 = &v37->pFindWay->m_pBlockInfoByte[v10 * v37->pFindWay->m_uiRealOneSideDataSize] + v19;
          *v20 &= ~(1 << (v5[36] + v9 + 1 - 8 * v19));
        }
        v16 = szNameb;
LABEL_25:
        v21 = (const char *)__ROL4__(v16, 1);
        szNamec = v21;
        if ( (unsigned __int8)v21 & (unsigned __int8)pData[j] )
        {
          v22 = (unsigned int)(*((_DWORD *)v5 + 9) + v9 + 2) >> 3;
          v23 = &v37->pFindWay->m_pBlockInfoByte[v10 * v37->pFindWay->m_uiRealOneSideDataSize] + v22;
          *v23 |= 1 << (v5[36] + v9 + 2 - 8 * v22);
        }
        else
        {
          if ( bClose )
            goto LABEL_30;
          v24 = (unsigned int)(*((_DWORD *)v5 + 9) + v9 + 2) >> 3;
          v25 = &v37->pFindWay->m_pBlockInfoByte[v10 * v37->pFindWay->m_uiRealOneSideDataSize] + v24;
          *v25 &= ~(1 << (v5[36] + v9 + 2 - 8 * v24));
        }
        v21 = szNamec;
LABEL_30:
        v26 = (const char *)__ROL4__(v21, 1);
        szNamed = v26;
        if ( (unsigned __int8)v26 & (unsigned __int8)pData[j] )
        {
          v27 = (unsigned int)(*((_DWORD *)v5 + 9) + v9 + 3) >> 3;
          v28 = &v37->pFindWay->m_pBlockInfoByte[v10 * v37->pFindWay->m_uiRealOneSideDataSize] + v27;
          *v28 |= 1 << (v5[36] + v9 + 3 - 8 * v27);
LABEL_34:
          v26 = szNamed;
          goto LABEL_35;
        }
        if ( !bClose )
        {
          v29 = (unsigned int)(*((_DWORD *)v5 + 9) + v9 + 3) >> 3;
          v30 = &v37->pFindWay->m_pBlockInfoByte[v10 * v37->pFindWay->m_uiRealOneSideDataSize] + v29;
          *v30 &= ~(1 << (v5[36] + v9 + 3 - 8 * v29));
          goto LABEL_34;
        }
LABEL_35:
        v11 = __ROL4__(v26, 1);
        v9 += 4;
        v31 = v34-- == 1;
        szNamea = (const char *)v11;
        if ( v31 )
        {
          if ( ++j < *((_DWORD *)v5 + 13) )
          {
            v8 = nRealWidth;
            v6 = nWidth;
            goto LABEL_14;
          }
          return;
        }
      }
    }
  }
}

//----- (00680FE0) --------------------------------------------------------
char __thiscall World::InitPick(World *this)
{
  World *v1; // esi@1
  Picking *v2; // eax@1
  Picking *v3; // eax@2

  v1 = this;
  v2 = (Picking *)operator new(0x3Cu);
  if ( v2 )
    Picking::Picking(v2);
  else
    v3 = 0;
  v1->m_pkPick = v3;
  return 1;
}

//----- (00681050) --------------------------------------------------------
void __thiscall World::ClearPick(World *this)
{
  World *v1; // esi@1
  Picking *v2; // edi@1
  Picking *v3; // eax@3
  Picking *v4; // eax@4

  v1 = this;
  v2 = this->m_pkPick;
  if ( v2 )
  {
    Picking::~Picking(this->m_pkPick);
    operator delete(v2);
  }
  v1->m_pkPick = 0;
  v3 = (Picking *)operator new(0x3Cu);
  if ( v3 )
    Picking::Picking(v3);
  else
    v4 = 0;
  v1->m_pkPick = v4;
}

//----- (006810E0) --------------------------------------------------------
void __thiscall HeightmapRayIntersection::Clear(HeightmapRayIntersection *this)
{
  HeightmapRayIntersection *v1; // esi@1
  HeightmapRayIntersection::Intersection *v2; // ST00_4@1

  v1 = this;
  operator delete[](this->m_kCheckedFlagMap.pabMap);
  v2 = v1->m_kIntersection.pkIntersections;
  v1->m_kCheckedFlagMap.pabMap = 0;
  operator delete[](v2);
  v1->m_kIntersection.pkIntersections = 0;
}

//----- (00681110) --------------------------------------------------------
void __thiscall HeightmapRayIntersection::Init(HeightmapRayIntersection *this, float *pfHeight, float fTileWidth, float fTileHeight, int iTileXCount, int iTileYCount, float w1, float w2)
{
  this->m_kHeightMapInfo.fTileWidth = fTileWidth;
  this->m_kHeightMapInfo.pfHeight = pfHeight;
  this->m_kHeightMapInfo.fTileHeight = fTileHeight;
  this->m_kHeightMapInfo.iTileXCount = iTileXCount;
  this->m_kHeightMapInfo.fWeight1 = w1;
  this->m_kHeightMapInfo.iTileYCount = iTileYCount;
  this->m_kHeightMapInfo.fWeight2 = w2;
  this->m_kHeightMapInfo.iHeightXCount = iTileXCount + 1;
  this->m_kHeightMapInfo.iHeightYCount = iTileYCount + 1;
}

//----- (00681150) --------------------------------------------------------
Char *__usercall SearchChar@<eax>(NiAVObject *pkAVObject@<eax>)
{
  NiNode *v1; // esi@1
  const char *v2; // eax@2
  Char *result; // eax@5

  v1 = pkAVObject->m_pkParent;
  if ( v1 )
  {
    while ( 1 )
    {
      v2 = v1->m_pcName;
      if ( v2 )
      {
        if ( !strcmp(v2, CharResMgr::ms_pcCharRootNodeName) )
          break;
      }
      v1 = v1->m_pkParent;
      if ( !v1 )
        goto LABEL_5;
    }
    result = CharMgr::GetCharByNodePtr(&g_kCharMgr, v1);
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (006811C0) --------------------------------------------------------
DropItem *__usercall SearchDropItem@<eax>(NiAVObject *pkAVObject@<eax>)
{
  NiNode *v1; // esi@1
  const char *v2; // eax@2
  DropItem *result; // eax@5

  v1 = pkAVObject->m_pkParent;
  if ( v1 )
  {
    while ( 1 )
    {
      v2 = v1->m_pcName;
      if ( v2 )
      {
        if ( !strcmp(v2, DropItem::ms_pcRootNodeName) )
          break;
      }
      v1 = v1->m_pkParent;
      if ( !v1 )
        goto LABEL_5;
    }
    result = DropItemMgr::GetDropItemByNodePtr(&g_kDropItemMgr, v1);
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (00681230) --------------------------------------------------------
signed __int16 __usercall SearchMiniHouse@<ax>(NiAVObject *pkAVObject@<eax>)
{
  NiNode *v1; // esi@1
  const char *v2; // eax@2
  signed __int16 result; // ax@5

  v1 = pkAVObject->m_pkParent;
  if ( v1 )
  {
    while ( 1 )
    {
      v2 = v1->m_pcName;
      if ( v2 )
      {
        if ( !strcmp(v2, (const char *)dword_B5C144) )
          break;
      }
      v1 = v1->m_pkParent;
      if ( !v1 )
        goto LABEL_5;
    }
    result = CMiniHouseMgr::GetMiniHouseHandleByNodePtr((CMiniHouseMgr *)&g_kMiniHouseMgr, v1);
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}
// B5C144: using guessed type int dword_B5C144;

//----- (006812A0) --------------------------------------------------------
void __thiscall World::TerminatePick(World *this)
{
  World *v1; // edi@1
  Picking *v2; // esi@1

  v1 = this;
  v2 = this->m_pkPick;
  if ( v2 )
  {
    Picking::~Picking(this->m_pkPick);
    operator delete(v2);
  }
  v1->m_pkPick = 0;
}

//----- (006812D0) --------------------------------------------------------
char __cdecl CulPlaneVsRay(float _fHeight, NiPoint3 _pos3Origin, NiPoint3 _pos3Dir, float *fT_)
{
  double v4; // st4@1
  char result; // al@2
  double v6; // st6@3
  float pos3N; // [sp+0h] [bp-Ch]@1
  float pos3N_4; // [sp+4h] [bp-8h]@1
  float pos3N_8; // [sp+8h] [bp-4h]@1
  float ta; // [sp+14h] [bp+8h]@3
  float tb; // [sp+14h] [bp+8h]@3
  float t; // [sp+14h] [bp+8h]@3

  pos3N_4 = NiPoint3::UNIT_Z.y;
  pos3N = NiPoint3::UNIT_Z.x;
  pos3N_8 = NiPoint3::UNIT_Z.z;
  NiPoint3::Unitize(&_pos3Dir);
  _pos3Dir.z = _pos3Dir.z * pos3N_8 + _pos3Dir.x * pos3N + _pos3Dir.y * pos3N_4;
  v4 = _pos3Dir.z;
  _pos3Dir.z = fabs(_pos3Dir.z);
  if ( _pos3Dir.z < 0.000009999999747378752
    || (v6 = _fHeight,
        ta = pos3N_8 * _pos3Origin.z + pos3N * _pos3Origin.x + pos3N_4 * _pos3Origin.y,
        tb = v6 - ta,
        t = tb / v4,
        t < 0.0) )
  {
    result = 0;
  }
  else
  {
    *fT_ = t;
    result = 1;
  }
  return result;
}

//----- (00681390) --------------------------------------------------------
void __thiscall HeightmapRayIntersection::~HeightmapRayIntersection(HeightmapRayIntersection *this)
{
  HeightmapRayIntersection *v1; // esi@1
  HeightmapRayIntersection::Intersection *v2; // ST00_4@1

  v1 = this;
  operator delete[](this->m_kCheckedFlagMap.pabMap);
  v2 = v1->m_kIntersection.pkIntersections;
  v1->m_kCheckedFlagMap.pabMap = 0;
  operator delete[](v2);
  v1->m_kIntersection.pkIntersections = 0;
}

//----- (006813C0) --------------------------------------------------------
char __stdcall HeightmapRayIntersection::CheckRayIntersectTri(NiPoint3 *kOrg, NiPoint3 *kDir, NiPoint3 *kV0, NiPoint3 *kV1, NiPoint3 *kV2, float *ru, float *rv, float *rt)
{
  float v9; // ST00_4@1
  float v10; // ST04_4@1
  float v11; // ST08_4@1
  float tvec_4; // ST1C_4@1
  float v13; // ST20_4@1
  double v14; // st5@1
  double v15; // st6@1
  double v16; // st3@1
  char result; // al@2
  float tvec; // ST18_4@3
  float v19; // ST1C_4@3
  double v20; // st4@3
  double v21; // st7@3
  float edge1; // [sp+0h] [bp-30h]@5
  float edge1_4; // [sp+4h] [bp-2Ch]@5
  float edge1_8; // [sp+8h] [bp-28h]@5
  float v25; // [sp+Ch] [bp-24h]@1
  float v26; // [sp+10h] [bp-20h]@1
  float v27; // [sp+14h] [bp-1Ch]@1
  float tvec_8; // [sp+20h] [bp-10h]@3
  float edge2; // [sp+24h] [bp-Ch]@1
  float edge2_4; // [sp+28h] [bp-8h]@1
  float edge2_8; // [sp+2Ch] [bp-4h]@1
  float fInvDet; // [sp+40h] [bp+10h]@3
  float fInvDeta; // [sp+40h] [bp+10h]@5
  float fInvDetb; // [sp+40h] [bp+10h]@7
  float det; // [sp+44h] [bp+14h]@1
  float deta; // [sp+44h] [bp+14h]@7

  v9 = kV1->x - kV0->x;
  v10 = kV1->y - kV0->y;
  v11 = kV1->z - kV0->z;
  edge2 = kV2->x - kV0->x;
  edge2_4 = kV2->y - kV0->y;
  tvec_4 = kDir->y;
  edge2_8 = kV2->z - kV0->z;
  v13 = kDir->z;
  v25 = tvec_4 * edge2_8 - v13 * edge2_4;
  v26 = v13 * edge2 - edge2_8 * kDir->x;
  v27 = edge2_4 * kDir->x - tvec_4 * edge2;
  v14 = v9;
  v15 = v10;
  v16 = v11;
  det = v27 * v11 + v26 * v10 + v25 * v9;
  if ( det < 0.0000001000000011686097 )
    return 0;
  tvec = kOrg->x - kV0->x;
  v19 = kOrg->y - kV0->y;
  tvec_8 = kOrg->z - kV0->z;
  v20 = tvec;
  v21 = v19;
  fInvDet = v25 * tvec + v26 * v19 + tvec_8 * v27;
  *ru = fInvDet;
  if ( fInvDet < 0.0 )
  {
    result = 0;
  }
  else
  {
    if ( det >= (double)fInvDet )
    {
      edge1 = v21 * v16 - tvec_8 * v15;
      edge1_4 = tvec_8 * v14 - v16 * v20;
      edge1_8 = v15 * v20 - v21 * v14;
      fInvDeta = kDir->z * edge1_8 + kDir->y * edge1_4 + edge1 * kDir->x;
      *rv = fInvDeta;
      if ( fInvDeta < 0.0 || det < fInvDeta + *ru )
        return 0;
      fInvDetb = 1.0 / det;
      deta = edge1_8 * edge2_8 + edge1_4 * edge2_4 + edge1 * edge2;
      *rt = deta * fInvDetb;
      *ru = *ru * fInvDetb;
      *rv = fInvDetb * *rv;
      if ( *rt >= 0.0 )
        return 1;
    }
    result = 0;
  }
  return result;
}

//----- (00681600) --------------------------------------------------------
char __thiscall HeightmapRayIntersection::CheckRayIntersectQuad(HeightmapRayIntersection *this, int u, int v)
{
  int eax1; // eax@1
  HeightmapRayIntersection *v4; // esi@1
  int v5; // ecx@1
  bool v6; // zf@1
  int v7; // edx@1
  float *v8; // edi@1
  int v9; // ebx@1
  double v10; // st7@1
  double v11; // st6@2
  int v12; // ecx@2
  double v13; // st5@2
  int v14; // ecx@2
  double v15; // st6@3
  int v16; // ecx@3
  double v17; // st5@3
  int v18; // ecx@3
  char v19; // al@4
  float v20; // edi@4
  float v21; // ebx@4
  int v22; // eax@5
  HeightmapRayIntersection::Intersection *v23; // eax@6
  int v24; // edx@6
  float v25; // ecx@6
  int v26; // eax@6
  int v27; // eax@6
  float v28; // ecx@6
  int v29; // eax@6
  float v30; // edx@6
  float v31; // ecx@6
  int v32; // eax@9
  int v33; // eax@10
  float v34; // ecx@10
  int v35; // eax@10
  float v36; // edx@10
  float v37; // ecx@10
  int v38; // eax@10
  float v39; // edx@10
  float v40; // ecx@10
  char result; // al@11
  NiPoint3 v3; // [sp+Ch] [bp-38h]@2
  NiPoint3 v0; // [sp+18h] [bp-2Ch]@2
  NiPoint3 v1; // [sp+24h] [bp-20h]@2
  NiPoint3 v2; // [sp+30h] [bp-14h]@2
  float fu; // [sp+3Ch] [bp-8h]@4
  float fv; // [sp+40h] [bp-4h]@4
  float bIntersect; // [sp+4Ch] [bp+8h]@1
  float bIntersecta; // [sp+4Ch] [bp+8h]@2
  float bIntersectb; // [sp+4Ch] [bp+8h]@2
  signed int bIntersectc; // [sp+4Ch] [bp+8h]@2
  float bIntersectd; // [sp+4Ch] [bp+8h]@2
  float bIntersecte; // [sp+4Ch] [bp+8h]@3
  float bIntersectf; // [sp+4Ch] [bp+8h]@3
  signed int bIntersectg; // [sp+4Ch] [bp+8h]@3
  float bIntersecth; // [sp+4Ch] [bp+8h]@3
  char bIntersect_3; // [sp+4Fh] [bp+Bh]@4

  eax1 = u;
  v4 = this;
  v5 = v;
  v6 = (u + v) % 2 == 0;
  v7 = v4->m_kHeightMapInfo.iHeightXCount;
  v8 = v4->m_kHeightMapInfo.pfHeight;
  v9 = v4->m_kHeightMapInfo.iHeightXCount;
  bIntersect = (double)u * v4->m_kHeightMapInfo.fTileWidth;
  v10 = bIntersect;
  if ( v6 )
  {
    v0.x = bIntersect;
    bIntersecta = (double)v * v4->m_kHeightMapInfo.fTileHeight;
    v11 = bIntersecta;
    v0.y = bIntersecta;
    v = (int)&v8[eax1 + v * v9];
    v12 = v5 + 1;
    v0.z = *(float *)v * v4->m_kHeightMapInfo.fWeight1 - v4->m_kHeightMapInfo.fWeight2;
    bIntersectb = (double)(eax1 + 1) * v4->m_kHeightMapInfo.fTileWidth;
    v13 = bIntersectb;
    bIntersectc = v12;
    v1.x = v13;
    v1.y = v11;
    v14 = (int)&v8[eax1 + v7 * v12];
    v1.z = *(float *)(v + 4) * v4->m_kHeightMapInfo.fWeight1 - v4->m_kHeightMapInfo.fWeight2;
    v2.x = v10;
    bIntersectd = (double)bIntersectc * v4->m_kHeightMapInfo.fTileHeight;
    v2.y = bIntersectd;
    v2.z = *(float *)v14 * v4->m_kHeightMapInfo.fWeight1 - v4->m_kHeightMapInfo.fWeight2;
    v3.x = v13;
    v3.y = bIntersectd;
    v3.z = *(float *)(v14 + 4) * v4->m_kHeightMapInfo.fWeight1 - v4->m_kHeightMapInfo.fWeight2;
  }
  else
  {
    v2.x = bIntersect;
    bIntersecte = (double)v * v4->m_kHeightMapInfo.fTileHeight;
    v15 = bIntersecte;
    v2.y = bIntersecte;
    v = (int)&v8[eax1 + v * v9];
    v16 = v5 + 1;
    v2.z = *(float *)v * v4->m_kHeightMapInfo.fWeight1 - v4->m_kHeightMapInfo.fWeight2;
    bIntersectf = (double)(eax1 + 1) * v4->m_kHeightMapInfo.fTileWidth;
    v17 = bIntersectf;
    bIntersectg = v16;
    v0.x = v17;
    v0.y = v15;
    v18 = (int)&v8[eax1 + v7 * v16];
    v0.z = *(float *)(v + 4) * v4->m_kHeightMapInfo.fWeight1 - v4->m_kHeightMapInfo.fWeight2;
    v3.x = v10;
    bIntersecth = (double)bIntersectg * v4->m_kHeightMapInfo.fTileHeight;
    v3.y = bIntersecth;
    v3.z = *(float *)v18 * v4->m_kHeightMapInfo.fWeight1 - v4->m_kHeightMapInfo.fWeight2;
    v1.x = v17;
    v1.y = bIntersecth;
    v1.z = *(float *)(v18 + 4) * v4->m_kHeightMapInfo.fWeight1 - v4->m_kHeightMapInfo.fWeight2;
  }
  bIntersect_3 = 0;
  v19 = HeightmapRayIntersection::CheckRayIntersectTri(
          &v4->m_kRayInfo.kOrg,
          &v4->m_kRayInfo.kDir,
          &v0,
          &v1,
          &v2,
          &fu,
          &fv,
          (float *)&v);
  v20 = v1.z;
  v21 = v1.y;
  if ( v19 )
  {
    v22 = v4->m_kIntersection.iNumofIntersection;
    if ( v4->m_kIntersection.iMaxIntersection > v22 )
    {
      v4->m_kIntersection.pkIntersections[v22].t = *(float *)&v;
      v23 = v4->m_kIntersection.pkIntersections;
      v24 = 6 * v4->m_kIntersection.iNumofIntersection;
      v23[8 * v24 / 0x30u].v0.x = v0.x;
      v25 = v0.z;
      v26 = (int)&v23[8 * v24 / 0x30u].v0;
      *(float *)(v26 + 4) = v0.y;
      *(float *)(v26 + 8) = v25;
      v27 = (int)&v4->m_kIntersection.pkIntersections[v4->m_kIntersection.iNumofIntersection].v1;
      *(float *)v27 = v1.x;
      v28 = v2.x;
      *(float *)(v27 + 4) = v21;
      *(float *)(v27 + 8) = v20;
      v29 = (int)&v4->m_kIntersection.pkIntersections[v4->m_kIntersection.iNumofIntersection].v2;
      v30 = v2.y;
      *(float *)v29 = v28;
      v31 = v2.z;
      *(float *)(v29 + 4) = v30;
      *(float *)(v29 + 8) = v31;
      ++v4->m_kIntersection.iNumofIntersection;
    }
    bIntersect_3 = 1;
  }
  if ( HeightmapRayIntersection::CheckRayIntersectTri(
         &v4->m_kRayInfo.kOrg,
         &v4->m_kRayInfo.kDir,
         &v1,
         &v3,
         &v2,
         &fu,
         &fv,
         (float *)&v) )
  {
    v32 = v4->m_kIntersection.iNumofIntersection;
    if ( v4->m_kIntersection.iMaxIntersection > v32 )
    {
      v4->m_kIntersection.pkIntersections[v32].t = *(float *)&v;
      v33 = (int)&v4->m_kIntersection.pkIntersections[v4->m_kIntersection.iNumofIntersection].v0;
      *(float *)v33 = v1.x;
      v34 = v3.x;
      *(float *)(v33 + 4) = v21;
      *(float *)(v33 + 8) = v20;
      v35 = (int)&v4->m_kIntersection.pkIntersections[v4->m_kIntersection.iNumofIntersection].v1;
      v36 = v3.y;
      *(float *)v35 = v34;
      v37 = v3.z;
      *(float *)(v35 + 4) = v36;
      *(float *)(v35 + 8) = v37;
      v38 = (int)&v4->m_kIntersection.pkIntersections[v4->m_kIntersection.iNumofIntersection].v2;
      v39 = v2.y;
      *(float *)v38 = v2.x;
      v40 = v2.z;
      *(float *)(v38 + 4) = v39;
      *(float *)(v38 + 8) = v40;
      ++v4->m_kIntersection.iNumofIntersection;
    }
    result = 1;
  }
  else
  {
    result = bIntersect_3;
  }
  return result;
}

//----- (006818D0) --------------------------------------------------------
bool __thiscall HeightmapRayIntersection::CheckRayIntersectAround(HeightmapRayIntersection *this, int u, int v)
{
  int v3; // edi@1
  HeightmapRayIntersection *v4; // esi@1
  char bRet_3; // [sp+1Bh] [bp+Fh]@1
  char bRet_3a; // [sp+1Bh] [bp+Fh]@1
  char bRet_3b; // [sp+1Bh] [bp+Fh]@1
  char bRet_3c; // [sp+1Bh] [bp+Fh]@1

  v3 = v;
  v4 = this;
  bRet_3 = HeightmapRayIntersection::CheckRayIntersectQuad(this, u - 1, v);
  bRet_3a = HeightmapRayIntersection::CheckRayIntersectQuad(v4, u, v3 - 1) | bRet_3;
  bRet_3b = HeightmapRayIntersection::CheckRayIntersectQuad(v4, u + 1, v3) | bRet_3a;
  bRet_3c = HeightmapRayIntersection::CheckRayIntersectQuad(v4, u, v3 + 1) | bRet_3b;
  return bRet_3c | HeightmapRayIntersection::CheckRayIntersectQuad(v4, u, v3);
}

//----- (00681930) --------------------------------------------------------
char __thiscall World::GetCameraPickPos(World *this, NiPoint3 kOrigin, NiPoint3 kDir, NiPoint3 *kPos, NiPoint3 *kNormal, float *pfDistance)
{
  World *v6; // esi@1
  NiNode *v7; // eax@1
  Picking *v8; // edi@1
  NiNode *v9; // ebx@1
  Picking *v10; // ebx@11
  float v11; // eax@11
  NiAVObject *v12; // edi@11
  PgNsTerrain *v13; // eax@21
  Picking *v14; // edi@22
  float v15; // eax@22
  NiAVObject *v16; // ebx@22
  Picking *v17; // ecx@31
  double v18; // st7@32
  double v19; // st7@33
  Picking *v20; // ecx@35
  Picking *v21; // ebx@36
  int v22; // eax@36
  NiAVObject *v23; // edi@36
  int *v24; // ebx@36
  char v25; // bl@44
  bool v26; // zf@46
  char result; // al@49
  double v28; // st7@50
  double v29; // st7@51
  double v30; // st6@51
  NiPoint3 *v31; // eax@51
  float v32; // edx@52
  float v33; // ecx@52
  float v34; // edx@53
  NiPoint3 *v35; // eax@53
  float v36; // ecx@53
  float v37; // edx@53
  NiPoint3 *v38; // eax@54
  float v39; // ecx@54
  float v40; // edx@54
  float v41; // edx@55
  float v42; // ecx@55
  float v43; // edx@56
  NiPoint3 *v44; // eax@56
  float v45; // ecx@56
  float v46; // edx@56
  NiPoint3 *v47; // eax@57
  float v48; // ecx@57
  float v49; // edx@57
  float v50; // edx@59
  float v51; // ecx@59
  NiPoint3 *v52; // eax@61
  float v53; // ecx@61
  float v54; // edx@61
  NiPoint3 *v55; // [sp-Ch] [bp-70h]@33
  NiPoint3 kNormalBuildingScene; // [sp+8h] [bp-5Ch]@10
  NiPoint3 kGroundPos; // [sp+14h] [bp-50h]@10
  NiPoint3 kNormalGroundObject; // [sp+20h] [bp-44h]@20
  NiPoint3 kGroundObjectPos; // [sp+2Ch] [bp-38h]@20
  NiPoint3 kNormalMM; // [sp+38h] [bp-2Ch]@45
  NiPoint3 kGroundWallPos; // [sp+44h] [bp-20h]@45
  float fGroundDistance; // [sp+50h] [bp-14h]@1
  int v63; // [sp+54h] [bp-10h]@36
  float fGroundWallDistance; // [sp+58h] [bp-Ch]@1
  float fGroundObjectDistance; // [sp+5Ch] [bp-8h]@11
  bool bGroundPick; // [sp+62h] [bp-2h]@1
  bool bGroundObjectPick; // [sp+63h] [bp-1h]@19

  fGroundDistance = 3.4028235e38;
  v6 = this;
  this->m_pkPick->m_bReturnNormal = 1;
  v7 = this->m_spGroundObject.m_pObject;
  v8 = this->m_pkPick;
  v9 = (NiNode *)v8->m_spRoot.m_pObject;
  bGroundPick = 0;
  fGroundWallDistance = *(float *)&v7;
  if ( v9 != v7 )
  {
    if ( v9 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
        v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      *(float *)&v7 = fGroundWallDistance;
    }
    v8->m_spRoot.m_pObject = (NiAVObject *)v7;
    if ( *(float *)&v7 != 0.0 )
      InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  }
  if ( Picking::PickCharacter(v6->m_pkPick, &kOrigin, &kDir) )
  {
    fGroundDistance = Picking::GetDistance(v6->m_pkPick, 0);
    Picking::GetIntersection(v6->m_pkPick, &kGroundPos, 0);
    Picking::GetNormal(v6->m_pkPick, &kNormalBuildingScene, 0);
    bGroundPick = 1;
  }
  v10 = v6->m_pkPick;
  v11 = *(float *)&v6->m_spGroundObjectCollidee.m_pObject;
  fGroundObjectDistance = 3.4028235e38;
  v12 = v10->m_spRoot.m_pObject;
  fGroundWallDistance = v11;
  if ( v12 != (NiAVObject *)LODWORD(v11) )
  {
    if ( v12 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
        v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
      v11 = fGroundWallDistance;
    }
    *(float *)&v10->m_spRoot.m_pObject = v11;
    if ( v11 != 0.0 )
      InterlockedIncrement((volatile LONG *)(LODWORD(v11) + 4));
  }
  bGroundObjectPick = Picking::PickGround(v6->m_pkPick, &kOrigin, &kDir);
  if ( bGroundObjectPick )
  {
    Picking::GetIntersection(v6->m_pkPick, &kGroundObjectPos, 0);
    fGroundObjectDistance = Picking::GetDistance(v6->m_pkPick, 0);
    Picking::GetNormal(v6->m_pkPick, &kNormalGroundObject, 0);
  }
  v13 = v6->m_pkTerrain;
  if ( v13 )
  {
    v14 = v6->m_pkPick;
    v15 = *(float *)&v13->m_spScene.m_pObject;
    v16 = v14->m_spRoot.m_pObject;
    fGroundWallDistance = v15;
    if ( v16 != (NiAVObject *)LODWORD(v15) )
    {
      if ( v16 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v16->m_uiRefCount) && v16 )
          v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
        v15 = fGroundWallDistance;
      }
      *(float *)&v14->m_spRoot.m_pObject = v15;
      if ( v15 != 0.0 )
        InterlockedIncrement((volatile LONG *)(LODWORD(v15) + 4));
    }
    if ( Picking::PickGround(v6->m_pkPick, &kOrigin, &kDir) )
    {
      v17 = v6->m_pkPick;
      if ( bGroundObjectPick )
      {
        v18 = Picking::GetDistance(v17, 0);
        if ( fGroundObjectDistance <= v18 )
          goto LABEL_36;
        Picking::GetIntersection(v6->m_pkPick, &kGroundObjectPos, 0);
        v19 = Picking::GetDistance(v6->m_pkPick, 0);
        v55 = &kNormalGroundObject;
      }
      else
      {
        bGroundObjectPick = 1;
        Picking::GetIntersection(v17, &kGroundObjectPos, 0);
        v19 = Picking::GetDistance(v6->m_pkPick, 0);
        v55 = &kNormalGroundObject;
      }
      v20 = v6->m_pkPick;
      fGroundObjectDistance = v19;
      Picking::GetNormal(v20, v55, 0);
    }
  }
LABEL_36:
  v21 = v6->m_pkPick;
  v22 = (int)v6->m_spUseCameraCollidee.m_pObject;
  fGroundWallDistance = 3.4028235e38;
  v23 = v21->m_spRoot.m_pObject;
  v24 = (int *)&v21->m_spRoot;
  v63 = v22;
  if ( v23 != (NiAVObject *)v22 )
  {
    if ( v23 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v23->m_uiRefCount) && v23 )
        v23->vfptr->__vecDelDtor((NiRefObject *)v23, 1u);
      v22 = v63;
    }
    *v24 = v22;
    if ( v22 )
      InterlockedIncrement((volatile LONG *)(v22 + 4));
  }
  v25 = Picking::PickGround(v6->m_pkPick, &kOrigin, &kDir);
  if ( v25 )
  {
    Picking::GetIntersection(v6->m_pkPick, &kGroundWallPos, 0);
    fGroundWallDistance = Picking::GetDistance(v6->m_pkPick, 0);
    Picking::GetNormal(v6->m_pkPick, &kNormalMM, 0);
  }
  v26 = bGroundPick == 0;
  v6->m_pkPick->m_bReturnNormal = 0;
  if ( v26 && !bGroundObjectPick && !v25 )
    return 0;
  v28 = fGroundDistance;
  if ( fGroundObjectDistance >= (double)fGroundDistance )
  {
    v30 = fGroundWallDistance;
    v31 = kPos;
    if ( fGroundWallDistance < v28 )
    {
LABEL_52:
      v32 = kGroundWallPos.y;
      v31->x = kGroundWallPos.x;
      v33 = kGroundWallPos.z;
      v31->y = v32;
      v31->z = v33;
      if ( pfDistance )
      {
        v34 = kNormalMM.x;
        *pfDistance = v30;
        v35 = kNormal;
        v36 = kNormalMM.y;
        kNormal->x = v34;
        v37 = kNormalMM.z;
        v35->y = v36;
        v35->z = v37;
        result = 1;
      }
      else
      {
        v38 = kNormal;
        v39 = kNormalMM.y;
        kNormal->x = kNormalMM.x;
        v40 = kNormalMM.z;
        v38->y = v39;
        v38->z = v40;
        result = 1;
      }
      return result;
    }
    v50 = kGroundPos.y;
    kPos->x = kGroundPos.x;
    v51 = kGroundPos.z;
    v31->y = v50;
    v31->z = v51;
    if ( pfDistance )
      *pfDistance = v28;
    v52 = kNormal;
    v53 = kNormalBuildingScene.y;
    kNormal->x = kNormalBuildingScene.x;
    v54 = kNormalBuildingScene.z;
    v52->y = v53;
    v52->z = v54;
    result = 1;
  }
  else
  {
    v29 = fGroundObjectDistance;
    v30 = fGroundWallDistance;
    v31 = kPos;
    if ( fGroundWallDistance < (double)fGroundObjectDistance )
      goto LABEL_52;
    v41 = kGroundObjectPos.y;
    kPos->x = kGroundObjectPos.x;
    v42 = kGroundObjectPos.z;
    v31->y = v41;
    v31->z = v42;
    if ( pfDistance )
    {
      v43 = kNormalGroundObject.x;
      *pfDistance = v29;
      v44 = kNormal;
      v45 = kNormalGroundObject.y;
      kNormal->x = v43;
      v46 = kNormalGroundObject.z;
      v44->y = v45;
      v44->z = v46;
      result = 1;
    }
    else
    {
      v47 = kNormal;
      v48 = kNormalGroundObject.y;
      kNormal->x = kNormalGroundObject.x;
      v49 = kNormalGroundObject.z;
      v47->y = v48;
      v47->z = v49;
      result = 1;
    }
  }
  return result;
}

//----- (00681D60) --------------------------------------------------------
bool __thiscall World::GetGroundPos(World *this, NiPoint3 kOrigin, NiPoint3 kDir, NiPoint3 *kTargetPos, float *pfDistance)
{
  World *v5; // esi@1
  NiNode *v6; // eax@1
  Picking *v7; // edi@1
  NiNode *v8; // ebx@1
  Picking *v9; // ebx@11
  int v10; // eax@11
  NiAVObject *v11; // edi@11
  int *v12; // ebx@11
  char v13; // bl@19
  NiPoint3 *v14; // eax@23
  float v15; // edx@24
  float v16; // ecx@24
  bool result; // al@25
  float v18; // ecx@26
  float v19; // edx@26
  NiPoint3 *v20; // eax@29
  float v21; // edx@29
  float v22; // ecx@29
  NiPoint3 kGroundObjectPos; // [sp+Ch] [bp-24h]@20
  NiPoint3 kGroundPos; // [sp+18h] [bp-18h]@10
  float fGroundDistance; // [sp+24h] [bp-Ch]@10
  NiNode *v26; // [sp+28h] [bp-8h]@1
  bool bGroundPick; // [sp+2Fh] [bp-1h]@9

  v5 = this;
  v6 = this->m_spGroundScene.m_pObject;
  v7 = this->m_pkPick;
  v8 = (NiNode *)v7->m_spRoot.m_pObject;
  v26 = v6;
  if ( v8 != v6 )
  {
    if ( v8 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
        v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      v6 = v26;
    }
    v7->m_spRoot.m_pObject = (NiAVObject *)v6;
    if ( v6 )
      InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  }
  bGroundPick = Picking::PickGround(v5->m_pkPick, &kOrigin, &kDir);
  if ( bGroundPick )
  {
    Picking::GetIntersection(v5->m_pkPick, &kGroundPos, 0);
    fGroundDistance = Picking::GetDistance(v5->m_pkPick, 0);
  }
  v9 = v5->m_pkPick;
  v10 = (int)v5->m_spGroundObjectCollidee.m_pObject;
  v11 = v9->m_spRoot.m_pObject;
  v12 = (int *)&v9->m_spRoot;
  v26 = (NiNode *)v10;
  if ( v11 != (NiAVObject *)v10 )
  {
    if ( v11 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
        v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
      v10 = (int)v26;
    }
    *v12 = v10;
    if ( v10 )
      InterlockedIncrement((volatile LONG *)(v10 + 4));
  }
  v13 = Picking::PickGround(v5->m_pkPick, &kOrigin, &kDir);
  if ( v13 )
  {
    Picking::GetIntersection(v5->m_pkPick, &kGroundObjectPos, 0);
    kDir.z = Picking::GetDistance(v5->m_pkPick, 0);
  }
  if ( bGroundPick )
  {
    if ( v13 )
    {
      v14 = kTargetPos;
      if ( kGroundObjectPos.z < (double)kGroundPos.z )
      {
        v15 = kGroundPos.y;
        kTargetPos->x = kGroundPos.x;
        v16 = kGroundPos.z;
        v14->y = v15;
        v14->z = v16;
        if ( pfDistance )
        {
          *pfDistance = fGroundDistance;
          return 1;
        }
        return 1;
      }
LABEL_26:
      v18 = kGroundObjectPos.y;
      v14->x = kGroundObjectPos.x;
      v19 = kGroundObjectPos.z;
      v14->y = v18;
      v14->z = v19;
      if ( pfDistance )
        *pfDistance = kDir.z;
      return 1;
    }
    v20 = kTargetPos;
    v21 = kGroundPos.y;
    kTargetPos->x = kGroundPos.x;
    v22 = kGroundPos.z;
    v20->y = v21;
    v20->z = v22;
    if ( pfDistance )
      *pfDistance = fGroundDistance;
    result = 1;
  }
  else
  {
    if ( v13 )
    {
      v14 = kTargetPos;
      goto LABEL_26;
    }
    result = 0;
  }
  return result;
}

//----- (00681F30) --------------------------------------------------------
bool __thiscall World::GetGroundPos(World *this, float fXPos, float fYPos, NiPoint3 *kPos, float *pfDistance)
{
  _BYTE v5[12]; // ST0C_12@1
  _BYTE v6[12]; // ST00_12@1

  *(float *)v5 = World::ms_kDownDir.x;
  *(_QWORD *)&v5[4] = *(_QWORD *)&World::ms_kDownDir.y;
  *(_QWORD *)v6 = __PAIR__(LODWORD(fYPos), LODWORD(fXPos));
  *(float *)&v6[8] = this->m_fMaxHeight;
  return World::GetGroundPos(this, *(NiPoint3 *)v6, *(NiPoint3 *)v5, kPos, pfDistance);
}

//----- (00681FA0) --------------------------------------------------------
char __thiscall World::GetAdvGroundPos(World *this, float fX, float fY, NiPoint3 *kTargetPos)
{
  World *v4; // ebx@1
  PgNsTerrain *v5; // ecx@1
  char v7; // al@4
  Picking *v8; // esi@4
  NiAVObject *v9; // edi@4
  int v10; // eax@4
  Picking *v11; // ecx@12
  char v12; // al@12
  NiPoint3 *v13; // eax@16
  float v14; // edx@17
  float v15; // ecx@17
  float v16; // ecx@18
  float v17; // edx@18
  float v18; // edx@19
  float v19; // ecx@19
  NiPoint3 kOrigin; // [sp+1Ch] [bp-2Ch]@12
  NiPoint3 kGroundObjectPos; // [sp+28h] [bp-20h]@13
  NiPoint3 kTerrianPos; // [sp+34h] [bp-14h]@4
  int v23; // [sp+40h] [bp-8h]@4
  bool bTerrianPick; // [sp+47h] [bp-1h]@4
  char bGroundObjectPick_3; // [sp+53h] [bp+Bh]@12

  v4 = this;
  v5 = this->m_pkTerrain;
  if ( !v5 )
  {
    kTargetPos->x = fX;
    kTargetPos->y = fY;
    return 0;
  }
  v7 = PgNsTerrain::GetPositionDirectFind(v5, fX, fY, &kTerrianPos, 0);
  v8 = v4->m_pkPick;
  v9 = v8->m_spRoot.m_pObject;
  bTerrianPick = v7;
  v10 = (int)v4->m_spGroundObjectCollidee.m_pObject;
  v23 = v10;
  if ( v9 != (NiAVObject *)v10 )
  {
    if ( v9 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
        v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      v10 = v23;
    }
    v8->m_spRoot.m_pObject = (NiAVObject *)v10;
    if ( v10 )
      InterlockedIncrement((volatile LONG *)(v10 + 4));
  }
  kOrigin.x = fX;
  v11 = v4->m_pkPick;
  kOrigin.y = fY;
  kOrigin.z = v4->m_fMaxHeight;
  v12 = Picking::PickGround(v11, &kOrigin, &World::ms_kDownDir);
  bGroundObjectPick_3 = v12;
  if ( v12 )
  {
    Picking::GetIntersection(v4->m_pkPick, &kGroundObjectPos, 0);
    v12 = bGroundObjectPick_3;
  }
  if ( !bTerrianPick )
  {
    if ( !v12 )
      return 0;
    v13 = kTargetPos;
LABEL_18:
    v16 = kGroundObjectPos.y;
    v13->x = kGroundObjectPos.x;
    v17 = kGroundObjectPos.z;
    v13->y = v16;
    v13->z = v17;
    return 1;
  }
  if ( v12 )
  {
    v13 = kTargetPos;
    if ( kGroundObjectPos.z < (double)kTerrianPos.z )
    {
      v14 = kTerrianPos.y;
      kTargetPos->x = kTerrianPos.x;
      v15 = kTerrianPos.z;
      kTargetPos->y = v14;
      kTargetPos->z = v15;
      return 1;
    }
    goto LABEL_18;
  }
  v18 = kTerrianPos.y;
  kTargetPos->x = kTerrianPos.x;
  v19 = kTerrianPos.z;
  kTargetPos->y = v18;
  kTargetPos->z = v19;
  return 1;
}

//----- (00682100) --------------------------------------------------------
void __thiscall World::GetCharRegenPos(World *this, NiPoint3 *kRegenPos)
{
  World *v2; // esi@1
  MapInfo *v3; // eax@1
  double v4; // st7@2
  float fX; // ST00_4@4
  float fY; // [sp+4h] [bp-10h]@2

  v2 = this;
  v3 = MapInfoTab::GetByMapName(&this->m_kMapName);
  if ( v3 )
  {
    fY = (double)v3->RegenY;
    v4 = (double)v3->RegenX;
  }
  else
  {
    v4 = 0.0;
    fY = 0.0;
  }
  fX = v4;
  if ( !World::GetAdvGroundPos(v2, fX, fY, kRegenPos) )
    *kRegenPos = NiPoint3::ZERO;
}

//----- (00682180) --------------------------------------------------------
char __thiscall World::PickChar(World *this, NiPoint3 *kOrigin, NiPoint3 *kDir, Char **pkChar, float *rfDistance)
{
  World *v5; // esi@1
  NiNode *v6; // eax@1
  Picking *v7; // edi@1
  NiNode *v8; // ebx@1
  unsigned int v9; // ebx@10
  unsigned int v10; // edi@10
  NiAVObject *v11; // eax@11
  Char *v12; // eax@12
  Char *v13; // ebx@12
  Picking *v14; // ebx@17
  NiNode *v15; // eax@17
  NiNode *v16; // edi@17
  unsigned int v17; // ebx@26
  unsigned int v18; // edi@26
  NiAVObject *v19; // eax@27
  Char *v20; // eax@28
  Char *v21; // ebx@28
  char result; // al@33
  unsigned int iTotal; // [sp+8h] [bp-10h]@1
  unsigned int iTotala; // [sp+8h] [bp-10h]@10
  unsigned int iTotalb; // [sp+8h] [bp-10h]@17
  float fNormalCharPickedDistance; // [sp+Ch] [bp-Ch]@1
  Char *pkNormalCharPicked; // [sp+10h] [bp-8h]@1
  char bNormalCharPicked; // [sp+17h] [bp-1h]@9
  float fAbnormalCharPickedDistance; // [sp+24h] [bp+Ch]@26
  float fAbnormalCharPickedDistancea; // [sp+24h] [bp+Ch]@37

  fNormalCharPickedDistance = 9.9999998e12;
  v5 = this;
  v6 = this->m_spCharScene.m_pObject;
  v7 = this->m_pkPick;
  v8 = (NiNode *)v7->m_spRoot.m_pObject;
  pkNormalCharPicked = 0;
  iTotal = (unsigned int)v6;
  if ( v8 != v6 )
  {
    if ( v8 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
        v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      v6 = (NiNode *)iTotal;
    }
    v7->m_spRoot.m_pObject = (NiAVObject *)v6;
    if ( v6 )
      InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  }
  bNormalCharPicked = Picking::PickCharacter(v5->m_pkPick, kOrigin, kDir);
  if ( !bNormalCharPicked )
    goto LABEL_17;
  v9 = v5->m_pkPick->m_pickResults.m_uiESize;
  v10 = 0;
  iTotala = v9;
  if ( !v9 )
    goto LABEL_16;
  while ( 1 )
  {
    v11 = Picking::GetAVObject(v5->m_pkPick, v10);
    if ( v11 )
      break;
LABEL_15:
    if ( ++v10 >= v9 )
      goto LABEL_16;
  }
  v12 = SearchChar(v11);
  v13 = v12;
  if ( !v12 || v12 == g_pkMainChar )
  {
    v9 = iTotala;
    goto LABEL_15;
  }
  if ( !(unsigned __int8)((int (__thiscall *)(_DWORD))v12->vfptr[1].Affect)(v12)
    || (unsigned __int8)((int (__thiscall *)(_DWORD))v13->vfptr[1].Deaffect)(v13) )
  {
    fNormalCharPickedDistance = Picking::GetDistance(v5->m_pkPick, v10);
    pkNormalCharPicked = v13;
    goto LABEL_17;
  }
LABEL_16:
  bNormalCharPicked = 0;
  pkNormalCharPicked = 0;
LABEL_17:
  v14 = v5->m_pkPick;
  v15 = v5->m_spAbstateCharScene.m_pObject;
  v16 = (NiNode *)v14->m_spRoot.m_pObject;
  iTotalb = (unsigned int)v15;
  if ( v16 != v15 )
  {
    if ( v16 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v16->m_uiRefCount) && v16 )
        v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
      v15 = (NiNode *)iTotalb;
    }
    v14->m_spRoot.m_pObject = (NiAVObject *)v15;
    if ( v15 )
      InterlockedIncrement((volatile LONG *)&v15->m_uiRefCount);
  }
  if ( !Picking::PickCharacter(v5->m_pkPick, kOrigin, kDir)
    || (v17 = v5->m_pkPick->m_pickResults.m_uiESize, v18 = 0, fAbnormalCharPickedDistance = *(float *)&v17, !v17) )
  {
LABEL_32:
    if ( bNormalCharPicked )
    {
      *rfDistance = fNormalCharPickedDistance;
      *pkChar = pkNormalCharPicked;
      result = 1;
    }
    else
    {
      *pkChar = 0;
      result = 0;
    }
    return result;
  }
  while ( 2 )
  {
    v19 = Picking::GetAVObject(v5->m_pkPick, v18);
    if ( !v19 )
    {
LABEL_31:
      if ( ++v18 >= v17 )
        goto LABEL_32;
      continue;
    }
    break;
  }
  v20 = SearchChar(v19);
  v21 = v20;
  if ( !v20 || v20 == g_pkMainChar )
  {
    v17 = LODWORD(fAbnormalCharPickedDistance);
    goto LABEL_31;
  }
  fAbnormalCharPickedDistancea = Picking::GetDistance(v5->m_pkPick, v18);
  if ( bNormalCharPicked )
  {
    if ( fAbnormalCharPickedDistancea <= (double)fNormalCharPickedDistance )
    {
      *rfDistance = fAbnormalCharPickedDistancea;
      *pkChar = v21;
      result = 1;
    }
    else
    {
      *rfDistance = fNormalCharPickedDistance;
      *pkChar = pkNormalCharPicked;
      result = 1;
    }
  }
  else
  {
    *rfDistance = fAbnormalCharPickedDistancea;
    *pkChar = v21;
    result = 1;
  }
  return result;
}

//----- (006823C0) --------------------------------------------------------
unsigned int __thiscall World::PickedObjConditionCheck(World *this)
{
  World *v1; // ebx@1
  Picking *v2; // ecx@1
  unsigned int result; // eax@1
  unsigned int v4; // edi@1
  NiAVObject *v5; // eax@2
  NiAVObject *v6; // esi@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v7; // ecx@3
  mhObject *v8; // eax@7
  char v9; // dl@8
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v10; // eax@10
  unsigned int uiReturn; // [sp+8h] [bp-Ch]@1
  bool b; // [sp+13h] [bp-1h]@1

  v1 = this;
  v2 = this->m_pkPick;
  result = 0;
  v4 = 0;
  uiReturn = 0;
  b = 0;
  if ( v2->m_pickResults.m_uiESize )
  {
    while ( 1 )
    {
      v5 = Picking::GetAVObject(v2, v4);
      v6 = v5;
      if ( !v5 )
        return uiReturn;
      v7 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)mhRoomFloorName_1._Bx._Ptr;
      if ( mhRoomFloorName_1._Myres < 0x10 )
        v7 = &mhRoomFloorName_1;
      if ( _mbsncmp(v5->m_pcName, v7->_Bx._Buf, 4u) )
      {
        v10 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)mhRoomWallName_1._Bx._Ptr;
        if ( mhRoomWallName_1._Myres < 0x10 )
          v10 = &mhRoomWallName_1;
        if ( _mbsncmp(v6->m_pcName, v10->_Bx._Buf, 4u) )
          goto LABEL_14;
      }
      else
      {
        if ( b )
          goto LABEL_14;
        v8 = MiniHouseIndoor::GetObjectA(&v1->m_MiniHouseIndoorMode, v1->m_MiniHouseIndoorMode.m_PickedObj);
        if ( !v8 )
          goto LABEL_14;
        v9 = v8->m_BindType.m_byBindType[2];
        if ( (unsigned __int8)*(_WORD *)&v8->m_BindType.m_byBindType[0] == 1 )
          goto LABEL_14;
        b = 1;
      }
      uiReturn = v4;
LABEL_14:
      v2 = v1->m_pkPick;
      if ( ++v4 >= v2->m_pickResults.m_uiESize )
        return uiReturn;
    }
  }
  return result;
}

//----- (00682490) --------------------------------------------------------
NiAVObject *__thiscall World::GetCandidatePickObj(World *this, NiPoint3 *kOrigin, NiPoint3 *kDir, NiPoint3 *kGroundPos)
{
  World *v4; // ebx@1
  NiNode *v5; // edi@1
  int v6; // eax@1
  NiNode *v7; // esi@1
  NiNode *v8; // esi@8
  NiAVObject *v9; // eax@13
  NiPointer<NiNode> result; // [sp+10h] [bp-14h]@1
  int v11; // [sp+14h] [bp-10h]@1
  int v12; // [sp+20h] [bp-4h]@1

  v4 = this;
  v5 = MiniHouseIndoor::GetObjRootScene(&this->m_MiniHouseIndoorMode, &result)->m_pObject;
  v6 = (int)v4->m_pkPick;
  v7 = *(NiNode **)(v6 + 24);
  v12 = 0;
  v11 = v6;
  if ( v7 != v5 )
  {
    if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    *(_DWORD *)(v11 + 24) = v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  }
  v8 = result.m_pObject;
  v12 = -1;
  if ( result.m_pObject && !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) && v8 )
    v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
  if ( Picking::PickCharacter(v4->m_pkPick, kOrigin, kDir) )
    v9 = Picking::GetAVObject(v4->m_pkPick, 0);
  else
    v9 = 0;
  return v9;
}

//----- (00682590) --------------------------------------------------------
signed int __thiscall World::PickWithoutGround(World *this, NiPoint3 *kOrigin, NiPoint3 *kDir, Char **pkChar, DropItem **pkDropItem, unsigned __int16 *hMiniHouse)
{
  Char **v6; // eax@1
  World *v7; // esi@1
  DropItem **v8; // ecx@1
  char v9; // al@1
  Picking *v10; // edi@1
  NiAVObject *v11; // ebx@1
  Char **v12; // eax@1
  Picking *v13; // edi@11
  int v14; // eax@11
  NiAVObject *v15; // ebx@11
  char v16; // bl@19
  NiAVObject *v17; // ecx@20
  NiPoint3 **v18; // eax@22
  double v19; // st5@24
  NiPoint3 **v20; // eax@24
  double v21; // st4@26
  double v22; // st3@28
  double v23; // st5@28
  double v25; // st6@33
  NiAVObject *pkItemObject; // [sp+8h] [bp-18h]@1
  float fCharDistance; // [sp+Ch] [bp-14h]@1
  int v28; // [sp+10h] [bp-10h]@11
  float fDropItemDistance; // [sp+14h] [bp-Ch]@1
  float fMHDistance; // [sp+18h] [bp-8h]@11
  bool bCharPick; // [sp+1Fh] [bp-1h]@1

  v6 = pkChar;
  fDropItemDistance = 3.4028235e38;
  fCharDistance = 3.4028235e38;
  v7 = this;
  v8 = pkDropItem;
  *pkChar = 0;
  *v8 = 0;
  *hMiniHouse = -1;
  pkItemObject = 0;
  v9 = World::PickChar(v7, kOrigin, kDir, v6, &fCharDistance);
  v10 = v7->m_pkPick;
  v11 = v10->m_spRoot.m_pObject;
  bCharPick = v9;
  v12 = (Char **)v7->m_spDropItemScene.m_pObject;
  pkChar = v12;
  if ( (Char **)v11 != v12 )
  {
    if ( v11 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
        v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
      v12 = pkChar;
    }
    v10->m_spRoot.m_pObject = (NiAVObject *)v12;
    if ( v12 )
      InterlockedIncrement((volatile LONG *)v12 + 1);
  }
  BYTE3(pkChar) = Picking::PickCharacter(v7->m_pkPick, kOrigin, kDir);
  if ( BYTE3(pkChar) )
  {
    fDropItemDistance = Picking::GetDistance(v7->m_pkPick, 0);
    pkItemObject = Picking::GetAVObject(v7->m_pkPick, 0);
  }
  v13 = v7->m_pkPick;
  v14 = (int)v7->m_spMinihouseScene.m_pObject;
  fMHDistance = 3.4028235e38;
  v15 = v13->m_spRoot.m_pObject;
  v28 = v14;
  if ( v15 != (NiAVObject *)v14 )
  {
    if ( v15 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) && v15 )
        v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
      v14 = v28;
    }
    v13->m_spRoot.m_pObject = (NiAVObject *)v14;
    if ( v14 )
      InterlockedIncrement((volatile LONG *)(v14 + 4));
  }
  v16 = Picking::PickCharacter(v7->m_pkPick, kOrigin, kDir);
  if ( v16 )
  {
    fMHDistance = Picking::GetDistance(v7->m_pkPick, 0);
    v17 = Picking::GetAVObject(v7->m_pkPick, 0);
  }
  else
  {
    v17 = 0;
  }
  *(float *)&kDir = fCharDistance;
  v18 = (NiPoint3 **)&fMHDistance;
  if ( fMHDistance >= (double)fCharDistance )
    v18 = &kDir;
  kDir = *v18;
  v19 = fDropItemDistance;
  v20 = (NiPoint3 **)&fDropItemDistance;
  if ( *(float *)&kDir <= (double)fDropItemDistance )
    v20 = &kDir;
  kDir = *v20;
  v21 = *(float *)&kDir;
  if ( BYTE3(pkChar) && v19 - 40.0 < v21 )
  {
    v22 = v19 + 40.0;
    v23 = 40.0;
    if ( v22 > v21 )
    {
      *pkDropItem = SearchDropItem(pkItemObject);
      return 3;
    }
  }
  else
  {
    v23 = 40.0;
  }
  if ( v16 && fMHDistance - v23 < v21 )
  {
    v25 = *(float *)&kDir;
    if ( v23 + fMHDistance > *(float *)&kDir )
    {
      *hMiniHouse = SearchMiniHouse(v17);
      return 4;
    }
  }
  else
  {
    v25 = *(float *)&kDir;
  }
  return bCharPick && v25 == fCharDistance;
}

//----- (00682800) --------------------------------------------------------
void __thiscall HeightmapRayIntersection::HeightmapRayIntersection(HeightmapRayIntersection *this)
{
  this->m_kCheckedFlagMap.pabMap = 0;
  this->m_kIntersection.pkIntersections = 0;
  this->m_kIntersection.iNumofIntersection = 0;
}

//----- (00682810) --------------------------------------------------------
char __thiscall HeightmapRayIntersection::CheckRayIntersect(HeightmapRayIntersection *this, NiPoint3 *kStart, NiPoint3 *kEnd, NiPoint3 *kIntersect, NiPoint3 *kNormal, float *rfDist, int *nTileGap)
{
  HeightmapRayIntersection *v7; // esi@1
  HeightmapRayIntersection::Intersection *v8; // ST00_4@1
  NiPoint3 *v9; // ebx@1
  NiPoint3 *v10; // edi@1
  float v11; // ST20_4@1
  double v12; // st7@1
  float v13; // ST24_4@1
  double v14; // st7@1
  float v15; // ST28_4@1
  float v16; // eax@1
  float v17; // ecx@1
  double v18; // st7@1
  double v19; // st7@1
  double v20; // st7@1
  double v21; // st6@1
  double v22; // st7@1
  double v23; // st7@1
  int v24; // edx@5
  int v25; // ebx@5
  int v26; // ecx@5
  int v27; // eax@5
  int v28; // eax@7
  int v29; // eax@11
  int v30; // ebx@18
  int v31; // ecx@18
  int v32; // edx@19
  float v33; // ST20_4@24
  float v34; // ST24_4@24
  float v35; // ST28_4@24
  double v36; // st7@24
  float v37; // ST20_4@24
  float v38; // ST24_4@24
  float v39; // ST28_4@24
  double v40; // st5@24
  double v41; // st6@24
  float v42; // ST14_4@24
  double v43; // st2@24
  double v44; // st6@24
  float v45; // ST18_4@24
  float v46; // ST1C_4@24
  char result; // al@24
  NiPoint3 kUnitDir; // [sp+24h] [bp-18h]@1
  int p; // [sp+30h] [bp-Ch]@1
  int o; // [sp+34h] [bp-8h]@1
  int k; // [sp+38h] [bp-4h]@1
  int y1b; // [sp+44h] [bp+8h]@1
  signed int y1; // [sp+44h] [bp+8h]@1
  int y1a; // [sp+44h] [bp+8h]@5
  float fInvTileWidthc; // [sp+48h] [bp+Ch]@1
  signed int fInvTileWidth; // [sp+48h] [bp+Ch]@1
  float fInvTileWidtha; // [sp+48h] [bp+Ch]@5
  float fInvTileWidthb; // [sp+48h] [bp+Ch]@18
  float fInvTileWidthd; // [sp+48h] [bp+Ch]@24
  int t; // [sp+58h] [bp+1Ch]@5

  v7 = this;
  operator delete[](this->m_kCheckedFlagMap.pabMap);
  v8 = v7->m_kIntersection.pkIntersections;
  v7->m_kCheckedFlagMap.pabMap = 0;
  operator delete[](v8);
  v9 = kEnd;
  v10 = kStart;
  v7->m_kIntersection.pkIntersections = 0;
  v11 = kEnd->x - kStart->x;
  v12 = kEnd->y;
  kUnitDir.x = v11;
  v13 = v12 - kStart->y;
  v14 = kEnd->z;
  kUnitDir.y = v13;
  v15 = v14 - kStart->z;
  kUnitDir.z = v15;
  NiPoint3::Unitize(&kUnitDir);
  v16 = kUnitDir.y;
  v17 = kUnitDir.z;
  v18 = 1.0 / v7->m_kHeightMapInfo.fTileWidth;
  v7->m_kRayInfo.kDir.x = kUnitDir.x;
  v7->m_kRayInfo.kDir.y = v16;
  v7->m_kRayInfo.kDir.z = v17;
  v7->m_kRayInfo.kOrg = *kStart;
  fInvTileWidthc = v18;
  *(float *)&y1b = 1.0 / v7->m_kHeightMapInfo.fTileHeight;
  v19 = v9->x - v10->x;
  k = (signed int)((v9->y - v10->y) * *(float *)&y1b);
  v7->m_kCheckedFlagMap.iWidth = abs((signed int)(v19 * fInvTileWidthc)) + 2;
  v7->m_kCheckedFlagMap.iHeight = abs(k) + 2;
  v7->m_kIntersection.iMaxIntersection = 10;
  v7->m_kIntersection.iNumofIntersection = 0;
  v7->m_kIntersection.pkIntersections = (HeightmapRayIntersection::Intersection *)operator new[](0x1E0u);
  v20 = fInvTileWidthc;
  fInvTileWidth = (signed int)(v10->x * fInvTileWidthc);
  v21 = v20 * v9->x;
  v22 = *(float *)&y1b;
  y1 = (signed int)(v10->y * *(float *)&y1b);
  o = fInvTileWidth;
  p = y1;
  v23 = v22 * v9->y;
  k = (signed int)v21;
  if ( fInvTileWidth > (signed int)v21 )
    fInvTileWidth = k;
  if ( y1 > (signed int)v23 )
    y1 = (signed int)v23;
  v7->m_kCheckedFlagMap.iFlagMapPosX = fInvTileWidth;
  v24 = o;
  v7->m_kCheckedFlagMap.iFlagMapPosY = y1;
  y1a = *nTileGap + v24;
  v25 = p - *nTileGap;
  v26 = v24 - *nTileGap;
  v27 = p + *nTileGap;
  t = p - *nTileGap;
  fInvTileWidtha = *(float *)&v27;
  if ( v26 < 0 )
    v26 = 0;
  v28 = v7->m_kHeightMapInfo.iHeightXCount;
  if ( y1a >= v28 )
    y1a = v28 - 1;
  if ( v25 < 0 )
  {
    t = 0;
    v25 = 0;
  }
  v29 = v7->m_kHeightMapInfo.iHeightYCount;
  if ( SLODWORD(fInvTileWidtha) >= v29 )
    LODWORD(fInvTileWidtha) = v29 - 1;
  for ( k = v26; k < y1a; ++k )
  {
    if ( v25 < SLODWORD(fInvTileWidtha) )
    {
      do
        HeightmapRayIntersection::CheckRayIntersectQuad(v7, k, v25++);
      while ( v25 < SLODWORD(fInvTileWidtha) );
      v25 = t;
    }
  }
  v30 = v7->m_kIntersection.iNumofIntersection;
  v31 = 0;
  fInvTileWidthb = 100000000.0;
  if ( !v30 )
    goto LABEL_28;
  v32 = (int)&v7->m_kIntersection.pkIntersections[v30];
  do
  {
    v32 -= 48;
    --v30;
    if ( *(float *)(v32 + 8) < (double)fInvTileWidthb )
    {
      v31 = v32;
      fInvTileWidthb = *(float *)(v32 + 8);
    }
  }
  while ( v30 );
  if ( v31 )
  {
    *rfDist = *(float *)(v31 + 8);
    fInvTileWidthd = *(float *)(v31 + 8);
    v33 = fInvTileWidthd * kUnitDir.x;
    v34 = kUnitDir.y * fInvTileWidthd;
    v35 = fInvTileWidthd * kUnitDir.z;
    kUnitDir.x = v10->x + v33;
    kUnitDir.y = v10->y + v34;
    v36 = v10->z;
    *kIntersect = kUnitDir;
    kUnitDir.z = v36 + v35;
    kUnitDir.x = *(float *)(v31 + 24) - *(float *)(v31 + 12);
    kUnitDir.y = *(float *)(v31 + 28) - *(float *)(v31 + 16);
    kUnitDir.z = *(float *)(v31 + 32) - *(float *)(v31 + 20);
    v37 = *(float *)(v31 + 36) - *(float *)(v31 + 12);
    v38 = *(float *)(v31 + 40) - *(float *)(v31 + 16);
    v39 = *(float *)(v31 + 44) - *(float *)(v31 + 20);
    v40 = kUnitDir.y;
    v41 = kUnitDir.z;
    v42 = v39 * kUnitDir.y - v38 * kUnitDir.z;
    kNormal->x = v42;
    v43 = v41 * v37;
    v44 = kUnitDir.x;
    v45 = v43 - v39 * kUnitDir.x;
    kNormal->y = v45;
    v46 = v44 * v38 - v37 * v40;
    kNormal->z = v46;
    result = 1;
  }
  else
  {
LABEL_28:
    result = 0;
  }
  return result;
}

//----- (00682B30) --------------------------------------------------------
char __thiscall World::CheckRayIntersectGround(World *this, NiPoint3 *kStart, NiPoint3 *kEnd, NiPoint3 *kIntersect, NiPoint3 *kNormal, float *rfDist, int *nTileGap)
{
  PgNsTerrain *v7; // eax@1
  int v8; // ecx@1
  int v9; // edx@1
  float *v10; // esi@1
  char v11; // bl@1
  HeightmapRayIntersection kRayIntersect; // [sp+Ch] [bp-68h]@1
  int v14; // [sp+70h] [bp-4h]@1

  kRayIntersect.m_kCheckedFlagMap.pabMap = 0;
  kRayIntersect.m_kIntersection.pkIntersections = 0;
  kRayIntersect.m_kIntersection.iNumofIntersection = 0;
  v14 = 0;
  v7 = this->m_pkTerrain;
  v8 = v7->m_uiHeightMapWide;
  v9 = v7->m_uiHeightMapHigh;
  kRayIntersect.m_kHeightMapInfo.fTileWidth = v7->m_fOneBlockWidth;
  v10 = v7->m_pfHeightMap;
  kRayIntersect.m_kHeightMapInfo.fTileHeight = v7->m_fOneBlockHeight;
  kRayIntersect.m_kHeightMapInfo.iTileXCount = v8;
  kRayIntersect.m_kHeightMapInfo.fWeight1 = v7->m_fWeight1;
  kRayIntersect.m_kHeightMapInfo.iTileYCount = v9;
  kRayIntersect.m_kHeightMapInfo.fWeight2 = v7->m_fWeight2;
  kRayIntersect.m_kHeightMapInfo.iHeightXCount = v8 + 1;
  kRayIntersect.m_kHeightMapInfo.iHeightYCount = v9 + 1;
  kRayIntersect.m_kHeightMapInfo.pfHeight = v10;
  v11 = HeightmapRayIntersection::CheckRayIntersect(&kRayIntersect, kStart, kEnd, kIntersect, kNormal, rfDist, nTileGap);
  operator delete[](kRayIntersect.m_kCheckedFlagMap.pabMap);
  operator delete[](kRayIntersect.m_kIntersection.pkIntersections);
  return v11;
}

//----- (00682C00) --------------------------------------------------------
char __thiscall World::GetCameraPickPos2(World *this, NiPoint3 *kOrigin, NiPoint3 *kEnd, NiPoint3 *kPos, NiPoint3 *kNormal, float *pfDistance)
{
  World *v6; // esi@1
  Picking *v7; // edi@1
  float v8; // eax@1
  NiAVObject *v9; // ebx@1
  int v10; // eax@11
  int v11; // edx@14
  int v12; // eax@14
  int v13; // ecx@14
  Picking *v14; // edi@16
  float v15; // eax@16
  NiAVObject *v16; // ebx@16
  Picking *v17; // ebx@27
  int v18; // eax@27
  NiAVObject *v19; // edi@27
  int *v20; // ebx@27
  char v21; // bl@35
  Picking *v22; // ebx@43
  int v23; // eax@43
  NiAVObject *v24; // edi@43
  int *v25; // ebx@43
  char v26; // bl@51
  bool v27; // zf@53
  char result; // al@56
  double v29; // st7@57
  double v30; // st7@58
  double v31; // st6@58
  NiPoint3 *v32; // eax@58
  float v33; // edx@59
  float v34; // ecx@59
  float v35; // edx@60
  NiPoint3 *v36; // eax@60
  float v37; // ecx@60
  float v38; // edx@60
  NiPoint3 *v39; // eax@61
  float v40; // ecx@61
  float v41; // edx@61
  float v42; // edx@62
  float v43; // ecx@62
  float v44; // edx@63
  NiPoint3 *v45; // eax@63
  float v46; // ecx@63
  float v47; // edx@63
  NiPoint3 *v48; // eax@64
  float v49; // ecx@64
  float v50; // edx@64
  float v51; // edx@66
  float v52; // ecx@66
  NiPoint3 *v53; // eax@68
  float v54; // ecx@68
  float v55; // edx@68
  NiPoint3 kNormalBuildingScene; // [sp+Ch] [bp-7Ch]@10
  NiPoint3 kGroundPos; // [sp+18h] [bp-70h]@10
  NiPoint3 kNormalMM; // [sp+24h] [bp-64h]@52
  NiPoint3 kGroundWallPos; // [sp+30h] [bp-58h]@52
  NiPoint3 v60; // [sp+3Ch] [bp-4Ch]@38
  NiPoint3 kIntersect; // [sp+48h] [bp-40h]@38
  NiPoint3 kDir; // [sp+54h] [bp-34h]@1
  NiPoint3 kNormalGroundObject; // [sp+60h] [bp-28h]@36
  NiPoint3 kGroundObjectPos; // [sp+6Ch] [bp-1Ch]@36
  int nTileGap; // [sp+78h] [bp-10h]@13
  float fGroundDistance; // [sp+7Ch] [bp-Ch]@1
  float fGroundObjectDistance; // [sp+80h] [bp-8h]@1
  bool bGroundObjectPick; // [sp+86h] [bp-2h]@35
  bool bGroundPick; // [sp+87h] [bp-1h]@1

  v6 = this;
  kDir.x = kEnd->x - kOrigin->x;
  kDir.y = kEnd->y - kOrigin->y;
  kDir.z = kEnd->z - kOrigin->z;
  NiPoint3::Unitize(&kDir);
  v6->m_pkPick->m_bReturnNormal = 1;
  v7 = v6->m_pkPick;
  fGroundDistance = 3.4028235e38;
  v8 = *(float *)&v6->m_spGroundObject.m_pObject;
  v9 = v7->m_spRoot.m_pObject;
  bGroundPick = 0;
  fGroundObjectDistance = v8;
  if ( v9 != (NiAVObject *)LODWORD(v8) )
  {
    if ( v9 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
        v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      v8 = fGroundObjectDistance;
    }
    *(float *)&v7->m_spRoot.m_pObject = v8;
    if ( v8 != 0.0 )
      InterlockedIncrement((volatile LONG *)(LODWORD(v8) + 4));
  }
  if ( Picking::PickCharacter(v6->m_pkPick, kOrigin, &kDir) )
  {
    fGroundDistance = Picking::GetDistance(v6->m_pkPick, 0);
    Picking::GetIntersection(v6->m_pkPick, &kGroundPos, 0);
    Picking::GetNormal(v6->m_pkPick, &kNormalBuildingScene, 0);
    bGroundPick = 1;
  }
  v10 = unk_A96B24;
  if ( unk_A96B24 )
  {
    while ( 1 )
    {
      v11 = *(_DWORD *)v10;
      v12 = *(_DWORD *)(v10 + 8);
      v13 = *(_DWORD *)(v12 + 2700);
      nTileGap = v11;
      if ( v13 && *(_WORD *)(v13 + 176) )
      {
        v14 = v6->m_pkPick;
        v15 = *(float *)(v12 + 704);
        v16 = v14->m_spRoot.m_pObject;
        fGroundObjectDistance = v15;
        if ( v16 != (NiAVObject *)LODWORD(v15) )
        {
          if ( v16 )
          {
            if ( !InterlockedDecrement((volatile LONG *)&v16->m_uiRefCount) && v16 )
              v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
            v15 = fGroundObjectDistance;
          }
          *(float *)&v14->m_spRoot.m_pObject = v15;
          if ( v15 != 0.0 )
            InterlockedIncrement((volatile LONG *)(LODWORD(v15) + 4));
        }
        if ( Picking::PickCharacter(v6->m_pkPick, kOrigin, &kDir) )
        {
          fGroundDistance = Picking::GetDistance(v6->m_pkPick, 0);
          Picking::GetIntersection(v6->m_pkPick, &kGroundPos, 0);
          Picking::GetNormal(v6->m_pkPick, &kNormalBuildingScene, 0);
          bGroundPick = 1;
        }
      }
      if ( !nTileGap )
        break;
      v10 = nTileGap;
    }
  }
  v17 = v6->m_pkPick;
  v18 = (int)v6->m_spGroundObjectCollidee.m_pObject;
  fGroundObjectDistance = 3.4028235e38;
  v19 = v17->m_spRoot.m_pObject;
  v20 = (int *)&v17->m_spRoot;
  nTileGap = v18;
  if ( v19 != (NiAVObject *)v18 )
  {
    if ( v19 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v19->m_uiRefCount) && v19 )
        v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
      v18 = nTileGap;
    }
    *v20 = v18;
    if ( v18 )
      InterlockedIncrement((volatile LONG *)(v18 + 4));
  }
  v21 = Picking::PickGround(v6->m_pkPick, kOrigin, &kDir);
  bGroundObjectPick = v21;
  if ( v21 )
  {
    Picking::GetIntersection(v6->m_pkPick, &kGroundObjectPos, 0);
    fGroundObjectDistance = Picking::GetDistance(v6->m_pkPick, 0);
    Picking::GetNormal(v6->m_pkPick, &kNormalGroundObject, 0);
  }
  if ( v6->m_pkTerrain->m_pfHeightMap )
  {
    nTileGap = v6->m_kCameraCtrl.m_uiCheckRayTile;
    if ( World::CheckRayIntersectGround(v6, kOrigin, kEnd, &kIntersect, &v60, (float *)&kEnd, &nTileGap) )
    {
      if ( v21 )
      {
        if ( fGroundObjectDistance <= (double)*(float *)&kEnd )
          goto LABEL_43;
      }
      else
      {
        bGroundObjectPick = 1;
      }
      fGroundObjectDistance = *(float *)&kEnd;
      kGroundObjectPos = kIntersect;
      kNormalGroundObject = v60;
    }
  }
LABEL_43:
  v22 = v6->m_pkPick;
  v23 = (int)v6->m_spUseCameraCollidee.m_pObject;
  *(float *)&kEnd = 3.4028235e38;
  v24 = v22->m_spRoot.m_pObject;
  v25 = (int *)&v22->m_spRoot;
  nTileGap = v23;
  if ( v24 != (NiAVObject *)v23 )
  {
    if ( v24 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v24->m_uiRefCount) && v24 )
        v24->vfptr->__vecDelDtor((NiRefObject *)v24, 1u);
      v23 = nTileGap;
    }
    *v25 = v23;
    if ( v23 )
      InterlockedIncrement((volatile LONG *)(v23 + 4));
  }
  v26 = Picking::PickGround(v6->m_pkPick, kOrigin, &kDir);
  if ( v26 )
  {
    Picking::GetIntersection(v6->m_pkPick, &kGroundWallPos, 0);
    *(float *)&kEnd = Picking::GetDistance(v6->m_pkPick, 0);
    Picking::GetNormal(v6->m_pkPick, &kNormalMM, 0);
  }
  v27 = bGroundPick == 0;
  v6->m_pkPick->m_bReturnNormal = 0;
  if ( v27 && !bGroundObjectPick && !v26 )
    return 0;
  v29 = fGroundDistance;
  if ( fGroundObjectDistance >= (double)fGroundDistance )
  {
    v31 = *(float *)&kEnd;
    v32 = kPos;
    if ( *(float *)&kEnd < v29 )
    {
LABEL_59:
      v33 = kGroundWallPos.y;
      v32->x = kGroundWallPos.x;
      v34 = kGroundWallPos.z;
      v32->y = v33;
      v32->z = v34;
      if ( pfDistance )
      {
        v35 = kNormalMM.x;
        *pfDistance = v31;
        v36 = kNormal;
        v37 = kNormalMM.y;
        kNormal->x = v35;
        v38 = kNormalMM.z;
        v36->y = v37;
        v36->z = v38;
        result = 1;
      }
      else
      {
        v39 = kNormal;
        v40 = kNormalMM.y;
        kNormal->x = kNormalMM.x;
        v41 = kNormalMM.z;
        v39->y = v40;
        v39->z = v41;
        result = 1;
      }
      return result;
    }
    v51 = kGroundPos.y;
    kPos->x = kGroundPos.x;
    v52 = kGroundPos.z;
    v32->y = v51;
    v32->z = v52;
    if ( pfDistance )
      *pfDistance = v29;
    v53 = kNormal;
    v54 = kNormalBuildingScene.y;
    kNormal->x = kNormalBuildingScene.x;
    v55 = kNormalBuildingScene.z;
    v53->y = v54;
    v53->z = v55;
    result = 1;
  }
  else
  {
    v30 = fGroundObjectDistance;
    v31 = *(float *)&kEnd;
    v32 = kPos;
    if ( *(float *)&kEnd < (double)fGroundObjectDistance )
      goto LABEL_59;
    v42 = kGroundObjectPos.y;
    kPos->x = kGroundObjectPos.x;
    v43 = kGroundObjectPos.z;
    v32->y = v42;
    v32->z = v43;
    if ( pfDistance )
    {
      v44 = kNormalGroundObject.x;
      *pfDistance = v30;
      v45 = kNormal;
      v46 = kNormalGroundObject.y;
      kNormal->x = v44;
      v47 = kNormalGroundObject.z;
      v45->y = v46;
      v45->z = v47;
      result = 1;
    }
    else
    {
      v48 = kNormal;
      v49 = kNormalGroundObject.y;
      kNormal->x = kNormalGroundObject.x;
      v50 = kNormalGroundObject.z;
      v48->y = v49;
      v48->z = v50;
      result = 1;
    }
  }
  return result;
}

//----- (006830D0) --------------------------------------------------------
char __thiscall World::GetAdvGroundPos(World *this, NiPoint3 kOrigin, NiPoint3 kDir, NiPoint3 *kTargetPos, float *pfDistance)
{
  World *v5; // esi@1
  PgNsTerrain *v6; // eax@1
  NiNode *v7; // ebx@2
  NiAVObject *v8; // edi@2
  NiNode *v9; // ebx@11
  NiAVObject *v10; // edi@11
  NiNode *v11; // ebx@20
  NiAVObject *v12; // edi@20
  signed int v13; // eax@27
  unsigned int v14; // eax@32
  unsigned int v15; // ebx@32
  NiAVObject *v16; // eax@32
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v17; // eax@33
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v18; // eax@33
  int v19; // eax@37
  float v20; // edx@38
  float v21; // ecx@38
  float v23; // ecx@44
  float v24; // edx@44
  Picking *v25; // [sp+10h] [bp-5Ch]@20
  NiPoint3 kTerrianPos; // [sp+14h] [bp-58h]@10
  NiPoint3 kGroundObjectPos; // [sp+20h] [bp-4Ch]@19
  float fTerrianDistance; // [sp+2Ch] [bp-40h]@2
  float *v29; // [sp+30h] [bp-3Ch]@1
  NiPoint3 *v30; // [sp+34h] [bp-38h]@1
  float fGroundObjectDistance; // [sp+38h] [bp-34h]@11
  bool bTerrianPick; // [sp+3Eh] [bp-2Eh]@9
  bool bGroundObjectPick; // [sp+3Fh] [bp-2Dh]@18
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Right; // [sp+40h] [bp-2Ch]@29
  int v35; // [sp+68h] [bp-4h]@29

  v5 = this;
  v30 = kTargetPos;
  v6 = this->m_pkTerrain;
  v29 = pfDistance;
  if ( v6 )
  {
    v7 = v6->m_spScene.m_pObject;
    v8 = this->m_pkPick->m_spRoot.m_pObject;
    fTerrianDistance = *(float *)&this->m_pkPick;
    if ( (NiNode *)v8 != v7 )
    {
      if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
        v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      *(_DWORD *)(LODWORD(fTerrianDistance) + 24) = v7;
      if ( v7 )
        InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
    }
    bTerrianPick = Picking::PickGround(v5->m_pkPick, &kOrigin, &kDir);
    if ( bTerrianPick )
    {
      Picking::GetIntersection(v5->m_pkPick, &kTerrianPos, 0);
      fTerrianDistance = Picking::GetDistance(v5->m_pkPick, 0);
    }
  }
  v9 = v5->m_spGroundObjectCollidee.m_pObject;
  v10 = v5->m_pkPick->m_spRoot.m_pObject;
  fGroundObjectDistance = *(float *)&v5->m_pkPick;
  if ( (NiNode *)v10 != v9 )
  {
    if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    *(_DWORD *)(LODWORD(fGroundObjectDistance) + 24) = v9;
    if ( v9 )
      InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  }
  bGroundObjectPick = Picking::PickGround(v5->m_pkPick, &kOrigin, &kDir);
  if ( bGroundObjectPick )
  {
    Picking::GetIntersection(v5->m_pkPick, &kGroundObjectPos, 0);
    fGroundObjectDistance = Picking::GetDistance(v5->m_pkPick, 0);
  }
  v11 = v5->m_spGroundObjectCollidee.m_pObject;
  v12 = v5->m_pkPick->m_spRoot.m_pObject;
  v25 = v5->m_pkPick;
  if ( (NiNode *)v12 != v11 )
  {
    if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
      v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
    v25->m_spRoot.m_pObject = (NiAVObject *)v11;
    if ( v11 )
      InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
  }
  v13 = v5->m_MiniHouseIndoorMode.m_eState;
  if ( v13 && v13 >= 1 )
  {
    _Right._Myres = 15;
    _Right._Mysize = 0;
    _Right._Bx._Buf[0] = 0;
    v35 = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v5->m_MiniHouseIndoorMode.m_RoomInfo.m_SelectedNodeName,
      &_Right,
      0,
      0xFFFFFFFF);
    v35 = -1;
    if ( _Right._Myres >= 0x10 )
      operator delete(_Right._Bx._Ptr);
    if ( Picking::PickCharacter(v5->m_pkPick, &kOrigin, &kDir) )
    {
      v14 = World::PickedObjConditionCheck(v5);
      v15 = v14;
      v16 = Picking::GetAVObject(v5->m_pkPick, v14);
      if ( !v16 )
        return 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Right,
        v16->m_pcName);
      v35 = 1;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v5->m_MiniHouseIndoorMode.m_RoomInfo.m_SelectedNodeName,
        v17,
        0,
        0xFFFFFFFF);
      v35 = -1;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Right);
      v18 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)mhRoomFloorName_1._Bx._Ptr;
      if ( mhRoomFloorName_1._Myres < 0x10 )
        v18 = &mhRoomFloorName_1;
      if ( std::basic_string<char,std::char_traits<char>,std::allocator<char>>::find(
             &stru_A9941C,
             v18->_Bx._Buf,
             0,
             mhRoomFloorName_1._Mysize) == -1 )
      {
        Picking::GetIntersection(v5->m_pkPick, &kGroundObjectPos, v15);
        fGroundObjectDistance = Picking::GetDistance(v5->m_pkPick, v15);
LABEL_37:
        v19 = (int)v30;
        goto LABEL_38;
      }
    }
  }
  if ( !bTerrianPick )
  {
    if ( bGroundObjectPick )
      goto LABEL_37;
    return 0;
  }
  if ( bGroundObjectPick )
  {
    v19 = (int)v30;
    if ( kGroundObjectPos.z >= (double)kTerrianPos.z )
    {
LABEL_38:
      v20 = kGroundObjectPos.y;
      *(float *)v19 = kGroundObjectPos.x;
      v21 = kGroundObjectPos.z;
      *(float *)(v19 + 4) = v20;
      *(float *)(v19 + 8) = v21;
      if ( v29 )
        *v29 = fGroundObjectDistance;
      return 1;
    }
  }
  else
  {
    v19 = (int)v30;
  }
  v23 = kTerrianPos.y;
  *(float *)v19 = kTerrianPos.x;
  v24 = kTerrianPos.z;
  *(float *)(v19 + 4) = v23;
  *(float *)(v19 + 8) = v24;
  if ( !v29 )
    return 1;
  *v29 = fTerrianDistance;
  return 1;
}

//----- (00683400) --------------------------------------------------------
signed int __thiscall World::PickMHObj(World *this, mhState nowState, NiPoint3 *kOrigin, NiPoint3 *kDir, NiPoint3 *kGroundPos, bool bOnlyTest)
{
  World *v6; // esi@1
  _BYTE v7[12]; // ST0C_12@1
  _BYTE v8[12]; // ST00_12@1
  NiNode *v9; // ebx@2
  Picking *v10; // eax@2
  NiNode *v11; // edi@2
  NiNode *v12; // edi@9
  NiAVObject *v13; // eax@14
  signed int v14; // eax@19
  mhObject *v15; // edi@20
  PgFrameWork *v16; // eax@21
  mhObject *v17; // eax@25
  NiPointer<NiNode> result; // [sp+10h] [bp-14h]@2
  float fGroundDistance; // [sp+14h] [bp-10h]@1
  int v20; // [sp+20h] [bp-4h]@2
  NiPoint3 *kGroundPosa; // [sp+38h] [bp+14h]@2

  v6 = this;
  fGroundDistance = 0.0;
  *(float *)v7 = kDir->x;
  *(_QWORD *)&v7[4] = *(_QWORD *)&kDir->y;
  *(float *)v8 = kOrigin->x;
  *(_QWORD *)&v8[4] = *(_QWORD *)&kOrigin->y;
  World::GetAdvGroundPos(this, *(NiPoint3 *)v8, *(NiPoint3 *)v7, kGroundPos, &fGroundDistance);
  if ( ::nowState == MH_STATE_NO )
    return 0;
  v9 = MiniHouseIndoor::GetObjRootScene(&v6->m_MiniHouseIndoorMode, &result)->m_pObject;
  v10 = v6->m_pkPick;
  v11 = (NiNode *)v10->m_spRoot.m_pObject;
  v20 = 0;
  kGroundPosa = (NiPoint3 *)v10;
  if ( v11 != v9 )
  {
    if ( v11 && !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    LODWORD(kGroundPosa[2].x) = v9;
    if ( v9 )
    {
      v9 = (NiNode *)((char *)v9 + 4);
      InterlockedIncrement((volatile LONG *)v9);
    }
  }
  v12 = result.m_pObject;
  v20 = -1;
  if ( result.m_pObject && !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) && v12 )
    v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
  if ( !Picking::PickCharacter(v6->m_pkPick, kOrigin, kDir) )
  {
    if ( ::nowState == 2 )
    {
      MiniHouseIndoor::SetRepairObjID(&v6->m_MiniHouseIndoorMode, 0xFFFFu);
      return 10;
    }
    return 0;
  }
  v13 = Picking::GetAVObject(v6->m_pkPick, 0);
  if ( ::nowState == 1 )
  {
    if ( !bOnlyTest )
    {
      v17 = MiniHouseIndoor::GetObjectA(&v6->m_MiniHouseIndoorMode, v13);
      if ( v17->m_iGUID == 60000 )
        return 9;
      MiniHouseIndoor::SetFocusObj(&v6->m_MiniHouseIndoorMode, v17, 1);
    }
    v14 = 8;
  }
  else if ( ::nowState == 2 )
  {
    v15 = MiniHouseIndoor::GetObjectA(&v6->m_MiniHouseIndoorMode, v13);
    if ( v15 )
    {
      v16 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( !(unsigned __int8)(*(int (**)(void))(**(_DWORD **)&v16[30].m_bInit + 260))() )
      {
        OutputDebugStringA("°¡±¸ ¹º°¡ Á÷¾ú´Ù!\n");
        MiniHouseIndoor::SetRepairObjID(&v6->m_MiniHouseIndoorMode, v15->m_iGUID);
      }
    }
    v14 = 5;
  }
  else
  {
    if ( !bOnlyTest && unk_A9943C == 2 )
      MiniHouseIndoor::SetPickedObj(&v6->m_MiniHouseIndoorMode, (int)v9, (int)v12, v13, MH_STATE_EDIT_OBJ_PICKED, 0);
    v14 = 5;
  }
  return v14;
}

//----- (00683670) --------------------------------------------------------
signed int __thiscall World::PickInMHmode(World *this, NiPoint3 *kOrigin, NiPoint3 *kDir, Char **pkChar, NiPoint3 *kGroundPos, DropItem **pkDropItem, unsigned __int16 *hMiniHouse)
{
  NiPoint3 *v7; // ebx@1
  World *v8; // esi@1
  DropItem **v9; // edx@1
  NiPoint3 *v10; // ecx@1
  NiPoint3 *v11; // edi@1
  float v12; // edx@1
  _BYTE v13[12]; // ST0C_12@1
  _BYTE v14[12]; // ST00_12@1
  char v15; // al@1
  bool v16; // zf@1
  char v17; // cl@5
  NiAVObject *v18; // eax@6
  NiAVObject *v19; // edx@6
  double v20; // st7@8
  float *v21; // eax@8
  Char ***v22; // eax@10
  double v23; // st4@12
  Char ***v24; // eax@12
  double v25; // st3@14
  double v26; // st2@16
  double v27; // st4@16
  signed int result; // eax@17
  double v29; // st5@21
  bool v30; // c0@26
  double v31; // st7@26
  NiAVObject *pkItemObject; // [sp+8h] [bp-1Ch]@1
  float fDropItemDistance; // [sp+Ch] [bp-18h]@1
  float fMHDistance; // [sp+10h] [bp-14h]@1
  float fGroundDistance; // [sp+14h] [bp-10h]@1
  float fCharDistance; // [sp+18h] [bp-Ch]@1
  World::PickEnum ePickEnum; // [sp+1Ch] [bp-8h]@1
  bool bGroundPick; // [sp+23h] [bp-1h]@1
  char bCharPick_3; // [sp+2Fh] [bp+Bh]@3
  char bDropItemPick_3; // [sp+33h] [bp+Fh]@3

  fMHDistance = 3.4028235e38;
  v7 = kOrigin;
  fGroundDistance = 3.4028235e38;
  fDropItemDistance = 3.4028235e38;
  v8 = this;
  fCharDistance = 3.4028235e38;
  *hMiniHouse = -1;
  v9 = pkDropItem;
  *pkChar = 0;
  v10 = kGroundPos;
  *v9 = 0;
  v11 = kDir;
  v12 = kDir->x;
  ePickEnum = 0;
  pkItemObject = 0;
  *(float *)v13 = v12;
  *(_QWORD *)&v13[4] = *(_QWORD *)&kDir->y;
  *(float *)v14 = kOrigin->x;
  *(_QWORD *)&v14[4] = *(_QWORD *)&kOrigin->y;
  v15 = World::GetAdvGroundPos(v8, *(NiPoint3 *)v14, *(NiPoint3 *)v13, v10, &fGroundDistance);
  v16 = v8->m_MiniHouseIndoorMode.m_PickedObj == 0;
  bGroundPick = v15;
  if ( v16 && v8->m_MiniHouseIndoorMode.m_eState != 3 )
  {
    bCharPick_3 = World::PickChar(v8, kOrigin, kDir, pkChar, &fCharDistance);
    NsABVPicking::SetTarget(
      (NsABVPicking *)&v8->m_pkPick->m_fExpand,
      (NiAVObject *)&v8->m_spDropItemScene.m_pObject->vfptr);
    bDropItemPick_3 = Picking::PickCharacter(v8->m_pkPick, v7, kDir);
    if ( bDropItemPick_3 )
    {
      fDropItemDistance = Picking::GetDistance(v8->m_pkPick, 0);
      pkItemObject = Picking::GetAVObject(v8->m_pkPick, 0);
    }
    NsABVPicking::SetTarget(
      (NsABVPicking *)&v8->m_pkPick->m_fExpand,
      (NiAVObject *)&v8->m_spMinihouseScene.m_pObject->vfptr);
    v17 = Picking::PickCharacter(v8->m_pkPick, v7, v11);
    BYTE3(pkChar) = v17;
    if ( v17 )
    {
      fMHDistance = Picking::GetDistance(v8->m_pkPick, 0);
      v18 = Picking::GetAVObject(v8->m_pkPick, 0);
      v17 = BYTE3(pkChar);
      v19 = v18;
    }
    else
    {
      v19 = 0;
    }
    v20 = fCharDistance;
    v21 = &fCharDistance;
    if ( fGroundDistance <= (double)fCharDistance )
      v21 = &fGroundDistance;
    pkChar = *(Char ***)v21;
    v22 = (Char ***)&fMHDistance;
    if ( *(float *)&pkChar <= (double)fMHDistance )
      v22 = &pkChar;
    pkChar = *v22;
    v23 = fDropItemDistance;
    v24 = (Char ***)&fDropItemDistance;
    if ( *(float *)&pkChar <= (double)fDropItemDistance )
      v24 = &pkChar;
    pkChar = *v24;
    v25 = *(float *)&pkChar;
    if ( bDropItemPick_3 && v23 - 40.0 < v25 )
    {
      v26 = v23 + 40.0;
      v27 = 40.0;
      if ( v26 > v25 )
      {
        ePickEnum = 3;
        *pkDropItem = SearchDropItem(pkItemObject);
        return ePickEnum;
      }
    }
    else
    {
      v27 = 40.0;
    }
    if ( v17 && fMHDistance - v27 < v25 )
    {
      v29 = *(float *)&pkChar;
      if ( fMHDistance + v27 > *(float *)&pkChar )
      {
        ePickEnum = 4;
        *hMiniHouse = SearchMiniHouse(v19);
        return ePickEnum;
      }
    }
    else
    {
      v29 = *(float *)&pkChar;
    }
    if ( bCharPick_3 && v20 - v27 < v29 )
    {
      v30 = v29 < v20 + v27;
      v31 = v29;
      if ( v30 )
        return 1;
    }
    else
    {
      v31 = v29;
    }
    if ( !bGroundPick || fGroundDistance != v31 )
      return ePickEnum;
    result = World::PickMHObj(v8, nowState, v7, v11, kGroundPos, 1);
    if ( result )
    {
      ePickEnum = result;
    }
    else
    {
      ePickEnum = 2;
      result = 2;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00683930) --------------------------------------------------------
signed int __thiscall World::Pick(World *this, NiPoint3 *kOrigin, NiPoint3 *kDir, Char **pkChar, NiPoint3 *kGroundPos, DropItem **pkDropItem, unsigned __int16 *hMiniHouse)
{
  return World::PickInMHmode(this, kOrigin, kDir, pkChar, kGroundPos, pkDropItem, hMiniHouse);
}

//----- (00683940) --------------------------------------------------------
signed int __thiscall World::PickSomethingProcess(World *this, NiPoint3 *kOrigin, NiPoint3 *kDir, Char **pkChar, NiPoint3 *kGroundPos)
{
  World *v5; // ebx@1
  signed int result; // eax@3
  _BYTE v7[12]; // ST0C_12@4
  _BYTE v8[12]; // ST00_12@4
  float fGroundDistance; // [sp+4h] [bp-4h]@1

  fGroundDistance = 3.4028235e38;
  *pkChar = 0;
  v5 = this;
  if ( nowState == 3 && this->m_MiniHouseIndoorMode.m_PickedObj )
  {
    result = 6 - (MiniHouseIndoor::ReleasePickObj(&this->m_MiniHouseIndoorMode, 0, 0) != 1);
  }
  else
  {
    *(float *)v7 = kDir->x;
    *(_QWORD *)&v7[4] = *(_QWORD *)&kDir->y;
    *(float *)v8 = kOrigin->x;
    *(_QWORD *)&v8[4] = *(_QWORD *)&kOrigin->y;
    World::GetAdvGroundPos(this, *(NiPoint3 *)v8, *(NiPoint3 *)v7, kGroundPos, &fGroundDistance);
    result = World::PickMHObj(v5, nowState, kOrigin, kDir, kGroundPos, 0);
  }
  return result;
}

//----- (006839F0) --------------------------------------------------------
double __thiscall NiPoint3::operator*(NiPoint3 *this, NiPoint3 *pt)
{
  NiPoint3 *pta; // [sp+8h] [bp+8h]@1

  *(float *)&pta = pt->y * this->y + pt->x * this->x + pt->z * this->z;
  return *(float *)&pta;
}

//----- (00683A20) --------------------------------------------------------
NiPointer<NiNode> *__thiscall MiniHouseIndoor::GetObjRootScene(MiniHouseIndoor *this, NiPointer<NiNode> *result)
{
  NiNode *v2; // eax@1

  v2 = this->m_spRootScene.m_pObject;
  result->m_pObject = v2;
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  return result;
}

//----- (00683A50) --------------------------------------------------------
NiPoint3 *__thiscall Char::GetWorldPos(Char *this, NiPoint3 *result)
{
  NiNode *v2; // edx@1
  NiPoint3 *v3; // eax@2
  float v4; // ecx@2
  float v5; // edx@2
  int v6; // ecx@3
  float v7; // edx@3
  float v8; // ecx@3

  v2 = this->m_kCharShape.m_apkLinkNode[25];
  if ( v2 )
  {
    v3 = result;
    result->x = v2->m_kWorld.m_Translate.x;
    v4 = v2->m_kWorld.m_Translate.y;
    v5 = v2->m_kWorld.m_Translate.z;
    result->y = v4;
    result->z = v5;
  }
  else
  {
    v6 = ((int (*)(void))this->vfptr[6].Deaffect)();
    v3 = result;
    result->x = *(float *)v6;
    v7 = *(float *)(v6 + 4);
    v8 = *(float *)(v6 + 8);
    result->y = v7;
    result->z = v8;
    result->z = result->z + 10.0;
  }
  return v3;
}

//----- (00683AB0) --------------------------------------------------------
double __cdecl GetAngle(NiPoint3 _pos3Dir, NiPoint3 _pos3Target)
{
  NiPoint3::Unitize(&_pos3Dir);
  NiPoint3::Unitize(&_pos3Target);
  _pos3Target.z = _pos3Dir.y * _pos3Target.y + _pos3Target.x * _pos3Dir.x + _pos3Target.z * _pos3Dir.z;
  _pos3Target.z = acos(_pos3Target.z);
  return _pos3Target.z;
}

//----- (00683AF0) --------------------------------------------------------
void __thiscall CharSorter::CharSorter(CharSorter *this, NiPoint3 *pos3, NiPoint3 *kDir)
{
  this->m_pos3Main = *pos3;
  this->m_pos3Dir = *kDir;
}

//----- (00683B20) --------------------------------------------------------
bool __thiscall CharSorter::operator()(CharSorter *this, Char *pChar1, Char *pChar2)
{
  CharSorter *v3; // esi@1
  bool result; // al@2
  int v5; // eax@4
  int v6; // eax@4
  float v7; // ST14_4@4
  float v8; // ST18_4@4
  float v9; // ST1C_4@4
  float v10; // ST08_4@4
  float v11; // ST0C_4@4
  float v12; // ST10_4@4
  Char *pChar1a; // [sp+34h] [bp+8h]@4
  Char *pChar1b; // [sp+34h] [bp+8h]@4
  Char *pChar1c; // [sp+34h] [bp+8h]@4
  Char *pChar1d; // [sp+34h] [bp+8h]@4
  Char *pChar2a; // [sp+38h] [bp+Ch]@4

  v3 = this;
  if ( pChar1 )
  {
    result = 1;
    if ( pChar2 )
    {
      v5 = ((int (*)(void))pChar1->vfptr[6].Deaffect)();
      v3->pos1.x = *(float *)v5;
      v3->pos1.y = *(float *)(v5 + 4);
      v3->pos1.z = *(float *)(v5 + 8);
      v6 = ((int (__thiscall *)(Char *))pChar2->vfptr[6].Deaffect)(pChar2);
      v3->pos2.x = *(float *)v6;
      v3->pos2.y = *(float *)(v6 + 4);
      v3->pos2.z = *(float *)(v6 + 8);
      v7 = v3->m_pos3Main.x - v3->pos1.x;
      v8 = v3->m_pos3Main.y - v3->pos1.y;
      v9 = v3->m_pos3Main.z - v3->pos1.z;
      v10 = v3->m_pos3Main.x - v3->pos2.x;
      v11 = v3->m_pos3Main.y - v3->pos2.y;
      v12 = v3->m_pos3Main.z - v3->pos2.z;
      *(float *)&pChar1a = v8 * v8 + v7 * v7 + v9 * v9;
      *(float *)&pChar1b = sqrt(*(float *)&pChar1a);
      pChar2a = pChar1b;
      *(float *)&pChar1c = v10 * v10 + v11 * v11 + v12 * v12;
      *(float *)&pChar1d = sqrt(*(float *)&pChar1c);
      if ( *(float *)&pChar2a >= (double)*(float *)&pChar1d )
        result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00683C40) --------------------------------------------------------
char __thiscall World::AttachDropItem(World *this, NiNode *pkNode)
{
  char result; // al@2

  if ( pkNode )
  {
    ((void (__stdcall *)(_DWORD, _DWORD))this->m_spDropItemScene.m_pObject->vfptr[29].__vecDelDtor)(pkNode, 0);
    NiAVObject::Update((NiAVObject *)&pkNode->vfptr, 0.0, 0);
    NiAVObject::UpdateEffects((NiAVObject *)&pkNode->vfptr);
    NiAVObject::UpdateProperties((NiAVObject *)&pkNode->vfptr);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00683C90) --------------------------------------------------------
char __thiscall World::DetachDropItem(World *this, NiNode *pkNode)
{
  char result; // al@2
  NiNode *v3; // esi@4

  if ( pkNode )
  {
    ((void (__stdcall *)(_DWORD, _DWORD))this->m_spDropItemScene.m_pObject->vfptr[30].__vecDelDtor)(&pkNode, pkNode);
    if ( pkNode )
    {
      v3 = pkNode;
      if ( !InterlockedDecrement((volatile LONG *)&pkNode->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00683CE0) --------------------------------------------------------
char __thiscall World::AttachMiniHouse(World *this, NiNode *pkNode)
{
  char result; // al@2

  if ( pkNode )
  {
    ((void (__stdcall *)(_DWORD, _DWORD))this->m_spMinihouseScene.m_pObject->vfptr[29].__vecDelDtor)(pkNode, 0);
    NiAVObject::Update((NiAVObject *)&pkNode->vfptr, 0.0, 0);
    NiAVObject::UpdateEffects((NiAVObject *)&pkNode->vfptr);
    NiAVObject::UpdateProperties((NiAVObject *)&pkNode->vfptr);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00683D30) --------------------------------------------------------
char __thiscall World::DetachMiniHouse(World *this, NiNode *pkNode)
{
  char result; // al@2
  NiNode *v3; // esi@4

  if ( pkNode )
  {
    ((void (__stdcall *)(_DWORD, _DWORD))this->m_spMinihouseScene.m_pObject->vfptr[30].__vecDelDtor)(&pkNode, pkNode);
    if ( pkNode )
    {
      v3 = pkNode;
      if ( !InterlockedDecrement((volatile LONG *)&pkNode->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00683D80) --------------------------------------------------------
char __thiscall World::AttachEffect(World *this, NiNode *pkEffectNode)
{
  char result; // al@2

  if ( pkEffectNode )
  {
    ((void (__stdcall *)(_DWORD, _DWORD))this->m_spEffectScene.m_pObject->vfptr[29].__vecDelDtor)(pkEffectNode, 1);
    NiAVObject::Update((NiAVObject *)&pkEffectNode->vfptr, 0.0, 0);
    NiAVObject::UpdateEffects((NiAVObject *)&pkEffectNode->vfptr);
    NiAVObject::UpdateProperties((NiAVObject *)&pkEffectNode->vfptr);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00683DD0) --------------------------------------------------------
char __thiscall World::DetachEffect(World *this, NiNode *pkEffectNode)
{
  char result; // al@2
  NiNode *v3; // ecx@3
  NiNode *v4; // esi@4

  if ( pkEffectNode )
  {
    v3 = this->m_spEffectScene.m_pObject;
    if ( v3 )
    {
      ((void (__stdcall *)(_DWORD, _DWORD))v3->vfptr[30].__vecDelDtor)(&pkEffectNode, pkEffectNode);
      v4 = pkEffectNode;
      if ( pkEffectNode )
      {
        if ( !InterlockedDecrement((volatile LONG *)&pkEffectNode->m_uiRefCount) )
        {
          if ( v4 )
            v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
        }
      }
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00683E30) --------------------------------------------------------
void __thiscall DropItemSorter::DropItemSorter(DropItemSorter *this, NiPoint3 *pos3, NiPoint3 *kDir)
{
  this->m_pos3Main = *pos3;
  this->m_pos3Dir = *kDir;
}

//----- (00683E60) --------------------------------------------------------
void __thiscall World::UpdateSkyScene(World *this, float fTime)
{
  World *v2; // esi@1
  int v3; // eax@1
  float v4; // ecx@1
  float v5; // edx@1
  float v6; // edi@1
  NiNode *v7; // eax@1
  NiNode *v8; // eax@1
  float v9; // edx@1
  NiNode *v10; // esi@1
  float pos_8; // [sp+18h] [bp-4h]@1

  v2 = this;
  v3 = ((int (*)(void))g_pkMainChar->vfptr[6].AddAbStateByAbstateIndex)();
  v4 = *(float *)v3;
  v5 = *(float *)(v3 + 4);
  v6 = *(float *)(v3 + 8);
  v7 = v2->m_spSkyScene.m_pObject;
  v7->m_kLocal.m_Translate.x = v4;
  v7->m_kLocal.m_Translate.y = v5;
  v7->m_kLocal.m_Translate.z = v6;
  NiAVObject::Update((NiAVObject *)&v2->m_spSkyScene.m_pObject->vfptr, fTime, 0);
  v8 = g_pkMainChar->m_spScene.m_pObject;
  v9 = v8->m_kWorld.m_Translate.y;
  v10 = v2->m_spWeatherEffectScene.m_pObject;
  pos_8 = v8->m_kWorld.m_Translate.z - 100.0;
  if ( v10 )
  {
    v10->m_kLocal.m_Translate.x = v8->m_kWorld.m_Translate.x;
    v10->m_kLocal.m_Translate.y = v9;
    v10->m_kLocal.m_Translate.z = pos_8;
  }
}

//----- (00683EF0) --------------------------------------------------------
bool __thiscall DropItemSorter::operator()(DropItemSorter *this, DropItem *pDropItem1, DropItem *pDropItem2)
{
  bool result; // al@3
  NiNode *v4; // eax@4
  NiNode *v5; // eax@4
  float v6; // ST10_4@4
  float v7; // ST14_4@4
  float v8; // ST18_4@4
  float v9; // ST04_4@4
  float v10; // ST08_4@4
  float v11; // ST0C_4@4
  DropItem *pDropItem1a; // [sp+30h] [bp+8h]@4
  DropItem *pDropItem1b; // [sp+30h] [bp+8h]@4
  DropItem *pDropItem1c; // [sp+30h] [bp+8h]@4
  DropItem *pDropItem1d; // [sp+30h] [bp+8h]@4
  DropItem *pDropItem2a; // [sp+34h] [bp+Ch]@4

  result = 0;
  if ( pDropItem1 )
  {
    if ( !pDropItem2
      || (v4 = pDropItem1->m_spNode.m_pObject,
          this->pos1.x = v4->m_kLocal.m_Translate.x,
          this->pos1.y = v4->m_kLocal.m_Translate.y,
          this->pos1.z = v4->m_kLocal.m_Translate.z,
          v5 = pDropItem2->m_spNode.m_pObject,
          this->pos2.x = v5->m_kLocal.m_Translate.x,
          this->pos2.y = v5->m_kLocal.m_Translate.y,
          this->pos2.z = v5->m_kLocal.m_Translate.z,
          v6 = this->m_pos3Main.x - this->pos1.x,
          v7 = this->m_pos3Main.y - this->pos1.y,
          v8 = this->m_pos3Main.z - this->pos1.z,
          v9 = this->m_pos3Main.x - this->pos2.x,
          v10 = this->m_pos3Main.y - this->pos2.y,
          v11 = this->m_pos3Main.z - this->pos2.z,
          *(float *)&pDropItem1a = v7 * v7 + v6 * v6 + v8 * v8,
          *(float *)&pDropItem1b = sqrt(*(float *)&pDropItem1a),
          pDropItem2a = pDropItem1b,
          *(float *)&pDropItem1c = v9 * v9 + v10 * v10 + v11 * v11,
          *(float *)&pDropItem1d = sqrt(*(float *)&pDropItem1c),
          *(float *)&pDropItem2a < (double)*(float *)&pDropItem1d) )
    {
      result = 1;
    }
  }
  return result;
}

//----- (00683FF0) --------------------------------------------------------
char __thiscall World::InitScene(World *this)
{
  World *v1; // esi@1
  NiRoom *v2; // eax@1
  NiNode *v3; // ebx@1
  NiNode *v4; // eax@2
  NiNode *v5; // edi@3
  NiRoom *v6; // eax@10
  NiNode *v7; // eax@11
  NiNode *v8; // ebx@11
  NiNode *v9; // edi@13
  NiRoom *v10; // eax@20
  NiNode *v11; // eax@21
  NiNode *v12; // ebx@21
  NiNode *v13; // edi@23
  NiRoom *v14; // eax@30
  NiNode *v15; // eax@31
  NiNode *v16; // ebx@31
  NiNode *v17; // edi@33
  NiRoom *v18; // eax@40
  NiNode *v19; // eax@41
  NiNode *v20; // ebx@41
  NiNode *v21; // edi@43
  NiRoom *v22; // eax@50
  NiNode *v23; // eax@51
  NiNode *v24; // ebx@51
  NiNode *v25; // edi@53
  NiRoom *v26; // eax@60
  NiNode *v27; // eax@61
  NiNode *v28; // ebx@61
  NiNode *v29; // edi@63
  NiRoom *v30; // eax@70
  NiNode *v31; // eax@71
  NiNode *v32; // ebx@71
  NiNode *v33; // edi@73
  NiRoom *v34; // eax@80
  NiNode *v35; // eax@81
  NiNode *v36; // ebx@81
  NiNode *v37; // edi@83
  NiRoom *v38; // eax@90
  NiNode *v39; // eax@91
  NiNode *v40; // ebx@91
  NiNode *v41; // edi@93
  NiRoom *v42; // eax@100
  NiNode *v43; // eax@101
  NiNode *v44; // ebx@101
  NiNode *v45; // edi@103
  NiRoom *v46; // eax@110
  NiNode *v47; // eax@111
  NiNode *v48; // ebx@111
  NiNode *v49; // edi@113
  NiRoom *v50; // eax@120
  NiSortAdjustNode *v51; // eax@121
  NiSortAdjustNode *v52; // ebx@121
  NiSortAdjustNode *v53; // edi@123
  NiRoom *v54; // eax@130
  NiNode *v55; // eax@131
  NiNode *v56; // ebx@131
  NiNode *v57; // edi@133
  NiRoom *v58; // eax@140
  NiNode *v59; // eax@141
  NiNode *v60; // ebx@141
  NiNode *v61; // edi@143
  NiRoom *v62; // eax@150
  NiNode *v63; // eax@151
  NiNode *v64; // ebx@151
  NiNode *v65; // edi@153
  NiAlphaProperty *v66; // ebx@160
  NiRoom *v67; // eax@160
  NiAlphaProperty *v68; // edi@160
  NiRoom *v69; // eax@164
  NiRoom *v70; // edi@164
  NiRoom *v71; // eax@171
  NiRoom *v72; // edi@171
  NiRoom *v73; // eax@176
  NiSortAdjustNode *v74; // eax@177
  NiSortAdjustNode *v75; // ebx@177
  NiSortAdjustNode *v76; // edi@179
  NiRoom *v77; // eax@186
  NiNode *v78; // eax@187
  NiNode *v79; // ebx@187
  NiNode *v80; // edi@189
  NiNode *v81; // edi@196
  NiRoom *v82; // eax@201
  NiNode *v83; // eax@202
  NiNode *v84; // ebx@202
  NiNode *v85; // edi@204
  NiRoom *v86; // eax@211
  NiNode *v87; // eax@212
  NiNode *v88; // ebx@212
  NiNode *v89; // edi@214
  NiRoom *v90; // eax@221
  NiRoom *v91; // edi@221
  NiRoom *v92; // eax@228
  int v93; // eax@229
  int v94; // edi@229
  float v95; // eax@231
  int v96; // eax@231
  float v97; // ecx@231
  float v98; // edx@231
  NiRoom *v99; // eax@233
  NiRoom *v100; // edi@233
  double v101; // st7@234
  float v102; // ST18_4@236
  float v103; // ST1C_4@236
  float v104; // ST20_4@236
  unsigned __int16 v105; // dx@236
  NiRoom *v106; // eax@238
  NiRoom *v107; // edi@238
  NiRoom *v108; // eax@243
  NiNode *v109; // eax@244
  NiNode *v110; // ebx@244
  NiNode *v111; // edi@246
  NiRoom *v112; // eax@253
  NiNode *v113; // eax@254
  NiNode *v114; // ebx@254
  NiNode *v115; // edi@256
  NiRoom *v116; // eax@263
  NiNode *v117; // eax@264
  NiNode *v118; // ebx@264
  NiNode *v119; // edi@266
  NiRoom *v120; // eax@273
  NiNode *v121; // eax@274
  NiNode *v122; // ebx@274
  NiNode *v123; // edi@276
  NiNode **v124; // ebx@283
  NiNode *v125; // edi@284
  int v126; // edi@289
  NiRoom *v127; // eax@295
  CWorldConfig *v128; // eax@296
  NiRoom *v129; // esi@298
  NiRoom *v130; // esi@300
  NiAlphaProperty *v131; // esi@302
  NiPointer<NiRoom> v133; // [sp+24h] [bp-20h]@1
  NiPointer<NiAlphaProperty> spkAlphaProp; // [sp+28h] [bp-1Ch]@160
  NiPointer<NiRoom> element; // [sp+2Ch] [bp-18h]@162
  NiPointer<NiRoom> v136; // [sp+30h] [bp-14h]@162
  NiPointer<NiRoom> v137; // [sp+34h] [bp-10h]@169
  int v138; // [sp+40h] [bp-4h]@1

  v1 = this;
  v2 = (NiRoom *)operator new(0xE8u);
  v133.m_pObject = v2;
  v3 = 0;
  v138 = 0;
  if ( v2 )
  {
    NiNode::NiNode((NiNode *)&v2->vfptr, 0);
    v3 = v4;
  }
  v5 = v1->m_spWorldScene.m_pObject;
  v138 = -1;
  if ( v5 != v3 )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spWorldScene.m_pObject = v3;
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
  v6 = (NiRoom *)operator new(0xE8u);
  v133.m_pObject = v6;
  v138 = 1;
  if ( v6 )
  {
    NiNode::NiNode((NiNode *)&v6->vfptr, 0);
    v8 = v7;
  }
  else
  {
    v8 = 0;
  }
  v9 = v1->m_spCharScene.m_pObject;
  v138 = -1;
  if ( v9 != v8 )
  {
    if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v1->m_spCharScene.m_pObject = v8;
    if ( v8 )
      InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  }
  v10 = (NiRoom *)operator new(0xE8u);
  v133.m_pObject = v10;
  v138 = 2;
  if ( v10 )
  {
    NiNode::NiNode((NiNode *)&v10->vfptr, 0);
    v12 = v11;
  }
  else
  {
    v12 = 0;
  }
  v13 = v1->m_spDropItemScene.m_pObject;
  v138 = -1;
  if ( v13 != v12 )
  {
    if ( v13 && !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) && v13 )
      v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
    v1->m_spDropItemScene.m_pObject = v12;
    if ( v12 )
      InterlockedIncrement((volatile LONG *)&v12->m_uiRefCount);
  }
  v14 = (NiRoom *)operator new(0xE8u);
  v133.m_pObject = v14;
  v138 = 3;
  if ( v14 )
  {
    NiNode::NiNode((NiNode *)&v14->vfptr, 0);
    v16 = v15;
  }
  else
  {
    v16 = 0;
  }
  v17 = v1->m_spGroundScene.m_pObject;
  v138 = -1;
  if ( v17 != v16 )
  {
    if ( v17 && !InterlockedDecrement((volatile LONG *)&v17->m_uiRefCount) && v17 )
      v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
    v1->m_spGroundScene.m_pObject = v16;
    if ( v16 )
      InterlockedIncrement((volatile LONG *)&v16->m_uiRefCount);
  }
  v18 = (NiRoom *)operator new(0xE8u);
  v133.m_pObject = v18;
  v138 = 4;
  if ( v18 )
  {
    NiNode::NiNode((NiNode *)&v18->vfptr, 0);
    v20 = v19;
  }
  else
  {
    v20 = 0;
  }
  v21 = v1->m_spShadowScene.m_pObject;
  v138 = -1;
  if ( v21 != v20 )
  {
    if ( v21 && !InterlockedDecrement((volatile LONG *)&v21->m_uiRefCount) && v21 )
      v21->vfptr->__vecDelDtor((NiRefObject *)v21, 1u);
    v1->m_spShadowScene.m_pObject = v20;
    if ( v20 )
      InterlockedIncrement((volatile LONG *)&v20->m_uiRefCount);
  }
  v22 = (NiRoom *)operator new(0xE8u);
  v133.m_pObject = v22;
  v138 = 5;
  if ( v22 )
  {
    NiNode::NiNode((NiNode *)&v22->vfptr, 0);
    v24 = v23;
  }
  else
  {
    v24 = 0;
  }
  v25 = v1->m_spWaterScene.m_pObject;
  v138 = -1;
  if ( v25 != v24 )
  {
    if ( v25 && !InterlockedDecrement((volatile LONG *)&v25->m_uiRefCount) && v25 )
      v25->vfptr->__vecDelDtor((NiRefObject *)v25, 1u);
    v1->m_spWaterScene.m_pObject = v24;
    if ( v24 )
      InterlockedIncrement((volatile LONG *)&v24->m_uiRefCount);
  }
  v26 = (NiRoom *)operator new(0xE8u);
  v133.m_pObject = v26;
  v138 = 6;
  if ( v26 )
  {
    NiNode::NiNode((NiNode *)&v26->vfptr, 0);
    v28 = v27;
  }
  else
  {
    v28 = 0;
  }
  v29 = v1->m_spEffectScene.m_pObject;
  v138 = -1;
  if ( v29 != v28 )
  {
    if ( v29 && !InterlockedDecrement((volatile LONG *)&v29->m_uiRefCount) && v29 )
      v29->vfptr->__vecDelDtor((NiRefObject *)v29, 1u);
    v1->m_spEffectScene.m_pObject = v28;
    if ( v28 )
      InterlockedIncrement((volatile LONG *)&v28->m_uiRefCount);
  }
  v30 = (NiRoom *)operator new(0xE8u);
  v133.m_pObject = v30;
  v138 = 7;
  if ( v30 )
  {
    NiNode::NiNode((NiNode *)&v30->vfptr, 0);
    v32 = v31;
  }
  else
  {
    v32 = 0;
  }
  v33 = v1->m_spSkyScene.m_pObject;
  v138 = -1;
  if ( v33 != v32 )
  {
    if ( v33 && !InterlockedDecrement((volatile LONG *)&v33->m_uiRefCount) && v33 )
      v33->vfptr->__vecDelDtor((NiRefObject *)v33, 1u);
    v1->m_spSkyScene.m_pObject = v32;
    if ( v32 )
      InterlockedIncrement((volatile LONG *)&v32->m_uiRefCount);
  }
  v34 = (NiRoom *)operator new(0xE8u);
  v133.m_pObject = v34;
  v138 = 8;
  if ( v34 )
  {
    NiNode::NiNode((NiNode *)&v34->vfptr, 0);
    v36 = v35;
  }
  else
  {
    v36 = 0;
  }
  v37 = v1->m_spNormalLightScene.m_pObject;
  v138 = -1;
  if ( v37 != v36 )
  {
    if ( v37 && !InterlockedDecrement((volatile LONG *)&v37->m_uiRefCount) && v37 )
      v37->vfptr->__vecDelDtor((NiRefObject *)v37, 1u);
    v1->m_spNormalLightScene.m_pObject = v36;
    if ( v36 )
      InterlockedIncrement((volatile LONG *)&v36->m_uiRefCount);
  }
  v38 = (NiRoom *)operator new(0xE8u);
  v133.m_pObject = v38;
  v138 = 9;
  if ( v38 )
  {
    NiNode::NiNode((NiNode *)&v38->vfptr, 0);
    v40 = v39;
  }
  else
  {
    v40 = 0;
  }
  v41 = v1->m_spAbstateCharScene.m_pObject;
  v138 = -1;
  if ( v41 != v40 )
  {
    if ( v41 && !InterlockedDecrement((volatile LONG *)&v41->m_uiRefCount) && v41 )
      v41->vfptr->__vecDelDtor((NiRefObject *)v41, 1u);
    v1->m_spAbstateCharScene.m_pObject = v40;
    if ( v40 )
      InterlockedIncrement((volatile LONG *)&v40->m_uiRefCount);
  }
  v42 = (NiRoom *)operator new(0xE8u);
  v133.m_pObject = v42;
  v138 = 10;
  if ( v42 )
  {
    NiNode::NiNode((NiNode *)&v42->vfptr, 0);
    v44 = v43;
  }
  else
  {
    v44 = 0;
  }
  v45 = v1->m_spMinihouseScene.m_pObject;
  v138 = -1;
  if ( v45 != v44 )
  {
    if ( v45 && !InterlockedDecrement((volatile LONG *)&v45->m_uiRefCount) && v45 )
      v45->vfptr->__vecDelDtor((NiRefObject *)v45, 1u);
    v1->m_spMinihouseScene.m_pObject = v44;
    if ( v44 )
      InterlockedIncrement((volatile LONG *)&v44->m_uiRefCount);
  }
  v46 = (NiRoom *)operator new(0xE8u);
  v133.m_pObject = v46;
  v138 = 11;
  if ( v46 )
  {
    NiNode::NiNode((NiNode *)&v46->vfptr, 0);
    v48 = v47;
  }
  else
  {
    v48 = 0;
  }
  v49 = v1->m_spDirectionalLightScene.m_pObject;
  v138 = -1;
  if ( v49 != v48 )
  {
    if ( v49 && !InterlockedDecrement((volatile LONG *)&v49->m_uiRefCount) && v49 )
      v49->vfptr->__vecDelDtor((NiRefObject *)v49, 1u);
    v1->m_spDirectionalLightScene.m_pObject = v48;
    if ( v48 )
      InterlockedIncrement((volatile LONG *)&v48->m_uiRefCount);
  }
  v50 = (NiRoom *)operator new(0xECu);
  v133.m_pObject = v50;
  v138 = 12;
  if ( v50 )
  {
    NiSortAdjustNode::NiSortAdjustNode((NiSortAdjustNode *)v50);
    v52 = v51;
  }
  else
  {
    v52 = 0;
  }
  v53 = v1->m_spBuildingScene.m_pObject;
  v138 = -1;
  if ( v53 != v52 )
  {
    if ( v53 && !InterlockedDecrement((volatile LONG *)&v53->m_uiRefCount) && v53 )
      v53->vfptr->__vecDelDtor((NiRefObject *)v53, 1u);
    v1->m_spBuildingScene.m_pObject = v52;
    if ( v52 )
      InterlockedIncrement((volatile LONG *)&v52->m_uiRefCount);
  }
  NiObjectNET::SetName((NiObjectNET *)&v1->m_spBuildingScene.m_pObject->vfptr, "[PN]");
  v1->m_spBuildingScene.m_pObject->m_eSortingMode = 0;
  v54 = (NiRoom *)operator new(0xE8u);
  v133.m_pObject = v54;
  v138 = 13;
  if ( v54 )
  {
    NiNode::NiNode((NiNode *)&v54->vfptr, 0);
    v56 = v55;
  }
  else
  {
    v56 = 0;
  }
  v57 = v1->m_spGroundObject.m_pObject;
  v138 = -1;
  if ( v57 != v56 )
  {
    if ( v57 && !InterlockedDecrement((volatile LONG *)&v57->m_uiRefCount) && v57 )
      v57->vfptr->__vecDelDtor((NiRefObject *)v57, 1u);
    v1->m_spGroundObject.m_pObject = v56;
    if ( v56 )
      InterlockedIncrement((volatile LONG *)&v56->m_uiRefCount);
  }
  ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spBuildingScene.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spGroundObject.m_pObject,
    0);
  v58 = (NiRoom *)operator new(0xE8u);
  v133.m_pObject = v58;
  v138 = 14;
  if ( v58 )
  {
    NiNode::NiNode((NiNode *)&v58->vfptr, 0);
    v60 = v59;
  }
  else
  {
    v60 = 0;
  }
  v61 = v1->m_spBDNotAni.m_pObject;
  v138 = -1;
  if ( v61 != v60 )
  {
    if ( v61 && !InterlockedDecrement((volatile LONG *)&v61->m_uiRefCount) && v61 )
      v61->vfptr->__vecDelDtor((NiRefObject *)v61, 1u);
    v1->m_spBDNotAni.m_pObject = v60;
    if ( v60 )
      InterlockedIncrement((volatile LONG *)&v60->m_uiRefCount);
  }
  ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spBuildingScene.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spBDNotAni.m_pObject,
    0);
  v62 = (NiRoom *)operator new(0xE8u);
  v133.m_pObject = v62;
  v138 = 15;
  if ( v62 )
  {
    NiNode::NiNode((NiNode *)&v62->vfptr, 0);
    v64 = v63;
  }
  else
  {
    v64 = 0;
  }
  v65 = v1->m_spBDAni.m_pObject;
  v138 = -1;
  if ( v65 != v64 )
  {
    if ( v65 && !InterlockedDecrement((volatile LONG *)&v65->m_uiRefCount) && v65 )
      v65->vfptr->__vecDelDtor((NiRefObject *)v65, 1u);
    v1->m_spBDAni.m_pObject = v64;
    if ( v64 )
      InterlockedIncrement((volatile LONG *)&v64->m_uiRefCount);
  }
  ((void (__stdcall *)(_DWORD, _DWORD))v1->m_spBuildingScene.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spBDAni.m_pObject,
    0);
  v66 = 0;
  spkAlphaProp.m_pObject = 0;
  v138 = 16;
  v67 = (NiRoom *)operator new(0x20u);
  v68 = (NiAlphaProperty *)v67;
  v133.m_pObject = v67;
  LOBYTE(v138) = 17;
  if ( v67 )
  {
    NiObjectNET::NiObjectNET((NiObjectNET *)&v67->vfptr);
    v68->m_ucAlphaTestRef = 0;
    v68->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
    v68->m_uFlags = 236;
    v66 = v68;
    spkAlphaProp.m_pObject = v68;
    InterlockedIncrement((volatile LONG *)&v68->m_uiRefCount);
  }
  v66->m_uFlags |= 1u;
  v66->m_uFlags |= 0x200u;
  v66->m_uFlags = v66->m_uFlags & 0xF3FF | 0x1000;
  v66->m_ucAlphaTestRef = 8;
  v66->m_uFlags = (v66->m_uFlags & 0xFE5F | 0x40) & 0xFFE3 | 2;
  v136.m_pObject = (NiRoom *)v1->m_spShadowScene.m_pObject;
  element.m_pObject = (NiRoom *)v66;
  InterlockedIncrement((volatile LONG *)&v66->m_uiRefCount);
  LOBYTE(v138) = 18;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v136.m_pObject->m_kPropertyList,
    &element);
  LOBYTE(v138) = 16;
  if ( !InterlockedDecrement((volatile LONG *)&v66->m_uiRefCount) )
    v66->vfptr->__vecDelDtor((NiRefObject *)v66, 1u);
  v69 = (NiRoom *)operator new(0x28u);
  v70 = v69;
  v133.m_pObject = v69;
  LOBYTE(v138) = 19;
  if ( v69 )
  {
    NiObjectNET::NiObjectNET((NiObjectNET *)&v69->vfptr);
    v70->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
    v70->m_uFlags = 0;
    v70->m_pkParent = 0;
    LODWORD(v70->m_kWorldBound.m_kCenter.x) = 1;
  }
  else
  {
    v70 = 0;
  }
  element.m_pObject = v70;
  if ( v70 )
    InterlockedIncrement((volatile LONG *)&v70->m_uiRefCount);
  v70->m_pkParent = (NiNode *)1;
  LODWORD(v70->m_kWorldBound.m_kCenter.x) = 1;
  v137.m_pObject = (NiRoom *)v1->m_spShadowScene.m_pObject;
  v136.m_pObject = v70;
  InterlockedIncrement((volatile LONG *)&v70->m_uiRefCount);
  LOBYTE(v138) = 21;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v137.m_pObject->m_kPropertyList,
    &v136);
  LOBYTE(v138) = 20;
  if ( !InterlockedDecrement((volatile LONG *)&v70->m_uiRefCount) )
    v70->vfptr->__vecDelDtor((NiRefObject *)v70, 1u);
  v71 = (NiRoom *)operator new(0x30u);
  v72 = v71;
  v133.m_pObject = v71;
  LOBYTE(v138) = 22;
  if ( v71 )
  {
    NiObjectNET::NiObjectNET((NiObjectNET *)&v71->vfptr);
    v72->vfptr = (NiRefObjectVtbl *)&NiFogProperty::`vftable';
    v72->m_kWorldBound.m_kCenter.x = 0.0;
    v72->m_kWorldBound.m_kCenter.y = 0.0;
    v72->m_kWorldBound.m_kCenter.z = 0.0;
    v72->m_uFlags = 0;
    *(float *)&v72->m_pkParent = 1.0;
    v72->m_kWorldBound.m_kCenter = (NiPoint3)NiColor::BLACK;
  }
  else
  {
    v72 = 0;
  }
  v72->m_uFlags &= 0xFFFEu;
  v137.m_pObject = (NiRoom *)v1->m_spShadowScene.m_pObject;
  v136.m_pObject = v72;
  InterlockedIncrement((volatile LONG *)&v72->m_uiRefCount);
  LOBYTE(v138) = 23;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v137.m_pObject->m_kPropertyList,
    &v136);
  LOBYTE(v138) = 20;
  if ( !InterlockedDecrement((volatile LONG *)&v72->m_uiRefCount) )
    v72->vfptr->__vecDelDtor((NiRefObject *)v72, 1u);
  v73 = (NiRoom *)operator new(0xECu);
  v133.m_pObject = v73;
  LOBYTE(v138) = 24;
  if ( v73 )
  {
    NiSortAdjustNode::NiSortAdjustNode((NiSortAdjustNode *)v73);
    v75 = v74;
  }
  else
  {
    v75 = 0;
  }
  v76 = v1->m_spGroundTerrain.m_pObject;
  LOBYTE(v138) = 20;
  if ( v76 != v75 )
  {
    if ( v76 && !InterlockedDecrement((volatile LONG *)&v76->m_uiRefCount) && v76 )
      v76->vfptr->__vecDelDtor((NiRefObject *)v76, 1u);
    v1->m_spGroundTerrain.m_pObject = v75;
    if ( v75 )
      InterlockedIncrement((volatile LONG *)&v75->m_uiRefCount);
  }
  v1->m_spGroundTerrain.m_pObject->m_eSortingMode = 1;
  v77 = (NiRoom *)operator new(0xE8u);
  v133.m_pObject = v77;
  LOBYTE(v138) = 25;
  if ( v77 )
  {
    NiNode::NiNode((NiNode *)&v77->vfptr, 0);
    v79 = v78;
  }
  else
  {
    v79 = 0;
  }
  v80 = v1->m_spAllGroundScene.m_pObject;
  LOBYTE(v138) = 20;
  if ( v80 != v79 )
  {
    if ( v80 && !InterlockedDecrement((volatile LONG *)&v80->m_uiRefCount) && v80 )
      v80->vfptr->__vecDelDtor((NiRefObject *)v80, 1u);
    v1->m_spAllGroundScene.m_pObject = v79;
    if ( v79 )
      InterlockedIncrement((volatile LONG *)&v79->m_uiRefCount);
  }
  ((void (__stdcall *)(NiSortAdjustNode *, _DWORD))v1->m_spGroundScene.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spGroundTerrain.m_pObject,
    0);
  ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spAllGroundScene.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spGroundScene.m_pObject,
    0);
  ((void (__stdcall *)(NiSortAdjustNode *, _DWORD))v1->m_spAllGroundScene.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spBuildingScene.m_pObject,
    0);
  ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spNormalLightScene.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spAllGroundScene.m_pObject,
    0);
  ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spNormalLightScene.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spDirectionalLightScene.m_pObject,
    0);
  ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spDirectionalLightScene.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spCharScene.m_pObject,
    0);
  ((void (__stdcall *)(_DWORD, _DWORD))v1->m_spNormalLightScene.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spShadowScene.m_pObject,
    0);
  ((void (__stdcall *)(_DWORD, _DWORD))v1->m_spNormalLightScene.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spDropItemScene.m_pObject,
    0);
  ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spDirectionalLightScene.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spMinihouseScene.m_pObject,
    0);
  v81 = v1->m_spWeatherEffectScene.m_pObject;
  if ( v81 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v81->m_uiRefCount) && v81 )
      v81->vfptr->__vecDelDtor((NiRefObject *)v81, 1u);
    v1->m_spWeatherEffectScene.m_pObject = 0;
  }
  ((void (__stdcall *)(_DWORD, _DWORD))v1->m_spNormalLightScene.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spWaterScene.m_pObject,
    0);
  ((void (__stdcall *)(_DWORD, _DWORD))v1->m_spNormalLightScene.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spEffectScene.m_pObject,
    0);
  ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spWorldScene.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spNormalLightScene.m_pObject,
    0);
  ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spWorldScene.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spAbstateCharScene.m_pObject,
    0);
  v82 = (NiRoom *)operator new(0xE8u);
  v133.m_pObject = v82;
  LOBYTE(v138) = 26;
  if ( v82 )
  {
    NiNode::NiNode((NiNode *)&v82->vfptr, 0);
    v84 = v83;
  }
  else
  {
    v84 = 0;
  }
  v85 = v1->m_spLightArea.m_pObject;
  LOBYTE(v138) = 20;
  if ( v85 != v84 )
  {
    if ( v85 && !InterlockedDecrement((volatile LONG *)&v85->m_uiRefCount) && v85 )
      v85->vfptr->__vecDelDtor((NiRefObject *)v85, 1u);
    v1->m_spLightArea.m_pObject = v84;
    if ( v84 )
      InterlockedIncrement((volatile LONG *)&v84->m_uiRefCount);
  }
  v86 = (NiRoom *)operator new(0xE8u);
  v133.m_pObject = v86;
  LOBYTE(v138) = 27;
  if ( v86 )
  {
    NiNode::NiNode((NiNode *)&v86->vfptr, 0);
    v88 = v87;
  }
  else
  {
    v88 = 0;
  }
  v89 = v1->m_spFog.m_pObject;
  LOBYTE(v138) = 20;
  if ( v89 != v88 )
  {
    if ( v89 && !InterlockedDecrement((volatile LONG *)&v89->m_uiRefCount) && v89 )
      v89->vfptr->__vecDelDtor((NiRefObject *)v89, 1u);
    v1->m_spFog.m_pObject = v88;
    if ( v88 )
      InterlockedIncrement((volatile LONG *)&v88->m_uiRefCount);
  }
  ((void (__stdcall *)(_DWORD, _DWORD))v1->m_spWorldScene.m_pObject->vfptr[29].__vecDelDtor)(
    v1->m_spLightArea.m_pObject,
    0);
  ((void (__stdcall *)(_DWORD, _DWORD))v1->m_spWorldScene.m_pObject->vfptr[29].__vecDelDtor)(v1->m_spFog.m_pObject, 0);
  v90 = (NiRoom *)operator new(0x28u);
  v91 = v90;
  v133.m_pObject = v90;
  LOBYTE(v138) = 28;
  if ( v90 )
  {
    NiObjectNET::NiObjectNET((NiObjectNET *)&v90->vfptr);
    v91->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
    v91->m_uFlags = 0;
    v91->m_pkParent = 0;
    LODWORD(v91->m_kWorldBound.m_kCenter.x) = 1;
  }
  else
  {
    v91 = 0;
  }
  v136.m_pObject = v91;
  if ( v91 )
    InterlockedIncrement((volatile LONG *)&v91->m_uiRefCount);
  v91->m_pkParent = (NiNode *)2;
  LODWORD(v91->m_kWorldBound.m_kCenter.x) = 1;
  v133.m_pObject = (NiRoom *)v1->m_spWorldScene.m_pObject;
  v137.m_pObject = v91;
  InterlockedIncrement((volatile LONG *)&v91->m_uiRefCount);
  LOBYTE(v138) = 30;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v133.m_pObject->m_kPropertyList,
    &v137);
  LOBYTE(v138) = 29;
  if ( !InterlockedDecrement((volatile LONG *)&v91->m_uiRefCount) )
    v91->vfptr->__vecDelDtor((NiRefObject *)v91, 1u);
  v92 = (NiRoom *)operator new(0x60u);
  v133.m_pObject = v92;
  LOBYTE(v138) = 31;
  if ( v92 )
  {
    NiMaterialProperty::NiMaterialProperty((NiMaterialProperty *)v92);
    v94 = v93;
  }
  else
  {
    v94 = 0;
  }
  *(float *)(v94 + 32) = NiColor::WHITE.r;
  *(float *)(v94 + 36) = NiColor::WHITE.g;
  v95 = NiColor::WHITE.b;
  ++*(_DWORD *)(v94 + 88);
  *(float *)(v94 + 40) = v95;
  v96 = *(_DWORD *)(v94 + 88);
  *(float *)(v94 + 44) = NiColor::WHITE.r;
  *(float *)(v94 + 48) = NiColor::WHITE.g;
  v97 = NiColor::WHITE.b;
  *(_DWORD *)(v94 + 88) = ++v96;
  *(float *)(v94 + 52) = v97;
  *(float *)(v94 + 68) = NiColor::BLACK.r;
  *(float *)(v94 + 72) = NiColor::BLACK.g;
  v98 = NiColor::BLACK.b;
  *(float *)(v94 + 84) = 1.0;
  *(float *)(v94 + 76) = v98;
  *(_DWORD *)(v94 + 88) = v96 + 2;
  v137.m_pObject = (NiRoom *)v1->m_spWorldScene.m_pObject;
  v133.m_pObject = (NiRoom *)v94;
  InterlockedIncrement((volatile LONG *)(v94 + 4));
  LOBYTE(v138) = 32;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v137.m_pObject->m_kPropertyList,
    &v133);
  LOBYTE(v138) = 29;
  if ( !InterlockedDecrement((volatile LONG *)(v94 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v94)(v94, 1);
  v99 = (NiRoom *)operator new(0x30u);
  v100 = v99;
  v133.m_pObject = v99;
  LOBYTE(v138) = 33;
  if ( v99 )
  {
    NiObjectNET::NiObjectNET((NiObjectNET *)&v99->vfptr);
    v100->vfptr = (NiRefObjectVtbl *)&NiFogProperty::`vftable';
    v100->m_kWorldBound.m_kCenter.x = 0.0;
    v100->m_kWorldBound.m_kCenter.y = 0.0;
    v100->m_kWorldBound.m_kCenter.z = 0.0;
    v101 = 1.0;
    v100->m_uFlags = 0;
    *(float *)&v100->m_pkParent = 1.0;
    v100->m_kWorldBound.m_kCenter = (NiPoint3)NiColor::BLACK;
  }
  else
  {
    v101 = 1.0;
    v100 = 0;
  }
  *(float *)&v100->m_pkParent = 0.60000002;
  v133.m_pObject = v100;
  v102 = v101;
  v100->m_kWorldBound.m_kCenter.x = v102;
  v103 = v101;
  v104 = v101;
  v105 = v100->m_uFlags;
  v100->m_kWorldBound.m_kCenter.y = v103;
  v100->m_kWorldBound.m_kCenter.z = v104;
  v100->m_uFlags = v105 & 0xFFF9 | 1;
  v137.m_pObject = (NiRoom *)v1->m_spWorldScene.m_pObject;
  InterlockedIncrement((volatile LONG *)&v100->m_uiRefCount);
  LOBYTE(v138) = 34;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v137.m_pObject->m_kPropertyList,
    &v133);
  LOBYTE(v138) = 29;
  if ( !InterlockedDecrement((volatile LONG *)&v100->m_uiRefCount) )
    v100->vfptr->__vecDelDtor((NiRefObject *)v100, 1u);
  v106 = (NiRoom *)operator new(0x24u);
  v107 = v106;
  v133.m_pObject = v106;
  LOBYTE(v138) = 35;
  if ( v106 )
  {
    NiObjectNET::NiObjectNET((NiObjectNET *)&v106->vfptr);
    v107->vfptr = (NiRefObjectVtbl *)&NiZBufferProperty::`vftable';
    v107->m_uFlags = 3;
    v107->m_pkParent = (NiNode *)3;
  }
  else
  {
    v107 = 0;
  }
  v107->m_uFlags &= 0xFFFCu;
  v137.m_pObject = (NiRoom *)v1->m_spSkyScene.m_pObject;
  v133.m_pObject = v107;
  InterlockedIncrement((volatile LONG *)&v107->m_uiRefCount);
  LOBYTE(v138) = 36;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v137.m_pObject->m_kPropertyList,
    &v133);
  LOBYTE(v138) = 29;
  if ( !InterlockedDecrement((volatile LONG *)&v107->m_uiRefCount) )
    v107->vfptr->__vecDelDtor((NiRefObject *)v107, 1u);
  v108 = (NiRoom *)operator new(0xE8u);
  v133.m_pObject = v108;
  LOBYTE(v138) = 37;
  if ( v108 )
  {
    NiNode::NiNode((NiNode *)&v108->vfptr, 0);
    v110 = v109;
  }
  else
  {
    v110 = 0;
  }
  v111 = v1->m_spGroundCollidee.m_pObject;
  LOBYTE(v138) = 29;
  if ( v111 != v110 )
  {
    if ( v111 && !InterlockedDecrement((volatile LONG *)&v111->m_uiRefCount) && v111 )
      v111->vfptr->__vecDelDtor((NiRefObject *)v111, 1u);
    v1->m_spGroundCollidee.m_pObject = v110;
    if ( v110 )
      InterlockedIncrement((volatile LONG *)&v110->m_uiRefCount);
  }
  v112 = (NiRoom *)operator new(0xE8u);
  v133.m_pObject = v112;
  LOBYTE(v138) = 38;
  if ( v112 )
  {
    NiNode::NiNode((NiNode *)&v112->vfptr, 0);
    v114 = v113;
  }
  else
  {
    v114 = 0;
  }
  v115 = v1->m_spGroundObjectCollidee.m_pObject;
  LOBYTE(v138) = 29;
  if ( v115 != v114 )
  {
    if ( v115 && !InterlockedDecrement((volatile LONG *)&v115->m_uiRefCount) && v115 )
      v115->vfptr->__vecDelDtor((NiRefObject *)v115, 1u);
    v1->m_spGroundObjectCollidee.m_pObject = v114;
    if ( v114 )
      InterlockedIncrement((volatile LONG *)&v114->m_uiRefCount);
  }
  v116 = (NiRoom *)operator new(0xE8u);
  v133.m_pObject = v116;
  LOBYTE(v138) = 39;
  if ( v116 )
  {
    NiNode::NiNode((NiNode *)&v116->vfptr, 0);
    v118 = v117;
  }
  else
  {
    v118 = 0;
  }
  v119 = v1->m_spBuildingCollidee.m_pObject;
  LOBYTE(v138) = 29;
  if ( v119 != v118 )
  {
    if ( v119 && !InterlockedDecrement((volatile LONG *)&v119->m_uiRefCount) && v119 )
      v119->vfptr->__vecDelDtor((NiRefObject *)v119, 1u);
    v1->m_spBuildingCollidee.m_pObject = v118;
    if ( v118 )
      InterlockedIncrement((volatile LONG *)&v118->m_uiRefCount);
  }
  v120 = (NiRoom *)operator new(0xE8u);
  v133.m_pObject = v120;
  LOBYTE(v138) = 40;
  if ( v120 )
  {
    NiNode::NiNode((NiNode *)&v120->vfptr, 0);
    v122 = v121;
  }
  else
  {
    v122 = 0;
  }
  v123 = v1->m_spUseCameraCollidee.m_pObject;
  LOBYTE(v138) = 29;
  if ( v123 != v122 )
  {
    if ( v123 && !InterlockedDecrement((volatile LONG *)&v123->m_uiRefCount) && v123 )
      v123->vfptr->__vecDelDtor((NiRefObject *)v123, 1u);
    v1->m_spUseCameraCollidee.m_pObject = v122;
    if ( v122 )
      InterlockedIncrement((volatile LONG *)&v122->m_uiRefCount);
  }
  v124 = &v1->m_kExtraLightScene[0].spLightScene.m_pObject;
  v137.m_pObject = (NiRoom *)30;
  do
  {
    *(v124 - 2) = 0;
    v125 = *v124;
    if ( *v124 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v125->m_uiRefCount) && v125 )
        v125->vfptr->__vecDelDtor((NiRefObject *)v125, 1u);
      *v124 = 0;
    }
    v126 = (int)*(v124 - 1);
    if ( v126 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v126 + 4)) && v126 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v126)(v126, 1);
      *(v124 - 1) = 0;
    }
    v124 += 3;
    --v137.m_pObject;
  }
  while ( v137.m_pObject );
  v127 = (NiRoom *)operator new(0x2Cu);
  v133.m_pObject = v127;
  LOBYTE(v138) = 41;
  if ( v127 )
    CWorldConfig::CWorldConfig((CWorldConfig *)v127);
  else
    v128 = 0;
  v1->m_pWorldConfig = v128;
  v129 = v136.m_pObject;
  LOBYTE(v138) = 20;
  if ( !InterlockedDecrement((volatile LONG *)&v136.m_pObject->m_uiRefCount) )
    v129->vfptr->__vecDelDtor((NiRefObject *)v129, 1u);
  v130 = element.m_pObject;
  LOBYTE(v138) = 16;
  if ( !InterlockedDecrement((volatile LONG *)&element.m_pObject->m_uiRefCount) )
    v130->vfptr->__vecDelDtor((NiRefObject *)v130, 1u);
  v131 = spkAlphaProp.m_pObject;
  v138 = -1;
  if ( !InterlockedDecrement((volatile LONG *)&spkAlphaProp.m_pObject->m_uiRefCount) )
    v131->vfptr->__vecDelDtor((NiRefObject *)v131, 1u);
  return 1;
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);
// 9704EC: using guessed type int (__thiscall *NiFogProperty::`vftable')(void *p, char);
// 97BD2C: using guessed type int (__thiscall *NiZBufferProperty::`vftable')(void *p, char);
// A7D11C: using guessed type const struct NiColor NiColor::WHITE;
// B6243C: using guessed type const struct NiColor NiColor::BLACK;

//----- (00685220) --------------------------------------------------------
void __thiscall World::TerminateScene(World *this)
{
  World *v1; // esi@1
  unsigned int i; // eax@1
  NiNode *v3; // edx@2
  NiNode *v4; // edi@5
  NiNode *v5; // edi@10
  NiNode *v6; // edi@15
  NiNode *v7; // edi@20
  int v8; // edi@25
  int v9; // ebx@26
  int v10; // ebx@31
  NiNode *v11; // edi@37
  NiNode *v12; // edi@42
  NiNode *v13; // edi@47
  NiNode *v14; // edi@52
  NiSortAdjustNode *v15; // edi@57
  NiNode *v16; // edi@62
  NiNode *v17; // edi@67
  NiNode *v18; // edi@72
  NiNode *v19; // edi@77
  NiNode *v20; // edi@82
  NiSortAdjustNode *v21; // edi@87
  NiNode *v22; // edi@92
  NiNode *v23; // edi@97
  NiNode *v24; // edi@102
  NiNode *v25; // edi@107
  NiNode *v26; // edi@112
  NiNode *v27; // edi@117
  NiNode *v28; // edi@122
  NiNode *v29; // edi@127
  PgNsTerrain *v30; // edi@132
  CWorldConfig *v31; // ecx@134
  signed int v32; // [sp+14h] [bp-4h]@25

  v1 = this;
  std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Erase(
    (std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > *)&this->m_setChar.comp,
    this->m_setChar._Myhead->_Parent);
  v1->m_setChar._Myhead->_Parent = v1->m_setChar._Myhead;
  v1->m_setChar._Myhead->_Left = v1->m_setChar._Myhead;
  v1->m_setChar._Myhead->_Right = v1->m_setChar._Myhead;
  v1->m_setChar._Mysize = 0;
  NsMakeQuadScene::SetData(&v1->kQaudSceneMakerAni, 0, 0, 0.0, 0);
  NsMakeQuadScene::SetData(&v1->kQaudSceneMakerNotAni, 0, 0, 0.0, 0);
  for ( i = 0; i < v1->m_kCullUPdateData.kCheckedNodes.m_uiSize; ++i )
  {
    v3 = v1->m_kCullUPdateData.kCheckedNodes.m_pBase[i].m_pObject;
    if ( v3 )
      v3->m_uFlags |= 2u;
  }
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v1->m_kCullUPdateData);
  v4 = v1->m_spGroundCollidee.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spGroundCollidee.m_pObject = 0;
  }
  v5 = v1->m_spGroundObjectCollidee.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spGroundObjectCollidee.m_pObject = 0;
  }
  v6 = v1->m_spUseCameraCollidee.m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v1->m_spUseCameraCollidee.m_pObject = 0;
  }
  v7 = v1->m_spBuildingCollidee.m_pObject;
  if ( v7 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v1->m_spBuildingCollidee.m_pObject = 0;
  }
  v8 = (int)&v1->m_kExtraLightScene[0].spScene;
  v32 = 30;
  do
  {
    v9 = *(_DWORD *)(v8 + 4);
    if ( v9 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v9 + 4)) && v9 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v9)(v9, 1);
      *(_DWORD *)(v8 + 4) = 0;
    }
    v10 = *(_DWORD *)v8;
    if ( *(_DWORD *)v8 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v10 + 4)) && v10 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v10)(v10, 1);
      *(_DWORD *)v8 = 0;
    }
    *(_DWORD *)(v8 - 4) = 0;
    v8 += 12;
    --v32;
  }
  while ( v32 );
  v11 = v1->m_spCharScene.m_pObject;
  if ( v11 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    v1->m_spCharScene.m_pObject = 0;
  }
  v12 = v1->m_spDropItemScene.m_pObject;
  if ( v12 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
      v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
    v1->m_spDropItemScene.m_pObject = 0;
  }
  v13 = v1->m_spGroundScene.m_pObject;
  if ( v13 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) && v13 )
      v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
    v1->m_spGroundScene.m_pObject = 0;
  }
  v14 = v1->m_spGroundObject.m_pObject;
  if ( v14 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v14->m_uiRefCount) && v14 )
      v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
    v1->m_spGroundObject.m_pObject = 0;
  }
  v15 = v1->m_spGroundTerrain.m_pObject;
  if ( v15 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) && v15 )
      v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
    v1->m_spGroundTerrain.m_pObject = 0;
  }
  v16 = v1->m_spNormalLightScene.m_pObject;
  if ( v16 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v16->m_uiRefCount) && v16 )
      v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
    v1->m_spNormalLightScene.m_pObject = 0;
  }
  v17 = v1->m_spAbstateCharScene.m_pObject;
  if ( v17 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v17->m_uiRefCount) && v17 )
      v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
    v1->m_spAbstateCharScene.m_pObject = 0;
  }
  v18 = v1->m_spMinihouseScene.m_pObject;
  if ( v18 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v18->m_uiRefCount) && v18 )
      v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
    v1->m_spMinihouseScene.m_pObject = 0;
  }
  v19 = v1->m_spDirectionalLightScene.m_pObject;
  if ( v19 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v19->m_uiRefCount) && v19 )
      v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
    v1->m_spDirectionalLightScene.m_pObject = 0;
  }
  v20 = v1->m_spShadowScene.m_pObject;
  if ( v20 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v20->m_uiRefCount) && v20 )
      v20->vfptr->__vecDelDtor((NiRefObject *)v20, 1u);
    v1->m_spShadowScene.m_pObject = 0;
  }
  v21 = v1->m_spBuildingScene.m_pObject;
  if ( v21 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v21->m_uiRefCount) && v21 )
      v21->vfptr->__vecDelDtor((NiRefObject *)v21, 1u);
    v1->m_spBuildingScene.m_pObject = 0;
  }
  v22 = v1->m_spAllGroundScene.m_pObject;
  if ( v22 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v22->m_uiRefCount) && v22 )
      v22->vfptr->__vecDelDtor((NiRefObject *)v22, 1u);
    v1->m_spAllGroundScene.m_pObject = 0;
  }
  v23 = v1->m_spBDAni.m_pObject;
  if ( v23 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v23->m_uiRefCount) && v23 )
      v23->vfptr->__vecDelDtor((NiRefObject *)v23, 1u);
    v1->m_spBDAni.m_pObject = 0;
  }
  v24 = v1->m_spBDNotAni.m_pObject;
  if ( v24 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v24->m_uiRefCount) && v24 )
      v24->vfptr->__vecDelDtor((NiRefObject *)v24, 1u);
    v1->m_spBDNotAni.m_pObject = 0;
  }
  v25 = v1->m_spWeatherEffectScene.m_pObject;
  if ( v25 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v25->m_uiRefCount) && v25 )
      v25->vfptr->__vecDelDtor((NiRefObject *)v25, 1u);
    v1->m_spWeatherEffectScene.m_pObject = 0;
  }
  v26 = v1->m_spWaterScene.m_pObject;
  if ( v26 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v26->m_uiRefCount) && v26 )
      v26->vfptr->__vecDelDtor((NiRefObject *)v26, 1u);
    v1->m_spWaterScene.m_pObject = 0;
  }
  v27 = v1->m_spEffectScene.m_pObject;
  if ( v27 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v27->m_uiRefCount) && v27 )
      v27->vfptr->__vecDelDtor((NiRefObject *)v27, 1u);
    v1->m_spEffectScene.m_pObject = 0;
  }
  v28 = v1->m_spSkyScene.m_pObject;
  if ( v28 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v28->m_uiRefCount) && v28 )
      v28->vfptr->__vecDelDtor((NiRefObject *)v28, 1u);
    v1->m_spSkyScene.m_pObject = 0;
  }
  v29 = v1->m_spWorldScene.m_pObject;
  if ( v29 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v29->m_uiRefCount) && v29 )
      v29->vfptr->__vecDelDtor((NiRefObject *)v29, 1u);
    v1->m_spWorldScene.m_pObject = 0;
  }
  NsMergePortal::Clear(&v1->m_kMergePortal);
  v30 = v1->m_pkTerrain;
  if ( v30 )
  {
    PgNsTerrain::~PgNsTerrain(v1->m_pkTerrain);
    operator delete(v30);
  }
  v31 = v1->m_pWorldConfig;
  v1->m_pkTerrain = 0;
  if ( v31 )
    ((void (__stdcall *)(signed int))v31->vfptr->__vecDelDtor)(1);
  v1->m_pWorldConfig = 0;
}

//----- (006857B0) --------------------------------------------------------
char __thiscall World::AttachChar(World *this, Char *pkChar)
{
  char v2; // al@2
  std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > *v3; // esi@4
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v4; // eax@4
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > >,bool> result; // [sp+0h] [bp-8h]@4

  if ( pkChar && (pkChar = (Char *)pkChar->m_spScene.m_pObject) != 0 )
  {
    v3 = (std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > *)&this->m_setChar.comp;
    v4 = std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Buynode<NiNode * &>(
           (std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > *)&this->m_setChar.comp,
           (NiNode **)&pkChar);
    std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Linsert(
      v3,
      &result,
      v4,
      0);
    v2 = 1;
  }
  else
  {
    v2 = 0;
  }
  return v2;
}

//----- (00685800) --------------------------------------------------------
void __thiscall World::RemoveAllChar(World *this)
{
  World *v1; // esi@1

  v1 = this;
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&this->m_spCharScene.m_pObject->m_kChildren);
  std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Erase(
    (std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > *)&v1->m_setChar.comp,
    v1->m_setChar._Myhead->_Parent);
  v1->m_setChar._Myhead->_Parent = v1->m_setChar._Myhead;
  v1->m_setChar._Myhead->_Left = v1->m_setChar._Myhead;
  v1->m_setChar._Myhead->_Right = v1->m_setChar._Myhead;
  v1->m_setChar._Mysize = 0;
}

//----- (00685850) --------------------------------------------------------
void __thiscall World::ClearScene(World *this)
{
  World *v1; // esi@1
  NiNode *v2; // ecx@2
  PgNsTerrain *v3; // edi@4
  NiNode *v4; // edi@7
  PgNsTerrain *v5; // edi@12
  PgNsTerrain *v6; // eax@14
  PgNsTerrain *v7; // eax@15
  PgNsTerrain *v8; // [sp+10h] [bp-10h]@3
  int v9; // [sp+1Ch] [bp-4h]@14

  v1 = this;
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&this->m_spCharScene.m_pObject->m_kChildren);
  std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Erase(
    (std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > *)&v1->m_setChar.comp,
    v1->m_setChar._Myhead->_Parent);
  v1->m_setChar._Myhead->_Parent = v1->m_setChar._Myhead;
  v1->m_setChar._Myhead->_Left = v1->m_setChar._Myhead;
  v1->m_setChar._Myhead->_Right = v1->m_setChar._Myhead;
  v1->m_setChar._Mysize = 0;
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v1->m_spDropItemScene.m_pObject->m_kChildren);
  DropItemMgr::RemoveAll(&g_kDropItemMgr);
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v1->m_spMinihouseScene.m_pObject->m_kChildren);
  CMiniHouseMgr::RemoveAll((CMiniHouseMgr *)&g_kMiniHouseMgr, 0);
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v1->m_spShadowScene.m_pObject->m_kChildren);
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v1->m_spGroundObject.m_pObject->m_kChildren);
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v1->m_spGroundTerrain.m_pObject->m_kChildren);
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v1->m_spBDAni.m_pObject->m_kChildren);
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v1->m_spBDNotAni.m_pObject->m_kChildren);
  if ( v1->m_spWeatherEffectScene.m_pObject )
  {
    v2 = v1->m_spEffectScene.m_pObject;
    if ( v2 )
    {
      ((void (__stdcall *)(PgNsTerrain **, NiNode *))v2->vfptr[30].__vecDelDtor)(
        &v8,
        v1->m_spWeatherEffectScene.m_pObject);
      if ( v8 )
      {
        v3 = v8;
        if ( !InterlockedDecrement((volatile LONG *)&v8->m_kAppRootPath.m_strDefaultPath._Bx._Alias[4]) )
        {
          if ( v3 )
            (*(void (__thiscall **)(PgNsTerrain *, signed int))v3->m_kAppRootPath.m_strDefaultPath._Bx._Ptr)(v3, 1);
        }
      }
    }
    v4 = v1->m_spWeatherEffectScene.m_pObject;
    if ( v4 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      v1->m_spWeatherEffectScene.m_pObject = 0;
    }
  }
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v1->m_spSkyScene.m_pObject->m_kChildren);
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v1->m_spWaterScene.m_pObject->m_kChildren);
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v1->m_spGroundCollidee.m_pObject->m_kChildren);
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v1->m_spGroundObjectCollidee.m_pObject->m_kChildren);
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v1->m_spUseCameraCollidee.m_pObject->m_kChildren);
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v1->m_spBuildingCollidee.m_pObject->m_kChildren);
  v5 = v1->m_pkTerrain;
  if ( v5 )
  {
    PgNsTerrain::~PgNsTerrain(v1->m_pkTerrain);
    operator delete(v5);
  }
  v1->m_pkTerrain = 0;
  v6 = (PgNsTerrain *)operator new(0x1A8u);
  v8 = v6;
  v9 = 0;
  if ( v6 )
  {
    PgNsTerrain::PgNsTerrain(v6);
    v1->m_pkTerrain = v7;
  }
  else
  {
    v1->m_pkTerrain = 0;
  }
}

//----- (00685AA0) --------------------------------------------------------
void __thiscall World::UpdateBuildingScene(World *this, float fTime)
{
  World *v2; // edi@1
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v3; // ecx@1
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v4; // eax@1
  NiAVObject *v5; // esi@4
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v6; // eax@4
  int v7; // ecx@5
  int v8; // eax@5
  int v9; // eax@10
  int *v10; // eax@12
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v11; // eax@14
  World::AniObjectType *v12; // eax@16
  float v13; // edx@16
  NiBound *v14; // eax@17
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v15; // eax@18
  int v16; // eax@22
  unsigned int v17; // eax@22
  NiNode *v18; // ecx@23
  NiNode *v19; // ST08_4@26
  NiBound kBound1; // [sp+24h] [bp-74h]@5
  NiBound kBound2; // [sp+34h] [bp-64h]@5
  FindCullUpdateNode kFindCullUpdate; // [sp+44h] [bp-54h]@26
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > >,std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > > v23; // [sp+50h] [bp-48h]@18
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > >,std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > > result; // [sp+58h] [bp-40h]@18
  World::AniObjectType kAniObjectType; // [sp+60h] [bp-38h]@16
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > v26; // [sp+68h] [bp-30h]@18
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > v27; // [sp+6Ch] [bp-2Ch]@18
  std::_List_nod<NiAVObject *,std::allocator<NiAVObject *> >::_Node *v28; // [sp+70h] [bp-28h]@1
  std::_List_iterator<std::_List_val<NiAVObject *,std::allocator<NiAVObject *> > > iterCur; // [sp+74h] [bp-24h]@4
  int v30; // [sp+78h] [bp-20h]@13
  int v31; // [sp+7Ch] [bp-1Ch]@10
  std::_List_iterator<std::_List_val<NiAVObject *,std::allocator<NiAVObject *> > > iterAniObj; // [sp+80h] [bp-18h]@3
  NiAVObject *pAvObject; // [sp+84h] [bp-14h]@4
  bool a; // [sp+8Ah] [bp-Eh]@20
  bool b; // [sp+8Bh] [bp-Dh]@20
  int v36; // [sp+94h] [bp-4h]@26

  v2 = this;
  v3 = this->m_vecAniObject._Myhead;
  v4 = v3->_Next;
  v28 = v3;
  if ( v4 != v3 )
  {
    while ( 1 )
    {
      v5 = v4->_Myval;
      iterCur._Ptr = v4;
      v6 = v4->_Next;
      pAvObject = v5;
      iterAniObj._Ptr = v6;
      if ( v5 )
      {
        kBound1.m_kCenter.x = v5->m_kWorldBound.m_kCenter.x;
        kBound1.m_kCenter.y = v5->m_kWorldBound.m_kCenter.y;
        kBound1.m_kCenter.z = v5->m_kWorldBound.m_kCenter.z;
        kBound1.m_fRadius = v5->m_kWorldBound.m_fRadius;
        kBound2.m_kCenter.x = v5->m_kWorldBound.m_kCenter.x;
        kBound2.m_kCenter.y = v5->m_kWorldBound.m_kCenter.y;
        kBound2.m_kCenter.z = v5->m_kWorldBound.m_kCenter.z;
        v7 = (int)v2->m_mapBound._Myhead;
        kBound2.m_fRadius = v5->m_kWorldBound.m_fRadius;
        v8 = *(_DWORD *)(v7 + 4);
        while ( !*(_BYTE *)(v8 + 33) )
        {
          if ( *(_DWORD *)(v8 + 12) >= (unsigned int)v5 )
          {
            v7 = v8;
            v8 = *(_DWORD *)v8;
          }
          else
          {
            v8 = *(_DWORD *)(v8 + 8);
          }
        }
        v9 = (int)v2->m_mapBound._Myhead;
        v31 = v7;
        if ( v7 == v9 || (unsigned int)v5 < *(_DWORD *)(v7 + 12) )
        {
          v30 = v9;
          v10 = &v30;
        }
        else
        {
          v10 = &v31;
        }
        v11 = (std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *)*v10;
        if ( v11 != v2->m_mapBound._Myhead )
        {
          kBound2.m_kCenter.x = v11->_Myval.second.m_kCenter.x;
          kBound2.m_kCenter.y = v11->_Myval.second.m_kCenter.y;
          kBound2.m_kCenter.z = v11->_Myval.second.m_kCenter.z;
          kBound2.m_fRadius = v11->_Myval.second.m_fRadius;
        }
        v12 = std::map<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>>::operator[](
                &v2->m_mapBoundTime,
                &pAvObject);
        v13 = v12->fStartTime;
        kAniObjectType.fMaxTime = v12->fMaxTime;
        kAniObjectType.fStartTime = v13;
        if ( Timer::ms_fCurTime - v13 >= kAniObjectType.fMaxTime )
        {
          v5->m_kWorldBound = kBound2;
          NsMakeQuadScene::AddObject(&v2->kQaudSceneMakerAni, v5);
          std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Eqrange(
            (std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *)&v2->m_mapBoundTime.comp,
            &result,
            &pAvObject);
          std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::erase(
            (std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *)&v2->m_mapBoundTime.comp,
            &v27,
            (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > >)result.first._Ptr,
            (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > >)result.second._Ptr);
          std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Eqrange(
            (std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *)&v2->m_mapBound.comp,
            &v23,
            &pAvObject);
          std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::erase(
            (std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *)&v2->m_mapBound.comp,
            &v26,
            (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > >)v23.first._Ptr,
            (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > >)v23.second._Ptr);
          v15 = iterCur._Ptr;
          if ( iterCur._Ptr != v2->m_vecAniObject._Myhead )
          {
            iterCur._Ptr->_Prev->_Next = iterCur._Ptr->_Next;
            v15->_Next->_Prev = v15->_Prev;
            operator delete(v15);
            --v2->m_vecAniObject._Mysize;
          }
          ((void (__stdcall *)(bool *, _DWORD, bool *))v2->m_spBDAni.m_pObject->vfptr[19].__vecDelDtor)(&a, 0, &b);
          NiAVObject::UpdateProperties((NiAVObject *)&v2->m_spBDAni.m_pObject->vfptr);
          NiAVObject::UpdateEffects((NiAVObject *)&v2->m_spBDAni.m_pObject->vfptr);
          NiAVObject::Update((NiAVObject *)&v2->m_spBDAni.m_pObject->vfptr, 0.0, 1);
          ((void (*)(void))v2->m_spBDAni.m_pObject->vfptr[16].__vecDelDtor)();
        }
        else
        {
          NiBound::Merge(&kBound1, &kBound2);
          v14 = std::map<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>>::operator[](
                  &v2->m_mapBound,
                  &pAvObject);
          *v14 = kBound1;
        }
      }
      if ( iterAniObj._Ptr == v28 )
        break;
      v4 = iterAniObj._Ptr;
    }
  }
  v2->m_kCullUPdateData.fRadius = 2000.0;
  v16 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
  v2->m_kCullUPdateData.pos3Center.x = *(float *)v16;
  v2->m_kCullUPdateData.pos3Center.y = *(float *)(v16 + 4);
  v2->m_kCullUPdateData.pos3Center.z = *(float *)(v16 + 8);
  v17 = 0;
  if ( v2->m_kCullUPdateData.kCheckedNodes.m_uiSize )
  {
    do
    {
      v18 = v2->m_kCullUPdateData.kCheckedNodes.m_pBase[v17].m_pObject;
      if ( v18 )
        v18->m_uFlags |= 2u;
      ++v17;
    }
    while ( v17 < v2->m_kCullUPdateData.kCheckedNodes.m_uiSize );
  }
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v2->m_kCullUPdateData);
  kFindCullUpdate.m_pCallBack = 0;
  kFindCullUpdate.m_nCurLevel = -1;
  kFindCullUpdate.vfptr = (Ns_TourSceneVtbl *)&FindCullUpdateNode::`vftable';
  v19 = (NiNode *)&v2->m_spBuildingScene.m_pObject->vfptr;
  v36 = 0;
  Ns_TourScene::TourScene((Ns_TourScene *)&kFindCullUpdate.vfptr, v19, &NiNode::m_RTTI, &v2->m_kCullUPdateData);
  NiAVObject::UpdateSelected((NiAVObject *)&v2->m_spBuildingScene.m_pObject->vfptr, fTime);
}
// 9BC8AC: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *FindCullUpdateNode::`vftable')(FindCullUpdateNode *this, struct NiAVObject *fNodeRadius, void *);
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00685DA0) --------------------------------------------------------
char __thiscall World::DetachChar(World *this, Char *pkChar)
{
  World *v2; // ebx@1
  char v3; // al@2
  NiNode *v4; // esi@3
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > >,std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > > > result; // [sp+10h] [bp-14h]@4
  int v6; // [sp+20h] [bp-4h]@4

  v2 = this;
  if ( pkChar && (v4 = pkChar->m_spScene.m_pObject) != 0 )
  {
    pkChar = (Char *)pkChar->m_spScene.m_pObject;
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
    v6 = 0;
    std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Eqrange(
      (std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > *)&v2->m_setChar,
      &result,
      (NiAVObject *const *)&pkChar);
    std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::erase(
      (std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > *)&v2->m_setChar.comp,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > *)&result.second,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > >)result.first._Ptr,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > >)result.second._Ptr);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v3 = 1;
  }
  else
  {
    v3 = 0;
  }
  return v3;
}

//----- (00685E70) --------------------------------------------------------
void __thiscall World::UpdateScene(World *this, float fTime)
{
  World *v2; // ebx@1
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v3; // eax@1
  NiNode *v4; // ecx@1
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v5; // edi@1
  int v6; // esi@1
  unsigned int v7; // ecx@5
  char *v8; // esi@5
  NiAVObject *v9; // edi@9
  void (*v10)(void); // edx@9
  Char *v11; // eax@9
  Char *v12; // ebx@9
  NiFrustumPlanes *v13; // esi@11
  signed int v14; // edi@11
  World *v15; // edi@13
  NiNode *v16; // esi@13
  int v17; // eax@16
  float v18; // ecx@16
  float v19; // edx@16
  float v20; // eax@16
  unsigned int v21; // ecx@19
  char *v22; // edx@19
  double v23; // st4@19
  bool v24; // al@22
  int v25; // edi@29
  int v26; // esi@29
  int v27; // edx@31
  int v28; // eax@32
  int v29; // eax@33
  int v30; // eax@34
  unsigned int v31; // edi@36
  PartyMemberInfo *v32; // eax@37
  unsigned int v33; // ecx@37
  unsigned int v34; // edx@37
  unsigned int v35; // ecx@37
  unsigned int v36; // eax@37
  AbStateInfecteeVtbl *v37; // edx@37
  void (__thiscall *v38)(AbStateInfectee *, ABSTATEINDEX); // eax@37
  NiNode *v39; // eax@43
  float v40; // ecx@44
  float v41; // edx@44
  int v42; // eax@45
  World *v43; // esi@46
  CMagicCircleController *v44; // ecx@46
  NiPoint3 *v45; // eax@46
  CMagicCircleController *v46; // ecx@47
  double v47; // st7@47
  unsigned int v48; // edi@48
  signed int v49; // eax@51
  $2855438363EAC391235637C3A76E32E6 *v50; // ecx@51
  signed int v51; // ebx@54
  $2855438363EAC391235637C3A76E32E6 *v52; // eax@54
  NiNode *v53; // edi@57
  Char *v54; // esi@59
  int v55; // eax@64
  float v56; // ecx@64
  NiCamera *v57; // esi@64
  float v58; // edx@64
  float v59; // eax@64
  double v60; // st7@64
  double v61; // st7@64
  double v62; // st7@65
  NiNode *v63; // eax@67
  float v64; // eax@68
  NiNode *v65; // esi@70
  char *v66; // edi@70
  float v67; // eax@75
  NiNode *v68; // eax@77
  float v69; // eax@78
  int v70; // esi@80
  float v71; // eax@85
  NiAmbientLight *v72; // eax@87
  int v73; // eax@88
  int v74; // esi@88
  int v75; // eax@90
  double v76; // st7@90
  float v77; // edx@90
  double v78; // st6@90
  float v79; // edx@90
  World *v80; // eax@90
  double v81; // st7@93
  double v82; // st7@95
  World *v83; // esi@96
  Char **v84; // eax@96
  Char **v85; // edx@97
  int v86; // edi@98
  unsigned int v87; // eax@99
  unsigned int v88; // eax@100
  unsigned int v89; // ecx@102
  Char **v90; // eax@107
  Char **v91; // edx@110
  unsigned int v92; // eax@110
  unsigned int v93; // eax@111
  unsigned int v94; // ecx@113
  Char **v95; // eax@118
  unsigned int j; // eax@124
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *i; // eax@127
  int v98; // edx@136
  int v99; // eax@136
  int v100; // ecx@139
  int v101; // eax@139
  double v102; // st7@139
  double v103; // st7@139
  int v104; // eax@139
  Char **v105; // eax@139
  float v106; // ecx@140
  float v107; // ecx@140
  float v108; // ecx@140
  float v109; // ecx@140
  CharSorter v110; // [sp-3Ch] [bp-1ACh]@139
  float v111; // [sp+0h] [bp-170h]@140
  float v112; // [sp+4h] [bp-16Ch]@13
  char v113[12]; // [sp+18h] [bp-158h]@139
  int v114; // [sp+30h] [bp-140h]@139
  int v115; // [sp+34h] [bp-13Ch]@139
  int v116; // [sp+38h] [bp-138h]@139
  NiColor kNiColor; // [sp+58h] [bp-118h]@90
  NiPoint3 kCenter; // [sp+64h] [bp-10Ch]@16
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v119; // [sp+70h] [bp-100h]@1
  NiPoint3 pos3Dir; // [sp+74h] [bp-FCh]@64
  float v121; // [sp+80h] [bp-F0h]@64
  float v122; // [sp+84h] [bp-ECh]@64
  float v123; // [sp+88h] [bp-E8h]@64
  float v124; // [sp+8Ch] [bp-E4h]@46
  float v125; // [sp+90h] [bp-E0h]@46
  float v126; // [sp+94h] [bp-DCh]@44
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > iterCur; // [sp+98h] [bp-D8h]@1
  NiPoint3 pos3TargetPos; // [sp+9Ch] [bp-D4h]@64
  char v129[12]; // [sp+A8h] [bp-C8h]@64
  float v130; // [sp+B4h] [bp-BCh]@64
  float v131; // [sp+B8h] [bp-B8h]@64
  float v132; // [sp+BCh] [bp-B4h]@64
  AbStateInfectee::AbstateColor kColor; // [sp+C0h] [bp-B0h]@28
  NiAVObject *pObject; // [sp+C4h] [bp-ACh]@1
  Char *pkChar; // [sp+C8h] [bp-A8h]@9
  World *v136; // [sp+CCh] [bp-A4h]@1
  float fDistance; // [sp+D0h] [bp-A0h]@14
  float fRadiusRusult; // [sp+D4h] [bp-9Ch]@1
  double v139; // [sp+D8h] [bp-98h]@47
  signed int v140; // [sp+DCh] [bp-94h]@46
  bool bCheckMagicCircleInTypeChar; // [sp+E3h] [bp-8Dh]@19
  NiFrustumPlanes kPlanes; // [sp+E4h] [bp-8Ch]@11
  char acname[21]; // [sp+148h] [bp-28h]@37
  int v144; // [sp+16Ch] [bp-4h]@67

  v2 = this;
  v3 = this->m_setChar._Myhead;
  v4 = this->m_spCharScene.m_pObject;
  v119 = v3;
  v5 = v3->_Left;
  v136 = v2;
  fRadiusRusult = *(float *)&v5;
  iterCur._Ptr = v5;
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v4->m_kChildren);
  v6 = (int)&v2->m_kExtraLightScene[0].spScene;
  pObject = (NiAVObject *)30;
  do
  {
    if ( *(_DWORD *)v6 )
      NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)(*(_DWORD *)v6 + 176));
    v6 += 12;
    pObject = (NiAVObject *)((char *)pObject - 1);
  }
  while ( pObject );
  v7 = (unsigned int)v2->m_vecNearMob._Mylast;
  v8 = (char *)v2->m_vecNearMob._Myfirst;
  if ( ((char *)v2->m_vecNearMob._Mylast - v8) >> 2 && v8 != (char *)v7 )
  {
    pObject = 0;
    memmove(v8, (char *)v7, 0);
    *(float *)&v7 = 0.0;
    v2->m_vecNearMob._Mylast = (Char **)v8;
  }
  if ( (std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *)LODWORD(fRadiusRusult) != v119 )
  {
    while ( 1 )
    {
      v9 = v5->_Myval.m_pObject;
      v10 = (void (*)(void))g_pkMainChar->vfptr[6].Deaffect;
      pObject = v9;
      v10();
      v11 = CharMgr::GetCharByNodePtr(&g_kCharMgr, (NiNode *)v9);
      v12 = v11;
      pkChar = v11;
      if ( !v11 || !Char::IsUpdate(v11) )
        goto LABEL_121;
      v13 = &kPlanes;
      v14 = 5;
      do
      {
        NiPlane::NiPlane(v13->m_akCullingPlanes);
        v13 = (NiFrustumPlanes *)((char *)v13 + 16);
        --v14;
      }
      while ( v14 >= 0 );
      v15 = v136;
      LODWORD(v112) = (char *)v136->m_spCamera.m_pObject + 104;
      kPlanes.m_uiActivePlanes = 63;
      NiFrustumPlanes::Set(&kPlanes, &v136->m_kWorldFrustum, (NiTransform *)LODWORD(v112));
      kPlanes.m_uiActivePlanes = 63;
      fRadiusRusult = 30.0;
      v16 = v12->m_spScene.m_pObject;
      if ( v16 )
      {
        fDistance = v16->m_kWorldBound.m_fRadius;
        if ( fDistance > 30.0 )
          fRadiusRusult = fDistance;
      }
      v17 = ((int (__thiscall *)(Char *))v12->vfptr[6].Deaffect)(v12);
      v18 = *(float *)v17;
      v19 = *(float *)(v17 + 4);
      v20 = *(float *)(v17 + 8);
      kCenter.x = v18;
      kCenter.y = v19;
      kCenter.z = v20;
      if ( v16 )
      {
        fDistance = v16->m_kWorldBound.m_fRadius;
        if ( 0.0 != fDistance )
          kCenter.z = v16->m_kWorldBound.m_kCenter.z;
      }
      bCheckMagicCircleInTypeChar = 0;
      v21 = 0;
      fDistance = -fRadiusRusult;
      v22 = (char *)&kPlanes.m_akCullingPlanes[0].m_kNormal.z;
      v23 = fDistance;
      while ( 1 )
      {
        fDistance = *((float *)v22 - 2) * kCenter.x + *((float *)v22 - 1) * kCenter.y + *(float *)v22 * kCenter.z;
        fDistance = fDistance - *((float *)v22 + 1);
        if ( fDistance <= v23 )
          break;
        ++v21;
        v22 += 16;
        if ( v21 >= 6 )
        {
          v24 = bCheckMagicCircleInTypeChar;
          goto LABEL_24;
        }
      }
      v24 = 1;
LABEL_24:
      if ( v12->m_bSS_Hide || v24 )
      {
        v12->m_bCulledOld = v12->m_bCulled;
        v12->m_bCulled = 1;
      }
      else
      {
        v12->m_bCulledOld = v12->m_bCulled;
        v12->m_bCulled = 0;
      }
      ((void (__thiscall *)(Char *, AbStateInfectee::AbstateColor *))v12->vfptr->GetAbstateColor)(v12, &kColor);
      if ( !CMagicCircleController::IsEnable(v15->m_spMagicCircleController.m_pObject) )
        goto LABEL_49;
      v25 = LOWORD(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[9].dwEffectIndex[0]);
      v26 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
      if ( !(unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                             + 16))(
                               ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                               v25) )
        goto LABEL_49;
      if ( (unsigned __int16)v25 > *(_WORD *)(v26 + 200) )
        goto LABEL_49;
      v27 = *(_DWORD *)(v26 + 196);
      if ( !*(_DWORD *)(v27 + 4 * v25) )
        goto LABEL_49;
      v28 = *(_DWORD *)(v27 + 4 * v25);
      if ( !v28 )
        goto LABEL_49;
      v29 = *(_DWORD *)(v28 + 188);
      bCheckMagicCircleInTypeChar = 0;
      if ( v29 )
      {
        v30 = v29 - 1;
        if ( !v30 )
        {
          bCheckMagicCircleInTypeChar = 0;
          goto LABEL_43;
        }
        if ( v30 != 1 )
          goto LABEL_43;
        v31 = 0;
        if ( !g_kParty.m_uiTotalMember )
          goto LABEL_43;
        while ( 1 )
        {
          v32 = Party::GetMemberInfo(&g_kParty, v31);
          v33 = v32->m_kCharID.n5_code[0];
          *(_DWORD *)&acname[4] = v32->m_kCharID.n5_code[1];
          v34 = v32->m_kCharID.n5_code[3];
          *(_DWORD *)acname = v33;
          v35 = v32->m_kCharID.n5_code[2];
          v36 = v32->m_kCharID.n5_code[4];
          *(_DWORD *)&acname[12] = v34;
          v37 = v12->vfptr;
          *(_DWORD *)&acname[8] = v35;
          *(_DWORD *)&acname[16] = v36;
          v38 = v37[2].DeleteAbStateByAbstateIndex;
          acname[20] = 0;
          if ( !strcmp((const char *)((int (__thiscall *)(Char *))v38)(v12), acname) )
            break;
          if ( ++v31 >= g_kParty.m_uiTotalMember )
            goto LABEL_43;
        }
      }
      else if ( MainChar::GetTargetType((MainChar *)g_pkMainChar, v12) != 3 )
      {
        goto LABEL_43;
      }
      bCheckMagicCircleInTypeChar = 1;
LABEL_43:
      v39 = v12->m_kCharShape.m_apkLinkNode[25];
      if ( v39 )
      {
        v40 = v39->m_kWorld.m_Translate.x;
        v41 = v39->m_kWorld.m_Translate.y;
        v126 = v39->m_kWorld.m_Translate.z;
      }
      else
      {
        v42 = ((int (__thiscall *)(Char *))v12->vfptr[6].Deaffect)(v12);
        v40 = *(float *)v42;
        v41 = *(float *)(v42 + 4);
        v126 = *(float *)(v42 + 8) + 10.0;
      }
      v43 = v136;
      v124 = v40;
      v44 = v136->m_spMagicCircleController.m_pObject;
      v125 = v41;
      v45 = CMagicCircleController::GetPos(v44);
      fDistance = v45->x - v124;
      fRadiusRusult = v45->y - v125;
      *(float *)&v140 = v45->z - v126;
      if ( bCheckMagicCircleInTypeChar )
      {
        *(float *)&v140 = fDistance * fDistance + fRadiusRusult * fRadiusRusult + *(float *)&v140 * *(float *)&v140;
        *(float *)&v140 = sqrt(*(float *)&v140);
        v46 = v43->m_spMagicCircleController.m_pObject;
        v139 = *(float *)&v140;
        v47 = CMagicCircleController::GetCircleRadius(v46);
        if ( v47 * 0.5 > v139 )
        {
          v48 = -65536;
          kColor.dwRGB = -65536;
          goto LABEL_51;
        }
      }
LABEL_49:
      v48 = kColor.dwRGB;
      if ( !kColor.dwRGB )
      {
LABEL_57:
        v53 = v136->m_spCharScene.m_pObject;
        LODWORD(v112) = 1;
LABEL_58:
        ((void (__thiscall *)(NiNode *, NiAVObject *, _DWORD))v53->vfptr[29].__vecDelDtor)(v53, pObject, LODWORD(v112));
        goto LABEL_59;
      }
      v43 = v136;
LABEL_51:
      v49 = 0;
      v50 = v43->m_kExtraLightScene;
      do
      {
        if ( v48 == v50->dwRGB )
        {
          v53 = v43->m_kExtraLightScene[v49].spScene.m_pObject;
          v112 = 0.0;
          goto LABEL_58;
        }
        ++v49;
        ++v50;
      }
      while ( v49 < 30 );
      v51 = 0;
      v52 = v43->m_kExtraLightScene;
      while ( v52->dwRGB )
      {
        ++v51;
        ++v52;
        if ( v51 >= 30 )
          goto LABEL_57;
      }
      *(float *)&v63 = COERCE_FLOAT(operator new(0xE8u));
      v140 = (signed int)v63;
      v144 = 0;
      if ( *(float *)&v63 == 0.0 )
      {
        fRadiusRusult = 0.0;
      }
      else
      {
        NiNode::NiNode(v63, 0);
        fRadiusRusult = v64;
      }
      v65 = v136->m_kExtraLightScene[v51].spLightScene.m_pObject;
      v66 = (char *)v136 + 12 * v51;
      v144 = -1;
      if ( v65 != (NiNode *)LODWORD(fRadiusRusult) )
      {
        if ( v65 && !InterlockedDecrement((volatile LONG *)&v65->m_uiRefCount) && v65 )
          v65->vfptr->__vecDelDtor((NiRefObject *)v65, 1u);
        v67 = fRadiusRusult;
        *((float *)v66 + 143213) = fRadiusRusult;
        if ( v67 != 0.0 )
          InterlockedIncrement((volatile LONG *)(LODWORD(v67) + 4));
      }
      *(float *)&v68 = COERCE_FLOAT(operator new(0xE8u));
      v140 = (signed int)v68;
      v144 = 1;
      if ( *(float *)&v68 == 0.0 )
      {
        fRadiusRusult = 0.0;
      }
      else
      {
        NiNode::NiNode(v68, 0);
        fRadiusRusult = v69;
      }
      v70 = *((_DWORD *)v66 + 143212);
      v144 = -1;
      if ( v70 != LODWORD(fRadiusRusult) )
      {
        if ( v70 && !InterlockedDecrement((volatile LONG *)(v70 + 4)) && v70 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v70)(v70, 1);
        v71 = fRadiusRusult;
        *((float *)v66 + 143212) = fRadiusRusult;
        if ( v71 != 0.0 )
          InterlockedIncrement((volatile LONG *)(LODWORD(v71) + 4));
      }
      *(float *)&v72 = COERCE_FLOAT(operator new(0x10Cu));
      v140 = (signed int)v72;
      v144 = 2;
      if ( *(float *)&v72 == 0.0 )
      {
        v74 = 0;
      }
      else
      {
        NiAmbientLight::NiAmbientLight(v72);
        v74 = v73;
      }
      ++*(_DWORD *)(v74 + 188);
      *(float *)(v74 + 224) = 1.0;
      v75 = *(_DWORD *)(v74 + 188);
      v140 = (unsigned __int8)kColor.byG;
      v76 = (double)(unsigned __int8)kColor.byR / 255.0;
      LODWORD(v77) = (unsigned __int8)kColor.byB;
      *(_DWORD *)(v74 + 188) = ++v75;
      ++v75;
      v144 = -1;
      kNiColor.r = v76;
      v78 = (double)v140;
      *(float *)&v140 = v77;
      *(NiColor *)(v74 + 228) = kNiColor;
      kNiColor.g = v78 / 255.0;
      kNiColor.b = (double)v140 / 255.0;
      *(float *)(v74 + 240) = NiColor::WHITE.r;
      *(float *)(v74 + 244) = NiColor::WHITE.g;
      v79 = NiColor::WHITE.b;
      *(_DWORD *)(v74 + 188) = v75;
      *(float *)(v74 + 248) = v79;
      *(const struct NiColor *)(v74 + 252) = NiColor::BLACK;
      *(_DWORD *)(v74 + 188) = v75 + 1;
      NiDynamicEffect::AttachAffectedNode((NiDynamicEffect *)v74, *((NiNode **)v66 + 143213));
      v80 = v136;
      *(_BYTE *)(v74 + 176) = 1;
      ((void (__stdcall *)(_DWORD, _DWORD))v80->m_spAbstateCharScene.m_pObject->vfptr[29].__vecDelDtor)(
        *((_DWORD *)v66 + 143213),
        0);
      (*(void (__stdcall **)(int, _DWORD))(**((_DWORD **)v66 + 143213) + 116))(v74, 0);
      (*(void (__stdcall **)(_DWORD, _DWORD))(**((_DWORD **)v66 + 143213) + 116))(*((_DWORD *)v66 + 143212), 0);
      (*(void (__stdcall **)(NiAVObject *, _DWORD))(**((_DWORD **)v66 + 143212) + 116))(pObject, 0);
      v53 = (NiNode *)*((_DWORD *)v66 + 143212);
      *((AbStateInfectee::AbstateColor *)&v136->m_MiniHouseIndoorMode.m_ManagerMediator.m_ResTableManager.m_mapResModel.comp.0
      + 3 * v51
      + 143211) = kColor;
LABEL_59:
      v54 = pkChar;
      ((void (__thiscall *)(Char *, NiNode *))pkChar->vfptr[17].IsVisible)(pkChar, v53);
      if ( !v54->m_bCulled && MainChar::GetTargetType((MainChar *)g_pkMainChar, v54) == 3 && !Char::IsNPC(v54) )
      {
        v7 = (unsigned int)v54;
        if ( !v54->m_bWillDead && !Char::IsResource(v54) )
        {
          v55 = ((int (*)(void))v54->vfptr[6].Deaffect)();
          v56 = *(float *)v55;
          v57 = pkWorldCamera;
          v58 = *(float *)(v55 + 4);
          v59 = *(float *)(v55 + 8);
          pos3TargetPos.x = v56;
          v60 = v56 - pkWorldCamera->m_kWorld.m_Translate.x;
          pos3TargetPos.y = v58;
          pos3TargetPos.z = v59;
          pos3Dir.x = v60;
          pos3Dir.y = v58 - pkWorldCamera->m_kWorld.m_Translate.y;
          pos3Dir.z = v59 - pkWorldCamera->m_kWorld.m_Translate.z;
          v121 = pkWorldCamera->m_kWorld.m_Rotate.m_pEntry[0][0];
          v61 = pkWorldCamera->m_kWorld.m_Rotate.m_pEntry[1][0];
          v130 = v121;
          v122 = v61;
          v7 = LODWORD(pos3Dir.x);
          v123 = pkWorldCamera->m_kWorld.m_Rotate.m_pEntry[2][0];
          v131 = v122;
          v132 = v123;
          *(NiPoint3 *)v129 = pos3Dir;
          *(float *)&v140 = pos3Dir.x * pos3Dir.x + pos3Dir.y * pos3Dir.y + pos3Dir.z * pos3Dir.z;
          *(float *)&v140 = sqrt(*(float *)&v140);
          if ( *(float *)&v140 <= 0.000001 )
          {
            v62 = 0.0;
            *(float *)v129 = 0.0;
            *(float *)&v129[4] = 0.0;
          }
          else
          {
            *(float *)&v140 = 1.0 / *(float *)&v140;
            *(float *)v129 = *(float *)&v140 * pos3Dir.x;
            *(float *)&v129[4] = *(float *)&v140 * *(float *)&v129[4];
            v62 = *(float *)&v140 * *(float *)&v129[8];
          }
          *(float *)&v129[8] = v62;
          *(float *)&v140 = v121 * v121 + v122 * v122 + v123 * v123;
          *(float *)&v140 = sqrt(*(float *)&v140);
          if ( *(float *)&v140 <= 0.000001 )
          {
            v81 = 0.0;
            v130 = 0.0;
            v131 = 0.0;
          }
          else
          {
            *(float *)&v140 = 1.0 / *(float *)&v140;
            v130 = *(float *)&v140 * v121;
            v131 = *(float *)&v140 * v131;
            v81 = *(float *)&v140 * v132;
          }
          v132 = v81;
          *(float *)&v140 = v130 * *(float *)v129 + v131 * *(float *)&v129[4] + v132 * *(float *)&v129[8];
          *(float *)&v140 = acos(*(float *)&v140);
          v82 = *(float *)&v140;
          *(float *)&v140 = NI_PI * 28.0 / 180.0;
          if ( *(float *)&v140 <= v82 )
            goto LABEL_122;
          v83 = v136;
          v84 = v136->m_vecNearMob._Mylast;
          if ( &pkChar >= v84 || (v85 = v136->m_vecNearMob._Myfirst, v85 > &pkChar) )
          {
            v7 = (unsigned int)v136->m_vecNearMob._Myend;
            if ( v84 == (Char **)v7 )
            {
              v91 = v136->m_vecNearMob._Myfirst;
              v92 = v84 - v91;
              if ( v92 > 0x3FFFFFFE )
LABEL_134:
                std::_Xlength_error("vector<T> too long");
              v93 = v92 + 1;
              v7 = (signed int)(v7 - (_DWORD)v91) >> 2;
              if ( v93 > v7 )
              {
                if ( 0x3FFFFFFF - (v7 >> 1) >= v7 )
                  v94 = (v7 >> 1) + v7;
                else
                  v94 = 0;
                if ( v94 < v93 )
                  v94 = v93;
                std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
                  (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&v136->m_vecNearMob,
                  v94);
              }
            }
            v95 = v83->m_vecNearMob._Mylast;
            if ( v95 )
              *v95 = pkChar;
          }
          else
          {
            v7 = (unsigned int)v136->m_vecNearMob._Myend;
            v86 = &pkChar - v85;
            if ( v84 == (Char **)v7 )
            {
              v87 = v84 - v85;
              if ( v87 > 0x3FFFFFFE )
                goto LABEL_134;
              v88 = v87 + 1;
              v7 = (signed int)(v7 - (_DWORD)v85) >> 2;
              if ( v88 > v7 )
              {
                if ( 0x3FFFFFFF - (v7 >> 1) >= v7 )
                  v89 = (v7 >> 1) + v7;
                else
                  v89 = 0;
                if ( v89 < v88 )
                  v89 = v88;
                std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
                  (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&v136->m_vecNearMob,
                  v89);
              }
            }
            v90 = v83->m_vecNearMob._Mylast;
            if ( v90 )
            {
              v7 = (unsigned int)v83->m_vecNearMob._Myfirst[v86];
              *v90 = (Char *)v7;
            }
          }
          ++v83->m_vecNearMob._Mylast;
        }
      }
LABEL_121:
      v57 = pkWorldCamera;
LABEL_122:
      v5 = iterCur._Ptr;
      if ( !iterCur._Ptr->_Isnil )
      {
        v7 = (unsigned int)iterCur._Ptr->_Right;
        if ( *(_BYTE *)(v7 + 17) )
        {
          for ( i = iterCur._Ptr->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v5 != i->_Right )
              break;
            v5 = i;
          }
          v5 = i;
        }
        else
        {
          for ( j = *(_DWORD *)v7; !*(_BYTE *)(j + 17); j = *(_DWORD *)j )
            v7 = j;
          v5 = (std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *)v7;
        }
        iterCur._Ptr = v5;
      }
      if ( v5 == v119 )
      {
        v2 = v136;
        goto LABEL_136;
      }
    }
  }
  v57 = pkWorldCamera;
LABEL_136:
  v98 = 5;
  v99 = v2->m_vecNearMob._Mylast - v2->m_vecNearMob._Myfirst;
  if ( v99 )
  {
    if ( v99 < 5 )
      v98 = v2->m_vecNearMob._Mylast - v2->m_vecNearMob._Myfirst;
    v100 = LODWORD(v57->m_kWorld.m_Translate.y);
    v101 = LODWORD(v57->m_kWorld.m_Translate.x);
    pos3TargetPos.x = v57->m_kWorld.m_Rotate.m_pEntry[0][0];
    v102 = v57->m_kWorld.m_Rotate.m_pEntry[1][0];
    v115 = v100;
    pos3TargetPos.y = v102;
    v103 = v57->m_kWorld.m_Rotate.m_pEntry[2][0];
    v114 = v101;
    v104 = LODWORD(v57->m_kWorld.m_Translate.z);
    pos3TargetPos.z = v103;
    *(NiPoint3 *)v113 = pos3TargetPos;
    v112 = 0.0;
    v116 = v104;
    v105 = v2->m_vecNearMob._Myfirst;
    qmemcpy(&v110, v113, sizeof(v110));
    std::_Partial_sort<Char * *,Char *,CharSorter>(v105, &v105[v98], v2->m_vecNearMob._Mylast, v110);
  }
  LODWORD(v112) = 1;
  v111 = *(float *)&v7;
  NiAVObject::Update((NiAVObject *)&v2->m_spShadowScene.m_pObject->vfptr, fTime, 1);
  World::UpdateBuildingScene(v2, fTime);
  EffectMgr::Update(&g_kEffectMgr, fTime);
  LODWORD(v112) = 1;
  v111 = v106;
  NiAVObject::Update((NiAVObject *)&v2->m_spDropItemScene.m_pObject->vfptr, fTime, 1);
  LODWORD(v112) = 1;
  v111 = v107;
  NiAVObject::Update((NiAVObject *)&v2->m_spMinihouseScene.m_pObject->vfptr, fTime, 1);
  LODWORD(v112) = 1;
  v111 = v108;
  NiAVObject::Update((NiAVObject *)&v2->m_spWaterScene.m_pObject->vfptr, fTime, 1);
  LODWORD(v112) = 1;
  v111 = v109;
  NiAVObject::Update((NiAVObject *)&v2->m_spEffectScene.m_pObject->vfptr, fTime, 1);
}
// A7D11C: using guessed type const struct NiColor NiColor::WHITE;
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
// B622CC: using guessed type const float NI_PI;
// B6243C: using guessed type const struct NiColor NiColor::BLACK;

//----- (00686C70) --------------------------------------------------------
void __cdecl std::_Push_heap<Char * *,int,Char *,CharSorter>(Char **_First, int _Hole, int _Top, Char **_Val, CharSorter _Pred)
{
  int v5; // esi@1
  Char **v6; // edi@2
  Char *v7; // ecx@3
  Char *v8; // ebx@3
  int v9; // eax@5
  int v10; // eax@5
  float v11; // ST18_4@5
  float v12; // ST1C_4@5
  float v13; // ST20_4@5
  float v14; // ST0C_4@5
  float v15; // ST10_4@5
  float v16; // ST14_4@5
  Char **v17; // ST3C_4@5
  Char **_Firsta; // [sp+40h] [bp+8h]@5
  Char **_Firstb; // [sp+40h] [bp+8h]@5
  Char **_Firstc; // [sp+40h] [bp+8h]@5
  Char **_Firstd; // [sp+40h] [bp+8h]@5

  v5 = (_Hole - 1) / 2;
  if ( _Top >= _Hole )
  {
    _First[_Hole] = *_Val;
  }
  else
  {
    v6 = _First;
    while ( 1 )
    {
      v7 = v6[v5];
      v8 = *_Val;
      if ( !v7 )
      {
        v6[_Hole] = *_Val;
        return;
      }
      if ( v8 )
      {
        v9 = ((int (*)(void))v7->vfptr[6].Deaffect)();
        _Pred.pos1.x = *(float *)v9;
        _Pred.pos1.y = *(float *)(v9 + 4);
        _Pred.pos1.z = *(float *)(v9 + 8);
        v10 = ((int (__thiscall *)(Char *))v8->vfptr[6].Deaffect)(v8);
        v11 = _Pred.m_pos3Main.x - _Pred.pos1.x;
        v12 = _Pred.m_pos3Main.y - _Pred.pos1.y;
        v13 = _Pred.m_pos3Main.z - _Pred.pos1.z;
        v14 = _Pred.m_pos3Main.x - *(float *)v10;
        v15 = _Pred.m_pos3Main.y - *(float *)(v10 + 4);
        v16 = _Pred.m_pos3Main.z - *(float *)(v10 + 8);
        *(float *)&_Firsta = v12 * v12 + v11 * v11 + v13 * v13;
        *(float *)&_Firstb = sqrt(*(float *)&_Firsta);
        v17 = _Firstb;
        *(float *)&_Firstc = v14 * v14 + v15 * v15 + v16 * v16;
        *(float *)&_Firstd = sqrt(*(float *)&_Firstc);
        if ( *(float *)&v17 >= (double)*(float *)&_Firstd )
          break;
      }
      v6[_Hole] = v6[v5];
      _Hole = v5;
      v5 = (v5 - 1) / 2;
      if ( _Top >= _Hole )
      {
        v6[_Hole] = *_Val;
        return;
      }
    }
    v6[_Hole] = *_Val;
  }
}

//----- (00686DF0) --------------------------------------------------------
void __cdecl std::_Adjust_heap<Char * *,int,Char *,CharSorter>(Char **_First, int _Hole, int _Bottom, Char **_Val, CharSorter _Pred)
{
  int v5; // eax@1
  int v6; // ebx@1
  int v7; // esi@1
  Char **v8; // edi@2
  CharSorter v9; // [sp-40h] [bp-4Ch]@9

  v5 = _Bottom;
  v6 = _Hole;
  v7 = 2 * _Hole + 2;
  if ( v7 >= _Bottom )
  {
    v8 = _First;
  }
  else
  {
    do
    {
      v8 = _First;
      if ( CharSorter::operator()(&_Pred, _First[v7], _First[v7 - 1]) )
        --v7;
      _First[v6] = _First[v7];
      v6 = v7;
      v7 = 2 * v7 + 2;
    }
    while ( v7 < _Bottom );
    v5 = _Bottom;
  }
  if ( v7 == v5 )
  {
    v8[v6] = v8[v5 - 1];
    v6 = v5 - 1;
  }
  qmemcpy(&v9, &_Pred, sizeof(v9));
  std::_Push_heap<Char * *,int,Char *,CharSorter>(_First, v6, _Hole, _Val, v9);
}

//----- (00686E80) --------------------------------------------------------
void __thiscall std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(std::vector<CBaseObject *,std::allocator<CBaseObject *> > *this, unsigned int _Count)
{
  std::vector<CBaseObject *,std::allocator<CBaseObject *> > *v2; // esi@1
  char *v3; // ebx@4
  int v4; // edi@4

  v2 = this;
  if ( _Count > 0x3FFFFFFF )
    std::_Xlength_error("vector<T> too long");
  if ( this->_Myend - this->_Myfirst < _Count )
  {
    v3 = (char *)std::allocator<QUEST_DATA *>::allocate(_Count);
    memmove(v3, (char *)v2->_Myfirst, 4 * (v2->_Mylast - v2->_Myfirst));
    v4 = v2->_Mylast - v2->_Myfirst;
    if ( v2->_Myfirst )
      operator delete(v2->_Myfirst);
    v2->_Myfirst = (CBaseObject **)v3;
    v2->_Myend = (CBaseObject **)&v3[4 * _Count];
    v2->_Mylast = (CBaseObject **)&v3[4 * v4];
  }
}

//----- (00686F00) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > >,std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > > *__thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Eqrange(std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > >,std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > > *result, NiAVObject *const *_Keyval)
{
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v3; // edx@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v4; // eax@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v5; // ebx@1
  NiAVObject *v6; // edi@2
  unsigned int v7; // esi@3
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v8; // eax@11
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > >,std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > > *v9; // eax@18

  v3 = this->_Myhead;
  v4 = v3->_Parent;
  v5 = this->_Myhead;
  if ( !v4->_Isnil )
  {
    v6 = *_Keyval;
    do
    {
      v7 = (unsigned int)v4->_Myval.first;
      if ( v7 >= (unsigned int)v6 )
      {
        if ( v3->_Isnil && (unsigned int)v6 < v7 )
          v3 = v4;
        v5 = v4;
        v4 = v4->_Left;
      }
      else
      {
        v4 = v4->_Right;
      }
    }
    while ( !v4->_Isnil );
  }
  if ( v3->_Isnil )
    v8 = this->_Myhead->_Parent;
  else
    v8 = v3->_Left;
  while ( !v8->_Isnil )
  {
    if ( *_Keyval >= v8->_Myval.first )
    {
      v8 = v8->_Right;
    }
    else
    {
      v3 = v8;
      v8 = v8->_Left;
    }
  }
  v9 = result;
  result->first._Ptr = v5;
  result->second._Ptr = v3;
  return v9;
}

//----- (00686F90) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *_Newnode)
{
  unsigned int v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v6; // edi@4
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v7; // edx@4
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v8; // edx@7
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v9; // edx@9
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v10; // eax@11
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v11; // edx@12
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v12; // esi@12
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v13; // esi@13
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v14; // edx@16
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v15; // esi@18
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v16; // esi@20
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v17; // edx@24
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v18; // esi@24
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v19; // edi@24
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v20; // edi@26
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v21; // edi@28
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v22; // esi@31
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v23; // edx@34
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v24; // esi@34
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v25; // esi@36
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v26; // esi@38
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v27; // edi@44
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v28; // edi@46
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v29; // ecx@52
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > *v30; // eax@52

  v5 = this->_Mysize;
  if ( v5 >= 0xCCCCCCB )
  {
    operator delete(_Newnode);
    std::_Xlength_error("map/set<T> too long");
  }
  this->_Mysize = v5 + 1;
  v6 = _Newnode;
  _Newnode->_Parent = _Wherenode;
  v7 = this->_Myhead;
  if ( _Wherenode == v7 )
  {
    v7->_Parent = _Newnode;
    this->_Myhead->_Left = _Newnode;
    this->_Myhead->_Right = _Newnode;
  }
  else if ( _Addleft )
  {
    _Wherenode->_Left = _Newnode;
    v8 = this->_Myhead;
    if ( _Wherenode == v8->_Left )
      v8->_Left = _Newnode;
  }
  else
  {
    _Wherenode->_Right = _Newnode;
    v9 = this->_Myhead;
    if ( _Wherenode == v9->_Right )
      v9->_Right = _Newnode;
  }
  v10 = _Newnode;
  while ( !v10->_Parent->_Color )
  {
    v11 = v10->_Parent;
    v12 = v11->_Parent;
    if ( v11 == v12->_Left )
    {
      v13 = v12->_Right;
      if ( v13->_Color )
      {
        if ( v10 == v11->_Right )
        {
          v10 = v10->_Parent;
          v14 = v11->_Right;
          v10->_Right = v14->_Left;
          if ( !v14->_Left->_Isnil )
            v14->_Left->_Parent = v10;
          v14->_Parent = v10->_Parent;
          v15 = this->_Myhead;
          if ( v10 == v15->_Parent )
          {
            v15->_Parent = v14;
          }
          else
          {
            v16 = v10->_Parent;
            if ( v10 == v16->_Left )
              v16->_Left = v14;
            else
              v16->_Right = v14;
          }
          v14->_Left = v10;
          v10->_Parent = v14;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Left;
        v17->_Left = v17->_Left->_Right;
        v19 = v18->_Right;
        if ( !v19->_Isnil )
          v19->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v20 = this->_Myhead;
        if ( v17 == v20->_Parent )
        {
          v20->_Parent = v18;
          v18->_Right = v17;
        }
        else
        {
          v21 = v17->_Parent;
          if ( v17 == v21->_Right )
          {
            v21->_Right = v18;
            v18->_Right = v17;
          }
          else
          {
            v21->_Left = v18;
            v18->_Right = v17;
          }
        }
LABEL_50:
        v6 = _Newnode;
        v17->_Parent = v18;
        continue;
      }
      v11->_Color = 1;
      v13->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
    else
    {
      v22 = v12->_Left;
      if ( v22->_Color )
      {
        if ( v10 == v11->_Left )
        {
          v10 = v10->_Parent;
          v23 = v11->_Left;
          v10->_Left = v23->_Right;
          v24 = v23->_Right;
          if ( !v24->_Isnil )
            v24->_Parent = v10;
          v23->_Parent = v10->_Parent;
          v25 = this->_Myhead;
          if ( v10 == v25->_Parent )
          {
            v25->_Parent = v23;
          }
          else
          {
            v26 = v10->_Parent;
            if ( v10 == v26->_Right )
              v26->_Right = v23;
            else
              v26->_Left = v23;
          }
          v23->_Right = v10;
          v10->_Parent = v23;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Right;
        v17->_Right = v18->_Left;
        if ( !v18->_Left->_Isnil )
          v18->_Left->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v27 = this->_Myhead;
        if ( v17 == v27->_Parent )
        {
          v27->_Parent = v18;
        }
        else
        {
          v28 = v17->_Parent;
          if ( v17 == v28->_Left )
            v28->_Left = v18;
          else
            v28->_Right = v18;
        }
        v18->_Left = v17;
        goto LABEL_50;
      }
      v11->_Color = 1;
      v22->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
  }
  v29 = this->_Myhead->_Parent;
  v30 = result;
  result->_Ptr = v6;
  v29->_Color = 1;
  return v30;
}

//----- (006871C0) --------------------------------------------------------
void __cdecl std::_Make_heap<Char * *,int,Char *,CharSorter>(Char **_First, Char **_Last, CharSorter _Pred)
{
  Char **v3; // ebx@1
  int v4; // eax@1
  int i; // edx@2
  Char *v6; // ecx@4
  int v7; // eax@4
  int v8; // edi@4
  int v9; // esi@4
  int v10; // edx@7
  Char *v11; // ecx@7
  CharSorter v12; // [sp-40h] [bp-98h]@11
  CharSorter v13; // [sp+Ch] [bp-4Ch]@4
  Char *_Val; // [sp+4Ch] [bp-Ch]@4
  int _Bottom; // [sp+50h] [bp-8h]@1
  int v16; // [sp+54h] [bp-4h]@3
  int _Hole; // [sp+60h] [bp+8h]@4
  int _Lasta; // [sp+64h] [bp+Ch]@4

  v3 = _First;
  _Bottom = _Last - _First;
  v4 = _Bottom / 2;
  if ( _Bottom / 2 > 0 )
  {
    for ( i = 2 * v4 + 2; ; i = v16 )
    {
      v6 = v3[v4 - 1];
      v7 = v4 - 1;
      _Val = v6;
      qmemcpy(&v13, &_Pred, sizeof(v13));
      v8 = _Bottom;
      _Hole = v7;
      v16 = i - 2;
      _Lasta = v7;
      v9 = i - 2;
      if ( i - 2 < _Bottom )
      {
        do
        {
          if ( CharSorter::operator()(&v13, v3[v9], v3[v9 - 1]) )
            --v9;
          v10 = _Lasta;
          v11 = v3[v9];
          _Lasta = v9;
          v9 = 2 * v9 + 2;
          v3[v10] = v11;
        }
        while ( v9 < v8 );
        v7 = _Hole;
      }
      if ( v9 == v8 )
      {
        v3[_Lasta] = v3[v8 - 1];
        _Lasta = v8 - 1;
      }
      qmemcpy(&v12, &v13, sizeof(v12));
      std::_Push_heap<Char * *,int,Char *,CharSorter>(v3, _Lasta, v7, &_Val, v12);
      if ( _Hole <= 0 )
        break;
      v4 = _Hole;
    }
  }
}

//----- (006872A0) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > >,std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > > *__thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Eqrange(std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > >,std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > > *result, NiAVObject *const *_Keyval)
{
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v3; // edx@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v4; // eax@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v5; // ebx@1
  NiAVObject *v6; // edi@2
  unsigned int v7; // esi@3
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v8; // eax@11
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > >,std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > > *v9; // eax@18

  v3 = this->_Myhead;
  v4 = v3->_Parent;
  v5 = this->_Myhead;
  if ( !v4->_Isnil )
  {
    v6 = *_Keyval;
    do
    {
      v7 = (unsigned int)v4->_Myval.first;
      if ( v7 >= (unsigned int)v6 )
      {
        if ( v3->_Isnil && (unsigned int)v6 < v7 )
          v3 = v4;
        v5 = v4;
        v4 = v4->_Left;
      }
      else
      {
        v4 = v4->_Right;
      }
    }
    while ( !v4->_Isnil );
  }
  if ( v3->_Isnil )
    v8 = this->_Myhead->_Parent;
  else
    v8 = v3->_Left;
  while ( !v8->_Isnil )
  {
    if ( *_Keyval >= v8->_Myval.first )
    {
      v8 = v8->_Right;
    }
    else
    {
      v3 = v8;
      v8 = v8->_Left;
    }
  }
  v9 = result;
  result->first._Ptr = v5;
  result->second._Ptr = v3;
  return v9;
}

//----- (00687330) --------------------------------------------------------
std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > *__thiscall std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Insert(std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > *this, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *_Newnode)
{
  unsigned int v5; // eax@1
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v6; // edi@1
  NiAVObject *v7; // esi@2
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v8; // edx@8
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v9; // edx@11
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v10; // edx@13
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v11; // eax@15
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v12; // edx@16
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v13; // esi@16
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v14; // esi@17
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v15; // edx@19
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v16; // esi@21
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v17; // esi@23
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v18; // edx@27
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v19; // esi@27
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v20; // edi@27
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v21; // edi@29
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v22; // edi@31
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v23; // edx@37
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v24; // esi@37
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v25; // esi@39
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v26; // esi@41
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v27; // edi@47
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v28; // edi@49
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v29; // ecx@55
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > *v30; // eax@55

  v5 = this->_Mysize;
  v6 = _Newnode;
  if ( v5 >= 0x3FFFFFFE )
  {
    v7 = _Newnode->_Myval.m_pObject;
    if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    operator delete(_Newnode);
    std::_Xlength_error("map/set<T> too long");
  }
  this->_Mysize = v5 + 1;
  _Newnode->_Parent = _Wherenode;
  v8 = this->_Myhead;
  if ( _Wherenode == v8 )
  {
    v8->_Parent = _Newnode;
    this->_Myhead->_Left = _Newnode;
    this->_Myhead->_Right = _Newnode;
  }
  else if ( _Addleft )
  {
    _Wherenode->_Left = _Newnode;
    v9 = this->_Myhead;
    if ( _Wherenode == v9->_Left )
      v9->_Left = _Newnode;
  }
  else
  {
    _Wherenode->_Right = _Newnode;
    v10 = this->_Myhead;
    if ( _Wherenode == v10->_Right )
      v10->_Right = _Newnode;
  }
  v11 = _Newnode;
  while ( !v11->_Parent->_Color )
  {
    v12 = v11->_Parent;
    v13 = v12->_Parent;
    if ( v12 == v13->_Left )
    {
      v14 = v13->_Right;
      if ( v14->_Color )
      {
        if ( v11 == v12->_Right )
        {
          v11 = v11->_Parent;
          v15 = v12->_Right;
          v11->_Right = v15->_Left;
          if ( !v15->_Left->_Isnil )
            v15->_Left->_Parent = v11;
          v15->_Parent = v11->_Parent;
          v16 = this->_Myhead;
          if ( v11 == v16->_Parent )
          {
            v16->_Parent = v15;
          }
          else
          {
            v17 = v11->_Parent;
            if ( v11 == v17->_Left )
              v17->_Left = v15;
            else
              v17->_Right = v15;
          }
          v15->_Left = v11;
          v11->_Parent = v15;
        }
        v11->_Parent->_Color = 1;
        v11->_Parent->_Parent->_Color = 0;
        v18 = v11->_Parent->_Parent;
        v19 = v18->_Left;
        v18->_Left = v18->_Left->_Right;
        v20 = v19->_Right;
        if ( !v20->_Isnil )
          v20->_Parent = v18;
        v19->_Parent = v18->_Parent;
        v21 = this->_Myhead;
        if ( v18 == v21->_Parent )
        {
          v21->_Parent = v19;
          v19->_Right = v18;
        }
        else
        {
          v22 = v18->_Parent;
          if ( v18 == v22->_Right )
          {
            v22->_Right = v19;
            v19->_Right = v18;
          }
          else
          {
            v22->_Left = v19;
            v19->_Right = v18;
          }
        }
LABEL_53:
        v6 = _Newnode;
        v18->_Parent = v19;
        continue;
      }
    }
    else
    {
      v14 = v13->_Left;
      if ( v14->_Color )
      {
        if ( v11 == v12->_Left )
        {
          v11 = v11->_Parent;
          v23 = v12->_Left;
          v11->_Left = v23->_Right;
          v24 = v23->_Right;
          if ( !v24->_Isnil )
            v24->_Parent = v11;
          v23->_Parent = v11->_Parent;
          v25 = this->_Myhead;
          if ( v11 == v25->_Parent )
          {
            v25->_Parent = v23;
          }
          else
          {
            v26 = v11->_Parent;
            if ( v11 == v26->_Right )
              v26->_Right = v23;
            else
              v26->_Left = v23;
          }
          v23->_Right = v11;
          v11->_Parent = v23;
        }
        v11->_Parent->_Color = 1;
        v11->_Parent->_Parent->_Color = 0;
        v18 = v11->_Parent->_Parent;
        v19 = v18->_Right;
        v18->_Right = v19->_Left;
        if ( !v19->_Left->_Isnil )
          v19->_Left->_Parent = v18;
        v19->_Parent = v18->_Parent;
        v27 = this->_Myhead;
        if ( v18 == v27->_Parent )
        {
          v27->_Parent = v19;
        }
        else
        {
          v28 = v18->_Parent;
          if ( v18 == v28->_Left )
            v28->_Left = v19;
          else
            v28->_Right = v19;
        }
        v19->_Left = v18;
        goto LABEL_53;
      }
    }
    v12->_Color = 1;
    v14->_Color = 1;
    v11->_Parent->_Parent->_Color = 0;
    v11 = v11->_Parent->_Parent;
  }
  v29 = this->_Myhead->_Parent;
  v30 = result;
  result->_Ptr = v6;
  v29->_Color = 1;
  return v30;
}

//----- (00687570) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *_Node, bool _Leftish)
{
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v4; // edx@1
  std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *v5; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v6; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v7; // eax@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v8; // esi@1
  bool v9; // cl@1
  NiAVObject *v10; // edi@2
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v11; // edi@10
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v12; // edx@12
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > >,bool> *v13; // eax@12
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v14; // ecx@15
  bool _Addleft; // [sp+Ch] [bp-4h]@1

  v4 = _Node;
  v5 = this;
  v6 = this->_Myhead;
  v7 = v6->_Parent;
  v8 = v6;
  v9 = 1;
  _Addleft = 1;
  if ( !v7->_Isnil )
  {
    v10 = _Node->_Myval.first;
    do
    {
      v8 = v7;
      if ( _Leftish )
        v9 = v7->_Myval.first >= v10;
      else
        v9 = v10 < v7->_Myval.first;
      _Addleft = v9;
      if ( v9 )
        v7 = v7->_Left;
      else
        v7 = v7->_Right;
    }
    while ( !v7->_Isnil );
  }
  v11 = v8;
  *(_DWORD *)&_Leftish = v8;
  if ( v9 )
  {
    if ( v8 == v5->_Myhead->_Left )
    {
      v12 = std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Insert(
              v5,
              (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > *)&_Leftish,
              1,
              v8,
              _Node)->_Ptr;
      v13 = result;
      result->first._Ptr = v12;
      result->second = 1;
      return v13;
    }
    std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >,std::_Iterator_base0> *)&_Leftish);
    v11 = (std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *)_Leftish;
    v4 = _Node;
  }
  if ( v11->_Myval.first >= v4->_Myval.first )
  {
    operator delete(v4);
    v13 = result;
    result->first._Ptr = v11;
    result->second = 0;
  }
  else
  {
    v14 = std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Insert(
            v5,
            (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > *)&_Leftish,
            _Addleft,
            v8,
            v4)->_Ptr;
    v13 = result;
    result->first._Ptr = v14;
    result->second = 1;
  }
  return v13;
}

//----- (00687650) --------------------------------------------------------
std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Buynode<NiNode * &>(std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > *this, NiNode **_Val)
{
  std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > *v2; // edi@1
  void *v3; // eax@1
  _WORD *v4; // esi@1
  NiNode **v5; // eax@2
  NiNode *v6; // ecx@3
  std::exception pExceptionObject; // [sp+8h] [bp-Ch]@6

  v2 = this;
  v3 = operator new(0x14u);
  v4 = v3;
  if ( !v3 )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  *(_DWORD *)v3 = v2->_Myhead;
  *((_DWORD *)v3 + 1) = v2->_Myhead;
  *((_DWORD *)v3 + 2) = v2->_Myhead;
  v5 = (NiNode **)((char *)v3 + 12);
  v4[8] = 0;
  if ( v4 != (_WORD *)-12 )
  {
    v6 = *_Val;
    *v5 = *_Val;
    if ( v6 )
      InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  }
  return (std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *)v4;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (006876D0) --------------------------------------------------------
std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > >,bool> *__thiscall std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Linsert(std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > *this, std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > >,bool> *result, std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *_Node, bool _Leftish)
{
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v4; // edx@1
  std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > *v5; // edi@1
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v6; // ecx@1
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v7; // eax@1
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v8; // esi@1
  bool v9; // cl@1
  NiAVObject *v10; // ebx@2
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v11; // ebx@10
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v12; // edx@12
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > >,bool> *v13; // eax@12
  std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *v14; // ecx@15
  NiAVObject *v15; // esi@16
  bool _Addleft; // [sp+Ch] [bp-4h]@1

  v4 = _Node;
  v5 = this;
  v6 = this->_Myhead;
  v7 = v6->_Parent;
  v8 = v6;
  v9 = 1;
  _Addleft = 1;
  if ( !v7->_Isnil )
  {
    v10 = _Node->_Myval.m_pObject;
    do
    {
      v8 = v7;
      if ( _Leftish )
        v9 = v7->_Myval.m_pObject >= v10;
      else
        v9 = v10 < v7->_Myval.m_pObject;
      _Addleft = v9;
      if ( v9 )
        v7 = v7->_Left;
      else
        v7 = v7->_Right;
    }
    while ( !v7->_Isnil );
  }
  v11 = v8;
  *(_DWORD *)&_Leftish = v8;
  if ( v9 )
  {
    if ( v8 == v5->_Myhead->_Left )
    {
      v12 = std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Insert(
              v5,
              (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > *)&_Leftish,
              1,
              v8,
              _Node)->_Ptr;
      v13 = result;
      result->first._Ptr = v12;
      result->second = 1;
      return v13;
    }
    std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<Effect *,std::less<Effect *>,std::allocator<Effect *>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >,std::_Iterator_base0> *)&_Leftish);
    v11 = (std::_Tree_nod<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> >::_Node *)_Leftish;
    v4 = _Node;
  }
  if ( v11->_Myval.m_pObject >= v4->_Myval.m_pObject )
  {
    v15 = v4->_Myval.m_pObject;
    if ( v15 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) )
      {
        if ( v15 )
          v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
      }
      v4 = _Node;
    }
    operator delete(v4);
    v13 = result;
    result->first._Ptr = v11;
    result->second = 0;
  }
  else
  {
    v14 = std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Insert(
            v5,
            (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject> >,std::allocator<NiPointer<NiAVObject> >,0> > > *)&_Leftish,
            _Addleft,
            v8,
            v4)->_Ptr;
    v13 = result;
    result->first._Ptr = v14;
    result->second = 1;
  }
  return v13;
}

//----- (006877D0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > _Where, std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *_Node)
{
  std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v6; // edi@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > *v7; // eax@2
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v8; // eax@7
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v9; // ecx@20
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > >,bool> v10; // [sp+8h] [bp-8h]@20

  v4 = this;
  v5 = this->_Myhead;
  v6 = _Node;
  if ( !this->_Mysize )
  {
    std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Insert(
      this,
      result,
      1,
      v5,
      _Node);
    return result;
  }
  if ( _Where._Ptr == v5->_Left )
  {
    if ( _Node->_Myval.first < _Where._Ptr->_Myval.first )
    {
      std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Insert(
        this,
        result,
        1,
        _Where._Ptr,
        _Node);
      return result;
    }
    goto LABEL_20;
  }
  if ( _Where._Ptr == v5 )
  {
    v8 = v5->_Right;
    if ( v8->_Myval.first < _Node->_Myval.first )
    {
      std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Insert(
        this,
        result,
        0,
        v8,
        _Node);
      return result;
    }
    goto LABEL_20;
  }
  if ( _Node->_Myval.first >= _Where._Ptr->_Myval.first
    || (_Node = _Where._Ptr,
        std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >,std::_Iterator_base0> *)&_Node),
        _Node->_Myval.first >= v6->_Myval.first) )
  {
    if ( _Where._Ptr->_Myval.first >= v6->_Myval.first
      || (_Node = _Where._Ptr,
          std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>,std::less<int>,std::allocator<std::pair<int const,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT>>>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> >,std::less<int>,std::allocator<std::pair<int const ,std::vector<SHINE_ITEM_STRUCT,std::allocator<SHINE_ITEM_STRUCT> > > >,0> >,std::_Iterator_base0> *)&_Node),
          _Node != v4->_Myhead)
      && v6->_Myval.first >= _Node->_Myval.first )
    {
LABEL_20:
      v9 = std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Linsert(
             v4,
             &v10,
             v6,
             0)->first._Ptr;
      v7 = result;
      result->_Ptr = v9;
      return v7;
    }
    if ( _Where._Ptr->_Right->_Isnil )
    {
      std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Insert(
        v4,
        result,
        0,
        _Where._Ptr,
        v6);
      v7 = result;
    }
    else
    {
      std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Insert(
        v4,
        result,
        1,
        _Node,
        v6);
      v7 = result;
    }
  }
  else if ( _Node->_Right->_Isnil )
  {
    std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Insert(
      v4,
      result,
      0,
      _Node,
      v6);
    v7 = result;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Insert(
      v4,
      result,
      1,
      _Where._Ptr,
      v6);
    v7 = result;
  }
  return v7;
}

//----- (00687930) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Buynode<std::pair<NiAVObject * const,NiBound>>(std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *this, std::pair<NiAVObject * const,NiBound> *_Val)
{
  std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *result; // eax@1
  std::exception pExceptionObject; // [sp+4h] [bp-Ch]@5

  v2 = this;
  result = (std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *)operator new(0x24u);
  if ( !result )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  result->_Left = v2->_Myhead;
  result->_Parent = v2->_Myhead;
  result->_Right = v2->_Myhead;
  *(_WORD *)&result->_Color = 0;
  if ( result != (std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *)-12 )
    result->_Myval = *_Val;
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (006879B0) --------------------------------------------------------
void __cdecl std::_Sort_heap<Char * *,CharSorter>(Char **_First, Char **_Last, CharSorter _Pred)
{
  Char **v3; // ebx@1
  signed int v4; // eax@1
  Char **v5; // edx@2
  CharSorter v6; // [sp-40h] [bp-4Ch]@2
  Char **_Firsta; // [sp+14h] [bp+8h]@2

  v3 = _First;
  v4 = (char *)_Last - (char *)_First;
  if ( (signed int)(((char *)_Last - (char *)_First) & 0xFFFFFFFC) > 4 )
  {
    do
    {
      v5 = *(Char ***)((char *)v3 + v4 - 4);
      *(Char **)((char *)v3 + v4 - 4) = *v3;
      _Last = v5;
      _Firsta = (Char **)(v4 - 4);
      qmemcpy(&v6, &_Pred, sizeof(v6));
      std::_Adjust_heap<Char * *,int,Char *,CharSorter>(v3, 0, (v4 - 4) >> 2, (Char **)&_Last, v6);
      v4 = (signed int)_Firsta;
    }
    while ( (signed int)((unsigned int)_Firsta & 0xFFFFFFFC) > 4 );
  }
}

//----- (00687A20) --------------------------------------------------------
NiBound *__thiscall std::map<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>>::operator[](std::map<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> > > *this, NiAVObject *const *_Keyval)
{
  std::map<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> > > *v2; // edi@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v3; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v4; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > v5; // esi@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> >::_Node *v6; // eax@8
  NiBound *result; // eax@8
  std::pair<NiAVObject * const,NiBound> _Val; // [sp+8h] [bp-14h]@8

  v2 = this;
  v3 = this->_Myhead;
  v4 = v3->_Parent;
  v5._Ptr = v3;
  while ( !v4->_Isnil )
  {
    if ( v4->_Myval.first >= *_Keyval )
    {
      v5._Ptr = v4;
      v4 = v4->_Left;
    }
    else
    {
      v4 = v4->_Right;
    }
  }
  if ( v5._Ptr != v2->_Myhead && *_Keyval >= v5._Ptr->_Myval.first )
  {
    result = &v5._Ptr->_Myval.second;
  }
  else
  {
    _Val.first = *_Keyval;
    v6 = std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Buynode<std::pair<NiAVObject * const,NiBound>>(
           (std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *)&v2->comp,
           &_Val);
    std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound>>,0>>::_Insert(
      (std::_Tree<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > *)&v2->comp,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,NiBound,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,NiBound> >,0> > > *)&_Keyval,
      v5,
      v6);
    result = (NiBound *)(_Keyval + 4);
  }
  return result;
}

//----- (00687AB0) --------------------------------------------------------
void __cdecl std::_Partial_sort<Char * *,Char *,CharSorter>(Char **_First, Char **_Mid, Char **_Last, CharSorter _Pred)
{
  Char **v4; // ebx@1
  Char *v5; // eax@5
  CharSorter v6; // [sp-48h] [bp-5Ch]@2
  CharSorter v7; // [sp-40h] [bp-54h]@5
  int v8; // [sp-8h] [bp-1Ch]@2
  int v9; // [sp-4h] [bp-18h]@2
  int _Bottom; // [sp+Ch] [bp-8h]@1
  Char *_Val; // [sp+10h] [bp-4h]@5

  v4 = _Mid;
  _Bottom = _Mid - _First;
  if ( _Bottom > 1 )
  {
    v9 = 0;
    v8 = 0;
    qmemcpy(&v6, &_Pred, sizeof(v6));
    std::_Make_heap<Char * *,int,Char *,CharSorter>(_First, _Mid, v6);
  }
  if ( _Mid < _Last )
  {
    do
    {
      if ( CharSorter::operator()(&_Pred, *v4, *_First) )
      {
        v5 = *v4;
        *v4 = *_First;
        _Val = v5;
        qmemcpy(&v7, &_Pred, sizeof(v7));
        std::_Adjust_heap<Char * *,int,Char *,CharSorter>(_First, 0, _Bottom, &_Val, v7);
      }
      ++v4;
    }
    while ( v4 < _Last );
  }
  qmemcpy(&v7, &_Pred, sizeof(v7));
  std::_Sort_heap<Char * *,CharSorter>(_First, _Mid, v7);
}

//----- (00687B70) --------------------------------------------------------
char World::InitShadow()
{
  return 1;
}

//----- (00687B90) --------------------------------------------------------
void __thiscall World::TerminateShadow(World *this)
{
  NiTListItem<NiPointer<Shadow> > *v1; // esi@1
  char *v2; // edi@1
  NiTListItem<NiPointer<Shadow> > *v3; // ST00_4@2

  v1 = this->m_kShadowList.m_pkHead;
  v2 = (char *)&this->m_kShadowList;
  while ( v1 )
  {
    v3 = v1;
    v1 = v1->m_pkNext;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v2 + 8))(v2, v3);
  }
  *((_DWORD *)v2 + 3) = 0;
  *((_DWORD *)v2 + 1) = 0;
  *((_DWORD *)v2 + 2) = 0;
}

//----- (00687BD0) --------------------------------------------------------
void __thiscall World::ResetShadowTerrian(World *this)
{
  World *v1; // edi@1
  NiTListItem<NiPointer<Shadow> > *v2; // esi@1
  Shadow *v3; // eax@2

  v1 = this;
  v2 = this->m_kShadowList.m_pkHead;
  while ( v2 )
  {
    v3 = v2->m_element.m_pObject;
    v2 = v2->m_pkNext;
    v3->m_kDecal.m_pkHpTerrain = v1->m_pkTerrain;
    ((void (__stdcall *)(_DWORD, _DWORD))v1->m_spShadowScene.m_pObject->vfptr[29].__vecDelDtor)(
      v3->m_spNode.m_pObject,
      0);
  }
}

//----- (00687C10) --------------------------------------------------------
void __thiscall World::PrepareShadow(World *this)
{
  World *v1; // edi@1
  NiTListItem<NiPointer<Shadow> > **v2; // esi@1
  NiTListItem<NiPointer<Shadow> > *v3; // ST0C_4@2
  Shadow *v4; // eax@4
  Shadow *v5; // esi@4
  Shadow *v6; // eax@5
  NiPointer<Shadow> spShadow; // [sp+10h] [bp-14h]@4
  unsigned int i; // [sp+14h] [bp-10h]@3
  int v9; // [sp+20h] [bp-4h]@4

  v1 = this;
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&this->m_spShadowScene.m_pObject->m_kChildren);
  v2 = &v1->m_kShadowList.m_pkHead->m_pkNext;
  while ( v2 )
  {
    v3 = (NiTListItem<NiPointer<Shadow> > *)v2;
    v2 = (NiTListItem<NiPointer<Shadow> > **)*v2;
    v1->m_kShadowList.vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Shadow> > *)&v1->m_kShadowList,
      v3);
  }
  v1->m_kShadowList.m_kAllocator.m_uiCount = 0;
  v1->m_kShadowList.m_pkHead = 0;
  v1->m_kShadowList.m_pkTail = 0;
  for ( i = 0; i < v1->m_eCharShadowLevel; ++i )
  {
    v4 = (Shadow *)operator new(0x84u);
    spShadow.m_pObject = v4;
    v5 = 0;
    v9 = 0;
    if ( v4 )
    {
      Shadow::Shadow(
        v4,
        &World::ms_kDefaultDirectionalLightDir,
        v1->m_pkTerrain,
        (NiNode *)&v1->m_spBuildingScene.m_pObject->vfptr,
        5u);
      v5 = v6;
    }
    spShadow.m_pObject = v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
    v9 = 1;
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *)&v1->m_kShadowList,
      (NiPointer<NiDX92DBufferData> *)&spShadow);
    ((void (__stdcall *)(NiNode *, _DWORD))v1->m_spShadowScene.m_pObject->vfptr[29].__vecDelDtor)(
      v5->m_spNode.m_pObject,
      0);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  }
}

//----- (00687D60) --------------------------------------------------------
void __thiscall World::DrawShadow(World *this)
{
  World *v1; // ebx@1
  NsPgToonExtraData *v2; // eax@3
  bool v3; // cl@3
  int v4; // edi@3
  AbStateInfecteeVtbl *v5; // edx@3
  int v6; // eax@3
  float v7; // ecx@3
  float v8; // edx@3
  float v9; // eax@3
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Char *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Char *> >,1> >::_Node *v10; // eax@3
  float v11; // esi@5
  int v12; // eax@6
  float v13; // ecx@6
  float v14; // edx@6
  float v15; // eax@6
  double v16; // st7@6
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v17; // eax@7
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v18; // esi@7
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Char *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Char *> >,1> >::_Node *v19; // ecx@7
  bool v20; // zf@7
  unsigned int v21; // ebx@8
  void *v22; // esi@16
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Char *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Char *> >,1> >::_Node *v23; // ebx@16
  int v24; // esi@19
  Shadow *v25; // edi@20
  std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *v26; // eax@26
  unsigned int v27; // ecx@27
  int v28; // eax@33
  NiPoint3 *v29; // eax@33
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Char *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Char *> >,1> >::_Node *v30; // ecx@37
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Char *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Char *> >,1> >::_Node *v31; // eax@38
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Char *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Char *> >,1> >::_Node *i; // eax@41
  std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *v33; // edi@46
  stMINIHOUSEINFO *v34; // ebx@49
  std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *v35; // ecx@50
  std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *v36; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *j; // eax@54
  NiNode *v38; // eax@59
  float v39; // eax@59
  void *v40; // ecx@60
  Shadow *v41; // esi@60
  NiNode *v42; // eax@60
  int v43; // eax@66
  void *v44; // esi@66
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Char *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Char *> >,1> >::_Node *fHeight_; // ST08_4@67
  std::multimap<unsigned int,Char *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Char *> > > mmCharList; // [sp+18h] [bp-74h]@3
  std::exception pExceptionObject; // [sp+28h] [bp-64h]@68
  NiPoint3 kCharPos; // [sp+34h] [bp-58h]@6
  NiPoint3 kMainCharPos; // [sp+40h] [bp-4Ch]@3
  NiPoint3 kPos; // [sp+4Ch] [bp-40h]@7
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > result; // [sp+58h] [bp-34h]@67
  NsPgToonExtraData *pkToonExtraData; // [sp+5Ch] [bp-30h]@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > > iterEnd; // [sp+60h] [bp-2Ch]@14
  __int64 v54; // [sp+64h] [bp-28h]@6
  World *v55; // [sp+6Ch] [bp-20h]@1
  unsigned int uiDrawNum; // [sp+70h] [bp-1Ch]@7
  void *kShadowIter; // [sp+74h] [bp-18h]@6
  bool bOldToonFlag; // [sp+7Bh] [bp-11h]@3
  float v59; // [sp+7Ch] [bp-10h]@6
  int v60; // [sp+88h] [bp-4h]@4

  v1 = this;
  v55 = this;
  if ( this->m_kShadowList.m_kAllocator.m_uiCount < this->m_eCharShadowLevel )
    World::PrepareShadow(this);
  v2 = Engine3D::ms_spToonExtraData;
  v3 = Engine3D::ms_spToonExtraData->m_bOn;
  Engine3D::ms_spToonExtraData->m_bOn = 0;
  v4 = unk_A96B24;
  bOldToonFlag = v3;
  v5 = g_pkMainChar->vfptr;
  pkToonExtraData = v2;
  v6 = ((int (*)(void))v5[6].Deaffect)();
  v7 = *(float *)v6;
  v8 = *(float *)(v6 + 4);
  v9 = *(float *)(v6 + 8);
  kMainCharPos.x = v7;
  kMainCharPos.y = v8;
  kMainCharPos.z = v9;
  mmCharList._Mysize = 0;
  v10 = (std::_Tree_nod<std::_Tmap_traits<unsigned int,Char *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Char *> >,1> >::_Node *)operator new(0x18u);
  if ( !v10 )
  {
    result._Ptr = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&result);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  mmCharList._Myhead = v10;
  v10->_Left = v10;
  mmCharList._Myhead->_Parent = mmCharList._Myhead;
  mmCharList._Myhead->_Right = mmCharList._Myhead;
  mmCharList._Myhead->_Color = 1;
  mmCharList._Myhead->_Isnil = 1;
  v60 = 0;
  while ( v4 )
  {
    v11 = *(float *)(v4 + 8);
    v4 = *(_DWORD *)v4;
    if ( v11 != 0.0 )
    {
      v12 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)LODWORD(v11) + 196))(LODWORD(v11));
      v13 = *(float *)v12;
      v14 = *(float *)(v12 + 4);
      v15 = *(float *)(v12 + 8);
      kCharPos.x = v13;
      kCharPos.y = v14;
      kCharPos.z = v15;
      *(float *)&kShadowIter = kMainCharPos.x - v13;
      v59 = kMainCharPos.y - v14;
      *((float *)&v54 + 1) = kMainCharPos.z - v15;
      *((float *)&v54 + 1) = *(float *)&kShadowIter * *(float *)&kShadowIter
                           + v59 * v59
                           + *((float *)&v54 + 1) * *((float *)&v54 + 1);
      *((float *)&v54 + 1) = sqrt(*((float *)&v54 + 1));
      v16 = *((float *)&v54 + 1);
      if ( *((float *)&v54 + 1) <= 1000.0 )
      {
        kPos.z = v11;
        v54 = (signed __int64)v16;
        LODWORD(kPos.y) = (signed __int64)v16;
        v17 = std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(
                (std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&mmCharList,
                (std::pair<int const ,int> *)&kPos.y);
        v18 = (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)mmCharList._Myhead;
        v19 = mmCharList._Myhead->_Parent;
        v20 = v19->_Isnil == 0;
        LOBYTE(uiDrawNum) = 1;
        if ( v20 )
        {
          v21 = v17->_Myval.first;
          do
          {
            v18 = (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)v19;
            LOBYTE(uiDrawNum) = v21 < v19->_Myval.first;
            if ( (_BYTE)uiDrawNum )
              v19 = v19->_Left;
            else
              v19 = v19->_Right;
          }
          while ( !v19->_Isnil );
          v1 = v55;
        }
        std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
          (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&mmCharList,
          (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)&iterEnd,
          uiDrawNum,
          v18,
          v17);
      }
    }
  }
  uiDrawNum = 0;
  v22 = v1->m_kShadowList.m_pkHead;
  v23 = mmCharList._Myhead->_Left;
  for ( kShadowIter = v22; v23 != mmCharList._Myhead; v22 = kShadowIter )
  {
    if ( uiDrawNum >= v55->m_eCharShadowLevel || *(float *)&v22 == 0.0 )
      break;
    v24 = (int)v23->_Myval.second;
    *(_WORD *)(*(_DWORD *)(v24 + 1816) + 28) |= 1u;
    if ( !(unsigned __int8)(*(int (__thiscall **)(int))(*(_DWORD *)v24 + 516))(v24) )
    {
      v25 = (Shadow *)*((_DWORD *)kShadowIter + 2);
      kShadowIter = *(void **)kShadowIter;
      if ( v25 )
      {
        BYTE3(v59) = 0;
        Shadow::SetShaderMode(v25, (int)v23, v24, Model);
        if ( (unsigned __int8)(*(int (__thiscall **)(int))(*(_DWORD *)v24 + 644))(v24) || v55->m_eCharShadowLevel != 50 )
        {
          Shadow::SetShaderMode(v25, (int)v23, v24, 0);
          if ( (unsigned __int8)(*(int (__thiscall **)(int))(*(_DWORD *)v24 + 32))(v24) || Char::IsNPC((Char *)v24) )
          {
            v26 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *)MobViewInfoTab::GetByID(*(_WORD *)(v24 + 946));
            iterEnd._Ptr = v26;
            if ( v26 )
            {
              v27 = *(_DWORD *)(&v26[6]._Isnil + 1);
              if ( v27 )
              {
                *((float *)&v54 + 1) = (double)v27;
                NsDecal::SetDecalSize(&v25->m_kDecal, *((float *)&v54 + 1), *((float *)&v54 + 1));
                v26 = iterEnd._Ptr;
              }
              BYTE3(v59) = *(_DWORD *)(&v26[6]._Isnil + 1) == 0;
            }
          }
          else
          {
            NsDecal::SetDecalSize(&v25->m_kDecal, 50.0, 50.0);
          }
        }
        if ( Char::IsEnableSpectral((Char *)v24)
          || !(*(int (__thiscall **)(int))(*(_DWORD *)v24 + 12))(v24)
          || BYTE3(v59) )
        {
          v25->m_spNode.m_pObject->m_uFlags |= 1u;
        }
        else
        {
          v25->m_spNode.m_pObject->m_uFlags &= 0xFFFEu;
          v28 = *(_DWORD *)v24;
          iterEnd._Ptr = *(std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node **)(v24 + 704);
          v29 = (NiPoint3 *)(*(int (__thiscall **)(int))(v28 + 204))(v24);
          Shadow::Render(v25, (NiNode *)iterEnd._Ptr, v29);
        }
        ++uiDrawNum;
      }
    }
    *(_WORD *)(*(_DWORD *)(v24 + 1816) + 28) &= 0xFFFEu;
    if ( !v23->_Isnil )
    {
      v30 = v23->_Right;
      if ( v30->_Isnil )
      {
        for ( i = v23->_Parent; !i->_Isnil; i = i->_Parent )
        {
          if ( v23 != i->_Right )
            break;
          v23 = i;
        }
        v23 = i;
      }
      else
      {
        v31 = v30->_Left;
        if ( !v30->_Left->_Isnil )
        {
          do
          {
            v30 = v31;
            v31 = v31->_Left;
          }
          while ( !v31->_Isnil );
        }
        v23 = v30;
      }
    }
  }
  v33 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *)stru_B5C138._Ptr->_Left;
  iterEnd._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *)stru_B5C138._Ptr;
  if ( *(float *)&v22 != 0.0 )
  {
    while ( v33 != iterEnd._Ptr && uiDrawNum < v55->m_eCharShadowLevel )
    {
      v34 = v33->_Myval.second;
      if ( !v33->_Isnil )
      {
        v35 = v33->_Right;
        if ( v35->_Isnil )
        {
          for ( j = v33->_Parent; !j->_Isnil; j = j->_Parent )
          {
            if ( v33 != j->_Right )
              break;
            v33 = j;
          }
          v33 = j;
        }
        else
        {
          v36 = v35->_Left;
          if ( !v35->_Left->_Isnil )
          {
            do
            {
              v35 = v36;
              v36 = v36->_Left;
            }
            while ( !v36->_Isnil );
          }
          v33 = v35;
        }
      }
      if ( v34 )
      {
        v38 = v34->pkNode;
        kPos.x = v38->m_kLocal.m_Translate.x;
        kPos.y = v38->m_kLocal.m_Translate.y;
        v39 = v38->m_kLocal.m_Translate.z;
        *((float *)&v54 + 1) = kMainCharPos.x - kPos.x;
        kPos.z = v39;
        *(float *)&kShadowIter = kMainCharPos.y - kPos.y;
        v59 = kMainCharPos.z - v39;
        *((float *)&v54 + 1) = *((float *)&v54 + 1) * *((float *)&v54 + 1)
                             + *(float *)&kShadowIter * *(float *)&kShadowIter
                             + v59 * v59;
        *((float *)&v54 + 1) = sqrt(*((float *)&v54 + 1));
        if ( *((float *)&v54 + 1) <= 1000.0 )
        {
          v40 = *(void **)v22;
          v41 = (Shadow *)*((_DWORD *)v22 + 2);
          v42 = v34->pkNode;
          kShadowIter = v40;
          Shadow::Render(v41, v42, &kPos);
          v41->m_spNode.m_pObject->m_uFlags &= 0xFFFEu;
          ++uiDrawNum;
          v22 = kShadowIter;
        }
      }
      if ( *(float *)&v22 == 0.0 )
        goto LABEL_67;
    }
    if ( *(float *)&v22 != 0.0 )
    {
      while ( 1 )
      {
        v43 = *((_DWORD *)v22 + 2);
        v44 = *(void **)v22;
        *(_WORD *)(*(_DWORD *)(v43 + 116) + 28) |= 1u;
        kShadowIter = v44;
        if ( *(float *)&v44 == 0.0 )
          break;
        v22 = kShadowIter;
      }
    }
  }
LABEL_67:
  pkToonExtraData->m_bOn = bOldToonFlag;
  fHeight_ = mmCharList._Myhead->_Left;
  v60 = 1;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&mmCharList,
    &result,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >)fHeight_,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >)mmCharList._Myhead);
  operator delete(mmCharList._Myhead);
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (006882A0) --------------------------------------------------------
char World::InitSkyCtrl()
{
  return SkyCtrl::Init();
}

//----- (006882B0) --------------------------------------------------------
void __thiscall World::TerminateSkyCtrl(World *this)
{
  SkyCtrl::Terminate(&this->m_kSkyCtrl);
}

//----- (006882C0) --------------------------------------------------------
void __thiscall World::ClearSkyCtrl(World *this)
{
  SkyCtrl::Clear(&this->m_kSkyCtrl);
}

//----- (006882D0) --------------------------------------------------------
void __thiscall World::UpdateSkyCtrl(World *this, float fTime)
{
  ((void (__stdcall *)(_DWORD))this->m_kSkyCtrl.vfptr->Update)(LODWORD(fTime));
}

//----- (006882F0) --------------------------------------------------------
char *__cdecl _StrTok(const char *str, const char sep)
{
  const char *v2; // eax@1
  char v3; // cl@2
  char *v4; // eax@3
  char v5; // cl@5
  signed int v6; // esi@6
  char *v7; // edi@6
  char *result; // eax@10

  v2 = str;
  if ( str )
  {
    do
    {
      v3 = *v2;
      v2[buf - str] = *v2;
      ++v2;
    }
    while ( v3 );
    v4 = buf;
    pnow = buf;
  }
  else
  {
    v4 = pnow;
    if ( !pnow )
      return 0;
  }
  v5 = *v4;
  if ( !*v4 )
    return 0;
  v6 = 0;
  v7 = v4;
  do
  {
    ++v4;
    if ( v5 == sep )
      break;
    v5 = *v4;
    ++v6;
  }
  while ( *v4 );
  pnow = v4;
  if ( v6 <= 0 )
  {
    token[0] = 0;
    result = token;
  }
  else
  {
    strncpy(token, v7, v6);
    token[v6] = 0;
    result = token;
  }
  return result;
}

//----- (00688380) --------------------------------------------------------
char __cdecl InitAnalyzeArgument(char *key, CPData *kCpData)
{
  char result; // al@2
  char *v3; // eax@3
  char v4; // cl@4
  char *v5; // eax@6
  char *v6; // edx@7
  char *v7; // edi@7
  int v8; // esi@9
  char v9; // cl@10
  char v10; // al@12
  signed int v11; // esi@13
  char *v12; // ecx@13
  char *v13; // esi@21
  char *v14; // eax@21
  char v15; // cl@22
  char *v16; // eax@23
  char v17; // cl@24
  char *v18; // eax@25
  char v19; // cl@26
  char *v20; // eax@27
  int v21; // esi@27
  char v22; // cl@28
  signed int v23; // [sp+Ch] [bp-8008h]@6
  char str; // [sp+10h] [bp-8004h]@1
  char dst; // [sp+11h] [bp-8003h]@1
  char v26; // [sp+5010h] [bp-3004h]@6
  char v27; // [sp+5011h] [bp-3003h]@6
  char nptr; // [sp+5810h] [bp-2804h]@21
  char v29; // [sp+6010h] [bp-2004h]@21
  char v30; // [sp+6810h] [bp-1804h]@23
  char v31; // [sp+7010h] [bp-1004h]@25
  char v32; // [sp+7810h] [bp-804h]@27

  str = 0;
  memset(&dst, 0, 0x4FFFu);
  if ( !GetNMClipData(&str, 0x4FFFu, key, 1) )
    goto LABEL_32;
  EncryptString(&str, key, g_kServer.m_szCPData);
  v3 = &str;
  do
    v4 = *v3++;
  while ( v4 );
  if ( v3 == &dst )
    goto LABEL_32;
  v26 = 0;
  memset(&v27, 0, 0x2FFFu);
  v23 = 0;
  v5 = _StrTok(&str, 44);
  if ( !v5 )
    goto LABEL_32;
  v6 = pnow;
  v7 = &v26;
  while ( v23 < 6 )
  {
    v8 = v7 - v5;
    do
    {
      v9 = *v5;
      v5[v8] = *v5;
      ++v5;
    }
    while ( v9 );
    ++v23;
    v7 += 2048;
    if ( !v6 )
      break;
    v10 = *v6;
    if ( !*v6 )
      break;
    v11 = 0;
    v12 = v6;
    do
    {
      ++v6;
      if ( v10 == 44 )
        break;
      v10 = *v6;
      ++v11;
    }
    while ( *v6 );
    pnow = v6;
    if ( v11 <= 0 )
    {
      token[0] = 0;
      v5 = token;
    }
    else
    {
      strncpy(token, v12, v11);
      v6 = pnow;
      token[v11] = 0;
      v5 = token;
    }
  }
  if ( v23 >= 5 && strlen(&v26) <= 0x10 )
  {
    v13 = strcpy(kCpData->ServIP, &v26);
    *((_DWORD *)v13 + 32) = atoi(&nptr);
    v14 = &v29;
    do
    {
      v15 = *v14;
      v14[v13 - &v29 + 132] = *v14;
      ++v14;
    }
    while ( v15 );
    v16 = &v30;
    do
    {
      v17 = *v16;
      v16[v13 - &v30 + 2180] = *v16;
      ++v16;
    }
    while ( v17 );
    v18 = &v31;
    do
    {
      v19 = *v18;
      v18[v13 - &v31 + 4228] = *v18;
      ++v18;
    }
    while ( v19 );
    v20 = &v32;
    v21 = v13 - &v32;
    do
    {
      v22 = *v20;
      v20[v21 + 6276] = *v20;
      ++v20;
    }
    while ( v22 );
    result = 1;
  }
  else
  {
LABEL_32:
    result = 0;
  }
  return result;
}

//----- (006885C0) --------------------------------------------------------
char __cdecl GetAnalyzeArgument(CPData *kCpData)
{
  CPData *v1; // esi@1
  char result; // al@2
  char *v3; // eax@3
  char v4; // cl@4
  char *v5; // eax@6
  char *v6; // edx@7
  char *v7; // edi@7
  int v8; // esi@9
  char v9; // cl@10
  char v10; // al@12
  signed int v11; // esi@13
  char *v12; // ecx@13
  char *v13; // eax@22
  char v14; // cl@23
  char *v15; // eax@24
  char v16; // cl@25
  char *v17; // eax@26
  char v18; // cl@27
  char *v19; // eax@28
  int v20; // esi@28
  char v21; // cl@29
  signed int v22; // [sp+Ch] [bp-8008h]@6
  char str; // [sp+10h] [bp-8004h]@3
  char dst; // [sp+11h] [bp-8003h]@3
  char v25; // [sp+5010h] [bp-3004h]@6
  char v26; // [sp+5011h] [bp-3003h]@6
  char nptr; // [sp+5810h] [bp-2804h]@22
  char v28; // [sp+6010h] [bp-2004h]@22
  char v29; // [sp+6810h] [bp-1804h]@24
  char v30; // [sp+7010h] [bp-1004h]@26
  char v31; // [sp+7810h] [bp-804h]@28

  v1 = kCpData;
  if ( !g_kServer.m_bCP )
    goto LABEL_33;
  str = 0;
  memset(&dst, 0, 0x4FFFu);
  DecryptString(g_kServer.m_szCPData, g_kServer.m_szCPKey, &str);
  v3 = &str;
  do
    v4 = *v3++;
  while ( v4 );
  if ( v3 == &dst )
    goto LABEL_33;
  v25 = 0;
  memset(&v26, 0, 0x2FFFu);
  v22 = 0;
  v5 = _StrTok(&str, 44);
  if ( !v5 )
    goto LABEL_33;
  v6 = pnow;
  v7 = &v25;
  while ( v22 < 6 )
  {
    v8 = v7 - v5;
    do
    {
      v9 = *v5;
      v5[v8] = *v5;
      ++v5;
    }
    while ( v9 );
    ++v22;
    v7 += 2048;
    if ( !v6 || (v10 = *v6) == 0 )
    {
      v1 = kCpData;
      break;
    }
    v11 = 0;
    v12 = v6;
    do
    {
      ++v6;
      if ( v10 == 44 )
        break;
      v10 = *v6;
      ++v11;
    }
    while ( *v6 );
    pnow = v6;
    if ( v11 <= 0 )
    {
      v1 = kCpData;
      token[0] = 0;
      v5 = token;
    }
    else
    {
      strncpy(token, v12, v11);
      v6 = pnow;
      token[v11] = 0;
      v1 = kCpData;
      v5 = token;
    }
  }
  if ( v22 < 5 )
    goto LABEL_33;
  if ( strlen(&v25) <= 0x10 )
  {
    strcpy(v1->ServIP, &v25);
    v1->ServPort = atoi(&nptr);
    v13 = &v28;
    do
    {
      v14 = *v13;
      v13[(char *)v1 - &v28 + 132] = *v13;
      ++v13;
    }
    while ( v14 );
    v15 = &v29;
    do
    {
      v16 = *v15;
      v15[(char *)v1 - &v29 + 2180] = *v15;
      ++v15;
    }
    while ( v16 );
    v17 = &v30;
    do
    {
      v18 = *v17;
      v17[(char *)v1 - &v30 + 4228] = *v17;
      ++v17;
    }
    while ( v18 );
    v19 = &v31;
    v20 = (char *)v1 - &v31;
    do
    {
      v21 = *v19;
      v19[v20 + 6276] = *v19;
      ++v19;
    }
    while ( v21 );
    result = 1;
  }
  else
  {
LABEL_33:
    result = 0;
  }
  return result;
}

//----- (00688800) --------------------------------------------------------
char *__stdcall Server::GetWorldLoginErrText(unsigned int ucStatus)
{
  return 0;
}

//----- (00688810) --------------------------------------------------------
int __cdecl StatusCmp(char byStatus1, char byStatus2)
{
  char v2; // cl@1
  char v3; // al@3
  int result; // eax@6

  v2 = byStatus1;
  if ( (unsigned __int8)byStatus1 <= 5u )
    v2 = 11;
  v3 = byStatus2;
  if ( (unsigned __int8)byStatus2 <= 5u )
    v3 = 11;
  if ( (unsigned __int8)v2 <= (unsigned __int8)v3 )
    result = -((unsigned __int8)v2 < (unsigned __int8)v3);
  else
    result = 1;
  return result;
}

//----- (00688840) --------------------------------------------------------
void __thiscall Server::SetGameTime(Server *this, PROTO_NC_MISC_GAMETIME_ACK *p, float fCurTime)
{
  PROTO_NC_MISC_GAMETIME_ACK *pa; // [sp+Ch] [bp+8h]@1

  *(_WORD *)&this->m_kGameTime.hour = *(_WORD *)&p->hour;
  this->m_kGameTime.second = p->second;
  *(float *)&pa = (double)(this->m_kGameTime.second + 60 * (this->m_kGameTime.minute + 60 * this->m_kGameTime.hour));
  this->m_fGameTimeWhenSet = *(float *)&pa;
  this->m_fAppTimeWhenSet = fCurTime;
  this->m_fCurGameTime = *(float *)&pa;
}

//----- (006888B0) --------------------------------------------------------
double __thiscall Server::GetGameTime(Server *this, float fCurTime)
{
  double result; // st7@1
  double v3; // st6@1
  char v4; // al@1
  char v5; // al@1
  signed int v6; // edx@1
  float fCurGameTime; // [sp+10h] [bp+8h]@1
  float fCurGameTimea; // [sp+10h] [bp+8h]@1
  float fCurGameTimeb; // [sp+10h] [bp+8h]@1

  fCurGameTime = fCurTime - this->m_fAppTimeWhenSet + this->m_fGameTimeWhenSet;
  result = fCurGameTime;
  v3 = fCurGameTime;
  fCurGameTimea = Server::ONE_DAY_TIME * (double)(unsigned int)(signed __int64)(fCurGameTime / Server::ONE_DAY_TIME);
  fCurGameTimeb = v3 - fCurGameTimea;
  this->m_fCurGameTime = fCurGameTimeb;
  v4 = (signed int)(fCurGameTimeb / 3600.0);
  this->m_kGameTime.hour = v4;
  v5 = (signed int)((this->m_fCurGameTime - (double)(unsigned __int8)v4 * 3600.0) / 60.0);
  v6 = this->m_kGameTime.hour;
  this->m_kGameTime.minute = v5;
  this->m_kGameTime.second = (signed int)(this->m_fCurGameTime - 3600.0 * (double)v6 - 60.0
                                                                                     * (double)(unsigned __int8)v5);
  return result;
}
// A754F0: using guessed type float Server::ONE_DAY_TIME;

//----- (006889D0) --------------------------------------------------------
int __thiscall Server::GetSelectServerIndex(Server *this)
{
  return this->m_nSelectServerIndex;
}

//----- (006889E0) --------------------------------------------------------
void __thiscall Server::SetSelectServerIndex(Server *this, int val)
{
  this->m_nSelectServerIndex = val;
}

//----- (006889F0) --------------------------------------------------------
void __thiscall Server::ParsingGameAngelKey(Server *this)
{
  int v1; // ebx@1
  int v2; // edx@1
  int v3; // esi@1
  int v4; // edi@1
  char v5; // al@2
  char *v6; // eax@12
  signed int v7; // edx@12
  char v8; // cl@13

  v1 = 0;
  v2 = 0;
  v3 = 0;
  v4 = 0;
  while ( 1 )
  {
    while ( 1 )
    {
      while ( 1 )
      {
        v5 = g_kServer.m_szCPKey[v1];
        if ( v5 == 124 )
        {
          ++v2;
          goto LABEL_11;
        }
        if ( v2 )
          break;
        this->m_GAAccountInfo.acSidNo[v4++] = v5;
        ++v1;
      }
      if ( v5 != 124 )
        break;
LABEL_11:
      ++v1;
    }
    if ( v2 != 1 )
      break;
    this->m_GAAccountInfo.acKey[v3++] = v5;
    ++v1;
  }
  if ( v5 == 124 || v2 != 2 )
    goto LABEL_11;
  v6 = &g_kServer.m_szCPKey[v1];
  v7 = this->m_GAAccountInfo.acID - &g_kServer.m_szCPKey[v1];
  do
  {
    v8 = *v6;
    v6[v7] = *v6;
    ++v6;
  }
  while ( v8 );
}

//----- (00688A60) --------------------------------------------------------
char __cdecl InitAnalyzeArgument(CPData *kCpData)
{
  int v1; // edi@1
  _iobuf *v2; // eax@1
  _iobuf *v3; // esi@1
  char **v4; // ebx@4
  const char *v5; // ecx@5
  const char *v6; // esi@5
  char result; // al@15

  v1 = 1;
  v2 = fopen("c:\\Token.txt", "rt");
  v3 = v2;
  if ( v2 )
  {
    fgets(g_kServer.m_szCPKey, 65, v2);
    fclose(v3);
  }
  if ( __argc > 1 )
  {
    v4 = __argv;
    do
    {
      v5 = v4[v1];
      v6 = v4[v1 + 1];
      if ( !v5 || !*v5 )
        break;
      if ( !strcmp(v5, "-osk_token") )
      {
        if ( v6 && *v6 )
        {
          g_kServer.m_bCP = 1;
          strcpy(g_kServer.m_szCPKey, v6);
        }
        v1 += 2;
      }
      else
      {
        ++v1;
      }
    }
    while ( v1 < __argc );
  }
  if ( g_kServer.m_bCP )
    result = InitAnalyzeArgument(g_kServer.m_szCPKey, kCpData);
  else
    result = 0;
  return result;
}

//----- (00688B40) --------------------------------------------------------
void __thiscall Server::Server(Server *this)
{
  Server *v1; // esi@1
  char *v2; // edi@1
  int v3; // ST0C_4@1

  v1 = this;
  v2 = this->m_GAAccountInfo.acSidNo;
  memset(this->m_GAAccountInfo.acSidNo, 0, 0x400u);
  memset(v2 + 1024, 0, 0x400u);
  memset(v2 + 2048, 0, 0x400u);
  v1->m_kZoneAddr.m_kAddr.n4_code[3] = 0;
  v1->m_kZoneAddr.m_kAddr.n4_code[2] = 0;
  v1->m_kZoneAddr.m_kAddr.n4_code[1] = 0;
  v1->m_kZoneAddr.m_kAddr.n4_code[0] = 0;
  *(_WORD *)&v1->m_bDoubleConnected = 0;
  v1->m_pucWorldMgrNo = 0;
  v1->m_pucWorldMgrState = 0;
  v1->m_kFiestaServerList.pkServerInfo = 0;
  v1->m_kWorldMgrHandle = -1;
  v3 = (int)&v1->m_kLoginAddr;
  *(_DWORD *)(v3 + 12) = 0;
  *(_DWORD *)(v3 + 8) = 0;
  *(_DWORD *)(v3 + 4) = 0;
  *(_DWORD *)v3 = 0;
  strncpy(v1->m_kLoginAddr.m_kAddr.n4_name, "195.60.211.4", 0x10u);
  v1->m_fCurGameTime = 0.0;
  v1->m_kLoginAddr.m_iPort = 9010;
  v1->m_nSelectServerIndex = -1;
  v1->m_bGameAngelLogin = 0;
  memset(v1->m_szCPKey, 0, 0x5000u);
  v1->m_bTestServer = 0;
}

//----- (00688C20) --------------------------------------------------------
NiUnsharedGeometryGroup *__stdcall Server::GetWorldStatusText(unsigned int uiIndex)
{
  char v2; // cl@2
  NiUnsharedGeometryGroup *result; // eax@4

  if ( uiIndex < g_kServer.m_uiTotalWorld )
    v2 = g_kServer.m_pucWorldMgrState[uiIndex];
  else
    v2 = 0;
  result = 0;
  switch ( v2 )
  {
    case 0:
      result = TextData::Get(0x88B298A0);
      break;
    case 1:
      result = TextData::Get(0xDDF8F033);
      break;
    case 2:
      result = TextData::Get(0xF4053039);
      break;
    case 3:
      result = TextData::Get(0xA4E8E1EF);
      break;
    case 4:
      result = TextData::Get(0xA4ADE2F9);
      break;
    case 5:
      result = TextData::Get(0xE8F71343);
      break;
    case 6:
    case 7:
    case 8:
      result = TextData::Get(0x47A398A3u);
      break;
    case 9:
      result = TextData::Get(0x98A5DCF6);
      break;
    case 0xA:
      result = TextData::Get(0xFB4B3D31);
      break;
    default:
      return result;
  }
  return result;
}

//----- (00688D20) --------------------------------------------------------
void __thiscall Server::SetWorldMgrAddr(Server *this, PROTO_NC_USER_LOGIN_ACK *pkProto)
{
  Server *v2; // esi@1
  Name4 *v3; // eax@1
  char *v4; // edi@2
  FiestaServerList::ServerInfo *v5; // eax@3
  char *v6; // edi@4
  PROTO_NC_USER_LOGIN_ACK *v7; // ebx@5
  unsigned int v8; // eax@5
  int v9; // edi@6
  int v10; // ecx@6
  void *v11; // eax@6
  int v12; // ebx@7
  FiestaServerList::ServerInfo *v13; // eax@7
  unsigned int v14; // edi@9
  int v15; // edx@10
  int v16; // eax@10
  int v17; // edx@12
  int v18; // ecx@12

  v2 = this;
  operator delete[](this->m_pucWorldMgrNo);
  operator delete[](v2->m_pucWorldMgrState);
  v3 = v2->m_pakWorldName;
  if ( v3 )
  {
    v4 = &v3[-1].n4_name[12];
    `eh vector destructor iterator'(
      v3,
      0x10u,
      v3[-1].n4_code[3],
      (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
    operator delete[](v4);
  }
  v5 = v2->m_kFiestaServerList.pkServerInfo;
  if ( v5 )
  {
    v6 = &v5[-1].kWorldName.n4_name[14];
    `eh vector destructor iterator'(
      v5,
      0x12u,
      *(unsigned int *)((char *)&v5[-1].kWorldName.n4_code[3] + 2),
      (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
    operator delete[](v6);
  }
  v7 = pkProto;
  v8 = pkProto->numofworld;
  v2->m_uiTotalWorld = v8;
  if ( v8 )
  {
    v2->m_kFiestaServerList.m_uiTotalWorld = v8;
    v9 = v8;
    v10 = 18 * v8 | -(18 * (unsigned __int64)v8 >> 32 != 0);
    v11 = operator new[]((v10 + 4) | -__CFADD__(v10, 4));
    if ( v11 )
    {
      v12 = (int)v11 + 4;
      *(_DWORD *)v11 = v9;
      `eh vector constructor iterator'(
        (char *)v11 + 4,
        0x12u,
        v9,
        (void (__thiscall *)(void *))FiestaServerList::ServerInfo::ServerInfo,
        (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
      v13 = (FiestaServerList::ServerInfo *)v12;
      v7 = pkProto;
    }
    else
    {
      v13 = 0;
    }
    v14 = 0;
    v2->m_kFiestaServerList.pkServerInfo = v13;
    if ( v2->m_uiTotalWorld )
    {
      v15 = -10 - (_DWORD)v7;
      v16 = (int)&v7[10].numofworld;
      while ( 1 )
      {
        v17 = v16 + v15;
        *(&v2->m_kFiestaServerList.pkServerInfo->kWorldNo + v17) = *(_BYTE *)(v16 - 9);
        v18 = (int)v2->m_kFiestaServerList.pkServerInfo + v17;
        *(_DWORD *)v18 = *(_DWORD *)(v16 - 8);
        *(_DWORD *)(v18 + 4) = *(_DWORD *)(v16 - 4);
        *(_DWORD *)(v18 + 8) = *(_DWORD *)v16;
        *(_DWORD *)(v18 + 12) = *(_DWORD *)(v16 + 4);
        ++v14;
        *(&v2->m_kFiestaServerList.pkServerInfo->kWorldState + v17) = *(_BYTE *)(v16 + 8);
        v16 += 18;
        if ( v14 >= v2->m_uiTotalWorld )
          break;
        v15 = -10 - (_DWORD)v7;
      }
    }
  }
}

//----- (00688EA0) --------------------------------------------------------
void __thiscall Server::~Server(Server *this)
{
  Server *v1; // esi@1
  Name4 *v2; // eax@1
  char *v3; // edi@2
  FiestaServerList::ServerInfo *v4; // esi@3

  v1 = this;
  operator delete[](this->m_pucWorldMgrNo);
  operator delete[](v1->m_pucWorldMgrState);
  v2 = v1->m_pakWorldName;
  if ( v2 )
  {
    v3 = &v2[-1].n4_name[12];
    `eh vector destructor iterator'(
      v2,
      0x10u,
      v2[-1].n4_code[3],
      (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
    operator delete[](v3);
  }
  v4 = v1->m_kFiestaServerList.pkServerInfo;
  if ( v4 )
  {
    `eh vector destructor iterator'(
      v4,
      0x12u,
      *(unsigned int *)((char *)&v4[-1].kWorldName.n4_code[3] + 2),
      (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
    operator delete[]((char *)&v4[-1].kWorldName.n4_code[3] + 2);
  }
}

//----- (00688F10) --------------------------------------------------------
void __thiscall FiestaServerList::ServerInfo::ServerInfo(FiestaServerList::ServerInfo *this)
{
  *(_QWORD *)&this->kWorldName.n4_code[2] = 0i64;
  *(_QWORD *)&this->kWorldName.n4_name[0] = 0i64;
}

//----- (00688F20) --------------------------------------------------------
CVirtualServer::IProtoStruct *__thiscall CVirtualServer::IProtoStruct::`scalar deleting destructor'(CVirtualServer::IProtoStruct *this, unsigned int a2)
{
  CVirtualServer::IProtoStruct *v2; // esi@1

  v2 = this;
  this->vfptr = (CVirtualServer::IProtoStructVtbl *)CVirtualServer::IProtoStruct::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BC8F0: using guessed type int (*CVirtualServer::IProtoStruct::`vftable'[12])();

//----- (00688F50) --------------------------------------------------------
int __cdecl SRand(int iMax)
{
  int v1; // esi@1
  bool v2; // zf@1
  signed int v3; // eax@1

  v1 = rand() % iMax;
  v3 = rand() & 0x80000001;
  v2 = v3 == 0;
  if ( v3 < 0 )
    v2 = (((_BYTE)v3 - 1) | 0xFFFFFFFE) == -1;
  if ( !v2 )
    v1 = -v1;
  return v1;
}

//----- (00688F80) --------------------------------------------------------
void __cdecl Make_BriefInfo_LoginCharacter(PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *kProto_, char kClassID, char byGender, NiPoint3 *kPos, NiPoint3 *kDir, unsigned int uiEquipLevel)
{
  PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *v6; // esi@1
  char *v7; // ST00_4@1
  char v8; // bl@1
  char *v9; // edi@2
  unsigned __int16 v10; // ax@7
  unsigned __int16 v11; // cx@8
  unsigned __int16 v12; // dx@9
  unsigned __int16 v13; // ax@15
  char v14; // dl@15
  double v15; // st7@15
  unsigned int ui; // [sp+1Ch] [bp+8h]@1

  v6 = kProto_;
  v7 = kProto_->charid.n5_name;
  *((_DWORD *)v7 + 4) = 0;
  *((_DWORD *)v7 + 3) = 0;
  *((_DWORD *)v7 + 2) = 0;
  *((_DWORD *)v7 + 1) = 0;
  *(_DWORD *)v7 = 0;
  strncpy(kProto_->charid.n5_name, byte_9BC8E9, 0x14u);
  v8 = kClassID;
  kProto_->chrclass = kClassID;
  *(_DWORD *)&kProto_->shapedata.ride.equip.Equ_RightHand = -1;
  *(_DWORD *)&kProto_->shapedata.ride.equip.Equ_LeftHand = -1;
  *(_DWORD *)&kProto_->shapedata.ride.equip.Equ_Boot = -1;
  *(_DWORD *)&kProto_->shapedata.ride.equip.Equ_AccPant = -1;
  kProto_->shapedata.notcamp.equip.Equ_AccHeadA = -1;
  kProto_->shapedata.notcamp.equip.Equ_Mouth = -1;
  kProto_->shapedata.notcamp.equip.Equ_Minimon = -1;
  *(_DWORD *)&kProto_->shapedata.ride.equip.Equ_Eye = -1;
  *(_DWORD *)&kProto_->shapedata.ride.equip.Equ_AccRightHand = -1;
  *(_DWORD *)&kProto_->shapedata.ride.equip.Equ_CosEff = -1;
  kProto_->shapedata.notcamp.equip.Equ_MiniMon_R = -1;
  ui = 0;
  if ( ITableBase<ItemInfo,ItemInfoTab>::GetTotal() )
  {
    while ( 1 )
    {
      v9 = CDataReader::GetRecord((CDataReader *)(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 4), ui);
      if ( CharClass::GetBitbyClassType((UseClassType)*(_DWORD *)(v9 + 207)) & (1i64 << v6->chrclass) )
      {
        if ( *(_DWORD *)(v9 + 127) < uiEquipLevel )
          goto LABEL_13;
        switch ( *(_DWORD *)(v9 + 110) )
        {
          case 7:
            v12 = *(_WORD *)v9;
            v6->shapedata.booth.signboard.signboard[28] &= 0xF0u;
            v6->shapedata.notcamp.equip.Equ_Body = v12;
            break;
          case 0x13:
            v11 = *(_WORD *)v9;
            v6->shapedata.booth.signboard.signboard[28] &= 0xFu;
            v6->shapedata.notcamp.equip.Equ_Pant = v11;
            break;
          case 0x15:
            v10 = *(_WORD *)v9;
            v6->shapedata.booth.signboard.signboard[29] &= 0xF0u;
            v6->shapedata.notcamp.equip.Equ_Boot = v10;
            break;
        }
      }
      if ( v6->shapedata.notcamp.equip.Equ_Body != -1
        && v6->shapedata.notcamp.equip.Equ_Pant != -1
        && v6->shapedata.notcamp.equip.Equ_Boot != -1 )
      {
LABEL_14:
        v8 = kClassID;
        break;
      }
LABEL_13:
      if ( ++ui >= ITableBase<ItemInfo,ItemInfoTab>::GetTotal() )
        goto LABEL_14;
    }
  }
  v13 = rand();
  v14 = (char)v6->shape;
  v6->handle = v13;
  v6->mode = 1;
  v6->shape = (PROTO_AVATAR_SHAPE_INFO)(v14 & 3 | 4 * (32 * byGender | v8 & 0x1F));
  *((_WORD *)&v6->shape + 1) = 0;
  *((_BYTE *)&v6->shape + 1) = 0;
  *(_BYTE *)&v6->shape ^= (CharClass::GetRace(v8) ^ *(_BYTE *)&v6->shape) & 3;
  v6->coord.xy.x = (unsigned __int16)(signed int)kPos->x;
  v15 = kPos->y;
  v6->coord.dir = 0;
  v6->coord.xy.y = (unsigned __int16)(signed int)v15;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (00689160) --------------------------------------------------------
void __thiscall CVirtualServer::CVirtualServer(CVirtualServer *this)
{
  CVirtualServer *v1; // esi@1
  std::_List_nod<CVirtualServer::IProtoStruct *,std::allocator<CVirtualServer::IProtoStruct *> >::_Node *v2; // eax@1
  std::_List_nod<unsigned short,std::allocator<unsigned short> >::_Node *v3; // eax@2
  std::exception v4; // [sp+Ch] [bp-30h]@6
  std::exception pExceptionObject; // [sp+18h] [bp-24h]@4
  CVirtualServer *v6; // [sp+24h] [bp-18h]@1
  char *v7; // [sp+28h] [bp-14h]@6
  char *_What; // [sp+2Ch] [bp-10h]@4
  int v9; // [sp+38h] [bp-4h]@2

  v1 = this;
  v6 = this;
  this->m_listProto._Mysize = 0;
  v2 = (std::_List_nod<CVirtualServer::IProtoStruct *,std::allocator<CVirtualServer::IProtoStruct *> >::_Node *)operator new(0xCu);
  if ( !v2 )
  {
    v7 = 0;
    std::exception::exception(&v4, (const char *const *)&v7);
    v4.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&v4, &_TI2_AVbad_alloc_std__);
  }
  v1->m_listProto._Myhead = v2;
  v2->_Next = v2;
  v1->m_listProto._Myhead->_Prev = v1->m_listProto._Myhead;
  v9 = 0;
  v1->m_listCharHandle._Mysize = 0;
  v3 = (std::_List_nod<unsigned short,std::allocator<unsigned short> >::_Node *)operator new(0xCu);
  if ( !v3 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_listCharHandle._Myhead = v3;
  v3->_Next = v3;
  v1->m_listCharHandle._Myhead->_Prev = v1->m_listCharHandle._Myhead;
  v1->m_bIsUpdate = 1;
  v1->m_pkFrameWork = 0;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00689230) --------------------------------------------------------
void __thiscall CVirtualServer::~CVirtualServer(CVirtualServer *this)
{
  CVirtualServer *v1; // esi@1
  std::_List_nod<unsigned short,std::allocator<unsigned short> >::_Node *v2; // ecx@1
  std::_List_nod<unsigned short,std::allocator<unsigned short> >::_Node *v3; // eax@1
  std::_List_nod<unsigned short,std::allocator<unsigned short> >::_Node *v4; // edi@2
  std::_List_nod<CVirtualServer::IProtoStruct *,std::allocator<CVirtualServer::IProtoStruct *> >::_Node *v5; // eax@3
  std::_List_nod<CVirtualServer::IProtoStruct *,std::allocator<CVirtualServer::IProtoStruct *> >::_Node *v6; // edi@4

  v1 = this;
  v2 = this->m_listCharHandle._Myhead;
  v3 = v2->_Next;
  v2->_Next = v2;
  v1->m_listCharHandle._Myhead->_Prev = v1->m_listCharHandle._Myhead;
  v1->m_listCharHandle._Mysize = 0;
  if ( v3 != v1->m_listCharHandle._Myhead )
  {
    do
    {
      v4 = v3->_Next;
      operator delete(v3);
      v3 = v4;
    }
    while ( v4 != v1->m_listCharHandle._Myhead );
  }
  operator delete(v1->m_listCharHandle._Myhead);
  v5 = v1->m_listProto._Myhead->_Next;
  v1->m_listProto._Myhead->_Next = v1->m_listProto._Myhead;
  v1->m_listProto._Myhead->_Prev = v1->m_listProto._Myhead;
  v1->m_listProto._Mysize = 0;
  if ( v5 != v1->m_listProto._Myhead )
  {
    do
    {
      v6 = v5->_Next;
      operator delete(v5);
      v5 = v6;
    }
    while ( v6 != v1->m_listProto._Myhead );
  }
  operator delete(v1->m_listProto._Myhead);
}

//----- (006892B0) --------------------------------------------------------
void __thiscall CVirtualServer::Update(CVirtualServer *this)
{
  CVirtualServer *v1; // edi@1
  std::_List_nod<CVirtualServer::IProtoStruct *,std::allocator<CVirtualServer::IProtoStruct *> >::_Node *v2; // eax@4
  CVirtualServer::IProtoStruct *v3; // esi@7
  double v4; // st7@7
  float v5; // ST18_4@7
  IDirectMessengerVtbl *v6; // ebx@8
  int v7; // eax@8
  int v8; // eax@8
  int v9; // eax@8
  int v10; // eax@8
  std::_List_nod<CVirtualServer::IProtoStruct *,std::allocator<CVirtualServer::IProtoStruct *> >::_Node *v11; // [sp+4h] [bp-10h]@4
  std::_List_nod<CVirtualServer::IProtoStruct *,std::allocator<CVirtualServer::IProtoStruct *> >::_Node *iterCur; // [sp+8h] [bp-Ch]@7
  std::_List_iterator<std::_List_val<CVirtualServer::IProtoStruct *,std::allocator<CVirtualServer::IProtoStruct *> > > iter; // [sp+10h] [bp-4h]@7

  v1 = this;
  if ( this->m_bIsUpdate )
  {
    if ( this->m_listProto._Mysize )
    {
      if ( this->m_pkFrameWork )
      {
        v2 = this->m_listProto._Myhead->_Next;
        v11 = this->m_listProto._Myhead;
        if ( v2 != this->m_listProto._Myhead )
        {
          while ( 1 )
          {
            v3 = v2->_Myval;
            v4 = Timer::ms_fCurTime;
            v5 = Timer::ms_fCurTime;
            iterCur = v2;
            iter._Ptr = v2->_Next;
            v3->vfptr->GetRunTime(v3);
            if ( v5 > v4 )
            {
              v6 = v1->m_pkFrameWork->vfptr;
              v7 = (int)v3->vfptr->GetData(v3);
              v8 = ((int (__thiscall *)(CVirtualServer::IProtoStruct *, int))v3->vfptr->GetRevBytes)(v3, v7);
              v9 = ((int (__thiscall *)(CVirtualServer::IProtoStruct *, int))v3->vfptr->GetCommand)(v3, v8);
              v10 = ((int (__thiscall *)(CVirtualServer::IProtoStruct *, int))v3->vfptr->GetDepart)(v3, v9);
              ((void (__thiscall *)(PgFrameWork *, int))v6[2].SendDirectMessage)(v1->m_pkFrameWork, v10);
              ((void (__thiscall *)(CVirtualServer::IProtoStruct *, signed int))v3->vfptr->~IProtoStruct)(v3, 1);
              if ( iterCur != v1->m_listProto._Myhead )
              {
                iterCur->_Prev->_Next = iterCur->_Next;
                iterCur->_Next->_Prev = iterCur->_Prev;
                operator delete(iterCur);
                --v1->m_listProto._Mysize;
              }
            }
            if ( iter._Ptr == v11 )
              break;
            v2 = iter._Ptr;
          }
        }
      }
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006893A0) --------------------------------------------------------
void __thiscall CVirtualServer::AddMessage(CVirtualServer *this, float fDelayTime, CVirtualServer::IProtoStruct *pkProto)
{
  CVirtualServer::IProtoStruct *v3; // edi@1
  CVirtualServer *v4; // esi@1
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v5; // edi@1
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v6; // eax@1
  unsigned int v7; // ecx@1
  float fDelayTimea; // [sp+18h] [bp+8h]@1

  v3 = pkProto;
  v4 = this;
  ((void (__thiscall *)(CVirtualServer::IProtoStruct *, _DWORD))pkProto->vfptr->SetRecordTime)(
    pkProto,
    LODWORD(Timer::ms_fCurTime));
  fDelayTimea = Timer::ms_fCurTime + fDelayTime;
  (*(void (__thiscall **)(CVirtualServer::IProtoStruct *, _DWORD))&v3->vfptr->gap4[0])(v3, LODWORD(fDelayTimea));
  v5 = (std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *)v4->m_listProto._Myhead;
  v6 = std::_List_val<char *,std::allocator<char *>>::_Buynode(
         (std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *)v4->m_listProto._Myhead,
         (std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *)v4->m_listProto._Myhead->_Prev,
         (ItemViewDummy *const *)&pkProto);
  v7 = v4->m_listProto._Mysize;
  if ( 1073741822 - v7 < 1 )
    std::_Xlength_error("list<T> too long");
  v4->m_listProto._Mysize = v7 + 1;
  v5->_Prev = v6;
  v6->_Prev->_Next = v6;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00689420) --------------------------------------------------------
void __thiscall CVirtualServer::RegenChars(CVirtualServer *this, char kClassID, char byGender, NiPoint3 *kPos, NiPoint3 *kDir, unsigned int uiEquipLevel)
{
  CVirtualServer *v6; // esi@1
  void *v7; // eax@1
  char *v8; // ebx@2
  CVirtualServer::IProtoStruct *v9; // eax@4
  std::_List_nod<unsigned short,std::allocator<unsigned short> >::_Node *v10; // edi@7
  std::_List_nod<unsigned short,std::allocator<unsigned short> >::_Node *v11; // eax@7
  unsigned int v12; // ecx@7

  v6 = this;
  v7 = operator new(0xEFu);
  if ( v7 )
  {
    *(_DWORD *)((char *)v7 + 18) = 0;
    *(_DWORD *)((char *)v7 + 14) = 0;
    *(_DWORD *)((char *)v7 + 10) = 0;
    *(_DWORD *)((char *)v7 + 6) = 0;
    *(_DWORD *)((char *)v7 + 2) = 0;
    v8 = (char *)v7;
  }
  else
  {
    v8 = 0;
  }
  memset(v8, 0, 0xEFu);
  Make_BriefInfo_LoginCharacter(
    (PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *)v8,
    kClassID,
    byGender,
    kPos,
    kDir,
    uiEquipLevel);
  v9 = (CVirtualServer::IProtoStruct *)operator new(0x1Cu);
  if ( v9 )
  {
    v9->vfptr = (CVirtualServer::IProtoStructVtbl *)CVirtualServer::ProtoStruct<PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD>::`vftable';
    v9[3].vfptr = (CVirtualServer::IProtoStructVtbl *)7;
    v9[4].vfptr = (CVirtualServer::IProtoStructVtbl *)6;
    v9[5].vfptr = (CVirtualServer::IProtoStructVtbl *)v8;
    v9[6].vfptr = (CVirtualServer::IProtoStructVtbl *)239;
  }
  else
  {
    v9 = 0;
  }
  CVirtualServer::AddMessage(v6, 3.0, v9);
  v10 = v6->m_listCharHandle._Myhead;
  v11 = std::_List_val<unsigned short,std::allocator<unsigned short>>::_Buynode(
          v6->m_listCharHandle._Myhead,
          v10->_Prev,
          (const unsigned __int16 *)v8);
  v12 = v6->m_listCharHandle._Mysize;
  if ( 2147483646 - v12 < 1 )
    std::_Xlength_error("list<T> too long");
  v6->m_listCharHandle._Mysize = v12 + 1;
  v10->_Prev = v11;
  v11->_Prev->_Next = v11;
  v6->m_bIsUpdate = 1;
}
// 9BC928: using guessed type int (__stdcall *CVirtualServer::ProtoStruct<PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD>::`vftable'[2])(float _fRecordTime);

//----- (00689500) --------------------------------------------------------
void __thiscall CVirtualServer::Attack(CVirtualServer *this, unsigned int dwAttacker, unsigned int dwTarget)
{
  CVirtualServer *v3; // edi@1
  void *v4; // eax@1
  CVirtualServer::IProtoStructVtbl *v5; // esi@1
  CVirtualServer::IProtoStruct *v6; // eax@1

  v3 = this;
  v4 = operator new(0xDu);
  v5 = (CVirtualServer::IProtoStructVtbl *)v4;
  *(_DWORD *)v4 = 0;
  *((_DWORD *)v4 + 1) = 0;
  *((_DWORD *)v4 + 2) = 0;
  *((_BYTE *)v4 + 12) = 0;
  *((_BYTE *)v4 + 4) = 0;
  *(_WORD *)v4 = dwAttacker;
  *(_DWORD *)((char *)v4 + 5) = 0;
  *((_WORD *)v4 + 1) = dwTarget;
  *(_WORD *)((char *)v4 + 9) = 1000;
  v6 = (CVirtualServer::IProtoStruct *)operator new(0x1Cu);
  if ( v6 )
  {
    v6->vfptr = (CVirtualServer::IProtoStructVtbl *)CVirtualServer::ProtoStruct<PROTO_NC_BAT_SOMEONEBASH_HIT_CMD>::`vftable';
    v6[3].vfptr = (CVirtualServer::IProtoStructVtbl *)9;
    v6[4].vfptr = (CVirtualServer::IProtoStructVtbl *)46;
    v6[5].vfptr = v5;
    v6[6].vfptr = (CVirtualServer::IProtoStructVtbl *)13;
  }
  else
  {
    v6 = 0;
  }
  CVirtualServer::AddMessage(v3, 3.0, v6);
  v3->m_bIsUpdate = 1;
}
// 9BC960: using guessed type int (__stdcall *CVirtualServer::ProtoStruct<PROTO_NC_BAT_SOMEONEBASH_HIT_CMD>::`vftable'[2])(float _fRecordTime);

//----- (00689590) --------------------------------------------------------
void __thiscall CVirtualServer::StartAttack(CVirtualServer *this)
{
  CVirtualServer *v1; // ebx@1
  std::_List_nod<unsigned short,std::allocator<unsigned short> >::_Node *v2; // edx@1
  std::_List_nod<unsigned short,std::allocator<unsigned short> >::_Node *v3; // esi@1
  unsigned __int16 *v4; // edi@2
  unsigned int v5; // eax@3
  std::_List_nod<unsigned short,std::allocator<unsigned short> >::_Node *v6; // [sp+8h] [bp-4h]@1

  v1 = this;
  v2 = this->m_listCharHandle._Myhead;
  v3 = v2->_Next;
  v6 = this->m_listCharHandle._Myhead;
  if ( v2->_Next != v2 )
  {
    v4 = &v3->_Myval;
    do
    {
      v5 = v3->_Myval;
      if ( (_WORD)v5 != *v4 )
      {
        CVirtualServer::Attack(v1, v5, *v4);
        v2 = v6;
      }
      v3 = v3->_Next;
    }
    while ( v3 != v2 );
  }
}

//----- (006895E0) --------------------------------------------------------
void __thiscall CVirtualServer::Process(CVirtualServer *this)
{
  CVirtualServer *v1; // ebx@1
  signed int v2; // edi@1
  char v3; // al@2
  AbStateInfecteeVtbl *v4; // edx@2
  int v5; // eax@2
  float v6; // ecx@2
  float v7; // edx@2
  float v8; // eax@2
  signed int v9; // eax@2
  int v10; // esi@2
  bool v11; // zf@2
  signed int v12; // eax@2
  signed int v13; // eax@6
  int v14; // esi@6
  bool v15; // zf@6
  signed int v16; // eax@6
  NiPoint3 pos3MainCharPos; // [sp+Ch] [bp-18h]@2
  int kClassID; // [sp+18h] [bp-Ch]@2
  int byGender; // [sp+1Ch] [bp-8h]@2
  int v20; // [sp+20h] [bp-4h]@2

  v1 = this;
  v2 = 20;
  do
  {
    LOBYTE(kClassID) = 7 * (rand() % 4) + 1;
    v3 = rand() % 2;
    v4 = g_pkMainChar->vfptr;
    LOBYTE(byGender) = v3;
    v5 = ((int (*)(void))v4[6].Deaffect)();
    v6 = *(float *)v5;
    v7 = *(float *)(v5 + 4);
    v8 = *(float *)(v5 + 8);
    pos3MainCharPos.x = v6;
    pos3MainCharPos.y = v7;
    pos3MainCharPos.z = v8;
    v9 = rand();
    v10 = v9 % 350;
    v20 = v9 % 350;
    v12 = rand() & 0x80000001;
    v11 = v12 == 0;
    if ( v12 < 0 )
      v11 = (((_BYTE)v12 - 1) | 0xFFFFFFFE) == -1;
    if ( !v11 )
      v20 = -v10;
    pos3MainCharPos.x = (double)v20 + pos3MainCharPos.x;
    v13 = rand();
    v14 = v13 % 350;
    v20 = v13 % 350;
    v16 = rand() & 0x80000001;
    v15 = v16 == 0;
    if ( v16 < 0 )
      v15 = (((_BYTE)v16 - 1) | 0xFFFFFFFE) == -1;
    if ( !v15 )
      v20 = -v14;
    pos3MainCharPos.y = (double)v20 + pos3MainCharPos.y;
    rand();
    rand();
    rand();
    rand();
    CVirtualServer::RegenChars(v1, kClassID, byGender, &pos3MainCharPos, &pos3MainCharPos, 0);
    --v2;
  }
  while ( v2 );
}

//----- (006896F0) --------------------------------------------------------
void __thiscall CVirtualServer::ProtoStruct<PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD>::SetRecordTime(CVirtualServer::ProtoStruct<PROTO_NC_BAT_SOMEONEBASH_HIT_CMD> *this, float _fRecordTime)
{
  this->m_fRecordTime = _fRecordTime;
}

//----- (00689700) --------------------------------------------------------
void __thiscall CVirtualServer::ProtoStruct<PROTO_NC_BAT_SOMEONEBASH_HIT_CMD>::SetRunTime(NiMorphData::MorphTarget *this, float fWeight)
{
  this->m_fWeight = fWeight;
}

//----- (00689710) --------------------------------------------------------
void __thiscall CVirtualServer::ProtoStruct<PROTO_NC_BAT_SOMEONEBASH_HIT_CMD>::SetCommand(CVirtualServer::ProtoStruct<PROTO_NC_BAT_SOMEONEBASH_HIT_CMD> *this, int _nCommand)
{
  this->m_Command = _nCommand;
}

//----- (00689720) --------------------------------------------------------
double __thiscall CVirtualServer::ProtoStruct<PROTO_NC_BAT_SOMEONEBASH_HIT_CMD>::GetRecordTime(CVirtualServer::ProtoStruct<PROTO_NC_BAT_SOMEONEBASH_HIT_CMD> *this)
{
  return this->m_fRecordTime;
}

//----- (00689730) --------------------------------------------------------
CVirtualServer::ProtoStruct<PROTO_NC_BAT_SOMEONEBASH_HIT_CMD> *__thiscall CVirtualServer::ProtoStruct<PROTO_NC_BAT_SOMEONEBASH_HIT_CMD>::`scalar deleting destructor'(CVirtualServer::ProtoStruct<PROTO_NC_BAT_SOMEONEBASH_HIT_CMD> *this, unsigned int a2)
{
  CVirtualServer::ProtoStruct<PROTO_NC_BAT_SOMEONEBASH_HIT_CMD> *v2; // esi@1
  PROTO_NC_BAT_SOMEONEBASH_HIT_CMD *v3; // eax@1

  v2 = this;
  v3 = this->m_pvData;
  this->vfptr = (CVirtualServer::IProtoStructVtbl *)CVirtualServer::ProtoStruct<PROTO_NC_BAT_SOMEONEBASH_HIT_CMD>::`vftable';
  if ( v3 )
    operator delete(v3);
  v2->vfptr = (CVirtualServer::IProtoStructVtbl *)CVirtualServer::IProtoStruct::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BC8F0: using guessed type int (*CVirtualServer::IProtoStruct::`vftable'[12])();
// 9BC960: using guessed type int (__stdcall *CVirtualServer::ProtoStruct<PROTO_NC_BAT_SOMEONEBASH_HIT_CMD>::`vftable'[2])(float _fRecordTime);

//----- (00689770) --------------------------------------------------------
CVirtualServer::ProtoStruct<PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD> *__thiscall CVirtualServer::ProtoStruct<PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD>::`vector deleting destructor'(CVirtualServer::ProtoStruct<PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD> *this, unsigned int a2)
{
  CVirtualServer::ProtoStruct<PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD> *v2; // esi@1
  PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD *v3; // eax@1

  v2 = this;
  v3 = this->m_pvData;
  this->vfptr = (CVirtualServer::IProtoStructVtbl *)CVirtualServer::ProtoStruct<PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD>::`vftable';
  if ( v3 )
    operator delete(v3);
  v2->vfptr = (CVirtualServer::IProtoStructVtbl *)CVirtualServer::IProtoStruct::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BC8F0: using guessed type int (*CVirtualServer::IProtoStruct::`vftable'[12])();
// 9BC928: using guessed type int (__stdcall *CVirtualServer::ProtoStruct<PROTO_NC_BRIEFINFO_LOGINCHARACTER_CMD>::`vftable'[2])(float _fRecordTime);

//----- (006897B0) --------------------------------------------------------
std::_List_nod<unsigned short,std::allocator<unsigned short> >::_Node *__stdcall std::_List_val<unsigned short,std::allocator<unsigned short>>::_Buynode(std::_List_nod<unsigned short,std::allocator<unsigned short> >::_Node *_Next, std::_List_nod<unsigned short,std::allocator<unsigned short> >::_Node *_Prev, const unsigned __int16 *_Val)
{
  std::_List_nod<unsigned short,std::allocator<unsigned short> >::_Node *result; // eax@1
  std::_List_nod<unsigned short,std::allocator<unsigned short> >::_Node *v5; // edx@2
  std::exception pExceptionObject; // [sp+0h] [bp-Ch]@5

  result = (std::_List_nod<unsigned short,std::allocator<unsigned short> >::_Node *)operator new(0xCu);
  if ( !result )
  {
    _Next = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Next);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v5 = _Prev;
  result->_Next = _Next;
  result->_Prev = v5;
  if ( result != (std::_List_nod<unsigned short,std::allocator<unsigned short> >::_Node *)-8 )
    result->_Myval = *_Val;
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00689810) --------------------------------------------------------
bool __thiscall AfterImgEff::IsEnd(AfterImgEff *this, float fTime)
{
  bool result; // al@3
  float fTimea; // [sp+8h] [bp+8h]@2

  result = 0;
  if ( !this->m_pkTextKeyExtraData )
  {
    fTimea = fTime - this->m_fStartTime;
    if ( this->m_fLifeTime < (double)fTimea )
      result = 1;
  }
  return result;
}

//----- (00689840) --------------------------------------------------------
void __thiscall AfterImgEff::AfterImgEff(AfterImgEff *this, NiNode *pkNode, bool bCreateProgramEff)
{
  AfterImgEff *v3; // esi@1
  NiActorManager *v4; // edi@1

  v3 = this;
  Effect::Effect((Effect *)&this->vfptr, pkNode, bCreateProgramEff, 0);
  v3->vfptr = (NiRefObjectVtbl *)&AfterImgEff::`vftable'{for `NiRefObject'};
  v3->vfptr = (IEffectDestroyMessengerVtbl *)&AfterImgEff::`vftable'{for `IEffectDestroyMessenger'};
  CNSTimer_Interval::CNSTimer_Interval(&v3->m_kTimerInterval);
  v3->m_spActor.m_pObject = 0;
  v3->m_fExpandTime = 1.0;
  v3->m_uiShapeType = 1;
  v3->m_pkAterImgShape = 0;
  v3->m_fWidth = 0.0;
  v3->m_pkTextKeyExtraData = 0;
  v4 = v3->m_spActor.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v3->m_spActor.m_pObject = 0;
  }
  v3->m_fOldTime = 0.0;
}
// 9BCA64: using guessed type int (__stdcall *AfterImgEff::`vftable'{for `IEffectDestroyMessenger'})(int);
// 9BCA7C: using guessed type int (__thiscall *AfterImgEff::`vftable'{for `NiRefObject'})(void *p, char);

//----- (00689920) --------------------------------------------------------
void __thiscall AfterImgEff::~AfterImgEff(AfterImgEff *this)
{
  AfterImgEff *v1; // esi@1
  NiActorManager *v2; // edi@1
  AfterImgShape *v3; // ecx@6
  NiActorManager *v4; // edi@8

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&AfterImgEff::`vftable'{for `NiRefObject'};
  this->vfptr = (IEffectDestroyMessengerVtbl *)&AfterImgEff::`vftable'{for `IEffectDestroyMessenger'};
  v2 = this->m_spActor.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spActor.m_pObject = 0;
  }
  v3 = v1->m_pkAterImgShape;
  if ( v3 )
    ((void (__stdcall *)(_DWORD))v3->vfptr->__vecDelDtor)(1);
  v4 = v1->m_spActor.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  Effect::~Effect((Effect *)&v1->vfptr);
}
// 9BCA64: using guessed type int (__stdcall *AfterImgEff::`vftable'{for `IEffectDestroyMessenger'})(int);
// 9BCA7C: using guessed type int (__thiscall *AfterImgEff::`vftable'{for `NiRefObject'})(void *p, char);

//----- (006899F0) --------------------------------------------------------
void __thiscall AfterImgEff::UpdateTextKey(AfterImgEff *this, float fTime)
{
  AfterImgEff *v2; // ebx@1
  NiTextKeyExtraData *v3; // eax@1
  unsigned int v4; // ecx@3
  NiTextKey *v5; // eax@3
  int v6; // edi@3
  const char *v7; // esi@6
  double v8; // st6@6
  unsigned int uiNumKeys; // [sp+4h] [bp-Ch]@3
  NiTextKey *pkTextKey; // [sp+Ch] [bp-4h]@3
  float fPastTime; // [sp+18h] [bp+8h]@3

  v2 = this;
  v3 = this->m_pkTextKeyExtraData;
  if ( v3 )
  {
    if ( this->m_spNode.m_pObject )
    {
      v4 = v3->m_uiNumKeys;
      v5 = v3->m_pKeys;
      v6 = 0;
      fPastTime = fTime - v2->m_fStartTime;
      uiNumKeys = v4;
      pkTextKey = v5;
      if ( v4 )
      {
        while ( 1 )
        {
          v7 = v5[v6].m_pText;
          v8 = v5[v6].m_fTime;
          if ( v8 > fPastTime )
            break;
          if ( v8 >= 0.0 && v2->m_fLastUpdateTime < v8 && v8 <= fPastTime )
          {
            if ( !strncmp(v7, "on", 2u) )
            {
              v2->m_spNode.m_pObject->m_uFlags &= 0xFFFEu;
            }
            else if ( !strncmp(v7, off_9BCA5C, 3u) )
            {
              v2->m_spNode.m_pObject->m_uFlags |= 1u;
            }
          }
          if ( ++v6 >= uiNumKeys )
            break;
          v5 = pkTextKey;
        }
      }
    }
  }
}

//----- (00689AE0) --------------------------------------------------------
void __thiscall AfterImgEff::Update(AfterImgEff *this, float fTime)
{
  AfterImgEff *v2; // esi@1
  NiActorManager *v3; // eax@3
  NiAVObject *v4; // edi@3
  NiActorManager *v5; // edi@5
  NiAVObject *v6; // eax@14
  NiAVObject *v7; // eax@16
  double v8; // st7@18
  signed int v9; // eax@20
  int v10; // ebx@20
  bool v11; // zf@21
  NiAVObject *v12; // eax@26
  NiAVObject *v13; // eax@26
  AfterImgShape *v14; // ecx@26
  float v15; // ST20_4@27
  float v16; // ST24_4@27
  float v17; // ST28_4@27
  float v18; // ST14_4@27
  double v19; // st7@27
  float v20; // ST18_4@27
  double v21; // st7@27
  AfterImgShape *v22; // ecx@27
  float v23; // ST1C_4@27
  float v24; // ecx@29
  double v25; // st7@29
  float v26; // edx@29
  float v27; // eax@29
  float v28; // ecx@29
  float v29; // edx@29
  float v30; // eax@29
  float _fAccumTime; // ST08_4@31
  int v32; // eax@31
  NiPoint3 pos3Dir; // [sp+2Ch] [bp-38h]@18
  NiPoint3 kPos1; // [sp+38h] [bp-2Ch]@12
  NiPoint3 kPos0; // [sp+44h] [bp-20h]@12
  float v36; // [sp+50h] [bp-14h]@27
  float fTimeGap; // [sp+54h] [bp-10h]@18
  NiControllerSequence *pSequence; // [sp+58h] [bp-Ch]@3
  int nStep; // [sp+5Ch] [bp-8h]@18
  float fLength0; // [sp+60h] [bp-4h]@18

  v2 = this;
  AfterImgEff::UpdateTextKey(this, fTime);
  if ( !v2->m_pkAterImgShape )
  {
    Effect::Update((Effect *)&v2->vfptr, fTime);
    return;
  }
  v3 = v2->m_spActor.m_pObject;
  v4 = 0;
  pSequence = 0;
  if ( v3 )
  {
    if ( v3->m_uiRefCount == 1 )
    {
      v5 = v3;
      if ( v3 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
        {
          if ( v5 )
            v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
        }
        v2->m_spActor.m_pObject = 0;
      }
      return;
    }
    v4 = v3->m_spNIFRoot.m_pObject;
    if ( !NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
            (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v3->m_kSequenceMap,
            v3->m_eCurID,
            (NiVBSet **)&pSequence)
      || !pSequence )
    {
      return;
    }
  }
  kPos0 = NiPoint3::ZERO;
  kPos1 = NiPoint3::ZERO;
  if ( v4 )
    NiAVObject::Update(v4, fTime, 1);
  v6 = v2->m_pkAftImgDummy0;
  if ( v6 )
  {
    kPos0.x = v6->m_kWorld.m_Translate.x;
    kPos0.y = v6->m_kWorld.m_Translate.y;
    kPos0.z = v6->m_kWorld.m_Translate.z;
  }
  v7 = v2->m_pkAftImgDummy1;
  if ( v7 )
  {
    kPos1.x = v7->m_kWorld.m_Translate.x;
    kPos1.y = v7->m_kWorld.m_Translate.y;
    kPos1.z = v7->m_kWorld.m_Translate.z;
  }
  fTimeGap = fTime - v2->m_fOldTime;
  pos3Dir.x = v2->m_pos3Old0.x - kPos0.x;
  pos3Dir.y = v2->m_pos3Old0.y - kPos0.y;
  pos3Dir.z = v2->m_pos3Old0.z - kPos0.z;
  *(float *)&nStep = pos3Dir.y * pos3Dir.y + pos3Dir.x * pos3Dir.x + pos3Dir.z * pos3Dir.z;
  *(float *)&nStep = sqrt(*(float *)&nStep);
  fLength0 = *(float *)&nStep;
  pos3Dir.x = v2->m_pos3Old1.x - kPos1.x;
  pos3Dir.y = v2->m_pos3Old1.y - kPos1.y;
  pos3Dir.z = v2->m_pos3Old1.z - kPos1.z;
  *(float *)&nStep = pos3Dir.y * pos3Dir.y + pos3Dir.x * pos3Dir.x + pos3Dir.z * pos3Dir.z;
  *(float *)&nStep = sqrt(*(float *)&nStep);
  v8 = fLength0;
  if ( *(float *)&nStep >= (double)fLength0 )
    v8 = *(float *)&nStep;
  *(float *)&nStep = v8;
  v9 = (signed int)(*(float *)&nStep / -3.0);
  v10 = 1 - v9;
  nStep = 1 - v9;
  fTimeGap = fTimeGap / (double)(1 - v9);
  fLength0 = v2->m_fOldTime;
  pos3Dir.x = kPos0.x - v2->m_pos3Old0.x;
  pos3Dir.y = kPos0.y - v2->m_pos3Old0.y;
  pos3Dir.z = kPos0.z - v2->m_pos3Old0.z;
  NiPoint3::Unitize(&pos3Dir);
  *(float *)&nStep = 0.0;
  if ( v10 > 0 )
  {
    do
    {
      v11 = v2->m_uiShapeType == 0;
      fLength0 = fLength0 + fTimeGap;
      if ( v11 )
      {
        if ( !pSequence || pSequence->m_fStartTime <= (double)fLength0 )
        {
          if ( v4 )
            NiAVObject::Update(v4, fLength0, 1);
          v12 = v2->m_pkAftImgDummy0;
          kPos0.x = v12->m_kWorld.m_Translate.x;
          kPos0.y = v12->m_kWorld.m_Translate.y;
          kPos0.z = v12->m_kWorld.m_Translate.z;
          v13 = v2->m_pkAftImgDummy1;
          kPos1.x = v13->m_kWorld.m_Translate.x;
          v14 = v2->m_pkAterImgShape;
          kPos1.y = v13->m_kWorld.m_Translate.y;
          kPos1.z = v13->m_kWorld.m_Translate.z;
          ((void (__stdcall *)(NiPoint3 *, NiPoint3 *))v14->vfptr->SetVertex)(&kPos0, &kPos1);
        }
      }
      else
      {
        v36 = (double)nStep * 3.0;
        v15 = pos3Dir.x * v36;
        v16 = pos3Dir.y * v36;
        v17 = v36 * pos3Dir.z;
        v18 = v15 + v2->m_pos3Old0.x;
        v19 = v2->m_pos3Old0.y;
        kPos0.x = v18;
        v20 = v19 + v16;
        v21 = v2->m_pos3Old0.z;
        kPos0.y = v20;
        v22 = v2->m_pkAterImgShape;
        v23 = v21 + v17;
        kPos0.z = v23;
        ((void (__stdcall *)(NiPoint3 *, NiPoint3 *))v22->vfptr->SetVertex)(&kPos0, &kPos0);
      }
      ++nStep;
    }
    while ( nStep < v10 );
  }
  v24 = kPos0.x;
  v25 = fTime;
  v26 = kPos0.y;
  v2->m_fOldTime = fTime;
  v27 = kPos0.z;
  v2->m_pos3Old0.x = v24;
  v28 = kPos1.x;
  v2->m_pos3Old0.y = v26;
  v29 = kPos1.y;
  v2->m_pos3Old0.z = v27;
  v30 = kPos1.z;
  v2->m_pos3Old1.x = v28;
  v2->m_pos3Old1.y = v29;
  v2->m_pos3Old1.z = v30;
  if ( v4 )
  {
    NiAVObject::Update(v4, fTime, 1);
    v25 = fTime;
  }
  _fAccumTime = v25;
  v32 = CNSTimer_Interval::IsRun_GetCount(&v2->m_kTimerInterval, _fAccumTime);
  if ( v32 )
    AfterImgShape::RemoveVertex(v2->m_pkAterImgShape, v32);
  ((void (__cdecl *)(_DWORD))v2->m_pkAterImgShape->vfptr->Update)(LODWORD(fTime));
  Effect::Update((Effect *)&v2->vfptr, fTime);
}
// 689AE0: could not find valid save-restore pair for edi

//----- (00689F10) --------------------------------------------------------
void __thiscall AfterImgEff::Start(AfterImgEff *this, float fTime)
{
  AfterImgEff *v2; // esi@1
  float v3; // edx@1
  float v4; // ecx@1
  NiAVObject *v5; // eax@1
  NiAVObject *v6; // eax@3
  AfterImgShape *v7; // ecx@5
  double v8; // st7@5
  float _fTime; // ST00_4@7

  v2 = this;
  CNSTimer_Interval::ReSet(&this->m_kTimerInterval, fTime);
  v2->m_kTimerInterval.m_fCheckTime = 0.0089999996;
  v2->m_pos3Old1 = NiPoint3::ZERO;
  v3 = NiPoint3::ZERO.z;
  v4 = v2->m_pos3Old1.y;
  v2->m_pos3Old0.x = v2->m_pos3Old1.x;
  v5 = v2->m_pkAftImgDummy0;
  v2->m_pos3Old0.y = v4;
  v2->m_pos3Old0.z = v3;
  if ( v5 )
  {
    v2->m_pos3Old0.x = v5->m_kWorld.m_Translate.x;
    v2->m_pos3Old0.y = v5->m_kWorld.m_Translate.y;
    v2->m_pos3Old0.z = v5->m_kWorld.m_Translate.z;
  }
  v6 = v2->m_pkAftImgDummy1;
  if ( v6 )
  {
    v2->m_pos3Old1.x = v6->m_kWorld.m_Translate.x;
    v2->m_pos3Old1.y = v6->m_kWorld.m_Translate.y;
    v2->m_pos3Old1.z = v6->m_kWorld.m_Translate.z;
  }
  v7 = v2->m_pkAterImgShape;
  v8 = fTime;
  v2->m_fOldTime = fTime;
  if ( v7 )
  {
    AfterImgShape::Start(v7, fTime);
    v8 = fTime;
  }
  _fTime = v8;
  Effect::Start((Effect *)&v2->vfptr, _fTime);
}

//----- (0068A000) --------------------------------------------------------
void __cdecl AfterImgEff::ClearResourceMap()
{
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v0; // eax@2
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v1; // edi@2
  NiControllerSequence *v2; // esi@3
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v3; // eax@11
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v4; // edi@11
  NiControllerSequence *v5; // esi@12

  if ( unk_B4F148 )
  {
    v0 = stru_B4F144._Ptr;
    v1 = stru_B4F144._Ptr->_Left;
    while ( v1 != v0 )
    {
      v2 = v1->_Myval.second.m_pObject;
      if ( v2 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
          v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
        v1->_Myval.second.m_pObject = 0;
        v0 = stru_B4F144._Ptr;
      }
    }
    std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::_Erase(
      &AfterImgEff::m_mapEffectNode,
      v0->_Parent);
    stru_B4F144._Ptr->_Parent = stru_B4F144._Ptr;
    stru_B4F144._Ptr->_Left = stru_B4F144._Ptr;
    stru_B4F144._Ptr->_Right = stru_B4F144._Ptr;
    unk_B4F148 = 0;
  }
  if ( unk_B4F158 )
  {
    v3 = stru_B4F154._Ptr;
    v4 = stru_B4F154._Ptr->_Left;
    while ( v4 != v3 )
    {
      v5 = v4->_Myval.second.m_pObject;
      if ( v5 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
        {
          if ( v5 )
            v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
        }
        v4->_Myval.second.m_pObject = 0;
        v3 = stru_B4F154._Ptr;
      }
    }
    std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::_Erase(
      &AfterImgEff::m_mapTexture,
      v3->_Parent);
    stru_B4F154._Ptr->_Parent = stru_B4F154._Ptr;
    stru_B4F154._Ptr->_Left = stru_B4F154._Ptr;
    stru_B4F154._Ptr->_Right = stru_B4F154._Ptr;
    unk_B4F158 = 0;
  }
}

//----- (0068A0F0) --------------------------------------------------------
NiPointer<NiNode> *__stdcall AfterImgEff::GetEffectNode(NiPointer<NiNode> *result, unsigned int uiIndex)
{
  NiNode *v3; // edi@1
  NiNode *v4; // eax@4
  NiControllerSequence *v5; // esi@4
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v6; // eax@5
  NiObject *v7; // eax@5
  NiObject *v9; // eax@12
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > >,bool> v10; // [sp+10h] [bp-12Ch]@5
  NiPointer<NiNode> spNode; // [sp+18h] [bp-124h]@1
  std::pair<unsigned long const ,NiPointer<NiControllerSequence> > _Val; // [sp+1Ch] [bp-120h]@1
  NiPointer<NiNode> *v13; // [sp+24h] [bp-118h]@1
  int v14; // [sp+28h] [bp-114h]@1
  char acNIFFullFileName[256]; // [sp+2Ch] [bp-110h]@2
  int v16; // [sp+138h] [bp-4h]@1

  v3 = 0;
  v14 = 0;
  v13 = result;
  spNode.m_pObject = 0;
  v16 = 1;
  std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&AfterImgEff::m_mapEffectNode,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&_Val.second,
    &uiIndex);
  if ( stru_B4F144._Ptr == (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)_Val.second.m_pObject )
  {
    memset(acNIFFullFileName, 0, 0x100u);
    if ( !Folder::m_bInit )
      Folder::Init();
    sprintf(acNIFFullFileName, "%sUpAftImgEf%02d.nif", &Folder::m_acEffect, uiIndex);
    v4 = PgUtil::LoadNifFile(acNIFFullFileName, 0);
    v5 = (NiControllerSequence *)v4;
    if ( v4 )
    {
      spNode.m_pObject = v4;
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
      LOBYTE(v16) = 2;
      _Val.first = uiIndex;
      _Val.second.m_pObject = v5;
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
      v6 = std::_Tree_val<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Buynode<std::pair<int,NiPointer<stGlobalLightInfo>> &>(
             (std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)&AfterImgEff::m_mapEffectNode.comp,
             &_Val);
      std::_Tree<std::_Tmap_traits<unsigned int,NiPointer<NiSourceTexture>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,NiPointer<NiSourceTexture>>>,0>>::_Linsert(
        &AfterImgEff::m_mapEffectNode,
        &v10,
        v6,
        0);
      v7 = NiObject::Clone((NiObject *)&v5->vfptr);
      v13->m_pObject = (NiNode *)v7;
      if ( v7 )
        InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
      v14 = 1;
      LOBYTE(v16) = 1;
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      LOBYTE(v16) = 0;
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      return v13;
    }
  }
  else
  {
    v9 = NiObject::Clone((NiObject *)_Val.second.m_pObject->m_uiArrayGrowBy);
    if ( v9 )
    {
      v3 = (NiNode *)v9;
      InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
    }
  }
  result->m_pObject = v3;
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v14 = 1;
  LOBYTE(v16) = 0;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0068A2E0) --------------------------------------------------------
NiPointer<NiSourceTexture> *__stdcall AfterImgEff::GetEffTexture(NiPointer<NiSourceTexture> *result, unsigned int uiIndex)
{
  NiPointer<NiSourceTexture> *v3; // esi@1
  NiSourceTexture *v4; // edi@1
  NiImageConverter *v5; // eax@4
  NiPixelData *v6; // eax@4
  NiSourceTexture *v7; // eax@5
  NiControllerSequence *v8; // esi@5
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v9; // eax@6
  NiObject *v10; // eax@6
  NiObject *v12; // eax@13
  NiTexture::FormatPrefs kPrefs; // [sp+10h] [bp-130h]@5
  NiPointer<NiSourceTexture> spTex; // [sp+1Ch] [bp-124h]@1
  std::pair<unsigned long const ,NiPointer<NiControllerSequence> > _Val; // [sp+20h] [bp-120h]@1
  int v16; // [sp+28h] [bp-118h]@1
  NiPointer<NiSourceTexture> *v17; // [sp+2Ch] [bp-114h]@1
  char acFilName[256]; // [sp+30h] [bp-110h]@2
  int v19; // [sp+13Ch] [bp-4h]@1

  v3 = result;
  v17 = result;
  v16 = 0;
  std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&AfterImgEff::m_mapTexture,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&_Val.second,
    &uiIndex);
  v4 = 0;
  spTex.m_pObject = 0;
  v19 = 1;
  if ( stru_B4F154._Ptr == (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)_Val.second.m_pObject )
  {
    memset(acFilName, 0, 0x100u);
    if ( !Folder::m_bInit )
      Folder::Init();
    sprintf(acFilName, "%sUpAftImgEf%02d.dds", &Folder::m_acEffect, uiIndex);
    v5 = NiImageConverter::GetImageConverter();
    v6 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, char *, _DWORD))v5->vfptr[2].__vecDelDtor)(
                          v5,
                          acFilName,
                          0);
    if ( v6 )
    {
      kPrefs.m_ePixelLayout = 6;
      kPrefs.m_eAlphaFmt = 3;
      kPrefs.m_eMipMapped = 0;
      v7 = NiSourceTexture::Create(v6, &kPrefs);
      v8 = (NiControllerSequence *)v7;
      if ( v7 )
      {
        spTex.m_pObject = v7;
        InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
        LOBYTE(v19) = 2;
        _Val.first = uiIndex;
        _Val.second.m_pObject = v8;
        InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
        v9 = std::_Tree_val<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Buynode<std::pair<int,NiPointer<stGlobalLightInfo>> &>(
               (std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)&AfterImgEff::m_mapTexture.comp,
               &_Val);
        std::_Tree<std::_Tmap_traits<unsigned int,NiPointer<NiSourceTexture>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,NiPointer<NiSourceTexture>>>,0>>::_Linsert(
          &AfterImgEff::m_mapTexture,
          (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > >,bool> *)&kPrefs.m_eAlphaFmt,
          v9,
          0);
        v10 = NiObject::Clone((NiObject *)&v8->vfptr);
        v17->m_pObject = (NiSourceTexture *)v10;
        if ( v10 )
          InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
        v16 = 1;
        LOBYTE(v19) = 1;
        if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
        LOBYTE(v19) = 0;
        if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
        return v17;
      }
      v3 = v17;
    }
  }
  else
  {
    v12 = NiObject::Clone((NiObject *)_Val.second.m_pObject->m_uiArrayGrowBy);
    if ( v12 )
    {
      v4 = (NiSourceTexture *)v12;
      InterlockedIncrement((volatile LONG *)&v12->m_uiRefCount);
    }
  }
  v3->m_pObject = v4;
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v16 = 1;
  LOBYTE(v19) = 0;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  return v3;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0068A510) --------------------------------------------------------
char __thiscall AfterImgEff::CreateShape(AfterImgEff *this, NiNode *pkNode, int WeaponLevel, UpEffectData *pkUpEff)
{
  AfterImgEff *v4; // edi@1
  void *(__thiscall *v6)(NiRefObject *, unsigned int); // eax@3
  NiAVObject *v7; // eax@4
  AfterImgShape *v8; // ecx@6
  AfterImgShape0 *v9; // eax@8
  AfterImgShape *v10; // eax@9
  int v11; // eax@10
  AfterImgShape *v12; // ecx@11
  AfterImgShape1 *v13; // eax@13
  void (__thiscall *v14)(AfterImgShape *, int); // eax@16
  NiTListItem<NiPointer<NiProperty> > *v15; // ebx@16
  NiObject *v16; // esi@17
  int v17; // eax@17
  NiGeometry *v18; // eax@21
  NiGeometry *v19; // esi@21
  UpEffectData *v20; // esi@27
  int v21; // ebx@28
  char v22; // al@28
  NiTListItem<NiPointer<NiProperty> > *v23; // ebx@32
  NiObject *v24; // esi@33
  int v25; // eax@35
  NiProperty *v26; // eax@35
  UpEffectData *v27; // esi@37
  NiTexturingProperty *v28; // eax@42
  NiNode *v29; // eax@46
  NiD3DDefaultShader *v30; // eax@47
  NiGeometry *v31; // ecx@49
  int v32; // [sp+2Ch] [bp-2Ch]@0
  int v33; // [sp+30h] [bp-28h]@0
  int v34; // [sp+34h] [bp-24h]@0
  int v35; // [sp+38h] [bp-20h]@0
  NiPointer<NiProperty> v36; // [sp+3Ch] [bp-1Ch]@35
  NiGeometry *pkGeom; // [sp+40h] [bp-18h]@18
  NiPointer<NiProperty> result; // [sp+44h] [bp-14h]@17
  NiGeometry *pkGeometry; // [sp+48h] [bp-10h]@1
  int v40; // [sp+54h] [bp-4h]@8
  NiTriShape *pkShape; // [sp+60h] [bp+8h]@16

  v4 = this;
  if ( !PgUtil::CatchGeometry((NiAVObject *)&pkNode->vfptr, &pkGeometry) )
    return 0;
  v6 = pkNode->vfptr[18].__vecDelDtor;
  if ( v4->m_uiShapeType )
  {
    v11 = (int)v6((NiRefObject *)&pkNode->vfptr, (unsigned int)"AftImgDummy0");
    v4->m_pkAftImgDummy0 = (NiAVObject *)v11;
    if ( v11 )
    {
      v12 = v4->m_pkAterImgShape;
      v4->m_pkAftImgDummy1 = 0;
      if ( v12 )
        ((void (__stdcall *)(signed int))v12->vfptr->__vecDelDtor)(1);
      v13 = (AfterImgShape1 *)operator new(0x58u);
      v40 = 1;
      if ( v13 )
      {
        AfterImgShape1::AfterImgShape1(v13);
        goto LABEL_16;
      }
LABEL_15:
      v10 = 0;
      goto LABEL_16;
    }
    return 0;
  }
  v4->m_pkAftImgDummy0 = (NiAVObject *)v6((NiRefObject *)&pkNode->vfptr, (unsigned int)"AftImgDummy0");
  v7 = (NiAVObject *)pkNode->vfptr[18].__vecDelDtor((NiRefObject *)pkNode, (unsigned int)"AftImgDummy1");
  v4->m_pkAftImgDummy1 = v7;
  if ( !v4->m_pkAftImgDummy0 || !v7 )
    return 0;
  v8 = v4->m_pkAterImgShape;
  if ( v8 )
    ((void (__stdcall *)(signed int))v8->vfptr->__vecDelDtor)(1);
  v9 = (AfterImgShape0 *)operator new(0x4Cu);
  v40 = 0;
  if ( !v9 )
    goto LABEL_15;
  AfterImgShape0::AfterImgShape0(v9);
LABEL_16:
  v4->m_pkAterImgShape = v10;
  v14 = v10->vfptr->Init;
  v40 = -1;
  ((void (__stdcall *)(signed int))v14)(300);
  v4->m_pkAterImgShape->m_fWidth = v4->m_fWidth;
  v15 = pkGeometry->m_kPropertyList.m_pkHead;
  pkShape = v4->m_pkAterImgShape->m_spkTriShape.m_pObject;
  while ( v15 )
  {
    v16 = (NiObject *)&v15->m_element.m_pObject->vfptr;
    v15 = v15->m_pkNext;
    v17 = ((int (__thiscall *)(NiObject *))v16->vfptr[15].__vecDelDtor)(v16);
    NiAVObject::RemoveProperty((NiAVObject *)&pkShape->vfptr, &result, v17);
    if ( result.m_pObject )
    {
      pkGeom = (NiGeometry *)result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( pkGeom )
          ((void (__stdcall *)(signed int))pkGeom->vfptr->__vecDelDtor)(1);
      }
    }
    v18 = (NiGeometry *)NiObject::Clone(v16);
    v19 = v18;
    pkGeom = v18;
    if ( v18 )
      InterlockedIncrement((volatile LONG *)&v18->m_uiRefCount);
    v40 = 2;
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&pkShape->m_kPropertyList,
      (NiPointer<NiRoom> *)&pkGeom);
    v40 = -1;
    if ( v19 && !InterlockedDecrement((volatile LONG *)&v19->m_uiRefCount) )
      v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
  }
  v20 = pkUpEff;
  if ( pkUpEff )
  {
    v21 = WeaponLevel;
    v22 = pkUpEff->UpAfterImgEff[WeaponLevel];
    if ( v22 != -1 )
    {
      AfterImgEff::GetEffTexture((NiPointer<NiSourceTexture> *)&WeaponLevel, (unsigned __int8)v22);
      v40 = 3;
      if ( WeaponLevel )
      {
        AfterImgEff::GetEffectNode((NiPointer<NiNode> *)&pkUpEff, v20->UpAfterImgEff[v21]);
        LOBYTE(v40) = 4;
        if ( pkUpEff )
        {
          if ( PgUtil::CatchGeometry((NiAVObject *)pkUpEff, &pkGeom) )
          {
            v23 = pkGeom->m_kPropertyList.m_pkHead;
            while ( v23 )
            {
              v24 = (NiObject *)&v23->m_element.m_pObject->vfptr;
              v23 = v23->m_pkNext;
              if ( !((int (__thiscall *)(NiObject *))v24->vfptr[15].__vecDelDtor)(v24)
                || ((int (__thiscall *)(_DWORD))v24->vfptr[15].__vecDelDtor)(v24) == 8 )
              {
                v25 = ((int (__thiscall *)(NiObject *))v24->vfptr[15].__vecDelDtor)(v24);
                NiAVObject::RemoveProperty((NiAVObject *)&pkShape->vfptr, &v36, v25);
                NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&v36);
                v26 = (NiProperty *)NiObject::Clone(v24);
                NiAVObject::AttachProperty((NiAVObject *)&pkShape->vfptr, v26);
              }
            }
          }
          v27 = pkUpEff;
          if ( pkUpEff )
          {
            if ( !InterlockedDecrement((volatile LONG *)&pkUpEff->UpEffect[2]) && v27 )
              (**(void (__thiscall ***)(UpEffectData *, signed int))&v27->ID)(v27, 1);
            pkUpEff = 0;
          }
        }
        v28 = (NiTexturingProperty *)NiAVObject::GetProperty((NiAVObject *)&pkShape->vfptr, 8);
        if ( v28 )
          NiTexturingProperty::SetBaseTexture(v28, (NiTexture *)WeaponLevel);
        LOBYTE(v40) = 3;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkUpEff);
      }
      v40 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&WeaponLevel);
    }
  }
  v29 = (NiNode *)operator new(0xE8u);
  v40 = 5;
  if ( v29 )
    NiNode::NiNode(v29, 0);
  else
    v30 = 0;
  v40 = -1;
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v4->m_spNode, v30);
  v4->m_spNode.m_pObject->m_uFlags &= 0xFFFEu;
  ((void (__stdcall *)(NiTriShape *, _DWORD, int, int, int, int, NiProperty *, NiGeometry *, NiProperty *))v4->m_spNode.m_pObject->vfptr[29].__vecDelDtor)(
    v4->m_pkAterImgShape->m_spkTriShape.m_pObject,
    0,
    v32,
    v33,
    v34,
    v35,
    v36.m_pObject,
    pkGeom,
    result.m_pObject);
  NiAVObject::UpdateProperties((NiAVObject *)&v4->m_spNode.m_pObject->vfptr);
  NiAVObject::UpdateEffects((NiAVObject *)&v4->m_spNode.m_pObject->vfptr);
  result.m_pObject = (NiProperty *)1;
  pkGeom = v31;
  NiAVObject::Update((NiAVObject *)&v4->m_spNode.m_pObject->vfptr, 0.0, 1);
  return 1;
}

//----- (0068A8D0) --------------------------------------------------------
AfterImgEff *__cdecl AfterImgEff::CreateBySourceNode(NiNode *pkNode)
{
  NiNode *v1; // eax@1
  unsigned int v2; // ebx@1
  int v3; // esi@1
  NiExtraData **v4; // ecx@2
  NiTextKeyExtraData *v5; // edi@2
  NiRTTI *v6; // eax@3
  NiTextKey *v8; // eax@10
  AfterImgEff *v9; // esi@10
  char *v10; // edx@11
  char *v11; // ecx@11
  char v12; // al@12
  const char *v13; // eax@13
  const char *v14; // eax@15
  const char *v15; // eax@18
  const char *v16; // eax@21
  AfterImgEff *v17; // eax@24
  AfterImgEff *v18; // eax@25
  NiNode *v19; // ecx@26
  float fExpandTime; // [sp+14h] [bp-128h]@11
  float fWidth; // [sp+18h] [bp-124h]@11
  unsigned int uiType; // [sp+1Ch] [bp-120h]@11
  NiNode *v23; // [sp+20h] [bp-11Ch]@1
  char acTextKeyStr[256]; // [sp+24h] [bp-118h]@11
  char seps[5]; // [sp+124h] [bp-18h]@13
  int v26; // [sp+138h] [bp-4h]@24

  v1 = pkNode;
  v2 = pkNode->m_uiExtraDataSize;
  v3 = 0;
  v23 = pkNode;
  if ( !v2 )
    return 0;
  while ( 1 )
  {
    v4 = v1->m_ppkExtra;
    v5 = (NiTextKeyExtraData *)v4[v3];
    if ( v5 )
      break;
LABEL_7:
    if ( ++v3 >= v2 )
      return 0;
  }
  v6 = (NiRTTI *)((int (__thiscall *)(NiExtraData *))v5->vfptr[1].__vecDelDtor)(v4[v3]);
  if ( !v6 )
  {
LABEL_6:
    v1 = v23;
    goto LABEL_7;
  }
  while ( v6 != &NiTextKeyExtraData::m_RTTI )
  {
    v6 = v6->m_pkBaseRTTI;
    if ( !v6 )
      goto LABEL_6;
  }
  v8 = v5->m_pKeys;
  v9 = 0;
  if ( !v8 )
    return 0;
  uiType = 1;
  fExpandTime = 0.30000001;
  v10 = acTextKeyStr;
  fWidth = 8.0;
  v11 = v8->m_pText;
  do
  {
    v12 = *v11;
    *v10++ = *v11++;
  }
  while ( v12 );
  strcpy(seps, " \t\n\r");
  v13 = strtok(acTextKeyStr, seps);
  if ( !v13 )
    return 0;
  do
  {
    if ( !strcmp(v13, "Type") )
    {
      v14 = strtok(0, seps);
      if ( !v14 )
        return 0;
      uiType = atoi(v14);
    }
    else if ( !strcmp(v13, "ExpandTime") )
    {
      v15 = strtok(0, seps);
      if ( !v15 )
        return 0;
      sscanf(v15, "%f", &fExpandTime);
    }
    else
    {
      if ( strcmp(v13, "Width") )
        return 0;
      v16 = strtok(0, seps);
      if ( !v16 )
        return 0;
      sscanf(v16, "%f", &fWidth);
    }
    v13 = strtok(0, seps);
  }
  while ( v13 );
  v17 = (AfterImgEff *)operator new(0x264u);
  v26 = 0;
  if ( v17 )
  {
    AfterImgEff::AfterImgEff(v17, 0, 0);
    v9 = v18;
  }
  v19 = v23;
  v9->m_uiShapeType = uiType;
  v9->m_fExpandTime = fExpandTime;
  v9->m_fWidth = fWidth;
  v26 = -1;
  AfterImgEff::CreateShape(v9, v19, 0, 0);
  v9->m_pkTextKeyExtraData = v5;
  return v9;
}

//----- (0068AB60) --------------------------------------------------------
AfterImgEff *__cdecl AfterImgEff::CreateByWeaponNode(NiNode *pkNode, int WeaponLevel, UpEffectData *pkUpEff)
{
  NiNode *v3; // eax@1
  unsigned int v4; // ebx@1
  int v5; // edi@1
  NiExtraData *v6; // esi@2
  NiRTTI *v7; // eax@3
  unsigned int v9; // esi@10
  int v10; // ebx@11
  char *v11; // edx@11
  char *v12; // ecx@11
  char v13; // al@12
  const char *v14; // esi@13
  const char *v15; // eax@15
  const char *v16; // eax@18
  const char *v17; // eax@21
  AfterImgEff *v18; // eax@24
  AfterImgEff *v19; // eax@25
  AfterImgEff *v20; // esi@25
  NiNode *v21; // edx@27
  float fWidth; // [sp+18h] [bp-124h]@11
  float fExpandTime; // [sp+1Ch] [bp-120h]@11
  NiNode *v24; // [sp+20h] [bp-11Ch]@1
  char acTextKeyStr[256]; // [sp+24h] [bp-118h]@11
  char seps[5]; // [sp+124h] [bp-18h]@13
  int v27; // [sp+138h] [bp-4h]@24

  v3 = pkNode;
  v4 = pkNode->m_uiExtraDataSize;
  v5 = 0;
  v24 = pkNode;
  if ( !v4 )
    return 0;
  while ( 1 )
  {
    v6 = v3->m_ppkExtra[v5];
    if ( v6 )
      break;
LABEL_7:
    if ( ++v5 >= v4 )
      return 0;
  }
  v7 = (NiRTTI *)((int (__thiscall *)(NiExtraData *))v6->vfptr[1].__vecDelDtor)(v6);
  if ( !v7 )
  {
LABEL_6:
    v3 = v24;
    goto LABEL_7;
  }
  while ( v7 != &NiTextKeyExtraData::m_RTTI )
  {
    v7 = v7->m_pkBaseRTTI;
    if ( !v7 )
      goto LABEL_6;
  }
  v9 = v6[1].m_uiRefCount;
  if ( !v9 )
    return 0;
  v10 = 1;
  fExpandTime = 0.30000001;
  v11 = acTextKeyStr;
  fWidth = 8.0;
  v12 = *(char **)(v9 + 4);
  do
  {
    v13 = *v12;
    *v11++ = *v12++;
  }
  while ( v13 );
  strcpy(seps, " \t\n\r");
  v14 = strtok(acTextKeyStr, seps);
  if ( !v14 )
    return 0;
  do
  {
    if ( !strcmp(v14, "Type") )
    {
      v15 = strtok(0, seps);
      if ( !v15 )
        return 0;
      v10 = atoi(v15);
    }
    else if ( !strcmp(v14, "ExpandTime") )
    {
      v16 = strtok(0, seps);
      if ( !v16 )
        return 0;
      sscanf(v16, "%f", &fExpandTime);
    }
    else
    {
      if ( strcmp(v14, "Width") )
        return 0;
      v17 = strtok(0, seps);
      if ( !v17 )
        return 0;
      sscanf(v17, "%f", &fWidth);
    }
    v14 = strtok(0, seps);
  }
  while ( v14 );
  v18 = (AfterImgEff *)operator new(0x264u);
  v27 = 0;
  if ( v18 )
  {
    AfterImgEff::AfterImgEff(v18, 0, 0);
    v20 = v19;
  }
  else
  {
    v20 = 0;
  }
  v21 = v24;
  v20->m_uiShapeType = v10;
  v20->m_fExpandTime = fExpandTime;
  v20->m_fWidth = fWidth;
  v27 = -1;
  AfterImgEff::CreateShape(v20, v21, WeaponLevel, pkUpEff);
  v20->m_pkTextKeyExtraData = 0;
  return v20;
}

//----- (0068AE00) --------------------------------------------------------
AfterImgEff *__thiscall AfterImgEff::`vector deleting destructor'(char *this, unsigned int a2)
{
  return AfterImgEff::`scalar deleting destructor'((AfterImgEff *)(this - 8), a2);
}

//----- (0068AE10) --------------------------------------------------------
NiRTTI *AfterImgEff::GetRTTI()
{
  return &AfterImgEff::m_RTTI;
}

//----- (0068AE20) --------------------------------------------------------
void __thiscall Effect::Start(Effect *this, float fTime)
{
  Effect *v2; // esi@1
  NiTListItem<NiPointer<Effect> > *v3; // esi@1
  void *(__thiscall *v4)(NiRefObject *, unsigned int); // edx@2

  v2 = this;
  this->m_fStartTime = fTime;
  EffectCtrl::Start(&this->m_kCtrl, fTime);
  CDecalEffect::Start(&v2->m_kDecalEffect, fTime);
  v3 = v2->m_kChildList.m_pkHead;
  while ( v3 )
  {
    v4 = v3->m_element.m_pObject->vfptr[15].__vecDelDtor;
    v3 = v3->m_pkNext;
    ((void (__stdcall *)(_DWORD))v4)(LODWORD(fTime));
  }
}

//----- (0068AE80) --------------------------------------------------------
void __thiscall std::pair<unsigned int,NiPointer<NiNode>>::~pair<unsigned int,NiPointer<NiNode>>(std::pair<unsigned long const ,NiPointer<NiControllerSequence> > *this)
{
  NiControllerSequence *v1; // esi@1

  v1 = this->second.m_pObject;
  if ( v1 && !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
  {
    if ( v1 )
      v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
  }
}

//----- (0068AEB0) --------------------------------------------------------
AfterImgEff *__thiscall AfterImgEff::`scalar deleting destructor'(AfterImgEff *this, unsigned int a2)
{
  AfterImgEff *v2; // esi@1

  v2 = this;
  AfterImgEff::~AfterImgEff(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0068AEE0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *_Newnode)
{
  unsigned int v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v6; // edi@1
  NiControllerSequence *v7; // esi@2
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v8; // edx@8
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v9; // edx@11
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v10; // edx@13
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v11; // eax@15
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v12; // edx@16
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v13; // esi@16
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v14; // esi@17
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v15; // edx@19
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v16; // esi@21
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v17; // esi@23
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v18; // edx@27
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v19; // esi@27
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v20; // edi@27
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v21; // edi@29
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v22; // edi@31
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v23; // edx@37
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v24; // esi@37
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v25; // esi@39
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v26; // esi@41
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v27; // edi@47
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v28; // edi@49
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v29; // ecx@55
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *v30; // eax@55

  v5 = this->_Mysize;
  v6 = _Newnode;
  if ( v5 >= 0x1FFFFFFE )
  {
    v7 = _Newnode->_Myval.second.m_pObject;
    if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    operator delete(_Newnode);
    std::_Xlength_error("map/set<T> too long");
  }
  this->_Mysize = v5 + 1;
  _Newnode->_Parent = _Wherenode;
  v8 = this->_Myhead;
  if ( _Wherenode == v8 )
  {
    v8->_Parent = _Newnode;
    this->_Myhead->_Left = _Newnode;
    this->_Myhead->_Right = _Newnode;
  }
  else if ( _Addleft )
  {
    _Wherenode->_Left = _Newnode;
    v9 = this->_Myhead;
    if ( _Wherenode == v9->_Left )
      v9->_Left = _Newnode;
  }
  else
  {
    _Wherenode->_Right = _Newnode;
    v10 = this->_Myhead;
    if ( _Wherenode == v10->_Right )
      v10->_Right = _Newnode;
  }
  v11 = _Newnode;
  while ( !v11->_Parent->_Color )
  {
    v12 = v11->_Parent;
    v13 = v12->_Parent;
    if ( v12 == v13->_Left )
    {
      v14 = v13->_Right;
      if ( v14->_Color )
      {
        if ( v11 == v12->_Right )
        {
          v11 = v11->_Parent;
          v15 = v12->_Right;
          v11->_Right = v15->_Left;
          if ( !v15->_Left->_Isnil )
            v15->_Left->_Parent = v11;
          v15->_Parent = v11->_Parent;
          v16 = this->_Myhead;
          if ( v11 == v16->_Parent )
          {
            v16->_Parent = v15;
          }
          else
          {
            v17 = v11->_Parent;
            if ( v11 == v17->_Left )
              v17->_Left = v15;
            else
              v17->_Right = v15;
          }
          v15->_Left = v11;
          v11->_Parent = v15;
        }
        v11->_Parent->_Color = 1;
        v11->_Parent->_Parent->_Color = 0;
        v18 = v11->_Parent->_Parent;
        v19 = v18->_Left;
        v18->_Left = v18->_Left->_Right;
        v20 = v19->_Right;
        if ( !v20->_Isnil )
          v20->_Parent = v18;
        v19->_Parent = v18->_Parent;
        v21 = this->_Myhead;
        if ( v18 == v21->_Parent )
        {
          v21->_Parent = v19;
          v19->_Right = v18;
        }
        else
        {
          v22 = v18->_Parent;
          if ( v18 == v22->_Right )
          {
            v22->_Right = v19;
            v19->_Right = v18;
          }
          else
          {
            v22->_Left = v19;
            v19->_Right = v18;
          }
        }
LABEL_53:
        v6 = _Newnode;
        v18->_Parent = v19;
        continue;
      }
    }
    else
    {
      v14 = v13->_Left;
      if ( v14->_Color )
      {
        if ( v11 == v12->_Left )
        {
          v11 = v11->_Parent;
          v23 = v12->_Left;
          v11->_Left = v23->_Right;
          v24 = v23->_Right;
          if ( !v24->_Isnil )
            v24->_Parent = v11;
          v23->_Parent = v11->_Parent;
          v25 = this->_Myhead;
          if ( v11 == v25->_Parent )
          {
            v25->_Parent = v23;
          }
          else
          {
            v26 = v11->_Parent;
            if ( v11 == v26->_Right )
              v26->_Right = v23;
            else
              v26->_Left = v23;
          }
          v23->_Right = v11;
          v11->_Parent = v23;
        }
        v11->_Parent->_Color = 1;
        v11->_Parent->_Parent->_Color = 0;
        v18 = v11->_Parent->_Parent;
        v19 = v18->_Right;
        v18->_Right = v19->_Left;
        if ( !v19->_Left->_Isnil )
          v19->_Left->_Parent = v18;
        v19->_Parent = v18->_Parent;
        v27 = this->_Myhead;
        if ( v18 == v27->_Parent )
        {
          v27->_Parent = v19;
        }
        else
        {
          v28 = v18->_Parent;
          if ( v18 == v28->_Left )
            v28->_Left = v19;
          else
            v28->_Right = v19;
        }
        v19->_Left = v18;
        goto LABEL_53;
      }
    }
    v12->_Color = 1;
    v14->_Color = 1;
    v11->_Parent->_Parent->_Color = 0;
    v11 = v11->_Parent->_Parent;
  }
  v29 = this->_Myhead->_Parent;
  v30 = result;
  result->_Ptr = v6;
  v29->_Color = 1;
  return v30;
}

//----- (0068B120) --------------------------------------------------------
void __thiscall AfterImgShape::RemoveVertex(AfterImgShape *this, int _nNum)
{
  int v2; // esi@1
  int v3; // edx@3
  int v4; // eax@3

  v2 = this->m_nEndIndex;
  if ( v2 >= 0 || this->m_nStartIndex >= 0 )
  {
    v3 = this->m_nStartIndex;
    v4 = v2 - v3;
    if ( v2 - v3 < 0 )
      v4 += this->m_nTotalVertexCnt;
    if ( v4 + 1 <= _nNum )
      this->m_nStartIndex = v2;
    else
      this->m_nStartIndex = (v3 + _nNum) % this->m_nTotalVertexCnt;
  }
}

//----- (0068B160) --------------------------------------------------------
void __thiscall AfterImgShape0::SetVertex(AfterImgShape0 *this, NiPoint3 *_pos3Start, NiPoint3 *_pos3End)
{
  int v3; // edx@1
  int v4; // eax@1
  int v5; // eax@2
  bool v6; // sf@4
  unsigned __int8 v7; // of@4
  int v8; // eax@4
  int v9; // edx@6
  int v10; // eax@8

  v3 = this->m_nEndIndex;
  v4 = this->m_nStartIndex - v3;
  if ( v4 > 0 )
    v5 = v4 - 1;
  else
    v5 = v4 + this->m_nTotalVertexCnt - 1;
  v7 = __OFSUB__(v5, 1);
  v6 = v5 - 1 < 0;
  v8 = v3 + 1;
  this->m_nEndIndex = v3 + 1;
  if ( v6 ^ v7 )
    this->m_nStartIndex = v3 + 2;
  v9 = this->m_nTotalVertexCnt;
  if ( v8 >= v9 )
    this->m_nEndIndex = v8 - v9;
  v10 = this->m_nStartIndex;
  if ( v10 >= v9 )
    this->m_nStartIndex = v10 - v9;
  if ( this->m_nStartIndex < 0 )
    this->m_nStartIndex = 0;
  this->m_pkVertices[2 * this->m_nEndIndex] = *_pos3Start;
  this->m_pkVertices[2 * this->m_nEndIndex + 1] = *_pos3End;
}

//----- (0068B200) --------------------------------------------------------
void __thiscall AfterImgShape1::SetVertex(AfterImgShape1 *this, NiPoint3 *_pos3Start, NiPoint3 *_pos3End)
{
  int v3; // edx@1
  int v4; // eax@1
  int v5; // eax@2
  bool v6; // sf@4
  unsigned __int8 v7; // of@4
  int v8; // eax@4
  int v9; // edx@6
  int v10; // eax@8

  v3 = this->m_nEndIndex;
  v4 = this->m_nStartIndex - v3;
  if ( v4 > 0 )
    v5 = v4 - 1;
  else
    v5 = v4 + this->m_nTotalVertexCnt - 1;
  v7 = __OFSUB__(v5, 1);
  v6 = v5 - 1 < 0;
  v8 = v3 + 1;
  this->m_nEndIndex = v3 + 1;
  if ( v6 ^ v7 )
    this->m_nStartIndex = v3 + 2;
  v9 = this->m_nTotalVertexCnt;
  if ( v8 >= v9 )
    this->m_nEndIndex = v8 - v9;
  v10 = this->m_nStartIndex;
  if ( v10 >= v9 )
    this->m_nStartIndex = v10 - v9;
  if ( this->m_nStartIndex < 0 )
    this->m_nStartIndex = 0;
  this->m_pkVertices[this->m_nEndIndex] = *_pos3Start;
}

//----- (0068B280) --------------------------------------------------------
void __thiscall AfterImgShape::Start(AfterImgShape *this, float _fTime)
{
  this->m_nStartIndex = -1;
  this->m_nEndIndex = -1;
  *(_WORD *)&this->m_bStart = 1;
  this->m_spkTriShape.m_pObject->m_uFlags &= 0xFFFEu;
}

//----- (0068B2A0) --------------------------------------------------------
void __thiscall AfterImgShape::Stop(AfterImgShape *this)
{
  this->m_nStartIndex = -1;
  this->m_nEndIndex = -1;
  this->m_bStart = 0;
  this->m_spkTriShape.m_pObject->m_uFlags |= 1u;
}

//----- (0068B2C0) --------------------------------------------------------
void __thiscall AfterImgShape::AfterImgShape(AfterImgShape *this)
{
  AfterImgShape *v1; // esi@1
  NiTriShape *v2; // edi@1
  NiStencilProperty *v3; // edi@6
  NiZBufferProperty *v4; // edi@11
  NiAlphaProperty *v5; // edi@16

  v1 = this;
  this->vfptr = (AfterImgShapeVtbl *)&AfterImgShape::`vftable';
  this->m_kColorStart.r = 0.0;
  this->m_kColorStart.g = 0.0;
  this->m_kColorStart.b = 0.0;
  this->m_kColorStart.a = 0.0;
  this->m_kColorEnd.r = 0.0;
  this->m_kColorEnd.g = 0.0;
  this->m_kColorEnd.b = 0.0;
  this->m_kColorEnd.a = 0.0;
  this->m_spkStencilProp.m_pObject = 0;
  this->m_spkZBufferProp.m_pObject = 0;
  this->m_spkAlphaProp.m_pObject = 0;
  this->m_spkTriShape.m_pObject = 0;
  this->m_fWidth = 5.0;
  this->m_nStartIndex = -1;
  this->m_nEndIndex = -1;
  *(_WORD *)&this->m_bStart = 0;
  this->m_nTotalVertexCnt = 256;
  this->m_pkVertices = 0;
  v2 = this->m_spkTriShape.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spkTriShape.m_pObject = 0;
  }
  v3 = v1->m_spkStencilProp.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spkStencilProp.m_pObject = 0;
  }
  v4 = v1->m_spkZBufferProp.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spkZBufferProp.m_pObject = 0;
  }
  v5 = v1->m_spkAlphaProp.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spkAlphaProp.m_pObject = 0;
  }
  v1->m_bSmoothColor = 0;
  v1->m_kColorStart.r = 1.0;
  v1->m_kColorStart.g = 1.0;
  v1->m_kColorStart.b = 1.0;
  v1->m_kColorEnd.r = 1.0;
  v1->m_kColorStart.a = 1.0;
  v1->m_kColorEnd.g = 1.0;
  v1->m_kColorEnd.b = 1.0;
  v1->m_kColorEnd.a = 1.0;
}
// 9BCD14: using guessed type int (__thiscall *AfterImgShape::`vftable')(void *p, char);

//----- (0068B440) --------------------------------------------------------
void __thiscall AfterImgShape::~AfterImgShape(AfterImgShape *this)
{
  AfterImgShape *v1; // esi@1
  NiTriShape *v2; // edi@1
  NiStencilProperty *v3; // edi@6
  NiZBufferProperty *v4; // edi@11
  NiAlphaProperty *v5; // edi@16
  NiTriShape *v6; // edi@23
  NiAlphaProperty *v7; // edi@27
  NiZBufferProperty *v8; // edi@31
  NiStencilProperty *v9; // esi@35

  v1 = this;
  this->vfptr = (AfterImgShapeVtbl *)&AfterImgShape::`vftable';
  v2 = this->m_spkTriShape.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spkTriShape.m_pObject = 0;
  }
  v3 = v1->m_spkStencilProp.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spkStencilProp.m_pObject = 0;
  }
  v4 = v1->m_spkZBufferProp.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spkZBufferProp.m_pObject = 0;
  }
  v5 = v1->m_spkAlphaProp.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spkAlphaProp.m_pObject = 0;
  }
  if ( v1->m_pkVertices )
    operator delete[](v1->m_pkVertices);
  v1->m_pkVertices = 0;
  v6 = v1->m_spkTriShape.m_pObject;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  v7 = v1->m_spkAlphaProp.m_pObject;
  if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  v8 = v1->m_spkZBufferProp.m_pObject;
  if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
    v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
  v9 = v1->m_spkStencilProp.m_pObject;
  if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
  {
    if ( v9 )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
  }
}
// 9BCD14: using guessed type int (__thiscall *AfterImgShape::`vftable')(void *p, char);

//----- (0068B5E0) --------------------------------------------------------
void __thiscall AfterImgShape::Terminate(AfterImgShape *this)
{
  AfterImgShape *v1; // esi@1
  NiTriShape *v2; // edi@1
  NiStencilProperty *v3; // edi@6
  NiZBufferProperty *v4; // edi@11
  NiAlphaProperty *v5; // edi@16

  v1 = this;
  v2 = this->m_spkTriShape.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spkTriShape.m_pObject = 0;
  }
  v3 = v1->m_spkStencilProp.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spkStencilProp.m_pObject = 0;
  }
  v4 = v1->m_spkZBufferProp.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spkZBufferProp.m_pObject = 0;
  }
  v5 = v1->m_spkAlphaProp.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spkAlphaProp.m_pObject = 0;
  }
  if ( v1->m_pkVertices )
    operator delete[](v1->m_pkVertices);
  v1->m_pkVertices = 0;
}

//----- (0068B6A0) --------------------------------------------------------
void __thiscall AfterImgShape0::AfterImgShape0(AfterImgShape0 *this)
{
  AfterImgShape0 *v1; // esi@1

  v1 = this;
  AfterImgShape::AfterImgShape((AfterImgShape *)&this->vfptr);
  v1->vfptr = (AfterImgShapeVtbl *)&AfterImgShape0::`vftable';
}
// 9BCD28: using guessed type int (__thiscall *AfterImgShape0::`vftable')(void *p, char);

//----- (0068B6C0) --------------------------------------------------------
void __thiscall AfterImgShape0::~AfterImgShape0(AfterImgShape0 *this)
{
  this->vfptr = (AfterImgShapeVtbl *)&AfterImgShape0::`vftable';
  AfterImgShape::~AfterImgShape((AfterImgShape *)&this->vfptr);
}
// 9BCD28: using guessed type int (__thiscall *AfterImgShape0::`vftable')(void *p, char);

//----- (0068B6D0) --------------------------------------------------------
char __thiscall AfterImgShape0::Update(AfterImgShape0 *this, float _fTime)
{
  AfterImgShape0 *v2; // esi@1
  int v3; // ecx@3
  int v4; // ecx@5
  int v5; // ecx@7
  NiTriShape *v6; // eax@7
  NiGeometryData *v7; // edx@7
  NiPoint3 *v8; // ebx@7
  NiPoint2 *v9; // edx@7
  NiColorA *v10; // eax@7
  int v11; // edi@10
  int v12; // eax@12
  int v13; // ecx@12
  int v14; // edx@12
  int v15; // eax@12
  int v16; // ebx@23
  NiPoint3 *v17; // eax@27
  int v18; // ecx@27
  int v19; // ecx@27
  double v20; // st7@28
  NiPoint2 *v21; // eax@30
  double v22; // st7@30
  NiColorA *v23; // eax@31
  NiColorA *v24; // eax@31
  NiColorA *v25; // eax@31
  float v26; // ecx@31
  float v27; // edx@31
  float v28; // eax@31
  NiColorA *v29; // eax@33
  float v30; // ebx@33
  NiGeometryData *v31; // edi@37
  NiColorA v33; // [sp+20h] [bp-190h]@31
  NiColorA v34; // [sp+30h] [bp-180h]@31
  NiColorA result; // [sp+40h] [bp-170h]@31
  NiBound kBound; // [sp+50h] [bp-160h]@37
  NiColorA *pkColors; // [sp+60h] [bp-150h]@7
  AfterImgShape0 *v38; // [sp+64h] [bp-14Ch]@1
  NiPoint2 *pkTextures; // [sp+68h] [bp-148h]@7
  double v40; // [sp+6Ch] [bp-144h]@30
  int nPosEnd; // [sp+70h] [bp-140h]@12
  NiColorA kColorTemp; // [sp+74h] [bp-13Ch]@31
  int i; // [sp+84h] [bp-12Ch]@11
  NiPoint3 *pkVerts; // [sp+88h] [bp-128h]@7
  int nPosStart; // [sp+8Ch] [bp-124h]@12
  int nCount; // [sp+90h] [bp-120h]@7
  char aaaa[256]; // [sp+94h] [bp-11Ch]@17
  CPPEH_RECORD ms_exc; // [sp+198h] [bp-18h]@27

  v2 = this;
  v38 = this;
  if ( !this->m_bStart )
    return 0;
  if ( this->m_bPause )
    return 0;
  v3 = this->m_nEndIndex;
  if ( v3 < 0 && v2->m_nStartIndex < 0 )
    return 0;
  v4 = v3 - v2->m_nStartIndex;
  if ( v4 < 0 )
    v4 += v2->m_nTotalVertexCnt;
  v5 = v4 + 1;
  nCount = v5;
  v6 = v2->m_spkTriShape.m_pObject;
  v7 = v6->m_spModelData.m_pObject;
  v8 = v7->m_pkVertex;
  pkVerts = v8;
  v9 = v7->m_pkTexture;
  pkTextures = v9;
  v10 = v6->m_spModelData.m_pObject->m_pkColor;
  pkColors = v10;
  if ( !v8 || !v9 || !v10 )
  {
    sprintf(aaaa, "AfterImgShape0::Update() pkVerts:%d, pkTextures:%d, pkColors:%d\n", v8, v9, v10);
    NetUtil::SendLog(aaaa);
    return 0;
  }
  v11 = 0;
  while ( 1 )
  {
    i = v11;
    if ( v11 >= v5 )
      break;
    v12 = 2 * (v11 + v2->m_nStartIndex);
    v13 = v12;
    nPosStart = 2 * (v11 + v2->m_nStartIndex);
    v14 = v12 + 1;
    nPosEnd = v12 + 1;
    v15 = 2 * v2->m_nTotalVertexCnt;
    if ( v13 >= v15 )
    {
      v13 -= v15;
      nPosStart = v13;
    }
    if ( v14 >= v15 )
    {
      v14 -= v15;
      nPosEnd = v14;
    }
    if ( v13 >= v15 )
    {
      sprintf(
        aaaa,
        "AfterImgShape0::Update() nPosStart is %d count %d %d->%d\n",
        v13,
        nCount,
        v2->m_nEndIndex,
        v2->m_nStartIndex);
LABEL_18:
      NetUtil::SendLog(aaaa);
      return 0;
    }
    if ( v14 >= v15 )
    {
      sprintf(
        aaaa,
        "AfterImgShape0::Update() nPosEnd is %d count %d %d->%d\n",
        v14,
        nCount,
        v2->m_nEndIndex,
        v2->m_nStartIndex);
      goto LABEL_18;
    }
    if ( 2 * v11 >= v15 )
    {
      sprintf(
        aaaa,
        "AfterImgShape0::Update() iX2 is %d count %d %d->%d\n",
        2 * v11,
        nCount,
        v2->m_nEndIndex,
        v2->m_nStartIndex);
      NetUtil::SendLog(aaaa);
      return 0;
    }
    v16 = 2 * v11 + 1;
    if ( v16 >= v15 )
    {
      sprintf(
        aaaa,
        "AfterImgShape0::Update() ix2+1 is %d count %d %d->%d\n",
        v16,
        nCount,
        v2->m_nEndIndex,
        v2->m_nStartIndex);
      NetUtil::SendLog(aaaa);
      return 0;
    }
    if ( v13 < 0 || v14 < 0 )
    {
      sprintf(aaaa, "AfterImgShape0::Update() nPosStart %d : nPosEnd  %d \n", v13, v14);
      NetUtil::SendLog(aaaa);
      return 0;
    }
    ms_exc.registration.TryLevel = 0;
    v17 = &pkVerts[2 * v11];
    v18 = (int)&v2->m_pkVertices[v13];
    v17->x = *(float *)v18;
    v17->y = *(float *)(v18 + 4);
    v17->z = *(float *)(v18 + 8);
    v19 = (int)&v2->m_pkVertices[v14];
    v17[1].x = *(float *)v19;
    v17[1].y = *(float *)(v19 + 4);
    v17[1].z = *(float *)(v19 + 8);
    ms_exc.registration.TryLevel = -2;
    nPosStart = nCount - 1;
    if ( nCount == 1 )
      v20 = 0.0;
    else
      v20 = (double)i / (double)nPosStart;
    *(float *)&nPosStart = v20;
    v40 = 1.0 - *(float *)&nPosStart;
    *(float *)&nPosStart = v40;
    v21 = &pkTextures[2 * v11];
    v22 = *(float *)&nPosStart;
    v21->x = *(float *)&nPosStart;
    v21->y = 1.0;
    v21[1].x = v22;
    v21[1].y = 0.0;
    if ( v2->m_bSmoothColor )
    {
      v23 = NiColorA::operator-(&v2->m_kColorEnd, &result, &v2->m_kColorStart);
      kColorTemp.r = v23->r;
      kColorTemp.g = v23->g;
      kColorTemp.b = v23->b;
      kColorTemp.a = v23->a;
      *(float *)&nPosStart = v40;
      v24 = NiColorA::operator*(&kColorTemp, &v33, *(float *)&nPosStart);
      v25 = NiColorA::operator+(&v2->m_kColorStart, &v34, v24);
      v26 = v25->r;
      v27 = v25->g;
      kColorTemp.b = v25->b;
      v28 = v25->a;
    }
    else
    {
      v26 = v2->m_kColorStart.r;
      v27 = v2->m_kColorStart.g;
      kColorTemp.b = v2->m_kColorStart.b;
      v28 = v2->m_kColorStart.a;
    }
    kColorTemp.a = v28;
    v29 = &pkColors[2 * v11];
    v29->r = v26;
    v29->g = v27;
    v29->b = kColorTemp.b;
    v30 = kColorTemp.a;
    v29->a = kColorTemp.a;
    v29[1].r = v26;
    v29[1].g = v27;
    v29[1].b = kColorTemp.b;
    v29[1].a = v30;
    ++v11;
    v8 = pkVerts;
    v5 = nCount;
  }
  if ( v5 == 1 )
  {
    v8[2].x = v8->x;
    v8[2].y = v8->y;
    v8[2].z = v8->z;
    v8[3].x = v8[1].x;
    v8[3].y = v8[1].y;
    v8[3].z = v8[1].z;
    nCount = 2;
    v5 = 2;
  }
  v31 = v2->m_spkTriShape.m_pObject->m_spModelData.m_pObject;
  v31->vfptr[18].__vecDelDtor((NiRefObject *)v2->m_spkTriShape.m_pObject->m_spModelData.m_pObject, 2 * v5 - 2);
  v31->vfptr[15].__vecDelDtor((NiRefObject *)v31, 2 * nCount);
  v31->m_usDirtyFlags |= 0xDu;
  NiBound::ComputeFromData(&kBound, 2 * nCount, v8);
  v2->m_spkTriShape.m_pObject->m_spModelData.m_pObject->m_kBound = kBound;
  NiAVObject::Update((NiAVObject *)&v2->m_spkTriShape.m_pObject->vfptr, 0.0, 1);
  return 1;
}

//----- (0068BBD0) --------------------------------------------------------
void __thiscall AfterImgShape1::AfterImgShape1(AfterImgShape1 *this)
{
  AfterImgShape1 *v1; // esi@1

  v1 = this;
  AfterImgShape::AfterImgShape((AfterImgShape *)&this->vfptr);
  v1->vfptr = (AfterImgShapeVtbl *)&AfterImgShape1::`vftable';
  v1->m_kpos3Temp = NiPoint3::ZERO;
}
// 9BCD3C: using guessed type int (__thiscall *AfterImgShape1::`vftable')(void *p, char);

//----- (0068BC00) --------------------------------------------------------
void __thiscall AfterImgShape1::~AfterImgShape1(AfterImgShape1 *this)
{
  this->vfptr = (AfterImgShapeVtbl *)&AfterImgShape1::`vftable';
  AfterImgShape::~AfterImgShape((AfterImgShape *)&this->vfptr);
}
// 9BCD3C: using guessed type int (__thiscall *AfterImgShape1::`vftable')(void *p, char);

//----- (0068BC10) --------------------------------------------------------
char __thiscall AfterImgShape1::Update(AfterImgShape1 *this, float _fTime)
{
  AfterImgShape1 *v2; // esi@1
  int v4; // ebx@5
  int v5; // ebx@5
  NiGeometryData *v6; // eax@7
  NiPoint2 *v7; // ecx@7
  int v8; // ebx@7
  NiTriShapeDynamicData *v9; // edi@7
  int v10; // edx@7
  double v11; // st7@8
  double v12; // st6@8
  double v13; // st5@8
  int v14; // eax@9
  int v15; // ebx@9
  int v16; // ecx@9
  NiPoint3 *v17; // eax@13
  int v18; // ebx@13
  int v19; // ecx@14
  double v20; // st4@14
  int v21; // ecx@14
  double v22; // st4@14
  NiPoint3 *v23; // ecx@15
  NiPoint3 *v24; // eax@18
  int v25; // edi@18
  float v26; // edx@19
  double v27; // st7@19
  double v28; // st7@19
  NiPoint3 *v29; // eax@21
  int v30; // edx@21
  double v31; // st6@21
  char *v32; // eax@21
  NiPoint3 *v33; // ecx@21
  double v34; // st7@21
  double v35; // st7@21
  NiPoint2 *v36; // eax@21
  double v37; // st7@21
  NiColorA *v38; // eax@22
  float v39; // ecx@22
  float v40; // edx@22
  float v41; // edx@22
  float v42; // eax@22
  NiColorA *v43; // eax@22
  NiColorA *v44; // eax@22
  float v45; // ecx@22
  float v46; // edi@22
  float v47; // ebx@22
  float v48; // eax@22
  NiColorA *v49; // eax@24
  double v50; // st6@24
  float v51; // edx@24
  double v52; // st5@24
  double v53; // rtt@24
  float v54; // edx@28
  NiPoint3 *v55; // eax@28
  NiPoint3 *v56; // ecx@28
  NiColorA *v57; // edx@28
  NiPoint2 *v58; // eax@28
  void *(__thiscall *v59)(NiRefObject *, unsigned int); // edx@29
  NiPoint3 *v60; // eax@30
  NiPoint3 *fTime; // [sp+8h] [bp-208h]@15
  NiPoint3 *fScalar; // [sp+Ch] [bp-204h]@15
  NiColorA v63; // [sp+1Ch] [bp-1F4h]@22
  NiColorA v64; // [sp+2Ch] [bp-1E4h]@22
  NiColorA v65; // [sp+3Ch] [bp-1D4h]@22
  char v66; // [sp+4Ch] [bp-1C4h]@15
  NiPoint3 result; // [sp+58h] [bp-1B8h]@17
  double v68; // [sp+64h] [bp-1ACh]@21
  NiPoint3 kpos3LineDir; // [sp+6Ch] [bp-1A4h]@14
  NiPoint3 kpos3OldLineDir; // [sp+78h] [bp-198h]@17
  NiPoint2 *pkTextures; // [sp+84h] [bp-18Ch]@7
  float v72; // [sp+88h] [bp-188h]@19
  float v73; // [sp+8Ch] [bp-184h]@19
  float v74; // [sp+90h] [bp-180h]@19
  float v75; // [sp+94h] [bp-17Ch]@19
  float v76; // [sp+98h] [bp-178h]@19
  float v77; // [sp+9Ch] [bp-174h]@19
  float v78; // [sp+A0h] [bp-170h]@21
  float v79; // [sp+A4h] [bp-16Ch]@21
  float v80; // [sp+A8h] [bp-168h]@21
  float v81; // [sp+ACh] [bp-164h]@21
  float v82; // [sp+B0h] [bp-160h]@21
  float v83; // [sp+B4h] [bp-15Ch]@21
  NiColorA *pkColors; // [sp+B8h] [bp-158h]@7
  float v85; // [sp+BCh] [bp-154h]@21
  float v86; // [sp+C0h] [bp-150h]@21
  float v87; // [sp+C4h] [bp-14Ch]@21
  float v88; // [sp+C8h] [bp-148h]@21
  float v89; // [sp+CCh] [bp-144h]@21
  float v90; // [sp+D0h] [bp-140h]@21
  NiBound kBound; // [sp+D4h] [bp-13Ch]@22
  NiPoint3 pos3CameraDir; // [sp+E4h] [bp-12Ch]@5
  char v93[12]; // [sp+F0h] [bp-120h]@14
  int i; // [sp+FCh] [bp-114h]@7
  NiTriShapeDynamicData *pkData; // [sp+100h] [bp-110h]@7
  int nCount; // [sp+104h] [bp-10Ch]@7
  int nPosStart; // [sp+108h] [bp-108h]@9
  char log[256]; // [sp+10Ch] [bp-104h]@31

  v2 = this;
  if ( !this->m_bStart || this->m_bPause || !pkWorldCamera )
    return 0;
  v4 = this->m_nEndIndex;
  pos3CameraDir.x = pkWorldCamera->m_kWorld.m_Rotate.m_pEntry[0][0];
  v5 = v4 - this->m_nStartIndex;
  pos3CameraDir.y = pkWorldCamera->m_kWorld.m_Rotate.m_pEntry[1][0];
  pos3CameraDir.z = pkWorldCamera->m_kWorld.m_Rotate.m_pEntry[2][0];
  if ( v5 < 0 )
    v5 += this->m_nTotalVertexCnt;
  v6 = this->m_spkTriShape.m_pObject->m_spModelData.m_pObject;
  v7 = v6->m_pkTexture;
  v8 = v5 + 1;
  v9 = (NiTriShapeDynamicData *)v6->m_pkVertex;
  pkColors = v6->m_pkColor;
  v10 = 0;
  nCount = v8;
  pkData = v9;
  pkTextures = v7;
  i = 0;
  if ( v8 > 0 )
  {
    v11 = pos3CameraDir.z;
    v12 = pos3CameraDir.y;
    v13 = pos3CameraDir.x;
    while ( 1 )
    {
      v14 = v2->m_nTotalVertexCnt;
      v15 = v10 + v2->m_nStartIndex;
      nPosStart = v15;
      v16 = v15 + 1;
      if ( v15 >= v14 )
      {
        v15 -= v14;
        nPosStart = v15;
      }
      if ( v16 >= v14 )
        v16 -= v14;
      v17 = v2->m_pkVertices;
      v18 = v15;
      if ( nCount <= 1 )
      {
        v9->vfptr = (NiRefObjectVtbl *)LODWORD(v17[v18].x);
        v9->m_uiRefCount = LODWORD(v17[v18].y);
        v9->m_pkGroup = (NiObjectGroup *)LODWORD(v17[v18].z);
        v60 = v2->m_pkVertices;
        *(float *)&v9->m_usVertices = v60[v18].x;
        v9->m_kBound.m_kCenter.x = v60[v18].y;
        v9->m_kBound.m_kCenter.y = v60[v18].z;
        goto LABEL_25;
      }
      v19 = 3 * v16;
      v20 = v17[v18].x - v17[4 * v19 / 0xCu].x;
      v21 = (int)&v17[4 * v19 / 0xCu];
      *(float *)v93 = v20;
      *(float *)&v93[4] = v17[v18].y - *(float *)(v21 + 4);
      v22 = v17[v18].z - *(float *)(v21 + 8);
      kpos3LineDir = *(NiPoint3 *)v93;
      *(float *)&v93[8] = v22;
      if ( v10 )
      {
        if ( v10 != nCount - 1 )
        {
          v25 = (int)&v2->m_kpos3Temp;
          v75 = *(float *)&v93[4] * v11 - *(float *)&v93[8] * v12;
          v76 = *(float *)&v93[8] * v13 - v11 * *(float *)v93;
          v77 = *(float *)v93 * v12 - *(float *)&v93[4] * v13;
          v72 = v75 + v2->m_kpos3Temp.x;
          v73 = v2->m_kpos3Temp.y + v76;
          v26 = v73;
          v27 = v2->m_kpos3Temp.z;
          *(float *)v25 = v72;
          v28 = v27 + v77;
          *(float *)(v25 + 4) = v26;
          v74 = v28;
          *(float *)(v25 + 8) = v74;
          NiPoint3::Unitize(&v2->m_kpos3Temp);
          goto LABEL_20;
        }
        fScalar = &pos3CameraDir;
        fTime = &result;
        v23 = &kpos3OldLineDir;
      }
      else
      {
        fScalar = &pos3CameraDir;
        fTime = (NiPoint3 *)&v66;
        v23 = &kpos3LineDir;
      }
      v24 = NiPoint3::UnitCross(v23, fTime, fScalar);
      v25 = (int)&v2->m_kpos3Temp;
      *(float *)v25 = v24->x;
      *(float *)(v25 + 4) = v24->y;
      *(float *)(v25 + 8) = v24->z;
LABEL_20:
      kpos3OldLineDir.z = *(float *)&v93[8];
      kpos3OldLineDir.x = *(float *)v93;
      kpos3OldLineDir.y = *(float *)&v93[4];
      if ( nPosStart >= v2->m_nTotalVertexCnt )
      {
        sprintf(
          log,
          "AfterImgShape1::Update() nPosStart is %d count %d %d->%d\n",
          nPosStart,
          nCount,
          v2->m_nEndIndex,
          v2->m_nStartIndex);
        NetUtil::SendLog(log);
        return 0;
      }
      v29 = v2->m_pkVertices;
      v30 = i;
      *(float *)&nPosStart = v2->m_fWidth * 0.5;
      v88 = *(float *)&nPosStart * *(float *)v25;
      v89 = *(float *)&nPosStart * *(float *)(v25 + 4);
      v90 = *(float *)&nPosStart * *(float *)(v25 + 8);
      v78 = v29[v18].x + v88;
      v79 = v29[v18].y + v89;
      v31 = v29[v18].z + v90;
      v32 = (char *)pkData + 24 * i;
      *(float *)v32 = v78;
      v80 = v31;
      *((float *)v32 + 1) = v79;
      *((float *)v32 + 2) = v80;
      v33 = v2->m_pkVertices;
      *(float *)&nPosStart = 0.5 * v2->m_fWidth;
      v85 = *(float *)&nPosStart * *(float *)v25;
      v86 = *(float *)&nPosStart * *(float *)(v25 + 4);
      v87 = *(float *)&nPosStart * *(float *)(v25 + 8);
      v81 = v33[v18].x - v85;
      v82 = v33[v18].y - v86;
      v34 = v33[v18].z - v87;
      *((float *)v32 + 3) = v81;
      *((float *)v32 + 4) = v82;
      v83 = v34;
      v35 = (double)i;
      *((float *)v32 + 5) = v83;
      v36 = &pkTextures[2 * v30];
      *(float *)&nPosStart = v35 / (double)(nCount - 1);
      v68 = 1.0 - *(float *)&nPosStart;
      *(float *)&nPosStart = v68;
      v37 = *(float *)&nPosStart;
      v36->x = *(float *)&nPosStart;
      v36->y = 1.0;
      v36[1].x = v37;
      v36[1].y = 0.0;
      if ( v2->m_bSmoothColor )
      {
        v38 = NiColorA::operator-(&v2->m_kColorEnd, &v65, &v2->m_kColorStart);
        v39 = v38->g;
        *(float *)&nPosStart = v68;
        v40 = v38->r;
        kBound.m_kCenter.y = v39;
        kBound.m_kCenter.x = v40;
        v41 = v38->b;
        v42 = v38->a;
        kBound.m_kCenter.z = v41;
        kBound.m_fRadius = v42;
        v43 = NiColorA::operator*((NiColorA *)&kBound, &v63, *(float *)&nPosStart);
        v44 = NiColorA::operator+(&v2->m_kColorStart, &v64, v43);
        v45 = v44->r;
        v46 = v44->g;
        v47 = v44->b;
        v48 = v44->a;
        v30 = i;
      }
      else
      {
        v45 = v2->m_kColorStart.r;
        v46 = v2->m_kColorStart.g;
        v47 = v2->m_kColorStart.b;
        v48 = v2->m_kColorStart.a;
      }
      kBound.m_fRadius = v48;
      v49 = &pkColors[2 * v30];
      v50 = pos3CameraDir.x;
      v51 = kBound.m_fRadius;
      v52 = pos3CameraDir.y;
      v11 = pos3CameraDir.z;
      v49->r = v45;
      v53 = v52;
      v13 = v50;
      v12 = v53;
      v49[1].r = v45;
      v49->g = v46;
      v49[1].g = v46;
      v9 = pkData;
      v49->b = v47;
      v49[1].b = v47;
      v49->a = v51;
      v49[1].a = v51;
      v10 = i;
LABEL_25:
      i = ++v10;
      if ( v10 >= nCount )
      {
        v8 = nCount;
        break;
      }
    }
  }
  if ( v8 == 1 )
  {
    v54 = *(float *)&v9->m_uiRefCount;
    v55 = (NiPoint3 *)v9->m_pkGroup;
    LODWORD(v9->m_kBound.m_kCenter.z) = v9->vfptr;
    v56 = *(NiPoint3 **)&v9->m_usVertices;
    v9->m_kBound.m_fRadius = v54;
    v57 = (NiColorA *)LODWORD(v9->m_kBound.m_kCenter.x);
    v9->m_pkVertex = v55;
    v58 = (NiPoint2 *)LODWORD(v9->m_kBound.m_kCenter.y);
    v9->m_pkNormal = v56;
    nCount = 2;
    v8 = 2;
    v9->m_pkColor = v57;
    v9->m_pkTexture = v58;
  }
  v59 = v2->m_spkTriShape.m_pObject->m_spModelData.m_pObject->vfptr[18].__vecDelDtor;
  pkData = (NiTriShapeDynamicData *)v2->m_spkTriShape.m_pObject->m_spModelData.m_pObject;
  ((void (__stdcall *)(int))v59)(2 * v8 - 2);
  ((void (__stdcall *)(int))pkData->vfptr[15].__vecDelDtor)(2 * v8);
  pkData->m_usDirtyFlags |= 0xDu;
  NiBound::ComputeFromData(&kBound, 2 * v8, (NiPoint3 *)v9);
  v2->m_spkTriShape.m_pObject->m_spModelData.m_pObject->m_kBound = kBound;
  NiAVObject::Update((NiAVObject *)&v2->m_spkTriShape.m_pObject->vfptr, 0.0, 1);
  return 1;
}

//----- (0068C230) --------------------------------------------------------
void __thiscall AfterImgShape0::Init(AfterImgShape0 *this, int _nVertexCnt)
{
  AfterImgShape0 *v2; // esi@1
  NiTriShape *v3; // ebx@1
  int v4; // eax@3
  int v5; // ecx@3
  int v6; // edi@3
  char *v7; // eax@3
  int v8; // edi@4
  int v9; // ecx@5
  unsigned __int16 *v10; // edi@9
  int v11; // edx@9
  int v12; // eax@10
  int v13; // edi@11
  int v14; // ebx@11
  NiTriShapeDynamicData *v15; // eax@13
  NiTriShapeData *v16; // eax@14
  NiTriShapeData *v17; // edi@14
  NiTriShape *v18; // eax@16
  NiTriShape *v19; // eax@17
  NiTriShape *v20; // edi@18
  int v21; // eax@25
  NiObjectNET *v22; // eax@25
  NiObjectNET *v23; // edi@25
  NiAlphaProperty *v24; // ebx@26
  NiAlphaProperty *v25; // edi@28
  int v26; // edi@35
  NiTriShape *v27; // ebx@35
  NiObjectNET *v28; // eax@40
  NiObjectNET *v29; // edi@40
  NiZBufferProperty *v30; // ebx@41
  NiZBufferProperty *v31; // edi@43
  int v32; // edi@50
  NiTriShape *v33; // ebx@50
  NiStencilProperty *v34; // ebx@52
  NiObjectNET *v35; // eax@55
  NiObjectNET *v36; // edi@55
  NiStencilProperty *v37; // edi@57
  int v38; // edi@64
  NiTriShape *v39; // esi@64
  NiPoint3 *pkVertex; // [sp+20h] [bp-18h]@3
  NiPoint2 *pkTexture; // [sp+24h] [bp-14h]@3
  unsigned __int16 *pkIndex; // [sp+28h] [bp-10h]@9

  v2 = this;
  this->m_nTotalVertexCnt = _nVertexCnt;
  v3 = 0;
  if ( this->m_pkVertices )
    operator delete(this->m_pkVertices);
  v4 = 24 * v2->m_nTotalVertexCnt;
  v5 = 12 * (unsigned __int64)(unsigned int)(2 * v2->m_nTotalVertexCnt) >> 32 != 0;
  v2->m_pkVertices = 0;
  v2->m_pkVertices = (NiPoint3 *)operator new[](v4 | -v5);
  pkVertex = (NiPoint3 *)operator new[](24 * v2->m_nTotalVertexCnt);
  pkTexture = (NiPoint2 *)operator new[](16 * v2->m_nTotalVertexCnt);
  v6 = 2 * v2->m_nTotalVertexCnt;
  v7 = (char *)operator new[](32 * v2->m_nTotalVertexCnt);
  if ( v7 )
  {
    v8 = v6 - 1;
    if ( v8 >= 0 )
    {
      v9 = (int)(v7 + 8);
      do
      {
        *(float *)(v9 - 8) = 0.0;
        v9 += 16;
        --v8;
        *(float *)(v9 - 20) = 0.0;
        *(float *)(v9 - 16) = 0.0;
        *(float *)(v9 - 12) = 0.0;
      }
      while ( v8 >= 0 );
    }
    _nVertexCnt = (int)v7;
  }
  else
  {
    _nVertexCnt = 0;
  }
  v10 = (unsigned __int16 *)operator new[](4 * (3 * v2->m_nTotalVertexCnt - 3));
  v11 = 0;
  pkIndex = v10;
  if ( v2->m_nTotalVertexCnt - 1 > 0 )
  {
    v12 = (int)(v10 + 2);
    do
    {
      v13 = 2 * v11 + 1;
      v14 = 2 * v11 + 2;
      *(_WORD *)(v12 - 4) = 2 * v11;
      *(_WORD *)(v12 + 4) = 2 * v11 + 3;
      *(_WORD *)(v12 - 2) = v13;
      *(_WORD *)v12 = v14;
      *(_WORD *)(v12 + 2) = v13;
      *(_WORD *)(v12 + 6) = v14;
      ++v11;
      v12 += 12;
    }
    while ( v11 < v2->m_nTotalVertexCnt - 1 );
    v10 = pkIndex;
    v3 = 0;
  }
  v15 = (NiTriShapeDynamicData *)operator new(0x5Cu);
  if ( v15 )
  {
    NiTriShapeDynamicData::NiTriShapeDynamicData(
      v15,
      2 * LOWORD(v2->m_nTotalVertexCnt),
      pkVertex,
      0,
      (NiColorA *)_nVertexCnt,
      pkTexture,
      1u,
      0,
      2 * LOWORD(v2->m_nTotalVertexCnt) - 2,
      v10,
      0,
      0);
    v17 = v16;
  }
  else
  {
    v17 = 0;
  }
  v17->m_kBound.m_kCenter.x = 0.0;
  v17->m_kBound.m_kCenter.y = 0.0;
  v17->m_kBound.m_kCenter.z = 0.0;
  v17->m_kBound.m_fRadius = 10000.0;
  v18 = (NiTriShape *)operator new(0xC4u);
  _nVertexCnt = (int)v18;
  if ( v18 )
  {
    NiTriShape::NiTriShape(v18, v17);
    v3 = v19;
  }
  v20 = v2->m_spkTriShape.m_pObject;
  if ( v20 != v3 )
  {
    if ( v20 && !InterlockedDecrement((volatile LONG *)&v20->m_uiRefCount) && v20 )
      v20->vfptr->__vecDelDtor((NiRefObject *)v20, 1u);
    v2->m_spkTriShape.m_pObject = v3;
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
  v21 = ((int (__stdcall *)(signed int))NiGeometryGroupManager::ms_pkManager->vfptr->CreateGroup)(2);
  ((void (__stdcall *)(int, NiGeometryData *, _DWORD))NiGeometryGroupManager::ms_pkManager->vfptr->AddObjectToGroup)(
    v21,
    v2->m_spkTriShape.m_pObject->m_spModelData.m_pObject,
    0);
  NiObjectNET::SetName((NiObjectNET *)&v2->m_spkTriShape.m_pObject->vfptr, "The Swoosh");
  v22 = (NiObjectNET *)operator new(0x20u);
  v23 = v22;
  _nVertexCnt = (int)v22;
  if ( v22 )
  {
    NiObjectNET::NiObjectNET(v22);
    v23->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
    LOWORD(v23[1].vfptr) = 236;
    BYTE2(v23[1].vfptr) = 0;
    v24 = (NiAlphaProperty *)v23;
  }
  else
  {
    v24 = 0;
  }
  v25 = v2->m_spkAlphaProp.m_pObject;
  if ( v25 != v24 )
  {
    if ( v25 && !InterlockedDecrement((volatile LONG *)&v25->m_uiRefCount) && v25 )
      v25->vfptr->__vecDelDtor((NiRefObject *)v25, 1u);
    v2->m_spkAlphaProp.m_pObject = v24;
    if ( v24 )
      InterlockedIncrement((volatile LONG *)&v24->m_uiRefCount);
  }
  v2->m_spkAlphaProp.m_pObject->m_uFlags |= 1u;
  v2->m_spkAlphaProp.m_pObject->m_uFlags |= 0x200u;
  v2->m_spkAlphaProp.m_pObject->m_uFlags = v2->m_spkAlphaProp.m_pObject->m_uFlags & 0xF3FF | 0x1000;
  v2->m_spkAlphaProp.m_pObject->m_ucAlphaTestRef = 0;
  v2->m_spkAlphaProp.m_pObject->m_uFlags = v2->m_spkAlphaProp.m_pObject->m_uFlags & 0xFFED | 0xC;
  v2->m_spkAlphaProp.m_pObject->m_uFlags = v2->m_spkAlphaProp.m_pObject->m_uFlags & 0xFEFF | 0xE0;
  v26 = (int)v2->m_spkAlphaProp.m_pObject;
  v27 = v2->m_spkTriShape.m_pObject;
  _nVertexCnt = v26;
  if ( v26 )
    InterlockedIncrement((volatile LONG *)(v26 + 4));
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v27->m_kPropertyList,
    (NiPointer<NiRoom> *)&_nVertexCnt);
  if ( v26 && !InterlockedDecrement((volatile LONG *)(v26 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v26)(v26, 1);
  v28 = (NiObjectNET *)operator new(0x24u);
  v29 = v28;
  _nVertexCnt = (int)v28;
  if ( v28 )
  {
    NiObjectNET::NiObjectNET(v28);
    v29->vfptr = (NiRefObjectVtbl *)&NiZBufferProperty::`vftable';
    LOWORD(v29[1].vfptr) = 3;
    v29[1].m_uiRefCount = 3;
    v30 = (NiZBufferProperty *)v29;
  }
  else
  {
    v30 = 0;
  }
  v31 = v2->m_spkZBufferProp.m_pObject;
  if ( v31 != v30 )
  {
    if ( v31 && !InterlockedDecrement((volatile LONG *)&v31->m_uiRefCount) && v31 )
      v31->vfptr->__vecDelDtor((NiRefObject *)v31, 1u);
    v2->m_spkZBufferProp.m_pObject = v30;
    if ( v30 )
      InterlockedIncrement((volatile LONG *)&v30->m_uiRefCount);
  }
  v2->m_spkZBufferProp.m_pObject->m_uFlags &= 0xFFFDu;
  v32 = (int)v2->m_spkZBufferProp.m_pObject;
  v33 = v2->m_spkTriShape.m_pObject;
  _nVertexCnt = v32;
  if ( v32 )
    InterlockedIncrement((volatile LONG *)(v32 + 4));
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v33->m_kPropertyList,
    (NiPointer<NiRoom> *)&_nVertexCnt);
  v34 = 0;
  if ( v32 && !InterlockedDecrement((volatile LONG *)(v32 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v32)(v32, 1);
  v35 = (NiObjectNET *)operator new(0x3Cu);
  v36 = v35;
  _nVertexCnt = (int)v35;
  if ( v35 )
  {
    NiObjectNET::NiObjectNET(v35);
    v36[1].m_pcName = 0;
    v36[1].m_ppkExtra = 0;
    v36[1].m_uiExtraDataSize = 0;
    v36[2].vfptr = 0;
    v36->vfptr = (NiRefObjectVtbl *)&NiStencilProperty::`vftable';
    LOBYTE(v36[1].vfptr) = 0;
    v36[1].m_uiRefCount = 4;
    v36[1].m_spControllers.m_pObject = (NiTimeController *)-1;
    v36[1].m_uiMaxSize = 3;
    v34 = (NiStencilProperty *)v36;
  }
  v37 = v2->m_spkStencilProp.m_pObject;
  if ( v37 != v34 )
  {
    if ( v37 && !InterlockedDecrement((volatile LONG *)&v37->m_uiRefCount) && v37 )
      v37->vfptr->__vecDelDtor((NiRefObject *)v37, 1u);
    v2->m_spkStencilProp.m_pObject = v34;
    if ( v34 )
      InterlockedIncrement((volatile LONG *)&v34->m_uiRefCount);
  }
  v2->m_spkStencilProp.m_pObject->m_eDrawMode = 3;
  v38 = (int)v2->m_spkStencilProp.m_pObject;
  v39 = v2->m_spkTriShape.m_pObject;
  _nVertexCnt = v38;
  if ( v38 )
    InterlockedIncrement((volatile LONG *)(v38 + 4));
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v39->m_kPropertyList,
    (NiPointer<NiRoom> *)&_nVertexCnt);
  if ( v38 )
  {
    if ( !InterlockedDecrement((volatile LONG *)(v38 + 4)) )
      (**(void (__thiscall ***)(_DWORD, _DWORD))v38)(v38, 1);
  }
}
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);
// 97BD2C: using guessed type int (__thiscall *NiZBufferProperty::`vftable')(void *p, char);
// 9BCCCC: using guessed type int (__thiscall *NiStencilProperty::`vftable')(void *p, char);
// B62640: using guessed type struct NiGeometryGroupManager *NiGeometryGroupManager::ms_pkManager;

//----- (0068C7A0) --------------------------------------------------------
void __thiscall AfterImgShape1::Init(AfterImgShape1 *this, int _nVertexCnt)
{
  AfterImgShape1 *v2; // esi@1
  NiTriShape *v3; // ebx@1
  int v4; // eax@3
  int v5; // ecx@3
  int v6; // edi@3
  char *v7; // eax@3
  int v8; // edi@4
  int v9; // ecx@5
  unsigned __int16 *v10; // edi@9
  int v11; // edx@9
  int v12; // eax@10
  int v13; // edi@11
  int v14; // ebx@11
  NiTriShapeDynamicData *v15; // eax@13
  NiTriShapeData *v16; // eax@14
  NiTriShapeData *v17; // edi@14
  NiTriShape *v18; // eax@16
  NiTriShape *v19; // eax@17
  NiTriShape *v20; // edi@18
  int v21; // eax@25
  NiObjectNET *v22; // eax@25
  NiObjectNET *v23; // edi@25
  NiAlphaProperty *v24; // ebx@26
  NiAlphaProperty *v25; // edi@28
  int v26; // edi@35
  NiTriShape *v27; // ebx@35
  NiObjectNET *v28; // eax@40
  NiObjectNET *v29; // edi@40
  NiZBufferProperty *v30; // ebx@41
  NiZBufferProperty *v31; // edi@43
  int v32; // edi@50
  NiTriShape *v33; // ebx@50
  NiStencilProperty *v34; // ebx@52
  NiObjectNET *v35; // eax@55
  NiObjectNET *v36; // edi@55
  NiStencilProperty *v37; // edi@57
  int v38; // edi@64
  NiTriShape *v39; // esi@64
  NiPoint3 *pkVertex; // [sp+20h] [bp-18h]@3
  NiPoint2 *pkTexture; // [sp+24h] [bp-14h]@3
  unsigned __int16 *pkIndex; // [sp+28h] [bp-10h]@9

  v2 = this;
  this->m_nTotalVertexCnt = _nVertexCnt;
  v3 = 0;
  if ( this->m_pkVertices )
    operator delete(this->m_pkVertices);
  v4 = 12 * v2->m_nTotalVertexCnt;
  v5 = 12 * (unsigned __int64)v2->m_nTotalVertexCnt >> 32 != 0;
  v2->m_pkVertices = 0;
  v2->m_pkVertices = (NiPoint3 *)operator new[](v4 | -v5);
  pkVertex = (NiPoint3 *)operator new[](24 * v2->m_nTotalVertexCnt);
  pkTexture = (NiPoint2 *)operator new[](16 * v2->m_nTotalVertexCnt);
  v6 = 2 * v2->m_nTotalVertexCnt;
  v7 = (char *)operator new[](32 * v2->m_nTotalVertexCnt);
  if ( v7 )
  {
    v8 = v6 - 1;
    if ( v8 >= 0 )
    {
      v9 = (int)(v7 + 8);
      do
      {
        *(float *)(v9 - 8) = 0.0;
        v9 += 16;
        --v8;
        *(float *)(v9 - 20) = 0.0;
        *(float *)(v9 - 16) = 0.0;
        *(float *)(v9 - 12) = 0.0;
      }
      while ( v8 >= 0 );
    }
    _nVertexCnt = (int)v7;
  }
  else
  {
    _nVertexCnt = 0;
  }
  v10 = (unsigned __int16 *)operator new[](4 * (3 * v2->m_nTotalVertexCnt - 3));
  v11 = 0;
  pkIndex = v10;
  if ( v2->m_nTotalVertexCnt - 1 > 0 )
  {
    v12 = (int)(v10 + 2);
    do
    {
      v13 = 2 * v11 + 1;
      v14 = 2 * v11 + 2;
      *(_WORD *)(v12 - 4) = 2 * v11;
      *(_WORD *)(v12 + 4) = 2 * v11 + 3;
      *(_WORD *)(v12 - 2) = v13;
      *(_WORD *)v12 = v14;
      *(_WORD *)(v12 + 2) = v13;
      *(_WORD *)(v12 + 6) = v14;
      ++v11;
      v12 += 12;
    }
    while ( v11 < v2->m_nTotalVertexCnt - 1 );
    v10 = pkIndex;
    v3 = 0;
  }
  v15 = (NiTriShapeDynamicData *)operator new(0x5Cu);
  if ( v15 )
  {
    NiTriShapeDynamicData::NiTriShapeDynamicData(
      v15,
      2 * LOWORD(v2->m_nTotalVertexCnt),
      pkVertex,
      0,
      (NiColorA *)_nVertexCnt,
      pkTexture,
      1u,
      0,
      2 * LOWORD(v2->m_nTotalVertexCnt) - 2,
      v10,
      0,
      0);
    v17 = v16;
  }
  else
  {
    v17 = 0;
  }
  v17->m_kBound.m_kCenter.x = 0.0;
  v17->m_kBound.m_kCenter.y = 0.0;
  v17->m_kBound.m_kCenter.z = 0.0;
  v17->m_kBound.m_fRadius = 50.0;
  v18 = (NiTriShape *)operator new(0xC4u);
  _nVertexCnt = (int)v18;
  if ( v18 )
  {
    NiTriShape::NiTriShape(v18, v17);
    v3 = v19;
  }
  v20 = v2->m_spkTriShape.m_pObject;
  if ( v20 != v3 )
  {
    if ( v20 && !InterlockedDecrement((volatile LONG *)&v20->m_uiRefCount) && v20 )
      v20->vfptr->__vecDelDtor((NiRefObject *)v20, 1u);
    v2->m_spkTriShape.m_pObject = v3;
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
  v21 = ((int (__stdcall *)(signed int))NiGeometryGroupManager::ms_pkManager->vfptr->CreateGroup)(2);
  ((void (__stdcall *)(int, NiGeometryData *, _DWORD))NiGeometryGroupManager::ms_pkManager->vfptr->AddObjectToGroup)(
    v21,
    v2->m_spkTriShape.m_pObject->m_spModelData.m_pObject,
    0);
  NiObjectNET::SetName((NiObjectNET *)&v2->m_spkTriShape.m_pObject->vfptr, "The Swoosh");
  v22 = (NiObjectNET *)operator new(0x20u);
  v23 = v22;
  _nVertexCnt = (int)v22;
  if ( v22 )
  {
    NiObjectNET::NiObjectNET(v22);
    v23->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
    LOWORD(v23[1].vfptr) = 236;
    BYTE2(v23[1].vfptr) = 0;
    v24 = (NiAlphaProperty *)v23;
  }
  else
  {
    v24 = 0;
  }
  v25 = v2->m_spkAlphaProp.m_pObject;
  if ( v25 != v24 )
  {
    if ( v25 && !InterlockedDecrement((volatile LONG *)&v25->m_uiRefCount) && v25 )
      v25->vfptr->__vecDelDtor((NiRefObject *)v25, 1u);
    v2->m_spkAlphaProp.m_pObject = v24;
    if ( v24 )
      InterlockedIncrement((volatile LONG *)&v24->m_uiRefCount);
  }
  v2->m_spkAlphaProp.m_pObject->m_uFlags |= 1u;
  v2->m_spkAlphaProp.m_pObject->m_uFlags |= 0x200u;
  v2->m_spkAlphaProp.m_pObject->m_uFlags = v2->m_spkAlphaProp.m_pObject->m_uFlags & 0xF3FF | 0x1000;
  v2->m_spkAlphaProp.m_pObject->m_ucAlphaTestRef = 0;
  v2->m_spkAlphaProp.m_pObject->m_uFlags = v2->m_spkAlphaProp.m_pObject->m_uFlags & 0xFFED | 0xC;
  v2->m_spkAlphaProp.m_pObject->m_uFlags = v2->m_spkAlphaProp.m_pObject->m_uFlags & 0xFEFF | 0xE0;
  v26 = (int)v2->m_spkAlphaProp.m_pObject;
  v27 = v2->m_spkTriShape.m_pObject;
  _nVertexCnt = v26;
  if ( v26 )
    InterlockedIncrement((volatile LONG *)(v26 + 4));
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v27->m_kPropertyList,
    (NiPointer<NiRoom> *)&_nVertexCnt);
  if ( v26 && !InterlockedDecrement((volatile LONG *)(v26 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v26)(v26, 1);
  v28 = (NiObjectNET *)operator new(0x24u);
  v29 = v28;
  _nVertexCnt = (int)v28;
  if ( v28 )
  {
    NiObjectNET::NiObjectNET(v28);
    v29->vfptr = (NiRefObjectVtbl *)&NiZBufferProperty::`vftable';
    LOWORD(v29[1].vfptr) = 3;
    v29[1].m_uiRefCount = 3;
    v30 = (NiZBufferProperty *)v29;
  }
  else
  {
    v30 = 0;
  }
  v31 = v2->m_spkZBufferProp.m_pObject;
  if ( v31 != v30 )
  {
    if ( v31 && !InterlockedDecrement((volatile LONG *)&v31->m_uiRefCount) && v31 )
      v31->vfptr->__vecDelDtor((NiRefObject *)v31, 1u);
    v2->m_spkZBufferProp.m_pObject = v30;
    if ( v30 )
      InterlockedIncrement((volatile LONG *)&v30->m_uiRefCount);
  }
  v2->m_spkZBufferProp.m_pObject->m_uFlags &= 0xFFFDu;
  v32 = (int)v2->m_spkZBufferProp.m_pObject;
  v33 = v2->m_spkTriShape.m_pObject;
  _nVertexCnt = v32;
  if ( v32 )
    InterlockedIncrement((volatile LONG *)(v32 + 4));
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v33->m_kPropertyList,
    (NiPointer<NiRoom> *)&_nVertexCnt);
  v34 = 0;
  if ( v32 && !InterlockedDecrement((volatile LONG *)(v32 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v32)(v32, 1);
  v35 = (NiObjectNET *)operator new(0x3Cu);
  v36 = v35;
  _nVertexCnt = (int)v35;
  if ( v35 )
  {
    NiObjectNET::NiObjectNET(v35);
    v36[1].m_pcName = 0;
    v36[1].m_ppkExtra = 0;
    v36[1].m_uiExtraDataSize = 0;
    v36[2].vfptr = 0;
    v36->vfptr = (NiRefObjectVtbl *)&NiStencilProperty::`vftable';
    LOBYTE(v36[1].vfptr) = 0;
    v36[1].m_uiRefCount = 4;
    v36[1].m_spControllers.m_pObject = (NiTimeController *)-1;
    v36[1].m_uiMaxSize = 3;
    v34 = (NiStencilProperty *)v36;
  }
  v37 = v2->m_spkStencilProp.m_pObject;
  if ( v37 != v34 )
  {
    if ( v37 && !InterlockedDecrement((volatile LONG *)&v37->m_uiRefCount) && v37 )
      v37->vfptr->__vecDelDtor((NiRefObject *)v37, 1u);
    v2->m_spkStencilProp.m_pObject = v34;
    if ( v34 )
      InterlockedIncrement((volatile LONG *)&v34->m_uiRefCount);
  }
  v2->m_spkStencilProp.m_pObject->m_eDrawMode = 3;
  v38 = (int)v2->m_spkStencilProp.m_pObject;
  v39 = v2->m_spkTriShape.m_pObject;
  _nVertexCnt = v38;
  if ( v38 )
    InterlockedIncrement((volatile LONG *)(v38 + 4));
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v39->m_kPropertyList,
    (NiPointer<NiRoom> *)&_nVertexCnt);
  if ( v38 )
  {
    if ( !InterlockedDecrement((volatile LONG *)(v38 + 4)) )
      (**(void (__thiscall ***)(_DWORD, _DWORD))v38)(v38, 1);
  }
}
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);
// 97BD2C: using guessed type int (__thiscall *NiZBufferProperty::`vftable')(void *p, char);
// 9BCCCC: using guessed type int (__thiscall *NiStencilProperty::`vftable')(void *p, char);
// B62640: using guessed type struct NiGeometryGroupManager *NiGeometryGroupManager::ms_pkManager;

//----- (0068CD10) --------------------------------------------------------
NiColorA *__thiscall NiColorA::operator+(NiColorA *this, NiColorA *result, NiColorA *c)
{
  NiColorA *v3; // eax@1
  float v4; // edx@1
  float v5; // ecx@1

  v3 = result;
  result->r = this->r;
  result->g = this->g;
  v4 = this->b;
  v5 = this->a;
  result->b = v4;
  result->a = v5;
  v3->r = v3->r + c->r;
  v3->g = c->g + v3->g;
  v3->b = c->b + v3->b;
  result->a = c->a + result->a;
  return v3;
}

//----- (0068CD60) --------------------------------------------------------
NiColorA *__thiscall NiColorA::operator-(NiColorA *this, NiColorA *result, NiColorA *c)
{
  NiColorA *v3; // eax@1
  float v4; // edx@1
  float v5; // ecx@1

  v3 = result;
  result->r = this->r;
  result->g = this->g;
  v4 = this->b;
  v5 = this->a;
  result->b = v4;
  result->a = v5;
  v3->r = v3->r - c->r;
  v3->g = v3->g - c->g;
  v3->b = v3->b - c->b;
  result->a = result->a - c->a;
  return v3;
}

//----- (0068CDB0) --------------------------------------------------------
NiColorA *__thiscall NiColorA::operator*(NiColorA *this, NiColorA *result, float fScalar)
{
  NiColorA *v3; // eax@1
  float v4; // edx@1
  float v5; // ecx@1

  v3 = result;
  result->r = this->r;
  result->g = this->g;
  v4 = this->b;
  v5 = this->a;
  result->b = v4;
  result->a = v5;
  v3->r = v3->r * fScalar;
  v3->g = fScalar * v3->g;
  result->b = result->b * fScalar;
  result->a = fScalar * result->a;
  return v3;
}

//----- (0068CE00) --------------------------------------------------------
NiRTTI *NiStencilProperty::GetRTTI()
{
  return &NiStencilProperty::m_RTTI;
}

//----- (0068CE10) --------------------------------------------------------
NiStencilProperty *__thiscall NiStencilProperty::`vector deleting destructor'(NiStencilProperty *this, unsigned int a2)
{
  NiStencilProperty *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiStencilProperty::`vftable';
  NiObjectNET::~NiObjectNET((NiObjectNET *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BCCCC: using guessed type int (__thiscall *NiStencilProperty::`vftable')(void *p, char);

//----- (0068CE40) --------------------------------------------------------
void __cdecl NetUtil::SendLog(char *_szLog)
{
  Net *v1; // esi@1
  char *v2; // eax@2
  char v3; // cl@3
  int wldmanhandle; // [sp+4h] [bp-Ch]@2
  int wLen; // [sp+8h] [bp-8h]@4
  NETCOMMAND netcmd; // [sp+Ch] [bp-4h]@2

  v1 = g_kNetMgr.m_spWorldMgr.m_pObject;
  if ( g_kNetMgr.m_spWorldMgr.m_pObject )
  {
    netcmd.protocol = 2063;
    PgNet::AddNetMsg((PgNet *)&g_kNetMgr.m_spWorldMgr.m_pObject->vfptr, &netcmd, 2);
    v2 = _szLog;
    wldmanhandle = g_kServer.m_kWorldMgrHandle;
    do
      v3 = *v2++;
    while ( v3 );
    wLen = (unsigned __int16)((_WORD)v2 - ((_WORD)_szLog + 1) + 1);
    PgNet::AddNetMsg((PgNet *)&v1->vfptr, &wldmanhandle, 2);
    PgNet::AddNetMsg((PgNet *)&v1->vfptr, &wLen, 2);
    PgNet::AddNetMsg((PgNet *)&v1->vfptr, _szLog, (unsigned __int16)wLen);
    PgNet::SendNetMsg((PgNet *)&v1->vfptr, 0, 0);
    PgNet::Flush((PgNet *)&v1->vfptr);
  }
}

//----- (0068CED0) --------------------------------------------------------
AfterImgShape *__thiscall AfterImgShape::`vector deleting destructor'(AfterImgShape *this, unsigned int a2)
{
  AfterImgShape *v2; // esi@1

  v2 = this;
  AfterImgShape::~AfterImgShape(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0068CF00) --------------------------------------------------------
AfterImgShape0 *__thiscall AfterImgShape0::`vector deleting destructor'(AfterImgShape0 *this, unsigned int a2)
{
  AfterImgShape0 *v2; // esi@1

  v2 = this;
  this->vfptr = (AfterImgShapeVtbl *)&AfterImgShape0::`vftable';
  AfterImgShape::~AfterImgShape((AfterImgShape *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BCD28: using guessed type int (__thiscall *AfterImgShape0::`vftable')(void *p, char);

//----- (0068CF30) --------------------------------------------------------
AfterImgShape1 *__thiscall AfterImgShape1::`vector deleting destructor'(AfterImgShape1 *this, unsigned int a2)
{
  AfterImgShape1 *v2; // esi@1

  v2 = this;
  this->vfptr = (AfterImgShapeVtbl *)&AfterImgShape1::`vftable';
  AfterImgShape::~AfterImgShape((AfterImgShape *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BCD3C: using guessed type int (__thiscall *AfterImgShape1::`vftable')(void *p, char);

//----- (0068CF60) --------------------------------------------------------
double __thiscall ArrowEff::GetSpeed(ArrowEff *this)
{
  return this->m_fSpeed;
}

//----- (0068CF70) --------------------------------------------------------
void __thiscall ArrowEff::SetSpeed(ArrowEff *this, float fSpeed)
{
  void (__stdcall *v2)(_DWORD); // edx@1

  v2 = *(void (__stdcall **)(_DWORD))&this->m_kMoveToTarget.vfptr->gap4[4];
  this->m_fSpeed = fSpeed;
  v2(LODWORD(fSpeed));
}

//----- (0068CFA0) --------------------------------------------------------
unsigned __int16 __thiscall ArrowEff::GetTargetChar(ArrowEff *this)
{
  return this->m_kTargetCharHandle;
}

//----- (0068CFB0) --------------------------------------------------------
void __thiscall ArrowEff::SetTargetChar(ArrowEff *this, unsigned __int16 kHandle)
{
  this->m_kTargetCharHandle = kHandle;
}

//----- (0068CFD0) --------------------------------------------------------
unsigned __int16 __thiscall ArrowEff::GetCasterChar(ArrowEff *this)
{
  return this->m_kCasterCharHandle;
}

//----- (0068CFE0) --------------------------------------------------------
void __thiscall ArrowEff::SetCasterChar(ArrowEff *this, unsigned __int16 kHandle)
{
  this->m_kCasterCharHandle = kHandle;
}

//----- (0068D000) --------------------------------------------------------
bool __thiscall ArrowEff::IsEnd(ArrowEff *this, float fTime)
{
  ArrowEff *v2; // esi@1
  bool result; // al@2
  float fTimea; // [sp+Ch] [bp+8h]@3

  v2 = this;
  result = 1;
  if ( !(unsigned __int8)((int (*)(void))this->vfptr[29].__vecDelDtor)() )
  {
    fTimea = fTime - v2->m_fStartTime;
    if ( v2->m_fLifeTime >= (double)fTimea )
      result = 0;
  }
  return result;
}

//----- (0068D040) --------------------------------------------------------
bool __thiscall ArrowEff::IsHitTarget(ArrowEff *this)
{
  return (unsigned __int8)(*(int (__thiscall **)(NpNs_MoveToTarget *))&this->m_kMoveToTarget.vfptr->gap4[0])(&this->m_kMoveToTarget) == 0;
}

//----- (0068D060) --------------------------------------------------------
void __thiscall ArrowEff::AddHitDamage(ArrowEff *this, unsigned int uiDamage, unsigned __int16 kTarget, unsigned int dwHpChangeSeqNo, unsigned int kTargetRestHP, bool bViewDamage, bool bRange, __int16 AtkSeqnum, __int16 SeqDmgNum)
{
  DamageInfoSet::AddDamage(
    &this->m_kDamageInfoSet,
    uiDamage,
    kTarget,
    dwHpChangeSeqNo,
    kTargetRestHP,
    bViewDamage,
    bRange,
    SeqDmgNum);
}

//----- (0068D090) --------------------------------------------------------
DamageInfo *__thiscall ArrowEff::GetDummyDmgInfo(ArrowEff *this)
{
  return DamageInfoSet::GetLastInvalidDmgInfo(&this->m_kDamageInfoSet);
}

//----- (0068D0A0) --------------------------------------------------------
void __thiscall ArrowEff::CopyMember(ArrowEff *this, Effect *pkEffect)
{
  ArrowEff *v2; // edi@1
  NiNode *v3; // ecx@1
  NiRefObjectVtbl *v4; // ebx@2
  NiObject *v5; // eax@2
  bool v6; // al@3
  NiRTTI *v7; // eax@5
  char v8; // al@8
  unsigned int v9; // eax@9

  v2 = this;
  v3 = this->m_spNode.m_pObject;
  if ( v3 )
  {
    v4 = pkEffect->vfptr;
    v5 = NiObject::Clone((NiObject *)&v3->vfptr);
    v4[3].__vecDelDtor((NiRefObject *)pkEffect, (unsigned int)v5);
  }
  pkEffect->m_fLifeTime = v2->m_fLifeTime;
  v6 = v2->m_bCreateProgramEff;
  pkEffect->m_bCreateProgramEff = v6;
  if ( v6 )
    Effect::CreateProgramEff(pkEffect);
  v7 = (NiRTTI *)((int (__thiscall *)(_DWORD))pkEffect->vfptr[1].__vecDelDtor)(pkEffect);
  if ( v7 )
  {
    while ( v7 != &ArrowEff::m_RTTI )
    {
      v7 = v7->m_pkBaseRTTI;
      if ( !v7 )
        goto LABEL_8;
    }
    v8 = 1;
  }
  else
  {
LABEL_8:
    v8 = 0;
  }
  v9 = v8 != 0 ? (unsigned int)pkEffect : 0;
  *(float *)(v9 + 524) = v2->m_fSpeed;
  *(_BYTE *)(v9 + 668) = v2->m_bHitDamageShow;
}

//----- (0068D130) --------------------------------------------------------
void __thiscall ArrowEff::StopWeaponAfterImgEff(ArrowEff *this)
{
  ArrowEff *v1; // edi@1
  AfterImgEff *v2; // ecx@1
  NiNode *v3; // eax@2
  AfterImgEff *v4; // esi@2

  v1 = this;
  v2 = this->m_spWeaponAfterImgEff.m_pObject;
  if ( v2 )
  {
    v3 = (NiNode *)((int (*)(void))v2->vfptr[2].__vecDelDtor)();
    World::DetachEffect(&g_kWorld, v3);
    v4 = v1->m_spWeaponAfterImgEff.m_pObject;
    if ( v4 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
      v1->m_spWeaponAfterImgEff.m_pObject = 0;
    }
  }
}

//----- (0068D190) --------------------------------------------------------
void __userpurge ArrowEff::Update(ArrowEff *this@<ecx>, float a2@<ebx>, int a3@<edi>, int a4@<esi>, float fTime)
{
  float fAngle; // ST24_4@1
  ArrowEff *v6; // ebx@1
  Char *v7; // eax@1
  Char *v8; // edi@1
  NiPoint3 *v9; // eax@4
  float v10; // edx@4
  NpNs_MoveToTargetVtbl *v11; // eax@4
  int v12; // eax@5
  void *(__thiscall *v13)(NiRefObject *, unsigned int); // edx@5
  int v14; // esi@7
  AfterImgEff *v15; // ecx@10
  float v16; // [sp+28h] [bp-74h]@0
  NiPoint3 pos3Dir; // [sp+2Ch] [bp-70h]@4
  NiPoint3 kPos; // [sp+38h] [bp-64h]@5
  NiPoint3 pos3TargetPos; // [sp+44h] [bp-58h]@4
  NiMatrix3 result; // [sp+50h] [bp-4Ch]@8
  NiMatrix3 rot; // [sp+74h] [bp-28h]@8

  fAngle = a2;
  v6 = this;
  Effect::Update((Effect *)&this->vfptr, fTime);
  ((void (__thiscall *)(NpNs_MoveToTarget *, _DWORD, int, int, _DWORD))v6->m_kMoveToTarget.vfptr->Update)(
    &v6->m_kMoveToTarget,
    LODWORD(fTime),
    a3,
    a4,
    LODWORD(fAngle));
  v7 = CharMgr::GetChar(&g_kCharMgr, v6->m_kTargetCharHandle);
  v8 = v7;
  if ( !v7 )
  {
    v6->m_kMoveToTarget.vfptr->Stop(&v6->m_kMoveToTarget);
    goto LABEL_14;
  }
  if ( !Char::IsUpdate(v7) )
  {
    v6->m_kMoveToTarget.vfptr->Stop(&v6->m_kMoveToTarget);
LABEL_14:
    ArrowEff::StopWeaponAfterImgEff(v6);
    return;
  }
  v9 = Char::GetChestPos(v8, &pos3Dir);
  pos3TargetPos.x = v9->x;
  pos3TargetPos.y = v9->y;
  v10 = v9->z;
  v11 = v6->m_kMoveToTarget.vfptr;
  pos3TargetPos.z = v10;
  v11->StartMove(&v6->m_kMoveToTarget, &pos3TargetPos);
  if ( v6->m_spNode.m_pObject )
  {
    v12 = (int)v6->m_kMoveToTarget.vfptr->GetCurrentPos(&v6->m_kMoveToTarget);
    kPos.x = *(float *)v12;
    kPos.y = *(float *)(v12 + 4);
    v13 = v6->vfptr[7].__vecDelDtor;
    kPos.z = *(float *)(v12 + 8);
    v13((NiRefObject *)&v6->vfptr, (unsigned int)&kPos);
    pos3Dir.x = kPos.x - pos3TargetPos.x;
    pos3Dir.y = kPos.y - pos3TargetPos.y;
    pos3Dir.z = kPos.z - pos3TargetPos.z;
    if ( NiPoint3::Unitize(&pos3Dir) < 20.0 )
    {
      v6->m_kMoveToTarget.vfptr->Stop(&v6->m_kMoveToTarget);
      ArrowEff::StopWeaponAfterImgEff(v6);
    }
    v14 = ((int (__stdcall *)(const char *))v6->m_spDefaultEffect.m_pObject->vfptr[18].__vecDelDtor)("MyWeapon");
    if ( v14 )
    {
      v16 = Timer::ms_fDeltaTime * fAng;
      NiMatrix3::MakeYRotation(&rot, v16);
      qmemcpy((void *)(v14 + 52), NiMatrix3::operator*((NiMatrix3 *)(v14 + 52), &result, &rot), 0x24u);
    }
    else
    {
      v6->vfptr[11].__vecDelDtor((NiRefObject *)v6, (unsigned int)&pos3Dir);
    }
  }
  v15 = v6->m_spWeaponAfterImgEff.m_pObject;
  if ( v15 )
  {
    if ( !(unsigned __int8)((int (__stdcall *)(_DWORD))v15->vfptr[19].__vecDelDtor)(LODWORD(fTime)) )
    {
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v6->m_spWeaponAfterImgEff.m_pObject->vfptr[14].__vecDelDtor)(
        LODWORD(fTime),
        LODWORD(v16),
        LODWORD(pos3Dir.x),
        LODWORD(pos3Dir.y),
        LODWORD(pos3Dir.z),
        LODWORD(kPos.x),
        LODWORD(kPos.y),
        LODWORD(kPos.z),
        LODWORD(pos3TargetPos.x),
        LODWORD(pos3TargetPos.y),
        LODWORD(pos3TargetPos.z),
        LODWORD(result.m_pEntry[0][0]),
        LODWORD(result.m_pEntry[0][1]),
        LODWORD(result.m_pEntry[0][2]),
        LODWORD(result.m_pEntry[1][0]),
        LODWORD(result.m_pEntry[1][1]),
        LODWORD(result.m_pEntry[1][2]),
        LODWORD(result.m_pEntry[2][0]),
        LODWORD(result.m_pEntry[2][1]),
        LODWORD(result.m_pEntry[2][2]),
        LODWORD(rot.m_pEntry[0][0]),
        LODWORD(rot.m_pEntry[0][1]),
        LODWORD(rot.m_pEntry[0][2]),
        LODWORD(rot.m_pEntry[1][0]),
        LODWORD(rot.m_pEntry[1][1]),
        LODWORD(rot.m_pEntry[1][2]),
        LODWORD(rot.m_pEntry[2][0]));
      return;
    }
    goto LABEL_14;
  }
}
// 68D190: could not find valid save-restore pair for ebx
// 68D190: could not find valid save-restore pair for edi
// 68D190: could not find valid save-restore pair for esi
// A8B980: using guessed type float Timer::ms_fDeltaTime;

//----- (0068D390) --------------------------------------------------------
void __thiscall ArrowEff::OnEnd(ArrowEff *this, float fTime)
{
  ArrowEff *v2; // esi@1
  Char *v3; // edi@2
  int v4; // eax@5
  LastEffPos v5; // eax@7
  int v6; // eax@9
  void (__thiscall *v7)(AbStateInfectee *, AbStateInst *, bool); // edx@9
  NiPoint3 *v8; // eax@9
  int v9; // eax@10
  AbStateInfecteeVtbl *v10; // edx@10
  double v11; // st7@10
  void (__thiscall *v12)(AbStateInfectee *, AbStateInst *, bool); // eax@10
  int v13; // eax@11
  _BYTE v14[12]; // ST10_12@12
  _BYTE v15[12]; // ST04_12@12
  Char *v16; // eax@13
  AfterImgEff *v17; // ecx@16
  NiNode *v18; // eax@17
  AfterImgEff *v19; // edi@17
  NiPoint3 result; // [sp+14h] [bp-18h]@11
  NiPoint3 kPos; // [sp+20h] [bp-Ch]@5

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[29].__vecDelDtor)() )
  {
    v3 = CharMgr::GetChar(&g_kCharMgr, v2->m_kTargetCharHandle);
    if ( v3 )
    {
      if ( v2->m_acBombEffectName[0] != 45 )
      {
        if ( v2 != (ArrowEff *)-628 )
        {
          v4 = ((int (__thiscall *)(ArrowEff *))v2->vfptr[8].__vecDelDtor)(v2);
          kPos.x = *(float *)v4;
          kPos.y = *(float *)(v4 + 4);
          kPos.z = *(float *)(v4 + 8);
          SoundMgr::CreateSound(&g_kSoundMgr, v2->m_acBombSndName, &kPos);
        }
        if ( v2->m_acBombEffectName[0] != 45 )
        {
          v5 = v2->m_ePlayPos;
          if ( v5 )
          {
            if ( v5 == 1 )
            {
              v9 = ((int (__thiscall *)(ArrowEff *))v2->vfptr[12].__vecDelDtor)(v2);
              v10 = v3->vfptr;
              kPos.x = -*(float *)v9;
              kPos.y = -*(float *)(v9 + 4);
              v11 = *(float *)(v9 + 8);
              v12 = v10[6].Deaffect;
              kPos.z = -v11;
              v8 = (NiPoint3 *)((int (__thiscall *)(Char *))v12)(v3);
            }
            else
            {
              v6 = ((int (__thiscall *)(ArrowEff *))v2->vfptr[12].__vecDelDtor)(v2);
              kPos.x = -*(float *)v6;
              kPos.y = -*(float *)(v6 + 4);
              v7 = v3->vfptr[6].Deaffect;
              kPos.z = -*(float *)(v6 + 8);
              v8 = (NiPoint3 *)((int (__thiscall *)(Char *))v7)(v3);
            }
          }
          else
          {
            v13 = ((int (__thiscall *)(_DWORD))v2->vfptr[12].__vecDelDtor)(v2);
            kPos.x = -*(float *)v13;
            kPos.y = -*(float *)(v13 + 4);
            kPos.z = -*(float *)(v13 + 8);
            v8 = Char::GetChestPos(v3, &result);
          }
          *(float *)v14 = kPos.x;
          *(_QWORD *)&v14[4] = *(_QWORD *)&kPos.y;
          *(float *)v15 = v8->x;
          *(_QWORD *)&v15[4] = *(_QWORD *)&v8->y;
          EffectMgr::CreateEffect(&g_kEffectMgr, v2->m_acBombEffectName, *(NiPoint3 *)v15, *(NiPoint3 *)v14, fTime, 1.0);
        }
      }
      v16 = CharMgr::GetChar(&g_kCharMgr, v2->m_kCasterCharHandle);
      if ( v16 )
        DamageInfoSet::Applicate(&v2->m_kDamageInfoSet, v16, 1);
      DamageInfoSet::Clear(&v2->m_kDamageInfoSet);
    }
  }
  v17 = v2->m_spWeaponAfterImgEff.m_pObject;
  if ( v17 )
  {
    v18 = (NiNode *)((int (*)(void))v17->vfptr[2].__vecDelDtor)();
    World::DetachEffect(&g_kWorld, v18);
    v19 = v2->m_spWeaponAfterImgEff.m_pObject;
    if ( v19 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v19->m_uiRefCount) )
      {
        if ( v19 )
          v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
      }
      v2->m_spWeaponAfterImgEff.m_pObject = 0;
    }
  }
}

//----- (0068D570) --------------------------------------------------------
void __thiscall ArrowEff::StartWeaponAfterImgEff(ArrowEff *this, float fCurTime, float fLifeTime)
{
  ArrowEff *v3; // esi@1
  AfterImgEff *v4; // ecx@1
  NiNode *v5; // eax@2
  AfterImgEff *v6; // edi@2
  int v7; // eax@7
  NiNode *v8; // eax@7
  AfterImgEff *v9; // eax@8
  AfterImgEff *v10; // edi@8
  AfterImgEff *v11; // ebx@8
  AfterImgEff *v12; // ecx@15
  NiNode *v13; // eax@16

  v3 = this;
  v4 = this->m_spWeaponAfterImgEff.m_pObject;
  if ( v4 )
  {
    v5 = (NiNode *)((int (*)(void))v4->vfptr[2].__vecDelDtor)();
    World::DetachEffect(&g_kWorld, v5);
    v6 = v3->m_spWeaponAfterImgEff.m_pObject;
    if ( v6 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      v3->m_spWeaponAfterImgEff.m_pObject = 0;
    }
  }
  v7 = ((int (__thiscall *)(_DWORD))v3->vfptr[2].__vecDelDtor)(v3);
  v8 = (NiNode *)(*(int (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v7 + 72))(v7, "AfterImg000");
  if ( v8 )
  {
    v9 = AfterImgEff::CreateByWeaponNode(v8, 0, 0);
    v10 = v3->m_spWeaponAfterImgEff.m_pObject;
    v11 = v9;
    if ( v10 != v9 )
    {
      if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
      v3->m_spWeaponAfterImgEff.m_pObject = v11;
      if ( v11 )
        InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
    }
    v12 = v3->m_spWeaponAfterImgEff.m_pObject;
    if ( v12 )
    {
      ((void (__stdcall *)(_DWORD))v12->vfptr[18].__vecDelDtor)(LODWORD(fLifeTime));
      ((void (__stdcall *)(_DWORD))v3->m_spWeaponAfterImgEff.m_pObject->vfptr[15].__vecDelDtor)(LODWORD(fCurTime));
      v13 = (NiNode *)((int (*)(void))v3->m_spWeaponAfterImgEff.m_pObject->vfptr[2].__vecDelDtor)();
      World::AttachEffect(&g_kWorld, v13);
    }
  }
}

//----- (0068D680) --------------------------------------------------------
void __thiscall ArrowEff::Start(ArrowEff *this, float fTime)
{
  ArrowEff *v2; // esi@1

  v2 = this;
  Effect::Start((Effect *)&this->vfptr, fTime);
  ArrowEff::StartWeaponAfterImgEff(v2, Timer::ms_fCurTime, 1.0);
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0068D6B0) --------------------------------------------------------
void __thiscall ArrowEff::SetHitDamage(ArrowEff *this, __int16 AtkSeqNum, DamageInfoSet *pkDamInfoSet)
{
  ArrowEff *v3; // esi@1

  v3 = this;
  if ( pkDamInfoSet )
  {
    DamageInfoSet::CopyFrom(&this->m_kDamageInfoSet, pkDamInfoSet);
    v3->m_iAtkSeqNum = AtkSeqNum;
  }
  else
  {
    OutputDebugStringA("Shoot EFFÀÇ DamageInfoSetÀÌ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù\n");
    v3->m_iAtkSeqNum = AtkSeqNum;
  }
}

//----- (0068D700) --------------------------------------------------------
void __thiscall ArrowEff::ArrowEff(ArrowEff *this, NiNode *pkNode, bool bCreateProgramEff, Char *pkCaster)
{
  ArrowEff *v4; // esi@1
  AfterImgEff *v5; // edi@1

  v4 = this;
  Effect::Effect((Effect *)&this->vfptr, pkNode, bCreateProgramEff, pkCaster);
  v4->vfptr = (NiRefObjectVtbl *)&ArrowEff::`vftable'{for `NiRefObject'};
  v4->vfptr = (IEffectDestroyMessengerVtbl *)&ArrowEff::`vftable'{for `IEffectDestroyMessenger'};
  NpNs_MoveToTarget::NpNs_MoveToTarget(&v4->m_kMoveToTarget);
  v4->m_kDamageInfoSet.kDamageList.m_kAllocator.m_uiCount = 0;
  v4->m_kDamageInfoSet.kDamageList.m_pkHead = 0;
  v4->m_kDamageInfoSet.kDamageList.m_pkTail = 0;
  v4->m_kDamageInfoSet.kDamageList.vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTList<DamageInfo *>::`vftable';
  v4->m_spWeaponAfterImgEff.m_pObject = 0;
  v4->m_fSpeed = 500.0;
  *(_DWORD *)&v4->m_kTargetCharHandle = -1;
  v4->m_uiHitDamage = 0;
  v4->m_bHitDamageShow = 1;
  v4->m_acBombEffectName[0] = 0;
  v4->m_acBombSndName[0] = 0;
  v5 = v4->m_spWeaponAfterImgEff.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v4->m_spWeaponAfterImgEff.m_pObject = 0;
  }
  v4->m_ePlayPos = 1;
}
// 973DFC: using guessed type int (__thiscall *NiTList<DamageInfo *>::`vftable')(void *p, char);
// 9BCDA4: using guessed type int (__stdcall *ArrowEff::`vftable'{for `IEffectDestroyMessenger'})(int);
// 9BCDBC: using guessed type int (__thiscall *ArrowEff::`vftable'{for `NiRefObject'})(void *p, char);

//----- (0068D800) --------------------------------------------------------
void __thiscall ArrowEff::~ArrowEff(ArrowEff *this)
{
  ArrowEff *v1; // esi@1
  AfterImgEff *v2; // edi@1
  Char *v3; // eax@6
  AfterImgEff *v4; // edi@8

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ArrowEff::`vftable'{for `NiRefObject'};
  this->vfptr = (IEffectDestroyMessengerVtbl *)&ArrowEff::`vftable'{for `IEffectDestroyMessenger'};
  v2 = this->m_spWeaponAfterImgEff.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spWeaponAfterImgEff.m_pObject = 0;
  }
  v3 = CharMgr::GetChar(&g_kCharMgr, v1->m_kCasterCharHandle);
  if ( v3 )
    DamageInfoSet::Applicate(&v1->m_kDamageInfoSet, v3, 1);
  v4 = v1->m_spWeaponAfterImgEff.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  DamageInfoSet::~DamageInfoSet(&v1->m_kDamageInfoSet);
  NpNs_MoveToTarget::~NpNs_MoveToTarget(&v1->m_kMoveToTarget);
  Effect::~Effect((Effect *)&v1->vfptr);
}
// 9BCDA4: using guessed type int (__stdcall *ArrowEff::`vftable'{for `IEffectDestroyMessenger'})(int);
// 9BCDBC: using guessed type int (__thiscall *ArrowEff::`vftable'{for `NiRefObject'})(void *p, char);

//----- (0068D900) --------------------------------------------------------
Effect *__thiscall ArrowEff::Clone(ArrowEff *this)
{
  ArrowEff *v1; // edi@1
  ArrowEff *v2; // eax@1
  int v3; // esi@1
  int v4; // eax@2

  v1 = this;
  v2 = (ArrowEff *)operator new(0x2E8u);
  v3 = 0;
  if ( v2 )
  {
    ArrowEff::ArrowEff(v2, 0, 0, 0);
    v3 = v4;
  }
  ((void (__cdecl *)(int))v1->vfptr[22].__vecDelDtor)(v3);
  return (Effect *)v3;
}

//----- (0068D970) --------------------------------------------------------
ArrowEff *__thiscall ArrowEff::`vector deleting destructor'(char *this, unsigned int a2)
{
  return ArrowEff::`scalar deleting destructor'((ArrowEff *)(this - 8), a2);
}

//----- (0068D980) --------------------------------------------------------
NiRTTI *ArrowEff::GetRTTI()
{
  return &ArrowEff::m_RTTI;
}

//----- (0068D990) --------------------------------------------------------
void __thiscall ArrowEff::SetBombEffectName(ArrowEff *this, char *pcBombEffName)
{
  char *v2; // eax@1
  signed int v3; // edx@3
  char v4; // cl@4

  v2 = pcBombEffName;
  if ( pcBombEffName )
  {
    v3 = this->m_acBombEffectName - pcBombEffName;
    do
    {
      v4 = *v2;
      v2[v3] = *v2;
      ++v2;
    }
    while ( v4 );
  }
  else
  {
    this->m_acBombEffectName[0] = (char)pcBombEffName;
  }
}

//----- (0068D9C0) --------------------------------------------------------
void __thiscall ArrowEff::SetBombSndName(ArrowEff *this, char *pcBombSndName)
{
  char *v2; // eax@1
  signed int v3; // edx@3
  char v4; // cl@4

  v2 = pcBombSndName;
  if ( pcBombSndName )
  {
    v3 = this->m_acBombSndName - pcBombSndName;
    do
    {
      v4 = *v2;
      v2[v3] = *v2;
      ++v2;
    }
    while ( v4 );
  }
  else
  {
    this->m_acBombEffectName[0] = (char)pcBombSndName;
  }
}

//----- (0068D9F0) --------------------------------------------------------
int __thiscall Char::GetLP(Char *this)
{
  return this->m_iLP;
}

//----- (0068DA00) --------------------------------------------------------
bool __thiscall ArrowEff::IsHitDamageShow(ArrowEff *this)
{
  return this->m_bHitDamageShow;
}

//----- (0068DA10) --------------------------------------------------------
void __thiscall ArrowEff::SetHitDamageShow(ArrowEff *this, bool bShow)
{
  this->m_bHitDamageShow = bShow;
}

//----- (0068DA20) --------------------------------------------------------
ArrowEff *__thiscall ArrowEff::`scalar deleting destructor'(ArrowEff *this, unsigned int a2)
{
  ArrowEff *v2; // esi@1

  v2 = this;
  ArrowEff::~ArrowEff(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0068DA50) --------------------------------------------------------
unsigned __int16 __thiscall AttachEff::GetTargetChar(AttachEff *this)
{
  return this->m_kTargetCharHandle;
}

//----- (0068DA60) --------------------------------------------------------
void __thiscall AttachEff::SetTargetChar(AttachEff *this, unsigned __int16 kHandle)
{
  this->m_kTargetCharHandle = kHandle;
}

//----- (0068DA80) --------------------------------------------------------
void __thiscall AttachEff::AttachEff(AttachEff *this, NiNode *pkNode, bool bCreateProgramEff, Char *pkCaster)
{
  AttachEff *v4; // esi@1
  NiNode *v5; // edi@1

  v4 = this;
  Effect::Effect((Effect *)&this->vfptr, pkNode, bCreateProgramEff, pkCaster);
  v4->vfptr = (NiRefObjectVtbl *)&AttachEff::`vftable'{for `NiRefObject'};
  v4->vfptr = (IEffectDestroyMessengerVtbl *)&AttachEff::`vftable'{for `IEffectDestroyMessenger'};
  v4->m_spkTargetNode.m_pObject = 0;
  v4->m_kTargetCharHandle = -1;
  v5 = v4->m_spkTargetNode.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v4->m_spkTargetNode.m_pObject = 0;
  }
  v4->m_bLoop = 0;
  v4->m_fLifeTime = -1.0;
  v4->m_pkEffectHolder = 0;
  v4->m_bSkillEffect = 1;
  *(_WORD *)&v4->m_bAura = 0;
}
// 9BCE78: using guessed type int (__stdcall *AttachEff::`vftable'{for `IEffectDestroyMessenger'})(int);
// 9BCE8C: using guessed type int (__thiscall *AttachEff::`vftable'{for `NiRefObject'})(void *p, char);

//----- (0068DB50) --------------------------------------------------------
bool __thiscall AttachEff::LengthOfView(AttachEff *this)
{
  unsigned __int16 v1; // ax@1
  bool result; // al@2
  Char *v3; // eax@3
  Char *v4; // esi@3
  int v5; // edi@9
  NiPoint3 *v6; // eax@9
  double v7; // st7@9
  NiPoint3 v8; // [sp+0h] [bp-14h]@9
  double v9; // [sp+Ch] [bp-8h]@9

  v1 = this->m_kTargetCharHandle;
  if ( v1 == -1 )
  {
    result = 1;
  }
  else
  {
    v3 = CharMgr::GetChar(&g_kCharMgr, v1);
    v4 = v3;
    result = 1;
    if ( v3 )
    {
      if ( v3 != g_pkMainChar && AbStateInfectee::FindNomalAbstate((AbStateInfectee *)&v3->vfptr, STA_GTIHIDE)
        || !Char::IsLinkGate(v4)
        && !v4->m_bIsDoor
        && (v5 = ((int (__thiscall *)(Char *))v4->vfptr[6].Deaffect)(v4),
            v6 = World::GetCameraLookAtPos(&g_kWorld),
            v8.x = v6->x - *(float *)v5,
            v8.y = v6->y - *(float *)(v5 + 4),
            v8.z = v6->z - *(float *)(v5 + 8),
            v9 = Char::GetMaxViewLength(v4),
            v7 = NiPoint3::Length(&v8),
            v7 > v9) )
      {
        result = 0;
      }
    }
  }
  return result;
}

//----- (0068DC10) --------------------------------------------------------
void __thiscall IEffectHolder::ClearAttachedEffect(IEffectHolder *this)
{
  NiTListItem<AttachEff *> *v1; // esi@1
  Effect *v2; // eax@2

  v1 = this->m_kAttachEffectList.m_pkHead;
  while ( v1 )
  {
    v2 = (Effect *)&v1->m_element->vfptr;
    v1 = v1->m_pkNext;
    EffectMgr::RemoveEffect(&g_kEffectMgr, v2);
  }
}

//----- (0068DC30) --------------------------------------------------------
void __thiscall IEffectHolder::AttachEffectShow(IEffectHolder *this, bool bShow)
{
  IEffectHolder *v2; // ebx@1
  NiTListItem<AttachEff *> *v3; // edi@2
  Effect *v4; // esi@3
  unsigned __int16 v5; // bx@4
  IEffectHolder *v6; // [sp+4h] [bp-4h]@1

  v2 = this;
  v6 = this;
  if ( this->m_bShow != bShow )
  {
    v3 = this->m_kAttachEffectList.m_pkHead;
    this->m_bShow = bShow;
    while ( v3 )
    {
      v4 = (Effect *)&v3->m_element->vfptr;
      v3 = v3->m_pkNext;
      if ( v4 )
      {
        v5 = g_pkMainChar->m_kHandle;
        if ( v5 == (unsigned __int16)((int (__thiscall *)(_DWORD))v4->vfptr[23].__vecDelDtor)(v4)
          && g_pkMainChar->m_kCharShape.m_kEquip.Equ_CosEff != -1 )
        {
          v2 = v6;
          continue;
        }
        v2 = v6;
      }
      EffectMgr::SetShow(&g_kEffectMgr, v4, v2->m_bShow, 1);
    }
  }
}

//----- (0068DCC0) --------------------------------------------------------
void __thiscall AttachEff::SetEffectHold(AttachEff *this, bool b)
{
  AttachEff *v2; // esi@1
  NiNode *v3; // edi@2
  int v4; // eax@2

  v2 = this;
  if ( b )
  {
    v3 = this->m_spkTargetNode.m_pObject;
    v4 = ((int (*)(void))this->vfptr[2].__vecDelDtor)();
    if ( v4 )
    {
      *(float *)(v4 + 88) = v3->m_kWorld.m_Translate.x;
      *(float *)(v4 + 92) = v3->m_kWorld.m_Translate.y;
      *(float *)(v4 + 96) = v3->m_kWorld.m_Translate.z;
    }
    v2->m_bEffectHold = b;
  }
  else
  {
    this->m_bEffectHold = 0;
  }
}

//----- (0068DD20) --------------------------------------------------------
void __thiscall AttachEff::Update(AttachEff *this, float fTime)
{
  AttachEff *v2; // ebx@1
  NiNode *v3; // eax@1
  NiNode *v4; // esi@3
  NiNode *v5; // eax@8
  int v6; // esi@9
  int v7; // eax@9
  Name3 *v8; // eax@12
  MapInfo *v9; // edi@12
  bool v10; // al@12
  Char *v11; // eax@15
  Char *v12; // esi@15
  Mover *v13; // ecx@21
  signed __int16 v14; // di@23
  NiRefObjectVtbl *v15; // edi@33
  bool v16; // al@33
  NiRefObjectVtbl *v17; // esi@37
  bool v18; // al@37
  Char *v19; // esi@38
  int v20; // eax@40
  float v21; // edx@40
  float v22; // ecx@40
  float v23; // eax@40
  AbStateInfecteeVtbl *v24; // edx@40
  int v25; // eax@40
  void *(__thiscall *v26)(NiRefObject *, unsigned int); // edx@40
  int v27; // eax@41
  void *(__thiscall *v28)(NiRefObject *, unsigned int); // edx@41
  float fTimea; // [sp+0h] [bp-30h]@1
  Name3 result; // [sp+Ch] [bp-24h]@12
  NiPoint3 kDir; // [sp+18h] [bp-18h]@40
  NiPoint3 kPos; // [sp+24h] [bp-Ch]@40
  MapInfo *pkMapinfo; // [sp+38h] [bp+8h]@9
  MapInfo *pkMapinfob; // [sp+38h] [bp+8h]@12
  MapInfo *pkMapinfoa; // [sp+38h] [bp+8h]@12

  v2 = this;
  Effect::Update((Effect *)&this->vfptr, fTime);
  v3 = v2->m_spkTargetNode.m_pObject;
  if ( v3 )
  {
    if ( v3->m_uiRefCount == 1 )
    {
      v4 = v2->m_spkTargetNode.m_pObject;
      if ( v3 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
        v2->m_spkTargetNode.m_pObject = 0;
      }
    }
  }
  v5 = v2->m_spkTargetNode.m_pObject;
  if ( v5 )
  {
    v6 = (int)&v5->m_kWorld;
    pkMapinfo = (MapInfo *)&v5->m_kWorld;
    v7 = ((int (__thiscall *)(_DWORD))v2->vfptr[2].__vecDelDtor)(v2);
    if ( !v7 )
      return;
    if ( !v2->m_bEffectHold )
    {
      *(_DWORD *)(v7 + 88) = *(_DWORD *)(v6 + 36);
      *(_DWORD *)(v7 + 92) = *(_DWORD *)(v6 + 40);
      *(_DWORD *)(v7 + 96) = *(_DWORD *)(v6 + 44);
    }
    qmemcpy((void *)(v7 + 52), (const void *)v6, 0x24u);
    *(float *)&pkMapinfob = fabs(*(float *)((char *)&pkMapinfo->IsWMLink + 2));
    *(float *)(v7 + 100) = *(float *)&pkMapinfob;
    v8 = World::GetMapName(&g_kWorld, &result);
    v9 = MapInfoTab::GetByMapName(v8);
    v10 = v2->m_bAura;
    pkMapinfoa = v9;
    if ( v10 != 1 )
      goto LABEL_44;
    if ( !MachineOpt::ms_kGraphicOption.bCharAuraEffectEnable )
      goto LABEL_30;
    if ( MachineOpt::ms_kGraphicOption.bCharAuraEffectEnable )
    {
      v11 = CharMgr::GetChar(&g_kCharMgr, v2->m_kTargetCharHandle);
      v12 = v11;
      if ( !v11 )
        return;
      if ( v11 == g_pkMainChar )
      {
        if ( !Char::IsEnableSpectral(v11)
          && !(unsigned __int8)((int (__thiscall *)(_DWORD))v12->vfptr[20].Deaffect)(v12)
          && (!v9 || v9->KingdomMap != 2) )
        {
          v13 = v12->m_pkMover;
          if ( !v13 )
            return;
          goto LABEL_32;
        }
LABEL_30:
        ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v2->vfptr[21].__vecDelDtor)(v2, 0, LODWORD(fTimea));
        return;
      }
      v14 = -1;
      if ( v11 != (Char *)-780 )
        v14 = v11->m_kCharShape.m_kEquip.Equ_CosEff;
      if ( !v11->vfptr->IsVisible((AbStateInfectee *)v11) || v14 != -1 )
      {
        ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v2->vfptr[21].__vecDelDtor)(v2, 0, LODWORD(fTimea));
        return;
      }
      if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v12->vfptr[20].Deaffect)(v12)
        || pkMapinfoa && pkMapinfoa->KingdomMap == 2 )
      {
        goto LABEL_30;
      }
      v13 = v12->m_pkMover;
      if ( v13 )
      {
LABEL_32:
        if ( g_pkMainChar->m_kCharShape.m_kEquip.Equ_CosEff == -1 )
        {
          v15 = v2->vfptr;
          v16 = Mover::IsSlotView(v13, v12->m_uiMoverSlot, 1);
          v15[21].__vecDelDtor((NiRefObject *)v2, v16);
        }
        return;
      }
    }
    else
    {
LABEL_44:
      if ( v10 )
        return;
    }
    v17 = v2->vfptr;
    v18 = AttachEff::LengthOfView(v2);
    ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v17[21].__vecDelDtor)(v2, v18, LODWORD(fTimea));
    return;
  }
  v19 = CharMgr::GetChar(&g_kCharMgr, v2->m_kTargetCharHandle);
  if ( v19 )
  {
    if ( v2->m_bSkillEffect )
    {
      v20 = ((int (__thiscall *)(_DWORD))v2->vfptr[12].__vecDelDtor)(v2);
      v21 = *(float *)(v20 + 4);
      v22 = *(float *)v20;
      v23 = *(float *)(v20 + 8);
      kDir.y = v21;
      v24 = v19->vfptr;
      kDir.x = v22;
      kDir.z = v23;
      v25 = ((int (__thiscall *)(_DWORD))v24[6].Deaffect)(v19);
      kPos.x = *(float *)v25;
      kPos.y = *(float *)(v25 + 4);
      kPos.z = *(float *)(v25 + 8);
      v26 = v2->vfptr[7].__vecDelDtor;
      kPos.z = kPos.z + 35.0;
      *(float *)&result.n3_code[0] = kDir.x * 30.0;
      *(float *)&result.n3_code[1] = kDir.y * 30.0;
      *(float *)&result.n3_code[2] = 30.0 * kDir.z;
      kPos.x = *(float *)&result.n3_code[0] + COERCE_FLOAT(&kPos);
      kPos.y = kPos.y + *(float *)&result.n3_code[1];
      kPos.z = *(float *)&result.n3_code[2] + kPos.z;
      v26((NiRefObject *)&v2->vfptr, LODWORD(kPos.x));
    }
    else
    {
      v27 = ((int (__thiscall *)(_DWORD))v19->vfptr[6].Deaffect)(v19);
      kPos.x = *(float *)v27;
      kPos.y = *(float *)(v27 + 4);
      v28 = v2->vfptr[7].__vecDelDtor;
      kPos.z = *(float *)(v27 + 8);
      v28((NiRefObject *)&v2->vfptr, (unsigned int)&kPos);
    }
  }
}

//----- (0068E030) --------------------------------------------------------
void __thiscall IEffectHolder::OnAttachEffectEnd(IEffectHolder *this, AttachEff *pkEffect)
{
  AttachEff *v2; // esi@1
  NiTListItem<AttachEff *> *v3; // eax@2
  AttachEff **v4; // edx@3

  v2 = pkEffect;
  if ( pkEffect )
  {
    v3 = this->m_kAttachEffectList.m_pkHead;
    if ( v3 )
    {
      while ( 1 )
      {
        v4 = &v3->m_element;
        pkEffect = (AttachEff *)v3;
        v3 = v3->m_pkNext;
        if ( *v4 == v2 )
          break;
        if ( !v3 )
          return;
      }
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&this->m_kAttachEffectList,
        (void **)&pkEffect);
    }
  }
}

//----- (0068E070) --------------------------------------------------------
void __thiscall IEffectHolder::AddAttachEffect(IEffectHolder *this, AttachEff *pkEffect)
{
  IEffectHolder *v2; // edi@1
  NiTListItem<AttachEff *> *v3; // eax@1
  NiTListItem<AttachEff *> **v4; // edx@1

  v2 = this;
  v3 = this->m_kAttachEffectList.vfptr->NewItem((NiTListBase<DFALL<AttachEff *>,AttachEff *> *)&this->m_kAttachEffectList);
  v3->m_element = pkEffect;
  v3->m_pkNext = 0;
  v3->m_pkPrev = v2->m_kAttachEffectList.m_pkTail;
  v4 = &v2->m_kAttachEffectList.m_pkTail->m_pkNext;
  if ( v4 )
    *v4 = v3;
  else
    v2->m_kAttachEffectList.m_pkHead = v3;
  ++v2->m_kAttachEffectList.m_kAllocator.m_uiCount;
  v2->m_kAttachEffectList.m_pkTail = v3;
  if ( pkEffect )
    ((void (__stdcall *)(_DWORD))pkEffect->vfptr[21].__vecDelDtor)(v2->m_bShow);
}

//----- (0068E0C0) --------------------------------------------------------
void __thiscall AttachEff::~AttachEff(AttachEff *this)
{
  AttachEff *v1; // esi@1
  IEffectHolder *v2; // edx@1
  NiTListItem<AttachEff *> *v3; // eax@2
  AttachEff **v4; // ecx@3
  NiNode *v5; // edi@8
  void *kPos; // [sp+10h] [bp-10h]@3
  int v7; // [sp+1Ch] [bp-4h]@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&AttachEff::`vftable'{for `NiRefObject'};
  this->vfptr = (IEffectDestroyMessengerVtbl *)&AttachEff::`vftable'{for `IEffectDestroyMessenger'};
  v2 = this->m_pkEffectHolder;
  v7 = 1;
  if ( v2 )
  {
    v3 = v2->m_kAttachEffectList.m_pkHead;
    if ( v3 )
    {
      while ( 1 )
      {
        v4 = &v3->m_element;
        kPos = v3;
        v3 = v3->m_pkNext;
        if ( *v4 == v1 )
          break;
        if ( !v3 )
          goto LABEL_7;
      }
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&v2->m_kAttachEffectList,
        &kPos);
    }
LABEL_7:
    v1->m_pkEffectHolder = 0;
  }
  v1->m_kTargetCharHandle = -1;
  v1->m_bAura = 0;
  v5 = v1->m_spkTargetNode.m_pObject;
  LOBYTE(v7) = 0;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  v7 = -1;
  Effect::~Effect((Effect *)&v1->vfptr);
}
// 9BCE78: using guessed type int (__stdcall *AttachEff::`vftable'{for `IEffectDestroyMessenger'})(int);
// 9BCE8C: using guessed type int (__thiscall *AttachEff::`vftable'{for `NiRefObject'})(void *p, char);

//----- (0068E1A0) --------------------------------------------------------
void __thiscall AttachEff::OnEnd(AttachEff *this, float fTime)
{
  AttachEff *v2; // esi@1
  IEffectHolder *v3; // edx@1
  NiTListItem<AttachEff *> *v4; // eax@2
  AttachEff **v5; // ecx@3
  void *kPos; // [sp+4h] [bp-4h]@3

  v2 = this;
  v3 = this->m_pkEffectHolder;
  if ( v3 )
  {
    v4 = v3->m_kAttachEffectList.m_pkHead;
    if ( v4 )
    {
      while ( 1 )
      {
        v5 = &v4->m_element;
        kPos = v4;
        v4 = v4->m_pkNext;
        if ( *v5 == v2 )
          break;
        if ( !v4 )
        {
          v2->m_pkEffectHolder = 0;
          return;
        }
      }
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&v3->m_kAttachEffectList,
        &kPos);
    }
    v2->m_pkEffectHolder = 0;
  }
}

//----- (0068E200) --------------------------------------------------------
void __thiscall IEffectHolder::~IEffectHolder(IEffectHolder *this)
{
  IEffectHolder *v1; // edi@1
  NiTListItem<AttachEff *> *v2; // esi@1
  Effect *v3; // eax@2
  int v4; // edi@3
  _DWORD *v5; // esi@3
  _DWORD *v6; // ST00_4@4

  v1 = this;
  this->vfptr = (IEffectHolderVtbl *)&IEffectHolder::`vftable';
  v2 = this->m_kAttachEffectList.m_pkHead;
  while ( v2 )
  {
    v3 = (Effect *)&v2->m_element->vfptr;
    v2 = v2->m_pkNext;
    EffectMgr::RemoveEffect(&g_kEffectMgr, v3);
  }
  v4 = (int)&v1->m_kAttachEffectList;
  *(_DWORD *)v4 = &NiTPointerListBase<DFALL<AttachEff *>,AttachEff *>::`vftable';
  v5 = *(_DWORD **)(v4 + 4);
  while ( v5 )
  {
    v6 = v5;
    v5 = (_DWORD *)*v5;
    (*(void (__thiscall **)(int, _DWORD *))(*(_DWORD *)v4 + 8))(v4, v6);
  }
  *(_DWORD *)(v4 + 12) = 0;
  *(_DWORD *)(v4 + 4) = 0;
  *(_DWORD *)(v4 + 8) = 0;
  *(_DWORD *)v4 = &NiTListBase<DFALL<AttachEff *>,AttachEff *>::`vftable';
}
// 9BCE68: using guessed type int (__thiscall *NiTListBase<DFALL<AttachEff *>,AttachEff *>::`vftable')(void *p, char);
// 9BCEF4: using guessed type int (__thiscall *NiTPointerListBase<DFALL<AttachEff *>,AttachEff *>::`vftable')(void *p, char);
// 9BCF14: using guessed type int (__thiscall *IEffectHolder::`vftable')(void *p, char);

//----- (0068E2B0) --------------------------------------------------------
void __thiscall IEffectHolder::IEffectHolder(IEffectHolder *this)
{
  this->vfptr = (IEffectHolderVtbl *)&IEffectHolder::`vftable';
  this->m_kAttachEffectList.m_kAllocator.m_uiCount = 0;
  this->m_kAttachEffectList.m_pkHead = 0;
  this->m_kAttachEffectList.m_pkTail = 0;
  this->m_kAttachEffectList.vfptr = (NiTListBase<DFALL<AttachEff *>,AttachEff *>Vtbl *)&NiTList<AttachEff *>::`vftable';
  this->m_bShow = 1;
}
// 9BCF04: using guessed type int (__thiscall *NiTList<AttachEff *>::`vftable')(void *p, char);
// 9BCF14: using guessed type int (__thiscall *IEffectHolder::`vftable')(void *p, char);

//----- (0068E2D0) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<AttachEff *>,AttachEff *>::~NiTListBase<DFALL<AttachEff *>,AttachEff *>(NiTListBase<DFALL<AttachEff *>,AttachEff *> *this)
{
  this->vfptr = (NiTListBase<DFALL<AttachEff *>,AttachEff *>Vtbl *)&NiTListBase<DFALL<AttachEff *>,AttachEff *>::`vftable';
}
// 9BCE68: using guessed type int (__thiscall *NiTListBase<DFALL<AttachEff *>,AttachEff *>::`vftable')(void *p, char);

//----- (0068E2E0) --------------------------------------------------------
NiTListBase<DFALL<AttachEff *>,AttachEff *> *__thiscall NiTListBase<DFALL<AttachEff *>,AttachEff *>::`vector deleting destructor'(NiTListBase<DFALL<AttachEff *>,AttachEff *> *this, unsigned int a2)
{
  NiTListBase<DFALL<AttachEff *>,AttachEff *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<AttachEff *>,AttachEff *>Vtbl *)&NiTListBase<DFALL<AttachEff *>,AttachEff *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BCE68: using guessed type int (__thiscall *NiTListBase<DFALL<AttachEff *>,AttachEff *>::`vftable')(void *p, char);

//----- (0068E310) --------------------------------------------------------
AttachEff *__thiscall AttachEff::`vector deleting destructor'(char *this, unsigned int a2)
{
  return AttachEff::`scalar deleting destructor'((AttachEff *)(this - 8), a2);
}

//----- (0068E320) --------------------------------------------------------
NiRTTI *AttachEff::GetRTTI()
{
  return &AttachEff::m_RTTI;
}

//----- (0068E330) --------------------------------------------------------
char __thiscall AttachEff::IsEnd(AttachEff *this, float fTime)
{
  float fPastTime; // [sp+8h] [bp+8h]@3

  if ( this->m_bStopFlag )
    return 1;
  if ( !this->m_bLoop )
  {
    fPastTime = fTime - this->m_fStartTime;
    if ( this->m_fLifeTime <= 0.0 )
    {
      if ( this->m_kCtrl.m_fMaxTime < (double)fPastTime )
        return 1;
    }
    else if ( fPastTime > (double)this->m_fLifeTime )
    {
      return 1;
    }
  }
  return 0;
}

//----- (0068E390) --------------------------------------------------------
void __thiscall NiTList<AttachEff *>::~NiTList<AttachEff *>(NiTList<AttachEff *> *this)
{
  NiTList<AttachEff *> *v1; // edi@1
  NiTListItem<AttachEff *> *v2; // esi@1
  NiTListItem<AttachEff *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<DFALL<AttachEff *>,AttachEff *>Vtbl *)&NiTPointerListBase<DFALL<AttachEff *>,AttachEff *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<DFALL<AttachEff *>,AttachEff *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<DFALL<AttachEff *>,AttachEff *>Vtbl *)&NiTListBase<DFALL<AttachEff *>,AttachEff *>::`vftable';
}
// 9BCE68: using guessed type int (__thiscall *NiTListBase<DFALL<AttachEff *>,AttachEff *>::`vftable')(void *p, char);
// 9BCEF4: using guessed type int (__thiscall *NiTPointerListBase<DFALL<AttachEff *>,AttachEff *>::`vftable')(void *p, char);

//----- (0068E410) --------------------------------------------------------
NiTList<AttachEff *> *__thiscall NiTPointerListBase<DFALL<AttachEff *>,AttachEff *>::`vector deleting destructor'(NiTList<AttachEff *> *this, unsigned int a2)
{
  NiTList<AttachEff *> *v2; // edi@1
  NiTListItem<AttachEff *> *v3; // esi@1
  NiTListItem<AttachEff *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<AttachEff *>,AttachEff *>Vtbl *)&NiTPointerListBase<DFALL<AttachEff *>,AttachEff *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<DFALL<AttachEff *>,AttachEff *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<AttachEff *>,AttachEff *>Vtbl *)&NiTListBase<DFALL<AttachEff *>,AttachEff *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BCE68: using guessed type int (__thiscall *NiTListBase<DFALL<AttachEff *>,AttachEff *>::`vftable')(void *p, char);
// 9BCEF4: using guessed type int (__thiscall *NiTPointerListBase<DFALL<AttachEff *>,AttachEff *>::`vftable')(void *p, char);

//----- (0068E4A0) --------------------------------------------------------
IEffectHolder *__thiscall IEffectHolder::`vector deleting destructor'(IEffectHolder *this, unsigned int a2)
{
  IEffectHolder *v2; // esi@1

  v2 = this;
  IEffectHolder::~IEffectHolder(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0068E4D0) --------------------------------------------------------
AttachEff *__thiscall AttachEff::`scalar deleting destructor'(AttachEff *this, unsigned int a2)
{
  AttachEff *v2; // esi@1

  v2 = this;
  AttachEff::~AttachEff(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0068E500) --------------------------------------------------------
int __stdcall Effect::GetKeyStrToInt(char *KeywordStr)
{
  int result; // eax@2

  if ( KeywordStr && strlen(KeywordStr) == 7 )
    result = atoi(KeywordStr + 2);
  else
    result = 0;
  return result;
}

//----- (0068E540) --------------------------------------------------------
void __thiscall Effect::SetAniStart(Effect *this, bool b)
{
  this->m_bAniStart = b;
}

//----- (0068E550) --------------------------------------------------------
bool __thiscall Effect::GetAniStart(Effect *this)
{
  return this->m_bAniStart;
}

//----- (0068E560) --------------------------------------------------------
void __thiscall Effect::SetActiveSkillID(Effect *this, unsigned __int16 kID)
{
  this->m_kActiveSKillID = kID;
}

//----- (0068E580) --------------------------------------------------------
unsigned __int16 __thiscall Effect::GetActiveSkillID(Effect *this)
{
  return this->m_kActiveSKillID;
}

//----- (0068E590) --------------------------------------------------------
int __thiscall Effect::GetShaderEffect(Effect *this)
{
  return this->m_ShaderEffectType;
}

//----- (0068E5A0) --------------------------------------------------------
int __stdcall Effect::FindShnIndex(NiTextKey *pkKey, unsigned int KeyNum, float fEffectTime)
{
  unsigned int v4; // ebx@1
  int v5; // ecx@1
  double v6; // st7@2
  double v7; // st4@5
  int result; // eax@9
  float TimeGap; // [sp+18h] [bp+Ch]@7

  v4 = KeyNum;
  v5 = 0;
  if ( KeyNum )
  {
    v6 = fEffectTime;
    while ( 1 )
    {
      if ( strlen(pkKey[v5].m_pText) == 2 )
      {
        v7 = pkKey[v5].m_fTime >= v6 ? pkKey[v5].m_fTime - v6 : v6 - pkKey[v5].m_fTime;
        TimeGap = v7;
        if ( TimeGap >= 0.0 && TimeGap <= 0.00009999999747378752 )
          break;
      }
      if ( ++v5 >= v4 )
        goto LABEL_11;
    }
    result = atoi(pkKey[v5].m_pText);
  }
  else
  {
LABEL_11:
    result = 0;
  }
  return result;
}

//----- (0068E640) --------------------------------------------------------
signed __int16 __thiscall Effect::GetCasterHandle(Effect *this)
{
  Char *v1; // eax@1
  signed __int16 result; // ax@2

  v1 = this->m_pkCaster;
  if ( v1 )
    result = v1->m_kHandle;
  else
    result = -1;
  return result;
}

//----- (0068E660) --------------------------------------------------------
NiAVObject *__thiscall Effect::GetNodeByName(Effect *this, char *nodeName)
{
  Effect *v2; // esi@1
  NiAVObject *result; // eax@2

  v2 = this;
  if ( nodeName )
  {
    result = (NiAVObject *)((int (__stdcall *)(char *))this->m_spNode.m_pObject->vfptr[18].__vecDelDtor)(nodeName);
    if ( !result )
    {
      result = (NiAVObject *)((int (__stdcall *)(char *))v2->m_spDefaultEffect.m_pObject->vfptr[18].__vecDelDtor)(nodeName);
      if ( !result )
        result = (NiAVObject *)((int (__stdcall *)(char *))v2->m_spDecalEffect.m_pObject->vfptr[18].__vecDelDtor)(nodeName);
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0068E6B0) --------------------------------------------------------
void __thiscall Effect::UpdateLoop(Effect *this, float fTime)
{
  Effect *v2; // esi@1
  double v3; // st7@3
  char *v4; // edi@7
  NiPoint3 *v5; // eax@9
  char *v6; // edi@12
  NiPoint3 *v7; // eax@14

  v2 = this;
  if ( this->m_bLoop )
  {
    if ( this->m_kLoopSoundFileName._Mysize )
    {
      v3 = fTime;
      if ( this->m_fLoopKeepTime >= fTime - this->m_fLoopStartTime )
      {
        if ( this->m_fLoopWaitTime <= 0.0 )
        {
          if ( this->m_kCtrl.m_fMaxTime < v3 - this->m_fLoopLastTime )
          {
            ((void (__stdcall *)(_DWORD))this->vfptr[15].__vecDelDtor)(LODWORD(fTime));
            if ( v2->m_kLoopSoundFileName._Myres < 0x10 )
              v6 = v2->m_kLoopSoundFileName._Bx._Buf;
            else
              v6 = v2->m_kLoopSoundFileName._Bx._Ptr;
            v7 = (NiPoint3 *)((int (__thiscall *)(Effect *))v2->vfptr[8].__vecDelDtor)(v2);
            SoundMgr::CreateSound(&g_kSoundMgr, v6, v7);
            v2->m_fLoopLastTime = fTime;
          }
        }
        else if ( this->m_fLoopWaitTime < v3 - this->m_fLoopLastTime )
        {
          if ( this->m_kLoopSoundFileName._Myres < 0x10 )
            v4 = this->m_kLoopSoundFileName._Bx._Buf;
          else
            v4 = this->m_kLoopSoundFileName._Bx._Ptr;
          v5 = (NiPoint3 *)((int (*)(void))this->vfptr[8].__vecDelDtor)();
          SoundMgr::CreateSound(&g_kSoundMgr, v4, v5);
          v2->m_fLoopWaitTime = 0.0;
          v2->m_fLoopLastTime = fTime;
        }
      }
    }
  }
}

//----- (0068E7D0) --------------------------------------------------------
void __thiscall Effect::SetShaderEffect(Effect *this, char *NodeName, int EffType)
{
  this->m_ShaderEffectType = EffType;
}

//----- (0068E7E0) --------------------------------------------------------
char __thiscall Effect::CreateProgramEff(Effect *this)
{
  Effect *v1; // ebx@1
  NiNode *j; // eax@2
  NiDX92DBufferData *v3; // eax@3
  NiDX92DBufferData *v4; // esi@3
  NiPointer<NiDX92DBufferData> element; // [sp+10h] [bp-3Ch]@4
  int i; // [sp+14h] [bp-38h]@2
  char acName[33]; // [sp+18h] [bp-34h]@2
  int v9; // [sp+48h] [bp-4h]@4

  v1 = this;
  if ( this->m_spNode.m_pObject )
  {
    i = 0;
    sprintf(acName, "AfterImg%03d", 0);
    for ( j = (NiNode *)((int (__stdcall *)(char *))v1->m_spNode.m_pObject->vfptr[18].__vecDelDtor)(acName);
          j;
          j = (NiNode *)((int (__stdcall *)(char *))v1->m_spNode.m_pObject->vfptr[18].__vecDelDtor)(acName) )
    {
      v3 = (NiDX92DBufferData *)AfterImgEff::CreateBySourceNode(j);
      v4 = v3;
      if ( v3 )
      {
        element.m_pObject = v3;
        InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
        v9 = 0;
        NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *)&v1->m_kChildList,
          &element);
        v9 = -1;
        if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
      sprintf(acName, "AfterImg%03d", ++i);
    }
  }
  return 1;
}

//----- (0068E8E0) --------------------------------------------------------
void __thiscall Effect::UpdateOsc(Effect *this, float fTime)
{
  Effect *v2; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *v3; // eax@1
  std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *v4; // edi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node **v5; // eax@2
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v6; // esi@2
  OscTarget v7; // eax@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v8; // eax@14
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *j; // eax@15
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *i; // eax@18
  std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *v11; // ecx@24
  std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *v12; // eax@25
  std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *k; // eax@28
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > result; // [sp+8h] [bp-4h]@12

  v2 = this;
  v3 = this->m_mapShakeInfo._Myhead;
  v4 = v3->_Left;
  if ( v3->_Left != v3 )
  {
    do
    {
      v5 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node **)v4->_Myval.second->_Myhead;
      v6 = *v5;
      if ( (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node **)*v5 != v5 )
      {
        do
        {
          if ( *(float *)&v6->_Myval.first > fTime - v2->m_fStartTime )
          {
            if ( !v6->_Isnil )
            {
              v8 = v6->_Right;
              if ( v8->_Isnil )
              {
                for ( i = v6->_Parent; !i->_Isnil; i = i->_Parent )
                {
                  if ( v6 != i->_Right )
                    break;
                  v6 = i;
                }
                v6 = i;
              }
              else
              {
                v6 = v6->_Right;
                for ( j = v8->_Left; !j->_Isnil; j = j->_Left )
                  v6 = j;
              }
            }
          }
          else
          {
            v7 = v4->_Myval.first;
            switch ( v7 )
            {
              case 0:
              case 4:
                if ( v2->m_pkCaster->m_kHandle == g_pkMainChar->m_kHandle )
                {
                  if ( v7 == OSC_FORCE_MY_CAMERA )
                    goto LABEL_11;
                  if ( !Oscillation::IsImpacting(&stru_B24FC0) )
                    World::ImpactCamera(&g_kWorld, (EffectViewInfo *)v6->_Myval.second);
                }
                break;
              case 7:
                World::ImpactCamera(&g_kWorld, (EffectViewInfo *)v6->_Myval.second);
                break;
              case 3:
                if ( !Oscillation::IsImpacting(&stru_B24FC0) )
LABEL_11:
                  World::ImpactCamera(&g_kWorld, (EffectViewInfo *)v6->_Myval.second);
                break;
              default:
                break;
            }
            v6 = std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
                   (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)v4->_Myval.second,
                   &result,
                   (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > >)v6)->_Ptr;
          }
        }
        while ( v6 != (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v4->_Myval.second->_Myhead );
      }
      if ( !v4->_Isnil )
      {
        v11 = v4->_Right;
        if ( v11->_Isnil )
        {
          for ( k = v4->_Parent; !k->_Isnil; k = k->_Parent )
          {
            if ( v4 != k->_Right )
              break;
            v4 = k;
          }
          v4 = k;
        }
        else
        {
          v12 = v11->_Left;
          if ( !v11->_Left->_Isnil )
          {
            do
            {
              v11 = v12;
              v12 = v12->_Left;
            }
            while ( !v12->_Isnil );
          }
          v4 = v11;
        }
      }
    }
    while ( v4 != v2->m_mapShakeInfo._Myhead );
  }
}

//----- (0068EA60) --------------------------------------------------------
void __thiscall Effect::UpdateAE(Effect *this, float fTime)
{
  Effect *v2; // edi@1
  std::_Tree_nod<std::_Tmap_traits<float,ActionEffectInfo *,std::less<float>,std::allocator<std::pair<float const ,ActionEffectInfo *> >,1> >::_Node *v3; // eax@2
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v4; // esi@2
  NiPoint3 *v5; // eax@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v6; // eax@6
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *j; // eax@7
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *i; // eax@10
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > result; // [sp+4h] [bp-4h]@4

  v2 = this;
  if ( this->m_mapAEEffInfo._Mysize )
  {
    v3 = this->m_mapAEEffInfo._Myhead;
    v4 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v3->_Left;
    if ( v3->_Left != v3 )
    {
      do
      {
        if ( *(float *)&v4->_Myval.first > fTime - v2->m_fStartTime )
        {
          if ( !v4->_Isnil )
          {
            v6 = v4->_Right;
            if ( v6->_Isnil )
            {
              for ( i = v4->_Parent; !i->_Isnil; i = i->_Parent )
              {
                if ( v4 != i->_Right )
                  break;
                v4 = i;
              }
              v4 = i;
            }
            else
            {
              v4 = v4->_Right;
              for ( j = v6->_Left; !j->_Isnil; j = j->_Left )
                v4 = j;
            }
          }
        }
        else
        {
          v5 = (NiPoint3 *)((int (__thiscall *)(_DWORD))v2->vfptr[9].__vecDelDtor)(v2);
          SoundMgr::CreateSound(&g_kSoundMgr, (ActionEffectInfo *)v4->_Myval.second, v5);
          v4 = std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
                 (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)&v2->m_mapAEEffInfo,
                 &result,
                 (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > >)v4)->_Ptr;
        }
      }
      while ( v4 != (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v2->m_mapAEEffInfo._Myhead );
    }
  }
}

//----- (0068EB20) --------------------------------------------------------
void __thiscall Effect::ClearAE(Effect *this)
{
  Effect *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<float,ActionEffectInfo *,std::less<float>,std::allocator<std::pair<float const ,ActionEffectInfo *> >,1> >::_Node *v2; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v3; // eax@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > result; // [sp+4h] [bp-4h]@2

  v1 = this;
  v2 = this->m_mapAEEffInfo._Myhead;
  v3 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v2->_Left;
  if ( v2->_Left != v2 )
  {
    do
      v3 = std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
             (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)&v1->m_mapAEEffInfo,
             &result,
             (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > >)v3)->_Ptr;
    while ( v3 != (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v1->m_mapAEEffInfo._Myhead );
  }
}

//----- (0068EB60) --------------------------------------------------------
void __thiscall Effect::Update(Effect *this, float fTime)
{
  Effect *v2; // edi@1
  Char *v3; // ecx@1
  NiPoint3 *v4; // eax@8
  NiTListItem<NiPointer<Effect> > *v5; // esi@9
  void *(__thiscall *v6)(NiRefObject *, unsigned int); // eax@10

  v2 = this;
  v3 = this->m_pkCaster;
  v2->m_fLastUpdateTime = fTime;
  if ( v3 )
  {
    if ( v2->m_uiActCasterAniCode && Char::GetAniCode(v3, 0, 0, 0) != v2->m_uiActCasterAniCode )
    {
      ((void (__thiscall *)(_DWORD))v2->vfptr[16].__vecDelDtor)(v2);
      v2->vfptr[21].__vecDelDtor((NiRefObject *)v2, 0);
      return;
    }
    if ( MachineOpt::ms_kGraphicOption.bScreenShakeEnable == 1 )
      Effect::UpdateOsc(v2, fTime);
  }
  Effect::UpdateAE(v2, fTime);
  if ( v2->m_bDecalEffect )
  {
    v4 = (NiPoint3 *)((int (__thiscall *)(_DWORD))v2->vfptr[8].__vecDelDtor)(v2);
    NsDecal::Update(&v2->m_kDecalEffect.m_kDecalMaker, 0.0, v2->m_kDecalEffect.m_spDecalNode.m_pObject, v4);
  }
  v5 = v2->m_kChildList.m_pkHead;
  while ( v5 )
  {
    v6 = v5->m_element.m_pObject->vfptr[14].__vecDelDtor;
    v5 = v5->m_pkNext;
    ((void (__stdcall *)(_DWORD))v6)(LODWORD(fTime));
  }
  Effect::UpdateLoop(v2, fTime);
}

//----- (0068EC40) --------------------------------------------------------
void __thiscall Effect::ClearOscTimeMmap(Effect *this)
{
  Effect *v1; // edi@1
  std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *v4; // eax@3
  std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *j; // eax@4
  std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *i; // eax@7
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > result; // [sp+8h] [bp-4h]@2

  v1 = this;
  v2 = this->m_mapShakeInfo._Myhead;
  v3 = v2->_Left;
  if ( v2->_Left != v2 )
  {
    do
    {
      std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
        (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)v3->_Myval.second,
        &result,
        (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >)v3->_Myval.second->_Myhead->_Left,
        (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >)v3->_Myval.second->_Myhead);
      if ( !v3->_Isnil )
      {
        v4 = v3->_Right;
        if ( v4->_Isnil )
        {
          for ( i = v3->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v3 != i->_Right )
              break;
            v3 = i;
          }
          v3 = i;
        }
        else
        {
          v3 = v3->_Right;
          for ( j = v4->_Left; !j->_Isnil; j = j->_Left )
            v3 = j;
        }
      }
    }
    while ( v3 != v1->m_mapShakeInfo._Myhead );
  }
}

//----- (0068ECC0) --------------------------------------------------------
void __thiscall Effect::CatchAE(Effect *this)
{
  NiNode *v1; // eax@1
  NiNode *v2; // ebx@1
  int v3; // edi@2
  NiExtraData *v4; // esi@3
  NiRefObjectVtbl *v5; // eax@5
  unsigned int v6; // esi@5
  const char **v7; // edi@6
  NiRefObjectVtbl *v8; // ebx@6
  const char *v9; // edx@7
  const char *v10; // eax@8
  char v11; // cl@9
  int v12; // eax@11
  const char *v13; // edx@12
  const char *v14; // eax@13
  char v15; // cl@14
  EffectViewInfo *v16; // eax@18
  Effect *v17; // esi@19
  std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *v18; // eax@19
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > >,bool> result; // [sp+4h] [bp-1Ch]@19
  std::pair<float,EffectViewInfo *> _Val; // [sp+Ch] [bp-14h]@19
  NiNode *pkNodeChild; // [sp+14h] [bp-Ch]@1
  int Count; // [sp+18h] [bp-8h]@3
  Effect *v23; // [sp+1Ch] [bp-4h]@1

  v23 = this;
  v1 = (NiNode *)((int (__stdcall *)(const char *))this->m_spNode.m_pObject->vfptr[18].__vecDelDtor)("AEEffNode");
  v2 = v1;
  pkNodeChild = v1;
  if ( v1 )
  {
    v3 = v1->m_uiExtraDataSize;
    while ( v3 )
    {
      v4 = v2->m_ppkExtra[v3-- - 1];
      Count = v3;
      if ( v4 )
      {
        if ( ((int (__thiscall *)(NiExtraData *))v4->vfptr[1].__vecDelDtor)(v4) == (_DWORD)&NiTextKeyExtraData::m_RTTI )
        {
          v5 = v4[1].vfptr;
          v6 = v4[1].m_uiRefCount;
          if ( v5 )
          {
            v7 = (const char **)(v6 + 4);
            v8 = v5;
            do
            {
              v9 = *v7;
              if ( *v7 )
              {
                v10 = *v7;
                do
                  v11 = *v10++;
                while ( v11 );
                if ( v10 - (v9 + 1) == 7 )
                {
                  v12 = strncmp("AE", v9, 2u);
                  if ( !v12 )
                  {
                    v13 = *v7;
                    if ( *v7 )
                    {
                      v14 = *v7;
                      do
                        v15 = *v14++;
                      while ( v15 );
                      if ( v14 - (v13 + 1) == 7 )
                        LOWORD(v12) = atoi(v13 + 2);
                      else
                        LOWORD(v12) = 0;
                    }
                    v16 = (EffectViewInfo *)ActionEffectInfoTab::GetByID(v12);
                    if ( v16 )
                    {
                      v17 = v23;
                      _Val.first = *((float *)v7 - 1);
                      _Val.second = v16;
                      v18 = std::_Tree_val<std::_Tmap_traits<float,ActionEffectInfo *,std::less<float>,std::allocator<std::pair<float const,ActionEffectInfo *>>,1>>::_Buynode<std::pair<float,ActionEffectInfo *>>(
                              (std::_Tree_val<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > *)&v23->m_mapAEEffInfo,
                              &_Val);
                      std::_Tree<std::_Tmap_traits<float,ActionEffectInfo *,std::less<float>,std::allocator<std::pair<float const,ActionEffectInfo *>>,1>>::_Linsert(
                        (std::_Tree<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > *)&v17->m_mapAEEffInfo,
                        &result,
                        v18,
                        0);
                    }
                  }
                }
              }
              v7 += 2;
              v8 = (NiRefObjectVtbl *)((char *)v8 - 1);
            }
            while ( v8 );
            v3 = Count;
            v2 = pkNodeChild;
          }
        }
      }
    }
  }
}

//----- (0068EDF0) --------------------------------------------------------
void __thiscall Effect::SetLoopInfo(Effect *this, const char *pcLoopSoundFileName, float fLoopKeepTime, float fLoopWaitTime, float fTime)
{
  this->m_fLoopKeepTime = fLoopKeepTime;
  this->m_fLoopWaitTime = fLoopWaitTime;
  this->m_bLoop = 1;
  this->m_fLoopLastTime = fTime;
  this->m_fLoopStartTime = fTime;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &this->m_kLoopSoundFileName,
    pcLoopSoundFileName,
    strlen(pcLoopSoundFileName));
}

//----- (0068EE50) --------------------------------------------------------
void __thiscall Effect::~Effect(Effect *this)
{
  Effect *v1; // esi@1
  const char *v2; // eax@1
  NiNode *v3; // edi@1
  NiNode *v4; // edi@6
  NiNode *v5; // edi@11
  std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node **v6; // ecx@16
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v7; // eax@16
  std::_Tree_nod<std::_Tmap_traits<float,ActionEffectInfo *,std::less<float>,std::allocator<std::pair<float const ,ActionEffectInfo *> >,1> >::_Node **v8; // ecx@18
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v9; // eax@18
  CPostProcessEffectManager *v10; // eax@21
  NiShader *v11; // eax@21
  CHazeScreenEffect *v12; // edi@21
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v13; // ecx@26
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v14; // ecx@26
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v15; // ecx@26
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v16; // ecx@26
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v17; // ecx@26
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v18; // ecx@26
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v19; // ecx@26
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v20; // ecx@26
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v21; // edi@26
  char *v22; // ebx@26
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v23; // eax@27
  NiNode *v24; // edi@28
  NiNode *v25; // edi@32
  NiNode *v26; // edi@36
  int v27; // [sp-8h] [bp-30h]@23
  char *v28; // [sp-4h] [bp-2Ch]@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v29; // [sp+10h] [bp-18h]@26
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > result; // [sp+14h] [bp-14h]@17
  Effect *v31; // [sp+18h] [bp-10h]@1
  int v32; // [sp+24h] [bp-4h]@1

  v1 = this;
  v31 = this;
  this->vfptr = (NiRefObjectVtbl *)&Effect::`vftable'{for `NiRefObject'};
  this->vfptr = (IEffectDestroyMessengerVtbl *)&Effect::`vftable'{for `IEffectDestroyMessenger'};
  v28 = this->m_spNode.m_pObject->m_pcName;
  v32 = 16;
  v2 = fs("========================%s Clear!!!\n", v28);
  OutputDebugStringA(v2);
  v3 = v1->m_spNode.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spNode.m_pObject = 0;
  }
  v4 = v1->m_spDefaultEffect.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spDefaultEffect.m_pObject = 0;
  }
  v5 = v1->m_spDecalEffect.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spDecalEffect.m_pObject = 0;
  }
  Effect::ClearOscTimeMmap(v1);
  v6 = &v1->m_mapShakeInfo._Myhead->_Left;
  v7 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)*v6;
  if ( (std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node **)*v6 != v6 )
  {
    do
      v7 = std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
             (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)&v1->m_mapShakeInfo,
             &result,
             (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > >)v7)->_Ptr;
    while ( v7 != (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v1->m_mapShakeInfo._Myhead );
  }
  v8 = &v1->m_mapAEEffInfo._Myhead->_Left;
  v1->m_uiEffectType = 0;
  *(_DWORD *)&v1->m_kAniTargetHandle = -1;
  v9 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)*v8;
  if ( (std::_Tree_nod<std::_Tmap_traits<float,ActionEffectInfo *,std::less<float>,std::allocator<std::pair<float const ,ActionEffectInfo *> >,1> >::_Node **)*v8 != v8 )
  {
    do
      v9 = std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
             (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)&v1->m_mapAEEffInfo,
             &result,
             (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > >)v9)->_Ptr;
    while ( v9 != (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v1->m_mapAEEffInfo._Myhead );
  }
  if ( v1->m_ShaderEffectType == 1 )
  {
    v28 = (char *)1;
    v1->m_ShaderEffectType = 8;
    v10 = CPostProcessEffectManager::GetInstance();
    v11 = (NiShader *)CPostProcessEffectManager::GetEffect(v10, (unsigned int)v28);
    v12 = (CHazeScreenEffect *)CPostProcessEffect::DynamicCast(&CHazeScreenEffect::m_RTTI, v11);
    v28 = (char *)pkWorldCamera;
    result._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)&v28;
    if ( pkWorldCamera )
      InterlockedIncrement((volatile LONG *)&pkWorldCamera->m_uiRefCount);
    result._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)&v27;
    CHazeScreenEffect::SetParentNode(v12, 0, (NiPointer<NiCamera>)v28);
    CPostProcessEffect::SetActive((CPostProcessEffect *)&v12->vfptr, 1);
  }
  Effect::DeleteEffectDestoryMessengerList((Effect *)((char *)v1 + 8));
  if ( v1->m_kLoopSoundFileName._Myres >= 0x10 )
  {
    v28 = v1->m_kLoopSoundFileName._Bx._Ptr;
    operator delete(v28);
  }
  v1->m_kLoopSoundFileName._Myres = 15;
  v1->m_kLoopSoundFileName._Mysize = 0;
  v1->m_kLoopSoundFileName._Bx._Buf[0] = 0;
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)&v1->m_mapForceAllCamShake;
  v13._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapForceAllCamShake._Myhead->_Left;
  v28 = (char *)v1->m_mapForceAllCamShake._Myhead;
  LOBYTE(v32) = 17;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapForceAllCamShake,
    &v29,
    v13,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >)v28);
  operator delete(v1->m_mapForceAllCamShake._Myhead);
  v29._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_mapAllCamShake;
  v14._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapAllCamShake._Myhead->_Left;
  v28 = (char *)v1->m_mapAllCamShake._Myhead;
  LOBYTE(v32) = 18;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapAllCamShake,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&result,
    v14,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >)v28);
  operator delete(v1->m_mapAllCamShake._Myhead);
  v29._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_mapForceMyCamShake;
  v15._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapForceMyCamShake._Myhead->_Left;
  v28 = (char *)v1->m_mapForceMyCamShake._Myhead;
  LOBYTE(v32) = 19;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapForceMyCamShake,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&result,
    v15,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >)v28);
  operator delete(v1->m_mapForceMyCamShake._Myhead);
  v29._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_mapMyCamShake;
  v16._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapMyCamShake._Myhead->_Left;
  v28 = (char *)v1->m_mapMyCamShake._Myhead;
  LOBYTE(v32) = 20;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapMyCamShake,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&result,
    v16,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >)v28);
  operator delete(v1->m_mapMyCamShake._Myhead);
  v29._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_mapShakeInfo;
  v17._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapShakeInfo._Myhead->_Left;
  v28 = (char *)v1->m_mapShakeInfo._Myhead;
  LOBYTE(v32) = 21;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapShakeInfo,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&result,
    v17,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >)v28);
  operator delete(v1->m_mapShakeInfo._Myhead);
  v29._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_mapRange;
  v18._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapRange._Myhead->_Left;
  v28 = (char *)v1->m_mapRange._Myhead;
  LOBYTE(v32) = 22;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapRange,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&result,
    v18,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >)v28);
  operator delete(v1->m_mapRange._Myhead);
  v29._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_mapMelee;
  v19._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapMelee._Myhead->_Left;
  v28 = (char *)v1->m_mapMelee._Myhead;
  LOBYTE(v32) = 23;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapMelee,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&result,
    v19,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >)v28);
  operator delete(v1->m_mapMelee._Myhead);
  v29._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_mapAEEffInfo;
  v20._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapAEEffInfo._Myhead->_Left;
  v28 = (char *)v1->m_mapAEEffInfo._Myhead;
  LOBYTE(v32) = 24;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapAEEffInfo,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&result,
    v20,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >)v28);
  operator delete(v1->m_mapAEEffInfo._Myhead);
  LOBYTE(v32) = 6;
  CDecalEffect::~CDecalEffect(&v1->m_kDecalEffect);
  v21 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_kChildList;
  v29._Ptr = v21;
  v21->_Left = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&PgTList<NiPointer<Effect>>::`vftable';
  v22 = (char *)v1->m_kChildList.m_pkHead;
  LOBYTE(v32) = 25;
  while ( v22 )
  {
    v23 = v21->_Left->_Right;
    v28 = v22;
    v22 = *(char **)v22;
    ((void (__thiscall *)(PgTList<NiPointer<Effect> > *, char *))v23)(&v1->m_kChildList, v28);
  }
  v1->m_kChildList.m_kAllocator.m_uiCount = 0;
  v1->m_kChildList.m_pkHead = 0;
  v1->m_kChildList.m_pkTail = 0;
  v21->_Left = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::`vftable';
  v24 = v1->m_spDecalEffect.m_pObject;
  LOBYTE(v32) = 4;
  if ( v24 && !InterlockedDecrement((volatile LONG *)&v24->m_uiRefCount) && v24 )
    v24->vfptr->__vecDelDtor((NiRefObject *)v24, 1u);
  v25 = v1->m_spDefaultEffect.m_pObject;
  LOBYTE(v32) = 3;
  if ( v25 && !InterlockedDecrement((volatile LONG *)&v25->m_uiRefCount) && v25 )
    v25->vfptr->__vecDelDtor((NiRefObject *)v25, 1u);
  v26 = v1->m_spNode.m_pObject;
  LOBYTE(v32) = 2;
  if ( v26 && !InterlockedDecrement((volatile LONG *)&v26->m_uiRefCount) && v26 )
    v26->vfptr->__vecDelDtor((NiRefObject *)v26, 1u);
  LOBYTE(v32) = 1;
  EffectCtrl::~EffectCtrl(&v1->m_kCtrl);
  LOBYTE(v32) = 0;
  IEffectDestroyMessenger::~IEffectDestroyMessenger((IEffectDestroyMessenger *)&v1->vfptr);
  v28 = (char *)&NiRefObject::ms_uiObjects;
  v1->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement((volatile LONG *)v28);
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9BCF78: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::`vftable')(void *p, char);
// 9BCFA0: using guessed type int (__thiscall *PgTList<NiPointer<Effect>>::`vftable')(void *p, char);
// 9BCFB0: using guessed type int (__stdcall *Effect::`vftable'{for `IEffectDestroyMessenger'})(int);
// 9BCFC4: using guessed type int (__thiscall *Effect::`vftable'{for `NiRefObject'})(void *p, char);

//----- (0068F270) --------------------------------------------------------
void __thiscall Effect::Effect(Effect *this, NiNode *pkNode, bool bCreateProgramEff, Char *pkCaster)
{
  Effect *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<float,ActionEffectInfo *,std::less<float>,std::allocator<std::pair<float const ,ActionEffectInfo *> >,1> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<float,ActionEffectInfo *,std::less<float>,std::allocator<std::pair<float const ,ActionEffectInfo *> >,1> >::_Node *v6; // eax@2
  std::_Tree_nod<std::_Tmap_traits<float,ActionEffectInfo *,std::less<float>,std::allocator<std::pair<float const ,ActionEffectInfo *> >,1> >::_Node *v7; // eax@3
  std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *v8; // eax@4
  std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *v9; // eax@5
  std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *v10; // eax@6
  std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *v11; // eax@7
  std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *v12; // eax@8
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v13; // ecx@9
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v14; // eax@9
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v15; // eax@11
  const char **v16; // eax@12
  const char **v17; // eax@14
  const char **v18; // eax@19
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v19; // eax@21
  const char **v20; // eax@22
  const char **v21; // eax@24
  const char **v22; // eax@29
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v23; // eax@31
  const char **v24; // eax@32
  const char **v25; // eax@34
  const char **v26; // eax@39
  int v27; // eax@46
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v28; // eax@50
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v29; // eax@50
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v30; // eax@50
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v31; // eax@50
  NiNode *v32; // eax@50
  NiExtraData *v33; // edi@52
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v34; // eax@54
  NiTextKey *v35; // ecx@54
  float v36; // ST34_4@58
  const char *v37; // ecx@58
  __int16 v38; // bx@61
  unsigned int v39; // edi@61
  char *v40; // eax@64
  std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *v41; // ST30_4@67
  std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *v42; // ST30_4@69
  char *v43; // [sp+2Ch] [bp-98h]@68
  std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *v44; // [sp+30h] [bp-94h]@68
  bool fEffectTime; // [sp+34h] [bp-90h]@68
  char v46; // [sp+48h] [bp-7Ch]@68
  char v47; // [sp+50h] [bp-74h]@67
  Effect *v48; // [sp+58h] [bp-6Ch]@1
  NiNode *pkNodeChild; // [sp+5Ch] [bp-68h]@50
  NiTextKey *pkKey; // [sp+60h] [bp-64h]@54
  std::exception v51; // [sp+64h] [bp-60h]@69
  std::exception pExceptionObject; // [sp+70h] [bp-54h]@70
  unsigned int KeyIndex; // [sp+7Ch] [bp-48h]@54
  std::pair<float,EffectViewInfo *> Add; // [sp+80h] [bp-44h]@50
  int Count; // [sp+88h] [bp-3Ch]@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > result; // [sp+8Ch] [bp-38h]@10
  const char **v57; // [sp+90h] [bp-34h]@12
  const char **v58; // [sp+94h] [bp-30h]@14
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > NoteName; // [sp+98h] [bp-2Ch]@58
  int v60; // [sp+C0h] [bp-4h]@1

  v4 = this;
  v48 = this;
  Count = (int)pkNode;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v4->vfptr = (IEffectDestroyMessengerVtbl *)&IEffectDestroyMessenger::`vftable';
  v60 = 0;
  v4->m_pkEffectDestoryMessengerList.m_kAllocator.m_uiCount = 0;
  v4->m_pkEffectDestoryMessengerList.m_pkHead = 0;
  v4->m_pkEffectDestoryMessengerList.m_pkTail = 0;
  v4->m_pkEffectDestoryMessengerList.vfptr = (NiTListBase<DFALL<IEffectDestroyMessenger *>,IEffectDestroyMessenger *>Vtbl *)&NiTList<IEffectDestroyMessenger *>::`vftable';
  v4->vfptr = (NiRefObjectVtbl *)&Effect::`vftable'{for `NiRefObject'};
  v4->vfptr = (IEffectDestroyMessengerVtbl *)&Effect::`vftable'{for `IEffectDestroyMessenger'};
  EffectCtrl::EffectCtrl(&v4->m_kCtrl);
  v4->m_spNode.m_pObject = 0;
  v4->m_spDefaultEffect.m_pObject = 0;
  v4->m_spDecalEffect.m_pObject = 0;
  v4->m_kChildList.m_kAllocator.m_uiCount = 0;
  v4->m_kChildList.m_pkHead = 0;
  v4->m_kChildList.m_pkTail = 0;
  v4->m_kChildList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect> >Vtbl *)&PgTList<NiPointer<Effect>>::`vftable';
  CDecalEffect::CDecalEffect(&v4->m_kDecalEffect);
  LOBYTE(v60) = 7;
  v4->m_mapAEEffInfo._Mysize = 0;
  v5 = (std::_Tree_nod<std::_Tmap_traits<float,ActionEffectInfo *,std::less<float>,std::allocator<std::pair<float const ,ActionEffectInfo *> >,1> >::_Node *)operator new(0x18u);
  if ( !v5 )
    goto LABEL_92;
  v4->m_mapAEEffInfo._Myhead = v5;
  v5->_Left = v5;
  v4->m_mapAEEffInfo._Myhead->_Parent = v4->m_mapAEEffInfo._Myhead;
  v4->m_mapAEEffInfo._Myhead->_Right = v4->m_mapAEEffInfo._Myhead;
  v4->m_mapAEEffInfo._Myhead->_Color = 1;
  v4->m_mapAEEffInfo._Myhead->_Isnil = 1;
  LOBYTE(v60) = 8;
  v4->m_mapMelee._Mysize = 0;
  v6 = (std::_Tree_nod<std::_Tmap_traits<float,ActionEffectInfo *,std::less<float>,std::allocator<std::pair<float const ,ActionEffectInfo *> >,1> >::_Node *)operator new(0x18u);
  if ( !v6 )
  {
LABEL_78:
    result._Ptr = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&result);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v4->m_mapMelee._Myhead = v6;
  v6->_Left = v6;
  v4->m_mapMelee._Myhead->_Parent = v4->m_mapMelee._Myhead;
  v4->m_mapMelee._Myhead->_Right = v4->m_mapMelee._Myhead;
  v4->m_mapMelee._Myhead->_Color = 1;
  v4->m_mapMelee._Myhead->_Isnil = 1;
  LOBYTE(v60) = 9;
  v4->m_mapRange._Mysize = 0;
  v7 = (std::_Tree_nod<std::_Tmap_traits<float,ActionEffectInfo *,std::less<float>,std::allocator<std::pair<float const ,ActionEffectInfo *> >,1> >::_Node *)operator new(0x18u);
  if ( !v7 )
  {
    KeyIndex = 0;
    std::exception::exception(&v51, (const char *const *)&KeyIndex);
    v51.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&v51, &_TI2_AVbad_alloc_std__);
  }
  v4->m_mapRange._Myhead = v7;
  v7->_Left = v7;
  v4->m_mapRange._Myhead->_Parent = v4->m_mapRange._Myhead;
  v4->m_mapRange._Myhead->_Right = v4->m_mapRange._Myhead;
  v4->m_mapRange._Myhead->_Color = 1;
  v4->m_mapRange._Myhead->_Isnil = 1;
  LOBYTE(v60) = 10;
  v4->m_mapShakeInfo._Mysize = 0;
  v8 = (std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *)operator new(0x18u);
  if ( !v8 )
  {
    result._Ptr = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&result);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v4->m_mapShakeInfo._Myhead = v8;
  v8->_Left = v8;
  v4->m_mapShakeInfo._Myhead->_Parent = v4->m_mapShakeInfo._Myhead;
  v4->m_mapShakeInfo._Myhead->_Right = v4->m_mapShakeInfo._Myhead;
  v4->m_mapShakeInfo._Myhead->_Color = 1;
  v4->m_mapShakeInfo._Myhead->_Isnil = 1;
  LOBYTE(v60) = 11;
  v4->m_mapMyCamShake._Mysize = 0;
  v9 = (std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *)operator new(0x18u);
  if ( !v9 )
  {
    KeyIndex = 0;
    std::exception::exception(&v51, (const char *const *)&KeyIndex);
    v51.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&v51, &_TI2_AVbad_alloc_std__);
  }
  v4->m_mapMyCamShake._Myhead = v9;
  v9->_Left = v9;
  v4->m_mapMyCamShake._Myhead->_Parent = v4->m_mapMyCamShake._Myhead;
  v4->m_mapMyCamShake._Myhead->_Right = v4->m_mapMyCamShake._Myhead;
  v4->m_mapMyCamShake._Myhead->_Color = 1;
  v4->m_mapMyCamShake._Myhead->_Isnil = 1;
  LOBYTE(v60) = 12;
  v4->m_mapForceMyCamShake._Mysize = 0;
  v10 = (std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *)operator new(0x18u);
  if ( !v10 )
  {
    result._Ptr = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&result);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v4->m_mapForceMyCamShake._Myhead = v10;
  v10->_Left = v10;
  v4->m_mapForceMyCamShake._Myhead->_Parent = v4->m_mapForceMyCamShake._Myhead;
  v4->m_mapForceMyCamShake._Myhead->_Right = v4->m_mapForceMyCamShake._Myhead;
  v4->m_mapForceMyCamShake._Myhead->_Color = 1;
  v4->m_mapForceMyCamShake._Myhead->_Isnil = 1;
  LOBYTE(v60) = 13;
  v4->m_mapAllCamShake._Mysize = 0;
  v11 = (std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *)operator new(0x18u);
  if ( !v11 )
  {
LABEL_92:
    KeyIndex = 0;
    std::exception::exception(&v51, (const char *const *)&KeyIndex);
    v51.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&v51, &_TI2_AVbad_alloc_std__);
  }
  v4->m_mapAllCamShake._Myhead = v11;
  v11->_Left = v11;
  v4->m_mapAllCamShake._Myhead->_Parent = v4->m_mapAllCamShake._Myhead;
  v4->m_mapAllCamShake._Myhead->_Right = v4->m_mapAllCamShake._Myhead;
  v4->m_mapAllCamShake._Myhead->_Color = 1;
  v4->m_mapAllCamShake._Myhead->_Isnil = 1;
  LOBYTE(v60) = 14;
  v4->m_mapForceAllCamShake._Mysize = 0;
  v12 = (std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *)operator new(0x18u);
  if ( !v12 )
    goto LABEL_78;
  v4->m_mapForceAllCamShake._Myhead = v12;
  v12->_Left = v12;
  v4->m_mapForceAllCamShake._Myhead->_Parent = v4->m_mapForceAllCamShake._Myhead;
  v4->m_mapForceAllCamShake._Myhead->_Right = v4->m_mapForceAllCamShake._Myhead;
  v4->m_mapForceAllCamShake._Myhead->_Color = 1;
  v4->m_mapForceAllCamShake._Myhead->_Isnil = 1;
  v4->m_kLoopSoundFileName._Myres = 15;
  v4->m_kLoopSoundFileName._Mysize = 0;
  v4->m_kLoopSoundFileName._Bx._Buf[0] = 0;
  v13 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v4->m_mapAEEffInfo._Myhead;
  v4->m_bDecalEffect = 0;
  v4->m_uiActCasterAniCode = 0;
  v14 = v13->_Left;
  LOBYTE(v60) = 16;
  if ( v14 != v13 )
  {
    do
      v14 = std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
              (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)&v4->m_mapAEEffInfo,
              &result,
              (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > >)v14)->_Ptr;
    while ( v14 != (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v4->m_mapAEEffInfo._Myhead );
  }
  std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::clear((std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v4->m_mapMyCamShake);
  std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::clear((std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v4->m_mapForceMyCamShake);
  std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::clear((std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v4->m_mapAllCamShake);
  std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::clear((std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v4->m_mapForceAllCamShake);
  std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::clear((std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v4->m_mapShakeInfo);
  v4->m_pkCaster = pkCaster;
  v15 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)operator new(0xE8u);
  result._Ptr = v15;
  LOBYTE(v60) = 17;
  if ( v15 )
  {
    NiNode::NiNode((NiNode *)v15, 0);
    v57 = v16;
  }
  else
  {
    v57 = 0;
  }
  v17 = (const char **)v4->m_spNode.m_pObject;
  LOBYTE(v60) = 16;
  v58 = v17;
  if ( v17 != v57 )
  {
    if ( v17 && !InterlockedDecrement((volatile LONG *)v17 + 1) && v58 )
      (*(void (__stdcall **)(signed int))*v58)(1);
    v18 = v57;
    v4->m_spNode.m_pObject = (NiNode *)v57;
    if ( v18 )
      InterlockedIncrement((volatile LONG *)v18 + 1);
  }
  v19 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)operator new(0xE8u);
  result._Ptr = v19;
  LOBYTE(v60) = 18;
  if ( v19 )
  {
    NiNode::NiNode((NiNode *)v19, 0);
    v57 = v20;
  }
  else
  {
    v57 = 0;
  }
  v21 = (const char **)v4->m_spDefaultEffect.m_pObject;
  LOBYTE(v60) = 16;
  v58 = v21;
  if ( v21 != v57 )
  {
    if ( v21 && !InterlockedDecrement((volatile LONG *)v21 + 1) && v58 )
      (*(void (__stdcall **)(signed int))*v58)(1);
    v22 = v57;
    v4->m_spDefaultEffect.m_pObject = (NiNode *)v57;
    if ( v22 )
      InterlockedIncrement((volatile LONG *)v22 + 1);
  }
  v23 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)operator new(0xE8u);
  result._Ptr = v23;
  LOBYTE(v60) = 19;
  if ( v23 )
  {
    NiNode::NiNode((NiNode *)v23, 0);
    v57 = v24;
  }
  else
  {
    v57 = 0;
  }
  v25 = (const char **)v4->m_spDecalEffect.m_pObject;
  LOBYTE(v60) = 16;
  v58 = v25;
  if ( v25 != v57 )
  {
    if ( v25 && !InterlockedDecrement((volatile LONG *)v25 + 1) && v58 )
      (*(void (__stdcall **)(_DWORD))*v58)(1);
    v26 = v57;
    v4->m_spDecalEffect.m_pObject = (NiNode *)v57;
    if ( v26 )
      InterlockedIncrement((volatile LONG *)v26 + 1);
  }
  ((void (__stdcall *)(NiNode *, _DWORD))v4->m_spNode.m_pObject->vfptr[29].__vecDelDtor)(
    v4->m_spDefaultEffect.m_pObject,
    0);
  ((void (__stdcall *)(NiNode *, _DWORD))v4->m_spNode.m_pObject->vfptr[29].__vecDelDtor)(
    v4->m_spDecalEffect.m_pObject,
    0);
  CDecalEffect::Init(&v4->m_kDecalEffect, pkTerrain, pBuildingScene);
  NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v4->m_spDefaultEffect.m_pObject->m_kChildren);
  if ( Count )
    ((void (__stdcall *)(int, _DWORD))v4->m_spDefaultEffect.m_pObject->vfptr[29].__vecDelDtor)(Count, 0);
  if ( v4->m_bDecalEffect )
  {
    Count = (int)v4->m_kDecalEffect.m_spDecalNode.m_pObject;
    NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v4->m_spDecalEffect.m_pObject->m_kChildren);
    if ( Count )
      ((void (__stdcall *)(int, _DWORD))v4->m_spDecalEffect.m_pObject->vfptr[29].__vecDelDtor)(Count, 0);
  }
  v27 = (int)v4->m_spNode.m_pObject;
  Count = v27;
  if ( v27 )
  {
    v58 = (const char **)v27;
    EffectCtrl::SetEffectNode(&v4->m_kCtrl, (NiAVObject *)Count);
  }
  v4->m_fLifeTime = 3.4028235e38;
  v4->m_bCreateProgramEff = bCreateProgramEff;
  v4->m_fLastUpdateTime = -1.0;
  if ( bCreateProgramEff )
    Effect::CreateProgramEff(v4);
  v4->m_bLoop = 0;
  v4->m_pkChainEffect = 0;
  v4->m_bStopFlag = 0;
  LODWORD(Add.first) = 4;
  Add.second = (EffectViewInfo *)&v4->m_mapMyCamShake;
  v28 = std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(
          (std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v4->m_mapShakeInfo,
          (std::pair<int const ,int> *)&Add);
  std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v4->m_mapShakeInfo,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > >,bool> *)&Add,
    v28,
    0);
  LODWORD(Add.first) = 0;
  Add.second = (EffectViewInfo *)&v4->m_mapForceMyCamShake;
  v29 = std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(
          (std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v4->m_mapShakeInfo,
          (std::pair<int const ,int> *)&Add);
  std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v4->m_mapShakeInfo,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > >,bool> *)&Add,
    v29,
    0);
  Add.second = (EffectViewInfo *)&v4->m_mapAllCamShake;
  LODWORD(Add.first) = 7;
  v30 = std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(
          (std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v4->m_mapShakeInfo,
          (std::pair<int const ,int> *)&Add);
  std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v4->m_mapShakeInfo,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > >,bool> *)&Add,
    v30,
    0);
  LODWORD(Add.first) = 3;
  Add.second = (EffectViewInfo *)&v4->m_mapForceAllCamShake;
  v31 = std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(
          (std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v4->m_mapShakeInfo,
          (std::pair<int const ,int> *)&Add);
  std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v4->m_mapShakeInfo,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > >,bool> *)&Add,
    v31,
    0);
  v32 = (NiNode *)((int (__stdcall *)(const char *))v4->m_spNode.m_pObject->vfptr[18].__vecDelDtor)("CamEffNode");
  pkNodeChild = v32;
  if ( v32 )
  {
    Count = v32->m_uiExtraDataSize;
    while ( Count )
    {
      v33 = pkNodeChild->m_ppkExtra[Count-- - 1];
      if ( v33 )
      {
        if ( ((int (__thiscall *)(NiExtraData *))v33->vfptr[1].__vecDelDtor)(v33) == (_DWORD)&NiTextKeyExtraData::m_RTTI )
        {
          v34 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v33[1].vfptr;
          v35 = (NiTextKey *)v33[1].m_uiRefCount;
          KeyIndex = (unsigned int)v34;
          pkKey = v35;
          if ( v34 )
          {
            v58 = (const char **)&v35->m_pText;
            result._Ptr = v34;
            do
            {
              if ( *v58 )
              {
                v57 = (const char **)&Effect::m_iUsedOscTargetList;
                do
                {
                  NoteName._Myres = 15;
                  NoteName._Mysize = 0;
                  NoteName._Bx._Buf[0] = 0;
                  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                    &NoteName,
                    &byte_9BCF1F,
                    0);
                  v36 = *(float *)v57;
                  LOBYTE(v60) = 20;
                  OscillationEx::GetOscillationStr(&NoteName, SLODWORD(v36));
                  v37 = NoteName._Bx._Ptr;
                  if ( NoteName._Myres < 0x10 )
                    v37 = (const char *)&NoteName;
                  if ( !strncmp(*v58, v37, NoteName._Mysize) )
                  {
                    Add.first = pkKey->m_fTime;
                    v38 = Effect::FindShnIndex(pkKey, KeyIndex, Add.first);
                    v39 = 0;
                    if ( ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::GetTotal() )
                    {
                      while ( *(_WORD *)CDataReader::GetRecord(
                                          (CDataReader *)(ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::ms_pkTable
                                                        + 4),
                                          v39) != v38 )
                      {
                        if ( ++v39 >= ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::GetTotal() )
                          goto LABEL_64;
                      }
                      v40 = CDataReader::GetRecord(
                              (CDataReader *)(ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::ms_pkTable + 4),
                              v39);
                    }
                    else
                    {
LABEL_64:
                      v40 = 0;
                    }
                    Add.second = (EffectViewInfo *)v40;
                    switch ( *v57 )
                    {
                      case 4u:
                        v41 = std::_Tree_val<std::_Tmap_traits<float,ActionEffectInfo *,std::less<float>,std::allocator<std::pair<float const,ActionEffectInfo *>>,1>>::_Buynode<std::pair<float,ActionEffectInfo *>>(
                                (std::_Tree_val<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > *)&v4->m_mapMyCamShake.comp,
                                &Add);
                        std::_Tree<std::_Tmap_traits<float,ActionEffectInfo *,std::less<float>,std::allocator<std::pair<float const,ActionEffectInfo *>>,1>>::_Linsert(
                          (std::_Tree<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > *)&v4->m_mapMyCamShake.comp,
                          (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > >,bool> *)&v47,
                          v41,
                          0);
                        break;
                      case 0u:
                        fEffectTime = 0;
                        v44 = std::_Tree_val<std::_Tmap_traits<float,ActionEffectInfo *,std::less<float>,std::allocator<std::pair<float const,ActionEffectInfo *>>,1>>::_Buynode<std::pair<float,ActionEffectInfo *>>(
                                (std::_Tree_val<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > *)&v4->m_mapForceMyCamShake.comp,
                                &Add);
                        v43 = &v46;
                        goto LABEL_71;
                      case 7u:
                        v42 = std::_Tree_val<std::_Tmap_traits<float,ActionEffectInfo *,std::less<float>,std::allocator<std::pair<float const,ActionEffectInfo *>>,1>>::_Buynode<std::pair<float,ActionEffectInfo *>>(
                                (std::_Tree_val<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > *)&v4->m_mapAllCamShake.comp,
                                &Add);
                        std::_Tree<std::_Tmap_traits<float,ActionEffectInfo *,std::less<float>,std::allocator<std::pair<float const,ActionEffectInfo *>>,1>>::_Linsert(
                          (std::_Tree<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > *)&v4->m_mapAllCamShake.comp,
                          (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > >,bool> *)&v51._Mywhat,
                          v42,
                          0);
                        break;
                      case 3u:
                        fEffectTime = 0;
                        v44 = std::_Tree_val<std::_Tmap_traits<float,ActionEffectInfo *,std::less<float>,std::allocator<std::pair<float const,ActionEffectInfo *>>,1>>::_Buynode<std::pair<float,ActionEffectInfo *>>(
                                (std::_Tree_val<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > *)&v4->m_mapForceMyCamShake.comp,
                                &Add);
                        v43 = (char *)&pExceptionObject._Mywhat;
LABEL_71:
                        std::_Tree<std::_Tmap_traits<float,ActionEffectInfo *,std::less<float>,std::allocator<std::pair<float const,ActionEffectInfo *>>,1>>::_Linsert(
                          (std::_Tree<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > *)&v4->m_mapForceMyCamShake.comp,
                          (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > >,bool> *)v43,
                          v44,
                          fEffectTime);
                        break;
                      default:
                        break;
                    }
                  }
                  LOBYTE(v60) = 16;
                  if ( NoteName._Myres >= 0x10 )
                    operator delete(NoteName._Bx._Ptr);
                  ++v57;
                }
                while ( (signed int)v57 < (signed int)&unk_A75764 );
              }
              v58 += 2;
              --result._Ptr;
            }
            while ( result._Ptr );
          }
        }
      }
    }
  }
  Effect::CatchAE(v4);
  v4->m_fLoopKeepTime = 0.0;
  v4->m_fLoopWaitTime = 0.0;
  v4->m_bEnableAura = 0;
  v4->m_fLoopLastTime = 0.0;
  v4->m_uiEffectType = 0;
  v4->m_fLoopStartTime = 0.0;
  *(_DWORD *)&v4->m_kAniTargetHandle = -1;
  v4->m_fLength = 0.0;
  v4->m_bAniStart = 0;
  v4->m_bStretch = 0;
  v4->m_kActiveSKillID = -1;
  v4->m_ShaderEffectType = 8;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9B6D4C: using guessed type int (__thiscall *IEffectDestroyMessenger::`vftable')(void *p, char);
// 9B6D60: using guessed type int (__thiscall *NiTList<IEffectDestroyMessenger *>::`vftable')(void *p, char);
// 9BCFA0: using guessed type int (__thiscall *PgTList<NiPointer<Effect>>::`vftable')(void *p, char);
// 9BCFB0: using guessed type int (__stdcall *Effect::`vftable'{for `IEffectDestroyMessenger'})(int);
// 9BCFC4: using guessed type int (__thiscall *Effect::`vftable'{for `NiRefObject'})(void *p, char);
// A89D2C: using guessed type int ITableBase<EffectViewInfo,ShakeEffectViewInfoTab>::ms_pkTable;

//----- (0068FCC0) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::~NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect> > *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::`vftable';
}
// 9BCF78: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::`vftable')(void *p, char);

//----- (0068FCD0) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect> > *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect> > *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect> > *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BCF78: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::`vftable')(void *p, char);

//----- (0068FD00) --------------------------------------------------------
bool __cdecl NiObject::IsExactKindOf(NiRTTI *pkRTTI, NiObject *pkObject)
{
  bool result; // al@2

  if ( pkObject )
    result = ((int (*)(void))pkObject->vfptr[1].__vecDelDtor)() == (_DWORD)pkRTTI;
  else
    result = 0;
  return result;
}

//----- (0068FD20) --------------------------------------------------------
void __thiscall CDecalEffect::Init(CDecalEffect *this, PgNsTerrain *pkTerrain, NiNode *pBuildingScene)
{
  CDecalEffect *v3; // edi@1
  NiNode *v4; // eax@1
  NiNode *v5; // ebx@1
  NiNode *v6; // eax@2
  NiNode *v7; // esi@3
  NiNode *v8; // ST00_4@10

  v3 = this;
  v4 = (NiNode *)operator new(0xE8u);
  v5 = 0;
  if ( v4 )
  {
    NiNode::NiNode(v4, 0);
    v5 = v6;
  }
  v7 = v3->m_spDecalNode.m_pObject;
  if ( v7 != v5 )
  {
    if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v3->m_spDecalNode.m_pObject = v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  }
  v3->m_pkTerrain = pkTerrain;
  v3->m_pBuildingScene = pBuildingScene;
  NsDecal::Init(&v3->m_kDecalMaker);
  v8 = v3->m_pBuildingScene;
  v3->m_kDecalMaker.m_pkHpTerrain = v3->m_pkTerrain;
  NsDecal::SetObjectTerrain(&v3->m_kDecalMaker, v8);
}

//----- (0068FE00) --------------------------------------------------------
void __thiscall CDecalEffect::CDecalEffect(CDecalEffect *this)
{
  CDecalEffect *v1; // esi@1
  NiNode *v2; // edi@1

  v1 = this;
  this->vfptr = (CDecalEffectVtbl *)&CDecalEffect::`vftable';
  NsEffect::NsEffect(&this->m_kEffect);
  NsDecal::NsDecal(&v1->m_kDecalMaker);
  v1->m_spDecalNode.m_pObject = 0;
  v2 = v1->m_spDecalNode.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
    v1->m_spDecalNode.m_pObject = 0;
  }
}
// 9BCF98: using guessed type int (__thiscall *CDecalEffect::`vftable')(void *p, char);

//----- (0068FEA0) --------------------------------------------------------
void __thiscall CDecalEffect::~CDecalEffect(CDecalEffect *this)
{
  CDecalEffect *v1; // esi@1
  NiNode *v2; // edi@1
  NiNode *v3; // edi@6

  v1 = this;
  this->vfptr = (CDecalEffectVtbl *)&CDecalEffect::`vftable';
  v2 = this->m_spDecalNode.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spDecalNode.m_pObject = 0;
  }
  v3 = v1->m_spDecalNode.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  NsDecal::~NsDecal(&v1->m_kDecalMaker);
  NsEffect::~NsEffect(&v1->m_kEffect);
}
// 9BCF98: using guessed type int (__thiscall *CDecalEffect::`vftable')(void *p, char);

//----- (0068FF60) --------------------------------------------------------
CDecalEffect *__thiscall CDecalEffect::`vector deleting destructor'(CDecalEffect *this, unsigned int a2)
{
  CDecalEffect *v2; // esi@1

  v2 = this;
  CDecalEffect::~CDecalEffect(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0068FF90) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect> > *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect> > *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect> > *v2; // edi@1
  NiTListItem<NiPointer<Effect> > *v3; // esi@1
  NiTListItem<NiPointer<Effect> > *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect> >Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect> > *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BCF78: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::`vftable')(void *p, char);
// 9BCF88: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::`vftable')(void *p, char);

//----- (00690020) --------------------------------------------------------
void __thiscall NiTPointerList<NiPointer<Effect>>::~NiTPointerList<NiPointer<Effect>>(NiTPointerList<NiPointer<Effect> > *this)
{
  NiTPointerList<NiPointer<Effect> > *v1; // edi@1
  NiTListItem<NiPointer<Effect> > *v2; // esi@1
  NiTListItem<NiPointer<Effect> > *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect> >Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect> > *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::`vftable';
}
// 9BCF78: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::`vftable')(void *p, char);
// 9BCF88: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::`vftable')(void *p, char);

//----- (006900A0) --------------------------------------------------------
NiShader *__cdecl CPostProcessEffect::DynamicCast(NiRTTI *pkRTTI, NiShader *pkObject)
{
  NiShader *result; // eax@2
  NiRTTI *v3; // eax@3

  if ( pkObject )
  {
    v3 = (NiRTTI *)((int (__thiscall *)(NiShader *))pkObject->vfptr[1].__vecDelDtor)(pkObject);
    if ( v3 )
    {
      while ( v3 != pkRTTI )
      {
        v3 = v3->m_pkBaseRTTI;
        if ( !v3 )
          goto LABEL_6;
      }
      result = pkObject;
    }
    else
    {
LABEL_6:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006900F0) --------------------------------------------------------
void __thiscall PgTList<NiPointer<Effect>>::~PgTList<NiPointer<Effect>>(PgTList<NiPointer<Effect> > *this)
{
  PgTList<NiPointer<Effect> > *v1; // edi@1
  NiTListItem<NiPointer<Effect> > *v2; // esi@1
  NiTListItem<NiPointer<Effect> > *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect> >Vtbl *)&PgTList<NiPointer<Effect>>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect> > *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::`vftable';
}
// 9BCF78: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::`vftable')(void *p, char);
// 9BCFA0: using guessed type int (__thiscall *PgTList<NiPointer<Effect>>::`vftable')(void *p, char);

//----- (00690170) --------------------------------------------------------
PgTList<NiPointer<Effect> > *__thiscall PgTList<NiPointer<Effect>>::`vector deleting destructor'(PgTList<NiPointer<Effect> > *this, unsigned int a2)
{
  PgTList<NiPointer<Effect> > *v2; // edi@1
  NiTListItem<NiPointer<Effect> > *v3; // esi@1
  NiTListItem<NiPointer<Effect> > *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect> >Vtbl *)&PgTList<NiPointer<Effect>>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect> > *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BCF78: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<Effect>>::`vftable')(void *p, char);
// 9BCFA0: using guessed type int (__thiscall *PgTList<NiPointer<Effect>>::`vftable')(void *p, char);

//----- (00690200) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<float,ActionEffectInfo *,std::less<float>,std::allocator<std::pair<float const,ActionEffectInfo *>>,1>>::_Buynode<std::pair<float,ActionEffectInfo *>>(std::_Tree_val<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > *this, std::pair<float,EffectViewInfo *> *_Val)
{
  std::_Tree_val<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *result; // eax@1
  std::exception pExceptionObject; // [sp+4h] [bp-Ch]@5

  v2 = this;
  result = (std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *)operator new(0x18u);
  if ( !result )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  result->_Left = v2->_Myhead;
  result->_Parent = v2->_Myhead;
  result->_Right = v2->_Myhead;
  *(_WORD *)&result->_Color = 0;
  if ( result != (std::_Tree_nod<std::_Tmap_traits<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> >,1> >::_Node *)-12 )
    result->_Myval = (std::pair<float const ,EffectViewInfo *>)*_Val;
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00690270) --------------------------------------------------------
Effect *__thiscall Effect::`vector deleting destructor'(char *this, unsigned int a2)
{
  return Effect::`vector deleting destructor'((Effect *)(this - 8), a2);
}

//----- (00690280) --------------------------------------------------------
NiRTTI *Effect::GetRTTI()
{
  return &Effect::m_RTTI;
}

//----- (00690290) --------------------------------------------------------
bool __thiscall Effect::IsEnd(Effect *this, float fTime)
{
  bool result; // al@5
  float fPastTime; // [sp+8h] [bp+8h]@3

  result = 1;
  if ( !this->m_bStopFlag )
  {
    if ( this->m_bLoop
      || (fPastTime = fTime - this->m_fStartTime, this->m_kCtrl.m_fMaxTime >= (double)fPastTime)
      && this->m_fLifeTime >= (double)fPastTime )
    {
      result = 0;
    }
  }
  return result;
}

//----- (006902E0) --------------------------------------------------------
Effect *__thiscall Effect::`vector deleting destructor'(Effect *this, unsigned int a2)
{
  Effect *v2; // esi@1

  v2 = this;
  Effect::~Effect(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00690310) --------------------------------------------------------
void __thiscall EffectCtrl::SetFrequency(EffectCtrl *this, float fFrequency)
{
  this->m_fFrequency = fFrequency;
}

//----- (00690320) --------------------------------------------------------
void __thiscall EffectCtrl::SetPhase(EffectCtrl *this, float fPhase)
{
  this->m_fPhase = fPhase;
}

//----- (00690330) --------------------------------------------------------
void __thiscall CDecalEffect::Start(CDecalEffect *this, float fTime)
{
  NsEffect::Start(&this->m_kEffect, fTime);
}

//----- (00690350) --------------------------------------------------------
void __thiscall DecalMgr::Init(DecalMgr *this, PgNsTerrain *kTerrain, NiNode *kBuildingScene)
{
  if ( kTerrain )
    this->m_pkTerrain = kTerrain;
  if ( kBuildingScene )
    this->m_pkBuildingScene = kBuildingScene;
}

//----- (00690370) --------------------------------------------------------
void __thiscall DecalMgr::SetHeightFieldTerrain(DecalMgr *this, PgNsTerrain *kTerrain)
{
  if ( kTerrain )
    this->m_pkTerrain = kTerrain;
}

//----- (006903A0) --------------------------------------------------------
bool __thiscall CharDecal::IsEnd(CharDecal *this)
{
  return this->m_bEnd;
}

//----- (006903B0) --------------------------------------------------------
bool __thiscall CharDecal::IsPassLifeTime(CharDecal *this, float fTime)
{
  bool result; // al@2

  if ( this->m_fLifeTime >= 0.0 )
    result = fTime > (double)this->m_fLifeTime;
  else
    result = 0;
  return result;
}

//----- (006903F0) --------------------------------------------------------
void __thiscall CharDecal::SetCharHandle(CharDecal *this, unsigned __int16 kHandle)
{
  this->m_hHandle = kHandle;
}

//----- (00690410) --------------------------------------------------------
unsigned __int16 __thiscall CharDecal::GetCharHandle(CharDecal *this)
{
  return this->m_hHandle;
}

//----- (00690420) --------------------------------------------------------
void __thiscall EffectCtrl::EffectCtrl(EffectCtrl *this)
{
  this->vfptr = (EffectCtrlVtbl *)&EffectCtrl::`vftable';
  this->m_kControllers.vfptr = (NiTArray<NiTimeController *>Vtbl *)&NiTArray<NiTimeController *>::`vftable';
  this->m_kControllers.m_uiMaxSize = 0;
  this->m_kControllers.m_uiGrowBy = 1;
  this->m_kControllers.m_uiSize = 0;
  this->m_kControllers.m_uiESize = 0;
  this->m_kControllers.m_pBase = 0;
  this->m_fMinTime = 0.0;
  this->m_fMaxTime = 0.0;
  this->m_pEffectObject = 0;
  this->m_uiControllerCount = 0.0;
  this->m_fFrequency = 0.0;
  this->m_fPhase = 0.0;
}
// 9BD02C: using guessed type int (__thiscall *NiTArray<NiTimeController *>::`vftable')(void *p, char);
// 9BD064: using guessed type int (__thiscall *EffectCtrl::`vftable')(void *p, char);

//----- (00690460) --------------------------------------------------------
void __thiscall EffectCtrl::~EffectCtrl(EffectCtrl *this)
{
  NiTimeController **v1; // ST00_4@1

  this->vfptr = (EffectCtrlVtbl *)&EffectCtrl::`vftable';
  this->m_pEffectObject = 0;
  v1 = this->m_kControllers.m_pBase;
  this->m_kControllers.vfptr = (NiTArray<NiTimeController *>Vtbl *)&NiTArray<NiTimeController *>::`vftable';
  operator delete[](v1);
}
// 9BD02C: using guessed type int (__thiscall *NiTArray<NiTimeController *>::`vftable')(void *p, char);
// 9BD064: using guessed type int (__thiscall *EffectCtrl::`vftable')(void *p, char);

//----- (00690480) --------------------------------------------------------
void __thiscall EffectCtrl::Start(EffectCtrl *this, float _fTime)
{
  EffectCtrl *v2; // edi@1
  unsigned int v3; // esi@1
  NiTimeController *v4; // ecx@2

  v2 = this;
  v3 = 0;
  if ( this->m_kControllers.m_uiSize )
  {
    do
    {
      v4 = v2->m_kControllers.m_pBase[v3];
      if ( v4 )
        ((void (__stdcall *)(_DWORD))v4->vfptr[15].__vecDelDtor)(LODWORD(_fTime));
      ++v3;
    }
    while ( v3 < v2->m_kControllers.m_uiSize );
  }
}

//----- (006904C0) --------------------------------------------------------
void __thiscall EffectCtrl::Stop(EffectCtrl *this)
{
  EffectCtrl *v1; // edi@1
  unsigned int v2; // esi@1
  NiTimeController *v3; // ecx@2

  v1 = this;
  v2 = 0;
  if ( this->m_kControllers.m_uiSize )
  {
    do
    {
      v3 = v1->m_kControllers.m_pBase[v2];
      if ( v3 )
        ((void (*)(void))v3->vfptr[16].__vecDelDtor)();
      ++v2;
    }
    while ( v2 < v1->m_kControllers.m_uiSize );
  }
}

//----- (006904F0) --------------------------------------------------------
void __userpurge CharDecal::Update(CharDecal *this@<ecx>, int a2@<ebx>, float fTime)
{
  CharDecal *v3; // esi@1
  Char *v4; // eax@1
  NiNode *v5; // edi@2
  NiPoint3 *v6; // eax@2
  NiPoint3 result; // [sp+14h] [bp-Ch]@2

  v3 = this;
  v4 = CharMgr::GetChar(&g_kCharMgr, this->m_hHandle);
  if ( v4 )
  {
    v5 = v3->m_spDecalNode.m_pObject;
    v6 = Char::GetHeightPos(v4, a2, &result);
    NsDecal::Update(&v3->m_kDecalMaker, 0.0, v5, v6);
  }
  else
  {
    NsDecal::Update(&v3->m_kDecalMaker, 0.0, v3->m_spDecalNode.m_pObject, &v3->m_kPos);
  }
  NiAVObject::Update((NiAVObject *)&v3->m_spDecalNode.m_pObject->vfptr, fTime, 1);
}

//----- (00690570) --------------------------------------------------------
void __thiscall CharDecal::SetCharHandle(CharDecal *this, Char *kChar)
{
  if ( kChar )
    this->m_hHandle = kChar->m_kHandle;
}

//----- (00690590) --------------------------------------------------------
void __thiscall CharDecal::SetLifeTime(CharDecal *this, float fTime)
{
  this->m_fLifeTime = Timer::ms_fCurTime + fTime;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006905B0) --------------------------------------------------------
void __thiscall EffectCtrl::StartEmitter(EffectCtrl *this, float _fTime)
{
  EffectCtrl *v2; // ebx@1
  unsigned int v3; // edi@1
  NiTimeController *v4; // esi@2
  NiRTTI *v5; // eax@3

  v2 = this;
  v3 = 0;
  if ( this->m_kControllers.m_uiSize )
  {
    do
    {
      v4 = v2->m_kControllers.m_pBase[v3];
      if ( v4 )
      {
        v5 = (NiRTTI *)((int (__thiscall *)(_DWORD))v4->vfptr[1].__vecDelDtor)(v4);
        if ( v5 )
        {
          while ( v5 != &NiPSysEmitterCtlr::m_RTTI )
          {
            v5 = v5->m_pkBaseRTTI;
            if ( !v5 )
              goto LABEL_8;
          }
          v4->vfptr[15].__vecDelDtor((NiRefObject *)v4, LODWORD(_fTime));
        }
      }
LABEL_8:
      ++v3;
    }
    while ( v3 < v2->m_kControllers.m_uiSize );
  }
}

//----- (00690610) --------------------------------------------------------
void __thiscall EffectCtrl::StopEmitter(EffectCtrl *this)
{
  EffectCtrl *v1; // ebx@1
  unsigned int v2; // edi@1
  NiTimeController *v3; // esi@2
  NiRTTI *v4; // eax@3

  v1 = this;
  v2 = 0;
  if ( this->m_kControllers.m_uiSize )
  {
    do
    {
      v3 = v1->m_kControllers.m_pBase[v2];
      if ( v3 )
      {
        v4 = (NiRTTI *)((int (__thiscall *)(_DWORD))v3->vfptr[1].__vecDelDtor)(v3);
        if ( v4 )
        {
          while ( v4 != &NiPSysEmitterCtlr::m_RTTI )
          {
            v4 = v4->m_pkBaseRTTI;
            if ( !v4 )
              goto LABEL_8;
          }
          ((void (__thiscall *)(_DWORD))v3->vfptr[16].__vecDelDtor)(v3);
        }
      }
LABEL_8:
      ++v2;
    }
    while ( v2 < v1->m_kControllers.m_uiSize );
  }
}

//----- (00690660) --------------------------------------------------------
void __thiscall DecalMgr::RemoveAllDecal(DecalMgr *this)
{
  NiTListItem<CharDecal *> *v1; // eax@1
  NiNode *v2; // ebx@1
  CharDecal *v3; // edi@4
  NiNode *v4; // esi@5
  NiTListItem<CharDecal *> *v5; // esi@12
  char *v6; // edi@12
  NiTListItem<CharDecal *> *v7; // ST00_4@13
  DecalMgr *v8; // [sp+10h] [bp-18h]@1
  NiTListItem<CharDecal *> *iter; // [sp+18h] [bp-10h]@4

  v8 = this;
  v1 = this->m_kList.m_pkHead;
  v2 = 0;
  if ( v1 )
  {
    while ( 1 )
    {
      v3 = v1->m_element;
      iter = v1->m_pkNext;
      if ( v3 )
      {
        v4 = v3->m_spDecalNode.m_pObject;
        if ( v4 )
        {
          v2 = v3->m_spDecalNode.m_pObject;
          InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
          World::DetachEffect(&g_kWorld, v4);
        }
        v3->vfptr->__vecDelDtor((CDecalEffect *)v3, 1u);
        if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
          v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
      }
      v2 = 0;
      if ( !iter )
        break;
      v1 = iter;
    }
    this = v8;
  }
  v5 = this->m_kList.m_pkHead;
  v6 = (char *)&this->m_kList;
  while ( v5 )
  {
    v7 = v5;
    v5 = v5->m_pkNext;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v6 + 8))(v6, v7);
  }
  *((_DWORD *)v6 + 3) = 0;
  *((_DWORD *)v6 + 1) = 0;
  *((_DWORD *)v6 + 2) = 0;
}

//----- (00690750) --------------------------------------------------------
void __thiscall DecalMgr::Terminate(DecalMgr *this)
{
  this->m_pkTerrain = 0;
  this->m_pkBuildingScene = 0;
  DecalMgr::RemoveAllDecal(this);
}

//----- (00690760) --------------------------------------------------------
void __thiscall CharDecal::CharDecal(CharDecal *this)
{
  CharDecal *v1; // esi@1

  v1 = this;
  CDecalEffect::CDecalEffect((CDecalEffect *)&this->vfptr);
  v1->m_fLifeTime = -1.0;
  v1->m_hHandle = -1;
  v1->vfptr = (CDecalEffectVtbl *)&CharDecal::`vftable';
  v1->m_bEnd = 0;
}
// 9BD094: using guessed type int (__thiscall *CharDecal::`vftable')(void *p, char);

//----- (006907A0) --------------------------------------------------------
void __thiscall CharDecal::~CharDecal(CharDecal *this)
{
  this->vfptr = (CDecalEffectVtbl *)&CharDecal::`vftable';
  CDecalEffect::~CDecalEffect((CDecalEffect *)&this->vfptr);
}
// 9BD094: using guessed type int (__thiscall *CharDecal::`vftable')(void *p, char);

//----- (006907B0) --------------------------------------------------------
void __thiscall EffectCtrl::Add(EffectCtrl *this, NiTimeController *pkController)
{
  NiTimeController *v2; // ebx@1
  EffectCtrl *v3; // esi@1
  unsigned int v4; // eax@6
  unsigned int v5; // [sp+8h] [bp-4h]@6

  v2 = pkController;
  v3 = this;
  if ( pkController )
  {
    if ( this->m_fMinTime > (double)pkController->m_fLoKeyTime )
      this->m_fMinTime = pkController->m_fLoKeyTime;
    if ( this->m_fMaxTime < (double)v2->m_fHiKeyTime )
      this->m_fMaxTime = v2->m_fHiKeyTime;
    v4 = this->m_kControllers.m_uiSize;
    v5 = v4;
    if ( v4 >= this->m_kControllers.m_uiMaxSize )
    {
      NiTArray<NiGeometry *>::SetSize(
        (NiTArray<NiTPointerList<NiPointer<NiProperty> > *> *)&this->m_kControllers,
        v4 + this->m_kControllers.m_uiGrowBy);
      v4 = v5;
    }
    NiTArray<NiCollisionGroup::Record *>::SetAt(
      (NiTArray<NiVBChip *> *)&v3->m_kControllers,
      v4,
      (NiVBChip *const *)&pkController);
    v3->m_uiControllerCount = v3->m_uiControllerCount + 1.0;
    v2->m_uFlags = v2->m_uFlags & 0xFFF7 | 1;
  }
}

//----- (00690840) --------------------------------------------------------
void __thiscall EffectCtrl::FindAndAdd(EffectCtrl *this, NiObjectNET *pkRoot)
{
  EffectCtrl *v2; // ebx@1
  NiTimeController *i; // esi@2
  NiRTTI *v4; // eax@4
  NiRTTI *v5; // eax@7
  unsigned int v6; // esi@11
  NiObjectNET *v7; // eax@14
  unsigned int v8; // eax@16
  int v9; // esi@16
  NiObjectNET *j; // eax@18
  char *v11; // esi@21
  NiObjectNET *v12; // eax@24

  v2 = this;
  if ( pkRoot )
  {
    for ( i = pkRoot->m_spControllers.m_pObject; i; i = i->m_spNext.m_pObject )
      EffectCtrl::Add(v2, i);
    v4 = (NiRTTI *)((int (__thiscall *)(NiObjectNET *))pkRoot->vfptr[1].__vecDelDtor)(pkRoot);
    if ( v4 )
    {
      while ( v4 != &NiAVObject::m_RTTI )
      {
        v4 = v4->m_pkBaseRTTI;
        if ( !v4 )
          goto LABEL_7;
      }
      v6 = pkRoot[5].m_uiExtraDataSize;
      while ( pkRoot[6].vfptr && v6 )
      {
        v7 = *(NiObjectNET **)(v6 + 8);
        v6 = *(_DWORD *)v6;
        if ( v7 )
          EffectCtrl::FindAndAdd(v2, v7);
      }
    }
LABEL_7:
    v5 = (NiRTTI *)((int (__thiscall *)(NiObjectNET *))pkRoot->vfptr[1].__vecDelDtor)(pkRoot);
    if ( v5 )
    {
      while ( v5 != &NiNode::m_RTTI )
      {
        v5 = v5->m_pkBaseRTTI;
        if ( !v5 )
          return;
      }
      v8 = pkRoot[6].m_uiExtraDataSize;
      v9 = 0;
      if ( v8 )
      {
        if ( v8 > 0 )
          goto LABEL_19;
        for ( j = 0; ; j = (NiObjectNET *)(&pkRoot[6].m_spControllers.m_pObject->vfptr)[v9] )
        {
          EffectCtrl::FindAndAdd(v2, j);
          if ( pkRoot[6].m_uiExtraDataSize <= ++v9 )
            break;
LABEL_19:
          ;
        }
      }
      v11 = pkRoot[7].m_pcName;
      while ( pkRoot[7].m_ppkExtra && v11 )
      {
        v12 = (NiObjectNET *)*((_DWORD *)v11 + 2);
        v11 = *(char **)v11;
        if ( v12 )
          EffectCtrl::FindAndAdd(v2, v12);
      }
    }
  }
}

//----- (00690940) --------------------------------------------------------
void __thiscall EffectCtrl::SetEffectNode(EffectCtrl *this, NiAVObject *_pkEffectObject)
{
  unsigned int v2; // eax@1

  v2 = 0;
  if ( this->m_kControllers.m_uiSize )
  {
    do
      this->m_kControllers.m_pBase[v2++] = 0;
    while ( v2 < this->m_kControllers.m_uiSize );
  }
  this->m_kControllers.m_uiSize = 0;
  this->m_kControllers.m_uiESize = 0;
  this->m_fMinTime = 3.4028235e38;
  this->m_pEffectObject = _pkEffectObject;
  this->m_fMaxTime = 0.0;
  this->m_uiControllerCount = 0.0;
  EffectCtrl::FindAndAdd(this, (NiObjectNET *)&_pkEffectObject->vfptr);
}

//----- (00690990) --------------------------------------------------------
void __thiscall DecalMgr::~DecalMgr(DecalMgr *this)
{
  DecalMgr *v1; // esi@1
  int v2; // edi@1
  NiTListItem<CharDecal *> **v3; // esi@1
  NiTListItem<CharDecal *> **v4; // ST00_4@2

  v1 = this;
  this->vfptr = (DecalMgrVtbl *)&DecalMgr::`vftable';
  this->m_pkTerrain = 0;
  this->m_pkBuildingScene = 0;
  DecalMgr::RemoveAllDecal(this);
  v2 = (int)&v1->m_kList;
  v1->m_kList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>Vtbl *)&PgTList<CharDecal *>::`vftable';
  v3 = &v1->m_kList.m_pkHead->m_pkNext;
  while ( v3 )
  {
    v4 = v3;
    v3 = (NiTListItem<CharDecal *> **)*v3;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v2 + 8))(v2, v4);
  }
  *(_DWORD *)(v2 + 12) = 0;
  *(_DWORD *)(v2 + 4) = 0;
  *(_DWORD *)(v2 + 8) = 0;
  *(_DWORD *)v2 = &NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::`vftable';
}
// 9BD034: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::`vftable')(void *p, char);
// 9BD0A4: using guessed type int (__thiscall *PgTList<CharDecal *>::`vftable')(void *p, char);
// 9BD0B4: using guessed type int (__thiscall *DecalMgr::`vftable')(void *p, char);

//----- (00690A30) --------------------------------------------------------
void __thiscall DecalMgr::RemoveDecal(DecalMgr *this, CharDecal *pkDecal)
{
  CharDecal *v2; // edi@1
  NiTListItem<CharDecal *> *v3; // eax@2
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *v4; // ecx@2
  CharDecal **v5; // edx@3
  CharDecal *v6; // esi@3

  v2 = pkDecal;
  if ( pkDecal )
  {
    v3 = this->m_kList.m_pkHead;
    v4 = (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&this->m_kList;
    if ( v3 )
    {
      while ( 1 )
      {
        v5 = &v3->m_element;
        v6 = (CharDecal *)v3;
        v3 = v3->m_pkNext;
        if ( pkDecal == *v5 )
          break;
        if ( !v3 )
          goto LABEL_5;
      }
    }
    else
    {
LABEL_5:
      v6 = 0;
    }
    pkDecal = v6;
    if ( v6 )
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(v4, (void **)&pkDecal);
    if ( v2->m_spDecalNode.m_pObject )
      World::DetachEffect(&g_kWorld, v2->m_spDecalNode.m_pObject);
    v2->vfptr->__vecDelDtor((CDecalEffect *)v2, 1u);
  }
}

//----- (00690A90) --------------------------------------------------------
void __thiscall DecalMgr::RemoveCharDecal(DecalMgr *this, unsigned __int16 hHandle)
{
  NiTListItem<CharDecal *> *v2; // eax@1
  CharDecal *v3; // edx@2

  v2 = this->m_kList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      v2 = v2->m_pkNext;
      if ( v3 )
      {
        if ( v3->m_hHandle == hHandle )
          break;
      }
      if ( !v2 )
        return;
    }
    DecalMgr::RemoveDecal(this, v3);
  }
}

//----- (00690AD0) --------------------------------------------------------
void __thiscall DecalMgr::Update(DecalMgr *this, float fTime)
{
  NiTListItem<CharDecal *> *v2; // edi@1
  NiTListItem<CharDecal *> *v3; // ebx@1
  CharDecal *v4; // esi@2
  NiTListItem<CharDecal *> *v5; // eax@5
  CharDecal *v6; // esi@12
  NiTListItem<CharDecal *> **v7; // eax@13
  CharDecal **v8; // edx@14
  float v9; // edi@14
  NiTListItem<CharDecal *> *v10; // esi@23
  NiTListItem<CharDecal *> *v11; // ST00_4@24
  NiTList<CharDecal *> kDelList; // [sp+14h] [bp-20h]@1
  DecalMgr *v13; // [sp+24h] [bp-10h]@1
  int v14; // [sp+30h] [bp-4h]@1

  v13 = this;
  v2 = this->m_kList.m_pkHead;
  v3 = 0;
  kDelList.m_kAllocator.m_uiCount = 0;
  kDelList.m_pkHead = 0;
  kDelList.m_pkTail = 0;
  kDelList.vfptr = (NiTListBase<DFALL<CharDecal *>,CharDecal *>Vtbl *)&NiTList<CharDecal *>::`vftable';
  v14 = 0;
  if ( v2 )
  {
    do
    {
      v4 = v2->m_element;
      v2 = v2->m_pkNext;
      if ( v4 )
      {
        if ( v4->m_fLifeTime < 0.0 || v4->m_fLifeTime >= (double)fTime )
        {
          v4->vfptr[1].__vecDelDtor((CDecalEffect *)v4, LODWORD(fTime));
        }
        else
        {
          v5 = kDelList.vfptr->NewItem((NiTListBase<DFALL<CharDecal *>,CharDecal *> *)&kDelList);
          v5->m_element = v4;
          v5->m_pkNext = 0;
          v5->m_pkPrev = kDelList.m_pkTail;
          if ( kDelList.m_pkTail )
          {
            kDelList.m_pkTail->m_pkNext = v5;
            ++kDelList.m_kAllocator.m_uiCount;
            kDelList.m_pkTail = v5;
          }
          else
          {
            ++kDelList.m_kAllocator.m_uiCount;
            kDelList.m_pkHead = v5;
            kDelList.m_pkTail = v5;
          }
        }
      }
    }
    while ( v2 );
    v3 = kDelList.m_pkHead;
  }
  while ( v3 )
  {
    v6 = v3->m_element;
    v3 = v3->m_pkNext;
    if ( v6 )
    {
      v7 = &v13->m_kList.m_pkHead->m_pkNext;
      if ( v7 )
      {
        while ( 1 )
        {
          v8 = (CharDecal **)(v7 + 2);
          v9 = *(float *)&v7;
          v7 = (NiTListItem<CharDecal *> **)*v7;
          if ( v6 == *v8 )
            break;
          if ( !v7 )
            goto LABEL_16;
        }
      }
      else
      {
LABEL_16:
        v9 = 0.0;
      }
      fTime = v9;
      if ( v9 != 0.0 )
        NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&v13->m_kList,
          (void **)&fTime);
      if ( v6->m_spDecalNode.m_pObject )
        World::DetachEffect(&g_kWorld, v6->m_spDecalNode.m_pObject);
      v6->vfptr->__vecDelDtor((CDecalEffect *)v6, 1u);
    }
  }
  v10 = kDelList.m_pkHead;
  if ( kDelList.m_pkHead )
  {
    do
    {
      v11 = v10;
      v10 = v10->m_pkNext;
      kDelList.vfptr->DeleteItem((NiTListBase<DFALL<CharDecal *>,CharDecal *> *)&kDelList, v11);
    }
    while ( v10 );
  }
}
// 9BD084: using guessed type int (__thiscall *NiTList<CharDecal *>::`vftable')(void *p, char);

//----- (00690C50) --------------------------------------------------------
char __thiscall CDecalEffect::SetEffect(CDecalEffect *this, NiNode *pEffect)
{
  CDecalEffect *v2; // edi@1
  NiAVObject *v3; // eax@2
  NiNode *v4; // esi@2
  NiAVObject *v5; // ecx@3
  NiNode *v6; // ebx@3
  NiRTTI *v7; // eax@3
  char result; // al@6
  NiNode *v9; // ecx@7
  FindDecalGeometry kFindGeom; // [sp+1Ch] [bp-1Ch]@3
  NiPointer<HazeAccumulator> v11; // [sp+28h] [bp-10h]@8
  int v12; // [sp+34h] [bp-4h]@3
  float fRadius; // [sp+40h] [bp+8h]@3

  v2 = this;
  if ( pEffect
    && (v3 = (NiAVObject *)((int (__stdcall *)(const char *))pEffect->vfptr[18].__vecDelDtor)("#Decal"),
        (v4 = (NiNode *)v3) != 0)
    && (NiAVObject::Update(v3, 0.0, 1),
        fRadius = v4->m_kWorldBound.m_fRadius + v4->m_kWorldBound.m_fRadius,
        NsDecal::SetDecalSize(&v2->m_kDecalMaker, fRadius, fRadius),
        kFindGeom.m_pCallBack = 0,
        kFindGeom.m_nCurLevel = -1,
        kFindGeom.vfptr = (Ns_TourSceneVtbl *)&FindDecalGeometry::`vftable',
        v5 = (NiAVObject *)&v2->m_spDecalNode.m_pObject->vfptr,
        v12 = 0,
        NiAVObject::DetachAllProperties(v5),
        v6 = v2->m_spDecalNode.m_pObject,
        (v7 = (NiRTTI *)((int (__thiscall *)(NiNode *))v4->vfptr[1].__vecDelDtor)(v4)) != 0) )
  {
    while ( v7 != &NiNode::m_RTTI )
    {
      v7 = v7->m_pkBaseRTTI;
      if ( !v7 )
        goto LABEL_6;
    }
    Ns_TourScene::TourScene((Ns_TourScene *)&kFindGeom.vfptr, v4, &NiGeometry::m_RTTI, v6);
    NsEffect::SetEffectNode(&v2->m_kEffect, (NiAVObject *)&v6->vfptr);
    v9 = v4->m_pkParent;
    if ( v9 )
    {
      ((void (__stdcall *)(NiPointer<HazeAccumulator> *, NiNode *))v9->vfptr[30].__vecDelDtor)(&v11, v4);
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>(&v11);
    }
    result = 1;
  }
  else
  {
LABEL_6:
    result = 0;
  }
  return result;
}
// 9BD06C: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *FindDecalGeometry::`vftable')(FindDecalGeometry *this, NiAVObject *_pkObject, void *);

//----- (00690D70) --------------------------------------------------------
void __thiscall DecalMgr::DecalMgr(DecalMgr *this)
{
  this->vfptr = (DecalMgrVtbl *)&DecalMgr::`vftable';
  this->m_pkTerrain = 0;
  this->m_pkBuildingScene = 0;
  this->m_kList.m_kAllocator.m_uiCount = 0;
  this->m_kList.m_pkHead = 0;
  this->m_kList.m_pkTail = 0;
  this->m_kList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>Vtbl *)&PgTList<CharDecal *>::`vftable';
}
// 9BD0A4: using guessed type int (__thiscall *PgTList<CharDecal *>::`vftable')(void *p, char);
// 9BD0B4: using guessed type int (__thiscall *DecalMgr::`vftable')(void *p, char);

//----- (00690DA0) --------------------------------------------------------
NiNode *__thiscall DecalMgr::AddDecal(DecalMgr *this, NiNode *pkNode)
{
  DecalMgr *v2; // ebx@1
  NiNode *v3; // edi@1
  NiNode *v4; // eax@2
  NiNode *v5; // esi@2
  NiPoint3 *v6; // eax@6
  NiNode *v7; // edi@6
  NiPoint3 result; // [sp+1Ch] [bp-1Ch]@6
  NiPointer<NiNode> spDecalNode; // [sp+28h] [bp-10h]@6
  int v11; // [sp+34h] [bp-4h]@2

  v2 = this;
  v3 = pkNode;
  if ( !pkNode )
    return 0;
  v4 = (NiNode *)operator new(0xB0u);
  v5 = v4;
  pkNode = v4;
  v11 = 0;
  if ( v4 )
  {
    CDecalEffect::CDecalEffect((CDecalEffect *)v4);
    *(float *)&v5->m_spCollisionObject.m_pObject = -1.0;
    v5->vfptr = (NiRefObjectVtbl *)&CharDecal::`vftable';
    LOWORD(v5->m_kPropertyList.m_kAllocator.m_uiCount) = -1;
    BYTE2(v5->m_kPropertyList.m_kAllocator.m_uiCount) = 0;
  }
  else
  {
    v5 = 0;
  }
  v11 = -1;
  pkNode = v5;
  if ( !v5 )
    return 0;
  CDecalEffect::Init((CDecalEffect *)v5, v2->m_pkTerrain, v2->m_pkBuildingScene);
  CDecalEffect::SetEffect((CDecalEffect *)v5, v3);
  v6 = Char::GetHeightPos(g_pkMainChar, (int)v2, &result);
  NsDecal::Update((NsDecal *)&v5->m_kWorldBound.m_kCenter.y, 0.0, (NiNode *)LODWORD(v5->m_kWorld.m_Translate.y), v6);
  v7 = (NiNode *)LODWORD(v5->m_kWorld.m_Translate.y);
  spDecalNode.m_pObject = v7;
  if ( v7 )
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  v11 = 1;
  if ( !v7 )
  {
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    return 0;
  }
  World::AttachEffect(&g_kWorld, v7);
  NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v2->m_kList,
    (NiD3DXEffectParameter *const *)&pkNode);
  v11 = -1;
  if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  return v5;
}
// 9BD094: using guessed type int (__thiscall *CharDecal::`vftable')(void *p, char);

//----- (00690F00) --------------------------------------------------------
void __thiscall DecalMgr::RemoveCharDecal(DecalMgr *this, Char *pkChar)
{
  NiTListItem<CharDecal *> *v2; // eax@1
  CharDecal *v3; // edx@2

  v2 = this->m_kList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      v2 = v2->m_pkNext;
      if ( v3 )
      {
        if ( v3->m_hHandle == pkChar->m_kHandle )
          break;
      }
      if ( !v2 )
        return;
    }
    DecalMgr::RemoveDecal(this, v3);
  }
}

//----- (00690F40) --------------------------------------------------------
void __thiscall CharDecal::SetRadius(CharDecal *this, float fRadius)
{
  NsDecal::SetDecalSize(&this->m_kDecalMaker, fRadius, fRadius);
}

//----- (00690F60) --------------------------------------------------------
NiNode *__thiscall DecalMgr::AddDecal(DecalMgr *this, NiNode *pkNode, float fRadius, Char *pkChar)
{
  DecalMgr *v4; // ebx@1
  NiNode *v5; // edi@1
  NiNode *v6; // eax@2
  NiNode *v7; // esi@2
  NiPoint3 *v8; // eax@8
  float v9; // ecx@8
  float v10; // edx@8
  float v11; // eax@8
  NiPoint3 *v12; // eax@8
  float v13; // edi@9
  NiPoint3 v15; // [sp+1Ch] [bp-24h]@8
  NiPoint3 result; // [sp+28h] [bp-18h]@8
  int v17; // [sp+3Ch] [bp-4h]@2

  v4 = this;
  v5 = pkNode;
  if ( !pkNode )
    return 0;
  v6 = (NiNode *)operator new(0xB0u);
  v7 = v6;
  pkNode = v6;
  v17 = 0;
  if ( v6 )
  {
    CDecalEffect::CDecalEffect((CDecalEffect *)v6);
    *(float *)&v7->m_spCollisionObject.m_pObject = -1.0;
    v7->vfptr = (NiRefObjectVtbl *)&CharDecal::`vftable';
    LOWORD(v7->m_kPropertyList.m_kAllocator.m_uiCount) = -1;
    BYTE2(v7->m_kPropertyList.m_kAllocator.m_uiCount) = 0;
  }
  else
  {
    v7 = 0;
  }
  v17 = -1;
  pkNode = v7;
  if ( !v7 )
    return 0;
  CDecalEffect::Init((CDecalEffect *)v7, v4->m_pkTerrain, v4->m_pkBuildingScene);
  CDecalEffect::SetEffect((CDecalEffect *)v7, v5);
  if ( pkChar )
  {
    LOWORD(v7->m_kPropertyList.m_kAllocator.m_uiCount) = pkChar->m_kHandle;
  }
  else
  {
    v8 = Char::GetHeightPos(g_pkMainChar, (int)v4, &result);
    v9 = v8->x;
    v10 = v8->y;
    v11 = v8->z;
    *(float *)&v7->m_kPropertyList.vfptr = v9;
    *(float *)&v7->m_kPropertyList.m_pkHead = v10;
    *(float *)&v7->m_kPropertyList.m_pkTail = v11;
    v12 = Char::GetHeightPos(g_pkMainChar, (int)v4, &v15);
    NsDecal::Update((NsDecal *)&v7->m_kWorldBound.m_kCenter.y, 0.0, (NiNode *)LODWORD(v7->m_kWorld.m_Translate.y), v12);
  }
  NsDecal::SetDecalSize((NsDecal *)&v7->m_kWorldBound.m_kCenter.y, fRadius, fRadius);
  v13 = v7->m_kWorld.m_Translate.y;
  pkChar = (Char *)LODWORD(v13);
  if ( v13 != 0.0 )
    InterlockedIncrement((volatile LONG *)(LODWORD(v13) + 4));
  v17 = 1;
  if ( v13 == 0.0 )
  {
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    return 0;
  }
  World::AttachEffect(&g_kWorld, (NiNode *)LODWORD(v13));
  NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v4->m_kList,
    (NiD3DXEffectParameter *const *)&pkNode);
  v17 = -1;
  if ( !InterlockedDecrement((volatile LONG *)(LODWORD(v13) + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))LODWORD(v13))(LODWORD(v13), 1);
  return v7;
}
// 9BD094: using guessed type int (__thiscall *CharDecal::`vftable')(void *p, char);

//----- (00691120) --------------------------------------------------------
CharDecal *__thiscall DecalMgr::AddDecal(DecalMgr *this, char *FileDir, float fRadius, Char *pkChar)
{
  DecalMgr *v4; // ebx@1
  char *v5; // edi@1
  char *v6; // eax@2
  char *v7; // esi@2
  NiNode *v8; // edi@6
  NiPoint3 *v10; // eax@13
  float v11; // ecx@13
  float v12; // edx@13
  float v13; // eax@13
  NiPoint3 *v14; // eax@13
  int v15; // edi@14
  NiPoint3 result; // [sp+1Ch] [bp-20h]@13
  CharDecal *pkDecal; // [sp+28h] [bp-14h]@5
  NiPointer<NiNode> spEffect; // [sp+2Ch] [bp-10h]@6
  int v19; // [sp+38h] [bp-4h]@2

  v4 = this;
  v5 = FileDir;
  if ( !FileDir )
    return 0;
  v6 = (char *)operator new(0xB0u);
  v7 = v6;
  FileDir = v6;
  v19 = 0;
  if ( v6 )
  {
    CDecalEffect::CDecalEffect((CDecalEffect *)v6);
    *((float *)v7 + 43) = -1.0;
    *(_DWORD *)v7 = &CharDecal::`vftable';
    *((_WORD *)v7 + 84) = -1;
    v7[170] = 0;
  }
  else
  {
    v7 = 0;
  }
  v19 = -1;
  pkDecal = (CharDecal *)v7;
  if ( !v7 )
    return 0;
  CDecalEffect::Init((CDecalEffect *)v7, v4->m_pkTerrain, v4->m_pkBuildingScene);
  v8 = (NiNode *)Ns_LoadNifFile(v5, 0);
  spEffect.m_pObject = v8;
  if ( v8 )
    InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  v19 = 1;
  if ( !v8 )
  {
    (**(void (__thiscall ***)(char *, signed int))v7)(v7, 1);
    return 0;
  }
  CDecalEffect::SetEffect((CDecalEffect *)v7, v8);
  if ( pkChar )
  {
    *((_WORD *)v7 + 84) = pkChar->m_kHandle;
  }
  else
  {
    v10 = Char::GetHeightPos(g_pkMainChar, (int)v4, &result);
    v11 = v10->x;
    v12 = v10->y;
    v13 = v10->z;
    *((float *)v7 + 39) = v11;
    *((float *)v7 + 40) = v12;
    *((float *)v7 + 41) = v13;
    v14 = Char::GetHeightPos(g_pkMainChar, (int)v4, &result);
    NsDecal::Update((NsDecal *)(v7 + 40), 0.0, *((NiNode **)v7 + 36), v14);
  }
  NsDecal::SetDecalSize((NsDecal *)(v7 + 40), fRadius, fRadius);
  v15 = *((_DWORD *)v7 + 36);
  FileDir = (char *)v15;
  if ( v15 )
    InterlockedIncrement((volatile LONG *)(v15 + 4));
  LOBYTE(v19) = 2;
  if ( !v15 )
  {
    (**(void (__thiscall ***)(char *, signed int))v7)(v7, 1);
    LOBYTE(v19) = 1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&FileDir);
    v19 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spEffect);
    return 0;
  }
  World::AttachEffect(&g_kWorld, (NiNode *)v15);
  NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v4->m_kList,
    (NiD3DXEffectParameter *const *)&pkDecal);
  LOBYTE(v19) = 1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&FileDir);
  v19 = -1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spEffect);
  return (CharDecal *)v7;
}
// 9BD094: using guessed type int (__thiscall *CharDecal::`vftable')(void *p, char);

//----- (00691320) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<CharDecal *>,CharDecal *>::~NiTListBase<DFALL<CharDecal *>,CharDecal *>(NiTListBase<DFALL<CharDecal *>,CharDecal *> *this)
{
  this->vfptr = (NiTListBase<DFALL<CharDecal *>,CharDecal *>Vtbl *)&NiTListBase<DFALL<CharDecal *>,CharDecal *>::`vftable';
}
// 9BD044: using guessed type int (__thiscall *NiTListBase<DFALL<CharDecal *>,CharDecal *>::`vftable')(void *p, char);

//----- (00691330) --------------------------------------------------------
NiTListBase<DFALL<CharDecal *>,CharDecal *> *__thiscall NiTListBase<DFALL<CharDecal *>,CharDecal *>::`vector deleting destructor'(NiTListBase<DFALL<CharDecal *>,CharDecal *> *this, unsigned int a2)
{
  NiTListBase<DFALL<CharDecal *>,CharDecal *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<CharDecal *>,CharDecal *>Vtbl *)&NiTListBase<DFALL<CharDecal *>,CharDecal *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BD044: using guessed type int (__thiscall *NiTListBase<DFALL<CharDecal *>,CharDecal *>::`vftable')(void *p, char);

//----- (00691360) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::~NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>(NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::`vftable';
}
// 9BD034: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::`vftable')(void *p, char);

//----- (00691370) --------------------------------------------------------
NiTArray<NiTimeController *> *__thiscall NiTArray<NiTimeController *>::`vector deleting destructor'(NiTArray<NiTimeController *> *this, unsigned int a2)
{
  NiTArray<NiTimeController *> *v2; // esi@1
  NiTimeController **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pBase;
  this->vfptr = (NiTArray<NiTimeController *>Vtbl *)&NiTArray<NiTimeController *>::`vftable';
  operator delete[](v3);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BD02C: using guessed type int (__thiscall *NiTArray<NiTimeController *>::`vftable')(void *p, char);

//----- (006913A0) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BD034: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::`vftable')(void *p, char);

//----- (006913D0) --------------------------------------------------------
void __thiscall NiTList<CharDecal *>::~NiTList<CharDecal *>(NiTList<CharDecal *> *this)
{
  NiTList<CharDecal *> *v1; // edi@1
  NiTListItem<CharDecal *> *v2; // esi@1
  NiTListItem<CharDecal *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<DFALL<CharDecal *>,CharDecal *>Vtbl *)&NiTPointerListBase<DFALL<CharDecal *>,CharDecal *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<DFALL<CharDecal *>,CharDecal *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<DFALL<CharDecal *>,CharDecal *>Vtbl *)&NiTListBase<DFALL<CharDecal *>,CharDecal *>::`vftable';
}
// 9BD044: using guessed type int (__thiscall *NiTListBase<DFALL<CharDecal *>,CharDecal *>::`vftable')(void *p, char);
// 9BD054: using guessed type int (__thiscall *NiTPointerListBase<DFALL<CharDecal *>,CharDecal *>::`vftable')(void *p, char);

//----- (00691450) --------------------------------------------------------
NiTList<CharDecal *> *__thiscall NiTPointerListBase<DFALL<CharDecal *>,CharDecal *>::`vector deleting destructor'(NiTList<CharDecal *> *this, unsigned int a2)
{
  NiTList<CharDecal *> *v2; // edi@1
  NiTListItem<CharDecal *> *v3; // esi@1
  NiTListItem<CharDecal *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<CharDecal *>,CharDecal *>Vtbl *)&NiTPointerListBase<DFALL<CharDecal *>,CharDecal *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<DFALL<CharDecal *>,CharDecal *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<CharDecal *>,CharDecal *>Vtbl *)&NiTListBase<DFALL<CharDecal *>,CharDecal *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BD044: using guessed type int (__thiscall *NiTListBase<DFALL<CharDecal *>,CharDecal *>::`vftable')(void *p, char);
// 9BD054: using guessed type int (__thiscall *NiTPointerListBase<DFALL<CharDecal *>,CharDecal *>::`vftable')(void *p, char);

//----- (006914E0) --------------------------------------------------------
void __thiscall NiAVObject::DetachAllProperties(NiAVObject *this)
{
  NiTListItem<NiPointer<NiProperty> > *v1; // esi@1
  char *v2; // edi@1
  NiTListItem<NiPointer<NiProperty> > *v3; // ST00_4@2

  v1 = this->m_kPropertyList.m_pkHead;
  v2 = (char *)&this->m_kPropertyList;
  while ( v1 )
  {
    v3 = v1;
    v1 = v1->m_pkNext;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v2 + 8))(v2, v3);
  }
  *((_DWORD *)v2 + 3) = 0;
  *((_DWORD *)v2 + 1) = 0;
  *((_DWORD *)v2 + 2) = 0;
}

//----- (00691520) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,CharDecal *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,CharDecal *> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,CharDecal *> *v2; // edi@1
  NiTListItem<CharDecal *> *v3; // esi@1
  NiTListItem<CharDecal *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BD034: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::`vftable')(void *p, char);
// 9BD074: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::`vftable')(void *p, char);

//----- (006915B0) --------------------------------------------------------
void __thiscall NiTPointerList<CharDecal *>::~NiTPointerList<CharDecal *>(NiTPointerList<CharDecal *> *this)
{
  NiTPointerList<CharDecal *> *v1; // edi@1
  NiTListItem<CharDecal *> *v2; // esi@1
  NiTListItem<CharDecal *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::`vftable';
}
// 9BD034: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::`vftable')(void *p, char);
// 9BD074: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::`vftable')(void *p, char);

//----- (00691630) --------------------------------------------------------
EffectCtrl *__thiscall EffectCtrl::`vector deleting destructor'(EffectCtrl *this, unsigned int a2)
{
  EffectCtrl *v2; // esi@1
  NiTimeController **v3; // ST00_4@1

  v2 = this;
  this->vfptr = (EffectCtrlVtbl *)&EffectCtrl::`vftable';
  this->m_pEffectObject = 0;
  v3 = this->m_kControllers.m_pBase;
  this->m_kControllers.vfptr = (NiTArray<NiTimeController *>Vtbl *)&NiTArray<NiTimeController *>::`vftable';
  operator delete[](v3);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BD02C: using guessed type int (__thiscall *NiTArray<NiTimeController *>::`vftable')(void *p, char);
// 9BD064: using guessed type int (__thiscall *EffectCtrl::`vftable')(void *p, char);

//----- (00691670) --------------------------------------------------------
Ns_TourScene::TS_RESULT __stdcall FindDecalGeometry::ProcessData(NiAVObject *_pkObject, void *_pData)
{
  NiTListItem<NiPointer<NiProperty> > *v3; // ebx@2
  NiAVObject *v4; // esi@3

  if ( _pData )
  {
    v3 = _pkObject->m_kPropertyList.m_pkHead;
    while ( v3 )
    {
      v4 = (NiAVObject *)v3->m_element.m_pObject;
      v3 = v3->m_pkNext;
      if ( !v4 )
        break;
      _pkObject = v4;
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)((char *)_pData + 156),
        (NiPointer<NiRoom> *)&_pkObject);
      if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
  }
  return 0;
}

//----- (00691710) --------------------------------------------------------
void __thiscall PgTList<CharDecal *>::~PgTList<CharDecal *>(PgTList<CharDecal *> *this)
{
  PgTList<CharDecal *> *v1; // edi@1
  NiTListItem<CharDecal *> *v2; // esi@1
  NiTListItem<CharDecal *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>Vtbl *)&PgTList<CharDecal *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::`vftable';
}
// 9BD034: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::`vftable')(void *p, char);
// 9BD0A4: using guessed type int (__thiscall *PgTList<CharDecal *>::`vftable')(void *p, char);

//----- (00691790) --------------------------------------------------------
PgTList<CharDecal *> *__thiscall PgTList<CharDecal *>::`vector deleting destructor'(PgTList<CharDecal *> *this, unsigned int a2)
{
  PgTList<CharDecal *> *v2; // edi@1
  NiTListItem<CharDecal *> *v3; // esi@1
  NiTListItem<CharDecal *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>Vtbl *)&PgTList<CharDecal *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BD034: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,CharDecal *>::`vftable')(void *p, char);
// 9BD0A4: using guessed type int (__thiscall *PgTList<CharDecal *>::`vftable')(void *p, char);

//----- (00691820) --------------------------------------------------------
CharDecal *__thiscall CharDecal::`vector deleting destructor'(CharDecal *this, unsigned int a2)
{
  CharDecal *v2; // esi@1

  v2 = this;
  this->vfptr = (CDecalEffectVtbl *)&CharDecal::`vftable';
  CDecalEffect::~CDecalEffect((CDecalEffect *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BD094: using guessed type int (__thiscall *CharDecal::`vftable')(void *p, char);

//----- (00691850) --------------------------------------------------------
DecalMgr *__thiscall DecalMgr::`scalar deleting destructor'(DecalMgr *this, unsigned int a2)
{
  DecalMgr *v2; // esi@1

  v2 = this;
  DecalMgr::~DecalMgr(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00691880) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<Effect *>,Effect *>::~NiTListBase<DFALL<Effect *>,Effect *>(NiTListBase<DFALL<Effect *>,Effect *> *this)
{
  this->vfptr = (NiTListBase<DFALL<Effect *>,Effect *>Vtbl *)&NiTListBase<DFALL<Effect *>,Effect *>::`vftable';
}
// 9BD184: using guessed type int (__thiscall *NiTListBase<DFALL<Effect *>,Effect *>::`vftable')(void *p, char);

//----- (00691890) --------------------------------------------------------
NiTListBase<DFALL<Effect *>,Effect *> *__thiscall NiTListBase<DFALL<Effect *>,Effect *>::`scalar deleting destructor'(NiTListBase<DFALL<Effect *>,Effect *> *this, unsigned int a2)
{
  NiTListBase<DFALL<Effect *>,Effect *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<Effect *>,Effect *>Vtbl *)&NiTListBase<DFALL<Effect *>,Effect *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BD184: using guessed type int (__thiscall *NiTListBase<DFALL<Effect *>,Effect *>::`vftable')(void *p, char);

//----- (006918C0) --------------------------------------------------------
NiPoint3 *__thiscall Char::GetHairPos(Char *this, NiPoint3 *result)
{
  NiNode *v2; // edx@1
  NiPoint3 *v3; // eax@2
  float v4; // ecx@2
  float v5; // edx@2
  int v6; // ecx@3
  float v7; // edx@3
  float v8; // ecx@3

  v2 = this->m_kCharShape.m_apkLinkNode[1];
  if ( v2 )
  {
    v3 = result;
    result->x = v2->m_kWorld.m_Translate.x;
    v4 = v2->m_kWorld.m_Translate.y;
    v5 = v2->m_kWorld.m_Translate.z;
    result->y = v4;
    result->z = v5;
  }
  else
  {
    v6 = ((int (*)(void))this->vfptr[6].Deaffect)();
    v3 = result;
    result->x = *(float *)v6;
    v7 = *(float *)(v6 + 4);
    v8 = *(float *)(v6 + 8);
    result->y = v7;
    result->z = v8;
    result->z = result->z + 53.0;
  }
  return v3;
}

//----- (00691920) --------------------------------------------------------
NiPoint3 *__thiscall Char::GetLeftHandPos(Char *this, NiPoint3 *result)
{
  NiNode *v2; // edx@1
  NiPoint3 *v3; // eax@2
  float v4; // ecx@2
  float v5; // edx@2
  int v6; // ecx@3
  float v7; // edx@3
  float v8; // ecx@3

  v2 = this->m_kCharShape.m_apkLinkNode[11];
  if ( v2 )
  {
    v3 = result;
    result->x = v2->m_kWorld.m_Translate.x;
    v4 = v2->m_kWorld.m_Translate.y;
    v5 = v2->m_kWorld.m_Translate.z;
    result->y = v4;
    result->z = v5;
  }
  else
  {
    v6 = ((int (*)(void))this->vfptr[6].Deaffect)();
    v3 = result;
    result->x = *(float *)v6;
    v7 = *(float *)(v6 + 4);
    v8 = *(float *)(v6 + 8);
    result->y = v7;
    result->z = v8;
    result->z = result->z + 25.0;
  }
  return v3;
}

//----- (00691980) --------------------------------------------------------
NiPoint3 *__thiscall Char::GetLeftShoesPos(Char *this, NiPoint3 *result)
{
  NiNode *v2; // edx@1
  NiPoint3 *v3; // eax@2
  float v4; // ecx@2
  float v5; // edx@2
  int v6; // ecx@3
  float v7; // edx@3
  float v8; // ecx@3

  v2 = this->m_kCharShape.m_apkLinkNode[17];
  if ( v2 )
  {
    v3 = result;
    result->x = v2->m_kWorld.m_Translate.x;
    v4 = v2->m_kWorld.m_Translate.y;
    v5 = v2->m_kWorld.m_Translate.z;
    result->y = v4;
    result->z = v5;
  }
  else
  {
    v6 = ((int (*)(void))this->vfptr[6].Deaffect)();
    v3 = result;
    result->x = *(float *)v6;
    v7 = *(float *)(v6 + 4);
    v8 = *(float *)(v6 + 8);
    result->y = v7;
    result->z = v8;
    result->z = result->z + 10.0;
  }
  return v3;
}

//----- (006919E0) --------------------------------------------------------
NiPoint3 *__thiscall Char::GetRightShoesPos(Char *this, NiPoint3 *result)
{
  NiNode *v2; // edx@1
  NiPoint3 *v3; // eax@2
  float v4; // ecx@2
  float v5; // edx@2
  int v6; // ecx@3
  float v7; // edx@3
  float v8; // ecx@3

  v2 = this->m_kCharShape.m_apkLinkNode[18];
  if ( v2 )
  {
    v3 = result;
    result->x = v2->m_kWorld.m_Translate.x;
    v4 = v2->m_kWorld.m_Translate.y;
    v5 = v2->m_kWorld.m_Translate.z;
    result->y = v4;
    result->z = v5;
  }
  else
  {
    v6 = ((int (*)(void))this->vfptr[6].Deaffect)();
    v3 = result;
    result->x = *(float *)v6;
    v7 = *(float *)(v6 + 4);
    v8 = *(float *)(v6 + 8);
    result->y = v7;
    result->z = v8;
    result->z = result->z + 10.0;
  }
  return v3;
}

//----- (00691A40) --------------------------------------------------------
NiPoint3 *__thiscall Char::GetTopLinkPos(Char *this, NiPoint3 *result)
{
  NiNode *v2; // edx@1
  NiPoint3 *v3; // eax@2
  float v4; // ecx@2
  float v5; // edx@2
  int v6; // ecx@3
  float v7; // edx@3
  float v8; // ecx@3

  v2 = this->m_kCharShape.m_apkLinkNode[8];
  if ( v2 )
  {
    v3 = result;
    result->x = v2->m_kWorld.m_Translate.x;
    v4 = v2->m_kWorld.m_Translate.y;
    v5 = v2->m_kWorld.m_Translate.z;
    result->y = v4;
    result->z = v5;
  }
  else
  {
    v6 = ((int (*)(void))this->vfptr[6].Deaffect)();
    v3 = result;
    result->x = *(float *)v6;
    v7 = *(float *)(v6 + 4);
    v8 = *(float *)(v6 + 8);
    result->y = v7;
    result->z = v8;
    result->z = result->z + 53.0;
  }
  return v3;
}

//----- (00691AA0) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>::~NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>(NiTListBase<NiTPointerAllocator<unsigned int>,Effect *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>::`vftable';
}
// 9BD174: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>::`vftable')(void *p, char);

//----- (00691AB0) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,Effect *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,Effect *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,Effect *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BD174: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>::`vftable')(void *p, char);

//----- (00691AE0) --------------------------------------------------------
void __thiscall EffectMgr::AttachEffectToWorld(EffectMgr *this, Effect *pkEffect)
{
  EffectMgr *v2; // edi@1
  NiTListItem<NiPointer<Effect> > *v3; // esi@2
  Effect *v4; // eax@3

  v2 = this;
  if ( pkEffect )
  {
    v3 = pkEffect->m_kChildList.m_pkHead;
    while ( v3 )
    {
      v4 = v3->m_element.m_pObject;
      v3 = v3->m_pkNext;
      EffectMgr::AttachEffectToWorld(v2, v4);
    }
    World::AttachEffect(&g_kWorld, pkEffect->m_spNode.m_pObject);
  }
}

//----- (00691B30) --------------------------------------------------------
void __thiscall EffectMgr::PlayEffect(EffectMgr *this, Effect *pkEffect)
{
  if ( pkEffect )
  {
    EffectMgr::AttachEffectToWorld(this, pkEffect);
    pkEffect->vfptr[15].__vecDelDtor((NiRefObject *)pkEffect, LODWORD(Timer::ms_fCurTime));
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00691B60) --------------------------------------------------------
void __thiscall EffectMgr::SetGuildAcademyMasterEffect(EffectMgr *this, Effect *pkEffect)
{
  EffectMgr *v2; // esi@1
  Effect *v3; // ecx@1

  v2 = this;
  v3 = this->m_pGuildAcademyMasterEffect;
  if ( v3 )
  {
    if ( !pkEffect )
    {
      ((void (*)(void))v3->vfptr[16].__vecDelDtor)();
      ((void (__stdcall *)(_DWORD))v2->m_pGuildAcademyMasterEffect->vfptr[18].__vecDelDtor)(-1.0);
      v2->m_pGuildAcademyMasterEffect->m_bLoop = 0;
    }
    v2->m_pGuildAcademyMasterEffect = pkEffect;
  }
  else
  {
    v2->m_pGuildAcademyMasterEffect = pkEffect;
  }
}

//----- (00691BB0) --------------------------------------------------------
char __thiscall EffectMgr::IsExistEffect(EffectMgr *this, Effect *pkSrcEffect)
{
  NiTListItem<Effect *> *v2; // eax@1
  Effect **v3; // ecx@2
  char result; // al@4

  v2 = this->m_kList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = &v2->m_element;
      v2 = v2->m_pkNext;
      if ( pkSrcEffect == *v3 )
        break;
      if ( !v2 )
        goto LABEL_4;
    }
    result = 1;
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}

//----- (00691BE0) --------------------------------------------------------
double __userpurge EffectMgr::CalculateEffScaleRatio@<st0>(EffectMgr *this@<ecx>, int a2@<esi>, NiNode *pkEffect, NiNode *pkTarget)
{
  int v4; // esi@3
  void *v5; // eax@4
  int pkB_4; // ST20_4@5
  int pkB; // ST1C_4@5
  int pkB_8; // ST24_4@5
  int pkN; // ST0C_4@5
  int v10; // ecx@5
  int pkN_4; // ST10_4@5
  float v12; // edx@5
  double result; // st7@7
  float pkB_12; // [sp+20h] [bp-4h]@5
  NiNode *pkTargeta; // [sp+30h] [bp+Ch]@7

  if ( pkTarget && pkEffect )
  {
    v4 = ((int (__stdcall *)(const char *, int))pkEffect->vfptr[18].__vecDelDtor)("SizeBound", a2);
    if ( v4
      && (v5 = pkTarget->vfptr[18].__vecDelDtor((NiRefObject *)pkTarget, (unsigned int)"SizeBound")) != 0
      && (pkB_4 = *(_DWORD *)(v4 + 40),
          pkB_12 = *(float *)(v4 + 48),
          pkB = *(_DWORD *)(v4 + 36),
          pkB_8 = *(_DWORD *)(v4 + 44),
          pkN = *((_DWORD *)v5 + 9),
          v10 = *((_DWORD *)v5 + 11),
          pkN_4 = *((_DWORD *)v5 + 10),
          v12 = *((float *)v5 + 12),
          0.0 != pkB_12)
      && v12 != 0.0 )
    {
      *(float *)&pkTargeta = v12 / pkB_12;
      result = *(float *)&pkTargeta;
    }
    else
    {
      result = 1.0;
    }
  }
  else
  {
    result = 1.0;
  }
  return result;
}

//----- (00691CA0) --------------------------------------------------------
void __thiscall EffectMgr::AuraEffectEnable(EffectMgr *this, bool b)
{
  NiTListItem<Effect *> *v2; // esi@1
  Effect *v3; // ecx@2

  v2 = this->m_kList.m_pkHead;
  while ( v2 )
  {
    v3 = v2->m_element;
    v2 = v2->m_pkNext;
    if ( v3 && v3->m_bEnableAura == 1 )
    {
      if ( b )
        ((void (__stdcall *)(_DWORD))v3->vfptr[21].__vecDelDtor)(1);
      else
        ((void (__stdcall *)(_DWORD))v3->vfptr[21].__vecDelDtor)(0);
    }
  }
}

//----- (00691CF0) --------------------------------------------------------
Effect *__thiscall EffectMgr::FindLightningWaveEffect(EffectMgr *this, unsigned __int16 kID)
{
  NiTListItem<Effect *> *v2; // esi@1
  Effect *v3; // edi@2
  Effect *result; // eax@5

  v2 = this->m_kList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      v2 = v2->m_pkNext;
      if ( v3 )
      {
        if ( Effect::GetActiveSkillID(v3) == kID )
          break;
      }
      if ( !v2 )
        goto LABEL_5;
    }
    result = v3;
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (00691D30) --------------------------------------------------------
ArrowEff *__thiscall EffectMgr::GetArrowEffectInList(EffectMgr *this, __int16 AtkSeqNum, unsigned __int16 kCaster)
{
  NiTListItem<Effect *> *v3; // edi@1
  Effect *v4; // esi@2
  NiRTTI *v5; // eax@4
  ArrowEff *result; // eax@10

  v3 = this->m_kList.m_pkHead;
  if ( v3 )
  {
    while ( 1 )
    {
      v4 = v3->m_element;
      v3 = v3->m_pkNext;
      if ( Effect::GetCasterHandle(v4) == kCaster )
      {
        if ( v4 )
        {
          v5 = (NiRTTI *)((int (__thiscall *)(Effect *))v4->vfptr[1].__vecDelDtor)(v4);
          if ( v5 )
          {
            while ( v5 != &ArrowEff::m_RTTI )
            {
              v5 = v5->m_pkBaseRTTI;
              if ( !v5 )
                goto LABEL_9;
            }
            if ( HIWORD(v4[1].m_pkChainEffect) == AtkSeqNum )
              break;
          }
        }
      }
LABEL_9:
      if ( !v3 )
        goto LABEL_10;
    }
    result = (ArrowEff *)v4;
  }
  else
  {
LABEL_10:
    result = 0;
  }
  return result;
}

//----- (00691DA0) --------------------------------------------------------
NiNode *__thiscall EffectMgr::GetEffectNode(EffectMgr *this, char *pcName)
{
  NiNode *result; // eax@1
  EffectMgr *v3; // esi@1
  NiNode *v4; // ebx@2
  NiNode *v5; // eax@8
  NiObjectNET *v6; // esi@8
  char *v7; // [sp-4h] [bp-130h]@8
  char **v8; // [sp+10h] [bp-11Ch]@9
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v9; // [sp+14h] [bp-118h]@2
  NiPointer<NiNode> spNode; // [sp+18h] [bp-114h]@2
  char acFileName[256]; // [sp+1Ch] [bp-110h]@8
  int v12; // [sp+128h] [bp-4h]@2

  result = 0;
  v3 = this;
  if ( EffectMgr::s_bEnableEffect )
  {
    spNode.m_pObject = 0;
    v12 = 0;
    v9 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kEffNodeMap;
    NiTMapBase<DFALL<NiPointer<NiNode>>,unsigned long,NiPointer<NiNode>>::GetAt(
      (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiShaderLibrary> > *)&this->m_kEffNodeMap,
      pcName,
      (NiPointer<NiShaderLibrary> *)&spNode);
    v4 = spNode.m_pObject;
    if ( spNode.m_pObject )
    {
      v12 = -1;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      result = v4;
    }
    else
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      v7 = pcName;
      sprintf(acFileName, "%s%s.nif", &Folder::m_acEffect, pcName);
      v5 = PgUtil::LoadNifFile(acFileName, v3->m_spTexturePalette.m_pObject);
      v6 = (NiObjectNET *)v5;
      if ( v5 )
      {
        spNode.m_pObject = v5;
        InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
        NiObjectNET::SetName(v6, pcName);
        v8 = &v7;
        v7 = (char *)v6;
        InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
        NiTMapBase<DFALL<NiPointer<PgWinBut>>,unsigned long,NiPointer<PgWinBut>>::SetAt(
          v9,
          (unsigned int)pcName,
          (NiPointer<PgWinBut>)v7);
        v12 = -1;
        if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
        result = (NiNode *)v6;
      }
      else
      {
        result = 0;
      }
    }
  }
  return result;
}
// A75AFB: using guessed type bool EffectMgr::s_bEnableEffect;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00691EF0) --------------------------------------------------------
double __thiscall EffectMgr::CalculateEffScaleRatio(EffectMgr *this, char *pcEffectName, NiNode *pkTarget)
{
  double result; // st7@2
  NiNode *v4; // eax@3
  int v5; // esi@4
  void *v6; // eax@5
  int pkB_4; // ST20_4@6
  int pkB; // ST1C_4@6
  int pkB_8; // ST24_4@6
  int pkN; // ST0C_4@6
  int v11; // ecx@6
  int pkN_4; // ST10_4@6
  float v13; // edx@6
  float pkB_12; // [sp+20h] [bp-4h]@6
  NiNode *pkTargeta; // [sp+30h] [bp+Ch]@8

  if ( pkTarget )
  {
    v4 = EffectMgr::GetEffectNode(this, pcEffectName);
    if ( v4
      && (v5 = (int)v4->vfptr[18].__vecDelDtor((NiRefObject *)v4, (unsigned int)"SizeBound")) != 0
      && (v6 = pkTarget->vfptr[18].__vecDelDtor((NiRefObject *)pkTarget, (unsigned int)"SizeBound")) != 0
      && (pkB_4 = *(_DWORD *)(v5 + 40),
          pkB_12 = *(float *)(v5 + 48),
          pkB = *(_DWORD *)(v5 + 36),
          pkB_8 = *(_DWORD *)(v5 + 44),
          pkN = *((_DWORD *)v6 + 9),
          v11 = *((_DWORD *)v6 + 11),
          pkN_4 = *((_DWORD *)v6 + 10),
          v13 = *((float *)v6 + 12),
          0.0 != pkB_12)
      && v13 != 0.0 )
    {
      *(float *)&pkTargeta = v13 / pkB_12;
      result = *(float *)&pkTargeta;
    }
    else
    {
      result = 1.0;
    }
  }
  else
  {
    result = 1.0;
  }
  return result;
}

//----- (00691FC0) --------------------------------------------------------
Effect *__thiscall EffectMgr::FindAuraEffect(EffectMgr *this, unsigned __int16 kCaster)
{
  NiTListItem<Effect *> *v2; // edi@1
  Effect *v3; // esi@2
  NiRTTI *v4; // eax@3
  Effect *result; // eax@9

  v2 = this->m_kList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      v2 = v2->m_pkNext;
      if ( v3 )
      {
        v4 = (NiRTTI *)((int (__thiscall *)(Effect *))v3->vfptr[1].__vecDelDtor)(v3);
        if ( v4 )
        {
          while ( v4 != &AttachEff::m_RTTI )
          {
            v4 = v4->m_pkBaseRTTI;
            if ( !v4 )
              goto LABEL_8;
          }
          if ( (unsigned __int16)((int (__thiscall *)(Effect *))v3->vfptr[23].__vecDelDtor)(v3) == kCaster )
            break;
        }
      }
LABEL_8:
      if ( !v2 )
        goto LABEL_9;
    }
    result = v3;
  }
  else
  {
LABEL_9:
    result = 0;
  }
  return result;
}

//----- (00692030) --------------------------------------------------------
void __thiscall EffectMgr::FindEffectAbstateCtrlAni(EffectMgr *this, unsigned __int16 kTargetHandle, unsigned int AbstateIndex)
{
  NiTListItem<Effect *> *v3; // eax@1
  Effect *v4; // ebx@4
  EffectMgr::AbstateAni *v5; // esi@7
  signed int v6; // ecx@7
  unsigned int v7; // edi@7
  int v8; // edi@12
  SubAbStateInfo *v9; // eax@14
  unsigned int v10; // ecx@15
  signed int v11; // edx@15
  unsigned int *v12; // ecx@16
  double v13; // st7@18
  float v14; // ST18_4@20
  double v15; // st7@20
  double v16; // st7@21
  double v17; // st6@23
  float v18; // ST18_4@23
  AbnormalStateInfo *fAniPos; // [sp+14h] [bp-18h]@13
  NiTListItem<Effect *> *kIter; // [sp+18h] [bp-14h]@4
  EffectMgr *v21; // [sp+1Ch] [bp-10h]@1
  unsigned int i; // [sp+20h] [bp-Ch]@7
  int j; // [sp+24h] [bp-8h]@11
  int v24; // [sp+28h] [bp-4h]@8

  v3 = this->m_kList.m_pkHead;
  v21 = this;
  if ( v3 )
  {
    while ( 1 )
    {
      v4 = v3->m_element;
      kIter = v3->m_pkNext;
      if ( v4 )
      {
        if ( v4->m_uiEffectType == 1 && v4->m_kAbStateID == AbstateIndex )
          break;
      }
LABEL_32:
      if ( !kIter )
        return;
      v3 = kIter;
    }
    v5 = this->m_kAbsateAniVec._Myfirst;
    v6 = (char *)this->m_kAbsateAniVec._Mylast - (char *)v5;
    v7 = 0;
    i = 0;
    if ( !(v6 / 14) )
      goto LABEL_31;
    v24 = 0;
    if ( (unsigned int)(v6 / 14) <= 0 )
      std::_Xout_of_range("invalid vector<T> subscript");
LABEL_9:
    if ( v5[v24].kTarget != v4->m_kAniTargetHandle || v4->m_kAbStateID != v5[v24].kAbstateInfom.abstateID )
      goto LABEL_30;
    j = 0;
    if ( *(float *)(((int (__thiscall *)(Effect *))v4->vfptr[4].__vecDelDtor)(v4) + 16) <= 0.0 )
      goto LABEL_27;
    while ( 1 )
    {
      v8 = *(_DWORD *)(*(_DWORD *)(((int (__thiscall *)(Effect *))v4->vfptr[4].__vecDelDtor)(v4) + 32) + 4 * j);
      if ( !v8 )
        goto LABEL_25;
      fAniPos = AbnormalStateInfoTab::GetByAbstateIndex(v4->m_kAbStateID);
      PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( !fAniPos )
        goto LABEL_25;
      v9 = SubAbStateInfoTab::GetByStrInxName(fAniPos->SubAbState, v5[v24].kAbstateInfom.strength);
      if ( !v9 )
        goto LABEL_25;
      v10 = v9->ActionArgA;
      v11 = v9->KeepTime;
      if ( v10 != 1000 )
        break;
      v12 = &v5[v24].kAbstateInfom.restKeeptime;
      if ( v11 != *v12 )
      {
        v13 = (double)(signed int)v9->KeepTime;
        if ( v11 < 0 )
          v13 = v13 + 4294967300.0;
        v14 = 6.666999816894531 / (v13 / 1000.0);
        *(float *)(v8 + 12) = v14;
        *v12;
        v15 = ((double)v9->KeepTime - (double)*v12) / 1000.0 * v14;
LABEL_24:
        *(float *)(v8 + 16) = v15;
        goto LABEL_25;
      }
      *(float *)(v8 + 12) = 6.666999816894531 / ((double)(unsigned int)v11 / 1000.0);
LABEL_25:
      if ( *(float *)(((int (__thiscall *)(_DWORD))v4->vfptr[4].__vecDelDtor)(v4) + 16) <= (double)++j )
      {
        v7 = i;
LABEL_27:
        if ( !Effect::GetAniStart(v4) )
          v4->vfptr[15].__vecDelDtor((NiRefObject *)v4, LODWORD(Timer::ms_fCurTime));
        Effect::SetAniStart(v4, 1);
LABEL_30:
        v5 = v21->m_kAbsateAniVec._Myfirst;
        ++v24;
        i = ++v7;
        if ( v21->m_kAbsateAniVec._Mylast - v5 <= v7 )
        {
LABEL_31:
          this = v21;
          goto LABEL_32;
        }
        goto LABEL_9;
      }
    }
    v16 = (double)(signed int)v9->KeepTime;
    if ( v11 < 0 )
      v16 = v16 + 4294967300.0;
    v17 = 6.666999816894531 / (v16 / 1000.0);
    v18 = v17;
    *(float *)(v8 + 12) = v17 * ((double)v10 / 1000.0);
    v15 = ((double)v9->KeepTime - (double)v5[v24].kAbstateInfom.restKeeptime) / 1000.0 * v18;
    goto LABEL_24;
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00692310) --------------------------------------------------------
char __thiscall EffectMgr::Init(EffectMgr *this)
{
  EffectMgr *v1; // ebx@1
  NiDefaultTexturePalette *v2; // eax@1
  NiTexturePalette *v3; // edi@1
  NiTexturePalette *v4; // eax@2
  NiTexturePalette *v5; // esi@3

  v1 = this;
  v2 = (NiDefaultTexturePalette *)operator new(0x20u);
  v3 = 0;
  if ( v2 )
  {
    NiDefaultTexturePalette::NiDefaultTexturePalette(v2, 0);
    v3 = v4;
  }
  v5 = v1->m_spTexturePalette.m_pObject;
  if ( v5 != v3 )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spTexturePalette.m_pObject = v3;
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
  return 1;
}

//----- (006923B0) --------------------------------------------------------
void __thiscall EffectMgr::DetachEffectFromWorld(EffectMgr *this, Effect *pkEffect)
{
  Effect *v2; // ebx@1
  EffectMgr *v3; // edi@1
  NiTListItem<NiPointer<Effect> > *v4; // esi@3
  Effect *v5; // eax@4
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0> > > result; // [sp+8h] [bp-4h]@2

  v2 = pkEffect;
  v3 = this;
  if ( pkEffect
    && std::_Tree<std::_Tset_traits<Effect *,std::less<Effect *>,std::allocator<Effect *>,0>>::find(
         (std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0> > *)&this->m_setEffectHandle,
         &result,
         (PgWin *const *)&pkEffect)->_Ptr != (std::_Tree_nod<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0> >::_Node *)this->m_setEffectHandle._Myhead )
  {
    v4 = v2->m_kChildList.m_pkHead;
    while ( v4 )
    {
      v5 = v4->m_element.m_pObject;
      v4 = v4->m_pkNext;
      EffectMgr::DetachEffectFromWorld(v3, v5);
    }
    World::DetachEffect(&g_kWorld, v2->m_spNode.m_pObject);
  }
}

//----- (00692410) --------------------------------------------------------
void __thiscall EffectMgr::Add(EffectMgr *this, Effect *pkEffect)
{
  EffectMgr *v2; // esi@1
  int v3; // eax@1
  _DWORD *v4; // ecx@1
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v5; // eax@4
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >,bool> result; // [sp+4h] [bp-8h]@4

  v2 = this;
  v3 = ((int (*)(void))this->m_kList.vfptr->NewItem)();
  *(_DWORD *)(v3 + 8) = pkEffect;
  *(_DWORD *)v3 = 0;
  *(_DWORD *)(v3 + 4) = v2->m_kList.m_pkTail;
  v4 = &v2->m_kList.m_pkTail->m_pkNext;
  if ( v4 )
    *v4 = v3;
  else
    v2->m_kList.m_pkHead = (NiTListItem<Effect *> *)v3;
  ++v2->m_kList.m_kAllocator.m_uiCount;
  v2->m_kList.m_pkTail = (NiTListItem<Effect *> *)v3;
  v5 = std::_Tree_val<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Buynode<QuestStartItemWin * &>(
         (std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v2->m_setEffectHandle,
         (unsigned int *)&pkEffect);
  std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::_Linsert(
    (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v2->m_setEffectHandle,
    &result,
    v5,
    0);
}

//----- (00692470) --------------------------------------------------------
void __thiscall EffectMgr::SetShow(EffectMgr *this, Effect *pkEffect, int _bShow, bool bWithWorld)
{
  EffectMgr *v4; // edi@1
  NiTListItem<Effect *> *v5; // eax@1
  Effect *v6; // esi@2

  v4 = this;
  v5 = this->m_kList.m_pkHead;
  if ( v5 )
  {
    while ( 1 )
    {
      v6 = v5->m_element;
      v5 = v5->m_pkNext;
      if ( pkEffect == v6 )
        break;
      if ( !v5 )
        return;
    }
    v6->vfptr[21].__vecDelDtor((NiRefObject *)v6, _bShow);
    if ( bWithWorld )
    {
      if ( (_BYTE)_bShow )
        EffectMgr::AttachEffectToWorld(v4, v6);
      else
        EffectMgr::DetachEffectFromWorld(v4, v6);
    }
  }
}

//----- (006924D0) --------------------------------------------------------
void __thiscall EffectMgr::CreateActionEffect(EffectMgr *this, ActionEffectInfo *pkInfo, unsigned int uiCasterEventCode, float fOffSet, Char *pkCaster, Char *pkTarget, bool bGroundPointEffect, int kCurSkillID, NiControllerSequence *pkSeq)
{
  Char *v9; // esi@2
  char *v10; // eax@3
  int v11; // ebx@5
  bool v12; // zf@6
  NiPoint3 *v13; // eax@7
  NiPoint3 *v14; // eax@10
  NiPoint3 *v15; // eax@13
  NiPoint3 *v16; // eax@16
  NiPoint3 *v17; // eax@19
  NiPoint3 *v18; // eax@22
  Char *v19; // edi@25
  NiPoint3 *v20; // eax@26
  NiPoint3 *v21; // ecx@26
  float v22; // edx@27
  NiPoint3 *v23; // eax@27
  float v24; // ecx@27
  float v25; // edx@27
  float v26; // eax@27
  int v27; // eax@31
  NiNode *v28; // ecx@31
  Char *v29; // edi@32
  AbStateInfecteeVtbl *v30; // eax@33
  int v31; // eax@33
  NiPoint3 *v32; // eax@35
  NiPoint3 *v33; // eax@36
  Char *v34; // ecx@38
  NiNode *v35; // eax@40
  NiPoint3 *v36; // eax@41
  float fYPos; // ST04_4@44
  float fXPos; // ST00_4@44
  NiNode *v39; // eax@47
  NiPoint3 *v40; // eax@49
  NiPoint3 *v41; // eax@52
  ActiveSkillInfo *v42; // eax@56
  unsigned int *v43; // esi@57
  const char *v44; // eax@58
  NiTextKeyExtraData *v45; // eax@61
  int v46; // esi@62
  NiTextKey *v47; // edi@63
  unsigned int v48; // ebx@63
  const char *v49; // ecx@64
  NiNode *v50; // eax@69
  NiNode *v51; // eax@69
  NiNode *v52; // esi@69
  NiTListItem<NiPointer<NiProperty> > *v53; // ecx@70
  float v54; // edx@70
  Char *v55; // eax@70
  Char *v56; // ebx@74
  AttachEff *v57; // edi@75
  NiNode *v58; // eax@76
  AttachEff *v59; // eax@76
  AttachEff *v60; // edi@76
  Effect *v61; // edi@80
  NiNode *v62; // eax@81
  AttachEff *v63; // eax@81
  void *(__thiscall *v64)(NiRefObject *, unsigned int); // edx@83
  NiNode *fTime; // ST0C_4@89
  NiNode *v66; // eax@89
  EffectMgr *v67; // esi@89
  float v68; // ST0C_4@89
  NiPoint3 v69; // [sp+20h] [bp-110h]@52
  NiPoint3 v70; // [sp+2Ch] [bp-104h]@26
  NiPoint3 v71; // [sp+38h] [bp-F8h]@49
  NiPoint3 result; // [sp+44h] [bp-ECh]@7
  NiPoint3 v73; // [sp+50h] [bp-E0h]@48
  NiPoint3 v74; // [sp+5Ch] [bp-D4h]@19
  NiPoint3 v75; // [sp+68h] [bp-C8h]@41
  NiPoint3 v76; // [sp+74h] [bp-BCh]@26
  NiPoint3 v77; // [sp+80h] [bp-B0h]@36
  NiPoint3 v78; // [sp+8Ch] [bp-A4h]@22
  NiPoint3 v79; // [sp+98h] [bp-98h]@35
  NiPoint3 v80; // [sp+A4h] [bp-8Ch]@16
  char v81; // [sp+B0h] [bp-80h]@30
  NiPoint3 v82; // [sp+BCh] [bp-74h]@10
  NiPoint3 v83; // [sp+C8h] [bp-68h]@30
  NiPoint3 v84; // [sp+D4h] [bp-5Ch]@13
  unsigned int dwGroundPointX; // [sp+E0h] [bp-50h]@44
  int iDir; // [sp+E4h] [bp-4Ch]@5
  unsigned int dwGroundPointY; // [sp+E8h] [bp-48h]@44
  NiPoint3 kMyPos; // [sp+ECh] [bp-44h]@26
  NiPoint3 kDir; // [sp+F8h] [bp-38h]@27
  EffectMgr *v90; // [sp+104h] [bp-2Ch]@1
  char *pcFile; // [sp+108h] [bp-28h]@5
  __int64 bIsDecal; // [sp+10Fh] [bp-21h]@6
  float v93; // [sp+118h] [bp-18h]@7
  float v94; // [sp+11Ch] [bp-14h]@7
  Char *pkDestChar; // [sp+120h] [bp-10h]@5
  int v96; // [sp+12Ch] [bp-4h]@75
  float fSize; // [sp+138h] [bp+8h]@56
  NiTextKeyExtraData *pkEx; // [sp+140h] [bp+10h]@61
  char bStopMotionClear_3; // [sp+147h] [bp+17h]@3
  float fLifeTime; // [sp+148h] [bp+18h]@56
  float fLifeTimea; // [sp+148h] [bp+18h]@91

  v90 = this;
  if ( pkInfo )
  {
    v9 = pkCaster;
    if ( pkCaster )
    {
      v10 = pkInfo->GrapicFile;
      bStopMotionClear_3 = 0;
      if ( pkInfo->GrapicFile[0] == 42 )
      {
        bStopMotionClear_3 = 1;
        v10 = &pkInfo->GrapicFile[1];
      }
      pcFile = v10;
      v11 = ActionInfoTable::GetEffPos(pkInfo->GEffectPos);
      iDir = pkInfo->Geffectdirection;
      pkDestChar = 0;
      pcFile = (char *)EffectMgr::GetEffectNode(v90, pcFile);
      if ( pcFile )
      {
        v12 = pkInfo->IsDecal == 0;
        *(_DWORD *)((char *)&bIsDecal + 1) = 0;
        LODWORD(bIsDecal) = !v12;
        switch ( v11 )
        {
          case 0:
            v13 = Char::GetHairPos(v9, &result);
            *(float *)((char *)&bIsDecal + 5) = v13->x;
            v93 = v13->y;
            v94 = v13->z;
            if ( v9 != (Char *)-780 )
              *(_DWORD *)((char *)&bIsDecal + 1) = v9->m_kCharShape.m_apkLinkNode[1];
            pkDestChar = v9;
            break;
          case 1:
            v14 = Char::GetChestPos(v9, &v82);
            *(float *)((char *)&bIsDecal + 5) = v14->x;
            v93 = v14->y;
            v94 = v14->z;
            if ( v9 != (Char *)-780 )
              *(_DWORD *)((char *)&bIsDecal + 1) = v9->m_kCharShape.m_apkLinkNode[5];
            pkDestChar = v9;
            break;
          case 2:
            v15 = Char::GetLeftHandPos(v9, &v84);
            *(float *)((char *)&bIsDecal + 5) = v15->x;
            v93 = v15->y;
            v94 = v15->z;
            if ( v9 != (Char *)-780 )
              *(_DWORD *)((char *)&bIsDecal + 1) = v9->m_kCharShape.m_apkLinkNode[11];
            pkDestChar = v9;
            break;
          case 3:
            v16 = Char::GetRightHandPos(v9, &v80);
            *(float *)((char *)&bIsDecal + 5) = v16->x;
            v93 = v16->y;
            v94 = v16->z;
            if ( v9 != (Char *)-780 )
              *(_DWORD *)((char *)&bIsDecal + 1) = v9->m_kCharShape.m_apkLinkNode[12];
            pkDestChar = v9;
            break;
          case 4:
            v17 = Char::GetLeftShoesPos(v9, &v74);
            *(float *)((char *)&bIsDecal + 5) = v17->x;
            v93 = v17->y;
            v94 = v17->z;
            if ( v9 != (Char *)-780 )
              *(_DWORD *)((char *)&bIsDecal + 1) = v9->m_kCharShape.m_apkLinkNode[17];
            pkDestChar = v9;
            break;
          case 5:
            v18 = Char::GetRightShoesPos(v9, &v78);
            *(float *)((char *)&bIsDecal + 5) = v18->x;
            v93 = v18->y;
            v94 = v18->z;
            if ( v9 != (Char *)-780 )
              *(_DWORD *)((char *)&bIsDecal + 1) = v9->m_kCharShape.m_apkLinkNode[18];
            pkDestChar = v9;
            break;
          case 6:
            v19 = pkTarget;
            if ( !pkTarget )
              return;
            v20 = Char::GetChestPos(v9, &v70);
            kMyPos.x = v20->x;
            v21 = &v76;
            goto LABEL_27;
          case 7:
            v19 = pkTarget;
            if ( !pkTarget )
              return;
            v20 = Char::GetChestPos(v9, &v83);
            kMyPos.x = v20->x;
            v21 = (NiPoint3 *)&v81;
LABEL_27:
            v22 = v20->y;
            kMyPos.z = v20->z;
            kMyPos.y = v22;
            v23 = Char::GetChestPos(v19, v21);
            v24 = v23->x;
            v25 = v23->y;
            v26 = v23->z;
            kDir.z = kMyPos.z;
            *(float *)((char *)&bIsDecal + 5) = v24;
            v93 = v25;
            v94 = kMyPos.z;
            goto LABEL_28;
          case 8:
            v27 = ((int (__thiscall *)(Char *))v9->vfptr[6].Deaffect)(v9);
            *(_DWORD *)((char *)&bIsDecal + 5) = *(_DWORD *)v27;
            v28 = v9->m_spScene.m_pObject;
            v93 = *(float *)(v27 + 4);
            v94 = *(float *)(v27 + 8);
            *(_DWORD *)((char *)&bIsDecal + 1) = v28;
            pkDestChar = v9;
            break;
          case 9:
            v29 = pkTarget;
            if ( !pkTarget )
              return;
            v30 = pkTarget->vfptr;
            *(_DWORD *)((char *)&bIsDecal + 1) = pkTarget->m_spScene.m_pObject;
            v31 = ((int (__thiscall *)(Char *))v30[6].Deaffect)(pkTarget);
            *(_DWORD *)((char *)&bIsDecal + 5) = *(_DWORD *)v31;
            v93 = *(float *)(v31 + 4);
            v94 = *(float *)(v31 + 8);
            goto LABEL_54;
          case 10:
            v29 = pkTarget;
            if ( !pkTarget )
              return;
            v32 = Char::GetChestPos(pkTarget, &v79);
            *(float *)((char *)&bIsDecal + 5) = v32->x;
            v93 = v32->y;
            v94 = v32->z;
            goto LABEL_54;
          case 11:
            v33 = Char::GetWorldPos(v9, &v77);
            *(float *)((char *)&bIsDecal + 5) = v33->x;
            v93 = v33->y;
            v94 = v33->z;
            if ( v9 == (Char *)-780 )
              goto LABEL_28;
            *(_DWORD *)((char *)&bIsDecal + 1) = v9->m_kCharShape.m_apkLinkNode[25];
            pkDestChar = v9;
            break;
          case 12:
            v34 = pkTarget;
            if ( !pkTarget || pkTarget == (Char *)-780 )
              return;
            v35 = pkTarget->m_kCharShape.m_apkLinkNode[25];
            pkDestChar = pkTarget;
            *(_DWORD *)((char *)&bIsDecal + 1) = v35;
            if ( !v35 )
              goto LABEL_42;
            v36 = Char::GetWorldPos(pkTarget, &v75);
            goto LABEL_43;
          case 13:
            Char::GetSkillTargetGroundPoint(v9, &dwGroundPointX, &dwGroundPointY);
            fYPos = (double)dwGroundPointY;
            fXPos = (double)dwGroundPointX;
            World::GetGroundPos(&g_kWorld, fXPos, fYPos, (NiPoint3 *)((char *)&bIsDecal + 5), 0);
            Char::ResetSkillTargetGroundPoint(v9);
            break;
          case 14:
            v34 = pkTarget;
            if ( !pkTarget || pkTarget == (Char *)-780 )
              return;
            v39 = pkTarget->m_kCharShape.m_apkLinkNode[1];
            pkDestChar = pkTarget;
            *(_DWORD *)((char *)&bIsDecal + 1) = v39;
            if ( v39 )
              v36 = Char::GetWorldPos(pkTarget, &v73);
            else
LABEL_42:
              v36 = (NiPoint3 *)((int (*)(void))v34->vfptr[6].Deaffect)();
LABEL_43:
            *(float *)((char *)&bIsDecal + 5) = v36->x;
            v93 = v36->y;
            v94 = v36->z;
            break;
          case 15:
            v40 = Char::GetTopLinkPos(v9, &v71);
            *(float *)((char *)&bIsDecal + 5) = v40->x;
            v93 = v40->y;
            v94 = v40->z;
            if ( v9 == (Char *)-780 )
            {
LABEL_28:
              pkDestChar = v9;
            }
            else
            {
              *(_DWORD *)((char *)&bIsDecal + 1) = v9->m_kCharShape.m_apkLinkNode[8];
              pkDestChar = v9;
            }
            break;
          case 16:
            v29 = pkTarget;
            if ( !pkTarget )
              return;
            v41 = Char::GetTopLinkPos(pkTarget, &v69);
            *(float *)((char *)&bIsDecal + 5) = v41->x;
            v93 = v41->y;
            v94 = v41->z;
            if ( pkTarget != (Char *)-780 )
              *(_DWORD *)((char *)&bIsDecal + 1) = pkTarget->m_kCharShape.m_apkLinkNode[8];
LABEL_54:
            pkDestChar = v29;
            break;
          default:
            break;
        }
        if ( (_BYTE)bIsDecal )
        {
          fSize = 0.0;
          fLifeTime = 0.0;
          v42 = IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::GetByID(kCurSkillID);
          if ( v42 )
          {
            v43 = &v42->Area;
            if ( !v42->Area )
            {
              v44 = fs("pkSkillInfo->Area == 0, SkillID[ %d ]\n", (unsigned __int16)kCurSkillID);
              OutputDebugStringA(v44);
            }
            fSize = (double)*v43;
          }
          if ( pkSeq && (v45 = pkSeq->m_spTextKeys.m_pObject, (pkEx = v45) != 0) && (v46 = 0, v45->m_uiNumKeys) )
          {
            while ( 1 )
            {
              v47 = pkEx->m_pKeys;
              v48 = pkEx->m_uiNumKeys;
              if ( !v47 )
                break;
              v49 = v47[v46].m_pText;
              if ( v49 && !strcmp((const char *)&off_9BD0E0, v49) )
              {
                fLifeTime = v47[v46].m_fTime;
                goto LABEL_69;
              }
              fLifeTime = pkSeq->m_fEndKeyTime;
              OutputDebugStringA("HitTime Á¤ÀÇ µÇ¾îÀÖÁö ¾Ê¾Æ¼­ EndKeyTime ÀÌ DecalEffectÀÇ LifeTimeÀ¸·Î ¼³Á¤");
              if ( ++v46 >= v48 )
                goto LABEL_69;
            }
          }
          else
          {
LABEL_69:
            v50 = (NiNode *)NiObject::Clone((NiObject *)pcFile);
            v51 = DecalMgr::AddDecal(&stru_B26354, v50);
            v52 = v51;
            if ( v51 )
            {
              CharDecal::SetLifeTime((CharDecal *)v51, fLifeTime);
              CharDecal::SetRadius((CharDecal *)v52, fSize);
              v53 = (NiTListItem<NiPointer<NiProperty> > *)LODWORD(v93);
              v54 = v94;
              v52->m_kPropertyList.vfptr = *(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiProperty> >Vtbl **)((char *)&bIsDecal + 5);
              v55 = pkDestChar;
              v52->m_kPropertyList.m_pkHead = v53;
              *(float *)&v52->m_kPropertyList.m_pkTail = v54;
              if ( v55 )
                CharDecal::SetCharHandle((CharDecal *)v52, v55->m_kHandle);
            }
          }
        }
        else
        {
          if ( pkInfo->GEffectKeep && *(_DWORD *)((char *)&bIsDecal + 1) && (v56 = pkDestChar) != 0 )
          {
            v57 = (AttachEff *)operator new(0x21Cu);
            v96 = 0;
            if ( v57 )
            {
              v58 = (NiNode *)NiObject::Clone((NiObject *)pcFile);
              AttachEff::AttachEff(v57, v58, 0, v9);
              v60 = v59;
            }
            else
            {
              v60 = 0;
            }
            v96 = -1;
            AttachEff::SetTargetNode(v60, *(NiNode **)((char *)&bIsDecal + 1), (IEffectHolder *)&v56->vfptr);
            if ( bStopMotionClear_3 )
              v60->m_uiActCasterAniCode = uiCasterEventCode;
          }
          else
          {
            v61 = (Effect *)operator new(0x20Cu);
            v96 = 1;
            if ( v61 )
            {
              v62 = (NiNode *)NiObject::Clone((NiObject *)pcFile);
              Effect::Effect(v61, v62, 1, v9);
              v60 = v63;
            }
            else
            {
              v60 = 0;
            }
            v64 = v60->vfptr[7].__vecDelDtor;
            v96 = -1;
            v64((NiRefObject *)&v60->vfptr, (unsigned int)&bIsDecal + 5);
            if ( bStopMotionClear_3 )
              v60->m_uiActCasterAniCode = uiCasterEventCode;
          }
          if ( iDir && (!pkInfo->GEffectKeep || v9 != pkDestChar) )
          {
            ((void (__thiscall *)(Char *, NiPoint3 *))v9->vfptr[6].~AbStateInfectee)(v9, &kDir);
            v60->vfptr[10].__vecDelDtor((NiRefObject *)v60, (unsigned int)&kDir);
          }
          fTime = v9->m_spScene.m_pObject;
          v66 = (NiNode *)((int (__thiscall *)(AttachEff *))v60->vfptr[2].__vecDelDtor)(v60);
          v67 = v90;
          v68 = EffectMgr::CalculateEffScaleRatio(v90, (int)v90, v66, fTime);
          Effect::SetScale((Effect *)&v60->vfptr, v68);
          if ( fOffSet < 0.0 )
            fOffSet = 0.0;
          fLifeTimea = Timer::ms_fCurTime + fOffSet;
          v60->vfptr[15].__vecDelDtor((NiRefObject *)v60, LODWORD(fLifeTimea));
          EffectMgr::Add(v67, (Effect *)&v60->vfptr);
          EffectMgr::AttachEffectToWorld(v67, (Effect *)&v60->vfptr);
        }
      }
    }
  }
}
// 9BD0E0: using guessed type void *off_9BD0E0;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00692C70) --------------------------------------------------------
void __thiscall EffectMgr::CreateActionEffect(EffectMgr *this, ActionInfo *pkInfo, int iIndex, Char *pkCaster, Char *pkTarget, bool bGroundPointEffect)
{
  Char *v6; // esi@2
  char *v7; // edx@3
  char *v8; // edx@4
  int v9; // eax@6
  Char *v10; // ebx@6
  float fYPos; // ST04_4@9
  float fXPos; // ST00_4@9
  NiPoint3 *v13; // eax@11
  NiPoint3 *v14; // eax@14
  NiPoint3 *v15; // eax@17
  NiPoint3 *v16; // eax@20
  NiPoint3 *v17; // eax@23
  NiPoint3 *v18; // eax@26
  Char *v19; // edi@29
  NiPoint3 *v20; // eax@30
  NiPoint3 *v21; // ecx@30
  float v22; // edx@31
  NiPoint3 *v23; // eax@31
  float v24; // ecx@31
  float v25; // edx@31
  float v26; // eax@31
  int v27; // eax@35
  NiNode *v28; // ecx@35
  AbStateInfecteeVtbl *v29; // eax@37
  NiPoint3 *v30; // eax@37
  NiPoint3 *v31; // eax@40
  NiPoint3 *v32; // eax@41
  Char *v33; // ecx@43
  float v34; // ST04_4@48
  float v35; // ST00_4@48
  NiPoint3 *v36; // eax@53
  NiPoint3 *v37; // eax@56
  AttachEff *v38; // edi@62
  NiNode *v39; // eax@63
  AttachEff *v40; // eax@63
  AttachEff *v41; // edi@63
  Effect *v42; // edi@67
  NiNode *v43; // eax@68
  Effect *v44; // eax@68
  Effect *v45; // edi@68
  void *(__thiscall *v46)(NiRefObject *, unsigned int); // edx@70
  EffectMgr *v47; // esi@76
  NiPoint3 v48; // [sp+20h] [bp-10Ch]@56
  NiPoint3 v49; // [sp+2Ch] [bp-100h]@30
  NiPoint3 v50; // [sp+38h] [bp-F4h]@53
  NiPoint3 result; // [sp+44h] [bp-E8h]@11
  NiPoint3 v52; // [sp+50h] [bp-DCh]@52
  NiPoint3 v53; // [sp+5Ch] [bp-D0h]@23
  NiPoint3 v54; // [sp+68h] [bp-C4h]@46
  NiPoint3 v55; // [sp+74h] [bp-B8h]@30
  NiPoint3 v56; // [sp+80h] [bp-ACh]@41
  NiPoint3 v57; // [sp+8Ch] [bp-A0h]@26
  NiPoint3 v58; // [sp+98h] [bp-94h]@40
  NiPoint3 v59; // [sp+A4h] [bp-88h]@20
  char v60; // [sp+B0h] [bp-7Ch]@34
  NiPoint3 v61; // [sp+BCh] [bp-70h]@14
  NiPoint3 v62; // [sp+C8h] [bp-64h]@34
  NiPoint3 v63; // [sp+D4h] [bp-58h]@17
  int iDir; // [sp+E0h] [bp-4Ch]@6
  EffectMgr *v65; // [sp+E4h] [bp-48h]@1
  ActionInfo::EFF_POS ePos; // [sp+E8h] [bp-44h]@6
  NiPoint3 kMyPos; // [sp+ECh] [bp-40h]@30
  NiPoint3 kDir; // [sp+F8h] [bp-34h]@31
  NiNode *pkNode; // [sp+104h] [bp-28h]@6
  unsigned int dwGroundPointX; // [sp+108h] [bp-24h]@8
  unsigned int dwGroundPointY; // [sp+10Ch] [bp-20h]@8
  NiNode *pkSocket; // [sp+110h] [bp-1Ch]@7
  NiPoint3 kPos; // [sp+114h] [bp-18h]@9
  int v74; // [sp+128h] [bp-4h]@62
  char bStopMotionClear_3; // [sp+13Fh] [bp+13h]@3
  Effect *pkEffect; // [sp+144h] [bp+18h]@65

  v65 = this;
  if ( pkInfo )
  {
    v6 = pkCaster;
    if ( pkCaster )
    {
      v7 = (char *)pkInfo + 32 * iIndex + iIndex;
      bStopMotionClear_3 = 0;
      if ( v7[116] == 42 )
      {
        bStopMotionClear_3 = 1;
        v8 = v7 + 117;
      }
      else
      {
        v8 = v7 + 116;
      }
      v9 = pkInfo->EffDir[iIndex];
      ePos = pkInfo->EffPos[iIndex];
      iDir = v9;
      v10 = 0;
      pkNode = EffectMgr::GetEffectNode(this, v8);
      if ( pkNode )
      {
        pkSocket = 0;
        if ( bGroundPointEffect && Char::GetSkillTargetGroundPoint(v6, &dwGroundPointX, &dwGroundPointY) )
        {
          fYPos = (double)dwGroundPointY;
          fXPos = (double)dwGroundPointX;
          World::GetGroundPos(&g_kWorld, fXPos, fYPos, &kPos, 0);
          Char::ResetSkillTargetGroundPoint(v6);
        }
        else
        {
          switch ( ePos )
          {
            case 0:
              v13 = Char::GetHairPos(v6, &result);
              kPos.x = v13->x;
              kPos.y = v13->y;
              kPos.z = v13->z;
              if ( v6 != (Char *)-780 )
                pkSocket = v6->m_kCharShape.m_apkLinkNode[1];
              v10 = v6;
              break;
            case 1:
              v14 = Char::GetChestPos(v6, &v61);
              kPos.x = v14->x;
              kPos.y = v14->y;
              kPos.z = v14->z;
              if ( v6 != (Char *)-780 )
                pkSocket = v6->m_kCharShape.m_apkLinkNode[5];
              v10 = v6;
              break;
            case 2:
              v15 = Char::GetLeftHandPos(v6, &v63);
              kPos.x = v15->x;
              kPos.y = v15->y;
              kPos.z = v15->z;
              if ( v6 != (Char *)-780 )
                pkSocket = v6->m_kCharShape.m_apkLinkNode[11];
              v10 = v6;
              break;
            case 3:
              v16 = Char::GetRightHandPos(v6, &v59);
              kPos.x = v16->x;
              kPos.y = v16->y;
              kPos.z = v16->z;
              if ( v6 != (Char *)-780 )
                pkSocket = v6->m_kCharShape.m_apkLinkNode[12];
              v10 = v6;
              break;
            case 4:
              v17 = Char::GetLeftShoesPos(v6, &v53);
              kPos.x = v17->x;
              kPos.y = v17->y;
              kPos.z = v17->z;
              if ( v6 != (Char *)-780 )
                pkSocket = v6->m_kCharShape.m_apkLinkNode[17];
              v10 = v6;
              break;
            case 5:
              v18 = Char::GetRightShoesPos(v6, &v57);
              kPos.x = v18->x;
              kPos.y = v18->y;
              kPos.z = v18->z;
              if ( v6 != (Char *)-780 )
                pkSocket = v6->m_kCharShape.m_apkLinkNode[18];
              v10 = v6;
              break;
            case 6:
              v19 = pkTarget;
              if ( !pkTarget )
                return;
              v20 = Char::GetChestPos(v6, &v49);
              kMyPos.x = v20->x;
              v21 = &v55;
              goto LABEL_31;
            case 7:
              v19 = pkTarget;
              if ( !pkTarget )
                return;
              v20 = Char::GetChestPos(v6, &v62);
              kMyPos.x = v20->x;
              v21 = (NiPoint3 *)&v60;
LABEL_31:
              v22 = v20->y;
              kMyPos.z = v20->z;
              kMyPos.y = v22;
              v23 = Char::GetChestPos(v19, v21);
              v24 = v23->x;
              v25 = v23->y;
              v26 = v23->z;
              kDir.z = kMyPos.z;
              kPos.x = v24;
              kPos.y = v25;
              kPos.z = kMyPos.z;
              goto LABEL_32;
            case 8:
              v27 = ((int (__thiscall *)(Char *))v6->vfptr[6].Deaffect)(v6);
              kPos.x = *(float *)v27;
              v28 = v6->m_spScene.m_pObject;
              kPos.y = *(float *)(v27 + 4);
              kPos.z = *(float *)(v27 + 8);
              v10 = v6;
              goto LABEL_58;
            case 9:
              v10 = pkTarget;
              if ( !pkTarget )
                return;
              v29 = pkTarget->vfptr;
              pkSocket = pkTarget->m_spScene.m_pObject;
              v30 = (NiPoint3 *)((int (__thiscall *)(Char *))v29[6].Deaffect)(pkTarget);
              goto LABEL_38;
            case 10:
              v10 = pkTarget;
              if ( !pkTarget )
                return;
              v31 = Char::GetChestPos(pkTarget, &v58);
              kPos.x = v31->x;
              kPos.y = v31->y;
              kPos.z = v31->z;
              break;
            case 11:
              v32 = Char::GetWorldPos(v6, &v56);
              kPos.x = v32->x;
              kPos.y = v32->y;
              kPos.z = v32->z;
              if ( v6 == (Char *)-780 )
                goto LABEL_32;
              pkSocket = v6->m_kCharShape.m_apkLinkNode[25];
              v10 = v6;
              break;
            case 12:
              v33 = pkTarget;
              if ( !pkTarget || pkTarget == (Char *)-780 )
                return;
              v10 = pkTarget;
              pkSocket = pkTarget->m_kCharShape.m_apkLinkNode[25];
              if ( !pkSocket )
                goto LABEL_47;
              v30 = Char::GetWorldPos(pkTarget, &v54);
              goto LABEL_38;
            case 13:
              Char::GetSkillTargetGroundPoint(v6, &dwGroundPointX, &dwGroundPointY);
              v34 = (double)dwGroundPointY;
              v35 = (double)dwGroundPointX;
              World::GetGroundPos(&g_kWorld, v35, v34, &kPos, 0);
              break;
            case 14:
              v33 = pkTarget;
              if ( !pkTarget || pkTarget == (Char *)-780 )
                return;
              v10 = pkTarget;
              pkSocket = pkTarget->m_kCharShape.m_apkLinkNode[1];
              if ( pkSocket )
                v30 = Char::GetWorldPos(pkTarget, &v52);
              else
LABEL_47:
                v30 = (NiPoint3 *)((int (*)(void))v33->vfptr[6].Deaffect)();
LABEL_38:
              kPos.x = v30->x;
              kPos.y = v30->y;
              kPos.z = v30->z;
              break;
            case 15:
              v36 = Char::GetTopLinkPos(v6, &v50);
              kPos.x = v36->x;
              kPos.y = v36->y;
              kPos.z = v36->z;
              if ( v6 == (Char *)-780 )
              {
LABEL_32:
                v10 = v6;
              }
              else
              {
                pkSocket = v6->m_kCharShape.m_apkLinkNode[8];
                v10 = v6;
              }
              break;
            case 16:
              v10 = pkTarget;
              if ( !pkTarget )
                return;
              v37 = Char::GetTopLinkPos(pkTarget, &v48);
              kPos.x = v37->x;
              kPos.y = v37->y;
              kPos.z = v37->z;
              if ( pkTarget != (Char *)-780 )
              {
                v28 = pkTarget->m_kCharShape.m_apkLinkNode[8];
LABEL_58:
                pkSocket = v28;
              }
              break;
            default:
              break;
          }
        }
        if ( pkInfo->EffKeep[iIndex] && pkSocket && v10 )
        {
          v38 = (AttachEff *)operator new(0x21Cu);
          v74 = 0;
          if ( v38 )
          {
            v39 = (NiNode *)NiObject::Clone((NiObject *)&pkNode->vfptr);
            AttachEff::AttachEff(v38, v39, 0, v6);
            v41 = v40;
          }
          else
          {
            v41 = 0;
          }
          v74 = -1;
          pkEffect = (Effect *)v41;
          AttachEff::SetTargetNode(v41, pkSocket, (IEffectHolder *)&v10->vfptr);
          if ( bStopMotionClear_3 )
            v41->m_uiActCasterAniCode = pkInfo->uiEventCode;
        }
        else
        {
          v42 = (Effect *)operator new(0x20Cu);
          v74 = 1;
          if ( v42 )
          {
            v43 = (NiNode *)NiObject::Clone((NiObject *)&pkNode->vfptr);
            Effect::Effect(v42, v43, 1, v6);
            v45 = v44;
          }
          else
          {
            v45 = 0;
          }
          v46 = v45->vfptr[7].__vecDelDtor;
          v74 = -1;
          pkEffect = v45;
          v46((NiRefObject *)&v45->vfptr, (unsigned int)&kPos);
          if ( bStopMotionClear_3 )
            v45->m_uiActCasterAniCode = pkInfo->uiEventCode;
        }
        if ( iDir && (!pkInfo->EffKeep[iIndex] || v6 != v10) )
        {
          ((void (__thiscall *)(Char *, NiPoint3 *))v6->vfptr[6].~AbStateInfectee)(v6, &kDir);
          pkEffect->vfptr[10].__vecDelDtor((NiRefObject *)pkEffect, (unsigned int)&kDir);
        }
        pkEffect->vfptr[15].__vecDelDtor((NiRefObject *)pkEffect, LODWORD(Timer::ms_fCurTime));
        v47 = v65;
        EffectMgr::Add(v65, pkEffect);
        EffectMgr::AttachEffectToWorld(v47, pkEffect);
      }
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006932B0) --------------------------------------------------------
void __thiscall EffectMgr::CreateEffect(EffectMgr *this, ActionInfo *pkInfo, int iIndex, Char *pkCaster, Char *pkTarget)
{
  Char *v5; // esi@2
  char *v6; // ST08_4@3
  NiNode *v7; // edi@3
  Effect *v8; // ebx@4
  NiNode *v9; // eax@5
  Effect *v10; // eax@5
  Effect *v11; // ebx@5
  NiPoint3 *v12; // eax@10
  Char *v13; // ecx@10
  NiPoint3 *v14; // eax@11
  NiPoint3 *v15; // eax@13
  Char *v16; // edi@17
  NiPoint3 *v17; // eax@18
  NiPoint3 *v18; // ecx@18
  float v19; // edx@19
  NiPoint3 *v20; // eax@19
  float v21; // ecx@19
  float v22; // edx@19
  float v23; // eax@19
  EffectMgr *v24; // esi@32
  char v25; // [sp+1Ch] [bp-C4h]@29
  NiPoint3 v26; // [sp+28h] [bp-B8h]@13
  NiPoint3 v27; // [sp+34h] [bp-ACh]@26
  NiPoint3 v28; // [sp+40h] [bp-A0h]@15
  char v29; // [sp+4Ch] [bp-94h]@21
  NiPoint3 v30; // [sp+58h] [bp-88h]@16
  NiPoint3 v31; // [sp+64h] [bp-7Ch]@21
  NiPoint3 v32; // [sp+70h] [bp-70h]@10
  NiPoint3 v33; // [sp+7Ch] [bp-64h]@18
  NiPoint3 result; // [sp+88h] [bp-58h]@11
  NiPoint3 v35; // [sp+94h] [bp-4Ch]@18
  NiPoint3 v36; // [sp+A0h] [bp-40h]@14
  EffectMgr *v37; // [sp+ACh] [bp-34h]@1
  NiPoint3 kTargetPos; // [sp+B0h] [bp-30h]@8
  NiPoint3 kMyPos; // [sp+BCh] [bp-24h]@18
  NiPoint3 kPos; // [sp+C8h] [bp-18h]@12
  int v41; // [sp+DCh] [bp-4h]@4
  int iDir; // [sp+E8h] [bp+8h]@3
  ActionInfo::EFF_POS ePos; // [sp+F0h] [bp+10h]@3

  v37 = this;
  if ( pkInfo )
  {
    v5 = pkCaster;
    if ( pkCaster )
    {
      v6 = (char *)pkInfo->EffFile + 32 * iIndex + iIndex;
      ePos = pkInfo->EffPos[iIndex];
      iDir = pkInfo->EffDir[iIndex];
      v7 = EffectMgr::GetEffectNode(this, v6);
      if ( v7 )
      {
        v8 = (Effect *)operator new(0x20Cu);
        v41 = 0;
        if ( v8 )
        {
          v9 = (NiNode *)NiObject::Clone((NiObject *)&v7->vfptr);
          Effect::Effect(v8, v9, 1, 0);
          v11 = v10;
        }
        else
        {
          v11 = 0;
        }
        v41 = -1;
        if ( iDir )
        {
          ((void (__thiscall *)(Char *, NiPoint3 *))v5->vfptr[6].~AbStateInfectee)(v5, &kTargetPos);
          v11->vfptr[10].__vecDelDtor((NiRefObject *)v11, (unsigned int)&kTargetPos);
        }
        switch ( ePos )
        {
          case 0:
            v12 = &v32;
            v13 = v5;
            goto LABEL_30;
          case 1:
            v14 = Char::GetChestPos(v5, &result);
            goto LABEL_12;
          case 2:
            v15 = Char::GetLeftHandPos(v5, &v26);
            goto LABEL_31;
          case 3:
            v14 = Char::GetRightHandPos(v5, &v36);
            goto LABEL_12;
          case 4:
            v15 = Char::GetLeftShoesPos(v5, &v28);
            goto LABEL_31;
          case 5:
            v14 = Char::GetRightShoesPos(v5, &v30);
LABEL_12:
            kPos.x = v14->x;
            kPos.y = v14->y;
            kPos.z = v14->z;
            break;
          case 6:
            v16 = pkTarget;
            if ( !pkTarget )
              return;
            v17 = Char::GetChestPos(v5, &v35);
            kMyPos.x = v17->x;
            v18 = &v33;
            goto LABEL_19;
          case 7:
            v16 = pkTarget;
            if ( !pkTarget )
              return;
            v17 = Char::GetChestPos(v5, &v31);
            kMyPos.x = v17->x;
            v18 = (NiPoint3 *)&v29;
LABEL_19:
            v19 = v17->y;
            kMyPos.z = v17->z;
            kMyPos.y = v19;
            v20 = Char::GetChestPos(v16, v18);
            v21 = v20->x;
            v22 = v20->y;
            v23 = v20->z;
            kTargetPos.z = kMyPos.z;
            kPos.x = v21;
            kPos.y = v22;
            kPos.z = kMyPos.z;
            break;
          case 8:
            v15 = (NiPoint3 *)((int (__thiscall *)(Char *))v5->vfptr[6].Deaffect)(v5);
            goto LABEL_31;
          case 9:
            if ( !pkTarget )
              return;
            v15 = (NiPoint3 *)((int (*)(void))pkTarget->vfptr[6].Deaffect)();
            goto LABEL_31;
          case 10:
            if ( !pkTarget )
              return;
            v15 = Char::GetChestPos(pkTarget, &v27);
            goto LABEL_31;
          case 14:
            v13 = pkTarget;
            if ( !pkTarget || pkTarget == (Char *)-780 )
              return;
            v12 = (NiPoint3 *)&v25;
LABEL_30:
            v15 = Char::GetHairPos(v13, v12);
LABEL_31:
            kPos.x = v15->x;
            kPos.y = v15->y;
            kPos.z = v15->z;
            break;
          default:
            break;
        }
        v11->vfptr[15].__vecDelDtor((NiRefObject *)v11, LODWORD(Timer::ms_fCurTime));
        v11->vfptr[7].__vecDelDtor((NiRefObject *)v11, (unsigned int)&kPos);
        v24 = v37;
        EffectMgr::Add(v37, v11);
        EffectMgr::AttachEffectToWorld(v24, v11);
      }
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00693570) --------------------------------------------------------
void __thiscall EffectMgr::RemoveClientEff(EffectMgr *this, Effect *eff)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> >::_Node *v2; // esi@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > v3; // edx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v4; // eax@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *j; // eax@5
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *i; // eax@8

  v2 = this->m_kClientEffectMap._Myhead;
  v3._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v2->_Left;
  if ( v2->_Left != v2 )
  {
    while ( (Effect *)v3._Ptr->_Myval.second != eff )
    {
      if ( !v3._Ptr->_Isnil )
      {
        v4 = v3._Ptr->_Right;
        if ( v4->_Isnil )
        {
          for ( i = v3._Ptr->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v3._Ptr != i->_Right )
              break;
            v3._Ptr = i;
          }
          v3._Ptr = i;
        }
        else
        {
          v3._Ptr = v3._Ptr->_Right;
          for ( j = v4->_Left; !j->_Isnil; j = j->_Left )
            v3._Ptr = j;
        }
      }
      if ( (std::_Tree_nod<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> >::_Node *)v3._Ptr == v2 )
        return;
    }
    std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
      (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)&this->m_kClientEffectMap,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > *)&eff,
      v3);
  }
}

//----- (006935F0) --------------------------------------------------------
void __thiscall EffectMgr::RemoveAllClientEff(EffectMgr *this)
{
  EffectMgr *v1; // edi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> >::_Node *v3; // esi@1
  Effect *v4; // ecx@2
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> >::_Node *v5; // eax@5
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> >::_Node *j; // eax@6
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> >::_Node *i; // eax@9
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> >::_Node *v8; // eax@14
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> >::_Node *v9; // ebx@14
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> >::_Node *v10; // esi@14

  v1 = this;
  v2 = this->m_kClientEffectMap._Myhead;
  v3 = v2->_Left;
  if ( v2->_Left != v2 )
  {
    do
    {
      v4 = v3->_Myval.second;
      if ( v4 )
        ((void (*)(void))v4->vfptr[16].__vecDelDtor)();
      if ( !v3->_Isnil )
      {
        v5 = v3->_Right;
        if ( v5->_Isnil )
        {
          for ( i = v3->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v3 != i->_Right )
              break;
            v3 = i;
          }
          v3 = i;
        }
        else
        {
          v3 = v3->_Right;
          for ( j = v5->_Left; !j->_Isnil; j = j->_Left )
            v3 = j;
        }
      }
    }
    while ( v3 != v1->m_kClientEffectMap._Myhead );
  }
  v8 = v1->m_kClientEffectMap._Myhead;
  v9 = v8->_Parent;
  v10 = v8->_Parent;
  if ( !v9->_Isnil )
  {
    do
    {
      std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Erase(
        (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_kClientEffectMap,
        (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v10->_Right);
      v10 = v10->_Left;
      operator delete(v9);
      v9 = v10;
    }
    while ( !v10->_Isnil );
  }
  v1->m_kClientEffectMap._Myhead->_Parent = v1->m_kClientEffectMap._Myhead;
  v1->m_kClientEffectMap._Myhead->_Left = v1->m_kClientEffectMap._Myhead;
  v1->m_kClientEffectMap._Myhead->_Right = v1->m_kClientEffectMap._Myhead;
  v1->m_kClientEffectMap._Mysize = 0;
}

//----- (006936A0) --------------------------------------------------------
void __thiscall EffectMgr::Remove(EffectMgr *this, Effect *pkEffect)
{
  EffectMgr *v2; // ebx@1
  NiTListItem<Effect *> *v3; // eax@1
  NiTListItem<Effect *> *v4; // ecx@1
  Effect *v5; // esi@2
  Effect **v6; // ecx@6
  Effect *v7; // edx@6
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > >,std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > > > result; // [sp+4h] [bp-Ch]@11
  Effect *pkEff; // [sp+Ch] [bp-4h]@2

  v2 = this;
  v3 = this->m_kList.m_pkHead;
  v4 = this->m_kList.m_pkHead;
  if ( v4 )
  {
    while ( 1 )
    {
      v5 = v4->m_element;
      v4 = v4->m_pkNext;
      pkEff = v5;
      if ( pkEffect == v5 )
        break;
      if ( !v4 )
        return;
    }
    if ( v3 )
    {
      while ( 1 )
      {
        v6 = &v3->m_element;
        v7 = (Effect *)v3;
        v3 = v3->m_pkNext;
        if ( v5 == *v6 )
          break;
        if ( !v3 )
          goto LABEL_8;
      }
    }
    else
    {
LABEL_8:
      v7 = 0;
    }
    pkEffect = v7;
    if ( v7 )
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)v2,
        (void **)&pkEffect);
    std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Eqrange(
      (std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > *)&v2->m_setEffectHandle,
      &result,
      (NiAVObject *const *)&pkEff);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::erase(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v2->m_setEffectHandle,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *)&pkEffect,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >)result.first._Ptr,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >)result.second._Ptr);
    if ( v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  }
}

//----- (00693740) --------------------------------------------------------
void __thiscall EffectMgr::RemoveEffect(EffectMgr *this, Char *pkEffect)
{
  EffectMgr *v2; // ebx@1
  NiTListItem<Effect *> *v3; // eax@1
  NiTListItem<Effect *> *v4; // ecx@1
  Effect *v5; // esi@2
  Effect **v6; // ecx@6
  Char *v7; // edx@6
  std::pair<std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > >,std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > > > result; // [sp+4h] [bp-Ch]@11
  Effect *pkEff; // [sp+Ch] [bp-4h]@2

  v2 = this;
  v3 = this->m_kList.m_pkHead;
  v4 = this->m_kList.m_pkHead;
  if ( v4 )
  {
    while ( 1 )
    {
      v5 = v4->m_element;
      v4 = v4->m_pkNext;
      pkEff = v5;
      if ( pkEffect == v5->m_pkCaster )
        break;
      if ( !v4 )
        return;
    }
    if ( v3 )
    {
      while ( 1 )
      {
        v6 = &v3->m_element;
        v7 = (Char *)v3;
        v3 = v3->m_pkNext;
        if ( v5 == *v6 )
          break;
        if ( !v3 )
          goto LABEL_8;
      }
    }
    else
    {
LABEL_8:
      v7 = 0;
    }
    pkEffect = v7;
    if ( v7 )
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)v2,
        (void **)&pkEffect);
    std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Eqrange(
      (std::_Tree<std::_Tset_traits<NiAVObject *,std::less<NiAVObject *>,std::allocator<NiAVObject *>,0> > *)&v2->m_setEffectHandle,
      &result,
      (NiAVObject *const *)&pkEff);
    std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::erase(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v2->m_setEffectHandle,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *)&pkEffect,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >)result.first._Ptr,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >)result.second._Ptr);
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  }
}

//----- (006937E0) --------------------------------------------------------
void __thiscall EffectMgr::RemoveClientEff(EffectMgr *this, unsigned int uiEffType)
{
  EffectMgr *v2; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v3; // esi@1
  unsigned int v4; // ecx@3
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v5; // eax@6
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *j; // eax@7
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *i; // eax@10
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > >,std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > > > result; // [sp+Ch] [bp-Ch]@1
  unsigned int _Off; // [sp+14h] [bp-4h]@1

  v2 = this;
  std::_Tree<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Effect *>>,1>>::_Eqrange(
    (std::_Tree<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > *)&this->m_kClientEffectMap.comp,
    &result,
    &uiEffType);
  _Off = 0;
  std::_Distance2<std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<enum  ItemEquipEnum,NiNode *,std::less<enum  ItemEquipEnum>,std::allocator<std::pair<enum  ItemEquipEnum const,NiNode *>>,1>>>,unsigned int>(
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > >)result.first._Ptr,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<enum ItemEquipEnum,NiNode *,std::less<enum ItemEquipEnum>,std::allocator<std::pair<enum ItemEquipEnum const ,NiNode *> >,1> > >)result.second._Ptr,
    &_Off);
  v3 = std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::find(
         (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->m_kClientEffectMap,
         (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&result.second,
         &uiEffType)->_Ptr;
  if ( (signed int)_Off > 0 )
  {
    do
    {
      if ( v3 != (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v2->m_kClientEffectMap._Myhead )
      {
        v4 = v3->_Myval.second;
        if ( v4 )
          (*(void (**)(void))(*(_DWORD *)v4 + 64))();
      }
      if ( !v3->_Isnil )
      {
        v5 = v3->_Right;
        if ( v5->_Isnil )
        {
          for ( i = v3->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v3 != i->_Right )
              break;
            v3 = i;
          }
          v3 = i;
        }
        else
        {
          v3 = v3->_Right;
          for ( j = v5->_Left; !j->_Isnil; j = j->_Left )
            v3 = j;
        }
      }
      --_Off;
    }
    while ( _Off );
  }
  std::_Tree<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Effect *>>,1>>::_Eqrange(
    (std::_Tree<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > *)&v2->m_kClientEffectMap.comp,
    &result,
    &uiEffType);
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->m_kClientEffectMap,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&uiEffType,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >)result.first._Ptr,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >)result.second._Ptr);
}

//----- (006938C0) --------------------------------------------------------
void __thiscall EffectMgr::Update(EffectMgr *this, float fTime)
{
  EffectMgr *v2; // ebx@1
  NiTListItem<Effect *> *v3; // edi@1
  Effect *v4; // esi@2
  NiTListItem<Effect *> *v5; // eax@3
  NiTListItem<Effect *> *v6; // eax@9
  NiTListItem<Effect *> *v7; // ecx@9
  Effect *v8; // edi@12
  NiTListItem<Effect *> **v9; // eax@12
  Effect **v10; // ecx@13
  NiTListItem<Effect *> **v11; // edx@13
  Effect *v12; // esi@17
  NiTListItem<Effect *> *v13; // eax@18
  int v14; // edx@22
  int v15; // ecx@22
  int v16; // eax@22
  int *v17; // eax@29
  NiTListItem<NiPointer<Effect> > *v18; // esi@32
  Effect *v19; // eax@33
  NiTListItem<Effect *> *v20; // eax@39
  NiTListItem<Effect *> *v21; // ecx@39
  Effect *v22; // edi@42
  NiTListItem<Effect *> **v23; // eax@42
  Effect **v24; // ecx@43
  NiTListItem<Effect *> **v25; // edx@43
  NiTListItem<NiPointer<Effect> > *v26; // esi@48
  Effect *v27; // eax@49
  NiTListItem<Effect *> *v28; // esi@52
  void *(__thiscall *v29)(NiRefObject *, unsigned int); // eax@53
  NiTListItem<Effect *> *v30; // esi@54
  NiTListItem<Effect *> *v31; // ST14_4@55
  NiTListItem<Effect *> *v32; // esi@56
  NiTListItem<Effect *> *v33; // ST14_4@57
  NiTList<Effect *> kChainEffectList; // [sp+28h] [bp-34h]@1
  NiTList<Effect *> kDeadEffectList; // [sp+38h] [bp-24h]@1
  int v36; // [sp+48h] [bp-14h]@30
  int v37; // [sp+4Ch] [bp-10h]@27
  int v38; // [sp+58h] [bp-4h]@1

  v2 = this;
  kChainEffectList.m_kAllocator.m_uiCount = 0;
  kChainEffectList.m_pkHead = 0;
  kChainEffectList.m_pkTail = 0;
  kChainEffectList.vfptr = (NiTListBase<DFALL<Effect *>,Effect *>Vtbl *)&NiTList<Effect *>::`vftable';
  v38 = 0;
  kDeadEffectList.m_kAllocator.m_uiCount = 0;
  kDeadEffectList.m_pkHead = 0;
  kDeadEffectList.m_pkTail = 0;
  kDeadEffectList.vfptr = (NiTListBase<DFALL<Effect *>,Effect *>Vtbl *)&NiTList<Effect *>::`vftable';
  v3 = this->m_kList.m_pkHead;
  LOBYTE(v38) = 1;
  if ( v3 )
  {
    do
    {
      v4 = v3->m_element;
      v3 = v3->m_pkNext;
      if ( (unsigned __int8)v4->vfptr[19].__vecDelDtor((NiRefObject *)v4, LODWORD(fTime)) )
      {
        v5 = kDeadEffectList.vfptr->NewItem((NiTListBase<DFALL<Effect *>,Effect *> *)&kDeadEffectList);
        v5->m_element = v4;
        v5->m_pkNext = 0;
        v5->m_pkPrev = kDeadEffectList.m_pkTail;
        if ( kDeadEffectList.m_pkTail )
          kDeadEffectList.m_pkTail->m_pkNext = v5;
        else
          kDeadEffectList.m_pkHead = v5;
        ++kDeadEffectList.m_kAllocator.m_uiCount;
        kDeadEffectList.m_pkTail = v5;
      }
    }
    while ( v3 );
    while ( kDeadEffectList.m_kAllocator.m_uiCount )
    {
      v6 = kDeadEffectList.m_pkTail;
      v7 = kDeadEffectList.m_pkTail->m_pkPrev;
      kDeadEffectList.m_pkTail = v7;
      if ( v7 )
        v7->m_pkNext = 0;
      else
        kDeadEffectList.m_pkHead = 0;
      v8 = v6->m_element;
      kDeadEffectList.vfptr->DeleteItem((NiTListBase<DFALL<Effect *>,Effect *> *)&kDeadEffectList, v6);
      v9 = &v2->m_kList.m_pkHead->m_pkNext;
      --kDeadEffectList.m_kAllocator.m_uiCount;
      if ( v9 )
      {
        while ( 1 )
        {
          v10 = (Effect **)(v9 + 2);
          v11 = v9;
          v9 = (NiTListItem<Effect *> **)*v9;
          if ( v8 == *v10 )
            break;
          if ( !v9 )
            goto LABEL_37;
        }
        if ( v11 )
        {
          v12 = v8->m_pkChainEffect;
          if ( v12 )
          {
            v13 = kChainEffectList.vfptr->NewItem((NiTListBase<DFALL<Effect *>,Effect *> *)&kChainEffectList);
            v13->m_element = v12;
            v13->m_pkNext = 0;
            v13->m_pkPrev = kChainEffectList.m_pkTail;
            if ( kChainEffectList.m_pkTail )
              kChainEffectList.m_pkTail->m_pkNext = v13;
            else
              kChainEffectList.m_pkHead = v13;
            ++kChainEffectList.m_kAllocator.m_uiCount;
            kChainEffectList.m_pkTail = v13;
            v8->m_pkChainEffect = 0;
          }
          v14 = (int)v2->m_setEffectHandle._Myhead;
          v15 = (int)v2->m_setEffectHandle._Myhead;
          v16 = *(_DWORD *)(v15 + 4);
          while ( !*(_BYTE *)(v16 + 17) )
          {
            if ( *(_DWORD *)(v16 + 12) >= (unsigned int)v8 )
            {
              v15 = v16;
              v16 = *(_DWORD *)v16;
            }
            else
            {
              v16 = *(_DWORD *)(v16 + 8);
            }
          }
          v37 = v15;
          if ( v15 == v14 || (unsigned int)v8 < *(_DWORD *)(v15 + 12) )
          {
            v36 = v14;
            v17 = &v36;
          }
          else
          {
            v17 = &v37;
          }
          if ( *v17 != v14 )
          {
            v18 = v8->m_kChildList.m_pkHead;
            while ( v18 )
            {
              v19 = v18->m_element.m_pObject;
              v18 = v18->m_pkNext;
              EffectMgr::DetachEffectFromWorld(v2, v19);
            }
            World::DetachEffect(&g_kWorld, v8->m_spNode.m_pObject);
          }
          v8->vfptr[20].__vecDelDtor((NiRefObject *)v8, LODWORD(fTime));
          EffectMgr::Remove(v2, v8);
          if ( v2->m_pGuildAcademyMasterEffect == v8 )
            v2->m_pGuildAcademyMasterEffect = 0;
        }
      }
LABEL_37:
      ;
    }
    while ( kChainEffectList.m_kAllocator.m_uiCount )
    {
      v20 = kChainEffectList.m_pkHead;
      v21 = kChainEffectList.m_pkHead->m_pkNext;
      kChainEffectList.m_pkHead = v21;
      if ( v21 )
        v21->m_pkPrev = 0;
      else
        kChainEffectList.m_pkTail = 0;
      v22 = v20->m_element;
      kChainEffectList.vfptr->DeleteItem((NiTListBase<DFALL<Effect *>,Effect *> *)&kChainEffectList, v20);
      v23 = &v2->m_kList.m_pkHead->m_pkNext;
      --kChainEffectList.m_kAllocator.m_uiCount;
      if ( v23 )
      {
        while ( 1 )
        {
          v24 = (Effect **)(v23 + 2);
          v25 = v23;
          v23 = (NiTListItem<Effect *> **)*v23;
          if ( v22 == *v24 )
            break;
          if ( !v23 )
            goto LABEL_51;
        }
        if ( v25 && v22 )
        {
          v26 = v22->m_kChildList.m_pkHead;
          while ( v26 )
          {
            v27 = v26->m_element.m_pObject;
            v26 = v26->m_pkNext;
            EffectMgr::AttachEffectToWorld(v2, v27);
          }
          World::AttachEffect(&g_kWorld, v22->m_spNode.m_pObject);
          v22->vfptr[15].__vecDelDtor((NiRefObject *)v22, LODWORD(Timer::ms_fCurTime));
        }
      }
LABEL_51:
      ;
    }
  }
  v28 = v2->m_kList.m_pkHead;
  while ( v28 )
  {
    v29 = v28->m_element->vfptr[14].__vecDelDtor;
    v28 = v28->m_pkNext;
    ((void (__stdcall *)(_DWORD))v29)(LODWORD(fTime));
  }
  kDeadEffectList.vfptr = (NiTListBase<DFALL<Effect *>,Effect *>Vtbl *)&NiTPointerListBase<DFALL<Effect *>,Effect *>::`vftable';
  v30 = kDeadEffectList.m_pkHead;
  LOBYTE(v38) = 2;
  if ( kDeadEffectList.m_pkHead )
  {
    do
    {
      v31 = v30;
      v30 = v30->m_pkNext;
      kDeadEffectList.vfptr->DeleteItem((NiTListBase<DFALL<Effect *>,Effect *> *)&kDeadEffectList, v31);
    }
    while ( v30 );
  }
  kDeadEffectList.m_kAllocator.m_uiCount = 0;
  kDeadEffectList.m_pkHead = 0;
  kDeadEffectList.m_pkTail = 0;
  kDeadEffectList.vfptr = (NiTListBase<DFALL<Effect *>,Effect *>Vtbl *)&NiTListBase<DFALL<Effect *>,Effect *>::`vftable';
  kChainEffectList.vfptr = (NiTListBase<DFALL<Effect *>,Effect *>Vtbl *)&NiTPointerListBase<DFALL<Effect *>,Effect *>::`vftable';
  v32 = kChainEffectList.m_pkHead;
  v38 = 3;
  if ( kChainEffectList.m_pkHead )
  {
    do
    {
      v33 = v32;
      v32 = v32->m_pkNext;
      kChainEffectList.vfptr->DeleteItem((NiTListBase<DFALL<Effect *>,Effect *> *)&kChainEffectList, v33);
    }
    while ( v32 );
  }
}
// 9BD184: using guessed type int (__thiscall *NiTListBase<DFALL<Effect *>,Effect *>::`vftable')(void *p, char);
// 9BD1AC: using guessed type int (__thiscall *NiTPointerListBase<DFALL<Effect *>,Effect *>::`vftable')(void *p, char);
// 9BD1BC: using guessed type int (__thiscall *NiTList<Effect *>::`vftable')(void *p, char);
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00693BE0) --------------------------------------------------------
void __thiscall EffectMgr::RemoveEffect(EffectMgr *this, Effect *pkEffect)
{
  EffectMgr *v2; // esi@1

  v2 = this;
  if ( pkEffect )
  {
    EffectMgr::DetachEffectFromWorld(this, pkEffect);
    EffectMgr::Remove(v2, pkEffect);
  }
}

//----- (00693C10) --------------------------------------------------------
void __thiscall EffectMgr::EffectMgr(EffectMgr *this)
{
  EffectMgr *v1; // esi@1
  std::_Tree_nod<std::_Tset_traits<Effect *,std::less<Effect *>,std::allocator<Effect *>,0> >::_Node *v2; // eax@1
  char *v3; // eax@2
  unsigned int v4; // ST0C_4@2
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> >::_Node *v5; // eax@2
  NiTexturePalette *v6; // eax@3
  std::exception pExceptionObject; // [sp+10h] [bp-24h]@9
  EffectMgr *v8; // [sp+1Ch] [bp-18h]@1
  char *_What; // [sp+20h] [bp-14h]@9
  NiTexturePalette *v10; // [sp+24h] [bp-10h]@3
  int v11; // [sp+30h] [bp-4h]@1

  v1 = this;
  v8 = this;
  this->m_kList.m_kAllocator.m_uiCount = 0;
  this->m_kList.m_pkHead = 0;
  this->m_kList.m_pkTail = 0;
  this->m_kList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>Vtbl *)&PgTList<Effect *>::`vftable';
  v11 = 0;
  this->m_setEffectHandle._Mysize = 0;
  v2 = (std::_Tree_nod<std::_Tset_traits<Effect *,std::less<Effect *>,std::allocator<Effect *>,0> >::_Node *)operator new(0x14u);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_setEffectHandle._Myhead = v2;
  v2->_Left = v2;
  v1->m_setEffectHandle._Myhead->_Parent = v1->m_setEffectHandle._Myhead;
  v1->m_setEffectHandle._Myhead->_Right = v1->m_setEffectHandle._Myhead;
  v1->m_setEffectHandle._Myhead->_Color = 1;
  v1->m_setEffectHandle._Myhead->_Isnil = 1;
  v1->m_kEffNodeMap.m_uiHashSize = 37;
  LOBYTE(v11) = 1;
  v1->m_kEffNodeMap.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode> >Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode>>::`vftable';
  v1->m_kEffNodeMap.m_kAllocator.m_uiCount = 0;
  v3 = (char *)operator new[](0x94u);
  v4 = 4 * v1->m_kEffNodeMap.m_uiHashSize;
  v1->m_kEffNodeMap.m_ppkHashTable = (NiTMapItem<char const *,NiPointer<NiNode> > **)v3;
  memset(v3, 0, v4);
  v1->m_kEffNodeMap.m_bCopy = 1;
  v1->m_kEffNodeMap.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode> >Vtbl *)&NiTStringPointerMap<NiPointer<NiNode>>::`vftable';
  v1->m_spTexturePalette.m_pObject = 0;
  v1->m_kAbsateAniVec._Myfirst = 0;
  v1->m_kAbsateAniVec._Mylast = 0;
  v1->m_kAbsateAniVec._Myend = 0;
  LOBYTE(v11) = 4;
  v1->m_kClientEffectMap._Mysize = 0;
  v5 = (std::_Tree_nod<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> >::_Node *)operator new(0x18u);
  if ( !v5 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_kClientEffectMap._Myhead = v5;
  v5->_Left = v5;
  v1->m_kClientEffectMap._Myhead->_Parent = v1->m_kClientEffectMap._Myhead;
  v1->m_kClientEffectMap._Myhead->_Right = v1->m_kClientEffectMap._Myhead;
  v1->m_kClientEffectMap._Myhead->_Color = 1;
  v1->m_kClientEffectMap._Myhead->_Isnil = 1;
  v6 = v1->m_spTexturePalette.m_pObject;
  LOBYTE(v11) = 5;
  v10 = v6;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v10 )
      ((void (__stdcall *)(signed int))v10->vfptr->__vecDelDtor)(1);
    v1->m_spTexturePalette.m_pObject = 0;
  }
  v1->m_pGuildAcademyMasterEffect = 0;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9BADE0: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiNode>>::`vftable')(void *p, char);
// 9BAEC8: using guessed type int (__thiscall *NiTStringPointerMap<NiPointer<NiNode>>::`vftable')(void *p, char);
// 9BD1CC: using guessed type int (__thiscall *PgTList<Effect *>::`vftable')(void *p, char);

//----- (00693DA0) --------------------------------------------------------
void __thiscall EffectMgr::~EffectMgr(EffectMgr *this)
{
  EffectMgr *v1; // esi@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v2; // ST08_4@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v3; // ST04_4@1
  NiTexturePalette *v4; // edi@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > v5; // ST08_4@7
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > v6; // ST04_4@7
  NiTListItem<Effect *> **v7; // edi@7
  NiTListItem<Effect *> *v8; // ST08_4@8
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > result; // [sp+10h] [bp-18h]@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > v10; // [sp+14h] [bp-14h]@1
  EffectMgr *v11; // [sp+18h] [bp-10h]@1
  int v12; // [sp+24h] [bp-4h]@1

  v1 = this;
  v11 = this;
  v12 = 5;
  AfterImgEff::ClearResourceMap();
  v10._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)&v1->m_kClientEffectMap;
  v2._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_kClientEffectMap._Myhead;
  v3._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_kClientEffectMap._Myhead->_Left;
  LOBYTE(v12) = 6;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_kClientEffectMap,
    &result,
    v3,
    v2);
  operator delete(v1->m_kClientEffectMap._Myhead);
  if ( v1->m_kAbsateAniVec._Myfirst )
    operator delete(v1->m_kAbsateAniVec._Myfirst);
  v1->m_kAbsateAniVec._Myfirst = 0;
  v1->m_kAbsateAniVec._Mylast = 0;
  v1->m_kAbsateAniVec._Myend = 0;
  v4 = v1->m_spTexturePalette.m_pObject;
  LOBYTE(v12) = 2;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  LOBYTE(v12) = 1;
  NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiNode>>,NiPointer<NiNode>>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiNode>>,NiPointer<NiNode>>((NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiNode> >,NiPointer<NiNode> > *)&v1->m_kEffNodeMap.vfptr);
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_setEffectHandle;
  v5._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v1->m_setEffectHandle._Myhead;
  v6._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v1->m_setEffectHandle._Myhead->_Left;
  LOBYTE(v12) = 7;
  std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::erase(
    (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v1->m_setEffectHandle,
    &v10,
    v6,
    v5);
  operator delete(v1->m_setEffectHandle._Myhead);
  v1->m_kList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>Vtbl *)&PgTList<Effect *>::`vftable';
  v7 = &v1->m_kList.m_pkHead->m_pkNext;
  v12 = 8;
  while ( v7 )
  {
    v8 = (NiTListItem<Effect *> *)v7;
    v7 = (NiTListItem<Effect *> **)*v7;
    v1->m_kList.vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,Effect *> *)v1, v8);
  }
  v1->m_kList.m_kAllocator.m_uiCount = 0;
  v1->m_kList.m_pkHead = 0;
  v1->m_kList.m_pkTail = 0;
  v1->m_kList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>::`vftable';
}
// 9BD174: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>::`vftable')(void *p, char);
// 9BD1CC: using guessed type int (__thiscall *PgTList<Effect *>::`vftable')(void *p, char);

//----- (00693ED0) --------------------------------------------------------
void __thiscall EffectMgr::RemoveAll(EffectMgr *this)
{
  EffectMgr *v1; // edi@1
  void **v2; // ecx@1
  void *v3; // ebx@4
  int v4; // edx@5
  int v5; // ecx@5
  int v6; // eax@5
  int *v7; // eax@12
  int v8; // esi@15
  Effect *v9; // edx@16
  NiTListItem<Effect *> **v10; // esi@20
  NiTListItem<Effect *> *v11; // ST04_4@21
  EffectMgr::AbstateAni *v12; // ecx@22
  int v15; // [sp+8h] [bp-Ch]@13
  int v16; // [sp+Ch] [bp-8h]@10
  void *kIter; // [sp+10h] [bp-4h]@3

  v1 = this;
  v2 = (void **)&this->m_kList.m_pkHead->m_pkNext;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = v2[2];
      kIter = *v2;
      if ( v3 )
      {
        v4 = (int)v1->m_setEffectHandle._Myhead;
        v5 = (int)v1->m_setEffectHandle._Myhead;
        v6 = *(_DWORD *)(v5 + 4);
        while ( !*(_BYTE *)(v6 + 17) )
        {
          if ( *(_DWORD *)(v6 + 12) >= (unsigned int)v3 )
          {
            v5 = v6;
            v6 = *(_DWORD *)v6;
          }
          else
          {
            v6 = *(_DWORD *)(v6 + 8);
          }
        }
        v16 = v5;
        if ( v5 == v4 || (unsigned int)v3 < *(_DWORD *)(v5 + 12) )
        {
          v15 = v4;
          v7 = &v15;
        }
        else
        {
          v7 = &v16;
        }
        if ( *v7 != v4 )
        {
          v8 = *((_DWORD *)v3 + 32);
          while ( v8 )
          {
            v9 = *(Effect **)(v8 + 8);
            v8 = *(_DWORD *)v8;
            EffectMgr::DetachEffectFromWorld(v1, v9);
          }
          World::DetachEffect(&g_kWorld, *((NiNode **)v3 + 21));
        }
        (**(void (__thiscall ***)(void *, signed int))v3)(v3, 1);
      }
      if ( !kIter )
        break;
      v2 = (void **)kIter;
    }
  }
  v10 = &v1->m_kList.m_pkHead->m_pkNext;
  while ( v10 )
  {
    v11 = (NiTListItem<Effect *> *)v10;
    v10 = (NiTListItem<Effect *> **)*v10;
    v1->m_kList.vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,Effect *> *)v1, v11);
  }
  v1->m_kList.m_kAllocator.m_uiCount = 0;
  v1->m_kList.m_pkHead = 0;
  v1->m_kList.m_pkTail = 0;
  std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,unsigned short>>,0>>::clear((std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v1->m_setEffectHandle);
  v12 = v1->m_kAbsateAniVec._Myfirst;
  if ( v12 != v1->m_kAbsateAniVec._Mylast )
    v1->m_kAbsateAniVec._Mylast = v12;
  EffectMgr::RemoveAllClientEff(v1);
}

//----- (00694000) --------------------------------------------------------
void __thiscall EffectMgr::Terminate(EffectMgr *this)
{
  EffectMgr *v1; // esi@1
  NiTexturePalette *v2; // edi@1
  EffectMgr::AbstateAni *v3; // ecx@6

  v1 = this;
  v2 = this->m_spTexturePalette.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spTexturePalette.m_pObject = 0;
  }
  EffectMgr::RemoveAll(v1);
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&v1->m_kEffNodeMap);
  v3 = v1->m_kAbsateAniVec._Myfirst;
  if ( v3 != v1->m_kAbsateAniVec._Mylast )
    v1->m_kAbsateAniVec._Mylast = v3;
  EffectMgr::RemoveAllClientEff(v1);
}

//----- (00694080) --------------------------------------------------------
void __thiscall EffectMgr::SetAbstateInform(EffectMgr *this, ABSTATE_INFORMATION *pkAbstateInform, unsigned __int16 TargetHandle)
{
  ABSTATEINDEX v3; // eax@1
  unsigned int v4; // edx@1
  EffectMgr *v5; // esi@1
  std::vector<EffectMgr::AbstateAni,std::allocator<EffectMgr::AbstateAni> > *v6; // ecx@3
  EffectMgr *v7; // edi@4
  EffectMgr::AbstateAni *v8; // eax@5
  char v9; // dl@5
  EffectMgr *v10; // [sp+Ch] [bp-18h]@1
  EffectMgr::AbstateAni kAbstateAni; // [sp+10h] [bp-14h]@1

  v3 = pkAbstateInform->abstateID;
  v4 = pkAbstateInform->strength;
  v5 = this;
  kAbstateAni.kAbstateInfom.restKeeptime = pkAbstateInform->restKeeptime;
  kAbstateAni.kAbstateInfom.abstateID = v3;
  v10 = this;
  kAbstateAni.kAbstateInfom.strength = v4;
  kAbstateAni.kTarget = TargetHandle;
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
    AbnormalStateInfoTab::GetByAbstateIndex(pkAbstateInform->abstateID);
  v6 = &v5->m_kAbsateAniVec;
  if ( v5->m_kAbsateAniVec._Mylast - v5->m_kAbsateAniVec._Myfirst )
  {
    v8 = v5->m_kAbsateAniVec._Myfirst;
    v7 = v10;
    v9 = 0;
    if ( v8 == v10->m_kAbsateAniVec._Mylast )
      goto LABEL_15;
    do
    {
      if ( v8->kAbstateInfom.abstateID == pkAbstateInform->abstateID && v8->kTarget == TargetHandle )
      {
        v8->kAbstateInfom.restKeeptime = kAbstateAni.kAbstateInfom.restKeeptime;
        v8->kAbstateInfom.strength = kAbstateAni.kAbstateInfom.strength;
        v8->kTarget = TargetHandle;
        v9 = 1;
      }
      ++v8;
    }
    while ( v8 != v10->m_kAbsateAniVec._Mylast );
    if ( !v9 )
LABEL_15:
      std::vector<EffectMgr::AbstateAni,std::allocator<EffectMgr::AbstateAni>>::push_back(v6, &kAbstateAni);
  }
  else
  {
    std::vector<EffectMgr::AbstateAni,std::allocator<EffectMgr::AbstateAni>>::push_back(v6, &kAbstateAni);
    v7 = v10;
  }
  EffectMgr::FindEffectAbstateCtrlAni(v7, TargetHandle, pkAbstateInform->abstateID);
}

//----- (00694170) --------------------------------------------------------
void __thiscall AttachEff::SetTargetNode(AttachEff *this, NiNode *_pNode, IEffectHolder *pkEffHolder)
{
  AttachEff *v3; // edi@1
  NiNode *v4; // esi@1

  v3 = this;
  v4 = this->m_spkTargetNode.m_pObject;
  if ( v4 != _pNode )
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v3->m_spkTargetNode.m_pObject = _pNode;
    if ( _pNode )
      InterlockedIncrement((volatile LONG *)&_pNode->m_uiRefCount);
  }
  v3->m_pkEffectHolder = pkEffHolder;
  if ( pkEffHolder )
    IEffectHolder::AddAttachEffect(pkEffHolder, v3);
}

//----- (006941E0) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,Effect *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,Effect *>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,Effect *> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,Effect *> *v2; // edi@1
  NiTListItem<Effect *> *v3; // esi@1
  NiTListItem<Effect *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,Effect *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,Effect *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BD174: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>::`vftable')(void *p, char);
// 9BD19C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,Effect *>::`vftable')(void *p, char);

//----- (00694270) --------------------------------------------------------
void __thiscall NiTPointerList<Effect *>::~NiTPointerList<Effect *>(NiTPointerList<Effect *> *this)
{
  NiTPointerList<Effect *> *v1; // edi@1
  NiTListItem<Effect *> *v2; // esi@1
  NiTListItem<Effect *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,Effect *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,Effect *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>::`vftable';
}
// 9BD174: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>::`vftable')(void *p, char);
// 9BD19C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,Effect *>::`vftable')(void *p, char);

//----- (006942F0) --------------------------------------------------------
void __thiscall NiTList<Effect *>::~NiTList<Effect *>(NiTList<Effect *> *this)
{
  NiTList<Effect *> *v1; // edi@1
  NiTListItem<Effect *> *v2; // esi@1
  NiTListItem<Effect *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<DFALL<Effect *>,Effect *>Vtbl *)&NiTPointerListBase<DFALL<Effect *>,Effect *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<DFALL<Effect *>,Effect *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<DFALL<Effect *>,Effect *>Vtbl *)&NiTListBase<DFALL<Effect *>,Effect *>::`vftable';
}
// 9BD184: using guessed type int (__thiscall *NiTListBase<DFALL<Effect *>,Effect *>::`vftable')(void *p, char);
// 9BD1AC: using guessed type int (__thiscall *NiTPointerListBase<DFALL<Effect *>,Effect *>::`vftable')(void *p, char);

//----- (00694370) --------------------------------------------------------
NiTPointerListBase<DFALL<Effect *>,Effect *> *__thiscall NiTPointerListBase<DFALL<Effect *>,Effect *>::`scalar deleting destructor'(NiTPointerListBase<DFALL<Effect *>,Effect *> *this, unsigned int a2)
{
  NiTPointerListBase<DFALL<Effect *>,Effect *> *v2; // edi@1
  NiTListItem<Effect *> *v3; // esi@1
  NiTListItem<Effect *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<Effect *>,Effect *>Vtbl *)&NiTPointerListBase<DFALL<Effect *>,Effect *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<DFALL<Effect *>,Effect *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<Effect *>,Effect *>Vtbl *)&NiTListBase<DFALL<Effect *>,Effect *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BD184: using guessed type int (__thiscall *NiTListBase<DFALL<Effect *>,Effect *>::`vftable')(void *p, char);
// 9BD1AC: using guessed type int (__thiscall *NiTPointerListBase<DFALL<Effect *>,Effect *>::`vftable')(void *p, char);

//----- (00694400) --------------------------------------------------------
EffectMgr::AbstateAni *__stdcall std::allocator<EffectMgr::AbstateAni>::allocate(unsigned int _Count)
{
  EffectMgr::AbstateAni *result; // eax@1
  std::exception pExceptionObject; // [sp+0h] [bp-Ch]@4

  result = 0;
  if ( _Count )
  {
    if ( _Count > 0x12492492 || (result = (EffectMgr::AbstateAni *)operator new(14 * _Count)) == 0 )
    {
      _Count = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&_Count);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
  }
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00694460) --------------------------------------------------------
SubAbStateInfo *__cdecl SubAbStateInfoTab::GetByStrInxName(char *pcInxName, unsigned int Str)
{
  unsigned int v2; // edi@3
  SubAbStateInfo *result; // eax@7

  if ( pcInxName && *pcInxName )
  {
    v2 = 0;
    if ( ITableBase<SubAbStateInfo,SubAbStateInfoTab>::GetTotal() )
    {
      while ( strcmp(
                CDataReader::GetRecord(
                  (CDataReader *)(ITableBase<SubAbStateInfo,SubAbStateInfoTab>::ms_pkTable + 4),
                  v2)
              + 2,
                pcInxName)
           || *(_DWORD *)(CDataReader::GetRecord(
                            (CDataReader *)(ITableBase<SubAbStateInfo,SubAbStateInfoTab>::ms_pkTable + 4),
                            v2)
                        + 34) != Str )
      {
        if ( ++v2 >= ITableBase<SubAbStateInfo,SubAbStateInfoTab>::GetTotal() )
          goto LABEL_7;
      }
      result = (SubAbStateInfo *)CDataReader::GetRecord(
                                   (CDataReader *)(ITableBase<SubAbStateInfo,SubAbStateInfoTab>::ms_pkTable + 4),
                                   v2);
    }
    else
    {
LABEL_7:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C2A8: using guessed type int ITableBase<SubAbStateInfo,SubAbStateInfoTab>::ms_pkTable;

//----- (00694510) --------------------------------------------------------
void __thiscall PgTList<Effect *>::~PgTList<Effect *>(PgTList<Effect *> *this)
{
  PgTList<Effect *> *v1; // edi@1
  NiTListItem<Effect *> *v2; // esi@1
  NiTListItem<Effect *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>Vtbl *)&PgTList<Effect *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,Effect *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>::`vftable';
}
// 9BD174: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>::`vftable')(void *p, char);
// 9BD1CC: using guessed type int (__thiscall *PgTList<Effect *>::`vftable')(void *p, char);

//----- (00694590) --------------------------------------------------------
PgTList<Effect *> *__thiscall PgTList<Effect *>::`vector deleting destructor'(PgTList<Effect *> *this, unsigned int a2)
{
  PgTList<Effect *> *v2; // edi@1
  NiTListItem<Effect *> *v3; // esi@1
  NiTListItem<Effect *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>Vtbl *)&PgTList<Effect *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,Effect *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BD174: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,Effect *>::`vftable')(void *p, char);
// 9BD1CC: using guessed type int (__thiscall *PgTList<Effect *>::`vftable')(void *p, char);

//----- (00694620) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > >,std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,Effect *>>,1>>::_Eqrange(std::_Tree<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > >,std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > > > *result, const unsigned int *_Keyval)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> >::_Node *v3; // edx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> >::_Node *v4; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> >::_Node *v5; // ebx@1
  unsigned int v6; // edi@2
  unsigned int v7; // esi@3
  std::_Tree_nod<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> >::_Node *v8; // eax@11
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > >,std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,Effect *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,Effect *> >,1> > > > *v9; // eax@18

  v3 = this->_Myhead;
  v4 = v3->_Parent;
  v5 = this->_Myhead;
  if ( !v4->_Isnil )
  {
    v6 = *_Keyval;
    do
    {
      v7 = v4->_Myval.first;
      if ( v7 >= v6 )
      {
        if ( v3->_Isnil && v6 < v7 )
          v3 = v4;
        v5 = v4;
        v4 = v4->_Left;
      }
      else
      {
        v4 = v4->_Right;
      }
    }
    while ( !v4->_Isnil );
  }
  if ( v3->_Isnil )
    v8 = this->_Myhead->_Parent;
  else
    v8 = v3->_Left;
  while ( !v8->_Isnil )
  {
    if ( *_Keyval >= v8->_Myval.first )
    {
      v8 = v8->_Right;
    }
    else
    {
      v3 = v8;
      v8 = v8->_Left;
    }
  }
  v9 = result;
  result->first._Ptr = v5;
  result->second._Ptr = v3;
  return v9;
}

//----- (006946B0) --------------------------------------------------------
EffectMgr::AbstateAni *__cdecl std::_Uninit_move<EffectMgr::AbstateAni *,EffectMgr::AbstateAni *,std::allocator<EffectMgr::AbstateAni>,EffectMgr::AbstateAni>(EffectMgr::AbstateAni *_First, EffectMgr::AbstateAni *_Last, EffectMgr::AbstateAni *_Dest)
{
  EffectMgr::AbstateAni *v3; // ecx@1
  EffectMgr::AbstateAni *result; // eax@1

  v3 = _First;
  for ( result = _Dest; v3 != _Last; ++result )
  {
    if ( result )
    {
      result->kAbstateInfom.abstateID = v3->kAbstateInfom.abstateID;
      result->kAbstateInfom.restKeeptime = v3->kAbstateInfom.restKeeptime;
      result->kAbstateInfom.strength = v3->kAbstateInfom.strength;
      result->kTarget = v3->kTarget;
    }
    ++v3;
  }
  return result;
}

//----- (006946F0) --------------------------------------------------------
void __thiscall std::vector<EffectMgr::AbstateAni,std::allocator<EffectMgr::AbstateAni>>::reserve(std::vector<EffectMgr::AbstateAni,std::allocator<EffectMgr::AbstateAni> > *this, unsigned int _Count)
{
  std::vector<EffectMgr::AbstateAni,std::allocator<EffectMgr::AbstateAni> > *v2; // esi@1
  EffectMgr::AbstateAni *v3; // eax@4
  EffectMgr::AbstateAni *v4; // ST04_4@4
  EffectMgr::AbstateAni *v5; // ST00_4@4
  unsigned int v6; // edx@4
  int v7; // edi@4
  EffectMgr::AbstateAni *v8; // eax@6
  int v9; // [sp+0h] [bp-24h]@1
  EffectMgr::AbstateAni *_Ptr; // [sp+10h] [bp-14h]@4
  int *v11; // [sp+14h] [bp-10h]@1
  int v12; // [sp+20h] [bp-4h]@4

  v11 = &v9;
  v2 = this;
  if ( _Count > 0x12492492 )
    std::_Xlength_error("vector<T> too long");
  if ( this->_Myend - this->_Myfirst < _Count )
  {
    v3 = std::allocator<EffectMgr::AbstateAni>::allocate(_Count);
    v4 = v2->_Mylast;
    v5 = v2->_Myfirst;
    _Ptr = v3;
    v12 = 0;
    std::_Uninit_move<EffectMgr::AbstateAni *,EffectMgr::AbstateAni *,std::allocator<EffectMgr::AbstateAni>,EffectMgr::AbstateAni>(
      v5,
      v4,
      v3);
    v6 = (signed int)((char *)v2->_Mylast
                    - (char *)v2->_Myfirst
                    + ((unsigned __int64)(-1840700269i64 * (unsigned int)((char *)v2->_Mylast - (char *)v2->_Myfirst)) >> 32)) >> 3;
    v7 = v6 + (v6 >> 31);
    if ( v2->_Myfirst )
      operator delete(v2->_Myfirst);
    v8 = _Ptr;
    v2->_Myend = &_Ptr[_Count];
    v2->_Mylast = &v8[v7];
    v2->_Myfirst = v8;
  }
}

//----- (00694800) --------------------------------------------------------
void __thiscall std::vector<EffectMgr::AbstateAni,std::allocator<EffectMgr::AbstateAni>>::_Reserve(std::vector<EffectMgr::AbstateAni,std::allocator<EffectMgr::AbstateAni> > *this, unsigned int _Count)
{
  unsigned int v2; // esi@1
  unsigned int v3; // esi@3
  unsigned int v4; // eax@3
  unsigned int v5; // eax@5

  v2 = this->_Mylast - this->_Myfirst;
  if ( 306783378 - _Count < v2 )
    std::_Xlength_error("vector<T> too long");
  v3 = _Count + v2;
  v4 = this->_Myend - this->_Myfirst;
  if ( v3 > v4 )
  {
    if ( 306783378 - (v4 >> 1) >= v4 )
      v5 = (v4 >> 1) + v4;
    else
      v5 = 0;
    if ( v5 < v3 )
      v5 = v3;
    std::vector<EffectMgr::AbstateAni,std::allocator<EffectMgr::AbstateAni>>::reserve(this, v5);
  }
}

//----- (00694880) --------------------------------------------------------
void __thiscall std::vector<EffectMgr::AbstateAni,std::allocator<EffectMgr::AbstateAni>>::push_back(std::vector<EffectMgr::AbstateAni,std::allocator<EffectMgr::AbstateAni> > *this, EffectMgr::AbstateAni *_Val)
{
  std::vector<EffectMgr::AbstateAni,std::allocator<EffectMgr::AbstateAni> > *v2; // edi@1
  EffectMgr::AbstateAni *v3; // ecx@1
  unsigned int v4; // edx@3
  int v5; // esi@3
  int v6; // ecx@5
  EffectMgr::AbstateAni *v7; // eax@5
  EffectMgr::AbstateAni *v8; // eax@9

  v2 = this;
  v3 = this->_Mylast;
  if ( _Val >= v3 || v2->_Myfirst > _Val )
  {
    if ( v3 == v2->_Myend )
      std::vector<EffectMgr::AbstateAni,std::allocator<EffectMgr::AbstateAni>>::_Reserve(v2, 1u);
    v8 = v2->_Mylast;
    if ( v8 )
    {
      v8->kAbstateInfom.abstateID = _Val->kAbstateInfom.abstateID;
      v8->kAbstateInfom.restKeeptime = _Val->kAbstateInfom.restKeeptime;
      v8->kAbstateInfom.strength = _Val->kAbstateInfom.strength;
      v8->kTarget = _Val->kTarget;
    }
  }
  else
  {
    v4 = (signed int)((char *)_Val
                    - (char *)v2->_Myfirst
                    + ((unsigned __int64)(-1840700269i64 * ((char *)_Val - (char *)v2->_Myfirst)) >> 32)) >> 3;
    v5 = v4 + (v4 >> 31);
    if ( v3 == v2->_Myend )
      std::vector<EffectMgr::AbstateAni,std::allocator<EffectMgr::AbstateAni>>::_Reserve(v2, 1u);
    v6 = (int)&v2->_Myfirst[v5];
    v7 = v2->_Mylast;
    if ( v7 )
    {
      v7->kAbstateInfom.abstateID = *(_DWORD *)v6;
      v7->kAbstateInfom.restKeeptime = *(_DWORD *)(v6 + 4);
      v7->kAbstateInfom.strength = *(_DWORD *)(v6 + 8);
      v7->kTarget = *(_WORD *)(v6 + 12);
      ++v2->_Mylast;
      return;
    }
  }
  ++v2->_Mylast;
}

//----- (00694930) --------------------------------------------------------
char __thiscall EffectMgr::CreateAttachEffect(EffectMgr *this, char *pcEffectName, unsigned __int16 kTarget, NiPoint3 kDir, float fTime)
{
  EffectMgr *v5; // edi@1
  NiNode *v6; // esi@1
  char result; // al@2
  AttachEff *v8; // eax@3
  Effect *v9; // eax@4
  Effect *v10; // esi@4

  v5 = this;
  v6 = EffectMgr::GetEffectNode(this, pcEffectName);
  if ( v6
    && ((v8 = (AttachEff *)operator new(0x21Cu)) == 0 ? (v10 = 0) : (AttachEff::AttachEff(v8, v6, 0, 0), v10 = v9), v10) )
  {
    ((void (__thiscall *)(_DWORD))v10->vfptr[24].__vecDelDtor)(v10);
    ((void (__thiscall *)(_DWORD))v10->vfptr[10].__vecDelDtor)(v10);
    EffectMgr::Add(v5, v10);
    EffectMgr::AttachEffectToWorld(v5, v10);
    ((void (__cdecl *)(_DWORD))v10->vfptr[15].__vecDelDtor)(LODWORD(fTime));
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00694A10) --------------------------------------------------------
char __thiscall EffectMgr::CreatePigeonEffect(EffectMgr *this, Char *pkTarget, float fTime)
{
  EffectMgr *v3; // ebx@1
  NiActorManager *v4; // esi@1
  QuestPigeonEffect *v5; // eax@2
  Effect *v6; // eax@3
  Effect *v7; // esi@3
  char result; // al@7

  v3 = this;
  v4 = CharResMgr::GetPigeonActor(&g_kCharResMgr);
  if ( v4
    && ((v5 = (QuestPigeonEffect *)operator new(0x23Cu)) == 0 ? (v7 = 0) : (QuestPigeonEffect::QuestPigeonEffect(
                                                                              v5,
                                                                              v4,
                                                                              pkTarget),
                                                                            v7 = v6),
        v7 && CharMgr::GetChar(&g_kCharMgr, pkTarget)) )
  {
    EffectMgr::Add(v3, v7);
    EffectMgr::AttachEffectToWorld(v3, v7);
    ((void (__cdecl *)(_DWORD))v7->vfptr[15].__vecDelDtor)(LODWORD(fTime));
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00694AE0) --------------------------------------------------------
void __thiscall EffectMgr::JustCreateLookAtEffect(EffectMgr *this, char *pcEffectName)
{
  NiNode *v2; // eax@1
  NiNode *v3; // esi@2
  LookAtEffect *v4; // eax@2

  v2 = EffectMgr::GetEffectNode(this, pcEffectName);
  if ( v2 )
  {
    v3 = (NiNode *)NiObject::Clone((NiObject *)&v2->vfptr);
    v4 = (LookAtEffect *)operator new(0x238u);
    if ( v4 )
      LookAtEffect::LookAtEffect(v4, v3, 0, 0);
  }
}

//----- (00694B60) --------------------------------------------------------
void __thiscall EffectMgr::JustCreateClientEffect(EffectMgr *this, char *pcEffectName)
{
  NiNode *v2; // eax@1
  NiNode *v3; // esi@2
  ClientEffect *v4; // eax@2

  v2 = EffectMgr::GetEffectNode(this, pcEffectName);
  if ( v2 )
  {
    v3 = (NiNode *)NiObject::Clone((NiObject *)&v2->vfptr);
    v4 = (ClientEffect *)operator new(0x228u);
    if ( v4 )
      ClientEffect::ClientEffect(v4, v3, 0, 0);
  }
}

//----- (00694BE0) --------------------------------------------------------
ClientEffect *__thiscall EffectMgr::JustCreateClientEffect(EffectMgr *this, char *pcEffectName, NiPoint3 kPos)
{
  EffectMgr *v3; // edi@1
  NiNode *v4; // eax@1
  ClientEffect *v5; // esi@2
  NiNode *v6; // esi@3
  ClientEffect *v7; // eax@3
  ClientEffect *v8; // eax@4
  _BYTE v9[12]; // ST00_12@7

  v3 = this;
  v4 = EffectMgr::GetEffectNode(this, pcEffectName);
  if ( v4 )
  {
    v6 = (NiNode *)NiObject::Clone((NiObject *)&v4->vfptr);
    v7 = (ClientEffect *)operator new(0x228u);
    if ( v7 )
      ClientEffect::ClientEffect(v7, v6, 0, 0);
    else
      v8 = 0;
    v5 = v8;
  }
  else
  {
    v5 = 0;
  }
  *(float *)v9 = kPos.x;
  *(_QWORD *)&v9[4] = *(_QWORD *)&kPos.y;
  ClientEffect::SetTargetPos(v5, *(NiPoint3 *)v9);
  EffectMgr::Add(v3, (Effect *)&v5->vfptr);
  return v5;
}

//----- (00694C90) --------------------------------------------------------
Effect *__thiscall EffectMgr::JustCreateClientEffect(EffectMgr *this, char *pcEffectName, int hHandle)
{
  EffectMgr *v3; // edi@1
  NiNode *v4; // eax@1
  Effect *v5; // esi@2
  NiNode *v6; // esi@3
  ClientEffect *v7; // eax@3
  Effect *v8; // eax@4

  v3 = this;
  v4 = EffectMgr::GetEffectNode(this, pcEffectName);
  if ( v4 )
  {
    v6 = (NiNode *)NiObject::Clone((NiObject *)&v4->vfptr);
    v7 = (ClientEffect *)operator new(0x228u);
    if ( v7 )
      ClientEffect::ClientEffect(v7, v6, 0, 0);
    else
      v8 = 0;
    v5 = v8;
  }
  else
  {
    v5 = 0;
  }
  v5->vfptr[24].__vecDelDtor((NiRefObject *)v5, hHandle);
  EffectMgr::Add(v3, v5);
  return v5;
}

//----- (00694D30) --------------------------------------------------------
Effect *__thiscall EffectMgr::JustCreateEffect(EffectMgr *this, char *pcEffectName, NiPoint3 kPos, NiPoint3 kDir, float fTime, bool bDir)
{
  NiNode *v6; // eax@1
  NiNode *v7; // esi@2
  NiObject *v8; // eax@2
  Effect *v9; // eax@4
  Effect *v10; // eax@5
  Effect *v11; // edi@5
  EffectMgr *v13; // [sp+10h] [bp-10h]@1

  v13 = this;
  v6 = EffectMgr::GetEffectNode(this, pcEffectName);
  if ( !v6 )
    return 0;
  v7 = 0;
  v8 = NiObject::Clone((NiObject *)&v6->vfptr);
  if ( v8 )
  {
    v7 = (NiNode *)v8;
    InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  }
  v9 = (Effect *)operator new(0x20Cu);
  if ( v9 )
  {
    Effect::Effect(v9, v7, 0, 0);
    v11 = v10;
  }
  else
  {
    v11 = 0;
  }
  if ( !v11 )
  {
    if ( v7 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    }
    return 0;
  }
  v11->vfptr[7].__vecDelDtor((NiRefObject *)v11, (unsigned int)&kPos);
  if ( bDir )
    v11->vfptr[10].__vecDelDtor((NiRefObject *)v11, (unsigned int)&kDir);
  EffectMgr::Add(v13, v11);
  if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  return v11;
}

//----- (00694E60) --------------------------------------------------------
Effect *__thiscall EffectMgr::JustCreateAttachEffect(EffectMgr *this, char *pcEffectName, int kTarget, NiPoint3 kDir, float fTime)
{
  NiNode *v5; // eax@1
  NiNode *v6; // edi@2
  NiObject *v7; // eax@2
  AttachEff *v8; // eax@4
  Effect *v9; // eax@5
  Effect *v10; // esi@5
  EffectMgr *v12; // [sp+14h] [bp-10h]@1

  v12 = this;
  v5 = EffectMgr::GetEffectNode(this, pcEffectName);
  if ( !v5 )
    return 0;
  v6 = 0;
  v7 = NiObject::Clone((NiObject *)&v5->vfptr);
  if ( v7 )
  {
    v6 = (NiNode *)v7;
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  }
  v8 = (AttachEff *)operator new(0x21Cu);
  if ( v8 )
  {
    AttachEff::AttachEff(v8, v6, 0, 0);
    v10 = v9;
  }
  else
  {
    v10 = 0;
  }
  if ( !v10 )
  {
    if ( v6 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v10->vfptr[24].__vecDelDtor((NiRefObject *)v10, kTarget);
  v10->vfptr[10].__vecDelDtor((NiRefObject *)v10, (unsigned int)&kDir);
  v10->vfptr[24].__vecDelDtor((NiRefObject *)v10, kTarget);
  EffectMgr::Add(v12, v10);
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  return v10;
}

//----- (00694F90) --------------------------------------------------------
char __thiscall EffectMgr::CreateShootEff(EffectMgr *this, char *pcShootEffName, char *pcShootBombName, char *pcBombSndName, Char *pkAttack, Char *pkTarget, float fTime, float fSpeed, DamageInfoSet *pkDamInfoSet, LastEffPos ePos, bool bFireOnRight)
{
  Char *v11; // edi@1
  NiObject *v12; // eax@5
  NiNode *v13; // esi@5
  NiNode *v14; // eax@6
  NiNode *v15; // eax@11
  Effect *v16; // eax@12
  Effect *v17; // esi@12
  void *(__thiscall *v18)(NiRefObject *, unsigned int); // edx@15
  NiPoint3 *v19; // eax@16
  NiPoint3 *v20; // eax@17
  NiPoint3 *v21; // eax@18
  EffectMgr *v22; // edi@18
  NiPoint3 v24; // [sp+50h] [bp-94h]@18
  NiPoint3 kDir; // [sp+5Ch] [bp-88h]@15
  NiPoint3 result; // [sp+68h] [bp-7Ch]@16
  NiPoint3 kTargetPos; // [sp+74h] [bp-70h]@18
  NiPoint3 kCasterDir; // [sp+80h] [bp-64h]@15
  Char *pkChar; // [sp+8Ch] [bp-58h]@1
  char *v30; // [sp+90h] [bp-54h]@1
  DamageInfoSet *v31; // [sp+94h] [bp-50h]@1
  char *v32; // [sp+98h] [bp-4Ch]@1
  EffectMgr *v33; // [sp+9Ch] [bp-48h]@1
  NiNode *pkNode; // [sp+A0h] [bp-44h]@5
  NiPoint3 kStartPos; // [sp+A4h] [bp-40h]@16
  NiMatrix3 Rotz; // [sp+B0h] [bp-34h]@5
  int v37; // [sp+E0h] [bp-4h]@11

  v11 = pkTarget;
  v33 = this;
  v32 = pcShootBombName;
  v30 = pcBombSndName;
  pkChar = pkTarget;
  v31 = pkDamInfoSet;
  if ( !pkAttack || !pkTarget || 0.0 == fSpeed )
    return 0;
  if ( !_strnicmp(pcShootEffName, "MyWeapon", 8u) )
  {
    v12 = NiObject::Clone((NiObject *)&pkAttack->m_kCharShape.m_apkLinkNode[12]->vfptr);
    v13 = (NiNode *)NiObject::Clone(v12);
    pkNode = v13;
    NiObjectNET::SetName((NiObjectNET *)&v13->vfptr, "MyWeapon");
    NiMatrix3::MakeZRotation(&Rotz, -1.5707964);
    qmemcpy(&v13->m_kLocal, &Rotz, 0x24u);
    v11 = pkChar;
  }
  else
  {
    v14 = EffectMgr::GetEffectNode(v33, pcShootEffName);
    if ( !v14 )
    {
      if ( pkAttack->m_bUserCharacter )
        terminate();
      return 0;
    }
    v13 = (NiNode *)NiObject::Clone((NiObject *)&v14->vfptr);
  }
  if ( !v13 )
    return 0;
  v15 = (NiNode *)operator new(0x2E8u);
  pkNode = v15;
  v37 = 0;
  if ( v15 )
  {
    ArrowEff::ArrowEff((ArrowEff *)v15, v13, 0, pkAttack);
    v17 = v16;
  }
  else
  {
    v17 = 0;
  }
  v37 = -1;
  if ( !v17 )
    return 0;
  ((void (__thiscall *)(Effect *, signed int, DamageInfoSet *))v17->vfptr[34].__vecDelDtor)(v17, -1, v31);
  v17->vfptr[30].__vecDelDtor((NiRefObject *)v17, (unsigned int)v32);
  v17->vfptr[18].__vecDelDtor((NiRefObject *)v17, COERCE_UNSIGNED_INT(1000.0));
  v17->vfptr[26].__vecDelDtor((NiRefObject *)v17, v11->m_kHandle);
  v17->vfptr[28].__vecDelDtor((NiRefObject *)v17, pkAttack->m_kHandle);
  v17->vfptr[24].__vecDelDtor((NiRefObject *)v17, LODWORD(fSpeed));
  v18 = v17->vfptr[31].__vecDelDtor;
  LODWORD(v17[1].m_kDecalEffect.m_kDecalMaker.m_fDecalWidth) = ePos;
  v18((NiRefObject *)&v17->vfptr, (unsigned int)v30);
  ((void (__thiscall *)(Char *, NiPoint3 *))pkAttack->vfptr[6].~AbStateInfectee)(pkAttack, &kCasterDir);
  *(NiPoint3 *)&v17[1].m_kDecalEffect.m_kEffect.m_fMinTime = kCasterDir;
  Char::GetDirToChar(pkAttack, &kDir, v11);
  NiPoint3::Unitize(&kDir);
  v17->vfptr[10].__vecDelDtor((NiRefObject *)v17, (unsigned int)&kDir);
  if ( bFireOnRight )
  {
    v19 = Char::GetRightHandPos(pkAttack, &result);
    kStartPos.x = v19->x;
    kStartPos.y = v19->y;
    kStartPos.z = v19->z;
  }
  else
  {
    v20 = Char::GetLeftHandPos(pkAttack, &result);
    kStartPos.x = v20->x;
    kStartPos.y = v20->y;
    kStartPos.z = v20->z;
  }
  kStartPos.z = Char::GetChestPos(pkAttack, &result)->z;
  v17->vfptr[7].__vecDelDtor((NiRefObject *)v17, (unsigned int)&kStartPos);
  v17[1].vfptr[2].OnEffectDestory((IEffectDestroyMessenger *)&v17[1].vfptr, (Effect *)&kStartPos);
  v21 = Char::GetChestPos(v11, &v24);
  kTargetPos.x = v21->x;
  kTargetPos.y = v21->y;
  kTargetPos.z = v21->z;
  ((void (__thiscall *)(IEffectDestroyMessengerVtbl **, _DWORD, NiPoint3 *, NiPoint3 *))v17[1].vfptr[1].DeleteEffectDestoryMessengerList)(
    &v17[1].vfptr,
    LODWORD(fTime),
    &kStartPos,
    &kTargetPos);
  v22 = v33;
  EffectMgr::Add(v33, v17);
  EffectMgr::AttachEffectToWorld(v22, v17);
  v17->vfptr[15].__vecDelDtor((NiRefObject *)v17, LODWORD(fTime));
  return 1;
}

//----- (006952A0) --------------------------------------------------------
char __thiscall EffectMgr::CreateShootEff(EffectMgr *this, char *pcShootEffName, char *pcShootBombName, char *pcShootSndName, Char *pkAttack, Char *pkTarget, float fTime, float fSpeed, unsigned int uiHitDamage)
{
  NiNode *v9; // esi@3
  ArrowEff *v10; // eax@4
  Effect *v11; // eax@5
  Effect *v12; // esi@5
  NiPoint3 *v13; // eax@8
  NiPoint3 *v14; // eax@8
  EffectMgr *v15; // edi@8
  char v16; // al@8
  NiPoint3 v17; // [sp+4Ch] [bp-58h]@8
  NiPoint3 result; // [sp+58h] [bp-4Ch]@8
  NiPoint3 kDir; // [sp+64h] [bp-40h]@8
  NiPoint3 kTargetPos; // [sp+70h] [bp-34h]@8
  NiPoint3 kCasterDir; // [sp+7Ch] [bp-28h]@8
  NiPoint3 kStartPos; // [sp+88h] [bp-1Ch]@8
  EffectMgr *v23; // [sp+94h] [bp-10h]@1
  int v24; // [sp+A0h] [bp-4h]@4

  v23 = this;
  if ( pkAttack
    && pkTarget
    && (v9 = EffectMgr::GetEffectNode(this, pcShootEffName)) != 0
    && ((v10 = (ArrowEff *)operator new(0x2E8u), v24 = 0, !v10) ? (v12 = 0) : (ArrowEff::ArrowEff(v10, v9, 0, pkAttack),
                                                                               v12 = v11),
        v24 = -1,
        v12) )
  {
    v12->vfptr[33].__vecDelDtor((NiRefObject *)v12, uiHitDamage);
    v12->vfptr[30].__vecDelDtor((NiRefObject *)v12, (unsigned int)pcShootBombName);
    v12->vfptr[31].__vecDelDtor((NiRefObject *)v12, (unsigned int)pcShootSndName);
    v12->vfptr[18].__vecDelDtor((NiRefObject *)v12, COERCE_UNSIGNED_INT(20.0));
    v12->vfptr[26].__vecDelDtor((NiRefObject *)v12, pkTarget->m_kHandle);
    v12->vfptr[28].__vecDelDtor((NiRefObject *)v12, pkAttack->m_kHandle);
    v12->vfptr[24].__vecDelDtor((NiRefObject *)v12, LODWORD(fSpeed));
    Char::GetDirToChar(pkAttack, &kDir, pkTarget);
    NiPoint3::Unitize(&kDir);
    v12->vfptr[10].__vecDelDtor((NiRefObject *)v12, (unsigned int)&kDir);
    ((void (__thiscall *)(Char *, NiPoint3 *))pkAttack->vfptr[6].~AbStateInfectee)(pkAttack, &kCasterDir);
    *(NiPoint3 *)&v12[1].m_kDecalEffect.m_kEffect.m_fMinTime = kCasterDir;
    v13 = Char::GetLeftHandPos(pkAttack, &result);
    kStartPos.x = v13->x;
    kStartPos.y = v13->y;
    kStartPos.z = v13->z;
    v12->vfptr[7].__vecDelDtor((NiRefObject *)v12, (unsigned int)&kStartPos);
    v12[1].vfptr[2].OnEffectDestory((IEffectDestroyMessenger *)&v12[1].vfptr, (Effect *)&kStartPos);
    v14 = Char::GetChestPos(pkTarget, &v17);
    kTargetPos.x = v14->x;
    kTargetPos.y = v14->y;
    kTargetPos.z = v14->z;
    v12[1].vfptr[1].DeleteEffectDestoryMessengerList((IEffectDestroyMessenger *)&v12[1].vfptr);
    v15 = v23;
    EffectMgr::Add(v23, v12);
    EffectMgr::AttachEffectToWorld(v15, v12);
    ((void (__cdecl *)(_DWORD))v12->vfptr[15].__vecDelDtor)(LODWORD(fTime));
    v16 = 1;
  }
  else
  {
    v16 = 0;
  }
  return v16;
}

//----- (006954C0) --------------------------------------------------------
char __thiscall EffectMgr::CreateShootEff(EffectMgr *this, char *pcShootEffName, ActionEffectInfo *pkBombInfo, Char *pkAttack, Char *pkTarget, float fTime, float fSpeed, int AtkSeqNum, DamageInfoSet *pkDamInfoSet, LastEffPos ePos, bool bFireOnRight)
{
  EffectMgr *v11; // edi@1
  NiObject *v12; // eax@5
  NiNode *v13; // esi@5
  NiNode *v14; // eax@6
  NiNode *v15; // eax@11
  Effect *v16; // eax@12
  Effect *v17; // esi@12
  NiPoint3 *v18; // eax@19
  NiPoint3 *v19; // eax@20
  NiPoint3 *v20; // eax@21
  NiPoint3 v22; // [sp+4Ch] [bp-90h]@21
  NiPoint3 kDir; // [sp+58h] [bp-84h]@18
  NiPoint3 result; // [sp+64h] [bp-78h]@19
  NiPoint3 kCasterDir; // [sp+70h] [bp-6Ch]@18
  NiPoint3 kTargetPos; // [sp+7Ch] [bp-60h]@21
  DamageInfoSet *v27; // [sp+88h] [bp-54h]@1
  EffectMgr *v28; // [sp+8Ch] [bp-50h]@1
  ActionEffectInfo *v29; // [sp+90h] [bp-4Ch]@1
  NiNode *pkNode; // [sp+94h] [bp-48h]@5
  NiPoint3 kStartPos; // [sp+98h] [bp-44h]@19
  Char *pkChar; // [sp+A4h] [bp-38h]@1
  NiMatrix3 Rotz; // [sp+A8h] [bp-34h]@5
  int v34; // [sp+D8h] [bp-4h]@11

  v11 = this;
  v29 = pkBombInfo;
  v28 = this;
  pkChar = pkTarget;
  v27 = pkDamInfoSet;
  if ( !pkAttack || !pkTarget || 0.0 == fSpeed )
    return 0;
  if ( !_strnicmp(pcShootEffName, "MyWeapon", 8u) )
  {
    v12 = NiObject::Clone((NiObject *)&pkAttack->m_kCharShape.m_apkLinkNode[12]->vfptr);
    v13 = (NiNode *)NiObject::Clone(v12);
    pkNode = v13;
    NiObjectNET::SetName((NiObjectNET *)&v13->vfptr, "MyWeapon");
    NiMatrix3::MakeZRotation(&Rotz, -1.5707964);
    qmemcpy(&v13->m_kLocal, &Rotz, 0x24u);
    v11 = v28;
  }
  else
  {
    v14 = EffectMgr::GetEffectNode(v11, pcShootEffName);
    if ( !v14 )
    {
      if ( pkAttack->m_bUserCharacter )
        terminate();
      return 0;
    }
    v13 = (NiNode *)NiObject::Clone((NiObject *)&v14->vfptr);
  }
  if ( !v13 )
    return 0;
  v15 = (NiNode *)operator new(0x2E8u);
  pkNode = v15;
  v34 = 0;
  if ( v15 )
  {
    ArrowEff::ArrowEff((ArrowEff *)v15, v13, 0, pkAttack);
    v17 = v16;
  }
  else
  {
    v17 = 0;
  }
  v34 = -1;
  if ( !v17 )
    return 0;
  ((void (__thiscall *)(Effect *, int, DamageInfoSet *))v17->vfptr[34].__vecDelDtor)(v17, AtkSeqNum, v27);
  if ( v29 && v29->GrapicFile[0] != 45 )
    v17->vfptr[30].__vecDelDtor((NiRefObject *)v17, (unsigned int)v29->GrapicFile);
  v17->vfptr[18].__vecDelDtor((NiRefObject *)v17, COERCE_UNSIGNED_INT(1000.0));
  v17->vfptr[26].__vecDelDtor((NiRefObject *)v17, pkChar->m_kHandle);
  v17->vfptr[28].__vecDelDtor((NiRefObject *)v17, pkAttack->m_kHandle);
  v17->vfptr[24].__vecDelDtor((NiRefObject *)v17, LODWORD(fSpeed));
  LODWORD(v17[1].m_kDecalEffect.m_kDecalMaker.m_fDecalWidth) = ePos;
  ((void (__thiscall *)(Char *, NiPoint3 *))pkAttack->vfptr[6].~AbStateInfectee)(pkAttack, &kCasterDir);
  *(NiPoint3 *)&v17[1].m_kDecalEffect.m_kEffect.m_fMinTime = kCasterDir;
  Char::GetDirToChar(pkAttack, &kDir, pkChar);
  NiPoint3::Unitize(&kDir);
  v17->vfptr[10].__vecDelDtor((NiRefObject *)v17, (unsigned int)&kDir);
  if ( bFireOnRight )
  {
    v18 = Char::GetRightHandPos(pkAttack, &result);
    kStartPos.x = v18->x;
    kStartPos.y = v18->y;
    kStartPos.z = v18->z;
  }
  else
  {
    v19 = Char::GetLeftHandPos(pkAttack, &result);
    kStartPos.x = v19->x;
    kStartPos.y = v19->y;
    kStartPos.z = v19->z;
  }
  kStartPos.z = Char::GetChestPos(pkAttack, &result)->z;
  v17->vfptr[7].__vecDelDtor((NiRefObject *)v17, (unsigned int)&kStartPos);
  v17[1].vfptr[2].OnEffectDestory((IEffectDestroyMessenger *)&v17[1].vfptr, (Effect *)&kStartPos);
  v20 = Char::GetChestPos(pkChar, &v22);
  kTargetPos.x = v20->x;
  kTargetPos.y = v20->y;
  kTargetPos.z = v20->z;
  ((void (__thiscall *)(IEffectDestroyMessengerVtbl **, _DWORD, NiPoint3 *, NiPoint3 *))v17[1].vfptr[1].DeleteEffectDestoryMessengerList)(
    &v17[1].vfptr,
    LODWORD(fTime),
    &kStartPos,
    &kTargetPos);
  EffectMgr::Add(v11, v17);
  EffectMgr::AttachEffectToWorld(v11, v17);
  v17->vfptr[15].__vecDelDtor((NiRefObject *)v17, LODWORD(fTime));
  return 1;
}

//----- (006957D0) --------------------------------------------------------
char __thiscall EffectMgr::CreateWeddingEffect(EffectMgr *this, char *pcEffectName, unsigned __int16 Newlywed, float fTime)
{
  NiNode *v4; // eax@1
  NiNode *v5; // edi@2
  NiObject *v6; // eax@2
  WeddingEffect *v7; // eax@4
  int v8; // eax@5
  int v9; // esi@5
  NiRefObjectVtbl *v10; // edx@10
  NiNode *v11; // ecx@10
  Char *v12; // eax@11
  Char *v13; // ebx@11
  int v14; // edi@12
  NiPoint3 *v15; // eax@12
  NiPoint3 *v16; // eax@12
  NiPoint3 *v17; // ST14_4@12
  NiPoint3 *v18; // eax@12
  EffectMgr *v19; // edi@12
  NiPoint3 v21; // [sp+28h] [bp-2Ch]@12
  NiPoint3 result; // [sp+34h] [bp-20h]@12
  WeddingEffect *v23; // [sp+40h] [bp-14h]@4
  EffectMgr *v24; // [sp+44h] [bp-10h]@1
  int v25; // [sp+50h] [bp-4h]@2
  NiPointer<NiNode> spNode; // [sp+5Ch] [bp+8h]@2
  void (__thiscall **Newlyweda)(_DWORD, _DWORD); // [sp+60h] [bp+Ch]@12
  void (__thiscall **Newlywedb)(_DWORD, _DWORD, _DWORD, _DWORD); // [sp+60h] [bp+Ch]@12

  v24 = this;
  v4 = EffectMgr::GetEffectNode(this, pcEffectName);
  if ( !v4 )
    return 0;
  v5 = 0;
  spNode.m_pObject = 0;
  v25 = 0;
  v6 = NiObject::Clone((NiObject *)&v4->vfptr);
  if ( v6 )
  {
    spNode.m_pObject = (NiNode *)v6;
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
    v5 = spNode.m_pObject;
  }
  v7 = (WeddingEffect *)operator new(0x294u);
  v23 = v7;
  LOBYTE(v25) = 1;
  if ( v7 )
  {
    WeddingEffect::WeddingEffect(v7, v5, 0);
    v9 = v8;
  }
  else
  {
    v9 = 0;
  }
  LOBYTE(v25) = 0;
  if ( !v9 )
  {
    v25 = -1;
    if ( !v5 || InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      return 0;
    v10 = v5->vfptr;
    v11 = v5;
LABEL_19:
    v10->__vecDelDtor(v11, 1);
    return 0;
  }
  v12 = CharMgr::GetChar(&g_kCharMgr, Newlywed);
  v13 = v12;
  if ( !v12 )
  {
    v25 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v10 = spNode.m_pObject->vfptr;
    v11 = spNode.m_pObject;
    goto LABEL_19;
  }
  *(_WORD *)(v9 + 620) = Newlywed;
  v14 = *(_DWORD *)v9;
  v15 = Char::GetHairPos(v12, &result);
  (*(void (__thiscall **)(int, NiPoint3 *))(v14 + 28))(v9, v15);
  Newlyweda = (void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)(v9 + 524) + 40);
  v16 = Char::GetHairPos(v13, &result);
  (*Newlyweda)(v9 + 524, v16);
  Newlywedb = (void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)(v9 + 524) + 28);
  v17 = Char::GetHairPos(v13, &result);
  v18 = Char::GetHairPos(v13, &v21);
  (*Newlywedb)(v9 + 524, LODWORD(fTime), v18, v17);
  v19 = v24;
  EffectMgr::Add(v24, (Effect *)v9);
  EffectMgr::AttachEffectToWorld(v19, (Effect *)v9);
  (*(void (__thiscall **)(int, _DWORD))(*(_DWORD *)v9 + 60))(v9, LODWORD(fTime));
  v25 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    spNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spNode.m_pObject, 1u);
  return 1;
}

//----- (006959C0) --------------------------------------------------------
char __thiscall EffectMgr::CreateLightningShootEff(EffectMgr *this, char *pcShootEffName, char *pcShootBombName, Char *pkAttack, Char *pkTarget, float fTime, float fSpeed, DamageInfoSet *pkDamInfoSet, LastEffPos ePos, bool bFireOnRight, unsigned __int16 kID)
{
  Char *v11; // edi@1
  NiObject *v12; // eax@5
  NiNode *v13; // esi@5
  NiNode *v14; // eax@6
  NiNode *v15; // eax@10
  int v16; // eax@11
  int v17; // esi@11
  NiPoint3 *v18; // eax@15
  NiPoint3 *v19; // eax@16
  NiPoint3 *v20; // eax@17
  EffectMgr *v21; // edi@17
  char v22; // al@17
  NiPoint3 v23; // [sp+4Ch] [bp-90h]@17
  NiPoint3 kDir; // [sp+58h] [bp-84h]@14
  NiPoint3 result; // [sp+64h] [bp-78h]@15
  NiPoint3 kTargetPos; // [sp+70h] [bp-6Ch]@17
  NiPoint3 kCasterDir; // [sp+7Ch] [bp-60h]@14
  Char *pkChar; // [sp+88h] [bp-54h]@1
  DamageInfoSet *v29; // [sp+8Ch] [bp-50h]@1
  char *v30; // [sp+90h] [bp-4Ch]@1
  EffectMgr *v31; // [sp+94h] [bp-48h]@1
  NiNode *pkNode; // [sp+98h] [bp-44h]@5
  NiPoint3 kStartPos; // [sp+9Ch] [bp-40h]@15
  NiMatrix3 Rotz; // [sp+A8h] [bp-34h]@5
  int v35; // [sp+D8h] [bp-4h]@10

  v11 = pkTarget;
  v31 = this;
  v30 = pcShootBombName;
  pkChar = pkTarget;
  v29 = pkDamInfoSet;
  if ( !pkAttack || !pkTarget || 0.0 == fSpeed )
    goto LABEL_21;
  if ( !_strnicmp(pcShootEffName, "MyWeapon", 8u) )
  {
    v12 = NiObject::Clone((NiObject *)&pkAttack->m_kCharShape.m_apkLinkNode[12]->vfptr);
    v13 = (NiNode *)NiObject::Clone(v12);
    pkNode = v13;
    NiObjectNET::SetName((NiObjectNET *)&v13->vfptr, "MyWeapon");
    NiMatrix3::MakeZRotation(&Rotz, -1.5707964);
    qmemcpy(&v13->m_kLocal, &Rotz, 0x24u);
    v11 = pkChar;
  }
  else
  {
    v14 = EffectMgr::GetEffectNode(v31, pcShootEffName);
    if ( !v14 )
      terminate();
    v13 = (NiNode *)NiObject::Clone((NiObject *)&v14->vfptr);
  }
  if ( v13
    && ((v15 = (NiNode *)operator new(0x2E8u), pkNode = v15, v35 = 0, !v15) ? (v17 = 0) : (ArrowEff::ArrowEff(
                                                                                             (ArrowEff *)v15,
                                                                                             v13,
                                                                                             0,
                                                                                             pkAttack),
                                                                                           v17 = v16),
        v35 = -1,
        v17) )
  {
    (*(void (__thiscall **)(int, signed int, DamageInfoSet *))(*(_DWORD *)v17 + 136))(v17, -1, v29);
    (*(void (__thiscall **)(int, char *))(*(_DWORD *)v17 + 120))(v17, v30);
    (*(void (__thiscall **)(int, _DWORD))(*(_DWORD *)v17 + 72))(v17, 1000.0);
    (*(void (__thiscall **)(int, _DWORD))(*(_DWORD *)v17 + 104))(v17, v11->m_kHandle);
    (*(void (__thiscall **)(int, _DWORD))(*(_DWORD *)v17 + 112))(v17, pkAttack->m_kHandle);
    (*(void (__thiscall **)(int, _DWORD))(*(_DWORD *)v17 + 96))(v17, LODWORD(fSpeed));
    *(_DWORD *)(v17 + 740) = ePos;
    Effect::SetActiveSkillID((Effect *)v17, kID);
    ((void (__thiscall *)(Char *, NiPoint3 *))pkAttack->vfptr[6].~AbStateInfectee)(pkAttack, &kCasterDir);
    *(NiPoint3 *)(v17 + 688) = kCasterDir;
    Char::GetDirToChar(pkAttack, &kDir, v11);
    NiPoint3::Unitize(&kDir);
    (*(void (__thiscall **)(int, NiPoint3 *))(*(_DWORD *)v17 + 40))(v17, &kDir);
    if ( bFireOnRight )
    {
      v18 = Char::GetRightHandPos(pkAttack, &result);
      kStartPos.x = v18->x;
      kStartPos.y = v18->y;
      kStartPos.z = v18->z;
    }
    else
    {
      v19 = Char::GetLeftHandPos(pkAttack, &result);
      kStartPos.x = v19->x;
      kStartPos.y = v19->y;
      kStartPos.z = v19->z;
    }
    kStartPos.z = Char::GetChestPos(pkAttack, &result)->z;
    (*(void (__thiscall **)(int, NiPoint3 *))(*(_DWORD *)v17 + 28))(v17, &kStartPos);
    (*(void (__thiscall **)(int, NiPoint3 *))(*(_DWORD *)(v17 + 532) + 40))(v17 + 532, &kStartPos);
    v20 = Char::GetChestPos(v11, &v23);
    kTargetPos.x = v20->x;
    kTargetPos.y = v20->y;
    kTargetPos.z = v20->z;
    (*(void (__thiscall **)(int, _DWORD, NiPoint3 *, NiPoint3 *))(*(_DWORD *)(v17 + 532) + 28))(
      v17 + 532,
      LODWORD(fTime),
      &kStartPos,
      &kTargetPos);
    v21 = v31;
    EffectMgr::Add(v31, (Effect *)v17);
    EffectMgr::AttachEffectToWorld(v21, (Effect *)v17);
    (*(void (__thiscall **)(int, _DWORD))(*(_DWORD *)v17 + 60))(v17, LODWORD(fTime));
    v22 = 1;
  }
  else
  {
LABEL_21:
    v22 = 0;
  }
  return v22;
}

//----- (00695CB0) --------------------------------------------------------
LookAtEffect *__thiscall EffectMgr::JustCreateLookAtEffect(EffectMgr *this, char *pcEffectName, NiPoint3 kLookAtPos, Char *pkCaster)
{
  EffectMgr *v4; // edi@1
  LookAtEffect *result; // eax@2
  NiNode *v6; // eax@3
  LookAtEffect *v7; // esi@4
  NiNode *v8; // esi@5
  LookAtEffect *v9; // eax@5
  LookAtEffect *v10; // eax@6

  v4 = this;
  if ( pkCaster )
  {
    v6 = EffectMgr::GetEffectNode(this, pcEffectName);
    if ( v6 )
    {
      v8 = (NiNode *)NiObject::Clone((NiObject *)&v6->vfptr);
      v9 = (LookAtEffect *)operator new(0x238u);
      if ( v9 )
        LookAtEffect::LookAtEffect(v9, v8, 0, 0);
      else
        v10 = 0;
      v7 = v10;
    }
    else
    {
      v7 = 0;
    }
    v7->vfptr[24].__vecDelDtor((NiRefObject *)v7, pkCaster->m_kHandle);
    v7->m_kLookAtPos = kLookAtPos;
    LookAtEffect::CalcDir(v7);
    EffectMgr::Add(v4, (Effect *)&v7->vfptr);
    result = v7;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00695DA0) --------------------------------------------------------
LookAtEffect *__thiscall EffectMgr::JustCreateLookAtEffect(EffectMgr *this, char *pcEffectName, NiPoint3 kLookAtPos, NiPoint3 kPos)
{
  EffectMgr *v4; // edi@1
  NiNode *v5; // eax@1
  int v6; // esi@2
  NiNode *v7; // esi@3
  LookAtEffect *v8; // eax@3
  int v9; // eax@4
  _BYTE v10[12]; // ST00_12@7

  v4 = this;
  v5 = EffectMgr::GetEffectNode(this, pcEffectName);
  if ( v5 )
  {
    v7 = (NiNode *)NiObject::Clone((NiObject *)&v5->vfptr);
    v8 = (LookAtEffect *)operator new(0x238u);
    if ( v8 )
      LookAtEffect::LookAtEffect(v8, v7, 0, 0);
    else
      v9 = 0;
    v6 = v9;
  }
  else
  {
    v6 = 0;
  }
  *(float *)v10 = kPos.x;
  *(_QWORD *)&v10[4] = *(_QWORD *)&kPos.y;
  ClientEffect::SetTargetPos((ClientEffect *)v6, *(NiPoint3 *)v10);
  *(NiPoint3 *)(v6 + 552) = kLookAtPos;
  LookAtEffect::CalcDir((LookAtEffect *)v6);
  EffectMgr::Add(v4, (Effect *)v6);
  return (LookAtEffect *)v6;
}

//----- (00695E70) --------------------------------------------------------
Effect *__thiscall EffectMgr::JustCreateAttachEffect(EffectMgr *this, char *pcEffectName, NiNode *pkTargetNode, IEffectHolder *pkHolder, float fTime)
{
  NiNode *v5; // eax@1
  NiNode *v6; // ebx@2
  NiObject *v7; // eax@2
  AttachEff *v8; // eax@4
  Effect *v9; // eax@5
  Effect *v10; // edi@5
  NiNode *v12; // esi@12
  NiNode *v13; // eax@12
  EffectMgr *v14; // [sp+14h] [bp-10h]@1

  v14 = this;
  v5 = EffectMgr::GetEffectNode(this, pcEffectName);
  if ( !v5 )
    return 0;
  v6 = 0;
  v7 = NiObject::Clone((NiObject *)&v5->vfptr);
  if ( v7 )
  {
    v6 = (NiNode *)v7;
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  }
  v8 = (AttachEff *)operator new(0x21Cu);
  if ( v8 )
  {
    AttachEff::AttachEff(v8, v6, pkHolder != 0, 0);
    v10 = v9;
  }
  else
  {
    v10 = 0;
  }
  if ( !v10 )
  {
    if ( v6 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v12 = (NiNode *)v10[1].m_uiRefCount;
  v13 = pkTargetNode;
  if ( v12 != pkTargetNode )
  {
    if ( v12 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
        v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
      v13 = pkTargetNode;
    }
    v10[1].m_uiRefCount = (unsigned int)v13;
    if ( v13 )
      InterlockedIncrement((volatile LONG *)&v13->m_uiRefCount);
  }
  v10[1].vfptr = 0;
  EffectMgr::Add(v14, v10);
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  return v10;
}

//----- (00695FE0) --------------------------------------------------------
char __thiscall EffectMgr::CreateEffect(EffectMgr *this, char *pcEffectName, NiPoint3 kPos, NiPoint3 kDir, float fTime, float fScale)
{
  EffectMgr *v6; // edi@1
  NiNode *v7; // eax@1
  char result; // al@2
  NiNode *v9; // esi@3
  Effect *v10; // eax@3
  Effect *v11; // eax@4
  Effect *v12; // esi@4
  NiNode *v13; // eax@7
  char *pcEffectNamea; // [sp+2Ch] [bp+8h]@8

  v6 = this;
  v7 = EffectMgr::GetEffectNode(this, pcEffectName);
  if ( v7
    && ((v9 = (NiNode *)NiObject::Clone((NiObject *)&v7->vfptr), (v10 = (Effect *)operator new(0x20Cu)) == 0) ? (v12 = 0) : (Effect::Effect(v10, v9, 0, 0), v12 = v11),
        v12) )
  {
    v12->vfptr[7].__vecDelDtor((NiRefObject *)v12, (unsigned int)&kPos);
    v12->vfptr[10].__vecDelDtor((NiRefObject *)v12, (unsigned int)&kDir);
    v13 = v12->m_spDefaultEffect.m_pObject;
    if ( v13 )
    {
      *(float *)&pcEffectNamea = fabs(fScale);
      v13->m_kLocal.m_fScale = *(float *)&pcEffectNamea;
    }
    EffectMgr::Add(v6, v12);
    EffectMgr::AttachEffectToWorld(v6, v12);
    ((void (__cdecl *)(_DWORD))v12->vfptr[15].__vecDelDtor)(LODWORD(fTime));
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006960D0) --------------------------------------------------------
char __thiscall EffectMgr::CreateAttachEffect(EffectMgr *this, unsigned int *dwEffHandle_, NiNode *_pEffect, NiNode *_pNode, float fTime, bool _bLoop, unsigned __int16 kHandle)
{
  AttachEff *v7; // eax@1
  Effect *v8; // eax@2
  Effect *v9; // esi@2
  char result; // al@5
  NiNode *v11; // edi@6
  EffectMgr *v12; // [sp+20h] [bp-10h]@1

  v12 = this;
  v7 = (AttachEff *)operator new(0x21Cu);
  if ( v7 )
  {
    AttachEff::AttachEff(v7, _pEffect, 0, 0);
    v9 = v8;
  }
  else
  {
    v9 = 0;
  }
  if ( v9 )
  {
    v11 = (NiNode *)v9[1].m_uiRefCount;
    if ( v11 != _pNode )
    {
      if ( v11 && !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
        v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
      v9[1].m_uiRefCount = (unsigned int)_pNode;
      if ( _pNode )
        InterlockedIncrement((volatile LONG *)&_pNode->m_uiRefCount);
    }
    v9->m_bLoop = _bLoop;
    v9[1].vfptr = 0;
    *dwEffHandle_ = (unsigned int)v9;
    ((void (__thiscall *)(_DWORD))v9->vfptr[24].__vecDelDtor)(v9);
    EffectMgr::Add(v12, v9);
    EffectMgr::AttachEffectToWorld(v12, v9);
    ((void (__cdecl *)(_DWORD))v9->vfptr[15].__vecDelDtor)(LODWORD(fTime));
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006961F0) --------------------------------------------------------
char __thiscall EffectMgr::CreateAttachScaleEffect(EffectMgr *this, unsigned int *dwEffHandle_, char *pcEffectName, NiNode *pkTargetNode, float fScale, float fTime)
{
  NiNode *v6; // eax@1
  char result; // al@2
  NiNode *v8; // esi@3
  AttachEff *v9; // eax@3
  Effect *v10; // eax@4
  Effect *v11; // esi@4
  NiNode *v12; // edi@7
  EffectMgr *v13; // [sp+18h] [bp-10h]@1
  char *pcEffectNamea; // [sp+34h] [bp+Ch]@3

  v13 = this;
  v6 = EffectMgr::GetEffectNode(this, pcEffectName);
  if ( v6
    && ((*(float *)&pcEffectNamea = fabs(fScale),
         v6->m_kLocal.m_fScale = *(float *)&pcEffectNamea,
         v8 = (NiNode *)NiObject::Clone((NiObject *)&v6->vfptr),
         (v9 = (AttachEff *)operator new(0x21Cu)) == 0) ? (v11 = 0) : (AttachEff::AttachEff(v9, v8, 0, 0), v11 = v10),
        v11) )
  {
    v12 = (NiNode *)v11[1].m_uiRefCount;
    if ( v12 != pkTargetNode )
    {
      if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
        v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
      v11[1].m_uiRefCount = (unsigned int)pkTargetNode;
      if ( pkTargetNode )
        InterlockedIncrement((volatile LONG *)&pkTargetNode->m_uiRefCount);
    }
    v11[1].vfptr = 0;
    v11->m_bLoop = 1;
    *dwEffHandle_ = (unsigned int)v11;
    EffectMgr::Add(v13, v11);
    EffectMgr::AttachEffectToWorld(v13, v11);
    ((void (__cdecl *)(_DWORD))v11->vfptr[15].__vecDelDtor)(LODWORD(fTime));
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00696320) --------------------------------------------------------
NiNode *__stdcall EffectMgr::GetEffPos(AbnormalStateViewInfo::EffPosEnum eEffPos, Char *pkTarget)
{
  NiNode *result; // eax@1

  result = 0;
  switch ( eEffPos )
  {
    case 3:
      if ( pkTarget != (Char *)-780 )
        result = pkTarget->m_kCharShape.m_apkLinkNode[1];
      break;
    case 2:
      if ( pkTarget != (Char *)-780 )
        result = pkTarget->m_kCharShape.m_apkLinkNode[5];
      break;
    case 6:
      if ( pkTarget != (Char *)-780 )
        result = pkTarget->m_kCharShape.m_apkLinkNode[7];
      break;
    case 7:
      if ( pkTarget != (Char *)-780 )
        result = pkTarget->m_kCharShape.m_apkLinkNode[8];
      break;
    case 0:
    case 1:
      result = pkTarget->m_spScene.m_pObject;
      break;
    default:
      return result;
  }
  return result;
}

//----- (006963A0) --------------------------------------------------------
AttachEff *__thiscall EffectMgr::JustCreateAttachEffect(EffectMgr *this, char *pcEffectName, Char *pkTarget, AbnormalStateViewInfo::EffPosEnum eEffPos, float fTime, bool bShow)
{
  NiNode *v6; // eax@1
  NiNode *v7; // ebx@2
  NiObject *v8; // eax@2
  AttachEff *v9; // eax@4
  AttachEff *v10; // eax@5
  AttachEff *v11; // esi@5
  NiNode *v13; // eax@12
  IEffectHolder *v14; // ecx@13
  EffectMgr *v15; // [sp+1Ch] [bp-10h]@1

  v15 = this;
  v6 = EffectMgr::GetEffectNode(this, pcEffectName);
  if ( !v6 )
    return 0;
  v7 = 0;
  v8 = NiObject::Clone((NiObject *)&v6->vfptr);
  if ( v8 )
  {
    v7 = (NiNode *)v8;
    InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  }
  v9 = (AttachEff *)operator new(0x21Cu);
  if ( v9 )
  {
    AttachEff::AttachEff(v9, v7, 0, 0);
    v11 = v10;
  }
  else
  {
    v11 = 0;
  }
  if ( !v11 )
  {
    if ( v7 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    }
    return 0;
  }
  v13 = EffectMgr::GetEffPos(eEffPos, pkTarget);
  if ( pkTarget )
    v14 = (IEffectHolder *)&pkTarget->vfptr;
  else
    v14 = 0;
  AttachEff::SetTargetNode(v11, v13, v14);
  v11->vfptr[24].__vecDelDtor((NiRefObject *)v11, pkTarget->m_kHandle);
  EffectMgr::Add(v15, (Effect *)&v11->vfptr);
  if ( bShow )
  {
    v11->vfptr[15].__vecDelDtor((NiRefObject *)v11, LODWORD(fTime));
    EffectMgr::AttachEffectToWorld(v15, (Effect *)&v11->vfptr);
  }
  if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  return v11;
}

//----- (00696500) --------------------------------------------------------
char __thiscall EffectMgr::CreateAttachEffect(EffectMgr *this, unsigned int *dwEffHandle_, char *pcEffectName, NiNode *_pNode, float fTime, bool _bLoop)
{
  EffectMgr *v6; // esi@1
  NiNode *v7; // eax@1
  char result; // al@2
  NiNode *v9; // eax@3

  v6 = this;
  v7 = EffectMgr::GetEffectNode(this, pcEffectName);
  if ( v7 )
  {
    v9 = (NiNode *)NiObject::Clone((NiObject *)&v7->vfptr);
    result = EffectMgr::CreateAttachEffect(v6, dwEffHandle_, v9, _pNode, fTime, _bLoop, 0xFFFFu);
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00696550) --------------------------------------------------------
char __thiscall EffectMgr::CreateAttachEffect(EffectMgr *this, unsigned int *dwEffHandle_, char *pcEffectName, Char *pkTarget, AbnormalStateViewInfo::EffPosEnum eEffPos, float fTime, bool _bLoop, bool bAura, bool bHold, bool bShow)
{
  NiNode *v10; // eax@1
  char result; // al@2
  NiNode *v12; // esi@3
  AttachEff *v13; // eax@3
  AttachEff *v14; // eax@4
  AttachEff *v15; // esi@4
  NiNode *v16; // eax@7
  IEffectHolder *v17; // ecx@10
  EffectMgr *v18; // [sp+18h] [bp-10h]@1

  v18 = this;
  v10 = EffectMgr::GetEffectNode(this, pcEffectName);
  if ( v10
    && ((v12 = (NiNode *)NiObject::Clone((NiObject *)&v10->vfptr), (v13 = (AttachEff *)operator new(0x21Cu)) == 0) ? (v15 = 0) : (AttachEff::AttachEff(v13, v12, 0, 0), v15 = v14),
        v15) )
  {
    v16 = EffectMgr::GetEffPos(eEffPos, pkTarget);
    if ( !v16 )
      v16 = pkTarget->m_spScene.m_pObject;
    if ( pkTarget )
      v17 = (IEffectHolder *)&pkTarget->vfptr;
    else
      v17 = 0;
    AttachEff::SetTargetNode(v15, v16, v17);
    v15->m_bLoop = _bLoop;
    if ( bHold )
      AttachEff::SetEffectHold(v15, 1);
    if ( !strcmp(pcEffectName, "Sta_TimeAttackLast") )
      AttachEff::SetEffectHold(v15, 1);
    *dwEffHandle_ = (unsigned int)v15;
    v15->vfptr[24].__vecDelDtor((NiRefObject *)v15, pkTarget->m_kHandle);
    if ( bAura )
    {
      v15->m_bEnableAura = 1;
      v15->m_bAura = 1;
    }
    EffectMgr::Add(v18, (Effect *)&v15->vfptr);
    EffectMgr::AttachEffectToWorld(v18, (Effect *)&v15->vfptr);
    if ( bShow )
      v15->vfptr[15].__vecDelDtor((NiRefObject *)v15, LODWORD(fTime));
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006966D0) --------------------------------------------------------
char __thiscall EffectMgr::CreateAniCtrlEffect(EffectMgr *this, unsigned int *dwEffHandle_, char *pcEffectName, Char *pkTarget, AbnormalStateViewInfo::EffPosEnum eEffPos, float fTime, bool _bLoop, int kID)
{
  EffectMgr *v8; // ebx@1
  NiNode *v9; // eax@1
  char result; // al@2
  NiNode *v11; // esi@3
  AttachEff *v12; // eax@3
  AttachEff *v13; // eax@4
  AttachEff *v14; // esi@4
  NiNode *v15; // eax@7
  IEffectHolder *v16; // ecx@10
  AbnormalStateInfo *v17; // eax@13
  AbnormalStateInfo *v18; // ebx@13
  EffectMgr *v19; // [sp+10h] [bp-10h]@1

  v8 = this;
  v19 = this;
  v9 = EffectMgr::GetEffectNode(this, pcEffectName);
  if ( v9
    && ((v11 = (NiNode *)NiObject::Clone((NiObject *)&v9->vfptr), (v12 = (AttachEff *)operator new(0x21Cu)) == 0) ? (v14 = 0) : (AttachEff::AttachEff(v12, v11, 0, 0), v14 = v13),
        v14) )
  {
    v15 = EffectMgr::GetEffPos(eEffPos, pkTarget);
    if ( !v15 )
      v15 = pkTarget->m_spScene.m_pObject;
    if ( pkTarget )
      v16 = (IEffectHolder *)&pkTarget->vfptr;
    else
      v16 = 0;
    AttachEff::SetTargetNode(v14, v15, v16);
    v14->m_bLoop = 1;
    *dwEffHandle_ = (unsigned int)v14;
    v14->vfptr[24].__vecDelDtor((NiRefObject *)v14, pkTarget->m_kHandle);
    if ( ((int (__thiscall *)(_DWORD))v14->vfptr[4].__vecDelDtor)(v14) )
    {
      v17 = IIDTableBase<AbnormalStateInfo,AbnormalStateInfoTab,unsigned short>::GetByID(kID);
      v18 = v17;
      if ( v17 )
      {
        if ( SubAbStateInfoTab::GetByInxName(v17->SubAbState) )
          v14->m_kAbStateID = v18->AbStataIndex;
      }
      v8 = v19;
    }
    v14->m_kAniTargetHandle = pkTarget->m_kHandle;
    v14->m_uiEffectType = 1;
    EffectMgr::Add(v8, (Effect *)&v14->vfptr);
    EffectMgr::AttachEffectToWorld(v8, (Effect *)&v14->vfptr);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00696830) --------------------------------------------------------
bool __thiscall EffectMgr::CreateStretchEffect(EffectMgr *this, char *pcEffectName, NiPoint3 kPos, NiPoint3 kDir, Char *pkCaster, Char *pkTarget, float fTime)
{
  NiNode *v7; // eax@1
  Effect *v8; // ebx@1
  NiNode *v9; // eax@2
  NiNode *v10; // esi@2
  Effect *v11; // eax@2
  Effect *v12; // eax@3
  Char *v13; // esi@5
  Char *v14; // eax@5
  Char *v15; // edi@5
  int v16; // esi@7
  int v17; // eax@7
  double v18; // st7@7
  NiPoint3 *v19; // eax@7
  Char *v20; // esi@7
  NiRefObjectVtbl *v21; // esi@7
  NiPoint3 *v22; // eax@7
  EffectMgr *v23; // esi@8
  EffectMgr *v24; // ecx@8
  NiPoint3 v26; // [sp+18h] [bp-E4h]@7
  NiPoint3 CastPos; // [sp+24h] [bp-D8h]@7
  Effect *v28; // [sp+30h] [bp-CCh]@2
  EffectMgr *v29; // [sp+34h] [bp-C8h]@1
  Char *v30; // [sp+38h] [bp-C4h]@1
  NiPoint3 kPoint3Length; // [sp+3Ch] [bp-C0h]@7
  NiNode *pkNode; // [sp+48h] [bp-B4h]@2
  NiPoint3 pt; // [sp+4Ch] [bp-B0h]@7
  Char *_pkChar; // [sp+58h] [bp-A4h]@1
  NiMatrix3 v35; // [sp+5Ch] [bp-A0h]@7
  NiMatrix3 result; // [sp+80h] [bp-7Ch]@7
  NiMatrix3 MakeScale; // [sp+A4h] [bp-58h]@7
  NiMatrix3 makerot; // [sp+C8h] [bp-34h]@7
  int v39; // [sp+F8h] [bp-4h]@2

  v29 = this;
  v30 = pkCaster;
  _pkChar = pkTarget;
  v7 = EffectMgr::GetEffectNode(this, pcEffectName);
  v8 = 0;
  if ( v7 )
  {
    v9 = (NiNode *)NiObject::Clone((NiObject *)&v7->vfptr);
    v10 = v9;
    pkNode = v9;
    v11 = (Effect *)operator new(0x20Cu);
    v28 = v11;
    v39 = 0;
    if ( v11 )
    {
      Effect::Effect(v11, v10, 0, 0);
      v8 = v12;
    }
    v39 = -1;
    if ( v8 )
    {
      v13 = CharMgr::GetChar(&g_kCharMgr, pkCaster);
      v14 = CharMgr::GetChar(&g_kCharMgr, _pkChar);
      v15 = v14;
      if ( v13 && v14 )
      {
        v16 = ((int (__thiscall *)(Char *))v13->vfptr[6].Deaffect)(v13);
        v17 = ((int (__thiscall *)(Char *))v15->vfptr[6].Deaffect)(v15);
        pt.x = *(float *)v17 - *(float *)v16;
        v18 = *(float *)(v17 + 4);
        kPoint3Length = pt;
        pt.y = v18 - *(float *)(v16 + 4);
        pt.z = *(float *)(v17 + 8) - *(float *)(v16 + 8);
        *(float *)&_pkChar = pt.y * pt.y + pt.x * pt.x + pt.z * pt.z;
        NiPoint3::Unitize(&kPoint3Length);
        NiMatrix3::MakeIdentity(&makerot);
        pt.x = 0.0;
        pt.y = 0.0;
        pt.z = 1.0;
        v19 = NiPoint3::Cross(&kPoint3Length, &CastPos, &pt);
        makerot.m_pEntry[0][0] = v19->x;
        makerot.m_pEntry[1][0] = v19->y;
        makerot.m_pEntry[2][0] = v19->z;
        makerot.m_pEntry[0][1] = kPoint3Length.x;
        makerot.m_pEntry[1][1] = kPoint3Length.y;
        makerot.m_pEntry[2][1] = kPoint3Length.z;
        makerot.m_pEntry[0][2] = 0.0;
        makerot.m_pEntry[1][2] = 0.0;
        makerot.m_pEntry[2][2] = 1.0;
        NiMatrix3::MakeIdentity(&MakeScale);
        MakeScale.m_pEntry[0][0] = 0.5;
        MakeScale.m_pEntry[1][0] = 0.0;
        MakeScale.m_pEntry[2][0] = 0.0;
        *(float *)&_pkChar = sqrt(*(float *)&_pkChar);
        *(float *)&pkNode = *(float *)&_pkChar / pkNode->m_kWorldBound.m_fRadius;
        kPoint3Length.y = *(float *)&pkNode * 0.5;
        MakeScale.m_pEntry[0][1] = 0.0;
        MakeScale.m_pEntry[1][1] = kPoint3Length.y;
        MakeScale.m_pEntry[2][1] = 0.0;
        NiMatrix3::MakeIdentity(&result);
        qmemcpy(&result, NiMatrix3::operator*(&makerot, &v35, &MakeScale), sizeof(result));
        v20 = v30;
        Char::GetChestPos(v30, &CastPos);
        Char::GetChestPos(v20, &CastPos);
        qmemcpy(&v8->m_spDefaultEffect.m_pObject->m_kLocal, &makerot, 0x24u);
        v21 = v8->vfptr;
        v22 = Char::GetChestPos(v30, &v26);
        v21[7].__vecDelDtor((NiRefObject *)v8, (unsigned int)v22);
      }
      v23 = v29;
      v24 = v29;
      v8->m_bLoop = 1;
      EffectMgr::Add(v24, v8);
      EffectMgr::AttachEffectToWorld(v23, v8);
      v8->vfptr[15].__vecDelDtor((NiRefObject *)v8, LODWORD(fTime));
    }
  }
  return 0;
}

//----- (00696B30) --------------------------------------------------------
char __thiscall EffectMsg::Play(EffectMsg *this, EFFECT_MESSAGE_TYPE Type)
{
  EffectMsg *v2; // ebx@1
  NiNode *v3; // esi@2
  float v4; // ST18_4@5
  char *v5; // eax@5
  char result; // al@9

  v2 = this;
  if ( (unsigned int)Type > 0xE )
    goto LABEL_13;
  v3 = this->m_spEffectMsg[Type].m_pObject;
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  if ( v3 )
  {
    v4 = (double)(PgWin::ms_uiScreenWidth >> 1);
    v3->m_kLocal.m_Translate.x = v4;
    v3->m_kLocal.m_Translate.y = -500.0;
    v3->m_kLocal.m_Translate.z = 0.0;
    PgWinMgr::ClearFullScreenEffect(&Pgg_kWinMgr, Timer::ms_fCurTime);
    PgWinMgr::StartFullScreenEffect(&Pgg_kWinMgr, Timer::ms_fCurTime, (NiAVObject *)&v3->vfptr);
    v5 = v2->m_kSoundFilename[Type]._Bx._Buf;
    if ( v2->m_kSoundFilename[Type]._Myres >= 0x10 )
      v5 = *(char **)v5;
    SoundMgr::PlayInterfaceSound(&g_kSoundMgr, v5);
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    result = 1;
  }
  else
  {
LABEL_13:
    result = 0;
  }
  return result;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00696C60) --------------------------------------------------------
void __thiscall EffectMsg::EffectMsg(EffectMsg *this)
{
  EffectMsg *v1; // ebx@1
  unsigned int v2; // edi@1
  NiNode *v3; // esi@2

  v1 = this;
  `eh vector constructor iterator'(
    this,
    4u,
    15,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v2 = 0;
  `eh vector constructor iterator'(
    v1->m_kSoundFilename,
    0x1Cu,
    15,
    (void (__thiscall *)(void *))std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>,
    (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
  do
  {
    v3 = v1->m_spEffectMsg[v2].m_pObject;
    if ( v3 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
      v1->m_spEffectMsg[v2].m_pObject = 0;
    }
    ++v2;
  }
  while ( v2 < 0xF );
}

//----- (00696D10) --------------------------------------------------------
void __thiscall EffectMsg::~EffectMsg(EffectMsg *this)
{
  EffectMsg *v1; // esi@1

  v1 = this;
  `eh vector destructor iterator'(
    this->m_kSoundFilename,
    0x1Cu,
    15,
    (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
  `eh vector destructor iterator'(
    v1,
    4u,
    15,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
}

//----- (00696D80) --------------------------------------------------------
char __thiscall EffectMsg::Load(EffectMsg *this)
{
  EffectMsg *v1; // edi@1
  unsigned int v2; // eax@1
  const char *v3; // esi@4
  int v4; // eax@8
  char v5; // cl@9
  unsigned int v6; // eax@10
  char *v7; // edi@10
  char v8; // cl@11
  NiObjectNET *v9; // edi@12
  NiObjectNET *v10; // esi@12
  unsigned int v11; // esi@19
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v12; // edi@20
  EffectMsg *v14; // [sp+10h] [bp-364h]@1
  unsigned int i; // [sp+14h] [bp-360h]@1
  NiObjectNET **v16; // [sp+18h] [bp-35Ch]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > Sound[15]; // [sp+1Ch] [bp-358h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > Nif[15]; // [sp+1C0h] [bp-1B4h]@1
  int v19; // [sp+370h] [bp-4h]@1

  v1 = this;
  v14 = this;
  Nif[0]._Myres = 15;
  Nif[0]._Mysize = 0;
  Nif[0]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(Nif, "GuildTWin.nif", 0xDu);
  v19 = 0;
  Nif[1]._Myres = 15;
  Nif[1]._Mysize = 0;
  Nif[1]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Nif[1], "GuildTLose.nif", 0xEu);
  LOBYTE(v19) = 1;
  Nif[2]._Myres = 15;
  Nif[2]._Mysize = 0;
  Nif[2]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Nif[2], "GuildTDraw.nif", 0xEu);
  LOBYTE(v19) = 2;
  Nif[3]._Myres = 15;
  Nif[3]._Mysize = 0;
  Nif[3]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Nif[3], "Start.nif", 9u);
  LOBYTE(v19) = 3;
  Nif[4]._Myres = 15;
  Nif[4]._Mysize = 0;
  Nif[4]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Nif[4], "StaCount8.nif", 0xDu);
  LOBYTE(v19) = 4;
  Nif[5]._Myres = 15;
  Nif[5]._Mysize = 0;
  Nif[5]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Nif[5], "KQuestSucc.nif", 0xEu);
  LOBYTE(v19) = 5;
  Nif[6]._Myres = 15;
  Nif[6]._Mysize = 0;
  Nif[6]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Nif[6], "KQuestFail.nif", 0xEu);
  LOBYTE(v19) = 6;
  Nif[7]._Myres = 15;
  Nif[7]._Mysize = 0;
  Nif[7]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Nif[7], "Start_Olympic.nif", 0x11u);
  LOBYTE(v19) = 7;
  Nif[8]._Myres = 15;
  Nif[8]._Mysize = 0;
  Nif[8]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Nif[8], "Goal_Olympic.nif", 0x10u);
  LOBYTE(v19) = 8;
  Nif[9]._Myres = 15;
  Nif[9]._Mysize = 0;
  Nif[9]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Nif[9], "Win_Soccer.nif", 0xEu);
  LOBYTE(v19) = 9;
  Nif[10]._Myres = 15;
  Nif[10]._Mysize = 0;
  Nif[10]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Nif[10], "Lose_Soccer.nif", 0xFu);
  LOBYTE(v19) = 10;
  Nif[11]._Myres = 15;
  Nif[11]._Mysize = 0;
  Nif[11]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Nif[11], "Draw_Soccer.nif", 0xFu);
  LOBYTE(v19) = 11;
  Nif[12]._Myres = 15;
  Nif[12]._Mysize = 0;
  Nif[12]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Nif[12], "Start_Soccer.nif", 0x10u);
  LOBYTE(v19) = 12;
  Nif[13]._Myres = 15;
  Nif[13]._Mysize = 0;
  Nif[13]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Nif[13], "Goal_Soccer.nif", 0xFu);
  LOBYTE(v19) = 13;
  Nif[14]._Myres = 15;
  Nif[14]._Mysize = 0;
  Nif[14]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Nif[14], "Start2.nif", 0xAu);
  v19 = 14;
  Sound[0]._Myres = 15;
  Sound[0]._Mysize = 0;
  Sound[0]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(Sound, "KQSpringWin", 0xBu);
  LOBYTE(v19) = 15;
  Sound[1]._Myres = 15;
  Sound[1]._Mysize = 0;
  Sound[1]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Sound[1], "KQSpringLose", 0xCu);
  LOBYTE(v19) = 16;
  Sound[2]._Myres = 15;
  Sound[2]._Mysize = 0;
  Sound[2]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Sound[2], "KQSpringDraw", 0xCu);
  LOBYTE(v19) = 17;
  Sound[3]._Myres = 15;
  Sound[3]._Mysize = 0;
  Sound[3]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Sound[3], "Start", 5u);
  LOBYTE(v19) = 18;
  Sound[4]._Myres = 15;
  Sound[4]._Mysize = 0;
  Sound[4]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Sound[4], "StaCount8", 9u);
  LOBYTE(v19) = 19;
  Sound[5]._Myres = 15;
  Sound[5]._Mysize = 0;
  Sound[5]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Sound[5], "KDSUCCESS", 9u);
  LOBYTE(v19) = 20;
  Sound[6]._Myres = 15;
  Sound[6]._Mysize = 0;
  Sound[6]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Sound[6], "KDFAIL", 6u);
  LOBYTE(v19) = 21;
  Sound[7]._Myres = 15;
  Sound[7]._Mysize = 0;
  Sound[7]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Sound[7], "Start", 5u);
  LOBYTE(v19) = 22;
  Sound[8]._Myres = 15;
  Sound[8]._Mysize = 0;
  Sound[8]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Sound[8], "DiceFinalResult", 0xFu);
  LOBYTE(v19) = 23;
  Sound[9]._Myres = 15;
  Sound[9]._Mysize = 0;
  Sound[9]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Sound[9], "KQSpringWin", 0xBu);
  LOBYTE(v19) = 24;
  Sound[10]._Myres = 15;
  Sound[10]._Mysize = 0;
  Sound[10]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Sound[10], "KQSpringLose", 0xCu);
  LOBYTE(v19) = 25;
  Sound[11]._Myres = 15;
  Sound[11]._Mysize = 0;
  Sound[11]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Sound[11], "KQSpringDraw", 0xCu);
  LOBYTE(v19) = 26;
  Sound[12]._Myres = 15;
  Sound[12]._Mysize = 0;
  Sound[12]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Sound[12], "KDSoccer_whistle", 0x10u);
  LOBYTE(v19) = 27;
  Sound[13]._Myres = 15;
  Sound[13]._Mysize = 0;
  Sound[13]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Sound[13], "DiceFinalResult", 0xFu);
  LOBYTE(v19) = 28;
  Sound[14]._Myres = 15;
  Sound[14]._Mysize = 0;
  Sound[14]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Sound[14], "Start2", 6u);
  v2 = 0;
  LOBYTE(v19) = 29;
  v16 = (NiObjectNET **)v1;
  for ( i = 0; ; v2 = i * 28 )
  {
    if ( *(unsigned int *)((char *)&Nif[0]._Myres + v2) < 0x10 )
      v3 = (char *)Nif + v2;
    else
      v3 = *(char **)((char *)&Nif[0]._Bx._Ptr + v2);
    if ( !Folder::m_bInit )
      Folder::Init();
    v4 = 0;
    do
    {
      v5 = *(&Folder::m_acEffect + v4);
      *(&Folder::m_acMerge + v4++) = v5;
    }
    while ( v5 );
    v6 = strlen(v3) + 1;
    v7 = &Folder::m_acMerge - 1;
    do
      v8 = (v7++)[1];
    while ( v8 );
    qmemcpy(v7, v3, v6);
    v9 = Ns_LoadNifFile(&Folder::m_acMerge, 0);
    v10 = *v16;
    if ( *v16 != v9 )
    {
      if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
      *v16 = v9;
      if ( v9 )
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
    }
    v11 = i * 28;
    v12 = *(unsigned int *)((char *)&Sound[0]._Myres + i * 28) < 0x10 ? &Sound[i] : Sound[i]._Bx._Ptr;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v14->m_kSoundFilename[i],
      v12->_Bx._Buf,
      strlen(v12->_Bx._Buf));
    ++v16;
    ++i;
    if ( (signed int)(v11 + 28) >= 420 )
      break;
  }
  LOBYTE(v19) = 14;
  `eh vector destructor iterator'(
    Sound,
    0x1Cu,
    15,
    (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
  v19 = -1;
  `eh vector destructor iterator'(
    Nif,
    0x1Cu,
    15,
    (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006973C0) --------------------------------------------------------
void EffectObject::EffectObject()
{
  ;
}

//----- (006973E0) --------------------------------------------------------
void __thiscall ExpEffect::ExpEffect(ExpEffect *this, NiNode *pkNode, bool bCreateProgramEff)
{
  ExpEffect *v3; // esi@1

  v3 = this;
  Effect::Effect((Effect *)&this->vfptr, pkNode, bCreateProgramEff, 0);
  v3->vfptr = (NiRefObjectVtbl *)&ExpEffect::`vftable'{for `NiRefObject'};
  v3->vfptr = (IEffectDestroyMessengerVtbl *)&ExpEffect::`vftable'{for `IEffectDestroyMessenger'};
  NpNs_MoveToTarget::NpNs_MoveToTarget(&v3->m_kMoveToTarget);
}
// 9BD408: using guessed type int (__stdcall *ExpEffect::`vftable'{for `IEffectDestroyMessenger'})(int);
// 9BD41C: using guessed type int (__thiscall *ExpEffect::`vftable'{for `NiRefObject'})(void *p, char);

//----- (00697450) --------------------------------------------------------
void __thiscall ExpEffect::~ExpEffect(ExpEffect *this)
{
  ExpEffect *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ExpEffect::`vftable'{for `NiRefObject'};
  this->vfptr = (IEffectDestroyMessengerVtbl *)&ExpEffect::`vftable'{for `IEffectDestroyMessenger'};
  NpNs_MoveToTarget::~NpNs_MoveToTarget(&this->m_kMoveToTarget);
  Effect::~Effect((Effect *)&v1->vfptr);
}
// 9BD408: using guessed type int (__stdcall *ExpEffect::`vftable'{for `IEffectDestroyMessenger'})(int);
// 9BD41C: using guessed type int (__thiscall *ExpEffect::`vftable'{for `NiRefObject'})(void *p, char);

//----- (006974C0) --------------------------------------------------------
bool __thiscall ExpEffect::IsEnd(ExpEffect *this, float fTime)
{
  return (unsigned __int8)((int (*)(void))this->vfptr[23].__vecDelDtor)() != 0;
}

//----- (006974D0) --------------------------------------------------------
bool __thiscall ExpEffect::IsHitTarget(ExpEffect *this)
{
  return (unsigned __int8)(*(int (__thiscall **)(NpNs_MoveToTarget *))&this->m_kMoveToTarget.vfptr->gap4[0])(&this->m_kMoveToTarget) == 0;
}

//----- (006974F0) --------------------------------------------------------
void __userpurge ExpEffect::Update(ExpEffect *this@<ecx>, int a2@<ebx>, int a3@<edi>, int a4@<esi>, float fTime)
{
  int v5; // ST04_4@1
  ExpEffect *v6; // edi@1
  Char *v7; // eax@1
  Char *v8; // ebx@1
  NiPoint3 *v9; // eax@4
  float v10; // edx@4
  NpNs_MoveToTargetVtbl *v11; // eax@4
  int v12; // eax@5
  void *(__thiscall *v13)(NiRefObject *, unsigned int); // edx@5
  void *(__thiscall *v14)(NiRefObject *, unsigned int); // edx@7
  NiPoint3 pos3Dir; // [sp+10h] [bp-24h]@1
  NiPoint3 pos3TargetPos; // [sp+1Ch] [bp-18h]@1
  NiPoint3 kPos; // [sp+28h] [bp-Ch]@5

  v5 = a3;
  v6 = this;
  Effect::Update((Effect *)&this->vfptr, fTime);
  ((void (__thiscall *)(NpNs_MoveToTarget *, _DWORD, int, int, int, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v6->m_kMoveToTarget.vfptr->Update)(
    &v6->m_kMoveToTarget,
    LODWORD(fTime),
    v5,
    a4,
    a2,
    LODWORD(pos3Dir.x),
    LODWORD(pos3Dir.y),
    LODWORD(pos3Dir.z),
    LODWORD(pos3TargetPos.x),
    LODWORD(pos3TargetPos.y),
    LODWORD(pos3TargetPos.z));
  v7 = CharMgr::GetChar(&g_kCharMgr, g_pkMainChar->m_kHandle);
  v8 = v7;
  if ( v7 && Char::IsUpdate(v7) && !v8->m_bCulled )
  {
    v9 = Char::GetChestPos(v8, &pos3Dir);
    pos3TargetPos.x = v9->x;
    pos3TargetPos.y = v9->y;
    v10 = v9->z;
    v11 = v6->m_kMoveToTarget.vfptr;
    pos3TargetPos.z = v10;
    v11->StartMove(&v6->m_kMoveToTarget, &pos3TargetPos);
    if ( v6->m_spNode.m_pObject )
    {
      v12 = ((int (__thiscall *)(NpNs_MoveToTarget *, _DWORD))v6->m_kMoveToTarget.vfptr->GetCurrentPos)(
              &v6->m_kMoveToTarget,
              LODWORD(kPos.x));
      kPos.x = *(float *)v12;
      kPos.y = *(float *)(v12 + 4);
      v13 = v6->vfptr[7].__vecDelDtor;
      kPos.z = *(float *)(v12 + 8);
      v13((NiRefObject *)&v6->vfptr, (unsigned int)&kPos);
      pos3Dir.x = kPos.x - pos3TargetPos.x;
      pos3Dir.y = kPos.y - pos3TargetPos.y;
      pos3Dir.z = kPos.z - pos3TargetPos.z;
      if ( NiPoint3::Unitize(&pos3Dir) < 5.0 )
        v6->m_kMoveToTarget.vfptr->Stop(&v6->m_kMoveToTarget);
      v14 = v6->vfptr[11].__vecDelDtor;
      LODWORD(kPos.x) = &pos3Dir;
      ((void (__thiscall *)(ExpEffect *))v14)(v6);
    }
  }
  else
  {
    v6->m_kMoveToTarget.vfptr->Stop(&v6->m_kMoveToTarget);
  }
}
// 6974F0: could not find valid save-restore pair for ebx
// 6974F0: could not find valid save-restore pair for edi
// 6974F0: could not find valid save-restore pair for esi

//----- (00697640) --------------------------------------------------------
void __thiscall ExpEffect::Start(ExpEffect *this, float fTime)
{
  Effect::Start((Effect *)&this->vfptr, fTime);
}

//----- (00697660) --------------------------------------------------------
NiRTTI *ExpEffect::GetRTTI()
{
  return &ExpEffect::m_RTTI;
}

//----- (00697670) --------------------------------------------------------
ExpEffect *__thiscall ExpEffect::`vector deleting destructor'(char *this, unsigned int a2)
{
  return ExpEffect::`vector deleting destructor'((ExpEffect *)(this - 8), a2);
}

//----- (00697680) --------------------------------------------------------
ExpEffect *__thiscall ExpEffect::`vector deleting destructor'(ExpEffect *this, unsigned int a2)
{
  ExpEffect *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ExpEffect::`vftable'{for `NiRefObject'};
  this->vfptr = (IEffectDestroyMessengerVtbl *)&ExpEffect::`vftable'{for `IEffectDestroyMessenger'};
  NpNs_MoveToTarget::~NpNs_MoveToTarget(&this->m_kMoveToTarget);
  Effect::~Effect((Effect *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BD408: using guessed type int (__stdcall *ExpEffect::`vftable'{for `IEffectDestroyMessenger'})(int);
// 9BD41C: using guessed type int (__thiscall *ExpEffect::`vftable'{for `NiRefObject'})(void *p, char);

//----- (00697700) --------------------------------------------------------
void __thiscall SpEffect::SpEffect(SpEffect *this, NiNode *pkEffect)
{
  SpEffect *v2; // esi@1
  NiNode *v3; // edi@1

  v2 = this;
  this->m_spEffect.m_pObject = 0;
  CNSTimer_MarkCheck::CNSTimer_MarkCheck(&this->m_kMarkCheck);
  NsEffect::NsEffect(&v2->m_kEffect);
  v3 = v2->m_spEffect.m_pObject;
  if ( v2->m_spEffect.m_pObject != pkEffect )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spEffect.m_pObject = pkEffect;
    if ( pkEffect )
      InterlockedIncrement((volatile LONG *)&pkEffect->m_uiRefCount);
  }
  *(_WORD *)&v2->m_bLive = 0;
  v2->m_bClamp = 0;
}

//----- (006977B0) --------------------------------------------------------
void __thiscall SpEffect::Start(SpEffect *this, NiNode *pkParent)
{
  SpEffect *v2; // esi@1

  v2 = this;
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))pkParent->vfptr[29].__vecDelDtor)(
    pkParent,
    this->m_spEffect.m_pObject,
    0);
  NsEffect::SetEffectNode(&v2->m_kEffect, (NiAVObject *)&v2->m_spEffect.m_pObject->vfptr);
  NsEffect::Start(&v2->m_kEffect, Timer::ms_fCurTime);
  v2->m_kMarkCheck.m_fMarkTime = v2->m_kEffect.m_fMaxTime;
  CNSTimer_MarkCheck::ReSet(&v2->m_kMarkCheck, Timer::ms_fCurTime, OVER);
  v2->m_bLive = 1;
  NiAVObject::UpdateProperties((NiAVObject *)&pkParent->vfptr);
  NiAVObject::UpdateEffects((NiAVObject *)&pkParent->vfptr);
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00697820) --------------------------------------------------------
void __thiscall SpEffect::End(SpEffect *this, NiNode *pkParent)
{
  SpEffect *v2; // edi@1
  NiNode *v3; // esi@4

  v2 = this;
  if ( pkParent && this->m_spEffect.m_pObject )
  {
    ((void (__stdcall *)(_DWORD, _DWORD))pkParent->vfptr[30].__vecDelDtor)(&pkParent, this->m_spEffect.m_pObject);
    if ( pkParent )
    {
      v3 = pkParent;
      if ( !InterlockedDecrement((volatile LONG *)&pkParent->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v2->m_bLive = 0;
  }
}

//----- (00697870) --------------------------------------------------------
void __thiscall SpEffect::Update(SpEffect *this, float fTime)
{
  SpEffect *v2; // esi@1
  int v3; // eax@4
  NiNode *v4; // ecx@6
  int v5; // eax@9

  v2 = this;
  if ( this->m_bLive )
  {
    if ( this->m_bLoop || this->m_bClamp )
    {
      if ( this->m_bClamp == 1 )
      {
        CNSTimer_MarkCheck::Update(&this->m_kMarkCheck, fTime);
        if ( v5 == 1 )
        {
LABEL_10:
          v2->m_bLive = 0;
          return;
        }
      }
    }
    else
    {
      CNSTimer_MarkCheck::Update(&this->m_kMarkCheck, fTime);
      if ( v3 == 1 && v2->m_spEffect.m_pObject )
      {
        v4 = v2->m_spEffect.m_pObject->m_pkParent;
        if ( v4 )
        {
          ((void (__stdcall *)(float *, NiNode *))v4->vfptr[30].__vecDelDtor)(&fTime, v2->m_spEffect.m_pObject);
          NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&fTime);
          v2->m_bLive = 0;
          return;
        }
        goto LABEL_10;
      }
    }
  }
}

//----- (006978F0) --------------------------------------------------------
void __thiscall StretchEffect::SetAniSpeedCtrl(StretchEffect *this, float fRequency, float fPhase)
{
  EffectCtrl *v3; // esi@1

  v3 = &this->m_kCtrl;
  EffectCtrl::SetFrequency(&this->m_kCtrl, fRequency);
  EffectCtrl::SetPhase(v3, fPhase);
}

//----- (00697920) --------------------------------------------------------
char __stdcall StretchEffect::IsEnd(float fTime)
{
  return 1;
}

//----- (00697930) --------------------------------------------------------
void __thiscall StretchEffect::OnEnd(StretchEffect *this, float fTime)
{
  StretchEffect *v2; // esi@1
  Char *v3; // eax@1

  v2 = this;
  v3 = CharMgr::GetChar(&g_kCharMgr, this->m_kEndCharHandle);
  if ( v3 )
    DamageInfoSet::Applicate(&v2->m_kDamageInfoSet, v3, 1);
}

//----- (00697980) --------------------------------------------------------
void __thiscall StretchEffect::Update(StretchEffect *this, float fTime)
{
  Effect::Update((Effect *)&this->vfptr, fTime);
}

//----- (006979A0) --------------------------------------------------------
void __thiscall StretchEffect::Start(StretchEffect *this, float fTime)
{
  Effect::Start((Effect *)&this->vfptr, fTime);
}

//----- (006979C0) --------------------------------------------------------
void __thiscall StretchEffect::CopyMember(StretchEffect *this, Effect *pkEffect)
{
  StretchEffect *v2; // edi@1
  NiNode *v3; // ecx@1
  NiRefObjectVtbl *v4; // ebx@2
  NiObject *v5; // eax@2
  bool v6; // al@3
  NiRTTI *i; // eax@5

  v2 = this;
  v3 = this->m_spNode.m_pObject;
  if ( v3 )
  {
    v4 = pkEffect->vfptr;
    v5 = NiObject::Clone((NiObject *)&v3->vfptr);
    v4[3].__vecDelDtor((NiRefObject *)pkEffect, (unsigned int)v5);
  }
  pkEffect->m_fLifeTime = v2->m_fLifeTime;
  v6 = v2->m_bCreateProgramEff;
  pkEffect->m_bCreateProgramEff = v6;
  if ( v6 )
    Effect::CreateProgramEff(pkEffect);
  for ( i = (NiRTTI *)((int (__thiscall *)(_DWORD))pkEffect->vfptr[1].__vecDelDtor)(pkEffect); i; i = i->m_pkBaseRTTI )
  {
    if ( i == &StretchEffect::m_RTTI )
      break;
  }
}

//----- (00697A20) --------------------------------------------------------
void __thiscall StretchEffect::StretchEffect(StretchEffect *this, NiNode *pkNode, bool bCreateProgramEff, Char *pkCaster)
{
  StretchEffect *v4; // esi@1

  v4 = this;
  Effect::Effect((Effect *)&this->vfptr, pkNode, bCreateProgramEff, pkCaster);
  v4->vfptr = (NiRefObjectVtbl *)&StretchEffect::`vftable'{for `NiRefObject'};
  v4->vfptr = (IEffectDestroyMessengerVtbl *)&StretchEffect::`vftable'{for `IEffectDestroyMessenger'};
  v4->m_kDamageInfoSet.kDamageList.m_kAllocator.m_uiCount = 0;
  v4->m_kDamageInfoSet.kDamageList.m_pkHead = 0;
  v4->m_kDamageInfoSet.kDamageList.m_pkTail = 0;
  v4->m_kDamageInfoSet.kDamageList.vfptr = (NiTListBase<DFALL<DamageInfo *>,DamageInfo *>Vtbl *)&NiTList<DamageInfo *>::`vftable';
}
// 973DFC: using guessed type int (__thiscall *NiTList<DamageInfo *>::`vftable')(void *p, char);
// 9BD490: using guessed type int (__stdcall *StretchEffect::`vftable'{for `IEffectDestroyMessenger'})(int);
// 9BD4A4: using guessed type int (__thiscall *StretchEffect::`vftable'{for `NiRefObject'})(void *p, char);

//----- (00697A70) --------------------------------------------------------
void __thiscall StretchEffect::~StretchEffect(StretchEffect *this)
{
  StretchEffect *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&StretchEffect::`vftable'{for `NiRefObject'};
  this->vfptr = (IEffectDestroyMessengerVtbl *)&StretchEffect::`vftable'{for `IEffectDestroyMessenger'};
  DamageInfoSet::~DamageInfoSet(&this->m_kDamageInfoSet);
  Effect::~Effect((Effect *)&v1->vfptr);
}
// 9BD490: using guessed type int (__stdcall *StretchEffect::`vftable'{for `IEffectDestroyMessenger'})(int);
// 9BD4A4: using guessed type int (__thiscall *StretchEffect::`vftable'{for `NiRefObject'})(void *p, char);

//----- (00697AE0) --------------------------------------------------------
Effect *__thiscall StretchEffect::Clone(StretchEffect *this)
{
  StretchEffect *v1; // ebx@1
  Effect *v2; // eax@1
  Effect *v3; // esi@1

  v1 = this;
  v2 = (Effect *)operator new(0x254u);
  v3 = v2;
  if ( v2 )
  {
    Effect::Effect(v2, 0, 0, 0);
    v3->vfptr = (NiRefObjectVtbl *)&StretchEffect::`vftable'{for `NiRefObject'};
    v3->vfptr = (IEffectDestroyMessengerVtbl *)&StretchEffect::`vftable'{for `IEffectDestroyMessenger'};
    LODWORD(v3[1].m_kCtrl.m_fPhase) = 0;
    LODWORD(v3[1].m_kCtrl.m_uiControllerCount) = 0;
    LODWORD(v3[1].m_kCtrl.m_fFrequency) = 0;
    LODWORD(v3[1].m_kCtrl.m_fMaxTime) = &NiTList<DamageInfo *>::`vftable';
  }
  else
  {
    v3 = 0;
  }
  ((void (__cdecl *)(Effect *))v1->vfptr[22].__vecDelDtor)(v3);
  return v3;
}
// 973DFC: using guessed type int (__thiscall *NiTList<DamageInfo *>::`vftable')(void *p, char);
// 9BD490: using guessed type int (__stdcall *StretchEffect::`vftable'{for `IEffectDestroyMessenger'})(int);
// 9BD4A4: using guessed type int (__thiscall *StretchEffect::`vftable'{for `NiRefObject'})(void *p, char);

//----- (00697B80) --------------------------------------------------------
NiRTTI *StretchEffect::GetRTTI()
{
  return &StretchEffect::m_RTTI;
}

//----- (00697B90) --------------------------------------------------------
void __thiscall StretchEffect::SetBombEffectName(StretchEffect *this, char *pcBombEffName)
{
  char *v2; // eax@1
  signed int v3; // edx@3
  char v4; // cl@4

  v2 = pcBombEffName;
  if ( pcBombEffName )
  {
    v3 = this->m_acBombEffectName - pcBombEffName;
    do
    {
      v4 = *v2;
      v2[v3] = *v2;
      ++v2;
    }
    while ( v4 );
  }
  else
  {
    this->m_acBombEffectName[0] = (char)pcBombEffName;
  }
}

//----- (00697BC0) --------------------------------------------------------
void __thiscall StretchEffect::SetBombSndName(StretchEffect *this, char *pcBombSndName)
{
  if ( !pcBombSndName )
    this->m_acBombEffectName[0] = 0;
}

//----- (00697BE0) --------------------------------------------------------
unsigned __int16 __thiscall StretchEffect::GetStartChar(StretchEffect *this)
{
  return this->m_kStartCharHandle;
}

//----- (00697BF0) --------------------------------------------------------
unsigned __int16 __thiscall StretchEffect::GetEndChar(StretchEffect *this)
{
  return this->m_kEndCharHandle;
}

//----- (00697C00) --------------------------------------------------------
StretchEffect *__thiscall StretchEffect::`vector deleting destructor'(char *this, unsigned int a2)
{
  return StretchEffect::`scalar deleting destructor'((StretchEffect *)(this - 8), a2);
}

//----- (00697C10) --------------------------------------------------------
StretchEffect *__thiscall StretchEffect::`scalar deleting destructor'(StretchEffect *this, unsigned int a2)
{
  StretchEffect *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&StretchEffect::`vftable'{for `NiRefObject'};
  this->vfptr = (IEffectDestroyMessengerVtbl *)&StretchEffect::`vftable'{for `IEffectDestroyMessenger'};
  DamageInfoSet::~DamageInfoSet(&this->m_kDamageInfoSet);
  Effect::~Effect((Effect *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BD490: using guessed type int (__stdcall *StretchEffect::`vftable'{for `IEffectDestroyMessenger'})(int);
// 9BD4A4: using guessed type int (__thiscall *StretchEffect::`vftable'{for `NiRefObject'})(void *p, char);

//----- (00697C90) --------------------------------------------------------
void __thiscall WeddingEffect::WeddingEffect(WeddingEffect *this, NiNode *pkNode, bool bCreateProgramEff)
{
  WeddingEffect *v3; // esi@1

  v3 = this;
  Effect::Effect((Effect *)&this->vfptr, pkNode, bCreateProgramEff, 0);
  v3->vfptr = (NiRefObjectVtbl *)&WeddingEffect::`vftable'{for `NiRefObject'};
  v3->vfptr = (IEffectDestroyMessengerVtbl *)&WeddingEffect::`vftable'{for `IEffectDestroyMessenger'};
  NpNs_MoveToTarget::NpNs_MoveToTarget(&v3->m_kMoveToTarget);
  *(_DWORD *)&v3->m_Newlywed = -1;
}
// 9BD52C: using guessed type int (__stdcall *WeddingEffect::`vftable'{for `IEffectDestroyMessenger'})(int);
// 9BD544: using guessed type int (__thiscall *WeddingEffect::`vftable'{for `NiRefObject'})(void *p, char);

//----- (00697D10) --------------------------------------------------------
void __thiscall WeddingEffect::~WeddingEffect(WeddingEffect *this)
{
  WeddingEffect *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&WeddingEffect::`vftable'{for `NiRefObject'};
  this->vfptr = (IEffectDestroyMessengerVtbl *)&WeddingEffect::`vftable'{for `IEffectDestroyMessenger'};
  NpNs_MoveToTarget::~NpNs_MoveToTarget(&this->m_kMoveToTarget);
  Effect::~Effect((Effect *)&v1->vfptr);
}
// 9BD52C: using guessed type int (__stdcall *WeddingEffect::`vftable'{for `IEffectDestroyMessenger'})(int);
// 9BD544: using guessed type int (__thiscall *WeddingEffect::`vftable'{for `NiRefObject'})(void *p, char);

//----- (00697D80) --------------------------------------------------------
bool __thiscall WeddingEffect::IsEnd(WeddingEffect *this, float fTime)
{
  return CharMgr::GetChar(&g_kCharMgr, this->m_Newlywed) == 0;
}

//----- (00697DA0) --------------------------------------------------------
void __userpurge WeddingEffect::Update(WeddingEffect *this@<ecx>, int a2@<ebx>, int a3@<edi>, int a4@<esi>, float fTime)
{
  int v5; // ST04_4@1
  WeddingEffect *v6; // edi@1
  Char *v7; // eax@1
  Char *v8; // ebx@1
  int v9; // eax@2
  void *(__thiscall *v10)(NiRefObject *, unsigned int); // edx@2
  NiPoint3 result; // [sp+10h] [bp-18h]@1
  NiPoint3 kPos; // [sp+1Ch] [bp-Ch]@1
  float fTimea; // [sp+30h] [bp+8h]@2
  float fTimeb; // [sp+30h] [bp+8h]@2

  v5 = a3;
  v6 = this;
  Effect::Update((Effect *)&this->vfptr, fTime);
  ((void (__thiscall *)(NpNs_MoveToTarget *, _DWORD, int, int, int, _DWORD, _DWORD, _DWORD, _DWORD))v6->m_kMoveToTarget.vfptr->Update)(
    &v6->m_kMoveToTarget,
    LODWORD(fTime),
    v5,
    a4,
    a2,
    LODWORD(result.x),
    LODWORD(result.y),
    LODWORD(result.z),
    LODWORD(kPos.x));
  v7 = CharMgr::GetChar(&g_kCharMgr, v6->m_Newlywed);
  v8 = v7;
  if ( v7 )
  {
    fTimea = *(float *)&v6->m_kMoveToTarget.vfptr;
    LODWORD(kPos.x) = Char::GetHairPos(v7, &result);
    (*(void (__thiscall **)(NpNs_MoveToTarget *))(LODWORD(fTimea) + 16))(&v6->m_kMoveToTarget);
    fTimeb = *(float *)&v6->m_kMoveToTarget.vfptr;
    LODWORD(result.z) = Char::GetHairPos(v8, &result);
    (*(void (__thiscall **)(NpNs_MoveToTarget *, _DWORD))(LODWORD(fTimeb) + 40))(
      &v6->m_kMoveToTarget,
      LODWORD(result.z));
    v9 = (int)v6->m_kMoveToTarget.vfptr->GetCurrentPos(&v6->m_kMoveToTarget);
    kPos.x = *(float *)v9;
    kPos.y = *(float *)(v9 + 4);
    v10 = v6->vfptr[7].__vecDelDtor;
    kPos.z = *(float *)(v9 + 8);
    v10((NiRefObject *)&v6->vfptr, (unsigned int)&kPos);
    v6->vfptr[21].__vecDelDtor((NiRefObject *)v6, 1u);
  }
  else
  {
    v6->m_kMoveToTarget.vfptr->Stop(&v6->m_kMoveToTarget);
    ((void (__thiscall *)(WeddingEffect *))v6->vfptr[21].__vecDelDtor)(v6);
  }
}
// 697DA0: could not find valid save-restore pair for ebx
// 697DA0: could not find valid save-restore pair for edi
// 697DA0: could not find valid save-restore pair for esi

//----- (00697EA0) --------------------------------------------------------
void __thiscall WeddingEffect::Start(WeddingEffect *this, float fTime)
{
  Effect::Start((Effect *)&this->vfptr, fTime);
}

//----- (00697EC0) --------------------------------------------------------
NiRTTI *WeddingEffect::GetRTTI()
{
  return &WeddingEffect::m_RTTI;
}

//----- (00697ED0) --------------------------------------------------------
WeddingEffect *__thiscall WeddingEffect::`vector deleting destructor'(char *this, unsigned int a2)
{
  return WeddingEffect::`vector deleting destructor'((WeddingEffect *)(this - 8), a2);
}

//----- (00697EE0) --------------------------------------------------------
WeddingEffect *__thiscall WeddingEffect::`vector deleting destructor'(WeddingEffect *this, unsigned int a2)
{
  WeddingEffect *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&WeddingEffect::`vftable'{for `NiRefObject'};
  this->vfptr = (IEffectDestroyMessengerVtbl *)&WeddingEffect::`vftable'{for `IEffectDestroyMessenger'};
  NpNs_MoveToTarget::~NpNs_MoveToTarget(&this->m_kMoveToTarget);
  Effect::~Effect((Effect *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BD52C: using guessed type int (__stdcall *WeddingEffect::`vftable'{for `IEffectDestroyMessenger'})(int);
// 9BD544: using guessed type int (__thiscall *WeddingEffect::`vftable'{for `NiRefObject'})(void *p, char);

//----- (00697F60) --------------------------------------------------------
bool __thiscall TextEff::IsAlive(TextEff *this, float fTime)
{
  return this->m_bAlive && fTime - this->m_fStartTime <= this->m_fLifeTime;
}

//----- (00697F90) --------------------------------------------------------
void __thiscall TextEff::SetStartTime(TextEff *this, float fTime)
{
  this->m_fStartTime = fTime;
  this->m_fLastUpdateTime = fTime;
}

//----- (00697FA0) --------------------------------------------------------
void __thiscall TextEff::TextEff(TextEff *this)
{
  TextEff *v1; // esi@1
  NiNode *v2; // ebx@1
  NiNode *v3; // eax@1
  NiNode *v4; // eax@2
  NiNode *v5; // edi@3

  v1 = this;
  v2 = 0;
  this->vfptr = (TextEffVtbl *)&TextEff::`vftable';
  this->m_spNode.m_pObject = 0;
  this->m_fStartTime = 0.0;
  this->m_kCharHandle = -1;
  this->m_bAlive = 1;
  this->m_uiWidth = 0;
  this->m_uiHeight = 0;
  v3 = (NiNode *)operator new(0xE8u);
  if ( v3 )
  {
    NiNode::NiNode(v3, 0);
    v2 = v4;
  }
  v5 = v1->m_spNode.m_pObject;
  if ( v5 != v2 )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spNode.m_pObject = v2;
    if ( v2 )
      InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  }
  v1->m_fLifeTime = TextEff::ms_fDefLifeTime;
}
// 9BD5A4: using guessed type int (__thiscall *TextEff::`vftable')(void *p, char);
// A75CE4: using guessed type float TextEff::ms_fDefLifeTime;

//----- (00698070) --------------------------------------------------------
void __thiscall TextEff::~TextEff(TextEff *this)
{
  TextEff *v1; // edi@1
  NiNode *v2; // esi@1
  NiNode *v3; // edi@6

  v1 = this;
  this->vfptr = (TextEffVtbl *)&TextEff::`vftable';
  v2 = this->m_spNode.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spNode.m_pObject = 0;
  }
  v3 = v1->m_spNode.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
  {
    if ( v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  }
}
// 9BD5A4: using guessed type int (__thiscall *TextEff::`vftable')(void *p, char);

//----- (00698110) --------------------------------------------------------
void __thiscall TextEff::AddGeometry(TextEff *this, NiScreenElements *pkGeom, unsigned int uiWidth, unsigned int uiHeight)
{
  float v4; // ST14_4@1
  unsigned int v5; // eax@1
  NiProperty *v6; // eax@3
  NiTimeController *v7; // eax@4

  v4 = (double)this->m_uiWidth;
  pkGeom->m_kLocal.m_Translate.x = v4;
  pkGeom->m_kLocal.m_Translate.y = 0.0;
  pkGeom->m_kLocal.m_Translate.z = 0.0;
  v5 = this->m_uiHeight;
  if ( v5 < uiHeight )
    this->m_uiHeight = uiHeight + v5;
  this->m_uiWidth += uiWidth;
  ((void (__stdcall *)(NiScreenElements *, _DWORD))this->m_spNode.m_pObject->vfptr[29].__vecDelDtor)(pkGeom, 0);
  v6 = NiAVObject::GetProperty((NiAVObject *)&pkGeom->vfptr, 3);
  if ( v6 )
  {
    v7 = NiObjectNET::GetController((NiObjectNET *)&v6->vfptr, &NiAlphaController::m_RTTI);
    if ( v7 )
      v7->m_fFrequency = TextEff::ms_fDefLifeTime;
  }
  NiAVObject::UpdateEffects((NiAVObject *)&pkGeom->vfptr);
  NiAVObject::UpdateProperties((NiAVObject *)&pkGeom->vfptr);
  NiAVObject::Update((NiAVObject *)&pkGeom->vfptr, 0.0, 1);
}
// A75CE4: using guessed type float TextEff::ms_fDefLifeTime;

//----- (006981C0) --------------------------------------------------------
void __thiscall TextEff::AddNode(TextEff *this, NiNode *pkNode, unsigned int uiWidth, unsigned int uiHeight)
{
  TextEff *v4; // edi@1
  float v5; // ST18_4@1
  unsigned int v6; // eax@1

  v4 = this;
  v5 = (double)this->m_uiWidth;
  pkNode->m_kLocal.m_Translate.x = v5;
  pkNode->m_kLocal.m_Translate.y = 0.0;
  pkNode->m_kLocal.m_Translate.z = 0.0;
  v6 = this->m_uiHeight;
  if ( v6 < uiHeight )
    this->m_uiHeight = uiHeight + v6;
  this->m_uiWidth += uiWidth;
  pkNode->m_uFlags |= 1u;
  ((void (__stdcall *)(NiNode *, _DWORD))this->m_spNode.m_pObject->vfptr[29].__vecDelDtor)(pkNode, 0);
  NiAVObject::UpdateEffects((NiAVObject *)&pkNode->vfptr);
  NiAVObject::UpdateProperties((NiAVObject *)&pkNode->vfptr);
  NiAVObject::Update((NiAVObject *)&pkNode->vfptr, 0.0, 0);
  if ( pkNode->m_kChildren.m_uiESize != 1 )
    v4->m_fLifeTime = v4->m_fLifeTime + TextEff::ms_fShowDelay;
}
// B4F22C: using guessed type float TextEff::ms_fShowDelay;

//----- (00698260) --------------------------------------------------------
void __userpurge TextEff::Update(TextEff *this@<ecx>, int a2@<ebx>, float fTime, NiCamera *pkWorldCamera, PgWinCamera *pkScreenCamera)
{
  TextEff *v5; // edi@1
  Char *v6; // eax@1
  double v7; // st7@3
  double v8; // st5@3
  NiCamera *v9; // esi@4
  float v10; // edx@6
  double v11; // st5@6
  unsigned int v12; // esi@6
  double v13; // st7@6
  double v14; // st7@6
  NiNode *v15; // eax@6
  float v16; // ST20_4@6
  unsigned int v17; // ebx@6
  double v18; // st7@6
  double v19; // st6@7
  NiNode *v20; // eax@8
  NiAVObject *v21; // eax@9
  float v22; // ST04_4@13
  NiPoint3 kWorldPos; // [sp+20h] [bp-30h]@4
  NiPoint3 kCharHeightPos; // [sp+2Ch] [bp-24h]@3
  float v25; // [sp+38h] [bp-18h]@3
  double v26; // [sp+3Ch] [bp-14h]@3
  float fInvFmN; // [sp+44h] [bp-Ch]@3
  float fScreenY; // [sp+48h] [bp-8h]@4
  float fScreenX; // [sp+4Ch] [bp-4h]@4
  float fShowTimea; // [sp+5Ch] [bp+Ch]@6
  float fShowTimeb; // [sp+5Ch] [bp+Ch]@6
  float fShowTimec; // [sp+5Ch] [bp+Ch]@6
  float fShowTimed; // [sp+5Ch] [bp+Ch]@6
  float fShowTimee; // [sp+5Ch] [bp+Ch]@6
  float fShowTimef; // [sp+5Ch] [bp+Ch]@6
  float fShowTimeg; // [sp+5Ch] [bp+Ch]@6
  float fShowTimeh; // [sp+5Ch] [bp+Ch]@6
  float fShowTimei; // [sp+5Ch] [bp+Ch]@6
  float fShowTime; // [sp+5Ch] [bp+Ch]@6

  v5 = this;
  v6 = CharMgr::GetChar(&g_kCharMgr, this->m_kCharHandle);
  if ( v6
    && (Char::GetHeightPos(v6, a2, &kCharHeightPos),
        kCharHeightPos.z = kCharHeightPos.z + 10.0,
        v25 = ::pkWorldCamera->m_kLocal.m_Translate.x - kCharHeightPos.x,
        *(float *)&v26 = ::pkWorldCamera->m_kLocal.m_Translate.y - kCharHeightPos.y,
        *((float *)&v26 + 1) = ::pkWorldCamera->m_kLocal.m_Translate.z - kCharHeightPos.z,
        v7 = *(float *)&v26,
        v8 = *((float *)&v26 + 1),
        v26 = TextEff::ms_fMaxDistance,
        fInvFmN = v7 * v7 + v25 * v25 + v8 * v8,
        fInvFmN = sqrt(fInvFmN),
        fInvFmN <= (double)TextEff::ms_fMaxDistance) )
  {
    v9 = pkWorldCamera;
    kWorldPos = kCharHeightPos;
    if ( NiCamera::WorldPtToScreenPt(pkWorldCamera, &kWorldPos, &fScreenX, &fScreenY, 0.0000099999997) )
    {
      v5->m_spNode.m_pObject->m_uFlags &= 0xFFFEu;
      v25 = pkWorldCamera->m_kLocal.m_Translate.x - kWorldPos.x;
      *(float *)&v26 = pkWorldCamera->m_kLocal.m_Translate.y - kWorldPos.y;
      *((float *)&v26 + 1) = pkWorldCamera->m_kLocal.m_Translate.z - kWorldPos.z;
      fShowTimea = *(float *)&v26 * *(float *)&v26 + v25 * v25 + *((float *)&v26 + 1) * *((float *)&v26 + 1);
      fShowTimeb = sqrt(fShowTimea);
      *((float *)&v26 + 1) = fShowTimeb;
      fShowTimec = v9->m_kViewFrustum.m_fFar - v9->m_kViewFrustum.m_fNear;
      fInvFmN = 1.0 / fShowTimec;
      fShowTimed = (double)PgWin::ms_uiScreenWidth * fScreenX;
      fScreenX = fShowTimed - (double)(v5->m_uiWidth >> 1);
      fShowTimee = 1.0 - fScreenY;
      fShowTimef = fShowTimee * (double)PgWin::ms_uiScreenHeight;
      fScreenY = fShowTimef - (double)v5->m_uiHeight;
      v10 = fScreenY;
      fShowTimeg = -(v9->m_kViewFrustum.m_fFar * v9->m_kViewFrustum.m_fNear * fInvFmN);
      v11 = v9->m_kViewFrustum.m_fFar;
      v12 = 0;
      v13 = fShowTimeg;
      fShowTimeh = fInvFmN * v11;
      fShowTimei = (fShowTimeh * *((float *)&v26 + 1) + v13) / *((float *)&v26 + 1);
      v14 = fShowTimei * (pkScreenCamera->m_kViewFrustum.m_fFar - pkScreenCamera->m_kViewFrustum.m_fNear)
          + pkScreenCamera->m_kViewFrustum.m_fNear;
      v15 = v5->m_spNode.m_pObject;
      v15->m_kLocal.m_Translate.x = fScreenX;
      v15->m_kLocal.m_Translate.y = v10;
      v16 = v14;
      v15->m_kLocal.m_Translate.z = v16;
      fShowTime = v5->m_fStartTime;
      v17 = v5->m_spNode.m_pObject->m_kChildren.m_uiESize;
      v18 = fTime;
      if ( v17 )
      {
        do
        {
          v19 = fShowTime;
          if ( fShowTime <= v18 )
          {
            v20 = v5->m_spNode.m_pObject;
            if ( v20->m_kChildren.m_uiSize > v12 )
            {
              v21 = v20->m_kChildren.m_pBase[v12].m_pObject;
              if ( v21 )
              {
                if ( v21->m_uFlags & 1 )
                {
                  v21->m_uFlags &= 0xFFFEu;
                  NiTimeController::StartAnimations((NiObjectNET *)&v21->vfptr, fShowTime);
                  v18 = fTime;
                  v19 = fShowTime;
                }
              }
            }
          }
          ++v12;
          fShowTime = v19 + TextEff::ms_fShowDelay;
        }
        while ( v12 < v17 );
      }
      v5->m_fLastUpdateTime = v18;
      v22 = v18;
      NiAVObject::Update((NiAVObject *)&v5->m_spNode.m_pObject->vfptr, v22, 1);
    }
    else
    {
      v5->m_spNode.m_pObject->m_uFlags |= 1u;
    }
  }
  else
  {
    v5->m_bAlive = 0;
  }
}
// A75CE8: using guessed type float TextEff::ms_fMaxDistance;
// B4F22C: using guessed type float TextEff::ms_fShowDelay;

//----- (00698530) --------------------------------------------------------
TextEff *__thiscall TextEff::`scalar deleting destructor'(TextEff *this, unsigned int a2)
{
  TextEff *v2; // esi@1

  v2 = this;
  TextEff::~TextEff(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00698560) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>::~NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>(NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>::`vftable';
}
// 9BD6DC: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>::`vftable')(void *p, char);

//----- (00698570) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BD6DC: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>::`vftable')(void *p, char);

//----- (006985A0) --------------------------------------------------------
void __thiscall TextEffMgr::GeomRes::~GeomRes(TextEffMgr::GeomRes *this)
{
  NiScreenElements *v1; // esi@1

  v1 = this->m_spGeom.m_pObject;
  if ( v1 && !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
  {
    if ( v1 )
      v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
  }
}

//----- (006985D0) --------------------------------------------------------
void __thiscall TextEffMgr::Draw(TextEffMgr *this)
{
  TextEffMgr *v1; // esi@1
  NiAVObject *v2; // ST04_4@1
  NiCamera *v3; // ST00_4@1
  NiVisibleArray m_kVisible; // [sp+Ch] [bp-B0h]@1
  NiCullingProcess m_kCuller; // [sp+1Ch] [bp-A0h]@1
  int v6; // [sp+B8h] [bp-4h]@1

  v1 = this;
  m_kVisible.m_ppkArray = 0;
  m_kVisible.m_uiCurrentSize = 0;
  m_kVisible.m_uiAllocatedSize = 0;
  m_kVisible.m_uiGrowBy = 1024;
  NiVisibleArray::SetAllocatedSize(&m_kVisible, 0x400u);
  v6 = 0;
  NiCullingProcess::NiCullingProcess(&m_kCuller, &m_kVisible);
  v2 = (NiAVObject *)&v1->m_pkScene->vfptr;
  v3 = (NiCamera *)&v1->m_spScreenSpaceCamera.m_pObject->vfptr;
  LOBYTE(v6) = 1;
  NiDrawScene(v3, v2, &m_kCuller, 0);
  LOBYTE(v6) = 0;
  NiCullingProcess::~NiCullingProcess(&m_kCuller);
  operator delete(m_kVisible.m_ppkArray);
}

//----- (006986A0) --------------------------------------------------------
NiNode *__stdcall TextEffMgr::CreateControllNode(NiTransformController *pkMoveCtrl, NiTransformController *pkNoiseCtrl, NiTransformController *pkSizeCtrl, NiAlphaController *pkAlphaCtrl, NiScreenElements *pkGeom)
{
  NiNode *v6; // eax@1
  int v7; // esi@1
  int v8; // eax@2
  int v9; // ebx@2
  NiNode *v10; // eax@4
  int v11; // eax@5
  NiProperty *v12; // eax@6
  NiNode *v13; // eax@7
  int v14; // eax@8
  int v15; // edi@8

  v6 = (NiNode *)operator new(0xE8u);
  v7 = 0;
  if ( v6 )
  {
    NiNode::NiNode(v6, 0);
    v9 = v8;
  }
  else
  {
    v9 = 0;
  }
  v10 = (NiNode *)operator new(0xE8u);
  if ( v10 )
  {
    NiNode::NiNode(v10, 0);
    v7 = v11;
  }
  ((void (__stdcall *)(int))pkMoveCtrl->vfptr[18].__vecDelDtor)(v7);
  v12 = NiAVObject::GetProperty((NiAVObject *)&pkGeom->vfptr, 3);
  ((void (__stdcall *)(NiProperty *))pkAlphaCtrl->vfptr[18].__vecDelDtor)(v12);
  if ( pkSizeCtrl )
  {
    v13 = (NiNode *)operator new(0xE8u);
    if ( v13 )
    {
      NiNode::NiNode(v13, 0);
      v15 = v14;
    }
    else
    {
      v15 = 0;
    }
    ((void (__stdcall *)(int))pkSizeCtrl->vfptr[18].__vecDelDtor)(v15);
    (*(void (__thiscall **)(int, NiScreenElements *, _DWORD))(*(_DWORD *)v15 + 116))(v15, pkGeom, 0);
  }
  (*(void (__thiscall **)(int))(*(_DWORD *)v7 + 116))(v7);
  (*(void (__cdecl **)(int))(*(_DWORD *)v9 + 116))(v7);
  return (NiNode *)v9;
}

//----- (006987C0) --------------------------------------------------------
void __thiscall TextEffMgr::Add(TextEffMgr *this, TextEff *pkTextEff)
{
  TextEffMgr *v2; // esi@1
  int v3; // eax@1
  _DWORD *v4; // ecx@1
  NiNode *v5; // ecx@4

  v2 = this;
  v3 = ((int (*)(void))this->m_kList.vfptr->NewItem)();
  *(_DWORD *)(v3 + 8) = pkTextEff;
  *(_DWORD *)v3 = 0;
  *(_DWORD *)(v3 + 4) = v2->m_kList.m_pkTail;
  v4 = &v2->m_kList.m_pkTail->m_pkNext;
  if ( v4 )
    *v4 = v3;
  else
    v2->m_kList.m_pkHead = (NiTListItem<TextEff *> *)v3;
  ++v2->m_kList.m_kAllocator.m_uiCount;
  v5 = v2->m_pkScene;
  v2->m_kList.m_pkTail = (NiTListItem<TextEff *> *)v3;
  ((void (__stdcall *)(NiNode *, signed int))v5->vfptr[29].__vecDelDtor)(pkTextEff->m_spNode.m_pObject, 1);
  NiAVObject::UpdateProperties((NiAVObject *)&pkTextEff->m_spNode.m_pObject->vfptr);
  NiAVObject::UpdateEffects((NiAVObject *)&pkTextEff->m_spNode.m_pObject->vfptr);
  NiAVObject::Update((NiAVObject *)&pkTextEff->m_spNode.m_pObject->vfptr, 0.0, 1);
}

//----- (00698830) --------------------------------------------------------
void __thiscall TextEffMgr::ReleaseGeometry(TextEffMgr *this)
{
  char *v1; // edi@1
  signed int v2; // ebx@2
  int v3; // esi@3
  NiScreenElements *v4; // esi@10
  NiScreenElements *v5; // esi@15
  NiScreenElements *v6; // esi@20
  NiScreenElements *v7; // esi@25
  NiNode *v8; // esi@30
  signed int v9; // [sp+Ch] [bp-8h]@1
  TextEffMgr *v10; // [sp+10h] [bp-4h]@1

  v10 = this;
  v1 = (char *)&this->m_akNumGeomRes[0][0].m_spGeom;
  v9 = 6;
  do
  {
    v2 = 10;
    do
    {
      v3 = *(_DWORD *)v1;
      if ( *(_DWORD *)v1 )
      {
        if ( !InterlockedDecrement((volatile LONG *)(v3 + 4)) && v3 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v3)(v3, 1);
        *(_DWORD *)v1 = 0;
      }
      v1 += 12;
      --v2;
    }
    while ( v2 );
    --v9;
  }
  while ( v9 );
  v4 = v10->m_kMissGeomRes.m_spGeom.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v10->m_kMissGeomRes.m_spGeom.m_pObject = 0;
  }
  v5 = v10->m_kBlockGeomRes.m_spGeom.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v10->m_kBlockGeomRes.m_spGeom.m_pObject = 0;
  }
  v6 = v10->m_kResistGeomRes.m_spGeom.m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v10->m_kResistGeomRes.m_spGeom.m_pObject = 0;
  }
  v7 = v10->m_kImmuneRes.m_spGeom.m_pObject;
  if ( v7 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v10->m_kImmuneRes.m_spGeom.m_pObject = 0;
  }
  v8 = v10->m_kCriEffect.spCriticalEffect.m_pObject;
  if ( v8 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
    {
      if ( v8 )
        v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    }
    v10->m_kCriEffect.spCriticalEffect.m_pObject = 0;
  }
}

//----- (00698980) --------------------------------------------------------
char __thiscall TextEffMgr::LoadController(TextEffMgr *this)
{
  TextEffMgr *v1; // esi@1
  const char *v2; // eax@3
  NiObjectNET *v3; // eax@4
  NiNode *v4; // esi@5
  bool v5; // zf@7
  NiTimeController *v7; // eax@11
  NiTransformController *v8; // edi@11
  NiTransformController *v9; // ebx@11
  NiTransformController *v10; // eax@18
  NiNode *v11; // ecx@22
  NiAVObject *v12; // eax@22
  NiProperty *v13; // eax@25
  NiD3DDefaultShader *v14; // eax@25
  NiAlphaController *v15; // eax@25
  char *v16; // eax@26
  const char *v17; // eax@26
  NiObjectNET *v18; // eax@27
  NiD3DDefaultShader *v19; // eax@28
  NiTransformController *v20; // eax@28
  NiNode *v21; // ecx@29
  NiObjectNET *v22; // eax@29
  NiD3DDefaultShader *v23; // eax@30
  NiTransformController *v24; // eax@30
  NiObjectNET *v25; // eax@31
  NiD3DDefaultShader *v26; // eax@32
  NiTransformController *v27; // eax@32
  NiAVObject *v28; // eax@33
  NiProperty *v29; // eax@34
  NiD3DDefaultShader *v30; // eax@34
  NiAlphaController *v31; // esi@34
  NiPointer<NiNode> spNode; // [sp+14h] [bp-10h]@1
  int v33; // [sp+20h] [bp-4h]@1

  v1 = this;
  spNode.m_pObject = 0;
  v33 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v2 = Folder::Merge(&Folder::m_acCtrl, "NormalHitCtrl.nif");
  PgUtil::LoadNodeNifFile(v2, &spNode, 0);
  if ( !spNode.m_pObject )
    return 0;
  v3 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Move");
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v33 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
LABEL_8:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v7 = NiObjectNET::GetController(v3, &NiTransformController::m_RTTI);
  v8 = v1->m_spNormalHitMoveCtrl.m_pObject;
  v9 = (NiTransformController *)v7;
  if ( (NiTimeController *)v8 != v7 )
  {
    if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v1->m_spNormalHitMoveCtrl.m_pObject = v9;
    if ( v9 )
      InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  }
  v10 = v1->m_spNormalHitMoveCtrl.m_pObject;
  if ( !v10 )
  {
    v4 = spNode.m_pObject;
    v33 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
    goto LABEL_8;
  }
  v10->m_uFlags = v10->m_uFlags & 0xFFF7 | 1;
  v11 = spNode.m_pObject;
  v1->m_fNormalHitLifeTime = v1->m_spNormalHitMoveCtrl.m_pObject->m_fHiKeyTime;
  v12 = (NiAVObject *)((int (__stdcall *)(const char *))v11->vfptr[18].__vecDelDtor)("Plane01");
  if ( !v12
    || (v13 = NiAVObject::GetProperty(v12, 3),
        v14 = (NiD3DDefaultShader *)NiObjectNET::GetController((NiObjectNET *)&v13->vfptr, &NiAlphaController::m_RTTI),
        NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v1->m_spNormalHitAlphaCtrl, v14),
        (v15 = v1->m_spNormalHitAlphaCtrl.m_pObject) == 0)
    || (v15->m_uFlags = v15->m_uFlags & 0xFFF7 | 1,
        v16 = Folder::Ctrl(),
        v17 = Folder::Merge(v16, "CriticalHitCtrl.nif"),
        PgUtil::LoadNodeNifFile(v17, &spNode, 0),
        !spNode.m_pObject)
    || (v18 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Move")) == 0
    || (v19 = (NiD3DDefaultShader *)NiObjectNET::GetController(v18, &NiTransformController::m_RTTI),
        NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v1->m_spCriticalHitMoveCtrl, v19),
        (v20 = v1->m_spCriticalHitMoveCtrl.m_pObject) == 0)
    || (v20->m_uFlags = v20->m_uFlags & 0xFFF7 | 1,
        v21 = spNode.m_pObject,
        v1->m_fCriticalHitLifeTime = v1->m_spCriticalHitMoveCtrl.m_pObject->m_fHiKeyTime,
        (v22 = (NiObjectNET *)((int (__stdcall *)(const char *))v21->vfptr[18].__vecDelDtor)("noise")) == 0)
    || (v23 = (NiD3DDefaultShader *)NiObjectNET::GetController(v22, &NiTransformController::m_RTTI),
        NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v1->m_spCriticalHitNoiseCtrl, v23),
        (v24 = v1->m_spCriticalHitNoiseCtrl.m_pObject) == 0)
    || (v24->m_uFlags = v24->m_uFlags & 0xFFF7 | 1,
        (v25 = (NiObjectNET *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("size")) == 0)
    || (v26 = (NiD3DDefaultShader *)NiObjectNET::GetController(v25, &NiTransformController::m_RTTI),
        NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v1->m_spCriticalHitSizeCtrl, v26),
        (v27 = v1->m_spCriticalHitSizeCtrl.m_pObject) == 0)
    || (v27->m_uFlags = v27->m_uFlags & 0xFFF7 | 1,
        (v28 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Plane01")) == 0) )
  {
    v33 = -1;
LABEL_24:
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  v29 = NiAVObject::GetProperty(v28, 3);
  v30 = (NiD3DDefaultShader *)NiObjectNET::GetController((NiObjectNET *)&v29->vfptr, &NiAlphaController::m_RTTI);
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v1->m_spCriticalHitAlphaCtrl, v30);
  v31 = v1->m_spCriticalHitAlphaCtrl.m_pObject;
  v33 = -1;
  if ( !v31 )
    goto LABEL_24;
  v31->m_uFlags = v31->m_uFlags & 0xFFF7 | 1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00698D00) --------------------------------------------------------
void __thiscall TextEffMgr::ReleaseController(TextEffMgr *this)
{
  TextEffMgr *v1; // esi@1
  NiTransformController *v2; // edi@1
  NiTransformController *v3; // edi@6
  NiAlphaController *v4; // edi@11
  NiTransformController *v5; // edi@16
  NiTransformController *v6; // edi@21
  NiAlphaController *v7; // edi@26
  NiTransformController *v8; // edi@31

  v1 = this;
  v2 = this->m_spNormalHitMoveCtrl.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spNormalHitMoveCtrl.m_pObject = 0;
  }
  v3 = v1->m_spNormalHitNoiseCtrl.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spNormalHitNoiseCtrl.m_pObject = 0;
  }
  v4 = v1->m_spNormalHitAlphaCtrl.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spNormalHitAlphaCtrl.m_pObject = 0;
  }
  v5 = v1->m_spCriticalHitMoveCtrl.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spCriticalHitMoveCtrl.m_pObject = 0;
  }
  v6 = v1->m_spCriticalHitNoiseCtrl.m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v1->m_spCriticalHitNoiseCtrl.m_pObject = 0;
  }
  v7 = v1->m_spCriticalHitAlphaCtrl.m_pObject;
  if ( v7 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v1->m_spCriticalHitAlphaCtrl.m_pObject = 0;
  }
  v8 = v1->m_spCriticalHitSizeCtrl.m_pObject;
  if ( v8 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
    {
      if ( v8 )
        v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    }
    v1->m_spCriticalHitSizeCtrl.m_pObject = 0;
  }
}

//----- (00698E40) --------------------------------------------------------
void __thiscall TextEffMgr::~TextEffMgr(TextEffMgr *this)
{
  TextEffMgr *v1; // esi@1
  char *v2; // edi@1
  int v3; // edi@1
  NiAlphaController *v4; // edi@5
  NiTransformController *v5; // edi@9
  NiTransformController *v6; // edi@13
  NiTransformController *v7; // edi@17
  NiAlphaController *v8; // edi@21
  NiTransformController *v9; // edi@25
  NiTransformController *v10; // edi@29
  PgWinCamera *v11; // edi@33
  NiScreenElements *v12; // edi@37
  NiScreenElements *v13; // edi@41
  NiScreenElements *v14; // edi@45
  NiScreenElements *v15; // edi@49
  NiTListItem<TextEff *> **v16; // edi@53
  NiTListItem<TextEff *> *v17; // ST0C_4@54

  v1 = this;
  v2 = (char *)&this->m_kCriEffect;
  NsEffect::~NsEffect(&this->m_kCriEffect.kEffect);
  ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)(v2 + 4));
  v3 = *(_DWORD *)v2;
  if ( v3 && !InterlockedDecrement((volatile LONG *)(v3 + 4)) && v3 )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v3)(v3, 1);
  v4 = v1->m_spCriticalHitAlphaCtrl.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v5 = v1->m_spCriticalHitSizeCtrl.m_pObject;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  v6 = v1->m_spCriticalHitNoiseCtrl.m_pObject;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  v7 = v1->m_spCriticalHitMoveCtrl.m_pObject;
  if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  v8 = v1->m_spNormalHitAlphaCtrl.m_pObject;
  if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
    v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
  v9 = v1->m_spNormalHitNoiseCtrl.m_pObject;
  if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
    v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
  v10 = v1->m_spNormalHitMoveCtrl.m_pObject;
  if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
    v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
  v11 = v1->m_spScreenSpaceCamera.m_pObject;
  if ( v11 && !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
    v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
  v12 = v1->m_kImmuneRes.m_spGeom.m_pObject;
  if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
    v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
  v13 = v1->m_kResistGeomRes.m_spGeom.m_pObject;
  if ( v13 && !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) && v13 )
    v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
  v14 = v1->m_kBlockGeomRes.m_spGeom.m_pObject;
  if ( v14 && !InterlockedDecrement((volatile LONG *)&v14->m_uiRefCount) && v14 )
    v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
  v15 = v1->m_kMissGeomRes.m_spGeom.m_pObject;
  if ( v15 && !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) && v15 )
    v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
  `eh vector destructor iterator'(
    v1->m_akNumGeomRes,
    0xCu,
    60,
    (void (__thiscall *)(void *))TextEffMgr::GeomRes::~GeomRes);
  v1->m_kList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>Vtbl *)&PgTList<TextEff *>::`vftable';
  v16 = &v1->m_kList.m_pkHead->m_pkNext;
  while ( v16 )
  {
    v17 = (NiTListItem<TextEff *> *)v16;
    v16 = (NiTListItem<TextEff *> **)*v16;
    v1->m_kList.vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *> *)v1, v17);
  }
  v1->m_kList.m_kAllocator.m_uiCount = 0;
  v1->m_kList.m_pkHead = 0;
  v1->m_kList.m_pkTail = 0;
  v1->m_kList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>::`vftable';
}
// 9BD6DC: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>::`vftable')(void *p, char);
// 9BD6FC: using guessed type int (__thiscall *PgTList<TextEff *>::`vftable')(void *p, char);

//----- (006990F0) --------------------------------------------------------
void __thiscall TextEffMgr::AddNumTextEff(TextEffMgr *this, unsigned __int16 kHandle, int iNum, TextEffMgr::TextEffColor eColor, bool bCritical)
{
  TextEffMgr *v5; // esi@1
  Char *v6; // eax@1
  int v7; // eax@2
  TextEff *v8; // ST34_4@2
  int v9; // ST30_4@2
  TextEffMgr::GeomRes *pkGeomRes; // ST38_4@2
  TextEffMgr::GeomRes *v11; // ST38_4@2
  TextEffMgr::GeomRes *v12; // ST38_4@2
  TextEff *v13; // edi@3
  TextEff *v14; // eax@4
  TextEff *v15; // eax@5
  signed int v16; // kr00_4@7
  __int32 v17; // edi@8
  NiObject *v18; // ebx@9
  NiObject *v19; // ST28_4@9
  NiObject *v20; // ST24_4@9
  NiAlphaController *v21; // ST0C_4@9
  NiTransformController *v22; // ST08_4@9
  NiTransformController *v23; // ST04_4@9
  NiTransformController *v24; // eax@9
  NiNode *v25; // eax@9
  unsigned int v26; // edx@9
  NiObject *v27; // ebx@10
  NiAlphaController *v28; // ST0C_4@10
  NiTransformController *v29; // eax@10
  NiScreenElements *fTime; // [sp+0h] [bp-7Ch]@8
  int i; // [sp+20h] [bp-5Ch]@7
  TextEff *v32; // [sp+24h] [bp-58h]@5
  char acNumStr[64]; // [sp+2Ch] [bp-50h]@7
  int v34; // [sp+78h] [bp-4h]@4

  v5 = this;
  v6 = CharMgr::GetChar(&g_kCharMgr, kHandle);
  if ( v6 )
  {
    v7 = ((int (__thiscall *)(Char *))v6->vfptr[6].Deaffect)(v6);
    *(float *)&v8 = pkWorldCamera->m_kLocal.m_Translate.x - *(float *)v7;
    *(float *)&v9 = pkWorldCamera->m_kLocal.m_Translate.y - *(float *)(v7 + 4);
    *(float *)&pkGeomRes = pkWorldCamera->m_kLocal.m_Translate.z - *(float *)(v7 + 8);
    *(float *)&v11 = *(float *)&v9 * *(float *)&v9
                   + *(float *)&v8 * *(float *)&v8
                   + *(float *)&pkGeomRes * *(float *)&pkGeomRes;
    *(float *)&v12 = sqrt(*(float *)&v11);
    if ( TextEff::ms_fMaxDistance >= (double)*(float *)&v12 )
    {
      v13 = 0;
      if ( v5->m_akNumGeomRes[eColor][0].m_spGeom.m_pObject )
      {
        v14 = (TextEff *)operator new(0x24u);
        v34 = 0;
        if ( v14 )
        {
          TextEff::TextEff(v14);
          v13 = v15;
          v32 = v15;
        }
        else
        {
          v32 = 0;
        }
        v13->m_kCharHandle = kHandle;
        v13->m_fLifeTime = v5->m_fNormalHitLifeTime;
        v34 = -1;
        sprintf(acNumStr, "%u", iNum);
        v16 = strlen(acNumStr);
        i = 0;
        if ( v16 > 0 )
        {
          do
          {
            v17 = (__int32)v5->m_akNumGeomRes[eColor] + 4 * (3 * acNumStr[i] - 144);
            fTime = (NiScreenElements *)NiObject::Clone(*(NiObject **)(v17 + 8));
            if ( bCritical )
            {
              v18 = (NiObject *)&v5->m_spCriticalHitSizeCtrl.m_pObject->vfptr;
              v19 = (NiObject *)&v5->m_spCriticalHitNoiseCtrl.m_pObject->vfptr;
              v20 = (NiObject *)&v5->m_spCriticalHitMoveCtrl.m_pObject->vfptr;
              v21 = (NiAlphaController *)NiObject::Clone((NiObject *)&v5->m_spCriticalHitAlphaCtrl.m_pObject->vfptr);
              v22 = (NiTransformController *)NiObject::Clone(v18);
              v23 = (NiTransformController *)NiObject::Clone(v19);
              v24 = (NiTransformController *)NiObject::Clone(v20);
              v25 = TextEffMgr::CreateControllNode(v24, v23, v22, v21, fTime);
              v26 = *(_DWORD *)v17 + 10;
            }
            else
            {
              v27 = (NiObject *)&v5->m_spNormalHitMoveCtrl.m_pObject->vfptr;
              v28 = (NiAlphaController *)NiObject::Clone((NiObject *)&v5->m_spNormalHitAlphaCtrl.m_pObject->vfptr);
              v29 = (NiTransformController *)NiObject::Clone(v27);
              v25 = TextEffMgr::CreateControllNode(v29, 0, 0, v28, fTime);
              v26 = *(_DWORD *)v17;
            }
            TextEff::AddNode(v32, v25, v26, *(_DWORD *)(v17 + 4));
            ++i;
          }
          while ( i < v16 );
          v13 = v32;
        }
        TextEffMgr::Add(v5, v13);
        TextEff::SetStartTime(v13, Timer::ms_fCurTime);
      }
    }
  }
}
// A75CE8: using guessed type float TextEff::ms_fMaxDistance;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00699320) --------------------------------------------------------
void __thiscall TextEffMgr::AddMissTextEff(TextEffMgr *this, unsigned __int16 kHandle)
{
  TextEffMgr *v2; // edi@1
  TextEff *v3; // esi@1
  Char *v4; // eax@2
  NiPoint3 *v5; // eax@3
  TextEff *v6; // eax@4
  TextEff *v7; // eax@5
  float fTime; // ST08_4@6
  unsigned int v9; // ST04_4@6
  NiScreenElements *v10; // eax@6

  v2 = this;
  v3 = 0;
  if ( this->m_kMissGeomRes.m_spGeom.m_pObject )
  {
    v4 = CharMgr::GetChar(&g_kCharMgr, kHandle);
    if ( v4 )
    {
      v5 = (NiPoint3 *)((int (__thiscall *)(_DWORD))v4->vfptr[6].Deaffect)(v4);
      if ( TextEff::ms_fMaxDistance >= World::GetDistanceToCamera(&g_kWorld, v5) )
      {
        v6 = (TextEff *)operator new(0x24u);
        if ( v6 )
        {
          TextEff::TextEff(v6);
          v3 = v7;
        }
        v3->m_kCharHandle = kHandle;
        fTime = *(float *)&v2->m_kMissGeomRes.m_uiHeight;
        v9 = v2->m_kMissGeomRes.m_uiWidth;
        v10 = (NiScreenElements *)NiObject::Clone((NiObject *)&v2->m_kMissGeomRes.m_spGeom.m_pObject->vfptr);
        TextEff::AddGeometry(v3, v10, v9, LODWORD(fTime));
        TextEff::SetStartTime(v3, Timer::ms_fCurTime);
        TextEffMgr::Add(v2, v3);
      }
    }
  }
}
// A75CE8: using guessed type float TextEff::ms_fMaxDistance;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00699410) --------------------------------------------------------
void __thiscall TextEffMgr::AddResistTextEff(TextEffMgr *this, unsigned __int16 kHandle)
{
  TextEffMgr *v2; // edi@1
  TextEff *v3; // esi@1
  Char *v4; // eax@2
  NiPoint3 *v5; // eax@3
  TextEff *v6; // eax@4
  TextEff *v7; // eax@5
  float fTime; // ST08_4@6
  unsigned int v9; // ST04_4@6
  NiScreenElements *v10; // eax@6

  v2 = this;
  v3 = 0;
  if ( this->m_kResistGeomRes.m_spGeom.m_pObject )
  {
    v4 = CharMgr::GetChar(&g_kCharMgr, kHandle);
    if ( v4 )
    {
      v5 = (NiPoint3 *)((int (__thiscall *)(_DWORD))v4->vfptr[6].Deaffect)(v4);
      if ( TextEff::ms_fMaxDistance >= World::GetDistanceToCamera(&g_kWorld, v5) )
      {
        v6 = (TextEff *)operator new(0x24u);
        if ( v6 )
        {
          TextEff::TextEff(v6);
          v3 = v7;
        }
        v3->m_kCharHandle = kHandle;
        fTime = *(float *)&v2->m_kResistGeomRes.m_uiHeight;
        v9 = v2->m_kResistGeomRes.m_uiWidth;
        v10 = (NiScreenElements *)NiObject::Clone((NiObject *)&v2->m_kResistGeomRes.m_spGeom.m_pObject->vfptr);
        TextEff::AddGeometry(v3, v10, v9, LODWORD(fTime));
        TextEff::SetStartTime(v3, Timer::ms_fCurTime);
        TextEffMgr::Add(v2, v3);
      }
    }
  }
}
// A75CE8: using guessed type float TextEff::ms_fMaxDistance;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00699500) --------------------------------------------------------
void __thiscall TextEffMgr::AddBlockTextEff(TextEffMgr *this, unsigned __int16 kHandle)
{
  TextEffMgr *v2; // edi@1
  TextEff *v3; // esi@1
  Char *v4; // eax@2
  NiPoint3 *v5; // eax@3
  TextEff *v6; // eax@4
  TextEff *v7; // eax@5
  float fTime; // ST08_4@6
  unsigned int v9; // ST04_4@6
  NiScreenElements *v10; // eax@6

  v2 = this;
  v3 = 0;
  if ( this->m_kBlockGeomRes.m_spGeom.m_pObject )
  {
    v4 = CharMgr::GetChar(&g_kCharMgr, kHandle);
    if ( v4 )
    {
      v5 = (NiPoint3 *)((int (__thiscall *)(_DWORD))v4->vfptr[6].Deaffect)(v4);
      if ( TextEff::ms_fMaxDistance >= World::GetDistanceToCamera(&g_kWorld, v5) )
      {
        v6 = (TextEff *)operator new(0x24u);
        if ( v6 )
        {
          TextEff::TextEff(v6);
          v3 = v7;
        }
        v3->m_kCharHandle = kHandle;
        fTime = *(float *)&v2->m_kBlockGeomRes.m_uiHeight;
        v9 = v2->m_kBlockGeomRes.m_uiWidth;
        v10 = (NiScreenElements *)NiObject::Clone((NiObject *)&v2->m_kBlockGeomRes.m_spGeom.m_pObject->vfptr);
        TextEff::AddGeometry(v3, v10, v9, LODWORD(fTime));
        TextEff::SetStartTime(v3, Timer::ms_fCurTime);
        TextEffMgr::Add(v2, v3);
      }
    }
  }
}
// A75CE8: using guessed type float TextEff::ms_fMaxDistance;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006995F0) --------------------------------------------------------
void __thiscall TextEffMgr::AddImmuneTextEff(TextEffMgr *this, unsigned __int16 kHandle)
{
  TextEffMgr *v2; // edi@1
  TextEff *v3; // esi@1
  Char *v4; // eax@2
  NiPoint3 *v5; // eax@3
  TextEff *v6; // eax@4
  TextEff *v7; // eax@5
  float fTime; // ST08_4@6
  unsigned int v9; // ST04_4@6
  NiScreenElements *v10; // eax@6

  v2 = this;
  v3 = 0;
  if ( this->m_kImmuneRes.m_spGeom.m_pObject )
  {
    v4 = CharMgr::GetChar(&g_kCharMgr, kHandle);
    if ( v4 )
    {
      v5 = (NiPoint3 *)((int (__thiscall *)(_DWORD))v4->vfptr[6].Deaffect)(v4);
      if ( TextEff::ms_fMaxDistance >= World::GetDistanceToCamera(&g_kWorld, v5) )
      {
        v6 = (TextEff *)operator new(0x24u);
        if ( v6 )
        {
          TextEff::TextEff(v6);
          v3 = v7;
        }
        v3->m_kCharHandle = kHandle;
        fTime = *(float *)&v2->m_kImmuneRes.m_uiHeight;
        v9 = v2->m_kImmuneRes.m_uiWidth;
        v10 = (NiScreenElements *)NiObject::Clone((NiObject *)&v2->m_kImmuneRes.m_spGeom.m_pObject->vfptr);
        TextEff::AddGeometry(v3, v10, v9, LODWORD(fTime));
        TextEff::SetStartTime(v3, Timer::ms_fCurTime);
        TextEffMgr::Add(v2, v3);
      }
    }
  }
}
// A75CE8: using guessed type float TextEff::ms_fMaxDistance;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006996E0) --------------------------------------------------------
void __thiscall TextEffMgr::Remove(TextEffMgr *this, TextEff *pkTextEff)
{
  TextEff *v2; // esi@1
  TextEffMgr *v3; // edi@1
  NiTListItem<TextEff *> *v4; // eax@1
  TextEff **v5; // ecx@2
  TextEff *v6; // edx@2
  TextEff *v7; // edi@8

  v2 = pkTextEff;
  v3 = this;
  v4 = this->m_kList.m_pkHead;
  if ( v4 )
  {
    while ( 1 )
    {
      v5 = &v4->m_element;
      v6 = (TextEff *)v4;
      v4 = v4->m_pkNext;
      if ( pkTextEff == *v5 )
        break;
      if ( !v4 )
        goto LABEL_4;
    }
  }
  else
  {
LABEL_4:
    v6 = 0;
  }
  pkTextEff = v6;
  if ( v6 )
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)v3,
      (void **)&pkTextEff);
  ((void (__stdcall *)(_DWORD, _DWORD))v3->m_pkScene->vfptr[30].__vecDelDtor)(&pkTextEff, v2->m_spNode.m_pObject);
  if ( pkTextEff )
  {
    v7 = pkTextEff;
    if ( !InterlockedDecrement((volatile LONG *)&pkTextEff->m_kCharHandle) )
    {
      if ( v7 )
        v7->vfptr->__vecDelDtor(v7, 1u);
    }
  }
  v2->vfptr->__vecDelDtor(v2, 1u);
}

//----- (00699760) --------------------------------------------------------
void __usercall TextEffMgr::RemoveAll(TextEffMgr *this@<ecx>, signed int a2@<esi>)
{
  TextEffMgr *v2; // edi@1
  NiTListItem<TextEff *> *v3; // ebx@1
  TextEff *v4; // esi@3
  NiTListItem<TextEff *> **v5; // eax@3
  TextEff **v6; // ecx@4
  NiTListItem<TextEff *> **v7; // edx@4
  void (__thiscall ***v8)(_DWORD, _DWORD); // edi@10
  signed int v9; // [sp-4h] [bp-18h]@2
  int v10; // [sp+8h] [bp-Ch]@9
  void *kPos; // [sp+Ch] [bp-8h]@7
  TextEffMgr *v12; // [sp+10h] [bp-4h]@1

  v2 = this;
  v3 = this->m_kList.m_pkHead;
  v12 = this;
  if ( v3 )
  {
    v9 = a2;
    do
    {
      v4 = v3->m_element;
      v5 = &v2->m_kList.m_pkHead->m_pkNext;
      v3 = v3->m_pkNext;
      if ( v5 )
      {
        while ( 1 )
        {
          v6 = (TextEff **)(v5 + 2);
          v7 = v5;
          v5 = (NiTListItem<TextEff *> **)*v5;
          if ( v4 == *v6 )
            break;
          if ( !v5 )
            goto LABEL_6;
        }
      }
      else
      {
LABEL_6:
        v7 = 0;
      }
      kPos = v7;
      if ( v7 )
        NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)v2,
          &kPos);
      ((void (__stdcall *)(int *, NiNode *, signed int))v2->m_pkScene->vfptr[30].__vecDelDtor)(
        &v10,
        v4->m_spNode.m_pObject,
        v9);
      if ( v10 )
      {
        v8 = (void (__thiscall ***)(_DWORD, _DWORD))v10;
        if ( !InterlockedDecrement((volatile LONG *)(v10 + 4)) )
        {
          if ( v8 )
            (**v8)(v8, 1);
        }
        v2 = v12;
      }
      v9 = 1;
      ((void (__thiscall *)(TextEff *))v4->vfptr->__vecDelDtor)(v4);
    }
    while ( v3 );
  }
}
// 699760: could not find valid save-restore pair for esi

//----- (00699800) --------------------------------------------------------
void __userpurge TextEffMgr::Update(TextEffMgr *this@<ecx>, NiCamera *a2@<ebx>, float fTime, NiCamera *pkWorldCamera)
{
  TextEffMgr *v4; // edi@1
  NiTListItem<TextEff *> *v5; // esi@1
  NiTListItem<TextEff *> **v6; // esi@5
  TextEff **v7; // eax@7
  int v8; // eax@8
  void (__thiscall ***v9)(_DWORD, _DWORD); // esi@11
  Char *v10; // eax@16
  NiNode *v11; // eax@18
  NiNode *v12; // edi@18
  double v13; // st7@18
  NiPoint3 kWorldPos; // [sp+1Ch] [bp-28h]@17
  float v15; // [sp+28h] [bp-1Ch]@18
  float v16; // [sp+2Ch] [bp-18h]@18
  float v17; // [sp+30h] [bp-14h]@18
  NiPoint3 kCharHeightPos; // [sp+34h] [bp-10h]@17

  v4 = this;
  v5 = this->m_kList.m_pkHead;
  while ( v5 )
  {
    a2 = (NiCamera *)v5->m_element;
    v5 = v5->m_pkNext;
    if ( !TextEff::IsAlive((TextEff *)a2, fTime) )
      TextEffMgr::Remove(v4, (TextEff *)a2);
  }
  v6 = &v4->m_kList.m_pkHead->m_pkNext;
  if ( v6 )
  {
    a2 = pkWorldCamera;
    do
    {
      v7 = (TextEff **)(v6 + 2);
      v6 = (NiTListItem<TextEff *> **)*v6;
      TextEff::Update(*v7, (int)a2, fTime, a2, v4->m_spScreenSpaceCamera.m_pObject);
    }
    while ( v6 );
  }
  NiAVObject::Update((NiAVObject *)&v4->m_spScreenSpaceCamera.m_pObject->vfptr, fTime, 1);
  NiAVObject::Update((NiAVObject *)&v4->m_pkScene->vfptr, fTime, 1);
  CNSTimer_MarkCheck::Update(&v4->m_kCriEffect.kMarkCheck, fTime);
  if ( v8 == 1 && v4->m_kCriEffect.spCriticalEffect.m_pObject )
  {
    ((void (__stdcall *)(float *, NiNode *))v4->m_pkScene->vfptr[30].__vecDelDtor)(
      &fTime,
      v4->m_kCriEffect.spCriticalEffect.m_pObject);
    if ( fTime != 0.0 )
    {
      v9 = (void (__thiscall ***)(_DWORD, _DWORD))LODWORD(fTime);
      if ( !InterlockedDecrement((volatile LONG *)(LODWORD(fTime) + 4)) )
      {
        if ( v9 )
          (**v9)(v9, 1);
      }
    }
    v4->m_kCriEffect.bLive = 0;
  }
  if ( v4->m_kCriEffect.bLive )
  {
    v10 = CharMgr::GetChar(&g_kCharMgr, v4->m_kCriEffect.kHandle);
    if ( v10 )
    {
      Char::GetHeightPos(v10, (int)a2, &kCharHeightPos);
      kCharHeightPos.z = kCharHeightPos.z + 20.0;
      kWorldPos = kCharHeightPos;
      if ( NiCamera::WorldPtToScreenPt(::pkWorldCamera, &kWorldPos, &fTime, (float *)&pkWorldCamera, 0.0000099999997) )
      {
        *(float *)&pkWorldCamera = 1.0 - *(float *)&pkWorldCamera;
        *(float *)&pkWorldCamera = *(float *)&pkWorldCamera * (double)PgWin::ms_uiScreenHeight;
        v11 = v4->m_kCriEffect.spCriticalEffect.m_pObject;
        fTime = (double)PgWin::ms_uiScreenWidth * fTime;
        v11->m_uFlags &= 0xFFFEu;
        v12 = v4->m_kCriEffect.spCriticalEffect.m_pObject;
        v15 = fTime;
        v13 = *(float *)&pkWorldCamera;
        v12->m_kLocal.m_Translate.x = fTime;
        v16 = v13;
        v12->m_kLocal.m_Translate.y = v16;
        v17 = 0.0;
        v12->m_kLocal.m_Translate.z = 0.0;
      }
      else
      {
        v4->m_kCriEffect.spCriticalEffect.m_pObject->m_uFlags |= 1u;
      }
    }
  }
}

//----- (00699A00) --------------------------------------------------------
void __stdcall TextEffMgr::CopyProperty(NiScreenElements *pkGeom, NiTriShape *pkTriShape)
{
  NiProperty *v3; // eax@1
  NiProperty *v4; // eax@2
  NiProperty *v5; // eax@3
  NiProperty *v6; // eax@4
  NiProperty *v7; // eax@5
  NiProperty *v8; // eax@6
  NiProperty *v9; // eax@7
  NiProperty *v10; // eax@8

  v3 = NiAVObject::GetProperty((NiAVObject *)&pkTriShape->vfptr, 0);
  if ( v3 )
  {
    v4 = (NiProperty *)NiObject::Clone((NiObject *)&v3->vfptr);
    NiAVObject::AttachProperty((NiAVObject *)&pkGeom->vfptr, v4);
  }
  v5 = NiAVObject::GetProperty((NiAVObject *)&pkTriShape->vfptr, 8);
  if ( v5 )
  {
    v6 = (NiProperty *)NiObject::Clone((NiObject *)&v5->vfptr);
    NiAVObject::AttachProperty((NiAVObject *)&pkGeom->vfptr, v6);
  }
  v7 = NiAVObject::GetProperty((NiAVObject *)&pkTriShape->vfptr, 3);
  if ( v7 )
  {
    v8 = (NiProperty *)NiObject::Clone((NiObject *)&v7->vfptr);
    NiAVObject::AttachProperty((NiAVObject *)&pkGeom->vfptr, v8);
  }
  v9 = NiAVObject::GetProperty((NiAVObject *)&pkTriShape->vfptr, 9);
  if ( v9 )
  {
    v10 = (NiProperty *)NiObject::Clone((NiObject *)&v9->vfptr);
    NiAVObject::AttachProperty((NiAVObject *)&pkGeom->vfptr, v10);
  }
}

//----- (00699A90) --------------------------------------------------------
char __thiscall TextEffMgr::CreateGeometry(TextEffMgr *this)
{
  TextEffMgr *v1; // esi@1
  const char *v2; // eax@3
  signed int v3; // ebx@5
  NiAVObject *v4; // eax@6
  NiScreenElementsData *v5; // edi@7
  NiScreenElements *v6; // eax@8
  int v7; // eax@9
  NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>Vtbl *v8; // ecx@11
  NiScreenElements **v9; // edi@11
  unsigned int v10; // edx@19
  int v11; // eax@19
  NiScreenElements *v12; // ecx@19
  NiAVObject *v13; // eax@21
  NiNode *v14; // esi@22
  LONG v15; // eax@23
  char result; // al@29
  NiScreenElementsData *v17; // edi@30
  NiScreenElements *v18; // eax@31
  NiScreenElements *v19; // eax@32
  NiScreenElements *v20; // edi@32
  NiScreenElements *v21; // ebx@34
  unsigned int v22; // eax@41
  NiAVObject *v23; // ecx@41
  NiAVObject *v24; // eax@41
  NiTriShape *v25; // ebx@41
  NiScreenElementsData *v26; // edi@42
  NiScreenElements *v27; // eax@43
  NiD3DDefaultShader *v28; // eax@44
  unsigned int v29; // edx@46
  NiAVObject *v30; // ecx@46
  NiAVObject *v31; // eax@46
  NiTriShape *v32; // ebx@46
  NiScreenElementsData *v33; // edi@47
  NiScreenElements *v34; // eax@49
  NiD3DDefaultShader *v35; // eax@50
  unsigned int v36; // eax@52
  NiAVObject *v37; // ecx@52
  NiAVObject *v38; // eax@52
  NiTriShape *v39; // ebx@52
  NiScreenElementsData *v40; // edi@53
  NiScreenElements *v41; // eax@54
  NiD3DDefaultShader *v42; // eax@55
  unsigned int v43; // eax@57
  NiAVObject *v44; // ecx@57
  char *v45; // eax@57
  const char *v46; // eax@57
  NiObjectNET *v47; // eax@57
  char *apcShapeName[6]; // [sp+34h] [bp-98h]@4
  char *format; // [sp+4Ch] [bp-80h]@5
  char **v50; // [sp+50h] [bp-7Ch]@4
  NiTriShape *pkTriShape; // [sp+54h] [bp-78h]@6
  int uiLeft; // [sp+58h] [bp-74h]@7
  int v53; // [sp+5Ch] [bp-70h]@4
  int v54; // [sp+60h] [bp-6Ch]@9
  int uiTop; // [sp+64h] [bp-68h]@7
  NiScreenElements *v56; // [sp+68h] [bp-64h]@8
  unsigned int uiHeight; // [sp+6Ch] [bp-60h]@7
  unsigned int uiWidth; // [sp+70h] [bp-5Ch]@7
  NiGeometry *pkGeometry; // [sp+74h] [bp-58h]@6
  NiPointer<NiNode> spNode; // [sp+78h] [bp-54h]@1
  char acTriShapeName[64]; // [sp+7Ch] [bp-50h]@6
  int v62; // [sp+C8h] [bp-4h]@1

  v1 = this;
  spNode.m_pObject = 0;
  v62 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v2 = Folder::Merge(&Folder::m_acEffect, "Number.nif");
  PgUtil::LoadNodeNifFile(v2, &spNode, 0);
  if ( !spNode.m_pObject )
    return 0;
  apcShapeName[0] = "W20p%02d";
  apcShapeName[1] = "R20p%02d";
  apcShapeName[2] = "Y20p%02d";
  apcShapeName[3] = "G20p%02d";
  apcShapeName[4] = "S%02d";
  apcShapeName[5] = "H%02d";
  v53 = 2;
  v50 = apcShapeName;
  while ( 2 )
  {
    v3 = 0;
    format = *v50;
    do
    {
      pkGeometry = 0;
      sprintf(acTriShapeName, format, v3);
      v4 = (NiAVObject *)((int (__stdcall *)(char *))spNode.m_pObject->vfptr[18].__vecDelDtor)(acTriShapeName);
      PgUtil::CatchGeometry(v4, &pkGeometry);
      pkTriShape = (NiTriShape *)pkGeometry;
      if ( !pkGeometry )
        goto LABEL_24;
      v5 = PgUtil::CreateScreenGeometryDataFromTriShapeData(
             (NiTriShapeData *)pkGeometry->m_spModelData.m_pObject,
             &uiLeft,
             &uiTop,
             &uiWidth,
             &uiHeight,
             0.0,
             0.0);
      if ( !v5 )
        goto LABEL_22;
      v6 = (NiScreenElements *)operator new(0xC4u);
      v56 = v6;
      LOBYTE(v62) = 1;
      if ( v6 )
      {
        NiScreenElements::NiScreenElements(v6, v5);
        v54 = v7;
      }
      else
      {
        v54 = 0;
        v7 = 0;
      }
      v8 = (&v1->m_kList.vfptr)[v3 + v53];
      v9 = (NiScreenElements **)((char *)v1 + 12 * (v3 + v53));
      LOBYTE(v62) = 0;
      v56 = (NiScreenElements *)v8;
      if ( v8 != (NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>Vtbl *)v7 )
      {
        if ( v8 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v8->NewItem) && v56 )
            ((void (__stdcall *)(signed int))v56->vfptr->__vecDelDtor)(1);
          v7 = v54;
        }
        *v9 = (NiScreenElements *)v7;
        if ( v7 )
          InterlockedIncrement((volatile LONG *)(v7 + 4));
      }
      TextEffMgr::CopyProperty(*v9, pkTriShape);
      v10 = uiHeight;
      v11 = (int)v1 + 12 * (v53 + v3 - 2);
      *(_DWORD *)(v11 + 16) = uiWidth;
      v12 = *v9;
      *(_DWORD *)(v11 + 20) = v10;
      NiAVObject::UpdateEffects((NiAVObject *)&v12->vfptr);
      NiAVObject::UpdateProperties((NiAVObject *)&(*v9)->vfptr);
      NiAVObject::Update((NiAVObject *)&(*v9)->vfptr, 0.0, 1);
      ++v3;
    }
    while ( v3 < 10 );
    ++v50;
    v53 += 10;
    if ( v53 < 62 )
      continue;
    break;
  }
  pkGeometry = 0;
  v13 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Miss");
  PgUtil::CatchGeometry(v13, &pkGeometry);
  pkTriShape = (NiTriShape *)pkGeometry;
  if ( !pkGeometry )
    goto LABEL_22;
  v17 = PgUtil::CreateScreenGeometryDataFromTriShapeData(
          (NiTriShapeData *)pkGeometry->m_spModelData.m_pObject,
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight,
          0.0,
          0.0);
  if ( !v17 )
    goto LABEL_24;
  v18 = (NiScreenElements *)operator new(0xC4u);
  v56 = v18;
  LOBYTE(v62) = 2;
  if ( v18 )
  {
    NiScreenElements::NiScreenElements(v18, v17);
    v20 = v19;
  }
  else
  {
    v20 = 0;
  }
  v21 = v1->m_kMissGeomRes.m_spGeom.m_pObject;
  LOBYTE(v62) = 0;
  if ( v21 != v20 )
  {
    if ( v21 && !InterlockedDecrement((volatile LONG *)&v21->m_uiRefCount) && v21 )
      v21->vfptr->__vecDelDtor((NiRefObject *)v21, 1u);
    v1->m_kMissGeomRes.m_spGeom.m_pObject = v20;
    if ( v20 )
      InterlockedIncrement((volatile LONG *)&v20->m_uiRefCount);
  }
  TextEffMgr::CopyProperty(v1->m_kMissGeomRes.m_spGeom.m_pObject, pkTriShape);
  v22 = uiHeight;
  v23 = (NiAVObject *)&v1->m_kMissGeomRes.m_spGeom.m_pObject->vfptr;
  v1->m_kMissGeomRes.m_uiWidth = uiWidth;
  v1->m_kMissGeomRes.m_uiHeight = v22;
  NiAVObject::UpdateEffects(v23);
  NiAVObject::UpdateProperties((NiAVObject *)&v1->m_kMissGeomRes.m_spGeom.m_pObject->vfptr);
  NiAVObject::Update((NiAVObject *)&v1->m_kMissGeomRes.m_spGeom.m_pObject->vfptr, 0.0, 1);
  pkGeometry = 0;
  v24 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Block");
  PgUtil::CatchGeometry(v24, &pkGeometry);
  v25 = (NiTriShape *)pkGeometry;
  if ( !pkGeometry )
    goto LABEL_22;
  v26 = PgUtil::CreateScreenGeometryDataFromTriShapeData(
          (NiTriShapeData *)pkGeometry->m_spModelData.m_pObject,
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight,
          0.0,
          0.0);
  if ( !v26 )
  {
LABEL_24:
    v14 = spNode.m_pObject;
    v62 = -1;
    if ( !spNode.m_pObject )
      return 0;
    v15 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
    goto LABEL_26;
  }
  v27 = (NiScreenElements *)operator new(0xC4u);
  v56 = v27;
  LOBYTE(v62) = 3;
  if ( v27 )
    NiScreenElements::NiScreenElements(v27, v26);
  else
    v28 = 0;
  LOBYTE(v62) = 0;
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v1->m_kBlockGeomRes.m_spGeom, v28);
  TextEffMgr::CopyProperty(v1->m_kBlockGeomRes.m_spGeom.m_pObject, v25);
  v29 = uiHeight;
  v1->m_kBlockGeomRes.m_uiWidth = uiWidth;
  v30 = (NiAVObject *)&v1->m_kBlockGeomRes.m_spGeom.m_pObject->vfptr;
  v1->m_kBlockGeomRes.m_uiHeight = v29;
  NiAVObject::UpdateEffects(v30);
  NiAVObject::UpdateProperties((NiAVObject *)&v1->m_kBlockGeomRes.m_spGeom.m_pObject->vfptr);
  NiAVObject::Update((NiAVObject *)&v1->m_kBlockGeomRes.m_spGeom.m_pObject->vfptr, 0.0, 1);
  pkGeometry = 0;
  v31 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Resist");
  PgUtil::CatchGeometry(v31, &pkGeometry);
  v32 = (NiTriShape *)pkGeometry;
  if ( !pkGeometry )
  {
LABEL_22:
    v14 = spNode.m_pObject;
    v62 = -1;
    if ( !spNode.m_pObject )
      return 0;
    v15 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
LABEL_26:
    if ( !v15 )
    {
      if ( v14 )
        v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
    }
    return 0;
  }
  v33 = PgUtil::CreateScreenGeometryDataFromTriShapeData(
          (NiTriShapeData *)pkGeometry->m_spModelData.m_pObject,
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight,
          0.0,
          0.0);
  if ( v33
    && ((v34 = (NiScreenElements *)operator new(0xC4u), v56 = v34, LOBYTE(v62) = 4, !v34) ? (v35 = 0) : NiScreenElements::NiScreenElements(v34, v33),
        (LOBYTE(v62) = 0,
         NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v1->m_kResistGeomRes.m_spGeom, v35),
         TextEffMgr::CopyProperty(v1->m_kResistGeomRes.m_spGeom.m_pObject, v32),
         v36 = uiWidth,
         v1->m_kResistGeomRes.m_uiHeight = uiHeight,
         v37 = (NiAVObject *)&v1->m_kResistGeomRes.m_spGeom.m_pObject->vfptr,
         v1->m_kResistGeomRes.m_uiWidth = v36,
         NiAVObject::UpdateEffects(v37),
         NiAVObject::UpdateProperties((NiAVObject *)&v1->m_kResistGeomRes.m_spGeom.m_pObject->vfptr),
         NiAVObject::Update((NiAVObject *)&v1->m_kResistGeomRes.m_spGeom.m_pObject->vfptr, 0.0, 1),
         pkGeometry = 0,
         v38 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Immune"),
         PgUtil::CatchGeometry(v38, &pkGeometry),
         (v39 = (NiTriShape *)pkGeometry) != 0)
     && (v40 = PgUtil::CreateScreenGeometryDataFromTriShapeData(
                 (NiTriShapeData *)pkGeometry->m_spModelData.m_pObject,
                 &uiLeft,
                 &uiTop,
                 &uiWidth,
                 &uiHeight,
                 0.0,
                 0.0)) != 0) )
  {
    v41 = (NiScreenElements *)operator new(0xC4u);
    v56 = v41;
    LOBYTE(v62) = 5;
    if ( v41 )
      NiScreenElements::NiScreenElements(v41, v40);
    else
      v42 = 0;
    LOBYTE(v62) = 0;
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v1->m_kImmuneRes.m_spGeom, v42);
    TextEffMgr::CopyProperty(v1->m_kImmuneRes.m_spGeom.m_pObject, v39);
    v43 = uiWidth;
    v1->m_kImmuneRes.m_uiHeight = uiHeight;
    v44 = (NiAVObject *)&v1->m_kImmuneRes.m_spGeom.m_pObject->vfptr;
    v1->m_kImmuneRes.m_uiWidth = v43;
    NiAVObject::UpdateEffects(v44);
    NiAVObject::UpdateProperties((NiAVObject *)&v1->m_kImmuneRes.m_spGeom.m_pObject->vfptr);
    NiAVObject::Update((NiAVObject *)&v1->m_kImmuneRes.m_spGeom.m_pObject->vfptr, 0.0, 1);
    v45 = Folder::Effect();
    v46 = fs("%s\\CriticalEffect.nif", v45);
    v47 = Ns_LoadNifFile(v46, 0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v1->m_kCriEffect, (NiD3DDefaultShader *)v47);
    v62 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    result = 1;
  }
  else
  {
    v62 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0069A120) --------------------------------------------------------
void __thiscall TextEffMgr::AddDamage(TextEffMgr *this, unsigned __int16 kHandle, int iNum)
{
  TextEffMgr *v3; // esi@1
  unsigned __int16 v4; // bx@3
  Char *v5; // eax@10
  char v6; // al@12
  int v7; // edi@12
  TextEffMgr *v8; // ecx@12
  NiNode *v9; // ecx@13
  NiNode *v10; // eax@13
  char v11; // al@27
  bool _fTime; // [sp+Ch] [bp-10h]@12
  Char *pkChar; // [sp+24h] [bp+8h]@11

  v3 = this;
  if ( iNum & 0x2000000 )
  {
    TextEffMgr::AddBlockTextEff(this, kHandle);
    return;
  }
  v4 = kHandle;
  if ( iNum & 0x1000000 )
    TextEffMgr::AddResistTextEff(this, kHandle);
  if ( iNum & 0x20000000 )
  {
    TextEffMgr::AddMissTextEff(v3, kHandle);
    return;
  }
  if ( iNum & 0x100000 )
  {
    TextEffMgr::AddImmuneTextEff(v3, kHandle);
    return;
  }
  if ( !(iNum & 0x4000000) )
  {
    v5 = CharMgr::GetChar(&g_kCharMgr, kHandle);
    if ( iNum & 0x40000000 )
    {
      pkChar = v5;
      if ( !v5 )
        return;
      v6 = ((int (__thiscall *)(Char *))v5->vfptr[1].Affect)(v5);
      v7 = (unsigned __int16)iNum;
      _fTime = 1;
      v8 = v3;
      if ( v6 )
      {
        TextEffMgr::AddNumTextEff(v3, v4, (unsigned __int16)iNum, 0, 1);
        NsEffect::SetEffectNode(
          &v3->m_kCriEffect.kEffect,
          (NiAVObject *)&v3->m_kCriEffect.spCriticalEffect.m_pObject->vfptr);
        NsEffect::Start(&v3->m_kCriEffect.kEffect, Timer::ms_fCurTime);
        v3->m_kCriEffect.kMarkCheck.m_fMarkTime = v3->m_kCriEffect.kEffect.m_fMaxTime;
        CNSTimer_MarkCheck::ReSet(&v3->m_kCriEffect.kMarkCheck, Timer::ms_fCurTime, OVER);
        v9 = v3->m_pkScene;
        v10 = v3->m_kCriEffect.spCriticalEffect.m_pObject;
        v3->m_kCriEffect.bLive = 1;
        v3->m_kCriEffect.kHandle = v4;
        ((void (__stdcall *)(NiNode *, signed int))v9->vfptr[29].__vecDelDtor)(v10, 1);
        SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_Critical01);
        if ( !EffectMgr::JustCreateAttachEffect(&g_kEffectMgr, "Critical_Chest", pkChar, PKCS7, Timer::ms_fCurTime, 1) )
          OutputDebugStringA("don't exist Critical Effect by /resmenu/critical_chest.nif");
        if ( AbStateInfectee::IsInList((AbStateInfectee *)&pkChar->vfptr, STA_COMMONSTUN02) )
          pkChar->vfptr[12].IsVisible((AbStateInfectee *)pkChar);
        NiAVObject::UpdateProperties((NiAVObject *)&v3->m_kCriEffect.spCriticalEffect.m_pObject->vfptr);
        NiAVObject::UpdateEffects((NiAVObject *)&v3->m_kCriEffect.spCriticalEffect.m_pObject->vfptr);
        return;
      }
LABEL_29:
      TextEffMgr::AddNumTextEff(v8, v4, v7, YELLOW, _fTime);
      return;
    }
    if ( iNum & 0x10000000 )
    {
      if ( v5 )
        TextEffMgr::AddNumTextEff(v3, kHandle, (unsigned __int16)iNum, HEAL, 0);
    }
    else
    {
      if ( !((unsigned int)&loc_800000 & iNum) )
      {
        if ( !v5 )
          return;
        v11 = ((int (__thiscall *)(Char *))v5->vfptr[1].Affect)(v5);
        v7 = (unsigned __int16)iNum;
        _fTime = 0;
        v8 = v3;
        if ( v11 )
        {
          TextEffMgr::AddNumTextEff(v3, kHandle, (unsigned __int16)iNum, RED, 0);
          return;
        }
        goto LABEL_29;
      }
      if ( v5 )
      {
        if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v5->vfptr[1].Affect)(v5) )
          TextEffMgr::AddNumTextEff(v3, kHandle, (unsigned __int16)iNum, SKILL_DAMAGE_FROM_MOB, 0);
        else
          TextEffMgr::AddNumTextEff(v3, kHandle, (unsigned __int16)iNum, SKILL_DAMAGE_FROM_MAINUSER, 0);
      }
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0069A360) --------------------------------------------------------
void __thiscall TextEffMgr::TextEffMgr(TextEffMgr *this)
{
  TextEffMgr *v1; // esi@1

  v1 = this;
  this->m_kList.m_kAllocator.m_uiCount = 0;
  this->m_kList.m_pkHead = 0;
  this->m_kList.m_pkTail = 0;
  this->m_kList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>Vtbl *)&PgTList<TextEff *>::`vftable';
  `eh vector constructor iterator'(
    this->m_akNumGeomRes,
    0xCu,
    60,
    (void (__thiscall *)(void *))TextEffMgr::GeomRes::GeomRes,
    (void (__thiscall *)(void *))TextEffMgr::GeomRes::~GeomRes);
  v1->m_kMissGeomRes.m_spGeom.m_pObject = 0;
  v1->m_kBlockGeomRes.m_spGeom.m_pObject = 0;
  v1->m_kResistGeomRes.m_spGeom.m_pObject = 0;
  v1->m_kImmuneRes.m_spGeom.m_pObject = 0;
  v1->m_spScreenSpaceCamera.m_pObject = 0;
  v1->m_spNormalHitMoveCtrl.m_pObject = 0;
  v1->m_spNormalHitNoiseCtrl.m_pObject = 0;
  v1->m_spNormalHitAlphaCtrl.m_pObject = 0;
  v1->m_spCriticalHitMoveCtrl.m_pObject = 0;
  v1->m_spCriticalHitNoiseCtrl.m_pObject = 0;
  v1->m_spCriticalHitSizeCtrl.m_pObject = 0;
  v1->m_spCriticalHitAlphaCtrl.m_pObject = 0;
  v1->m_kCriEffect.spCriticalEffect.m_pObject = 0;
  CNSTimer_MarkCheck::CNSTimer_MarkCheck(&v1->m_kCriEffect.kMarkCheck);
  NsEffect::NsEffect(&v1->m_kCriEffect.kEffect);
}
// 9BD6FC: using guessed type int (__thiscall *PgTList<TextEff *>::`vftable')(void *p, char);

//----- (0069A440) --------------------------------------------------------
bool __thiscall TextEffMgr::Init(TextEffMgr *this)
{
  TextEffMgr *v1; // esi@1
  NiRoom *v2; // eax@1
  PgWinCamera *v3; // ebx@1
  PgWinCamera *v4; // eax@2
  PgWinCamera *v5; // edi@3
  PgWinCamera *v6; // ebx@10
  NiRenderer *v7; // edi@10
  NiRoom *v8; // ecx@10
  NiAVObject *v9; // ecx@18
  NiProperty *v10; // eax@18
  NiRoom *v11; // eax@18
  NiRoom *v12; // edi@18
  NiRoom *v13; // eax@23
  int v14; // eax@24
  int v15; // edi@24
  NiAVObject *v16; // ecx@26
  NiProperty *v17; // eax@26
  bool result; // al@28
  NiPointer<NiRoom> v19; // [sp+2Ch] [bp-14h]@1
  NiPointer<NiRoom> element; // [sp+30h] [bp-10h]@10
  int v21; // [sp+3Ch] [bp-4h]@1

  v1 = this;
  v2 = (NiRoom *)operator new(0x130u);
  v19.m_pObject = v2;
  v3 = 0;
  v21 = 0;
  if ( v2 )
  {
    PgWinCamera::PgWinCamera((PgWinCamera *)v2);
    v3 = v4;
  }
  v5 = v1->m_spScreenSpaceCamera.m_pObject;
  v21 = -1;
  if ( v5 != v3 )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spScreenSpaceCamera.m_pObject = v3;
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
  v6 = v1->m_spScreenSpaceCamera.m_pObject;
  v7 = v6->m_spRenderer.m_pObject;
  v8 = (NiRoom *)NiRenderer::ms_pkRenderer;
  element.m_pObject = (NiRoom *)NiRenderer::ms_pkRenderer;
  if ( v7 != NiRenderer::ms_pkRenderer )
  {
    if ( v7 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      v8 = element.m_pObject;
    }
    v6->m_spRenderer.m_pObject = (NiRenderer *)v8;
    if ( v8 )
      InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  }
  PgWinCamera::UpdateRenderTargetBounds(v1->m_spScreenSpaceCamera.m_pObject);
  NiAVObject::Update((NiAVObject *)&v1->m_spScreenSpaceCamera.m_pObject->vfptr, 0.0, 1);
  v9 = (NiAVObject *)&v1->m_spScreenSpaceCamera.m_pObject->m_spScene.m_pObject->vfptr;
  v1->m_pkScene = (NiNode *)v9;
  v10 = NiAVObject::GetProperty(v9, 11);
  LOWORD(v10[1].vfptr) = (unsigned int)v10[1].vfptr & 0xFFFD | 1;
  v11 = (NiRoom *)operator new(0x20u);
  v12 = v11;
  v19.m_pObject = v11;
  v21 = 1;
  if ( v11 )
  {
    NiObjectNET::NiObjectNET((NiObjectNET *)&v11->vfptr);
    v12->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
    v12->m_uFlags = 236;
    *((_BYTE *)&v12->m_uFlags + 2) = 0;
  }
  else
  {
    v12 = 0;
  }
  v12->m_uFlags |= 1u;
  v19.m_pObject = (NiRoom *)v1->m_pkScene;
  element.m_pObject = v12;
  InterlockedIncrement((volatile LONG *)&v12->m_uiRefCount);
  v21 = 2;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v19.m_pObject->m_kPropertyList,
    &element);
  v21 = -1;
  if ( !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) )
    v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
  v13 = (NiRoom *)operator new(0x60u);
  v19.m_pObject = v13;
  v21 = 3;
  if ( v13 )
  {
    NiMaterialProperty::NiMaterialProperty((NiMaterialProperty *)v13);
    v15 = v14;
  }
  else
  {
    v15 = 0;
  }
  ++*(_DWORD *)(v15 + 88);
  *(float *)(v15 + 68) = 1.0;
  *(float *)(v15 + 72) = 1.0;
  *(float *)(v15 + 76) = 1.0;
  v16 = (NiAVObject *)&v1->m_pkScene->vfptr;
  v21 = -1;
  v17 = NiAVObject::GetProperty(v16, 3);
  NiAVObject::DetachProperty((NiAVObject *)&v1->m_pkScene->vfptr, v17);
  element.m_pObject = (NiRoom *)v1->m_pkScene;
  v19.m_pObject = (NiRoom *)v15;
  InterlockedIncrement((volatile LONG *)(v15 + 4));
  v21 = 4;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&element.m_pObject->m_kPropertyList,
    &v19);
  v21 = -1;
  if ( !InterlockedDecrement((volatile LONG *)(v15 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v15)(v15, 1);
  NiAVObject::UpdateProperties((NiAVObject *)&v1->m_pkScene->vfptr);
  NiAVObject::UpdateEffects((NiAVObject *)&v1->m_pkScene->vfptr);
  result = TextEffMgr::CreateGeometry(v1);
  if ( result )
    result = TextEffMgr::LoadController(v1) != 0;
  return result;
}
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);

//----- (0069A700) --------------------------------------------------------
void __thiscall TextEffMgr::Terminate(TextEffMgr *this)
{
  TextEffMgr *v1; // esi@1
  NiNode *v2; // edi@1
  PgWinCamera *v3; // edi@6

  v1 = this;
  v2 = this->m_kCriEffect.spCriticalEffect.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_kCriEffect.spCriticalEffect.m_pObject = 0;
  }
  TextEffMgr::ReleaseGeometry(v1);
  TextEffMgr::ReleaseController(v1);
  TextEffMgr::RemoveAll(v1, (signed int)v1);
  v3 = v1->m_spScreenSpaceCamera.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spScreenSpaceCamera.m_pObject = 0;
  }
  v1->m_pkScene = 0;
}

//----- (0069A780) --------------------------------------------------------
void __thiscall TextEffMgr::GeomRes::GeomRes(TextEffMgr::GeomRes *this)
{
  this->m_spGeom.m_pObject = 0;
}

//----- (0069A790) --------------------------------------------------------
void __thiscall NiTPointerList<TextEff *>::~NiTPointerList<TextEff *>(NiTPointerList<TextEff *> *this)
{
  NiTPointerList<TextEff *> *v1; // edi@1
  NiTListItem<TextEff *> *v2; // esi@1
  NiTListItem<TextEff *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,TextEff *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>::`vftable';
}
// 9BD6DC: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>::`vftable')(void *p, char);
// 9BD6EC: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,TextEff *>::`vftable')(void *p, char);

//----- (0069A810) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,TextEff *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,TextEff *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,TextEff *> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,TextEff *> *v2; // edi@1
  NiTListItem<TextEff *> *v3; // esi@1
  NiTListItem<TextEff *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,TextEff *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BD6DC: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>::`vftable')(void *p, char);
// 9BD6EC: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,TextEff *>::`vftable')(void *p, char);

//----- (0069A8A0) --------------------------------------------------------
void __thiscall PgTList<TextEff *>::~PgTList<TextEff *>(PgTList<TextEff *> *this)
{
  PgTList<TextEff *> *v1; // edi@1
  NiTListItem<TextEff *> *v2; // esi@1
  NiTListItem<TextEff *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>Vtbl *)&PgTList<TextEff *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>::`vftable';
}
// 9BD6DC: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>::`vftable')(void *p, char);
// 9BD6FC: using guessed type int (__thiscall *PgTList<TextEff *>::`vftable')(void *p, char);

//----- (0069A920) --------------------------------------------------------
PgTList<TextEff *> *__thiscall PgTList<TextEff *>::`vector deleting destructor'(PgTList<TextEff *> *this, unsigned int a2)
{
  PgTList<TextEff *> *v2; // edi@1
  NiTListItem<TextEff *> *v3; // esi@1
  NiTListItem<TextEff *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>Vtbl *)&PgTList<TextEff *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BD6DC: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,TextEff *>::`vftable')(void *p, char);
// 9BD6FC: using guessed type int (__thiscall *PgTList<TextEff *>::`vftable')(void *p, char);

//----- (0069A9B0) --------------------------------------------------------
void __thiscall CBlindEffect::FastEnd(CBlindEffect *this)
{
  char *v1; // eax@4

  if ( this->m_spBlindScreen.m_pObject && this->m_fFadeMaxTime >= 1.0 && this->m_fFullCurTime >= 1.0 )
  {
    v1 = (char *)&this->m_fFullCurTime;
    if ( this->m_fFadeMaxTime <= (double)this->m_fFullCurTime )
      v1 = (char *)&this->m_fFadeMaxTime;
    this->m_fFullCurTime = *(float *)v1 / this->m_fFadeMaxTime;
    this->m_fFadeMaxTime = this->m_fFadeMaxTime / this->m_fFadeMaxTime;
  }
}

//----- (0069AA00) --------------------------------------------------------
void __thiscall CBlindEffect::CBlindEffect(CBlindEffect *this)
{
  CBlindEffect *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v1->m_fFullCurTime = 0.0;
  v1->vfptr = (NiRefObjectVtbl *)&CBlindEffect::`vftable';
  v1->m_fFadeMaxTime = 0.0;
  v1->m_fCurNowTime = 0.0;
  v1->m_spBlindScreen.m_pObject = 0;
  v1->m_spTexture.m_pObject = 0;
  v1->m_fFadeInTime = 0.0;
  v1->m_IsRunBlindEffect = 0;
  v1->m_fMaxLengthTime = 0.0;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9BD71C: using guessed type int (__thiscall *CBlindEffect::`vftable')(void *p, char);

//----- (0069AA40) --------------------------------------------------------
char __thiscall CBlindEffect::Stop(CBlindEffect *this)
{
  CBlindEffect *v1; // esi@1
  NiScreenElements *v2; // edi@1
  char result; // al@6

  v1 = this;
  v2 = this->m_spBlindScreen.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spBlindScreen.m_pObject = 0;
  }
  v1->m_fCurNowTime = 0.0;
  v1->m_IsRunBlindEffect = 0;
  v1->m_fFadeInTime = 0.0;
  result = 1;
  v1->m_fMaxLengthTime = 0.0;
  return result;
}

//----- (0069AA90) --------------------------------------------------------
void __thiscall CBlindEffect::Draw(CBlindEffect *this, NiRenderer *pRender)
{
  CBlindEffect *v2; // edi@1

  v2 = this;
  if ( this->m_spBlindScreen.m_pObject )
  {
    if ( (pRender->m_eFrameState == 1 || pRender->m_eOffScreenFrameState == 1)
      && pRender->m_bRenderTargetGroupActive == 1 )
    {
      pRender->vfptr[71].__vecDelDtor((NiRefObject *)pRender, 0);
    }
    NiScreenElements::Draw(v2->m_spBlindScreen.m_pObject, pRender);
  }
}

//----- (0069AAE0) --------------------------------------------------------
void __thiscall CBlindEffect::Update(CBlindEffect *this, float fAccolTime)
{
  double v2; // st7@1
  CBlindEffect *v3; // esi@1
  double v4; // st6@2
  float *v5; // ecx@5
  float *v6; // eax@7
  NiScreenElements *v7; // ecx@9
  double v8; // st7@10
  NiScreenElementsData *v9; // ecx@10
  double v10; // st6@10
  float v11; // ST10_4@10
  float v12; // ST0C_4@10
  float v13; // ST08_4@10
  float *v14; // eax@13
  double v15; // st7@15
  NiScreenElements *v16; // eax@15
  NiScreenElements *v17; // edi@16
  NiColorA kCommonValue; // [sp+14h] [bp-28h]@9
  float fLeft; // [sp+24h] [bp-18h]@10
  float fTop; // [sp+28h] [bp-14h]@10
  float fWidth; // [sp+2Ch] [bp-10h]@10
  float fHeight; // [sp+30h] [bp-Ch]@5
  float v23; // [sp+34h] [bp-8h]@5
  float ftime; // [sp+38h] [bp-4h]@5

  v2 = 0.0;
  v3 = this;
  if ( this->m_fFullCurTime <= 0.0 )
  {
    v17 = this->m_spBlindScreen.m_pObject;
    if ( v17 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v17->m_uiRefCount) && v17 )
        v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
      v2 = 0.0;
      v3->m_spBlindScreen.m_pObject = 0;
    }
    v3->m_fCurNowTime = v2;
    v3->m_IsRunBlindEffect = 0;
    v3->m_fFadeInTime = v2;
    v3->m_fMaxLengthTime = v2;
  }
  else
  {
    v4 = fAccolTime;
    if ( 0.0 == this->m_fCurNowTime )
      this->m_fCurNowTime = fAccolTime;
    this->m_fFullCurTime = this->m_fFullCurTime - (v4 - this->m_fCurNowTime);
    this->m_fCurNowTime = v4;
    if ( this->m_fFullCurTime < (double)this->m_fFadeMaxTime )
    {
      v5 = &v23;
      ftime = (v3->m_fFadeMaxTime - v3->m_fFullCurTime + 1.0) / (v3->m_fFadeMaxTime + 1.0);
      v23 = 0.0;
      fHeight = 1.0;
      if ( ftime >= 0.0 )
        v5 = &ftime;
      v6 = v5;
      if ( *v5 >= 1.0 )
        v6 = &fHeight;
      v7 = v3->m_spBlindScreen.m_pObject;
      kCommonValue.r = 0.0;
      kCommonValue.g = 0.0;
      kCommonValue.b = 0.0;
      kCommonValue.a = *v6;
      NiScreenElementsData::SetColors((NiScreenElementsData *)v7->m_spModelData.m_pObject, 0, &kCommonValue);
      if ( ftime > 0.8799999952316284 )
      {
        fHeight = sqrt(ftime);
        ftime = fHeight;
        NiScreenElementsData::GetRectangle(
          (NiScreenElementsData *)v3->m_spBlindScreen.m_pObject->m_spModelData.m_pObject,
          0,
          &fLeft,
          &fTop,
          &fWidth,
          &fHeight);
        v8 = 0.25 * ftime;
        v9 = (NiScreenElementsData *)v3->m_spBlindScreen.m_pObject->m_spModelData.m_pObject;
        v10 = ftime * 0.550000011920929;
        v23 = fHeight + v8;
        v11 = v23;
        v23 = fWidth + v10;
        v12 = v23;
        v23 = fTop - v8 * 0.5;
        v13 = v23;
        v23 = fLeft - 0.5 * v10;
        NiScreenElementsData::SetRectangle(v9, 0, v23, v13, v12, v11);
      }
      NiAVObject::Update((NiAVObject *)&v3->m_spBlindScreen.m_pObject->vfptr, fAccolTime, 1);
    }
    if ( v3->m_fFadeInTime < (double)v3->m_fFullCurTime )
    {
      fAccolTime = v3->m_fMaxLengthTime - v3->m_fFullCurTime;
      fAccolTime = sqrt(fAccolTime);
      fAccolTime = 1.0 / (fAccolTime * 10.0);
      fLeft = 0.1;
      v14 = &fLeft;
      if ( fAccolTime >= 0.1000000014901161 )
        v14 = &fAccolTime;
      kCommonValue.r = 0.0;
      kCommonValue.g = 0.0;
      kCommonValue.b = 0.0;
      v15 = *v14;
      v16 = v3->m_spBlindScreen.m_pObject;
      kCommonValue.a = v15;
      NiScreenElementsData::SetColors((NiScreenElementsData *)v16->m_spModelData.m_pObject, 0, &kCommonValue);
    }
  }
}

//----- (0069AD20) --------------------------------------------------------
void __thiscall CBlindEffect::~CBlindEffect(CBlindEffect *this)
{
  CBlindEffect *v1; // esi@1
  NiScreenElements *v2; // edi@1
  NiDynamicTexture *v3; // edi@6
  NiScreenElements *v4; // edi@10

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&CBlindEffect::`vftable';
  v2 = this->m_spBlindScreen.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spBlindScreen.m_pObject = 0;
  }
  v1->m_IsRunBlindEffect = 0;
  v1->m_fCurNowTime = 0.0;
  v1->m_fFadeInTime = 0.0;
  v1->m_fMaxLengthTime = 0.0;
  v3 = v1->m_spTexture.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v4 = v1->m_spBlindScreen.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v1->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9BD71C: using guessed type int (__thiscall *CBlindEffect::`vftable')(void *p, char);

//----- (0069AE00) --------------------------------------------------------
char __thiscall CBlindEffect::Start(CBlindEffect *this, float fFullTime, float fFadeTime)
{
  CBlindEffect *v3; // esi@1
  NiRoom *v4; // edi@1
  NiScreenElements *v5; // ebx@1
  NiRoom *v6; // eax@2
  NiScreenElementsData *v7; // eax@3
  NiScreenElements *v8; // eax@5
  NiScreenElements *v9; // edi@6
  NiScreenElements *v10; // eax@13
  NiRoom *v11; // eax@13
  NiRoom *v12; // edi@13
  NiRoom *v13; // eax@18
  NiRoom *v14; // edi@18
  const char *v15; // eax@25
  NiRoom *v16; // eax@25
  const char *v17; // ecx@26
  int v18; // eax@28
  int v19; // edi@28
  bool v20; // cf@32
  NiColorA kCommonValue; // [sp+28h] [bp-44h]@13
  NiPointer<NiRoom> element; // [sp+38h] [bp-34h]@2
  NiPointer<NiRoom> v24; // [sp+3Ch] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > ProgressBarName; // [sp+40h] [bp-2Ch]@25
  int v26; // [sp+68h] [bp-4h]@1

  v3 = this;
  this->m_fFullCurTime = fFullTime;
  this->m_fFadeMaxTime = fFadeTime;
  this->m_fCurNowTime = 0.0;
  this->m_fFadeInTime = fFullTime / 0.800000011920929;
  this->m_fMaxLengthTime = fFullTime;
  v4 = (NiRoom *)operator new(0xC4u);
  v24.m_pObject = v4;
  v5 = 0;
  v26 = 0;
  if ( v4 )
  {
    v6 = (NiRoom *)operator new(0x70u);
    element.m_pObject = v6;
    LOBYTE(v26) = 1;
    if ( v6 )
      NiScreenElementsData::NiScreenElementsData((NiScreenElementsData *)v6, 0, 1, 1u, 1, 1, 4, 1, 2, 1);
    else
      v7 = 0;
    LOBYTE(v26) = 0;
    NiScreenElements::NiScreenElements((NiScreenElements *)v4, v7);
    v5 = v8;
  }
  v9 = v3->m_spBlindScreen.m_pObject;
  v26 = -1;
  if ( v9 != v5 )
  {
    if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v3->m_spBlindScreen.m_pObject = v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  }
  NiScreenElementsData::Insert((NiScreenElementsData *)v3->m_spBlindScreen.m_pObject->m_spModelData.m_pObject, 4u, 0, 0);
  NiScreenElementsData::SetRectangle(
    (NiScreenElementsData *)v3->m_spBlindScreen.m_pObject->m_spModelData.m_pObject,
    0,
    0.0,
    0.0,
    1.0,
    1.0);
  NiScreenElementsData::UpdateBound((NiScreenElementsData *)v3->m_spBlindScreen.m_pObject->m_spModelData.m_pObject);
  NiScreenElementsData::SetTextures(
    (NiScreenElementsData *)v3->m_spBlindScreen.m_pObject->m_spModelData.m_pObject,
    0,
    0,
    -2.0,
    -0.69999999,
    3.0,
    1.7);
  v10 = v3->m_spBlindScreen.m_pObject;
  kCommonValue.r = 0.0;
  kCommonValue.g = 0.0;
  kCommonValue.b = 0.0;
  kCommonValue.a = 0.1;
  NiScreenElementsData::SetColors((NiScreenElementsData *)v10->m_spModelData.m_pObject, 0, &kCommonValue);
  v11 = (NiRoom *)operator new(0x28u);
  v12 = v11;
  v24.m_pObject = v11;
  v26 = 2;
  if ( v11 )
  {
    NiObjectNET::NiObjectNET((NiObjectNET *)&v11->vfptr);
    v12->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
    v12->m_uFlags = 0;
    v12->m_pkParent = 0;
    LODWORD(v12->m_kWorldBound.m_kCenter.x) = 1;
  }
  else
  {
    v12 = 0;
  }
  LODWORD(v12->m_kWorldBound.m_kCenter.x) = 0;
  v12->m_pkParent = (NiNode *)1;
  v24.m_pObject = (NiRoom *)v3->m_spBlindScreen.m_pObject;
  element.m_pObject = v12;
  InterlockedIncrement((volatile LONG *)&v12->m_uiRefCount);
  v26 = 3;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&v24.m_pObject->m_kPropertyList,
    &element);
  v26 = -1;
  if ( !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) )
    v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
  v13 = (NiRoom *)operator new(0x20u);
  v14 = v13;
  v24.m_pObject = v13;
  v26 = 4;
  if ( v13 )
  {
    NiObjectNET::NiObjectNET((NiObjectNET *)&v13->vfptr);
    v14->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
    v14->m_uFlags = 236;
    *((_BYTE *)&v14->m_uFlags + 2) = 0;
  }
  else
  {
    v14 = 0;
  }
  v14->m_uFlags = v14->m_uFlags & 0xFECF | 0xCF;
  element.m_pObject = (NiRoom *)v3->m_spBlindScreen.m_pObject;
  v24.m_pObject = v14;
  InterlockedIncrement((volatile LONG *)&v14->m_uiRefCount);
  v26 = 5;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&element.m_pObject->m_kPropertyList,
    &v24);
  v26 = -1;
  if ( !InterlockedDecrement((volatile LONG *)&v14->m_uiRefCount) )
    v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
  if ( !Folder::m_bInit )
    Folder::Init();
  v15 = Folder::Merge(&Folder::m_acEffect, "BlindEffect.dds");
  ProgressBarName._Myres = 15;
  ProgressBarName._Mysize = 0;
  ProgressBarName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&ProgressBarName, v15, strlen(v15));
  v26 = 6;
  v16 = (NiRoom *)operator new(0x44u);
  v24.m_pObject = v16;
  LOBYTE(v26) = 7;
  if ( v16 )
  {
    v17 = ProgressBarName._Bx._Ptr;
    if ( ProgressBarName._Myres < 0x10 )
      v17 = (const char *)&ProgressBarName;
    NiTexturingProperty::NiTexturingProperty((NiTexturingProperty *)v16, v17);
    v19 = v18;
  }
  else
  {
    v19 = 0;
  }
  LOBYTE(v26) = 6;
  NiTexturingProperty::SetBaseClampMode((NiTexturingProperty *)v19, 0);
  NiTexturingProperty::SetBaseFilterMode((NiTexturingProperty *)v19, 0);
  *(_DWORD *)(v19 + 28) = 2;
  element.m_pObject = (NiRoom *)v3->m_spBlindScreen.m_pObject;
  v24.m_pObject = (NiRoom *)v19;
  InterlockedIncrement((volatile LONG *)(v19 + 4));
  LOBYTE(v26) = 8;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)&element.m_pObject->m_kPropertyList,
    &v24);
  LOBYTE(v26) = 6;
  if ( !InterlockedDecrement((volatile LONG *)(v19 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v19)(v19, 1);
  NiAVObject::UpdateProperties((NiAVObject *)&v3->m_spBlindScreen.m_pObject->vfptr);
  NiAVObject::Update((NiAVObject *)&v3->m_spBlindScreen.m_pObject->vfptr, 0.0, 1);
  v20 = ProgressBarName._Myres < 0x10;
  v3->m_IsRunBlindEffect = 1;
  if ( !v20 )
    operator delete(ProgressBarName._Bx._Ptr);
  return 1;
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0069B1F0) --------------------------------------------------------
CBlindEffect *__thiscall CBlindEffect::`vector deleting destructor'(CBlindEffect *this, unsigned int a2)
{
  CBlindEffect *v2; // esi@1

  v2 = this;
  CBlindEffect::~CBlindEffect(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0069B220) --------------------------------------------------------
void __thiscall CameraEffect::SetColor(CameraEffect *this, char ucR, char ucG, char ucB)
{
  this->m_Color.r = (double)(unsigned __int8)ucR / 255.0;
  this->m_Color.g = (double)(unsigned __int8)ucG / 255.0;
  this->m_Color.b = (double)(unsigned __int8)ucB / 255.0;
}

//----- (0069B260) --------------------------------------------------------
void __stdcall CameraEffect::SetAngleBoundary(float fAngle, float *pkVar, float fBoundary)
{
  double v4; // st7@2
  double v5; // st6@2
  double v6; // st5@2
  double v7; // st5@5
  double v8; // rt1@5
  double v9; // rt2@6
  double v10; // st5@6
  double v11; // st6@6
  double v12; // rtt@7
  double v13; // st5@7
  double v14; // st7@7
  double v15; // rt0@8
  double v16; // st5@8
  float fAnglea; // [sp+8h] [bp+8h]@5

  if ( pkVar )
  {
    v4 = fAngle;
    v5 = 0.0;
    v6 = fBoundary;
    if ( fAngle >= 0.0 && v6 >= v4 )
    {
      *pkVar = fAngle;
      return;
    }
    while ( 1 )
    {
      v9 = v6;
      v10 = v5;
      v11 = v9;
      if ( v10 <= v4 )
      {
        v15 = v10;
        v16 = v4;
        v14 = v15;
        if ( v16 <= v11 )
        {
          *pkVar = v16;
          return;
        }
        v13 = v16 - v11;
      }
      else
      {
        v12 = v10;
        v13 = v4 + v11;
        v14 = v12;
      }
      fAnglea = v13;
      v7 = v14;
      v4 = fAnglea;
      v8 = v7;
      v6 = v11;
      v5 = v8;
    }
  }
}

//----- (0069B2D0) --------------------------------------------------------
void __thiscall CameraEffect::SetColor(CameraEffect *this, float fR, float fG, float fB)
{
  this->m_Color.r = fR;
  this->m_Color.g = fG;
  this->m_Color.b = fB;
  this->m_Color.a = 0.0;
}

//----- (0069B310) --------------------------------------------------------
void __thiscall CameraEffect::SetAngle(CameraEffect *this, float fAngleLR, float fAngleUD)
{
  int v3; // edx@1

  CameraEffect::SetAngleBoundary(fAngleLR, &this->m_fAngleLR, 360.0);
  CameraEffect::SetAngleBoundary(fAngleUD, (float *)(v3 + 60), 90.0);
}

//----- (0069B350) --------------------------------------------------------
void __thiscall CameraEffect::Stop(CameraEffect *this)
{
  CameraEffect *v1; // esi@1
  NiScreenElements *v2; // edi@1
  int v3; // edi@6
  int v4; // ecx@6
  float v5; // ecx@6
  NiTListItem<unsigned int> **v6; // esi@6
  NiTListItem<unsigned int> **v7; // ST00_4@7

  v1 = this;
  v2 = this->m_spFadeScreen.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spFadeScreen.m_pObject = 0;
  }
  v1->m_bLoop = 0;
  v1->m_fStartTime = 0.0;
  v1->m_eScheduleType = 0;
  v1->m_fFadeTime = 0.0;
  v3 = (int)&v1->m_kListSchedule;
  v1->m_Color.r = NiColorA::BLACK.r;
  LODWORD(v1->m_Color.g) = dword_A7D12C;
  LODWORD(v1->m_Color.b) = dword_A7D130;
  v4 = dword_A7D134;
  v1->m_fAlphaRange = 1.0;
  LODWORD(v1->m_Color.a) = v4;
  v1->m_bLoop = 0;
  v1->m_MovePos.x = NiPoint3::ZERO.x;
  v1->m_MovePos.y = NiPoint3::ZERO.y;
  v5 = NiPoint3::ZERO.z;
  v1->m_fAngleLR = -1.0;
  v1->m_fAngleUD = -1.0;
  v1->m_MovePos.z = v5;
  v6 = &v1->m_kListSchedule.m_pkHead->m_pkNext;
  while ( v6 )
  {
    v7 = v6;
    v6 = (NiTListItem<unsigned int> **)*v6;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v3 + 8))(v3, v7);
  }
  *(_DWORD *)(v3 + 12) = 0;
  *(_DWORD *)(v3 + 4) = 0;
  *(_DWORD *)(v3 + 8) = 0;
}
// A7D128: using guessed type const struct NiColorA NiColorA::BLACK;
// A7D12C: using guessed type int dword_A7D12C;
// A7D130: using guessed type int dword_A7D130;
// A7D134: using guessed type int dword_A7D134;

//----- (0069B410) --------------------------------------------------------
void __thiscall CameraEffect::Draw(CameraEffect *this, NiRenderer *pRender)
{
  CameraEffect *v2; // edi@1
  NiScreenElements *v3; // ecx@6

  v2 = this;
  if ( pRender )
  {
    if ( (pRender->m_eFrameState == 1 || pRender->m_eOffScreenFrameState == 1)
      && pRender->m_bRenderTargetGroupActive == 1 )
    {
      pRender->vfptr[71].__vecDelDtor((NiRefObject *)pRender, 0);
    }
    v3 = v2->m_spFadeScreen.m_pObject;
    if ( v3 )
      NiScreenElements::Draw(v3, pRender);
  }
}

//----- (0069B460) --------------------------------------------------------
void __thiscall CameraEffect::UpdateSchedule(CameraEffect *this, float fCurTime, float fAlphaRatio, unsigned int uiSchedule)
{
  double v4; // st7@5
  float *v5; // edx@6
  float *v6; // eax@8
  double v7; // st7@10
  float *v8; // edx@11
  float *v9; // eax@13
  NiScreenElements *v10; // eax@17
  CameraEffect *v11; // [sp+0h] [bp-4h]@1

  v11 = this;
  if ( fAlphaRatio >= 1.0 )
  {
    this->m_eScheduleType = 0;
    return;
  }
  if ( uiSchedule == 2 )
  {
    v8 = (float *)&uiSchedule;
    *(float *)&uiSchedule = 0.0;
    *(float *)&v11 = 1.0;
    if ( fAlphaRatio >= 0.0 )
      v8 = &fAlphaRatio;
    v9 = v8;
    if ( *v8 >= 1.0 )
      v9 = (float *)&v11;
    v7 = 1.0 - *v9;
  }
  else
  {
    if ( uiSchedule != 3 )
    {
      v4 = 0.0;
      goto LABEL_17;
    }
    v5 = (float *)&uiSchedule;
    *(float *)&uiSchedule = 0.0;
    *(float *)&v11 = 1.0;
    if ( fAlphaRatio >= 0.0 )
      v5 = &fAlphaRatio;
    v6 = v5;
    if ( *v5 >= 1.0 )
      v6 = (float *)&v11;
    v7 = *v6 + 0.0;
  }
  v4 = v7 * this->m_fAlphaRange;
LABEL_17:
  v10 = this->m_spFadeScreen.m_pObject;
  this->m_Color.a = v4;
  if ( v10 )
    NiScreenElementsData::SetColors((NiScreenElementsData *)v10->m_spModelData.m_pObject, 0, &this->m_Color);
}

//----- (0069B520) --------------------------------------------------------
void __thiscall CameraEffect::SetSchedule(CameraEffect *this, unsigned int uiState, unsigned int uiCount)
{
  CameraEffect *v3; // ebx@1
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *v4; // esi@1
  NiTListItem<unsigned int> *v5; // edi@1
  NiTListItem<unsigned int> *v6; // ST00_4@2
  unsigned int v7; // edi@3
  unsigned int v8; // eax@3
  int v9; // eax@13
  _DWORD *v10; // ecx@13
  int v11; // eax@16
  _DWORD *v12; // ecx@16
  bool v13; // zf@19
  int v14; // eax@20
  _DWORD *v15; // ecx@20

  v3 = this;
  v4 = (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&this->m_kListSchedule;
  this->m_bLoop = 0;
  v5 = this->m_kListSchedule.m_pkHead;
  while ( v5 )
  {
    v6 = v5;
    v5 = v5->m_pkNext;
    v4->vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)v4,
      (NiTListItem<NiD3DXEffectParameter *> *)v6);
  }
  v7 = uiState;
  v8 = uiState - 1;
  v4->m_kAllocator.m_uiCount = 0;
  v4->m_pkHead = 0;
  v4->m_pkTail = 0;
  v3->m_eScheduleType = 0;
  switch ( v8 )
  {
    case 0u:
      uiState = 3;
      NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
        v4,
        (NiD3DXEffectParameter *const *)&uiState);
      break;
    case 1u:
      uiState = 2;
      NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
        v4,
        (NiD3DXEffectParameter *const *)&uiState);
      uiState = 6;
      NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
        v4,
        (NiD3DXEffectParameter *const *)&uiState);
      break;
    case 2u:
    case 3u:
      uiState = 3;
      NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
        v4,
        (NiD3DXEffectParameter *const *)&uiState);
      if ( v7 == 3 )
      {
        uiState = 4;
        NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
          v4,
          (NiD3DXEffectParameter *const *)&uiState);
      }
      else if ( v7 == 4 )
      {
        uiState = 5;
        NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
          v4,
          (NiD3DXEffectParameter *const *)&uiState);
      }
      uiState = 2;
      NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
        v4,
        (NiD3DXEffectParameter *const *)&uiState);
      uiState = 6;
      NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
        v4,
        (NiD3DXEffectParameter *const *)&uiState);
      break;
    case 4u:
      if ( uiCount > 0 )
      {
        uiState = uiCount;
        do
        {
          v9 = (int)v4->vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)v4);
          *(_DWORD *)(v9 + 8) = 3;
          *(_DWORD *)v9 = 0;
          *(_DWORD *)(v9 + 4) = v4->m_pkTail;
          v10 = &v4->m_pkTail->m_pkNext;
          if ( v10 )
            *v10 = v9;
          else
            v4->m_pkHead = (NiTListItem<NiD3DXEffectParameter *> *)v9;
          ++v4->m_kAllocator.m_uiCount;
          v4->m_pkTail = (NiTListItem<NiD3DXEffectParameter *> *)v9;
          v11 = (int)v4->vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)v4);
          *(_DWORD *)(v11 + 8) = 2;
          *(_DWORD *)v11 = 0;
          *(_DWORD *)(v11 + 4) = v4->m_pkTail;
          v12 = &v4->m_pkTail->m_pkNext;
          if ( v12 )
            *v12 = v11;
          else
            v4->m_pkHead = (NiTListItem<NiD3DXEffectParameter *> *)v11;
          ++v4->m_kAllocator.m_uiCount;
          v13 = uiState-- == 1;
          v4->m_pkTail = (NiTListItem<NiD3DXEffectParameter *> *)v11;
        }
        while ( !v13 );
      }
      v14 = (int)v4->vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)v4);
      *(_DWORD *)(v14 + 8) = 6;
      *(_DWORD *)v14 = 0;
      *(_DWORD *)(v14 + 4) = v4->m_pkTail;
      v15 = &v4->m_pkTail->m_pkNext;
      if ( v15 )
      {
        *v15 = v14;
        ++v4->m_kAllocator.m_uiCount;
        v4->m_pkTail = (NiTListItem<NiD3DXEffectParameter *> *)v14;
      }
      else
      {
        ++v4->m_kAllocator.m_uiCount;
        v4->m_pkHead = (NiTListItem<NiD3DXEffectParameter *> *)v14;
        v4->m_pkTail = (NiTListItem<NiD3DXEffectParameter *> *)v14;
      }
      break;
    case 5u:
      uiState = 3;
      NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
        v4,
        (NiD3DXEffectParameter *const *)&uiState);
      uiState = 2;
      NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
        v4,
        (NiD3DXEffectParameter *const *)&uiState);
      v3->m_bLoop = 1;
      break;
    default:
      return;
  }
}

//----- (0069B720) --------------------------------------------------------
void __thiscall CameraEffect::~CameraEffect(CameraEffect *this)
{
  CameraEffect *v1; // ebx@1
  int v2; // esi@1
  NiTListItem<unsigned int> **v3; // edi@1
  NiTListItem<unsigned int> **v4; // ST00_4@2
  NiScreenElements *v5; // esi@3

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&CameraEffect::`vftable';
  CameraEffect::Stop(this);
  v2 = (int)&v1->m_kListSchedule;
  v1->m_kListSchedule.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>Vtbl *)&PgTList<unsigned int>::`vftable';
  v3 = &v1->m_kListSchedule.m_pkHead->m_pkNext;
  while ( v3 )
  {
    v4 = v3;
    v3 = (NiTListItem<unsigned int> **)*v3;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v2 + 8))(&v1->m_kListSchedule, v4);
  }
  v1->m_kListSchedule.m_kAllocator.m_uiCount = 0;
  v1->m_kListSchedule.m_pkHead = 0;
  v1->m_kListSchedule.m_pkTail = 0;
  *(_DWORD *)v2 = &NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>::`vftable';
  v5 = v1->m_spFadeScreen.m_pObject;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  v1->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 981C6C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>::`vftable')(void *p, char);
// 981CDC: using guessed type int (__thiscall *PgTList<unsigned int>::`vftable')(void *p, char);
// 9BD73C: using guessed type int (__thiscall *CameraEffect::`vftable')(void *p, char);

//----- (0069B7F0) --------------------------------------------------------
void __thiscall CameraEffect::ClearMove(CameraEffect *this)
{
  _BYTE v1[12]; // ST00_12@1

  CameraEffect::Stop(this);
  *(float *)v1 = NiPoint3::ZERO.x;
  *(_QWORD *)&v1[4] = *(_QWORD *)&NiPoint3::ZERO.y;
  World::SetCameraJumpData(&g_kWorld, *(NiPoint3 *)v1, -1.0, -1.0, 0.0);
}

//----- (0069B840) --------------------------------------------------------
void __thiscall CameraEffect::Update(CameraEffect *this, float fCurTime)
{
  double v2; // st7@1
  CameraEffect *v3; // esi@1
  NiTListItem<unsigned int> *v4; // eax@3
  bool v5; // zf@4
  float v6; // ST0C_4@7
  float v7; // ST0C_4@8
  _BYTE v8[12]; // ST00_12@9
  _BYTE v9[12]; // ST00_12@10
  float AlphaRatio; // [sp+20h] [bp+8h]@6

  v2 = fCurTime;
  v3 = this;
  if ( this->m_kListSchedule.m_kAllocator.m_uiCount && !this->m_eScheduleType )
  {
    v4 = this->m_kListSchedule.m_pkHead;
    if ( !v4 )
      return;
    this->m_eScheduleType = v4->m_element;
    NiTPointerListBase<DFALL<AttackSequence *>,AttackSequence *>::Remove(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *> *)&this->m_kListSchedule,
      (NiLight *const *)&this->m_eScheduleType);
    v2 = fCurTime;
    v5 = v3->m_bLoop == 0;
    v3->m_fStartTime = fCurTime;
    if ( !v5 )
    {
      NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v3->m_kListSchedule,
        (NiD3DXEffectParameter *const *)&v3->m_eScheduleType);
      v2 = fCurTime;
    }
  }
  AlphaRatio = (v2 - v3->m_fStartTime) / v3->m_fFadeTime;
  switch ( v3->m_eScheduleType )
  {
    case 2u:
      v6 = v2;
      CameraEffect::UpdateSchedule(v3, v6, AlphaRatio, 2u);
      break;
    case 3u:
      v7 = v2;
      CameraEffect::UpdateSchedule(v3, v7, AlphaRatio, 3u);
      break;
    case 4u:
    case 5u:
      *(float *)v8 = v3->m_MovePos.x;
      *(_QWORD *)&v8[4] = *(_QWORD *)&v3->m_MovePos.y;
      World::SetCameraJumpData(&g_kWorld, *(NiPoint3 *)v8, v3->m_fAngleLR, v3->m_fAngleUD, v3->m_fDist);
      if ( v3->m_eScheduleType == 5 )
      {
        CharMgr::RemoveFarCharWithoutMainChar(&g_kCharMgr);
        *(float *)v9 = NiPoint3::ZERO.x;
        *(_QWORD *)&v9[4] = *(_QWORD *)&NiPoint3::ZERO.y;
        World::SetCameraJumpData(&g_kWorld, *(NiPoint3 *)v9, -1.0, -1.0, 0.0);
      }
      v3->m_eScheduleType = 0;
      break;
    case 6u:
      CameraEffect::Stop(v3);
      break;
    default:
      return;
  }
}

//----- (0069B9B0) --------------------------------------------------------
char __thiscall CameraEffect::Start(CameraEffect *this, float fStartTime, float fFadeTime, unsigned int uiState, unsigned int uiCount)
{
  CameraEffect *v5; // edi@1
  NiScreenElements *v6; // ebx@1
  NiScreenElements *v7; // esi@2
  NiScreenElementsData *v8; // eax@3
  NiScreenElementsData *v9; // eax@4
  NiScreenElements *v10; // eax@6
  NiScreenElements *v11; // esi@7
  NiScreenElements *v12; // eax@14
  NiObjectNET *v14; // eax@16
  NiObjectNET *v15; // esi@16
  NiObjectNET *v16; // eax@20
  NiObjectNET *v17; // esi@20

  v5 = this;
  this->m_fStartTime = fStartTime;
  this->m_fFadeTime = fFadeTime;
  CameraEffect::SetSchedule(this, uiState, uiCount);
  v6 = 0;
  if ( !v5->m_spFadeScreen.m_pObject )
  {
    v7 = (NiScreenElements *)operator new(0xC4u);
    if ( v7 )
    {
      v8 = (NiScreenElementsData *)operator new(0x70u);
      if ( v8 )
        NiScreenElementsData::NiScreenElementsData(v8, 0, 1, 0, 1, 1, 4, 1, 2, 1);
      else
        v9 = 0;
      NiScreenElements::NiScreenElements(v7, v9);
      v6 = v10;
    }
    v11 = v5->m_spFadeScreen.m_pObject;
    if ( v11 != v6 )
    {
      if ( v11 && !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
        v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
      v5->m_spFadeScreen.m_pObject = v6;
      if ( v6 )
        InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
    }
    v12 = v5->m_spFadeScreen.m_pObject;
    if ( !v12 )
      return 0;
    NiScreenElementsData::Insert((NiScreenElementsData *)v12->m_spModelData.m_pObject, 4u, 0, 0);
    NiScreenElementsData::SetRectangle(
      (NiScreenElementsData *)v5->m_spFadeScreen.m_pObject->m_spModelData.m_pObject,
      0,
      0.0,
      0.0,
      1.0,
      1.0);
    NiScreenElementsData::UpdateBound((NiScreenElementsData *)v5->m_spFadeScreen.m_pObject->m_spModelData.m_pObject);
    v14 = (NiObjectNET *)operator new(0x28u);
    v15 = v14;
    if ( v14 )
    {
      NiObjectNET::NiObjectNET(v14);
      v15->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
      LOWORD(v15[1].vfptr) = 0;
      v15[1].m_uiRefCount = 0;
      v15[1].m_pcName = (char *)1;
    }
    else
    {
      v15 = 0;
    }
    if ( !v15 )
      return 0;
    v15[1].m_uiRefCount = 1;
    v15[1].m_pcName = 0;
    NiAVObject::AttachProperty((NiAVObject *)&v5->m_spFadeScreen.m_pObject->vfptr, (NiProperty *)v15);
    v16 = (NiObjectNET *)operator new(0x20u);
    v17 = v16;
    if ( v16 )
    {
      NiObjectNET::NiObjectNET(v16);
      v17->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
      LOWORD(v17[1].vfptr) = 236;
      BYTE2(v17[1].vfptr) = 0;
    }
    else
    {
      v17 = 0;
    }
    if ( !v17 )
      return 0;
    LOWORD(v17[1].vfptr) = (unsigned int)v17[1].vfptr & 0xFEED | 0xED;
    NiAVObject::AttachProperty((NiAVObject *)&v5->m_spFadeScreen.m_pObject->vfptr, (NiProperty *)v17);
    NiAVObject::UpdateProperties((NiAVObject *)&v5->m_spFadeScreen.m_pObject->vfptr);
  }
  return 1;
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);

//----- (0069BBE0) --------------------------------------------------------
void __thiscall CameraEffect::CameraEffect(CameraEffect *this)
{
  CameraEffect *v1; // esi@1
  int v2; // eax@1
  float v3; // eax@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v1->vfptr = (NiRefObjectVtbl *)&CameraEffect::`vftable';
  v1->m_spFadeScreen.m_pObject = 0;
  v1->m_fStartTime = 0.0;
  v1->m_fFadeTime = 0.0;
  v1->m_Color.r = NiColorA::BLACK.r;
  LODWORD(v1->m_Color.g) = dword_A7D12C;
  LODWORD(v1->m_Color.b) = dword_A7D130;
  v2 = dword_A7D134;
  v1->m_fAlphaRange = 1.0;
  LODWORD(v1->m_Color.a) = v2;
  v1->m_bLoop = 0;
  v1->m_MovePos.x = NiPoint3::ZERO.x;
  v1->m_MovePos.y = NiPoint3::ZERO.y;
  v3 = NiPoint3::ZERO.z;
  v1->m_fAngleLR = -1.0;
  v1->m_fAngleUD = -1.0;
  v1->m_MovePos.z = v3;
  v1->m_eScheduleType = 0;
  v1->m_pkCameraCtrl = 0;
  v1->m_fDist = 0.0;
  v1->m_kListSchedule.m_kAllocator.m_uiCount = 0;
  v1->m_kListSchedule.m_pkHead = 0;
  v1->m_kListSchedule.m_pkTail = 0;
  v1->m_kListSchedule.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>Vtbl *)&PgTList<unsigned int>::`vftable';
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 981CDC: using guessed type int (__thiscall *PgTList<unsigned int>::`vftable')(void *p, char);
// 9BD73C: using guessed type int (__thiscall *CameraEffect::`vftable')(void *p, char);
// A7D128: using guessed type const struct NiColorA NiColorA::BLACK;
// A7D12C: using guessed type int dword_A7D12C;
// A7D130: using guessed type int dword_A7D130;
// A7D134: using guessed type int dword_A7D134;

//----- (0069BC80) --------------------------------------------------------
AttackSequence *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,unsigned int>::RemoveHead(NiTPointerListBase<DFALL<AttackSequence *>,AttackSequence *> *this)
{
  NiTPointerListBase<DFALL<AttackSequence *>,AttackSequence *> *v1; // esi@1
  NiTListItem<AttackSequence *> *v2; // ecx@1
  NiTListItem<AttackSequence *> *v3; // eax@1
  AttackSequence *v4; // edi@4

  v1 = this;
  v2 = this->m_pkHead;
  v3 = v2->m_pkNext;
  v1->m_pkHead = v2->m_pkNext;
  if ( v3 )
    v3->m_pkPrev = 0;
  else
    v1->m_pkTail = 0;
  v4 = v2->m_element;
  v1->vfptr->DeleteItem((NiTListBase<DFALL<AttackSequence *>,AttackSequence *> *)v1, v2);
  --v1->m_kAllocator.m_uiCount;
  return v4;
}

//----- (0069BCB0) --------------------------------------------------------
CameraEffect *__thiscall CameraEffect::`scalar deleting destructor'(CameraEffect *this, unsigned int a2)
{
  CameraEffect *v2; // esi@1

  v2 = this;
  CameraEffect::~CameraEffect(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0069BCE0) --------------------------------------------------------
unsigned __int16 __thiscall ClientEffect::GetTargetChar(ClientEffect *this)
{
  return this->m_kTargetCharHandle;
}

//----- (0069BCF0) --------------------------------------------------------
void __thiscall ClientEffect::SetTargetChar(ClientEffect *this, unsigned __int16 kHandle)
{
  ClientEffect *v2; // esi@1
  Char *v3; // eax@1
  NiRefObjectVtbl *v4; // edi@2
  int v5; // eax@2

  v2 = this;
  v3 = CharMgr::GetChar(&g_kCharMgr, this->m_kTargetCharHandle);
  if ( v3 )
  {
    v4 = v2->vfptr;
    v5 = ((int (__thiscall *)(_DWORD))v3->vfptr[6].Deaffect)(v3);
    v4[7].__vecDelDtor((NiRefObject *)v2, v5);
    v2->m_kTargetCharHandle = kHandle;
  }
  else
  {
    v2->m_kTargetCharHandle = kHandle;
  }
}

//----- (0069BD50) --------------------------------------------------------
void __thiscall ClientEffect::SetTargetPos(ClientEffect *this, NiPoint3 kPos)
{
  ClientEffect *v2; // esi@1
  float v3; // ecx@1
  float v4; // edx@1

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->vfptr[7].__vecDelDtor)(&kPos);
  v3 = kPos.y;
  v4 = kPos.z;
  v2->m_kTargetPos.x = kPos.x;
  v2->m_kTargetPos.y = v3;
  v2->m_kTargetPos.z = v4;
}

//----- (0069BD90) --------------------------------------------------------
void __thiscall ClientEffect::SetOffsetPos(ClientEffect *this, NiPoint3 kPos)
{
  this->m_kOffSet = kPos;
}

//----- (0069BDC0) --------------------------------------------------------
void __thiscall ClientEffect::~ClientEffect(ClientEffect *this)
{
  ClientEffect *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ClientEffect::`vftable'{for `NiRefObject'};
  this->vfptr = (IEffectDestroyMessengerVtbl *)&ClientEffect::`vftable'{for `IEffectDestroyMessenger'};
  EffectMgr::RemoveClientEff(&g_kEffectMgr, (Effect *)&this->vfptr);
  Effect::~Effect((Effect *)&v1->vfptr);
}
// 9BD744: using guessed type int (__stdcall *ClientEffect::`vftable'{for `IEffectDestroyMessenger'})(int);
// 9BD75C: using guessed type int (__thiscall *ClientEffect::`vftable'{for `NiRefObject'})(void *p, char);

//----- (0069BE30) --------------------------------------------------------
void __thiscall ClientEffect::Stop(ClientEffect *this)
{
  this->m_bStopFlag = 1;
}

//----- (0069BE40) --------------------------------------------------------
bool __thiscall ClientEffect::LengthOfView(ClientEffect *this)
{
  ClientEffect *v1; // esi@1
  int v2; // eax@1
  float pos3Target; // ST10_4@1
  float pos3Target_4; // ST14_4@1
  float pos3Target_8; // ST18_4@1
  NiPoint3 *v6; // eax@1
  float v7; // ST04_4@1
  float v8; // ST08_4@1
  float v9; // ST0C_4@1
  float fLengthServer; // ST2C_4@1
  float v11; // ST2C_4@1
  Char *v12; // esi@1
  Char *v13; // ecx@2
  double v14; // st7@4
  float v15; // ST2C_4@7
  float fLengthToMainChar; // [sp+28h] [bp-8h]@1

  v1 = this;
  v2 = ((int (*)(void))this->vfptr[8].__vecDelDtor)();
  pos3Target = *(float *)v2;
  pos3Target_4 = *(float *)(v2 + 4);
  pos3Target_8 = *(float *)(v2 + 8);
  v6 = World::GetCameraLookAtPos(&g_kWorld);
  v7 = v6->x - pos3Target;
  v8 = v6->y - pos3Target_4;
  v9 = v6->z - pos3Target_8;
  fLengthServer = v8 * v8 + v7 * v7 + v9 * v9;
  v11 = sqrt(fLengthServer);
  v12 = v1->m_pkCaster;
  fLengthToMainChar = v11;
  if ( v12 )
  {
    v13 = v12;
  }
  else
  {
    v13 = g_pkMainChar;
    v12 = g_pkMainChar;
  }
  if ( Char::IsNPC(v13) )
    v14 = v12->m_fMaxViewLength + 500.0;
  else
    v14 = v12->m_fMaxViewLength;
  v15 = v14;
  return fLengthToMainChar <= (double)v15;
}

//----- (0069BF20) --------------------------------------------------------
void __thiscall ClientEffect::ClientEffect(ClientEffect *this, NiNode *pkNode, bool bCreateProgramEff, Char *pkCaster)
{
  ClientEffect *v4; // esi@1

  v4 = this;
  Effect::Effect((Effect *)&this->vfptr, pkNode, bCreateProgramEff, pkCaster);
  v4->vfptr = (NiRefObjectVtbl *)&ClientEffect::`vftable'{for `NiRefObject'};
  v4->vfptr = (IEffectDestroyMessengerVtbl *)&ClientEffect::`vftable'{for `IEffectDestroyMessenger'};
  v4->m_kTargetCharHandle = -1;
  v4->m_kTargetPos.x = 0.0;
  v4->m_kTargetPos.y = 0.0;
  v4->m_kTargetPos.z = 0.0;
  v4->m_kOffSet.x = 0.0;
  v4->m_kOffSet.y = 0.0;
  v4->m_kOffSet.z = 0.0;
}
// 9BD744: using guessed type int (__stdcall *ClientEffect::`vftable'{for `IEffectDestroyMessenger'})(int);
// 9BD75C: using guessed type int (__thiscall *ClientEffect::`vftable'{for `NiRefObject'})(void *p, char);

//----- (0069BF80) --------------------------------------------------------
void __userpurge ClientEffect::Update(ClientEffect *this@<ecx>, int a2@<ebx>, int a3@<edi>, int a4@<esi>, float fTime)
{
  int v5; // ST08_4@1
  int v6; // ST04_4@1
  ClientEffect *v7; // esi@1
  NiRefObjectVtbl *v8; // edi@1
  bool v9; // al@1
  Char *v10; // eax@1
  double v11; // st7@2
  void *(__thiscall *v12)(NiRefObject *, unsigned int); // edx@2
  NiPoint3 kPos; // [sp+Ch] [bp-Ch]@1

  v5 = a4;
  v6 = a3;
  v7 = this;
  Effect::Update((Effect *)&this->vfptr, fTime);
  v8 = v7->vfptr;
  v9 = ClientEffect::LengthOfView(v7);
  ((void (__thiscall *)(ClientEffect *, _DWORD, int, int, _DWORD))v8[21].__vecDelDtor)(v7, v9, v6, v5, LODWORD(kPos.x));
  v10 = CharMgr::GetChar(&g_kCharMgr, v7->m_kTargetCharHandle);
  if ( v10 )
  {
    Char::GetHeightPos(v10, a2, &kPos);
    v11 = v7->m_kOffSet.x;
    v12 = v7->vfptr[7].__vecDelDtor;
    LODWORD(kPos.x) = &kPos;
    kPos.y = v7->m_kOffSet.y + kPos.y;
    kPos.z = v7->m_kOffSet.z + kPos.z;
    v12((NiRefObject *)&v7->vfptr, (unsigned int)&kPos);
  }
}
// 69BF80: could not find valid save-restore pair for edi
// 69BF80: could not find valid save-restore pair for esi

//----- (0069C010) --------------------------------------------------------
ClientEffect *__thiscall ClientEffect::`vector deleting destructor'(char *this, unsigned int a2)
{
  return ClientEffect::`vector deleting destructor'((ClientEffect *)(this - 8), a2);
}

//----- (0069C020) --------------------------------------------------------
ClientEffect *__thiscall ClientEffect::`vector deleting destructor'(ClientEffect *this, unsigned int a2)
{
  ClientEffect *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ClientEffect::`vftable'{for `NiRefObject'};
  this->vfptr = (IEffectDestroyMessengerVtbl *)&ClientEffect::`vftable'{for `IEffectDestroyMessenger'};
  EffectMgr::RemoveClientEff(&g_kEffectMgr, (Effect *)&this->vfptr);
  Effect::~Effect((Effect *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BD744: using guessed type int (__stdcall *ClientEffect::`vftable'{for `IEffectDestroyMessenger'})(int);
// 9BD75C: using guessed type int (__thiscall *ClientEffect::`vftable'{for `NiRefObject'})(void *p, char);

//----- (0069C0A0) --------------------------------------------------------
void __thiscall LookAtEffect::~LookAtEffect(LookAtEffect *this)
{
  this->vfptr = (NiRefObjectVtbl *)&LookAtEffect::`vftable'{for `NiRefObject'};
  this->vfptr = (IEffectDestroyMessengerVtbl *)&LookAtEffect::`vftable'{for `IEffectDestroyMessenger'};
  ClientEffect::~ClientEffect((ClientEffect *)&this->vfptr);
}
// 9BD7C4: using guessed type int (__stdcall *LookAtEffect::`vftable'{for `IEffectDestroyMessenger'})(int);
// 9BD7DC: using guessed type int (__thiscall *LookAtEffect::`vftable'{for `NiRefObject'})(void *p, char);

//----- (0069C0C0) --------------------------------------------------------
void __thiscall LookAtEffect::LookAtEffect(LookAtEffect *this, NiNode *pkNode, bool bCreateProgramEff, Char *pkCaster)
{
  LookAtEffect *v4; // esi@1

  v4 = this;
  ClientEffect::ClientEffect((ClientEffect *)&this->vfptr, pkNode, bCreateProgramEff, pkCaster);
  v4->vfptr = (NiRefObjectVtbl *)&LookAtEffect::`vftable'{for `NiRefObject'};
  v4->vfptr = (IEffectDestroyMessengerVtbl *)&LookAtEffect::`vftable'{for `IEffectDestroyMessenger'};
}
// 9BD7C4: using guessed type int (__stdcall *LookAtEffect::`vftable'{for `IEffectDestroyMessenger'})(int);
// 9BD7DC: using guessed type int (__thiscall *LookAtEffect::`vftable'{for `NiRefObject'})(void *p, char);

//----- (0069C0F0) --------------------------------------------------------
void __thiscall LookAtEffect::CalcDir(LookAtEffect *this)
{
  LookAtEffect *v1; // esi@1
  int v2; // eax@1
  double v3; // st7@1
  NiPoint3 kEffDir; // [sp+4h] [bp-18h]@1
  float v5; // [sp+10h] [bp-Ch]@1
  float v6; // [sp+14h] [bp-8h]@1
  float v7; // [sp+18h] [bp-4h]@1

  v1 = this;
  v2 = ((int (*)(void))this->vfptr[8].__vecDelDtor)();
  v5 = v1->m_kLookAtPos.x - *(float *)v2;
  v6 = v1->m_kLookAtPos.y - *(float *)(v2 + 4);
  v3 = v1->m_kLookAtPos.z - *(float *)(v2 + 8);
  kEffDir.y = v6;
  v7 = v3;
  kEffDir.x = v5;
  kEffDir.z = v7;
  NiPoint3::Unitize(&kEffDir);
  v1->vfptr[10].__vecDelDtor((NiRefObject *)v1, (unsigned int)&kEffDir);
}

//----- (0069C160) --------------------------------------------------------
void __userpurge LookAtEffect::Update(LookAtEffect *this@<ecx>, int a2@<ebx>, int a3@<edi>, float fTime)
{
  LookAtEffect *v4; // esi@1

  v4 = this;
  LookAtEffect::CalcDir(this);
  ClientEffect::Update((ClientEffect *)&v4->vfptr, a2, a3, (int)v4, fTime);
}

//----- (0069C180) --------------------------------------------------------
void __thiscall LookAtEffect::Start(LookAtEffect *this, float fTime)
{
  LookAtEffect *v2; // esi@1

  v2 = this;
  LookAtEffect::CalcDir(this);
  Effect::Start((Effect *)&v2->vfptr, fTime);
}

//----- (0069C1A0) --------------------------------------------------------
LookAtEffect *__thiscall LookAtEffect::`vector deleting destructor'(char *this, unsigned int a2)
{
  return LookAtEffect::`scalar deleting destructor'((LookAtEffect *)(this - 8), a2);
}

//----- (0069C1B0) --------------------------------------------------------
LookAtEffect *__thiscall LookAtEffect::`scalar deleting destructor'(LookAtEffect *this, unsigned int a2)
{
  LookAtEffect *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&LookAtEffect::`vftable'{for `NiRefObject'};
  this->vfptr = (IEffectDestroyMessengerVtbl *)&LookAtEffect::`vftable'{for `IEffectDestroyMessenger'};
  ClientEffect::~ClientEffect((ClientEffect *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BD7C4: using guessed type int (__stdcall *LookAtEffect::`vftable'{for `IEffectDestroyMessenger'})(int);
// 9BD7DC: using guessed type int (__thiscall *LookAtEffect::`vftable'{for `NiRefObject'})(void *p, char);

//----- (0069C1E0) --------------------------------------------------------
double __cdecl SoundGroup::GetMasterGain()
{
  return SoundGroup::ms_fMasterGain;
}
// A75E70: using guessed type float SoundGroup::ms_fMasterGain;

//----- (0069C1F0) --------------------------------------------------------
void __thiscall SoundGroup::SetMaxRange(SoundGroup *this, float fMax)
{
  this->m_fSoundMaxRange = fMax;
}

//----- (0069C200) --------------------------------------------------------
void __thiscall SoundGroup::SetTableSize(SoundGroup *this, unsigned int dwTableSize)
{
  SoundGroup *v2; // esi@1
  char *v3; // eax@1

  v2 = this;
  v3 = (char *)operator new[](4 * dwTableSize);
  v2->m_ppcTable = (char **)v3;
  memset(v3, 0, 4 * dwTableSize);
  v2->m_dwTableSize = dwTableSize;
}

//----- (0069C250) --------------------------------------------------------
void __thiscall SoundGroup::SetTable(SoundGroup *this, unsigned int dwIndex, char *acFn)
{
  SoundGroup *v3; // edi@1
  char **v4; // eax@1
  char *v5; // edx@5
  char *v6; // ecx@5
  char v7; // al@6

  v3 = this;
  v4 = this->m_ppcTable;
  if ( v4 && dwIndex < this->m_dwTableSize )
  {
    if ( v4[dwIndex] )
    {
      operator delete[](v4[dwIndex]);
      v3->m_ppcTable[dwIndex] = 0;
    }
    v3->m_ppcTable[dwIndex] = (char *)operator new[](strlen(acFn) + 1);
    v5 = v3->m_ppcTable[dwIndex];
    v6 = acFn;
    do
    {
      v7 = *v6;
      *v5++ = *v6++;
    }
    while ( v7 );
  }
}

//----- (0069C2D0) --------------------------------------------------------
bool __thiscall SoundGroup::SetChannelCount(SoundGroup *this, SoundMgr *rkMgr, unsigned int dwChannelCount)
{
  SoundGroup *v3; // esi@1
  unsigned int v4; // eax@1

  v3 = this;
  SoundMgr::ReleaseChannel(rkMgr, this->m_dwOccupyingChannelCount);
  v4 = SoundMgr::AllocateChannel(rkMgr, dwChannelCount);
  v3->m_dwOccupyingChannelCount = v4;
  return v4 == dwChannelCount;
}

//----- (0069C310) --------------------------------------------------------
bool __thiscall SoundGroup::Initialize(SoundGroup *this, SoundMgr *rkMgr, unsigned int dwChannelCount)
{
  SoundGroup *v3; // esi@1
  NiAudioSystem *v4; // eax@1
  bool result; // al@2
  unsigned int v6; // eax@3

  v3 = this;
  v4 = NiAudioSystem::GetAudioSystem();
  v3->m_pkAudioSystem = (NiMilesAudioSystem *)v4;
  if ( v4 )
  {
    SoundMgr::ReleaseChannel(rkMgr, v3->m_dwOccupyingChannelCount);
    v6 = SoundMgr::AllocateChannel(rkMgr, dwChannelCount);
    v3->m_dwOccupyingChannelCount = v6;
    result = v6 == dwChannelCount;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0069C360) --------------------------------------------------------
char *__thiscall SoundGroup::GetFilenameFrom(SoundGroup *this, SoundIndex *rkIndex)
{
  char *result; // eax@1
  char **v3; // edx@2

  result = rkIndex->m_acFilename;
  if ( !result )
  {
    v3 = this->m_ppcTable;
    if ( v3 && rkIndex->m_dwIndex < this->m_dwTableSize )
      result = v3[rkIndex->m_dwIndex];
    else
      result = 0;
  }
  return result;
}

//----- (0069C390) --------------------------------------------------------
void __thiscall SoundGroup::Terminate(SoundGroup *this)
{
  SoundGroup *v1; // esi@1
  unsigned int v2; // edi@2

  v1 = this;
  if ( this->m_ppcTable )
  {
    v2 = 0;
    if ( this->m_dwTableSize )
    {
      do
        operator delete[](v1->m_ppcTable[v2++]);
      while ( v2 < v1->m_dwTableSize );
    }
  }
  operator delete[](v1->m_ppcTable);
  v1->m_ppcTable = 0;
  v1->m_dwTableSize = 0;
}

//----- (0069C3E0) --------------------------------------------------------
void __thiscall SoundGroup::SetEnable(SoundGroup *this, bool bEnable)
{
  this->m_bEnable = bEnable;
}

//----- (0069C3F0) --------------------------------------------------------
void __thiscall SoundGroup::GetSoundMinMax(SoundGroup *this, float *fMin, float *fMax)
{
  if ( fMin )
  {
    if ( fMax )
    {
      *fMin = this->m_fSoundMin;
      *fMax = SoundGroup::ms_fSoundMax;
    }
  }
}
// A75E68: using guessed type float SoundGroup::ms_fSoundMax;

//----- (0069C420) --------------------------------------------------------
NiTList<NiAudioSource *> *__thiscall SoundGroupDynamic::GetPlayingSourceList(SoundGroupDynamic *this)
{
  return &this->m_kPlayingSourceList;
}

//----- (0069C430) --------------------------------------------------------
void __thiscall SoundGroupDynamic::Terminate(SoundGroupDynamic *this)
{
  SoundGroupDynamic *v1; // esi@1

  v1 = this;
  SoundGroup::Terminate((SoundGroup *)&this->vfptr);
  v1->vfptr->UnloadAllSound((SoundGroup *)v1);
}

//----- (0069C450) --------------------------------------------------------
void __cdecl SoundGroup::SetMasterGain(float fVolume)
{
  NiTListItem<NiD3DShaderInterface *> *v1; // esi@1
  NiD3DShaderInterface *v2; // ecx@2

  v1 = SoundGroup::ms_kSoundGroupList.m_pkHead;
  SoundGroup::ms_fMasterGain = fVolume;
  if ( SoundGroup::ms_kSoundGroupList.m_pkHead )
  {
    do
    {
      v2 = v1->m_element;
      v1 = v1->m_pkNext;
      ((void (__stdcall *)(_DWORD))v2->vfptr[10].__vecDelDtor)(*(float *)&v2[1].m_uiRefCount);
    }
    while ( v1 );
  }
}
// A75E70: using guessed type float SoundGroup::ms_fMasterGain;

//----- (0069C490) --------------------------------------------------------
void __cdecl SoundGroup::StopAllSoundWholeGroup()
{
  NiTListItem<NiD3DShaderInterface *> *v0; // esi@1
  void (*v1)(void); // edx@2

  v0 = SoundGroup::ms_kSoundGroupList.m_pkHead;
  if ( SoundGroup::ms_kSoundGroupList.m_pkHead )
  {
    do
    {
      v1 = (void (*)(void))v0->m_element->vfptr[9].__vecDelDtor;
      v0 = v0->m_pkNext;
      v1();
    }
    while ( v0 );
  }
}

//----- (0069C4C0) --------------------------------------------------------
void __cdecl SoundGroup::UpdateWholeGroup(float fTime)
{
  NiTListItem<NiD3DShaderInterface *> *v1; // esi@1
  void *(__thiscall *v2)(NiRefObject *, unsigned int); // edx@2

  v1 = SoundGroup::ms_kSoundGroupList.m_pkHead;
  if ( SoundGroup::ms_kSoundGroupList.m_pkHead )
  {
    do
    {
      v2 = v1->m_element->vfptr[11].__vecDelDtor;
      v1 = v1->m_pkNext;
      ((void (__stdcall *)(_DWORD))v2)(LODWORD(fTime));
    }
    while ( v1 );
  }
}

//----- (0069C4F0) --------------------------------------------------------
void __cdecl SoundGroup::TerminateWholeGroup()
{
  NiTListItem<NiD3DShaderInterface *> *v0; // eax@2
  NiTListItem<NiD3DShaderInterface *> *v1; // ecx@2
  NiD3DShaderInterface *v2; // esi@5

  while ( SoundGroup::ms_kSoundGroupList.m_kAllocator.m_uiCount )
  {
    v0 = SoundGroup::ms_kSoundGroupList.m_pkHead;
    v1 = SoundGroup::ms_kSoundGroupList.m_pkHead->m_pkNext;
    SoundGroup::ms_kSoundGroupList.m_pkHead = v1;
    if ( v1 )
      v1->m_pkPrev = 0;
    else
      SoundGroup::ms_kSoundGroupList.m_pkTail = 0;
    v2 = v0->m_element;
    SoundGroup::ms_kSoundGroupList.vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&SoundGroup::ms_kSoundGroupList,
      v0);
    --SoundGroup::ms_kSoundGroupList.m_kAllocator.m_uiCount;
    if ( v2 )
      v2->vfptr[18].__vecDelDtor((NiRefObject *)v2, 1u);
  }
}

//----- (0069C550) --------------------------------------------------------
void __cdecl SoundGroup::SetEnableWholeGroup(int bEnable)
{
  NiTListItem<NiD3DShaderInterface *> *v1; // esi@1
  void *(__thiscall *v2)(NiRefObject *, unsigned int); // edx@2

  v1 = SoundGroup::ms_kSoundGroupList.m_pkHead;
  if ( SoundGroup::ms_kSoundGroupList.m_pkHead )
  {
    do
    {
      v2 = v1->m_element->vfptr[17].__vecDelDtor;
      v1 = v1->m_pkNext;
      ((void (__stdcall *)(_DWORD))v2)(bEnable);
    }
    while ( v1 );
  }
}

//----- (0069C580) --------------------------------------------------------
void __cdecl SoundGroup::UnloadAllSoundWholeGroup()
{
  NiTListItem<NiD3DShaderInterface *> *v0; // esi@1
  void (*v1)(void); // edx@2

  v0 = SoundGroup::ms_kSoundGroupList.m_pkHead;
  if ( SoundGroup::ms_kSoundGroupList.m_pkHead )
  {
    do
    {
      v1 = (void (*)(void))v0->m_element->vfptr[15].__vecDelDtor;
      v0 = v0->m_pkNext;
      v1();
    }
    while ( v0 );
  }
}

//----- (0069C5B0) --------------------------------------------------------
void __cdecl SoundGroup::DetachAllSoundWholeGroup()
{
  NiTListItem<NiD3DShaderInterface *> *v0; // esi@1
  void (*v1)(void); // edx@2

  v0 = SoundGroup::ms_kSoundGroupList.m_pkHead;
  if ( SoundGroup::ms_kSoundGroupList.m_pkHead )
  {
    do
    {
      v1 = (void (*)(void))v0->m_element->vfptr[16].__vecDelDtor;
      v0 = v0->m_pkNext;
      v1();
    }
    while ( v0 );
  }
}

//----- (0069C5E0) --------------------------------------------------------
BOOL __thiscall SoundGroup::IsChannelFull(SoundGroup *this)
{
  return this->m_kPlayingSourceList.m_kAllocator.m_uiCount >= this->m_dwOccupyingChannelCount;
}

//----- (0069C5F0) --------------------------------------------------------
bool __thiscall SoundGroup::IsOutofMaxRange(SoundGroup *this, NiPoint3 *rkPoint)
{
  double v2; // st7@1
  NiMilesAudioSystem *v3; // ecx@1
  float fSqrSoundMaxRange; // ST18_4@2
  NiMilesListener *v5; // eax@2
  float v6; // ST00_4@2
  float v7; // ST04_4@2
  float v8; // ST08_4@2
  bool result; // al@2
  NiPoint3 *rkPointa; // [sp+24h] [bp+8h]@2

  v2 = this->m_fSoundMaxRange;
  v3 = this->m_pkAudioSystem;
  if ( v3 )
  {
    v5 = NiMilesAudioSystem::GetListener(v3);
    v6 = v5->m_kWorld.m_Translate.x - rkPoint->x;
    v7 = v5->m_kWorld.m_Translate.y - rkPoint->y;
    v8 = v5->m_kWorld.m_Translate.z - rkPoint->z;
    *(float *)&rkPointa = v6 * v6 + v7 * v7 + v8 * v8;
    fSqrSoundMaxRange = v2 * v2;
    result = fSqrSoundMaxRange < (double)*(float *)&rkPointa;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0069C690) --------------------------------------------------------
bool __thiscall SoundGroup::IsOutofMaxRange(SoundGroup *this, NiAVObject *pkObj)
{
  bool result; // al@2

  if ( pkObj )
    result = SoundGroup::IsOutofMaxRange(this, &pkObj->m_kWorld.m_Translate);
  else
    result = 0;
  return result;
}

//----- (0069C6B0) --------------------------------------------------------
char __thiscall SoundGroup::LoadSound(SoundGroup *this, NiAudioSource *pkSource, char *pcFilename, int bStreamed)
{
  SoundGroup *v4; // ebx@1
  char result; // al@3
  float v6; // ST1C_4@4
  char acFileName[256]; // [sp+1Ch] [bp-104h]@3

  v4 = this;
  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acFileName, "%s%s", &Folder::m_acSound, pcFilename);
  pkSource->vfptr[34].__vecDelDtor((NiRefObject *)pkSource, (unsigned int)acFileName);
  pkSource->vfptr[32].__vecDelDtor((NiRefObject *)pkSource, bStreamed);
  result = ((int (__thiscall *)(NiAudioSource *))pkSource->vfptr[37].__vecDelDtor)(pkSource);
  if ( result )
  {
    v6 = v4->m_fGain * SoundGroup::ms_fMasterGain;
    pkSource->vfptr[47].__vecDelDtor((NiRefObject *)pkSource, LODWORD(v6));
    result = 1;
  }
  return result;
}
// A75E70: using guessed type float SoundGroup::ms_fMasterGain;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0069C780) --------------------------------------------------------
void __thiscall SoundGroup::SetGain(SoundGroup *this, float fVolume)
{
  NiTListItem<NiAudioSource *> *v2; // esi@1
  void *(__thiscall *v3)(NiRefObject *, unsigned int); // edx@2
  float v4; // ST08_4@2

  v2 = this->m_kPlayingSourceList.m_pkHead;
  this->m_fGain = fVolume;
  while ( v2 )
  {
    v3 = v2->m_element->vfptr[47].__vecDelDtor;
    v2 = v2->m_pkNext;
    v4 = SoundGroup::ms_fMasterGain * fVolume;
    ((void (__stdcall *)(_DWORD))v3)(LODWORD(v4));
  }
}
// A75E70: using guessed type float SoundGroup::ms_fMasterGain;

//----- (0069C7D0) --------------------------------------------------------
NiPointer<NiAudioSource> *__thiscall SoundGroup::CreateSource(SoundGroup *this, NiPointer<NiAudioSource> *result, unsigned int uiType)
{
  SoundGroup *v3; // esi@1
  NiPointer<NiAudioSource> *v4; // eax@2
  NiMilesAudioSystem *v5; // ecx@3
  NiAudioSource *v6; // eax@5

  v3 = this;
  if ( this->m_bEnable && (v5 = this->m_pkAudioSystem) != 0 && NiMilesAudioSystem::GetDefaultProvider(v5) )
  {
    v6 = (NiAudioSource *)((int (__stdcall *)(unsigned int))v3->m_pkAudioSystem->vfptr[17].__vecDelDtor)(uiType);
    result->m_pObject = v6;
    if ( v6 )
      InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
    v4 = result;
  }
  else
  {
    v4 = result;
    result->m_pObject = 0;
  }
  return v4;
}

//----- (0069C830) --------------------------------------------------------
void __stdcall SoundGroup::ClearSource(NiAudioSource *pkSource)
{
  NiAudioSource *v2; // esi@1
  NiNode *v3; // ecx@2
  NiAudioSource *v4; // edi@4

  v2 = pkSource;
  if ( pkSource )
  {
    v3 = pkSource->m_pkParent;
    if ( v3 )
    {
      ((void (__stdcall *)(_DWORD, _DWORD))v3->vfptr[30].__vecDelDtor)(&pkSource, pkSource);
      if ( pkSource )
      {
        v4 = pkSource;
        if ( !InterlockedDecrement((volatile LONG *)&pkSource->m_uiRefCount) )
        {
          if ( v4 )
            v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
        }
      }
    }
    ((void (__thiscall *)(_DWORD))v2->vfptr[38].__vecDelDtor)(v2);
  }
}

//----- (0069C890) --------------------------------------------------------
void __thiscall SoundGroup::StopAllSound(SoundGroup *this)
{
  NiTListItem<NiAudioSource *> *v1; // esi@1
  void (*v2)(void); // edx@2

  v1 = this->m_kPlayingSourceList.m_pkHead;
  while ( v1 )
  {
    v2 = (void (*)(void))v1->m_element->vfptr[55].__vecDelDtor;
    v1 = v1->m_pkNext;
    v2();
  }
}

//----- (0069C8B0) --------------------------------------------------------
bool __thiscall SoundGroup::Check3DSoundPlayable(SoundGroup *this, NiPoint3 *rkPoint)
{
  bool result; // al@2

  if ( this->m_kPlayingSourceList.m_kAllocator.m_uiCount < this->m_dwOccupyingChannelCount )
    result = SoundGroup::IsOutofMaxRange(this, rkPoint) == 0;
  else
    result = 0;
  return result;
}

//----- (0069C8E0) --------------------------------------------------------
bool __thiscall SoundGroup::Check3DSoundPlayable(SoundGroup *this, NiAVObject *pkObj)
{
  bool result; // al@2

  if ( pkObj )
    result = ((int (__stdcall *)(NiPoint3 *))this->vfptr->Check3DSoundPlayable)(&pkObj->m_kWorld.m_Translate);
  else
    result = 0;
  return result;
}

//----- (0069C910) --------------------------------------------------------
void __thiscall SoundGroup::SetMinDistance(SoundGroup *this, float fMinDist)
{
  NiTListItem<NiAudioSource *> *v2; // esi@1
  void *(__thiscall *v3)(NiRefObject *, unsigned int); // edx@2

  v2 = this->m_kPlayingSourceList.m_pkHead;
  this->m_fSoundMin = fMinDist;
  while ( v2 )
  {
    v3 = v2->m_element->vfptr[45].__vecDelDtor;
    v2 = v2->m_pkNext;
    ((void (__stdcall *)(_DWORD, _DWORD))v3)(LODWORD(fMinDist), LODWORD(SoundGroup::ms_fSoundMax));
  }
}
// A75E68: using guessed type float SoundGroup::ms_fSoundMax;

//----- (0069C950) --------------------------------------------------------
void __thiscall SoundGroup::SetMaxDistance(SoundGroup *this, float fMaxDist)
{
  SoundGroup *v2; // edi@1
  NiTListItem<NiAudioSource *> *v3; // esi@1
  void *(__thiscall *v4)(NiRefObject *, unsigned int); // edx@2

  v2 = this;
  v3 = this->m_kPlayingSourceList.m_pkHead;
  this->m_fSoundMax = fMaxDist;
  while ( v3 )
  {
    v4 = v3->m_element->vfptr[45].__vecDelDtor;
    v3 = v3->m_pkNext;
    ((void (__stdcall *)(_DWORD, _DWORD))v4)(v2->m_fSoundMin, v2->m_fSoundMax);
  }
}

//----- (0069C990) --------------------------------------------------------
char __thiscall SoundGroupStatic::IsUniqueSource(SoundGroupStatic *this, NiMilesSource *pkSource)
{
  SoundGroupStatic *v2; // edi@1
  int v4; // esi@3
  NiMilesSource *v5; // ebx@4
  NiMilesSource *v6; // ecx@5
  void *v7; // ST0C_4@7

  v2 = this;
  if ( !this->m_pspSourceTable )
    return 0;
  v4 = 0;
  if ( !this->m_dwTableSize )
    return 1;
  v5 = pkSource;
  while ( 1 )
  {
    v6 = (NiMilesSource *)v2->m_pspSourceTable[v4].m_pObject;
    if ( !v6 || v6 == v5 )
      goto LABEL_9;
    v7 = NiMilesSource::GetFileImage(v6);
    if ( v7 == NiMilesSource::GetFileImage(v5) )
      return 0;
    v5 = pkSource;
LABEL_9:
    if ( ++v4 >= v2->m_dwTableSize )
      return 1;
  }
}

//----- (0069CA00) --------------------------------------------------------
NiAudioSource *__thiscall SoundGroupStatic::GetSoundDirectly(SoundGroupStatic *this, unsigned int dwSoundIndex)
{
  NiPointer<NiAudioSource> *v2; // eax@1
  NiAudioSource *result; // eax@2

  v2 = this->m_pspSourceTable;
  if ( v2 && dwSoundIndex < this->m_dwTableSize )
    result = v2[dwSoundIndex].m_pObject;
  else
    result = 0;
  return result;
}

//----- (0069CA20) --------------------------------------------------------
void __thiscall SoundGroupStatic::StopSound(SoundGroupStatic *this, SoundIndex *rkIndex)
{
  NiPointer<NiAudioSource> *v2; // edx@2
  NiAudioSource *v3; // ecx@4

  if ( !rkIndex->m_acFilename )
  {
    v2 = this->m_pspSourceTable;
    if ( v2 )
    {
      if ( rkIndex->m_dwIndex < this->m_dwTableSize )
      {
        v3 = v2[rkIndex->m_dwIndex].m_pObject;
        if ( v3 )
          ((void (*)(void))v3->vfptr[55].__vecDelDtor)();
      }
    }
  }
}

//----- (0069CA50) --------------------------------------------------------
void __thiscall SoundGroupStatic::Terminate(SoundGroupStatic *this)
{
  SoundGroupStatic *v1; // esi@1
  char *v2; // eax@1
  char *v3; // edi@2

  v1 = this;
  SoundGroup::Terminate((SoundGroup *)&this->vfptr);
  v1->vfptr->UnloadAllSound((SoundGroup *)v1);
  v2 = (char *)v1->m_pspSourceTable;
  if ( v2 )
  {
    v3 = v2 - 4;
    `eh vector destructor iterator'(
      v2,
      4u,
      *((_DWORD *)v2 - 1),
      (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
    operator delete[](v3);
  }
  v1->m_pspSourceTable = 0;
}

//----- (0069CA90) --------------------------------------------------------
void __thiscall SoundGroupStatic::UnloadAllSound(SoundGroupStatic *this)
{
  SoundGroupStatic *v1; // ebx@1
  NiTListItem<NiAudioSource *> **v2; // esi@1
  NiTListItem<NiAudioSource *> *v3; // ST00_4@2
  unsigned int v4; // eax@3
  NiPointer<NiAudioSource> *v5; // ecx@5
  NiAudioSource *v6; // esi@5
  NiAudioSource **v7; // edi@5
  unsigned int i; // [sp+Ch] [bp-4h]@4

  v1 = this;
  ((void (*)(void))this->vfptr->DetachAllSound)();
  v2 = &v1->m_kPlayingSourceList.m_pkHead->m_pkNext;
  while ( v2 )
  {
    v3 = (NiTListItem<NiAudioSource *> *)v2;
    v2 = (NiTListItem<NiAudioSource *> **)*v2;
    v1->m_kPlayingSourceList.vfptr->DeleteItem(
      (NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *> *)&v1->m_kPlayingSourceList,
      v3);
  }
  v4 = 0;
  v1->m_kPlayingSourceList.m_kAllocator.m_uiCount = 0;
  v1->m_kPlayingSourceList.m_pkHead = 0;
  v1->m_kPlayingSourceList.m_pkTail = 0;
  if ( v1->m_pspSourceTable )
  {
    i = 0;
    if ( v1->m_dwTableSize > 0 )
    {
      do
      {
        v5 = v1->m_pspSourceTable;
        v6 = v5[v4].m_pObject;
        v7 = &v5[v4].m_pObject;
        if ( v6 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
          {
            if ( v6 )
              v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
          }
          v4 = i;
          *v7 = 0;
        }
        i = ++v4;
      }
      while ( v4 < v1->m_dwTableSize );
    }
  }
}

//----- (0069CB20) --------------------------------------------------------
void __thiscall SoundGroupStatic::DetachAllSound(SoundGroupStatic *this)
{
  SoundGroupStatic *v1; // edi@1
  unsigned int v2; // esi@2
  NiAudioSource *v3; // eax@3
  void (__thiscall ***v4)(_DWORD, _DWORD); // ebx@6
  int v5; // [sp+4h] [bp-4h]@5

  v1 = this;
  if ( this->m_pspSourceTable )
  {
    v2 = 0;
    if ( this->m_dwTableSize )
    {
      do
      {
        v3 = v1->m_pspSourceTable[v2].m_pObject;
        if ( v3 )
        {
          if ( v3->m_pkParent )
          {
            ((void (__stdcall *)(int *, NiAudioSource *))v1->m_pspSourceTable[v2].m_pObject->m_pkParent->vfptr[30].__vecDelDtor)(
              &v5,
              v1->m_pspSourceTable[v2].m_pObject);
            if ( v5 )
            {
              v4 = (void (__thiscall ***)(_DWORD, _DWORD))v5;
              if ( !InterlockedDecrement((volatile LONG *)(v5 + 4)) )
              {
                if ( v4 )
                  (**v4)(v4, 1);
              }
            }
          }
        }
        ++v2;
      }
      while ( v2 < v1->m_dwTableSize );
    }
  }
}

//----- (0069CB90) --------------------------------------------------------
void __thiscall SoundGroupStatic::DetachSound(SoundGroupStatic *this, SoundIndex *rkIndex)
{
  NiPointer<NiAudioSource> *v2; // edx@2
  unsigned int v3; // eax@3
  NiAudioSource *v4; // ecx@4
  NiNode *v5; // ecx@5

  if ( !rkIndex->m_acFilename )
  {
    v2 = this->m_pspSourceTable;
    if ( v2 )
    {
      v3 = rkIndex->m_dwIndex;
      if ( rkIndex->m_dwIndex < this->m_dwTableSize )
      {
        v4 = v2[v3].m_pObject;
        if ( v4 )
        {
          v5 = v4->m_pkParent;
          if ( v5 )
          {
            ((void (__stdcall *)(_DWORD, _DWORD))v5->vfptr[30].__vecDelDtor)(&rkIndex, v2[v3].m_pObject);
            NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&rkIndex);
          }
        }
      }
    }
  }
}

//----- (0069CBE0) --------------------------------------------------------
char __thiscall SoundGroupDynamic::IsUniqueSource(SoundGroupDynamic *this, NiMilesSource *pkSource)
{
  NiTListItem<NiPointer<NiAudioSource> > *v2; // esi@1
  NiMilesSource *v3; // ecx@2
  void *v4; // ebx@4
  char result; // al@6

  v2 = this->m_kActiveSourceList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = (NiMilesSource *)v2->m_element.m_pObject;
      v2 = v2->m_pkNext;
      if ( v3 )
      {
        if ( v3 != pkSource )
        {
          v4 = NiMilesSource::GetFileImage(v3);
          if ( v4 == NiMilesSource::GetFileImage(pkSource) )
            break;
        }
      }
      if ( !v2 )
        goto LABEL_6;
    }
    result = 0;
  }
  else
  {
LABEL_6:
    result = 1;
  }
  return result;
}

//----- (0069CC30) --------------------------------------------------------
void __thiscall SoundGroupDynamic::UnloadAllSound(SoundGroupDynamic *this)
{
  SoundGroupDynamic *v1; // edi@1
  NiTListItem<NiAudioSource *> **v2; // esi@1
  NiTListItem<NiAudioSource *> *v3; // ST00_4@2
  NiTListItem<void *> **v4; // esi@3
  NiTListItem<void *> *v5; // ST00_4@4
  NiTListItem<NiPointer<NiAudioSource> > **v6; // esi@5
  NiTListItem<NiPointer<NiAudioSource> > *v7; // ST00_4@6
  NiTListItem<NiPointer<NiAudioSource> > **v8; // esi@7
  NiTListItem<NiPointer<NiAudioSource> > *v9; // ST00_4@8
  NiTListItem<NiPointer<NiAudioSource> > **v10; // esi@9
  NiTListItem<NiPointer<NiAudioSource> > *v11; // ST00_4@10

  v1 = this;
  ((void (*)(void))this->vfptr->DetachAllSound)();
  v2 = &v1->m_kPlayingSourceList.m_pkHead->m_pkNext;
  while ( v2 )
  {
    v3 = (NiTListItem<NiAudioSource *> *)v2;
    v2 = (NiTListItem<NiAudioSource *> **)*v2;
    v1->m_kPlayingSourceList.vfptr->DeleteItem(
      (NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *> *)&v1->m_kPlayingSourceList,
      v3);
  }
  v1->m_kPlayingSourceList.m_kAllocator.m_uiCount = 0;
  v1->m_kPlayingSourceList.m_pkHead = 0;
  v1->m_kPlayingSourceList.m_pkTail = 0;
  v4 = &v1->m_kUniqueSourceList.m_pkHead->m_pkNext;
  while ( v4 )
  {
    v5 = (NiTListItem<void *> *)v4;
    v4 = (NiTListItem<void *> **)*v4;
    v1->m_kUniqueSourceList.vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,void *> *)&v1->m_kUniqueSourceList,
      v5);
  }
  v1->m_kUniqueSourceList.m_kAllocator.m_uiCount = 0;
  v1->m_kUniqueSourceList.m_pkHead = 0;
  v1->m_kUniqueSourceList.m_pkTail = 0;
  v6 = &v1->m_kActiveSourceList.m_pkHead->m_pkNext;
  while ( v6 )
  {
    v7 = (NiTListItem<NiPointer<NiAudioSource> > *)v6;
    v6 = (NiTListItem<NiPointer<NiAudioSource> > **)*v6;
    v1->m_kActiveSourceList.vfptr->DeleteItem(
      (NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> > *)&v1->m_kActiveSourceList,
      v7);
  }
  v1->m_kActiveSourceList.m_kAllocator.m_uiCount = 0;
  v1->m_kActiveSourceList.m_pkHead = 0;
  v1->m_kActiveSourceList.m_pkTail = 0;
  v8 = &v1->m_kAmbientSourceRecycleList.m_pkHead->m_pkNext;
  while ( v8 )
  {
    v9 = (NiTListItem<NiPointer<NiAudioSource> > *)v8;
    v8 = (NiTListItem<NiPointer<NiAudioSource> > **)*v8;
    v1->m_kAmbientSourceRecycleList.vfptr->DeleteItem(
      (NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> > *)&v1->m_kAmbientSourceRecycleList,
      v9);
  }
  v1->m_kAmbientSourceRecycleList.m_kAllocator.m_uiCount = 0;
  v1->m_kAmbientSourceRecycleList.m_pkHead = 0;
  v1->m_kAmbientSourceRecycleList.m_pkTail = 0;
  v10 = &v1->m_k3DSourceRecycleList.m_pkHead->m_pkNext;
  while ( v10 )
  {
    v11 = (NiTListItem<NiPointer<NiAudioSource> > *)v10;
    v10 = (NiTListItem<NiPointer<NiAudioSource> > **)*v10;
    v1->m_k3DSourceRecycleList.vfptr->DeleteItem(
      (NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> > *)&v1->m_k3DSourceRecycleList,
      v11);
  }
  v1->m_k3DSourceRecycleList.m_kAllocator.m_uiCount = 0;
  v1->m_k3DSourceRecycleList.m_pkHead = 0;
  v1->m_k3DSourceRecycleList.m_pkTail = 0;
}

//----- (0069CD00) --------------------------------------------------------
void __thiscall SoundGroupDynamic::DetachAllSound(SoundGroupDynamic *this)
{
  NiTListItem<NiPointer<NiAudioSource> > *v1; // esi@1
  NiAudioSource *v2; // eax@2
  NiNode *v3; // ecx@2
  void (__thiscall ***v4)(_DWORD, _DWORD); // edi@4
  int v5; // [sp+4h] [bp-4h]@3

  v1 = this->m_kActiveSourceList.m_pkHead;
  while ( v1 )
  {
    v2 = v1->m_element.m_pObject;
    v3 = v2->m_pkParent;
    v1 = v1->m_pkNext;
    if ( v3 )
    {
      ((void (__stdcall *)(int *, NiAudioSource *))v3->vfptr[30].__vecDelDtor)(&v5, v2);
      if ( v5 )
      {
        v4 = (void (__thiscall ***)(_DWORD, _DWORD))v5;
        if ( !InterlockedDecrement((volatile LONG *)(v5 + 4)) )
        {
          if ( v4 )
            (**v4)(v4, 1);
        }
      }
    }
  }
}

//----- (0069CD60) --------------------------------------------------------
void __thiscall SoundGroup::Update(SoundGroup *this, float fTime)
{
  SoundGroup *v2; // ebx@1
  NiTListItem<NiAudioSource *> *v3; // edi@1
  NiAudioSource *v4; // esi@2

  v2 = this;
  v3 = this->m_kPlayingSourceList.m_pkHead;
  while ( v3 )
  {
    v4 = v3->m_element;
    v3 = v3->m_pkNext;
    if ( !((int (__thiscall *)(_DWORD))v4->vfptr[29].__vecDelDtor)(v4)
      && SoundGroup::IsOutofMaxRange(v2, &v4->m_kWorld.m_Translate) )
    {
      ((void (__thiscall *)(_DWORD))v4->vfptr[55].__vecDelDtor)(v4);
    }
  }
  v2->vfptr->UpdatePlayingSource(v2);
}

//----- (0069CDC0) --------------------------------------------------------
void __thiscall SoundGroup::UpdatePlayingSource(SoundGroup *this)
{
  NiTListItem<NiAudioSource *> *v1; // edi@1
  NiAudioSource *v2; // esi@2
  void *(__thiscall *v3)(NiRefObject *, unsigned int); // edx@2
  NiNode *v4; // ecx@3
  void (__thiscall ***v5)(_DWORD, _DWORD); // esi@5
  SoundGroup *v6; // [sp+4h] [bp-Ch]@1
  void *kCurrIter; // [sp+8h] [bp-8h]@2
  int v8; // [sp+Ch] [bp-4h]@4

  v1 = this->m_kPlayingSourceList.m_pkHead;
  v6 = this;
  while ( v1 )
  {
    v2 = v1->m_element;
    v3 = v2->vfptr[57].__vecDelDtor;
    kCurrIter = v1;
    v1 = v1->m_pkNext;
    if ( ((int (__thiscall *)(NiAudioSource *))v3)(v2) != 1 )
    {
      v4 = v2->m_pkParent;
      if ( v4 )
      {
        ((void (__stdcall *)(int *, NiAudioSource *))v4->vfptr[30].__vecDelDtor)(&v8, v2);
        if ( v8 )
        {
          v5 = (void (__thiscall ***)(_DWORD, _DWORD))v8;
          if ( !InterlockedDecrement((volatile LONG *)(v8 + 4)) )
          {
            if ( v5 )
              (**v5)(v5, 1);
          }
        }
      }
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&v6->m_kPlayingSourceList,
        &kCurrIter);
    }
  }
}

//----- (0069CE50) --------------------------------------------------------
NiPointer<NiAudioSource> *__thiscall SoundGroup::Create3DSource(SoundGroup *this, NiPointer<NiAudioSource> *result, char *pcFileName, int bStreamed)
{
  NiAudioSource *v4; // esi@1
  SoundGroup *v5; // edi@1
  NiAudioSource *v6; // eax@3
  void *(__thiscall *v7)(NiRefObject *, unsigned int); // eax@18
  void (__stdcall ***v9)(_DWORD); // [sp+34h] [bp-124h]@3
  void (__stdcall ***v10)(_DWORD); // [sp+38h] [bp-120h]@6
  int v11; // [sp+3Ch] [bp-11Ch]@1
  unsigned int v12; // [sp+40h] [bp-118h]@1
  NiPointer<NiAudioSource> spSource; // [sp+44h] [bp-114h]@1
  char acFileName[256]; // [sp+48h] [bp-110h]@13
  int v15; // [sp+154h] [bp-4h]@1

  v4 = 0;
  v11 = 0;
  v5 = this;
  v12 = (unsigned int)pcFileName;
  spSource.m_pObject = 0;
  v15 = 1;
  if ( this->m_pkAudioSystem && this->m_bEnable )
  {
    v6 = *(NiAudioSource **)((int (__stdcall *)(void (__stdcall ****)(_DWORD), _DWORD))this->vfptr->CreateSource)(
                              &v9,
                              0);
    if ( v6 )
    {
      v4 = v6;
      spSource.m_pObject = v6;
      InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
    }
    LOBYTE(v15) = 1;
    if ( v9 )
    {
      v10 = v9;
      if ( !InterlockedDecrement((volatile LONG *)v9 + 1) )
      {
        if ( v10 )
          (**v10)(1);
      }
    }
    if ( v4 )
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      sprintf(acFileName, "%s%s", &Folder::m_acSound, v12);
      v4->vfptr[34].__vecDelDtor((NiRefObject *)v4, (unsigned int)acFileName);
      v4->vfptr[32].__vecDelDtor((NiRefObject *)v4, bStreamed);
      if ( (unsigned __int8)((int (__thiscall *)(NiAudioSource *))v4->vfptr[37].__vecDelDtor)(v4) )
      {
        v7 = v4->vfptr[47].__vecDelDtor;
        *(float *)&v12 = v5->m_fGain * SoundGroup::ms_fMasterGain;
        v7((NiRefObject *)&v4->vfptr, v12);
        ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v4->vfptr[45].__vecDelDtor)(
          v4,
          v5->m_fSoundMin,
          LODWORD(SoundGroup::ms_fSoundMax));
        result->m_pObject = v4;
        InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
      }
      else
      {
        if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
        spSource.m_pObject = 0;
        result->m_pObject = 0;
      }
      v11 = 1;
      LOBYTE(v15) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spSource);
    }
    else
    {
      result->m_pObject = 0;
    }
  }
  else
  {
    result->m_pObject = 0;
  }
  return result;
}
// A75E68: using guessed type float SoundGroup::ms_fSoundMax;
// A75E70: using guessed type float SoundGroup::ms_fMasterGain;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0069D040) --------------------------------------------------------
NiPointer<NiAudioSource> *__thiscall SoundGroup::CreateAmbientSource(SoundGroup *this, NiPointer<NiAudioSource> *result, char *pcFileName, int bStreamed)
{
  NiMilesSource *v4; // esi@1
  SoundGroup *v5; // edi@1
  NiAudioSource *v6; // eax@3
  void *(__thiscall *v7)(NiRefObject *, unsigned int); // edx@15
  void (__stdcall ***v9)(_DWORD); // [sp+2Ch] [bp-124h]@6
  int v10; // [sp+30h] [bp-120h]@3
  int v11; // [sp+34h] [bp-11Ch]@1
  NiPointer<NiAudioSource> spSource; // [sp+38h] [bp-118h]@1
  unsigned int v13; // [sp+3Ch] [bp-114h]@1
  char acFileName[256]; // [sp+40h] [bp-110h]@12
  int v15; // [sp+14Ch] [bp-4h]@1

  v4 = 0;
  v11 = 0;
  v5 = this;
  v13 = (unsigned int)pcFileName;
  spSource.m_pObject = 0;
  v15 = 1;
  if ( !this->m_pkAudioSystem || !this->m_bEnable )
  {
    result->m_pObject = 0;
    return result;
  }
  v6 = *(NiAudioSource **)((int (__stdcall *)(int *, signed int))this->vfptr->CreateSource)(&v10, 1);
  if ( v6 )
  {
    v4 = (NiMilesSource *)v6;
    spSource.m_pObject = v6;
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  }
  LOBYTE(v15) = 1;
  if ( v10 )
  {
    v9 = (void (__stdcall ***)(_DWORD))v10;
    if ( !InterlockedDecrement((volatile LONG *)(v10 + 4)) )
    {
      if ( v9 )
        (**v9)(1);
    }
  }
  if ( !v4 )
    goto LABEL_18;
  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acFileName, "%s%s", &Folder::m_acSound, v13);
  v4->vfptr[34].__vecDelDtor((NiRefObject *)v4, (unsigned int)acFileName);
  v4->vfptr[32].__vecDelDtor((NiRefObject *)v4, bStreamed);
  if ( !(unsigned __int8)((int (__thiscall *)(NiMilesSource *))v4->vfptr[37].__vecDelDtor)(v4)
    || !(_BYTE)bStreamed && !NiMilesSource::GetFileImage(v4) )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
LABEL_18:
    result->m_pObject = 0;
    return result;
  }
  v7 = v4->vfptr[47].__vecDelDtor;
  *(float *)&v13 = v5->m_fGain * SoundGroup::ms_fMasterGain;
  v7((NiRefObject *)&v4->vfptr, v13);
  result->m_pObject = (NiAudioSource *)v4;
  InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v11 = 1;
  LOBYTE(v15) = 0;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spSource);
  return result;
}
// A75E70: using guessed type float SoundGroup::ms_fMasterGain;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0069D210) --------------------------------------------------------
void __thiscall SoundGroupStatic::SetTableSize(SoundGroupStatic *this, unsigned int dwTableSize)
{
  SoundGroupStatic *v2; // edi@1
  char *v3; // eax@1
  unsigned int v4; // ecx@1
  void *v5; // eax@1
  int v6; // ebx@2

  v2 = this;
  v3 = (char *)operator new[](4 * dwTableSize);
  v2->m_ppcTable = (char **)v3;
  memset(v3, 0, 4 * dwTableSize);
  v2->m_dwTableSize = dwTableSize;
  v4 = 4 * dwTableSize | -((unsigned __int64)dwTableSize >> 30 != 0);
  v5 = operator new[]((v4 + 4) | -__CFADD__(v4, 4));
  if ( v5 )
  {
    v6 = (int)v5 + 4;
    *(_DWORD *)v5 = dwTableSize;
    `eh vector constructor iterator'(
      (char *)v5 + 4,
      4u,
      dwTableSize,
      (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
      (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
    v2->m_pspSourceTable = (NiPointer<NiAudioSource> *)v6;
  }
  else
  {
    v2->m_pspSourceTable = 0;
  }
}

//----- (0069D2F0) --------------------------------------------------------
NiAudioSource *__thiscall SoundGroupStatic::GetSound(SoundGroupStatic *this, SoundIndex *rkIndex, bool bStreamed)
{
  SoundGroupStatic *v3; // esi@1
  SoundIndex *v4; // edi@1
  NiAudioSource *result; // eax@2
  NiPointer<NiAudioSource> *v6; // ecx@3
  char *v7; // eax@6
  NiPointer<NiPixelData> *v8; // eax@7

  v3 = this;
  v4 = rkIndex;
  if ( rkIndex->m_acFilename )
    return 0;
  v6 = this->m_pspSourceTable;
  if ( !v6 || rkIndex->m_dwIndex >= v3->m_dwTableSize )
    return 0;
  result = v6[rkIndex->m_dwIndex].m_pObject;
  if ( result )
    return result;
  v7 = SoundGroup::GetFilenameFrom((SoundGroup *)&v3->vfptr, rkIndex);
  if ( !v7 )
    return 0;
  v8 = (NiPointer<NiPixelData> *)(*(int (__thiscall **)(SoundGroupStatic *, SoundIndex **, char *, _DWORD))&v3->vfptr->gap4[4])(
                                   v3,
                                   &rkIndex,
                                   v7,
                                   bStreamed);
  NiPointer<NiActorManager>::operator=((NiPointer<NiPixelData> *)&v3->m_pspSourceTable[v4->m_dwIndex], v8);
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&rkIndex);
  return v3->m_pspSourceTable[v4->m_dwIndex].m_pObject;
}

//----- (0069D3B0) --------------------------------------------------------
NiAudioSource *__thiscall SoundGroupStatic::Get3DSound(SoundGroupStatic *this, SoundIndex *rkIndex, bool bStreamed)
{
  SoundGroupStatic *v3; // esi@1
  SoundIndex *v4; // edi@1
  NiAudioSource *result; // eax@2
  NiPointer<NiAudioSource> *v6; // ecx@3
  char *v7; // eax@6
  NiPointer<NiPixelData> *v8; // eax@7

  v3 = this;
  v4 = rkIndex;
  if ( rkIndex->m_acFilename )
    return 0;
  v6 = this->m_pspSourceTable;
  if ( !v6 || rkIndex->m_dwIndex >= v3->m_dwTableSize )
    return 0;
  result = v6[rkIndex->m_dwIndex].m_pObject;
  if ( result )
    return result;
  v7 = SoundGroup::GetFilenameFrom((SoundGroup *)&v3->vfptr, rkIndex);
  if ( !v7 )
    return 0;
  v8 = (NiPointer<NiPixelData> *)(*(int (__thiscall **)(SoundGroupStatic *, SoundIndex **, char *, _DWORD))&v3->vfptr->gap4[0])(
                                   v3,
                                   &rkIndex,
                                   v7,
                                   bStreamed);
  NiPointer<NiActorManager>::operator=((NiPointer<NiPixelData> *)&v3->m_pspSourceTable[v4->m_dwIndex], v8);
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&rkIndex);
  return v3->m_pspSourceTable[v4->m_dwIndex].m_pObject;
}

//----- (0069D470) --------------------------------------------------------
NiAudioSource *__thiscall SoundGroupStatic::PlaySoundA(SoundGroupStatic *this, SoundIndex *rkIndex, bool bLoop, bool bStreamed)
{
  SoundGroupStatic *v4; // edi@1
  NiAudioSource *result; // eax@2
  NiAudioSource *v6; // eax@4
  NiAudioSource *v7; // esi@4
  float bLoopa; // [sp+1Ch] [bp+Ch]@5

  v4 = this;
  if ( this->m_bEnable && this->m_kPlayingSourceList.m_kAllocator.m_uiCount < this->m_dwOccupyingChannelCount )
  {
    v6 = SoundGroupStatic::GetSound(this, rkIndex, bStreamed);
    v7 = v6;
    *(_DWORD *)&bStreamed = v6;
    if ( v6 )
    {
      v6->vfptr[52].__vecDelDtor((NiRefObject *)v6, bLoop == 0);
      bLoopa = v4->m_fGain * SoundGroup::ms_fMasterGain;
      v7->vfptr[47].__vecDelDtor((NiRefObject *)v7, LODWORD(bLoopa));
      ((void (__thiscall *)(NiAudioSource *))v7->vfptr[54].__vecDelDtor)(v7);
      NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v4->m_kPlayingSourceList,
        (NiD3DXEffectParameter *const *)&bStreamed);
      result = v7;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A75E70: using guessed type float SoundGroup::ms_fMasterGain;

//----- (0069D510) --------------------------------------------------------
NiAudioSource *__thiscall SoundGroupStatic::Play3DSound(SoundGroupStatic *this, SoundIndex *rkIndex, NiPoint3 *rkPoint, bool bLoop)
{
  SoundGroupStatic *v4; // edi@1
  NiAudioSource *result; // eax@2
  NiPoint3 *v6; // ebx@3
  NiPoint3 *v7; // eax@5
  NiAudioSource *v8; // esi@5

  v4 = this;
  if ( this->m_bEnable )
  {
    v6 = rkPoint;
    if ( (unsigned __int8)((int (__stdcall *)(NiPoint3 *))this->vfptr->Check3DSoundPlayable)(rkPoint) )
    {
      v7 = (NiPoint3 *)SoundGroupStatic::Get3DSound(v4, rkIndex, 0);
      v8 = (NiAudioSource *)v7;
      rkPoint = v7;
      if ( v7 )
      {
        (*(void (__thiscall **)(NiPoint3 *, _DWORD))(LODWORD(v7->x) + 208))(v7, bLoop == 0);
        ((void (__thiscall *)(NiAudioSource *))v8->vfptr[54].__vecDelDtor)(v8);
        v8->m_kWorld.m_Translate.x = v6->x;
        v8->m_kWorld.m_Translate.y = v6->y;
        v8->m_kWorld.m_Translate.z = v6->z;
        v8->vfptr[63].__vecDelDtor((NiRefObject *)v8, COERCE_UNSIGNED_INT(0.0));
        NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v4->m_kPlayingSourceList,
          (NiD3DXEffectParameter *const *)&rkPoint);
        result = v8;
      }
      else
      {
        result = 0;
      }
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0069D5C0) --------------------------------------------------------
NiAudioSource *__userpurge SoundGroupStatic::Play3DSound@<eax>(SoundGroupStatic *this@<ecx>, int a2@<esi>, SoundIndex *rkIndex, NiNode *pkNode, bool bLoop)
{
  SoundGroupStatic *v5; // ebx@1
  NiAudioSource *result; // eax@2
  NiNode *v7; // edi@3
  NiNode *v8; // eax@6
  NiAudioSource *v9; // esi@6
  NiNode *v10; // ecx@7
  int v11; // [sp+20h] [bp-Ch]@6

  v5 = this;
  if ( this->m_bEnable )
  {
    v7 = pkNode;
    if ( pkNode
      && (unsigned __int8)((int (__stdcall *)(NiPoint3 *))this->vfptr->Check3DSoundPlayable)(&pkNode->m_kWorld.m_Translate) )
    {
      v11 = a2;
      v8 = (NiNode *)SoundGroupStatic::Get3DSound(v5, rkIndex, 0);
      v9 = (NiAudioSource *)v8;
      pkNode = v8;
      if ( v8 )
      {
        ((void (__thiscall *)(NiNode *, _DWORD, int))v8->vfptr[52].__vecDelDtor)(v8, bLoop == 0, v11);
        v10 = v9->m_pkParent;
        if ( v7 != v10 )
        {
          if ( v10 )
          {
            ((void (__stdcall *)(bool *, NiAudioSource *))v10->vfptr[30].__vecDelDtor)(&bLoop, v9);
            NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&bLoop);
          }
          ((void (__thiscall *)(NiNode *, NiAudioSource *, _DWORD))v7->vfptr[29].__vecDelDtor)(v7, v9, 0);
        }
        NiAVObject::Update((NiAVObject *)&v7->vfptr, 0.0, 1);
        ((void (__thiscall *)(NiAudioSource *))v9->vfptr[54].__vecDelDtor)(v9);
        ((void (__thiscall *)(NiAudioSource *))v9->vfptr[63].__vecDelDtor)(v9);
        NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v5->m_kPlayingSourceList,
          (NiD3DXEffectParameter *const *)&pkNode);
        result = v9;
      }
      else
      {
        result = 0;
      }
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// 69D5C0: could not find valid save-restore pair for esi

//----- (0069D6A0) --------------------------------------------------------
void __thiscall SoundGroupStatic::UnloadSound(SoundGroupStatic *this, SoundIndex *rkIndex)
{
  SoundIndex *v2; // edi@1
  SoundGroupStatic *v3; // esi@1
  NiPointer<NiAudioSource> *v4; // ecx@2
  NiAudioSource *v5; // ecx@4
  SoundIndex *v6; // eax@7
  NiAudioSource *v7; // edx@8
  unsigned int *v8; // ecx@9
  NiPointer<NiAudioSource> *v9; // edx@13
  NiAudioSource *v10; // esi@13
  NiAudioSource **v11; // edi@13

  v2 = rkIndex;
  v3 = this;
  if ( !rkIndex->m_acFilename )
  {
    v4 = this->m_pspSourceTable;
    if ( v4 )
    {
      if ( rkIndex->m_dwIndex < v3->m_dwTableSize )
      {
        v5 = v4[rkIndex->m_dwIndex].m_pObject;
        if ( v5 )
        {
          if ( ((int (*)(void))v5->vfptr[57].__vecDelDtor)() == 1 )
            ((void (*)(void))v3->m_pspSourceTable[v2->m_dwIndex].m_pObject->vfptr[55].__vecDelDtor)();
          v6 = (SoundIndex *)v3->m_kPlayingSourceList.m_pkHead;
          if ( v6 )
          {
            v7 = v3->m_pspSourceTable[v2->m_dwIndex].m_pObject;
            while ( 1 )
            {
              v8 = &v6[1].m_dwIndex;
              rkIndex = v6;
              v6 = (SoundIndex *)v6->m_dwIndex;
              if ( (NiAudioSource *)*v8 == v7 )
                break;
              if ( !v6 )
                goto LABEL_13;
            }
            NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
              (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&v3->m_kPlayingSourceList,
              (void **)&rkIndex);
          }
LABEL_13:
          v9 = v3->m_pspSourceTable;
          v10 = v9[v2->m_dwIndex].m_pObject;
          v11 = &v9[v2->m_dwIndex].m_pObject;
          if ( v10 )
          {
            if ( !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) )
            {
              if ( v10 )
                v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
            }
            *v11 = 0;
          }
        }
      }
    }
  }
}

//----- (0069D760) --------------------------------------------------------
void __thiscall SoundGroupDynamic::MarkAsRecentlyUsed(SoundGroupDynamic *this, NiAudioSource *pkSource)
{
  SoundGroupDynamic *v2; // ebx@1
  NiTListItem<void *> *v3; // esi@1
  NiMilesSource *v4; // edi@1
  void *v5; // ebx@2
  void *v6; // edi@5
  int v7; // eax@5
  NiTListItem<void *> *v8; // ecx@5
  NiAudioSource *v9; // esi@8
  char *v10; // ebx@9
  SoundGroupDynamic *v11; // [sp+Ch] [bp-4h]@1

  v2 = this;
  v3 = this->m_kUniqueSourceList.m_pkHead;
  v4 = (NiMilesSource *)pkSource;
  v11 = this;
  if ( v3 )
  {
    while ( 1 )
    {
      v5 = v3->m_element;
      v3 = v3->m_pkNext;
      if ( v5 == NiMilesSource::GetFileImage(v4) )
        break;
      if ( !v3 )
      {
        v2 = v11;
        goto LABEL_5;
      }
    }
    v9 = (NiAudioSource *)v11->m_kUniqueSourceList.m_pkHead;
    if ( v9 )
    {
      while ( 1 )
      {
        v10 = v9->m_pcName;
        pkSource = v9;
        v9 = (NiAudioSource *)v9->vfptr;
        if ( NiMilesSource::GetFileImage(v4) == v10 )
          break;
        if ( !v9 )
          return;
      }
      SpTList<void *>::MoveToHead(&v11->m_kUniqueSourceList, (void **)&pkSource);
    }
  }
  else
  {
LABEL_5:
    v6 = NiMilesSource::GetFileImage(v4);
    v7 = (int)v2->m_kUniqueSourceList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,void *> *)&v2->m_kUniqueSourceList);
    *(_DWORD *)(v7 + 8) = v6;
    *(_DWORD *)(v7 + 4) = 0;
    *(_DWORD *)v7 = v2->m_kUniqueSourceList.m_pkHead;
    v8 = v2->m_kUniqueSourceList.m_pkHead;
    if ( v8 )
    {
      v8->m_pkPrev = (NiTListItem<void *> *)v7;
      ++v2->m_kUniqueSourceList.m_kAllocator.m_uiCount;
      v2->m_kUniqueSourceList.m_pkHead = (NiTListItem<void *> *)v7;
    }
    else
    {
      ++v2->m_kUniqueSourceList.m_kAllocator.m_uiCount;
      v2->m_kUniqueSourceList.m_pkTail = (NiTListItem<void *> *)v7;
      v2->m_kUniqueSourceList.m_pkHead = (NiTListItem<void *> *)v7;
    }
  }
}

//----- (0069D830) --------------------------------------------------------
void __thiscall SoundGroup::SoundGroup(SoundGroup *this)
{
  SoundGroup *v1; // esi@1
  NiTListItem<NiD3DShaderInterface *> *v2; // eax@1

  v1 = this;
  this->vfptr = (SoundGroupVtbl *)&SoundGroup::`vftable';
  this->m_kPlayingSourceList.m_kAllocator.m_uiCount = 0;
  this->m_kPlayingSourceList.m_pkHead = 0;
  this->m_kPlayingSourceList.m_pkTail = 0;
  this->m_kPlayingSourceList.vfptr = (NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *>Vtbl *)&NiTList<NiAudioSource *>::`vftable';
  this->m_fSoundMaxRange = 5000.0;
  this->m_ppcTable = 0;
  this->m_dwTableSize = 0;
  this->m_fGain = 1.0;
  this->m_fSoundMin = SoundGroup::ms_fSoundMin;
  this->m_bEnable = 0;
  v2 = SoundGroup::ms_kSoundGroupList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&SoundGroup::ms_kSoundGroupList);
  v2->m_element = (NiD3DShaderInterface *)v1;
  v2->m_pkNext = 0;
  v2->m_pkPrev = SoundGroup::ms_kSoundGroupList.m_pkTail;
  if ( SoundGroup::ms_kSoundGroupList.m_pkTail )
    SoundGroup::ms_kSoundGroupList.m_pkTail->m_pkNext = v2;
  else
    SoundGroup::ms_kSoundGroupList.m_pkHead = v2;
  ++SoundGroup::ms_kSoundGroupList.m_kAllocator.m_uiCount;
  SoundGroup::ms_kSoundGroupList.m_pkTail = v2;
}
// 9BD8AC: using guessed type int (__thiscall *NiTList<NiAudioSource *>::`vftable')(void *p, char);
// 9BD8C4: using guessed type int (__stdcall *SoundGroup::`vftable')(NiPointer<NiAudioSource> *result, unsigned int uiType);
// A75E6C: using guessed type float SoundGroup::ms_fSoundMin;

//----- (0069D8F0) --------------------------------------------------------
void __thiscall SoundGroup::~SoundGroup(SoundGroup *this)
{
  SoundGroup *v1; // esi@1
  NiTListItem<NiD3DShaderInterface *> *v2; // eax@1
  NiD3DShaderInterface **v3; // ecx@2
  NiTListItem<NiD3DShaderInterface *> *v4; // edx@2
  int v5; // edi@7
  NiTListItem<NiAudioSource *> **v6; // esi@7
  NiTListItem<NiAudioSource *> **v7; // ST00_4@8
  void *kPos; // [sp+14h] [bp-10h]@5
  int v9; // [sp+20h] [bp-4h]@1

  v1 = this;
  this->vfptr = (SoundGroupVtbl *)&SoundGroup::`vftable';
  v9 = 0;
  SoundGroup::Terminate(this);
  v2 = SoundGroup::ms_kSoundGroupList.m_pkHead;
  if ( SoundGroup::ms_kSoundGroupList.m_pkHead )
  {
    while ( 1 )
    {
      v3 = &v2->m_element;
      v4 = v2;
      v2 = v2->m_pkNext;
      if ( (NiD3DShaderInterface *)v1 == *v3 )
        break;
      if ( !v2 )
        goto LABEL_4;
    }
  }
  else
  {
LABEL_4:
    v4 = 0;
  }
  kPos = v4;
  if ( v4 )
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(&SoundGroup::ms_kSoundGroupList, &kPos);
  v5 = (int)&v1->m_kPlayingSourceList;
  v1->m_kPlayingSourceList.vfptr = (NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *>Vtbl *)&NiTPointerListBase<DFALL<NiAudioSource *>,NiAudioSource *>::`vftable';
  v6 = &v1->m_kPlayingSourceList.m_pkHead->m_pkNext;
  v9 = 1;
  while ( v6 )
  {
    v7 = v6;
    v6 = (NiTListItem<NiAudioSource *> **)*v6;
    (*(void (__thiscall **)(int, NiTListItem<NiAudioSource *> **))(*(_DWORD *)v5 + 8))(v5, v7);
  }
  *(_DWORD *)(v5 + 12) = 0;
  *(_DWORD *)(v5 + 4) = 0;
  *(_DWORD *)(v5 + 8) = 0;
  *(_DWORD *)v5 = &NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *>::`vftable';
}
// 9BD86C: using guessed type int (__thiscall *NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *>::`vftable')(void *p, char);
// 9BD88C: using guessed type int (__thiscall *NiTPointerListBase<DFALL<NiAudioSource *>,NiAudioSource *>::`vftable')(void *p, char);
// 9BD8C4: using guessed type int (__stdcall *SoundGroup::`vftable')(NiPointer<NiAudioSource> *result, unsigned int uiType);

//----- (0069D9B0) --------------------------------------------------------
void __thiscall SoundGroupStatic::SoundGroupStatic(SoundGroupStatic *this)
{
  SoundGroupStatic *v1; // esi@1

  v1 = this;
  SoundGroup::SoundGroup((SoundGroup *)&this->vfptr);
  v1->vfptr = (SoundGroupVtbl *)&SoundGroupStatic::`vftable';
  v1->m_pspSourceTable = 0;
}
// 9BD914: using guessed type int (__stdcall *SoundGroupStatic::`vftable')(NiPointer<NiAudioSource> *result, unsigned int uiType);

//----- (0069D9D0) --------------------------------------------------------
void __thiscall SoundGroupStatic::~SoundGroupStatic(SoundGroupStatic *this)
{
  SoundGroupStatic *v1; // esi@1
  char *v2; // eax@1
  char *v3; // edi@2

  v1 = this;
  this->vfptr = (SoundGroupVtbl *)&SoundGroupStatic::`vftable';
  SoundGroup::Terminate((SoundGroup *)&this->vfptr);
  v1->vfptr->UnloadAllSound((SoundGroup *)v1);
  v2 = (char *)v1->m_pspSourceTable;
  if ( v2 )
  {
    v3 = v2 - 4;
    `eh vector destructor iterator'(
      v2,
      4u,
      *((_DWORD *)v2 - 1),
      (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
    operator delete[](v3);
  }
  v1->m_pspSourceTable = 0;
  SoundGroup::~SoundGroup((SoundGroup *)&v1->vfptr);
}
// 9BD914: using guessed type int (__stdcall *SoundGroupStatic::`vftable')(NiPointer<NiAudioSource> *result, unsigned int uiType);

//----- (0069DA60) --------------------------------------------------------
SoundIndex *__thiscall SoundGroupDynamic::PlaySoundA(SoundGroupDynamic *this, SoundIndex *rkIndex, bool bLoop, bool bStreamed)
{
  SoundGroupDynamic *v4; // esi@1
  char *v5; // eax@3
  char **v6; // ecx@4
  SoundIndex *v7; // esi@8
  int v9; // [sp+0h] [bp-18h]@0
  int v10; // [sp+4h] [bp-14h]@0
  NiD3DXEffectParameter *element; // [sp+8h] [bp-10h]@8
  int v12; // [sp+Ch] [bp-Ch]@8
  int v13; // [sp+14h] [bp-4h]@7

  v4 = this;
  if ( this->m_bEnable )
  {
    if ( this->m_kPlayingSourceList.m_kAllocator.m_uiCount < this->m_dwOccupyingChannelCount )
    {
      v5 = rkIndex->m_acFilename;
      if ( v5
        || (v6 = this->m_ppcTable) != 0 && rkIndex->m_dwIndex < v4->m_dwTableSize && (v5 = v6[rkIndex->m_dwIndex]) != 0 )
      {
        (*(void (__thiscall **)(SoundGroupDynamic *, SoundIndex **, char *, _DWORD))&v4->vfptr->gap4[4])(
          v4,
          &rkIndex,
          v5,
          0);
        v13 = 0;
        if ( rkIndex )
        {
          (*(void (__stdcall **)(int, int, NiD3DXEffectParameter *, int))(rkIndex->m_dwIndex + 216))(
            v9,
            v10,
            element,
            v12);
          element = (NiD3DXEffectParameter *)rkIndex;
          NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
            (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v4->m_kPlayingSourceList,
            &element);
          NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(
            (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *)&v4->m_kActiveSourceList,
            (NiPointer<NiDX92DBufferData> *)&rkIndex);
          SoundGroupDynamic::MarkAsRecentlyUsed(v4, (NiAudioSource *)rkIndex);
          v7 = rkIndex;
          v13 = -1;
          NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&rkIndex);
          return v7;
        }
        v13 = -1;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&rkIndex);
      }
    }
  }
  return 0;
}

//----- (0069DB70) --------------------------------------------------------
NiNode *__thiscall SoundGroupDynamic::Play3DSound(SoundGroupDynamic *this, SoundIndex *rkIndex, NiNode *pkNode, bool bLoop)
{
  SoundGroupDynamic *v4; // esi@1
  NiNode *v5; // edi@2
  char *v6; // eax@4
  char **v7; // ecx@5
  NiNode *v8; // ST18_4@9
  NiNode *v9; // esi@9

  v4 = this;
  if ( this->m_bEnable )
  {
    v5 = pkNode;
    if ( pkNode )
    {
      if ( (unsigned __int8)((int (__stdcall *)(_DWORD))this->vfptr->Check3DSoundPlayable)(&pkNode->m_kWorld.m_Translate) )
      {
        v6 = rkIndex->m_acFilename;
        if ( v6
          || (v7 = v4->m_ppcTable) != 0 && rkIndex->m_dwIndex < v4->m_dwTableSize && (v6 = v7[rkIndex->m_dwIndex]) != 0 )
        {
          (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))&v4->vfptr->gap4[0])(v4, &pkNode, v6, 0);
          if ( pkNode )
          {
            ((void (*)(void))pkNode->vfptr[52].__vecDelDtor)();
            v8 = pkNode;
            ((void (__thiscall *)(_DWORD))v5->vfptr[29].__vecDelDtor)(v5);
            NiAVObject::Update((NiAVObject *)&v5->vfptr, 0.0, 1);
            ((void (__cdecl *)(_DWORD, _DWORD))pkNode->vfptr[54].__vecDelDtor)(v8, 0);
            ((void (__stdcall *)(_DWORD))pkNode->vfptr[63].__vecDelDtor)(0.0);
            *(_DWORD *)&bLoop = pkNode;
            NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
              (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v4->m_kPlayingSourceList,
              (NiD3DXEffectParameter *const *)&bLoop);
            NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(
              (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *)&v4->m_kActiveSourceList,
              (NiPointer<NiDX92DBufferData> *)&pkNode);
            SoundGroupDynamic::MarkAsRecentlyUsed(v4, (NiAudioSource *)pkNode);
            v9 = pkNode;
            NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkNode);
            return v9;
          }
          NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkNode);
        }
      }
    }
  }
  return 0;
}

//----- (0069DCE0) --------------------------------------------------------
NiPoint3 *__thiscall SoundGroupDynamic::Play3DSound(SoundGroupDynamic *this, SoundIndex *rkIndex, NiPoint3 *rkPoint, bool bLoop)
{
  SoundGroupDynamic *v4; // esi@1
  NiPoint3 *v5; // edi@2
  char *v6; // eax@3
  char **v7; // ecx@4
  NiPoint3 *v8; // eax@8
  NiPoint3 *v9; // esi@8
  int v11; // [sp+18h] [bp-18h]@0
  int v12; // [sp+1Ch] [bp-14h]@0
  int v13; // [sp+20h] [bp-10h]@0

  v4 = this;
  if ( this->m_bEnable )
  {
    v5 = rkPoint;
    if ( (unsigned __int8)((int (__stdcall *)(NiPoint3 *))this->vfptr->Check3DSoundPlayable)(rkPoint) )
    {
      v6 = rkIndex->m_acFilename;
      if ( v6
        || (v7 = v4->m_ppcTable) != 0 && rkIndex->m_dwIndex < v4->m_dwTableSize && (v6 = v7[rkIndex->m_dwIndex]) != 0 )
      {
        (*(void (__thiscall **)(SoundGroupDynamic *, NiPoint3 **, char *, _DWORD))&v4->vfptr->gap4[0])(
          v4,
          &rkPoint,
          v6,
          0);
        if ( rkPoint )
        {
          (*(void (__stdcall **)(_DWORD, int, int, int))(LODWORD(rkPoint->x) + 208))(bLoop == 0, v11, v12, v13);
          v8 = rkPoint;
          rkPoint[11].z = v5->x;
          v8[12].x = v5->y;
          v8[12].y = v5->z;
          (*(void (**)(void))(LODWORD(rkPoint->x) + 216))();
          (*(void (__stdcall **)(_DWORD))(LODWORD(rkPoint->x) + 252))(0.0);
          *(_DWORD *)&bLoop = rkPoint;
          NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
            (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v4->m_kPlayingSourceList,
            (NiD3DXEffectParameter *const *)&bLoop);
          NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(
            (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *)&v4->m_kActiveSourceList,
            (NiPointer<NiDX92DBufferData> *)&rkPoint);
          SoundGroupDynamic::MarkAsRecentlyUsed(v4, (NiAudioSource *)rkPoint);
          v9 = rkPoint;
          NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&rkPoint);
          return v9;
        }
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&rkPoint);
      }
    }
  }
  return 0;
}

//----- (0069DE40) --------------------------------------------------------
NiPointer<NiAudioSource> *__thiscall SoundGroupDynamic::CreateSource(SoundGroupDynamic *this, NiPointer<NiAudioSource> *result, unsigned int uiType)
{
  SoundGroupDynamic *v3; // esi@1
  NiPointer<NiAudioSource> *v4; // eax@2
  NiPointer<NiAudioSource> *v5; // edi@6
  NiPointer<NiPixelData> *v6; // ST04_4@7
  PgWin *v7; // eax@7
  NiPointer<NiPixelData> *v8; // ST04_4@10
  PgWin *v9; // esi@12
  unsigned int v10; // esi@15
  bool v11; // zf@15
  NiPointer<PgWin> v12; // [sp+10h] [bp-14h]@1
  NiPointer<PgWin> v13; // [sp+14h] [bp-10h]@7
  int v14; // [sp+20h] [bp-4h]@7

  v3 = this;
  v12.m_pObject = 0;
  if ( !this->m_bEnable )
    goto LABEL_2;
  if ( !uiType )
  {
    if ( !this->m_k3DSourceRecycleList.m_kAllocator.m_uiCount )
    {
      v5 = result;
      SoundGroup::CreateSource((SoundGroup *)&this->vfptr, result, 0);
      return v5;
    }
    uiType = 0;
    v8 = (NiPointer<NiPixelData> *)&this->m_k3DSourceRecycleList.m_pkHead->m_element;
    v14 = 0;
    NiPointer<NiActorManager>::operator=((NiPointer<NiPixelData> *)&uiType, v8);
    NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::RemoveHead(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *)&v3->m_k3DSourceRecycleList,
      &v12);
    v7 = v12.m_pObject;
LABEL_11:
    if ( v7 )
    {
      v9 = v7;
      if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      {
        if ( v9 )
          v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      }
    }
    v10 = uiType;
    v5 = result;
    result->m_pObject = (NiAudioSource *)uiType;
    v11 = v10 == 0;
    if ( v10 )
    {
      InterlockedIncrement((volatile LONG *)(v10 + 4));
      v11 = v10 == 0;
    }
    v14 = -1;
    if ( !v11 && !InterlockedDecrement((volatile LONG *)(v10 + 4)) )
      (**(void (__thiscall ***)(_DWORD, _DWORD))v10)(v10, 1);
    return v5;
  }
  if ( uiType != 1 )
  {
LABEL_2:
    v4 = result;
    result->m_pObject = 0;
    return v4;
  }
  if ( this->m_kAmbientSourceRecycleList.m_kAllocator.m_uiCount )
  {
    uiType = 0;
    v6 = (NiPointer<NiPixelData> *)&this->m_kAmbientSourceRecycleList.m_pkHead->m_element;
    v14 = 1;
    NiPointer<NiActorManager>::operator=((NiPointer<NiPixelData> *)&uiType, v6);
    NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::RemoveHead(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *)&v3->m_kAmbientSourceRecycleList,
      &v13);
    v7 = v13.m_pObject;
    goto LABEL_11;
  }
  v5 = result;
  SoundGroup::CreateSource((SoundGroup *)&this->vfptr, result, 1u);
  return v5;
}

//----- (0069DF80) --------------------------------------------------------
void __thiscall SoundGroupDynamic::PushInRecycleList(SoundGroupDynamic *this, NiAudioSource *pkSource)
{
  SoundGroupDynamic *v2; // ebx@1
  NiAudioSource *v3; // esi@1
  NiNode *v4; // ecx@2
  NiAudioSource *v5; // edi@4
  int v6; // eax@8
  volatile LONG *v7; // edi@10

  v2 = this;
  v3 = pkSource;
  if ( pkSource )
  {
    v4 = pkSource->m_pkParent;
    if ( v4 )
    {
      ((void (__stdcall *)(_DWORD, _DWORD))v4->vfptr[30].__vecDelDtor)(&pkSource, pkSource);
      if ( pkSource )
      {
        v5 = pkSource;
        if ( !InterlockedDecrement((volatile LONG *)&pkSource->m_uiRefCount) )
        {
          if ( v5 )
            v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
        }
      }
    }
    ((void (__thiscall *)(_DWORD))v3->vfptr[38].__vecDelDtor)(v3);
  }
  v6 = ((int (__thiscall *)(_DWORD))v3->vfptr[29].__vecDelDtor)(v3);
  if ( v6 )
  {
    if ( v6 != 1 )
      return;
    v7 = (volatile LONG *)&v3->m_uiRefCount;
    pkSource = v3;
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *)&v2->m_kAmbientSourceRecycleList,
      (NiPointer<NiDX92DBufferData> *)&pkSource);
  }
  else
  {
    v7 = (volatile LONG *)&v3->m_uiRefCount;
    pkSource = v3;
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *)&v2->m_k3DSourceRecycleList,
      (NiPointer<NiDX92DBufferData> *)&pkSource);
  }
  if ( !InterlockedDecrement(v7) )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
}

//----- (0069E070) --------------------------------------------------------
void __thiscall SoundGroupDynamic::KeepUniqueSourceCountUnder(SoundGroupDynamic *this, unsigned int dwMaxSound)
{
  SoundGroupDynamic *v2; // edi@1
  unsigned int v3; // eax@1
  NiTListItem<NiPointer<NiAudioSource> > *v4; // ebx@2
  NiMilesSource *v5; // esi@3
  void *v6; // eax@3
  void *(__thiscall *v7)(NiRefObject *, unsigned int); // edx@4
  NiNode *v8; // ecx@5
  void (__thiscall ***v9)(_DWORD, _DWORD); // edi@7
  PgWin *v10; // esi@12
  NiTListItem<void *> *v11; // ecx@18
  NiTListItem<void *> *v12; // eax@18
  NiPointer<PgWin> result; // [sp+4h] [bp-18h]@11
  void *kCurrIter; // [sp+8h] [bp-14h]@3
  int v15; // [sp+Ch] [bp-10h]@6
  void *pvResourceData; // [sp+10h] [bp-Ch]@2
  SoundGroupDynamic *v17; // [sp+14h] [bp-8h]@1
  int iPlayingSourceCount; // [sp+18h] [bp-4h]@2
  int iUnloadedSourceCount; // [sp+24h] [bp+8h]@2

  v2 = this;
  v3 = this->m_kUniqueSourceList.m_kAllocator.m_uiCount;
  v17 = this;
  if ( v3 > dwMaxSound )
  {
    v4 = this->m_kActiveSourceList.m_pkHead;
    pvResourceData = this->m_kUniqueSourceList.m_pkTail->m_element;
    iPlayingSourceCount = 0;
    iUnloadedSourceCount = 0;
    if ( !v4 )
      goto LABEL_24;
    do
    {
      v5 = (NiMilesSource *)v4->m_element.m_pObject;
      kCurrIter = v4;
      v4 = v4->m_pkNext;
      v6 = NiMilesSource::GetFileImage(v5);
      if ( pvResourceData == v6 )
      {
        v7 = v5->vfptr[57].__vecDelDtor;
        ++iPlayingSourceCount;
        if ( ((int (__thiscall *)(NiMilesSource *))v7)(v5) != 1 )
        {
          v8 = v5->m_pkParent;
          if ( v8 )
          {
            ((void (__stdcall *)(int *, NiMilesSource *))v8->vfptr[30].__vecDelDtor)(&v15, v5);
            if ( v15 )
            {
              v9 = (void (__thiscall ***)(_DWORD, _DWORD))v15;
              if ( !InterlockedDecrement((volatile LONG *)(v15 + 4)) && v9 )
                (**v9)(v9, 1);
              v2 = v17;
            }
          }
          ((void (__thiscall *)(NiMilesSource *))v5->vfptr[38].__vecDelDtor)(v5);
          SoundGroupDynamic::PushInRecycleList(v2, (NiAudioSource *)&v5->vfptr);
          NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::RemovePos(
            (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *)&v2->m_kActiveSourceList,
            &result,
            &kCurrIter);
          if ( result.m_pObject )
          {
            v10 = result.m_pObject;
            if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
            {
              if ( v10 )
                v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
            }
          }
          ++iUnloadedSourceCount;
        }
      }
    }
    while ( v4 );
    if ( iPlayingSourceCount == iUnloadedSourceCount )
    {
LABEL_24:
      v11 = v2->m_kUniqueSourceList.m_pkTail;
      v12 = v11->m_pkPrev;
      v2->m_kUniqueSourceList.m_pkTail = v12;
      if ( v12 )
        v12->m_pkNext = 0;
      else
        v2->m_kUniqueSourceList.m_pkHead = 0;
      v2->m_kUniqueSourceList.vfptr->DeleteItem(
        (NiTListBase<NiTPointerAllocator<unsigned int>,void *> *)&v2->m_kUniqueSourceList,
        v11);
      --v2->m_kUniqueSourceList.m_kAllocator.m_uiCount;
    }
  }
}

//----- (0069E1A0) --------------------------------------------------------
void __thiscall SoundGroupDynamic::UpdatePlayingSource(SoundGroupDynamic *this)
{
  SoundGroupDynamic *v1; // ebx@1
  void *v2; // eax@1
  NiAudioSource *v3; // esi@4
  NiRefObjectVtbl *v4; // edx@4
  PgWin *v5; // [sp+10h] [bp-1Ch]@7
  NiPointer<PgWin> result; // [sp+14h] [bp-18h]@6
  void *kCurrIter; // [sp+18h] [bp-14h]@4
  void *iter; // [sp+1Ch] [bp-10h]@3
  int v9; // [sp+28h] [bp-4h]@6

  v1 = this;
  v2 = this->m_kPlayingSourceList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = (NiAudioSource *)*((_DWORD *)v2 + 2);
      v4 = v3->vfptr;
      kCurrIter = v2;
      iter = *(void **)v2;
      if ( ((int (__thiscall *)(NiAudioSource *))v4[57].__vecDelDtor)(v3) != 1 )
      {
        NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&v1->m_kPlayingSourceList,
          &kCurrIter);
        if ( !v1->vfptr->IsUniqueSource((SoundGroup *)v1, (NiMilesSource *)v3) )
        {
          SoundGroupDynamic::PushInRecycleList(v1, v3);
          kCurrIter = v3;
          InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
          v9 = 0;
          NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::Remove(
            (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *)&v1->m_kActiveSourceList,
            &result,
            (NiPointer<PgWin> *)&kCurrIter);
          if ( result.m_pObject )
          {
            v5 = result.m_pObject;
            if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
            {
              if ( v5 )
                ((void (__stdcall *)(signed int))v5->vfptr->__vecDelDtor)(1);
            }
          }
          v9 = -1;
          if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
            v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
        }
      }
      if ( !iter )
        break;
      v2 = iter;
    }
  }
}

//----- (0069E2B0) --------------------------------------------------------
void __thiscall SoundGroupDynamic::Update(SoundGroupDynamic *this, float fTime)
{
  SoundGroupDynamic *v2; // esi@1

  v2 = this;
  SoundGroup::Update((SoundGroup *)&this->vfptr, fTime);
  SoundGroupDynamic::KeepUniqueSourceCountUnder(v2, v2->m_dwMaxUniqueSourceCount);
}

//----- (0069E2E0) --------------------------------------------------------
void *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,void *>::RemoveTail(NiTPointerListBase<NiTPointerAllocator<unsigned int>,void *> *this)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,void *> *v1; // esi@1
  NiTListItem<void *> *v2; // ecx@1
  NiTListItem<void *> *v3; // eax@1
  void *v4; // edi@4

  v1 = this;
  v2 = this->m_pkTail;
  v3 = v2->m_pkPrev;
  v1->m_pkTail = v3;
  if ( v3 )
    v3->m_pkNext = 0;
  else
    v1->m_pkHead = 0;
  v4 = v2->m_element;
  v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,void *> *)v1, v2);
  --v1->m_kAllocator.m_uiCount;
  return v4;
}

//----- (0069E320) --------------------------------------------------------
void __thiscall SpTList<void *>::MoveToHead(SpTList<void *> *this, void **iter)
{
  NiTListItem<void *> *v2; // eax@1

  v2 = (NiTListItem<void *> *)*iter;
  if ( *iter && v2 != this->m_pkHead )
  {
    if ( v2 == this->m_pkTail )
      this->m_pkTail = v2->m_pkPrev;
    v2->m_pkPrev->m_pkNext = v2->m_pkNext;
    if ( v2->m_pkNext )
      v2->m_pkNext->m_pkPrev = v2->m_pkPrev;
    v2->m_pkPrev = 0;
    v2->m_pkNext = this->m_pkHead;
    this->m_pkHead->m_pkPrev = v2;
    this->m_pkHead = v2;
  }
}

//----- (0069E370) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<SoundGroup *>,SoundGroup *>::~NiTListBase<DFALL<SoundGroup *>,SoundGroup *>(NiTListBase<DFALL<SoundGroup *>,SoundGroup *> *this)
{
  this->vfptr = (NiTListBase<DFALL<SoundGroup *>,SoundGroup *>Vtbl *)&NiTListBase<DFALL<SoundGroup *>,SoundGroup *>::`vftable';
}
// 9BD85C: using guessed type int (__thiscall *NiTListBase<DFALL<SoundGroup *>,SoundGroup *>::`vftable')(void *p, char);

//----- (0069E380) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *>::~NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *>(NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *> *this)
{
  this->vfptr = (NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *>Vtbl *)&NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *>::`vftable';
}
// 9BD86C: using guessed type int (__thiscall *NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *>::`vftable')(void *p, char);

//----- (0069E390) --------------------------------------------------------
NiTListBase<DFALL<SoundGroup *>,SoundGroup *> *__thiscall NiTListBase<DFALL<SoundGroup *>,SoundGroup *>::`vector deleting destructor'(NiTListBase<DFALL<SoundGroup *>,SoundGroup *> *this, unsigned int a2)
{
  NiTListBase<DFALL<SoundGroup *>,SoundGroup *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<SoundGroup *>,SoundGroup *>Vtbl *)&NiTListBase<DFALL<SoundGroup *>,SoundGroup *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BD85C: using guessed type int (__thiscall *NiTListBase<DFALL<SoundGroup *>,SoundGroup *>::`vftable')(void *p, char);

//----- (0069E3C0) --------------------------------------------------------
NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *> *__thiscall NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *>::`vector deleting destructor'(NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *> *this, unsigned int a2)
{
  NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *>Vtbl *)&NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BD86C: using guessed type int (__thiscall *NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *>::`vftable')(void *p, char);

//----- (0069E3F0) --------------------------------------------------------
void __stdcall NiTPointerListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>::DeleteItem(NiTMapItem<char const *,NiD3DGlobalConstantEntry *> *pkItem)
{
  pkItem->m_val = 0;
  operator delete(pkItem);
}

//----- (0069E410) --------------------------------------------------------
NiTList<SoundGroup *> *__thiscall NiTPointerListBase<DFALL<SoundGroup *>,SoundGroup *>::`vector deleting destructor'(NiTList<SoundGroup *> *this, unsigned int a2)
{
  NiTList<SoundGroup *> *v2; // edi@1
  NiTListItem<SoundGroup *> *v3; // esi@1
  NiTListItem<SoundGroup *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<SoundGroup *>,SoundGroup *>Vtbl *)&NiTPointerListBase<DFALL<SoundGroup *>,SoundGroup *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<DFALL<SoundGroup *>,SoundGroup *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<SoundGroup *>,SoundGroup *>Vtbl *)&NiTListBase<DFALL<SoundGroup *>,SoundGroup *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BD85C: using guessed type int (__thiscall *NiTListBase<DFALL<SoundGroup *>,SoundGroup *>::`vftable')(void *p, char);
// 9BD87C: using guessed type int (__thiscall *NiTPointerListBase<DFALL<SoundGroup *>,SoundGroup *>::`vftable')(void *p, char);

//----- (0069E4A0) --------------------------------------------------------
void __thiscall NiTList<NiAudioSource *>::~NiTList<NiAudioSource *>(NiTList<NiAudioSource *> *this)
{
  NiTList<NiAudioSource *> *v1; // edi@1
  NiTListItem<NiAudioSource *> *v2; // esi@1
  NiTListItem<NiAudioSource *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *>Vtbl *)&NiTPointerListBase<DFALL<NiAudioSource *>,NiAudioSource *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *>Vtbl *)&NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *>::`vftable';
}
// 9BD86C: using guessed type int (__thiscall *NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *>::`vftable')(void *p, char);
// 9BD88C: using guessed type int (__thiscall *NiTPointerListBase<DFALL<NiAudioSource *>,NiAudioSource *>::`vftable')(void *p, char);

//----- (0069E520) --------------------------------------------------------
NiTList<NiAudioSource *> *__thiscall NiTPointerListBase<DFALL<NiAudioSource *>,NiAudioSource *>::`vector deleting destructor'(NiTList<NiAudioSource *> *this, unsigned int a2)
{
  NiTList<NiAudioSource *> *v2; // edi@1
  NiTListItem<NiAudioSource *> *v3; // esi@1
  NiTListItem<NiAudioSource *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *>Vtbl *)&NiTPointerListBase<DFALL<NiAudioSource *>,NiAudioSource *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *>Vtbl *)&NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BD86C: using guessed type int (__thiscall *NiTListBase<DFALL<NiAudioSource *>,NiAudioSource *>::`vftable')(void *p, char);
// 9BD88C: using guessed type int (__thiscall *NiTPointerListBase<DFALL<NiAudioSource *>,NiAudioSource *>::`vftable')(void *p, char);

//----- (0069E5B0) --------------------------------------------------------
SoundGroup *__thiscall SoundGroup::`scalar deleting destructor'(SoundGroup *this, unsigned int a2)
{
  SoundGroup *v2; // esi@1

  v2 = this;
  SoundGroup::~SoundGroup(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0069E5E0) --------------------------------------------------------
SoundGroupStatic *__thiscall SoundGroupMainChar::`scalar deleting destructor'(SoundGroupStatic *this, unsigned int a2)
{
  SoundGroupStatic *v2; // esi@1

  v2 = this;
  SoundGroupStatic::~SoundGroupStatic(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (0069E610) --------------------------------------------------------
void __thiscall SoundGroupBgm::SetFadeDurationTime(SoundGroupBgm *this, float fDuration)
{
  this->m_fDurationToFade = fDuration;
}

//----- (0069E620) --------------------------------------------------------
void __thiscall SoundGroupBgm::SetCrossFade(SoundGroupBgm *this, bool bCross)
{
  this->m_bCrossFade = bCross;
}

//----- (0069E630) --------------------------------------------------------
bool __thiscall SoundGroupBgm::Initialize(SoundGroupBgm *this, SoundMgr *rkMgr, unsigned int dwOccupyingChannelCount)
{
  SoundGroupBgm *v3; // esi@1
  bool result; // al@1

  v3 = this;
  result = SoundGroup::Initialize((SoundGroup *)&this->vfptr, rkMgr, dwOccupyingChannelCount);
  if ( result )
  {
    v3->vfptr->SetTableSize((SoundGroup *)v3, 2u);
    SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0, "bogus");
    SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 1u, "bogus");
    result = 1;
  }
  return result;
}

//----- (0069E680) --------------------------------------------------------
bool __thiscall SoundGroupBgm::IsBGMPlaying(SoundGroupBgm *this)
{
  NiAudioSource *v1; // eax@1
  int v2; // eax@2

  v1 = SoundGroupStatic::GetSoundDirectly((SoundGroupStatic *)&this->vfptr, this->m_iCurrSourceIndex);
  if ( !v1 || (v2 = ((int (__thiscall *)(NiAudioSource *))v1->vfptr[57].__vecDelDtor)(v1), v2 != 1) )
    LOBYTE(v2) = 0;
  return v2;
}

//----- (0069E6B0) --------------------------------------------------------
void __thiscall IAmbientArea::Update(IAmbientArea *this, float x, float y)
{
  IAmbientArea *v3; // esi@1
  char v4; // bl@1
  int v5; // eax@3

  v3 = this;
  v4 = ((int (__stdcall *)(_DWORD, _DWORD))this->vfptr->IsInside)(LODWORD(x), LODWORD(y));
  if ( v4 )
  {
    if ( !v3->m_bWasInside )
    {
      v5 = ((int (__stdcall *)(IAmbientArea *))v3->m_pkSoundMgr->vfptr->OnEnterArea)(v3);
      v3->m_bWasInside = v4;
      v3->m_iIndex = v5;
      return;
    }
  }
  else if ( v3->m_bWasInside )
  {
    if ( v3->m_iIndex >= 0 )
      ((void (__stdcall *)(IAmbientArea *))v3->m_pkSoundMgr->vfptr->OnExitArea)(v3);
  }
  v3->m_bWasInside = v4;
}

//----- (0069E710) --------------------------------------------------------
void __thiscall IAmbientArea::SetVolume(IAmbientArea *this, int iVolume)
{
  this->m_iVolume = iVolume;
}

//----- (0069E720) --------------------------------------------------------
void __thiscall CircleAmbientArea::Create(CircleAmbientArea *this, float fX, float fY, float fRadius)
{
  this->m_fX = fX;
  this->m_fY = fY;
  this->m_fRadius = fRadius;
}

//----- (0069E740) --------------------------------------------------------
BOOL __thiscall CircleAmbientArea::IsInside(CircleAmbientArea *this, float x, float y)
{
  float v3; // ST00_4@1
  double v4; // st7@1
  float dy; // [sp+Ch] [bp+8h]@1
  float dya; // [sp+Ch] [bp+8h]@1
  float dyb; // [sp+Ch] [bp+8h]@1

  v3 = this->m_fX - x;
  dy = this->m_fY - y;
  dya = dy * dy + v3 * v3;
  v4 = dya;
  dyb = this->m_fRadius * this->m_fRadius;
  return dyb > v4;
}

//----- (0069E7A0) --------------------------------------------------------
double __thiscall CircleAmbientArea::GetRadius(CircleAmbientArea *this)
{
  return this->m_fRadius;
}

//----- (0069E7B0) --------------------------------------------------------
void __thiscall SoundGroupAmbient::SetGain(SoundGroupAmbient *this, float fVolume)
{
  SoundGroupAmbient *v2; // esi@1

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->m_k3DAmbient.vfptr->SetGain)(LODWORD(fVolume));
  SoundGroup::SetGain((SoundGroup *)&v2->vfptr, fVolume);
}

//----- (0069E7E0) --------------------------------------------------------
void __thiscall SoundGroupInterface::SetGain(SoundGroupInterface *this, float fVolume)
{
  SoundGroupInterface *v2; // esi@1

  v2 = this;
  SoundGroup::SetGain((SoundGroup *)&this->vfptr, fVolume);
  ((void (__stdcall *)(_DWORD))v2->m_kDynamicGroup.vfptr->SetGain)(LODWORD(fVolume));
}

//----- (0069E810) --------------------------------------------------------
void __thiscall SoundGroupInterface::SetEnable(SoundGroupInterface *this, int bEnable)
{
  SoundGroupInterface *v2; // esi@1

  v2 = this;
  SoundGroup::SetEnable((SoundGroup *)&this->vfptr, bEnable);
  v2->m_kDynamicGroup.vfptr->SetEnable((SoundGroup *)&v2->m_kDynamicGroup, bEnable);
}

//----- (0069E840) --------------------------------------------------------
bool __thiscall SoundGroupMainChar::Initialize(SoundGroupMainChar *this, SoundMgr *rkMgr, unsigned int dwOccupyingChannelCount)
{
  SoundGroupMainChar *v3; // esi@1
  bool result; // al@1

  v3 = this;
  result = SoundGroup::Initialize((SoundGroup *)&this->vfptr, rkMgr, dwOccupyingChannelCount);
  if ( result )
  {
    v3->vfptr->SetTableSize((SoundGroup *)v3, 2u);
    SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0, "run_nor.wav");
    result = 1;
  }
  return result;
}

//----- (0069E880) --------------------------------------------------------
void __thiscall SoundGroupBgm::SetGain(SoundGroupBgm *this, float fVolume)
{
  SoundGroupBgm *v2; // edi@1
  NiTListItem<NiAudioSource *> *v3; // esi@1
  void *(__thiscall *v4)(NiRefObject *, unsigned int); // edx@2
  float v5; // ST0C_4@2

  v2 = this;
  v3 = this->m_kPlayingSourceList.m_pkHead;
  this->m_fGain = fVolume;
  while ( v3 )
  {
    v4 = v3->m_element->vfptr[47].__vecDelDtor;
    v3 = v3->m_pkNext;
    v5 = v2->m_fBgmVol * fVolume * SoundGroup::ms_fMasterGain;
    ((void (__stdcall *)(_DWORD))v4)(LODWORD(v5));
  }
}
// A75E70: using guessed type float SoundGroup::ms_fMasterGain;

//----- (0069E8E0) --------------------------------------------------------
NiPoint2 *__thiscall CircleAmbientArea::GetCenter(CircleAmbientArea *this, NiPoint2 *result)
{
  NiPoint2 *v2; // eax@1

  v2 = result;
  result->x = this->m_fX;
  result->y = this->m_fY;
  return v2;
}

//----- (0069E900) --------------------------------------------------------
void __thiscall SoundGroupAmbient::Update(SoundGroupAmbient *this, float fTime)
{
  SoundGroupAmbient *v2; // esi@1
  int v3; // eax@1
  NiTListItem<IAmbientArea *> *v4; // edi@1
  int kPos_8; // ST20_4@1
  IAmbientArea *v6; // esi@2
  char v7; // bl@2
  int kPos; // [sp+18h] [bp-10h]@1
  int kPos_4; // [sp+1Ch] [bp-Ch]@1
  SoundGroupAmbient *v10; // [sp+24h] [bp-4h]@1

  v2 = this;
  v10 = this;
  v3 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
  v4 = v2->m_kAreaList.m_pkHead;
  kPos = *(_DWORD *)v3;
  kPos_4 = *(_DWORD *)(v3 + 4);
  kPos_8 = *(_DWORD *)(v3 + 8);
  if ( v4 )
  {
    do
    {
      v6 = v4->m_element;
      v4 = v4->m_pkNext;
      v7 = ((int (__thiscall *)(IAmbientArea *, int, int))v6->vfptr->IsInside)(v6, kPos, kPos_4);
      if ( v7 )
      {
        if ( !v6->m_bWasInside )
          v6->m_iIndex = ((int (__stdcall *)(IAmbientArea *))v6->m_pkSoundMgr->vfptr->OnEnterArea)(v6);
      }
      else if ( v6->m_bWasInside && v6->m_iIndex >= 0 )
      {
        ((void (__stdcall *)(IAmbientArea *))v6->m_pkSoundMgr->vfptr->OnExitArea)(v6);
      }
      v6->m_bWasInside = v7;
    }
    while ( v4 );
    v2 = v10;
  }
  SoundGroup::Update((SoundGroup *)&v2->vfptr, fTime);
}

//----- (0069E9B0) --------------------------------------------------------
char __thiscall SoundGroupAmbient::Initialize(SoundGroupAmbient *this, SoundMgr *rkMgr, unsigned int dwOccupyingChannelCount)
{
  SoundGroupAmbient *v3; // esi@1
  char result; // al@2

  v3 = this;
  if ( SoundGroup::Initialize((SoundGroup *)&this->vfptr, rkMgr, 3u)
    && (v3->vfptr->SetTableSize((SoundGroup *)v3, 3u),
        v3->m_k3DAmbient.vfptr->Initialize((SoundGroup *)&v3->m_k3DAmbient, rkMgr, dwOccupyingChannelCount - 3)) )
  {
    v3->m_k3DAmbient.m_dwMaxUniqueSourceCount = 10;
    v3->m_fPlaying2DVolume[0] = 0.0;
    v3->m_fPlaying2DVolume[1] = 0.0;
    result = 1;
    v3->m_fPlaying2DVolume[2] = 0.0;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0069EA20) --------------------------------------------------------
void __thiscall SoundGroupAmbient::SetAmbientVolumeSync(SoundGroupAmbient *this)
{
  SoundGroupAmbient *v1; // edi@1
  NiTListItem<SoundGroupAmbient::PlayingAreaInfo *> *v2; // esi@1
  SoundGroupAmbient::PlayingAreaInfo *v3; // eax@2
  float v4; // ST14_4@2
  unsigned int v5; // esi@3
  float *v6; // ebx@4
  NiAudioSource *v7; // eax@5
  float v8; // ST14_4@6

  v1 = this;
  v2 = this->m_kPlayingAreaList.m_pkHead;
  while ( v2 )
  {
    v3 = v2->m_element;
    v2 = v2->m_pkNext;
    v4 = v3->fVolume * v1->m_fGain * SoundGroup::ms_fMasterGain;
    ((void (__stdcall *)(_DWORD))v3->pkSource->vfptr[47].__vecDelDtor)(LODWORD(v4));
  }
  v5 = 0;
  if ( v1->m_dwOccupyingChannelCount )
  {
    v6 = v1->m_fPlaying2DVolume;
    do
    {
      v7 = SoundGroupStatic::GetSoundDirectly((SoundGroupStatic *)&v1->vfptr, v5);
      if ( v7 )
      {
        v8 = v1->m_fGain * *v6 * SoundGroup::ms_fMasterGain;
        v7->vfptr[47].__vecDelDtor((NiRefObject *)v7, LODWORD(v8));
      }
      ++v5;
      ++v6;
    }
    while ( v5 < v1->m_dwOccupyingChannelCount );
  }
}
// A75E70: using guessed type float SoundGroup::ms_fMasterGain;

//----- (0069EAB0) --------------------------------------------------------
char __thiscall SoundGroupInterface::Initialize(SoundGroupInterface *this, SoundMgr *rkMgr, unsigned int dwOccupyingChannelCount)
{
  SoundGroupInterface *v3; // esi@1
  char result; // al@2

  v3 = this;
  if ( SoundGroup::Initialize((SoundGroup *)&this->vfptr, rkMgr, dwOccupyingChannelCount)
    && (v3->vfptr->SetTableSize((SoundGroup *)v3, 67u),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0, "interface\\KDSUCCESS.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 1u, "interface\\KDFAIL.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 2u, "interface\\ISSUE.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 3u, "interface\\WEAPONTITLE.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 4u, "interface\\SFX_CLICK.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 5u, "interface\\SFX_QITEMGET.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 6u, "interface\\SFX_RITEMGET.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 7u, "interface\\SFX_STARTQUEST.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 8u, "interface\\SFX_ENDQUEST.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 9u, "interface\\SFX_LVUP.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0xBu, "interface\\SFX_SLOTEND.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0xCu, "interface\\SFX_UPBEST.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0xDu, "interface\\SFX_UPGOOD.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0xEu, "interface\\SFX_UPWORST.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0xFu, "interface\\SFX_LEARNSKILL.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x10u, "interface\\SFX_MoneyGet.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x11u, "interface\\CharCreate.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x12u, "interface\\CharCreateArc.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x13u, "interface\\CharCreateClass.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x14u, "interface\\CharCreateClr.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x15u, "interface\\CharCreateFig.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x16u, "interface\\CharCreateMag.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x17u, "interface\\CharCreateSex.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x18u, "interface\\SFX_ConFriend.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x19u, "interface\\SFX_KQLast.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x1Au, "interface\\SFX_SoulStone.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x1Bu, "interface\\SFX_WDClosed.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x1Cu, "interface\\SFX_UChatJ.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x1Du, "interface\\SFX_UChatM.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x1Eu, "interface\\SFX_OXField.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x1Fu, "interface\\SFX_Critical01.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x20u, "interface\\DiceConnect.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x21u, "interface\\DiceStartBetting.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x22u, "interface\\DiceBettingLogo.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x23u, "interface\\DiceOutMoney.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x24u, "interface\\DiceChipsPiledUp_Pair.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x25u, "interface\\DiceChipsPiledUp_Single.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x26u, "interface\\DiceBettingCheckUp.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x27u, "interface\\Cast_Clock.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x28u, "interface\\Cast_Alarm.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x29u, "interface\\Dice_CoinClick.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x2Au, "interface\\DiceRoll_Pair.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x2Bu, "interface\\DiceRoll_Single01.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x2Cu, "interface\\DiceFinalResult.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x2Du, "interface\\Dice_fanfare.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x2Eu, "interface\\MysteryVaultAlarm.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x2Fu, "interface\\PutOnClear.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x30u, "interface\\Collect_CardOpen.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x31u, "interface\\Collect_CardReward.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x32u, "interface\\GB_SM_Bet.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x33u, "interface\\GB_SM_Cancle.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x34u, "interface\\GB_SM_FullBet.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x35u, "interface\\GB_SM_Lose.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x36u, "interface\\GB_SM_Open.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x37u, "interface\\GB_SM_ReelEnd.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x38u, "interface\\GB_SM_ReelLoop.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x39u, "interface\\GB_SM_ReelStart.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x3Au, "interface\\GB_SM_Reset.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x3Bu, "interface\\GB_SM_Spin.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x3Cu, "interface\\GB_SM_Stop.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x3Du, "interface\\GB_SM_Win.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x3Eu, "interface\\CharCreateJok.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x3Fu, "interface\\SFX_ItemSort.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x40u, "interface\\SFX_MBoxGet.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x41u, "interface\\SFX_ItemPutRing.wav"),
        SoundGroup::SetTable((SoundGroup *)&v3->vfptr, 0x42u, "interface\\RandomOptionProgress.wav"),
        v3->m_kDynamicGroup.vfptr->Initialize((SoundGroup *)&v3->m_kDynamicGroup, rkMgr, dwOccupyingChannelCount - 1)) )
  {
    v3->m_kDynamicGroup.m_dwMaxUniqueSourceCount = 7;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0069EEB0) --------------------------------------------------------
void __thiscall SoundGroupInterface::PlaySoundDynamic(SoundGroupInterface *this, char *pcFilename)
{
  SoundGroupInterface *v2; // esi@1
  char *v3; // eax@1
  NiAudioSource *(__thiscall *v4)(SoundGroup *, SoundIndex *, bool, bool); // edx@1
  char v5; // [sp+4h] [bp-8h]@1
  char *v6; // [sp+8h] [bp-4h]@1

  v2 = this;
  v3 = fs("interface\\%s.wav", pcFilename);
  v4 = v2->m_kDynamicGroup.vfptr->PlaySoundA;
  v6 = v3;
  v4((SoundGroup *)&v2->m_kDynamicGroup.vfptr, (SoundIndex *)&v5, 0, 0);
}

//----- (0069EEF0) --------------------------------------------------------
void __thiscall SoundGroupBgm::NextBgm(SoundGroupBgm *this, int bLoop)
{
  SoundGroupBgm *v2; // esi@1
  char *v3; // eax@3
  NiAudioSource *v4; // edi@5
  NiRefObjectVtbl *v5; // ebx@6
  float v6; // ST1C_4@6
  double v7; // st7@6
  void *(__thiscall *v8)(NiRefObject *, unsigned int); // eax@6
  float v9; // ST18_4@6
  NiAudioSource *(__thiscall *v10)(SoundGroup *, SoundIndex *, bool, bool); // edx@6
  SoundIndex v11; // [sp+2Ch] [bp-10h]@5
  SoundIndex rkIndex; // [sp+34h] [bp-8h]@2

  v2 = this;
  if ( SoundGroupStatic::GetSoundDirectly((SoundGroupStatic *)&this->vfptr, this->m_iCurrSourceIndex) )
  {
    rkIndex.m_dwIndex = v2->m_iCurrSourceIndex;
    rkIndex.m_acFilename = 0;
    SoundGroupStatic::UnloadSound((SoundGroupStatic *)&v2->vfptr, &rkIndex);
  }
  v3 = v2->m_kNextBgmFn._Bx._Buf;
  if ( v2->m_kNextBgmFn._Myres >= 0x10 )
    v3 = *(char **)v3;
  SoundGroup::SetTable((SoundGroup *)&v2->vfptr, v2->m_iCurrSourceIndex, v3);
  v11.m_dwIndex = v2->m_iCurrSourceIndex;
  v11.m_acFilename = 0;
  v4 = SoundGroupStatic::GetSound((SoundGroupStatic *)&v2->vfptr, &v11, 1);
  if ( v4 )
  {
    v4->vfptr[47].__vecDelDtor((NiRefObject *)v4, COERCE_UNSIGNED_INT(0.0));
    v5 = v4->vfptr;
    v6 = v2->m_fDurationToFade;
    v7 = NiGetCurrentTimeInSec();
    v8 = v5[49].__vecDelDtor;
    v9 = v7;
    *(float *)&rkIndex.m_acFilename = v2->m_fBgmVol * v2->m_fGain * SoundGroup::ms_fMasterGain;
    ((void (__thiscall *)(NiAudioSource *, char *, _DWORD, _DWORD))v8)(
      v4,
      rkIndex.m_acFilename,
      LODWORD(v9),
      LODWORD(v6));
    v10 = v2->vfptr->PlaySoundA;
    rkIndex.m_dwIndex = v2->m_iCurrSourceIndex;
    rkIndex.m_acFilename = 0;
    v10((SoundGroup *)&v2->vfptr, &rkIndex, bLoop, 1);
    v4->vfptr[47].__vecDelDtor((NiRefObject *)v4, COERCE_UNSIGNED_INT(0.0));
    v2->m_eState = 4;
    v2->m_bPlayStarted = 1;
  }
  else
  {
    v2->m_eState = 5;
    v2->m_bPlayStarted = 0;
  }
}
// A75E70: using guessed type float SoundGroup::ms_fMasterGain;

//----- (0069F000) --------------------------------------------------------
void __thiscall SoundGroupAmbient::OnExitArea(SoundGroupAmbient *this, IAmbientArea *pkArea)
{
  SoundGroupAmbient *v2; // ebx@1
  MapAmbienceSoundInfo::SoundType v3; // eax@1
  NiAudioSource *v4; // esi@3
  NiRefObjectVtbl *v5; // edi@5
  float v6; // ST04_4@5
  NiTListItem<void *> *v7; // eax@7
  int v8; // edx@8
  _DWORD *v9; // esi@9
  NiTListItem<NiAudioSource *> *v10; // eax@12
  NiAudioSource *v11; // esi@13
  NiAudioSource *v12; // ecx@14
  NiD3DShaderInterface *v13; // eax@18
  SoundIndex rkIndex; // [sp+18h] [bp-8h]@5

  v2 = this;
  v3 = pkArea->m_eSoundType;
  if ( v3 )
  {
    if ( v3 == 1 )
    {
      v7 = this->m_k3DAmbient.m_kUniqueSourceList.m_pkTail;
      if ( v7 )
      {
        v8 = pkArea->m_iIndex;
        while ( 1 )
        {
          v9 = v7->m_element;
          pkArea = (IAmbientArea *)v7;
          v7 = v7->m_pkNext;
          if ( v8 == *v9 )
            break;
          if ( !v7 )
            return;
        }
        v10 = SoundGroupDynamic::GetPlayingSourceList((SoundGroupDynamic *)&this->m_kPlayingSourceList.m_kAllocator)->m_pkHead;
        if ( v10 )
        {
          v11 = (NiAudioSource *)v9[1];
          while ( 1 )
          {
            v12 = v10->m_element;
            v10 = v10->m_pkNext;
            if ( v12 == v11 )
              break;
            if ( !v10 )
              goto LABEL_18;
          }
          ((void (*)(void))v12->vfptr[55].__vecDelDtor)();
        }
LABEL_18:
        v13 = NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
                (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&v2->m_k3DAmbient.m_kUniqueSourceList.m_pkHead,
                (void **)&pkArea);
        operator delete(v13);
      }
    }
  }
  else if ( pkArea->m_iIndex >= 0 )
  {
    v4 = SoundGroupStatic::GetSoundDirectly(
           (SoundGroupStatic *)&this[-1].m_k3DAmbient.m_kAmbientSourceRecycleList,
           pkArea->m_iIndex);
    if ( v4 )
    {
      if ( ((int (__thiscall *)(NiAudioSource *))v4->vfptr[57].__vecDelDtor)(v4) == 1 )
      {
        v5 = v4->vfptr;
        v6 = NiGetCurrentTimeInSec();
        ((void (__thiscall *)(NiAudioSource *, _DWORD, _DWORD, _DWORD))v5[49].__vecDelDtor)(v4, 0.0, LODWORD(v6), 3.0);
        ((void (__thiscall *)(NiAudioSource *))v4->vfptr[55].__vecDelDtor)(v4);
        rkIndex.m_dwIndex = pkArea->m_iIndex;
        rkIndex.m_acFilename = 0;
        SoundGroupStatic::UnloadSound((SoundGroupStatic *)&v2[-1].m_k3DAmbient.m_kAmbientSourceRecycleList, &rkIndex);
      }
    }
  }
}

//----- (0069F120) --------------------------------------------------------
void __thiscall SoundGroupBgm::SoundGroupBgm(SoundGroupBgm *this)
{
  SoundGroupBgm *v1; // esi@1

  v1 = this;
  SoundGroupStatic::SoundGroupStatic((SoundGroupStatic *)&this->vfptr);
  v1->vfptr = (SoundGroupVtbl *)&SoundGroupBgm::`vftable';
  v1->m_kNextBgmFn._Mysize = 0;
  v1->m_kNextBgmFn._Myres = 15;
  v1->m_kNextBgmFn._Bx._Buf[0] = 0;
  v1->m_fDurationToFade = 6.0;
  v1->m_fPlayEndTime = -1.0;
  v1->m_iOldSourceIndex = 1;
  v1->m_bCrossFade = 1;
  *(_WORD *)&v1->m_bRandomPlayOn = 0;
  v1->m_fBgmVol = 0.0;
  v1->m_iCurrSourceIndex = 0;
  v1->m_uiBgmCount = 0;
  v1->m_eState = 5;
  v1->m_kCurrPlayingMapID = -1;
}
// 9BE2CC: using guessed type int (__stdcall *SoundGroupBgm::`vftable')(NiPointer<NiAudioSource> *result, unsigned int uiType);

//----- (0069F190) --------------------------------------------------------
void __thiscall SoundGroupBgm::StopBGM(SoundGroupBgm *this)
{
  SoundGroupBgm *v1; // esi@1
  NiAudioSource *v2; // eax@3
  NiAudioSource *v3; // eax@5
  NiAudioSource *v4; // eax@6
  NiAudioSource *v5; // edi@6
  NiRefObjectVtbl *v6; // ebx@8
  float v7; // ST14_4@8
  float v8; // ST10_4@8
  NiAudioSource *v9; // eax@9
  NiAudioSource *v10; // edi@9
  NiRefObjectVtbl *v11; // ebx@11
  float v12; // ST14_4@11
  float v13; // ST10_4@11
  bool v14; // cf@12

  v1 = this;
  if ( 0.0 == this->m_fDurationToFade )
  {
    if ( SoundGroupStatic::GetSoundDirectly((SoundGroupStatic *)&this->vfptr, this->m_iCurrSourceIndex) )
    {
      v2 = SoundGroupStatic::GetSoundDirectly((SoundGroupStatic *)&v1->vfptr, v1->m_iCurrSourceIndex);
      ((void (__thiscall *)(NiAudioSource *))v2->vfptr[55].__vecDelDtor)(v2);
      v1->m_eState = 5;
    }
    if ( SoundGroupStatic::GetSoundDirectly((SoundGroupStatic *)&v1->vfptr, v1->m_iOldSourceIndex) )
    {
      v3 = SoundGroupStatic::GetSoundDirectly((SoundGroupStatic *)&v1->vfptr, v1->m_iOldSourceIndex);
      ((void (__thiscall *)(NiAudioSource *))v3->vfptr[55].__vecDelDtor)(v3);
      v1->m_eState = 5;
    }
  }
  else
  {
    v4 = SoundGroupStatic::GetSoundDirectly((SoundGroupStatic *)&this->vfptr, this->m_iCurrSourceIndex);
    v5 = v4;
    if ( v4 && ((int (__thiscall *)(NiAudioSource *))v4->vfptr[57].__vecDelDtor)(v4) == 1 )
    {
      v6 = v5->vfptr;
      v7 = v1->m_fDurationToFade;
      v8 = NiGetCurrentTimeInSec();
      ((void (__thiscall *)(NiAudioSource *, _DWORD, _DWORD, _DWORD))v6[49].__vecDelDtor)(
        v5,
        0.0,
        LODWORD(v8),
        LODWORD(v7));
      v1->m_eState = 2;
    }
    v9 = SoundGroupStatic::GetSoundDirectly((SoundGroupStatic *)&v1->vfptr, v1->m_iOldSourceIndex);
    v10 = v9;
    if ( v9 && ((int (__thiscall *)(NiAudioSource *))v9->vfptr[57].__vecDelDtor)(v9) == 1 )
    {
      v11 = v10->vfptr;
      v12 = v1->m_fDurationToFade;
      v13 = NiGetCurrentTimeInSec();
      ((void (__thiscall *)(NiAudioSource *, _DWORD, _DWORD, _DWORD))v11[49].__vecDelDtor)(
        v10,
        0.0,
        LODWORD(v13),
        LODWORD(v12));
      v1->m_eState = 2;
    }
  }
  *(_WORD *)&v1->m_bRandomPlayOn = 0;
  v14 = v1->m_kNextBgmFn._Myres < 0x10;
  v1->m_kNextBgmFn._Mysize = 0;
  if ( v14 )
    v1->m_kNextBgmFn._Bx._Buf[0] = 0;
  else
    *v1->m_kNextBgmFn._Bx._Ptr = 0;
}

//----- (0069F2C0) --------------------------------------------------------
unsigned int __thiscall SoundGroupAmbient::OnEnterArea(SoundGroupAmbient *this, IAmbientArea *pkArea)
{
  IAmbientArea *v2; // ebx@1
  MapAmbienceSoundInfo::SoundType v3; // eax@1
  void *v4; // edi@1
  unsigned int v5; // esi@2
  char *v7; // eax@6
  int (__thiscall *v8)(char *, void **, signed int, signed int); // eax@8
  NiAudioSource *v9; // eax@9
  NiAudioSource *v10; // ecx@9
  void *(__thiscall *v11)(NiRefObject *, unsigned int); // eax@9
  NiTListItem<void *> *v12; // eax@11
  char v13; // dl@11
  _DWORD *v14; // ecx@12
  NiTListItem<NiAudioSource *> *v15; // ecx@16
  NiRefObjectVtbl *v16; // eax@17
  const char *v17; // esi@17
  const char *v18; // eax@17
  const char *v19; // esi@17
  char v20; // cl@17
  int v21; // eax@24
  NiD3DXEffectParameter *v22; // edx@24
  int v23; // eax@24
  double v24; // st7@24
  bool v25; // cf@24
  char **v26; // eax@24
  int v27; // esi@26
  float (__thiscall *v28)(IAmbientArea *); // eax@27
  double v29; // st7@27
  bool v30; // zf@28
  float v31; // ST18_4@29
  int *v32; // eax@29
  double v33; // st7@29
  int v34; // edx@29
  NiPoint3 kPoint3; // [sp+28h] [bp-20h]@24
  char v36; // [sp+34h] [bp-14h]@24
  char **v37; // [sp+38h] [bp-10h]@26
  void *pkInfo; // [sp+3Ch] [bp-Ch]@8
  NiD3DXEffectParameter *element; // [sp+40h] [bp-8h]@1
  int iTimes; // [sp+44h] [bp-4h]@17
  float fRadiusa; // [sp+50h] [bp+8h]@9
  float fRadiusb; // [sp+50h] [bp+8h]@9
  float fRadius; // [sp+50h] [bp+8h]@27
  float fRadiusc; // [sp+50h] [bp+8h]@29
  float fRadiusd; // [sp+50h] [bp+8h]@29
  float fRadiuse; // [sp+50h] [bp+8h]@29

  v2 = pkArea;
  v3 = pkArea->m_eSoundType;
  v4 = this;
  element = (NiD3DXEffectParameter *)this;
  if ( v3 == ST_2D )
  {
    v5 = 0;
    if ( this[-1].m_k3DAmbient.m_kAmbientSourceRecycleList.m_pkHead )
    {
      while ( SoundGroupStatic::GetSoundDirectly((SoundGroupStatic *)v4 - 1, v5) )
      {
        if ( ++v5 >= *((_DWORD *)v4 - 15) )
          return 0;
      }
      v7 = pkArea->m_kSndFilename._Bx._Buf;
      if ( pkArea->m_kSndFilename._Myres >= 0x10 )
        v7 = *(char **)v7;
      SoundGroup::SetTable((SoundGroup *)((char *)v4 - 64), v5, v7);
      v8 = *(int (__thiscall **)(char *, void **, signed int, signed int))(*((_DWORD *)v4 - 16) + 24);
      pkInfo = (void *)v5;
      element = 0;
      if ( v8((char *)v4 - 64, &pkInfo, 1, 1) )
      {
        pkInfo = (void *)v5;
        element = 0;
        v9 = SoundGroupStatic::GetSound((SoundGroupStatic *)v4 - 1, (SoundIndex *)&pkInfo, 1);
        v10 = v9;
        v11 = v9->vfptr[47].__vecDelDtor;
        fRadiusa = (double)pkArea->m_iVolume * 0.009999999776482582;
        *((float *)v4 + v5 + 41) = fRadiusa;
        fRadiusb = fRadiusa * *((float *)v4 - 7) * SoundGroup::ms_fMasterGain;
        v11((NiRefObject *)&v10->vfptr, LODWORD(fRadiusb));
        return v5;
      }
    }
    return 0;
  }
  if ( v3 == 1 )
  {
    v12 = this->m_k3DAmbient.m_kUniqueSourceList.m_pkTail;
    v13 = 0;
    if ( !v12 )
      goto LABEL_24;
    do
    {
      v14 = v12->m_element;
      v12 = v12->m_pkNext;
      if ( *v14 == pkArea->m_iIndex )
        v13 = 1;
    }
    while ( v12 );
    if ( v13 && (v15 = SoundGroupDynamic::GetPlayingSourceList((SoundGroupDynamic *)((char *)v4 + 20))->m_pkHead) != 0 )
    {
      while ( 1 )
      {
        v16 = v15->m_element->vfptr;
        iTimes = (int)v15->m_pkNext;
        v17 = (const char *)((int (*)(void))v16[35].__vecDelDtor)();
        v18 = IAmbientArea::GetSndFilename(v2);
        v19 = &v17[strlen(v17) - strlen(v18)];
        v20 = *v18;
        if ( !*v18 )
          break;
        while ( v20 == *v19 )
        {
          v20 = (v18++)[1];
          ++v19;
          if ( !v20 )
            return 0;
        }
        v2 = pkArea;
        if ( !iTimes )
        {
          v4 = element;
          goto LABEL_24;
        }
        v15 = (NiTListItem<NiAudioSource *> *)iTimes;
      }
    }
    else
    {
LABEL_24:
      v21 = (int)v2->vfptr->GetCenter(v2, (NiPoint2 *)&v36);
      v22 = *(NiD3DXEffectParameter **)(v21 + 4);
      pkInfo = *(void **)v21;
      kPoint3.x = *(float *)&pkInfo;
      element = v22;
      kPoint3.y = *(float *)&v22;
      v23 = ((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
      v24 = *(float *)(v23 + 8);
      v25 = v2->m_kSndFilename._Myres < 0x10;
      kPoint3.z = *(float *)(v23 + 8);
      v26 = &v2->m_kSndFilename._Bx._Ptr;
      if ( !v25 )
        v26 = (char **)*v26;
      v37 = v26;
      v27 = (*(int (__thiscall **)(char *, char *, NiPoint3 *, signed int))(*((_DWORD *)v4 + 5) + 32))(
              (char *)v4 + 20,
              &v36,
              &kPoint3,
              1);
      if ( v27 )
      {
        v28 = v2->vfptr->GetRadius;
        iTimes = 8;
        v28(v2);
        fRadius = v24;
        v29 = fRadius;
        do
        {
          v30 = iTimes-- == 1;
          fRadius = fRadius * 0.5;
        }
        while ( !v30 );
        v31 = v29;
        fRadiusc = fRadius * SoundGroup::ms_fSoundMin;
        (*(void (__thiscall **)(int, _DWORD, _DWORD))(*(_DWORD *)v27 + 180))(v27, LODWORD(fRadiusc), LODWORD(v31));
        v32 = (int *)operator new(0xCu);
        *v32 = v2->m_iIndex;
        v32[1] = v27;
        v33 = (double)v2->m_iVolume;
        v34 = *(_DWORD *)v27;
        element = (NiD3DXEffectParameter *)v32;
        fRadiusd = v33 * 0.009999999776482582;
        *((float *)v32 + 2) = fRadiusd;
        fRadiuse = fRadiusd * *((float *)v4 - 7) * SoundGroup::ms_fMasterGain;
        (*(void (__thiscall **)(int, _DWORD))(v34 + 188))(v27, LODWORD(fRadiuse));
        NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)((char *)v4 + 148),
          &element);
      }
    }
    return 0;
  }
  return -1;
}
// A75E6C: using guessed type float SoundGroup::ms_fSoundMin;
// A75E70: using guessed type float SoundGroup::ms_fMasterGain;

//----- (0069F580) --------------------------------------------------------
bool __thiscall SoundGroupFieldEffect::Check3DSoundPlayable(SoundGroupFieldEffect *this, NiPoint3 *rkPoint)
{
  SoundGroupFieldEffect *v2; // ebx@1
  NiMilesListener *v3; // eax@2
  NiPoint3 *v4; // ecx@2
  NiTListItem<NiAudioSource *> *v5; // esi@3
  NiAudioSource *v6; // edi@4
  NiMilesListener *v7; // eax@4
  NiAudioSource *v8; // esi@9
  bool result; // al@12
  NiTListItem<NiAudioSource *> *currIter; // [sp+10h] [bp-24h]@4
  float fDistanceSqr; // [sp+14h] [bp-20h]@4
  float v12; // [sp+18h] [bp-1Ch]@4
  float v13; // [sp+1Ch] [bp-18h]@4
  float fTryingSourceDistance; // [sp+20h] [bp-14h]@2
  void *farthestIter; // [sp+24h] [bp-10h]@2
  int v16; // [sp+30h] [bp-4h]@11

  v2 = this;
  if ( (unsigned __int8)SoundGroup::IsChannelFull((SoundGroup *)&this->vfptr) )
  {
    v3 = NiMilesAudioSystem::GetListener(v2->m_pkAudioSystem);
    v4 = rkPoint;
    fTryingSourceDistance = rkPoint->x - v3->m_kWorld.m_Translate.x;
    *(float *)&rkPoint = rkPoint->y - v3->m_kWorld.m_Translate.y;
    *(float *)&farthestIter = v4->z - v3->m_kWorld.m_Translate.z;
    fTryingSourceDistance = *(float *)&rkPoint * *(float *)&rkPoint
                          + fTryingSourceDistance * fTryingSourceDistance
                          + *(float *)&farthestIter * *(float *)&farthestIter;
    if ( fTryingSourceDistance >= v2->m_fSoundMaxRange * v2->m_fSoundMaxRange )
      goto LABEL_17;
    v5 = v2->m_kPlayingSourceList.m_pkHead;
    *(float *)&rkPoint = 0.0;
    *(float *)&farthestIter = 0.0;
    if ( !v5 )
      goto LABEL_17;
    do
    {
      v6 = v5->m_element;
      currIter = v5;
      v5 = v5->m_pkNext;
      v7 = NiMilesAudioSystem::GetListener(v2->m_pkAudioSystem);
      v12 = v6->m_kWorld.m_Translate.x - v7->m_kWorld.m_Translate.x;
      v13 = v6->m_kWorld.m_Translate.y - v7->m_kWorld.m_Translate.y;
      fDistanceSqr = v6->m_kWorld.m_Translate.z - v7->m_kWorld.m_Translate.z;
      fDistanceSqr = v13 * v13 + v12 * v12 + fDistanceSqr * fDistanceSqr;
      if ( *(float *)&rkPoint < (double)fDistanceSqr )
      {
        *(float *)&rkPoint = fDistanceSqr;
        farthestIter = currIter;
      }
    }
    while ( v5 );
    if ( *(float *)&rkPoint > 0.0
      && fTryingSourceDistance < (double)*(float *)&rkPoint
      && (v8 = (NiAudioSource *)*((_DWORD *)farthestIter + 2)) != 0 )
    {
      ((void (__thiscall *)(_DWORD))v8->vfptr[55].__vecDelDtor)(*((_DWORD *)farthestIter + 2));
      if ( !v2->vfptr->IsUniqueSource((SoundGroup *)v2, (NiMilesSource *)v8) )
      {
        SoundGroupDynamic::PushInRecycleList((SoundGroupDynamic *)&v2->vfptr, v8);
        rkPoint = (NiPoint3 *)v8;
        InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
        v16 = 0;
        NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::Remove(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *)&v2->m_kActiveSourceList,
          (NiPointer<PgWin> *)&fDistanceSqr,
          (NiPointer<PgWin> *)&rkPoint);
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&fDistanceSqr);
        v16 = -1;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&rkPoint);
      }
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&v2->m_kPlayingSourceList,
        &farthestIter);
      result = 1;
    }
    else
    {
LABEL_17:
      result = 0;
    }
  }
  else
  {
    result = SoundGroup::IsOutofMaxRange((SoundGroup *)&v2->vfptr, rkPoint) == 0;
  }
  return result;
}

//----- (0069F7A0) --------------------------------------------------------
void __thiscall SoundGroupAmbient::ClearArea(SoundGroupAmbient *this)
{
  SoundGroupAmbient *v1; // esi@1
  NiTListItem<IAmbientArea *> *v2; // eax@2
  NiTListItem<IAmbientArea *> *v3; // ecx@2
  IAmbientArea *v4; // edi@5

  v1 = this;
  ((void (*)(void))this->vfptr->UnloadAllSound)();
  while ( v1->m_kAreaList.m_kAllocator.m_uiCount )
  {
    v2 = v1->m_kAreaList.m_pkHead;
    v3 = v2->m_pkNext;
    v1->m_kAreaList.m_pkHead = v2->m_pkNext;
    if ( v3 )
      v3->m_pkPrev = 0;
    else
      v1->m_kAreaList.m_pkTail = 0;
    v4 = v2->m_element;
    v1->m_kAreaList.vfptr->DeleteItem((NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *> *)&v1->m_kAreaList, v2);
    --v1->m_kAreaList.m_kAllocator.m_uiCount;
    if ( v4 )
    {
      if ( v4->m_kSndFilename._Myres >= 0x10 )
        operator delete(v4->m_kSndFilename._Bx._Ptr);
      v4->m_kSndFilename._Myres = 15;
      v4->m_kSndFilename._Mysize = 0;
      v4->m_kSndFilename._Bx._Buf[0] = 0;
      operator delete(v4);
    }
  }
}

//----- (0069F820) --------------------------------------------------------
void __thiscall SoundGroupAmbient::~SoundGroupAmbient(SoundGroupAmbient *this)
{
  SoundGroupAmbient *v1; // ebx@1
  NiTListItem<SoundGroupAmbient::PlayingAreaInfo *> *v2; // eax@2
  NiTListItem<SoundGroupAmbient::PlayingAreaInfo *> *v3; // ecx@2
  SoundGroupAmbient::PlayingAreaInfo *v4; // edi@5
  int v5; // esi@6
  NiTListItem<SoundGroupAmbient::PlayingAreaInfo *> **v6; // edi@6
  NiTListItem<SoundGroupAmbient::PlayingAreaInfo *> **v7; // ST00_4@7
  int v8; // esi@8
  NiTListItem<IAmbientArea *> **v9; // edi@8
  NiTListItem<IAmbientArea *> **v10; // ST00_4@9

  v1 = this;
  this->vfptr = (SoundGroupVtbl *)&SoundGroupAmbient::`vftable'{for `SoundGroupStatic'};
  this->vfptr = (IAmbientSoundManagerVtbl *)&SoundGroupAmbient::`vftable'{for `IAmbientSoundManager'};
  SoundGroupAmbient::ClearArea(this);
  while ( v1->m_kPlayingAreaList.m_kAllocator.m_uiCount )
  {
    v2 = v1->m_kPlayingAreaList.m_pkHead;
    v3 = v2->m_pkNext;
    v1->m_kPlayingAreaList.m_pkHead = v2->m_pkNext;
    if ( v3 )
      v3->m_pkPrev = 0;
    else
      v1->m_kPlayingAreaList.m_pkTail = 0;
    v4 = v2->m_element;
    v1->m_kPlayingAreaList.vfptr->DeleteItem(
      (NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *> *)&v1->m_kPlayingAreaList,
      v2);
    --v1->m_kPlayingAreaList.m_kAllocator.m_uiCount;
    operator delete(v4);
  }
  v5 = (int)&v1->m_kPlayingAreaList;
  v1->m_kPlayingAreaList.vfptr = (NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>Vtbl *)&NiTPointerListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>::`vftable';
  v6 = &v1->m_kPlayingAreaList.m_pkHead->m_pkNext;
  while ( v6 )
  {
    v7 = v6;
    v6 = (NiTListItem<SoundGroupAmbient::PlayingAreaInfo *> **)*v6;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v5 + 8))(&v1->m_kPlayingAreaList, v7);
  }
  v1->m_kPlayingAreaList.m_kAllocator.m_uiCount = 0;
  v1->m_kPlayingAreaList.m_pkHead = 0;
  v1->m_kPlayingAreaList.m_pkTail = 0;
  *(_DWORD *)v5 = &NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>::`vftable';
  SoundGroupDynamic::~SoundGroupDynamic((SoundGroupDynamic *)&v1->m_k3DAmbient.vfptr);
  v8 = (int)&v1->m_kAreaList;
  v1->m_kAreaList.vfptr = (NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *>Vtbl *)&NiTPointerListBase<DFALL<IAmbientArea *>,IAmbientArea *>::`vftable';
  v9 = &v1->m_kAreaList.m_pkHead->m_pkNext;
  while ( v9 )
  {
    v10 = v9;
    v9 = (NiTListItem<IAmbientArea *> **)*v9;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v8 + 8))(&v1->m_kAreaList, v10);
  }
  v1->m_kAreaList.m_kAllocator.m_uiCount = 0;
  v1->m_kAreaList.m_pkHead = 0;
  v1->m_kAreaList.m_pkTail = 0;
  *(_DWORD *)v8 = &NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *>::`vftable';
  SoundGroupStatic::~SoundGroupStatic((SoundGroupStatic *)&v1->vfptr);
}
// 9BE258: using guessed type int (__thiscall *NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *>::`vftable')(void *p, char);
// 9BE268: using guessed type int (__thiscall *NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>::`vftable')(void *p, char);
// 9BE2A8: using guessed type int (__thiscall *NiTPointerListBase<DFALL<IAmbientArea *>,IAmbientArea *>::`vftable')(void *p, char);
// 9BE2B8: using guessed type int (__thiscall *NiTPointerListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>::`vftable')(void *p, char);
// 9BE33C: using guessed type int (__thiscall *SoundGroupAmbient::`vftable'{for `IAmbientSoundManager'})(SoundGroupAmbient *this, struct IAmbientArea *);
// 9BE34C: using guessed type int (__stdcall *SoundGroupAmbient::`vftable'{for `SoundGroupStatic'})(NiPointer<NiAudioSource> *result, unsigned int uiType);

//----- (0069F970) --------------------------------------------------------
void __thiscall IAmbientArea::SetSndFilename(IAmbientArea *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *rkSndFn)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &this->m_kSndFilename,
    rkSndFn,
    0,
    0xFFFFFFFF);
}

//----- (0069F990) --------------------------------------------------------
void __thiscall SoundGroupAmbient::LoadAreaTable(SoundGroupAmbient *this, char *pcFn)
{
  char *v2; // eax@3
  unsigned int v3; // esi@4
  char *v4; // edi@5
  _DWORD *v5; // eax@7
  _DWORD *v6; // esi@8
  float v7; // ST20_4@10
  char *v8; // eax@10
  float v9; // ST28_4@10
  double v10; // st7@10
  float v11; // ST30_4@10
  char v12; // dl@11
  int v13; // edx@14
  int v14; // ecx@15
  int v15; // eax@17
  _DWORD *v16; // ecx@17
  SoundGroupAmbient *v17; // [sp+14h] [bp-3Ch]@1
  unsigned int i; // [sp+1Ch] [bp-34h]@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Right; // [sp+24h] [bp-2Ch]@10
  int v20; // [sp+4Ch] [bp-4h]@12

  v17 = this;
  SoundGroupAmbient::ClearArea(this);
  if ( !Folder::m_bInit )
    Folder::Init();
  v2 = fs("%s\\AmbienceSound\\%s.shn", &Folder::m_acSystem, pcFn);
  if ( ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::Load(v2) )
  {
    v3 = 0;
    i = 0;
    if ( ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::GetTotal() )
    {
      do
      {
        v4 = CDataReader::GetRecord(
               (CDataReader *)(ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::ms_pkTable + 4),
               v3);
        if ( *((float *)v4 + 35) > -0.0000099999997 && *((float *)v4 + 35) < 0.0000099999997 )
        {
          v5 = operator new(0x40u);
          if ( v5 )
          {
            v5[6] = 15;
            v5[5] = 0;
            *((_BYTE *)v5 + 4) = 0;
            *((_BYTE *)v5 + 44) = 0;
            v5[12] = 0;
            v5[10] = 0;
            v5[8] = 100;
            *v5 = &CircleAmbientArea::`vftable';
            v6 = v5;
          }
          else
          {
            v6 = 0;
          }
          v7 = *((float *)v4 + 32);
          v8 = v4 + 32;
          v9 = *((float *)v4 + 33);
          _Right._Myres = 15;
          v10 = *((float *)v4 + 34);
          _Right._Mysize = 0;
          v11 = v10;
          _Right._Bx._Buf[0] = 0;
          *((float *)v6 + 13) = v7;
          *((float *)v6 + 14) = v9;
          *((float *)v6 + 15) = v11;
          do
            v12 = *v8++;
          while ( v12 );
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Right, v4 + 32, v8 - (v4 + 33));
          v20 = 0;
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
            (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)(v6 + 1),
            &_Right,
            0,
            0xFFFFFFFF);
          v20 = -1;
          if ( _Right._Myres >= 0x10 )
            operator delete(_Right._Bx._Ptr);
          v13 = *((_DWORD *)v4 + 37);
          _Right._Myres = 15;
          _Right._Mysize = 0;
          _Right._Bx._Buf[0] = 0;
          v6[8] = v13;
          if ( v17 )
            v14 = (int)&v17->vfptr;
          else
            v14 = 0;
          v6[12] = v14;
          v6[9] = *((_DWORD *)v4 + 38);
          v15 = (int)v17->m_kAreaList.vfptr->NewItem((NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *> *)&v17->m_kAreaList);
          *(_DWORD *)(v15 + 8) = v6;
          *(_DWORD *)v15 = 0;
          *(_DWORD *)(v15 + 4) = v17->m_kAreaList.m_pkTail;
          v16 = &v17->m_kAreaList.m_pkTail->m_pkNext;
          if ( v16 )
            *v16 = v15;
          else
            v17->m_kAreaList.m_pkHead = (NiTListItem<IAmbientArea *> *)v15;
          ++v17->m_kAreaList.m_kAllocator.m_uiCount;
          v3 = i;
          v17->m_kAreaList.m_pkTail = (NiTListItem<IAmbientArea *> *)v15;
        }
        i = ++v3;
      }
      while ( v3 < ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::GetTotal() );
    }
    if ( ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::ms_pkTable )
    {
      (**(void (***)(void))ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::ms_pkTable)();
      if ( ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::ms_pkTable )
        (*(void (__stdcall **)(signed int))(*(_DWORD *)ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::ms_pkTable
                                          + 8))(1);
      ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::ms_pkTable = 0;
    }
  }
}
// 9BE32C: using guessed type bool (__thiscall *CircleAmbientArea::`vftable')(CircleAmbientArea *this, float dy, float);
// A8975C: using guessed type bool Folder::m_bInit;
// B4F5B0: using guessed type int ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::ms_pkTable;

//----- (0069FBD0) --------------------------------------------------------
void __thiscall SoundGroupBgm::PlayBGM(SoundGroupBgm *this, char *acFn, int bLoop, float fBgmVol)
{
  SoundGroupBgm *v4; // esi@1
  bool v5; // cf@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v6; // edi@1
  const char *v7; // eax@2
  NiAudioSource *v8; // edi@10
  NiRefObjectVtbl *v9; // ebx@13
  float v10; // ST28_4@13
  float v11; // ST24_4@13
  unsigned int v12; // ecx@14
  int v13; // eax@14
  char *v14; // ST28_4@14
  NiAudioSource *v15; // edi@16
  NiRefObjectVtbl *v16; // ebx@17
  float v17; // ST28_4@17
  double v18; // st7@17
  void *(__thiscall *v19)(NiRefObject *, unsigned int); // eax@17
  float v20; // ST24_4@17
  NiAudioSource *(__thiscall *v21)(SoundGroup *, SoundIndex *, bool, bool); // edx@17
  SoundIndex v22; // [sp+3Ch] [bp-144h]@16
  int v23; // [sp+44h] [bp-13Ch]@17
  int v24; // [sp+48h] [bp-138h]@17
  SoundIndex rkIndex; // [sp+4Ch] [bp-134h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Right; // [sp+54h] [bp-12Ch]@5
  char temp[256]; // [sp+70h] [bp-110h]@7
  int v28; // [sp+17Ch] [bp-4h]@5

  v4 = this;
  v5 = this->m_kNextBgmFn._Myres < 0x10;
  v6 = &this->m_kNextBgmFn;
  rkIndex.m_acFilename = acFn;
  if ( v5 )
    v7 = this->m_kNextBgmFn._Bx._Buf;
  else
    v7 = v6->_Bx._Ptr;
  if ( _strcmpi(acFn, v7) )
  {
    v4->m_fBgmVol = fBgmVol;
    _Right._Myres = 15;
    _Right._Mysize = 0;
    _Right._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Right, acFn, strlen(acFn));
    v28 = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(v6, &_Right);
    v28 = -1;
    if ( _Right._Myres >= 0x10 )
      operator delete(_Right._Bx._Ptr);
    temp[0] = 0;
    memset(&temp[1], 0, 0xFFu);
    OutputDebugStringA("************************************************************************\n");
    if ( v6->_Myres >= 0x10 )
      v6 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v6->_Bx._Ptr;
    sprintf(temp, "*************** name%s**************************\n", v6);
    OutputDebugStringA("************************************************************************\n");
    OutputDebugStringA(temp);
    if ( v4->m_bEnable )
    {
      OutputDebugStringA("-----------------------enable skipeed---------------------\n");
      v8 = SoundGroupStatic::GetSoundDirectly((SoundGroupStatic *)&v4->vfptr, v4->m_iCurrSourceIndex);
      if ( v8
        && ((int (__thiscall *)(NiAudioSource *))v8->vfptr[57].__vecDelDtor)(v8) == 1
        && 0.0 != v4->m_fDurationToFade )
      {
        v9 = v8->vfptr;
        v10 = v4->m_fDurationToFade;
        v11 = NiGetCurrentTimeInSec();
        ((void (__thiscall *)(NiAudioSource *, _DWORD, _DWORD, _DWORD))v9[49].__vecDelDtor)(
          v8,
          0.0,
          LODWORD(v11),
          LODWORD(v10));
        if ( v4->m_bCrossFade )
        {
          v12 = v4->m_iOldSourceIndex;
          v13 = v4->m_iCurrSourceIndex;
          v14 = rkIndex.m_acFilename;
          v4->m_iCurrSourceIndex = v12;
          v4->m_iOldSourceIndex = v13;
          SoundGroup::SetTable((SoundGroup *)&v4->vfptr, v12, v14);
          if ( SoundGroupStatic::GetSoundDirectly((SoundGroupStatic *)&v4->vfptr, v4->m_iCurrSourceIndex) )
          {
            rkIndex.m_dwIndex = v4->m_iCurrSourceIndex;
            rkIndex.m_acFilename = 0;
            SoundGroupStatic::UnloadSound((SoundGroupStatic *)&v4->vfptr, &rkIndex);
          }
          v22.m_dwIndex = v4->m_iCurrSourceIndex;
          v22.m_acFilename = 0;
          v15 = SoundGroupStatic::GetSound((SoundGroupStatic *)&v4->vfptr, &v22, 1);
          if ( v15 )
          {
            v15->vfptr[47].__vecDelDtor((NiRefObject *)v15, COERCE_UNSIGNED_INT(0.000099999997));
            v16 = v15->vfptr;
            v17 = v4->m_fDurationToFade;
            v18 = NiGetCurrentTimeInSec();
            v19 = v16[49].__vecDelDtor;
            v20 = v18;
            *(float *)&rkIndex.m_acFilename = v4->m_fGain * v4->m_fBgmVol * SoundGroup::ms_fMasterGain;
            ((void (__thiscall *)(NiAudioSource *, char *, _DWORD, _DWORD))v19)(
              v15,
              rkIndex.m_acFilename,
              LODWORD(v20),
              LODWORD(v17));
            v21 = v4->vfptr->PlaySoundA;
            v23 = v4->m_iCurrSourceIndex;
            v24 = 0;
            v21((SoundGroup *)&v4->vfptr, (SoundIndex *)&v23, bLoop, 1);
            v15->vfptr[47].__vecDelDtor((NiRefObject *)v15, COERCE_UNSIGNED_INT(0.000099999997));
            v4->m_eState = 4;
            v4->m_bPlayStarted = 1;
          }
        }
        else
        {
          v4->m_eState = 1;
        }
      }
      else
      {
        SoundGroupBgm::NextBgm(v4, bLoop);
      }
    }
  }
}
// A75E70: using guessed type float SoundGroup::ms_fMasterGain;

//----- (0069FEC0) --------------------------------------------------------
void __userpurge SoundGroupBgm::Update(SoundGroupBgm *this@<ecx>, double a2@<st0>, float fTime)
{
  SoundGroupBgm *v3; // esi@1
  NiAudioSource *v4; // eax@2
  NiAudioSource *v5; // eax@6
  NiAudioSource *v6; // edi@6
  SoundGroupBgm::State v7; // eax@9
  NiAudioSource *v8; // eax@10
  NiAudioSource *v9; // eax@14
  NiAudioSource *v10; // edi@14
  int v11; // eax@18
  MapViewInfo *v12; // eax@19
  MapViewInfo *v13; // edi@19
  unsigned int v14; // edx@20
  double v15; // st7@20
  unsigned int v16; // eax@21
  int v17; // eax@23
  SoundIndex rkIndex; // [sp+Ch] [bp-8h]@8

  v3 = this;
  if ( this->m_bEnable )
  {
    v4 = SoundGroupStatic::GetSoundDirectly((SoundGroupStatic *)&this->vfptr, this->m_iCurrSourceIndex);
    if ( v4 && ((int (__thiscall *)(NiAudioSource *))v4->vfptr[57].__vecDelDtor)(v4) != 1 && v3->m_bPlayStarted )
    {
      a2 = fTime;
      *(_WORD *)&v3->m_bRandomPlayOn = 1;
      v3->m_fPlayEndTime = fTime;
      v3->m_eState = 5;
    }
    v5 = SoundGroupStatic::GetSoundDirectly((SoundGroupStatic *)&v3->vfptr, v3->m_iOldSourceIndex);
    v6 = v5;
    if ( v5 )
    {
      ((void (__thiscall *)(NiAudioSource *))v5->vfptr[48].__vecDelDtor)(v5);
      if ( a2 < 0.0000099999997 )
      {
        ((void (__thiscall *)(NiAudioSource *))v6->vfptr[55].__vecDelDtor)(v6);
        rkIndex.m_dwIndex = v3->m_iOldSourceIndex;
        rkIndex.m_acFilename = 0;
        SoundGroupStatic::UnloadSound((SoundGroupStatic *)&v3->vfptr, &rkIndex);
        v3->m_eState = 5;
      }
    }
    v7 = v3->m_eState;
    if ( v7 == 1 )
    {
      v8 = SoundGroupStatic::GetSoundDirectly((SoundGroupStatic *)&v3->vfptr, v3->m_iCurrSourceIndex);
      if ( v8 )
      {
        ((void (__thiscall *)(NiAudioSource *))v8->vfptr[48].__vecDelDtor)(v8);
        if ( a2 < 0.0000099999997 )
          SoundGroupBgm::NextBgm(v3, 0);
      }
    }
    else if ( v7 == 2 )
    {
      v9 = SoundGroupStatic::GetSoundDirectly((SoundGroupStatic *)&v3->vfptr, v3->m_iCurrSourceIndex);
      v10 = v9;
      if ( v9 )
      {
        ((void (__thiscall *)(NiAudioSource *))v9->vfptr[48].__vecDelDtor)(v9);
        if ( a2 < 0.0000099999997 )
        {
          ((void (__thiscall *)(NiAudioSource *))v10->vfptr[55].__vecDelDtor)(v10);
          v3->m_eState = 5;
        }
      }
    }
    if ( !v3->m_bRandomPlayOn )
      goto LABEL_33;
    v11 = v3->m_kCurrPlayingMapID;
    if ( (_WORD)v11 == -1 )
    {
      *(float *)&rkIndex.m_acFilename = fTime - v3->m_fPlayEndTime;
      if ( *(float *)&rkIndex.m_acFilename <= 180.0 )
        goto LABEL_33;
      if ( rand() % 3 != 1 )
      {
        v3->m_fPlayEndTime = fTime;
        goto LABEL_33;
      }
    }
    else
    {
      v12 = IIDTableBase<MapViewInfo,MapViewInfoTab,unsigned short>::GetByID(v11);
      v13 = v12;
      if ( !v12 )
        goto LABEL_33;
      v14 = 274877907 * (unsigned __int64)v12->BGMDlyTime >> 32;
      *(float *)&rkIndex.m_acFilename = fTime - v3->m_fPlayEndTime;
      v15 = *(float *)&rkIndex.m_acFilename;
      rkIndex.m_acFilename = (char *)(((signed int)v14 >> 6) + (v14 >> 31));
      if ( (double)(signed int)rkIndex.m_acFilename >= v15 )
        goto LABEL_33;
      v16 = rand() % v3->m_uiBgmCount;
      if ( v16 != v3->m_uiCurrPlayingBgmIndex )
      {
        v3->m_uiCurrPlayingBgmIndex = v16;
        if ( !v16 )
        {
          SoundGroupBgm::PlayBGM(v3, v13->BGM_Name_01, 0, 1.0);
          v3->m_bRandomPlayOn = 0;
          goto LABEL_33;
        }
        v17 = v16 - 1;
        if ( !v17 )
        {
          SoundGroupBgm::PlayBGM(v3, v13->BGM_Name_02, 0, 1.0);
          v3->m_bRandomPlayOn = 0;
          goto LABEL_33;
        }
        if ( v17 == 1 )
        {
          SoundGroupBgm::PlayBGM(v3, v13->BGM_Name_03, 0, 1.0);
          v3->m_bRandomPlayOn = 0;
LABEL_33:
          SoundGroup::Update((SoundGroup *)&v3->vfptr, fTime);
          return;
        }
LABEL_31:
        v3->m_bRandomPlayOn = 0;
        goto LABEL_33;
      }
    }
    SoundGroupBgm::NextBgm(v3, 0);
    goto LABEL_31;
  }
}

//----- (006A0110) --------------------------------------------------------
void __thiscall SoundGroupBgm::PlayBGM(SoundGroupBgm *this, int id, int bLoop)
{
  SoundGroupBgm *v3; // esi@1
  int v4; // edi@2
  int *v5; // eax@4
  int v6; // edi@5
  unsigned int v7; // eax@14
  int v8; // eax@15

  v3 = this;
  if ( this->m_bEnable )
  {
    this->m_fBgmVol = 1.0;
    v4 = ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable
                                                          + 16))(
                            ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable,
                            id) )
    {
      if ( (unsigned __int16)id <= *(_WORD *)(v4 + 200) )
      {
        v5 = (int *)(*(_DWORD *)(v4 + 196) + 4 * (unsigned __int16)id);
        if ( *v5 )
        {
          v6 = *v5;
          if ( *v5 )
          {
            v3->m_kCurrPlayingMapID = id;
            if ( *(_BYTE *)(v6 + 14) == 45 )
            {
              v3->m_uiBgmCount = 0;
            }
            else if ( *(_BYTE *)(v6 + 46) == 45 )
            {
              v3->m_uiBgmCount = 1;
            }
            else if ( *(_BYTE *)(v6 + 78) == 45 )
            {
              v3->m_uiBgmCount = 2;
            }
            else
            {
              v3->m_uiBgmCount = 3;
            }
            if ( v3->m_uiBgmCount )
            {
              v3->m_fBgmVol = (double)*(unsigned int *)(v6 + 164) / 100.0;
              v7 = rand() % v3->m_uiBgmCount;
              v3->m_uiCurrPlayingBgmIndex = v7;
              if ( v7 )
              {
                v8 = v7 - 1;
                if ( v8 )
                {
                  if ( v8 == 1 )
                    SoundGroupBgm::PlayBGM(v3, (char *)(v6 + 78), bLoop, v3->m_fBgmVol);
                }
                else
                {
                  SoundGroupBgm::PlayBGM(v3, (char *)(v6 + 46), bLoop, v3->m_fBgmVol);
                }
              }
              else
              {
                SoundGroupBgm::PlayBGM(v3, (char *)(v6 + 14), bLoop, v3->m_fBgmVol);
              }
            }
          }
        }
      }
    }
  }
}
// A8C270: using guessed type int ITableBase<MapViewInfo,MapViewInfoTab>::ms_pkTable;

//----- (006A0250) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,void *>::~NiTListBase<NiTPointerAllocator<unsigned int>,void *>(NiTListBase<NiTPointerAllocator<unsigned int>,void *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,void *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,void *>::`vftable';
}
// 9BE238: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,void *>::`vftable')(void *p, char);

//----- (006A0260) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::~NiTListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>(NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> > *this)
{
  this->vfptr = (NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> >Vtbl *)&NiTListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`vftable';
}
// 9BE248: using guessed type int (__thiscall *NiTListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`vftable')(void *p, char);

//----- (006A0270) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *>::~NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *>(NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *> *this)
{
  this->vfptr = (NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *>Vtbl *)&NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *>::`vftable';
}
// 9BE258: using guessed type int (__thiscall *NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *>::`vftable')(void *p, char);

//----- (006A0280) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>::~NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>(NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *> *this)
{
  this->vfptr = (NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>Vtbl *)&NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>::`vftable';
}
// 9BE268: using guessed type int (__thiscall *NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>::`vftable')(void *p, char);

//----- (006A0290) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,void *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,void *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,void *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,void *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,void *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,void *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BE238: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,void *>::`vftable')(void *p, char);

//----- (006A02C0) --------------------------------------------------------
NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> > *__thiscall NiTListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`scalar deleting destructor'(NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> > *this, unsigned int a2)
{
  NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> > *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> >Vtbl *)&NiTListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BE248: using guessed type int (__thiscall *NiTListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`vftable')(void *p, char);

//----- (006A02F0) --------------------------------------------------------
NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *> *__thiscall NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *>::`vector deleting destructor'(NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *> *this, unsigned int a2)
{
  NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *>Vtbl *)&NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BE258: using guessed type int (__thiscall *NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *>::`vftable')(void *p, char);

//----- (006A0320) --------------------------------------------------------
NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *> *__thiscall NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>::`vector deleting destructor'(NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *> *this, unsigned int a2)
{
  NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>Vtbl *)&NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BE268: using guessed type int (__thiscall *NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>::`vftable')(void *p, char);

//----- (006A0350) --------------------------------------------------------
unsigned int __cdecl ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// B4F5B0: using guessed type int ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::ms_pkTable;

//----- (006A0370) --------------------------------------------------------
void __thiscall NiTPointerList<void *>::~NiTPointerList<void *>(SpTList<void *> *this)
{
  SpTList<void *> *v1; // edi@1
  NiTListItem<void *> *v2; // esi@1
  NiTListItem<void *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,void *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,void *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,void *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,void *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,void *>::`vftable';
}
// 9BE238: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,void *>::`vftable')(void *p, char);
// 9BE278: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,void *>::`vftable')(void *p, char);

//----- (006A03F0) --------------------------------------------------------
NiTPointerListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> > *__thiscall NiTPointerListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`vector deleting destructor'(NiTPointerListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> > *this, unsigned int a2)
{
  NiTPointerListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> > *v2; // edi@1
  NiTListItem<NiPointer<NiAudioSource> > *v3; // esi@1
  NiTListItem<NiPointer<NiAudioSource> > *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> >Vtbl *)&NiTPointerListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> > *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> >Vtbl *)&NiTListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BE248: using guessed type int (__thiscall *NiTListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`vftable')(void *p, char);
// 9BE288: using guessed type int (__thiscall *NiTPointerListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`vftable')(void *p, char);

//----- (006A0480) --------------------------------------------------------
MapAmbienceSoundInfoTab *__thiscall ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::`vector deleting destructor'(MapAmbienceSoundInfoTab *this, unsigned int a2)
{
  MapAmbienceSoundInfoTab *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>Vtbl *)&ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BE298: using guessed type int (__cdecl *ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (006A0500) --------------------------------------------------------
NiTPointerListBase<DFALL<IAmbientArea *>,IAmbientArea *> *__thiscall NiTPointerListBase<DFALL<IAmbientArea *>,IAmbientArea *>::`scalar deleting destructor'(NiTPointerListBase<DFALL<IAmbientArea *>,IAmbientArea *> *this, unsigned int a2)
{
  NiTPointerListBase<DFALL<IAmbientArea *>,IAmbientArea *> *v2; // edi@1
  NiTListItem<IAmbientArea *> *v3; // esi@1
  NiTListItem<IAmbientArea *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *>Vtbl *)&NiTPointerListBase<DFALL<IAmbientArea *>,IAmbientArea *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *>Vtbl *)&NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BE258: using guessed type int (__thiscall *NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *>::`vftable')(void *p, char);
// 9BE2A8: using guessed type int (__thiscall *NiTPointerListBase<DFALL<IAmbientArea *>,IAmbientArea *>::`vftable')(void *p, char);

//----- (006A0590) --------------------------------------------------------
NiTPointerListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *> *__thiscall NiTPointerListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>::`vector deleting destructor'(NiTPointerListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *> *this, unsigned int a2)
{
  NiTPointerListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *> *v2; // edi@1
  NiTListItem<SoundGroupAmbient::PlayingAreaInfo *> *v3; // esi@1
  NiTListItem<SoundGroupAmbient::PlayingAreaInfo *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>Vtbl *)&NiTPointerListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem(
      (NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *> *)v2,
      v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>Vtbl *)&NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BE268: using guessed type int (__thiscall *NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>::`vftable')(void *p, char);
// 9BE2B8: using guessed type int (__thiscall *NiTPointerListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>::`vftable')(void *p, char);

//----- (006A0620) --------------------------------------------------------
void __thiscall NiTList<IAmbientArea *>::~NiTList<IAmbientArea *>(NiTList<IAmbientArea *> *this)
{
  NiTList<IAmbientArea *> *v1; // edi@1
  NiTListItem<IAmbientArea *> *v2; // esi@1
  NiTListItem<IAmbientArea *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *>Vtbl *)&NiTPointerListBase<DFALL<IAmbientArea *>,IAmbientArea *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *>Vtbl *)&NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *>::`vftable';
}
// 9BE258: using guessed type int (__thiscall *NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *>::`vftable')(void *p, char);
// 9BE2A8: using guessed type int (__thiscall *NiTPointerListBase<DFALL<IAmbientArea *>,IAmbientArea *>::`vftable')(void *p, char);

//----- (006A06A0) --------------------------------------------------------
void __thiscall NiTList<SoundGroupAmbient::PlayingAreaInfo *>::~NiTList<SoundGroupAmbient::PlayingAreaInfo *>(NiTList<SoundGroupAmbient::PlayingAreaInfo *> *this)
{
  NiTList<SoundGroupAmbient::PlayingAreaInfo *> *v1; // edi@1
  NiTListItem<SoundGroupAmbient::PlayingAreaInfo *> *v2; // esi@1
  NiTListItem<SoundGroupAmbient::PlayingAreaInfo *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>Vtbl *)&NiTPointerListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem(
      (NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *> *)v1,
      v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>Vtbl *)&NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>::`vftable';
}
// 9BE268: using guessed type int (__thiscall *NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>::`vftable')(void *p, char);
// 9BE2B8: using guessed type int (__thiscall *NiTPointerListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>::`vftable')(void *p, char);

//----- (006A0720) --------------------------------------------------------
void __thiscall NiTList<NiPointer<NiAudioSource>>::~NiTList<NiPointer<NiAudioSource>>(NiTList<NiPointer<NiAudioSource> > *this)
{
  NiTList<NiPointer<NiAudioSource> > *v1; // edi@1
  NiTListItem<NiPointer<NiAudioSource> > *v2; // esi@1
  NiTListItem<NiPointer<NiAudioSource> > *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> >Vtbl *)&NiTPointerListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> > *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> >Vtbl *)&NiTListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`vftable';
}
// 9BE248: using guessed type int (__thiscall *NiTListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`vftable')(void *p, char);
// 9BE288: using guessed type int (__thiscall *NiTPointerListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`vftable')(void *p, char);

//----- (006A07A0) --------------------------------------------------------
char *__thiscall IAmbientArea::GetSndFilename(IAmbientArea *this)
{
  char *result; // eax@1

  result = this->m_kSndFilename._Bx._Buf;
  if ( this->m_kSndFilename._Myres >= 0x10 )
    result = *(char **)result;
  return result;
}

//----- (006A07B0) --------------------------------------------------------
void __thiscall SoundGroupDynamic::~SoundGroupDynamic(SoundGroupDynamic *this)
{
  char *v1; // esi@1
  NiTListItem<NiPointer<NiAudioSource> > *v2; // edi@1
  NiTListItem<NiPointer<NiAudioSource> > *v3; // ST00_4@2
  char *v4; // esi@4
  NiTListItem<NiPointer<NiAudioSource> > *v5; // edi@4
  NiTListItem<NiPointer<NiAudioSource> > *v6; // ST00_4@5
  char *v7; // esi@7
  NiTListItem<NiPointer<NiAudioSource> > *v8; // edi@7
  NiTListItem<NiPointer<NiAudioSource> > *v9; // ST00_4@8
  char *v10; // esi@10
  NiTListItem<void *> *v11; // edi@10
  NiTListItem<void *> *v12; // ST00_4@11
  SoundGroupDynamic *v13; // [sp+14h] [bp-10h]@1

  v13 = this;
  v1 = (char *)&this->m_k3DSourceRecycleList;
  this->m_k3DSourceRecycleList.vfptr = (NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> >Vtbl *)&NiTPointerListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`vftable';
  v2 = this->m_k3DSourceRecycleList.m_pkHead;
  if ( v2 )
  {
    do
    {
      v3 = v2;
      v2 = v2->m_pkNext;
      (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v1 + 8))(v1, v3);
    }
    while ( v2 );
    this = v13;
  }
  *((_DWORD *)v1 + 3) = 0;
  *((_DWORD *)v1 + 1) = 0;
  *((_DWORD *)v1 + 2) = 0;
  *(_DWORD *)v1 = &NiTListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`vftable';
  v4 = (char *)&this->m_kAmbientSourceRecycleList;
  this->m_kAmbientSourceRecycleList.vfptr = (NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> >Vtbl *)&NiTPointerListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`vftable';
  v5 = this->m_kAmbientSourceRecycleList.m_pkHead;
  if ( v5 )
  {
    do
    {
      v6 = v5;
      v5 = v5->m_pkNext;
      (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v4 + 8))(v4, v6);
    }
    while ( v5 );
    this = v13;
  }
  *((_DWORD *)v4 + 3) = 0;
  *((_DWORD *)v4 + 1) = 0;
  *((_DWORD *)v4 + 2) = 0;
  *(_DWORD *)v4 = &NiTListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`vftable';
  v7 = (char *)&this->m_kActiveSourceList;
  this->m_kActiveSourceList.vfptr = (NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> >Vtbl *)&NiTPointerListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`vftable';
  v8 = this->m_kActiveSourceList.m_pkHead;
  if ( v8 )
  {
    do
    {
      v9 = v8;
      v8 = v8->m_pkNext;
      (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v7 + 8))(v7, v9);
    }
    while ( v8 );
    this = v13;
  }
  *((_DWORD *)v7 + 3) = 0;
  *((_DWORD *)v7 + 1) = 0;
  *((_DWORD *)v7 + 2) = 0;
  *(_DWORD *)v7 = &NiTListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`vftable';
  v10 = (char *)&this->m_kUniqueSourceList;
  this->m_kUniqueSourceList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,void *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,void *>::`vftable';
  v11 = this->m_kUniqueSourceList.m_pkHead;
  if ( v11 )
  {
    do
    {
      v12 = v11;
      v11 = v11->m_pkNext;
      (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v10 + 8))(v10, v12);
    }
    while ( v11 );
    this = v13;
  }
  *((_DWORD *)v10 + 3) = 0;
  *((_DWORD *)v10 + 1) = 0;
  *((_DWORD *)v10 + 2) = 0;
  *(_DWORD *)v10 = &NiTListBase<NiTPointerAllocator<unsigned int>,void *>::`vftable';
  SoundGroup::~SoundGroup((SoundGroup *)&this->vfptr);
}
// 9BE238: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,void *>::`vftable')(void *p, char);
// 9BE248: using guessed type int (__thiscall *NiTListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`vftable')(void *p, char);
// 9BE278: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,void *>::`vftable')(void *p, char);
// 9BE288: using guessed type int (__thiscall *NiTPointerListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::`vftable')(void *p, char);

//----- (006A08F0) --------------------------------------------------------
void __thiscall MapAmbienceSoundInfoTab::MapAmbienceSoundInfoTab(MapAmbienceSoundInfoTab *this)
{
  MapAmbienceSoundInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>Vtbl *)&ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_MapAmbienceSoundInfo_MapAmbienceSoundInfoTab_::ITableBase_MapAmbienceSoundInfo_MapAmbienceSoundInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->vfptr = (ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>Vtbl *)&MapAmbienceSoundInfoTab::`vftable';
}
// 9BE298: using guessed type int (__cdecl *ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 9BE31C: using guessed type int (__cdecl *MapAmbienceSoundInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// B4F5B0: using guessed type int ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::ms_pkTable;
// B4F5B4: using guessed type int `ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>'::`2'::`local static guard';

//----- (006A0930) --------------------------------------------------------
SoundGroupBgm *__thiscall SoundGroupBgm::`vector deleting destructor'(SoundGroupBgm *this, unsigned int a2)
{
  SoundGroupBgm *v2; // esi@1

  v2 = this;
  if ( this->m_kNextBgmFn._Myres >= 0x10 )
    operator delete(this->m_kNextBgmFn._Bx._Ptr);
  v2->m_kNextBgmFn._Myres = 15;
  v2->m_kNextBgmFn._Mysize = 0;
  v2->m_kNextBgmFn._Bx._Buf[0] = 0;
  SoundGroupStatic::~SoundGroupStatic((SoundGroupStatic *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006A0980) --------------------------------------------------------
bool __cdecl ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  MapAmbienceSoundInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::ms_pkTable;
  if ( !ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::ms_pkTable )
  {
    v2 = (MapAmbienceSoundInfoTab *)operator new(0xC4u);
    if ( v2 )
      MapAmbienceSoundInfoTab::MapAmbienceSoundInfoTab(v2);
    else
      v1 = 0;
    ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read(
         (CDataReader *)(ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::ms_pkTable + 4),
         acFn)
    && (v3 = *(_DWORD **)(ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 1054 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// B4F5B0: using guessed type int ITableBase<MapAmbienceSoundInfo,MapAmbienceSoundInfoTab>::ms_pkTable;

//----- (006A0A70) --------------------------------------------------------
SoundGroupAmbient *__thiscall SoundGroupAmbient::`vector deleting destructor'(SoundGroupAmbient *this, unsigned int a2)
{
  SoundGroupAmbient *v2; // esi@1

  v2 = this;
  SoundGroupAmbient::~SoundGroupAmbient(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006A0AA0) --------------------------------------------------------
void __thiscall SoundMgr::SetDistFactor(SoundMgr *this, float fVal)
{
  this->m_fDistanceFactor = fVal;
}

//----- (006A0AB0) --------------------------------------------------------
void __thiscall SoundMgr::TerminateSoundGroups(SoundMgr *this)
{
  SoundMgr *v1; // esi@1
  SoundGroupBgm *v2; // ecx@1
  SoundGroupFieldEffect *v3; // ecx@3
  SoundGroupInterface *v4; // ecx@5
  SoundGroupAmbient *v5; // ecx@7
  SoundGroup3DAmbient *v6; // ecx@9
  SoundGroupMainChar *v7; // ecx@11
  SoundGroupNPCVoice *v8; // ecx@13

  v1 = this;
  v2 = this->m_pkBGMGroup;
  if ( v2 )
    ((void (__stdcall *)(_DWORD))v2->vfptr->~SoundGroup)(1);
  v3 = v1->m_pkEffectGroup;
  v1->m_pkBGMGroup = 0;
  if ( v3 )
    ((void (__stdcall *)(_DWORD))v3->vfptr->~SoundGroup)(1);
  v4 = v1->m_pkInterfaceGroup;
  v1->m_pkEffectGroup = 0;
  if ( v4 )
    ((void (__stdcall *)(_DWORD))v4->vfptr->~SoundGroup)(1);
  v5 = v1->m_pkAmbientGroup;
  v1->m_pkInterfaceGroup = 0;
  if ( v5 )
    ((void (__stdcall *)(_DWORD))v5->vfptr->~SoundGroup)(1);
  v6 = v1->m_pk3DAmbientGroup;
  v1->m_pkAmbientGroup = 0;
  if ( v6 )
    ((void (__stdcall *)(_DWORD))v6->vfptr->~SoundGroup)(1);
  v7 = v1->m_pkMainCharGroup;
  v1->m_pk3DAmbientGroup = 0;
  if ( v7 )
    ((void (__stdcall *)(_DWORD))v7->vfptr->~SoundGroup)(1);
  v8 = v1->m_pkNPCVoiceGroup;
  v1->m_pkMainCharGroup = 0;
  if ( v8 )
    ((void (__stdcall *)(_DWORD))v8->vfptr->~SoundGroup)(1);
  v1->m_pkNPCVoiceGroup = 0;
}

//----- (006A0B40) --------------------------------------------------------
void __thiscall SoundMgr::Enable(SoundMgr *this, int b)
{
  this->m_bEnable = b;
  SoundGroup::SetEnableWholeGroup(b);
}

//----- (006A0B60) --------------------------------------------------------
bool __thiscall SoundMgr::GetEnable(SoundMgr *this)
{
  return this->m_bEnable;
}

//----- (006A0B70) --------------------------------------------------------
void __thiscall SoundMgr::PlayBGM(SoundMgr *this, int id)
{
  SoundGroupBgm *v2; // ecx@1

  v2 = this->m_pkBGMGroup;
  if ( v2 )
    SoundGroupBgm::PlayBGM(v2, id, 0);
}

//----- (006A0B90) --------------------------------------------------------
char __thiscall SoundMgr::PlayBGM(SoundMgr *this, char *pcFileName)
{
  SoundGroupBgm *v2; // ecx@1

  v2 = this->m_pkBGMGroup;
  if ( v2 )
    SoundGroupBgm::PlayBGM(v2, pcFileName, 1, 1.0);
  return 1;
}

//----- (006A0BC0) --------------------------------------------------------
char __thiscall SoundMgr::PlayBGM(SoundMgr *this, char *pcFileName, int bLoop)
{
  SoundGroupBgm *v3; // ecx@1

  v3 = this->m_pkBGMGroup;
  if ( v3 )
    SoundGroupBgm::PlayBGM(v3, pcFileName, bLoop, 1.0);
  return 1;
}

//----- (006A0BF0) --------------------------------------------------------
void __thiscall SoundMgr::StopBGM(SoundMgr *this)
{
  SoundGroupBgm *v1; // ecx@1

  v1 = this->m_pkBGMGroup;
  if ( v1 )
    SoundGroupBgm::StopBGM(v1);
}

//----- (006A0C30) --------------------------------------------------------
NiMilesListener *__thiscall SoundMgr::GetListener(SoundMgr *this)
{
  return this->m_pkListener;
}

//----- (006A0C40) --------------------------------------------------------
NiAudioSource *__userpurge SoundMgr::Create3DSource@<eax>(SoundMgr *this@<ecx>, int a2@<esi>, char *pcFileName, bool bLoop, float fMin, float fMax)
{
  NiAudioSource *v6; // esi@3
  bool v7; // zf@4
  NiRefObjectVtbl *v8; // eax@4
  NiAudioSource *result; // eax@6
  int v10; // [sp+18h] [bp-4h]@3

  if ( this->m_pkAudioSystem && this->m_bEnable )
  {
    v10 = a2;
    v6 = (NiAudioSource *)((int (__stdcall *)(_DWORD))this->m_pkAudioSystem->vfptr[17].__vecDelDtor)(0);
    if ( !v6 )
      return 0;
    ((void (__thiscall *)(NiAudioSource *, char *, int))v6->vfptr[34].__vecDelDtor)(v6, pcFileName, v10);
    v6->vfptr[32].__vecDelDtor((NiRefObject *)v6, 0);
    v7 = (unsigned __int8)((int (__thiscall *)(NiAudioSource *))v6->vfptr[37].__vecDelDtor)(v6) == 0;
    v8 = v6->vfptr;
    if ( v7 )
    {
      ((void (__thiscall *)(NiAudioSource *))v8->__vecDelDtor)(v6);
      return 0;
    }
    v8[47].__vecDelDtor((NiRefObject *)v6, COERCE_UNSIGNED_INT(1.0));
    ((void (__thiscall *)(NiAudioSource *, _DWORD, _DWORD))v6->vfptr[45].__vecDelDtor)(v6, LODWORD(fMin), LODWORD(fMax));
    ((void (__thiscall *)(NiAudioSource *))v6->vfptr[52].__vecDelDtor)(v6);
    result = v6;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 6A0C40: could not find valid save-restore pair for esi

//----- (006A0D10) --------------------------------------------------------
unsigned int __thiscall SoundMgr::AllocateChannel(SoundMgr *this, unsigned int dwChannelCount)
{
  unsigned int result; // eax@1

  result = this->m_dwAvailableChannelCount;
  if ( this->m_dwAvailableChannelCount < dwChannelCount )
  {
    this->m_dwAvailableChannelCount = 0;
  }
  else
  {
    this->m_dwAvailableChannelCount = result - dwChannelCount;
    result = dwChannelCount;
  }
  return result;
}

//----- (006A0D30) --------------------------------------------------------
void __thiscall SoundMgr::ReleaseChannel(SoundMgr *this, unsigned int dwChannelCount)
{
  this->m_dwAvailableChannelCount += dwChannelCount;
}

//----- (006A0D40) --------------------------------------------------------
void __stdcall SoundMgr::SetMasterVolume(float fVol)
{
  SoundGroup::SetMasterGain(fVol);
}

//----- (006A0D60) --------------------------------------------------------
void __thiscall SoundMgr::MuteSound(SoundMgr *this, bool b)
{
  if ( this->m_pkBGMGroup )
  {
    if ( b == 1 )
    {
      this->m_fOldMasterVolume = SoundGroup::GetMasterGain();
      SoundGroup::SetMasterGain(0.0);
    }
    else
    {
      SoundGroup::SetMasterGain(this->m_fOldMasterVolume);
    }
  }
}

//----- (006A0DB0) --------------------------------------------------------
void __thiscall SoundMgr::SetAmbientVolumeSync(SoundMgr *this)
{
  SoundGroupAmbient *v1; // ecx@1

  v1 = this->m_pkAmbientGroup;
  if ( v1 )
    SoundGroupAmbient::SetAmbientVolumeSync(v1);
}

//----- (006A0DC0) --------------------------------------------------------
void __thiscall SoundMgr::HoldSound(SoundMgr *this, bool b)
{
  SoundMgr *v2; // esi@1

  v2 = this;
  if ( b == 1 )
  {
    if ( this->m_pkBGMGroup )
    {
      ((void (__stdcall *)(_DWORD))this->m_pkBGMGroup->vfptr->SetEnable)(1);
      ((void (__stdcall *)(_DWORD))v2->m_pkAmbientGroup->vfptr->SetEnable)(1);
      ((void (__stdcall *)(_DWORD))v2->m_pk3DAmbientGroup->vfptr->SetEnable)(1);
      ((void (__stdcall *)(_DWORD))v2->m_pkEffectGroup->vfptr->SetEnable)(1);
      ((void (__stdcall *)(_DWORD))v2->m_pkInterfaceGroup->vfptr->SetEnable)(1);
      ((void (__stdcall *)(_DWORD))v2->m_pkMainCharGroup->vfptr->SetEnable)(1);
      ((void (__stdcall *)(_DWORD))v2->m_pkNPCVoiceGroup->vfptr->SetEnable)(1);
      SoundGroup::StopAllSoundWholeGroup();
    }
  }
  else if ( this->m_pkBGMGroup )
  {
    ((void (__stdcall *)(_DWORD))this->m_pkBGMGroup->vfptr->SetEnable)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkAmbientGroup->vfptr->SetEnable)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pk3DAmbientGroup->vfptr->SetEnable)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkEffectGroup->vfptr->SetEnable)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkInterfaceGroup->vfptr->SetEnable)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkMainCharGroup->vfptr->SetEnable)(0);
    ((void (__stdcall *)(_DWORD))v2->m_pkNPCVoiceGroup->vfptr->SetEnable)(0);
    SoundGroup::StopAllSoundWholeGroup();
  }
}

//----- (006A0EA0) --------------------------------------------------------
void __thiscall SoundMgr::Terminate(SoundMgr *this)
{
  SoundMgr *v1; // ebx@1
  NiTListItem<NiPointer<NiAudioSource> > **v2; // edi@1
  NiTListItem<NiPointer<NiAudioSource> > *v3; // ST00_4@2
  NiNode *v4; // esi@3
  NiAudioSource *v5; // esi@8
  NiAudioSystem *v6; // eax@13

  v1 = this;
  SoundGroup::StopAllSoundWholeGroup();
  v2 = &v1->m_kList.m_pkHead->m_pkNext;
  while ( v2 )
  {
    v3 = (NiTListItem<NiPointer<NiAudioSource> > *)v2;
    v2 = (NiTListItem<NiPointer<NiAudioSource> > **)*v2;
    v1->m_kList.vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> > *)&v1->m_kList,
      v3);
  }
  v1->m_kList.m_kAllocator.m_uiCount = 0;
  v1->m_kList.m_pkHead = 0;
  v1->m_kList.m_pkTail = 0;
  v4 = v1->m_spListeneerNode.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spListeneerNode.m_pObject = 0;
  }
  v5 = v1->m_spBGM.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spBGM.m_pObject = 0;
  }
  v1->m_pkListener = 0;
  v1->m_pkAudioSystem = 0;
  SoundMgr::TerminateSoundGroups(v1);
  SoundGroup::TerminateWholeGroup();
  v6 = NiAudioSystem::GetAudioSystem();
  ((void (__thiscall *)(_DWORD))v6->vfptr[16].__vecDelDtor)(v6);
}

//----- (006A0F50) --------------------------------------------------------
NiAudioSource *__userpurge SoundMgr::CreateAmbientSource@<eax>(SoundMgr *this@<ecx>, int a2@<edi>, char *pcFileName, bool bLoop)
{
  NiAudioSource *v4; // esi@3
  int v5; // ST0C_4@6
  NiRefObjectVtbl *v6; // edi@6
  char *v7; // eax@6
  bool v8; // zf@6
  NiRefObjectVtbl *v9; // eax@6
  NiAudioSource *result; // eax@8

  if ( this->m_pkAudioSystem && this->m_bEnable )
  {
    v4 = (NiAudioSource *)((int (__stdcall *)(signed int))this->m_pkAudioSystem->vfptr[17].__vecDelDtor)(1);
    if ( !v4 )
      return 0;
    if ( !Folder::m_bInit )
      Folder::Init();
    v5 = a2;
    v6 = v4->vfptr;
    v7 = Folder::Merge(&Folder::m_acSound, pcFileName);
    ((void (__thiscall *)(NiAudioSource *, char *, int))v6[34].__vecDelDtor)(v4, v7, v5);
    v4->vfptr[32].__vecDelDtor((NiRefObject *)v4, 0);
    v8 = (unsigned __int8)((int (__thiscall *)(NiAudioSource *))v4->vfptr[37].__vecDelDtor)(v4) == 0;
    v9 = v4->vfptr;
    if ( v8 )
    {
      ((void (__thiscall *)(NiAudioSource *))v9->__vecDelDtor)(v4);
      return 0;
    }
    ((void (__thiscall *)(NiAudioSource *))v9[47].__vecDelDtor)(v4);
    if ( bLoop )
      v4->vfptr[52].__vecDelDtor((NiRefObject *)v4, 0);
    result = v4;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 6A0F50: could not find valid save-restore pair for edi
// 6A0F50: could not find valid save-restore pair for esi
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006A1010) --------------------------------------------------------
void __thiscall SoundMgr::PlayInterfaceSound(SoundMgr *this, SoundGroupInterface::SndIndex eSndIndex)
{
  SoundGroupInterface *v2; // ecx@1
  SoundIndex rkIndex; // [sp+0h] [bp-8h]@1

  v2 = this->m_pkInterfaceGroup;
  rkIndex.m_dwIndex = eSndIndex;
  rkIndex.m_acFilename = 0;
  SoundGroupStatic::PlaySoundA((SoundGroupStatic *)&v2->vfptr, &rkIndex, 0, 0);
}

//----- (006A1040) --------------------------------------------------------
void __thiscall SoundMgr::PlayInterfaceSound(SoundMgr *this, char *pcFileName)
{
  SoundGroupInterface::PlaySoundDynamic(this->m_pkInterfaceGroup, pcFileName);
}

//----- (006A1050) --------------------------------------------------------
void __thiscall SoundMgr::SetBgVolume(SoundMgr *this, float fVol)
{
  ((void (__stdcall *)(_DWORD))this->m_pkBGMGroup->vfptr->SetGain)(LODWORD(fVol));
}

//----- (006A1070) --------------------------------------------------------
void __thiscall SoundMgr::SetEffectVolume(SoundMgr *this, float fVol)
{
  SoundMgr *v2; // esi@1

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkEffectGroup->vfptr->SetGain)(LODWORD(fVol));
  ((void (__stdcall *)(_DWORD))v2->m_pkInterfaceGroup->vfptr->SetGain)(LODWORD(fVol));
  ((void (__stdcall *)(_DWORD))v2->m_pkNPCVoiceGroup->vfptr->SetGain)(LODWORD(fVol));
  ((void (__stdcall *)(_DWORD))v2->m_pkMainCharGroup->vfptr->SetGain)(LODWORD(fVol));
}

//----- (006A10C0) --------------------------------------------------------
void __thiscall SoundMgr::SetVoiceVolume(SoundMgr *this, float fVol)
{
  ((void (__stdcall *)(_DWORD))this->m_pkNPCVoiceGroup->vfptr->SetGain)(LODWORD(fVol));
}

//----- (006A10E0) --------------------------------------------------------
void __thiscall SoundMgr::SetEnvEffectVolume(SoundMgr *this, float fVol)
{
  SoundMgr *v2; // esi@1

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkAmbientGroup->vfptr->SetGain)(LODWORD(fVol));
  ((void (__stdcall *)(_DWORD))v2->m_pk3DAmbientGroup->vfptr->SetGain)(LODWORD(fVol));
}

//----- (006A1110) --------------------------------------------------------
int __cdecl GetNpcVoiceFileCount(char *pcFileName)
{
  int v1; // edi@1
  const char *v2; // eax@4
  _iobuf *v3; // eax@4

  v1 = 0;
  while ( 1 )
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    v2 = fs("%s\\%s%02d.wav", &Folder::m_acSound, pcFileName, v1 + 1);
    v3 = fopen(v2, "rb");
    if ( !v3 )
      break;
    ++v1;
    fclose(v3);
  }
  return v1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006A1170) --------------------------------------------------------
void __thiscall SoundMgr::PlayNPCVoice(SoundMgr *this, unsigned __int16 id)
{
  SoundMgr *v2; // ebx@1
  int v3; // esi@2
  int *v4; // eax@4
  int v5; // eax@5
  unsigned int v6; // esi@6
  unsigned int v7; // edx@7
  SoundGroupNPCVoice *v8; // esi@7
  char v9; // [sp+8h] [bp-110h]@7
  char *v10; // [sp+Ch] [bp-10Ch]@7
  char acFileName[260]; // [sp+10h] [bp-108h]@6

  v2 = this;
  if ( this->m_bNPCVoiceExist )
  {
    v3 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable + 16))(
                            ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                            id) )
    {
      if ( id <= *(_WORD *)(v3 + 200) )
      {
        v4 = (int *)(*(_DWORD *)(v3 + 196) + 4 * id);
        if ( *v4 )
        {
          v5 = *v4;
          if ( v5 )
          {
            sprintf(acFileName, "resvoice\\%s\\%s", v5 + 2, v5 + 2);
            v6 = GetNpcVoiceFileCount(acFileName);
            if ( v6 )
            {
              v7 = rand() % v6;
              v8 = v2->m_pkNPCVoiceGroup;
              v10 = fs("%s%02d.wav", acFileName, v7 + 1);
              v8->vfptr->PlaySoundA((SoundGroup *)v8, (SoundIndex *)&v9, 1, 0);
            }
          }
        }
      }
    }
  }
}
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;

//----- (006A1250) --------------------------------------------------------
void __thiscall SoundMgr::PlayGenderVoice(SoundMgr *this, char *pcFileName)
{
  SoundMgr *v2; // edi@1
  SoundGroupNPCVoice *v3; // ecx@6
  char v4; // [sp+8h] [bp-110h]@6
  char *v5; // [sp+Ch] [bp-10Ch]@6
  char acFileName[260]; // [sp+10h] [bp-108h]@3

  v2 = this;
  if ( pcFileName )
  {
    if ( User::GetMainCharGender(&g_kUser) )
    {
      if ( User::GetMainCharGender(&g_kUser) == 1 )
        sprintf(acFileName, "MaleVoice\\%s.wav", pcFileName);
    }
    else
    {
      sprintf(acFileName, "FemaleVoice\\%s.wav", pcFileName);
    }
    v3 = v2->m_pkNPCVoiceGroup;
    v5 = acFileName;
    ((void (__stdcall *)(char *, signed int, _DWORD))v3->vfptr->PlaySoundA)(&v4, 1, 0);
  }
}

//----- (006A12F0) --------------------------------------------------------
void __thiscall SoundMgr::PlayItemDropSound(SoundMgr *this, int id, NiPoint3 *rkPos)
{
  int v3; // esi@1
  SoundMgr *v4; // ebx@1
  int *v5; // eax@3
  int v6; // eax@4
  char *v7; // eax@5
  SoundGroupFieldEffect *v8; // ecx@5
  char v9; // [sp+Ch] [bp-8h]@5
  char *v10; // [sp+10h] [bp-4h]@5

  v3 = ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;
  v4 = this;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable,
                          id) )
  {
    if ( (unsigned __int16)id <= *(_WORD *)(v3 + 200) )
    {
      v5 = (int *)(*(_DWORD *)(v3 + 196) + 4 * (unsigned __int16)id);
      if ( *v5 )
      {
        v6 = *v5;
        if ( v6 )
        {
          v7 = fs("%s.wav", v6 + 280);
          v8 = v4->m_pkEffectGroup;
          v10 = v7;
          ((void (__stdcall *)(char *, NiPoint3 *, _DWORD))v8->vfptr->Play3DSound)(&v9, rkPos, 0);
        }
      }
    }
  }
}
// A8C298: using guessed type int ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;

//----- (006A1370) --------------------------------------------------------
void __stdcall SoundMgr::PlayItemPutSound(int id)
{
  int v2; // esi@1
  int *v3; // eax@3
  int v4; // eax@4

  v2 = ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable,
                          id) )
  {
    if ( (unsigned __int16)id <= *(_WORD *)(v2 + 200) )
    {
      v3 = (int *)(*(_DWORD *)(v2 + 196) + 4 * (unsigned __int16)id);
      if ( *v3 )
      {
        v4 = *v3;
        if ( v4 )
          SoundGroupInterface::PlaySoundDynamic(g_kSoundMgr.m_pkInterfaceGroup, (char *)(v4 + 344));
      }
    }
  }
}
// A8C298: using guessed type int ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;

//----- (006A13D0) --------------------------------------------------------
void __stdcall SoundMgr::PlayItemEquipSound(int id)
{
  int v2; // esi@1
  int *v3; // eax@3
  int v4; // eax@4

  v2 = ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable,
                          id) )
  {
    if ( (unsigned __int16)id <= *(_WORD *)(v2 + 200) )
    {
      v3 = (int *)(*(_DWORD *)(v2 + 196) + 4 * (unsigned __int16)id);
      if ( *v3 )
      {
        v4 = *v3;
        if ( v4 )
          SoundGroupInterface::PlaySoundDynamic(g_kSoundMgr.m_pkInterfaceGroup, (char *)(v4 + 312));
      }
    }
  }
}
// A8C298: using guessed type int ITableBase<ItemViewInfo,ItemViewInfoTab>::ms_pkTable;

//----- (006A1430) --------------------------------------------------------
void __thiscall SoundMgr::~SoundMgr(SoundMgr *this)
{
  char *v1; // esi@1
  NiTListItem<NiPointer<NiAudioSource> > *v2; // edi@1
  NiTListItem<NiPointer<NiAudioSource> > *v3; // ST00_4@2
  NiAudioSource *v4; // esi@3
  NiNode *v5; // esi@7
  SoundMgr *v6; // [sp+14h] [bp-10h]@1

  v6 = this;
  v1 = (char *)&this->m_kList;
  this->m_kList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> >Vtbl *)&PgTList<NiPointer<NiAudioSource>>::`vftable';
  v2 = this->m_kList.m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v1 + 8))(v1, v3);
  }
  *((_DWORD *)v1 + 3) = 0;
  *((_DWORD *)v1 + 1) = 0;
  *((_DWORD *)v1 + 2) = 0;
  *(_DWORD *)v1 = &NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::`vftable';
  v4 = v6->m_spBGM.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v5 = v6->m_spListeneerNode.m_pObject;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
  {
    if ( v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  }
}
// 9BE470: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::`vftable')(void *p, char);
// 9BE524: using guessed type int (__thiscall *PgTList<NiPointer<NiAudioSource>>::`vftable')(void *p, char);

//----- (006A1500) --------------------------------------------------------
void __thiscall SoundMgr::CreateSound(SoundMgr *this, ActionEffectInfo *pkInfo, NiPoint3 *kPos)
{
  SoundMgr *v3; // esi@1
  char v4; // cl@2
  char *v5; // eax@6
  SoundGroupFieldEffect *v6; // ecx@6
  char v7; // [sp+8h] [bp-Ch]@6
  char *v8; // [sp+Ch] [bp-8h]@6

  v3 = this;
  if ( pkInfo )
  {
    v4 = pkInfo->SoundFile[0];
    if ( v4 != 45 && v4 != 48 && v4 != 32 )
    {
      if ( v3->m_pkEffectGroup )
      {
        v5 = fs("%s.wav", pkInfo->SoundFile);
        v6 = v3->m_pkEffectGroup;
        v8 = v5;
        ((void (__stdcall *)(char *, NiPoint3 *, _DWORD))v6->vfptr->Play3DSound)(&v7, kPos, 0);
      }
    }
  }
}

//----- (006A1570) --------------------------------------------------------
void __thiscall SoundMgr::CreateSound(SoundMgr *this, char *pcSndName, NiPoint3 *kPos)
{
  SoundMgr *v3; // esi@1
  char *v4; // eax@2
  SoundGroupFieldEffect *v5; // ecx@2
  char v6; // [sp+8h] [bp-Ch]@2
  char *v7; // [sp+Ch] [bp-8h]@2

  v3 = this;
  if ( this->m_pkEffectGroup )
  {
    v4 = fs("%s.wav", pcSndName);
    v5 = v3->m_pkEffectGroup;
    v7 = v4;
    ((void (__stdcall *)(char *, NiPoint3 *, _DWORD))v5->vfptr->Play3DSound)(&v6, kPos, 0);
  }
}

//----- (006A15D0) --------------------------------------------------------
void __thiscall SoundMgr::SoundMgr(SoundMgr *this)
{
  SoundMgr *v1; // esi@1
  const char *v2; // eax@3

  v1 = this;
  this->m_spListeneerNode.m_pObject = 0;
  this->m_spBGM.m_pObject = 0;
  this->m_kList.m_kAllocator.m_uiCount = 0;
  this->m_kList.m_pkHead = 0;
  this->m_kList.m_pkTail = 0;
  this->m_kList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> >Vtbl *)&PgTList<NiPointer<NiAudioSource>>::`vftable';
  this->m_fDistanceFactor = 1.0;
  this->m_pkListener = 0;
  this->m_pkAudioSystem = 0;
  this->m_bBGMStart = 0.0;
  this->m_bEnable = 0;
  this->m_fOldMasterVolume = 0.0;
  this->m_bBGMPlayedAndDone = 0;
  this->m_pkBGMGroup = 0;
  this->m_pkEffectGroup = 0;
  this->m_pkInterfaceGroup = 0;
  this->m_pkAmbientGroup = 0;
  this->m_pk3DAmbientGroup = 0;
  this->m_pkMainCharGroup = 0;
  this->m_pkNPCVoiceGroup = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v2 = Folder::Merge(&Folder::m_acSound, "resvoice");
  v1->m_bNPCVoiceExist = GetFileAttributesA(v2) == 16;
}
// 9BE524: using guessed type int (__thiscall *PgTList<NiPointer<NiAudioSource>>::`vftable')(void *p, char);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006A1690) --------------------------------------------------------
void __thiscall SoundMgr::Update(SoundMgr *this, float fTime, NiCamera *pkCamera)
{
  SoundMgr *v3; // edi@1
  NiAudioSource *v4; // ecx@1
  NiAudioSource *v5; // ecx@8
  float v6; // eax@9
  float v7; // edx@12
  PgWin *v8; // esi@12
  NiRefObjectVtbl *v9; // eax@12
  NiCamera *v10; // esi@20
  NiMilesListener *v11; // eax@21
  float v12; // ecx@22
  float v13; // edx@22
  NiMilesListener *v14; // ecx@22
  NiMilesListener *v15; // ecx@22
  NiMilesAudioSystem *v16; // edi@23
  float v17; // [sp+2Ch] [bp-34h]@22
  float v18; // [sp+30h] [bp-30h]@22
  float v19; // [sp+34h] [bp-2Ch]@22
  NiPoint3 kPos; // [sp+38h] [bp-28h]@22
  PgWin *v21; // [sp+44h] [bp-1Ch]@14
  NiPointer<PgWin> result; // [sp+48h] [bp-18h]@13
  NiPointer<PgWin> element; // [sp+4Ch] [bp-14h]@13
  float fPastTimeSinceDone; // [sp+50h] [bp-10h]@6
  int v25; // [sp+5Ch] [bp-4h]@13
  NiCamera *pkCameraa; // [sp+6Ch] [bp+Ch]@22

  v3 = this;
  v4 = this->m_spBGM.m_pObject;
  if ( v4 )
  {
    if ( ((int (*)(void))v4->vfptr[57].__vecDelDtor)() != 1 && 0.0 != v3->m_bBGMStart )
    {
      v3->m_bBGMPlayedAndDone = 1;
      v3->m_fBGMDoneTime = fTime;
      v3->m_bBGMStart = 0.0;
    }
    if ( v3->m_bBGMPlayedAndDone )
    {
      fPastTimeSinceDone = fTime - v3->m_fBGMDoneTime;
      if ( fPastTimeSinceDone > 180.0 && rand() % 3 == 1 )
      {
        v5 = v3->m_spBGM.m_pObject;
        v3->m_bBGMStart = 1.0;
        v3->m_bBGMPlayedAndDone = 0;
        ((void (*)(void))v5->vfptr[54].__vecDelDtor)();
      }
    }
  }
  v6 = *(float *)&v3->m_kList.m_pkHead;
  if ( v6 != 0.0 )
  {
    while ( 1 )
    {
      v7 = *(float *)LODWORD(v6);
      v8 = *(PgWin **)(LODWORD(v6) + 8);
      v9 = v8->vfptr;
      fPastTimeSinceDone = v7;
      if ( ((int (__thiscall *)(PgWin *))v9[57].__vecDelDtor)(v8) != 1 )
      {
        ((void (__thiscall *)(PgWin *))v8->vfptr[55].__vecDelDtor)(v8);
        element.m_pObject = v8;
        InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
        v25 = 0;
        NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::Remove(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *)&v3->m_kList,
          &result,
          &element);
        if ( result.m_pObject )
        {
          v21 = result.m_pObject;
          if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
          {
            if ( v21 )
              ((void (__stdcall *)(signed int))v21->vfptr->__vecDelDtor)(1);
          }
        }
        v25 = -1;
        if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      }
      if ( fPastTimeSinceDone == 0.0 )
        break;
      v6 = fPastTimeSinceDone;
    }
  }
  v10 = pkCamera;
  if ( pkCamera )
  {
    v11 = v3->m_pkListener;
    if ( v11 )
    {
      v12 = pkCamera->m_kWorld.m_Translate.x;
      v13 = pkCamera->m_kWorld.m_Translate.y;
      pkCameraa = (NiCamera *)LODWORD(v3->m_fDistanceFactor);
      kPos.x = v12;
      kPos.z = v10->m_kWorld.m_Translate.z;
      kPos.x = v12 * *(float *)&pkCameraa;
      v11->m_kLocal.m_Translate = kPos;
      kPos.y = v13 * *(float *)&pkCameraa;
      kPos.z = *(float *)&pkCameraa * kPos.z;
      v14 = v3->m_pkListener;
      kPos.x = v10->m_kWorld.m_Rotate.m_pEntry[0][1];
      kPos.y = v10->m_kWorld.m_Rotate.m_pEntry[1][1];
      kPos.z = v10->m_kWorld.m_Rotate.m_pEntry[2][1];
      ((void (__stdcall *)(NiPoint3 *))v14->vfptr[32].__vecDelDtor)(&kPos);
      v15 = v3->m_pkListener;
      v17 = v10->m_kWorld.m_Rotate.m_pEntry[0][0];
      v18 = v10->m_kWorld.m_Rotate.m_pEntry[1][0];
      v19 = v10->m_kWorld.m_Rotate.m_pEntry[2][0];
      ((void (__stdcall *)(float *))v15->vfptr[30].__vecDelDtor)(&v17);
      NiAVObject::Update((NiAVObject *)&v3->m_pkListener->vfptr, fTime, 1);
      ((void (*)(void))v3->m_pkListener->vfptr[34].__vecDelDtor)();
      NiAVObject::Update((NiAVObject *)&v3->m_spListeneerNode.m_pObject->vfptr, fTime, 1);
    }
  }
  v16 = v3->m_pkAudioSystem;
  if ( v16 )
    ((void (__thiscall *)(NiMilesAudioSystem *, _DWORD, signed int))v16->vfptr[22].__vecDelDtor)(v16, LODWORD(fTime), 1);
  SoundGroup::UpdateWholeGroup(fTime);
}

//----- (006A1900) --------------------------------------------------------
void __thiscall SoundMgr::CreateSound(SoundMgr *this, ActionEffectInfo *pkInfo, Char *pkCaster, Char *pkTarget)
{
  char v4; // al@2
  NiNode *v5; // eax@6
  NiPoint3 kPos; // [sp+0h] [bp-Ch]@7

  if ( pkInfo )
  {
    v4 = pkInfo->SoundFile[0];
    if ( v4 != 45 && v4 != 48 && v4 != 32 && pkCaster )
    {
      v5 = pkCaster->m_spScene.m_pObject;
      if ( v5 )
      {
        kPos.x = v5->m_kWorld.m_Translate.x;
        kPos.y = v5->m_kWorld.m_Translate.y;
        kPos.z = v5->m_kWorld.m_Translate.z;
        SoundMgr::CreateSound(this, pkInfo->SoundFile, &kPos);
      }
    }
  }
}

//----- (006A1960) --------------------------------------------------------
void __thiscall SoundMgr::CreateSound(SoundMgr *this, ActionInfo *pkInfo, int iIndex, Char *pkCaster, Char *pkTarget)
{
  Char *v5; // ebx@1
  bool v6; // zf@2
  signed int v7; // eax@2
  char *v8; // edx@5
  unsigned int v9; // esi@5
  NiNode *v10; // ecx@8
  Char *v11; // eax@8
  char *v12; // eax@34
  SoundGroupFieldEffect *v13; // ecx@34
  char v14; // [sp+Ch] [bp-1Ch]@34
  char *v15; // [sp+10h] [bp-18h]@34
  NiPoint3 kPos; // [sp+14h] [bp-14h]@33
  SoundMgr *v17; // [sp+20h] [bp-8h]@1

  v5 = pkTarget;
  v6 = pkInfo->SndRandPlay == 0;
  v17 = this;
  if ( v6 )
  {
    v9 = pkInfo->SndPos[iIndex];
    v8 = &pkInfo->InxName[32 * (iIndex + 8) + 6] + iIndex;
  }
  else
  {
    v7 = rand() & 0x80000001;
    v6 = v7 == 0;
    if ( v7 < 0 )
      v6 = (((_BYTE)v7 - 1) | 0xFFFFFFFE) == -1;
    if ( v6 )
    {
      v8 = pkInfo->SndFile[1];
      v9 = pkInfo->SndPos[1];
    }
    else
    {
      v8 = (char *)pkInfo->SndFile;
      v9 = pkInfo->SndPos[0];
    }
  }
  v10 = 0;
  v11 = 0;
  if ( !pkTarget )
    v5 = pkCaster;
  switch ( v9 )
  {
    case 0u:
    case 3u:
      if ( pkCaster != (Char *)-780 )
        v10 = pkCaster->m_kCharShape.m_apkLinkNode[1];
      v11 = pkCaster;
      goto LABEL_31;
    case 1u:
      if ( pkCaster != (Char *)-780 )
        v10 = pkCaster->m_kCharShape.m_apkLinkNode[5];
      v11 = pkCaster;
      goto LABEL_31;
    case 2u:
      if ( pkCaster != (Char *)-780 )
        v10 = pkCaster->m_kCharShape.m_apkLinkNode[11];
      v11 = pkCaster;
      goto LABEL_31;
    case 4u:
      if ( pkCaster != (Char *)-780 )
        v10 = pkCaster->m_kCharShape.m_apkLinkNode[17];
      v11 = pkCaster;
      goto LABEL_31;
    case 5u:
      if ( pkCaster != (Char *)-780 )
        v10 = pkCaster->m_kCharShape.m_apkLinkNode[18];
      v11 = pkCaster;
      goto LABEL_31;
    case 8u:
      v10 = pkCaster->m_spScene.m_pObject;
      v11 = pkCaster;
      goto LABEL_31;
    case 9u:
      v10 = v5->m_spScene.m_pObject;
      goto LABEL_30;
    case 6u:
    case 7u:
    case 0xAu:
      if ( v5 != (Char *)-780 )
        v10 = v5->m_kCharShape.m_apkLinkNode[5];
LABEL_30:
      v11 = v5;
LABEL_31:
      if ( !v10 )
        goto LABEL_32;
      break;
    default:
LABEL_32:
      v10 = v11->m_spScene.m_pObject;
      break;
  }
  kPos.x = v10->m_kWorld.m_Translate.x;
  kPos.y = v10->m_kWorld.m_Translate.y;
  v6 = v17->m_pkEffectGroup == 0;
  kPos.z = v10->m_kWorld.m_Translate.z;
  if ( !v6 )
  {
    v12 = fs("%s.wav", v8);
    v13 = v17->m_pkEffectGroup;
    v15 = v12;
    ((void (__stdcall *)(char *, NiPoint3 *, _DWORD))v13->vfptr->Play3DSound)(&v14, &kPos, 0);
  }
}

//----- (006A1B00) --------------------------------------------------------
BOOL __thiscall SoundMgr::InitializeSoundGroups(SoundMgr *this)
{
  SoundMgr *v1; // esi@1
  SoundGroupBgm *v2; // eax@1
  SoundGroupBgm *v3; // eax@2
  SoundGroupInterface *v4; // eax@6
  SoundGroupInterface *v5; // eax@7
  SoundGroupFieldEffect *v6; // eax@11
  SoundGroupFieldEffect *v7; // eax@12
  SoundGroupAmbient *v8; // eax@16
  SoundGroupAmbient *v9; // eax@17
  SoundGroup3DAmbient *v10; // eax@21
  SoundGroup3DAmbient *v11; // eax@22
  SoundGroupStatic *v12; // eax@26
  SoundGroupStatic *v13; // edi@26
  SoundGroupMainChar *v14; // ecx@27
  SoundGroupNPCVoice *v15; // eax@31
  SoundGroupNPCVoice *v16; // eax@32
  char bFailed; // [sp+33h] [bp-Dh]@1

  v1 = this;
  bFailed = 0;
  v2 = (SoundGroupBgm *)operator new(0x88u);
  if ( v2 )
    SoundGroupBgm::SoundGroupBgm(v2);
  else
    v3 = 0;
  v1->m_pkBGMGroup = v3;
  if ( !v3->vfptr->Initialize((SoundGroup *)v3, v1, 2u) )
    bFailed = 1;
  v4 = (SoundGroupInterface *)operator new(0xC0u);
  if ( v4 )
    SoundGroupInterface::SoundGroupInterface(v4);
  else
    v5 = 0;
  v1->m_pkInterfaceGroup = v5;
  if ( !v5->vfptr->Initialize((SoundGroup *)v5, v1, 6u) )
    bFailed |= 1u;
  v6 = (SoundGroupFieldEffect *)operator new(0x80u);
  if ( v6 )
    SoundGroupFieldEffect::SoundGroupFieldEffect(v6);
  else
    v7 = 0;
  v1->m_pkEffectGroup = v7;
  if ( !v7->vfptr->Initialize((SoundGroup *)v7, v1, 6u) )
    bFailed |= 1u;
  SoundGroup::SetMinDistance((SoundGroup *)&v1->m_pkEffectGroup->vfptr, 100.0);
  v8 = (SoundGroupAmbient *)operator new(0xF0u);
  if ( v8 )
    SoundGroupAmbient::SoundGroupAmbient(v8);
  else
    v9 = 0;
  v1->m_pkAmbientGroup = v9;
  if ( !v9->vfptr->Initialize((SoundGroup *)v9, v1, 8u) )
    bFailed |= 1u;
  v10 = (SoundGroup3DAmbient *)operator new(0x80u);
  if ( v10 )
    SoundGroup3DAmbient::SoundGroup3DAmbient(v10);
  else
    v11 = 0;
  v1->m_pk3DAmbientGroup = v11;
  if ( !v11->vfptr->Initialize((SoundGroup *)v11, v1, 3u) )
    bFailed |= 1u;
  v1->m_pk3DAmbientGroup->m_dwMaxUniqueSourceCount = 10;
  v12 = (SoundGroupStatic *)operator new(0x40u);
  v13 = v12;
  if ( v12 )
  {
    SoundGroupStatic::SoundGroupStatic(v12);
    v13->vfptr = (SoundGroupVtbl *)&SoundGroupMainChar::`vftable';
    v14 = (SoundGroupMainChar *)v13;
  }
  else
  {
    v14 = 0;
  }
  v1->m_pkMainCharGroup = v14;
  if ( !(unsigned __int8)((int (__stdcall *)(SoundMgr *, signed int))v14->vfptr->Initialize)(v1, 1) )
    bFailed |= 1u;
  v15 = (SoundGroupNPCVoice *)operator new(0x80u);
  if ( v15 )
    SoundGroupNPCVoice::SoundGroupNPCVoice(v15);
  else
    v16 = 0;
  v1->m_pkNPCVoiceGroup = v16;
  if ( !v16->vfptr->Initialize((SoundGroup *)v16, v1, 1u) )
    bFailed |= 1u;
  v1->m_pkNPCVoiceGroup->m_dwMaxUniqueSourceCount = 2;
  return bFailed == 0;
}
// 9BE494: using guessed type int (__stdcall *SoundGroupMainChar::`vftable')(NiPointer<NiAudioSource> *result, unsigned int uiType);

//----- (006A1D40) --------------------------------------------------------
char __thiscall SoundMgr::Init(SoundMgr *this)
{
  SoundMgr *v1; // ebx@1
  NiAudioSystem *v2; // eax@1
  char result; // al@1
  NiProviderInfo *v4; // eax@3
  NiNode *v5; // edi@3
  NiNode *v6; // eax@4
  NiNode *v7; // esi@5
  NiRefObjectVtbl *v8; // esi@14
  char *v9; // eax@14
  NiProviderInfo *v10; // eax@15
  int v11; // eax@18
  NiProviderInfo *v12; // esi@20
  NiMilesListener *v13; // eax@23
  NiProviderInfo *v14; // eax@23
  NiD3DDefaultShader *v15; // eax@24
  void *kPos; // [sp+2Ch] [bp-38h]@15
  NiProviderInfo *pkProvider; // [sp+30h] [bp-34h]@3
  const char acTofind[31]; // [sp+34h] [bp-30h]@15
  int v19; // [sp+60h] [bp-4h]@3

  v1 = this;
  v2 = NiAudioSystem::GetAudioSystem();
  v1->m_pkAudioSystem = (NiMilesAudioSystem *)v2;
  v2->vfptr[33].__vecDelDtor((NiRefObject *)v2, (unsigned int)g_hMainWnd);
  v1->m_dwAvailableChannelCount = 100;
  result = SoundMgr::InitializeSoundGroups(v1);
  if ( !result )
  {
    v1->m_bEnable = 0;
    return result;
  }
  v4 = (NiProviderInfo *)operator new(0xE8u);
  pkProvider = v4;
  v5 = 0;
  v19 = 0;
  if ( v4 )
  {
    NiNode::NiNode((NiNode *)v4, 0);
    v5 = v6;
  }
  v7 = v1->m_spListeneerNode.m_pObject;
  v19 = -1;
  if ( v7 != v5 )
  {
    if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v1->m_spListeneerNode.m_pObject = v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  }
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = v1->m_pkAudioSystem->vfptr;
  v9 = Folder::Merge(&Folder::m_acMain, "miles");
  if ( !(unsigned __int8)v8[15].__vecDelDtor((NiRefObject *)v1->m_pkAudioSystem, (unsigned int)v9) )
    goto LABEL_29;
  v10 = NiMilesAudioSystem::GetFirstProvider(v1->m_pkAudioSystem, &kPos);
  qmemcpy((void *)acTofind, "Miles Fast 2D Positional Audio", 0x1Eu);
  pkProvider = v10;
  acTofind[30] = aMilesFast2dPos[30];
  if ( v10 )
  {
    while ( 1 )
    {
      strstr(v10->m_cProviderString, (char *)acTofind);
      if ( v11 )
        break;
      pkProvider = NiMilesAudioSystem::GetNextProvider(v1->m_pkAudioSystem, &kPos);
      if ( !pkProvider )
        goto LABEL_20;
      v10 = pkProvider;
    }
    v12 = pkProvider;
    goto LABEL_23;
  }
LABEL_20:
  v12 = NiMilesAudioSystem::GetFirstProvider(v1->m_pkAudioSystem, &kPos);
  if ( !v12 )
  {
LABEL_29:
    v1->m_bEnable = 0;
    SoundGroup::SetEnableWholeGroup(0);
    return 0;
  }
LABEL_23:
  NiMilesAudioSystem::SetDefaultProvider(v1->m_pkAudioSystem, v12);
  ((void (__stdcall *)(_DWORD))v1->m_pkAudioSystem->vfptr[26].__vecDelDtor)(1.0);
  v13 = NiMilesAudioSystem::GetListener(v1->m_pkAudioSystem);
  v1->m_pkListener = v13;
  v13->vfptr[39].__vecDelDtor((NiRefObject *)v13, (unsigned int)v12);
  v14 = (NiProviderInfo *)operator new(0xE8u);
  pkProvider = v14;
  v19 = 1;
  if ( v14 )
    NiNode::NiNode((NiNode *)v14, 0);
  else
    v15 = 0;
  v19 = -1;
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v1->m_spListeneerNode, v15);
  NiAVObject::Update((NiAVObject *)&v1->m_spListeneerNode.m_pObject->vfptr, 0.0, 1);
  ((void (__stdcall *)(NiPoint3 *))v1->m_pkListener->vfptr[30].__vecDelDtor)(&World::ms_kNorthDir);
  ((void (__stdcall *)(NiPoint3 *))v1->m_pkListener->vfptr[32].__vecDelDtor)(&World::ms_kUpDir);
  ((void (*)(void))v1->m_pkAudioSystem->vfptr[20].__vecDelDtor)();
  v1->m_bEnable = 1;
  SoundGroup::SetEnableWholeGroup(1);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006A1FA0) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::~NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> > *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::`vftable';
}
// 9BE470: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::`vftable')(void *p, char);

//----- (006A1FB0) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> > *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> > *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> > *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BE470: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::`vftable')(void *p, char);

//----- (006A1FE0) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> > *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> > *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> > *v2; // edi@1
  NiTListItem<NiPointer<NiAudioSource> > *v3; // esi@1
  NiTListItem<NiPointer<NiAudioSource> > *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> >Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> > *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BE470: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::`vftable')(void *p, char);
// 9BE480: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::`vftable')(void *p, char);

//----- (006A2070) --------------------------------------------------------
void __thiscall NiTPointerList<NiPointer<NiAudioSource>>::~NiTPointerList<NiPointer<NiAudioSource>>(NiTPointerList<NiPointer<NiAudioSource> > *this)
{
  NiTPointerList<NiPointer<NiAudioSource> > *v1; // edi@1
  NiTListItem<NiPointer<NiAudioSource> > *v2; // esi@1
  NiTListItem<NiPointer<NiAudioSource> > *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> >Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> > *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::`vftable';
}
// 9BE470: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::`vftable')(void *p, char);
// 9BE480: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::`vftable')(void *p, char);

//----- (006A20F0) --------------------------------------------------------
void __thiscall PgTList<NiPointer<NiAudioSource>>::~PgTList<NiPointer<NiAudioSource>>(PgTList<NiPointer<NiAudioSource> > *this)
{
  PgTList<NiPointer<NiAudioSource> > *v1; // edi@1
  NiTListItem<NiPointer<NiAudioSource> > *v2; // esi@1
  NiTListItem<NiPointer<NiAudioSource> > *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> >Vtbl *)&PgTList<NiPointer<NiAudioSource>>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> > *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::`vftable';
}
// 9BE470: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::`vftable')(void *p, char);
// 9BE524: using guessed type int (__thiscall *PgTList<NiPointer<NiAudioSource>>::`vftable')(void *p, char);

//----- (006A2170) --------------------------------------------------------
PgTList<NiPointer<NiAudioSource> > *__thiscall PgTList<NiPointer<NiAudioSource>>::`vector deleting destructor'(PgTList<NiPointer<NiAudioSource> > *this, unsigned int a2)
{
  PgTList<NiPointer<NiAudioSource> > *v2; // edi@1
  NiTListItem<NiPointer<NiAudioSource> > *v3; // esi@1
  NiTListItem<NiPointer<NiAudioSource> > *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> >Vtbl *)&PgTList<NiPointer<NiAudioSource>>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> > *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BE470: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiAudioSource>>::`vftable')(void *p, char);
// 9BE524: using guessed type int (__thiscall *PgTList<NiPointer<NiAudioSource>>::`vftable')(void *p, char);

//----- (006A2200) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,void *> *__thiscall SpTList<void *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,void *> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,void *> *v2; // edi@1
  NiTListItem<void *> *v3; // esi@1
  NiTListItem<void *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,void *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,void *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,void *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,void *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,void *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BE238: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,void *>::`vftable')(void *p, char);
// 9BE278: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,void *>::`vftable')(void *p, char);

//----- (006A2290) --------------------------------------------------------
NiPointer<PgWin> *__thiscall NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::Remove(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *this, NiPointer<PgWin> *result, NiPointer<PgWin> *element)
{
  NiTListItem<NiPointer<PgWin> > *v3; // eax@1
  PgWin **v4; // edx@2
  NiTListItem<NiPointer<PgWin> > *v5; // esi@2
  NiTListItem<NiPointer<PgWin> > *v6; // eax@4
  NiPointer<PgWin> *v7; // eax@6
  void *v8; // esi@6
  signed int v9; // ebx@6
  PgWin *v10; // eax@11
  int v11; // ebx@13
  PgWin *v12; // esi@18
  NiPointer<PgWin> v14; // [sp+10h] [bp-18h]@6
  void *kPos; // [sp+14h] [bp-14h]@5
  unsigned int v16; // [sp+18h] [bp-10h]@1
  int v17; // [sp+24h] [bp-4h]@6

  v16 = 0;
  v3 = this->m_pkHead;
  if ( v3 )
  {
    while ( 1 )
    {
      v4 = &v3->m_element.m_pObject;
      v5 = v3;
      v3 = v3->m_pkNext;
      if ( element->m_pObject == *v4 )
        break;
      if ( !v3 )
        goto LABEL_4;
    }
    v6 = v5;
  }
  else
  {
LABEL_4:
    v6 = 0;
  }
  kPos = v6;
  if ( v6 )
  {
    v7 = NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::RemovePos(this, &v14, &kPos);
    v8 = element;
    v9 = 1;
    v17 = 1;
  }
  else
  {
    v8 = element->m_pObject;
    element = (NiPointer<PgWin> *)v8;
    if ( v8 )
      InterlockedIncrement((volatile LONG *)v8 + 1);
    v7 = (NiPointer<PgWin> *)&element;
    v9 = 2;
  }
  v10 = v7->m_pObject;
  result->m_pObject = v10;
  if ( v10 )
    InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
  v11 = v9 | 4;
  if ( v11 & 2 )
  {
    v11 &= 0xFFFFFFFD;
    v16 = v11;
    if ( v8 )
    {
      if ( !InterlockedDecrement((volatile LONG *)v8 + 1) )
        (**(void (__thiscall ***)(void *, signed int))v8)(v8, 1);
    }
  }
  v17 = 0;
  if ( v11 & 1 )
  {
    v12 = v14.m_pObject;
    v16 = v11 & 0xFFFFFFFE;
    if ( v14.m_pObject )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v14.m_pObject->m_uiRefCount) && v12 )
        v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
    }
  }
  return result;
}

//----- (006A23B0) --------------------------------------------------------
SoundGroupNPCVoice *__thiscall SoundGroupFieldEffect::`scalar deleting destructor'(SoundGroupNPCVoice *this, unsigned int a2)
{
  SoundGroupNPCVoice *v2; // esi@1

  v2 = this;
  SoundGroupDynamic::~SoundGroupDynamic((SoundGroupDynamic *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006A23E0) --------------------------------------------------------
void __thiscall SoundGroupInterface::SoundGroupInterface(SoundGroupInterface *this)
{
  SoundGroupInterface *v1; // ebx@1

  v1 = this;
  SoundGroupStatic::SoundGroupStatic((SoundGroupStatic *)&this->vfptr);
  v1->vfptr = (SoundGroupVtbl *)&SoundGroupInterface::`vftable';
  SoundGroup::SoundGroup((SoundGroup *)&v1->m_kDynamicGroup.vfptr);
  v1->m_kDynamicGroup.vfptr = (SoundGroupVtbl *)&SoundGroupDynamic::`vftable';
  v1->m_kDynamicGroup.m_kUniqueSourceList.m_kAllocator.m_uiCount = 0;
  v1->m_kDynamicGroup.m_kUniqueSourceList.m_pkHead = 0;
  v1->m_kDynamicGroup.m_kUniqueSourceList.m_pkTail = 0;
  v1->m_kDynamicGroup.m_kUniqueSourceList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,void *>Vtbl *)&SpTList<void *>::`vftable';
  v1->m_kDynamicGroup.m_kActiveSourceList.m_kAllocator.m_uiCount = 0;
  v1->m_kDynamicGroup.m_kActiveSourceList.m_pkHead = 0;
  v1->m_kDynamicGroup.m_kActiveSourceList.m_pkTail = 0;
  v1->m_kDynamicGroup.m_kActiveSourceList.vfptr = (NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> >Vtbl *)&NiTList<NiPointer<NiAudioSource>>::`vftable';
  v1->m_kDynamicGroup.m_kAmbientSourceRecycleList.vfptr = (NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> >Vtbl *)&NiTList<NiPointer<NiAudioSource>>::`vftable';
  v1->m_kDynamicGroup.m_kAmbientSourceRecycleList.m_kAllocator.m_uiCount = 0;
  v1->m_kDynamicGroup.m_kAmbientSourceRecycleList.m_pkHead = 0;
  v1->m_kDynamicGroup.m_kAmbientSourceRecycleList.m_pkTail = 0;
  v1->m_kDynamicGroup.m_k3DSourceRecycleList.vfptr = (NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> >Vtbl *)&NiTList<NiPointer<NiAudioSource>>::`vftable';
  v1->m_kDynamicGroup.m_k3DSourceRecycleList.m_kAllocator.m_uiCount = 0;
  v1->m_kDynamicGroup.m_k3DSourceRecycleList.m_pkHead = 0;
  v1->m_kDynamicGroup.m_k3DSourceRecycleList.m_pkTail = 0;
}
// 9BE504: using guessed type int (__thiscall *NiTList<NiPointer<NiAudioSource>>::`vftable')(void *p, char);
// 9BE534: using guessed type int (__thiscall *SpTList<void *>::`vftable')(void *p, char);
// 9BE544: using guessed type int (__stdcall *SoundGroupDynamic::`vftable')(NiPointer<NiAudioSource> *result, NiPointer<NiAudioSource> spSource);
// 9BE594: using guessed type int (__stdcall *SoundGroupInterface::`vftable')(NiPointer<NiAudioSource> *result, unsigned int uiType);

//----- (006A24B0) --------------------------------------------------------
SoundGroupInterface *__thiscall SoundGroupInterface::`scalar deleting destructor'(SoundGroupInterface *this, unsigned int a2)
{
  SoundGroupInterface *v2; // esi@1

  v2 = this;
  SoundGroupDynamic::~SoundGroupDynamic(&this->m_kDynamicGroup);
  SoundGroupStatic::~SoundGroupStatic((SoundGroupStatic *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006A2520) --------------------------------------------------------
void __thiscall SoundGroupFieldEffect::SoundGroupFieldEffect(SoundGroupFieldEffect *this)
{
  SoundGroupFieldEffect *v1; // esi@1

  v1 = this;
  SoundGroup::SoundGroup((SoundGroup *)&this->vfptr);
  v1->m_kUniqueSourceList.m_kAllocator.m_uiCount = 0;
  v1->m_kUniqueSourceList.m_pkHead = 0;
  v1->m_kUniqueSourceList.m_pkTail = 0;
  v1->m_kUniqueSourceList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,void *>Vtbl *)&SpTList<void *>::`vftable';
  v1->m_kActiveSourceList.m_kAllocator.m_uiCount = 0;
  v1->m_kActiveSourceList.m_pkHead = 0;
  v1->m_kActiveSourceList.m_pkTail = 0;
  v1->m_kActiveSourceList.vfptr = (NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> >Vtbl *)&NiTList<NiPointer<NiAudioSource>>::`vftable';
  v1->m_kAmbientSourceRecycleList.m_kAllocator.m_uiCount = 0;
  v1->m_kAmbientSourceRecycleList.m_pkHead = 0;
  v1->m_kAmbientSourceRecycleList.m_pkTail = 0;
  v1->m_kAmbientSourceRecycleList.vfptr = (NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> >Vtbl *)&NiTList<NiPointer<NiAudioSource>>::`vftable';
  v1->m_k3DSourceRecycleList.m_kAllocator.m_uiCount = 0;
  v1->m_k3DSourceRecycleList.m_pkHead = 0;
  v1->m_k3DSourceRecycleList.m_pkTail = 0;
  v1->m_k3DSourceRecycleList.vfptr = (NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> >Vtbl *)&NiTList<NiPointer<NiAudioSource>>::`vftable';
  v1->vfptr = (SoundGroupVtbl *)&SoundGroupFieldEffect::`vftable';
}
// 9BE504: using guessed type int (__thiscall *NiTList<NiPointer<NiAudioSource>>::`vftable')(void *p, char);
// 9BE534: using guessed type int (__thiscall *SpTList<void *>::`vftable')(void *p, char);
// 9BE5E4: using guessed type int (__stdcall *SoundGroupFieldEffect::`vftable')(NiPointer<NiAudioSource> *result, NiPointer<NiAudioSource> spSource);

//----- (006A2570) --------------------------------------------------------
void __thiscall SoundGroup3DAmbient::SoundGroup3DAmbient(SoundGroup3DAmbient *this)
{
  SoundGroup3DAmbient *v1; // esi@1

  v1 = this;
  SoundGroup::SoundGroup((SoundGroup *)&this->vfptr);
  v1->m_kUniqueSourceList.m_kAllocator.m_uiCount = 0;
  v1->m_kUniqueSourceList.m_pkHead = 0;
  v1->m_kUniqueSourceList.m_pkTail = 0;
  v1->m_kUniqueSourceList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,void *>Vtbl *)&SpTList<void *>::`vftable';
  v1->m_kActiveSourceList.m_kAllocator.m_uiCount = 0;
  v1->m_kActiveSourceList.m_pkHead = 0;
  v1->m_kActiveSourceList.m_pkTail = 0;
  v1->m_kActiveSourceList.vfptr = (NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> >Vtbl *)&NiTList<NiPointer<NiAudioSource>>::`vftable';
  v1->m_kAmbientSourceRecycleList.m_kAllocator.m_uiCount = 0;
  v1->m_kAmbientSourceRecycleList.m_pkHead = 0;
  v1->m_kAmbientSourceRecycleList.m_pkTail = 0;
  v1->m_kAmbientSourceRecycleList.vfptr = (NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> >Vtbl *)&NiTList<NiPointer<NiAudioSource>>::`vftable';
  v1->m_k3DSourceRecycleList.m_kAllocator.m_uiCount = 0;
  v1->m_k3DSourceRecycleList.m_pkHead = 0;
  v1->m_k3DSourceRecycleList.m_pkTail = 0;
  v1->m_k3DSourceRecycleList.vfptr = (NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> >Vtbl *)&NiTList<NiPointer<NiAudioSource>>::`vftable';
  v1->vfptr = (SoundGroupVtbl *)&SoundGroup3DAmbient::`vftable';
}
// 9BE504: using guessed type int (__thiscall *NiTList<NiPointer<NiAudioSource>>::`vftable')(void *p, char);
// 9BE534: using guessed type int (__thiscall *SpTList<void *>::`vftable')(void *p, char);
// 9BE634: using guessed type int (__stdcall *SoundGroup3DAmbient::`vftable')(NiPointer<NiAudioSource> *result, NiPointer<NiAudioSource> spSource);

//----- (006A25C0) --------------------------------------------------------
void __thiscall SoundGroupNPCVoice::SoundGroupNPCVoice(SoundGroupNPCVoice *this)
{
  SoundGroupNPCVoice *v1; // esi@1

  v1 = this;
  SoundGroup::SoundGroup((SoundGroup *)&this->vfptr);
  v1->m_kUniqueSourceList.m_kAllocator.m_uiCount = 0;
  v1->m_kUniqueSourceList.m_pkHead = 0;
  v1->m_kUniqueSourceList.m_pkTail = 0;
  v1->m_kUniqueSourceList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,void *>Vtbl *)&SpTList<void *>::`vftable';
  v1->m_kActiveSourceList.m_kAllocator.m_uiCount = 0;
  v1->m_kActiveSourceList.m_pkHead = 0;
  v1->m_kActiveSourceList.m_pkTail = 0;
  v1->m_kActiveSourceList.vfptr = (NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> >Vtbl *)&NiTList<NiPointer<NiAudioSource>>::`vftable';
  v1->m_kAmbientSourceRecycleList.m_kAllocator.m_uiCount = 0;
  v1->m_kAmbientSourceRecycleList.m_pkHead = 0;
  v1->m_kAmbientSourceRecycleList.m_pkTail = 0;
  v1->m_kAmbientSourceRecycleList.vfptr = (NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> >Vtbl *)&NiTList<NiPointer<NiAudioSource>>::`vftable';
  v1->m_k3DSourceRecycleList.m_kAllocator.m_uiCount = 0;
  v1->m_k3DSourceRecycleList.m_pkHead = 0;
  v1->m_k3DSourceRecycleList.m_pkTail = 0;
  v1->m_k3DSourceRecycleList.vfptr = (NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> >Vtbl *)&NiTList<NiPointer<NiAudioSource>>::`vftable';
  v1->vfptr = (SoundGroupVtbl *)&SoundGroupNPCVoice::`vftable';
}
// 9BE504: using guessed type int (__thiscall *NiTList<NiPointer<NiAudioSource>>::`vftable')(void *p, char);
// 9BE534: using guessed type int (__thiscall *SpTList<void *>::`vftable')(void *p, char);
// 9BE684: using guessed type int (__stdcall *SoundGroupNPCVoice::`vftable')(NiPointer<NiAudioSource> *result, NiPointer<NiAudioSource> spSource);

//----- (006A2610) --------------------------------------------------------
void __thiscall SoundGroupAmbient::SoundGroupAmbient(SoundGroupAmbient *this)
{
  SoundGroupAmbient *v1; // edi@1

  v1 = this;
  SoundGroupStatic::SoundGroupStatic((SoundGroupStatic *)&this->vfptr);
  v1->vfptr = (IAmbientSoundManagerVtbl *)IAmbientSoundManager::`vftable';
  v1->vfptr = (SoundGroupVtbl *)&SoundGroupAmbient::`vftable'{for `SoundGroupStatic'};
  v1->vfptr = (IAmbientSoundManagerVtbl *)&SoundGroupAmbient::`vftable'{for `IAmbientSoundManager'};
  v1->m_kAreaList.m_kAllocator.m_uiCount = 0;
  v1->m_kAreaList.m_pkHead = 0;
  v1->m_kAreaList.m_pkTail = 0;
  v1->m_kAreaList.vfptr = (NiTListBase<DFALL<IAmbientArea *>,IAmbientArea *>Vtbl *)&NiTList<IAmbientArea *>::`vftable';
  SoundGroup::SoundGroup((SoundGroup *)&v1->m_k3DAmbient.vfptr);
  v1->m_k3DAmbient.m_kUniqueSourceList.m_kAllocator.m_uiCount = 0;
  v1->m_k3DAmbient.m_kUniqueSourceList.m_pkHead = 0;
  v1->m_k3DAmbient.m_kUniqueSourceList.m_pkTail = 0;
  v1->m_k3DAmbient.m_kUniqueSourceList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,void *>Vtbl *)&SpTList<void *>::`vftable';
  v1->m_k3DAmbient.m_kActiveSourceList.m_kAllocator.m_uiCount = 0;
  v1->m_k3DAmbient.m_kActiveSourceList.m_pkHead = 0;
  v1->m_k3DAmbient.m_kActiveSourceList.m_pkTail = 0;
  v1->m_k3DAmbient.m_kActiveSourceList.vfptr = (NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> >Vtbl *)&NiTList<NiPointer<NiAudioSource>>::`vftable';
  v1->m_k3DAmbient.m_kAmbientSourceRecycleList.vfptr = (NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> >Vtbl *)&NiTList<NiPointer<NiAudioSource>>::`vftable';
  v1->m_k3DAmbient.m_kAmbientSourceRecycleList.m_kAllocator.m_uiCount = 0;
  v1->m_k3DAmbient.m_kAmbientSourceRecycleList.m_pkHead = 0;
  v1->m_k3DAmbient.m_kAmbientSourceRecycleList.m_pkTail = 0;
  v1->m_k3DAmbient.m_k3DSourceRecycleList.vfptr = (NiTListBase<DFALL<NiPointer<NiAudioSource> >,NiPointer<NiAudioSource> >Vtbl *)&NiTList<NiPointer<NiAudioSource>>::`vftable';
  v1->m_k3DAmbient.m_k3DSourceRecycleList.m_kAllocator.m_uiCount = 0;
  v1->m_k3DAmbient.m_k3DSourceRecycleList.m_pkHead = 0;
  v1->m_k3DAmbient.m_k3DSourceRecycleList.m_pkTail = 0;
  v1->m_k3DAmbient.vfptr = (SoundGroupVtbl *)&SoundGroup3DAmbient::`vftable';
  v1->m_kPlayingAreaList.m_kAllocator.m_uiCount = 0;
  v1->m_kPlayingAreaList.m_pkHead = 0;
  v1->m_kPlayingAreaList.m_pkTail = 0;
  v1->m_kPlayingAreaList.vfptr = (NiTListBase<DFALL<SoundGroupAmbient::PlayingAreaInfo *>,SoundGroupAmbient::PlayingAreaInfo *>Vtbl *)&NiTList<SoundGroupAmbient::PlayingAreaInfo *>::`vftable';
}
// 9BE33C: using guessed type int (__thiscall *SoundGroupAmbient::`vftable'{for `IAmbientSoundManager'})(SoundGroupAmbient *this, struct IAmbientArea *);
// 9BE34C: using guessed type int (__stdcall *SoundGroupAmbient::`vftable'{for `SoundGroupStatic'})(NiPointer<NiAudioSource> *result, unsigned int uiType);
// 9BE464: using guessed type int (*IAmbientSoundManager::`vftable'[2])();
// 9BE4E4: using guessed type int (__thiscall *NiTList<IAmbientArea *>::`vftable')(void *p, char);
// 9BE4F4: using guessed type int (__thiscall *NiTList<SoundGroupAmbient::PlayingAreaInfo *>::`vftable')(void *p, char);
// 9BE504: using guessed type int (__thiscall *NiTList<NiPointer<NiAudioSource>>::`vftable')(void *p, char);
// 9BE534: using guessed type int (__thiscall *SpTList<void *>::`vftable')(void *p, char);
// 9BE634: using guessed type int (__stdcall *SoundGroup3DAmbient::`vftable')(NiPointer<NiAudioSource> *result, NiPointer<NiAudioSource> spSource);

//----- (006A2720) --------------------------------------------------------
void __thiscall MachineOpt::WinPos::WinPos(MachineOpt::WinPos *this, char *pcWinName, float fX, float fY)
{
  MachineOpt::WinPos *v4; // esi@1
  unsigned int v5; // kr00_4@1
  char *v6; // eax@1

  v4 = this;
  v5 = strlen(pcWinName);
  v6 = (char *)operator new[](v5 + 1);
  v4->m_pcWinName = v6;
  memcpy(v6, pcWinName, v5 + 1);
  v4->m_fXPosRate = fX;
  v4->m_fYPosRate = fY;
}

//----- (006A2770) --------------------------------------------------------
void __thiscall MachineOpt::WinPos::WinPos(MachineOpt::WinPos *this)
{
  this->m_pcWinName = 0;
}

//----- (006A2780) --------------------------------------------------------
void __thiscall MachineOpt::WinPos::~WinPos(MachineOpt::WinPos *this)
{
  operator delete[](this->m_pcWinName);
}

//----- (006A2790) --------------------------------------------------------
bool __thiscall MachineOpt::WinPos::Save(MachineOpt::WinPos *this, _iobuf *fp)
{
  MachineOpt::WinPos *v2; // edi@1
  bool result; // al@2
  unsigned int uiLen; // [sp+4h] [bp-4h]@3

  v2 = this;
  if ( this->m_pcWinName )
  {
    uiLen = strlen(this->m_pcWinName) + 1;
    if ( fwrite(&uiLen, 4u, 1u, fp) == 1
      && fwrite(v2->m_pcWinName, uiLen, 1u, fp) == 1
      && fwrite(&v2->m_fXPosRate, 4u, 1u, fp) == 1 )
    {
      result = fwrite(&v2->m_fYPosRate, 4u, 1u, fp) == 1;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006A2830) --------------------------------------------------------
bool __thiscall MachineOpt::WinPos::Load(MachineOpt::WinPos *this, _iobuf *fp)
{
  MachineOpt::WinPos *v2; // edi@1
  bool result; // al@4
  char *v4; // eax@5
  unsigned int v5; // ST04_4@5
  unsigned int uiLen; // [sp+8h] [bp-4h]@3

  v2 = this;
  if ( this->m_pcWinName )
    operator delete[](this->m_pcWinName);
  if ( fread(&uiLen, 4u, 1u, fp) != 1
    || (v4 = (char *)operator new[](uiLen), v5 = uiLen, v2->m_pcWinName = v4, fread(v4, v5, 1u, fp) != 1)
    || fread(&v2->m_fXPosRate, 4u, 1u, fp) != 1 )
  {
    result = 0;
  }
  else
  {
    result = fread(&v2->m_fYPosRate, 4u, 1u, fp) == 1;
  }
  return result;
}

//----- (006A28C0) --------------------------------------------------------
char __cdecl MachineOpt::Load()
{
  return 1;
}

//----- (006A28D0) --------------------------------------------------------
char __cdecl MachineOpt::Save()
{
  return 1;
}

//----- (006A28E0) --------------------------------------------------------
double __cdecl MachineOpt::GetCurGama()
{
  return MachineOpt::ms_kGraphicOption.fCurGama;
}

//----- (006A28F0) --------------------------------------------------------
void __thiscall MachineOpt::SoundOption::SetDefault(MachineOpt::SoundOption *this)
{
  *(_DWORD *)&this->kVersion.year = *(_DWORD *)&CURRENT_SOUND_OPTION_VERSION.year;
  *(_WORD *)&this->kVersion.hour = *(_WORD *)&CURRENT_SOUND_OPTION_VERSION.hour;
  this->uiMasterVolume = 50;
  this->uiBgVolume = 50;
  this->uiEffectVolume = 50;
  this->uiEnvEffectVolume = 50;
}

//----- (006A2920) --------------------------------------------------------
void __cdecl MachineOpt::SetDefaultSoundOption()
{
  MachineOpt::ms_kSoundOption.kVersion = CURRENT_SOUND_OPTION_VERSION;
  dword_A76950 = 50;
  dword_A76954 = 50;
  dword_A76958 = 50;
  dword_A7695C = 50;
}
// A76948: using guessed type struct MachineOpt::SoundOption MachineOpt::ms_kSoundOption;
// A76950: using guessed type int dword_A76950;
// A76954: using guessed type int dword_A76954;
// A76958: using guessed type int dword_A76958;
// A7695C: using guessed type int dword_A7695C;

//----- (006A2960) --------------------------------------------------------
MachineOpt::SoundOption *__cdecl MachineOpt::GetSoundOption()
{
  return &MachineOpt::ms_kSoundOption;
}
// A76948: using guessed type struct MachineOpt::SoundOption MachineOpt::ms_kSoundOption;

//----- (006A2970) --------------------------------------------------------
void __cdecl MachineOpt::SetSoundOption(MachineOpt::SoundOption *rkOption)
{
  *(_DWORD *)&MachineOpt::ms_kSoundOption.kVersion.year = *(_DWORD *)&rkOption->kVersion.year;
  *(_DWORD *)&MachineOpt::ms_kSoundOption.kVersion.hour = *(_DWORD *)&rkOption->kVersion.hour;
  dword_A76950 = rkOption->uiMasterVolume;
  dword_A76954 = rkOption->uiBgVolume;
  dword_A76958 = rkOption->uiEffectVolume;
  dword_A7695C = rkOption->uiEnvEffectVolume;
}
// A76948: using guessed type struct MachineOpt::SoundOption MachineOpt::ms_kSoundOption;
// A76950: using guessed type int dword_A76950;
// A76954: using guessed type int dword_A76954;
// A76958: using guessed type int dword_A76958;
// A7695C: using guessed type int dword_A7695C;

//----- (006A29B0) --------------------------------------------------------
void __cdecl MachineOpt::SetChatWinFilter(unsigned int uiMode, unsigned int uiOption)
{
  dword_B4FF76[uiMode] = uiOption;
}
// B4FF76: using guessed type int dword_B4FF76[];

//----- (006A29D0) --------------------------------------------------------
void __cdecl MachineOpt::SetSysMsgWinFilter(unsigned int uiOption)
{
  dword_B4FF8A = uiOption;
}
// B4FF8A: using guessed type int dword_B4FF8A;

//----- (006A29E0) --------------------------------------------------------
bool __cdecl MachineOpt::GetGlowEffect()
{
  return MachineOpt::ms_kGraphicOption.bGlowEnable;
}

//----- (006A29F0) --------------------------------------------------------
bool __cdecl MachineOpt::GetLightEffect()
{
  return MachineOpt::ms_kGraphicOption.bLightEnable;
}

//----- (006A2A00) --------------------------------------------------------
int __cdecl MachineOpt::GetReadNum(_iobuf *fp, int size)
{
  int result; // eax@2
  signed int v3; // edi@5

  if ( size )
  {
    if ( fp )
    {
      fseek(fp, 0, 2);
      v3 = ftell(fp);
      fseek(fp, 0, 0);
      result = v3 / size;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006A2A50) --------------------------------------------------------
char __cdecl MachineOpt::WriteOptFile(_iobuf *fp, void *pData, unsigned int size)
{
  char result; // al@4

  if ( fp && pData && size )
  {
    fwrite(pData, size, 1u, fp);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006A2A80) --------------------------------------------------------
bool __cdecl MachineOpt::IsValidateFile(_iobuf *fp, int dataSize)
{
  signed int v2; // edi@1

  fseek(fp, 0, 2);
  v2 = ftell(fp);
  fseek(fp, 0, 0);
  return v2 % dataSize == 0;
}

//----- (006A2AC0) --------------------------------------------------------
void __thiscall MachineOpt::UserLoginOption::SetDefault(MachineOpt::UserLoginOption *this)
{
  MachineOpt::UserLoginOption *v1; // esi@1
  char *v2; // eax@1

  v1 = this;
  v2 = (char *)((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)();
  strncpy(v1->username, v2, 0x40u);
  v1->u32NewBieFlags.value |= 0xFFFFFFFE;
  v1->BufXPos = 0.126;
  v1->BufYPos = 0.125;
  v1->bFriendAddAllow = 1;
  *(_DWORD *)&v1->BufWidth = 1310920;
  v1->DBufXPos = 0.126;
  *(_DWORD *)&v1->DBufWidth = 1310920;
  *(_DWORD *)&v1->ChargedBufWidth = 1310920;
  v1->DBufYPos = 0.15360001;
  v1->bTargetOfTerget = 0;
  v1->FullMapAlpha = 0.89999998;
  v1->ChargedBufXPos = 0.126;
  v1->ChargedBufYPos = 0.1816;
}

//----- (006A2B40) --------------------------------------------------------
void __cdecl MachineOpt::SetGameOpt(PROTO_NC_CHAR_OPTION_IMPROVE_GET_GAMEOPTION_CMD *pkProto)
{
  unsigned int v1; // eax@1
  signed int v2; // edx@2
  PROTO_NC_CHAR_OPTION_IMPROVE_GET_GAMEOPTION_CMD *v3; // eax@3

  v1 = pkProto->nGameOptionDataCnt;
  if ( v1 <= 0x1C )
  {
    v2 = 0;
    if ( (unsigned __int16)v1 > 0u )
    {
      v3 = pkProto + 2;
      do
      {
        switch ( v3[-1].nGameOptionDataCnt )
        {
          case 0u:
            byte_B4FF66 = LOBYTE(v3->nGameOptionDataCnt) != 0;
            break;
          case 1u:
            byte_B4FF67 = LOBYTE(v3->nGameOptionDataCnt) != 0;
            break;
          case 2u:
          case 0x15u:
            byte_B4FF68 = LOBYTE(v3->nGameOptionDataCnt) != 0;
            break;
          case 3u:
            byte_B4FF69 = LOBYTE(v3->nGameOptionDataCnt) != 0;
            break;
          case 4u:
            byte_B4FF6A = LOBYTE(v3->nGameOptionDataCnt) != 0;
            break;
          case 5u:
            byte_B4FF6B = LOBYTE(v3->nGameOptionDataCnt) != 0;
            break;
          case 6u:
            byte_B4FF6C = LOBYTE(v3->nGameOptionDataCnt) != 0;
            break;
          case 7u:
            byte_B4FF6D = LOBYTE(v3->nGameOptionDataCnt) != 0;
            break;
          case 8u:
            byte_B4FF6E = LOBYTE(v3->nGameOptionDataCnt) != 0;
            break;
          case 9u:
            byte_B4FF93 = LOBYTE(v3->nGameOptionDataCnt) != 0;
            break;
          case 0xAu:
            byte_B4FF94 = LOBYTE(v3->nGameOptionDataCnt) != 0;
            break;
          case 0xBu:
            byte_B4FF95 = LOBYTE(v3->nGameOptionDataCnt) != 0;
            break;
          case 0xCu:
            byte_B4FF70 = LOBYTE(v3->nGameOptionDataCnt) != 0;
            break;
          case 0xDu:
            byte_B4FF71 = LOBYTE(v3->nGameOptionDataCnt) != 0;
            break;
          case 0xEu:
            byte_B4FF72 = LOBYTE(v3->nGameOptionDataCnt) != 0;
            break;
          case 0xFu:
            byte_B4FF73 = LOBYTE(v3->nGameOptionDataCnt) != 0;
            break;
          case 0x10u:
            byte_B4FF74 = LOBYTE(v3->nGameOptionDataCnt) != 0;
            break;
          case 0x11u:
            byte_B4FF75 = LOBYTE(v3->nGameOptionDataCnt) != 0;
            break;
          case 0x12u:
            byte_B4FF92 = LOBYTE(v3->nGameOptionDataCnt) != 0;
            break;
          case 0x13u:
            byte_B4FF8E = LOBYTE(v3->nGameOptionDataCnt) != 0;
            break;
          case 0x14u:
            byte_B4FF8F = LOBYTE(v3->nGameOptionDataCnt) != 0;
            break;
          case 0x16u:
            byte_B4FF90 = LOBYTE(v3->nGameOptionDataCnt) != 0;
            break;
          case 0x17u:
            byte_B4FF91 = LOBYTE(v3->nGameOptionDataCnt) != 0;
            break;
          case 0x1Bu:
            byte_B4FF96 = LOBYTE(v3->nGameOptionDataCnt) != 0;
            break;
          default:
            break;
        }
        ++v2;
        v3 = (PROTO_NC_CHAR_OPTION_IMPROVE_GET_GAMEOPTION_CMD *)((char *)v3 + 3);
      }
      while ( v2 < pkProto->nGameOptionDataCnt );
    }
  }
}
// B4FF66: using guessed type char byte_B4FF66;
// B4FF67: using guessed type char byte_B4FF67;
// B4FF68: using guessed type char byte_B4FF68;
// B4FF69: using guessed type char byte_B4FF69;
// B4FF6A: using guessed type char byte_B4FF6A;
// B4FF6B: using guessed type char byte_B4FF6B;
// B4FF6C: using guessed type char byte_B4FF6C;
// B4FF6D: using guessed type char byte_B4FF6D;
// B4FF6E: using guessed type char byte_B4FF6E;
// B4FF70: using guessed type char byte_B4FF70;
// B4FF71: using guessed type char byte_B4FF71;
// B4FF72: using guessed type char byte_B4FF72;
// B4FF73: using guessed type char byte_B4FF73;
// B4FF74: using guessed type char byte_B4FF74;
// B4FF75: using guessed type char byte_B4FF75;
// B4FF8E: using guessed type char byte_B4FF8E;
// B4FF8F: using guessed type char byte_B4FF8F;
// B4FF90: using guessed type char byte_B4FF90;
// B4FF91: using guessed type char byte_B4FF91;
// B4FF92: using guessed type char byte_B4FF92;
// B4FF93: using guessed type char byte_B4FF93;
// B4FF94: using guessed type char byte_B4FF94;
// B4FF95: using guessed type char byte_B4FF95;
// B4FF96: using guessed type char byte_B4FF96;

//----- (006A2D80) --------------------------------------------------------
void __cdecl MachineOpt::MakeDefaultKey()
{
  word_B4F638 = 16;
  word_B4F640 = 17;
  LOWORD(MachineOpt::m_keyMap) = 0;
  word_B4F5BA[0] = 30976;
  dword_B4F5C0 = 452984833;
  dword_B4F5C8 = 1124073474;
  dword_B4F5F8 = 1442840584;
  dword_B4F5D0 = 1224736771;
  dword_B4F5D8 = 1258291204;
  dword_B4F5E0 = 1275068421;
  dword_B4F5F0 = 1207959559;
  dword_B4F630 = 1476395023;
  dword_B4F628 = -570425330;
  dword_B4F700 = 1291845673;
  dword_B4F708 = 1426063402;
  dword_B4F6F8 = 1342177320;
  dword_B4F660 = 1375731733;
  dword_B4F5E8 = 1174405126;
  word_B4F63A = 18176;
  dword_B4F658 = 20;
  word_B4F642 = 0;
  dword_B4F650 = 19;
  word_B4F648 = 18;
  word_B4F64A = 0;
  dword_B4F600 = 218103817;
  dword_B4F608 = 1309736970;
  dword_B4F610 = 1192296459;
  dword_B4F668 = 1091633174;
  dword_B4F618 = 1343291404;
  dword_B4F620 = 1460731917;
  dword_B4F720 = 45;
  dword_B4F670 = 1459617815;
  dword_B4F678 = 1392508952;
  dword_B4F680 = 25;
  dword_B4F688 = 1090519066;
  dword_B4F690 = 1140850715;
  dword_B4F6A0 = 536870941;
  dword_B4F698 = 1509949468;
  dword_B4F6A8 = 637534238;
  dword_B4F6B0 = 671088671;
  dword_B4F6B8 = 620757024;
  dword_B4F6C0 = 654311457;
  dword_B4F6D8 = 1358954532;
  dword_B4F6E0 = 1157627941;
  dword_B4F6C8 = 603979810;
  dword_B4F6D0 = 1409286179;
  dword_B4F6E8 = -184549338;
  dword_B4F6F0 = 1107296295;
  dword_B4F710 = 1510998059;
  dword_B4F718 = 44;
  dword_B4F728 = 587202606;
  dword_B4F730 = 822083631;
  dword_B4F738 = 838860848;
  dword_B4F740 = 855638065;
  dword_B4F748 = 872415282;
  dword_B4F750 = 889192499;
  dword_B4F758 = 905969716;
  dword_B4F760 = 922746933;
  dword_B4F768 = 939524150;
  dword_B4F770 = 956301367;
  dword_B4F778 = 805306424;
  dword_B4F780 = -1124073415;
  dword_B4F788 = -1157627846;
  dword_B4F790 = 823132219;
  dword_B4F798 = 839909436;
  dword_B4F7A0 = 856686653;
  dword_B4F7A8 = 873463870;
  dword_B4F7B0 = 890241087;
  dword_B4F7B8 = 907018304;
  dword_B4F7C0 = 923795521;
  dword_B4F7C8 = 940572738;
  dword_B4F7D0 = 957349955;
  dword_B4F7D8 = 806355012;
  dword_B4F7E0 = -1123024827;
  dword_B4F7E8 = -1156579258;
  dword_B4F7F0 = 823263303;
  dword_B4F7F8 = 840040520;
  dword_B4F800 = 856817737;
  dword_B4F808 = 873594954;
  dword_B4F810 = 890372171;
  dword_B4F818 = 907149388;
  dword_B4F820 = 923926605;
  dword_B4F828 = 940703822;
  dword_B4F830 = 957481039;
  dword_B4F838 = 806486096;
  dword_B4F840 = -1122893743;
  dword_B4F848 = -1156448174;
  dword_B4F850 = 83;
  dword_B4F858 = 84;
  dword_B4F860 = 85;
  dword_B4F868 = 86;
  dword_B4F870 = 87;
  dword_B4F878 = 88;
  dword_B4F880 = 89;
  dword_B4F888 = 90;
  dword_B4F890 = 91;
  dword_B4F898 = 92;
  dword_B4F8A0 = 93;
  dword_B4F8A8 = 94;
}
// B4F5B8: using guessed type struct MachineOpt::stKeyMapData *MachineOpt::m_keyMap;
// B4F5BA: using guessed type __int16 word_B4F5BA[];
// B4F5C0: using guessed type int dword_B4F5C0;
// B4F5C8: using guessed type int dword_B4F5C8;
// B4F5D0: using guessed type int dword_B4F5D0;
// B4F5D8: using guessed type int dword_B4F5D8;
// B4F5E0: using guessed type int dword_B4F5E0;
// B4F5E8: using guessed type int dword_B4F5E8;
// B4F5F0: using guessed type int dword_B4F5F0;
// B4F5F8: using guessed type int dword_B4F5F8;
// B4F600: using guessed type int dword_B4F600;
// B4F608: using guessed type int dword_B4F608;
// B4F610: using guessed type int dword_B4F610;
// B4F618: using guessed type int dword_B4F618;
// B4F620: using guessed type int dword_B4F620;
// B4F628: using guessed type int dword_B4F628;
// B4F630: using guessed type int dword_B4F630;
// B4F638: using guessed type __int16 word_B4F638;
// B4F63A: using guessed type __int16 word_B4F63A;
// B4F640: using guessed type __int16 word_B4F640;
// B4F642: using guessed type __int16 word_B4F642;
// B4F648: using guessed type __int16 word_B4F648;
// B4F64A: using guessed type __int16 word_B4F64A;
// B4F650: using guessed type int dword_B4F650;
// B4F658: using guessed type int dword_B4F658;
// B4F660: using guessed type int dword_B4F660;
// B4F668: using guessed type int dword_B4F668;
// B4F670: using guessed type int dword_B4F670;
// B4F678: using guessed type int dword_B4F678;
// B4F680: using guessed type int dword_B4F680;
// B4F688: using guessed type int dword_B4F688;
// B4F690: using guessed type int dword_B4F690;
// B4F698: using guessed type int dword_B4F698;
// B4F6A0: using guessed type int dword_B4F6A0;
// B4F6A8: using guessed type int dword_B4F6A8;
// B4F6B0: using guessed type int dword_B4F6B0;
// B4F6B8: using guessed type int dword_B4F6B8;
// B4F6C0: using guessed type int dword_B4F6C0;
// B4F6C8: using guessed type int dword_B4F6C8;
// B4F6D0: using guessed type int dword_B4F6D0;
// B4F6D8: using guessed type int dword_B4F6D8;
// B4F6E0: using guessed type int dword_B4F6E0;
// B4F6E8: using guessed type int dword_B4F6E8;
// B4F6F0: using guessed type int dword_B4F6F0;
// B4F6F8: using guessed type int dword_B4F6F8;
// B4F700: using guessed type int dword_B4F700;
// B4F708: using guessed type int dword_B4F708;
// B4F710: using guessed type int dword_B4F710;
// B4F718: using guessed type int dword_B4F718;
// B4F720: using guessed type int dword_B4F720;
// B4F728: using guessed type int dword_B4F728;
// B4F730: using guessed type int dword_B4F730;
// B4F738: using guessed type int dword_B4F738;
// B4F740: using guessed type int dword_B4F740;
// B4F748: using guessed type int dword_B4F748;
// B4F750: using guessed type int dword_B4F750;
// B4F758: using guessed type int dword_B4F758;
// B4F760: using guessed type int dword_B4F760;
// B4F768: using guessed type int dword_B4F768;
// B4F770: using guessed type int dword_B4F770;
// B4F778: using guessed type int dword_B4F778;
// B4F780: using guessed type int dword_B4F780;
// B4F788: using guessed type int dword_B4F788;
// B4F790: using guessed type int dword_B4F790;
// B4F798: using guessed type int dword_B4F798;
// B4F7A0: using guessed type int dword_B4F7A0;
// B4F7A8: using guessed type int dword_B4F7A8;
// B4F7B0: using guessed type int dword_B4F7B0;
// B4F7B8: using guessed type int dword_B4F7B8;
// B4F7C0: using guessed type int dword_B4F7C0;
// B4F7C8: using guessed type int dword_B4F7C8;
// B4F7D0: using guessed type int dword_B4F7D0;
// B4F7D8: using guessed type int dword_B4F7D8;
// B4F7E0: using guessed type int dword_B4F7E0;
// B4F7E8: using guessed type int dword_B4F7E8;
// B4F7F0: using guessed type int dword_B4F7F0;
// B4F7F8: using guessed type int dword_B4F7F8;
// B4F800: using guessed type int dword_B4F800;
// B4F808: using guessed type int dword_B4F808;
// B4F810: using guessed type int dword_B4F810;
// B4F818: using guessed type int dword_B4F818;
// B4F820: using guessed type int dword_B4F820;
// B4F828: using guessed type int dword_B4F828;
// B4F830: using guessed type int dword_B4F830;
// B4F838: using guessed type int dword_B4F838;
// B4F840: using guessed type int dword_B4F840;
// B4F848: using guessed type int dword_B4F848;
// B4F850: using guessed type int dword_B4F850;
// B4F858: using guessed type int dword_B4F858;
// B4F860: using guessed type int dword_B4F860;
// B4F868: using guessed type int dword_B4F868;
// B4F870: using guessed type int dword_B4F870;
// B4F878: using guessed type int dword_B4F878;
// B4F880: using guessed type int dword_B4F880;
// B4F888: using guessed type int dword_B4F888;
// B4F890: using guessed type int dword_B4F890;
// B4F898: using guessed type int dword_B4F898;
// B4F8A0: using guessed type int dword_B4F8A0;
// B4F8A8: using guessed type int dword_B4F8A8;

//----- (006A3170) --------------------------------------------------------
void __cdecl MachineOpt::SetKeyMap(PROTO_NC_CHAR_OPTION_IMPROVE_GET_KEYMAP_CMD *pkProto)
{
  signed int v1; // ecx@1
  PROTO_NC_CHAR_OPTION_IMPROVE_GET_KEYMAP_CMD *v2; // eax@2

  v1 = 0;
  if ( pkProto->nKeyMapDataCnt > 0u )
  {
    v2 = pkProto + 1;
    do
    {
      HIBYTE(word_B4F5BA[4 * v2->nKeyMapDataCnt]) = HIBYTE(v2[1].nKeyMapDataCnt);
      LOBYTE(word_B4F5BA[4 * v2->nKeyMapDataCnt]) = v2[1].nKeyMapDataCnt;
      ++v1;
      v2 += 2;
    }
    while ( v1 < pkProto->nKeyMapDataCnt );
  }
}
// B4F5BA: using guessed type __int16 word_B4F5BA[];

//----- (006A31C0) --------------------------------------------------------
void __thiscall MachineOpt::StKeyMappingBuffer::StKeyMappingBuffer(MachineOpt::StKeyMappingBuffer *this)
{
  MachineOpt::StKeyMappingBuffer *v1; // esi@1
  unsigned int v2; // ecx@1
  int v3; // eax@1
  __int16 v4; // [sp+Ah] [bp-2h]@0

  v1 = this;
  LOBYTE(v4) = 0;
  *(_DWORD *)&this->m_kVersion.year = 336005085;
  *(_WORD *)&this->m_kVersion.hour = v4;
  this->uiTotal = 117;
  v2 = 0;
  v3 = (int)&v1->stKeyMapBuff[0].keyValue;
  do
  {
    *(_WORD *)(v3 - 1) = 0;
    ++v2;
    v3 += 2;
  }
  while ( v2 < v1->uiTotal );
  MachineOpt::MakeDefaultKey();
}

//----- (006A3210) --------------------------------------------------------
void __thiscall MachineOpt::StShortCutSizeOption::StShortCutSizeOption(MachineOpt::StShortCutSizeOption *this)
{
  __int16 v1; // [sp+6h] [bp-2h]@0

  LOBYTE(v1) = 0;
  *(_WORD *)&this->m_kVersion.month = 0;
  *(_DWORD *)&this->m_kVersion.year = 402849797;
  *(_WORD *)&this->m_kVersion.hour = v1;
}

//----- (006A3240) --------------------------------------------------------
void __thiscall MachineOpt::StSaveWinPosOption::StSaveWinPosOption(MachineOpt::StSaveWinPosOption *this)
{
  __int16 v1; // [sp+6h] [bp-2h]@0

  LOBYTE(v1) = 0;
  *(_WORD *)&this->m_kVersion.month = 0;
  *(_DWORD *)&this->m_kVersion.year = 402720727;
  *(_WORD *)&this->m_kVersion.hour = v1;
  this->uiTotalNum = 28;
}

//----- (006A3280) --------------------------------------------------------
void __thiscall MachineOpt::GraphicOption::SetDefault(MachineOpt::GraphicOption *this)
{
  __int16 v1; // [sp+6h] [bp-2h]@0

  this->fCurGama = 1.0;
  this->fViewTerrainRate = 1.0;
  *(_DWORD *)&this->m_kVersion.year = 402849797;
  this->fViewObjectLength = 5000.0;
  LOBYTE(v1) = 0;
  this->farrLODLength[0] = 200.0;
  *(_WORD *)&this->m_kVersion.hour = v1;
  this->farrLODLength[1] = 500.0;
  this->nCharShadowLevel = 0;
  this->bViewOutLine = 1;
  this->nAntiAliasLevel = 0;
  this->fLODAdjust = 1.0;
  this->ui_DisplayResolutionWidth = 1024;
  this->ui_DisplayResolutionHeight = 768;
  this->bWindowFullMode = 1;
  this->ui_DisplayMultisample = 0;
  *(_DWORD *)&this->bGlowEnable = 16842752;
  this->bScreenShotEnable = 1;
}

//----- (006A3300) --------------------------------------------------------
void __thiscall MachineOpt::GameOption::SetDefault(MachineOpt::GameOption *this)
{
  signed int v1; // eax@1
  __int16 v2; // [sp+6h] [bp-2h]@0

  v1 = 0;
  *(_DWORD *)&this->m_kVersion.year = 403376086;
  LOBYTE(v2) = 0;
  *(_WORD *)&this->m_kVersion.hour = v2;
  *(_DWORD *)&this->bMyNameCheck = 16843009;
  *(_DWORD *)&this->bItemNameCheck = 16777472;
  *(_DWORD *)&this->bSpeechCheck = 1;
  *(_DWORD *)&this->bParCheck = 0;
  this->bChatInputCheck = 1;
  *(_DWORD *)&this->bNamePanelCheck = 16843008;
  do
  {
    switch ( v1 )
    {
      case 0:
        this->kChatOption.uiChatWinFilter[0] = -261;
        break;
      case 1:
        this->kChatOption.uiChatWinFilter[1] = 8;
        break;
      case 2:
        this->kChatOption.uiChatWinFilter[2] = 8208;
        break;
      case 3:
        this->kChatOption.uiChatWinFilter[3] = 32;
        break;
      case 4:
        this->kChatOption.uiChatWinFilter[4] = 4096;
        break;
      default:
        break;
    }
    ++v1;
  }
  while ( v1 < 5 );
  this->kChatOption.uiSysMsgWinFilter = 260;
  *(_WORD *)&this->bChattingHideCheck = 257;
}

//----- (006A33B0) --------------------------------------------------------
void __cdecl MachineOpt::SaveGraphicOption()
{
  _iobuf *v0; // eax@3
  _iobuf *v1; // esi@3
  char acFileName[256]; // [sp+0h] [bp-104h]@3

  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acFileName, "%s%s", &Folder::m_acSystem, "Option.mco");
  v0 = fopen(acFileName, "wb");
  v1 = v0;
  if ( v0 )
  {
    fwrite(&MachineOpt::ms_kGraphicOption, 0x3Du, 1u, v0);
    fclose(v1);
  }
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006A3430) --------------------------------------------------------
void __cdecl MachineOpt::LoadGraphicOption()
{
  _iobuf *v0; // eax@3
  _iobuf *v1; // esi@3
  _iobuf *v2; // eax@9
  _iobuf *v3; // esi@9
  Version kVersion; // [sp+0h] [bp-10Ch]@4
  char acFileName[256]; // [sp+8h] [bp-104h]@3

  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acFileName, "%s%s", &Folder::m_acSystem, "Option.mco");
  v0 = fopen(acFileName, "rb");
  v1 = v0;
  if ( v0 )
  {
    *(_DWORD *)&kVersion.year = 0;
    kVersion.hour = 0;
    fread(&kVersion, 6u, 1u, v0);
    if ( kVersion.year == MachineOpt::ms_kGraphicOption.m_kVersion.year
      && kVersion.month == MachineOpt::ms_kGraphicOption.m_kVersion.month
      && kVersion.date == MachineOpt::ms_kGraphicOption.m_kVersion.date
      && kVersion.hour == MachineOpt::ms_kGraphicOption.m_kVersion.hour )
    {
      fclose(v1);
      v2 = fopen(acFileName, "rb");
      v3 = v2;
      if ( v2 )
      {
        fread(&MachineOpt::ms_kGraphicOption, 0x3Du, 1u, v2);
        fclose(v3);
        MachineOpt::ms_kGraphicOption.farrLODLength[0] = 200.0;
        MachineOpt::ms_kGraphicOption.farrLODLength[1] = 500.0;
      }
    }
    else
    {
      fclose(v1);
    }
  }
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006A3560) --------------------------------------------------------
void __cdecl MachineOpt::SaveGameOption()
{
  _iobuf *v0; // eax@3
  _iobuf *v1; // esi@3
  char acFileName[256]; // [sp+0h] [bp-104h]@3

  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acFileName, "%s%s", &Folder::m_acSystem, "OptionGame.mco");
  v0 = fopen(acFileName, "wb");
  v1 = v0;
  if ( v0 )
  {
    fwrite(&MachineOpt::ms_kGameOption, 0x37u, 1u, v0);
    fclose(v1);
  }
}
// A8975C: using guessed type bool Folder::m_bInit;
// B4FF60: using guessed type struct MachineOpt::GameOption MachineOpt::ms_kGameOption;

//----- (006A35E0) --------------------------------------------------------
char __cdecl MachineOpt::LoadGameOption()
{
  _iobuf *v0; // eax@3
  _iobuf *v1; // esi@3
  _iobuf *v3; // eax@10
  _iobuf *v4; // esi@10
  Version kVersion; // [sp+0h] [bp-10Ch]@4
  char acFileName[256]; // [sp+8h] [bp-104h]@3

  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acFileName, "%s%s", &Folder::m_acSystem, "OptionGame.mco");
  v0 = fopen(acFileName, "rb");
  v1 = v0;
  if ( !v0 )
    return 0;
  *(_DWORD *)&kVersion.year = 0;
  kVersion.hour = 0;
  fread(&kVersion, 6u, 1u, v0);
  if ( kVersion.year != MachineOpt::ms_kGameOption.m_kVersion.year
    || kVersion.month != byte_B4FF62
    || kVersion.date != byte_B4FF63
    || kVersion.hour != byte_B4FF64 )
  {
    fclose(v1);
    return 0;
  }
  fclose(v1);
  v3 = fopen(acFileName, "rb");
  v4 = v3;
  if ( !v3 )
    return 0;
  fread(&MachineOpt::ms_kGameOption, 0x37u, 1u, v3);
  fclose(v4);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;
// B4FF60: using guessed type struct MachineOpt::GameOption MachineOpt::ms_kGameOption;
// B4FF62: using guessed type char byte_B4FF62;
// B4FF63: using guessed type char byte_B4FF63;
// B4FF64: using guessed type char byte_B4FF64;

//----- (006A3700) --------------------------------------------------------
char __cdecl MachineOpt::SaveWinPos(_iobuf *fp)
{
  int v1; // ebx@1
  int v2; // esi@2
  char result; // al@8
  unsigned int uiTotal; // [sp+Ch] [bp-8h]@1
  unsigned int buffer; // [sp+10h] [bp-4h]@3

  uiTotal = dword_A76904;
  fwrite(&uiTotal, 4u, 1u, fp);
  v1 = dword_A768FC;
  if ( dword_A768FC )
  {
    while ( 1 )
    {
      v2 = *(_DWORD *)(v1 + 8);
      v1 = *(_DWORD *)v1;
      if ( !*(_DWORD *)v2 )
        break;
      buffer = strlen(*(const char **)v2) + 1;
      if ( fwrite(&buffer, 4u, 1u, fp) != 1
        || fwrite(*(const void **)v2, buffer, 1u, fp) != 1
        || fwrite((const void *)(v2 + 4), 4u, 1u, fp) != 1
        || fwrite((const void *)(v2 + 8), 4u, 1u, fp) != 1 )
      {
        break;
      }
      if ( !v1 )
        goto LABEL_8;
    }
    result = 0;
  }
  else
  {
LABEL_8:
    result = 1;
  }
  return result;
}
// A768FC: using guessed type int dword_A768FC;
// A76904: using guessed type int dword_A76904;

//----- (006A37C0) --------------------------------------------------------
void __cdecl MachineOpt::RemoveAllWinPos()
{
  int v0; // esi@1
  void **v1; // edi@2
  _DWORD *v2; // esi@5
  _DWORD *v3; // ST08_4@6

  v0 = dword_A768FC;
  while ( v0 )
  {
    v1 = *(void ***)(v0 + 8);
    v0 = *(_DWORD *)v0;
    if ( v1 )
    {
      operator delete[](*v1);
      operator delete(v1);
    }
  }
  v2 = (_DWORD *)dword_A768FC;
  if ( dword_A768FC )
  {
    do
    {
      v3 = v2;
      v2 = (_DWORD *)*v2;
      MachineOpt::ms_kWinPosList[2](&MachineOpt::ms_kWinPosList, (char)v3);
    }
    while ( v2 );
  }
  dword_A76904 = 0;
  dword_A768FC = 0;
  dword_A76900 = 0;
}
// A768F8: using guessed type int (__thiscall **MachineOpt::ms_kWinPosList)(void *p, char);
// A768FC: using guessed type int dword_A768FC;
// A76900: using guessed type int dword_A76900;
// A76904: using guessed type int dword_A76904;

//----- (006A3840) --------------------------------------------------------
void __cdecl MachineOpt::CatchOrgGama()
{
  (*((void (__stdcall **)(_DWORD, _DWORD, _DWORD))NiRenderer::ms_pkRenderer[1].vfptr->__vecDelDtor + 22))(
    NiRenderer::ms_pkRenderer[1].vfptr,
    0,
    &MachineOpt::ms_kOrgGamaRamp);
}

//----- (006A3860) --------------------------------------------------------
void __cdecl MachineOpt::RestoreOrgGama()
{
  (*((void (__stdcall **)(_DWORD, _DWORD, _DWORD, _DWORD))NiRenderer::ms_pkRenderer[1].vfptr->__vecDelDtor + 21))(
    NiRenderer::ms_pkRenderer[1].vfptr,
    0,
    0,
    &MachineOpt::ms_kOrgGamaRamp);
}

//----- (006A3880) --------------------------------------------------------
void __cdecl BuildGammaRamp(_D3DGAMMARAMP *rkGammaRamp, float fGamma, float fContrast, float fBrightness)
{
  signed int v4; // edi@1
  char *v5; // esi@1
  float v6; // ST0C_4@2
  int v7; // ST10_4@2
  int v8; // ST10_4@2
  __int16 v9; // ax@6
  int i; // [sp+8h] [bp-4h]@1
  int ia; // [sp+8h] [bp-4h]@2

  v4 = 0;
  i = 0;
  v5 = (char *)rkGammaRamp->blue;
  do
  {
    *(float *)&v7 = (double)i / 255.0;
    v6 = 1.0 / fGamma;
    *(float *)&v8 = pow(*(float *)&v7, v6);
    *(float *)&ia = *(float *)&v8 * fContrast + fBrightness;
    if ( *(float *)&ia >= 0.0 )
    {
      if ( *(float *)&ia > 1.0 )
        *(float *)&ia = 1.0;
    }
    else
    {
      *(float *)&ia = 0.0;
    }
    ++v4;
    v5 += 2;
    v9 = (signed int)(*(float *)&ia * 65535.0);
    *((_WORD *)v5 - 513) = v9;
    *((_WORD *)v5 - 257) = v9;
    *((_WORD *)v5 - 1) = v9;
    i = v4;
  }
  while ( v4 < 256 );
}

//----- (006A3950) --------------------------------------------------------
void __cdecl GammaControl(float fGamma, float fContrast, float fBrightness)
{
  NiRefObjectVtbl *v3; // esi@1
  _D3DGAMMARAMP kGammaRamp; // [sp+10h] [bp-604h]@1

  v3 = NiRenderer::ms_pkRenderer[1].vfptr;
  BuildGammaRamp(&kGammaRamp, fGamma, fContrast, fBrightness);
  (*((void (__stdcall **)(_DWORD, _DWORD, _DWORD, _DWORD))v3->__vecDelDtor + 21))(v3, 0, 0, &kGammaRamp);
}

//----- (006A39C0) --------------------------------------------------------
void __cdecl MachineOpt::SaveSoundOption()
{
  _iobuf *v0; // eax@3
  _iobuf *v1; // esi@3
  char acFileName[256]; // [sp+0h] [bp-104h]@3

  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acFileName, "%s%s", &Folder::m_acSystem, "OptionSound.mco");
  v0 = fopen(acFileName, "wb");
  v1 = v0;
  if ( v0 )
  {
    fwrite(&MachineOpt::ms_kSoundOption, 0x18u, 1u, v0);
    fclose(v1);
  }
}
// A76948: using guessed type struct MachineOpt::SoundOption MachineOpt::ms_kSoundOption;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006A3A40) --------------------------------------------------------
void __cdecl MachineOpt::LoadSoundOption()
{
  _iobuf *v0; // eax@3
  _iobuf *v1; // esi@3
  _iobuf *v2; // eax@9
  _iobuf *v3; // esi@9
  Version kVersion; // [sp+0h] [bp-10Ch]@4
  char acFileName[256]; // [sp+8h] [bp-104h]@3

  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acFileName, "%s%s", &Folder::m_acSystem, "OptionSound.mco");
  v0 = fopen(acFileName, "rb");
  v1 = v0;
  if ( v0 )
  {
    *(_DWORD *)&kVersion.year = 0;
    kVersion.hour = 0;
    fread(&kVersion, 6u, 1u, v0);
    if ( kVersion.year == CURRENT_SOUND_OPTION_VERSION.year
      && kVersion.month == CURRENT_SOUND_OPTION_VERSION.month
      && kVersion.date == CURRENT_SOUND_OPTION_VERSION.date
      && kVersion.hour == CURRENT_SOUND_OPTION_VERSION.hour )
    {
      fclose(v1);
      v2 = fopen(acFileName, "rb");
      v3 = v2;
      if ( v2 )
      {
        fread(&MachineOpt::ms_kSoundOption, 0x18u, 1u, v2);
        fclose(v3);
      }
    }
    else
    {
      fclose(v1);
      MachineOpt::ms_kSoundOption.kVersion = CURRENT_SOUND_OPTION_VERSION;
      dword_A76950 = 50;
      dword_A76954 = 50;
      dword_A76958 = 50;
      dword_A7695C = 50;
    }
  }
}
// A76948: using guessed type struct MachineOpt::SoundOption MachineOpt::ms_kSoundOption;
// A76950: using guessed type int dword_A76950;
// A76954: using guessed type int dword_A76954;
// A76958: using guessed type int dword_A76958;
// A7695C: using guessed type int dword_A7695C;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006A3B90) --------------------------------------------------------
void __thiscall MachineOpt::SoundOption::SoundOption(MachineOpt::SoundOption *this)
{
  this->kVersion.year = 0;
  this->kVersion.hour = 0;
  *(_WORD *)&this->kVersion.month = 0;
  *(_DWORD *)&this->kVersion.year = *(_DWORD *)&CURRENT_SOUND_OPTION_VERSION.year;
  *(_WORD *)&this->kVersion.hour = *(_WORD *)&CURRENT_SOUND_OPTION_VERSION.hour;
  this->uiMasterVolume = 50;
  this->uiBgVolume = 50;
  this->uiEffectVolume = 50;
  this->uiEnvEffectVolume = 50;
}

//----- (006A3BD0) --------------------------------------------------------
void __cdecl MachineOpt::SetGlowEffect(int bEnable)
{
  CDataDocument *v1; // eax@1
  CBaseObject *v2; // eax@1
  CBaseObject *v3; // edi@1
  CRTTI *v4; // eax@2
  CAbstractProperty *v5; // eax@2
  type_info *v6; // ebx@2
  CAbstractProperty *v7; // esi@2
  type_info *v8; // eax@2

  MachineOpt::ms_kGraphicOption.bGlowEnable = bEnable;
  v1 = CDataDocument::Instance();
  v2 = CDataDocument::GetObjectByName(v1, "GlowScreenEffect");
  v3 = v2;
  if ( v2 )
  {
    v4 = (CRTTI *)((int (__thiscall *)(_DWORD))v2->vfptr[1].__vecDelDtor)(v2);
    v5 = CRTTI::FindProperty(v4, "Enable");
    v6 = CPropertyType<bool>::ms_rTypeInfo;
    v7 = v5;
    v8 = v5->vfptr->GetTypeInfo(v5);
    if ( type_info::operator==(v6, v8) )
      ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v7->vfptr[1].GetTypeInfo)(v7, v3, bEnable);
  }
}

//----- (006A3C40) --------------------------------------------------------
void __cdecl MachineOpt::SetLightEffect(int bEnable)
{
  CDataDocument *v1; // eax@1
  CBaseObject *v2; // eax@1
  CBaseObject *v3; // edi@1
  CRTTI *v4; // eax@2
  CAbstractProperty *v5; // eax@2
  type_info *v6; // ebx@2
  CAbstractProperty *v7; // esi@2
  type_info *v8; // eax@2

  MachineOpt::ms_kGraphicOption.bLightEnable = bEnable;
  v1 = CDataDocument::Instance();
  v2 = CDataDocument::GetObjectByName(v1, "WorldSetting");
  v3 = v2;
  if ( v2 )
  {
    v4 = (CRTTI *)((int (__thiscall *)(_DWORD))v2->vfptr[1].__vecDelDtor)(v2);
    v5 = CRTTI::FindProperty(v4, "Ground_DL_Enable");
    v6 = CPropertyType<bool>::ms_rTypeInfo;
    v7 = v5;
    v8 = v5->vfptr->GetTypeInfo(v5);
    if ( type_info::operator==(v6, v8) )
      ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v7->vfptr[1].GetTypeInfo)(v7, v3, bEnable);
  }
}

//----- (006A3CB0) --------------------------------------------------------
void __cdecl MachineOpt::MakeDefaultOptFile()
{
  const char *v0; // eax@3
  _iobuf *v1; // eax@3
  _iobuf *v2; // esi@3

  if ( !Folder::m_bInit )
    Folder::Init();
  v0 = Folder::Merge(&Folder::m_acSystem, "FPLIST.ons");
  v1 = fopen(v0, "wb");
  v2 = v1;
  if ( v1 )
  {
    fwrite(&MachineOpt::ms_kUserLoginOption, 0x6Eu, 1u, v1);
    fclose(v2);
  }
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006A3D00) --------------------------------------------------------
void __thiscall MachineOpt::GraphicOption::GraphicOption(MachineOpt::GraphicOption *this)
{
  this->m_kVersion.year = 0;
  this->fViewTerrainLength = 5000.0;
  *(_WORD *)&this->m_kVersion.month = 0;
  this->m_kVersion.hour = 0;
  MachineOpt::GraphicOption::SetDefault(this);
}

//----- (006A3D30) --------------------------------------------------------
void __thiscall MachineOpt::GameOption::GameOption(MachineOpt::GameOption *this)
{
  this->m_kVersion.year = 0;
  *(_WORD *)&this->m_kVersion.month = 0;
  this->m_kVersion.hour = 0;
  MachineOpt::GameOption::SetDefault(this);
}

//----- (006A3D50) --------------------------------------------------------
char __cdecl MachineOpt::Load()
{
  MachineOpt::LoadGraphicOption();
  MachineOpt::LoadSoundOption();
  return 1;
}

//----- (006A3D60) --------------------------------------------------------
char __cdecl MachineOpt::Save()
{
  MachineOpt::SaveGraphicOption();
  MachineOpt::SaveSoundOption();
  return 1;
}

//----- (006A3D80) --------------------------------------------------------
char __cdecl MachineOpt::RegistereWinPostion(PgWin *pkWin)
{
  PgWin *v1; // esi@1
  char *v2; // ebx@1
  char result; // al@2
  unsigned int v4; // edi@3
  signed int v5; // eax@3
  double v6; // st6@3
  unsigned int v7; // edi@3
  MachineOpt::WinPos *v8; // eax@3
  MachineOpt::WinPos *v9; // eax@4
  int v10; // eax@5
  int v11; // esi@5
  int v12; // eax@7
  float fYPosRate; // [sp+1Ch] [bp-10h]@3
  float fXPosRate; // [sp+34h] [bp+8h]@3

  v1 = pkWin;
  v2 = (char *)((int (__thiscall *)(PgWin *))pkWin->vfptr[34].__vecDelDtor)(pkWin);
  if ( *v2 )
  {
    v4 = PgWin::ms_uiScreenWidth;
    v5 = ((int (__thiscall *)(PgWin *))pkWin->vfptr[41].__vecDelDtor)(pkWin);
    v6 = (double)v4;
    v7 = PgWin::ms_uiScreenHeight;
    fXPosRate = (double)v5 / v6;
    fYPosRate = (double)((int (__thiscall *)(PgWin *))v1->vfptr[42].__vecDelDtor)(v1) / (double)v7;
    v8 = MachineOpt::GetWinPosInList(v1);
    if ( v8 )
    {
      v8->m_fXPosRate = fXPosRate;
      v8->m_fYPosRate = fYPosRate;
      result = 1;
    }
    else
    {
      v9 = (MachineOpt::WinPos *)operator new(0xCu);
      if ( v9 )
      {
        MachineOpt::WinPos::WinPos(v9, v2, fXPosRate, fYPosRate);
        v11 = v10;
      }
      else
      {
        v11 = 0;
      }
      v12 = ((int (__thiscall *)(int (__thiscall ***)(void *, char)))MachineOpt::ms_kWinPosList[1])(&MachineOpt::ms_kWinPosList);
      *(_DWORD *)(v12 + 8) = v11;
      *(_DWORD *)v12 = 0;
      *(_DWORD *)(v12 + 4) = dword_A76900;
      if ( dword_A76900 )
      {
        *(_DWORD *)dword_A76900 = v12;
        ++dword_A76904;
        dword_A76900 = v12;
        result = 1;
      }
      else
      {
        ++dword_A76904;
        dword_A768FC = v12;
        dword_A76900 = v12;
        result = 1;
      }
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A768F8: using guessed type int (__thiscall **MachineOpt::ms_kWinPosList)(void *p, char);
// A768FC: using guessed type int dword_A768FC;
// A76900: using guessed type int dword_A76900;
// A76904: using guessed type int dword_A76904;

//----- (006A3F10) --------------------------------------------------------
char __cdecl MachineOpt::SetWinPostion(PgWin *pkWin)
{
  MachineOpt::WinPos *v1; // esi@1
  char result; // al@2
  signed int v3; // ST04_4@3
  signed int v4; // ST00_4@3

  v1 = MachineOpt::GetWinPosInList(pkWin);
  if ( v1 )
  {
    v3 = (signed int)(v1->m_fYPosRate * (double)PgWin::ms_uiScreenHeight);
    v4 = (signed int)(v1->m_fXPosRate * (double)PgWin::ms_uiScreenWidth);
    ((void (__thiscall *)(_DWORD))pkWin->vfptr[77].__vecDelDtor)(pkWin);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 6A3F10: could not find valid save-restore pair for ebx

//----- (006A3F90) --------------------------------------------------------
char __cdecl MachineOpt::LoadWinPos(_iobuf *fp)
{
  unsigned int v1; // edi@1
  MachineOpt::WinPos *v2; // eax@2
  MachineOpt::WinPos *v3; // esi@3
  int v4; // eax@6
  char result; // al@10
  unsigned int uiTotal; // [sp+Ch] [bp-4h]@1

  MachineOpt::RemoveAllWinPos();
  fread(&uiTotal, 4u, 1u, fp);
  v1 = 0;
  if ( uiTotal )
  {
    while ( 1 )
    {
      v2 = (MachineOpt::WinPos *)operator new(0xCu);
      if ( v2 )
      {
        v2->m_pcWinName = 0;
        v3 = v2;
      }
      else
      {
        v3 = 0;
      }
      if ( !MachineOpt::WinPos::Load(v3, fp) )
        break;
      v4 = ((int (__thiscall *)(_DWORD))MachineOpt::ms_kWinPosList[1])(&MachineOpt::ms_kWinPosList);
      *(_DWORD *)(v4 + 8) = v3;
      *(_DWORD *)v4 = 0;
      *(_DWORD *)(v4 + 4) = dword_A76900;
      if ( dword_A76900 )
        *(_DWORD *)dword_A76900 = v4;
      else
        dword_A768FC = v4;
      ++dword_A76904;
      ++v1;
      dword_A76900 = v4;
      if ( v1 >= uiTotal )
        goto LABEL_10;
    }
    if ( v3 )
    {
      operator delete[](v3->m_pcWinName);
      operator delete(v3);
    }
    result = 0;
  }
  else
  {
LABEL_10:
    result = 1;
  }
  return result;
}
// A768F8: using guessed type int (__thiscall **MachineOpt::ms_kWinPosList)(void *p, char);
// A768FC: using guessed type int dword_A768FC;
// A76900: using guessed type int dword_A76900;
// A76904: using guessed type int dword_A76904;

//----- (006A4050) --------------------------------------------------------
void __cdecl MachineOpt::SetCurGama(float fGama)
{
  NiRefObjectVtbl *v1; // esi@1
  _D3DGAMMARAMP rkGammaRamp; // [sp+10h] [bp-604h]@1

  MachineOpt::ms_kGraphicOption.fCurGama = fGama;
  v1 = NiRenderer::ms_pkRenderer[1].vfptr;
  BuildGammaRamp(&rkGammaRamp, fGama, 1.0, 0.0);
  (*((void (__stdcall **)(_DWORD, _DWORD, _DWORD, _DWORD))v1->__vecDelDtor + 21))(v1, 0, 0, &rkGammaRamp);
}

//----- (006A40C0) --------------------------------------------------------
void __cdecl MachineOpt::SetViewOutLine(bool bView)
{
  MachineOpt::ms_kGraphicOption.bViewOutLine = bView;
  if ( Engine3D::ms_spToonExtraData )
    Engine3D::ms_spToonExtraData->m_bOn = bView;
  CharMgr::OutLineEnable(&g_kCharMgr, bView);
}

//----- (006A40F0) --------------------------------------------------------
char __cdecl MachineOpt::LoadUserInfo()
{
  _iobuf *v0; // eax@3
  _iobuf *v1; // esi@3
  char result; // al@4
  signed int v3; // edi@5
  int v4; // edi@5
  signed int v5; // ebx@6
  char *v6; // eax@7
  int v7; // ebx@7
  int v8; // [sp-Ch] [bp-1C0h]@3
  int v9; // [sp-8h] [bp-1BCh]@3
  unsigned int v10; // [sp-4h] [bp-1B8h]@0
  MachineOpt::UserLoginOption data; // [sp+0h] [bp-1B4h]@8
  char acFileName[256]; // [sp+70h] [bp-144h]@3
  char userName[64]; // [sp+170h] [bp-44h]@7

  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acFileName, "%s%s", &Folder::m_acSystem, "FPLIST.ons");
  v0 = fopen(acFileName, "rb");
  v1 = v0;
  if ( v0 )
  {
    fseek(v0, 0, 2);
    v3 = ftell(v1);
    fseek(v1, 0, 0);
    v4 = v3 / 110;
    if ( v4 > 100 || (fseek(v1, 0, 2), v5 = ftell(v1), fseek(v1, 0, 0), v5 % 110) )
    {
      fclose(v1);
      MachineOpt::UserLoginOption::SetDefault(&MachineOpt::ms_kUserLoginOption);
      result = 0;
    }
    else
    {
      userName[0] = 0;
      memset(&userName[1], 0, 0x3Fu);
      v6 = (char *)((int (__stdcall *)(signed int, int, int))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)(
                     64,
                     v8,
                     v9);
      strncpy(userName, v6, v10);
      v7 = 0;
      if ( v4 <= 0 )
      {
LABEL_11:
        MachineOpt::UserLoginOption::SetDefault(&MachineOpt::ms_kUserLoginOption);
      }
      else
      {
        while ( 1 )
        {
          memset(data.username, 0, 0x6Eu);
          fread(&data, 0x6Eu, 1u, v1);
          if ( !&data )
          {
            fclose(v1);
            return 0;
          }
          if ( !strncmp(userName, data.username, 0x40u) )
            break;
          if ( ++v7 >= v4 )
            goto LABEL_11;
        }
        MachineOpt::UserLoginOption::operator=(&MachineOpt::ms_kUserLoginOption, &data);
      }
      fclose(v1);
      result = 1;
    }
  }
  else
  {
    MachineOpt::UserLoginOption::SetDefault(&MachineOpt::ms_kUserLoginOption);
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006A42D0) --------------------------------------------------------
char __usercall MachineOpt::SaveUserInfo@<al>(int a1@<ebx>, int a2@<edi>)
{
  _iobuf *v2; // eax@3
  _iobuf *v3; // esi@3
  int v5; // ST28_4@5
  signed int v6; // edi@5
  int v7; // edi@5
  char *v8; // eax@5
  signed int v9; // ebx@6
  int v10; // ebx@7
  MachineOpt::UserLoginOption *v11; // [sp-10h] [bp-1C4h]@13
  unsigned int v12; // [sp-4h] [bp-1B8h]@0
  _iobuf *v13; // [sp-4h] [bp-1B8h]@13
  MachineOpt::UserLoginOption data; // [sp+0h] [bp-1B4h]@7
  char acFileName[256]; // [sp+70h] [bp-144h]@3
  char userName[64]; // [sp+170h] [bp-44h]@5

  if ( !Folder::m_bInit )
    Folder::Init();
  sprintf(acFileName, "%s%s", &Folder::m_acSystem, "FPLIST.ons");
  v2 = fopen(acFileName, "rb+");
  v3 = v2;
  if ( !v2 )
  {
    MachineOpt::MakeDefaultOptFile();
    return 0;
  }
  v5 = a2;
  fseek(v2, 0, 2);
  v6 = ftell(v3);
  fseek(v3, 0, 0);
  v7 = v6 / 110;
  userName[0] = 0;
  memset(&userName[1], 0, 0x3Fu);
  v8 = (char *)((int (__stdcall *)(signed int, int, int))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)(64, v5, a1);
  strncpy(userName, v8, v12);
  if ( v7 <= 100 )
  {
    fseek(v3, 0, 2);
    v9 = ftell(v3);
    fseek(v3, 0, 0);
    if ( !(v9 % 110) )
    {
      v10 = 0;
      data.u32NewBieFlags.value = 0;
      MachineOpt::UserLoginOption::SetDefault(&data);
      if ( v7 <= 0 )
      {
LABEL_10:
        if ( v7 == 100 )
        {
          fclose(v3);
          MachineOpt::MakeDefaultOptFile();
          fclose(v3);
          return 1;
        }
        memset(data.username, 0, 0x6Eu);
        MachineOpt::UserLoginOption::operator=(&data, &MachineOpt::ms_kUserLoginOption);
        fseek(v3, 0, 2);
        if ( !&data )
          goto LABEL_17;
        v13 = v3;
        v11 = &data;
      }
      else
      {
        while ( 1 )
        {
          fread(&data, 0x6Eu, 1u, v3);
          if ( !strncmp(data.username, userName, 0x40u) )
            break;
          if ( ++v10 >= v7 )
            goto LABEL_10;
        }
        fseek(v3, -110, 1);
        if ( !&MachineOpt::ms_kUserLoginOption )
          goto LABEL_17;
        v13 = v3;
        v11 = &MachineOpt::ms_kUserLoginOption;
      }
      fwrite(v11, 0x6Eu, 1u, v13);
LABEL_17:
      fclose(v3);
      return 1;
    }
  }
  fclose(v3);
  MachineOpt::MakeDefaultOptFile();
  return 0;
}
// 6A42D0: could not find valid save-restore pair for ebx
// 6A42D0: could not find valid save-restore pair for edi
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006A4500) --------------------------------------------------------
void __cdecl MachineOpt::KeyMapConvertOldtoNew()
{
  std::_List_nod<int,std::allocator<int> >::_Node *v0; // eax@1
  int v1; // edi@2
  std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *v2; // eax@3
  GameFrameWork *v3; // eax@5
  std::_List_nod<int,std::allocator<int> >::_Node *v4; // eax@7
  std::_List_nod<int,std::allocator<int> >::_Node *v5; // ecx@7
  std::_List_nod<int,std::allocator<int> >::_Node *v6; // esi@8
  std::_List_nod<int,std::allocator<int> >::_Node *v7; // eax@9
  std::_List_nod<int,std::allocator<int> >::_Node *v8; // ecx@9
  std::_List_nod<int,std::allocator<int> >::_Node *v9; // esi@10
  std::exception pExceptionObject; // [sp+10h] [bp-2Ch]@13
  std::list<int,std::allocator<int> > lstChange; // [sp+1Ch] [bp-20h]@1
  char *_What; // [sp+28h] [bp-14h]@13
  int i; // [sp+2Ch] [bp-10h]@2
  int v14; // [sp+38h] [bp-4h]@2

  lstChange._Mysize = 0;
  v0 = (std::_List_nod<int,std::allocator<int> >::_Node *)operator new(0xCu);
  if ( !v0 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  lstChange._Myhead = v0;
  v0->_Next = v0;
  lstChange._Myhead->_Prev = lstChange._Myhead;
  v1 = 0;
  v14 = 0;
  i = 0;
  do
  {
    v2 = std::_List_val<char *,std::allocator<char *>>::_Buynode(
           (std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *)lstChange._Myhead,
           (std::_List_nod<ItemViewDummy *,std::allocator<ItemViewDummy *> >::_Node *)lstChange._Myhead->_Prev,
           (ItemViewDummy *const *)&i);
    if ( 1073741822 - lstChange._Mysize < 1 )
      std::_Xlength_error("list<T> too long");
    ++lstChange._Mysize;
    lstChange._Myhead->_Prev = (std::_List_nod<int,std::allocator<int> >::_Node *)v2;
    ++v1;
    v2->_Prev->_Next = v2;
    i = v1;
  }
  while ( v1 < 95 );
  v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v3 )
    GameFrameWork::SendKeyRemappingReq(v3, &lstChange);
  v4 = lstChange._Myhead->_Next;
  lstChange._Myhead->_Next = lstChange._Myhead;
  lstChange._Myhead->_Prev = lstChange._Myhead;
  v5 = lstChange._Myhead;
  lstChange._Mysize = 0;
  if ( v4 != lstChange._Myhead )
  {
    do
    {
      v6 = v4->_Next;
      operator delete(v4);
      v5 = lstChange._Myhead;
      v4 = v6;
    }
    while ( v6 != lstChange._Myhead );
  }
  v7 = v5->_Next;
  v5->_Next = v5;
  lstChange._Myhead->_Prev = lstChange._Myhead;
  v8 = lstChange._Myhead;
  lstChange._Mysize = 0;
  if ( v7 != lstChange._Myhead )
  {
    do
    {
      v9 = v7->_Next;
      operator delete(v7);
      v8 = lstChange._Myhead;
      v7 = v9;
    }
    while ( v9 != lstChange._Myhead );
  }
  operator delete(v8);
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (006A4650) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>::~NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>(NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>::`vftable';
}
// 9BE80C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>::`vftable')(void *p, char);

//----- (006A4660) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BE80C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>::`vftable')(void *p, char);

//----- (006A4690) --------------------------------------------------------
MachineOpt::UserLoginOption *__thiscall MachineOpt::UserLoginOption::operator=(MachineOpt::UserLoginOption *this, MachineOpt::UserLoginOption *__that)
{
  MachineOpt::UserLoginOption *result; // eax@1
  MachineOpt::UserLoginOption *v3; // esi@1
  signed int v4; // edx@1

  result = this;
  v3 = this;
  v4 = 64;
  do
  {
    v3->username[0] = v3->username[(char *)__that - (char *)this];
    v3 = (MachineOpt::UserLoginOption *)((char *)v3 + 1);
    --v4;
  }
  while ( v4 );
  this->bFriendAddAllow = __that->bFriendAddAllow;
  this->BufXPos = __that->BufXPos;
  this->BufYPos = __that->BufYPos;
  this->BufWidth = __that->BufWidth;
  this->BufHeight = __that->BufHeight;
  this->DBufXPos = __that->DBufXPos;
  this->DBufYPos = __that->DBufYPos;
  this->DBufWidth = __that->DBufWidth;
  this->DBufHeight = __that->DBufHeight;
  this->FullMapAlpha = __that->FullMapAlpha;
  this->u32NewBieFlags.value = __that->u32NewBieFlags.value;
  this->ChargedBufXPos = __that->ChargedBufXPos;
  this->ChargedBufYPos = __that->ChargedBufYPos;
  this->ChargedBufWidth = __that->ChargedBufWidth;
  this->ChargedBufHeight = __that->ChargedBufHeight;
  this->bTargetOfTerget = __that->bTargetOfTerget;
  return result;
}

//----- (006A4730) --------------------------------------------------------
MachineOpt::WinPos *__cdecl MachineOpt::GetWinPosInList(PgWin *pkWin)
{
  const char *v1; // edi@1
  MachineOpt::WinPos *result; // eax@2
  int v3; // esi@3

  v1 = (const char *)((int (*)(void))pkWin->vfptr[34].__vecDelDtor)();
  if ( *v1 )
  {
    v3 = dword_A768FC;
    if ( dword_A768FC )
    {
      while ( 1 )
      {
        result = *(MachineOpt::WinPos **)(v3 + 8);
        v3 = *(_DWORD *)v3;
        if ( !strcmp(v1, result->m_pcWinName) )
          break;
        if ( !v3 )
          goto LABEL_6;
      }
    }
    else
    {
LABEL_6:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A768FC: using guessed type int dword_A768FC;

//----- (006A47B0) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *> *v2; // edi@1
  NiTListItem<MachineOpt::WinPos *> *v3; // esi@1
  NiTListItem<MachineOpt::WinPos *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BE80C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>::`vftable')(void *p, char);
// 9BE81C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>::`vftable')(void *p, char);

//----- (006A4840) --------------------------------------------------------
void __thiscall NiTPointerList<MachineOpt::WinPos *>::~NiTPointerList<MachineOpt::WinPos *>(NiTPointerList<MachineOpt::WinPos *> *this)
{
  NiTPointerList<MachineOpt::WinPos *> *v1; // edi@1
  NiTListItem<MachineOpt::WinPos *> *v2; // esi@1
  NiTListItem<MachineOpt::WinPos *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>::`vftable';
}
// 9BE80C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>::`vftable')(void *p, char);
// 9BE81C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>::`vftable')(void *p, char);

//----- (006A48C0) --------------------------------------------------------
PgTList<MachineOpt::WinPos *> *__thiscall PgTList<MachineOpt::WinPos *>::`vector deleting destructor'(PgTList<MachineOpt::WinPos *> *this, unsigned int a2)
{
  PgTList<MachineOpt::WinPos *> *v2; // edi@1
  NiTListItem<MachineOpt::WinPos *> *v3; // esi@1
  NiTListItem<MachineOpt::WinPos *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>Vtbl *)&PgTList<MachineOpt::WinPos *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BE80C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,MachineOpt::WinPos *>::`vftable')(void *p, char);
// 9BE83C: using guessed type int (__thiscall *PgTList<MachineOpt::WinPos *>::`vftable')(void *p, char);

//----- (006A4950) --------------------------------------------------------
OptMgr *__thiscall Option::`scalar deleting destructor'(OptMgr *this, unsigned int a2)
{
  OptMgr *v2; // esi@1

  v2 = this;
  this->vfptr = (OptionVtbl *)&Option::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BE84C: using guessed type int (__thiscall *Option::`vftable')(void *p, char);

//----- (006A4980) --------------------------------------------------------
void __thiscall OptMgr::~OptMgr(OptMgr *this)
{
  this->vfptr = (OptionVtbl *)&Option::`vftable';
}
// 9BE84C: using guessed type int (__thiscall *Option::`vftable')(void *p, char);

//----- (006A4990) --------------------------------------------------------
char OptMgr::SaveChar()
{
  return 1;
}

//----- (006A49A0) --------------------------------------------------------
char OptMgr::LoadChar()
{
  return 1;
}

//----- (006A49B0) --------------------------------------------------------
char OptMgr::SaveUser()
{
  return 1;
}

//----- (006A49C0) --------------------------------------------------------
char OptMgr::LoadUser()
{
  return 1;
}

//----- (006A49D0) --------------------------------------------------------
char OptMgr::SaveMachine()
{
  return 1;
}

//----- (006A49E0) --------------------------------------------------------
char OptMgr::LoadMachine()
{
  return 1;
}

//----- (006A49F0) --------------------------------------------------------
void __thiscall OptMgr::OptMgr(OptMgr *this)
{
  this->m_kVersion.year = 0;
  *(_WORD *)&this->m_kVersion.month = 0;
  this->m_kVersion.hour = 0;
  this->vfptr = (OptionVtbl *)&OptMgr::`vftable';
}
// 9BE864: using guessed type int (__thiscall *OptMgr::`vftable')(void *p, char);

//----- (006A4A10) --------------------------------------------------------
char __cdecl ActSkillViewInfoTab::CheckActionTable()
{
  char result; // al@2
  int v1; // eax@3
  unsigned int v2; // esi@5
  char *v3; // eax@6
  signed int v4; // edi@7
  char *v5; // esi@7
  char v6; // bl@9
  ActionInfoSet *v7; // eax@9
  ActionInfoSet *v8; // eax@10
  signed int v9; // edi@12
  char *v10; // esi@12
  char v11; // bl@14
  ActionInfoSet *v12; // eax@14
  ActionInfoSet *v13; // eax@15
  signed int v14; // edi@17
  char *v15; // esi@17
  char v16; // bl@19
  ActionInfoSet *v17; // eax@19
  ActionInfoSet *v18; // eax@20
  ActiveSkillViewInfo *pkSkillInfo; // [sp+0h] [bp-24h]@6
  unsigned int i; // [sp+4h] [bp-20h]@5
  int aiChrClsTab[6]; // [sp+8h] [bp-1Ch]@5

  if ( ActionInfoTable::GetCharActionInfo(11, 0)
    && (v1 = *(_DWORD *)(ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable + 56)) != 0
    && *(_DWORD *)(v1 + 40) )
  {
    v2 = 0;
    aiChrClsTab[0] = 11;
    aiChrClsTab[1] = 1;
    aiChrClsTab[2] = 6;
    aiChrClsTab[3] = 16;
    aiChrClsTab[4] = 21;
    aiChrClsTab[5] = 26;
    i = 0;
    if ( ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::GetTotal() )
    {
      do
      {
        v3 = CDataReader::GetRecord(
               (CDataReader *)(ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable + 4),
               v2);
        pkSkillInfo = (ActiveSkillViewInfo *)v3;
        if ( *(_WORD *)v3 < 0x7D0u )
        {
          v4 = 0;
          v5 = v3 + 95;
          do
          {
            if ( *v5 != 45 )
            {
              v6 = aiChrClsTab[v4];
              v7 = ActionInfoTable::GetCharActionInfo(aiChrClsTab[v4], 0);
              if ( ActionInfoSet::IsActionExist(v7, v5) )
              {
                v8 = ActionInfoTable::GetCharActionInfo(v6, 1);
                ActionInfoSet::IsActionExist(v8, v5);
              }
            }
            ++v4;
          }
          while ( v4 < 6 );
          v9 = 0;
          v10 = pkSkillInfo->CasAction;
          do
          {
            if ( *v10 != 45 )
            {
              v11 = aiChrClsTab[v9];
              v12 = ActionInfoTable::GetCharActionInfo(aiChrClsTab[v9], 0);
              if ( ActionInfoSet::IsActionExist(v12, v10) )
              {
                v13 = ActionInfoTable::GetCharActionInfo(v11, 1);
                ActionInfoSet::IsActionExist(v13, v10);
              }
            }
            ++v9;
          }
          while ( v9 < 6 );
          v14 = 0;
          v15 = pkSkillInfo->SwingAction;
          do
          {
            if ( *v15 != 45 )
            {
              v16 = aiChrClsTab[v14];
              v17 = ActionInfoTable::GetCharActionInfo(aiChrClsTab[v14], 0);
              if ( ActionInfoSet::IsActionExist(v17, v15) )
              {
                v18 = ActionInfoTable::GetCharActionInfo(v16, 1);
                ActionInfoSet::IsActionExist(v18, v15);
              }
            }
            ++v14;
          }
          while ( v14 < 6 );
          v2 = i;
        }
        i = ++v2;
      }
      while ( v2 < ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::GetTotal() );
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8CAA0: using guessed type int ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable;

//----- (006A4BB0) --------------------------------------------------------
unsigned int __cdecl Skill::GetTotalLearnActSkill()
{
  return Skill::ms_uiTotalLearnActSkill;
}
// B5BBA0: using guessed type unsigned int Skill::ms_uiTotalLearnActSkill;

//----- (006A4BC0) --------------------------------------------------------
Skill::LearnSkillInfo *__cdecl Skill::GetLearnActSkillInfo(unsigned int uiIndex)
{
  Skill::LearnSkillInfo *result; // eax@2

  if ( uiIndex < Skill::ms_uiTotalLearnActSkill )
    result = (Skill::LearnSkillInfo *)(6 * uiIndex + 11892048);
  else
    result = 0;
  return result;
}
// B5BBA0: using guessed type unsigned int Skill::ms_uiTotalLearnActSkill;

//----- (006A4BE0) --------------------------------------------------------
char __cdecl Skill::IsLearnSkill(unsigned __int16 kSkillID)
{
  unsigned int v1; // eax@1
  char *v2; // ecx@2
  char result; // al@5

  v1 = 0;
  if ( Skill::ms_uiTotalLearnActSkill )
  {
    v2 = Skill::ms_akLearnActSkillInfo;
    while ( *(_WORD *)v2 != kSkillID )
    {
      ++v1;
      v2 += 6;
      if ( v1 >= Skill::ms_uiTotalLearnActSkill )
        goto LABEL_5;
    }
    result = 1;
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}
// B5BBA0: using guessed type unsigned int Skill::ms_uiTotalLearnActSkill;

//----- (006A4C20) --------------------------------------------------------
char __cdecl Skill::IsLearnPassiveSkill(unsigned __int16 kSkillID)
{
  int v1; // eax@1
  char result; // al@4

  v1 = 0;
  if ( Skill::ms_uiTotalLearnPassiveSkill )
  {
    while ( *(_WORD *)&Skill::ms_akLearnPassiveSkillInfo[2 * v1] != kSkillID )
    {
      if ( ++v1 >= Skill::ms_uiTotalLearnPassiveSkill )
        goto LABEL_4;
    }
    result = 1;
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}
// B5BBB8: using guessed type unsigned int Skill::ms_uiTotalLearnPassiveSkill;

//----- (006A4C50) --------------------------------------------------------
char __cdecl Skill::UnLearnSkill(unsigned __int16 kSkillID)
{
  unsigned int v1; // edi@1
  char result; // al@2
  char v3; // dl@3
  char *v4; // ecx@4
  char *v5; // eax@4
  unsigned int v6; // esi@4
  char dst; // [sp+4h] [bp-5DC4h]@3

  v1 = Skill::ms_uiTotalLearnProductSkill;
  if ( Skill::ms_uiTotalLearnProductSkill )
  {
    memcpy(&dst, Skill::ms_akLearnProductSkillInfo, 8 * Skill::ms_uiTotalLearnProductSkill);
    memset(Skill::ms_akLearnProductSkillInfo, 0, 8 * v1);
    v3 = 0;
    if ( !v1 )
      goto LABEL_14;
    v4 = Skill::ms_akLearnProductSkillInfo;
    v5 = &dst;
    v6 = v1;
    do
    {
      if ( *(_WORD *)v5 == kSkillID )
      {
        v3 = 1;
      }
      else
      {
        *(_DWORD *)v4 = *(_DWORD *)v5;
        *((_DWORD *)v4 + 1) = *((_DWORD *)v5 + 1);
        v4 += 8;
      }
      v5 += 8;
      --v6;
    }
    while ( v6 );
    if ( v3 )
    {
      Skill::ms_uiTotalLearnProductSkill = v1 - 1;
      result = 1;
    }
    else
    {
LABEL_14:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// B5BBBC: using guessed type unsigned int Skill::ms_uiTotalLearnProductSkill;

//----- (006A4D20) --------------------------------------------------------
char __cdecl Skill::UnLearnActiveSkill(unsigned __int16 kSkillID)
{
  unsigned int v1; // edi@1
  char result; // al@2
  char v3; // dl@3
  char *v4; // ecx@4
  char *v5; // eax@4
  unsigned int v6; // esi@4
  char dst; // [sp+4h] [bp-4654h]@3

  v1 = Skill::ms_uiTotalLearnActSkill;
  if ( Skill::ms_uiTotalLearnActSkill )
  {
    memcpy(&dst, Skill::ms_akLearnActSkillInfo, 6 * Skill::ms_uiTotalLearnActSkill);
    memset(Skill::ms_akLearnActSkillInfo, 0, 6 * v1);
    v3 = 0;
    if ( !v1 )
      goto LABEL_14;
    v4 = Skill::ms_akLearnActSkillInfo;
    v5 = &dst;
    v6 = v1;
    do
    {
      if ( *(_WORD *)v5 == kSkillID )
      {
        v3 = 1;
      }
      else
      {
        *(_DWORD *)v4 = *(_DWORD *)v5;
        *((_WORD *)v4 + 2) = *((_WORD *)v5 + 2);
        v4 += 6;
      }
      v5 += 6;
      --v6;
    }
    while ( v6 );
    if ( v3 )
    {
      Skill::ms_uiTotalLearnActSkill = v1 - 1;
      result = 1;
    }
    else
    {
LABEL_14:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// B5BBA0: using guessed type unsigned int Skill::ms_uiTotalLearnActSkill;

//----- (006A4DF0) --------------------------------------------------------
char __cdecl Skill::UnLearnPassiveSkill(unsigned __int16 kSkillID)
{
  unsigned int v1; // edi@1
  char result; // al@2
  char v3; // bl@3
  unsigned int v4; // ecx@3
  char *v5; // edx@4
  __int16 v6; // ax@5
  _WORD dst[3000]; // [sp+4h] [bp-1774h]@3

  v1 = Skill::ms_uiTotalLearnPassiveSkill;
  if ( Skill::ms_uiTotalLearnPassiveSkill )
  {
    memcpy((char *)dst, Skill::ms_akLearnPassiveSkillInfo, 2 * Skill::ms_uiTotalLearnPassiveSkill);
    memset(Skill::ms_akLearnPassiveSkillInfo, 0, 2 * v1);
    v3 = 0;
    v4 = 0;
    if ( !v1 )
      goto LABEL_14;
    v5 = Skill::ms_akLearnPassiveSkillInfo;
    do
    {
      v6 = dst[v4];
      if ( v6 == kSkillID )
      {
        v3 = 1;
      }
      else
      {
        *(_WORD *)v5 = v6;
        v5 += 2;
      }
      ++v4;
    }
    while ( v4 < v1 );
    if ( v3 )
    {
      Skill::ms_uiTotalLearnPassiveSkill = v1 - 1;
      result = 1;
    }
    else
    {
LABEL_14:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// B5BBB8: using guessed type unsigned int Skill::ms_uiTotalLearnPassiveSkill;

//----- (006A4EB0) --------------------------------------------------------
unsigned int __cdecl Skill::GetRestEmpowerPoint()
{
  return Skill::ms_uiRestEmpowerPoint;
}
// B5BBA4: using guessed type unsigned int Skill::ms_uiRestEmpowerPoint;

//----- (006A4EC0) --------------------------------------------------------
void __cdecl Skill::SetRestEmpowerPoint(unsigned int uiPoint)
{
  Skill::ms_uiRestEmpowerPoint = uiPoint;
}
// B5BBA4: using guessed type unsigned int Skill::ms_uiRestEmpowerPoint;

//----- (006A4ED0) --------------------------------------------------------
void __cdecl Skill::SetRestEmpowerPointInEdit(int iPoint)
{
  Skill::ms_uiRestEmpowerPointInEdit = iPoint;
}
// B5BBA8: using guessed type unsigned int Skill::ms_uiRestEmpowerPointInEdit;

//----- (006A4EE0) --------------------------------------------------------
unsigned int __cdecl Skill::GetRestEmpowerPointInEdit()
{
  return Skill::ms_uiRestEmpowerPointInEdit;
}
// B5BBA8: using guessed type unsigned int Skill::ms_uiRestEmpowerPointInEdit;

//----- (006A4EF0) --------------------------------------------------------
unsigned int __cdecl Skill::GetAntiEmpowerPoint()
{
  return Skill::ms_uiAntiEmpowerPoint;
}
// B5BBAC: using guessed type unsigned int Skill::ms_uiAntiEmpowerPoint;

//----- (006A4F00) --------------------------------------------------------
void __cdecl Skill::SetAntiEmpowerPoint(unsigned int uiPoint)
{
  Skill::ms_uiAntiEmpowerPoint = uiPoint;
}
// B5BBAC: using guessed type unsigned int Skill::ms_uiAntiEmpowerPoint;

//----- (006A4F10) --------------------------------------------------------
void __cdecl Skill::SetAntiEmpowerPointInEdit(unsigned int uiPoint)
{
  Skill::ms_uiAntiEmpowerPointInEdit = uiPoint;
}
// B5BBB0: using guessed type unsigned int Skill::ms_uiAntiEmpowerPointInEdit;

//----- (006A4F20) --------------------------------------------------------
unsigned int __cdecl Skill::GetAntiEmpowerPointInEdit()
{
  return Skill::ms_uiAntiEmpowerPointInEdit;
}
// B5BBB0: using guessed type unsigned int Skill::ms_uiAntiEmpowerPointInEdit;

//----- (006A4F30) --------------------------------------------------------
bool __cdecl Skill::GetEmpowerResetable()
{
  return Skill::ms_bResetable;
}
// B5BBB4: using guessed type bool Skill::ms_bResetable;

//----- (006A4F40) --------------------------------------------------------
Skill::LearnSkillInfo *__cdecl Skill::GetLearnActSkillInfo(unsigned __int16 kSkillID)
{
  unsigned int v1; // eax@1
  char *v2; // ecx@2
  Skill::LearnSkillInfo *result; // eax@5

  v1 = 0;
  if ( Skill::ms_uiTotalLearnActSkill )
  {
    v2 = Skill::ms_akLearnActSkillInfo;
    while ( *(_WORD *)v2 != kSkillID )
    {
      ++v1;
      v2 += 6;
      if ( v1 >= Skill::ms_uiTotalLearnActSkill )
        goto LABEL_5;
    }
    result = (Skill::LearnSkillInfo *)(6 * v1 + 11892048);
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}
// B5BBA0: using guessed type unsigned int Skill::ms_uiTotalLearnActSkill;

//----- (006A4F80) --------------------------------------------------------
void __cdecl Skill::ClearLearnActSkillInfo()
{
  unsigned int v0; // ecx@1
  int *v1; // eax@2

  v0 = Skill::ms_uiTotalLearnActSkill;
  if ( Skill::ms_uiTotalLearnActSkill )
  {
    v1 = &dword_B57552;
    do
    {
      *v1 = 0;
      v1 = (int *)((char *)v1 + 6);
      --v0;
    }
    while ( v0 );
  }
}
// B57552: using guessed type int dword_B57552;
// B5BBA0: using guessed type unsigned int Skill::ms_uiTotalLearnActSkill;

//----- (006A4FA0) --------------------------------------------------------
void __cdecl Skill::SetEmpowerResetable(bool bResetable)
{
  Skill::ms_bResetable = bResetable;
}
// B5BBB4: using guessed type bool Skill::ms_bResetable;

//----- (006A4FB0) --------------------------------------------------------
void __cdecl Skill::ClearLearnPassiveSkill()
{
  Skill::ms_uiTotalLearnPassiveSkill = 0;
}
// B5BBB8: using guessed type unsigned int Skill::ms_uiTotalLearnPassiveSkill;

//----- (006A4FC0) --------------------------------------------------------
char __cdecl Skill::LearnPassiveSkill(unsigned __int16 kSkillID)
{
  unsigned int v1; // eax@1
  char result; // al@2

  v1 = Skill::ms_uiTotalLearnPassiveSkill;
  if ( Skill::ms_uiTotalLearnPassiveSkill <= 0xBB8 )
  {
    *(_WORD *)&Skill::ms_akLearnPassiveSkillInfo[2 * Skill::ms_uiTotalLearnPassiveSkill] = kSkillID;
    Skill::ms_uiTotalLearnPassiveSkill = v1 + 1;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// B5BBB8: using guessed type unsigned int Skill::ms_uiTotalLearnPassiveSkill;

//----- (006A4FF0) --------------------------------------------------------
signed __int16 __cdecl Skill::GetLearnPassiveSkillInfo(unsigned int uiIndex)
{
  signed __int16 result; // ax@2

  if ( uiIndex < Skill::ms_uiTotalLearnPassiveSkill )
    result = *(_WORD *)&Skill::ms_akLearnPassiveSkillInfo[2 * uiIndex];
  else
    result = -1;
  return result;
}
// B5BBB8: using guessed type unsigned int Skill::ms_uiTotalLearnPassiveSkill;

//----- (006A5010) --------------------------------------------------------
unsigned int __cdecl Skill::GetTotalLearnPassiveSkill()
{
  return Skill::ms_uiTotalLearnPassiveSkill;
}
// B5BBB8: using guessed type unsigned int Skill::ms_uiTotalLearnPassiveSkill;

//----- (006A5020) --------------------------------------------------------
Skill::LearnProdSkillInfo *__cdecl Skill::GetLearnProductSkill(unsigned int uiIndex)
{
  Skill::LearnProdSkillInfo *result; // eax@2

  if ( uiIndex < Skill::ms_uiTotalLearnProductSkill )
    result = (Skill::LearnProdSkillInfo *)(8 * uiIndex + 11862048);
  else
    result = 0;
  return result;
}
// B5BBBC: using guessed type unsigned int Skill::ms_uiTotalLearnProductSkill;

//----- (006A5040) --------------------------------------------------------
Skill::LearnProdSkillInfo *__cdecl Skill::GetLearnProductSkill(unsigned __int16 kSkillID)
{
  int v1; // eax@1
  Skill::LearnProdSkillInfo *result; // eax@4

  v1 = 0;
  if ( Skill::ms_uiTotalLearnProductSkill )
  {
    while ( *(_WORD *)&Skill::ms_akLearnProductSkillInfo[8 * v1] != kSkillID )
    {
      if ( ++v1 >= Skill::ms_uiTotalLearnProductSkill )
        goto LABEL_4;
    }
    result = (Skill::LearnProdSkillInfo *)(8 * v1 + 11862048);
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}
// B5BBBC: using guessed type unsigned int Skill::ms_uiTotalLearnProductSkill;

//----- (006A5070) --------------------------------------------------------
unsigned int __cdecl Skill::GetTotalLearnProductSkill()
{
  return Skill::ms_uiTotalLearnProductSkill;
}
// B5BBBC: using guessed type unsigned int Skill::ms_uiTotalLearnProductSkill;

//----- (006A5080) --------------------------------------------------------
BOOL __cdecl Skill::IsProduceBaseSkill(unsigned __int16 kSkillID)
{
  return (unsigned __int16)(kSkillID - 29100) <= 0x63u;
}

//----- (006A50A0) --------------------------------------------------------
BOOL __cdecl Skill::IsProduceSkill(unsigned __int16 kSkillID)
{
  return (unsigned __int16)(kSkillID - 20000) <= 0x270Eu;
}

//----- (006A50C0) --------------------------------------------------------
BOOL __cdecl Skill::IsGatherSkill(unsigned __int16 kSkillID)
{
  return (unsigned __int16)(kSkillID - 29000) <= 0x63u;
}

//----- (006A50E0) --------------------------------------------------------
bool __cdecl Skill::IsRideSkill(unsigned __int16 kSkillID)
{
  return kSkillID == 29206;
}

//----- (006A5100) --------------------------------------------------------
Skill::EmpowerInfo *__cdecl Skill::GetEmpowerInfo(Skill::EmpowerInfo *result, unsigned __int16 kSkillID)
{
  Skill::EmpowerInfo v2; // ecx@1
  unsigned int v3; // eax@2
  char *v4; // ecx@3
  Skill::EmpowerInfo *v5; // eax@7
  Skill::EmpowerInfo v6; // ecx@8

  v2 = 0;
  if ( kSkillID >= 0x4E20u )
    goto LABEL_7;
  v3 = 0;
  if ( !Skill::ms_uiTotalLearnActSkill )
  {
LABEL_6:
    v2 = (Skill::EmpowerInfo)::v2;
LABEL_7:
    v5 = result;
    *result = v2;
    return v5;
  }
  v4 = Skill::ms_akLearnActSkillInfo;
  while ( *(_WORD *)v4 != kSkillID )
  {
    ++v3;
    v4 += 6;
    if ( v3 >= Skill::ms_uiTotalLearnActSkill )
      goto LABEL_6;
  }
  v6 = *(Skill::EmpowerInfo *)((char *)&dword_B57552 + 6 * v3);
  v5 = result;
  *result = v6;
  return v5;
}
// B57552: using guessed type int dword_B57552;
// B5BBA0: using guessed type unsigned int Skill::ms_uiTotalLearnActSkill;

//----- (006A5160) --------------------------------------------------------
void __cdecl Skill::Terminate()
{
  NiTListItem<NiPointer<NiDX92DBufferData> > *v0; // esi@1
  NiTListItem<NiPointer<NiDX92DBufferData> > *v1; // ST00_4@2

  v0 = Skill::m_kUseList.m_pkHead;
  if ( Skill::m_kUseList.m_pkHead )
  {
    do
    {
      v1 = v0;
      v0 = v0->m_pkNext;
      Skill::m_kUseList.vfptr->DeleteItem(
        (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *)&Skill::m_kUseList,
        v1);
    }
    while ( v0 );
  }
  Skill::m_kUseList.m_kAllocator.m_uiCount = 0;
  Skill::m_kUseList.m_pkHead = 0;
  Skill::m_kUseList.m_pkTail = 0;
}

//----- (006A51B0) --------------------------------------------------------
char __cdecl Skill::IsLearnProdSkill(int kSkillID)
{
  int v1; // esi@1
  int v2; // ecx@3
  int v3; // eax@4
  const char *v4; // esi@5
  int v6; // eax@8

  v1 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                          kSkillID) )
  {
    if ( (unsigned __int16)kSkillID <= *(_WORD *)(v1 + 200) )
    {
      v2 = *(_DWORD *)(v1 + 196);
      if ( *(_DWORD *)(v2 + 4 * (unsigned __int16)kSkillID) )
      {
        v3 = *(_DWORD *)(v2 + 4 * (unsigned __int16)kSkillID);
        if ( v3 )
        {
          v4 = (const char *)(v3 + 2);
          if ( !strcmp((const char *)(v3 + 2), "Herbing") || !strcmp(v4, "WoodCutting") )
            return 1;
        }
      }
    }
  }
  v6 = 0;
  if ( Skill::ms_uiTotalLearnProductSkill )
  {
    while ( *(_WORD *)&Skill::ms_akLearnProductSkillInfo[8 * v6] != (_WORD)kSkillID )
    {
      if ( ++v6 >= Skill::ms_uiTotalLearnProductSkill )
        return 0;
    }
    return 1;
  }
  return 0;
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
// B5BBBC: using guessed type unsigned int Skill::ms_uiTotalLearnProductSkill;

//----- (006A5290) --------------------------------------------------------
bool __cdecl Skill::LearnSkill(unsigned __int16 kSkillID, Skill::EmpowerInfo *pkInfo, unsigned int dwSkillExp)
{
  unsigned int v3; // esi@1
  bool result; // al@2
  unsigned int v5; // eax@9
  unsigned int v6; // eax@12

  v3 = Skill::ms_uiTotalLearnActSkill;
  if ( Skill::ms_uiTotalLearnActSkill > 0xBB8 )
    return 0;
  if ( kSkillID >= 0x4E20u && kSkillID < 0x7210u || kSkillID == 29206 || kSkillID == 29207 || kSkillID == 29208 )
  {
    v6 = Skill::ms_uiTotalLearnProductSkill;
    *(_WORD *)&Skill::ms_akLearnProductSkillInfo[8 * Skill::ms_uiTotalLearnProductSkill] = kSkillID;
    dword_B50024[2 * v6] = dwSkillExp;
    Skill::ms_uiTotalLearnProductSkill = v6 + 1;
    return 1;
  }
  if ( kSkillID >= 0x7210u )
    return 1;
  v5 = 6 * Skill::ms_uiTotalLearnActSkill;
  *(_WORD *)&Skill::ms_akLearnActSkillInfo[6 * Skill::ms_uiTotalLearnActSkill] = kSkillID;
  if ( pkInfo )
  {
    dword_B57552[v5] = pkInfo->cDamageUp;
    dword_B57552[6 * v3 + 2] = pkInfo->cLongKeepTime;
    dword_B57552[6 * v3 + 3] = pkInfo->cShortCoolTime;
    *(_BYTE *)(v5 + 11892051) = pkInfo->cSmallSp;
    Skill::ms_uiTotalLearnActSkill = v3 + 1;
    result = 1;
  }
  else
  {
    *(_DWORD *)&dword_B57552[v5] = 0;
    Skill::ms_uiTotalLearnActSkill = v3 + 1;
    result = 1;
  }
  return result;
}
// B50024: using guessed type int dword_B50024[];
// B5BBA0: using guessed type unsigned int Skill::ms_uiTotalLearnActSkill;
// B5BBBC: using guessed type unsigned int Skill::ms_uiTotalLearnProductSkill;

//----- (006A5370) --------------------------------------------------------
char __cdecl Skill::IsSkillUsePossible(int kSkillID)
{
  int v1; // esi@1
  __int16 *v2; // eax@2
  int v3; // ecx@5
  NiTListItem<NiPointer<NiDX92DBufferData> > *v4; // ecx@8
  __int16 v5; // dx@9
  NiDX92DBufferData *v6; // eax@10
  char result; // al@13

  v1 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                          kSkillID) )
  {
    if ( (unsigned __int16)kSkillID <= *(_WORD *)(v1 + 200) )
    {
      v3 = *(_DWORD *)(v1 + 196);
      if ( *(_DWORD *)(v3 + 4 * (unsigned __int16)kSkillID) )
        v2 = *(__int16 **)(v3 + 4 * (unsigned __int16)kSkillID);
      else
        v2 = 0;
    }
    else
    {
      v2 = 0;
    }
  }
  else
  {
    v2 = 0;
  }
  v4 = Skill::m_kUseList.m_pkHead;
  if ( Skill::m_kUseList.m_pkHead )
  {
    v5 = *v2;
    while ( 1 )
    {
      v6 = v4->m_element.m_pObject;
      v4 = v4->m_pkNext;
      if ( HIWORD(v6->m_pkBuffer) == v5
        && *(float *)&v6->m_pkPixelFormat - 0.300000011920929 > Timer::ms_fCurTime - *(float *)&v6[1].vfptr )
      {
        break;
      }
      if ( !v4 )
        goto LABEL_13;
    }
    result = 0;
  }
  else
  {
LABEL_13:
    result = 1;
  }
  return result;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (006A5410) --------------------------------------------------------
void __cdecl Skill::AddSysMsg(const char *pcText)
{
  const char *v1; // eax@3
  _iobuf *v2; // esi@3
  char *v3; // edi@4
  char v4; // al@5
  char v5; // [sp-1h] [bp-205h]@4
  char acText[512]; // [sp+0h] [bp-204h]@4

  if ( !Folder::m_bInit )
    Folder::Init();
  v1 = Folder::Merge(&Folder::m_acMain, "Log\\SkillLog.txt");
  v2 = fopen(v1, "a+");
  if ( v2 )
  {
    memset(acText, 0, 0x200u);
    strcpy(acText, pcText);
    v3 = &v5;
    do
      v4 = (v3++)[1];
    while ( v4 );
    *(_WORD *)v3 = 10;
    fwrite(acText, 1u, strlen(acText), v2);
    fclose(v2);
  }
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006A54F0) --------------------------------------------------------
double __cdecl Skill::GetLastCoolTimeByItemActionID(unsigned __int16 kActionID)
{
  NiTListItem<NiPointer<NiDX92DBufferData> > *v1; // eax@1
  NiDX92DBufferData *v2; // ecx@2
  double result; // st7@4
  float v4; // ST00_4@5

  v1 = Skill::m_kUseList.m_pkHead;
  if ( Skill::m_kUseList.m_pkHead )
  {
    while ( 1 )
    {
      v2 = v1->m_element.m_pObject;
      v1 = v1->m_pkNext;
      if ( LOWORD(v2->m_pkBuffer) == kActionID )
        break;
      if ( !v1 )
        goto LABEL_4;
    }
    v4 = *(float *)&v2->m_pkPixelFormat - (Timer::ms_fCurTime - *(float *)&v2[1].vfptr);
    result = v4;
  }
  else
  {
LABEL_4:
    result = 0.0;
  }
  return result;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006A5530) --------------------------------------------------------
double __cdecl Skill::GetLastCoolTime(unsigned __int16 kSkillID)
{
  int v1; // esi@1
  __int16 *v2; // ecx@2
  int v3; // ecx@5
  NiTListItem<NiPointer<NiDX92DBufferData> > *v4; // eax@8
  __int16 v5; // dx@9
  NiDX92DBufferData *v6; // ecx@10
  double result; // st7@12
  float v8; // ST0C_4@13

  v1 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                   + 16))(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable) )
  {
    if ( kSkillID <= *(_WORD *)(v1 + 200) )
    {
      v3 = *(_DWORD *)(v1 + 196);
      if ( *(_DWORD *)(v3 + 4 * kSkillID) )
        v2 = *(__int16 **)(v3 + 4 * kSkillID);
      else
        v2 = 0;
    }
    else
    {
      v2 = 0;
    }
  }
  else
  {
    v2 = 0;
  }
  v4 = Skill::m_kUseList.m_pkHead;
  if ( Skill::m_kUseList.m_pkHead )
  {
    v5 = *v2;
    while ( 1 )
    {
      v6 = v4->m_element.m_pObject;
      v4 = v4->m_pkNext;
      if ( HIWORD(v6->m_pkBuffer) == v5 )
        break;
      if ( !v4 )
        goto LABEL_12;
    }
    v8 = *(float *)&v6->m_pkPixelFormat - (Timer::ms_fCurTime - *(float *)&v6[1].vfptr);
    result = v8;
  }
  else
  {
LABEL_12:
    result = 0.0;
  }
  return result;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (006A55C0) --------------------------------------------------------
void __cdecl Skill::ApplyCoolTimeToInterface()
{
  NiTListItem<NiPointer<NiDX92DBufferData> > *v0; // edi@1
  NiDX92DBufferData *v1; // esi@2
  float v2; // ST18_4@2
  unsigned __int16 v3; // ax@2
  float v4; // ST18_4@3

  v0 = Skill::m_kUseList.m_pkHead;
  if ( Skill::m_kUseList.m_pkHead )
  {
    do
    {
      v1 = v0->m_element.m_pObject;
      v0 = v0->m_pkNext;
      v2 = Timer::ms_fCurTime - *(float *)&v1[1].vfptr;
      IconWin::StartCoolTime(HIWORD(v1->m_pkBuffer), Timer::ms_fCurTime, *(float *)&v1->m_pkPixelFormat, v2);
      v3 = (unsigned __int16)v1->m_pkBuffer;
      if ( v3 != -1 )
      {
        v4 = Timer::ms_fCurTime - *(float *)&v1[1].vfptr;
        IconWin::StartCoolTimebyItemUse(v3, Timer::ms_fCurTime, *(float *)&v1->m_pkPixelFormat, v4);
      }
    }
    while ( v0 );
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006A5650) --------------------------------------------------------
void __cdecl Skill::ClearLearnSkill()
{
  NiTListItem<NiPointer<NiDX92DBufferData> > *v0; // esi@1
  NiTListItem<NiPointer<NiDX92DBufferData> > *v1; // ST00_4@2

  v0 = Skill::m_kUseList.m_pkHead;
  Skill::ms_uiTotalLearnActSkill = 0;
  Skill::ms_uiTotalLearnProductSkill = 0;
  if ( Skill::m_kUseList.m_pkHead )
  {
    do
    {
      v1 = v0;
      v0 = v0->m_pkNext;
      Skill::m_kUseList.vfptr->DeleteItem(
        (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *)&Skill::m_kUseList,
        v1);
    }
    while ( v0 );
  }
  Skill::m_kUseList.m_kAllocator.m_uiCount = 0;
  Skill::m_kUseList.m_pkHead = 0;
  Skill::m_kUseList.m_pkTail = 0;
}
// B5BBA0: using guessed type unsigned int Skill::ms_uiTotalLearnActSkill;
// B5BBBC: using guessed type unsigned int Skill::ms_uiTotalLearnProductSkill;

//----- (006A56A0) --------------------------------------------------------
void __cdecl Skill::InitPassiveSkill(PROTO_NC_CHAR_SKILL_PASSIVE_CMD *pkProto)
{
  unsigned int v1; // edx@1
  signed int v2; // eax@1
  PROTO_NC_CHAR_SKILL_PASSIVE_CMD *v3; // ecx@2

  v1 = 0;
  Skill::ms_uiTotalLearnPassiveSkill = 0;
  v2 = 0;
  if ( pkProto->number > 0u )
  {
    v3 = pkProto + 1;
    do
    {
      if ( v1 <= 0xBB8 )
      {
        *(PROTO_NC_CHAR_SKILL_PASSIVE_CMD *)&Skill::ms_akLearnPassiveSkillInfo[2 * v1++] = (PROTO_NC_CHAR_SKILL_PASSIVE_CMD)v3->number;
        Skill::ms_uiTotalLearnPassiveSkill = v1;
      }
      ++v2;
      ++v3;
    }
    while ( v2 < pkProto->number );
  }
}
// B5BBB8: using guessed type unsigned int Skill::ms_uiTotalLearnPassiveSkill;

//----- (006A56F0) --------------------------------------------------------
char __cdecl Skill::AmILearnAnyProdBaseSkill()
{
  signed int v0; // ebx@1
  int v1; // esi@2
  int v2; // ecx@4
  int v3; // eax@5
  const char *v4; // esi@6
  int v5; // eax@8

  v0 = 29100;
  while ( 1 )
  {
    v1 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                             + 16))(
                            ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                            (unsigned __int16)v0) )
    {
      if ( (unsigned __int16)v0 <= *(_WORD *)(v1 + 200) )
      {
        v2 = *(_DWORD *)(v1 + 196);
        if ( *(_DWORD *)(v2 + 4 * (unsigned __int16)v0) )
        {
          v3 = *(_DWORD *)(v2 + 4 * (unsigned __int16)v0);
          if ( v3 )
          {
            v4 = (const char *)(v3 + 2);
            if ( !strcmp((const char *)(v3 + 2), "Herbing") || !strcmp(v4, "WoodCutting") )
              return 1;
          }
        }
      }
    }
    v5 = 0;
    if ( Skill::ms_uiTotalLearnProductSkill )
    {
      while ( *(_WORD *)&Skill::ms_akLearnProductSkillInfo[8 * v5] != (_WORD)v0 )
      {
        if ( ++v5 >= Skill::ms_uiTotalLearnProductSkill )
          goto LABEL_11;
      }
      return 1;
    }
LABEL_11:
    if ( ++v0 >= 29200 )
      return 0;
  }
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
// B5BBBC: using guessed type unsigned int Skill::ms_uiTotalLearnProductSkill;

//----- (006A57E0) --------------------------------------------------------
int __cdecl Skill::GetCountOfILearnAnyProdBaseSkill()
{
  signed int v0; // ebx@1
  int v1; // esi@2
  int v2; // ecx@4
  int v3; // eax@5
  const char *v4; // esi@6
  int v5; // eax@8
  int Count; // [sp+Ch] [bp-4h]@1

  Count = 0;
  v0 = 29100;
  do
  {
    v1 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
    if ( !(unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                              + 16))(
                             ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                             (unsigned __int16)v0)
      || (unsigned __int16)v0 > *(_WORD *)(v1 + 200)
      || (v2 = *(_DWORD *)(v1 + 196), !*(_DWORD *)(v2 + 4 * (unsigned __int16)v0))
      || (v3 = *(_DWORD *)(v2 + 4 * (unsigned __int16)v0)) == 0
      || (v4 = (const char *)(v3 + 2), strcmp((const char *)(v3 + 2), "Herbing")) && strcmp(v4, "WoodCutting") )
    {
      v5 = 0;
      if ( !Skill::ms_uiTotalLearnProductSkill )
        goto LABEL_13;
      while ( *(_WORD *)&Skill::ms_akLearnProductSkillInfo[8 * v5] != (_WORD)v0 )
      {
        if ( ++v5 >= Skill::ms_uiTotalLearnProductSkill )
          goto LABEL_13;
      }
    }
    ++Count;
LABEL_13:
    ++v0;
  }
  while ( v0 <= 29105 );
  return Count;
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
// B5BBBC: using guessed type unsigned int Skill::ms_uiTotalLearnProductSkill;

//----- (006A58D0) --------------------------------------------------------
bool __cdecl Skill::IsMovingSkill(int kSkillID)
{
  int v1; // esi@1
  int *v2; // eax@3
  int v3; // eax@4
  bool result; // al@6

  v1 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  result = 0;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                          kSkillID) )
  {
    if ( (unsigned __int16)kSkillID <= *(_WORD *)(v1 + 200) )
    {
      v2 = (int *)(*(_DWORD *)(v1 + 196) + 4 * (unsigned __int16)kSkillID);
      if ( *v2 )
      {
        v3 = *v2;
        if ( v3 )
        {
          if ( *(_BYTE *)(v3 + 192) )
            result = 1;
        }
      }
    }
  }
  return result;
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (006A5930) --------------------------------------------------------
char __cdecl Skill::IsSkillUsePossibleByItemActionID(unsigned __int16 ActionID)
{
  ItemAction *v1; // edx@1
  char result; // al@2
  NiTListItem<NiPointer<NiDX92DBufferData> > *v3; // ecx@3
  NiDX92DBufferData *v4; // eax@4

  v1 = ItemActionTab::GetByItemActionID(ActionID);
  if ( v1 )
  {
    v3 = Skill::m_kUseList.m_pkHead;
    if ( Skill::m_kUseList.m_pkHead )
    {
      while ( 1 )
      {
        v4 = v3->m_element.m_pObject;
        v3 = v3->m_pkNext;
        if ( v4 )
        {
          if ( v4->m_pkSurface == (IDirect3DSurface9 *)v1->CoolGroupActionID
            && *(float *)&v4->m_pkPixelFormat - 0.300000011920929 > Timer::ms_fCurTime - *(float *)&v4[1].vfptr )
          {
            break;
          }
        }
        if ( !v3 )
          goto LABEL_8;
      }
      result = 0;
    }
    else
    {
LABEL_8:
      result = 1;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006A59A0) --------------------------------------------------------
void __cdecl Skill::RecordSkillUseByItemActionID(unsigned __int16 kActionID, float fCurTime, float fStartTime, float fMaxCoolTime)
{
  unsigned __int16 v4; // bx@1
  unsigned __int16 v5; // di@1
  NiTListItem<NiPointer<NiDX92DBufferData> > *v6; // eax@2
  NiDX92DBufferData *v7; // ecx@3
  NiDX92DBufferData *v8; // eax@5
  NiDX92DBufferData *v9; // esi@5
  ItemAction *v10; // ecx@14
  double v11; // st6@14
  double v12; // st7@14
  double v13; // st7@16
  double v14; // st6@16
  double v15; // st5@16
  float v16; // ST10_4@16
  float v17; // ST0C_4@16
  float v18; // ST08_4@16
  unsigned int v19; // esi@16
  ItemAction *v20; // eax@17
  ItemAction *v21; // ebx@17
  unsigned __int16 v22; // ax@18
  _DWORD *v23; // eax@20
  _DWORD *v24; // esi@20
  double v25; // st7@23
  int v26; // eax@23
  NiPointer<NiDX92DBufferData> element; // [sp+24h] [bp-1Ch]@23
  unsigned int i; // [sp+28h] [bp-18h]@16
  NiRefObjectVtbl *v29; // [sp+2Ch] [bp-14h]@16
  ItemAction *pkItemAction; // [sp+30h] [bp-10h]@1
  int v31; // [sp+3Ch] [bp-4h]@11

  v4 = kActionID;
  v5 = 0;
  pkItemAction = ItemActionTab::GetByItemActionID(kActionID);
  if ( pkItemAction )
  {
    v6 = Skill::m_kUseList.m_pkHead;
    if ( Skill::m_kUseList.m_pkHead )
    {
      while ( 1 )
      {
        v7 = v6->m_element.m_pObject;
        v6 = v6->m_pkNext;
        if ( LOWORD(v7->m_pkBuffer) == v4 )
          break;
        if ( !v6 )
          goto LABEL_5;
      }
      v9 = v7;
    }
    else
    {
LABEL_5:
      v8 = (NiDX92DBufferData *)operator new(0x18u);
      v9 = v8;
      if ( v8 )
      {
        v8->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
        v8->m_uiRefCount = 0;
        InterlockedIncrement(&NiRefObject::ms_uiObjects);
        v9->vfptr = (NiRefObjectVtbl *)&SkillUseRecord::`vftable';
      }
      else
      {
        v9 = 0;
      }
      *(_DWORD *)&kActionID = v9;
      if ( v9 )
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(
        &Skill::m_kUseList,
        (NiPointer<NiDX92DBufferData> *)&kActionID);
      v31 = -1;
      if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
        v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    }
    v10 = pkItemAction;
    v11 = fMaxCoolTime;
    LOWORD(v9->m_pkBuffer) = v4;
    v9->m_pkSurface = (IDirect3DSurface9 *)v10->CoolGroupActionID;
    v12 = v11;
    if ( v11 <= 0.0 )
    {
      *(_DWORD *)&kActionID = v10->CoolTime;
      v12 = (double)kActionID / 1000.0;
    }
    *(float *)&kActionID = v12;
    v13 = *(float *)&kActionID;
    v9->m_pkPixelFormat = *(NiPixelFormat **)&kActionID;
    v14 = fCurTime;
    v15 = fStartTime;
    *(float *)&v29 = fCurTime - fStartTime;
    v9[1].vfptr = v29;
    v16 = v15;
    v17 = v13;
    v18 = v14;
    IconWin::StartCoolTimebyItemUse(v4, v18, v17, v16);
    v19 = 0;
    i = 0;
    if ( ItemActionTab::GetTotal() )
    {
      do
      {
        v20 = ItemActionTab::GetByItemActionID(v19);
        v21 = v20;
        if ( !v20 )
          break;
        v22 = v20->CoolGroupActionID;
        if ( v22 == pkItemAction->CoolGroupActionID && v22 > v5 )
        {
          v23 = operator new(0x18u);
          v24 = v23;
          if ( v23 )
          {
            *v23 = &NiRefObject::`vftable';
            v23[1] = 0;
            InterlockedIncrement(&NiRefObject::ms_uiObjects);
            *v24 = &SkillUseRecord::`vftable';
          }
          else
          {
            v24 = 0;
          }
          v25 = *(float *)&kActionID;
          *((_WORD *)v24 + 4) = v21->ItemActionID;
          v26 = v21->CoolGroupActionID;
          *((float *)v24 + 4) = v25;
          *((float *)v24 + 5) = *(float *)&v29;
          v24[3] = v26;
          element.m_pObject = (NiDX92DBufferData *)v24;
          InterlockedIncrement(v24 + 1);
          v31 = 1;
          NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(
            &Skill::m_kUseList,
            &element);
          v31 = -1;
          if ( !InterlockedDecrement(v24 + 1) )
            (*(void (__thiscall **)(_DWORD *, signed int))*v24)(v24, 1);
          IconWin::StartCoolTimebyItemUse(v21->ItemActionID, fCurTime, *(float *)&kActionID, fStartTime);
          v19 = i;
          v5 = 0;
        }
        i = ++v19;
      }
      while ( v19 < ItemActionTab::GetTotal() );
    }
  }
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9BE94C: using guessed type int (__thiscall *SkillUseRecord::`vftable')(void *p, char);

//----- (006A5C00) --------------------------------------------------------
void __cdecl SkillEmpowerRequest::Register(unsigned __int16 kSkillID, Skill::EmpowerInfo kInfo)
{
  NiD3DShaderInterface *v2; // eax@1
  NiD3DShaderInterface *v3; // esi@1
  NiTListItem<NiD3DShaderInterface *> *v4; // eax@1

  v2 = (NiD3DShaderInterface *)operator new(6u);
  v3 = v2;
  LOWORD(v2->vfptr) = kSkillID;
  BYTE2(v2->vfptr) = kInfo.cDamageUp;
  LOBYTE(v2->m_uiRefCount) = kInfo.cLongKeepTime;
  BYTE1(v2->m_uiRefCount) = kInfo.cShortCoolTime;
  BYTE3(v2->vfptr) = kInfo.cSmallSp;
  v4 = SkillEmpowerRequest::ms_kReqList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&SkillEmpowerRequest::ms_kReqList);
  v4->m_element = v3;
  v4->m_pkNext = 0;
  v4->m_pkPrev = SkillEmpowerRequest::ms_kReqList.m_pkTail;
  if ( SkillEmpowerRequest::ms_kReqList.m_pkTail )
  {
    SkillEmpowerRequest::ms_kReqList.m_pkTail->m_pkNext = v4;
    ++SkillEmpowerRequest::ms_kReqList.m_kAllocator.m_uiCount;
    SkillEmpowerRequest::ms_kReqList.m_pkTail = v4;
  }
  else
  {
    ++SkillEmpowerRequest::ms_kReqList.m_kAllocator.m_uiCount;
    SkillEmpowerRequest::ms_kReqList.m_pkHead = v4;
    SkillEmpowerRequest::ms_kReqList.m_pkTail = v4;
  }
}

//----- (006A5C80) --------------------------------------------------------
void __cdecl Skill::Update(float fTime)
{
  void **v1; // eax@1
  void *v2; // esi@4
  PgWin *v3; // ebx@7
  char v4; // bl@13
  std::vector<unsigned long,std::allocator<unsigned long> > *v5; // esi@13
  unsigned int *v6; // ecx@13
  unsigned int v7; // edx@13
  unsigned int v8; // ecx@14
  NiPointer<PgWin> result; // [sp+10h] [bp-18h]@6
  NiPointer<PgWin> element; // [sp+14h] [bp-14h]@6
  void *kIter; // [sp+18h] [bp-10h]@3
  int v12; // [sp+24h] [bp-4h]@6

  v1 = (void **)&Skill::m_kUseList.m_pkHead->m_pkNext;
  if ( Skill::m_kUseList.m_pkHead )
  {
    while ( 1 )
    {
      v2 = v1[2];
      kIter = *v1;
      if ( v2 && *((float *)v2 + 4) <= fTime - *((float *)v2 + 5) )
      {
        element.m_pObject = (PgWin *)v2;
        InterlockedIncrement((volatile LONG *)v2 + 1);
        v12 = 0;
        NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::Remove(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *)&Skill::m_kUseList,
          &result,
          &element);
        if ( result.m_pObject )
        {
          v3 = result.m_pObject;
          if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
          {
            if ( v3 )
              v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
          }
        }
        v12 = -1;
        if ( !InterlockedDecrement((volatile LONG *)v2 + 1) )
          (**(void (__thiscall ***)(void *, signed int))v2)(v2, 1);
      }
      if ( !kIter )
        break;
      v1 = (void **)kIter;
    }
  }
  v4 = 0;
  v5 = IconWin::GetCoolTimeIconList();
  v6 = v5->_Myfirst;
  v7 = 0;
  if ( v5->_Mylast - v5->_Myfirst )
  {
    do
    {
      v8 = v6[v7];
      if ( *(_BYTE *)(v8 + 377) )
      {
        v4 = 1;
        *(_BYTE *)(v8 + 377) = 0;
      }
      v6 = v5->_Myfirst;
      ++v7;
    }
    while ( v7 < v5->_Mylast - v5->_Myfirst );
    if ( v4 )
      Skill::ApplyCoolTimeToInterface();
  }
}

//----- (006A5DB0) --------------------------------------------------------
void __cdecl Skill::SetLastCoolTimeByItemActionID(unsigned __int16 kActionID, float fLastCoolTime)
{
  unsigned __int16 v2; // di@1
  unsigned int v3; // esi@1
  ItemAction *v4; // eax@1
  NiTListItem<NiPointer<NiDX92DBufferData> > *v5; // ecx@2
  double v6; // st7@2
  NiDX92DBufferData *v7; // edx@3
  double v8; // st7@8
  float fStartTime; // ST0C_4@8
  float fDelay; // [sp+20h] [bp+8h]@6
  NiPixelFormat *fDelaya; // [sp+20h] [bp+8h]@8
  float fDelayb; // [sp+20h] [bp+8h]@8

  v2 = kActionID;
  v3 = kActionID;
  v4 = ItemActionTab::GetByItemActionID(kActionID);
  if ( v4 )
  {
    while ( 1 )
    {
      v5 = Skill::m_kUseList.m_pkHead;
      v6 = fLastCoolTime;
      if ( Skill::m_kUseList.m_pkHead )
        break;
LABEL_6:
      fDelay = (double)v4->CoolTime / 1000.0 - v6;
      Skill::RecordSkillUseByItemActionID(v2, Timer::ms_fCurTime, fDelay, fLastCoolTime);
      v4 = ItemActionTab::GetByItemActionID(v3);
      if ( !v4 )
        return;
    }
    while ( 1 )
    {
      v7 = v5->m_element.m_pObject;
      v5 = v5->m_pkNext;
      if ( v7 )
      {
        if ( LOWORD(v7->m_pkBuffer) == v4->ItemActionID )
          break;
      }
      if ( !v5 )
        goto LABEL_6;
    }
    *(float *)&fDelaya = v6 + Timer::ms_fCurTime - *(float *)&v7[1].vfptr;
    v8 = *(float *)&fDelaya;
    v7->m_pkPixelFormat = fDelaya;
    fDelayb = Timer::ms_fCurTime - *(float *)&v7[1].vfptr;
    fStartTime = v8;
    IconWin::StartCoolTimebyItemUse(v4->ItemActionID, Timer::ms_fCurTime, fStartTime, fDelayb);
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006A5E90) --------------------------------------------------------
void __cdecl SkillEmpowerRequest::Applicate(unsigned __int16 kSkillID)
{
  NiTListItem<NiD3DShaderInterface *> *v1; // ecx@1
  NiTListItem<NiD3DShaderInterface *> *v2; // edx@1
  NiD3DShaderInterface *v3; // eax@2
  char v4; // dl@5
  char v5; // bl@5
  NiD3DShaderInterface **v6; // edx@6
  NiTListItem<NiD3DShaderInterface *> *v7; // esi@6
  unsigned int v8; // esi@11
  int v9; // ecx@11
  unsigned int v10; // eax@11
  char *v11; // edi@12
  int v12; // eax@16
  void *kPos; // [sp+0h] [bp-8h]@9
  Skill::EmpowerInfo kEmpowerInfo; // [sp+4h] [bp-4h]@5

  v1 = SkillEmpowerRequest::ms_kReqList.m_pkHead;
  v2 = SkillEmpowerRequest::ms_kReqList.m_pkHead;
  if ( SkillEmpowerRequest::ms_kReqList.m_pkHead )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      v2 = v2->m_pkNext;
      if ( LOWORD(v3->vfptr) == kSkillID )
        break;
      if ( !v2 )
        return;
    }
    kEmpowerInfo.cLongKeepTime = v3->m_uiRefCount;
    kEmpowerInfo.cShortCoolTime = BYTE1(v3->m_uiRefCount);
    v4 = BYTE3(v3->vfptr);
    v5 = BYTE2(v3->vfptr);
    kEmpowerInfo.cDamageUp = BYTE2(v3->vfptr);
    kEmpowerInfo.cSmallSp = v4;
    if ( SkillEmpowerRequest::ms_kReqList.m_pkHead )
    {
      while ( 1 )
      {
        v6 = &v1->m_element;
        v7 = v1;
        v1 = v1->m_pkNext;
        if ( v3 == *v6 )
          break;
        if ( !v1 )
          goto LABEL_8;
      }
    }
    else
    {
LABEL_8:
      v7 = 0;
    }
    kPos = v7;
    if ( v7 )
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
        &SkillEmpowerRequest::ms_kReqList,
        &kPos);
    v8 = Skill::ms_uiRestEmpowerPoint;
    v9 = v5 + kEmpowerInfo.cLongKeepTime + kEmpowerInfo.cShortCoolTime + kEmpowerInfo.cSmallSp;
    v10 = 0;
    if ( Skill::ms_uiTotalLearnActSkill )
    {
      v11 = Skill::ms_akLearnActSkillInfo;
      while ( *(_WORD *)v11 != kSkillID )
      {
        ++v10;
        v11 += 6;
        if ( v10 >= Skill::ms_uiTotalLearnActSkill )
          return;
      }
      v12 = 6 * v10 + 11892048;
      if ( v12 )
      {
        *(_BYTE *)(v12 + 2) += kEmpowerInfo.cDamageUp;
        *(_BYTE *)(v12 + 3) += kEmpowerInfo.cSmallSp;
        *(_BYTE *)(v12 + 4) += kEmpowerInfo.cLongKeepTime;
        *(_BYTE *)(v12 + 5) += kEmpowerInfo.cShortCoolTime;
        Skill::ms_uiRestEmpowerPoint = v8 - v9;
      }
    }
  }
}
// B5BBA0: using guessed type unsigned int Skill::ms_uiTotalLearnActSkill;
// B5BBA4: using guessed type unsigned int Skill::ms_uiRestEmpowerPoint;

//----- (006A5F90) --------------------------------------------------------
void __cdecl SkillEmpowerRequest::Cancel(unsigned __int16 kSkillID)
{
  void *v1; // ecx@0
  NiTListItem<NiD3DShaderInterface *> *v2; // eax@1
  NiTListItem<NiD3DShaderInterface *> *v3; // ecx@1
  NiD3DShaderInterface *v4; // esi@2
  NiD3DShaderInterface **v5; // ecx@6
  NiTListItem<NiD3DShaderInterface *> *v6; // edx@6
  void *kPos; // [sp+0h] [bp-4h]@1

  kPos = v1;
  v2 = SkillEmpowerRequest::ms_kReqList.m_pkHead;
  v3 = SkillEmpowerRequest::ms_kReqList.m_pkHead;
  if ( SkillEmpowerRequest::ms_kReqList.m_pkHead )
  {
    while ( 1 )
    {
      v4 = v3->m_element;
      v3 = v3->m_pkNext;
      if ( LOWORD(v4->vfptr) == kSkillID )
        break;
      if ( !v3 )
        return;
    }
    if ( SkillEmpowerRequest::ms_kReqList.m_pkHead )
    {
      while ( 1 )
      {
        v5 = &v2->m_element;
        v6 = v2;
        v2 = v2->m_pkNext;
        if ( v4 == *v5 )
          break;
        if ( !v2 )
          goto LABEL_8;
      }
    }
    else
    {
LABEL_8:
      v6 = 0;
    }
    kPos = v6;
    if ( v6 )
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
        &SkillEmpowerRequest::ms_kReqList,
        &kPos);
    operator delete(v4);
  }
}

//----- (006A6000) --------------------------------------------------------
bool __cdecl Skill::IsBuildMiniRoomSkill(unsigned __int16 kSkillID)
{
  ActiveSkillViewInfo *v1; // eax@1
  bool result; // al@2

  v1 = ActSkillViewInfoTab::GetByInxName("MiniRoomSkill");
  if ( v1 )
    result = v1->ID == kSkillID;
  else
    result = 0;
  return result;
}

//----- (006A6030) --------------------------------------------------------
void __cdecl Skill::DecreaseRecordTime(unsigned __int16 kID)
{
  void **v1; // eax@1
  void *v2; // esi@4
  PgWin *v3; // ebx@7
  NiPointer<PgWin> result; // [sp+10h] [bp-18h]@6
  NiPointer<PgWin> element; // [sp+14h] [bp-14h]@6
  void *kIter; // [sp+18h] [bp-10h]@3
  int v7; // [sp+24h] [bp-4h]@6

  v1 = (void **)&Skill::m_kUseList.m_pkHead->m_pkNext;
  if ( Skill::m_kUseList.m_pkHead )
  {
    while ( 1 )
    {
      v2 = v1[2];
      kIter = *v1;
      if ( v2 && *((_WORD *)v2 + 5) == kID )
      {
        element.m_pObject = (PgWin *)v2;
        InterlockedIncrement((volatile LONG *)v2 + 1);
        v7 = 0;
        NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::Remove(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *)&Skill::m_kUseList,
          &result,
          &element);
        if ( result.m_pObject )
        {
          v3 = result.m_pObject;
          if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
          {
            if ( v3 )
              v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
          }
        }
        v7 = -1;
        if ( !InterlockedDecrement((volatile LONG *)v2 + 1) )
          (**(void (__thiscall ***)(void *, signed int))v2)(v2, 1);
      }
      if ( !kIter )
        break;
      v1 = (void **)kIter;
    }
  }
}

//----- (006A6110) --------------------------------------------------------
bool __cdecl Skill::Init()
{
  char *v0; // eax@3
  bool result; // al@4
  char *v2; // eax@7
  char *v3; // eax@10
  char *v4; // eax@13

  if ( !Folder::m_bInit )
    Folder::Init();
  v0 = Folder::Merge(&Folder::m_acSystem, "ActiveSkill.shn");
  if ( !ITableBase<ActiveSkillInfo,ActSkillInfoTab>::Load(v0) )
    goto LABEL_16;
  ActSkillInfoTab::GenerateCRCSum();
  if ( !Folder::m_bInit )
    Folder::Init();
  v2 = Folder::Merge(&Folder::m_acSystem, "ActiveSkillView.shn");
  if ( !ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::Load(v2) )
    goto LABEL_16;
  if ( !Folder::m_bInit )
    Folder::Init();
  v3 = Folder::Merge(&Folder::m_acSystem, "PassiveSkill.shn");
  if ( ITableBase<PassiveSkillInfo,PasSkillInfoTab>::Load(v3) )
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    v4 = Folder::Merge(&Folder::m_acSystem, "PassiveSkillView.shn");
    result = ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::Load(v4) != 0;
  }
  else
  {
LABEL_16:
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006A61E0) --------------------------------------------------------
unsigned __int16 __cdecl Skill::GetBaseSkillID(unsigned __int16 kSkillID, int *riMaxLevel)
{
  int v2; // esi@1
  int v3; // edx@1
  int v4; // eax@2
  int v5; // edx@5
  signed int v6; // ebx@8
  const char *v7; // eax@9
  signed int v8; // esi@9
  char *v9; // edx@10
  char v10; // cl@11
  char *v11; // eax@12
  ActiveSkillInfo *v12; // eax@12
  int v13; // edi@13
  int v14; // esi@14
  int v15; // eax@16
  unsigned __int16 result; // ax@19
  unsigned __int16 kBaseSkillID; // [sp+Ch] [bp-2Ch]@13
  int *v18; // [sp+10h] [bp-28h]@1
  char acSkillName[32]; // [sp+14h] [bp-24h]@10

  v2 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  v3 = *(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  v18 = riMaxLevel;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(v3 + 16))(
                          ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                          kSkillID) )
  {
    if ( kSkillID <= *(_WORD *)(v2 + 200) )
    {
      v5 = *(_DWORD *)(v2 + 196);
      if ( *(_DWORD *)(v5 + 4 * kSkillID) )
        v4 = *(_DWORD *)(v5 + 4 * kSkillID);
      else
        v4 = 0;
    }
    else
    {
      v4 = 0;
    }
  }
  else
  {
    v4 = 0;
  }
  v6 = 1;
  if ( !v4 )
  {
    *v18 = 1;
    return -1;
  }
  v7 = (const char *)(v4 + 2);
  v8 = strlen(v7);
  if ( v8 > 31 )
    return -1;
  v9 = (char *)(acSkillName - v7);
  do
  {
    v10 = *v7;
    v7[(_DWORD)v9] = *v7;
    ++v7;
  }
  while ( v10 );
  *((_BYTE *)&v18 + v8 + 2) = 0;
  v11 = fs("%s%02d", acSkillName, 1);
  v12 = ActSkillInfoTab::GetByInxName(v11);
  if ( !v12 )
    return -1;
  kBaseSkillID = v12->ID;
  v13 = v12->ID;
  while ( 1 )
  {
    v14 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
    if ( !(unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                           + 16))(
                             ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                             v13)
      || (unsigned __int16)v13 > *(_WORD *)(v14 + 200)
      || (v15 = *(_DWORD *)(v14 + 196) + 4 * (unsigned __int16)v13, !*(_DWORD *)v15) )
    {
      result = kBaseSkillID;
      *v18 = v6;
      return result;
    }
    if ( strcmp((const char *)(*(_DWORD *)v15 + 2), fs("%s%02d", acSkillName, v6)) )
      break;
    ++v13;
    ++v6;
  }
  result = kBaseSkillID;
  *v18 = v6;
  return result;
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (006A6380) --------------------------------------------------------
Skill::EmpowerInfo *__cdecl Skill::GetAccumulatedEmpowerInfo(Skill::EmpowerInfo *result, unsigned __int16 kSkillID)
{
  int v2; // edi@2
  int v3; // edx@4
  int v4; // eax@5
  const char *v5; // eax@6
  signed int v6; // esi@6
  char *v7; // edx@7
  char v8; // cl@8
  char *v9; // eax@9
  int v10; // edi@9
  int v11; // esi@10
  int v12; // eax@12
  unsigned int v13; // eax@13
  char *v14; // ecx@15
  int v16; // eax@19
  int iLevel; // [sp+8h] [bp-28h]@9
  char acSkillName[32]; // [sp+Ch] [bp-24h]@7

  *result = 0;
  if ( kSkillID < 0x4E20u )
  {
    v2 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                             + 16))(
                            ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                            kSkillID) )
    {
      if ( kSkillID <= *(_WORD *)(v2 + 200) )
      {
        v3 = *(_DWORD *)(v2 + 196);
        if ( *(_DWORD *)(v3 + 4 * kSkillID) )
        {
          v4 = *(_DWORD *)(v3 + 4 * kSkillID);
          if ( v4 )
          {
            v5 = (const char *)(v4 + 2);
            v6 = strlen(v5);
            if ( v6 <= 31 )
            {
              v7 = (char *)(acSkillName - v5);
              do
              {
                v8 = *v5;
                v5[(_DWORD)v7] = *v5;
                ++v5;
              }
              while ( v8 );
              *((_BYTE *)&iLevel + v6 + 2) = 0;
              v9 = fs("%s%02d", acSkillName, 1);
              v10 = ActSkillInfoTab::GetByInxName(v9)->ID;
              for ( iLevel = 1; ; ++iLevel )
              {
                v11 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
                if ( !(unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                                       + 16))(
                                         ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                                         v10) )
                  break;
                if ( (unsigned __int16)v10 > *(_WORD *)(v11 + 200) )
                  break;
                v12 = *(_DWORD *)(v11 + 196) + 4 * (unsigned __int16)v10;
                if ( !*(_DWORD *)v12 )
                  break;
                v13 = strcmp((const char *)(*(_DWORD *)v12 + 2), fs("%s%02d", acSkillName, iLevel));
                if ( v13 || !Skill::ms_uiTotalLearnActSkill )
                  break;
                v14 = Skill::ms_akLearnActSkillInfo;
                while ( *(_WORD *)v14 != (_WORD)v10 )
                {
                  ++v13;
                  v14 += 6;
                  if ( v13 >= Skill::ms_uiTotalLearnActSkill )
                    return result;
                }
                v16 = 6 * v13 + 11892048;
                if ( !v16 )
                  break;
                result->cDamageUp += *(_BYTE *)(v16 + 2);
                result->cSmallSp += *(_BYTE *)(v16 + 3);
                result->cLongKeepTime += *(_BYTE *)(v16 + 4);
                result->cShortCoolTime += *(_BYTE *)(v16 + 5);
                ++v10;
              }
            }
          }
        }
      }
    }
  }
  return result;
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
// B5BBA0: using guessed type unsigned int Skill::ms_uiTotalLearnActSkill;

//----- (006A6530) --------------------------------------------------------
int __cdecl Skill::GetEmpowerAppliedCoolTime(int kSkillID)
{
  int v1; // esi@1
  int *v2; // eax@3
  int v3; // ecx@4
  int result; // eax@6
  Skill::EmpowerInfo kInfo; // [sp+8h] [bp-4h]@1

  Skill::GetAccumulatedEmpowerInfo(&kInfo, kSkillID);
  v1 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                          kSkillID)
    && (unsigned __int16)kSkillID <= *(_WORD *)(v1 + 200)
    && (v2 = (int *)(*(_DWORD *)(v1 + 196) + 4 * (unsigned __int16)kSkillID), *v2)
    && (v3 = *v2) != 0 )
  {
    if ( kInfo.cShortCoolTime )
      result = *(_DWORD *)(v3 + 207) - *(_DWORD *)(v3 + 4 * kInfo.cShortCoolTime + 503);
    else
      result = *(_DWORD *)(v3 + 207);
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (006A65B0) --------------------------------------------------------
int __cdecl Skill::GetEmpowerAppliedSP(int kSkillID)
{
  int v1; // esi@1
  int *v2; // eax@3
  int v3; // ecx@4
  int result; // eax@6
  Skill::EmpowerInfo kInfo; // [sp+8h] [bp-4h]@1

  Skill::GetAccumulatedEmpowerInfo(&kInfo, kSkillID);
  v1 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                          kSkillID)
    && (unsigned __int16)kSkillID <= *(_WORD *)(v1 + 200)
    && (v2 = (int *)(*(_DWORD *)(v1 + 196) + 4 * (unsigned __int16)kSkillID), *v2)
    && (v3 = *v2) != 0 )
  {
    if ( kInfo.cSmallSp )
      result = *(_DWORD *)(v3 + 160) - *(_DWORD *)(v3 + 4 * kInfo.cSmallSp + 463);
    else
      result = *(_DWORD *)(v3 + 160);
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (006A6630) --------------------------------------------------------
void __cdecl Skill::RecordSkillUse(int kSkillID, float fCurTime, float fStartTime, float fMaxCoolTime)
{
  int v4; // esi@1
  ActiveSkillInfo **v5; // eax@3
  ActiveSkillInfo *v6; // edi@4
  NiTListItem<NiPointer<NiDX92DBufferData> > *v7; // eax@5
  NiDX92DBufferData *v8; // ecx@6
  _DWORD *v9; // eax@8
  unsigned int v10; // esi@8
  unsigned int v11; // ebx@10
  unsigned __int16 v12; // cx@17
  double v13; // st7@17
  NiDX92DBufferData *v14; // esi@18
  double v15; // st7@21
  float v16; // ST10_4@21
  unsigned int v17; // esi@21
  char *v18; // ebx@22
  SkillUseRecord *v19; // eax@26
  int v20; // eax@27
  int v21; // esi@27
  double v22; // st7@29
  int v23; // eax@29
  double v24; // st7@29
  ActiveSkillInfo *pkInfo; // [sp+28h] [bp-20h]@4
  NiPointer<NiDX92DBufferData> element; // [sp+2Ch] [bp-1Ch]@20
  unsigned int i; // [sp+30h] [bp-18h]@12
  float v28; // [sp+34h] [bp-14h]@21
  float fDlyTime; // [sp+38h] [bp-10h]@21
  int v30; // [sp+44h] [bp-4h]@14

  v4 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                        + 16))(
                          ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                          kSkillID) )
  {
    if ( (unsigned __int16)kSkillID <= *(_WORD *)(v4 + 200) )
    {
      v5 = (ActiveSkillInfo **)(*(_DWORD *)(v4 + 196) + 4 * (unsigned __int16)kSkillID);
      if ( *v5 )
      {
        v6 = *v5;
        pkInfo = *v5;
        if ( *v5 )
        {
          v7 = Skill::m_kUseList.m_pkHead;
          if ( Skill::m_kUseList.m_pkHead )
          {
            while ( 1 )
            {
              v8 = v7->m_element.m_pObject;
              v7 = v7->m_pkNext;
              if ( HIWORD(v8->m_pkBuffer) == v6->ID )
                break;
              if ( !v7 )
                goto LABEL_8;
            }
            v11 = (unsigned int)v8;
          }
          else
          {
LABEL_8:
            v9 = operator new(0x18u);
            v10 = (unsigned int)v9;
            if ( v9 )
            {
              *v9 = &NiRefObject::`vftable';
              v9[1] = 0;
              InterlockedIncrement(&NiRefObject::ms_uiObjects);
              *(_DWORD *)v10 = &SkillUseRecord::`vftable';
            }
            else
            {
              v10 = 0;
            }
            v11 = v10;
            i = v10;
            if ( v10 )
              InterlockedIncrement((volatile LONG *)(v10 + 4));
            v30 = 0;
            NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(
              &Skill::m_kUseList,
              (NiPointer<NiDX92DBufferData> *)&i);
            v30 = -1;
            if ( v10 && !InterlockedDecrement((volatile LONG *)(v10 + 4)) )
              (**(void (__thiscall ***)(_DWORD, _DWORD))v10)(v10, 1);
          }
          v12 = kSkillID;
          *(_WORD *)(v11 + 10) = kSkillID;
          *(_DWORD *)(v11 + 12) = v6->DlyGroupNum;
          v13 = fMaxCoolTime;
          if ( fMaxCoolTime <= 0.0 )
          {
            v14 = (NiDX92DBufferData *)v6->DlyTime;
            Skill::GetAccumulatedEmpowerInfo((Skill::EmpowerInfo *)&i, kSkillID);
            if ( BYTE3(i) )
              v14 = (NiDX92DBufferData *)((char *)v14 - v6->nT2[SBYTE3(i) + 4]);
            element.m_pObject = v14;
            v13 = (double)(unsigned int)v14 / 1000.0;
            v12 = kSkillID;
          }
          fDlyTime = v13;
          v15 = fDlyTime;
          *(float *)(v11 + 16) = fDlyTime;
          v28 = fCurTime - fStartTime;
          *(float *)(v11 + 20) = v28;
          v16 = v15;
          IconWin::StartCoolTime(v12, fCurTime, v16, fStartTime);
          v17 = 0;
          i = 0;
          if ( ITableBase<ActiveSkillInfo,ActSkillInfoTab>::GetTotal() )
          {
            do
            {
              v18 = CDataReader::GetRecord(
                      (CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4),
                      v17);
              if ( !v18 )
                break;
              if ( *(_WORD *)v18 != (_WORD)kSkillID && *(_DWORD *)(v18 + 211) == v6->DlyGroupNum && v6->DlyTimeGroup )
              {
                v19 = (SkillUseRecord *)operator new(0x18u);
                if ( v19 )
                {
                  SkillUseRecord::SkillUseRecord(v19);
                  v21 = v20;
                }
                else
                {
                  v21 = 0;
                }
                v22 = fDlyTime;
                *(_WORD *)(v21 + 10) = *(_WORD *)v18;
                v23 = *(_DWORD *)(v18 + 211);
                *(float *)(v21 + 16) = v22;
                v24 = v28;
                *(_DWORD *)(v21 + 12) = v23;
                *(float *)(v21 + 20) = v24;
                element.m_pObject = (NiDX92DBufferData *)v21;
                InterlockedIncrement((volatile LONG *)(v21 + 4));
                v30 = 1;
                NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(
                  &Skill::m_kUseList,
                  &element);
                v30 = -1;
                if ( !InterlockedDecrement((volatile LONG *)(v21 + 4)) )
                  (**(void (__thiscall ***)(_DWORD, _DWORD))v21)(v21, 1);
                IconWin::StartCoolTime(*(_WORD *)v18, fCurTime, fDlyTime, fStartTime);
                v17 = i;
                v6 = pkInfo;
              }
              i = ++v17;
            }
            while ( v17 < ITableBase<ActiveSkillInfo,ActSkillInfoTab>::GetTotal() );
          }
        }
      }
    }
  }
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9BE94C: using guessed type int (__thiscall *SkillUseRecord::`vftable')(void *p, char);
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (006A6900) --------------------------------------------------------
void __cdecl Skill::InitSkill(PROTO_NC_CHAR_CLIENT_SKILL_CMD *pkProto)
{
  PROTO_NC_CHAR_CLIENT_SKILL_CMD *v1; // edi@1
  signed int v2; // ebx@3
  int v3; // esi@4
  unsigned __int8 v4; // al@5
  char v5; // dl@5
  char v6; // cl@5
  unsigned int v7; // eax@5
  unsigned __int16 v8; // dx@5
  float v9; // ST1C_4@8
  float fCoolTime; // [sp+18h] [bp-4h]@6

  v1 = pkProto;
  if ( *(_BYTE *)&pkProto->PartMark & 1 )
    Skill::ClearLearnSkill();
  Skill::m_uiMaxSkillNum = v1->nMaxNum;
  Skill::ms_uiRestEmpowerPoint = v1->restempow;
  Skill::ms_uiAntiEmpowerPoint = 5;
  v2 = 0;
  if ( v1->skill.number > 0u )
  {
    v3 = (int)&v1[1].skill.chrregnum + 3;
    do
    {
      v4 = *(_BYTE *)(v3 - 1);
      LOBYTE(pkProto) = *(_BYTE *)(v3 - 1) & 0xF;
      v5 = *(_BYTE *)v3 & 0xF;
      v6 = *(_BYTE *)v3 >> 4;
      BYTE1(pkProto) = v4 >> 4;
      v7 = *(_DWORD *)(v3 + 1);
      BYTE2(pkProto) = v5;
      v8 = *(_WORD *)(v3 - 7);
      BYTE3(pkProto) = v6;
      Skill::LearnSkill(v8, (Skill::EmpowerInfo *)&pkProto, v7);
      if ( *(_DWORD *)(v3 - 5) )
      {
        fCoolTime = (double)(unsigned int)Skill::GetEmpowerAppliedCoolTime(*(_WORD *)(v3 - 7))
                  - (double)*(unsigned int *)(v3 - 5) * 1000.0;
        if ( fCoolTime < 0.0 )
          fCoolTime = 0.0;
        v9 = fCoolTime / 1000.0;
        Skill::RecordSkillUse(*(_WORD *)(v3 - 7), Timer::ms_fCurTime, v9, 0.0);
      }
      ++v2;
      v3 += 12;
    }
    while ( v2 < v1->skill.number );
  }
  SkillIcon::RefreshSkillInfoAll();
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// B5BBA4: using guessed type unsigned int Skill::ms_uiRestEmpowerPoint;
// B5BBAC: using guessed type unsigned int Skill::ms_uiAntiEmpowerPoint;
// B5BBC0: using guessed type unsigned int Skill::m_uiMaxSkillNum;

//----- (006A6A10) --------------------------------------------------------
void __cdecl Skill::SetLastCoolTime(int kSkillID, float fLastCoolTime)
{
  int v2; // esi@1
  unsigned __int16 *v3; // esi@2
  int v4; // ecx@5
  NiTListItem<NiPointer<NiDX92DBufferData> > *v5; // eax@8
  NiDX92DBufferData *v6; // ecx@9
  double v7; // st7@12
  float fStartTime; // ST08_4@12
  NiPixelFormat *fDelay; // [sp+24h] [bp+Ch]@12
  float fDelaya; // [sp+24h] [bp+Ch]@12

  while ( 1 )
  {
    v2 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable
                                                          + 16))(
                            ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable,
                            kSkillID) )
    {
      if ( (unsigned __int16)kSkillID <= *(_WORD *)(v2 + 200) )
      {
        v4 = *(_DWORD *)(v2 + 196);
        v3 = (unsigned __int16 *)(*(_DWORD *)(v4 + 4 * (unsigned __int16)kSkillID) ? *(_DWORD *)(v4
                                                                                               + 4
                                                                                               * (unsigned __int16)kSkillID) : 0);
      }
      else
      {
        v3 = 0;
      }
    }
    else
    {
      v3 = 0;
    }
    v5 = Skill::m_kUseList.m_pkHead;
    if ( Skill::m_kUseList.m_pkHead )
      break;
LABEL_11:
    Skill::RecordSkillUse(kSkillID, Timer::ms_fCurTime, 0.0, fLastCoolTime);
  }
  while ( 1 )
  {
    v6 = v5->m_element.m_pObject;
    v5 = v5->m_pkNext;
    if ( HIWORD(v6->m_pkBuffer) == *v3 )
      break;
    if ( !v5 )
      goto LABEL_11;
  }
  *(float *)&fDelay = Timer::ms_fCurTime + fLastCoolTime - *(float *)&v6[1].vfptr;
  v7 = *(float *)&fDelay;
  v6->m_pkPixelFormat = fDelay;
  fDelaya = Timer::ms_fCurTime - *(float *)&v6[1].vfptr;
  fStartTime = v7;
  IconWin::StartCoolTime(*v3, Timer::ms_fCurTime, fStartTime, fDelaya);
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (006A6AF0) --------------------------------------------------------
NiPointer<PgWin> *__thiscall NiTPointerListBase<DFALL<NiPointer<NiAudioSource>>,NiPointer<NiAudioSource>>::RemoveTail(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *this, NiPointer<PgWin> *result)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *v2; // esi@1
  NiTListItem<NiPointer<PgWin> > *v3; // edi@1
  NiTListItem<NiPointer<PgWin> > *v4; // eax@1
  PgWin *v5; // eax@4

  v2 = this;
  v3 = this->m_pkTail;
  v4 = v3->m_pkPrev;
  this->m_pkTail = v4;
  if ( v4 )
    v4->m_pkNext = 0;
  else
    this->m_pkHead = 0;
  v5 = v3->m_element.m_pObject;
  result->m_pObject = v5;
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  ((void (__thiscall *)(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *))v2->vfptr->DeleteItem)(v2);
  --v2->m_kAllocator.m_uiCount;
  return result;
}

//----- (006A6B80) --------------------------------------------------------
void __thiscall SkillUseRecord::SkillUseRecord(SkillUseRecord *this)
{
  SkillUseRecord *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v1->vfptr = (NiRefObjectVtbl *)&SkillUseRecord::`vftable';
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9BE94C: using guessed type int (__thiscall *SkillUseRecord::`vftable')(void *p, char);

//----- (006A6BB0) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord>>::~NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord>>(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord> > *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord>>::`vftable';
}
// 9BE92C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord>>::`vftable')(void *p, char);

//----- (006A6BC0) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>::~NiTListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>(NiTListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *> *this)
{
  this->vfptr = (NiTListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>Vtbl *)&NiTListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>::`vftable';
}
// 9BE93C: using guessed type int (__thiscall *NiTListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>::`vftable')(void *p, char);

//----- (006A6BD0) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord> > *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord>>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord> > *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord> > *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord>>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BE92C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord>>::`vftable')(void *p, char);

//----- (006A6C00) --------------------------------------------------------
NiTListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *> *__thiscall NiTListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>::`vector deleting destructor'(NiTListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *> *this, unsigned int a2)
{
  NiTListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>Vtbl *)&NiTListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BE93C: using guessed type int (__thiscall *NiTListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>::`vftable')(void *p, char);

//----- (006A6C30) --------------------------------------------------------
unsigned int __cdecl ITableBase<ActiveSkillInfo,ActSkillInfoTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (006A6C50) --------------------------------------------------------
ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab> *__thiscall ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::`vector deleting destructor'(ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab> *this, unsigned int a2)
{
  ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab> *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>Vtbl *)&ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BE97C: using guessed type int (__cdecl *ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (006A6CD0) --------------------------------------------------------
PasSkillViewInfoTab *__thiscall IIDTableBase<PassiveSkillViewInfo,PasSkillViewInfoTab,unsigned short>::`scalar deleting destructor'(PasSkillViewInfoTab *this, unsigned int a2)
{
  PasSkillViewInfoTab *v2; // esi@1
  PassiveSkillViewInfo **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pkRecordIDMap;
  this->vfptr = (ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>Vtbl *)&IIDTableBase<PassiveSkillViewInfo,PasSkillViewInfoTab,unsigned short>::`vftable';
  operator delete[](v3);
  v2->vfptr = (ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>Vtbl *)&ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::`vftable';
  CDataReader::ClearBF(&v2->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BE97C: using guessed type int (__cdecl *ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 9BE98C: using guessed type int (__cdecl *IIDTableBase<PassiveSkillViewInfo,PasSkillViewInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (006A6D60) --------------------------------------------------------
ITableBase<ActiveSkillInfo,ActSkillInfoTab> *__thiscall ITableBase<ActiveSkillInfo,ActSkillInfoTab>::`scalar deleting destructor'(ITableBase<ActiveSkillInfo,ActSkillInfoTab> *this, unsigned int a2)
{
  ITableBase<ActiveSkillInfo,ActSkillInfoTab> *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ActiveSkillInfo,ActSkillInfoTab>Vtbl *)&ITableBase<ActiveSkillInfo,ActSkillInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BE9A4: using guessed type int (__cdecl *ITableBase<ActiveSkillInfo,ActSkillInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (006A6DE0) --------------------------------------------------------
ActSkillInfoTab *__thiscall IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::`scalar deleting destructor'(ActSkillInfoTab *this, unsigned int a2)
{
  ActSkillInfoTab *v2; // esi@1
  ActiveSkillInfo **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pkRecordIDMap;
  this->vfptr = (ITableBase<ActiveSkillInfo,ActSkillInfoTab>Vtbl *)&IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::`vftable';
  operator delete[](v3);
  v2->vfptr = (ITableBase<ActiveSkillInfo,ActSkillInfoTab>Vtbl *)&ITableBase<ActiveSkillInfo,ActSkillInfoTab>::`vftable';
  CDataReader::ClearBF(&v2->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BE9A4: using guessed type int (__cdecl *ITableBase<ActiveSkillInfo,ActSkillInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 9BE9B4: using guessed type int (__cdecl *IIDTableBase<ActiveSkillInfo,ActSkillInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (006A6E70) --------------------------------------------------------
ITableBase<PassiveSkillInfo,PasSkillInfoTab> *__thiscall ITableBase<PassiveSkillInfo,PasSkillInfoTab>::`scalar deleting destructor'(ITableBase<PassiveSkillInfo,PasSkillInfoTab> *this, unsigned int a2)
{
  ITableBase<PassiveSkillInfo,PasSkillInfoTab> *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<PassiveSkillInfo,PasSkillInfoTab>Vtbl *)&ITableBase<PassiveSkillInfo,PasSkillInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BE9CC: using guessed type int (__cdecl *ITableBase<PassiveSkillInfo,PasSkillInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (006A6EF0) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord> > *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord>>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord> > *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord> > *v2; // edi@1
  NiTListItem<NiPointer<SkillUseRecord> > *v3; // esi@1
  NiTListItem<NiPointer<SkillUseRecord> > *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord> >Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord>>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord> > *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord>>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BE92C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord>>::`vftable')(void *p, char);
// 9BE95C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord>>::`vftable')(void *p, char);

//----- (006A6F80) --------------------------------------------------------
void __thiscall NiTPointerList<NiPointer<SkillUseRecord>>::~NiTPointerList<NiPointer<SkillUseRecord>>(NiTPointerList<NiPointer<SkillUseRecord> > *this)
{
  NiTPointerList<NiPointer<SkillUseRecord> > *v1; // edi@1
  NiTListItem<NiPointer<SkillUseRecord> > *v2; // esi@1
  NiTListItem<NiPointer<SkillUseRecord> > *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord> >Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord>>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord> > *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord>>::`vftable';
}
// 9BE92C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord>>::`vftable')(void *p, char);
// 9BE95C: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord>>::`vftable')(void *p, char);

//----- (006A7000) --------------------------------------------------------
NiTList<SkillEmpowerRequest::EmpowerReq *> *__thiscall NiTPointerListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>::`scalar deleting destructor'(NiTList<SkillEmpowerRequest::EmpowerReq *> *this, unsigned int a2)
{
  NiTList<SkillEmpowerRequest::EmpowerReq *> *v2; // edi@1
  NiTListItem<SkillEmpowerRequest::EmpowerReq *> *v3; // esi@1
  NiTListItem<SkillEmpowerRequest::EmpowerReq *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>Vtbl *)&NiTPointerListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem(
      (NiTListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *> *)v2,
      v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>Vtbl *)&NiTListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BE93C: using guessed type int (__thiscall *NiTListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>::`vftable')(void *p, char);
// 9BE96C: using guessed type int (__thiscall *NiTPointerListBase<DFALL<SkillEmpowerRequest::EmpowerReq *>,SkillEmpowerRequest::EmpowerReq *>::`vftable')(void *p, char);

//----- (006A7090) --------------------------------------------------------
ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab> *__thiscall ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::`scalar deleting destructor'(ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab> *this, unsigned int a2)
{
  ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab> *v2; // esi@1

  v2 = this;
  this->vfptr = (ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>Vtbl *)&ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::`vftable';
  CDataReader::ClearBF(&this->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BE9F4: using guessed type int (__cdecl *ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (006A7110) --------------------------------------------------------
unsigned int __cdecl ItemActionTab::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<ItemAction,ItemActionTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C1AC: using guessed type int ITableBase<ItemAction,ItemActionTab>::ms_pkTable;

//----- (006A7130) --------------------------------------------------------
PgTList<NiPointer<SkillUseRecord> > *__thiscall PgTList<NiPointer<SkillUseRecord>>::`vector deleting destructor'(PgTList<NiPointer<SkillUseRecord> > *this, unsigned int a2)
{
  PgTList<NiPointer<SkillUseRecord> > *v2; // edi@1
  NiTListItem<NiPointer<SkillUseRecord> > *v3; // esi@1
  NiTListItem<NiPointer<SkillUseRecord> > *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord> >Vtbl *)&PgTList<NiPointer<SkillUseRecord>>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord> > *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord> >Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord>>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BE92C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,NiPointer<SkillUseRecord>>::`vftable')(void *p, char);
// 9BEA2C: using guessed type int (__thiscall *PgTList<NiPointer<SkillUseRecord>>::`vftable')(void *p, char);

//----- (006A71C0) --------------------------------------------------------
void __thiscall ActSkillViewInfoTab::ActSkillViewInfoTab(ActSkillViewInfoTab *this)
{
  ActSkillViewInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>Vtbl *)&ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ActiveSkillViewInfo_ActSkillViewInfoTab_::ITableBase_ActiveSkillViewInfo_ActSkillViewInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->m_pkRecordIDMap = 0;
  v1->m_tMostLargeID = 0;
  v1->vfptr = (ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>Vtbl *)&ActSkillViewInfoTab::`vftable';
}
// 9BE9F4: using guessed type int (__cdecl *ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 9BEA3C: using guessed type int (__cdecl *ActSkillViewInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// B5BBD0: using guessed type int `ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>'::`2'::`local static guard';

//----- (006A7210) --------------------------------------------------------
ActSkillViewInfoTab *__thiscall ActSkillViewInfoTab::`scalar deleting destructor'(ActSkillViewInfoTab *this, unsigned int a2)
{
  ActSkillViewInfoTab *v2; // esi@1
  ActiveSkillViewInfo **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pkRecordIDMap;
  this->vfptr = (ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>Vtbl *)&IIDTableBase<ActiveSkillViewInfo,ActSkillViewInfoTab,unsigned short>::`vftable';
  operator delete[](v3);
  v2->vfptr = (ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>Vtbl *)&ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::`vftable';
  CDataReader::ClearBF(&v2->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BE9F4: using guessed type int (__cdecl *ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 9BEA04: using guessed type int (__cdecl *IIDTableBase<ActiveSkillViewInfo,ActSkillViewInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (006A72A0) --------------------------------------------------------
void __thiscall PasSkillViewInfoTab::PasSkillViewInfoTab(PasSkillViewInfoTab *this)
{
  PasSkillViewInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>Vtbl *)&ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_PassiveSkillViewInfo_PasSkillViewInfoTab_::ITableBase_PassiveSkillViewInfo_PasSkillViewInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->m_pkRecordIDMap = 0;
  v1->m_tMostLargeID = 0;
  v1->vfptr = (ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>Vtbl *)&PasSkillViewInfoTab::`vftable';
}
// 9BE97C: using guessed type int (__cdecl *ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 9BEA54: using guessed type int (__cdecl *PasSkillViewInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// B5BBC4: using guessed type int `ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>'::`2'::`local static guard';

//----- (006A72F0) --------------------------------------------------------
signed int PasSkillViewInfoTab::GetInvalidID()
{
  return 0xFFFF;
}

//----- (006A7300) --------------------------------------------------------
void __thiscall ActSkillInfoTab::ActSkillInfoTab(ActSkillInfoTab *this)
{
  ActSkillInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<ActiveSkillInfo,ActSkillInfoTab>Vtbl *)&ITableBase<ActiveSkillInfo,ActSkillInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ITableBase<ActiveSkillInfo,ActSkillInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ITableBase<ActiveSkillInfo,ActSkillInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_ActiveSkillInfo_ActSkillInfoTab_::ITableBase_ActiveSkillInfo_ActSkillInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->m_pkRecordIDMap = 0;
  v1->m_tMostLargeID = 0;
  v1->vfptr = (ITableBase<ActiveSkillInfo,ActSkillInfoTab>Vtbl *)&ActSkillInfoTab::`vftable';
}
// 9BE9A4: using guessed type int (__cdecl *ITableBase<ActiveSkillInfo,ActSkillInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 9BEA70: using guessed type int (__cdecl *ActSkillInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// B5BBC4: using guessed type int `ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>'::`2'::`local static guard';
// B5BBC8: using guessed type int `ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ITableBase<ActiveSkillInfo,ActSkillInfoTab>'::`2'::`local static guard';

//----- (006A7350) --------------------------------------------------------
void __thiscall PasSkillInfoTab::PasSkillInfoTab(PasSkillInfoTab *this)
{
  PasSkillInfoTab *v1; // esi@1

  v1 = this;
  this->vfptr = (ITableBase<PassiveSkillInfo,PasSkillInfoTab>Vtbl *)&ITableBase<PassiveSkillInfo,PasSkillInfoTab>::`vftable';
  CDataReader::CDataReader(&this->m_kDataReader);
  if ( !(`ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ITableBase<PassiveSkillInfo,PasSkillInfoTab>'::`2'::`local static guard' & 1) )
  {
    `ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ITableBase<PassiveSkillInfo,PasSkillInfoTab>'::`2'::`local static guard' |= 1u;
    atexit(ITableBase_PassiveSkillInfo_PasSkillInfoTab_::ITableBase_PassiveSkillInfo_PasSkillInfoTab__::_2_::_dynamic_atexit_destructor_for____instance____);
  }
  v1->m_acFilename[0] = 0;
  v1->m_pkRecordIDMap = 0;
  v1->m_tMostLargeID = 0;
  v1->vfptr = (ITableBase<PassiveSkillInfo,PasSkillInfoTab>Vtbl *)&PasSkillInfoTab::`vftable';
}
// 9BE9CC: using guessed type int (__cdecl *ITableBase<PassiveSkillInfo,PasSkillInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 9BEA88: using guessed type int (__cdecl *PasSkillInfoTab::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// B5BBC8: using guessed type int `ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ITableBase<ActiveSkillInfo,ActSkillInfoTab>'::`2'::`local static guard';
// B5BBCC: using guessed type int `ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ITableBase<PassiveSkillInfo,PasSkillInfoTab>'::`2'::`local static guard';

//----- (006A73A0) --------------------------------------------------------
PasSkillInfoTab *__thiscall IIDTableBase<PassiveSkillInfo,PasSkillInfoTab,unsigned short>::`vector deleting destructor'(PasSkillInfoTab *this, unsigned int a2)
{
  PasSkillInfoTab *v2; // esi@1
  PassiveSkillInfo **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pkRecordIDMap;
  this->vfptr = (ITableBase<PassiveSkillInfo,PasSkillInfoTab>Vtbl *)&IIDTableBase<PassiveSkillInfo,PasSkillInfoTab,unsigned short>::`vftable';
  operator delete[](v3);
  v2->vfptr = (ITableBase<PassiveSkillInfo,PasSkillInfoTab>Vtbl *)&ITableBase<PassiveSkillInfo,PasSkillInfoTab>::`vftable';
  CDataReader::ClearBF(&v2->m_kDataReader);
  CDataReader::~CDataReader(&v2->m_kDataReader);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BE9CC: using guessed type int (__cdecl *ITableBase<PassiveSkillInfo,PasSkillInfoTab>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);
// 9BE9DC: using guessed type int (__cdecl *IIDTableBase<PassiveSkillInfo,PasSkillInfoTab,unsigned short>::`vftable')(int, char *tmpPath, NiAnimationKey *pkKeys, unsigned int uiNumKeys);

//----- (006A7430) --------------------------------------------------------
bool __cdecl ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  ActSkillViewInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable;
  if ( !ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable )
  {
    v2 = (ActSkillViewInfoTab *)operator new(0xCCu);
    if ( v2 )
      ActSkillViewInfoTab::ActSkillViewInfoTab(v2);
    else
      v1 = 0;
    ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 27615 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8CAA0: using guessed type int ITableBase<ActiveSkillViewInfo,ActSkillViewInfoTab>::ms_pkTable;

//----- (006A7510) --------------------------------------------------------
bool __cdecl ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  PasSkillViewInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::ms_pkTable;
  if ( !ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::ms_pkTable )
  {
    v2 = (PasSkillViewInfoTab *)operator new(0xCCu);
    if ( v2 )
      PasSkillViewInfoTab::PasSkillViewInfoTab(v2);
    else
      v1 = 0;
    ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 2384 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::ms_pkTable
                                               + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8CD58: using guessed type int ITableBase<PassiveSkillViewInfo,PasSkillViewInfoTab>::ms_pkTable;

//----- (006A75F0) --------------------------------------------------------
bool __cdecl ITableBase<ActiveSkillInfo,ActSkillInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  ActSkillInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
  if ( !ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable )
  {
    v2 = (ActSkillInfoTab *)operator new(0xCCu);
    if ( v2 )
      ActSkillInfoTab::ActSkillInfoTab(v2);
    else
      v1 = 0;
    ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 86355 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;

//----- (006A76D0) --------------------------------------------------------
bool __cdecl ITableBase<PassiveSkillInfo,PasSkillInfoTab>::Load(char *acFn)
{
  int v1; // eax@1
  PasSkillInfoTab *v2; // eax@2
  _DWORD *v3; // eax@7
  char *v4; // ecx@9
  _BYTE *v5; // edx@9
  char v6; // al@10
  bool result; // al@11

  v1 = ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ms_pkTable;
  if ( !ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ms_pkTable )
  {
    v2 = (PasSkillInfoTab *)operator new(0xCCu);
    if ( v2 )
      PasSkillInfoTab::PasSkillInfoTab(v2);
    else
      v1 = 0;
    ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ms_pkTable = v1;
  }
  CDataReader::ClearBF((CDataReader *)(v1 + 4));
  if ( CDataReader::Read((CDataReader *)(ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ms_pkTable + 4), acFn)
    && (v3 = *(_DWORD **)(ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ms_pkTable + 56)) != 0
    && *v3 == 8436 )
  {
    v4 = acFn;
    v5 = (_BYTE *)(ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ms_pkTable + 68);
    do
    {
      v6 = *v4;
      *v5++ = *v4++;
    }
    while ( v6 );
    result = (unsigned __int8)(*(int (**)(void))(*(_DWORD *)ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ms_pkTable + 4))() != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8CAAC: using guessed type int ITableBase<PassiveSkillInfo,PasSkillInfoTab>::ms_pkTable;

//----- (006A77B0) --------------------------------------------------------
PartyMemberInfo *__thiscall Party::GetMemberInfo(Party *this, unsigned int uiIndex)
{
  PartyMemberInfo *result; // eax@2

  if ( uiIndex < this->m_uiTotalMember )
    result = &this->m_akMemberInfo[uiIndex];
  else
    result = 0;
  return result;
}

//----- (006A77D0) --------------------------------------------------------
void __thiscall Party::ClearMemberInfo(Party *this)
{
  this->m_bIsMePartyMaster = 0;
  this->m_uiTotalMember = 0;
}

//----- (006A77E0) --------------------------------------------------------
int __thiscall Party::GetBelongType(Party *this)
{
  return this->m_iBelongType;
}

//----- (006A77F0) --------------------------------------------------------
void __thiscall Party::SetBelongType(Party *this, int iType)
{
  this->m_iBelongType = iType;
}

//----- (006A7800) --------------------------------------------------------
void __thiscall Party::SetLootType(Party *this, char nItemGrade, char nItemLooting)
{
  if ( (unsigned __int8)nItemLooting < 4u && (unsigned __int8)nItemGrade < 4u )
  {
    this->m_eLootType = (unsigned __int8)nItemLooting;
    this->m_eItemType = (unsigned __int8)nItemGrade;
  }
}

//----- (006A7830) --------------------------------------------------------
void __thiscall Party::~Party(Party *this)
{
  this->vfptr = (PartyVtbl *)&Party::`vftable';
  `eh vector destructor iterator'(
    this->m_akMemberInfo,
    0x44u,
    5,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
}
// 9BEAA4: using guessed type int (__thiscall *Party::`vftable')(void *p, char);

//----- (006A7850) --------------------------------------------------------
void __thiscall Party::SetJoinProposeData(Party *this, PROTO_NC_PARTY_JOINPROPOSE_REQ *p)
{
  this->m_bDuringJoinPropose = 1;
  *(_QWORD *)&this->m_kJoinProposeCharID.n5_name[0] = *(_QWORD *)&p->mastername.n5_name[0];
  *(_QWORD *)&this->m_kJoinProposeCharID.n5_code[2] = *(_QWORD *)&p->mastername.n5_code[2];
  this->m_kJoinProposeCharID.n5_code[4] = p->mastername.n5_code[4];
  this->m_fJoinProposeStartTime = Timer::ms_fCurTime;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006A7890) --------------------------------------------------------
void __thiscall Party::ClearJoinProposeData(Party *this)
{
  char *v1; // eax@1

  v1 = this->m_kJoinProposeCharID.n5_name;
  this->m_bDuringJoinPropose = 0;
  *((_DWORD *)v1 + 4) = 0;
  *((_DWORD *)v1 + 3) = 0;
  *((_DWORD *)v1 + 2) = 0;
  *((_DWORD *)v1 + 1) = 0;
  *(_DWORD *)v1 = 0;
  strncpy(this->m_kJoinProposeCharID.n5_name, byte_9BEA9E, 0x14u);
}

//----- (006A78C0) --------------------------------------------------------
PartyMemberInfo *__thiscall Party::GetMemberInfo(Party *this, Name5 kCharID)
{
  unsigned int v2; // esi@1
  unsigned int v3; // edx@1
  char *v4; // eax@2
  PartyMemberInfo *result; // eax@7

  v2 = this->m_uiTotalMember;
  v3 = 0;
  if ( v2 )
  {
    v4 = &this->m_akMemberInfo[0].m_kCharID.n5_name[8];
    while ( __PAIR__(*((_DWORD *)v4 - 1), *((_DWORD *)v4 - 2)) != *(_QWORD *)&kCharID.n5_name[0]
         || *(_QWORD *)v4 != *(_QWORD *)&kCharID.n5_code[2]
         || *((_DWORD *)v4 + 2) != kCharID.n5_code[4] )
    {
      ++v3;
      v4 += 68;
      if ( v3 >= v2 )
        goto LABEL_7;
    }
    result = &this->m_akMemberInfo[v3];
  }
  else
  {
LABEL_7:
    result = 0;
  }
  return result;
}

//----- (006A7920) --------------------------------------------------------
void __thiscall Party::SetMemberList(Party *this, PROTO_NC_PARTY_MEMBER_LIST_CMD *p)
{
  Party *v2; // esi@1
  PROTO_NC_PARTY_MEMBER_LIST_CMD *v3; // edi@1
  Name5 *v4; // eax@1
  int v5; // ecx@4
  int v6; // edx@4
  char v7; // al@10
  unsigned int v8; // eax@12
  Name5 *kMainCharID; // [sp+Ch] [bp-4h]@1
  unsigned int i; // [sp+18h] [bp+8h]@3

  v2 = this;
  v3 = p;
  this->m_uiTotalMember = 0;
  this->m_bIsMePartyMaster = 0;
  this->m_uiTotalMember = p->membercount;
  v4 = User::GetMainCharID(&g_kUser);
  kMainCharID = v4;
  v2->m_bIsMePartyMaster = 0;
  if ( v2->m_uiTotalMember > 0 )
  {
    v2->m_kPartyMasterID.n5_code[0] = *(_DWORD *)&p[1].membercount;
    v2->m_kPartyMasterID.n5_code[1] = *(_DWORD *)&p[5].membercount;
    v2->m_kPartyMasterID.n5_code[2] = *(_DWORD *)&p[9].membercount;
    v2->m_kPartyMasterID.n5_code[3] = *(_DWORD *)&p[13].membercount;
    v2->m_kPartyMasterID.n5_code[4] = *(_DWORD *)&p[17].membercount;
  }
  i = 0;
  if ( v2->m_uiTotalMember > 0 )
  {
    v5 = (int)&v2->m_akMemberInfo[0].m_kCharID.n5_code[2];
    v6 = (int)&v3[9].membercount;
    do
    {
      if ( v4->n5_code[0] != *(_DWORD *)(v6 - 8)
        || v4->n5_code[1] != *(_DWORD *)(v6 - 4)
        || v4->n5_code[2] != *(_DWORD *)v6
        || v4->n5_code[3] != *(_DWORD *)(v6 + 4)
        || v4->n5_code[4] != *(_DWORD *)(v6 + 8) )
      {
        *(_DWORD *)(v5 - 8) = *(_DWORD *)(v6 - 8);
        *(_DWORD *)(v5 - 4) = *(_DWORD *)(v6 - 4);
        *(_DWORD *)v5 = *(_DWORD *)v6;
        *(_DWORD *)(v5 + 4) = *(_DWORD *)(v6 + 4);
        *(_DWORD *)(v5 + 8) = *(_DWORD *)(v6 + 8);
        *(_BYTE *)(v5 + 12) = *(_BYTE *)(v6 + 12);
        *(_DWORD *)(v5 + 16) = 0;
        *(_DWORD *)(v5 + 20) = 0;
        *(_DWORD *)(v5 + 24) = 0;
        *(_DWORD *)(v5 + 28) = 0;
        *(_DWORD *)(v5 + 32) = 0;
        v7 = *(_BYTE *)(v6 + 13);
        *(float *)(v5 + 48) = 0.0;
        *(_BYTE *)(v5 + 44) = v7;
        *(float *)(v5 + 52) = 0.0;
        v4 = kMainCharID;
        *(_BYTE *)(v5 + 45) = 0;
        *(_BYTE *)(v5 + 56) = 0;
        *(_DWORD *)(v5 + 36) = 0;
        *(_DWORD *)(v5 + 40) = 0;
        v5 += 68;
      }
      v6 += 22;
      ++i;
    }
    while ( i < v2->m_uiTotalMember );
  }
  v8 = v2->m_uiTotalMember;
  if ( v8 > 0 )
    v2->m_uiTotalMember = v8 - 1;
}

//----- (006A7A30) --------------------------------------------------------
PartyMemberInfo *__thiscall Party::AddMember(Party *this, PROTO_NC_PARTY_JOIN_ACK *p)
{
  Party *v2; // esi@1
  PartyMemberInfo *result; // eax@2
  Name5 *v4; // eax@3
  Name5 *v5; // eax@10
  int v6; // ecx@11
  int v7; // eax@11

  v2 = this;
  if ( this->m_uiTotalMember < 4 )
  {
    v4 = User::GetMainCharID(&g_kUser);
    if ( v4->n5_code[0] != p->memberid.n5_code[0]
      || v4->n5_code[1] != p->memberid.n5_code[1]
      || v4->n5_code[2] != p->memberid.n5_code[2]
      || v4->n5_code[3] != p->memberid.n5_code[3]
      || v4->n5_code[4] != p->memberid.n5_code[4] )
    {
      if ( !v2->m_uiTotalMember )
      {
        v2->m_bIsMePartyMaster = 1;
        v5 = User::GetMainCharID(&g_kUser);
        v2->m_kPartyMasterID.n5_code[0] = v5->n5_code[0];
        v2->m_kPartyMasterID.n5_code[1] = v5->n5_code[1];
        v2->m_kPartyMasterID.n5_code[2] = v5->n5_code[2];
        v2->m_kPartyMasterID.n5_code[3] = v5->n5_code[3];
        v2->m_kPartyMasterID.n5_code[4] = v5->n5_code[4];
      }
      v6 = 17 * v2->m_uiTotalMember;
      v2->m_akMemberInfo[4 * v6 / 0x44u].m_kCharID.n5_code[0] = p->memberid.n5_code[0];
      v7 = (int)&v2->m_akMemberInfo[4 * v6 / 0x44u];
      *(_QWORD *)(v7 + 4) = *(_QWORD *)&p->memberid.n5_code[1];
      *(_QWORD *)(v7 + 12) = *(_QWORD *)&p->memberid.n5_code[3];
      v2->m_akMemberInfo[v2->m_uiTotalMember].m_ucStatus = 1;
      v2->m_akMemberInfo[v2->m_uiTotalMember].m_fX = 0.0;
      v2->m_akMemberInfo[v2->m_uiTotalMember].m_fY = 0.0;
      v2->m_akMemberInfo[v2->m_uiTotalMember++].m_byChrClass = p->charclass;
      result = (PartyMemberInfo *)&v2->m_kPartyMasterID.n5_code[17 * v2->m_uiTotalMember + 4];
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006A7B40) --------------------------------------------------------
void __thiscall Party::MemberLogout(Party *this, PROTO_NC_PARTY_LOGOUTINFO_CMD *p)
{
  _BYTE v2[20]; // ST00_20@1
  PartyMemberInfo *v3; // eax@1

  *(_DWORD *)v2 = p->memberid.n5_code[0];
  *(_QWORD *)&v2[4] = *(_QWORD *)&p->memberid.n5_code[1];
  *(_QWORD *)&v2[12] = *(_QWORD *)&p->memberid.n5_code[3];
  v3 = Party::GetMemberInfo(this, *(Name5 *)v2);
  if ( v3 )
    v3->m_ucStatus = 0;
}

//----- (006A7B80) --------------------------------------------------------
void __thiscall Party::MemberLogin(Party *this, PROTO_NC_PARTY_LOGININFO_CMD *p)
{
  _BYTE v2[20]; // ST00_20@1
  PartyMemberInfo *v3; // eax@1

  *(_DWORD *)v2 = p->memberid.n5_code[0];
  *(_QWORD *)&v2[4] = *(_QWORD *)&p->memberid.n5_code[1];
  *(_QWORD *)&v2[12] = *(_QWORD *)&p->memberid.n5_code[3];
  v3 = Party::GetMemberInfo(this, *(Name5 *)v2);
  if ( v3 )
    v3->m_ucStatus = 1;
}

//----- (006A7BC0) --------------------------------------------------------
void __thiscall Party::ChangePartyMaster(Party *this, Name5 kCharID)
{
  Party *v2; // esi@1
  Name5 *v3; // eax@1

  v2 = this;
  v3 = User::GetMainCharID(&g_kUser);
  v2->m_bIsMePartyMaster = *(_QWORD *)&kCharID.n5_name[0] == *(_QWORD *)&v3->n5_code[0]
                        && *(_QWORD *)&kCharID.n5_code[2] == *(_QWORD *)&v3->n5_code[2]
                        && kCharID.n5_code[4] == v3->n5_code[4];
  v2->m_kPartyMasterID.n5_code[0] = kCharID.n5_code[0];
  v2->m_kPartyMasterID.n5_code[3] = kCharID.n5_code[3];
  *(_QWORD *)&v2->m_kPartyMasterID.n5_code[1] = *(_QWORD *)&kCharID.n5_code[1];
  v2->m_kPartyMasterID.n5_code[4] = kCharID.n5_code[4];
}

//----- (006A7C30) --------------------------------------------------------
Name5 *__thiscall Party::GetPartyMasterID(Party *this, Name5 *result)
{
  Name5 *v2; // eax@1

  v2 = result;
  *(_QWORD *)&result->n5_code[0] = *(_QWORD *)&this->m_kPartyMasterID.n5_name[0];
  result->n5_code[2] = this->m_kPartyMasterID.n5_code[2];
  *(_QWORD *)&result->n5_code[3] = *(_QWORD *)&this->m_kPartyMasterID.n5_code[3];
  return v2;
}

//----- (006A7C60) --------------------------------------------------------
BOOL __thiscall Party::IsMePartyMaster(Party *this)
{
  Party *v1; // esi@1
  Name5 *v2; // eax@1

  v1 = this;
  v2 = User::GetMainCharID(&g_kUser);
  return v1->m_kPartyMasterID.n5_code[0] == v2->n5_code[0]
      && v1->m_kPartyMasterID.n5_code[1] == v2->n5_code[1]
      && v1->m_kPartyMasterID.n5_code[2] == v2->n5_code[2]
      && v1->m_kPartyMasterID.n5_code[3] == v2->n5_code[3]
      && v1->m_kPartyMasterID.n5_code[4] == v2->n5_code[4];
}

//----- (006A7CB0) --------------------------------------------------------
Name5 *__thiscall Party::GetLooterID(Party *this, Name5 *result)
{
  Name5 *v2; // eax@1

  v2 = result;
  *(_QWORD *)&result->n5_code[0] = *(_QWORD *)&this->m_kLooterID.n5_name[0];
  result->n5_code[2] = this->m_kLooterID.n5_code[2];
  *(_QWORD *)&result->n5_code[3] = *(_QWORD *)&this->m_kLooterID.n5_code[3];
  return v2;
}

//----- (006A7CE0) --------------------------------------------------------
void __thiscall Party::SetLooterID(Party *this, Name5 kLooterID)
{
  *(_QWORD *)&this->m_kLooterID.n5_name[0] = *(_QWORD *)&kLooterID.n5_name[0];
  this->m_kLooterID.n5_code[2] = kLooterID.n5_code[2];
  *(_QWORD *)&this->m_kLooterID.n5_code[3] = *(_QWORD *)&kLooterID.n5_code[3];
}

//----- (006A7D10) --------------------------------------------------------
void __thiscall Party::ChangeUserName(Party *this, Name5 *OldName, Name5 *NewName)
{
  Party *v3; // esi@1
  _BYTE v4[20]; // ST00_20@1
  PartyMemberInfo *v5; // eax@1
  Name5 *v6; // eax@3
  unsigned int v7; // eax@8
  unsigned int v8; // ecx@8
  unsigned int v9; // edx@8
  unsigned int v10; // eax@8
  unsigned int v11; // ecx@8
  Name5 result; // [sp+Ch] [bp-14h]@3

  v3 = this;
  *(_DWORD *)v4 = OldName->n5_code[0];
  *(_QWORD *)&v4[4] = *(_QWORD *)&OldName->n5_code[1];
  *(_QWORD *)&v4[12] = *(_QWORD *)&OldName->n5_code[3];
  v5 = Party::GetMemberInfo(this, *(Name5 *)v4);
  if ( v5 )
  {
    *(_QWORD *)&v5->m_kCharID.n5_name[0] = *(_QWORD *)&NewName->n5_code[0];
    *(_QWORD *)&v5->m_kCharID.n5_code[2] = *(_QWORD *)&NewName->n5_code[2];
    v5->m_kCharID.n5_code[4] = NewName->n5_code[4];
  }
  v6 = Party::GetLooterID(v3, &result);
  if ( v6->n5_code[0] == OldName->n5_code[0]
    && v6->n5_code[1] == OldName->n5_code[1]
    && v6->n5_code[2] == OldName->n5_code[2]
    && v6->n5_code[3] == OldName->n5_code[3]
    && v6->n5_code[4] == OldName->n5_code[4] )
  {
    v7 = NewName->n5_code[0];
    v8 = NewName->n5_code[1];
    *(_QWORD *)&result.n5_code[2] = *(_QWORD *)&NewName->n5_code[2];
    v9 = NewName->n5_code[4];
    v3->m_kLooterID.n5_code[0] = v7;
    v10 = result.n5_code[2];
    v3->m_kLooterID.n5_code[1] = v8;
    v11 = result.n5_code[3];
    v3->m_kLooterID.n5_code[2] = v10;
    v3->m_kLooterID.n5_code[3] = v11;
    v3->m_kLooterID.n5_code[4] = v9;
  }
  if ( v3->m_kPartyMasterID.n5_code[0] == OldName->n5_code[0]
    && v3->m_kPartyMasterID.n5_code[1] == OldName->n5_code[1]
    && v3->m_kPartyMasterID.n5_code[2] == OldName->n5_code[2]
    && v3->m_kPartyMasterID.n5_code[3] == OldName->n5_code[3]
    && v3->m_kPartyMasterID.n5_code[4] == OldName->n5_code[4] )
  {
    *(_QWORD *)&v3->m_kPartyMasterID.n5_name[0] = *(_QWORD *)&NewName->n5_code[0];
    *(_QWORD *)&v3->m_kPartyMasterID.n5_code[2] = *(_QWORD *)&NewName->n5_code[2];
    v3->m_kPartyMasterID.n5_code[4] = NewName->n5_code[4];
  }
  if ( v3->m_kJoinProposeCharID.n5_code[0] == OldName->n5_code[0]
    && v3->m_kJoinProposeCharID.n5_code[1] == OldName->n5_code[1]
    && v3->m_kJoinProposeCharID.n5_code[2] == OldName->n5_code[2]
    && v3->m_kJoinProposeCharID.n5_code[3] == OldName->n5_code[3]
    && v3->m_kJoinProposeCharID.n5_code[4] == OldName->n5_code[4] )
  {
    *(_QWORD *)&v3->m_kJoinProposeCharID.n5_name[0] = *(_QWORD *)&NewName->n5_code[0];
    *(_QWORD *)&v3->m_kJoinProposeCharID.n5_code[2] = *(_QWORD *)&NewName->n5_code[2];
    v3->m_kJoinProposeCharID.n5_code[4] = NewName->n5_code[4];
  }
}

//----- (006A7E60) --------------------------------------------------------
void __thiscall Party::Party(Party *this)
{
  Party *v1; // esi@1

  v1 = this;
  this->vfptr = (PartyVtbl *)&Party::`vftable';
  *(_QWORD *)&this->m_kPartyMasterID.n5_code[3] = 0i64;
  *(_QWORD *)&this->m_kPartyMasterID.n5_code[1] = 0i64;
  this->m_kPartyMasterID.n5_code[0] = 0;
  *(_QWORD *)&this->m_kLooterID.n5_code[3] = 0i64;
  *(_QWORD *)&this->m_kLooterID.n5_code[1] = 0i64;
  this->m_kLooterID.n5_code[0] = 0;
  *(_QWORD *)&this->m_kJoinProposeCharID.n5_code[3] = 0i64;
  *(_QWORD *)&this->m_kJoinProposeCharID.n5_code[1] = 0i64;
  this->m_kJoinProposeCharID.n5_code[0] = 0;
  `eh vector constructor iterator'(
    this->m_akMemberInfo,
    0x44u,
    5,
    (void (__thiscall *)(void *))Name5::Name5,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
  v1->m_fJoinProposeStartTime = 0.0;
  v1->m_bIsMePartyMaster = 1;
  v1->m_iBelongType = 1;
  v1->m_bDuringJoinPropose = 0;
  v1->m_eLootingType = 0;
  v1->m_eLootType = 0;
  v1->m_eItemType = 0;
}
// 9BEAA4: using guessed type int (__thiscall *Party::`vftable')(void *p, char);

//----- (006A7EE0) --------------------------------------------------------
void __thiscall Party::Clear(Party *this)
{
  Party *v1; // esi@1
  char *v2; // ST18_4@1
  int v3; // ST0C_4@1
  int v4; // eax@1

  v1 = this;
  this->m_bIsMePartyMaster = 0;
  this->m_uiTotalMember = 0;
  this->m_bDuringJoinPropose = 0;
  v2 = this->m_kJoinProposeCharID.n5_name;
  *((_DWORD *)v2 + 4) = 0;
  *((_DWORD *)v2 + 3) = 0;
  *((_DWORD *)v2 + 2) = 0;
  *((_DWORD *)v2 + 1) = 0;
  *(_DWORD *)v2 = 0;
  strncpy(this->m_kJoinProposeCharID.n5_name, byte_9BEA9E, 0x14u);
  v1->m_iBelongType = 1;
  v1->m_eLootType = 0;
  v1->m_eItemType = 0;
  v3 = (int)&v1->m_kLooterID;
  *(_DWORD *)(v3 + 16) = 0;
  *(_DWORD *)(v3 + 12) = 0;
  *(_DWORD *)(v3 + 8) = 0;
  *(_DWORD *)(v3 + 4) = 0;
  *(_DWORD *)v3 = 0;
  strncpy(v1->m_kLooterID.n5_name, &byte_9BEA9C, 0x14u);
  v4 = (int)&v1->m_kPartyMasterID;
  *(_DWORD *)(v4 + 16) = 0;
  *(_DWORD *)(v4 + 12) = 0;
  *(_DWORD *)(v4 + 8) = 0;
  *(_DWORD *)(v4 + 4) = 0;
  *(_DWORD *)v4 = 0;
  strncpy(v1->m_kPartyMasterID.n5_name, &byte_9BEA9D, 0x14u);
}

//----- (006A7F60) --------------------------------------------------------
void __thiscall Party::DeleteMember(Party *this, Name5 kDelCharID)
{
  Party *v2; // esi@1
  Name5 *v3; // eax@1
  unsigned int v4; // edx@4
  unsigned int v5; // ecx@4
  int v6; // eax@5
  int v7; // eax@12
  double v8; // st7@13

  v2 = this;
  v3 = User::GetMainCharID(&g_kUser);
  if ( *(_QWORD *)&v3->n5_code[0] != *(_QWORD *)&kDelCharID.n5_name[0]
    || *(_QWORD *)&v3->n5_code[2] != *(_QWORD *)&kDelCharID.n5_code[2]
    || v3->n5_code[4] != kDelCharID.n5_code[4] )
  {
    v4 = v2->m_uiTotalMember;
    v5 = 0;
    if ( v4 )
    {
      v6 = (int)&v2->m_akMemberInfo[0].m_kCharID.n5_code[2];
      while ( __PAIR__(*(_DWORD *)(v6 - 4), *(_DWORD *)(v6 - 8)) != *(_QWORD *)&kDelCharID.n5_name[0]
           || *(_QWORD *)v6 != *(_QWORD *)&kDelCharID.n5_code[2]
           || *(_DWORD *)(v6 + 8) != kDelCharID.n5_code[4] )
      {
        ++v5;
        v6 += 68;
        if ( v5 >= v4 )
          return;
      }
      if ( v5 < v4 - 1 )
      {
        v7 = (int)&v2->m_akMemberInfo[v5].m_kCharID.n5_code[1];
        do
        {
          *(_DWORD *)(v7 - 4) = *(_DWORD *)(v7 + 64);
          *(_DWORD *)v7 = *(_DWORD *)(v7 + 68);
          *(_DWORD *)(v7 + 4) = *(_DWORD *)(v7 + 72);
          *(_DWORD *)(v7 + 8) = *(_DWORD *)(v7 + 76);
          *(_DWORD *)(v7 + 12) = *(_DWORD *)(v7 + 80);
          *(_BYTE *)(v7 + 16) = *(_BYTE *)(v7 + 84);
          *(_DWORD *)(v7 + 20) = *(_DWORD *)(v7 + 88);
          *(_DWORD *)(v7 + 24) = *(_DWORD *)(v7 + 92);
          *(_DWORD *)(v7 + 28) = *(_DWORD *)(v7 + 96);
          *(_DWORD *)(v7 + 32) = *(_DWORD *)(v7 + 100);
          *(_DWORD *)(v7 + 36) = *(_DWORD *)(v7 + 104);
          *(_DWORD *)(v7 + 40) = *(_DWORD *)(v7 + 108);
          *(_DWORD *)(v7 + 44) = *(_DWORD *)(v7 + 112);
          *(_BYTE *)(v7 + 48) = *(_BYTE *)(v7 + 116);
          *(_BYTE *)(v7 + 49) = *(_BYTE *)(v7 + 117);
          ++v5;
          v8 = *(float *)(v7 + 120);
          v7 += 68;
          *(float *)(v7 - 16) = v8;
          *(float *)(v7 - 12) = *(float *)(v7 + 56);
          *(_BYTE *)(v7 - 8) = *(_BYTE *)(v7 + 60);
        }
        while ( v5 < v2->m_uiTotalMember - 1 );
      }
      --v2->m_uiTotalMember;
    }
  }
}

//----- (006A8080) --------------------------------------------------------
Party *__thiscall Party::`vector deleting destructor'(Party *this, unsigned int a2)
{
  Party *v2; // esi@1

  v2 = this;
  this->vfptr = (PartyVtbl *)&Party::`vftable';
  `eh vector destructor iterator'(
    this->m_akMemberInfo,
    0x44u,
    5,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BEAA4: using guessed type int (__thiscall *Party::`vftable')(void *p, char);

//----- (006A80C0) --------------------------------------------------------
std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *__cdecl std::_Copy_backward<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>>>> *,std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>>>> *>(std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *_First, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *_Last, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *_Dest)
{
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *v3; // ecx@1
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *result; // eax@1
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v5; // esi@2

  v3 = _Last;
  for ( result = _Dest; v3 != _First; result->_Ptr = v5 )
  {
    v5 = v3[-1]._Ptr;
    --v3;
    --result;
  }
  return result;
}

//----- (006A80F0) --------------------------------------------------------
void __cdecl ActSkillInfoTab::CheckCRC()
{
  int v0; // edi@1
  unsigned int v1; // esi@1
  char *v2; // ebx@2
  char *v3; // ST10_4@2
  char *v4; // ST18_4@2
  char *v5; // ST20_4@2
  char *v6; // STAC_4@2
  char *v7; // ST28_4@2
  char *v8; // ST30_4@2
  char *v9; // ST24_4@2
  char *v10; // STB4_4@2
  char *v11; // ST38_4@2
  char *v12; // ST40_4@2
  char *v13; // ST48_4@2
  char *v14; // ST50_4@2
  char *v15; // ST58_4@2
  char *v16; // ST60_4@2
  char *v17; // ST68_4@2
  char *v18; // ST70_4@2
  char *v19; // ST64_4@2
  char *v20; // STBC_4@2
  char *v21; // ST3C_4@2
  char *v22; // STC4_4@2
  char *v23; // ST78_4@2
  char *v24; // ST80_4@2
  char *v25; // ST88_4@2
  char *v26; // ST90_4@2
  char *v27; // ST98_4@2
  char *v28; // STA0_4@2
  char *v29; // STA8_4@2
  char *v30; // STB0_4@2
  char *v31; // STB8_4@2
  char *v32; // STC0_4@2
  char *v33; // STC8_4@2
  char *v34; // STD0_4@2
  char *v35; // ST1C_4@2
  char *v36; // ST74_4@2
  char *v37; // ST44_4@2
  char *v38; // ST7C_4@2
  char *v39; // ST2C_4@2
  char *v40; // ST84_4@2
  char *v41; // ST4C_4@2
  char *v42; // ST8C_4@2
  char *v43; // ST14_4@2
  char *v44; // ST94_4@2
  char *v45; // ST54_4@2
  char *v46; // ST9C_4@2
  char *v47; // ST34_4@2
  char *v48; // STA4_4@2
  char *v49; // ST5C_4@2
  char *v50; // ST6C_4@2
  char *v51; // STCC_4@2
  int v52; // eax@2

  v0 = 0;
  v1 = 0;
  if ( ITableBase<ActiveSkillInfo,ActSkillInfoTab>::GetTotal() )
  {
    do
    {
      v2 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v3 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v4 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v5 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v6 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v7 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v8 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v9 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v10 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v11 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v12 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v13 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v14 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v15 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v16 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v17 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v18 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v19 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v20 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v21 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v22 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v23 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v24 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v25 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v26 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v27 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v28 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v29 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v30 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v31 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v32 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v33 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v34 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v35 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v36 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v37 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v38 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v39 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v40 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v41 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v42 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v43 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v44 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v45 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v46 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v47 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v48 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v49 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v50 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v51 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v1);
      v52 = *((_DWORD *)v17 + 46)
          + *((_DWORD *)v18 + 47)
          + *(_DWORD *)(v23 + 199)
          + *(_DWORD *)(v24 + 203)
          + *(_DWORD *)(v25 + 207)
          + *(_DWORD *)(v26 + 211)
          + *(_DWORD *)(v27 + 215)
          + *(_DWORD *)(v28 + 219)
          + *(_DWORD *)(v29 + 223)
          + *(_DWORD *)(v30 + 227)
          + *(_DWORD *)(v31 + 231)
          + *(_DWORD *)(v32 + 235)
          + *(_DWORD *)(v33 + 239)
          + *(_DWORD *)(v34 + 243)
          + *(_DWORD *)(v35 + 247)
          + *(_DWORD *)(v36 + 251)
          + *(_DWORD *)(v37 + 255)
          + *(_DWORD *)(v38 + 259)
          + *(_DWORD *)(v39 + 263)
          + *(_DWORD *)(v40 + 267)
          + *(_DWORD *)(v41 + 303)
          + *(_DWORD *)(v42 + 307)
          + *(_DWORD *)(v43 + 343)
          + *(_DWORD *)(v44 + 347)
          + *(_DWORD *)(v45 + 383)
          + *(_DWORD *)(v46 + 387)
          + *(_DWORD *)(v47 + 423)
          + *(_DWORD *)(v48 + 427)
          + *(_DWORD *)(v49 + 527)
          + *((_WORD *)v6 + 73)
          + *((_WORD *)v9 + 78)
          + *((_WORD *)v10 + 79)
          + (unsigned __int8)v19[192]
          + *(_WORD *)(v20 + 193)
          + *(_WORD *)(v21 + 195)
          + *(_WORD *)(v22 + 197)
          + (unsigned __int8)v50[667]
          + (unsigned __int8)v51[668]
          + *(_WORD *)(CDataReader::GetRecord(
                         (CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4),
                         v1++)
                     + 669);
      v0 = (*(_DWORD *)(v2 + 98)
          + *(_DWORD *)(v3 + 102)
          + *(_DWORD *)(v4 + 106)
          + *(_DWORD *)(v5 + 110)
          + *((_DWORD *)v7 + 37)
          + *((_DWORD *)v8 + 38)
          + *((_DWORD *)v11 + 40)
          + *((_DWORD *)v12 + 41)
          + *((_DWORD *)v13 + 42)
          + *((_DWORD *)v14 + 43)
          + *((_DWORD *)v15 + 44)
          + *((_DWORD *)v16 + 45)
          + v52
          + v0) ^ 0x92;
    }
    while ( v1 < ITableBase<ActiveSkillInfo,ActSkillInfoTab>::GetTotal() );
  }
  if ( v0 != ActSkillInfoTab::crcSum )
    terminate();
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
// B5BD8C: using guessed type unsigned __int32 ActSkillInfoTab::crcSum;

//----- (006A8710) --------------------------------------------------------
void __cdecl ActSkillInfoTab::GenerateCRCSum()
{
  unsigned int v0; // esi@1
  char *v1; // edi@2
  char *v2; // ebx@2
  char *v3; // ST10_4@2
  char *v4; // ST18_4@2
  char *v5; // ST5C_4@2
  char *v6; // ST20_4@2
  char *v7; // ST28_4@2
  char *v8; // STAC_4@2
  char *v9; // ST24_4@2
  char *v10; // ST30_4@2
  char *v11; // ST38_4@2
  char *v12; // ST40_4@2
  char *v13; // ST48_4@2
  char *v14; // ST50_4@2
  char *v15; // ST58_4@2
  char *v16; // ST60_4@2
  char *v17; // ST68_4@2
  char *v18; // STB4_4@2
  char *v19; // ST64_4@2
  char *v20; // STBC_4@2
  char *v21; // ST3C_4@2
  char *v22; // ST70_4@2
  char *v23; // ST78_4@2
  char *v24; // ST80_4@2
  char *v25; // ST88_4@2
  char *v26; // ST90_4@2
  char *v27; // ST98_4@2
  char *v28; // STA0_4@2
  char *v29; // STA8_4@2
  char *v30; // STB0_4@2
  char *v31; // STB8_4@2
  char *v32; // STC0_4@2
  char *v33; // STC8_4@2
  char *v34; // STCC_4@2
  char *v35; // ST1C_4@2
  char *v36; // ST74_4@2
  char *v37; // ST44_4@2
  char *v38; // ST7C_4@2
  char *v39; // ST2C_4@2
  char *v40; // ST84_4@2
  char *v41; // ST4C_4@2
  char *v42; // ST8C_4@2
  char *v43; // ST14_4@2
  char *v44; // ST94_4@2
  char *v45; // ST54_4@2
  char *v46; // ST9C_4@2
  char *v47; // ST34_4@2
  char *v48; // STA4_4@2
  char *v49; // STC4_4@2
  char *v50; // ST6C_4@2
  int v51; // eax@2

  v0 = 0;
  ActSkillInfoTab::crcSum = 0;
  if ( ITableBase<ActiveSkillInfo,ActSkillInfoTab>::GetTotal() )
  {
    do
    {
      v1 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v2 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v3 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v4 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v5 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v6 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v7 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v8 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v9 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v10 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v11 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v12 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v13 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v14 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v15 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v16 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v17 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v18 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v19 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v20 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v21 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v22 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v23 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v24 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v25 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v26 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v27 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v28 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v29 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v30 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v31 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v32 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v33 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v34 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v35 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v36 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v37 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v38 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v39 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v40 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v41 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v42 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v43 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v44 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v45 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v46 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v47 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v48 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v49 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v50 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4), v0);
      v51 = *((_DWORD *)v16 + 46)
          + *((_DWORD *)v17 + 47)
          + *(_DWORD *)(v22 + 199)
          + *(_DWORD *)(v23 + 203)
          + *(_DWORD *)(v24 + 207)
          + *(_DWORD *)(v25 + 211)
          + *(_DWORD *)(v26 + 215)
          + *(_DWORD *)(v27 + 219)
          + *(_DWORD *)(v28 + 223)
          + *(_DWORD *)(v29 + 227)
          + *(_DWORD *)(v30 + 231)
          + *(_DWORD *)(v31 + 235)
          + *(_DWORD *)(v32 + 239)
          + *(_DWORD *)(v33 + 243)
          + *(_DWORD *)(v34 + 247)
          + *(_DWORD *)(v35 + 251)
          + *(_DWORD *)(v36 + 255)
          + *(_DWORD *)(v37 + 259)
          + *(_DWORD *)(v38 + 263)
          + *(_DWORD *)(v39 + 267)
          + *(_DWORD *)(v40 + 303)
          + *(_DWORD *)(v41 + 307)
          + *(_DWORD *)(v42 + 343)
          + *(_DWORD *)(v43 + 347)
          + *(_DWORD *)(v44 + 383)
          + *(_DWORD *)(v45 + 387)
          + *(_DWORD *)(v46 + 423)
          + *(_DWORD *)(v47 + 427)
          + *(_DWORD *)(v48 + 527)
          + *((_WORD *)v5 + 73)
          + *((_WORD *)v8 + 78)
          + *((_WORD *)v9 + 79)
          + (unsigned __int8)v18[192]
          + *(_WORD *)(v19 + 193)
          + *(_WORD *)(v20 + 195)
          + *(_WORD *)(v21 + 197)
          + (unsigned __int8)v49[667]
          + (unsigned __int8)v50[668]
          + *(_WORD *)(CDataReader::GetRecord(
                         (CDataReader *)(ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable + 4),
                         v0++)
                     + 669);
      ActSkillInfoTab::crcSum = (ActSkillInfoTab::crcSum
                               + *(_DWORD *)(v1 + 98)
                               + *(_DWORD *)(v2 + 102)
                               + *(_DWORD *)(v3 + 106)
                               + *(_DWORD *)(v4 + 110)
                               + *((_DWORD *)v6 + 37)
                               + *((_DWORD *)v7 + 38)
                               + *((_DWORD *)v10 + 40)
                               + *((_DWORD *)v11 + 41)
                               + *((_DWORD *)v12 + 42)
                               + *((_DWORD *)v13 + 43)
                               + *((_DWORD *)v14 + 44)
                               + *((_DWORD *)v15 + 45)
                               + v51) ^ 0x92;
    }
    while ( v0 < ITableBase<ActiveSkillInfo,ActSkillInfoTab>::GetTotal() );
  }
}
// A8CA58: using guessed type int ITableBase<ActiveSkillInfo,ActSkillInfoTab>::ms_pkTable;
// B5BD8C: using guessed type unsigned __int32 ActSkillInfoTab::crcSum;

//----- (006A8D20) --------------------------------------------------------
char __thiscall ActSkillInfoTab::DataProcess(ActSkillInfoTab *this)
{
  ActSkillInfoTab *v1; // ebx@1
  char v2; // al@1
  unsigned int i; // edi@2
  CDataReader::HEAD *v4; // eax@3
  const char *v5; // ecx@5
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *> *v6; // eax@5
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *v7; // esi@5
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *v8; // ST04_4@5
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *v9; // ST00_4@5
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *v10; // eax@5
  std::pair<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > >,bool> v11; // [sp+10h] [bp-58h]@6
  ItemInfo *_Val2; // [sp+18h] [bp-50h]@5
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *> result; // [sp+1Ch] [bp-4Ch]@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strName; // [sp+3Ch] [bp-2Ch]@5
  int v15; // [sp+64h] [bp-4h]@5

  v1 = this;
  v2 = IIDTableBase<PassiveSkillInfo,PasSkillInfoTab,unsigned short>::DataProcess((IIDTableBase<SubAbStateInfo,SubAbStateInfoTab,unsigned short> *)this);
  if ( v2 )
  {
    for ( i = 0; ; ++i )
    {
      v4 = v1->m_kDataReader.m_pHead;
      if ( !v4 || i >= v4->nNumOfRecord )
        break;
      v5 = CDataReader::GetRecord(&v1->m_kDataReader, i) + 2;
      strName._Myres = 15;
      strName._Mysize = 0;
      strName._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strName, v5, strlen(v5));
      v15 = 0;
      _Val2 = (ItemInfo *)CDataReader::GetRecord(&v1->m_kDataReader, i);
      v6 = std::make_pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> &,ItemInfo *>(
             &result,
             &strName,
             &_Val2);
      v7 = stru_B5BD94._Myhead->_Next;
      v8 = stru_B5BD94._Myhead->_Next->_Prev;
      v9 = stru_B5BD94._Myhead->_Next;
      LOBYTE(v15) = 1;
      v10 = std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ActiveSkillInfo *>>(
              v9,
              v8,
              v6);
      if ( 134217726 - stru_B5BD94._Mysize < 1 )
        std::_Xlength_error("list<T> too long");
      ++stru_B5BD94._Mysize;
      v7->_Prev = v10;
      v10->_Prev->_Next = v10;
      std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ProduceInfoTable::MaterialInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>>,0>>::_Insert(
        &ActSkillInfoTab::m_hashMap_ByNameIndex,
        &v11,
        &stru_B5BD94._Myhead->_Next->_Myval,
        (std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > >)stru_B5BD94._Myhead->_Next);
      if ( result.first._Myres >= 0x10 )
        operator delete(result.first._Bx._Ptr);
      result.first._Myres = 15;
      result.first._Mysize = 0;
      result.first._Bx._Buf[0] = 0;
      v15 = -1;
      if ( strName._Myres >= 0x10 )
        operator delete(strName._Bx._Ptr);
    }
    v2 = 1;
  }
  return v2;
}

//----- (006A8EA0) --------------------------------------------------------
void __thiscall std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>>>::clear(std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *this)
{
  std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *v1; // edi@1
  std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *v2; // esi@1
  std::_List_nod<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Node *v3; // ebx@2

  v1 = this;
  v2 = this->_Myhead->_Next;
  this->_Myhead->_Next = this->_Myhead;
  this->_Myhead->_Prev = this->_Myhead;
  this->_Mysize = 0;
  if ( v2 != this->_Myhead )
  {
    do
    {
      v3 = v2->_Next;
      if ( v2->_Myval._Myres >= 0x10 )
        operator delete(v2->_Myval._Bx._Ptr);
      v2->_Myval._Myres = 15;
      v2->_Myval._Mysize = 0;
      v2->_Myval._Bx._Buf[0] = 0;
      operator delete(v2);
      v2 = v3;
    }
    while ( v3 != v1->_Myhead );
  }
}

//----- (006A8F00) --------------------------------------------------------
void __thiscall std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>>>::~list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>>>(std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > *this)
{
  std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > *v1; // esi@1

  v1 = this;
  std::list<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>>>::clear((std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)this);
  operator delete(v1->_Myhead);
}

//----- (006A8F20) --------------------------------------------------------
std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *__stdcall std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ActiveSkillInfo *>>(std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *_Next, std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *_Prev, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *> *_Val)
{
  void *v4; // edi@1
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *v5; // edx@2
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *> *v6; // ebx@3
  int v8; // [sp+0h] [bp-30h]@1
  std::exception pExceptionObject; // [sp+10h] [bp-20h]@5
  void *p; // [sp+1Ch] [bp-14h]@1
  int *v11; // [sp+20h] [bp-10h]@1
  int v12; // [sp+2Ch] [bp-4h]@2

  v11 = &v8;
  v4 = operator new(0x28u);
  p = v4;
  if ( !v4 )
  {
    _Next = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Next);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v5 = _Prev;
  v12 = 0;
  *(_DWORD *)v4 = _Next;
  *((_DWORD *)v4 + 1) = v5;
  _Next = (std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *)((char *)v4 + 8);
  _Prev = (std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *)((char *)v4 + 8);
  LOBYTE(v12) = 1;
  if ( v4 != (void *)-8 )
  {
    v6 = _Val;
    *((_DWORD *)v4 + 7) = 15;
    *((_DWORD *)v4 + 6) = 0;
    *((_BYTE *)v4 + 8) = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)v4 + 8),
      &v6->first);
    *((_DWORD *)v4 + 9) = v6->second;
  }
  return (std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *)v4;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (006A8FF0) --------------------------------------------------------
void __thiscall ITask::FinishThisDownward(ITask *this)
{
  ITask *v1; // edi@1
  NiTListItem<NiPointer<ITask> > *v2; // esi@1
  ITask *v3; // ecx@2

  v1 = this;
  v2 = this->m_kChildTaskList.m_pkHead;
  while ( v2 )
  {
    v3 = v2->m_element.m_pObject;
    v2 = v2->m_pkNext;
    ITask::FinishThisDownward(v3);
  }
  v1->m_eTaskState = 2;
}

//----- (006A9020) --------------------------------------------------------
char __thiscall ITask::ProcessNetMsg(ITask *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  NiTListItem<NiPointer<ITask> > *v5; // esi@1
  char i; // bl@1
  ITask *v7; // edi@2
  char v8; // bl@2

  v5 = this->m_kChildTaskList.m_pkHead;
  for ( i = 0; v5; i = ITask::ProcessNetMsg(v7, iDepart, iCommand, iRevBytes, pvData) | v8 )
  {
    v7 = v5->m_element.m_pObject;
    v5 = v5->m_pkNext;
    v8 = ((int (__thiscall *)(ITask *, int, int, int, void *))v7->vfptr[4].__vecDelDtor)(
           v7,
           iDepart,
           iCommand,
           iRevBytes,
           pvData) | i;
  }
  return i;
}

//----- (006A9080) --------------------------------------------------------
char __cdecl ITask::ProcessNetMsgAll(int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  return ITask::ProcessNetMsg(&ITask::ms_kRootTask, iDepart, iCommand, iRevBytes, pvData);
}

//----- (006A90A0) --------------------------------------------------------
BOOL __thiscall ITask::IsFinished(ITask *this)
{
  return this->m_eTaskState == 2
      && !this->m_kSerialTaskList.m_kAllocator.m_uiCount
      && !this->m_kChildTaskList.m_kAllocator.m_uiCount;
}

//----- (006A90C0) --------------------------------------------------------
void __thiscall ITask::DirectDispatchToChildren(ITask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  ITask *v4; // edi@1
  IDirectMessengerVtbl *v5; // esi@2

  v4 = this->m_pkParentTask;
  while ( v4 )
  {
    v5 = v4->vfptr;
    v4 = (ITask *)v4->vfptr;
    (*((void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))v5->SetMessageNum + 1))(
      &v5->SetMessageNum,
      iMsgTag,
      pvBody,
      pkFrom);
    (*((void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))v5->SetMessageNum + 4))(
      &v5->SetMessageNum,
      iMsgTag,
      pvBody,
      pkFrom);
  }
}

//----- (006A9110) --------------------------------------------------------
void __thiscall ITask::DirectDispatchToParent(ITask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  ITask::TaskState i; // esi@1

  for ( i = this->m_eTaskState; i; i = *(_DWORD *)(i + 28) )
    (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)(i + 8) + 4))(i + 8, iMsgTag, pvBody, pkFrom);
}

//----- (006A9150) --------------------------------------------------------
void __cdecl ITask::DirectDispatchAll(int iMsg, void *pvBody)
{
  if ( ITask::ms_kRootTask.m_pkMsgHooker )
  {
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))ITask::ms_kRootTask.m_pkMsgHooker->vfptr->SendDirectMessage)(
      iMsg,
      pvBody,
      &ITask::ms_kRootTask.vfptr);
    if ( ITask::ms_kRootTask.m_pkMsgHooker )
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))ITask::ms_kRootTask.m_pkMsgHooker->vfptr->DirectDispatchToChildren)(
        iMsg,
        pvBody,
        &ITask::ms_kRootTask.vfptr);
  }
  ITask::ms_kRootTask.vfptr->DirectDispatchToChildren(
    (IDirectMessenger *)&ITask::ms_kRootTask.vfptr,
    iMsg,
    pvBody,
    (IDirectMessenger *)&ITask::ms_kRootTask.vfptr);
}

//----- (006A91B0) --------------------------------------------------------
void __thiscall ITask::UpdateChildTask(ITask *this, float fTime)
{
  ITask *v2; // ebx@1
  NiTListItem<NiPointer<ITask> > *v3; // edi@1
  ITask *v4; // esi@2
  void *(__thiscall *v5)(NiRefObject *, unsigned int); // edx@3
  PgWin *v6; // esi@8
  NiPointer<PgWin> result; // [sp+10h] [bp-8h]@7
  void *kCurrIter; // [sp+14h] [bp-4h]@2

  v2 = this;
  v3 = this->m_kChildTaskList.m_pkHead;
  while ( v3 )
  {
    v4 = v3->m_element.m_pObject;
    kCurrIter = v3;
    v3 = v3->m_pkNext;
    ITask::UpdateChildTask(v4, fTime);
    if ( v4->m_eTaskState == TS_NONINITIALIZED )
    {
      v5 = v4->vfptr[1].__vecDelDtor;
      v4->m_eTaskState = 1;
      ((void (__thiscall *)(_DWORD))v5)(v4);
    }
    v4->vfptr[3].__vecDelDtor((NiRefObject *)v4, LODWORD(fTime));
    if ( v4->m_eTaskState == 2
      && !v4->m_kSerialTaskList.m_kAllocator.m_uiCount
      && !v4->m_kChildTaskList.m_kAllocator.m_uiCount )
    {
      ((void (__thiscall *)(_DWORD))v4->vfptr[2].__vecDelDtor)(v4);
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<ListItem>>::RemovePos(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *)&v2->m_kChildTaskList,
        &result,
        &kCurrIter);
      if ( result.m_pObject )
      {
        v6 = result.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
        {
          if ( v6 )
            v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
        }
      }
    }
  }
}

//----- (006A9270) --------------------------------------------------------
void __thiscall ITask::UpdateSerialTask(ITask *this, float fTime)
{
  ITask *v2; // edi@1
  NiTListItem<NiPointer<ITask> > *v3; // eax@1
  ITask *v4; // esi@2
  void (__thiscall ***v5)(_DWORD, _DWORD); // esi@8

  v2 = this;
  v3 = this->m_kSerialTaskList.m_pkHead;
  if ( v3 )
  {
    v4 = v3->m_element.m_pObject;
    if ( v4->m_eTaskState == TS_NONINITIALIZED )
      ((void (__thiscall *)(ITask *))v4->vfptr[1].__vecDelDtor)(v4);
    v4->vfptr[3].__vecDelDtor((NiRefObject *)v4, LODWORD(fTime));
    if ( v4->m_eTaskState == 2
      && !v4->m_kSerialTaskList.m_kAllocator.m_uiCount
      && !v4->m_kChildTaskList.m_kAllocator.m_uiCount )
    {
      ((void (__thiscall *)(ITask *))v4->vfptr[2].__vecDelDtor)(v4);
      NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::RemoveHead(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *)&v2->m_kSerialTaskList,
        (NiPointer<PgWin> *)&fTime);
      if ( fTime != 0.0 )
      {
        v5 = (void (__thiscall ***)(_DWORD, _DWORD))LODWORD(fTime);
        if ( !InterlockedDecrement((volatile LONG *)(LODWORD(fTime) + 4)) )
        {
          if ( v5 )
            (**v5)(v5, 1);
        }
      }
    }
  }
}

//----- (006A9300) --------------------------------------------------------
void __thiscall ITask::Update(ITask *this, float fTime)
{
  ITask *v2; // esi@1

  v2 = this;
  ITask::UpdateChildTask(this, fTime);
  ITask::UpdateSerialTask(v2, fTime);
}

//----- (006A9330) --------------------------------------------------------
NiPointer<ITask> *__thiscall ITask::DetachChildTask(ITask *this, NiPointer<ITask> *result, ITask *pkTask)
{
  ITask *v3; // ebx@1
  ITask *v4; // esi@1

  v3 = this;
  v4 = pkTask;
  if ( pkTask )
    InterlockedIncrement((volatile LONG *)&pkTask->m_uiRefCount);
  NiTPointerListBase<DFALL<NiPointer<ITask>>,NiPointer<ITask>>::Remove(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<PgWin> > *)&v3->m_kChildTaskList,
    (NiPointer<PgWin> *)result,
    (NiPointer<PgWin> *)&pkTask);
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  if ( result->m_pObject )
    result->m_pObject->m_pkParentTask = 0;
  return result;
}

//----- (006A93E0) --------------------------------------------------------
void __cdecl ITask::FinishTaskAll()
{
  NiTListItem<NiPointer<ITask> > *v0; // edx@1
  ITask *v1; // ecx@2
  NiTListItem<NiPointer<ITask> > *v2; // edx@2

  v0 = ITask::ms_kRootTask.m_kChildTaskList.m_pkHead;
  if ( ITask::ms_kRootTask.m_kChildTaskList.m_pkHead )
  {
    do
    {
      v1 = v0->m_element.m_pObject;
      v2 = v0->m_pkNext;
      ITask::FinishThisDownward(v1);
    }
    while ( v0 );
  }
  ITask::ms_kRootTask.m_eTaskState = 2;
  ITask::UpdateChildTask(&ITask::ms_kRootTask, 0.0);
  ITask::UpdateSerialTask(&ITask::ms_kRootTask, 0.0);
}

//----- (006A9430) --------------------------------------------------------
void __cdecl ITask::UpdateTaskAll(float fTime)
{
  ITask::UpdateChildTask(&ITask::ms_kRootTask, fTime);
  ITask::UpdateSerialTask(&ITask::ms_kRootTask, fTime);
}

//----- (006A9460) --------------------------------------------------------
void __thiscall ITask::AttachParentTask(ITask *this, ITask *pkParent)
{
  ITask *v2; // esi@1
  ITask *v3; // ecx@1
  ITask *v4; // edi@2
  NiPointer<ITask> result; // [sp+4h] [bp-4h]@2

  v2 = this;
  v3 = this->m_pkParentTask;
  if ( v3 )
  {
    ITask::DetachChildTask(v3, &result, v2);
    v4 = result.m_pObject;
    if ( !result.m_pObject )
    {
LABEL_6:
      v2->m_pkParentTask = pkParent;
      return;
    }
    if ( InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      v2->m_pkParentTask = pkParent;
    }
    else
    {
      if ( v4 )
      {
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
        goto LABEL_6;
      }
      v2->m_pkParentTask = pkParent;
    }
  }
  else
  {
    v2->m_pkParentTask = pkParent;
  }
}

//----- (006A94E0) --------------------------------------------------------
void __thiscall ITask::AttachChildTask(ITask *this, ITask *pkTask)
{
  ITask *v2; // edi@1
  ITask *v3; // esi@1
  volatile LONG *v4; // ebx@1

  v2 = this;
  v3 = pkTask;
  v4 = (volatile LONG *)&pkTask->m_uiRefCount;
  InterlockedIncrement((volatile LONG *)&pkTask->m_uiRefCount);
  ITask::AttachParentTask(v3, v2);
  pkTask = v3;
  if ( v3 )
    InterlockedIncrement(v4);
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiDX92DBufferData> > *)&v2->m_kChildTaskList,
    (NiPointer<NiDX92DBufferData> *)&pkTask);
  if ( v3 && !InterlockedDecrement(v4) )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  if ( !InterlockedDecrement(v4) )
  {
    if ( v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  }
}

//----- (006A9590) --------------------------------------------------------
void __thiscall ITask::ITask(ITask *this, ITask *pkParent)
{
  ITask *v2; // esi@1
  ITask *v3; // ecx@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v2->vfptr = (IDirectMessengerVtbl *)&IDirectMessenger::`vftable';
  v2->m_pkMsgHooker = 0;
  v2->m_uiMessageNum = 0;
  v2->vfptr = (NiRefObjectVtbl *)&ITask::`vftable'{for `NiRefObject'};
  v2->vfptr = (IDirectMessengerVtbl *)&ITask::`vftable'{for `IDirectMessenger'};
  v2->m_kChildTaskList.m_kAllocator.m_uiCount = 0;
  v2->m_kChildTaskList.m_pkHead = 0;
  v2->m_kChildTaskList.m_pkTail = 0;
  v2->m_kChildTaskList.vfptr = (NiTListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> >Vtbl *)&NiTList<NiPointer<ITask>>::`vftable';
  v2->m_kSerialTaskList.m_kAllocator.m_uiCount = 0;
  v2->m_kSerialTaskList.m_pkHead = 0;
  v2->m_kSerialTaskList.m_pkTail = 0;
  v2->m_kSerialTaskList.vfptr = (NiTListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> >Vtbl *)&NiTList<NiPointer<ITask>>::`vftable';
  v3 = pkParent;
  v2->m_pkParentTask = 0;
  v2->m_eTaskState = 0;
  v2->m_eTaskType = 0;
  if ( !pkParent )
  {
    if ( v2 == &ITask::ms_kRootTask )
      return;
    v3 = &ITask::ms_kRootTask;
  }
  ITask::AttachChildTask(v3, v2);
}
// 970474: using guessed type void (__thiscall *IDirectMessenger::`vftable')(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9BEAAC: using guessed type int (__thiscall *NiTList<NiPointer<ITask>>::`vftable')(void *p, char);
// 9BEABC: using guessed type void (__thiscall *ITask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9BEAD8: using guessed type int (__thiscall *ITask::`vftable'{for `NiRefObject'})(void *p, char);

//----- (006A9650) --------------------------------------------------------
void __thiscall ItemUseTask::SetInventoryIndex(ItemUseTask *this, unsigned int uiInventoryIndex)
{
  this->m_uiInventoryIndex = uiInventoryIndex;
}

//----- (006A9660) --------------------------------------------------------
void __thiscall ItemUseTask::SetGameFrameWork(ItemUseTask *this, GameFrameWork *pkGameFrameWork)
{
  this->m_pkGameFrameWork = pkGameFrameWork;
}

//----- (006A9670) --------------------------------------------------------
void __cdecl ItemUseTask::InitCastingProgress()
{
  if ( ItemUseTask::ms_pkCastingProgressWin )
    PgWinMgr::ShowWin(&Pgg_kWinMgr, ItemUseTask::ms_pkCastingProgressWin);
}

//----- (006A9690) --------------------------------------------------------
void __stdcall ItemUseTask::NcUserConnectionChangeIDItemUseReq(int iSlotNum)
{
  BYTE3(iSlotNum) = iSlotNum;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Du, 0x10u, (char *)&iSlotNum + 3, 1);
}

//----- (006A96C0) --------------------------------------------------------
void __thiscall ItemUseTask::OnIdle(ItemUseTask *this, float fTime)
{
  ItemUseTask *v2; // esi@1

  v2 = this;
  if ( this->m_eState == 4 && (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[7].GetAbstateColor)() )
  {
    if ( ItemUseTask::ms_pkCastingProgressWin )
      CastingProgressWin::CastingFail((CastingProgressWin *)ItemUseTask::ms_pkCastingProgressWin);
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x19u, 0, 0);
    v2->m_eTaskState = 2;
  }
}

//----- (006A9710) --------------------------------------------------------
char __thiscall ItemUseTask::OnProcessNetMsg(ItemUseTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  ItemUseTask *v5; // esi@1
  ItemUseTask::State v7; // eax@6

  v5 = this;
  if ( iDepart != 12 )
    return 0;
  if ( iCommand == 22 )
  {
    this->m_eTaskState = 2;
    return 1;
  }
  if ( iCommand != 26 )
    return 0;
  if ( this->m_bCompleteRecved )
    return 1;
  v7 = this->m_eState;
  if ( v7 != 3 && v7 != 4 )
    return 1;
  Skill::RecordSkillUse(this->m_pkSkillInfo->ID, Timer::ms_fCurTime, 0.0, 0.0);
  if ( v5->m_eState == 4 )
    CastingProgressWin::CastingSuccess((CastingProgressWin *)ItemUseTask::ms_pkCastingProgressWin);
  v5->m_bCompleteRecved = 1;
  return 1;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006A97A0) --------------------------------------------------------
bool __stdcall ItemUseTask::ItemNameCheck(Item *pkItem, const char *pkName)
{
  ItemViewInfo *v3; // eax@1
  bool result; // al@2

  v3 = pkItem->m_pkViewInfo;
  if ( v3 )
    result = strcmp(v3->InxName, pkName) == 0;
  else
    result = 0;
  return result;
}

//----- (006A9800) --------------------------------------------------------
char __stdcall ItemUseTask::UsePutOnBelongClear(Item *pkItem, unsigned int uiInvenIdx)
{
  PgFrameWork *v3; // eax@2
  InventoryWin *v4; // ecx@3
  CursorState *v5; // eax@5
  char result; // al@5

  if ( pkItem
    && (v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID)) != 0
    && (v4 = (InventoryWin *)v3[19].m_BackFrameID) != 0
    && pkItem->m_pkInfo->ItemFunc == 6 )
  {
    InventoryWin::ms_uiMode = 8;
    InventoryWin::SetSenderInvPos(v4, uiInvenIdx);
    Singleton<CursorState>::getInstance();
    CursorState::SetState(v5, PUT_ON_BELONG_CLEAR);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (006A9870) --------------------------------------------------------
void __stdcall ItemUseTask::OnUseItemRepairKit(Item *pkItem, unsigned int uiInvenInx)
{
  PgFrameWork *v3; // eax@2
  GameFrameWork *v4; // edi@2
  NiUnsharedGeometryGroup *v5; // eax@4
  PgWin *v6; // esi@5
  NiUnsharedGeometryGroup *v7; // eax@7
  ItemRepairWin *v8; // edi@8
  InvWin *v9; // eax@11

  if ( pkItem )
  {
    v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v4 = (GameFrameWork *)v3;
    if ( v3 )
    {
      if ( unk_B2534C )
      {
        v5 = TextData2::Get(0x75F1A1Cu);
        GameFrameWork::AddSysMsg(v4, (const char *)v5);
      }
      else
      {
        v6 = (PgWin *)v3[19].m_BackFrameID;
        if ( v6 )
        {
          if ( InventoryWin::ms_uiMode )
          {
            v7 = TextData2::Get(0xB2F6D62F);
            GameFrameWork::AddSysMsg(v4, (const char *)v7);
          }
          else
          {
            v8 = (ItemRepairWin *)v3[33].m_kMsgQ.m_uiAlloced;
            if ( v8 )
            {
              if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v6->vfptr[65].__vecDelDtor)(v6) )
                PgWinMgr::CloseWin(&Pgg_kWinMgr, v6);
              v9 = InventoryWin::GetInvWin((InventoryWin *)v6, uiInvenInx);
              InvWin::SetLock(v9, 1);
              InventoryWin::ms_uiMode = 6;
              PgWinMgr::ShowWin(&Pgg_kWinMgr, v6);
              ItemRepairWin::SetItemRepairKitSlot(v8, uiInvenInx);
              unk_B2534C = 1;
            }
          }
        }
      }
    }
  }
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (006A9960) --------------------------------------------------------
void __stdcall ItemUseTask::OnUseItemAddSocket(Item *pkItem, unsigned int uiInvenIdx)
{
  PgFrameWork *v3; // eax@2
  GameFrameWork *v4; // edi@2
  NiUnsharedGeometryGroup *v5; // eax@4
  InventoryWin *v6; // esi@5
  NiUnsharedGeometryGroup *v7; // eax@8
  unsigned int v8; // ST00_4@9
  InvWin *v9; // eax@9

  if ( pkItem )
  {
    v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v4 = (GameFrameWork *)v3;
    if ( v3 )
    {
      if ( unk_B25350 )
      {
        v5 = TextData::Get(0x226625A6u);
        GameFrameWork::AddSysMsg(v4, (const char *)v5);
      }
      else
      {
        v6 = (InventoryWin *)v3[19].m_BackFrameID;
        if ( v6 && Inventory::FindEnchantSoketAdd(&g_kInventory, (ITEM_INVEN *)&pkItem) )
        {
          if ( InventoryWin::ms_uiMode )
          {
            v7 = TextData::Get(0x226625A6u);
            GameFrameWork::AddSysMsg(v4, (const char *)v7);
          }
          else
          {
            v8 = uiInvenIdx;
            v6->m_iEnchantAddItemInvIdx = uiInvenIdx;
            v9 = InventoryWin::GetInvWin(v6, v8);
            InvWin::SetLock(v9, 1);
            InventoryWin::ms_uiMode = 7;
            unk_B25350 = 1;
          }
        }
      }
    }
  }
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (006A9A20) --------------------------------------------------------
void __stdcall ItemUseTask::OnUseItemRandomOptRecoveryCount(Item *pkItem, unsigned int uiInvenIdx)
{
  PgFrameWork *v3; // eax@2
  GameFrameWork *v4; // esi@2
  NiUnsharedGeometryGroup *v5; // eax@4
  _DWORD *v6; // edi@5
  NiUnsharedGeometryGroup *v7; // eax@7
  NiUnsharedGeometryGroup *v8; // eax@9

  if ( pkItem )
  {
    v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v4 = (GameFrameWork *)v3;
    if ( v3 )
    {
      if ( unk_B25354 )
      {
        v5 = TextData::Get(0x226625A6u);
        GameFrameWork::AddSysMsg(v4, (const char *)v5);
      }
      else
      {
        v6 = v3[19].m_BackFrameID;
        if ( v6 )
        {
          if ( InventoryWin::ms_uiMode )
          {
            v7 = TextData::Get(0x226625A6u);
            GameFrameWork::AddSysMsg(v4, (const char *)v7);
          }
          else if ( Inventory::GetRandomOptRecoverItemCount(&g_kInventory, (ITEM_INVEN *)&pkItem) )
          {
            v6[371] = uiInvenIdx;
            InventoryWin::ms_uiMode = 9;
            unk_B25354 = 1;
          }
          else
          {
            v8 = TextData3::Get(0x97BEF7C3);
            GameFrameWork::AddSysMsg(v4, (const char *)v8);
          }
        }
      }
    }
  }
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (006A9AF0) --------------------------------------------------------
void __thiscall ItemUseTask::OnStart(ItemUseTask *this)
{
  ItemUseTask *v1; // ebx@1
  GameFrameWork *v2; // eax@1
  GameFrameWork *v3; // esi@1
  unsigned int v4; // eax@4
  NiUnsharedGeometryGroup *v5; // eax@7
  ItemInfo *v6; // edi@10
  mhRepairObjWin *v7; // ecx@12
  ItemUseTask *v8; // eax@19
  void *(__thiscall *v9)(NiRefObject *, unsigned int); // edx@19
  char *v10; // eax@20
  unsigned int v11; // eax@23
  ItemInfo *v12; // eax@26
  unsigned int v13; // esi@27
  char *v14; // eax@28
  GameFrameWork *v15; // eax@29
  GameFrameWork *v16; // esi@29
  Item *v17; // eax@31
  ActionEffectItem *v18; // eax@31
  ActiveSkillInfo *v19; // edi@35
  Item *v20; // esi@36
  Item *v21; // edi@38
  unsigned int v22; // esi@38
  const char *v23; // ecx@39
  char *v24; // eax@39
  int v25; // esi@43
  void *v26; // eax@43
  void *v27; // ST0C_4@45
  char *v28; // eax@45
  MsgBox *v29; // eax@45
  ItemInfo *v30; // edi@64
  unsigned int v31; // eax@76
  Item *v32; // eax@77
  ItemViewInfo *v33; // eax@78
  const char *v34; // esi@79
  unsigned int v35; // eax@80
  NiUnsharedGeometryGroup *v36; // edi@85
  int v37; // edi@95
  unsigned int v38; // esi@97
  const char *v39; // ecx@98
  char *v40; // eax@98
  unsigned int v41; // esi@101
  const char *v42; // ecx@102
  char *v43; // eax@102
  unsigned int v44; // esi@108
  const char *v45; // ecx@109
  char *v46; // eax@109
  void *v47; // eax@112
  void *v48; // ST0C_4@114
  char *v49; // eax@114
  MsgBox *v50; // eax@114
  void *v51; // eax@115
  void *v52; // ST0C_4@117
  char *v53; // eax@117
  MsgBox *v54; // eax@117
  char *v55; // ST0C_4@119
  char *v56; // eax@119
  MsgBox *v57; // eax@119
  char *v58; // ST0C_4@120
  char *v59; // eax@120
  MsgBox *v60; // esi@121
  ItemViewInfo *v61; // eax@123
  unsigned int v62; // esi@125
  Item *v63; // edi@129
  RIDING *v64; // eax@131
  const char *v65; // esi@133
  char *v66; // eax@128
  MsgBox *v67; // eax@141
  int v68; // [sp-4h] [bp-90h]@20
  ITEM_INVEN kInven; // [sp+10h] [bp-7Ch]@22
  GameFrameWork *pkGame; // [sp+14h] [bp-78h]@1
  PROTO_NC_ITEM_USE_REQ kProto; // [sp+18h] [bp-74h]@137
  ItemInfo *pkItemInfo; // [sp+1Ch] [bp-70h]@10
  ItemUseTask *v73; // [sp+20h] [bp-6Ch]@1
  Item *pkItem; // [sp+24h] [bp-68h]@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strEquipItemName; // [sp+28h] [bp-64h]@101
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v76; // [sp+44h] [bp-48h]@108
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > stritemName; // [sp+60h] [bp-2Ch]@38
  int v78; // [sp+88h] [bp-4h]@38

  v1 = this;
  v73 = this;
  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  v3 = v2;
  pkGame = v2;
  if ( !v2 )
    goto LABEL_9;
  if ( !v2->m_pkInventoryWin )
    goto LABEL_9;
  if ( InventoryWin::ms_uiMode == 8 )
    goto LABEL_9;
  v4 = v1->m_uiInventoryIndex;
  if ( v4 >= 0xC0 )
    goto LABEL_9;
  pkItem = g_kInventory.m_aspInv[v4].m_pObject;
  if ( !pkItem )
    goto LABEL_9;
  if ( UserTrade::IsTrading() )
  {
    v5 = TextData::Get(0x8BAAC2D9);
    goto LABEL_8;
  }
  v6 = pkItem->m_pkInfo;
  pkItemInfo = v6;
  if ( v6->ItemFunc == 2 && unk_A9943C == 2 )
  {
    v7 = v3->m_pkMHRepairWin;
    if ( v7 )
    {
      if ( v3->m_pkInventoryWin )
      {
        mhRepairObjWin::SetRepairKitSlot(v7, v1->m_uiInventoryIndex);
        InventoryWin::LockAllItem(v3->m_pkInventoryWin);
      }
    }
  }
  if ( !strcmp(v6->InxName, "EnchantSocketAdd")
    || !strcmp(v6->InxName, "EnchantSocketReload")
    || !strcmp(v6->InxName, "RandomOption_Recover") )
  {
    v68 = (int)v6->Name;
    v1->m_eState = 1;
LABEL_140:
    v66 = (char *)TextData::Get(0xDCEED50E);
    goto LABEL_141;
  }
  if ( v6->ItemFunc == 1 )
  {
    v8 = (ItemUseTask *)((int (__thiscall *)(Item *))pkItem->vfptr[4].__vecDelDtor)(pkItem);
    v9 = pkItem->vfptr[3].__vecDelDtor;
    v73 = v8;
    if ( (ItemUseTask *)((int (__thiscall *)(Item *))v9)(pkItem) != v8 )
    {
      ItemUseTask::OnUseItemRepairKit(pkItem, v1->m_uiInventoryIndex);
      v1->m_eTaskState = 2;
      return;
    }
    v10 = pkItemInfo->Name;
    v1->m_eState = 1;
    v68 = (int)v10;
    goto LABEL_140;
  }
  if ( Inventory::FindMysteryVault(&g_kInventory, &kInven) )
  {
    v11 = kInven.Inven & 0x3FF;
    if ( v11 == v1->m_uiInventoryIndex && v11 < 0xC0 )
    {
      if ( g_kInventory.m_aspInv[v11].m_pObject )
      {
        v12 = pkItem->m_pkInfo;
        if ( v12 )
        {
          v13 = v12->DemandLv;
          if ( v13 > User::Lv(&g_kUser) )
          {
            v14 = (char *)TextData2::Get(0x3B54509Bu);
            v5 = (NiUnsharedGeometryGroup *)fs(v14, v13);
            goto LABEL_8;
          }
          v15 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
          v16 = v15;
          if ( v15 )
          {
            GameFrameWork::CloseMysteryVaultWin(v15);
            GameFrameWork::NcCharSaveUIStateSaveReq(v16, 0);
          }
        }
      }
    }
  }
  v17 = pkItem;
  v1->m_pkSkillInfo = 0;
  v1->m_ItemActionID = -1;
  v18 = ActionEffectItemTab::GetByItemID(v17->m_kStruct.itemid);
  if ( v18 )
    v1->m_ItemActionID = v18->ItemActionID;
  if ( v6->ItemUseSkill[0] != 45 )
    v1->m_pkSkillInfo = ActSkillInfoTab::GetByInxName(v6->ItemUseSkill);
  v19 = v1->m_pkSkillInfo;
  if ( v19 )
  {
    if ( strcmp(v19->InxName, "UseSilverWings")
      && strcmp(v19->InxName, "UseRide")
      && !Skill::IsSkillUsePossible(v19->ID) )
    {
      v5 = TextData::Get(0x85F7D6D1);
      goto LABEL_8;
    }
    if ( CharShape::IsSpactralGlowEnable(&g_pkMainChar->m_kCharShape) )
    {
      if ( !strcmp(v1->m_pkSkillInfo->InxName, "UseRide")
        && AbStateInfectee::FindNomalAbstate((AbStateInfectee *)&g_pkMainChar->vfptr, STA_HIDE) )
      {
        v5 = TextData2::Get(0x20548D7Fu);
        goto LABEL_8;
      }
    }
    else if ( (unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[20].Deaffect)()
           || CharShape::IsSpactralGlowEnable(&g_pkMainChar->m_kCharShape) )
    {
      v5 = TextData::Get(0x226625A6u);
      goto LABEL_8;
    }
    v20 = pkItem;
    if ( v1->m_pkSkillInfo->CastTime )
    {
      if ( (unsigned __int8)((int (__thiscall *)(Item *))pkItem->vfptr[1].__vecDelDtor)(pkItem) != 35 )
      {
        v1->m_eState = 4;
        if ( ItemUseTask::ms_pkCastingProgressWin
          || (ItemUseTask::ms_pkCastingProgressWin = (PgWin *)CastingProgressWin::CreateWin(0, 1),
              ((void (__stdcall *)(IDirectMessengerVtbl **))ItemUseTask::ms_pkCastingProgressWin->vfptr->SetMsgHooker)(&v1->vfptr),
              PgWinMgr::ShowWin(&Pgg_kWinMgr, ItemUseTask::ms_pkCastingProgressWin),
              ((void (__stdcall *)(_DWORD))ItemUseTask::ms_pkCastingProgressWin->vfptr[64].__vecDelDtor)(0),
              ItemUseTask::ms_pkCastingProgressWin) )
        {
          Char::ActItemCasting(g_pkMainChar);
          CastingProgressWin::StartCasting(
            (CastingProgressWin *)ItemUseTask::ms_pkCastingProgressWin,
            v1->m_pkSkillInfo->CastTime,
            0);
        }
      }
    }
    else
    {
      v1->m_eState = 3;
    }
    if ( (unsigned __int8)((int (__thiscall *)(Item *))v20->vfptr[1].__vecDelDtor)(v20) == 35 )
    {
      GameFrameWork::UseActiveSkillItem(pkGame, v1->m_uiInventoryIndex, v1->m_pkSkillInfo->ID);
      v1->m_eTaskState = 2;
      return;
    }
  }
  else
  {
    v20 = pkItem;
    v1->m_eState = 5;
  }
  if ( CItemAuthorityBase::IA_IsDataPutOnBelonged(&g_kItemAuthority, v20->m_pkInfo->BT_Inx) )
  {
    v21 = pkItem;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &stritemName,
      pkItem->m_pkInfo->Name);
    v78 = 0;
    v22 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::find(&stritemName, "(", 0, 1u);
    if ( v22 != -1 )
    {
      v23 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::end(
              &stritemName,
              (std::_String_iterator<char,std::char_traits<char>,std::allocator<char> > *)&pkGame)->_Ptr;
      v24 = stritemName._Bx._Ptr;
      if ( stritemName._Myres < 0x10 )
        v24 = (char *)&stritemName;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::replace(
        &stritemName,
        (std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> >)&v24[v22],
        (std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> >)v23,
        &byte_9BEAFD);
    }
    if ( Item::GetPutOnBelongState(v21) == SPOBI_NOT_BELONGED )
    {
      v25 = (int)v73;
      v26 = stritemName._Bx._Ptr;
      v73->m_eState = 2;
      if ( stritemName._Myres < 0x10 )
        v26 = &stritemName;
      v27 = v26;
      v28 = (char *)TextData2::Get(0x80CCAFE1);
      v29 = MsgBox::Modal(MSGBOX_OKCANCEL, v28, v27);
      ((void (__stdcall *)(int))v29->vfptr->SetMsgHooker)(v25 + 8);
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&stritemName);
      return;
    }
    v78 = -1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&stritemName);
    v1 = v73;
    v20 = pkItem;
    v30 = pkItemInfo;
LABEL_65:
    if ( v30->ItemGradeType )
      goto LABEL_144;
    if ( (unsigned __int8)((int (__thiscall *)(Item *))v20->vfptr[1].__vecDelDtor)(v20) == 13 )
    {
      v1->m_eState = 5;
      if ( v1->m_pkMsgHooker )
      {
        ((void (__stdcall *)(signed int, unsigned int *, IDirectMessengerVtbl **))v1->m_pkMsgHooker->vfptr->SendDirectMessage)(
          53,
          &v1->m_uiInventoryIndex,
          &v1->vfptr);
        if ( v1->m_pkMsgHooker )
          ((void (__stdcall *)(signed int, unsigned int *, IDirectMessengerVtbl **))v1->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            53,
            &v1->m_uiInventoryIndex,
            &v1->vfptr);
      }
      v1->vfptr->DirectDispatchToParent(
        (IDirectMessenger *)&v1->vfptr,
        53,
        &v1->m_uiInventoryIndex,
        (IDirectMessenger *)&v1->vfptr);
      v1->m_eTaskState = 2;
      return;
    }
    if ( v30->ItemGradeType )
      goto LABEL_144;
    v61 = pkItem->m_pkViewInfo;
    if ( !v61 )
      return;
    if ( strcmp(v61->InxName, "ProposeRing")
      || (v1->m_eState = 5, (v62 = g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1]) == 0)
      || Char::IsNPC((Char *)g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1])
      || (unsigned __int8)(*(int (__thiscall **)(unsigned int))(*(_DWORD *)v62 + 32))(v62) )
    {
LABEL_144:
      v63 = pkItem;
      if ( (unsigned __int8)((int (__thiscall *)(Item *))pkItem->vfptr[1].__vecDelDtor)(pkItem) != 22 )
        goto LABEL_145;
      if ( !(unsigned __int8)((int (*)(void))g_pkMainChar->vfptr[15].Deaffect)() )
        goto LABEL_145;
      v64 = RidePetTable::GetByID(g_pkMainChar->m_kRidePetCtl.m_uiID);
      if ( !v64 )
        goto LABEL_145;
      if ( v64->UseTime || (v65 = v64->FeedType, !strcmp(v64->FeedType, "-")) )
      {
        v5 = TextData::Get(0x71A9AB9Au);
        goto LABEL_8;
      }
      if ( !strcmp(v63->m_pkInfo->InxName, v65) )
      {
LABEL_145:
        kProto.invenslot = v1->m_uiInventoryIndex;
        kProto.invenType = 9;
        NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x15u, &kProto, 2);
        v1->m_bCompleteRecved = 0;
        return;
      }
      v5 = TextData::Get(0xBBEEADED);
LABEL_8:
      IDirectMessenger::DirectDispatch((IDirectMessenger *)&v1->vfptr, 25, v5, 0);
LABEL_9:
      v1->m_eTaskState = 2;
      return;
    }
    v68 = (*(int (__thiscall **)(unsigned int))(*(_DWORD *)v62 + 84))(v62);
    v66 = (char *)TextData::Get(0x90CCBBDF);
LABEL_141:
    v67 = MsgBox::Modal(MSGBOX_OKCANCEL, v66, v68);
    ((void (__stdcall *)(IDirectMessengerVtbl **))v67->vfptr->SetMsgHooker)(&v1->vfptr);
    return;
  }
  v30 = pkItemInfo;
  if ( pkItemInfo->ItemGradeType != 4
    || (unsigned __int8)((int (__thiscall *)(_DWORD))v20->vfptr[1].__vecDelDtor)(v20) == 24
    || ((int (__thiscall *)(Item *))v20->vfptr[11].__vecDelDtor)(v20)
    && (!((int (__thiscall *)(Item *))v20->vfptr[11].__vecDelDtor)(v20)
     || *(_BYTE *)((int (__thiscall *)(_DWORD))v20->vfptr[11].__vecDelDtor)(v20)) )
  {
    goto LABEL_65;
  }
  v31 = v1->m_uiInventoryIndex;
  v1->m_eState = 1;
  if ( v31 >= 0xC0 )
    return;
  v32 = g_kInventory.m_aspInv[v31].m_pObject;
  pkItem = v32;
  if ( !v32 )
    return;
  v33 = v32->m_pkViewInfo;
  if ( !v33 )
    return;
  v34 = v33->InxName;
  if ( !strcmp(v33->InxName, "Roar") )
  {
    v35 = User::Lv(&g_kUser);
    if ( pkItemInfo->DemandLv > v35 )
    {
      v36 = TextData::Get(0x7FFED6DEu);
      if ( v1->m_pkMsgHooker )
      {
        ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v1->m_pkMsgHooker->vfptr->SendDirectMessage)(
          25,
          v36,
          &v1->vfptr);
        if ( v1->m_pkMsgHooker )
          ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v1->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            25,
            v36,
            &v1->vfptr);
      }
      v1->vfptr->DirectDispatchToParent((IDirectMessenger *)&v1->vfptr, 25, v36, (IDirectMessenger *)&v1->vfptr);
      v1->m_eTaskState = 2;
    }
    else
    {
      if ( v1->m_pkMsgHooker )
      {
        ((void (__stdcall *)(signed int, unsigned int *, IDirectMessengerVtbl **))v1->m_pkMsgHooker->vfptr->SendDirectMessage)(
          52,
          &v1->m_uiInventoryIndex,
          &v1->vfptr);
        if ( v1->m_pkMsgHooker )
          ((void (__stdcall *)(signed int, unsigned int *, IDirectMessengerVtbl **))v1->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            52,
            &v1->m_uiInventoryIndex,
            &v1->vfptr);
      }
      v1->vfptr->DirectDispatchToParent(
        (IDirectMessenger *)&v1->vfptr,
        52,
        &v1->m_uiInventoryIndex,
        (IDirectMessenger *)&v1->vfptr);
      v1->m_eTaskState = 2;
    }
    return;
  }
  if ( !strcmp(v34, "ProdReload01") )
  {
    if ( v1->m_pkMsgHooker )
    {
      ((void (__stdcall *)(signed int, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->SendDirectMessage)(
        67,
        &v1->m_uiInventoryIndex,
        &v1->vfptr);
      if ( v1->m_pkMsgHooker )
        ((void (__stdcall *)(signed int, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          67,
          &v1->m_uiInventoryIndex,
          &v1->vfptr);
    }
    v1->vfptr->DirectDispatchToParent(
      (IDirectMessenger *)&v1->vfptr,
      67,
      &v1->m_uiInventoryIndex,
      (IDirectMessenger *)&v1->vfptr);
    v1->m_eTaskState = 2;
    return;
  }
  if ( pkItemInfo->Type )
  {
    if ( pkItemInfo->ItemFunc == 2 )
    {
      v55 = pkItemInfo->Name;
      v56 = (char *)TextData::Get(0xDCEED50E);
      v57 = MsgBox::Modal(MSGBOX_OKCANCEL, v56, v55);
    }
    else
    {
      v58 = pkItemInfo->Name;
      v59 = (char *)TextData::Get(0xDCEED50E);
      v57 = MsgBox::Modeless(MSGBOX_OKCANCEL, v59, v58);
    }
    v60 = v57;
    NiObjectNET::SetName((NiObjectNET *)&v57->vfptr, "MsgBoxAskUseItemWin");
    v60->vfptr->SetMsgHooker(&v60->vfptr, &v1->vfptr);
    return;
  }
  v37 = 0;
  while ( !g_kInventory.m_aspEquip[v37].m_pObject )
  {
LABEL_107:
    if ( (unsigned int)++v37 >= 0x1E )
    {
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &v76,
        pkItem->m_pkInfo->Name);
      v78 = 3;
      v44 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::find(&v76, "(", 0, 1u);
      if ( v44 != -1 )
      {
        v45 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::end(
                &v76,
                (std::_String_iterator<char,std::char_traits<char>,std::allocator<char> > *)&pkGame)->_Ptr;
        v46 = v76._Bx._Ptr;
        if ( v76._Myres < 0x10 )
          v46 = (char *)&v76;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::replace(
          &v76,
          (std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> >)&v46[v44],
          (std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> >)v45,
          byte_9BEB29);
      }
      v47 = v76._Bx._Ptr;
      if ( v76._Myres < 0x10 )
        v47 = &v76;
      v48 = v47;
      v49 = (char *)TextData::Get(0xDCEED50E);
      v50 = MsgBox::Modal(MSGBOX_OKCANCEL, v49, v48);
      ((void (__stdcall *)(IDirectMessengerVtbl **))v50->vfptr->SetMsgHooker)(&v73->vfptr);
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v76);
      return;
    }
  }
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
    &stritemName,
    pkItem->m_pkInfo->Name);
  v78 = 1;
  v38 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::find(&stritemName, "(", 0, 1u);
  if ( v38 != -1 )
  {
    v39 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::end(
            &stritemName,
            (std::_String_iterator<char,std::char_traits<char>,std::allocator<char> > *)&pkGame)->_Ptr;
    v40 = stritemName._Bx._Ptr;
    if ( stritemName._Myres < 0x10 )
      v40 = (char *)&stritemName;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::replace(
      &stritemName,
      (std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> >)&v40[v38],
      (std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> >)v39,
      &byte_9BEAFE);
  }
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
    &strEquipItemName,
    g_kInventory.m_aspEquip[v37].m_pObject->m_pkInfo->Name);
  LOBYTE(v78) = 2;
  v41 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::find(&strEquipItemName, "(", 0, 1u);
  if ( v41 != -1 )
  {
    v42 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::end(
            &strEquipItemName,
            (std::_String_iterator<char,std::char_traits<char>,std::allocator<char> > *)&pkItemInfo)->_Ptr;
    v43 = strEquipItemName._Bx._Ptr;
    if ( strEquipItemName._Myres < 0x10 )
      v43 = (char *)&strEquipItemName;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::replace(
      &strEquipItemName,
      (std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> >)&v43[v41],
      (std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> >)v42,
      &byte_9BEAFF);
  }
  if ( !(unsigned __int8)std::operator==<char,std::char_traits<char>,std::allocator<char>>(
                           &stritemName,
                           &strEquipItemName) )
  {
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&strEquipItemName);
    v78 = -1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&stritemName);
    goto LABEL_107;
  }
  v51 = stritemName._Bx._Ptr;
  if ( stritemName._Myres < 0x10 )
    v51 = &stritemName;
  v52 = v51;
  v53 = (char *)TextData::Get(0x93F290Eu);
  v54 = MsgBox::Modal(MSGBOX_OKCANCEL, v53, v52);
  ((void (__stdcall *)(IDirectMessengerVtbl **))v54->vfptr->SetMsgHooker)(&v73->vfptr);
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&strEquipItemName);
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&stritemName);
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (006AA740) --------------------------------------------------------
void __thiscall ItemUseTask::DirectMessage(ItemUseTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  ItemUseTask *v4; // edi@1
  unsigned int v5; // eax@8
  char *v6; // ebx@8
  Item *v7; // esi@9
  NiUnsharedGeometryGroup *v8; // eax@11
  GuildNameChangeWin *v9; // esi@11
  NiUnsharedGeometryGroup *v10; // eax@11
  PgFrameWork *v11; // eax@11
  boost::_bi::bind_t<void,boost::_mfi::mf2<void,GameFrameWork,int,int>,boost::_bi::list3<boost::_bi::value<GameFrameWork *>,boost::arg<1>,boost::_bi::value<unsigned int> > > v12; // ST00_16@11
  NiUnsharedGeometryGroup *v13; // eax@13
  GuildCombatPropensityChangeWin *v14; // esi@13
  PgFrameWork *v15; // eax@13
  boost::_bi::bind_t<void,boost::_mfi::mf2<void,GameFrameWork,int,int>,boost::_bi::list3<boost::_bi::value<GameFrameWork *>,boost::arg<1>,boost::_bi::value<unsigned int> > > v16; // ST00_16@13
  NiUnsharedGeometryGroup *v17; // eax@13
  ItemInfo *v18; // ecx@14
  bool v19; // zf@14
  ItemViewInfo *v20; // eax@16
  ItemFuncEnum v21; // ecx@17
  const char *v22; // esi@19
  GameFrameWork *v23; // ebx@32
  EnchantGemDeleteWin *v24; // esi@32
  GameFrameWork *v25; // esi@42
  NiPoint3 *v26; // eax@43
  mhRepairObjWin *v27; // ecx@43
  NiUnsharedGeometryGroup *v28; // eax@46
  unsigned int v29; // eax@51
  Item *v30; // eax@52
  ItemInfo *v31; // eax@53
  PgFrameWork *v32; // esi@55
  boost::function<void __cdecl(char const *),std::allocator<void> > v33; // [sp-Ch] [bp-2Ch]@11
  NiUnsharedGeometryGroup *v34; // [sp-8h] [bp-28h]@13
  NiUnsharedGeometryGroup *v35; // [sp-4h] [bp-24h]@13
  __int64 v36; // [sp+14h] [bp-Ch]@11
  ItemInfo *pkItemInfo; // [sp+1Ch] [bp-4h]@14

  v4 = this;
  if ( iMsgTag == 27 )
  {
    if ( !pvBody )
      return;
    if ( *(_DWORD *)pvBody )
    {
      if ( *(_DWORD *)pvBody == 1 )
      {
        v29 = this->m_kSerialTaskList.m_kAllocator.m_uiCount;
        if ( v29 < 0xC0 )
        {
          v30 = g_kInventory.m_aspInv[v29].m_pObject;
          if ( v30 )
          {
            v31 = v30->m_pkInfo;
            if ( v31 )
            {
              if ( v31->ItemFunc == 2 )
              {
                v32 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
                mhRepairObjWin::SetRepairKitSlot(*(mhRepairObjWin **)&v32[30].m_bInit, 0);
                InventoryWin::UnLockAllItem((InventoryWin *)v32[19].m_BackFrameID);
              }
            }
          }
        }
        v4->m_pkMsgHooker = (IDirectMessenger *)2;
      }
    }
    else
    {
      v5 = this->m_kSerialTaskList.m_kAllocator.m_uiCount;
      v6 = (char *)&this->m_kSerialTaskList.m_kAllocator;
      iMsgTag = v5;
      if ( v5 >= 0xC0 )
        goto LABEL_5;
      v7 = g_kInventory.m_aspInv[v5].m_pObject;
      pvBody = v7;
      if ( !v7 )
        goto LABEL_5;
      if ( ItemUseTask::ItemNameCheck(v7, "GuildName") )
      {
        v8 = TextData2::Get(0xC6E5A5D5);
        v9 = GuildNameChangeWin::Modeless((const char *)v8);
        v10 = TextData2::Get(0x68E2CED0u);
        GuildNameChangeWin::SetCommentText(v9, (const char *)v10);
        v11 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
        HIDWORD(v36) = *(_DWORD *)v6;
        iMsgTag = (int)&v33;
        v12.f_.f_ = (void (__thiscall *)(GameFrameWork *, int, int))GameFrameWork::NcGuildRenameReq;
        v12.l_.a1_.t_ = (GameFrameWork *)v11;
        *(_QWORD *)&v12.l_.a2_ = v36;
        boost::function<void __cdecl (char const *),std::allocator<void>>::function<void __cdecl (char const *),std::allocator<void>>(
          (boost::function<void __cdecl(int),std::allocator<void> > *)&v33,
          v12,
          0);
        GuildNameChangeWin::RegisterCallBack(v9, v33);
        v4->m_pkMsgHooker = (IDirectMessenger *)2;
        return;
      }
      if ( ItemUseTask::ItemNameCheck(v7, "GuildTendency") )
      {
        v13 = TextData2::Get(0x2A3B081Cu);
        v14 = GuildCombatPropensityChangeWin::Modeless((const char *)v13);
        v15 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
        HIDWORD(v36) = *(_DWORD *)v6;
        iMsgTag = (int)&v33;
        v16.f_.f_ = (void (__thiscall *)(GameFrameWork *, int, int))GameFrameWork::NcGuildRetypeReq;
        v16.l_.a1_.t_ = (GameFrameWork *)v15;
        *(_QWORD *)&v16.l_.a2_ = v36;
        boost::function<void __cdecl (char const *),std::allocator<void>>::function<void __cdecl (char const *),std::allocator<void>>(
          (boost::function<void __cdecl(int),std::allocator<void> > *)&v33,
          v16,
          0);
        GuildCombatPropensityChangeWin::RegisterCallBack(
          v14,
          (boost::function<void __cdecl(int),std::allocator<void> >)v33);
        v35 = TextData2::Get(0xDAD2CFCF);
        v34 = TextData2::Get(0x354C4285u);
        v17 = TextData2::Get(0x9497CCD3);
        GuildCombatPropensityChangeWin::SetTextMsg(v14, (const char *)v17, (const char *)v34, (const char *)v35);
        v4->m_pkMsgHooker = (IDirectMessenger *)2;
        return;
      }
      v18 = v7->m_pkInfo;
      v19 = v18->Type == 0;
      pkItemInfo = v7->m_pkInfo;
      if ( v19 )
      {
        GameFrameWork::NcItemEquipReq((GameFrameWork *)v4->m_uiCoolTime, *v6);
        LOBYTE(v4->m_eState) = 0;
        v4->m_pkMsgHooker = (IDirectMessenger *)2;
        return;
      }
      v20 = v7->m_pkViewInfo;
      if ( !v20 )
        goto LABEL_5;
      v21 = v18->ItemFunc;
      if ( v21 == 4 || v21 == 5 )
      {
        ItemUseTask::NcUserConnectionChangeIDItemUseReq(iMsgTag);
        v4->m_pkMsgHooker = (IDirectMessenger *)2;
      }
      else
      {
        v22 = v20->InxName;
        if ( !strcmp(v20->InxName, "Roar") )
        {
          if ( v4->m_uiRefCount )
          {
            (*(void (__stdcall **)(signed int, NiTListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> >::AntiBloatAllocator *, ItemUseTask *))(*(_DWORD *)v4->m_uiRefCount + 4))(
              52,
              &v4->m_kSerialTaskList.m_kAllocator,
              v4);
            if ( v4->m_uiRefCount )
              (*(void (__stdcall **)(signed int, NiTListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> >::AntiBloatAllocator *, ItemUseTask *))(*(_DWORD *)v4->m_uiRefCount + 20))(
                52,
                &v4->m_kSerialTaskList.m_kAllocator,
                v4);
          }
          ((void (__thiscall *)(ItemUseTask *, signed int, NiTListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> >::AntiBloatAllocator *, ItemUseTask *))v4->vfptr[5].__vecDelDtor)(
            v4,
            52,
            &v4->m_kSerialTaskList.m_kAllocator,
            v4);
          v4->m_pkMsgHooker = (IDirectMessenger *)2;
        }
        else if ( !strcmp(v22, "GoddessWing") )
        {
          if ( v4->m_uiRefCount )
          {
            (*(void (__stdcall **)(signed int, NiTListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> >::AntiBloatAllocator *, ItemUseTask *))(*(_DWORD *)v4->m_uiRefCount + 4))(
              53,
              &v4->m_kSerialTaskList.m_kAllocator,
              v4);
            if ( v4->m_uiRefCount )
              (*(void (__stdcall **)(signed int, NiTListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> >::AntiBloatAllocator *, ItemUseTask *))(*(_DWORD *)v4->m_uiRefCount + 20))(
                53,
                &v4->m_kSerialTaskList.m_kAllocator,
                v4);
          }
          ((void (__thiscall *)(ItemUseTask *, signed int, NiTListBase<DFALL<NiPointer<ITask> >,NiPointer<ITask> >::AntiBloatAllocator *, ItemUseTask *))v4->vfptr[5].__vecDelDtor)(
            v4,
            53,
            &v4->m_kSerialTaskList.m_kAllocator,
            v4);
          v4->m_pkMsgHooker = (IDirectMessenger *)2;
        }
        else
        {
          if ( !strcmp(v22, "EnchantSocketAdd") )
          {
            ItemUseTask::OnUseItemAddSocket((Item *)pvBody, iMsgTag);
            v4->m_pkMsgHooker = (IDirectMessenger *)2;
            return;
          }
          if ( !strcmp(pkItemInfo->InxName, "EnchantSocketReload") )
          {
            v23 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
            v24 = v23->m_pkEnchantGemDeleteWin1;
            if ( Inventory::FindEnchantSoketReload(&g_kInventory, (ITEM_INVEN *)&iMsgTag) && v24 )
            {
              GameFrameWork::CloseEnchantGemWin(v23, 1, 1);
              EnchantGemDeleteWin::SetClearItemInven(v24, (ITEM_INVEN *)&iMsgTag);
              PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v24->vfptr);
            }
            v4->m_pkMsgHooker = (IDirectMessenger *)2;
          }
          else
          {
            if ( !strcmp(pkItemInfo->InxName, "RandomOption_Recover") )
            {
              ItemUseTask::OnUseItemRandomOptRecoveryCount((Item *)pvBody, iMsgTag);
              v4->m_pkMsgHooker = (IDirectMessenger *)2;
              return;
            }
            if ( pkItemInfo->ItemFunc == 1 )
            {
              ItemUseTask::OnUseItemRepairKit((Item *)pvBody, iMsgTag);
              v4->m_pkMsgHooker = (IDirectMessenger *)2;
              return;
            }
            if ( ItemUseTask::UsePutOnBelongClear((Item *)pvBody, iMsgTag) == 1 )
              goto LABEL_5;
            if ( pkItemInfo->ItemFunc == 2 )
            {
              v25 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
              if ( unk_A9943C == 2 )
              {
                MiniHouseIndoor::SetState(&g_kWorld.m_MiniHouseIndoorMode, MH_STATE_REPAIR);
                v26 = (NiPoint3 *)((int (*)(void))g_pkMainChar->vfptr[6].Deaffect)();
                SoundMgr::CreateSound(&g_kSoundMgr, "SFX_EndureKit", v26);
                v27 = v25->m_pkMHRepairWin;
                if ( v27 && v25->m_pkInventoryWin )
                {
                  mhRepairObjWin::SetRepairKitSlot(v27, *v6);
                  InventoryWin::LockAllItem(v25->m_pkInventoryWin);
                  v4->m_pkMsgHooker = (IDirectMessenger *)2;
                  return;
                }
              }
              else
              {
                v28 = TextData2::Get(0x746155E1u);
                GameFrameWork::AddSysMsg(v25, (const char *)v28);
              }
              v4->m_pkMsgHooker = (IDirectMessenger *)2;
            }
            else
            {
              LOBYTE(iMsgTag) = *v6;
              BYTE1(iMsgTag) = 9;
              NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x15u, &iMsgTag, 2);
              LOBYTE(v4->m_eState) = 0;
            }
          }
        }
      }
    }
  }
  else if ( iMsgTag == 39 && this->m_kSerialTaskList.m_pkTail == (NiTListItem<NiPointer<ITask> > *)4 )
  {
    CastingProgressWin::CastingFail((CastingProgressWin *)ItemUseTask::ms_pkCastingProgressWin);
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x19u, 0, 0);
LABEL_5:
    v4->m_pkMsgHooker = (IDirectMessenger *)2;
    return;
  }
}

//----- (006AAD20) --------------------------------------------------------
boost::detail::function::any_pointer __cdecl boost::detail::function::functor_manager<boost::_bi::bind_t<void,boost::_mfi::mf2<void,GameFrameWork,int,int>,boost::_bi::list3<boost::_bi::value<GameFrameWork *>,boost::arg<1>,boost::_bi::value<unsigned int>>>,std::allocator<void>>::manager(boost::detail::function::any_pointer function_obj_ptr, boost::detail::function::functor_manager_operation_type op)
{
  boost::detail::function::any_pointer result; // eax@2
  std::exception pExceptionObject; // [sp+0h] [bp-Ch]@4

  if ( op )
  {
    operator delete(function_obj_ptr.obj_ptr);
    result.obj_ptr = 0;
  }
  else
  {
    result.obj_ptr = operator new(0x10u);
    if ( !result.obj_ptr )
    {
      op = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&op);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
    *(_DWORD *)result.obj_ptr = *(_DWORD *)function_obj_ptr.obj_ptr;
    *((_DWORD *)result.obj_ptr + 1) = *((_DWORD *)function_obj_ptr.obj_ptr + 1);
    *((_DWORD *)result.obj_ptr + 2) = *((_DWORD *)function_obj_ptr.obj_ptr + 2);
    *((_DWORD *)result.obj_ptr + 3) = *((_DWORD *)function_obj_ptr.obj_ptr + 3);
  }
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (006AADA0) --------------------------------------------------------
boost::detail::function::any_pointer __cdecl boost::detail::function::functor_manager<boost::_bi::bind_t<void,boost::_mfi::mf1<void,Char,char const *>,boost::_bi::list2<boost::_bi::value<Char *>,boost::arg<1>>>,std::allocator<void>>::manage(boost::detail::function::any_pointer functor_ptr, boost::detail::function::functor_manager_operation_type op)
{
  return boost::detail::function::functor_manager<boost::_bi::bind_t<void,boost::_mfi::mf2<void,GameFrameWork,int,int>,boost::_bi::list3<boost::_bi::value<GameFrameWork *>,boost::arg<1>,boost::_bi::value<unsigned int>>>,std::allocator<void>>::manager(
           functor_ptr,
           op);
}

//----- (006AADC0) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::replace(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int _Off, unsigned int _N0, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Right, unsigned int _Roff, unsigned int _Count)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v6; // esi@1
  unsigned int v7; // edx@1
  unsigned int v8; // edi@1
  unsigned int v9; // ebx@2
  unsigned int v10; // ecx@5
  unsigned int v11; // ebx@5
  unsigned int v12; // eax@9
  unsigned int v13; // ecx@9
  unsigned int v14; // edx@12
  _BYTE *v15; // eax@16
  unsigned int v16; // eax@20
  char *v17; // ecx@21
  char *v18; // eax@24
  char *v19; // ecx@26
  unsigned int v20; // eax@32
  char *v21; // ecx@33
  char *v22; // eax@36
  unsigned int v23; // eax@38
  char *v24; // ecx@39
  char *v25; // eax@42
  unsigned int v26; // eax@45
  char *v27; // ecx@46
  char *v28; // eax@49
  unsigned int v29; // eax@51
  char *v30; // ecx@52
  unsigned int v31; // eax@57
  char *v32; // ecx@59
  char *v33; // eax@62
  unsigned int v34; // ecx@64
  char *v35; // eax@65
  char *v36; // ecx@71
  char *v37; // eax@74
  unsigned int v38; // eax@76
  char *v39; // ecx@77
  char *v40; // eax@80
  unsigned int v41; // eax@82
  char *v42; // eax@86
  bool v43; // cf@90
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result; // eax@91
  char *v45; // [sp-Ch] [bp-14h]@42
  unsigned int v46; // [sp-8h] [bp-10h]@42
  unsigned int _Nm; // [sp+10h] [bp+8h]@9
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Righta; // [sp+18h] [bp+10h]@83
  unsigned int _Newsize; // [sp+20h] [bp+18h]@9

  v6 = this;
  v7 = this->_Mysize;
  v8 = _Off;
  if ( v7 < _Off || (v9 = _Right->_Mysize, v9 < _Roff) )
    std::_Xout_of_range("invalid string position");
  if ( v7 - _Off < _N0 )
    _N0 = v7 - _Off;
  v10 = v9 - _Roff;
  v11 = _Count;
  if ( v10 < _Count )
    v11 = v10;
  if ( -1 - v11 <= v7 - _N0 )
    std::_Xlength_error("string too long");
  _Nm = v7 - _Off - _N0;
  v12 = v7 - _N0 + v11;
  v13 = v6->_Mysize;
  _Newsize = v12;
  if ( v13 < v12 )
  {
    if ( v12 > 0xFFFFFFFE )
      std::_Xlength_error("string too long");
    v14 = v6->_Myres;
    if ( v14 >= v12 )
    {
      if ( !v12 )
      {
        v6->_Mysize = 0;
        if ( v14 < 0x10 )
          v15 = v6;
        else
          v15 = v6->_Bx._Ptr;
        *v15 = 0;
      }
    }
    else
    {
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Copy(v6, v12, v13);
    }
  }
  if ( v6 == _Right )
  {
    if ( v11 > _N0 )
    {
      if ( _Roff > v8 )
      {
        v31 = v6->_Myres;
        if ( v8 + _N0 <= _Roff )
        {
          if ( v31 < 0x10 )
            v32 = (char *)v6;
          else
            v32 = v6->_Bx._Ptr;
          if ( v31 < 0x10 )
            v33 = (char *)v6;
          else
            v33 = v6->_Bx._Ptr;
          memmove(&v33[v8] + v11, &v32[v8] + _N0, _Nm);
          v34 = v6->_Myres;
          if ( v34 < 0x10 )
            v35 = (char *)v6;
          else
            v35 = v6->_Bx._Ptr;
          if ( v34 < 0x10 )
            memmove((char *)v6 + v8, &v35[_Roff] + v11 - _N0, v11);
          else
            memmove(&v6->_Bx._Ptr[v8], &v35[_Roff] + v11 - _N0, v11);
          goto LABEL_90;
        }
        if ( v31 < 0x10 )
          v36 = (char *)v6;
        else
          v36 = v6->_Bx._Ptr;
        if ( v31 < 0x10 )
          v37 = (char *)v6;
        else
          v37 = v6->_Bx._Ptr;
        memmove(&v37[v8], &v36[_Roff], _N0);
        v38 = v6->_Myres;
        if ( v38 < 0x10 )
          v39 = (char *)v6;
        else
          v39 = v6->_Bx._Ptr;
        if ( v38 < 0x10 )
          v40 = (char *)v6;
        else
          v40 = v6->_Bx._Ptr;
        memmove(&v40[v8] + v11, &v39[v8] + _N0, _Nm);
        v41 = v6->_Myres;
        if ( v41 < 0x10 )
          _Righta = v6;
        else
          _Righta = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v6->_Bx._Ptr;
        if ( v41 < 0x10 )
          v42 = (char *)v6;
        else
          v42 = v6->_Bx._Ptr;
        v46 = v11 - _N0;
        v25 = &v42[v8] + _N0;
        v45 = &_Righta->_Bx._Buf[_Roff] + v11;
      }
      else
      {
        v26 = v6->_Myres;
        if ( v26 < 0x10 )
          v27 = (char *)v6;
        else
          v27 = v6->_Bx._Ptr;
        if ( v26 < 0x10 )
          v28 = (char *)v6;
        else
          v28 = v6->_Bx._Ptr;
        memmove(&v28[v8] + v11, &v27[v8] + _N0, _Nm);
        v29 = v6->_Myres;
        if ( v29 < 0x10 )
          v30 = (char *)v6;
        else
          v30 = v6->_Bx._Ptr;
        if ( v29 < 0x10 )
        {
          v46 = v11;
          v45 = &v30[_Roff];
          v25 = &v6->_Bx._Buf[v8];
        }
        else
        {
          v46 = v11;
          v45 = &v30[_Roff];
          v25 = &v6->_Bx._Ptr[v8];
        }
      }
    }
    else
    {
      v20 = v6->_Myres;
      if ( v20 < 0x10 )
        v21 = (char *)v6;
      else
        v21 = v6->_Bx._Ptr;
      if ( v20 < 0x10 )
        v22 = (char *)v6;
      else
        v22 = v6->_Bx._Ptr;
      memmove(&v22[v8], &v21[_Roff], v11);
      v23 = v6->_Myres;
      if ( v23 < 0x10 )
        v24 = (char *)v6;
      else
        v24 = v6->_Bx._Ptr;
      if ( v23 < 0x10 )
      {
        v46 = _Nm;
        v45 = &v24[v8] + _N0;
        v25 = &v6->_Bx._Buf[v8] + v11;
      }
      else
      {
        v46 = _Nm;
        v45 = &v24[v8] + _N0;
        v25 = &v6->_Bx._Ptr[v8] + v11;
      }
    }
    memmove(v25, v45, v46);
    goto LABEL_90;
  }
  v16 = v6->_Myres;
  if ( v16 < 0x10 )
    v17 = (char *)v6;
  else
    v17 = v6->_Bx._Ptr;
  if ( v16 < 0x10 )
    v18 = (char *)v6;
  else
    v18 = v6->_Bx._Ptr;
  memmove(&v18[v8] + v11, &v17[v8] + _N0, _Nm);
  v19 = (char *)_Right;
  if ( _Right->_Myres >= 0x10 )
    v19 = _Right->_Bx._Ptr;
  if ( v6->_Myres < 0x10 )
    memcpy((char *)v6 + v8, &v19[_Roff], v11);
  else
    memcpy(&v6->_Bx._Ptr[v8], &v19[_Roff], v11);
LABEL_90:
  v43 = v6->_Myres < 0x10;
  v6->_Mysize = _Newsize;
  if ( v43 )
  {
    result = v6;
    v6->_Bx._Buf[_Newsize] = 0;
  }
  else
  {
    v6->_Bx._Ptr[_Newsize] = 0;
    result = v6;
  }
  return result;
}

//----- (006AB0E0) --------------------------------------------------------
boost::detail::function::unusable *__cdecl boost::detail::function::void_function_obj_invoker1<boost::_bi::bind_t<void,boost::_mfi::mf2<void,GameFrameWork,char const *,int>,boost::_bi::list3<boost::_bi::value<GameFrameWork *>,boost::arg<1>,boost::_bi::value<unsigned int>>>,void,char const *>::invoke(boost::detail::function::unusable *result, boost::detail::function::any_pointer function_obj_ptr, int a0)
{
  (*(void (__thiscall **)(_DWORD, int, _DWORD))function_obj_ptr.obj_ptr)(
    *((_DWORD *)function_obj_ptr.obj_ptr + 1),
    a0,
    *((_DWORD *)function_obj_ptr.obj_ptr + 3));
  return result;
}

//----- (006AB100) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::replace(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int _Off, unsigned int _N0, const char *_Ptr, unsigned int _Count)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v5; // esi@1
  unsigned int v6; // edx@2
  char *v7; // ecx@6
  _BYTE *v8; // ecx@10
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result; // eax@12
  unsigned int v10; // edx@13
  unsigned int v11; // ebx@15
  unsigned int v12; // ecx@17
  unsigned int v13; // eax@19
  unsigned int v14; // edx@20
  char *v15; // edi@21
  char *v16; // edx@24
  unsigned int v17; // edi@29
  unsigned int v18; // edx@31
  unsigned int v19; // edx@34
  char *v20; // eax@35
  char *v21; // eax@46
  bool v22; // cf@48
  unsigned int _Nm; // [sp+8h] [bp-4h]@19
  unsigned int _N0a; // [sp+18h] [bp+Ch]@42

  v5 = this;
  if ( !_Ptr )
    goto LABEL_54;
  v6 = this->_Myres;
  if ( v6 >= 0x10 )
    this = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)this->_Bx._Ptr;
  if ( _Ptr < (const char *)this || (v6 < 0x10 ? (v7 = (char *)v5) : (v7 = v5->_Bx._Ptr), &v7[v5->_Mysize] <= _Ptr) )
  {
LABEL_54:
    v10 = v5->_Mysize;
    if ( v10 < _Off )
      std::_Xout_of_range("invalid string position");
    v11 = _N0;
    if ( v10 - _Off < _N0 )
      v11 = v10 - _Off;
    v12 = _Count;
    if ( -1 - _Count <= v10 - v11 )
      std::_Xlength_error("string too long");
    v13 = v10 - _Off - v11;
    _Nm = v10 - _Off - v11;
    if ( _Count < v11 )
    {
      v14 = v5->_Myres;
      if ( v14 < 0x10 )
        v15 = (char *)v5;
      else
        v15 = v5->_Bx._Ptr;
      if ( v14 < 0x10 )
        v16 = (char *)v5;
      else
        v16 = v5->_Bx._Ptr;
      memmove(&v16[_Off] + _Count, &v15[_Off] + v11, v13);
      v12 = _Count;
    }
    if ( v12 || v11 )
    {
      v17 = v12 + v5->_Mysize - v11;
      if ( v17 > 0xFFFFFFFE )
        std::_Xlength_error("string too long");
      v18 = v5->_Myres;
      if ( v18 >= v17 )
      {
        if ( !v17 )
        {
          v5->_Mysize = 0;
          if ( v18 < 0x10 )
          {
            result = v5;
            v5->_Bx._Buf[0] = 0;
          }
          else
          {
            *v5->_Bx._Ptr = 0;
            result = v5;
          }
          return result;
        }
        goto LABEL_33;
      }
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Copy(v5, v17, v5->_Mysize);
      v12 = _Count;
      if ( v17 )
      {
LABEL_33:
        if ( v11 < v12 )
        {
          v19 = v5->_Myres;
          if ( v19 < 0x10 )
            v20 = (char *)v5;
          else
            v20 = v5->_Bx._Ptr;
          if ( v19 < 0x10 )
            _N0a = (unsigned int)v5;
          else
            _N0a = (unsigned int)v5->_Bx._Ptr;
          memmove((char *)(v12 + _Off + _N0a), &v20[_Off] + v11, _Nm);
          v12 = _Count;
        }
        if ( v5->_Myres < 0x10 )
          v21 = (char *)v5;
        else
          v21 = v5->_Bx._Ptr;
        memcpy(&v21[_Off], (char *)_Ptr, v12);
        v22 = v5->_Myres < 0x10;
        v5->_Mysize = v17;
        if ( !v22 )
        {
          v5->_Bx._Ptr[v17] = 0;
          return v5;
        }
        v5->_Bx._Buf[v17] = 0;
        return v5;
      }
    }
    return v5;
  }
  if ( v6 < 0x10 )
    v8 = v5;
  else
    v8 = v5->_Bx._Ptr;
  return std::basic_string<char,std::char_traits<char>,std::allocator<char>>::replace(
           v5,
           _Off,
           _N0,
           v5,
           _Ptr - v8,
           _Count);
}

//----- (006AB2D0) --------------------------------------------------------
void __thiscall boost::function1<void,char const *,std::allocator<void>>::assign_to<boost::_bi::bind_t<void,boost::_mfi::mf2<void,GameFrameWork,char const *,int>,boost::_bi::list3<boost::_bi::value<GameFrameWork *>,boost::arg<1>,boost::_bi::value<unsigned int>>>>(boost::function1<void,int,std::allocator<void> > *this, boost::_bi::bind_t<void,boost::_mfi::mf2<void,GameFrameWork,int,int>,boost::_bi::list3<boost::_bi::value<GameFrameWork *>,boost::arg<1>,boost::_bi::value<unsigned int> > > f)
{
  boost::function1<void,int,std::allocator<void> > *v2; // esi@1
  NiUnsharedGeometryGroup *v3; // eax@2
  NiUnsharedGeometryGroup v4; // [sp+4h] [bp-20h]@1
  unsigned int v5; // [sp+10h] [bp-14h]@1
  std::exception pExceptionObject; // [sp+14h] [bp-10h]@5
  char *_What; // [sp+20h] [bp-4h]@5

  v2 = this;
  v4.m_uiRefCount = (unsigned int)f.l_.a1_.t_;
  v4.vfptr = (NiGeometryGroupVtbl *)f.f_.f_;
  v4.m_pkD3DDevice = *(IDirect3DDevice9 **)&f.l_.a2_;
  v5 = f.l_.a3_.t_;
  if ( !NiD3DTimeSyncController::CanBeExtracted() )
  {
    v2->invoker = boost::detail::function::void_function_obj_invoker1<boost::_bi::bind_t<void,boost::_mfi::mf2<void,GameFrameWork,char const *,int>,boost::_bi::list3<boost::_bi::value<GameFrameWork *>,boost::arg<1>,boost::_bi::value<unsigned int>>>,void,char const *>::invoke;
    v2->manager = boost::detail::function::functor_manager<boost::_bi::bind_t<void,boost::_mfi::mf1<void,Char,char const *>,boost::_bi::list2<boost::_bi::value<Char *>,boost::arg<1>>>,std::allocator<void>>::manage;
    v3 = (NiUnsharedGeometryGroup *)operator new(0x10u);
    if ( !v3 )
    {
      _What = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&_What);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
    *v3 = v4;
    v3[1].vfptr = (NiGeometryGroupVtbl *)v5;
    v2->functor.obj_ptr = v3;
  }
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (006AB370) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::replace(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> > _First, std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> > _Last, const char *_Ptr)
{
  const char *v4; // esi@2
  unsigned int v5; // ecx@5
  const char *v6; // esi@8
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v8; // [sp+Ch] [bp-4h]@1

  v8 = this;
  if ( this->_Myres < 0x10 )
    v4 = (const char *)this;
  else
    v4 = this->_Bx._Ptr;
  if ( _Last._Ptr )
    v5 = _Last._Ptr - _First._Ptr;
  else
    v5 = 0;
  if ( _First._Ptr )
    v6 = (const char *)(_First._Ptr - v4);
  else
    v6 = 0;
  return std::basic_string<char,std::char_traits<char>,std::allocator<char>>::replace(
           v8,
           (unsigned int)v6,
           v5,
           _Ptr,
           strlen(_Ptr));
}

//----- (006AB3D0) --------------------------------------------------------
void __thiscall boost::function<void __cdecl (char const *),std::allocator<void>>::function<void __cdecl (char const *),std::allocator<void>>(boost::function<void __cdecl(int),std::allocator<void> > *this, boost::_bi::bind_t<void,boost::_mfi::mf2<void,GameFrameWork,int,int>,boost::_bi::list3<boost::_bi::value<GameFrameWork *>,boost::arg<1>,boost::_bi::value<unsigned int> > > f, int __formal)
{
  boost::_bi::bind_t<void,boost::_mfi::mf2<void,GameFrameWork,int,int>,boost::_bi::list3<boost::_bi::value<GameFrameWork *>,boost::arg<1>,boost::_bi::value<unsigned int> > > v3; // ST00_16@1

  this->manager = 0;
  this->functor.obj_ptr = 0;
  this->invoker = 0;
  *(_QWORD *)&v3.f_.f_ = *(_QWORD *)&f.f_.f_;
  *(_QWORD *)&v3.l_.a2_ = *(_QWORD *)&f.l_.a2_;
  boost::function1<void,char const *,std::allocator<void>>::assign_to<boost::_bi::bind_t<void,boost::_mfi::mf2<void,GameFrameWork,char const *,int>,boost::_bi::list3<boost::_bi::value<GameFrameWork *>,boost::arg<1>,boost::_bi::value<unsigned int>>>>(
    (boost::function1<void,int,std::allocator<void> > *)&this->manager,
    v3);
}

//----- (006AB410) --------------------------------------------------------
unsigned int __thiscall EntryInfo::GetTotalBettingMoney(EntryInfo *this)
{
  unsigned int result; // eax@1
  char *v2; // ecx@1
  signed int v3; // esi@1
  int v4; // edx@2
  int v5; // edx@4
  int v6; // edx@8

  result = 0;
  v2 = (char *)&this->m_BettingInfo.nBetMoney[2];
  v3 = 13;
  do
  {
    v4 = *((_DWORD *)v2 - 2);
    if ( v4 )
      result += v4;
    v5 = *((_DWORD *)v2 - 1);
    if ( v5 )
      result += v5;
    if ( *(_DWORD *)v2 )
      result += *(_DWORD *)v2;
    v6 = *((_DWORD *)v2 + 1);
    if ( v6 )
      result += v6;
    v2 += 16;
    --v3;
  }
  while ( v3 );
  return result;
}

//----- (006AB450) --------------------------------------------------------
void __thiscall GambleWin::SetEnableLeaveBtn(GambleWin *this, int bEnable)
{
  if ( this->m_pkLeaveBtn )
    ((void (__stdcall *)(_DWORD))this->m_pkLeaveBtn->vfptr[60].__vecDelDtor)(bEnable);
}

//----- (006AB480) --------------------------------------------------------
void MHDiceGameTask::OpenDiceWin()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenDiceGameWin(v1);
}

//----- (006AB4A0) --------------------------------------------------------
void __thiscall MHDiceGameTask::OpenHelpWin(MHDiceGameTask *this)
{
  MHDiceGameTask *v1; // esi@1

  v1 = this;
  if ( (unsigned __int8)((int (*)(void))this->m_pkDiceHelpWin->vfptr[65].__vecDelDtor)() )
    PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkDiceHelpWin->vfptr);
  else
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkDiceHelpWin->vfptr);
}

//----- (006AB4E0) --------------------------------------------------------
void __thiscall MHDiceGameTask::OpenDiceRateWin(MHDiceGameTask *this)
{
  MHDiceGameTask *v1; // esi@1

  v1 = this;
  if ( (unsigned __int8)((int (*)(void))this->m_pkDiceRateSheetWin->vfptr[65].__vecDelDtor)() )
    PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkDiceRateSheetWin->vfptr);
  else
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkDiceRateSheetWin->vfptr);
}

//----- (006AB520) --------------------------------------------------------
void __stdcall MHDiceGameTask::OnCloseWin(PgWin *pkWin)
{
  PgWinMgr::CloseWin(&Pgg_kWinMgr, pkWin);
}

//----- (006AB530) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_DICE_ROLL_RESULT_CMD(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_DICE_ROLL_RESULT_CMD *pkProto)
{
  MHDiceGameTask *v2; // esi@1
  MiniHouseDiceGameWin *v3; // ecx@2

  v2 = this;
  if ( pkProto->nError == 7400 )
  {
    this->m_eDiceSaiGameStatus = 3;
    DiceTaiSai::ConvertDice(pkProto->nDiceInfo.nNumber, &this->m_nDiceVariety);
    v2->m_DiceAniCode[0] = 100 * pkProto->nDiceInfo.nNumber[0];
    v2->m_DiceAniCode[1] = 100 * pkProto->nDiceInfo.nNumber[1];
    v3 = v2->m_pkDiceGameWin;
    v2->m_DiceAniCode[2] = 100 * pkProto->nDiceInfo.nNumber[2];
    MiniHouseDiceGameWin::DiceAnimationStart(v3, v2->m_DiceAniCode);
  }
  return 1;
}

//----- (006AB5B0) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_DICE_ROLL_CMD(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_DICE_ROLL_CMD *pkProto)
{
  int result; // eax@1

  result = 1;
  if ( pkProto->nError == 7392 )
    this->m_eDiceSaiGameStatus = 2;
  return result;
}

//----- (006AB5E0) --------------------------------------------------------
int __stdcall MHDiceGameTask::Recv_NC_DICE_TAISAI_RANK_REQ(PROTO_NC_DICE_TAISAI_RANK_REQ *pkProto)
{
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Bu, 0x16u, 0, 0);
  return 1;
}

//----- (006AB600) --------------------------------------------------------
int __stdcall MHDiceGameTask::Recv_NC_DICE_TAISAI_DICE_ROLL_REQ(PROTO_NC_DICE_TAISAI_DICE_ROLL_REQ *pkProto)
{
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Bu, 0x20u, 0, 0);
  return 1;
}

//----- (006AB620) --------------------------------------------------------
int __stdcall MHDiceGameTask::Recv_NC_DICE_TAISAI_EXPECT_INCOME_MONEY_REQ(PROTO_NC_DICE_TAISAI_EXPECT_INCOME_MONEY_REQ *pkProto)
{
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Bu, 0xBu, pkProto, 2);
  return 1;
}

//----- (006AB640) --------------------------------------------------------
int __stdcall MHDiceGameTask::Recv_NC_DICE_TAISAI_RECEIPT_INCOME_MONEY_REQ(PROTO_NC_DICE_TAISAI_RECEIPT_INCOME_MONEY_REQ *pkProto)
{
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Bu, 0xFu, pkProto, 2);
  return 1;
}

//----- (006AB660) --------------------------------------------------------
bool __thiscall MHDiceGameTask::IsDicegamePlaying(MHDiceGameTask *this)
{
  return this->m_bIsEnterGameRoom;
}

//----- (006AB670) --------------------------------------------------------
int __stdcall MHDiceGameTask::Recv_NC_DICE_TAISAI_LARGE_AMOUNT_REQ(PROTO_NC_DICE_TAISAI_LARGE_AMOUNT_REQ *pkProto)
{
  if ( pkProto )
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Bu, 0x28u, pkProto, 4);
  return 1;
}

//----- (006AB6A0) --------------------------------------------------------
int __stdcall MHDiceGameTask::Recv_NC_DICE_TAISAI_LARGE_AMOUNT_ACK(PROTO_NC_DICE_TAISAI_LARGE_AMOUNT_ACK *pkProto)
{
  return 1;
}

//----- (006AB6B0) --------------------------------------------------------
bool __thiscall MHDiceGameTask::IsGambleMode(MHDiceGameTask *this)
{
  MHDiceGameTask::DICE_GAME_MODE v1; // eax@1

  v1 = this->m_eDiceGameMode;
  return v1 == 2 || v1 == 4;
}

//----- (006AB6D0) --------------------------------------------------------
void __cdecl MHDiceGameTask::Terminate()
{
  void (__thiscall ***v0)(_DWORD, _DWORD); // esi@1

  v0 = (void (__thiscall ***)(_DWORD, _DWORD))MHDiceGameTask::ms_spMHDiceGameTask;
  if ( MHDiceGameTask::ms_spMHDiceGameTask )
  {
    if ( !InterlockedDecrement((volatile LONG *)(MHDiceGameTask::ms_spMHDiceGameTask + 4)) )
    {
      if ( v0 )
        (**v0)(v0, 1);
    }
    MHDiceGameTask::ms_spMHDiceGameTask = 0;
  }
}
// B5BDC4: using guessed type int MHDiceGameTask::ms_spMHDiceGameTask;

//----- (006AB710) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_JOIN_REQ(MHDiceGameTask *this)
{
  GameFrameWork *v1; // eax@2
  int result; // eax@2

  if ( this->m_bInitialFinished )
  {
    if ( !this->m_bIsEnterGameRoom )
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Bu, 1u, 0, 0);
    result = 1;
  }
  else
  {
    v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    GameFrameWork::AddSysMsg(v1, "Initialize Failed. Join not enable");
    result = 0;
  }
  return result;
}

//----- (006AB760) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_TIMER_CMD(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_TIMER_CMD *pkProto)
{
  MHDiceGameTask *v2; // esi@1
  MiniHouseDiceGameWin *v3; // eax@2
  PgWinSpr *v4; // ebx@2
  PgWinSpr *v5; // edi@2
  float v6; // ST10_4@2
  int v7; // eax@2
  float v8; // ST14_4@2
  MiniHouseDiceGameWin *v9; // eax@2
  PgWinSpr *v10; // edi@2
  PgWinSpr *v11; // ebx@2
  float v12; // ST10_4@2
  signed int v13; // eax@2
  float v14; // ST14_4@2
  MiniHouseDiceGameWin *v15; // esi@2
  NiRefObjectVtbl **v16; // edi@2
  int (*v17)(void); // edx@2
  NiRefObjectVtbl *v18; // esi@2
  int v19; // eax@2
  int result; // eax@2

  v2 = this;
  if ( pkProto->bIsStart )
  {
    this->m_nLengthInOneGame = pkProto->nTimer / 10;
    result = 1;
  }
  else
  {
    this->m_IsClockCastPlaying = 0;
    this->m_IsClockAlramPlaying = 0;
    this->m_fTimerPosOnPregress = 0.0;
    v3 = this->m_pkDiceGameWin;
    this->m_fClockAlramTime = 0.0;
    v4 = v3->m_spTimer.m_pObject;
    v5 = v3->m_spTimerFill.m_pObject;
    v6 = (double)((int (__thiscall *)(PgWinSpr *))v5->vfptr[41].__vecDelDtor)(v3->m_spTimerFill.m_pObject) - 8.0;
    v7 = ((int (__thiscall *)(PgWinSpr *))v5->vfptr[42].__vecDelDtor)(v5) - 10;
    v4->m_kLocal.m_Translate.x = v6;
    v8 = (double)v7;
    v4->m_kLocal.m_Translate.y = v8;
    v4->m_kLocal.m_Translate.z = 1.0;
    v9 = v2->m_pkDiceGameWin;
    v10 = v9->m_spTimerFill.m_pObject;
    v11 = v9->m_spTimerBack.m_pObject;
    v12 = (double)((int (__thiscall *)(PgWinSpr *))v10->vfptr[41].__vecDelDtor)(v9->m_spTimerFill.m_pObject);
    v13 = ((int (__thiscall *)(PgWinSpr *))v10->vfptr[42].__vecDelDtor)(v10);
    v11->m_kLocal.m_Translate.x = v12;
    v14 = (double)v13;
    v11->m_kLocal.m_Translate.y = v14;
    v11->m_kLocal.m_Translate.z = 1.0;
    v15 = v2->m_pkDiceGameWin;
    v16 = &v15->m_spTimerBack.m_pObject->vfptr;
    v17 = (int (*)(void))v15->m_spTimerFill.m_pObject->vfptr[36].__vecDelDtor;
    v18 = *v16;
    v19 = v17();
    v18[117].__vecDelDtor((NiRefObject *)v16, v19);
    ((void (*)(void))g_kSoundMgr.m_pkInterfaceGroup->vfptr->UnloadAllSound)();
    result = 1;
  }
  return result;
}

//----- (006AB8B0) --------------------------------------------------------
void __thiscall MHDiceGameTask::DirectMessage(MHDiceGameTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  MHDiceGameTask *v4; // edi@1
  int v5; // esi@5
  int v6; // eax@10
  float v7; // esi@14
  float v8; // esi@19
  unsigned __int16 v9; // [sp-14h] [bp-18h]@12
  unsigned __int16 v10; // [sp-10h] [bp-14h]@12

  v4 = this;
  if ( iMsgTag != 27 || !pvBody )
    return;
  if ( *(_DWORD *)pvBody )
  {
    if ( *(_DWORD *)pvBody != 1 )
      return;
    v8 = this->m_kTimer.m_fElapsedTime;
    if ( v8 == 0.0 )
      return;
    if ( !InterlockedDecrement((volatile LONG *)(LODWORD(v8) + 4)) && v8 != 0.0 )
      (**(void (__thiscall ***)(_DWORD, _DWORD))LODWORD(v8))(LODWORD(v8), 1);
    goto LABEL_23;
  }
  if ( !*(_DWORD *)&this->m_bIsGusetStatus )
  {
    v6 = this->m_nInvenRemainMoney;
    if ( v6 == 2 || v6 == 4 )
    {
      v10 = 104;
      v9 = 47;
    }
    else
    {
      v10 = 5;
      v9 = 43;
    }
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, v9, v10, 0, 0);
    PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v7 = v4->m_kTimer.m_fElapsedTime;
    if ( v7 == 0.0 )
      return;
    if ( !InterlockedDecrement((volatile LONG *)(LODWORD(v7) + 4)) && v7 != 0.0 )
    {
      (**(void (__thiscall ***)(_DWORD, _DWORD))LODWORD(v7))(LODWORD(v7), 1);
      LODWORD(v4->m_kTimer.m_fElapsedTime) = 0;
      return;
    }
LABEL_23:
    LODWORD(v4->m_kTimer.m_fElapsedTime) = 0;
    return;
  }
  v5 = *(_DWORD *)&this->m_bIsGusetStatus;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)(v5 + 4)) )
    {
      if ( v5 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v5)(v5, 1);
    }
    *(_DWORD *)&v4->m_bIsGusetStatus = 0;
  }
}

//----- (006AB9D0) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_DICE_ROLL_ACK(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_DICE_ROLL_ACK *pkProto)
{
  MHDiceGameTask *v2; // esi@1
  int result; // eax@4
  GameFrameWork *v4; // esi@6
  const char *v5; // eax@6

  v2 = this;
  if ( pkProto->nError == 7376 )
  {
    if ( this->m_eDiceSaiGameStatus == 1 )
    {
      ((void (*)(void))g_kSoundMgr.m_pkInterfaceGroup->vfptr->StopAllSound)();
      ((void (*)(void))g_kSoundMgr.m_pkInterfaceGroup->vfptr->UnloadAllSound)();
    }
    v2->m_eDiceSaiGameStatus = 2;
    result = 1;
  }
  else
  {
    if ( pkProto->nError == 7384 )
    {
      v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      v5 = ErrMsgTable::GetErrMsg(pkProto->nError);
      GameFrameWork::AddSysMsg(v4, v5);
    }
    result = 1;
  }
  return result;
}

//----- (006ABA60) --------------------------------------------------------
int __stdcall MHDiceGameTask::Recv_NC_DICE_TAISAI_RECEIPT_INCOME_MONEY_ACK(PROTO_NC_DICE_TAISAI_RECEIPT_INCOME_MONEY_ACK *pkProto)
{
  PgFrameWork *v2; // eax@1

  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)v2[21].m_kMsgQ.m_uiTail);
  return 1;
}

//----- (006ABA90) --------------------------------------------------------
void __thiscall MHDiceGameTask::UpdateDiceTaisaiGame(MHDiceGameTask *this, float fTime)
{
  MHDiceGameTask *v2; // esi@1
  MHDiceGameTask::DICE_GAME_MODE v3; // eax@1
  void *v4; // ecx@4

  v2 = this;
  v3 = this->m_eDiceGameMode;
  if ( v3 != 2 && v3 != 4 )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkDiceGameWin->vfptr[65].__vecDelDtor)() )
      return;
    v4 = v2->m_pkDiceGameWin;
  }
  else
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkGambleDiceGameWin->vfptr[65].__vecDelDtor)() )
      return;
    v4 = v2->m_pkGambleDiceGameWin;
  }
  (*(void (__stdcall **)(_DWORD))(*(_DWORD *)v4 + 324))(LODWORD(fTime));
}

//----- (006ABAF0) --------------------------------------------------------
void __thiscall MHDiceGameTask::OnStart(MHDiceGameTask *this)
{
  MHDiceGameTask *v1; // esi@1
  DICE_Dividind *v2; // eax@1
  DICE_Dividind *v3; // ebx@1
  DividendRate v4; // edi@3
  char v5; // al@5
  unsigned int v6; // edi@6
  char *v7; // eax@10
  DividendRate v8; // edi@12
  int v9; // eax@15
  GB_DICE_Dividind *pkGBInfo; // [sp+14h] [bp-4h]@10

  v1 = this;
  this->m_eDiceSaiGameStatus = 1;
  this->m_eDiceSaiGameMode = 2;
  v2 = DiceDividIndTab::GetByIndex(0);
  v3 = v2;
  if ( v2 )
  {
    DiceTaiSai::Init(&v1->m_DiceTaiSai, v2->AnyTriple);
    v4 = 0;
    do
    {
      DiceTaiSaiDividind::Init(&v1->m_Dividind, v4, v3->DividendRate[v4]);
      ++v4;
    }
    while ( (signed int)v4 < 15 );
    v5 = DiceTaiSaiDividind::isInitFinishe(&v1->m_Dividind);
    v1->m_bInitialFinished = v5;
    if ( v5 )
    {
      v1->m_eBettingAmount = 0;
      v6 = 0;
      if ( !ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::GetTotal() )
        goto LABEL_19;
      while ( !CDataReader::GetRecord(
                 (CDataReader *)(ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::ms_pkTable + 4),
                 v6) )
      {
        if ( ++v6 >= ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::GetTotal() )
        {
          v1->m_bGBInitialFinished = 0;
          return;
        }
      }
      v7 = CDataReader::GetRecord((CDataReader *)(ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::ms_pkTable + 4), v6);
      pkGBInfo = (GB_DICE_Dividind *)v7;
      if ( v7 )
      {
        v8 = 0;
        while ( 1 )
        {
          DiceTaiSaiDividind::Init(&v1->m_GBDividind, v8, *(_WORD *)&v7[2 * v8]);
          if ( (signed int)++v8 >= 15 )
            break;
          v7 = (char *)pkGBInfo;
        }
        v9 = (unsigned __int8)DiceTaiSaiDividind::isInitFinishe(&v1->m_GBDividind);
        v1->m_bGBInitialFinished = (unsigned __int8)v9;
        if ( (_BYTE)v9 )
        {
          LODWORD(v1->m_nExchangedCoin) = 0;
          HIDWORD(v1->m_nExchangedCoin) = 0;
          LODWORD(v1->m_nExchangeableCoin) = 0;
          HIDWORD(v1->m_nExchangeableCoin) = 0;
          v1->m_eDiceGameMode = 0;
          v1->m_kDestPos.x = 0.0;
          v1->m_kDestPos.y = 0.0;
          v1->m_kDestPos.z = 0.0;
          v1->m_nNpcHandle = -1;
          v1->m_nWhereStand = 0;
          v1->m_hMobID = 260;
        }
      }
      else
      {
LABEL_19:
        v1->m_bGBInitialFinished = 0;
      }
    }
  }
  else
  {
    v1->m_bInitialFinished = 0;
  }
}
// A8C1C8: using guessed type int ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::ms_pkTable;

//----- (006ABC70) --------------------------------------------------------
int __stdcall MHDiceGameTask::Recv_NC_DICE_TAISAI_DICE_ROLL_RESULT_EMOTION_CMD(PROTO_NC_DICE_TAISAI_DICE_ROLL_RESULT_EMOTION_CMD *pkProto)
{
  PROTO_NC_DICE_TAISAI_DICE_ROLL_RESULT_EMOTION_CMD *v2; // ebx@3
  int v3; // edi@5
  unsigned int v4; // esi@5
  char *v5; // eax@9
  int result; // eax@12
  Char *pkChar; // [sp+Ch] [bp-8h]@4
  int i; // [sp+10h] [bp-4h]@2

  if ( pkProto && (i = 0, pkProto->nGamerCnt) )
  {
    v2 = pkProto + 3;
    while ( 1 )
    {
      pkChar = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)&v2[-2].nGamerCnt);
      if ( !pkChar )
        break;
      v3 = *(_DWORD *)&v2->nGamerCnt;
      v4 = 0;
      if ( ITableBase<ActionViewInfo,ActionViewTable>::GetTotal() )
      {
        while ( *(_DWORD *)(CDataReader::GetRecord(
                              (CDataReader *)(ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable + 4),
                              v4)
                          + 105) != v3 )
        {
          if ( ++v4 >= ITableBase<ActionViewInfo,ActionViewTable>::GetTotal() )
            goto LABEL_11;
        }
        v5 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable + 4), v4);
        if ( v5 )
          ((void (__stdcall *)(_DWORD))pkChar->vfptr[14].Deaffect)((unsigned __int8)*v5);
      }
LABEL_11:
      v2 += 6;
      if ( ++i >= pkProto->nGamerCnt )
        goto LABEL_12;
    }
    result = 0;
  }
  else
  {
LABEL_12:
    result = 1;
  }
  return result;
}
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;

//----- (006ABD30) --------------------------------------------------------
void __thiscall MHDiceGameTask::CheckBettingChip(MHDiceGameTask *this, DICE_TAISAI_BETTING idx, bool bUser)
{
  DICE_TAISAI_BETTING v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v5; // edx@1
  int v6; // edi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v7; // eax@5
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *j; // eax@6
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *i; // eax@9
  MHDiceGameTask::DICE_GAME_MODE v10; // eax@15
  double v11; // st7@18
  int v12; // eax@19
  double v13; // st7@30
  int v14; // eax@31
  int nBettingPlayer; // [sp+Ch] [bp-4h]@1
  float fPecent; // [sp+18h] [bp+8h]@18
  float fPecenta; // [sp+18h] [bp+8h]@30

  v3 = idx;
  v4 = this->map_ParticipantInfo._Myhead;
  v5 = v4->_Left;
  v6 = 0;
  nBettingPlayer = 0;
  if ( v4->_Left != v4 )
  {
    do
    {
      if ( v5->_Myval.second.m_BettingInfo.nBetMoney[idx] )
        ++v6;
      if ( !v5->_Isnil )
      {
        v7 = v5->_Right;
        if ( v7->_Isnil )
        {
          for ( i = v5->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v5 != i->_Right )
              break;
            v5 = i;
          }
          v5 = i;
        }
        else
        {
          v5 = v5->_Right;
          for ( j = v7->_Left; !j->_Isnil; j = j->_Left )
            v5 = j;
        }
      }
    }
    while ( v5 != v4 );
    nBettingPlayer = v6;
  }
  v10 = this->m_eDiceGameMode;
  if ( v10 == 1 )
  {
    if ( v6 )
    {
      fPecent = (double)nBettingPlayer / (double)this->m_nNumberOfEntrant;
      v11 = fPecent;
      if ( fPecent >= 0.2 )
      {
        if ( v11 >= 0.4 )
        {
          if ( v11 >= 0.6 )
          {
            v12 = 3;
            if ( v11 >= 0.8 )
              v12 = 4;
          }
          else
          {
            v12 = 2;
          }
        }
        else
        {
          v12 = 1;
        }
      }
      else
      {
        v12 = 0;
      }
      MiniHouseDiceGameWin::OnVisibleChip(this->m_pkDiceGameWin, v3, 1, v12, bUser);
    }
    else
    {
      MiniHouseDiceGameWin::OnVisibleChip(this->m_pkDiceGameWin, idx, 0, 0, 0);
    }
  }
  else if ( v10 == 2 )
  {
    if ( v6 )
    {
      fPecenta = (double)nBettingPlayer / (double)this->m_nNumberOfEntrant;
      v13 = fPecenta;
      if ( fPecenta >= 0.2 )
      {
        if ( v13 >= 0.4 )
        {
          if ( v13 >= 0.6 )
          {
            v14 = 3;
            if ( v13 >= 0.8 )
              v14 = 4;
          }
          else
          {
            v14 = 2;
          }
        }
        else
        {
          v14 = 1;
        }
      }
      else
      {
        v14 = 0;
      }
      GambleDiceGameWin::OnVisibleChip(this->m_pkGambleDiceGameWin, v3, 1, v14, bUser);
    }
    else
    {
      GambleDiceGameWin::OnVisibleChip(this->m_pkGambleDiceGameWin, idx, 0, 0, 0);
    }
  }
}

//----- (006ABF10) --------------------------------------------------------
unsigned int __thiscall MHDiceGameTask::GetTotalBettingMoney(MHDiceGameTask *this, DICE_TAISAI_BETTING index)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v3; // edx@1
  unsigned int result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v5; // ecx@3
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *j; // ecx@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *i; // ecx@7

  v2 = this->map_ParticipantInfo._Myhead;
  v3 = v2->_Left;
  result = 0;
  while ( v3 != v2 )
  {
    result += v3->_Myval.second.m_BettingInfo.nBetMoney[index];
    if ( !v3->_Isnil )
    {
      v5 = v3->_Right;
      if ( v5->_Isnil )
      {
        for ( i = v3->_Parent; !i->_Isnil; i = i->_Parent )
        {
          if ( v3 != i->_Right )
            break;
          v3 = i;
        }
        v3 = i;
      }
      else
      {
        v3 = v3->_Right;
        for ( j = v5->_Left; !j->_Isnil; j = j->_Left )
          v3 = j;
      }
    }
  }
  return result;
}

//----- (006ABF90) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_BETTING_ACK(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_BETTING_ACK *pkProto)
{
  PROTO_NC_DICE_TAISAI_BETTING_ACK *v2; // ebx@1
  MHDiceGameTask *v3; // esi@1
  int *v4; // eax@1
  int v5; // edi@1
  int v6; // eax@2
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *v7; // eax@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v8; // ebx@4
  int v9; // ecx@5
  DICE_TAISAI_BETTING v10; // eax@7
  BETTING_LEVEL_MONEY v11; // ST0C_4@9
  MiniHouseDiceGameWin *v12; // ecx@9
  DICE_TAISAI_BETTING v13; // ST08_4@9
  unsigned int v14; // eax@9
  PgFrameWork *v15; // esi@11
  const char *v16; // eax@11
  D3DXCOLOR *v17; // eax@11
  D3DXCOLOR v18; // ST04_16@11
  char *v19; // eax@11
  D3DXCOLOR v20; // [sp+Ch] [bp-1Ch]@11
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > v21; // [sp+1Ch] [bp-Ch]@4
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > > result; // [sp+20h] [bp-8h]@1
  std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *v23; // [sp+24h] [bp-4h]@1

  v2 = pkProto;
  v3 = this;
  v23 = (std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *)&this->map_BettingReq;
  v4 = (int *)std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::find(
                (std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > *)&this->map_BettingReq.comp,
                &result,
                &pkProto->nBettingIndex);
  v5 = *v4;
  if ( (std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *)*v4 == v3->map_BettingReq._Myhead )
  {
    v6 = 0;
  }
  else
  {
    if ( v2->nError == 7344 )
    {
      pkProto = (PROTO_NC_DICE_TAISAI_BETTING_ACK *)g_pkMainChar->m_kHandle;
      v7 = std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::find(
             (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v3->map_ParticipantInfo.comp,
             &v21,
             (const unsigned __int16 *)&pkProto);
      v8 = v7->_Ptr;
      if ( v7->_Ptr != v3->map_ParticipantInfo._Myhead )
      {
        v9 = *(_DWORD *)(v5 + 20);
        if ( v9 )
          v8->_Myval.second.m_BettingInfo.nBetMoney[*(_DWORD *)(v5 + 16)] += v9;
      }
      v10 = *(_DWORD *)(v5 + 16);
      if ( v8->_Myval.second.m_BettingInfo.nBetMoney[v10] )
        MiniHouseDiceGameWin::SetMarkButton(v3->m_pkDiceGameWin, v10, BET_BETTING, 0);
      v11 = v3->m_eBettingAmount;
      v12 = v3->m_pkDiceGameWin;
      v13 = *(_DWORD *)(v5 + 16);
      v3->m_eDiceSaiGameStatus = 1;
      MiniHouseDiceGameWin::ChipAnimation(v12, v13, v11, 0);
      v14 = EntryInfo::GetTotalBettingMoney(&v8->_Myval.second);
      MiniHouseDiceGameWin::SetMoneyWin(v3->m_pkDiceGameWin, v14);
    }
    else if ( v2->nError == 7354 )
    {
      v15 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      v16 = ErrMsgTable::GetErrMsg(v2->nError);
      GameFrameWork::AddSysMsg((GameFrameWork *)v15, v16);
      v17 = ColorInfoTable::GetDxColor(&v20, Center_Announcement);
      *(_QWORD *)&v18.r = *(_QWORD *)&v17->r;
      *(_QWORD *)&v18.b = *(_QWORD *)&v17->b;
      v19 = ErrMsgTable::GetErrMsg(v2->nError);
      GameFrameWork::AddAnnounceMsg((GameFrameWork *)v15, v5, (int)v15, v19, v18);
      PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)v15[28].m_kMsgQ.m_uiHead);
    }
    std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::erase(
      v23,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *)&pkProto,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > >)v5);
    v6 = 1;
  }
  return v6;
}

//----- (006AC0F0) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_BETTING_CMD(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_BETTING_CMD *pkProto)
{
  PROTO_NC_DICE_TAISAI_BETTING_CMD *v2; // esi@1
  MHDiceGameTask *v3; // edi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v4; // eax@2
  unsigned int v5; // ecx@3

  v2 = pkProto;
  v3 = this;
  if ( pkProto->nPlayerHnd == g_pkMainChar->m_kHandle )
    return 1;
  v4 = std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::find(
         (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&this->map_ParticipantInfo.comp,
         (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *)&pkProto,
         &pkProto->nPlayerHnd)->_Ptr;
  if ( v4 != v3->map_ParticipantInfo._Myhead )
  {
    v5 = v2->BettingInfo.nMoney;
    if ( v5 )
      v4->_Myval.second.m_BettingInfo.nBetMoney[v2->BettingInfo.nBetting] += v5;
    v3->m_eDiceSaiGameStatus = 1;
    MHDiceGameTask::CheckBettingChip(v3, v2->BettingInfo.nBetting, 0);
    return 1;
  }
  return 0;
}

//----- (006AC160) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_BETTING_CANCEL_ACK(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_BETTING_CANCEL_ACK *pkProto)
{
  PROTO_NC_DICE_TAISAI_BETTING_CANCEL_ACK *v2; // edi@1
  MHDiceGameTask *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *v4; // ebx@1
  int v5; // eax@2
  unsigned __int16 v6; // ax@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *v7; // eax@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v8; // edi@4
  DICE_TAISAI_BETTING v9; // eax@6
  unsigned int v10; // eax@8
  PROTO_NC_DICE_TAISAI_BETTING_CANCEL_ACK **v11; // eax@8
  PROTO_NC_DICE_TAISAI_BETTING_CANCEL_ACK *v12; // ecx@8
  char v13; // bl@8
  PROTO_NC_DICE_TAISAI_BETTING_CANCEL_ACK *v14; // edi@9
  signed int v15; // eax@10
  PROTO_NC_DICE_TAISAI_BETTING_CANCEL_ACK *v16; // ecx@10
  PgFrameWork *v17; // edi@17
  NiUnsharedGeometryGroup *v18; // eax@17
  D3DXCOLOR *v19; // eax@17
  D3DXCOLOR v20; // ST04_16@17
  char *v21; // eax@17
  unsigned __int16 v22; // dx@17
  MiniHouseDiceGameWin *v23; // ecx@17
  PgFrameWork *v24; // esi@20
  D3DXCOLOR *v25; // eax@20
  D3DXCOLOR v26; // ST04_16@20
  char *v27; // eax@20
  GameFrameWork *v28; // esi@24
  const char *v29; // eax@25
  D3DXCOLOR v30; // [sp+Ch] [bp-20h]@17
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > result; // [sp+1Ch] [bp-10h]@4
  std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *v32; // [sp+20h] [bp-Ch]@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > > itr; // [sp+24h] [bp-8h]@1
  DICE_TAISAI_BETTING bettingIdx; // [sp+28h] [bp-4h]@1

  v2 = pkProto;
  v3 = this;
  v32 = (std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *)&this->map_BettingReq;
  v4 = std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::find(
         (std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > *)&this->map_BettingReq.comp,
         (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > > *)&bettingIdx,
         &pkProto->nBettingCancelIndex)->_Ptr;
  itr._Ptr = v4;
  if ( v4 == v3->map_BettingReq._Myhead )
  {
    v5 = 0;
  }
  else
  {
    v6 = v2->nError;
    if ( v2->nError == 7360 )
    {
      pkProto = (PROTO_NC_DICE_TAISAI_BETTING_CANCEL_ACK *)g_pkMainChar->m_kHandle;
      v7 = std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::find(
             (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v3->map_ParticipantInfo.comp,
             &result,
             (const unsigned __int16 *)&pkProto);
      v8 = v7->_Ptr;
      if ( v7->_Ptr != v3->map_ParticipantInfo._Myhead )
        v8->_Myval.second.m_BettingInfo.nBetMoney[v4->_Myval.second.nBetting] -= v4->_Myval.second.nMoney;
      v9 = v4->_Myval.second.nBetting;
      if ( !v8->_Myval.second.m_BettingInfo.nBetMoney[v9] )
        MiniHouseDiceGameWin::SetMarkButton(v3->m_pkDiceGameWin, v9, 0, 0);
      bettingIdx = v4->_Myval.second.nBetting;
      v10 = EntryInfo::GetTotalBettingMoney(&v8->_Myval.second);
      MiniHouseDiceGameWin::SetMoneyWin(v3->m_pkDiceGameWin, v10);
      v11 = (PROTO_NC_DICE_TAISAI_BETTING_CANCEL_ACK **)v3->map_ParticipantInfo._Myhead;
      v12 = *v11;
      v13 = 0;
      pkProto = v12;
      if ( (PROTO_NC_DICE_TAISAI_BETTING_CANCEL_ACK **)v12 == v11 )
        goto LABEL_29;
      v14 = (PROTO_NC_DICE_TAISAI_BETTING_CANCEL_ACK *)v11;
      do
      {
        v15 = 0;
        v16 = v12 + 4;
        while ( !*(_DWORD *)v16 )
        {
          ++v15;
          ++v16;
          if ( v15 >= 52 )
            goto LABEL_15;
        }
        v13 = 1;
LABEL_15:
        std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >,std::_Iterator_base0> *)&pkProto);
        v12 = pkProto;
      }
      while ( pkProto != v14 );
      if ( !v13 )
      {
LABEL_29:
        v17 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
        v18 = TextData2::Get(0x8AA5ACB9);
        GameFrameWork::AddSysMsg((GameFrameWork *)v17, (const char *)v18);
        v19 = ColorInfoTable::GetDxColor(&v30, Center_Announcement);
        *(_QWORD *)&v20.r = *(_QWORD *)&v19->r;
        *(_QWORD *)&v20.b = *(_QWORD *)&v19->b;
        v21 = (char *)TextData2::Get(0x8AA5ACB9);
        GameFrameWork::AddAnnounceMsg((GameFrameWork *)v17, (int)v17, (int)v3, v21, v20);
        PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)v17[28].m_kMsgQ.m_uiHead);
        v22 = v3->map_ParticipantInfo._Mysize;
        v23 = v3->m_pkDiceGameWin;
        v3->m_eDiceSaiGameStatus = 0;
        v3->m_nNumberOfEntrant = v22;
        MiniHouseDiceGameWin::TurnOnLight(v23, 1, 0, 0);
      }
      MHDiceGameTask::CheckBettingChip(v3, bettingIdx, 0);
      v4 = itr._Ptr;
    }
    else if ( v6 == 7371 )
    {
      v24 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      v25 = ColorInfoTable::GetDxColor(&v30, Center_Announcement);
      *(_QWORD *)&v26.r = *(_QWORD *)&v25->r;
      *(_QWORD *)&v26.b = *(_QWORD *)&v25->b;
      v27 = ErrMsgTable::GetErrMsg(v2->nError);
      GameFrameWork::AddAnnounceMsg((GameFrameWork *)v24, (int)v2, (int)v24, v27, v26);
      PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)v24[28].m_kMsgQ.m_uiHead);
    }
    else if ( 7368 == v6 || 7372 == v6 || 7369 == v6 )
    {
      v28 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v28 )
      {
        v29 = fs("%d", v2->nError);
        GameFrameWork::AddSysMsg(v28, v29);
      }
    }
    std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::erase(
      v32,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *)&pkProto,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > >)v4);
    v5 = 1;
  }
  return v5;
}

//----- (006AC3D0) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_BETTING_CANCEL_CMD(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_BETTING_CANCEL_CMD *pkProto)
{
  PROTO_NC_DICE_TAISAI_BETTING_CANCEL_CMD *v2; // ebx@1
  MHDiceGameTask *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v4; // eax@2
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node **v5; // eax@3
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v6; // ecx@3
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v7; // edi@4
  signed int v8; // eax@5
  unsigned int *v9; // ecx@5
  PgFrameWork *v10; // edi@12
  NiUnsharedGeometryGroup *v11; // eax@12
  D3DXCOLOR *v12; // eax@12
  D3DXCOLOR v13; // ST04_16@12
  char *v14; // eax@12
  unsigned __int16 v15; // dx@12
  MiniHouseDiceGameWin *v16; // ecx@12
  D3DXCOLOR result; // [sp+Ch] [bp-14h]@12
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > itr; // [sp+1Ch] [bp-4h]@3

  v2 = pkProto;
  v3 = this;
  if ( pkProto->nPlayerHnd == g_pkMainChar->m_kHandle )
    return 1;
  v4 = std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::find(
         (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&this->map_ParticipantInfo.comp,
         (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *)&pkProto,
         &pkProto->nPlayerHnd)->_Ptr;
  if ( v4 != v3->map_ParticipantInfo._Myhead )
  {
    v4->_Myval.second.m_BettingInfo.nBetMoney[v2->BettingCancelInfo.nBetting] -= v2->BettingCancelInfo.nMoney;
    v5 = &v3->map_ParticipantInfo._Myhead->_Left;
    v6 = *v5;
    BYTE3(pkProto) = 0;
    itr._Ptr = v6;
    if ( (std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node **)v6 == v5 )
      goto LABEL_18;
    v7 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *)v5;
    do
    {
      v8 = 0;
      v9 = v6->_Myval.second.m_BettingInfo.nBetMoney;
      while ( !*v9 )
      {
        ++v8;
        ++v9;
        if ( v8 >= 52 )
          goto LABEL_10;
      }
      BYTE3(pkProto) = 1;
LABEL_10:
      std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >,std::_Iterator_base0> *)&itr._Ptr);
      v6 = itr._Ptr;
    }
    while ( itr._Ptr != v7 );
    if ( !BYTE3(pkProto) )
    {
LABEL_18:
      v10 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      v11 = TextData2::Get(0x8AA5ACB9);
      GameFrameWork::AddSysMsg((GameFrameWork *)v10, (const char *)v11);
      v12 = ColorInfoTable::GetDxColor(&result, Center_Announcement);
      *(_QWORD *)&v13.r = *(_QWORD *)&v12->r;
      *(_QWORD *)&v13.b = *(_QWORD *)&v12->b;
      v14 = (char *)TextData2::Get(0x8AA5ACB9);
      GameFrameWork::AddAnnounceMsg((GameFrameWork *)v10, (int)v10, (int)v3, v14, v13);
      PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)v10[28].m_kMsgQ.m_uiHead);
      v15 = v3->map_ParticipantInfo._Mysize;
      v16 = v3->m_pkDiceGameWin;
      v3->m_eDiceSaiGameStatus = 0;
      v3->m_nNumberOfEntrant = v15;
      MiniHouseDiceGameWin::TurnOnLight(v16, 1, 0, 0);
    }
    MHDiceGameTask::CheckBettingChip(v3, v2->BettingCancelInfo.nBetting, 0);
    return 1;
  }
  return 0;
}

//----- (006AC520) --------------------------------------------------------
int __usercall MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_LEAVE_REQ@<eax>(MHDiceGameTask *this@<ecx>, int a2@<edi>)
{
  MHDiceGameTask *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v3; // edx@1
  DICE_TAISAI_GAME_STATUS v4; // ebx@1
  signed int v5; // eax@1
  unsigned int *v6; // ecx@1
  char *v8; // eax@11
  NiD3DDefaultShader *v9; // eax@11
  PgFrameWork *v10; // esi@12
  NiUnsharedGeometryGroup *v11; // eax@12
  D3DXCOLOR *v12; // eax@12
  D3DXCOLOR v13; // ST04_16@12
  char *v14; // eax@12
  D3DXCOLOR v15; // [sp+Ch] [bp-18h]@12
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > result; // [sp+1Ch] [bp-8h]@1
  unsigned __int16 _Keyval[2]; // [sp+20h] [bp-4h]@1

  v2 = this;
  *(_DWORD *)_Keyval = g_pkMainChar->m_kHandle;
  v3 = std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::find(
         (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&this->map_ParticipantInfo.comp,
         &result,
         _Keyval)->_Ptr;
  v4 = v2->m_eDiceSaiGameStatus;
  v5 = 0;
  v6 = v3->_Myval.second.m_BettingInfo.nBetMoney;
  while ( !*v6 )
  {
    ++v5;
    ++v6;
    if ( v5 >= 52 )
      goto LABEL_4;
  }
  if ( !v2->m_spExitConfirmWin.m_pObject && v4 == 1 && !v2->m_bOutReserveOnMiniHouse )
  {
    v8 = (char *)TextData2::Get(0xCCF40DFD);
    v9 = (NiD3DDefaultShader *)MsgBox::Modeless(MSGBOX_OKCANCEL, v8);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spExitConfirmWin, v9);
    v2->m_spExitConfirmWin.m_pObject->vfptr->SetMsgHooker(&v2->m_spExitConfirmWin.m_pObject->vfptr, &v2->vfptr);
    return 1;
  }
LABEL_4:
  if ( v4 == 2 || v4 == 3 )
  {
    v3->_Myval.second.m_bReserveQuit = 1;
    v10 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v11 = TextData2::Get(0xDFD0BFCD);
    GameFrameWork::AddSysMsg((GameFrameWork *)v10, (const char *)v11);
    v12 = ColorInfoTable::GetDxColor(&v15, Center_Announcement);
    *(_QWORD *)&v13.r = *(_QWORD *)&v12->r;
    *(_QWORD *)&v13.b = *(_QWORD *)&v12->b;
    v14 = (char *)TextData2::Get(0xDFD0BFCD);
    GameFrameWork::AddAnnounceMsg((GameFrameWork *)v10, a2, (int)v10, v14, v13);
    PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)v10[28].m_kMsgQ.m_uiHead);
  }
  else if ( !v2->m_spExitConfirmWin.m_pObject )
  {
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Bu, 5u, 0, 0);
    return 1;
  }
  return 1;
}

//----- (006AC690) --------------------------------------------------------
void __userpurge MHDiceGameTask::OnIdle(MHDiceGameTask *this@<ecx>, int a2@<edi>, float fTime)
{
  MHDiceGameTask *v3; // esi@1
  char v4; // dl@5
  char v5; // dl@11
  double v6; // st7@16
  MHDiceGameTask::DICE_GAME_MODE v7; // eax@17
  MiniHouseDiceGameWin *v8; // ecx@19
  double v9; // st7@21
  float y; // ST14_4@21
  DICE_TAISAI_GAME_STATUS v11; // eax@22
  NiUnsharedGeometryGroup *v12; // ST10_4@23
  NiUnsharedGeometryGroup *v13; // ST10_4@26
  MiniHouseDiceGameWin *v14; // ecx@30
  MiniHouseDiceGameWin *v15; // ecx@31
  DICE_TAISAI_GAME_STATUS v16; // eax@37
  DICE_TAISAI_GAME_STATUS v17; // eax@41
  int v18; // edi@42
  double v19; // st7@42
  bool v20; // c0@42
  bool v21; // c3@42
  double v22; // st7@42
  MiniHouseDiceGameWin *v23; // eax@44
  NiRefObjectVtbl **v24; // ebx@44
  NiRefObjectVtbl *v25; // edx@44
  int v26; // eax@44
  NiRefObjectVtbl *v27; // edx@44
  float v28; // ST14_4@44
  double v29; // st7@44
  void (*v30)(void); // edx@44
  MiniHouseDiceGameWin *v31; // eax@44
  int v32; // edi@44
  NiAVObject *v33; // ebx@44
  float v34; // ST10_4@44
  bool v35; // zf@44
  double v36; // st7@49
  double v37; // st7@49
  double v38; // st6@49
  MiniHouseDiceGameWin *v39; // eax@53
  PgWinSpr *v40; // edi@53
  PgWinSpr *v41; // ebx@53
  float v42; // eax@53
  NiRefObjectVtbl *v43; // edx@53
  double v44; // st7@53
  void *(__thiscall *v45)(NiRefObject *, unsigned int); // eax@53
  float v46; // eax@53
  double v47; // st7@55
  DICE_TAISAI_BETTING v48; // edi@58
  char *v49; // ebx@58
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v50; // eax@62
  int v51; // ebx@63
  signed int v52; // edi@63
  DICE_TAISAI_BETTING v53; // eax@64
  mhDiceRankWin *v54; // ecx@72
  DICE_TAISAI_BETTING v55; // edi@76
  char *v56; // ebx@76
  signed int v57; // edi@80
  DICE_TAISAI_BETTING v58; // eax@81
  double v59; // st7@85
  SlotMachineWin *v60; // ecx@89
  double v61; // st7@89
  double v62; // st7@89
  float v63; // ST14_4@89
  GambleDiceGameWin *v64; // ecx@91
  double v65; // st7@93
  float v66; // ST14_4@93
  DICE_TAISAI_GAME_STATUS v67; // eax@94
  NiUnsharedGeometryGroup *v68; // ST10_4@95
  NiUnsharedGeometryGroup *v69; // ST10_4@98
  GambleDiceGameWin *v70; // ecx@102
  GambleDiceGameWin *v71; // ecx@103
  PgFrameWork *v72; // eax@106
  GambleWin *v73; // eax@107
  DICE_TAISAI_GAME_STATUS v74; // eax@111
  DICE_TAISAI_GAME_STATUS v75; // eax@115
  int v76; // eax@116
  double v77; // st7@116
  bool v78; // c0@116
  bool v79; // c3@116
  double v80; // st7@116
  GambleDiceGameWin *v81; // eax@118
  NiRefObjectVtbl **v82; // ebx@118
  NiRefObjectVtbl *v83; // edx@118
  int v84; // eax@118
  NiRefObjectVtbl *v85; // edx@118
  float v86; // ST14_4@118
  double v87; // st7@118
  void (*v88)(void); // edx@118
  GambleDiceGameWin *v89; // eax@118
  int v90; // edi@118
  NiAVObject *v91; // ebx@118
  float v92; // ST10_4@118
  PgFrameWork *v93; // eax@119
  GambleWin *v94; // eax@120
  double v95; // st7@125
  double v96; // st7@125
  double v97; // st6@125
  GambleDiceGameWin *v98; // eax@129
  PgWinSpr *v99; // edi@129
  NiAVObject *v100; // ebx@129
  float v101; // eax@129
  NiRefObjectVtbl *v102; // edx@129
  double v103; // st7@129
  void *(__thiscall *v104)(NiRefObject *, unsigned int); // eax@129
  float v105; // ST10_4@129
  float x; // ST0C_4@129
  double v107; // st7@131
  DICE_TAISAI_BETTING v108; // edi@134
  char *v109; // ebx@134
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v110; // eax@138
  int v111; // ebx@139
  signed int v112; // edi@139
  DICE_TAISAI_BETTING v113; // eax@140
  mhDiceRankWin *v114; // ecx@149
  DICE_TAISAI_BETTING v115; // edi@155
  char *v116; // ebx@155
  signed int v117; // edi@159
  DICE_TAISAI_BETTING v118; // eax@160
  double v119; // st7@164
  NpcDialogWin *v120; // ecx@167
  float fRemainTime; // [sp+10h] [bp-1F4h]@144
  NiPoint3 kPos; // [sp+24h] [bp-1E0h]@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > itr; // [sp+30h] [bp-1D4h]@3
  unsigned __int16 _Keyval[2]; // [sp+34h] [bp-1D0h]@16
  DiceTaiSaiPrizeWinning nDiceWinPos; // [sp+38h] [bp-1CCh]@58
  DiceTaiSaiPrizeWinning pPrizeWinningBet; // [sp+9Ch] [bp-168h]@63
  char pcScript[256]; // [sp+100h] [bp-104h]@22

  v3 = this;
  if ( !this->m_bIsEnterGameRoom )
  {
    if ( this->m_eDiceGameMode != 3 )
      goto LABEL_8;
    ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[6].SetAbStateProperty)(&kPos);
    kPos.x = kPos.x - v3->m_kDestPos.x;
    kPos.y = kPos.y - v3->m_kDestPos.y;
    kPos.z = 0.0 - v3->m_kDestPos.z;
    *(float *)&itr._Ptr = kPos.x * kPos.x + kPos.y * kPos.y + kPos.z * kPos.z;
    *(float *)&itr._Ptr = sqrt(*(float *)&itr._Ptr);
    if ( *(float *)&itr._Ptr >= 5.0 || v3->m_nNpcHandle == -1 )
    {
      if ( *(float *)&itr._Ptr <= 200.0 )
        goto LABEL_8;
    }
    else
    {
      v4 = v3->m_nWhereStand;
      LOWORD(itr._Ptr) = v3->m_nNpcHandle;
      BYTE2(itr._Ptr) = v4;
      MHDiceGameTask::NcGambleDiceTaisaiGameJoinReq(v3, (PROTO_NC_GAMBLE_DICE_TAISAI_GAME_JOIN_REQ *)&itr);
    }
    v3->m_eDiceGameMode = 0;
LABEL_8:
    if ( v3->m_eDiceGameMode == 5 )
    {
      ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[6].SetAbStateProperty)(&kPos);
      kPos.x = kPos.x - v3->m_kDestPos.x;
      kPos.y = kPos.y - v3->m_kDestPos.y;
      kPos.z = 0.0 - v3->m_kDestPos.z;
      *(float *)&itr._Ptr = kPos.x * kPos.x + kPos.y * kPos.y + kPos.z * kPos.z;
      *(float *)&itr._Ptr = sqrt(*(float *)&itr._Ptr);
      if ( *(float *)&itr._Ptr >= 30.0 || v3->m_nNpcHandle == -1 )
      {
        if ( *(float *)&itr._Ptr > 300.0 )
          v3->m_eDiceGameMode = 0;
      }
      else
      {
        v5 = v3->m_nWhereStand;
        LOWORD(itr._Ptr) = v3->m_nNpcHandle;
        BYTE2(itr._Ptr) = v5;
        MHDiceGameTask::NcGambleSlotmachineGameJoinReq((PROTO_NC_GAMBLE_SLOTMACHINE_GAME_JOIN_REQ *)&itr);
        v3->m_eDiceGameMode = 0;
      }
    }
    return;
  }
  if ( this->m_bIsResetTimer )
  {
    *(float *)_Keyval = this->m_kTimer.m_fObjectTime;
    *(float *)&itr._Ptr = fTime - this->m_kTimer.m_fStartTime;
    v6 = *(float *)&itr._Ptr;
    this->m_kTimer.m_fObjectTime = *(float *)&itr._Ptr;
    this->m_kTimer.m_fElapsedTime = v6 - *(float *)_Keyval;
  }
  else
  {
    this->m_kTimer.m_fStartTime = fTime;
    this->m_kTimer.m_fObjectTime = 0.0;
    this->m_kTimer.m_fElapsedTime = 0.0;
    this->m_bIsResetTimer = 1;
  }
  v7 = this->m_eDiceGameMode;
  if ( v7 == 2 )
  {
    v64 = this->m_pkGambleDiceGameWin;
    if ( v64 )
    {
      if ( v3->m_fAlphaValueOfDiceWindow < 1.0 )
      {
        *(float *)&itr._Ptr = v3->m_kTimer.m_fElapsedTime + v3->m_fAlphaValueOfDiceWindow;
        v65 = *(float *)&itr._Ptr;
        v3->m_fAlphaValueOfDiceWindow = *(float *)&itr._Ptr;
        v66 = v65;
        ((void (__stdcall *)(_DWORD))v64->vfptr[69].__vecDelDtor)(LODWORD(v66));
        if ( v3->m_fAlphaValueOfDiceWindow >= 1.0 )
        {
          ((void (__stdcall *)(signed int))v3->m_pkGambleDiceGameWin->vfptr[60].__vecDelDtor)(1);
          memset(pcScript, 0, 0x100u);
          v67 = v3->m_eDiceSaiGameStatus;
          if ( v67 )
          {
            if ( v67 == 3 || v67 != 2 )
            {
              v69 = TextData2::Get(0x2232FDAAu);
              sprintf(pcScript, "%s", v69);
            }
          }
          else
          {
            v68 = TextData2::Get(0x367E5072u);
            sprintf(pcScript, "%s", v68);
          }
          if ( v3->m_eDiceSaiGameStatus == 1 )
          {
            if ( !v3->m_bGameStartClick )
            {
              v70 = v3->m_pkGambleDiceGameWin;
              v3->m_bGameStartClick = 1;
              GambleDiceGameWin::GameStartEff(v70);
            }
          }
          else
          {
            NpcDialogWin::OpenNpcScriptDialog(v3->m_pkNpcDlgWin, 8669, pcScript, 0);
            PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkNpcDlgWin->vfptr);
          }
        }
      }
    }
    v71 = v3->m_pkGambleDiceGameWin;
    if ( !v71 || v3->m_bComeinMHOnResultStauts )
      goto LABEL_167;
    if ( v3->m_eDiceSaiGameStatus == DTGS_NONE_BETTING )
    {
      GambleDiceGameWin::UpdateTimeText(v71, 1, 0.0, 0);
      v72 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v72 )
      {
        v73 = (GambleWin *)v72[22].m_BackFrameID;
        if ( v73 )
          GambleWin::SetEnableLeaveBtn(v73, 1);
      }
    }
    if ( v3->m_eDiceSaiGameMode )
    {
      v98 = v3->m_pkGambleDiceGameWin;
      v99 = v98->m_spTimerFill.m_pObject;
      v100 = (NiAVObject *)&v98->m_spTimer.m_pObject->vfptr;
      v101 = COERCE_FLOAT(((int (__thiscall *)(PgWinSpr *))v99->vfptr[42].__vecDelDtor)(v99));
      v102 = v99->vfptr;
      *(float *)_Keyval = v101;
      v103 = (double)SLODWORD(v101);
      v104 = v102[41].__vecDelDtor;
      *(float *)_Keyval = v103 - 10.0;
      v105 = *(float *)_Keyval;
      *(float *)_Keyval = COERCE_FLOAT(((int (__thiscall *)(PgWinSpr *))v104)(v99));
      x = (double)*(signed int *)_Keyval;
      NiAVObject::SetTranslate(v100, x, v105, 1.0);
      v3->m_fTimerPosOnPregress = 0.0;
    }
    else
    {
      if ( !v3->m_IsBettingStartPlaying )
      {
        v74 = v3->m_eDiceSaiGameStatus;
        if ( (v74 == 1 || v74 == DTGS_NONE_BETTING) && v3->m_kTimer.m_fObjectTime > 2.0 )
        {
          v3->m_IsBettingStartPlaying = 1;
          SoundMgr::PlayInterfaceSound(&g_kSoundMgr, DiceStartBetting);
        }
      }
      v75 = v3->m_eDiceSaiGameStatus;
      if ( v75 == 1 )
      {
        v76 = ((int (__stdcall *)(int))v3->m_pkGambleDiceGameWin->m_spTimerFill.m_pObject->vfptr[36].__vecDelDtor)(a2);
        v3->m_fClockAlramTime = v3->m_kTimer.m_fElapsedTime + v3->m_fClockAlramTime;
        LODWORD(kPos.z) = v76 - 25;
        *(float *)_Keyval = (double)(unsigned int)(v76 - 25);
        v77 = v3->m_fTimerPosOnPregress;
        v78 = *(float *)_Keyval < v77;
        v79 = *(float *)_Keyval == v77;
        v80 = *(float *)_Keyval;
        if ( !v78 && !v79 )
        {
          *(_DWORD *)_Keyval = v3->m_nLengthInOneGame;
          v3->m_fTimerPosOnPregress = v80 / (double)*(signed int *)_Keyval * v3->m_kTimer.m_fElapsedTime
                                    + v3->m_fTimerPosOnPregress;
        }
        v81 = v3->m_pkGambleDiceGameWin;
        v82 = &v81->m_spTimerFill.m_pObject->vfptr;
        v83 = *v82;
        itr._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *)v81->m_spTimer.m_pObject;
        v84 = ((int (__thiscall *)(NiRefObjectVtbl **))v83[42].__vecDelDtor)(v82);
        v85 = *v82;
        *(_DWORD *)_Keyval = v84 - 10;
        v86 = (double)(v84 - 10);
        *(float *)_Keyval = (double)((int (__thiscall *)(NiRefObjectVtbl **))v85[41].__vecDelDtor)(v82)
                          + v3->m_fTimerPosOnPregress;
        NiAVObject::SetTranslate((NiAVObject *)itr._Ptr, *(float *)_Keyval, v86, 1.0);
        v87 = v3->m_fTimerPosOnPregress;
        v88 = (void (*)(void))v3->m_pkGambleDiceGameWin->m_spTimerBack.m_pObject->vfptr[117].__vecDelDtor;
        *(_DWORD *)_Keyval = HIWORD(itr._Ptr) | 0xC00;
        *(_QWORD *)&kPos.y = (signed __int64)v87;
        v88();
        v89 = v3->m_pkGambleDiceGameWin;
        v90 = (int)v89->m_spTimerFill.m_pObject;
        v91 = (NiAVObject *)&v89->m_spTimerBack.m_pObject->vfptr;
        *(float *)_Keyval = COERCE_FLOAT((*(int (__thiscall **)(PgWinSpr *))(*(_DWORD *)v90 + 168))(v89->m_spTimerFill.m_pObject));
        v92 = (double)*(signed int *)_Keyval;
        *(float *)_Keyval = (double)(*(int (__thiscall **)(int))(*(_DWORD *)v90 + 164))(v90)
                          + v3->m_fTimerPosOnPregress
                          + 8.0;
        NiAVObject::SetTranslate(v91, *(float *)_Keyval, v92, 1.0);
        v35 = v3->m_IsClockCastPlaying == 0;
        v3->m_fClockCastTime = v3->m_kTimer.m_fElapsedTime + v3->m_fClockCastTime;
        if ( v35 )
        {
          v3->m_IsClockCastPlaying = 1;
          SoundMgr::PlayInterfaceSound(&g_kSoundMgr, Cast_Clock);
          v3->m_fClockCastTime = 0.0;
          v93 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
          if ( v93 )
          {
            v94 = (GambleWin *)v93[22].m_BackFrameID;
            if ( v94 )
              GambleWin::SetEnableLeaveBtn(v94, 0);
          }
        }
        if ( !v3->m_IsClockAlramPlaying )
        {
          *(_DWORD *)_Keyval = v3->m_nLengthInOneGame;
          if ( (double)*(signed int *)_Keyval - v3->m_fClockAlramTime < 5.0 )
          {
            ((void (*)(void))g_kSoundMgr.m_pkInterfaceGroup->vfptr->StopAllSound)();
            ((void (*)(void))g_kSoundMgr.m_pkInterfaceGroup->vfptr->UnloadAllSound)();
            SoundMgr::PlayInterfaceSound(&g_kSoundMgr, Cast_Alarm);
            v3->m_IsClockAlramPlaying = 1;
          }
        }
        v95 = v3->m_kTimer.m_fElapsedTime + v3->m_fDiplayLightTime;
        *(_DWORD *)_Keyval = v3->m_nLengthInOneGame;
        *(float *)&itr._Ptr = v95;
        v96 = *(float *)&itr._Ptr;
        v3->m_fDiplayLightTime = *(float *)&itr._Ptr;
        v97 = (double)*(signed int *)_Keyval;
        *(float *)&itr._Ptr = v97 - v3->m_fClockAlramTime;
        if ( *(float *)&itr._Ptr / v97 * 0.1000000014901161 < v96 )
        {
          GambleDiceGameWin::TurnOnLight(v3->m_pkGambleDiceGameWin, 0, 1, 0);
          v3->m_fDiplayLightTime = 0.0;
          GambleDiceGameWin::UpdateTimeText(v3->m_pkGambleDiceGameWin, v90, *(float *)&itr._Ptr, 1);
        }
      }
      else if ( v75 == 3 )
      {
        v3->m_fTimerPosOnPregress = 0.0;
        GambleDiceGameWin::UpdateTimeText(v3->m_pkGambleDiceGameWin, 1, 0.0, 0);
      }
    }
    if ( v3->m_eDiceSaiGameStatus != 3 )
      goto LABEL_167;
    PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    *(float *)&itr._Ptr = v3->m_kTimer.m_fElapsedTime + v3->m_fDiceResultTime;
    v107 = *(float *)&itr._Ptr;
    v3->m_fDiceResultTime = *(float *)&itr._Ptr;
    if ( v107 > 0.30000001 && !v3->m_bIsNonBettingOver )
    {
      *(_DWORD *)_Keyval = g_pkMainChar->m_kHandle;
      itr._Ptr = std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::find(
                   (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v3->map_ParticipantInfo.comp,
                   (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *)&kPos.z,
                   _Keyval)->_Ptr;
      if ( itr._Ptr == v3->map_ParticipantInfo._Myhead )
        return;
      DiceTaiSai::get_PrizeWinningBet(&v3->m_DiceTaiSai, v3->m_nDiceVariety, &nDiceWinPos);
      v108 = 0;
      v109 = (char *)&itr._Ptr->_Myval.second;
      do
      {
        if ( !*(_DWORD *)v109 )
          GambleDiceGameWin::ShowResult(v3->m_pkGambleDiceGameWin, v108, 0, 1);
        ++v108;
        v109 += 4;
      }
      while ( (signed int)v108 < 52 );
      v110 = itr._Ptr;
      v3->m_bIsNonBettingOver = 1;
      if ( v110 != v3->map_ParticipantInfo._Myhead )
      {
        v111 = 0;
        DiceTaiSai::get_PrizeWinningBet(&v3->m_DiceTaiSai, v3->m_nDiceVariety, &pPrizeWinningBet);
        v112 = 0;
        if ( pPrizeWinningBet.nPrizeWinningBetCnt <= 0u )
          goto LABEL_182;
        do
        {
          v113 = pPrizeWinningBet.PrizeWinningBetInfo[v112].nBetting;
          if ( itr._Ptr->_Myval.second.m_BettingInfo.nBetMoney[v113] )
            v111 += DiceTaiSaiDividind::get_DividindMoney(
                      &v3->m_GBDividind,
                      v113,
                      pPrizeWinningBet.PrizeWinningBetInfo[v112].nSingle,
                      itr._Ptr->_Myval.second.m_BettingInfo.nBetMoney[v113]);
          ++v112;
        }
        while ( v112 < (unsigned __int8)pPrizeWinningBet.nPrizeWinningBetCnt );
        if ( v111 )
          LODWORD(fRemainTime) = v111 - v111 * (unsigned int)v3->m_nGetSystemTaxRate / 0x3E8;
        else
LABEL_182:
          fRemainTime = 0.0;
        GambleDiceGameWin::SetMoneyWin(v3->m_pkGambleDiceGameWin, LODWORD(fRemainTime));
      }
    }
    if ( v3->m_fDiceResultTime <= 3.5 )
      goto LABEL_167;
    if ( !v3->m_bIsResultOver )
    {
      v114 = v3->m_pkDiceRankWin;
      if ( v114 && (unsigned __int8)((int (*)(void))v114->vfptr[65].__vecDelDtor)() == 1 )
      {
        if ( v3->m_pkDiceRankWin->m_nCurSelTab == 1 )
          MHDiceGameTask::NcGambleDiceTaisaiAllRankReq();
        else
          MHDiceGameTask::NcGambleDiceTaisaiCurrRankReq();
      }
      *(_DWORD *)_Keyval = g_pkMainChar->m_kHandle;
      itr._Ptr = std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::find(
                   (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v3->map_ParticipantInfo.comp,
                   (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *)&kPos.z,
                   _Keyval)->_Ptr;
      if ( itr._Ptr == v3->map_ParticipantInfo._Myhead )
        return;
      DiceTaiSai::get_PrizeWinningBet(&v3->m_DiceTaiSai, v3->m_nDiceVariety, &pPrizeWinningBet);
      v115 = 0;
      v116 = (char *)&itr._Ptr->_Myval.second;
      do
      {
        if ( *(_DWORD *)v116 )
          GambleDiceGameWin::ShowResult(v3->m_pkGambleDiceGameWin, v115, 0, 0);
        ++v115;
        v116 += 4;
      }
      while ( (signed int)v115 < 52 );
      v117 = 0;
      if ( pPrizeWinningBet.nPrizeWinningBetCnt )
      {
        do
        {
          v118 = pPrizeWinningBet.PrizeWinningBetInfo[v117].nBetting;
          if ( itr._Ptr->_Myval.second.m_BettingInfo.nBetMoney[v118] )
            GambleDiceGameWin::ShowResult(v3->m_pkGambleDiceGameWin, v118, 1, 0);
          ++v117;
        }
        while ( v117 < (unsigned __int8)pPrizeWinningBet.nPrizeWinningBetCnt );
      }
      v3->m_bIsResultOver = 1;
    }
    *(float *)&itr._Ptr = v3->m_kTimer.m_fElapsedTime + v3->m_fDiplayLightTime;
    v119 = *(float *)&itr._Ptr;
    v3->m_fDiplayLightTime = *(float *)&itr._Ptr;
    if ( v119 > 0.1000000014901161 )
    {
      GambleDiceGameWin::TurnOnLight(v3->m_pkGambleDiceGameWin, 0, 0, 1);
      goto LABEL_166;
    }
LABEL_167:
    v120 = v3->m_pkNpcDlgWin;
    if ( v120 && (unsigned __int8)((int (*)(void))v120->vfptr[65].__vecDelDtor)() == 1 )
    {
      if ( g_pkMouse->m_akButtons[0].m_bPressed )
      {
        if ( v3->m_eDiceSaiGameStatus == DTGS_NONE_BETTING )
        {
          NpcDialogWin::CloseDialog(v3->m_pkNpcDlgWin);
          if ( !v3->m_bGameStartClick )
          {
            v3->m_bGameStartClick = 1;
            if ( v3->m_eDiceGameMode == 1 )
              MiniHouseDiceGameWin::GameStartEff(v3->m_pkDiceGameWin);
            else
              GambleDiceGameWin::GameStartEff(v3->m_pkGambleDiceGameWin);
          }
        }
      }
      if ( v3->m_eDiceSaiGameStatus == 1 )
      {
        NpcDialogWin::CloseDialog(v3->m_pkNpcDlgWin);
        if ( !v3->m_bGameStartClick )
        {
          v3->m_bGameStartClick = 1;
          if ( v3->m_eDiceGameMode == 1 )
            MiniHouseDiceGameWin::GameStartEff(v3->m_pkDiceGameWin);
          else
            GambleDiceGameWin::GameStartEff(v3->m_pkGambleDiceGameWin);
        }
      }
    }
    return;
  }
  if ( v7 == 4 )
  {
    if ( this->m_fAlphaValueOfDiceWindow < 1.0 )
    {
      v61 = this->m_kTimer.m_fElapsedTime + this->m_fAlphaValueOfDiceWindow;
      v60 = this->m_pkSlotMachineWin;
      *(float *)&itr._Ptr = v61;
      v62 = *(float *)&itr._Ptr;
      v3->m_fAlphaValueOfDiceWindow = *(float *)&itr._Ptr;
      v63 = v62;
      ((void (__stdcall *)(_DWORD))v60->vfptr[69].__vecDelDtor)(LODWORD(v63));
      if ( v3->m_fAlphaValueOfDiceWindow >= 1.0 )
        v3->m_pkSlotMachineWin->vfptr[60].__vecDelDtor((NiRefObject *)v3->m_pkSlotMachineWin, 1u);
    }
  }
  else
  {
    v8 = this->m_pkDiceGameWin;
    if ( v8 )
    {
      if ( v3->m_fAlphaValueOfDiceWindow < 1.0 )
      {
        *(float *)&itr._Ptr = v3->m_kTimer.m_fElapsedTime + v3->m_fAlphaValueOfDiceWindow;
        v9 = *(float *)&itr._Ptr;
        v3->m_fAlphaValueOfDiceWindow = *(float *)&itr._Ptr;
        y = v9;
        ((void (__stdcall *)(_DWORD))v8->vfptr[69].__vecDelDtor)(LODWORD(y));
        if ( v3->m_fAlphaValueOfDiceWindow >= 1.0 )
        {
          ((void (__stdcall *)(signed int))v3->m_pkDiceGameWin->vfptr[60].__vecDelDtor)(1);
          memset(pcScript, 0, 0x100u);
          v11 = v3->m_eDiceSaiGameStatus;
          if ( v11 )
          {
            if ( v11 == 3 || v11 != 2 )
            {
              v13 = TextData2::Get(0x2232FDAAu);
              sprintf(pcScript, "%s", v13);
            }
          }
          else
          {
            v12 = TextData2::Get(0x367E5072u);
            sprintf(pcScript, "%s", v12);
          }
          if ( v3->m_eDiceSaiGameStatus == 1 )
          {
            if ( !v3->m_bGameStartClick )
            {
              v14 = v3->m_pkDiceGameWin;
              v3->m_bGameStartClick = 1;
              MiniHouseDiceGameWin::GameStartEff(v14);
            }
          }
          else
          {
            NpcDialogWin::OpenNpcScriptDialog(v3->m_pkNpcDlgWin, 260, pcScript, 0);
            PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkNpcDlgWin->vfptr);
          }
        }
      }
    }
    v15 = v3->m_pkDiceGameWin;
    if ( !v15 || v3->m_bComeinMHOnResultStauts )
      goto LABEL_167;
    if ( v3->m_eDiceSaiGameStatus == DTGS_NONE_BETTING )
      MiniHouseDiceGameWin::UpdateTimeText(v15, 1, 0.0, 0);
    if ( v3->m_eDiceSaiGameMode )
    {
      v39 = v3->m_pkDiceGameWin;
      v40 = v39->m_spTimerFill.m_pObject;
      v41 = v39->m_spTimer.m_pObject;
      v42 = COERCE_FLOAT(((int (__thiscall *)(PgWinSpr *))v40->vfptr[41].__vecDelDtor)(v40));
      v43 = v40->vfptr;
      *(float *)_Keyval = v42;
      v44 = (double)SLODWORD(v42);
      v45 = v43[42].__vecDelDtor;
      kPos.x = v44;
      v46 = COERCE_FLOAT(((int (__thiscall *)(PgWinSpr *))v45)(v40));
      *(float *)_Keyval = v46;
      v41->m_kLocal.m_Translate.x = kPos.x;
      kPos.y = (double)SLODWORD(v46) - 10.0;
      v41->m_kLocal.m_Translate.y = kPos.y;
      kPos.z = 1.0;
      v41->m_kLocal.m_Translate.z = 1.0;
      v3->m_fTimerPosOnPregress = 0.0;
    }
    else
    {
      if ( !v3->m_IsBettingStartPlaying )
      {
        v16 = v3->m_eDiceSaiGameStatus;
        if ( (v16 == 1 || v16 == DTGS_NONE_BETTING) && v3->m_kTimer.m_fObjectTime > 2.0 )
        {
          v3->m_IsBettingStartPlaying = 1;
          SoundMgr::PlayInterfaceSound(&g_kSoundMgr, DiceStartBetting);
        }
      }
      v17 = v3->m_eDiceSaiGameStatus;
      if ( v17 == 1 )
      {
        v18 = ((int (__stdcall *)(int))v3->m_pkDiceGameWin->m_spTimerFill.m_pObject->vfptr[36].__vecDelDtor)(a2) - 25;
        v3->m_fClockAlramTime = v3->m_kTimer.m_fElapsedTime + v3->m_fClockAlramTime;
        *(float *)_Keyval = (double)(unsigned int)v18;
        v19 = v3->m_fTimerPosOnPregress;
        v20 = *(float *)_Keyval < v19;
        v21 = *(float *)_Keyval == v19;
        v22 = *(float *)_Keyval;
        if ( !v20 && !v21 )
        {
          *(_DWORD *)_Keyval = v3->m_nLengthInOneGame;
          v3->m_fTimerPosOnPregress = v22 / (double)*(signed int *)_Keyval * v3->m_kTimer.m_fElapsedTime
                                    + v3->m_fTimerPosOnPregress;
        }
        v23 = v3->m_pkDiceGameWin;
        v24 = &v23->m_spTimerFill.m_pObject->vfptr;
        v25 = *v24;
        itr._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *)v23->m_spTimer.m_pObject;
        v26 = ((int (__thiscall *)(NiRefObjectVtbl **))v25[42].__vecDelDtor)(v24);
        v27 = *v24;
        *(_DWORD *)_Keyval = v26 - 10;
        v28 = (double)(v26 - 10);
        *(float *)_Keyval = (double)((int (__thiscall *)(NiRefObjectVtbl **))v27[41].__vecDelDtor)(v24)
                          + v3->m_fTimerPosOnPregress;
        NiAVObject::SetTranslate((NiAVObject *)itr._Ptr, *(float *)_Keyval, v28, 1.0);
        v29 = v3->m_fTimerPosOnPregress;
        v30 = (void (*)(void))v3->m_pkDiceGameWin->m_spTimerBack.m_pObject->vfptr[117].__vecDelDtor;
        *(_DWORD *)_Keyval = HIWORD(itr._Ptr) | 0xC00;
        *(_QWORD *)&kPos.y = (signed __int64)v29;
        v30();
        v31 = v3->m_pkDiceGameWin;
        v32 = (int)v31->m_spTimerFill.m_pObject;
        v33 = (NiAVObject *)&v31->m_spTimerBack.m_pObject->vfptr;
        *(float *)_Keyval = COERCE_FLOAT((*(int (__thiscall **)(PgWinSpr *))(*(_DWORD *)v32 + 168))(v31->m_spTimerFill.m_pObject));
        v34 = (double)*(signed int *)_Keyval;
        *(float *)_Keyval = (double)(*(int (__thiscall **)(int))(*(_DWORD *)v32 + 164))(v32)
                          + v3->m_fTimerPosOnPregress
                          + 8.0;
        NiAVObject::SetTranslate(v33, *(float *)_Keyval, v34, 1.0);
        v35 = v3->m_IsClockCastPlaying == 0;
        v3->m_fClockCastTime = v3->m_kTimer.m_fElapsedTime + v3->m_fClockCastTime;
        if ( v35 )
        {
          v3->m_IsClockCastPlaying = 1;
          SoundMgr::PlayInterfaceSound(&g_kSoundMgr, Cast_Clock);
          v3->m_fClockCastTime = 0.0;
        }
        if ( !v3->m_IsClockAlramPlaying )
        {
          *(_DWORD *)_Keyval = v3->m_nLengthInOneGame;
          if ( (double)*(signed int *)_Keyval - v3->m_fClockAlramTime < 5.0 )
          {
            ((void (*)(void))g_kSoundMgr.m_pkInterfaceGroup->vfptr->StopAllSound)();
            ((void (*)(void))g_kSoundMgr.m_pkInterfaceGroup->vfptr->UnloadAllSound)();
            SoundMgr::PlayInterfaceSound(&g_kSoundMgr, Cast_Alarm);
            v3->m_IsClockAlramPlaying = 1;
          }
        }
        v36 = v3->m_kTimer.m_fElapsedTime + v3->m_fDiplayLightTime;
        *(_DWORD *)_Keyval = v3->m_nLengthInOneGame;
        *(float *)&itr._Ptr = v36;
        v37 = *(float *)&itr._Ptr;
        v3->m_fDiplayLightTime = *(float *)&itr._Ptr;
        v38 = (double)*(signed int *)_Keyval;
        *(float *)&itr._Ptr = v38 - v3->m_fClockAlramTime;
        if ( *(float *)&itr._Ptr / v38 * 0.1000000014901161 < v37 )
        {
          MiniHouseDiceGameWin::TurnOnLight(v3->m_pkDiceGameWin, 0, 1, 0);
          v3->m_fDiplayLightTime = 0.0;
          MiniHouseDiceGameWin::UpdateTimeText(v3->m_pkDiceGameWin, v32, *(float *)&itr._Ptr, 1);
        }
      }
      else if ( v17 == 3 )
      {
        v3->m_fTimerPosOnPregress = 0.0;
        MiniHouseDiceGameWin::UpdateTimeText(v3->m_pkDiceGameWin, 1, 0.0, 0);
      }
    }
    if ( v3->m_eDiceSaiGameStatus != 3 )
      goto LABEL_167;
    PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    *(float *)&itr._Ptr = v3->m_kTimer.m_fElapsedTime + v3->m_fDiceResultTime;
    v47 = *(float *)&itr._Ptr;
    v3->m_fDiceResultTime = *(float *)&itr._Ptr;
    if ( v47 > 0.30000001 && !v3->m_bIsNonBettingOver )
    {
      *(_DWORD *)_Keyval = g_pkMainChar->m_kHandle;
      itr._Ptr = std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::find(
                   (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v3->map_ParticipantInfo.comp,
                   (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *)&kPos.z,
                   _Keyval)->_Ptr;
      if ( itr._Ptr == v3->map_ParticipantInfo._Myhead )
        return;
      DiceTaiSai::get_PrizeWinningBet(&v3->m_DiceTaiSai, v3->m_nDiceVariety, &nDiceWinPos);
      v48 = 0;
      v49 = (char *)&itr._Ptr->_Myval.second;
      do
      {
        if ( !*(_DWORD *)v49 )
          MiniHouseDiceGameWin::ShowResult(v3->m_pkDiceGameWin, v48, 0, 1);
        ++v48;
        v49 += 4;
      }
      while ( (signed int)v48 < 52 );
      v50 = itr._Ptr;
      v3->m_bIsNonBettingOver = 1;
      if ( v50 != v3->map_ParticipantInfo._Myhead )
      {
        v51 = 0;
        DiceTaiSai::get_PrizeWinningBet(&v3->m_DiceTaiSai, v3->m_nDiceVariety, &pPrizeWinningBet);
        v52 = 0;
        if ( pPrizeWinningBet.nPrizeWinningBetCnt <= 0u )
          goto LABEL_183;
        do
        {
          v53 = pPrizeWinningBet.PrizeWinningBetInfo[v52].nBetting;
          if ( itr._Ptr->_Myval.second.m_BettingInfo.nBetMoney[v53] )
            v51 += DiceTaiSaiDividind::get_DividindMoney(
                     &v3->m_Dividind,
                     v53,
                     pPrizeWinningBet.PrizeWinningBetInfo[v52].nSingle,
                     itr._Ptr->_Myval.second.m_BettingInfo.nBetMoney[v53]);
          ++v52;
        }
        while ( v52 < (unsigned __int8)pPrizeWinningBet.nPrizeWinningBetCnt );
        if ( v51 )
          MiniHouseDiceGameWin::SetMoneyWin(
            v3->m_pkDiceGameWin,
            v51 - v51 * (unsigned int)v3->m_nGetSystemTaxRate / 0x3E8);
        else
LABEL_183:
          MiniHouseDiceGameWin::SetMoneyWin(v3->m_pkDiceGameWin, 0);
      }
    }
    if ( v3->m_fDiceResultTime <= 3.5 )
      goto LABEL_167;
    if ( v3->m_bIsResultOver )
    {
LABEL_85:
      *(float *)&itr._Ptr = v3->m_kTimer.m_fElapsedTime + v3->m_fDiplayLightTime;
      v59 = *(float *)&itr._Ptr;
      v3->m_fDiplayLightTime = *(float *)&itr._Ptr;
      if ( v59 > 0.1000000014901161 )
      {
        MiniHouseDiceGameWin::TurnOnLight(v3->m_pkDiceGameWin, 0, 0, 1);
LABEL_166:
        v3->m_fDiplayLightTime = 0.0;
        goto LABEL_167;
      }
      goto LABEL_167;
    }
    v54 = v3->m_pkDiceRankWin;
    if ( v54 && (unsigned __int8)((int (*)(void))v54->vfptr[65].__vecDelDtor)() == 1 )
      MHDiceGameTask::Recv_NC_DICE_TAISAI_RANK_REQ(0);
    *(_DWORD *)_Keyval = g_pkMainChar->m_kHandle;
    itr._Ptr = std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::find(
                 (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v3->map_ParticipantInfo.comp,
                 (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *)&kPos.z,
                 _Keyval)->_Ptr;
    if ( itr._Ptr != v3->map_ParticipantInfo._Myhead )
    {
      DiceTaiSai::get_PrizeWinningBet(&v3->m_DiceTaiSai, v3->m_nDiceVariety, &pPrizeWinningBet);
      v55 = 0;
      v56 = (char *)&itr._Ptr->_Myval.second;
      do
      {
        if ( *(_DWORD *)v56 )
          MiniHouseDiceGameWin::ShowResult(v3->m_pkDiceGameWin, v55, 0, 0);
        ++v55;
        v56 += 4;
      }
      while ( (signed int)v55 < 52 );
      v57 = 0;
      if ( pPrizeWinningBet.nPrizeWinningBetCnt )
      {
        do
        {
          v58 = pPrizeWinningBet.PrizeWinningBetInfo[v57].nBetting;
          if ( itr._Ptr->_Myval.second.m_BettingInfo.nBetMoney[v58] )
            MiniHouseDiceGameWin::ShowResult(v3->m_pkDiceGameWin, v58, 1, 0);
          ++v57;
        }
        while ( v57 < (unsigned __int8)pPrizeWinningBet.nPrizeWinningBetCnt );
      }
      v3->m_bIsResultOver = 1;
      goto LABEL_85;
    }
  }
}
// 6AC690: could not find valid save-restore pair for edi
// A8C4A8: using guessed type struct NiInputMouse *g_pkMouse;

//----- (006ADA60) --------------------------------------------------------
unsigned int __thiscall MHDiceGameTask::GetAbleMoney(MHDiceGameTask *this, DICE_TAISAI_BETTING index, unsigned int EnableMaximuMoney)
{
  MHDiceGameTask *v3; // esi@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *v4; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v5; // ebx@1
  unsigned int v7; // edx@3
  MHDiceGameTask::DICE_GAME_MODE v8; // ecx@3
  unsigned int v9; // eax@7
  unsigned int v10; // edi@18
  unsigned __int64 v11; // rax@22
  unsigned int v12; // esi@22
  unsigned int v13; // esi@24
  unsigned int v14; // eax@24
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > result; // [sp+8h] [bp-Ch]@1
  unsigned __int16 _Keyval[2]; // [sp+10h] [bp-4h]@1

  v3 = this;
  *(_DWORD *)_Keyval = g_pkMainChar->m_kHandle;
  v4 = std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::find(
         (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&this->map_ParticipantInfo.comp,
         &result,
         _Keyval);
  v5 = v4->_Ptr;
  if ( v4->_Ptr == v3->map_ParticipantInfo._Myhead )
    return 0;
  v7 = v5->_Myval.second.m_BettingInfo.nBetMoney[index];
  v8 = v3->m_eDiceGameMode;
  if ( v8 != 2 && v8 != 4 )
  {
    switch ( v3->m_eBettingAmount )
    {
      case 5:
        return EnableMaximuMoney - v7;
      case 0:
$LN18_65:
        v9 = 100;
        goto LABEL_15;
      case 4:
        v9 = 1000000;
        goto LABEL_15;
      case 3:
        v9 = 100000;
        goto LABEL_15;
      case 2:
LABEL_12:
        v9 = 10000;
        goto LABEL_15;
      case 1:
LABEL_13:
        v9 = 1000;
        goto LABEL_15;
      default:
        break;
    }
  }
  else
  {
    switch ( v3->m_eBettingAmount )
    {
      case 4:
        return EnableMaximuMoney - v7;
      case 1:
        v9 = 500;
        goto LABEL_15;
      case 0:
        goto $LN18_65;
      case 3:
        goto LABEL_12;
      case 2:
        goto LABEL_13;
      default:
        break;
    }
  }
  v9 = EnableMaximuMoney;
LABEL_15:
  if ( PgWin::ms_bCtrlPressed )
    v9 = EnableMaximuMoney;
  if ( v9 + v7 <= EnableMaximuMoney )
    v10 = v9;
  else
    v10 = EnableMaximuMoney - v7;
  if ( v8 != 2 && v8 != 4 )
  {
    v13 = EntryInfo::GetTotalBettingMoney(&v5->_Myval.second);
    v14 = User::GetMoney(&g_kUser) - v13;
    if ( v10 > v14 )
      v10 = v14;
  }
  else
  {
    v11 = User::Coin(&g_kUser);
    *(_DWORD *)_Keyval = HIDWORD(v11);
    v12 = v11 - EntryInfo::GetTotalBettingMoney(&v5->_Myval.second);
    if ( v10 > v12 )
      return v12;
  }
  return v10;
}
// B6474D: using guessed type bool PgWin::ms_bCtrlPressed;

//----- (006ADBC0) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_BETTING_INFO_CMD(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_GAME_BETTING_INFO_CMD *pkProto)
{
  PROTO_NC_DICE_TAISAI_GAME_BETTING_INFO_CMD *v2; // ebx@1
  MHDiceGameTask *v3; // edi@1
  int v4; // esi@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v5; // eax@5
  int v6; // ecx@6
  int v7; // eax@10
  int v8; // esi@15
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v9; // eax@16
  int v10; // ecx@17
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > result; // [sp+Ch] [bp-4h]@5
  int i; // [sp+18h] [bp+8h]@3
  int ia; // [sp+18h] [bp+8h]@14

  v2 = pkProto;
  v3 = this;
  if ( !(pkProto->PartMask & 1) || this->m_eStatusOfInfoTrans )
  {
    v7 = 1;
    if ( pkProto->PartMask & 2 && this->m_eStatusOfInfoTrans == 1 )
    {
      ia = 0;
      if ( v2->nBettingCnt > 0u )
      {
        v8 = (int)&v2[1].nBettingCnt + 1;
        do
        {
          v9 = std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::find(
                 (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v3->map_ParticipantInfo.comp,
                 &result,
                 (const unsigned __int16 *)(v8 - 2))->_Ptr;
          if ( v9 != v3->map_ParticipantInfo._Myhead )
          {
            v10 = *(_DWORD *)(v8 + 4);
            if ( v10 )
              v9->_Myval.second.m_BettingInfo.nBetMoney[*(_DWORD *)v8] += v10;
            MHDiceGameTask::CheckBettingChip(v3, *(DICE_TAISAI_BETTING *)v8, 0);
          }
          v8 += 10;
          ++ia;
        }
        while ( ia < v2->nBettingCnt );
      }
      v7 = 1;
      if ( v2->PartMask & 2 )
        v3->m_eStatusOfInfoTrans = 0;
    }
  }
  else
  {
    i = 0;
    if ( v2->nBettingCnt > 0u )
    {
      v4 = (int)&v2[1].nBettingCnt + 1;
      do
      {
        v5 = std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::find(
               (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v3->map_ParticipantInfo.comp,
               &result,
               (const unsigned __int16 *)(v4 - 2))->_Ptr;
        if ( v5 != v3->map_ParticipantInfo._Myhead )
        {
          v6 = *(_DWORD *)(v4 + 4);
          if ( v6 )
            v5->_Myval.second.m_BettingInfo.nBetMoney[*(_DWORD *)v4] += v6;
          MHDiceGameTask::CheckBettingChip(v3, *(DICE_TAISAI_BETTING *)v4, 0);
        }
        v4 += 10;
        ++i;
      }
      while ( i < v2->nBettingCnt );
    }
    v7 = 1;
    if ( !(v2->PartMask & 2) )
      v3->m_eStatusOfInfoTrans = 1;
  }
  return v7;
}

//----- (006ADCE0) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_BETTING_REQ(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_BETTING_REQ *pkProto)
{
  PROTO_NC_DICE_TAISAI_BETTING_REQ *v2; // esi@1
  unsigned __int16 v3; // dx@2
  unsigned __int16 v4; // ax@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *v5; // edx@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *v6; // eax@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *v7; // eax@9
  PROTO_NC_DICE_TAISAI_BETTING_REQ **v8; // eax@11
  DICE_TAISAI_BETTING v9; // edx@14
  std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > *v10; // edi@14
  unsigned int v11; // eax@14
  std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *v12; // eax@14
  std::pair<unsigned short,DiceTaiSaiBetting> _Val; // [sp+8h] [bp-Ch]@12

  v2 = pkProto;
  if ( this->map_BettingReq._Mysize )
  {
    if ( this->map_BettingReq._Myhead->_Left != this->map_BettingReq._Myhead )
    {
      do
      {
        v4 = this->m_nReqCount;
        this->m_nReqCount = v4 + 1;
        v2->nBettingIndex = v4;
        v5 = this->map_BettingReq._Myhead;
        v6 = v5->_Parent;
        while ( !v6->_Isnil )
        {
          if ( v6->_Myval.first >= v2->nBettingIndex )
          {
            v5 = v6;
            v6 = v6->_Left;
          }
          else
          {
            v6 = v6->_Right;
          }
        }
        v7 = this->map_BettingReq._Myhead;
        pkProto = (PROTO_NC_DICE_TAISAI_BETTING_REQ *)v5;
        if ( v5 == v7 || v2->nBettingIndex < v5->_Myval.first )
        {
          _Val.second.nMoney = (unsigned int)v7;
          v8 = (PROTO_NC_DICE_TAISAI_BETTING_REQ **)&_Val.second.nMoney;
        }
        else
        {
          v8 = &pkProto;
        }
      }
      while ( *v8 != (PROTO_NC_DICE_TAISAI_BETTING_REQ *)this->map_BettingReq._Myhead );
    }
  }
  else
  {
    v3 = this->m_nReqCount;
    this->m_nReqCount = v3 + 1;
    v2->nBettingIndex = v3;
  }
  v9 = v2->BettingInfo.nBetting;
  v10 = (std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > *)&this->map_BettingReq.comp;
  _Val.first = v2->nBettingIndex;
  v11 = v2->BettingInfo.nMoney;
  _Val.second.nBetting = v9;
  _Val.second.nMoney = v11;
  v12 = std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::_Buynode<std::pair<unsigned short,DiceTaiSaiBetting>>(
          (std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > *)&this->map_BettingReq.comp,
          &_Val);
  std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::_Linsert(
    v10,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > >,bool> *)&_Val.second,
    v12,
    0);
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Bu, 0x1Au, v2, 10);
  return 1;
}

//----- (006ADDC0) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_BETTING_CANCEL_REQ(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_BETTING_CANCEL_REQ *pkProto)
{
  PROTO_NC_DICE_TAISAI_BETTING_CANCEL_REQ *v2; // esi@1
  unsigned __int16 v3; // dx@2
  unsigned __int16 v4; // ax@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *v5; // edx@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *v6; // eax@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *v7; // eax@9
  PROTO_NC_DICE_TAISAI_BETTING_CANCEL_REQ **v8; // eax@11
  DICE_TAISAI_BETTING v9; // edx@14
  std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > *v10; // edi@14
  unsigned int v11; // eax@14
  std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *v12; // eax@14
  std::pair<unsigned short,DiceTaiSaiBetting> _Val; // [sp+8h] [bp-Ch]@12

  v2 = pkProto;
  if ( this->map_BettingReq._Mysize )
  {
    if ( this->map_BettingReq._Myhead->_Left != this->map_BettingReq._Myhead )
    {
      do
      {
        v4 = this->m_nReqCount;
        this->m_nReqCount = v4 + 1;
        v2->nBettingCancelIndex = v4;
        v5 = this->map_BettingReq._Myhead;
        v6 = v5->_Parent;
        while ( !v6->_Isnil )
        {
          if ( v6->_Myval.first >= v2->nBettingCancelIndex )
          {
            v5 = v6;
            v6 = v6->_Left;
          }
          else
          {
            v6 = v6->_Right;
          }
        }
        v7 = this->map_BettingReq._Myhead;
        pkProto = (PROTO_NC_DICE_TAISAI_BETTING_CANCEL_REQ *)v5;
        if ( v5 == v7 || v2->nBettingCancelIndex < v5->_Myval.first )
        {
          _Val.second.nMoney = (unsigned int)v7;
          v8 = (PROTO_NC_DICE_TAISAI_BETTING_CANCEL_REQ **)&_Val.second.nMoney;
        }
        else
        {
          v8 = &pkProto;
        }
      }
      while ( *v8 != (PROTO_NC_DICE_TAISAI_BETTING_CANCEL_REQ *)this->map_BettingReq._Myhead );
    }
  }
  else
  {
    v3 = this->m_nReqCount;
    this->m_nReqCount = v3 + 1;
    v2->nBettingCancelIndex = v3;
  }
  v9 = v2->BettingCancelInfo.nBetting;
  v10 = (std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > *)&this->map_BettingReq.comp;
  _Val.first = v2->nBettingCancelIndex;
  v11 = v2->BettingCancelInfo.nMoney;
  _Val.second.nBetting = v9;
  _Val.second.nMoney = v11;
  v12 = std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::_Buynode<std::pair<unsigned short,DiceTaiSaiBetting>>(
          (std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > *)&this->map_BettingReq.comp,
          &_Val);
  std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::_Linsert(
    v10,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > >,bool> *)&_Val.second,
    v12,
    0);
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Bu, 0x1Du, v2, 10);
  return 1;
}

//----- (006ADEA0) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_LEAVE_CMD(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_GAME_LEAVE_CMD *pkProto)
{
  PROTO_NC_DICE_TAISAI_GAME_LEAVE_CMD *v2; // esi@1
  std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *v3; // ebx@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *v4; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > v5; // edi@1
  MHDiceGameTask *v6; // ecx@1
  DICE_TAISAI_BETTING v8; // esi@5
  unsigned int v9; // eax@6
  MHDiceGameTask *v10; // ebx@9
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node **v11; // eax@9
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v12; // ecx@9
  signed int v13; // eax@10
  unsigned int *v14; // edx@10
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v15; // eax@14
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *j; // eax@15
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *i; // eax@18
  PgFrameWork *v18; // esi@23
  Char *v19; // eax@24
  int v20; // edi@25
  D3DXCOLOR *v21; // eax@25
  D3DXCOLOR v22; // ST08_16@25
  char *v23; // eax@25
  char *v24; // eax@25
  unsigned __int16 v25; // dx@26
  D3DXCOLOR v26; // [sp+Ch] [bp-18h]@25
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > result; // [sp+1Ch] [bp-8h]@1
  MHDiceGameTask *v28; // [sp+20h] [bp-4h]@1
  PROTO_NC_DICE_TAISAI_GAME_LEAVE_CMD *pkProtoa; // [sp+2Ch] [bp+8h]@1

  v2 = pkProto;
  pkProtoa = (PROTO_NC_DICE_TAISAI_GAME_LEAVE_CMD *)((char *)pkProto + 1);
  v3 = (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&this->map_ParticipantInfo.comp;
  v28 = this;
  v4 = std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::find(
         (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&this->map_ParticipantInfo.comp,
         &result,
         (const unsigned __int16 *)pkProtoa);
  v5._Ptr = v4->_Ptr;
  v6 = v28;
  if ( v4->_Ptr == v28->map_ParticipantInfo._Myhead )
    return 0;
  if ( v2->bReserve )
  {
    v5._Ptr->_Myval.second.m_bReserveQuit = 1;
    return 1;
  }
  if ( v28->m_eDiceSaiGameStatus == 1 )
  {
    v8 = 0;
    do
    {
      v9 = v5._Ptr->_Myval.second.m_BettingInfo.nBetMoney[v8];
      if ( v9 )
      {
        v5._Ptr->_Myval.second.m_BettingInfo.nBetMoney[v8] -= v9;
        MHDiceGameTask::CheckBettingChip(v6, v8, 0);
        v6 = v28;
      }
      ++v8;
    }
    while ( (signed int)v8 < 52 );
  }
  std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::erase(
    v3,
    &result,
    v5);
  v10 = v28;
  v11 = &v28->map_ParticipantInfo._Myhead->_Left;
  v12 = *v11;
  if ( (std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node **)*v11 != v11 )
  {
LABEL_10:
    v13 = 0;
    v14 = v12->_Myval.second.m_BettingInfo.nBetMoney;
    while ( !*v14 )
    {
      ++v13;
      ++v14;
      if ( v13 >= 52 )
      {
        if ( !v12->_Isnil )
        {
          v15 = v12->_Right;
          if ( v15->_Isnil )
          {
            for ( i = v12->_Parent; !i->_Isnil; i = i->_Parent )
            {
              if ( v12 != i->_Right )
                break;
              v12 = i;
            }
            v12 = i;
          }
          else
          {
            v12 = v12->_Right;
            for ( j = v15->_Left; !j->_Isnil; j = j->_Left )
              v12 = j;
          }
        }
        if ( v12 != v28->map_ParticipantInfo._Myhead )
          goto LABEL_10;
        goto LABEL_23;
      }
    }
    return 1;
  }
LABEL_23:
  v18 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v18 )
  {
    v19 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)&pkProtoa->bReserve);
    if ( v19 )
    {
      v20 = ((int (__thiscall *)(Char *))v19->vfptr[2].DeleteAbStateByAbstateIndex)(v19);
      v21 = ColorInfoTable::GetDxColor(&v26, Center_Announcement);
      *(_QWORD *)&v22.r = *(_QWORD *)&v21->r;
      *(_QWORD *)&v22.b = *(_QWORD *)&v21->b;
      v23 = (char *)TextData2::Get(0x37452093u);
      v24 = fs(v23, v20);
      GameFrameWork::AddAnnounceMsg((GameFrameWork *)v18, v20, (int)v18, v24, v22);
      PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)v18[28].m_kMsgQ.m_uiHead);
    }
  }
  v25 = v10->map_ParticipantInfo._Mysize;
  v10->m_eDiceSaiGameStatus = 0;
  v10->m_nNumberOfEntrant = v25;
  return 1;
}

//----- (006AE060) --------------------------------------------------------
int __userpurge MHDiceGameTask::Recv_NC_DICE_TAISAI_BET_START_CMD@<eax>(MHDiceGameTask *this@<ecx>, int a2@<edi>, PROTO_NC_DICE_TAISAI_BET_START_CMD *pkProto)
{
  MHDiceGameTask *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node **v4; // eax@2
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v5; // edx@2
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v6; // eax@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *j; // eax@5
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *i; // eax@8
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node **v9; // ecx@13
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v10; // eax@13
  NiUnsharedGeometryGroup *v11; // eax@19
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > result; // [sp+8h] [bp-10Ch]@16
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > itr; // [sp+Ch] [bp-108h]@13
  char pcScript[256]; // [sp+10h] [bp-104h]@19

  v3 = this;
  if ( pkProto )
  {
    this->m_eDiceSaiGameMode = pkProto->bModeType;
    MiniHouseDiceGameWin::UpdateHistory(this->m_pkDiceGameWin, pkProto->CurrentRollingDice.nNumber, 0);
    v4 = &v3->map_ParticipantInfo._Myhead->_Left;
    v5 = *v4;
    if ( (std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node **)*v4 != v4 )
    {
      do
      {
        memset(&v5->_Myval.second, 0, 0xD0u);
        if ( !v5->_Isnil )
        {
          v6 = v5->_Right;
          if ( v6->_Isnil )
          {
            for ( i = v5->_Parent; !i->_Isnil; i = i->_Parent )
            {
              if ( v5 != i->_Right )
                break;
              v5 = i;
            }
            v5 = i;
          }
          else
          {
            v5 = v5->_Right;
            for ( j = v6->_Left; !j->_Isnil; j = j->_Left )
              v5 = j;
          }
        }
      }
      while ( v5 != v3->map_ParticipantInfo._Myhead );
    }
    MiniHouseDiceGameWin::AllReset(v3->m_pkDiceGameWin);
    v9 = &v3->map_ParticipantInfo._Myhead->_Left;
    v3->m_eDiceSaiGameStatus = 0;
    v10 = *v9;
    itr._Ptr = v10;
    if ( (std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node **)v10 != v9 )
    {
      do
      {
        if ( v10->_Myval.second.m_bReserveQuit == 1 )
        {
          if ( v10->_Myval.first == g_pkMainChar->m_kHandle )
          {
            MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_LEAVE_REQ(v3, a2);
            return 1;
          }
          v10 = std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::erase(
                  (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v3->map_ParticipantInfo.comp,
                  &result,
                  (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > >)v10)->_Ptr;
          itr._Ptr = v10;
        }
        else
        {
          std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >,std::_Iterator_base0> *)&itr._Ptr);
          v10 = itr._Ptr;
        }
      }
      while ( v10 != v3->map_ParticipantInfo._Myhead );
    }
    memset(pcScript, 0, 0x100u);
    v11 = TextData2::Get(0x367E5072u);
    sprintf(pcScript, "%s", v11);
    NpcDialogWin::OpenNpcScriptDialog(v3->m_pkNpcDlgWin, 260, pcScript, 0);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkNpcDlgWin->vfptr);
    v3->m_nNumberOfEntrant = v3->map_ParticipantInfo._Mysize;
    std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::clear((std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *)&v3->map_BettingReq);
    v3->m_fClockAlramTime = 0.0;
    v3->m_fClockCastTime = 0.0;
    v3->m_bIsResetTimer = 0;
    *(_WORD *)&v3->m_IsClockCastPlaying = 0;
    v3->m_IsBettingStartPlaying = 0;
    v3->m_bGameStartClick = 0;
    v3->m_bComeinMHOnResultStauts = 0;
    *(_WORD *)&v3->m_bPrintDiceResult[0] = 0;
    v3->m_bPrintDiceResult[2] = 0;
    v3->m_fDiceResultTime = 0.0;
    v3->m_fDiplayLightTime = 0.0;
    *(_WORD *)&v3->m_bIsNonBettingOver = 0;
  }
  return 1;
}

//----- (006AE250) --------------------------------------------------------
void __thiscall MHDiceGameTask::OnBetting(MHDiceGameTask *this, DICE_TAISAI_BETTING index)
{
  MHDiceGameTask *v2; // esi@1
  MHDiceGameTask::DICE_GAME_MODE v3; // eax@1
  unsigned int v4; // eax@2
  unsigned int v5; // edi@2
  unsigned int v6; // eax@7
  unsigned int v7; // eax@7
  PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_REQ pkProto; // [sp+Ch] [bp-10h]@5

  v2 = this;
  v3 = this->m_eDiceGameMode;
  if ( v3 == 1 )
  {
    v4 = DiceTaiSaiDividind::get_MaxBettingMoney(&this->m_Dividind, index, this->m_nMaxBetMoney);
    v5 = MHDiceGameTask::GetAbleMoney(v2, index, v4);
    if ( v5 > (signed __int64)User::GetMoney(&g_kUser) )
      v5 = User::GetMoney(&g_kUser);
    if ( v5 )
    {
      pkProto.BettingInfo.nBetting = index;
      pkProto.BettingInfo.nMoney = v5;
      MHDiceGameTask::Recv_NC_DICE_TAISAI_BETTING_REQ(v2, (PROTO_NC_DICE_TAISAI_BETTING_REQ *)&pkProto);
    }
  }
  else if ( v3 == 2 )
  {
    v6 = DiceTaiSaiDividind::get_MaxBettingMoney(&this->m_GBDividind, index, this->m_nMaxBetMoney);
    v7 = MHDiceGameTask::GetAbleMoney(v2, index, v6);
    if ( v7 > v2->m_nInvenRemainMoney )
      v7 = v2->m_nInvenRemainMoney;
    if ( v7 )
    {
      pkProto.BettingInfo.nMoney = v7;
      pkProto.BettingInfo.nBetting = index;
      MHDiceGameTask::NcGambleDiceTaisaiGameBettingReq(v2, &pkProto);
    }
  }
}

//----- (006AE340) --------------------------------------------------------
void __thiscall MHDiceGameTask::OnBettingCancel(MHDiceGameTask *this, DICE_TAISAI_BETTING index)
{
  MHDiceGameTask *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v3; // eax@1
  unsigned int v4; // eax@2
  MHDiceGameTask::DICE_GAME_MODE v5; // edi@2
  BETTING_LEVEL_MONEY v6; // edx@4
  unsigned int v7; // ecx@5
  unsigned __int16 _Keyval[2]; // [sp+4h] [bp-18h]@1
  unsigned int CheckMoney; // [sp+8h] [bp-14h]@1
  PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_REQ pkProto; // [sp+Ch] [bp-10h]@21

  v2 = this;
  *(_DWORD *)_Keyval = g_pkMainChar->m_kHandle;
  v3 = std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::find(
         (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&this->map_ParticipantInfo.comp,
         (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *)&CheckMoney,
         _Keyval)->_Ptr;
  if ( v3 != v2->map_ParticipantInfo._Myhead )
  {
    v4 = v3->_Myval.second.m_BettingInfo.nBetMoney[index];
    v5 = v2->m_eDiceGameMode;
    if ( v5 != 2 && v5 != 4 )
    {
      v6 = v2->m_eBettingAmount;
      switch ( v6 )
      {
        case 2:
$LN20_62:
          v7 = 10000;
          break;
        case 0:
$LN17_71:
          v7 = 100;
          break;
        case 4:
          v7 = 1000000;
          break;
        case 3:
          v7 = 100000;
          break;
        case 1:
LABEL_11:
          v7 = 1000;
          break;
        default:
          goto LABEL_12;
      }
    }
    else
    {
      v6 = v2->m_eBettingAmount;
      switch ( v6 )
      {
        case 3:
          goto $LN20_62;
        case 1:
          v7 = 500;
          goto LABEL_13;
        case 0:
          goto $LN17_71;
        case 2:
          goto LABEL_11;
        default:
          break;
      }
LABEL_12:
      v7 = CheckMoney;
    }
LABEL_13:
    if ( PgWin::ms_bCtrlPressed )
      v7 = v4;
    if ( v6 == 5 || v6 == 4 || v7 > v4 )
      v7 = v4;
    if ( v7 )
    {
      if ( v5 == 1 )
      {
        pkProto.BettingCancelInfo.nMoney = v7;
        pkProto.BettingCancelInfo.nBetting = index;
        MHDiceGameTask::Recv_NC_DICE_TAISAI_BETTING_CANCEL_REQ(v2, (PROTO_NC_DICE_TAISAI_BETTING_CANCEL_REQ *)&pkProto);
      }
      else if ( v5 == 2 )
      {
        pkProto.BettingCancelInfo.nMoney = v7;
        pkProto.BettingCancelInfo.nBetting = index;
        MHDiceGameTask::NcGambleDiceTaisaiGameBettingCancelReq(v2, &pkProto);
      }
    }
  }
}
// B6474D: using guessed type bool PgWin::ms_bCtrlPressed;

//----- (006AE480) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_JOIN_CMD(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_GAME_JOIN_CMD *pkProto)
{
  std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v3; // eax@1
  Char *v4; // edi@1
  PgFrameWork *v5; // esi@1
  int v6; // edi@3
  char *v7; // eax@3
  const char *v8; // eax@3
  D3DXCOLOR *v9; // eax@3
  D3DXCOLOR v10; // ST08_16@3
  char *v11; // eax@3
  char *v12; // eax@3
  std::pair<unsigned short,EntryInfo> _Val; // [sp+Ch] [bp-1CCh]@1
  D3DXCOLOR result; // [sp+E8h] [bp-F0h]@1
  MHDiceGameTask *v16; // [sp+F8h] [bp-E0h]@1
  char v17; // [sp+FCh] [bp-DCh]@1
  char v18; // [sp+1D0h] [bp-8h]@1

  v18 = 0;
  memset(&v17, 0, 0xD0u);
  _Val.first = pkProto->nPlayerHnd;
  qmemcpy(&_Val.second, &v17, sizeof(_Val.second));
  v2 = (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&this->map_ParticipantInfo.comp;
  v16 = this;
  v3 = std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Buynode<std::pair<unsigned short,EntryInfo>>(
         (std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&this->map_ParticipantInfo.comp,
         &_Val);
  std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Linsert(
    v2,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > >,bool> *)&result.b,
    v3,
    0);
  v4 = CharMgr::GetChar(&g_kCharMgr, pkProto->nPlayerHnd);
  v5 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v5 && v4 )
  {
    v6 = ((int (__thiscall *)(Char *))v4->vfptr[2].DeleteAbStateByAbstateIndex)(v4);
    v7 = (char *)TextData2::Get(0x7F90C3D5u);
    v8 = fs(v7, v6);
    GameFrameWork::AddSysMsg((GameFrameWork *)v5, v8);
    v9 = ColorInfoTable::GetDxColor(&result, Center_Announcement);
    *(_QWORD *)&v10.r = *(_QWORD *)&v9->r;
    *(_QWORD *)&v10.b = *(_QWORD *)&v9->b;
    v11 = (char *)TextData2::Get(0x7F90C3D5u);
    v12 = fs(v11, v6);
    GameFrameWork::AddAnnounceMsg((GameFrameWork *)v5, v6, (int)v5, v12, v10);
    PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)v5[28].m_kMsgQ.m_uiHead);
  }
  if ( v16->m_eDiceSaiGameStatus == DTGS_NONE_BETTING )
    v16->m_nNumberOfEntrant = v16->map_ParticipantInfo._Mysize;
  return 1;
}

//----- (006AE5E0) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_LEAVE_ACK(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_GAME_LEAVE_ACK *pkProto)
{
  MHDiceGameTask *v2; // esi@1
  MiniHouseDiceGameWin *v3; // ecx@2
  PgFrameWork *v4; // edi@2
  NiUnsharedGeometryGroup *v5; // eax@3
  D3DXCOLOR *v6; // eax@3
  D3DXCOLOR v7; // ST04_16@3
  char *v8; // eax@3
  D3DXCOLOR result; // [sp+Ch] [bp-10h]@3

  v2 = this;
  if ( pkProto->nError == 7312 )
  {
    v3 = this->m_pkDiceGameWin;
    v2->m_bIsEnterGameRoom = 0;
    MiniHouseDiceGameWin::AllReset(v3);
    v2->m_pkDiceGameWin->m_pStartEffect.m_pObject->m_uFlags |= 1u;
    std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::clear((std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v2->map_ParticipantInfo.comp);
    std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::clear((std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *)&v2->map_BettingReq);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkMiniGameWin->vfptr);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkDiceGameWin->vfptr);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkDiceHelpWin->vfptr);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkDiceRankWin->vfptr);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkDiceRateSheetWin->vfptr);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkNpcDlgWin->vfptr);
    v2->m_pkDiceHelpWin = 0;
    v2->m_pkMiniGameWin = 0;
    v2->m_pkDiceGameWin = 0;
    v2->m_pkDiceRankWin = 0;
    v2->m_pkDiceRateSheetWin = 0;
    v2->m_pkNpcDlgWin = 0;
    ((void (*)(void))g_kSoundMgr.m_pkInterfaceGroup->vfptr->UnloadAllSound)();
    ((void (*)(void))g_kSoundMgr.m_pkBGMGroup->vfptr->UnloadAllSound)();
    World::PlayBGM(&g_kWorld);
    v4 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v4 )
    {
      v5 = TextData2::Get(0x47351B29u);
      GameFrameWork::AddSysMsg((GameFrameWork *)v4, (const char *)v5);
      v6 = ColorInfoTable::GetDxColor(&result, Center_Announcement);
      *(_QWORD *)&v7.r = *(_QWORD *)&v6->r;
      *(_QWORD *)&v7.b = *(_QWORD *)&v6->b;
      v8 = (char *)TextData2::Get(0x47351B29u);
      GameFrameWork::AddAnnounceMsg((GameFrameWork *)v4, (int)v4, (int)v2, v8, v7);
      PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)v4[28].m_kMsgQ.m_uiHead);
      if ( v2->m_bOutReserveOnMiniHouse )
        GameFrameWork::MiniHouseIndoorModeOut((GameFrameWork *)v4, (MHDiceGameTask *)v4);
    }
  }
  return 1;
}

//----- (006AE750) --------------------------------------------------------
int __stdcall MHDiceGameTask::Recv_NC_DICE_TAISAI_EXPECT_INCOME_MONEY_ACK(PROTO_NC_DICE_TAISAI_EXPECT_INCOME_MONEY_ACK *pkProto)
{
  PROTO_NC_DICE_TAISAI_EXPECT_INCOME_MONEY_ACK *v2; // esi@1
  PgFrameWork *v3; // eax@2
  PgFrameWork *v4; // ebx@2
  Item *v5; // eax@2
  NiUnsharedGeometryGroup *v6; // eax@3
  NiUnsharedGeometryGroup *v7; // eax@3
  unsigned int v8; // ST0C_4@3
  unsigned int v9; // ST08_4@3
  unsigned int v10; // ST04_4@3
  char *v11; // eax@3
  const char *v12; // eax@3
  NiUnsharedGeometryGroup *v13; // eax@3
  char *v14; // eax@3
  MHDiceRewardMoneyWin *v15; // esi@5
  unsigned int v16; // ST0C_4@5
  char *v17; // eax@5
  char *v18; // eax@5
  SHINE_ITEM_STRUCT kItemStruct; // [sp+10h] [bp-98h]@3
  PROTO_NC_DICE_TAISAI_EXPECT_INCOME_MONEY_ACK *v21; // [sp+78h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strText; // [sp+7Ch] [bp-2Ch]@3
  int v23; // [sp+A4h] [bp-4h]@3

  v2 = pkProto;
  v21 = pkProto;
  if ( pkProto->nError == 7424 )
  {
    v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v4 = v3;
    v5 = ItemIcon::GetItem(*(ItemIcon **)(v3[30].m_uiMessageNum + 3592));
    if ( v5 )
    {
      qmemcpy(&kItemStruct, &v5->m_kStruct, sizeof(kItemStruct));
      strText._Myres = 15;
      strText._Mysize = 0;
      strText._Bx._Buf[0] = 0;
      v23 = 0;
      v6 = TextData2::Get(0x8B877FCE);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &strText,
        (const char *)v6,
        strlen((const char *)v6));
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
      v7 = TextData2::Get(0x32363030u);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
        &strText,
        (const char *)v7,
        strlen((const char *)v7));
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
      v8 = (*(unsigned int *)((char *)&kItemStruct.itemattr.Capsule.content.dwrdkey[0] + 3) >> 19) & 0x3F;
      v9 = (*(unsigned int *)((char *)&kItemStruct.itemattr.Capsule.content.dwrdkey[0] + 3) >> 13) & 0x3F;
      v10 = (*(unsigned int *)((char *)&kItemStruct.itemattr.Capsule.content.dwrdkey[0] + 3) >> 8) & 0x1F;
      v11 = (char *)TextData2::Get(0xCBCFFE36);
      v12 = fs(v11, v10, v9, v8);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, v12, strlen(v12));
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
      v13 = TextData2::Get(0xF7E91119);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
        &strText,
        (const char *)v13,
        strlen((const char *)v13));
      v14 = strText._Bx._Ptr;
      if ( strText._Myres < 0x10 )
        v14 = (char *)&strText;
      MHDiceRewardMoneyWin::SetTitle1((MHDiceRewardMoneyWin *)v4[21].m_BackFrameID, v14);
      v15 = (MHDiceRewardMoneyWin *)v4[21].m_BackFrameID;
      v16 = v21->nGameCnt;
      v17 = (char *)TextData2::Get(0x253F7F8Au);
      v18 = fs(v17, v16);
      MHDiceRewardMoneyWin::SetTitle2(v15, v18);
      v23 = -1;
      if ( strText._Myres >= 0x10 )
        operator delete(strText._Bx._Ptr);
      v2 = v21;
      strText._Myres = 15;
      strText._Mysize = 0;
      strText._Bx._Buf[0] = 0;
    }
    MHDiceRewardMoneyWin::SetAmout((MHDiceRewardMoneyWin *)v4[21].m_BackFrameID, v2->nExpectIncomeMoney);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)v4[21].m_BackFrameID);
  }
  return 1;
}

//----- (006AE9A0) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall MHDiceGameTask::GetMoneyToString(MHDiceGameTask *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result, unsigned int Money)
{
  MHDiceGameTask *v3; // esi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v4; // ebx@1
  unsigned int v5; // edi@1
  MHDiceGameTask::DICE_GAME_MODE v6; // eax@2
  NiUnsharedGeometryGroup *v7; // eax@4
  __int64 v8; // rax@7
  int v9; // eax@7
  char v10; // cl@8
  NiUnsharedGeometryGroup *v11; // eax@9
  NiUnsharedGeometryGroup *v12; // edx@9
  char v13; // cl@10
  unsigned int v14; // eax@11
  char *v15; // edi@11
  char v16; // cl@12
  __int64 v17; // rax@15
  unsigned int v18; // eax@15
  char *v19; // edi@15
  char v20; // cl@16
  NiUnsharedGeometryGroup *v21; // eax@17
  NiUnsharedGeometryGroup *v22; // ecx@17
  char v23; // dl@18
  unsigned int v24; // eax@19
  NiUnsharedGeometryGroup *v25; // esi@19
  char *v26; // edi@19
  char v27; // cl@20
  __int64 v28; // rax@23
  unsigned int v29; // eax@23
  char *v30; // edi@23
  char v31; // cl@24
  NiUnsharedGeometryGroup *v32; // eax@25
  NiUnsharedGeometryGroup *v33; // ecx@25
  char v34; // dl@26
  unsigned int v35; // eax@27
  NiUnsharedGeometryGroup *v36; // esi@27
  char *v37; // edi@27
  char v38; // cl@28
  __int64 v39; // rax@31
  unsigned int v40; // eax@31
  char *v41; // edi@31
  char v42; // cl@32
  NiUnsharedGeometryGroup *v43; // eax@33
  NiUnsharedGeometryGroup *v44; // ecx@33
  char v45; // dl@34
  unsigned int v46; // eax@35
  NiUnsharedGeometryGroup *v47; // esi@35
  char *v48; // edi@35
  char v49; // cl@36
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strMoney; // [sp+18h] [bp-22Ch]@1
  char acStr2[256]; // [sp+34h] [bp-210h]@2
  char acStr1[256]; // [sp+134h] [bp-110h]@2
  int v54; // [sp+240h] [bp-4h]@1

  v3 = this;
  v4 = result;
  strMoney._Myres = 15;
  strMoney._Mysize = 0;
  strMoney._Bx._Buf[0] = 0;
  v54 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strMoney, &byte_9BEC1B, 0);
  v5 = Money;
  if ( Money )
  {
    memset(acStr1, 0, 0x100u);
    memset(acStr2, 0, 0x100u);
    v6 = v3->m_eDiceGameMode;
    if ( v6 == 2 || v6 == 4 )
    {
      sprintf(acStr1, "%d ", Money);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strMoney, acStr1, strlen(acStr1));
      v7 = TextData2::Get(0x96A2F6DF);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
        &strMoney,
        (const char *)v7,
        strlen((const char *)v7));
      result->_Myres = 15;
      result->_Mysize = 0;
      result->_Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(result, &strMoney);
      if ( strMoney._Myres >= 0x10 )
        operator delete(strMoney._Bx._Ptr);
      return v4;
    }
    if ( User::GetGem(Money) )
    {
      v8 = User::GetGem(Money);
      sprintf(acStr1, "%I64d", v8);
      v9 = 0;
      do
      {
        v10 = acStr1[v9];
        acStr2[v9++] = v10;
      }
      while ( v10 );
      v11 = TextData::Get(0x475F9699u);
      v12 = v11;
      do
      {
        v13 = (char)v11->vfptr;
        v11 = (NiUnsharedGeometryGroup *)((char *)v11 + 1);
      }
      while ( v13 );
      v14 = (char *)v11 - (char *)v12;
      v15 = (char *)(&strMoney._Alval + 3);
      do
        v16 = (v15++)[1];
      while ( v16 );
      qmemcpy(v15, v12, v14);
      v5 = Money;
    }
    if ( User::GetGold(v5) )
    {
      v17 = User::GetGold(v5);
      sprintf(acStr1, "%I64d", v17);
      v18 = strlen(acStr1) + 1;
      v19 = (char *)(&strMoney._Alval + 3);
      do
        v20 = (v19++)[1];
      while ( v20 );
      qmemcpy(v19, acStr1, v18);
      v21 = TextData::Get(0x47A395A3u);
      v22 = v21;
      do
      {
        v23 = (char)v21->vfptr;
        v21 = (NiUnsharedGeometryGroup *)((char *)v21 + 1);
      }
      while ( v23 );
      v24 = (char *)v21 - (char *)v22;
      v25 = v22;
      v26 = (char *)(&strMoney._Alval + 3);
      do
        v27 = (v26++)[1];
      while ( v27 );
      qmemcpy(v26, v25, v24);
      v5 = Money;
    }
    if ( User::GetSilver(v5) )
    {
      v28 = User::GetSilver(v5);
      sprintf(acStr1, "%I64d", v28);
      v29 = strlen(acStr1) + 1;
      v30 = (char *)(&strMoney._Alval + 3);
      do
        v31 = (v30++)[1];
      while ( v31 );
      qmemcpy(v30, acStr1, v29);
      v32 = TextData::Get(0x98B595EF);
      v33 = v32;
      do
      {
        v34 = (char)v32->vfptr;
        v32 = (NiUnsharedGeometryGroup *)((char *)v32 + 1);
      }
      while ( v34 );
      v35 = (char *)v32 - (char *)v33;
      v36 = v33;
      v37 = (char *)(&strMoney._Alval + 3);
      do
        v38 = (v37++)[1];
      while ( v38 );
      qmemcpy(v37, v36, v35);
      v5 = Money;
    }
    if ( User::GetCopper(v5) )
    {
      v39 = User::GetCopper(v5);
      sprintf(acStr1, "%I64d", v39);
      v40 = strlen(acStr1) + 1;
      v41 = (char *)(&strMoney._Alval + 3);
      do
        v42 = (v41++)[1];
      while ( v42 );
      qmemcpy(v41, acStr1, v40);
      v43 = TextData::Get(0x88AF99F5);
      v44 = v43;
      do
      {
        v45 = (char)v43->vfptr;
        v43 = (NiUnsharedGeometryGroup *)((char *)v43 + 1);
      }
      while ( v45 );
      v46 = (char *)v43 - (char *)v44;
      v47 = v44;
      v48 = (char *)(&strMoney._Alval + 3);
      do
        v49 = (v48++)[1];
      while ( v49 );
      qmemcpy(v48, v47, v46);
    }
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strMoney, acStr2, strlen(acStr2));
    v4 = result;
  }
  v4->_Myres = 15;
  v4->_Mysize = 0;
  v4->_Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(v4, &strMoney);
  if ( strMoney._Myres >= 0x10 )
    operator delete(strMoney._Bx._Ptr);
  return v4;
}

//----- (006AEDD0) --------------------------------------------------------
char __thiscall MHDiceGameTask::ShutDownGambleHouse(MHDiceGameTask *this)
{
  MHDiceGameTask *v1; // esi@1
  MHDiceGameTask::DICE_GAME_MODE v2; // eax@1
  GambleDiceGameWin *v3; // ecx@4
  PgFrameWork *v4; // edi@4
  NiUnsharedGeometryGroup *v5; // eax@5
  D3DXCOLOR *v6; // eax@5
  D3DXCOLOR v7; // ST04_16@5
  char *v8; // eax@5
  _DWORD **v9; // edi@5
  char v10; // al@8
  D3DXCOLOR result; // [sp+Ch] [bp-10h]@5

  v1 = this;
  v2 = this->m_eDiceGameMode;
  if ( (v2 == 2 || v2 == 4) && this->m_bIsEnterGameRoom )
  {
    v3 = this->m_pkGambleDiceGameWin;
    v1->m_bIsEnterGameRoom = 0;
    GambleDiceGameWin::AllReset(v3);
    v1->m_pkGambleDiceGameWin->m_pStartEffect.m_pObject->m_uFlags |= 1u;
    std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::clear((std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v1->map_ParticipantInfo.comp);
    std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::clear((std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *)&v1->map_BettingReq);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkMiniGameWin->vfptr);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkGambleDiceGameWin->vfptr);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkDiceHelpWin->vfptr);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkDiceRankWin->vfptr);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkDiceRateSheetWin->vfptr);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkNpcDlgWin->vfptr);
    v1->m_pkDiceHelpWin = 0;
    v1->m_pkMiniGameWin = 0;
    v1->m_pkGambleDiceGameWin = 0;
    v1->m_pkDiceRankWin = 0;
    v1->m_pkDiceRateSheetWin = 0;
    v1->m_pkNpcDlgWin = 0;
    ((void (*)(void))g_kSoundMgr.m_pkInterfaceGroup->vfptr->UnloadAllSound)();
    ((void (*)(void))g_kSoundMgr.m_pkBGMGroup->vfptr->UnloadAllSound)();
    World::PlayBGM(&g_kWorld);
    v4 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v4 )
    {
      v5 = TextData2::Get(0x47351B29u);
      GameFrameWork::AddSysMsg((GameFrameWork *)v4, (const char *)v5);
      v6 = ColorInfoTable::GetDxColor(&result, Center_Announcement);
      *(_QWORD *)&v7.r = *(_QWORD *)&v6->r;
      *(_QWORD *)&v7.b = *(_QWORD *)&v6->b;
      v8 = (char *)TextData2::Get(0x47351B29u);
      GameFrameWork::AddAnnounceMsg((GameFrameWork *)v4, (int)v4, (int)v1, v8, v7);
      PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)v4[28].m_kMsgQ.m_uiHead);
      v9 = (_DWORD **)v4[22].m_BackFrameID;
      if ( v9 )
      {
        if ( v9[88] )
          (*(void (__stdcall **)(signed int))(*v9[88] + 240))(1);
      }
    }
    v1->m_eDiceGameMode = 0;
    v10 = 1;
  }
  else
  {
    v10 = 0;
  }
  return v10;
}

//----- (006AEF70) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_JOIN_ACK(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_GAME_JOIN_ACK *pkProto)
{
  MHDiceGameTask *v2; // ebx@1
  PgFrameWork *v3; // edi@1
  unsigned __int16 v4; // ax@2
  D3DXCOLOR *v5; // eax@4
  D3DXCOLOR v6; // ST04_16@4
  char *v7; // eax@4
  int v9; // ST10_4@7
  char *v10; // eax@7
  char *v11; // eax@7
  NiD3DDefaultShader *v12; // eax@7
  const char *v13; // eax@12
  MiniHouseDiceGameWin *v14; // ecx@14
  signed int v15; // edi@14
  bool v16; // zf@16
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v17; // eax@18
  int v18; // edx@18
  unsigned __int16 v19; // dx@19
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v20; // eax@19
  PgWin *v21; // ecx@19
  MiniHouseDiceGameWin *v22; // eax@19
  PgWinSpr *v23; // esi@19
  PgWinSpr *v24; // edi@19
  int v25; // eax@19
  NiRefObjectVtbl *v26; // edx@19
  double v27; // st7@19
  void *(__thiscall *v28)(NiRefObject *, unsigned int); // eax@19
  double v29; // st7@19
  int v30; // eax@19
  const char *v31; // edi@20
  unsigned int v32; // eax@24
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v33; // eax@25
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v34; // ST10_4@27
  char *v35; // eax@27
  char *v36; // eax@27
  PgWinText *v37; // ecx@27
  DICE_TAISAI_GAME_STATUS v38; // eax@32
  double v39; // st7@33
  int v40; // eax@36
  int v41; // ecx@36
  int v42; // esi@36
  double v43; // st6@36
  MiniHouseDiceGameWin *v44; // eax@36
  NiRefObjectVtbl **v45; // edi@36
  NiRefObjectVtbl *v46; // edx@36
  signed int v47; // eax@36
  NiRefObjectVtbl *v48; // edx@36
  double v49; // st7@36
  void *(__thiscall *v50)(NiRefObject *, unsigned int); // eax@36
  double v51; // st7@36
  int v52; // eax@36
  void *(__thiscall *v53)(NiRefObject *, unsigned int); // edx@36
  MiniHouseDiceGameWin *v54; // eax@36
  PgWinSpr *v55; // esi@36
  PgWinSpr *v56; // edi@36
  void *(__thiscall *v57)(NiRefObject *, unsigned int); // edx@36
  double v58; // st7@36
  MiniHouseDiceGameWin *v59; // eax@37
  int v60; // eax@37
  NiRefObjectVtbl *v61; // esi@37
  MiniHouseDiceGameWin *v62; // eax@37
  PgWinSpr *v63; // esi@37
  void *(__thiscall *v64)(NiRefObject *, unsigned int); // edx@37
  float v65; // ecx@38
  DICE_TAISAI_GAME_STATUS v66; // eax@38
  MiniHouseDiceGameWin *v67; // ecx@42
  std::pair<unsigned short,EntryInfo> _Val; // [sp+14h] [bp-200h]@18
  D3DXCOLOR result; // [sp+F0h] [bp-124h]@4
  int i; // [sp+100h] [bp-114h]@16
  __int64 v71; // [sp+104h] [bp-110h]@1
  char *arrayNum; // [sp+10Ch] [bp-108h]@14
  char v73; // [sp+110h] [bp-104h]@18
  char v74; // [sp+1E4h] [bp-30h]@18
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v75; // [sp+1E8h] [bp-2Ch]@25
  int v76; // [sp+210h] [bp-4h]@25

  v2 = this;
  v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  HIDWORD(v71) = v3;
  if ( !v3 )
    return 0;
  v4 = pkProto->nError;
  if ( pkProto->nError != 7296 )
  {
    if ( v4 == 7302 )
    {
      v5 = ColorInfoTable::GetDxColor(&result, Center_Announcement);
      *(_QWORD *)&v6.r = *(_QWORD *)&v5->r;
      *(_QWORD *)&v6.b = *(_QWORD *)&v5->b;
      v7 = ErrMsgTable::GetErrMsg(pkProto->nError);
      GameFrameWork::AddAnnounceMsg((GameFrameWork *)v3, (int)v3, (int)pkProto, v7, v6);
      PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)v3[28].m_kMsgQ.m_uiHead);
      return 0;
    }
    if ( v4 == 7308 )
    {
      if ( !v2->m_spLowLevelWarnigWin.m_pObject )
      {
        v9 = pkProto->nUseMinLv;
        v10 = (char *)TextData2::Get(0x236E0F79u);
        v11 = fs(v10, v9);
        v12 = (NiD3DDefaultShader *)MsgBox::Modal(MSGBOX_OK, v11);
        NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spLowLevelWarnigWin, v12);
        v2->m_spLowLevelWarnigWin.m_pObject->vfptr->SetMsgHooker(
          &v2->m_spLowLevelWarnigWin.m_pObject->vfptr,
          &v2->vfptr);
        return 0;
      }
    }
    else if ( v4 == 7300 || v4 == 7303 || v4 == 7304 || v4 == 7318 )
    {
      v13 = fs("%d", pkProto->nError);
      GameFrameWork::AddSysMsg((GameFrameWork *)v3, v13);
    }
    return 0;
  }
  v2->m_eDiceSaiGameMode = 0;
  v2->m_fAlphaValueOfDiceWindow = 0.0;
  v14 = *(MiniHouseDiceGameWin **)&v3[21].m_bInit;
  v2->m_pkDiceGameWin = v14;
  v2->m_pkMiniGameWin = (mhMinimizeDiceGameWin *)v3[22].vfptr;
  v2->m_pkDiceHelpWin = (mhDiceHelpWin *)v3[22].m_pkMsgHooker;
  v2->m_pkDiceRankWin = (mhDiceRankWin *)v3[22].m_uiMessageNum;
  v2->m_pkDiceRateSheetWin = (mhDiceRateSheetWin *)v3[22].m_kMsgQ.m_pBase;
  v2->m_pkNpcDlgWin = (NpcDialogWin *)v3[22].m_kMsgQ.m_uiAlloced;
  ((void (__stdcall *)(_DWORD))v14->vfptr[69].__vecDelDtor)(0.0);
  ((void (__stdcall *)(_DWORD))v2->m_pkDiceGameWin->vfptr[60].__vecDelDtor)(0);
  std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::clear((std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v2->map_ParticipantInfo.comp);
  std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::clear((std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *)&v2->map_BettingReq);
  v2->m_eDiceSaiGameStatus = pkProto->nGameStatus;
  v2->m_nLengthInOneGame = ((signed int)(1717986919 * (unsigned __int64)pkProto->nTimer >> 32) >> 2)
                         + ((unsigned int)(1717986919 * (unsigned __int64)pkProto->nTimer >> 32) >> 31);
  v2->m_nInterval = SLOWORD(pkProto->nInterval) / 10;
  v2->m_nGameCnt = pkProto->nGamerCnt;
  v2->m_nGetSystemTaxRate = pkProto->nGetSysRate;
  v2->m_nMaxBetMoney = pkProto->nMaxBetMoney;
  MiniHouseDiceGameWin::UpdateHistory(v2->m_pkDiceGameWin, 0, 1);
  v15 = 6;
  arrayNum = pkProto->DiceHistory[6].nNumber;
  do
  {
    MiniHouseDiceGameWin::UpdateHistory(v2->m_pkDiceGameWin, arrayNum, 0);
    arrayNum -= 3;
    --v15;
  }
  while ( v15 >= 0 );
  v16 = v2->m_nGameCnt == 0;
  *(float *)&i = 0.0;
  if ( !v16 )
  {
    arrayNum = (char *)&pkProto[1];
    do
    {
      v74 = 0;
      memset(&v73, 0, 0xD0u);
      _Val.first = *(_WORD *)arrayNum;
      qmemcpy(&_Val.second, &v73, sizeof(_Val.second));
      v17 = std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Buynode<std::pair<unsigned short,EntryInfo>>(
              (std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v2->map_ParticipantInfo.comp,
              &_Val);
      std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Linsert(
        (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v2->map_ParticipantInfo.comp,
        (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > >,bool> *)&result.b,
        v17,
        0);
      v18 = v2->m_nGameCnt;
      arrayNum += 2;
      ++i;
    }
    while ( i < v18 );
  }
  v2->m_nNumberOfEntrant = v2->m_nGameCnt;
  v19 = g_pkMainChar->m_kHandle;
  v74 = 0;
  memset(&v73, 0, 0xD0u);
  _Val.first = v19;
  qmemcpy(&_Val.second, &v73, sizeof(_Val.second));
  v20 = std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Buynode<std::pair<unsigned short,EntryInfo>>(
          (std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v2->map_ParticipantInfo.comp,
          &_Val);
  std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v2->map_ParticipantInfo.comp,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > >,bool> *)&result.b,
    v20,
    0);
  v21 = (PgWin *)&v2->m_pkDiceGameWin->vfptr;
  ++v2->m_nNumberOfEntrant;
  PgWinMgr::ShowWin(&Pgg_kWinMgr, v21);
  MiniHouseDiceGameWin::SetMoneyWin(v2->m_pkDiceGameWin, 0);
  v22 = v2->m_pkDiceGameWin;
  v23 = v22->m_spTimerFill.m_pObject;
  v24 = v22->m_spTimer.m_pObject;
  *(float *)&v25 = COERCE_FLOAT(((int (__thiscall *)(PgWinSpr *))v23->vfptr[41].__vecDelDtor)(v23));
  v26 = v23->vfptr;
  v25 -= 8;
  i = v25;
  v27 = (double)v25;
  v28 = v26[42].__vecDelDtor;
  *(float *)&arrayNum = v27;
  *(float *)&i = (double)(((int (__thiscall *)(PgWinSpr *))v28)(v23) - 10);
  result.g = *(float *)&arrayNum;
  v29 = *(float *)&i;
  v24->m_kLocal.m_Translate.x = *(float *)&arrayNum;
  result.b = v29;
  v24->m_kLocal.m_Translate.y = result.b;
  result.a = 1.0;
  v24->m_kLocal.m_Translate.z = 1.0;
  ((void (__stdcall *)(signed int))v2->m_pkDiceGameWin->m_spTimerFill.m_pObject->vfptr[64].__vecDelDtor)(1);
  v30 = *(_DWORD *)(HIDWORD(v71) + 1072);
  if ( *(_DWORD *)(v30 + 388) )
  {
    if ( *(_DWORD *)(v30 + 392) < 0x10u )
      v31 = (const char *)(v30 + 372);
    else
      v31 = *(const char **)(v30 + 372);
  }
  else
  {
    v31 = (const char *)(*(int (__thiscall **)(_DWORD))(**(_DWORD **)(v30 + 444) + 484))(*(_DWORD *)(v30 + 444));
  }
  v16 = strcmp(v31, (const char *)((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)()) == 0;
  v32 = v2->m_nMaxBetMoney;
  v2->m_bIsGusetStatus = !v16;
  if ( v32 )
  {
    v33 = MHDiceGameTask::GetMoneyToString(v2, &v75, v32);
    v76 = 0;
    if ( v33->_Myres >= 0x10 )
      v33 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v33->_Bx._Ptr;
    v34 = v33;
    v35 = (char *)TextData2::Get(0x7D8E7F83u);
    v36 = fs(v35, v34);
    v37 = v2->m_pkDiceGameWin->m_spTitleText.m_pObject;
    if ( v37 )
      ((void (__stdcall *)(char *))v37->vfptr[118].__vecDelDtor)(v36);
    v76 = -1;
    if ( v75._Myres >= 0x10 )
      operator delete(v75._Bx._Ptr);
    v75._Myres = 15;
    v75._Mysize = 0;
    v75._Bx._Buf[0] = 0;
  }
  v38 = v2->m_eDiceSaiGameStatus;
  v2->m_bIsResetTimer = 0;
  *(_WORD *)&v2->m_IsClockCastPlaying = 0;
  v2->m_IsBettingStartPlaying = 0;
  v2->m_bGameStartClick = 0;
  if ( v38 == 1 )
  {
    HIDWORD(v71) = v2->m_nLengthInOneGame - v2->m_nInterval;
    v2->m_fClockAlramTime = (double)SHIDWORD(v71);
    v39 = 0.0;
  }
  else
  {
    v39 = 0.0;
    v2->m_fClockAlramTime = 0.0;
  }
  v2->m_fClockCastTime = v39;
  *(_WORD *)&v2->m_bIsNonBettingOver = 0;
  v2->m_fTimerPosOnPregress = v39;
  if ( v38 == 1 )
  {
    v40 = ((int (*)(void))v2->m_pkDiceGameWin->m_spTimerFill.m_pObject->vfptr[36].__vecDelDtor)();
    v41 = v2->m_nInterval;
    v42 = v40 - 25;
    i = v2->m_nLengthInOneGame;
    HIDWORD(v71) = v40 - 25;
    v43 = (double)(unsigned int)(v40 - 25) / (double)i;
    v44 = v2->m_pkDiceGameWin;
    v2->m_fTimerPosOnPregress = (double)(i - v41) * v43 + v2->m_fTimerPosOnPregress;
    v45 = &v44->m_spTimerFill.m_pObject->vfptr;
    v46 = *v45;
    i = (int)v44->m_spTimer.m_pObject;
    v47 = ((int (__thiscall *)(NiRefObjectVtbl **))v46[41].__vecDelDtor)(v45);
    v48 = *v45;
    HIDWORD(v71) = v47;
    v49 = (double)v47;
    v50 = v48[42].__vecDelDtor;
    result.g = v49 + v2->m_fTimerPosOnPregress;
    HIDWORD(v71) = ((int (__thiscall *)(NiRefObjectVtbl **))v50)(v45) - 10;
    v51 = (double)SHIDWORD(v71);
    v52 = i;
    *(float *)(i + 88) = result.g;
    result.b = v51;
    *(float *)(v52 + 92) = result.b;
    result.a = 1.0;
    *(float *)(v52 + 96) = 1.0;
    v53 = v2->m_pkDiceGameWin->m_spTimerBack.m_pObject->vfptr[117].__vecDelDtor;
    v71 = (signed __int64)v2->m_fTimerPosOnPregress;
    ((void (__stdcall *)(_DWORD))v53)(v42 - v71);
    v54 = v2->m_pkDiceGameWin;
    v55 = v54->m_spTimerFill.m_pObject;
    v56 = v54->m_spTimerBack.m_pObject;
    HIDWORD(v71) = ((int (__thiscall *)(PgWinSpr *))v55->vfptr[41].__vecDelDtor)(v54->m_spTimerFill.m_pObject);
    v57 = v55->vfptr[42].__vecDelDtor;
    result.g = (double)SHIDWORD(v71) + v2->m_fTimerPosOnPregress + 8.0;
    HIDWORD(v71) = ((int (__thiscall *)(PgWinSpr *))v57)(v55);
    v58 = (double)SHIDWORD(v71);
  }
  else
  {
    v59 = v2->m_pkDiceGameWin;
    v2->m_fTimerPosOnPregress = v39;
    v60 = ((int (*)(void))v59->m_spTimerFill.m_pObject->vfptr[36].__vecDelDtor)();
    v61 = v2->m_pkDiceGameWin->m_spTimerBack.m_pObject->vfptr;
    v71 = (signed __int64)v2->m_fTimerPosOnPregress;
    ((void (__stdcall *)(_DWORD))v61[117].__vecDelDtor)(v60 - 7 - v71);
    v62 = v2->m_pkDiceGameWin;
    v63 = v62->m_spTimerFill.m_pObject;
    v56 = v62->m_spTimerBack.m_pObject;
    HIDWORD(v71) = ((int (__thiscall *)(PgWinSpr *))v63->vfptr[41].__vecDelDtor)(v62->m_spTimerFill.m_pObject);
    v64 = v63->vfptr[42].__vecDelDtor;
    result.g = (double)SHIDWORD(v71) + v2->m_fTimerPosOnPregress + 8.0;
    HIDWORD(v71) = ((int (__thiscall *)(PgWinSpr *))v64)(v63);
    v58 = (double)SHIDWORD(v71);
  }
  result.b = v58;
  v65 = result.b;
  v56->m_kLocal.m_Translate.x = result.g;
  result.a = 1.0;
  v56->m_kLocal.m_Translate.y = v65;
  v56->m_kLocal.m_Translate.z = 1.0;
  SoundMgr::PlayInterfaceSound(&g_kSoundMgr, DiceConnect);
  SoundMgr::StopBGM(&g_kSoundMgr);
  v66 = v2->m_eDiceSaiGameStatus;
  v2->m_bOutReserveOnMiniHouse = 0;
  v2->m_bComeinMHOnResultStauts = v66 == 2 || v66 == 3;
  *(_WORD *)&v2->m_bPrintDiceResult[0] = 0;
  v2->m_bPrintDiceResult[2] = 0;
  MiniHouseDiceGameWin::TurnOnLight(v2->m_pkDiceGameWin, 1, 0, 0);
  v67 = v2->m_pkDiceGameWin;
  v2->m_eBettingAmount = 0;
  MiniHouseDiceGameWin::OnBettingAmout(v67, 0, 0);
  MiniHouseDiceGameWin::EnableBetLevelBtn(v2->m_pkDiceGameWin, v2->m_nMaxBetMoney);
  v2->m_bIsEnterGameRoom = 1;
  v2->m_eDiceGameMode = 1;
  return 1;
}

//----- (006AF830) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall MHDiceGameTask::GetBettingInfo(MHDiceGameTask *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result, DICE_TAISAI_BETTING index)
{
  MHDiceGameTask *v3; // ebx@1
  DICE_TAISAI_BETTING v4; // edi@1
  NiUnsharedGeometryGroup *v5; // eax@2
  NiUnsharedGeometryGroup *v6; // eax@2
  NiUnsharedGeometryGroup *v7; // ST08_4@2
  char *v8; // eax@2
  const char *v9; // eax@2
  NiUnsharedGeometryGroup *v10; // eax@4
  NiUnsharedGeometryGroup *v11; // eax@4
  NiUnsharedGeometryGroup *v12; // ST08_4@4
  char *v13; // eax@4
  const char *v14; // eax@4
  NiUnsharedGeometryGroup *v15; // eax@6
  NiUnsharedGeometryGroup *v16; // eax@6
  NiUnsharedGeometryGroup *v17; // ST08_4@6
  char *v18; // eax@6
  const char *v19; // eax@6
  NiUnsharedGeometryGroup *v20; // eax@8
  NiUnsharedGeometryGroup *v21; // eax@8
  NiUnsharedGeometryGroup *v22; // ST08_4@8
  char *v23; // eax@8
  const char *v24; // eax@8
  NiUnsharedGeometryGroup *v25; // eax@10
  NiUnsharedGeometryGroup *v26; // eax@10
  NiUnsharedGeometryGroup *v27; // ST08_4@10
  char *v28; // eax@10
  const char *v29; // eax@10
  NiUnsharedGeometryGroup *v30; // eax@12
  NiUnsharedGeometryGroup *v31; // eax@12
  NiUnsharedGeometryGroup *v32; // eax@14
  NiUnsharedGeometryGroup *v33; // eax@14
  NiUnsharedGeometryGroup *v34; // ST08_4@14
  char *v35; // eax@14
  const char *v36; // eax@14
  NiUnsharedGeometryGroup *v37; // eax@15
  NiUnsharedGeometryGroup *v38; // eax@15
  MHDiceGameTask::DICE_GAME_MODE v39; // eax@16
  unsigned int v40; // eax@18
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v41; // eax@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v42; // ST08_4@23
  NiUnsharedGeometryGroup *v43; // eax@23
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v44; // eax@25
  unsigned int v45; // edi@26
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v46; // eax@28
  bool v47; // cf@28
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v48; // ST08_4@30
  NiUnsharedGeometryGroup *v49; // eax@30
  unsigned int v50; // eax@33
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v51; // eax@34
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v52; // ST08_4@36
  NiUnsharedGeometryGroup *v53; // eax@36
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > v55; // [sp+10h] [bp-13Ch]@25
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v56; // [sp+14h] [bp-138h]@1
  int v57; // [sp+18h] [bp-134h]@1
  unsigned __int16 _Keyval[2]; // [sp+1Ch] [bp-130h]@25
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v59; // [sp+20h] [bp-12Ch]@21
  char acStr[256]; // [sp+3Ch] [bp-110h]@23
  int v61; // [sp+148h] [bp-4h]@1

  result->_Myres = 15;
  result->_Mysize = 0;
  v3 = this;
  v56 = result;
  result->_Bx._Buf[0] = 0;
  v4 = index;
  v61 = 0;
  v57 = 1;
  if ( (signed int)index >= 2 )
  {
    if ( (signed int)index >= 4 )
    {
      if ( (signed int)index >= 10 )
      {
        if ( (signed int)index >= 16 )
        {
          if ( (signed int)index >= 17 )
          {
            if ( (signed int)index >= 31 )
            {
              if ( (signed int)index >= 46 )
              {
                v37 = TextData2::Get(0x8DEAA2C7);
                std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(
                  result,
                  (const char *)v37);
                std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(result, "\n");
                v38 = TextData2::Get(0x2F3DE70Bu);
                std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(
                  result,
                  (const char *)v38);
                std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(result, "\n");
              }
              else
              {
                v32 = TextData2::Get(0x2E507E74u);
                std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(
                  result,
                  (const char *)v32);
                std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(result, "\n");
                v33 = TextData2::Get(0x72F2D1B9u);
                std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(
                  result,
                  (const char *)v33);
                std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(result, "\n");
                v34 = TextData2::Get(0xF2F8202D);
                v35 = (char *)TextData2::Get(0x30481A25u);
                v36 = fs(v35, v34);
                std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(result, v36);
                std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(result, "\n");
              }
            }
            else
            {
              v30 = TextData2::Get(0xDFD0BEE9);
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(result, (const char *)v30);
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(result, "\n");
              v31 = TextData2::Get(0x3215028Bu);
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(result, (const char *)v31);
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(result, "\n");
            }
          }
          else
          {
            v25 = TextData2::Get(0x94A5C5C3);
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(result, (const char *)v25);
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(result, "\n");
            v26 = TextData2::Get(0xD8471808);
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(result, (const char *)v26);
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(result, "\n");
            v27 = TextData2::Get(0xF22C1D2D);
            v28 = (char *)TextData2::Get(0x30481A25u);
            v29 = fs(v28, v27);
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(result, v29);
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(result, "\n");
          }
        }
        else
        {
          v20 = TextData2::Get(0x354C7E7Bu);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
            result,
            (const char *)v20,
            strlen((const char *)v20));
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(result, "\n", 1u);
          v21 = TextData2::Get(0x79EED1C0u);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
            result,
            (const char *)v21,
            strlen((const char *)v21));
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(result, "\n", 1u);
          v22 = TextData2::Get(0x222D1C2Du);
          v23 = (char *)TextData2::Get(0x30481A25u);
          v24 = fs(v23, v22);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(result, v24, strlen(v24));
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(result, "\n", 1u);
          v4 = index;
        }
      }
      else
      {
        v15 = TextData2::Get(0x7D7870E5u);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
          result,
          (const char *)v15,
          strlen((const char *)v15));
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(result, "\n", 1u);
        v16 = TextData2::Get(0xC2BC1238);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
          result,
          (const char *)v16,
          strlen((const char *)v16));
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(result, "\n", 1u);
        v17 = TextData2::Get(0xF2F8232D);
        v18 = (char *)TextData2::Get(0x30481A25u);
        v19 = fs(v18, v17);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(result, v19, strlen(v19));
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(result, "\n", 1u);
        v4 = index;
      }
    }
    else
    {
      v10 = TextData2::Get(0x8F6E81D2);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
        result,
        (const char *)v10,
        strlen((const char *)v10));
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(result, "\n", 1u);
      v11 = TextData2::Get(0xD4B22325);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
        result,
        (const char *)v11,
        strlen((const char *)v11));
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(result, "\n", 1u);
      v12 = TextData2::Get(0xF2F81C2D);
      v13 = (char *)TextData2::Get(0x30481A25u);
      v14 = fs(v13, v12);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(result, v14, strlen(v14));
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(result, "\n", 1u);
      v4 = index;
    }
  }
  else
  {
    v5 = TextData2::Get(0x7495D5CEu);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
      result,
      (const char *)v5,
      strlen((const char *)v5));
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(result, "\n", 1u);
    v6 = TextData2::Get(0xB8372813);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
      result,
      (const char *)v6,
      strlen((const char *)v6));
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(result, "\n", 1u);
    v7 = TextData2::Get(0xF2F81C2D);
    v8 = (char *)TextData2::Get(0x30481A25u);
    v9 = fs(v8, v7);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(result, v9, strlen(v9));
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(result, "\n", 1u);
    v4 = index;
  }
  v39 = v3->m_eDiceGameMode;
  if ( v39 != 2 && v39 != 4 )
    v40 = DiceTaiSaiDividind::get_MaxBettingMoney(&v3->m_Dividind, v4, v3->m_nMaxBetMoney);
  else
    v40 = DiceTaiSaiDividind::get_MaxBettingMoney(&v3->m_GBDividind, v4, v3->m_nMaxBetMoney);
  if ( v40 )
  {
    v41 = MHDiceGameTask::GetMoneyToString(v3, &v59, v40);
    v61 = 1;
    if ( v41->_Myres >= 0x10 )
      v41 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v41->_Bx._Ptr;
    v42 = v41;
    v43 = TextData2::Get(0xFAE5AB1B);
    sprintf(acStr, (const char *)v43, v42);
    LOBYTE(v61) = 0;
    if ( v59._Myres >= 0x10 )
      operator delete(v59._Bx._Ptr);
  }
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(result, acStr, strlen(acStr));
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(result, "\n", 1u);
  *(_DWORD *)_Keyval = g_pkMainChar->m_kHandle;
  v44 = std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::find(
          (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v3->map_ParticipantInfo.comp,
          &v55,
          _Keyval)->_Ptr;
  if ( v44 == v3->map_ParticipantInfo._Myhead )
  {
    v45 = 0;
  }
  else
  {
    v45 = v44->_Myval.second.m_BettingInfo.nBetMoney[index];
    if ( v45 )
    {
      v46 = MHDiceGameTask::GetMoneyToString(v3, &v59, v44->_Myval.second.m_BettingInfo.nBetMoney[index]);
      v47 = v46->_Myres < 0x10;
      v61 = 2;
      if ( !v47 )
        v46 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v46->_Bx._Ptr;
      v48 = v46;
      v49 = TextData2::Get(0x33521D16u);
      sprintf(acStr, (const char *)v49, v48);
      LOBYTE(v61) = 0;
      if ( v59._Myres >= 0x10 )
        operator delete(v59._Bx._Ptr);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(result, acStr, strlen(acStr));
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(result, "\n", 1u);
    }
  }
  v50 = MHDiceGameTask::GetTotalBettingMoney(v3, index) - v45;
  if ( v50 )
  {
    v51 = MHDiceGameTask::GetMoneyToString(v3, &v59, v50);
    v61 = 3;
    if ( v51->_Myres >= 0x10 )
      v51 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v51->_Bx._Ptr;
    v52 = v51;
    v53 = TextData2::Get(0x4E2EFD57u);
    sprintf(acStr, (const char *)v53, v52);
    LOBYTE(v61) = 0;
    if ( v59._Myres >= 0x10 )
      operator delete(v59._Bx._Ptr);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(result, acStr, strlen(acStr));
  }
  return result;
}

//----- (006AFF60) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_LARGE_AMOUNT_CMD(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_LARGE_AMOUNT_CMD *pkProto)
{
  PgFrameWork *v2; // eax@2
  bool v3; // zf@2
  GameFrameWork *v4; // ebx@2
  unsigned int *v5; // edi@3
  Char *v6; // esi@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v7; // eax@6
  bool v8; // cf@6
  int v9; // edi@7
  D3DXCOLOR *v10; // eax@9
  D3DXCOLOR v11; // ST0C_16@9
  int v12; // ST04_4@9
  char *v13; // eax@9
  char *v14; // eax@9
  PgWin *v15; // ST18_4@11
  int v16; // edx@12
  D3DXCOLOR v18; // [sp+10h] [bp-4Ch]@9
  PROTO_NC_DICE_TAISAI_LARGE_AMOUNT_CMD *v19; // [sp+20h] [bp-3Ch]@1
  MHDiceGameTask *v20; // [sp+24h] [bp-38h]@1
  int i; // [sp+28h] [bp-34h]@2
  char *v22; // [sp+2Ch] [bp-30h]@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+30h] [bp-2Ch]@6
  int v24; // [sp+58h] [bp-4h]@6

  v20 = this;
  v19 = pkProto;
  if ( pkProto )
  {
    v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v3 = pkProto->nGamerCnt == 0;
    v4 = (GameFrameWork *)v2;
    i = 0;
    if ( !v3 )
    {
      v5 = (unsigned int *)&pkProto[3];
      v22 = &pkProto[3].nGamerCnt;
      do
      {
        v6 = CharMgr::GetChar(&g_kCharMgr, *((_WORD *)v5 - 1));
        if ( v6 && *v5 )
        {
          v7 = MHDiceGameTask::GetMoneyToString(v20, &result, *v5);
          v8 = v7->_Myres < 0x10;
          v24 = 0;
          if ( v8 )
            v9 = (int)v7;
          else
            v9 = (int)v7->_Bx._Ptr;
          v10 = ColorInfoTable::GetDxColor(&v18, Center_Announcement);
          *(_QWORD *)&v11.r = *(_QWORD *)&v10->r;
          *(_QWORD *)&v11.b = *(_QWORD *)&v10->b;
          v12 = ((int (__thiscall *)(Char *))v6->vfptr[2].DeleteAbStateByAbstateIndex)(v6);
          v13 = (char *)TextData2::Get(0x4746208Au);
          v14 = fs(v13, v12, v9);
          GameFrameWork::AddAnnounceMsg(v4, v9, (int)v6, v14, v11);
          v24 = -1;
          if ( result._Myres >= 0x10 )
            operator delete(result._Bx._Ptr);
          v15 = (PgWin *)&v4->m_pkAnnounceWin->vfptr;
          result._Myres = 15;
          result._Mysize = 0;
          result._Bx._Buf[0] = 0;
          PgWinMgr::SetTopWin(&Pgg_kWinMgr, v15);
          v5 = (unsigned int *)v22;
        }
        v16 = v19->nGamerCnt;
        v5 = (unsigned int *)((char *)v5 + 6);
        ++i;
        v22 = (char *)v5;
      }
      while ( i < v16 );
    }
  }
  return 1;
}

//----- (006B00E0) --------------------------------------------------------
void __thiscall MHDiceGameTask::~MHDiceGameTask(MHDiceGameTask *this)
{
  MHDiceGameTask *v1; // esi@1
  PgWin *v2; // edi@1
  PgWin *v3; // edi@5
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > v4; // ST08_4@9
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > v5; // ST04_4@9
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > v6; // ST08_4@9
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > v7; // ST04_4@9
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > result; // [sp+10h] [bp-18h]@9
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > v9; // [sp+14h] [bp-14h]@9
  MHDiceGameTask *v10; // [sp+18h] [bp-10h]@1
  int v11; // [sp+24h] [bp-4h]@1

  v1 = this;
  v10 = this;
  this->vfptr = (NiRefObjectVtbl *)&MHDiceGameTask::`vftable'{for `NiRefObject'};
  this->vfptr = (IDirectMessengerVtbl *)&MHDiceGameTask::`vftable'{for `IDirectMessenger'};
  v11 = 6;
  ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&this->m_GBDividind);
  v2 = v1->m_spLowLevelWarnigWin.m_pObject;
  LOBYTE(v11) = 5;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_spExitConfirmWin.m_pObject;
  LOBYTE(v11) = 4;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v1->m_Dividind);
  LOBYTE(v11) = 2;
  ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v1->m_DiceTaiSai);
  v9._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *)&v1->map_BettingReq;
  v4._Ptr = (std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *)v1->map_BettingReq._Myhead;
  v5._Ptr = (std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *)v1->map_BettingReq._Myhead->_Left;
  LOBYTE(v11) = 7;
  std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *)&v1->map_BettingReq,
    &result,
    v5,
    v4);
  operator delete(v1->map_BettingReq._Myhead);
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *)&v1->map_ParticipantInfo;
  v6._Ptr = v1->map_ParticipantInfo._Myhead;
  v7._Ptr = v1->map_ParticipantInfo._Myhead->_Left;
  LOBYTE(v11) = 8;
  std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v1->map_ParticipantInfo.comp,
    &v9,
    v7,
    v6);
  operator delete(v1->map_ParticipantInfo._Myhead);
  v11 = -1;
  ITask::~ITask((ITask *)&v1->vfptr);
}
// 9BED14: using guessed type void (__thiscall *MHDiceGameTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9BED30: using guessed type int (__thiscall *MHDiceGameTask::`vftable'{for `NiRefObject'})(void *p, char);

//----- (006B0210) --------------------------------------------------------
void __thiscall MHDiceGameTask::MHDiceGameTask(MHDiceGameTask *this)
{
  MHDiceGameTask *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *v3; // eax@2
  PgWin *v4; // edi@3
  PgWin *v5; // edi@8
  std::exception v6; // [sp+10h] [bp-30h]@16
  std::exception pExceptionObject; // [sp+1Ch] [bp-24h]@14
  MHDiceGameTask *v8; // [sp+28h] [bp-18h]@1
  char *v9; // [sp+2Ch] [bp-14h]@16
  char *_What; // [sp+30h] [bp-10h]@14
  int v11; // [sp+3Ch] [bp-4h]@1

  v1 = this;
  v8 = this;
  ITask::ITask((ITask *)&this->vfptr, 0);
  v1->vfptr = (NiRefObjectVtbl *)&MHDiceGameTask::`vftable'{for `NiRefObject'};
  v1->vfptr = (IDirectMessengerVtbl *)&MHDiceGameTask::`vftable'{for `IDirectMessenger'};
  v11 = 0;
  v1->map_ParticipantInfo._Mysize = 0;
  v2 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *)operator new(0xECu);
  if ( !v2 )
  {
    v9 = 0;
    std::exception::exception(&v6, (const char *const *)&v9);
    v6.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&v6, &_TI2_AVbad_alloc_std__);
  }
  v1->map_ParticipantInfo._Myhead = v2;
  v2->_Left = v2;
  v1->map_ParticipantInfo._Myhead->_Parent = v1->map_ParticipantInfo._Myhead;
  v1->map_ParticipantInfo._Myhead->_Right = v1->map_ParticipantInfo._Myhead;
  v1->map_ParticipantInfo._Myhead->_Color = 1;
  v1->map_ParticipantInfo._Myhead->_Isnil = 1;
  LOBYTE(v11) = 1;
  v1->map_BettingReq._Mysize = 0;
  v3 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *)operator new(0x1Cu);
  if ( !v3 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->map_BettingReq._Myhead = v3;
  v3->_Left = v3;
  v1->map_BettingReq._Myhead->_Parent = v1->map_BettingReq._Myhead;
  v1->map_BettingReq._Myhead->_Right = v1->map_BettingReq._Myhead;
  v1->map_BettingReq._Myhead->_Color = 1;
  v1->map_BettingReq._Myhead->_Isnil = 1;
  NiStepBoolKey::NiStepBoolKey((NiDX9SourceTextureData *)&v1->m_DiceTaiSai);
  DiceTaiSaiDividind::DiceTaiSaiDividind(&v1->m_Dividind);
  v1->m_kTimer.m_fStartTime = 0.0;
  v1->m_kTimer.m_fObjectTime = 0.0;
  v1->m_kTimer.m_fElapsedTime = 0.0;
  v1->m_spExitConfirmWin.m_pObject = 0;
  v1->m_spLowLevelWarnigWin.m_pObject = 0;
  LOBYTE(v11) = 6;
  DiceTaiSaiDividind::DiceTaiSaiDividind(&v1->m_GBDividind);
  v1->m_pkDiceHelpWin = 0;
  v1->m_pkMiniGameWin = 0;
  v1->m_pkDiceGameWin = 0;
  v1->m_pkDiceRankWin = 0;
  v1->m_pkDiceRateSheetWin = 0;
  v1->m_pkNpcDlgWin = 0;
  v1->m_eStatusOfInfoTrans = 0;
  v1->m_nReqCount = 0;
  v4 = v1->m_spExitConfirmWin.m_pObject;
  LOBYTE(v11) = 7;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spExitConfirmWin.m_pObject = 0;
  }
  v5 = v1->m_spLowLevelWarnigWin.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spLowLevelWarnigWin.m_pObject = 0;
  }
  v1->m_pkSlotMachineWin = 0;
  v1->m_fDiplayLightTime = 0.0;
  v1->m_pkGBSlotHelpWin = 0;
  v1->m_fDiceResultTime = 0.0;
  v1->m_pkGBSlotRankWin = 0;
  v1->m_pkMiniSlotMachineWin = 0;
  *(_WORD *)&v1->m_bIsNonBettingOver = 0;
  v1->m_bIsEnterGameRoom = 0;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9BED14: using guessed type void (__thiscall *MHDiceGameTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9BED30: using guessed type int (__thiscall *MHDiceGameTask::`vftable'{for `NiRefObject'})(void *p, char);

//----- (006B0430) --------------------------------------------------------
void __cdecl MHDiceGameTask::Create(IDirectMessenger *pkMsgHooker)
{
  int v1; // eax@1
  MHDiceGameTask *v2; // eax@2
  int v3; // eax@3
  int v4; // esi@3
  void (__thiscall ***v5)(_DWORD, _DWORD); // edi@7

  v1 = MHDiceGameTask::ms_spMHDiceGameTask;
  if ( MHDiceGameTask::ms_spMHDiceGameTask )
  {
LABEL_13:
    (**(void (__stdcall ***)(IDirectMessenger *))(v1 + 8))(pkMsgHooker);
    return;
  }
  v2 = (MHDiceGameTask *)operator new(0x15D8u);
  if ( v2 )
  {
    MHDiceGameTask::MHDiceGameTask(v2);
    v4 = v3;
  }
  else
  {
    v4 = 0;
  }
  v1 = MHDiceGameTask::ms_spMHDiceGameTask;
  if ( MHDiceGameTask::ms_spMHDiceGameTask == v4 )
  {
LABEL_12:
    if ( !v1 )
      return;
    goto LABEL_13;
  }
  if ( MHDiceGameTask::ms_spMHDiceGameTask )
  {
    v5 = (void (__thiscall ***)(_DWORD, _DWORD))MHDiceGameTask::ms_spMHDiceGameTask;
    if ( !InterlockedDecrement((volatile LONG *)(MHDiceGameTask::ms_spMHDiceGameTask + 4)) )
    {
      if ( v5 )
        (**v5)(v5, 1);
    }
  }
  MHDiceGameTask::ms_spMHDiceGameTask = v4;
  if ( v4 )
  {
    InterlockedIncrement((volatile LONG *)(v4 + 4));
    v1 = MHDiceGameTask::ms_spMHDiceGameTask;
    goto LABEL_12;
  }
}
// B5BDC4: using guessed type int MHDiceGameTask::ms_spMHDiceGameTask;

//----- (006B0500) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_RANK_ACK(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_RANK_ACK *pkProto)
{
  MHDiceGameTask *v2; // esi@1

  v2 = this;
  if ( pkProto->nError == 7448 && this->m_pkDiceGameWin )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkDiceRankWin->vfptr[65].__vecDelDtor)() )
      PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkDiceRankWin->vfptr);
    else
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkDiceRankWin->vfptr);
    mhDiceRankWin::UpdateRankList(v2->m_pkDiceRankWin, pkProto);
    mhDiceRankWin::UpdateViewList(v2->m_pkDiceRankWin);
  }
  return 1;
}

//----- (006B0570) --------------------------------------------------------
bool __userpurge MHDiceGameTask::OnProcessNetMsg@<al>(MHDiceGameTask *this@<ecx>, int a2@<edi>, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  bool result; // al@5

  if ( iDepart == 4 )
  {
    if ( iCommand != 222 )
      return 0;
    MHDiceGameTask::Recv_NC_CHAR_CLIENT_COININFO_CMD((PROTO_NC_CHAR_COININFO_CMD *)pvData);
    return 1;
  }
  if ( iDepart == 43 )
  {
    switch ( iCommand )
    {
      case 2:
        MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_JOIN_ACK(this, (PROTO_NC_DICE_TAISAI_GAME_JOIN_ACK *)pvData);
        return 1;
      case 3:
        MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_JOIN_CMD(this, (PROTO_NC_DICE_TAISAI_GAME_JOIN_CMD *)pvData);
        return 1;
      case 4:
        MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_BETTING_INFO_CMD(
          this,
          (PROTO_NC_DICE_TAISAI_GAME_BETTING_INFO_CMD *)pvData);
        return 1;
      case 5:
        MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_LEAVE_REQ(this, a2);
        return 1;
      case 6:
        MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_LEAVE_ACK(this, (PROTO_NC_DICE_TAISAI_GAME_LEAVE_ACK *)pvData);
        return 1;
      case 7:
        MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_LEAVE_CMD(this, (PROTO_NC_DICE_TAISAI_GAME_LEAVE_CMD *)pvData);
        return 1;
      case 25:
        MHDiceGameTask::Recv_NC_DICE_TAISAI_RANK_ACK(this, (PROTO_NC_DICE_TAISAI_RANK_ACK *)pvData);
        return 1;
      case 27:
        MHDiceGameTask::Recv_NC_DICE_TAISAI_BETTING_ACK(this, (PROTO_NC_DICE_TAISAI_BETTING_ACK *)pvData);
        return 1;
      case 28:
        MHDiceGameTask::Recv_NC_DICE_TAISAI_BETTING_CMD(this, (PROTO_NC_DICE_TAISAI_BETTING_CMD *)pvData);
        return 1;
      case 30:
        MHDiceGameTask::Recv_NC_DICE_TAISAI_BETTING_CANCEL_ACK(this, (PROTO_NC_DICE_TAISAI_BETTING_CANCEL_ACK *)pvData);
        return 1;
      case 31:
        MHDiceGameTask::Recv_NC_DICE_TAISAI_BETTING_CANCEL_CMD(this, (PROTO_NC_DICE_TAISAI_BETTING_CANCEL_CMD *)pvData);
        return 1;
      case 33:
        MHDiceGameTask::Recv_NC_DICE_TAISAI_DICE_ROLL_ACK(this, (PROTO_NC_DICE_TAISAI_DICE_ROLL_ACK *)pvData);
        return 1;
      case 34:
        MHDiceGameTask::Recv_NC_DICE_TAISAI_DICE_ROLL_CMD(this, (PROTO_NC_DICE_TAISAI_DICE_ROLL_CMD *)pvData);
        return 1;
      case 38:
        MHDiceGameTask::Recv_NC_DICE_TAISAI_DICE_ROLL_RESULT_CMD(
          this,
          (PROTO_NC_DICE_TAISAI_DICE_ROLL_RESULT_CMD *)pvData);
        return 1;
      case 39:
        MHDiceGameTask::Recv_NC_DICE_TAISAI_DICE_ROLL_RESULT_EMOTION_CMD((PROTO_NC_DICE_TAISAI_DICE_ROLL_RESULT_EMOTION_CMD *)pvData);
        return 1;
      case 42:
        MHDiceGameTask::Recv_NC_DICE_TAISAI_LARGE_AMOUNT_CMD(this, (PROTO_NC_DICE_TAISAI_LARGE_AMOUNT_CMD *)pvData);
        return 1;
      case 43:
        MHDiceGameTask::Recv_NC_DICE_TAISAI_BET_START_CMD(this, a2, (PROTO_NC_DICE_TAISAI_BET_START_CMD *)pvData);
        return 1;
      case 44:
        MHDiceGameTask::Recv_NC_DICE_TAISAI_TIMER_CMD(this, (PROTO_NC_DICE_TAISAI_TIMER_CMD *)pvData);
        return 1;
      case 14:
        MHDiceGameTask::Recv_NC_DICE_TAISAI_EXPECT_INCOME_MONEY_ACK((PROTO_NC_DICE_TAISAI_EXPECT_INCOME_MONEY_ACK *)pvData);
        return 1;
      case 18:
        MHDiceGameTask::Recv_NC_DICE_TAISAI_RECEIPT_INCOME_MONEY_ACK((PROTO_NC_DICE_TAISAI_RECEIPT_INCOME_MONEY_ACK *)pvData);
        return 1;
      case 10:
        MHDiceGameTask::Recv_NC_DICE_TAISAI_BOARD_FOLD_CMD(this, (PROTO_NC_DICE_TAISAI_BOARD_FOLD_CMD *)pvData);
        return 1;
      default:
        return 0;
      case 8:
      case 9:
        return 1;
    }
    return 1;
  }
  if ( iDepart != 47 )
    return 0;
  switch ( iCommand )
  {
    case 3:
      MHDiceGameTask::Recv_NC_GAMBLE_GAMBLEHOUSE_EXIT_ACK(this, (PROTO_NC_GAMBLE_GAMBLEHOUSE_EXIT_ACK *)pvData);
      result = 1;
      break;
    case 4:
      MHDiceGameTask::Recv_NC_GAMBLE_COIN_CHANGE_CMD((PROTO_NC_GAMBLE_COIN_CHANGE_CMD *)pvData);
      result = 1;
      break;
    case 5:
      MHDiceGameTask::Recv_NC_GAMBLE_EXCHANGECOIN_CHANGE_CMD((PROTO_NC_GAMBLE_EXCHANGECOIN_CHANGE_CMD *)pvData);
      result = 1;
      break;
    case 12:
      MHDiceGameTask::Recv_NC_GAMBLE_COIN_EXCHANGEMACHINE_UI_OPEN_CMD((PROTO_NC_GAMBLE_COIN_EXCHANGEMACHINE_UI_OPEN_CMD *)pvData);
      result = 1;
      break;
    case 16:
      MHDiceGameTask::Recv_NC_GAMBLE_COIN_BUY_ACK((PROTO_NC_GAMBLE_COIN_BUY_ACK *)pvData);
      result = 1;
      break;
    case 20:
      MHDiceGameTask::Recv_NC_GAMBLE_COIN_SELL_ACK((PROTO_NC_GAMBLE_COIN_SELL_ACK *)pvData);
      result = 1;
      break;
    case 24:
      MHDiceGameTask::Recv_NC_GAMBLE_TYPE_AND_WHERE_STAND_ACK(this, (PROTO_NC_GAMBLE_TYPE_AND_WHERE_STAND_ACK *)pvData);
      result = 1;
      break;
    case 14:
      MHDiceGameTask::Recv_NC_GAMBLE_COIN_VIPCARD_UI_OPEN_ACK((PROTO_NC_GAMBLE_COIN_VIPCARD_UI_OPEN_ACK *)pvData);
      result = 1;
      break;
    case 101:
      MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_GAME_JOIN_ACK(
        this,
        (PROTO_NC_GAMBLE_DICE_TAISAI_GAME_JOIN_ACK *)pvData);
      result = 1;
      break;
    case 102:
      MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_GAME_JOIN_CMD(
        this,
        (PROTO_NC_GAMBLE_DICE_TAISAI_GAME_JOIN_CMD *)pvData);
      result = 1;
      break;
    case 103:
      MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_GAME_BETTING_INFO_CMD(
        this,
        (PROTO_NC_GAMBLE_DICE_TAISAI_GAME_BETTING_INFO_CMD *)pvData);
      result = 1;
      break;
    case 105:
      MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_GAME_LEAVE_ACK(
        this,
        (PROTO_NC_GAMBLE_DICE_TAISAI_GAME_LEAVE_ACK *)pvData);
      result = 1;
      break;
    case 106:
      MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_GAME_LEAVE_CMD(
        this,
        (PROTO_NC_GAMBLE_DICE_TAISAI_GAME_LEAVE_CMD *)pvData);
      result = 1;
      break;
    case 110:
      MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_ALL_RANK_ACK(this, (PROTO_NC_GAMBLE_DICE_TAISAI_ALL_RANK_ACK *)pvData);
      result = 1;
      break;
    case 112:
      MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_CURR_RANK_ACK(
        this,
        (PROTO_NC_GAMBLE_DICE_TAISAI_CURR_RANK_ACK *)pvData);
      result = 1;
      break;
    case 114:
      MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_BETTING_ACK(this, (PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_ACK *)pvData);
      result = 1;
      break;
    case 115:
      MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_BETTING_CMD(this, (PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CMD *)pvData);
      result = 1;
      break;
    case 117:
      MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_ACK(
        this,
        (PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_ACK *)pvData);
      result = 1;
      break;
    case 118:
      MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_CMD(
        this,
        (PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_CMD *)pvData);
      result = 1;
      break;
    case 123:
      MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_DICE_ROLL_RESULT_CMD(
        this,
        (PROTO_NC_GAMBLE_DICE_TAISAI_DICE_ROLL_RESULT_CMD *)pvData);
      result = 1;
      break;
    case 124:
      MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_DICE_ROLL_RESULT_EMOTION_CMD((PROTO_NC_GAMBLE_DICE_TAISAI_DICE_ROLL_RESULT_EMOTION_CMD *)pvData);
      result = 1;
      break;
    case 126:
      MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_LARGE_AMOUNT_ACK((PROTO_NC_GAMBLE_DICE_TAISAI_LARGE_AMOUNT_ACK *)pvData);
      result = 1;
      break;
    case 127:
      MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_LARGE_AMOUNT_CMD(
        this,
        (PROTO_NC_GAMBLE_DICE_TAISAI_LARGE_AMOUNT_CMD *)pvData);
      result = 1;
      break;
    case 128:
      MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_BET_START_CMD(
        this,
        a2,
        (PROTO_NC_GAMBLE_DICE_TAISAI_BET_START_CMD *)pvData);
      result = 1;
      break;
    case 129:
      MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_TIMER_CMD(this, (PROTO_NC_GAMBLE_DICE_TAISAI_TIMER_CMD *)pvData);
      result = 1;
      break;
    case 119:
      MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_DICE_ROLL_CMD(
        this,
        (PROTO_NC_GAMBLE_DICE_TAISAI_DICE_ROLL_CMD *)pvData);
      result = 1;
      break;
    case 28:
      MHDiceGameTask::Recv_NC_GAMBLE_ENTER_PLAYER_DIRECT_CMD((PROTO_NC_GAMBLE_ENTER_PLAYER_DIRECT_CMD *)pvData);
      result = 1;
      break;
    case 27:
      MHDiceGameTask::Recv_NC_GAMBLE_COIN_USE_COINITEM_MESSAGE_CMD((PROTO_NC_GAMBLE_COIN_USE_COINITEM_MESSAGE_CMD *)pvData);
      result = 1;
      break;
    case 201:
      MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_GAME_JOIN_ACK(
        this,
        (PROTO_NC_GAMBLE_SLOTMACHINE_GAME_JOIN_ACK *)pvData);
      result = 1;
      break;
    case 203:
      MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_GAME_LEAVE_ACK(
        this,
        (PROTO_NC_GAMBLE_SLOTMACHINE_GAME_LEAVE_ACK *)pvData);
      result = 1;
      break;
    case 205:
      MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_START_ACK(this, (PROTO_NC_GAMBLE_SLOTMACHINE_START_ACK *)pvData);
      result = 1;
      break;
    case 207:
      MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_STOPBUTTON_ACK(
        this,
        (PROTO_NC_GAMBLE_SLOTMACHINE_STOPBUTTON_ACK *)pvData);
      result = 1;
      break;
    case 209:
      MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_WHEELSTOP_ACK(
        this,
        (PROTO_NC_GAMBLE_SLOTMACHINE_WHEELSTOP_ACK *)pvData);
      result = 1;
      break;
    case 210:
      MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_STAND_UP_CMD((PROTO_NC_GAMBLE_SLOTMACHINE_STAND_UP_CMD *)pvData);
      result = 1;
      break;
    case 216:
      MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_JACKPOTINFO_CMD(
        this,
        (PROTO_NC_GAMBLE_SLOTMACHINE_JACKPOTINFO_CMD *)pvData);
      result = 1;
      break;
    case 218:
      MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_JACKPOTRANKING_ACK(
        this,
        (PROTO_NC_GAMBLE_SLOTMACHINE_JACKPOTRANKING_ACK *)pvData);
      result = 1;
      break;
    case 220:
      MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_WINRANKING_ACK(
        this,
        (PROTO_NC_GAMBLE_SLOTMACHINE_WINRANKING_ACK *)pvData);
      result = 1;
      break;
    case 221:
      MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_SOMEONE_GET_JACKPOT_CMD((PROTO_NC_GAMBLE_SLOTMACHINE_SOMEONE_GET_JACKPOT_CMD *)pvData);
      result = 1;
      break;
    case 30:
      MHDiceGameTask::Recv_NC_GAMBLE_PLAYERACT_CMD((PROTO_NC_GAMBLE_PLAYERACT_CMD *)pvData);
      result = 1;
      break;
    default:
      return 0;
  }
  return result;
}

//----- (006B0B70) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Max(std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *_Pnode)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *i; // ecx@1

  result = _Pnode;
  for ( i = _Pnode->_Right; !i->_Isnil; i = i->_Right )
    result = i;
  return result;
}

//----- (006B0BA0) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Min(std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *_Pnode)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v2; // ecx@1

  result = _Pnode;
  v2 = _Pnode->_Left;
  if ( !_Pnode->_Left->_Isnil )
  {
    do
    {
      result = v2;
      v2 = v2->_Left;
    }
    while ( !v2->_Isnil );
  }
  return result;
}

//----- (006B0BC0) --------------------------------------------------------
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>,std::_Iterator_base0>::operator++(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >,std::_Iterator_base0> *this)
{
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >,std::_Iterator_base0> *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v2; // edx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v3; // ecx@2
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v4; // edx@3
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *i; // edx@6

  result = this;
  v2 = this->_Ptr;
  if ( !this->_Ptr->_Isnil )
  {
    v3 = v2->_Right;
    if ( v3->_Isnil )
    {
      for ( i = v2->_Parent; !i->_Isnil; i = i->_Parent )
      {
        if ( result->_Ptr != i->_Right )
          break;
        result->_Ptr = i;
      }
      result->_Ptr = i;
    }
    else
    {
      v4 = v3->_Left;
      if ( !v3->_Left->_Isnil )
      {
        do
        {
          v3 = v4;
          v4 = v4->_Left;
        }
        while ( !v4->_Isnil );
      }
      result->_Ptr = v3;
    }
  }
  return result;
}

//----- (006B0C20) --------------------------------------------------------
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>,std::_Iterator_base0>::operator--(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >,std::_Iterator_base0> *this)
{
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >,std::_Iterator_base0> *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v2; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *i; // edx@3
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v4; // ecx@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v5; // edx@5

  result = this;
  v2 = this->_Ptr;
  if ( v2->_Isnil )
  {
    result->_Ptr = v2->_Right;
    return result;
  }
  i = v2->_Left;
  if ( !v2->_Left->_Isnil )
  {
    v4 = i->_Right;
    if ( !v4->_Isnil )
    {
      do
      {
        v5 = v4;
        v4 = v4->_Right;
      }
      while ( !v4->_Isnil );
      result->_Ptr = v5;
      return result;
    }
LABEL_11:
    result->_Ptr = i;
    return result;
  }
  for ( i = v2->_Parent; !i->_Isnil; i = i->_Parent )
  {
    if ( result->_Ptr != i->_Left )
      break;
    result->_Ptr = i;
  }
  if ( !result->_Ptr->_Isnil )
    goto LABEL_11;
  return result;
}

//----- (006B0CA0) --------------------------------------------------------
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>,std::_Iterator_base0>::operator--(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *this)
{
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v2; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *i; // edx@3
  std::_Tree_nod<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v4; // ecx@4
  std::_Tree_nod<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v5; // edx@5

  result = this;
  v2 = this->_Ptr;
  if ( v2->_Isnil )
  {
    result->_Ptr = v2->_Right;
    return result;
  }
  i = v2->_Left;
  if ( !v2->_Left->_Isnil )
  {
    v4 = i->_Right;
    if ( !v4->_Isnil )
    {
      do
      {
        v5 = v4;
        v4 = v4->_Right;
      }
      while ( !v4->_Isnil );
      result->_Ptr = v5;
      return result;
    }
LABEL_11:
    result->_Ptr = i;
    return result;
  }
  for ( i = v2->_Parent; !i->_Isnil; i = i->_Parent )
  {
    if ( result->_Ptr != i->_Left )
      break;
    result->_Ptr = i;
  }
  if ( !result->_Ptr->_Isnil )
    goto LABEL_11;
  return result;
}

//----- (006B0D00) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Rrotate(std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *_Wherenode)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v4; // ecx@3
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v5; // ecx@5

  v2 = _Wherenode->_Left;
  _Wherenode->_Left = _Wherenode->_Left->_Right;
  v3 = v2->_Right;
  if ( !v3->_Isnil )
    v3->_Parent = _Wherenode;
  v2->_Parent = _Wherenode->_Parent;
  v4 = this->_Myhead;
  if ( _Wherenode == v4->_Parent )
  {
    v4->_Parent = v2;
    v2->_Right = _Wherenode;
    _Wherenode->_Parent = v2;
  }
  else
  {
    v5 = _Wherenode->_Parent;
    if ( _Wherenode == v5->_Right )
    {
      v5->_Right = v2;
      v2->_Right = _Wherenode;
      _Wherenode->_Parent = v2;
    }
    else
    {
      v5->_Left = v2;
      v2->_Right = _Wherenode;
      _Wherenode->_Parent = v2;
    }
  }
}

//----- (006B0D60) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Rrotate(std::_Tree<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this, std::_Tree_nod<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *_Wherenode)
{
  std::_Tree_nod<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v4; // ecx@3
  std::_Tree_nod<std::_Tmap_traits<PgNsTerrain::val,float,PgNsTerrain::EVGLess,boost::fast_pool_allocator<std::pair<PgNsTerrain::val,float>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v5; // ecx@5

  v2 = _Wherenode->_Left;
  _Wherenode->_Left = _Wherenode->_Left->_Right;
  v3 = v2->_Right;
  if ( !v3->_Isnil )
    v3->_Parent = _Wherenode;
  v2->_Parent = _Wherenode->_Parent;
  v4 = this->_Myhead;
  if ( _Wherenode == v4->_Parent )
  {
    v4->_Parent = v2;
    v2->_Right = _Wherenode;
    _Wherenode->_Parent = v2;
  }
  else
  {
    v5 = _Wherenode->_Parent;
    if ( _Wherenode == v5->_Right )
    {
      v5->_Right = v2;
      v2->_Right = _Wherenode;
      _Wherenode->_Parent = v2;
    }
    else
    {
      v5->_Left = v2;
      v2->_Right = _Wherenode;
      _Wherenode->_Parent = v2;
    }
  }
}

//----- (006B0DC0) --------------------------------------------------------
unsigned int __cdecl ITableBase<DICE_Dividind,DiceDividIndTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<DICE_Dividind,DiceDividIndTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C1C4: using guessed type int ITableBase<DICE_Dividind,DiceDividIndTab>::ms_pkTable;

//----- (006B0DE0) --------------------------------------------------------
unsigned int __cdecl ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C1C8: using guessed type int ITableBase<GB_DICE_Dividind,GBDiceDividIndTab>::ms_pkTable;

//----- (006B0E00) --------------------------------------------------------
DICE_Dividind *__cdecl DiceDividIndTab::GetByIndex(unsigned int uiIndex)
{
  unsigned int v1; // esi@1
  DICE_Dividind *result; // eax@4

  v1 = uiIndex;
  if ( uiIndex >= ITableBase<DICE_Dividind,DiceDividIndTab>::GetTotal() )
  {
LABEL_4:
    result = 0;
  }
  else
  {
    while ( !CDataReader::GetRecord((CDataReader *)(ITableBase<DICE_Dividind,DiceDividIndTab>::ms_pkTable + 4), v1) )
    {
      if ( ++v1 >= ITableBase<DICE_Dividind,DiceDividIndTab>::GetTotal() )
        goto LABEL_4;
    }
    result = (DICE_Dividind *)CDataReader::GetRecord(
                                (CDataReader *)(ITableBase<DICE_Dividind,DiceDividIndTab>::ms_pkTable + 4),
                                v1);
  }
  return result;
}
// A8C1C4: using guessed type int ITableBase<DICE_Dividind,DiceDividIndTab>::ms_pkTable;

//----- (006B0E50) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Lrotate(std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *_Wherenode)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v3; // ecx@3
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v4; // ecx@5

  v2 = _Wherenode->_Right;
  _Wherenode->_Right = v2->_Left;
  if ( !v2->_Left->_Isnil )
    v2->_Left->_Parent = _Wherenode;
  v2->_Parent = _Wherenode->_Parent;
  v3 = this->_Myhead;
  if ( _Wherenode == v3->_Parent )
  {
    v3->_Parent = v2;
    v2->_Left = _Wherenode;
    _Wherenode->_Parent = v2;
  }
  else
  {
    v4 = _Wherenode->_Parent;
    if ( _Wherenode == v4->_Left )
    {
      v4->_Left = v2;
      v2->_Left = _Wherenode;
      _Wherenode->_Parent = v2;
    }
    else
    {
      v4->_Right = v2;
      v2->_Left = _Wherenode;
      _Wherenode->_Parent = v2;
    }
  }
}

//----- (006B0EB0) --------------------------------------------------------
DiceRankInfo *__stdcall std::allocator<DiceRankInfo>::allocate(unsigned int _Count)
{
  DiceRankInfo *result; // eax@1
  std::exception pExceptionObject; // [sp+0h] [bp-Ch]@4

  result = 0;
  if ( _Count )
  {
    if ( _Count > 0xAAAAAAA || (result = (DiceRankInfo *)operator new(24 * _Count)) == 0 )
    {
      _Count = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&_Count);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
  }
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (006B0F10) --------------------------------------------------------
DiceRankInfo *__cdecl std::_Move<DiceRankInfo *,DiceRankInfo *>(DiceRankInfo *_First, DiceRankInfo *_Last, DiceRankInfo *_Dest)
{
  char *v3; // ecx@2
  DiceRankInfo *result; // eax@2
  unsigned int v5; // esi@3

  if ( _First == _Last )
  {
    result = _Dest;
  }
  else
  {
    v3 = &_First->sCharID.n5_name[8];
    result = _Dest;
    do
    {
      result->sCharID.n5_code[0] = *((_DWORD *)v3 - 2);
      result->sCharID.n5_code[1] = *((_DWORD *)v3 - 1);
      result->sCharID.n5_code[2] = *(_DWORD *)v3;
      result->sCharID.n5_code[3] = *((_DWORD *)v3 + 1);
      result->sCharID.n5_code[4] = *((_DWORD *)v3 + 2);
      v5 = *((_DWORD *)v3 + 3);
      v3 += 24;
      result->nWinCnt = v5;
      ++result;
    }
    while ( (DiceRankInfo *)(v3 - 8) != _Last );
  }
  return result;
}

//----- (006B0F60) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::clear(std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *this)
{
  std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *v1; // edi@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v4; // esi@1

  v1 = this;
  v2 = this->_Myhead;
  v3 = v2->_Parent;
  v4 = v2->_Parent;
  if ( !v3->_Isnil )
  {
    do
    {
      std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Erase(
        v1,
        v4->_Right);
      v4 = v4->_Left;
      operator delete(v3);
      v3 = v4;
    }
    while ( !v4->_Isnil );
  }
  v1->_Myhead->_Parent = v1->_Myhead;
  v1->_Myhead->_Left = v1->_Myhead;
  v1->_Myhead->_Right = v1->_Myhead;
  v1->_Mysize = 0;
}

//----- (006B0FB0) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *_Node, bool _Leftish)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *v4; // edx@1
  std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > *v5; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *v6; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *v7; // eax@1
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v8; // esi@1
  bool v9; // cl@1
  unsigned __int16 v10; // di@2
  std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *v11; // edi@10
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v12; // edx@12
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > >,bool> *v13; // eax@12
  std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *v14; // ecx@15
  bool _Addleft; // [sp+Ch] [bp-4h]@1

  v4 = _Node;
  v5 = this;
  v6 = this->_Myhead;
  v7 = v6->_Parent;
  v8 = (std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *)v6;
  v9 = 1;
  _Addleft = 1;
  if ( !v7->_Isnil )
  {
    v10 = _Node->_Myval.first;
    do
    {
      v8 = (std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *)v7;
      if ( _Leftish )
        v9 = v7->_Myval.first >= v10;
      else
        v9 = v10 < v7->_Myval.first;
      _Addleft = v9;
      if ( v9 )
        v7 = v7->_Left;
      else
        v7 = v7->_Right;
    }
    while ( !v7->_Isnil );
  }
  v11 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *)v8;
  *(_DWORD *)&_Leftish = v8;
  if ( v9 )
  {
    if ( (std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *)v8 == v5->_Myhead->_Left )
    {
      v12 = std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Insert(
              (std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *)v5,
              (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *)&_Leftish,
              1,
              v8,
              (std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *)_Node)->_Ptr;
      v13 = result;
      result->first._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *)v12;
      result->second = 1;
      return v13;
    }
    std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject>,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,boost::shared_ptr<PgNsTerrain::CPgBlockObject> >,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&_Leftish);
    v11 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *)_Leftish;
    v4 = _Node;
  }
  if ( v11->_Myval.first >= v4->_Myval.first )
  {
    operator delete(v4);
    v13 = result;
    result->first._Ptr = v11;
    result->second = 0;
  }
  else
  {
    v14 = std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType>>,0>>::_Insert(
            (std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *)v5,
            (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *)&_Leftish,
            _Addleft,
            v8,
            (std::_Tree_nod<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> >::_Node *)v4)->_Ptr;
    v13 = result;
    result->first._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *)v14;
    result->second = 1;
  }
  return v13;
}

//----- (006B1090) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::find(std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *result, const unsigned __int16 *_Keyval)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v3; // edx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v4; // eax@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *v5; // eax@8

  v3 = this->_Myhead;
  v4 = v3->_Parent;
  while ( !v4->_Isnil )
  {
    if ( v4->_Myval.first >= *_Keyval )
    {
      v3 = v4;
      v4 = v4->_Left;
    }
    else
    {
      v4 = v4->_Right;
    }
  }
  if ( v3 == this->_Myhead || *_Keyval < v3->_Myval.first )
  {
    v5 = result;
    result->_Ptr = this->_Myhead;
  }
  else
  {
    v5 = result;
    result->_Ptr = v3;
  }
  return v5;
}

//----- (006B1110) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::find(std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > > *result, const unsigned __int16 *_Keyval)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *v3; // edx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *v4; // eax@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > > *v5; // eax@8

  v3 = this->_Myhead;
  v4 = v3->_Parent;
  while ( !v4->_Isnil )
  {
    if ( v4->_Myval.first >= *_Keyval )
    {
      v3 = v4;
      v4 = v4->_Left;
    }
    else
    {
      v4 = v4->_Right;
    }
  }
  if ( v3 == this->_Myhead || *_Keyval < v3->_Myval.first )
  {
    v5 = result;
    result->_Ptr = this->_Myhead;
  }
  else
  {
    v5 = result;
    result->_Ptr = v3;
  }
  return v5;
}

//----- (006B1180) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *_Newnode)
{
  std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *v5; // edi@1
  unsigned int v6; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v7; // edx@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v8; // ecx@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node **v9; // ecx@7
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v10; // ecx@9
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v11; // esi@11
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v12; // eax@12
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v13; // ecx@12
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v14; // ecx@13
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v15; // eax@15
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v16; // ecx@17
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v17; // ecx@19
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v18; // eax@23
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v19; // ecx@23
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v20; // edx@23
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v21; // edx@25
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v22; // edx@27
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v23; // edx@36
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v24; // edx@38
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *v25; // eax@44

  v5 = this;
  v6 = this->_Mysize;
  if ( v6 >= 0x129E411 )
  {
    operator delete(_Newnode);
    std::_Xlength_error("map/set<T> too long");
  }
  v7 = _Newnode;
  this->_Mysize = v6 + 1;
  _Newnode->_Parent = _Wherenode;
  v8 = this->_Myhead;
  if ( _Wherenode == v8 )
  {
    v8->_Parent = _Newnode;
    v5->_Myhead->_Left = _Newnode;
    v5->_Myhead->_Right = _Newnode;
  }
  else if ( _Addleft )
  {
    _Wherenode->_Left = _Newnode;
    v9 = &v5->_Myhead->_Left;
    if ( _Wherenode == *v9 )
      *v9 = _Newnode;
  }
  else
  {
    _Wherenode->_Right = _Newnode;
    v10 = v5->_Myhead;
    if ( _Wherenode == v10->_Right )
      v10->_Right = _Newnode;
  }
  v11 = _Newnode;
  while ( !v11->_Parent->_Color )
  {
    v12 = v11->_Parent;
    v13 = v12->_Parent;
    if ( v12 == v13->_Left )
    {
      v14 = v13->_Right;
      if ( v14->_Color )
      {
        if ( v11 == v12->_Right )
        {
          v11 = v11->_Parent;
          v15 = v12->_Right;
          v11->_Right = v15->_Left;
          if ( !v15->_Left->_Isnil )
            v15->_Left->_Parent = v11;
          v15->_Parent = v11->_Parent;
          v16 = v5->_Myhead;
          if ( v11 == v16->_Parent )
          {
            v16->_Parent = v15;
          }
          else
          {
            v17 = v11->_Parent;
            if ( v11 == v17->_Left )
              v17->_Left = v15;
            else
              v17->_Right = v15;
          }
          v15->_Left = v11;
          v11->_Parent = v15;
        }
        v11->_Parent->_Color = 1;
        v11->_Parent->_Parent->_Color = 0;
        v18 = v11->_Parent->_Parent;
        v19 = v18->_Left;
        v18->_Left = v18->_Left->_Right;
        v20 = v19->_Right;
        if ( !v20->_Isnil )
          v20->_Parent = v18;
        v19->_Parent = v18->_Parent;
        v21 = v5->_Myhead;
        if ( v18 == v21->_Parent )
        {
          v21->_Parent = v19;
          v19->_Right = v18;
        }
        else
        {
          v22 = v18->_Parent;
          if ( v18 == v22->_Right )
          {
            v22->_Right = v19;
            v19->_Right = v18;
          }
          else
          {
            v22->_Left = v19;
            v19->_Right = v18;
          }
        }
LABEL_42:
        v7 = _Newnode;
        v18->_Parent = v19;
        continue;
      }
    }
    else
    {
      v14 = v13->_Left;
      if ( v14->_Color )
      {
        if ( v11 == v12->_Left )
        {
          v11 = v11->_Parent;
          std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Rrotate(
            v5,
            v12);
        }
        v11->_Parent->_Color = 1;
        v11->_Parent->_Parent->_Color = 0;
        v18 = v11->_Parent->_Parent;
        v19 = v18->_Right;
        v18->_Right = v19->_Left;
        if ( !v19->_Left->_Isnil )
          v19->_Left->_Parent = v18;
        v19->_Parent = v18->_Parent;
        v23 = v5->_Myhead;
        if ( v18 == v23->_Parent )
        {
          v23->_Parent = v19;
        }
        else
        {
          v24 = v18->_Parent;
          if ( v18 == v24->_Left )
            v24->_Left = v19;
          else
            v24->_Right = v19;
        }
        v19->_Left = v18;
        goto LABEL_42;
      }
    }
    v12->_Color = 1;
    v14->_Color = 1;
    v11->_Parent->_Parent->_Color = 0;
    v11 = v11->_Parent->_Parent;
  }
  v5->_Myhead->_Parent->_Color = 1;
  v25 = result;
  result->_Ptr = v7;
  return v25;
}

//----- (006B1390) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Buynode<std::pair<unsigned short,EntryInfo>>(std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *this, std::pair<unsigned short,EntryInfo> *_Val)
{
  std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *result; // eax@1
  std::pair<unsigned short,EntryInfo> *v4; // edx@3
  std::exception pExceptionObject; // [sp+4h] [bp-Ch]@5

  v2 = this;
  result = (std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *)operator new(0xECu);
  if ( !result )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  result->_Left = v2->_Myhead;
  result->_Parent = v2->_Myhead;
  result->_Right = v2->_Myhead;
  *(_WORD *)&result->_Color = 0;
  if ( result != (std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *)-12 )
  {
    v4 = _Val;
    result->_Myval.first = _Val->first;
    qmemcpy(&result->_Myval.second, &v4->second, sizeof(result->_Myval.second));
  }
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (006B1410) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::_Buynode<std::pair<unsigned short,DiceTaiSaiBetting>>(std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > *this, std::pair<unsigned short,DiceTaiSaiBetting> *_Val)
{
  std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *result; // eax@1
  std::exception pExceptionObject; // [sp+4h] [bp-Ch]@5

  v2 = this;
  result = (std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *)operator new(0x1Cu);
  if ( !result )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  result->_Left = v2->_Myhead;
  result->_Parent = v2->_Myhead;
  result->_Right = v2->_Myhead;
  *(_WORD *)&result->_Color = 0;
  if ( result != (std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *)-12 )
    result->_Myval = (std::pair<unsigned short const ,DiceTaiSaiBetting>)*_Val;
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (006B1490) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::erase(std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > _Where)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v4; // edi@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v5; // eax@7
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v6; // esi@8
  std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *v7; // ecx@10
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v8; // eax@10
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v9; // eax@17
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v10; // ecx@20
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v11; // ecx@29
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v12; // ecx@31
  char v13; // cl@34
  std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *i; // ecx@36
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v15; // eax@38
  unsigned int v16; // eax@59
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *v17; // eax@61
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *_Erasednode; // [sp+10h] [bp-8h]@3
  std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *v19; // [sp+14h] [bp-4h]@1

  v3 = _Where._Ptr;
  v19 = this;
  if ( _Where._Ptr->_Isnil )
    std::_Xout_of_range("invalid map/set<T> iterator");
  _Erasednode = _Where._Ptr;
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >,std::_Iterator_base0> *)&_Where._Ptr);
  if ( v3->_Left->_Isnil )
  {
    v4 = v3->_Right;
LABEL_8:
    v6 = v3->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v7 = v19;
    v8 = v19->_Myhead;
    if ( v8->_Parent == v3 )
    {
      v8->_Parent = v4;
    }
    else if ( v6->_Left == v3 )
    {
      v6->_Left = v4;
    }
    else
    {
      v6->_Right = v4;
    }
    if ( v19->_Myhead->_Left == v3 )
    {
      if ( v4->_Isnil )
      {
        v9 = v6;
      }
      else
      {
        v9 = std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Min(v4);
        v7 = v19;
      }
      v7->_Myhead->_Left = v9;
    }
    v10 = v7->_Myhead;
    if ( v10->_Right == v3 )
    {
      if ( v4->_Isnil )
        v10->_Right = v6;
      else
        v10->_Right = std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Max(v4);
    }
    goto LABEL_35;
  }
  if ( v3->_Right->_Isnil )
  {
    v4 = v3->_Left;
    goto LABEL_8;
  }
  v5 = _Where._Ptr;
  v4 = _Where._Ptr->_Right;
  if ( _Where._Ptr == v3 )
    goto LABEL_8;
  v3->_Left->_Parent = _Where._Ptr;
  v5->_Left = v3->_Left;
  if ( v5 == v3->_Right )
  {
    v6 = v5;
  }
  else
  {
    v6 = v5->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v6->_Left = v4;
    v5->_Right = v3->_Right;
    v3->_Right->_Parent = v5;
  }
  v11 = v19->_Myhead;
  if ( v11->_Parent == v3 )
  {
    v11->_Parent = v5;
  }
  else
  {
    v12 = v3->_Parent;
    if ( v12->_Left == v3 )
      v12->_Left = v5;
    else
      v12->_Right = v5;
  }
  v5->_Parent = v3->_Parent;
  v13 = v5->_Color;
  v5->_Color = v3->_Color;
  v3->_Color = v13;
LABEL_35:
  if ( _Erasednode->_Color == 1 )
  {
    for ( i = v19; v4 != i->_Myhead->_Parent; v6 = v6->_Parent )
    {
      if ( v4->_Color != 1 )
        break;
      v15 = v6->_Left;
      if ( v4 == v6->_Left )
      {
        v15 = v6->_Right;
        if ( !v15->_Color )
        {
          v15->_Color = 1;
          v6->_Color = 0;
          std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Lrotate(
            i,
            v6);
          v15 = v6->_Right;
          i = v19;
        }
        if ( v15->_Isnil )
          goto LABEL_53;
        if ( v15->_Left->_Color != 1 || v15->_Right->_Color != 1 )
        {
          if ( v15->_Right->_Color == 1 )
          {
            v15->_Left->_Color = 1;
            v15->_Color = 0;
            std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Rrotate(
              i,
              v15);
            v15 = v6->_Right;
            i = v19;
          }
          v15->_Color = v6->_Color;
          v6->_Color = 1;
          v15->_Right->_Color = 1;
          std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Lrotate(
            i,
            v6);
          break;
        }
      }
      else
      {
        if ( !v15->_Color )
        {
          v15->_Color = 1;
          v6->_Color = 0;
          std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Rrotate(
            i,
            v6);
          v15 = v6->_Left;
          i = v19;
        }
        if ( v15->_Isnil )
          goto LABEL_53;
        if ( v15->_Right->_Color != 1 || v15->_Left->_Color != 1 )
        {
          if ( v15->_Left->_Color == 1 )
          {
            v15->_Right->_Color = 1;
            v15->_Color = 0;
            std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Lrotate(
              i,
              v15);
            v15 = v6->_Left;
            i = v19;
          }
          v15->_Color = v6->_Color;
          v6->_Color = 1;
          v15->_Left->_Color = 1;
          std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Rrotate(
            i,
            v6);
          break;
        }
      }
      v15->_Color = 0;
LABEL_53:
      v4 = v6;
    }
    v4->_Color = 1;
  }
  operator delete(_Erasednode);
  v16 = v19->_Mysize;
  if ( v16 )
    v19->_Mysize = v16 - 1;
  v17 = result;
  result->_Ptr = _Where._Ptr;
  return v17;
}

//----- (006B1770) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Erase(std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *_Rootnode)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v2; // edi@1
  std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *i; // esi@1

  v2 = _Rootnode;
  v3 = this;
  for ( i = _Rootnode; !i->_Isnil; v2 = i )
  {
    std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Erase(
      v3,
      i->_Right);
    i = i->_Left;
    operator delete(v2);
  }
}

//----- (006B17B0) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *_Node, bool _Leftish)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v4; // edx@1
  std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *v5; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v6; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v7; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v8; // esi@1
  bool v9; // cl@1
  unsigned __int16 v10; // di@2
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v11; // edi@10
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v12; // edx@12
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > >,bool> *v13; // eax@12
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v14; // ecx@15
  bool _Addleft; // [sp+Ch] [bp-4h]@1

  v4 = _Node;
  v5 = this;
  v6 = this->_Myhead;
  v7 = v6->_Parent;
  v8 = v6;
  v9 = 1;
  _Addleft = 1;
  if ( !v7->_Isnil )
  {
    v10 = _Node->_Myval.first;
    do
    {
      v8 = v7;
      if ( _Leftish )
        v9 = v7->_Myval.first >= v10;
      else
        v9 = v10 < v7->_Myval.first;
      _Addleft = v9;
      if ( v9 )
        v7 = v7->_Left;
      else
        v7 = v7->_Right;
    }
    while ( !v7->_Isnil );
  }
  v11 = v8;
  *(_DWORD *)&_Leftish = v8;
  if ( v9 )
  {
    if ( v8 == v5->_Myhead->_Left )
    {
      v12 = std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Insert(
              v5,
              (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *)&_Leftish,
              1,
              v8,
              _Node)->_Ptr;
      v13 = result;
      result->first._Ptr = v12;
      result->second = 1;
      return v13;
    }
    std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >,std::_Iterator_base0> *)&_Leftish);
    v11 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *)_Leftish;
    v4 = _Node;
  }
  if ( v11->_Myval.first >= v4->_Myval.first )
  {
    operator delete(v4);
    v13 = result;
    result->first._Ptr = v11;
    result->second = 0;
  }
  else
  {
    v14 = std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Insert(
            v5,
            (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *)&_Leftish,
            _Addleft,
            v8,
            v4)->_Ptr;
    v13 = result;
    result->first._Ptr = v14;
    result->second = 1;
  }
  return v13;
}

//----- (006B1890) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::clear(std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *this)
{
  std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *v1; // edi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v4; // esi@1

  v1 = this;
  v2 = this->_Myhead;
  v3 = v2->_Parent;
  v4 = v2->_Parent;
  if ( !v3->_Isnil )
  {
    do
    {
      std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Erase(
        v1,
        v4->_Right);
      v4 = v4->_Left;
      operator delete(v3);
      v3 = v4;
    }
    while ( !v4->_Isnil );
  }
  v1->_Myhead->_Parent = v1->_Myhead;
  v1->_Myhead->_Left = v1->_Myhead;
  v1->_Myhead->_Right = v1->_Myhead;
  v1->_Mysize = 0;
}

//----- (006B18F0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::erase(std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > _Last)
{
  std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v6; // ecx@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *v7; // eax@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > v8; // edx@5
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v9; // eax@6
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v10; // ecx@7
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *j; // eax@7
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *i; // eax@10
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > v13; // [sp+4h] [bp-4h]@14

  v4 = this;
  v5 = this->_Myhead;
  v6 = _First._Ptr;
  if ( _First._Ptr != v5->_Left || _Last._Ptr != v5 )
  {
    for ( ; _First._Ptr != _Last._Ptr; v6 = _First._Ptr )
    {
      v8._Ptr = v6;
      if ( !v6->_Isnil )
      {
        v9 = v6->_Right;
        if ( v9->_Isnil )
        {
          for ( i = v6->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v6 != i->_Right )
              break;
            v6 = i;
          }
          _First._Ptr = i;
        }
        else
        {
          v10 = v6->_Right;
          for ( j = v9->_Left; !j->_Isnil; j = j->_Left )
            v10 = j;
          _First._Ptr = v10;
        }
      }
      std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::erase(
        v4,
        &v13,
        v8);
    }
    v7 = result;
    result->_Ptr = v6;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::clear(v4);
    v7 = result;
    result->_Ptr = v4->_Myhead->_Left;
  }
  return v7;
}

//----- (006B19B0) --------------------------------------------------------
void __thiscall std::vector<SlotJackpotRankInfo,std::allocator<SlotJackpotRankInfo>>::reserve(std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *this, unsigned int _Count)
{
  std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *v2; // esi@1
  DiceRankInfo *v3; // eax@4
  DiceRankInfo *v4; // ST04_4@4
  DiceRankInfo *v5; // ST00_4@4
  DiceRankInfo *v6; // ebx@4
  unsigned int v7; // edx@4
  int v8; // edi@4
  DiceRankInfo *i; // eax@5
  DiceRankInfo *v10; // eax@8
  int v11; // [sp+0h] [bp-24h]@1
  DiceRankInfo *_Ptr; // [sp+10h] [bp-14h]@4
  int *v13; // [sp+14h] [bp-10h]@1
  int v14; // [sp+20h] [bp-4h]@4

  v13 = &v11;
  v2 = this;
  if ( _Count > 0xAAAAAAA )
    std::_Xlength_error("vector<T> too long");
  if ( this->_Myend - this->_Myfirst < _Count )
  {
    v3 = std::allocator<DiceRankInfo>::allocate(_Count);
    v4 = v2->_Mylast;
    v5 = v2->_Myfirst;
    _Ptr = v3;
    v14 = 0;
    std::_Uninit_move<SlotJackpotRankInfo *,SlotJackpotRankInfo *,std::allocator<SlotJackpotRankInfo>,SlotJackpotRankInfo>(
      v5,
      v4,
      v3);
    v6 = v2->_Myfirst;
    v7 = (signed int)((unsigned __int64)(715827883i64 * (unsigned int)((char *)v2->_Mylast - (char *)v2->_Myfirst)) >> 32) >> 2;
    v8 = v7 + (v7 >> 31);
    if ( v2->_Myfirst )
    {
      for ( i = v2->_Mylast; v6 != i; ++v6 )
        ;
      operator delete(v2->_Myfirst);
    }
    v10 = _Ptr;
    v2->_Myend = &_Ptr[_Count];
    v2->_Mylast = &v10[v8];
    v2->_Myfirst = v10;
  }
}

//----- (006B1AC0) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_DICE_TAISAI_BOARD_FOLD_CMD(MHDiceGameTask *this, PROTO_NC_DICE_TAISAI_BOARD_FOLD_CMD *pkProto)
{
  MHDiceGameTask *data; // [sp+0h] [bp-4h]@1

  data = this;
  if ( this->m_bIsEnterGameRoom )
  {
    LOWORD(data) = 7312;
    MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_LEAVE_ACK(this, (PROTO_NC_DICE_TAISAI_GAME_LEAVE_ACK *)&data);
  }
  return 1;
}

//----- (006B1AF0) --------------------------------------------------------
void __thiscall std::vector<DiceRankInfo,std::allocator<DiceRankInfo>>::_Reserve(std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *this, unsigned int _Count)
{
  unsigned int v2; // esi@1
  unsigned int v3; // esi@3
  unsigned int v4; // eax@3
  unsigned int v5; // eax@5

  v2 = this->_Mylast - this->_Myfirst;
  if ( 178956970 - _Count < v2 )
    std::_Xlength_error("vector<T> too long");
  v3 = _Count + v2;
  v4 = this->_Myend - this->_Myfirst;
  if ( v3 > v4 )
  {
    if ( 178956970 - (v4 >> 1) >= v4 )
      v5 = (v4 >> 1) + v4;
    else
      v5 = 0;
    if ( v5 < v3 )
      v5 = v3;
    std::vector<SlotJackpotRankInfo,std::allocator<SlotJackpotRankInfo>>::reserve(this, v5);
  }
}

//----- (006B1B70) --------------------------------------------------------
void __thiscall std::map<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>>::~map<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>>(std::map<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> > > *this)
{
  std::map<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> > > *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v2; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > v3; // ST04_4@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > result; // [sp+8h] [bp-14h]@1
  std::map<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> > > *v5; // [sp+Ch] [bp-10h]@1
  int v6; // [sp+18h] [bp-4h]@1

  v1 = this;
  v5 = this;
  v2 = this->_Myhead;
  v3._Ptr = v2->_Left;
  v6 = 0;
  std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&this->comp,
    &result,
    v3,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > >)v2);
  operator delete(v1->_Myhead);
}

//----- (006B1BD0) --------------------------------------------------------
void __thiscall std::vector<SlotJackpotRankInfo,std::allocator<SlotJackpotRankInfo>>::push_back(std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *this, DiceRankInfo *_Val)
{
  std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *v2; // edi@1
  DiceRankInfo *v3; // ecx@1
  unsigned int v4; // edx@3
  int v5; // esi@3
  int v6; // ecx@5
  DiceRankInfo *v7; // eax@5
  DiceRankInfo *v8; // eax@9

  v2 = this;
  v3 = this->_Mylast;
  if ( _Val >= v3 || v2->_Myfirst > _Val )
  {
    if ( v3 == v2->_Myend )
      std::vector<DiceRankInfo,std::allocator<DiceRankInfo>>::_Reserve(v2, 1u);
    v8 = v2->_Mylast;
    if ( v8 )
    {
      *(_QWORD *)&v8->sCharID.n5_name[0] = *(_QWORD *)&_Val->sCharID.n5_name[0];
      *(_QWORD *)&v8->sCharID.n5_code[2] = *(_QWORD *)&_Val->sCharID.n5_code[2];
      v8->sCharID.n5_code[4] = _Val->sCharID.n5_code[4];
      v8->nWinCnt = _Val->nWinCnt;
    }
  }
  else
  {
    v4 = (signed int)((unsigned __int64)(715827883i64 * ((char *)_Val - (char *)v2->_Myfirst)) >> 32) >> 2;
    v5 = v4 + (v4 >> 31);
    if ( v3 == v2->_Myend )
      std::vector<DiceRankInfo,std::allocator<DiceRankInfo>>::_Reserve(v2, 1u);
    v6 = (int)&v2->_Myfirst[v5];
    v7 = v2->_Mylast;
    if ( v7 )
    {
      v7->sCharID.n5_code[0] = *(_DWORD *)v6;
      v7->sCharID.n5_code[1] = *(_DWORD *)(v6 + 4);
      v7->sCharID.n5_code[2] = *(_DWORD *)(v6 + 8);
      v7->sCharID.n5_code[3] = *(_DWORD *)(v6 + 12);
      v7->sCharID.n5_code[4] = *(_DWORD *)(v6 + 16);
      v7->nWinCnt = *(_DWORD *)(v6 + 20);
      ++v2->_Mylast;
      return;
    }
  }
  ++v2->_Mylast;
}

//----- (006B1C90) --------------------------------------------------------
void __thiscall mhDiceRankWin::UpdateRankList(mhDiceRankWin *this, PROTO_NC_DICE_TAISAI_RANK_ACK *pkProto)
{
  mhDiceRankWin *v2; // ebx@1
  DiceRankInfo *v3; // eax@2
  DiceRankInfo *v4; // ecx@2
  DiceRankInfo *v5; // eax@4
  DiceRankInfo *v6; // ecx@4
  signed int v7; // ebx@6
  char *v8; // esi@7
  unsigned int v9; // ecx@8
  unsigned int v10; // edx@8
  unsigned int v11; // eax@8
  unsigned int v12; // ecx@8
  unsigned int v13; // edx@8
  signed int v14; // ebx@9
  DiceRankInfo *v15; // esi@10
  std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *v16; // [sp+8h] [bp-24h]@2
  std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *v17; // [sp+Ch] [bp-20h]@4
  DiceRankInfo kInfo; // [sp+10h] [bp-1Ch]@8

  v2 = this;
  if ( pkProto )
  {
    v3 = this->m_CarrerRankList._Mylast;
    v4 = this->m_CarrerRankList._Myfirst;
    v16 = &v2->m_CarrerRankList;
    if ( v4 != v3 )
      v2->m_CarrerRankList._Mylast = std::_Move<DiceRankInfo *,DiceRankInfo *>(v3, v3, v4);
    v5 = v2->m_CurRankList._Mylast;
    v6 = v2->m_CurRankList._Myfirst;
    v17 = &v2->m_CurRankList;
    if ( v6 != v5 )
      v2->m_CurRankList._Mylast = std::_Move<DiceRankInfo *,DiceRankInfo *>(v5, v5, v6);
    v7 = 0;
    if ( pkProto->nRankHistoryCnt )
    {
      v8 = (char *)pkProto->RankHistory;
      do
      {
        v9 = *((_DWORD *)v8 + 1);
        v10 = *((_DWORD *)v8 + 2);
        kInfo.sCharID.n5_code[0] = *(_DWORD *)v8;
        v11 = *((_DWORD *)v8 + 3);
        kInfo.sCharID.n5_code[1] = v9;
        v12 = *((_DWORD *)v8 + 4);
        *(_QWORD *)&kInfo.sCharID.n5_code[2] = __PAIR__(v11, v10);
        v13 = *((_DWORD *)v8 + 5);
        kInfo.sCharID.n5_code[4] = v12;
        kInfo.nWinCnt = v13;
        std::vector<SlotJackpotRankInfo,std::allocator<SlotJackpotRankInfo>>::push_back(v16, &kInfo);
        ++v7;
        v8 += 24;
      }
      while ( v7 < pkProto->nRankHistoryCnt );
    }
    v14 = 0;
    if ( pkProto->nRankCurrCnt )
    {
      v15 = (DiceRankInfo *)&pkProto[1];
      do
      {
        std::vector<SlotJackpotRankInfo,std::allocator<SlotJackpotRankInfo>>::push_back(v17, v15);
        ++v14;
        ++v15;
      }
      while ( v14 < pkProto->nRankCurrCnt );
    }
  }
}

//----- (006B1D90) --------------------------------------------------------
MHDiceGameTask *__thiscall MHDiceGameTask::`scalar deleting destructor'(MHDiceGameTask *this, unsigned int a2)
{
  MHDiceGameTask *v2; // esi@1

  v2 = this;
  MHDiceGameTask::~MHDiceGameTask(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006B1DC0) --------------------------------------------------------
BOOL __thiscall StatPointReqTask::IsWaitingServerReply(StatPointReqTask *this)
{
  StatPointReqTask::State v1; // eax@1

  v1 = this->m_eState;
  return v1 == 1 || v1 == 2;
}

//----- (006B1DE0) --------------------------------------------------------
void __thiscall StatPointReqTask::ReqDecPoint(StatPointReqTask *this, StatDistribute eSD)
{
  StatPointReqTask *v2; // esi@1
  StatPointReqTask::State v3; // eax@1
  PROTO_NC_CHAR_STAT_DECPOINT_REQ kProto; // [sp+7h] [bp-1h]@5

  v2 = this;
  v3 = this->m_eState;
  if ( v3 != 1 && v3 != 2 && Inventory::GetStatInitialPoint(&g_kInventory) && User::GetStatDistribute(&g_kUser, eSD) > 0 )
  {
    kProto.stat = eSD;
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 4u, 0x62u, &kProto, 1);
    v2->m_eState = 2;
  }
}

//----- (006B1E50) --------------------------------------------------------
void __cdecl StatPointReqTask::ClearState()
{
  if ( StatPointReqTask::ms_spInstance )
    *(_DWORD *)(StatPointReqTask::ms_spInstance + 64) = 0;
}
// B5BDCC: using guessed type int StatPointReqTask::ms_spInstance;

//----- (006B1E70) --------------------------------------------------------
void __thiscall StatPointReqTask::ReqIncPoint(StatPointReqTask *this, StatDistribute eSD)
{
  StatPointReqTask *v2; // esi@1
  StatPointReqTask::State v3; // eax@1

  v2 = this;
  v3 = this->m_eState;
  if ( v3 != 1 && v3 != 2 && unk_A97D74 > 0 )
  {
    BYTE3(eSD) = eSD;
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 4u, 0x5Cu, (char *)&eSD + 3, 1);
    v2->m_eState = 1;
  }
}

//----- (006B1EC0) --------------------------------------------------------
char __thiscall StatPointReqTask::OnProcessNetMsg(StatPointReqTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  StatPointReqTask *v5; // esi@1
  char *v6; // esi@3
  char result; // al@6
  _WORD *v8; // edx@7
  char *v9; // esi@7
  char *v10; // edi@7
  char *v11; // edi@11
  char *v12; // esi@11
  bool v13; // zf@11
  _WORD *v14; // ecx@15
  int v15; // esi@15
  char *v16; // edi@15

  v5 = this;
  if ( iDepart == 4 )
  {
    switch ( iCommand )
    {
      case 95:
        this->m_eState = 0;
        v6 = (char *)&this->vfptr;
        if ( this->m_pkMsgHooker )
        {
          ((void (__stdcall *)(signed int, _DWORD, IDirectMessengerVtbl **))this->m_pkMsgHooker->vfptr->SendDirectMessage)(
            29,
            0,
            &this->vfptr);
          if ( *((_DWORD *)v6 + 1) )
            (*(void (__stdcall **)(signed int, _DWORD, char *))(**((_DWORD **)v6 + 1) + 20))(29, 0, v6);
        }
        (*(void (__thiscall **)(char *, signed int, _DWORD, char *))(*(_DWORD *)v6 + 20))(v6, 29, 0, v6);
        User::StatChangeByDistributePoint(&g_kUser, *(_BYTE *)pvData, 1);
        result = 1;
        break;
      case 97:
        v8 = pvData;
        this->m_eState = 0;
        v9 = (char *)&this->vfptr;
        v10 = fs("err: %d", *v8);
        if ( *((_DWORD *)v9 + 1) )
        {
          (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v9 + 1) + 4))(25, v10, v9);
          if ( *((_DWORD *)v9 + 1) )
            (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v9 + 1) + 20))(25, v10, v9);
        }
        (*(void (__thiscall **)(char *, signed int, char *, char *))(*(_DWORD *)v9 + 20))(v9, 25, v10, v9);
        result = 1;
        break;
      case 101:
        v11 = (char *)pvData;
        this->m_eState = 0;
        v12 = (char *)&this->vfptr;
        v13 = this->m_pkMsgHooker == 0;
        LOBYTE(pvData) = *v11;
        if ( !v13 )
        {
          ((void (__stdcall *)(signed int, void **, IDirectMessengerVtbl **))this->m_pkMsgHooker->vfptr->SendDirectMessage)(
            29,
            &pvData,
            &this->vfptr);
          if ( *((_DWORD *)v12 + 1) )
            (*(void (__stdcall **)(signed int, void **, char *))(**((_DWORD **)v12 + 1) + 20))(29, &pvData, v12);
        }
        (*(void (__thiscall **)(char *, signed int, void **, char *))(*(_DWORD *)v12 + 20))(v12, 29, &pvData, v12);
        User::StatChangeByDistributePoint(&g_kUser, *v11, -1);
        result = 1;
        break;
      case 103:
        v14 = pvData;
        v5->m_eState = 0;
        v15 = (int)&v5->vfptr;
        v16 = fs("err: %d", *v14);
        if ( *(_DWORD *)(v15 + 4) )
        {
          (*(void (__stdcall **)(signed int, char *, int))(**(_DWORD **)(v15 + 4) + 4))(25, v16, v15);
          if ( *(_DWORD *)(v15 + 4) )
            (*(void (__stdcall **)(signed int, char *, int))(**(_DWORD **)(v15 + 4) + 20))(25, v16, v15);
        }
        (*(void (__thiscall **)(int, signed int, char *, int))(*(_DWORD *)v15 + 20))(v15, 25, v16, v15);
        result = 1;
        break;
      default:
        goto LABEL_19;
    }
  }
  else
  {
LABEL_19:
    result = 0;
  }
  return result;
}

//----- (006B20A0) --------------------------------------------------------
void __thiscall StatPointReqTask::OnStart(StatPointReqTask *this)
{
  StatPointReqTask *v1; // esi@1
  void (__thiscall ***v2)(_DWORD, _DWORD); // edi@3

  v1 = this;
  this->m_eState = 0;
  if ( (StatPointReqTask *)StatPointReqTask::ms_spInstance != this )
  {
    if ( StatPointReqTask::ms_spInstance )
    {
      v2 = (void (__thiscall ***)(_DWORD, _DWORD))StatPointReqTask::ms_spInstance;
      if ( !InterlockedDecrement((volatile LONG *)(StatPointReqTask::ms_spInstance + 4)) )
      {
        if ( v2 )
          (**v2)(v2, 1);
      }
    }
    StatPointReqTask::ms_spInstance = (int)v1;
    InterlockedIncrement((volatile LONG *)&v1->m_uiRefCount);
  }
}
// B5BDCC: using guessed type int StatPointReqTask::ms_spInstance;

//----- (006B20F0) --------------------------------------------------------
void __thiscall ItemMallInfo::Encoding(ItemMallInfo *this)
{
  ItemMallInfo *v1; // esi@1
  char *v2; // edi@1
  signed int v3; // ecx@1
  signed int v4; // edx@3
  int v5; // eax@3

  v1 = this;
  v2 = (char *)this->m_pData;
  v3 = 64;
  do
  {
    if ( *(_DWORD *)v2 != -1 )
    {
      *(_DWORD *)v2 ^= v1->m_EncodeTable[1];
      *((_DWORD *)v2 + 1) ^= v1->m_EncodeTable[2];
      v4 = 2;
      v5 = (int)(v2 + 9);
      do
      {
        *(_BYTE *)(v5 - 1) ^= v1->m_EncodeTable[((_BYTE)v4 - 2) & 0x1F];
        *(_BYTE *)v5 ^= v1->m_EncodeTable[((_BYTE)v4 - 1) & 0x1F];
        *(_BYTE *)(v5 + 1) ^= v1->m_EncodeTable[v4 & 0x1F];
        *(_BYTE *)(v5 + 2) ^= v1->m_EncodeTable[((_BYTE)v4 + 1) & 0x1F];
        v4 += 4;
        v5 += 4;
      }
      while ( v4 - 2 < 128 );
    }
    v2 += 136;
    --v3;
  }
  while ( v3 );
}

//----- (006B21B0) --------------------------------------------------------
char __thiscall ItemMallInfo::SaveToFile(ItemMallInfo *this, const char *FileName)
{
  ItemMallInfo *v2; // edi@1
  _iobuf *v3; // eax@1
  signed int v4; // ebx@1
  tagItemMallFileData *v5; // esi@1
  _iobuf *fp; // [sp+14h] [bp+8h]@1

  v2 = this;
  v3 = fopen(FileName, "wb");
  v2->m_pHeader.TotalChunkCount ^= v2->m_EncodeTable[0];
  fp = v3;
  fwrite(v2, 1u, 4u, v3);
  ItemMallInfo::Encoding(v2);
  v4 = 0;
  v5 = v2->m_pData;
  do
  {
    if ( v5->LocaleNo == -1 )
      break;
    fwrite(v5, 1u, 0x88u, fp);
    ++v4;
    ++v5;
  }
  while ( v4 < 64 );
  ItemMallInfo::Encoding(v2);
  fclose(fp);
  return 1;
}

//----- (006B2240) --------------------------------------------------------
int __thiscall ItemMallInfo::GetEndIndex(ItemMallInfo *this, int LocaleNum)
{
  int result; // eax@1
  char *v3; // edx@2
  char *v4; // ecx@9

  result = 0;
  if ( LocaleNum == -1 )
  {
    v4 = (char *)this->m_pData;
    while ( *(_DWORD *)v4 != -1 )
    {
      ++result;
      v4 += 136;
      if ( result >= 64 )
        return -1;
    }
  }
  else
  {
    v3 = (char *)this->m_pData;
    while ( 1 )
    {
      if ( *(_DWORD *)v3 == -1 )
      {
        --result;
        return result;
      }
      if ( *(_DWORD *)v3 > LocaleNum )
        break;
      ++result;
      v3 += 136;
      if ( result >= 64 )
        return -1;
    }
    --result;
  }
  return result;
}

//----- (006B22B0) --------------------------------------------------------
void __thiscall ItemMallInfo::SetData(ItemMallInfo *this, int Index, int LocaleNum, int URLNum, const char *Path)
{
  char *v5; // ecx@1
  const char *v6; // eax@1
  int v7; // edx@1
  char v8; // cl@2

  ++this->m_pHeader.TotalChunkCount;
  v5 = (char *)this + 136 * Index;
  *((_DWORD *)v5 + 1) = LocaleNum;
  *((_DWORD *)v5 + 2) = URLNum;
  v6 = Path;
  v7 = v5 + 12 - Path;
  do
  {
    v8 = *v6;
    v6[v7] = *v6;
    ++v6;
  }
  while ( v8 );
}

//----- (006B22F0) --------------------------------------------------------
void __thiscall ItemMallInfo::AddData(ItemMallInfo *this, int LocaleNum, int URLNum, const char *Path)
{
  int v4; // esi@1
  ItemMallInfo *v5; // ebx@1
  int v6; // eax@1
  signed int v7; // ecx@1
  tagItemMallFileData *v8; // edx@1
  int v9; // eax@5
  char *v10; // edi@8
  bool v11; // zf@9
  int v12; // ebx@11
  const char *v13; // eax@11
  int v14; // ebx@11
  char v15; // cl@12
  int v16; // ebx@14
  const char *v17; // eax@14
  int v18; // ebx@14
  char v19; // cl@15
  int v20; // [sp+8h] [bp-4h]@8

  v4 = LocaleNum;
  v5 = this;
  v6 = ItemMallInfo::GetEndIndex(this, LocaleNum);
  v7 = 0;
  v8 = v5->m_pData;
  while ( v8->LocaleNo != -1 )
  {
    ++v7;
    ++v8;
    if ( v7 >= 64 )
    {
      v7 = -1;
      break;
    }
  }
  v9 = v6 + 1;
  if ( v9 >= v7 )
  {
    ++v5->m_pHeader.TotalChunkCount;
    v16 = (int)(&v5->m_pHeader.TotalChunkCount + 34 * v9);
    v17 = Path;
    *(_DWORD *)(v16 + 4) = LocaleNum;
    *(_DWORD *)(v16 + 8) = URLNum;
    v18 = v16 + 12 - (_DWORD)Path;
    do
    {
      v19 = *v17;
      v17[v18] = *v17;
      ++v17;
    }
    while ( v19 );
  }
  else if ( v7 + 1 < 64 )
  {
    if ( v7 >= v9 )
    {
      v10 = (char *)&v5->m_pData[v7 + 1];
      v20 = v7 - v9 + 1;
      do
      {
        v11 = v20-- == 1;
        qmemcpy(v10, v10 - 136, 0x88u);
        v10 -= 136;
      }
      while ( !v11 );
      v4 = LocaleNum;
    }
    ++v5->m_pHeader.TotalChunkCount;
    v12 = (int)(&v5->m_pHeader.TotalChunkCount + 34 * v9);
    *(_DWORD *)(v12 + 8) = URLNum;
    v13 = Path;
    *(_DWORD *)(v12 + 4) = v4;
    v14 = v12 + 12 - (_DWORD)Path;
    do
    {
      v15 = *v13;
      v13[v14] = *v13;
      ++v13;
    }
    while ( v15 );
  }
}

//----- (006B23E0) --------------------------------------------------------
tagItemMallFileData *__thiscall ItemMallInfo::GetData(ItemMallInfo *this, int LocaleNum, int URLNum)
{
  signed int v3; // edx@1
  char *v4; // esi@1
  int v5; // eax@2

  v3 = 0;
  v4 = (char *)this->m_pData;
  while ( 1 )
  {
    v5 = *(_DWORD *)v4;
    if ( *(_DWORD *)v4 == -1 || LocaleNum < v5 )
      return 0;
    if ( LocaleNum == v5 && URLNum == *((_DWORD *)v4 + 1) )
      break;
    ++v3;
    v4 += 136;
    if ( v3 >= 64 )
      return 0;
  }
  return &this->m_pData[v3];
}

//----- (006B2430) --------------------------------------------------------
int __thiscall ItemMallInfo::GetTotalLocaleNum(ItemMallInfo *this)
{
  __int64 v1; // rax@1
  signed int v2; // edi@1
  char *v3; // esi@1

  v1 = 0i64;
  v2 = -1;
  v3 = (char *)this->m_pData;
  do
  {
    if ( *(_DWORD *)v3 == -1 )
      break;
    if ( v2 != *(_DWORD *)v3 )
    {
      LODWORD(v1) = v1 + 1;
      v2 = *(_DWORD *)v3;
    }
    ++HIDWORD(v1);
    v3 += 136;
  }
  while ( SHIDWORD(v1) < 64 );
  return v1;
}

//----- (006B2460) --------------------------------------------------------
int __thiscall ItemMallInfo::GetTotalURLNum(ItemMallInfo *this, int LocaleNum)
{
  int result; // eax@1
  signed int v3; // esi@2
  char *v4; // edx@2
  int v5; // ecx@3

  result = -1;
  if ( (unsigned int)LocaleNum > 0x3F )
  {
    result = -1;
  }
  else
  {
    v3 = 0;
    v4 = (char *)this->m_pData;
    do
    {
      v5 = *(_DWORD *)v4;
      if ( *(_DWORD *)v4 == -1 || LocaleNum < v5 )
        break;
      if ( LocaleNum == v5 )
        result = *((_DWORD *)v4 + 1);
      ++v3;
      v4 += 136;
    }
    while ( v3 < 64 );
  }
  return result;
}

//----- (006B24A0) --------------------------------------------------------
int __thiscall ItemMallInfo::GetTotalChunkNum(ItemMallInfo *this)
{
  return this->m_pHeader.TotalChunkCount;
}

//----- (006B24B0) --------------------------------------------------------
void __thiscall ItemMallInfo::Clear(ItemMallInfo *this)
{
  ItemMallInfo *v1; // esi@1

  v1 = this;
  memset((char *)this->m_pData, -1, 0x2200u);
  v1->m_pHeader.TotalChunkCount = 0;
}

//----- (006B24D0) --------------------------------------------------------
void __thiscall ItemMallInfo::ItemMallInfo(ItemMallInfo *this)
{
  ItemMallInfo *v1; // esi@1

  v1 = this;
  memset((char *)this->m_pData, -1, 0x2200u);
  v1->m_pHeader.TotalChunkCount = 0;
  *(_DWORD *)&v1->m_EncodeTable[0] = 689917234;
  *(_DWORD *)&v1->m_EncodeTable[4] = -1803431516;
  *(_DWORD *)&v1->m_EncodeTable[8] = 1482386196;
  *(_DWORD *)&v1->m_EncodeTable[12] = -953543731;
  *(_DWORD *)&v1->m_EncodeTable[16] = 710606797;
  *(_DWORD *)&v1->m_EncodeTable[20] = -1975659615;
  *(_DWORD *)&v1->m_EncodeTable[24] = 972304835;
  *(_DWORD *)&v1->m_EncodeTable[28] = 1276858049;
}

//----- (006B2550) --------------------------------------------------------
char __thiscall ItemMallInfo::LoadFromFile(ItemMallInfo *this, const char *FileName)
{
  ItemMallInfo *v2; // esi@1
  _iobuf *v3; // edi@1
  char result; // al@2
  tagItemMallFileData *v5; // ebx@3
  int i; // edi@5
  _iobuf *fp; // [sp+10h] [bp+8h]@1

  v2 = this;
  v3 = fopen(FileName, "rb");
  fp = v3;
  if ( v3 )
  {
    v5 = v2->m_pData;
    memset((char *)v2->m_pData, -1, 0x2200u);
    v2->m_pHeader.TotalChunkCount = 0;
    fread(v2, 1u, 4u, v3);
    v2->m_pHeader.TotalChunkCount ^= v2->m_EncodeTable[0];
    if ( v2->m_pHeader.TotalChunkCount <= 64 )
    {
      for ( i = 0; i < v2->m_pHeader.TotalChunkCount; ++v5 )
      {
        fread(v5, 1u, 0x88u, fp);
        ++i;
      }
      ItemMallInfo::Encoding(v2);
      result = 1;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006B25F0) --------------------------------------------------------
bool __cdecl SaveSurfaceToJPG(char *acFn, IDirect3DSurface9 *pkSurf)
{
  bool result; // al@2
  bool v3; // bl@6
  JpgImage::ImageInfo kInfo; // [sp+8h] [bp-48h]@6
  JpgImage kJpg; // [sp+18h] [bp-38h]@1
  _D3DLOCKED_RECT kLock; // [sp+24h] [bp-2Ch]@5
  _D3DSURFACE_DESC kSurfDesc; // [sp+2Ch] [bp-24h]@3

  JpgImage::JpgImage(&kJpg);
  if ( !pkSurf
    || ((int (__stdcall *)(IDirect3DSurface9 *, _D3DSURFACE_DESC *))pkSurf->lpVtbl[4].QueryInterface)(
         pkSurf,
         &kSurfDesc)
    || kSurfDesc.Format != 20
    || ((int (__stdcall *)(IDirect3DSurface9 *, _D3DLOCKED_RECT *, _DWORD, _DWORD))pkSurf->lpVtbl[4].AddRef)(
         pkSurf,
         &kLock,
         0,
         0) )
  {
    result = 0;
  }
  else
  {
    kInfo.dwHeight = kSurfDesc.Height;
    kInfo.dwWidth = kSurfDesc.Width;
    *(_D3DLOCKED_RECT *)&kInfo.dwPitch = kLock;
    kJpg.m_eInputColorOrder = 2;
    kJpg.m_iQuality = 100;
    v3 = JpgImage::Save(&kJpg, acFn, &kInfo);
    pkSurf->lpVtbl[4].Release((IUnknown *)pkSurf);
    result = v3;
  }
  return result;
}

//----- (006B26B0) --------------------------------------------------------
IDirect3DSurface9 *__cdecl CloneSurfaceToR8G8B8(IDirect3DSurface9 *pkSrcSurf, tagRECT *pkRect, IDirect3DDevice9 *pkDevice)
{
  IDirect3DDevice9 *v3; // edi@1
  int v4; // ecx@4
  int v5; // edx@4
  int v6; // eax@4
  int v7; // esi@4
  signed int v8; // eax@12
  signed int v9; // ecx@12
  bool v10; // zf@17
  IDirect3DSurface9 *result; // eax@17
  IDirect3DSurface9 *pkDestSurf; // [sp+10h] [bp-38h]@16
  _D3DSURFACE_DESC kSurfDesc; // [sp+14h] [bp-34h]@2
  tagRECT SaveRect; // [sp+34h] [bp-14h]@4

  v3 = pkDevice;
  if ( pkDevice
    && !((int (__stdcall *)(IDirect3DSurface9 *, _D3DSURFACE_DESC *))pkSrcSurf->lpVtbl[4].QueryInterface)(
          pkSrcSurf,
          &kSurfDesc) )
  {
    if ( pkRect )
    {
      v4 = pkRect->left;
      v5 = pkRect->top;
      v6 = pkRect->right;
      v7 = pkRect->bottom;
      SaveRect.left = v4;
      SaveRect.top = v5;
      SaveRect.right = v6;
      SaveRect.bottom = v7;
      if ( v4 < 0 )
      {
        v4 = 0;
        SaveRect.left = 0;
      }
      if ( v5 < 0 )
      {
        v5 = 0;
        SaveRect.top = 0;
      }
      if ( (signed int)kSurfDesc.Width < v6 )
      {
        v6 = kSurfDesc.Width;
        SaveRect.right = kSurfDesc.Width;
      }
      if ( (signed int)kSurfDesc.Height < v7 )
      {
        v7 = kSurfDesc.Height;
        SaveRect.bottom = kSurfDesc.Height;
      }
      v3 = pkDevice;
      v8 = v6 - v4;
      v9 = v7 - v5;
    }
    else
    {
      v8 = kSurfDesc.Width;
      v9 = kSurfDesc.Height;
      SaveRect.left = 0;
      SaveRect.top = 0;
      SaveRect.right = kSurfDesc.Width;
      SaveRect.bottom = kSurfDesc.Height;
    }
    if ( v8 > 0
      && v9 > 0
      && ((int (__stdcall *)(IDirect3DDevice9 *, signed int, signed int, signed int, signed int, IDirect3DSurface9 **, _DWORD))v3->lpVtbl[12].QueryInterface)(
           v3,
           v8,
           v9,
           20,
           3,
           &pkDestSurf,
           0) >= 0 )
    {
      v10 = D3DXLoadSurfaceFromSurface(pkDestSurf, 0, 0, pkSrcSurf, 0, &SaveRect, 1, 0) == 0;
      result = pkDestSurf;
      if ( v10 )
        return result;
      pkDestSurf->lpVtbl->Release((IUnknown *)pkDestSurf);
    }
  }
  return 0;
}
// 90E3E0: using guessed type int __stdcall D3DXLoadSurfaceFromSurface(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD);

//----- (006B27D0) --------------------------------------------------------
char __cdecl SaveSurfaceToFileInRect(char *acFn, IDirect3DSurface9 *pkSurf, tagRECT *pkRect, IDirect3DDevice9 *pkDevice)
{
  IDirect3DSurface9 *v5; // eax@3
  IDirect3DSurface9 *v6; // esi@3

  if ( !pkDevice )
    return 0;
  v5 = CloneSurfaceToR8G8B8(pkSurf, pkRect, pkDevice);
  v6 = v5;
  if ( v5 )
  {
    if ( SaveSurfaceToJPG(acFn, v5) )
    {
      v6->lpVtbl->Release((IUnknown *)v6);
      return 1;
    }
    v6->lpVtbl->Release((IUnknown *)v6);
  }
  return 0;
}

//----- (006B2820) --------------------------------------------------------
char __usercall ScreenShot_InFileName@<al>(int a1@<esi>, NiRenderer *pkRenderer, HWND__ *hWnd, char *pcFilename, int iFilenameLen, const char *pkCreateFileName)
{
  NiRefObjectVtbl *v7; // esi@3
  tagRECT *v8; // ebx@7
  int v9; // [sp-4h] [bp-138h]@3
  IDirect3DSurface9 *pkSurf; // [sp+8h] [bp-12Ch]@5
  tagRECT kWinRect; // [sp+Ch] [bp-128h]@8
  _D3DDISPLAYMODE kD3DDM; // [sp+1Ch] [bp-118h]@4
  char szFileName[260]; // [sp+2Ch] [bp-108h]@10

  if ( !pkRenderer )
    return 0;
  v9 = a1;
  v7 = pkRenderer[1].vfptr;
  if ( !v7
    || (*((int (__stdcall **)(_DWORD, _DWORD, _DWORD))v7->__vecDelDtor + 8))(v7, 0, &kD3DDM) < 0
    || (*((int (__stdcall **)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v7->__vecDelDtor + 36))(
         v7,
         kD3DDM.Width,
         kD3DDM.Height,
         21,
         3,
         &pkSurf,
         0) < 0 )
  {
    return 0;
  }
  if ( (*((int (__stdcall **)(_DWORD, _DWORD, _DWORD, _DWORD))v7->__vecDelDtor + 33))(v7, 0, pkSurf, v9) >= 0 )
  {
    v8 = 0;
    if ( hWnd && GetWindowRect(hWnd, &kWinRect) )
      v8 = &kWinRect;
    szFileName[0] = 0;
    memset(&szFileName[1], 0, 0x103u);
    strcpy(szFileName, pkCreateFileName);
    if ( !SaveSurfaceToFileInRect(szFileName, pkSurf, v8, (IDirect3DDevice9 *)v7) )
    {
      ((void (__cdecl *)(IDirect3DSurface9 *))pkSurf->lpVtbl->Release)(pkSurf);
      return 0;
    }
    if ( pcFilename )
    {
      if ( (signed int)strlen(pkCreateFileName) < iFilenameLen )
        strcpy(pcFilename, pkCreateFileName);
    }
  }
  ((void (__cdecl *)(IDirect3DSurface9 *))pkSurf->lpVtbl->Release)(pkSurf);
  return 1;
}
// 6B2820: could not find valid save-restore pair for esi

//----- (006B29B0) --------------------------------------------------------
char __cdecl ScreenShot(NiRenderer *pkRenderer, HWND__ *hWnd, char *pcFilename, int iFilenameLen)
{
  size_t v4; // ST24_4@1
  NiUnsharedGeometryGroup *v5; // eax@1
  int v6; // esi@1
  _iobuf *v7; // eax@5
  char acFullPath[260]; // [sp+10h] [bp-310h]@1
  char acFullPathFilename[260]; // [sp+114h] [bp-20Ch]@1
  char acFilename[260]; // [sp+218h] [bp-108h]@1

  memset(acFullPath, 0, 0x104u);
  PgSHGetPathFromIDList(acFullPath);
  v4 = strlen((const char *)TextData2::Get(0x283C958Du));
  v5 = TextData2::Get(0x283C958Du);
  strncat(acFullPath, (const char *)v5, v4);
  _mkdir(acFullPath);
  acFullPathFilename[0] = 0;
  memset(&acFullPathFilename[1], 0, 0x103u);
  acFilename[0] = 0;
  memset(&acFilename[1], 0, 0x103u);
  v6 = -1;
  while ( 1 )
  {
    if ( ++v6 >= 1000 )
      sprintf(acFilename, "%s%d.jpg", SCREENSHOT_FILENAME, v6);
    else
      sprintf(acFilename, "%s%03d.jpg", SCREENSHOT_FILENAME, v6);
    sprintf(acFullPathFilename, "%s\\%s", acFullPath, acFilename);
    v7 = fopen(acFullPathFilename, "rb");
    if ( !v7 )
      break;
    fclose(v7);
  }
  return ScreenShot_InFileName(v6, pkRenderer, hWnd, pcFilename, iFilenameLen, acFullPathFilename);
}
// A771AC: using guessed type const char *const SCREENSHOT_FILENAME;

//----- (006B2B30) --------------------------------------------------------
char __cdecl ScreenShot_UserName(NiRenderer *pkRenderer, HWND__ *hWnd, char *pcFilename, int iFilenameLen)
{
  const char *v4; // eax@1
  int v5; // eax@3
  bool v6; // sf@3
  int *v7; // eax@3
  int v8; // ecx@5
  void *v9; // eax@5
  const char *v10; // esi@9
  signed int v11; // edi@9
  _iobuf *v12; // eax@13
  char v13; // bl@15
  int nIndex; // [sp+10h] [bp-35Ch]@3
  char *v16; // [sp+14h] [bp-358h]@1
  int v17; // [sp+18h] [bp-354h]@3
  HWND__ *v18; // [sp+1Ch] [bp-350h]@1
  NiRenderer *v19; // [sp+20h] [bp-34Ch]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strUserName; // [sp+24h] [bp-348h]@1
  _SYSTEMTIME st; // [sp+40h] [bp-32Ch]@1
  char acFullPathFilename[260]; // [sp+50h] [bp-31Ch]@9
  char szUserInfoFileName[260]; // [sp+154h] [bp-218h]@1
  char acFilename[260]; // [sp+258h] [bp-114h]@9
  int v25; // [sp+368h] [bp-4h]@1

  v19 = pkRenderer;
  v18 = hWnd;
  v16 = pcFilename;
  GetLocalTime(&st);
  szUserInfoFileName[0] = 0;
  memset(&szUserInfoFileName[1], 0, 0x103u);
  v4 = (const char *)((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)();
  strUserName._Myres = 15;
  strUserName._Mysize = 0;
  strUserName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strUserName, v4, strlen(v4));
  v25 = 0;
  if ( !strUserName._Mysize )
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strUserName, "NoName", 6u);
  v5 = Server::GetSelectServerIndex(&g_kServer);
  nIndex = v5;
  v6 = v5 < 0;
  v17 = 0;
  v7 = &v17;
  if ( !v6 )
    v7 = &nIndex;
  v8 = *v7;
  v9 = strUserName._Bx._Ptr;
  if ( strUserName._Myres < 0x10 )
    v9 = &strUserName;
  sprintf(
    szUserInfoFileName,
    "%04d_%02d_%02d_%02d_%02d_%02d_w%d_%s",
    st.wYear,
    st.wMonth,
    st.wDay,
    st.wHour,
    st.wMinute,
    st.wSecond,
    v8,
    v9);
  if ( !Folder::m_bInit )
    Folder::Init();
  v10 = Folder::Merge(&Folder::m_acMain, SCREENSHOT_PATHNAME);
  _mkdir(v10);
  acFullPathFilename[0] = 0;
  memset(&acFullPathFilename[1], 0, 0x103u);
  acFilename[0] = 0;
  memset(&acFilename[1], 0, 0x103u);
  v11 = -1;
  while ( 1 )
  {
    if ( ++v11 )
      sprintf(acFilename, "%s_%d.jpg", szUserInfoFileName, v11);
    else
      sprintf(acFilename, "%s.jpg", szUserInfoFileName);
    sprintf(acFullPathFilename, "%s\\%s", v10, acFilename);
    v12 = fopen(acFullPathFilename, "rb");
    if ( !v12 )
      break;
    fclose(v12);
  }
  v13 = ScreenShot_InFileName((int)v10, v19, v18, v16, iFilenameLen, acFullPathFilename);
  if ( strUserName._Myres >= 0x10 )
    operator delete(strUserName._Bx._Ptr);
  return v13;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006B2DC0) --------------------------------------------------------
void __thiscall JpgImage::JpgImage(JpgImage *this)
{
  this->m_eSampling = 1;
  this->m_iQuality = 75;
  this->m_eInputColorOrder = 1;
}

//----- (006B2DE0) --------------------------------------------------------
BOOL __thiscall JpgImage::Save(JpgImage *this, char *acFn, JpgImage::ImageInfo *rkInfo)
{
  void *v3; // esp@1
  JpgImage *v4; // edi@1
  int v5; // ecx@2
  signed int v7; // [sp+0h] [bp-4E88h]@1
  struct _JPEG_CORE_PROPERTIES v8; // [sp+4h] [bp-4E84h]@1
  unsigned int v9; // [sp+4E6Ch] [bp-1Ch]@1
  CPPEH_RECORD ms_exc; // [sp+4E70h] [bp-18h]@1
  int savedregs; // [sp+4E88h] [bp+0h]@1

  v3 = alloca(20080);
  ms_exc.registration.ScopeTable = (unsigned int)ms_exc.registration.ScopeTable ^ __security_cookie;
  v9 = (unsigned int)&savedregs ^ __security_cookie;
  v4 = this;
  v7 = 1;
  ms_exc.registration.TryLevel = 0;
  if ( ijlInit((int)&v8)
    || (v5 = rkInfo->dwPitch - 3 * rkInfo->dwWidth,
        v8.DIBWidth = rkInfo->dwWidth,
        v8.DIBHeight = rkInfo->dwHeight,
        v8.DIBBytes = rkInfo->pbyBits,
        v8.DIBPadBytes = v5,
        v8.DIBChannels = 3,
        v8.DIBColor = v4->m_eInputColorOrder,
        v8.JPGFile = acFn,
        v8.JPGWidth = v8.DIBWidth,
        v8.JPGHeight = v8.DIBHeight,
        v8.JPGChannels = 3,
        v8.JPGColor = 3,
        v8.JPGSubsampling = v4->m_eSampling,
        v8.jquality = v4->m_iQuality,
        ijlWrite(&v8, 8)) )
  {
    v7 = 0;
  }
  ms_exc.registration.TryLevel = -2;
  ijlFree((int)&v8);
  return v7 == 1;
}
// 6B2DE0: could not find valid save-restore pair for ebx
// 6B2DE0: could not find valid save-restore pair for edi
// 6B2DE0: could not find valid save-restore pair for esi

//----- (006B2F10) --------------------------------------------------------
void __cdecl std::fill<std::_List_iterator<std::_List_val<std::pair<unsigned short const,QUEST_DATA *>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>>> *,std::_List_iterator<std::_List_val<std::pair<unsigned short const,QUEST_DATA *>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>>>>(std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *_First, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *_Last, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *_Val)
{
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *i; // eax@1

  for ( i = _First; i != _Last; ++i )
    i->_Ptr = _Val->_Ptr;
}

//----- (006B2F30) --------------------------------------------------------
void __cdecl std::_Uninit_fill_n<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>> *,unsigned int,std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>,std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>(std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *_First, unsigned int _Count, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *_Pval)
{
  unsigned int v3; // ecx@1
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *v4; // eax@2

  v3 = _Count;
  if ( _Count )
  {
    v4 = _First;
    do
    {
      if ( v4 )
        v4->_Ptr = _Pval->_Ptr;
      ++v4;
      --v3;
    }
    while ( v3 );
  }
}

//----- (006B2F60) --------------------------------------------------------
void __thiscall ProduceInfoTable::MaterialInfo::MaterialInfo(ProduceInfoTable::MaterialInfo *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > InxName)
{
  ProduceInfoTable::MaterialInfo *v2; // esi@1
  bool v3; // cf@1

  v2 = this;
  this->m_InxName._Myres = 15;
  this->m_InxName._Mysize = 0;
  this->m_InxName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&this->m_InxName, &InxName, 0, 0xFFFFFFFF);
  v3 = InxName._Myres < 0x10;
  *(_DWORD *)&v2->m_MasteryType[0] = 0;
  *(_WORD *)&v2->m_MasteryType[4] = 0;
  v2->m_MasteryType[6] = 0;
  if ( !v3 )
    operator delete(InxName._Bx._Ptr);
}

//----- (006B2FE0) --------------------------------------------------------
std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > *__thiscall std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ActiveSkillInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>>,0>>::lower_bound(std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> >,0> > *this, std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > *result, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Keyval)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // ebx@1
  std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> >,0> > *v4; // esi@1
  unsigned int v5; // edi@1
  unsigned int v6; // eax@1
  std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > *v7; // edx@3
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *v8; // ecx@3
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *v9; // esi@3
  int v10; // eax@3
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *v11; // edx@3
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *v12; // eax@5
  unsigned int v13; // esi@8
  int v14; // eax@8
  const char *v15; // edx@9
  unsigned int v16; // edi@11
  unsigned int v17; // ecx@11
  int v18; // eax@15
  bool v19; // sf@15
  unsigned int v20; // esi@20
  const char *v21; // eax@20
  unsigned int v22; // edi@22
  unsigned int v23; // edx@22
  const char *v24; // ecx@25
  int v25; // eax@27
  bool v26; // sf@27
  std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > *v27; // eax@31
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *v28; // [sp+Ch] [bp-Ch]@3
  int v29; // [sp+10h] [bp-8h]@3
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *v30; // [sp+14h] [bp-4h]@3
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *_Where; // [sp+24h] [bp+Ch]@3

  v3 = _Keyval;
  v4 = this;
  v5 = this->_Mask;
  v6 = v5 & stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::operator()(_Keyval);
  if ( v4->_Maxidx <= v6 )
    v6 += -1 - (v5 >> 1);
  v7 = v4->_Vec._Myfirst;
  v8 = v7[2 * v6]._Ptr;
  v9 = v4->_List._Myhead;
  v10 = (int)&v7[2 * v6];
  v11 = v8;
  v29 = v10;
  v28 = v8;
  _Where = v8;
  v30 = v9;
  while ( 1 )
  {
    if ( v8 == v9 )
      v12 = v9;
    else
      v12 = **(std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node ***)(v10 + 4);
    if ( v11 == v12 )
    {
      v27 = result;
      result->_Ptr = v9;
      return v27;
    }
    v13 = v3->_Mysize;
    v14 = (int)&v11->_Myval;
    if ( v3->_Myres < 0x10 )
      v15 = (const char *)v3;
    else
      v15 = v3->_Bx._Ptr;
    v16 = *(_DWORD *)(v14 + 16);
    v17 = *(_DWORD *)(v14 + 16);
    if ( v16 >= v13 )
      v17 = v3->_Mysize;
    if ( *(_DWORD *)(v14 + 20) >= 0x10u )
      v14 = *(_DWORD *)v14;
    v18 = std::char_traits<char>::compare((const char *)v14, v15, v17);
    v19 = v18 < 0;
    if ( !v18 )
    {
      if ( v16 < v13 )
        goto LABEL_19;
      LOBYTE(v18) = v16 != v13;
      v19 = v18 < 0;
    }
    if ( !v19 )
      break;
LABEL_19:
    v11 = _Where->_Next;
    v9 = v30;
    v10 = v29;
    v8 = v28;
    _Where = _Where->_Next;
  }
  v20 = _Where->_Myval.first._Mysize;
  v21 = _Where->_Myval.first._Bx._Buf;
  if ( _Where->_Myval.first._Myres >= 0x10 )
    v21 = *(const char **)v21;
  v22 = v3->_Mysize;
  v23 = v3->_Mysize;
  if ( v22 >= v20 )
    v23 = _Where->_Myval.first._Mysize;
  if ( v3->_Myres < 0x10 )
    v24 = (const char *)v3;
  else
    v24 = v3->_Bx._Ptr;
  v25 = std::char_traits<char>::compare(v24, v21, v23);
  v26 = v25 < 0;
  if ( !v25 )
  {
    if ( v22 >= v20 )
    {
      LOBYTE(v25) = v22 != v20;
      v26 = v25 < 0;
      goto LABEL_30;
    }
LABEL_31:
    v27 = result;
    result->_Ptr = v30;
    return v27;
  }
LABEL_30:
  if ( v26 )
    goto LABEL_31;
  v27 = result;
  result->_Ptr = _Where;
  return v27;
}

//----- (006B3110) --------------------------------------------------------
ItemInfo *__cdecl ProduceInfoTable::GetMaterialInfo(std::basic_string<char,std::char_traits<char>,std::allocator<char> > Material)
{
  ItemInfo *v1; // esi@2
  ItemInfo *v2; // eax@4
  std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > result; // [sp+8h] [bp-10h]@1
  int v4; // [sp+14h] [bp-4h]@1

  v4 = 0;
  std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ActiveSkillInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>>,0>>::lower_bound(
    &ProduceInfoTable::m_MaterialMap,
    &result,
    &Material);
  if ( result._Ptr == (std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *)stru_B5BE1C._Myhead )
  {
    if ( Material._Myres >= 0x10 )
      operator delete(Material._Bx._Ptr);
    v2 = 0;
  }
  else
  {
    v1 = result._Ptr->_Myval.second;
    if ( Material._Myres >= 0x10 )
      operator delete(Material._Bx._Ptr);
    v2 = v1;
  }
  return v2;
}

//----- (006B31B0) --------------------------------------------------------
void __cdecl ProduceInfoTable::SetMaterialInfo(std::basic_string<char,std::char_traits<char>,std::allocator<char> > Material, int iMasteryType)
{
  unsigned int v2; // esi@1
  signed int v3; // ecx@1
  unsigned int v4; // edi@3
  const char *v5; // eax@3
  int v6; // eax@5
  ProduceInfoTable::MaterialInfo *v7; // esi@11
  ProduceInfoTable::MaterialInfo *v8; // eax@12
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ProduceInfoTable::MaterialInfo *> *v9; // eax@14
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v10; // [sp-1Ch] [bp-68h]@12
  int v11; // [sp-Ch] [bp-58h]@12
  signed int v12; // [sp-8h] [bp-54h]@12
  char *v13; // [sp-4h] [bp-50h]@9
  std::pair<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ProduceInfoTable::MaterialInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ProduceInfoTable::MaterialInfo *> > > >,bool> v14; // [sp+Ch] [bp-40h]@12
  int v15; // [sp+14h] [bp-38h]@1
  ProduceInfoTable::MaterialInfo *pkMaterialInfo; // [sp+18h] [bp-34h]@10
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ProduceInfoTable::MaterialInfo *> result; // [sp+1Ch] [bp-30h]@14
  int v18; // [sp+48h] [bp-4h]@1

  v15 = iMasteryType;
  v2 = Material._Mysize;
  v18 = 0;
  v3 = Material._Mysize;
  if ( Material._Mysize >= 1 )
    v3 = 1;
  v4 = Material._Myres;
  v5 = Material._Bx._Ptr;
  if ( Material._Myres < 0x10 )
    v5 = (const char *)&Material;
  v6 = std::char_traits<char>::compare(v5, "-", v3);
  if ( !v6 && v2 >= 1 )
  {
    LOBYTE(v6) = v2 != 1;
    if ( !v6 )
    {
      if ( v4 < 0x10 )
        return;
      v13 = Material._Bx._Ptr;
      goto LABEL_19;
    }
  }
  std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ActiveSkillInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>>,0>>::lower_bound(
    &ProduceInfoTable::m_MaterialMap,
    (std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > > *)&pkMaterialInfo,
    &Material);
  if ( pkMaterialInfo == (ProduceInfoTable::MaterialInfo *)stru_B5BE1C._Myhead )
  {
    v7 = (ProduceInfoTable::MaterialInfo *)operator new(0x24u);
    pkMaterialInfo = v7;
    LOBYTE(v18) = 1;
    if ( v7 )
    {
      *(_DWORD *)&v14.second = &v10;
      v12 = 15;
      v11 = 0;
      v10._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v10, &Material, 0, 0xFFFFFFFF);
      ProduceInfoTable::MaterialInfo::MaterialInfo(v7, v10);
    }
    else
    {
      v8 = 0;
    }
    v8->m_MasteryType[v15] = 1;
    pkMaterialInfo = v8;
    LOBYTE(v18) = 0;
    v9 = std::make_pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> &,ProduceInfoTable::MaterialInfo * &>(
           &result,
           &Material,
           &pkMaterialInfo);
    LOBYTE(v18) = 2;
    std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ProduceInfoTable::MaterialInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>>,0>>::insert<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ProduceInfoTable::MaterialInfo *>>(
      (std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ProduceInfoTable::MaterialInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ProduceInfoTable::MaterialInfo *> >,0> > *)&ProduceInfoTable::m_MaterialMap,
      &v14,
      v9);
    if ( result.first._Myres >= 0x10 )
      operator delete(result.first._Bx._Ptr);
  }
  else
  {
    pkMaterialInfo[1].m_InxName._Bx._Ptr[v15 + 28] = 1;
  }
  if ( Material._Myres >= 0x10 )
  {
    v13 = Material._Bx._Ptr;
LABEL_19:
    operator delete(v13);
  }
}

//----- (006B3330) --------------------------------------------------------
void __cdecl ProduceInfoTable::BuildMeterialMap()
{
  int v0; // eax@1
  unsigned int v1; // edi@4
  char *v2; // eax@5
  char *v3; // esi@5
  char *v4; // eax@6
  char v5; // dl@7
  char *v6; // eax@8
  char v7; // dl@9
  char *v8; // eax@10
  char v9; // dl@11
  char *v10; // eax@12
  char v11; // dl@13
  char *v12; // eax@14
  char v13; // dl@15
  char *v14; // eax@16
  char v15; // dl@17
  char *v16; // eax@18
  char v17; // dl@19
  char v18; // [sp-20h] [bp-38h]@6
  int v19; // [sp-10h] [bp-28h]@6
  signed int v20; // [sp-Ch] [bp-24h]@6
  int v21; // [sp-4h] [bp-1Ch]@6
  char *v22; // [sp+Ch] [bp-Ch]@6
  unsigned int i; // [sp+10h] [bp-8h]@4
  unsigned int v24; // [sp+14h] [bp-4h]@2

  v0 = *(_DWORD *)(ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable + 56);
  if ( v0 )
    v24 = *(_DWORD *)(v0 + 40);
  else
    v24 = 0;
  v1 = 0;
  for ( i = 0; v1 < v24; i = v1 )
  {
    v2 = CDataReader::GetRecord((CDataReader *)(ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable + 4), v1);
    v3 = v2;
    if ( v2 )
    {
      v21 = *(_DWORD *)(v2 + 422);
      v4 = v2 + 134;
      v20 = 15;
      v19 = 0;
      v18 = 0;
      v22 = v3 + 135;
      do
        v5 = *v4++;
      while ( v5 );
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v18,
        v3 + 134,
        v4 - v22);
      ProduceInfoTable::SetMaterialInfo(
        *(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v18,
        v21);
      v21 = *(_DWORD *)(v3 + 422);
      v6 = v3 + 170;
      v20 = 15;
      v19 = 0;
      v18 = 0;
      v22 = v3 + 171;
      do
        v7 = *v6++;
      while ( v7 );
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v18,
        v3 + 170,
        v6 - v22);
      ProduceInfoTable::SetMaterialInfo(
        *(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v18,
        v21);
      v21 = *(_DWORD *)(v3 + 422);
      v8 = v3 + 206;
      v20 = 15;
      v19 = 0;
      v18 = 0;
      v22 = v3 + 207;
      do
        v9 = *v8++;
      while ( v9 );
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v18,
        v3 + 206,
        v8 - v22);
      ProduceInfoTable::SetMaterialInfo(
        *(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v18,
        v21);
      v21 = *(_DWORD *)(v3 + 422);
      v10 = v3 + 242;
      v20 = 15;
      v19 = 0;
      v18 = 0;
      v22 = v3 + 243;
      do
        v11 = *v10++;
      while ( v11 );
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v18,
        v3 + 242,
        v10 - v22);
      ProduceInfoTable::SetMaterialInfo(
        *(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v18,
        v21);
      v21 = *(_DWORD *)(v3 + 422);
      v12 = v3 + 278;
      v20 = 15;
      v19 = 0;
      v18 = 0;
      v22 = v3 + 279;
      do
        v13 = *v12++;
      while ( v13 );
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v18,
        v3 + 278,
        v12 - v22);
      ProduceInfoTable::SetMaterialInfo(
        *(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v18,
        v21);
      v21 = *(_DWORD *)(v3 + 422);
      v14 = v3 + 314;
      v20 = 15;
      v19 = 0;
      v18 = 0;
      v22 = v3 + 315;
      do
        v15 = *v14++;
      while ( v15 );
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v18,
        v3 + 314,
        v14 - v22);
      ProduceInfoTable::SetMaterialInfo(
        *(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v18,
        v21);
      v21 = *(_DWORD *)(v3 + 422);
      v16 = v3 + 350;
      v20 = 15;
      v19 = 0;
      v18 = 0;
      v22 = v3 + 351;
      do
        v17 = *v16++;
      while ( v17 );
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v18,
        v3 + 350,
        v16 - v22);
      ProduceInfoTable::SetMaterialInfo(
        *(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v18,
        v21);
      v21 = *(_DWORD *)(v3 + 422);
      v20 = 15;
      v19 = 0;
      v22 = &v18;
      v18 = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v18,
        v3 + 386,
        strlen(v3 + 386));
      ProduceInfoTable::SetMaterialInfo(
        *(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v18,
        v21);
      v1 = i;
    }
    ++v1;
  }
}
// A8C16C: using guessed type int ITableBase<ProduceInfo,ProduceInfoTable>::ms_pkTable;

//----- (006B35B0) --------------------------------------------------------
std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ProduceInfoTable::MaterialInfo *> *__cdecl std::make_pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> &,ProduceInfoTable::MaterialInfo * &>(std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ProduceInfoTable::MaterialInfo *> *result, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Val1, ProduceInfoTable::MaterialInfo **_Val2)
{
  result->first._Mysize = 0;
  result->first._Myres = 15;
  result->first._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&result->first, _Val1, 0, 0xFFFFFFFF);
  result->second = *_Val2;
  return result;
}

//----- (006B35F0) --------------------------------------------------------
std::pair<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ProduceInfoTable::MaterialInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ProduceInfoTable::MaterialInfo *> > > >,bool> *__thiscall std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ProduceInfoTable::MaterialInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>>,0>>::insert<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ProduceInfoTable::MaterialInfo *>>(std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ProduceInfoTable::MaterialInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ProduceInfoTable::MaterialInfo *> >,0> > *this, std::pair<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ProduceInfoTable::MaterialInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ProduceInfoTable::MaterialInfo *> > > >,bool> *result, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ProduceInfoTable::MaterialInfo *> *_Val)
{
  std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ProduceInfoTable::MaterialInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ProduceInfoTable::MaterialInfo *> >,0> > *v3; // ebx@1
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node **v4; // eax@1
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *v5; // edi@1
  std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node *v6; // eax@1
  unsigned int v7; // ecx@1

  v3 = this;
  v4 = (std::_List_nod<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > >::_Node **)this->_List._Myhead;
  v5 = *v4;
  v6 = std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ActiveSkillInfo *>>(
         *v4,
         (*v4)->_Prev,
         (std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *> *)_Val);
  v7 = v3->_List._Mysize;
  if ( 134217726 - v7 < 1 )
    std::_Xlength_error("list<T> too long");
  v3->_List._Mysize = v7 + 1;
  v5->_Prev = v6;
  v6->_Prev->_Next = v6;
  std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,ProduceInfoTable::MaterialInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ProduceInfoTable::MaterialInfo *>>,0>>::_Insert(
    (std::_Hash<std::_Hmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,ItemInfo *,stdext::hash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> >,0> > *)v3,
    (std::pair<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > >,bool> *)result,
    (std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> *)&v3->_List._Myhead->_Next->_Myval,
    (std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,ItemInfo *> > > >)v3->_List._Myhead->_Next);
  return result;
}

//----- (006B3670) --------------------------------------------------------
unsigned int CClientQuest::GetQuestPlayerLevel()
{
  return User::Lv(&g_kUser);
}

//----- (006B3680) --------------------------------------------------------
int __stdcall CClientQuest::GetQuestPlayerItemLot(unsigned __int16 nItemID)
{
  return Inventory::GetItemCnt(&g_kInventory, nItemID);
}

//----- (006B3690) --------------------------------------------------------
char CClientQuest::GetQuestPlayerRace()
{
  char v1; // al@1

  v1 = User::GetMainCharClass(&g_kUser);
  return CharClass::GetRace(v1);
}

//----- (006B36B0) --------------------------------------------------------
char CClientQuest::GetQuestPlayerClass()
{
  return User::GetMainCharClass(&g_kUser);
}

//----- (006B36C0) --------------------------------------------------------
char CClientQuest::GetQuestPlayerGender()
{
  return User::GetMainCharGender(&g_kUser);
}

//----- (006B36D0) --------------------------------------------------------
void __thiscall CClientQuest::SetQuestResetTime(CClientQuest *this, PROTO_NC_QUEST_RESET_TIME_CMD *pkReSet_Time)
{
  if ( pkReSet_Time )
    this->m_QuestRestTime = *pkReSet_Time;
}

//----- (006B3710) --------------------------------------------------------
void __stdcall CClientQuest::Occure_LevelChange(unsigned __int16 nQuestID, char nPlayerLevel, char nDoneLevel)
{
  QuestDataMgr::m_bUpdate = 1;
}
// A771B0: using guessed type bool QuestDataMgr::m_bUpdate;

//----- (006B3720) --------------------------------------------------------
void __stdcall CClientQuest::Occure_DestroyItem(unsigned __int16 nQuestID, unsigned __int16 nItemID, unsigned __int16 nCurrentLot, unsigned __int16 nDoneCount)
{
  QuestDataMgr::m_bUpdate = 1;
  CQuestWin2::ms_bUpdate = 1;
}
// A771B0: using guessed type bool QuestDataMgr::m_bUpdate;
// A8EA8C: using guessed type bool CQuestWin2::ms_bUpdate;

//----- (006B3730) --------------------------------------------------------
void __stdcall CClientQuest::Occure_CheckLocation(unsigned __int16 nQuestID, unsigned __int16 nLocation)
{
  QuestDataMgr::m_bUpdate = 1;
}
// A771B0: using guessed type bool QuestDataMgr::m_bUpdate;

//----- (006B3740) --------------------------------------------------------
void __stdcall CClientQuest::Occure_RaceChange(unsigned __int16 nQuestID, char nRace)
{
  QuestDataMgr::m_bUpdate = 1;
}
// A771B0: using guessed type bool QuestDataMgr::m_bUpdate;

//----- (006B3750) --------------------------------------------------------
void __stdcall CClientQuest::Occure_ClassChange(unsigned __int16 nQuestID, char nClass)
{
  QuestDataMgr::m_bUpdate = 1;
}
// A771B0: using guessed type bool QuestDataMgr::m_bUpdate;

//----- (006B3760) --------------------------------------------------------
void __stdcall CClientQuest::Occure_TimeProcess(unsigned __int16 nQuestID, unsigned __int16 RunningTimeSec, unsigned __int16 TimeLimitSec)
{
  QuestDataMgr::m_bUpdate = 1;
}
// A771B0: using guessed type bool QuestDataMgr::m_bUpdate;

//----- (006B3770) --------------------------------------------------------
void __stdcall CClientQuest::Occure_NewStatusReward(PLAYER_QUEST_INFO *pQuestInfo, QUEST_DATA *pQuestData)
{
  QuestDataMgr::m_bUpdate = 1;
}
// A771B0: using guessed type bool QuestDataMgr::m_bUpdate;

//----- (006B3780) --------------------------------------------------------
void __stdcall CClientQuest::Occure_NewStatusFailed(PLAYER_QUEST_INFO *pQuestInfo, QUEST_DATA *pQuestData)
{
  QuestDataMgr::m_bUpdate = 1;
}
// A771B0: using guessed type bool QuestDataMgr::m_bUpdate;

//----- (006B3790) --------------------------------------------------------
void __stdcall CClientQuest::Occure_NewStatusIng(PLAYER_QUEST_INFO *pQuestInfo, QUEST_DATA *pQuestData)
{
  QuestDataMgr::m_bUpdate = 1;
}
// A771B0: using guessed type bool QuestDataMgr::m_bUpdate;

//----- (006B37A0) --------------------------------------------------------
void __thiscall CClientQuest::_Send_NC_QUEST_CLIENT_SCENARIO_DONE_REQ(CClientQuest *this, unsigned __int16 kID)
{
  GameFrameWork::NcQuestClientScenarioDoneReq((GameFrameWork *)this->m_pkFrameWork, kID);
}

//----- (006B37B0) --------------------------------------------------------
void __thiscall CClientQuest::Occure_TakeItem(CClientQuest *this, unsigned __int16 nQuestID, unsigned __int16 nItemID, unsigned __int16 nCurrentLot, unsigned __int16 nDoneCount)
{
  int v5; // esi@1
  int v6; // edi@1
  int (__thiscall *v7)(int, _DWORD); // edx@1
  int *v8; // eax@3
  int v9; // ebx@4
  signed int v10; // eax@5
  GameFrameWork *v11; // esi@9
  D3DXCOLOR *v12; // eax@10
  D3DXCOLOR v13; // ST08_16@10
  D3DXCOLOR result; // [sp+Ch] [bp-11Ch]@10
  CClientQuest *v15; // [sp+1Ch] [bp-10Ch]@1
  float v16; // [sp+20h] [bp-108h]@7
  char szText[256]; // [sp+24h] [bp-104h]@8

  v5 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  v6 = nItemID;
  QuestDataMgr::m_bUpdate = 1;
  CQuestWin2::ms_bUpdate = 1;
  v7 = *(int (__thiscall **)(int, _DWORD))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16);
  v15 = this;
  if ( (unsigned __int8)v7(ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable, nItemID) )
  {
    if ( (unsigned __int16)v6 <= *(_WORD *)(v5 + 200) )
    {
      v8 = (int *)(*(_DWORD *)(v5 + 196) + 4 * nItemID);
      if ( *v8 )
      {
        v9 = *v8;
        if ( *v8 )
        {
          LOWORD(v6) = nDoneCount;
          v10 = 0;
          if ( nCurrentLot && nDoneCount )
          {
            v16 = (double)(100 * nCurrentLot) / (double)nDoneCount;
            v10 = (signed int)v16;
          }
          sprintf(szText, "%s %d/%d %d%%", v9 + 34, nCurrentLot, nDoneCount, v10);
        }
      }
    }
  }
  v11 = (GameFrameWork *)v15->m_pkFrameWork;
  if ( v11 )
  {
    v12 = ColorInfoTable::GetDxColor(&result, Center_Announcement);
    *(_QWORD *)&v13.r = *(_QWORD *)&v12->r;
    *(_QWORD *)&v13.b = *(_QWORD *)&v12->b;
    GameFrameWork::AddAnnounceMsg(v11, v6, (int)v11, szText, v13);
  }
}
// A771B0: using guessed type bool QuestDataMgr::m_bUpdate;
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
// A8EA8C: using guessed type bool CQuestWin2::ms_bUpdate;

//----- (006B38E0) --------------------------------------------------------
void __stdcall CClientQuest::Occure_ScenarioDone(unsigned __int16 nQuestID, unsigned __int16 nScenarioID)
{
  ScenarioMgr::GetScenarioMgr();
}

//----- (006B38F0) --------------------------------------------------------
void __thiscall CClientQuest::QuestResultMessage(CClientQuest *this, QUEST_DATA::QUEST_REWARD *pReward)
{
  GameFrameWork *v2; // edi@1
  __int64 v3; // ST08_8@3
  int v4; // eax@3
  const char *v5; // eax@4
  NiUnsharedGeometryGroup *v6; // eax@4
  int v7; // eax@5
  const char *v8; // eax@6
  NiUnsharedGeometryGroup *v9; // eax@6
  int v10; // eax@7
  const char *v11; // eax@8
  NiUnsharedGeometryGroup *v12; // eax@8
  int v13; // eax@9
  const char *v14; // eax@10
  NiUnsharedGeometryGroup *v15; // eax@10
  void *v16; // eax@11
  void *v17; // ST0C_4@13
  NiUnsharedGeometryGroup *v18; // eax@13
  Item *v19; // eax@14
  int v20; // ST0C_4@15
  int v21; // ST08_4@15
  NiUnsharedGeometryGroup *v22; // eax@15
  NiUnsharedGeometryGroup *v23; // eax@16
  MiniHouse *v24; // eax@19
  char *v25; // ST0C_4@19
  NiUnsharedGeometryGroup *v26; // eax@19
  char *v27; // ST0C_4@20
  NiUnsharedGeometryGroup *v28; // eax@20
  char *v29; // [sp-4h] [bp-23Ch]@16
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strResult; // [sp+Ch] [bp-22Ch]@3
  char szValue[256]; // [sp+28h] [bp-210h]@4
  char szResult[256]; // [sp+128h] [bp-110h]@13
  int v33; // [sp+234h] [bp-4h]@3

  v2 = (GameFrameWork *)this->m_pkFrameWork;
  if ( v2 )
  {
    switch ( pReward->Type )
    {
      case 1:
        strResult._Myres = 15;
        strResult._Mysize = 0;
        strResult._Bx._Buf[0] = 0;
        v3 = pReward->Value.Exp;
        v33 = 0;
        v4 = User::GetGem(v3);
        if ( v4 )
        {
          v5 = _itoa(v4, szValue, 10);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strResult, v5);
          v6 = TextData::Get(0x475F9699u);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strResult, (const char *)v6);
        }
        v7 = User::GetGold(pReward->Value.Exp);
        if ( v7 )
        {
          v8 = _itoa(v7, szValue, 10);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strResult, v8);
          v9 = TextData::Get(0x47A395A3u);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strResult, (const char *)v9);
        }
        v10 = User::GetSilver(pReward->Value.Exp);
        if ( v10 )
        {
          v11 = _itoa(v10, szValue, 10);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strResult, v11);
          v12 = TextData::Get(0x98B595EF);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strResult, (const char *)v12);
        }
        v13 = User::GetCopper(pReward->Value.Exp);
        if ( v13 )
        {
          v14 = _itoa(v13, szValue, 10);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strResult, v14);
          v15 = TextData::Get(0x88AF99F5);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strResult, (const char *)v15);
        }
        v16 = strResult._Bx._Ptr;
        if ( strResult._Myres < 0x10 )
          v16 = &strResult;
        v17 = v16;
        v18 = TextData::Get(0x52210D7Du);
        sprintf(szResult, (const char *)v18, v17);
        GameFrameWork::AddSysMsg(v2, szResult);
        std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&strResult);
        break;
      case 2:
        v19 = Item::Create(pReward->Value.Item.ItemID);
        if ( v19 )
        {
          v20 = (int)v19->m_pkInfo->Name;
          v21 = pReward->Value.Item.ItemLot;
          v22 = TextData::Get(0x5A181220u);
          sprintf(szResult, (const char *)v22, v21, v20);
          GameFrameWork::AddSysMsg(v2, szResult);
        }
        break;
      case 3:
        v29 = IIDTableBase<AbnormalStateInfo,AbnormalStateInfoTab,unsigned short>::GetByID(pReward->Value.Abstate.AbstateID)->InxName;
        v23 = TextData::Get(0x616B5459u);
        goto LABEL_17;
      case 4:
        v29 = (char *)pReward->Value.Exp;
        v23 = TextData::Get(0x5220FF1Du);
LABEL_17:
        sprintf(szResult, (const char *)v23, v29);
        GameFrameWork::AddSysMsg(v2, szResult);
        break;
      case 6:
        v24 = MiniHouseTable::GetByHandle(pReward->Value.MiniHouseID);
        v25 = ItemInfoTab::GetByInxName(v24->ItemID)->Name;
        v26 = TextData::Get(0xA97656B1);
        sprintf(szResult, (const char *)v26, v25);
        GameFrameWork::AddSysMsg(v2, szResult);
        break;
      case 7:
        v27 = CCharacterTitleData::GetTitleString(
                &g_characterTitleData,
                pReward->Value.MiniHouseID,
                pReward->Value.CharacterTitle.ElementNo);
        v28 = TextData::Get(0x59270770u);
        sprintf(szValue, (const char *)v28, v27);
        GameFrameWork::AddSysMsg(v2, szValue);
        break;
      default:
        return;
    }
  }
}

//----- (006B3C30) --------------------------------------------------------
void __thiscall CClientQuest::Occure_Quest_Done(CClientQuest *this, PLAYER_QUEST_INFO *pQuestInfo, QUEST_DATA *pQuestData)
{
  CClientQuest *v3; // esi@1
  const char *v4; // ST08_4@2
  NiUnsharedGeometryGroup *v5; // eax@2
  GameFrameWork *v6; // ecx@2
  signed int v7; // ebx@3
  QUEST_DATA::QUEST_REWARD *v8; // edi@3
  char v9; // al@4
  int v10; // eax@7
  tm tmServerTime; // [sp+Ch] [bp-A8h]@11
  char szQuestResult[128]; // [sp+30h] [bp-84h]@2

  v3 = this;
  if ( pQuestInfo )
  {
    v4 = CQuestData::GetQuestName(this->m_pQuestData, pQuestInfo->ID);
    v5 = TextData::Get(0x52210D1Bu);
    sprintf(szQuestResult, (const char *)v5, v4);
    v6 = (GameFrameWork *)v3->m_pkFrameWork;
    if ( v6 )
    {
      GameFrameWork::AddSysMsg(v6, szQuestResult);
      v7 = 0;
      v8 = pQuestData->Reward;
      do
      {
        v9 = v8->Use;
        if ( v8->Use )
        {
          if ( v9 == 1 || v9 == 2 && (v10 = CClientQuest::GetRewardIndex(v3, pQuestInfo->ID), v10 >= 0) && v7 == v10 )
            CClientQuest::QuestResultMessage(v3, v8);
        }
        ++v7;
        ++v8;
      }
      while ( v7 < 12 );
      qmemcpy(&tmServerTime, &Timer::ms_dLastServerTime, sizeof(tmServerTime));
      pQuestInfo->Data.EndTime = _mktime64(&tmServerTime);
    }
  }
}

//----- (006B3D20) --------------------------------------------------------
CClientQuest *__cdecl QuestDataMgr::GetQuest()
{
  const char *v0; // eax@10
  const char *v2; // eax@15
  unsigned __int16 v3; // ax@17

  if ( !(_S3_9 & 1) )
  {
    _S3_9 |= 1u;
    CDataReader::CDataReader(&QuestDialog);
    atexit(QuestDataMgr::GetQuest_::_2_::_dynamic_atexit_destructor_for__QuestDialog__);
  }
  if ( !(_S3_9 & 2) )
  {
    _S3_9 |= 2u;
    CQuestData::CQuestData(&kQuestData, &QuestDialog);
    atexit(QuestDataMgr::GetQuest_::_2_::_dynamic_atexit_destructor_for__kQuestData__);
  }
  if ( !(_S3_9 & 4) )
  {
    _S3_9 |= 4u;
    CClientQuest::CClientQuest(&kQuest, &kQuestData);
    atexit(QuestDataMgr::GetQuest_::_2_::_dynamic_atexit_destructor_for__kQuest__);
  }
  if ( !bLoad )
  {
    if ( !Folder::m_bInit )
      Folder::Init();
    v0 = Folder::Merge(&Folder::m_acSystem, "QuestDialog.shn");
    if ( !CDataReader::Read(&QuestDialog, v0) )
      return 0;
    if ( !bLoad )
    {
      if ( !Folder::m_bInit )
        Folder::Init();
      v2 = Folder::Merge(&Folder::m_acSystem, "QuestData.shn");
      if ( !CQuestData::Read(&kQuestData, v2, 1) )
        return 0;
      if ( kQuestData.m_pDataHead )
        v3 = kQuestData.m_pDataHead->NumOfQuest;
      else
        v3 = 0;
      CQuest::InitQuestBF((CQuest *)&kQuest.vfptr, v3);
      bLoad = 1;
    }
  }
  return &kQuest;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006B3EB0) --------------------------------------------------------
void __thiscall CClientQuest::Occure_NPCMobKill(CClientQuest *this, unsigned __int16 nQuestID, unsigned __int16 nNPCMobID, int nCurrentCount, int nDoneCount)
{
  int v5; // esi@1
  int v6; // edi@1
  int v7; // edx@1
  int (__thiscall *v8)(int, _DWORD); // eax@1
  int v9; // edx@3
  signed int v10; // esi@5
  CClientQuest *v11; // eax@9
  CQuestData *v12; // ecx@10
  QUEST_DATA *v13; // eax@13
  char *v14; // eax@16
  char v15; // al@19
  GameFrameWork *v16; // esi@31
  char *v17; // eax@34
  D3DXCOLOR v18; // ST08_16@38
  const char *v19; // [sp-14h] [bp-14Ch]@22
  char *v20; // [sp-10h] [bp-148h]@22
  char v21; // [sp-10h] [bp-148h]@33
  int v22; // [sp-Ch] [bp-144h]@22
  char v23; // [sp-Ch] [bp-144h]@33
  int v24; // [sp-8h] [bp-140h]@22
  char v25; // [sp-8h] [bp-140h]@33
  signed int v26; // [sp-4h] [bp-13Ch]@22
  char v27; // [sp-4h] [bp-13Ch]@33
  D3DXCOLOR result; // [sp+Ch] [bp-12Ch]@35
  MobInfo *pkMobInfo; // [sp+1Ch] [bp-11Ch]@4
  unsigned __int16 byID[2]; // [sp+20h] [bp-118h]@1
  QUEST_DATA *lpQuest; // [sp+24h] [bp-114h]@1
  int i; // [sp+28h] [bp-110h]@1
  MobViewInfo *pkMobViewInfo; // [sp+2Ch] [bp-10Ch]@8
  float v34; // [sp+30h] [bp-108h]@7
  char szText[256]; // [sp+34h] [bp-104h]@20

  v5 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
  v6 = nNPCMobID;
  QuestDataMgr::m_bUpdate = 1;
  CQuestWin2::ms_bUpdate = 1;
  v7 = *(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
  lpQuest = (QUEST_DATA *)this;
  i = nQuestID;
  v8 = *(int (__thiscall **)(int, _DWORD))(v7 + 16);
  *(_DWORD *)byID = nNPCMobID;
  if ( (unsigned __int8)v8(ITableBase<MobInfo,MobInfoTab>::ms_pkTable, nNPCMobID) )
  {
    if ( nNPCMobID <= *(_WORD *)(v5 + 200) )
    {
      v9 = *(_DWORD *)(v5 + 196);
      if ( *(_DWORD *)(v9 + 4 * nNPCMobID) )
      {
        pkMobInfo = *(MobInfo **)(v9 + 4 * nNPCMobID);
        if ( pkMobInfo )
        {
          v6 = nCurrentCount;
          v10 = 0;
          if ( nCurrentCount && nDoneCount )
          {
            v34 = (double)(100 * nCurrentCount) / (double)nDoneCount;
            v10 = (signed int)v34;
          }
          pkMobViewInfo = MobViewInfoTab::GetByID(byID[0]);
          if ( pkMobViewInfo )
          {
            v11 = QuestDataMgr::GetQuest();
            v12 = v11 ? v11->m_pQuestData : lpQuest;
            v13 = v12 ? CQuestData::GetQuestData(v12, i) : lpQuest;
            if ( v13 )
            {
              v14 = &v13->End.NPCMobList[0].TargetGroup;
              i = 0;
              v34 = *(float *)&v14;
              do
              {
                if ( !*(v14 - 6) )
                  break;
                if ( *((_WORD *)v14 - 2) == byID[0] )
                {
                  v15 = *v14;
                  if ( v15 )
                  {
                    if ( v15 == 1 )
                    {
                      v26 = v10;
                      v24 = nDoneCount;
                      v22 = nCurrentCount;
                      v20 = pkMobViewInfo->Group1;
                      v19 = "%s %d/%d %d%%";
LABEL_29:
                      sprintf(szText, v19, v20, v22, v24, v26);
                      goto LABEL_30;
                    }
                    switch ( v15 )
                    {
                      case 2:
                        sprintf(szText, "%s %d/%d %d%%", pkMobViewInfo->Group2, nCurrentCount, nDoneCount, v10);
                        break;
                      case 3:
                        sprintf(szText, "%s %d/%d %d%%", pkMobViewInfo->Group3, nCurrentCount, nDoneCount, v10);
                        break;
                      case 4:
                        v26 = v10;
                        v24 = nDoneCount;
                        v22 = nCurrentCount;
                        v20 = pkMobViewInfo->GroupS;
                        v19 = "%s %d/%d %d%%";
                        goto LABEL_29;
                    }
                  }
                  else
                  {
                    sprintf(szText, "%s %d/%d %d%%", pkMobInfo->Name, nCurrentCount, nDoneCount, v10);
                  }
                }
LABEL_30:
                v14 = (char *)(LODWORD(v34) + 8);
                ++i;
                LODWORD(v34) += 8;
              }
              while ( i < 5 );
            }
          }
        }
      }
    }
  }
  v16 = *(GameFrameWork **)&lpQuest->Action[0].IfType;
  if ( v16 )
  {
    if ( *(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable )
    {
      v17 = CDataReader::GetRecord(
              (CDataReader *)(*(_DWORD *)ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable + 4),
              0x32u);
      v27 = -1;
      if ( !v17 )
      {
        Color::GetDxColor(&result, -1, 0, -1, -1);
LABEL_38:
        *(_QWORD *)&v18.r = *(_QWORD *)&result.r;
        *(_QWORD *)&v18.b = *(_QWORD *)&result.b;
        GameFrameWork::AddAnnounceMsg(v16, v6, (int)v16, szText, v18);
        return;
      }
      v25 = v17[6];
      v23 = v17[5];
      v21 = v17[4];
    }
    else
    {
      v27 = -1;
      v25 = -1;
      v23 = ITableBase<ColorInfoType,ColorInfoTable>::ms_pkTable[0];
      v21 = -1;
    }
    Color::GetDxColor(&result, v21, v23, v25, v27);
    goto LABEL_38;
  }
}
// A771B0: using guessed type bool QuestDataMgr::m_bUpdate;
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
// A8EA8C: using guessed type bool CQuestWin2::ms_bUpdate;

//----- (006B4180) --------------------------------------------------------
int __thiscall CClientQuest::GetRewardIndex(CClientQuest *this, int nQuestID)
{
  CClientQuest *v2; // esi@1
  std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *v3; // edi@1
  int result; // eax@2
  int v5; // esi@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > iterFind; // [sp+8h] [bp-4h]@1

  v2 = this;
  v3 = (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)&this->m_listRewardOfDoneQuest;
  std::_Tree<std::_Tmap_traits<enum  MHE_STEP,ResElement *,std::less<enum  MHE_STEP>,std::allocator<std::pair<enum  MHE_STEP const,ResElement *>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *)&this->m_listRewardOfDoneQuest,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > *)&iterFind,
    (OscTarget *)&nQuestID);
  if ( v2->m_listRewardOfDoneQuest._Myhead == iterFind._Ptr )
  {
    result = -1;
  }
  else
  {
    v5 = iterFind._Ptr->_Myval.second;
    std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
      v3,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > *)&nQuestID,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > >)iterFind._Ptr);
    result = v5;
  }
  return result;
}

//----- (006B41D0) --------------------------------------------------------
void __thiscall CClientQuest::CClientQuest(CClientQuest *this, CQuestData *pQuestData)
{
  CClientQuest *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v3; // eax@1
  std::exception pExceptionObject; // [sp+Ch] [bp-1Ch]@3
  CClientQuest *v5; // [sp+18h] [bp-10h]@1
  int v6; // [sp+24h] [bp-4h]@1

  v2 = this;
  v5 = this;
  CQuest::CQuest((CQuest *)&this->vfptr, pQuestData);
  v2->vfptr = (CQuestVtbl *)&CClientQuest::`vftable';
  v6 = 0;
  v2->m_listRewardOfDoneQuest._Mysize = 0;
  v3 = (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)operator new(0x18u);
  if ( !v3 )
  {
    pQuestData = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&pQuestData);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v2->m_listRewardOfDoneQuest._Myhead = v3;
  v3->_Left = v3;
  v2->m_listRewardOfDoneQuest._Myhead->_Parent = v2->m_listRewardOfDoneQuest._Myhead;
  v2->m_listRewardOfDoneQuest._Myhead->_Right = v2->m_listRewardOfDoneQuest._Myhead;
  v2->m_listRewardOfDoneQuest._Myhead->_Color = 1;
  v2->m_listRewardOfDoneQuest._Myhead->_Isnil = 1;
  v2->m_pkFrameWork = 0;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9BEE74: using guessed type void (__thiscall *CClientQuest::`vftable')(CClientQuest *this, unsigned __int16);

//----- (006B42A0) --------------------------------------------------------
void __thiscall DialogParser::DialogParser(DialogParser *this)
{
  this->m_pcCurrentStr = 0;
}

//----- (006B42B0) --------------------------------------------------------
void __thiscall QuestDialogParser::StartParsing(QuestDialogParser *this, CQuest *pkQuest, unsigned int wID)
{
  QuestDialogParser *v3; // esi@1
  CQuestData *v4; // ecx@2
  const char *v5; // eax@3

  v3 = this;
  if ( pkQuest )
  {
    v4 = pkQuest->m_pQuestData;
    if ( v4 )
    {
      v5 = CQuestData::GetDialog(v4, wID);
      if ( v5 )
      {
        if ( *v5 )
          v3->m_pcCurrentStr = (char *)v5;
      }
    }
  }
}

//----- (006B42E0) --------------------------------------------------------
char *__stdcall DialogParser::ParseBracedToken(char **rpcStr)
{
  char *v2; // edi@1
  char *v3; // eax@2
  signed int v4; // ebx@3
  char v5; // al@6
  char *result; // eax@9

  acToken[0] = 0;
  v2 = acToken;
  if ( **rpcStr == 91 && (v3 = *rpcStr + 1, *rpcStr = v3, *v3) )
  {
    v4 = 0;
    while ( 1 )
    {
      if ( v4 > 127 )
      {
        *v2 = 0;
        return v2;
      }
      if ( **rpcStr == 93 )
        break;
      v5 = **rpcStr;
      *v2 = v5;
      ++*rpcStr;
      ++v2;
      ++v4;
      if ( IsDBCSLeadByte(v5) )
      {
        *v2++ = **rpcStr;
        ++v4;
        ++*rpcStr;
      }
      if ( !**rpcStr )
        goto LABEL_9;
    }
    ++*rpcStr;
    *v2 = 0;
    result = acToken;
  }
  else
  {
LABEL_9:
    result = 0;
  }
  return result;
}

//----- (006B4370) --------------------------------------------------------
signed int __thiscall DialogParser::Parse(DialogParser *this, DialogParser::TokenDetail *rkDetail)
{
  DialogParser *v2; // esi@1
  char *v3; // ecx@1
  signed int result; // eax@2
  char v5; // al@3
  char *v6; // eax@7
  char *v7; // eax@13
  char *v8; // eax@14
  char *v9; // eax@15
  char *v10; // eax@18
  char *v11; // eax@23
  char *v12; // eax@24
  char *v13; // eax@25
  char *v14; // eax@28
  char *v15; // eax@35
  char *v16; // eax@42
  char *v17; // eax@49
  char *v18; // eax@54
  char *v19; // eax@57
  NiUnsharedGeometryGroup *v20; // eax@62
  char *v21; // eax@64
  char *v22; // eax@71
  char *v23; // eax@76
  char *v24; // eax@79
  char *v25; // eax@84
  char *v26; // eax@87
  char *v27; // edi@96
  BYTE v28; // al@97
  int v29; // ecx@104

  v2 = this;
  v3 = this->m_pcCurrentStr;
  if ( !v3 )
    return 11;
  v5 = *v3;
  if ( !*v3 )
    return 11;
  if ( v5 == 10 )
  {
    v2->m_pcCurrentStr = v3 + 1;
    return 2;
  }
  if ( v5 != 91 )
  {
    if ( v5 == 93 )
    {
      v2->m_pcCurrentStr = v3 + 1;
      return 14;
    }
    v27 = v3;
    while ( 1 )
    {
      v28 = *v2->m_pcCurrentStr;
      if ( v28 == 10 || v28 == 91 )
      {
LABEL_104:
        v29 = v2->m_pcCurrentStr - v27;
        rkDetail->kNormal.pcNormalStr = v27;
        rkDetail->kNormal.iLength = v29;
        return 0;
      }
      if ( v28 == 93 )
        break;
      if ( IsDBCSLeadByte(v28) )
        v2->m_pcCurrentStr += 2;
      else
        ++v2->m_pcCurrentStr;
      if ( !*v2->m_pcCurrentStr )
        goto LABEL_104;
    }
    ++v2->m_pcCurrentStr;
    return 14;
  }
  v6 = DialogParser::ParseBracedToken(&v2->m_pcCurrentStr);
  if ( !v6 )
    return 14;
  if ( !strcmp(v6, "NAME") )
    return 1;
  if ( !strcmp(v6, "BUTTON") )
  {
    PgUtil::WhileSpace(&v2->m_pcCurrentStr);
    if ( *v2->m_pcCurrentStr )
    {
      do
      {
        if ( *v2->m_pcCurrentStr == 61 )
          break;
        v7 = v2->m_pcCurrentStr + 1;
        v2->m_pcCurrentStr = v7;
      }
      while ( *v7 );
    }
    ++v2->m_pcCurrentStr;
    PgUtil::WhileSpace(&v2->m_pcCurrentStr);
    v8 = DialogParser::ParseBracedToken(&v2->m_pcCurrentStr);
    if ( v8 )
    {
      rkDetail->kNormal.pcNormalStr = fs("%s", v8);
      PgUtil::WhileSpace(&v2->m_pcCurrentStr);
      v9 = DialogParser::ParseBracedToken(&v2->m_pcCurrentStr);
      if ( v9 )
      {
        rkDetail->kNormal.iLength = atoi(v9);
        if ( *v2->m_pcCurrentStr )
        {
          do
          {
            if ( *v2->m_pcCurrentStr == 10 )
              break;
            v10 = v2->m_pcCurrentStr + 1;
            v2->m_pcCurrentStr = v10;
          }
          while ( *v10 );
        }
LABEL_65:
        if ( *v2->m_pcCurrentStr == 10 )
          ++v2->m_pcCurrentStr;
        return 7;
      }
    }
    return 14;
  }
  if ( !strcmp(v6, "BUTTON_NPC") )
  {
    PgUtil::WhileSpace(&v2->m_pcCurrentStr);
    if ( *v2->m_pcCurrentStr )
    {
      do
      {
        if ( *v2->m_pcCurrentStr == 61 )
          break;
        v11 = v2->m_pcCurrentStr + 1;
        v2->m_pcCurrentStr = v11;
      }
      while ( *v11 );
    }
    ++v2->m_pcCurrentStr;
    PgUtil::WhileSpace(&v2->m_pcCurrentStr);
    v12 = DialogParser::ParseBracedToken(&v2->m_pcCurrentStr);
    if ( !v12 )
      return 14;
    rkDetail->kNormal.pcNormalStr = fs("%s", v12);
    PgUtil::WhileSpace(&v2->m_pcCurrentStr);
    v13 = DialogParser::ParseBracedToken(&v2->m_pcCurrentStr);
    if ( !v13 )
      return 14;
    rkDetail->kNormal.iLength = (int)fs("%s", v13);
    if ( *v2->m_pcCurrentStr )
    {
      do
      {
        if ( *v2->m_pcCurrentStr == 10 )
          break;
        v14 = v2->m_pcCurrentStr + 1;
        v2->m_pcCurrentStr = v14;
      }
      while ( *v14 );
    }
    if ( *v2->m_pcCurrentStr == 10 )
      ++v2->m_pcCurrentStr;
    result = 8;
  }
  else if ( !strcmp(v6, "LINE") )
  {
    if ( *v2->m_pcCurrentStr )
    {
      do
      {
        if ( *v2->m_pcCurrentStr == 10 )
          break;
        v15 = v2->m_pcCurrentStr + 1;
        v2->m_pcCurrentStr = v15;
      }
      while ( *v15 );
    }
    if ( *v2->m_pcCurrentStr == 10 )
      ++v2->m_pcCurrentStr;
    result = 4;
  }
  else if ( !strcmp(v6, "SHOW_REWARD") )
  {
    if ( *v2->m_pcCurrentStr )
    {
      do
      {
        if ( *v2->m_pcCurrentStr == 10 )
          break;
        v16 = v2->m_pcCurrentStr + 1;
        v2->m_pcCurrentStr = v16;
      }
      while ( *v16 );
    }
    if ( *v2->m_pcCurrentStr == 10 )
      ++v2->m_pcCurrentStr;
    result = 3;
  }
  else if ( !strcmp(v6, "EVENT") )
  {
    if ( *v2->m_pcCurrentStr )
    {
      do
      {
        if ( *v2->m_pcCurrentStr == 10 )
          break;
        v17 = v2->m_pcCurrentStr + 1;
        v2->m_pcCurrentStr = v17;
      }
      while ( *v17 );
    }
    if ( *v2->m_pcCurrentStr == 10 )
      ++v2->m_pcCurrentStr;
    result = 6;
  }
  else if ( !strcmp(v6, "SCENARIO") )
  {
    PgUtil::WhileSpace(&v2->m_pcCurrentStr);
    v18 = DialogParser::ParseBracedToken(&v2->m_pcCurrentStr);
    if ( !v18 )
      return 14;
    rkDetail->kNormal.pcNormalStr = (char *)atoi(v18);
    if ( *v2->m_pcCurrentStr )
    {
      do
      {
        if ( *v2->m_pcCurrentStr == 10 )
          break;
        v19 = v2->m_pcCurrentStr + 1;
        v2->m_pcCurrentStr = v19;
      }
      while ( *v19 );
    }
    if ( *v2->m_pcCurrentStr == 10 )
      ++v2->m_pcCurrentStr;
    result = 9;
  }
  else
  {
    if ( !strcmp(v6, "NEXT") )
    {
      v20 = TextData::Get(0x96ADFCF0);
      rkDetail->kNormal.pcNormalStr = fs("%s", v20);
      rkDetail->kNormal.iLength = 1;
      if ( *v2->m_pcCurrentStr )
      {
        do
        {
          if ( *v2->m_pcCurrentStr == 10 )
            break;
          v21 = v2->m_pcCurrentStr + 1;
          v2->m_pcCurrentStr = v21;
        }
        while ( *v21 );
      }
      goto LABEL_65;
    }
    if ( !strcmp(v6, "MENU") )
    {
      if ( *v2->m_pcCurrentStr )
      {
        do
        {
          if ( *v2->m_pcCurrentStr == 10 )
            break;
          v22 = v2->m_pcCurrentStr + 1;
          v2->m_pcCurrentStr = v22;
        }
        while ( *v22 );
      }
      if ( *v2->m_pcCurrentStr == 10 )
        ++v2->m_pcCurrentStr;
      result = 12;
    }
    else if ( !strcmp(v6, "EMOTION") )
    {
      PgUtil::WhileSpace(&v2->m_pcCurrentStr);
      v23 = DialogParser::ParseBracedToken(&v2->m_pcCurrentStr);
      if ( !v23 )
        return 14;
      rkDetail->kNormal.pcNormalStr = (char *)atoi(v23);
      if ( *v2->m_pcCurrentStr )
      {
        do
        {
          if ( *v2->m_pcCurrentStr == 10 )
            break;
          v24 = v2->m_pcCurrentStr + 1;
          v2->m_pcCurrentStr = v24;
        }
        while ( *v24 );
      }
      if ( *v2->m_pcCurrentStr == 10 )
        ++v2->m_pcCurrentStr;
      result = 13;
    }
    else
    {
      if ( strcmp(v6, "DELAY") )
      {
        if ( !strcmp(v6, (const char *)&off_9BEF6C) )
          result = 16;
        else
          result = 14;
        return result;
      }
      PgUtil::WhileSpace(&v2->m_pcCurrentStr);
      v25 = DialogParser::ParseBracedToken(&v2->m_pcCurrentStr);
      if ( !v25 )
        return 14;
      rkDetail->kNormal.pcNormalStr = (char *)atoi(v25);
      if ( *v2->m_pcCurrentStr )
      {
        do
        {
          if ( *v2->m_pcCurrentStr == 10 )
            break;
          v26 = v2->m_pcCurrentStr + 1;
          v2->m_pcCurrentStr = v26;
        }
        while ( *v26 );
      }
      if ( *v2->m_pcCurrentStr == 10 )
        ++v2->m_pcCurrentStr;
      result = 15;
    }
  }
  return result;
}
// 9BEF6C: using guessed type void *off_9BEF6C;

//----- (006B49F0) --------------------------------------------------------
void __thiscall DialogParser::StartParsing(DialogParser *this, char *pcText, unsigned int uiSeqID)
{
  DialogParser *v3; // esi@1
  int v4; // edi@4
  signed int i; // eax@4
  DialogParser::TokenDetail kDetail; // [sp+4h] [bp-8h]@4

  v3 = this;
  if ( pcText )
  {
    if ( *pcText )
    {
      this->m_pcCurrentStr = pcText;
      if ( uiSeqID )
      {
        v4 = 0;
        for ( i = DialogParser::Parse(this, &kDetail); i != 11; i = DialogParser::Parse(v3, &kDetail) )
        {
          if ( i == 16 )
            ++v4;
          if ( v4 == uiSeqID )
            break;
        }
      }
    }
  }
}

//----- (006B4A50) --------------------------------------------------------
int __stdcall QuestHelperMgr::GetConditionCnt(QUEST_DATA *lpQuest)
{
  int result; // eax@1

  result = 0;
  if ( lpQuest->End.NPCMobList[1].bNPCMob )
    result = 1;
  if ( lpQuest->End.NPCMobList[2].bNPCMob )
    ++result;
  if ( lpQuest->End.NPCMobList[3].bNPCMob )
    ++result;
  if ( lpQuest->End.NPCMobList[4].bNPCMob )
    ++result;
  if ( lpQuest->End.ItemList[0].bItem )
    ++result;
  if ( lpQuest->End.ItemList[1].bItem )
    ++result;
  if ( lpQuest->End.ItemList[2].bItem )
    ++result;
  if ( lpQuest->End.ItemList[3].bItem )
    ++result;
  if ( lpQuest->End.ItemList[4].bItem )
    ++result;
  if ( lpQuest->End.bLevel )
    ++result;
  if ( lpQuest->End.bLocation )
    ++result;
  return result;
}

//----- (006B4AC0) --------------------------------------------------------
bool __stdcall QuestHelperMgr::IsQuestByMob(QUEST_DATA *lpQuest, unsigned __int16 Mob_ID)
{
  bool result; // al@2
  int v4; // edx@3
  int v5; // eax@3
  char *v6; // ecx@4
  signed int v7; // ecx@8
  char *v8; // eax@8

  if ( lpQuest )
  {
    v4 = lpQuest->NumOfAction;
    v5 = 0;
    if ( v4 > 0 )
    {
      v6 = (char *)&lpQuest->Action[0].IfTarget;
      while ( *(v6 - 4) )
      {
        if ( *(_DWORD *)v6 == Mob_ID )
          return 1;
        ++v5;
        v6 += 32;
        if ( v5 >= v4 )
          break;
      }
    }
    v7 = 0;
    v8 = (char *)&lpQuest->End.NPCMobList[0].NPCMobID;
    do
    {
      if ( !*(v8 - 2) )
        break;
      if ( *(_WORD *)v8 == Mob_ID )
        return 1;
      ++v7;
      v8 += 8;
    }
    while ( v7 < 5 );
    result = 0;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006B4B40) --------------------------------------------------------
BOOL __stdcall QuestHelperMgr::IsStartRewardQuest(QUEST_DATA *lpQuest)
{
  return !lpQuest->End.NPCMobList[1].bNPCMob
      && !lpQuest->End.ItemList[0].bItem
      && lpQuest->Start.NPCID != lpQuest->End.NPCMobList[0].NPCMobID;
}

//----- (006B4B70) --------------------------------------------------------
QUEST_DATA *__thiscall QuestHelperMgr::GetPQData(QuestHelperMgr *this, unsigned __int16 Quest_ID)
{
  NiTListItem<QUEST_DATA *> *v2; // ecx@1
  QUEST_DATA *result; // eax@2

  v2 = this->m_lpProgressQuestList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      result = v2->m_element;
      v2 = v2->m_pkNext;
      if ( result )
      {
        if ( result->ID == Quest_ID )
          break;
      }
      if ( !v2 )
        goto LABEL_5;
    }
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (006B4BA0) --------------------------------------------------------
void __thiscall QuestHelperMgr::Terminate(QuestHelperMgr *this)
{
  if ( this->m_lpProgressQuestList.m_kAllocator.m_uiCount )
    NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *>::RemoveAll((NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *> *)this);
  if ( QuestHelperMgr::ms_pQuestMCList.m_kAllocator.m_uiCount )
    NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *>::RemoveAll(&QuestHelperMgr::ms_pQuestMCList);
}

//----- (006B4BC0) --------------------------------------------------------
char __thiscall QuestHelperMgr::IsQuestProgress(QuestHelperMgr *this, unsigned __int16 Quest_ID)
{
  NiTListItem<QUEST_DATA *> *v2; // eax@1
  QUEST_DATA *v3; // ecx@2
  char result; // al@5

  v2 = this->m_lpProgressQuestList.m_pkHead;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = v2->m_element;
      v2 = v2->m_pkNext;
      if ( v3 )
      {
        if ( v3->ID == Quest_ID )
          break;
      }
      if ( !v2 )
        goto LABEL_5;
    }
    result = 1;
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (006B4C00) --------------------------------------------------------
bool __stdcall QuestHelperMgr::IsConditionProgress(QUEST_DATA *lpQuest, unsigned __int16 Mob_ID)
{
  CClientQuest *v3; // eax@1
  QUEST_DATA *v4; // esi@1
  bool result; // al@6
  signed int v6; // edi@7
  char *v7; // ebx@7
  signed int v8; // esi@10
  PLAYER_QUEST_INFO *v9; // eax@10
  signed int v10; // edi@15
  int v11; // edx@16
  signed int v12; // esi@19
  unsigned __int16 *v13; // eax@19
  CQuest *pQuest; // [sp+4h] [bp-4h]@1
  CQuest *pQuesta; // [sp+4h] [bp-4h]@15

  v3 = QuestDataMgr::GetQuest();
  v4 = lpQuest;
  pQuest = (CQuest *)v3;
  if ( (lpQuest->End.NPCMobList[1].bNPCMob
     || lpQuest->End.ItemList[0].bItem
     || lpQuest->Start.NPCID == lpQuest->End.NPCMobList[0].NPCMobID)
    && !lpQuest->End.bLevel )
  {
    if ( CQuest::GetNewQuestStatus((CQuest *)&v3->vfptr, lpQuest->ID) == (QUEST_DATA *)6 )
    {
      v6 = 0;
      v7 = (char *)&lpQuest->End.NPCMobList[0].NPCMobID;
      do
      {
        if ( !*(v7 - 2) )
          break;
        if ( *(_WORD *)v7 == Mob_ID )
        {
          v8 = 0;
          v9 = CQuest::GetQuestInfo(pQuest, lpQuest->ID);
          if ( v9 )
            v8 = v9->Data.End_NPCMobCount[v6];
          if ( v8 < (unsigned __int8)v7[3] )
            return 1;
          v4 = lpQuest;
        }
        ++v6;
        v7 += 8;
      }
      while ( v6 < 5 );
      v10 = 0;
      pQuesta = (CQuest *)v4->NumOfAction;
      if ( (signed int)pQuesta > 0 )
      {
        v11 = (int)v4->Action;
        do
        {
          if ( !*(_BYTE *)v11 )
            break;
          if ( *(_DWORD *)(v11 + 4) == Mob_ID )
          {
            v12 = 0;
            v13 = &lpQuest->End.ItemList[0].ItemID;
            while ( *((_BYTE *)v13 - 2) )
            {
              if ( *(_DWORD *)(v11 + 12) == *v13 )
                return Inventory::GetItemCnt(&g_kInventory, *v13) < lpQuest->End.ItemList[v12].ItemLot;
              ++v12;
              v13 += 3;
              if ( v12 >= 5 )
                break;
            }
          }
          ++v10;
          v11 += 32;
        }
        while ( v10 < (signed int)pQuesta );
      }
      result = 0;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (006B4D30) --------------------------------------------------------
void __stdcall QuestHelperMgr::AddMobCoordinate(QUEST_DATA *lpQuest, unsigned __int16 Mob_ID)
{
  unsigned int v3; // esi@1
  int v4; // eax@4
  QUEST_DATA **v5; // eax@8
  NSFParsedShader *v6; // esi@8
  NiTListItem<NSFParsedShader *> *v7; // eax@8
  unsigned int v8; // ebx@11
  char *v9; // eax@12
  char *v10; // edi@12
  QUEST_DATA **v11; // eax@14
  NSFParsedShader *v12; // esi@14
  NiTListItem<NSFParsedShader *> *v13; // eax@14
  int v14; // [sp+8h] [bp-4h]@5

  v3 = 0;
  if ( ITableBase<MobCoordinate,MobCoordinateTab>::GetTotal() )
  {
    do
    {
      if ( *((_WORD *)CDataReader::GetRecord(
                        (CDataReader *)(ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable + 4),
                        v3)
           + 1) == Mob_ID )
        break;
      ++v3;
    }
    while ( v3 < ITableBase<MobCoordinate,MobCoordinateTab>::GetTotal() );
  }
  v4 = *(_DWORD *)(ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable + 56);
  if ( v4 )
    v14 = *(_DWORD *)(v4 + 40);
  else
    v14 = 0;
  if ( v3 == v14 )
  {
    v5 = (QUEST_DATA **)operator new(8u);
    v6 = (NSFParsedShader *)v5;
    *v5 = lpQuest;
    v5[1] = 0;
    v7 = QuestHelperMgr::ms_pQuestMCList.vfptr->NewItem(&QuestHelperMgr::ms_pQuestMCList);
    v7->m_element = v6;
    v7->m_pkNext = 0;
    v7->m_pkPrev = QuestHelperMgr::ms_pQuestMCList.m_pkTail;
    if ( QuestHelperMgr::ms_pQuestMCList.m_pkTail )
    {
      QuestHelperMgr::ms_pQuestMCList.m_pkTail->m_pkNext = v7;
      ++QuestHelperMgr::ms_pQuestMCList.m_kAllocator.m_uiCount;
      QuestHelperMgr::ms_pQuestMCList.m_pkTail = v7;
    }
    else
    {
      ++QuestHelperMgr::ms_pQuestMCList.m_kAllocator.m_uiCount;
      QuestHelperMgr::ms_pQuestMCList.m_pkHead = v7;
      QuestHelperMgr::ms_pQuestMCList.m_pkTail = v7;
    }
  }
  else
  {
    v8 = v3;
    do
    {
      v9 = CDataReader::GetRecord((CDataReader *)(ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable + 4), v8);
      v10 = v9;
      if ( !v9 || *((_WORD *)v9 + 1) != Mob_ID )
        break;
      v11 = (QUEST_DATA **)operator new(8u);
      v12 = (NSFParsedShader *)v11;
      *v11 = lpQuest;
      v11[1] = (QUEST_DATA *)v10;
      v13 = QuestHelperMgr::ms_pQuestMCList.vfptr->NewItem(&QuestHelperMgr::ms_pQuestMCList);
      v13->m_element = v12;
      v13->m_pkNext = 0;
      v13->m_pkPrev = QuestHelperMgr::ms_pQuestMCList.m_pkTail;
      if ( QuestHelperMgr::ms_pQuestMCList.m_pkTail )
        QuestHelperMgr::ms_pQuestMCList.m_pkTail->m_pkNext = v13;
      else
        QuestHelperMgr::ms_pQuestMCList.m_pkHead = v13;
      ++QuestHelperMgr::ms_pQuestMCList.m_kAllocator.m_uiCount;
      ++v8;
      QuestHelperMgr::ms_pQuestMCList.m_pkTail = v13;
    }
    while ( v8 != v14 );
  }
}
// A8C27C: using guessed type int ITableBase<MobCoordinate,MobCoordinateTab>::ms_pkTable;

//----- (006B4E80) --------------------------------------------------------
void __stdcall QuestHelperMgr::RemoveMobCoordinate(unsigned __int16 Quest_ID)
{
  NiTListItem<NSFParsedShader *> *v2; // edx@1
  NiTListItem<NSFParsedShader *> *v3; // esi@1
  NSBShader *v4; // ecx@4
  NiTListItem<NSFParsedShader *> *v5; // eax@4
  NiTListItem<NSFParsedShader *> *v6; // eax@6
  NiTListItem<NSFParsedShader *> *v7; // ecx@9
  NiTListItem<NSFParsedShader *> *v8; // eax@10
  NiTListItem<NSFParsedShader *> **v9; // ecx@13
  NiTListItem<NSFParsedShader *> *v10; // edx@13

  v2 = QuestHelperMgr::ms_pQuestMCList.m_pkHead;
  v3 = QuestHelperMgr::ms_pQuestMCList.m_pkHead;
  if ( QuestHelperMgr::ms_pQuestMCList.m_pkHead )
  {
    while ( 1 )
    {
      v4 = v3->m_element->m_spNSBShader.m_pObject;
      v5 = v3;
      v3 = v3->m_pkNext;
      if ( LOWORD(v4->m_uiRefCount) == Quest_ID )
      {
        if ( v5 == v2 )
        {
          v6 = v2->m_pkNext;
          QuestHelperMgr::ms_pQuestMCList.m_pkHead = v6;
          if ( v6 )
          {
            v6->m_pkPrev = 0;
            QuestHelperMgr::ms_pQuestMCList.vfptr->DeleteItem(&QuestHelperMgr::ms_pQuestMCList, v2);
          }
          else
          {
            QuestHelperMgr::ms_pQuestMCList.m_pkTail = 0;
            QuestHelperMgr::ms_pQuestMCList.vfptr->DeleteItem(&QuestHelperMgr::ms_pQuestMCList, v2);
          }
        }
        else
        {
          v7 = QuestHelperMgr::ms_pQuestMCList.m_pkTail;
          if ( v5 == QuestHelperMgr::ms_pQuestMCList.m_pkTail )
          {
            v8 = QuestHelperMgr::ms_pQuestMCList.m_pkTail->m_pkPrev;
            QuestHelperMgr::ms_pQuestMCList.m_pkTail = v8;
            if ( v8 )
            {
              v8->m_pkNext = 0;
              QuestHelperMgr::ms_pQuestMCList.vfptr->DeleteItem(&QuestHelperMgr::ms_pQuestMCList, v7);
            }
            else
            {
              QuestHelperMgr::ms_pQuestMCList.m_pkHead = 0;
              QuestHelperMgr::ms_pQuestMCList.vfptr->DeleteItem(&QuestHelperMgr::ms_pQuestMCList, v7);
            }
          }
          else
          {
            v9 = &v5->m_pkPrev->m_pkNext;
            v10 = v5->m_pkNext;
            if ( v9 )
              *v9 = v10;
            if ( v10 )
              v10->m_pkPrev = (NiTListItem<NSFParsedShader *> *)v9;
            QuestHelperMgr::ms_pQuestMCList.vfptr->DeleteItem(&QuestHelperMgr::ms_pQuestMCList, v5);
          }
        }
        --QuestHelperMgr::ms_pQuestMCList.m_kAllocator.m_uiCount;
      }
      if ( !v3 )
        break;
      v2 = QuestHelperMgr::ms_pQuestMCList.m_pkHead;
    }
  }
}

//----- (006B4F40) --------------------------------------------------------
void __thiscall QuestHelperMgr::RemoveMobGroup(QuestHelperMgr *this, unsigned __int16 Quest_ID)
{
  QuestHelperMgr *v2; // esi@1
  NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> *v3; // edi@1
  unsigned __int16 *v4; // ecx@4
  NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> *v5; // eax@4
  NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> **v6; // ecx@5
  int v7; // esi@5
  NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> *v8; // eax@6
  void (__thiscall *v9)(int, NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> **); // edx@8
  NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> *v10; // ecx@9
  NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> **v11; // eax@10
  void (__thiscall *v12)(int, NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> *); // edx@12
  NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> **v13; // ecx@13
  NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> *v14; // edx@13
  QuestHelperMgr *v15; // [sp+Ch] [bp-4h]@1

  v2 = this;
  v3 = this->m_pPQMobGroupList.m_pkHead;
  v15 = this;
  if ( v3 )
  {
    while ( 1 )
    {
      v4 = &v3->m_element->Quest_ID;
      v5 = v3;
      v3 = v3->m_pkNext;
      if ( *v4 == Quest_ID )
      {
        v6 = &v2->m_pPQMobGroupList.m_pkHead->m_pkNext;
        v7 = (int)&v2->m_pPQMobGroupList;
        if ( (NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> **)v5 == v6 )
        {
          v8 = *v6;
          *(_DWORD *)(v7 + 4) = *v6;
          if ( v8 )
          {
            v8->m_pkPrev = 0;
            (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v7 + 8))(v7, v6);
          }
          else
          {
            v9 = *(void (__thiscall **)(int, NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> **))(*(_DWORD *)v7 + 8);
            *(_DWORD *)(v7 + 8) = 0;
            v9(v7, v6);
          }
        }
        else
        {
          v10 = *(NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> **)(v7 + 8);
          if ( v5 == v10 )
          {
            v11 = &v10->m_pkPrev->m_pkNext;
            *(_DWORD *)(v7 + 8) = v11;
            if ( v11 )
            {
              *v11 = 0;
              (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v7 + 8))(v7, v10);
            }
            else
            {
              v12 = *(void (__thiscall **)(int, NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> *))(*(_DWORD *)v7 + 8);
              *(_DWORD *)(v7 + 4) = 0;
              v12(v7, v10);
            }
          }
          else
          {
            v13 = &v5->m_pkPrev->m_pkNext;
            v14 = v5->m_pkNext;
            if ( v13 )
              *v13 = v14;
            if ( v14 )
              v14->m_pkPrev = (NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> *)v13;
            (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v7 + 8))(v7, v5);
          }
        }
        --*(_DWORD *)(v7 + 12);
      }
      if ( !v3 )
        break;
      v2 = v15;
    }
  }
}

//----- (006B5010) --------------------------------------------------------
char *__thiscall QuestHelperMgr::GetConditionText(QuestHelperMgr *this)
{
  char *result; // eax@1

  result = this->m_kConditionText._Bx._Buf;
  if ( this->m_kConditionText._Myres >= 0x10 )
    result = *(char **)result;
  return result;
}

//----- (006B5020) --------------------------------------------------------
void __userpurge QuestHelperMgr::MoveConditionToolTip(QuestHelperMgr *this@<ecx>, int a2@<edi>, int a3@<esi>, NiPoint3 kMobHeightPos)
{
  QuestHelperMgr *v4; // esi@1
  _BYTE v5[12]; // ST0C_12@1
  float fScreenHeight; // ST08_4@1
  float fScreenWidth; // ST04_4@1
  char **v8; // eax@2
  PgWin *v9; // esi@4
  PgWin *v10; // esi@4
  int v11; // [sp+1Ch] [bp-14h]@1
  NiPoint3 k2DOrthoPos; // [sp+20h] [bp-10h]@1
  unsigned int v13; // [sp+2Ch] [bp-4h]@4

  v11 = a3;
  k2DOrthoPos.z = kMobHeightPos.z + 3.0;
  v4 = this;
  *(float *)v5 = kMobHeightPos.x;
  *(_QWORD *)&v5[4] = __PAIR__(LODWORD(k2DOrthoPos.z), LODWORD(kMobHeightPos.y));
  fScreenHeight = (double)PgWin::ms_uiScreenHeight;
  fScreenWidth = (double)PgWin::ms_uiScreenWidth;
  if ( PgUtil::Get2DOrthoPosFrom3DPos(pkWorldCamera, fScreenWidth, fScreenHeight, *(NiPoint3 *)v5, &k2DOrthoPos) )
  {
    v8 = &v4->m_kConditionText._Bx._Ptr;
    if ( v4->m_kConditionText._Myres >= 0x10 )
      v8 = (char **)*v8;
    ((void (__stdcall *)(char **, int, int))g_pkToolTipWin->vfptr[107].__vecDelDtor)(v8, a2, v11);
    v9 = g_pkToolTipWin;
    v13 = (unsigned int)(((int (*)(void))g_pkToolTipWin->vfptr[36].__vecDelDtor)()
                       - 2 * LODWORD(v9[1].m_kLocal.m_Rotate.m_pEntry[1][1])) >> 1;
    v10 = g_pkToolTipWin;
    k2DOrthoPos.x = k2DOrthoPos.x - ((double)v13 + 5.0);
    v13 = ((int (*)(void))g_pkToolTipWin->vfptr[37].__vecDelDtor)()
        - 2 * LODWORD(v10[1].m_kLocal.m_Rotate.m_pEntry[1][0]);
    k2DOrthoPos.y = k2DOrthoPos.y - ((double)v13 + 38.0);
    ((void (__thiscall *)(PgWin *))g_pkToolTipWin->vfptr[77].__vecDelDtor)(g_pkToolTipWin);
  }
}
// 6B5020: could not find valid save-restore pair for edi
// 6B5020: could not find valid save-restore pair for esi

//----- (006B5160) --------------------------------------------------------
void __thiscall QuestHelperMgr::~QuestHelperMgr(QuestHelperMgr *this)
{
  QuestHelperMgr *v1; // esi@1
  char *v2; // ebx@1
  NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> *v3; // edi@1
  NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> *v4; // ST00_4@2
  NiTListItem<QUEST_DATA *> **v5; // edi@5
  NiTListItem<QUEST_DATA *> *v6; // ST00_4@6

  v1 = this;
  v2 = (char *)&this->m_pPQMobGroupList;
  this->m_pPQMobGroupList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>Vtbl *)&PgTList<QuestHelperMgr::ProgressQuestMobGroup *>::`vftable';
  v3 = this->m_pPQMobGroupList.m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v2 + 8))(v2, v4);
  }
  *((_DWORD *)v2 + 3) = 0;
  *((_DWORD *)v2 + 1) = 0;
  *((_DWORD *)v2 + 2) = 0;
  *(_DWORD *)v2 = &NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>::`vftable';
  if ( v1->m_kConditionText._Myres >= 0x10 )
    operator delete(v1->m_kConditionText._Bx._Ptr);
  v1->m_kConditionText._Myres = 15;
  v1->m_kConditionText._Mysize = 0;
  v1->m_kConditionText._Bx._Buf[0] = 0;
  v1->m_lpProgressQuestList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>Vtbl *)&PgTList<QUEST_DATA *>::`vftable';
  v5 = &v1->m_lpProgressQuestList.m_pkHead->m_pkNext;
  while ( v5 )
  {
    v6 = (NiTListItem<QUEST_DATA *> *)v5;
    v5 = (NiTListItem<QUEST_DATA *> **)*v5;
    v1->m_lpProgressQuestList.vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *> *)v1, v6);
  }
  v1->m_lpProgressQuestList.m_kAllocator.m_uiCount = 0;
  v1->m_lpProgressQuestList.m_pkHead = 0;
  v1->m_lpProgressQuestList.m_pkTail = 0;
  v1->m_lpProgressQuestList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>::`vftable';
}
// 9BF034: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>::`vftable')(void *p, char);
// 9BF054: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>::`vftable')(void *p, char);
// 9BF0A4: using guessed type int (__thiscall *PgTList<QUEST_DATA *>::`vftable')(void *p, char);
// 9BF0CC: using guessed type int (__thiscall *PgTList<QuestHelperMgr::ProgressQuestMobGroup *>::`vftable')(void *p, char);

//----- (006B5240) --------------------------------------------------------
void __thiscall QuestHelperMgr::RemoveProgressQuest(QuestHelperMgr *this, unsigned __int16 Quest_ID)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *v2; // edi@1
  NiTListItem<NiD3DShaderInterface *> *v3; // eax@1
  unsigned __int16 v4; // si@2
  NiD3DShaderInterface *v5; // ecx@3

  v2 = (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)this;
  QuestDataMgr::GetQuest();
  v3 = v2->m_pkHead;
  if ( v3 )
  {
    v4 = Quest_ID;
    while ( 1 )
    {
      v5 = v3->m_element;
      *(_DWORD *)&Quest_ID = v3;
      v3 = v3->m_pkNext;
      if ( LOWORD(v5->m_uiRefCount) == v4 )
        break;
      if ( !v3 )
        return;
    }
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(v2, (void **)&Quest_ID);
    QuestHelperMgr::RemoveMobCoordinate(v4);
    QuestHelperMgr::RemoveMobGroup((QuestHelperMgr *)v2, v4);
  }
}

//----- (006B52A0) --------------------------------------------------------
void __thiscall QuestHelperMgr::ClearConditionText(QuestHelperMgr *this)
{
  bool v1; // cf@1

  v1 = this->m_kConditionText._Myres < 0x10;
  this->m_kConditionText._Mysize = 0;
  if ( v1 )
    this->m_kConditionText._Bx._Buf[0] = 0;
  else
    *this->m_kConditionText._Bx._Ptr = 0;
}

//----- (006B52C0) --------------------------------------------------------
void __thiscall QuestHelperMgr::QuestHelperMgr(QuestHelperMgr *this)
{
  this->m_lpProgressQuestList.m_kAllocator.m_uiCount = 0;
  this->m_lpProgressQuestList.m_pkHead = 0;
  this->m_lpProgressQuestList.m_pkTail = 0;
  this->m_lpProgressQuestList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>Vtbl *)&PgTList<QUEST_DATA *>::`vftable';
  this->m_kConditionText._Myres = 15;
  this->m_kConditionText._Mysize = 0;
  this->m_kConditionText._Bx._Buf[0] = 0;
  this->m_pPQMobGroupList.m_kAllocator.m_uiCount = 0;
  this->m_pPQMobGroupList.m_pkHead = 0;
  this->m_pPQMobGroupList.m_pkTail = 0;
  this->m_pPQMobGroupList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>Vtbl *)&PgTList<QuestHelperMgr::ProgressQuestMobGroup *>::`vftable';
}
// 9BF0A4: using guessed type int (__thiscall *PgTList<QUEST_DATA *>::`vftable')(void *p, char);
// 9BF0CC: using guessed type int (__thiscall *PgTList<QuestHelperMgr::ProgressQuestMobGroup *>::`vftable')(void *p, char);

//----- (006B5300) --------------------------------------------------------
void __thiscall QuestHelperMgr::AddMobID(QuestHelperMgr *this, QUEST_DATA *lpQuest)
{
  NiTListItem<unsigned short> *v2; // esi@1
  signed int v3; // ebx@1
  QUEST_DATA *v4; // edx@2
  unsigned __int16 v5; // di@6
  NiTListItem<unsigned short> *v6; // eax@6
  unsigned __int16 *v7; // ecx@7
  NiTListItem<unsigned short> *v8; // edx@7
  NiTListItem<unsigned short> *v9; // eax@11
  QUEST_DATA *v10; // edi@16
  bool v11; // zf@16
  char *v12; // ebx@17
  unsigned __int16 v13; // di@19
  NiTListItem<unsigned short> *v14; // eax@19
  unsigned __int16 *v15; // ecx@20
  NiTListItem<unsigned short> *v16; // edx@20
  NiTListItem<unsigned short> *v17; // eax@24
  int v18; // edx@29
  unsigned __int16 v19; // ax@31
  NiTListItem<unsigned short> *v20; // esi@32
  NiTListItem<unsigned short> *v21; // ST04_4@33
  PgTList<unsigned short> kList; // [sp+10h] [bp-24h]@1
  QuestHelperMgr *v23; // [sp+20h] [bp-14h]@1
  int i; // [sp+24h] [bp-10h]@16
  int v25; // [sp+30h] [bp-4h]@1

  v23 = this;
  v2 = 0;
  kList.m_kAllocator.m_uiCount = 0;
  kList.m_pkHead = 0;
  kList.m_pkTail = 0;
  kList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>Vtbl *)&PgTList<unsigned short>::`vftable';
  v25 = 0;
  v3 = 0;
  do
  {
    v4 = lpQuest;
    if ( (v3 || lpQuest->End.bLevel || (unsigned __int8)QuestHelperMgr::IsStartRewardQuest(lpQuest))
      && v4->End.NPCMobList[v3].bNPCMob )
    {
      v5 = v4->End.NPCMobList[v3].NPCMobID;
      v6 = v2;
      if ( !v2 )
        goto LABEL_11;
      while ( 1 )
      {
        v7 = &v6->m_element;
        v8 = v6;
        v6 = v6->m_pkNext;
        if ( v5 == *v7 )
          break;
        if ( !v6 )
          goto LABEL_11;
      }
      if ( !v8 )
      {
LABEL_11:
        v9 = kList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short> *)&kList);
        v9->m_element = v5;
        v9->m_pkNext = 0;
        v9->m_pkPrev = kList.m_pkTail;
        if ( kList.m_pkTail )
        {
          kList.m_pkTail->m_pkNext = v9;
          v2 = kList.m_pkHead;
        }
        else
        {
          v2 = v9;
          kList.m_pkHead = v9;
        }
        ++kList.m_kAllocator.m_uiCount;
        kList.m_pkTail = v9;
      }
    }
    ++v3;
  }
  while ( v3 < 5 );
  v10 = lpQuest;
  v11 = lpQuest->NumOfAction == 0;
  i = 0;
  if ( !v11 )
  {
    v12 = (char *)&lpQuest->Action[0].IfTarget;
    do
    {
      if ( *(v12 - 4) )
      {
        v13 = *(_WORD *)v12;
        v14 = v2;
        if ( !v2 )
          goto LABEL_24;
        while ( 1 )
        {
          v15 = &v14->m_element;
          v16 = v14;
          v14 = v14->m_pkNext;
          if ( v13 == *v15 )
            break;
          if ( !v14 )
            goto LABEL_24;
        }
        if ( !v16 )
        {
LABEL_24:
          v17 = kList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short> *)&kList);
          v17->m_element = v13;
          v17->m_pkNext = 0;
          v17->m_pkPrev = kList.m_pkTail;
          if ( kList.m_pkTail )
          {
            kList.m_pkTail->m_pkNext = v17;
            v2 = kList.m_pkHead;
          }
          else
          {
            v2 = v17;
            kList.m_pkHead = v17;
          }
          ++kList.m_kAllocator.m_uiCount;
          kList.m_pkTail = v17;
        }
        v10 = lpQuest;
      }
      v18 = v10->NumOfAction;
      v12 += 32;
      ++i;
    }
    while ( i < v18 );
  }
  if ( v2 )
  {
    do
    {
      v19 = v2->m_element;
      v2 = v2->m_pkNext;
      QuestHelperMgr::AddMobCoordinate(v10, v19);
    }
    while ( v2 );
    v20 = kList.m_pkHead;
    if ( kList.m_pkHead )
    {
      do
      {
        v21 = v20;
        v20 = v20->m_pkNext;
        kList.vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short> *)&kList, v21);
      }
      while ( v20 );
    }
  }
}
// 9BF0B4: using guessed type int (__thiscall *PgTList<unsigned short>::`vftable')(void *p, char);

//----- (006B54B0) --------------------------------------------------------
QuestHelperMgr *__cdecl QuestHelperMgr::GetInstance()
{
  QuestHelperMgr *result; // eax@1

  result = QuestHelperMgr::m_pkInstance;
  if ( !QuestHelperMgr::m_pkInstance )
  {
    result = (QuestHelperMgr *)operator new(0x40u);
    if ( result )
    {
      result->m_lpProgressQuestList.m_kAllocator.m_uiCount = 0;
      result->m_lpProgressQuestList.m_pkHead = 0;
      result->m_lpProgressQuestList.m_pkTail = 0;
      result->m_lpProgressQuestList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>Vtbl *)&PgTList<QUEST_DATA *>::`vftable';
      result->m_kConditionText._Mysize = 0;
      result->m_kConditionText._Myres = 15;
      result->m_kConditionText._Bx._Buf[0] = 0;
      result->m_pPQMobGroupList.m_kAllocator.m_uiCount = 0;
      result->m_pPQMobGroupList.m_pkHead = 0;
      result->m_pPQMobGroupList.m_pkTail = 0;
      result->m_pPQMobGroupList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>Vtbl *)&PgTList<QuestHelperMgr::ProgressQuestMobGroup *>::`vftable';
      QuestHelperMgr::m_pkInstance = result;
    }
    else
    {
      result = 0;
      QuestHelperMgr::m_pkInstance = 0;
    }
  }
  return result;
}
// 9BF0A4: using guessed type int (__thiscall *PgTList<QUEST_DATA *>::`vftable')(void *p, char);
// 9BF0CC: using guessed type int (__thiscall *PgTList<QuestHelperMgr::ProgressQuestMobGroup *>::`vftable')(void *p, char);

//----- (006B5510) --------------------------------------------------------
void __cdecl QuestHelperMgr::ReleaseInstance()
{
  QuestHelperMgr *v0; // esi@2

  if ( QuestHelperMgr::m_pkInstance )
  {
    v0 = QuestHelperMgr::m_pkInstance;
    QuestHelperMgr::~QuestHelperMgr(QuestHelperMgr::m_pkInstance);
    operator delete(v0);
    QuestHelperMgr::m_pkInstance = 0;
  }
}

//----- (006B5540) --------------------------------------------------------
void __thiscall QuestHelperMgr::AddMobGroup(QuestHelperMgr *this, QUEST_DATA *lpQuest)
{
  _DWORD *v2; // edi@1
  char *v3; // ebx@1
  MobViewInfo *v4; // esi@4
  _DWORD *v5; // eax@5
  const char *v6; // ecx@7
  char *v7; // eax@7
  int v8; // esi@7
  char v9; // dl@8
  int v10; // eax@9
  _DWORD *v11; // ecx@9
  char *v12; // esi@15
  __int16 v13; // bx@18
  unsigned int v14; // edi@19
  char *v15; // esi@20
  _DWORD *v16; // eax@23
  _DWORD *v17; // edi@24
  const char *v18; // ecx@26
  char *v19; // eax@26
  int v20; // esi@26
  char v21; // dl@27
  int v22; // eax@28
  _DWORD *v23; // ecx@28
  signed int v24; // [sp+Ch] [bp-Ch]@14
  QuestHelperMgr *v25; // [sp+10h] [bp-8h]@1
  int i; // [sp+14h] [bp-4h]@1
  char *ia; // [sp+14h] [bp-4h]@15

  v2 = 0;
  v25 = this;
  i = 0;
  v3 = (char *)&lpQuest->End.NPCMobList[0].NPCMobID;
  do
  {
    if ( !*(v3 - 2) )
      break;
    if ( v3[4] == 2 )
    {
      v4 = MobViewInfoTab::GetByID(*(_WORD *)v3);
      if ( v4 )
      {
        v5 = operator new(0x20u);
        if ( v5 )
        {
          v5[5] = 0;
          v5[6] = 15;
          *((_BYTE *)v5 + 4) = 0;
          v2 = v5;
        }
        *(_WORD *)v2 = lpQuest->ID;
        v6 = v4->Group2;
        *((_WORD *)v2 + 1) = *(_WORD *)v3;
        v7 = v4->Group2;
        v8 = (int)&v4->Group2[1];
        do
          v9 = *v7++;
        while ( v9 );
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)(v2 + 1),
          v6,
          (unsigned int)&v7[-v8]);
        v10 = (int)v25->m_pPQMobGroupList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *> *)&v25->m_pPQMobGroupList);
        *(_DWORD *)(v10 + 8) = v2;
        *(_DWORD *)v10 = 0;
        *(_DWORD *)(v10 + 4) = v25->m_pPQMobGroupList.m_pkTail;
        v11 = &v25->m_pPQMobGroupList.m_pkTail->m_pkNext;
        if ( v11 )
          *v11 = v10;
        else
          v25->m_pPQMobGroupList.m_pkHead = (NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> *)v10;
        ++v25->m_pPQMobGroupList.m_kAllocator.m_uiCount;
        v25->m_pPQMobGroupList.m_pkTail = (NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> *)v10;
        v2 = 0;
      }
    }
    v3 += 8;
    ++i;
  }
  while ( i < 5 );
  v24 = 0;
  if ( lpQuest->NumOfAction )
  {
    v12 = (char *)&lpQuest->Action[0].IfTarget;
    ia = (char *)&lpQuest->Action[0].IfTarget;
    do
    {
      if ( !*(v12 - 4) )
        break;
      if ( v12[24] == 2 )
      {
        v13 = *(_WORD *)v12;
        if ( *(_WORD *)v12 != -1 )
        {
          v14 = 0;
          if ( ITableBase<MobViewInfo,MobViewInfoTab>::GetTotal() )
          {
            while ( 1 )
            {
              v15 = CDataReader::GetRecord((CDataReader *)(ITableBase<MobViewInfo,MobViewInfoTab>::ms_pkTable + 4), v14);
              if ( *(_WORD *)v15 == v13 )
                break;
              if ( ++v14 >= ITableBase<MobViewInfo,MobViewInfoTab>::GetTotal() )
                goto LABEL_32;
            }
            v16 = operator new(0x20u);
            if ( v16 )
            {
              v16[6] = 15;
              v16[5] = 0;
              *((_BYTE *)v16 + 4) = 0;
              v17 = v16;
            }
            else
            {
              v17 = 0;
            }
            *(_WORD *)v17 = lpQuest->ID;
            v18 = v15 + 213;
            *((_WORD *)v17 + 1) = *(_WORD *)ia;
            v19 = v15 + 213;
            v20 = (int)(v15 + 214);
            do
              v21 = *v19++;
            while ( v21 );
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
              (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)(v17 + 1),
              v18,
              (unsigned int)&v19[-v20]);
            v22 = (int)v25->m_pPQMobGroupList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *> *)&v25->m_pPQMobGroupList);
            *(_DWORD *)(v22 + 8) = v17;
            *(_DWORD *)v22 = 0;
            *(_DWORD *)(v22 + 4) = v25->m_pPQMobGroupList.m_pkTail;
            v23 = &v25->m_pPQMobGroupList.m_pkTail->m_pkNext;
            if ( v23 )
              *v23 = v22;
            else
              v25->m_pPQMobGroupList.m_pkHead = (NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> *)v22;
            ++v25->m_pPQMobGroupList.m_kAllocator.m_uiCount;
            v25->m_pPQMobGroupList.m_pkTail = (NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> *)v22;
LABEL_32:
            v12 = ia;
          }
        }
      }
      v12 += 32;
      ++v24;
      ia = v12;
    }
    while ( v24 < lpQuest->NumOfAction );
  }
}
// A8C29C: using guessed type int ITableBase<MobViewInfo,MobViewInfoTab>::ms_pkTable;

//----- (006B5750) --------------------------------------------------------
void __thiscall QuestHelperMgr::AddQuestNameText(QuestHelperMgr *this, QUEST_DATA *lpQuest, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *kText)
{
  CClientQuest *v3; // eax@1
  const char *v4; // eax@1
  const char *v5; // eax@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v6; // esi@1
  const char *v7; // ecx@2

  v6 = &this->m_kConditionText;
  v3 = QuestDataMgr::GetQuest();
  v4 = CQuestData::GetQuestName(v3->m_pQuestData, lpQuest->ID);
  v5 = fs("{color,yellow,%s}", v4);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(v6, v5, strlen(v5));
  if ( v6->_Myres < 0x10 )
    v7 = (const char *)v6;
  else
    v7 = v6->_Bx._Ptr;
  if ( std::basic_string<char,std::char_traits<char>,std::allocator<char>>::find(kText, v7, 0, v6->_Mysize) == -1 )
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(kText, v6, 0, 0xFFFFFFFF);
}

//----- (006B57D0) --------------------------------------------------------
char __thiscall QuestHelperMgr::IsMobGroup(QuestHelperMgr *this, QUEST_DATA *lpQuest, unsigned __int16 *Mob_ID)
{
  QuestHelperMgr *v3; // edi@1
  unsigned __int16 v4; // ST08_2@1
  MobViewInfo *v5; // eax@1
  NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> *v6; // edi@4
  QuestHelperMgr::ProgressQuestMobGroup *v7; // ebx@5
  const char *v8; // edx@7
  const char *v9; // eax@7
  unsigned int v10; // esi@9
  unsigned int v11; // ecx@9
  bool v13; // cf@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > GroupName; // [sp+14h] [bp-2Ch]@1
  int v15; // [sp+3Ch] [bp-4h]@1

  v3 = this;
  GroupName._Myres = 15;
  GroupName._Mysize = 0;
  GroupName._Bx._Buf[0] = 0;
  v4 = *Mob_ID;
  v15 = 0;
  v5 = MobViewInfoTab::GetByID(v4);
  if ( !v5 )
  {
    if ( GroupName._Myres >= 0x10 )
      operator delete(GroupName._Bx._Ptr);
    return 0;
  }
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &GroupName,
    v5->Group2,
    strlen(v5->Group2));
  v6 = v3->m_pPQMobGroupList.m_pkHead;
  if ( !v6 )
  {
LABEL_17:
    if ( GroupName._Myres >= 0x10 )
      operator delete(GroupName._Bx._Ptr);
    return 0;
  }
  while ( 1 )
  {
    v7 = v6->m_element;
    v6 = v6->m_pkNext;
    if ( v7 )
    {
      if ( v7->Quest_ID == lpQuest->ID )
      {
        v8 = GroupName._Bx._Ptr;
        v9 = v7->GroupName._Bx._Buf;
        if ( GroupName._Myres < 0x10 )
          v8 = (const char *)&GroupName;
        v10 = v7->GroupName._Mysize;
        v11 = GroupName._Mysize;
        if ( v10 < GroupName._Mysize )
          v11 = v7->GroupName._Mysize;
        if ( v7->GroupName._Myres >= 0x10 )
          v9 = *(const char **)v9;
        if ( !std::char_traits<char>::compare(v9, v8, v11) && v10 >= GroupName._Mysize && v10 == GroupName._Mysize )
          break;
      }
    }
    if ( !v6 )
      goto LABEL_17;
  }
  v13 = GroupName._Myres < 0x10;
  *Mob_ID = v7->Mob_ID;
  if ( !v13 )
    operator delete(GroupName._Bx._Ptr);
  return 1;
}

//----- (006B5920) --------------------------------------------------------
void __thiscall QuestHelperMgr::Init(QuestHelperMgr *this)
{
  QuestHelperMgr *v1; // esi@1
  CClientQuest *v2; // eax@1
  CQuestData *v3; // edi@1
  unsigned int v4; // ebx@1
  QUEST_DATA *v5; // edi@4
  int v6; // eax@5
  _DWORD *v7; // ecx@5
  NiTListItem<QUEST_DATA *> *v8; // edi@10
  QUEST_DATA *v9; // ebx@11
  CQuest *pQuest; // [sp+Ch] [bp-8h]@1
  CQuestData *pQData; // [sp+10h] [bp-4h]@1

  v1 = this;
  v2 = QuestDataMgr::GetQuest();
  v3 = v2->m_pQuestData;
  pQuest = (CQuest *)v2;
  pQData = v2->m_pQuestData;
  v4 = 0;
  if ( CQuestData::GetNumOfQuestData(v3) > 0u )
  {
    while ( 1 )
    {
      v5 = CQuestData::GetQuestDataByIndex(v3, v4);
      if ( CQuest::IsDoingQuest(pQuest, v5->ID) )
      {
        v6 = (int)v1->m_lpProgressQuestList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *> *)v1);
        *(_DWORD *)(v6 + 8) = v5;
        *(_DWORD *)v6 = 0;
        *(_DWORD *)(v6 + 4) = v1->m_lpProgressQuestList.m_pkTail;
        v7 = &v1->m_lpProgressQuestList.m_pkTail->m_pkNext;
        if ( v7 )
          *v7 = v6;
        else
          v1->m_lpProgressQuestList.m_pkHead = (NiTListItem<QUEST_DATA *> *)v6;
        ++v1->m_lpProgressQuestList.m_kAllocator.m_uiCount;
        v1->m_lpProgressQuestList.m_pkTail = (NiTListItem<QUEST_DATA *> *)v6;
      }
      if ( (signed int)++v4 >= CQuestData::GetNumOfQuestData(pQData) )
        break;
      v3 = pQData;
    }
  }
  v8 = v1->m_lpProgressQuestList.m_pkHead;
  while ( v8 )
  {
    v9 = v8->m_element;
    v8 = v8->m_pkNext;
    QuestHelperMgr::AddMobID(v1, v9);
    QuestHelperMgr::AddMobGroup(v1, v9);
  }
}

//----- (006B59E0) --------------------------------------------------------
void __thiscall QuestHelperMgr::AddProgressQuest(QuestHelperMgr *this, unsigned __int16 Quest_ID)
{
  QuestHelperMgr *v2; // esi@1
  CClientQuest *v3; // eax@1
  CQuestData *v4; // edi@1
  unsigned int v5; // ebx@1
  QUEST_DATA *v6; // edi@4
  int v7; // eax@7
  _DWORD *v8; // ecx@7
  CQuestData *pQData; // [sp+Ch] [bp-4h]@1

  v2 = this;
  v3 = QuestDataMgr::GetQuest();
  v4 = v3->m_pQuestData;
  pQData = v3->m_pQuestData;
  v5 = 0;
  if ( CQuestData::GetNumOfQuestData(v3->m_pQuestData) > 0u )
  {
    while ( 1 )
    {
      v6 = CQuestData::GetQuestDataByIndex(v4, v5);
      if ( v6->ID == Quest_ID )
        break;
      if ( (signed int)++v5 >= CQuestData::GetNumOfQuestData(pQData) )
        return;
      v4 = pQData;
    }
    v7 = (int)v2->m_lpProgressQuestList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *> *)v2);
    *(_DWORD *)(v7 + 8) = v6;
    *(_DWORD *)v7 = 0;
    *(_DWORD *)(v7 + 4) = v2->m_lpProgressQuestList.m_pkTail;
    v8 = &v2->m_lpProgressQuestList.m_pkTail->m_pkNext;
    if ( v8 )
      *v8 = v7;
    else
      v2->m_lpProgressQuestList.m_pkHead = (NiTListItem<QUEST_DATA *> *)v7;
    ++v2->m_lpProgressQuestList.m_kAllocator.m_uiCount;
    v2->m_lpProgressQuestList.m_pkTail = (NiTListItem<QUEST_DATA *> *)v7;
    QuestHelperMgr::AddMobID(v2, v6);
    QuestHelperMgr::AddMobGroup(v2, v6);
  }
}

//----- (006B5A80) --------------------------------------------------------
void __thiscall QuestHelperMgr::AddMobConditionText(QuestHelperMgr *this, QUEST_DATA *lpQuest, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *kText, unsigned __int16 Mob_ID, bool bCheckMob)
{
  CClientQuest *v5; // eax@1
  char *v6; // ebx@1
  int v7; // esi@6
  int v8; // edi@6
  int v9; // eax@7
  int v10; // edx@10
  int v11; // ST10_4@13
  char *v12; // eax@13
  char *v13; // eax@13
  const char *v14; // eax@13
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v15; // eax@13
  int v16; // esi@15
  int v17; // edi@15
  int v18; // eax@16
  int v19; // edx@19
  int v20; // ST10_4@22
  char *v21; // eax@22
  char *v22; // eax@22
  const char *v23; // eax@22
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v24; // eax@22
  int v25; // esi@24
  int v26; // edi@24
  int v27; // eax@25
  int v28; // edx@28
  signed int v29; // esi@31
  const char *v30; // eax@36
  MobViewInfo *v31; // eax@37
  char v32; // cl@38
  const char *v33; // eax@39
  const char *v34; // eax@41
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v35; // eax@47
  PLAYER_QUEST_INFO *pPlayerQuestInfo; // [sp+10h] [bp-74h]@1
  int i; // [sp+18h] [bp-6Ch]@1
  QuestHelperMgr *v38; // [sp+1Ch] [bp-68h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v39; // [sp+20h] [bp-64h]@22
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+3Ch] [bp-48h]@13
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v41; // [sp+58h] [bp-2Ch]@47
  int v42; // [sp+80h] [bp-4h]@13

  v38 = this;
  v5 = QuestDataMgr::GetQuest();
  pPlayerQuestInfo = CQuest::GetQuestInfo((CQuest *)&v5->vfptr, lpQuest->ID);
  i = 0;
  v6 = (char *)&lpQuest->End.NPCMobList[0].NPCMobID;
  while ( *(v6 - 2) )
  {
    switch ( v6[2] )
    {
      case 1:
        v25 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
        v26 = *(_WORD *)v6;
        if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable
                                                              + 16))(
                                ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                                v26) )
        {
          if ( (unsigned __int16)v26 <= *(_WORD *)(v25 + 200) )
          {
            v28 = *(_DWORD *)(v25 + 196);
            if ( *(_DWORD *)(v28 + 4 * v26) )
              v27 = *(_DWORD *)(v28 + 4 * v26);
            else
              v27 = 0;
          }
          else
          {
            v27 = 0;
          }
        }
        else
        {
          v27 = 0;
        }
        v29 = 1;
        if ( bCheckMob != 1 || *(_WORD *)v6 == Mob_ID )
        {
          if ( pPlayerQuestInfo )
            v29 = pPlayerQuestInfo->Data.End_NPCMobCount[i];
          if ( !v6[4] )
          {
            v30 = fs("- %d/%d %s", v29, (unsigned __int8)v6[3], v27 + 34);
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
              &v38->m_kConditionText,
              v30,
              strlen(v30));
            goto LABEL_47;
          }
          v31 = MobViewInfoTab::GetByID(*(_WORD *)v6);
          if ( v31 )
          {
            v32 = v6[4];
            if ( v32 == 1 )
            {
              v33 = fs("- %d/%d %s", v29, (unsigned __int8)v6[3], v31->Group1);
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                &v38->m_kConditionText,
                v33,
                strlen(v33));
              goto LABEL_47;
            }
            if ( v32 == 2 )
            {
              v34 = fs("- %d/%d %s", v29, (unsigned __int8)v6[3], v31->Group2);
              goto LABEL_46;
            }
            if ( v32 == 3 )
            {
              v34 = fs("- %d/%d %s", v29, (unsigned __int8)v6[3], v31->Group3);
              goto LABEL_46;
            }
            if ( v32 == 4 )
            {
              v34 = fs("- %d/%d %s", v29, (unsigned __int8)v6[3], v31->GroupS);
LABEL_46:
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator=(
                &v38->m_kConditionText,
                v34);
            }
          }
LABEL_47:
          v35 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&v41, "\n", &v38->m_kConditionText);
          v42 = 0;
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(kText, v35, 0, 0xFFFFFFFF);
          v42 = -1;
          if ( v41._Myres >= 0x10 )
            operator delete(v41._Bx._Ptr);
          break;
        }
        break;
      case 2:
        v16 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
        v17 = *(_WORD *)v6;
        if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable
                                                              + 16))(
                                ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                                v17) )
        {
          if ( (unsigned __int16)v17 <= *(_WORD *)(v16 + 200) )
          {
            v19 = *(_DWORD *)(v16 + 196);
            if ( *(_DWORD *)(v19 + 4 * v17) )
              v18 = *(_DWORD *)(v19 + 4 * v17);
            else
              v18 = 0;
          }
          else
          {
            v18 = 0;
          }
        }
        else
        {
          v18 = 0;
        }
        v20 = v18 + 34;
        v21 = (char *)TextData::Get(0x3C497E96u);
        v22 = fs(v21, &unk_9BEF82, v20);
        v23 = fs("- %s", v22);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &v38->m_kConditionText,
          v23,
          strlen(v23));
        v24 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&v39, "\n", &v38->m_kConditionText);
        v42 = 1;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(kText, v24, 0, 0xFFFFFFFF);
        v42 = -1;
        if ( v39._Myres >= 0x10 )
          operator delete(v39._Bx._Ptr);
        break;
      case 3:
        v7 = ITableBase<MobInfo,MobInfoTab>::ms_pkTable;
        v8 = *(_WORD *)v6;
        if ( (unsigned __int8)(*(int (__thiscall **)(_DWORD, int))(*(_DWORD *)ITableBase<MobInfo,MobInfoTab>::ms_pkTable
                                                                 + 16))(
                                ITableBase<MobInfo,MobInfoTab>::ms_pkTable,
                                v8) )
        {
          if ( (unsigned __int16)v8 <= *(_WORD *)(v7 + 200) )
          {
            v10 = *(_DWORD *)(v7 + 196);
            if ( *(_DWORD *)(v10 + 4 * v8) )
              v9 = *(_DWORD *)(v10 + 4 * v8);
            else
              v9 = 0;
          }
          else
          {
            v9 = 0;
          }
        }
        else
        {
          v9 = 0;
        }
        v11 = v9 + 34;
        v12 = (char *)TextData::Get(0x8DECE4E2);
        v13 = fs(v12, &unk_9BEF83, v11);
        v14 = fs("- %s", v13);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &v38->m_kConditionText,
          v14,
          strlen(v14));
        v15 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&result, "\n", &v38->m_kConditionText);
        v42 = 2;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(kText, v15, 0, 0xFFFFFFFF);
        v42 = -1;
        if ( result._Myres >= 0x10 )
          operator delete(result._Bx._Ptr);
        break;
    }
    v6 += 8;
    if ( ++i >= 5 )
      return;
  }
}
// A8C26C: using guessed type int ITableBase<MobInfo,MobInfoTab>::ms_pkTable;

//----- (006B5E50) --------------------------------------------------------
void __thiscall QuestHelperMgr::AddItemConditionText(QuestHelperMgr *this, QUEST_DATA *lpQuest, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *kText, unsigned __int16 Item_ID, bool bCheckItem)
{
  char *v5; // ebx@1
  int v6; // esi@5
  int v7; // edi@5
  int v8; // esi@6
  int v9; // edx@9
  int v10; // eax@12
  const char *v11; // eax@12
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v12; // eax@12
  QuestHelperMgr *v13; // [sp+14h] [bp-34h]@1
  int i; // [sp+18h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+1Ch] [bp-2Ch]@12
  int v16; // [sp+44h] [bp-4h]@12

  v13 = this;
  i = 0;
  v5 = (char *)&lpQuest->End.ItemList[0].ItemID;
  do
  {
    if ( !*(v5 - 2) )
      break;
    if ( bCheckItem != 1 || *(_WORD *)v5 == Item_ID )
    {
      v6 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      v7 = *(_WORD *)v5;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v7) )
      {
        if ( (unsigned __int16)v7 <= *(_WORD *)(v6 + 200) )
        {
          v9 = *(_DWORD *)(v6 + 196);
          if ( *(_DWORD *)(v9 + 4 * v7) )
            v8 = *(_DWORD *)(v9 + 4 * v7);
          else
            v8 = 0;
        }
        else
        {
          v8 = 0;
        }
      }
      else
      {
        v8 = 0;
      }
      v10 = Inventory::GetItemCnt(&g_kInventory, *(_WORD *)v5);
      v11 = fs("- %d/%d %s", v10, *((_WORD *)v5 + 1), v8 + 34);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v13->m_kConditionText,
        v11,
        strlen(v11));
      v12 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&result, "\n", &v13->m_kConditionText);
      v16 = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(kText, v12, 0, 0xFFFFFFFF);
      v16 = -1;
      if ( result._Myres >= 0x10 )
        operator delete(result._Bx._Ptr);
      result._Myres = 15;
      result._Mysize = 0;
      result._Bx._Buf[0] = 0;
    }
    v5 += 6;
    ++i;
  }
  while ( i < 5 );
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (006B5FC0) --------------------------------------------------------
void __thiscall QuestHelperMgr::AddLevelConditionText(QuestHelperMgr *this, QUEST_DATA *lpQuest, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *kText)
{
  QuestHelperMgr *v3; // edi@1
  const char *v4; // eax@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v5; // eax@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+10h] [bp-2Ch]@2
  int v7; // [sp+38h] [bp-4h]@2

  v3 = this;
  if ( lpQuest->End.bLevel )
  {
    v4 = fs("- Level : %d", lpQuest->End.Level);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v3->m_kConditionText, v4, strlen(v4));
    v5 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&result, "\n", &v3->m_kConditionText);
    v7 = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(kText, v5, 0, 0xFFFFFFFF);
    if ( result._Myres >= 0x10 )
      operator delete(result._Bx._Ptr);
  }
}

//----- (006B6080) --------------------------------------------------------
void __thiscall QuestHelperMgr::AddLocationConditionText(QuestHelperMgr *this, QUEST_DATA *lpQuest, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *kText)
{
  QuestHelperMgr *v3; // edi@1
  char *v4; // eax@2
  char *v5; // eax@2
  const char *v6; // eax@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v7; // eax@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+10h] [bp-2Ch]@2
  int v9; // [sp+38h] [bp-4h]@2

  v3 = this;
  if ( lpQuest->End.bLocation )
  {
    v4 = (char *)TextData::Get(0x39323D31u);
    v5 = fs(v4, &unk_9BEF8F);
    v6 = fs("- %s", v5);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v3->m_kConditionText, v6, strlen(v6));
    v7 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&result, "\n", &v3->m_kConditionText);
    v9 = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(kText, v7, 0, 0xFFFFFFFF);
    if ( result._Myres >= 0x10 )
      operator delete(result._Bx._Ptr);
  }
}

//----- (006B6160) --------------------------------------------------------
char __thiscall QuestHelperMgr::CreateConditionToolTip(QuestHelperMgr *this, unsigned __int16 Mob_ID, QUEST_DATA *lpQuest, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *kText)
{
  QuestHelperMgr *v4; // ebx@1
  signed int v5; // ebx@4
  char *v6; // edi@5
  signed int v7; // ebx@10
  char *v8; // edi@10
  char result; // al@15
  QuestHelperMgr *v10; // [sp+8h] [bp-4h]@1

  v4 = this;
  v10 = this;
  if ( QuestHelperMgr::IsConditionProgress(lpQuest, Mob_ID) )
  {
    if ( kText->_Mysize )
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(kText, "\n", 1u);
    QuestHelperMgr::AddQuestNameText(v4, lpQuest, kText);
    v5 = 0;
    if ( lpQuest->NumOfAction )
    {
      v6 = (char *)&lpQuest->Action[0].IfTarget;
      do
      {
        if ( !*(v6 - 4) )
          break;
        if ( *(_DWORD *)v6 == Mob_ID )
          QuestHelperMgr::AddItemConditionText(v10, lpQuest, kText, *((_WORD *)v6 + 4), 1);
        ++v5;
        v6 += 32;
      }
      while ( v5 < lpQuest->NumOfAction );
    }
    v7 = 0;
    v8 = (char *)&lpQuest->End.NPCMobList[0].NPCMobID;
    do
    {
      if ( !*(v8 - 2) )
        break;
      if ( *(_WORD *)v8 == Mob_ID )
        QuestHelperMgr::AddMobConditionText(v10, lpQuest, kText, Mob_ID, 1);
      ++v7;
      v8 += 8;
    }
    while ( v7 < 5 );
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006B6230) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall QuestHelperMgr::AddConditionText(QuestHelperMgr *this, QUEST_DATA *lpQuest, unsigned __int16 Mob_ID)
{
  QuestHelperMgr *v3; // esi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v4; // esi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kText; // [sp+Ch] [bp-2Ch]@1
  int v7; // [sp+34h] [bp-4h]@1

  v3 = this;
  kText._Myres = 15;
  kText._Mysize = 0;
  kText._Bx._Buf[0] = 0;
  v7 = 0;
  QuestHelperMgr::AddQuestNameText(this, lpQuest, &kText);
  QuestHelperMgr::AddLevelConditionText(v3, lpQuest, &kText);
  QuestHelperMgr::AddMobConditionText(v3, lpQuest, &kText, Mob_ID, 1);
  QuestHelperMgr::AddItemConditionText(v3, lpQuest, &kText, 0xFFFFu, 0);
  QuestHelperMgr::AddLocationConditionText(v3, lpQuest, &kText);
  v4 = &v3->m_kConditionText;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(v4, &kText, 0, 0xFFFFFFFF);
  if ( v4->_Myres >= 0x10 )
    v4 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v4->_Bx._Ptr;
  if ( kText._Myres >= 0x10 )
    operator delete(kText._Bx._Ptr);
  return v4;
}

//----- (006B6310) --------------------------------------------------------
void __thiscall QuestHelperMgr::AddConditionToolTip(QuestHelperMgr *this, Char *pkChar)
{
  QuestHelperMgr *v2; // ebx@1
  unsigned __int16 v3; // si@2
  bool v4; // cf@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v5; // ecx@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v6; // eax@4
  NiTListItem<NSFParsedShader *> *v7; // edi@7
  QUEST_DATA **v8; // eax@8
  QUEST_DATA *v9; // esi@9
  bool v10; // zf@18
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v11; // [sp+10h] [bp-40h]@3
  unsigned __int16 Handle; // [sp+14h] [bp-3Ch]@2
  signed __int16 OldMobID; // [sp+18h] [bp-38h]@7
  signed __int16 OldQuestID; // [sp+1Ch] [bp-34h]@7
  unsigned int Mob_ID; // [sp+20h] [bp-30h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > kText; // [sp+24h] [bp-2Ch]@7
  int v17; // [sp+4Ch] [bp-4h]@7

  v2 = this;
  if ( pkChar )
  {
    v3 = pkChar->m_kHandle;
    Mob_ID = pkChar->m_kCharShape.m_kMobID;
    Handle = v3;
    if ( this->m_OldHandleNum != v3 )
    {
      ToolTipWin::ClearTipText((ToolTipWin *)g_pkToolTipWin);
      v4 = v2->m_kConditionText._Myres < 0x10;
      v5 = &v2->m_kConditionText;
      v11 = v5;
      v5->_Mysize = 0;
      v6 = v4 ? &v2->m_kConditionText : v5->_Bx._Ptr;
      v6->_Bx._Buf[0] = 0;
      if ( QuestHelperMgr::ms_pQuestMCList.m_kAllocator.m_uiCount )
      {
        OldMobID = -1;
        OldQuestID = -1;
        kText._Myres = 15;
        kText._Mysize = 0;
        kText._Bx._Buf[0] = 0;
        v17 = 0;
        v7 = QuestHelperMgr::ms_pQuestMCList.m_pkHead;
        if ( QuestHelperMgr::ms_pQuestMCList.m_pkHead )
        {
          do
          {
            v8 = (QUEST_DATA **)v7->m_element;
            v7 = v7->m_pkNext;
            if ( v8 )
            {
              v9 = *v8;
              if ( *v8 )
              {
                if ( ((_WORD)Mob_ID != OldMobID || v9->ID != OldQuestID)
                  && !v9->End.bLevel
                  && QuestHelperMgr::IsQuestByMob(v9, Mob_ID) )
                {
                  QuestHelperMgr::IsMobGroup(v2, v9, (unsigned __int16 *)&Mob_ID);
                  if ( QuestHelperMgr::CreateConditionToolTip(v2, Mob_ID, v9, &kText) )
                  {
                    OldMobID = Mob_ID;
                    OldQuestID = v9->ID;
                  }
                }
              }
            }
          }
          while ( v7 );
          v5 = v11;
          v3 = Handle;
        }
        v10 = kText._Mysize == 0;
        v2->m_OldHandleNum = v3;
        if ( !v10 )
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(v5, &kText, 0, 0xFFFFFFFF);
        if ( kText._Myres >= 0x10 )
          operator delete(kText._Bx._Ptr);
      }
    }
  }
}

//----- (006B6480) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *>::~NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *>(NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *>::`vftable';
}
// 9BF014: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *>::`vftable')(void *p, char);

//----- (006B6490) --------------------------------------------------------
void __thisv2[1446].dummy++) = vointerAllocator<unsigned int>,QUEST_DATA *>::~NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>(NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>::`vftable';
}
// 9BF034: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>::`vftable')(void *p, char);

//----- (006B64A0) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>::~NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>(NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>::`vftable';
}
// 9BF054: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>::`vftable')(void *p, char);

//----- (006B64B0) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>::~NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>(NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>::`vftable';
}
// 9BF064: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>::`vftable')(void *p, char);

//----- (006B64C0) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BF014: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *>::`vftable')(void *p, char);

//----- (006B64F0) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BF034: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>::`vftable')(void *p, char);

//----- (006B6520) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BF054: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>::`vftable')(void *p, char);

//----- (006B6550) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>::`vector deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BF064: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>::`vftable')(void *p, char);

//----- (006B6580) --------------------------------------------------------
void __thiscall NiTPointerList<QuestMC *>::~NiTPointerList<QuestMC *>(NiTPointerList<QuestMC *> *this)
{
  NiTPointerList<QuestMC *> *v1; // edi@1
  NiTListItem<QuestMC *> *v2; // esi@1
  NiTListItem<QuestMC *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestMC *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *>::`vftable';
}
// 9BF014: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *>::`vftable')(void *p, char);
// 9BF024: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestMC *>::`vftable')(void *p, char);

//----- (006B6600) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestMC *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestMC *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestMC *> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestMC *> *v2; // edi@1
  NiTListItem<QuestMC *> *v3; // esi@1
  NiTListItem<QuestMC *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestMC *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BF014: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *>::`vftable')(void *p, char);
// 9BF024: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestMC *>::`vftable')(void *p, char);

//----- (006B6690) --------------------------------------------------------
void __thiscall NiTPointerList<QUEST_DATA *>::~NiTPointerList<QUEST_DATA *>(NiTPointerList<QUEST_DATA *> *this)
{
  NiTPointerList<QUEST_DATA *> *v1; // edi@1
  NiTListItem<QUEST_DATA *> *v2; // esi@1
  NiTListItem<QUEST_DATA *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>::`vftable';
}
// 9BF034: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>::`vftable')(void *p, char);
// 9BF044: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>::`vftable')(void *p, char);

//----- (006B6710) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *> *v2; // edi@1
  NiTListItem<QUEST_DATA *> *v3; // esi@1
  NiTListItem<QUEST_DATA *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BF034: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>::`vftable')(void *p, char);
// 9BF044: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>::`vftable')(void *p, char);

//----- (006B67A0) --------------------------------------------------------
void __thiscall NiTPointerList<unsigned short>::~NiTPointerList<unsigned short>(NiTPointerList<unsigned short> *this)
{
  NiTPointerList<unsigned short> *v1; // edi@1
  NiTListItem<unsigned short> *v2; // esi@1
  NiTListItem<unsigned short> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,unsigned short>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>::`vftable';
}
// 9BF064: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>::`vftable')(void *p, char);
// 9BF074: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,unsigned short>::`vftable')(void *p, char);

//----- (006B6820) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,unsigned short> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,unsigned short>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,unsigned short> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,unsigned short> *v2; // edi@1
  NiTListItem<unsigned short> *v3; // esi@1
  NiTListItem<unsigned short> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,unsigned short>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BF064: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>::`vftable')(void *p, char);
// 9BF074: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,unsigned short>::`vftable')(void *p, char);

//----- (006B68B0) --------------------------------------------------------
void __thiscall PgTList<QUEST_DATA *>::~PgTList<QUEST_DATA *>(PgTList<QUEST_DATA *> *this)
{
  PgTList<QUEST_DATA *> *v1; // edi@1
  NiTListItem<QUEST_DATA *> *v2; // esi@1
  NiTListItem<QUEST_DATA *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>Vtbl *)&PgTList<QUEST_DATA *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>::`vftable';
}
// 9BF034: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>::`vftable')(void *p, char);
// 9BF0A4: using guessed type int (__thiscall *PgTList<QUEST_DATA *>::`vftable')(void *p, char);

//----- (006B6930) --------------------------------------------------------
void __stdcall NiTPointerMap<char const *,unsigned short>::DeleteItem(NiTMapItem<char const *,unsigned short> *pkItem)
{
  bool v2; // zf@1

  pkItem->m_val = 0;
  EnterCriticalSection(&NiTAbstractPoolAllocator<unsigned int>::ms_kCriticalSection);
  dword_B62428 = GetCurrentThreadId();
  ++dword_B6242C;
  pkItem->m_key = 0;
  pkItem->m_pkNext = (NiTMapItem<char const *,unsigned short> *)NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem;
  v2 = dword_B6242C-- == 1;
  NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem = (int)pkItem;
  if ( v2 )
    dword_B62428 = 0;
  LeaveCriticalSection(&NiTAbstractPoolAllocator<unsigned int>::ms_kCriticalSection);
}
// B6240C: using guessed type int NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem;
// B62428: using guessed type int dword_B62428;
// B6242C: using guessed type int dword_B6242C;

//----- (006B6990) --------------------------------------------------------
void __thiscall PgTList<unsigned short>::~PgTList<unsigned short>(PgTList<unsigned short> *this)
{
  PgTList<unsigned short> *v1; // edi@1
  NiTListItem<unsigned short> *v2; // esi@1
  NiTListItem<unsigned short> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>Vtbl *)&PgTList<unsigned short>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>::`vftable';
}
// 9BF064: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>::`vftable')(void *p, char);
// 9BF0B4: using guessed type int (__thiscall *PgTList<unsigned short>::`vftable')(void *p, char);

//----- (006B6A10) --------------------------------------------------------
PgTList<QuestMC *> *__thiscall PgTList<QuestMC *>::`scalar deleting destructor'(PgTList<QuestMC *> *this, unsigned int a2)
{
  PgTList<QuestMC *> *v2; // edi@1
  NiTListItem<QuestMC *> *v3; // esi@1
  NiTListItem<QuestMC *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *>Vtbl *)&PgTList<QuestMC *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BF014: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QuestMC *>::`vftable')(void *p, char);
// 9BF094: using guessed type int (__thiscall *PgTList<QuestMC *>::`vftable')(void *p, char);

//----- (006B6AA0) --------------------------------------------------------
PgTList<QUEST_DATA *> *__thiscall PgTList<QUEST_DATA *>::`scalar deleting destructor'(PgTList<QUEST_DATA *> *this, unsigned int a2)
{
  PgTList<QUEST_DATA *> *v2; // edi@1
  NiTListItem<QUEST_DATA *> *v3; // esi@1
  NiTListItem<QUEST_DATA *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>Vtbl *)&PgTList<QUEST_DATA *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BF034: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QUEST_DATA *>::`vftable')(void *p, char);
// 9BF0A4: using guessed type int (__thiscall *PgTList<QUEST_DATA *>::`vftable')(void *p, char);

//----- (006B6B30) --------------------------------------------------------
void __thiscall NiTPointerList<QuestHelperMgr::ProgressQuestMobGroup *>::~NiTPointerList<QuestHelperMgr::ProgressQuestMobGroup *>(NiTPointerList<QuestHelperMgr::ProgressQuestMobGroup *> *this)
{
  NiTPointerList<QuestHelperMgr::ProgressQuestMobGroup *> *v1; // edi@1
  NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> *v2; // esi@1
  NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *> *)v1,
      v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>::`vftable';
}
// 9BF054: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>::`vftable')(void *p, char);
// 9BF084: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>::`vftable')(void *p, char);

//----- (006B6BB0) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>::`vector deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *> *v2; // edi@1
  NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> *v3; // esi@1
  NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *> *)v2,
      v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BF054: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>::`vftable')(void *p, char);
// 9BF084: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>::`vftable')(void *p, char);

//----- (006B6C40) --------------------------------------------------------
PgTList<unsigned short> *__thiscall PgTList<unsigned short>::`vector deleting destructor'(PgTList<unsigned short> *this, unsigned int a2)
{
  PgTList<unsigned short> *v2; // edi@1
  NiTListItem<unsigned short> *v3; // esi@1
  NiTListItem<unsigned short> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>Vtbl *)&PgTList<unsigned short>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BF064: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,unsigned short>::`vftable')(void *p, char);
// 9BF0B4: using guessed type int (__thiscall *PgTList<unsigned short>::`vftable')(void *p, char);

//----- (006B6CD0) --------------------------------------------------------
PgTList<QuestHelperMgr::ProgressQuestMobGroup *> *__thiscall PgTList<QuestHelperMgr::ProgressQuestMobGroup *>::`scalar deleting destructor'(PgTList<QuestHelperMgr::ProgressQuestMobGroup *> *this, unsigned int a2)
{
  PgTList<QuestHelperMgr::ProgressQuestMobGroup *> *v2; // edi@1
  NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> *v3; // esi@1
  NiTListItem<QuestHelperMgr::ProgressQuestMobGroup *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>Vtbl *)&PgTList<QuestHelperMgr::ProgressQuestMobGroup *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *> *)v2,
      v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BF054: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,QuestHelperMgr::ProgressQuestMobGroup *>::`vftable')(void *p, char);
// 9BF0CC: using guessed type int (__thiscall *PgTList<QuestHelperMgr::ProgressQuestMobGroup *>::`vftable')(void *p, char);

//----- (006B6D60) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__cdecl std::operator+<char,std::char_traits<char>,std::allocator<char>>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result, const char *_Left, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Right)
{
  unsigned int v3; // edi@1
  unsigned int v4; // eax@1
  bool v5; // cf@4
  _BYTE *v6; // eax@5

  result->_Myres = 15;
  result->_Mysize = 0;
  result->_Bx._Buf[0] = 0;
  v3 = result->_Mysize;
  v4 = _Right->_Mysize + strlen(_Left);
  if ( v3 <= v4
    && result->_Myres != v4
    && (unsigned __int8)std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Grow(result, v4, 1) )
  {
    v5 = result->_Myres < 0x10;
    result->_Mysize = v3;
    if ( v5 )
      v6 = result;
    else
      v6 = result->_Bx._Ptr;
    v6[v3] = 0;
  }
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(result, _Left, strlen(_Left));
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(result, _Right, 0, 0xFFFFFFFF);
  return result;
}

//----- (006B6E30) --------------------------------------------------------
void __thiscall Scenario::~Scenario(Scenario *this)
{
  this->vfptr = (ScenarioVtbl *)&Scenario::`vftable';
}
// 9BF0DC: using guessed type bool (__thiscall *Scenario::`vftable')(Scenario *this, float);

//----- (006B6E60) --------------------------------------------------------
void __thiscall ScenarioMgr::StopScenario(ScenarioMgr *this, unsigned __int16 kID)
{
  TutorialMgr *v2; // ecx@2
  TutorialMgr *v3; // ecx@4
  TutorialMgr *v4; // ecx@8
  TutorialMgr *v5; // ecx@10
  TutorialMgr *v6; // ecx@12
  TutorialMgr *v7; // ecx@14
  TutorialMgr *v8; // ecx@16
  TutorialMgr *v9; // ecx@18

  switch ( kID )
  {
    case 1u:
      v2 = this->m_pTutorialMgr;
      if ( v2 )
        v2->m_kWaitEvent_OpenInventoryWin.bOn = 0;
      break;
    case 2u:
      v3 = this->m_pTutorialMgr;
      if ( v3 )
        v3->m_kWaitEvent_On_NC_ITEM_EQUIP_ACK.bOn = 0;
      break;
    case 3u:
      if ( this->m_pTutorialMgr )
      {
        this->m_pTutorialMgr->m_kWaitEvent_OnHPSoulStoneUse_Key.bOn = 0;
        this->m_pTutorialMgr->m_kWaitEvent_OnSPSoulStoneUse_Key.bOn = 0;
      }
      break;
    case 4u:
      v4 = this->m_pTutorialMgr;
      if ( v4 )
        v4->m_kWaitEvent_OpenItemUpgradeWin.bOn = 0;
      break;
    case 5u:
      v5 = this->m_pTutorialMgr;
      if ( v5 )
        v5->m_kWaitEvent_On_NC_ITEM_UPGRADE_ACK.bOn = 0;
      break;
    case 6u:
      v6 = this->m_pTutorialMgr;
      if ( v6 )
        v6->m_kWaitEvent_OpenWeaponTitleWin.bOn = 0;
      break;
    case 7u:
      v7 = this->m_pTutorialMgr;
      if ( v7 )
        v7->m_kWaitEvent_On_NC_WT_LICENSE_ACK.bOn = 0;
      break;
    case 8u:
      v8 = this->m_pTutorialMgr;
      if ( v8 )
        v8->m_kWaitEvent_On_NC_SKILL_SKILL_LEARNSUC_CMD.bOn = 0;
      break;
    case 9u:
      v9 = this->m_pTutorialMgr;
      if ( v9 )
        v9->m_kWaitEvent_OnShortCutSkill.bOn = 0;
      break;
    default:
      return;
  }
}

//----- (006B6F40) --------------------------------------------------------
void __thiscall TutorialMgr::SendResult(TutorialMgr *this, unsigned __int16 kID, char kCmd)
{
  GameFrameWork::NcQuestScriptCmdAck((GameFrameWork *)this->m_pkFrameWork, kID, kCmd, 1u);
}

//----- (006B6F60) --------------------------------------------------------
void __thiscall TutorialMgr::On_NC_SKILL_SKILL_LEARNSUC_CMD(TutorialMgr *this)
{
  unsigned __int16 v1; // dx@2
  char v2; // ST04_1@2

  if ( this->m_kWaitEvent_On_NC_SKILL_SKILL_LEARNSUC_CMD.bOn )
  {
    v1 = this->m_kWaitEvent_On_NC_SKILL_SKILL_LEARNSUC_CMD.kID;
    v2 = this->m_kWaitEvent_On_NC_SKILL_SKILL_LEARNSUC_CMD.kCmd;
    this->m_kWaitEvent_On_NC_SKILL_SKILL_LEARNSUC_CMD.bOn = 0;
    GameFrameWork::NcQuestScriptCmdAck((GameFrameWork *)this->m_pkFrameWork, v1, v2, 1u);
  }
}

//----- (006B6F80) --------------------------------------------------------
void __thiscall TutorialMgr::OnShortCutSkill(TutorialMgr *this)
{
  unsigned __int16 v1; // dx@2
  char v2; // ST04_1@2

  if ( this->m_kWaitEvent_OnShortCutSkill.bOn )
  {
    v1 = this->m_kWaitEvent_OnShortCutSkill.kID;
    v2 = this->m_kWaitEvent_OnShortCutSkill.kCmd;
    this->m_kWaitEvent_OnShortCutSkill.bOn = 0;
    GameFrameWork::NcQuestScriptCmdAck((GameFrameWork *)this->m_pkFrameWork, v1, v2, 1u);
  }
}

//----- (006B6FA0) --------------------------------------------------------
void __thiscall TutorialMgr::OpenItemUpgradeWin(TutorialMgr *this)
{
  unsigned __int16 v1; // dx@2
  char v2; // ST04_1@2

  if ( this->m_kWaitEvent_OpenItemUpgradeWin.bOn )
  {
    v1 = this->m_kWaitEvent_OpenItemUpgradeWin.kID;
    v2 = this->m_kWaitEvent_OpenItemUpgradeWin.kCmd;
    this->m_kWaitEvent_OpenItemUpgradeWin.bOn = 0;
    GameFrameWork::NcQuestScriptCmdAck((GameFrameWork *)this->m_pkFrameWork, v1, v2, 1u);
  }
}

//----- (006B6FC0) --------------------------------------------------------
void __thiscall TutorialMgr::OnSPSoulStoneUse_Key(TutorialMgr *this)
{
  bool v1; // zf@2

  if ( this->m_kWaitEvent_OnSPSoulStoneUse_Key.bOn )
  {
    v1 = this->m_kWaitEvent_OnHPSoulStoneUse_Key.bOn == 0;
    this->m_kWaitEvent_OnSPSoulStoneUse_Key.bOn = 0;
    if ( v1 )
      GameFrameWork::NcQuestScriptCmdAck(
        (GameFrameWork *)this->m_pkFrameWork,
        this->m_kWaitEvent_OnSPSoulStoneUse_Key.kID,
        this->m_kWaitEvent_OnSPSoulStoneUse_Key.kCmd,
        1u);
  }
}

//----- (006B6FF0) --------------------------------------------------------
void __thiscall TutorialMgr::OnHPSoulStoneUse_Key(TutorialMgr *this)
{
  bool v1; // zf@2

  if ( this->m_kWaitEvent_OnHPSoulStoneUse_Key.bOn )
  {
    v1 = this->m_kWaitEvent_OnSPSoulStoneUse_Key.bOn == 0;
    this->m_kWaitEvent_OnHPSoulStoneUse_Key.bOn = 0;
    if ( v1 )
      GameFrameWork::NcQuestScriptCmdAck(
        (GameFrameWork *)this->m_pkFrameWork,
        this->m_kWaitEvent_OnHPSoulStoneUse_Key.kID,
        this->m_kWaitEvent_OnHPSoulStoneUse_Key.kCmd,
        1u);
  }
}

//----- (006B7020) --------------------------------------------------------
void __thiscall TutorialMgr::On_NC_ITEM_EQUIP_ACK(TutorialMgr *this)
{
  unsigned __int16 v1; // dx@2
  char v2; // ST04_1@2

  if ( this->m_kWaitEvent_On_NC_ITEM_EQUIP_ACK.bOn )
  {
    v1 = this->m_kWaitEvent_On_NC_ITEM_EQUIP_ACK.kID;
    v2 = this->m_kWaitEvent_On_NC_ITEM_EQUIP_ACK.kCmd;
    this->m_kWaitEvent_On_NC_ITEM_EQUIP_ACK.bOn = 0;
    GameFrameWork::NcQuestScriptCmdAck((GameFrameWork *)this->m_pkFrameWork, v1, v2, 1u);
  }
}

//----- (006B7040) --------------------------------------------------------
void __thiscall TutorialMgr::OpenInventoryWin(TutorialMgr *this)
{
  unsigned __int16 v1; // dx@2
  char v2; // ST04_1@2

  if ( this->m_kWaitEvent_OpenInventoryWin.bOn )
  {
    v1 = this->m_kWaitEvent_OpenInventoryWin.kID;
    v2 = this->m_kWaitEvent_OpenInventoryWin.kCmd;
    this->m_kWaitEvent_OpenInventoryWin.bOn = 0;
    GameFrameWork::NcQuestScriptCmdAck((GameFrameWork *)this->m_pkFrameWork, v1, v2, 1u);
  }
}

//----- (006B7060) --------------------------------------------------------
void __thiscall TutorialMgr::OnOpenWeaponTitleWin(TutorialMgr *this)
{
  unsigned __int16 v1; // dx@2
  char v2; // ST04_1@2

  if ( this->m_kWaitEvent_OpenWeaponTitleWin.bOn )
  {
    v1 = this->m_kWaitEvent_OpenWeaponTitleWin.kID;
    v2 = this->m_kWaitEvent_OpenWeaponTitleWin.kCmd;
    this->m_kWaitEvent_OpenWeaponTitleWin.bOn = 0;
    GameFrameWork::NcQuestScriptCmdAck((GameFrameWork *)this->m_pkFrameWork, v1, v2, 1u);
  }
}

//----- (006B7080) --------------------------------------------------------
void __thiscall ScenarioMgr::RunScenario(ScenarioMgr *this, unsigned __int16 kID, unsigned __int16 nQuestID, char kCmd)
{
  ScenarioMgr *v4; // esi@1
  char v5; // cl@7
  GameFrameWork **v6; // esi@10
  Scenario_15 *v7; // eax@18
  int v8; // eax@19

  v4 = this;
  switch ( kID )
  {
    case 1u:
      if ( this->m_pTutorialMgr )
      {
        this->m_pTutorialMgr->m_kWaitEvent_OpenInventoryWin.bOn = 1;
        this->m_pTutorialMgr->m_kWaitEvent_OpenInventoryWin.kID = nQuestID;
        this->m_pTutorialMgr->m_kWaitEvent_OpenInventoryWin.kCmd = kCmd;
        GameFrameWork::CloseInventoryWin((GameFrameWork *)this->m_pTutorialMgr->m_pkFrameWork);
      }
      break;
    case 2u:
      if ( this->m_pTutorialMgr )
      {
        this->m_pTutorialMgr->m_kWaitEvent_On_NC_ITEM_EQUIP_ACK.bOn = 1;
        this->m_pTutorialMgr->m_kWaitEvent_On_NC_ITEM_EQUIP_ACK.kID = nQuestID;
        this->m_pTutorialMgr->m_kWaitEvent_On_NC_ITEM_EQUIP_ACK.kCmd = kCmd;
        GameFrameWork::UnEquip((GameFrameWork *)this->m_pTutorialMgr->m_pkFrameWork, 0xCu);
      }
      break;
    case 3u:
      if ( this->m_pTutorialMgr )
      {
        this->m_pTutorialMgr->m_kWaitEvent_OnHPSoulStoneUse_Key.bOn = 1;
        this->m_pTutorialMgr->m_kWaitEvent_OnHPSoulStoneUse_Key.kID = nQuestID;
        v5 = kCmd;
        v4->m_pTutorialMgr->m_kWaitEvent_OnHPSoulStoneUse_Key.kCmd = kCmd;
        v4->m_pTutorialMgr->m_kWaitEvent_OnSPSoulStoneUse_Key.bOn = 1;
        v4->m_pTutorialMgr->m_kWaitEvent_OnSPSoulStoneUse_Key.kID = nQuestID;
        v4->m_pTutorialMgr->m_kWaitEvent_OnSPSoulStoneUse_Key.kCmd = v5;
      }
      break;
    case 4u:
      if ( this->m_pTutorialMgr )
      {
        this->m_pTutorialMgr->m_kWaitEvent_OpenItemUpgradeWin.bOn = 1;
        this->m_pTutorialMgr->m_kWaitEvent_OpenItemUpgradeWin.kID = nQuestID;
        this->m_pTutorialMgr->m_kWaitEvent_OpenItemUpgradeWin.kCmd = kCmd;
      }
      break;
    case 5u:
      v6 = (GameFrameWork **)this->m_pTutorialMgr;
      if ( v6 )
        GameFrameWork::CloseItemUpgradeWin(*v6, 0);
      break;
    case 6u:
      if ( this->m_pTutorialMgr )
      {
        this->m_pTutorialMgr->m_kWaitEvent_OpenWeaponTitleWin.bOn = 1;
        this->m_pTutorialMgr->m_kWaitEvent_OpenWeaponTitleWin.kID = nQuestID;
        this->m_pTutorialMgr->m_kWaitEvent_OpenWeaponTitleWin.kCmd = kCmd;
      }
      break;
    case 8u:
      if ( this->m_pTutorialMgr )
      {
        this->m_pTutorialMgr->m_kWaitEvent_On_NC_SKILL_SKILL_LEARNSUC_CMD.bOn = 1;
        this->m_pTutorialMgr->m_kWaitEvent_On_NC_SKILL_SKILL_LEARNSUC_CMD.kID = nQuestID;
        this->m_pTutorialMgr->m_kWaitEvent_On_NC_SKILL_SKILL_LEARNSUC_CMD.kCmd = kCmd;
      }
      break;
    case 9u:
      if ( this->m_pTutorialMgr )
      {
        this->m_pTutorialMgr->m_kWaitEvent_OnShortCutSkill.bOn = 1;
        this->m_pTutorialMgr->m_kWaitEvent_OnShortCutSkill.kID = nQuestID;
        this->m_pTutorialMgr->m_kWaitEvent_OnShortCutSkill.kCmd = kCmd;
      }
      break;
    case 0xFu:
      v7 = (Scenario_15 *)operator new(0x28u);
      if ( v7 )
        Scenario_15::Scenario_15(v7, v4->m_pTutorialMgr->m_pkFrameWork, kID, nQuestID, kCmd);
      else
        v8 = 0;
      *(_DWORD *)&kCmd = v8;
      std::list<enum  ABSTATEINDEX,std::allocator<enum  ABSTATEINDEX>>::push_back(
        (std::list<enum ABSTATEINDEX,std::allocator<enum ABSTATEINDEX> > *)v4,
        (ABSTATEINDEX *)&kCmd);
      break;
    default:
      return;
  }
}

//----- (006B7330) --------------------------------------------------------
void __thiscall ScenarioMgr::Update(ScenarioMgr *this, float fTime)
{
  std::_List_nod<Scenario *,std::allocator<Scenario *> >::_Node *v2; // ecx@1
  std::_List_nod<Scenario *,std::allocator<Scenario *> >::_Node *v3; // ebx@1
  std::_List_nod<Scenario *,std::allocator<Scenario *> >::_Node *v4; // esi@2
  Scenario *v5; // edi@2
  std::_List_nod<Scenario *,std::allocator<Scenario *> >::_Node *v6; // [sp+10h] [bp-8h]@1
  ScenarioMgr *v7; // [sp+14h] [bp-4h]@1

  v7 = this;
  v2 = this->m_listScenatio._Myhead;
  v3 = v2->_Next;
  v6 = v2;
  while ( v3 != v6 )
  {
    v4 = v3;
    v5 = v3->_Myval;
    v3 = v3->_Next;
    if ( v5 && !(unsigned __int8)((int (__thiscall *)(_DWORD, _DWORD))v5->vfptr->Update)(v5, LODWORD(fTime)) )
    {
      ((void (__thiscall *)(_DWORD, _DWORD))v5->vfptr->~Scenario)(v5, 1);
      if ( v4 != v7->m_listScenatio._Myhead )
      {
        v4->_Prev->_Next = v4->_Next;
        v4->_Next->_Prev = v4->_Prev;
        operator delete(v4);
        --v7->m_listScenatio._Mysize;
      }
    }
  }
}

//----- (006B73B0) --------------------------------------------------------
char __thiscall Scenario::Stop(Scenario *this, float fTime)
{
  GameFrameWork::NcQuestScriptCmdAck((GameFrameWork *)this->m_pkFrameWork, this->m_nQuestID, this->m_kCmd, 1u);
  return 1;
}

//----- (006B73D0) --------------------------------------------------------
void __thiscall Scenario_15::Scenario_15(Scenario_15 *this, PgFrameWork *pkFrameWork, unsigned __int16 kID, unsigned __int16 nQuestID, char kCmd)
{
  Scenario_15 *v5; // esi@1
  float kCmda; // [sp+38h] [bp+14h]@1

  v5 = this;
  this->m_pkFrameWork = pkFrameWork;
  this->m_kID = kID;
  this->m_nQuestID = nQuestID;
  this->m_kCmd = kCmd;
  this->vfptr = (ScenarioVtbl *)&Scenario_15::`vftable';
  CNSTimer_MarkCheck::CNSTimer_MarkCheck(&this->m_kMarkCheck);
  v5->m_kMarkCheck.m_fMarkTime = 10.0;
  CNSTimer_MarkCheck::ReSet(&v5->m_kMarkCheck, Timer::ms_fCurTime, OVER);
  g_kServer.m_fOldGameTimeWhenSet = g_kServer.m_fGameTimeWhenSet;
  g_kServer.m_fOldAppTimeWhenSet = g_kServer.m_fAppTimeWhenSet;
  g_kServer.m_fOldOneDayTime = Server::ONE_DAY_TIME;
  kCmda = Server::GetGameTime(&g_kServer, Timer::ms_fCurTime);
  Server::ONE_DAY_TIME = 1.0;
  g_kServer.m_fGameTimeWhenSet = kCmda;
  g_kServer.m_fAppTimeWhenSet = Timer::ms_fCurTime;
}
// 9BF0EC: using guessed type bool (__thiscall *Scenario_15::`vftable')(Scenario *this, float);
// A754F0: using guessed type float Server::ONE_DAY_TIME;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006B74C0) --------------------------------------------------------
Scenario_15 *__thiscall Scenario_15::`vector deleting destructor'(Scenario_15 *this, unsigned int a2)
{
  Scenario_15 *v2; // esi@1

  v2 = this;
  this->vfptr = (ScenarioVtbl *)&Scenario_15::`vftable';
  ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&this->m_kMarkCheck);
  v2->vfptr = (ScenarioVtbl *)&Scenario::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BF0DC: using guessed type bool (__thiscall *Scenario::`vftable')(Scenario *this, float);
// 9BF0EC: using guessed type bool (__thiscall *Scenario_15::`vftable')(Scenario *this, float);

//----- (006B7530) --------------------------------------------------------
char __thiscall Scenario_15::Update(Scenario_15 *this, float fTime)
{
  Scenario_15 *v2; // esi@1
  int v3; // eax@1
  char result; // al@2

  v2 = this;
  CNSTimer_MarkCheck::Update(&this->m_kMarkCheck, Timer::ms_fCurTime);
  if ( v3 == 1 )
  {
    ((void (__thiscall *)(Scenario_15 *, _DWORD))v2->vfptr->Stop)(v2, LODWORD(fTime));
    g_kServer.m_fGameTimeWhenSet = g_kServer.m_fOldGameTimeWhenSet;
    result = 0;
    g_kServer.m_fAppTimeWhenSet = g_kServer.m_fOldAppTimeWhenSet;
    Server::ONE_DAY_TIME = g_kServer.m_fOldOneDayTime;
  }
  else
  {
    result = 1;
  }
  return result;
}
// A754F0: using guessed type float Server::ONE_DAY_TIME;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006B7590) --------------------------------------------------------
void __thiscall CGuildMonster::CGuildMonster(CGuildMonster *this)
{
  std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v2; // eax@1
  std::exception pExceptionObject; // [sp+8h] [bp-20h]@3
  CGuildMonster *v4; // [sp+14h] [bp-14h]@1
  char *_What; // [sp+18h] [bp-10h]@3
  int v6; // [sp+24h] [bp-4h]@2

  v1 = (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)this;
  v4 = this;
  this->m_mapGuildMob._Mysize = 0;
  v2 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)operator new(0x18u);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->_Myhead = v2;
  v2->_Left = v2;
  v1->_Myhead->_Parent = v1->_Myhead;
  v1->_Myhead->_Right = v1->_Myhead;
  v1->_Myhead->_Color = 1;
  v1->_Myhead->_Isnil = 1;
  v6 = 0;
  std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::clear(v1);
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (006B7640) --------------------------------------------------------
void __cdecl CGuildMonster::GetInstance()
{
  CGuildMonster *v0; // eax@2
  std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *v1; // eax@3

  if ( !CGuildMonster::m_pInstance )
  {
    v0 = (CGuildMonster *)operator new(0x10u);
    if ( v0 )
    {
      CGuildMonster::CGuildMonster(v0);
      CGuildMonster::m_pInstance = v1;
    }
    else
    {
      CGuildMonster::m_pInstance = 0;
    }
  }
}

//----- (006B76C0) --------------------------------------------------------
void __cdecl CGuildMonster::ReleaseInstance()
{
  std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *v0; // esi@2
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v1; // ST08_4@2
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v2; // ST04_4@2
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > result; // [sp+8h] [bp-14h]@2
  std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *v4; // [sp+Ch] [bp-10h]@2
  int v5; // [sp+18h] [bp-4h]@2

  if ( CGuildMonster::m_pInstance )
  {
    v0 = CGuildMonster::m_pInstance;
    v4 = CGuildMonster::m_pInstance;
    v5 = 0;
    std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::clear(CGuildMonster::m_pInstance);
    v1._Ptr = v0->_Myhead;
    v2._Ptr = v0->_Myhead->_Left;
    v5 = 1;
    std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
      v0,
      &result,
      v2,
      v1);
    operator delete(v0->_Myhead);
    operator delete(v0);
    CGuildMonster::m_pInstance = 0;
  }
}

//----- (006B7750) --------------------------------------------------------
void __thiscall GuildListTask::OnStart(GuildListTask *this)
{
  GuildListTask *v1; // esi@1
  GuildListWin *v2; // eax@1
  int v3; // edx@2
  IDirectMessenger *v4; // eax@5

  v1 = this;
  v2 = GuildListWin::CreateWin(0);
  GuildListTask::m_pkGuildListWin = v2;
  if ( v1 )
    v3 = (int)&v1->vfptr;
  else
    v3 = 0;
  ((void (__stdcall *)(_DWORD))v2->vfptr->SetMsgHooker)(v3);
  if ( v1 )
    v4 = (IDirectMessenger *)&v1->vfptr;
  else
    v4 = 0;
  GuildListTask::m_pkGuildListWin->vfptr->SetMsgHooker(&GuildListTask::m_pkGuildListWin->vfptr, v4);
}

//----- (006B77A0) --------------------------------------------------------
void __cdecl GuildListTask::OnNCGuildListReq()
{
  NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 3u, 0, 0);
}

//----- (006B77D0) --------------------------------------------------------
char __thiscall GuildListTask::OnProcessNetMsg(GuildListTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  char result; // al@3

  if ( iDepart == 29 && iCommand == 4 )
  {
    this->vfptr->Recv_NC_GUILD_LIST_ACK((CGuildList *)&this->vfptr, (PROTO_NC_GUILD_LIST_ACK *)pvData);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006B7800) --------------------------------------------------------
int __stdcall GuildListTask::Recv_NC_GUILD_LIST_ACK(PROTO_NC_GUILD_LIST_ACK *pkProto)
{
  signed int v2; // edi@4
  SHINE_GUILD_LIST_NEW *v3; // ebx@5

  if ( pkProto->Error == 3137 )
  {
    if ( pkProto->PartMask & 1 )
      GuildListWin::Clear(GuildListTask::m_pkGuildListWin);
    v2 = 0;
    if ( pkProto->nGuildListCnt > 0u )
    {
      v3 = (SHINE_GUILD_LIST_NEW *)&pkProto[1];
      do
      {
        GuildListWin::SetGuildList(GuildListTask::m_pkGuildListWin, v3, pkProto->TotalNumOfGuild);
        ++v2;
        ++v3;
      }
      while ( v2 < pkProto->nGuildListCnt );
    }
    if ( pkProto->PartMask & 2 )
    {
      GuildListWin::DisplayInfoSetting(GuildListTask::m_pkGuildListWin, 0);
      return 1;
    }
  }
  else if ( pkProto->Error == 7216 )
  {
    GuildListWin::ShowFormerList(GuildListTask::m_pkGuildListWin);
  }
  return 1;
}

//----- (006B7890) --------------------------------------------------------
void __cdecl GuildListTask::ShowGuildListWin()
{
  if ( !(unsigned __int8)((int (*)(void))GuildListTask::m_pkGuildListWin->vfptr[65].__vecDelDtor)() )
  {
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 3u, 0, 0);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&GuildListTask::m_pkGuildListWin->vfptr);
  }
}

//----- (006B78D0) --------------------------------------------------------
GuildListWin *__cdecl GuildListTask::GetGuildListWin()
{
  return GuildListTask::m_pkGuildListWin;
}

//----- (006B78E0) --------------------------------------------------------
void __cdecl GuildListTask::Terminate()
{
  void (__thiscall ***v0)(_DWORD, _DWORD); // esi@1

  v0 = (void (__thiscall ***)(_DWORD, _DWORD))GuildListTask::ms_spGuildListTask;
  if ( GuildListTask::ms_spGuildListTask )
  {
    if ( !InterlockedDecrement((volatile LONG *)(GuildListTask::ms_spGuildListTask + 4)) )
    {
      if ( v0 )
        (**v0)(v0, 1);
    }
    GuildListTask::ms_spGuildListTask = 0;
  }
}
// B5C0C4: using guessed type int GuildListTask::ms_spGuildListTask;

//----- (006B7920) --------------------------------------------------------
void __thiscall GuildListTask::~GuildListTask(GuildListTask *this)
{
  GuildListTask *v1; // esi@1
  GuildListTask *v2; // ST08_4@1
  CGuildList *v3; // ecx@1

  v1 = this;
  v2 = this;
  v3 = (CGuildList *)&this->vfptr;
  v2->vfptr = (NiRefObjectVtbl *)&GuildListTask::`vftable'{for `NiRefObject'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildListTask::`vftable'{for `IDirectMessenger'};
  v3->vfptr = (CGuildListVtbl *)&GuildListTask::`vftable';
  CGuildList::~CGuildList(v3);
  ITask::~ITask((ITask *)&v1->vfptr);
}
// 9BF108: using guessed type enum NiAnimationKey::KeyContent (__thiscall *GuildListTask::`vftable')(NiPoint3Interpolator *this, unsigned __int16);
// 9BF114: using guessed type void (__thiscall *GuildListTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9BF130: using guessed type int (__thiscall *GuildListTask::`vftable'{for `NiRefObject'})(void *p, char);

//----- (006B7990) --------------------------------------------------------
void __thiscall GuildListTask::GuildListTask(GuildListTask *this)
{
  GuildListTask *v1; // esi@1

  v1 = this;
  ITask::ITask((ITask *)&this->vfptr, 0);
  CGuildList::CGuildList((CGuildList *)&v1->vfptr);
  v1->vfptr = (CGuildListVtbl *)&CClientGuildList::`vftable';
  v1->vfptr = (NiRefObjectVtbl *)&GuildListTask::`vftable'{for `NiRefObject'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildListTask::`vftable'{for `IDirectMessenger'};
  v1->vfptr = (CGuildListVtbl *)&GuildListTask::`vftable';
}
// 9BF0FC: using guessed type enum NiAnimationKey::KeyContent (__thiscall *CClientGuildList::`vftable')(NiPoint3Interpolator *this, unsigned __int16);
// 9BF108: using guessed type enum NiAnimationKey::KeyContent (__thiscall *GuildListTask::`vftable')(NiPoint3Interpolator *this, unsigned __int16);
// 9BF114: using guessed type void (__thiscall *GuildListTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9BF130: using guessed type int (__thiscall *GuildListTask::`vftable'{for `NiRefObject'})(void *p, char);

//----- (006B7A00) --------------------------------------------------------
void __cdecl GuildListTask::Create(IDirectMessenger *pkMsgHooker)
{
  int v1; // eax@1
  ITask *v2; // eax@2
  int v3; // esi@2
  void (__thiscall ***v4)(_DWORD, _DWORD); // edi@7

  v1 = GuildListTask::ms_spGuildListTask;
  if ( !GuildListTask::ms_spGuildListTask )
  {
    v2 = (ITask *)operator new(0x4Cu);
    v3 = (int)v2;
    if ( v2 )
    {
      ITask::ITask(v2, 0);
      CGuildList::CGuildList((CGuildList *)(v3 + 64));
      *(_DWORD *)(v3 + 64) = &CClientGuildList::`vftable';
      *(_DWORD *)v3 = &GuildListTask::`vftable'{for `NiRefObject'};
      *(_DWORD *)(v3 + 8) = &GuildListTask::`vftable'{for `IDirectMessenger'};
      *(_DWORD *)(v3 + 64) = &GuildListTask::`vftable';
    }
    else
    {
      v3 = 0;
    }
    v1 = GuildListTask::ms_spGuildListTask;
    if ( GuildListTask::ms_spGuildListTask != v3 )
    {
      if ( GuildListTask::ms_spGuildListTask )
      {
        v4 = (void (__thiscall ***)(_DWORD, _DWORD))GuildListTask::ms_spGuildListTask;
        if ( !InterlockedDecrement((volatile LONG *)(GuildListTask::ms_spGuildListTask + 4)) )
        {
          if ( v4 )
            (**v4)(v4, 1);
        }
      }
      v1 = v3;
      GuildListTask::ms_spGuildListTask = v3;
      if ( v3 )
      {
        InterlockedIncrement((volatile LONG *)(v3 + 4));
        v1 = GuildListTask::ms_spGuildListTask;
      }
    }
  }
  (**(void (__cdecl ***)(IDirectMessenger *))(v1 + 8))(pkMsgHooker);
}
// 9BF0FC: using guessed type enum NiAnimationKey::KeyContent (__thiscall *CClientGuildList::`vftable')(NiPoint3Interpolator *this, unsigned __int16);
// 9BF108: using guessed type enum NiAnimationKey::KeyContent (__thiscall *GuildListTask::`vftable')(NiPoint3Interpolator *this, unsigned __int16);
// 9BF114: using guessed type void (__thiscall *GuildListTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9BF130: using guessed type int (__thiscall *GuildListTask::`vftable'{for `NiRefObject'})(void *p, char);
// B5C0C4: using guessed type int GuildListTask::ms_spGuildListTask;

//----- (006B7AF0) --------------------------------------------------------
GuildListTask *__thiscall GuildListTask::`scalar deleting destructor'(GuildListTask *this, unsigned int a2)
{
  GuildListTask *v2; // esi@1
  GuildListTask *v3; // ST0C_4@1
  CGuildList *v4; // ecx@1

  v2 = this;
  v3 = this;
  v4 = (CGuildList *)&this->vfptr;
  v3->vfptr = (NiRefObjectVtbl *)&GuildListTask::`vftable'{for `NiRefObject'};
  v2->vfptr = (IDirectMessengerVtbl *)&GuildListTask::`vftable'{for `IDirectMessenger'};
  v4->vfptr = (CGuildListVtbl *)&GuildListTask::`vftable';
  CGuildList::~CGuildList(v4);
  ITask::~ITask((ITask *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BF108: using guessed type enum NiAnimationKey::KeyContent (__thiscall *GuildListTask::`vftable')(NiPoint3Interpolator *this, unsigned __int16);
// 9BF114: using guessed type void (__thiscall *GuildListTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9BF130: using guessed type int (__thiscall *GuildListTask::`vftable'{for `NiRefObject'})(void *p, char);

//----- (006B7B70) --------------------------------------------------------
unsigned int __thiscall CClientGuildMember::GetNumOfOnlineMembers(CClientGuildMember *this)
{
  int v1; // edx@1
  unsigned int result; // eax@1
  char *v3; // ecx@2

  v1 = this->m_NumOfMembers;
  result = 0;
  if ( this->m_NumOfMembers )
  {
    v3 = (char *)&this->m_Members[0].dLogonInfo;
    do
    {
      if ( *v3 & 1 )
        ++result;
      v3 += 110;
      --v1;
    }
    while ( v1 );
  }
  return result;
}

//----- (006B7B90) --------------------------------------------------------
GUILD_MEMBER_CLIENT *__thiscall CClientGuildMember::GetGuildMaster(CClientGuildMember *this)
{
  int v1; // esi@1
  int v2; // eax@1
  char *v3; // edx@2
  GUILD_MEMBER_CLIENT *result; // eax@5

  v1 = this->m_NumOfMembers;
  v2 = 0;
  if ( v1 <= 0 )
  {
LABEL_5:
    result = 0;
  }
  else
  {
    v3 = &this->m_Members[0].nGrade;
    while ( *v3 )
    {
      ++v2;
      v3 += 110;
      if ( v2 >= v1 )
        goto LABEL_5;
    }
    result = &this->m_Members[v2];
  }
  return result;
}

//----- (006B7BD0) --------------------------------------------------------
void GuildMemberTask::OnFinish()
{
  void (__thiscall ***v1)(_DWORD, _DWORD); // esi@1

  v1 = (void (__thiscall ***)(_DWORD, _DWORD))GuildMemberTask::ms_spGuildMemberTask;
  if ( GuildMemberTask::ms_spGuildMemberTask )
  {
    if ( !InterlockedDecrement((volatile LONG *)(GuildMemberTask::ms_spGuildMemberTask + 4)) )
    {
      if ( v1 )
        (**v1)(v1, 1);
    }
    GuildMemberTask::ms_spGuildMemberTask = 0;
  }
}
// B5C0C8: using guessed type int GuildMemberTask::ms_spGuildMemberTask;

//----- (006B7C10) --------------------------------------------------------
CClientGuildMember *__cdecl GuildMemberTask::GetGuildMember()
{
  CClientGuildMember *result; // eax@2

  if ( GuildMemberTask::ms_spGuildMemberTask )
    result = (CClientGuildMember *)(GuildMemberTask::ms_spGuildMemberTask + 64);
  else
    result = 0;
  return result;
}
// B5C0C8: using guessed type int GuildMemberTask::ms_spGuildMemberTask;

//----- (006B7C20) --------------------------------------------------------
BOOL __thiscall GuildMemberTask::Recv_NC_GUILD_MEMBER_LOGOFF_CMD(GuildMemberTask *this, PROTO_NC_GUILD_MEMBER_LOGOFF_CMD *pkProto)
{
  return CGuildMember::Recv_NC_GUILD_MEMBER_LOGOFF_CMD((CGuildMember *)this, pkProto) != 0;
}

//----- (006B7C50) --------------------------------------------------------
void __thiscall GuildMemberTask::On_Recv_NC_GUILD_MEMBER_LEAVE_CMD(GuildMemberTask *this, PROTO_NC_GUILD_MEMBER_LEAVE_CMD *pkProto)
{
  _BYTE v2[20]; // ST00_20@2
  CClientGuildAcademy *v3; // eax@2
  char *v4; // eax@3

  if ( CGuildMember::Recv_NC_GUILD_MEMBER_LEAVE_CMD((CGuildMember *)&this->vfptr, pkProto) )
  {
    *(_QWORD *)v2 = *(_QWORD *)&pkProto->CharID.n5_name[0];
    *(_QWORD *)&v2[8] = *(_QWORD *)&pkProto->CharID.n5_code[2];
    *(_DWORD *)&v2[16] = pkProto->CharID.n5_code[4];
    v3 = GuildAcademyTask::GetGuildAcademy();
    if ( (unsigned __int8)CClientGuildAcademy::IsGuildAcademyMaster(v3, *(Name5 *)v2) )
    {
      v4 = GuildAcademyTask::GetGuildAcademy()->m_GuildAcademy.sAcademyMasterName.n5_name;
      *((_DWORD *)v4 + 4) = 0;
      *((_DWORD *)v4 + 3) = 0;
      *((_DWORD *)v4 + 2) = 0;
      *((_DWORD *)v4 + 1) = 0;
      *(_DWORD *)v4 = 0;
      strncpy(v4, byte_9BF145, 0x14u);
    }
  }
}

//----- (006B7CD0) --------------------------------------------------------
void __thiscall GuildMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_CMD(GuildMemberTask *this, PROTO_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_CMD *pkProto)
{
  GuildMemberTask *v2; // edi@1
  CClientGuild *v3; // eax@1
  int v4; // ecx@3
  CClientGuildAcademyMember *v5; // eax@6
  Name5 *v6; // eax@7
  PgWin *v7; // eax@16

  v2 = this;
  v3 = GuildTask::GetGuild();
  if ( !(unsigned __int8)CClientGuild::AmIGuildMember(v3)
    || (!GuildMemberTask::ms_spGuildMemberTask ? (v4 = 0) : (v4 = GuildMemberTask::ms_spGuildMemberTask + 64),
        (*(int (__stdcall **)(_DWORD))(*(_DWORD *)v4 + 80))(pkProto)) )
  {
    v5 = GuildAcademyMemberTask::GetGuildAcademyMember();
    if ( v5->vfptr->Recv_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_CMD((CGuildAcademyMember *)v5, pkProto) )
    {
      v6 = User::GetMainCharID(&g_kUser);
      if ( v6->n5_code[0] == pkProto->Member.sName.n5_code[0]
        && v6->n5_code[1] == pkProto->Member.sName.n5_code[1]
        && v6->n5_code[2] == pkProto->Member.sName.n5_code[2]
        && v6->n5_code[3] == pkProto->Member.sName.n5_code[3]
        && v6->n5_code[4] == pkProto->Member.sName.n5_code[4] )
      {
        GuildAcademyTask::GetGuildAcademy()->m_bIsGuildAcademyMember = 0;
      }
      if ( v2->m_pkMsgHooker )
      {
        ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v2->m_pkMsgHooker->vfptr->SendDirectMessage)(71, 0, &v2->vfptr);
        if ( v2->m_pkMsgHooker )
          ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v2->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            71,
            0,
            &v2->vfptr);
      }
      v2->vfptr->DirectDispatchToParent((IDirectMessenger *)&v2->vfptr, 71, 0, (IDirectMessenger *)&v2->vfptr);
      v7 = GuildAcademySelectTask::GetGuildAcademySelectWin();
      if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v7->vfptr[65].__vecDelDtor)(v7) )
        NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0xBu, 0, 0);
    }
  }
}
// B5C0C8: using guessed type int GuildMemberTask::ms_spGuildMemberTask;

//----- (006B7DD0) --------------------------------------------------------
void __thiscall GuildMemberTask::DirectMessage(GuildMemberTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  GuildMemberTask *v4; // esi@1
  int v5; // eax@2
  IDirectMessenger *v6; // eax@3
  unsigned int v7; // ecx@7
  unsigned int v8; // edx@7
  unsigned int v9; // eax@7
  unsigned int v10; // eax@9
  unsigned int v11; // ecx@9
  unsigned int v12; // edx@9
  GuildMemberTask::State v13; // eax@12
  IDirectMessenger *v14; // eax@13
  int v15; // edx@17
  int v16; // eax@17
  int v17; // ecx@17
  int v18; // edx@17
  int v19; // eax@17
  int v20; // ecx@17
  int v21; // edx@17
  int v22; // eax@17
  int v23; // eax@19
  int v24; // ecx@19
  int v25; // edx@19
  int v26; // eax@19
  int v27; // ecx@19
  int v28; // edx@19
  int v29; // eax@19
  int v30; // ecx@19
  PROTO_NC_GUILD_MEMBER_JOIN_ACK *v31; // [sp-10h] [bp-54h]@7
  int *v32; // [sp-10h] [bp-54h]@17
  unsigned int pProto; // [sp+4h] [bp-40h]@17
  int v34; // [sp+8h] [bp-3Ch]@17
  int v35; // [sp+Ch] [bp-38h]@17
  int v36; // [sp+10h] [bp-34h]@17
  int v37; // [sp+14h] [bp-30h]@17
  int v38; // [sp+18h] [bp-2Ch]@17
  int v39; // [sp+1Ch] [bp-28h]@17
  int v40; // [sp+20h] [bp-24h]@17
  int v41; // [sp+24h] [bp-20h]@17
  char v42; // [sp+28h] [bp-1Ch]@17
  PROTO_NC_GUILD_MEMBER_JOIN_ACK kProto; // [sp+2Ch] [bp-18h]@7

  v4 = this;
  if ( iMsgTag != 27 )
    return;
  v5 = *(unsigned int *)((char *)&this->m_Members[399].sMap.n3_code[2] + 2);
  if ( v5 )
    v6 = (IDirectMessenger *)(v5 + 232);
  else
    v6 = 0;
  if ( pkFrom == v6 )
  {
    if ( *(_DWORD *)pvBody )
    {
      if ( *(_DWORD *)pvBody != 1 )
      {
LABEL_11:
        *(unsigned int *)((char *)&v4->m_Members[399].sMap.n3_code[2] + 2) = 0;
        goto LABEL_12;
      }
      v10 = this->m_pkInviteFrom.n5_code[4];
      v11 = this->m_kGuildNameToJoin.n4_code[0];
      kProto.GuildName.n4_code[0] = v4->m_pkInviteFrom.n5_code[3];
      v12 = v4->m_kGuildNameToJoin.n4_code[1];
      *(_QWORD *)&kProto.GuildName.n4_code[1] = __PAIR__(v11, v10);
      kProto.GuildName.n4_code[3] = v12;
      kProto.JoinAck = 0;
      v31 = &kProto;
    }
    else
    {
      v7 = this->m_pkInviteFrom.n5_code[4];
      v8 = v4->m_kGuildNameToJoin.n4_code[0];
      kProto.GuildName.n4_code[0] = v4->m_pkInviteFrom.n5_code[3];
      v9 = v4->m_kGuildNameToJoin.n4_code[1];
      *(_QWORD *)&kProto.GuildName.n4_code[1] = __PAIR__(v8, v7);
      kProto.GuildName.n4_code[3] = v9;
      kProto.JoinAck = 1;
      v31 = &kProto;
    }
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 0xCu, v31, 17);
    goto LABEL_11;
  }
LABEL_12:
  v13 = v4->m_eState;
  if ( v13 )
    v14 = (IDirectMessenger *)(v13 + 232);
  else
    v14 = 0;
  if ( pkFrom == v14 )
  {
    if ( *(_DWORD *)pvBody )
    {
      if ( *(_DWORD *)pvBody != 1 )
      {
LABEL_21:
        v4->m_eState = 0;
        return;
      }
      v23 = v4->m_pkInviteFrom.n5_code[4];
      v24 = v4->m_kGuildNameToJoin.n4_code[0];
      pProto = v4->m_pkInviteFrom.n5_code[3];
      v25 = v4->m_kGuildNameToJoin.n4_code[1];
      v34 = v23;
      v26 = (int)v4->m_pkGuildJoinReqDlg;
      v35 = v24;
      v27 = (int)v4->m_pkGuildAcademyMemJoinDlg;
      v36 = v25;
      v28 = v4->m_pkInviteFrom.n5_code[0];
      v37 = v26;
      v29 = v4->m_pkInviteFrom.n5_code[1];
      v38 = v27;
      v30 = v4->m_pkInviteFrom.n5_code[2];
      v39 = v28;
      v40 = v29;
      v41 = v30;
      v42 = 0;
      v32 = (int *)&pProto;
    }
    else
    {
      v15 = v4->m_pkInviteFrom.n5_code[4];
      v16 = v4->m_kGuildNameToJoin.n4_code[0];
      pProto = v4->m_pkInviteFrom.n5_code[3];
      v17 = v4->m_kGuildNameToJoin.n4_code[1];
      v34 = v15;
      v18 = (int)v4->m_pkGuildJoinReqDlg;
      v35 = v16;
      v19 = (int)v4->m_pkGuildAcademyMemJoinDlg;
      v36 = v17;
      v20 = v4->m_pkInviteFrom.n5_code[0];
      v37 = v18;
      v21 = v4->m_pkInviteFrom.n5_code[1];
      v38 = v19;
      v22 = v4->m_pkInviteFrom.n5_code[2];
      v39 = v20;
      v40 = v21;
      v41 = v22;
      v42 = 1;
      v32 = (int *)&pProto;
    }
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0x2Cu, v32, 37);
    goto LABEL_21;
  }
}

//----- (006B7FA0) --------------------------------------------------------
void __thiscall GuildMemberTask::Recv_NC_GUILD_MEMBER_JOIN_REQ(GuildMemberTask *this, PROTO_NC_GUILD_MEMBER_JOIN_REQ *pkProto)
{
  int v2; // ebx@1
  GuildMemberTask *v3; // edi@1
  MHDiceGameTask *v4; // ecx@2
  unsigned int v5; // eax@7
  unsigned int v6; // edx@7
  unsigned int v7; // eax@8
  unsigned int v8; // ecx@8
  unsigned int v9; // edx@8
  unsigned int v10; // eax@8
  unsigned int v11; // ecx@8
  unsigned int v12; // edx@8
  unsigned int v13; // eax@8
  unsigned int v14; // ecx@8
  unsigned int v15; // ecx@8
  char *v16; // eax@8
  char *v17; // eax@8
  MsgBox *v18; // eax@8
  NiPointer<MHDiceGameTask> result; // [sp+10h] [bp-5Ch]@2
  MHDiceGameTask *v20; // [sp+14h] [bp-58h]@3
  bool v21; // [sp+1Bh] [bp-51h]@2
  PROTO_NC_GUILD_MEMBER_JOIN_ACK kProto; // [sp+1Ch] [bp-50h]@7
  char acWhoSentRequest[21]; // [sp+30h] [bp-3Ch]@8
  char acGuildName[17]; // [sp+48h] [bp-24h]@8
  int v25; // [sp+68h] [bp-4h]@2

  v2 = 0;
  v3 = this;
  if ( byte_B4FF73 )
    goto LABEL_13;
  v4 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  v25 = 0;
  v21 = MHDiceGameTask::IsDicegamePlaying(v4);
  v25 = -1;
  if ( result.m_pObject )
  {
    v20 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v20 )
        ((void (__stdcall *)(signed int))v20->vfptr->__vecDelDtor)(1);
    }
  }
  if ( v21 )
  {
LABEL_13:
    v5 = pkProto->GuildName.n4_code[0];
    v6 = pkProto->GuildName.n4_code[2];
    kProto.GuildName.n4_code[1] = pkProto->GuildName.n4_code[1];
    kProto.GuildName.n4_code[0] = v5;
    *(_QWORD *)&kProto.GuildName.n4_code[2] = __PAIR__(pkProto->GuildName.n4_code[3], v6);
    kProto.JoinAck = 0;
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 0xCu, &kProto, 17);
  }
  else
  {
    v7 = pkProto->FromCharID.n5_code[1];
    v8 = pkProto->FromCharID.n5_code[2];
    *(_DWORD *)acWhoSentRequest = pkProto->FromCharID.n5_code[0];
    v9 = pkProto->FromCharID.n5_code[3];
    *(_DWORD *)&acWhoSentRequest[4] = v7;
    v10 = pkProto->FromCharID.n5_code[4];
    *(_DWORD *)&acWhoSentRequest[8] = v8;
    v11 = pkProto->GuildName.n4_code[1];
    *(_DWORD *)&acWhoSentRequest[12] = v9;
    v12 = pkProto->GuildName.n4_code[2];
    *(_DWORD *)&acWhoSentRequest[16] = v10;
    v13 = pkProto->GuildName.n4_code[0];
    *(_DWORD *)&acGuildName[4] = v11;
    v14 = pkProto->GuildName.n4_code[3];
    *(_DWORD *)&v3->m_Members[399].sIntro[53] = v13;
    *(_DWORD *)&acGuildName[8] = v12;
    *(_DWORD *)&v3->m_Members[399].sIntro[57] = pkProto->GuildName.n4_code[1];
    *(_DWORD *)acGuildName = v13;
    *(_DWORD *)&v3->m_Members[399].sIntro[61] = pkProto->GuildName.n4_code[2];
    *(_DWORD *)&acGuildName[12] = v14;
    v15 = pkProto->GuildName.n4_code[3];
    acWhoSentRequest[20] = 0;
    acGuildName[16] = 0;
    *(SHINE_GUILD_MEMBER_LOGON_INFO *)((char *)&v3->m_Members[399].dLogonInfo + 1) = (SHINE_GUILD_MEMBER_LOGON_INFO)v15;
    v16 = (char *)TextData::Get(0x210BFF34u);
    v17 = fs(v16, acWhoSentRequest, acGuildName);
    v18 = MsgBox::Modeless(MSGBOX_OKCANCEL, v17);
    *(_DWORD *)&v3->m_Members[399].sIntro[25] = v18;
    if ( v3 != (GuildMemberTask *)64 )
      v2 = (int)&v3[-1].m_Members[399].sMap.n3_code[1] + 2;
    v18->vfptr->SetMsgHooker(&v18->vfptr, v2);
  }
}
// B4FF73: using guessed type char byte_B4FF73;

//----- (006B8120) --------------------------------------------------------
void __stdcall GuildMemberTask::Recv_NC_GUILD_MEMBER_JOIN_ERR(PROTO_NC_GUILD_MEMBER_JOIN_ERR *pkProto)
{
  signed int v2; // eax@1
  unsigned int v3; // ecx@7
  char *v4; // eax@7
  char *v5; // eax@7
  PgFrameWork *v6; // eax@8
  GameFrameWork *v7; // esi@9
  NiUnsharedGeometryGroup *v8; // eax@9
  int v9; // eax@10
  char *v10; // eax@6
  unsigned int v11; // [sp-4h] [bp-20h]@8
  char acGuildName[17]; // [sp+4h] [bp-18h]@7

  v2 = pkProto->Error;
  if ( v2 <= 3294 )
  {
    if ( v2 != 3294 )
    {
      if ( v2 < 3288 )
        return;
      if ( v2 <= 3292 )
      {
        *(_QWORD *)acGuildName = *(_QWORD *)&pkProto->GuildName.n4_name[0];
        v3 = pkProto->GuildName.n4_code[3];
        *(_DWORD *)&acGuildName[8] = pkProto->GuildName.n4_code[2];
        *(_DWORD *)&acGuildName[12] = v3;
        acGuildName[16] = 0;
        v4 = (char *)TextData::Get(0x31824D8Eu);
        v5 = fs(v4, acGuildName);
        MsgBox::Modeless(MSGBOX_OK, v5);
        return;
      }
      if ( v2 != 3293 )
        return;
      v10 = (char *)TextData2::Get(0x821F67Au);
      goto LABEL_14;
    }
    v6 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v11 = -1227573459;
LABEL_9:
    v7 = (GameFrameWork *)v6;
    v8 = TextData2::Get(v11);
    GameFrameWork::AddSysMsg(v7, (const char *)v8);
    return;
  }
  v9 = v2 - 7121;
  if ( v9 )
  {
    if ( v9 != 2 )
      return;
    v6 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v11 = 140082800;
    goto LABEL_9;
  }
  v10 = (char *)TextData2::Get(0x718555DFu);
LABEL_14:
  MsgBox::Modeless(MSGBOX_OK, v10);
}

//----- (006B8240) --------------------------------------------------------
int __thiscall GuildMemberTask::Recv_NC_GUILD_MEMBER_VANISH_CMD(GuildMemberTask *this, PROTO_NC_GUILD_MEMBER_VANISH_CMD *pkProto)
{
  GuildMemberTask *v2; // ebx@1
  int result; // eax@1
  _BYTE v4[20]; // ST00_20@2
  CClientGuildAcademy *v5; // eax@2
  char *v6; // ST08_4@3
  Name5 *v7; // eax@4
  CClientGuild *v8; // eax@9
  char *v9; // eax@9
  int v10; // esi@9
  char *v11; // edi@9
  int v12; // esi@13
  char acMyGuildName[17]; // [sp+Ch] [bp-18h]@9

  v2 = this;
  result = CGuildMember::Recv_NC_GUILD_MEMBER_LEAVE_CMD(
             (CGuildMember *)this,
             (PROTO_NC_GUILD_MEMBER_LEAVE_CMD *)pkProto);
  if ( result )
  {
    *(_QWORD *)v4 = *(_QWORD *)&pkProto->CharID.n5_name[0];
    *(_QWORD *)&v4[8] = *(_QWORD *)&pkProto->CharID.n5_code[2];
    *(_DWORD *)&v4[16] = pkProto->CharID.n5_code[4];
    v5 = GuildAcademyTask::GetGuildAcademy();
    if ( (unsigned __int8)CClientGuildAcademy::IsGuildAcademyMaster(v5, *(Name5 *)v4) )
    {
      v6 = GuildAcademyTask::GetGuildAcademy()->m_GuildAcademy.sAcademyMasterName.n5_name;
      *((_DWORD *)v6 + 4) = 0;
      *((_DWORD *)v6 + 3) = 0;
      *((_DWORD *)v6 + 2) = 0;
      *((_DWORD *)v6 + 1) = 0;
      *(_DWORD *)v6 = 0;
      strncpy(v6, &byte_9BF144, 0x14u);
    }
    v7 = User::GetMainCharID(&g_kUser);
    if ( pkProto->CharID.n5_code[0] == v7->n5_code[0]
      && pkProto->CharID.n5_code[1] == v7->n5_code[1]
      && pkProto->CharID.n5_code[2] == v7->n5_code[2]
      && pkProto->CharID.n5_code[3] == v7->n5_code[3]
      && pkProto->CharID.n5_code[4] == v7->n5_code[4] )
    {
      GuildTask::GetGuild()->m_bIsGuild = 0;
      v8 = GuildTask::GetGuild();
      *(_DWORD *)acMyGuildName = v8->m_Guild.sName.n4_code[0];
      *(_DWORD *)&acMyGuildName[4] = v8->m_Guild.sName.n4_code[1];
      *(_DWORD *)&acMyGuildName[8] = v8->m_Guild.sName.n4_code[2];
      *(_DWORD *)&acMyGuildName[12] = v8->m_Guild.sName.n4_code[3];
      acMyGuildName[16] = 0;
      v9 = (char *)TextData::Get(0x89E6C3E3);
      v10 = (int)&v2[-1].m_Members[399].sMap.n3_code[1] + 2;
      v11 = fs(v9, acMyGuildName);
      if ( *(unsigned int *)((char *)&v2[-1].m_Members[399].sMap.n3_code[2] + 2) )
      {
        (*(void (__stdcall **)(signed int, char *, char *))(**(_DWORD **)(v10 + 4) + 4))(
          25,
          v11,
          (char *)&v2[-1].m_Members[399].sMap.n3_code[1] + 2);
        if ( *(_DWORD *)(v10 + 4) )
          (*(void (__stdcall **)(signed int, char *, char *))(**(_DWORD **)(v10 + 4) + 20))(
            25,
            v11,
            (char *)&v2[-1].m_Members[399].sMap.n3_code[1] + 2);
      }
      (*(void (__thiscall **)(char *, signed int, char *, char *))(*(_DWORD *)v10 + 20))(
        (char *)&v2[-1].m_Members[399].sMap.n3_code[1] + 2,
        25,
        v11,
        (char *)&v2[-1].m_Members[399].sMap.n3_code[1] + 2);
      LOWORD(v2->m_uiRefCount) = 0;
    }
    v12 = (int)&v2[-1].m_Members[399].sMap.n3_code[1] + 2;
    if ( *(unsigned int *)((char *)&v2[-1].m_Members[399].sMap.n3_code[2] + 2) )
    {
      (*(void (__stdcall **)(signed int, _DWORD, char *))(**(_DWORD **)(v12 + 4) + 4))(
        41,
        0,
        (char *)&v2[-1].m_Members[399].sMap.n3_code[1] + 2);
      if ( *(_DWORD *)(v12 + 4) )
        (*(void (__stdcall **)(signed int, _DWORD, char *))(**(_DWORD **)(v12 + 4) + 20))(
          41,
          0,
          (char *)&v2[-1].m_Members[399].sMap.n3_code[1] + 2);
    }
    (*(void (__thiscall **)(char *, signed int, _DWORD, char *))(*(_DWORD *)v12 + 20))(
      (char *)&v2[-1].m_Members[399].sMap.n3_code[1] + 2,
      41,
      0,
      (char *)&v2[-1].m_Members[399].sMap.n3_code[1] + 2);
    if ( *(_DWORD *)(v12 + 4) )
    {
      (*(void (__stdcall **)(signed int, _DWORD, char *))(**(_DWORD **)(v12 + 4) + 4))(
        71,
        0,
        (char *)&v2[-1].m_Members[399].sMap.n3_code[1] + 2);
      if ( *(_DWORD *)(v12 + 4) )
        (*(void (__stdcall **)(signed int, _DWORD, char *))(**(_DWORD **)(v12 + 4) + 20))(
          71,
          0,
          (char *)&v2[-1].m_Members[399].sMap.n3_code[1] + 2);
    }
    (*(void (__thiscall **)(char *, signed int, _DWORD, char *))(*(_DWORD *)v12 + 20))(
      (char *)&v2[-1].m_Members[399].sMap.n3_code[1] + 2,
      71,
      0,
      (char *)&v2[-1].m_Members[399].sMap.n3_code[1] + 2);
    result = 1;
  }
  return result;
}

//----- (006B8420) --------------------------------------------------------
void __thiscall GuildMemberTask::Recv_NC_GUILD_MEMBER_INVITE_ACK(GuildMemberTask *this, PROTO_NC_GUILD_MEMBER_INVITE_ACK *pkProto)
{
  char *v2; // esi@2
  NiUnsharedGeometryGroup *v3; // edi@2

  if ( pkProto->Error == 3287 )
  {
    v2 = &this[-1].m_Members[399].sMap.n3_name[6];
    v3 = TextData::Get(0xBBAFBBE5);
    if ( *((_DWORD *)v2 + 1) )
    {
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v2 + 1) + 4))(25, v3, v2);
      if ( *((_DWORD *)v2 + 1) )
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v2 + 1) + 20))(25, v3, v2);
    }
    (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v2 + 20))(v2, 25, v3, v2);
  }
}

//----- (006B8490) --------------------------------------------------------
int __thiscall GuildMemberTask::Recv_NC_GUILD_MEMBER_LOGON_CMD(GuildMemberTask *this, PROTO_NC_GUILD_MEMBER_LOGON_CMD *pkProto)
{
  int result; // eax@1
  char *v3; // eax@3
  unsigned int v4; // ecx@8
  unsigned int v5; // edx@8
  unsigned int v6; // eax@8
  unsigned int v7; // eax@8
  char *v8; // eax@8
  int v9; // esi@8
  char *v10; // edi@8
  GuildMemberTask *v11; // [sp+4h] [bp-20h]@1
  char acCharName[21]; // [sp+8h] [bp-1Ch]@3

  v11 = this;
  result = CGuildMember::Recv_NC_GUILD_MEMBER_LOGON_CMD((CGuildMember *)this, pkProto);
  if ( result )
  {
    if ( byte_B4FF8F )
    {
      v3 = (char *)((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)();
      *(_DWORD *)&acCharName[16] = 0;
      *(_DWORD *)&acCharName[12] = 0;
      *(_DWORD *)&acCharName[8] = 0;
      *(_DWORD *)&acCharName[4] = 0;
      *(_DWORD *)acCharName = 0;
      strncpy(acCharName, v3, 0x14u);
      if ( pkProto->CharID.n5_code[0] != *(_DWORD *)acCharName
        || pkProto->CharID.n5_code[1] != *(_DWORD *)&acCharName[4]
        || pkProto->CharID.n5_code[2] != *(_DWORD *)&acCharName[8]
        || pkProto->CharID.n5_code[3] != *(_DWORD *)&acCharName[12]
        || pkProto->CharID.n5_code[4] != *(_DWORD *)&acCharName[16] )
      {
        v4 = pkProto->CharID.n5_code[2];
        v5 = pkProto->CharID.n5_code[3];
        *(_DWORD *)acCharName = pkProto->CharID.n5_code[0];
        v6 = pkProto->CharID.n5_code[1];
        *(_DWORD *)&acCharName[8] = v4;
        *(_DWORD *)&acCharName[4] = v6;
        v7 = pkProto->CharID.n5_code[4];
        *(_DWORD *)&acCharName[12] = v5;
        *(_DWORD *)&acCharName[16] = v7;
        acCharName[20] = 0;
        v8 = (char *)TextData::Get(0x868973E4);
        v9 = (int)&v11[-1].m_Members[399].sMap.n3_code[1] + 2;
        v10 = fs(v8, acCharName);
        if ( *(unsigned int *)((char *)&v11[-1].m_Members[399].sMap.n3_code[2] + 2) )
        {
          (*(void (__stdcall **)(signed int, char *, char *))(**(_DWORD **)(v9 + 4) + 4))(
            25,
            v10,
            (char *)&v11[-1].m_Members[399].sMap.n3_code[1] + 2);
          if ( *(_DWORD *)(v9 + 4) )
            (*(void (__stdcall **)(signed int, char *, int))(**(_DWORD **)(v9 + 4) + 20))(25, v10, v9);
        }
        (*(void (__thiscall **)(int, signed int, char *, int))(*(_DWORD *)v9 + 20))(v9, 25, v10, v9);
      }
    }
    result = 1;
  }
  return result;
}
// B4FF8F: using guessed type char byte_B4FF8F;

//----- (006B85B0) --------------------------------------------------------
void __thiscall GuildMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_GUILD_INVITE_ACK(GuildMemberTask *this, PROTO_NC_GUILD_ACADEMY_MEMBER_GUILD_INVITE_ACK *pkProto)
{
  GuildMemberTask *v2; // esi@1
  int v3; // ecx@1
  NiUnsharedGeometryGroup *v4; // eax@3
  char *v5; // eax@10
  char *v6; // ebx@10
  int v7; // esi@17
  NiUnsharedGeometryGroup *v8; // edi@17
  char acname[21]; // [sp+4h] [bp-1Ch]@2

  v2 = this;
  v3 = pkProto->Error;
  if ( (_WORD)v3 != 6016 )
  {
    *(_QWORD *)acname = *(_QWORD *)&pkProto->sInviteTargetCharID.n5_name[0];
    *(_DWORD *)&acname[8] = pkProto->sInviteTargetCharID.n5_code[2];
    *(_QWORD *)&acname[12] = *(_QWORD *)&pkProto->sInviteTargetCharID.n5_code[3];
    acname[20] = 0;
    switch ( v3 )
    {
      case 6080:
        v4 = TextData::Get(0xB1DBBE52);
        goto LABEL_17;
      case 6081:
      case 6082:
      case 6087:
        v4 = TextData::Get(0x7DDDB5F7u);
        goto LABEL_17;
      case 6083:
        v4 = TextData::Get(0xBBAFBBE5);
        goto LABEL_17;
      case 6084:
        v4 = TextData::Get(0x80D5CBDB);
        goto LABEL_17;
      case 6085:
        v4 = TextData::Get(0xC4C9EA1F);
        goto LABEL_17;
      case 6086:
        v4 = TextData::Get(0x23542449u);
        goto LABEL_17;
      case 6088:
        v4 = TextData::Get(0x96E2E7DD);
        goto LABEL_17;
      case 6089:
        v5 = (char *)TextData::Get(0xBDBBBE16);
        v6 = fs(v5, acname);
        if ( v2->m_pkMsgHooker )
        {
          ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v2->m_pkMsgHooker->vfptr->SendDirectMessage)(
            25,
            v6,
            &v2->vfptr);
          if ( v2->m_pkMsgHooker )
            ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v2->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
              25,
              v6,
              &v2->vfptr);
        }
        v2->vfptr->DirectDispatchToParent((IDirectMessenger *)&v2->vfptr, 25, v6, (IDirectMessenger *)&v2->vfptr);
        goto $LN138_4;
      case 6090:
$LN138_4:
        v4 = TextData2::Get(0x55F0B0D4u);
        goto LABEL_17;
      case 6091:
        v4 = TextData2::Get(0x4CAC797Du);
        goto LABEL_17;
      case 6092:
        v4 = TextData2::Get(0xF68B4770);
LABEL_17:
        v7 = (int)&v2->vfptr;
        v8 = v4;
        if ( *(_DWORD *)(v7 + 4) )
        {
          (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v7 + 4) + 4))(25, v4, v7);
          if ( *(_DWORD *)(v7 + 4) )
            (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v7 + 4) + 20))(25, v8, v7);
        }
        (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v7 + 20))(v7, 25, v8, v7);
        break;
      default:
        return;
    }
  }
}

//----- (006B8770) --------------------------------------------------------
void __thiscall GuildMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_REQ(GuildMemberTask *this, PROTO_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_REQ *pkProto)
{
  GuildMemberTask *v2; // edi@1
  unsigned int v3; // eax@2
  unsigned int v4; // edx@2
  unsigned int v5; // eax@2
  MHDiceGameTask *v6; // ecx@3
  unsigned int v7; // eax@8
  unsigned int v8; // edx@8
  unsigned int v9; // eax@8
  unsigned int v10; // eax@9
  unsigned int v11; // ecx@9
  unsigned int v12; // edx@9
  unsigned int v13; // eax@9
  unsigned int v14; // ecx@9
  unsigned int v15; // edx@9
  unsigned int v16; // eax@9
  unsigned int v17; // ecx@9
  unsigned int v18; // eax@9
  char *v19; // eax@9
  char *v20; // eax@9
  MsgBox *v21; // eax@9
  MHDiceGameTask *v22; // [sp+10h] [bp-84h]@4
  NiPointer<MHDiceGameTask> result; // [sp+14h] [bp-80h]@3
  bool v24; // [sp+1Bh] [bp-79h]@3
  PROTO_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_ACK kProto; // [sp+1Ch] [bp-78h]@2
  unsigned int pProto; // [sp+44h] [bp-50h]@8
  unsigned int v27; // [sp+48h] [bp-4Ch]@8
  unsigned int v28; // [sp+4Ch] [bp-48h]@8
  unsigned int v29; // [sp+50h] [bp-44h]@8
  char v30; // [sp+54h] [bp-40h]@8
  char acWhoSentRequest[21]; // [sp+58h] [bp-3Ch]@9
  char acGuildName[17]; // [sp+70h] [bp-24h]@9
  int v33; // [sp+90h] [bp-4h]@3

  v2 = this;
  if ( byte_B4FF73 )
  {
    v3 = pkProto->GuildName.n4_code[0];
    v4 = pkProto->GuildName.n4_code[2];
    kProto.GuildName.n4_code[1] = pkProto->GuildName.n4_code[1];
    kProto.GuildName.n4_code[0] = v3;
    v5 = pkProto->GuildName.n4_code[3];
    *(_QWORD *)&kProto.sInviteSourceCharID.n5_code[3] = 0i64;
    *(_QWORD *)&kProto.sInviteSourceCharID.n5_code[1] = 0i64;
    kProto.sInviteSourceCharID.n5_code[0] = 0;
    *(_QWORD *)&kProto.GuildName.n4_code[2] = __PAIR__(v5, v4);
    kProto.JoinAck = 0;
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 0xCu, &kProto, 37);
  }
  else
  {
    v6 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
    v33 = 0;
    v24 = MHDiceGameTask::IsDicegamePlaying(v6);
    v33 = -1;
    if ( result.m_pObject )
    {
      v22 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v22 )
          ((void (__stdcall *)(signed int))v22->vfptr->__vecDelDtor)(1);
      }
    }
    if ( v24 )
    {
      v7 = pkProto->GuildName.n4_code[0];
      v8 = pkProto->GuildName.n4_code[2];
      v27 = pkProto->GuildName.n4_code[1];
      pProto = v7;
      v9 = pkProto->GuildName.n4_code[3];
      v28 = v8;
      v29 = v9;
      v30 = 0;
      NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 0xCu, &pProto, 17);
    }
    else
    {
      v10 = pkProto->sInviteSourceCharID.n5_code[1];
      v11 = pkProto->sInviteSourceCharID.n5_code[2];
      *(_DWORD *)acWhoSentRequest = pkProto->sInviteSourceCharID.n5_code[0];
      v12 = pkProto->sInviteSourceCharID.n5_code[3];
      *(_DWORD *)&acWhoSentRequest[4] = v10;
      v13 = pkProto->sInviteSourceCharID.n5_code[4];
      *(_DWORD *)&acWhoSentRequest[8] = v11;
      v14 = pkProto->GuildName.n4_code[1];
      *(_DWORD *)&acWhoSentRequest[12] = v12;
      v15 = pkProto->GuildName.n4_code[2];
      *(_DWORD *)&acWhoSentRequest[16] = v13;
      v16 = pkProto->GuildName.n4_code[0];
      *(_DWORD *)&acGuildName[4] = v14;
      v17 = pkProto->GuildName.n4_code[3];
      v2->m_kGuildNameToJoin.n4_code[0] = v16;
      *(_DWORD *)&acGuildName[8] = v15;
      v2->m_kGuildNameToJoin.n4_code[1] = pkProto->GuildName.n4_code[1];
      *(_DWORD *)acGuildName = v16;
      v2->m_kGuildNameToJoin.n4_code[2] = pkProto->GuildName.n4_code[2];
      *(_DWORD *)&acGuildName[12] = v17;
      v2->m_kGuildNameToJoin.n4_code[3] = pkProto->GuildName.n4_code[3];
      *(_QWORD *)&v2->m_pkInviteFrom.n5_name[0] = *(_QWORD *)&pkProto->sInviteSourceCharID.n5_name[0];
      *(_QWORD *)&v2->m_pkInviteFrom.n5_code[2] = *(_QWORD *)&pkProto->sInviteSourceCharID.n5_code[2];
      v18 = pkProto->sInviteSourceCharID.n5_code[4];
      acWhoSentRequest[20] = 0;
      acGuildName[16] = 0;
      v2->m_pkInviteFrom.n5_code[4] = v18;
      v19 = (char *)TextData::Get(0x210BFF34u);
      v20 = fs(v19, acWhoSentRequest, acGuildName);
      v21 = MsgBox::Modeless(MSGBOX_OKCANCEL, v20);
      v2->m_pkGuildAcademyMemJoinDlg = v21;
      ((void (__stdcall *)(IDirectMessengerVtbl **))v21->vfptr->SetMsgHooker)(&v2->vfptr);
    }
  }
}
// B4FF73: using guessed type char byte_B4FF73;

//----- (006B8960) --------------------------------------------------------
void __thiscall GuildMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_ERR(GuildMemberTask *this, PROTO_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_ERR *pkProto)
{
  unsigned int v2; // edx@1
  GuildMemberTask *v3; // esi@1
  unsigned int v4; // ecx@1
  unsigned int v5; // edx@1
  int v6; // eax@1
  char *v7; // eax@2
  NiUnsharedGeometryGroup *v8; // eax@3
  int v9; // esi@10
  NiUnsharedGeometryGroup *v10; // edi@10
  char *v11; // [sp-8h] [bp-24h]@2
  char acname[17]; // [sp+4h] [bp-18h]@1

  v2 = pkProto->GuildName.n4_code[1];
  v3 = this;
  *(_DWORD *)acname = pkProto->GuildName.n4_code[0];
  v4 = pkProto->GuildName.n4_code[2];
  *(_DWORD *)&acname[4] = v2;
  v5 = pkProto->GuildName.n4_code[3];
  v6 = pkProto->Error - 6096;
  *(_DWORD *)&acname[8] = v4;
  *(_DWORD *)&acname[12] = v5;
  acname[16] = 0;
  switch ( v6 )
  {
    case 0:
      v11 = acname;
      v7 = (char *)TextData::Get(0xBDBBBE16);
      goto LABEL_3;
    case 1:
      v11 = acname;
      v7 = (char *)TextData::Get(0x66C0CFEFu);
LABEL_3:
      v8 = (NiUnsharedGeometryGroup *)fs(v7, v11);
      goto LABEL_10;
    case 2:
    case 4:
      v8 = TextData::Get(0xC4C9EA1F);
      goto LABEL_10;
    case 3:
      v8 = TextData::Get(0x66C0CFEFu);
      goto LABEL_10;
    case 5:
      v8 = TextData2::Get(0x718555DFu);
      goto LABEL_10;
    case 6:
      v8 = TextData2::Get(0x8597E70u);
      goto LABEL_10;
    case 7:
      v8 = TextData2::Get(0x821F67Au);
LABEL_10:
      v9 = (int)&v3->vfptr;
      v10 = v8;
      if ( *(_DWORD *)(v9 + 4) )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v9 + 4) + 4))(25, v8, v9);
        if ( *(_DWORD *)(v9 + 4) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v9 + 4) + 20))(25, v10, v9);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v9 + 20))(v9, 25, v10, v9);
      break;
    default:
      return;
  }
}

//----- (006B8A80) --------------------------------------------------------
char __thiscall GuildMemberTask::OnProcessNetMsg(GuildMemberTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  GuildMemberTask *v5; // esi@1
  char result; // al@5
  int v7; // esi@16
  int v8; // esi@20
  int v9; // esi@25
  int v10; // esi@29
  int v11; // esi@34
  int v12; // esi@39
  int v13; // esi@43
  int v14; // esi@48
  int v15; // esi@53

  v5 = this;
  if ( iDepart == 4 )
    return 0;
  if ( iDepart != 29 )
  {
    if ( iDepart == 38 )
    {
      switch ( iCommand )
      {
        case 42:
          GuildMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_GUILD_INVITE_ACK(
            this,
            (PROTO_NC_GUILD_ACADEMY_MEMBER_GUILD_INVITE_ACK *)pvData);
          result = 1;
          break;
        case 43:
          GuildMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_REQ(
            this,
            (PROTO_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_REQ *)pvData);
          result = 1;
          break;
        case 46:
          GuildMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_CMD(
            this,
            (PROTO_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_CMD *)pvData);
          result = 1;
          break;
        case 45:
          GuildMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_ERR(
            this,
            (PROTO_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_ERR *)pvData);
          result = 1;
          break;
        default:
          return 0;
      }
      return result;
    }
    return 0;
  }
  switch ( iCommand )
  {
    case 10:
      this->vfptr->Recv_NC_GUILD_MEMBER_INVITE_ACK(&this->vfptr, pvData);
      result = 1;
      break;
    case 11:
      (*(void (__thiscall **)(_DWORD, _DWORD))&this->vfptr->gap4[0])(&this->vfptr, pvData);
      result = 1;
      break;
    case 15:
      (*(void (__thiscall **)(_DWORD, _DWORD))&this->vfptr->gap4[4])(&this->vfptr, pvData);
      result = 1;
      break;
    case 23:
      this->vfptr->Recv_NC_GUILD_MEMBER_GRADE_ACK(
        (CGuildMember *)&this->vfptr,
        (PROTO_NC_GUILD_MEMBER_GRADE_ACK *)pvData);
      result = 1;
      break;
    case 29:
      this->vfptr->Recv_NC_GUILD_MEMBER_LEAVE_ACK(
        (CGuildMember *)&this->vfptr,
        (PROTO_NC_GUILD_MEMBER_LEAVE_ACK *)pvData);
      result = 1;
      break;
    case 33:
      this->vfptr->Recv_NC_GUILD_MEMBER_INTRO_ACK(
        (CGuildMember *)&this->vfptr,
        (PROTO_NC_GUILD_MEMBER_INTRO_ACK *)pvData);
      result = 1;
      break;
    case 27:
      this->vfptr->Recv_NC_GUILD_MEMBER_LIST_ACK((CGuildMember *)&this->vfptr, (PROTO_NC_GUILD_MEMBER_LIST_ACK *)pvData);
      v7 = (int)&v5->vfptr;
      if ( *(_DWORD *)(v7 + 4) )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v7 + 4) + 4))(41, 0, v7);
        if ( *(_DWORD *)(v7 + 4) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v7 + 4) + 20))(41, 0, v7);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v7 + 20))(v7, 41, 0, v7);
      result = 1;
      break;
    case 54:
      this->vfptr->Recv_NC_GUILD_MEMBER_JOIN_CMD((CGuildMember *)&this->vfptr, (PROTO_NC_GUILD_MEMBER_JOIN_CMD *)pvData);
      v8 = (int)&v5->vfptr;
      if ( *(_DWORD *)(v8 + 4) )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v8 + 4) + 4))(41, 0, v8);
        if ( *(_DWORD *)(v8 + 4) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v8 + 4) + 20))(41, 0, v8);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v8 + 20))(v8, 41, 0, v8);
      result = 1;
      break;
    case 55:
      this->vfptr->Recv_NC_GUILD_MEMBER_VANISH_CMD(
        (CGuildMember *)&this->vfptr,
        (PROTO_NC_GUILD_MEMBER_VANISH_CMD *)pvData);
      result = 1;
      break;
    case 56:
      GuildMemberTask::On_Recv_NC_GUILD_MEMBER_LEAVE_CMD(this, (PROTO_NC_GUILD_MEMBER_LEAVE_CMD *)pvData);
      v9 = (int)&v5->vfptr;
      if ( *(_DWORD *)(v9 + 4) )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v9 + 4) + 4))(41, 0, v9);
        if ( *(_DWORD *)(v9 + 4) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v9 + 4) + 20))(41, 0, v9);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v9 + 20))(v9, 41, 0, v9);
      result = 1;
      break;
    case 57:
      this->vfptr->Recv_NC_GUILD_MEMBER_GRADE_CMD(
        (CGuildMember *)&this->vfptr,
        (PROTO_NC_GUILD_MEMBER_GRADE_CMD *)pvData);
      v10 = (int)&v5->vfptr;
      if ( *(_DWORD *)(v10 + 4) )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v10 + 4) + 4))(41, 0, v10);
        if ( *(_DWORD *)(v10 + 4) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v10 + 4) + 20))(41, 0, v10);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v10 + 20))(v10, 41, 0, v10);
      result = 1;
      break;
    case 58:
      this->vfptr->Recv_NC_GUILD_MEMBER_FLAGS_CMD(
        (CGuildMember *)&this->vfptr,
        (PROTO_NC_GUILD_MEMBER_FLAGS_CMD *)pvData);
      result = 1;
      break;
    case 59:
      this->vfptr->Recv_NC_GUILD_MEMBER_EXP_RATIO_CMD(
        (CGuildMember *)&this->vfptr,
        (PROTO_NC_GUILD_MEMBER_EXP_RATIO_CMD *)pvData);
      v11 = (int)&v5->vfptr;
      if ( *(_DWORD *)(v11 + 4) )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v11 + 4) + 4))(41, 0, v11);
        if ( *(_DWORD *)(v11 + 4) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v11 + 4) + 20))(41, 0, v11);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v11 + 20))(v11, 41, 0, v11);
      result = 1;
      break;
    case 60:
      this->vfptr->Recv_NC_GUILD_MEMBER_INTRO_CMD(
        (CGuildMember *)&this->vfptr,
        (PROTO_NC_GUILD_MEMBER_INTRO_CMD *)pvData);
      result = 1;
      break;
    case 61:
      this->vfptr->Recv_NC_GUILD_MEMBER_LOGON_CMD(
        (CGuildMember *)&this->vfptr,
        (PROTO_NC_GUILD_MEMBER_LOGON_CMD *)pvData);
      v12 = (int)&v5->vfptr;
      if ( *(_DWORD *)(v12 + 4) )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v12 + 4) + 4))(41, 0, v12);
        if ( *(_DWORD *)(v12 + 4) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v12 + 4) + 20))(41, 0, v12);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v12 + 20))(v12, 41, 0, v12);
      result = 1;
      break;
    case 62:
      this->vfptr->Recv_NC_GUILD_MEMBER_LOGOFF_CMD(
        (CGuildMember *)&this->vfptr,
        (PROTO_NC_GUILD_MEMBER_LOGOFF_CMD *)pvData);
      v13 = (int)&v5->vfptr;
      if ( *(_DWORD *)(v13 + 4) )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v13 + 4) + 4))(41, 0, v13);
        if ( *(_DWORD *)(v13 + 4) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v13 + 4) + 20))(41, 0, v13);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v13 + 20))(v13, 41, 0, v13);
      result = 1;
      break;
    case 63:
      this->vfptr->Recv_NC_GUILD_MEMBER_PARTY_CMD(
        (CGuildMember *)&this->vfptr,
        (PROTO_NC_GUILD_MEMBER_PARTY_CMD *)pvData);
      result = 1;
      break;
    case 64:
      this->vfptr->Recv_NC_GUILD_MEMBER_LEVEL_CMD(
        (CGuildMember *)&this->vfptr,
        (PROTO_NC_GUILD_MEMBER_LEVEL_CMD *)pvData);
      v14 = (int)&v5->vfptr;
      if ( *(_DWORD *)(v14 + 4) )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v14 + 4) + 4))(41, 0, v14);
        if ( *(_DWORD *)(v14 + 4) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v14 + 4) + 20))(41, 0, v14);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v14 + 20))(v14, 41, 0, v14);
      result = 1;
      break;
    case 65:
      this->vfptr->Recv_NC_GUILD_MEMBER_MAP_CMD((CGuildMember *)&this->vfptr, (PROTO_NC_GUILD_MEMBER_MAP_CMD *)pvData);
      result = 1;
      break;
    case 66:
      this->vfptr->Recv_NC_GUILD_MEMBER_CLASS_CMD(
        (CGuildMember *)&this->vfptr,
        (PROTO_NC_GUILD_MEMBER_CLASS_CMD *)pvData);
      v15 = (int)&v5->vfptr;
      if ( *(_DWORD *)(v15 + 4) )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v15 + 4) + 4))(41, 0, v15);
        if ( *(_DWORD *)(v15 + 4) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v15 + 4) + 20))(41, 0, v15);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v15 + 20))(v15, 41, 0, v15);
      result = 1;
      break;
    case 13:
      GuildMemberTask::Recv_NC_GUILD_MEMBER_JOIN_ERR((PROTO_NC_GUILD_MEMBER_JOIN_ERR *)pvData);
      result = 1;
      break;
    default:
      return 0;
  }
  return result;
}

//----- (006B8FA0) --------------------------------------------------------
void __thiscall GuildMemberTask::GuildMemberTask(GuildMemberTask *this)
{
  GuildMemberTask *v1; // esi@1
  void (__thiscall ***v2)(_DWORD, _DWORD); // ebx@3

  v1 = this;
  ITask::ITask((ITask *)&this->vfptr, 0);
  CGuildMember::CGuildMember((CGuildMember *)&v1->vfptr);
  v1->vfptr = (CGuildMemberVtbl *)CClientGuildMember::`vftable';
  v1->vfptr = (NiRefObjectVtbl *)&GuildMemberTask::`vftable'{for `NiRefObject'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildMemberTask::`vftable'{for `IDirectMessenger'};
  v1->vfptr = (CGuildMemberVtbl *)&GuildMemberTask::`vftable';
  v1->m_pkInviteFrom.n5_code[4] = 0;
  v1->m_pkInviteFrom.n5_code[3] = 0;
  v1->m_pkInviteFrom.n5_code[2] = 0;
  v1->m_pkInviteFrom.n5_code[1] = 0;
  v1->m_pkInviteFrom.n5_code[0] = 0;
  v1->m_kGuildNameToJoin.n4_code[3] = 0;
  v1->m_kGuildNameToJoin.n4_code[2] = 0;
  v1->m_kGuildNameToJoin.n4_code[1] = 0;
  v1->m_kGuildNameToJoin.n4_code[0] = 0;
  if ( (GuildMemberTask *)GuildMemberTask::ms_spGuildMemberTask != v1 )
  {
    if ( GuildMemberTask::ms_spGuildMemberTask )
    {
      v2 = (void (__thiscall ***)(_DWORD, _DWORD))GuildMemberTask::ms_spGuildMemberTask;
      if ( !InterlockedDecrement((volatile LONG *)(GuildMemberTask::ms_spGuildMemberTask + 4)) )
      {
        if ( v2 )
          (**v2)(v2, 1);
      }
    }
    GuildMemberTask::ms_spGuildMemberTask = (int)v1;
    InterlockedIncrement((volatile LONG *)&v1->m_uiRefCount);
  }
  v1->m_pkGuildJoinReqDlg = 0;
}
// 9BF14C: using guessed type int (__stdcall *CClientGuildMember::`vftable'[6])(int);
// 9BF1A4: using guessed type void (__thiscall *GuildMemberTask::`vftable')(GuildMemberTask *this, struct PROTO_NC_GUILD_MEMBER_INVITE_ACK *);
// 9BF1FC: using guessed type void (__thiscall *GuildMemberTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9BF218: using guessed type int (__thiscall *GuildMemberTask::`vftable'{for `NiRefObject'})(void *p, char);
// B5C0C8: using guessed type int GuildMemberTask::ms_spGuildMemberTask;

//----- (006B90A0) --------------------------------------------------------
GuildMemberTask *__thiscall GuildMemberTask::`scalar deleting destructor'(GuildMemberTask *this, unsigned int a2)
{
  GuildMemberTask *v2; // esi@1

  v2 = this;
  CGuildMember::~CGuildMember((CGuildMember *)&this->vfptr);
  ITask::~ITask((ITask *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006B9110) --------------------------------------------------------
void __thiscall GuildTournamentEnemyInfo::~GuildTournamentEnemyInfo(GuildTournamentEnemyInfo *this)
{
  this->GuildRegNo = 0;
  *(_DWORD *)&this->acGuildName[0] = 0;
  *(_DWORD *)&this->acGuildName[4] = 0;
  *(_DWORD *)&this->acGuildName[8] = 0;
  *(_DWORD *)&this->acGuildName[12] = 0;
  *(_DWORD *)&this->acGuildName[16] = 0;
  *(_DWORD *)&this->acGuildName[20] = 0;
  *(_DWORD *)&this->acGuildName[24] = 0;
  *(_DWORD *)&this->acGuildName[28] = 0;
  this->uiStatus = 1;
}

//----- (006B9140) --------------------------------------------------------
BOOL __thiscall CClientGuild::AmIGuildMember(CClientGuild *this)
{
  return this->m_bIsGuild != 0;
}

//----- (006B9150) --------------------------------------------------------
bool __thiscall CClientGuild::AmIGuildMaster(CClientGuild *this)
{
  Name5 *v1; // ST00_4@2
  CClientGuildMember *v2; // eax@2
  GUILD_MEMBER_CLIENT *v3; // eax@2
  bool result; // al@3

  if ( this->m_bIsGuild
    && (v1 = User::GetMainCharID(&g_kUser),
        v2 = GuildMemberTask::GetGuildMember(),
        (v3 = CGuildMember::Get((CGuildMember *)&v2->vfptr, v1)) != 0) )
  {
    result = v3->nGrade == 0;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006B9180) --------------------------------------------------------
bool __thiscall CClientGuild::CanIVanishMember(CClientGuild *this)
{
  Name5 *v1; // ST00_4@2
  CClientGuildMember *v2; // eax@2
  GUILD_MEMBER_CLIENT *v3; // eax@2
  int v4; // eax@3

  if ( this->m_bIsGuild
    && (v1 = User::GetMainCharID(&g_kUser),
        v2 = GuildMemberTask::GetGuildMember(),
        (v3 = CGuildMember::Get((CGuildMember *)&v2->vfptr, v1)) != 0) )
  {
    v4 = CGuild::IsSetVanish(v3) == 0;
  }
  else
  {
    LOBYTE(v4) = 0;
  }
  return v4;
}

//----- (006B91C0) --------------------------------------------------------
bool __thiscall CClientGuild::CanIAppoint(CClientGuild *this)
{
  Name5 *v1; // ST00_4@2
  CClientGuildMember *v2; // eax@2
  GUILD_MEMBER_CLIENT *v3; // eax@2
  int v4; // eax@3

  if ( this->m_bIsGuild
    && (v1 = User::GetMainCharID(&g_kUser),
        v2 = GuildMemberTask::GetGuildMember(),
        (v3 = CGuildMember::Get((CGuildMember *)&v2->vfptr, v1)) != 0) )
  {
    v4 = CGuild::IsSetMemberGrade(v3) == 0;
  }
  else
  {
    LOBYTE(v4) = 0;
  }
  return v4;
}

//----- (006B9200) --------------------------------------------------------
bool __thiscall CClientGuild::CanIInvite(CClientGuild *this)
{
  Name5 *v1; // ST00_4@2
  CClientGuildMember *v2; // eax@2
  GUILD_MEMBER_CLIENT *v3; // eax@2
  int v4; // eax@3

  if ( this->m_bIsGuild
    && (v1 = User::GetMainCharID(&g_kUser),
        v2 = GuildMemberTask::GetGuildMember(),
        (v3 = CGuildMember::Get((CGuildMember *)&v2->vfptr, v1)) != 0) )
  {
    v4 = CGuild::IsSetInvite(v3) == 0;
  }
  else
  {
    LOBYTE(v4) = 0;
  }
  return v4;
}

//----- (006B9240) --------------------------------------------------------
bool __thiscall CClientGuild::CanIWriteNotice(CClientGuild *this)
{
  Name5 *v1; // ST00_4@2
  CClientGuildMember *v2; // eax@2
  GUILD_MEMBER_CLIENT *v3; // eax@2
  int v4; // eax@3

  if ( this->m_bIsGuild
    && (v1 = User::GetMainCharID(&g_kUser),
        v2 = GuildMemberTask::GetGuildMember(),
        (v3 = CGuildMember::Get((CGuildMember *)&v2->vfptr, v1)) != 0) )
  {
    v4 = CGuild::IsSetNotify(v3) == 0;
  }
  else
  {
    LOBYTE(v4) = 0;
  }
  return v4;
}

//----- (006B9280) --------------------------------------------------------
bool __thiscall CClientGuild::CanIDismissGuild(CClientGuild *this)
{
  Name5 *v1; // ST00_4@2
  CClientGuildMember *v2; // eax@2
  GUILD_MEMBER_CLIENT *v3; // eax@2
  int v4; // eax@3

  if ( this->m_bIsGuild
    && (v1 = User::GetMainCharID(&g_kUser),
        v2 = GuildMemberTask::GetGuildMember(),
        (v3 = CGuildMember::Get((CGuildMember *)&v2->vfptr, v1)) != 0) )
  {
    v4 = CGuild::IsSetDismiss(v3) == 0;
  }
  else
  {
    LOBYTE(v4) = 0;
  }
  return v4;
}

//----- (006B92C0) --------------------------------------------------------
bool __thiscall CClientGuild::CanIApplyGuildWar(CClientGuild *this)
{
  Name5 *v1; // ST00_4@2
  CClientGuildMember *v2; // eax@2
  GUILD_MEMBER_CLIENT *v3; // eax@2
  int v4; // eax@3

  if ( this->m_bIsGuild
    && (v1 = User::GetMainCharID(&g_kUser),
        v2 = GuildMemberTask::GetGuildMember(),
        (v3 = CGuildMember::Get((CGuildMember *)&v2->vfptr, v1)) != 0) )
  {
    v4 = CGuild::IsSetWar(v3) == 0;
  }
  else
  {
    LOBYTE(v4) = 0;
  }
  return v4;
}

//----- (006B9300) --------------------------------------------------------
bool __thiscall CClientGuild::CanIUseStorage(CClientGuild *this)
{
  Name5 *v1; // ST00_4@2
  CClientGuildMember *v2; // eax@2
  GUILD_MEMBER_CLIENT *v3; // eax@2
  bool result; // al@3

  if ( this->m_bIsGuild
    && (v1 = User::GetMainCharID(&g_kUser),
        v2 = GuildMemberTask::GetGuildMember(),
        (v3 = CGuildMember::Get((CGuildMember *)&v2->vfptr, v1)) != 0) )
  {
    result = CGuild::IsUseStorage(v3);
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006B9340) --------------------------------------------------------
bool __thiscall CClientGuild::CanIForbidChat(CClientGuild *this)
{
  Name5 *v1; // ST00_4@2
  CClientGuildMember *v2; // eax@2
  GUILD_MEMBER_CLIENT *v3; // eax@2
  bool result; // al@3

  if ( this->m_bIsGuild
    && (v1 = User::GetMainCharID(&g_kUser),
        v2 = GuildMemberTask::GetGuildMember(),
        (v3 = CGuildMember::Get((CGuildMember *)&v2->vfptr, v1)) != 0) )
  {
    result = v3->nGrade < 4u;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006B9370) --------------------------------------------------------
char __thiscall CClientGuild::IsEnemyGuild(CClientGuild *this, unsigned int regnum)
{
  CGuildWar::GUILD_WAR_LIST *v2; // eax@1
  char result; // al@4

  v2 = this->m_GuildWar.m_pGuildWarListTop;
  if ( v2 )
  {
    while ( v2->WarInfo.nNo != regnum )
    {
      v2 = v2->pLinkDn;
      if ( !v2 )
        goto LABEL_4;
    }
    result = 1;
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}

//----- (006B93A0) --------------------------------------------------------
char __thiscall CClientGuild::IsAttackableEnemyGuild(CClientGuild *this, unsigned int regnum)
{
  CGuildWar::GUILD_WAR_LIST *v2; // eax@1
  char result; // al@5

  v2 = this->m_GuildWar.m_pGuildWarListTop;
  if ( v2 )
  {
    while ( v2->WarInfo.nNo != regnum || v2->WarInfo.nWarStatus != 2 )
    {
      v2 = v2->pLinkDn;
      if ( !v2 )
        goto LABEL_5;
    }
    result = 1;
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (006B9410) --------------------------------------------------------
char __thiscall CClientGuild::IsWarEngaging(CClientGuild *this)
{
  CGuildWar::GUILD_WAR_LIST *v1; // eax@2
  char result; // al@5

  if ( this->m_GuildWar.m_NumOfWarList && (v1 = this->m_GuildWar.m_pGuildWarListTop) != 0 )
  {
    while ( v1->WarInfo.nWarStatus != 2 )
    {
      v1 = v1->pLinkDn;
      if ( !v1 )
        goto LABEL_5;
    }
    result = 1;
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (006B9440) --------------------------------------------------------
bool __thiscall CClientGuild::IsGttEnemyGuild(CClientGuild *this, unsigned int regnum)
{
  return regnum == this->m_GttEnemyInfo.GuildRegNo;
}

//----- (006B9460) --------------------------------------------------------
bool __thiscall CClientGuild::IsGttAttackableEnemyGuild(CClientGuild *this, unsigned int regnum)
{
  return this->m_GttEnemyInfo.GuildRegNo == regnum && this->m_GttEnemyInfo.uiStatus == 2;
}

//----- (006B9490) --------------------------------------------------------
bool __thiscall CClientGuild::IsGttEngaging(CClientGuild *this)
{
  return this->m_GttEnemyInfo.uiStatus == 2;
}

//----- (006B94A0) --------------------------------------------------------
void __thiscall CClientGuild::ReqHistoryList(CClientGuild *this)
{
  CClientGuild *v1; // esi@1
  Name5 *v2; // ST0C_4@2
  CClientGuildMember *v3; // eax@2
  GUILD_MEMBER_CLIENT *v4; // eax@2

  v1 = this;
  if ( this->m_bIsGuild )
  {
    if ( (v2 = User::GetMainCharID(&g_kUser),
          v3 = GuildMemberTask::GetGuildMember(),
          (v4 = CGuildMember::Get((CGuildMember *)&v3->vfptr, v2)) != 0)
      && !v4->nGrade
      || v1->m_bIsGuild )
    {
      NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 0xFDu, 0, 0);
    }
  }
}

//----- (006B94F0) --------------------------------------------------------
BOOL __thiscall GuildTask::Recv_NC_GUILD_WAR_START_CMD(GuildTask *this, PROTO_NC_GUILD_WAR_START_CMD *pCmd)
{
  return CGuild::Recv_NC_GUILD_WAR_START_CMD((CGuild *)this, pCmd) != 0;
}

//----- (006B9510) --------------------------------------------------------
BOOL __thiscall GuildTask::Recv_NC_GUILD_WAR_END_CMD(GuildTask *this, PROTO_NC_GUILD_WAR_END_CMD *pCmd)
{
  return CGuild::Recv_NC_GUILD_WAR_END_CMD((CGuild *)this, pCmd) != 0;
}

//----- (006B9530) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_WAR_COOLDOWN_DONE_CMD(GuildTask *this, PROTO_NC_GUILD_WAR_COOLDOWN_DONE_CMD *pCmd)
{
  GuildTask *v2; // esi@1
  int result; // eax@1

  v2 = this;
  result = CGuild::Recv_NC_GUILD_WAR_COOLDOWN_DONE_CMD((CGuild *)this, pCmd);
  if ( result )
  {
    CGuildWar::Del((CGuildWar *)&v2->m_Guild.sNotify[449], (unsigned int)v2->m_pkMsgHooker);
    result = 1;
  }
  return result;
}

//----- (006B9570) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_TYPE_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_TYPE_CMD *pkCmd)
{
  char v2; // al@1
  GuildTask *v3; // esi@1
  unsigned int v4; // edi@2

  v2 = pkCmd->nMatchType;
  v3 = this;
  if ( pkCmd->nMatchType != 11 )
  {
    v4 = (unsigned __int8)v2;
    if ( v2 == 1 )
      CGuildTournament::Clear(&this->m_GuildTournament);
    GuildTournamentScheduleWin::SetGuildTournamentMatchType(v3->m_pkGuildTournamentScheduleWin, v4);
  }
  return 0;
}

//----- (006B95B0) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_GRADE_CMD(GuildTask *this, PROTO_NC_GUILD_GRADE_CMD *pCmd)
{
  BYTE1(this->m_kChildTaskList.m_pkTail) = (PROTO_NC_GUILD_GRADE_CMD)pCmd->Grade;
  return 1;
}

//----- (006B95D0) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_SKILLPOINT_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_SKILLPOINT_CMD *pkCmd)
{
  GuildTask *v2; // esi@1

  v2 = this;
  if ( pkCmd )
  {
    if ( this->m_pkGTTMiniSkillWin && !(unsigned __int8)((int (*)(void))this->m_pkGTTSkillWin->vfptr[65].__vecDelDtor)() )
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkGTTMiniSkillWin->vfptr);
    GTTSkillWin::SetSkillPoint(v2->m_pkGTTSkillWin, pkCmd->wSkillPoint);
    GTTMiniSkillWin::SetSkillPoint(v2->m_pkGTTMiniSkillWin, pkCmd->wSkillPoint);
  }
  return 0;
}

//----- (006B9640) --------------------------------------------------------
int __userpurge GuildTask::Recv_NC_GUILD_TOURNAMENT_SCORE_CMD@<eax>(GuildTask *this@<ecx>, int a2@<ebx>, PROTO_NC_GUILD_TOURNAMENT_SCORE_CMD *pkCmd)
{
  PROTO_NC_GUILD_TOURNAMENT_SCORE_CMD *v3; // esi@1
  GuildTask *v4; // edi@1
  int v5; // ebx@3
  unsigned int v7; // eax@9
  unsigned int v8; // ebx@11
  PROTO_NC_GUILD_TOURNAMENT_SCORE_CMD *pkCmda; // [sp+10h] [bp+8h]@4
  PROTO_NC_GUILD_TOURNAMENT_SCORE_CMD *pkCmdb; // [sp+10h] [bp+8h]@12

  v3 = pkCmd;
  v4 = this;
  if ( pkCmd )
  {
    if ( pkCmd->PartMask == 1 )
    {
      GTStatusMiniWin::Clear(this->m_pkGTStatusMiniWin);
      GTStatusWin::Clear(v4->m_pkGTStatusWin);
      v5 = 0;
      if ( (signed int)pkCmd->unPlayerNum > 0 )
      {
        pkCmda = pkCmd + 1;
        do
        {
          GTStatusMiniWin::SetGTStatus(v4->m_pkGTStatusMiniWin, v5, v3);
          GTStatusWin::SetRankInfo(v4->m_pkGTStatusWin, (TOURNAMENT_PLAYER_SCORE *)pkCmda, v3->regNumber);
          GTStatusWin::SetGuildInfo(v4->m_pkGTStatusWin, v5, v3->regNumber, v3->unAllScore);
          pkCmda = (PROTO_NC_GUILD_TOURNAMENT_SCORE_CMD *)((char *)pkCmda + 44);
          ++v5;
        }
        while ( v5 < (signed int)v3->unPlayerNum );
      }
      if ( !(unsigned __int8)((int (*)(void))v4->m_pkGTStatusWin->vfptr[65].__vecDelDtor)() )
      {
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkGTStatusMiniWin->vfptr);
        return 0;
      }
    }
    else if ( !pkCmd->PartMask )
    {
      v7 = pkCmd->unPlayerNum;
      if ( v7 )
      {
        v8 = 0;
        if ( v7 )
        {
          pkCmdb = pkCmd + 1;
          do
          {
            GTStatusMiniWin::SetGTStatus(v4->m_pkGTStatusMiniWin, v8, v3);
            GTStatusWin::SetRankInfo(v4->m_pkGTStatusWin, (TOURNAMENT_PLAYER_SCORE *)pkCmdb, v3->regNumber);
            GTStatusWin::SetGuildInfo(v4->m_pkGTStatusWin, v8, v3->regNumber, v3->unAllScore);
            pkCmdb = (PROTO_NC_GUILD_TOURNAMENT_SCORE_CMD *)((char *)pkCmdb + 44);
            ++v8;
          }
          while ( v8 < v3->unPlayerNum );
        }
      }
      else
      {
        GTStatusMiniWin::SetGTStatus(this->m_pkGTStatusMiniWin, a2, pkCmd);
        GTStatusWin::SetGuildInfo(v4->m_pkGTStatusWin, a2, pkCmd->regNumber, pkCmd->unAllScore);
      }
      if ( !(unsigned __int8)((int (*)(void))v4->m_pkGTStatusWin->vfptr[65].__vecDelDtor)() )
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkGTStatusMiniWin->vfptr);
    }
  }
  return 0;
}

//----- (006B97A0) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_DICEGAME_END_TIME(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_DICEGAME_BEFORE_END_TIME_MSG_CMD *pkTime)
{
  if ( pkTime && pkTime->unEndTime == 5 )
    GTTDiceWin::SetCount(this->m_pkGTTDiceWin, 1);
  return 0;
}

//----- (006B97D0) --------------------------------------------------------
void __thiscall GuildTournamentImprove::Init(GuildTournamentImprove *this)
{
  this->m_uiGTTType = -1;
  this->m_DiceInfo.AGuild = 0;
  this->m_DiceInfo.AGuildDelegate = -1;
  this->m_GTTScore.AGuild = 0;
  this->m_GTTScore.AGuildScore = 0;
  this->m_DiceInfo.BGuild = 0;
  this->m_DiceInfo.BGuildDelegate = -1;
  this->m_GTTScore.BGuild = 0;
  this->m_GTTScore.BGuildScore = 0;
  this->m_RedTeam = 0;
  this->m_BlueTeam = 0;
}

//----- (006B9800) --------------------------------------------------------
char *__thiscall CClientGuild::FindGttEnemyInfo(CClientGuild *this, unsigned int RegNo)
{
  CClientGuild *v2; // esi@1
  unsigned int v3; // ecx@1
  char *result; // eax@1
  unsigned int *v5; // edx@2
  int v6; // ecx@6
  unsigned int v7; // edx@6
  int v8; // ecx@6
  int v9; // edx@6
  char acGuildName[17]; // [sp+8h] [bp-18h]@6

  v2 = this;
  v3 = 0;
  result = v2->m_acGuildName;
  *(_DWORD *)result = 0;
  *((_DWORD *)result + 1) = 0;
  *((_DWORD *)result + 2) = 0;
  *((_DWORD *)result + 3) = 0;
  *((_DWORD *)result + 4) = 0;
  *((_DWORD *)result + 5) = 0;
  *((_DWORD *)result + 6) = 0;
  *((_DWORD *)result + 7) = 0;
  if ( RegNo )
  {
    v5 = &v2->m_GuildTournament.m_TournamentList[0].nGuildNo;
    while ( *v5 != RegNo )
    {
      ++v3;
      v5 = (unsigned int *)((char *)v5 + 21);
      if ( v3 >= 0x1F )
        goto LABEL_5;
    }
    v6 = v3;
    v7 = v2->m_GuildTournament.m_TournamentList[v6].sGuildName.n4_code[0];
    v8 = (int)&v2->m_GuildTournament.m_TournamentList[v6].sGuildName;
    *(_DWORD *)acGuildName = v7;
    *(_DWORD *)&acGuildName[4] = *(_DWORD *)(v8 + 4);
    v9 = *(_DWORD *)(v8 + 8);
    *(_DWORD *)&acGuildName[12] = *(_DWORD *)(v8 + 12);
    *(_DWORD *)&acGuildName[8] = v9;
    acGuildName[16] = 0;
    strcpy(result, acGuildName);
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (006B98B0) --------------------------------------------------------
void __cdecl GuildTask::SetListRefreshEnable(bool bEnable)
{
  if ( GuildTask::ms_spGuildTask )
    *(_BYTE *)(GuildTask::ms_spGuildTask + 3008) = bEnable;
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006B98D0) --------------------------------------------------------
double __cdecl GuildTask::GetPassedTimeSinceRefresh()
{
  float v0; // ST00_4@2
  double result; // st7@2

  if ( GuildTask::ms_spGuildTask )
  {
    v0 = Timer::ms_fCurTime - *(float *)(GuildTask::ms_spGuildTask + 3004);
    result = v0;
  }
  else
  {
    result = 0.0;
  }
  return result;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006B9900) --------------------------------------------------------
void __cdecl GuildTask::Terminate()
{
  void (__thiscall ***v0)(_DWORD, _DWORD); // esi@1

  v0 = (void (__thiscall ***)(_DWORD, _DWORD))GuildTask::ms_spGuildTask;
  if ( GuildTask::ms_spGuildTask )
  {
    if ( !InterlockedDecrement((volatile LONG *)(GuildTask::ms_spGuildTask + 4)) )
    {
      if ( v0 )
        (**v0)(v0, 1);
    }
    GuildTask::ms_spGuildTask = 0;
  }
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006B9940) --------------------------------------------------------
CClientGuild *__cdecl GuildTask::GetGuild()
{
  CClientGuild *result; // eax@2

  if ( GuildTask::ms_spGuildTask )
    result = (CClientGuild *)(GuildTask::ms_spGuildTask + 64);
  else
    result = 0;
  return result;
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006B9950) --------------------------------------------------------
GuildNpcMenuWin *__cdecl GuildTask::GetGuildNpcMenuWin()
{
  return *(GuildNpcMenuWin **)(GuildTask::ms_spGuildTask + 2844);
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006B9960) --------------------------------------------------------
GuildMasterMenuWin *__cdecl GuildTask::GetGuildMasterMenuWin()
{
  return GuildMenuWin::GetMasterMenuWin(*(GuildMenuWin **)(GuildTask::ms_spGuildTask + 2848));
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006B9970) --------------------------------------------------------
GuildTournamentBaseWin *__cdecl GuildTask::GetGuildTournamnetBaseWin()
{
  GuildTournamentBaseWin *result; // eax@2

  if ( GuildTask::ms_spGuildTask )
    result = *(GuildTournamentBaseWin **)(GuildTask::ms_spGuildTask + 2856);
  else
    result = 0;
  return result;
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006B9990) --------------------------------------------------------
GuildTournamentScheduleWin *__cdecl GuildTask::GetGuildTournamentScheduleWin()
{
  return *(GuildTournamentScheduleWin **)(GuildTask::ms_spGuildTask + 2860);
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006B99A0) --------------------------------------------------------
GuildMenuWin *__cdecl GuildTask::GetGuildMenu()
{
  return *(GuildMenuWin **)(GuildTask::ms_spGuildTask + 2848);
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006B99B0) --------------------------------------------------------
GuildSelectWin *__cdecl GuildTask::GetGuildSelectWin()
{
  return *(GuildSelectWin **)(GuildTask::ms_spGuildTask + 2852);
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006B99C0) --------------------------------------------------------
GuildTournamentStorageWin *__cdecl GuildTask::GetGuildTournamentStorageWin()
{
  return *(GuildTournamentStorageWin **)(GuildTask::ms_spGuildTask + 2864);
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006B99D0) --------------------------------------------------------
void __cdecl GuildTask::SetListReq(bool b)
{
  *(_BYTE *)(GuildTask::ms_spGuildTask + 3009) = b;
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006B99F0) --------------------------------------------------------
GTTDiceWin *__cdecl GuildTask::GetGTTDiceWin()
{
  return *(GTTDiceWin **)(GuildTask::ms_spGuildTask + 2868);
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006B9A00) --------------------------------------------------------
GTTSkillWin *__cdecl GuildTask::GetGTTSkillWin()
{
  return *(GTTSkillWin **)(GuildTask::ms_spGuildTask + 2872);
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006B9A10) --------------------------------------------------------
GTTMiniSkillWin *__cdecl GuildTask::GetGTTMiniSkillWin()
{
  return *(GTTMiniSkillWin **)(GuildTask::ms_spGuildTask + 2876);
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006B9A20) --------------------------------------------------------
GuildTournamentImprove *__cdecl GuildTask::GetGuildTournamentImprove()
{
  return (GuildTournamentImprove *)(GuildTask::ms_spGuildTask + 2888);
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006B9A30) --------------------------------------------------------
GTIFlagWin *__cdecl GuildTask::GetGTIMyFlagWin()
{
  GTIFlagWin *result; // eax@2

  if ( !GuildTask::ms_spGuildTask || (result = *(GTIFlagWin **)(GuildTask::ms_spGuildTask + 2988)) == 0 )
    result = 0;
  return result;
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006B9A50) --------------------------------------------------------
GTIFlagWin *__cdecl GuildTask::GetGTIEnemyFlagWin()
{
  GTIFlagWin *result; // eax@2

  if ( !GuildTask::ms_spGuildTask || (result = *(GTIFlagWin **)(GuildTask::ms_spGuildTask + 2992)) == 0 )
    result = 0;
  return result;
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006B9A70) --------------------------------------------------------
void __thiscall GuildTask::OnStart(GuildTask *this)
{
  GuildTask *v1; // esi@1
  GuildNpcMenuWin *v2; // eax@1
  GuildTournamentStorageWin *v3; // eax@1
  IDirectMessengerVtbl **v4; // ecx@1
  GameFrameWork *v5; // eax@1
  GameFrameWork *v6; // ebx@1
  const char *v7; // eax@5
  NiObjectNET *v8; // eax@5
  NiNode *v9; // ebx@5
  const char *v10; // eax@15
  NiObjectNET *v11; // eax@15
  NiNode *v12; // ebx@15
  const char *v13; // eax@25
  NiObjectNET *v14; // eax@25
  NiNode *v15; // ebx@25
  GuildMenuWin *v16; // eax@33
  GuildSelectWin *v17; // eax@33
  GuildMemberTask *v18; // eax@33
  ITask *v19; // eax@34
  NiObjectNET *v20; // [sp+10h] [bp-10h]@5
  NiObjectNET *v21; // [sp+10h] [bp-10h]@15
  NiObjectNET *v22; // [sp+10h] [bp-10h]@25

  v1 = this;
  v2 = GuildNpcMenuWin::CreateWin(0);
  v1->m_pkGuildNpcMenuWin = v2;
  ((void (__stdcall *)(_DWORD))v2->vfptr->SetMsgHooker)(&v1->vfptr);
  v1->m_pkGuildTournamentBaseWin = GuildTournamentBaseWin::CreateWin(0);
  v1->m_pkGuildTournamentScheduleWin = GuildTournamentScheduleWin::CreateWin(0);
  v3 = GuildTournamentStorageWin::CreateWin(0);
  v4 = &v1->m_pkGuildTournamentBaseWin->vfptr;
  v1->m_pkGuildTournamentStorageWin = v3;
  ((void (__stdcall *)(_DWORD))(*v4)->SetMsgHooker)(&v1->vfptr);
  v1->m_pkGuildTournamentScheduleWin->vfptr->SetMsgHooker(&v1->m_pkGuildTournamentScheduleWin->vfptr, &v1->vfptr);
  v1->m_pkGuildTournamentStorageWin->vfptr->SetMsgHooker(&v1->m_pkGuildTournamentStorageWin->vfptr, &v1->vfptr);
  v5 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  v6 = v5;
  if ( v5 )
  {
    GameFrameWork::SetAutoCloseWin(v5, (PgWin *)&v1->m_pkGuildTournamentBaseWin->vfptr);
    GameFrameWork::SetAutoCloseWin(v6, (PgWin *)&v1->m_pkGuildTournamentScheduleWin->vfptr);
    GameFrameWork::SetAutoCloseWin(v6, (PgWin *)&v1->m_pkGuildTournamentStorageWin->vfptr);
    GameFrameWork::SetAutoCloseWin(v6, (PgWin *)&v1->m_pkGuildNpcMenuWin->vfptr);
  }
  v1->m_pkGTTDiceWin = GTTDiceWin::CreateWin(0);
  v1->m_pkGTTSkillWin = GTTSkillWin::CreateWin(0);
  v1->m_pkGTTMiniSkillWin = GTTMiniSkillWin::CreateWin(0);
  v1->m_pkGTStatusWin = GTStatusWin::CreateWin(0);
  v1->m_pkGTStatusMiniWin = GTStatusMiniWin::CreateWin(0);
  if ( !Folder::m_bInit )
    Folder::Init();
  v7 = Folder::Merge(&Folder::m_acEffect, "GuildTStart.nif");
  v8 = Ns_LoadNifFile(v7, 0);
  v9 = v1->m_pGTStartEffect.m_pObject;
  v20 = v8;
  if ( (NiObjectNET *)v9 != v8 )
  {
    if ( v9 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
        v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      v8 = v20;
    }
    v1->m_pGTStartEffect.m_pObject = (NiNode *)v8;
    if ( v8 )
      InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  }
  if ( !Folder::m_bInit )
    Folder::Init();
  v10 = Folder::Merge(&Folder::m_acEffect, "GuildTWin.nif");
  v11 = Ns_LoadNifFile(v10, 0);
  v12 = v1->m_pGTWinEffect.m_pObject;
  v21 = v11;
  if ( (NiObjectNET *)v12 != v11 )
  {
    if ( v12 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
        v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
      v11 = v21;
    }
    v1->m_pGTWinEffect.m_pObject = (NiNode *)v11;
    if ( v11 )
      InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
  }
  if ( !Folder::m_bInit )
    Folder::Init();
  v13 = Folder::Merge(&Folder::m_acEffect, "GuildTLose.nif");
  v14 = Ns_LoadNifFile(v13, 0);
  v15 = v1->m_pGTLoseEffect.m_pObject;
  v22 = v14;
  if ( (NiObjectNET *)v15 != v14 )
  {
    if ( v15 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) && v15 )
        v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
      v14 = v22;
    }
    v1->m_pGTLoseEffect.m_pObject = (NiNode *)v14;
    if ( v14 )
      InterlockedIncrement((volatile LONG *)&v14->m_uiRefCount);
  }
  v1->m_pkGTIBlueFlagWin = GTIFlagWin::CreateWin(0, 0);
  v1->m_pkGTIRedFlagWin = GTIFlagWin::CreateWin(0, 1u);
  v16 = GuildMenuWin::CreateWin(0);
  v1->m_pkGuildMenuWin = v16;
  ((void (__stdcall *)(_DWORD))v16->vfptr->SetMsgHooker)(&v1->vfptr);
  v17 = GuildSelectWin::CreateWin(0);
  v1->m_pkGuildSelectWin = v17;
  ((void (__stdcall *)(_DWORD))v17->vfptr->SetMsgHooker)(&v1->vfptr);
  v1->m_eState = 0;
  v18 = (GuildMemberTask *)operator new(0xAC58u);
  if ( v18 )
    GuildMemberTask::GuildMemberTask(v18);
  else
    v19 = 0;
  ITask::AttachChildTask((ITask *)&v1->vfptr, v19);
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006B9DB0) --------------------------------------------------------
void __thiscall GuildTask::OnIdle(GuildTask *this, float fTime)
{
  GuildTask *v2; // esi@1

  v2 = this;
  if ( this->m_bIsGuild && this->m_bListRefreshEnable && fTime - this->m_fPrevRefreshTime > 10.0 )
  {
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 0x26u, 0, 0);
    v2->m_fPrevRefreshTime = fTime;
  }
}

//----- (006B9E00) --------------------------------------------------------
void __thiscall GuildTask::DirectMessage(GuildTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  GuildTask *v4; // esi@1
  _DWORD *v5; // edi@13
  char *v6; // [sp-Ch] [bp-10h]@16

  v4 = this;
  switch ( iMsgTag )
  {
    case 44:
      if ( *(_WORD *)pvBody == 29 && *((_WORD *)pvBody + 1) == 5 && !this->m_kHistoryList.m_pkTail )
      {
        NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 5u, *((void **)pvBody + 1), *((_DWORD *)pvBody + 2));
        v4->m_kHistoryList.m_pkTail = (NiTListItem<GUILD_HISTORY *> *)1;
      }
      return;
    case 43:
      GuildMenuWin::OpenMasterMenuWin((GuildMenuWin *)this->m_eState);
      return;
    case 42:
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)this->m_eState);
      return;
    case 47:
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkGuildNpcMenuWin->vfptr);
      return;
    case 45:
      if ( this->m_uiRefCount )
      {
        (*(void (__stdcall **)(signed int, _DWORD, GuildTask *))(*(_DWORD *)this->m_uiRefCount + 4))(45, 0, this);
        if ( v4->m_uiRefCount )
          (*(void (__stdcall **)(signed int, _DWORD, GuildTask *))(*(_DWORD *)v4->m_uiRefCount + 20))(45, 0, v4);
      }
      ((void (__thiscall *)(GuildTask *, signed int, _DWORD, GuildTask *))v4->vfptr[5].__vecDelDtor)(v4, 45, 0, v4);
      return;
    case 27:
      v5 = pvBody;
      if ( !BYTE2(this->m_spGuildNameCache.m_pObject) || !pvBody )
        goto LABEL_20;
      if ( *(_DWORD *)pvBody )
      {
        if ( *(_DWORD *)pvBody != 1 )
          goto LABEL_20;
        BYTE3(pvBody) = 0;
        v6 = (char *)&pvBody + 3;
      }
      else
      {
        BYTE3(pvBody) = 1;
        v6 = (char *)&pvBody + 3;
      }
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x1Du, 0x9Cu, v6, 1);
      BYTE2(v4->m_spGuildNameCache.m_pObject) = 0;
LABEL_20:
      if ( LOBYTE(v4->m_pGTWinEffect.m_pObject) && v5 && !*v5 )
      {
        NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 4u, 0xB9u, 0, 0);
        LOBYTE(v4->m_pGTWinEffect.m_pObject) = 0;
      }
      return;
    default:
      return;
  }
}

//----- (006B9FA0) --------------------------------------------------------
void __cdecl GuildTask::InvalidateGuildWindow()
{
  int v0; // esi@1

  v0 = GuildTask::ms_spGuildTask + 8;
  if ( *(_DWORD *)(GuildTask::ms_spGuildTask + 12) )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(GuildTask::ms_spGuildTask + 12) + 4))(
      41,
      0,
      GuildTask::ms_spGuildTask + 8);
    if ( *(_DWORD *)(v0 + 4) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v0 + 4) + 20))(41, 0, v0);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v0 + 20))(v0, 41, 0, v0);
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006B9FF0) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_LIST_ACK(GuildTask *this, int iRevBytes, void *pvData)
{
  int v3; // eax@1
  GuildTask *v4; // esi@1
  int v5; // ecx@2
  char *v6; // eax@2
  signed int v7; // edx@2
  D3DXCOLOR *v8; // ebx@3
  char *v10; // esi@9
  char *v11; // edi@9
  char *v12; // esi@13

  v3 = *(_WORD *)pvData;
  v4 = this;
  if ( (_WORD)v3 == 3392 )
  {
    CGuildTournament::Clear(&this->m_GuildTournament);
    v4->m_GuildTournament.m_Time_Start = *(_DWORD *)((char *)pvData + 2);
    v4->m_GuildTournament.m_Time_Practic = *(_DWORD *)((char *)pvData + 6);
    v4->m_GuildTournament.m_Time_PracticEnd = *(_DWORD *)((char *)pvData + 10);
    v4->m_GuildTournament.m_Time_Match_161 = *(_DWORD *)((char *)pvData + 14);
    v4->m_GuildTournament.m_Time_Match_162 = *(_DWORD *)((char *)pvData + 18);
    v4->m_GuildTournament.m_Time_Match_8 = *(_DWORD *)((char *)pvData + 22);
    v4->m_GuildTournament.m_Time_Match_4 = *(_DWORD *)((char *)pvData + 26);
    v4->m_GuildTournament.m_Time_Match_2 = *(_DWORD *)((char *)pvData + 30);
    v4->m_GuildTournament.m_Time_Match_End = *(_DWORD *)((char *)pvData + 34);
    v5 = (int)&v4->m_GuildTournament.m_TournamentList[0].sGuildName.n4_code[2];
    v6 = (char *)pvData + 376;
    v7 = 31;
    do
    {
      *(_DWORD *)(v5 - 12) = *((_DWORD *)v6 - 3);
      *(_BYTE *)(v5 - 13) = *(v6 - 13);
      *(_DWORD *)(v5 - 8) = *((_DWORD *)v6 - 2);
      *(_DWORD *)(v5 - 4) = *((_DWORD *)v6 - 1);
      *(_DWORD *)v5 = *(_DWORD *)v6;
      v8 = (D3DXCOLOR *)*((_DWORD *)v6 + 1);
      *(_DWORD *)(v5 + 4) = v8;
      v6 += 21;
      v5 += 21;
      --v7;
    }
    while ( v7 );
    GuildTournamentScheduleWin::ClearList(v4->m_pkGuildTournamentScheduleWin);
    GuildTournamentScheduleWin::SetGuildTournamentMatchType(
      v4->m_pkGuildTournamentScheduleWin,
      *((_BYTE *)pvData + 362));
    if ( GuildTournamentScheduleWin::SetGuildTournamentList(
           v4->m_pkGuildTournamentScheduleWin,
           v8,
           (PROTO_NC_GUILD_TOURNAMENT_LIST_ACK *)pvData) )
    {
      if ( v4->m_bListReq )
      {
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v4->m_pkGuildTournamentScheduleWin->vfptr);
        v4->m_bListReq = 0;
      }
      return 1;
    }
    return 0;
  }
  if ( v3 == 3393 )
  {
    v12 = (char *)&this->vfptr;
    if ( this->m_pkMsgHooker )
    {
      ((void (__stdcall *)(signed int, const char *, IDirectMessengerVtbl **))this->m_pkMsgHooker->vfptr->SendDirectMessage)(
        25,
        "DB Get Error",
        &this->vfptr);
      if ( *((_DWORD *)v12 + 1) )
        (*(void (__stdcall **)(signed int, const char *, char *))(**((_DWORD **)v12 + 1) + 20))(25, "DB Get Error", v12);
    }
    (*(void (__thiscall **)(char *, signed int, const char *, char *))(*(_DWORD *)v12 + 20))(
      v12,
      25,
      "DB Get Error",
      v12);
    return 0;
  }
  v10 = (char *)&this->vfptr;
  v11 = fs("Error : %d\n", *(_WORD *)pvData);
  if ( *((_DWORD *)v10 + 1) )
  {
    (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v10 + 1) + 4))(25, v11, v10);
    if ( *((_DWORD *)v10 + 1) )
      (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v10 + 1) + 20))(25, v11, v10);
  }
  (*(void (__thiscall **)(char *, signed int, char *, char *))(*(_DWORD *)v10 + 20))(v10, 25, v11, v10);
  return 0;
}

//----- (006BA1B0) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENTSTOP_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENTSTOP_CMD *pkCmd)
{
  GuildTask *v2; // esi@1
  PgWin *v3; // esi@7

  v2 = this;
  this->m_GttEnemyInfo.uiStatus = 1;
  this->m_GttEnemyInfo.GuildRegNo = 0;
  *(_DWORD *)&this->m_GttEnemyInfo.acGuildName[0] = 0;
  *(_DWORD *)&this->m_GttEnemyInfo.acGuildName[4] = 0;
  *(_DWORD *)&this->m_GttEnemyInfo.acGuildName[8] = 0;
  *(_DWORD *)&this->m_GttEnemyInfo.acGuildName[12] = 0;
  *(_DWORD *)&this->m_GttEnemyInfo.acGuildName[16] = 0;
  *(_DWORD *)&this->m_GttEnemyInfo.acGuildName[20] = 0;
  *(_DWORD *)&this->m_GttEnemyInfo.acGuildName[24] = 0;
  *(_DWORD *)&this->m_GttEnemyInfo.acGuildName[28] = 0;
  if ( this->m_pkGTTMiniSkillWin )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->m_pkGTTMiniSkillWin->vfptr);
  if ( v2->m_pkGTTSkillWin )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkGTTSkillWin->vfptr);
  v2->m_GuildTournamentImprove.m_uiGTTType = -1;
  v2->m_GuildTournamentImprove.m_DiceInfo.AGuild = 0;
  v2->m_GuildTournamentImprove.m_DiceInfo.AGuildDelegate = -1;
  v2->m_GuildTournamentImprove.m_GTTScore.AGuild = 0;
  v2->m_GuildTournamentImprove.m_GTTScore.AGuildScore = 0;
  v2->m_GuildTournamentImprove.m_DiceInfo.BGuild = 0;
  v2->m_GuildTournamentImprove.m_DiceInfo.BGuildDelegate = -1;
  v2->m_GuildTournamentImprove.m_GTTScore.BGuild = 0;
  v2->m_GuildTournamentImprove.m_GTTScore.BGuildScore = 0;
  v2->m_GuildTournamentImprove.m_RedTeam = 0;
  v2->m_GuildTournamentImprove.m_BlueTeam = 0;
  GTStatusWin::EndGame(v2->m_pkGTStatusWin, 0);
  GTStatusMiniWin::EndGame(v2->m_pkGTStatusMiniWin, 0);
  if ( v2->m_pkGTIBlueFlagWin )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkGTIBlueFlagWin->vfptr);
  v3 = (PgWin *)&v2->m_pkGTIRedFlagWin->vfptr;
  if ( v3 )
    PgWinMgr::CloseWin(&Pgg_kWinMgr, v3);
  return 0;
}

//----- (006BA2C0) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_RENAME_ACK(GuildTask *this, PROTO_NC_GUILD_RENAME_ACK *pkAck)
{
  int v2; // eax@1
  char *v3; // esi@2
  char *v4; // edi@2

  v2 = pkAck->err;
  if ( 6720 != (_WORD)v2 )
  {
    v3 = (char *)&this->vfptr;
    v4 = ErrMsgTable::GetErrMsg(v2);
    if ( *((_DWORD *)v3 + 1) )
    {
      (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v3 + 1) + 4))(25, v4, v3);
      if ( *((_DWORD *)v3 + 1) )
        (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v3 + 1) + 20))(25, v4, v3);
    }
    (*(void (__thiscall **)(char *, signed int, char *, char *))(*(_DWORD *)v3 + 20))(v3, 25, v4, v3);
  }
  return 1;
}

//----- (006BA330) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_RETYPE_CMD(GuildTask *this, PROTO_NC_GUILD_RETYPE_CMD *pkCmd)
{
  int v2; // edx@2
  int v3; // eax@6
  char *v4; // esi@8

  if ( GuildTask::ms_spGuildTask )
    v2 = GuildTask::ms_spGuildTask + 64;
  else
    v2 = 0;
  if ( *(_DWORD *)(v2 + 12) == pkCmd->nGuildNo )
  {
    if ( GuildTask::ms_spGuildTask )
      v3 = GuildTask::ms_spGuildTask + 64;
    else
      v3 = 0;
    v4 = (char *)&this->vfptr;
    *(_BYTE *)(v3 + 40) = pkCmd->nType;
    if ( this->m_pkMsgHooker )
    {
      ((void (__stdcall *)(signed int, _DWORD, char *))this->m_pkMsgHooker->vfptr->SendDirectMessage)(41, 0, v4);
      if ( *((_DWORD *)v4 + 1) )
        (*(void (__stdcall **)(signed int, _DWORD, char *))(**((_DWORD **)v4 + 1) + 20))(41, 0, v4);
    }
    (*(void (__thiscall **)(char *, signed int, _DWORD, char *))(*(_DWORD *)v4 + 20))(v4, 41, 0, v4);
  }
  return 1;
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006BA3B0) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_USESKILL_ACK(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_USESKILL_ACK *pkAck)
{
  int v2; // eax@2
  char *v4; // esi@4
  char *v5; // edi@4

  if ( pkAck )
  {
    v2 = pkAck->err;
    if ( (_WORD)v2 == 6976 )
    {
      GTTSkillWin::StartCoolTime(this->m_pkGTTSkillWin, pkAck->wUseSkillNumber);
      return 0;
    }
    v4 = (char *)&this->vfptr;
    v5 = ErrMsgTable::GetErrMsg(v2);
    if ( *((_DWORD *)v4 + 1) )
    {
      (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v4 + 1) + 4))(25, v5, v4);
      if ( *((_DWORD *)v4 + 1) )
        (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v4 + 1) + 20))(25, v5, v4);
    }
    (*(void (__thiscall **)(char *, signed int, char *, char *))(*(_DWORD *)v4 + 20))(v4, 25, v5, v4);
  }
  return 0;
}

//----- (006BA430) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_DICEGAME_THROW_ACK(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_DICEGAME_THROW_ACK *pkAck)
{
  int v2; // eax@2
  char *v3; // esi@3
  char *v4; // edi@3

  if ( pkAck )
  {
    v2 = pkAck->err;
    if ( (_WORD)v2 != 6976 )
    {
      v3 = (char *)&this->vfptr;
      v4 = ErrMsgTable::GetErrMsg(v2);
      if ( *((_DWORD *)v3 + 1) )
      {
        (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v3 + 1) + 4))(25, v4, v3);
        if ( *((_DWORD *)v3 + 1) )
          (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v3 + 1) + 20))(25, v4, v3);
      }
      (*(void (__thiscall **)(char *, signed int, char *, char *))(*(_DWORD *)v3 + 20))(v3, 25, v4, v3);
    }
  }
  return 0;
}

//----- (006BA4A0) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_DICEGAME_THROW_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_DICEGAME_THROW_CMD *pkCmd)
{
  GTTDiceWin *v2; // ecx@6
  int result; // eax@7

  if ( pkCmd )
  {
    if ( this->m_GuildTournamentImprove.m_DiceInfo.AGuild == pkCmd->GuildRegNumber )
      *(PROTO_NC_GUILD_TOURNAMENT_DICEGAME_THROW_CMD *)&this->m_GuildTournamentImprove.m_GTTScore.AGuild = *pkCmd;
    if ( this->m_GuildTournamentImprove.m_DiceInfo.BGuild == pkCmd->GuildRegNumber )
      *(PROTO_NC_GUILD_TOURNAMENT_DICEGAME_THROW_CMD *)&this->m_GuildTournamentImprove.m_GTTScore.BGuild = *pkCmd;
    v2 = this->m_pkGTTDiceWin;
    if ( g_pkMainChar->m_dwGuildRegNum == pkCmd->GuildRegNumber )
    {
      GTTDiceWin::SetReseultDice(v2, 0, 0);
      result = 1;
    }
    else
    {
      GTTDiceWin::SetReseultDice(v2, 1u, 0);
      result = 1;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006BA520) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_OBSERVER_ENTER_ACK(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_OBSERVER_ENTER_ACK *pkAck)
{
  GuildTask *v2; // esi@1
  int v3; // ecx@2
  PgFrameWork *v4; // eax@3
  int v6; // esi@5
  char *v7; // edi@5

  v2 = this;
  if ( pkAck )
  {
    v3 = pkAck->err;
    if ( (_WORD)v3 == 6976 )
    {
      v2->m_bOpserver = 1;
      v2->m_iGTObserverSeedNum = pkAck->nTournamentSeed;
      v2->m_GuildTournamentImprove.m_RedTeam = pkAck->nGuildRed;
      v2->m_GuildTournamentImprove.m_BlueTeam = pkAck->nGuildBlue;
      v4 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v4 )
      {
        MiniMapWin::ShowGTQuit(*(MiniMapWin **)&v4[15].m_bInit, 1);
        return 0;
      }
    }
    else
    {
      v6 = (int)&v2->vfptr;
      v7 = ErrMsgTable::GetErrMsg(v3);
      if ( *(_DWORD *)(v6 + 4) )
      {
        (*(void (__stdcall **)(signed int, char *, int))(**(_DWORD **)(v6 + 4) + 4))(25, v7, v6);
        if ( *(_DWORD *)(v6 + 4) )
          (*(void (__stdcall **)(signed int, char *, int))(**(_DWORD **)(v6 + 4) + 20))(25, v7, v6);
      }
      (*(void (__thiscall **)(int, signed int, char *, int))(*(_DWORD *)v6 + 20))(v6, 25, v7, v6);
    }
  }
  return 0;
}

//----- (006BA5E0) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_FLAGCAPTURE_ACK(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_FLAGCAPTURE_ACK *pkAck)
{
  int v2; // eax@1
  char *v3; // esi@2
  char *v4; // edi@2

  v2 = pkAck->err;
  if ( (_WORD)v2 != 6976 )
  {
    v3 = (char *)&this->vfptr;
    v4 = ErrMsgTable::GetErrMsg(v2);
    if ( *((_DWORD *)v3 + 1) )
    {
      (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v3 + 1) + 4))(25, v4, v3);
      if ( *((_DWORD *)v3 + 1) )
        (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v3 + 1) + 20))(25, v4, v3);
    }
    (*(void (__thiscall **)(char *, signed int, char *, char *))(*(_DWORD *)v3 + 20))(v3, 25, v4, v3);
  }
  return 0;
}

//----- (006BA650) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_MY_GUILD_TOKEN_INFO_ACK(GuildTask *this, PROTO_NC_GUILD_MY_GUILD_TOKEN_INFO_ACK *pkAck)
{
  int result; // eax@3
  char *v3; // esi@4
  char *v4; // edi@4

  if ( pkAck && pkAck->Error == 3137 )
  {
    this->m_iGuildToken = pkAck->nGuildToken;
    GuildTournamentStorageWin::SetToken(this->m_pkGuildTournamentStorageWin, pkAck->nGuildToken);
    result = 0;
  }
  else
  {
    v3 = (char *)&this->vfptr;
    v4 = ErrMsgTable::GetErrMsg(pkAck->Error);
    if ( *((_DWORD *)v3 + 1) )
    {
      (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v3 + 1) + 4))(25, v4, v3);
      if ( *((_DWORD *)v3 + 1) )
        (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v3 + 1) + 20))(25, v4, v3);
    }
    (*(void (__thiscall **)(char *, signed int, char *, char *))(*(_DWORD *)v3 + 20))(v3, 25, v4, v3);
    result = 0;
  }
  return result;
}

//----- (006BA6F0) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_FLAGCAPTURE_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_FLAGCAPTURE_CMD *pkCmd)
{
  int v2; // eax@2
  Char *v3; // eax@4
  char *v5; // esi@6
  char *v6; // edi@6
  Char *v7; // eax@10

  if ( !pkCmd )
    return 0;
  v2 = pkCmd->err;
  if ( (_WORD)v2 == 6976 )
  {
    v7 = CharMgr::GetChar(&g_kCharMgr, pkCmd->hPlayer);
    if ( v7 )
      Char::ActFlagCapture(v7);
    return 0;
  }
  if ( (_WORD)v2 == 6993 )
  {
    v3 = CharMgr::GetChar(&g_kCharMgr, pkCmd->hPlayer);
    if ( v3 )
    {
      Char::StopFlagCapture(v3);
      return 0;
    }
    return 0;
  }
  v5 = (char *)&this->vfptr;
  v6 = ErrMsgTable::GetErrMsg(v2);
  if ( *((_DWORD *)v5 + 1) )
  {
    (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v5 + 1) + 4))(25, v6, v5);
    if ( *((_DWORD *)v5 + 1) )
      (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v5 + 1) + 20))(25, v6, v5);
  }
  (*(void (__thiscall **)(char *, signed int, char *, char *))(*(_DWORD *)v5 + 20))(v5, 25, v6, v5);
  return 0;
}

//----- (006BA7B0) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_OBSERVER_OUT_ACK(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_OBSERVER_OUT_ACK *pkAck)
{
  int v2; // eax@1
  char *v3; // esi@2
  char *v4; // edi@2

  v2 = pkAck->err;
  if ( (_WORD)v2 != 6976 )
  {
    v3 = (char *)&this->vfptr;
    v4 = ErrMsgTable::GetErrMsg(v2);
    if ( *((_DWORD *)v3 + 1) )
    {
      (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v3 + 1) + 4))(25, v4, v3);
      if ( *((_DWORD *)v3 + 1) )
        (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v3 + 1) + 20))(25, v4, v3);
    }
    (*(void (__thiscall **)(char *, signed int, char *, char *))(*(_DWORD *)v3 + 20))(v3, 25, v4, v3);
  }
  return 0;
}

//----- (006BA820) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_STARTMSG_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_STARTMSG_CMD *pkCmd)
{
  NiNode *v2; // eax@3
  float v3; // ST08_4@3

  if ( pkCmd && pkCmd->nStartBeforeTime == 5 )
  {
    v2 = this->m_pGTStartEffect.m_pObject;
    v3 = (double)(PgWin::ms_uiScreenWidth >> 1);
    v2->m_kLocal.m_Translate.x = v3;
    v2->m_kLocal.m_Translate.y = -500.0;
    v2->m_kLocal.m_Translate.z = 0.0;
    PgWinMgr::StartFullScreenEffect(
      &Pgg_kWinMgr,
      Timer::ms_fCurTime,
      (NiAVObject *)&this->m_pGTStartEffect.m_pObject->vfptr);
    SoundMgr::PlayInterfaceSound(&g_kSoundMgr, "GuildTStart");
  }
  return 0;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006BA8B0) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_WORLD_SET_GUILD_TOKEN_CMD(GuildTask *this, PROTO_NC_GUILD_WORLD_SET_GUILD_TOKEN_CMD *pkCmd)
{
  GuildTask *v2; // edi@1

  v2 = this;
  if ( pkCmd )
  {
    this->m_iGuildToken = pkCmd->nRestGuildToken;
    if ( this->m_pkMsgHooker )
    {
      ((void (__stdcall *)(signed int, _DWORD, IDirectMessengerVtbl **))this->m_pkMsgHooker->vfptr->SendDirectMessage)(
        41,
        0,
        &this->vfptr);
      if ( v2->m_pkMsgHooker )
        ((void (__stdcall *)(signed int, _DWORD, IDirectMessengerVtbl **))v2->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          41,
          0,
          &v2->vfptr);
    }
    v2->vfptr->DirectDispatchToParent((IDirectMessenger *)&v2->vfptr, 41, 0, (IDirectMessenger *)&v2->vfptr);
    GuildTournamentStorageWin::SetToken(v2->m_pkGuildTournamentStorageWin, pkCmd->nRestGuildToken);
  }
  return 0;
}

//----- (006BA930) --------------------------------------------------------
GTStatusWin *__cdecl GuildTask::GetGTStatusWin()
{
  return *(GTStatusWin **)(GuildTask::ms_spGuildTask + 2880);
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006BA940) --------------------------------------------------------
GTStatusMiniWin *__cdecl GuildTask::GetGTStatusMiniWin()
{
  return *(GTStatusMiniWin **)(GuildTask::ms_spGuildTask + 2884);
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006BA950) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_JOIN_LIST_ACK(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_JOIN_LIST_ACK *pkAck)
{
  PROTO_NC_GUILD_TOURNAMENT_JOIN_LIST_ACK *v2; // edi@1
  GuildTask *v3; // esi@1
  signed int v4; // ebx@3
  GuildTournamentBaseWin *v5; // edx@6
  int result; // eax@8
  signed int v7; // ebx@9
  GTRequestListWin *v8; // ecx@14
  char *v9; // esi@16
  char *v10; // edi@16
  PROTO_NC_GUILD_TOURNAMENT_JOIN_LIST_ACK *pkAcka; // [sp+10h] [bp+8h]@4
  PROTO_NC_GUILD_TOURNAMENT_JOIN_LIST_ACK *pkAckb; // [sp+10h] [bp+8h]@10

  v2 = pkAck;
  v3 = this;
  if ( pkAck->Error == 7240 )
  {
    if ( pkAck->PartMask & 1 )
    {
      GTRequestListWin::Clear(this->m_pkGuildTournamentBaseWin->m_pkGTRequestListWin);
      v4 = 0;
      if ( pkAck->nJoinGuildNum > 0u )
      {
        pkAcka = pkAck + 1;
        do
        {
          GTRequestListWin::SetGuildList(
            v3->m_pkGuildTournamentBaseWin->m_pkGTRequestListWin,
            (SHINE_GUILD_LIST_NEW *)pkAcka,
            0);
          pkAcka = (PROTO_NC_GUILD_TOURNAMENT_JOIN_LIST_ACK *)((char *)pkAcka + 46);
          ++v4;
        }
        while ( v4 < v2->nJoinGuildNum );
      }
    }
    else
    {
      v7 = 0;
      if ( pkAck->nJoinGuildNum > 0u )
      {
        pkAckb = pkAck + 1;
        do
        {
          GTRequestListWin::SetGuildList(
            v3->m_pkGuildTournamentBaseWin->m_pkGTRequestListWin,
            (SHINE_GUILD_LIST_NEW *)pkAckb,
            0);
          pkAckb = (PROTO_NC_GUILD_TOURNAMENT_JOIN_LIST_ACK *)((char *)pkAckb + 46);
          ++v7;
        }
        while ( v7 < v2->nJoinGuildNum );
      }
    }
    v5 = v3->m_pkGuildTournamentBaseWin;
    if ( v5->m_pkGTRequestListWin )
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v5->m_pkGTRequestListWin->vfptr);
    return 0;
  }
  if ( pkAck->Error == 7243 )
  {
    v8 = this->m_pkGuildTournamentBaseWin->m_pkGTRequestListWin;
    if ( !v8 )
      return 0;
    GTRequestListWin::ShowFormerList(v8);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkGuildTournamentBaseWin->m_pkGTRequestListWin->vfptr);
    result = 0;
  }
  else
  {
    v9 = (char *)&this->vfptr;
    v10 = ErrMsgTable::GetErrMsg(pkAck->Error);
    if ( *((_DWORD *)v9 + 1) )
    {
      (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v9 + 1) + 4))(25, v10, v9);
      if ( *((_DWORD *)v9 + 1) )
        (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v9 + 1) + 20))(25, v10, v9);
    }
    (*(void (__thiscall **)(char *, signed int, char *, char *))(*(_DWORD *)v9 + 20))(v9, 25, v10, v9);
    result = 0;
  }
  return result;
}

//----- (006BAAB0) --------------------------------------------------------
int __stdcall GuildTask::Recv_NC_GUILD_TOURNAMENT_ITEM_SCAN_CMD(PROTO_NC_GUILD_TOURNAMENT_ITEM_SCAN_CMD *pkCmd)
{
  PROTO_NC_GUILD_TOURNAMENT_ITEM_SCAN_CMD *v2; // ebx@1
  PgFrameWork *v3; // eax@2
  signed int v4; // esi@4
  SHINE_XY_TYPE *v5; // edi@5
  int result; // eax@9
  GameFrameWork *pkGame; // [sp+Ch] [bp+8h]@2

  v2 = pkCmd;
  if ( pkCmd->nNum )
  {
    v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    pkGame = (GameFrameWork *)v3;
    if ( v3 )
      MiniMapWin::ClearGTEnemyPos(*(MiniMapWin **)&v3[15].m_bInit);
    v4 = 0;
    if ( v2->nNum <= 0u )
    {
      result = 0;
    }
    else
    {
      v5 = (SHINE_XY_TYPE *)&v2[1];
      do
      {
        if ( pkGame )
          MiniMapWin::AddGTEnemyPos(pkGame->m_pkMiniMapWin, *v5);
        ++v4;
        ++v5;
      }
      while ( v4 < v2->nNum );
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006BAB30) --------------------------------------------------------
int __stdcall GuildTask::Recv_NC_GUILD_EMBLEM_INFO_CMD(PROTO_NC_GUILD_EMBLEM_INFO_CMD *pkCmd)
{
  int result; // eax@2
  PgFrameWork *v3; // eax@3
  GuildWin *v4; // ecx@4

  if ( pkCmd
    && (v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID)) != 0
    && (v4 = (GuildWin *)v3[24].vfptr) != 0 )
  {
    GuildWin::SetEmblem(v4, &pkCmd->EmblemInfo, pkCmd->EmblemState);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006BAB80) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_DISMISS_CMD(GuildTask *this, PROTO_NC_GUILD_DISMISS_CMD *pkProto)
{
  int result; // eax@1
  NiUnsharedGeometryGroup *v3; // eax@2
  unsigned int v4; // ecx@2
  unsigned int v5; // edx@2
  char *v6; // eax@2
  char acDateTime[32]; // [sp+4h] [bp-38h]@2
  char acGuildName[17]; // [sp+24h] [bp-18h]@2

  result = CGuild::Recv_NC_GUILD_DISMISS_CMD((CGuild *)this, pkProto);
  if ( result )
  {
    v3 = TextData2::Get(0x53404A7Au);
    strftime(acDateTime, 0x1Fu, (const char *)v3, &pkProto->tm_dDismissDate);
    v4 = pkProto->Name.n4_code[2];
    v5 = pkProto->Name.n4_code[0];
    *(_DWORD *)&acGuildName[4] = pkProto->Name.n4_code[1];
    *(_DWORD *)&acGuildName[8] = v4;
    *(_DWORD *)acGuildName = v5;
    *(_DWORD *)&acGuildName[12] = pkProto->Name.n4_code[3];
    acGuildName[16] = 0;
    v6 = (char *)TextData::Get(0x3311999u);
    MsgBox::Modal(MSGBOX_OK, v6, acGuildName, acDateTime);
    result = 1;
  }
  return result;
}

//----- (006BAC20) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_WAR_ACK(GuildTask *this, PROTO_NC_GUILD_WAR_ACK *pkProto)
{
  signed int v2; // eax@1
  GuildTask *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@5
  int result; // eax@10
  int v6; // ST08_4@11
  NiUnsharedGeometryGroup *v7; // eax@11
  char *v8; // eax@11
  NiUnsharedGeometryGroup *v9; // eax@12
  int v10; // esi@15
  NiUnsharedGeometryGroup *v11; // edi@15

  v2 = pkProto->Error;
  v3 = this;
  if ( (_WORD)v2 == 3137 )
    return 1;
  if ( v2 > 7104 )
  {
    if ( v2 == 7105 )
    {
      v9 = TextData2::Get(0x59635D90u);
LABEL_15:
      v10 = (int)&v3[-1].m_GuildTournamentImprove.m_DiceInfo.BGuildDelegateName.n5_code[4] + 2;
      v11 = v9;
      if ( *(_DWORD *)(v10 + 4) )
      {
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v10 + 4) + 4))(25, v9, v10);
        if ( *(_DWORD *)(v10 + 4) )
          (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v10 + 4) + 20))(
            25,
            v11,
            v10);
      }
      (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v10 + 20))(v10, 25, v11, v10);
    }
    return 1;
  }
  if ( v2 == 7104 )
  {
    v9 = TextData2::Get(0x31C0DACu);
    goto LABEL_15;
  }
  switch ( v2 )
  {
    case 3369:
      v4 = TextData::Get(0xF0452044);
      goto LABEL_10;
    case 3368:
      v4 = TextData::Get(0xED4AFF87);
      goto LABEL_10;
    case 3364:
      v4 = TextData::Get(0xE19E6689);
      goto LABEL_10;
    case 3362:
      v4 = TextData::Get(0x6B8371C7u);
      goto LABEL_10;
    case 3363:
      v4 = TextData::Get(0xACE3043B);
LABEL_10:
      IDirectMessenger::DirectDispatch(
        (IDirectMessenger *)((char *)&v3[-1].m_GuildTournamentImprove.m_DiceInfo.BGuildDelegateName.n5_code[4] + 2),
        25,
        v4,
        0);
      result = 1;
      break;
    case 3360:
    case 3361:
    case 3365:
    case 3366:
    case 3367:
      v6 = pkProto->Error;
      v7 = TextData::Get(0xF0452044);
      v8 = fs("%s(%d)", v7, v6);
      IDirectMessenger::DirectDispatch(
        (IDirectMessenger *)((char *)&v3[-1].m_GuildTournamentImprove.m_DiceInfo.BGuildDelegateName.n5_code[4] + 2),
        25,
        v8,
        0);
      result = 1;
      break;
    default:
      return 1;
  }
  return result;
}

//----- (006BAD70) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_WAR_ABLE_LIST_ACK(GuildTask *this, PROTO_NC_GUILD_WAR_ABLE_LIST_ACK *pAck)
{
  PROTO_NC_GUILD_WAR_ABLE_LIST_ACK *v2; // esi@1
  GuildTask *v3; // edi@1
  GameFrameWork *v4; // ebx@3
  const char *v5; // eax@3
  GameFrameWork *v6; // ebx@5
  NiUnsharedGeometryGroup *v7; // eax@5
  signed int v8; // ebx@6
  SHINE_GUILD_WAR_ABLE_INFO *v9; // edi@9
  CGuildWarAble *pAcka; // [sp+14h] [bp+8h]@9

  v2 = pAck;
  v3 = this;
  if ( pAck->Error != 12696 && pAck->Error != 3137 )
  {
    v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v5 = ErrMsgTable::GetErrMsg(pAck->Error);
    GameFrameWork::AddSysMsg(v4, v5);
  }
  if ( pAck->Error == 3356 )
  {
    v6 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v7 = TextData3::Get(0x32D6F69u);
    GameFrameWork::AddSysMsg(v6, (const char *)v7);
  }
  v8 = 0;
  if ( pAck->PartMask & 1 )
  {
    v3->m_iTotalGuildWarAbleCount = 0;
    CGuildWarAble::Clear(&v3->m_GuildWarAble);
  }
  v3->m_iTotalGuildWarAbleCount += pAck->NumOfWarInfo;
  if ( pAck->NumOfWarInfo > 0u )
  {
    pAcka = &v3->m_GuildWarAble;
    v9 = (SHINE_GUILD_WAR_ABLE_INFO *)&v2[1];
    do
    {
      CGuildWarAble::Add(pAcka, v9);
      ++v8;
      ++v9;
    }
    while ( v8 < v2->NumOfWarInfo );
  }
  return 1;
}

//----- (006BAE50) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_JOIN_ACK(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_JOIN_ACK *pkProto)
{
  GuildTask *v2; // ebx@1
  char *v3; // esi@2
  NiUnsharedGeometryGroup *v4; // edi@2
  NiUnsharedGeometryGroup *v5; // edi@5
  int result; // eax@8
  char *v7; // eax@10
  signed int v8; // ecx@12
  NiUnsharedGeometryGroup *v9; // edi@27
  NiUnsharedGeometryGroup *v10; // edi@31
  NiUnsharedGeometryGroup *v11; // edi@35
  NiUnsharedGeometryGroup *v12; // edi@39
  NiUnsharedGeometryGroup *v13; // edi@43
  NiUnsharedGeometryGroup *v14; // edi@47
  NiUnsharedGeometryGroup *v15; // edi@52
  unsigned int v16; // ebx@57
  __int64 v17; // rax@59
  int v18; // eax@59
  char v19; // cl@60
  NiUnsharedGeometryGroup *v20; // eax@61
  NiUnsharedGeometryGroup *v21; // edx@61
  char v22; // cl@62
  unsigned int v23; // eax@63
  char *v24; // edi@63
  char v25; // cl@64
  char *v26; // edi@65
  char v27; // al@66
  __int64 v28; // rax@69
  unsigned int v29; // eax@69
  char *v30; // edi@69
  char v31; // cl@70
  NiUnsharedGeometryGroup *v32; // eax@71
  NiUnsharedGeometryGroup *v33; // ecx@71
  char v34; // dl@72
  unsigned int v35; // eax@73
  NiUnsharedGeometryGroup *v36; // esi@73
  char *v37; // edi@73
  char v38; // cl@74
  char *v39; // edi@75
  char v40; // al@76
  __int64 v41; // rax@79
  unsigned int v42; // eax@79
  char *v43; // edi@79
  char v44; // cl@80
  NiUnsharedGeometryGroup *v45; // eax@81
  NiUnsharedGeometryGroup *v46; // ecx@81
  char v47; // dl@82
  unsigned int v48; // eax@83
  NiUnsharedGeometryGroup *v49; // esi@83
  char *v50; // edi@83
  char v51; // cl@84
  char *v52; // edi@85
  char v53; // al@86
  __int64 v54; // rax@89
  unsigned int v55; // eax@89
  char *v56; // edi@89
  char v57; // cl@90
  NiUnsharedGeometryGroup *v58; // eax@91
  NiUnsharedGeometryGroup *v59; // ecx@91
  char v60; // dl@92
  unsigned int v61; // eax@93
  NiUnsharedGeometryGroup *v62; // esi@93
  char *v63; // edi@93
  char v64; // cl@94
  char *v65; // edi@95
  char v66; // al@96
  char *v67; // eax@98
  char *v68; // eax@98
  int v69; // esi@98
  int v70; // ST14_4@100
  int v71; // ST10_4@100
  char *v72; // eax@100
  char *v73; // edi@104
  GuildTask *v74; // [sp+Ch] [bp-208h]@1
  char acStr1[256]; // [sp+10h] [bp-204h]@57
  char acStr2[256]; // [sp+110h] [bp-104h]@57

  v2 = this;
  v74 = this;
  if ( pkProto->nError == 7232 )
  {
    v3 = (char *)&this->vfptr;
    v4 = TextData::Get(0x83CAC2CE);
    if ( v2->m_pkMsgHooker )
    {
      ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v2->m_pkMsgHooker->vfptr->SendDirectMessage)(
        46,
        v4,
        &v2->vfptr);
      if ( v2->m_pkMsgHooker )
        ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v2->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          46,
          v4,
          &v2->vfptr);
    }
    (*(void (__thiscall **)(IDirectMessengerVtbl **, signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))(*(_DWORD *)v3 + 20))(
      &v2->vfptr,
      46,
      v4,
      &v2->vfptr);
    v5 = TextData::Get(0x83CAC2CE);
    if ( v2->m_pkMsgHooker )
    {
      ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v2->m_pkMsgHooker->vfptr->SendDirectMessage)(
        25,
        v5,
        &v2->vfptr);
      if ( v2->m_pkMsgHooker )
        ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v2->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          25,
          v5,
          &v2->vfptr);
    }
    (*(void (__thiscall **)(IDirectMessengerVtbl **, signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))(*(_DWORD *)v3 + 20))(
      &v2->vfptr,
      25,
      v5,
      &v2->vfptr);
    result = 1;
  }
  else
  {
    if ( CDataReader::GetRecord((CDataReader *)(ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::ms_pkTable + 4), 0) )
      v7 = CDataReader::GetRecord((CDataReader *)(ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::ms_pkTable + 4), 0);
    else
      v7 = 0;
    v8 = pkProto->nError;
    if ( v8 > 7233 )
    {
      switch ( v8 )
      {
        case 7234:
          v15 = TextData::Get(0x76816B99u);
          if ( v2->m_pkMsgHooker )
          {
            ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v2->m_pkMsgHooker->vfptr->SendDirectMessage)(
              25,
              v15,
              &v2->vfptr);
            if ( v2->m_pkMsgHooker )
              ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v2->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                25,
                v15,
                &v2->vfptr);
          }
          v2->vfptr->DirectDispatchToParent((IDirectMessenger *)&v2->vfptr, 25, v15, (IDirectMessenger *)&v2->vfptr);
          goto LABEL_108;
        case 7236:
          if ( v7 )
          {
            v16 = *(_DWORD *)(v7 + 3);
            memset(acStr1, 0, 0x100u);
            memset(acStr2, 0, 0x100u);
            if ( v16 )
            {
              if ( User::GetGem(v16) )
              {
                v17 = User::GetGem(v16);
                sprintf(acStr1, "%I64d", v17);
                v18 = 0;
                do
                {
                  v19 = acStr1[v18];
                  acStr2[v18++] = v19;
                }
                while ( v19 );
                v20 = TextData::Get(0x475F9699u);
                v21 = v20;
                do
                {
                  v22 = (char)v20->vfptr;
                  v20 = (NiUnsharedGeometryGroup *)((char *)v20 + 1);
                }
                while ( v22 );
                v23 = (char *)v20 - (char *)v21;
                v24 = &acStr1[255];
                do
                  v25 = (v24++)[1];
                while ( v25 );
                qmemcpy(v24, v21, v23);
                v26 = &acStr1[255];
                do
                  v27 = (v26++)[1];
                while ( v27 );
                *v26 = 0;
              }
              if ( User::GetGold(v16) )
              {
                v28 = User::GetGold(v16);
                sprintf(acStr1, "%I64d", v28);
                v29 = strlen(acStr1) + 1;
                v30 = &acStr1[255];
                do
                  v31 = (v30++)[1];
                while ( v31 );
                qmemcpy(v30, acStr1, v29);
                v32 = TextData::Get(0x47A395A3u);
                v33 = v32;
                do
                {
                  v34 = (char)v32->vfptr;
                  v32 = (NiUnsharedGeometryGroup *)((char *)v32 + 1);
                }
                while ( v34 );
                v35 = (char *)v32 - (char *)v33;
                v36 = v33;
                v37 = &acStr1[255];
                do
                  v38 = (v37++)[1];
                while ( v38 );
                qmemcpy(v37, v36, v35);
                v39 = &acStr1[255];
                do
                  v40 = (v39++)[1];
                while ( v40 );
                *v39 = 0;
              }
              if ( User::GetSilver(v16) )
              {
                v41 = User::GetSilver(v16);
                sprintf(acStr1, "%I64d", v41);
                v42 = strlen(acStr1) + 1;
                v43 = &acStr1[255];
                do
                  v44 = (v43++)[1];
                while ( v44 );
                qmemcpy(v43, acStr1, v42);
                v45 = TextData::Get(0x98B595EF);
                v46 = v45;
                do
                {
                  v47 = (char)v45->vfptr;
                  v45 = (NiUnsharedGeometryGroup *)((char *)v45 + 1);
                }
                while ( v47 );
                v48 = (char *)v45 - (char *)v46;
                v49 = v46;
                v50 = &acStr1[255];
                do
                  v51 = (v50++)[1];
                while ( v51 );
                qmemcpy(v50, v49, v48);
                v52 = &acStr1[255];
                do
                  v53 = (v52++)[1];
                while ( v53 );
                *v52 = 0;
              }
              if ( User::GetCopper(v16) )
              {
                v54 = User::GetCopper(v16);
                sprintf(acStr1, "%I64d", v54);
                v55 = strlen(acStr1) + 1;
                v56 = &acStr1[255];
                do
                  v57 = (v56++)[1];
                while ( v57 );
                qmemcpy(v56, acStr1, v55);
                v58 = TextData::Get(0x88AF99F5);
                v59 = v58;
                do
                {
                  v60 = (char)v58->vfptr;
                  v58 = (NiUnsharedGeometryGroup *)((char *)v58 + 1);
                }
                while ( v60 );
                v61 = (char *)v58 - (char *)v59;
                v62 = v59;
                v63 = &acStr1[255];
                do
                  v64 = (v63++)[1];
                while ( v64 );
                qmemcpy(v63, v62, v61);
                v65 = &acStr1[255];
                do
                  v66 = (v65++)[1];
                while ( v66 );
                *v65 = 0;
              }
            }
            v67 = (char *)TextData2::Get(0xC7F58A08);
            v68 = fs(v67, acStr2);
            v69 = (int)&v74->vfptr;
            break;
          }
          goto LABEL_108;
        case 7237:
          if ( v7 )
          {
            v70 = *(_WORD *)(v7 + 1);
            v71 = (unsigned __int8)*v7;
            v72 = (char *)TextData2::Get(0xC4F4D2F4);
            v68 = fs(v72, v71, v70);
            v69 = (int)&v2->vfptr;
            break;
          }
          goto LABEL_108;
        case 7238:
          v68 = (char *)TextData::Get(0x54A4ABA1u);
          v69 = (int)&v2->vfptr;
          break;
        case 7239:
          v68 = (char *)TextData2::Get(0xA3E49BCC);
          v69 = (int)&v2->vfptr;
          break;
        default:
LABEL_103:
          v68 = fs("Error : %d\n", pkProto->nError);
          v69 = (int)&v2->vfptr;
          break;
      }
      v73 = v68;
      if ( *(_DWORD *)(v69 + 4) )
      {
        (*(void (__stdcall **)(signed int, char *, int))(**(_DWORD **)(v69 + 4) + 4))(25, v68, v69);
        if ( *(_DWORD *)(v69 + 4) )
          (*(void (__stdcall **)(signed int, char *, int))(**(_DWORD **)(v69 + 4) + 20))(25, v73, v69);
      }
      (*(void (__thiscall **)(int, signed int, char *, int))(*(_DWORD *)v69 + 20))(v69, 25, v73, v69);
    }
    else if ( v8 != 7233 )
    {
      switch ( v8 )
      {
        case 3393:
          if ( v2->m_pkMsgHooker )
          {
            ((void (__stdcall *)(signed int, const char *, IDirectMessengerVtbl **))v2->m_pkMsgHooker->vfptr->SendDirectMessage)(
              25,
              "DB Get Error",
              &v2->vfptr);
            if ( v2->m_pkMsgHooker )
              ((void (__stdcall *)(signed int, const char *, IDirectMessengerVtbl **))v2->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                25,
                "DB Get Error",
                &v2->vfptr);
          }
          v2->vfptr->DirectDispatchToParent(
            (IDirectMessenger *)&v2->vfptr,
            25,
            "DB Get Error",
            (IDirectMessenger *)&v2->vfptr);
          break;
        case 3394:
          if ( v2->m_pkMsgHooker )
          {
            ((void (__stdcall *)(_DWORD, const char *, _DWORD))v2->m_pkMsgHooker->vfptr->SendDirectMessage)(
              25,
              "DB Set Error",
              &v2->vfptr);
            if ( v2->m_pkMsgHooker )
              ((void (__stdcall *)(_DWORD, const char *, _DWORD))v2->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                25,
                "DB Set Error",
                &v2->vfptr);
          }
          v2->vfptr->DirectDispatchToParent(
            (IDirectMessenger *)&v2->vfptr,
            25,
            "DB Set Error",
            (IDirectMessenger *)&v2->vfptr);
          break;
        case 3397:
          if ( v2->m_pkMsgHooker )
          {
            ((void (__stdcall *)(_DWORD, const char *, _DWORD))v2->m_pkMsgHooker->vfptr->SendDirectMessage)(
              25,
              "Participation Recording Error",
              &v2->vfptr);
            if ( v2->m_pkMsgHooker )
              ((void (__stdcall *)(_DWORD, const char *, _DWORD))v2->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                25,
                "Participation Recording Error",
                &v2->vfptr);
          }
          v2->vfptr->DirectDispatchToParent(
            (IDirectMessenger *)&v2->vfptr,
            25,
            "Participation Recording Error",
            (IDirectMessenger *)&v2->vfptr);
          break;
        case 3395:
          v9 = TextData::Get(0xB8C83533);
          if ( v2->m_pkMsgHooker )
          {
            ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v2->m_pkMsgHooker->vfptr->SendDirectMessage)(
              25,
              v9,
              &v2->vfptr);
            if ( v2->m_pkMsgHooker )
              ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v2->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                25,
                v9,
                &v2->vfptr);
          }
          v2->vfptr->DirectDispatchToParent((IDirectMessenger *)&v2->vfptr, 25, v9, (IDirectMessenger *)&v2->vfptr);
          break;
        case 3396:
          v10 = TextData::Get(0x54A4ABA1u);
          if ( v2->m_pkMsgHooker )
          {
            ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v2->m_pkMsgHooker->vfptr->SendDirectMessage)(
              25,
              v10,
              &v2->vfptr);
            if ( v2->m_pkMsgHooker )
              ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v2->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                25,
                v10,
                &v2->vfptr);
          }
          v2->vfptr->DirectDispatchToParent((IDirectMessenger *)&v2->vfptr, 25, v10, (IDirectMessenger *)&v2->vfptr);
          break;
        case 3400:
          v11 = TextData::Get(0x374D4474u);
          if ( v2->m_pkMsgHooker )
          {
            ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v2->m_pkMsgHooker->vfptr->SendDirectMessage)(
              25,
              v11,
              &v2->vfptr);
            if ( v2->m_pkMsgHooker )
              ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v2->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                25,
                v11,
                &v2->vfptr);
          }
          v2->vfptr->DirectDispatchToParent((IDirectMessenger *)&v2->vfptr, 25, v11, (IDirectMessenger *)&v2->vfptr);
          break;
        case 3399:
          v12 = TextData::Get(0x76816B99u);
          if ( v2->m_pkMsgHooker )
          {
            ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v2->m_pkMsgHooker->vfptr->SendDirectMessage)(
              25,
              v12,
              &v2->vfptr);
            if ( v2->m_pkMsgHooker )
              ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v2->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                25,
                v12,
                &v2->vfptr);
          }
          v2->vfptr->DirectDispatchToParent((IDirectMessenger *)&v2->vfptr, 25, v12, (IDirectMessenger *)&v2->vfptr);
          break;
        case 3401:
          v13 = TextData2::Get(0x9CB4AF28);
          if ( v2->m_pkMsgHooker )
          {
            ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v2->m_pkMsgHooker->vfptr->SendDirectMessage)(
              25,
              v13,
              &v2->vfptr);
            if ( v2->m_pkMsgHooker )
              ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v2->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                25,
                v13,
                &v2->vfptr);
          }
          v2->vfptr->DirectDispatchToParent((IDirectMessenger *)&v2->vfptr, 25, v13, (IDirectMessenger *)&v2->vfptr);
          break;
        case 3402:
          v14 = TextData2::Get(0x5D6E54CFu);
          if ( v2->m_pkMsgHooker )
          {
            ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v2->m_pkMsgHooker->vfptr->SendDirectMessage)(
              25,
              v14,
              &v2->vfptr);
            if ( v2->m_pkMsgHooker )
              ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v2->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                25,
                v14,
                &v2->vfptr);
          }
          v2->vfptr->DirectDispatchToParent((IDirectMessenger *)&v2->vfptr, 25, v14, (IDirectMessenger *)&v2->vfptr);
          break;
        default:
          goto LABEL_103;
      }
    }
LABEL_108:
    result = 0;
  }
  return result;
}
// A8C1C0: using guessed type int ITableBase<GUILD_TOURNAMENT_REQUIRE,GTRequireTab>::ms_pkTable;

//----- (006BB6A0) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENTSTART_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENTSTART_CMD *pkCmd)
{
  GuildTask *v2; // esi@1
  int v3; // eax@5
  bool v4; // zf@7
  CClientGuild *v5; // ecx@9
  char *v6; // eax@11
  int v7; // edx@12
  char v8; // cl@13
  int result; // eax@14
  CClientGuild *v10; // ecx@16
  char *v11; // eax@18
  int v12; // edx@19
  char v13; // cl@20
  char *v14; // esi@22
  NiUnsharedGeometryGroup *v15; // edi@22

  v2 = this;
  if ( GuildTask::ms_spGuildTask )
  {
    this->m_GuildTournamentImprove.m_uiGTTType = pkCmd->nGuildTourNamentType;
    this->m_Guild.nNo = pkCmd->nGuildMyRegNumber;
    this->m_GuildTournamentImprove.m_RedTeam = pkCmd->nGuildA;
    this->m_GuildTournamentImprove.m_BlueTeam = pkCmd->nGuildB;
    if ( pkCmd->nGuildA && pkCmd->nGuildB )
    {
      if ( GuildTask::ms_spGuildTask )
        v3 = GuildTask::ms_spGuildTask + 64;
      else
        v3 = 0;
      v4 = *(_DWORD *)(v3 + 12) == pkCmd->nGuildA;
      this->m_GttEnemyInfo.uiStatus = 2;
      if ( v4 )
      {
        if ( GuildTask::ms_spGuildTask )
          v5 = (CClientGuild *)(GuildTask::ms_spGuildTask + 64);
        else
          v5 = 0;
        v6 = CClientGuild::FindGttEnemyInfo(v5, pkCmd->nGuildB);
        if ( v6 )
        {
          v7 = v2->m_GttEnemyInfo.acGuildName - v6;
          do
          {
            v8 = *v6;
            v6[v7] = *v6;
            ++v6;
          }
          while ( v8 );
        }
        v2->m_GttEnemyInfo.GuildRegNo = pkCmd->nGuildB;
        result = 1;
      }
      else
      {
        if ( GuildTask::ms_spGuildTask )
          v10 = (CClientGuild *)(GuildTask::ms_spGuildTask + 64);
        else
          v10 = 0;
        v11 = CClientGuild::FindGttEnemyInfo(v10, pkCmd->nGuildA);
        if ( v11 )
        {
          v12 = v2->m_GttEnemyInfo.acGuildName - v11;
          do
          {
            v13 = *v11;
            v11[v12] = *v11;
            ++v11;
          }
          while ( v13 );
        }
        v2->m_GttEnemyInfo.GuildRegNo = pkCmd->nGuildA;
        result = 1;
      }
    }
    else
    {
      v14 = (char *)&this->vfptr;
      v15 = TextData::Get(0x38281F8Bu);
      if ( *((_DWORD *)v14 + 1) )
      {
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, char *))(**((_DWORD **)v14 + 1) + 4))(
          25,
          v15,
          v14);
        if ( *((_DWORD *)v14 + 1) )
          (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, char *))(**((_DWORD **)v14 + 1) + 20))(
            25,
            v15,
            v14);
      }
      (*(void (__thiscall **)(char *, signed int, NiUnsharedGeometryGroup *, char *))(*(_DWORD *)v14 + 20))(
        v14,
        25,
        v15,
        v14);
      result = 1;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006BB7F0) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_STORAGEWITHDRAW_CMD(GuildTask *this, PROTO_NC_GUILD_STORAGEWITHDRAW_CMD *pkCmd)
{
  int v2; // eax@2
  unsigned int v3; // ecx@3
  int v4; // edi@3
  unsigned int v5; // edx@3
  unsigned int v6; // ecx@3
  unsigned int v7; // edx@3
  int v8; // ebx@3
  int v9; // ecx@5
  int v10; // eax@6
  char v11; // cl@7
  int v12; // ST1C_4@9
  unsigned __int64 v13; // ST14_8@9
  char *v14; // eax@9
  char *v15; // ebx@9
  int v16; // ST1C_4@13
  char *v17; // eax@13
  char *v18; // ebx@13
  unsigned __int64 v19; // ST18_8@19
  int v20; // ST14_4@19
  char *v21; // eax@19
  char *v22; // eax@19
  int v23; // ST1C_4@20
  char *v24; // eax@20
  char *v25; // ebx@21
  int v26; // eax@26
  unsigned int v27; // ecx@27
  int v28; // edi@27
  unsigned int v29; // edx@27
  unsigned int v30; // ecx@27
  unsigned int v31; // edx@27
  int v32; // ebx@27
  int v33; // ecx@29
  int v34; // eax@30
  char v35; // cl@31
  char *v36; // eax@32
  char *v37; // ebx@35
  unsigned int v38; // ecx@40
  unsigned int v39; // edx@40
  unsigned int v40; // eax@40
  unsigned int v41; // ecx@40
  unsigned int v42; // edx@40
  unsigned int v43; // esi@40
  unsigned int v44; // ebx@40
  unsigned int v45; // edi@40
  __int64 v46; // rax@42
  int v47; // eax@42
  char v48; // cl@43
  NiUnsharedGeometryGroup *v49; // eax@44
  NiUnsharedGeometryGroup *v50; // edx@44
  char v51; // cl@45
  unsigned int v52; // eax@46
  char *v53; // edi@46
  char v54; // cl@47
  char *v55; // edi@48
  char v56; // al@49
  __int64 v57; // rax@52
  unsigned int v58; // eax@52
  char *v59; // edi@52
  char v60; // cl@53
  NiUnsharedGeometryGroup *v61; // eax@54
  NiUnsharedGeometryGroup *v62; // ecx@54
  char v63; // dl@55
  unsigned int v64; // eax@56
  NiUnsharedGeometryGroup *v65; // esi@56
  char *v66; // edi@56
  char v67; // cl@57
  char *v68; // edi@58
  char v69; // al@59
  __int64 v70; // rax@62
  unsigned int v71; // eax@62
  char *v72; // edi@62
  char v73; // cl@63
  NiUnsharedGeometryGroup *v74; // eax@64
  NiUnsharedGeometryGroup *v75; // ecx@64
  char v76; // dl@65
  unsigned int v77; // eax@66
  NiUnsharedGeometryGroup *v78; // esi@66
  char *v79; // edi@66
  char v80; // cl@67
  char *v81; // edi@68
  char v82; // al@69
  __int64 v83; // rax@72
  unsigned int v84; // eax@72
  char *v85; // edi@72
  char v86; // cl@73
  NiUnsharedGeometryGroup *v87; // eax@74
  NiUnsharedGeometryGroup *v88; // ecx@74
  char v89; // dl@75
  unsigned int v90; // eax@76
  NiUnsharedGeometryGroup *v91; // esi@76
  char *v92; // edi@76
  char v93; // cl@77
  char *v94; // edi@78
  char v95; // al@79
  char *v96; // eax@81
  char *v97; // edi@81
  char *v99; // [sp-10h] [bp-244h]@32
  _BYTE v100[12]; // [sp-Ch] [bp-240h]@32
  unsigned int Money_4; // [sp+10h] [bp-224h]@40
  GuildTask *v102; // [sp+14h] [bp-220h]@1
  char acStr1[256]; // [sp+18h] [bp-21Ch]@41
  char acStr2[256]; // [sp+118h] [bp-11Ch]@41
  char acCharName[21]; // [sp+218h] [bp-1Ch]@3

  v102 = this;
  if ( !pkCmd->type )
  {
    v2 = pkCmd->item;
    if ( (_WORD)v2 != -1 )
    {
      v3 = pkCmd->charid.n5_code[1];
      v4 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      *(_DWORD *)acCharName = pkCmd->charid.n5_code[0];
      v5 = pkCmd->charid.n5_code[2];
      *(_DWORD *)&acCharName[4] = v3;
      v6 = pkCmd->charid.n5_code[3];
      *(_DWORD *)&acCharName[8] = v5;
      v7 = pkCmd->charid.n5_code[4];
      *(_DWORD *)&acCharName[12] = v6;
      *(_DWORD *)&acCharName[16] = v7;
      v8 = v2;
      acCharName[20] = 0;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v2) )
      {
        if ( (unsigned __int16)v8 <= *(_WORD *)(v4 + 200) )
        {
          v9 = *(_DWORD *)(v4 + 196);
          if ( *(_DWORD *)(v9 + 4 * v8) )
          {
            v10 = *(_DWORD *)(v9 + 4 * v8);
            if ( v10 )
            {
              v11 = pkCmd->isBuy;
              if ( v11 )
              {
                if ( v11 == 1 )
                {
                  if ( pkCmd->lot <= 1 )
                  {
                    v23 = v10 + 34;
                    v24 = (char *)TextData2::Get(0x9496888E);
                    v22 = fs(v24, acCharName, v23);
                  }
                  else
                  {
                    v19 = pkCmd->lot;
                    v20 = v10 + 34;
                    v21 = (char *)TextData2::Get(0xE8E5D4ED);
                    v22 = fs(v21, acCharName, v20, v19);
                  }
                  v25 = v22;
                  if ( v102->m_pkMsgHooker )
                  {
                    ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v102->m_pkMsgHooker->vfptr->SendDirectMessage)(
                      46,
                      v22,
                      &v102->vfptr);
                    if ( v102->m_pkMsgHooker )
                      ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v102->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                        46,
                        v25,
                        &v102->vfptr);
                  }
                  v102->vfptr->DirectDispatchToParent(
                    (IDirectMessenger *)&v102->vfptr,
                    46,
                    v25,
                    (IDirectMessenger *)&v102->vfptr);
                }
              }
              else if ( pkCmd->lot <= 1 )
              {
                v16 = v10 + 34;
                v17 = (char *)TextData::Get(0xDCB8B8CE);
                v18 = fs(v17, acCharName, v16);
                if ( v102->m_pkMsgHooker )
                {
                  ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v102->m_pkMsgHooker->vfptr->SendDirectMessage)(
                    46,
                    v18,
                    &v102->vfptr);
                  if ( v102->m_pkMsgHooker )
                    ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v102->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                      46,
                      v18,
                      &v102->vfptr);
                }
                v102->vfptr->DirectDispatchToParent(
                  (IDirectMessenger *)&v102->vfptr,
                  46,
                  v18,
                  (IDirectMessenger *)&v102->vfptr);
                GuildTournamentStorage::Remove(pkCmd->slot);
                GuildTournamentStorageWin::GTTInvenItemRemoval(v102->m_pkGuildTournamentStorageWin, pkCmd->slot);
              }
              else
              {
                v12 = v10 + 34;
                v13 = pkCmd->lot;
                v14 = (char *)TextData::Get(0x3007042Du);
                v15 = fs(v14, acCharName, v13, v12);
                if ( v102->m_pkMsgHooker )
                {
                  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v102->m_pkMsgHooker->vfptr->SendDirectMessage)(
                    46,
                    v15,
                    &v102->vfptr);
                  if ( v102->m_pkMsgHooker )
                    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v102->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                      46,
                      v15,
                      &v102->vfptr);
                }
                v102->vfptr->DirectDispatchToParent(
                  (IDirectMessenger *)&v102->vfptr,
                  46,
                  v15,
                  (IDirectMessenger *)&v102->vfptr);
              }
            }
          }
        }
      }
    }
  }
  if ( pkCmd->type == 1 )
  {
    v26 = pkCmd->item;
    if ( (_WORD)v26 != -1 )
    {
      v27 = pkCmd->charid.n5_code[1];
      v28 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      *(_DWORD *)acCharName = pkCmd->charid.n5_code[0];
      v29 = pkCmd->charid.n5_code[2];
      *(_DWORD *)&acCharName[4] = v27;
      v30 = pkCmd->charid.n5_code[3];
      *(_DWORD *)&acCharName[8] = v29;
      v31 = pkCmd->charid.n5_code[4];
      *(_DWORD *)&acCharName[12] = v30;
      *(_DWORD *)&acCharName[16] = v31;
      v32 = v26;
      acCharName[20] = 0;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v26) )
      {
        if ( (unsigned __int16)v32 <= *(_WORD *)(v28 + 200) )
        {
          v33 = *(_DWORD *)(v28 + 196);
          if ( *(_DWORD *)(v33 + 4 * v32) )
          {
            v34 = *(_DWORD *)(v33 + 4 * v32);
            if ( v34 )
            {
              v35 = pkCmd->isBuy;
              if ( v35 )
              {
                if ( v35 != 1 )
                  goto LABEL_39;
                *(_QWORD *)&v100[4] = pkCmd->lot;
                *(_DWORD *)v100 = v34 + 34;
                v99 = acCharName;
                v36 = (char *)TextData2::Get(0xE8E5D4ED);
              }
              else
              {
                *(_DWORD *)&v100[8] = v34 + 34;
                *(_QWORD *)v100 = pkCmd->lot;
                v99 = acCharName;
                v36 = (char *)TextData::Get(0x3007042Du);
              }
              v37 = fs(v36, v99, *(_QWORD *)v100, *(_DWORD *)&v100[8]);
              if ( v102->m_pkMsgHooker )
              {
                ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v102->m_pkMsgHooker->vfptr->SendDirectMessage)(
                  46,
                  v37,
                  &v102->vfptr);
                if ( v102->m_pkMsgHooker )
                  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v102->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                    46,
                    v37,
                    &v102->vfptr);
              }
              v102->vfptr->DirectDispatchToParent(
                (IDirectMessenger *)&v102->vfptr,
                46,
                v37,
                (IDirectMessenger *)&v102->vfptr);
            }
          }
        }
      }
    }
  }
LABEL_39:
  if ( pkCmd->type == 2 )
  {
    v38 = pkCmd->charid.n5_code[0];
    v39 = pkCmd->charid.n5_code[1];
    *(_DWORD *)&acCharName[8] = pkCmd->charid.n5_code[2];
    v40 = pkCmd->lot;
    *(_DWORD *)acCharName = v38;
    v41 = pkCmd->charid.n5_code[3];
    *(_DWORD *)&acCharName[4] = v39;
    v42 = pkCmd->charid.n5_code[4];
    v43 = HIDWORD(pkCmd->cen);
    v44 = v40;
    v45 = v43;
    *(_DWORD *)&acCharName[12] = v41;
    *(_DWORD *)&acCharName[16] = v42;
    acCharName[20] = 0;
    Money_4 = v43;
    if ( v43 | v40 )
    {
      memset(acStr1, 0, 0x100u);
      memset(acStr2, 0, 0x100u);
      if ( User::GetGem(__PAIR__(v43, v44)) )
      {
        v46 = User::GetGem(__PAIR__(v43, v44));
        sprintf(acStr1, "%I64d", v46);
        v47 = 0;
        do
        {
          v48 = acStr1[v47];
          acStr2[v47++] = v48;
        }
        while ( v48 );
        v49 = TextData::Get(0x475F9699u);
        v50 = v49;
        do
        {
          v51 = (char)v49->vfptr;
          v49 = (NiUnsharedGeometryGroup *)((char *)v49 + 1);
        }
        while ( v51 );
        v52 = (char *)v49 - (char *)v50;
        v53 = &acStr1[255];
        do
          v54 = (v53++)[1];
        while ( v54 );
        qmemcpy(v53, v50, v52);
        v55 = &acStr1[255];
        do
          v56 = (v55++)[1];
        while ( v56 );
        *v55 = 0;
        v45 = v43;
      }
      if ( User::GetGold(__PAIR__(v45, v44)) )
      {
        v57 = User::GetGold(__PAIR__(v45, v44));
        sprintf(acStr1, "%I64d", v57);
        v58 = strlen(acStr1) + 1;
        v59 = &acStr1[255];
        do
          v60 = (v59++)[1];
        while ( v60 );
        qmemcpy(v59, acStr1, v58);
        v61 = TextData::Get(0x47A395A3u);
        v62 = v61;
        do
        {
          v63 = (char)v61->vfptr;
          v61 = (NiUnsharedGeometryGroup *)((char *)v61 + 1);
        }
        while ( v63 );
        v64 = (char *)v61 - (char *)v62;
        v65 = v62;
        v66 = &acStr1[255];
        do
          v67 = (v66++)[1];
        while ( v67 );
        qmemcpy(v66, v65, v64);
        v68 = &acStr1[255];
        do
          v69 = (v68++)[1];
        while ( v69 );
        *v68 = 0;
        v45 = Money_4;
      }
      if ( User::GetSilver(__PAIR__(v45, v44)) )
      {
        v70 = User::GetSilver(__PAIR__(v45, v44));
        sprintf(acStr1, "%I64d", v70);
        v71 = strlen(acStr1) + 1;
        v72 = &acStr1[255];
        do
          v73 = (v72++)[1];
        while ( v73 );
        qmemcpy(v72, acStr1, v71);
        v74 = TextData::Get(0x98B595EF);
        v75 = v74;
        do
        {
          v76 = (char)v74->vfptr;
          v74 = (NiUnsharedGeometryGroup *)((char *)v74 + 1);
        }
        while ( v76 );
        v77 = (char *)v74 - (char *)v75;
        v78 = v75;
        v79 = &acStr1[255];
        do
          v80 = (v79++)[1];
        while ( v80 );
        qmemcpy(v79, v78, v77);
        v81 = &acStr1[255];
        do
          v82 = (v81++)[1];
        while ( v82 );
        *v81 = 0;
        v45 = Money_4;
      }
      if ( User::GetCopper(__PAIR__(v45, v44)) )
      {
        v83 = User::GetCopper(__PAIR__(Money_4, v44));
        sprintf(acStr1, "%I64d", v83);
        v84 = strlen(acStr1) + 1;
        v85 = &acStr1[255];
        do
          v86 = (v85++)[1];
        while ( v86 );
        qmemcpy(v85, acStr1, v84);
        v87 = TextData::Get(0x88AF99F5);
        v88 = v87;
        do
        {
          v89 = (char)v87->vfptr;
          v87 = (NiUnsharedGeometryGroup *)((char *)v87 + 1);
        }
        while ( v89 );
        v90 = (char *)v87 - (char *)v88;
        v91 = v88;
        v92 = &acStr1[255];
        do
          v93 = (v92++)[1];
        while ( v93 );
        qmemcpy(v92, v91, v90);
        v94 = &acStr1[255];
        do
          v95 = (v94++)[1];
        while ( v95 );
        *v94 = 0;
      }
      v96 = (char *)TextData::Get(0x2AFDFB2Du);
      v97 = fs(v96, acCharName, acStr2);
      if ( v102->m_pkMsgHooker )
      {
        ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v102->m_pkMsgHooker->vfptr->SendDirectMessage)(
          46,
          v97,
          &v102->vfptr);
        if ( v102->m_pkMsgHooker )
          ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v102->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            46,
            v97,
            &v102->vfptr);
      }
      v102->vfptr->DirectDispatchToParent((IDirectMessenger *)&v102->vfptr, 46, v97, (IDirectMessenger *)&v102->vfptr);
    }
  }
  return 0;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (006BBF00) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_ITEM_GUILD_STORAGE_WITHDRAW_ACK(GuildTask *this, PROTO_NC_ITEM_GUILD_STORAGE_WITHDRAW_ACK *pkProto)
{
  GuildTask *v2; // esi@1
  unsigned __int16 v3; // cx@1
  int result; // eax@2
  int v5; // esi@4
  NiUnsharedGeometryGroup *v6; // edi@4
  int v7; // esi@9
  NiUnsharedGeometryGroup *v8; // edi@9
  int v9; // esi@14
  NiUnsharedGeometryGroup *v10; // edi@14
  int v11; // esi@18
  NiUnsharedGeometryGroup *v12; // edi@18

  v2 = this;
  v3 = pkProto->err;
  switch ( v3 )
  {
    case 0x1480u:
      GuildTournamentStorage::SetMoney(pkProto->cen);
      result = 1;
      break;
    case 0x1481u:
      v5 = (int)&v2->vfptr;
      v6 = TextData::Get(0x623167Fu);
      if ( *(_DWORD *)(v5 + 4) )
      {
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v5 + 4) + 4))(25, v6, v5);
        if ( *(_DWORD *)(v5 + 4) )
          (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v5 + 4) + 20))(25, v6, v5);
      }
      (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v5 + 20))(v5, 25, v6, v5);
      result = 1;
      break;
    case 0x1482u:
      v7 = (int)&v2->vfptr;
      v8 = TextData::Get(0xA3BFB711);
      if ( *(_DWORD *)(v7 + 4) )
      {
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v7 + 4) + 4))(25, v8, v7);
        if ( *(_DWORD *)(v7 + 4) )
          (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v7 + 4) + 20))(25, v8, v7);
      }
      (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v7 + 20))(v7, 25, v8, v7);
      result = 1;
      break;
    case 0x1483u:
      v9 = (int)&v2->vfptr;
      v10 = TextData::Get(0xC62C0E33);
      if ( *(_DWORD *)(v9 + 4) )
      {
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v9 + 4) + 4))(25, v10, v9);
        if ( *(_DWORD *)(v9 + 4) )
          (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v9 + 4) + 20))(25, v10, v9);
      }
      (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v9 + 20))(v9, 25, v10, v9);
      result = 1;
      break;
    default:
      pkProto->err = 5252;
      v11 = (int)&v2->vfptr;
      v12 = TextData::Get(0x7DCBCCE1u);
      if ( *(_DWORD *)(v11 + 4) )
      {
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v11 + 4) + 4))(25, v12, v11);
        if ( *(_DWORD *)(v11 + 4) )
          (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v11 + 4) + 20))(
            25,
            v12,
            v11);
      }
      (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v11 + 20))(v11, 25, v12, v11);
      result = 1;
      break;
  }
  return result;
}

//----- (006BC0A0) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_RECALL_ENTER_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_RECALL_ENTER_CMD *pkCmd)
{
  GuildTask *v2; // esi@1
  char *v3; // eax@1
  MsgBox *v4; // eax@1
  int v5; // edx@2
  int result; // eax@4

  v2 = this;
  v3 = (char *)TextData::Get(0xCDD2133D);
  v4 = MsgBox::Modeless(MSGBOX_OKCANCEL, v3);
  if ( v2 )
    v5 = (int)&v2->vfptr;
  else
    v5 = 0;
  ((void (__stdcall *)(int))v4->vfptr->SetMsgHooker)(v5);
  result = 1;
  v2->m_bRecall = 1;
  return result;
}

//----- (006BC0E0) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_RECALL_ENTER_ACK(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_RECALL_ENTER_ACK *pkProto)
{
  int v2; // eax@1
  GuildTask *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@3
  int v5; // esi@5
  NiUnsharedGeometryGroup *v6; // edi@5

  v2 = pkProto->err;
  v3 = this;
  if ( (_WORD)v2 != 5184 )
  {
    if ( v2 == 5188 )
      v4 = TextData::Get(0x80CAB5D5);
    else
      v4 = (NiUnsharedGeometryGroup *)fs("Error : %d\n", v2);
    v5 = (int)&v3->vfptr;
    v6 = v4;
    if ( *(_DWORD *)(v5 + 4) )
    {
      (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v5 + 4) + 4))(25, v4, v5);
      if ( *(_DWORD *)(v5 + 4) )
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v5 + 4) + 20))(25, v6, v5);
    }
    (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v5 + 20))(v5, 25, v6, v5);
  }
  return 1;
}

//----- (006BC160) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_RETYPE_ACK(GuildTask *this, PROTO_NC_GUILD_RETYPE_ACK *pkAck)
{
  GuildTask *v2; // esi@1
  NiUnsharedGeometryGroup *v3; // eax@2
  int v4; // esi@4
  NiUnsharedGeometryGroup *v5; // edi@4

  v2 = this;
  if ( 6744 == pkAck->err )
    v3 = TextData2::Get(0xC7401B23);
  else
    v3 = (NiUnsharedGeometryGroup *)ErrMsgTable::GetErrMsg(pkAck->err);
  v4 = (int)&v2->vfptr;
  v5 = v3;
  if ( *(_DWORD *)(v4 + 4) )
  {
    (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v4 + 4) + 4))(25, v3, v4);
    if ( *(_DWORD *)(v4 + 4) )
      (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v4 + 4) + 20))(25, v5, v4);
  }
  (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v4 + 20))(v4, 25, v5, v4);
  return 1;
}

//----- (006BC1E0) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_MY_GUILD_TOURNAMENT_MATCH_TIME_ACK(GuildTask *this, PROTO_NC_GUILD_MY_GUILD_TOURNAMENT_MATCH_TIME_ACK *pkAck)
{
  PgFrameWork *v2; // esi@2
  char v3; // al@2
  char v4; // al@6
  NiUnsharedGeometryGroup *v5; // eax@13
  GuildWin *v7; // esi@18
  char *v8; // eax@18
  char v9; // al@20
  GuildWin *v10; // esi@22
  int v11; // ST0C_4@22
  char *v12; // eax@22
  char *v13; // eax@22
  char *v14; // esi@23
  char *v15; // edi@23
  unsigned int v16; // [sp-4h] [bp-50h]@4
  char acTime[64]; // [sp+8h] [bp-44h]@13

  if ( pkAck->Error == 7016 )
  {
    v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v3 = pkAck->GTCondInfo.nMyGTCondition;
    if ( v3 )
    {
      switch ( v3 )
      {
        case 1:
          v4 = pkAck->GTCondInfo.bIsJoin;
          if ( v4 )
          {
            if ( v4 == 1 && v2 )
            {
              v16 = -1767246095;
              goto LABEL_18;
            }
          }
          else if ( v2 )
          {
            v16 = -1970695548;
            goto LABEL_18;
          }
          break;
        case 2:
          memset(acTime, 0, 0x40u);
          v5 = TextData2::Get(0x7AA78EA3u);
          strftime(acTime, 0x40u, (const char *)v5, &pkAck->GTCondInfo.tm_nMatchTime);
          if ( v2 )
          {
            GuildWin::SetNextJoinTime((GuildWin *)v2[24].vfptr, acTime);
            return 0;
          }
          break;
        case 3:
          if ( v2 )
          {
            v16 = -352651715;
            goto LABEL_18;
          }
          break;
        case 4:
          v9 = pkAck->GTCondInfo.nGTGrade;
          if ( v9 )
          {
            if ( v2 )
            {
              v10 = (GuildWin *)v2[24].vfptr;
              v11 = (unsigned __int8)v9;
              v12 = (char *)TextData2::Get(0xE0FDFDFB);
              v13 = fs(v12, v11);
              GuildWin::SetNextJoinTime(v10, v13);
              return 0;
            }
          }
          break;
      }
    }
    else if ( v2 )
    {
      v16 = 776245648;
LABEL_18:
      v7 = (GuildWin *)v2[24].vfptr;
      v8 = (char *)TextData2::Get(v16);
      GuildWin::SetNextJoinTime(v7, v8);
      return 0;
    }
  }
  else
  {
    v14 = (char *)&this->vfptr;
    v15 = ErrMsgTable::GetErrMsg(pkAck->Error);
    if ( *((_DWORD *)v14 + 1) )
    {
      (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v14 + 1) + 4))(25, v15, v14);
      if ( *((_DWORD *)v14 + 1) )
        (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v14 + 1) + 20))(25, v15, v14);
    }
    (*(void (__thiscall **)(char *, signed int, char *, char *))(*(_DWORD *)v14 + 20))(v14, 25, v15, v14);
  }
  return 0;
}

//----- (006BC3B0) --------------------------------------------------------
int __userpurge GuildTask::Recv_NC_GUILD_TOURNAMENT_PLAYERDIEMSG_CMD@<eax>(GuildTask *this@<ecx>, int a2@<edi>, PROTO_NC_GUILD_TOURNAMENT_PLAYERDIEMSG_CMD *pkCmd)
{
  GuildTask *v3; // ebx@1
  unsigned int v4; // ecx@2
  unsigned int v5; // edx@2
  unsigned int v6; // eax@2
  unsigned int v7; // ecx@2
  unsigned int v8; // eax@2
  unsigned int v9; // edx@2
  unsigned int v10; // ecx@2
  unsigned int v11; // eax@2
  unsigned int v12; // edx@2
  char *v13; // eax@3
  char *v14; // eax@3
  char *v15; // eax@5
  char *v16; // edi@5
  char *v17; // eax@9
  char *v18; // edi@10
  char acName2[21]; // [sp+8h] [bp-34h]@2
  char acName[21]; // [sp+20h] [bp-1Ch]@2

  v3 = this;
  if ( !pkCmd )
    return 0;
  v4 = pkCmd->MurderCharID.n5_code[1];
  v5 = pkCmd->MurderCharID.n5_code[2];
  *(_DWORD *)acName = pkCmd->MurderCharID.n5_code[0];
  v6 = pkCmd->MurderCharID.n5_code[3];
  *(_DWORD *)&acName[4] = v4;
  v7 = pkCmd->MurderCharID.n5_code[4];
  *(_DWORD *)&acName[12] = v6;
  v8 = pkCmd->VictimCharID.n5_code[1];
  *(_DWORD *)&acName[8] = v5;
  v9 = pkCmd->VictimCharID.n5_code[0];
  *(_DWORD *)&acName[16] = v7;
  v10 = pkCmd->VictimCharID.n5_code[2];
  *(_DWORD *)&acName2[4] = v8;
  v11 = pkCmd->VictimCharID.n5_code[4];
  *(_DWORD *)acName2 = v9;
  v12 = pkCmd->VictimCharID.n5_code[3];
  *(_DWORD *)&acName2[8] = v10;
  *(_DWORD *)&acName2[16] = v11;
  acName[20] = 0;
  *(_DWORD *)&acName2[12] = v12;
  acName2[20] = 0;
  if ( !strcmp((const char *)((int (__stdcall *)(int))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)(a2), acName2) )
  {
    v13 = (char *)TextData2::Get(0xE5F5EC07);
    v14 = fs(v13, acName);
    goto LABEL_10;
  }
  if ( pkCmd->VictimGuildGrade )
  {
    v17 = (char *)TextData2::Get(0x90A3A8ED);
    v14 = fs(v17, acName2, acName);
LABEL_10:
    v18 = v14;
    if ( v3->m_pkMsgHooker )
    {
      ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v3->m_pkMsgHooker->vfptr->SendDirectMessage)(
        25,
        v14,
        &v3->vfptr);
      if ( v3->m_pkMsgHooker )
        ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v3->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          25,
          v18,
          &v3->vfptr);
    }
    ((void (__thiscall *)(IDirectMessengerVtbl **, signed int, char *))v3->vfptr->DirectDispatchToParent)(
      &v3->vfptr,
      25,
      v18);
    return 0;
  }
  v15 = (char *)TextData2::Get(0x4F3D8783u);
  v16 = fs(v15, acName, acName2);
  if ( v3->m_pkMsgHooker )
  {
    ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v3->m_pkMsgHooker->vfptr->SendDirectMessage)(
      25,
      v16,
      &v3->vfptr);
    if ( v3->m_pkMsgHooker )
      ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v3->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
        25,
        v16,
        &v3->vfptr);
  }
  ((void (__thiscall *)(IDirectMessengerVtbl **, signed int, char *))v3->vfptr->DirectDispatchToParent)(
    &v3->vfptr,
    25,
    v16);
  return 0;
}
// 6BC3B0: could not find valid save-restore pair for edi

//----- (006BC540) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_MANAGERUSERMSG_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_MANAGERUSERMSG_CMD *pkCmd)
{
  GuildTask *v2; // esi@1
  unsigned int v3; // edx@2
  unsigned int v4; // eax@2
  char *v5; // eax@2
  int v6; // esi@2
  char *v7; // edi@2
  char acName[21]; // [sp+4h] [bp-1Ch]@2

  v2 = this;
  if ( pkCmd )
  {
    v3 = pkCmd->CharID.n5_code[1];
    *(_DWORD *)acName = pkCmd->CharID.n5_code[0];
    *(_DWORD *)&acName[8] = pkCmd->CharID.n5_code[2];
    *(_DWORD *)&acName[4] = v3;
    v4 = pkCmd->CharID.n5_code[4];
    *(_DWORD *)&acName[12] = pkCmd->CharID.n5_code[3];
    *(_DWORD *)&acName[16] = v4;
    acName[20] = 0;
    v5 = (char *)TextData2::Get(0x91849698);
    v6 = (int)&v2->vfptr;
    v7 = fs(v5, acName);
    if ( *(_DWORD *)(v6 + 4) )
    {
      (*(void (__stdcall **)(signed int, char *, int))(**(_DWORD **)(v6 + 4) + 4))(25, v7, v6);
      if ( *(_DWORD *)(v6 + 4) )
        (*(void (__stdcall **)(signed int, char *, int))(**(_DWORD **)(v6 + 4) + 20))(25, v7, v6);
    }
    (*(void (__thiscall **)(int, signed int, char *, int))(*(_DWORD *)v6 + 20))(v6, 25, v7, v6);
  }
  return 0;
}

//----- (006BC5F0) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_PLAYERKILLMSG_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_PLAYERKILLMSG_CMD *pkCmd)
{
  GuildTask *v2; // esi@1
  unsigned int v3; // edx@2
  unsigned int v4; // ecx@2
  unsigned int v5; // edx@2
  unsigned int v6; // ecx@2
  unsigned int v7; // edx@2
  unsigned int v8; // ecx@2
  unsigned int v9; // edx@2
  unsigned int v10; // ecx@2
  unsigned int v11; // edx@2
  char *v12; // eax@2
  int v13; // esi@2
  char *v14; // edi@2
  char acName[21]; // [sp+4h] [bp-34h]@2
  char acName2[21]; // [sp+1Ch] [bp-1Ch]@2

  v2 = this;
  if ( pkCmd )
  {
    v3 = pkCmd->MurderCharID.n5_code[1];
    *(_DWORD *)acName = pkCmd->MurderCharID.n5_code[0];
    v4 = pkCmd->MurderCharID.n5_code[2];
    *(_DWORD *)&acName[4] = v3;
    v5 = pkCmd->MurderCharID.n5_code[3];
    *(_DWORD *)&acName[8] = v4;
    v6 = pkCmd->MurderCharID.n5_code[4];
    *(_DWORD *)&acName[12] = v5;
    v7 = pkCmd->VictimCharID.n5_code[0];
    *(_DWORD *)&acName[16] = v6;
    v8 = pkCmd->VictimCharID.n5_code[1];
    *(_DWORD *)acName2 = v7;
    v9 = pkCmd->VictimCharID.n5_code[2];
    *(_DWORD *)&acName2[4] = v8;
    v10 = pkCmd->VictimCharID.n5_code[3];
    *(_DWORD *)&acName2[8] = v9;
    v11 = pkCmd->VictimCharID.n5_code[4];
    *(_DWORD *)&acName2[12] = v10;
    acName[20] = 0;
    *(_DWORD *)&acName2[16] = v11;
    acName2[20] = 0;
    v12 = (char *)TextData2::Get(0xDD093B47);
    v13 = (int)&v2->vfptr;
    v14 = fs(v12, acName, acName2);
    if ( *(_DWORD *)(v13 + 4) )
    {
      (*(void (__stdcall **)(signed int, char *, int))(**(_DWORD **)(v13 + 4) + 4))(25, v14, v13);
      if ( *(_DWORD *)(v13 + 4) )
        (*(void (__stdcall **)(signed int, char *, int))(**(_DWORD **)(v13 + 4) + 20))(25, v14, v13);
    }
    (*(void (__thiscall **)(int, signed int, char *, int))(*(_DWORD *)v13 + 20))(v13, 25, v14, v13);
  }
  return 0;
}

//----- (006BC6C0) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_ITEM_PICK_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_ITEM_PICK_CMD *pkCmd)
{
  GuildTask *v2; // esi@1
  GTIView *v3; // eax@1
  int v4; // ST08_4@2
  char *v5; // eax@2
  int v6; // esi@2
  char *v7; // edi@2
  int result; // eax@5

  v2 = this;
  v3 = GTIViewInfoTab::GetByIndex(pkCmd->GTIiemID);
  if ( v3 )
  {
    v4 = (int)v3->Name;
    v5 = (char *)TextData2::Get(0xE56A1C4F);
    v6 = (int)&v2->vfptr;
    v7 = fs(v5, v4);
    if ( *(_DWORD *)(v6 + 4) )
    {
      (*(void (__stdcall **)(signed int, char *, int))(**(_DWORD **)(v6 + 4) + 4))(25, v7, v6);
      if ( *(_DWORD *)(v6 + 4) )
        (*(void (__stdcall **)(signed int, char *, int))(**(_DWORD **)(v6 + 4) + 20))(25, v7, v6);
    }
    (*(void (__thiscall **)(int, signed int, char *, int))(*(_DWORD *)v6 + 20))(v6, 25, v7, v6);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006BC740) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_ITEM_EFFECT_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_ITEM_EFFECT_CMD *pkCmd)
{
  GuildTask *v2; // esi@1
  GTIView *v3; // eax@1
  char v4; // cl@2
  char *v5; // eax@3
  int v6; // esi@6
  char *v7; // edi@6
  int v9; // [sp-8h] [bp-Ch]@3

  v2 = this;
  v3 = GTIViewInfoTab::GetByIndex(pkCmd->GTIiemID);
  if ( v3 )
  {
    v4 = v3->Advantage;
    if ( v4 == 1 )
    {
      v9 = (int)v3->Name;
      v5 = (char *)TextData2::Get(0x65F1CADCu);
    }
    else
    {
      if ( v4 != 2 )
        return 1;
      v9 = (int)v3->Name;
      v5 = (char *)TextData2::Get(0xADF1D9C9);
    }
    v6 = (int)&v2->vfptr;
    v7 = fs(v5, v9);
    if ( *(_DWORD *)(v6 + 4) )
    {
      (*(void (__stdcall **)(signed int, char *, int))(**(_DWORD **)(v6 + 4) + 4))(25, v7, v6);
      if ( *(_DWORD *)(v6 + 4) )
        (*(void (__stdcall **)(signed int, char *, int))(**(_DWORD **)(v6 + 4) + 20))(25, v7, v6);
    }
    (*(void (__thiscall **)(int, signed int, char *, int))(*(_DWORD *)v6 + 20))(v6, 25, v7, v6);
    return 1;
  }
  return 0;
}

//----- (006BC7E0) --------------------------------------------------------
int __stdcall GuildTask::Recv_NC_GUILD_TOURNAMENT_REFUND_NOTICE_CMD(PROTO_NC_GUILD_TOURNAMENT_REFUND_NOTICE_CMD *pkCmd)
{
  __int64 v2; // rdi@1
  unsigned int v3; // ebx@1
  unsigned int v4; // esi@2
  __int64 v5; // rax@3
  int v6; // eax@3
  char v7; // cl@4
  NiUnsharedGeometryGroup *v8; // eax@5
  NiUnsharedGeometryGroup *v9; // edx@5
  char v10; // cl@6
  unsigned int v11; // eax@7
  char *v12; // edi@7
  char v13; // cl@8
  char *v14; // edi@9
  char v15; // al@10
  __int64 v16; // rax@13
  unsigned int v17; // eax@13
  char *v18; // edi@13
  char v19; // cl@14
  NiUnsharedGeometryGroup *v20; // eax@15
  NiUnsharedGeometryGroup *v21; // ecx@15
  char v22; // dl@16
  unsigned int v23; // eax@17
  NiUnsharedGeometryGroup *v24; // esi@17
  char *v25; // edi@17
  char v26; // cl@18
  char *v27; // edi@19
  char v28; // al@20
  __int64 v29; // rax@23
  unsigned int v30; // eax@23
  char *v31; // edi@23
  char v32; // cl@24
  NiUnsharedGeometryGroup *v33; // eax@25
  NiUnsharedGeometryGroup *v34; // ecx@25
  char v35; // dl@26
  unsigned int v36; // eax@27
  NiUnsharedGeometryGroup *v37; // esi@27
  char *v38; // edi@27
  char v39; // cl@28
  char *v40; // edi@29
  char v41; // al@30
  __int64 v42; // rax@33
  unsigned int v43; // eax@33
  char *v44; // edi@33
  char v45; // cl@34
  NiUnsharedGeometryGroup *v46; // eax@35
  NiUnsharedGeometryGroup *v47; // ecx@35
  char v48; // dl@36
  unsigned int v49; // eax@37
  NiUnsharedGeometryGroup *v50; // esi@37
  char *v51; // edi@37
  char v52; // cl@38
  char *v53; // edi@39
  char v54; // al@40
  char *v55; // eax@42
  char *v56; // eax@42
  unsigned int Money_4; // [sp+10h] [bp-208h]@1
  char acStr1[256]; // [sp+14h] [bp-204h]@1
  char acStr2[256]; // [sp+114h] [bp-104h]@1

  HIDWORD(v2) = pkCmd->nRefundMoney;
  LODWORD(v2) = HIDWORD(pkCmd->nRefundMoney);
  v3 = pkCmd->nRefundMoney;
  Money_4 = HIDWORD(pkCmd->nRefundMoney);
  memset(acStr1, 0, 0x100u);
  memset(acStr2, 0, 0x100u);
  if ( v2 )
  {
    HIDWORD(v2) = v2;
    if ( User::GetGem(__PAIR__(v2, v3)) )
    {
      v5 = User::GetGem(__PAIR__(v2, v3));
      sprintf(acStr1, "%I64d", v5);
      v6 = 0;
      do
      {
        v7 = acStr1[v6];
        acStr2[v6++] = v7;
      }
      while ( v7 );
      v8 = TextData::Get(0x475F9699u);
      v9 = v8;
      do
      {
        v10 = (char)v8->vfptr;
        v8 = (NiUnsharedGeometryGroup *)((char *)v8 + 1);
      }
      while ( v10 );
      v11 = (char *)v8 - (char *)v9;
      v12 = &acStr1[255];
      do
        v13 = (v12++)[1];
      while ( v13 );
      qmemcpy(v12, v9, v11);
      v14 = &acStr1[255];
      do
        v15 = (v14++)[1];
      while ( v15 );
      v4 = Money_4;
      *v14 = 0;
    }
    if ( User::GetGold(__PAIR__(v4, v3)) )
    {
      v16 = User::GetGold(__PAIR__(v4, v3));
      sprintf(acStr1, "%I64d", v16);
      v17 = strlen(acStr1) + 1;
      v18 = &acStr1[255];
      do
        v19 = (v18++)[1];
      while ( v19 );
      qmemcpy(v18, acStr1, v17);
      v20 = TextData::Get(0x47A395A3u);
      v21 = v20;
      do
      {
        v22 = (char)v20->vfptr;
        v20 = (NiUnsharedGeometryGroup *)((char *)v20 + 1);
      }
      while ( v22 );
      v23 = (char *)v20 - (char *)v21;
      v24 = v21;
      v25 = &acStr1[255];
      do
        v26 = (v25++)[1];
      while ( v26 );
      qmemcpy(v25, v24, v23);
      v27 = &acStr1[255];
      do
        v28 = (v27++)[1];
      while ( v28 );
      v4 = Money_4;
      *v27 = 0;
    }
    if ( User::GetSilver(__PAIR__(v4, v3)) )
    {
      v29 = User::GetSilver(__PAIR__(v4, v3));
      sprintf(acStr1, "%I64d", v29);
      v30 = strlen(acStr1) + 1;
      v31 = &acStr1[255];
      do
        v32 = (v31++)[1];
      while ( v32 );
      qmemcpy(v31, acStr1, v30);
      v33 = TextData::Get(0x98B595EF);
      v34 = v33;
      do
      {
        v35 = (char)v33->vfptr;
        v33 = (NiUnsharedGeometryGroup *)((char *)v33 + 1);
      }
      while ( v35 );
      v36 = (char *)v33 - (char *)v34;
      v37 = v34;
      v38 = &acStr1[255];
      do
        v39 = (v38++)[1];
      while ( v39 );
      qmemcpy(v38, v37, v36);
      v40 = &acStr1[255];
      do
        v41 = (v40++)[1];
      while ( v41 );
      v4 = Money_4;
      *v40 = 0;
    }
    if ( User::GetCopper(__PAIR__(v4, v3)) )
    {
      v42 = User::GetCopper(__PAIR__(v4, v3));
      sprintf(acStr1, "%I64d", v42);
      v43 = strlen(acStr1) + 1;
      v44 = &acStr1[255];
      do
        v45 = (v44++)[1];
      while ( v45 );
      qmemcpy(v44, acStr1, v43);
      v46 = TextData::Get(0x88AF99F5);
      v47 = v46;
      do
      {
        v48 = (char)v46->vfptr;
        v46 = (NiUnsharedGeometryGroup *)((char *)v46 + 1);
      }
      while ( v48 );
      v49 = (char *)v46 - (char *)v47;
      v50 = v47;
      v51 = &acStr1[255];
      do
        v52 = (v51++)[1];
      while ( v52 );
      qmemcpy(v51, v50, v49);
      v53 = &acStr1[255];
      do
        v54 = (v53++)[1];
      while ( v54 );
      *v53 = 0;
    }
  }
  v55 = (char *)TextData2::Get(0xD0FFFDEE);
  v56 = fs(v55, acStr2);
  MsgBox::Modeless(MSGBOX_OK, v56);
  return 1;
}

//----- (006BCB50) --------------------------------------------------------
GameFrameWork *__thiscall GuildTask::Recv_NC_GUILD_EMBLEM_CHECK_AVAILABILITY_ACK(GuildTask *this, PROTO_NC_GUILD_EMBLEM_CHECK_AVAILABILITY_ACK *pkCmd)
{
  GameFrameWork *result; // eax@1
  int v3; // eax@2
  char *v4; // esi@4
  NiUnsharedGeometryGroup *v5; // edi@4
  char *v6; // esi@8
  NiUnsharedGeometryGroup *v7; // edi@8
  char *v8; // esi@12
  NiUnsharedGeometryGroup *v9; // edi@12
  char *v10; // esi@16
  NiUnsharedGeometryGroup *v11; // edi@16

  result = (GameFrameWork *)pkCmd;
  if ( pkCmd )
  {
    v3 = pkCmd->Error;
    if ( (_WORD)v3 == 14080 )
    {
      result = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( result )
      {
        GameFrameWork::GuildEmblemShowWin(result, 1);
LABEL_22:
        result = (GameFrameWork *)1;
      }
    }
    else
    {
      switch ( v3 )
      {
        case 14081:
          v4 = (char *)&this->vfptr;
          v5 = TextData3::Get(0x73A38DDBu);
          if ( *((_DWORD *)v4 + 1) )
          {
            (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, char *))(**((_DWORD **)v4 + 1) + 4))(
              25,
              v5,
              v4);
            if ( *((_DWORD *)v4 + 1) )
              (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, char *))(**((_DWORD **)v4 + 1) + 20))(
                25,
                v5,
                v4);
          }
          (*(void (__thiscall **)(char *, signed int, NiUnsharedGeometryGroup *, char *))(*(_DWORD *)v4 + 20))(
            v4,
            25,
            v5,
            v4);
          result = (GameFrameWork *)1;
          break;
        case 14082:
          v6 = (char *)&this->vfptr;
          v7 = TextData3::Get(0xC0EE4A29);
          if ( *((_DWORD *)v6 + 1) )
          {
            (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, char *))(**((_DWORD **)v6 + 1) + 4))(
              25,
              v7,
              v6);
            if ( *((_DWORD *)v6 + 1) )
              (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, char *))(**((_DWORD **)v6 + 1) + 20))(
                25,
                v7,
                v6);
          }
          (*(void (__thiscall **)(char *, signed int, NiUnsharedGeometryGroup *, char *))(*(_DWORD *)v6 + 20))(
            v6,
            25,
            v7,
            v6);
          result = (GameFrameWork *)1;
          break;
        case 14083:
          v8 = (char *)&this->vfptr;
          v9 = TextData3::Get(0xC44F1605);
          if ( *((_DWORD *)v8 + 1) )
          {
            (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, char *))(**((_DWORD **)v8 + 1) + 4))(
              25,
              v9,
              v8);
            if ( *((_DWORD *)v8 + 1) )
              (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, char *))(**((_DWORD **)v8 + 1) + 20))(
                25,
                v9,
                v8);
          }
          (*(void (__thiscall **)(char *, signed int, NiUnsharedGeometryGroup *, char *))(*(_DWORD *)v8 + 20))(
            v8,
            25,
            v9,
            v8);
          result = (GameFrameWork *)1;
          break;
        case 14084:
          v10 = (char *)&this->vfptr;
          v11 = TextData3::Get(0x4FA1A77Au);
          if ( *((_DWORD *)v10 + 1) )
          {
            (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, char *))(**((_DWORD **)v10 + 1) + 4))(
              25,
              v11,
              v10);
            if ( *((_DWORD *)v10 + 1) )
              (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, char *))(**((_DWORD **)v10 + 1) + 20))(
                25,
                v11,
                v10);
          }
          (*(void (__thiscall **)(char *, signed int, NiUnsharedGeometryGroup *, char *))(*(_DWORD *)v10 + 20))(
            v10,
            25,
            v11,
            v10);
          result = (GameFrameWork *)1;
          break;
        default:
          goto LABEL_22;
      }
    }
  }
  return result;
}

//----- (006BCD10) --------------------------------------------------------
PROTO_NC_GUILD_EMBLEM_SAVE_ACK *__thiscall GuildTask::Recv_NC_GUILD_EMBLEM_SAVE_ACK(GuildTask *this, PROTO_NC_GUILD_EMBLEM_SAVE_ACK *pkCmd)
{
  PROTO_NC_GUILD_EMBLEM_SAVE_ACK *result; // eax@1
  GuildTask *v3; // esi@1
  int v4; // eax@2
  PgFrameWork *v5; // eax@8
  NiUnsharedGeometryGroup *v6; // eax@4
  int v7; // esi@12
  NiUnsharedGeometryGroup *v8; // edi@12

  result = pkCmd;
  v3 = this;
  if ( pkCmd )
  {
    v4 = pkCmd->Error;
    if ( (_WORD)v4 == 14080 )
    {
      v5 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( !v5 || !v5[143].m_kMsgQ.m_pBase )
        return 0;
      GuildEmblemWin::OnCancelWin();
      v6 = TextData3::Get(0x73A0EFE7u);
LABEL_12:
      v7 = (int)&v3->vfptr;
      v8 = v6;
      if ( *(_DWORD *)(v7 + 4) )
      {
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v7 + 4) + 4))(25, v6, v7);
        if ( *(_DWORD *)(v7 + 4) )
          (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v7 + 4) + 20))(25, v8, v7);
      }
      (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v7 + 20))(v7, 25, v8, v7);
    }
    else
    {
      switch ( v4 )
      {
        case 14081:
          v6 = TextData3::Get(0x73A38DDBu);
          goto LABEL_12;
        case 14082:
          v6 = TextData3::Get(0xC0EE4A29);
          goto LABEL_12;
        case 14083:
          v6 = TextData3::Get(0xC44F1605);
          goto LABEL_12;
        case 14084:
          v6 = TextData3::Get(0x4FA1A77Au);
          goto LABEL_12;
        default:
          break;
      }
    }
    result = (PROTO_NC_GUILD_EMBLEM_SAVE_ACK *)1;
  }
  return result;
}

//----- (006BCDF0) --------------------------------------------------------
void __thiscall CClientGuild::ClearHistoryList(CClientGuild *this)
{
  CClientGuild *v1; // edi@1
  NiTListItem<GUILD_HISTORY *> *v2; // esi@1
  unsigned int v3; // ebx@2
  GUILD_HISTORY *v4; // eax@3
  NiTListItem<GUILD_HISTORY *> **v5; // esi@6
  NiTListItem<GUILD_HISTORY *> *v6; // ST04_4@7

  v1 = this;
  v2 = this->m_kHistoryList.m_pkHead;
  if ( this->m_kHistoryList.m_kAllocator.m_uiCount )
  {
    v3 = this->m_kHistoryList.m_kAllocator.m_uiCount;
    do
    {
      v4 = v2->m_element;
      v2 = v2->m_pkNext;
      if ( v4 )
        operator delete(v4);
      --v3;
    }
    while ( v3 );
  }
  v5 = &v1->m_kHistoryList.m_pkHead->m_pkNext;
  while ( v5 )
  {
    v6 = (NiTListItem<GUILD_HISTORY *> *)v5;
    v5 = (NiTListItem<GUILD_HISTORY *> **)*v5;
    v1->m_kHistoryList.vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *> *)&v1->m_kHistoryList,
      v6);
  }
  v1->m_kHistoryList.m_kAllocator.m_uiCount = 0;
  v1->m_kHistoryList.m_pkHead = 0;
  v1->m_kHistoryList.m_pkTail = 0;
}

//----- (006BCE60) --------------------------------------------------------
void __thiscall GuildTask::~GuildTask(GuildTask *this)
{
  GuildTask *v1; // esi@1
  GuildNameCache *v2; // edi@1
  GuildNameCache *v3; // edi@6
  GuildMemberTask *v4; // edi@10
  NiNode *v5; // edi@14
  NiNode *v6; // edi@18
  NiNode *v7; // edi@22

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildTask::`vftable'{for `NiRefObject'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildTask::`vftable'{for `IDirectMessenger'};
  this->vfptr = (CGuildVtbl *)&GuildTask::`vftable';
  v2 = this->m_spGuildNameCache.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spGuildNameCache.m_pObject = 0;
  }
  CClientGuild::ClearHistoryList((CClientGuild *)&v1->vfptr);
  v3 = v1->m_spGuildNameCache.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v4 = v1->m_spGuildMemberTask.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v5 = v1->m_pGTLoseEffect.m_pObject;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  v6 = v1->m_pGTWinEffect.m_pObject;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  v7 = v1->m_pGTStartEffect.m_pObject;
  if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  CClientGuild::~CClientGuild((CClientGuild *)&v1->vfptr);
  ITask::~ITask((ITask *)&v1->vfptr);
}
// 9BF41C: using guessed type int (__thiscall *GuildTask::`vftable')(GuildTask *this, PROTO_NC_GUILD_MAKE_ACK *pkProto);
// 9BF470: using guessed type void (__thiscall *GuildTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9BF48C: using guessed type int (__thiscall *GuildTask::`vftable'{for `NiRefObject'})(void *p, char);

//----- (006BCFE0) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_RESULT_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_RESULT_CMD *pkCmd)
{
  int v2; // eax@1
  GuildTask *v3; // ebx@1
  PgFrameWork *v4; // eax@2
  GuildWarInformWin *v5; // esi@3
  D3DXCOLOR *v6; // eax@3
  CClientGuild *v7; // ecx@5
  char *v8; // eax@7
  char *v9; // edx@8
  char v10; // cl@9
  CClientGuild *v11; // ecx@12
  char *v12; // eax@14
  char *v13; // edx@15
  char v14; // cl@16
  char v15; // al@17
  char *v16; // eax@21
  char *v17; // edi@21
  char *v18; // eax@30
  char *v19; // edi@30
  char *v20; // eax@18
  char *v21; // edi@37
  char *v22; // eax@41
  char *v23; // edi@41
  char *v24; // eax@45
  char *v25; // edi@45
  char *v26; // [sp-Ch] [bp-68h]@18
  char *v27; // [sp-8h] [bp-64h]@18
  D3DXCOLOR result; // [sp+8h] [bp-54h]@3
  char acLoseGuilName[32]; // [sp+18h] [bp-44h]@2
  char acWinGuildName[32]; // [sp+38h] [bp-24h]@2

  v2 = 0;
  v3 = this;
  if ( !pkCmd->nStatus )
  {
    *(_DWORD *)acWinGuildName = 0;
    *(_DWORD *)&acWinGuildName[4] = 0;
    *(_DWORD *)&acWinGuildName[8] = 0;
    *(_DWORD *)&acWinGuildName[12] = 0;
    *(_DWORD *)&acWinGuildName[16] = 0;
    *(_DWORD *)&acWinGuildName[20] = 0;
    *(_DWORD *)&acWinGuildName[24] = 0;
    *(_DWORD *)&acWinGuildName[28] = 0;
    *(_DWORD *)acLoseGuilName = 0;
    *(_DWORD *)&acLoseGuilName[4] = 0;
    *(_DWORD *)&acLoseGuilName[8] = 0;
    *(_DWORD *)&acLoseGuilName[12] = 0;
    *(_DWORD *)&acLoseGuilName[16] = 0;
    *(_DWORD *)&acLoseGuilName[20] = 0;
    *(_DWORD *)&acLoseGuilName[24] = 0;
    *(_DWORD *)&acLoseGuilName[28] = 0;
    v4 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v4 )
    {
      v5 = (GuildWarInformWin *)v4[31].m_kMsgQ.m_uiHead;
      v6 = ColorInfoTable::GetDxColor(&result, 0);
      GuildWarInformWin::SetColor(v5, v6);
    }
    if ( GuildTask::ms_spGuildTask )
      v7 = (CClientGuild *)(GuildTask::ms_spGuildTask + 64);
    else
      v7 = 0;
    v8 = CClientGuild::FindGttEnemyInfo(v7, pkCmd->nWinnerGuildNo);
    if ( v8 )
    {
      v9 = (char *)(acWinGuildName - v8);
      do
      {
        v10 = *v8;
        v8[(_DWORD)v9] = *v8;
        ++v8;
      }
      while ( v10 );
    }
    if ( !pkCmd->nLoseGuildNo )
    {
      NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 0x7Eu, 0, 0);
      v24 = (char *)TextData::Get(0x5F6275A5u);
      v25 = fs(v24, acWinGuildName);
      if ( v3->m_pkMsgHooker )
      {
        ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v3->m_pkMsgHooker->vfptr->SendDirectMessage)(
          46,
          v25,
          &v3->vfptr);
        if ( v3->m_pkMsgHooker )
          ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v3->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            46,
            v25,
            &v3->vfptr);
      }
      v3->vfptr->DirectDispatchToParent((IDirectMessenger *)&v3->vfptr, 46, v25, (IDirectMessenger *)&v3->vfptr);
      return 0;
    }
    if ( GuildTask::ms_spGuildTask )
      v11 = (CClientGuild *)(GuildTask::ms_spGuildTask + 64);
    else
      v11 = 0;
    v12 = CClientGuild::FindGttEnemyInfo(v11, pkCmd->nLoseGuildNo);
    if ( v12 )
    {
      v13 = (char *)(acLoseGuilName - v12);
      do
      {
        v14 = *v12;
        v12[(_DWORD)v13] = *v12;
        ++v12;
      }
      while ( v14 );
    }
    v15 = pkCmd->nTournamentSeed;
    if ( pkCmd->nTournamentSeed >= 8u )
    {
      if ( (unsigned __int8)v15 > 7u && (unsigned __int8)v15 < 0x10u )
      {
        v16 = (char *)TextData::Get(0x13FC594Eu);
        v17 = fs(v16, acWinGuildName, acLoseGuilName);
        if ( v3->m_pkMsgHooker )
        {
          ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v3->m_pkMsgHooker->vfptr->SendDirectMessage)(
            46,
            v17,
            &v3->vfptr);
          if ( v3->m_pkMsgHooker )
            ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v3->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
              46,
              v17,
              &v3->vfptr);
        }
        v3->vfptr->DirectDispatchToParent((IDirectMessenger *)&v3->vfptr, 46, v17, (IDirectMessenger *)&v3->vfptr);
        goto LABEL_41;
      }
      if ( (unsigned __int8)v15 <= 0xFu || (unsigned __int8)v15 >= 0x18u )
      {
        if ( (unsigned __int8)v15 > 0x17u && (unsigned __int8)v15 < 0x1Cu )
        {
          v18 = (char *)TextData::Get(0xD7CBF230);
          v19 = fs(v18, acWinGuildName, acLoseGuilName);
          if ( v3->m_pkMsgHooker )
          {
            ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v3->m_pkMsgHooker->vfptr->SendDirectMessage)(
              46,
              v19,
              &v3->vfptr);
            if ( v3->m_pkMsgHooker )
              ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v3->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                46,
                v19,
                &v3->vfptr);
          }
          v3->vfptr->DirectDispatchToParent((IDirectMessenger *)&v3->vfptr, 46, v19, (IDirectMessenger *)&v3->vfptr);
          goto LABEL_41;
        }
        if ( (unsigned __int8)v15 <= 0x1Bu || (unsigned __int8)v15 >= 0x1Eu )
        {
LABEL_41:
          v22 = (char *)TextData::Get(0xDADD1D3B);
          v23 = fs(v22, acWinGuildName, acLoseGuilName);
          if ( v3->m_pkMsgHooker )
          {
            ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v3->m_pkMsgHooker->vfptr->SendDirectMessage)(
              46,
              v23,
              &v3->vfptr);
            if ( v3->m_pkMsgHooker )
              ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v3->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                46,
                v23,
                &v3->vfptr);
          }
          v3->vfptr->DirectDispatchToParent((IDirectMessenger *)&v3->vfptr, 46, v23, (IDirectMessenger *)&v3->vfptr);
          NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 0x7Eu, 0, 0);
          return 0;
        }
        v27 = acLoseGuilName;
        v26 = acWinGuildName;
        v20 = (char *)TextData::Get(0x667B7F84u);
      }
      else
      {
        v27 = acLoseGuilName;
        v26 = acWinGuildName;
        v20 = (char *)TextData::Get(0x1C240B6Fu);
      }
    }
    else
    {
      v27 = acLoseGuilName;
      v26 = acWinGuildName;
      v20 = (char *)TextData::Get(0x13FB594Eu);
    }
    v21 = fs(v20, v26, v27);
    if ( v3->m_pkMsgHooker )
    {
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v3->m_pkMsgHooker->vfptr->SendDirectMessage)(46, v21, &v3->vfptr);
      if ( v3->m_pkMsgHooker )
        ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v3->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          46,
          v21,
          &v3->vfptr);
    }
    v3->vfptr->DirectDispatchToParent((IDirectMessenger *)&v3->vfptr, 46, v21, (IDirectMessenger *)&v3->vfptr);
    goto LABEL_41;
  }
  return v2;
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006BD310) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_DICEGAME_START_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_DICEGAME_START_CMD *pkCmd)
{
  GuildTask *v2; // esi@1
  PgFrameWork *v3; // eax@2
  GuildWarInformWin *v4; // edi@3
  D3DXCOLOR *v5; // eax@3
  NiUnsharedGeometryGroup *v6; // ebx@4
  int v7; // eax@7
  D3DXCOLOR result; // [sp+4h] [bp-10h]@3

  v2 = this;
  if ( pkCmd )
  {
    this->m_GuildTournamentImprove.m_DiceInfo.AGuild = pkCmd->AGuildRegNumber;
    this->m_GuildTournamentImprove.m_DiceInfo.AGuildDelegate = pkCmd->AGuildDelegate;
    *(_QWORD *)&this->m_GuildTournamentImprove.m_DiceInfo.AGuildDelegateName.n5_name[0] = *(_QWORD *)&pkCmd->AGuildDelegateName.n5_name[0];
    *(_QWORD *)&this->m_GuildTournamentImprove.m_DiceInfo.AGuildDelegateName.n5_code[2] = *(_QWORD *)&pkCmd->AGuildDelegateName.n5_code[2];
    this->m_GuildTournamentImprove.m_DiceInfo.AGuildDelegateName.n5_code[4] = pkCmd->AGuildDelegateName.n5_code[4];
    this->m_GuildTournamentImprove.m_DiceInfo.BGuild = pkCmd->BGuildRegNumber;
    this->m_GuildTournamentImprove.m_DiceInfo.BGuildDelegate = pkCmd->BGuildDelegate;
    *(_QWORD *)&this->m_GuildTournamentImprove.m_DiceInfo.BGuildDelegateName.n5_name[0] = *(_QWORD *)&pkCmd->BGuildDelegateName.n5_name[0];
    *(_QWORD *)&this->m_GuildTournamentImprove.m_DiceInfo.BGuildDelegateName.n5_code[2] = *(_QWORD *)&pkCmd->BGuildDelegateName.n5_code[2];
    this->m_GuildTournamentImprove.m_DiceInfo.BGuildDelegateName.n5_code[4] = pkCmd->BGuildDelegateName.n5_code[4];
    v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v3 )
    {
      v4 = (GuildWarInformWin *)v3[31].m_kMsgQ.m_uiHead;
      v5 = ColorInfoTable::GetDxColor(&result, 0);
      GuildWarInformWin::SetColor(v4, v5);
    }
    v6 = TextData2::Get(0xAFF00929);
    if ( v2->m_pkMsgHooker )
    {
      ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v2->m_pkMsgHooker->vfptr->SendDirectMessage)(
        46,
        v6,
        &v2->vfptr);
      if ( v2->m_pkMsgHooker )
        ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v2->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          46,
          v6,
          &v2->vfptr);
    }
    v2->vfptr->DirectDispatchToParent((IDirectMessenger *)&v2->vfptr, 46, v6, (IDirectMessenger *)&v2->vfptr);
    GTTDiceWin::InitDice(v2->m_pkGTTDiceWin);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkGTTDiceWin->vfptr);
    v7 = 1;
  }
  else
  {
    v7 = 0;
  }
  return v7;
}

//----- (006BD460) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_FLAGCAPTURE_RESULT_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_FLAGCAPTURE_RESULT_CMD *pkCmd)
{
  GuildTask *v2; // edi@1
  int result; // eax@1
  CClientGuild *v4; // ecx@3
  char *v5; // eax@5
  char *v6; // edx@6
  char v7; // cl@7
  _BYTE v8[20]; // ST00_20@8
  PgFrameWork *v9; // eax@9
  unsigned int v10; // ecx@10
  GuildWarInformWin *v11; // edi@10
  D3DXCOLOR *v12; // eax@11
  unsigned int v13; // ecx@14
  unsigned int v14; // edx@14
  unsigned int v15; // eax@14
  unsigned int v16; // ecx@15
  unsigned int v17; // edx@15
  unsigned int v18; // eax@15
  unsigned int v19; // ecx@15
  unsigned int v20; // edx@15
  unsigned int v21; // eax@15
  unsigned int v22; // ecx@15
  unsigned int v23; // ecx@16
  unsigned int v24; // edx@16
  unsigned int v25; // eax@16
  unsigned int v26; // ecx@16
  unsigned int v27; // edx@16
  unsigned int v28; // eax@16
  unsigned int v29; // ecx@16
  char *v30; // eax@15
  char *v31; // edi@17
  char *v32; // [sp-Ch] [bp-74h]@15
  char *v33; // [sp-8h] [bp-70h]@15
  char *v34; // [sp-4h] [bp-6Ch]@15
  Char *pkChar; // [sp+Ch] [bp-5Ch]@8
  GuildTask *v36; // [sp+10h] [bp-58h]@1
  char acCaptureGuildName[32]; // [sp+14h] [bp-54h]@2
  char acName[21]; // [sp+34h] [bp-34h]@14
  char acName2[21]; // [sp+4Ch] [bp-1Ch]@11

  v2 = this;
  result = 0;
  v36 = this;
  if ( pkCmd )
  {
    *(_DWORD *)acCaptureGuildName = 0;
    *(_DWORD *)&acCaptureGuildName[4] = 0;
    *(_DWORD *)&acCaptureGuildName[8] = 0;
    *(_DWORD *)&acCaptureGuildName[12] = 0;
    *(_DWORD *)&acCaptureGuildName[16] = 0;
    *(_DWORD *)&acCaptureGuildName[20] = 0;
    *(_DWORD *)&acCaptureGuildName[24] = 0;
    *(_DWORD *)&acCaptureGuildName[28] = 0;
    if ( GuildTask::ms_spGuildTask )
      v4 = (CClientGuild *)(GuildTask::ms_spGuildTask + 64);
    else
      v4 = 0;
    v5 = CClientGuild::FindGttEnemyInfo(v4, pkCmd->gRegGuildNo);
    if ( v5 )
    {
      v6 = (char *)(acCaptureGuildName - v5);
      do
      {
        v7 = *v5;
        v5[(_DWORD)v6] = *v5;
        ++v5;
      }
      while ( v7 );
    }
    *(_DWORD *)v8 = pkCmd->CIDPlayer.n5_code[0];
    *(_QWORD *)&v8[4] = *(_QWORD *)&pkCmd->CIDPlayer.n5_code[1];
    *(_QWORD *)&v8[12] = *(_QWORD *)&pkCmd->CIDPlayer.n5_code[3];
    pkChar = CharMgr::GetChar(&g_kCharMgr, *(Name5 *)v8);
    if ( pkCmd->gRegGuildNo )
    {
      v9 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v9 )
      {
        v10 = v2->m_GuildTournamentImprove.m_BlueTeam;
        v11 = (GuildWarInformWin *)v9[31].m_kMsgQ.m_uiHead;
        if ( v10 == pkCmd->gRegGuildNo )
          v12 = ColorInfoTable::GetDxColor((D3DXCOLOR *)&acName2[4], blue);
        else
          v12 = ColorInfoTable::GetDxColor((D3DXCOLOR *)&acName2[4], 0);
        GuildWarInformWin::SetColor(v11, v12);
      }
      v13 = pkCmd->CIDPlayer.n5_code[0];
      v14 = pkCmd->CIDPlayer.n5_code[1];
      v15 = pkCmd->CIDPlayer.n5_code[2];
      acName[20] = 0;
      acName2[20] = 0;
      if ( pkCmd->gRegFlagCaptureGuild )
      {
        *(_DWORD *)acName2 = v13;
        v23 = pkCmd->CIDPlayer.n5_code[3];
        *(_DWORD *)&acName2[4] = v14;
        v24 = pkCmd->CIDPlayer.n5_code[4];
        *(_DWORD *)&acName2[8] = v15;
        v25 = pkCmd->CIDFlag.n5_code[0];
        *(_DWORD *)&acName2[12] = v23;
        v26 = pkCmd->CIDFlag.n5_code[1];
        *(_DWORD *)&acName2[16] = v24;
        v27 = pkCmd->CIDFlag.n5_code[2];
        *(_DWORD *)acName = v25;
        v28 = pkCmd->CIDFlag.n5_code[3];
        *(_DWORD *)&acName[4] = v26;
        v29 = pkCmd->CIDFlag.n5_code[4];
        *(_DWORD *)&acName[8] = v27;
        v34 = acName;
        *(_DWORD *)&acName[12] = v28;
        *(_DWORD *)&acName[16] = v29;
        v33 = acCaptureGuildName;
        v32 = acName2;
        v30 = (char *)TextData2::Get(0x20588487u);
      }
      else
      {
        *(_DWORD *)acName = v13;
        v16 = pkCmd->CIDPlayer.n5_code[3];
        *(_DWORD *)&acName[4] = v14;
        v17 = pkCmd->CIDPlayer.n5_code[4];
        *(_DWORD *)&acName[8] = v15;
        v18 = pkCmd->CIDFlag.n5_code[0];
        *(_DWORD *)&acName[12] = v16;
        v19 = pkCmd->CIDFlag.n5_code[1];
        *(_DWORD *)&acName[16] = v17;
        v20 = pkCmd->CIDFlag.n5_code[2];
        *(_DWORD *)acName2 = v18;
        v21 = pkCmd->CIDFlag.n5_code[3];
        *(_DWORD *)&acName2[4] = v19;
        v22 = pkCmd->CIDFlag.n5_code[4];
        *(_DWORD *)&acName2[8] = v20;
        v34 = acName2;
        *(_DWORD *)&acName2[12] = v21;
        *(_DWORD *)&acName2[16] = v22;
        v33 = acCaptureGuildName;
        v32 = acName;
        v30 = (char *)TextData2::Get(0x14542566u);
      }
      v31 = fs(v30, v32, v33, v34);
      if ( v36->m_pkMsgHooker )
      {
        ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v36->m_pkMsgHooker->vfptr->SendDirectMessage)(
          46,
          v31,
          &v36->vfptr);
        if ( v36->m_pkMsgHooker )
          ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v36->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            46,
            v31,
            &v36->vfptr);
      }
      v36->vfptr->DirectDispatchToParent((IDirectMessenger *)&v36->vfptr, 46, v31, (IDirectMessenger *)&v36->vfptr);
      if ( pkChar )
        Char::StopFlagCapture(pkChar);
    }
    result = 0;
  }
  return result;
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006BD650) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_USESKILL_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_USESKILL_CMD *pkCmd)
{
  int v2; // eax@1
  GuildTask *v3; // ebx@1
  CClientGuild *v4; // ecx@3
  char *v5; // eax@5
  char *v6; // edx@6
  char v7; // cl@7
  GUILD_TOURNAMENT_SKILLDESC *v8; // esi@8
  PgFrameWork *v9; // eax@9
  GuildWarInformWin *v10; // edi@10
  D3DXCOLOR *v11; // eax@10
  char *v12; // eax@11
  char *v13; // edi@11
  D3DXCOLOR result; // [sp+8h] [bp-34h]@10
  char acGuildName[32]; // [sp+18h] [bp-24h]@2

  v2 = 0;
  v3 = this;
  if ( pkCmd )
  {
    *(_DWORD *)acGuildName = 0;
    *(_DWORD *)&acGuildName[4] = 0;
    *(_DWORD *)&acGuildName[8] = 0;
    *(_DWORD *)&acGuildName[12] = 0;
    *(_DWORD *)&acGuildName[16] = 0;
    *(_DWORD *)&acGuildName[20] = 0;
    *(_DWORD *)&acGuildName[24] = 0;
    *(_DWORD *)&acGuildName[28] = 0;
    if ( GuildTask::ms_spGuildTask )
      v4 = (CClientGuild *)(GuildTask::ms_spGuildTask + 64);
    else
      v4 = 0;
    v5 = CClientGuild::FindGttEnemyInfo(v4, pkCmd->regGuildNumber);
    if ( v5 )
    {
      v6 = (char *)(acGuildName - v5);
      do
      {
        v7 = *v5;
        v5[(_DWORD)v6] = *v5;
        ++v5;
      }
      while ( v7 );
    }
    v8 = GuildTournamentStateDescTab::GetIndex(pkCmd->wUseSkillNumber);
    if ( v8 )
    {
      v9 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v9 )
      {
        v10 = (GuildWarInformWin *)v9[31].m_kMsgQ.m_uiHead;
        v11 = ColorInfoTable::GetDxColor(&result, Center_Announcement);
        GuildWarInformWin::SetColor(v10, v11);
      }
      v12 = (char *)TextData2::Get(0x9A889ED5);
      v13 = fs(v12, acGuildName, v8->Name);
      if ( v3->m_pkMsgHooker )
      {
        ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v3->m_pkMsgHooker->vfptr->SendDirectMessage)(
          46,
          v13,
          &v3->vfptr);
        if ( v3->m_pkMsgHooker )
          ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v3->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            46,
            v13,
            &v3->vfptr);
      }
      v3->vfptr->DirectDispatchToParent((IDirectMessenger *)&v3->vfptr, 46, v13, (IDirectMessenger *)&v3->vfptr);
    }
    v2 = 0;
  }
  return v2;
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006BD770) --------------------------------------------------------
int __userpurge GuildTask::Recv_NC_GUILD_TOURNAMENTSTOPMSG_CMD@<eax>(GuildTask *this@<ecx>, int a2@<edi>, PROTO_NC_GUILD_TOURNAMENTSTOPMSG_CMD *pkCmd)
{
  GuildTask *v3; // ebx@1
  PgFrameWork *v4; // eax@2
  GuildWarInformWin *v5; // edi@3
  D3DXCOLOR *v6; // eax@3
  unsigned int v7; // eax@8
  NiNode *v8; // eax@9
  CClientGuild *v9; // ecx@10
  char *v10; // eax@12
  char *v11; // edx@13
  char v12; // cl@14
  CClientGuild *v13; // ecx@16
  char *v14; // eax@18
  char *v15; // edx@19
  char v16; // cl@20
  int v17; // ST10_4@22
  float v18; // ST0C_4@22
  char *v19; // eax@22
  char *v20; // edi@22
  NiNode *v21; // eax@28
  CClientGuild *v22; // ecx@29
  char *v23; // eax@31
  char *v24; // edx@32
  char v25; // cl@33
  CClientGuild *v26; // ecx@35
  char *v27; // eax@37
  char *v28; // edx@38
  char v29; // cl@39
  char *v30; // eax@26
  char *v31; // edi@44
  char *v32; // eax@48
  MsgBox *v33; // eax@48
  char *v35; // [sp-4h] [bp-70h]@26
  char *v36; // [sp+0h] [bp-6Ch]@26
  float fTime; // [sp+4h] [bp-68h]@26
  int v38; // [sp+8h] [bp-64h]@2
  int v39; // [sp+8h] [bp-64h]@26
  D3DXCOLOR result; // [sp+18h] [bp-54h]@3
  char acAGuildName[32]; // [sp+28h] [bp-44h]@9
  char acBGuildName[32]; // [sp+48h] [bp-24h]@9

  v3 = this;
  if ( pkCmd )
  {
    v38 = a2;
    v4 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v4 )
    {
      v5 = (GuildWarInformWin *)v4[31].m_kMsgQ.m_uiHead;
      v6 = ColorInfoTable::GetDxColor(&result, 0);
      GuildWarInformWin::SetColor(v5, v6);
    }
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkGTTDiceWin->vfptr);
    if ( (unsigned __int8)((int (__stdcall *)(int))v3->m_pkGTStatusMiniWin->vfptr[65].__vecDelDtor)(v38) )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkGTStatusMiniWin->vfptr);
    if ( v3->m_pkGTStatusWin )
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkGTStatusWin->vfptr);
    v7 = g_pkMainChar->m_dwGuildRegNum;
    if ( v7 == pkCmd->WinnerGuild )
    {
      v8 = v3->m_pGTWinEffect.m_pObject;
      result.g = (double)(PgWin::ms_uiScreenWidth >> 1);
      result.b = -500.0;
      v8->m_kLocal.m_Translate.x = result.g;
      result.a = 0.0;
      v8->m_kLocal.m_Translate.y = -500.0;
      v8->m_kLocal.m_Translate.z = result.a;
      PgWinMgr::StartFullScreenEffect(
        &Pgg_kWinMgr,
        Timer::ms_fCurTime,
        (NiAVObject *)&v3->m_pGTWinEffect.m_pObject->vfptr);
      SoundMgr::PlayInterfaceSound(&g_kSoundMgr, "GuildTWin");
      *(_DWORD *)acAGuildName = 0;
      *(_DWORD *)&acAGuildName[4] = 0;
      *(_DWORD *)&acAGuildName[8] = 0;
      *(_DWORD *)&acAGuildName[12] = 0;
      *(_DWORD *)&acAGuildName[16] = 0;
      *(_DWORD *)&acAGuildName[20] = 0;
      *(_DWORD *)&acAGuildName[24] = 0;
      *(_DWORD *)&acAGuildName[28] = 0;
      *(_DWORD *)acBGuildName = 0;
      *(_DWORD *)&acBGuildName[4] = 0;
      *(_DWORD *)&acBGuildName[8] = 0;
      *(_DWORD *)&acBGuildName[12] = 0;
      *(_DWORD *)&acBGuildName[16] = 0;
      *(_DWORD *)&acBGuildName[20] = 0;
      *(_DWORD *)&acBGuildName[24] = 0;
      *(_DWORD *)&acBGuildName[28] = 0;
      if ( GuildTask::ms_spGuildTask )
        v9 = (CClientGuild *)(GuildTask::ms_spGuildTask + 64);
      else
        v9 = 0;
      v10 = CClientGuild::FindGttEnemyInfo(v9, pkCmd->AGuildRegNumber);
      if ( v10 )
      {
        v11 = (char *)(acAGuildName - v10);
        do
        {
          v12 = *v10;
          v11[(_DWORD)v10] = *v10;
          ++v10;
        }
        while ( v12 );
      }
      if ( GuildTask::ms_spGuildTask )
        v13 = (CClientGuild *)(GuildTask::ms_spGuildTask + 64);
      else
        v13 = 0;
      v14 = CClientGuild::FindGttEnemyInfo(v13, pkCmd->BGuildRegNumber);
      if ( v14 )
      {
        v15 = (char *)(acBGuildName - v14);
        do
        {
          v16 = *v14;
          v15[(_DWORD)v14] = *v14;
          ++v14;
        }
        while ( v16 );
      }
      if ( g_pkMainChar->m_dwGuildRegNum == pkCmd->AGuildRegNumber )
      {
        v17 = pkCmd->BGuildScore;
        LODWORD(v18) = pkCmd->AGuildScore;
        v19 = (char *)TextData2::Get(0xE303073D);
        v20 = fs(v19, acAGuildName, acBGuildName, v18, v17);
        if ( v3->m_pkMsgHooker )
        {
          ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v3->m_pkMsgHooker->vfptr->SendDirectMessage)(
            46,
            v20,
            &v3->vfptr);
          if ( v3->m_pkMsgHooker )
            ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v3->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
              46,
              v20,
              &v3->vfptr);
        }
        v3->vfptr->DirectDispatchToParent((IDirectMessenger *)&v3->vfptr, 46, v20, (IDirectMessenger *)&v3->vfptr);
        goto LABEL_48;
      }
      v39 = pkCmd->AGuildScore;
      LODWORD(fTime) = pkCmd->BGuildScore;
      v36 = acAGuildName;
      v35 = acBGuildName;
      v30 = (char *)TextData2::Get(0xE303073D);
    }
    else
    {
      if ( v7 != pkCmd->LoseGuild )
      {
LABEL_48:
        v32 = (char *)TextData2::Get(0x8495E9CD);
        v33 = MsgBox::Modeless(MSGBOX_OKCANCEL, v32);
        ((void (__cdecl *)(IDirectMessengerVtbl **))v33->vfptr->SetMsgHooker)(&v3->vfptr);
        v3->m_bGTQuit = 1;
        return 0;
      }
      v21 = v3->m_pGTLoseEffect.m_pObject;
      result.g = (double)(PgWin::ms_uiScreenWidth >> 1);
      result.b = -500.0;
      v21->m_kLocal.m_Translate.x = result.g;
      result.a = 0.0;
      v21->m_kLocal.m_Translate.y = -500.0;
      v21->m_kLocal.m_Translate.z = result.a;
      PgWinMgr::StartFullScreenEffect(
        &Pgg_kWinMgr,
        Timer::ms_fCurTime,
        (NiAVObject *)&v3->m_pGTLoseEffect.m_pObject->vfptr);
      SoundMgr::PlayInterfaceSound(&g_kSoundMgr, "GuildTSLose");
      *(_DWORD *)acBGuildName = 0;
      *(_DWORD *)&acBGuildName[4] = 0;
      *(_DWORD *)&acBGuildName[8] = 0;
      *(_DWORD *)&acBGuildName[12] = 0;
      *(_DWORD *)&acBGuildName[16] = 0;
      *(_DWORD *)&acBGuildName[20] = 0;
      *(_DWORD *)&acBGuildName[24] = 0;
      *(_DWORD *)&acBGuildName[28] = 0;
      *(_DWORD *)acAGuildName = 0;
      *(_DWORD *)&acAGuildName[4] = 0;
      *(_DWORD *)&acAGuildName[8] = 0;
      *(_DWORD *)&acAGuildName[12] = 0;
      *(_DWORD *)&acAGuildName[16] = 0;
      *(_DWORD *)&acAGuildName[20] = 0;
      *(_DWORD *)&acAGuildName[24] = 0;
      *(_DWORD *)&acAGuildName[28] = 0;
      if ( GuildTask::ms_spGuildTask )
        v22 = (CClientGuild *)(GuildTask::ms_spGuildTask + 64);
      else
        v22 = 0;
      v23 = CClientGuild::FindGttEnemyInfo(v22, pkCmd->AGuildRegNumber);
      if ( v23 )
      {
        v24 = (char *)(acBGuildName - v23);
        do
        {
          v25 = *v23;
          v24[(_DWORD)v23] = *v23;
          ++v23;
        }
        while ( v25 );
      }
      if ( GuildTask::ms_spGuildTask )
        v26 = (CClientGuild *)(GuildTask::ms_spGuildTask + 64);
      else
        v26 = 0;
      v27 = CClientGuild::FindGttEnemyInfo(v26, pkCmd->BGuildRegNumber);
      if ( v27 )
      {
        v28 = (char *)(acAGuildName - v27);
        do
        {
          v29 = *v27;
          v28[(_DWORD)v27] = *v27;
          ++v27;
        }
        while ( v29 );
      }
      if ( g_pkMainChar->m_dwGuildRegNum == pkCmd->AGuildRegNumber )
      {
        v39 = pkCmd->BGuildScore;
        LODWORD(fTime) = pkCmd->AGuildScore;
        v36 = acAGuildName;
        v35 = acBGuildName;
      }
      else
      {
        v39 = pkCmd->AGuildScore;
        LODWORD(fTime) = pkCmd->BGuildScore;
        v36 = acBGuildName;
        v35 = acAGuildName;
      }
      v30 = (char *)TextData2::Get(0xE30A344E);
    }
    v31 = fs(v30, v35, v36, fTime, v39);
    if ( v3->m_pkMsgHooker )
    {
      ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v3->m_pkMsgHooker->vfptr->SendDirectMessage)(
        46,
        v31,
        &v3->vfptr);
      if ( v3->m_pkMsgHooker )
        ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v3->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          46,
          v31,
          &v3->vfptr);
    }
    v3->vfptr->DirectDispatchToParent((IDirectMessenger *)&v3->vfptr, 46, v31, (IDirectMessenger *)&v3->vfptr);
    goto LABEL_48;
  }
  return 0;
}
// 6BD770: could not find valid save-restore pair for edi
// A8B97C: using guessed type float Timer::ms_fCurTime;
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006BDB70) --------------------------------------------------------
int __stdcall GuildTask::Recv_NC_GUILD_TOURNAMENT_NOTIFY_CMD(PROTO_NC_GUILD_TOURNAMENT_NOTIFY_CMD *pkCmd)
{
  GameFrameWork *v2; // edi@2
  D3DXCOLOR *v3; // eax@4
  D3DXCOLOR v4; // ST08_16@4
  char *v5; // eax@4
  bool v7; // zf@8
  unsigned int v8; // edx@8
  unsigned int v9; // eax@8
  unsigned int v10; // ecx@8
  D3DXCOLOR *v11; // eax@9
  D3DXCOLOR v12; // ST08_16@9
  char *v13; // eax@9
  char *v14; // eax@9
  D3DXCOLOR result; // [sp+8h] [bp-28h]@4
  char acName[17]; // [sp+18h] [bp-18h]@8

  if ( !pkCmd )
    return 0;
  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( pkCmd->Type == 1 )
  {
    if ( v2 )
    {
      v3 = ColorInfoTable::GetDxColor(&result, Center_Announcement);
      *(_QWORD *)&v4.r = *(_QWORD *)&v3->r;
      *(_QWORD *)&v4.b = *(_QWORD *)&v3->b;
      v5 = (char *)TextData2::Get(0x80E5D3CF);
      GameFrameWork::AddAnnounceMsg(v2, (int)v2, (int)pkCmd, v5, v4);
    }
    return 1;
  }
  if ( pkCmd->Type != 2 || !v2 )
    return 0;
  v7 = pkCmd->nRanking == 1;
  v8 = pkCmd->sGuildName.n4_code[1];
  v9 = pkCmd->sGuildName.n4_code[2];
  *(_DWORD *)acName = pkCmd->sGuildName.n4_code[0];
  v10 = pkCmd->sGuildName.n4_code[3];
  *(_DWORD *)&acName[4] = v8;
  *(_DWORD *)&acName[8] = v9;
  *(_DWORD *)&acName[12] = v10;
  acName[16] = 0;
  if ( v7 )
  {
    v11 = ColorInfoTable::GetDxColor(&result, Center_Announcement);
    *(_QWORD *)&v12.r = *(_QWORD *)&v11->r;
    *(_QWORD *)&v12.b = *(_QWORD *)&v11->b;
    v13 = (char *)TextData2::Get(0xF4013244);
    v14 = fs(v13, acName);
    GameFrameWork::AddAnnounceMsg(v2, (int)v2, (int)pkCmd, v14, v12);
  }
  return 1;
}

//----- (006BDCB0) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_TOURNAMENT_ITEM_FLAG_CMD(GuildTask *this, PROTO_NC_GUILD_TOURNAMENT_ITEM_FLAG_CMD *pkCmd)
{
  GuildTask *v2; // esi@1
  PgFrameWork *v3; // edi@1
  CClientGuild *v4; // ecx@2
  PROTO_NC_GUILD_TOURNAMENT_ITEM_FLAG_CMD *v5; // ebx@4
  GuildWarInformWin *v6; // edi@5
  D3DXCOLOR *v7; // eax@5
  unsigned int v8; // eax@6
  PgWin *v9; // eax@9
  char *v10; // eax@14
  int v11; // esi@14
  char *v12; // edi@14
  PgWin *v14; // eax@19
  PgWin *v15; // eax@27
  PgWin *v16; // eax@34
  char *v17; // eax@32
  int v18; // esi@41
  char *v19; // edi@41
  char *v20; // [sp-4h] [bp-20h]@24
  D3DXCOLOR result; // [sp+Ch] [bp-10h]@5
  char *pcGuildName; // [sp+24h] [bp+8h]@4

  v2 = this;
  v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( GuildTask::ms_spGuildTask )
    v4 = (CClientGuild *)(GuildTask::ms_spGuildTask + 64);
  else
    v4 = 0;
  v5 = pkCmd;
  pcGuildName = CClientGuild::FindGttEnemyInfo(v4, pkCmd->nGuildRegNo);
  if ( v3 )
  {
    v6 = (GuildWarInformWin *)v3[31].m_kMsgQ.m_uiHead;
    v7 = ColorInfoTable::GetDxColor(&result, Center_Announcement);
    GuildWarInformWin::SetColor(v6, v7);
  }
  v8 = v5->nGuildRegNo;
  if ( v8 != g_pkMainChar->m_dwGuildRegNum )
  {
    if ( v5->FlagScoreMultiple > 1u )
    {
      if ( v2->m_GuildTournamentImprove.m_BlueTeam == v8 )
      {
        v15 = (PgWin *)&v2->m_pkGTIBlueFlagWin->vfptr;
      }
      else
      {
        if ( v2->m_GuildTournamentImprove.m_RedTeam != v8 )
        {
LABEL_32:
          v20 = pcGuildName;
          v17 = (char *)TextData2::Get(0x21288084u);
          goto LABEL_41;
        }
        v15 = (PgWin *)&v2->m_pkGTIRedFlagWin->vfptr;
      }
      if ( v15 )
        PgWinMgr::ShowWin(&Pgg_kWinMgr, v15);
      goto LABEL_32;
    }
    if ( v2->m_GuildTournamentImprove.m_BlueTeam == v8 )
    {
      v16 = (PgWin *)&v2->m_pkGTIBlueFlagWin->vfptr;
    }
    else
    {
      if ( v2->m_GuildTournamentImprove.m_RedTeam != v8 )
      {
LABEL_39:
        v20 = pcGuildName;
        goto LABEL_40;
      }
      v16 = (PgWin *)&v2->m_pkGTIRedFlagWin->vfptr;
    }
    if ( v16 )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, v16);
    goto LABEL_39;
  }
  if ( v5->FlagScoreMultiple > 1u )
  {
    if ( v2->m_GuildTournamentImprove.m_BlueTeam == v8 )
    {
      v9 = (PgWin *)&v2->m_pkGTIBlueFlagWin->vfptr;
    }
    else
    {
      if ( v2->m_GuildTournamentImprove.m_RedTeam != v8 )
      {
LABEL_14:
        v10 = (char *)TextData2::Get(0x21288084u);
        v11 = (int)&v2->vfptr;
        v12 = fs(v10, pcGuildName);
        if ( *(_DWORD *)(v11 + 4) )
        {
          (*(void (__stdcall **)(signed int, char *, int))(**(_DWORD **)(v11 + 4) + 4))(46, v12, v11);
          if ( *(_DWORD *)(v11 + 4) )
            (*(void (__stdcall **)(signed int, char *, int))(**(_DWORD **)(v11 + 4) + 20))(46, v12, v11);
        }
        (*(void (__thiscall **)(int, signed int, char *, int))(*(_DWORD *)v11 + 20))(v11, 46, v12, v11);
        return 0;
      }
      v9 = (PgWin *)&v2->m_pkGTIRedFlagWin->vfptr;
    }
    if ( v9 )
      PgWinMgr::ShowWin(&Pgg_kWinMgr, v9);
    goto LABEL_14;
  }
  if ( v2->m_GuildTournamentImprove.m_BlueTeam == v8 )
  {
    v14 = (PgWin *)&v2->m_pkGTIBlueFlagWin->vfptr;
    goto LABEL_22;
  }
  if ( v2->m_GuildTournamentImprove.m_RedTeam == v8 )
  {
    v14 = (PgWin *)&v2->m_pkGTIRedFlagWin->vfptr;
LABEL_22:
    if ( v14 )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, v14);
  }
  v20 = pcGuildName;
LABEL_40:
  v17 = (char *)TextData2::Get(0x24221E32u);
LABEL_41:
  v18 = (int)&v2->vfptr;
  v19 = fs(v17, v20);
  if ( *(_DWORD *)(v18 + 4) )
  {
    (*(void (__stdcall **)(signed int, char *, int))(**(_DWORD **)(v18 + 4) + 4))(46, v19, v18);
    if ( *(_DWORD *)(v18 + 4) )
      (*(void (__stdcall **)(signed int, char *, int))(**(_DWORD **)(v18 + 4) + 20))(46, v19, v18);
  }
  (*(void (__thiscall **)(int, signed int, char *, int))(*(_DWORD *)v18 + 20))(v18, 46, v19, v18);
  return 0;
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006BDEC0) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_HISTORY_LIST_ACK(GuildTask *this, PROTO_NC_GUILD_HISTORY_LIST_ACK *pkCmd)
{
  int v2; // eax@1
  GuildTask *v3; // ebx@1
  int v4; // eax@2
  int v5; // eax@3
  NiUnsharedGeometryGroup *v6; // eax@5
  NiUnsharedGeometryGroup *v7; // edi@6
  int result; // eax@10
  _DWORD *v9; // esi@13
  PROTO_NC_GUILD_HISTORY_LIST_ACK *v10; // edi@14
  _DWORD *v11; // eax@16
  int v12; // eax@18
  _DWORD *v13; // ecx@18
  PROTO_NC_GUILD_HISTORY_LIST_ACK *pkCmda; // [sp+14h] [bp+8h]@14

  v2 = pkCmd->Error;
  v3 = this;
  if ( (_WORD)v2 != 12672 )
  {
    v4 = v2 - 12674;
    if ( !v4 )
    {
      v6 = TextData2::Get(0x2F777071u);
      goto LABEL_6;
    }
    v5 = v4 - 1;
    if ( !v5 )
    {
      v6 = TextData2::Get(0xE76F7C79);
      goto LABEL_6;
    }
    if ( v5 == 1 )
    {
      v6 = TextData3::Get(0x3716797u);
LABEL_6:
      v7 = v6;
      if ( v3->m_pkMsgHooker )
      {
        ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v3->m_pkMsgHooker->vfptr->SendDirectMessage)(
          25,
          v6,
          &v3->vfptr);
        if ( v3->m_pkMsgHooker )
          ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v3->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            25,
            v7,
            &v3->vfptr);
      }
      v3->vfptr->DirectDispatchToParent((IDirectMessenger *)&v3->vfptr, 25, v7, (IDirectMessenger *)&v3->vfptr);
    }
    return 1;
  }
  CClientGuild::ClearHistoryList((CClientGuild *)&this->vfptr);
  v9 = 0;
  if ( !pkCmd->HistoryCount )
    return 1;
  v10 = pkCmd + 3;
  pkCmda = (PROTO_NC_GUILD_HISTORY_LIST_ACK *)pkCmd->HistoryCount;
  while ( 1 )
  {
    v11 = operator new(0x20u);
    if ( v11 )
    {
      v11[6] = 0;
      v11[5] = 0;
      v11[4] = 0;
      v11[3] = 0;
      v11[2] = 0;
      v9 = v11;
    }
    *v9 = *(_DWORD *)&v10[-2].Error;
    v9[1] = *(_DWORD *)&v10[-2].HistoryCount;
    v9[2] = *(_DWORD *)&v10[-1].Error;
    v9[3] = *(_DWORD *)&v10[-1].HistoryCount;
    v9[4] = *(_DWORD *)&v10->Error;
    v9[5] = *(_DWORD *)&v10->HistoryCount;
    v9[6] = *(_DWORD *)&v10[1].Error;
    v9[7] = *(_DWORD *)&v10[1].HistoryCount;
    v12 = (int)v3->m_kHistoryList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *> *)&v3->m_kHistoryList);
    *(_DWORD *)(v12 + 8) = v9;
    *(_DWORD *)v12 = 0;
    *(_DWORD *)(v12 + 4) = v3->m_kHistoryList.m_pkTail;
    v13 = &v3->m_kHistoryList.m_pkTail->m_pkNext;
    if ( v13 )
      *v13 = v12;
    else
      v3->m_kHistoryList.m_pkHead = (NiTListItem<GUILD_HISTORY *> *)v12;
    v3->m_kHistoryList.m_pkTail = (NiTListItem<GUILD_HISTORY *> *)v12;
    result = 1;
    ++v3->m_kHistoryList.m_kAllocator.m_uiCount;
    v10 += 4;
    pkCmda = (PROTO_NC_GUILD_HISTORY_LIST_ACK *)((char *)pkCmda - 1);
    if ( !pkCmda )
      break;
    v9 = 0;
  }
  return result;
}

//----- (006BE020) --------------------------------------------------------
int __stdcall GuildTask::Recv_NC_GUILD_EMBLEM_OFF_MSG_CMD(PROTO_NC_GUILD_EMBLEM_OFF_MSG_CMD *pkCmd)
{
  int v2; // eax@2
  GameFrameWork *v3; // edi@3
  D3DXCOLOR *v4; // eax@4
  D3DXCOLOR v5; // ST0C_16@4
  int v6; // ST08_4@4
  int v7; // ST04_4@4
  char *v8; // eax@4
  char *v9; // eax@4
  D3DXCOLOR result; // [sp+8h] [bp-10h]@4

  if ( pkCmd && (v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID)) != 0 )
  {
    v4 = ColorInfoTable::GetDxColor(&result, Center_Announcement);
    *(_QWORD *)&v5.r = *(_QWORD *)&v4->r;
    *(_QWORD *)&v5.b = *(_QWORD *)&v4->b;
    v6 = pkCmd->nDay;
    v7 = pkCmd->nMonth;
    v8 = (char *)TextData3::Get(0xC8F15C18);
    v9 = fs(v8, v7, v6);
    GameFrameWork::AddAnnounceMsg(v3, (int)v3, (int)pkCmd, v9, v5);
    v2 = 1;
  }
  else
  {
    v2 = 0;
  }
  return v2;
}

//----- (006BE0B0) --------------------------------------------------------
char __thiscall GuildNameCache::OnProcessNetMsg(GuildNameCache *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  GuildNameCache *v5; // edi@1
  char result; // al@3
  _DWORD *v7; // esi@4
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v8; // eax@4
  unsigned int v9; // eax@5

  v5 = this;
  if ( iDepart == 29 && iCommand == 119 )
  {
    v7 = pvData;
    v8 = std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::find(
           (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&this->m_kGuildNameCache,
           (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&iDepart,
           (const unsigned int *)pvData)->_Ptr;
    if ( v8 != (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v5->m_kGuildNameCache._Myhead )
    {
      v9 = v8->_Myval.second;
      if ( !*(_DWORD *)(v9 + 16) )
      {
        *(_DWORD *)v9 = v7[1];
        *(_DWORD *)(v9 + 4) = v7[2];
        *(_DWORD *)(v9 + 8) = v7[3];
        *(_DWORD *)(v9 + 12) = v7[4];
        *(_DWORD *)(v9 + 16) = 1;
        *(_WORD *)(v9 + 20) = *((_WORD *)v7 + 10);
      }
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006BE120) --------------------------------------------------------
void __thiscall GuildNameCache::~GuildNameCache(GuildNameCache *this)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned long,GuildNameCache::GuildNameStorage *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,GuildNameCache::GuildNameStorage *> >,0> >::_Node *v1; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,GuildNameCache::GuildNameStorage *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,GuildNameCache::GuildNameStorage *> >,0> >::_Node *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,GuildNameCache::GuildNameStorage *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,GuildNameCache::GuildNameStorage *> >,0> >::_Node *v3; // eax@5
  std::_Tree_nod<std::_Tmap_traits<unsigned long,GuildNameCache::GuildNameStorage *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,GuildNameCache::GuildNameStorage *> >,0> >::_Node *j; // eax@6
  std::_Tree_nod<std::_Tmap_traits<unsigned long,GuildNameCache::GuildNameStorage *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,GuildNameCache::GuildNameStorage *> >,0> >::_Node *i; // eax@9
  std::_Tree_nod<std::_Tmap_traits<unsigned long,GuildNameCache::GuildNameStorage *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,GuildNameCache::GuildNameStorage *> >,0> >::_Node *v6; // eax@14
  std::_Tree_nod<std::_Tmap_traits<unsigned long,GuildNameCache::GuildNameStorage *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,GuildNameCache::GuildNameStorage *> >,0> >::_Node *v7; // ebx@14
  std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *v8; // esi@14
  std::_Tree_nod<std::_Tmap_traits<unsigned long,GuildNameCache::GuildNameStorage *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,GuildNameCache::GuildNameStorage *> >,0> >::_Node *v9; // edi@14
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v10; // ST08_4@16
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v11; // ST04_4@16
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > result; // [sp+10h] [bp-18h]@16
  std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *v13; // [sp+14h] [bp-14h]@16
  ITask *v14; // [sp+18h] [bp-10h]@1
  int v15; // [sp+24h] [bp-4h]@1

  v14 = (ITask *)this;
  this->vfptr = (NiRefObjectVtbl *)&GuildNameCache::`vftable'{for `NiRefObject'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildNameCache::`vftable'{for `IDirectMessenger'};
  v1 = this->m_kGuildNameCache._Myhead;
  v2 = v1->_Left;
  v15 = 1;
  if ( v2 != v1 )
  {
    do
    {
      if ( v2->_Myval.second )
      {
        operator delete(v2->_Myval.second);
        this = (GuildNameCache *)v14;
      }
      if ( !v2->_Isnil )
      {
        v3 = v2->_Right;
        if ( v3->_Isnil )
        {
          for ( i = v2->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v2 != i->_Right )
              break;
            v2 = i;
          }
          v2 = i;
        }
        else
        {
          v2 = v2->_Right;
          for ( j = v3->_Left; !j->_Isnil; j = j->_Left )
            v2 = j;
        }
      }
    }
    while ( v2 != this->m_kGuildNameCache._Myhead );
  }
  v6 = this->m_kGuildNameCache._Myhead;
  v7 = v6->_Parent;
  v8 = (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&this->m_kGuildNameCache;
  v9 = v6->_Parent;
  if ( !v7->_Isnil )
  {
    do
    {
      std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Erase(
        v8,
        (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v9->_Right);
      v9 = v9->_Left;
      operator delete(v7);
      v7 = v9;
    }
    while ( !v9->_Isnil );
  }
  v8->_Myhead->_Parent = v8->_Myhead;
  v8->_Myhead->_Left = v8->_Myhead;
  v8->_Myhead->_Right = v8->_Myhead;
  v8->_Mysize = 0;
  v13 = v8;
  v10._Ptr = v8->_Myhead;
  v11._Ptr = v8->_Myhead->_Left;
  LOBYTE(v15) = 2;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    v8,
    &result,
    v11,
    v10);
  operator delete(v8->_Myhead);
  v15 = -1;
  ITask::~ITask(v14);
}
// 9BF4A4: using guessed type void (__thiscall *GuildNameCache::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9BF4C0: using guessed type int (__thiscall *GuildNameCache::`vftable'{for `NiRefObject'})(void *p, char);

//----- (006BE260) --------------------------------------------------------
int __stdcall GuildTask::Recv_NC_GUILD_MOBGUILD_CMD(PROTO_NC_GUILD_MOBGUILD_CMD *pkCmd)
{
  unsigned __int16 v2; // bx@1
  unsigned int v3; // edi@1
  std::_Tree<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > *v4; // eax@1
  std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *v5; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *v6; // eax@3
  std::pair<unsigned short const ,unsigned long> _Val; // [sp+Ch] [bp-8h]@1

  v2 = pkCmd->mobhandle;
  v3 = pkCmd->mobguild;
  pkCmd = (PROTO_NC_GUILD_MOBGUILD_CMD *)pkCmd->mobhandle;
  CGuildMonster::GetInstance();
  v5 = (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)v4;
  std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,long>>,0>>::find(
    v4,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > > *)&_Val.second,
    (const unsigned __int16 *)&pkCmd);
  if ( (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)_Val.second != v5->_Myhead )
    std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
      v5,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > *)&pkCmd,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > >)_Val.second);
  _Val.first = v2;
  _Val.second = v3;
  v6 = std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned long>>,0>>::_Buynode<std::pair<unsigned short const,unsigned long>>(
         (std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)v5,
         &_Val);
  std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)v5,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > >,bool> *)&_Val,
    v6,
    0);
  return 1;
}

//----- (006BE2D0) --------------------------------------------------------
char *__thiscall GuildNameCache::GetGuildName(GuildNameCache *this, unsigned int dwRegNum)
{
  GuildNameCache *v2; // esi@1
  std::map<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> > > *v3; // edi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v4; // eax@1
  _DWORD *v5; // eax@2
  unsigned int v6; // esi@3
  unsigned int v8; // eax@7
  int v9; // edx@8
  int v10; // edx@8
  int v11; // eax@8
  PROTO_NC_GUILD_NAME_REQ kReq; // [sp+8h] [bp-1Ch]@1
  char acName[17]; // [sp+Ch] [bp-18h]@8

  v2 = this;
  v3 = (std::map<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> > > *)&this->m_kGuildNameCache;
  v4 = std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::find(
         (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&this->m_kGuildNameCache,
         (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&kReq,
         &dwRegNum)->_Ptr;
  if ( v4 == (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v2->m_kGuildNameCache._Myhead )
  {
    v5 = operator new(0x18u);
    if ( v5 )
    {
      v5[3] = 0;
      v5[2] = 0;
      v5[1] = 0;
      *v5 = 0;
      v6 = (unsigned int)v5;
    }
    else
    {
      v6 = 0;
    }
    *std::map<unsigned long,NiTexture *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiTexture *>>>::operator[](
       v3,
       &dwRegNum) = v6;
    *(_DWORD *)(v6 + 16) = 0;
    *(_DWORD *)v6 = 0;
    *(_DWORD *)(v6 + 4) = 0;
    *(_DWORD *)(v6 + 8) = 0;
    *(_DWORD *)(v6 + 12) = 0;
    kReq.nNo = dwRegNum;
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 0x76u, &kReq, 4);
    return 0;
  }
  v8 = v4->_Myval.second;
  if ( *(_DWORD *)(v8 + 16) != 1 )
    return 0;
  v9 = *(_DWORD *)v8;
  *(_DWORD *)&acName[4] = *(_DWORD *)(v8 + 4);
  *(_DWORD *)acName = v9;
  v10 = *(_DWORD *)(v8 + 8);
  v11 = *(_DWORD *)(v8 + 12);
  *(_DWORD *)&acName[8] = v10;
  *(_DWORD *)&acName[12] = v11;
  acName[16] = 0;
  return fs("%s", acName);
}

//----- (006BE3C0) --------------------------------------------------------
void __thiscall GuildNameCache::SetGuildName(GuildNameCache *this, unsigned int dwRegNum, Name4 *rkName)
{
  std::map<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> > > *v3; // edi@1
  _DWORD *v4; // eax@2
  unsigned int v5; // esi@2
  Name4 *v6; // eax@4
  Name4 **v7; // eax@5
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > result; // [sp+8h] [bp-4h]@1

  v3 = (std::map<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> > > *)&this->m_kGuildNameCache;
  if ( std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::find(
         (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&this->m_kGuildNameCache,
         &result,
         &dwRegNum)->_Ptr == (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)this->m_kGuildNameCache._Myhead )
  {
    v4 = operator new(0x18u);
    v5 = 0;
    if ( v4 )
    {
      v4[3] = 0;
      v4[2] = 0;
      v4[1] = 0;
      *v4 = 0;
      v5 = (unsigned int)v4;
    }
    v6 = rkName;
    *(_DWORD *)(v5 + 16) = 1;
    *(_DWORD *)v5 = v6->n4_code[0];
    *(_DWORD *)(v5 + 4) = v6->n4_code[1];
    *(_DWORD *)(v5 + 8) = v6->n4_code[2];
    *(_DWORD *)(v5 + 12) = v6->n4_code[3];
    *std::map<unsigned long,NiTexture *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiTexture *>>>::operator[](
       v3,
       &dwRegNum) = v5;
    *(_WORD *)(v5 + 20) = -1;
  }
  else
  {
    v7 = (Name4 **)std::map<unsigned long,NiTexture *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiTexture *>>>::operator[](
                     v3,
                     &dwRegNum);
    **v7 = *rkName;
  }
}

//----- (006BE470) --------------------------------------------------------
GUILD_EMBLEM_INFO *__thiscall GuildNameCache::GetGuildEmblem(GuildNameCache *this, unsigned int dwRegNum)
{
  GuildNameCache *v2; // esi@1
  std::map<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> > > *v3; // edi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v4; // eax@1
  _DWORD *v5; // eax@2
  _DWORD *v6; // esi@3
  unsigned int *v7; // eax@5
  unsigned int v8; // ecx@5
  unsigned int v10; // eax@7
  PROTO_NC_GUILD_NAME_REQ kReq; // [sp+8h] [bp-4h]@1

  v2 = this;
  v3 = (std::map<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> > > *)&this->m_kGuildNameCache;
  v4 = std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::find(
         (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&this->m_kGuildNameCache,
         (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&kReq,
         &dwRegNum)->_Ptr;
  if ( v4 == (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v2->m_kGuildNameCache._Myhead )
  {
    v5 = operator new(0x18u);
    if ( v5 )
    {
      v5[3] = 0;
      v5[2] = 0;
      v5[1] = 0;
      *v5 = 0;
      v6 = v5;
    }
    else
    {
      v6 = 0;
    }
    v7 = std::map<unsigned long,NiTexture *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiTexture *>>>::operator[](
           v3,
           &dwRegNum);
    v8 = dwRegNum;
    *v7 = (unsigned int)v6;
    v6[4] = 0;
    *v6 = 0;
    v6[1] = 0;
    v6[2] = 0;
    v6[3] = 0;
    *((_WORD *)v6 + 10) = -1;
    kReq.nNo = v8;
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 0x76u, &kReq, 4);
    return 0;
  }
  v10 = v4->_Myval.second;
  if ( *(_DWORD *)(v10 + 16) != 1 )
    return 0;
  return (GUILD_EMBLEM_INFO *)(v10 + 20);
}

//----- (006BE510) --------------------------------------------------------
void __thiscall GuildNameCache::SetGuildEmblem(GuildNameCache *this, unsigned int dwRegNum, GUILD_EMBLEM_INFO *EmblemInfo)
{
  std::map<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> > > *v3; // edi@1
  _DWORD *v4; // eax@2
  _DWORD *v5; // esi@3
  unsigned int *v6; // eax@5
  GUILD_EMBLEM_INFO *v7; // edx@5
  unsigned int *v8; // eax@6
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > result; // [sp+8h] [bp-4h]@1

  v3 = (std::map<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> > > *)&this->m_kGuildNameCache;
  if ( std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::find(
         (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&this->m_kGuildNameCache,
         &result,
         &dwRegNum)->_Ptr == (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)this->m_kGuildNameCache._Myhead )
  {
    v4 = operator new(0x18u);
    if ( v4 )
    {
      v4[3] = 0;
      v4[2] = 0;
      v4[1] = 0;
      *v4 = 0;
      v5 = v4;
    }
    else
    {
      v5 = 0;
    }
    v6 = std::map<unsigned long,NiTexture *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiTexture *>>>::operator[](
           v3,
           &dwRegNum);
    v7 = (GUILD_EMBLEM_INFO *)dwRegNum;
    *v6 = (unsigned int)v5;
    v5[4] = 0;
    *v5 = 0;
    v5[1] = 0;
    v5[2] = 0;
    v5[3] = 0;
    *((_WORD *)v5 + 10) = -1;
    EmblemInfo = v7;
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 0x76u, &EmblemInfo, 4);
  }
  else
  {
    v8 = std::map<unsigned long,NiTexture *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiTexture *>>>::operator[](
           v3,
           &dwRegNum);
    *(GUILD_EMBLEM_INFO *)(*v8 + 20) = *EmblemInfo;
  }
}

//----- (006BE5C0) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_RENAME_CMD(GuildTask *this, PROTO_NC_GUILD_RENAME_CMD *pkCmd)
{
  GuildTask *v2; // ebx@1
  int v3; // ecx@2
  int v4; // eax@6
  NiUnsharedGeometryGroup *v5; // edi@9

  v2 = this;
  GuildNameCache::SetGuildName(this->m_spGuildNameCache.m_pObject, pkCmd->nGuildNo, &pkCmd->sGuildName);
  if ( GuildTask::ms_spGuildTask )
    v3 = GuildTask::ms_spGuildTask + 64;
  else
    v3 = 0;
  if ( *(_DWORD *)(v3 + 12) == pkCmd->nGuildNo )
  {
    if ( GuildTask::ms_spGuildTask )
      v4 = GuildTask::ms_spGuildTask + 64;
    else
      v4 = 0;
    *(_QWORD *)(v4 + 16) = *(_QWORD *)&pkCmd->sGuildName.n4_name[0];
    *(_QWORD *)(v4 + 24) = *(_QWORD *)&pkCmd->sGuildName.n4_code[2];
  }
  v5 = TextData2::Get(0x80DCC5C0);
  if ( v2->m_pkMsgHooker )
  {
    ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v2->m_pkMsgHooker->vfptr->SendDirectMessage)(
      25,
      v5,
      &v2->vfptr);
    if ( v2->m_pkMsgHooker )
      ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v2->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
        25,
        v5,
        &v2->vfptr);
  }
  v2->vfptr->DirectDispatchToParent((IDirectMessenger *)&v2->vfptr, 25, v5, (IDirectMessenger *)&v2->vfptr);
  return 1;
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006BE670) --------------------------------------------------------
void __thiscall GuildTask::GuildTask(GuildTask *this)
{
  GuildTask *v1; // esi@1
  GuildMemberTask *v2; // edi@1
  GuildNameCache *v3; // eax@6
  GuildNameCache *v4; // eax@7
  GuildNameCache *v5; // edi@9
  NiNode *v6; // edi@17
  NiNode *v7; // edi@22
  NiNode *v8; // edi@27
  GuildNameCache *v9; // [sp+14h] [bp-10h]@7

  v1 = this;
  ITask::ITask((ITask *)&this->vfptr, 0);
  CGuild::CGuild((CGuild *)&v1->vfptr);
  v1->vfptr = (CGuildVtbl *)&CClientGuild::`vftable';
  CPartyFinder::CPartyFinder((CPartyFinder *)&v1->m_GuildWarAble);
  CGuildTournament::CGuildTournament(&v1->m_GuildTournament);
  v1->m_kHistoryList.m_kAllocator.m_uiCount = 0;
  v1->m_kHistoryList.m_pkHead = 0;
  v1->m_kHistoryList.m_pkTail = 0;
  v1->m_kHistoryList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>Vtbl *)&PgTList<GUILD_HISTORY *>::`vftable';
  v1->vfptr = (NiRefObjectVtbl *)&GuildTask::`vftable'{for `NiRefObject'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildTask::`vftable'{for `IDirectMessenger'};
  v1->vfptr = (CGuildVtbl *)&GuildTask::`vftable';
  v1->m_GuildTournamentImprove.m_GTTScore.AGuild = 0;
  v1->m_GuildTournamentImprove.m_GTTScore.AGuildScore = 0;
  v1->m_GuildTournamentImprove.m_GTTScore.BGuild = 0;
  v1->m_GuildTournamentImprove.m_GTTScore.BGuildScore = 0;
  v1->m_GuildTournamentImprove.m_DiceInfo.AGuildDelegateName.n5_code[4] = 0;
  v1->m_GuildTournamentImprove.m_DiceInfo.AGuildDelegateName.n5_code[3] = 0;
  v1->m_GuildTournamentImprove.m_DiceInfo.AGuildDelegateName.n5_code[2] = 0;
  v1->m_GuildTournamentImprove.m_DiceInfo.AGuildDelegateName.n5_code[1] = 0;
  v1->m_GuildTournamentImprove.m_DiceInfo.AGuildDelegateName.n5_code[0] = 0;
  v1->m_GuildTournamentImprove.m_DiceInfo.BGuildDelegateName.n5_code[4] = 0;
  v1->m_GuildTournamentImprove.m_DiceInfo.BGuildDelegateName.n5_code[3] = 0;
  v1->m_GuildTournamentImprove.m_DiceInfo.BGuildDelegateName.n5_code[2] = 0;
  v1->m_GuildTournamentImprove.m_DiceInfo.BGuildDelegateName.n5_code[1] = 0;
  v1->m_GuildTournamentImprove.m_DiceInfo.BGuildDelegateName.n5_code[0] = 0;
  v1->m_pGTStartEffect.m_pObject = 0;
  v1->m_pGTWinEffect.m_pObject = 0;
  v1->m_pGTLoseEffect.m_pObject = 0;
  v1->m_spGuildMemberTask.m_pObject = 0;
  v1->m_spGuildNameCache.m_pObject = 0;
  v2 = v1->m_spGuildMemberTask.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spGuildMemberTask.m_pObject = 0;
  }
  v3 = (GuildNameCache *)operator new(0x50u);
  if ( v3 )
  {
    GuildNameCache::GuildNameCache(v3);
    v9 = v4;
  }
  else
  {
    v9 = 0;
    v4 = 0;
  }
  v5 = v1->m_spGuildNameCache.m_pObject;
  if ( v5 != v4 )
  {
    if ( v5 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      v4 = v9;
    }
    v1->m_spGuildNameCache.m_pObject = v4;
    if ( v4 )
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  }
  v1->m_iTotalGuildWarAbleCount = 0;
  v1->m_fPrevRefreshTime = 0.0;
  v1->m_iCurrPage = 0;
  v1->m_pkGuildTournamentBaseWin = 0;
  v1->m_pkGuildTournamentScheduleWin = 0;
  v1->m_pkGuildTournamentStorageWin = 0;
  *(_WORD *)&v1->m_bListRefreshEnable = 0;
  v1->m_bRecall = 0;
  v1->m_GuildTournamentImprove.m_uiGTTType = -1;
  v1->m_GuildTournamentImprove.m_DiceInfo.AGuild = 0;
  v1->m_GuildTournamentImprove.m_DiceInfo.AGuildDelegate = -1;
  v1->m_GuildTournamentImprove.m_GTTScore.AGuild = 0;
  v1->m_GuildTournamentImprove.m_GTTScore.AGuildScore = 0;
  v1->m_GuildTournamentImprove.m_DiceInfo.BGuild = 0;
  v1->m_GuildTournamentImprove.m_GTTScore.BGuild = 0;
  v1->m_GuildTournamentImprove.m_GTTScore.BGuildScore = 0;
  v1->m_GuildTournamentImprove.m_RedTeam = 0;
  v1->m_GuildTournamentImprove.m_BlueTeam = 0;
  v1->m_GuildTournamentImprove.m_DiceInfo.BGuildDelegate = -1;
  LODWORD(v1->m_iGuildToken) = 0;
  HIDWORD(v1->m_iGuildToken) = 0;
  v1->m_iGTObserverSeedNum = -1;
  v6 = v1->m_pGTStartEffect.m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v1->m_pGTStartEffect.m_pObject = 0;
  }
  v7 = v1->m_pGTWinEffect.m_pObject;
  if ( v7 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v1->m_pGTWinEffect.m_pObject = 0;
  }
  v8 = v1->m_pGTLoseEffect.m_pObject;
  if ( v8 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v1->m_pGTLoseEffect.m_pObject = 0;
  }
  v1->m_bOpserver = 0;
  v1->m_bGTQuit = 0;
}
// 9BF3B4: using guessed type int (__thiscall *PgTList<GUILD_HISTORY *>::`vftable')(void *p, char);
// 9BF3C4: using guessed type int (__thiscall *CClientGuild::`vftable')(CGuild *this, struct PROTO_NC_GUILD_MAKE_ACK *);
// 9BF41C: using guessed type int (__thiscall *GuildTask::`vftable')(GuildTask *this, PROTO_NC_GUILD_MAKE_ACK *pkProto);
// 9BF470: using guessed type void (__thiscall *GuildTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9BF48C: using guessed type int (__thiscall *GuildTask::`vftable'{for `NiRefObject'})(void *p, char);

//----- (006BE950) --------------------------------------------------------
void __cdecl GuildTask::Create(IDirectMessenger *pkMsgHooker)
{
  int v1; // eax@1
  GuildTask *v2; // eax@2
  int v3; // eax@3
  int v4; // esi@3
  void (__thiscall ***v5)(_DWORD, _DWORD); // edi@7

  v1 = GuildTask::ms_spGuildTask;
  if ( !GuildTask::ms_spGuildTask )
  {
    v2 = (GuildTask *)operator new(0xBC8u);
    if ( v2 )
    {
      GuildTask::GuildTask(v2);
      v4 = v3;
    }
    else
    {
      v4 = 0;
    }
    v1 = GuildTask::ms_spGuildTask;
    if ( GuildTask::ms_spGuildTask != v4 )
    {
      if ( GuildTask::ms_spGuildTask )
      {
        v5 = (void (__thiscall ***)(_DWORD, _DWORD))GuildTask::ms_spGuildTask;
        if ( !InterlockedDecrement((volatile LONG *)(GuildTask::ms_spGuildTask + 4)) )
        {
          if ( v5 )
            (**v5)(v5, 1);
        }
      }
      v1 = v4;
      GuildTask::ms_spGuildTask = v4;
      if ( v4 )
      {
        InterlockedIncrement((volatile LONG *)(v4 + 4));
        v1 = GuildTask::ms_spGuildTask;
      }
    }
  }
  (**(void (__cdecl ***)(IDirectMessenger *))(v1 + 8))(pkMsgHooker);
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006BEA10) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_MAKE_ACK(GuildTask *this, PROTO_NC_GUILD_MAKE_ACK *pkProto)
{
  GuildTask *v2; // edi@1
  NiUnsharedGeometryGroup *v3; // eax@2
  int v4; // esi@2
  signed int v5; // eax@6
  int result; // eax@13
  const char *v7; // eax@14
  Name5 *v8; // eax@14
  Name5 *v9; // ST0C_4@14
  CClientGuildAcademy *v10; // eax@14
  int v11; // esi@14
  unsigned int v12; // ecx@17
  unsigned int v13; // eax@17
  unsigned int v14; // ecx@17
  char *v15; // eax@17
  char *v16; // eax@17
  GameFrameWork *v17; // eax@17
  char *v18; // eax@9
  NiUnsharedGeometryGroup *v19; // [sp+Ch] [bp-30h]@2
  Name5 v20; // [sp+10h] [bp-2Ch]@14
  char acGuildName[17]; // [sp+24h] [bp-18h]@17

  v2 = this;
  *(_DWORD *)&this->m_acGuildName[8] = 0;
  if ( pkProto->Error == 3272 )
  {
    v3 = TextData::Get(0xFA2A187F);
    v4 = (int)&v2[-1].m_GuildTournamentImprove.m_DiceInfo.BGuildDelegateName.n5_code[4] + 2;
    v19 = v3;
    if ( v2[-1].m_GuildTournamentImprove.m_RedTeam )
    {
      (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, char *))(**(_DWORD **)(v4 + 4) + 4))(
        25,
        v3,
        (char *)&v2[-1].m_GuildTournamentImprove.m_DiceInfo.BGuildDelegateName.n5_code[4] + 2);
      v3 = v19;
      if ( *(_DWORD *)(v4 + 4) )
      {
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, char *))(**(_DWORD **)(v4 + 4) + 20))(
          25,
          v19,
          (char *)&v2[-1].m_GuildTournamentImprove.m_DiceInfo.BGuildDelegateName.n5_code[4] + 2);
        v3 = v19;
      }
    }
    (*(void (__thiscall **)(char *, signed int, NiUnsharedGeometryGroup *, char *))(*(_DWORD *)v4 + 20))(
      (char *)&v2[-1].m_GuildTournamentImprove.m_DiceInfo.BGuildDelegateName.n5_code[4] + 2,
      25,
      v3,
      (char *)&v2[-1].m_GuildTournamentImprove.m_DiceInfo.BGuildDelegateName.n5_code[4] + 2);
  }
  v5 = pkProto->Error;
  if ( v5 > 6696 )
  {
    if ( (unsigned int)(v5 - 12677) > 1 )
      goto LABEL_22;
LABEL_20:
    v18 = (char *)TextData::Get(0x6324CA2u);
LABEL_21:
    MsgBox::Modal(MSGBOX_OK, v18);
    goto LABEL_22;
  }
  if ( v5 == 6696 )
    goto LABEL_20;
  switch ( v5 )
  {
    case 3225:
      v18 = (char *)TextData::Get(0x114EFB5Eu);
      goto LABEL_21;
    case 3226:
    case 3268:
      v18 = (char *)TextData::Get(0xA300ED5C);
      goto LABEL_21;
    case 3228:
    case 3267:
      v18 = (char *)TextData::Get(0x12CED64u);
      goto LABEL_21;
    case 3266:
      v18 = (char *)TextData::Get(0xD5C0CC3A);
      goto LABEL_21;
    case 3137:
      result = CGuild::Recv_NC_GUILD_MAKE_ACK((CGuild *)v2, pkProto);
      if ( !result )
        return result;
      g_pkMainChar->m_dwGuildRegNum = (unsigned int)v2->m_pkMsgHooker;
      GuildNameCache::SetGuildName(
        (GuildNameCache *)v2->m_GuildTournamentImprove.m_DiceInfo.BGuild,
        (unsigned int)v2->m_pkMsgHooker,
        (Name4 *)&v2->m_uiMessageNum);
      v7 = (const char *)((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)();
      Name5::Name5(&v20, v7);
      v9 = v8;
      v10 = GuildAcademyTask::GetGuildAcademy();
      CGuild::MakeAcademy((CGuild *)&v10->vfptr, v9);
      v11 = (int)&v2[-1].m_GuildTournamentImprove.m_DiceInfo.BGuildDelegateName.n5_code[4] + 2;
      if ( v2[-1].m_GuildTournamentImprove.m_RedTeam )
      {
        (*(void (__stdcall **)(signed int, _DWORD, char *))(**(_DWORD **)(v11 + 4) + 4))(
          71,
          0,
          (char *)&v2[-1].m_GuildTournamentImprove.m_DiceInfo.BGuildDelegateName.n5_code[4] + 2);
        if ( *(_DWORD *)(v11 + 4) )
          (*(void (__stdcall **)(signed int, _DWORD, char *))(**(_DWORD **)(v11 + 4) + 20))(
            71,
            0,
            (char *)&v2[-1].m_GuildTournamentImprove.m_DiceInfo.BGuildDelegateName.n5_code[4] + 2);
      }
      (*(void (__thiscall **)(char *, signed int, _DWORD, char *))(*(_DWORD *)v11 + 20))(
        (char *)&v2[-1].m_GuildTournamentImprove.m_DiceInfo.BGuildDelegateName.n5_code[4] + 2,
        71,
        0,
        (char *)&v2[-1].m_GuildTournamentImprove.m_DiceInfo.BGuildDelegateName.n5_code[4] + 2);
      GuildAcademyTask::CreateGuildacademyMasterEffect(g_pkMainChar);
      v12 = pkProto->Name.n4_code[0];
      v13 = pkProto->Name.n4_code[2];
      *(_DWORD *)&acGuildName[4] = pkProto->Name.n4_code[1];
      *(_DWORD *)acGuildName = v12;
      v14 = pkProto->Name.n4_code[3];
      *(_DWORD *)&acGuildName[8] = v13;
      *(_DWORD *)&acGuildName[12] = v14;
      acGuildName[16] = 0;
      v15 = (char *)TextData::Get(0x243F1C56u);
      v16 = fs(v15, acGuildName);
      MsgBox::Modal(MSGBOX_OK, v16);
      v17 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v17 )
        GameFrameWork::OpenPlayGuideWin(v17, BIL_GUILDWAR_1);
      break;
    case 3224:
    case 3227:
    case 3229:
    case 3230:
    case 3269:
    case 3270:
      goto LABEL_20;
    default:
      break;
  }
LABEL_22:
  GuildNpcMenuWin::CloseFoundWin(*(GuildNpcMenuWin **)&v2->m_acGuildName[12]);
  return 1;
}

//----- (006BECE0) --------------------------------------------------------
int __thiscall GuildTask::Recv_NC_GUILD_MY_GUILD_INFO_ACK(GuildTask *this, PROTO_NC_GUILD_MY_GUILD_INFO_ACK *pkProto)
{
  GuildTask *v2; // esi@1
  int result; // eax@1

  v2 = this;
  result = CGuild::Recv_NC_GUILD_MY_GUILD_INFO_ACK((CGuild *)this, pkProto);
  if ( result )
  {
    g_pkMainChar->m_dwGuildRegNum = (unsigned int)v2->m_pkMsgHooker;
    GuildNameCache::SetGuildName(
      (GuildNameCache *)v2->m_GuildTournamentImprove.m_DiceInfo.BGuild,
      (unsigned int)v2->m_pkMsgHooker,
      (Name4 *)&v2->m_uiMessageNum);
    result = 1;
  }
  return result;
}

//----- (006BED30) --------------------------------------------------------
char *__cdecl GuildTask::GetGuildName(unsigned int dwRegNum)
{
  char *result; // eax@1

  result = (char *)GuildTask::ms_spGuildTask;
  if ( GuildTask::ms_spGuildTask )
    result = GuildNameCache::GetGuildName(*(GuildNameCache **)(GuildTask::ms_spGuildTask + 3000), dwRegNum);
  return result;
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006BED50) --------------------------------------------------------
GUILD_EMBLEM_INFO *__cdecl GuildTask::GetEmblemInfo(unsigned int dwRegNum)
{
  GUILD_EMBLEM_INFO *result; // eax@1

  result = (GUILD_EMBLEM_INFO *)GuildTask::ms_spGuildTask;
  if ( GuildTask::ms_spGuildTask )
    result = GuildNameCache::GetGuildEmblem(*(GuildNameCache **)(GuildTask::ms_spGuildTask + 3000), dwRegNum);
  return result;
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006BED70) --------------------------------------------------------
void __cdecl GuildTask::SetGuildEmblem(unsigned int dwRegNum, GUILD_EMBLEM_INFO *pEmblemInfo)
{
  if ( GuildTask::ms_spGuildTask )
    GuildNameCache::SetGuildEmblem(*(GuildNameCache **)(GuildTask::ms_spGuildTask + 3000), dwRegNum, pEmblemInfo);
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006BEDA0) --------------------------------------------------------
PROTO_NC_GUILD_EMBLEM_INFO_NOTICE_CMD *__stdcall GuildTask::Recv_NC_GUILD_EMBLEM_INFO_NOTICE_CMD(PROTO_NC_GUILD_EMBLEM_INFO_NOTICE_CMD *pkCmd)
{
  PROTO_NC_GUILD_EMBLEM_INFO_NOTICE_CMD *result; // eax@1

  result = pkCmd;
  if ( pkCmd )
  {
    if ( GuildTask::ms_spGuildTask )
      GuildNameCache::SetGuildEmblem(
        *(GuildNameCache **)(GuildTask::ms_spGuildTask + 3000),
        pkCmd->nGuildNo,
        &pkCmd->EmblemInfo);
    result = (PROTO_NC_GUILD_EMBLEM_INFO_NOTICE_CMD *)1;
  }
  return result;
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006BEDE0) --------------------------------------------------------
bool __thiscall GuildTask::OnProcessNetMsg(GuildTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  GuildTask *v5; // esi@1
  PgFrameWork *v6; // ebx@1
  GuildAcademyMenuWin *v7; // eax@3
  GuildAcademyMenuWin *v8; // eax@4
  bool result; // al@8
  int v10; // esi@11
  CClientGuildAcademy *v11; // eax@14
  int v12; // edi@16
  Char *v13; // esi@17
  const char *v14; // eax@19
  int v15; // eax@19
  _BYTE v16[20]; // ST00_20@19
  CClientGuildAcademy *v17; // eax@19
  bool v18; // al@20
  int v19; // esi@74
  int v20; // esi@78
  int v21; // esi@82
  int v22; // esi@92
  IDirectMessenger *v23; // esi@97
  int v24; // ecx@100
  int v25; // eax@100
  int v26; // ecx@100
  char *v27; // eax@100
  char *v28; // edi@100
  IDirectMessenger *v29; // esi@101
  int v30; // ecx@104
  int v31; // edx@104
  int v32; // eax@104
  char *v33; // eax@107
  char *v34; // edi@110
  int v35; // esi@111
  int v36; // ecx@115
  int v37; // eax@115
  int v38; // edx@115
  int v39; // ecx@115
  char *v40; // eax@116
  char *v41; // ST20_4@118
  char *v42; // ST0C_4@118
  char *v43; // eax@118
  char *v44; // eax@118
  char *v45; // [sp-4h] [bp-40h]@116
  char *pcMsg; // [sp+Ch] [bp-30h]@1
  Name5 v47; // [sp+10h] [bp-2Ch]@19
  char acGuildName[17]; // [sp+24h] [bp-18h]@100

  v5 = this;
  pcMsg = 0;
  v6 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  switch ( iDepart )
  {
    case 15:
      if ( iCommand != 12 )
        return 0;
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 8u, 0xBu, 0, 0);
      v7 = GuildAcademyTask::GetGuildAcademyMenuWin();
      if ( (unsigned __int8)((int (__thiscall *)(GuildAcademyMenuWin *))v7->vfptr[65].__vecDelDtor)(v7) )
      {
        v8 = GuildAcademyTask::GetGuildAcademyMenuWin();
        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v8->vfptr);
      }
      if ( (unsigned __int8)(*(int (**)(void))(**(_DWORD **)(GuildTask::ms_spGuildTask + 2844) + 260))() )
        PgWinMgr::CloseWin(&Pgg_kWinMgr, *(PgWin **)(GuildTask::ms_spGuildTask + 2844));
      PgWinMgr::ShowWin(&Pgg_kWinMgr, *(PgWin **)(GuildTask::ms_spGuildTask + 2852));
      return 1;
    case 4:
      if ( iCommand != 18 )
        return 0;
      if ( !*(_DWORD *)pvData )
      {
        v5->m_bIsGuild = 0;
        return 1;
      }
      v5->m_bIsGuild = 1;
      GUILD_CLIENT::operator=(&v5->m_Guild, (GUILD_CLIENT *)((char *)pvData + 4));
      g_pkMainChar->m_dwGuildRegNum = v5->m_Guild.nNo;
      GuildNameCache::SetGuildName(v5->m_spGuildNameCache.m_pObject, v5->m_Guild.nNo, &v5->m_Guild.sName);
      v10 = (int)&v5->vfptr;
      if ( *(_DWORD *)(v10 + 4) )
      {
        (*(void (__stdcall **)(signed int, _DWORD, int))(**(_DWORD **)(v10 + 4) + 4))(41, 0, v10);
        if ( *(_DWORD *)(v10 + 4) )
          (*(void (__stdcall **)(signed int, _DWORD, int))(**(_DWORD **)(v10 + 4) + 20))(41, 0, v10);
      }
      (*(void (__thiscall **)(int, signed int, _DWORD, int))(*(_DWORD *)v10 + 20))(v10, 41, 0, v10);
      g_pkMainChar->m_GuildAcademyMemberFlag = 0;
      v11 = GuildAcademyTask::GetGuildAcademy();
      if ( (unsigned __int8)CClientGuildAcademy::AmIGuildAcademyMaster(v11) )
      {
        GuildAcademyTask::CreateGuildacademyMasterEffect(g_pkMainChar);
        return 1;
      }
      v12 = unk_A96B24;
      if ( !unk_A96B24 )
        return 1;
      while ( 1 )
      {
        v13 = *(Char **)(v12 + 8);
        v12 = *(_DWORD *)v12;
        v18 = 0;
        if ( v13 )
        {
          if ( g_pkMainChar != v13 )
          {
            pcMsg = (char *)((unsigned int)pcMsg | 1);
            v14 = (const char *)((int (__thiscall *)(Char *))v13->vfptr[2].DeleteAbStateByAbstateIndex)(v13);
            Name5::Name5(&v47, v14);
            *(_QWORD *)v16 = *(_QWORD *)v15;
            *(_QWORD *)&v16[8] = *(_QWORD *)(v15 + 8);
            *(_DWORD *)&v16[16] = *(_DWORD *)(v15 + 16);
            v17 = GuildAcademyTask::GetGuildAcademy();
            if ( (unsigned __int8)CClientGuildAcademy::IsGuildAcademyMaster(v17, *(Name5 *)v16) )
              v18 = 1;
          }
        }
        if ( (unsigned __int8)pcMsg & 1 )
          pcMsg = (char *)((unsigned int)pcMsg & 0xFFFFFFFE);
        if ( v18 )
          break;
        if ( !v12 )
          return 1;
      }
      GuildAcademyTask::CreateGuildacademyMasterEffect(v13);
      return 1;
    case 12:
      if ( iCommand != 39 )
        return 0;
      GuildTask::Recv_NC_ITEM_GUILD_STORAGE_WITHDRAW_ACK(v5, (PROTO_NC_ITEM_GUILD_STORAGE_WITHDRAW_ACK *)pvData);
      return 1;
    case 29:
      switch ( iCommand )
      {
        case 123:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_JOIN_ACK(v5, (PROTO_NC_GUILD_TOURNAMENT_JOIN_ACK *)pvData);
          return 1;
        case 127:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_LIST_ACK(v5, iRevBytes, pvData);
          return 1;
        case 132:
          GuildTask::Recv_NC_GUILD_TOURNAMENTSTOP_CMD(v5, (PROTO_NC_GUILD_TOURNAMENTSTOP_CMD *)pvData);
          return 1;
        case 131:
          GuildTask::Recv_NC_GUILD_TOURNAMENTSTART_CMD(v5, (PROTO_NC_GUILD_TOURNAMENTSTART_CMD *)pvData);
          return 1;
        case 128:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_TYPE_CMD(v5, (PROTO_NC_GUILD_TOURNAMENT_TYPE_CMD *)pvData);
          return 1;
        case 144:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_RESULT_CMD(v5, (PROTO_NC_GUILD_TOURNAMENT_RESULT_CMD *)pvData);
          return 1;
        case 141:
          GuildTask::Recv_NC_GUILD_MOBGUILD_CMD((PROTO_NC_GUILD_MOBGUILD_CMD *)pvData);
          return 1;
        case 148:
          GuildTask::Recv_NC_GUILD_STORAGEWITHDRAW_CMD(v5, (PROTO_NC_GUILD_STORAGEWITHDRAW_CMD *)pvData);
          return 1;
        case 155:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_RECALL_ENTER_CMD(v5, (PROTO_NC_GUILD_TOURNAMENT_RECALL_ENTER_CMD *)pvData);
          return 1;
        case 157:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_RECALL_ENTER_ACK(v5, (PROTO_NC_GUILD_TOURNAMENT_RECALL_ENTER_ACK *)pvData);
          return 1;
        case 191:
          GuildTask::Recv_NC_GUILD_MY_GUILD_TOKEN_INFO_ACK(v5, (PROTO_NC_GUILD_MY_GUILD_TOKEN_INFO_ACK *)pvData);
          return 1;
        case 206:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_SKILLPOINT_CMD(v5, (PROTO_NC_GUILD_TOURNAMENT_SKILLPOINT_CMD *)pvData);
          return 1;
        case 203:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_FLAGCAPTURE_ACK(v5, (PROTO_NC_GUILD_TOURNAMENT_FLAGCAPTURE_ACK *)pvData);
          return 1;
        case 204:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_FLAGCAPTURE_CMD(v5, (PROTO_NC_GUILD_TOURNAMENT_FLAGCAPTURE_CMD *)pvData);
          return 1;
        case 205:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_FLAGCAPTURE_RESULT_CMD(
            v5,
            (PROTO_NC_GUILD_TOURNAMENT_FLAGCAPTURE_RESULT_CMD *)pvData);
          return 1;
        case 208:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_USESKILL_ACK(v5, (PROTO_NC_GUILD_TOURNAMENT_USESKILL_ACK *)pvData);
          return 1;
        case 210:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_DICEGAME_START_CMD(
            v5,
            (PROTO_NC_GUILD_TOURNAMENT_DICEGAME_START_CMD *)pvData);
          return 1;
        case 213:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_DICEGAME_THROW_CMD(
            v5,
            (PROTO_NC_GUILD_TOURNAMENT_DICEGAME_THROW_CMD *)pvData);
          return 1;
        case 212:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_DICEGAME_THROW_ACK(
            v5,
            (PROTO_NC_GUILD_TOURNAMENT_DICEGAME_THROW_ACK *)pvData);
          return 1;
        case 214:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_DICEGAME_END_TIME(
            v5,
            (PROTO_NC_GUILD_TOURNAMENT_DICEGAME_BEFORE_END_TIME_MSG_CMD *)pvData);
          return 1;
        case 209:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_USESKILL_CMD(v5, (PROTO_NC_GUILD_TOURNAMENT_USESKILL_CMD *)pvData);
          return 1;
        case 196:
          GuildTask::Recv_NC_GUILD_MY_GUILD_TOURNAMENT_MATCH_TIME_ACK(
            v5,
            (PROTO_NC_GUILD_MY_GUILD_TOURNAMENT_MATCH_TIME_ACK *)pvData);
          return 1;
        case 222:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_PLAYERDIEMSG_CMD(
            v5,
            (int)pvData,
            (PROTO_NC_GUILD_TOURNAMENT_PLAYERDIEMSG_CMD *)pvData);
          return 1;
        case 216:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_OBSERVER_ENTER_ACK(
            v5,
            (PROTO_NC_GUILD_TOURNAMENT_OBSERVER_ENTER_ACK *)pvData);
          return 1;
        case 220:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_OBSERVER_OUT_ACK(v5, (PROTO_NC_GUILD_TOURNAMENT_OBSERVER_OUT_ACK *)pvData);
          return 1;
        case 225:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_MANAGERUSERMSG_CMD(
            v5,
            (PROTO_NC_GUILD_TOURNAMENT_MANAGERUSERMSG_CMD *)pvData);
          return 1;
        case 224:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_STARTMSG_CMD(v5, (PROTO_NC_GUILD_TOURNAMENT_STARTMSG_CMD *)pvData);
          return 1;
        case 226:
          GuildTask::Recv_NC_GUILD_TOURNAMENTSTOPMSG_CMD(
            v5,
            (int)pvData,
            (PROTO_NC_GUILD_TOURNAMENTSTOPMSG_CMD *)pvData);
          return 1;
        case 194:
          GuildTask::Recv_NC_GUILD_WORLD_SET_GUILD_TOKEN_CMD(v5, (PROTO_NC_GUILD_WORLD_SET_GUILD_TOKEN_CMD *)pvData);
          return 1;
        case 223:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_PLAYERKILLMSG_CMD(
            v5,
            (PROTO_NC_GUILD_TOURNAMENT_PLAYERKILLMSG_CMD *)pvData);
          return 1;
        case 221:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_SCORE_CMD(v5, (int)v6, (PROTO_NC_GUILD_TOURNAMENT_SCORE_CMD *)pvData);
          return 1;
        case 234:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_JOIN_LIST_ACK(v5, (PROTO_NC_GUILD_TOURNAMENT_JOIN_LIST_ACK *)pvData);
          return 1;
        case 237:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_NOTIFY_CMD((PROTO_NC_GUILD_TOURNAMENT_NOTIFY_CMD *)pvData);
          return 1;
        case 6:
          v5->vfptr->Recv_NC_GUILD_MAKE_ACK(&v5->vfptr, pvData);
          return 1;
        case 8:
          (*(void (__thiscall **)(CGuildVtbl **, void *))&v5->vfptr->gap4[0])(&v5->vfptr, pvData);
          return 1;
        case 17:
          (*(void (__thiscall **)(CGuildVtbl **, void *))&v5->vfptr->gap4[4])(&v5->vfptr, pvData);
          return 1;
        case 19:
          v5->vfptr->Recv_NC_GUILD_MONEY_SUB_ACK((CGuild *)&v5->vfptr, (PROTO_NC_GUILD_MONEY_SUB_ACK *)pvData);
          return 1;
        case 21:
          v5->vfptr->Recv_NC_GUILD_GRADE_ACK((CGuild *)&v5->vfptr, (PROTO_NC_GUILD_GRADE_ACK *)pvData);
          return 1;
        case 35:
          v5->vfptr->Recv_NC_GUILD_WAR_ACK((CGuild *)&v5->vfptr, (PROTO_NC_GUILD_WAR_ACK *)pvData);
          return 1;
        case 25:
          v5->vfptr->Recv_NC_GUILD_MY_GUILD_INFO_ACK((CGuild *)&v5->vfptr, (PROTO_NC_GUILD_MY_GUILD_INFO_ACK *)pvData);
          return 1;
        case 31:
          v5->vfptr->Recv_NC_GUILD_MONEY_ADD_ACK((CGuild *)&v5->vfptr, (PROTO_NC_GUILD_MONEY_ADD_ACK *)pvData);
          return 1;
        case 39:
          v5->vfptr->Recv_NC_GUILD_WAR_LIST_ACK((CGuild *)&v5->vfptr, (PROTO_NC_GUILD_WAR_LIST_ACK *)pvData);
          v19 = (int)&v5->vfptr;
          if ( *(_DWORD *)(v19 + 4) )
          {
            (*(void (__stdcall **)(signed int, _DWORD, int))(**(_DWORD **)(v19 + 4) + 4))(50, 0, v19);
            if ( *(_DWORD *)(v19 + 4) )
              (*(void (__stdcall **)(signed int, _DWORD, int))(**(_DWORD **)(v19 + 4) + 20))(50, 0, v19);
          }
          (*(void (__thiscall **)(int, signed int, _DWORD, int))(*(_DWORD *)v19 + 20))(v19, 50, 0, v19);
          return 1;
        case 37:
          GuildTask::Recv_NC_GUILD_WAR_ABLE_LIST_ACK(v5, (PROTO_NC_GUILD_WAR_ABLE_LIST_ACK *)pvData);
          v20 = (int)&v5->vfptr;
          if ( *(_DWORD *)(v20 + 4) )
          {
            (*(void (__stdcall **)(signed int, _DWORD, int))(**(_DWORD **)(v20 + 4) + 4))(51, 0, v20);
            if ( *(_DWORD *)(v20 + 4) )
              (*(void (__stdcall **)(signed int, _DWORD, int))(**(_DWORD **)(v20 + 4) + 20))(51, 0, v20);
          }
          (*(void (__thiscall **)(int, signed int, _DWORD, int))(*(_DWORD *)v20 + 20))(v20, 51, 0, v20);
          return 1;
        case 48:
          v5->vfptr->Recv_NC_GUILD_DELETE_CMD((CGuild *)&v5->vfptr, (PROTO_NC_GUILD_DELETE_CMD *)pvData);
          v21 = (int)&v5->vfptr;
          GuildMemberTask::GetGuildMember()->m_NumOfMembers = 0;
          if ( *(_DWORD *)(v21 + 4) )
            (*(void (__stdcall **)(signed int, _DWORD, int))(**(_DWORD **)(v21 + 4) + 4))(41, 0, v21);
          if ( *(_DWORD *)(v21 + 4) )
            (*(void (__stdcall **)(signed int, _DWORD, int))(**(_DWORD **)(v21 + 4) + 20))(41, 0, v21);
          (*(void (__thiscall **)(int, signed int, _DWORD, int))(*(_DWORD *)v21 + 20))(v21, 41, 0, v21);
          if ( v6 )
            GuildWin::ClearGTInfo((GuildWin *)v6[24].vfptr);
          return 1;
        case 47:
          v5->vfptr->Recv_NC_GUILD_DISMISS_CMD((CGuild *)&v5->vfptr, (PROTO_NC_GUILD_DISMISS_CMD *)pvData);
          return 1;
        case 43:
          v5->vfptr->Recv_NC_GUILD_MONEY_ADD_CMD((CGuild *)&v5->vfptr, (PROTO_NC_GUILD_MONEY_ADD_CMD *)pvData);
          return 1;
        case 44:
          v5->vfptr->Recv_NC_GUILD_MONEY_SUB_CMD((CGuild *)&v5->vfptr, (PROTO_NC_GUILD_MONEY_SUB_CMD *)pvData);
          return 1;
        case 45:
          v5->vfptr->Recv_NC_GUILD_NOTIFY_CMD((CGuild *)&v5->vfptr, (PROTO_NC_GUILD_NOTIFY_CMD *)pvData);
          v22 = (int)&v5->vfptr;
          if ( *(_DWORD *)(v22 + 4) )
          {
            (*(void (__stdcall **)(signed int, _DWORD, int))(**(_DWORD **)(v22 + 4) + 4))(41, 0, v22);
            if ( *(_DWORD *)(v22 + 4) )
              (*(void (__stdcall **)(signed int, _DWORD, int))(**(_DWORD **)(v22 + 4) + 20))(41, 0, v22);
          }
          (*(void (__thiscall **)(int, signed int, _DWORD, int))(*(_DWORD *)v22 + 20))(v22, 41, 0, v22);
          return 1;
        case 46:
          v5->vfptr->Recv_NC_GUILD_GRADE_CMD((CGuild *)&v5->vfptr, (PROTO_NC_GUILD_GRADE_CMD *)pvData);
          return 1;
        case 51:
          v5->vfptr->Recv_NC_GUILD_WAR_START_CMD((CGuild *)&v5->vfptr, (PROTO_NC_GUILD_WAR_START_CMD *)pvData);
          v23 = (IDirectMessenger *)&v5->vfptr;
          if ( v23->m_pkMsgHooker )
          {
            ((void (__stdcall *)(signed int, _DWORD, IDirectMessenger *))v23->m_pkMsgHooker->vfptr->SendDirectMessage)(
              50,
              0,
              v23);
            if ( v23->m_pkMsgHooker )
              ((void (__stdcall *)(signed int, _DWORD, IDirectMessenger *))v23->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                50,
                0,
                v23);
          }
          v23->vfptr->DirectDispatchToParent(v23, 50, 0, v23);
          v24 = *(_DWORD *)pvData;
          v25 = *((_DWORD *)pvData + 2);
          *(_DWORD *)&acGuildName[4] = *((_DWORD *)pvData + 1);
          *(_DWORD *)acGuildName = v24;
          v26 = *((_DWORD *)pvData + 3);
          *(_DWORD *)&acGuildName[8] = v25;
          *(_DWORD *)&acGuildName[12] = v26;
          acGuildName[16] = 0;
          v27 = (char *)TextData::Get(0x69FECEE7u);
          v28 = fs(v27, acGuildName);
          IDirectMessenger::DirectDispatch(v23, 46, v28, 0);
          IDirectMessenger::DirectDispatch(v23, 25, v28, 0);
          SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_STARTQUEST);
          return 1;
        case 52:
          v5->vfptr->Recv_NC_GUILD_WAR_END_CMD((CGuild *)&v5->vfptr, (PROTO_NC_GUILD_WAR_END_CMD *)pvData);
          v5->m_fPrevRefreshTime = 0.0;
          v29 = (IDirectMessenger *)&v5->vfptr;
          if ( v29->m_pkMsgHooker )
          {
            ((void (__stdcall *)(signed int, _DWORD, IDirectMessenger *))v29->m_pkMsgHooker->vfptr->SendDirectMessage)(
              50,
              0,
              v29);
            if ( v29->m_pkMsgHooker )
              ((void (__stdcall *)(signed int, _DWORD, IDirectMessenger *))v29->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                50,
                0,
                v29);
          }
          v29->vfptr->DirectDispatchToParent(v29, 50, 0, v29);
          v30 = *((_DWORD *)pvData + 1);
          v31 = *((_DWORD *)pvData + 2);
          *(_DWORD *)acGuildName = *(_DWORD *)pvData;
          v32 = *((_DWORD *)pvData + 3);
          *(_DWORD *)&acGuildName[4] = v30;
          *(_DWORD *)&acGuildName[8] = v31;
          *(_DWORD *)&acGuildName[12] = v32;
          acGuildName[16] = 0;
          SoundMgr::PlayInterfaceSound(&g_kSoundMgr, SFX_ENDQUEST);
          if ( *((_BYTE *)pvData + 32) )
          {
            if ( *((_BYTE *)pvData + 32) == 1 )
            {
              v33 = (char *)TextData::Get(0xB802C148);
            }
            else
            {
              if ( *((_BYTE *)pvData + 32) != 2 )
                return 1;
              v33 = (char *)TextData::Get(0xBE422730);
            }
          }
          else
          {
            v33 = (char *)TextData::Get(0xF83D2489);
          }
          v34 = fs(v33, acGuildName);
          IDirectMessenger::DirectDispatch(v29, 25, v34, 0);
          IDirectMessenger::DirectDispatch(v29, 46, v34, 0);
          result = 1;
          break;
        case 53:
          v5->vfptr->Recv_NC_GUILD_WAR_COOLDOWN_DONE_CMD(
            (CGuild *)&v5->vfptr,
            (PROTO_NC_GUILD_WAR_COOLDOWN_DONE_CMD *)pvData);
          v5->m_fPrevRefreshTime = 0.0;
          v35 = (int)&v5->vfptr;
          if ( *(_DWORD *)(v35 + 4) )
          {
            (*(void (__stdcall **)(signed int, _DWORD, int))(**(_DWORD **)(v35 + 4) + 4))(50, 0, v35);
            if ( *(_DWORD *)(v35 + 4) )
              (*(void (__stdcall **)(signed int, _DWORD, int))(**(_DWORD **)(v35 + 4) + 20))(50, 0, v35);
          }
          (*(void (__thiscall **)(int, signed int, _DWORD, int))(*(_DWORD *)v35 + 20))(v35, 50, 0, v35);
          return 1;
        case 50:
          v5->vfptr->Recv_NC_GUILD_WAR_TARGET_CMD((CGuild *)&v5->vfptr, (PROTO_NC_GUILD_WAR_TARGET_CMD *)pvData);
          v5->m_fPrevRefreshTime = 0.0;
          acGuildName[16] = 0;
          v36 = *((_DWORD *)pvData + 1);
          v37 = *((_DWORD *)pvData + 3);
          *(_DWORD *)&acGuildName[4] = *((_DWORD *)pvData + 2);
          v38 = *(_DWORD *)((char *)pvData + 146);
          *(_DWORD *)acGuildName = v36;
          v39 = *((_DWORD *)pvData + 4);
          *(_DWORD *)&acGuildName[8] = v37;
          *(_DWORD *)&acGuildName[12] = v39;
          if ( v38 == v5->m_Guild.nNo )
          {
            v45 = acGuildName;
            v40 = (char *)TextData::Get(0xACDCC82E);
          }
          else
          {
            v45 = acGuildName;
            v40 = (char *)TextData::Get(0xACDC0C2E);
          }
          v41 = fs(v40, v45);
          IDirectMessenger::DirectDispatch((IDirectMessenger *)&v5->vfptr, 25, v41, 0);
          IDirectMessenger::DirectDispatch((IDirectMessenger *)&v5->vfptr, 46, v41, 0);
          v42 = GetGuildWarTimeLeftStr(*(_DWORD *)((char *)pvData + 22), 0);
          v43 = (char *)TextData::Get(0xD52147Au);
          v44 = fs(v43, v42);
          IDirectMessenger::DirectDispatch((IDirectMessenger *)&v5->vfptr, 25, v44, 0);
          CGuildWar::Add(&v5->m_GuildWar, (SHINE_GUILD_WAR_INFO *)pvData);
          if ( v5->m_pkMsgHooker )
          {
            ((void (__stdcall *)(signed int, _DWORD, IDirectMessengerVtbl **))v5->m_pkMsgHooker->vfptr->SendDirectMessage)(
              50,
              0,
              &v5->vfptr);
            if ( v5->m_pkMsgHooker )
              ((void (__stdcall *)(signed int, _DWORD, IDirectMessengerVtbl **))v5->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                50,
                0,
                &v5->vfptr);
          }
          v5->vfptr->DirectDispatchToParent((IDirectMessenger *)&v5->vfptr, 50, 0, (IDirectMessenger *)&v5->vfptr);
          return 1;
        case 173:
          GuildTask::Recv_NC_GUILD_RENAME_ACK(v5, (PROTO_NC_GUILD_RENAME_ACK *)pvData);
          return 1;
        case 174:
          GuildTask::Recv_NC_GUILD_RENAME_CMD(v5, (PROTO_NC_GUILD_RENAME_CMD *)pvData);
          return 1;
        case 181:
          GuildTask::Recv_NC_GUILD_RETYPE_ACK(v5, (PROTO_NC_GUILD_RETYPE_ACK *)pvData);
          return 1;
        case 182:
          GuildTask::Recv_NC_GUILD_RETYPE_CMD(v5, (PROTO_NC_GUILD_RETYPE_CMD *)pvData);
          return 1;
        case 240:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_ITEM_PICK_CMD(v5, (PROTO_NC_GUILD_TOURNAMENT_ITEM_PICK_CMD *)pvData);
          return 1;
        case 241:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_ITEM_EFFECT_CMD(v5, (PROTO_NC_GUILD_TOURNAMENT_ITEM_EFFECT_CMD *)pvData);
          return 1;
        case 242:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_ITEM_FLAG_CMD(v5, (PROTO_NC_GUILD_TOURNAMENT_ITEM_FLAG_CMD *)pvData);
          return 1;
        case 243:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_ITEM_SCAN_CMD((PROTO_NC_GUILD_TOURNAMENT_ITEM_SCAN_CMD *)pvData);
          return 1;
        case 248:
          GuildTask::Recv_NC_GUILD_TOURNAMENT_REFUND_NOTICE_CMD((PROTO_NC_GUILD_TOURNAMENT_REFUND_NOTICE_CMD *)pvData);
          return 1;
        case 254:
          GuildTask::Recv_NC_GUILD_HISTORY_LIST_ACK(v5, (PROTO_NC_GUILD_HISTORY_LIST_ACK *)pvData);
          return 1;
        case 258:
          GuildTask::Recv_NC_GUILD_EMBLEM_CHECK_AVAILABILITY_ACK(
            v5,
            (PROTO_NC_GUILD_EMBLEM_CHECK_AVAILABILITY_ACK *)pvData);
          return 1;
        case 262:
          GuildTask::Recv_NC_GUILD_EMBLEM_SAVE_ACK(v5, (PROTO_NC_GUILD_EMBLEM_SAVE_ACK *)pvData);
          return 1;
        case 265:
          GuildTask::Recv_NC_GUILD_EMBLEM_OFF_MSG_CMD((PROTO_NC_GUILD_EMBLEM_OFF_MSG_CMD *)pvData);
          return 1;
        case 266:
          GuildTask::Recv_NC_GUILD_EMBLEM_INFO_CMD((PROTO_NC_GUILD_EMBLEM_INFO_CMD *)pvData);
          return 1;
        case 267:
          GuildTask::Recv_NC_GUILD_EMBLEM_INFO_NOTICE_CMD((PROTO_NC_GUILD_EMBLEM_INFO_NOTICE_CMD *)pvData);
          return 1;
        default:
          return 0;
      }
      return result;
    default:
      return 0;
  }
}
// B5C0CC: using guessed type int GuildTask::ms_spGuildTask;

//----- (006BFEA0) --------------------------------------------------------
void __thiscall NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::~NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>(NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *> *this)
{
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::`vftable';
}
// 9BF394: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::`vftable')(void *p, char);

//----- (006BFEB0) --------------------------------------------------------
NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *> *__thiscall NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::`scalar deleting destructor'(NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *> *this, unsigned int a2)
{
  NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BF394: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::`vftable')(void *p, char);

//----- (006BFEE0) --------------------------------------------------------
void __thiscall NiTPointerList<GUILD_HISTORY *>::~NiTPointerList<GUILD_HISTORY *>(NiTPointerList<GUILD_HISTORY *> *this)
{
  NiTPointerList<GUILD_HISTORY *> *v1; // edi@1
  NiTListItem<GUILD_HISTORY *> *v2; // esi@1
  NiTListItem<GUILD_HISTORY *> *v3; // ST00_4@2

  v1 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::`vftable';
  v2 = this->m_pkHead;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *> *)v1, v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::`vftable';
}
// 9BF394: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::`vftable')(void *p, char);
// 9BF3A4: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::`vftable')(void *p, char);

//----- (006BFF60) --------------------------------------------------------
NiTPointerListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *> *__thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::`scalar deleting destructor'(NiTPointerListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *> *this, unsigned int a2)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *> *v2; // edi@1
  NiTListItem<GUILD_HISTORY *> *v3; // esi@1
  NiTListItem<GUILD_HISTORY *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>Vtbl *)&NiTPointerListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BF394: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::`vftable')(void *p, char);
// 9BF3A4: using guessed type int (__thiscall *NiTPointerListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::`vftable')(void *p, char);

//----- (006BFFF0) --------------------------------------------------------
GUILD_CLIENT *__thiscall GUILD_CLIENT::operator=(GUILD_CLIENT *this, GUILD_CLIENT *__that)
{
  GUILD_CLIENT *result; // eax@1
  char *v3; // esi@1
  signed int v4; // ebx@1
  signed int v5; // edi@1
  char *v6; // ecx@3
  signed int v7; // esi@3

  result = this;
  this->nNo = __that->nNo;
  *(_QWORD *)&this->sName.n4_name[0] = *(_QWORD *)&__that->sName.n4_name[0];
  *(_QWORD *)&this->sName.n4_code[2] = *(_QWORD *)&__that->sName.n4_code[2];
  this->nMoney = __that->nMoney;
  this->nType = __that->nType;
  this->nGrade = __that->nGrade;
  this->nFame = __that->nFame;
  this->nStoneLevel = __that->nStoneLevel;
  this->nExp = __that->nExp;
  this->dCreateDate = __that->dCreateDate;
  qmemcpy(&this->tm_dCreateDate, &__that->tm_dCreateDate, 0x35u);
  qmemcpy(&this->tm_dWarRequestDate, &__that->tm_dWarRequestDate, sizeof(this->tm_dWarRequestDate));
  qmemcpy(&this->tm_dWarStartDate, &__that->tm_dWarStartDate, sizeof(this->tm_dWarStartDate));
  qmemcpy(&this->tm_dWarEndDate, &__that->tm_dWarEndDate, 0x39u);
  qmemcpy(&this->MyScore, &__that->MyScore, sizeof(this->MyScore));
  qmemcpy(&this->EnemyScore, &__that->EnemyScore, 0x3Bu);
  qmemcpy(&this->tm_dDismissDate, &__that->tm_dDismissDate, sizeof(this->tm_dDismissDate));
  v3 = this->sIntro;
  v4 = (char *)__that - (char *)this;
  v5 = 128;
  do
  {
    *v3 = v3[v4];
    ++v3;
    --v5;
  }
  while ( v5 );
  this->dNotifyDate = __that->dNotifyDate;
  qmemcpy(&this->tm_dNotifyDate, &__that->tm_dNotifyDate, 0x38u);
  v6 = this->sNotify;
  v7 = 512;
  do
  {
    *v6 = v6[v4];
    ++v6;
    --v7;
  }
  while ( v7 );
  return result;
}

//----- (006C0210) --------------------------------------------------------
unsigned int __cdecl ITableBase<GTIView,GTIViewInfoTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<GTIView,GTIViewInfoTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C1D8: using guessed type int ITableBase<GTIView,GTIViewInfoTab>::ms_pkTable;

//----- (006C0230) --------------------------------------------------------
PgTList<GUILD_HISTORY *> *__thiscall PgTList<GUILD_HISTORY *>::`vector deleting destructor'(PgTList<GUILD_HISTORY *> *this, unsigned int a2)
{
  PgTList<GUILD_HISTORY *> *v2; // edi@1
  NiTListItem<GUILD_HISTORY *> *v3; // esi@1
  NiTListItem<GUILD_HISTORY *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>Vtbl *)&PgTList<GUILD_HISTORY *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>Vtbl *)&NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BF394: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::`vftable')(void *p, char);
// 9BF3B4: using guessed type int (__thiscall *PgTList<GUILD_HISTORY *>::`vftable')(void *p, char);

//----- (006C02C0) --------------------------------------------------------
GTIView *__cdecl GTIViewInfoTab::GetByIndex(unsigned int uiIndex)
{
  unsigned int v1; // esi@1
  GTIView *result; // eax@4

  v1 = 0;
  if ( ITableBase<GTIView,GTIViewInfoTab>::GetTotal() )
  {
    while ( (unsigned __int8)*CDataReader::GetRecord(
                                (CDataReader *)(ITableBase<GTIView,GTIViewInfoTab>::ms_pkTable + 4),
                                v1) != uiIndex )
    {
      if ( ++v1 >= ITableBase<GTIView,GTIViewInfoTab>::GetTotal() )
        goto LABEL_4;
    }
    result = (GTIView *)CDataReader::GetRecord((CDataReader *)(ITableBase<GTIView,GTIViewInfoTab>::ms_pkTable + 4), v1);
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}
// A8C1D8: using guessed type int ITableBase<GTIView,GTIViewInfoTab>::ms_pkTable;

//----- (006C0310) --------------------------------------------------------
void __thiscall CClientGuild::~CClientGuild(CClientGuild *this)
{
  CClientGuild *v1; // esi@1
  char *v2; // edi@1
  NiTListItem<GUILD_HISTORY *> *v3; // ebx@1
  NiTListItem<GUILD_HISTORY *> *v4; // ST00_4@2

  v1 = this;
  v2 = (char *)&this->m_kHistoryList;
  this->m_kHistoryList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>Vtbl *)&PgTList<GUILD_HISTORY *>::`vftable';
  v3 = this->m_kHistoryList.m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v2 + 8))(v2, v4);
  }
  *((_DWORD *)v2 + 3) = 0;
  *((_DWORD *)v2 + 1) = 0;
  *((_DWORD *)v2 + 2) = 0;
  *(_DWORD *)v2 = &NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::`vftable';
  v1->m_GttEnemyInfo.GuildRegNo = 0;
  *(_DWORD *)&v1->m_GttEnemyInfo.acGuildName[0] = 0;
  *(_DWORD *)&v1->m_GttEnemyInfo.acGuildName[4] = 0;
  *(_DWORD *)&v1->m_GttEnemyInfo.acGuildName[8] = 0;
  *(_DWORD *)&v1->m_GttEnemyInfo.acGuildName[12] = 0;
  *(_DWORD *)&v1->m_GttEnemyInfo.acGuildName[16] = 0;
  *(_DWORD *)&v1->m_GttEnemyInfo.acGuildName[20] = 0;
  *(_DWORD *)&v1->m_GttEnemyInfo.acGuildName[24] = 0;
  *(_DWORD *)&v1->m_GttEnemyInfo.acGuildName[28] = 0;
  v1->m_GttEnemyInfo.uiStatus = 1;
  CGuildTournament::~CGuildTournament(&v1->m_GuildTournament);
  CGuildWarAble::~CGuildWarAble(&v1->m_GuildWarAble);
  CGuild::~CGuild((CGuild *)&v1->vfptr);
}
// 9BF394: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::`vftable')(void *p, char);
// 9BF3B4: using guessed type int (__thiscall *PgTList<GUILD_HISTORY *>::`vftable')(void *p, char);

//----- (006C0400) --------------------------------------------------------
GuildTask *__thiscall GuildTask::`vector deleting destructor'(GuildTask *this, unsigned int a2)
{
  GuildTask *v2; // esi@1

  v2 = this;
  GuildTask::~GuildTask(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006C0430) --------------------------------------------------------
void __thiscall GuildNameCache::GuildNameCache(GuildNameCache *this)
{
  GuildNameCache *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,GuildNameCache::GuildNameStorage *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,GuildNameCache::GuildNameStorage *> >,0> >::_Node *v2; // eax@1
  std::exception pExceptionObject; // [sp+8h] [bp-20h]@3
  GuildNameCache *v4; // [sp+14h] [bp-14h]@1
  char *_What; // [sp+18h] [bp-10h]@3
  int v6; // [sp+24h] [bp-4h]@1

  v1 = this;
  v4 = this;
  ITask::ITask((ITask *)&this->vfptr, 0);
  v1->vfptr = (NiRefObjectVtbl *)&GuildNameCache::`vftable'{for `NiRefObject'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildNameCache::`vftable'{for `IDirectMessenger'};
  v6 = 0;
  v1->m_kGuildNameCache._Mysize = 0;
  v2 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,GuildNameCache::GuildNameStorage *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,GuildNameCache::GuildNameStorage *> >,0> >::_Node *)operator new(0x18u);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_kGuildNameCache._Myhead = v2;
  v2->_Left = v2;
  v1->m_kGuildNameCache._Myhead->_Parent = v1->m_kGuildNameCache._Myhead;
  v1->m_kGuildNameCache._Myhead->_Right = v1->m_kGuildNameCache._Myhead;
  v1->m_kGuildNameCache._Myhead->_Color = 1;
  v1->m_kGuildNameCache._Myhead->_Isnil = 1;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9BF4A4: using guessed type void (__thiscall *GuildNameCache::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9BF4C0: using guessed type int (__thiscall *GuildNameCache::`vftable'{for `NiRefObject'})(void *p, char);

//----- (006C04F0) --------------------------------------------------------
GuildNameCache *__thiscall GuildNameCache::`vector deleting destructor'(GuildNameCache *this, unsigned int a2)
{
  GuildNameCache *v2; // esi@1

  v2 = this;
  GuildNameCache::~GuildNameCache(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006C0520) --------------------------------------------------------
unsigned int *__thiscall mhCollisionManager::DelColliData(mhCollisionManager *this, NiPointer<NiNode> DelNode, mhCollisionType ColliType)
{
  NiNode *v3; // edx@1
  NiNode *v5; // esi@11

  v3 = DelNode.m_pObject;
  if ( !DelNode.m_pObject )
    return &DelNode.m_pObject->m_uiRefCount;
  if ( ColliType )
  {
    if ( ColliType == 1 )
    {
      NiCollisionGroup::RemoveCollider(&this->m_pkCollisionGroup, (NiAVObject *)&DelNode.m_pObject->vfptr);
    }
    else
    {
      if ( ColliType != 2 )
        goto LABEL_10;
      NiCollisionGroup::Remove(&this->m_pkCollisionGroup, (NiAVObject *)&DelNode.m_pObject->vfptr);
    }
  }
  else
  {
    NiCollisionGroup::RemoveCollidee(&this->m_pkCollisionGroup, (NiAVObject *)&DelNode.m_pObject->vfptr);
  }
  v3 = DelNode.m_pObject;
LABEL_10:
  if ( v3 )
  {
    v5 = v3;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
    {
      if ( v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
  }
  return (unsigned int *)1;
}

//----- (006C05D0) --------------------------------------------------------
signed int __thiscall mhCollisionManager::Create(mhCollisionManager *this, NiNode *RootCollider)
{
  signed int result; // eax@2

  if ( RootCollider )
  {
    NiCollisionGroup::AddCollider(&this->m_pkCollisionGroup, (NiAVObject *)&RootCollider->vfptr, 1, -1, 1);
    dword_B5C118 = 0;
    dword_B5C11C = 0;
    dword_B5C120 = 0;
    memset(mhCollisionManager::m_ColliInfo, 0, 0x40u);
    result = 1;
  }
  else
  {
    result = 2;
  }
  return result;
}
// B5C118: using guessed type int dword_B5C118;
// B5C11C: using guessed type int dword_B5C11C;
// B5C120: using guessed type int dword_B5C120;

//----- (006C0630) --------------------------------------------------------
mhColliStyle __thiscall mhCollisionManager::Update(mhCollisionManager *this, float fTime, mhGameMainConnectMgr *GameMainConnectMgr)
{
  mhCollisionManager *v3; // esi@1

  v3 = this;
  if ( mhCollisionManager::m_ColliStyle )
  {
    mhCollisionManager::m_ColliStyle = 0;
    dword_B5C118 = 0;
    dword_B5C11C = 0;
    dword_B5C120 = 0;
    memset(mhCollisionManager::m_ColliInfo, 0, 0x40u);
  }
  NiCollisionGroup::FindCollisions(&v3->m_pkCollisionGroup, fTime);
  return mhCollisionManager::m_ColliStyle;
}
// B5C0D0: using guessed type enum mhColliStyle mhCollisionManager::m_ColliStyle;
// B5C118: using guessed type int dword_B5C118;
// B5C11C: using guessed type int dword_B5C11C;
// B5C120: using guessed type int dword_B5C120;

//----- (006C0680) --------------------------------------------------------
signed int __thiscall mhCollisionManager::DelObject(mhCollisionManager *this, mhObject *mhObj, mhCollisionType ColliType)
{
  signed int result; // eax@2
  ResElement *v4; // eax@3
  bool v5; // zf@3
  NiActorManager *v6; // ecx@4
  NiNode *v7; // eax@5
  int v8; // esi@7
  int v9; // esi@10
  ResElement *v10; // eax@14
  NiActorManager *v11; // ecx@15
  ResElement *v12; // eax@18
  NiActorManager *v13; // ecx@19
  ResElement *v14; // eax@22
  NiActorManager *v15; // ecx@23
  NiAVObject *v16; // eax@24
  mhCollisionManager *v17; // [sp+10h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > NodeName; // [sp+14h] [bp-2Ch]@3
  int v19; // [sp+3Ch] [bp-4h]@3

  v17 = this;
  if ( mhObj )
  {
    NodeName._Myres = 15;
    NodeName._Mysize = 0;
    NodeName._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &NodeName,
      &mhCollisionParentName_0,
      0,
      0xFFFFFFFF);
    v4 = mhObj->m_pkResource;
    v5 = v4->m_bIsCanAnimation == 0;
    v19 = 0;
    if ( v5 || (v6 = v4->m_pActorMgr.m_pObject) == 0 )
      v7 = v4->m_pNiNode.m_pObject;
    else
      v7 = (NiNode *)v6->m_spNIFRoot.m_pObject;
    v8 = mhMiscUtil::GetNodeMaxNum(v7, &NodeName);
    v19 = -1;
    if ( NodeName._Myres >= 0x10 )
      operator delete(NodeName._Bx._Ptr);
    NodeName._Myres = 15;
    NodeName._Mysize = 0;
    NodeName._Bx._Buf[0] = 0;
    if ( v8 >= 0 )
    {
      v9 = v8 + 1;
      do
      {
        if ( ColliType )
        {
          if ( ColliType == 1 )
          {
            v12 = mhObj->m_pkResource;
            if ( v12->m_bIsCanAnimation && (v13 = v12->m_pActorMgr.m_pObject) != 0 )
              NiCollisionGroup::RemoveCollider(&v17->m_pkCollisionGroup, v13->m_spNIFRoot.m_pObject);
            else
              NiCollisionGroup::RemoveCollider(&v17->m_pkCollisionGroup, (NiAVObject *)&v12->m_pNiNode.m_pObject->vfptr);
          }
          else if ( ColliType == 2 )
          {
            v10 = mhObj->m_pkResource;
            if ( v10->m_bIsCanAnimation && (v11 = v10->m_pActorMgr.m_pObject) != 0 )
              NiCollisionGroup::Remove(&v17->m_pkCollisionGroup, v11->m_spNIFRoot.m_pObject);
            else
              NiCollisionGroup::Remove(&v17->m_pkCollisionGroup, (NiAVObject *)&v10->m_pNiNode.m_pObject->vfptr);
          }
        }
        else
        {
          v14 = mhObj->m_pkResource;
          if ( v14->m_bIsCanAnimation && (v15 = v14->m_pActorMgr.m_pObject) != 0 )
            v16 = v15->m_spNIFRoot.m_pObject;
          else
            v16 = (NiAVObject *)&v14->m_pNiNode.m_pObject->vfptr;
          NiCollisionGroup::RemoveCollidee(&v17->m_pkCollisionGroup, v16);
        }
        --v9;
      }
      while ( v9 );
    }
    result = 1;
  }
  else
  {
    result = 4;
  }
  return result;
}

//----- (006C07F0) --------------------------------------------------------
mhColliStyle __cdecl mhCollisionManager::SetCollisionStyleInCallBack(mhColliStyle NewStyle, NiCollisionGroup::Intersect *InterSectInfo, mhConditionBOOL Mainchar, mhConditionBOOL Otherchar)
{
  enum mhColliStyle v4; // eax@4
  char *v5; // ecx@7
  char *v6; // eax@7
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v7; // eax@7
  char v8; // bl@7
  char *v9; // ecx@10
  char *v10; // eax@10
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v11; // eax@10
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v12; // ecx@23
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v13; // ecx@26
  char *v14; // ecx@35
  char *v15; // eax@35
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v16; // eax@35
  char v17; // bl@35
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v18; // eax@38
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v19; // ecx@38
  char v21; // [sp+17h] [bp-81h]@12
  char v22; // [sp+17h] [bp-81h]@40
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v23; // [sp+18h] [bp-80h]@38
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v24; // [sp+34h] [bp-64h]@35
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v25; // [sp+50h] [bp-48h]@7
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v26; // [sp+6Ch] [bp-2Ch]@10
  int v27; // [sp+94h] [bp-4h]@7

  if ( NewStyle == 1 )
  {
    if ( (signed int)mhCollisionManager::m_ColliStyle < 2 )
    {
      mhCollisionManager::m_ColliStyle = 1;
      return mhCollisionManager::m_ColliStyle;
    }
    mhCollisionManager::m_ColliStyle = 3;
    v14 = InterSectInfo->pkRoot0->m_pcName;
    v15 = InterSectInfo->pkRoot0->m_pcName;
    v24._Myres = 15;
    v24._Mysize = 0;
    v24._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v24, v14, strlen(v15));
    v16 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)mhCharColliRootNodeName_0._Bx._Ptr;
    v27 = 0;
    v17 = 1;
    if ( mhCharColliRootNodeName_0._Myres < 0x10 )
      v16 = &mhCharColliRootNodeName_0;
    if ( !std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
            &v24,
            0,
            v24._Mysize,
            v16->_Bx._Buf,
            mhCharColliRootNodeName_0._Mysize) )
      goto LABEL_55;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &v23,
      InterSectInfo->pkRoot1->m_pcName);
    v19 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)mhCharColliRootNodeName_0._Bx._Ptr;
    v17 = 3;
    v27 = 1;
    if ( mhCharColliRootNodeName_0._Myres < 0x10 )
      v19 = &mhCharColliRootNodeName_0;
    v22 = 0;
    if ( !std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
            v18,
            0,
            v18->_Mysize,
            v19->_Bx._Buf,
            mhCharColliRootNodeName_0._Mysize) )
LABEL_55:
      v22 = 1;
    if ( v17 & 2 )
    {
      v17 &= 0xFDu;
      if ( v23._Myres >= 0x10 )
        operator delete(v23._Bx._Ptr);
      v23._Myres = 15;
      v23._Mysize = 0;
      v23._Bx._Buf[0] = 0;
    }
    if ( v17 & 1 && v24._Myres >= 0x10 )
      operator delete(v24._Bx._Ptr);
    if ( !v22 )
      goto LABEL_31;
    goto LABEL_29;
  }
  if ( NewStyle != 2 )
  {
    mhCollisionManager::m_ColliStyle = NewStyle;
    return mhCollisionManager::m_ColliStyle;
  }
  v4 = mhCollisionManager::m_ColliStyle;
  if ( mhCollisionManager::m_ColliStyle == 1 || (mhCollisionManager::m_ColliStyle = 2, v4 == 3) )
    mhCollisionManager::m_ColliStyle = 3;
  v5 = InterSectInfo->pkRoot0->m_pcName;
  v6 = InterSectInfo->pkRoot0->m_pcName;
  v25._Myres = 15;
  v25._Mysize = 0;
  v25._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v25, v5, strlen(v6));
  v7 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)mhCharColliRootNodeName_0._Bx._Ptr;
  v8 = 4;
  v27 = 2;
  if ( mhCharColliRootNodeName_0._Myres < 0x10 )
    v7 = &mhCharColliRootNodeName_0;
  if ( !std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
          &v25,
          0,
          v25._Mysize,
          v7->_Bx._Buf,
          mhCharColliRootNodeName_0._Mysize) )
    goto LABEL_56;
  v9 = InterSectInfo->pkRoot1->m_pcName;
  v10 = InterSectInfo->pkRoot1->m_pcName;
  v26._Myres = 15;
  v26._Mysize = 0;
  v26._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v26, v9, strlen(v10));
  v11 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)mhCharColliRootNodeName_0._Bx._Ptr;
  v8 = 12;
  v27 = 3;
  if ( mhCharColliRootNodeName_0._Myres < 0x10 )
    v11 = &mhCharColliRootNodeName_0;
  v21 = 0;
  if ( !std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
          &v26,
          0,
          v26._Mysize,
          v11->_Bx._Buf,
          mhCharColliRootNodeName_0._Mysize) )
LABEL_56:
    v21 = 1;
  if ( v8 & 8 )
  {
    v8 &= 0xF7u;
    if ( v26._Myres >= 0x10 )
      operator delete(v26._Bx._Ptr);
    v26._Myres = 15;
    v26._Mysize = 0;
    v26._Bx._Buf[0] = 0;
  }
  if ( v8 & 4 )
  {
    if ( v25._Myres >= 0x10 )
      operator delete(v25._Bx._Ptr);
    v25._Myres = 15;
    v25._Mysize = 0;
    v25._Bx._Buf[0] = 0;
  }
  if ( v21 )
  {
    v12 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)mhCollisionParentNamePick_0._Bx._Ptr;
    if ( mhCollisionParentNamePick_0._Myres < 0x10 )
      v12 = &mhCollisionParentNamePick_0;
    if ( !strncmp(InterSectInfo->pkObj0->m_pcName, v12->_Bx._Buf, mhCollisionParentNamePick_0._Mysize) )
      goto LABEL_57;
    v13 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)mhCollisionParentNamePick_0._Bx._Ptr;
    if ( mhCollisionParentNamePick_0._Myres < 0x10 )
      v13 = &mhCollisionParentNamePick_0;
    if ( !strncmp(InterSectInfo->pkObj1->m_pcName, v13->_Bx._Buf, mhCollisionParentNamePick_0._Mysize) )
    {
LABEL_57:
      dword_B5C120 = 1;
      dword_B5C11C = 1;
      return mhCollisionManager::m_ColliStyle;
    }
LABEL_29:
    qmemcpy(mhCollisionManager::m_ColliInfo, InterSectInfo, 0x40u);
    if ( Mainchar != 2 )
      dword_B5C11C = Mainchar;
  }
LABEL_31:
  if ( Otherchar != 2 )
    dword_B5C118 = Otherchar;
  return mhCollisionManager::m_ColliStyle;
}
// B5C0D0: using guessed type enum mhColliStyle mhCollisionManager::m_ColliStyle;
// B5C118: using guessed type int dword_B5C118;
// B5C11C: using guessed type int dword_B5C11C;
// B5C120: using guessed type int dword_B5C120;

//----- (006C0BB0) --------------------------------------------------------
int __cdecl mhCollisionManager::Callback(NiCollisionGroup::Intersect *kIntersect)
{
  NiAVObject *v1; // esi@1
  NiAVObject *v2; // edi@1
  const char *v3; // eax@3
  const char *v4; // ecx@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v5; // eax@6
  char v6; // bl@6
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v7; // eax@7
  char v8; // bl@7
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v9; // eax@10
  char v10; // bl@10
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v11; // eax@11
  char v12; // bl@11
  char v13; // bl@14
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v14; // eax@14
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v15; // eax@15
  char v16; // bl@23
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v17; // eax@23
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v18; // eax@24
  bool bCharCol; // [sp+1Bh] [bp-81h]@1
  bool bCharCola; // [sp+1Bh] [bp-81h]@15
  bool bCharColb; // [sp+1Bh] [bp-81h]@24
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v23; // [sp+1Ch] [bp-80h]@24
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v24; // [sp+38h] [bp-64h]@23
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v25; // [sp+54h] [bp-48h]@14
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v26; // [sp+70h] [bp-2Ch]@6
  int v27; // [sp+98h] [bp-4h]@6

  v1 = kIntersect->pkRoot0;
  v2 = kIntersect->pkRoot1;
  bCharCol = 0;
  if ( kIntersect->pkRoot0 )
  {
    if ( v2 )
    {
      v3 = v1->m_pcName;
      if ( v3 )
      {
        v4 = v2->m_pcName;
        if ( v4 )
        {
          if ( strcmp(v3, v4) )
          {
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
              &v26,
              v1->m_pcName);
            v27 = 0;
            v6 = std::operator==<char,std::char_traits<char>,std::allocator<char>>(v5, &mhCharColliRootNodeName_0);
            v27 = -1;
            std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v26);
            if ( v6 )
            {
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
                &v26,
                v2->m_pcName);
              v27 = 1;
              v8 = std::operator!=<char,std::char_traits<char>,std::allocator<char>>(v7, &mhOtherCharColliRootName_0);
              v27 = -1;
              std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v26);
              if ( v8 )
                mhCollisionManager::SetCollisionStyleInCallBack(
                  MH_COLSTYLE_OBJ_CHAR,
                  kIntersect,
                  MH_CONDITION_TRUE,
                  MH_CONDITION_HOLD);
              bCharCol = 1;
            }
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
              &v26,
              v1->m_pcName);
            v27 = 2;
            v10 = std::operator==<char,std::char_traits<char>,std::allocator<char>>(v9, &mhOtherCharColliRootName_0);
            v27 = -1;
            std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v26);
            if ( v10 )
            {
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
                &v26,
                v2->m_pcName);
              v27 = 3;
              v12 = std::operator!=<char,std::char_traits<char>,std::allocator<char>>(v11, &mhCharColliRootNodeName_0);
              v27 = -1;
              std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v26);
              if ( v12 )
                mhCollisionManager::SetCollisionStyleInCallBack(
                  MH_COLSTYLE_OBJ_CHAR,
                  kIntersect,
                  MH_CONDITION_HOLD,
                  MH_CONDITION_TRUE);
            }
            else if ( bCharCol != 1 )
            {
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
                &v25,
                v1->m_pcName);
              v13 = 1;
              v27 = 4;
              if ( (unsigned __int8)std::operator==<char,std::char_traits<char>,std::allocator<char>>(
                                      v14,
                                      &mhCharColliRootNodeName_0)
                || (std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
                      &v26,
                      v2->m_pcName),
                    v13 = 3,
                    v27 = 5,
                    bCharCola = 0,
                    (unsigned __int8)std::operator==<char,std::char_traits<char>,std::allocator<char>>(
                                       v15,
                                       &mhCharColliRootNodeName_0)) )
              {
                bCharCola = 1;
              }
              if ( v13 & 2 )
              {
                v13 &= 0xFDu;
                std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v26);
              }
              v27 = -1;
              if ( v13 & 1 )
              {
                v13 &= 0xFEu;
                std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v25);
              }
              if ( bCharCola )
              {
                mhCollisionManager::SetCollisionStyleInCallBack(
                  MH_COLSTYLE_OBJ_CHAR,
                  kIntersect,
                  MH_CONDITION_TRUE,
                  MH_CONDITION_HOLD);
              }
              else
              {
                std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
                  &v24,
                  v1->m_pcName);
                v16 = v13 | 4;
                v27 = 6;
                if ( (unsigned __int8)std::operator==<char,std::char_traits<char>,std::allocator<char>>(
                                        v17,
                                        &mhOtherCharColliRootName_0)
                  || (std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
                        &v23,
                        v2->m_pcName),
                      v16 |= 8u,
                      v27 = 7,
                      bCharColb = 0,
                      (unsigned __int8)std::operator==<char,std::char_traits<char>,std::allocator<char>>(
                                         v18,
                                         &mhOtherCharColliRootName_0)) )
                {
                  bCharColb = 1;
                }
                if ( v16 & 8 )
                {
                  v16 &= 0xF7u;
                  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v23);
                }
                v27 = -1;
                if ( v16 & 4 )
                  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&v24);
                if ( bCharColb )
                  mhCollisionManager::SetCollisionStyleInCallBack(
                    MH_COLSTYLE_OBJ_CHAR,
                    kIntersect,
                    MH_CONDITION_HOLD,
                    MH_CONDITION_TRUE);
                else
                  mhCollisionManager::SetCollisionStyleInCallBack(
                    MH_COLSTYLE_OBJ_OBJ,
                    kIntersect,
                    MH_CONDITION_HOLD,
                    MH_CONDITION_HOLD);
              }
            }
          }
        }
      }
    }
  }
  return 0;
}

//----- (006C0EF0) --------------------------------------------------------
signed int __thiscall mhCollisionManager::AddObject(mhCollisionManager *this, mhObject *mhObj, mhCollisionType ColliType)
{
  signed int result; // eax@2
  ResElement *v4; // eax@3
  bool v5; // zf@3
  NiActorManager *v6; // ecx@4
  NiNode *v7; // eax@5
  int v8; // edi@8
  ResElement *v9; // eax@9
  NiActorManager *v10; // ecx@10
  NiNode *v11; // eax@11
  void *v12; // ecx@13
  NiAVObject *v13; // eax@15
  NiCollisionObject *v14; // ecx@16
  ResElement *v15; // eax@17
  NiActorManager *v16; // ecx@19
  NiActorManager *v17; // ecx@23
  NiAVObject *v18; // eax@24
  int LoadCollNodeNum; // [sp+18h] [bp-34h]@7
  mhCollisionManager *v20; // [sp+1Ch] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > CollNodeName; // [sp+20h] [bp-2Ch]@3
  int v22; // [sp+48h] [bp-4h]@3

  v20 = this;
  if ( mhObj )
  {
    CollNodeName._Myres = 15;
    CollNodeName._Mysize = 0;
    CollNodeName._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &CollNodeName,
      &mhCollisionParentName_0,
      0,
      0xFFFFFFFF);
    v4 = mhObj->m_pkResource;
    v5 = v4->m_bIsCanAnimation == 0;
    v22 = 0;
    if ( v5 || (v6 = v4->m_pActorMgr.m_pObject) == 0 )
      v7 = v4->m_pNiNode.m_pObject;
    else
      v7 = (NiNode *)v6->m_spNIFRoot.m_pObject;
    LoadCollNodeNum = mhMiscUtil::GetNodeMaxNum(v7, &CollNodeName);
    if ( LoadCollNodeNum < 0 )
    {
LABEL_28:
      if ( CollNodeName._Myres >= 0x10 )
        operator delete(CollNodeName._Bx._Ptr);
      result = 1;
    }
    else
    {
      v8 = 0;
      while ( 1 )
      {
        mhMiscUtil::MakeNodeNameNum(&CollNodeName, v8, 3);
        v9 = mhObj->m_pkResource;
        if ( v9->m_bIsCanAnimation && (v10 = v9->m_pActorMgr.m_pObject) != 0 )
          v11 = (NiNode *)v10->m_spNIFRoot.m_pObject;
        else
          v11 = v9->m_pNiNode.m_pObject;
        v12 = CollNodeName._Bx._Ptr;
        if ( CollNodeName._Myres < 0x10 )
          v12 = &CollNodeName;
        v13 = (NiAVObject *)v11->vfptr[18].__vecDelDtor((NiRefObject *)v11, (unsigned int)v12);
        if ( !v13 )
          break;
        v14 = v13->m_spCollisionObject.m_pObject;
        if ( !v14 )
        {
          if ( CollNodeName._Myres >= 0x10 )
            operator delete(CollNodeName._Bx._Ptr);
          return 11;
        }
        v14[4].m_pkSceneObject = (NiAVObject *)mhCollisionManager::Callback;
        NiAVObject::Update(v13, 0.0, 1);
        v15 = mhObj->m_pkResource;
        if ( ColliType == 1 )
        {
          if ( v15->m_bIsCanAnimation && (v16 = v15->m_pActorMgr.m_pObject) != 0 )
            NiCollisionGroup::AddCollider(&v20->m_pkCollisionGroup, v16->m_spNIFRoot.m_pObject, 0, -1, 1);
          else
            NiCollisionGroup::AddCollider(
              &v20->m_pkCollisionGroup,
              (NiAVObject *)&v15->m_pNiNode.m_pObject->vfptr,
              0,
              -1,
              1);
        }
        else
        {
          if ( v15->m_bIsCanAnimation && (v17 = v15->m_pActorMgr.m_pObject) != 0 )
            v18 = v17->m_spNIFRoot.m_pObject;
          else
            v18 = (NiAVObject *)&v15->m_pNiNode.m_pObject->vfptr;
          NiCollisionGroup::AddCollidee(&v20->m_pkCollisionGroup, v18, 0, -1, 1);
        }
        mhMiscUtil::DelNodeNameNum(&CollNodeName, 3);
        if ( LoadCollNodeNum < ++v8 )
          goto LABEL_28;
      }
      if ( CollNodeName._Myres >= 0x10 )
        operator delete(CollNodeName._Bx._Ptr);
      result = 10;
    }
  }
  else
  {
    result = 4;
  }
  return result;
}

//----- (006C10E0) --------------------------------------------------------
signed int __thiscall mhCollisionManager::AddColliData(mhCollisionManager *this, NiPointer<NiNode> AddNode, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *ColliNodeName, mhCollisionType ColliType)
{
  mhCollisionManager *v4; // esi@1
  void *v5; // eax@2
  NiAVObject *v6; // eax@4
  signed int result; // eax@9
  NiCollisionObject *v8; // ecx@10

  v4 = this;
  if ( !AddNode.m_pObject )
    return 2;
  v5 = ColliNodeName;
  if ( ColliNodeName->_Myres >= 0x10 )
    v5 = ColliNodeName->_Bx._Ptr;
  v6 = (NiAVObject *)((int (__stdcall *)(void *))AddNode.m_pObject->vfptr[18].__vecDelDtor)(v5);
  if ( !v6 )
  {
    if ( AddNode.m_pObject && !InterlockedDecrement((volatile LONG *)&AddNode.m_pObject->m_uiRefCount) )
    {
      if ( AddNode.m_pObject )
        AddNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)AddNode.m_pObject, 1u);
    }
    return 2;
  }
  v8 = v6->m_spCollisionObject.m_pObject;
  if ( v8 )
  {
    v8[4].m_pkSceneObject = (NiAVObject *)mhCollisionManager::Callback;
    NiAVObject::Update(v6, 0.0, 1);
    if ( ColliType == 1 )
      NiCollisionGroup::AddCollider(&v4->m_pkCollisionGroup, (NiAVObject *)&AddNode.m_pObject->vfptr, 0, -1, 1);
    else
      NiCollisionGroup::AddCollidee(&v4->m_pkCollisionGroup, (NiAVObject *)&AddNode.m_pObject->vfptr, 0, -1, 1);
    if ( AddNode.m_pObject
      && !InterlockedDecrement((volatile LONG *)&AddNode.m_pObject->m_uiRefCount)
      && AddNode.m_pObject )
    {
      AddNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)AddNode.m_pObject, 1u);
    }
    result = 1;
  }
  else
  {
    if ( AddNode.m_pObject
      && !InterlockedDecrement((volatile LONG *)&AddNode.m_pObject->m_uiRefCount)
      && AddNode.m_pObject )
    {
      AddNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)AddNode.m_pObject, 1u);
    }
    result = 11;
  }
  return result;
}

//----- (006C1240) --------------------------------------------------------
signed int __thiscall mhCollisionManager::MoveColliGroup(mhCollisionManager *this, mhObject *mhObj, mhCollisionType Dest)
{
  ResElement *v3; // eax@1
  mhCollisionManager *v4; // esi@1
  NiActorManager *v5; // ecx@2
  NiAVObject *v6; // eax@3
  signed int result; // eax@6

  v3 = mhObj->m_pkResource;
  v4 = this;
  if ( v3->m_bIsCanAnimation && (v5 = v3->m_pActorMgr.m_pObject) != 0 )
    v6 = v5->m_spNIFRoot.m_pObject;
  else
    v6 = (NiAVObject *)&v3->m_pNiNode.m_pObject->vfptr;
  if ( v6 )
  {
    if ( Dest == 1 )
      NiCollisionGroup::RemoveCollidee(&v4->m_pkCollisionGroup, v6);
    else
      NiCollisionGroup::RemoveCollider(&v4->m_pkCollisionGroup, v6);
    mhCollisionManager::AddObject(v4, mhObj, Dest);
    result = 1;
  }
  else
  {
    result = 2;
  }
  return result;
}

//----- (006C12A0) --------------------------------------------------------
void __cdecl MiniHouseIndoor::SetZeroID()
{
  MiniHouseIndoor::AddObjectID = 0;
  MiniHouseIndoor::AddTexID = 0;
  MiniHouseIndoor::AddResObjID = 0;
}
// B5C124: using guessed type int MiniHouseIndoor::AddObjectID;
// B5C128: using guessed type int MiniHouseIndoor::AddTexID;
// B5C12C: using guessed type int MiniHouseIndoor::AddResObjID;

//----- (006C12C0) --------------------------------------------------------
void __thiscall MiniHouseIndoor::RevChangeEndure(MiniHouseIndoor *this, MHE_STEP e, int iGUID)
{
  this->m_RevChangeEndure.e = e;
  this->m_RevChangeEndure.iCandidateObjID = iGUID;
}

//----- (006C12E0) --------------------------------------------------------
signed int __stdcall MiniHouseIndoor::DelUI(mhUIID DelID)
{
  return 1;
}

//----- (006C12F0) --------------------------------------------------------
bool __thiscall MiniHouseIndoor::IsNormalState(MiniHouseIndoor *this)
{
  return this->m_eState == 1;
}

//----- (006C1300) --------------------------------------------------------
NiAVObject *__stdcall MiniHouseIndoor::MoveSceneType(mhObject *Obj, mhObjSceneType To, mhObjSceneType From, bool bCallGameFrameNet)
{
  return 0;
}

//----- (006C1310) --------------------------------------------------------
tm *__usercall localtime_1@<eax>(const int *_Time@<eax>)
{
  return _localtime32(_Time);
}

//----- (006C1320) --------------------------------------------------------
int __usercall mktime_3@<eax>(tm *_Tm@<eax>)
{
  return _mktime32(_Tm);
}

//----- (006C1330) --------------------------------------------------------
mhReturnType __stdcall MiniHouseIndoor::SetPickedObj(mhObject *Picked)
{
  return 0;
}

//----- (006C1340) --------------------------------------------------------
NiAVObject *MiniHouseIndoor::GetLightNode()
{
  return 0;
}

//----- (006C1350) --------------------------------------------------------
signed int MiniHouseIndoor::MakeDefault()
{
  return 1;
}

//----- (006C1360) --------------------------------------------------------
signed int __stdcall MiniHouseIndoor::DelObject(int iGUID, int iResGUID)
{
  return 1;
}

//----- (006C1370) --------------------------------------------------------
Item *__stdcall MiniHouseIndoor::GetEndureStep(Item *pItem, int Nowtime)
{
  Item *result; // eax@1
  int v4; // esi@6
  int v5; // eax@8
  signed int v6; // esi@11
  SHINE_ITEM_STRUCT kItemStruct; // [sp+0h] [bp-B4h]@2
  tm ts; // [sp+68h] [bp-4Ch]@6
  tm Time1; // [sp+8Ch] [bp-28h]@6

  result = pItem;
  if ( pItem )
  {
    qmemcpy(&kItemStruct, &pItem->m_kStruct, sizeof(kItemStruct));
    if ( (unsigned __int8)kItemStruct.itemattr.Pet.sName[15] == 255 )
    {
      result = (Item *)100000;
    }
    else if ( kItemStruct.itemattr.Pet.sName[15] )
    {
      Time1.tm_min = *(unsigned int *)&kItemStruct.itemattr.furniture.dEndureEndTime >> 25;
      Time1.tm_hour = (*(unsigned int *)&kItemStruct.itemattr.furniture.dEndureEndTime >> 19) & 0x3F;
      Time1.tm_mon = ((*(unsigned int *)&kItemStruct.itemattr.furniture.dEndureEndTime >> 8) & 0x1F) - 1;
      Time1.tm_sec = 0;
      Time1.tm_mday = (*(unsigned int *)&kItemStruct.itemattr.furniture.dEndureEndTime >> 13) & 0x3F;
      Time1.tm_year = (unsigned __int8)kItemStruct.itemattr.Pet.sName[15] + 100;
      Time1.tm_isdst = 0;
      qmemcpy(&ts, _localtime32(&Nowtime), sizeof(ts));
      v4 = _mktime32(&Time1);
      if ( v4 != -1
        && (!ts.tm_sec ? (v5 = Nowtime) : (ts.tm_sec = 0, v5 = _mktime32(&ts)), v4 > v5 && (v6 = v4 - v5, v6 > 0)) )
      {
        result = (Item *)(v6 / 3600);
      }
      else
      {
        result = 0;
      }
    }
    else
    {
      result = (Item *)200000;
    }
  }
  return result;
}

//----- (006C14C0) --------------------------------------------------------
mhObject *__thiscall MiniHouseIndoor::ObjDoAction(MiniHouseIndoor *this, char action, unsigned __int16 Actor, unsigned __int16 ActObj)
{
  MiniHouseIndoor *v4; // edi@1
  Char *v5; // eax@2
  Char *v6; // esi@2
  mhObject *result; // eax@6

  v4 = this;
  if ( Actor != -1 )
  {
    v5 = CharMgr::GetChar(&g_kCharMgr, Actor);
    v6 = v5;
    if ( v5 )
    {
      if ( !Char::CheckActState(v5, 500000) )
        ((void (__thiscall *)(_DWORD))v6->vfptr[14].AddAbStateByAbstateIndex)(v6);
    }
  }
  if ( ActObj == -1 || (result = mhObjectManager::GetObjectA(&v4->m_ManagerMediator.m_ObjManager, ActObj)) != 0 )
    result = (mhObject *)1;
  return result;
}

//----- (006C1530) --------------------------------------------------------
mhObject *__thiscall MiniHouseIndoor::ObjDoAction(MiniHouseIndoor *this, unsigned __int16 nFurnitureHnd, unsigned __int16 ActorHnd, unsigned __int16 Anihandle, unsigned __int16 NextAnihandle, char ActorIdx, char ActeeIdx)
{
  mhObject *result; // eax@1

  result = mhObjectManager::GetObjectA(&this->m_ManagerMediator.m_ObjManager, nFurnitureHnd);
  if ( result )
  {
    mhObject::SetAct(result, Anihandle, NextAnihandle);
    result = (mhObject *)1;
  }
  return result;
}

//----- (006C1560) --------------------------------------------------------
void __thiscall MiniHouseIndoor::ArrangeModeReq(MiniHouseIndoor *this)
{
  if ( this->m_GameMainConnectMgr )
    mhGameMainConnectMgr::SendDecorateModeReq(this->m_eState);
}

//----- (006C1580) --------------------------------------------------------
signed int __thiscall MiniHouseIndoor::Clear(MiniHouseIndoor *this)
{
  MiniHouseIndoor *v1; // esi@1
  signed int result; // eax@2

  v1 = this;
  if ( mhResTableManager::Clear(&this->m_ManagerMediator.m_ResTableManager) != 1
    || mhObjectManager::Clear(&v1->m_ManagerMediator.m_ObjManager) != 1 )
  {
    result = 0;
  }
  else
  {
    NiCollisionGroup::RemoveAll(&v1->m_ManagerMediator.m_CollisionManager.m_pkCollisionGroup);
    result = 1;
  }
  return result;
}

//----- (006C15B0) --------------------------------------------------------
int __thiscall MiniHouseIndoor::GetPickedObjID(MiniHouseIndoor *this)
{
  mhObject *v1; // eax@1
  int result; // eax@2

  v1 = mhObjectManager::GetObjectA(&this->m_ManagerMediator.m_ObjManager, (NiNode *)this->m_PickedObj);
  if ( v1 )
    result = v1->m_iGUID;
  else
    result = -1;
  return result;
}

//----- (006C15D0) --------------------------------------------------------
void __thiscall MiniHouseIndoor::DelScene(MiniHouseIndoor *this, NiAVObject *spNode, mhObjSceneType Dest)
{
  NiAVObject *v3; // esi@2
  LONG v4; // eax@3

  if ( Dest == 1 )
  {
    ((void (__stdcall *)(_DWORD, _DWORD))this->m_spAbStateEffScene.m_pObject->vfptr[30].__vecDelDtor)(&spNode, spNode);
    v3 = spNode;
    if ( !spNode )
      return;
    v4 = InterlockedDecrement((volatile LONG *)&spNode->m_uiRefCount);
  }
  else
  {
    ((void (__stdcall *)(_DWORD, _DWORD))this->m_spNormalScene.m_pObject->vfptr[30].__vecDelDtor)(&spNode, spNode);
    v3 = spNode;
    if ( !spNode )
      return;
    v4 = InterlockedDecrement((volatile LONG *)&spNode->m_uiRefCount);
  }
  if ( !v4 )
  {
    if ( v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  }
}

//----- (006C1640) --------------------------------------------------------
mhObject *__thiscall MiniHouseIndoor::GetObjectA(MiniHouseIndoor *this, NiAVObject *pkNode)
{
  mhObject *result; // eax@1
  mhObjectManager *v3; // esi@2
  NiNode *v4; // eax@2

  result = (mhObject *)pkNode;
  if ( pkNode )
  {
    v3 = &this->m_ManagerMediator.m_ObjManager;
    v4 = mhObjectManager::FindRootNode((NiNode *)pkNode);
    result = mhObjectManager::GetObjectA(v3, v4);
  }
  return result;
}

//----- (006C1670) --------------------------------------------------------
void __thiscall MiniHouseIndoor::MainCharRunAwayFromObj(MiniHouseIndoor *this, NiPoint3 *CharPos, NiPoint3 *ColiPoint)
{
  MiniHouseIndoor *v3; // edi@1
  mhGameMainConnectMgr *v4; // ecx@1
  Char *v5; // eax@1
  mhGameMainConnectMgr *v6; // ecx@1
  Char *v7; // eax@1
  mhGameMainConnectMgr *v8; // ecx@2
  Char *v9; // eax@2
  mhGameMainConnectMgr *v10; // ecx@4
  float v11; // ST10_4@4
  float v12; // ST14_4@4
  float v13; // ST18_4@4
  MainChar *v14; // eax@4
  mhGameMainConnectMgr *v15; // ecx@4
  MainChar *v16; // eax@4
  mhGameMainConnectMgr *v17; // ecx@4
  MainChar *v18; // eax@4
  mhGameMainConnectMgr *v19; // ecx@4
  unsigned int uiFirstCode; // [sp+10h] [bp-4h]@1

  v3 = this;
  v4 = this->m_GameMainConnectMgr;
  v5 = mhGameMainConnectMgr::GetMainChar();
  Char::GetAniCode(v5, 0, &uiFirstCode, 0);
  v6 = v3->m_GameMainConnectMgr;
  v7 = mhGameMainConnectMgr::GetMainChar();
  if ( Char::CheckActState(v7, 200000)
    || (v8 = v3->m_GameMainConnectMgr,
        v9 = mhGameMainConnectMgr::GetMainChar(),
        JumpProcessor::IsJump(&v9->m_kJumpProcessor))
    || uiFirstCode == 100000 )
  {
    v10 = v3->m_GameMainConnectMgr;
    v11 = CharPos->x - ColiPoint->x;
    v12 = CharPos->y - ColiPoint->y;
    v13 = CharPos->z - ColiPoint->z;
    CharPos->x = CharPos->x + v11;
    CharPos->y = CharPos->y + v12;
    CharPos->z = CharPos->z + v13;
    v14 = (MainChar *)mhGameMainConnectMgr::GetMainChar();
    MainChar::SetStartReserveAct(v14, RESERVEACT_PICKGROUND);
    v15 = v3->m_GameMainConnectMgr;
    v16 = (MainChar *)mhGameMainConnectMgr::GetMainChar();
    MainChar::SetRevserveMovePos(v16, CharPos);
    v17 = v3->m_GameMainConnectMgr;
    v18 = (MainChar *)mhGameMainConnectMgr::GetMainChar();
    MainChar::StartMoveTarget(v18);
    v19 = v3->m_GameMainConnectMgr;
    mhGameMainConnectMgr::SendMainCharPosReq();
  }
}

//----- (006C1750) --------------------------------------------------------
mhObject *__thiscall MiniHouseIndoor::DelPickedObj(MiniHouseIndoor *this)
{
  MiniHouseIndoor *v1; // esi@1
  mhObject *result; // eax@1
  mhGameMainConnectMgr *v3; // ecx@2

  v1 = this;
  result = mhObjectManager::GetObjectA(&this->m_ManagerMediator.m_ObjManager, (NiNode *)this->m_PickedObj);
  if ( result )
  {
    v3 = v1->m_GameMainConnectMgr;
    mhGameMainConnectMgr::SendDelObjReq(result->m_iGUID);
    result = (mhObject *)1;
  }
  return result;
}

//----- (006C1780) --------------------------------------------------------
#error "6C1868: positive sp value has been found (funcsize=93)"

//----- (006C1870) --------------------------------------------------------
bool __thiscall MiniHouseIndoor::IsPopUpMHItemInvState(MiniHouseIndoor *this)
{
  bool result; // al@1

  result = this->m_bAskReturnToInvState;
  if ( result == 1 )
    result = this->m_iReturnToInvItemID != -1;
  return result;
}

//----- (006C1890) --------------------------------------------------------
char __thiscall MiniHouseIndoor::SetCharEmotion(MiniHouseIndoor *this, unsigned __int16 TargetObjID, char ActPos, MHEmotion *pkEmotionInfo)
{
  MiniHouseIndoor *v4; // esi@1
  char v6; // bl@4
  GameFrameWork *v7; // eax@7
  unsigned __int16 v8; // ax@11

  v4 = this;
  if ( TargetObjID != -1 )
  {
    v6 = ActPos;
    if ( ((int (*)(void))g_pkMainChar->vfptr[13].DeleteAbStateByAbstateIndex)() == 4 )
    {
      if ( v4->m_mhCharEmotionInfo.TargetObjID != TargetObjID )
      {
        v7 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
LABEL_10:
        GameFrameWork::On_NC_MINIHOUSE_FURNITURE_EMOTION_CANCEL_REQ(v7);
        goto LABEL_11;
      }
      if ( v4->m_mhCharEmotionInfo.ActPos != ActPos )
      {
        v7 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
        goto LABEL_10;
      }
    }
LABEL_11:
    v8 = v4->m_mhCharEmotionInfo.TargetObjID;
    v4->m_mhCharEmotionInfo.OldActPos = v4->m_mhCharEmotionInfo.ActPos;
    v4->m_mhCharEmotionInfo.OldTargetObjID = v8;
    goto LABEL_12;
  }
  if ( this->m_mhCharEmotionInfo.TargetObjID == -1 )
    return 0;
  v6 = ActPos;
  this->m_mhCharEmotionInfo.OldActPos = ActPos;
  this->m_mhCharEmotionInfo.OldTargetObjID = -1;
LABEL_12:
  v4->m_mhCharEmotionInfo.TargetObjID = TargetObjID;
  v4->m_mhCharEmotionInfo.ActPos = v6;
  v4->m_mhCharEmotionInfo.EmotionInfo = pkEmotionInfo;
  return 1;
}

//----- (006C1950) --------------------------------------------------------
void __thiscall MiniHouseIndoor::AddObjSeatInfo(MiniHouseIndoor *this, int ActPos, unsigned __int16 CharhWnd, unsigned __int16 mhObj)
{
  mhObject *v4; // eax@1
  mhObject *v5; // esi@1
  const char *v6; // eax@2

  v4 = mhObjectManager::GetObjectA(&this->m_ManagerMediator.m_ObjManager, mhObj);
  v5 = v4;
  if ( v4 )
  {
    v6 = fs("Add---Object seats %d. char=%d. ActPos = %d\n", v4->m_iGUID, CharhWnd, (unsigned __int8)ActPos);
    OutputDebugStringA(v6);
    mhObject::AddObjSeatInfo(v5, ActPos, CharhWnd);
  }
}

//----- (006C19A0) --------------------------------------------------------
void __thiscall MiniHouseIndoor::DelObjSeatInfo(MiniHouseIndoor *this, unsigned __int16 CharhWnd)
{
  mhObject *v2; // eax@1

  v2 = mhObjectManager::GetmhEmotionObj(&this->m_ManagerMediator.m_ObjManager, CharhWnd);
  if ( v2 )
    mhObject::DelObjSeatInfo(v2, CharhWnd);
}

//----- (006C19D0) --------------------------------------------------------
void __thiscall MiniHouseIndoor::CatchAllGeometry(MiniHouseIndoor *this, NiAVObject *pkObject, PgTList<NiGeometry *> *kList)
{
  NiAVObject *v3; // edi@1
  NiRTTI *v4; // eax@2
  NiRTTI *v5; // eax@5
  NiTimeController *v6; // esi@9
  PgTList<NiGeometry *> *v7; // ebx@10
  NiAVObject *v8; // eax@12
  MiniHouseIndoor *v9; // [sp+4h] [bp-4h]@1

  v3 = pkObject;
  v9 = this;
  if ( pkObject )
  {
    v4 = (NiRTTI *)((int (__thiscall *)(_DWORD))pkObject->vfptr[1].__vecDelDtor)(pkObject);
    if ( v4 )
    {
      while ( v4 != &NiNode::m_RTTI )
      {
        v4 = v4->m_pkBaseRTTI;
        if ( !v4 )
          goto LABEL_5;
      }
      v6 = 0;
      if ( v3[1].m_ppkExtra )
      {
        v7 = kList;
        do
        {
          if ( v3[1].m_spControllers.m_pObject > v6 )
            v8 = *(NiAVObject **)(v3[1].m_uiRefCount + 4 * (_DWORD)v6);
          else
            v8 = 0;
          MiniHouseIndoor::CatchAllGeometry(v9, v8, v7);
          v6 = (NiTimeController *)((char *)v6 + 1);
        }
        while ( (NiExtraData **)v6 < v3[1].m_ppkExtra );
      }
    }
    else
    {
LABEL_5:
      v5 = (NiRTTI *)((int (__thiscall *)(_DWORD))v3->vfptr[1].__vecDelDtor)(v3);
      if ( v5 )
      {
        while ( v5 != &NiGeometry::m_RTTI )
        {
          v5 = v5->m_pkBaseRTTI;
          if ( !v5 )
            return;
        }
        pkObject = v3;
        NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)kList,
          (NiD3DXEffectParameter *const *)&pkObject);
      }
    }
  }
}

//----- (006C1A80) --------------------------------------------------------
int *__userpurge MiniHouseIndoor::RemoveObjScene@<eax>(MiniHouseIndoor *this@<ecx>, int a2@<esi>, mhObject *RemoveObj)
{
  mhObject *v3; // edi@1
  MiniHouseIndoor *v4; // ebx@1
  int *result; // eax@2
  ResElement *v6; // eax@3
  NiNode *v7; // ecx@3
  NiActorManager *v8; // edx@4
  NiNode *v9; // eax@5
  mhObject *v10; // esi@8
  ResElement *v11; // eax@11
  NiActorManager *v12; // edx@12
  NiAVObject *v13; // eax@13
  NiNode *v14; // eax@14
  mhObject *v15; // esi@16

  v3 = RemoveObj;
  v4 = this;
  if ( RemoveObj )
  {
    v6 = RemoveObj->m_pkResource;
    v7 = this->m_spNormalScene.m_pObject;
    if ( v6->m_bIsCanAnimation && (v8 = v6->m_pActorMgr.m_pObject) != 0 )
      v9 = (NiNode *)v8->m_spNIFRoot.m_pObject;
    else
      v9 = v6->m_pNiNode.m_pObject;
    ((void (__stdcall *)(mhObject **, NiNode *, int))v7->vfptr[30].__vecDelDtor)(&RemoveObj, v9, a2);
    if ( RemoveObj )
    {
      v10 = RemoveObj;
      if ( !InterlockedDecrement((volatile LONG *)&RemoveObj->m_iGUID) )
      {
        if ( v10 )
          v10->vfptr->__vecDelDtor(v10, 1u);
      }
    }
    v11 = v3->m_pkResource;
    if ( v11->m_bIsCanAnimation && (v12 = v11->m_pActorMgr.m_pObject) != 0 )
      v13 = v12->m_spNIFRoot.m_pObject;
    else
      v14 = v11->m_pNiNode.m_pObject;
    ((void (__stdcall *)(mhObject **))v4->m_spAbStateEffScene.m_pObject->vfptr[30].__vecDelDtor)(&RemoveObj);
    if ( RemoveObj )
    {
      v15 = RemoveObj;
      if ( !InterlockedDecrement((volatile LONG *)&RemoveObj->m_iGUID) )
      {
        if ( v15 )
          v15->vfptr->__vecDelDtor(v15, 1u);
      }
    }
    NiAVObject::Update((NiAVObject *)&v4->m_spNormalScene.m_pObject->vfptr, 0.0, 1);
    NiAVObject::Update((NiAVObject *)&v4->m_spAbStateEffScene.m_pObject->vfptr, 0.0, 1);
    result = (int *)1;
  }
  else
  {
    result = &RemoveObj->m_iResGUID;
  }
  return result;
}

//----- (006C1B70) --------------------------------------------------------
signed int __thiscall MiniHouseIndoor::PickedObjMove(MiniHouseIndoor *this, tagPOINT MousePos, mhObjTranslate TranslateMode)
{
  MiniHouseIndoor *v3; // esi@1
  NiAVObject *v4; // eax@1
  signed int result; // eax@2
  float v6; // edx@3
  float v7; // ST1C_4@4
  NiAVObject **v8; // eax@5
  void (__thiscall ***v9)(_DWORD, _DWORD); // esi@6
  float NowPos_8; // [sp+1Ch] [bp-10h]@3

  v3 = this;
  v4 = this->m_PickedObj;
  if ( v4 )
  {
    v6 = v4->m_kLocal.m_Translate.y;
    NowPos_8 = v4->m_kLocal.m_Translate.z;
    if ( TranslateMode == 5 )
    {
      v4->m_kLocal.m_Translate.x = v4->m_kLocal.m_Translate.x;
      v4->m_kLocal.m_Translate.y = v6;
      v7 = NowPos_8 + 10.0;
      v4->m_kLocal.m_Translate.z = v7;
      NiAVObject::Update(this->m_PickedObj, 0.0, 1);
    }
    v8 = (NiAVObject **)MiniHouseIndoor::GetObjRootScene(v3, (NiPointer<NiNode> *)&TranslateMode);
    NiAVObject::Update(*v8, 0.0, 1);
    if ( TranslateMode )
    {
      v9 = (void (__thiscall ***)(_DWORD, _DWORD))TranslateMode;
      if ( !InterlockedDecrement((volatile LONG *)(TranslateMode + 4)) )
      {
        if ( v9 )
          (**v9)(v9, 1);
      }
    }
    result = 1;
  }
  else
  {
    result = 2;
  }
  return result;
}

//----- (006C1C60) --------------------------------------------------------
signed int __thiscall MiniHouseIndoor::PickedObjRotate(MiniHouseIndoor *this, tagPOINT MousePos, mhObjTranslate TranslateMode)
{
  MiniHouseIndoor *v3; // ebx@1
  signed int v4; // eax@2
  long double v5; // st7@3
  long double v6; // st7@4
  NiMatrix3 *v7; // eax@7
  NiNode *v8; // ecx@7
  NiNode *v9; // esi@8
  NiPointer<NiNode> v10; // [sp+18h] [bp-84h]@7
  float fAngleX; // [sp+1Ch] [bp-80h]@3
  NiMatrix3 oldrot; // [sp+20h] [bp-7Ch]@3
  NiMatrix3 result; // [sp+44h] [bp-58h]@7
  NiMatrix3 rot; // [sp+68h] [bp-34h]@3
  int v15; // [sp+98h] [bp-4h]@7

  v3 = this;
  if ( this->m_PickedObj )
  {
    fAngleX = (double)(this->m_MousePosForTrans.x - MousePos.x);
    NiMatrix3::MakeIdentity(&rot);
    NiMatrix3::MakeIdentity(&oldrot);
    v5 = fAngleX;
    if ( fAngleX <= 0.0 )
    {
      fAngleX = fabs(v5);
      v6 = -(fAngleX / 40.0);
    }
    else
    {
      v6 = v5 / 40.0;
    }
    fAngleX = v6;
    v3->m_MousePosForTrans = MousePos;
    if ( TranslateMode == MH_OBJ_ROT_AXIS_ALL )
    {
      NiMatrix3::MakeZRotation(&rot, fAngleX);
      v7 = NiMatrix3::operator*(&v3->m_PickedObj->m_kLocal.m_Rotate, &result, &rot);
      qmemcpy(&rot, v7, sizeof(rot));
      qmemcpy(&v3->m_PickedObj->m_kLocal, v7, 0x24u);
      v8 = MiniHouseIndoor::GetObjRootScene(v3, &v10)->m_pObject;
      v15 = 0;
      NiAVObject::Update((NiAVObject *)&v8->vfptr, 0.0, 1);
      v15 = -1;
      if ( v10.m_pObject )
      {
        v9 = v10.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&v10.m_pObject->m_uiRefCount) )
        {
          if ( v9 )
            v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
        }
      }
    }
    v4 = 1;
  }
  else
  {
    v4 = 2;
  }
  return v4;
}

//----- (006C1DD0) --------------------------------------------------------
signed int __thiscall MiniHouseIndoor::AttachObjToScene(MiniHouseIndoor *this, int iObjGUID, bool bAddCollision)
{
  MiniHouseIndoor *v3; // esi@1
  mhObject *v4; // eax@2
  ResElement *v5; // eax@3
  NiActorManager *v6; // ecx@4
  NiNode *v7; // eax@5

  v3 = this;
  mhObjectManager::AttachScene(&this->m_ManagerMediator.m_ObjManager, iObjGUID, this->m_spNormalScene.m_pObject);
  if ( bAddCollision == 1 )
  {
    v4 = mhObjectManager::GetObjectA(&v3->m_ManagerMediator.m_ObjManager, iObjGUID);
    mhCollisionManager::AddObject(&v3->m_ManagerMediator.m_CollisionManager, v4, 0);
  }
  v5 = mhObjectManager::GetObjectA(&v3->m_ManagerMediator.m_ObjManager, iObjGUID)->m_pkResource;
  if ( v5->m_bIsCanAnimation && (v6 = v5->m_pActorMgr.m_pObject) != 0 )
    v7 = (NiNode *)v6->m_spNIFRoot.m_pObject;
  else
    v7 = v5->m_pNiNode.m_pObject;
  v7->m_uFlags &= 0xFFFEu;
  NiAVObject::Update((NiAVObject *)&v3->m_spNormalScene.m_pObject->vfptr, 0.0, 1);
  NiAVObject::UpdateEffects((NiAVObject *)&v3->m_spNormalScene.m_pObject->vfptr);
  NiAVObject::UpdateProperties((NiAVObject *)&v3->m_spNormalScene.m_pObject->vfptr);
  return 1;
}

//----- (006C1E70) --------------------------------------------------------
void __thiscall MiniHouseIndoor::CloseAllUis(MiniHouseIndoor *this)
{
  MiniHouseIndoor *v1; // esi@1
  MsgBox *v2; // edi@1
  MsgBox *v3; // edi@6

  v1 = this;
  ITask::DirectDispatchAll(57, this);
  ITask::DirectDispatchAll(58, v1);
  ITask::DirectDispatchAll(61, v1);
  ITask::DirectDispatchAll(65, v1);
  ITask::DirectDispatchAll(66, v1);
  PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_spMsgBox.m_pObject->vfptr);
  v2 = v1->m_spMsgBox.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spMsgBox.m_pObject = 0;
  }
  PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v1->m_spObjEffMsg.m_pObject->vfptr);
  v3 = v1->m_spObjEffMsg.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
    {
      if ( v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
    v1->m_spObjEffMsg.m_pObject = 0;
  }
}

//----- (006C1F30) --------------------------------------------------------
signed int __thiscall MiniHouseIndoor::CloseUIwin(MiniHouseIndoor *this, mhUIID CloseUIID)
{
  if ( CloseUIID == 10 )
    MiniHouseIndoor::CloseAllUis(this);
  return 1;
}

//----- (006C1F50) --------------------------------------------------------
signed int __thiscall MiniHouseIndoor::DelCharColiNode(MiniHouseIndoor *this, NiNode *CharRootNode)
{
  NiNode *v2; // esi@1
  signed int result; // eax@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v4; // eax@4
  NiRefObjectVtbl *v5; // edx@6
  int v6; // eax@6
  void (__thiscall ***v7)(_DWORD, _DWORD); // edi@8
  NiPointer<NiNode> v8; // [sp-8h] [bp-20h]@11
  mhCollisionType v9; // [sp-4h] [bp-1Ch]@6
  NiPointer<NiNode> *v10; // [sp+Ch] [bp-Ch]@11
  MiniHouseIndoor *v11; // [sp+10h] [bp-8h]@1
  int v12; // [sp+14h] [bp-4h]@7
  NiNode *CharRootNodea; // [sp+20h] [bp+8h]@3

  v2 = CharRootNode;
  v11 = this;
  if ( CharRootNode )
  {
    CharRootNodea = (NiNode *)2;
    do
    {
      v4 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)mhCharColliNodeName_0._Bx._Ptr;
      if ( mhCharColliNodeName_0._Myres < 0x10 )
        v4 = &mhCharColliNodeName_0;
      v5 = v2->vfptr;
      v9 = (mhCollisionType)v4;
      v6 = (int)v5[18].__vecDelDtor((NiRefObject *)v2, (unsigned int)v4);
      if ( v6 )
      {
        ((void (__thiscall *)(NiNode *, int *, int))v2->vfptr[30].__vecDelDtor)(v2, &v12, v6);
        if ( v12 )
        {
          v7 = (void (__thiscall ***)(_DWORD, _DWORD))v12;
          if ( !InterlockedDecrement((volatile LONG *)(v12 + 4)) )
          {
            if ( v7 )
              (**v7)(v7, 1);
          }
        }
        v9 = 2;
        v8.m_pObject = v2;
        v10 = &v8;
        InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
        mhCollisionManager::DelColliData(&v11->m_ManagerMediator.m_CollisionManager, v8, v9);
      }
      CharRootNodea = (NiNode *)((char *)CharRootNodea - 1);
    }
    while ( CharRootNodea );
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006C2000) --------------------------------------------------------
int __thiscall MiniHouseIndoor::CheckColiInfoWIthPickedObj(MiniHouseIndoor *this)
{
  MiniHouseIndoor *v1; // esi@1
  NiAVObject *v2; // eax@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // ecx@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v5; // eax@8

  v1 = this;
  v2 = this->m_PickedObj;
  if ( v2 )
  {
    if ( this->m_eState == 3 )
    {
      if ( !dword_B5C0E0 )
        return 1;
      v3 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)mhCollisionParentNamePick_1._Bx._Ptr;
      if ( mhCollisionParentNamePick_1._Myres < 0x10 )
        v3 = &mhCollisionParentNamePick_1;
      if ( !strncmp(*(const char **)(dword_B5C0E0 + 8), v3->_Bx._Buf, mhCollisionParentNamePick_1._Mysize) )
        return 0;
      v5 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)mhCollisionParentNamePick_1._Bx._Ptr;
      if ( mhCollisionParentNamePick_1._Myres < 0x10 )
        v5 = &mhCollisionParentNamePick_1;
      if ( !strncmp(*(const char **)(dword_B5C0E4 + 8), v5->_Bx._Buf, mhCollisionParentNamePick_1._Mysize) )
        return 1;
    }
    else if ( *(_DWORD *)mhCollisionManager::m_ColliInfo )
    {
      if ( (*(int (__stdcall **)(char *))(**(_DWORD **)mhCollisionManager::m_ColliInfo + 72))(v2->m_pcName)
        && v1->m_PickedObj->m_pcName )
      {
        return 0;
      }
      if ( (*(int (__stdcall **)(char *))(*(_DWORD *)dword_B5C0DC + 72))(v1->m_PickedObj->m_pcName)
        && v1->m_PickedObj->m_pcName )
      {
        return 1;
      }
    }
  }
  return -1;
}
// B5C0DC: using guessed type int dword_B5C0DC;
// B5C0E0: using guessed type int dword_B5C0E0;
// B5C0E4: using guessed type int dword_B5C0E4;

//----- (006C20E0) --------------------------------------------------------
int __stdcall MiniHouseIndoor::GetEndurePercentage(Item *pItem, int Nowtime)
{
  int result; // eax@2
  Item *v4; // ebx@3
  int v5; // edi@5
  int v6; // esi@5
  int v7; // edx@7
  int v8; // eax@8
  MiniHouseFurniture *v9; // eax@9
  MiniHouseEndure *v10; // eax@10
  signed int v11; // eax@12
  int Now; // [sp+Ch] [bp+8h]@13

  if ( pItem )
  {
    v4 = MiniHouseIndoor::GetEndureStep(pItem, Nowtime);
    if ( v4 == (Item *)100000 )
    {
      result = 100;
    }
    else
    {
      v5 = pItem->m_kStruct.itemid;
      v6 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v5)
        && (unsigned __int16)v5 <= *(_WORD *)(v6 + 200)
        && (v7 = *(_DWORD *)(v6 + 196), *(_DWORD *)(v7 + 4 * v5))
        && (v8 = *(_DWORD *)(v7 + 4 * v5)) != 0
        && (v9 = MiniHouseFuritureInfoTab::GetObjByName((char *)(v8 + 2))) != 0
        && (v10 = MiniHouseEndureInfoTable::GetByHandle(v9->KeepTime_Endure)) != 0
        && v4
        && (v11 = v10->Endure[0], (_WORD)v11) )
      {
        *(float *)&Now = (double)(signed int)v4 / (double)v11;
        result = (signed int)(*(float *)&Now * 100.0);
      }
      else
      {
        result = 0;
      }
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (006C21B0) --------------------------------------------------------
void __thiscall MiniHouseIndoor::ForceChangeEndure(MiniHouseIndoor *this)
{
  MiniHouseIndoor *v1; // esi@1
  int v2; // eax@1
  mhObject *v3; // eax@2
  mhObject *v4; // edi@2

  v1 = this;
  v2 = this->m_RevChangeEndure.iCandidateObjID;
  if ( (_WORD)v2 != -1 )
  {
    v3 = mhObjectManager::GetObjectA(&this->m_ManagerMediator.m_ObjManager, v2);
    v4 = v3;
    if ( v3 )
    {
      mhCollisionManager::DelObject(&v1->m_ManagerMediator.m_CollisionManager, v3, MH_COL_ALL);
      MiniHouseIndoor::RemoveObjScene(v1, (int)v1, v4);
      mhObject::SetEndureStep(v4, v1->m_RevChangeEndure.e);
      MiniHouseIndoor::AttachObjToScene(v1, v1->m_RevChangeEndure.iCandidateObjID, 1);
    }
  }
}

//----- (006C2210) --------------------------------------------------------
void __thiscall MiniHouseIndoor::DetachFocusEff(MiniHouseIndoor *this, NiNode *pkTarget)
{
  NiTListItem<NiGeometry *> *v2; // edi@2
  NiAVObject *v3; // ecx@3
  NiProperty *v4; // eax@3
  NiProperty *v5; // esi@3
  void (__stdcall ***v6)(_DWORD); // ecx@4
  PgTList<NiGeometry *> kList; // [sp+10h] [bp-1Ch]@2
  int v8; // [sp+28h] [bp-4h]@2

  if ( pkTarget )
  {
    kList.m_kAllocator.m_uiCount = 0;
    kList.m_pkHead = 0;
    kList.m_pkTail = 0;
    kList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>Vtbl *)&PgTList<NiGeometry *>::`vftable';
    v8 = 0;
    MiniHouseIndoor::CatchAllGeometry(this, (NiAVObject *)&pkTarget->vfptr, &kList);
    v2 = kList.m_pkHead;
    if ( kList.m_pkHead )
    {
      do
      {
        v3 = (NiAVObject *)&v2->m_element->vfptr;
        v2 = v2->m_pkNext;
        v4 = NiAVObject::GetProperty(v3, 8);
        v5 = v4;
        if ( v4 )
        {
          v6 = (void (__stdcall ***)(_DWORD))LODWORD(v4[1].m_spControllers.m_pObject->m_fPhase);
          pkTarget = 0;
          if ( v6 )
          {
            (**v6)(1);
            NiTArray<NiCollisionGroup::Record *>::SetAt(
              (NiTArray<NiVBChip *> *)&v5[1].m_pcName,
              4u,
              (NiVBChip *const *)&pkTarget);
          }
          NiTexturingProperty::SetMultiTexture((NiTexturingProperty *)v5, 0);
        }
      }
      while ( v2 );
    }
    v8 = -1;
    PgTList<NiGeometry *>::~PgTList<NiGeometry *>(&kList);
  }
}
// 9BA2CC: using guessed type int (__thiscall *PgTList<NiGeometry *>::`vftable')(void *p, char);

//----- (006C22D0) --------------------------------------------------------
void __thiscall MiniHouseIndoor::SendObjEffReq(MiniHouseIndoor *this)
{
  MiniHouseIndoor *v1; // ebx@1
  mhObject *v2; // eax@2
  int v3; // esi@3
  int v4; // edi@3
  int *v5; // eax@5
  int v6; // eax@6
  MiniHouseFurnitureObjEffect *v7; // eax@7
  mhGameMainConnectMgr *v8; // ecx@8

  v1 = this;
  if ( this->m_GameMainConnectMgr )
  {
    v2 = mhObjectManager::GetObjectA(&this->m_ManagerMediator.m_ObjManager, this->m_ColiObjID);
    if ( v2 )
    {
      v3 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      v4 = v2->m_iResGUID;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v4) )
      {
        if ( (unsigned __int16)v4 <= *(_WORD *)(v3 + 200) )
        {
          v5 = (int *)(*(_DWORD *)(v3 + 196) + 4 * (unsigned __int16)v4);
          if ( *v5 )
          {
            v6 = *v5;
            if ( v6 )
            {
              v7 = MHFurnitureObjEffectTab::GetInxName((char *)(v6 + 2));
              if ( v7 )
              {
                v8 = v1->m_GameMainConnectMgr;
                mhGameMainConnectMgr::SendObjEffReq(v1->m_ColiObjID, v7->Handle);
              }
            }
          }
        }
      }
    }
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (006C2350) --------------------------------------------------------
signed int __thiscall MiniHouseIndoor::SetMouseDownStartPos(MiniHouseIndoor *this, tagPOINT MousePos, NiPoint3 kGroundPos, mhObjTranslate TranslateMode)
{
  signed int result; // eax@2

  this->m_kMDownGroundPos = kGroundPos;
  this->m_MousePosForTrans = MousePos;
  this->m_MDownStartCurPos = MousePos;
  switch ( TranslateMode )
  {
    case 0:
    case 1:
    case 2:
    case 3:
      MiniHouseIndoor::PickedObjRotate(this, MousePos, TranslateMode);
      result = 1;
      break;
    case 4:
    case 5:
    case 6:
    case 7:
      MiniHouseIndoor::PickedObjMove(this, MousePos, TranslateMode);
      goto LABEL_4;
    default:
LABEL_4:
      result = 1;
      break;
  }
  return result;
}

//----- (006C23E0) --------------------------------------------------------
void __thiscall MiniHouseIndoor::ClearScene(MiniHouseIndoor *this)
{
  MiniHouseIndoor *v1; // esi@1
  NiNode *v2; // eax@1
  NiNode *v3; // edi@2
  NiNode *v4; // eax@7
  NiNode *v5; // edi@8
  NiNode *v6; // esi@13

  v1 = this;
  v2 = this->m_spNormalScene.m_pObject;
  if ( v2 )
  {
    NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v2->m_kChildren);
    v3 = v1->m_spNormalScene.m_pObject;
    if ( v3 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      v1->m_spNormalScene.m_pObject = 0;
    }
  }
  v4 = v1->m_spAbStateEffScene.m_pObject;
  if ( v4 )
  {
    NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v4->m_kChildren);
    v5 = v1->m_spAbStateEffScene.m_pObject;
    if ( v5 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      v1->m_spAbStateEffScene.m_pObject = 0;
    }
  }
  NiCollisionGroup::RemoveAll(&v1->m_ManagerMediator.m_CollisionManager.m_pkCollisionGroup);
  v6 = v1->m_spRootScene.m_pObject;
  if ( v6 )
    NiTArray<NiPointer<NiNode>>::RemoveAll((NiTArray<NiPointer<NiGeometry> > *)&v6->m_kChildren);
}

//----- (006C2490) --------------------------------------------------------
void __thiscall MiniHouseIndoor::StartMHCharEmotion(MiniHouseIndoor *this, NiPoint3 *kGroundPos, unsigned int uiPos, int ActionIndex)
{
  MiniHouseIndoor *v4; // edi@1
  const char *v5; // eax@1
  mhObject *v6; // ebx@2
  PgFrameWork *v7; // eax@2
  mhObject *v8; // eax@2
  int v9; // esi@7
  int *v10; // eax@9
  int v11; // eax@10
  MiniHouseFurniture *v12; // esi@11
  int v13; // ebx@12
  MHEmotion *v14; // eax@12
  MHEmotion *v15; // eax@12
  const char *v16; // eax@12
  int v17; // [sp+8h] [bp-4h]@7
  int v18; // [sp+8h] [bp-4h]@11

  v4 = this;
  v5 = fs("--ACTPOS%d-- TARID %d\n", this->m_mhCharEmotionInfo.ActPos, this->m_mhCharEmotionInfo.TargetObjID);
  OutputDebugStringA(v5);
  if ( ((int (*)(void))g_pkMainChar->vfptr[13].DeleteAbStateByAbstateIndex)() == 4 )
  {
    v6 = mhObjectManager::GetObjectA(&v4->m_ManagerMediator.m_ObjManager, v4->m_mhCharEmotionInfo.TargetObjID);
    v7 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v8 = mhObjectManager::GetObjectA(&stru_A993C8, *(_WORD *)(v7[29].m_kMsgQ.m_uiTail + 510));
    if ( v8 && v6->m_iGUID != v8->m_iGUID )
      v6 = v8;
  }
  else
  {
    v6 = v4->m_FocusObj.m_Object;
  }
  if ( v6 )
  {
    MainChar::SetReserveAct((MainChar *)g_pkMainChar, RESERVEACT_MH_CHAR_EMOTION);
    v9 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    v17 = v6->m_iResGUID;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v6->m_iResGUID) )
    {
      if ( (unsigned __int16)v17 <= *(_WORD *)(v9 + 200) )
      {
        v10 = (int *)(*(_DWORD *)(v9 + 196) + 4 * (unsigned __int16)v17);
        if ( *v10 )
        {
          v11 = *v10;
          if ( v11 )
          {
            v18 = v11 + 2;
            v12 = MiniHouseFuritureInfoTab::GetObjByName((char *)(v11 + 2));
            if ( v12 )
            {
              v13 = v6->m_iGUID;
              v14 = MiniHouseEmotionTab::GetEmotion(v12->MHEmotionID, ActionIndex);
              MiniHouseIndoor::SetCharEmotion(v4, v13, uiPos, v14);
              v15 = MiniHouseEmotionTab::GetEmotion(v12->MHEmotionID, ActionIndex);
              v16 = fs("====%s.%d.%d°¡±¸: %d ¿¡¼­ µ¿ÀÛÀ» ÇÏ°ÔµÊ", v18, v15->ActionViewInfo, v15->ActionIndex, uiPos);
              OutputDebugStringA(v16);
            }
          }
        }
      }
    }
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (006C2600) --------------------------------------------------------
char __thiscall MiniHouseIndoor::GetEmptyOfObjSeat(MiniHouseIndoor *this, unsigned __int16 mhObj, unsigned __int16 CharhWnd, char WantedActPos)
{
  mhObject *v4; // eax@1
  mhObject *v5; // esi@1
  char result; // al@2
  ItemInfo *v7; // eax@6
  MiniHouseFurniture *v8; // eax@8
  MiniHouseFurniture *v9; // edi@8
  char v10; // al@9
  int v11; // ebx@10

  v4 = mhObjectManager::GetObjectA(&this->m_ManagerMediator.m_ObjManager, mhObj);
  v5 = v4;
  if ( v4 )
  {
    if ( mhObject::IsEmptyOfObjSeat(v4, WantedActPos) != 1 && mhObject::WhoUseIt(v5, WantedActPos) != CharhWnd )
    {
      v7 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(v5->m_iResGUID);
      if ( v7 )
      {
        v8 = MiniHouseFuritureInfoTab::GetObjByName(v7->InxName);
        v9 = v8;
        if ( v8 && (v10 = v8->MaxSlot) != 0 && (v11 = 0, v10) )
        {
          while ( mhObject::IsEmptyOfObjSeat(v5, v11) != 1 )
          {
            if ( ++v11 >= v9->MaxSlot )
              goto LABEL_13;
          }
          result = v11;
        }
        else
        {
LABEL_13:
          result = -1;
        }
      }
      else
      {
        result = -1;
      }
    }
    else
    {
      result = WantedActPos;
    }
  }
  else
  {
    result = -1;
  }
  return result;
}

//----- (006C26B0) --------------------------------------------------------
void __thiscall MiniHouseIndoor::AttachFocusEff(MiniHouseIndoor *this, NiNode *pkTarget)
{
  MiniHouseIndoor *v2; // edi@1
  NiVBChip *v3; // esi@1
  NiTListItem<NiGeometry *> *v4; // ebx@5
  NiAVObject *v5; // ecx@6
  NiProperty *v6; // edi@6
  NiVBChip *v7; // eax@7
  NiVBChip *v8; // eax@8
  NiVBChip *v9; // ecx@9
  PgTList<NiGeometry *> kList; // [sp+20h] [bp-28h]@5
  NiVBChip *element; // [sp+30h] [bp-18h]@7
  NiTexturingProperty *pkOrgTextureProp; // [sp+34h] [bp-14h]@3
  NiGeometry *pkGeom; // [sp+38h] [bp-10h]@2
  int v14; // [sp+44h] [bp-4h]@5

  v2 = this;
  v3 = 0;
  if ( pkTarget )
  {
    if ( PgUtil::CatchGeometry((NiAVObject *)&this->m_spFocusObjEff.m_pObject->vfptr, &pkGeom) )
    {
      pkOrgTextureProp = (NiTexturingProperty *)NiAVObject::GetProperty((NiAVObject *)&pkGeom->vfptr, 8);
      if ( pkOrgTextureProp )
      {
        if ( ((int (__stdcall *)(const char *))v2->m_spFocusObjEff.m_pObject->vfptr[18].__vecDelDtor)("EffectNode") )
        {
          kList.m_kAllocator.m_uiCount = 0;
          kList.m_pkHead = 0;
          kList.m_pkTail = 0;
          kList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,NiGeometry *>Vtbl *)&PgTList<NiGeometry *>::`vftable';
          v14 = 0;
          MiniHouseIndoor::CatchAllGeometry(v2, (NiAVObject *)&pkTarget->vfptr, &kList);
          v4 = kList.m_pkHead;
          if ( kList.m_pkHead )
          {
            do
            {
              v5 = (NiAVObject *)&v4->m_element->vfptr;
              v4 = v4->m_pkNext;
              v6 = NiAVObject::GetProperty(v5, 8);
              if ( v6 )
              {
                v7 = (NiVBChip *)operator new(0x18u);
                element = v7;
                LOBYTE(v14) = 1;
                if ( v7 )
                {
                  NiTexturingProperty::Map::Map((NiTexturingProperty::Map *)v7, pkOrgTextureProp->m_kMaps.m_pBase[4]);
                  v3 = v8;
                }
                v9 = (NiVBChip *)LODWORD(v6[1].m_spControllers.m_pObject->m_fPhase);
                LOBYTE(v14) = 0;
                element = v3;
                if ( v3 != v9 )
                {
                  if ( v9 )
                    (*(void (__stdcall **)(signed int))v9->m_uiIndex)(1);
                  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)&v6[1].m_pcName, 4u, &element);
                }
                NiTexturingProperty::SetMultiTexture((NiTexturingProperty *)v6, (NiTexturingProperty::Map *)v3);
                v3 = 0;
              }
            }
            while ( v4 );
          }
          NiAVObject::Update((NiAVObject *)&pkTarget->vfptr, 0.0, 1);
          NiAVObject::UpdateProperties((NiAVObject *)&pkTarget->vfptr);
          v14 = -1;
          PgTList<NiGeometry *>::~PgTList<NiGeometry *>(&kList);
        }
      }
    }
  }
}
// 9BA2CC: using guessed type int (__thiscall *PgTList<NiGeometry *>::`vftable')(void *p, char);

//----- (006C2810) --------------------------------------------------------
signed int __thiscall MiniHouseIndoor::ClearUI(MiniHouseIndoor *this)
{
  MiniHouseIndoor *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<enum mhUIID,PgWinFrame *,std::less<enum mhUIID>,std::allocator<std::pair<enum mhUIID const ,PgWinFrame *> >,0> >::_Node *v2; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v3; // eax@1
  MsgBox *v4; // edi@4
  MsgBox *v5; // edi@10
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > result; // [sp+8h] [bp-4h]@2

  v1 = this;
  v2 = this->m_mapUIGroup._Myhead;
  v3 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v2->_Left;
  if ( v2->_Left != v2 )
  {
    do
      v3 = std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
             (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)&v1->m_mapUIGroup,
             &result,
             (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > >)v3)->_Ptr;
    while ( v3 != (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v1->m_mapUIGroup._Myhead );
  }
  if ( v1->m_spMsgBox.m_pObject )
  {
    v4 = v1->m_spMsgBox.m_pObject;
    if ( v4 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      v1->m_spMsgBox.m_pObject = 0;
    }
  }
  if ( v1->m_spObjEffMsg.m_pObject )
  {
    v5 = v1->m_spObjEffMsg.m_pObject;
    if ( v5 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      v1->m_spObjEffMsg.m_pObject = 0;
    }
  }
  OutputDebugStringA("CLEAR UImap OK\n");
  return 1;
}

//----- (006C28D0) --------------------------------------------------------
char __stdcall MiniHouseIndoor::DetachAlphaProp(NiNode *pDest)
{
  char result; // al@2
  NiProperty *v3; // eax@3

  if ( pDest )
  {
    v3 = NiAVObject::GetProperty((NiAVObject *)&pDest->vfptr, 0);
    if ( v3 )
    {
      NiAVObject::DetachProperty((NiAVObject *)&pDest->vfptr, v3);
      NiAVObject::UpdateProperties((NiAVObject *)&pDest->vfptr);
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006C2910) --------------------------------------------------------
NiAVObject *__thiscall MiniHouseIndoor::AddScene(MiniHouseIndoor *this, NiAVObject *spNode, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *ClonedRootName, mhObjSceneType Dest, bool bClone)
{
  MiniHouseIndoor *v5; // ebx@1
  NiAVObject *v6; // esi@1
  NiAVObject *result; // eax@2
  NiNode *v8; // eax@3
  void *v9; // edi@5
  const char *v10; // eax@7
  NiNode *v11; // ecx@14
  NiProperty *v12; // eax@16

  v5 = this;
  v6 = spNode;
  if ( !spNode )
    goto LABEL_21;
  v8 = (NiNode *)operator new(0xE8u);
  if ( v8 )
    NiNode::NiNode(v8, 0);
  v9 = ClonedRootName;
  if ( bClone == 1 )
  {
    v6 = (NiAVObject *)NiObject::Clone((NiObject *)&spNode->vfptr);
    if ( ClonedRootName->_Myres < 0x10 )
      v10 = (const char *)ClonedRootName;
    else
      v10 = ClonedRootName->_Bx._Ptr;
    NiObjectNET::SetName((NiObjectNET *)&v6->vfptr, v10);
    NiNode::DetachAllEffects((NiNode *)v6);
    NiAVObject::UpdateEffects(v6);
  }
  if ( v6 )
  {
    if ( ClonedRootName->_Myres >= 0x10 )
      v9 = ClonedRootName->_Bx._Ptr;
    v6->vfptr[18].__vecDelDtor((NiRefObject *)v6, (unsigned int)v9);
    if ( Dest == 1 )
      v11 = v5->m_spAbStateEffScene.m_pObject;
    else
      v11 = v5->m_spNormalScene.m_pObject;
    ((void (__cdecl *)(NiAVObject *))v11->vfptr[29].__vecDelDtor)(v6);
    NiAVObject::Update((NiAVObject *)&v5->m_spAbStateEffScene.m_pObject->vfptr, 0.0, 1);
    v12 = NiAVObject::GetProperty(v6, 0);
    if ( v12 )
    {
      NiAVObject::DetachProperty(v6, v12);
      NiAVObject::UpdateProperties(v6);
    }
    result = v6;
  }
  else
  {
LABEL_21:
    result = 0;
  }
  return result;
}

//----- (006C2A30) --------------------------------------------------------
signed int __thiscall MiniHouseIndoor::DelCharLev(MiniHouseIndoor *this, unsigned __int16 CharhWnd)
{
  MiniHouseIndoor *v2; // esi@1
  signed int result; // eax@2
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > > itResult; // [sp+8h] [bp-4h]@1

  v2 = this;
  std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned char>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > *)&this->m_mapCharLev.comp,
    &itResult,
    &CharhWnd);
  if ( itResult._Ptr == v2->m_mapCharLev._Myhead )
  {
    result = 8;
  }
  else
  {
    std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0>>::erase(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v2->m_mapCharLev,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *)&CharhWnd,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >)itResult._Ptr);
    result = 1;
  }
  return result;
}

//----- (006C2A80) --------------------------------------------------------
char __stdcall MiniHouseIndoor::AttachAlphaProp(NiNode *pDest)
{
  char result; // al@2
  NiProperty *v3; // eax@3
  NiObjectNET *v4; // eax@5
  NiObjectNET *v5; // esi@5

  if ( pDest )
  {
    v3 = NiAVObject::GetProperty((NiAVObject *)&pDest->vfptr, 0);
    if ( v3 )
    {
      NiAVObject::DetachProperty((NiAVObject *)&pDest->vfptr, v3);
      NiAVObject::UpdateProperties((NiAVObject *)&pDest->vfptr);
    }
    v4 = (NiObjectNET *)operator new(0x20u);
    v5 = v4;
    if ( v4 )
    {
      NiObjectNET::NiObjectNET(v4);
      v5->vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
      LOWORD(v5[1].vfptr) = 236;
      BYTE2(v5[1].vfptr) = 0;
    }
    else
    {
      v5 = 0;
    }
    LOWORD(v5[1].vfptr) = (unsigned int)v5[1].vfptr & 0xFA43 | 0x1A43;
    BYTE2(v5[1].vfptr) = 9;
    NiAVObject::AttachProperty((NiAVObject *)&pDest->vfptr, (NiProperty *)v5);
    NiAVObject::UpdateProperties((NiAVObject *)&pDest->vfptr);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);

//----- (006C2B60) --------------------------------------------------------
void __thiscall MiniHouseIndoor::SetForceAlphaState(MiniHouseIndoor *this, mhObject *pObj, bool bAlphaMode)
{
  MiniHouseIndoor *v3; // edi@1
  ResElement *v4; // ecx@2
  NiActorManager *v5; // eax@4
  NiNode *v6; // eax@5
  NiActorManager *v7; // eax@10
  int v8; // esi@14
  NiNode *v9; // eax@16

  v3 = this;
  if ( pObj )
  {
    v4 = pObj->m_pkResource;
    if ( v4 )
    {
      if ( v4->m_bIsCanAnimation && (v5 = v4->m_pActorMgr.m_pObject) != 0 )
        v6 = (NiNode *)v5->m_spNIFRoot.m_pObject;
      else
        v6 = v4->m_pNiNode.m_pObject;
      if ( v6 )
      {
        if ( bAlphaMode == 1 )
        {
          if ( v4->m_bIsCanAnimation && (v7 = v4->m_pActorMgr.m_pObject) != 0 )
            MiniHouseIndoor::AttachAlphaProp((NiNode *)v7->m_spNIFRoot.m_pObject);
          else
            MiniHouseIndoor::AttachAlphaProp(v4->m_pNiNode.m_pObject);
        }
        else
        {
          if ( v3->m_PickedObj )
          {
            v8 = v3->m_iReturnToInvItemID;
            if ( MiniHouseIndoor::GetPickedObjID(v3) == v8 )
              return;
            v4 = pObj->m_pkResource;
          }
          v9 = ResElement::GetNiNode(v4);
          MiniHouseIndoor::DetachAlphaProp(v9);
        }
      }
    }
  }
}

//----- (006C2C00) --------------------------------------------------------
void __thiscall MiniHouseIndoor::SetPopUpMHItemInvState(MiniHouseIndoor *this, bool b)
{
  MiniHouseIndoor *v2; // esi@1
  mhObject *v3; // eax@3

  v2 = this;
  if ( this->m_bAskReturnToInvState != b )
  {
    this->m_bAskReturnToInvState = b;
    if ( this->m_iReturnToInvItemID != -1 )
    {
      v3 = mhObjectManager::GetObjectA(&this->m_ManagerMediator.m_ObjManager, this->m_iReturnToInvItemID);
      MiniHouseIndoor::SetForceAlphaState(v2, v3, v2->m_bAskReturnToInvState);
    }
  }
}

//----- (006C2C40) --------------------------------------------------------
void __thiscall MiniHouseIndoor::SetRepairObjID(MiniHouseIndoor *this, unsigned __int16 ID)
{
  MiniHouseIndoor *v2; // esi@1
  mhObject *v3; // edi@2
  mhObject *v4; // ebx@2
  ResElement *v5; // eax@3
  NiActorManager *v6; // ecx@4
  NiAVObject *v7; // eax@5
  ResElement *v8; // eax@9
  NiActorManager *v9; // ecx@10
  NiNode *v10; // eax@11
  void (__thiscall ***v11)(_DWORD, _DWORD); // edi@14

  v2 = this;
  if ( this->m_RepairObjID != ID )
  {
    v3 = mhObjectManager::GetObjectA(&this->m_ManagerMediator.m_ObjManager, ID);
    v4 = mhObjectManager::GetObjectA(&v2->m_ManagerMediator.m_ObjManager, v2->m_RepairObjID);
    v2->m_RepairObjID = ID;
    if ( v3 )
    {
      MiniHouseIndoor::RemoveObjScene(v2, (int)v2, v3);
      v5 = v3->m_pkResource;
      if ( v5->m_bIsCanAnimation && (v6 = v5->m_pActorMgr.m_pObject) != 0 )
        v7 = v6->m_spNIFRoot.m_pObject;
      else
        v7 = (NiAVObject *)&v5->m_pNiNode.m_pObject->vfptr;
      MiniHouseIndoor::AddScene(v2, v7, &v3->m_RootName, MH_OBJSCENE_ABSTATE, 0);
    }
    if ( v4 )
    {
      v8 = v4->m_pkResource;
      if ( v8->m_bIsCanAnimation && (v9 = v8->m_pActorMgr.m_pObject) != 0 )
        v10 = (NiNode *)v9->m_spNIFRoot.m_pObject;
      else
        v10 = v8->m_pNiNode.m_pObject;
      ((void (__stdcall *)(unsigned __int16 *, NiNode *))v2->m_spAbStateEffScene.m_pObject->vfptr[30].__vecDelDtor)(
        &ID,
        v10);
      if ( ID )
      {
        v11 = (void (__thiscall ***)(_DWORD, _DWORD))ID;
        if ( !InterlockedDecrement((volatile LONG *)(ID + 4)) )
        {
          if ( v11 )
            (**v11)(v11, 1);
        }
      }
      MiniHouseIndoor::AttachObjToScene(v2, v4->m_iGUID, 0);
    }
  }
}

//----- (006C2D20) --------------------------------------------------------
signed int __thiscall MiniHouseIndoor::MakeCharColiNode(MiniHouseIndoor *this, NiNode *CharRootNode, mhCollisionType ColiStyle, float Radius)
{
  NiBoundingVolume *v4; // edi@1
  MiniHouseIndoor *v5; // esi@1
  signed int result; // eax@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v7; // eax@3
  NiBoundingVolume *v8; // eax@9
  NiNode *v9; // eax@10
  NiNode *v10; // esi@10
  NiBoundingVolume *v11; // eax@14
  NiBoundingVolume *v12; // eax@15
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v13; // eax@17
  float v14; // eax@19
  float v15; // ecx@19
  float v16; // edx@19
  float v17; // eax@19
  float v18; // ecx@19
  NiCollisionData *v19; // eax@19
  int v20; // eax@20
  int v21; // edi@20
  float v22; // eax@22
  NiNode *v23; // [sp+8h] [bp-78h]@22
  float fRadius; // [sp+Ch] [bp-74h]@22
  unsigned int v25; // [sp+10h] [bp-70h]@19
  NiPointer<NiNode> Parent; // [sp+24h] [bp-5Ch]@7
  NiPointer<NiNode> CharNode; // [sp+28h] [bp-58h]@12
  float v28; // [sp+2Ch] [bp-54h]@7
  float v29; // [sp+30h] [bp-50h]@7
  float v30; // [sp+34h] [bp-4Ch]@7
  mhCollisionManager *v31; // [sp+38h] [bp-48h]@7
  float v32; // [sp+3Ch] [bp-44h]@7
  float v33; // [sp+40h] [bp-40h]@7
  float v34; // [sp+44h] [bp-3Ch]@7
  _DWORD *v35; // [sp+48h] [bp-38h]@19
  int v36; // [sp+4Ch] [bp-34h]@7
  NiBoundingVolume *pkBV; // [sp+50h] [bp-30h]@9
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > ColliNodeName; // [sp+54h] [bp-2Ch]@22
  int v39; // [sp+7Ch] [bp-4h]@9

  v4 = 0;
  v5 = this;
  if ( CharRootNode )
  {
    v7 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)mhCharColliNodeName_0._Bx._Ptr;
    if ( mhCharColliNodeName_0._Myres < 0x10 )
      v7 = &mhCharColliNodeName_0;
    if ( !(int)CharRootNode->vfptr[18].__vecDelDtor((NiRefObject *)CharRootNode, (unsigned int)v7) || ColiStyle )
    {
      v32 = 0.0;
      Parent.m_pObject = CharRootNode;
      v33 = 0.0;
      v31 = &v5->m_ManagerMediator.m_CollisionManager;
      v34 = 0.0;
      v36 = 2;
      v28 = 0.0;
      v29 = 0.0;
      v30 = Radius + 23.0;
      while ( 1 )
      {
        v8 = (NiBoundingVolume *)operator new(0xE8u);
        pkBV = v8;
        v39 = 0;
        if ( v8 )
        {
          NiNode::NiNode((NiNode *)v8, 0);
          v10 = v9;
        }
        else
        {
          v10 = 0;
        }
        CharNode.m_pObject = v10;
        if ( v10 )
          InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
        v39 = 1;
        v11 = (NiBoundingVolume *)operator new(0x14u);
        pkBV = v11;
        LOBYTE(v39) = 2;
        if ( v11 )
        {
          NiSphereBV::NiSphereBV((NiSphereBV *)v11, 1.0, &NiPoint3::ZERO);
          v4 = v12;
          pkBV = v12;
        }
        else
        {
          pkBV = 0;
        }
        InterlockedIncrement((volatile LONG *)&CharRootNode->m_uiRefCount);
        v13 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)mhCharColliNodeName_0._Bx._Ptr;
        LOBYTE(v39) = 3;
        if ( mhCharColliNodeName_0._Myres < 0x10 )
          v13 = &mhCharColliNodeName_0;
        NiObjectNET::SetName((NiObjectNET *)&v10->vfptr, v13->_Bx._Buf);
        v14 = v33;
        v15 = v34;
        v10->m_kLocal.m_Translate.x = v32;
        v16 = v28;
        v10->m_kLocal.m_Translate.y = v14;
        v17 = v29;
        v10->m_kLocal.m_Translate.z = v15;
        *(float *)&v4[4].vfptr = Radius;
        v18 = v30;
        *(float *)&v4[1].vfptr = v16;
        *(float *)&v4[2].vfptr = v17;
        v25 = 80;
        *(float *)&v4[3].vfptr = v18;
        v19 = (NiCollisionData *)operator new(v25);
        v35 = v19;
        LOBYTE(v39) = 4;
        if ( v19 )
        {
          NiCollisionData::NiCollisionData(v19, (NiAVObject *)&v10->vfptr);
          v21 = v20;
        }
        else
        {
          v21 = 0;
        }
        LOBYTE(v39) = 3;
        NiCollisionData::SetModelSpaceABV((NiCollisionData *)v21, pkBV);
        v22 = *(float *)(v21 + 8);
        v25 = 2;
        fRadius = v22;
        *(_DWORD *)(v21 + 36) = 3;
        *(_DWORD *)(v21 + 40) = 2;
        NiCollisionData::SetPrecacheAttributes((NiAVObject *)LODWORD(fRadius), (NiCollisionData::CollisionMode)v25);
        (*(void (__thiscall **)(int))(*(_DWORD *)v21 + 64))(v21);
        NiAVObject::SetCollisionObject((NiAVObject *)&v10->vfptr, (NiCollisionObject *)v21);
        NiAVObject::Update((NiAVObject *)&v10->vfptr, 0.0, 1);
        ((void (__thiscall *)(NiNode *))v10->vfptr[16].__vecDelDtor)(v10);
        NiAVObject::UpdateProperties((NiAVObject *)&v10->vfptr);
        ((void (__thiscall *)(NiNode *, NiNode *, _DWORD))CharRootNode->vfptr[29].__vecDelDtor)(CharRootNode, v10, 0);
        NiAVObject::Update((NiAVObject *)&CharRootNode->vfptr, 0.0, 1);
        ((void (__thiscall *)(NiNode *))CharRootNode->vfptr[16].__vecDelDtor)(CharRootNode);
        NiAVObject::UpdateProperties((NiAVObject *)&CharRootNode->vfptr);
        v25 = ColiStyle;
        ColliNodeName._Myres = 15;
        ColliNodeName._Mysize = 0;
        ColliNodeName._Bx._Buf[0] = 0;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &ColliNodeName,
          &mhCharColliNodeName_0,
          0,
          0xFFFFFFFF);
        fRadius = COERCE_FLOAT(&ColliNodeName);
        v35 = &v23;
        LOBYTE(v39) = 5;
        v23 = CharRootNode;
        InterlockedIncrement((volatile LONG *)&CharRootNode->m_uiRefCount);
        mhCollisionManager::AddColliData(
          v31,
          (NiPointer<NiNode>)v23,
          (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)LODWORD(fRadius),
          (mhCollisionType)v25);
        if ( ColliNodeName._Myres >= 0x10 )
          operator delete(ColliNodeName._Bx._Ptr);
        ColliNodeName._Myres = 15;
        ColliNodeName._Mysize = 0;
        ColliNodeName._Bx._Buf[0] = 0;
        LOBYTE(v39) = 1;
        if ( !InterlockedDecrement((volatile LONG *)&CharRootNode->m_uiRefCount) )
          CharRootNode->vfptr->__vecDelDtor((NiRefObject *)CharRootNode, 1u);
        v39 = -1;
        if ( !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) )
          v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
        if ( !--v36 )
          break;
        v4 = 0;
      }
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006C3000) --------------------------------------------------------
Char *__thiscall MiniHouseIndoor::DelJoinCharInfo(MiniHouseIndoor *this, unsigned __int16 CharhWnd)
{
  unsigned __int16 v2; // bx@1
  MiniHouseIndoor *v3; // esi@1
  Char *v4; // eax@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > > result; // [sp+Ch] [bp-4h]@1

  v2 = CharhWnd;
  v3 = this;
  *(_DWORD *)&CharhWnd = CharhWnd;
  std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned char>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > *)&this->m_mapCharLev.comp,
    &result,
    &CharhWnd);
  if ( result._Ptr != v3->m_mapCharLev._Myhead )
    std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0>>::erase(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v3->m_mapCharLev,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *)&CharhWnd,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >)result._Ptr);
  v4 = CharMgr::GetChar(&g_kCharMgr, v2);
  if ( v4 )
    v4 = (Char *)MiniHouseIndoor::DelCharColiNode(v3, v4->m_spScene.m_pObject);
  return v4;
}

//----- (006C3070) --------------------------------------------------------
signed int __thiscall MiniHouseIndoor::AddUI(MiniHouseIndoor *this, mhUIID AddID, PgWinFrame *AddWinFrame)
{
  MiniHouseIndoor *v3; // edi@1
  signed int v4; // eax@2
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v5; // eax@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum mhUIID,PgWinFrame *,std::less<enum mhUIID>,std::allocator<std::pair<enum mhUIID const ,PgWinFrame *> >,0> > > it; // [sp+8h] [bp-8h]@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > result; // [sp+Ch] [bp-4h]@1

  v3 = this;
  std::_Tree<std::_Tmap_traits<enum  MHE_STEP,ResElement *,std::less<enum  MHE_STEP>,std::allocator<std::pair<enum  MHE_STEP const,ResElement *>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *)&this->m_mapUIGroup,
    &result,
    (OscTarget *)&AddID);
  if ( result._Ptr == (std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *)v3->m_mapUIGroup._Myhead )
  {
    result._Ptr = (std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *)AddWinFrame;
    it._Ptr = (std::_Tree_nod<std::_Tmap_traits<enum mhUIID,PgWinFrame *,std::less<enum mhUIID>,std::allocator<std::pair<enum mhUIID const ,PgWinFrame *> >,0> >::_Node *)AddID;
    v5 = std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(
           (std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v3->m_mapUIGroup,
           (std::pair<int const ,int> *)&it);
    std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::_Linsert(
      (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v3->m_mapUIGroup,
      (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > >,bool> *)&it,
      v5,
      0);
    if ( LOBYTE(result._Ptr) )
    {
      OutputDebugStringA("Insert UImap OK\n");
      v4 = 1;
    }
    else
    {
      v4 = 0;
    }
  }
  else
  {
    v4 = 5;
  }
  return v4;
}

//----- (006C3100) --------------------------------------------------------
mhReturnType __thiscall MiniHouseIndoor::AddCharLev(MiniHouseIndoor *this, int CharhWnd, char Level)
{
  std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *v4; // eax@1
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > >,bool> pairResult; // [sp+4h] [bp-8h]@1

  v3 = (std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > *)&this->m_mapCharLev.comp;
  BYTE2(CharhWnd) = Level;
  v4 = std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned char>>,0>>::_Buynode<std::pair<unsigned short const,unsigned char>>(
         (std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > *)&this->m_mapCharLev.comp,
         (std::pair<unsigned short const ,unsigned char> *)&CharhWnd);
  std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned char>>,0>>::_Linsert(
    v3,
    &pairResult,
    v4,
    0);
  return pairResult.second != 0;
}

//----- (006C3150) --------------------------------------------------------
void __thiscall MiniHouseIndoor::ActMHEmotion(MiniHouseIndoor *this, FURNITURE_EMOTION_INFO *ActionInfo)
{
  unsigned __int16 v2; // ax@1
  Char *v3; // eax@1
  Char *v4; // ebx@1
  mhObject *v5; // eax@3
  mhObject *v6; // edi@3
  ItemInfo *v7; // eax@4
  MiniHouseFurniture *v8; // eax@5
  int v9; // ecx@7
  NiNode *v10; // eax@7
  void *v11; // ecx@7
  int v12; // esi@9
  mhGameMainConnectMgr *v13; // ecx@10
  AbStateInfectee::AbstateColor (__thiscall *v14)(AbStateInfectee *); // eax@14
  ResElement *v15; // ecx@14
  NiNode *v16; // eax@14
  NiPoint3 *v17; // eax@14
  NiNode *v18; // eax@14
  NiMatrix3 *v19; // esi@14
  MHEmotion *v20; // eax@14
  NiPoint3 result; // [sp+24h] [bp-ECh]@14
  float v22; // [sp+30h] [bp-E0h]@14
  float v23; // [sp+34h] [bp-DCh]@14
  float v24; // [sp+38h] [bp-D8h]@14
  float fX; // [sp+3Ch] [bp-D4h]@14
  int v26; // [sp+40h] [bp-D0h]@10
  mhObject *pkObj; // [sp+44h] [bp-CCh]@3
  MiniHouseFurniture *pkFur; // [sp+48h] [bp-C8h]@5
  MiniHouseIndoor *v29; // [sp+4Ch] [bp-C4h]@1
  float fY; // [sp+50h] [bp-C0h]@14
  float fZ; // [sp+54h] [bp-BCh]@14
  MHEmotion *pkEmotion; // [sp+58h] [bp-B8h]@6
  NiPoint3 kCharPos; // [sp+5Ch] [bp-B4h]@12
  float fangle; // [sp+68h] [bp-A8h]@14
  NiPoint3 TargetDir; // [sp+6Ch] [bp-A4h]@14
  NiMatrix3 v36; // [sp+78h] [bp-98h]@14
  NiMatrix3 mat3ObjRot; // [sp+9Ch] [bp-74h]@14
  NiMatrix3 mat3Rot; // [sp+C0h] [bp-50h]@14
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > ActPos; // [sp+E4h] [bp-2Ch]@7
  int v40; // [sp+10Ch] [bp-4h]@7

  v2 = ActionInfo->nPlayerHandle;
  v29 = this;
  v3 = CharMgr::GetChar(&g_kCharMgr, v2);
  v4 = v3;
  if ( v3 )
  {
    if ( v3->m_spScene.m_pObject )
    {
      v5 = mhObjectManager::GetObjectA(&stru_A993C8, ActionInfo->nFurnitureHnd);
      v6 = v5;
      pkObj = v5;
      if ( v5 )
      {
        v7 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(v5->m_iResGUID);
        if ( v7 )
        {
          v8 = MiniHouseFuritureInfoTab::GetObjByName(v7->InxName);
          pkFur = v8;
          if ( v8 )
          {
            pkEmotion = MiniHouseEmotionTab::GetEmotion(v8->MHEmotionID, ActionInfo->nEmotionNo);
            if ( pkEmotion )
            {
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
                &ActPos,
                "ActPos");
              v9 = ActionInfo->nPosition;
              v40 = 0;
              mhMiscUtil::MakeNodeNameNum(&ActPos, v9, 2);
              v10 = ResElement::GetNiNode(v6->m_pkResource);
              v11 = ActPos._Bx._Ptr;
              if ( ActPos._Myres < 0x10 )
                v11 = &ActPos;
              v12 = (int)v10->vfptr[18].__vecDelDtor((NiRefObject *)v10, (unsigned int)v11);
              if ( v12 )
              {
                v26 = v4->m_kHandle;
                v13 = v29->m_GameMainConnectMgr;
                if ( (_WORD)v26 != mhGameMainConnectMgr::GetMainChar()->m_kHandle )
                  ((void (__thiscall *)(Char *))v4->vfptr[10].Deaffect)(v4);
                kCharPos.x = *(float *)(v12 + 140);
                kCharPos.y = *(float *)(v12 + 144);
                kCharPos.z = *(float *)(v12 + 148);
                if ( pkFur->WALL )
                  World::GetAdvGroundPos(&g_kWorld, kCharPos.x, kCharPos.y, &kCharPos);
                v14 = v4->vfptr[5].GetAbstateColor;
                v22 = 1.0;
                v23 = 1.0;
                v24 = 1.0;
                ((void (__thiscall *)(Char *, NiPoint3 *, float *))v14)(v4, &kCharPos, &v22);
                v15 = v6->m_pkResource;
                TargetDir.x = 1.0;
                TargetDir.y = -1.0;
                TargetDir.z = 1.0;
                v16 = ResElement::GetNiNode(v15);
                v17 = operator*(&result, &TargetDir, &v16->m_kLocal.m_Rotate);
                TargetDir.x = v17->x;
                TargetDir.y = v17->y;
                TargetDir.z = v17->z;
                v18 = ResElement::GetNiNode(v6->m_pkResource);
                NiMatrix3::ExtractAngleAndAxis(&v18->m_kLocal.m_Rotate, &fangle, &fX, &fY, &fZ);
                qmemcpy(&mat3ObjRot, (const void *)(v12 + 52), sizeof(mat3ObjRot));
                qmemcpy(&mat3Rot, &ResElement::GetNiNode(pkObj->m_pkResource)->m_kLocal, sizeof(mat3Rot));
                fangle = NI_PI + fangle;
                TargetDir.x = TargetDir.x * fX;
                TargetDir.y = TargetDir.y * fY;
                TargetDir.z = TargetDir.z * fZ;
                NiMatrix3::MakeRotation(&mat3Rot, fangle, &TargetDir);
                v19 = NiMatrix3::operator*(&mat3Rot, &v36, &mat3ObjRot);
                v20 = pkEmotion;
                qmemcpy(&mat3Rot, v19, sizeof(mat3Rot));
                qmemcpy(&v4->m_spScene.m_pObject->m_kLocal, &mat3Rot, 0x24u);
                Char::ActBlendAction(v4, v20->EventCode, v20->LegEventCode);
              }
              std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&ActPos);
            }
          }
        }
      }
    }
  }
}
// B622CC: using guessed type const float NI_PI;

//----- (006C34B0) --------------------------------------------------------
char __thiscall MiniHouseIndoor::ObjEffErrMsg(MiniHouseIndoor *this, unsigned __int16 nEffectHandle, unsigned __int16 err)
{
  MiniHouseFurnitureObjEffect *v3; // eax@1
  MiniHouseFurnitureObjEffect *v4; // esi@1
  __int64 v6; // kr00_8@5
  mhGameMainConnectMgr *v7; // ecx@8
  Char *v8; // eax@8
  PgFrameWork *v9; // eax@9
  unsigned int v10; // ST20_4@9
  GameFrameWork *v11; // edi@9
  char *v12; // eax@9
  const char *v13; // ST20_4@9
  mhGameMainConnectMgr *v14; // ecx@10
  Char *v15; // eax@10
  PgFrameWork *v16; // eax@11
  unsigned int v17; // ST20_4@11
  GameFrameWork *v18; // edi@11
  char *v19; // eax@11
  const char *v20; // ST20_4@11
  GameFrameWork *v21; // esi@13
  char *v22; // eax@13
  const char *v23; // ST20_4@13
  char *v24; // esi@15
  NiUnsharedGeometryGroup *v25; // eax@16
  char *v26; // esi@18
  NiUnsharedGeometryGroup *v27; // eax@19
  char *v28; // esi@21
  NiUnsharedGeometryGroup *v29; // eax@22
  char *v30; // esi@23
  NiUnsharedGeometryGroup *v31; // eax@23
  GameFrameWork *v32; // ecx@23
  MiniHouseIndoor *v33; // [sp+4h] [bp-11Ch]@1
  __int64 i64Copper; // [sp+8h] [bp-118h]@5
  __int64 i64Silver; // [sp+10h] [bp-110h]@5
  ItemInfo *pkObjInfo; // [sp+18h] [bp-108h]@3
  char tempbuf[256]; // [sp+1Ch] [bp-104h]@5

  v33 = this;
  v3 = MHFurnitureObjEffectTab::GetbyHandle(nEffectHandle);
  v4 = v3;
  if ( !v3 )
    return 0;
  pkObjInfo = 0;
  if ( v3->NeedItem[0] != 45 )
  {
    pkObjInfo = ItemInfoTab::GetByInxName(v3->NeedItem);
    if ( !pkObjInfo )
      return 0;
  }
  i64Silver = User::GetSilver(v4->NeedMoney);
  i64Copper = User::GetCopper(v4->NeedMoney);
  v6 = User::GetCopper(v4->NeedMoney);
  memset(tempbuf, 0, 0x100u);
  if ( err == 5831 )
  {
    if ( v6 )
    {
      v24 = (char *)_mbschr(tempbuf, 0);
      if ( v24 )
      {
        v25 = TextData::Get(0x47A395A3u);
        sprintf(v24, "%I64d%s", v6, v25);
      }
    }
    if ( i64Silver )
    {
      v26 = (char *)_mbschr(tempbuf, 0);
      if ( v26 )
      {
        v27 = TextData::Get(0x98B595EF);
        sprintf(v26, " %I64d%s", i64Silver, v27);
      }
    }
    if ( i64Copper )
    {
      v28 = (char *)_mbschr(tempbuf, 0);
      if ( v28 )
      {
        v29 = TextData::Get(0x88AF99F5);
        sprintf(v28, " %I64d%s ", i64Copper, v29);
      }
    }
    v30 = (char *)_mbschr(tempbuf, 0);
    v31 = TextData2::Get(0xDD18242E);
    sprintf(v30, "%s \n", v31);
    v32 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    GameFrameWork::AddSysMsg(v32, tempbuf);
    return 1;
  }
  if ( err == 5832 )
  {
    v21 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v22 = (char *)TextData2::Get(0x1A5E3B57u);
    v23 = fs(v22, pkObjInfo->Name);
    GameFrameWork::AddSysMsg(v21, v23);
    return 1;
  }
  if ( err != 5839 )
    return 0;
  v7 = v33->m_GameMainConnectMgr;
  v8 = mhGameMainConnectMgr::GetMainChar();
  if ( v4->UseRange[3] <= ((int (__thiscall *)(_DWORD))v8->vfptr[5].Deaffect)(v8) )
  {
    v14 = v33->m_GameMainConnectMgr;
    v15 = mhGameMainConnectMgr::GetMainChar();
    if ( v4->UseRange[4] < ((int (__thiscall *)(_DWORD))v15->vfptr[5].Deaffect)(v15) )
    {
      v16 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      v17 = v4->UseRange[4];
      v18 = (GameFrameWork *)v16;
      v19 = (char *)TextData2::Get(0x84D5CFDF);
      v20 = fs(v19, v17);
      GameFrameWork::AddSysMsg(v18, v20);
      return 1;
    }
    return 0;
  }
  v9 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  v10 = v4->UseRange[3];
  v11 = (GameFrameWork *)v9;
  v12 = (char *)TextData2::Get(0x91B0C2D6);
  v13 = fs(v12, v10);
  GameFrameWork::AddSysMsg(v11, v13);
  return 1;
}

//----- (006C37B0) --------------------------------------------------------
char __thiscall MiniHouseIndoor::GetCharLev(MiniHouseIndoor *this, unsigned __int16 CharhWnd)
{
  MiniHouseIndoor *v2; // esi@1
  char result; // al@2
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > > itResult; // [sp+8h] [bp-4h]@1

  v2 = this;
  std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned char>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > *)&this->m_mapCharLev.comp,
    &itResult,
    &CharhWnd);
  if ( itResult._Ptr == v2->m_mapCharLev._Myhead )
    result = 0;
  else
    result = *std::map<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned char>>>::operator[](
                &v2->m_mapCharLev,
                &CharhWnd);
  return result;
}

//----- (006C3800) --------------------------------------------------------
mhReturnType __thiscall MiniHouseIndoor::AddJoinCharInfo(MiniHouseIndoor *this, int CharhWnd, char Level)
{
  unsigned __int16 v3; // di@1
  std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *v5; // eax@1
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > >,bool> result; // [sp+8h] [bp-8h]@1

  v3 = CharhWnd;
  v4 = (std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > *)&this->m_mapCharLev.comp;
  BYTE2(CharhWnd) = Level;
  v5 = std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned char>>,0>>::_Buynode<std::pair<unsigned short const,unsigned char>>(
         (std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > *)&this->m_mapCharLev.comp,
         (std::pair<unsigned short const ,unsigned char> *)&CharhWnd);
  std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned char>>,0>>::_Linsert(
    v4,
    &result,
    v5,
    0);
  return CharMgr::GetChar(&g_kCharMgr, v3) != 0;
}

//----- (006C3850) --------------------------------------------------------
char __stdcall MiniHouseIndoor::FindNearestActPos(mhObject *mhObj, NiPoint3 *kGroundPos)
{
  char result; // al@2
  ResElement *v4; // eax@3
  NiActorManager *v5; // ecx@4
  NiNode *v6; // ecx@5
  NiActorManager *v7; // ecx@9
  NiNode *v8; // eax@10
  float v9; // ST2C_4@12
  float v10; // ST2C_4@12
  NiAVObject **v11; // edi@12
  signed int v12; // eax@12
  unsigned int v13; // ecx@13
  bool v14; // cf@14
  NiAVObject *v15; // esi@16
  float v16; // ST2C_4@17
  float v17; // ST2C_4@17
  float v18; // ST2C_4@17
  const char *v19; // ecx@18
  const char *v20; // eax@18
  int v21; // eax@22
  float kGroundLength; // [sp+10h] [bp-7Ch]@12
  float fLength; // [sp+14h] [bp-78h]@12
  char SelectPos; // [sp+18h] [bp-74h]@12
  int i; // [sp+1Ch] [bp-70h]@13
  float fleng; // [sp+20h] [bp-6Ch]@17
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > SrcName; // [sp+24h] [bp-68h]@18
  NsFindObjectByName kFindObject; // [sp+40h] [bp-4Ch]@8
  int v29; // [sp+88h] [bp-4h]@8

  if ( mhObj
    && ((v4 = mhObj->m_pkResource, !v4->m_bIsCanAnimation) || (v5 = v4->m_pActorMgr.m_pObject) == 0 ? (v6 = v4->m_pNiNode.m_pObject) : (v6 = (NiNode *)v5->m_spNIFRoot.m_pObject),
        v6) )
  {
    kFindObject.m_pCallBack = 0;
    kFindObject.m_nCurLevel = -1;
    kFindObject.vfptr = (Ns_TourSceneVtbl *)&NsFindObjectByName::`vftable';
    kFindObject.m_szName._Myres = 15;
    kFindObject.m_szName._Mysize = 0;
    kFindObject.m_szName._Bx._Buf[0] = 0;
    kFindObject.m_vecObject._Myfirst = 0;
    kFindObject.m_vecObject._Mylast = 0;
    kFindObject.m_vecObject._Myend = 0;
    v29 = 0;
    if ( v4->m_bIsCanAnimation && (v7 = v4->m_pActorMgr.m_pObject) != 0 )
      v8 = (NiNode *)v7->m_spNIFRoot.m_pObject;
    else
      v8 = v4->m_pNiNode.m_pObject;
    NsFindObjectByName::FindObject(&kFindObject, v8, "ActPos");
    fLength = 1000000.0;
    SelectPos = 0;
    v9 = kGroundPos->y * kGroundPos->y + kGroundPos->x * kGroundPos->x + kGroundPos->z * kGroundPos->z;
    v10 = sqrt(v9);
    v11 = kFindObject.m_vecObject._Myfirst;
    kGroundLength = v10;
    v12 = kFindObject.m_vecObject._Mylast - kFindObject.m_vecObject._Myfirst;
    if ( v12 )
    {
      v13 = 0;
      i = 0;
      if ( v12 > 0 )
      {
        v14 = (unsigned int)v12 > 0;
        do
        {
          if ( v14 )
          {
            v15 = v11[v13];
            if ( v15 )
            {
              v16 = v15->m_kWorld.m_Translate.y * v15->m_kWorld.m_Translate.y
                  + v15->m_kWorld.m_Translate.x * v15->m_kWorld.m_Translate.x
                  + v15->m_kWorld.m_Translate.z * v15->m_kWorld.m_Translate.z;
              v17 = sqrt(v16);
              v18 = v17 - kGroundLength;
              fleng = fabs(v18);
              if ( fLength > (double)fleng )
              {
                v19 = v15->m_pcName;
                v20 = v15->m_pcName;
                SrcName._Myres = 15;
                SrcName._Mysize = 0;
                SrcName._Bx._Buf[0] = 0;
                std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&SrcName, v19, strlen(v20));
                LOBYTE(v29) = 1;
                SelectPos = mhMiscUtil::GetNumFromNodeName(&SrcName, 6u);
                LOBYTE(v29) = 0;
                if ( SrcName._Myres >= 0x10 )
                  operator delete(SrcName._Bx._Ptr);
                v11 = kFindObject.m_vecObject._Myfirst;
                fLength = fleng;
              }
              v13 = i;
            }
          }
          ++v13;
          v21 = kFindObject.m_vecObject._Mylast - v11;
          i = v13;
          v14 = v13 < v21;
        }
        while ( (signed int)v13 < v21 );
      }
    }
    if ( v11 )
      operator delete(v11);
    kFindObject.m_vecObject._Myfirst = 0;
    kFindObject.m_vecObject._Mylast = 0;
    kFindObject.m_vecObject._Myend = 0;
    if ( kFindObject.m_szName._Myres >= 0x10 )
      operator delete(kFindObject.m_szName._Bx._Ptr);
    result = SelectPos;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9B9194: using guessed type enum Ns_TourScene::TS_RESULT (__thiscall *NsFindObjectByName::`vftable')(NsFindObjectByName *this, NiAVObject *_pkObject, void *);

//----- (006C3A80) --------------------------------------------------------
char __thiscall MiniHouseIndoor::CheckObjEffItem(MiniHouseIndoor *this, MiniHouseFurnitureObjEffect *Obj)
{
  MiniHouseIndoor *v2; // edi@1
  PgFrameWork *v3; // eax@2
  char result; // al@3

  v2 = this;
  if ( Obj->NeedItem[0] == 45
    || (v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID),
        (unsigned int)InventoryWin::FindItem((InventoryWin *)v3[19].m_BackFrameID, Obj->NeedItem) < 0xC1) )
  {
    result = 1;
  }
  else
  {
    MiniHouseIndoor::ObjEffErrMsg(v2, Obj->Handle, 0x16C8u);
    result = 0;
  }
  return result;
}

//----- (006C3AE0) --------------------------------------------------------
char __thiscall MiniHouseIndoor::CheckObjEffMoney(MiniHouseIndoor *this, MiniHouseFurnitureObjEffect *Obj)
{
  MiniHouseIndoor *v2; // ebx@1
  char result; // al@3

  v2 = this;
  if ( Obj->NeedMoney && (signed __int64)User::GetMoney(&g_kUser) < Obj->NeedMoney )
  {
    MiniHouseIndoor::ObjEffErrMsg(v2, Obj->Handle, 0x16C7u);
    result = 0;
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (006C3B40) --------------------------------------------------------
void __thiscall MiniHouseIndoor::SetObjEffMsg(MiniHouseIndoor *this, char *msg, int iResGUID, unsigned __int16 ObjID)
{
  MiniHouseIndoor *v4; // esi@1
  DWORD v5; // eax@1
  int v6; // edi@2
  int v7; // edx@2
  int *v8; // eax@4
  int v9; // eax@5
  MiniHouseFurnitureObjEffect *v10; // edi@6
  mhGameMainConnectMgr *v11; // ecx@7
  mhGameMainConnectMgr *v12; // ecx@9
  GameFrameWork *v13; // esi@10
  const char *v14; // eax@10
  NiD3DDefaultShader *v15; // eax@13
  PgFrameWork *v16; // eax@13
  Party result; // [sp+14h] [bp-1D8h]@9
  PgMsg::Frame kMsg; // [sp+1C8h] [bp-24h]@13
  int v19; // [sp+1E8h] [bp-4h]@9

  v4 = this;
  v5 = timeGetTime();
  if ( dwLastSendTime_0 + 2000 <= v5 )
  {
    v6 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    v7 = *(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    dwLastSendTime_0 = v5;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(v7 + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            iResGUID) )
    {
      if ( (unsigned __int16)iResGUID <= *(_WORD *)(v6 + 200) )
      {
        v8 = (int *)(*(_DWORD *)(v6 + 196) + 4 * (unsigned __int16)iResGUID);
        if ( *v8 )
        {
          v9 = *v8;
          if ( v9 )
          {
            v10 = MHFurnitureObjEffectTab::GetInxName((char *)(v9 + 2));
            if ( v10 )
            {
              v11 = v4->m_GameMainConnectMgr;
              mhGameMainConnectMgr::GetMainChar();
              if ( v4->m_eAccount == 2 )
              {
                if ( MiniHouseIndoor::ObjEffErrMsg(v4, v10->Handle, 0x16CFu) != 1
                  && MiniHouseIndoor::CheckObjEffMoney(v4, v10) )
                {
                  MiniHouseIndoor::ClearObjEffMsg(v4);
                  v15 = (NiD3DDefaultShader *)MsgBox::Modal(MSGBOX_OKCANCEL, msg);
                  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v4->m_spObjEffMsg, v15);
                  v4->m_ColiObjID = ObjID;
                  PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
                  kMsg.m_uiFrameMsg = 232;
                  v16 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
                  MsgBox::SetFrameWorkMsgOnClose(v4->m_spObjEffMsg.m_pObject, v16, &kMsg, 0);
                }
              }
              else if ( v10->UseRange[0] == 1 )
              {
                v12 = v4->m_GameMainConnectMgr;
                mhGameMainConnectMgr::GetMyParty(&result);
                v19 = -1;
                Party::~Party(&result);
              }
              else
              {
                v13 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
                v14 = ErrMsgTable::GetErrMsg(5835);
                GameFrameWork::AddSysMsg(v13, v14);
              }
            }
          }
        }
      }
    }
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (006C3D10) --------------------------------------------------------
void __thiscall MiniHouseIndoor::PickedCopyObjColiNode(MiniHouseIndoor *this)
{
  MiniHouseIndoor *v1; // edi@1
  int v2; // ebx@1
  NiNode *v3; // ecx@2
  void *v4; // eax@3
  NiRefObjectVtbl *v5; // edx@5
  NiObjectNET *v6; // esi@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v7; // eax@6
  const char *v8; // eax@8
  NiNode *v9; // eax@11
  NiPointer<NiNode> v10; // [sp-Ch] [bp-88h]@11
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v11; // [sp-8h] [bp-84h]@11
  mhCollisionType v12; // [sp-4h] [bp-80h]@5
  NiPointer<NiNode> *v13; // [sp+10h] [bp-6Ch]@11
  int LoadCollNodeNum; // [sp+14h] [bp-68h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+18h] [bp-64h]@6
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > CollNodeName; // [sp+34h] [bp-48h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > NewCollNodeName; // [sp+50h] [bp-2Ch]@2
  int v18; // [sp+78h] [bp-4h]@2

  v1 = this;
  v2 = 0;
  if ( this->m_PickedObj )
  {
    CollNodeName._Myres = 15;
    CollNodeName._Mysize = 0;
    CollNodeName._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &CollNodeName,
      &mhCollisionParentName_1,
      0,
      0xFFFFFFFF);
    v3 = (NiNode *)v1->m_PickedObj;
    v18 = 0;
    LoadCollNodeNum = mhMiscUtil::GetNodeMaxNum(v3, &CollNodeName);
    NewCollNodeName._Myres = 15;
    NewCollNodeName._Mysize = 0;
    NewCollNodeName._Bx._Buf[0] = 0;
    LOBYTE(v18) = 1;
    if ( LoadCollNodeNum >= 0 )
    {
      do
      {
        mhMiscUtil::MakeNodeNameNum(&CollNodeName, v2, 3);
        v4 = CollNodeName._Bx._Ptr;
        if ( CollNodeName._Myres < 0x10 )
          v4 = &CollNodeName;
        v5 = v1->m_PickedObj->vfptr;
        v12 = (mhCollisionType)v4;
        v6 = (NiObjectNET *)((int (__stdcall *)(void *))v5[18].__vecDelDtor)(v4);
        if ( v6 )
        {
          v7 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(
                 &result,
                 &mhCollisionParentNamePick_1,
                 &CollNodeName);
          LOBYTE(v18) = 2;
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&NewCollNodeName, v7);
          LOBYTE(v18) = 1;
          if ( result._Myres >= 0x10 )
            operator delete(result._Bx._Ptr);
          v8 = NewCollNodeName._Bx._Ptr;
          if ( NewCollNodeName._Myres < 0x10 )
            v8 = (const char *)&NewCollNodeName;
          NiObjectNET::SetName(v6, v8);
        }
        v9 = (NiNode *)v1->m_PickedObj;
        v12 = 1;
        v11 = &NewCollNodeName;
        v13 = &v10;
        v10.m_pObject = v9;
        if ( v9 )
          InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
        mhCollisionManager::AddColliData(&v1->m_ManagerMediator.m_CollisionManager, v10, v11, v12);
        mhMiscUtil::DelNodeNameNum(&CollNodeName, 3);
        ++v2;
      }
      while ( v2 <= LoadCollNodeNum );
      if ( NewCollNodeName._Myres >= 0x10 )
        operator delete(NewCollNodeName._Bx._Ptr);
    }
    NewCollNodeName._Myres = 15;
    NewCollNodeName._Mysize = 0;
    NewCollNodeName._Bx._Buf[0] = 0;
    if ( CollNodeName._Myres >= 0x10 )
      operator delete(CollNodeName._Bx._Ptr);
  }
}

//----- (006C3EB0) --------------------------------------------------------
void __thiscall MiniHouseIndoor::DelCopyObjColiNode(MiniHouseIndoor *this, NiNode *DelRoot, mhCollisionType ColiStyle)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // eax@1
  int v4; // edi@1
  int v5; // edi@4
  NiNode *v6; // [sp-8h] [bp-84h]@5
  mhCollisionType v7; // [sp-4h] [bp-80h]@5
  NiNode **v8; // [sp+10h] [bp-6Ch]@5
  mhCollisionManager *v9; // [sp+14h] [bp-68h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > NewCollNodeName; // [sp+18h] [bp-64h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+34h] [bp-48h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > CollNodeName; // [sp+50h] [bp-2Ch]@1
  int v13; // [sp+78h] [bp-4h]@1

  v9 = (mhCollisionManager *)this;
  CollNodeName._Myres = 15;
  CollNodeName._Mysize = 0;
  CollNodeName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &CollNodeName,
    &mhCollisionParentName_1,
    0,
    0xFFFFFFFF);
  v13 = 0;
  NewCollNodeName._Myres = 15;
  NewCollNodeName._Mysize = 0;
  NewCollNodeName._Bx._Buf[0] = 0;
  LOBYTE(v13) = 1;
  v3 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(
         &result,
         &mhCollisionParentNamePick_1,
         &CollNodeName);
  LOBYTE(v13) = 2;
  v4 = mhMiscUtil::GetNodeMaxNum(DelRoot, v3);
  LOBYTE(v13) = 1;
  if ( result._Myres >= 0x10 )
    operator delete(result._Bx._Ptr);
  if ( v4 >= 0 )
  {
    ++v9;
    v5 = v4 + 1;
    do
    {
      v7 = ColiStyle;
      v8 = &v6;
      v6 = DelRoot;
      if ( DelRoot )
        InterlockedIncrement((volatile LONG *)&DelRoot->m_uiRefCount);
      mhCollisionManager::DelColliData(v9, (NiPointer<NiNode>)v6, v7);
      --v5;
    }
    while ( v5 );
  }
  if ( CollNodeName._Myres >= 0x10 )
    operator delete(CollNodeName._Bx._Ptr);
}

//----- (006C3FB0) --------------------------------------------------------
void __thiscall MiniHouseIndoor::ObjColiAct(MiniHouseIndoor *this, mhObject *pkObj)
{
  int v2; // ebx@2
  int v3; // edi@2
  int v4; // edx@3
  int v5; // ecx@6
  int v6; // ST0C_4@9
  int v7; // ST08_4@9
  int v8; // ST04_4@9
  char *v9; // eax@9
  char *v10; // eax@9
  MiniHouseObjAni *v11; // eax@9
  MiniHouseIndoor *v12; // [sp+4h] [bp-4h]@1

  v12 = this;
  if ( pkObj )
  {
    v2 = pkObj->m_iResGUID;
    v3 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            pkObj->m_iResGUID) )
    {
      if ( (unsigned __int16)v2 <= *(_WORD *)(v3 + 200) )
      {
        v5 = *(_DWORD *)(v3 + 196);
        if ( *(_DWORD *)(v5 + 4 * (unsigned __int16)v2) )
          v4 = *(_DWORD *)(v5 + 4 * (unsigned __int16)v2);
        else
          v4 = 0;
      }
      else
      {
        v4 = 0;
      }
    }
    else
    {
      v4 = 0;
    }
    v6 = pkObj->m_iGUID;
    v7 = pkObj->m_iResGUID;
    v8 = v4 + 34;
    v9 = (char *)TextData2::Get(0x2B622382u);
    v10 = fs(v9, v8);
    MiniHouseIndoor::SetObjEffMsg(v12, v10, v7, v6);
    v11 = MiniHouseObjAniInfoTab::GetObjInfobyAniGroup(pkObj->m_iResGUID, 0xC350u, 0);
    if ( v11 )
      mhGameMainConnectMgr::SendObjActReq(v12->m_GameMainConnectMgr, v11->Handle, pkObj->m_iGUID);
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (006C4070) --------------------------------------------------------
mhReturnType __thiscall MiniHouseIndoor::ClearLight(MiniHouseIndoor *this)
{
  MiniHouseIndoor *v1; // ebx@1
  mhReturnType v2; // eax@2
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiAmbientLight> > >,0> >::_Node *v3; // eax@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > v4; // esi@3
  NiTexture *v5; // edi@5
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > *v6; // eax@10
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > result; // [sp+4h] [bp-4h]@10

  v1 = this;
  if ( this->m_mapLight._Mysize )
  {
    v3 = this->m_mapLight._Myhead;
    v4._Ptr = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)v3->_Left;
    if ( v3->_Left != v3 )
    {
      do
      {
        if ( v4._Ptr->_Myval.second.m_pObject )
        {
          v5 = v4._Ptr->_Myval.second.m_pObject;
          if ( v5 )
          {
            if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
            {
              if ( v5 )
                v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
            }
            v4._Ptr->_Myval.second.m_pObject = 0;
          }
        }
        v6 = std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::erase(
               (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *)&v1->m_mapLight,
               &result,
               v4);
        v4._Ptr = v6->_Ptr;
      }
      while ( v6->_Ptr != (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)v1->m_mapLight._Myhead );
    }
    v2 = v1->m_mapLight._Mysize == 0;
  }
  else
  {
    v2 = 0;
  }
  return v2;
}

//----- (006C4100) --------------------------------------------------------
void __thiscall MiniHouseIndoor::SetFocusObj(MiniHouseIndoor *this, mhObject *pkObj, bool bObjAct)
{
  MiniHouseIndoor *v3; // edx@1
  mhObject *v4; // esi@1
  mhFocusObj *v5; // ebx@1
  char *v6; // eax@3
  ResElement *v7; // eax@7
  NiActorManager *v8; // ecx@9
  ItemInfo *v9; // eax@15
  NiPointer<MHDiceGameTask> *v10; // eax@16
  ResElement *v11; // esi@19
  NiActorManager *v12; // eax@21
  NiNode *v13; // eax@22
  ResElement *v14; // eax@25
  NiActorManager *v15; // ecx@26
  NiNode *v16; // esi@27
  MiniHouseIndoor *v17; // [sp+10h] [bp-10h]@1

  v3 = this;
  v17 = this;
  v4 = this->m_FocusObj.m_Object;
  v5 = &this->m_FocusObj;
  if ( !pkObj )
  {
    mhFocusObj::SetObj(&this->m_FocusObj, 0);
    if ( v4 )
    {
      v6 = (char *)v4->m_Endure;
      if ( v6 )
      {
        if ( v6 == (char *)4 )
          v6 = (char *)3;
      }
      else
      {
        v6 = (char *)&pkObj->vfptr + 1;
      }
      v7 = mhObject::GetResElement(v4, (MHE_STEP)v6);
      if ( v7 )
      {
        if ( v7->m_bIsCanAnimation && (v8 = v7->m_pActorMgr.m_pObject) != 0 )
          MiniHouseIndoor::DetachFocusEff(v17, (NiNode *)v8->m_spNIFRoot.m_pObject);
        else
          MiniHouseIndoor::DetachFocusEff(v17, v7->m_pNiNode.m_pObject);
      }
    }
    return;
  }
  if ( v4 )
  {
    if ( v4->m_iGUID == pkObj->m_iGUID )
    {
      if ( bObjAct == 1 )
      {
        mhFocusObj::SetObj(&this->m_FocusObj, pkObj);
        v9 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(pkObj->m_iResGUID);
        if ( MiniHouseFuritureInfoTab::GetObjByName(v9->InxName)->GameType == 1 )
        {
          v10 = MHDiceGameTask::GetDiceGameTask((NiPointer<MHDiceGameTask> *)&bObjAct);
          MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_JOIN_REQ(v10->m_pObject);
          NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&bObjAct);
        }
        if ( v17->m_FocusObj.m_eInfo == 2 )
          MiniHouseIndoor::ObjColiAct(v17, pkObj);
      }
      return;
    }
    v11 = v4->m_pkResource;
    if ( v11 )
    {
      if ( v11->m_bIsCanAnimation && (v12 = v11->m_pActorMgr.m_pObject) != 0 )
        v13 = (NiNode *)v12->m_spNIFRoot.m_pObject;
      else
        v13 = v11->m_pNiNode.m_pObject;
      MiniHouseIndoor::DetachFocusEff(this, v13);
      v3 = v17;
    }
  }
  v14 = pkObj->m_pkResource;
  if ( v14->m_bIsCanAnimation && (v15 = v14->m_pActorMgr.m_pObject) != 0 )
    v16 = (NiNode *)v15->m_spNIFRoot.m_pObject;
  else
    v16 = v14->m_pNiNode.m_pObject;
  MiniHouseIndoor::AttachFocusEff(v3, v16);
  if ( v16 )
    mhFocusObj::SetObj(v5, pkObj);
}

//----- (006C42C0) --------------------------------------------------------
signed int __thiscall MiniHouseIndoor::CancelPickObj(MiniHouseIndoor *this)
{
  MiniHouseIndoor *v1; // edi@1
  NiNode *v2; // eax@1
  mhObject *v3; // ebx@2
  NiNode *v4; // eax@2
  mhObject *v5; // eax@2
  signed int result; // eax@6

  v1 = this;
  v2 = (NiNode *)this->m_PickedObj;
  if ( v2 )
  {
    v3 = this->m_FocusObj.m_Object;
    v4 = mhObjectManager::FindRootNode(v2);
    v5 = mhObjectManager::GetObjectA(&v1->m_ManagerMediator.m_ObjManager, v4);
    if ( v3 && v5 && v5->m_iGUID == v3->m_iGUID )
      MiniHouseIndoor::SetFocusObj(&g_kWorld.m_MiniHouseIndoorMode, 0, 1);
    result = MiniHouseIndoor::ReleasePickObj(v1, 1, 1);
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (006C4320) --------------------------------------------------------
void __thiscall MiniHouseIndoor::MakePickedObjColiNode(MiniHouseIndoor *this, mhState NewState)
{
  MiniHouseIndoor *v2; // esi@1

  v2 = this;
  if ( NewState == 3 )
    MiniHouseIndoor::PickedCopyObjColiNode(this);
  NiAVObject::Update(v2->m_PickedObj, 0.0, 1);
}

//----- (006C4350) --------------------------------------------------------
signed int __thiscall MiniHouseIndoor::Terminate(MiniHouseIndoor *this)
{
  MiniHouseIndoor *v1; // edi@1
  std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *v2; // esi@4
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v3; // ST08_4@5
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v4; // ST04_4@5
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v5; // ST08_4@5
  NiNode *v6; // esi@6
  NiNode *v7; // esi@11
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > result; // [sp+10h] [bp-14h]@5
  mhGameMainConnectMgr *v10; // [sp+14h] [bp-10h]@5
  int v11; // [sp+20h] [bp-4h]@5

  v1 = this;
  if ( MiniHouseIndoor::ClearLight(this) )
    OutputDebugStringA("----------MiniHouse LightClear OK---------- \n");
  else
    OutputDebugStringA("----------MiniHouse LightClear ERROR!!!!!!!!!!!---------- \n");
  MiniHouseIndoor::ClearScene(v1);
  NiCollisionGroup::RemoveAll(&v1->m_ManagerMediator.m_CollisionManager.m_pkCollisionGroup);
  mhResTableManager::Clear(&v1->m_ManagerMediator.m_ResTableManager);
  mhObjectManager::Clear(&v1->m_ManagerMediator.m_ObjManager);
  MiniHouseIndoor::ClearUI(v1);
  v2 = (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)v1->m_GameMainConnectMgr;
  if ( v2 )
  {
    v10 = v1->m_GameMainConnectMgr;
    v11 = 0;
    std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::clear(v2);
    v3._Ptr = v2->_Myhead;
    v4._Ptr = v2->_Myhead->_Left;
    v11 = 1;
    std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
      v2,
      &result,
      v4,
      v3);
    v5 = v2->_Myhead;
    v11 = -1;
    operator delete(v5);
    operator delete(v2);
    v1->m_GameMainConnectMgr = 0;
  }
  v6 = v1->m_spRootScene.m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v1->m_spRootScene.m_pObject = 0;
  }
  v7 = v1->m_spFocusObjEff.m_pObject;
  if ( v7 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v1->m_spFocusObjEff.m_pObject = 0;
  }
  return 1;
}

//----- (006C4480) --------------------------------------------------------
bool __thiscall MiniHouseIndoor::ChangeEndure(MiniHouseIndoor *this, MHE_STEP e, int iGUID)
{
  MiniHouseIndoor *v3; // esi@1
  mhObject *v4; // eax@1
  mhObject *v5; // edi@1
  bool result; // al@2
  mhObject *v7; // eax@3
  signed int v8; // eax@4
  char v9; // bl@8
  int v10; // [sp+Ch] [bp-4h]@3

  v3 = this;
  v4 = mhObjectManager::GetObjectA(&this->m_ManagerMediator.m_ObjManager, iGUID);
  v5 = v4;
  if ( v4 )
  {
    v10 = v4->m_iGUID;
    v7 = mhObjectManager::GetObjectA(&v3->m_ManagerMediator.m_ObjManager, (NiNode *)v3->m_PickedObj);
    if ( v7 )
      v8 = v7->m_iGUID;
    else
      v8 = -1;
    if ( v10 == v8 )
    {
      v3->m_RevChangeEndure.e = e;
      v3->m_RevChangeEndure.iCandidateObjID = iGUID;
      result = 1;
    }
    else
    {
      MiniHouseIndoor::CancelPickObj(v3);
      mhCollisionManager::DelObject(&v3->m_ManagerMediator.m_CollisionManager, v5, MH_COL_ALL);
      MiniHouseIndoor::RemoveObjScene(v3, (int)v3, v5);
      v9 = mhObject::SetEndureStep(v5, e);
      MiniHouseIndoor::AttachObjToScene(v3, iGUID, 1);
      result = v9 != 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006C4530) --------------------------------------------------------
void __thiscall MiniHouseIndoor::SetNonePickedObj(MiniHouseIndoor *this)
{
  MiniHouseIndoor *v1; // esi@1

  v1 = this;
  this->m_PickedObj = 0;
  Cursor::SetCursor(0);
  ITask::DirectDispatchAll(63, v1);
  ITask::DirectDispatchAll(64, v1);
  if ( v1->m_RevChangeEndure.iCandidateObjID != -1
    && MiniHouseIndoor::ChangeEndure(v1, v1->m_RevChangeEndure.e, v1->m_RevChangeEndure.iCandidateObjID) == 1 )
  {
    v1->m_RevChangeEndure.e = 1;
    v1->m_RevChangeEndure.iCandidateObjID = -1;
  }
}

//----- (006C45A0) --------------------------------------------------------
signed int __thiscall MiniHouseIndoor::ReleasePickObj(MiniHouseIndoor *this, bool bNoCollisionTest, bool bCallGameFrameNet)
{
  MiniHouseIndoor *v3; // esi@1
  NiAVObject *v4; // eax@1
  __int32 v5; // ecx@4
  unsigned __int16 v6; // dx@9
  float v7; // eax@9
  mhGameMainConnectMgr *v8; // ecx@9
  signed int v10; // edi@11
  float v11; // eax@12
  void (__thiscall ***v12)(_DWORD, _DWORD); // edi@15
  unsigned int v13; // edi@19
  NiAVObject *v14; // edi@20
  NiProperty *v15; // eax@21
  mhObject *v16; // edx@26
  float v17; // ecx@26
  void (__thiscall ***v18)(_DWORD, _DWORD); // edi@27
  int v19; // edx@34
  NiNode *v20; // eax@35
  void (__thiscall ***v21)(_DWORD, _DWORD); // edi@37
  double v22; // st7@43
  double v23; // st6@43
  bool v24; // zf@45
  double v25; // st7@45
  int v26; // ecx@45
  int v27; // ST04_4@46
  mhGameMainConnectMgr *v28; // ecx@46
  int v29; // ST04_4@47
  mhGameMainConnectMgr *v30; // ecx@47
  float fAngle; // [sp+0h] [bp-38h]@12
  NiPoint3 *v32; // [sp+4h] [bp-34h]@9
  NiPoint3 NewPos; // [sp+14h] [bp-24h]@9
  float v34; // [sp+20h] [bp-18h]@12
  float NewRotInfo[4]; // [sp+24h] [bp-14h]@26

  v3 = this;
  v4 = this->m_PickedObj;
  if ( v4 )
  {
    if ( mhCollisionManager::m_ColliStyle && !bNoCollisionTest )
      return 0;
    v5 = this->m_eState - 3;
    if ( v5 )
    {
      if ( v5 == 2 )
      {
        if ( bCallGameFrameNet )
        {
          v10 = 2;
          do
          {
            v11 = *(float *)&v3->m_PickedObj;
            v32 = (NiPoint3 *)1;
            v34 = COERCE_FLOAT(&fAngle);
            fAngle = v11;
            if ( v11 != 0.0 )
              InterlockedIncrement((volatile LONG *)(LODWORD(v11) + 4));
            mhCollisionManager::DelColliData(
              &v3->m_ManagerMediator.m_CollisionManager,
              LODWORD(fAngle),
              (mhCollisionType)v32);
            --v10;
          }
          while ( v10 );
          ((void (__stdcall *)(float *, NiAVObject *))v3->m_spAbStateEffScene.m_pObject->vfptr[30].__vecDelDtor)(
            &v34,
            v3->m_PickedObj);
          v12 = (void (__thiscall ***)(_DWORD, _DWORD))LODWORD(v34);
          if ( v34 != 0.0 && !InterlockedDecrement((volatile LONG *)(LODWORD(v34) + 4)) && v12 )
            (**v12)(v12, 1);
          v3->m_PickedCharhWnd = -1;
          MiniHouseIndoor::SetNonePickedObj(v3);
          v13 = g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1];
          if ( v13 )
          {
            MainChar::SetTargetChar((MainChar *)g_pkMainChar, 0);
            v14 = *(NiAVObject **)(v13 + 704);
            if ( v14 )
            {
              v15 = NiAVObject::GetProperty(v14, 0);
              if ( v15 )
              {
                NiAVObject::DetachProperty(v14, v15);
                NiAVObject::UpdateProperties(v14);
              }
            }
          }
          v3->m_eState = 1;
        }
        else if ( mhCollisionManager::m_ColliStyle == MH_COLSTYLE_NONE && !v3->m_bForceArrStateHold )
        {
          NewPos.x = v4->m_kLocal.m_Translate.x;
          NewPos.y = v4->m_kLocal.m_Translate.y;
          v6 = v3->m_PickedCharhWnd;
          v7 = v4->m_kLocal.m_Translate.z;
          v32 = &NewPos;
          v8 = v3->m_GameMainConnectMgr;
          NewPos.z = v7;
          if ( !mhGameMainConnectMgr::SendCompulsionMovetoChar(v6, &NewPos) )
            return 13;
        }
        return 1;
      }
      return 0;
    }
    if ( bNoCollisionTest != 1 && mhCollisionManager::m_ColliStyle )
      return 0;
    NewRotInfo[0] = 0.0;
    NewRotInfo[1] = 0.0;
    NewRotInfo[2] = 0.0;
    NewRotInfo[3] = 0.0;
    NewPos.x = v4->m_kLocal.m_Translate.x;
    NewPos.y = v4->m_kLocal.m_Translate.y;
    NewPos.z = v4->m_kLocal.m_Translate.z;
    NiMatrix3::ExtractAngleAndAxis(&v4->m_kLocal.m_Rotate, NewRotInfo, &NewRotInfo[1], &NewRotInfo[2], &NewRotInfo[3]);
    v16 = mhObjectManager::GetObjectA(&v3->m_ManagerMediator.m_ObjManager, (NiNode *)v3->m_PickedObj);
    if ( !v16 )
    {
      ((void (__stdcall *)(float *, NiAVObject *))v3->m_spAbStateEffScene.m_pObject->vfptr[30].__vecDelDtor)(
        &v34,
        v3->m_PickedObj);
      v18 = (void (__thiscall ***)(_DWORD, _DWORD))LODWORD(v34);
      if ( v34 != 0.0 && !InterlockedDecrement((volatile LONG *)(LODWORD(v34) + 4)) && v18 )
        (**v18)(v18, 1);
      MiniHouseIndoor::SetNonePickedObj(v3);
      v3->m_eState = 1;
      return 0;
    }
    if ( bCallGameFrameNet == 1 )
    {
      if ( !MiniHouseIndoor::IsPopUpMHItemInvState(v3) )
      {
        v20 = ResElement::GetNiNode(*(ResElement **)(v19 + 64));
        MiniHouseIndoor::DetachAlphaProp(v20);
      }
      MiniHouseIndoor::DelCopyObjColiNode(v3, (NiNode *)v3->m_PickedObj, MH_COL_COLLIDER);
      ((void (__stdcall *)(_DWORD, _DWORD))v3->m_spAbStateEffScene.m_pObject->vfptr[30].__vecDelDtor)(
        &v34,
        v3->m_PickedObj);
      if ( v34 != 0.0 )
      {
        v21 = (void (__thiscall ***)(_DWORD, _DWORD))LODWORD(v34);
        if ( !InterlockedDecrement((volatile LONG *)(LODWORD(v34) + 4)) )
        {
          if ( v21 )
            (**v21)(v21, 1);
        }
      }
      MiniHouseIndoor::SetNonePickedObj(v3);
      v3->m_eState = 1;
    }
    else if ( !bCallGameFrameNet && !v3->m_bForceArrStateHold )
    {
      v22 = NewRotInfo[3];
      v23 = NewRotInfo[0];
      if ( 0.0 == NewRotInfo[3] * NewRotInfo[0] )
      {
        NewRotInfo[3] = 0.001;
        NewRotInfo[0] = 0.001;
        v22 = (float)0.001;
        v23 = (float)0.001;
      }
      v24 = v3->m_bReadytoCreateObj == 1;
      v25 = v22 * v23;
      v32 = &NewPos;
      fAngle = v17;
      v26 = v16->m_iGUID;
      if ( v24 )
      {
        v34 = v25;
        fAngle = v34;
        v27 = v26;
        v28 = v3->m_GameMainConnectMgr;
        mhGameMainConnectMgr::SendCreateObjReq(v27, v34, v32);
        v3->m_bReadytoCreateObj = 0;
      }
      else
      {
        v34 = v25;
        fAngle = v34;
        v29 = v26;
        v30 = v3->m_GameMainConnectMgr;
        mhGameMainConnectMgr::SendRearRangeReq(v29, v34, v32);
      }
    }
  }
  return 1;
}
// B5C0D0: using guessed type enum mhColliStyle mhCollisionManager::m_ColliStyle;

//----- (006C48F0) --------------------------------------------------------
signed int __thiscall MiniHouseIndoor::AddObject(MiniHouseIndoor *this, int iGUID, int iResGUID, NiPoint3 *Pos, float fAngle, char Endure, bool bAddCollision)
{
  MiniHouseIndoor *v7; // ebx@1
  mhResTableElement *v8; // edi@1
  int (__stdcall *v9)(int); // eax@1
  int *v10; // eax@5
  MiniHouseFurniture *v11; // eax@8
  mhResTableElement *v12; // eax@11
  int v13; // eax@12
  mhResTableElement *v14; // edi@12
  char *v15; // eax@14
  char v16; // dl@15
  char v18; // dl@21
  char v19; // cl@21
  mhReturnType v20; // esi@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v21; // [sp-14h] [bp-68h]@16
  int v22; // [sp-4h] [bp-58h]@16
  signed int v23; // [sp+0h] [bp-54h]@16
  NiPoint3 *SetPos; // [sp+18h] [bp-3Ch]@1
  MiniHouseFurniture *pFurnitureInfo; // [sp+1Ch] [bp-38h]@1
  mhReturnType RetValue; // [sp+20h] [bp-34h]@14
  int ObjBindType; // [sp+24h] [bp-30h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > FileName; // [sp+28h] [bp-2Ch]@14
  int v29; // [sp+50h] [bp-4h]@16

  v7 = this;
  SetPos = Pos;
  v8 = mhResTableManager::GetModelElement(&this->m_ManagerMediator.m_ResTableManager, iResGUID);
  v9 = *(int (__stdcall **)(int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16);
  pFurnitureInfo = (MiniHouseFurniture *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  if ( (unsigned __int8)v9(iResGUID) )
  {
    if ( (unsigned __int16)iResGUID <= *(_WORD *)&pFurnitureInfo[1].FurnitureType[18] )
    {
      v10 = (int *)(*(_DWORD *)&pFurnitureInfo[1].FurnitureType[14] + 4 * (unsigned __int16)iResGUID);
      if ( *v10 )
        ObjBindType = *v10;
      else
        ObjBindType = 0;
    }
    else
    {
      ObjBindType = 0;
    }
  }
  else
  {
    ObjBindType = 0;
  }
  v11 = MiniHouseFuritureInfoTab::GetObjByName((char *)(ObjBindType + 2));
  pFurnitureInfo = v11;
  if ( !v11 || !ObjBindType )
    return 0;
  if ( !v8 )
  {
    v12 = (mhResTableElement *)operator new(0x44u);
    if ( v12 )
    {
      mhResTableElement::mhResTableElement(v12);
      v14 = (mhResTableElement *)v13;
      ObjBindType = v13;
    }
    else
    {
      ObjBindType = 0;
      v14 = 0;
    }
    v15 = pFurnitureInfo->Backimage;
    FileName._Myres = 15;
    FileName._Mysize = 0;
    FileName._Bx._Buf[0] = 0;
    RetValue = (mhReturnType)&pFurnitureInfo->Backimage[1];
    do
      v16 = *v15++;
    while ( v16 );
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &FileName,
      pFurnitureInfo->Backimage,
      (unsigned int)&v15[-RetValue]);
    RetValue = (mhReturnType)&v21;
    v23 = 15;
    v22 = 0;
    v29 = 0;
    v21._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v21,
      &mhResObjDefaultRootName_0,
      0,
      0xFFFFFFFF);
    mhResTableElement::Create(v14, &FileName, iResGUID, 0, 0, 10, 10000, 0, v21);
    mhResTableManager::AddModelElement(&v7->m_ManagerMediator.m_ResTableManager, v14);
    v8 = mhResTableManager::GetModelElement(&v7->m_ManagerMediator.m_ResTableManager, iResGUID);
    if ( !v8 )
    {
      if ( ObjBindType )
        (**(void (__stdcall ***)(_DWORD))ObjBindType)(1);
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&FileName);
      return 9;
    }
    v29 = -1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&FileName);
    v11 = pFurnitureInfo;
  }
  v18 = v11->WALL;
  BYTE1(ObjBindType) = v11->BOTTOM;
  v19 = v11->CEILING;
  LOBYTE(ObjBindType) = v18;
  LOWORD(v23) = ObjBindType;
  BYTE2(v23) = v19;
  RetValue = mhObjectManager::AddObject(
               &v7->m_ManagerMediator.m_ObjManager,
               iGUID,
               v8,
               -1,
               (mhObject::mhObjBindType)v23,
               &mhObjDefaultRootName_0);
  mhObjectManager::SetPosition(&v7->m_ManagerMediator.m_ObjManager, iGUID, SetPos);
  mhObjectManager::SetRotate(&v7->m_ManagerMediator.m_ObjManager, iGUID, fAngle);
  v20 = RetValue;
  if ( RetValue == 1 )
    MiniHouseIndoor::ChangeEndure(v7, (MHE_STEP)(unsigned __int8)Endure, iGUID);
  return v20;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (006C4B30) --------------------------------------------------------
mhObject *__thiscall MiniHouseIndoor::SetObjPos(MiniHouseIndoor *this, int iGUID, NiPoint3 *Pos, float angle)
{
  MiniHouseIndoor *v4; // ebx@1
  mhObject *result; // eax@3
  ResElement *v6; // eax@4
  NiActorManager *v7; // ecx@5
  NiAVObject *v8; // ecx@6
  signed int RetValue; // [sp+20h] [bp+Ch]@1

  v4 = this;
  RetValue = mhObjectManager::SetPosition(&this->m_ManagerMediator.m_ObjManager, iGUID, Pos);
  if ( 0.0 != angle )
    RetValue = mhObjectManager::SetRotate(&v4->m_ManagerMediator.m_ObjManager, iGUID, angle);
  result = mhObjectManager::GetObjectA(&v4->m_ManagerMediator.m_ObjManager, iGUID);
  if ( result )
  {
    MiniHouseIndoor::ReleasePickObj(v4, 1, 1);
    v6 = mhObjectManager::GetObjectA(&v4->m_ManagerMediator.m_ObjManager, iGUID)->m_pkResource;
    if ( v6->m_bIsCanAnimation && (v7 = v6->m_pActorMgr.m_pObject) != 0 )
      v8 = v7->m_spNIFRoot.m_pObject;
    else
      v8 = (NiAVObject *)&v6->m_pNiNode.m_pObject->vfptr;
    NiAVObject::Update(v8, 0.0, 1);
    result = (mhObject *)RetValue;
  }
  return result;
}

//----- (006C4BD0) --------------------------------------------------------
signed int __thiscall MiniHouseIndoor::DelObject(MiniHouseIndoor *this, int iObjGUID, bool bCallGameFrameNet)
{
  MiniHouseIndoor *v3; // esi@1
  mhObject *v4; // edi@1
  signed int result; // eax@2
  mhObject *v6; // eax@3
  int ChildCount; // [sp+18h] [bp+Ch]@8

  v3 = this;
  v4 = mhObjectManager::GetObjectA(&this->m_ManagerMediator.m_ObjManager, iObjGUID);
  if ( v4 )
  {
    v6 = v3->m_FocusObj.m_Object;
    if ( v6 && v4->m_iGUID == v6->m_iGUID )
      MiniHouseIndoor::SetFocusObj(&g_kWorld.m_MiniHouseIndoorMode, 0, 1);
    if ( v3->m_PickedObj )
      MiniHouseIndoor::ReleasePickObj(v3, 1, bCallGameFrameNet);
    mhCollisionManager::DelObject(&v3->m_ManagerMediator.m_CollisionManager, v4, MH_COL_ALL);
    ChildCount = v3->m_spNormalScene.m_pObject->m_kChildren.m_uiESize;
    if ( !mhObjectManager::AskDelayedDelObj(v4) )
      MiniHouseIndoor::RemoveObjScene(v3, (int)v3, v4);
    if ( mhObjectManager::DelObject(&v3->m_ManagerMediator.m_ObjManager, iObjGUID) == 14 )
      result = 1;
    else
      result = ChildCount - 1 == v3->m_spNormalScene.m_pObject->m_kChildren.m_uiESize;
  }
  else
  {
    result = 8;
  }
  return result;
}

//----- (006C4CA0) --------------------------------------------------------
signed int __thiscall MiniHouseIndoor::AddLight(MiniHouseIndoor *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > LightName)
{
  NiAmbientLight *v2; // eax@1
  NiAmbientLight *v3; // eax@2
  NiAmbientLight *v4; // esi@2
  unsigned int v5; // edi@6
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v6; // edx@12
  unsigned int v7; // ebx@14
  unsigned int v8; // ecx@14
  const char *v9; // eax@16
  int v10; // eax@18
  bool v11; // zf@18
  signed int v12; // eax@20
  const char *v13; // eax@24
  float v14; // edx@26
  float v15; // ecx@26
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v16; // edx@27
  unsigned int v17; // ebx@29
  unsigned int v18; // ecx@29
  const char *v19; // eax@31
  int v20; // eax@33
  bool v21; // zf@33
  signed int v22; // eax@35
  const char *v23; // eax@39
  float v24; // edx@41
  float v25; // ecx@41
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v26; // edx@42
  unsigned int v27; // ebx@44
  unsigned int v28; // ecx@44
  const char *v29; // eax@46
  int v30; // eax@48
  bool v31; // zf@48
  signed int v32; // eax@50
  const char *v33; // eax@54
  float v34; // edx@56
  float v35; // ecx@56
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v36; // edx@57
  unsigned int v37; // ebx@59
  unsigned int v38; // ecx@59
  const char *v39; // eax@61
  int v40; // eax@63
  bool v41; // zf@63
  signed int v42; // eax@65
  const char *v43; // eax@69
  NiAmbientLight *v44; // edi@74
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v45; // eax@78
  signed int result; // eax@83
  const char *v47; // [sp-4h] [bp-50h]@26
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiAmbientLight> > >,0> > >,bool> pairResult; // [sp+10h] [bp-3Ch]@1
  NiPointer<NiAmbientLight> NewLight; // [sp+18h] [bp-34h]@1
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiAmbientLight> > pairNewElement; // [sp+1Ch] [bp-30h]@72
  int v51; // [sp+48h] [bp-4h]@1

  *(_DWORD *)&pairResult.second = this;
  v51 = 0;
  v2 = (NiAmbientLight *)operator new(0x10Cu);
  NewLight.m_pObject = v2;
  LOBYTE(v51) = 1;
  if ( v2 )
  {
    NiAmbientLight::NiAmbientLight(v2);
    v4 = v3;
  }
  else
  {
    v4 = 0;
  }
  NewLight.m_pObject = v4;
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v5 = LightName._Mysize;
  LOBYTE(v51) = 2;
  if ( !LightName._Mysize )
  {
    LOBYTE(v51) = 0;
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    if ( LightName._Myres >= 0x10 )
      operator delete(LightName._Bx._Ptr);
    return 0;
  }
  v6 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)mhObjAmbLightMoveNO_0._Bx._Ptr;
  if ( mhObjAmbLightMoveNO_0._Myres < 0x10 )
    v6 = &mhObjAmbLightMoveNO_0;
  v7 = mhObjAmbLightMoveNO_0._Mysize;
  v8 = LightName._Mysize;
  if ( LightName._Mysize >= mhObjAmbLightMoveNO_0._Mysize )
    v8 = mhObjAmbLightMoveNO_0._Mysize;
  v9 = LightName._Bx._Ptr;
  if ( LightName._Myres < 0x10 )
    v9 = (const char *)&LightName;
  v10 = std::char_traits<char>::compare(v9, v6->_Bx._Buf, v8);
  v11 = v10 == 0;
  if ( !v10 )
  {
    if ( v5 >= v7 )
      v12 = v5 != v7;
    else
      v12 = -1;
    v11 = v12 == 0;
  }
  if ( v11 )
  {
    v13 = LightName._Bx._Ptr;
    if ( LightName._Myres < 0x10 )
      v13 = (const char *)&LightName;
    NiObjectNET::SetName((NiObjectNET *)&v4->vfptr, v13);
    v4->m_kAmb = MoveNOColor_0;
    ++v4->m_uiRevID;
    v4->m_kDiff.r = MoveNOColor_0.r;
    v4->m_kDiff.g = MoveNOColor_0.g;
    v14 = MoveNOColor_0.b;
    ++v4->m_uiRevID;
    v4->m_kDiff.b = v14;
    v4->m_kSpec.r = MoveNOColor_0.r;
    v4->m_kSpec.g = MoveNOColor_0.g;
    v15 = MoveNOColor_0.b;
    ++v4->m_uiRevID;
    v4->m_kSpec.b = v15;
    ++v4->m_uiRevID;
    v47 = "----------MiniHouse LightRED OK---------- \n";
  }
  else
  {
    v16 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)mhObjAmbLightMoveOK_0._Bx._Ptr;
    if ( mhObjAmbLightMoveOK_0._Myres < 0x10 )
      v16 = &mhObjAmbLightMoveOK_0;
    v17 = mhObjAmbLightMoveOK_0._Mysize;
    v18 = v5;
    if ( v5 >= mhObjAmbLightMoveOK_0._Mysize )
      v18 = mhObjAmbLightMoveOK_0._Mysize;
    v19 = LightName._Bx._Ptr;
    if ( LightName._Myres < 0x10 )
      v19 = (const char *)&LightName;
    v20 = std::char_traits<char>::compare(v19, v16->_Bx._Buf, v18);
    v21 = v20 == 0;
    if ( !v20 )
    {
      if ( v5 >= v17 )
        v22 = v5 != v17;
      else
        v22 = -1;
      v21 = v22 == 0;
    }
    if ( v21 )
    {
      v23 = LightName._Bx._Ptr;
      if ( LightName._Myres < 0x10 )
        v23 = (const char *)&LightName;
      NiObjectNET::SetName((NiObjectNET *)&v4->vfptr, v23);
      v4->m_kAmb = MoveOKColor_0;
      ++v4->m_uiRevID;
      v4->m_kDiff.r = MoveOKColor_0.r;
      v4->m_kDiff.g = MoveOKColor_0.g;
      v24 = MoveOKColor_0.b;
      ++v4->m_uiRevID;
      v4->m_kDiff.b = v24;
      v4->m_kSpec.r = MoveOKColor_0.r;
      v4->m_kSpec.g = MoveOKColor_0.g;
      v25 = MoveOKColor_0.b;
      ++v4->m_uiRevID;
      v4->m_kSpec.b = v25;
      ++v4->m_uiRevID;
      v47 = "----------MiniHouse LightGREEN OK---------- \n";
    }
    else
    {
      v26 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)mhObjAmbLightNormal_0._Bx._Ptr;
      if ( mhObjAmbLightNormal_0._Myres < 0x10 )
        v26 = &mhObjAmbLightNormal_0;
      v27 = mhObjAmbLightNormal_0._Mysize;
      v28 = v5;
      if ( v5 >= mhObjAmbLightNormal_0._Mysize )
        v28 = mhObjAmbLightNormal_0._Mysize;
      v29 = LightName._Bx._Ptr;
      if ( LightName._Myres < 0x10 )
        v29 = (const char *)&LightName;
      v30 = std::char_traits<char>::compare(v29, v26->_Bx._Buf, v28);
      v31 = v30 == 0;
      if ( !v30 )
      {
        if ( v5 >= v27 )
          v32 = v5 != v27;
        else
          v32 = -1;
        v31 = v32 == 0;
      }
      if ( v31 )
      {
        v33 = LightName._Bx._Ptr;
        if ( LightName._Myres < 0x10 )
          v33 = (const char *)&LightName;
        NiObjectNET::SetName((NiObjectNET *)&v4->vfptr, v33);
        v4->m_kAmb = NormalColor_0;
        ++v4->m_uiRevID;
        v4->m_kDiff.r = NormalColor_0.r;
        v4->m_kDiff.g = NormalColor_0.g;
        v34 = NormalColor_0.b;
        ++v4->m_uiRevID;
        v4->m_kDiff.b = v34;
        v4->m_kSpec.r = NormalColor_0.r;
        v4->m_kSpec.g = NormalColor_0.g;
        v35 = NormalColor_0.b;
        ++v4->m_uiRevID;
        v4->m_kSpec.b = v35;
        ++v4->m_uiRevID;
        v47 = "----------MiniHouse LightNORMAL OK---------- \n";
      }
      else
      {
        v36 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)mhObjAmbLightRepair_0._Bx._Ptr;
        if ( mhObjAmbLightRepair_0._Myres < 0x10 )
          v36 = &mhObjAmbLightRepair_0;
        v37 = mhObjAmbLightRepair_0._Mysize;
        v38 = v5;
        if ( v5 >= mhObjAmbLightRepair_0._Mysize )
          v38 = mhObjAmbLightRepair_0._Mysize;
        v39 = LightName._Bx._Ptr;
        if ( LightName._Myres < 0x10 )
          v39 = (const char *)&LightName;
        v40 = std::char_traits<char>::compare(v39, v36->_Bx._Buf, v38);
        v41 = v40 == 0;
        if ( !v40 )
        {
          if ( v5 >= v37 )
            v42 = v5 != v37;
          else
            v42 = -1;
          v41 = v42 == 0;
        }
        if ( !v41 )
        {
          if ( v4 )
            v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
          LOBYTE(v51) = 0;
          NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&NewLight);
          std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&LightName);
          return 0;
        }
        v43 = LightName._Bx._Ptr;
        if ( LightName._Myres < 0x10 )
          v43 = (const char *)&LightName;
        NiObjectNET::SetName((NiObjectNET *)&v4->vfptr, v43);
        NiLight::SetAmbientColor((NiLight *)&v4->vfptr, &RepairColor_0);
        NiLight::SetDiffuseColor((NiLight *)&v4->vfptr, &RepairColor_0);
        NiLight::SetSpecularColor((NiLight *)&v4->vfptr, &RepairColor_0);
        ++v4->m_uiRevID;
        v47 = "----------MiniHouse LightYELLOW OK---------- \n";
      }
    }
  }
  v4->m_fDimmer = 1.0;
  OutputDebugStringA(v47);
  pairNewElement.first._Myres = 15;
  pairNewElement.first._Mysize = 0;
  pairNewElement.first._Bx._Buf[0] = 0;
  pairNewElement.second.m_pObject = 0;
  LOBYTE(v51) = 3;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &pairNewElement.first,
    &LightName,
    0,
    0xFFFFFFFF);
  if ( pairNewElement.second.m_pObject != v4 )
  {
    if ( pairNewElement.second.m_pObject )
    {
      v44 = pairNewElement.second.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&pairNewElement.second.m_pObject->m_uiRefCount) )
      {
        if ( v44 )
          v44->vfptr->__vecDelDtor((NiRefObject *)v44, 1u);
      }
    }
    pairNewElement.second.m_pObject = v4;
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  }
  v45 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiAmbientLight>>>,0>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>> &>((std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *)(*(_DWORD *)&pairResult.second + 196), (std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > *)&pairNewElement);
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *)(*(_DWORD *)&pairResult.second + 196),
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > >,bool> *)&pairResult,
    v45,
    0);
  if ( pairResult.second )
  {
    LOBYTE(v51) = 2;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiNode>>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiNode>>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > *)&pairNewElement);
    LOBYTE(v51) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    if ( LightName._Myres >= 0x10 )
      operator delete(LightName._Bx._Ptr);
    result = 1;
  }
  else
  {
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    LOBYTE(v51) = 2;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiNode>>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiNode>>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > *)&pairNewElement);
    LOBYTE(v51) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    if ( LightName._Myres >= 0x10 )
      operator delete(LightName._Bx._Ptr);
    result = 5;
  }
  return result;
}

//----- (006C5250) --------------------------------------------------------
NiPointer<NiAmbientLight> *__thiscall MiniHouseIndoor::GetLight(MiniHouseIndoor *this, NiPointer<NiAmbientLight> *result, std::basic_string<char,std::char_traits<char>,std::allocator<char> > LightName)
{
  NiPointer<NiAmbientLight> *v3; // ebx@1
  std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > > > *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v5; // eax@1
  NiPointer<NiAmbientLight> *v6; // edi@1
  unsigned int v7; // ebx@2
  int v8; // eax@2
  unsigned int v9; // edx@4
  const char *v10; // ecx@6
  int v11; // eax@8
  bool v12; // sf@8
  int *v13; // eax@12
  bool v14; // cf@16
  NiTexture *v15; // eax@18
  MiniHouseIndoor *v17; // [sp+10h] [bp-18h]@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v18; // [sp+14h] [bp-14h]@1
  NiPointer<NiAmbientLight> *v19; // [sp+18h] [bp-10h]@1
  int v20; // [sp+24h] [bp-4h]@1

  v3 = result;
  v17 = this;
  v19 = result;
  v18 = 0;
  v20 = 0;
  v4 = (std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > > > *)&this->m_mapLight;
  v5 = std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::_Lbound(
         (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > *)&this->m_mapLight,
         &LightName);
  v6 = (NiPointer<NiAmbientLight> *)v4->_Myhead;
  v18 = v5;
  if ( (NiPointer<NiAmbientLight> *)v5 == v6 )
    goto LABEL_14;
  v7 = v5->_Myval.first._Mysize;
  v8 = (int)&v5->_Myval;
  if ( *(_DWORD *)(v8 + 20) >= 0x10u )
    v8 = *(_DWORD *)v8;
  v9 = LightName._Mysize;
  if ( LightName._Mysize >= v7 )
    v9 = v7;
  v10 = LightName._Bx._Ptr;
  if ( LightName._Myres < 0x10 )
    v10 = (const char *)&LightName;
  v11 = std::char_traits<char>::compare(v10, (const char *)v8, v9);
  v12 = v11 < 0;
  if ( v11 )
    goto LABEL_11;
  if ( LightName._Mysize >= v7 )
  {
    v12 = (LightName._Mysize != v7) < 0;
LABEL_11:
    if ( !v12 )
    {
      v3 = v19;
      v13 = (int *)&v18;
      goto LABEL_15;
    }
  }
  v3 = v19;
LABEL_14:
  v19 = v6;
  v13 = (int *)&v19;
LABEL_15:
  if ( (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiAmbientLight> > >,0> >::_Node *)*v13 == v17->m_mapLight._Myhead )
  {
    v14 = LightName._Myres < 0x10;
    v3->m_pObject = 0;
    if ( !v14 )
      operator delete(LightName._Bx._Ptr);
  }
  else
  {
    v15 = std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiAmbientLight>>>>::operator[](
            v4,
            &LightName)->m_pObject;
    v3->m_pObject = (NiAmbientLight *)v15;
    if ( v15 )
      InterlockedIncrement((volatile LONG *)&v15->m_uiRefCount);
    if ( LightName._Myres >= 0x10 )
      operator delete(LightName._Bx._Ptr);
  }
  return v3;
}

//----- (006C5370) --------------------------------------------------------
#error "6C542D: positive sp value has been found (funcsize=67)"

//----- (006C5620) --------------------------------------------------------
void __thiscall MiniHouseIndoor::~MiniHouseIndoor(MiniHouseIndoor *this)
{
  MiniHouseIndoor *v1; // esi@1
  NiNode *v2; // edi@1
  MsgBox *v3; // edi@5
  MsgBox *v4; // edi@9
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > v5; // ST08_4@13
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > v6; // ST04_4@13
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v7; // ST08_4@13
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v8; // ST04_4@13
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > v9; // ST08_4@13
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > v10; // ST04_4@13
  NiNode *v11; // edi@13
  NiNode *v12; // edi@17
  NiNode *v13; // edi@21
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > result; // [sp+10h] [bp-18h]@13
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v15; // [sp+14h] [bp-14h]@13
  MiniHouseIndoor *v16; // [sp+18h] [bp-10h]@1
  int v17; // [sp+24h] [bp-4h]@1

  v1 = this;
  v16 = this;
  v2 = this->m_spFocusObjEff.m_pObject;
  v17 = 9;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_spObjEffMsg.m_pObject;
  LOBYTE(v17) = 8;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v4 = v1->m_spMsgBox.m_pObject;
  LOBYTE(v17) = 7;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v15._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)&v1->m_mapCharLev;
  v5._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v1->m_mapCharLev._Myhead;
  v6._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v1->m_mapCharLev._Myhead->_Left;
  LOBYTE(v17) = 10;
  std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::erase(
    (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v1->m_mapCharLev,
    &result,
    v6,
    v5);
  operator delete(v1->m_mapCharLev._Myhead);
  result._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)&v1->m_mapUIGroup;
  v7._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapUIGroup._Myhead;
  v8._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapUIGroup._Myhead->_Left;
  LOBYTE(v17) = 11;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapUIGroup,
    &v15,
    v8,
    v7);
  operator delete(v1->m_mapUIGroup._Myhead);
  result._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)&v1->m_mapLight;
  v9._Ptr = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)v1->m_mapLight._Myhead;
  v10._Ptr = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)v1->m_mapLight._Myhead->_Left;
  LOBYTE(v17) = 12;
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *)&v1->m_mapLight,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > *)&v15,
    v10,
    v9);
  operator delete(v1->m_mapLight._Myhead);
  v11 = v1->m_spAbStateEffScene.m_pObject;
  LOBYTE(v17) = 3;
  if ( v11 && !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
    v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
  v12 = v1->m_spNormalScene.m_pObject;
  LOBYTE(v17) = 2;
  if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
    v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
  v13 = v1->m_spRootScene.m_pObject;
  LOBYTE(v17) = 1;
  if ( v13 && !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) && v13 )
    v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
  LOBYTE(v17) = 0;
  MiniHouseRoomInfo::~MiniHouseRoomInfo(&v1->m_RoomInfo);
  v17 = 13;
  result._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)&v1->m_ManagerMediator.m_CollisionManager;
  LOBYTE(v17) = 15;
  NiCollisionGroup::RemoveAll(&v1->m_ManagerMediator.m_CollisionManager.m_pkCollisionGroup);
  LOBYTE(v17) = 14;
  NiCollisionGroup::~NiCollisionGroup(&v1->m_ManagerMediator.m_CollisionManager.m_pkCollisionGroup);
  LOBYTE(v17) = 13;
  mhObjectManager::~mhObjectManager(&v1->m_ManagerMediator.m_ObjManager);
  v17 = -1;
  mhResTableManager::~mhResTableManager(&v1->m_ManagerMediator.m_ResTableManager);
}

//----- (006C5820) --------------------------------------------------------
signed int __thiscall MiniHouseIndoor::SetForceArrStateHold(MiniHouseIndoor *this, bool b)
{
  MiniHouseIndoor *v2; // esi@1
  NiNode *v3; // eax@2
  signed int result; // eax@4
  NiNode *v5; // eax@5
  unsigned int v6; // [sp-20h] [bp-24h]@1
  char v7; // [sp-1Ch] [bp-20h]@1
  int v8; // [sp-Ch] [bp-10h]@1
  signed int v9; // [sp-8h] [bp-Ch]@1

  v2 = this;
  v6 = -1;
  v9 = 15;
  v8 = 0;
  v7 = 0;
  if ( b )
  {
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v7,
      &mhObjAmbLightMoveNO_0,
      0,
      v6);
    v3 = v2->m_spAbStateEffScene.m_pObject;
    v6 = (unsigned int)v3;
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
    MiniHouseIndoor::ChangeLight(
      v2,
      (NiPointer<NiNode>)v6,
      *(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v7);
    result = 1;
    v2->m_bForceArrStateHold = 1;
  }
  else
  {
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v7,
      &mhObjAmbLightMoveOK_0,
      0,
      v6);
    v5 = v2->m_spAbStateEffScene.m_pObject;
    v6 = (unsigned int)v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
    MiniHouseIndoor::ChangeLight(
      v2,
      (NiPointer<NiNode>)v6,
      *(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v7);
    v2->m_bForceArrStateHold = 0;
    result = 1;
  }
  return result;
}

//----- (006C58D0) --------------------------------------------------------
void __thiscall MiniHouseIndoor::SetupScene(MiniHouseIndoor *this, NiPointer<NiNode> spRoot)
{
  MiniHouseIndoor *v2; // esi@1
  NiNode *v3; // ebx@1
  NiNode *v4; // eax@2
  NiNode *v5; // eax@3
  NiNode *v6; // edi@4
  NiNode *v7; // eax@11
  NiNode *v8; // eax@12
  NiNode *v9; // ebx@12
  NiNode *v10; // edi@14
  NiNode *v11; // eax@21
  NiNode *v12; // eax@23
  NiPointer<NiNode> v13; // [sp+0h] [bp-40h]@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v14; // [sp+4h] [bp-3Ch]@21
  int v15; // [sp+14h] [bp-2Ch]@21
  float fTime; // [sp+18h] [bp-28h]@21
  _DWORD *v17; // [sp+30h] [bp-10h]@2
  int v18; // [sp+3Ch] [bp-4h]@1

  v2 = this;
  v3 = 0;
  v18 = 0;
  if ( spRoot.m_pObject )
  {
    v4 = (NiNode *)operator new(0xE8u);
    v17 = v4;
    LOBYTE(v18) = 1;
    if ( v4 )
    {
      NiNode::NiNode(v4, 0);
      v3 = v5;
    }
    v6 = v2->m_spNormalScene.m_pObject;
    LOBYTE(v18) = 0;
    if ( v6 != v3 )
    {
      if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      v2->m_spNormalScene.m_pObject = v3;
      if ( v3 )
        InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
    }
    v7 = (NiNode *)operator new(0xE8u);
    v17 = v7;
    LOBYTE(v18) = 2;
    if ( v7 )
    {
      NiNode::NiNode(v7, 0);
      v9 = v8;
    }
    else
    {
      v9 = 0;
    }
    v10 = v2->m_spAbStateEffScene.m_pObject;
    LOBYTE(v18) = 0;
    if ( v10 != v9 )
    {
      if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
      v2->m_spAbStateEffScene.m_pObject = v9;
      if ( v9 )
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
    }
    ((void (__stdcall *)(NiNode *, _DWORD))spRoot.m_pObject->vfptr[29].__vecDelDtor)(
      v2->m_spAbStateEffScene.m_pObject,
      0);
    ((void (__stdcall *)(NiNode *, _DWORD))spRoot.m_pObject->vfptr[29].__vecDelDtor)(v2->m_spNormalScene.m_pObject, 0);
    v17 = &v14;
    LODWORD(fTime) = 15;
    v15 = 0;
    v14._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v14,
      &mhObjAmbLightNormal_0,
      0,
      0xFFFFFFFF);
    v11 = v2->m_spNormalScene.m_pObject;
    v17 = &v13;
    v13.m_pObject = v11;
    if ( v11 )
      InterlockedIncrement((volatile LONG *)&v11->m_uiRefCount);
    MiniHouseIndoor::ChangeLight(v2, v13, v14);
    v17 = &v14;
    LODWORD(fTime) = 15;
    v15 = 0;
    v14._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v14,
      &mhObjAmbLightMoveOK_0,
      0,
      0xFFFFFFFF);
    v12 = v2->m_spAbStateEffScene.m_pObject;
    v17 = &v13;
    v13.m_pObject = v12;
    if ( v12 )
      InterlockedIncrement((volatile LONG *)&v12->m_uiRefCount);
    MiniHouseIndoor::ChangeLight(v2, v13, v14);
    mhManagerMediator::Create(&v2->m_ManagerMediator, v2->m_spAbStateEffScene.m_pObject);
    NiAVObject::Update((NiAVObject *)&spRoot.m_pObject->vfptr, 0.0, 1);
    NiAVObject::UpdateProperties((NiAVObject *)&spRoot.m_pObject->vfptr);
    NiAVObject::UpdateEffects((NiAVObject *)&spRoot.m_pObject->vfptr);
    v18 = -1;
    if ( spRoot.m_pObject && !InterlockedDecrement((volatile LONG *)&spRoot.m_pObject->m_uiRefCount) )
    {
      if ( spRoot.m_pObject )
        spRoot.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spRoot.m_pObject, 1u);
    }
  }
}

//----- (006C5AF0) --------------------------------------------------------
mhReturnType __thiscall MiniHouseIndoor::SetState(MiniHouseIndoor *this, mhState NewState)
{
  mhReturnType result; // eax@1
  MiniHouseIndoor *v3; // esi@1
  NiNode *v4; // eax@6
  GameFrameWork *v5; // eax@11
  NiPointer<NiNode> v6; // [sp-20h] [bp-28h]@6
  char v7; // [sp-1Ch] [bp-24h]@6
  int v8; // [sp-Ch] [bp-14h]@6
  signed int v9; // [sp-8h] [bp-10h]@6
  const char *v10; // [sp-4h] [bp-Ch]@4

  result = 1;
  v3 = this;
  if ( NewState == 1 )
  {
    if ( this->m_eAccount == 1 )
    {
      this->m_eState = 1;
      return result;
    }
    MainChar::SetTargetChar((MainChar *)g_pkMainChar, 0);
    v10 = "mhSelectedObj::pkObj == NULL;\n";
    v3->m_FocusObj.m_Object = 0;
    v3->m_FocusObj.m_eInfo = 0;
    OutputDebugStringA(v10);
  }
  else if ( NewState == 2 )
  {
    MiniHouseIndoor::CancelPickObj(this);
    v9 = 15;
    v8 = 0;
    v7 = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v7,
      &mhObjAmbLightRepair_0,
      0,
      0xFFFFFFFF);
    v4 = v3->m_spAbStateEffScene.m_pObject;
    v6.m_pObject = v4;
    if ( v4 )
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
    MiniHouseIndoor::ChangeLight(v3, v6, *(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v7);
    Cursor::SetCursor((Cursor::Type)11);
  }
  else if ( NewState == MH_STATE_NO && this->m_eState == 2 )
  {
    Cursor::SetCursor(0);
    v5 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    GameFrameWork::SetInvLockAllItems(v5, 0);
  }
  if ( v3->m_eAccount == 2 && NewState == 1 )
  {
    MiniHouseIndoor::CancelPickObj(v3);
    if ( v3->m_eState == 2 )
      Cursor::SetCursor(0);
  }
  v3->m_eState = NewState;
  return 1;
}

//----- (006C5C10) --------------------------------------------------------
signed int __userpurge MiniHouseIndoor::SetPickedObj@<eax>(MiniHouseIndoor *this@<ecx>, int a2@<ebx>, int a3@<edi>, NiAVObject *Picked, mhState NewState, bool bReadytoCreateObj)
{
  MiniHouseIndoor *v6; // esi@1
  signed int result; // eax@2
  int v8; // ST0C_4@3
  int v9; // ST08_4@3
  NiNode *v10; // eax@3
  mhObject *v11; // eax@3
  int v12; // edi@3
  int v13; // ebx@3
  int v14; // edi@4
  int *v15; // eax@7
  MiniHouseFurniture *v16; // eax@10
  GameFrameWork *v17; // eax@13
  NiNode *v18; // eax@20
  mhGameMainConnectMgr *v19; // ecx@22
  MainChar *v20; // eax@22
  unsigned __int16 v21; // ax@24
  mhObject *pPickedObj; // [sp+4h] [bp-8h]@3
  NiAVObject *pRootPick; // [sp+8h] [bp-4h]@3

  v6 = this;
  if ( !Picked )
  {
    MiniHouseIndoor::CancelPickObj(this);
    return 4;
  }
  v8 = a2;
  v9 = a3;
  v10 = mhObjectManager::FindRootNode((NiNode *)Picked);
  pRootPick = (NiAVObject *)v10;
  v11 = mhObjectManager::GetObjectA(&v6->m_ManagerMediator.m_ObjManager, v10);
  v12 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  v13 = v11->m_iResGUID;
  pPickedObj = v11;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int, int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                                  + 16))(
                          ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                          v11->m_iResGUID,
                          v9,
                          v8) )
  {
    if ( (unsigned __int16)v13 <= *(_WORD *)(v12 + 200) )
    {
      v15 = (int *)(*(_DWORD *)(v12 + 196) + 4 * (unsigned __int16)v13);
      if ( *v15 )
        v14 = *v15;
      else
        v14 = 0;
    }
    else
    {
      v14 = 0;
    }
  }
  else
  {
    v14 = 0;
  }
  v16 = MiniHouseFuritureInfoTab::GetObjByName((char *)(v14 + 2));
  if ( !v16 || !v14 )
    return 0;
  if ( !v16->Grip )
  {
    v17 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    GameFrameWork::AddSysMsg(v17, "ÀÌ°Å °³»Ô ÀâÀ» ¼ö ¾øÀ½");
    return 0;
  }
  if ( v6->m_PickedObj )
    MiniHouseIndoor::CancelPickObj(v6);
  if ( MiniHouseIndoor::SetState(v6, NewState) != 1 )
    return 0;
  v6->m_bReadytoCreateObj = bReadytoCreateObj;
  if ( NewState == 3 )
  {
    v6->m_PickedObj = pRootPick;
    v6->m_PickedObj = MiniHouseIndoor::AddScene(v6, pRootPick, &pPickedObj->m_RootName, MH_OBJSCENE_ABSTATE, 1);
    if ( !MiniHouseIndoor::IsPopUpMHItemInvState(v6) )
    {
      v18 = ResElement::GetNiNode(pPickedObj->m_pkResource);
      MiniHouseIndoor::AttachAlphaProp(v18);
    }
    if ( g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1] )
    {
      v19 = v6->m_GameMainConnectMgr;
      v20 = (MainChar *)mhGameMainConnectMgr::GetMainChar();
      MainChar::SetTargetChar(v20, 0);
    }
  }
  else if ( NewState == 5 )
  {
    v21 = *(_WORD *)(g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1] + 552);
    v6->m_PickedCharhWnd = v21;
    if ( !v21 )
      return 0;
    v6->m_PickedObj = MiniHouseIndoor::AddScene(v6, Picked, &mhOtherCharColliRootName_1, MH_OBJSCENE_ABSTATE, 1);
    MiniHouseIndoor::AttachAlphaProp((NiNode *)Picked);
  }
  if ( v6->m_PickedObj )
  {
    MiniHouseIndoor::MakePickedObjColiNode(v6, NewState);
    Cursor::SetCursor((Cursor::Type)3);
    result = 1;
  }
  else
  {
    v6->m_PickedObj = 0;
    result = 8;
  }
  return result;
}
// 6C5C10: could not find valid save-restore pair for ebx
// 6C5C10: could not find valid save-restore pair for edi
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (006C5DF0) --------------------------------------------------------
signed int __userpurge MiniHouseIndoor::Update@<eax>(MiniHouseIndoor *this@<ecx>, int a2@<ebx>, signed int a3@<edi>, int a4@<esi>, float fTime)
{
  MiniHouseIndoor *v5; // esi@1
  mhGameMainConnectMgr *v6; // eax@1
  mhObject *v7; // eax@2
  mhObject *v8; // edi@2
  mhGameMainConnectMgr *v9; // ecx@4
  Char *v10; // eax@4
  float v11; // ecx@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v12; // ecx@8
  bool v13; // zf@9
  NiNode *v14; // eax@12
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v16; // [sp-1Ch] [bp-34h]@8
  unsigned int v17; // [sp-14h] [bp-2Ch]@8
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v18; // [sp-10h] [bp-28h]@8
  float ftime; // [sp+4h] [bp-14h]@15
  signed int v20; // [sp+8h] [bp-10h]@1
  int v21; // [sp+Ch] [bp-Ch]@1
  int v22; // [sp+10h] [bp-8h]@1
  MiniHouseIndoor *v23; // [sp+14h] [bp-4h]@1

  v23 = this;
  v22 = a2;
  v21 = a4;
  v5 = this;
  v6 = this->m_GameMainConnectMgr;
  v20 = a3;
  mhCollisionManager::Update(&this->m_ManagerMediator.m_CollisionManager, fTime, v6);
  MiniHouseRoomInfo::Update(fTime);
  if ( mhObjectManager::Update(&v5->m_ManagerMediator.m_ObjManager, fTime) == 14 )
  {
    v7 = mhObjectManager::FindDelayedDelObj(&v5->m_ManagerMediator.m_ObjManager);
    v8 = v7;
    if ( v7 )
    {
      MiniHouseIndoor::RemoveObjScene(v5, (int)v5, v7);
      mhObjectManager::RemoveObject(&v5->m_ManagerMediator.m_ObjManager, v8->m_iGUID);
    }
  }
  v9 = v5->m_GameMainConnectMgr;
  v10 = mhGameMainConnectMgr::GetMainChar();
  ((void (__thiscall *)(Char *, signed int))v10->vfptr[6].Deaffect)(v10, v20);
  if ( !v5->m_bForceArrStateHold )
  {
    if ( mhCollisionManager::m_ColliStyle )
    {
      if ( mhCollisionManager::m_ColliStyle != 1 || !v5->m_PickedObj )
        goto LABEL_15;
      v23 = (MiniHouseIndoor *)&v18;
      v12 = &v18;
      v17 = -1;
      v16 = &mhObjAmbLightMoveNO_0;
    }
    else
    {
      v13 = v5->m_eState == 2;
      v23 = (MiniHouseIndoor *)&v18;
      v12 = &v18;
      v17 = -1;
      if ( v13 )
        v16 = &mhObjAmbLightRepair_0;
      else
        v16 = &mhObjAmbLightMoveOK_0;
    }
    v12->_Myres = 15;
    v12->_Mysize = 0;
    v12->_Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(v12, v16, 0, v17);
    v14 = v5->m_spAbStateEffScene.m_pObject;
    v23 = (MiniHouseIndoor *)&v17;
    v17 = (unsigned int)v14;
    if ( v14 )
      InterlockedIncrement((volatile LONG *)&v14->m_uiRefCount);
    MiniHouseIndoor::ChangeLight(v5, (NiPointer<NiNode>)v17, v18);
  }
LABEL_15:
  v20 = 1;
  ftime = v11;
  NiAVObject::Update((NiAVObject *)&v5->m_spRootScene.m_pObject->vfptr, fTime, 1);
  return 1;
}
// 6C5DF0: could not find valid save-restore pair for ebx
// 6C5DF0: could not find valid save-restore pair for edi
// 6C5DF0: could not find valid save-restore pair for esi
// B5C0D0: using guessed type enum mhColliStyle mhCollisionManager::m_ColliStyle;

//----- (006C5F10) --------------------------------------------------------
void __thiscall MiniHouseIndoor::UpdateObjCharColiProcess(MiniHouseIndoor *this, NiPoint3 *CharPos)
{
  MiniHouseIndoor *v2; // esi@1
  NiNode *v3; // eax@7
  NiNode *v4; // eax@12
  NiPointer<NiNode> v5; // [sp-20h] [bp-28h]@7
  char v6; // [sp-1Ch] [bp-24h]@7
  int v7; // [sp-Ch] [bp-14h]@7
  signed int v8; // [sp-8h] [bp-10h]@7

  v2 = this;
  if ( !this->m_PickedObj )
  {
    MiniHouseIndoor::MainCharRunAwayFromObj(this, CharPos, &ColiPoint);
    return;
  }
  if ( dword_B5C11C == 1 )
  {
    if ( MiniHouseIndoor::CheckColiInfoWIthPickedObj(this) == -1 )
    {
      if ( dword_B5C120 != 1 )
      {
LABEL_10:
        MiniHouseIndoor::MainCharRunAwayFromObj(v2, CharPos, &ColiPoint);
        goto LABEL_11;
      }
      MiniHouseIndoor::MainCharRunAwayFromObj(v2, CharPos, &ColiPoint);
    }
    if ( dword_B5C120 == 1 )
    {
      v8 = 15;
      v7 = 0;
      v6 = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v6,
        &mhObjAmbLightMoveNO_0,
        0,
        0xFFFFFFFF);
      v3 = v2->m_spAbStateEffScene.m_pObject;
      v5.m_pObject = v3;
      if ( v3 )
        InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
      MiniHouseIndoor::ChangeLight(v2, v5, *(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v6);
      goto LABEL_11;
    }
    goto LABEL_10;
  }
LABEL_11:
  if ( dword_B5C118 == 1 )
  {
    v8 = 15;
    v7 = 0;
    v6 = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v6,
      &mhObjAmbLightMoveNO_0,
      0,
      0xFFFFFFFF);
    v4 = v2->m_spAbStateEffScene.m_pObject;
    v5.m_pObject = v4;
    if ( v4 )
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
    MiniHouseIndoor::ChangeLight(v2, v5, *(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v6);
  }
}
// B5C118: using guessed type int dword_B5C118;
// B5C11C: using guessed type int dword_B5C11C;
// B5C120: using guessed type int dword_B5C120;

//----- (006C6030) --------------------------------------------------------
signed int __thiscall MiniHouseIndoor::Create(MiniHouseIndoor *this, NiPointer<NiNode> spRootScene)
{
  MiniHouseIndoor *v2; // esi@1
  signed int result; // eax@5
  NiNode *v4; // eax@6
  int v5; // eax@7
  NiNode *v6; // edi@9
  GameFrameWork *v7; // eax@18
  NiAVObject *v8; // ecx@19
  const char *v9; // eax@21
  NiNode *v10; // eax@21
  NiNode *v11; // edi@21
  std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *v12; // eax@29
  mhGameMainConnectMgr *v13; // eax@30
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v14; // [sp-1Ch] [bp-3Ch]@17
  int v15; // [sp-Ch] [bp-2Ch]@17
  NiTexturePalette *v16; // [sp-8h] [bp-28h]@17
  signed int v17; // [sp-4h] [bp-24h]@18
  NiNode *v18; // [sp+10h] [bp-10h]@6
  int v19; // [sp+1Ch] [bp-4h]@1

  v2 = this;
  v19 = 0;
  if ( mhResTableManager::Clear(&this->m_ManagerMediator.m_ResTableManager) == 1
    && mhObjectManager::Clear(&v2->m_ManagerMediator.m_ObjManager) == 1 )
  {
    NiCollisionGroup::RemoveAll(&v2->m_ManagerMediator.m_CollisionManager.m_pkCollisionGroup);
  }
  memset(&v2->m_BuildingInfo.maxvisiter, 0, 0x85u);
  if ( spRootScene.m_pObject )
  {
    v4 = (NiNode *)operator new(0xE8u);
    v18 = v4;
    LOBYTE(v19) = 1;
    if ( v4 )
    {
      NiNode::NiNode(v4, 0);
      v18 = (NiNode *)v5;
    }
    else
    {
      v18 = 0;
      v5 = 0;
    }
    v6 = v2->m_spRootScene.m_pObject;
    LOBYTE(v19) = 0;
    if ( v6 != (NiNode *)v5 )
    {
      if ( v6 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
        v5 = (int)v18;
      }
      v2->m_spRootScene.m_pObject = (NiNode *)v5;
      if ( v5 )
        InterlockedIncrement((volatile LONG *)(v5 + 4));
    }
    ((void (__stdcall *)(NiNode *, _DWORD))spRootScene.m_pObject->vfptr[29].__vecDelDtor)(
      v2->m_spRootScene.m_pObject,
      0);
    v18 = (NiNode *)&v14;
    v16 = (NiTexturePalette *)15;
    v15 = 0;
    v14._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v14,
      &mhObjAmbLightMoveOK_0,
      0,
      0xFFFFFFFF);
    MiniHouseIndoor::AddLight(v2, v14);
    v18 = (NiNode *)&v14;
    v16 = (NiTexturePalette *)15;
    v15 = 0;
    v14._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v14,
      &mhObjAmbLightMoveNO_0,
      0,
      0xFFFFFFFF);
    MiniHouseIndoor::AddLight(v2, v14);
    v18 = (NiNode *)&v14;
    v16 = (NiTexturePalette *)15;
    v15 = 0;
    v14._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v14,
      &mhObjAmbLightNormal_0,
      0,
      0xFFFFFFFF);
    MiniHouseIndoor::AddLight(v2, v14);
    v18 = (NiNode *)&v14;
    v16 = (NiTexturePalette *)15;
    v15 = 0;
    v14._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v14,
      &mhObjAmbLightRepair_0,
      0,
      0xFFFFFFFF);
    MiniHouseIndoor::AddLight(v2, v14);
    if ( v2->m_eState == 2 )
    {
      Cursor::SetCursor(0);
      v17 = 0;
      v7 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      GameFrameWork::SetInvLockAllItems(v7, v17);
    }
    v8 = (NiAVObject *)&v2->m_spRootScene.m_pObject->vfptr;
    v2->m_eState = 0;
    NiAVObject::UpdateEffects(v8);
    NiAVObject::UpdateProperties((NiAVObject *)&v2->m_spRootScene.m_pObject->vfptr);
    if ( !Folder::m_bInit )
      Folder::Init();
    v17 = 1;
    v16 = 0;
    v9 = Folder::Merge(&Folder::m_acEffect, "FurnitureSelectEffect.nif");
    v10 = PgUtil::LoadNifFile(v9, v16);
    v11 = v2->m_spFocusObjEff.m_pObject;
    v18 = v10;
    if ( v11 != v10 )
    {
      if ( v11 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
          v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
        v10 = v18;
      }
      v2->m_spFocusObjEff.m_pObject = v10;
      if ( v10 )
        InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
    }
    v12 = (std::map<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > > > *)operator new(0x10u);
    v18 = (NiNode *)v12;
    LOBYTE(v19) = 2;
    if ( v12 )
      mhGameMainConnectMgr::mhGameMainConnectMgr(v12);
    else
      v13 = 0;
    v2->m_GameMainConnectMgr = v13;
    v19 = -1;
    if ( spRootScene.m_pObject && !InterlockedDecrement((volatile LONG *)&spRootScene.m_pObject->m_uiRefCount) )
    {
      if ( spRootScene.m_pObject )
        spRootScene.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spRootScene.m_pObject, 1u);
    }
    result = 1;
  }
  else
  {
    result = 2;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006C62F0) --------------------------------------------------------
signed int __thiscall MiniHouseIndoor::Join(MiniHouseIndoor *this, bool bIsMaster)
{
  MiniHouseIndoor *v2; // esi@1
  NiNode *v3; // eax@10
  const char *v5; // [sp+4h] [bp-Ch]@2

  v2 = this;
  this->m_CandidateFocusID = -1;
  if ( bIsMaster == 1 )
  {
    this->m_eAccount = 2;
    MainChar::SetTargetChar((MainChar *)g_pkMainChar, 0);
    v5 = "mhSelectedObj::pkObj == NULL;\n";
    v2->m_FocusObj.m_Object = 0;
    v2->m_FocusObj.m_eInfo = 0;
    OutputDebugStringA(v5);
    if ( v2->m_eAccount == 2 )
    {
      MiniHouseIndoor::CancelPickObj(v2);
      if ( v2->m_eState == 2 )
        Cursor::SetCursor(0);
    }
    v2->m_eState = 1;
  }
  else
  {
    this->m_eAccount = 1;
    this->m_eState = 1;
  }
  if ( mhResTableManager::Clear(&v2->m_ManagerMediator.m_ResTableManager) == 1
    && mhObjectManager::Clear(&v2->m_ManagerMediator.m_ObjManager) == 1 )
  {
    NiCollisionGroup::RemoveAll(&v2->m_ManagerMediator.m_CollisionManager.m_pkCollisionGroup);
  }
  v3 = v2->m_spRootScene.m_pObject;
  v5 = (const char *)v3;
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  MiniHouseIndoor::SetupScene(v2, (NiPointer<NiNode>)v5);
  v5 = "mhSelectedObj::pkObj == NULL;\n";
  v2->m_FocusObj.m_Object = 0;
  v2->m_FocusObj.m_eInfo = 0;
  OutputDebugStringA(v5);
  v5 = (const char *)1;
  NiAVObject::Update((NiAVObject *)&v2->m_spNormalScene.m_pObject->vfptr, 0.0, 1);
  NiAVObject::UpdateEffects((NiAVObject *)&v2->m_spNormalScene.m_pObject->vfptr);
  NiAVObject::UpdateProperties((NiAVObject *)&v2->m_spNormalScene.m_pObject->vfptr);
  return 1;
}

//----- (006C6410) --------------------------------------------------------
signed int __thiscall MiniHouseIndoor::Out(MiniHouseIndoor *this)
{
  MiniHouseIndoor *v1; // esi@1
  GameFrameWork *v2; // eax@3
  GameFrameWork *v3; // eax@7
  int v4; // eax@9
  mhObject *v5; // eax@10
  NiNode *v6; // eax@11
  bool v7; // zf@13
  NiPointer<NiNode> v9; // [sp-20h] [bp-2Ch]@11
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v10; // [sp-1Ch] [bp-28h]@11
  int v11; // [sp-Ch] [bp-18h]@11
  signed int v12; // [sp-8h] [bp-14h]@11
  const char *v13; // [sp-4h] [bp-10h]@15
  _DWORD *v14; // [sp+8h] [bp-4h]@11

  v1 = this;
  if ( ((int (*)(void))g_pkMainChar->vfptr[13].DeleteAbStateByAbstateIndex)() == 4 )
    MainChar::CancelMHEmotion((MainChar *)g_pkMainChar);
  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  GameFrameWork::SetCharEmotionUIState(v2, 0);
  ((void (*)(void))g_pkMainChar->vfptr[10].DeleteAbStateByAbstateIndex)();
  MiniHouseIndoor::CancelPickObj(v1);
  MiniHouseIndoor::ClearScene(v1);
  if ( mhResTableManager::Clear(&v1->m_ManagerMediator.m_ResTableManager) == 1
    && mhObjectManager::Clear(&v1->m_ManagerMediator.m_ObjManager) == 1 )
  {
    NiCollisionGroup::RemoveAll(&v1->m_ManagerMediator.m_CollisionManager.m_pkCollisionGroup);
  }
  if ( v1->m_eState == 2 )
  {
    Cursor::SetCursor(0);
    v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    GameFrameWork::SetInvLockAllItems(v3, 0);
  }
  v1->m_eState = 0;
  MiniHouseIndoor::CloseAllUis(v1);
  if ( v1->m_bAskReturnToInvState )
  {
    v4 = v1->m_iReturnToInvItemID;
    v1->m_bAskReturnToInvState = 0;
    if ( v4 != -1 )
    {
      v5 = mhObjectManager::GetObjectA(&v1->m_ManagerMediator.m_ObjManager, v4);
      MiniHouseIndoor::SetForceAlphaState(v1, v5, v1->m_bAskReturnToInvState);
    }
  }
  v14 = &v10;
  v12 = 15;
  v11 = 0;
  v10._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &v10,
    &mhObjAmbLightMoveOK_0,
    0,
    0xFFFFFFFF);
  v6 = v1->m_spAbStateEffScene.m_pObject;
  v14 = &v9;
  v9.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  MiniHouseIndoor::ChangeLight(v1, v9, v10);
  v7 = v1->m_iReturnToInvItemID == -1;
  v1->m_bForceArrStateHold = 0;
  if ( !v7 )
    v1->m_iReturnToInvItemID = -1;
  Inventory::ClearMiniHouseAllItemInv(&g_kInventory);
  std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::clear((std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)v1->m_GameMainConnectMgr);
  v13 = "mhSelectedObj::pkObj == NULL;\n";
  v1->m_FocusObj.m_Object = 0;
  v1->m_FocusObj.m_eInfo = 0;
  OutputDebugStringA(v13);
  return 1;
}

//----- (006C6590) --------------------------------------------------------
char __thiscall mhFocusObj::SetObj(mhFocusObj *this, mhObject *pkObj)
{
  const char *v3; // [sp-4h] [bp-4h]@4

  if ( !pkObj )
  {
    this->m_Object = 0;
    this->m_eInfo = 0;
    OutputDebugStringA("mhSelectedObj::pkObj == NULL;\n");
    return 0;
  }
  if ( this->m_Object )
  {
    if ( pkObj->m_iGUID == this->m_Object->m_iGUID )
    {
      this->m_eInfo = 2;
      OutputDebugStringA("mhSelectedObj::pkObj = m_Object DBLClick;\n");
      return 1;
    }
    v3 = "mhSelectedObj::pkObj Change = m_Object FirstClick;\n";
  }
  else
  {
    v3 = "mhSelectedObj::pkObj NULL= m_Object FirstClick;\n";
  }
  this->m_Object = pkObj;
  this->m_eInfo = 1;
  OutputDebugStringA(v3);
  return 1;
}

//----- (006C6600) --------------------------------------------------------
void __thiscall Party::Party(Party *this, Party *__that)
{
  this->vfptr = (PartyVtbl *)&Party::`vftable';
  *(_QWORD *)&this->m_kPartyMasterID.n5_name[0] = *(_QWORD *)&__that->m_kPartyMasterID.n5_name[0];
  *(_QWORD *)&this->m_kPartyMasterID.n5_code[2] = *(_QWORD *)&__that->m_kPartyMasterID.n5_code[2];
  this->m_kPartyMasterID.n5_code[4] = __that->m_kPartyMasterID.n5_code[4];
  *(_QWORD *)&this->m_kLooterID.n5_name[0] = *(_QWORD *)&__that->m_kLooterID.n5_name[0];
  *(_QWORD *)&this->m_kLooterID.n5_code[2] = *(_QWORD *)&__that->m_kLooterID.n5_code[2];
  this->m_kLooterID.n5_code[4] = __that->m_kLooterID.n5_code[4];
  this->m_iBelongType = __that->m_iBelongType;
  this->m_eLootType = __that->m_eLootType;
  this->m_eItemType = __that->m_eItemType;
  this->m_bDuringJoinPropose = __that->m_bDuringJoinPropose;
  *(_QWORD *)&this->m_kJoinProposeCharID.n5_name[0] = *(_QWORD *)&__that->m_kJoinProposeCharID.n5_name[0];
  *(_QWORD *)&this->m_kJoinProposeCharID.n5_code[2] = *(_QWORD *)&__that->m_kJoinProposeCharID.n5_code[2];
  this->m_kJoinProposeCharID.n5_code[4] = __that->m_kJoinProposeCharID.n5_code[4];
  this->m_fJoinProposeStartTime = __that->m_fJoinProposeStartTime;
  this->m_uiTotalMember = __that->m_uiTotalMember;
  qmemcpy(this->m_akMemberInfo, __that->m_akMemberInfo, 0x155u);
  this->m_eLootingType = __that->m_eLootingType;
}
// 9BEAA4: using guessed type int (__thiscall *Party::`vftable')(void *p, char);

//----- (006C66C0) --------------------------------------------------------
unsigned int __cdecl ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C154: using guessed type int ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::ms_pkTable;

//----- (006C66E0) --------------------------------------------------------
void __thiscall ResElement::ReleaseResElement(ResElement *this)
{
  ResElement *v1; // esi@1
  NiActorManager *v2; // edi@3
  NiNode *v3; // ecx@9
  NiNode *v4; // edi@10

  v1 = this;
  if ( this->m_bIsCanAnimation && this->m_pActorMgr.m_pObject )
  {
    v2 = this->m_pActorMgr.m_pObject;
    if ( v2 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      {
        if ( v2 )
          v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
      }
      v1->m_pActorMgr.m_pObject = 0;
    }
    v1->m_bIsCanAnimation = 0;
  }
  else
  {
    v3 = this->m_pNiNode.m_pObject;
    if ( v3 )
    {
      NiNode::DetachAllEffects(v3);
      NiAVObject::DetachAllProperties((NiAVObject *)&v1->m_pNiNode.m_pObject->vfptr);
      v4 = v1->m_pNiNode.m_pObject;
      if ( v4 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
        v1->m_pNiNode.m_pObject = 0;
      }
    }
  }
}

//----- (006C6770) --------------------------------------------------------
void __thiscall MiniHouseIndoor::ClearObjEffMsg(MiniHouseIndoor *this)
{
  MiniHouseIndoor *v1; // edi@1
  MsgBox *v2; // esi@1

  v1 = this;
  PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&this->m_spObjEffMsg.m_pObject->vfptr);
  v2 = v1->m_spObjEffMsg.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
    v1->m_spObjEffMsg.m_pObject = 0;
  }
}

//----- (006C67C0) --------------------------------------------------------
Party *__stdcall mhGameMainConnectMgr::GetMyParty(Party *result)
{
  Party::Party(result, &g_kParty);
  return result;
}

//----- (006C67F0) --------------------------------------------------------
MiniHouseFurnitureObjEffect *__cdecl MHFurnitureObjEffectTab::GetbyHandle(unsigned __int16 wHandle)
{
  int v1; // eax@1
  unsigned int v2; // edi@2
  unsigned int v3; // esi@4
  MiniHouseFurnitureObjEffect *result; // eax@7

  v1 = *(_DWORD *)(ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::ms_pkTable + 56);
  if ( v1 )
    v2 = *(_DWORD *)(v1 + 40);
  else
    v2 = 0;
  v3 = 0;
  if ( v2 )
  {
    while ( *(_WORD *)CDataReader::GetRecord(
                        (CDataReader *)(ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::ms_pkTable + 4),
                        v3) != wHandle )
    {
      if ( ++v3 >= v2 )
        goto LABEL_7;
    }
    result = (MiniHouseFurnitureObjEffect *)CDataReader::GetRecord(
                                              (CDataReader *)(ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::ms_pkTable
                                                            + 4),
                                              v3);
  }
  else
  {
LABEL_7:
    result = 0;
  }
  return result;
}
// A8C14C: using guessed type int ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::ms_pkTable;

//----- (006C6850) --------------------------------------------------------
MiniHouseFurnitureObjEffect *__cdecl MHFurnitureObjEffectTab::GetInxName(char *acName)
{
  int v1; // eax@1
  unsigned int v2; // edi@2
  unsigned int v3; // esi@4
  char *v4; // eax@5
  MiniHouseFurnitureObjEffect *result; // eax@7

  v1 = *(_DWORD *)(ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::ms_pkTable + 56);
  if ( v1 )
    v2 = *(_DWORD *)(v1 + 40);
  else
    v2 = 0;
  v3 = 0;
  if ( v2 )
  {
    while ( 1 )
    {
      v4 = CDataReader::GetRecord(
             (CDataReader *)(ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::ms_pkTable + 4),
             v3);
      if ( !_mbscmp(v4 + 2, acName) )
        break;
      if ( ++v3 >= v2 )
        goto LABEL_7;
    }
    result = (MiniHouseFurnitureObjEffect *)CDataReader::GetRecord(
                                              (CDataReader *)(ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::ms_pkTable
                                                            + 4),
                                              v3);
  }
  else
  {
LABEL_7:
    result = 0;
  }
  return result;
}
// A8C14C: using guessed type int ITableBase<MiniHouseFurnitureObjEffect,MHFurnitureObjEffectTab>::ms_pkTable;

//----- (006C68C0) --------------------------------------------------------
MiniHouseEndure *__cdecl MiniHouseEndureInfoTable::GetByHandle(unsigned __int16 wHandle)
{
  unsigned int v1; // esi@1
  MiniHouseEndure *result; // eax@2

  v1 = 0;
  if ( ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::GetTotal() )
  {
    while ( 1 )
    {
      result = (MiniHouseEndure *)CDataReader::GetRecord(
                                    (CDataReader *)(ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::ms_pkTable + 4),
                                    v1);
      if ( result->Handle == wHandle )
        break;
      if ( ++v1 >= ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::GetTotal() )
        goto LABEL_4;
    }
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}
// A8C154: using guessed type int ITableBase<MiniHouseEndure,MiniHouseEndureInfoTable>::ms_pkTable;

//----- (006C6900) --------------------------------------------------------
MHEmotion *__cdecl MiniHouseEmotionTab::GetEmotion(unsigned __int16 MHEmotionID, int ActionIndex)
{
  unsigned int v2; // esi@1
  MHEmotion *result; // eax@2

  v2 = 0;
  if ( ITableBase<MHEmotion,MiniHouseEmotionTab>::GetTotal() )
  {
    while ( 1 )
    {
      result = (MHEmotion *)CDataReader::GetRecord(
                              (CDataReader *)(ITableBase<MHEmotion,MiniHouseEmotionTab>::ms_pkTable + 4),
                              v2);
      if ( result->MHEmotionID == MHEmotionID && result->ActionIndex == ActionIndex )
        break;
      if ( ++v2 >= ITableBase<MHEmotion,MiniHouseEmotionTab>::GetTotal() )
        goto LABEL_5;
    }
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}
// A8C15C: using guessed type int ITableBase<MHEmotion,MiniHouseEmotionTab>::ms_pkTable;

//----- (006C6950) --------------------------------------------------------
std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *__thiscall std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0>>::_Insert(std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *this, std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *_Newnode)
{
  unsigned int v5; // eax@1
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v6; // edi@4
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v7; // edx@4
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v8; // edx@7
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v9; // edx@9
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v10; // eax@11
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v11; // edx@12
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v12; // esi@12
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v13; // esi@13
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v14; // edx@16
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v15; // esi@18
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v16; // esi@20
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v17; // edx@24
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v18; // esi@24
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v19; // edi@24
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v20; // edi@26
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v21; // edi@28
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v22; // esi@31
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v23; // edx@34
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v24; // esi@34
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v25; // esi@36
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v26; // esi@38
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v27; // edi@44
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v28; // edi@46
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v29; // ecx@52
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *v30; // eax@52

  v5 = this->_Mysize;
  if ( v5 >= 0x3FFFFFFE )
  {
    operator delete(_Newnode);
    std::_Xlength_error("map/set<T> too long");
  }
  this->_Mysize = v5 + 1;
  v6 = _Newnode;
  _Newnode->_Parent = _Wherenode;
  v7 = this->_Myhead;
  if ( _Wherenode == v7 )
  {
    v7->_Parent = _Newnode;
    this->_Myhead->_Left = _Newnode;
    this->_Myhead->_Right = _Newnode;
  }
  else if ( _Addleft )
  {
    _Wherenode->_Left = _Newnode;
    v8 = this->_Myhead;
    if ( _Wherenode == v8->_Left )
      v8->_Left = _Newnode;
  }
  else
  {
    _Wherenode->_Right = _Newnode;
    v9 = this->_Myhead;
    if ( _Wherenode == v9->_Right )
      v9->_Right = _Newnode;
  }
  v10 = _Newnode;
  while ( !v10->_Parent->_Color )
  {
    v11 = v10->_Parent;
    v12 = v11->_Parent;
    if ( v11 == v12->_Left )
    {
      v13 = v12->_Right;
      if ( v13->_Color )
      {
        if ( v10 == v11->_Right )
        {
          v10 = v10->_Parent;
          v14 = v11->_Right;
          v10->_Right = v14->_Left;
          if ( !v14->_Left->_Isnil )
            v14->_Left->_Parent = v10;
          v14->_Parent = v10->_Parent;
          v15 = this->_Myhead;
          if ( v10 == v15->_Parent )
          {
            v15->_Parent = v14;
          }
          else
          {
            v16 = v10->_Parent;
            if ( v10 == v16->_Left )
              v16->_Left = v14;
            else
              v16->_Right = v14;
          }
          v14->_Left = v10;
          v10->_Parent = v14;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Left;
        v17->_Left = v17->_Left->_Right;
        v19 = v18->_Right;
        if ( !v19->_Isnil )
          v19->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v20 = this->_Myhead;
        if ( v17 == v20->_Parent )
        {
          v20->_Parent = v18;
          v18->_Right = v17;
        }
        else
        {
          v21 = v17->_Parent;
          if ( v17 == v21->_Right )
          {
            v21->_Right = v18;
            v18->_Right = v17;
          }
          else
          {
            v21->_Left = v18;
            v18->_Right = v17;
          }
        }
LABEL_50:
        v6 = _Newnode;
        v17->_Parent = v18;
        continue;
      }
      v11->_Color = 1;
      v13->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
    else
    {
      v22 = v12->_Left;
      if ( v22->_Color )
      {
        if ( v10 == v11->_Left )
        {
          v10 = v10->_Parent;
          v23 = v11->_Left;
          v10->_Left = v23->_Right;
          v24 = v23->_Right;
          if ( !v24->_Isnil )
            v24->_Parent = v10;
          v23->_Parent = v10->_Parent;
          v25 = this->_Myhead;
          if ( v10 == v25->_Parent )
          {
            v25->_Parent = v23;
          }
          else
          {
            v26 = v10->_Parent;
            if ( v10 == v26->_Right )
              v26->_Right = v23;
            else
              v26->_Left = v23;
          }
          v23->_Right = v10;
          v10->_Parent = v23;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Right;
        v17->_Right = v18->_Left;
        if ( !v18->_Left->_Isnil )
          v18->_Left->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v27 = this->_Myhead;
        if ( v17 == v27->_Parent )
        {
          v27->_Parent = v18;
        }
        else
        {
          v28 = v17->_Parent;
          if ( v17 == v28->_Left )
            v28->_Left = v18;
          else
            v28->_Right = v18;
        }
        v18->_Left = v17;
        goto LABEL_50;
      }
      v11->_Color = 1;
      v22->_Color = 1;
      v10->_Parent->_Parent->_Color = 0;
      v10 = v10->_Parent->_Parent;
    }
  }
  v29 = this->_Myhead->_Parent;
  v30 = result;
  result->_Ptr = v6;
  v29->_Color = 1;
  return v30;
}

//----- (006C6B80) --------------------------------------------------------
void __thiscall ResElement::ResElement(ResElement *this)
{
  this->vfptr = (ResElementVtbl *)&ResElement::`vftable';
  this->m_pNiNode.m_pObject = 0;
  this->m_pActorMgr.m_pObject = 0;
  this->m_bIsCanAnimation = 0;
  this->m_FileName._Myres = 15;
  this->m_FileName._Mysize = 0;
  this->m_FileName._Bx._Buf[0] = 0;
}
// 9BF8A4: using guessed type int (__thiscall *ResElement::`vftable')(void *p, char);

//----- (006C6BB0) --------------------------------------------------------
void __thiscall ResElement::~ResElement(ResElement *this)
{
  ResElement *v1; // esi@1
  NiActorManager *v2; // edi@3
  NiNode *v3; // esi@7

  v1 = this;
  this->vfptr = (ResElementVtbl *)&ResElement::`vftable';
  ResElement::ReleaseResElement(this);
  if ( v1->m_FileName._Myres >= 0x10 )
    operator delete(v1->m_FileName._Bx._Ptr);
  v1->m_FileName._Myres = 15;
  v1->m_FileName._Mysize = 0;
  v1->m_FileName._Bx._Buf[0] = 0;
  v2 = v1->m_pActorMgr.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_pNiNode.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
  {
    if ( v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  }
}
// 9BF8A4: using guessed type int (__thiscall *ResElement::`vftable')(void *p, char);

//----- (006C6C80) --------------------------------------------------------
ResElement *__thiscall ResElement::`vector deleting destructor'(ResElement *this, unsigned int a2)
{
  ResElement *v2; // esi@1

  v2 = this;
  ResElement::~ResElement(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006C6CB0) --------------------------------------------------------
void __thiscall mhResTableElement::mhResTableElement(mhResTableElement *this)
{
  this->m_pNiNode.m_pObject = 0;
  this->m_pActorMgr.m_pObject = 0;
  this->m_bIsCanAnimation = 0;
  this->m_FileName._Mysize = 0;
  this->m_FileName._Myres = 15;
  this->m_FileName._Bx._Buf[0] = 0;
  this->m_eBindType = 0;
  this->m_eAction = 0;
  this->m_iWeight = 0;
  this->m_iLoadingWeight = 0;
  this->vfptr = (ResElementVtbl *)&mhResTableElement::`vftable';
  this->m_ElementID = -1;
  this->m_iTexID = -1;
}
// 9BF8AC: using guessed type int (__thiscall *mhResTableElement::`vftable')(void *p, char);

//----- (006C6CF0) --------------------------------------------------------
mhResTableElement *__thiscall mhResTableElement::`vector deleting destructor'(mhResTableElement *this, unsigned int a2)
{
  mhResTableElement *v2; // esi@1

  v2 = this;
  mhResTableElement::~mhResTableElement(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006C6D20) --------------------------------------------------------
void __thiscall std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiNode>>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiNode>>(std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > *this)
{
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > *v1; // esi@1
  INsFile_NodeCreater *v2; // edi@1

  v1 = this;
  v2 = this->second.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  if ( v1->first._Myres >= 0x10 )
    operator delete(v1->first._Bx._Ptr);
  v1->first._Myres = 15;
  v1->first._Mysize = 0;
  v1->first._Bx._Buf[0] = 0;
}

//----- (006C6DB0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<enum  MHE_STEP,ResElement *,std::less<enum  MHE_STEP>,std::allocator<std::pair<enum  MHE_STEP const,ResElement *>>,0>>::find(std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > *result, OscTarget *_Keyval)
{
  std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *v3; // edx@1
  std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *v4; // eax@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > *v5; // eax@8

  v3 = this->_Myhead;
  v4 = v3->_Parent;
  while ( !v4->_Isnil )
  {
    if ( v4->_Myval.first >= *_Keyval )
    {
      v3 = v4;
      v4 = v4->_Left;
    }
    else
    {
      v4 = v4->_Right;
    }
  }
  if ( v3 == this->_Myhead || *_Keyval < v3->_Myval.first )
  {
    v5 = result;
    result->_Ptr = this->_Myhead;
  }
  else
  {
    v5 = result;
    result->_Ptr = v3;
  }
  return v5;
}

//----- (006C6E20) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned char>>,0>>::find(std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > > *result, const unsigned __int16 *_Keyval)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *v3; // edx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *v4; // eax@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > > *v5; // eax@8

  v3 = this->_Myhead;
  v4 = v3->_Parent;
  while ( !v4->_Isnil )
  {
    if ( v4->_Myval.first >= *_Keyval )
    {
      v3 = v4;
      v4 = v4->_Left;
    }
    else
    {
      v4 = v4->_Right;
    }
  }
  if ( v3 == this->_Myhead || *_Keyval < v3->_Myval.first )
  {
    v5 = result;
    result->_Ptr = this->_Myhead;
  }
  else
  {
    v5 = result;
    result->_Ptr = v3;
  }
  return v5;
}

//----- (006C6E90) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *_Node, bool _Leftish)
{
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v4; // edx@1
  std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *v5; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v6; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v7; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v8; // esi@1
  bool v9; // cl@1
  int v10; // edi@2
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v11; // edi@10
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v12; // edx@12
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > >,bool> *v13; // eax@12
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v14; // ecx@15
  bool _Addleft; // [sp+Ch] [bp-4h]@1

  v4 = _Node;
  v5 = this;
  v6 = this->_Myhead;
  v7 = v6->_Parent;
  v8 = v6;
  v9 = 1;
  _Addleft = 1;
  if ( !v7->_Isnil )
  {
    v10 = _Node->_Myval.first;
    do
    {
      v8 = v7;
      if ( _Leftish )
        v9 = v7->_Myval.first >= v10;
      else
        v9 = v10 < v7->_Myval.first;
      _Addleft = v9;
      if ( v9 )
        v7 = v7->_Left;
      else
        v7 = v7->_Right;
    }
    while ( !v7->_Isnil );
  }
  v11 = v8;
  *(_DWORD *)&_Leftish = v8;
  if ( v9 )
  {
    if ( v8 == v5->_Myhead->_Left )
    {
      v12 = std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
              v5,
              (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)&_Leftish,
              1,
              v8,
              _Node)->_Ptr;
      v13 = result;
      result->first._Ptr = v12;
      result->second = 1;
      return v13;
    }
    std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,GuildNameCache::GuildNameStorage *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,GuildNameCache::GuildNameStorage *>>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&_Leftish);
    v11 = (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)_Leftish;
    v4 = _Node;
  }
  if ( v11->_Myval.first >= v4->_Myval.first )
  {
    operator delete(v4);
    v13 = result;
    result->first._Ptr = v11;
    result->second = 0;
  }
  else
  {
    v14 = std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
            v5,
            (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)&_Leftish,
            _Addleft,
            v8,
            v4)->_Ptr;
    v13 = result;
    result->first._Ptr = v14;
    result->second = 1;
  }
  return v13;
}

//----- (006C6F70) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned char>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *_Node, bool _Leftish)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *v4; // edx@1
  std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > *v5; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *v6; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *v7; // eax@1
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v8; // esi@1
  bool v9; // cl@1
  unsigned __int16 v10; // di@2
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *v11; // edi@10
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v12; // edx@12
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > >,bool> *v13; // eax@12
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v14; // ecx@15
  bool _Addleft; // [sp+Ch] [bp-4h]@1

  v4 = _Node;
  v5 = this;
  v6 = this->_Myhead;
  v7 = v6->_Parent;
  v8 = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v6;
  v9 = 1;
  _Addleft = 1;
  if ( !v7->_Isnil )
  {
    v10 = _Node->_Myval.first;
    do
    {
      v8 = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v7;
      if ( _Leftish )
        v9 = v7->_Myval.first >= v10;
      else
        v9 = v10 < v7->_Myval.first;
      _Addleft = v9;
      if ( v9 )
        v7 = v7->_Left;
      else
        v7 = v7->_Right;
    }
    while ( !v7->_Isnil );
  }
  v11 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *)v8;
  *(_DWORD *)&_Leftish = v8;
  if ( v9 )
  {
    if ( (std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *)v8 == v5->_Myhead->_Left )
    {
      v12 = std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0>>::_Insert(
              (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)v5,
              (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *)&_Leftish,
              1,
              v8,
              (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)_Node)->_Ptr;
      v13 = result;
      result->first._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *)v12;
      result->second = 1;
      return v13;
    }
    std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<Effect *,std::less<Effect *>,std::allocator<Effect *>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >,std::_Iterator_base0> *)&_Leftish);
    v11 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *)_Leftish;
    v4 = _Node;
  }
  if ( v11->_Myval.first >= v4->_Myval.first )
  {
    operator delete(v4);
    v13 = result;
    result->first._Ptr = v11;
    result->second = 0;
  }
  else
  {
    v14 = std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0>>::_Insert(
            (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)v5,
            (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *)&_Leftish,
            _Addleft,
            v8,
            (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v4)->_Ptr;
    v13 = result;
    result->first._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *)v14;
    result->second = 1;
  }
  return v13;
}

//----- (006C7050) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned char>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > > _Where, std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *_Node)
{
  std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > *v4; // esi@1
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *v6; // edi@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > > *v7; // eax@2
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v8; // eax@7
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *v9; // ecx@20
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > >,bool> v10; // [sp+8h] [bp-8h]@20

  v4 = this;
  v5 = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)this->_Myhead;
  v6 = _Node;
  if ( !this->_Mysize )
  {
    std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0>>::_Insert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)this,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *)result,
      1,
      v5,
      (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)_Node);
    return result;
  }
  if ( _Where._Ptr == (std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *)v5->_Left )
  {
    if ( _Node->_Myval.first < _Where._Ptr->_Myval.first )
    {
      std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0>>::_Insert(
        (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)this,
        (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *)result,
        1,
        (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)_Where._Ptr,
        (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)_Node);
      return result;
    }
    goto LABEL_20;
  }
  if ( (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)_Where._Ptr == v5 )
  {
    v8 = v5->_Right;
    if ( LOWORD(v8->_Myval) < _Node->_Myval.first )
    {
      std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0>>::_Insert(
        (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)this,
        (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *)result,
        0,
        v8,
        (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)_Node);
      return result;
    }
    goto LABEL_20;
  }
  if ( _Node->_Myval.first >= _Where._Ptr->_Myval.first
    || (_Node = _Where._Ptr,
        std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<Effect *,std::less<Effect *>,std::allocator<Effect *>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >,std::_Iterator_base0> *)&_Node),
        _Node->_Myval.first >= v6->_Myval.first) )
  {
    if ( _Where._Ptr->_Myval.first >= v6->_Myval.first
      || (_Node = _Where._Ptr,
          std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<Effect *,std::less<Effect *>,std::allocator<Effect *>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >,std::_Iterator_base0> *)&_Node),
          _Node != v4->_Myhead)
      && v6->_Myval.first >= _Node->_Myval.first )
    {
LABEL_20:
      v9 = std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned char>>,0>>::_Linsert(
             v4,
             &v10,
             v6,
             0)->first._Ptr;
      v7 = result;
      result->_Ptr = v9;
      return v7;
    }
    if ( _Where._Ptr->_Right->_Isnil )
    {
      std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0>>::_Insert(
        (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)v4,
        (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *)result,
        0,
        (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)_Where._Ptr,
        (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v6);
      v7 = result;
    }
    else
    {
      std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0>>::_Insert(
        (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)v4,
        (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *)result,
        1,
        (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)_Node,
        (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v6);
      v7 = result;
    }
  }
  else if ( _Node->_Right->_Isnil )
  {
    std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0>>::_Insert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)v4,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *)result,
      0,
      (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)_Node,
      (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v6);
    v7 = result;
  }
  else
  {
    std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0>>::_Insert(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)v4,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *)result,
      1,
      (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)_Where._Ptr,
      (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v6);
    v7 = result;
  }
  return v7;
}

//----- (006C71C0) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned char>>,0>>::_Buynode<std::pair<unsigned short const,unsigned char>>(std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > *this, std::pair<unsigned short const ,unsigned char> *_Val)
{
  std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *result; // eax@1
  std::pair<unsigned short const ,unsigned char> *v4; // esi@3
  std::exception pExceptionObject; // [sp+4h] [bp-Ch]@5

  v2 = this;
  result = (std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *)operator new(0x14u);
  if ( !result )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  result->_Left = v2->_Myhead;
  result->_Parent = v2->_Myhead;
  result->_Right = v2->_Myhead;
  *(_WORD *)&result->_Color = 0;
  if ( result != (std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *)-12 )
  {
    v4 = _Val;
    result->_Myval.first = _Val->first;
    result->_Myval.second = v4->second;
  }
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (006C7230) --------------------------------------------------------
char *__thiscall std::map<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned char>>>::operator[](std::map<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> > > *this, const unsigned __int16 *_Keyval)
{
  std::map<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> > > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *v3; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *v4; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > > v5; // edi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> >::_Node *v6; // eax@8
  char *result; // eax@8

  v2 = this;
  v3 = this->_Myhead;
  v4 = v3->_Parent;
  v5._Ptr = v3;
  while ( !v4->_Isnil )
  {
    if ( v4->_Myval.first >= *_Keyval )
    {
      v5._Ptr = v4;
      v4 = v4->_Left;
    }
    else
    {
      v4 = v4->_Right;
    }
  }
  if ( v5._Ptr != v2->_Myhead && *_Keyval >= v5._Ptr->_Myval.first )
  {
    result = &v5._Ptr->_Myval.second;
  }
  else
  {
    LOWORD(_Keyval) = *_Keyval;
    BYTE2(_Keyval) = 0;
    v6 = std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned char>>,0>>::_Buynode<std::pair<unsigned short const,unsigned char>>(
           (std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > *)&v2->comp,
           (std::pair<unsigned short const ,unsigned char> *)&_Keyval);
    std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned char>>,0>>::_Insert(
      (std::_Tree<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > *)&v2->comp,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned char,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned char> >,0> > > *)&_Keyval,
      v5,
      v6);
    result = (char *)(_Keyval + 7);
  }
  return result;
}

//----- (006C72B0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiAmbientLight>>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > _Where, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *_Node)
{
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v4; // ebx@1
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *v5; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v6; // eax@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v7; // edi@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > *v8; // eax@2
  char *v9; // eax@4
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v10; // eax@17
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v11; // ecx@23
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > >,bool> v12; // [sp+Ch] [bp-8h]@23

  v4 = _Node;
  v5 = (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *)this;
  v6 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)this->_Myhead;
  v7 = &_Node->_Myval.first;
  if ( !this->_Mysize )
  {
    std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>,0>>::_Insert(
      (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *)this,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > *)result,
      1,
      v6,
      (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)_Node);
    return result;
  }
  if ( _Where._Ptr == (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)v6->_Left )
  {
    v9 = _Where._Ptr->_Myval.first._Bx._Buf;
    if ( _Where._Ptr->_Myval.first._Myres >= 0x10 )
      v9 = *(char **)v9;
    if ( std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
           &_Node->_Myval.first,
           0,
           _Node->_Myval.first._Mysize,
           v9,
           _Where._Ptr->_Myval.first._Mysize) < 0 )
    {
      std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>,0>>::_Insert(
        v5,
        (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > *)result,
        1,
        (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)_Where._Ptr,
        (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v4);
      return result;
    }
    goto LABEL_23;
  }
  if ( (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)_Where._Ptr == v6 )
  {
    if ( std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::operator()(
           &v6->_Right->_Myval.first,
           &_Node->_Myval.first) )
    {
      std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>,0>>::_Insert(
        v5,
        (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > *)result,
        0,
        v5->_Myhead->_Right,
        (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v4);
      return result;
    }
    goto LABEL_23;
  }
  if ( std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::operator()(
         &_Node->_Myval.first,
         &_Where._Ptr->_Myval.first) )
  {
    _Node = _Where._Ptr;
    std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,bool,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,bool>>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >,std::_Iterator_base0> *)&_Node);
    if ( std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::operator()(
           &_Node->_Myval.first,
           v7) )
    {
      if ( _Node->_Right->_Isnil )
      {
        std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>,0>>::_Insert(
          v5,
          (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > *)result,
          0,
          (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)_Node,
          (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v4);
        v8 = result;
      }
      else
      {
        std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>,0>>::_Insert(
          v5,
          (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > *)result,
          1,
          (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)_Where._Ptr,
          (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v4);
        v8 = result;
      }
      return v8;
    }
  }
  if ( !std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::operator()(
          &_Where._Ptr->_Myval.first,
          v7) )
    goto LABEL_23;
  _Node = _Where._Ptr;
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiAmbientLight>>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >,std::_Iterator_base0> *)&_Node);
  v10 = _Node;
  if ( _Node == (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)v5->_Myhead )
    goto LABEL_20;
  if ( !std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::operator()(
          v7,
          &_Node->_Myval.first) )
  {
LABEL_23:
    v11 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>,0>>::_Linsert(v5, &v12, (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v4, 0)->first._Ptr;
    v8 = result;
    result->_Ptr = v11;
    return v8;
  }
  v10 = _Node;
LABEL_20:
  if ( _Where._Ptr->_Right->_Isnil )
  {
    std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>,0>>::_Insert(
      v5,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > *)result,
      0,
      (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)_Where._Ptr,
      (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v4);
    v8 = result;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>,0>>::_Insert(
      v5,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > *)result,
      1,
      (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v10,
      (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)v4);
    v8 = result;
  }
  return v8;
}

//----- (006C7470) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiAmbientLight>>>,0>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>> &>(std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *this, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > *_Val)
{
  std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *v2; // esi@1
  void *v3; // edi@1
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > *v4; // ebx@3
  NiTexture *v5; // eax@3
  int v7; // [sp+0h] [bp-38h]@1
  std::exception pExceptionObject; // [sp+10h] [bp-28h]@6
  char *v9; // [sp+1Ch] [bp-1Ch]@2
  char *v10; // [sp+20h] [bp-18h]@2
  void *p; // [sp+24h] [bp-14h]@1
  int *v12; // [sp+28h] [bp-10h]@1
  int v13; // [sp+34h] [bp-4h]@2

  v12 = &v7;
  v2 = this;
  v3 = operator new(0x30u);
  p = v3;
  if ( !v3 )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  *(_DWORD *)v3 = v2->_Myhead;
  *((_DWORD *)v3 + 1) = v2->_Myhead;
  *((_DWORD *)v3 + 2) = v2->_Myhead;
  *((_WORD *)v3 + 22) = 0;
  v13 = 0;
  v10 = (char *)v3 + 12;
  v9 = (char *)v3 + 12;
  LOBYTE(v13) = 1;
  if ( v3 != (void *)-12 )
  {
    v4 = _Val;
    *((_DWORD *)v3 + 8) = 15;
    *((_DWORD *)v3 + 7) = 0;
    *((_BYTE *)v3 + 12) = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)v3 + 12),
      &v4->first,
      0,
      0xFFFFFFFF);
    v5 = v4->second.m_pObject;
    *((_DWORD *)v3 + 10) = v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  }
  return (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)v3;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (006C7560) --------------------------------------------------------
NiPointer<NiTexture> *__thiscall std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiAmbientLight>>>>::operator[](std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > > > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Keyval)
{
  std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > > > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v3; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > v4; // ebx@1
  const char *v5; // eax@2
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v6; // eax@5
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v7; // edi@5
  void (__thiscall ***v8)(_DWORD, _DWORD); // esi@6
  NiPointer<NiTexture> *v9; // eax@11
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > result; // [sp+14h] [bp-34h]@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v11; // [sp+18h] [bp-30h]@5
  int v12; // [sp+34h] [bp-14h]@5
  int v13; // [sp+44h] [bp-4h]@5

  v2 = this;
  v3 = std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::_Lbound(
         (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > *)this,
         _Keyval);
  v4._Ptr = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)v3;
  if ( v3 == (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)v2->_Myhead )
    goto LABEL_15;
  v5 = v3->_Myval.first._Bx._Buf;
  if ( v4._Ptr->_Myval.first._Myres >= 0x10 )
    v5 = *(const char **)v5;
  if ( std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
         _Keyval,
         0,
         _Keyval->_Mysize,
         v5,
         v4._Ptr->_Myval.first._Mysize) >= 0 )
  {
    v9 = &v4._Ptr->_Myval.second;
  }
  else
  {
LABEL_15:
    v13 = 0;
    v11._Myres = 15;
    v11._Mysize = 0;
    v11._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v11, _Keyval, 0, 0xFFFFFFFF);
    v12 = 0;
    LOBYTE(v13) = 1;
    v6 = std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiAmbientLight>>>,0>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>> &>(
           (std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *)&v2->comp,
           (std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > *)&v11);
    std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiAmbientLight>>>,0>>::_Insert(
      (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *)&v2->comp,
      &result,
      v4,
      v6);
    v7 = result._Ptr;
    LOBYTE(v13) = 2;
    if ( v12 )
    {
      v8 = (void (__thiscall ***)(_DWORD, _DWORD))v12;
      if ( !InterlockedDecrement((volatile LONG *)(v12 + 4)) )
      {
        if ( v8 )
          (**v8)(v8, 1);
      }
    }
    if ( v11._Myres >= 0x10 )
      operator delete(v11._Bx._Ptr);
    v9 = &v7->_Myval.second;
  }
  return v9;
}

//----- (006C7670) --------------------------------------------------------
int __stdcall mhGameMainConnectMgr::GetMousePos(int a2)
{
  int result; // eax@1
  int v3; // edx@1

  result = a2;
  v3 = PgWin::ms_iMsY;
  *(_DWORD *)a2 = PgWin::ms_iMsX;
  *(_DWORD *)(a2 + 4) = v3;
  return result;
}

//----- (006C7690) --------------------------------------------------------
void __stdcall mhGameMainConnectMgr::SendObjEffReq(unsigned __int16 nFurniturehWnd, int nEffHandle)
{
  __int16 v3; // ax@1

  v3 = nEffHandle;
  LOWORD(nEffHandle) = nFurniturehWnd;
  HIWORD(nEffHandle) = v3;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x23u, 0x40u, &nEffHandle, 4);
}

//----- (006C76C0) --------------------------------------------------------
void __stdcall mhGameMainConnectMgr::SendCreateObjReq(int iGUID, float fAngle, NiPoint3 *TargetPos)
{
  char kProtoDummy[256]; // [sp+0h] [bp-104h]@1

  memset(&kProtoDummy[1], 0, 0xFFu);
  *(float *)&kProtoDummy[15] = fAngle;
  *(float *)&kProtoDummy[3] = TargetPos->x;
  *(float *)&kProtoDummy[7] = TargetPos->y;
  *(float *)&kProtoDummy[11] = TargetPos->z;
  *(_WORD *)&kProtoDummy[1] = iGUID;
  kProtoDummy[0] = 1;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x23u, 0x22u, kProtoDummy, 22);
}

//----- (006C7750) --------------------------------------------------------
void __stdcall mhGameMainConnectMgr::SendDecorateModeReq(mhState NowState)
{
  if ( NowState )
  {
    if ( NowState != 1 )
    {
      BYTE3(NowState) = 0;
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x23u, 0x1Au, (char *)&NowState + 3, 1);
    }
  }
}

//----- (006C7780) --------------------------------------------------------
Char *mhGameMainConnectMgr::GetMainChar()
{
  return g_pkMainChar;
}

//----- (006C7790) --------------------------------------------------------
void __stdcall mhGameMainConnectMgr::SendRearRangeReq(int GUID, float fAngle, NiPoint3 *TargetPos)
{
  char kProtoDummy[256]; // [sp+0h] [bp-104h]@1

  memset(&kProtoDummy[1], 0, 0xFFu);
  *(float *)&kProtoDummy[3] = TargetPos->x;
  *(float *)&kProtoDummy[7] = TargetPos->y;
  *(float *)&kProtoDummy[11] = TargetPos->z;
  *(_WORD *)&kProtoDummy[1] = GUID;
  *(float *)&kProtoDummy[15] = fAngle;
  kProtoDummy[0] = 1;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x23u, 0x1Fu, kProtoDummy, 22);
}

//----- (006C7820) --------------------------------------------------------
void mhGameMainConnectMgr::SendMainCharPosReq()
{
  int v1; // eax@1
  float kFrom; // ST18_4@1
  float kFrom_4; // ST1C_4@1
  int kFrom_8; // ST20_4@1
  NiPoint3 *v5; // eax@1
  float kRevPos_8; // ST14_4@1
  float v7; // ST0C_4@1
  float kRevPos_4; // ST10_4@1
  int kRevPos; // [sp+0h] [bp-38h]@0
  PROTO_NC_ACT_WALK_REQ kProto; // [sp+24h] [bp-14h]@1

  v1 = ((int (__stdcall *)(int))g_pkMainChar->vfptr[6].Deaffect)(kRevPos);
  kFrom = *(float *)v1;
  kFrom_4 = *(float *)(v1 + 4);
  kFrom_8 = *(_DWORD *)(v1 + 8);
  v5 = MainChar::GetRevserveMovePos((MainChar *)g_pkMainChar);
  kRevPos_8 = v5->z;
  v7 = v5->x;
  kRevPos_4 = v5->y;
  kProto.from.x = (signed __int64)kFrom;
  kProto.from.y = (signed __int64)kFrom_4;
  kProto.to.x = (signed __int64)v7;
  kProto.to.y = (signed __int64)kRevPos_4;
  if ( ((int (__cdecl *)(_DWORD, _DWORD))g_pkMainChar->vfptr[7].Affect)(LODWORD(kRevPos_4), LODWORD(kRevPos_8)) )
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 8u, 0x19u, &kProto, 16);
  else
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 8u, 0x17u, &kProto, 16);
}

//----- (006C7930) --------------------------------------------------------
void __stdcall mhGameMainConnectMgr::SendDelObjReq(int iGUID)
{
  char kProtoDummy[128]; // [sp+0h] [bp-84h]@1

  memset(&kProtoDummy[1], 0, 0x7Fu);
  *(_WORD *)&kProtoDummy[1] = iGUID;
  kProtoDummy[0] = 1;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x23u, 0x25u, kProtoDummy, 6);
}

//----- (006C7990) --------------------------------------------------------
char __stdcall mhGameMainConnectMgr::SendCompulsionMovetoChar(unsigned __int16 CharhWnd, NiPoint3 *kMovePos)
{
  char result; // al@2
  PROTO_NC_MINIHOUSE_COMPULSIONMOVETO_REQ kProto; // [sp+10h] [bp-10h]@1

  kProto.hnd = CharhWnd;
  if ( CharMgr::GetChar(&g_kCharMgr, CharhWnd) )
  {
    kProto.location.x = (signed __int64)kMovePos->x;
    kProto.location.y = (signed __int64)kMovePos->y;
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x23u, 0x28u, &kProto, 10);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006C7A40) --------------------------------------------------------
void __thiscall mhGameMainConnectMgr::SendObjActReq(mhGameMainConnectMgr *this, unsigned __int16 handle, unsigned __int16 nFurniturehWnd)
{
  std::_Tree<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > *v3; // esi@1
  unsigned int v4; // edi@1
  unsigned int v5; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *v6; // eax@4
  std::pair<unsigned short const ,unsigned long> _Val; // [sp+Ch] [bp-Ch]@1
  PROTO_NC_MINIHOUSE_CHAR_ACTION_REQ Proto; // [sp+14h] [bp-4h]@5

  v3 = (std::_Tree<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > *)this;
  v4 = timeGetTime();
  std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,long>>,0>>::find(
    v3,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > > *)&_Val.second,
    &nFurniturehWnd);
  v5 = _Val.second;
  if ( (std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *)_Val.second == v3->_Myhead )
  {
    _Val.first = nFurniturehWnd;
    _Val.second = v4;
    v6 = std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned long>>,0>>::_Buynode<std::pair<unsigned short const,unsigned long>>(
           (std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)v3,
           &_Val);
    std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::_Linsert(
      (std::_Tree<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)v3,
      (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > >,bool> *)&_Val,
      v6,
      0);
  }
  else if ( v4 <= *(_DWORD *)(_Val.second + 16) + 1500 )
  {
    return;
  }
  Proto.nFurnitureHnd = nFurniturehWnd;
  Proto.Handle = handle;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x23u, 0x3Du, &Proto, 4);
  *(_DWORD *)(v5 + 16) = v4;
}

//----- (006C7AD0) --------------------------------------------------------
void __thiscall stMINIHOUSEINFO::Clear(stMINIHOUSEINFO *this)
{
  this->handle = -1;
  this->pkNode = 0;
  *(_DWORD *)&this->camp.minihouse = 0;
  *(_DWORD *)&this->camp.dummy[2] = 0;
  *(_DWORD *)&this->camp.dummy[6] = 0;
  *(_QWORD *)&this->charid.n5_name[0] = 0i64;
  *(_QWORD *)&this->charid.n5_code[2] = 0i64;
  this->charid.n5_code[4] = 0;
  *(_DWORD *)&this->title[0] = 0;
  *(_DWORD *)&this->title[4] = 0;
  *(_DWORD *)&this->title[8] = 0;
  *(_DWORD *)&this->title[12] = 0;
  *(_DWORD *)&this->title[16] = 0;
  this->title[20] = 0;
}

//----- (006C7B20) --------------------------------------------------------
void __thiscall CMiniHouseMgr::RemoveAll(CMiniHouseMgr *this, bool detachScene)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *v2; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *v3; // esi@1
  stMINIHOUSEINFO *v4; // edi@2
  std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *v5; // eax@7
  std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *j; // eax@8
  std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *i; // eax@11
  CMiniHouseMgr *v8; // [sp+8h] [bp-4h]@1

  v2 = this->m_mapInfo._Myhead;
  v3 = v2->_Left;
  v8 = this;
  if ( v2->_Left != v2 )
  {
    do
    {
      v4 = v3->_Myval.second;
      if ( detachScene == 1 )
        World::DetachMiniHouse(&g_kWorld, v4->pkNode);
      if ( v4 )
        operator delete(v4);
      if ( !v3->_Isnil )
      {
        v5 = v3->_Right;
        if ( v5->_Isnil )
        {
          for ( i = v3->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v3 != i->_Right )
              break;
            v3 = i;
          }
          v3 = i;
        }
        else
        {
          v3 = v3->_Right;
          for ( j = v5->_Left; !j->_Isnil; j = j->_Left )
            v3 = j;
        }
      }
    }
    while ( v3 != v2 );
    this = v8;
  }
  std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::clear((std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)this);
}

//----- (006C7BB0) --------------------------------------------------------
signed __int16 __thiscall CMiniHouseMgr::GetMiniHouseHandleByNodePtr(CMiniHouseMgr *this, NiNode *pkNode)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *v2; // edx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *v3; // ecx@1
  stMINIHOUSEINFO *v4; // eax@2
  std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *v5; // eax@5
  std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *j; // eax@6
  std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *i; // eax@9
  signed __int16 result; // ax@14

  v2 = this->m_mapInfo._Myhead;
  v3 = v2->_Left;
  if ( v2->_Left == v2 )
  {
LABEL_14:
    result = -1;
  }
  else
  {
    while ( 1 )
    {
      v4 = v3->_Myval.second;
      if ( v4 )
      {
        if ( v4->pkNode == pkNode )
          break;
      }
      if ( !v3->_Isnil )
      {
        v5 = v3->_Right;
        if ( v5->_Isnil )
        {
          for ( i = v3->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v3 != i->_Right )
              break;
            v3 = i;
          }
          v3 = i;
        }
        else
        {
          v3 = v3->_Right;
          for ( j = v5->_Left; !j->_Isnil; j = j->_Left )
            v3 = j;
        }
      }
      if ( v3 == v2 )
        goto LABEL_14;
    }
    result = v4->handle;
  }
  return result;
}

//----- (006C7C30) --------------------------------------------------------
void __thiscall CMiniHouseMgr::Terminate(CMiniHouseMgr *this)
{
  CMiniHouseMgr::RemoveAll(this, 0);
}

//----- (006C7C40) --------------------------------------------------------
char __thiscall CMiniHouseMgr::Remove(CMiniHouseMgr *this, unsigned __int16 kHandle)
{
  CMiniHouseMgr *v2; // edi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *v3; // ebx@1
  stMINIHOUSEINFO *v4; // esi@2
  char result; // al@2
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > > iter; // [sp+8h] [bp-4h]@1

  v2 = this;
  std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,long>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > *)&this->m_mapInfo.comp,
    &iter,
    &kHandle);
  v3 = iter._Ptr;
  if ( iter._Ptr == v2->m_mapInfo._Myhead )
  {
    result = 0;
  }
  else
  {
    v4 = iter._Ptr->_Myval.second;
    World::DetachMiniHouse(&g_kWorld, v4->pkNode);
    operator delete(v4);
    std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
      (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)v2,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > *)&kHandle,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > >)v3);
    result = 1;
  }
  return result;
}

//----- (006C7CA0) --------------------------------------------------------
void __thiscall CMiniHouseMgr::~CMiniHouseMgr(CMiniHouseMgr *this)
{
  CMiniHouseMgr *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *v2; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v3; // ST04_4@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > result; // [sp+8h] [bp-14h]@1
  CMiniHouseMgr *v5; // [sp+Ch] [bp-10h]@1
  int v6; // [sp+18h] [bp-4h]@1

  v1 = this;
  v5 = this;
  v2 = this->m_mapInfo._Myhead;
  v3._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v2->_Left;
  v6 = 0;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)this,
    &result,
    v3,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >)v2);
  operator delete(v1->m_mapInfo._Myhead);
}

//----- (006C7D00) --------------------------------------------------------
char __thiscall CMiniHouseMgr::AddInfo(CMiniHouseMgr *this, PROTO_NC_BRIEFINFO_MINIHOUSEBUILD_CMD *p)
{
  CMiniHouseMgr *v2; // edi@1
  char result; // al@2
  NiNode *v4; // eax@3
  NiNode *v5; // ebx@3
  CarToonShader *v6; // eax@5
  CarToonShader *v7; // eax@6
  void *v8; // edi@9
  char *v9; // eax@10
  char v10; // dl@11
  unsigned __int16 v11; // ax@12
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *v12; // eax@12
  float fY; // ST04_4@12
  float fX; // ST00_4@12
  NiNode *fAngle; // [sp+8h] [bp-50h]@4
  NiPoint3 kPos; // [sp+18h] [bp-40h]@12
  std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *v17; // [sp+24h] [bp-34h]@1
  std::pair<unsigned short const ,unsigned long> _Val; // [sp+28h] [bp-30h]@7
  NiMatrix3 rot; // [sp+30h] [bp-28h]@12

  v2 = this;
  v17 = (std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)this;
  if ( p->handle == -1 )
  {
    result = 0;
  }
  else
  {
    v4 = CharResMgr::GetHouse(&g_kCharResMgr, p->camp.minihouse);
    v5 = v4;
    if ( !v4 )
      goto LABEL_16;
    fAngle = v4;
    if ( MachineOpt::ms_kGraphicOption.bViewOutLine )
    {
      v6 = CarToonShader::GetInstance();
      CarToonShader::SetCartoonShader(v6, fAngle);
    }
    else
    {
      v7 = CarToonShader::GetInstance();
      CarToonShader::SetExceptOutLineCartoonShader(v7, fAngle);
    }
    std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,long>>,0>>::find(
      (std::_Tree<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > *)&v2->m_mapInfo.comp,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > > *)&_Val.second,
      &p->handle);
    if ( (std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *)_Val.second != v2->m_mapInfo._Myhead )
      CMiniHouseMgr::Remove(v2, p->handle);
    v8 = operator new(0x40u);
    if ( v8 )
    {
      *(_DWORD *)((char *)v8 + 30) = 0;
      *(_DWORD *)((char *)v8 + 26) = 0;
      *(_DWORD *)((char *)v8 + 22) = 0;
      *(_DWORD *)((char *)v8 + 18) = 0;
      *(_DWORD *)((char *)v8 + 14) = 0;
      stMINIHOUSEINFO::Clear((stMINIHOUSEINFO *)v8);
      *(_WORD *)v8 = p->handle;
      *(_QWORD *)((char *)v8 + 14) = *(_QWORD *)&p->charid.n5_name[0];
      *(_QWORD *)((char *)v8 + 22) = *(_QWORD *)&p->charid.n5_code[2];
      *(_DWORD *)((char *)v8 + 30) = p->charid.n5_code[4];
      *(_DWORD *)((char *)v8 + 2) = *(_DWORD *)&p->camp.minihouse;
      *(_DWORD *)((char *)v8 + 6) = *(_DWORD *)&p->camp.dummy[2];
      *(_DWORD *)((char *)v8 + 10) = *(_DWORD *)&p->camp.dummy[6];
      v9 = p->title;
      _Val.second = (unsigned int)&p->title[1];
      do
        v10 = *v9++;
      while ( v10 );
      strncpy((char *)v8 + 40, p->title, (unsigned int)&v9[-_Val.second]);
      NiObjectNET::SetName((NiObjectNET *)&v5->vfptr, *(const char **)&v17[1].comp.0);
      *((_DWORD *)v8 + 9) = v5;
      v11 = p->handle;
      _Val.second = (unsigned int)v8;
      _Val.first = v11;
      v12 = std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned long>>,0>>::_Buynode<std::pair<unsigned short const,unsigned long>>(
              v17,
              &_Val);
      std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::_Linsert(
        (std::_Tree<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)v17,
        (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > >,bool> *)&_Val,
        v12,
        0);
      fX = (double)p->coord.xy.x;
      fY = (double)p->coord.xy.y;
      World::GetAdvGroundPos(&g_kWorld, fX, fY, &kPos);
      v5->m_kLocal.m_Translate = kPos;
      *(float *)&_Val.second = (double)(((unsigned int)p->coord.dir + 90) % 0xB4) * (NI_PI + NI_PI) / 180.0;
      NiMatrix3::MakeIdentity(&rot);
      NiMatrix3::MakeZRotation(&rot, *(float *)&_Val.second);
      qmemcpy(&v5->m_kLocal, &rot, 0x24u);
      World::AttachMiniHouse(&g_kWorld, v5);
      result = 1;
    }
    else
    {
LABEL_16:
      result = 0;
    }
  }
  return result;
}
// B622CC: using guessed type const float NI_PI;

//----- (006C7F30) --------------------------------------------------------
void __thiscall CMiniHouseMgr::CMiniHouseMgr(CMiniHouseMgr *this)
{
  CMiniHouseMgr *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *v2; // eax@1
  std::exception pExceptionObject; // [sp+4h] [bp-10h]@3
  char *_What; // [sp+10h] [bp-4h]@3

  v1 = this;
  this->m_mapInfo._Mysize = 0;
  v2 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> >::_Node *)operator new(0x18u);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_mapInfo._Myhead = v2;
  v2->_Left = v2;
  v1->m_mapInfo._Myhead->_Parent = v1->m_mapInfo._Myhead;
  v1->m_mapInfo._Myhead->_Right = v1->m_mapInfo._Myhead;
  v1->m_mapInfo._Myhead->_Color = 1;
  v1->m_mapInfo._Myhead->_Isnil = 1;
  v1->m_pcRootNodeName = "_MiniHouse_Node_";
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (006C7FB0) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::_Rrotate(std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> > *this, std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *_Wherenode)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v4; // ecx@3
  std::_Tree_nod<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >::_Node *v5; // ecx@5

  v2 = _Wherenode->_Left;
  _Wherenode->_Left = _Wherenode->_Left->_Right;
  v3 = v2->_Right;
  if ( !v3->_Isnil )
    v3->_Parent = _Wherenode;
  v2->_Parent = _Wherenode->_Parent;
  v4 = this->_Myhead;
  if ( _Wherenode == v4->_Parent )
  {
    v4->_Parent = v2;
    v2->_Right = _Wherenode;
    _Wherenode->_Parent = v2;
  }
  else
  {
    v5 = _Wherenode->_Parent;
    if ( _Wherenode == v5->_Right )
    {
      v5->_Right = v2;
      v2->_Right = _Wherenode;
      _Wherenode->_Parent = v2;
    }
    else
    {
      v5->_Left = v2;
      v2->_Right = _Wherenode;
      _Wherenode->_Parent = v2;
    }
  }
}

//----- (006C8010) --------------------------------------------------------
signed int __thiscall mhManagerMediator::Create(mhManagerMediator *this, NiNode *RootCollider)
{
  mhCollisionManager::Create(&this->m_CollisionManager, RootCollider);
  return 1;
}

//----- (006C8030) --------------------------------------------------------
bool __stdcall mhObjectManager::IsRootNiNodeName(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *TestName)
{
  return 0;
}

//----- (006C8040) --------------------------------------------------------
signed int __stdcall mhObject::SetTexture(int iTexID)
{
  return 1;
}

//----- (006C8050) --------------------------------------------------------
int __thiscall mhObject::SetParentGUID(mhObject *this, int iNewParentGUID)
{
  int result; // eax@1

  result = iNewParentGUID;
  this->m_iParentGUID = iNewParentGUID;
  return result;
}

//----- (006C8060) --------------------------------------------------------
mhReturnType __thiscall mhObject::SetAct(mhObject *this, unsigned __int16 handle, unsigned __int16 nexthandle)
{
  ResElement *v3; // eax@1
  NiActorManager *v4; // eax@5
  mhReturnType result; // eax@8

  v3 = this->m_pkResource;
  result = 0;
  if ( v3 && v3->m_bIsCanAnimation && v3->m_pActorMgr.m_pObject )
  {
    v4 = v3->m_bIsCanAnimation ? v3->m_pActorMgr.m_pObject : 0;
    if ( mhObjAniActor::SetAct(&this->m_AniActor, handle, nexthandle, v4) )
      result = 1;
  }
  return result;
}

//----- (006C80B0) --------------------------------------------------------
signed int __thiscall mhObject::SetPos(mhObject *this, NiPoint3 *NewPos)
{
  ResElement *v2; // eax@1
  NiActorManager *v3; // edx@2
  NiNode *v4; // eax@3
  ResElement *v5; // eax@5
  NiActorManager *v6; // ecx@6
  NiAVObject *v7; // ecx@7

  v2 = this->m_pkResource;
  if ( v2->m_bIsCanAnimation && (v3 = v2->m_pActorMgr.m_pObject) != 0 )
    v4 = (NiNode *)v3->m_spNIFRoot.m_pObject;
  else
    v4 = v2->m_pNiNode.m_pObject;
  v4->m_kLocal.m_Translate = *NewPos;
  v5 = this->m_pkResource;
  if ( v5->m_bIsCanAnimation && (v6 = v5->m_pActorMgr.m_pObject) != 0 )
    v7 = v6->m_spNIFRoot.m_pObject;
  else
    v7 = (NiAVObject *)&v5->m_pNiNode.m_pObject->vfptr;
  NiAVObject::Update(v7, 0.0, 1);
  return 1;
}

//----- (006C8110) --------------------------------------------------------
int __thiscall mhObject::Update(mhObject *this, float ftime)
{
  ResElement *v2; // eax@1
  int result; // eax@2

  v2 = this->m_pkResource;
  if ( v2->m_bIsCanAnimation )
    result = ((int (__stdcall *)(_DWORD, NiActorManager *))this->m_AniActor.vfptr->update)(
               LODWORD(ftime),
               v2->m_pActorMgr.m_pObject) != 10002 ? 1 : 10002;
  else
    result = 0;
  return result;
}

//----- (006C8150) --------------------------------------------------------
signed int __thiscall mhObject::SetRotAngle(mhObject *this, float fAngle)
{
  mhObject *v2; // ebx@1
  ResElement *v3; // eax@1
  NiActorManager *v4; // ecx@2
  NiNode *v5; // eax@3
  ResElement *v6; // eax@5
  NiActorManager *v7; // ecx@6
  NiAVObject *v8; // ecx@7
  NiMatrix3 rot; // [sp+10h] [bp-28h]@1

  v2 = this;
  NiMatrix3::MakeIdentity(&rot);
  NiMatrix3::MakeZRotation(&rot, fAngle);
  v3 = v2->m_pkResource;
  if ( v3->m_bIsCanAnimation && (v4 = v3->m_pActorMgr.m_pObject) != 0 )
    v5 = (NiNode *)v4->m_spNIFRoot.m_pObject;
  else
    v5 = v3->m_pNiNode.m_pObject;
  qmemcpy(&v5->m_kLocal, &rot, 0x24u);
  v6 = v2->m_pkResource;
  if ( v6->m_bIsCanAnimation && (v7 = v6->m_pActorMgr.m_pObject) != 0 )
    v8 = v7->m_spNIFRoot.m_pObject;
  else
    v8 = (NiAVObject *)&v6->m_pNiNode.m_pObject->vfptr;
  NiAVObject::Update(v8, 0.0, 1);
  return 1;
}

//----- (006C81E0) --------------------------------------------------------
void __thiscall mhObject::ColiAct(mhObject *this)
{
  int v1; // esi@1
  mhObject *v2; // ebx@1
  int v3; // edi@1
  unsigned __int16 **v4; // eax@3
  unsigned __int16 *v5; // eax@4
  MiniHouseObjAni *v6; // eax@5

  v1 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  v2 = this;
  v3 = LOWORD(this->m_iResGUID);
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                          ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                          v3) )
  {
    if ( (unsigned __int16)v3 <= *(_WORD *)(v1 + 200) )
    {
      v4 = (unsigned __int16 **)(*(_DWORD *)(v1 + 196) + 4 * v3);
      if ( *v4 )
      {
        v5 = *v4;
        if ( v5 )
        {
          v6 = MiniHouseObjAniInfoTab::GetObjInfobyAniGroup(*v5, 0xC350u, 0);
          if ( v6 )
            mhObject::SetAct(v2, v6->Handle, v6->NextAniHandle);
        }
      }
    }
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (006C8250) --------------------------------------------------------
bool __thiscall mhObject::GetCloseAniState(mhObject *this)
{
  mhObject *v1; // esi@1
  MiniHouseObjAni *v2; // eax@2
  ResElement *v3; // ecx@3
  NiActorManager *v4; // edx@4
  NiActorManager *v5; // ecx@8
  bool result; // al@11

  v1 = this;
  result = 0;
  if ( this->m_pkResource->m_bIsCanAnimation == 1 )
  {
    v2 = MiniHouseObjAniInfoTab::GetObjInfobyAniGroup(this->m_iResGUID, 0x2712u, 0);
    if ( v2 )
    {
      v3 = v1->m_pkResource;
      v4 = v3->m_bIsCanAnimation ? v3->m_pActorMgr.m_pObject : 0;
      if ( v2->EventCode == v4->m_eTargetID )
      {
        v5 = v3->m_bIsCanAnimation ? v3->m_pActorMgr.m_pObject : 0;
        if ( !mhObjAniActor::AskAniGroupState(10002, v5) )
          result = 1;
      }
    }
  }
  return result;
}

//----- (006C82C0) --------------------------------------------------------
bool __stdcall mhObjectManager::AskDelayedDelObj(mhObject *pObj)
{
  return MiniHouseObjAniInfoTab::GetObjInfobyAniGroup(pObj->m_iResGUID, 0x2712u, 0) != 0;
}

//----- (006C82F0) --------------------------------------------------------
mhObject *__thiscall mhObjectManager::FindDelayedDelObj(mhObjectManager *this)
{
  mhObjectManager *v1; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> >::_Node *v3; // esi@1
  mhObject *v4; // edi@2
  MiniHouseObjAni *v5; // eax@3
  ResElement *v6; // ecx@4
  NiActorManager *v7; // edx@5
  NiActorManager *v8; // ecx@9
  std::_Tree_nod<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> >::_Node *v9; // ecx@13
  std::_Tree_nod<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> >::_Node *v10; // eax@14
  std::_Tree_nod<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> >::_Node *i; // eax@17
  mhObject *result; // eax@22

  v1 = this;
  v2 = this->m_mapObject._Myhead;
  v3 = v2->_Left;
  if ( v2->_Left == v2 )
  {
LABEL_22:
    result = 0;
  }
  else
  {
    while ( 1 )
    {
      v4 = v3->_Myval.second;
      if ( v4->m_pkResource->m_bIsCanAnimation == 1 )
      {
        v5 = MiniHouseObjAniInfoTab::GetObjInfobyAniGroup(v4->m_iResGUID, 0x2712u, 0);
        if ( v5 )
        {
          v6 = v4->m_pkResource;
          v7 = v6->m_bIsCanAnimation ? v6->m_pActorMgr.m_pObject : 0;
          if ( v5->EventCode == v7->m_eTargetID )
          {
            v8 = v6->m_bIsCanAnimation ? v6->m_pActorMgr.m_pObject : 0;
            if ( !mhObjAniActor::AskAniGroupState(10002, v8) )
              break;
          }
        }
      }
      if ( !v3->_Isnil )
      {
        v9 = v3->_Right;
        if ( v9->_Isnil )
        {
          for ( i = v3->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v3 != i->_Right )
              break;
            v3 = i;
          }
          v3 = i;
        }
        else
        {
          v10 = v9->_Left;
          if ( !v9->_Left->_Isnil )
          {
            do
            {
              v9 = v10;
              v10 = v10->_Left;
            }
            while ( !v10->_Isnil );
          }
          v3 = v9;
        }
      }
      if ( v3 == v1->m_mapObject._Myhead )
        goto LABEL_22;
    }
    result = v3->_Myval.second;
  }
  return result;
}

//----- (006C83C0) --------------------------------------------------------
int __thiscall mhObjectManager::Update(mhObjectManager *this, float ftime)
{
  mhObjectManager *v2; // edi@1
  std::_Tree_nod<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> >::_Node *v3; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> >::_Node *v4; // esi@1
  signed int v5; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> >::_Node *v6; // eax@5
  std::_Tree_nod<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> >::_Node *j; // eax@6
  std::_Tree_nod<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> >::_Node *i; // eax@9

  v2 = this;
  v3 = this->m_mapObject._Myhead;
  v4 = v3->_Left;
  v5 = 1;
  if ( v3->_Left != v3 )
  {
    do
    {
      if ( ((int (__stdcall *)(_DWORD))v4->_Myval.second->vfptr->Update)(LODWORD(ftime)) == 10002 )
        v5 = 14;
      if ( !v4->_Isnil )
      {
        v6 = v4->_Right;
        if ( v6->_Isnil )
        {
          for ( i = v4->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v4 != i->_Right )
              break;
            v4 = i;
          }
          v4 = i;
        }
        else
        {
          v4 = v4->_Right;
          for ( j = v6->_Left; !j->_Isnil; j = j->_Left )
            v4 = j;
        }
      }
    }
    while ( v4 != v2->m_mapObject._Myhead );
  }
  return v5;
}

//----- (006C8450) --------------------------------------------------------
int __thiscall mhObjectManager::FindObjectID(mhObjectManager *this, NiNode *pRootNiNode)
{
  std::_Tree_nod<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> >::_Node *v3; // esi@1
  mhObject *v4; // eax@2
  char *v5; // ecx@3
  ResElement *v6; // eax@4
  NiActorManager *v7; // edx@5
  NiNode *v8; // edx@6
  NiActorManager *v9; // edx@10
  NiNode *v10; // eax@11
  std::_Tree_nod<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> >::_Node *v12; // ecx@19
  std::_Tree_nod<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> >::_Node *v13; // eax@20
  std::_Tree_nod<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> >::_Node *i; // eax@23
  mhObjectManager *v15; // [sp+Ch] [bp-4h]@1

  v2 = this->m_mapObject._Myhead;
  v3 = v2->_Left;
  v15 = this;
  if ( v2->_Left != v2 )
  {
    do
    {
      v4 = v3->_Myval.second;
      if ( v4 )
      {
        v5 = pRootNiNode->m_pcName;
        if ( v5 )
        {
          v6 = v4->m_pkResource;
          if ( v6->m_bIsCanAnimation && (v7 = v6->m_pActorMgr.m_pObject) != 0 )
            v8 = (NiNode *)v7->m_spNIFRoot.m_pObject;
          else
            v8 = v6->m_pNiNode.m_pObject;
          if ( v8->m_pcName )
          {
            if ( v6->m_bIsCanAnimation && (v9 = v6->m_pActorMgr.m_pObject) != 0 )
              v10 = (NiNode *)v9->m_spNIFRoot.m_pObject;
            else
              v10 = v6->m_pNiNode.m_pObject;
            if ( !strcmp(v10->m_pcName, v5) )
              return v3->_Myval.first;
          }
        }
      }
      else if ( pRootNiNode->m_pcName )
      {
        OutputDebugStringA("itObj->GetName() Error !!- findObj\n");
      }
      else
      {
        OutputDebugStringA("pRootName Error !!- findObj\n");
      }
      if ( !v3->_Isnil )
      {
        v12 = v3->_Right;
        if ( v12->_Isnil )
        {
          for ( i = v3->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v3 != i->_Right )
              break;
            v3 = i;
          }
          v3 = i;
        }
        else
        {
          v13 = v12->_Left;
          if ( !v12->_Left->_Isnil )
          {
            do
            {
              v12 = v13;
              v13 = v13->_Left;
            }
            while ( !v13->_Isnil );
          }
          v3 = v12;
        }
      }
    }
    while ( v3 != v15->m_mapObject._Myhead );
  }
  return -1;
}

//----- (006C8560) --------------------------------------------------------
signed int __thiscall mhObjectManager::Clear(mhObjectManager *this)
{
  std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *v1; // edi@1
  signed int v2; // eax@2
  std::_Tree_nod<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> >::_Node *v3; // eax@3
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v4; // esi@3
  void (__stdcall ***v5)(_DWORD); // ecx@4
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > v6; // ecx@6
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v7; // eax@7
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *j; // eax@8
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *i; // eax@11
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > result; // [sp+4h] [bp-4h]@15

  v1 = (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)this;
  if ( this->m_mapObject._Mysize )
  {
    v3 = this->m_mapObject._Myhead;
    v4 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v3->_Left;
    if ( v3->_Left != v3 )
    {
      do
      {
        v5 = (void (__stdcall ***)(_DWORD))v4->_Myval.second;
        if ( v5 )
          (**v5)(1);
        v6._Ptr = v4;
        if ( !v4->_Isnil )
        {
          v7 = v4->_Right;
          if ( v7->_Isnil )
          {
            for ( i = v4->_Parent; !i->_Isnil; i = i->_Parent )
            {
              if ( v4 != i->_Right )
                break;
              v4 = i;
            }
            v4 = i;
          }
          else
          {
            v4 = v4->_Right;
            for ( j = v7->_Left; !j->_Isnil; j = j->_Left )
              v4 = j;
          }
        }
        std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
          v1,
          &result,
          v6);
      }
      while ( v4 != v1->_Myhead );
    }
    v2 = v1->_Mysize == 0;
  }
  else
  {
    v2 = 1;
  }
  return v2;
}

//----- (006C8600) --------------------------------------------------------
void __thiscall mhObject::DelObjSeatInfo(mhObject *this, unsigned __int16 CharhWnd)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *v2; // esi@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > v3; // edx@1
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v4; // eax@4
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *j; // eax@5
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *i; // eax@8

  v2 = this->m_mapEmotionInfo._Myhead;
  v3._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v2->_Left;
  if ( v2->_Left != v2 )
  {
    while ( HIWORD(v3._Ptr->_Myval) != CharhWnd )
    {
      if ( !v3._Ptr->_Isnil )
      {
        v4 = v3._Ptr->_Right;
        if ( v4->_Isnil )
        {
          for ( i = v3._Ptr->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v3._Ptr != i->_Right )
              break;
            v3._Ptr = i;
          }
          v3._Ptr = i;
        }
        else
        {
          v3._Ptr = v3._Ptr->_Right;
          for ( j = v4->_Left; !j->_Isnil; j = j->_Left )
            v3._Ptr = j;
        }
      }
      if ( (std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *)v3._Ptr == v2 )
        return;
    }
    std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0>>::erase(
      (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&this->m_mapEmotionInfo,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *)&CharhWnd,
      v3);
  }
}

//----- (006C8680) --------------------------------------------------------
void __thiscall mhObject::AllClearObjSeatInfo(mhObject *this)
{
  mhObject *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *v2; // ecx@1
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v3; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > result; // [sp+4h] [bp-4h]@2

  v1 = this;
  v2 = this->m_mapEmotionInfo._Myhead;
  v3 = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v2->_Left;
  if ( v2->_Left != v2 )
  {
    do
      v3 = std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0>>::erase(
             (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v1->m_mapEmotionInfo,
             &result,
             (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >)v3)->_Ptr;
    while ( v3 != (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v1->m_mapEmotionInfo._Myhead );
  }
}

//----- (006C86B0) --------------------------------------------------------
char __thiscall mhObject::GetmhEmotionCharPos(mhObject *this, unsigned __int16 CharhWnd)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *v2; // edx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *v3; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *v4; // eax@4
  std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *j; // eax@5
  std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *i; // eax@8
  char result; // al@13

  v2 = this->m_mapEmotionInfo._Myhead;
  v3 = v2->_Left;
  if ( v2->_Left == v2 )
  {
LABEL_13:
    result = -1;
  }
  else
  {
    while ( v3->_Myval.second != CharhWnd )
    {
      if ( !v3->_Isnil )
      {
        v4 = v3->_Right;
        if ( v4->_Isnil )
        {
          for ( i = v3->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v3 != i->_Right )
              break;
            v3 = i;
          }
          v3 = i;
        }
        else
        {
          v3 = v3->_Right;
          for ( j = v4->_Left; !j->_Isnil; j = j->_Left )
            v3 = j;
        }
      }
      if ( v3 == v2 )
        goto LABEL_13;
    }
    result = v3->_Myval.first;
  }
  return result;
}

//----- (006C8720) --------------------------------------------------------
ResElement *__thiscall mhObject::GetResElement(mhObject *this, MHE_STEP Endure)
{
  mhObject *v2; // esi@1
  ResElement *result; // eax@2
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum MHE_STEP,ResElement *,std::less<enum MHE_STEP>,std::allocator<std::pair<enum MHE_STEP const ,ResElement *> >,0> > > it; // [sp+4h] [bp-4h]@1

  v2 = this;
  std::_Tree<std::_Tmap_traits<enum  MHE_STEP,ResElement *,std::less<enum  MHE_STEP>,std::allocator<std::pair<enum  MHE_STEP const,ResElement *>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *)&this->m_pkModelRes,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > *)&it,
    (OscTarget *)&Endure);
  if ( it._Ptr == v2->m_pkModelRes._Myhead )
    result = 0;
  else
    result = it._Ptr->_Myval.second;
  return result;
}

//----- (006C8760) --------------------------------------------------------
char __thiscall mhObject::SetEndureStep(mhObject *this, MHE_STEP e)
{
  MHE_STEP v2; // esi@1
  mhObject *v3; // ebx@1
  __int32 v4; // eax@2
  ResElement *v5; // edx@8
  ResElement *v6; // eax@9
  NiActorManager *v7; // ecx@11
  NiNode *v8; // eax@12
  NiActorManager *v9; // ecx@15
  NiNode *v10; // ecx@16
  ResElement *v11; // eax@18
  NiActorManager *v12; // ecx@19
  NiNode *v13; // eax@20
  NiActorManager *v14; // ecx@23
  NiNode *v15; // ecx@24
  char v16; // al@27
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > result; // [sp+8h] [bp-8h]@2
  OscTarget _Keyval; // [sp+Ch] [bp-4h]@2

  v2 = e;
  v3 = this;
  if ( e )
  {
    if ( e == 4 )
    {
      result._Ptr = (std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *)3;
      std::_Tree<std::_Tmap_traits<enum  MHE_STEP,ResElement *,std::less<enum  MHE_STEP>,std::allocator<std::pair<enum  MHE_STEP const,ResElement *>>,0>>::find(
        (std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *)&this->m_pkModelRes,
        (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > *)&_Keyval,
        (OscTarget *)&result);
    }
    else
    {
      result._Ptr = (std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *)e;
      std::_Tree<std::_Tmap_traits<enum  MHE_STEP,ResElement *,std::less<enum  MHE_STEP>,std::allocator<std::pair<enum  MHE_STEP const,ResElement *>>,0>>::find(
        (std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *)&this->m_pkModelRes,
        (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > *)&_Keyval,
        (OscTarget *)&result);
    }
    v4 = _Keyval;
  }
  else
  {
    _Keyval = 1;
    std::_Tree<std::_Tmap_traits<enum  MHE_STEP,ResElement *,std::less<enum  MHE_STEP>,std::allocator<std::pair<enum  MHE_STEP const,ResElement *>>,0>>::find(
      (std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *)&this->m_pkModelRes,
      &result,
      &_Keyval);
    v4 = (__int32)result._Ptr;
  }
  if ( (std::_Tree_nod<std::_Tmap_traits<enum MHE_STEP,ResElement *,std::less<enum MHE_STEP>,std::allocator<std::pair<enum MHE_STEP const ,ResElement *> >,0> >::_Node *)v4 != v3->m_pkModelRes._Myhead
    && (v5 = *(ResElement **)(v4 + 16)) != 0 )
  {
    v6 = v3->m_pkResource;
    if ( v6 )
    {
      if ( v6->m_bIsCanAnimation && (v7 = v6->m_pActorMgr.m_pObject) != 0 )
        v8 = (NiNode *)v7->m_spNIFRoot.m_pObject;
      else
        v8 = v6->m_pNiNode.m_pObject;
      if ( v5->m_bIsCanAnimation && (v9 = v5->m_pActorMgr.m_pObject) != 0 )
        v10 = (NiNode *)v9->m_spNIFRoot.m_pObject;
      else
        v10 = v5->m_pNiNode.m_pObject;
      v10->m_kLocal.m_Translate.x = v8->m_kLocal.m_Translate.x;
      v10->m_kLocal.m_Translate.y = v8->m_kLocal.m_Translate.y;
      v10->m_kLocal.m_Translate.z = v8->m_kLocal.m_Translate.z;
      v11 = v3->m_pkResource;
      if ( v11->m_bIsCanAnimation && (v12 = v11->m_pActorMgr.m_pObject) != 0 )
        v13 = (NiNode *)v12->m_spNIFRoot.m_pObject;
      else
        v13 = v11->m_pNiNode.m_pObject;
      if ( v5->m_bIsCanAnimation && (v14 = v5->m_pActorMgr.m_pObject) != 0 )
        v15 = (NiNode *)v14->m_spNIFRoot.m_pObject;
      else
        v15 = v5->m_pNiNode.m_pObject;
      qmemcpy(&v15->m_kLocal, &v13->m_kLocal, 0x24u);
      v2 = e;
    }
    v3->m_Endure = v2;
    v3->m_pkResource = v5;
    v16 = 1;
  }
  else
  {
    v16 = 0;
  }
  return v16;
}

//----- (006C8870) --------------------------------------------------------
signed int __thiscall mhObjectManager::RemoveObject(mhObjectManager *this, int iObjGUID)
{
  mhObjectManager *v2; // edi@1
  std::_Tree_nod<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> >::_Node *v3; // esi@1
  signed int result; // eax@2
  mhObject *v5; // ecx@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> > > itResult; // [sp+8h] [bp-4h]@1

  v2 = this;
  std::_Tree<std::_Tmap_traits<enum  MHE_STEP,ResElement *,std::less<enum  MHE_STEP>,std::allocator<std::pair<enum  MHE_STEP const,ResElement *>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *)this,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > *)&itResult,
    (OscTarget *)&iObjGUID);
  v3 = itResult._Ptr;
  if ( itResult._Ptr == v2->m_mapObject._Myhead )
  {
    result = 8;
  }
  else
  {
    v5 = itResult._Ptr->_Myval.second;
    if ( v5 )
    {
      ((void (__stdcall *)(_DWORD))v5->vfptr->__vecDelDtor)(1);
      v3->_Myval.second = 0;
    }
    std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
      (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)v2,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > *)&iObjGUID,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > >)v3);
    result = 1;
  }
  return result;
}

//----- (006C88D0) --------------------------------------------------------
signed int __thiscall mhObjectManager::DelObject(mhObjectManager *this, int iObjGUID)
{
  mhObjectManager *v2; // edi@1
  std::_Tree_nod<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> >::_Node *v3; // esi@1
  mhObject *v5; // eax@3
  MiniHouseObjAni *v6; // eax@4
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> > > itResult; // [sp+8h] [bp-4h]@1

  v2 = this;
  std::_Tree<std::_Tmap_traits<enum  MHE_STEP,ResElement *,std::less<enum  MHE_STEP>,std::allocator<std::pair<enum  MHE_STEP const,ResElement *>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *)this,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > *)&itResult,
    (OscTarget *)&iObjGUID);
  v3 = itResult._Ptr;
  if ( itResult._Ptr == v2->m_mapObject._Myhead )
    return 8;
  v5 = itResult._Ptr->_Myval.second;
  if ( v5 )
  {
    v6 = MiniHouseObjAniInfoTab::GetObjInfobyAniGroup(v5->m_iResGUID, 0x2712u, 0);
    if ( v6 )
    {
      mhObject::SetAct(v3->_Myval.second, v6->Handle, v6->NextAniHandle);
      return 14;
    }
    mhObjectManager::RemoveObject(v2, iObjGUID);
  }
  return 1;
}

//----- (006C8950) --------------------------------------------------------
mhObject *__thiscall mhObjectManager::GetObjectA(mhObjectManager *this, int iObjGUID)
{
  mhObjectManager *v2; // esi@1
  mhObject *result; // eax@2
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> > > itResult; // [sp+4h] [bp-4h]@1

  v2 = this;
  std::_Tree<std::_Tmap_traits<enum  MHE_STEP,ResElement *,std::less<enum  MHE_STEP>,std::allocator<std::pair<enum  MHE_STEP const,ResElement *>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *)this,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > *)&itResult,
    (OscTarget *)&iObjGUID);
  if ( itResult._Ptr == v2->m_mapObject._Myhead )
    result = 0;
  else
    result = itResult._Ptr->_Myval.second;
  return result;
}

//----- (006C8980) --------------------------------------------------------
signed int __thiscall mhObjectManager::SetRotate(mhObjectManager *this, int iObjGUID, float fAngle)
{
  mhObjectManager *v3; // esi@1
  mhObject *v4; // ecx@2
  signed int v5; // eax@3
  ResElement *v6; // eax@4
  NiActorManager *v7; // edx@5
  NiNode *v8; // eax@6
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > result; // [sp+4h] [bp-4h]@1

  v3 = this;
  std::_Tree<std::_Tmap_traits<enum  MHE_STEP,ResElement *,std::less<enum  MHE_STEP>,std::allocator<std::pair<enum  MHE_STEP const,ResElement *>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *)this,
    &result,
    (OscTarget *)&iObjGUID);
  if ( result._Ptr != (std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *)v3->m_mapObject._Myhead
    && (v4 = (mhObject *)result._Ptr->_Myval.second) != 0 )
  {
    v6 = v4->m_pkResource;
    if ( v6->m_bIsCanAnimation && (v7 = v6->m_pActorMgr.m_pObject) != 0 )
      v8 = (NiNode *)v7->m_spNIFRoot.m_pObject;
    else
      v8 = v6->m_pNiNode.m_pObject;
    if ( v8 )
    {
      mhObject::SetRotAngle(v4, fAngle);
      v5 = 1;
    }
    else
    {
      v5 = 2;
    }
  }
  else
  {
    v5 = 8;
  }
  return v5;
}

//----- (006C8A00) --------------------------------------------------------
mhObject *__thiscall mhObjectManager::GetmhEmotionObj(mhObjectManager *this, unsigned __int16 CharhWnd)
{
  std::_Tree_nod<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> >::_Node *v2; // edi@1
  std::_Tree_nod<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> >::_Node *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> >::_Node *v4; // eax@4
  std::_Tree_nod<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> >::_Node *j; // eax@5
  std::_Tree_nod<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> >::_Node *i; // eax@8
  mhObject *result; // eax@13

  v2 = this->m_mapObject._Myhead;
  v3 = v2->_Left;
  if ( v2->_Left == v2 )
  {
LABEL_13:
    result = 0;
  }
  else
  {
    while ( mhObject::GetmhEmotionCharPos(v3->_Myval.second, CharhWnd) == -1 )
    {
      if ( !v3->_Isnil )
      {
        v4 = v3->_Right;
        if ( v4->_Isnil )
        {
          for ( i = v3->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v3 != i->_Right )
              break;
            v3 = i;
          }
          v3 = i;
        }
        else
        {
          v3 = v3->_Right;
          for ( j = v4->_Left; !j->_Isnil; j = j->_Left )
            v3 = j;
        }
      }
      if ( v3 == v2 )
        goto LABEL_13;
    }
    result = v3->_Myval.second;
  }
  return result;
}

//----- (006C8A80) --------------------------------------------------------
bool __thiscall mhObject::IsEmptyOfObjSeat(mhObject *this, char ActPos)
{
  mhObject *v2; // esi@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > > it; // [sp+4h] [bp-4h]@1

  v2 = this;
  std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,unsigned short>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > *)&this->m_mapEmotionInfo.comp,
    &it,
    &ActPos);
  return it._Ptr == v2->m_mapEmotionInfo._Myhead;
}

//----- (006C8AB0) --------------------------------------------------------
unsigned __int16 __thiscall mhObject::WhoUseIt(mhObject *this, char ActPos)
{
  mhObject *v2; // esi@1
  unsigned __int16 result; // ax@2
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > > it; // [sp+4h] [bp-4h]@1

  v2 = this;
  std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,unsigned short>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > *)&this->m_mapEmotionInfo.comp,
    &it,
    &ActPos);
  if ( it._Ptr == v2->m_mapEmotionInfo._Myhead )
    result = -1;
  else
    result = it._Ptr->_Myval.second;
  return result;
}

//----- (006C8AF0) --------------------------------------------------------
signed int __thiscall mhObjectManager::SetPosition(mhObjectManager *this, int iObjGUID, NiPoint3 *SetPos)
{
  mhObjectManager *v3; // esi@1
  std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *v4; // eax@2
  signed int v5; // eax@3
  int v6; // eax@4
  int v7; // ecx@5
  int v8; // ecx@6
  int v9; // ecx@11
  int v10; // eax@12
  float v11; // edx@14
  double v12; // st7@14
  float v13; // ST14_4@14
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > result; // [sp+10h] [bp-4h]@1

  v3 = this;
  std::_Tree<std::_Tmap_traits<enum  MHE_STEP,ResElement *,std::less<enum  MHE_STEP>,std::allocator<std::pair<enum  MHE_STEP const,ResElement *>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *)this,
    &result,
    (OscTarget *)&iObjGUID);
  if ( result._Ptr != (std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *)v3->m_mapObject._Myhead
    && (v4 = result._Ptr->_Myval.second) != 0 )
  {
    v6 = *(_DWORD *)&v4[4].comp.0;
    if ( *(_BYTE *)(v6 + 12) && (v7 = *(_DWORD *)(v6 + 8)) != 0 )
      v8 = *(_DWORD *)(v7 + 12);
    else
      v8 = *(_DWORD *)(v6 + 4);
    if ( v8 )
    {
      if ( *(_BYTE *)(v6 + 12) && (v9 = *(_DWORD *)(v6 + 8)) != 0 )
        v10 = *(_DWORD *)(v9 + 12);
      else
        v10 = *(_DWORD *)(v6 + 4);
      v11 = SetPos->y;
      v12 = SetPos->z;
      *(float *)(v10 + 88) = SetPos->x;
      v13 = v12;
      *(float *)(v10 + 92) = v11;
      *(float *)(v10 + 96) = v13;
      v5 = 1;
    }
    else
    {
      v5 = 2;
    }
  }
  else
  {
    v5 = 8;
  }
  return v5;
}

//----- (006C8BA0) --------------------------------------------------------
signed int __thiscall mhObjectManager::SetNodeCullMode(mhObjectManager *this, int iObjGUID, bool bCullMode)
{
  mhObjectManager *v3; // esi@1
  std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *v4; // eax@2
  int v6; // eax@4
  int v7; // ecx@5
  int v8; // ecx@6
  int v9; // ecx@11
  int v10; // ecx@12
  int v11; // ecx@16
  int v12; // eax@17
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > result; // [sp+4h] [bp-4h]@1

  v3 = this;
  std::_Tree<std::_Tmap_traits<enum  MHE_STEP,ResElement *,std::less<enum  MHE_STEP>,std::allocator<std::pair<enum  MHE_STEP const,ResElement *>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *)this,
    &result,
    (OscTarget *)&iObjGUID);
  if ( result._Ptr == (std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *)v3->m_mapObject._Myhead )
    return 8;
  v4 = result._Ptr->_Myval.second;
  if ( !v4 )
    return 8;
  v6 = *(_DWORD *)&v4[4].comp.0;
  if ( *(_BYTE *)(v6 + 12) && (v7 = *(_DWORD *)(v6 + 8)) != 0 )
    v8 = *(_DWORD *)(v7 + 12);
  else
    v8 = *(_DWORD *)(v6 + 4);
  if ( !v8 )
    return 2;
  if ( *(_BYTE *)(v6 + 12) && (v9 = *(_DWORD *)(v6 + 8)) != 0 )
    v10 = *(_DWORD *)(v9 + 12);
  else
    v10 = *(_DWORD *)(v6 + 4);
  if ( (*(_BYTE *)(v10 + 28) & 1) != bCullMode )
  {
    if ( *(_BYTE *)(v6 + 12) && (v11 = *(_DWORD *)(v6 + 8)) != 0 )
      v12 = *(_DWORD *)(v11 + 12);
    else
      v12 = *(_DWORD *)(v6 + 4);
    if ( bCullMode )
    {
      *(_WORD *)(v12 + 28) |= 1u;
      return 1;
    }
    *(_WORD *)(v12 + 28) &= 0xFFFEu;
  }
  return 1;
}

//----- (006C8C60) --------------------------------------------------------
signed int __thiscall mhObjectManager::AddPosition(mhObjectManager *this, int iObjGUID, NiPoint3 *AddPos)
{
  mhObjectManager *v3; // esi@1
  std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *v4; // eax@2
  signed int v5; // eax@3
  int v6; // eax@4
  int v7; // ecx@5
  int v8; // ecx@6
  int v9; // ecx@11
  int v10; // ecx@12
  int v11; // ecx@15
  int v12; // eax@16
  float v13; // ST0C_4@18
  float v14; // ST10_4@18
  double v15; // st7@18
  float v16; // ST14_4@18
  float GetOldPos; // [sp+10h] [bp-10h]@14
  float GetOldPos_4; // [sp+14h] [bp-Ch]@14
  float GetOldPos_8; // [sp+18h] [bp-8h]@14
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > result; // [sp+1Ch] [bp-4h]@1

  v3 = this;
  std::_Tree<std::_Tmap_traits<enum  MHE_STEP,ResElement *,std::less<enum  MHE_STEP>,std::allocator<std::pair<enum  MHE_STEP const,ResElement *>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *)this,
    &result,
    (OscTarget *)&iObjGUID);
  if ( result._Ptr != (std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *)v3->m_mapObject._Myhead
    && (v4 = result._Ptr->_Myval.second) != 0 )
  {
    v6 = *(_DWORD *)&v4[4].comp.0;
    if ( *(_BYTE *)(v6 + 12) && (v7 = *(_DWORD *)(v6 + 8)) != 0 )
      v8 = *(_DWORD *)(v7 + 12);
    else
      v8 = *(_DWORD *)(v6 + 4);
    if ( v8 )
    {
      if ( *(_BYTE *)(v6 + 12) && (v9 = *(_DWORD *)(v6 + 8)) != 0 )
        v10 = *(_DWORD *)(v9 + 12);
      else
        v10 = *(_DWORD *)(v6 + 4);
      GetOldPos = *(float *)(v10 + 88);
      GetOldPos_4 = *(float *)(v10 + 92);
      GetOldPos_8 = *(float *)(v10 + 96);
      if ( *(_BYTE *)(v6 + 12) && (v11 = *(_DWORD *)(v6 + 8)) != 0 )
        v12 = *(_DWORD *)(v11 + 12);
      else
        v12 = *(_DWORD *)(v6 + 4);
      v13 = AddPos->x + GetOldPos;
      v14 = AddPos->y + GetOldPos_4;
      v15 = AddPos->z + GetOldPos_8;
      *(float *)(v12 + 88) = v13;
      *(float *)(v12 + 92) = v14;
      v16 = v15;
      *(float *)(v12 + 96) = v16;
      v5 = 1;
    }
    else
    {
      v5 = 2;
    }
  }
  else
  {
    v5 = 8;
  }
  return v5;
}

//----- (006C8D40) --------------------------------------------------------
signed int __thiscall mhObjectManager::AttachScene(mhObjectManager *this, const int iObjGUID, NiNode *pDestNiNode)
{
  mhObjectManager *v3; // esi@1
  mhObject *v4; // esi@2
  NiNode *v5; // ebx@3
  ResElement *v6; // eax@4
  NiActorManager *v7; // ecx@5
  NiNode *v8; // ecx@6
  signed int v9; // eax@9
  MiniHouseObjAni *v10; // eax@12
  ResElement *v11; // eax@14
  unsigned int v12; // edi@14
  NiActorManager *v13; // ecx@15
  NiNode *v14; // eax@16
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > result; // [sp+8h] [bp-4h]@1

  v3 = this;
  std::_Tree<std::_Tmap_traits<enum  MHE_STEP,ResElement *,std::less<enum  MHE_STEP>,std::allocator<std::pair<enum  MHE_STEP const,ResElement *>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *)this,
    &result,
    (OscTarget *)&iObjGUID);
  if ( result._Ptr != (std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *)v3->m_mapObject._Myhead
    && (v4 = (mhObject *)result._Ptr->_Myval.second) != 0
    && (v5 = pDestNiNode) != 0 )
  {
    v6 = v4->m_pkResource;
    if ( v6->m_bIsCanAnimation && (v7 = v6->m_pActorMgr.m_pObject) != 0 )
      v8 = (NiNode *)v7->m_spNIFRoot.m_pObject;
    else
      v8 = v6->m_pNiNode.m_pObject;
    if ( v8 )
    {
      if ( v6 )
      {
        if ( v6->m_bIsCanAnimation == 1 )
        {
          v10 = MiniHouseObjAniInfoTab::GetObjInfobyAniGroup(v4->m_iResGUID, 0x2711u, 0);
          if ( v10 )
            mhObject::SetAct(v4, v10->Handle, v10->NextAniHandle);
        }
      }
      v11 = v4->m_pkResource;
      v12 = v5->m_kChildren.m_uiESize;
      if ( v11->m_bIsCanAnimation && (v13 = v11->m_pActorMgr.m_pObject) != 0 )
        v14 = (NiNode *)v13->m_spNIFRoot.m_pObject;
      else
        v14 = v11->m_pNiNode.m_pObject;
      ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v5->vfptr[29].__vecDelDtor)(v5, v14, 0);
      v9 = v12 + 1 == v5->m_kChildren.m_uiESize;
    }
    else
    {
      v9 = 2;
    }
  }
  else
  {
    v9 = 8;
  }
  return v9;
}

//----- (006C8E30) --------------------------------------------------------
bool __thiscall mhObject::AddResElement(mhObject *this, MHE_STEP Endure, ResElement *pkResEle)
{
  std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *v3; // esi@2
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v4; // eax@2
  bool result; // al@2
  std::pair<enum MHE_STEP,ResElement *> addEle; // [sp+0h] [bp-8h]@2

  if ( __PAIR__((unsigned int)pkResEle, Endure) > 5 )
  {
    result = 0;
  }
  else
  {
    addEle.second = pkResEle;
    v3 = (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&this->m_pkModelRes;
    addEle.first = Endure;
    v4 = std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(
           (std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&this->m_pkModelRes,
           (std::pair<int const ,int> *)&addEle);
    std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::_Linsert(
      v3,
      (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > >,bool> *)&addEle,
      v4,
      0);
    result = LOBYTE(addEle.second) != 0;
  }
  return result;
}

//----- (006C8E80) --------------------------------------------------------
NiNode *__stdcall mhObjectManager::FindRootNode(NiNode *pNiNode)
{
  char *v2; // ecx@1
  unsigned int v3; // esi@1
  NiNode *result; // eax@4
  unsigned int v5; // edi@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v6; // edx@8
  unsigned int v7; // ecx@10
  const char *v8; // eax@12
  int v9; // eax@14
  NiNode *v10; // eax@17
  const char *v11; // edx@18
  char *v12; // eax@19
  char v13; // cl@20
  NiNode *pkTravel; // [sp+Ch] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > NodeName; // [sp+10h] [bp-2Ch]@1
  int v16; // [sp+38h] [bp-4h]@1

  v2 = pNiNode->m_pcName;
  pkTravel = pNiNode;
  NodeName._Myres = 15;
  NodeName._Mysize = 0;
  NodeName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&NodeName, v2, strlen(v2));
  v3 = NodeName._Mysize;
  v16 = 0;
  if ( NodeName._Mysize )
  {
    v5 = mhObjDefaultRootName_1._Mysize;
    if ( mhObjDefaultRootName_1._Mysize < NodeName._Mysize )
    {
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::erase(
        &NodeName,
        mhObjDefaultRootName_1._Mysize,
        NodeName._Mysize);
      v3 = NodeName._Mysize;
      v5 = mhObjDefaultRootName_1._Mysize;
    }
    if ( v3 )
    {
      while ( 1 )
      {
        v6 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)mhObjDefaultRootName_1._Bx._Ptr;
        if ( mhObjDefaultRootName_1._Myres < 0x10 )
          v6 = &mhObjDefaultRootName_1;
        v7 = v3;
        if ( v3 >= v5 )
          v7 = v5;
        v8 = NodeName._Bx._Ptr;
        if ( NodeName._Myres < 0x10 )
          v8 = (const char *)&NodeName;
        v9 = std::char_traits<char>::compare(v8, v6->_Bx._Buf, v7);
        if ( !v9 && v3 >= v5 )
        {
          LOBYTE(v9) = v3 != v5;
          if ( !v9 )
            break;
        }
        v10 = pkTravel->m_pkParent;
        pkTravel = v10;
        if ( !v10 )
        {
          if ( NodeName._Myres < 0x10 )
            goto LABEL_4;
          operator delete(NodeName._Bx._Ptr);
          return 0;
        }
        v11 = v10->m_pcName;
        if ( v11 )
        {
          v12 = v10->m_pcName;
          do
            v13 = *v12++;
          while ( v13 );
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&NodeName, v11, v12 - (v11 + 1));
          v5 = mhObjDefaultRootName_1._Mysize;
          v3 = NodeName._Mysize;
          if ( mhObjDefaultRootName_1._Mysize < NodeName._Mysize )
          {
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::erase(
              &NodeName,
              mhObjDefaultRootName_1._Mysize,
              NodeName._Mysize);
            v3 = NodeName._Mysize;
            v5 = mhObjDefaultRootName_1._Mysize;
          }
        }
      }
    }
    if ( NodeName._Myres >= 0x10 )
      operator delete(NodeName._Bx._Ptr);
    result = pkTravel;
  }
  else
  {
    if ( NodeName._Myres >= 0x10 )
      operator delete(NodeName._Bx._Ptr);
LABEL_4:
    result = 0;
  }
  return result;
}

//----- (006C9020) --------------------------------------------------------
signed int __userpurge mhObject::Create@<eax>(mhObject *this@<ecx>, int a2@<ebx>, int iGUID, mhResTableElement *pkResElement, int iTexID, mhObject::mhObjBindType btBindType, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *strRootName, int iParentGUID)
{
  mhObject *v8; // esi@1
  signed int result; // eax@2
  int v10; // ST0C_4@3
  int v11; // edi@3
  int v12; // ebx@3
  int *v13; // eax@5
  int v14; // eax@6
  MiniHouseFurniture *v15; // eax@7
  _DWORD *v16; // eax@9
  ResElement *v17; // edi@10
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v18; // eax@16
  std::pair<enum MHE_STEP,ResElement *> pairNewElement; // [sp+8h] [bp-8h]@16

  v8 = this;
  if ( pkResElement )
  {
    v10 = a2;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &this->m_RootName,
      strRootName,
      0,
      0xFFFFFFFF);
    v8->m_iGUID = iGUID;
    *(_WORD *)&v8->m_BindType.m_byBindType[0] = *(_WORD *)&btBindType.m_byBindType[0];
    v8->m_BindType.m_byBindType[2] = btBindType.m_byBindType[2];
    v8->m_iParentGUID = iParentGUID;
    v8->m_iResGUID = pkResElement->m_ElementID;
    v8->m_iMHResGUID = -1;
    std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,unsigned short>>,0>>::clear((std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v8->m_mapEmotionInfo);
    v11 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    v12 = LOWORD(v8->m_iResGUID);
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                               + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v12,
                            v10) )
    {
      if ( (unsigned __int16)v12 <= *(_WORD *)(v11 + 200) )
      {
        v13 = (int *)(*(_DWORD *)(v11 + 196) + 4 * v12);
        if ( *v13 )
        {
          v14 = *v13;
          if ( v14 )
          {
            v15 = MiniHouseFuritureInfoTab::GetObjByName((char *)(v14 + 2));
            if ( v15 )
              v8->m_iMHResGUID = v15->Handle;
          }
        }
      }
    }
    v16 = operator new(0x2Cu);
    if ( v16 )
    {
      *v16 = &ResElement::`vftable';
      v16[1] = 0;
      v16[2] = 0;
      *((_BYTE *)v16 + 12) = 0;
      v16[9] = 15;
      v16[8] = 0;
      *((_BYTE *)v16 + 16) = 0;
      v17 = (ResElement *)v16;
    }
    else
    {
      v17 = 0;
    }
    if ( ResElement::CloneResElement(v17, (ResElement *)&pkResElement->vfptr, strRootName) )
    {
      pairNewElement.first = 1;
      pairNewElement.second = v17;
      v18 = std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(
              (std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v8->m_pkModelRes,
              (std::pair<int const ,int> *)&pairNewElement);
      std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::_Linsert(
        (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v8->m_pkModelRes,
        (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > >,bool> *)&pairNewElement,
        v18,
        0);
      if ( LOBYTE(pairNewElement.second) )
      {
        mhObject::SetEndureStep(v8, MHE_STEP_1);
        result = 1;
      }
      else
      {
        if ( v17 )
          v17->vfptr->__vecDelDtor(v17, 1u);
        result = 5;
      }
    }
    else
    {
      if ( v17 )
        v17->vfptr->__vecDelDtor(v17, 1u);
      result = 3;
    }
  }
  else
  {
    result = 4;
  }
  return result;
}
// 6C9020: could not find valid save-restore pair for ebx
// 9BF8A4: using guessed type int (__thiscall *ResElement::`vftable')(void *p, char);
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (006C9190) --------------------------------------------------------
void __thiscall mhObject::AddObjSeatInfo(mhObject *this, int ActPos, unsigned __int16 CharhWnd)
{
  mhObject *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *v4; // eax@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > > it; // [sp+8h] [bp-8h]@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > > result; // [sp+Ch] [bp-4h]@1

  v3 = this;
  std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,unsigned short>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > *)&this->m_mapEmotionInfo.comp,
    &result,
    (const char *)&ActPos);
  if ( result._Ptr == v3->m_mapEmotionInfo._Myhead || result._Ptr->_Myval.second != CharhWnd )
  {
    HIWORD(ActPos) = CharhWnd;
    v4 = std::_Tree_val<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,unsigned short>>,0>>::_Buynode<std::pair<unsigned char,unsigned short> &>(
           (std::_Tree_val<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > *)&v3->m_mapEmotionInfo.comp,
           (std::pair<unsigned char,unsigned short> *)&ActPos);
    std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,unsigned short>>,0>>::_Linsert(
      (std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > *)&v3->m_mapEmotionInfo.comp,
      (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > >,bool> *)&it,
      v4,
      0);
  }
}

//----- (006C91F0) --------------------------------------------------------
NiNode *__thiscall mhObjectManager::GetObjectNiNode(mhObjectManager *this, int iObjGUID)
{
  mhObjectManager *v2; // esi@1
  NiNode *result; // eax@2
  int v4; // eax@3
  int v5; // ecx@4
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,mhObject *,std::less<int>,std::allocator<std::pair<int const ,mhObject *> >,0> > > itResult; // [sp+4h] [bp-4h]@1

  v2 = this;
  std::_Tree<std::_Tmap_traits<enum  MHE_STEP,ResElement *,std::less<enum  MHE_STEP>,std::allocator<std::pair<enum  MHE_STEP const,ResElement *>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *)this,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > *)&itResult,
    (OscTarget *)&iObjGUID);
  if ( itResult._Ptr == v2->m_mapObject._Myhead )
  {
    result = 0;
  }
  else
  {
    v4 = *(_DWORD *)(*std::map<int,mhObject *,std::less<int>,std::allocator<std::pair<int const,mhObject *>>>::operator[](
                        (std::map<int,int,std::less<int>,std::allocator<std::pair<int const ,int> > > *)v2,
                        &iObjGUID)
                   + 64);
    if ( *(_BYTE *)(v4 + 12) && (v5 = *(_DWORD *)(v4 + 8)) != 0 )
      result = *(NiNode **)(v5 + 12);
    else
      result = *(NiNode **)(v4 + 4);
  }
  return result;
}

//----- (006C9250) --------------------------------------------------------
mhObject *__thiscall mhObjectManager::GetObjectA(mhObjectManager *this, NiNode *pNiNode)
{
  mhObjectManager *v2; // esi@1
  NiNode *v3; // eax@2
  mhObject *result; // eax@3

  v2 = this;
  if ( pNiNode
    && (v3 = mhObjectManager::FindRootNode(pNiNode),
        pNiNode = (NiNode *)mhObjectManager::FindObjectID(v2, v3),
        pNiNode != (NiNode *)-1) )
  {
    result = (mhObject *)*std::map<int,mhObject *,std::less<int>,std::allocator<std::pair<int const,mhObject *>>>::operator[](
                            (std::map<int,int,std::less<int>,std::allocator<std::pair<int const ,int> > > *)v2,
                            (const int *)&pNiNode);
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006C9290) --------------------------------------------------------
void __thiscall mhObjectManager::~mhObjectManager(mhObjectManager *this)
{
  std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *v1; // esi@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v2; // ST08_4@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v3; // ST04_4@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > result; // [sp+8h] [bp-14h]@1
  mhObjectManager *v5; // [sp+Ch] [bp-10h]@1
  int v6; // [sp+18h] [bp-4h]@1

  v1 = (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)this;
  v5 = this;
  v6 = 0;
  mhObjectManager::Clear(this);
  v2._Ptr = v1->_Myhead;
  v3._Ptr = v1->_Myhead->_Left;
  v6 = 1;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    v1,
    &result,
    v3,
    v2);
  operator delete(v1->_Myhead);
}

//----- (006C9300) --------------------------------------------------------
signed int __thiscall mhObjectManager::AddObject(mhObjectManager *this, int iObjGUID, mhResTableElement *pkResource, int iTexID, mhObject::mhObjBindType btBindType, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *strRootName)
{
  mhObjectManager *v6; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *v7; // eax@3
  OscTarget v8; // eax@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v9; // eax@6
  _BYTE v10[3]; // ST0C_3@6
  int v11; // edi@9
  int v12; // edx@9
  MiniHouseObjAni *v14; // eax@17
  int v15; // edi@19
  const char *v16; // eax@22
  _DWORD *v17; // eax@25
  ResElement *v18; // esi@26
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v19; // eax@28
  OscTarget v20; // esi@35
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v21; // eax@35
  std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *v22; // esi@37
  void (__thiscall ***v23)(_DWORD, _DWORD); // edi@37
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v24; // eax@37
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > >,bool> v25; // [sp+10h] [bp-98h]@35
  std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *v26; // [sp+18h] [bp-90h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Left; // [sp+1Ch] [bp-8Ch]@1
  int iGUID; // [sp+20h] [bp-88h]@1
  std::pair<int,mhObject *> pairNewElement; // [sp+24h] [bp-84h]@35
  MiniHouseObjAni *pAni; // [sp+2Ch] [bp-7Ch]@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > result; // [sp+30h] [bp-78h]@1
  bool v32; // [sp+37h] [bp-71h]@28
  OscTarget _Keyval; // [sp+38h] [bp-70h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > Input; // [sp+3Ch] [bp-6Ch]@6
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > LoadFilename; // [sp+58h] [bp-50h]@8
  char acID[24]; // [sp+74h] [bp-34h]@6
  char tempbuf[10]; // [sp+8Ch] [bp-1Ch]@20
  int v38; // [sp+A4h] [bp-4h]@3

  v6 = this;
  iGUID = iObjGUID;
  _Keyval = iObjGUID;
  BYTE2(pAni) = btBindType.m_byBindType[2];
  v26 = (std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)this;
  _Left = strRootName;
  std::_Tree<std::_Tmap_traits<enum  MHE_STEP,ResElement *,std::less<enum  MHE_STEP>,std::allocator<std::pair<enum  MHE_STEP const,ResElement *>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *)this,
    &result,
    &_Keyval);
  if ( result._Ptr != (std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *)v6->m_mapObject._Myhead
    && result._Ptr->_Myval.second )
  {
    return 1;
  }
  v7 = (std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *)operator new(0x64u);
  result._Ptr = v7;
  v38 = 0;
  if ( v7 )
  {
    mhObject::mhObject((mhObject *)v7);
    _Keyval = v8;
  }
  else
  {
    _Keyval = 0;
  }
  *(_DWORD *)acID = 0;
  *(_DWORD *)&acID[4] = 0;
  *(_DWORD *)&acID[8] = 0;
  *(_DWORD *)&acID[12] = 0;
  *(_DWORD *)&acID[16] = 0;
  *(_DWORD *)&acID[20] = 0;
  v38 = -1;
  sprintf(acID, off_9BF910, iGUID);
  v9 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&Input, _Left, acID);
  *(_WORD *)v10 = *(_WORD *)&btBindType.m_byBindType[0];
  v10[2] = BYTE2(pAni);
  v38 = 1;
  mhObject::Create((mhObject *)_Keyval, 0, iGUID, pkResource, iTexID, *(mhObject::mhObjBindType *)v10, v9, -1);
  if ( Input._Myres >= 0x10 )
    operator delete(Input._Bx._Ptr);
  LoadFilename._Myres = 15;
  LoadFilename._Mysize = 0;
  LoadFilename._Bx._Buf[0] = 0;
  v38 = 2;
  pAni = 0;
  if ( !pkResource->m_bIsCanAnimation )
  {
LABEL_19:
    v15 = 2;
    result._Ptr = (std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *)&pkResource->m_FileName;
    do
    {
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &LoadFilename,
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)result._Ptr,
        0,
        0xFFFFFFFF);
      tempbuf[0] = 0;
      *(_DWORD *)&tempbuf[1] = 0;
      *(_DWORD *)&tempbuf[5] = 0;
      tempbuf[9] = 0;
      sprintf(tempbuf, "_0%d", v15);
      Input._Myres = 15;
      Input._Mysize = 0;
      Input._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Input, tempbuf, strlen(tempbuf));
      LOBYTE(v38) = 3;
      mhMiscUtil::InputStrFileName(&LoadFilename, &Input);
      LOBYTE(v38) = 2;
      if ( Input._Myres >= 0x10 )
        operator delete(Input._Bx._Ptr);
      v16 = LoadFilename._Bx._Ptr;
      if ( LoadFilename._Myres < 0x10 )
        v16 = (const char *)&LoadFilename;
      if ( PathFileExistsA(v16) )
      {
        v17 = operator new(0x2Cu);
        if ( v17 )
        {
          *v17 = &ResElement::`vftable';
          v17[1] = 0;
          v17[2] = 0;
          *((_BYTE *)v17 + 12) = 0;
          v17[9] = 15;
          v17[8] = 0;
          *((_BYTE *)v17 + 16) = 0;
          v18 = (ResElement *)v17;
        }
        else
        {
          v18 = 0;
        }
        v19 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&Input, _Left, acID);
        LOBYTE(v38) = 4;
        v32 = ResElement::CreateResElement(v18, &LoadFilename, v19) == 0;
        LOBYTE(v38) = 2;
        if ( Input._Myres >= 0x10 )
          operator delete(Input._Bx._Ptr);
        if ( v32 )
        {
          if ( v18 )
            v18->vfptr->__vecDelDtor(v18, 1u);
          if ( LoadFilename._Myres >= 0x10 )
            operator delete(LoadFilename._Bx._Ptr);
          return 2;
        }
        if ( v18->m_bIsCanAnimation && pAni )
          mhObject::SetAct((mhObject *)_Keyval, pAni->Handle, pAni->NextAniHandle);
        if ( (unsigned int)v15 <= 5 )
        {
          pairNewElement.second = (mhObject *)v18;
          v20 = _Keyval;
          pairNewElement.first = v15;
          v21 = std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(
                  (std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)(_Keyval + 48),
                  (std::pair<int const ,int> *)&pairNewElement);
          std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::_Linsert(
            (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)(v20 + 48),
            &v25,
            v21,
            0);
        }
      }
      ++v15;
    }
    while ( v15 < 4 );
    v22 = (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)v26;
    v23 = (void (__thiscall ***)(_DWORD, _DWORD))_Keyval;
    pairNewElement.first = iGUID;
    pairNewElement.second = (mhObject *)_Keyval;
    v24 = std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(
            v26,
            (std::pair<int const ,int> *)&pairNewElement);
    std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::_Linsert(
      v22,
      (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > >,bool> *)&pairNewElement,
      v24,
      0);
    if ( !LOBYTE(pairNewElement.second) )
    {
      if ( v23 )
        (**v23)(v23, 1);
      if ( LoadFilename._Myres >= 0x10 )
        operator delete(LoadFilename._Bx._Ptr);
      return 5;
    }
    if ( LoadFilename._Myres >= 0x10 )
      operator delete(LoadFilename._Bx._Ptr);
    return 1;
  }
  v11 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  v12 = *(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *)pkResource->m_ElementID;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, std::_Tree_nod<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> >::_Node *))(v12 + 16))(
                          ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                          result._Ptr)
    && LOWORD(result._Ptr) <= *(_WORD *)(v11 + 200)
    && *(_DWORD *)(*(_DWORD *)(v11 + 196) + 4 * LOWORD(result._Ptr)) )
  {
    v14 = MiniHouseObjAniInfoTab::GetObjInfobyAniGroup(pkResource->m_ElementID, 0x2711u, 0);
    pAni = v14;
    if ( v14 )
      mhObject::SetAct((mhObject *)_Keyval, v14->Handle, v14->NextAniHandle);
    goto LABEL_19;
  }
  if ( _Keyval )
    (**(void (__stdcall ***)(_DWORD))_Keyval)(1);
  if ( LoadFilename._Myres >= 0x10 )
    operator delete(LoadFilename._Bx._Ptr);
  return 0;
}
// 9BF8A4: using guessed type int (__thiscall *ResElement::`vftable')(void *p, char);
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (006C9710) --------------------------------------------------------
void __thiscall mhObjAniActor::~mhObjAniActor(mhObjAniActor *this)
{
  this->vfptr = (mhObjActorVtbl *)&mhObjActor::`vftable';
}
// 9BF928: using guessed type int (__thiscall *mhObjActor::`vftable')(void *p, char);

//----- (006C9720) --------------------------------------------------------
mhObjAniActor *__thiscall mhObjActor::`scalar deleting destructor'(mhObjAniActor *this, unsigned int a2)
{
  mhObjAniActor *v2; // esi@1

  v2 = this;
  this->vfptr = (mhObjActorVtbl *)&mhObjActor::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9BF928: using guessed type int (__thiscall *mhObjActor::`vftable')(void *p, char);

//----- (006C9750) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Rrotate(std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *this, std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *_Wherenode)
{
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v3; // esi@1
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v4; // ecx@3
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v5; // ecx@5

  v2 = _Wherenode->_Left;
  _Wherenode->_Left = _Wherenode->_Left->_Right;
  v3 = v2->_Right;
  if ( !v3->_Isnil )
    v3->_Parent = _Wherenode;
  v2->_Parent = _Wherenode->_Parent;
  v4 = this->_Myhead;
  if ( _Wherenode == v4->_Parent )
  {
    v4->_Parent = v2;
    v2->_Right = _Wherenode;
    _Wherenode->_Parent = v2;
  }
  else
  {
    v5 = _Wherenode->_Parent;
    if ( _Wherenode == v5->_Right )
    {
      v5->_Right = v2;
      v2->_Right = _Wherenode;
      _Wherenode->_Parent = v2;
    }
    else
    {
      v5->_Left = v2;
      v2->_Right = _Wherenode;
      _Wherenode->_Parent = v2;
    }
  }
}

//----- (006C97B0) --------------------------------------------------------
std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *__cdecl std::_Tree_val<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Max(std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *_Pnode)
{
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *result; // eax@1
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *i; // ecx@1

  result = _Pnode;
  for ( i = _Pnode->_Right; !i->_Isnil; i = i->_Right )
    result = i;
  return result;
}

//----- (006C97D0) --------------------------------------------------------
std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *__cdecl std::_Tree_val<std::_Tset_traits<Effect *,std::less<Effect *>,std::allocator<Effect *>,0>>::_Min(std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *_Pnode)
{
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *result; // eax@1
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v2; // ecx@1

  result = _Pnode;
  v2 = _Pnode->_Left;
  if ( !_Pnode->_Left->_Isnil )
  {
    do
    {
      result = v2;
      v2 = v2->_Left;
    }
    while ( !v2->_Isnil );
  }
  return result;
}

//----- (006C97F0) --------------------------------------------------------
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<Effect *,std::less<Effect *>,std::allocator<Effect *>,0>>,std::_Iterator_base0>::operator--(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >,std::_Iterator_base0> *this)
{
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >,std::_Iterator_base0> *result; // eax@1
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v2; // ecx@1
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *i; // edx@3
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v4; // ecx@4
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v5; // edx@5

  result = this;
  v2 = this->_Ptr;
  if ( v2->_Isnil )
  {
    result->_Ptr = v2->_Right;
    return result;
  }
  i = v2->_Left;
  if ( !v2->_Left->_Isnil )
  {
    v4 = i->_Right;
    if ( !v4->_Isnil )
    {
      do
      {
        v5 = v4;
        v4 = v4->_Right;
      }
      while ( !v4->_Isnil );
      result->_Ptr = v5;
      return result;
    }
LABEL_11:
    result->_Ptr = i;
    return result;
  }
  for ( i = v2->_Parent; !i->_Isnil; i = i->_Parent )
  {
    if ( result->_Ptr != i->_Left )
      break;
    result->_Ptr = i;
  }
  if ( !result->_Ptr->_Isnil )
    goto LABEL_11;
  return result;
}

//----- (006C9850) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tset_traits<NiPointer<NiAVObject>,std::less<NiPointer<NiAVObject>>,std::allocator<NiPointer<NiAVObject>>,0>>::_Lrotate(std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *this, std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *_Wherenode)
{
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v3; // ecx@3
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v4; // ecx@5

  v2 = _Wherenode->_Right;
  _Wherenode->_Right = v2->_Left;
  if ( !v2->_Left->_Isnil )
    v2->_Left->_Parent = _Wherenode;
  v2->_Parent = _Wherenode->_Parent;
  v3 = this->_Myhead;
  if ( _Wherenode == v3->_Parent )
  {
    v3->_Parent = v2;
    v2->_Left = _Wherenode;
    _Wherenode->_Parent = v2;
  }
  else
  {
    v4 = _Wherenode->_Parent;
    if ( _Wherenode == v4->_Left )
    {
      v4->_Left = v2;
      v2->_Left = _Wherenode;
      _Wherenode->_Parent = v2;
    }
    else
    {
      v4->_Right = v2;
      v2->_Left = _Wherenode;
      _Wherenode->_Parent = v2;
    }
  }
}

//----- (006C98B0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,unsigned short>>,0>>::find(std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > > *result, const char *_Keyval)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *v3; // edx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *v4; // eax@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > > *v5; // eax@8

  v3 = this->_Myhead;
  v4 = v3->_Parent;
  while ( !v4->_Isnil )
  {
    if ( v4->_Myval.first >= (const unsigned __int8)*_Keyval )
    {
      v3 = v4;
      v4 = v4->_Left;
    }
    else
    {
      v4 = v4->_Right;
    }
  }
  if ( v3 == this->_Myhead || (const unsigned __int8)*_Keyval < v3->_Myval.first )
  {
    v5 = result;
    result->_Ptr = this->_Myhead;
  }
  else
  {
    v5 = result;
    result->_Ptr = v3;
  }
  return v5;
}

//----- (006C9920) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,unsigned short>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *_Node, bool _Leftish)
{
  std::_Tree<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > *v4; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *v5; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *v6; // eax@1
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v7; // esi@1
  bool v8; // cl@1
  char v9; // dl@2
  std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *v10; // edi@10
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v11; // edx@12
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > >,bool> *v12; // eax@12
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v13; // ecx@15
  bool _Addleft; // [sp+Ch] [bp-4h]@1

  v4 = this;
  v5 = this->_Myhead;
  v6 = v5->_Parent;
  v7 = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v5;
  v8 = 1;
  _Addleft = 1;
  if ( !v6->_Isnil )
  {
    v9 = _Node->_Myval.first;
    do
    {
      v7 = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v6;
      if ( _Leftish )
        v8 = v6->_Myval.first >= (unsigned __int8)v9;
      else
        v8 = (unsigned __int8)v9 < v6->_Myval.first;
      _Addleft = v8;
      if ( v8 )
        v6 = v6->_Left;
      else
        v6 = v6->_Right;
    }
    while ( !v6->_Isnil );
  }
  v10 = (std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *)v7;
  *(_DWORD *)&_Leftish = v7;
  if ( v8 )
  {
    if ( (std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *)v7 == v4->_Myhead->_Left )
    {
      v11 = std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0>>::_Insert(
              (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)v4,
              (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *)&_Leftish,
              1,
              v7,
              (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)_Node)->_Ptr;
      v12 = result;
      result->first._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *)v11;
      result->second = 1;
      return v12;
    }
    std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<Effect *,std::less<Effect *>,std::allocator<Effect *>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >,std::_Iterator_base0> *)&_Leftish);
    v10 = (std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *)_Leftish;
  }
  if ( (const unsigned __int8)v10->_Myval.first >= _Node->_Myval.first )
  {
    operator delete(_Node);
    v12 = result;
    result->first._Ptr = v10;
    result->second = 0;
  }
  else
  {
    v13 = std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0>>::_Insert(
            (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)v4,
            (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *)&_Leftish,
            _Addleft,
            v7,
            (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)_Node)->_Ptr;
    v12 = result;
    result->first._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *)v13;
    result->second = 1;
  }
  return v12;
}

//----- (006C9A00) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const,unsigned short>>,0>>::_Buynode<std::pair<unsigned char,unsigned short> &>(std::_Tree_val<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > *this, std::pair<unsigned char,unsigned short> *_Val)
{
  std::_Tree_val<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *result; // eax@1
  std::pair<unsigned char,unsigned short> *v4; // esi@3
  std::exception pExceptionObject; // [sp+4h] [bp-Ch]@5

  v2 = this;
  result = (std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *)operator new(0x14u);
  if ( !result )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  result->_Left = v2->_Myhead;
  result->_Parent = v2->_Myhead;
  result->_Right = v2->_Myhead;
  *(_WORD *)&result->_Color = 0;
  if ( result != (std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *)-12 )
  {
    v4 = _Val;
    result->_Myval.first = _Val->first;
    result->_Myval.second = v4->second;
  }
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (006C9A70) --------------------------------------------------------
void __thiscall mhObject::mhObject(mhObject *this)
{
  mhObject *v1; // esi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v2; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<enum MHE_STEP,ResElement *,std::less<enum MHE_STEP>,std::allocator<std::pair<enum MHE_STEP const ,ResElement *> >,0> >::_Node *v3; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *v4; // eax@2
  std::exception pExceptionObject; // [sp+Ch] [bp-20h]@4
  mhObject *v6; // [sp+18h] [bp-14h]@1
  char *_What; // [sp+1Ch] [bp-10h]@4
  int v8; // [sp+28h] [bp-4h]@1

  v1 = this;
  v6 = this;
  v2 = &this->m_RootName;
  v6->vfptr = (mhObjectVtbl *)&mhObject::`vftable';
  v1->m_iGUID = -1;
  v1->m_iResGUID = -1;
  v1->m_iParentGUID = -1;
  v2->_Myres = 15;
  v2->_Mysize = 0;
  v2->_Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    v2,
    &mhObjDefaultRootName_1,
    0,
    0xFFFFFFFF);
  v1->m_Endure = 0;
  v8 = 0;
  v1->m_pkModelRes._Mysize = 0;
  v3 = (std::_Tree_nod<std::_Tmap_traits<enum MHE_STEP,ResElement *,std::less<enum MHE_STEP>,std::allocator<std::pair<enum MHE_STEP const ,ResElement *> >,0> >::_Node *)operator new(0x18u);
  if ( !v3 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_pkModelRes._Myhead = v3;
  v3->_Left = v3;
  v1->m_pkModelRes._Myhead->_Parent = v1->m_pkModelRes._Myhead;
  v1->m_pkModelRes._Myhead->_Right = v1->m_pkModelRes._Myhead;
  v1->m_pkModelRes._Myhead->_Color = 1;
  v1->m_pkModelRes._Myhead->_Isnil = 1;
  v1->m_pkResource = 0;
  v1->m_AniActor.vfptr = (mhObjActorVtbl *)&mhObjAniActor::`vftable';
  *(_DWORD *)&v1->m_AniActor.m_Handle = -1;
  LOBYTE(v8) = 2;
  v1->m_mapEmotionInfo._Mysize = 0;
  v4 = (std::_Tree_nod<std::_Tmap_traits<unsigned char,unsigned short,std::less<unsigned char>,std::allocator<std::pair<unsigned char const ,unsigned short> >,0> >::_Node *)operator new(0x14u);
  if ( !v4 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_mapEmotionInfo._Myhead = v4;
  v4->_Left = v4;
  v1->m_mapEmotionInfo._Myhead->_Parent = v1->m_mapEmotionInfo._Myhead;
  v1->m_mapEmotionInfo._Myhead->_Right = v1->m_mapEmotionInfo._Myhead;
  v1->m_mapEmotionInfo._Myhead->_Color = 1;
  v1->m_mapEmotionInfo._Myhead->_Isnil = 1;
  *(_WORD *)&v1->m_BindType.m_byBindType[0] = -1;
  v1->m_BindType.m_byBindType[2] = -1;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9BF93C: using guessed type int (__thiscall *mhObjAniActor::`vftable')(void *p, char);
// 9BF950: using guessed type int (__thiscall *mhObject::`vftable')(void *p, char);

//----- (006C9BC0) --------------------------------------------------------
void __thiscall mhObject::~mhObject(mhObject *this)
{
  mhObject *v1; // esi@1
  unsigned int v2; // eax@1
  signed int v3; // ebx@2
  int v4; // ecx@3
  int v5; // eax@3
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v6; // eax@8
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *v7; // eax@10
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > v8; // edi@12
  void (__stdcall ***v9)(_DWORD); // ecx@13
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node **v10; // ecx@17
  std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *v11; // eax@17
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > v12; // ST08_4@19
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > v13; // ST04_4@19
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v14; // ST08_4@19
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v15; // ST04_4@19
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > result; // [sp+10h] [bp-1Ch]@15
  mhObject *v17; // [sp+14h] [bp-18h]@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > v18; // [sp+18h] [bp-14h]@11
  int v19; // [sp+1Ch] [bp-10h]@8
  int v20; // [sp+28h] [bp-4h]@1

  v1 = this;
  v17 = this;
  this->vfptr = (mhObjectVtbl *)&mhObject::`vftable';
  v2 = this->m_pkModelRes._Mysize;
  v20 = 3;
  if ( v2 )
  {
    v3 = 0;
    do
    {
      v4 = (int)v1->m_pkModelRes._Myhead;
      v5 = *(_DWORD *)(v4 + 4);
      while ( !*(_BYTE *)(v5 + 21) )
      {
        if ( *(_DWORD *)(v5 + 12) >= v3 )
        {
          v4 = v5;
          v5 = *(_DWORD *)v5;
        }
        else
        {
          v5 = *(_DWORD *)(v5 + 8);
        }
      }
      v6 = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v1->m_pkModelRes._Myhead;
      v19 = v4;
      if ( (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v4 == v6
        || v3 < *(_DWORD *)(v4 + 12) )
      {
        v18._Ptr = v6;
        v7 = &v18;
      }
      else
      {
        v7 = (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *)&v19;
      }
      v8._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v7->_Ptr;
      if ( v7->_Ptr != (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v1->m_pkModelRes._Myhead )
      {
        v9 = (void (__stdcall ***)(_DWORD))v8._Ptr->_Myval.second;
        if ( v9 )
        {
          (**v9)(1);
          v8._Ptr->_Myval.second = 0;
        }
        std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
          (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)&v1->m_pkModelRes,
          &result,
          v8);
      }
      ++v3;
    }
    while ( v3 < 5 );
  }
  v10 = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node **)v1->m_mapEmotionInfo._Myhead;
  v11 = *v10;
  if ( (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node **)*v10 != v10 )
  {
    do
      v11 = std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0>>::erase(
              (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v1->m_mapEmotionInfo,
              (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > > *)&result,
              (std::_Tree_const_iterator<std::_Tree_val<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > >)v11)->_Ptr;
    while ( v11 != (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v1->m_mapEmotionInfo._Myhead );
  }
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)&v1->m_mapEmotionInfo;
  v12._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v1->m_mapEmotionInfo._Myhead;
  v13._Ptr = (std::_Tree_nod<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> >::_Node *)v1->m_mapEmotionInfo._Myhead->_Left;
  LOBYTE(v20) = 4;
  std::_Tree<std::_Tset_traits<PgWin *,std::less<PgWin *>,std::allocator<PgWin *>,0>>::erase(
    (std::_Tree<std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,0> > *)&v1->m_mapEmotionInfo,
    &v18,
    v13,
    v12);
  operator delete(v1->m_mapEmotionInfo._Myhead);
  v1->m_AniActor.vfptr = (mhObjActorVtbl *)&mhObjActor::`vftable';
  result._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)&v1->m_pkModelRes;
  v14._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_pkModelRes._Myhead;
  v15._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_pkModelRes._Myhead->_Left;
  LOBYTE(v20) = 5;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_pkModelRes,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&v18,
    v15,
    v14);
  operator delete(v1->m_pkModelRes._Myhead);
  if ( v1->m_RootName._Myres >= 0x10 )
    operator delete(v1->m_RootName._Bx._Ptr);
  v1->m_RootName._Myres = 15;
  v1->m_RootName._Mysize = 0;
  v1->m_RootName._Bx._Buf[0] = 0;
}
// 9BF928: using guessed type int (__thiscall *mhObjActor::`vftable')(void *p, char);
// 9BF950: using guessed type int (__thiscall *mhObject::`vftable')(void *p, char);

//----- (006C9D20) --------------------------------------------------------
mhObject *__thiscall mhObject::`scalar deleting destructor'(mhObject *this, unsigned int a2)
{
  mhObject *v2; // esi@1

  v2 = this;
  mhObject::~mhObject(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006C9D50) --------------------------------------------------------
int __stdcall mhObjAniActor::PlayEffect(unsigned int Index)
{
  return 1;
}

//----- (006C9D60) --------------------------------------------------------
int __stdcall mhObjAniActor::PlaySoundA(unsigned int Index)
{
  return 1;
}

//----- (006C9D70) --------------------------------------------------------
int __stdcall mhObjAniActor::AskAniGroupState(int AniGroupID, NiActorManager *ActorMgr)
{
  int result; // eax@2

  if ( ActorMgr
    && NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
         (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&ActorMgr->m_kSequenceMap,
         ActorMgr->m_eTargetID,
         (NiVBSet **)&ActorMgr)
    && ActorMgr )
  {
    result = ActorMgr->m_fTransEndTime <= (double)ActorMgr->m_fTransStartTime;
  }
  else
  {
    result = -1;
  }
  return result;
}

//----- (006C9DC0) --------------------------------------------------------
int __thiscall mhObjAniActor::SetAct(mhObjAniActor *this, unsigned __int16 handle, unsigned __int16 nexthandle, NiActorManager *ActorMgr)
{
  mhObjAniActor *v4; // esi@1
  int result; // eax@2
  MiniHouseObjAni *v6; // eax@3

  v4 = this;
  if ( ActorMgr )
  {
    v6 = MiniHouseObjAniInfoTab::GetObjInfobyhnd(handle);
    if ( v6 )
    {
      v4->m_NextHandle = nexthandle;
      v4->m_Handle = handle;
      result = NiActorManager::SetTargetAnimation(ActorMgr, v6->EventCode) != 0;
    }
    else
    {
      NiActorManager::SetTargetAnimation(ActorMgr, 0x18A88u);
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006C9E30) --------------------------------------------------------
MiniHouseObjAni *__thiscall mhObjAniActor::update(mhObjAniActor *this, float fTime, NiActorManager *ActorMgr)
{
  NiActorManager *v3; // ebx@1
  mhObjAniActor *v4; // esi@1
  MiniHouseObjAni *result; // eax@3
  unsigned __int16 v6; // ax@5
  MiniHouseObjAni *v7; // edi@6
  MiniHouseObjAni *v8; // edi@12
  unsigned __int16 v9; // ax@13
  unsigned __int16 v10; // cx@16

  v3 = ActorMgr;
  v4 = this;
  if ( !NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
          (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&ActorMgr->m_kSequenceMap,
          ActorMgr->m_eTargetID,
          (NiVBSet **)&ActorMgr)
    || !ActorMgr )
  {
    return 0;
  }
  if ( ActorMgr->m_fTransEndTime <= (double)ActorMgr->m_fTransStartTime )
    goto LABEL_21;
  v6 = v4->m_NextHandle;
  if ( v6 == -1 )
  {
    v8 = MiniHouseObjAniInfoTab::GetObjInfobyhnd(v4->m_Handle);
    if ( !v8 )
      goto LABEL_21;
    v9 = v4->m_Handle;
    if ( v8->AniGroupID == 10000 )
    {
      v10 = v8->NextAniHandle;
      if ( v9 == v10 || v10 > 0x2710u )
        goto LABEL_21;
      if ( MiniHouseObjAniInfoTab::GetObjInfobyhnd(v9)->AniGroupID != 10002 )
      {
        mhObjAniActor::SetAct(v4, v8->NextAniHandle, 0xFFFFu, v3);
        v4->m_Handle = v8->NextAniHandle;
        goto LABEL_21;
      }
    }
    else if ( MiniHouseObjAniInfoTab::GetObjInfobyhnd(v9)->AniGroupID != 10002 )
    {
      mhObjAniActor::SetAct(v4, v8->NextAniHandle, 0xFFFFu, v3);
      goto LABEL_21;
    }
    return (MiniHouseObjAni *)10002;
  }
  v7 = MiniHouseObjAniInfoTab::GetObjInfobyhnd(v6);
  v4->m_NextHandle = -1;
  if ( !v7 )
    goto LABEL_21;
  result = MiniHouseObjAniInfoTab::GetObjInfobyhnd(v7->NextAniHandle);
  if ( !result )
    return result;
  if ( v4->m_Handle == v7->NextAniHandle || result->AniGroupID > 0x2710u )
    goto LABEL_21;
  if ( MiniHouseObjAniInfoTab::GetObjInfobyhnd(v4->m_Handle)->AniGroupID == 10002 )
    return (MiniHouseObjAni *)10002;
  mhObjAniActor::SetAct(v4, v7->Handle, v7->NextAniHandle, v3);
LABEL_21:
  NiActorManager::Update(v3, fTime);
  return (MiniHouseObjAni *)1;
}

//----- (006C9FB0) --------------------------------------------------------
MiniHouseFurniture *__cdecl MiniHouseFuritureInfoTab::GetObjByFileName(char *acName)
{
  int v1; // eax@1
  unsigned int v2; // edi@2
  unsigned int v3; // esi@4
  char *v4; // eax@5
  MiniHouseFurniture *result; // eax@7

  v1 = *(_DWORD *)(ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::ms_pkTable + 56);
  if ( v1 )
    v2 = *(_DWORD *)(v1 + 40);
  else
    v2 = 0;
  v3 = 0;
  if ( v2 )
  {
    while ( 1 )
    {
      v4 = CDataReader::GetRecord(
             (CDataReader *)(ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::ms_pkTable + 4),
             v3);
      if ( !_mbscmp(v4 + 103, acName) )
        break;
      if ( ++v3 >= v2 )
        goto LABEL_7;
    }
    result = (MiniHouseFurniture *)CDataReader::GetRecord(
                                     (CDataReader *)(ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::ms_pkTable
                                                   + 4),
                                     v3);
  }
  else
  {
LABEL_7:
    result = 0;
  }
  return result;
}
// A8C158: using guessed type int ITableBase<MiniHouseFurniture,MiniHouseFuritureInfoTab>::ms_pkTable;

//----- (006CA020) --------------------------------------------------------
void __thiscall mhResTableElement::~mhResTableElement(mhResTableElement *this)
{
  this->vfptr = (ResElementVtbl *)&mhResTableElement::`vftable';
  ResElement::~ResElement((ResElement *)&this->vfptr);
}
// 9BF8AC: using guessed type int (__thiscall *mhResTableElement::`vftable')(void *p, char);

//----- (006CA030) --------------------------------------------------------
signed int __thiscall mhResTableManager::Clear(mhResTableManager *this)
{
  mhResTableManager *v1; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const ,mhResTableElement *> >,0> >::_Node *v2; // eax@2
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > v3; // esi@2
  void (__stdcall ***v4)(_DWORD); // ecx@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > *v5; // eax@5
  std::_Tree_nod<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> >::_Node **v6; // eax@6
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > v7; // esi@6
  NiControllerSequence *v8; // edi@7
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *v9; // eax@12
  signed int v10; // eax@16
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > result; // [sp+4h] [bp-4h]@5

  v1 = this;
  if ( !this->m_mapResModel._Mysize )
    goto LABEL_23;
  v2 = this->m_mapResModel._Myhead;
  v3._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v2->_Left;
  if ( v2->_Left != v2 )
  {
    do
    {
      ResElement::ReleaseResElement((ResElement *)v3._Ptr->_Myval.second);
      v4 = (void (__stdcall ***)(_DWORD))v3._Ptr->_Myval.second;
      if ( v4 )
        (**v4)(1);
      v5 = std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
             (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)v1,
             &result,
             v3);
      v3._Ptr = v5->_Ptr;
    }
    while ( v5->_Ptr != (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v1->m_mapResModel._Myhead );
  }
  v6 = &v1->m_mapResTex._Myhead->_Left;
  v7._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)*v6;
  if ( (std::_Tree_nod<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> >::_Node **)*v6 != v6 )
  {
    do
    {
      v8 = v7._Ptr->_Myval.second.m_pObject;
      if ( v8 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
        v7._Ptr->_Myval.second.m_pObject = 0;
      }
      v9 = std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::erase(
             (std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)&v1->m_mapResTex,
             (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *)&result,
             v7);
      v7._Ptr = v9->_Ptr;
    }
    while ( v9->_Ptr != (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)v1->m_mapResTex._Myhead );
  }
  if ( v1->m_mapResModel._Mysize )
  {
    if ( NiMessageBox::ms_pfnMessageBox )
      NiMessageBox::ms_pfnMessageBox("m_mapResModels is not empty!", "error", 0);
    return 0;
  }
  if ( v1->m_mapResTex._Mysize )
  {
    if ( !NiMessageBox::ms_pfnMessageBox )
      return 0;
    NiMessageBox::ms_pfnMessageBox("m_mapResTex is not empty!", "error", 0);
    v10 = 0;
  }
  else
  {
LABEL_23:
    v10 = 1;
  }
  return v10;
}
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);

//----- (006CA120) --------------------------------------------------------
mhResTableElement *__thiscall mhResTableManager::GetModelElement(mhResTableManager *this, int ElementID)
{
  mhResTableManager *v2; // esi@1
  mhResTableElement *result; // eax@2
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const ,mhResTableElement *> >,0> > > itResult; // [sp+4h] [bp-4h]@1

  v2 = this;
  std::_Tree<std::_Tmap_traits<enum  MHE_STEP,ResElement *,std::less<enum  MHE_STEP>,std::allocator<std::pair<enum  MHE_STEP const,ResElement *>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *)this,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > *)&itResult,
    (OscTarget *)&ElementID);
  if ( itResult._Ptr == v2->m_mapResModel._Myhead )
    result = 0;
  else
    result = (mhResTableElement *)*std::map<int,mhObject *,std::less<int>,std::allocator<std::pair<int const,mhObject *>>>::operator[](
                                     (std::map<int,int,std::less<int>,std::allocator<std::pair<int const ,int> > > *)v2,
                                     &ElementID);
  return result;
}

//----- (006CA160) --------------------------------------------------------
NiPointer<NiNode> *__thiscall mhResTableManager::AddModelElement(mhResTableManager *this, mhResTableElement *NewElement)
{
  mhResTableElement *v2; // edi@1
  mhResTableManager *v3; // esi@1
  NiPointer<NiNode> *result; // eax@2
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v5; // eax@6
  std::pair<int,mhResTableElement *> pairNewElement; // [sp+8h] [bp-8h]@3

  v2 = NewElement;
  v3 = this;
  if ( NewElement )
  {
    NewElement = (mhResTableElement *)NewElement->m_ElementID;
    std::_Tree<std::_Tmap_traits<enum  MHE_STEP,ResElement *,std::less<enum  MHE_STEP>,std::allocator<std::pair<enum  MHE_STEP const,ResElement *>>,0>>::find(
      (std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *)this,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > *)&pairNewElement.second,
      (OscTarget *)&NewElement);
    if ( pairNewElement.second != (mhResTableElement *)v3->m_mapResModel._Myhead
      && *std::map<int,mhObject *,std::less<int>,std::allocator<std::pair<int const,mhObject *>>>::operator[](
            (std::map<int,int,std::less<int>,std::allocator<std::pair<int const ,int> > > *)v3,
            (const int *)&NewElement) )
    {
      result = (NiPointer<NiNode> *)1;
    }
    else
    {
      pairNewElement.first = v2->m_ElementID;
      pairNewElement.second = v2;
      v5 = std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(
             (std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)v3,
             (std::pair<int const ,int> *)&pairNewElement);
      std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::_Linsert(
        (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)v3,
        (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > >,bool> *)&pairNewElement,
        v5,
        0);
      result = (NiPointer<NiNode> *)(4 * (LOBYTE(pairNewElement.second) == 0) + 1);
    }
  }
  else
  {
    result = &NewElement->m_pNiNode;
  }
  return result;
}

//----- (006CA200) --------------------------------------------------------
signed int __thiscall mhResTableManager::AddTexElement(mhResTableManager *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *TexFileName, int iTexID)
{
  void *v3; // esi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v4; // eax@3
  NiSourceTexture *v5; // edi@3
  NiSourceTexture *v6; // esi@8
  NiImageConverter *v7; // eax@9
  NiPixelData *v8; // eax@9
  int v9; // ebx@16
  std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> >::_Node *v10; // eax@16
  NiSourceTexture *v11; // esi@20
  char *v12; // eax@22
  signed int v13; // eax@32
  NiTexture::FormatPrefs kPrefs; // [sp+10h] [bp-50h]@11
  std::pair<int,NiPointer<NiSourceTexture> > PairNewElement; // [sp+1Ch] [bp-44h]@14
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> > >,bool> pairResult; // [sp+24h] [bp-3Ch]@1
  char *pcText; // [sp+2Ch] [bp-34h]@1
  NiPointer<NiSourceTexture> spNewTex; // [sp+30h] [bp-30h]@12
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+34h] [bp-2Ch]@3
  int v20; // [sp+5Ch] [bp-4h]@3

  v3 = TexFileName;
  *(_DWORD *)&pairResult.second = this;
  pcText = (char *)TexFileName;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&result, &Folder::m_acMHObj, TexFileName);
  v5 = 0;
  v20 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(TexFileName, v4);
  v20 = -1;
  if ( result._Myres >= 0x10 )
    operator delete(result._Bx._Ptr);
  if ( TexFileName->_Myres >= 0x10 )
    v3 = TexFileName->_Bx._Ptr;
  if ( v3 )
  {
    v7 = NiImageConverter::GetImageConverter();
    v8 = (NiPixelData *)((int (__thiscall *)(NiImageConverter *, void *, _DWORD))v7->vfptr[2].__vecDelDtor)(v7, v3, 0);
    if ( v8 )
    {
      kPrefs.m_ePixelLayout = 6;
      kPrefs.m_eAlphaFmt = 3;
      kPrefs.m_eMipMapped = 0;
      v6 = NiSourceTexture::Create(v8, &kPrefs);
    }
    else
    {
      v6 = 0;
    }
  }
  else
  {
    v6 = 0;
  }
  spNewTex.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v20 = 1;
  PairNewElement.second.m_pObject = 0;
  LOBYTE(v20) = 2;
  PairNewElement.first = iTexID;
  if ( v6 )
  {
    v5 = v6;
    PairNewElement.second.m_pObject = v6;
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  }
  v9 = *(_DWORD *)&pairResult.second;
  v10 = (std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Buynode<std::pair<int,NiPointer<stGlobalLightInfo>> &>((std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)(*(_DWORD *)&pairResult.second + 16), (std::pair<unsigned long const ,NiPointer<NiControllerSequence> > *)&PairNewElement);
  std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> > *)(v9 + 16),
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> > >,bool> *)&pairResult,
    v10,
    0);
  if ( pairResult.second )
  {
    LOBYTE(v20) = 1;
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v20 = -1;
    if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v13 = 1;
  }
  else
  {
    if ( v6 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      v11 = 0;
      spNewTex.m_pObject = 0;
    }
    else
    {
      v11 = spNewTex.m_pObject;
    }
    v12 = pcText;
    if ( *((_DWORD *)pcText + 5) >= 0x10u )
      v12 = *(char **)pcText;
    if ( NiMessageBox::ms_pfnMessageBox )
      NiMessageBox::ms_pfnMessageBox(v12, "Loading Error!", 0);
    LOBYTE(v20) = 1;
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v20 = -1;
    if ( v11 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) )
        v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    }
    v13 = 5;
  }
  return v13;
}
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006CA410) --------------------------------------------------------
signed int __thiscall mhResTableElement::Create(mhResTableElement *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *Filename, unsigned __int16 ElementID, mhObjectBindStyle eBindtype, mhObjectAction eAction, int iWeight, int iLoadingWeight, int iTexID, std::basic_string<char,std::char_traits<char>,std::allocator<char> > RootName)
{
  mhResTableElement *v9; // edi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v10; // eax@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v11; // eax@3
  char *v12; // eax@8
  MiniHouseFurniture *v13; // eax@10
  signed int v14; // eax@15
  NiActorManager *v15; // eax@25
  NiNode *v16; // eax@26
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+10h] [bp-70h]@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v18; // [sp+2Ch] [bp-54h]@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strPath; // [sp+48h] [bp-38h]@1
  char Num[12]; // [sp+64h] [bp-1Ch]@1
  int v21; // [sp+7Ch] [bp-4h]@1

  v9 = this;
  *(_DWORD *)Num = 0;
  *(_DWORD *)&Num[4] = 0;
  *(_DWORD *)&Num[8] = 0;
  v21 = 0;
  sprintf(Num, "%d", ElementID);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::insert(
    &RootName,
    RootName._Mysize,
    Num,
    strlen(Num));
  strPath._Myres = 15;
  strPath._Mysize = 0;
  strPath._Bx._Buf[0] = 0;
  LOBYTE(v21) = 1;
  if ( !Folder::m_bInit )
    Folder::Init();
  v10 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&result, &Folder::m_acMHObj, Filename);
  LOBYTE(v21) = 2;
  v11 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&v18, v10, "\\");
  LOBYTE(v21) = 3;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strPath, v11);
  if ( v18._Myres >= 0x10 )
    operator delete(v18._Bx._Ptr);
  v18._Myres = 15;
  v18._Mysize = 0;
  v18._Bx._Buf[0] = 0;
  LOBYTE(v21) = 1;
  if ( result._Myres >= 0x10 )
    operator delete(result._Bx._Ptr);
  if ( Filename->_Myres < 0x10 )
    v12 = (char *)Filename;
  else
    v12 = Filename->_Bx._Ptr;
  v13 = MiniHouseFuritureInfoTab::GetObjByFileName(v12);
  if ( !v13 )
  {
    if ( strPath._Myres >= 0x10 )
      operator delete(strPath._Bx._Ptr);
    strPath._Myres = 15;
    strPath._Mysize = 0;
    strPath._Bx._Buf[0] = 0;
    if ( RootName._Myres >= 0x10 )
      operator delete(RootName._Bx._Ptr);
    return 3;
  }
  if ( v13->IsAnimation == 1 )
    mhMiscUtil::GetLoadModelFileName(Filename, MODEL_KFM);
  else
    mhMiscUtil::GetLoadModelFileName(Filename, 0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strPath, Filename, 0, 0xFFFFFFFF);
  if ( ResElement::CreateResElement((ResElement *)&v9->vfptr, &strPath, &RootName) )
  {
    if ( v9->m_bIsCanAnimation && (v15 = v9->m_pActorMgr.m_pObject) != 0 )
      v16 = (NiNode *)v15->m_spNIFRoot.m_pObject;
    else
      v16 = v9->m_pNiNode.m_pObject;
    if ( v16 )
    {
      v9->m_eBindType = eBindtype;
      v9->m_eAction = eAction;
      v9->m_iWeight = iWeight;
      v9->m_ElementID = ElementID;
      v9->m_iLoadingWeight = iLoadingWeight;
      v9->m_iTexID = iTexID;
      if ( strPath._Myres >= 0x10 )
        operator delete(strPath._Bx._Ptr);
      strPath._Myres = 15;
      strPath._Mysize = 0;
      strPath._Bx._Buf[0] = 0;
      if ( RootName._Myres >= 0x10 )
        operator delete(RootName._Bx._Ptr);
      v14 = 1;
    }
    else
    {
      if ( strPath._Myres >= 0x10 )
        operator delete(strPath._Bx._Ptr);
      strPath._Myres = 15;
      strPath._Mysize = 0;
      strPath._Bx._Buf[0] = 0;
      if ( RootName._Myres >= 0x10 )
        operator delete(RootName._Bx._Ptr);
      v14 = 2;
    }
  }
  else
  {
    if ( strPath._Myres >= 0x10 )
      operator delete(strPath._Bx._Ptr);
    strPath._Myres = 15;
    strPath._Mysize = 0;
    strPath._Bx._Buf[0] = 0;
    if ( RootName._Myres < 0x10 )
      return 3;
    operator delete(RootName._Bx._Ptr);
    v14 = 3;
  }
  return v14;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006CA6B0) --------------------------------------------------------
NiPointer<NiSourceTexture> *__thiscall mhResTableManager::GetTexElement(mhResTableManager *this, NiPointer<NiSourceTexture> *result, int TexID)
{
  mhResTableManager *v3; // edi@1
  NiPointer<NiSourceTexture> *v4; // eax@2
  NiSourceTexture *v5; // eax@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> > > itResult; // [sp+8h] [bp-4h]@1

  v3 = this;
  itResult._Ptr = 0;
  std::_Tree<std::_Tmap_traits<enum  MHE_STEP,ResElement *,std::less<enum  MHE_STEP>,std::allocator<std::pair<enum  MHE_STEP const,ResElement *>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > *)&this->m_mapResTex,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<enum OscTarget,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *,std::less<enum OscTarget>,std::allocator<std::pair<enum OscTarget const ,std::multimap<float,EffectViewInfo *,std::less<float>,std::allocator<std::pair<float const ,EffectViewInfo *> > > *> >,0> > > *)&itResult,
    (OscTarget *)&TexID);
  if ( itResult._Ptr == v3->m_mapResTex._Myhead )
  {
    v4 = result;
    result->m_pObject = 0;
  }
  else
  {
    v5 = std::map<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const,NiPointer<NiSourceTexture>>>>::operator[](
           &v3->m_mapResTex,
           &TexID)->m_pObject;
    result->m_pObject = v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
    v4 = result;
  }
  return v4;
}

//----- (006CA720) --------------------------------------------------------
void __thiscall mhResTableManager::~mhResTableManager(mhResTableManager *this)
{
  mhResTableManager *v1; // esi@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > v2; // ST08_4@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > v3; // ST04_4@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v4; // ST08_4@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v5; // ST04_4@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > result; // [sp+Ch] [bp-18h]@1
  std::map<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > > > *v7; // [sp+10h] [bp-14h]@1
  mhResTableManager *v8; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v1 = this;
  v8 = this;
  v9 = 1;
  mhResTableManager::Clear(this);
  v7 = &v1->m_mapResTex;
  v2._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)v1->m_mapResTex._Myhead;
  v3._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)v1->m_mapResTex._Myhead->_Left;
  LOBYTE(v9) = 2;
  std::_Tree<std::_Tmap_traits<unsigned int,NiPointer<NiNode>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const,NiPointer<NiNode>>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)&v1->m_mapResTex,
    &result,
    v3,
    v2);
  operator delete(v1->m_mapResTex._Myhead);
  v4._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapResModel._Myhead;
  v5._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapResModel._Myhead->_Left;
  v9 = 3;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)v1,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&result,
    v5,
    v4);
  operator delete(v1->m_mapResModel._Myhead);
}

//----- (006CA7C0) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::insert(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int _Off, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Right, unsigned int _Roff, unsigned int _Count)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v5; // esi@1
  unsigned int v6; // ecx@1
  unsigned int v7; // eax@2
  unsigned int v8; // edi@3
  unsigned int v9; // eax@3
  unsigned int v10; // ebx@8
  unsigned int v11; // eax@10
  unsigned int v12; // eax@12
  char *v13; // ecx@13
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result; // eax@16
  char *v15; // eax@20
  char *v16; // ecx@22
  unsigned int v17; // edx@23
  unsigned int v18; // eax@25
  char *v19; // ecx@26
  char *v20; // eax@34
  bool v21; // cf@37
  unsigned int _Num; // [sp+1Ch] [bp+14h]@8

  v5 = this;
  v6 = this->_Mysize;
  if ( v6 < _Off || (v7 = _Right->_Mysize, v7 < _Roff) )
    std::_Xout_of_range("invalid string position");
  v8 = _Count;
  v9 = v7 - _Roff;
  if ( v9 < _Count )
    v8 = v9;
  if ( -1 - v6 <= v8 )
    std::_Xlength_error("string too long");
  if ( !v8 )
    return v5;
  v10 = v6 + v8;
  _Num = v6 + v8;
  if ( v6 + v8 > 0xFFFFFFFE )
    std::_Xlength_error("string too long");
  v11 = v5->_Myres;
  if ( v11 < v10 )
  {
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Copy(v5, v6 + v8, v6);
    if ( v10 )
    {
LABEL_12:
      v12 = v5->_Myres;
      if ( v12 < 0x10 )
        v13 = (char *)v5;
      else
        v13 = v5->_Bx._Ptr;
      if ( v12 < 0x10 )
        v15 = (char *)v5;
      else
        v15 = v5->_Bx._Ptr;
      memmove(&v15[_Off] + v8, &v13[_Off], v5->_Mysize - _Off);
      v16 = (char *)_Right;
      if ( v5 == _Right )
      {
        v17 = _Roff + v8;
        if ( _Off >= _Roff )
          v17 = _Roff;
        v18 = v5->_Myres;
        if ( v18 < 0x10 )
          v19 = (char *)v5;
        else
          v19 = v5->_Bx._Ptr;
        if ( v18 < 0x10 )
          memmove((char *)v5 + _Off, &v19[v17], v8);
        else
          memmove(&v5->_Bx._Ptr[_Off], &v19[v17], v8);
      }
      else
      {
        if ( _Right->_Myres >= 0x10 )
          v16 = _Right->_Bx._Ptr;
        if ( v5->_Myres < 0x10 )
          v20 = (char *)v5;
        else
          v20 = v5->_Bx._Ptr;
        memcpy(&v20[_Off], &v16[_Roff], v8);
      }
      v21 = v5->_Myres < 0x10;
      v5->_Mysize = _Num;
      if ( !v21 )
      {
        v5->_Bx._Ptr[_Num] = 0;
        return v5;
      }
      v5->_Bx._Buf[_Num] = 0;
    }
    return v5;
  }
  if ( v10 )
    goto LABEL_12;
  v5->_Mysize = 0;
  if ( v11 < 0x10 )
  {
    result = v5;
    v5->_Bx._Buf[0] = 0;
  }
  else
  {
    *v5->_Bx._Ptr = 0;
    result = v5;
  }
  return result;
}

//----- (006CA940) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > _Where, std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *_Node)
{
  std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v6; // edi@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *v7; // eax@2
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v8; // eax@7
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v9; // ecx@20
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > >,bool> v10; // [sp+8h] [bp-8h]@20

  v4 = this;
  v5 = this->_Myhead;
  v6 = _Node;
  if ( !this->_Mysize )
  {
    std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
      this,
      result,
      1,
      v5,
      _Node);
    return result;
  }
  if ( _Where._Ptr == v5->_Left )
  {
    if ( _Node->_Myval.first < _Where._Ptr->_Myval.first )
    {
      std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
        this,
        result,
        1,
        _Where._Ptr,
        _Node);
      return result;
    }
    goto LABEL_20;
  }
  if ( _Where._Ptr == v5 )
  {
    v8 = v5->_Right;
    if ( v8->_Myval.first < _Node->_Myval.first )
    {
      std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
        this,
        result,
        0,
        v8,
        _Node);
      return result;
    }
    goto LABEL_20;
  }
  if ( _Node->_Myval.first >= _Where._Ptr->_Myval.first
    || (_Node = _Where._Ptr,
        std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,GuildNameCache::GuildNameStorage *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,GuildNameCache::GuildNameStorage *>>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&_Node),
        _Node->_Myval.first >= v6->_Myval.first) )
  {
    if ( _Where._Ptr->_Myval.first >= v6->_Myval.first
      || (_Node = _Where._Ptr,
          std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const,int>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&_Node),
          _Node != v4->_Myhead)
      && v6->_Myval.first >= _Node->_Myval.first )
    {
LABEL_20:
      v9 = std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::_Linsert(
             v4,
             &v10,
             v6,
             0)->first._Ptr;
      v7 = result;
      result->_Ptr = v9;
      return v7;
    }
    if ( _Where._Ptr->_Right->_Isnil )
    {
      std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
        v4,
        result,
        0,
        _Where._Ptr,
        v6);
      v7 = result;
    }
    else
    {
      std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
        v4,
        result,
        1,
        _Node,
        v6);
      v7 = result;
    }
  }
  else if ( _Node->_Right->_Isnil )
  {
    std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
      v4,
      result,
      0,
      _Node,
      v6);
    v7 = result;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(
      v4,
      result,
      1,
      _Where._Ptr,
      v6);
    v7 = result;
  }
  return v7;
}

//----- (006CAAA0) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::basic_string<char,std::char_traits<char>,std::allocator<char>>::insert(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *this, unsigned int _Off, const char *_Ptr, unsigned int _Count)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v4; // esi@1
  unsigned int v5; // edx@2
  char *v6; // ecx@6
  _BYTE *v7; // ecx@10
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result; // eax@12
  unsigned int v9; // eax@13
  unsigned int v10; // edi@18
  unsigned int v11; // ecx@20
  unsigned int v12; // eax@22
  char *v13; // ecx@23
  char *v14; // eax@30
  char *v15; // eax@33
  bool v16; // cf@35

  v4 = this;
  if ( !_Ptr )
    goto LABEL_41;
  v5 = this->_Myres;
  if ( v5 >= 0x10 )
    this = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)this->_Bx._Ptr;
  if ( _Ptr < (const char *)this || (v5 < 0x10 ? (v6 = (char *)v4) : (v6 = v4->_Bx._Ptr), &v6[v4->_Mysize] <= _Ptr) )
  {
LABEL_41:
    v9 = v4->_Mysize;
    if ( v9 < _Off )
      std::_Xout_of_range("invalid string position");
    if ( -1 - v9 <= _Count )
      std::_Xlength_error("string too long");
    if ( _Count )
    {
      v10 = v9 + _Count;
      if ( v9 + _Count > 0xFFFFFFFE )
        std::_Xlength_error("string too long");
      v11 = v4->_Myres;
      if ( v11 >= v10 )
      {
        if ( !v10 )
        {
          v4->_Mysize = 0;
          if ( v11 < 0x10 )
          {
            result = v4;
            v4->_Bx._Buf[0] = 0;
          }
          else
          {
            *v4->_Bx._Ptr = 0;
            result = v4;
          }
          return result;
        }
        goto LABEL_22;
      }
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Copy(v4, v10, v9);
      if ( v10 )
      {
LABEL_22:
        v12 = v4->_Myres;
        if ( v12 < 0x10 )
          v13 = (char *)v4;
        else
          v13 = v4->_Bx._Ptr;
        if ( v12 < 0x10 )
          v14 = (char *)v4;
        else
          v14 = v4->_Bx._Ptr;
        memmove(&v14[_Off] + _Count, &v13[_Off], v4->_Mysize - _Off);
        if ( v4->_Myres < 0x10 )
          v15 = (char *)v4;
        else
          v15 = v4->_Bx._Ptr;
        memcpy(&v15[_Off], (char *)_Ptr, _Count);
        v16 = v4->_Myres < 0x10;
        v4->_Mysize = v10;
        if ( !v16 )
        {
          v4->_Bx._Ptr[v10] = 0;
          return v4;
        }
        v4->_Bx._Buf[v10] = 0;
        return v4;
      }
    }
    return v4;
  }
  if ( v5 < 0x10 )
    v7 = v4;
  else
    v7 = v4->_Bx._Ptr;
  return std::basic_string<char,std::char_traits<char>,std::allocator<char>>::insert(v4, _Off, v4, _Ptr - v7, _Count);
}

//----- (006CABF0) --------------------------------------------------------
int *__thiscall std::map<int,mhObject *,std::less<int>,std::allocator<std::pair<int const,mhObject *>>>::operator[](std::map<int,int,std::less<int>,std::allocator<std::pair<int const ,int> > > *this, const int *_Keyval)
{
  std::map<int,int,std::less<int>,std::allocator<std::pair<int const ,int> > > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v3; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v4; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > v5; // edi@1
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v6; // eax@8
  int *result; // eax@8
  std::pair<int const ,int> _Val; // [sp+8h] [bp-8h]@8

  v2 = this;
  v3 = this->_Myhead;
  v4 = v3->_Parent;
  v5._Ptr = v3;
  while ( !v4->_Isnil )
  {
    if ( v4->_Myval.first >= *_Keyval )
    {
      v5._Ptr = v4;
      v4 = v4->_Left;
    }
    else
    {
      v4 = v4->_Right;
    }
  }
  if ( v5._Ptr != v2->_Myhead && *_Keyval >= v5._Ptr->_Myval.first )
  {
    result = &v5._Ptr->_Myval.second;
  }
  else
  {
    _Val.first = *_Keyval;
    _Val.second = 0;
    v6 = std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>(
           (std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->comp,
           &_Val);
    std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::_Insert(
      (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->comp,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)&_Keyval,
      v5,
      v6);
    result = (int *)(_Keyval + 4);
  }
  return result;
}

//----- (006CAC70) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const,NiPointer<NiSourceTexture>>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> > > _Where, std::_Tree_nod<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> >::_Node *_Node)
{
  std::_Tree<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> > *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> >::_Node *v6; // edi@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> > > *v7; // eax@2
  std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *v8; // eax@7
  std::_Tree_nod<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> >::_Node *v9; // ecx@20
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> > >,bool> v10; // [sp+8h] [bp-8h]@20

  v4 = this;
  v5 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)this->_Myhead;
  v6 = (std::_Tree_nod<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> >::_Node *)_Node;
  if ( !this->_Mysize )
  {
    std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Insert(
      (std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)this,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *)result,
      1,
      v5,
      (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)_Node);
    return result;
  }
  if ( _Where._Ptr == (std::_Tree_nod<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> >::_Node *)v5->_Left )
  {
    if ( _Node->_Myval.first < _Where._Ptr->_Myval.first )
    {
      std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Insert(
        (std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)this,
        (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *)result,
        1,
        (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)_Where._Ptr,
        (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)_Node);
      return result;
    }
    goto LABEL_20;
  }
  if ( (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)_Where._Ptr == v5 )
  {
    v8 = v5->_Right;
    if ( (const signed int)v8->_Myval.first < _Node->_Myval.first )
    {
      std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Insert(
        (std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)this,
        (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *)result,
        0,
        v8,
        (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)_Node);
      return result;
    }
    goto LABEL_20;
  }
  if ( _Node->_Myval.first >= _Where._Ptr->_Myval.first
    || (_Node = _Where._Ptr,
        std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,GuildNameCache::GuildNameStorage *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,GuildNameCache::GuildNameStorage *>>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&_Node),
        _Node->_Myval.first >= v6->_Myval.first) )
  {
    if ( _Where._Ptr->_Myval.first >= v6->_Myval.first
      || (_Node = _Where._Ptr,
          std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const,int>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&_Node),
          _Node != v4->_Myhead)
      && v6->_Myval.first >= _Node->_Myval.first )
    {
LABEL_20:
      v9 = (std::_Tree_nod<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> >::_Node *)std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Linsert((std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<stGlobalLightInfo> > >,0> > *)v4, &v10, v6, 0)->first._Ptr;
      v7 = result;
      result->_Ptr = v9;
      return v7;
    }
    if ( _Where._Ptr->_Right->_Isnil )
    {
      std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Insert(
        (std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)v4,
        (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *)result,
        0,
        (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)_Where._Ptr,
        (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)v6);
      v7 = result;
    }
    else
    {
      std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Insert(
        (std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)v4,
        (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *)result,
        1,
        (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)_Node,
        (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)v6);
      v7 = result;
    }
  }
  else if ( _Node->_Right->_Isnil )
  {
    std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Insert(
      (std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)v4,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *)result,
      0,
      (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)_Node,
      (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)v6);
    v7 = result;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Insert(
      (std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)v4,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > > *)result,
      1,
      (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)_Where._Ptr,
      (std::_Tree_nod<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> >::_Node *)v6);
    v7 = result;
  }
  return v7;
}

//----- (006CADD0) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__cdecl std::operator+<char,std::char_traits<char>,std::allocator<char>>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Left, const char *_Right)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // eax@1

  v3 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(_Left, _Right, strlen(_Right));
  result->_Myres = 15;
  result->_Mysize = 0;
  result->_Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(result, v3);
  return result;
}

//----- (006CAE20) --------------------------------------------------------
NiPointer<NiSourceTexture> *__thiscall std::map<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const,NiPointer<NiSourceTexture>>>>::operator[](std::map<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > > > *this, const int *_Keyval)
{
  std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> >::_Node *v3; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> >::_Node *v4; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> > > v5; // edi@1
  int v6; // ecx@8
  std::_Tree_nod<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> >::_Node *v7; // eax@8
  NiPointer<NiSourceTexture> *result; // eax@8
  std::pair<unsigned long const ,NiPointer<NiControllerSequence> > _Val; // [sp+Ch] [bp-18h]@8
  int v10; // [sp+14h] [bp-10h]@8
  int v11; // [sp+20h] [bp-4h]@8

  v2 = (std::_Tree_val<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,NiPointer<NiControllerSequence> > >,0> > *)this;
  v3 = this->_Myhead;
  v4 = v3->_Parent;
  v5._Ptr = v3;
  while ( !v4->_Isnil )
  {
    if ( v4->_Myval.first >= *_Keyval )
    {
      v5._Ptr = v4;
      v4 = v4->_Left;
    }
    else
    {
      v4 = v4->_Right;
    }
  }
  if ( v5._Ptr != (std::_Tree_nod<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> >::_Node *)v2->_Myhead
    && *_Keyval >= v5._Ptr->_Myval.first )
  {
    result = &v5._Ptr->_Myval.second;
  }
  else
  {
    v10 = 0;
    v6 = *_Keyval;
    v11 = 0;
    _Val.first = v6;
    _Val.second.m_pObject = 0;
    LOBYTE(v11) = 1;
    v7 = (std::_Tree_nod<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<int,NiPointer<stGlobalLightInfo>,std::less<int>,std::allocator<std::pair<int const,NiPointer<stGlobalLightInfo>>>,0>>::_Buynode<std::pair<int,NiPointer<stGlobalLightInfo>> &>(v2, &_Val);
    std::_Tree<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const,NiPointer<NiSourceTexture>>>,0>>::_Insert(
      (std::_Tree<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> > *)v2,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,NiPointer<NiSourceTexture>,std::less<int>,std::allocator<std::pair<int const ,NiPointer<NiSourceTexture> > >,0> > > *)&_Keyval,
      v5,
      v7);
    result = (NiPointer<NiSourceTexture> *)(_Keyval + 4);
  }
  return result;
}

//----- (006CAEF0) --------------------------------------------------------
signed int __stdcall MiniHouseRoomInfo::Update(float fTime)
{
  return 1;
}

//----- (006CAF30) --------------------------------------------------------
signed int MiniHouseRoomInfo::Out()
{
  return 1;
}

//----- (006CAF40) --------------------------------------------------------
void __thiscall MiniHouseRoomInfo::~MiniHouseRoomInfo(MiniHouseRoomInfo *this)
{
  MiniHouseRoomInfo *v1; // esi@1

  v1 = this;
  if ( this->m_SelectedNodeName._Myres >= 0x10 )
    operator delete(this->m_SelectedNodeName._Bx._Ptr);
  v1->m_SelectedNodeName._Myres = 15;
  v1->m_SelectedNodeName._Mysize = 0;
  v1->m_SelectedNodeName._Bx._Buf[0] = 0;
}

//----- (006CAF70) --------------------------------------------------------
void MiniHouseRoomInfo::SetRoofColiNodeName()
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > FullName; // [sp+0h] [bp-20h]@1

  FullName._Myres = 15;
  FullName._Mysize = 0;
  FullName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &FullName,
    &mhRoomDefaultRootName_0,
    0,
    0xFFFFFFFF);
  if ( FullName._Myres >= 0x10 )
    operator delete(FullName._Bx._Ptr);
}

//----- (006CAFC0) --------------------------------------------------------
void __stdcall MiniHouseRoomInfo::CullNoneTexType(NiPointer<NiNode> CullNode, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *ComponentName, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *CullTexStyleName)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v4; // eax@1
  int v5; // edi@3
  int i; // esi@3
  void *v7; // eax@4
  int v8; // eax@6
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+Ch] [bp-48h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > CullOnNodeName; // [sp+28h] [bp-2Ch]@1
  int v11; // [sp+50h] [bp-4h]@1

  v11 = 0;
  v4 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(
         &result,
         &mhRoomDefaultRootName_0,
         ComponentName);
  LOBYTE(v11) = 1;
  std::operator+<char,std::char_traits<char>,std::allocator<char>>(&CullOnNodeName, v4, CullTexStyleName);
  LOBYTE(v11) = 3;
  if ( result._Myres >= 0x10 )
    operator delete(result._Bx._Ptr);
  result._Myres = 15;
  result._Mysize = 0;
  result._Bx._Buf[0] = 0;
  v5 = mhMiscUtil::GetNodeMaxNum(CullNode.m_pObject, &CullOnNodeName);
  for ( i = 0; i <= v5; ++i )
  {
    mhMiscUtil::MakeNodeNameNum(&CullOnNodeName, i, 3);
    v7 = CullOnNodeName._Bx._Ptr;
    if ( CullOnNodeName._Myres < 0x10 )
      v7 = &CullOnNodeName;
    v8 = ((int (__stdcall *)(void *))CullNode.m_pObject->vfptr[18].__vecDelDtor)(v7);
    *(_WORD *)(v8 + 28) |= 1u;
    mhMiscUtil::DelNodeNameNum(&CullOnNodeName, 3);
  }
  if ( CullOnNodeName._Myres >= 0x10 )
    operator delete(CullOnNodeName._Bx._Ptr);
  CullOnNodeName._Myres = 15;
  CullOnNodeName._Mysize = 0;
  CullOnNodeName._Bx._Buf[0] = 0;
  v11 = -1;
  if ( CullNode.m_pObject && !InterlockedDecrement((volatile LONG *)&CullNode.m_pObject->m_uiRefCount) )
  {
    if ( CullNode.m_pObject )
      CullNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)CullNode.m_pObject, 1u);
  }
}

//----- (006CB100) --------------------------------------------------------
signed int __thiscall MiniHouseRoomInfo::Join(MiniHouseRoomInfo *this, NiPointer<NiNode> spMapNode, NiPointer<NiNode> spAttachDest, MiniHouseRoomInfo::TexStyleGroup NewTexStyleGroup)
{
  int v4; // eax@2
  bool v5; // zf@2
  MiniHouseRoomInfo *v6; // esi@2
  int v7; // eax@3
  mhRoomTexStyle v8; // eax@5
  mhRoomTexStyle v9; // eax@8
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v10; // eax@16
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v11; // esi@16
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v12; // eax@27
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v13; // esi@27
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v14; // eax@41
  NiRefObjectVtbl *v15; // edx@43
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v16; // eax@45
  NiRefObjectVtbl *v17; // edx@47
  int v18; // ebx@47
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v19; // eax@48
  bool v20; // cf@50
  int v21; // ecx@50
  int v22; // edx@50
  int v23; // eax@50
  long double v24; // st7@50
  double v25; // st7@50
  const char *v26; // eax@50
  int v27; // ebx@57
  int v28; // esi@57
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v29; // eax@58
  NiRefObjectVtbl *v30; // edx@60
  float v31; // eax@60
  int v32; // ecx@61
  int v33; // edx@61
  long double v34; // st7@61
  int v35; // ecx@61
  double v36; // st7@61
  NiRefObjectVtbl *v37; // edx@61
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v39; // [sp+18h] [bp-154h]@7
  float fTime; // [sp+1Ch] [bp-150h]@7
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v41; // [sp+20h] [bp-14Ch]@7
  NiNode *spObject; // [sp+34h] [bp-138h]@43
  MiniHouseRoomInfo *v43; // [sp+38h] [bp-134h]@1
  int MaxNodeNum; // [sp+3Ch] [bp-130h]@38
  int j; // [sp+40h] [bp-12Ch]@44
  int NodeNum; // [sp+44h] [bp-128h]@38
  float v47; // [sp+48h] [bp-124h]@50
  int i; // [sp+4Ch] [bp-120h]@1
  int MaxCollNodeNum; // [sp+50h] [bp-11Ch]@39
  char v50[12]; // [sp+54h] [bp-118h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > Temp; // [sp+60h] [bp-10Ch]@57
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > NewNodeName; // [sp+7Ch] [bp-F0h]@16
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > RoomComponentName; // [sp+98h] [bp-D4h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > RoomTexStyleName; // [sp+B4h] [bp-B8h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > RoomCullTexStyleName; // [sp+D0h] [bp-9Ch]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > AllCullComponentNodeName; // [sp+ECh] [bp-80h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+108h] [bp-64h]@16
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > CollNodeName; // [sp+124h] [bp-48h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > AllComponentNodeName; // [sp+140h] [bp-2Ch]@1
  int v60; // [sp+168h] [bp-4h]@1

  *(MiniHouseRoomInfo::TexStyleGroup *)v50 = NewTexStyleGroup;
  v43 = this;
  v60 = 0;
  this->m_spRoomNiNode = spMapNode.m_pObject;
  RoomTexStyleName._Myres = 15;
  RoomTexStyleName._Mysize = 0;
  RoomTexStyleName._Bx._Buf[0] = 0;
  RoomCullTexStyleName._Myres = 15;
  RoomCullTexStyleName._Mysize = 0;
  RoomCullTexStyleName._Bx._Buf[0] = 0;
  RoomComponentName._Myres = 15;
  RoomComponentName._Mysize = 0;
  RoomComponentName._Bx._Buf[0] = 0;
  AllComponentNodeName._Myres = 15;
  AllComponentNodeName._Mysize = 0;
  AllComponentNodeName._Bx._Buf[0] = 0;
  AllCullComponentNodeName._Myres = 15;
  AllCullComponentNodeName._Mysize = 0;
  AllCullComponentNodeName._Bx._Buf[0] = 0;
  LOBYTE(v60) = 6;
  CollNodeName._Myres = 15;
  CollNodeName._Mysize = 0;
  CollNodeName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &CollNodeName,
    &mhCollisionParentName_2,
    0,
    0xFFFFFFFF);
  LOBYTE(v60) = 7;
  i = 0;
  do
  {
    v4 = i;
    v5 = i == 0;
    v6 = v43;
    v43->m_RoomTexStyles.m_eRoomComponent[i] = *(_DWORD *)&v50[4 * i];
    if ( !v5 )
    {
      v7 = v4 - 1;
      if ( v7 )
      {
        if ( v7 != 1 )
          goto LABEL_16;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &RoomComponentName,
          &mhRoomRoofName_1,
          0,
          0xFFFFFFFF);
        v8 = v6->m_RoomTexStyles.m_eRoomComponent[2];
        if ( v8 )
        {
          if ( v8 != 1 )
            goto LABEL_16;
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
            &RoomTexStyleName,
            &mhRoomTexStyleCustomName_0,
            0,
            0xFFFFFFFF);
          v41 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)-1;
          fTime = 0.0;
          v39 = &mhRoomTexStyleTileName_0;
          goto LABEL_15;
        }
      }
      else
      {
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &RoomComponentName,
          &mhRoomWallName_2,
          0,
          0xFFFFFFFF);
        v9 = v6->m_RoomTexStyles.m_eRoomComponent[1];
        if ( v9 )
        {
          if ( v9 != 1 )
            goto LABEL_16;
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
            &RoomTexStyleName,
            &mhRoomTexStyleCustomName_0,
            0,
            0xFFFFFFFF);
          v41 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)-1;
          fTime = 0.0;
          v39 = &mhRoomTexStyleTileName_0;
          goto LABEL_15;
        }
      }
LABEL_14:
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &RoomTexStyleName,
        &mhRoomTexStyleTileName_0,
        0,
        0xFFFFFFFF);
      v41 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)-1;
      fTime = 0.0;
      v39 = &mhRoomTexStyleCustomName_0;
      goto LABEL_15;
    }
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &RoomComponentName,
      &mhRoomFloorName_2,
      0,
      0xFFFFFFFF);
    if ( v6->m_RoomTexStyles.m_eRoomComponent[0] == MH_ROOM_TEX_STYLE_TILE )
      goto LABEL_14;
    if ( v6->m_RoomTexStyles.m_eRoomComponent[0] != 1 )
      goto LABEL_16;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &RoomTexStyleName,
      &mhRoomTexStyleCustomName_0,
      0,
      0xFFFFFFFF);
    v41 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)-1;
    fTime = 0.0;
    v39 = &mhRoomTexStyleTileName_0;
LABEL_15:
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &RoomCullTexStyleName,
      v39,
      LODWORD(fTime),
      (unsigned int)v41);
LABEL_16:
    v10 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(
            &NewNodeName,
            &mhRoomDefaultRootName_0,
            &RoomComponentName);
    LOBYTE(v60) = 8;
    v11 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&result, v10, &RoomTexStyleName);
    if ( &AllComponentNodeName != v11 )
    {
      if ( AllComponentNodeName._Myres >= 0x10 )
        operator delete(AllComponentNodeName._Bx._Ptr);
      AllComponentNodeName._Myres = 15;
      AllComponentNodeName._Mysize = 0;
      AllComponentNodeName._Bx._Buf[0] = 0;
      if ( v11->_Myres >= 0x10 )
      {
        AllComponentNodeName._Bx._Ptr = v11->_Bx._Ptr;
        v11->_Bx._Ptr = 0;
      }
      else
      {
        memmove(AllComponentNodeName._Bx._Buf, v11->_Bx._Buf, v11->_Mysize + 1);
      }
      AllComponentNodeName._Mysize = v11->_Mysize;
      AllComponentNodeName._Myres = v11->_Myres;
      v11->_Myres = 15;
      v11->_Mysize = 0;
      v11->_Bx._Buf[0] = 0;
    }
    if ( result._Myres >= 0x10 )
      operator delete(result._Bx._Ptr);
    result._Myres = 15;
    result._Mysize = 0;
    result._Bx._Buf[0] = 0;
    LOBYTE(v60) = 7;
    if ( NewNodeName._Myres >= 0x10 )
      operator delete(NewNodeName._Bx._Ptr);
    v12 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(
            &NewNodeName,
            &mhRoomDefaultRootName_0,
            &RoomComponentName);
    LOBYTE(v60) = 10;
    v13 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&result, v12, &RoomCullTexStyleName);
    if ( &AllCullComponentNodeName != v13 )
    {
      if ( AllCullComponentNodeName._Myres >= 0x10 )
        operator delete(AllCullComponentNodeName._Bx._Ptr);
      AllCullComponentNodeName._Myres = 15;
      AllCullComponentNodeName._Mysize = 0;
      AllCullComponentNodeName._Bx._Buf[0] = 0;
      if ( v13->_Myres >= 0x10 )
      {
        AllCullComponentNodeName._Bx._Ptr = v13->_Bx._Ptr;
        v13->_Bx._Ptr = 0;
      }
      else
      {
        memmove(AllCullComponentNodeName._Bx._Buf, v13->_Bx._Buf, v13->_Mysize + 1);
      }
      AllCullComponentNodeName._Mysize = v13->_Mysize;
      AllCullComponentNodeName._Myres = v13->_Myres;
      v13->_Myres = 15;
      v13->_Mysize = 0;
      v13->_Bx._Buf[0] = 0;
    }
    if ( result._Myres >= 0x10 )
      operator delete(result._Bx._Ptr);
    result._Myres = 15;
    result._Mysize = 0;
    result._Bx._Buf[0] = 0;
    LOBYTE(v60) = 7;
    if ( NewNodeName._Myres >= 0x10 )
      operator delete(NewNodeName._Bx._Ptr);
    MaxNodeNum = mhMiscUtil::GetNodeMaxNum(spMapNode.m_pObject, &AllComponentNodeName);
    for ( NodeNum = 0; NodeNum <= MaxNodeNum; ++NodeNum )
    {
      v41 = &RoomCullTexStyleName;
      fTime = COERCE_FLOAT(&RoomComponentName);
      v39 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)spMapNode.m_pObject;
      *(float *)&MaxCollNodeNum = COERCE_FLOAT(&v39);
      if ( spMapNode.m_pObject )
        InterlockedIncrement((volatile LONG *)&spMapNode.m_pObject->m_uiRefCount);
      MiniHouseRoomInfo::CullNoneTexType(
        (NiPointer<NiNode>)v39,
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)LODWORD(fTime),
        v41);
      mhMiscUtil::MakeNodeNameNum(&AllComponentNodeName, NodeNum, 3);
      v14 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)AllComponentNodeName._Bx._Ptr;
      if ( AllComponentNodeName._Myres < 0x10 )
        v14 = &AllComponentNodeName;
      v15 = spMapNode.m_pObject->vfptr;
      v41 = v14;
      spObject = (NiNode *)((int (__stdcall *)(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *))v15[18].__vecDelDtor)(v14);
      if ( spObject )
      {
        *(float *)&MaxCollNodeNum = COERCE_FLOAT(mhMiscUtil::GetNodeMaxNum(spMapNode.m_pObject, &CollNodeName));
        for ( j = 0; j <= MaxCollNodeNum; ++j )
        {
          mhMiscUtil::MakeNodeNameNum(&CollNodeName, j, 3);
          v16 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)CollNodeName._Bx._Ptr;
          if ( CollNodeName._Myres < 0x10 )
            v16 = &CollNodeName;
          v17 = spObject->vfptr;
          v41 = v16;
          v18 = ((int (__stdcall *)(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *))v17[18].__vecDelDtor)(v16);
          if ( v18 )
          {
            v19 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(
                    &result,
                    &RoomComponentName,
                    &RoomTexStyleName);
            LOBYTE(v60) = 12;
            std::operator+<char,std::char_traits<char>,std::allocator<char>>(&NewNodeName, v19, &CollNodeName);
            LOBYTE(v60) = 14;
            if ( result._Myres >= 0x10 )
              operator delete(result._Bx._Ptr);
            v20 = NewNodeName._Myres < 0x10;
            v21 = *(_DWORD *)(v18 + 140);
            v47 = *(float *)(v18 + 152);
            v22 = *(_DWORD *)(v18 + 144);
            v23 = *(_DWORD *)(v18 + 148);
            v24 = fabs(v47);
            *(_DWORD *)(v18 + 88) = v21;
            v47 = v24;
            v25 = v47;
            *(_DWORD *)(v18 + 92) = v22;
            *(float *)(v18 + 100) = v25;
            *(_DWORD *)(v18 + 96) = v23;
            v26 = NewNodeName._Bx._Ptr;
            result._Myres = 15;
            result._Mysize = 0;
            result._Bx._Buf[0] = 0;
            qmemcpy((void *)(v18 + 52), (const void *)(v18 + 104), 0x24u);
            if ( v20 )
              v26 = (const char *)&NewNodeName;
            NiObjectNET::SetName((NiObjectNET *)v18, v26);
            *(_WORD *)(v18 + 28) &= 0xFFFEu;
            ((void (__stdcall *)(int, signed int))spAttachDest.m_pObject->vfptr[29].__vecDelDtor)(v18, 1);
            LOBYTE(v60) = 7;
            if ( NewNodeName._Myres >= 0x10 )
              operator delete(NewNodeName._Bx._Ptr);
          }
          mhMiscUtil::DelNodeNameNum(&CollNodeName, 3);
        }
      }
      mhMiscUtil::DelNodeNameNum(&AllComponentNodeName, 3);
    }
    ++i;
  }
  while ( i < 3 );
  v27 = 0;
  Temp._Myres = 15;
  Temp._Mysize = 0;
  Temp._Bx._Buf[0] = 0;
  LOBYTE(v60) = 15;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Temp, &mhRoomBlockName_0, 0, 0xFFFFFFFF);
  v28 = mhMiscUtil::GetNodeMaxNum(spMapNode.m_pObject, &Temp);
  MaxNodeNum = v28;
  if ( v28 >= 0 )
  {
    do
    {
      mhMiscUtil::MakeNodeNameNum(&CollNodeName, v27, 3);
      v29 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)CollNodeName._Bx._Ptr;
      if ( CollNodeName._Myres < 0x10 )
        v29 = &CollNodeName;
      v30 = spMapNode.m_pObject->vfptr;
      v41 = v29;
      v31 = COERCE_FLOAT(((int (__stdcall *)(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *))v30[18].__vecDelDtor)(v29));
      if ( v31 != 0.0 )
      {
        v32 = *(_DWORD *)(LODWORD(v31) + 140);
        v33 = *(_DWORD *)(LODWORD(v31) + 144);
        MaxCollNodeNum = *(int *)(LODWORD(v31) + 152);
        v34 = *(float *)&MaxCollNodeNum;
        *(_DWORD *)(LODWORD(v31) + 88) = v32;
        v35 = *(_DWORD *)(LODWORD(v31) + 148);
        *(_DWORD *)(LODWORD(v31) + 92) = v33;
        *(float *)&MaxCollNodeNum = fabs(v34);
        v36 = *(float *)&MaxCollNodeNum;
        *(_DWORD *)(LODWORD(v31) + 96) = v35;
        *(float *)(LODWORD(v31) + 100) = v36;
        *(_WORD *)(LODWORD(v31) + 28) &= 0xFFFEu;
        qmemcpy((void *)(LODWORD(v31) + 52), (const void *)(LODWORD(v31) + 104), 0x24u);
        v37 = spAttachDest.m_pObject->vfptr;
        v41 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)1;
        fTime = v31;
        ((void (__stdcall *)(_DWORD, signed int))v37[29].__vecDelDtor)(LODWORD(v31), 1);
        v28 = MaxNodeNum;
      }
      mhMiscUtil::DelNodeNameNum(&CollNodeName, 3);
      ++v27;
    }
    while ( v27 <= v28 );
  }
  NiAVObject::Update((NiAVObject *)&spAttachDest.m_pObject->vfptr, 0.0, 1);
  NiAVObject::UpdateProperties((NiAVObject *)&spAttachDest.m_pObject->vfptr);
  NiAVObject::UpdateEffects((NiAVObject *)&spAttachDest.m_pObject->vfptr);
  if ( Temp._Myres >= 0x10 )
    operator delete(Temp._Bx._Ptr);
  Temp._Myres = 15;
  Temp._Mysize = 0;
  Temp._Bx._Buf[0] = 0;
  if ( CollNodeName._Myres >= 0x10 )
    operator delete(CollNodeName._Bx._Ptr);
  CollNodeName._Myres = 15;
  CollNodeName._Mysize = 0;
  CollNodeName._Bx._Buf[0] = 0;
  if ( AllCullComponentNodeName._Myres >= 0x10 )
    operator delete(AllCullComponentNodeName._Bx._Ptr);
  AllCullComponentNodeName._Myres = 15;
  AllCullComponentNodeName._Mysize = 0;
  AllCullComponentNodeName._Bx._Buf[0] = 0;
  if ( AllComponentNodeName._Myres >= 0x10 )
    operator delete(AllComponentNodeName._Bx._Ptr);
  AllComponentNodeName._Myres = 15;
  AllComponentNodeName._Mysize = 0;
  AllComponentNodeName._Bx._Buf[0] = 0;
  if ( RoomComponentName._Myres >= 0x10 )
    operator delete(RoomComponentName._Bx._Ptr);
  RoomComponentName._Myres = 15;
  RoomComponentName._Mysize = 0;
  RoomComponentName._Bx._Buf[0] = 0;
  if ( RoomCullTexStyleName._Myres >= 0x10 )
    operator delete(RoomCullTexStyleName._Bx._Ptr);
  RoomCullTexStyleName._Myres = 15;
  RoomCullTexStyleName._Mysize = 0;
  RoomCullTexStyleName._Bx._Buf[0] = 0;
  if ( RoomTexStyleName._Myres >= 0x10 )
    operator delete(RoomTexStyleName._Bx._Ptr);
  RoomTexStyleName._Myres = 15;
  RoomTexStyleName._Mysize = 0;
  RoomTexStyleName._Bx._Buf[0] = 0;
  LOBYTE(v60) = 0;
  if ( spMapNode.m_pObject
    && !InterlockedDecrement((volatile LONG *)&spMapNode.m_pObject->m_uiRefCount)
    && spMapNode.m_pObject )
  {
    spMapNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spMapNode.m_pObject, 1u);
  }
  v60 = -1;
  if ( spAttachDest.m_pObject
    && !InterlockedDecrement((volatile LONG *)&spAttachDest.m_pObject->m_uiRefCount)
    && spAttachDest.m_pObject )
  {
    spAttachDest.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spAttachDest.m_pObject, 1u);
  }
  return 1;
}

//----- (006CB990) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__cdecl std::operator+<char,std::char_traits<char>,std::allocator<char>>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Left, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Right)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // eax@1

  v3 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(_Left, _Right, 0, 0xFFFFFFFF);
  result->_Myres = 15;
  result->_Mysize = 0;
  result->_Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(result, v3);
  return result;
}

//----- (006CB9D0) --------------------------------------------------------
void __cdecl mhMiscUtil::MakeNumToStr(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *ResultStr, int Num)
{
  char charNum[10]; // [sp+0h] [bp-10h]@1

  *(_DWORD *)charNum = 808464432;
  *(_DWORD *)&charNum[4] = 808464432;
  *(_WORD *)&charNum[8] = 12336;
  _itoa(Num, charNum, 10);
}

//----- (006CBA20) --------------------------------------------------------
void __cdecl mhMiscUtil::DelNodeNameNum(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *NodeName, int Cipher)
{
  int v2; // eax@1

  v2 = NodeName->_Mysize;
  if ( Cipher <= v2 )
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::erase(NodeName, v2 - Cipher, Cipher);
}

//----- (006CBA40) --------------------------------------------------------
int __cdecl mhMiscUtil::GetNumFromNodeName(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *SrcName, unsigned int uiStrSize)
{
  const char *v2; // esi@1

  v2 = (const char *)SrcName;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::erase(SrcName, 0, uiStrSize);
  if ( SrcName->_Myres >= 0x10 )
    v2 = SrcName->_Bx._Ptr;
  return atoi(v2);
}

//----- (006CBA70) --------------------------------------------------------
void __cdecl mhMiscUtil::InputStrFileName(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *Org, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *Input)
{
  unsigned int v2; // eax@1
  char _Ptr; // [sp+4h] [bp-4h]@1

  _Ptr = 46;
  v2 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::find(Org, &_Ptr, 0, 1u);
  if ( v2 )
  {
    if ( v2 < Org->_Mysize )
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::insert(Org, v2, Input, 0, 0xFFFFFFFF);
  }
}

//----- (006CBAB0) --------------------------------------------------------
void __cdecl mhMiscUtil::MakeNodeNameNum(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *NodeName, int NodeNum, int Cipher)
{
  int i; // edi@3
  unsigned int v4; // ecx@5
  char *v5; // edx@6
  unsigned int v6; // eax@8
  void *v7; // ecx@9
  unsigned int v8; // edx@14
  char *v9; // ecx@15
  unsigned int v10; // eax@17
  void *v11; // ecx@18
  char v12; // [sp+8h] [bp-10h]@5
  char Num[5]; // [sp+Ch] [bp-Ch]@3

  if ( Cipher <= 6 && (unsigned int)NodeNum <= 0x2710 )
  {
    *(_DWORD *)Num = 808464432;
    Num[4] = 48;
    _itoa(NodeNum, Num, 10);
    for ( i = Cipher - 1; i >= 0; --i )
    {
      if ( Num[i] )
      {
        v4 = NodeName->_Myres;
        v12 = Num[i];
        if ( v4 < 0x10 )
          v5 = (char *)NodeName;
        else
          v5 = NodeName->_Bx._Ptr;
        v6 = (unsigned int)&v5[NodeName->_Mysize];
        if ( v4 < 0x10 )
          v7 = NodeName;
        else
          v7 = NodeName->_Bx._Ptr;
        if ( v6 )
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::insert(
            NodeName,
            v6 - (_DWORD)v7,
            1u,
            v12);
        else
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::insert(NodeName, 0, 1u, v12);
      }
      else
      {
        v8 = NodeName->_Myres;
        if ( v8 < 0x10 )
          v9 = (char *)NodeName;
        else
          v9 = NodeName->_Bx._Ptr;
        v10 = (unsigned int)&v9[NodeName->_Mysize];
        if ( v8 < 0x10 )
          v11 = NodeName;
        else
          v11 = NodeName->_Bx._Ptr;
        if ( v10 )
          v10 -= (unsigned int)v11;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::insert(NodeName, v10, 1u, 48);
      }
    }
  }
}

//----- (006CBB80) --------------------------------------------------------
int __cdecl mhMiscUtil::GetNodeMaxNum(NiNode *FindDestNode, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *NodeName)
{
  int result; // eax@4
  int v3; // esi@5
  void *v4; // eax@6
  int RetValue; // [sp+10h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > FindName; // [sp+14h] [bp-2Ch]@1
  int v7; // [sp+3Ch] [bp-4h]@1

  RetValue = -1;
  FindName._Myres = 15;
  FindName._Mysize = 0;
  FindName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&FindName, NodeName, 0, 0xFFFFFFFF);
  v7 = 0;
  if ( FindDestNode )
  {
    v3 = 0;
    do
    {
      mhMiscUtil::MakeNodeNameNum(&FindName, v3, 3);
      v4 = FindName._Bx._Ptr;
      if ( FindName._Myres < 0x10 )
        v4 = &FindName;
      if ( !(int)FindDestNode->vfptr[18].__vecDelDtor((NiRefObject *)FindDestNode, (unsigned int)v4) )
        break;
      RetValue = v3;
      if ( (signed int)FindName._Mysize >= 3 )
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::erase(&FindName, FindName._Mysize - 3, 3u);
      ++v3;
    }
    while ( v3 < 100 );
    if ( FindName._Myres >= 0x10 )
      operator delete(FindName._Bx._Ptr);
    result = RetValue;
  }
  else
  {
    if ( FindName._Myres >= 0x10 )
      operator delete(FindName._Bx._Ptr);
    result = -1;
  }
  return result;
}

//----- (006CBC70) --------------------------------------------------------
void __cdecl mhMiscUtil::GetLoadModelFileName(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *IndexName, mhMiscUtil::ModelType type)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v2; // eax@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // eax@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v4; // [sp+8h] [bp-48h]@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+24h] [bp-2Ch]@3
  int v6; // [sp+4Ch] [bp-4h]@3

  if ( type )
  {
    if ( type == 1 )
    {
      v2 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&result, IndexName, ".kfm");
      v6 = 1;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(IndexName, v2);
      if ( result._Myres >= 0x10 )
        operator delete(result._Bx._Ptr);
    }
  }
  else
  {
    v3 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&v4, IndexName, ".nif");
    v6 = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(IndexName, v3);
    if ( v4._Myres >= 0x10 )
      operator delete(v4._Bx._Ptr);
  }
}

//----- (006CBD30) --------------------------------------------------------
char __thiscall ResElement::CloneResElement(ResElement *this, ResElement *pSrcResElement, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *strRootName)
{
  NiActorManager *v3; // edx@3
  NiPointer<NiD3DDefaultShader> *v5; // esi@9
  NiD3DDefaultShader *v6; // eax@9
  NiObjectNET *v7; // eax@10
  const char *v8; // edx@11
  NiPointer<NiD3DDefaultShader> *v9; // esi@14
  NiD3DDefaultShader *v10; // eax@14
  const char *v11; // eax@16

  if ( !pSrcResElement )
    return 0;
  if ( pSrcResElement->m_bIsCanAnimation )
  {
    v3 = pSrcResElement->m_pActorMgr.m_pObject;
    if ( !v3 || !v3->m_spNIFRoot.m_pObject )
      return 0;
  }
  else if ( !pSrcResElement->m_pNiNode.m_pObject )
  {
    return 0;
  }
  this->m_bIsCanAnimation = pSrcResElement->m_bIsCanAnimation;
  if ( pSrcResElement->m_bIsCanAnimation )
  {
    v5 = (NiPointer<NiD3DDefaultShader> *)&this->m_pActorMgr;
    v6 = (NiD3DDefaultShader *)NiActorManager::Clone(pSrcResElement->m_pActorMgr.m_pObject);
    NiPointer<PopupMenuWin>::operator=(v5, v6);
    if ( v5->m_pObject )
    {
      v7 = (NiObjectNET *)v5->m_pObject->m_uiImplementation;
      if ( v7 )
      {
        v8 = (const char *)strRootName;
        if ( strRootName->_Myres >= 0x10 )
          v8 = strRootName->_Bx._Ptr;
        NiObjectNET::SetName(v7, v8);
        NiAVObject::Update((NiAVObject *)v5->m_pObject->m_uiImplementation, 0.0, 1);
        NiAVObject::UpdateProperties((NiAVObject *)v5->m_pObject->m_uiImplementation);
        OutputDebugStringA("----------MiniHouse ResNIFElementKFM CLONE Name is = ");
        OutputDebugStringA(*(LPCSTR *)(v5->m_pObject->m_uiImplementation + 8));
        OutputDebugStringA("\n");
        return 1;
      }
    }
    return 0;
  }
  v9 = (NiPointer<NiD3DDefaultShader> *)&this->m_pNiNode;
  v10 = (NiD3DDefaultShader *)NiObject::Clone((NiObject *)&pSrcResElement->m_pNiNode.m_pObject->vfptr);
  NiPointer<PopupMenuWin>::operator=(v9, v10);
  if ( !v9->m_pObject )
    return 0;
  v11 = (const char *)strRootName;
  if ( strRootName->_Myres >= 0x10 )
    v11 = strRootName->_Bx._Ptr;
  NiObjectNET::SetName((NiObjectNET *)v9->m_pObject, v11);
  NiAVObject::Update((NiAVObject *)v9->m_pObject, 0.0, 1);
  NiAVObject::UpdateProperties((NiAVObject *)v9->m_pObject);
  OutputDebugStringA("----------MiniHouse ResNIFElementNIF CLONE Name is = ");
  OutputDebugStringA(v9->m_pObject->m_pszName);
  OutputDebugStringA("\n");
  return 1;
}

//----- (006CBE60) --------------------------------------------------------
char __thiscall ResElement::LoadNIF(ResElement *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *strFileName, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *strRootName)
{
  const char *v3; // eax@1
  ResElement *v4; // ebx@1
  NiNode *v5; // eax@3
  NiNode *v6; // esi@3
  NiNode *v7; // edi@3
  NiObjectNET *v8; // ecx@10
  char result; // al@11
  const char *v10; // eax@12

  v3 = (const char *)strFileName;
  v4 = this;
  if ( strFileName->_Myres >= 0x10 )
    v3 = strFileName->_Bx._Ptr;
  v5 = PgUtil::LoadNifFile(v3, 0);
  v6 = v4->m_pNiNode.m_pObject;
  v7 = v5;
  if ( v6 != v5 )
  {
    if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v4->m_pNiNode.m_pObject = v7;
    if ( v7 )
      InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  }
  v8 = (NiObjectNET *)&v4->m_pNiNode.m_pObject->vfptr;
  if ( v8 )
  {
    v10 = (const char *)strRootName;
    if ( strRootName->_Myres >= 0x10 )
      v10 = strRootName->_Bx._Ptr;
    NiObjectNET::SetName(v8, v10);
    OutputDebugStringA("----------MiniHouse ResNIFElement MAKE Name is = ");
    OutputDebugStringA(v4->m_pNiNode.m_pObject->m_pcName);
    OutputDebugStringA("\n");
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006CBF00) --------------------------------------------------------
char __thiscall ResElement::LoadKFM(ResElement *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *strFileName, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *strRootName)
{
  const char *v3; // eax@1
  ResElement *v4; // ebx@1
  NiActorManager *v5; // eax@3
  NiActorManager *v6; // esi@3
  NiActorManager *v7; // edi@3
  NiActorManager *v8; // eax@10
  NiObjectNET *v9; // eax@11
  const char *v10; // edx@12
  char result; // al@15

  v3 = (const char *)strFileName;
  v4 = this;
  if ( strFileName->_Myres >= 0x10 )
    v3 = strFileName->_Bx._Ptr;
  v5 = NiActorManager::Create(v3, 0, 1, 0);
  v6 = v4->m_pActorMgr.m_pObject;
  v7 = v5;
  if ( v6 != v5 )
  {
    if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v4->m_pActorMgr.m_pObject = v7;
    if ( v7 )
      InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  }
  v8 = v4->m_pActorMgr.m_pObject;
  if ( v8 )
  {
    v9 = (NiObjectNET *)&v8->m_spNIFRoot.m_pObject->vfptr;
    if ( v9 )
    {
      v10 = (const char *)strRootName;
      if ( strRootName->_Myres >= 0x10 )
        v10 = strRootName->_Bx._Ptr;
      NiObjectNET::SetName(v9, v10);
    }
    v4->m_bIsCanAnimation = 1;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006CBFA0) --------------------------------------------------------
char __thiscall ResElement::CreateResElement(ResElement *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *strFileName, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *strRootName)
{
  ResElement *v3; // ebx@1
  char *v4; // eax@2
  unsigned int v5; // esi@4
  char v6; // al@4
  char result; // al@5

  v3 = this;
  if ( strFileName->_Myres < 0x10 )
    v4 = (char *)strFileName;
  else
    v4 = strFileName->_Bx._Ptr;
  v5 = (unsigned int)&v4[strFileName->_Mysize];
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &this->m_FileName,
    strFileName,
    0,
    0xFFFFFFFF);
  v6 = *(_BYTE *)(v5 - 1);
  if ( v6 == 102 )
  {
    result = ResElement::LoadNIF(v3, strFileName, strRootName);
  }
  else if ( v6 == 109 )
  {
    result = ResElement::LoadKFM(v3, strFileName, strRootName);
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006CC010) --------------------------------------------------------
void __thiscall mhEditRoomWin::ShowComponent(mhEditRoomWin *this, int b)
{
  char *v2; // edi@1
  signed int v3; // ebx@1
  int v4; // edi@3
  signed int v5; // ebx@3
  int v6; // edi@5
  signed int v7; // ebx@5
  int v8; // edi@7
  signed int v9; // ebx@7
  mhEditRoomWin *v10; // [sp+Ch] [bp-4h]@1

  v10 = this;
  v2 = (char *)this->m_apkmhItemInvIconWin;
  v3 = 392;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 256))(b);
    v2 += 4;
    --v3;
  }
  while ( v3 );
  v4 = (int)v10->m_apkmhItemInvWin;
  v5 = 49;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 256))(b);
    v4 += 4;
    --v5;
  }
  while ( v5 );
  v6 = (int)v10->m_pkItemProp;
  v7 = 4;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v6 + 256))(b);
    v6 += 4;
    --v7;
  }
  while ( v7 );
  v8 = (int)v10->m_pkitemDisableBag;
  v9 = 2;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v8 - 8) + 256))(b);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v8 + 256))(b);
    v8 += 4;
    --v9;
  }
  while ( v9 );
  ((void (__stdcall *)(_DWORD))v10->m_pkPanel->vfptr[64].__vecDelDtor)(b);
}

//----- (006CC0E0) --------------------------------------------------------
void __thiscall mhEditRoomWin::OnClose(mhEditRoomWin *this)
{
  HWND__ *v1; // ecx@1

  this->m_bOpen = 0;
  v1 = this->m_hWebWindow;
  if ( v1 )
    DestroyWindow(v1);
}

//----- (006CC100) --------------------------------------------------------
void __thiscall mhEditRoomWin::ReGenPos(mhEditRoomWin *this)
{
  mhEditRoomWin *v1; // esi@1
  int v2; // edx@1
  int v3; // eax@1
  int v4; // ecx@1

  v1 = this;
  v1->m_uiWebXPos = v1->m_uiPlaneWebXPos + ((int (*)(void))this->vfptr[41].__vecDelDtor)();
  v2 = ((int (__thiscall *)(_DWORD))v1->vfptr[42].__vecDelDtor)(v1) + v1->m_uiPlaneWebYPos + 2;
  v3 = v1->m_uiPlaneWebWidth - 8;
  v4 = v1->m_uiPlaneWebHeight - 10;
  v1->m_uiWebYPos = v2;
  v1->m_uiWebWidth = v3;
  v1->m_uiWebHeight = v4;
}

//----- (006CC160) --------------------------------------------------------
unsigned int __stdcall mhEditRoomWin::GetInvIndex(unsigned int uiInvType, unsigned int uiMHItemInvindex)
{
  unsigned int result; // eax@2

  switch ( uiInvType )
  {
    case 0xDu:
      result = uiMHItemInvindex - 98 < 0x62 ? uiMHItemInvindex - 98 : 0;
      break;
    case 0xEu:
      result = uiMHItemInvindex - 196 < 0x62 ? uiMHItemInvindex - 196 : 0;
      break;
    case 0x10u:
      result = uiMHItemInvindex - 294 < 0x62 ? uiMHItemInvindex - 294 : 0;
      break;
    case 3u:
      result = uiMHItemInvindex < 0x62 ? uiMHItemInvindex : 0;
      break;
    default:
      result = 0;
      break;
  }
  return result;
}

//----- (006CC1F0) --------------------------------------------------------
void __thiscall mhEditRoomWin::OnActivePage(mhEditRoomWin *this, unsigned int uiPage)
{
  signed int v2; // edi@2
  char *v3; // esi@2

  if ( uiPage < 2 )
  {
    v2 = 0;
    v3 = (char *)this->m_pkitemDisableBag;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v3 - 2) + 256))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 256))(1);
      if ( v2 == uiPage )
      {
        (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v3 - 2) + 256))(1);
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 256))(0);
        mhEditRoomWin::m_uiShowBagPage = v2;
      }
      ++v2;
      v3 += 4;
    }
    while ( v2 < 2 );
  }
}
// B5C148: using guessed type unsigned int mhEditRoomWin::m_uiShowBagPage;

//----- (006CC270) --------------------------------------------------------
unsigned int __stdcall mhEditRoomWin::GetMHItemInvIndex(unsigned int uiIndex, unsigned int uiInvtype)
{
  unsigned int result; // eax@1
  unsigned int v4; // ecx@2

  result = uiIndex;
  if ( uiIndex >= 0x62 )
  {
LABEL_8:
    result = 0;
  }
  else
  {
    v4 = uiInvtype;
    if ( uiInvtype == 65534 )
      v4 = mhEditRoomWin::m_uiInvType;
    switch ( v4 )
    {
      case 0xDu:
        result = uiIndex + 98;
        break;
      case 0xEu:
        result = uiIndex + 196;
        break;
      case 0x10u:
        result = uiIndex + 294;
        break;
      default:
        goto LABEL_8;
      case 3u:
        return result;
    }
  }
  return result;
}

//----- (006CC2F0) --------------------------------------------------------
mhItemInvIconWin *__thiscall mhEditRoomWin::GetInvIconWin(mhEditRoomWin *this, unsigned int uiType, unsigned int uiIndex)
{
  mhEditRoomWin *v3; // edi@1
  unsigned int v4; // esi@1
  mhItemInvIconWin *v5; // ecx@7
  mhItemInvIconWin *result; // eax@8

  v3 = this;
  v4 = uiIndex;
  if ( uiIndex >= 0x62 )
  {
LABEL_6:
    v4 = 0;
  }
  else
  {
    switch ( mhEditRoomWin::m_uiInvType )
    {
      case 0xDu:
        v4 = uiIndex + 98;
        break;
      case 0xEu:
        v4 = uiIndex + 196;
        break;
      case 0x10u:
        v4 = uiIndex + 294;
        break;
      default:
        goto LABEL_6;
      case 3u:
        break;
    }
  }
  v5 = this->m_apkmhItemInvIconWin[v4];
  if ( v5 )
  {
    ItemIcon::GetItem((ItemIcon *)&v5->vfptr);
    result = v3->m_apkmhItemInvIconWin[v4];
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006CC380) --------------------------------------------------------
void __thiscall mhEditRoomWin::SetWorkTargetWin(mhEditRoomWin *this, mhItemInvIconWin *pIconWin, ITEM_INVEN kInven)
{
  this->m_pkWorkTargetWin = pIconWin;
  this->m_kWorkTargetInven = kInven;
}

//----- (006CC3A0) --------------------------------------------------------
void mhEditRoomWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "MiniHomeEdit");
}

//----- (006CC3D0) --------------------------------------------------------
void __thiscall mhItemInvIconWin::mhItemInvIconWin(mhItemInvIconWin *this)
{
  mhItemInvIconWin *v1; // esi@1

  v1 = this;
  InvWin::InvWin((InvWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&mhItemInvIconWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&mhItemInvIconWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkLotText = 0;
  v1->m_uiInvIndex = -1;
  v1->m_uiInvType = 9;
  ItemIcon::SetItem((ItemIcon *)&v1->vfptr, 0, 1);
  *(_WORD *)&v1->m_bActive = 0;
}
// 9BFCF0: using guessed type void (__thiscall *mhItemInvIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9BFD0C: using guessed type int (__thiscall *mhItemInvIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006CC460) --------------------------------------------------------
void __thiscall mhItemInvIconWin::~mhItemInvIconWin(mhItemInvIconWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&mhItemInvIconWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhItemInvIconWin::`vftable'{for `IDirectMessenger'};
  InvWin::~InvWin((InvWin *)&this->vfptr);
}
// 9BFCF0: using guessed type void (__thiscall *mhItemInvIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9BFD0C: using guessed type int (__thiscall *mhItemInvIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006CC480) --------------------------------------------------------
bool __thiscall mhItemInvIconWin::IsUse(mhItemInvIconWin *this)
{
  return this->m_bUse;
}

//----- (006CC490) --------------------------------------------------------
void __thiscall mhItemInvIconWin::SetActive(mhItemInvIconWin *this, bool bActive)
{
  this->m_bActive = bActive;
}

//----- (006CC4A0) --------------------------------------------------------
bool __thiscall mhItemInvIconWin::GetActive(mhItemInvIconWin *this)
{
  return this->m_bActive;
}

//----- (006CC4B0) --------------------------------------------------------
bool __thiscall mhItemInvIconWin::IsLock(mhItemInvIconWin *this)
{
  return this->m_bLock;
}

//----- (006CC4C0) --------------------------------------------------------
Item *__stdcall mhEditRoomWin::GetItemByObjID(int iGUID)
{
  return Inventory::GetMHItemByObjID(&g_kInventory, iGUID);
}

//----- (006CC4D0) --------------------------------------------------------
void __thiscall mhEditRoomWin::OnShowWin(mhEditRoomWin *this)
{
  if ( this->m_pkFrameWork[29].m_BackFrameID )
  {
    if ( unk_A9943C == 2 )
      mhEditRoomWin::ShowComponent(this, 1);
  }
}

//----- (006CC4F0) --------------------------------------------------------
void __thiscall mhEditRoomWin::UpdateWebPos(mhEditRoomWin *this)
{
  mhEditRoomWin *v1; // esi@1
  tagRECT rect; // [sp+4h] [bp-14h]@3

  v1 = this;
  if ( IsWindow(this->m_hWebWindow) )
  {
    if ( v1->m_bOpen )
    {
      mhEditRoomWin::ReGenPos(v1);
      GetWindowRect(g_hMainWnd, &rect);
      MoveWindow(
        v1->m_hWebWindow,
        rect.left + v1->m_uiWebXPos,
        rect.top + v1->m_uiWebYPos,
        v1->m_uiWebWidth,
        v1->m_uiWebHeight,
        1);
    }
  }
}

//----- (006CC580) --------------------------------------------------------
char __thiscall mhEditRoomWin::ChangePos(mhEditRoomWin *this, DropContents *pkContents, unsigned int uiReceiverInvIndex)
{
  DropContents *v3; // esi@1
  mhEditRoomWin *v4; // ebx@1
  signed int v5; // edi@2
  _WORD *v6; // eax@8
  unsigned int v7; // ecx@10
  char result; // al@11
  ITEM_INVEN kFrom; // [sp+Ch] [bp-4h]@11

  v3 = pkContents;
  v4 = this;
  switch ( pkContents->m_eSenderType )
  {
    case 0xE:
      v5 = 3;
      goto LABEL_6;
    case 0xF:
      v5 = 13;
      goto LABEL_6;
    case 0x10:
      v5 = 14;
      goto LABEL_6;
    case 0x11:
      v5 = 16;
LABEL_6:
      if ( v5 != mhEditRoomWin::m_uiInvType )
        goto LABEL_12;
      if ( pkContents->m_eType == CT_ITEM )
      {
        v6 = pkContents->m_apvParam[0];
        if ( v6 )
          SoundMgr::PlayItemPutSound(v6[4]);
      }
      v7 = v3->m_uiSenderIndex;
      switch ( mhEditRoomWin::m_uiInvType )
      {
        case 3u:
        case 0xDu:
        case 0xEu:
        case 0x10u:
          kFrom.Inven = ((_WORD)v5 << 10) | v7 & 0x3FF;
          LOWORD(pkContents) = ((_WORD)v5 << 10) | uiReceiverInvIndex & 0x3FF;
          GameFrameWork::NcItemRelocReq((GameFrameWork *)v4->m_pkFrameWork, &kFrom, (ITEM_INVEN *)&pkContents);
          result = 1;
          break;
        default:
          goto LABEL_12;
      }
      break;
    default:
LABEL_12:
      result = 0;
      break;
  }
  return result;
}

//----- (006CC670) --------------------------------------------------------
bool __stdcall mhEditRoomWin::IsMHOtherTypeCheck(unsigned int uiSendInvType, unsigned int uiRcvInvType)
{
  bool result; // al@3
  bool v4; // zf@5
  bool v5; // zf@7

  if ( uiSendInvType == uiRcvInvType )
  {
    switch ( uiSendInvType )
    {
      case 3u:
      case 0xDu:
      case 0xEu:
      case 0x10u:
$LN21_64:
        result = 1;
        break;
      default:
        goto LABEL_4;
    }
  }
  else
  {
LABEL_4:
    switch ( uiSendInvType )
    {
      case 0xDu:
        v4 = uiSendInvType == 3;
        goto LABEL_6;
      case 3u:
        v4 = uiSendInvType == 13;
LABEL_6:
        if ( v4 )
          break;
        v5 = uiSendInvType == 14;
        goto LABEL_8;
      case 0xEu:
        if ( uiSendInvType == 3 )
          break;
        v5 = uiSendInvType == 13;
LABEL_8:
        if ( v5 )
          break;
        if ( uiSendInvType == 16 )
          break;
        return 1;
      case 0x10u:
        if ( uiSendInvType != 3 && uiSendInvType != 13 && uiSendInvType != 14 )
          goto $LN21_64;
        break;
      default:
        break;
    }
    result = 0;
  }
  return result;
}

//----- (006CC730) --------------------------------------------------------
void __thiscall mhEditRoomWin::OnActiveProp(mhEditRoomWin *this, unsigned int uiInvProptype)
{
  mhEditRoomWin *v2; // edi@1
  unsigned int v3; // eax@1
  char *v4; // ecx@1
  signed int v5; // esi@3
  char *v6; // [sp+8h] [bp-8h]@1
  unsigned int i; // [sp+Ch] [bp-4h]@1

  v2 = this;
  v3 = 0;
  v4 = (char *)this->m_pkItemProp;
  i = 0;
  v6 = v4;
  do
  {
    if ( uiInvProptype == v3 )
    {
      *(_BYTE *)(*(_DWORD *)v4 + 380) = 1;
      v5 = 0;
      do
      {
        ((void (__stdcall *)(_DWORD))v2->m_pkItemEnableBag[v5]->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v2->m_pkitemDisableBag[v5]->vfptr[64].__vecDelDtor)(1);
        if ( !v5 )
        {
          ((void (__stdcall *)(_DWORD))v2->m_pkItemEnableBag[0]->vfptr[64].__vecDelDtor)(1);
          ((void (__stdcall *)(_DWORD))v2->m_pkitemDisableBag[0]->vfptr[64].__vecDelDtor)(0);
          mhEditRoomWin::m_uiShowBagPage = 0;
        }
        ++v5;
      }
      while ( v5 < 2 );
      v3 = i;
      v4 = v6;
    }
    else
    {
      *(_BYTE *)(*(_DWORD *)v4 + 380) = 0;
    }
    ++v3;
    v4 += 4;
    i = v3;
    v6 = v4;
  }
  while ( v3 < 4 );
}
// B5C148: using guessed type unsigned int mhEditRoomWin::m_uiShowBagPage;

//----- (006CC7F0) --------------------------------------------------------
void __thiscall mhEditRoomWin::OnActive(mhEditRoomWin *this, unsigned int uiInvType, unsigned int uiPage)
{
  mhEditRoomWin *v3; // ebx@1
  int v4; // esi@6
  signed int v5; // edi@6
  int v6; // eax@8
  int v7; // ecx@8
  unsigned int v8; // esi@9
  int v9; // edi@9
  int InvType; // [sp+1Ch] [bp+8h]@2

  v3 = this;
  switch ( uiInvType )
  {
    case 3u:
      InvType = 0;
      mhEditRoomWin::m_uiInvType = 3;
      mhEditRoomWin::OnActiveProp(this, 0);
      goto LABEL_6;
    case 0xDu:
      InvType = 2;
      mhEditRoomWin::m_uiInvType = 13;
      mhEditRoomWin::OnActiveProp(this, 1u);
      goto LABEL_6;
    case 0xEu:
      InvType = 4;
      mhEditRoomWin::m_uiInvType = 14;
      mhEditRoomWin::OnActiveProp(this, 2u);
      goto LABEL_6;
    case 0x10u:
      InvType = 6;
      mhEditRoomWin::m_uiInvType = 16;
      mhEditRoomWin::OnActiveProp(this, 3u);
LABEL_6:
      v4 = (int)v3->m_apkmhItemInvIconWin;
      v5 = 392;
      do
      {
        *(_BYTE *)(*(_DWORD *)v4 + 456) = 0;
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 324))(0.0);
        v4 += 4;
        --v5;
      }
      while ( v5 );
      v6 = 49 * InvType;
      v7 = 49 * InvType + 49;
      if ( 49 * InvType < v7 )
      {
        v8 = (unsigned int)&v3->m_apkmhItemInvIconWin[v6 + 49 * uiPage];
        v9 = v7 - v6;
        do
        {
          *(_BYTE *)(*(_DWORD *)v8 + 456) = 1;
          (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v8 + 324))(0.0);
          v8 += 4;
          --v9;
        }
        while ( v9 );
      }
      mhEditRoomWin::OnActivePage(v3, uiPage);
      break;
    default:
      return;
  }
}

//----- (006CC920) --------------------------------------------------------
void __thiscall mhEditRoomWin::UpdateMeWin(mhEditRoomWin *this, float fCurTime)
{
  mhEditRoomWin *v2; // esi@1
  PgFrameWork *v3; // edi@2

  v2 = this;
  if ( g_pkKeyboard->m_aucKeystate[0] & 2 )
  {
    v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( !PgWin::IsVisible((PgWin *)&v2->vfptr) )
      return;
    BYTE3(v3[73].m_kMsgQ.m_uiAlloced) = 0;
    PgFrameWork::AddMsg(v3, 0xE0u, 0, 0);
    MoveWindow(v2->m_hWebWindow, -1000, -1000, -999, -999, 0);
    v2->m_bOpen = 0;
  }
  mhEditRoomWin::UpdateWebPos(v2);
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (006CC9A0) --------------------------------------------------------
void __thiscall mhEditRoomWin::OnChangeTab(mhEditRoomWin *this, DirectUserMsgBody_MHInfoTabChanged::TabEnum eTab)
{
  bool v2; // zf@1
  char *v3; // esi@1
  DirectUserMsgBody_MHInfoTabChanged kBody; // [sp+4h] [bp-4h]@1

  *(_BYTE *)(*((_DWORD *)this->m_pkHouseTabList._Myfirst + 2) + 380) = 0;
  v2 = this->m_pkMsgHooker == 0;
  v3 = (char *)&this->vfptr;
  kBody.eChanged = eTab;
  if ( !v2 )
  {
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))this->m_pkMsgHooker->vfptr->SendDirectMessage)(62, &kBody, v3);
    if ( *((_DWORD *)v3 + 1) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v3 + 1) + 20))(62, &kBody, v3);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v3 + 20))(v3, 62, &kBody, v3);
}

//----- (006CCA10) --------------------------------------------------------
char __thiscall mhEditRoomWin::OpenMHRepairWin(mhEditRoomWin *this, bool b, unsigned __int16 FurID)
{
  mhEditRoomWin *v3; // esi@1
  int v4; // eax@1

  v3 = this;
  v4 = *(_DWORD *)&this->m_pkFrameWork[30].m_bInit;
  if ( !v4 )
    return 1;
  if ( *(_WORD *)(v4 + 346) == -1 )
  {
    MiniHouseIndoor::SetRepairObjID(&g_kWorld.m_MiniHouseIndoorMode, FurID);
    mhRepairObjWin::SetRepairObjID(*(mhRepairObjWin **)&v3->m_pkFrameWork[30].m_bInit, FurID);
    GameFrameWork::OpenMHRepairWin((GameFrameWork *)v3->m_pkFrameWork, b, 1);
    OutputDebugStringA("¶ç¿ö¶ç¿ö\n");
    return 1;
  }
  OutputDebugStringA("¾ÈµÈ´Ù ¾ÈµÅ ÀÌ¹Ì ÀÖ¾î\n");
  return 0;
}

//----- (006CCA90) --------------------------------------------------------
void __thiscall mhEditRoomWin::OnRClickEvent(mhEditRoomWin *this, unsigned int uiIndex)
{
  mhEditRoomWin *v2; // ebx@1
  GameFrameWork *v3; // ebx@4
  NiUnsharedGeometryGroup *v4; // eax@4
  mhItemInvIconWin *v5; // eax@7
  Item *v6; // eax@8
  __int16 v7; // dx@9
  int v8; // esi@9
  mhItemInvIconWin *v9; // edi@9
  SHINE_ITEM_STRUCT kItemStruct; // [sp+4h] [bp-6Ch]@9
  mhItemInvIconWin *SelectedIcon; // [sp+6Ch] [bp-4h]@7

  v2 = this;
  if ( !PgCursor::ms_pkDrop )
  {
    if ( nowState && unk_A9944C )
    {
      v3 = (GameFrameWork *)this->m_pkFrameWork;
      v4 = TextData2::Get(0x1275B71u);
      GameFrameWork::AddSysMsg(v3, (const char *)v4);
    }
    else
    {
      if ( nowState == 2 )
        GameFrameWork::AddSysMsg((GameFrameWork *)this->m_pkFrameWork, "¼ö¸® Áß »ç¿ëºÒ°¡LL\n");
      v2->m_pkWorkTargetWin = 0;
      v5 = mhEditRoomWin::GetInvIconWin(v2, mhEditRoomWin::m_uiInvType, uiIndex);
      SelectedIcon = v5;
      if ( v5 )
      {
        v6 = ItemIcon::GetItem((ItemIcon *)&v5->vfptr);
        if ( v6 )
        {
          v7 = mhEditRoomWin::m_uiInvType;
          qmemcpy(&kItemStruct, &v6->m_kStruct, sizeof(kItemStruct));
          v8 = kItemStruct.itemattr.furniture.furnicherID;
          v9 = SelectedIcon;
          v2->m_pkWorkTargetWin = SelectedIcon;
          v2->m_kWorkTargetInven.Inven = (v7 << 10) | uiIndex & 0x3FF;
          if ( v8 != unk_A994A4 )
          {
            MiniHouseIndoor::SetPopUpMHItemInvState(&g_kWorld.m_MiniHouseIndoorMode, 0);
            GameFrameWork::OnOpenMHPopUpMenuInvObjWin(
              (GameFrameWork *)v2->m_pkFrameWork,
              (int)v2,
              (int)v9,
              v9->m_bLock,
              v8);
          }
        }
      }
    }
  }
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (006CCB90) --------------------------------------------------------
void __thiscall mhEditRoomWin::OnLClickEvent(mhEditRoomWin *this, unsigned int uiInvtype, unsigned int uiIndex)
{
  mhEditRoomWin *v3; // esi@1
  GameFrameWork *v4; // esi@3
  NiUnsharedGeometryGroup *v5; // eax@3
  unsigned int v6; // ebx@6
  mhItemInvIconWin *v7; // ecx@12
  Item *v8; // edi@13
  unsigned int v9; // eax@19
  void *v10; // edx@19

  v3 = this;
  if ( nowState && unk_A9944C )
  {
    v4 = (GameFrameWork *)this->m_pkFrameWork;
    v5 = TextData2::Get(0x1275B71u);
    GameFrameWork::AddSysMsg(v4, (const char *)v5);
  }
  else
  {
    if ( nowState == 2 )
      GameFrameWork::AddSysMsg((GameFrameWork *)this->m_pkFrameWork, "¼ö¸® Áß »ç¿ëºÒ°¡LL\n");
    v6 = uiIndex;
    if ( uiIndex >= 0x62 )
    {
LABEL_11:
      v6 = 0;
    }
    else
    {
      switch ( mhEditRoomWin::m_uiInvType )
      {
        case 0xDu:
          v6 = uiIndex + 98;
          break;
        case 0xEu:
          v6 = uiIndex + 196;
          break;
        case 0x10u:
          v6 = uiIndex + 294;
          break;
        default:
          goto LABEL_11;
        case 3u:
          break;
      }
    }
    v7 = v3->m_apkmhItemInvIconWin[v6];
    if ( !v7->m_bLock )
    {
      v8 = ItemIcon::GetItem((ItemIcon *)&v7->vfptr);
      if ( v8 )
      {
        switch ( uiInvtype )
        {
          case 3u:
            v3->m_kDropContents.m_eSenderType = 14;
            break;
          case 0xDu:
            v3->m_kDropContents.m_eSenderType = 15;
            break;
          case 0xEu:
            v3->m_kDropContents.m_eSenderType = 16;
            break;
          case 0x10u:
            v3->m_kDropContents.m_eSenderType = 17;
            break;
          default:
            break;
        }
        v9 = mhEditRoomWin::GetInvIndex(uiInvtype, v6);
        v3->m_kDropContents.m_eType = (DropContents::ContentsType)v10;
        v3->m_kDropContents.m_uiSenderIndex = v9;
        v3->m_kDropContents.m_apvParam[0] = v8;
        v3->m_kDropContents.m_apvParam[1] = v10;
        v3->m_kDropContents.m_uiLot = ((int (__thiscall *)(Item *))v8->vfptr[3].__vecDelDtor)(v8);
        v3->m_kDrop.m_pkSender = (PgWin *)v3;
        PgCursor::ms_pkDrop = &v3->m_kDrop;
        SoundMgr::PlayItemPutSound(v8->m_kStruct.itemid);
      }
    }
  }
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (006CCD30) --------------------------------------------------------
void __thiscall mhEditRoomWin::OnCommand(mhEditRoomWin *this, unsigned int wParam, int lParam)
{
  mhEditRoomWin *v3; // esi@1

  v3 = this;
  switch ( wParam )
  {
    case 0u:
      mhEditRoomWin::OnChangeTab(this, 0);
      break;
    case 1u:
      mhEditRoomWin::OnChangeTab(this, TE_GUEST_BOOK);
      break;
    case 2u:
      mhEditRoomWin::OnChangeTab(this, TE_EDIT_ROOM);
      break;
    case 3u:
      mhEditRoomWin::OnChangeTab(this, TE_PORTAL_LIST);
      break;
    case 4u:
      mhEditRoomWin::OnChangeTab(this, TE_SETTING);
      break;
    case 5u:
      mhEditRoomWin::OnChangeTab(this, TE_OUT);
      break;
    case 0xAu:
      GameFrameWork::OnCloseMHItemInvenWin((GameFrameWork *)this->m_pkFrameWork);
      break;
    case 0xBu:
      mhEditRoomWin::OnLClickEvent(this, mhEditRoomWin::m_uiInvType, lParam);
      break;
    case 0xCu:
      mhEditRoomWin::OnRClickEvent(this, lParam);
      break;
    case 0xDu:
      mhEditRoomWin::OnActive(this, 3u, 0);
      break;
    case 0xEu:
      mhEditRoomWin::OnActive(this, 0xDu, 0);
      break;
    case 0xFu:
      mhEditRoomWin::OnActive(this, 0xEu, 0);
      break;
    case 0x10u:
      mhEditRoomWin::OnActive(this, 0x10u, 0);
      break;
    case 0x11u:
      mhEditRoomWin::OnActive(this, mhEditRoomWin::m_uiInvType, 0);
      break;
    case 0x12u:
      mhEditRoomWin::OnActive(this, mhEditRoomWin::m_uiInvType, 1u);
      break;
    case 0x13u:
      PgFrameWork::AddMsg(this->m_pkFrameWork, 0xE0u, 0, 0);
      MoveWindow(v3->m_hWebWindow, -1000, -1000, -999, -999, 0);
      v3->m_bOpen = 0;
      break;
    case 0x14u:
      mhEditRoomWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (006CCED0) --------------------------------------------------------
void __thiscall mhItemInvIconWin::DoRAction(mhItemInvIconWin *this)
{
  mhItemInvIconWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiRCmdMsg, v1->m_uiInvIndex);
}

//----- (006CCF00) --------------------------------------------------------
void __thiscall mhItemInvIconWin::OnFirstHitWin(mhItemInvIconWin *this)
{
  mhItemInvIconWin *v1; // esi@1
  Item *v2; // edi@1
  mhEditRoomWin *v3; // eax@1
  ItemInfoWin *v4; // ecx@6

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->vfptr[81].__vecDelDtor)(0.0);
  v2 = ItemIcon::GetItem((ItemIcon *)&v1->vfptr);
  v3 = (mhEditRoomWin *)PgWin::GetParentWin((PgWin *)&v1->vfptr);
  if ( v3 && v2 )
  {
    if ( v1->m_eButShow == 1 && nowState == 2 )
      mhEditRoomWin::OpenMHRepairWin(v3, 1, v2->m_kStruct.itemattr.furniture.furnicherID);
    v4 = (ItemInfoWin *)v1->m_pkToolTipWin;
    if ( v4 )
    {
      ItemInfoWin::SetItemInfo(v4, v2);
      PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
    }
  }
}

//----- (006CCF70) --------------------------------------------------------
void __thiscall mhItemInvIconWin::DoAction(mhItemInvIconWin *this)
{
  mhItemInvIconWin *v1; // esi@1
  PgWin *v2; // eax@4

  v1 = this;
  if ( !this->m_bLock )
  {
    if ( nowState == 2 )
    {
      OutputDebugStringA("¾È´ë ¼ö¸®Áß \n");
    }
    else
    {
      v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
      if ( v2 )
        PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiInvIndex);
    }
  }
}

//----- (006CCFC0) --------------------------------------------------------
char __thiscall mhItemInvIconWin::EatDropInstance(mhItemInvIconWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  mhItemInvIconWin *v4; // edi@1
  char result; // al@2
  DropContents *v6; // esi@5
  mhEditRoomWin *v7; // eax@8

  v4 = this;
  if ( !this->m_bLock && *pkDrop && this->m_bActive )
  {
    v6 = (DropContents *)(*pkDrop)->m_pkContents;
    if ( !v6 || v6->m_eType )
    {
LABEL_9:
      result = 0;
    }
    else
    {
      switch ( v6->m_eSenderType )
      {
        case 0xE:
        case 0xF:
        case 0x10:
        case 0x11:
          v7 = (mhEditRoomWin *)PgWin::GetParentWin((PgWin *)&this->vfptr);
          result = mhEditRoomWin::ChangePos(v7, v6, v4->m_uiInvIndex);
          break;
        default:
          goto LABEL_9;
      }
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006CD040) --------------------------------------------------------
void __thiscall mhItemInvIconWin::SetLock(mhItemInvIconWin *this, bool bLock)
{
  mhItemInvIconWin *v2; // ebx@1
  NiProperty *v3; // edi@2
  NiObjectNET *v4; // eax@3
  NiObjectNET *v5; // esi@3
  NiProperty *v6; // esi@7
  NiMaterialProperty *v7; // eax@8
  NiProperty *v8; // eax@9
  double v9; // st7@13
  NiTimeController *kColor; // ST14_4@15
  NiExtraData **kColor_4; // ST18_4@15
  unsigned int kColor_8; // ST1C_4@15

  v2 = this;
  if ( this->m_bLock != bLock )
  {
    v3 = NiAVObject::GetProperty((NiAVObject *)&this->vfptr, 9);
    if ( !v3 )
    {
      v4 = (NiObjectNET *)operator new(0x28u);
      v5 = v4;
      if ( v4 )
      {
        NiObjectNET::NiObjectNET(v4);
        v5->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
        LOWORD(v5[1].vfptr) = 0;
        v5[1].m_uiRefCount = 0;
        v5[1].m_pcName = (char *)1;
      }
      else
      {
        v5 = 0;
      }
      v3 = (NiProperty *)v5;
      NiAVObject::AttachProperty((NiAVObject *)&v2->vfptr, (NiProperty *)v5);
    }
    v6 = NiAVObject::GetProperty((NiAVObject *)&v2->vfptr, 3);
    if ( !v6 )
    {
      v7 = (NiMaterialProperty *)operator new(0x60u);
      if ( v7 )
        NiMaterialProperty::NiMaterialProperty(v7);
      else
        v8 = 0;
      v6 = v8;
      NiAVObject::AttachProperty((NiAVObject *)&v2->vfptr, v8);
    }
    v2->m_bLock = bLock;
    v3[1].m_uiRefCount = 0;
    v3[1].m_pcName = 0;
    ++v6[3].m_uiRefCount;
    if ( bLock )
      v9 = 0.40000001;
    else
      v9 = 1.0;
    *(float *)&kColor = v9;
    *(float *)&kColor_4 = v9;
    v6[2].m_spControllers.m_pObject = kColor;
    *(float *)&kColor_8 = v9;
    v6[2].m_ppkExtra = kColor_4;
    v6[2].m_uiExtraDataSize = kColor_8;
    NiAVObject::UpdateProperties((NiAVObject *)&v2->vfptr);
  }
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);

//----- (006CD170) --------------------------------------------------------
void __thiscall mhItemInvIconWin::UpdateMeWin(mhItemInvIconWin *this, float fCurTime)
{
  mhItemInvIconWin *v2; // ebx@1
  Item *v3; // esi@3
  int v4; // esi@5
  void *(__thiscall *v5)(NiRefObject *, unsigned int); // eax@10
  SHINE_ITEM_STRUCT ItemStruct; // [sp+10h] [bp-68h]@5

  v2 = this;
  switch ( this->m_uiInvType )
  {
    default:
      OutputDebugStringA("wrong inventype_infomation. minihouseiteminventory icons\n");
      break;
    case 3u:
    case 0xDu:
    case 0xEu:
    case 0x10u:
      break;
  }
  v3 = Inventory::GetMHItemInv(&g_kInventory, v2->m_uiInvType, v2->m_uiInvIndex);
  if ( v3 != ItemIcon::GetItem((ItemIcon *)&v2->vfptr) )
  {
    ItemIcon::SetItem((ItemIcon *)&v2->vfptr, v3, 1);
    if ( v3 )
    {
      v4 = (int)&v3->m_kStruct;
      qmemcpy(&ItemStruct, (const void *)v4, 0x64u);
      v4 += 100;
      *((_WORD *)&ItemStruct.itemattr.Bracelet + 49) = *(_WORD *)v4;
      *((_BYTE *)&ItemStruct.itemattr.Bracelet + 100) = *(_BYTE *)(v4 + 2);
      if ( (*(_DWORD *)&ItemStruct.itemid >> 16) & 1 )
      {
        if ( !v2->m_bLock )
          mhItemInvIconWin::SetLock(v2, 1);
      }
      else if ( v2->m_bLock == 1 )
      {
        mhItemInvIconWin::SetLock(v2, 0);
      }
    }
  }
  v5 = v2->vfptr[64].__vecDelDtor;
  if ( v2->m_bActive )
  {
    v5((NiRefObject *)&v2->vfptr, 1u);
    v2->m_bDroppable = 1;
    if ( !ItemIcon::GetItem((ItemIcon *)&v2->vfptr) )
      v2->vfptr[64].__vecDelDtor((NiRefObject *)v2, 0);
    InvWin::UpdateMeWin((InvWin *)&v2->vfptr, fCurTime);
  }
  else
  {
    v5((NiRefObject *)&v2->vfptr, 0);
    v2->m_bDroppable = 0;
  }
}

//----- (006CD290) --------------------------------------------------------
void __thiscall mhItemInvIconWin::SetUse(mhItemInvIconWin *this, bool b)
{
  this->m_bUse = b;
  if ( b == 1 )
    mhItemInvIconWin::SetLock(this, 1);
  else
    mhItemInvIconWin::SetLock(this, 0);
}

//----- (006CD2C0) --------------------------------------------------------
void __thiscall mhEditRoomWin::~mhEditRoomWin(mhEditRoomWin *this)
{
  mhEditRoomWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&mhEditRoomWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhEditRoomWin::`vftable'{for `IDirectMessenger'};
  memset(this->m_apkmhItemInvIconWin, 0, sizeof(this->m_apkmhItemInvIconWin));
  this->m_pkitemDisableBag[0] = 0;
  this->m_pkItemEnableBag[1] = 0;
  this->m_pkitemDisableBag[1] = 0;
  this->m_pkItemEnableBag[0] = 0;
  if ( this->m_pkHouseTabList._Myfirst )
    operator delete(this->m_pkHouseTabList._Myfirst);
  v1->m_pkHouseTabList._Myfirst = 0;
  v1->m_pkHouseTabList._Mylast = 0;
  v1->m_pkHouseTabList._Myend = 0;
  v1->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  if ( v1->m_Tkey._Myres >= 0x10 )
    operator delete(v1->m_Tkey._Bx._Ptr);
  v1->m_Tkey._Mysize = 0;
  v1->m_Tkey._Myres = 15;
  v1->m_Tkey._Bx._Buf[0] = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9BFF80: using guessed type void (__thiscall *mhEditRoomWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9BFF9C: using guessed type int (__thiscall *mhEditRoomWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006CD370) --------------------------------------------------------
mhItemInvIconWin *__cdecl mhItemInvIconWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent)
{
  PgWin *v4; // eax@1
  PgWin *v5; // esi@1
  PgWin *v6; // edi@8
  mhItemInvIconWin *v7; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v4 = (PgWin *)operator new(0x1D8u);
  v5 = v4;
  result.m_pObject = v4;
  v9 = 0;
  if ( v4 )
  {
    InvWin::InvWin((InvWin *)v4);
    LOBYTE(v9) = 1;
    v5->vfptr = (NiRefObjectVtbl *)&mhItemInvIconWin::`vftable'{for `NiNode'};
    v5->vfptr = (IDirectMessengerVtbl *)&mhItemInvIconWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v5[1].m_kLocal.m_Translate.y) = 0;
    v5[1].m_kPropertyList.m_pkHead = (NiTListItem<NiPointer<NiProperty> > *)-1;
    v5[1].m_kPropertyList.m_pkTail = (NiTListItem<NiPointer<NiProperty> > *)9;
    ItemIcon::SetItem((ItemIcon *)v5, 0, 1);
    LOWORD(v5[1].m_kPropertyList.m_kAllocator.m_uiCount) = 0;
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v9 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, v5);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, PgWin *))v5->vfptr[155].__vecDelDtor)(
                          v5,
                          iXPos,
                          iYPos,
                          uiInvIndex,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v5->vfptr[89].__vecDelDtor)(v5);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = (mhItemInvIconWin *)v5;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v5);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = 0;
  }
  return v7;
}
// 9BFCF0: using guessed type void (__thiscall *mhItemInvIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9BFD0C: using guessed type int (__thiscall *mhItemInvIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006CD4F0) --------------------------------------------------------
void __thiscall mhEditRoomWin::ShowWeb(mhEditRoomWin *this, char *eKey)
{
  mhEditRoomWin *v2; // esi@1
  int v3; // eax@3
  NiRefObjectVtbl *v4; // edx@3
  int v5; // eax@3
  int v6; // edx@3
  int v7; // edi@3
  int v8; // ebx@3
  int v9; // eax@3
  const char *v10; // eax@6
  HWND v11; // edi@8
  void *(__thiscall *v12)(NiRefObject *, unsigned int); // edx@8
  int v13; // edi@8
  int kRect; // [sp+10h] [bp-54h]@3
  int nHeight; // [sp+20h] [bp-44h]@3
  int nWidth; // [sp+24h] [bp-40h]@3
  NiRect<int> kNiRect; // [sp+28h] [bp-3Ch]@8
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > WebURL; // [sp+38h] [bp-2Ch]@3
  int v19; // [sp+60h] [bp-4h]@3

  v2 = this;
  if ( this->m_bOpen == 1 )
    DestroyWindow(this->m_hWebWindow);
  v3 = ((int (__thiscall *)(mhEditRoomWin *))v2->vfptr[41].__vecDelDtor)(v2);
  v4 = v2->vfptr;
  v2->m_uiWebXPos = v2->m_uiPlaneWebXPos + v3;
  v5 = ((int (__thiscall *)(mhEditRoomWin *))v4[42].__vecDelDtor)(v2);
  v6 = v2->m_uiWebXPos;
  v7 = v5 + v2->m_uiPlaneWebYPos + 2;
  nWidth = v2->m_uiPlaneWebWidth - 8;
  v2->m_uiWebWidth = nWidth;
  v8 = 0;
  v9 = v2->m_uiPlaneWebHeight - 10;
  v2->m_uiWebYPos = v7;
  nHeight = v9;
  v2->m_uiWebHeight = v9;
  kRect = v6;
  WebURL._Myres = 15;
  WebURL._Mysize = 0;
  WebURL._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&WebURL, &byte_9BFAB8, 0);
  v19 = 0;
  if ( eKey )
  {
    v10 = WebURL._Bx._Ptr;
    if ( WebURL._Myres < 0x10 )
      v10 = (const char *)&WebURL;
    v11 = CreateWindowExA(
            0,
            "WebCtrl32",
            v10,
            0x90000000,
            kRect,
            v7,
            nWidth,
            nHeight,
            g_hMainWnd,
            0,
            g_hMainInstance,
            0);
    ShowWindow(v11, 5);
    v12 = v2->vfptr[52].__vecDelDtor;
    v2->m_hWebWindow = v11;
    v2->m_bOpen = 1;
    kNiRect.m_left = 0;
    kNiRect.m_right = 0;
    kNiRect.m_top = 0;
    kNiRect.m_bottom = 0;
    v12((NiRefObject *)&v2->vfptr, (unsigned int)&kNiRect);
    v13 = 0;
    if ( PgWin::ms_uiScreenWidth >= kNiRect.m_right - kNiRect.m_left
      && PgWin::ms_uiScreenHeight >= kNiRect.m_bottom - kNiRect.m_top )
    {
      v13 = ((int (__thiscall *)(mhEditRoomWin *))v2->vfptr[41].__vecDelDtor)(v2);
      v8 = ((int (__thiscall *)(mhEditRoomWin *))v2->vfptr[42].__vecDelDtor)(v2);
    }
    v2->vfptr[43].__vecDelDtor((NiRefObject *)v2, v13);
    v2->vfptr[44].__vecDelDtor((NiRefObject *)v2, v8);
    if ( WebURL._Myres >= 0x10 )
      operator delete(WebURL._Bx._Ptr);
  }
  else if ( WebURL._Myres >= 0x10 )
  {
    operator delete(WebURL._Bx._Ptr);
  }
}

//----- (006CD6C0) --------------------------------------------------------
void __thiscall mhEditRoomWin::mhEditRoomWin(mhEditRoomWin *this)
{
  mhEditRoomWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&mhEditRoomWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&mhEditRoomWin::`vftable'{for `IDirectMessenger'};
  v1->m_Tkey._Myres = 15;
  v1->m_Tkey._Mysize = 0;
  v1->m_Tkey._Bx._Buf[0] = 0;
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  v1->m_kDrop.m_pkSender = 0;
  v1->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v1->m_kDropContents.m_kItemID = -1;
  v1->m_kDropContents.m_uiLot = 0;
  v1->m_pkHouseTabList._Myfirst = 0;
  v1->m_pkHouseTabList._Mylast = 0;
  v1->m_pkHouseTabList._Myend = 0;
  memset(v1->m_apkmhItemInvIconWin, 0, sizeof(v1->m_apkmhItemInvIconWin));
  v1->m_pkitemDisableBag[0] = 0;
  v1->m_pkItemEnableBag[1] = 0;
  v1->m_pkitemDisableBag[1] = 0;
  v1->m_pkItemEnableBag[0] = 0;
  mhEditRoomWin::m_uiInvType = 0;
  mhEditRoomWin::m_uiShowBagPage = 0;
  v1->m_kDrop.m_pkContents = &v1->m_kDropContents;
  v1->m_hWebWindow = 0;
  v1->m_uiWebYPos = 0;
  v1->m_uiWebXPos = 0;
  v1->m_uiWebHeight = 0;
  v1->m_uiWebWidth = 0;
  v1->m_bOpen = 0;
  v1->m_uiPlaneWebYPos = 0;
  v1->m_uiPlaneWebXPos = 0;
  v1->m_uiPlaneWebHeight = 0;
  v1->m_uiPlaneWebWidth = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v1->m_Tkey, byte_9BFAB9, 0);
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9BFF80: using guessed type void (__thiscall *mhEditRoomWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9BFF9C: using guessed type int (__thiscall *mhEditRoomWin::`vftable'{for `NiNode'})(void *p, char);
// B5C148: using guessed type unsigned int mhEditRoomWin::m_uiShowBagPage;

//----- (006CD800) --------------------------------------------------------
mhEditRoomWin *__cdecl mhEditRoomWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  mhEditRoomWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0xE70u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    mhEditRoomWin::mhEditRoomWin((mhEditRoomWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (mhEditRoomWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (006CD930) --------------------------------------------------------
char __thiscall mhItemInvIconWin::Create(mhItemInvIconWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent)
{
  mhItemInvIconWin *v5; // esi@1
  char result; // al@1

  v5 = this;
  result = ItemIcon::Create((ItemIcon *)&this->vfptr, iXPos, iYPos, pkParent);
  if ( result )
  {
    v5->m_uiInvIndex = uiInvIndex;
    ItemIcon::ShowLotText((ItemIcon *)&v5->vfptr, 1);
    pkParent = (PgWin *)v5;
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      &IconWin::ms_kCoolTimeIconList,
      (const unsigned int *)&pkParent);
    v5->m_bUse = 0;
    result = 1;
  }
  return result;
}

//----- (006CD990) --------------------------------------------------------
char __thiscall mhEditRoomWin::Create(mhEditRoomWin *this, PgFrameWork *pkFrameWork)
{
  mhEditRoomWin *v2; // esi@1
  NiTexturePalette *v3; // ebx@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  PgFont *v8; // eax@11
  PgWinText *v9; // edi@11
  NiRefObjectVtbl *v10; // ebx@11
  NiUnsharedGeometryGroup *v11; // eax@11
  unsigned int v12; // ebx@11
  NiSourceTexture *v13; // eax@11
  PgSprData *v14; // eax@12
  PgSprData *v15; // eax@14
  PgSprData *v16; // eax@16
  PgSprData *v17; // eax@16
  PgWinSpr *v18; // eax@16
  NiNode *v19; // ecx@16
  PgSprData *v20; // eax@16
  NiUnsharedGeometryGroup *v21; // eax@16
  NiUnsharedGeometryGroup *v22; // eax@16
  NiUnsharedGeometryGroup *v23; // eax@16
  NiUnsharedGeometryGroup *v24; // eax@16
  NiUnsharedGeometryGroup *v25; // eax@16
  NiUnsharedGeometryGroup *v26; // eax@16
  const char *v27; // eax@17
  const char *v28; // eax@19
  char *v29; // eax@21
  ColumnBut *v30; // ebx@23
  PgSprData *v31; // edi@24
  ColumnBut *v32; // ST60_4@24
  ColumnBut *v33; // edi@24
  PgFont *v34; // ST5C_4@24
  unsigned int v35; // ST58_4@24
  unsigned int v36; // eax@24
  PgWinText *v37; // edi@24
  NiRefObjectVtbl *v38; // ebx@24
  NiUnsharedGeometryGroup *v39; // eax@24
  NiRefObjectVtbl *v40; // ebx@24
  PgFont *v41; // eax@24
  PgSprData *v42; // edi@24
  ColumnBut *v43; // ST60_4@24
  ColumnBut *v44; // edi@24
  PgFont *v45; // ST5C_4@24
  unsigned int v46; // ST58_4@24
  unsigned int v47; // eax@24
  PgWinText *v48; // edi@24
  NiRefObjectVtbl *v49; // ebx@24
  NiUnsharedGeometryGroup *v50; // eax@24
  NiRefObjectVtbl *v51; // ebx@24
  PgFont *v52; // eax@24
  PgSprData *v53; // edi@24
  ColumnBut *v54; // ST60_4@24
  ColumnBut *v55; // edi@24
  PgFont *v56; // ST5C_4@24
  unsigned int v57; // ST58_4@24
  unsigned int v58; // eax@24
  PgWinText *v59; // edi@24
  NiRefObjectVtbl *v60; // ebx@24
  NiUnsharedGeometryGroup *v61; // eax@24
  NiRefObjectVtbl *v62; // ebx@24
  PgFont *v63; // eax@24
  PgSprData *v64; // edi@24
  ColumnBut *v65; // ST60_4@24
  ColumnBut *v66; // edi@24
  PgFont *v67; // ST5C_4@24
  unsigned int v68; // ST58_4@24
  unsigned int v69; // eax@24
  PgWinText *v70; // edi@24
  NiRefObjectVtbl *v71; // ebx@24
  NiUnsharedGeometryGroup *v72; // eax@24
  NiRefObjectVtbl *v73; // ebx@24
  PgFont *v74; // eax@24
  signed int v75; // ebx@24
  PgSprData *v76; // eax@24
  InvTabButWin *v77; // eax@24
  NiNode *v78; // edx@24
  PgSprData *v79; // eax@24
  InvTabButWin *v80; // eax@24
  NiNode *v81; // ecx@24
  PgSprData *v82; // eax@24
  PgSprData *v83; // eax@24
  PgSprData *v84; // edi@24
  NiSourceTexture *v85; // edi@24
  PgSprData *v86; // edi@25
  int v87; // edi@26
  PgSprData *v88; // eax@28
  _DWORD *v89; // ebx@28
  unsigned int v90; // eax@29
  ItemIcon *v91; // eax@47
  void *(__thiscall *v92)(NiRefObject *, unsigned int); // eax@48
  NiNode *v93; // esi@50
  unsigned int v94; // [sp+7Ch] [bp-14Ch]@17
  unsigned int uiWidth; // [sp+80h] [bp-148h]@10
  unsigned int uiHeight; // [sp+84h] [bp-144h]@10
  int i; // [sp+88h] [bp-140h]@21
  int iOffY; // [sp+8Ch] [bp-13Ch]@4
  int j; // [sp+90h] [bp-138h]@19
  int iOffX; // [sp+94h] [bp-134h]@4
  unsigned int uiIndex; // [sp+98h] [bp-130h]@16
  NiPointer<NiNode> spNode; // [sp+9Ch] [bp-12Ch]@1
  int iTop; // [sp+A0h] [bp-128h]@10
  int iLeft; // [sp+A4h] [bp-124h]@10
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strName; // [sp+A8h] [bp-120h]@16
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > pkToolTipText[6]; // [sp+C4h] [bp-104h]@16
  char acShapeName[64]; // [sp+16Ch] [bp-5Ch]@28
  char acNum[12]; // [sp+1ACh] [bp-1Ch]@16
  int v109; // [sp+1C4h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  this->m_kWorkTargetInven.Inven = 0;
  v3 = pTexturePalette;
  v109 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\MiniHomeEdit.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iOffX, &iOffY, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "mhEditRoomWin", 0)
    || !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &iLeft, &iTop, &uiWidth, &uiHeight) )
  {
    v6 = spNode.m_pObject;
    v109 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = Font::Get(MAIN_MENU);
  v9 = PgWinText::CreateWin(iLeft - iOffX, iTop - iOffY + 2, uiWidth, uiHeight, v8, (PgWin *)&v2->vfptr, 0, 0);
  v9->vfptr[122].__vecDelDtor((NiRefObject *)v9, 1u);
  v9->vfptr[117].__vecDelDtor((NiRefObject *)v9, (unsigned int)&Color::m_kDxWinTitleColor);
  v10 = v9->vfptr;
  v11 = TextData2::Get(0xE6EC4424);
  v10[118].__vecDelDtor((NiRefObject *)v9, (unsigned int)v11);
  v12 = 0;
  v9->vfptr[60].__vecDelDtor((NiRefObject *)v9, 0);
  v13 = MenuTexMgr::GetTexture(0x13u);
  if ( v13 )
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, v13);
  else
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft - iOffX, iTop - iOffY, v14, (PgWin *)&v2->vfptr, 0, 0);
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft - iOffX, iTop - iOffX, v15, (PgWin *)&v2->vfptr, 0, 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "Panel02",
          &v2->m_uiPlaneWebXPos,
          &v2->m_uiPlaneWebYPos,
          &v2->m_uiPlaneWebWidth,
          &v2->m_uiPlaneWebHeight) )
  {
    v109 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft - iOffX, iTop - iOffX, v16, (PgWin *)&v2->vfptr, 0, 0);
  v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel03", &iLeft, &iTop, 0);
  v18 = PgWinSpr::CreateWin(iLeft, iTop, v17, (PgWin *)&v2->vfptr, 0, 0);
  v19 = spNode.m_pObject;
  v2->m_pkPanel = v18;
  v20 = PgSprData::Create((NiAVObject *)&v19->vfptr, "Panel04", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft, iTop, v20, (PgWin *)&v2->vfptr, 0, 0);
  strName._Myres = 15;
  strName._Mysize = 0;
  strName._Bx._Buf[0] = 0;
  LOBYTE(v109) = 1;
  strcpy(acNum, "0");
  *(_DWORD *)&acNum[2] = 0;
  *(_DWORD *)&acNum[6] = 0;
  *(_WORD *)&acNum[10] = 0;
  v21 = TextData2::Get(0x9BA8F7E2);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
    pkToolTipText,
    (const char *)v21);
  LOBYTE(v109) = 2;
  v22 = TextData2::Get(0x4C494A23u);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
    &pkToolTipText[1],
    (const char *)v22);
  LOBYTE(v109) = 3;
  v23 = TextData2::Get(0xE6EC4424);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
    &pkToolTipText[2],
    (const char *)v23);
  LOBYTE(v109) = 4;
  v24 = TextData2::Get(0xD7F24143);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
    &pkToolTipText[3],
    (const char *)v24);
  LOBYTE(v109) = 5;
  v25 = TextData2::Get(0xDEE82F0D);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
    &pkToolTipText[4],
    (const char *)v25);
  LOBYTE(v109) = 6;
  v26 = TextData2::Get(0xFA4A423F);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
    &pkToolTipText[5],
    (const char *)v26);
  LOBYTE(v109) = 7;
  uiIndex = (unsigned int)pkToolTipText;
  do
  {
    v94 = v12 + 1;
    _itoa(v12 + 1, acNum, 10);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strName, "BtnNor0", 7u);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strName, acNum, strlen(acNum));
    v27 = strName._Bx._Ptr;
    if ( strName._Myres < 0x10 )
      v27 = (const char *)&strName;
    j = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, v27, &iLeft, &iTop, 0);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strName, "BtnOver0", 8u);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strName, acNum, strlen(acNum));
    v28 = strName._Bx._Ptr;
    if ( strName._Myres < 0x10 )
      v28 = (const char *)&strName;
    PgSprData::Add((PgSprData *)j, (NiAVObject *)&spNode.m_pObject->vfptr, v28);
    i = (int)ColumnBut::CreateWin(iLeft, iTop, (PgSprData *)j, (PgWin *)&v2->vfptr, v12, 0);
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_pkHouseTabList,
      (const unsigned int *)&i);
    v29 = (char *)uiIndex;
    if ( *(_DWORD *)(uiIndex + 20) >= 0x10u )
      v29 = *(char **)uiIndex;
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkHouseTabList._Myfirst[v12]->vfptr, v29);
    v30 = v2->m_pkHouseTabList._Myfirst[v12];
    uiIndex += 28;
    v30->m_pkToolTipWin = g_pkToolTipWin;
    v12 = v94;
  }
  while ( v94 < 6 );
  (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v2->m_pkHouseTabList._Myfirst + 1) + 240))(0);
  v31 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab01_Off", &iLeft, &iTop, 0);
  PgSprData::Add(v31, (NiAVObject *)&spNode.m_pObject->vfptr, "Tab01_On");
  v32 = ColumnBut::CreateWin(iLeft, iTop, v31, (PgWin *)&v2->vfptr, 0xDu, 0);
  v2->m_pkItemProp[0] = v32;
  v33 = v32;
  v34 = Font::Get(0);
  v35 = ((int (__thiscall *)(ColumnBut *))v33->vfptr[37].__vecDelDtor)(v33);
  v36 = ((int (__thiscall *)(ColumnBut *))v33->vfptr[36].__vecDelDtor)(v33);
  v37 = PgWinText::CreateWin(0, 3, v36, v35, v34, (PgWin *)&v32->vfptr, 0, 0);
  v37->vfptr[122].__vecDelDtor((NiRefObject *)v37, 5u);
  v38 = v37->vfptr;
  v39 = TextData2::Get(0xB606500D);
  v38[118].__vecDelDtor((NiRefObject *)v37, (unsigned int)v39);
  v40 = v37->vfptr;
  v41 = Font::Get(MENU);
  v40[113].__vecDelDtor((NiRefObject *)v37, (unsigned int)v41);
  SpScreenText::SetShadowOffset((SpScreenText *)&v37->m_spTextGeom.m_pObject->vfptr, 1u);
  v37->vfptr[60].__vecDelDtor((NiRefObject *)v37, 0);
  v2->m_pkItemProp[0]->m_bCheck = 1;
  v42 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab02_Off", &iLeft, &iTop, 0);
  PgSprData::Add(v42, (NiAVObject *)&spNode.m_pObject->vfptr, "Tab021_On");
  v43 = ColumnBut::CreateWin(iLeft, iTop, v42, (PgWin *)&v2->vfptr, 0xEu, 0);
  v2->m_pkItemProp[1] = v43;
  v44 = v43;
  v45 = Font::Get(0);
  v46 = ((int (__thiscall *)(ColumnBut *))v44->vfptr[37].__vecDelDtor)(v44);
  v47 = ((int (__thiscall *)(ColumnBut *))v44->vfptr[36].__vecDelDtor)(v44);
  v48 = PgWinText::CreateWin(0, 3, v47, v46, v45, (PgWin *)&v43->vfptr, 0, 0);
  v48->vfptr[122].__vecDelDtor((NiRefObject *)v48, 5u);
  v49 = v48->vfptr;
  v50 = TextData2::Get(0xA31F47F8);
  v49[118].__vecDelDtor((NiRefObject *)v48, (unsigned int)v50);
  v51 = v48->vfptr;
  v52 = Font::Get(MENU);
  v51[113].__vecDelDtor((NiRefObject *)v48, (unsigned int)v52);
  SpScreenText::SetShadowOffset((SpScreenText *)&v48->m_spTextGeom.m_pObject->vfptr, 1u);
  v48->vfptr[60].__vecDelDtor((NiRefObject *)v48, 0);
  v2->m_pkItemProp[1]->m_bCheck = 0;
  v53 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab03_Off", &iLeft, &iTop, 0);
  PgSprData::Add(v53, (NiAVObject *)&spNode.m_pObject->vfptr, "Tab03_On");
  v54 = ColumnBut::CreateWin(iLeft, iTop, v53, (PgWin *)&v2->vfptr, 0xFu, 0);
  v2->m_pkItemProp[2] = v54;
  v55 = v54;
  v56 = Font::Get(0);
  v57 = ((int (__thiscall *)(ColumnBut *))v55->vfptr[37].__vecDelDtor)(v55);
  v58 = ((int (__thiscall *)(ColumnBut *))v55->vfptr[36].__vecDelDtor)(v55);
  v59 = PgWinText::CreateWin(0, 3, v58, v57, v56, (PgWin *)&v54->vfptr, 0, 0);
  v59->vfptr[122].__vecDelDtor((NiRefObject *)v59, 5u);
  v60 = v59->vfptr;
  v61 = TextData2::Get(0xA2C7F5FE);
  v60[118].__vecDelDtor((NiRefObject *)v59, (unsigned int)v61);
  v62 = v59->vfptr;
  v63 = Font::Get(MENU);
  v62[113].__vecDelDtor((NiRefObject *)v59, (unsigned int)v63);
  SpScreenText::SetShadowOffset((SpScreenText *)&v59->m_spTextGeom.m_pObject->vfptr, 1u);
  v59->vfptr[60].__vecDelDtor((NiRefObject *)v59, 0);
  v2->m_pkItemProp[2]->m_bCheck = 0;
  v64 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab04_Off", &iLeft, &iTop, 0);
  PgSprData::Add(v64, (NiAVObject *)&spNode.m_pObject->vfptr, "Tab04_On");
  v65 = ColumnBut::CreateWin(iLeft, iTop, v64, (PgWin *)&v2->vfptr, 0x10u, 0);
  v2->m_pkItemProp[3] = v65;
  v66 = v65;
  v67 = Font::Get(0);
  v68 = ((int (__thiscall *)(ColumnBut *))v66->vfptr[37].__vecDelDtor)(v66);
  v69 = ((int (__thiscall *)(ColumnBut *))v66->vfptr[36].__vecDelDtor)(v66);
  v70 = PgWinText::CreateWin(0, 3, v69, v68, v67, (PgWin *)&v65->vfptr, 0, 0);
  v70->vfptr[122].__vecDelDtor((NiRefObject *)v70, 5u);
  v71 = v70->vfptr;
  v72 = TextData2::Get(0xE8F1CDE4);
  v71[118].__vecDelDtor((NiRefObject *)v70, (unsigned int)v72);
  v73 = v70->vfptr;
  v74 = Font::Get(MENU);
  v73[113].__vecDelDtor((NiRefObject *)v70, (unsigned int)v74);
  SpScreenText::SetShadowOffset((SpScreenText *)&v70->m_spTextGeom.m_pObject->vfptr, 1u);
  v75 = 0;
  v70->vfptr[60].__vecDelDtor((NiRefObject *)v70, 0);
  v2->m_pkItemProp[3]->m_bCheck = 0;
  v76 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "InvFitTabOn", &iLeft, &iTop, 0);
  v77 = InvTabButWin::CreateWin(iLeft, iTop, v76, (PgWin *)&v2->vfptr, 0);
  v78 = spNode.m_pObject;
  v2->m_pkItemEnableBag[0] = (PgWinBut *)v77;
  v79 = PgSprData::Create((NiAVObject *)&v78->vfptr, "InvFitTabDis", &iLeft, &iTop, 0);
  v80 = InvTabButWin::CreateWin(iLeft, iTop, v79, (PgWin *)&v2->vfptr, 0x11u);
  v81 = spNode.m_pObject;
  v2->m_pkitemDisableBag[0] = (PgWinBut *)v80;
  v82 = PgSprData::Create((NiAVObject *)&v81->vfptr, "InvSecTabOn", &iLeft, &iTop, 0);
  v2->m_pkItemEnableBag[1] = (PgWinBut *)InvTabButWin::CreateWin(iLeft, iTop, v82, (PgWin *)&v2->vfptr, 0);
  v83 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "InvSecTabDis", &iLeft, &iTop, 0);
  v2->m_pkitemDisableBag[1] = (PgWinBut *)InvTabButWin::CreateWin(iLeft, iTop, v83, (PgWin *)&v2->vfptr, 0x12u);
  uiIndex = 0;
  v84 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &iLeft, &iTop, 0);
  PgSprData::Add(v84, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(v84, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinBut::CreateWin(iLeft, iTop, v84, (PgWin *)&v2->vfptr, 0x13u, 0, 0);
  v85 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    v86 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &iLeft, &iTop, v85);
    PgSprData::Add(v86, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(v86, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(iLeft, iTop, v86, (PgWin *)&v2->vfptr, 0x14u, 0, 0);
  }
  i = 0;
  v87 = (int)v2->m_apkmhItemInvIconWin;
  do
  {
    if ( v75 < 49 )
    {
      sprintf(acShapeName, "ItemSlot%02d", v75 + 1);
      PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &iLeft, &iTop, &uiWidth, &uiHeight);
      v88 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &iLeft, &iTop, 0);
      *(_DWORD *)(v87 + 1568) = PgWinSpr::CreateWin(iLeft - iOffX, iTop - iOffY, v88, (PgWin *)&v2->vfptr, 0, 0);
      j = 0;
      v89 = (_DWORD *)v87;
      do
      {
        v90 = uiIndex;
        if ( j & 1 )
          v90 = uiIndex + 49;
        *v89 = mhItemInvIconWin::CreateWin(iLeft - iOffX + 1, iTop - iOffY + 1, v90, (PgWin *)&v2->vfptr);
        v89 += 49;
        ++j;
      }
      while ( j < 8 );
      v75 = i;
    }
    if ( uiIndex >= 0x62 )
      uiIndex = 0;
    ItemIcon::SetItem(*(ItemIcon **)v87, 0, 1);
    (*(void (__stdcall **)(signed int))(**(_DWORD **)v87 + 516))(11);
    (*(void (__stdcall **)(signed int))(**(_DWORD **)v87 + 560))(12);
    if ( v75 >= 0 )
    {
      if ( v75 < 98 )
      {
        InvWin::SetInvType(*(InvWin **)v87, 3u);
        goto LABEL_47;
      }
LABEL_39:
      if ( v75 < 196 )
      {
        InvWin::SetInvType(*(InvWin **)v87, 0xDu);
        goto LABEL_47;
      }
      goto LABEL_42;
    }
    if ( v75 >= 98 )
      goto LABEL_39;
    if ( v75 < 196 )
    {
      if ( v75 < 294 )
        goto LABEL_47;
      goto LABEL_45;
    }
LABEL_42:
    if ( v75 < 294 )
    {
      InvWin::SetInvType(*(InvWin **)v87, 0xEu);
      goto LABEL_47;
    }
LABEL_45:
    if ( v75 < 392 )
      InvWin::SetInvType(*(InvWin **)v87, 0x10u);
LABEL_47:
    mhItemInvIconWin::SetLock(*(mhItemInvIconWin **)v87, 0);
    *(_DWORD *)(*(_DWORD *)v87 + 272) = g_pkItemInfoWin;
    *(_DWORD *)(*(_DWORD *)v87 + 304) = 1;
    IconWin::ShowFocus(*(IconWin **)v87, 1);
    v91 = *(ItemIcon **)v87;
    ++uiIndex;
    ++v75;
    v87 += 4;
    v91->m_bDroppable = 0;
    i = v75;
  }
  while ( v75 < 392 );
  v92 = v2->vfptr[130].__vecDelDtor;
  v2->m_pkWorkTargetWin = 0;
  v92((NiRefObject *)&v2->vfptr, 0);
  mhEditRoomWin::OnActive(v2, 3u, 0);
  ((void (__thiscall *)(mhEditRoomWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.0,
    0.5);
  LOBYTE(v109) = 1;
  `eh vector destructor iterator'(
    pkToolTipText,
    0x1Cu,
    6,
    (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
  if ( strName._Myres >= 0x10 )
    operator delete(strName._Bx._Ptr);
  v93 = spNode.m_pObject;
  strName._Myres = 15;
  strName._Mysize = 0;
  strName._Bx._Buf[0] = 0;
  v109 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v93 )
    v93->vfptr->__vecDelDtor((NiRefObject *)v93, 1u);
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006CE7E0) --------------------------------------------------------
mhItemInvIconWin *__thiscall mhItemInvIconWin::`scalar deleting destructor'(mhItemInvIconWin *this, unsigned int a2)
{
  mhItemInvIconWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&mhItemInvIconWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhItemInvIconWin::`vftable'{for `IDirectMessenger'};
  InvWin::~InvWin((InvWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9BFCF0: using guessed type void (__thiscall *mhItemInvIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9BFD0C: using guessed type int (__thiscall *mhItemInvIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006CE820) --------------------------------------------------------
mhEditRoomWin *__thiscall mhEditRoomWin::`vector deleting destructor'(mhEditRoomWin *this, unsigned int a2)
{
  mhEditRoomWin *v2; // esi@1

  v2 = this;
  mhEditRoomWin::~mhEditRoomWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006CE850) --------------------------------------------------------
void __thiscall mhEmotionWin::mhEmotionWin(mhEmotionWin *this)
{
  mhEmotionWin *v1; // esi@1
  PgSprData **v2; // eax@1
  signed int v3; // edx@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&mhEmotionWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&mhEmotionWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkFurnitureNameWin = 0;
  v2 = v1->m_pkActBtnNormal;
  v3 = 15;
  do
  {
    *(v2 - 15) = 0;
    *v2 = 0;
    ++v2;
    --v3;
  }
  while ( v3 );
  v1->m_pkMenuBtn[0] = 0;
  v1->m_pkMenuBtnText[0] = 0;
  v1->m_pkMenuBtn[1] = 0;
  v1->m_pkMenuBtnText[1] = 0;
  v1->m_pkMenuBtn[2] = 0;
  v1->m_pkMenuBtnText[2] = 0;
  v1->m_pkMenuBtn[3] = 0;
  v1->m_pkMenuBtnText[3] = 0;
  v1->m_pkMenuBtn[4] = 0;
  v1->m_pkMenuBtnText[4] = 0;
  *(_DWORD *)&v1->m_bCanHold = -65536;
}
// 9C02AC: using guessed type void (__thiscall *mhEmotionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C02CC: using guessed type int (__thiscall *mhEmotionWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006CE8E0) --------------------------------------------------------
void __thiscall mhEmotionWin::~mhEmotionWin(mhEmotionWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&mhEmotionWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhEmotionWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9C02AC: using guessed type void (__thiscall *mhEmotionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C02CC: using guessed type int (__thiscall *mhEmotionWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006CE910) --------------------------------------------------------
bool __stdcall mhEmotionWin::DoAction(char ActionIndex)
{
  return 0;
}

//----- (006CE920) --------------------------------------------------------
char __thiscall mhEmotionWin::Create(mhEmotionWin *this, PgFrameWork *pkFrameWork)
{
  mhEmotionWin *v2; // edi@1
  NiTexturePalette *v3; // ebx@1
  const char *v4; // eax@3
  NiNode *v5; // eax@3
  NiNode *v6; // esi@7
  volatile LONG *v7; // eax@7
  PgSprData *v9; // eax@12
  int v10; // esi@17
  int v11; // ebx@17
  PgWin *v12; // ST28_4@18
  PgFont *v13; // eax@18
  PgWinAbbreviateText *v14; // eax@18
  PgSprData *v15; // eax@18
  signed int v16; // ebx@18
  PgWinText **v17; // esi@18
  PgSprData *v18; // ebx@22
  PgWinBut *v19; // eax@22
  bool v20; // sf@22
  unsigned __int8 v21; // of@22
  PgSprData *v22; // ebx@23
  NiPointer<PgSprData::PgHitTester> *v23; // ecx@25
  unsigned int v24; // ebx@25
  PgFont *v25; // eax@25
  PgWinText *v26; // eax@25
  NiRefObjectVtbl *v27; // ebx@26
  NiPointer<PgSprData::PgHitTester> *v28; // edx@27
  unsigned int v29; // ebx@27
  PgFont *v30; // eax@27
  PgWinText *v31; // eax@27
  NiPointer<PgSprData::PgHitTester> *v32; // edx@28
  unsigned int v33; // ebx@28
  PgFont *v34; // eax@28
  PgWinText *v35; // eax@28
  NiPointer<PgSprData::PgHitTester> *v36; // edx@29
  unsigned int v37; // ebx@29
  PgFont *v38; // eax@29
  PgWinText *v39; // eax@29
  NiRefObjectVtbl *v40; // ebx@29
  NiUnsharedGeometryGroup *v41; // eax@29
  PgWinBut *v42; // eax@30
  NiPointer<PgSprData::PgHitTester> *v43; // ecx@30
  unsigned int v44; // ebx@30
  PgFont *v45; // eax@30
  PgWinText *v46; // eax@30
  NiNode *v47; // esi@33
  NiUnsharedGeometryGroup *v48; // [sp+2Ch] [bp-58h]@0
  unsigned int v49; // [sp+2Ch] [bp-58h]@25
  unsigned int uiHeight; // [sp+3Ch] [bp-48h]@17
  unsigned int uiWidth; // [sp+40h] [bp-44h]@17
  int i; // [sp+44h] [bp-40h]@18
  unsigned int v53; // [sp+48h] [bp-3Ch]@25
  int iYOff; // [sp+4Ch] [bp-38h]@17
  int iXOff; // [sp+50h] [bp-34h]@17
  NiPointer<NiNode> spNode; // [sp+54h] [bp-30h]@1
  char temp[3]; // [sp+58h] [bp-2Ch]@18
  int iTop; // [sp+5Ch] [bp-28h]@12
  int iLeft; // [sp+60h] [bp-24h]@12
  char strbuf[15]; // [sp+64h] [bp-20h]@18
  int v61; // [sp+80h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v61 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\MyHomeMenu.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = spNode.m_pObject;
  if ( !spNode.m_pObject )
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("Game\\MyHomeMenu.nif load fail", "LoadFail", spNode.m_pObject);
      v5 = spNode.m_pObject;
    }
    v61 = -1;
    if ( !v5 )
      return 0;
    v6 = v5;
    v7 = (volatile LONG *)&v5->m_uiRefCount;
    goto LABEL_8;
  }
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iLeft, &iTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "mhEmotionWin", 0) )
  {
    if ( NiMessageBox::ms_pfnMessageBox )
      NiMessageBox::ms_pfnMessageBox("Game\\MyHomeMenu.nif Create fail", "Node", 0);
    goto LABEL_15;
  }
  v10 = iLeft;
  v11 = iTop;
  iXOff = iLeft;
  iYOff = iTop;
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &iLeft, &iTop, &uiWidth, &uiHeight) )
  {
LABEL_15:
    v6 = spNode.m_pObject;
    v61 = -1;
    if ( !spNode.m_pObject )
      return 0;
    v7 = (volatile LONG *)&spNode.m_pObject->m_uiRefCount;
LABEL_8:
    if ( !InterlockedDecrement(v7) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v12 = g_pkToolTipWin;
  v13 = Font::Get(MAIN_MENU);
  v14 = PgWinAbbreviateText::CreateWin(
          iLeft - v10,
          iTop - v11 + 1,
          uiWidth,
          uiHeight,
          v13,
          (PgWin *)&v2->vfptr,
          0,
          0,
          0,
          1,
          v12,
          0xCu);
  v2->m_pkFurnitureNameWin = v14;
  v14->vfptr[122].__vecDelDtor((NiRefObject *)v14, 5u);
  ((void (__stdcall *)(void *))v2->m_pkFurnitureNameWin->vfptr[117].__vecDelDtor)(&Color::m_kDxGoldColor);
  ((void (__stdcall *)(const char *))v2->m_pkFurnitureNameWin->vfptr[118].__vecDelDtor)("-");
  ((void (__stdcall *)(_DWORD))v2->m_pkFurnitureNameWin->vfptr[60].__vecDelDtor)(0);
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft, iTop, v15, (PgWin *)&v2->vfptr, 0, 0);
  v16 = 1;
  temp[0] = 0;
  *(_WORD *)&temp[1] = 0;
  strbuf[0] = 0;
  *(_DWORD *)&strbuf[1] = 0;
  *(_DWORD *)&strbuf[5] = 0;
  *(_DWORD *)&strbuf[9] = 0;
  *(_WORD *)&strbuf[13] = 0;
  i = 1;
  v17 = v2->m_pkMenuBtnText;
  while ( 1 )
  {
    _itoa(v16, temp, 10);
    if ( v16 < 10 )
    {
      temp[1] = temp[0];
      temp[0] = 48;
    }
    sprintf(strbuf, "Btn%sNor", temp);
    v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, strbuf, &iLeft, &iTop, 0);
    *(v17 - 20) = (PgWinText *)v18;
    sprintf(strbuf, "Btn%sClick", temp);
    PgSprData::Add(v18, (NiAVObject *)&spNode.m_pObject->vfptr, strbuf);
    sprintf(strbuf, "Btn%sOver", temp);
    PgSprData::Add(v18, (NiAVObject *)&spNode.m_pObject->vfptr, strbuf);
    v19 = PgWinBut::CreateWin(iLeft - iXOff, iTop - iYOff, v18, (PgWin *)&v2->vfptr, i - 1, 0, 0);
    *(v17 - 35) = (PgWinText *)v19;
    v21 = __OFSUB__(i, 6);
    v20 = i - 6 < 0;
    v19->m_pkToolTipWin = g_pkToolTipWin;
    if ( v20 ^ v21 )
    {
      sprintf(strbuf, "MenuBtn%sNor", temp);
      v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, strbuf, &iLeft, &iTop, 0);
      sprintf(strbuf, "MenuBtn%sClick", temp);
      PgSprData::Add(v22, (NiAVObject *)&spNode.m_pObject->vfptr, strbuf);
      sprintf(strbuf, "MenuBtn%sOver", temp);
      PgSprData::Add(v22, (NiAVObject *)&spNode.m_pObject->vfptr, strbuf);
      if ( (unsigned int)(i - 1) > 3 )
      {
        v42 = PgWinBut::CreateWin(iLeft - iXOff, iTop - iYOff, v22, (PgWin *)&v2->vfptr, 0x14u, 0, 0);
        *(v17 - 5) = (PgWinText *)v42;
        v42->vfptr[60].__vecDelDtor((NiRefObject *)v42, 0);
        v43 = v22->m_akHitTester.m_pBase;
        v44 = v43->m_pObject->m_uiHeight;
        v53 = v43->m_pObject->m_uiWidth;
        v45 = Font::Get(MAIN_MENU);
        v46 = PgWinText::CreateWin(iLeft - iXOff, iTop - iYOff + 1, v53, v44, v45, (PgWin *)&v2->vfptr, 0, 0);
        *v17 = v46;
        v46->vfptr[117].__vecDelDtor((NiRefObject *)v46, (unsigned int)&Color::m_kDxWhiteColor);
        ((void (__stdcall *)(void *))(*v17)->vfptr[118].__vecDelDtor)(&unk_9C01D9);
      }
      else
      {
        switch ( i )
        {
          case 1:
            *(v17 - 5) = (PgWinText *)PgWinBut::CreateWin(
                                        iLeft - iXOff,
                                        iTop - iYOff,
                                        v22,
                                        (PgWin *)&v2->vfptr,
                                        0x10u,
                                        0,
                                        0);
            v23 = v22->m_akHitTester.m_pBase;
            v24 = v23->m_pObject->m_uiHeight;
            v53 = v23->m_pObject->m_uiWidth;
            v25 = Font::Get(MAIN_MENU);
            v26 = PgWinText::CreateWin(iLeft - iXOff, iTop - iYOff + 1, v53, v24, v25, (PgWin *)&v2->vfptr, 0, 0);
            *v17 = v26;
            ((void (__thiscall *)(PgWinText *, D3DXCOLOR *, NiUnsharedGeometryGroup *))v26->vfptr[117].__vecDelDtor)(
              v26,
              &Color::m_kDxWhiteColor,
              v48);
            v49 = -454364479;
            goto LABEL_26;
          case 2:
            *(v17 - 5) = (PgWinText *)PgWinBut::CreateWin(
                                        iLeft - iXOff,
                                        iTop - iYOff,
                                        v22,
                                        (PgWin *)&v2->vfptr,
                                        0x11u,
                                        0,
                                        0);
            v28 = v22->m_akHitTester.m_pBase;
            v29 = v28->m_pObject->m_uiHeight;
            v53 = v28->m_pObject->m_uiWidth;
            v30 = Font::Get(MAIN_MENU);
            v31 = PgWinText::CreateWin(iLeft - iXOff, iTop - iYOff + 1, v53, v29, v30, (PgWin *)&v2->vfptr, 0, 0);
            *v17 = v31;
            ((void (__thiscall *)(PgWinText *, D3DXCOLOR *, NiUnsharedGeometryGroup *))v31->vfptr[117].__vecDelDtor)(
              v31,
              &Color::m_kDxWhiteColor,
              v48);
            v49 = 726287527;
            goto LABEL_26;
          case 3:
            *(v17 - 5) = (PgWinText *)PgWinBut::CreateWin(
                                        iLeft - iXOff,
                                        iTop - iYOff,
                                        v22,
                                        (PgWin *)&v2->vfptr,
                                        0x12u,
                                        0,
                                        0);
            v32 = v22->m_akHitTester.m_pBase;
            v33 = v32->m_pObject->m_uiHeight;
            v53 = v32->m_pObject->m_uiWidth;
            v34 = Font::Get(MAIN_MENU);
            v35 = PgWinText::CreateWin(iLeft - iXOff, iTop - iYOff + 1, v53, v33, v34, (PgWin *)&v2->vfptr, 0, 0);
            *v17 = v35;
            ((void (__thiscall *)(PgWinText *, D3DXCOLOR *, NiUnsharedGeometryGroup *))v35->vfptr[117].__vecDelDtor)(
              v35,
              &Color::m_kDxWhiteColor,
              v48);
            v49 = 1436153803;
LABEL_26:
            v27 = (*v17)->vfptr;
            v48 = TextData2::Get(v49);
            ((void (__thiscall *)(PgWinText *))v27[118].__vecDelDtor)(*v17);
            break;
          case 4:
            *(v17 - 5) = (PgWinText *)PgWinBut::CreateWin(
                                        iLeft - iXOff,
                                        iTop - iYOff,
                                        v22,
                                        (PgWin *)&v2->vfptr,
                                        0x13u,
                                        0,
                                        0);
            v36 = v22->m_akHitTester.m_pBase;
            v37 = v36->m_pObject->m_uiHeight;
            v53 = v36->m_pObject->m_uiWidth;
            v38 = Font::Get(MAIN_MENU);
            v39 = PgWinText::CreateWin(iLeft - iXOff, iTop - iYOff + 1, v53, v37, v38, (PgWin *)&v2->vfptr, 0, 0);
            *v17 = v39;
            v39->vfptr[117].__vecDelDtor((NiRefObject *)v39, (unsigned int)&Color::m_kDxWhiteColor);
            v40 = (*v17)->vfptr;
            v41 = TextData::Get(0xDDE7EBEF);
            v40[118].__vecDelDtor((NiRefObject *)*v17, (unsigned int)v41);
            break;
        }
      }
      ((void (__stdcall *)(signed int))(*v17)->vfptr[122].__vecDelDtor)(5);
      ((void (__stdcall *)(_DWORD))(*v17)->vfptr[60].__vecDelDtor)(0);
    }
    ++v17;
    if ( ++i > 15 )
      break;
    v16 = i;
  }
  ((void (__thiscall *)(mhEmotionWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.2);
  v47 = spNode.m_pObject;
  v61 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v47 )
    v47->vfptr->__vecDelDtor((NiRefObject *)v47, 1u);
  return 1;
}
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006CF010) --------------------------------------------------------
void __stdcall mhEmotionWin::SetIconTexture(PgWinBut *pkBtn, NiSourceTexture *pkTex, char Index)
{
  NiSourceTexture *v4; // esi@1
  PgWinBut *v5; // edi@2
  unsigned int v6; // eax@3
  unsigned int v7; // ebx@3
  void *(__thiscall *v8)(NiRefObject *, unsigned int); // eax@3
  double v9; // st7@3
  NiRefObjectVtbl *v10; // edx@3
  double v11; // st7@3
  NiRefObjectVtbl *v12; // edx@3
  signed int v13; // ebx@3
  PgSpr *v14; // eax@4
  NiScreenElements *v15; // esi@5
  NiScreenElementsData *v16; // ecx@6
  NiScreenElementsData *v17; // ecx@6
  NiScreenElementsData *v18; // ecx@6
  NiScreenElementsData *v19; // ecx@6
  NiPoint2 v20; // [sp+4h] [bp-24h]@3
  NiPoint2 v21; // [sp+Ch] [bp-1Ch]@6
  NiPoint2 v22; // [sp+14h] [bp-14h]@6
  NiPoint2 kValue; // [sp+1Ch] [bp-Ch]@6
  float fUVTop; // [sp+24h] [bp-4h]@3
  float fUVRighta; // [sp+30h] [bp+8h]@3
  float fUVRight; // [sp+30h] [bp+8h]@3
  float fUVLefta; // [sp+34h] [bp+Ch]@3
  float fUVLeft; // [sp+34h] [bp+Ch]@3
  unsigned int uiYPosa; // [sp+38h] [bp+10h]@3
  float uiYPos; // [sp+38h] [bp+10h]@3

  v4 = pkTex;
  if ( pkTex )
  {
    v5 = pkBtn;
    if ( pkBtn )
    {
      v6 = ((int (__thiscall *)(NiSourceTexture *))pkTex->vfptr[15].__vecDelDtor)(pkTex);
      v7 = 32 * ((unsigned __int8)Index % (v6 >> 5));
      uiYPosa = 32 * ((unsigned __int8)Index / (v6 >> 5));
      PgSpr::SetTexture(pkBtn->m_spSpr.m_pObject, (NiTexture *)&pkTex->vfptr);
      fUVLefta = (double)v7;
      fUVLeft = fUVLefta / (double)(unsigned int)((int (__thiscall *)(NiSourceTexture *))v4->vfptr[15].__vecDelDtor)(v4);
      fUVRighta = (double)uiYPosa;
      fUVTop = COERCE_FLOAT(((int (__thiscall *)(NiSourceTexture *))v4->vfptr[16].__vecDelDtor)(v4));
      v8 = v5->vfptr[36].__vecDelDtor;
      fUVTop = fUVRighta / (double)LODWORD(fUVTop);
      v9 = (double)(v7 + ((int (__thiscall *)(PgWinBut *))v8)(v5));
      v10 = v4->vfptr;
      *(double *)&v20 = v9;
      fUVRight = v9 / (double)(unsigned int)((int (__thiscall *)(NiSourceTexture *))v10[15].__vecDelDtor)(v4);
      v11 = (double)(uiYPosa + ((int (__thiscall *)(PgWinBut *))v5->vfptr[37].__vecDelDtor)(v5));
      v12 = v4->vfptr;
      *(double *)&v20 = v11;
      v13 = 0;
      uiYPos = v11 / (double)(unsigned int)((int (__thiscall *)(NiSourceTexture *))v12[16].__vecDelDtor)(v4);
      do
      {
        v14 = v5->m_spSpr.m_pObject;
        if ( v13 < v14->m_akGeom.m_uiSize )
        {
          v15 = v14->m_akGeom.m_pBase[v13].m_pObject;
          if ( v15 )
          {
            v16 = (NiScreenElementsData *)v15->m_spModelData.m_pObject;
            kValue.x = fUVLeft;
            kValue.y = fUVTop;
            NiScreenElementsData::SetTexture(v16, 0, 0, 0, &kValue);
            v17 = (NiScreenElementsData *)v15->m_spModelData.m_pObject;
            v22.x = fUVLeft;
            v22.y = uiYPos;
            NiScreenElementsData::SetTexture(v17, 0, 1, 0, &v22);
            v21.x = fUVRight;
            v18 = (NiScreenElementsData *)v15->m_spModelData.m_pObject;
            v21.y = uiYPos;
            NiScreenElementsData::SetTexture(v18, 0, 2, 0, &v21);
            v19 = (NiScreenElementsData *)v15->m_spModelData.m_pObject;
            v20.x = fUVRight;
            v20.y = fUVTop;
            NiScreenElementsData::SetTexture(v19, 0, 3, 0, &v20);
          }
        }
        ++v13;
      }
      while ( v13 < 3 );
    }
  }
}

//----- (006CF200) --------------------------------------------------------
void __thiscall mhEmotionWin::UpdateInfo(mhEmotionWin *this)
{
  mhEmotionWin *v1; // esi@1
  char *v2; // edi@1
  signed int v3; // ebx@1
  NiRefObjectVtbl *v4; // edi@3
  NiUnsharedGeometryGroup *v5; // eax@3
  int v6; // edi@3
  signed int v7; // ebx@3
  mhObject *v8; // eax@5
  int v9; // edi@7
  int v10; // ebx@7
  int *v11; // eax@9
  int v12; // edi@10
  PgWinBut **v13; // ebx@12
  char *v14; // eax@14
  char *v15; // edi@14
  NiRefObjectVtbl *v16; // edi@22
  PgWinText *v17; // ecx@22
  void *(__thiscall *v18)(NiRefObject *, unsigned int); // edx@22
  char v19; // ST08_1@23
  NiSourceTexture *v20; // eax@23
  int v21; // [sp+0h] [bp-24h]@0
  mhObject *pkObj; // [sp+Ch] [bp-18h]@5
  __int16 v23; // [sp+10h] [bp-14h]@13
  MiniHouseFurniture *pkFur; // [sp+14h] [bp-10h]@11
  int i; // [sp+18h] [bp-Ch]@12
  unsigned int RecordNo; // [sp+1Ch] [bp-8h]@13
  int v27; // [sp+20h] [bp-4h]@13

  v1 = this;
  v2 = (char *)this->m_pkMenuBtnText;
  v3 = 5;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v2 - 5) + 240))(0);
    (*(void (__stdcall **)(void *))(**(_DWORD **)v2 + 468))(&Color::m_kDxGrayColor);
    v2 += 4;
    --v3;
  }
  while ( v3 );
  v4 = v1->m_pkMenuBtnText[0]->vfptr;
  v5 = TextData2::Get(0xE4EAF2C1);
  v4[118].__vecDelDtor((NiRefObject *)v1->m_pkMenuBtnText[0], (unsigned int)v5);
  v6 = (int)v1->m_pkActBtn;
  v7 = 15;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v6 + 240))(0);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v6 + 256))(0);
    v6 += 4;
    --v7;
  }
  while ( v7 );
  v8 = mhObjectManager::GetObjectA(&stru_A993C8, v1->m_ObjID);
  pkObj = v8;
  if ( !v8
    || (v9 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
        v10 = v8->m_iResGUID,
        !(unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v8->m_iResGUID))
    || (unsigned __int16)v10 > *(_WORD *)(v9 + 200)
    || (v11 = (int *)(*(_DWORD *)(v9 + 196) + 4 * (unsigned __int16)v10), !*v11)
    || (v12 = *v11) == 0
    || (pkFur = MiniHouseFuritureInfoTab::GetObjByName((char *)(v12 + 2))) == 0 )
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
    return;
  }
  ((void (__stdcall *)(int))v1->m_pkFurnitureNameWin->vfptr[118].__vecDelDtor)(v12 + 34);
  i = 0;
  v13 = v1->m_pkActBtn;
  do
  {
    v23 = pkFur->MHEmotionID;
    v27 = 0;
    RecordNo = 0;
    if ( !ITableBase<MHEmotion,MiniHouseEmotionTab>::GetTotal() )
    {
LABEL_19:
      ((void (__stdcall *)(_DWORD))(*v13)->vfptr[60].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))(*v13)->vfptr[64].__vecDelDtor)(0);
      goto LABEL_20;
    }
    while ( 1 )
    {
      v14 = CDataReader::GetRecord((CDataReader *)(ITableBase<MHEmotion,MiniHouseEmotionTab>::ms_pkTable + 4), RecordNo);
      v15 = v14;
      if ( *(_WORD *)v14 != v23 || v14[2] != -1 )
        goto LABEL_18;
      if ( i == v27 )
        break;
      ++v27;
LABEL_18:
      if ( ++RecordNo >= ITableBase<MHEmotion,MiniHouseEmotionTab>::GetTotal() )
        goto LABEL_19;
    }
    ((void (__stdcall *)(signed int))(*v13)->vfptr[60].__vecDelDtor)(1);
    ((void (__stdcall *)(signed int))(*v13)->vfptr[64].__vecDelDtor)(1);
    v19 = v15[44];
    v20 = IconMgr::GetTexture(v15 + 45);
    mhEmotionWin::SetIconTexture(*v13, v20, v19);
    PgWin::SetToolTipWinText((PgWin *)&(*v13)->vfptr, v15 + 12);
LABEL_20:
    ++v13;
    ++i;
  }
  while ( i < 15 );
  if ( pkFur->GameType == 1 )
  {
    ((void (__stdcall *)(signed int, int))v1->m_pkMenuBtn[0]->vfptr[60].__vecDelDtor)(1, v21);
    ((void (__stdcall *)(signed int))v1->m_pkMenuBtn[0]->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(signed int))v1->m_pkMenuBtnText[0]->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(D3DXCOLOR *))v1->m_pkMenuBtnText[0]->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
    v16 = v1->m_pkMenuBtnText[0]->vfptr;
    TextData2::Get(0x7B955F84u);
    v17 = v1->m_pkMenuBtnText[0];
    v18 = v16[118].__vecDelDtor;
    goto LABEL_26;
  }
  if ( v1->m_bCanAni == 1 )
  {
    ((void (__stdcall *)(signed int, int))v1->m_pkMenuBtn[0]->vfptr[60].__vecDelDtor)(1, v21);
    ((void (__stdcall *)(signed int))v1->m_pkMenuBtn[0]->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(signed int))v1->m_pkMenuBtnText[0]->vfptr[64].__vecDelDtor)(1);
    v17 = v1->m_pkMenuBtnText[0];
    v18 = v17->vfptr[117].__vecDelDtor;
LABEL_26:
    ((void (__thiscall *)(PgWinText *))v18)(v17);
  }
  MiniHouseIndoor::SetFocusObj(&g_kWorld.m_MiniHouseIndoorMode, pkObj, 0);
  if ( unk_A9943C == 2 && v1->m_bCanHold == 1 )
  {
    ((void (__stdcall *)(signed int))v1->m_pkMenuBtn[1]->vfptr[60].__vecDelDtor)(1);
    ((void (__stdcall *)(signed int))v1->m_pkMenuBtn[1]->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(signed int))v1->m_pkMenuBtnText[1]->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(D3DXCOLOR *))v1->m_pkMenuBtnText[1]->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
    ((void (__stdcall *)(signed int))v1->m_pkMenuBtn[2]->vfptr[60].__vecDelDtor)(1);
    ((void (__stdcall *)(signed int))v1->m_pkMenuBtn[2]->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(signed int))v1->m_pkMenuBtnText[2]->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(D3DXCOLOR *))v1->m_pkMenuBtnText[2]->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  }
  ((void (__stdcall *)(signed int))v1->m_pkMenuBtn[3]->vfptr[60].__vecDelDtor)(1);
  ((void (__stdcall *)(signed int))v1->m_pkMenuBtn[3]->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(signed int))v1->m_pkMenuBtnText[3]->vfptr[64].__vecDelDtor)(1);
  v1->m_pkMenuBtnText[3]->vfptr[117].__vecDelDtor(
    (NiRefObject *)v1->m_pkMenuBtnText[3],
    (unsigned int)&Color::m_kDxWhiteColor);
}
// A8C15C: using guessed type int ITableBase<MHEmotion,MiniHouseEmotionTab>::ms_pkTable;
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (006CF5F0) --------------------------------------------------------
void __thiscall mhEmotionWin::SendUIMsg(mhEmotionWin *this, unsigned int uiMsg, int lParam)
{
  mhEmotionWin *v3; // ebx@1
  mhObject *v4; // eax@1
  int v5; // esi@3
  int v6; // edi@3
  int *v7; // eax@5
  int v8; // eax@6
  MiniHouseFurniture *v9; // eax@7
  PgFrameWork *v10; // ecx@9

  v3 = this;
  v4 = mhObjectManager::GetObjectA(&stru_A993C8, this->m_ObjID);
  if ( v4 )
  {
    v5 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
    v6 = v4->m_iResGUID;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                            ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                            v4->m_iResGUID)
      && (unsigned __int16)v6 <= *(_WORD *)(v5 + 200)
      && (v7 = (int *)(*(_DWORD *)(v5 + 196) + 4 * (unsigned __int16)v6), *v7)
      && (v8 = *v7) != 0
      && (v9 = MiniHouseFuritureInfoTab::GetObjByName((char *)(v8 + 2))) != 0 )
    {
      switch ( uiMsg )
      {
        case 0x10u:
          v10 = v3->m_pkFrameWork;
          if ( v9->GameType == 1 )
            PgFrameWork::AddMsg(v10, 0xE5u, 0, 0);
          else
            PgFrameWork::AddMsg(v10, 0xDCu, 0, 0);
          break;
        case 0x11u:
          PgFrameWork::AddMsg(v3->m_pkFrameWork, 0xDEu, 0, 0);
          break;
        case 0x12u:
          PgFrameWork::AddMsg(v3->m_pkFrameWork, 0xE4u, 0, 0);
          break;
        case 0x13u:
          goto LABEL_14;
        default:
          return;
      }
    }
    else
    {
LABEL_14:
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
    }
  }
  else
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (006CF720) --------------------------------------------------------
void __thiscall mhEmotionWin::OnCommand(mhEmotionWin *this, unsigned int wParam, int lParam)
{
  mhEmotionWin *v3; // esi@1
  mhObject *v4; // eax@2
  ItemInfo *v5; // eax@3
  MiniHouseFurniture *v6; // eax@4
  MHEmotion *v7; // eax@5

  v3 = this;
  if ( wParam > 0xE )
  {
    mhEmotionWin::SendUIMsg(this, wParam, lParam);
  }
  else
  {
    v4 = mhObjectManager::GetObjectA(&stru_A993C8, this->m_ObjID);
    if ( v4 )
    {
      v5 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(v4->m_iResGUID);
      if ( v5 )
      {
        v6 = MiniHouseFuritureInfoTab::GetObjByName(v5->InxName);
        if ( v6 )
        {
          v7 = MiniHouseEmotionTab::GetMenuEmotion(v6->MHEmotionID, wParam);
          if ( v7 )
          {
            PgFrameWork::AddMsg(v3->m_pkFrameWork, 0xDDu, v7->ActionIndex, 0);
            PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
            return;
          }
        }
      }
    }
  }
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
}

//----- (006CF7C0) --------------------------------------------------------
void __thiscall mhEmotionWin::OnShowWin(mhEmotionWin *this)
{
  mhEmotionWin *v1; // esi@1

  v1 = this;
  mhEmotionWin::UpdateInfo(this);
  PgWin::OnShowWin((PgWin *)&v1->vfptr);
}

//----- (006CF7D0) --------------------------------------------------------
mhEmotionWin *__cdecl mhEmotionWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  mhEmotionWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x200u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    mhEmotionWin::mhEmotionWin((mhEmotionWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (mhEmotionWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (006CF900) --------------------------------------------------------
mhEmotionWin *__thiscall mhEmotionWin::`vector deleting destructor'(mhEmotionWin *this, unsigned int a2)
{
  mhEmotionWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&mhEmotionWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhEmotionWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C02AC: using guessed type void (__thiscall *mhEmotionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C02CC: using guessed type int (__thiscall *mhEmotionWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006CF940) --------------------------------------------------------
NiScreenElements *__thiscall PgSpr::GetGeometry(PgSpr *this, unsigned int uiIndex)
{
  NiScreenElements *result; // eax@2

  if ( uiIndex < this->m_akGeom.m_uiSize )
    result = this->m_akGeom.m_pBase[uiIndex].m_pObject;
  else
    result = 0;
  return result;
}

//----- (006CF960) --------------------------------------------------------
MHEmotion *__cdecl MiniHouseEmotionTab::GetMenuEmotion(unsigned __int16 MHEmotionID, int IndexCount)
{
  int v2; // edi@1
  unsigned int v3; // esi@1
  MHEmotion *result; // eax@2

  v2 = 0;
  v3 = 0;
  if ( ITableBase<MHEmotion,MiniHouseEmotionTab>::GetTotal() )
  {
    do
    {
      result = (MHEmotion *)CDataReader::GetRecord(
                              (CDataReader *)(ITableBase<MHEmotion,MiniHouseEmotionTab>::ms_pkTable + 4),
                              v3);
      if ( result->MHEmotionID == MHEmotionID && result->ActionViewInfo == -1 )
      {
        if ( IndexCount == v2 )
          return result;
        ++v2;
      }
      ++v3;
    }
    while ( v3 < ITableBase<MHEmotion,MiniHouseEmotionTab>::GetTotal() );
  }
  return 0;
}
// A8C15C: using guessed type int ITableBase<MHEmotion,MiniHouseEmotionTab>::ms_pkTable;

//----- (006CF9C0) --------------------------------------------------------
void __thiscall mhGuestBookWin::mhGuestBookWin(mhGuestBookWin *this)
{
  mhGuestBookWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_hWebWindow = 0;
  v1->m_uiWebXPos = 0;
  v1->m_uiWebYPos = 0;
  v1->m_uiWebWidth = 0;
  v1->m_uiWebHeight = 0;
  v1->m_bOpen = 0;
  v1->m_uiPlaneWebXPos = 0;
  v1->m_uiPlaneWebYPos = 0;
  v1->m_uiPlaneWebWidth = 0;
  v1->m_uiPlaneWebHeight = 0;
  v1->vfptr = (NiRefObjectVtbl *)&mhGuestBookWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&mhGuestBookWin::`vftable'{for `IDirectMessenger'};
}
// 9C0628: using guessed type void (__thiscall *mhGuestBookWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C0644: using guessed type int (__thiscall *mhGuestBookWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006CFA20) --------------------------------------------------------
void __thiscall mhGuestBookWin::~mhGuestBookWin(mhGuestBookWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&mhGuestBookWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhGuestBookWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9C0628: using guessed type void (__thiscall *mhGuestBookWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C0644: using guessed type int (__thiscall *mhGuestBookWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006CFA50) --------------------------------------------------------
void __thiscall mhGuestBookWin::OnClose(mhGuestBookWin *this)
{
  HWND__ *v1; // ST00_4@1

  v1 = this->m_hWebWindow;
  this->m_bOpen = 0;
  DestroyWindow(v1);
}

//----- (006CFA70) --------------------------------------------------------
void __thiscall mhGuestBookWin::ReGenPos(mhGuestBookWin *this)
{
  mhGuestBookWin *v1; // esi@1
  int v2; // edx@1
  unsigned int v3; // eax@1
  unsigned int v4; // ecx@1

  v1 = this;
  v1->m_uiWebXPos = v1->m_uiPlaneWebXPos + ((int (*)(void))this->vfptr[41].__vecDelDtor)();
  v2 = ((int (__thiscall *)(_DWORD))v1->vfptr[42].__vecDelDtor)(v1) + v1->m_uiPlaneWebYPos + 2;
  v3 = v1->m_uiPlaneWebWidth;
  v4 = v1->m_uiPlaneWebHeight;
  v1->m_uiWebYPos = v2;
  v1->m_uiWebWidth = v3;
  v1->m_uiWebHeight = v4;
}

//----- (006CFAC0) --------------------------------------------------------
void mhGuestBookWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "MiniHomeGuestRecord");
}

//----- (006CFAF0) --------------------------------------------------------
void __thiscall mhGuestBookWin::UpdateWebPos(mhGuestBookWin *this)
{
  mhGuestBookWin *v1; // esi@1
  tagRECT rect; // [sp+4h] [bp-14h]@3

  v1 = this;
  if ( IsWindow(this->m_hWebWindow) )
  {
    if ( v1->m_bOpen )
    {
      mhGuestBookWin::ReGenPos(v1);
      GetWindowRect(g_hMainWnd, &rect);
      MoveWindow(
        v1->m_hWebWindow,
        rect.left + v1->m_uiWebXPos,
        rect.top + v1->m_uiWebYPos,
        v1->m_uiWebWidth,
        v1->m_uiWebHeight,
        1);
    }
  }
}

//----- (006CFB80) --------------------------------------------------------
void __thiscall mhGuestBookWin::OnChangeTab(mhGuestBookWin *this, DirectUserMsgBody_MHInfoTabChanged::TabEnum eTab)
{
  char *v2; // esi@1

  v2 = (char *)&this->vfptr;
  if ( this->m_pkMsgHooker )
  {
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))this->m_pkMsgHooker->vfptr->SendDirectMessage)(62, &eTab, v2);
    if ( *((_DWORD *)v2 + 1) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v2 + 1) + 20))(62, &eTab, v2);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v2 + 20))(v2, 62, &eTab, v2);
}

//----- (006CFBE0) --------------------------------------------------------
void __thiscall mhGuestBookWin::OnCommand(mhGuestBookWin *this, unsigned int wParam, int lParam)
{
  mhGuestBookWin *v3; // esi@1

  v3 = this;
  switch ( wParam )
  {
    case 0u:
      mhGuestBookWin::OnChangeTab(this, 0);
      break;
    case 1u:
      mhGuestBookWin::OnChangeTab(this, TE_GUEST_BOOK);
      break;
    case 2u:
      mhGuestBookWin::OnChangeTab(this, TE_EDIT_ROOM);
      break;
    case 3u:
      mhGuestBookWin::OnChangeTab(this, TE_PORTAL_LIST);
      break;
    case 4u:
      mhGuestBookWin::OnChangeTab(this, TE_SETTING);
      break;
    case 5u:
      mhGuestBookWin::OnChangeTab(this, TE_OUT);
      break;
    case 6u:
      PgFrameWork::AddMsg(this->m_pkFrameWork, 0xE0u, 0, 0);
      MoveWindow(v3->m_hWebWindow, -1000, -1000, -999, -999, 0);
      v3->m_bOpen = 0;
      break;
    case 7u:
      mhGuestBookWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (006CFCB0) --------------------------------------------------------
void __thiscall mhGuestBookWin::UpdateMeWin(mhGuestBookWin *this, float fCurTime)
{
  mhGuestBookWin *v2; // esi@1
  PgFrameWork *v3; // edi@2

  v2 = this;
  if ( g_pkKeyboard->m_aucKeystate[0] & 2 )
  {
    v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( !PgWin::IsVisible((PgWin *)&v2->vfptr) )
      return;
    BYTE3(v3[73].m_kMsgQ.m_uiAlloced) = 0;
    PgFrameWork::AddMsg(v3, 0xE0u, 0, 0);
    MoveWindow(v2->m_hWebWindow, -1000, -1000, -999, -999, 0);
    v2->m_bOpen = 0;
  }
  mhGuestBookWin::UpdateWebPos(v2);
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (006CFD30) --------------------------------------------------------
mhGuestBookWin *__cdecl mhGuestBookWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  mhGuestBookWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x180u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    mhGuestBookWin::mhGuestBookWin((mhGuestBookWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (mhGuestBookWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (006CFE60) --------------------------------------------------------
void __thiscall mhGuestBookWin::ShowWeb(mhGuestBookWin *this, char *eKey, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *tKey)
{
  mhGuestBookWin *v3; // esi@1
  int v4; // edi@2
  int v5; // ebx@2
  const char *v6; // eax@5
  HWND v7; // edi@7
  void *(__thiscall *v8)(NiRefObject *, unsigned int); // edx@7
  int v9; // edi@7
  int kRect_4; // [sp+14h] [bp-48h]@2
  int kRect_8; // [sp+18h] [bp-44h]@2
  int kRect_12; // [sp+1Ch] [bp-40h]@2
  NiRect<int> kNiRect; // [sp+20h] [bp-3Ch]@7
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > WebURL; // [sp+30h] [bp-2Ch]@2
  int v15; // [sp+58h] [bp-4h]@2

  v3 = this;
  if ( this->m_bOpen != 1 )
  {
    mhGuestBookWin::ReGenPos(this);
    v4 = v3->m_uiWebXPos;
    v5 = 0;
    kRect_8 = v3->m_uiWebWidth;
    kRect_4 = v3->m_uiWebYPos;
    kRect_12 = v3->m_uiWebHeight;
    WebURL._Myres = 15;
    WebURL._Mysize = 0;
    WebURL._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&WebURL, byte_9C050D, 0);
    v15 = 0;
    if ( eKey )
    {
      v6 = WebURL._Bx._Ptr;
      if ( WebURL._Myres < 0x10 )
        v6 = (const char *)&WebURL;
      v7 = CreateWindowExA(
             0,
             "WebCtrl32",
             v6,
             0x90000000,
             v4,
             kRect_4,
             kRect_8,
             kRect_12,
             g_hMainWnd,
             0,
             g_hMainInstance,
             0);
      ShowWindow(v7, 5);
      v8 = v3->vfptr[52].__vecDelDtor;
      v3->m_hWebWindow = v7;
      v3->m_bOpen = 1;
      kNiRect.m_left = 0;
      kNiRect.m_right = 0;
      kNiRect.m_top = 0;
      kNiRect.m_bottom = 0;
      v8((NiRefObject *)&v3->vfptr, (unsigned int)&kNiRect);
      v9 = 0;
      if ( PgWin::ms_uiScreenWidth >= kNiRect.m_right - kNiRect.m_left
        && PgWin::ms_uiScreenHeight >= kNiRect.m_bottom - kNiRect.m_top )
      {
        v9 = ((int (__thiscall *)(mhGuestBookWin *))v3->vfptr[41].__vecDelDtor)(v3);
        v5 = ((int (__thiscall *)(mhGuestBookWin *))v3->vfptr[42].__vecDelDtor)(v3);
      }
      v3->vfptr[43].__vecDelDtor((NiRefObject *)v3, v9);
      v3->vfptr[44].__vecDelDtor((NiRefObject *)v3, v5);
      SetFocus(g_hMainWnd);
      if ( WebURL._Myres >= 0x10 )
        operator delete(WebURL._Bx._Ptr);
    }
    else if ( WebURL._Myres >= 0x10 )
    {
      operator delete(WebURL._Bx._Ptr);
    }
  }
}

//----- (006D0000) --------------------------------------------------------
char __thiscall mhGuestBookWin::Create(mhGuestBookWin *this, PgFrameWork *pkFrameWork)
{
  mhGuestBookWin *v2; // ebx@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiNode *v5; // eax@3
  NiNode *v6; // esi@7
  volatile LONG *v7; // eax@7
  char result; // al@11
  PgSprData *v9; // eax@12
  int v10; // esi@15
  int v11; // edi@15
  NiSourceTexture *v12; // eax@15
  PgSprData *v13; // eax@16
  NiNode *v14; // esi@19
  PgSprData *v15; // eax@23
  PgSprData *v16; // eax@23
  PgSprData *v17; // eax@23
  PgFont *v18; // eax@25
  PgWinText *v19; // esi@25
  NiRefObjectVtbl *v20; // edi@25
  NiUnsharedGeometryGroup *v21; // eax@25
  unsigned int v22; // edi@25
  PgSprData *v23; // esi@25
  NiSourceTexture *v24; // esi@25
  PgSprData *v25; // esi@26
  const char *v26; // eax@28
  PgSprData *v27; // esi@30
  const char *v28; // eax@30
  const char *v29; // eax@32
  PgWinBut *v30; // esi@34
  char *v31; // eax@35
  NiNode *v32; // esi@45
  int v33; // [sp+10h] [bp-50h]@28
  unsigned int uiWidth; // [sp+14h] [bp-4Ch]@23
  unsigned int uiHeight; // [sp+18h] [bp-48h]@23
  int iTop; // [sp+1Ch] [bp-44h]@12
  int iLeft; // [sp+20h] [bp-40h]@12
  NiPointer<NiNode> spNode; // [sp+24h] [bp-3Ch]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strName; // [sp+28h] [bp-38h]@27
  char acNum[12]; // [sp+44h] [bp-1Ch]@27
  int v41; // [sp+5Ch] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v41 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\MiniHomeGuestRecord.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = spNode.m_pObject;
  if ( !spNode.m_pObject )
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("Game\\MiniHomeGuestRecord.nif load fail", "LoadFail", spNode.m_pObject);
      v5 = spNode.m_pObject;
    }
    v41 = -1;
    if ( !v5 )
      return 0;
    v6 = v5;
    v7 = (volatile LONG *)&v5->m_uiRefCount;
    goto LABEL_8;
  }
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iLeft, &iTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "mhGuestBookWin", 0) )
  {
    v6 = spNode.m_pObject;
    v41 = -1;
    if ( spNode.m_pObject )
    {
      v7 = (volatile LONG *)&spNode.m_pObject->m_uiRefCount;
LABEL_8:
      if ( !InterlockedDecrement(v7) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    return 0;
  }
  v10 = iLeft;
  v11 = iTop;
  v12 = MenuTexMgr::GetTexture(0x13u);
  if ( v12 )
    v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, v12);
  else
    v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft - v10, iTop - v11, v13, (PgWin *)&v2->vfptr, 0, 0);
  if ( PgUtil::GetTriShapeRect(
         (NiAVObject *)&spNode.m_pObject->vfptr,
         "Panel02",
         &v2->m_uiPlaneWebXPos,
         &v2->m_uiPlaneWebYPos,
         &v2->m_uiPlaneWebWidth,
         &v2->m_uiPlaneWebHeight) )
  {
    v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft, iTop, v15, (PgWin *)&v2->vfptr, 0, 0);
    v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft, iTop, v16, (PgWin *)&v2->vfptr, 0, 0);
    v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel04", &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft, iTop, v17, (PgWin *)&v2->vfptr, 0, 0);
    if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &iLeft, &iTop, &uiWidth, &uiHeight) )
    {
      v18 = Font::Get(MAIN_MENU);
      v19 = PgWinText::CreateWin(iLeft, iTop, uiWidth, uiHeight, v18, (PgWin *)&v2->vfptr, 0, 0);
      v19->vfptr[122].__vecDelDtor((NiRefObject *)v19, 1u);
      v19->vfptr[117].__vecDelDtor((NiRefObject *)v19, (unsigned int)&Color::m_kDxWinTitleColor);
      v20 = v19->vfptr;
      v21 = TextData2::Get(0x4C494A23u);
      v20[118].__vecDelDtor((NiRefObject *)v19, (unsigned int)v21);
      v22 = 0;
      v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
      v23 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &iLeft, &iTop, 0);
      PgSprData::Add(v23, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
      PgSprData::Add(v23, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
      PgWinBut::CreateWin(iLeft, iTop, v23, (PgWin *)&v2->vfptr, 6u, 0, 0);
      v24 = MenuTexMgr::GetTexture(4u);
      if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
      {
        v25 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &iLeft, &iTop, v24);
        PgSprData::Add(v25, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
        PgSprData::Add(v25, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
        PgWinBut::CreateWin(iLeft, iTop, v25, (PgWin *)&v2->vfptr, 7u, 0, 0);
      }
      strName._Myres = 15;
      strName._Mysize = 0;
      strName._Bx._Buf[0] = 0;
      LOBYTE(v41) = 1;
      strcpy(acNum, "0");
      *(_DWORD *)&acNum[2] = 0;
      *(_DWORD *)&acNum[6] = 0;
      *(_WORD *)&acNum[10] = 0;
      do
      {
        v33 = v22 + 1;
        _itoa(v22 + 1, acNum, 10);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strName, "BtnNor0", 7u);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strName, acNum, strlen(acNum));
        v26 = strName._Bx._Ptr;
        if ( strName._Myres < 0x10 )
          v26 = (const char *)&strName;
        v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, v26, &iLeft, &iTop, 0);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strName, "BtnClick0", 9u);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strName, acNum, strlen(acNum));
        v28 = strName._Bx._Ptr;
        if ( strName._Myres < 0x10 )
          v28 = (const char *)&strName;
        PgSprData::Add(v27, (NiAVObject *)&spNode.m_pObject->vfptr, v28);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strName, "BtnOver0", 8u);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strName, acNum, strlen(acNum));
        v29 = strName._Bx._Ptr;
        if ( strName._Myres < 0x10 )
          v29 = (const char *)&strName;
        PgSprData::Add(v27, (NiAVObject *)&spNode.m_pObject->vfptr, v29);
        v30 = PgWinBut::CreateWin(iLeft, iTop, v27, (PgWin *)&v2->vfptr, v22, 0, 0);
        switch ( v22 )
        {
          case 0u:
            v31 = (char *)TextData2::Get(0x9BA8F7E2);
            goto LABEL_41;
          case 1u:
            v31 = (char *)TextData2::Get(0x4C494A23u);
            goto LABEL_41;
          case 2u:
            v31 = (char *)TextData2::Get(0xE6EC4424);
            goto LABEL_41;
          case 3u:
            v31 = (char *)TextData2::Get(0xD7F24143);
            goto LABEL_41;
          case 4u:
            v31 = (char *)TextData2::Get(0xDEE82F0D);
            goto LABEL_41;
          case 5u:
            v31 = (char *)TextData2::Get(0xFA4A423F);
LABEL_41:
            PgWin::SetToolTipWinText((PgWin *)&v30->vfptr, v31);
            break;
          default:
            break;
        }
        ++v22;
        v30->m_pkToolTipWin = g_pkToolTipWin;
      }
      while ( v33 < 6 );
      v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
      mhGuestBookWin::ReGenPos(v2);
      if ( strName._Myres >= 0x10 )
        operator delete(strName._Bx._Ptr);
      v32 = spNode.m_pObject;
      strName._Myres = 15;
      strName._Mysize = 0;
      strName._Bx._Buf[0] = 0;
      v41 = -1;
      if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v32 )
        v32->vfptr->__vecDelDtor((NiRefObject *)v32, 1u);
      result = 1;
    }
    else
    {
      v41 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 0;
    }
  }
  else
  {
    v14 = spNode.m_pObject;
    v41 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v14 )
      return 0;
    v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006D05F0) --------------------------------------------------------
mhGuestBookWin *__thiscall mhGuestBookWin::`scalar deleting destructor'(mhGuestBookWin *this, unsigned int a2)
{
  mhGuestBookWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&mhGuestBookWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhGuestBookWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C0628: using guessed type void (__thiscall *mhGuestBookWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C0644: using guessed type int (__thiscall *mhGuestBookWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006D0630) --------------------------------------------------------
void __thiscall mhGuestBookWin2::mhGuestBookWin2(mhGuestBookWin2 *this)
{
  mhGuestBookWin2 *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&mhGuestBookWin2::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&mhGuestBookWin2::`vftable'{for `IDirectMessenger'};
  v1->m_bOpen = 0;
}
// 9C0914: using guessed type void (__thiscall *mhGuestBookWin2::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C0934: using guessed type int (__thiscall *mhGuestBookWin2::`vftable'{for `NiNode'})(void *p, char);

//----- (006D0660) --------------------------------------------------------
void __thiscall mhGuestBookWin2::~mhGuestBookWin2(mhGuestBookWin2 *this)
{
  this->vfptr = (NiRefObjectVtbl *)&mhGuestBookWin2::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhGuestBookWin2::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9C0914: using guessed type void (__thiscall *mhGuestBookWin2::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C0934: using guessed type int (__thiscall *mhGuestBookWin2::`vftable'{for `NiNode'})(void *p, char);

//----- (006D0680) --------------------------------------------------------
void __thiscall mhGuestBookWin2::OnWinClose(mhGuestBookWin2 *this)
{
  mhGuestBookWin2 *v1; // esi@1
  HWND__ *v2; // ST00_4@1

  v1 = this;
  v2 = this->m_hWebWindow;
  this->m_bOpen = 0;
  DestroyWindow(v2);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}

//----- (006D06B0) --------------------------------------------------------
void __thiscall mhGuestBookWin2::ReGenPos(mhGuestBookWin2 *this)
{
  mhGuestBookWin2 *v1; // esi@1
  int v2; // edx@1
  int v3; // eax@1
  int v4; // ecx@1

  v1 = this;
  v1->m_uiWebXPos = v1->m_uiPlaneWebXPos + ((int (*)(void))this->vfptr[41].__vecDelDtor)();
  v2 = ((int (__thiscall *)(_DWORD))v1->vfptr[42].__vecDelDtor)(v1) + v1->m_uiPlaneWebYPos + 2;
  v3 = v1->m_uiPlaneWebWidth - 8;
  v4 = v1->m_uiPlaneWebHeight - 10;
  v1->m_uiWebYPos = v2;
  v1->m_uiWebWidth = v3;
  v1->m_uiWebHeight = v4;
}

//----- (006D0720) --------------------------------------------------------
void __thiscall mhGuestBookWin2::UpdateWebPos(mhGuestBookWin2 *this)
{
  mhGuestBookWin2 *v1; // esi@1
  tagRECT rect; // [sp+4h] [bp-14h]@3

  v1 = this;
  if ( IsWindow(this->m_hWebWindow) )
  {
    if ( v1->m_bOpen )
    {
      mhGuestBookWin2::ReGenPos(v1);
      GetWindowRect(g_hMainWnd, &rect);
      MoveWindow(
        v1->m_hWebWindow,
        rect.left + v1->m_uiWebXPos,
        rect.top + v1->m_uiWebYPos,
        v1->m_uiWebWidth,
        v1->m_uiWebHeight,
        1);
    }
  }
}

//----- (006D07B0) --------------------------------------------------------
void mhGuestBookWin2::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "HelpWin");
}

//----- (006D07E0) --------------------------------------------------------
void __thiscall mhGuestBookWin2::OnCommand(mhGuestBookWin2 *this, unsigned int wParam, int lParam)
{
  mhGuestBookWin2 *v3; // esi@1
  GameFrameWork *v4; // eax@3
  HWND__ *v5; // ST00_4@5

  v3 = this;
  if ( wParam )
  {
    if ( wParam == 1 )
    {
      v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v4 )
        GameFrameWork::OpenPlayGuideSearchList(v4, "HelpWin");
    }
  }
  else
  {
    v5 = this->m_hWebWindow;
    this->m_bOpen = 0;
    DestroyWindow(v5);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
  }
}

//----- (006D0840) --------------------------------------------------------
void __thiscall mhGuestBookWin2::UpdateMeWin(mhGuestBookWin2 *this, float fCurTime)
{
  mhGuestBookWin2::UpdateWebPos(this);
}

//----- (006D0850) --------------------------------------------------------
char __thiscall mhGuestBookWin2::Create(mhGuestBookWin2 *this, PgFrameWork *pkFrameWork)
{
  mhGuestBookWin2 *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiAVObject *v5; // eax@4
  NiTexturingProperty *v6; // eax@4
  NiTexturingProperty *v7; // edi@4
  NiTexturingProperty::Map *v8; // eax@6
  PgSprData *v9; // eax@9
  NiNode *v10; // esi@12
  char result; // al@16
  int v12; // ebx@17
  NiNode *v13; // esi@20
  PgFont *v14; // eax@24
  PgWinText *v15; // edi@24
  NiRefObjectVtbl *v16; // ST3C_4@24
  NiUnsharedGeometryGroup *v17; // eax@24
  NiSourceTexture *v18; // edi@26
  PgSprData *v19; // eax@26
  PgWinSpr *v20; // eax@26
  PgSprData *v21; // edi@26
  NiSourceTexture *v22; // edi@26
  PgSprData *v23; // edi@27
  unsigned int uiWidth; // [sp+38h] [bp-28h]@17
  unsigned int uiHeight; // [sp+3Ch] [bp-24h]@17
  NiPointer<NiTexturingProperty> spTexProp; // [sp+40h] [bp-20h]@4
  NiSourceTexture *pkTexture; // [sp+44h] [bp-1Ch]@7
  int uiLeft; // [sp+48h] [bp-18h]@9
  int uiTop; // [sp+4Ch] [bp-14h]@9
  NiPointer<NiNode> spNode; // [sp+50h] [bp-10h]@1
  int v31; // [sp+5Ch] [bp-4h]@1
  int iOffY; // [sp+68h] [bp+8h]@17

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v31 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\HelpWin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Panel01");
  v6 = (NiTexturingProperty *)NiAVObject::GetProperty(v5, 8);
  v7 = v6;
  spTexProp.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v8 = *v7->m_kMaps.m_pBase;
  LOBYTE(v31) = 1;
  if ( v8 )
    pkTexture = (NiSourceTexture *)v8->m_spTexture.m_pObject;
  else
    pkTexture = 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, pkTexture);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "mhGuestBookWin2", 0) )
  {
    LOBYTE(v31) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v10 = spNode.m_pObject;
    v31 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
    return 0;
  }
  v12 = uiLeft;
  iOffY = uiTop;
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v14 = Font::Get(0);
    v15 = PgWinText::CreateWin(uiLeft - v12, uiTop - iOffY, uiWidth, uiHeight, v14, (PgWin *)&v2->vfptr, 0, 0);
    v15->vfptr[122].__vecDelDtor((NiRefObject *)v15, 1u);
    v15->vfptr[117].__vecDelDtor((NiRefObject *)v15, (unsigned int)&Color::m_kDxWinTitleColor);
    v16 = v15->vfptr;
    v17 = TextData2::Get(0x4C494A23u);
    v16[118].__vecDelDtor((NiRefObject *)v15, (unsigned int)v17);
    v15->vfptr[60].__vecDelDtor((NiRefObject *)v15, 0);
    if ( PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Panel01",
           &v2->m_uiPlaneWebXPos,
           &v2->m_uiPlaneWebYPos,
           &v2->m_uiPlaneWebWidth,
           &v2->m_uiPlaneWebHeight) )
    {
      v18 = pkTexture;
      v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
      v20 = PgWinSpr::CreateWin(uiLeft - v12, uiTop - iOffY, v19, (PgWin *)&v2->vfptr, 0, 0);
      v20->vfptr[60].__vecDelDtor((NiRefObject *)v20, 1u);
      v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, v18);
      PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
      PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
      PgWinBut::CreateWin(uiLeft - v12, uiTop - iOffY, v21, (PgWin *)&v2->vfptr, 0, 0, 0);
      v22 = MenuTexMgr::GetTexture(4u);
      if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
      {
        v23 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, v22);
        PgSprData::Add(v23, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
        PgSprData::Add(v23, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
        PgWinBut::CreateWin(uiLeft - v12, uiTop - iOffY, v23, (PgWin *)&v2->vfptr, 1u, 0, 0);
      }
      ((void (__thiscall *)(mhGuestBookWin2 *))v2->vfptr[59].__vecDelDtor)(v2);
      v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
      mhGuestBookWin2::ReGenPos(v2);
      LOBYTE(v31) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
      v31 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 1;
    }
    else
    {
      LOBYTE(v31) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
      v31 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 0;
    }
  }
  else
  {
    LOBYTE(v31) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v13 = spNode.m_pObject;
    v31 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v13 )
      return 0;
    ((void (__thiscall *)(NiNode *))v13->vfptr->__vecDelDtor)(v13);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006D0C80) --------------------------------------------------------
mhGuestBookWin2 *__cdecl mhGuestBookWin2::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  mhGuestBookWin2 *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x180u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&mhGuestBookWin2::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&mhGuestBookWin2::`vftable'{for `IDirectMessenger'};
    LOBYTE(v2[1].m_kLocal.m_Rotate.m_pEntry[2][0]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (mhGuestBookWin2 *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9C0914: using guessed type void (__thiscall *mhGuestBookWin2::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C0934: using guessed type int (__thiscall *mhGuestBookWin2::`vftable'{for `NiNode'})(void *p, char);

//----- (006D0DD0) --------------------------------------------------------
void __thiscall mhGuestBookWin2::ShowWeb(mhGuestBookWin2 *this, char *eKey, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *tKey)
{
  mhGuestBookWin2 *v3; // esi@1
  int v4; // edi@2
  int v5; // ebx@2
  const char *v6; // eax@5
  HWND v7; // edi@7
  void *(__thiscall *v8)(NiRefObject *, unsigned int); // edx@7
  int v9; // edi@7
  int kRect_4; // [sp+14h] [bp-48h]@2
  int kRect_8; // [sp+18h] [bp-44h]@2
  int kRect_12; // [sp+1Ch] [bp-40h]@2
  NiRect<int> kNiRect; // [sp+20h] [bp-3Ch]@7
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > WebURL; // [sp+30h] [bp-2Ch]@2
  int v15; // [sp+58h] [bp-4h]@2

  v3 = this;
  if ( this->m_bOpen != 1 )
  {
    mhGuestBookWin2::ReGenPos(this);
    v4 = v3->m_uiWebXPos;
    v5 = 0;
    kRect_8 = v3->m_uiWebWidth;
    kRect_4 = v3->m_uiWebYPos;
    kRect_12 = v3->m_uiWebHeight;
    WebURL._Myres = 15;
    WebURL._Mysize = 0;
    WebURL._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&WebURL, byte_9C0875, 0);
    v15 = 0;
    if ( eKey )
    {
      v6 = WebURL._Bx._Ptr;
      if ( WebURL._Myres < 0x10 )
        v6 = (const char *)&WebURL;
      v7 = CreateWindowExA(
             0,
             "WebCtrl32",
             v6,
             0x90000000,
             v4,
             kRect_4,
             kRect_8,
             kRect_12,
             g_hMainWnd,
             0,
             g_hMainInstance,
             0);
      ShowWindow(v7, 5);
      v8 = v3->vfptr[52].__vecDelDtor;
      v3->m_hWebWindow = v7;
      v3->m_bOpen = 1;
      kNiRect.m_left = 0;
      kNiRect.m_right = 0;
      kNiRect.m_top = 0;
      kNiRect.m_bottom = 0;
      v8((NiRefObject *)&v3->vfptr, (unsigned int)&kNiRect);
      v9 = 0;
      if ( PgWin::ms_uiScreenWidth >= kNiRect.m_right - kNiRect.m_left
        && PgWin::ms_uiScreenHeight >= kNiRect.m_bottom - kNiRect.m_top )
      {
        v9 = ((int (__thiscall *)(mhGuestBookWin2 *))v3->vfptr[41].__vecDelDtor)(v3);
        v5 = ((int (__thiscall *)(mhGuestBookWin2 *))v3->vfptr[42].__vecDelDtor)(v3);
      }
      v3->vfptr[43].__vecDelDtor((NiRefObject *)v3, v9);
      v3->vfptr[44].__vecDelDtor((NiRefObject *)v3, v5);
      SetFocus(g_hMainWnd);
      if ( WebURL._Myres >= 0x10 )
        operator delete(WebURL._Bx._Ptr);
    }
    else if ( WebURL._Myres >= 0x10 )
    {
      operator delete(WebURL._Bx._Ptr);
    }
  }
}

//----- (006D0F70) --------------------------------------------------------
mhGuestBookWin2 *__thiscall mhGuestBookWin2::`vector deleting destructor'(mhGuestBookWin2 *this, unsigned int a2)
{
  mhGuestBookWin2 *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&mhGuestBookWin2::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhGuestBookWin2::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C0914: using guessed type void (__thiscall *mhGuestBookWin2::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C0934: using guessed type int (__thiscall *mhGuestBookWin2::`vftable'{for `NiNode'})(void *p, char);

//----- (006D0FB0) --------------------------------------------------------
void __thiscall mhInfoWin::ClearGuestList(mhInfoWin *this)
{
  mhInfoWin *v1; // esi@1

  v1 = this;
  SlideListWin::RemoveAllList(this->m_GuestNameList);
  SlideListWin::UpdateViewList(v1->m_GuestNameList);
}

//----- (006D0FD0) --------------------------------------------------------
void mhInfoWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "MiniHomeInfo");
}

//----- (006D1000) --------------------------------------------------------
void __thiscall mhInfoWin::UpdateMeWin(mhInfoWin *this, float fCurTime)
{
  mhInfoWin *v2; // edi@1
  PgFrameWork *v3; // esi@2

  v2 = this;
  if ( g_pkKeyboard->m_aucKeystate[0] & 2 )
  {
    v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( PgWin::IsVisible((PgWin *)&v2->vfptr) )
    {
      BYTE3(v3[73].m_kMsgQ.m_uiAlloced) = 0;
      PgFrameWork::AddMsg(v3, 0xE0u, 0, 0);
    }
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (006D1050) --------------------------------------------------------
void __thiscall mhInfoWin::RefreshSlideBar(mhInfoWin *this)
{
  mhInfoWin *v1; // esi@1

  v1 = this;
  SlideBar::SetSplitCnt(this->m_pkSlideBarGuestNameList, this->m_GuestNameList->m_nSlideSplitCnt);
  v1->m_GuestNameList->m_nViewStartPos = v1->m_pkSlideBarGuestNameList->m_nCurPos;
  SlideListWin::UpdateViewList(v1->m_GuestNameList);
}

//----- (006D1090) --------------------------------------------------------
void __thiscall mhInfoWin::OnChangeTab(mhInfoWin *this, DirectUserMsgBody_MHInfoTabChanged::TabEnum eTab)
{
  bool v2; // zf@1
  char *v3; // esi@1
  DirectUserMsgBody_MHInfoTabChanged kBody; // [sp+4h] [bp-4h]@1

  (*this->m_pkHouseTabList._Myfirst)->m_bCheck = 0;
  v2 = this->m_pkMsgHooker == 0;
  v3 = (char *)&this->vfptr;
  kBody.eChanged = eTab;
  if ( !v2 )
  {
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))this->m_pkMsgHooker->vfptr->SendDirectMessage)(62, &kBody, v3);
    if ( *((_DWORD *)v3 + 1) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v3 + 1) + 20))(62, &kBody, v3);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v3 + 20))(v3, 62, &kBody, v3);
}

//----- (006D1100) --------------------------------------------------------
void __thiscall mhInfoWin::OnCommand(mhInfoWin *this, unsigned int wParam, int lParam)
{
  mhInfoWin *v3; // esi@1
  unsigned int v4; // eax@9
  char *v5; // eax@9
  Char *v6; // eax@9
  unsigned __int16 v7; // ax@10
  PgFrameWork *v8; // ecx@10
  Name5 v9; // [sp-14h] [bp-18h]@9
  unsigned int v10; // [sp-Ch] [bp-10h]@10
  unsigned int v11; // [sp-8h] [bp-Ch]@10
  unsigned int v12; // [sp-4h] [bp-8h]@10

  v3 = this;
  switch ( wParam )
  {
    case 0u:
      mhInfoWin::OnChangeTab(this, 0);
      break;
    case 1u:
      mhInfoWin::OnChangeTab(this, TE_GUEST_BOOK);
      break;
    case 2u:
      mhInfoWin::OnChangeTab(this, TE_EDIT_ROOM);
      break;
    case 3u:
      mhInfoWin::OnChangeTab(this, TE_PORTAL_LIST);
      break;
    case 4u:
      mhInfoWin::OnChangeTab(this, TE_SETTING);
      break;
    case 5u:
      mhInfoWin::OnChangeTab(this, TE_OUT);
      break;
    case 6u:
      mhInfoWin::RefreshSlideBar(this);
      break;
    case 7u:
      v4 = SlideListWin::GetCurSelIndex(this->m_GuestNameList);
      v5 = SlideListWin::GetText(v3->m_GuestNameList, v4, 0);
      Name5::Name5(&v9, v5);
      v6 = CharMgr::GetChar(&g_kCharMgr, v9);
      if ( v6 )
      {
        v7 = v6->m_kHandle;
        v8 = v3->m_pkFrameWork;
        v12 = 0;
        v11 = 0;
        v10 = 200;
        v3->m_ClickedChar = v7;
        PgFrameWork::AddMsg(v8, v10, v11, v12);
      }
      break;
    case 9u:
      PgFrameWork::AddMsg(this->m_pkFrameWork, 0xE0u, 0, 0);
      break;
    case 0xAu:
      mhInfoWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (006D1220) --------------------------------------------------------
char __thiscall mhInfoWin::SetData(mhInfoWin *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *Name, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *Lev, int Column)
{
  const char *v4; // edi@1
  mhInfoWin *v5; // esi@1
  const char *v6; // eax@2
  const char *v7; // eax@8

  v4 = (const char *)Name;
  v5 = this;
  if ( Name->_Myres < 0x10 )
    v6 = (const char *)Name;
  else
    v6 = Name->_Bx._Ptr;
  if ( SlideListWin::SetText(this->m_GuestNameList, Column, 0, v6) != 1 )
  {
    if ( Name->_Myres >= 0x10 )
      v4 = Name->_Bx._Ptr;
    SlideListWin::AddText(v5->m_GuestNameList, v4);
  }
  v7 = (const char *)Lev;
  if ( Lev->_Myres >= 0x10 )
    v7 = Lev->_Bx._Ptr;
  SlideListWin::SetText(v5->m_GuestNameList, Column, 1u, v7);
  SlideListWin::UpdateViewList(v5->m_GuestNameList);
  return 1;
}

//----- (006D1290) --------------------------------------------------------
void __thiscall mhInfoWin::mhInfoWin(mhInfoWin *this)
{
  mhInfoWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&mhInfoWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&mhInfoWin::`vftable'{for `IDirectMessenger'};
  v1->m_FullTitleName._Mysize = 0;
  v1->m_FullTitleName._Myres = 15;
  v1->m_FullTitleName._Bx._Buf[0] = 0;
  v1->m_FullRoomMakerName._Mysize = 0;
  v1->m_FullRoomMakerName._Myres = 15;
  v1->m_FullRoomMakerName._Bx._Buf[0] = 0;
  v1->m_PassWord._Mysize = 0;
  v1->m_PassWord._Myres = 15;
  v1->m_PassWord._Bx._Buf[0] = 0;
  v1->m_bItemView = 0;
  v1->m_MaxPersonCount = 0;
  v1->m_NowPersonCount = 0;
  *(_DWORD *)&v1->m_ClickedChar = -1;
  v1->m_pkHouseTabList._Myfirst = 0;
  v1->m_pkHouseTabList._Mylast = 0;
  v1->m_pkHouseTabList._Myend = 0;
  v1->m_pkTextFieldWin[0] = 0;
  v1->m_pkTextFieldWin[1] = 0;
  v1->m_pkTextFieldWin[2] = 0;
  v1->m_pkTextFieldWin[3] = 0;
  v1->m_GuestNameList = 0;
}
// 9C0D60: using guessed type void (__thiscall *mhInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C0D7C: using guessed type int (__thiscall *mhInfoWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006D1340) --------------------------------------------------------
void __thiscall mhInfoWin::~mhInfoWin(mhInfoWin *this)
{
  mhInfoWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&mhInfoWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhInfoWin::`vftable'{for `IDirectMessenger'};
  if ( this->m_pkHouseTabList._Myfirst )
    operator delete(this->m_pkHouseTabList._Myfirst);
  v1->m_pkHouseTabList._Myfirst = 0;
  v1->m_pkHouseTabList._Mylast = 0;
  v1->m_pkHouseTabList._Myend = 0;
  if ( v1->m_PassWord._Myres >= 0x10 )
    operator delete(v1->m_PassWord._Bx._Ptr);
  v1->m_PassWord._Myres = 15;
  v1->m_PassWord._Mysize = 0;
  v1->m_PassWord._Bx._Buf[0] = 0;
  if ( v1->m_FullRoomMakerName._Myres >= 0x10 )
    operator delete(v1->m_FullRoomMakerName._Bx._Ptr);
  v1->m_FullRoomMakerName._Myres = 15;
  v1->m_FullRoomMakerName._Mysize = 0;
  v1->m_FullRoomMakerName._Bx._Buf[0] = 0;
  if ( v1->m_FullTitleName._Myres >= 0x10 )
    operator delete(v1->m_FullTitleName._Bx._Ptr);
  v1->m_FullTitleName._Mysize = 0;
  v1->m_FullTitleName._Myres = 15;
  v1->m_FullTitleName._Bx._Buf[0] = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9C0D60: using guessed type void (__thiscall *mhInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C0D7C: using guessed type int (__thiscall *mhInfoWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006D1410) --------------------------------------------------------
mhInfoWin *__cdecl mhInfoWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  mhInfoWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1E4u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    mhInfoWin::mhInfoWin((mhInfoWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (mhInfoWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (006D1540) --------------------------------------------------------
void __thiscall mhInfoWin::RefreshInfoPage(mhInfoWin *this)
{
  int v1; // esi@1
  mhInfoWin *v2; // ebx@1
  Char *v3; // edi@2
  int v4; // ecx@7
  char acTemp[8]; // [sp+8h] [bp-Ch]@7

  v1 = unk_A96B24;
  v2 = this;
  this->m_NowPersonCount = 0;
  while ( v1 )
  {
    v3 = *(Char **)(v1 + 8);
    v1 = *(_DWORD *)v1;
    if ( !(unsigned __int8)((int (__thiscall *)(Char *))v3->vfptr[1].Affect)(v3)
      && !Char::IsNPC(v3)
      && !Char::IsLinkGate(v3) )
    {
      ++v2->m_NowPersonCount;
    }
  }
  v4 = v2->m_NowPersonCount;
  *(_DWORD *)acTemp = 0;
  *(_DWORD *)&acTemp[4] = 0;
  sprintf(acTemp, "%d/%d", v4, v2->m_MaxPersonCount);
  v2->m_pkTextFieldWin[2]->vfptr[118].__vecDelDtor((NiRefObject *)v2->m_pkTextFieldWin[2], (unsigned int)acTemp);
}

//----- (006D1600) --------------------------------------------------------
void __thiscall mhInfoWin::RefreshGuestPage(mhInfoWin *this)
{
  void **v1; // edi@1
  mhInfoWin *v2; // esi@1
  SlideListWin *v3; // ecx@1
  void **v4; // ecx@4
  void *v5; // edi@4
  char v6; // al@5
  const char *v7; // eax@7
  int v8; // eax@10
  bool v9; // zf@11
  char *v10; // eax@11
  char v11; // cl@13
  int (__thiscall *v12)(void *); // eax@14
  const char *v13; // eax@14
  char v14; // cl@19
  void **iter; // [sp+10h] [bp-94h]@4
  mhInfoWin *v16; // [sp+14h] [bp-90h]@1
  int i; // [sp+18h] [bp-8Ch]@1
  int Pos; // [sp+1Ch] [bp-88h]@1
  char acLev[3]; // [sp+20h] [bp-84h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > Lev; // [sp+24h] [bp-80h]@12
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > Name; // [sp+40h] [bp-64h]@14
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v22; // [sp+5Ch] [bp-48h]@20
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v23; // [sp+78h] [bp-2Ch]@18
  int v24; // [sp+A0h] [bp-4h]@14

  v1 = (void **)unk_A96B24;
  v2 = this;
  v3 = this->m_GuestNameList;
  v16 = v2;
  *(_WORD *)acLev = 12336;
  acLev[2] = 48;
  SlideListWin::RemoveAllList(v3);
  SlideListWin::UpdateViewList(v2->m_GuestNameList);
  Pos = 0;
  i = 0;
  if ( unk_A96B2C > 0 )
  {
    while ( 1 )
    {
      v4 = (void **)*v1;
      v5 = v1[2];
      iter = v4;
      if ( v5 )
      {
        v6 = MiniHouseIndoor::GetCharLev(&g_kWorld.m_MiniHouseIndoorMode, *((_WORD *)v5 + 276));
        _itoa((unsigned __int8)v6, acLev, 10);
        if ( !((int (*)(void))v2->m_pkTextFieldWin[0]->vfptr[121].__vecDelDtor)() )
          goto LABEL_28;
        if ( v2->m_FullRoomMakerName._Mysize )
        {
          v7 = v2->m_FullRoomMakerName._Bx._Buf;
          if ( v2->m_FullRoomMakerName._Myres >= 0x10 )
            v7 = *(const char **)v7;
        }
        else
        {
          v7 = (const char *)((int (*)(void))v2->m_pkTextFieldWin[0]->vfptr[121].__vecDelDtor)();
        }
        v8 = strcmp((const char *)(*(int (__thiscall **)(void *))(*(_DWORD *)v5 + 84))(v5), v7);
        v2 = v16;
        if ( v8 )
        {
LABEL_28:
          v9 = (*(int (__thiscall **)(void *))(*(_DWORD *)v5 + 84))(v5) == 0;
          v10 = acLev;
          if ( v9 )
          {
            v23._Myres = 15;
            v23._Mysize = 0;
            v23._Bx._Buf[0] = 0;
            do
              v14 = *v10++;
            while ( v14 );
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v23, acLev, v10 - &acLev[1]);
            v24 = 2;
            v22._Myres = 15;
            v22._Mysize = 0;
            v22._Bx._Buf[0] = 0;
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v22, "UnKnown", 7u);
            LOBYTE(v24) = 3;
            mhInfoWin::SetData(v2, &v22, &v23, Pos++);
            if ( v22._Myres >= 0x10 )
              operator delete(v22._Bx._Ptr);
            v22._Myres = 15;
            v22._Mysize = 0;
            v22._Bx._Buf[0] = 0;
            v24 = -1;
            if ( v23._Myres >= 0x10 )
              operator delete(v23._Bx._Ptr);
            v23._Myres = 15;
            v23._Mysize = 0;
            v23._Bx._Buf[0] = 0;
          }
          else
          {
            Lev._Myres = 15;
            Lev._Mysize = 0;
            Lev._Bx._Buf[0] = 0;
            do
              v11 = *v10++;
            while ( v11 );
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Lev, acLev, v10 - &acLev[1]);
            v12 = *(int (__thiscall **)(void *))(*(_DWORD *)v5 + 84);
            v24 = 0;
            v13 = (const char *)v12(v5);
            Name._Myres = 15;
            Name._Mysize = 0;
            Name._Bx._Buf[0] = 0;
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Name, v13, strlen(v13));
            LOBYTE(v24) = 1;
            mhInfoWin::SetData(v2, &Name, &Lev, Pos++);
            if ( Name._Myres >= 0x10 )
              operator delete(Name._Bx._Ptr);
            Name._Myres = 15;
            Name._Mysize = 0;
            Name._Bx._Buf[0] = 0;
            v24 = -1;
            if ( Lev._Myres >= 0x10 )
              operator delete(Lev._Bx._Ptr);
          }
        }
      }
      if ( ++i >= unk_A96B2C )
        break;
      v1 = iter;
    }
  }
}

//----- (006D1910) --------------------------------------------------------
char __thiscall mhInfoWin::Create(mhInfoWin *this, PgFrameWork *pkFrameWork)
{
  mhInfoWin *v2; // esi@1
  NiTexturePalette *v3; // ebx@1
  const char *v4; // eax@3
  NiNode *v5; // eax@3
  NiNode *v6; // esi@7
  volatile LONG *v7; // eax@7
  LONG v8; // eax@8
  PgSprData *v10; // eax@13
  int v11; // edi@16
  int v12; // ebx@16
  NiSourceTexture *v13; // eax@16
  PgSprData *v14; // eax@17
  PgSprData *v15; // eax@19
  PgSprData *v16; // eax@19
  PgSprData *v17; // eax@19
  PgSprData *v18; // eax@19
  PgFont *v19; // eax@22
  PgWinText *v20; // edi@22
  NiRefObjectVtbl *v21; // ebx@22
  NiUnsharedGeometryGroup *v22; // eax@22
  PgSprData *v23; // edi@22
  NiSourceTexture *v24; // edi@22
  PgSprData *v25; // edi@23
  NiPointer<PgSprData::PgHitTester> *v26; // edx@24
  unsigned int v27; // edi@24
  unsigned int v28; // ebx@24
  PgFont *v29; // eax@24
  PgWinText *v30; // edi@24
  NiRefObjectVtbl *v31; // ebx@24
  NiUnsharedGeometryGroup *v32; // eax@24
  PgSprData::PgHitTester *v33; // eax@24
  unsigned int v34; // edi@24
  unsigned int v35; // ebx@24
  PgWin *v36; // ST3C_4@24
  PgFont *v37; // eax@24
  PgWinAbbreviateText *v38; // eax@24
  NiPointer<PgSprData::PgHitTester> *v39; // ecx@24
  unsigned int v40; // edi@24
  unsigned int v41; // ebx@24
  PgFont *v42; // eax@24
  PgWinText *v43; // edi@24
  NiRefObjectVtbl *v44; // ebx@24
  NiUnsharedGeometryGroup *v45; // eax@24
  PgSprData::PgHitTester *v46; // eax@24
  unsigned int v47; // edi@24
  unsigned int v48; // ebx@24
  PgWin *v49; // ST3C_4@24
  PgFont *v50; // eax@24
  PgWinAbbreviateText *v51; // eax@24
  NiPointer<PgSprData::PgHitTester> *v52; // ecx@24
  unsigned int v53; // edi@24
  unsigned int v54; // ebx@24
  PgFont *v55; // eax@24
  PgWinText *v56; // edi@24
  NiRefObjectVtbl *v57; // ebx@24
  NiUnsharedGeometryGroup *v58; // eax@24
  PgSprData::PgHitTester *v59; // eax@24
  unsigned int v60; // edi@24
  unsigned int v61; // ebx@24
  PgFont *v62; // eax@24
  PgWinText *v63; // eax@24
  NiPointer<PgSprData::PgHitTester> *v64; // ecx@24
  unsigned int v65; // edi@24
  unsigned int v66; // ebx@24
  PgFont *v67; // eax@24
  PgWinText *v68; // edi@24
  NiRefObjectVtbl *v69; // ebx@24
  NiUnsharedGeometryGroup *v70; // eax@24
  PgSprData::PgHitTester *v71; // eax@24
  unsigned int v72; // edi@24
  unsigned int v73; // ebx@24
  PgFont *v74; // eax@24
  PgWinText *v75; // eax@24
  NiUnsharedGeometryGroup *v76; // eax@24
  NiUnsharedGeometryGroup *v77; // eax@24
  NiUnsharedGeometryGroup *v78; // eax@24
  NiUnsharedGeometryGroup *v79; // eax@24
  NiUnsharedGeometryGroup *v80; // eax@24
  NiUnsharedGeometryGroup *v81; // eax@24
  unsigned int v82; // ebx@24
  const char *v83; // eax@25
  const char *v84; // eax@27
  char *v85; // eax@29
  ColumnBut *v86; // ebx@31
  SLWCreateInfo::Item *v87; // ebx@32
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *v88; // ebx@32
  SLWCreateInfo::Item *v89; // ebx@38
  SLWCreateInfo::Item *v90; // ebx@40
  PgSprData *v91; // eax@42
  SlideListWin *v92; // eax@42
  PgSprData *v93; // eax@42
  SlideBar *v94; // eax@42
  SlideBar *v95; // ebx@42
  int v96; // eax@42
  int v97; // eax@42
  NiNode *v98; // esi@46
  unsigned int uiHeight; // [sp+10h] [bp-138h]@19
  unsigned int uiWidth; // [sp+14h] [bp-134h]@19
  SLWCreateInfo kCreateInfo; // [sp+18h] [bp-130h]@32
  char *pcText; // [sp+34h] [bp-114h]@24
  PgSprData *pkSprData; // [sp+38h] [bp-110h]@27
  NiRefObjectVtbl *v104; // [sp+3Ch] [bp-10Ch]@25
  NiPointer<NiNode> spNode; // [sp+40h] [bp-108h]@1
  int iLeft; // [sp+44h] [bp-104h]@13
  int iTop; // [sp+48h] [bp-100h]@13
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strName; // [sp+4Ch] [bp-FCh]@24
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+68h] [bp-E0h]@32
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > pkToolTipText[6]; // [sp+84h] [bp-C4h]@24
  char acNum[12]; // [sp+12Ch] [bp-1Ch]@24
  int v112; // [sp+144h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v112 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\MiniHomeInfo.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = spNode.m_pObject;
  if ( !spNode.m_pObject )
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("Game\\MiniHomeInfo.nif load fail", "LoadFail", spNode.m_pObject);
      v5 = spNode.m_pObject;
    }
    v112 = -1;
    if ( !v5 )
      return 0;
    v6 = v5;
    v7 = (volatile LONG *)&v5->m_uiRefCount;
    goto LABEL_8;
  }
  v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iLeft, &iTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v10, 0, pkFrameWork, "mhInfoWin", 0) )
  {
    v6 = spNode.m_pObject;
    v112 = -1;
    if ( spNode.m_pObject )
    {
      v7 = (volatile LONG *)&spNode.m_pObject->m_uiRefCount;
LABEL_8:
      v8 = InterlockedDecrement(v7);
      goto LABEL_9;
    }
    return 0;
  }
  v11 = iLeft;
  v12 = iTop;
  v13 = MenuTexMgr::GetTexture(0x13u);
  if ( v13 )
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, v13);
  else
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft - v11, iTop - v12, v14, (PgWin *)&v2->vfptr, 0, 0);
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft, iTop, v15, (PgWin *)&v2->vfptr, 0, 0);
  v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft, iTop, v16, (PgWin *)&v2->vfptr, 0, 0);
  v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel04", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft, iTop, v17, (PgWin *)&v2->vfptr, 0, 0);
  v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel05", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft, iTop, v18, (PgWin *)&v2->vfptr, 0, 0);
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &iLeft, &iTop, &uiWidth, &uiHeight) )
  {
    v6 = spNode.m_pObject;
    v112 = -1;
    if ( spNode.m_pObject )
    {
      v8 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
LABEL_9:
      if ( !v8 )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
      return 0;
    }
    return 0;
  }
  v19 = Font::Get(MAIN_MENU);
  v20 = PgWinText::CreateWin(iLeft, iTop, uiWidth, uiHeight, v19, (PgWin *)&v2->vfptr, 0, 0);
  v20->vfptr[122].__vecDelDtor((NiRefObject *)v20, 1u);
  v20->vfptr[117].__vecDelDtor((NiRefObject *)v20, (unsigned int)&Color::m_kDxWinTitleColor);
  v21 = v20->vfptr;
  v22 = TextData2::Get(0x9BA8F7E2);
  v21[118].__vecDelDtor((NiRefObject *)v20, (unsigned int)v22);
  v20->vfptr[60].__vecDelDtor((NiRefObject *)v20, 0);
  v23 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &iLeft, &iTop, 0);
  PgSprData::Add(v23, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(v23, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinBut::CreateWin(iLeft, iTop, v23, (PgWin *)&v2->vfptr, 9u, 0, 0);
  v24 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    v25 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &iLeft, &iTop, v24);
    PgSprData::Add(v25, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(v25, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(iLeft, iTop, v25, (PgWin *)&v2->vfptr, 0xAu, 0, 0);
  }
  v26 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &iLeft, &iTop, 0)->m_akHitTester.m_pBase;
  v27 = v26->m_pObject->m_uiHeight;
  v28 = v26->m_pObject->m_uiWidth;
  v29 = Font::Get(MAIN_MENU);
  v30 = PgWinText::CreateWin(iLeft, iTop, v28, v27, v29, (PgWin *)&v2->vfptr, 0, 0);
  v30->vfptr[122].__vecDelDtor((NiRefObject *)v30, 5u);
  v31 = v30->vfptr;
  v32 = TextData2::Get(0xE0F1FCEF);
  v31[118].__vecDelDtor((NiRefObject *)v30, (unsigned int)v32);
  v30->vfptr[60].__vecDelDtor((NiRefObject *)v30, 0);
  v33 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextField01", &iLeft, &iTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v34 = v33->m_uiHeight;
  v35 = v33->m_uiWidth;
  v36 = g_pkToolTipWin;
  v37 = Font::Get(MAIN_MENU);
  v38 = PgWinAbbreviateText::CreateWin(iLeft, iTop, v35, v34, v37, (PgWin *)&v2->vfptr, 0, 0, 0, 1, v36, 0x1Eu);
  v2->m_pkTextFieldWin[0] = (PgWinText *)v38;
  v38->vfptr[122].__vecDelDtor((NiRefObject *)v38, 5u);
  ((void (__stdcall *)(void *))v2->m_pkTextFieldWin[0]->vfptr[118].__vecDelDtor)(&unk_9C0B6A);
  v39 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text02", &iLeft, &iTop, 0)->m_akHitTester.m_pBase;
  v40 = v39->m_pObject->m_uiHeight;
  v41 = v39->m_pObject->m_uiWidth;
  v42 = Font::Get(MAIN_MENU);
  v43 = PgWinText::CreateWin(iLeft, iTop, v41, v40, v42, (PgWin *)&v2->vfptr, 0, 0);
  v43->vfptr[122].__vecDelDtor((NiRefObject *)v43, 5u);
  v44 = v43->vfptr;
  v45 = TextData2::Get(0x2218767Du);
  v44[118].__vecDelDtor((NiRefObject *)v43, (unsigned int)v45);
  v43->vfptr[60].__vecDelDtor((NiRefObject *)v43, 0);
  v46 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextField02", &iLeft, &iTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v47 = v46->m_uiHeight;
  v48 = v46->m_uiWidth;
  v49 = g_pkToolTipWin;
  v50 = Font::Get(MAIN_MENU);
  v51 = PgWinAbbreviateText::CreateWin(iLeft, iTop, v48, v47, v50, (PgWin *)&v2->vfptr, 0, 0, 0, 1, v49, 0x1Eu);
  v2->m_pkTextFieldWin[1] = (PgWinText *)v51;
  v51->vfptr[122].__vecDelDtor((NiRefObject *)v51, 5u);
  ((void (__stdcall *)(void *))v2->m_pkTextFieldWin[1]->vfptr[118].__vecDelDtor)(&unk_9C0B6B);
  v52 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text03", &iLeft, &iTop, 0)->m_akHitTester.m_pBase;
  v53 = v52->m_pObject->m_uiHeight;
  v54 = v52->m_pObject->m_uiWidth;
  v55 = Font::Get(MAIN_MENU);
  v56 = PgWinText::CreateWin(iLeft, iTop, v54, v53, v55, (PgWin *)&v2->vfptr, 0, 0);
  v56->vfptr[122].__vecDelDtor((NiRefObject *)v56, 5u);
  v57 = v56->vfptr;
  v58 = TextData2::Get(0xA2FAFBE1);
  v57[118].__vecDelDtor((NiRefObject *)v56, (unsigned int)v58);
  v56->vfptr[60].__vecDelDtor((NiRefObject *)v56, 0);
  v59 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextField03", &iLeft, &iTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v60 = v59->m_uiHeight;
  v61 = v59->m_uiWidth;
  v62 = Font::Get(MAIN_MENU);
  v63 = PgWinText::CreateWin(iLeft, iTop, v61, v60, v62, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkTextFieldWin[2] = v63;
  v63->vfptr[122].__vecDelDtor((NiRefObject *)v63, 5u);
  ((void (__stdcall *)(void *))v2->m_pkTextFieldWin[2]->vfptr[118].__vecDelDtor)(&unk_9C0B75);
  ((void (__stdcall *)(_DWORD))v2->m_pkTextFieldWin[2]->vfptr[60].__vecDelDtor)(0);
  v64 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text04", &iLeft, &iTop, 0)->m_akHitTester.m_pBase;
  v65 = v64->m_pObject->m_uiHeight;
  v66 = v64->m_pObject->m_uiWidth;
  v67 = Font::Get(MAIN_MENU);
  v68 = PgWinText::CreateWin(iLeft, iTop, v66, v65, v67, (PgWin *)&v2->vfptr, 0, 0);
  v68->vfptr[122].__vecDelDtor((NiRefObject *)v68, 5u);
  v69 = v68->vfptr;
  v70 = TextData::Get(0x9798BBB1);
  v69[118].__vecDelDtor((NiRefObject *)v68, (unsigned int)v70);
  v68->vfptr[60].__vecDelDtor((NiRefObject *)v68, 0);
  v71 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextField04", &iLeft, &iTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v72 = v71->m_uiHeight;
  v73 = v71->m_uiWidth;
  v74 = Font::Get(MAIN_MENU);
  v75 = PgWinText::CreateWin(iLeft, iTop, v73, v72, v74, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkTextFieldWin[3] = v75;
  v75->vfptr[122].__vecDelDtor((NiRefObject *)v75, 5u);
  ((void (__stdcall *)(void *))v2->m_pkTextFieldWin[3]->vfptr[118].__vecDelDtor)(&unk_9C0B76);
  ((void (__stdcall *)(_DWORD))v2->m_pkTextFieldWin[3]->vfptr[60].__vecDelDtor)(0);
  v2->m_pkTextFieldWin[3]->m_spTextGeom.m_pObject->m_bAutoWordWrap = 1;
  strName._Myres = 15;
  strName._Mysize = 0;
  strName._Bx._Buf[0] = 0;
  LOBYTE(v112) = 1;
  strcpy(acNum, "0");
  *(_DWORD *)&acNum[2] = 0;
  *(_DWORD *)&acNum[6] = 0;
  *(_WORD *)&acNum[10] = 0;
  v76 = TextData2::Get(0x9BA8F7E2);
  pkToolTipText[0]._Myres = 15;
  pkToolTipText[0]._Mysize = 0;
  pkToolTipText[0]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    pkToolTipText,
    (const char *)v76,
    strlen((const char *)v76));
  LOBYTE(v112) = 2;
  v77 = TextData2::Get(0x4C494A23u);
  pkToolTipText[1]._Myres = 15;
  pkToolTipText[1]._Mysize = 0;
  pkToolTipText[1]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &pkToolTipText[1],
    (const char *)v77,
    strlen((const char *)v77));
  LOBYTE(v112) = 3;
  v78 = TextData2::Get(0xE6EC4424);
  pkToolTipText[2]._Myres = 15;
  pkToolTipText[2]._Mysize = 0;
  pkToolTipText[2]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &pkToolTipText[2],
    (const char *)v78,
    strlen((const char *)v78));
  LOBYTE(v112) = 4;
  v79 = TextData2::Get(0xD7F24143);
  pkToolTipText[3]._Myres = 15;
  pkToolTipText[3]._Mysize = 0;
  pkToolTipText[3]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &pkToolTipText[3],
    (const char *)v79,
    strlen((const char *)v79));
  LOBYTE(v112) = 5;
  v80 = TextData2::Get(0xDEE82F0D);
  pkToolTipText[4]._Myres = 15;
  pkToolTipText[4]._Mysize = 0;
  pkToolTipText[4]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &pkToolTipText[4],
    (const char *)v80,
    strlen((const char *)v80));
  LOBYTE(v112) = 6;
  v81 = TextData2::Get(0xFA4A423F);
  pkToolTipText[5]._Myres = 15;
  pkToolTipText[5]._Mysize = 0;
  pkToolTipText[5]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &pkToolTipText[5],
    (const char *)v81,
    strlen((const char *)v81));
  LOBYTE(v112) = 7;
  v82 = 0;
  pcText = (char *)pkToolTipText;
  do
  {
    v104 = (NiRefObjectVtbl *)(v82 + 1);
    _itoa(v82 + 1, acNum, 10);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strName, "BtnNor0", 7u);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strName, acNum, strlen(acNum));
    v83 = strName._Bx._Ptr;
    if ( strName._Myres < 0x10 )
      v83 = (const char *)&strName;
    pkSprData = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, v83, &iLeft, &iTop, 0);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strName, "BtnOver0", 8u);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strName, acNum, strlen(acNum));
    v84 = strName._Bx._Ptr;
    if ( strName._Myres < 0x10 )
      v84 = (const char *)&strName;
    PgSprData::Add(pkSprData, (NiAVObject *)&spNode.m_pObject->vfptr, v84);
    pkSprData = (PgSprData *)ColumnBut::CreateWin(iLeft, iTop, pkSprData, (PgWin *)&v2->vfptr, v82, 0);
    std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
      (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_pkHouseTabList,
      (const unsigned int *)&pkSprData);
    v85 = pcText;
    if ( *((_DWORD *)pcText + 5) >= 0x10u )
      v85 = *(char **)pcText;
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkHouseTabList._Myfirst[v82]->vfptr, v85);
    v86 = v2->m_pkHouseTabList._Myfirst[v82];
    pcText += 28;
    v86->m_pkToolTipWin = g_pkToolTipWin;
    v82 = (unsigned int)v104;
  }
  while ( (unsigned int)v104 < 6 );
  (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v2->m_pkHouseTabList._Myfirst + 1) + 240))(0);
  kCreateInfo.m_arrItem._Myfirst = 0;
  kCreateInfo.m_arrItem._Mylast = 0;
  kCreateInfo.m_arrItem._Myend = 0;
  kCreateInfo.m_bMakeData = 0;
  kCreateInfo.m_nOffX = 0;
  kCreateInfo.m_nOffY = 0;
  LOBYTE(v112) = 8;
  v87 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
  v87->nItemType = 1;
  v87->pNode = spNode.m_pObject;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarNor", 0xCu);
  v88 = &v87->vecNodeName;
  LOBYTE(v112) = 9;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v88,
    &_Val);
  LOBYTE(v112) = 8;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarClick", 0xEu);
  LOBYTE(v112) = 10;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v88,
    &_Val);
  LOBYTE(v112) = 8;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarOver", 0xDu);
  LOBYTE(v112) = 11;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    v88,
    &_Val);
  LOBYTE(v112) = 8;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v89 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  v89->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column01", 8u);
  LOBYTE(v112) = 12;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &v89->vecNodeName,
    &_Val);
  LOBYTE(v112) = 8;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v89->pNode = spNode.m_pObject;
  v89->bAbbreviatable = 1;
  v90 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  v90->nItemType = 2;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column02", 8u);
  LOBYTE(v112) = 13;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    &v90->vecNodeName,
    &_Val);
  LOBYTE(v112) = 8;
  if ( _Val._Myres >= 0x10 )
    operator delete(_Val._Bx._Ptr);
  v90->pNode = spNode.m_pObject;
  _Val._Myres = 15;
  _Val._Mysize = 0;
  _Val._Bx._Buf[0] = 0;
  SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
  v91 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ColumnBox", &iLeft, &iTop, 0);
  v92 = SlideListWin::CreateWin(iLeft, iTop, v91, (PgWin *)&v2->vfptr, &kCreateInfo, 1u, 0);
  v2->m_GuestNameList = v92;
  v92->m_uiRClickMsg = 7;
  SlideListWin::AddText(v2->m_GuestNameList, &byte_9C0B77);
  SlideListWin::SetCurSelIndex(v2->m_GuestNameList, 0);
  v2->m_GuestNameList->m_nViewStartPos = 0;
  SlideListWin::UpdateViewList(v2->m_GuestNameList);
  v93 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle", &iLeft, &iTop, 0);
  v94 = SlideBar::CreateWin(
          spNode.m_pObject,
          "SlideBar",
          "SlideBar_UpBtn",
          "SlideBar_DnBtn",
          v93,
          0,
          (PgWin *)&v2->vfptr);
  v2->m_pkSlideBarGuestNameList = v94;
  v94->m_uiClickMsg = 6;
  v2->m_pkSlideBarGuestNameList->m_eType = 1;
  v95 = v2->m_pkSlideBarGuestNameList;
  v104 = v2->m_pkSlideBarGuestNameList->vfptr;
  v96 = ((int (__thiscall *)(SlideBar *))v104[42].__vecDelDtor)(v95);
  v97 = (int)v95->vfptr[41].__vecDelDtor((NiRefObject *)v95, v96);
  v104[77].__vecDelDtor((NiRefObject *)v2->m_pkSlideBarGuestNameList, v97);
  SlideBar::SetSplitCnt(v2->m_pkSlideBarGuestNameList, v2->m_GuestNameList->m_nSlideSplitCnt);
  v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
  LOBYTE(v112) = 7;
  if ( kCreateInfo.m_arrItem._Myfirst )
  {
    std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(
      kCreateInfo.m_arrItem._Myfirst,
      kCreateInfo.m_arrItem._Mylast);
    operator delete(kCreateInfo.m_arrItem._Myfirst);
  }
  kCreateInfo.m_arrItem._Myfirst = 0;
  kCreateInfo.m_arrItem._Mylast = 0;
  kCreateInfo.m_arrItem._Myend = 0;
  LOBYTE(v112) = 1;
  `eh vector destructor iterator'(
    pkToolTipText,
    0x1Cu,
    6,
    (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
  if ( strName._Myres >= 0x10 )
    operator delete(strName._Bx._Ptr);
  v98 = spNode.m_pObject;
  strName._Myres = 15;
  strName._Mysize = 0;
  strName._Bx._Buf[0] = 0;
  v112 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v98 )
    v98->vfptr->__vecDelDtor((NiRefObject *)v98, 1u);
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006D2980) --------------------------------------------------------
void __thiscall mhInfoWin::OnClose(mhInfoWin *this)
{
  mhInfoWin *v1; // esi@1

  v1 = this;
  SlideListWin::RemoveAllList(this->m_GuestNameList);
  SlideListWin::UpdateViewList(v1->m_GuestNameList);
}

//----- (006D29A0) --------------------------------------------------------
mhInfoWin *__thiscall mhInfoWin::`vector deleting destructor'(mhInfoWin *this, unsigned int a2)
{
  mhInfoWin *v2; // esi@1

  v2 = this;
  mhInfoWin::~mhInfoWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006D2A00) --------------------------------------------------------
void __thiscall mhInputPassWordWin::OnCommand(mhInputPassWordWin *this, unsigned int wParam, int lParam)
{
  mhInputPassWordWin *v3; // esi@1

  v3 = this;
  if ( wParam )
  {
    if ( wParam != 1 )
      return;
    PgFrameWork::AddMsg(this->m_pkFrameWork, 0xCDu, 0, 0);
  }
  GameFrameWork::OnCloseMHInputPassWordWin((GameFrameWork *)v3->m_pkFrameWork);
}

//----- (006D2A50) --------------------------------------------------------
void __thiscall mhInputPassWordWin::mhInputPassWordWin(mhInputPassWordWin *this)
{
  mhInputPassWordWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&mhInputPassWordWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&mhInputPassWordWin::`vftable'{for `IDirectMessenger'};
  v1->m_spRoomPassWord.m_pObject = 0;
  v1->mh_hnd = 0;
}
// 9C1030: using guessed type void (__thiscall *mhInputPassWordWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C104C: using guessed type int (__thiscall *mhInputPassWordWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006D2A80) --------------------------------------------------------
void __thiscall mhInputPassWordWin::~mhInputPassWordWin(mhInputPassWordWin *this)
{
  mhInputPassWordWin *v1; // esi@1
  EditWin *v2; // edi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&mhInputPassWordWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhInputPassWordWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spRoomPassWord.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9C1030: using guessed type void (__thiscall *mhInputPassWordWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C104C: using guessed type int (__thiscall *mhInputPassWordWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006D2B10) --------------------------------------------------------
char __thiscall mhInputPassWordWin::Create(mhInputPassWordWin *this, PgFrameWork *pkFrameWork)
{
  mhInputPassWordWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  bool v7; // zf@7
  PgSprData *v9; // edi@11
  unsigned int v10; // ST08_4@11
  EditWin *v11; // eax@11
  EditWin *v12; // edi@11
  EditWin *v13; // ebx@11
  PgFont *v14; // eax@22
  PgWinText *v15; // edi@22
  NiRefObjectVtbl *v16; // ebx@22
  NiUnsharedGeometryGroup *v17; // eax@22
  PgSprData *v18; // edi@22
  NiPointer<PgSprData::PgHitTester> *v19; // ecx@22
  unsigned int v20; // edi@22
  unsigned int v21; // ebx@22
  PgFont *v22; // eax@22
  PgWinText *v23; // edi@22
  NiRefObjectVtbl *v24; // ebx@22
  NiUnsharedGeometryGroup *v25; // eax@22
  PgSprData *v26; // edi@22
  NiPointer<PgSprData::PgHitTester> *v27; // ecx@22
  unsigned int v28; // edi@22
  unsigned int v29; // ebx@22
  PgFont *v30; // eax@22
  PgWinText *v31; // edi@22
  NiRefObjectVtbl *v32; // ebx@22
  NiUnsharedGeometryGroup *v33; // eax@22
  NiNode *v34; // esi@23
  int iXOff; // [sp+44h] [bp-28h]@4
  int iYOff; // [sp+48h] [bp-24h]@4
  unsigned int uiWidth; // [sp+4Ch] [bp-20h]@18
  unsigned int uiHeight; // [sp+50h] [bp-1Ch]@18
  int iLeft; // [sp+54h] [bp-18h]@11
  int iTop; // [sp+58h] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+5Ch] [bp-10h]@1
  int v42; // [sp+68h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v42 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\InputPassword.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iXOff, &iYOff, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "mhInputPassWordWin", 0) )
  {
    v6 = spNode.m_pObject;
    v42 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v7 = v6 == 0;
LABEL_8:
    if ( !v7 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    return 0;
  }
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextInput01", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft - 1, iTop - 2, v9, (PgWin *)&v2->vfptr, 0, 0);
  v10 = v9->m_akHitTester.m_pBase->m_pObject->m_uiWidth;
  v11 = EditWin::CreateWin(iLeft, iTop, v10, v10, (PgWin *)&v2->vfptr, PASSWD, 8u, 1u, 1, 0, 1);
  v12 = v2->m_spRoomPassWord.m_pObject;
  v13 = v11;
  if ( v12 != v11 )
  {
    if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
      v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
    v2->m_spRoomPassWord.m_pObject = v13;
    if ( v13 )
      InterlockedIncrement((volatile LONG *)&v13->m_uiRefCount);
  }
  EditWin::SetImeStatus(v2->m_spRoomPassWord.m_pObject, IS_KOREAN);
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &iLeft, &iTop, &uiWidth, &uiHeight) )
  {
    v6 = spNode.m_pObject;
    v42 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v7 = v6 == 0;
    goto LABEL_8;
  }
  v14 = Font::Get(MAIN_MENU);
  v15 = PgWinText::CreateWin(iLeft, iTop, uiWidth, uiHeight, v14, (PgWin *)&v2->vfptr, 0, 0);
  v15->vfptr[122].__vecDelDtor((NiRefObject *)v15, 5u);
  v15->vfptr[117].__vecDelDtor((NiRefObject *)v15, (unsigned int)&Color::m_kDxWinTitleColor);
  v16 = v15->vfptr;
  v17 = TextData::Get(0xA7F6EEE4);
  v16[118].__vecDelDtor((NiRefObject *)v15, (unsigned int)v17);
  v15->vfptr[60].__vecDelDtor((NiRefObject *)v15, 0);
  v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor01", &iLeft, &iTop, 0);
  PgSprData::Add(v18, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick01");
  PgSprData::Add(v18, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver01");
  PgWinBut::CreateWin(iLeft, iTop, v18, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v19 = v18->m_akHitTester.m_pBase;
  v20 = v19->m_pObject->m_uiHeight;
  v21 = v19->m_pObject->m_uiWidth;
  v22 = Font::Get(MAIN_MENU);
  v23 = PgWinText::CreateWin(iLeft, iTop, v21, v20, v22, (PgWin *)&v2->vfptr, 0, 0);
  v23->vfptr[122].__vecDelDtor((NiRefObject *)v23, 5u);
  v24 = v23->vfptr;
  v25 = TextData::Get(0x4F5F499Fu);
  v24[118].__vecDelDtor((NiRefObject *)v23, (unsigned int)v25);
  v23->vfptr[60].__vecDelDtor((NiRefObject *)v23, 0);
  v26 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor02", &iLeft, &iTop, 0);
  PgSprData::Add(v26, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick02");
  PgSprData::Add(v26, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver02");
  PgWinBut::CreateWin(iLeft, iTop, v26, (PgWin *)&v2->vfptr, 0, 0, 0);
  v27 = v26->m_akHitTester.m_pBase;
  v28 = v27->m_pObject->m_uiHeight;
  v29 = v27->m_pObject->m_uiWidth;
  v30 = Font::Get(MAIN_MENU);
  v31 = PgWinText::CreateWin(iLeft, iTop, v29, v28, v30, (PgWin *)&v2->vfptr, 0, 0);
  v31->vfptr[122].__vecDelDtor((NiRefObject *)v31, 5u);
  v32 = v31->vfptr;
  v33 = TextData::Get(0x88A297E1);
  v32[118].__vecDelDtor((NiRefObject *)v31, (unsigned int)v33);
  v31->vfptr[60].__vecDelDtor((NiRefObject *)v31, 0);
  ((void (__thiscall *)(mhInputPassWordWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.43000001);
  v42 = -1;
  if ( spNode.m_pObject )
  {
    v34 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v34 )
        v34->vfptr->__vecDelDtor((NiRefObject *)v34, 1u);
    }
  }
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006D2F40) --------------------------------------------------------
mhInputPassWordWin *__cdecl mhInputPassWordWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  mhInputPassWordWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x160u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&mhInputPassWordWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&mhInputPassWordWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LOWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (mhInputPassWordWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9C1030: using guessed type void (__thiscall *mhInputPassWordWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C104C: using guessed type int (__thiscall *mhInputPassWordWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006D3090) --------------------------------------------------------
mhInputPassWordWin *__thiscall mhInputPassWordWin::`scalar deleting destructor'(mhInputPassWordWin *this, unsigned int a2)
{
  mhInputPassWordWin *v2; // esi@1
  EditWin *v3; // edi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&mhInputPassWordWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhInputPassWordWin::`vftable'{for `IDirectMessenger'};
  v3 = this->m_spRoomPassWord.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C1030: using guessed type void (__thiscall *mhInputPassWordWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C104C: using guessed type int (__thiscall *mhInputPassWordWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006D3140) --------------------------------------------------------
void mhJoinWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "MiniHomeEntrance");
}

//----- (006D3180) --------------------------------------------------------
void __thiscall mhJoinWin::~mhJoinWin(mhJoinWin *this)
{
  mhJoinWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&mhJoinWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhJoinWin::`vftable'{for `IDirectMessenger'};
  `eh vector destructor iterator'(
    this->m_spEdit,
    4u,
    4,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9C1474: using guessed type void (__thiscall *mhJoinWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C1494: using guessed type int (__thiscall *mhJoinWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006D3200) --------------------------------------------------------
char __thiscall mhJoinWin::Create(mhJoinWin *this, PgFrameWork *pkFrameWork)
{
  mhJoinWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiNode *v5; // eax@3
  NiNode *v6; // esi@7
  bool v7; // zf@8
  char result; // al@11
  PgSprData *v9; // eax@12
  NiNode *v10; // esi@13
  int v11; // edi@18
  int v12; // ebx@18
  NiSourceTexture *v13; // eax@18
  PgSprData *v14; // eax@19
  PgSprData *v15; // eax@21
  PgSprData *v16; // eax@21
  PgSprData *v17; // eax@21
  PgFont *v18; // eax@25
  PgWinText *v19; // edi@25
  NiRefObjectVtbl *v20; // ebx@25
  NiUnsharedGeometryGroup *v21; // eax@25
  PgSprData *v22; // edi@25
  EditWin *v23; // eax@25
  PgSprData *v24; // edi@25
  EditWin *v25; // eax@25
  PgSprData *v26; // edi@25
  EditWin *v27; // eax@25
  PgSprData *v28; // edi@25
  EditWin *v29; // eax@25
  NiPointer<PgSprData::PgHitTester> *v30; // edx@25
  unsigned int v31; // edi@25
  unsigned int v32; // ebx@25
  PgFont *v33; // eax@25
  PgWinText *v34; // edi@25
  NiRefObjectVtbl *v35; // ebx@25
  NiUnsharedGeometryGroup *v36; // eax@25
  PgSprData::PgHitTester *v37; // eax@25
  unsigned int v38; // edi@25
  unsigned int v39; // ebx@25
  PgFont *v40; // eax@25
  PgWinText *v41; // edi@25
  NiRefObjectVtbl *v42; // ebx@25
  NiUnsharedGeometryGroup *v43; // eax@25
  NiPointer<PgSprData::PgHitTester> *v44; // ecx@25
  unsigned int v45; // edi@25
  unsigned int v46; // ebx@25
  PgFont *v47; // eax@25
  PgWinText *v48; // edi@25
  NiRefObjectVtbl *v49; // ebx@25
  NiUnsharedGeometryGroup *v50; // eax@25
  PgSprData::PgHitTester *v51; // eax@25
  unsigned int v52; // edi@25
  unsigned int v53; // ebx@25
  PgFont *v54; // eax@25
  PgWinText *v55; // edi@25
  NiRefObjectVtbl *v56; // ebx@25
  NiUnsharedGeometryGroup *v57; // eax@25
  NiPointer<PgSprData::PgHitTester> *v58; // ecx@25
  unsigned int v59; // edi@25
  unsigned int v60; // ebx@25
  PgFont *v61; // eax@25
  PgWinText *v62; // edi@25
  NiRefObjectVtbl *v63; // ebx@25
  NiUnsharedGeometryGroup *v64; // eax@25
  PgSprData::PgHitTester *v65; // eax@25
  unsigned int v66; // edi@25
  unsigned int v67; // ebx@25
  PgFont *v68; // eax@25
  PgWinText *v69; // edi@25
  NiRefObjectVtbl *v70; // ebx@25
  NiUnsharedGeometryGroup *v71; // eax@25
  NiPointer<PgSprData::PgHitTester> *v72; // ecx@25
  unsigned int v73; // edi@25
  unsigned int v74; // ebx@25
  PgFont *v75; // eax@25
  PgWinText *v76; // edi@25
  NiRefObjectVtbl *v77; // ebx@25
  NiUnsharedGeometryGroup *v78; // eax@25
  PgSprData::PgHitTester *v79; // eax@25
  unsigned int v80; // edi@25
  unsigned int v81; // ebx@25
  PgFont *v82; // eax@25
  PgWinText *v83; // edi@25
  NiRefObjectVtbl *v84; // ebx@25
  NiUnsharedGeometryGroup *v85; // eax@25
  PgSprData *v86; // edi@25
  NiPointer<PgSprData::PgHitTester> *v87; // edx@25
  unsigned int v88; // edi@25
  unsigned int v89; // ebx@25
  PgFont *v90; // eax@25
  PgWinText *v91; // edi@25
  NiRefObjectVtbl *v92; // ebx@25
  NiUnsharedGeometryGroup *v93; // eax@25
  PgSprData *v94; // edi@25
  NiPointer<PgSprData::PgHitTester> *v95; // ecx@25
  unsigned int v96; // edi@25
  unsigned int v97; // ebx@25
  PgFont *v98; // eax@25
  PgWinText *v99; // edi@25
  NiRefObjectVtbl *v100; // ebx@25
  NiUnsharedGeometryGroup *v101; // eax@25
  PgSprData *v102; // edi@25
  NiSourceTexture *v103; // edi@25
  PgSprData *v104; // edi@26
  PgSprData *v105; // edi@27
  ColumnBut *v106; // eax@27
  NiNode *v107; // ecx@27
  PgSprData *v108; // edi@27
  NiNode *v109; // esi@28
  unsigned int uiWidth; // [sp+A8h] [bp-20h]@21
  unsigned int uiHeight; // [sp+ACh] [bp-1Ch]@21
  NiPointer<NiNode> spNode; // [sp+B0h] [bp-18h]@1
  int iLeft; // [sp+B4h] [bp-14h]@12
  int iTop; // [sp+B8h] [bp-10h]@12
  int v115; // [sp+C4h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v115 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\MiniHomeEntrance.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = spNode.m_pObject;
  if ( !spNode.m_pObject )
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("Game\\MiniHomeGuestEntrance.nif load fail", "LoadFail", 0);
      v5 = spNode.m_pObject;
    }
    v115 = -1;
    if ( !v5 )
      return 0;
    v6 = v5;
    if ( InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      return 0;
    v7 = v6 == 0;
    goto LABEL_9;
  }
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iLeft, &iTop, 0);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, -4, 0, v9, 0, pkFrameWork, "mhJoinWin", 0) )
  {
    v11 = iLeft;
    v12 = iTop;
    v13 = MenuTexMgr::GetTexture(0x13u);
    if ( v13 )
      v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, v13);
    else
      v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft - v11, iTop - v12, v14, (PgWin *)&v2->vfptr, 0, 0);
    v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft, iTop, v15, (PgWin *)&v2->vfptr, 0, 0);
    v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft, iTop, v16, (PgWin *)&v2->vfptr, 0, 0);
    v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel03", &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft, iTop, v17, (PgWin *)&v2->vfptr, 0, 0);
    if ( !PgUtil::GetTriShapeRect(
            (NiAVObject *)&spNode.m_pObject->vfptr,
            "WinTitle",
            &iLeft,
            &iTop,
            &uiWidth,
            &uiHeight) )
    {
      v6 = spNode.m_pObject;
      v115 = -1;
      if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
        return 0;
      v7 = v6 == 0;
LABEL_9:
      if ( !v7 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      return 0;
    }
    v18 = Font::Get(MAIN_MENU);
    v19 = PgWinText::CreateWin(iLeft, iTop, uiWidth, uiHeight, v18, (PgWin *)&v2->vfptr, 0, 0);
    v19->vfptr[122].__vecDelDtor((NiRefObject *)v19, 1u);
    v19->vfptr[117].__vecDelDtor((NiRefObject *)v19, (unsigned int)&Color::m_kDxWinTitleColor);
    v20 = v19->vfptr;
    v21 = TextData::Get(0xFAF63B39);
    v20[118].__vecDelDtor((NiRefObject *)v19, (unsigned int)v21);
    v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
    v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextField01", &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft, iTop, v22, (PgWin *)&v2->vfptr, 0, 0);
    v23 = EditWin::CreateWin(
            iLeft,
            iTop,
            v22->m_akHitTester.m_pBase->m_pObject->m_uiWidth,
            v22->m_akHitTester.m_pBase->m_pObject->m_uiHeight,
            (PgWin *)&v2->vfptr,
            NORMAL,
            0x14u,
            1u,
            1,
            0,
            1);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)v2->m_spEdit, (NiD3DDefaultShader *)v23);
    EditWin::SetImeStatus(v2->m_spEdit[0].m_pObject, IS_KOREAN);
    v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextField04", &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft, iTop, v24, (PgWin *)&v2->vfptr, 0, 0);
    v25 = EditWin::CreateWin(
            iLeft,
            iTop,
            v24->m_akHitTester.m_pBase->m_pObject->m_uiWidth,
            v24->m_akHitTester.m_pBase->m_pObject->m_uiHeight,
            (PgWin *)&v2->vfptr,
            NUMBER,
            2u,
            1u,
            1,
            0,
            1);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spEdit[1], (NiD3DDefaultShader *)v25);
    EditWin::SetImeStatus(v2->m_spEdit[1].m_pObject, IS_KOREAN);
    v26 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextField03", &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft - 1, iTop - 2, v26, (PgWin *)&v2->vfptr, 0, 0);
    v27 = EditWin::CreateWin(
            iLeft,
            iTop,
            v26->m_akHitTester.m_pBase->m_pObject->m_uiWidth,
            v26->m_akHitTester.m_pBase->m_pObject->m_uiHeight,
            (PgWin *)&v2->vfptr,
            PASSWD,
            8u,
            1u,
            1,
            0,
            1);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spEdit[2], (NiD3DDefaultShader *)v27);
    EditWin::SetImeStatus(v2->m_spEdit[2].m_pObject, IS_KOREAN);
    v28 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextField06", &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft, iTop, v28, (PgWin *)&v2->vfptr, 0, 0);
    v29 = EditWin::CreateWin(
            iLeft,
            iTop,
            v28->m_akHitTester.m_pBase->m_pObject->m_uiWidth,
            v28->m_akHitTester.m_pBase->m_pObject->m_uiHeight,
            (PgWin *)&v2->vfptr,
            MULTILINE,
            0x64u,
            1u,
            1,
            0,
            1);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spEdit[3], (NiD3DDefaultShader *)v29);
    EditWin::SetImeStatus(v2->m_spEdit[3].m_pObject, IS_KOREAN);
    v30 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &iLeft, &iTop, 0)->m_akHitTester.m_pBase;
    v31 = v30->m_pObject->m_uiHeight;
    v32 = v30->m_pObject->m_uiWidth;
    v33 = Font::Get(MAIN_MENU);
    v34 = PgWinText::CreateWin(iLeft, iTop, v32, v31, v33, (PgWin *)&v2->vfptr, 0, 0);
    v34->vfptr[122].__vecDelDtor((NiRefObject *)v34, 5u);
    v35 = v34->vfptr;
    v36 = TextData2::Get(0x2218767Du);
    v35[118].__vecDelDtor((NiRefObject *)v34, (unsigned int)v36);
    v34->vfptr[60].__vecDelDtor((NiRefObject *)v34, 0);
    v37 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text02", &iLeft, &iTop, 0)->m_akHitTester.m_pBase->m_pObject;
    v38 = v37->m_uiHeight;
    v39 = v37->m_uiWidth;
    v40 = Font::Get(MAIN_MENU);
    v41 = PgWinText::CreateWin(iLeft, iTop, v39, v38, v40, (PgWin *)&v2->vfptr, 0, 0);
    v41->vfptr[122].__vecDelDtor((NiRefObject *)v41, 5u);
    v42 = v41->vfptr;
    v43 = TextData2::Get(0x9DAEF6E1);
    v42[118].__vecDelDtor((NiRefObject *)v41, (unsigned int)v43);
    v41->vfptr[60].__vecDelDtor((NiRefObject *)v41, 0);
    v44 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text03", &iLeft, &iTop, 0)->m_akHitTester.m_pBase;
    v45 = v44->m_pObject->m_uiHeight;
    v46 = v44->m_pObject->m_uiWidth;
    v47 = Font::Get(MAIN_MENU);
    v48 = PgWinText::CreateWin(iLeft, iTop, v46, v45, v47, (PgWin *)&v2->vfptr, 0, 0);
    v48->vfptr[122].__vecDelDtor((NiRefObject *)v48, 5u);
    v49 = v48->vfptr;
    v50 = TextData::Get(0xA7F6EEE4);
    v49[118].__vecDelDtor((NiRefObject *)v48, (unsigned int)v50);
    v48->vfptr[60].__vecDelDtor((NiRefObject *)v48, 0);
    v51 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text04", &iLeft, &iTop, 0)->m_akHitTester.m_pBase->m_pObject;
    v52 = v51->m_uiHeight;
    v53 = v51->m_uiWidth;
    v54 = Font::Get(MAIN_MENU);
    v55 = PgWinText::CreateWin(iLeft, iTop, v53, v52, v54, (PgWin *)&v2->vfptr, 0, 0);
    v55->vfptr[122].__vecDelDtor((NiRefObject *)v55, 5u);
    v56 = v55->vfptr;
    v57 = TextData2::Get(0x7EC0BBE2u);
    v56[118].__vecDelDtor((NiRefObject *)v55, (unsigned int)v57);
    v55->vfptr[60].__vecDelDtor((NiRefObject *)v55, 0);
    v58 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text05", &iLeft, &iTop, 0)->m_akHitTester.m_pBase;
    v59 = v58->m_pObject->m_uiHeight;
    v60 = v58->m_pObject->m_uiWidth;
    v61 = Font::Get(MAIN_MENU);
    v62 = PgWinText::CreateWin(iLeft, iTop, v60, v59, v61, (PgWin *)&v2->vfptr, 0, 0);
    v62->vfptr[122].__vecDelDtor((NiRefObject *)v62, 5u);
    v63 = v62->vfptr;
    v64 = TextData2::Get(0xEA563B2F);
    v63[118].__vecDelDtor((NiRefObject *)v62, (unsigned int)v64);
    v62->vfptr[60].__vecDelDtor((NiRefObject *)v62, 0);
    v65 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text02_1", &iLeft, &iTop, 0)->m_akHitTester.m_pBase->m_pObject;
    v66 = v65->m_uiHeight;
    v67 = v65->m_uiWidth;
    v68 = Font::Get(MAIN_MENU);
    v69 = PgWinText::CreateWin(iLeft, iTop, v67, v66, v68, (PgWin *)&v2->vfptr, 0, 0);
    v69->vfptr[122].__vecDelDtor((NiRefObject *)v69, 5u);
    v70 = v69->vfptr;
    v71 = TextData2::Get(0x725F917Bu);
    v70[118].__vecDelDtor((NiRefObject *)v69, (unsigned int)v71);
    v69->vfptr[60].__vecDelDtor((NiRefObject *)v69, 0);
    v72 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text05_1", &iLeft, &iTop, 0)->m_akHitTester.m_pBase;
    v73 = v72->m_pObject->m_uiHeight;
    v74 = v72->m_pObject->m_uiWidth;
    v75 = Font::Get(MAIN_MENU);
    v76 = PgWinText::CreateWin(iLeft, iTop, v74, v73, v75, (PgWin *)&v2->vfptr, 0, 0);
    v76->vfptr[122].__vecDelDtor((NiRefObject *)v76, 5u);
    v77 = v76->vfptr;
    v78 = TextData2::Get(0x725F917Bu);
    v77[118].__vecDelDtor((NiRefObject *)v76, (unsigned int)v78);
    v76->vfptr[60].__vecDelDtor((NiRefObject *)v76, 0);
    v79 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text06", &iLeft, &iTop, 0)->m_akHitTester.m_pBase->m_pObject;
    v80 = v79->m_uiHeight;
    v81 = v79->m_uiWidth;
    v82 = Font::Get(MAIN_MENU);
    v83 = PgWinText::CreateWin(iLeft, iTop, v81, v80, v82, (PgWin *)&v2->vfptr, 0, 0);
    v83->vfptr[122].__vecDelDtor((NiRefObject *)v83, 5u);
    v84 = v83->vfptr;
    v85 = TextData::Get(0x9798BBB1);
    v84[118].__vecDelDtor((NiRefObject *)v83, (unsigned int)v85);
    v83->vfptr[60].__vecDelDtor((NiRefObject *)v83, 0);
    v86 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "OKBtnNor", &iLeft, &iTop, 0);
    PgSprData::Add(v86, (NiAVObject *)&spNode.m_pObject->vfptr, "OKBTNClick");
    PgSprData::Add(v86, (NiAVObject *)&spNode.m_pObject->vfptr, "OKBtnOver");
    PgWinBut::CreateWin(iLeft, iTop, v86, (PgWin *)&v2->vfptr, 0, 0, 0);
    v87 = v86->m_akHitTester.m_pBase;
    v88 = v87->m_pObject->m_uiHeight;
    v89 = v87->m_pObject->m_uiWidth;
    v90 = Font::Get(MAIN_MENU);
    v91 = PgWinText::CreateWin(iLeft, iTop, v89, v88, v90, (PgWin *)&v2->vfptr, 0, 0);
    v91->vfptr[122].__vecDelDtor((NiRefObject *)v91, 5u);
    v92 = v91->vfptr;
    v93 = TextData::Get(0x4F5F499Fu);
    v92[118].__vecDelDtor((NiRefObject *)v91, (unsigned int)v93);
    v91->vfptr[60].__vecDelDtor((NiRefObject *)v91, 0);
    v91->vfptr[64].__vecDelDtor((NiRefObject *)v91, 1u);
    v94 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CancelBtnNor", &iLeft, &iTop, 0);
    PgSprData::Add(v94, (NiAVObject *)&spNode.m_pObject->vfptr, "CancelBTNClick");
    PgSprData::Add(v94, (NiAVObject *)&spNode.m_pObject->vfptr, "CancelBtnOver");
    PgWinBut::CreateWin(iLeft, iTop, v94, (PgWin *)&v2->vfptr, 1u, 0, 0);
    v95 = v94->m_akHitTester.m_pBase;
    v96 = v95->m_pObject->m_uiHeight;
    v97 = v95->m_pObject->m_uiWidth;
    v98 = Font::Get(MAIN_MENU);
    v99 = PgWinText::CreateWin(iLeft, iTop, v97, v96, v98, (PgWin *)&v2->vfptr, 0, 0);
    v99->vfptr[122].__vecDelDtor((NiRefObject *)v99, 5u);
    v100 = v99->vfptr;
    v101 = TextData::Get(0x88B298A0);
    v100[118].__vecDelDtor((NiRefObject *)v99, (unsigned int)v101);
    v99->vfptr[60].__vecDelDtor((NiRefObject *)v99, 0);
    v102 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &iLeft, &iTop, 0);
    PgSprData::Add(v102, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
    PgSprData::Add(v102, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
    PgWinBut::CreateWin(iLeft, iTop, v102, (PgWin *)&v2->vfptr, 1u, 0, 0);
    v103 = MenuTexMgr::GetTexture(4u);
    if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
    {
      v104 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &iLeft, &iTop, v103);
      PgSprData::Add(v104, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
      PgSprData::Add(v104, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
      PgWinBut::CreateWin(iLeft, iTop, v104, (PgWin *)&v2->vfptr, 4u, 0, 0);
    }
    v105 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text02Nor", &iLeft, &iTop, 0);
    PgSprData::Add(v105, (NiAVObject *)&spNode.m_pObject->vfptr, "Text02Click");
    v106 = ColumnBut::CreateWin(iLeft, iTop, v105, (PgWin *)&v2->vfptr, 2u, 0);
    v107 = spNode.m_pObject;
    v2->m_spCheckBox[0] = v106;
    v108 = PgSprData::Create((NiAVObject *)&v107->vfptr, "Text05Nor", &iLeft, &iTop, 0);
    PgSprData::Add(v108, (NiAVObject *)&spNode.m_pObject->vfptr, "Text05Click");
    v2->m_spCheckBox[1] = ColumnBut::CreateWin(iLeft, iTop, v108, (PgWin *)&v2->vfptr, 3u, 0);
    v2->m_spCheckBox[0]->m_bCheck = 0;
    v2->m_spCheckBox[1]->m_bCheck = 0;
    ((void (__thiscall *)(mhJoinWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    ((void (__stdcall *)(const char *))v2->m_spEdit[1].m_pObject->vfptr[115].__vecDelDtor)("2");
    v115 = -1;
    if ( spNode.m_pObject )
    {
      v109 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v109 )
          v109->vfptr->__vecDelDtor((NiRefObject *)v109, 1u);
      }
    }
    result = 1;
  }
  else
  {
    v10 = spNode.m_pObject;
    v115 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v10 )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006D3E10) --------------------------------------------------------
void __thiscall mhJoinWin::OnCommand(mhJoinWin *this, unsigned int wParam, int lParam)
{
  mhJoinWin *v3; // esi@1
  ColumnBut *v4; // eax@7
  GameFrameWork *v5; // eax@12

  v3 = this;
  switch ( wParam )
  {
    case 1u:
      GameFrameWork::OnCloseMHConfigRoomInfoWin((GameFrameWork *)this->m_pkFrameWork);
      break;
    case 0u:
      if ( this->m_spCheckBox[0]->m_bCheck == 1
        && !strlen((const char *)((int (*)(void))this->m_spEdit[2].m_pObject->vfptr[113].__vecDelDtor)()) )
      {
        mhJoinWin::CheckEnable(v3, 0, v3->m_spCheckBox[0]->m_bCheck == 0);
      }
      PgFrameWork::AddMsg(v3->m_pkFrameWork, 0xC9u, 0, 0);
      break;
    case 2u:
      ((void (*)(void))this->m_spEdit[2].m_pObject->vfptr[117].__vecDelDtor)();
      v4 = v3->m_spCheckBox[0];
      LOBYTE(wParam) = v4->m_bCheck == 0;
      v4->m_bCheck = wParam;
      if ( !(_BYTE)wParam )
        ((void (__stdcall *)(_DWORD))v3->m_spEdit[2].m_pObject->vfptr[121].__vecDelDtor)(1);
      ((void (__stdcall *)(_DWORD))v3->m_spEdit[2].m_pObject->vfptr[60].__vecDelDtor)(wParam);
      ((void (__stdcall *)(_DWORD))v3->m_spEdit[2].m_pObject->vfptr[64].__vecDelDtor)(wParam);
      if ( v3->m_spCheckBox[0]->m_bCheck == 1 )
        PgFrameWork::AddMsg(v3->m_pkFrameWork, 0xDFu, 0, 0);
      break;
    case 3u:
      this->m_spCheckBox[1]->m_bCheck = this->m_spCheckBox[1]->m_bCheck == 0;
      break;
    case 4u:
      v5 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v5 )
        GameFrameWork::OpenPlayGuideSearchList(v5, "MiniHomeEntrance");
      break;
    default:
      return;
  }
}

//----- (006D3F90) --------------------------------------------------------
void __thiscall mhJoinWin::OnShowWin(mhJoinWin *this)
{
  mhJoinWin *v1; // esi@1
  NiUnsharedGeometryGroup *v2; // eax@1

  v1 = this;
  v2 = TextData2::Get(0xECF6DCD4);
  ((void (__stdcall *)(_DWORD))v1->m_spEdit[3].m_pObject->vfptr[115].__vecDelDtor)(v2);
}

//----- (006D3FC0) --------------------------------------------------------
void __thiscall mhJoinWin::mhJoinWin(mhJoinWin *this)
{
  mhJoinWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&mhJoinWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&mhJoinWin::`vftable'{for `IDirectMessenger'};
  `eh vector constructor iterator'(
    v1->m_spEdit,
    4u,
    4,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
}
// 9C1474: using guessed type void (__thiscall *mhJoinWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C1494: using guessed type int (__thiscall *mhJoinWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006D4040) --------------------------------------------------------
mhJoinWin *__cdecl mhJoinWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  mhJoinWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x170u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    LOBYTE(v6) = 1;
    v2->vfptr = (NiRefObjectVtbl *)&mhJoinWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&mhJoinWin::`vftable'{for `IDirectMessenger'};
    `eh vector constructor iterator'(
      v2[1].m_kLocal.m_Rotate.m_pEntry[1],
      4u,
      4,
      (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
      (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (mhJoinWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9C1474: using guessed type void (__thiscall *mhJoinWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C1494: using guessed type int (__thiscall *mhJoinWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006D41A0) --------------------------------------------------------
mhJoinWin *__thiscall mhJoinWin::`vector deleting destructor'(mhJoinWin *this, unsigned int a2)
{
  mhJoinWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&mhJoinWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhJoinWin::`vftable'{for `IDirectMessenger'};
  `eh vector destructor iterator'(
    this->m_spEdit,
    4u,
    4,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C1474: using guessed type void (__thiscall *mhJoinWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C1494: using guessed type int (__thiscall *mhJoinWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006D4230) --------------------------------------------------------
void __thiscall mhMinimizeWin::mhMinimizeWin(mhMinimizeWin *this)
{
  mhMinimizeWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&mhMinimizeWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&mhMinimizeWin::`vftable'{for `IDirectMessenger'};
  v1->m_bAutoOnOff = 0;
}
// 9C1734: using guessed type void (__thiscall *mhMinimizeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C1754: using guessed type int (__thiscall *mhMinimizeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006D4260) --------------------------------------------------------
void __thiscall mhMinimizeWin::~mhMinimizeWin(mhMinimizeWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&mhMinimizeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhMinimizeWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9C1734: using guessed type void (__thiscall *mhMinimizeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C1754: using guessed type int (__thiscall *mhMinimizeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006D4280) --------------------------------------------------------
void __thiscall mhMinimizeWin::OnCommand(mhMinimizeWin *this, unsigned int wParam, int lParam)
{
  if ( !wParam )
    PgFrameWork::AddMsg(this->m_pkFrameWork, 0xE1u, 0, 0);
}

//----- (006D42B0) --------------------------------------------------------
char __thiscall mhMinimizeWin::Create(mhMinimizeWin *this, PgFrameWork *pkFrameWork)
{
  mhMinimizeWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiNode *v5; // eax@3
  NiNode *v6; // esi@7
  char result; // al@10
  PgSprData *v8; // edi@11
  PgWinBut *v9; // edi@11
  char *v10; // eax@11
  NiNode *v11; // esi@12
  int iLeft; // [sp+14h] [bp-18h]@11
  int iTop; // [sp+18h] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+1Ch] [bp-10h]@1
  int v15; // [sp+28h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v15 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\MyHomeMinButton.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = spNode.m_pObject;
  if ( spNode.m_pObject )
  {
    v2->m_pkFrameWork = pkFrameWork;
    v8 = PgSprData::Create((NiAVObject *)&v5->vfptr, "MyHomeBtnNor", &iLeft, &iTop, 0);
    PgSprData::Add(v8, (NiAVObject *)&spNode.m_pObject->vfptr, "MyHomeBtnClick");
    PgSprData::Add(v8, (NiAVObject *)&spNode.m_pObject->vfptr, "MyHomeBtnOver");
    v9 = PgWinBut::CreateWin(0, 0, v8, (PgWin *)&v2->vfptr, 0, 0, 0);
    v9->m_pkToolTipWin = g_pkToolTipWin;
    v10 = (char *)TextData2::Get(0xD7F9364E);
    PgWin::SetToolTipWinText((PgWin *)&v9->vfptr, v10);
    ((void (__thiscall *)(mhMinimizeWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.89999998,
      0.30000001);
    v15 = -1;
    if ( spNode.m_pObject )
    {
      v11 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v11 )
          v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
      }
    }
    result = 1;
  }
  else
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("Game\\MyHomeMinButton.nif load fail", "LoadFail", spNode.m_pObject);
      v5 = spNode.m_pObject;
    }
    v15 = -1;
    if ( v5 )
    {
      v6 = v5;
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    result = 0;
  }
  return result;
}
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006D4470) --------------------------------------------------------
mhMinimizeWin *__cdecl mhMinimizeWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  mhMinimizeWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x15Cu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&mhMinimizeWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&mhMinimizeWin::`vftable'{for `IDirectMessenger'};
    LOBYTE(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (mhMinimizeWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9C1734: using guessed type void (__thiscall *mhMinimizeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C1754: using guessed type int (__thiscall *mhMinimizeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006D45C0) --------------------------------------------------------
mhMinimizeWin *__thiscall mhMinimizeWin::`vector deleting destructor'(mhMinimizeWin *this, unsigned int a2)
{
  mhMinimizeWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&mhMinimizeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhMinimizeWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C1734: using guessed type void (__thiscall *mhMinimizeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C1754: using guessed type int (__thiscall *mhMinimizeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006D4600) --------------------------------------------------------
void __thiscall mhMouseControlWin::mhMouseControlWin(mhMouseControlWin *this)
{
  mhMouseControlWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_bCtrlDown = 0;
  v1->vfptr = (NiRefObjectVtbl *)&mhMouseControlWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&mhMouseControlWin::`vftable'{for `IDirectMessenger'};
  v1->m_Btns[0] = 0;
  v1->m_Btns[1] = 0;
  v1->m_Btns[2] = 0;
  v1->m_Btns[3] = 0;
  v1->m_Btns[4] = 0;
  v1->m_Btns[5] = 0;
}
// 9C1A04: using guessed type void (__thiscall *mhMouseControlWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C1A24: using guessed type int (__thiscall *mhMouseControlWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006D4650) --------------------------------------------------------
void __thiscall mhMouseControlWin::~mhMouseControlWin(mhMouseControlWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&mhMouseControlWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhMouseControlWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9C1A04: using guessed type void (__thiscall *mhMouseControlWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C1A24: using guessed type int (__thiscall *mhMouseControlWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006D4680) --------------------------------------------------------
void __userpurge mhMouseControlWin::ShowBtn(mhMouseControlWin *this@<ecx>, int a2@<ebx>, mhMouseControlWin::BtnIndex eBtn, int b)
{
  mhMouseControlWin::BtnIndex v4; // eax@1
  mhMouseControlWin *v5; // esi@1
  PgWinSpr *v6; // ecx@4
  PgWinSpr *v7; // ecx@5

  v4 = eBtn;
  v5 = this;
  while ( 2 )
  {
    switch ( v4 )
    {
      case 10:
        mhMouseControlWin::ShowBtn(v5, AllLeft, b);
        mhMouseControlWin::ShowBtn(v5, AllRight, b);
        v4 = 9;
        continue;
      case 0:
        ((void (__stdcall *)(int, int))v5->m_Btns[0]->vfptr[64].__vecDelDtor)(b, a2);
        v6 = v5->m_Btns[1];
        goto LABEL_10;
      case 1:
        ((void (__stdcall *)(int, int))v5->m_Btns[1]->vfptr[64].__vecDelDtor)(b, a2);
        v7 = v5->m_Btns[0];
        goto LABEL_6;
      case 2:
        ((void (__stdcall *)(int, int))v5->m_Btns[2]->vfptr[64].__vecDelDtor)(b, a2);
        v6 = v5->m_Btns[3];
        goto LABEL_10;
      case 3:
        ((void (__stdcall *)(int, int))v5->m_Btns[3]->vfptr[64].__vecDelDtor)(b, a2);
        v7 = v5->m_Btns[2];
        goto LABEL_6;
      case 4:
        ((void (__stdcall *)(int, int))v5->m_Btns[4]->vfptr[64].__vecDelDtor)(b, a2);
        v6 = v5->m_Btns[5];
LABEL_10:
        ((void (__cdecl *)(_DWORD))v6->vfptr[64].__vecDelDtor)((_BYTE)b == 0);
        break;
      case 5:
        ((void (__stdcall *)(int, int))v5->m_Btns[5]->vfptr[64].__vecDelDtor)(b, a2);
        v7 = v5->m_Btns[4];
LABEL_6:
        ((void (__cdecl *)(_DWORD))v7->vfptr[64].__vecDelDtor)((_BYTE)b == 0);
        break;
      case 7:
        ((void (__stdcall *)(int))v5->m_Btns[0]->vfptr[64].__vecDelDtor)(b);
        ((void (__stdcall *)(int))v5->m_Btns[1]->vfptr[64].__vecDelDtor)(b);
        break;
      case 8:
        ((void (__stdcall *)(int))v5->m_Btns[2]->vfptr[64].__vecDelDtor)(b);
        ((void (__stdcall *)(int))v5->m_Btns[3]->vfptr[64].__vecDelDtor)(b);
        break;
      case 9:
        ((void (__stdcall *)(int))v5->m_Btns[4]->vfptr[64].__vecDelDtor)(b);
        ((void (__stdcall *)(int))v5->m_Btns[5]->vfptr[64].__vecDelDtor)(b);
        break;
      default:
        return;
    }
    break;
  }
}

//----- (006D4830) --------------------------------------------------------
unsigned int __thiscall mhMouseControlWin::GetCenterX(mhMouseControlWin *this)
{
  mhMouseControlWin *v1; // esi@1
  unsigned int result; // eax@2
  unsigned int y1; // [sp+4h] [bp-10h]@2
  unsigned int y; // [sp+8h] [bp-Ch]@2
  unsigned int x; // [sp+Ch] [bp-8h]@2
  unsigned int x1; // [sp+10h] [bp-4h]@2

  v1 = this;
  if ( this->m_Btns[0] )
  {
    ((void (__stdcall *)(unsigned int *, unsigned int *))this->m_Btns[0]->vfptr[40].__vecDelDtor)(&x, &y);
    ((void (__stdcall *)(unsigned int *, unsigned int *))v1->m_Btns[4]->vfptr[40].__vecDelDtor)(&x1, &y1);
    result = (x1 >> 1) + x - 5;
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (006D4890) --------------------------------------------------------
unsigned int __thiscall mhMouseControlWin::GetCenterY(mhMouseControlWin *this)
{
  unsigned int result; // eax@3
  unsigned int x; // [sp+0h] [bp-8h]@2
  unsigned int y; // [sp+4h] [bp-4h]@2

  if ( this->m_Btns[0]
    && (((void (__stdcall *)(unsigned int *, unsigned int *))this->m_Btns[0]->vfptr[40].__vecDelDtor)(&x, &y), y) )
  {
    result = y >> 1;
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (006D48D0) --------------------------------------------------------
void __usercall mhMouseControlWin::OnShowWin(mhMouseControlWin *this@<ecx>, int a2@<ebx>)
{
  mhMouseControlWin *v2; // esi@1
  tagPOINT kPoint; // [sp+4h] [bp-8h]@1

  v2 = this;
  GetCursorPos(&kPoint);
  v2->vfptr[43].__vecDelDtor((NiRefObject *)v2, kPoint.x);
  v2->vfptr[44].__vecDelDtor((NiRefObject *)v2, kPoint.y);
  v2->m_bCtrlDown = 0;
  mhMouseControlWin::ShowBtn(v2, a2, AllLeft, 0);
  mhMouseControlWin::ShowBtn(v2, a2, AllRight, 0);
  mhMouseControlWin::ShowBtn(v2, a2, CtrlNormal, 1);
}

//----- (006D4930) --------------------------------------------------------
void __usercall mhMouseControlWin::OnClose(mhMouseControlWin *this@<ecx>, int a2@<ebx>)
{
  mhMouseControlWin::ShowBtn(this, a2, All, 0);
}

//----- (006D4940) --------------------------------------------------------
void __userpurge mhMouseControlWin::UpdateMeWin(mhMouseControlWin *this@<ecx>, int a2@<ebx>, float fCurTime)
{
  mhMouseControlWin *v3; // esi@1
  char v4; // al@3

  v3 = this;
  if ( this->m_bCtrlDown )
  {
    if ( fCurTime > fOldtime + 0.300000011920929 )
    {
      v4 = ((int (*)(void))this->m_Btns[4]->vfptr[65].__vecDelDtor)();
      mhMouseControlWin::ShowBtn(v3, a2, CtrlNormal, v4 == 0);
      fOldtime = fCurTime;
    }
  }
}

//----- (006D49A0) --------------------------------------------------------
char __thiscall mhMouseControlWin::Create(mhMouseControlWin *this, PgFrameWork *pkFrameWork)
{
  mhMouseControlWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiNode *v5; // eax@3
  NiNode *v6; // esi@7
  char result; // al@10
  PgSprData *v8; // eax@11
  PgSprData *v9; // eax@11
  PgWinSpr *v10; // eax@11
  NiNode *v11; // edx@11
  PgSprData *v12; // eax@11
  PgWinSpr *v13; // eax@11
  NiNode *v14; // ecx@11
  PgSprData *v15; // eax@11
  PgSprData *v16; // eax@11
  PgWinSpr *v17; // eax@11
  NiNode *v18; // edx@11
  PgSprData *v19; // eax@11
  NiNode *v20; // esi@12
  NiPointer<NiNode> spNode; // [sp+Ch] [bp-18h]@1
  int iLeft; // [sp+10h] [bp-14h]@11
  int iTop; // [sp+14h] [bp-10h]@11
  int v24; // [sp+20h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v24 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\MyHomeMouseControl.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = spNode.m_pObject;
  if ( spNode.m_pObject )
  {
    v2->m_pkFrameWork = pkFrameWork;
    v8 = PgSprData::Create((NiAVObject *)&v5->vfptr, "TurnL", &iLeft, &iTop, 0);
    v2->m_Btns[0] = PgWinSpr::CreateWin(iLeft, iTop, v8, (PgWin *)&v2->vfptr, 0, 0);
    v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TurnLClick", &iLeft, &iTop, 0);
    v10 = PgWinSpr::CreateWin(iLeft, iTop, v9, (PgWin *)&v2->vfptr, 0, 0);
    v11 = spNode.m_pObject;
    v2->m_Btns[1] = v10;
    v12 = PgSprData::Create((NiAVObject *)&v11->vfptr, "TurnR", &iLeft, &iTop, 0);
    v13 = PgWinSpr::CreateWin(iLeft, iTop, v12, (PgWin *)&v2->vfptr, 0, 0);
    v14 = spNode.m_pObject;
    v2->m_Btns[2] = v13;
    v15 = PgSprData::Create((NiAVObject *)&v14->vfptr, "TurnRClick", &iLeft, &iTop, 0);
    v2->m_Btns[3] = PgWinSpr::CreateWin(iLeft, iTop, v15, (PgWin *)&v2->vfptr, 0, 0);
    v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CtrlNor", &iLeft, &iTop, 0);
    v17 = PgWinSpr::CreateWin(iLeft, iTop, v16, (PgWin *)&v2->vfptr, 0, 0);
    v18 = spNode.m_pObject;
    v2->m_Btns[4] = v17;
    v19 = PgSprData::Create((NiAVObject *)&v18->vfptr, "CtrlClick", &iLeft, &iTop, 0);
    v2->m_Btns[5] = PgWinSpr::CreateWin(iLeft, iTop, v19, (PgWin *)&v2->vfptr, 0, 0);
    v24 = -1;
    if ( spNode.m_pObject )
    {
      v20 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v20 )
          v20->vfptr->__vecDelDtor((NiRefObject *)v20, 1u);
      }
    }
    result = 1;
  }
  else
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("Game\\MyHomeMouseControl.nif load fail", "LoadFail", spNode.m_pObject);
      v5 = spNode.m_pObject;
    }
    v24 = -1;
    if ( v5 )
    {
      v6 = v5;
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    result = 0;
  }
  return result;
}
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006D4BF0) --------------------------------------------------------
mhMouseControlWin *__cdecl mhMouseControlWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  mhMouseControlWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x174u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&mhMouseControlWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&mhMouseControlWin::`vftable'{for `IDirectMessenger'};
    LOBYTE(v2[1].m_kLocal.m_Rotate.m_pEntry[2][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[2][0]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (mhMouseControlWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9C1A04: using guessed type void (__thiscall *mhMouseControlWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C1A24: using guessed type int (__thiscall *mhMouseControlWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006D4D60) --------------------------------------------------------
mhMouseControlWin *__thiscall mhMouseControlWin::`vector deleting destructor'(mhMouseControlWin *this, unsigned int a2)
{
  mhMouseControlWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&mhMouseControlWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhMouseControlWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C1A04: using guessed type void (__thiscall *mhMouseControlWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C1A24: using guessed type int (__thiscall *mhMouseControlWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006D4DA0) --------------------------------------------------------
void __thiscall mhPortalListWin::ShowComponent(mhPortalListWin *this, int b)
{
  char *v2; // esi@1
  signed int v3; // ebx@1

  v2 = (char *)this->m_Text;
  v3 = 2;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v2 - 2) + 256))(b);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 256))(b);
    v2 += 4;
    --v3;
  }
  while ( v3 );
}

//----- (006D4DF0) --------------------------------------------------------
void mhPortalListWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "MiniHomePortalList");
}

//----- (006D4E20) --------------------------------------------------------
tm *__usercall localtime_2@<eax>(const int *_Time@<eax>)
{
  return _localtime32(_Time);
}

//----- (006D4E30) --------------------------------------------------------
void __thiscall mhPortalListWin::UpdateMeWin(mhPortalListWin *this, float fCurTime)
{
  mhPortalListWin *v2; // edi@1
  PgFrameWork *v3; // esi@2

  v2 = this;
  if ( g_pkKeyboard->m_aucKeystate[0] & 2 )
  {
    v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( PgWin::IsVisible((PgWin *)&v2->vfptr) )
    {
      BYTE3(v3[73].m_kMsgQ.m_uiAlloced) = 0;
      PgFrameWork::AddMsg(v3, 0xE0u, 0, 0);
    }
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (006D4E80) --------------------------------------------------------
void __thiscall mhPortalListWin::OnShowWin(mhPortalListWin *this)
{
  if ( unk_A9943C == 2 )
    mhPortalListWin::ShowComponent(this, 1);
  else
    mhPortalListWin::ShowComponent(this, 0);
}

//----- (006D4EA0) --------------------------------------------------------
void __thiscall mhPortalListWin::OnChangeTab(mhPortalListWin *this, DirectUserMsgBody_MHInfoTabChanged::TabEnum eTab)
{
  bool v2; // zf@1
  char *v3; // esi@1
  DirectUserMsgBody_MHInfoTabChanged kBody; // [sp+4h] [bp-4h]@1

  *(_BYTE *)(*((_DWORD *)this->m_pkHouseTabList._Myfirst + 3) + 380) = 0;
  v2 = this->m_pkMsgHooker == 0;
  v3 = (char *)&this->vfptr;
  kBody.eChanged = eTab;
  if ( !v2 )
  {
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))this->m_pkMsgHooker->vfptr->SendDirectMessage)(62, &kBody, v3);
    if ( *((_DWORD *)v3 + 1) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v3 + 1) + 20))(62, &kBody, v3);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v3 + 20))(v3, 62, &kBody, v3);
}

//----- (006D4F10) --------------------------------------------------------
char __thiscall mhPortalListWin::SetData(mhPortalListWin *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *Name, int Column)
{
  const char *v3; // esi@1
  mhPortalListWin *v4; // edi@1
  const char *v5; // eax@2

  v3 = (const char *)Name;
  v4 = this;
  if ( Name->_Myres < 0x10 )
    v5 = (const char *)Name;
  else
    v5 = Name->_Bx._Ptr;
  if ( SlideListWin::SetText(this->m_PortalNameList, Column, 0, v5) != 1 )
  {
    if ( Name->_Myres >= 0x10 )
      v3 = Name->_Bx._Ptr;
    SlideListWin::AddText(v4->m_PortalNameList, v3);
  }
  return 1;
}

//----- (006D4F60) --------------------------------------------------------
signed __int16 __thiscall mhPortalListWin::GetID(mhPortalListWin *this, int iSlideListIndex)
{
  mhPortalListWin *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v3; // ebx@1
  int v4; // esi@3
  int v5; // edi@3
  int *v6; // eax@5
  int v7; // esi@6
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v8; // ecx@9
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v9; // eax@10
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *i; // eax@13
  signed __int16 result; // ax@18
  mhPortalListWin *v12; // [sp+Ch] [bp-4h]@1
  const char *pItemStr; // [sp+18h] [bp+8h]@1

  v2 = this;
  v3 = this->m_mapPortalInfo._Myhead->_Left;
  v12 = this;
  pItemStr = SlideListWin::GetText(this->m_PortalNameList, iSlideListIndex, 0);
  if ( pItemStr && v3 != v2->m_mapPortalInfo._Myhead )
  {
    while ( 1 )
    {
      v4 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      v5 = v3->_Myval.first;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v5) )
      {
        if ( (unsigned __int16)v5 <= *(_WORD *)(v4 + 200) )
        {
          v6 = (int *)(*(_DWORD *)(v4 + 196) + 4 * v5);
          if ( *v6 )
          {
            v7 = *v6;
            if ( *v6 )
            {
              if ( !strcmp((const char *)(v7 + 34), pItemStr) )
                break;
            }
          }
        }
      }
      if ( !v3->_Isnil )
      {
        v8 = v3->_Right;
        if ( v8->_Isnil )
        {
          for ( i = v3->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v3 != i->_Right )
              break;
            v3 = i;
          }
          v3 = i;
        }
        else
        {
          v9 = v8->_Left;
          if ( !v8->_Left->_Isnil )
          {
            do
            {
              v8 = v9;
              v9 = v9->_Left;
            }
            while ( !v9->_Isnil );
          }
          v3 = v8;
        }
      }
      if ( v3 == v12->m_mapPortalInfo._Myhead )
        goto LABEL_18;
    }
    result = *(_WORD *)v7;
  }
  else
  {
LABEL_18:
    result = -1;
  }
  return result;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (006D5080) --------------------------------------------------------
void __thiscall mhPortalListWin::SetToolTipText(mhPortalListWin *this, int column, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *ItemName)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v4; // ecx@2
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v5; // eax@2
  int v6; // edi@3
  int v7; // esi@3
  int *v8; // eax@5
  int v9; // eax@6
  unsigned int v10; // esi@7
  unsigned int v11; // edi@9
  unsigned int v12; // ecx@9
  const char *v13; // eax@11
  int v14; // eax@13
  bool v15; // zf@13
  signed int v16; // eax@15
  bool v17; // bl@18
  char *v18; // ST1C_4@25
  char *v19; // eax@26
  char *v20; // ST1C_4@26
  tm DelTime; // [sp+10h] [bp-78h]@26
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v22; // [sp+34h] [bp-54h]@1
  mhPortalListWin *v23; // [sp+38h] [bp-50h]@1
  PORTAL_INFO pInfo; // [sp+3Ch] [bp-4Ch]@2
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > itr; // [sp+44h] [bp-44h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v26; // [sp+48h] [bp-40h]@7
  char acDeleteDate[20]; // [sp+64h] [bp-24h]@26
  int v28; // [sp+84h] [bp-4h]@18

  v3 = ItemName;
  v15 = ItemName->_Mysize == 0;
  v23 = this;
  v22 = ItemName;
  if ( !v15 )
  {
    v4 = this->m_mapPortalInfo._Myhead;
    *(_DWORD *)&pInfo.nPortalItemID = 0;
    HIWORD(pInfo.dEndTime) = 0;
    v5 = v4->_Left;
    itr._Ptr = v5;
    if ( v5 == v4 )
    {
LABEL_24:
      if ( pInfo.dEndTime )
      {
        qmemcpy(&DelTime, _localtime32(&pInfo.dEndTime), sizeof(DelTime));
        *(_DWORD *)&acDeleteDate[1] = 0;
        *(_DWORD *)&acDeleteDate[5] = 0;
        *(_DWORD *)&acDeleteDate[9] = 0;
        *(_DWORD *)&acDeleteDate[13] = 0;
        *(_WORD *)&acDeleteDate[17] = 0;
        acDeleteDate[19] = 0;
        acDeleteDate[0] = 0;
        sprintf(
          acDeleteDate,
          "%04d.%02d.%02d %02d:%02d",
          DelTime.tm_year + 1900,
          DelTime.tm_mon + 1,
          DelTime.tm_mday,
          DelTime.tm_hour,
          DelTime.tm_min);
        v19 = (char *)TextData::Get(0x7ACAD1D9u);
        v20 = fs(v19, acDeleteDate);
        SlideListWin::SetToolTipWinText(v23->m_PortalNameList, column, v20);
      }
      else
      {
        v18 = (char *)TextData2::Get(0x3F4F363Au);
        SlideListWin::SetToolTipWinText(v23->m_PortalNameList, column, v18);
      }
    }
    else
    {
      while ( 1 )
      {
        v6 = v5->_Myval.first;
        v7 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
        if ( !(unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                               + 16))(
                                 ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                                 v6) )
          break;
        if ( (unsigned __int16)v6 > *(_WORD *)(v7 + 200) )
          break;
        v8 = (int *)(*(_DWORD *)(v7 + 196) + 4 * v6);
        if ( !*v8 )
          break;
        v9 = *v8;
        if ( !v9 )
          break;
        v26._Myres = 15;
        v26._Mysize = 0;
        v26._Bx._Buf[0] = 0;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &v26,
          (const char *)(v9 + 34),
          strlen((const char *)(v9 + 34)));
        v10 = v3->_Mysize;
        if ( v3->_Myres >= 0x10 )
          v3 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v3->_Bx._Ptr;
        v11 = v26._Mysize;
        v12 = v26._Mysize;
        if ( v26._Mysize >= v10 )
          v12 = v10;
        v13 = v26._Bx._Ptr;
        if ( v26._Myres < 0x10 )
          v13 = (const char *)&v26;
        v14 = std::char_traits<char>::compare(v13, v3->_Bx._Buf, v12);
        v15 = v14 == 0;
        if ( !v14 )
        {
          if ( v11 >= v10 )
            v16 = v11 != v10;
          else
            v16 = -1;
          v15 = v16 == 0;
        }
        v17 = v15;
        v28 = -1;
        if ( v26._Myres >= 0x10 )
          operator delete(v26._Bx._Ptr);
        v26._Myres = 15;
        v26._Mysize = 0;
        v26._Bx._Buf[0] = 0;
        if ( v17 )
        {
          pInfo.dEndTime = itr._Ptr->_Myval.second;
          pInfo.nPortalItemID = itr._Ptr->_Myval.first;
          goto LABEL_24;
        }
        std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const,int>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&itr);
        v5 = itr._Ptr;
        if ( itr._Ptr == v23->m_mapPortalInfo._Myhead )
          goto LABEL_24;
        v3 = v22;
      }
    }
  }
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (006D52D0) --------------------------------------------------------
void __thiscall mhPortalListWin::RefreshSlideBar(mhPortalListWin *this)
{
  mhPortalListWin *v1; // esi@1
  int v2; // edi@1
  int v3; // ebx@1
  char *v4; // eax@3
  int nMaxCount; // [sp+10h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > ItemName; // [sp+14h] [bp-2Ch]@3
  int v7; // [sp+3Ch] [bp-4h]@3

  v1 = this;
  SlideBar::SetSplitCnt(this->m_pkSlideBarPortalList, this->m_PortalNameList->m_nSlideSplitCnt);
  v1->m_PortalNameList->m_nViewStartPos = v1->m_pkSlideBarPortalList->m_nCurPos;
  v2 = 0;
  v3 = v1->m_PortalNameList->m_vecButList._Mylast - v1->m_PortalNameList->m_vecButList._Myfirst;
  nMaxCount = v3;
  if ( v3 >= 0 )
  {
    do
    {
      if ( SlideListWin::GetText(v1->m_PortalNameList, v2 + v1->m_PortalNameList->m_nViewStartPos, 0) )
      {
        v4 = SlideListWin::GetText(v1->m_PortalNameList, v2 + v1->m_PortalNameList->m_nViewStartPos, 0);
        ItemName._Myres = 15;
        ItemName._Mysize = 0;
        ItemName._Bx._Buf[0] = 0;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&ItemName, v4, strlen(v4));
        v7 = 0;
        mhPortalListWin::SetToolTipText(v1, v2, &ItemName);
        v7 = -1;
        if ( ItemName._Myres >= 0x10 )
          operator delete(ItemName._Bx._Ptr);
        ItemName._Mysize = 0;
        ItemName._Bx._Buf[0] = 0;
        v3 = nMaxCount;
        ItemName._Myres = 15;
      }
      ++v2;
    }
    while ( v2 <= v3 );
  }
  SlideListWin::UpdateViewList(v1->m_PortalNameList);
}

//----- (006D5420) --------------------------------------------------------
void __thiscall mhPortalListWin::Refresh(mhPortalListWin *this)
{
  mhPortalListWin *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node **v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v3; // ebx@1
  int v4; // esi@2
  int v5; // edi@2
  int *v6; // eax@4
  int v7; // eax@5
  const char *v8; // eax@6
  const char *v9; // eax@9
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v10; // ecx@16
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v11; // eax@17
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *i; // eax@20
  int Column; // [sp+10h] [bp-34h]@1
  mhPortalListWin *v14; // [sp+14h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v15; // [sp+18h] [bp-2Ch]@6
  int v16; // [sp+40h] [bp-4h]@6

  v1 = this;
  v14 = this;
  SlideListWin::RemoveAllList(this->m_PortalNameList);
  v2 = &v1->m_mapPortalInfo._Myhead->_Left;
  v3 = *v2;
  Column = 0;
  if ( (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node **)*v2 != v2 )
  {
    do
    {
      v4 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      v5 = v3->_Myval.first;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v5) )
      {
        if ( (unsigned __int16)v5 <= *(_WORD *)(v4 + 200) )
        {
          v6 = (int *)(*(_DWORD *)(v4 + 196) + 4 * v5);
          if ( *v6 )
          {
            v7 = *v6;
            if ( v7 )
            {
              v15._Myres = 15;
              v15._Mysize = 0;
              v15._Bx._Buf[0] = 0;
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                &v15,
                (const char *)(v7 + 34),
                strlen((const char *)(v7 + 34)));
              v8 = v15._Bx._Ptr;
              v16 = 0;
              if ( v15._Myres < 0x10 )
                v8 = (const char *)&v15;
              if ( SlideListWin::SetText(v14->m_PortalNameList, Column, 0, v8) != 1 )
              {
                v9 = v15._Bx._Ptr;
                if ( v15._Myres < 0x10 )
                  v9 = (const char *)&v15;
                SlideListWin::AddText(v14->m_PortalNameList, v9);
              }
              v16 = -1;
              if ( v15._Myres >= 0x10 )
                operator delete(v15._Bx._Ptr);
              ++Column;
              v15._Myres = 15;
              v15._Mysize = 0;
              v15._Bx._Buf[0] = 0;
            }
          }
        }
      }
      if ( !v3->_Isnil )
      {
        v10 = v3->_Right;
        if ( v10->_Isnil )
        {
          for ( i = v3->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v3 != i->_Right )
              break;
            v3 = i;
          }
          v3 = i;
        }
        else
        {
          v11 = v10->_Left;
          if ( !v10->_Left->_Isnil )
          {
            do
            {
              v10 = v11;
              v11 = v11->_Left;
            }
            while ( !v11->_Isnil );
          }
          v3 = v10;
        }
      }
    }
    while ( v3 != v14->m_mapPortalInfo._Myhead );
    v1 = v14;
  }
  SlideListWin::UpdateViewList(v1->m_PortalNameList);
  mhPortalListWin::RefreshSlideBar(v1);
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (006D55E0) --------------------------------------------------------
void __thiscall mhPortalListWin::~mhPortalListWin(mhPortalListWin *this)
{
  mhPortalListWin *v1; // esi@1
  ColumnBut **v2; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v3; // ST08_4@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v4; // ST04_4@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > result; // [sp+Ch] [bp-18h]@3
  std::map<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> > > *v6; // [sp+10h] [bp-14h]@3
  mhPortalListWin *v7; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v1 = this;
  v7 = this;
  this->vfptr = (NiRefObjectVtbl *)&mhPortalListWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhPortalListWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_pkHouseTabList._Myfirst;
  v8 = 0;
  if ( v2 )
    operator delete(v2);
  v1->m_pkHouseTabList._Myfirst = 0;
  v1->m_pkHouseTabList._Mylast = 0;
  v1->m_pkHouseTabList._Myend = 0;
  v6 = &v1->m_mapPortalInfo;
  v3._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapPortalInfo._Myhead;
  v4._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_mapPortalInfo._Myhead->_Left;
  LOBYTE(v8) = 1;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_mapPortalInfo,
    &result,
    v4,
    v3);
  operator delete(v1->m_mapPortalInfo._Myhead);
  v8 = -1;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9C1E68: using guessed type void (__thiscall *mhPortalListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C1E84: using guessed type int (__thiscall *mhPortalListWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006D5690) --------------------------------------------------------
void __thiscall mhPortalListWin::OnCommand(mhPortalListWin *this, unsigned int wParam, int lParam)
{
  mhPortalListWin *v3; // esi@1
  PgFrameWork *v4; // edi@9
  int v5; // eax@9
  signed __int16 v6; // ax@9
  PgFrameWork *v7; // ecx@10
  PgFrameWork *v8; // edi@11
  int v9; // eax@11
  signed __int16 v10; // ax@11

  v3 = this;
  switch ( wParam )
  {
    case 0u:
      mhPortalListWin::OnChangeTab(this, 0);
      break;
    case 1u:
      mhPortalListWin::OnChangeTab(this, TE_GUEST_BOOK);
      break;
    case 2u:
      mhPortalListWin::OnChangeTab(this, TE_EDIT_ROOM);
      break;
    case 3u:
      mhPortalListWin::OnChangeTab(this, TE_PORTAL_LIST);
      break;
    case 4u:
      mhPortalListWin::OnChangeTab(this, TE_SETTING);
      break;
    case 5u:
      mhPortalListWin::OnChangeTab(this, TE_OUT);
      break;
    case 6u:
      mhPortalListWin::RefreshSlideBar(this);
      break;
    case 9u:
      v4 = this->m_pkFrameWork;
      v5 = SlideListWin::GetCurSelIndex(this->m_PortalNameList);
      v6 = mhPortalListWin::GetID(v3, v5);
      GameFrameWork::SendMHPortalOpenReq(v6);
      break;
    case 0xAu:
      v7 = this->m_pkFrameWork;
      GameFrameWork::SendMHPortalCloseReq();
      break;
    case 0xBu:
      v8 = this->m_pkFrameWork;
      v9 = SlideListWin::GetCurSelIndex(this->m_PortalNameList);
      v10 = mhPortalListWin::GetID(v3, v9);
      GameFrameWork::SendMHPortalDelReq(v10);
      break;
    case 0xCu:
      PgFrameWork::AddMsg(this->m_pkFrameWork, 0xE0u, 0, 0);
      break;
    case 0xDu:
      mhPortalListWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (006D57D0) --------------------------------------------------------
char __thiscall mhPortalListWin::Add(mhPortalListWin *this, PORTAL_INFO Info)
{
  mhPortalListWin *v2; // edi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *v3; // eax@1
  char result; // al@2
  std::pair<unsigned short,long> pairNewElement; // [sp+8h] [bp-8h]@1

  v2 = this;
  pairNewElement.second = Info.dEndTime;
  pairNewElement.first = Info.nPortalItemID;
  v3 = std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,unsigned long>>,0>>::_Buynode<std::pair<unsigned short const,unsigned long>>(
         (std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)&this->m_mapPortalInfo,
         (std::pair<unsigned short const ,unsigned long> *)&pairNewElement);
  std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *)&v2->m_mapPortalInfo,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > >,bool> *)&pairNewElement,
    v3,
    0);
  if ( LOBYTE(pairNewElement.second) )
  {
    mhPortalListWin::Refresh(v2);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006D5830) --------------------------------------------------------
char __thiscall mhPortalListWin::Delete(mhPortalListWin *this, unsigned __int16 ID)
{
  mhPortalListWin *v2; // esi@1
  char result; // al@2
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > itResult; // [sp+8h] [bp-4h]@1

  v2 = this;
  std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,long>>,0>>::find(
    (std::_Tree<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > *)&this->m_mapPortalInfo,
    (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,stMINIHOUSEINFO *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,stMINIHOUSEINFO *> >,0> > > *)&itResult,
    &ID);
  if ( itResult._Ptr == v2->m_mapPortalInfo._Myhead )
  {
    result = 0;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
      (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)&v2->m_mapPortalInfo.comp,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > *)&ID,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > >)itResult._Ptr);
    mhPortalListWin::Refresh(v2);
    result = 1;
  }
  return result;
}

//----- (006D5890) --------------------------------------------------------
void __thiscall mhPortalListWin::mhPortalListWin(mhPortalListWin *this)
{
  mhPortalListWin *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v2; // eax@1
  std::exception pExceptionObject; // [sp+Ch] [bp-20h]@3
  mhPortalListWin *v4; // [sp+18h] [bp-14h]@1
  char *_What; // [sp+1Ch] [bp-10h]@3
  int v6; // [sp+28h] [bp-4h]@1

  v1 = this;
  v4 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&mhPortalListWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&mhPortalListWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkSlideBarPortalList = 0;
  v1->m_PortalNameList = 0;
  v6 = 0;
  v1->m_mapPortalInfo._Mysize = 0;
  v2 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)operator new(0x18u);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_mapPortalInfo._Myhead = v2;
  v2->_Left = v2;
  v1->m_mapPortalInfo._Myhead->_Parent = v1->m_mapPortalInfo._Myhead;
  v1->m_mapPortalInfo._Myhead->_Right = v1->m_mapPortalInfo._Myhead;
  v1->m_mapPortalInfo._Myhead->_Color = 1;
  v1->m_mapPortalInfo._Myhead->_Isnil = 1;
  v1->m_pkHouseTabList._Myfirst = 0;
  v1->m_pkHouseTabList._Mylast = 0;
  v1->m_pkHouseTabList._Myend = 0;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9C1E68: using guessed type void (__thiscall *mhPortalListWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C1E84: using guessed type int (__thiscall *mhPortalListWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006D5970) --------------------------------------------------------
mhPortalListWin *__cdecl mhPortalListWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  mhPortalListWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x190u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    mhPortalListWin::mhPortalListWin((mhPortalListWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (mhPortalListWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (006D5AA0) --------------------------------------------------------
char __thiscall mhPortalListWin::Create(mhPortalListWin *this, PgFrameWork *pkFrameWork)
{
  mhPortalListWin *v2; // esi@1
  const char *v3; // eax@3
  NiNode *v4; // eax@3
  NiNode *v5; // esi@7
  LONG v6; // eax@7
  char result; // al@11
  PgSprData *v8; // eax@12
  NiNode *v9; // esi@13
  int v10; // edi@18
  NiSourceTexture *v11; // eax@18
  PgSprData *v12; // eax@19
  PgSprData *v13; // eax@21
  PgSprData *v14; // eax@21
  PgSprData *v15; // eax@21
  PgSprData *v16; // eax@21
  PgFont *v17; // eax@24
  PgWinText *v18; // edi@24
  NiUnsharedGeometryGroup *v19; // eax@24
  NiUnsharedGeometryGroup *v20; // edi@24
  NiUnsharedGeometryGroup *v21; // edi@24
  NiUnsharedGeometryGroup *v22; // edi@24
  NiUnsharedGeometryGroup *v23; // edi@24
  NiUnsharedGeometryGroup *v24; // edi@24
  NiUnsharedGeometryGroup *v25; // edi@24
  unsigned int v26; // edi@24
  const char *v27; // eax@25
  const char *v28; // eax@27
  char *v29; // eax@29
  ColumnBut *v30; // edi@31
  SLWCreateInfo::Item *v31; // edi@32
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *v32; // edi@32
  SLWCreateInfo::Item *v33; // edi@38
  PgSprData *v34; // eax@40
  SlideListWin *v35; // eax@40
  PgSprData *v36; // eax@40
  SlideBar *v37; // eax@40
  SlideBar *v38; // edi@40
  void *(__thiscall *v39)(NiRefObject *, unsigned int); // edx@40
  SlideBar *v40; // ecx@40
  int v41; // eax@40
  int v42; // eax@40
  PgSprData *v43; // edi@40
  NiPointer<PgSprData::PgHitTester> *v44; // edx@40
  unsigned int v45; // edi@40
  PgFont *v46; // eax@40
  PgWinText *v47; // eax@40
  NiRefObjectVtbl *v48; // edi@40
  NiUnsharedGeometryGroup *v49; // eax@40
  PgSprData *v50; // edi@40
  NiPointer<PgSprData::PgHitTester> *v51; // ecx@40
  unsigned int v52; // edi@40
  PgFont *v53; // eax@40
  PgWinText *v54; // eax@40
  NiRefObjectVtbl *v55; // edi@40
  NiUnsharedGeometryGroup *v56; // eax@40
  PgSprData *v57; // edi@40
  NiSourceTexture *v58; // edi@40
  PgSprData *v59; // edi@41
  NiNode *v60; // esi@46
  unsigned int uiHeight; // [sp+10h] [bp-138h]@21
  unsigned int uiWidth; // [sp+14h] [bp-134h]@21
  SLWCreateInfo kCreateInfo; // [sp+18h] [bp-130h]@32
  char *pcText; // [sp+34h] [bp-114h]@24
  unsigned int v65; // [sp+38h] [bp-110h]@25
  int iYOff; // [sp+3Ch] [bp-10Ch]@1
  int iTop; // [sp+40h] [bp-108h]@12
  int iLeft; // [sp+44h] [bp-104h]@12
  NiPointer<NiNode> spNode; // [sp+48h] [bp-100h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strName; // [sp+4Ch] [bp-FCh]@24
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+68h] [bp-E0h]@32
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > pkToolTipText[6]; // [sp+84h] [bp-C4h]@24
  char acNum[12]; // [sp+12Ch] [bp-1Ch]@24
  int v74; // [sp+144h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v74 = 0;
  iYOff = (int)pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v3 = Folder::Merge(&Folder::m_acMenu, "Game\\MiniHomePortalList.nif");
  PgUtil::LoadNodeNifFile(v3, &spNode, (NiTexturePalette *)iYOff);
  v4 = spNode.m_pObject;
  if ( !spNode.m_pObject )
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("Game\\MiniHomePortalList.nif load fail", "LoadFail", 0);
      v4 = spNode.m_pObject;
    }
    v74 = -1;
    if ( !v4 )
      return 0;
    v5 = v4;
    v6 = InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount);
    goto LABEL_8;
  }
  v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iLeft, &iTop, 0);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v8, 0, pkFrameWork, "mhPortalListWin", 0) )
  {
    v10 = iLeft;
    iYOff = iTop;
    v11 = MenuTexMgr::GetTexture(0x13u);
    if ( v11 )
      v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, v11);
    else
      v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft - v10, iTop - iYOff, v12, (PgWin *)&v2->vfptr, 0, 0);
    v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft, iTop, v13, (PgWin *)&v2->vfptr, 0, 0);
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft, iTop, v14, (PgWin *)&v2->vfptr, 0, 0);
    v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel03", &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft, iTop, v15, (PgWin *)&v2->vfptr, 0, 0);
    v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel04", &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft, iTop, v16, (PgWin *)&v2->vfptr, 0, 0);
    if ( !PgUtil::GetTriShapeRect(
            (NiAVObject *)&spNode.m_pObject->vfptr,
            "WinTitle",
            &iLeft,
            &iTop,
            &uiWidth,
            &uiHeight) )
    {
      v5 = spNode.m_pObject;
      v74 = -1;
      if ( !spNode.m_pObject )
        return 0;
      v6 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
LABEL_8:
      if ( !v6 )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
      return 0;
    }
    v17 = Font::Get(MAIN_MENU);
    v18 = PgWinText::CreateWin(iLeft, iTop, uiWidth, uiHeight, v17, (PgWin *)&v2->vfptr, 0, 0);
    v18->vfptr[122].__vecDelDtor((NiRefObject *)v18, 1u);
    v18->vfptr[117].__vecDelDtor((NiRefObject *)v18, (unsigned int)&Color::m_kDxWinTitleColor);
    iYOff = (int)&v18->vfptr[118];
    v19 = TextData2::Get(0xD7F24143);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))iYOff)(v18, v19);
    v18->vfptr[60].__vecDelDtor((NiRefObject *)v18, 0);
    strName._Myres = 15;
    strName._Mysize = 0;
    strName._Bx._Buf[0] = 0;
    LOBYTE(v74) = 1;
    strcpy(acNum, "0");
    *(_DWORD *)&acNum[2] = 0;
    *(_DWORD *)&acNum[6] = 0;
    *(_WORD *)&acNum[10] = 0;
    v20 = TextData2::Get(0x9BA8F7E2);
    pkToolTipText[0]._Myres = 15;
    pkToolTipText[0]._Mysize = 0;
    pkToolTipText[0]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      pkToolTipText,
      (const char *)v20,
      strlen((const char *)v20));
    LOBYTE(v74) = 2;
    v21 = TextData2::Get(0x4C494A23u);
    pkToolTipText[1]._Myres = 15;
    pkToolTipText[1]._Mysize = 0;
    pkToolTipText[1]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &pkToolTipText[1],
      (const char *)v21,
      strlen((const char *)v21));
    LOBYTE(v74) = 3;
    v22 = TextData2::Get(0xE6EC4424);
    pkToolTipText[2]._Myres = 15;
    pkToolTipText[2]._Mysize = 0;
    pkToolTipText[2]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &pkToolTipText[2],
      (const char *)v22,
      strlen((const char *)v22));
    LOBYTE(v74) = 4;
    v23 = TextData2::Get(0xD7F24143);
    pkToolTipText[3]._Myres = 15;
    pkToolTipText[3]._Mysize = 0;
    pkToolTipText[3]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &pkToolTipText[3],
      (const char *)v23,
      strlen((const char *)v23));
    LOBYTE(v74) = 5;
    v24 = TextData2::Get(0xDEE82F0D);
    pkToolTipText[4]._Myres = 15;
    pkToolTipText[4]._Mysize = 0;
    pkToolTipText[4]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &pkToolTipText[4],
      (const char *)v24,
      strlen((const char *)v24));
    LOBYTE(v74) = 6;
    v25 = TextData2::Get(0xFA4A423F);
    pkToolTipText[5]._Myres = 15;
    pkToolTipText[5]._Mysize = 0;
    pkToolTipText[5]._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &pkToolTipText[5],
      (const char *)v25,
      strlen((const char *)v25));
    LOBYTE(v74) = 7;
    v26 = 0;
    pcText = (char *)pkToolTipText;
    do
    {
      v65 = v26 + 1;
      _itoa(v26 + 1, acNum, 10);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strName, "BtnNor0", 7u);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strName, acNum, strlen(acNum));
      v27 = strName._Bx._Ptr;
      if ( strName._Myres < 0x10 )
        v27 = (const char *)&strName;
      iYOff = (int)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, v27, &iLeft, &iTop, 0);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strName, "BtnOver0", 8u);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strName, acNum, strlen(acNum));
      v28 = strName._Bx._Ptr;
      if ( strName._Myres < 0x10 )
        v28 = (const char *)&strName;
      PgSprData::Add((PgSprData *)iYOff, (NiAVObject *)&spNode.m_pObject->vfptr, v28);
      iYOff = (int)ColumnBut::CreateWin(iLeft, iTop, (PgSprData *)iYOff, (PgWin *)&v2->vfptr, v26, 0);
      std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
        (std::vector<unsigned long,std::allocator<unsigned long> > *)&v2->m_pkHouseTabList,
        (const unsigned int *)&iYOff);
      v29 = pcText;
      if ( *((_DWORD *)pcText + 5) >= 0x10u )
        v29 = *(char **)pcText;
      PgWin::SetToolTipWinText((PgWin *)&v2->m_pkHouseTabList._Myfirst[v26]->vfptr, v29);
      v30 = v2->m_pkHouseTabList._Myfirst[v26];
      pcText += 28;
      v30->m_pkToolTipWin = g_pkToolTipWin;
      v26 = v65;
    }
    while ( v65 < 6 );
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v2->m_pkHouseTabList._Myfirst + 1) + 240))(0);
    kCreateInfo.m_arrItem._Myfirst = 0;
    kCreateInfo.m_arrItem._Mylast = 0;
    kCreateInfo.m_arrItem._Myend = 0;
    kCreateInfo.m_bMakeData = 0;
    kCreateInfo.m_nOffX = 0;
    kCreateInfo.m_nOffY = 0;
    LOBYTE(v74) = 8;
    v31 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
    v31->nItemType = 1;
    v31->pNode = spNode.m_pObject;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarNor", 0xCu);
    v32 = &v31->vecNodeName;
    LOBYTE(v74) = 9;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      v32,
      &_Val);
    LOBYTE(v74) = 8;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarClick", 0xEu);
    LOBYTE(v74) = 10;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      v32,
      &_Val);
    LOBYTE(v74) = 8;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarOver", 0xDu);
    LOBYTE(v74) = 11;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      v32,
      &_Val);
    LOBYTE(v74) = 8;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    v33 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    v33->nItemType = 2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column01", 8u);
    LOBYTE(v74) = 12;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      &v33->vecNodeName,
      &_Val);
    LOBYTE(v74) = 8;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    v33->pNode = spNode.m_pObject;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
    v34 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ColumnBox", &iLeft, &iTop, 0);
    v35 = SlideListWin::CreateWin(iLeft, iTop, v34, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
    v2->m_PortalNameList = v35;
    v35->m_uiRClickMsg = 7;
    SlideListWin::AddText(v2->m_PortalNameList, byte_9C1C69);
    SlideListWin::SetCurSelIndex(v2->m_PortalNameList, 0);
    v2->m_PortalNameList->m_nViewStartPos = 0;
    SlideListWin::SetToolTipWin(v2->m_PortalNameList, g_pkToolTipWin);
    SlideListWin::UpdateViewList(v2->m_PortalNameList);
    v36 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle", &iLeft, &iTop, 0);
    v37 = SlideBar::CreateWin(
            spNode.m_pObject,
            "SlideBar",
            "SlideBar_UpBtn",
            "SlideBar_DnBtn",
            v36,
            0,
            (PgWin *)&v2->vfptr);
    v2->m_pkSlideBarPortalList = v37;
    v37->m_uiClickMsg = 6;
    v2->m_pkSlideBarPortalList->m_eType = 1;
    v38 = v2->m_pkSlideBarPortalList;
    v39 = v2->m_pkSlideBarPortalList->vfptr[42].__vecDelDtor;
    v40 = v2->m_pkSlideBarPortalList;
    v65 = (unsigned int)v2->m_pkSlideBarPortalList->vfptr;
    v41 = ((int (__thiscall *)(SlideBar *))v39)(v40);
    v42 = (int)v38->vfptr[41].__vecDelDtor((NiRefObject *)v38, v41);
    (*(void (__thiscall **)(SlideBar *, int))(v65 + 308))(v2->m_pkSlideBarPortalList, v42);
    SlideBar::SetSplitCnt(v2->m_pkSlideBarPortalList, v2->m_PortalNameList->m_nSlideSplitCnt);
    v43 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "OKBtnNor", &iLeft, &iTop, 0);
    PgSprData::Add(v43, (NiAVObject *)&spNode.m_pObject->vfptr, "OKBTNClick");
    PgSprData::Add(v43, (NiAVObject *)&spNode.m_pObject->vfptr, "OKBtnOver");
    v2->m_Btns[0] = PgWinBut::CreateWin(iLeft, iTop, v43, (PgWin *)&v2->vfptr, 9u, 0, 0);
    v44 = v43->m_akHitTester.m_pBase;
    v45 = v44->m_pObject->m_uiHeight;
    v65 = v44->m_pObject->m_uiWidth;
    v46 = Font::Get(MAIN_MENU);
    v47 = PgWinText::CreateWin(iLeft, iTop, v65, v45, v46, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_Text[0] = v47;
    v47->vfptr[122].__vecDelDtor((NiRefObject *)v47, 5u);
    v48 = v2->m_Text[0]->vfptr;
    v49 = TextData::Get(0x4F5F499Fu);
    v48[118].__vecDelDtor((NiRefObject *)v2->m_Text[0], (unsigned int)v49);
    ((void (__stdcall *)(_DWORD))v2->m_Text[0]->vfptr[60].__vecDelDtor)(0);
    v50 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CancelBtnNor", &iLeft, &iTop, 0);
    PgSprData::Add(v50, (NiAVObject *)&spNode.m_pObject->vfptr, "CancelBTNClick");
    PgSprData::Add(v50, (NiAVObject *)&spNode.m_pObject->vfptr, "CancelBtnOver");
    v2->m_Btns[1] = PgWinBut::CreateWin(iLeft, iTop, v50, (PgWin *)&v2->vfptr, 0xAu, 0, 0);
    v51 = v50->m_akHitTester.m_pBase;
    v52 = v51->m_pObject->m_uiHeight;
    v65 = v51->m_pObject->m_uiWidth;
    v53 = Font::Get(MAIN_MENU);
    v54 = PgWinText::CreateWin(iLeft, iTop, v65, v52, v53, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_Text[1] = v54;
    v54->vfptr[122].__vecDelDtor((NiRefObject *)v54, 5u);
    v55 = v2->m_Text[1]->vfptr;
    v56 = TextData::Get(0x88B298A0);
    v55[118].__vecDelDtor((NiRefObject *)v2->m_Text[1], (unsigned int)v56);
    ((void (__stdcall *)(_DWORD))v2->m_Text[1]->vfptr[60].__vecDelDtor)(0);
    v57 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &iLeft, &iTop, 0);
    PgSprData::Add(v57, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
    PgSprData::Add(v57, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
    PgWinBut::CreateWin(iLeft, iTop, v57, (PgWin *)&v2->vfptr, 0xCu, 0, 0);
    v58 = MenuTexMgr::GetTexture(4u);
    if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
    {
      v59 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &iLeft, &iTop, v58);
      PgSprData::Add(v59, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
      PgSprData::Add(v59, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
      PgWinBut::CreateWin(iLeft, iTop, v59, (PgWin *)&v2->vfptr, 0xDu, 0, 0);
    }
    v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
    LOBYTE(v74) = 7;
    if ( kCreateInfo.m_arrItem._Myfirst )
    {
      std::_Destroy_range<std::allocator<boost::shared_ptr<SlideListWin::ListItem>>>(
        kCreateInfo.m_arrItem._Myfirst,
        kCreateInfo.m_arrItem._Mylast);
      operator delete(kCreateInfo.m_arrItem._Myfirst);
    }
    kCreateInfo.m_arrItem._Myfirst = 0;
    kCreateInfo.m_arrItem._Mylast = 0;
    kCreateInfo.m_arrItem._Myend = 0;
    LOBYTE(v74) = 1;
    `eh vector destructor iterator'(
      pkToolTipText,
      0x1Cu,
      6,
      (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
    if ( strName._Myres >= 0x10 )
      operator delete(strName._Bx._Ptr);
    v60 = spNode.m_pObject;
    strName._Myres = 15;
    strName._Mysize = 0;
    strName._Bx._Buf[0] = 0;
    v74 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v60 )
      v60->vfptr->__vecDelDtor((NiRefObject *)v60, 1u);
    result = 1;
  }
  else
  {
    v9 = spNode.m_pObject;
    v74 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v9 )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006D6830) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *_Node, bool _Leftish)
{
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *v4; // edx@1
  std::_Tree<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > *v5; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *v6; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *v7; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v8; // esi@1
  bool v9; // cl@1
  unsigned __int16 v10; // di@2
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *v11; // edi@10
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *v12; // edx@12
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> > >,bool> *v13; // eax@12
  std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *v14; // ecx@15
  bool _Addleft; // [sp+Ch] [bp-4h]@1

  v4 = _Node;
  v5 = this;
  v6 = this->_Myhead;
  v7 = v6->_Parent;
  v8 = (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)v6;
  v9 = 1;
  _Addleft = 1;
  if ( !v7->_Isnil )
  {
    v10 = _Node->_Myval.first;
    do
    {
      v8 = (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)v7;
      if ( _Leftish )
        v9 = v7->_Myval.first >= v10;
      else
        v9 = v10 < v7->_Myval.first;
      _Addleft = v9;
      if ( v9 )
        v7 = v7->_Left;
      else
        v7 = v7->_Right;
    }
    while ( !v7->_Isnil );
  }
  v11 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *)v8;
  *(_DWORD *)&_Leftish = v8;
  if ( v9 )
  {
    if ( (std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *)v8 == v5->_Myhead->_Left )
    {
      v12 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *)std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert((std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)v5, (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)&_Leftish, 1, v8, (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)_Node)->_Ptr;
      v13 = result;
      result->first._Ptr = v12;
      result->second = 1;
      return v13;
    }
    std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,GuildNameCache::GuildNameStorage *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,GuildNameCache::GuildNameStorage *>>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&_Leftish);
    v11 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *)_Leftish;
    v4 = _Node;
  }
  if ( v11->_Myval.first >= v4->_Myval.first )
  {
    operator delete(v4);
    v13 = result;
    result->first._Ptr = v11;
    result->second = 0;
  }
  else
  {
    v14 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,unsigned long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,unsigned long> >,0> >::_Node *)std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert((std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)v5, (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)&_Leftish, _Addleft, v8, (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)v4)->_Ptr;
    v13 = result;
    result->first._Ptr = v14;
    result->second = 1;
  }
  return v13;
}

//----- (006D6910) --------------------------------------------------------
mhPortalListWin *__thiscall mhPortalListWin::`vector deleting destructor'(mhPortalListWin *this, unsigned int a2)
{
  mhPortalListWin *v2; // esi@1

  v2 = this;
  mhPortalListWin::~mhPortalListWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006D6940) --------------------------------------------------------
void __thiscall mhRepairObjWin::mhRepairObjWin(mhRepairObjWin *this)
{
  mhRepairObjWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_tServerTimeStart = 0;
  v1->m_bRevServerTime = 0;
  v1->m_pkItemIconWin = 0;
  v1->vfptr = (NiRefObjectVtbl *)&mhRepairObjWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&mhRepairObjWin::`vftable'{for `IDirectMessenger'};
  *(_DWORD *)&v1->m_bSentPacket = -65536;
}
// 9C2204: using guessed type void (__thiscall *mhRepairObjWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C2224: using guessed type int (__thiscall *mhRepairObjWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006D6980) --------------------------------------------------------
void __thiscall mhRepairObjWin::~mhRepairObjWin(mhRepairObjWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&mhRepairObjWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhRepairObjWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9C2204: using guessed type void (__thiscall *mhRepairObjWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C2224: using guessed type int (__thiscall *mhRepairObjWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006D69A0) --------------------------------------------------------
void __thiscall mhRepairObjWin::UpdateTime(mhRepairObjWin *this, unsigned int tCount)
{
  if ( this->m_tServerTimeStart + 60000 < tCount && this->m_bRevServerTime == 1 )
  {
    this->m_tServerTime += 60;
    this->m_tServerTimeStart = tCount;
  }
}

//----- (006D69D0) --------------------------------------------------------
void __thiscall mhRepairObjWin::SetRepairObjID(mhRepairObjWin *this, unsigned __int16 ID)
{
  if ( !this->m_bSentPacket )
    this->m_ID = ID;
}

//----- (006D69F0) --------------------------------------------------------
void __thiscall mhRepairObjWin::SetRepairKitSlot(mhRepairObjWin *this, char bySlot)
{
  if ( !this->m_bSentPacket )
    this->m_nInvenSlot = bySlot;
}

//----- (006D6A10) --------------------------------------------------------
void __thiscall mhRepairObjWin::OnClose(mhRepairObjWin *this)
{
  if ( !this->m_bSentPacket )
  {
    this->m_nInvenSlot = 0;
    this->m_ID = -1;
  }
}

//----- (006D6A30) --------------------------------------------------------
void __thiscall mhRepairObjWin::RepairEnd(mhRepairObjWin *this)
{
  this->m_bSentPacket = 0;
}

//----- (006D6A40) --------------------------------------------------------
tm *__usercall localtime_3@<eax>(const int *_Time@<eax>)
{
  return _localtime32(_Time);
}

//----- (006D6A50) --------------------------------------------------------
int __usercall mktime_4@<eax>(tm *_Tm@<eax>)
{
  return _mktime32(_Tm);
}

//----- (006D6A60) --------------------------------------------------------
void __thiscall mhRepairObjWin::UpdateMeWin(mhRepairObjWin *this, float fCurTime)
{
  mhRepairObjWin *v2; // esi@1
  _DWORD *v3; // eax@2
  unsigned int v4; // ecx@3
  ItemIcon *v5; // ecx@4
  Item *v6; // edi@5
  Item *v7; // eax@5
  ItemInfoWin *v8; // ecx@7

  v2 = this;
  if ( (unsigned __int8)((int (__stdcall *)(unsigned int, int))this->m_pkItemIconWin->vfptr[83].__vecDelDtor)(
                          PgWin::ms_iMsX,
                          PgWin::ms_iMsY) )
  {
    v3 = v2->m_pkFrameWork[19].m_BackFrameID;
    if ( v3 )
    {
      v4 = v2->m_nInvenSlot;
      if ( v4 < 0xC0 )
      {
        v5 = (ItemIcon *)v3[v4 + 87];
        if ( v5 )
        {
          v6 = ItemIcon::GetItem(v5);
          v7 = Inventory::GetMHItemByObjID(&g_kInventory, v2->m_ID);
          if ( v6 )
          {
            if ( v7 )
            {
              v8 = (ItemInfoWin *)v2->m_pkItemIconWin->m_pkToolTipWin;
              if ( v8 )
                ItemInfoWin::SetItemInfo(v8, v7);
            }
          }
        }
      }
    }
  }
}

//----- (006D6AF0) --------------------------------------------------------
void __thiscall mhRepairObjWin::SetServerTime(mhRepairObjWin *this, int *pkKQ_Time)
{
  mhRepairObjWin *v2; // ST14_4@1
  const int *v3; // ebx@1
  tm t; // [sp+10h] [bp-28h]@1

  v2 = this;
  v3 = &this->m_tServerTime;
  this->m_tServerTime = *pkKQ_Time;
  qmemcpy(&t, _localtime32(&this->m_tServerTime), sizeof(t));
  this->m_tServerTimeStart = timeGetTime();
  v2->m_bRevServerTime = 1;
  t.tm_sec = 0;
  *v3 = _mktime32(&t);
  _localtime32(v3);
}

//----- (006D6B70) --------------------------------------------------------
char __thiscall mhRepairObjWin::Create(mhRepairObjWin *this, PgFrameWork *pkFrameWork)
{
  mhRepairObjWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiNode *v5; // eax@3
  NiNode *v6; // esi@7
  LONG v7; // eax@7
  char result; // al@11
  PgSprData *v9; // eax@12
  NiNode *v10; // esi@13
  NiSourceTexture *v11; // eax@18
  PgSprData *v12; // eax@19
  PgFont *v13; // eax@24
  PgWinText *v14; // edi@24
  NiRefObjectVtbl *v15; // ebx@24
  NiUnsharedGeometryGroup *v16; // eax@24
  NiSourceTexture *v17; // eax@24
  PgSprData *v18; // eax@24
  PgSprData *v19; // eax@24
  PgSprData *v20; // edi@24
  PgSprData *v21; // eax@24
  PgSprData *v22; // edi@24
  NiPointer<PgSprData::PgHitTester> *v23; // edx@24
  unsigned int v24; // edi@24
  unsigned int v25; // ebx@24
  PgFont *v26; // eax@24
  PgWinText *v27; // eax@24
  NiRefObjectVtbl *v28; // edi@24
  NiUnsharedGeometryGroup *v29; // eax@24
  PgSprData *v30; // edi@24
  NiPointer<PgSprData::PgHitTester> *v31; // ecx@24
  unsigned int v32; // edi@24
  unsigned int v33; // ebx@24
  PgFont *v34; // eax@24
  PgWinText *v35; // edi@24
  NiRefObjectVtbl *v36; // ebx@24
  NiUnsharedGeometryGroup *v37; // eax@24
  PgSprData::PgHitTester *v38; // eax@24
  unsigned int v39; // edi@24
  unsigned int v40; // ebx@24
  PgFont *v41; // eax@24
  PgWinText *v42; // edi@24
  NiRefObjectVtbl *v43; // ebx@24
  NiUnsharedGeometryGroup *v44; // eax@24
  NiPointer<PgSprData::PgHitTester> *v45; // ecx@24
  unsigned int v46; // edi@24
  unsigned int v47; // ebx@24
  PgFont *v48; // eax@24
  PgWinText *v49; // edi@24
  NiRefObjectVtbl *v50; // ebx@24
  NiUnsharedGeometryGroup *v51; // eax@24
  PgSprData::PgHitTester *v52; // eax@24
  unsigned int v53; // edi@24
  unsigned int v54; // ebx@24
  PgFont *v55; // eax@24
  PgWinText *v56; // eax@24
  NiPointer<PgSprData::PgHitTester> *v57; // ecx@24
  unsigned int v58; // edi@24
  unsigned int v59; // ebx@24
  PgFont *v60; // eax@24
  PgWinText *v61; // eax@24
  ItemIcon *v62; // eax@24
  NiNode *v63; // esi@25
  unsigned int uiWidth; // [sp+70h] [bp-28h]@21
  unsigned int uiHeight; // [sp+74h] [bp-24h]@21
  int iXOff; // [sp+78h] [bp-20h]@12
  int iYOff; // [sp+7Ch] [bp-1Ch]@12
  NiPointer<NiNode> spNode; // [sp+80h] [bp-18h]@1
  int iLeft; // [sp+84h] [bp-14h]@19
  int iTop; // [sp+88h] [bp-10h]@19
  int v71; // [sp+94h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v71 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\MyHomeRepairKit.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = spNode.m_pObject;
  if ( !spNode.m_pObject )
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("Game\\MyHomeRepairKit.nif load fail", "LoadFail", 0);
      v5 = spNode.m_pObject;
    }
    v71 = -1;
    if ( !v5 )
      return 0;
    v6 = v5;
    v7 = InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount);
    goto LABEL_8;
  }
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iXOff, &iYOff, 0);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "mhRepairObjWin", 0) )
  {
    v11 = MenuTexMgr::GetTexture(0x13u);
    if ( v11 )
      v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, v11);
    else
      v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft - iXOff, iTop - iYOff, v12, (PgWin *)&v2->vfptr, 0, 0);
    if ( !PgUtil::GetTriShapeRect(
            (NiAVObject *)&spNode.m_pObject->vfptr,
            "WinTitle",
            &iLeft,
            &iTop,
            &uiWidth,
            &uiHeight) )
    {
      v6 = spNode.m_pObject;
      v71 = -1;
      if ( !spNode.m_pObject )
        return 0;
      v7 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
LABEL_8:
      if ( !v7 )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
      return 0;
    }
    v13 = Font::Get(MAIN_MENU);
    v14 = PgWinText::CreateWin(iLeft, iTop - 8, uiWidth, uiHeight, v13, (PgWin *)&v2->vfptr, 0, 0);
    v14->vfptr[122].__vecDelDtor((NiRefObject *)v14, 1u);
    v14->vfptr[117].__vecDelDtor((NiRefObject *)v14, (unsigned int)&Color::m_kDxWinTitleColor);
    v15 = v14->vfptr;
    v16 = TextData2::Get(0xBCED2F29);
    v15[118].__vecDelDtor((NiRefObject *)v14, (unsigned int)v16);
    v14->vfptr[60].__vecDelDtor((NiRefObject *)v14, 0);
    v17 = MenuTexMgr::GetTexture(4u);
    v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &iLeft, &iTop, v17);
    PgWinSpr::CreateWin(iLeft - iXOff, iTop - iYOff, v18, (PgWin *)&v2->vfptr, 0, 0);
    v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane", &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft - iXOff, iTop - iYOff, v19, (PgWin *)&v2->vfptr, 0, 0);
    v20 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &iLeft, &iTop, 0);
    PgSprData::Add(v20, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
    PgSprData::Add(v20, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
    PgWinBut::CreateWin(iLeft - iXOff, iTop - iYOff, v20, (PgWin *)&v2->vfptr, 1u, 0, 0);
    v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iLeft, &iTop, 0);
    PgWinSpr::CreateWin(iLeft - iXOff, iTop - iYOff, v21, (PgWin *)&v2->vfptr, 0, 0);
    v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Nor", &iLeft, &iTop, 0);
    PgSprData::Add(v22, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
    PgSprData::Add(v22, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
    v2->m_pkOkBtn = PgWinBut::CreateWin(iLeft - iXOff, iTop - iYOff, v22, (PgWin *)&v2->vfptr, 0, 0, 0);
    v23 = v22->m_akHitTester.m_pBase;
    v24 = v23->m_pObject->m_uiHeight;
    v25 = v23->m_pObject->m_uiWidth;
    v26 = Font::Get(MAIN_MENU);
    v27 = PgWinText::CreateWin(iLeft - iXOff, iTop - iYOff, v25, v24, v26, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkOkText = v27;
    v27->vfptr[122].__vecDelDtor((NiRefObject *)v27, 5u);
    v28 = v2->m_pkOkText->vfptr;
    v29 = TextData2::Get(0x538ED2DDu);
    v28[118].__vecDelDtor((NiRefObject *)v2->m_pkOkText, (unsigned int)v29);
    ((void (__stdcall *)(_DWORD))v2->m_pkOkText->vfptr[60].__vecDelDtor)(0);
    v30 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Nor", &iLeft, &iTop, 0);
    PgSprData::Add(v30, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Click");
    PgSprData::Add(v30, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Over");
    PgWinBut::CreateWin(iLeft - iXOff, iTop - iYOff, v30, (PgWin *)&v2->vfptr, 1u, 0, 0);
    v31 = v30->m_akHitTester.m_pBase;
    v32 = v31->m_pObject->m_uiHeight;
    v33 = v31->m_pObject->m_uiWidth;
    v34 = Font::Get(MAIN_MENU);
    v35 = PgWinText::CreateWin(iLeft - iXOff, iTop - iYOff, v33, v32, v34, (PgWin *)&v2->vfptr, 0, 0);
    v35->vfptr[122].__vecDelDtor((NiRefObject *)v35, 5u);
    v36 = v35->vfptr;
    v37 = TextData::Get(0x88A297E1);
    v36[118].__vecDelDtor((NiRefObject *)v35, (unsigned int)v37);
    v35->vfptr[60].__vecDelDtor((NiRefObject *)v35, 0);
    v38 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text02", &iLeft, &iTop, 0)->m_akHitTester.m_pBase->m_pObject;
    v39 = v38->m_uiHeight;
    v40 = v38->m_uiWidth;
    v41 = Font::Get(MAIN_MENU);
    v42 = PgWinText::CreateWin(iLeft, iTop, v40, v39, v41, (PgWin *)&v2->vfptr, 0, 0);
    v42->vfptr[122].__vecDelDtor((NiRefObject *)v42, 5u);
    v43 = v42->vfptr;
    v44 = TextData2::Get(0x57819E74u);
    v43[118].__vecDelDtor((NiRefObject *)v42, (unsigned int)v44);
    v42->vfptr[60].__vecDelDtor((NiRefObject *)v42, 0);
    v45 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text03", &iLeft, &iTop, 0)->m_akHitTester.m_pBase;
    v46 = v45->m_pObject->m_uiHeight;
    v47 = v45->m_pObject->m_uiWidth;
    v48 = Font::Get(MAIN_MENU);
    v49 = PgWinText::CreateWin(iLeft, iTop, v47, v46, v48, (PgWin *)&v2->vfptr, 0, 0);
    v49->vfptr[122].__vecDelDtor((NiRefObject *)v49, 5u);
    v50 = v49->vfptr;
    v51 = TextData2::Get(0xD8B71D1A);
    v50[118].__vecDelDtor((NiRefObject *)v49, (unsigned int)v51);
    v49->vfptr[60].__vecDelDtor((NiRefObject *)v49, 0);
    v52 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextVal02", &iLeft, &iTop, 0)->m_akHitTester.m_pBase->m_pObject;
    v53 = v52->m_uiHeight;
    v54 = v52->m_uiWidth;
    v55 = Font::Get(MAIN_MENU);
    v56 = PgWinText::CreateWin(iLeft, iTop, v54, v53, v55, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkTextFieldWin[1] = v56;
    v56->vfptr[122].__vecDelDtor((NiRefObject *)v56, 5u);
    ((void (__stdcall *)(void *))v2->m_pkTextFieldWin[1]->vfptr[118].__vecDelDtor)(&unk_9C20BD);
    ((void (__stdcall *)(_DWORD))v2->m_pkTextFieldWin[1]->vfptr[60].__vecDelDtor)(0);
    v57 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextVal03", &iLeft, &iTop, 0)->m_akHitTester.m_pBase;
    v58 = v57->m_pObject->m_uiHeight;
    v59 = v57->m_pObject->m_uiWidth;
    v60 = Font::Get(MAIN_MENU);
    v61 = PgWinText::CreateWin(iLeft, iTop, v59, v58, v60, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_pkTextFieldWin[2] = v61;
    v61->vfptr[122].__vecDelDtor((NiRefObject *)v61, 5u);
    ((void (__stdcall *)(void *))v2->m_pkTextFieldWin[2]->vfptr[118].__vecDelDtor)(&unk_9C20BE);
    ((void (__stdcall *)(_DWORD))v2->m_pkTextFieldWin[2]->vfptr[60].__vecDelDtor)(0);
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "InvItemSlot001",
      &iLeft,
      &iTop,
      &uiWidth,
      &uiHeight);
    PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "InvItemSlot001", &iLeft, &iTop, 0);
    v62 = ItemIcon::CreateWin(iLeft, iTop, (PgWin *)&v2->vfptr);
    v2->m_pkItemIconWin = v62;
    v62->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
    ((void (__thiscall *)(mhRepairObjWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    v71 = -1;
    if ( spNode.m_pObject )
    {
      v63 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v63 )
          v63->vfptr->__vecDelDtor((NiRefObject *)v63, 1u);
      }
    }
    result = 1;
  }
  else
  {
    v10 = spNode.m_pObject;
    v71 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v10 )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006D7310) --------------------------------------------------------
void __thiscall mhRepairObjWin::DoRepair(mhRepairObjWin *this)
{
  mhRepairObjWin *v1; // esi@1
  _DWORD *v2; // eax@3
  Item *v3; // edx@3
  ChargedItemEffect *v4; // ebx@3
  MiniHouseEndure *v5; // edi@3
  ItemIcon *v6; // eax@5
  Item *v7; // ebx@6
  Item *v8; // eax@6
  ItemInfo *v9; // edi@8
  ItemInfo *v10; // eax@8
  MiniHouseFurniture *v11; // eax@10
  Item *v12; // eax@14
  char *v13; // eax@17
  MsgBox *v14; // eax@17
  PgFrameWork *v15; // ST00_4@17
  GameFrameWork *v16; // esi@19
  NiUnsharedGeometryGroup *v17; // eax@19
  Item *pkItem; // [sp+4h] [bp-1Ch]@6
  PgMsg::Frame kOkMsg; // [sp+8h] [bp-18h]@17

  v1 = this;
  LOBYTE(this) = this->m_nInvenSlot;
  if ( v1->m_ID == -1 )
  {
    GameFrameWork::OpenMHRepairWin((GameFrameWork *)v1->m_pkFrameWork, 0, 0);
    return;
  }
  v2 = v1->m_pkFrameWork[19].m_BackFrameID;
  v3 = 0;
  v4 = 0;
  v5 = 0;
  if ( v2 )
  {
    this = (mhRepairObjWin *)(unsigned __int8)this;
    if ( (unsigned __int8)this < 0xC0u )
    {
      v6 = (ItemIcon *)v2[(_DWORD)this + 87];
      if ( v6 )
      {
        v7 = ItemIcon::GetItem(v6);
        v8 = Inventory::GetMHItemByObjID(&g_kInventory, v1->m_ID);
        pkItem = v8;
        if ( !v7 )
          return;
        if ( !v8 )
          return;
        v9 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(v8->m_kStruct.itemid);
        v10 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(v7->m_kStruct.itemid);
        if ( !v9 )
          return;
        if ( !v10 )
          return;
        v4 = ChargedEffectTable::GetByInxName(v10->InxName);
        v11 = MiniHouseFuritureInfoTab::GetObjByName(v9->InxName);
        if ( !v11 )
          return;
        v5 = MiniHouseEndureInfoTable::GetByHandle(v11->KeepTime_Endure);
        if ( !v5 || !v4 )
          return;
        v3 = pkItem;
      }
    }
  }
  v12 = MiniHouseIndoor::GetEndureStep(v3, v1->m_tServerTime);
  if ( v12 == (Item *)100000 || v12 == (Item *)200000 )
  {
    v16 = (GameFrameWork *)v1->m_pkFrameWork;
    v17 = TextData2::Get(0x8240C3Au);
    GameFrameWork::AddSysMsg(v16, (const char *)v17);
  }
  else if ( (signed int)v12 + v4->EffectValue <= v5->Endure[0] )
  {
    PgFrameWork::AddMsg(v1->m_pkFrameWork, 0xEBu, 0, 0);
    v1->m_bSentPacket = 1;
  }
  else
  {
    v13 = (char *)TextData2::Get(0x768D99EDu);
    v14 = MsgBox::Modal(MSGBOX_OKCANCEL, v13);
    v15 = v1->m_pkFrameWork;
    kOkMsg.m_uiFrameMsg = 235;
    kOkMsg.m_uiFramelParam = 0;
    MsgBox::SetFrameWorkMsgOnClose(v14, v15, &kOkMsg, 0);
    v1->m_bSentPacket = 1;
  }
}

//----- (006D7510) --------------------------------------------------------
void __thiscall mhRepairObjWin::OnShowWin(mhRepairObjWin *this)
{
  mhRepairObjWin *v1; // esi@1
  ChargedItemEffect *v2; // edi@2
  _DWORD *v3; // eax@2
  ItemInfo *v4; // ebx@2
  unsigned int v5; // ecx@3
  ItemIcon *v6; // eax@4
  Item *v7; // edi@5
  Item *v8; // eax@5
  ItemInfo *v9; // eax@7
  MiniHouseFurniture *v10; // eax@9
  Item *v11; // ebx@12
  int v12; // eax@12
  int v13; // edi@12
  int v14; // [sp-8h] [bp-38h]@2
  Item *pkItem; // [sp+4h] [bp-2Ch]@2
  MiniHouseEndure *pkItemEndure; // [sp+8h] [bp-28h]@2
  MiniHouseEndure *pkItemEndurea; // [sp+8h] [bp-28h]@12
  char tempstr[30]; // [sp+Ch] [bp-24h]@12

  v1 = this;
  if ( this->m_ID != -1 )
  {
    ((void (__thiscall *)(mhRepairObjWin *))this->vfptr[77].__vecDelDtor)(this);
    v2 = 0;
    ((void (__cdecl *)(_DWORD))v1->m_pkOkBtn->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v1->m_pkOkText->vfptr[64].__vecDelDtor)(0);
    v3 = v1->m_pkFrameWork[19].m_BackFrameID;
    v4 = 0;
    pkItem = 0;
    pkItemEndure = 0;
    if ( !v3
      || (v5 = v1->m_nInvenSlot, v5 >= 0xC0)
      || (v6 = (ItemIcon *)v3[v5 + 87]) == 0
      || (v7 = ItemIcon::GetItem(v6), v8 = Inventory::GetMHItemByObjID(&g_kInventory, v1->m_ID), pkItem = v8, v7)
      && v8
      && (v4 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(v8->m_kStruct.itemid),
          v9 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(v7->m_kStruct.itemid),
          v4)
      && v9
      && (v2 = ChargedEffectTable::GetByInxName(v9->InxName),
          (v10 = MiniHouseFuritureInfoTab::GetObjByName(v4->InxName)) != 0)
      && (pkItemEndure = MiniHouseEndureInfoTable::GetByHandle(v10->KeepTime_Endure)) != 0
      && v2 )
    {
      v1->m_bSentPacket = 1;
      tempstr[0] = 0;
      *(_DWORD *)&tempstr[1] = 0;
      *(_DWORD *)&tempstr[5] = 0;
      *(_DWORD *)&tempstr[9] = 0;
      *(_DWORD *)&tempstr[13] = 0;
      *(_DWORD *)&tempstr[17] = 0;
      *(_DWORD *)&tempstr[21] = 0;
      *(_DWORD *)&tempstr[25] = 0;
      tempstr[29] = 0;
      sprintf(tempstr, "%d", v2->EffectValue);
      ((void (__stdcall *)(char *, int))v1->m_pkTextFieldWin[1]->vfptr[118].__vecDelDtor)(tempstr, v14);
      ItemIcon::SetItemAsID(v1->m_pkItemIconWin, (int)v2, v4->ID);
      v11 = MiniHouseIndoor::GetEndureStep(pkItem, v1->m_tServerTime);
      v12 = pkItemEndure->Endure[0];
      v13 = 0;
      pkItemEndurea = (MiniHouseEndure *)pkItemEndure->Endure[0];
      if ( v11 )
      {
        if ( v12 )
        {
          v13 = MiniHouseIndoor::GetEndurePercentage(pkItem, v1->m_tServerTime);
          if ( v13 > 100 )
            v13 = 100;
        }
      }
      *(_DWORD *)tempstr = 0;
      *(_DWORD *)&tempstr[4] = 0;
      *(_DWORD *)&tempstr[8] = 0;
      *(_DWORD *)&tempstr[12] = 0;
      *(_DWORD *)&tempstr[16] = 0;
      *(_DWORD *)&tempstr[20] = 0;
      *(_DWORD *)&tempstr[24] = 0;
      *(_WORD *)&tempstr[28] = 0;
      sprintf(tempstr, "%d/%d (%d%%)", v11, pkItemEndurea, v13);
      ((void (__cdecl *)(char *))v1->m_pkTextFieldWin[2]->vfptr[118].__vecDelDtor)(tempstr);
      if ( v13 < 100 )
      {
        ((void (__stdcall *)(signed int))v1->m_pkOkBtn->vfptr[64].__vecDelDtor)(1);
        v1->m_pkOkText->vfptr[64].__vecDelDtor((NiRefObject *)v1->m_pkOkText, 1u);
      }
    }
  }
}
// 6D7510: could not find valid save-restore pair for ebx
// 6D7510: could not find valid save-restore pair for edi

//----- (006D77B0) --------------------------------------------------------
void __thiscall mhRepairObjWin::GetRepairInfos(mhRepairObjWin *this, Item *pkItem, Item *pkKit, ItemInfo *pkItemInfo, ItemInfo *pkItemKit, ChargedItemEffect *pkChargedKit, MiniHouseFurniture *pkItemFurInfo, MiniHouseEndure *pkItemEndure)
{
  mhRepairObjWin *v8; // edi@1
  _DWORD *v9; // eax@1
  unsigned int v10; // ecx@2
  ItemIcon *v11; // ecx@3
  Item *v12; // esi@4
  Item *v13; // eax@4
  ItemInfo *v14; // edi@6
  ItemInfo *v15; // eax@6
  MiniHouseFurniture *v16; // eax@8

  v8 = this;
  v9 = this->m_pkFrameWork[19].m_BackFrameID;
  if ( v9 )
  {
    v10 = this->m_nInvenSlot;
    if ( v10 < 0xC0 )
    {
      v11 = (ItemIcon *)v9[v10 + 87];
      if ( v11 )
      {
        v12 = ItemIcon::GetItem(v11);
        v13 = Inventory::GetMHItemByObjID(&g_kInventory, v8->m_ID);
        if ( v12 )
        {
          if ( v13 )
          {
            v14 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(v13->m_kStruct.itemid);
            v15 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(v12->m_kStruct.itemid);
            if ( v14 )
            {
              if ( v15 )
              {
                ChargedEffectTable::GetByInxName(v15->InxName);
                v16 = MiniHouseFuritureInfoTab::GetObjByName(v14->InxName);
                if ( v16 )
                  MiniHouseEndureInfoTable::GetByHandle(v16->KeepTime_Endure);
              }
            }
          }
        }
      }
    }
  }
}

//----- (006D7860) --------------------------------------------------------
void __thiscall mhRepairObjWin::OnCommand(mhRepairObjWin *this, unsigned int wParam, int lParam)
{
  if ( wParam )
  {
    if ( wParam == 1 )
      GameFrameWork::OpenMHRepairWin((GameFrameWork *)this->m_pkFrameWork, 0, 0);
  }
  else
  {
    mhRepairObjWin::DoRepair(this);
  }
}

//----- (006D7890) --------------------------------------------------------
mhRepairObjWin *__cdecl mhRepairObjWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  mhRepairObjWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x180u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&mhRepairObjWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&mhRepairObjWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = -65536;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[2][0]) = 0;
    LOBYTE(v2[1].m_kLocal.m_Rotate.m_pEntry[2][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Translate.y) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (mhRepairObjWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9C2204: using guessed type void (__thiscall *mhRepairObjWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C2224: using guessed type int (__thiscall *mhRepairObjWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006D79F0) --------------------------------------------------------
mhRepairObjWin *__thiscall mhRepairObjWin::`vector deleting destructor'(mhRepairObjWin *this, unsigned int a2)
{
  mhRepairObjWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&mhRepairObjWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhRepairObjWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C2204: using guessed type void (__thiscall *mhRepairObjWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C2224: using guessed type int (__thiscall *mhRepairObjWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006D7A30) --------------------------------------------------------
void mhSettingWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "MiniHomeSetting");
}

//----- (006D7A60) --------------------------------------------------------
void __thiscall mhSettingWin::UpdateMeWin(mhSettingWin *this, float fCurTime)
{
  mhSettingWin *v2; // esi@1
  PgFrameWork *v3; // ebx@2
  int v4; // esi@3
  signed int v5; // edi@3

  v2 = this;
  if ( g_pkKeyboard->m_aucKeystate[0] & 2 )
  {
    v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( PgWin::IsVisible((PgWin *)&v2->vfptr) )
    {
      v4 = (int)v2->m_spEdit;
      v5 = 4;
      do
      {
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 484))(1);
        v4 += 4;
        --v5;
      }
      while ( v5 );
      BYTE3(v3[73].m_kMsgQ.m_uiAlloced) = 0;
      PgFrameWork::AddMsg(v3, 0xE0u, 0, 0);
    }
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (006D7AD0) --------------------------------------------------------
void __thiscall mhSettingWin::OnChangeTab(mhSettingWin *this, DirectUserMsgBody_MHInfoTabChanged::TabEnum eTab)
{
  mhSettingWin *v2; // esi@1
  EditWin *v3; // ecx@1
  int v4; // esi@1
  DirectUserMsgBody_MHInfoTabChanged kBody; // [sp+4h] [bp-4h]@1

  v2 = this;
  *(_BYTE *)(*((_DWORD *)this->m_pkHouseTabList._Myfirst + 4) + 380) = 0;
  v3 = this->m_spEdit[2].m_pObject;
  kBody.eChanged = eTab;
  ((void (__stdcall *)(_DWORD))v3->vfptr[115].__vecDelDtor)(&unk_9C246A);
  v4 = (int)&v2->vfptr;
  if ( *(_DWORD *)(v4 + 4) )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v4 + 4) + 4))(62, &kBody, v4);
    if ( *(_DWORD *)(v4 + 4) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v4 + 4) + 20))(62, &kBody, v4);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v4 + 20))(v4, 62, &kBody, v4);
}

//----- (006D7B50) --------------------------------------------------------
void __thiscall mhSettingWin::OnCommand(mhSettingWin *this, unsigned int wParam, int lParam)
{
  mhSettingWin *v3; // esi@1
  char *v4; // eax@11
  MsgBox *v5; // esi@11
  PgFrameWork *v6; // eax@11
  PgMsg::Frame kOkMsg; // [sp+8h] [bp-18h]@11

  v3 = this;
  switch ( wParam )
  {
    case 0u:
      mhSettingWin::OnChangeTab(this, 0);
      break;
    case 1u:
      mhSettingWin::OnChangeTab(this, TE_GUEST_BOOK);
      break;
    case 2u:
      mhSettingWin::OnChangeTab(this, TE_EDIT_ROOM);
      break;
    case 3u:
      mhSettingWin::OnChangeTab(this, TE_PORTAL_LIST);
      break;
    case 4u:
      mhSettingWin::OnChangeTab(this, TE_SETTING);
      break;
    case 5u:
      mhSettingWin::OnChangeTab(this, TE_OUT);
      break;
    case 7u:
      if ( this->m_spCheckBox[0]->m_bCheck == 1
        && !strlen((const char *)((int (*)(void))this->m_spEdit[2].m_pObject->vfptr[113].__vecDelDtor)()) )
      {
        v3->m_spCheckBox[0]->m_bCheck = v3->m_spCheckBox[0]->m_bCheck == 0;
      }
      v4 = (char *)TextData2::Get(0x839089AE);
      v5 = MsgBox::Modal(MSGBOX_OKCANCEL, v4);
      kOkMsg.m_uiFrameMsg = 201;
      kOkMsg.m_uiFramelParam = 1;
      v6 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v6 )
        MsgBox::SetFrameWorkMsgOnClose(v5, v6, &kOkMsg, 0);
      break;
    case 8u:
      ((void (*)(void))this->m_spEdit[2].m_pObject->vfptr[117].__vecDelDtor)();
      mhSettingWin::CheckEnable(v3, 0, unk_A9943C == 2, v3->m_spCheckBox[0]->m_bCheck == 0);
      if ( v3->m_spCheckBox[0]->m_bCheck == 1 )
        PgFrameWork::AddMsg(v3->m_pkFrameWork, 0xDFu, 0, 0);
      break;
    case 9u:
      this->m_spCheckBox[1]->m_bCheck = this->m_spCheckBox[1]->m_bCheck == 0;
      break;
    case 0xAu:
      PgFrameWork::AddMsg(this->m_pkFrameWork, 0xE0u, 0, 0);
      break;
    case 0xBu:
      mhSettingWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (006D7DB0) --------------------------------------------------------
void __thiscall mhSettingWin::OnShowWin(mhSettingWin *this)
{
  mhSettingWin *v1; // edi@1
  signed int v2; // esi@2
  EditWin **v3; // esi@6
  signed int v4; // ebx@6

  v1 = this;
  if ( unk_A9943C != 2 )
  {
    v2 = 0;
    do
    {
      v1->m_spCheckBox[v2]->m_bCheck = v1->m_spCheckBox[v2]->m_bCheck;
      ((void (__stdcall *)(_DWORD))v1->m_spCheckBox[v2]->vfptr[60].__vecDelDtor)(0);
      if ( !v2 )
        ((void (__stdcall *)(_DWORD))v1->m_spEdit[2].m_pObject->vfptr[121].__vecDelDtor)(1);
      ++v2;
    }
    while ( v2 < 2 );
    v3 = (EditWin **)v1->m_spEdit;
    v4 = 4;
    do
    {
      ((void (__stdcall *)(_DWORD))(*v3)->vfptr[121].__vecDelDtor)(1);
      EditWin::SetEnable(*v3, 0);
      ++v3;
      --v4;
    }
    while ( v4 );
    ((void (__stdcall *)(_DWORD))v1->m_spText->vfptr[64].__vecDelDtor)(0);
    v1->m_spBtn->vfptr[64].__vecDelDtor((NiRefObject *)v1->m_spBtn, 0);
  }
}

//----- (006D7E70) --------------------------------------------------------
void __thiscall mhSettingWin::OnClose(mhSettingWin *this)
{
  mhSettingWin *v1; // edi@1
  signed int v2; // esi@1
  ColumnBut *v3; // eax@2
  bool v4; // cl@2
  EditWin **v5; // esi@5
  signed int v6; // ebx@5
  int v7; // [sp+Ch] [bp-4h]@0

  v1 = this;
  v2 = 0;
  do
  {
    v3 = v1->m_spCheckBox[v2];
    v4 = v3->m_bCheck;
    v3->m_bCheck = v4;
    LOBYTE(v7) = v4;
    ((void (__stdcall *)(signed int))v1->m_spCheckBox[v2]->vfptr[60].__vecDelDtor)(1);
    if ( !v2 )
    {
      ((void (__stdcall *)(signed int))v1->m_spEdit[2].m_pObject->vfptr[60].__vecDelDtor)(1);
      ((void (__stdcall *)(int))v1->m_spEdit[2].m_pObject->vfptr[64].__vecDelDtor)(v7);
    }
    ++v2;
  }
  while ( v2 < 2 );
  v5 = (EditWin **)v1->m_spEdit;
  v6 = 4;
  do
  {
    EditWin::SetEnable(*v5, 1);
    ++v5;
    --v6;
  }
  while ( v6 );
  ((void (__stdcall *)(signed int))v1->m_spText->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(signed int))v1->m_spBtn->vfptr[64].__vecDelDtor)(1);
}

//----- (006D7F20) --------------------------------------------------------
void __thiscall mhSettingWin::mhSettingWin(mhSettingWin *this)
{
  mhSettingWin *v1; // esi@1
  NiPointer<EditWin> *v2; // ebx@1
  EditWin *v3; // edi@2
  signed int v4; // [sp+14h] [bp-10h]@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&mhSettingWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&mhSettingWin::`vftable'{for `IDirectMessenger'};
  v1->m_spBtn = 0;
  v1->m_spText = 0;
  `eh vector constructor iterator'(
    v1->m_spEdit,
    4u,
    4,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_pkHouseTabList._Myfirst = 0;
  v1->m_pkHouseTabList._Mylast = 0;
  v1->m_pkHouseTabList._Myend = 0;
  v1->m_spCheckBox[0] = 0;
  v1->m_spCheckBox[1] = 0;
  v2 = v1->m_spEdit;
  v4 = 4;
  do
  {
    v3 = v2->m_pObject;
    if ( v2->m_pObject )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
      v2->m_pObject = 0;
    }
    ++v2;
    --v4;
  }
  while ( v4 );
}
// 9C2638: using guessed type void (__thiscall *mhSettingWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C2654: using guessed type int (__thiscall *mhSettingWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006D8000) --------------------------------------------------------
void __thiscall mhSettingWin::~mhSettingWin(mhSettingWin *this)
{
  mhSettingWin *v1; // esi@1
  ColumnBut **v2; // eax@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&mhSettingWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhSettingWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_pkHouseTabList._Myfirst;
  if ( v2 )
    operator delete(v2);
  v1->m_pkHouseTabList._Myfirst = 0;
  v1->m_pkHouseTabList._Mylast = 0;
  v1->m_pkHouseTabList._Myend = 0;
  `eh vector destructor iterator'(
    v1->m_spEdit,
    4u,
    4,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9C2638: using guessed type void (__thiscall *mhSettingWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C2654: using guessed type int (__thiscall *mhSettingWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006D80A0) --------------------------------------------------------
mhSettingWin *__cdecl mhSettingWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  mhSettingWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x188u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    mhSettingWin::mhSettingWin((mhSettingWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (mhSettingWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (006D81D0) --------------------------------------------------------
char __thiscall mhSettingWin::Create(mhSettingWin *this, PgFrameWork *pkFrameWork)
{
  mhSettingWin *v2; // esi@1
  NiTexturePalette *v3; // ebx@1
  const char *v4; // eax@3
  NiNode *v5; // eax@3
  NiNode *v6; // esi@7
  volatile LONG *v7; // eax@7
  LONG v8; // eax@8
  PgSprData *v10; // eax@13
  int v11; // edi@16
  int v12; // ebx@16
  NiSourceTexture *v13; // eax@16
  PgSprData *v14; // eax@17
  PgSprData *v15; // eax@19
  PgSprData *v16; // eax@19
  PgSprData *v17; // eax@19
  PgSprData *v18; // eax@19
  PgFont *v19; // eax@22
  PgWinText *v20; // edi@22
  NiRefObjectVtbl *v21; // ebx@22
  NiUnsharedGeometryGroup *v22; // eax@22
  PgSprData *v23; // edi@22
  EditWin *v24; // eax@22
  PgSprData *v25; // edi@22
  EditWin *v26; // eax@22
  PgSprData *v27; // edi@22
  EditWin *v28; // eax@22
  PgSprData *v29; // edi@22
  EditWin *v30; // eax@22
  NiPointer<PgSprData::PgHitTester> *v31; // edx@22
  unsigned int v32; // edi@22
  unsigned int v33; // ebx@22
  PgFont *v34; // eax@22
  PgWinText *v35; // edi@22
  NiRefObjectVtbl *v36; // ebx@22
  NiUnsharedGeometryGroup *v37; // eax@22
  PgSprData::PgHitTester *v38; // eax@22
  unsigned int v39; // edi@22
  unsigned int v40; // ebx@22
  PgFont *v41; // eax@22
  PgWinText *v42; // edi@22
  NiRefObjectVtbl *v43; // ebx@22
  NiUnsharedGeometryGroup *v44; // eax@22
  NiPointer<PgSprData::PgHitTester> *v45; // ecx@22
  unsigned int v46; // edi@22
  unsigned int v47; // ebx@22
  PgFont *v48; // eax@22
  PgWinText *v49; // edi@22
  NiRefObjectVtbl *v50; // ebx@22
  NiUnsharedGeometryGroup *v51; // eax@22
  PgSprData::PgHitTester *v52; // eax@22
  unsigned int v53; // edi@22
  unsigned int v54; // ebx@22
  PgFont *v55; // eax@22
  PgWinText *v56; // edi@22
  NiRefObjectVtbl *v57; // ebx@22
  NiUnsharedGeometryGroup *v58; // eax@22
  NiPointer<PgSprData::PgHitTester> *v59; // ecx@22
  unsigned int v60; // edi@22
  unsigned int v61; // ebx@22
  PgFont *v62; // eax@22
  PgWinText *v63; // edi@22
  NiRefObjectVtbl *v64; // ebx@22
  NiUnsharedGeometryGroup *v65; // eax@22
  PgSprData::PgHitTester *v66; // eax@22
  unsigned int v67; // edi@22
  unsigned int v68; // ebx@22
  PgFont *v69; // eax@22
  PgWinText *v70; // edi@22
  NiRefObjectVtbl *v71; // ebx@22
  NiUnsharedGeometryGroup *v72; // eax@22
  NiPointer<PgSprData::PgHitTester> *v73; // ecx@22
  unsigned int v74; // edi@22
  unsigned int v75; // ebx@22
  PgFont *v76; // eax@22
  PgWinText *v77; // edi@22
  NiRefObjectVtbl *v78; // ebx@22
  NiUnsharedGeometryGroup *v79; // eax@22
  PgSprData::PgHitTester *v80; // eax@22
  unsigned int v81; // edi@22
  unsigned int v82; // ebx@22
  PgFont *v83; // eax@22
  PgWinText *v84; // edi@22
  NiRefObjectVtbl *v85; // ebx@22
  NiUnsharedGeometryGroup *v86; // eax@22
  PgSprData *v87; // edi@22
  NiPointer<PgSprData::PgHitTester> *v88; // edx@22
  unsigned int v89; // edi@22
  unsigned int v90; // ebx@22
  PgFont *v91; // eax@22
  PgWinText *v92; // eax@22
  NiRefObjectVtbl *v93; // edi@22
  NiUnsharedGeometryGroup *v94; // eax@22
  PgSprData *v95; // edi@22
  ColumnBut *v96; // eax@22
  NiNode *v97; // edx@22
  PgSprData *v98; // edi@22
  signed int v99; // edi@22
  ColumnBut *v100; // eax@23
  bool v101; // cl@23
  int v102; // edi@26
  signed int v103; // ebx@26
  NiUnsharedGeometryGroup *v104; // eax@28
  NiUnsharedGeometryGroup *v105; // eax@28
  NiUnsharedGeometryGroup *v106; // eax@28
  NiUnsharedGeometryGroup *v107; // eax@28
  NiUnsharedGeometryGroup *v108; // eax@28
  NiUnsharedGeometryGroup *v109; // eax@28
  const char *v110; // eax@29
  PgSprData *v111; // ebx@31
  const char *v112; // eax@31
  unsigned int v113; // eax@33
  unsigned int v114; // ebx@34
  ColumnBut **v115; // ecx@35
  int v116; // edx@35
  unsigned int v117; // eax@36
  unsigned int v118; // eax@37
  unsigned int v119; // ecx@37
  unsigned int v120; // ecx@39
  ColumnBut **v121; // edx@44
  ColumnBut **v122; // eax@44
  ColumnBut **v123; // ecx@46
  ColumnBut **v124; // edx@47
  unsigned int v125; // eax@47
  unsigned int v126; // eax@48
  unsigned int v127; // ecx@48
  unsigned int v128; // ecx@50
  ColumnBut **v129; // eax@55
  char *v130; // eax@57
  unsigned int v131; // ebx@59
  ColumnBut *v132; // eax@59
  PgSprData *v133; // edi@60
  NiSourceTexture *v134; // edi@60
  PgSprData *v135; // edi@61
  NiNode *v136; // esi@64
  unsigned int v137; // [sp+B4h] [bp-108h]@29
  unsigned int uiWidth; // [sp+B8h] [bp-104h]@19
  int v139; // [sp+BCh] [bp-100h]@35
  unsigned int uiHeight; // [sp+C0h] [bp-FCh]@19
  ColumnBut *pkTab; // [sp+C4h] [bp-F8h]@33
  unsigned int i; // [sp+C8h] [bp-F4h]@28
  char *pcText; // [sp+CCh] [bp-F0h]@23
  NiPointer<NiNode> spNode; // [sp+D0h] [bp-ECh]@1
  int iLeft; // [sp+D4h] [bp-E8h]@13
  int iTop; // [sp+D8h] [bp-E4h]@13
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strName; // [sp+DCh] [bp-E0h]@28
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > pkToolTipText[6]; // [sp+F8h] [bp-C4h]@28
  char acNum[12]; // [sp+1A0h] [bp-1Ch]@28
  int v150; // [sp+1B8h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v150 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\MiniHomeSetting.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = spNode.m_pObject;
  if ( !spNode.m_pObject )
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("Game\\MiniHomeSetting.nif load fail", "LoadFail", spNode.m_pObject);
      v5 = spNode.m_pObject;
    }
    v150 = -1;
    if ( !v5 )
      return 0;
    v6 = v5;
    v7 = (volatile LONG *)&v5->m_uiRefCount;
    goto LABEL_8;
  }
  v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &iLeft, &iTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v10, 0, pkFrameWork, "mhInfoWin", 0) )
  {
    v6 = spNode.m_pObject;
    v150 = -1;
    if ( spNode.m_pObject )
    {
      v7 = (volatile LONG *)&spNode.m_pObject->m_uiRefCount;
LABEL_8:
      v8 = InterlockedDecrement(v7);
      goto LABEL_9;
    }
    return 0;
  }
  v11 = iLeft;
  v12 = iTop;
  v13 = MenuTexMgr::GetTexture(0x13u);
  if ( v13 )
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, v13);
  else
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft - v11, iTop - v12, v14, (PgWin *)&v2->vfptr, 0, 0);
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft, iTop, v15, (PgWin *)&v2->vfptr, 0, 0);
  v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft, iTop, v16, (PgWin *)&v2->vfptr, 0, 0);
  v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel03", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft, iTop, v17, (PgWin *)&v2->vfptr, 0, 0);
  v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel04", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft, iTop, v18, (PgWin *)&v2->vfptr, 0, 0);
  if ( !PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &iLeft, &iTop, &uiWidth, &uiHeight) )
  {
    v6 = spNode.m_pObject;
    v150 = -1;
    if ( spNode.m_pObject )
    {
      v8 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
LABEL_9:
      if ( !v8 )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
      return 0;
    }
    return 0;
  }
  v19 = Font::Get(MAIN_MENU);
  v20 = PgWinText::CreateWin(iLeft, iTop, uiWidth, uiHeight, v19, (PgWin *)&v2->vfptr, 0, 0);
  v20->vfptr[122].__vecDelDtor((NiRefObject *)v20, 1u);
  v20->vfptr[117].__vecDelDtor((NiRefObject *)v20, (unsigned int)&Color::m_kDxWinTitleColor);
  v21 = v20->vfptr;
  v22 = TextData2::Get(0xDEE82F0D);
  v21[118].__vecDelDtor((NiRefObject *)v20, (unsigned int)v22);
  v20->vfptr[60].__vecDelDtor((NiRefObject *)v20, 0);
  v23 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextField01", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft, iTop, v23, (PgWin *)&v2->vfptr, 0, 0);
  v24 = EditWin::CreateWin(
          iLeft,
          iTop,
          v23->m_akHitTester.m_pBase->m_pObject->m_uiWidth,
          v23->m_akHitTester.m_pBase->m_pObject->m_uiHeight,
          (PgWin *)&v2->vfptr,
          NORMAL,
          0x14u,
          1u,
          1,
          0,
          1);
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)v2->m_spEdit, (NiD3DDefaultShader *)v24);
  EditWin::SetImeStatus(v2->m_spEdit[0].m_pObject, IS_KOREAN);
  v25 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextField04", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft, iTop, v25, (PgWin *)&v2->vfptr, 0, 0);
  v26 = EditWin::CreateWin(
          iLeft,
          iTop,
          v25->m_akHitTester.m_pBase->m_pObject->m_uiWidth,
          v25->m_akHitTester.m_pBase->m_pObject->m_uiHeight,
          (PgWin *)&v2->vfptr,
          NUMBER,
          2u,
          1u,
          1,
          0,
          1);
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spEdit[1], (NiD3DDefaultShader *)v26);
  EditWin::SetImeStatus(v2->m_spEdit[1].m_pObject, IS_KOREAN);
  v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextField03", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft - 1, iTop - 2, v27, (PgWin *)&v2->vfptr, 0, 0);
  v28 = EditWin::CreateWin(
          iLeft,
          iTop,
          v27->m_akHitTester.m_pBase->m_pObject->m_uiWidth,
          v27->m_akHitTester.m_pBase->m_pObject->m_uiHeight,
          (PgWin *)&v2->vfptr,
          PASSWD,
          8u,
          1u,
          1,
          0,
          1);
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spEdit[2], (NiD3DDefaultShader *)v28);
  EditWin::SetImeStatus(v2->m_spEdit[2].m_pObject, IS_KOREAN);
  v29 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextField06", &iLeft, &iTop, 0);
  PgWinSpr::CreateWin(iLeft, iTop, v29, (PgWin *)&v2->vfptr, 0, 0);
  v30 = EditWin::CreateWin(
          iLeft,
          iTop,
          v29->m_akHitTester.m_pBase->m_pObject->m_uiWidth,
          v29->m_akHitTester.m_pBase->m_pObject->m_uiHeight,
          (PgWin *)&v2->vfptr,
          MULTILINE,
          0x64u,
          1u,
          1,
          0,
          1);
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spEdit[3], (NiD3DDefaultShader *)v30);
  EditWin::SetImeStatus(v2->m_spEdit[3].m_pObject, IS_KOREAN);
  v31 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &iLeft, &iTop, 0)->m_akHitTester.m_pBase;
  v32 = v31->m_pObject->m_uiHeight;
  v33 = v31->m_pObject->m_uiWidth;
  v34 = Font::Get(MAIN_MENU);
  v35 = PgWinText::CreateWin(iLeft, iTop, v33, v32, v34, (PgWin *)&v2->vfptr, 0, 0);
  v35->vfptr[122].__vecDelDtor((NiRefObject *)v35, 5u);
  v36 = v35->vfptr;
  v37 = TextData2::Get(0x2218767Du);
  v36[118].__vecDelDtor((NiRefObject *)v35, (unsigned int)v37);
  v35->vfptr[60].__vecDelDtor((NiRefObject *)v35, 0);
  v38 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text02", &iLeft, &iTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v39 = v38->m_uiHeight;
  v40 = v38->m_uiWidth;
  v41 = Font::Get(MAIN_MENU);
  v42 = PgWinText::CreateWin(iLeft, iTop, v40, v39, v41, (PgWin *)&v2->vfptr, 0, 0);
  v42->vfptr[122].__vecDelDtor((NiRefObject *)v42, 5u);
  v43 = v42->vfptr;
  v44 = TextData2::Get(0x9DAEF6E1);
  v43[118].__vecDelDtor((NiRefObject *)v42, (unsigned int)v44);
  v42->vfptr[60].__vecDelDtor((NiRefObject *)v42, 0);
  v45 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text03", &iLeft, &iTop, 0)->m_akHitTester.m_pBase;
  v46 = v45->m_pObject->m_uiHeight;
  v47 = v45->m_pObject->m_uiWidth;
  v48 = Font::Get(MAIN_MENU);
  v49 = PgWinText::CreateWin(iLeft, iTop, v47, v46, v48, (PgWin *)&v2->vfptr, 0, 0);
  v49->vfptr[122].__vecDelDtor((NiRefObject *)v49, 5u);
  v50 = v49->vfptr;
  v51 = TextData::Get(0xA7F6EEE4);
  v50[118].__vecDelDtor((NiRefObject *)v49, (unsigned int)v51);
  v49->vfptr[60].__vecDelDtor((NiRefObject *)v49, 0);
  v52 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text04", &iLeft, &iTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v53 = v52->m_uiHeight;
  v54 = v52->m_uiWidth;
  v55 = Font::Get(MAIN_MENU);
  v56 = PgWinText::CreateWin(iLeft, iTop, v54, v53, v55, (PgWin *)&v2->vfptr, 0, 0);
  v56->vfptr[122].__vecDelDtor((NiRefObject *)v56, 5u);
  v57 = v56->vfptr;
  v58 = TextData2::Get(0x7EC0BBE2u);
  v57[118].__vecDelDtor((NiRefObject *)v56, (unsigned int)v58);
  v56->vfptr[60].__vecDelDtor((NiRefObject *)v56, 0);
  v59 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text05", &iLeft, &iTop, 0)->m_akHitTester.m_pBase;
  v60 = v59->m_pObject->m_uiHeight;
  v61 = v59->m_pObject->m_uiWidth;
  v62 = Font::Get(MAIN_MENU);
  v63 = PgWinText::CreateWin(iLeft, iTop, v61, v60, v62, (PgWin *)&v2->vfptr, 0, 0);
  v63->vfptr[122].__vecDelDtor((NiRefObject *)v63, 5u);
  v64 = v63->vfptr;
  v65 = TextData2::Get(0xEA563B2F);
  v64[118].__vecDelDtor((NiRefObject *)v63, (unsigned int)v65);
  v63->vfptr[60].__vecDelDtor((NiRefObject *)v63, 0);
  v66 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text02_1", &iLeft, &iTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v67 = v66->m_uiHeight;
  v68 = v66->m_uiWidth;
  v69 = Font::Get(MAIN_MENU);
  v70 = PgWinText::CreateWin(iLeft, iTop, v68, v67, v69, (PgWin *)&v2->vfptr, 0, 0);
  v70->vfptr[122].__vecDelDtor((NiRefObject *)v70, 5u);
  v71 = v70->vfptr;
  v72 = TextData2::Get(0x725F917Bu);
  v71[118].__vecDelDtor((NiRefObject *)v70, (unsigned int)v72);
  v70->vfptr[60].__vecDelDtor((NiRefObject *)v70, 0);
  v73 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text05_1", &iLeft, &iTop, 0)->m_akHitTester.m_pBase;
  v74 = v73->m_pObject->m_uiHeight;
  v75 = v73->m_pObject->m_uiWidth;
  v76 = Font::Get(MAIN_MENU);
  v77 = PgWinText::CreateWin(iLeft, iTop, v75, v74, v76, (PgWin *)&v2->vfptr, 0, 0);
  v77->vfptr[122].__vecDelDtor((NiRefObject *)v77, 5u);
  v78 = v77->vfptr;
  v79 = TextData2::Get(0x725F917Bu);
  v78[118].__vecDelDtor((NiRefObject *)v77, (unsigned int)v79);
  v77->vfptr[60].__vecDelDtor((NiRefObject *)v77, 0);
  v80 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text06", &iLeft, &iTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v81 = v80->m_uiHeight;
  v82 = v80->m_uiWidth;
  v83 = Font::Get(MAIN_MENU);
  v84 = PgWinText::CreateWin(iLeft, iTop, v82, v81, v83, (PgWin *)&v2->vfptr, 0, 0);
  v84->vfptr[122].__vecDelDtor((NiRefObject *)v84, 5u);
  v85 = v84->vfptr;
  v86 = TextData::Get(0x9798BBB1);
  v85[118].__vecDelDtor((NiRefObject *)v84, (unsigned int)v86);
  v84->vfptr[60].__vecDelDtor((NiRefObject *)v84, 0);
  v87 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "OKBtnNor", &iLeft, &iTop, 0);
  PgSprData::Add(v87, (NiAVObject *)&spNode.m_pObject->vfptr, "OKBTNClick");
  PgSprData::Add(v87, (NiAVObject *)&spNode.m_pObject->vfptr, "OKBtnOver");
  v2->m_spBtn = PgWinBut::CreateWin(iLeft, iTop, v87, (PgWin *)&v2->vfptr, 7u, 0, 0);
  v88 = v87->m_akHitTester.m_pBase;
  v89 = v88->m_pObject->m_uiHeight;
  v90 = v88->m_pObject->m_uiWidth;
  v91 = Font::Get(MAIN_MENU);
  v92 = PgWinText::CreateWin(iLeft, iTop, v90, v89, v91, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_spText = v92;
  v92->vfptr[122].__vecDelDtor((NiRefObject *)v92, 5u);
  v93 = v2->m_spText->vfptr;
  v94 = TextData::Get(0x4F5F499Fu);
  v93[118].__vecDelDtor((NiRefObject *)v2->m_spText, (unsigned int)v94);
  ((void (__stdcall *)(_DWORD))v2->m_spText->vfptr[60].__vecDelDtor)(0);
  v95 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text02Nor", &iLeft, &iTop, 0);
  PgSprData::Add(v95, (NiAVObject *)&spNode.m_pObject->vfptr, "Text02Click");
  v96 = ColumnBut::CreateWin(iLeft, iTop, v95, (PgWin *)&v2->vfptr, 8u, 0);
  v97 = spNode.m_pObject;
  v2->m_spCheckBox[0] = v96;
  v98 = PgSprData::Create((NiAVObject *)&v97->vfptr, "Text05Nor", &iLeft, &iTop, 0);
  PgSprData::Add(v98, (NiAVObject *)&spNode.m_pObject->vfptr, "Text05Click");
  v2->m_spCheckBox[1] = ColumnBut::CreateWin(iLeft, iTop, v98, (PgWin *)&v2->vfptr, 9u, 0);
  v99 = 0;
  do
  {
    v100 = v2->m_spCheckBox[v99];
    v101 = v100->m_bCheck;
    v100->m_bCheck = v101;
    LOBYTE(pcText) = v101;
    ((void (__stdcall *)(signed int))v2->m_spCheckBox[v99]->vfptr[60].__vecDelDtor)(1);
    if ( !v99 )
    {
      ((void (__stdcall *)(signed int))v2->m_spEdit[2].m_pObject->vfptr[60].__vecDelDtor)(1);
      ((void (__stdcall *)(char *))v2->m_spEdit[2].m_pObject->vfptr[64].__vecDelDtor)(pcText);
    }
    ++v99;
  }
  while ( v99 < 2 );
  v102 = (int)v2->m_spEdit;
  v103 = 4;
  do
  {
    (*(void (__stdcall **)(signed int))(**(_DWORD **)v102 + 240))(1);
    (*(void (__stdcall **)(void *))(**(_DWORD **)v102 + 460))(&unk_9C2469);
    v102 += 4;
    --v103;
  }
  while ( v103 );
  strName._Myres = 15;
  strName._Mysize = 0;
  strName._Bx._Buf[0] = 0;
  LOBYTE(v150) = 1;
  strcpy(acNum, "0");
  *(_DWORD *)&acNum[2] = 0;
  *(_DWORD *)&acNum[6] = 0;
  *(_WORD *)&acNum[10] = 0;
  v104 = TextData2::Get(0x9BA8F7E2);
  pkToolTipText[0]._Myres = 15;
  pkToolTipText[0]._Mysize = 0;
  pkToolTipText[0]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    pkToolTipText,
    (const char *)v104,
    strlen((const char *)v104));
  LOBYTE(v150) = 2;
  v105 = TextData2::Get(0x4C494A23u);
  pkToolTipText[1]._Myres = 15;
  pkToolTipText[1]._Mysize = 0;
  pkToolTipText[1]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &pkToolTipText[1],
    (const char *)v105,
    strlen((const char *)v105));
  LOBYTE(v150) = 3;
  v106 = TextData2::Get(0xE6EC4424);
  pkToolTipText[2]._Myres = 15;
  pkToolTipText[2]._Mysize = 0;
  pkToolTipText[2]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &pkToolTipText[2],
    (const char *)v106,
    strlen((const char *)v106));
  LOBYTE(v150) = 4;
  v107 = TextData2::Get(0xD7F24143);
  pkToolTipText[3]._Myres = 15;
  pkToolTipText[3]._Mysize = 0;
  pkToolTipText[3]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &pkToolTipText[3],
    (const char *)v107,
    strlen((const char *)v107));
  LOBYTE(v150) = 5;
  v108 = TextData2::Get(0xDEE82F0D);
  pkToolTipText[4]._Myres = 15;
  pkToolTipText[4]._Mysize = 0;
  pkToolTipText[4]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &pkToolTipText[4],
    (const char *)v108,
    strlen((const char *)v108));
  LOBYTE(v150) = 6;
  v109 = TextData2::Get(0xFA4A423F);
  pkToolTipText[5]._Myres = 15;
  pkToolTipText[5]._Mysize = 0;
  pkToolTipText[5]._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &pkToolTipText[5],
    (const char *)v109,
    strlen((const char *)v109));
  LOBYTE(v150) = 7;
  i = 0;
  pcText = (char *)pkToolTipText;
  do
  {
    v137 = i + 1;
    _itoa(i + 1, acNum, 10);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strName, "BtnNor0", 7u);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strName, acNum, strlen(acNum));
    v110 = strName._Bx._Ptr;
    if ( strName._Myres < 0x10 )
      v110 = (const char *)&strName;
    v111 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, v110, &iLeft, &iTop, 0);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strName, "BtnOver0", 8u);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strName, acNum, strlen(acNum));
    v112 = strName._Bx._Ptr;
    if ( strName._Myres < 0x10 )
      v112 = (const char *)&strName;
    PgSprData::Add(v111, (NiAVObject *)&spNode.m_pObject->vfptr, v112);
    pkTab = ColumnBut::CreateWin(iLeft, iTop, v111, (PgWin *)&v2->vfptr, i, 0);
    v113 = (unsigned int)v2->m_pkHouseTabList._Mylast;
    if ( (unsigned int)&pkTab >= v113
      || (v114 = (unsigned int)v2->m_pkHouseTabList._Myfirst, v114 > (unsigned int)&pkTab) )
    {
      v123 = v2->m_pkHouseTabList._Myend;
      if ( (ColumnBut **)v113 == v123 )
      {
        v124 = v2->m_pkHouseTabList._Myfirst;
        v125 = (signed int)(v113 - (_DWORD)v124) >> 2;
        if ( v125 > 0x3FFFFFFE )
LABEL_70:
          std::_Xlength_error("vector<T> too long");
        v126 = v125 + 1;
        v127 = v123 - v124;
        if ( v126 > v127 )
        {
          if ( 0x3FFFFFFF - (v127 >> 1) >= v127 )
            v128 = (v127 >> 1) + v127;
          else
            v128 = 0;
          if ( v128 < v126 )
            v128 = v126;
          std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
            (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&v2->m_pkHouseTabList,
            v128);
        }
      }
      v129 = v2->m_pkHouseTabList._Mylast;
      if ( v129 )
        *v129 = pkTab;
    }
    else
    {
      v115 = v2->m_pkHouseTabList._Myend;
      v116 = (signed int)((signed int)&pkTab - v114) >> 2;
      v139 = (signed int)((signed int)&pkTab - v114) >> 2;
      if ( (ColumnBut **)v113 == v115 )
      {
        v117 = (signed int)(v113 - v114) >> 2;
        if ( v117 > 0x3FFFFFFE )
          goto LABEL_70;
        v118 = v117 + 1;
        v119 = (signed int)((signed int)v115 - v114) >> 2;
        if ( v118 > v119 )
        {
          if ( 0x3FFFFFFF - (v119 >> 1) >= v119 )
            v120 = (v119 >> 1) + v119;
          else
            v120 = 0;
          if ( v120 < v118 )
            v120 = v118;
          std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
            (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)&v2->m_pkHouseTabList,
            v120);
          v116 = v139;
        }
      }
      v121 = &v2->m_pkHouseTabList._Myfirst[v116];
      v122 = v2->m_pkHouseTabList._Mylast;
      if ( v122 )
        *v122 = *v121;
    }
    v130 = pcText;
    ++v2->m_pkHouseTabList._Mylast;
    if ( *((_DWORD *)v130 + 5) >= 0x10u )
      v130 = *(char **)v130;
    v131 = i;
    PgWin::SetToolTipWinText((PgWin *)&v2->m_pkHouseTabList._Myfirst[i]->vfptr, v130);
    v132 = v2->m_pkHouseTabList._Myfirst[v131];
    pcText += 28;
    v132->m_pkToolTipWin = g_pkToolTipWin;
    i = v137;
  }
  while ( v137 < 6 );
  (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v2->m_pkHouseTabList._Myfirst + 1) + 240))(0);
  v133 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &iLeft, &iTop, 0);
  PgSprData::Add(v133, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(v133, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinBut::CreateWin(iLeft, iTop, v133, (PgWin *)&v2->vfptr, 0xAu, 0, 0);
  v134 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    v135 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &iLeft, &iTop, v134);
    PgSprData::Add(v135, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(v135, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(iLeft, iTop, v135, (PgWin *)&v2->vfptr, 0xBu, 0, 0);
  }
  v2->vfptr[130].__vecDelDtor((NiRefObject *)v2, 0);
  ((void (__thiscall *)(mhSettingWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    1.0,
    0.43000001);
  LOBYTE(v150) = 1;
  `eh vector destructor iterator'(
    pkToolTipText,
    0x1Cu,
    6,
    (void (__thiscall *)(void *))std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>);
  if ( strName._Myres >= 0x10 )
    operator delete(strName._Bx._Ptr);
  v136 = spNode.m_pObject;
  strName._Myres = 15;
  strName._Mysize = 0;
  strName._Bx._Buf[0] = 0;
  v150 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v136 )
    v136->vfptr->__vecDelDtor((NiRefObject *)v136, 1u);
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006D93E0) --------------------------------------------------------
void __thiscall mhSettingWin::CheckEnable(mhSettingWin *this, mhSettingWin::CheckBoxIndex eIndex, int bEnable, int bShow)
{
  mhSettingWin *v4; // esi@1
  NiRefObjectVtbl *v5; // edx@2

  v4 = this;
  this->m_spCheckBox[eIndex]->m_bCheck = bShow;
  ((void (__stdcall *)(_DWORD))this->m_spCheckBox[eIndex]->vfptr[60].__vecDelDtor)(bEnable);
  if ( eIndex == Box_PassWord )
  {
    v5 = v4->m_spEdit[2].m_pObject->vfptr;
    if ( (_BYTE)bEnable )
    {
      ((void (__stdcall *)(_DWORD))v5[60].__vecDelDtor)(bEnable);
      ((void (__stdcall *)(_DWORD))v4->m_spEdit[2].m_pObject->vfptr[64].__vecDelDtor)(bShow);
    }
    else
    {
      ((void (__stdcall *)(_DWORD))v5[121].__vecDelDtor)(1);
    }
  }
}

//----- (006D9460) --------------------------------------------------------
mhSettingWin *__thiscall mhSettingWin::`scalar deleting destructor'(mhSettingWin *this, unsigned int a2)
{
  mhSettingWin *v2; // esi@1

  v2 = this;
  mhSettingWin::~mhSettingWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006D9490) --------------------------------------------------------
int (__thiscall ***__cdecl ChargedItemList::GetList())(void *p, char)
{
  return &ChargedItemList::ms_kUsingList;
}
// A77E04: using guessed type int (__thiscall **ChargedItemList::ms_kUsingList)(void *p, char);

//----- (006D94A0) --------------------------------------------------------
void __cdecl ChargedItemList::Clear()
{
  int v0; // eax@2
  int v1; // ecx@2
  void *v2; // esi@5

  while ( dword_A77E10 )
  {
    v0 = dword_A77E08;
    v1 = *(_DWORD *)dword_A77E08;
    dword_A77E08 = v1;
    if ( v1 )
      *(_DWORD *)(v1 + 4) = 0;
    else
      dword_A77E0C = 0;
    v2 = *(void **)(v0 + 8);
    ChargedItemList::ms_kUsingList[2](&ChargedItemList::ms_kUsingList, v0);
    --dword_A77E10;
    operator delete(v2);
  }
}
// A77E04: using guessed type int (__thiscall **ChargedItemList::ms_kUsingList)(void *p, char);
// A77E08: using guessed type int dword_A77E08;
// A77E0C: using guessed type int dword_A77E0C;
// A77E10: using guessed type int dword_A77E10;

//----- (006D9500) --------------------------------------------------------
bool __cdecl ChargedItemList::IsActiveChargedTimeLimitItem(Item *pkItem)
{
  bool result; // al@2

  if ( pkItem
    && pkItem->m_pkInfo->ItemGradeType == 4
    && ((int (__thiscall *)(Item *))pkItem->vfptr[11].__vecDelDtor)(pkItem)
    && *(_BYTE *)((int (__thiscall *)(_DWORD))pkItem->vfptr[11].__vecDelDtor)(pkItem) )
  {
    result = *(_BYTE *)((int (__thiscall *)(Item *))pkItem->vfptr[11].__vecDelDtor)(pkItem) != -1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006D9550) --------------------------------------------------------
void __cdecl ChargedItemList::AddUsingItem(PROTO_CHARGEDBUFF_INFO *pkInfo)
{
  unsigned int *v1; // eax@1
  unsigned int *v2; // esi@1
  int v3; // eax@1

  v1 = (unsigned int *)operator new(0xEu);
  v2 = v1;
  *v1 = pkInfo->ChargedBuffKey;
  v1[1] = *(_DWORD *)&pkInfo->ChargedBuffID;
  v1[2] = *(unsigned int *)((char *)&pkInfo->UseTime + 2);
  *((_WORD *)v1 + 6) = *((_WORD *)&pkInfo->EndTime + 1);
  v3 = ((int (__thiscall *)(_DWORD))ChargedItemList::ms_kUsingList[1])(&ChargedItemList::ms_kUsingList);
  *(_DWORD *)(v3 + 8) = v2;
  *(_DWORD *)v3 = 0;
  *(_DWORD *)(v3 + 4) = dword_A77E0C;
  if ( dword_A77E0C )
  {
    *(_DWORD *)dword_A77E0C = v3;
    ++dword_A77E10;
    dword_A77E0C = v3;
  }
  else
  {
    ++dword_A77E10;
    dword_A77E08 = v3;
    dword_A77E0C = v3;
  }
}
// A77E04: using guessed type int (__thiscall **ChargedItemList::ms_kUsingList)(void *p, char);
// A77E08: using guessed type int dword_A77E08;
// A77E0C: using guessed type int dword_A77E0C;
// A77E10: using guessed type int dword_A77E10;

//----- (006D95D0) --------------------------------------------------------
void __cdecl ChargedItemList::DelUsingItem(unsigned int ChargedBuffKey)
{
  int *v1; // ecx@1
  int v2; // edi@1
  _DWORD *v3; // edx@2
  void **v4; // esi@2
  int v5; // eax@2
  int v6; // ecx@4
  void *v7; // esi@5
  _DWORD *v8; // ecx@8
  _DWORD *v9; // ecx@11
  int v10; // edx@11

  v1 = (int *)dword_A77E08;
  v2 = dword_A77E08;
  while ( v2 )
  {
    v3 = *(_DWORD **)(v2 + 8);
    v4 = (void **)(v2 + 8);
    v5 = v2;
    v2 = *(_DWORD *)v2;
    if ( *v3 == ChargedBuffKey )
    {
      if ( (int *)v5 == v1 )
      {
        v5 = (int)v1;
        v6 = *v1;
        dword_A77E08 = v6;
        if ( v6 )
        {
          *(_DWORD *)(v6 + 4) = 0;
          v7 = *(void **)(v5 + 8);
        }
        else
        {
          dword_A77E0C = 0;
          v7 = *(void **)(v5 + 8);
        }
      }
      else if ( v5 == dword_A77E0C )
      {
        v5 = dword_A77E0C;
        v8 = *(_DWORD **)(dword_A77E0C + 4);
        dword_A77E0C = (int)v8;
        if ( v8 )
        {
          *v8 = 0;
          v7 = *(void **)(v5 + 8);
        }
        else
        {
          dword_A77E08 = 0;
          v7 = *(void **)(v5 + 8);
        }
      }
      else
      {
        v9 = *(_DWORD **)(v5 + 4);
        v10 = *(_DWORD *)v5;
        if ( v9 )
          *v9 = v10;
        if ( v10 )
          *(_DWORD *)(v10 + 4) = v9;
        v7 = *v4;
      }
      ChargedItemList::ms_kUsingList[2](&ChargedItemList::ms_kUsingList, v5);
      --dword_A77E10;
      operator delete(v7);
      v1 = (int *)dword_A77E08;
    }
  }
}
// A77E04: using guessed type int (__thiscall **ChargedItemList::ms_kUsingList)(void *p, char);
// A77E08: using guessed type int dword_A77E08;
// A77E0C: using guessed type int dword_A77E0C;
// A77E10: using guessed type int dword_A77E10;

//----- (006D96C0) --------------------------------------------------------
int __cdecl ChargedItemList::GetTimeLimitMiniHouseInvenCount()
{
  int v0; // ebx@1
  char *v1; // edi@1
  int v2; // esi@2

  v0 = 0;
  v1 = (char *)g_kInventory.m_aspMiniHouseInv;
  do
  {
    v2 = *(_DWORD *)v1;
    if ( *(_DWORD *)v1
      && *(_DWORD *)(*(_DWORD *)(v2 + 112) + 118) == 4
      && (*(int (__thiscall **)(int))(*(_DWORD *)v2 + 44))(*(_DWORD *)v1)
      && *(_BYTE *)(*(int (__thiscall **)(int))(*(_DWORD *)v2 + 44))(v2)
      && *(_BYTE *)(*(int (__thiscall **)(int))(*(_DWORD *)v2 + 44))(v2) != -1 )
    {
      ++v0;
    }
    v1 += 4;
  }
  while ( (signed int)v1 < (signed int)g_kInventory.m_aspMiniHouseEquip );
  return v0;
}

//----- (006D9720) --------------------------------------------------------
int __cdecl ChargedItemList::GetTimeLimitMiniHouseEquipCount()
{
  int v0; // ebx@1
  char *v1; // edi@1
  int v2; // esi@2

  v0 = 0;
  v1 = (char *)g_kInventory.m_aspMiniHouseEquip;
  do
  {
    v2 = *(_DWORD *)v1;
    if ( *(_DWORD *)v1
      && *(_DWORD *)(*(_DWORD *)(v2 + 112) + 118) == 4
      && (*(int (__thiscall **)(int))(*(_DWORD *)v2 + 44))(*(_DWORD *)v1)
      && *(_BYTE *)(*(int (__thiscall **)(int))(*(_DWORD *)v2 + 44))(v2)
      && *(_BYTE *)(*(int (__thiscall **)(int))(*(_DWORD *)v2 + 44))(v2) != -1 )
    {
      ++v0;
    }
    v1 += 4;
  }
  while ( (signed int)v1 < (signed int)g_kInventory.m_aspMiniHouseFurnitureItemInv );
  return v0;
}

//----- (006D9780) --------------------------------------------------------
Item *__cdecl ChargedItemList::GetTimeLimitMiniHouseInven(unsigned int uiIndex)
{
  unsigned int v1; // ebx@1
  int v2; // edi@1
  Item *v3; // esi@2

  v1 = uiIndex;
  v2 = 0;
  while ( 1 )
  {
    v3 = g_kInventory.m_aspMiniHouseInv[v2].m_pObject;
    if ( !v3
      || v3->m_pkInfo->ItemGradeType != 4
      || !((int (__thiscall *)(Item *))v3->vfptr[11].__vecDelDtor)(g_kInventory.m_aspMiniHouseInv[v2].m_pObject)
      || !*(_BYTE *)((int (__thiscall *)(Item *))v3->vfptr[11].__vecDelDtor)(v3)
      || *(_BYTE *)((int (__thiscall *)(_DWORD))v3->vfptr[11].__vecDelDtor)(v3) == -1 )
    {
      goto LABEL_9;
    }
    if ( !v1 )
      return g_kInventory.m_aspMiniHouseInv[v2].m_pObject;
    --v1;
LABEL_9:
    if ( ++v2 >= 192 )
      return 0;
  }
}

//----- (006D97F0) --------------------------------------------------------
Item *__cdecl ChargedItemList::GetTimeLimitMiniHouseEquip(unsigned int uiIndex)
{
  unsigned int v1; // ebx@1
  int v2; // edi@1
  Item *v3; // esi@2

  v1 = uiIndex;
  v2 = 0;
  while ( 1 )
  {
    v3 = g_kInventory.m_aspMiniHouseEquip[v2].m_pObject;
    if ( !v3
      || v3->m_pkInfo->ItemGradeType != 4
      || !((int (__thiscall *)(Item *))v3->vfptr[11].__vecDelDtor)(g_kInventory.m_aspMiniHouseEquip[v2].m_pObject)
      || !*(_BYTE *)((int (__thiscall *)(Item *))v3->vfptr[11].__vecDelDtor)(v3)
      || *(_BYTE *)((int (__thiscall *)(_DWORD))v3->vfptr[11].__vecDelDtor)(v3) == -1 )
    {
      goto LABEL_9;
    }
    if ( !v1 )
      return g_kInventory.m_aspMiniHouseEquip[v2].m_pObject;
    --v1;
LABEL_9:
    if ( ++v2 >= 11 )
      return 0;
  }
}

//----- (006D9860) --------------------------------------------------------
int __cdecl ChargedItemList::GetTimeLimitCharInvenCount()
{
  signed int v0; // edi@1
  int v1; // ebx@1
  bool v2; // cf@1
  Item *v3; // esi@3

  v0 = 0;
  v1 = 0;
  v2 = 1;
  do
  {
    if ( v2 )
    {
      v3 = g_kInventory.m_aspInv[v0].m_pObject;
      if ( v3 )
      {
        if ( v3->m_pkInfo->ItemGradeType == 4
          && ((int (__thiscall *)(Item *))v3->vfptr[11].__vecDelDtor)(g_kInventory.m_aspInv[v0].m_pObject)
          && *(_BYTE *)((int (__thiscall *)(Item *))v3->vfptr[11].__vecDelDtor)(v3)
          && *(_BYTE *)((int (__thiscall *)(_DWORD))v3->vfptr[11].__vecDelDtor)(v3) != -1 )
        {
          ++v1;
        }
      }
    }
    v2 = (unsigned int)++v0 < 0xC0;
  }
  while ( v0 < 192 );
  return v1;
}

//----- (006D98C0) --------------------------------------------------------
int __cdecl ChargedItemList::GetTimeLimitCharEquipCount()
{
  signed int v0; // edi@1
  int v1; // ebx@1
  bool v2; // cf@1
  Item *v3; // esi@3

  v0 = 0;
  v1 = 0;
  v2 = 1;
  do
  {
    if ( v2 )
    {
      v3 = g_kInventory.m_aspEquip[v0].m_pObject;
      if ( v3 )
      {
        if ( v3->m_pkInfo->ItemGradeType == 4
          && ((int (__thiscall *)(Item *))v3->vfptr[11].__vecDelDtor)(g_kInventory.m_aspEquip[v0].m_pObject)
          && *(_BYTE *)((int (__thiscall *)(Item *))v3->vfptr[11].__vecDelDtor)(v3)
          && *(_BYTE *)((int (__thiscall *)(_DWORD))v3->vfptr[11].__vecDelDtor)(v3) != -1 )
        {
          ++v1;
        }
      }
    }
    v2 = (unsigned int)++v0 < 0x1E;
  }
  while ( v0 < 30 );
  return v1;
}

//----- (006D9920) --------------------------------------------------------
int __cdecl ChargedItemList::GetTimeLimitCharItemCount()
{
  int v0; // esi@1

  v0 = ChargedItemList::GetTimeLimitCharInvenCount();
  return v0 + ChargedItemList::GetTimeLimitCharEquipCount();
}

//----- (006D9940) --------------------------------------------------------
Item *__cdecl ChargedItemList::GetTimeLimitCharInven(unsigned int uiIndex)
{
  unsigned int v1; // ebx@1
  signed int v2; // edi@1
  bool v3; // cf@1
  Item *v4; // esi@3

  v1 = uiIndex;
  v2 = 0;
  v3 = 1;
  while ( 1 )
  {
    if ( !v3 )
      goto LABEL_10;
    v4 = g_kInventory.m_aspInv[v2].m_pObject;
    if ( !v4
      || v4->m_pkInfo->ItemGradeType != 4
      || !((int (__thiscall *)(Item *))v4->vfptr[11].__vecDelDtor)(g_kInventory.m_aspInv[v2].m_pObject)
      || !*(_BYTE *)((int (__thiscall *)(Item *))v4->vfptr[11].__vecDelDtor)(v4)
      || *(_BYTE *)((int (__thiscall *)(_DWORD))v4->vfptr[11].__vecDelDtor)(v4) == -1 )
    {
      goto LABEL_10;
    }
    if ( !v1 )
      return g_kInventory.m_aspInv[v2].m_pObject;
    --v1;
LABEL_10:
    v3 = (unsigned int)++v2 < 0xC0;
    if ( v2 >= 192 )
      return 0;
  }
}

//----- (006D99C0) --------------------------------------------------------
Item *__cdecl ChargedItemList::GetTimeLimitCharEquip(unsigned int uiIndex)
{
  unsigned int v1; // ebx@1
  signed int v2; // edi@1
  bool v3; // cf@1
  Item *v4; // esi@3

  v1 = uiIndex;
  v2 = 0;
  v3 = 1;
  while ( 1 )
  {
    if ( !v3 )
      goto LABEL_10;
    v4 = g_kInventory.m_aspEquip[v2].m_pObject;
    if ( !v4
      || v4->m_pkInfo->ItemGradeType != 4
      || !((int (__thiscall *)(Item *))v4->vfptr[11].__vecDelDtor)(g_kInventory.m_aspEquip[v2].m_pObject)
      || !*(_BYTE *)((int (__thiscall *)(Item *))v4->vfptr[11].__vecDelDtor)(v4)
      || *(_BYTE *)((int (__thiscall *)(_DWORD))v4->vfptr[11].__vecDelDtor)(v4) == -1 )
    {
      goto LABEL_10;
    }
    if ( !v1 )
      return g_kInventory.m_aspEquip[v2].m_pObject;
    --v1;
LABEL_10:
    v3 = (unsigned int)++v2 < 0x1E;
    if ( v2 >= 30 )
      return 0;
  }
}

//----- (006D9A30) --------------------------------------------------------
Item *__cdecl ChargedItemList::GetTimeLimitCharItem(unsigned int uiIndex)
{
  unsigned int v1; // eax@1
  Item *result; // eax@2

  v1 = ChargedItemList::GetTimeLimitCharEquipCount();
  if ( uiIndex >= v1 )
    result = ChargedItemList::GetTimeLimitCharInven(uiIndex - v1);
  else
    result = ChargedItemList::GetTimeLimitCharEquip(uiIndex);
  return result;
}

//----- (006D9A60) --------------------------------------------------------
char __cdecl ChargedItemList::IsEffecting(EffectEnumerate eEffect)
{
  int v1; // edi@1
  int v2; // eax@2
  __int16 v3; // bx@2
  unsigned int v4; // esi@2
  char *v5; // eax@3
  char result; // al@9

  v1 = dword_A77E08;
  if ( dword_A77E08 )
  {
    while ( 1 )
    {
      v2 = *(_DWORD *)(v1 + 8);
      v1 = *(_DWORD *)v1;
      v3 = *(_WORD *)(v2 + 4);
      v4 = 0;
      if ( ITableBase<ChargedItemEffect,ChargedEffectTable>::GetTotal() )
      {
        while ( 1 )
        {
          v5 = CDataReader::GetRecord(
                 (CDataReader *)(ITableBase<ChargedItemEffect,ChargedEffectTable>::ms_pkTable + 4),
                 v4);
          if ( v5 )
          {
            if ( *(_WORD *)v5 == v3 )
              break;
          }
          if ( ++v4 >= ITableBase<ChargedItemEffect,ChargedEffectTable>::GetTotal() )
            goto LABEL_8;
        }
        if ( *((_DWORD *)v5 + 9) == eEffect )
          break;
      }
LABEL_8:
      if ( !v1 )
        goto LABEL_9;
    }
    result = 1;
  }
  else
  {
LABEL_9:
    result = 0;
  }
  return result;
}
// A77E08: using guessed type int dword_A77E08;
// A886E0: using guessed type int ITableBase<ChargedItemEffect,ChargedEffectTable>::ms_pkTable;

//----- (006D9AD0) --------------------------------------------------------
bool __cdecl ChargedItemList::GetTotalEffectingValue(EffectEnumerate eEffect, unsigned int *rdwTotalEffectValue)
{
  int v2; // edi@1
  bool result; // al@1
  __int16 v4; // bx@2
  unsigned int v5; // esi@2
  char *v6; // eax@3
  bool bEffecting; // [sp+7h] [bp-1h]@1

  *rdwTotalEffectValue = 0;
  v2 = dword_A77E08;
  result = 0;
  bEffecting = 0;
  if ( dword_A77E08 )
  {
    do
    {
      v4 = *(_WORD *)(*(_DWORD *)(v2 + 8) + 4);
      v2 = *(_DWORD *)v2;
      v5 = 0;
      if ( ITableBase<ChargedItemEffect,ChargedEffectTable>::GetTotal() )
      {
        while ( 1 )
        {
          v6 = CDataReader::GetRecord(
                 (CDataReader *)(ITableBase<ChargedItemEffect,ChargedEffectTable>::ms_pkTable + 4),
                 v5);
          if ( v6 )
          {
            if ( *(_WORD *)v6 == v4 )
              break;
          }
          if ( ++v5 >= ITableBase<ChargedItemEffect,ChargedEffectTable>::GetTotal() )
            goto LABEL_9;
        }
        if ( *((_DWORD *)v6 + 9) == eEffect )
        {
          *rdwTotalEffectValue += *((_WORD *)v6 + 20);
          bEffecting = 1;
        }
      }
LABEL_9:
      ;
    }
    while ( v2 );
    result = bEffecting;
  }
  return result;
}
// A77E08: using guessed type int dword_A77E08;
// A886E0: using guessed type int ITableBase<ChargedItemEffect,ChargedEffectTable>::ms_pkTable;

//----- (006D9B60) --------------------------------------------------------
int __cdecl ChargedItemList::GetTimeLimitMiniHouseItemCount()
{
  int v0; // esi@1

  v0 = ChargedItemList::GetTimeLimitMiniHouseInvenCount();
  return v0 + ChargedItemList::GetTimeLimitMiniHouseEquipCount();
}

//----- (006D9B80) --------------------------------------------------------
Item *__cdecl ChargedItemList::GetTimeLimitMiniHouseItem(unsigned int uiIndex)
{
  unsigned int v1; // eax@1
  Item *result; // eax@2

  v1 = ChargedItemList::GetTimeLimitMiniHouseEquipCount();
  if ( uiIndex >= v1 )
    result = ChargedItemList::GetTimeLimitMiniHouseInven(uiIndex - v1);
  else
    result = ChargedItemList::GetTimeLimitMiniHouseEquip(uiIndex);
  return result;
}

//----- (006D9BB0) --------------------------------------------------------
int __cdecl ChargedItemList::GetTimeLimitItemCount()
{
  int v0; // edi@1
  int v1; // edi@1
  int v2; // edi@1

  v0 = ChargedItemList::GetTimeLimitCharInvenCount();
  v1 = ChargedItemList::GetTimeLimitCharEquipCount() + v0;
  v2 = ChargedItemList::GetTimeLimitMiniHouseInvenCount() + v1;
  return v2 + ChargedItemList::GetTimeLimitMiniHouseEquipCount();
}

//----- (006D9BE0) --------------------------------------------------------
const char *__cdecl ChargedItemList::GetEffectID(EffectEnumerate eEffect)
{
  int v1; // edi@1
  int v2; // eax@2
  __int16 v3; // bx@2
  unsigned int v4; // esi@2
  char *v5; // eax@3
  const char *result; // eax@9

  v1 = dword_A77E08;
  if ( dword_A77E08 )
  {
    while ( 1 )
    {
      v2 = *(_DWORD *)(v1 + 8);
      v1 = *(_DWORD *)v1;
      v3 = *(_WORD *)(v2 + 4);
      v4 = 0;
      if ( ITableBase<ChargedItemEffect,ChargedEffectTable>::GetTotal() )
      {
        while ( 1 )
        {
          v5 = CDataReader::GetRecord(
                 (CDataReader *)(ITableBase<ChargedItemEffect,ChargedEffectTable>::ms_pkTable + 4),
                 v4);
          if ( v5 )
          {
            if ( *(_WORD *)v5 == v3 )
              break;
          }
          if ( ++v4 >= ITableBase<ChargedItemEffect,ChargedEffectTable>::GetTotal() )
            goto LABEL_8;
        }
        if ( *((_DWORD *)v5 + 9) == eEffect )
          break;
      }
LABEL_8:
      if ( !v1 )
        goto LABEL_9;
    }
    result = v5 + 2;
  }
  else
  {
LABEL_9:
    result = 0;
  }
  return result;
}
// A77E08: using guessed type int dword_A77E08;
// A886E0: using guessed type int ITableBase<ChargedItemEffect,ChargedEffectTable>::ms_pkTable;

//----- (006D9C50) --------------------------------------------------------
void __thiscall NiTListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *>::~NiTListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *>(NiTListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *> *this)
{
  this->vfptr = (NiTListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *>Vtbl *)&NiTListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *>::`vftable';
}
// 9C2878: using guessed type int (__thiscall *NiTListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *>::`vftable')(void *p, char);

//----- (006D9C60) --------------------------------------------------------
NiTListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *> *__thiscall NiTListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *>::`scalar deleting destructor'(NiTListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *> *this, unsigned int a2)
{
  NiTListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *>Vtbl *)&NiTListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9C2878: using guessed type int (__thiscall *NiTListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *>::`vftable')(void *p, char);

//----- (006D9C90) --------------------------------------------------------
NiTPointerListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *> *__thiscall NiTList<PROTO_CHARGEDBUFF_INFO *>::`scalar deleting destructor'(NiTPointerListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *> *this, unsigned int a2)
{
  NiTPointerListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *> *v2; // edi@1
  NiTListItem<PROTO_CHARGEDBUFF_INFO *> *v3; // esi@1
  NiTListItem<PROTO_CHARGEDBUFF_INFO *> *v4; // ST00_4@2

  v2 = this;
  this->vfptr = (NiTListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *>Vtbl *)&NiTPointerListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *>::`vftable';
  v3 = this->m_pkHead;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    v2->vfptr->DeleteItem((NiTListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *> *)v2, v4);
  }
  v2->m_kAllocator.m_uiCount = 0;
  v2->m_pkHead = 0;
  v2->m_pkTail = 0;
  v2->vfptr = (NiTListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *>Vtbl *)&NiTListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *>::`vftable';
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C2878: using guessed type int (__thiscall *NiTListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *>::`vftable')(void *p, char);
// 9C2888: using guessed type int (__thiscall *NiTPointerListBase<DFALL<PROTO_CHARGEDBUFF_INFO *>,PROTO_CHARGEDBUFF_INFO *>::`vftable')(void *p, char);

//----- (006D9D20) --------------------------------------------------------
void __thiscall Net::Net(Net *this)
{
  Net *v1; // esi@1

  v1 = this;
  PgNet::PgNet((PgNet *)&this->vfptr);
  v1->m_fLastHeartBeatTime = -1.0;
  v1->vfptr = (NiRefObjectVtbl *)&Net::`vftable';
  v1->m_bEnableHeartBeat = 0;
}
// 9C28C8: using guessed type int (__thiscall *Net::`vftable')(void *p, char);

//----- (006D9D50) --------------------------------------------------------
void __thiscall Net::~Net(Net *this)
{
  this->vfptr = (NiRefObjectVtbl *)&Net::`vftable';
  PgNet::~PgNet((PgNet *)&this->vfptr);
}
// 9C28C8: using guessed type int (__thiscall *Net::`vftable')(void *p, char);

//----- (006D9D60) --------------------------------------------------------
char __thiscall Net::Connect(Net *this)
{
  Net *v1; // esi@1
  char v2; // bl@1

  v1 = this;
  v2 = PgNet::Connect((PgNet *)&this->vfptr);
  v1->vfptr[8].__vecDelDtor((NiRefObject *)v1, 0);
  return v2;
}

//----- (006D9D80) --------------------------------------------------------
char __thiscall Net::Connect(Net *this, int a1, int a2, int a3, int a4, int port)
{
  return PgNet::Connect((PgNet *)&this->vfptr, a1, a2, a3, a4, port);
}

//----- (006D9D90) --------------------------------------------------------
void __thiscall Net::Update(Net *this, float fTime)
{
  PgNet::Update((PgNet *)&this->vfptr, fTime);
}

//----- (006D9DB0) --------------------------------------------------------
void __thiscall Net::EnableHeartBeat(Net *this, bool b)
{
  this->m_bEnableHeartBeat = b;
}

//----- (006D9DC0) --------------------------------------------------------
void __thiscall Net::NcMiscGameTimeReq(Net *this)
{
  Net *netcmd; // [sp+0h] [bp-4h]@1

  netcmd = this;
  LOWORD(netcmd) = 2061;
  PgNet::SendNetMsg((PgNet *)&this->vfptr, &netcmd, 2);
}

//----- (006D9DE0) --------------------------------------------------------
void __thiscall Net::ChangeSeed(Net *this, unsigned __int16 wSeed)
{
  Net *v2; // esi@1
  NiRefObjectVtbl *v3; // eax@1
  PgSocket *v4; // ecx@1

  v2 = this;
  v3 = this->vfptr;
  this->m_fLastHeartBeatTime = Timer::ms_fCurTime;
  ((void (__stdcall *)(_DWORD))v3[8].__vecDelDtor)(1);
  v4 = v2->m_pkSocket;
  if ( v4 )
    PgSocket::RepositionSendEncryptTableInx(v4, wSeed);
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006D9E10) --------------------------------------------------------
bool __thiscall Net::IsPingTimeOver(Net *this)
{
  return Timer::ms_fCurTime - this->m_fLastHeartBeatTime >= 10.0;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006D9E30) --------------------------------------------------------
void __thiscall Net::NcMiscHeartbeatAck(Net *this)
{
  Net *v1; // esi@1
  NETCOMMAND netcmd; // [sp+4h] [bp-4h]@2

  v1 = this;
  PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  GameFrameWork::ClientSecurity();
  if ( v1->m_bEnableHeartBeat )
  {
    netcmd.protocol = 2053;
    PgNet::SendNetMsg((PgNet *)&v1->vfptr, &netcmd, 2);
    v1->m_fLastHeartBeatTime = Timer::ms_fCurTime;
    PgNet::Flush((PgNet *)&v1->vfptr);
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006D9E90) --------------------------------------------------------
char __stdcall Net::On_NC_MISC_GAMETIME_ACK(int iRevBytes, void *pvData)
{
  Server::SetGameTime(&g_kServer, (PROTO_NC_MISC_GAMETIME_ACK *)pvData, Timer::ms_fCurTime);
  return 1;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006D9EC0) --------------------------------------------------------
char __thiscall Net::On_NC_MISC_HEARTBEAT_REQ(Net *this, int iRevBytes, void *pvData)
{
  Net *v3; // esi@1
  __int16 pdata; // [sp+4h] [bp-4h]@3

  v3 = this;
  if ( this->m_bEnableHeartBeat )
  {
    PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    GameFrameWork::ClientSecurity();
    if ( v3->m_bEnableHeartBeat )
    {
      pdata = 2053;
      PgNet::SendNetMsg((PgNet *)&v3->vfptr, &pdata, 2);
      v3->m_fLastHeartBeatTime = Timer::ms_fCurTime;
      PgNet::Flush((PgNet *)&v3->vfptr);
    }
    PgNet::Flush((PgNet *)&v3->vfptr);
  }
  return 1;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006D9F30) --------------------------------------------------------
char __stdcall Net::On_NC_MISC_APEX_SERVER_DATA_CMD(int iRevBytes, void *pvData)
{
  return 1;
}

//----- (006D9F40) --------------------------------------------------------
void __thiscall NetMgr::SendHeartBeat2WorldMgrServer(NetMgr *this)
{
  NetMgr *v1; // esi@1
  Net *v2; // ecx@1

  v1 = this;
  v2 = this->m_spWorldMgr.m_pObject;
  if ( v2 )
  {
    if ( (unsigned __int8)((int (*)(void))v2->vfptr[10].__vecDelDtor)() )
      Net::NcMiscHeartbeatAck(v1->m_spWorldMgr.m_pObject);
  }
}

//----- (006D9F60) --------------------------------------------------------
void __thiscall NetMgr::SendNetMsgWorldMgr(NetMgr *this, unsigned __int16 department, unsigned __int16 command, void *pProto, int nDataLength)
{
  NetMgr *v5; // esi@1
  Net *v6; // ecx@1

  v5 = this;
  v6 = this->m_spWorldMgr.m_pObject;
  if ( v6 )
  {
    command = (department << 10) | command & 0x3FF;
    PgNet::AddNetMsg((PgNet *)&v6->vfptr, &command, 2);
    PgNet::SendNetMsg((PgNet *)&v5->m_spWorldMgr.m_pObject->vfptr, pProto, nDataLength);
  }
}

//----- (006D9FB0) --------------------------------------------------------
char __thiscall Net::ProcessNetMsg(Net *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  char result; // al@1

  result = 0;
  if ( iDepart == 2 )
  {
    switch ( iCommand )
    {
      case 4:
        result = Net::On_NC_MISC_HEARTBEAT_REQ(this, iRevBytes, pvData);
        break;
      case 14:
        Server::SetGameTime(&g_kServer, (PROTO_NC_MISC_GAMETIME_ACK *)pvData, Timer::ms_fCurTime);
        result = 1;
        break;
      case 25:
        result = 1;
        break;
    }
  }
  return result;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006DA010) --------------------------------------------------------
void __thiscall NetMgr::~NetMgr(NetMgr *this)
{
  NetMgr *v1; // edi@1
  Net *v2; // esi@1
  Net *v3; // esi@5

  v1 = this;
  this->vfptr = (NetMgrVtbl *)&NetMgr::`vftable';
  v2 = this->m_spWorldMgr.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_spLogin.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  `eh vector destructor iterator'(
    v1->m_spZone,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
}
// 9C28F8: using guessed type int (__thiscall *NetMgr::`vftable')(void *p, char);

//----- (006DA0C0) --------------------------------------------------------
char __thiscall NetMgr::Init(NetMgr *this)
{
  NetMgr *v1; // ebx@1
  PgNet *v2; // eax@1
  PgNet *v3; // esi@1
  Net *v4; // edi@1
  Net *v5; // esi@3
  PgNet *v6; // eax@10
  PgNet *v7; // esi@10
  Net *v8; // edi@11
  Net *v9; // esi@13
  NiPointer<Net> *v10; // ebx@20
  PgNet *v11; // eax@21
  PgNet *v12; // esi@21
  NiRefObjectVtbl **v13; // edi@24
  NiRefObjectVtbl **v14; // edi@31
  NiRefObjectVtbl *v15; // esi@31
  char *v16; // eax@31
  int i; // [sp+14h] [bp-10h]@20

  v1 = this;
  v2 = (PgNet *)operator new(0x1006Cu);
  v3 = v2;
  v4 = 0;
  if ( v2 )
  {
    PgNet::PgNet(v2);
    *(float *)&v3[1].vfptr = -1.0;
    v3->vfptr = (NiRefObjectVtbl *)&Net::`vftable';
    LOBYTE(v3[1].m_uiRefCount) = 0;
    v4 = (Net *)v3;
  }
  v5 = v1->m_spLogin.m_pObject;
  if ( v5 != v4 )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spLogin.m_pObject = v4;
    if ( v4 )
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  }
  ((void (__stdcall *)(_DWORD))v1->m_spLogin.m_pObject->vfptr[9].__vecDelDtor)("LogIn");
  v6 = (PgNet *)operator new(0x1006Cu);
  v7 = v6;
  if ( v6 )
  {
    PgNet::PgNet(v6);
    *(float *)&v7[1].vfptr = -1.0;
    v7->vfptr = (NiRefObjectVtbl *)&Net::`vftable';
    LOBYTE(v7[1].m_uiRefCount) = 0;
    v8 = (Net *)v7;
  }
  else
  {
    v8 = 0;
  }
  v9 = v1->m_spWorldMgr.m_pObject;
  if ( v9 != v8 )
  {
    if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v1->m_spWorldMgr.m_pObject = v8;
    if ( v8 )
      InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  }
  ((void (__stdcall *)(_DWORD))v1->m_spWorldMgr.m_pObject->vfptr[9].__vecDelDtor)("WorldMgr");
  i = 0;
  v10 = v1->m_spZone;
  do
  {
    v11 = (PgNet *)operator new(0x1006Cu);
    v12 = v11;
    if ( v11 )
    {
      PgNet::PgNet(v11);
      *(float *)&v12[1].vfptr = -1.0;
      v12->vfptr = (NiRefObjectVtbl *)&Net::`vftable';
      LOBYTE(v12[1].m_uiRefCount) = 0;
    }
    else
    {
      v12 = 0;
    }
    v13 = &v10->m_pObject->vfptr;
    if ( (PgNet *)v10->m_pObject != v12 )
    {
      if ( v13 && !InterlockedDecrement((volatile LONG *)v13 + 1) && v13 )
        (*v13)->__vecDelDtor(v13, 1);
      v10->m_pObject = (Net *)v12;
      if ( v12 )
        InterlockedIncrement((volatile LONG *)&v12->m_uiRefCount);
    }
    v14 = &v10->m_pObject->vfptr;
    v15 = v10->m_pObject->vfptr;
    v16 = fs("Zone%d", i);
    v15[9].__vecDelDtor((NiRefObject *)v14, (unsigned int)v16);
    ++v10;
    ++i;
  }
  while ( i < 5 );
  return 1;
}
// 9C28C8: using guessed type int (__thiscall *Net::`vftable')(void *p, char);

//----- (006DA2E0) --------------------------------------------------------
void __thiscall NetMgr::Terminate(NetMgr *this)
{
  NetMgr *v1; // edi@1
  Net *v2; // esi@1
  Net *v3; // esi@6
  NiPointer<Net> *v4; // edi@11
  signed int v5; // ebx@11
  Net *v6; // esi@12

  v1 = this;
  v2 = this->m_spLogin.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spLogin.m_pObject = 0;
  }
  v3 = v1->m_spWorldMgr.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spWorldMgr.m_pObject = 0;
  }
  v4 = v1->m_spZone;
  v5 = 5;
  do
  {
    v6 = v4->m_pObject;
    if ( v4->m_pObject )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
      v4->m_pObject = 0;
    }
    ++v4;
    --v5;
  }
  while ( v5 );
}

//----- (006DA380) --------------------------------------------------------
void __thiscall NetMgr::Update(NetMgr *this, float fCurTime)
{
  NetMgr *v2; // esi@1
  Net *v3; // ecx@1
  Net *v4; // ecx@3
  Net *v5; // ecx@5

  v2 = this;
  v3 = this->m_spLogin.m_pObject;
  if ( v3 )
    ((void (__stdcall *)(_DWORD))v3->vfptr[5].__vecDelDtor)(LODWORD(fCurTime));
  v4 = v2->m_spWorldMgr.m_pObject;
  if ( v4 )
    ((void (__stdcall *)(_DWORD))v4->vfptr[5].__vecDelDtor)(LODWORD(fCurTime));
  v5 = v2->m_spZone[v2->m_iNowConnectedZone].m_pObject;
  if ( v5 )
    ((void (__stdcall *)(_DWORD))v5->vfptr[5].__vecDelDtor)(LODWORD(fCurTime));
}

//----- (006DA3D0) --------------------------------------------------------
void __thiscall NetMgr::CloseAll(NetMgr *this)
{
  NetMgr *v1; // esi@1
  Net *v2; // ecx@1
  PgNet *v3; // ecx@3
  PgNet *v4; // ecx@5

  v1 = this;
  v2 = this->m_spLogin.m_pObject;
  if ( v2 )
    PgNet::Close((PgNet *)&v2->vfptr);
  v3 = (PgNet *)&v1->m_spWorldMgr.m_pObject->vfptr;
  if ( v3 )
    PgNet::Close(v3);
  v4 = (PgNet *)&v1->m_spZone[v1->m_iNowConnectedZone].m_pObject->vfptr;
  if ( v4 )
    PgNet::Close(v4);
}

//----- (006DA400) --------------------------------------------------------
void __thiscall NetMgr::SendUserLogOutMsg2WorldMgrServerForCharSelect(NetMgr *this)
{
  NetMgr *v1; // esi@1
  Net *v2; // ecx@1
  PgNet *v3; // ecx@3
  DWORD v4; // ebx@5
  PgNet *v5; // ecx@7
  PgNet *v6; // esi@9
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  PROTO_NC_USER_NORMALLOGOUT_CMD kProto; // [sp+Bh] [bp-1h]@1

  v1 = this;
  v2 = this->m_spWorldMgr.m_pObject;
  netcmd.protocol = 3096;
  kProto.LogoutType = 1;
  if ( v2 )
  {
    PgNet::AddNetMsg((PgNet *)&v2->vfptr, &netcmd, 2);
    PgNet::SendNetMsg((PgNet *)&v1->m_spWorldMgr.m_pObject->vfptr, &kProto, 1);
    PgNet::Flush((PgNet *)&v1->m_spWorldMgr.m_pObject->vfptr);
  }
  v3 = (PgNet *)&v1->m_spZone[v1->m_iNowConnectedZone].m_pObject->vfptr;
  if ( v3 )
  {
    PgNet::AddNetMsg(v3, &netcmd, 2);
    PgNet::SendNetMsg((PgNet *)&v1->m_spZone[v1->m_iNowConnectedZone].m_pObject->vfptr, &kProto, 1);
    PgNet::Flush((PgNet *)&v1->m_spZone[v1->m_iNowConnectedZone].m_pObject->vfptr);
  }
  Sleep(1u);
  v4 = timeGetTime();
  while ( timeGetTime() - v4 < 0x3E8 )
    ;
  v5 = (PgNet *)&v1->m_spLogin.m_pObject->vfptr;
  if ( v5 )
    PgNet::Close(v5);
  v6 = (PgNet *)&v1->m_spZone[v1->m_iNowConnectedZone].m_pObject->vfptr;
  if ( v6 )
    PgNet::Close(v6);
}

//----- (006DA4C0) --------------------------------------------------------
void __thiscall NetMgr::SendUserLogOutMsg2AllServer(NetMgr *this)
{
  NetMgr *v1; // esi@1
  Net *v2; // ecx@1
  PgNet *v3; // ecx@3
  PgNet *v4; // ecx@5
  DWORD v5; // ebx@7
  PgNet *v6; // ecx@9
  PgNet *v7; // ecx@11
  PgNet *v8; // esi@13
  NETCOMMAND netcmd; // [sp+4h] [bp-8h]@1
  PROTO_NC_USER_NORMALLOGOUT_CMD kProto; // [sp+Bh] [bp-1h]@1

  v1 = this;
  v2 = this->m_spLogin.m_pObject;
  netcmd.protocol = 3096;
  kProto.LogoutType = 0;
  if ( v2 )
  {
    PgNet::AddNetMsg((PgNet *)&v2->vfptr, &netcmd, 2);
    PgNet::SendNetMsg((PgNet *)&v1->m_spLogin.m_pObject->vfptr, &kProto, 1);
    PgNet::Flush((PgNet *)&v1->m_spLogin.m_pObject->vfptr);
  }
  v3 = (PgNet *)&v1->m_spWorldMgr.m_pObject->vfptr;
  if ( v3 )
  {
    PgNet::AddNetMsg(v3, &netcmd, 2);
    PgNet::SendNetMsg((PgNet *)&v1->m_spWorldMgr.m_pObject->vfptr, &kProto, 1);
    PgNet::Flush((PgNet *)&v1->m_spWorldMgr.m_pObject->vfptr);
  }
  v4 = (PgNet *)&v1->m_spZone[v1->m_iNowConnectedZone].m_pObject->vfptr;
  if ( v4 )
  {
    PgNet::AddNetMsg(v4, &netcmd, 2);
    PgNet::SendNetMsg((PgNet *)&v1->m_spZone[v1->m_iNowConnectedZone].m_pObject->vfptr, &kProto, 1);
    PgNet::Flush((PgNet *)&v1->m_spZone[v1->m_iNowConnectedZone].m_pObject->vfptr);
  }
  Sleep(1u);
  v5 = timeGetTime();
  while ( timeGetTime() - v5 < 0x3E8 )
    ;
  v6 = (PgNet *)&v1->m_spLogin.m_pObject->vfptr;
  if ( v6 )
    PgNet::Close(v6);
  v7 = (PgNet *)&v1->m_spWorldMgr.m_pObject->vfptr;
  if ( v7 )
    PgNet::Close(v7);
  v8 = (PgNet *)&v1->m_spZone[v1->m_iNowConnectedZone].m_pObject->vfptr;
  if ( v8 )
    PgNet::Close(v8);
}

//----- (006DA5B0) --------------------------------------------------------
void __thiscall NetMgr::SendNetMsgZoneMgr(NetMgr *this, unsigned __int16 department, unsigned __int16 command, void *pProto, int nDataLength)
{
  NetMgr *v5; // esi@1
  int v6; // eax@1
  bool v7; // zf@1
  PgNet **v8; // eax@1

  v5 = this;
  v6 = this->m_iNowConnectedZone;
  v7 = this->m_spZone[v6].m_pObject == 0;
  v8 = (PgNet **)&this->m_spZone[v6];
  if ( !v7 )
  {
    command = (department << 10) | command & 0x3FF;
    PgNet::AddNetMsg(*v8, &command, 2);
    PgNet::SendNetMsg((PgNet *)&v5->m_spZone[v5->m_iNowConnectedZone].m_pObject->vfptr, pProto, nDataLength);
  }
}

//----- (006DA600) --------------------------------------------------------
Net *__thiscall NetMgr::TryAnotherZone(NetMgr *this, char *pcAddress, int iPort)
{
  NetMgr *v3; // esi@1

  v3 = this;
  ++v3->m_iNowConnectedZone;
  if ( this->m_iNowConnectedZone >= 5 )
    this->m_iNowConnectedZone = 0;
  PgNet::SetAddress((PgNet *)&this->m_spZone[this->m_iNowConnectedZone].m_pObject->vfptr, pcAddress);
  PgNet::SetPortA((PgNet *)&v3->m_spZone[v3->m_iNowConnectedZone].m_pObject->vfptr, iPort);
  return v3->m_spZone[v3->m_iNowConnectedZone].m_pObject;
}

//----- (006DA650) --------------------------------------------------------
void __thiscall NetMgr::NetMgr(NetMgr *this)
{
  NetMgr *v1; // esi@1

  v1 = this;
  this->vfptr = (NetMgrVtbl *)&NetMgr::`vftable';
  `eh vector constructor iterator'(
    this->m_spZone,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_spLogin.m_pObject = 0;
  v1->m_spWorldMgr.m_pObject = 0;
  v1->m_iNowConnectedZone = 0;
}
// 9C28F8: using guessed type int (__thiscall *NetMgr::`vftable')(void *p, char);

//----- (006DA680) --------------------------------------------------------
void __thiscall PgNet::ChangeSeed(PgNet *this, unsigned __int16 wSeed)
{
  PgSocket *v2; // ecx@1

  v2 = this->m_pkSocket;
  if ( v2 )
    PgSocket::RepositionSendEncryptTableInx(v2, wSeed);
}

//----- (006DA6A0) --------------------------------------------------------
void __thiscall Net::SetName(Net *this, char *pcName)
{
  char *v2; // eax@1
  signed int v3; // edx@2
  char v4; // cl@3

  v2 = pcName;
  if ( pcName )
  {
    v3 = this->m_acName - pcName;
    do
    {
      v4 = *v2;
      v2[v3] = *v2;
      ++v2;
    }
    while ( v4 );
  }
}

//----- (006DA6C0) --------------------------------------------------------
Net *__thiscall Net::`vector deleting destructor'(Net *this, unsigned int a2)
{
  Net *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&Net::`vftable';
  PgNet::~PgNet((PgNet *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C28C8: using guessed type int (__thiscall *Net::`vftable')(void *p, char);

//----- (006DA6F0) --------------------------------------------------------
NetMgr *__thiscall NetMgr::`scalar deleting destructor'(NetMgr *this, unsigned int a2)
{
  NetMgr *v2; // esi@1

  v2 = this;
  NetMgr::~NetMgr(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006DA720) --------------------------------------------------------
ORTable *__thiscall ORTable::ort_GetTableName(ORTable *this)
{
  return this;
}

//----- (006DA760) --------------------------------------------------------
bool __thiscall OptionReader::or_ExecColumnName(OptionReader *this, ORTokenReader *token)
{
  ORTable *v2; // eax@1
  bool result; // al@2

  v2 = this->or_CurrentTable;
  if ( v2 )
  {
    result = ORTable::ort_ReadColumnName(v2, token) && ORTokenReader::ortr_isEOL(token);
  }
  else
  {
    ORErrorMessage::operator=(&this->or_Argument.errmsg, "ColumnName without table");
    result = 0;
  }
  return result;
}

//----- (006DA7B0) --------------------------------------------------------
char __thiscall ORTable::ort_SetTableName(ORTable *this, ORTokenReader *token)
{
  ORTable *v2; // esi@1
  char *v3; // eax@1
  char result; // al@2

  v2 = this;
  v3 = ORTokenReader::ortr_ReadString(token);
  if ( v3 )
  {
    v2->ort_TableName.ort_Code[4] = 0;
    v2->ort_TableName.ort_Code[3] = 0;
    v2->ort_TableName.ort_Code[2] = 0;
    v2->ort_TableName.ort_Code[1] = 0;
    v2->ort_TableName.ort_Code[0] = 0;
    strncpy(v2->ort_TableName.ort_Name, v3, 0x14u);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006DA7F0) --------------------------------------------------------
char __thiscall ORTable::ort_ReadColumnHeader(ORTable *this, ORTokenReader *token, TokenArgument *targ)
{
  ORTokenReader *v3; // ebx@1
  ORTable *v4; // esi@1
  char *v5; // eax@1
  ORColumnHeader *v6; // eax@9
  int v7; // eax@27
  unsigned __int16 v9; // [sp-4h] [bp-38h]@5
  char *v10; // [sp-4h] [bp-38h]@32
  int i; // [sp+10h] [bp-24h]@1
  unsigned __int16 hnd; // [sp+18h] [bp-1Ch]@9
  ORToken type; // [sp+1Ch] [bp-18h]@2

  v3 = token;
  v4 = this;
  this->ort_RecordLength = 0;
  i = 0;
  v5 = ORTokenReader::ortr_ReadString(token);
  if ( v5 )
  {
    while ( 1 )
    {
      *(_QWORD *)&type.ort_Code[3] = 0i64;
      *(_QWORD *)&type.ort_Code[1] = 0i64;
      *(_QWORD *)&type.ort_Name[0] = 0i64;
      strncpy(type.ort_Name, v5, 0x14u);
      ORToken::ort_ToLower(&type);
      if ( *(_QWORD *)&type.ort_Name[0] != *(_QWORD *)ORTable::ort_Index
        || *(_QWORD *)&type.ort_Code[2] != qword_B5C160
        || type.ort_Code[4] != dword_B5C168 )
      {
        if ( *(_QWORD *)&type.ort_Name[0] == *(_QWORD *)ORTable::ort_String
          && *(_QWORD *)&type.ort_Code[2] == qword_B5C174
          && type.ort_Code[4] == dword_B5C17C )
        {
          v6 = ORColumnHeaderList::orchl_AllocObject(&v4->ort_HeaderList, &hnd, 2u);
          goto LABEL_26;
        }
        if ( *(_QWORD *)&type.ort_Name[0] == *(_QWORD *)ORTable::ort_Byte
          && *(_QWORD *)&type.ort_Code[2] == qword_B5C188
          && type.ort_Code[4] == dword_B5C190 )
        {
          v6 = ORColumnHeaderList::orchl_AllocObject(&v4->ort_HeaderList, &hnd, 3u);
          goto LABEL_26;
        }
        if ( *(_QWORD *)&type.ort_Name[0] != *(_QWORD *)ORTable::ort_Word
          || *(_QWORD *)&type.ort_Code[2] != qword_B5C19C
          || type.ort_Code[4] != dword_B5C1A4 )
        {
          if ( (*(_QWORD *)&type.ort_Name[0] != *(_QWORD *)ORTable::ort_Dwrd
             || *(_QWORD *)&type.ort_Code[2] != qword_B5C1B0
             || type.ort_Code[4] != dword_B5C1B8)
            && (*(_QWORD *)&type.ort_Name[0] != *(_QWORD *)ORTable::ort_Dword
             || *(_QWORD *)&type.ort_Code[2] != qword_B5C1C4
             || type.ort_Code[4] != dword_B5C1CC) )
          {
            v10 = "Undefined column type";
LABEL_34:
            ORTokenReader::ortr_SetError(token, v10);
            return 0;
          }
          v9 = 5;
        }
        else
        {
          v9 = 4;
        }
      }
      else
      {
        v9 = 1;
      }
      v6 = ORColumnHeaderList::orchl_AllocObject(&v4->ort_HeaderList, &hnd, v9);
LABEL_26:
      if ( !v6 )
      {
        v10 = "Too many columns or memory leak";
        goto LABEL_34;
      }
      v3 = token;
      v7 = v6->vfptr->ortr_SetLength(v6, token, targ);
      if ( v7 < 0 )
        return 0;
      v4->ort_RecordLength += v7;
      ++i;
      v5 = ORTokenReader::ortr_ReadString(token);
      if ( !v5 )
      {
        if ( !i )
          break;
        return 1;
      }
    }
  }
  ORTokenReader::ortr_SetError(v3, "At least one column needed");
  return 0;
}
// B5C160: using guessed type __int64 qword_B5C160;
// B5C168: using guessed type int dword_B5C168;
// B5C174: using guessed type __int64 qword_B5C174;
// B5C17C: using guessed type int dword_B5C17C;
// B5C188: using guessed type __int64 qword_B5C188;
// B5C190: using guessed type int dword_B5C190;
// B5C19C: using guessed type __int64 qword_B5C19C;
// B5C1A4: using guessed type int dword_B5C1A4;
// B5C1B0: using guessed type __int64 qword_B5C1B0;
// B5C1B8: using guessed type int dword_B5C1B8;
// B5C1C4: using guessed type __int64 qword_B5C1C4;
// B5C1CC: using guessed type int dword_B5C1CC;

//----- (006DAA20) --------------------------------------------------------
char __thiscall OptionReader::or_ExecColumnType(OptionReader *this, ORTokenReader *token)
{
  ORTable *v2; // eax@1
  char result; // al@2

  v2 = this->or_CurrentTable;
  if ( v2 )
  {
    result = ORTable::ort_ReadColumnHeader(v2, token, &this->or_Argument);
  }
  else
  {
    ORErrorMessage::operator=(&this->or_Argument.errmsg, "ColumnHeader without table");
    result = 0;
  }
  return result;
}

//----- (006DAA50) --------------------------------------------------------
char __thiscall OptionReader::or_ExecTable(OptionReader *this, ORTokenReader *token)
{
  OptionReader *v2; // edi@1
  int v3; // eax@1
  char *v4; // ecx@1
  int v5; // esi@2
  char *v7; // eax@7

  v2 = this;
  v3 = this->or_TableList.l_Finger.empty;
  v4 = (char *)&this->or_TableList;
  if ( (_WORD)v3 == -1 )
    v5 = 0;
  else
    v5 = (*(int (__stdcall **)(int))(*(_DWORD *)v4 + 4))(v3);
  v2->or_CurrentTable = (ORTable *)v5;
  if ( !v5 )
  {
    ORErrorMessage::operator=(&v2->or_Argument.errmsg, "Too many tables");
    return 0;
  }
  v7 = ORTokenReader::ortr_ReadString(token);
  if ( !v7 )
    return 0;
  *(_DWORD *)(v5 + 16) = 0;
  *(_DWORD *)(v5 + 12) = 0;
  *(_DWORD *)(v5 + 8) = 0;
  *(_DWORD *)(v5 + 4) = 0;
  *(_DWORD *)v5 = 0;
  strncpy((char *)v5, v7, 0x14u);
  return 1;
}

//----- (006DAAD0) --------------------------------------------------------
char __thiscall OptionReader::or_Read(OptionReader *this, char *filename)
{
  OptionReader *v2; // esi@1
  _iobuf *v3; // edi@1
  char v5; // bl@3
  unsigned int v6; // edi@5
  unsigned int v7; // ecx@6
  char v8; // al@8
  _iobuf *stream; // [sp+10h] [bp-1038h]@1
  ORTokenReader token; // [sp+14h] [bp-1034h]@3
  ORToken com; // [sp+1024h] [bp-24h]@3
  int v12; // [sp+1044h] [bp-4h]@3

  v2 = this;
  v3 = fopen(filename, "r");
  stream = v3;
  ORErrorMessage::operator=(&v2->or_Argument.errmsg, "Undefined Error");
  if ( !v3 )
  {
    ORErrorMessage::operator=(&v2->or_Argument.errmsg, "File not found");
    return 0;
  }
  ORTokenReader::ORTokenReader(&token, v3, &v2->or_Argument);
  v12 = 0;
  *(_QWORD *)&com.ort_Code[3] = 0i64;
  *(_QWORD *)&com.ort_Code[1] = 0i64;
  com.ort_Code[0] = 0;
  v5 = 1;
  while ( 1 )
  {
    if ( !ORTokenReader::ortr_ReadCommand(&token, &com) )
      goto LABEL_44;
    v6 = com.ort_Code[0];
    if ( com.ort_Code[0] != *(_DWORD *)OptionReader::or_CommentMark )
      break;
    v7 = com.ort_Code[3];
    if ( *(_QWORD *)&com.ort_Code[1] != qword_B5C1D4 || *(_QWORD *)&com.ort_Code[3] != qword_B5C1DC )
      goto LABEL_10;
    v8 = ORComment::orc_Exec(&v2->or_Argument.comment, &token);
LABEL_38:
    v5 = v8;
    if ( !v8 )
      goto LABEL_45;
  }
  v7 = com.ort_Code[3];
LABEL_10:
  if ( *(_QWORD *)&com.ort_Name[0] == *(_QWORD *)OptionReader::or_Brace
    && com.ort_Code[2] == dword_B5C1EC
    && __PAIR__(com.ort_Code[4], v7) == qword_B5C1F0 )
  {
    v8 = ORBrace::orb_Exec(&v2->or_Argument.brace, &token);
    goto LABEL_38;
  }
  if ( *(_QWORD *)&com.ort_Name[0] == *(_QWORD *)OptionReader::or_Ignore
    && com.ort_Code[2] == dword_B5C200
    && __PAIR__(com.ort_Code[4], v7) == qword_B5C204 )
  {
    v8 = ORIgnore::ori_Exec(&v2->or_Argument.ignore, &token);
    goto LABEL_38;
  }
  if ( *(_QWORD *)&com.ort_Name[0] == *(_QWORD *)OptionReader::or_Delimiter
    && com.ort_Code[2] == dword_B5C214
    && __PAIR__(com.ort_Code[4], v7) == qword_B5C218 )
  {
    v8 = ORDelimiter::ord_Exec(&v2->or_Argument.delimiter, &token);
    goto LABEL_38;
  }
  if ( *(_QWORD *)&com.ort_Name[0] == *(_QWORD *)OptionReader::or_Exchange
    && com.ort_Code[2] == dword_B5C228
    && __PAIR__(com.ort_Code[4], v7) == qword_B5C22C )
  {
    v8 = ORExchange::ore_Exec(&v2->or_Argument.exchange, &token);
    goto LABEL_38;
  }
  if ( *(_QWORD *)&com.ort_Name[0] == *(_QWORD *)OptionReader::or_Table
    && com.ort_Code[2] == dword_B5C23C
    && __PAIR__(com.ort_Code[4], v7) == qword_B5C240 )
  {
    v8 = OptionReader::or_ExecTable(v2, &token);
    goto LABEL_38;
  }
  if ( ORToken::operator==(&com, &OptionReader::or_ColumnType) )
  {
    v8 = OptionReader::or_ExecColumnType(v2, &token);
    goto LABEL_38;
  }
  if ( ORToken::operator==(&com, &OptionReader::or_ColumnName) )
  {
    v8 = OptionReader::or_ExecColumnName(v2, &token);
    goto LABEL_38;
  }
  if ( ORToken::operator==(&com, &OptionReader::or_Record) )
  {
    v8 = OptionReader::or_ExecRecord(v2, &token);
    goto LABEL_38;
  }
  if ( ORToken::operator==(&com, &OptionReader::or_RecordIn) )
  {
    v8 = OptionReader::or_ExecRecordIn(v2, &token);
    goto LABEL_38;
  }
  if ( __PAIR__(com.ort_Code[1], v6) != *(_QWORD *)OptionReader::or_End
    || *(_QWORD *)&com.ort_Code[2] != qword_B5C2A0
    || com.ort_Code[4] != dword_B5C2A8 )
  {
    ORErrorMessage::operator=(&v2->or_Argument.errmsg, "Undefined command");
LABEL_44:
    v5 = 0;
  }
LABEL_45:
  fclose(stream);
  v12 = -1;
  ORTokenReader::~ORTokenReader(&token);
  return v5;
}
// B5C1D4: using guessed type __int64 qword_B5C1D4;
// B5C1DC: using guessed type __int64 qword_B5C1DC;
// B5C1EC: using guessed type int dword_B5C1EC;
// B5C1F0: using guessed type __int64 qword_B5C1F0;
// B5C200: using guessed type int dword_B5C200;
// B5C204: using guessed type __int64 qword_B5C204;
// B5C214: using guessed type int dword_B5C214;
// B5C218: using guessed type __int64 qword_B5C218;
// B5C228: using guessed type int dword_B5C228;
// B5C22C: using guessed type __int64 qword_B5C22C;
// B5C23C: using guessed type int dword_B5C23C;
// B5C240: using guessed type __int64 qword_B5C240;
// B5C2A0: using guessed type __int64 qword_B5C2A0;
// B5C2A8: using guessed type int dword_B5C2A8;
// B5C2AC: using guessed type int WeddingTask::ms_spWeddingTask;

//----- (006DAE30) --------------------------------------------------------
void __thiscall ORTable::~ORTable(ORTable *this)
{
  ORTable *v1; // esi@1
  ORKeyList *v2; // edi@1
  ListStruct<ORRecord> *v3; // eax@3
  char *v4; // eax@5
  char *v5; // edi@6

  v1 = this;
  v2 = this->ort_PrimaryKey;
  if ( v2 )
  {
    ORKeyList::~ORKeyList(v2);
    operator delete(v2);
  }
  v3 = v1->ort_DataRecord.l_Array;
  v1->ort_DataRecord.vfptr = (List<ORRecord>Vtbl *)List<ORRecord>::`vftable';
  if ( v3 )
    operator delete[](v3);
  v4 = (char *)v1->ort_DataArray.la_Array;
  if ( v4 )
  {
    v5 = v4 - 4;
    `eh vector destructor iterator'(v4, 0x208u, *((_DWORD *)v4 - 1), (void (__thiscall *)(void *))ORRecord::~ORRecord);
    operator delete[](v5);
  }
  ORColumnHeaderList::~ORColumnHeaderList(&v1->ort_HeaderList);
}
// 9C2A6C: using guessed type int (__stdcall *List<ORRecord>::`vftable'[3])(unsigned __int16 hnd);

//----- (006DAEF0) --------------------------------------------------------
void __thiscall OptionReader::~OptionReader(OptionReader *this)
{
  OptionReader *v1; // esi@1
  ListStruct<ORTable> *v2; // eax@1

  v1 = this;
  `eh vector destructor iterator'(this->or_TableArray, 0x23Cu, 32, (void (__thiscall *)(void *))ORTable::~ORTable);
  v2 = v1->or_TableList.l_Array;
  v1->or_TableList.vfptr = (List<ORTable>Vtbl *)List<ORTable>::`vftable';
  if ( v2 )
    operator delete[](v2);
  ORIgnore::~ORIgnore(&v1->or_Argument.ignore);
  ORBrace::~ORBrace(&v1->or_Argument.brace);
  ORComment::~ORComment(&v1->or_Argument.comment);
  ORExchange::~ORExchange(&v1->or_Argument.exchange);
  ORDelimiter::~ORDelimiter(&v1->or_Argument.delimiter);
  ORErrorMessage::~ORErrorMessage(&v1->or_Argument.errmsg);
}
// 9C2A7C: using guessed type int (__stdcall *List<ORTable>::`vftable'[3])(unsigned __int16 hnd);

//----- (006DAFC0) --------------------------------------------------------
void __thiscall ORTable::ORTable(ORTable *this)
{
  ORTable *v1; // esi@1
  void *v2; // eax@1
  int v3; // ebx@2
  ORRecord *v4; // eax@2

  v1 = this;
  *(_QWORD *)&this->ort_TableName.ort_Code[3] = 0i64;
  *(_QWORD *)&this->ort_TableName.ort_Code[1] = 0i64;
  this->ort_TableName.ort_Code[0] = 0;
  ORColumnHeaderList::ORColumnHeaderList(&this->ort_HeaderList);
  v1->ort_DataArray.la_Size = 32;
  v2 = operator new[](0x4104u);
  if ( v2 )
  {
    v3 = (int)v2 + 4;
    *(_DWORD *)v2 = 32;
    `eh vector constructor iterator'(
      (char *)v2 + 4,
      0x208u,
      32,
      (void (__thiscall *)(void *))ORRecord::ORRecord,
      (void (__thiscall *)(void *))ORRecord::~ORRecord);
    v4 = (ORRecord *)v3;
  }
  else
  {
    v4 = 0;
  }
  v1->ort_DataArray.la_Array = v4;
  List<ORRecord>::List<ORRecord>(&v1->ort_DataRecord, &v1->ort_DataArray);
  v1->ort_PrimaryKey = 0;
}

//----- (006DB0A0) --------------------------------------------------------
void __thiscall OptionReader::OptionReader(OptionReader *this)
{
  OptionReader *v1; // esi@1
  signed int v2; // edx@1
  int v3; // eax@1
  ListStruct<ORTable> *v4; // ecx@3
  ListStruct<ORTable> *v5; // ecx@6
  bool v6; // zf@6
  int *v7; // ecx@6
  ListStruct<ORTable> *v8; // ecx@9
  ORTable **v9; // ecx@9
  ListStruct<ORTable> *v10; // ecx@12
  ORTable **v11; // ecx@12
  signed int v12; // [sp+10h] [bp-14h]@1
  int v13; // [sp+14h] [bp-10h]@1

  v1 = this;
  ORErrorMessage::ORErrorMessage(&this->or_Argument.errmsg);
  ORDelimiter::ORDelimiter(&v1->or_Argument.delimiter);
  ORExchange::ORExchange(&v1->or_Argument.exchange);
  ORComment::ORComment(&v1->or_Argument.comment);
  ORBrace::ORBrace(&v1->or_Argument.brace);
  ORIgnore::ORIgnore(&v1->or_Argument.ignore);
  v1->or_TableList.vfptr = (List<ORTable>Vtbl *)List<ORTable>::`vftable';
  v1->or_TableList.l_ListArray = 0;
  List<ORTable>::l_makelist(&v1->or_TableList, 0x20u);
  `eh vector constructor iterator'(
    v1->or_TableArray,
    0x23Cu,
    32,
    (void (__thiscall *)(void *))ORTable::ORTable,
    (void (__thiscall *)(void *))ORTable::~ORTable);
  v1->or_CurrentTable = 0;
  v2 = 2;
  v3 = 0;
  v13 = (int)&v1->or_TableArray[1];
  v12 = 8;
  do
  {
    if ( v2 - 2 < v1->or_TableList.l_MaxSize )
    {
      v4 = v1->or_TableList.l_Array;
      if ( !v4[v3].ls_Content )
        v4[v3].ls_Content = (ORTable *)(v13 - 572);
    }
    if ( v2 - 1 < v1->or_TableList.l_MaxSize )
    {
      v5 = v1->or_TableList.l_Array;
      v6 = v5[v3 + 1].ls_Content == 0;
      v7 = (int *)&v5[v3 + 1];
      if ( v6 )
        *v7 = v13;
    }
    if ( v2 < v1->or_TableList.l_MaxSize )
    {
      v8 = v1->or_TableList.l_Array;
      v6 = v8[v3 + 2].ls_Content == 0;
      v9 = &v8[v3 + 2].ls_Content;
      if ( v6 )
        *v9 = (ORTable *)(v13 + 572);
    }
    if ( v2 + 1 < v1->or_TableList.l_MaxSize )
    {
      v10 = v1->or_TableList.l_Array;
      v6 = v10[v3 + 3].ls_Content == 0;
      v11 = &v10[v3 + 3].ls_Content;
      if ( v6 )
        *v11 = (ORTable *)(v13 + 1144);
    }
    v13 += 2288;
    v3 += 4;
    v2 += 4;
    --v12;
  }
  while ( v12 );
}
// 9C2A7C: using guessed type int (__stdcall *List<ORTable>::`vftable'[3])(unsigned __int16 hnd);

//----- (006DB240) --------------------------------------------------------
void __thiscall TokenArgument::~TokenArgument(TokenArgument *this)
{
  TokenArgument *v1; // esi@1

  v1 = this;
  ORIgnore::~ORIgnore(&this->ignore);
  ORBrace::~ORBrace(&v1->brace);
  ORComment::~ORComment(&v1->comment);
  ORExchange::~ORExchange(&v1->exchange);
  ORDelimiter::~ORDelimiter(&v1->delimiter);
  ORErrorMessage::~ORErrorMessage(&v1->errmsg);
}

//----- (006DB2D0) --------------------------------------------------------
void __thiscall List<ORRecord>::~List<ORRecord>(List<ORRecord> *this)
{
  ListStruct<ORRecord> *v1; // ecx@1

  this->vfptr = (List<ORRecord>Vtbl *)List<ORRecord>::`vftable';
  v1 = this->l_Array;
  if ( v1 )
    operator delete[](v1);
}
// 9C2A6C: using guessed type int (__stdcall *List<ORRecord>::`vftable'[3])(unsigned __int16 hnd);

//----- (006DB2F0) --------------------------------------------------------
ORTable *__thiscall List<ORTable>::l_AllocA(List<ORTable> *this, unsigned __int16 hnd)
{
  ListStruct<ORTable> *v3; // esi@3
  int v4; // eax@3
  unsigned __int16 v5; // bx@5
  signed __int16 v6; // si@6
  int v7; // edi@10
  ListStruct<ORTable> *v8; // esi@10

  if ( hnd >= this->l_MaxSize )
    return 0;
  v3 = this->l_Array;
  v4 = hnd;
  if ( v3[v4].ls_IsActiv )
    return 0;
  v5 = v3[v4].ls_Next;
  if ( v5 == hnd )
  {
    v6 = -1;
LABEL_9:
    this->l_Finger.empty = v6;
    goto LABEL_10;
  }
  v3[v3[v4].ls_Prev].ls_Next = v5;
  this->l_Array[this->l_Array[v4].ls_Next].ls_Prev = this->l_Array[v4].ls_Prev;
  if ( this->l_Finger.empty == hnd )
  {
    v6 = this->l_Array[v4].ls_Next;
    goto LABEL_9;
  }
LABEL_10:
  v7 = this->l_Finger.store;
  v8 = this->l_Array;
  if ( (_WORD)v7 == -1 )
  {
    v8[v4].ls_Next = hnd;
    this->l_Array[v4].ls_Prev = hnd;
    this->l_Finger.store = hnd;
  }
  else
  {
    v8[v4].ls_Next = v8[v7].ls_Next;
    this->l_Array[v4].ls_Prev = this->l_Finger.store;
    this->l_Array[this->l_Array[this->l_Finger.store].ls_Next].ls_Prev = hnd;
    this->l_Array[this->l_Finger.store].ls_Next = hnd;
  }
  this->l_Array[v4].ls_IsActiv = 1;
  ++this->l_ListNum;
  return this->l_Array[v4].ls_Content;
}

//----- (006DB3F0) --------------------------------------------------------
ORTable *__thiscall List<ORTable>::l_AllocZ(List<ORTable> *this, unsigned __int16 hnd)
{
  ListStruct<ORTable> *v3; // esi@3
  int v4; // eax@3
  unsigned __int16 v5; // bx@5
  signed __int16 v6; // si@6
  unsigned __int16 v7; // si@10

  if ( hnd >= this->l_MaxSize )
    return 0;
  v3 = this->l_Array;
  v4 = hnd;
  if ( v3[v4].ls_IsActiv )
    return 0;
  v5 = v3[v4].ls_Next;
  if ( v5 == hnd )
  {
    v6 = -1;
LABEL_9:
    this->l_Finger.empty = v6;
    goto LABEL_10;
  }
  v3[v3[v4].ls_Prev].ls_Next = v5;
  this->l_Array[this->l_Array[v4].ls_Next].ls_Prev = this->l_Array[v4].ls_Prev;
  if ( this->l_Finger.empty == hnd )
  {
    v6 = this->l_Array[v4].ls_Next;
    goto LABEL_9;
  }
LABEL_10:
  v7 = this->l_Finger.store;
  if ( v7 == -1 )
  {
    this->l_Array[v4].ls_Next = hnd;
    this->l_Array[v4].ls_Prev = hnd;
    this->l_Finger.store = hnd;
  }
  else
  {
    this->l_Array[v4].ls_Next = v7;
    this->l_Array[v4].ls_Prev = this->l_Array[this->l_Finger.store].ls_Prev;
    this->l_Array[this->l_Array[this->l_Finger.store].ls_Prev].ls_Next = hnd;
    this->l_Array[this->l_Finger.store].ls_Prev = hnd;
  }
  this->l_Array[v4].ls_IsActiv = 1;
  ++this->l_ListNum;
  return this->l_Array[v4].ls_Content;
}

//----- (006DB4F0) --------------------------------------------------------
void __thiscall List<ORTable>::~List<ORTable>(List<ORTable> *this)
{
  ListStruct<ORTable> *v1; // ecx@1

  this->vfptr = (List<ORTable>Vtbl *)List<ORTable>::`vftable';
  v1 = this->l_Array;
  if ( v1 )
    operator delete[](v1);
}
// 9C2A7C: using guessed type int (__stdcall *List<ORTable>::`vftable'[3])(unsigned __int16 hnd);

//----- (006DB510) --------------------------------------------------------
char __thiscall List<ORRecord>::l_Free(List<ORTable> *this, unsigned __int16 hnd)
{
  ListStruct<ORTable> *v2; // edx@2
  int v3; // eax@2
  unsigned __int16 v4; // dx@4
  char result; // al@7

  if ( hnd < this->l_MaxSize && (v2 = this->l_Array, v3 = hnd, v2[v3].ls_IsActiv) && hnd != this->l_Finger.store )
  {
    v2[v2[v3].ls_Prev].ls_Next = v2[v3].ls_Next;
    this->l_Array[this->l_Array[v3].ls_Next].ls_Prev = this->l_Array[v3].ls_Prev;
    v4 = this->l_Finger.empty;
    if ( v4 == -1 )
    {
      this->l_Array[v3].ls_Next = hnd;
      this->l_Array[v3].ls_Prev = hnd;
      this->l_Finger.empty = hnd;
    }
    else
    {
      this->l_Array[v3].ls_Next = v4;
      this->l_Array[v3].ls_Prev = this->l_Array[this->l_Finger.empty].ls_Prev;
      this->l_Array[this->l_Array[this->l_Finger.empty].ls_Prev].ls_Next = hnd;
      this->l_Array[this->l_Finger.empty].ls_Prev = hnd;
    }
    this->l_Array[v3].ls_IsActiv = 0;
    result = 1;
    --this->l_ListNum;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006DB600) --------------------------------------------------------
char __thiscall List<ORRecord>::l_4AllInList(List<ORTable> *this, ListIteratorDefault<ORTable> *arg)
{
  List<ORTable> *v2; // esi@1
  int v3; // ecx@1
  ListStruct<ORTable> *v4; // edx@2
  int v5; // eax@2
  int v6; // edi@3
  char result; // al@5

  v2 = this;
  v3 = this->l_Array[this->l_Finger.store].ls_Next;
  if ( (unsigned __int16)v3 >= v2->l_MaxSize )
  {
LABEL_5:
    result = 1;
  }
  else
  {
    while ( 1 )
    {
      v4 = v2->l_Array;
      v5 = (unsigned __int16)v3;
      if ( !v4[v5].ls_IsActiv )
        break;
      v6 = v4[v5].ls_Next;
      if ( !arg->vfptr->lid_Call(arg, v4[v5].ls_Content, v3) )
        break;
      v3 = v6;
      if ( (unsigned __int16)v6 >= v2->l_MaxSize )
        goto LABEL_5;
    }
    result = 0;
  }
  return result;
}

//----- (006DB670) --------------------------------------------------------
char __stdcall ListIteratorDefault<ORRecord>::lid_Call(NiGeometry *pkGeometry, NiShader *pkShader)
{
  return 1;
}

//----- (006DB680) --------------------------------------------------------
bool __thiscall ORToken::operator==(ORToken *this, ORToken *nm)
{
  return this->ort_Code[0] == nm->ort_Code[0]
      && this->ort_Code[1] == nm->ort_Code[1]
      && this->ort_Code[2] == nm->ort_Code[2]
      && this->ort_Code[3] == nm->ort_Code[3]
      && this->ort_Code[4] == nm->ort_Code[4];
}

//----- (006DB6C0) --------------------------------------------------------
void __thiscall ListArray<ORRecord>::~ListArray<ORRecord>(ListArray<ORRecord> *this)
{
  ORRecord *v1; // eax@1
  int *v2; // esi@2

  v1 = this->la_Array;
  if ( this->la_Array )
  {
    v2 = &v1[-1].orr_Pointer;
    `eh vector destructor iterator'(v1, 0x208u, v1[-1].orr_Pointer, (void (__thiscall *)(void *))ORRecord::~ORRecord);
    operator delete[](v2);
  }
}

//----- (006DB6F0) --------------------------------------------------------
char __thiscall ListEraser<ORRecord>::lid_Call(ListEraser<ORTable> *this, ORTable *ele, int handle)
{
  ((void (__stdcall *)(int))this->le_list->vfptr->l_Free)(handle);
  return 1;
}

//----- (006DB710) --------------------------------------------------------
void __thiscall ListEraser<ORRecord>::~ListEraser<ORRecord>(ListEraser<ORRecord> *this)
{
  this->vfptr = (ListIteratorDefault<ORRecord>Vtbl *)&ListIteratorDefault<ORRecord>::`vftable';
}
// 9C2A8C: using guessed type int (__stdcall *ListIteratorDefault<ORRecord>::`vftable')(int, NiGeometry *pkGeometry);

//----- (006DB720) --------------------------------------------------------
void __thiscall ListEraser<ORTable>::~ListEraser<ORTable>(ListEraser<ORTable> *this)
{
  this->vfptr = (ListIteratorDefault<ORTable>Vtbl *)&ListIteratorDefault<ORTable>::`vftable';
}
// 9C2A94: using guessed type int (__stdcall *ListIteratorDefault<ORTable>::`vftable')(int, NiGeometry *pkGeometry);

//----- (006DB730) --------------------------------------------------------
void __thiscall List<ORRecord>::l_makelist(List<ORRecord> *this, unsigned __int16 size)
{
  List<ORTable> *v2; // esi@1
  ListStruct<ORTable> *v3; // eax@3
  int v4; // ecx@4
  signed int v5; // eax@4
  bool v6; // cf@4
  int v7; // eax@6
  signed int v8; // ecx@6
  int v9; // eax@8
  ListIteratorDefault<ORTable> arg; // [sp+10h] [bp-14h]@8
  List<ORTable> *v11; // [sp+14h] [bp-10h]@8
  int v12; // [sp+20h] [bp-4h]@8

  v2 = (List<ORTable> *)this;
  this->l_MaxSize = size;
  if ( size == -1 )
  {
    this->l_Array = 0;
  }
  else
  {
    v3 = (ListStruct<ORTable> *)operator new[](12 * (size + 1));
    v2->l_Array = v3;
    if ( v3 )
    {
      v4 = 0;
      v5 = 0;
      v6 = v2->l_MaxSize > 0u;
      do
      {
        v2->l_Array[v4].ls_Content = 0;
        ++v5;
        ++v4;
      }
      while ( v5 <= v2->l_MaxSize );
      v7 = 0;
      v8 = 0;
      if ( v2->l_MaxSize > 0u )
      {
        do
        {
          v2->l_Array[v7].ls_Prev = v8 - 1;
          v2->l_Array[v7].ls_Next = v8 + 1;
          v2->l_Array[v7].ls_IsActiv = 0;
          ++v8;
          ++v7;
        }
        while ( v8 < v2->l_MaxSize );
      }
      v2->l_Array->ls_Prev = v2->l_MaxSize - 1;
      *((_WORD *)&v2->l_Array[v2->l_MaxSize] - 4) = 0;
      v9 = v2->l_MaxSize;
      v2->l_Finger.store = v9;
      v2->l_Finger.empty = 0;
      v2->l_Array[v9].ls_Prev = v9;
      v2->l_Array[v2->l_MaxSize].ls_Next = v2->l_Array[v2->l_MaxSize].ls_Prev;
      v2->l_Array[v2->l_MaxSize].ls_Content = 0;
      v2->l_Array[v2->l_MaxSize].ls_IsActiv = 1;
      v2->l_ListNum = 0;
      arg.vfptr = (ListIteratorDefault<ORTable>Vtbl *)&ListEraser<ORRecord>::`vftable';
      v11 = v2;
      v12 = 0;
      List<ORRecord>::l_4AllInList(v2, &arg);
    }
  }
}
// 9C2A9C: using guessed type int (__stdcall *ListEraser<ORRecord>::`vftable')(ORTable *ele, int handle);

//----- (006DB8B0) --------------------------------------------------------
void __thiscall List<ORTable>::l_makelist(List<ORTable> *this, unsigned __int16 size)
{
  List<ORTable> *v2; // esi@1
  ListStruct<ORTable> *v3; // eax@3
  int v4; // ecx@4
  signed int v5; // eax@4
  bool v6; // cf@4
  int v7; // eax@6
  signed int v8; // ecx@6
  int v9; // eax@8
  ListIteratorDefault<ORTable> arg; // [sp+10h] [bp-14h]@8
  List<ORTable> *v11; // [sp+14h] [bp-10h]@8
  int v12; // [sp+20h] [bp-4h]@8

  v2 = this;
  this->l_MaxSize = size;
  if ( size == -1 )
  {
    this->l_Array = 0;
  }
  else
  {
    v3 = (ListStruct<ORTable> *)operator new[](12 * (size + 1));
    v2->l_Array = v3;
    if ( v3 )
    {
      v4 = 0;
      v5 = 0;
      v6 = v2->l_MaxSize > 0u;
      do
      {
        v2->l_Array[v4].ls_Content = 0;
        ++v5;
        ++v4;
      }
      while ( v5 <= v2->l_MaxSize );
      v7 = 0;
      v8 = 0;
      if ( v2->l_MaxSize > 0u )
      {
        do
        {
          v2->l_Array[v7].ls_Prev = v8 - 1;
          v2->l_Array[v7].ls_Next = v8 + 1;
          v2->l_Array[v7].ls_IsActiv = 0;
          ++v8;
          ++v7;
        }
        while ( v8 < v2->l_MaxSize );
      }
      v2->l_Array->ls_Prev = v2->l_MaxSize - 1;
      *((_WORD *)&v2->l_Array[v2->l_MaxSize] - 4) = 0;
      v9 = v2->l_MaxSize;
      v2->l_Finger.store = v9;
      v2->l_Finger.empty = 0;
      v2->l_Array[v9].ls_Prev = v9;
      v2->l_Array[v2->l_MaxSize].ls_Next = v2->l_Array[v2->l_MaxSize].ls_Prev;
      v2->l_Array[v2->l_MaxSize].ls_Content = 0;
      v2->l_Array[v2->l_MaxSize].ls_IsActiv = 1;
      v2->l_ListNum = 0;
      arg.vfptr = (ListIteratorDefault<ORTable>Vtbl *)&ListEraser<ORTable>::`vftable';
      v11 = v2;
      v12 = 0;
      List<ORRecord>::l_4AllInList(v2, &arg);
    }
  }
}
// 9C2AA4: using guessed type int (__stdcall *ListEraser<ORTable>::`vftable')(ORTable *ele, int handle);

//----- (006DBA30) --------------------------------------------------------
void __thiscall List<ORRecord>::List<ORRecord>(List<ORRecord> *this, ListArray<ORRecord> *array)
{
  ListArray<ORRecord> *v2; // ebx@1
  List<ORRecord> *v3; // esi@1
  int v4; // edi@1
  signed int v5; // eax@4
  int v6; // edx@5
  ListStruct<ORRecord> *v7; // ecx@7

  v2 = array;
  v3 = this;
  v4 = 0;
  this->vfptr = (List<ORRecord>Vtbl *)List<ORRecord>::`vftable';
  this->l_ListArray = array;
  if ( array->la_Array )
  {
    List<ORRecord>::l_makelist(this, array->la_Size);
    if ( v3->l_Array )
    {
      v5 = 0;
      if ( v3->l_MaxSize > 0u )
      {
        v6 = 0;
        do
        {
          if ( v5 < v3->l_MaxSize )
          {
            v7 = v3->l_Array;
            if ( !v7[v6].ls_Content )
            {
              v7[v6].ls_Content = &v2->la_Array[v4];
              v2 = array;
            }
          }
          ++v5;
          ++v4;
          ++v6;
        }
        while ( v5 < v3->l_MaxSize );
      }
    }
  }
  else
  {
    this->l_Array = 0;
  }
}
// 9C2A6C: using guessed type int (__stdcall *List<ORRecord>::`vftable'[3])(unsigned __int16 hnd);

//----- (006DBAB0) --------------------------------------------------------
ORRecord *__thiscall OrderArgument::oa_Getrecord(OrderArgument *this)
{
  return this->oa_record;
}

//----- (006DBAC0) --------------------------------------------------------
char __thiscall OrderArgument::lid_Call(OrderArgument *this, ORRecord *ele, unsigned __int16 handle)
{
  int v3; // eax@1
  char result; // al@2

  v3 = this->oa_target;
  if ( v3 > 0 )
  {
    this->oa_target = v3 - 1;
    result = 1;
  }
  else
  {
    this->oa_record = ele;
    result = 0;
  }
  return result;
}

//----- (006DBAE0) --------------------------------------------------------
char __thiscall ColumnCheckArgument::cca_isfound(ColumnCheckArgument *this)
{
  return this->cca_found;
}

//----- (006DBAF0) --------------------------------------------------------
void *__thiscall TargetColumnFindArgument::rcfa_Getcontent(TargetColumnFindArgument *this)
{
  return this->tcfa_content;
}

//----- (006DBB00) --------------------------------------------------------
ORRecord *__thiscall RecordDataCompareArgument::rdca_Getrecord(RecordDataCompareArgument *this)
{
  return this->rdca_record;
}

//----- (006DBB10) --------------------------------------------------------
ORTable *__thiscall TableNameCompareArgument::tnca_Gettable(TableNameCompareArgument *this)
{
  return this->tnca_found;
}

//----- (006DBB20) --------------------------------------------------------
ORToken *__thiscall ORColumnHeader::orch_GetColumnName(ORColumnHeader *this)
{
  return &this->orch_ColumnName;
}

//----- (006DBB30) --------------------------------------------------------
int __thiscall ORColumnHeader::orch_GetLength(ORColumnHeader *this)
{
  return this->orch_Length;
}

//----- (006DBB40) --------------------------------------------------------
int __thiscall ORColumnHeader::ortr_SetLength(ORColumnHeader *this, ORTokenReader *token, TokenArgument *targ)
{
  return this->orch_Length;
}

//----- (006DBB50) --------------------------------------------------------
char __thiscall ORColumnHeader::orch_FillCell(ORColumnHeader *this, ORTokenReader *token, ORRecord *datarecord)
{
  ORColumnHeader *v3; // edi@1
  unsigned __int16 v4; // ax@1
  ORField *v5; // eax@1
  ORField *v6; // esi@1
  char result; // al@2
  unsigned __int16 hnd; // [sp+Ch] [bp-4h]@1

  v3 = this;
  v4 = ((int (*)(void))this->vfptr->orch_FieldType)();
  v5 = ORRecord::orr_AllocObject(datarecord, &hnd, v4);
  v6 = v5;
  if ( v5 )
  {
    ORField::orf_SetColumnHead(v5, v3);
    ORRecord::orr_AllocMemory(datarecord, v6);
    result = v6->vfptr->orf_Read(v6, token);
  }
  else
  {
    ORTokenReader::ortr_SetError(token, "Cannot alloc field memory");
    result = 0;
  }
  return result;
}

//----- (006DBBC0) --------------------------------------------------------
int ORColumnHeaderIndex::orch_FieldType()
{
  return 1;
}

//----- (006DBBD0) --------------------------------------------------------
int __thiscall ORColumnHeaderString::ortr_SetLength(ORColumnHeaderString *this, ORTokenReader *token, TokenArgument *targ)
{
  ORTokenReader *v3; // esi@1
  char v4; // al@1
  TokenArgument *v5; // edi@1
  int result; // eax@2
  int v7; // eax@3
  int v8; // ebx@3
  char v9; // al@7
  ORColumnHeaderString *v10; // [sp+8h] [bp-4h]@1

  v3 = token;
  v10 = this;
  v4 = ORTokenReader::ortr_ReadChar(token);
  v5 = targ;
  if ( ORBrace::orb_IsOpen(&targ->brace, v4) )
  {
    BYTE3(token) = 0;
    v7 = ORTokenReader::ortr_ReadNumber(v3, (char *)&token + 3);
    v8 = v7;
    if ( BYTE3(token) )
    {
      if ( v7 > 0 )
      {
        v9 = ORTokenReader::ortr_ReadChar(v3);
        if ( ORBrace::orb_IsClose(&v5->brace, v9) )
        {
          v10->orch_Length = v8;
          result = v8;
        }
        else
        {
          ORTokenReader::ortr_SetError(v3, "Brace must be closed in same line");
          result = 0;
        }
      }
      else
      {
        ORTokenReader::ortr_SetError(v3, "String length must be bigger then 0");
        result = 0;
      }
    }
    else
    {
      ORTokenReader::ortr_SetError(v3, "Error in string length");
      result = 0;
    }
  }
  else
  {
    ORTokenReader::ortr_SetError(v3, "String need length");
    result = 0;
  }
  return result;
}

//----- (006DBCA0) --------------------------------------------------------
int ORColumnHeaderString::orch_FieldType()
{
  return 2;
}

//----- (006DBCB0) --------------------------------------------------------
int ORColumnHeaderByte::orch_FieldType()
{
  return 3;
}

//----- (006DBCC0) --------------------------------------------------------
int ORColumnHeaderWord::orch_FieldType()
{
  return 4;
}

//----- (006DBCD0) --------------------------------------------------------
int ORColumnHeaderDwrd::orch_FieldType()
{
  return 5;
}

//----- (006DBCE0) --------------------------------------------------------
void __thiscall ORColumnHeaderList::ORColumnHeaderList(ORColumnHeaderList *this)
{
  memset(this, 0, sizeof(ORColumnHeaderList));
}

//----- (006DBD00) --------------------------------------------------------
char __thiscall ORColumnHeaderList::orchl_4AllInList(ORColumnHeaderList *this, ListIteratorDefault<ORColumnHeader> *arg)
{
  ORColumnHeaderList *v2; // ebx@1
  int v3; // esi@1
  ORColumnHeader *v4; // eax@2

  v2 = this;
  v3 = 0;
  while ( 1 )
  {
    v4 = v2->orchl_fieldname[v3];
    if ( v4 )
    {
      if ( !arg->vfptr->lid_Call(arg, v4, v3) )
        break;
    }
    if ( ++v3 >= 128 )
      return 1;
  }
  return 0;
}

//----- (006DBD40) --------------------------------------------------------
char *__thiscall ORTable::ort_RecordBuffer(ORTable *this, char *key)
{
  ORKeyList *v2; // ecx@1
  char *result; // eax@2
  ORRecord *v4; // eax@3

  v2 = this->ort_PrimaryKey;
  if ( v2 )
  {
    v4 = ORKeyList::okl_Searching(v2, key);
    result = ORRecord::orr_GetBuffer(v4);
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006DBD70) --------------------------------------------------------
int __thiscall RecordNumber::rn_Getnum(RecordNumber *this)
{
  return this->rn_Number;
}

//----- (006DBD80) --------------------------------------------------------
void __thiscall MakePrimaryKeyColumn::MakePrimaryKeyColumn(MakePrimaryKeyColumn *this, ORToken *column, ORRecord *rec, ORKeyList *keylist)
{
  this->vfptr = (ListIteratorDefault<ORField>Vtbl *)&MakePrimaryKeyColumn::`vftable';
  *(_QWORD *)&this->mpkc_keycolumn.ort_Code[3] = 0i64;
  *(_QWORD *)&this->mpkc_keycolumn.ort_Code[1] = 0i64;
  this->mpkc_keycolumn.ort_Code[0] = 0;
  *(_QWORD *)&this->mpkc_keycolumn.ort_Name[0] = *(_QWORD *)&column->ort_Code[0];
  *(_QWORD *)&this->mpkc_keycolumn.ort_Code[2] = *(_QWORD *)&column->ort_Code[2];
  this->mpkc_keycolumn.ort_Code[4] = column->ort_Code[4];
  this->mpkc_rec = rec;
  this->mpkc_keylist = keylist;
}
// 9C2C04: using guessed type unsigned __int8 (__thiscall *MakePrimaryKeyColumn::`vftable')(MakePrimaryKeyColumn *this, ORField *ele, unsigned __int16);

//----- (006DBDD0) --------------------------------------------------------
void __thiscall MakePrimaryKeyColumn::~MakePrimaryKeyColumn(MakePrimaryKeyColumn *this)
{
  this->vfptr = (ListIteratorDefault<ORField>Vtbl *)&ListIteratorDefault<ORField>::`vftable';
}
// 9C2BF4: using guessed type int (__stdcall *ListIteratorDefault<ORField>::`vftable')(int, NiGeometry *pkGeometry);

//----- (006DBDE0) --------------------------------------------------------
char __thiscall MakePrimaryKeyColumn::lid_Call(MakePrimaryKeyColumn *this, ORField *ele, unsigned __int16 handle)
{
  MakePrimaryKeyColumn *v3; // esi@1
  ORToken *v4; // eax@1
  ORRecord *v5; // ST04_4@7
  ORToken *v6; // eax@7
  char result; // al@8

  v3 = this;
  v4 = ORField::orf_ColumnName(ele);
  if ( v4->ort_Code[0] != v3->mpkc_keycolumn.ort_Code[0]
    || v4->ort_Code[1] != v3->mpkc_keycolumn.ort_Code[1]
    || v4->ort_Code[2] != v3->mpkc_keycolumn.ort_Code[2]
    || v4->ort_Code[3] != v3->mpkc_keycolumn.ort_Code[3]
    || v4->ort_Code[4] != v3->mpkc_keycolumn.ort_Code[4] )
  {
    result = 1;
  }
  else
  {
    if ( ele->vfptr->orf_GetType(ele) == 1 )
    {
      v5 = v3->mpkc_rec;
      v6 = (ORToken *)ele->vfptr->orf_GetBuffer(ele);
      ORKeyList::okl_AddKey(v3->mpkc_keylist, v6, v5);
    }
    result = 0;
  }
  return result;
}

//----- (006DBE50) --------------------------------------------------------
void __thiscall MakePrimaryKey::MakePrimaryKey(MakePrimaryKey *this, char *column, ORKeyList *keylist)
{
  MakePrimaryKey *v3; // esi@1
  char *v4; // eax@1

  v3 = this;
  v4 = this->mpk_keycolumn.ort_Name;
  this->vfptr = (ListIteratorDefault<ORRecord>Vtbl *)&MakePrimaryKey::`vftable';
  *((_DWORD *)v4 + 4) = 0;
  *((_DWORD *)v4 + 3) = 0;
  *((_DWORD *)v4 + 2) = 0;
  *((_DWORD *)v4 + 1) = 0;
  *(_DWORD *)v4 = 0;
  strncpy(this->mpk_keycolumn.ort_Name, column, 0x14u);
  v3->mpk_keylist = keylist;
}
// 9C2C0C: using guessed type unsigned __int8 (__thiscall *MakePrimaryKey::`vftable')(MakePrimaryKey *this, ORRecord *ele, unsigned __int16);

//----- (006DBE90) --------------------------------------------------------
void __thiscall MakePrimaryKey::~MakePrimaryKey(MakePrimaryKey *this)
{
  this->vfptr = (ListIteratorDefault<ORRecord>Vtbl *)&ListIteratorDefault<ORRecord>::`vftable';
}
// 9C2A8C: using guessed type int (__stdcall *ListIteratorDefault<ORRecord>::`vftable')(int, NiGeometry *pkGeometry);

//----- (006DBEA0) --------------------------------------------------------
char __thiscall MakePrimaryKey::lid_Call(MakePrimaryKey *this, ORRecord *ele, unsigned __int16 handle)
{
  ORKeyList *v3; // edx@1
  unsigned int v4; // esi@1
  unsigned int v5; // eax@1
  MakePrimaryKeyColumn arg; // [sp+8h] [bp-30h]@1
  int v8; // [sp+34h] [bp-4h]@1

  v3 = this->mpk_keylist;
  arg.mpkc_keycolumn.ort_Code[0] = this->mpk_keycolumn.ort_Code[0];
  *(_QWORD *)&arg.mpkc_keycolumn.ort_Code[1] = *(_QWORD *)&this->mpk_keycolumn.ort_Code[1];
  v4 = this->mpk_keycolumn.ort_Code[3];
  v5 = this->mpk_keycolumn.ort_Code[4];
  arg.vfptr = (ListIteratorDefault<ORField>Vtbl *)&MakePrimaryKeyColumn::`vftable';
  *(_QWORD *)&arg.mpkc_keycolumn.ort_Code[3] = __PAIR__(v5, v4);
  arg.mpkc_rec = ele;
  arg.mpkc_keylist = v3;
  v8 = 0;
  ORRecord::orr_4AllInList(ele, (ListIteratorDefault<ORField> *)&arg.vfptr);
  return 1;
}
// 9C2C04: using guessed type unsigned __int8 (__thiscall *MakePrimaryKeyColumn::`vftable')(MakePrimaryKeyColumn *this, ORField *ele, unsigned __int16);

//----- (006DBF30) --------------------------------------------------------
void __thiscall OrderArgument::OrderArgument(OrderArgument *this, int targ)
{
  this->vfptr = (ListIteratorDefault<ORRecord>Vtbl *)&OrderArgument::`vftable';
  this->oa_target = targ;
  this->oa_record = 0;
}
// 9C2C14: using guessed type unsigned __int8 (__thiscall *OrderArgument::`vftable')(OrderArgument *this, ORRecord *ele, unsigned __int16);

//----- (006DBF50) --------------------------------------------------------
void __thiscall OrderArgument::~OrderArgument(OrderArgument *this)
{
  this->vfptr = (ListIteratorDefault<ORRecord>Vtbl *)&ListIteratorDefault<ORRecord>::`vftable';
}
// 9C2A8C: using guessed type int (__stdcall *ListIteratorDefault<ORRecord>::`vftable')(int, NiGeometry *pkGeometry);

//----- (006DBF60) --------------------------------------------------------
void __thiscall ColumnNameArgument::ColumnNameArgument(ColumnNameArgument *this, ORTokenReader *token)
{
  this->vfptr = (ListIteratorDefault<ORColumnHeader>Vtbl *)&ColumnNameArgument::`vftable';
  this->cna_token = token;
}
// 9C2C1C: using guessed type unsigned __int8 (__thiscall *ColumnNameArgument::`vftable')(ColumnNameArgument *this, ORColumnHeader *ele, unsigned __int16);

//----- (006DBF80) --------------------------------------------------------
void __thiscall ColumnNameArgument::~ColumnNameArgument(ColumnNameArgument *this)
{
  this->vfptr = (ListIteratorDefault<ORColumnHeader>Vtbl *)&ListIteratorDefault<ORColumnHeader>::`vftable';
}
// 9C2BFC: using guessed type int (__stdcall *ListIteratorDefault<ORColumnHeader>::`vftable')(int, NiGeometry *pkGeometry);

//----- (006DBF90) --------------------------------------------------------
void __thiscall DataRecordArgument::DataRecordArgument(DataRecordArgument *this, ORTokenReader *token, ORRecord *record)
{
  this->vfptr = (ListIteratorDefault<ORColumnHeader>Vtbl *)&DataRecordArgument::`vftable';
  this->dra_token = token;
  this->dra_datarecord = record;
}
// 9C2C24: using guessed type unsigned __int8 (__thiscall *DataRecordArgument::`vftable')(DataRecordArgument *this, ORColumnHeader *ele, unsigned __int16);

//----- (006DBFB0) --------------------------------------------------------
void __thiscall DataRecordArgument::~DataRecordArgument(DataRecordArgument *this)
{
  this->vfptr = (ListIteratorDefault<ORColumnHeader>Vtbl *)&ListIteratorDefault<ORColumnHeader>::`vftable';
}
// 9C2BFC: using guessed type int (__stdcall *ListIteratorDefault<ORColumnHeader>::`vftable')(int, NiGeometry *pkGeometry);

//----- (006DBFC0) --------------------------------------------------------
char __thiscall DataRecordArgument::lid_Call(DataRecordArgument *this, ORColumnHeader *ele, unsigned __int16 handle)
{
  ORColumnHeader *v3; // ebx@1
  ORRecord *v4; // edi@1
  unsigned __int16 v5; // ax@1
  ORField *v6; // eax@1
  ORField *v7; // esi@1
  char result; // al@2
  ORTokenReader *v9; // [sp+Ch] [bp-4h]@1

  v3 = ele;
  v4 = this->dra_datarecord;
  v9 = this->dra_token;
  v5 = ele->vfptr->orch_FieldType(ele);
  v6 = ORRecord::orr_AllocObject(v4, (unsigned __int16 *)&ele, v5);
  v7 = v6;
  if ( v6 )
  {
    ORField::orf_SetColumnHead(v6, v3);
    ORRecord::orr_AllocMemory(v4, v7);
    result = v7->vfptr->orf_Read(v7, v9);
  }
  else
  {
    ORTokenReader::ortr_SetError(v9, "Cannot alloc field memory");
    result = 0;
  }
  return result;
}

//----- (006DC030) --------------------------------------------------------
void __thiscall ColumnCheckArgument::ColumnCheckArgument(ColumnCheckArgument *this, ORToken *col, char *content)
{
  ColumnCheckArgument *v3; // esi@1
  char *v4; // ST00_4@1

  v3 = this;
  this->cca_column = col;
  this->vfptr = (ListIteratorDefault<ORField>Vtbl *)&ColumnCheckArgument::`vftable';
  this->cca_contentstring = content;
  v4 = this->cca_contentindex.ort_Name;
  *((_DWORD *)v4 + 4) = 0;
  *((_DWORD *)v4 + 3) = 0;
  *((_DWORD *)v4 + 2) = 0;
  *((_DWORD *)v4 + 1) = 0;
  *(_DWORD *)v4 = 0;
  strncpy(this->cca_contentindex.ort_Name, content, 0x14u);
  v3->cca_found = 0;
}
// 9C2C2C: using guessed type unsigned __int8 (__thiscall *ColumnCheckArgument::`vftable')(ColumnCheckArgument *this, ORField *ele, unsigned __int16);

//----- (006DC080) --------------------------------------------------------
void __thiscall ColumnCheckArgument::~ColumnCheckArgument(ColumnCheckArgument *this)
{
  this->vfptr = (ListIteratorDefault<ORField>Vtbl *)&ListIteratorDefault<ORField>::`vftable';
}
// 9C2BF4: using guessed type int (__stdcall *ListIteratorDefault<ORField>::`vftable')(int, NiGeometry *pkGeometry);

//----- (006DC090) --------------------------------------------------------
char __thiscall ColumnCheckArgument::lid_Call(ColumnCheckArgument *this, ORField *ele, unsigned __int16 handle)
{
  ColumnCheckArgument *v3; // edi@1
  ORToken *v4; // esi@1
  ORToken *v5; // eax@1
  char result; // al@8

  v3 = this;
  v4 = this->cca_column;
  v5 = ORField::orf_ColumnName(ele);
  if ( v5->ort_Code[0] != v4->ort_Code[0]
    || v5->ort_Code[1] != v4->ort_Code[1]
    || v5->ort_Code[2] != v4->ort_Code[2]
    || v5->ort_Code[3] != v4->ort_Code[3]
    || v5->ort_Code[4] != v4->ort_Code[4] )
  {
    result = 1;
  }
  else
  {
    if ( ele->vfptr->orf_CompareContent(ele, v3->cca_contentstring, &v3->cca_contentindex) )
      v3->cca_found = 1;
    result = 0;
  }
  return result;
}

//----- (006DC100) --------------------------------------------------------
void __thiscall TargetColumnFindArgument::TargetColumnFindArgument(TargetColumnFindArgument *this, char *target, int *type)
{
  TargetColumnFindArgument *v3; // esi@1
  char *v4; // ST00_4@1

  v3 = this;
  this->vfptr = (ListIteratorDefault<ORField>Vtbl *)&TargetColumnFindArgument::`vftable';
  v4 = this->tcfa_target.ort_Name;
  *((_DWORD *)v4 + 4) = 0;
  *((_DWORD *)v4 + 3) = 0;
  *((_DWORD *)v4 + 2) = 0;
  *((_DWORD *)v4 + 1) = 0;
  *(_DWORD *)v4 = 0;
  strncpy(this->tcfa_target.ort_Name, target, 0x14u);
  v3->tcfa_content = 0;
  v3->tcfa_type = type;
}
// 9C2C34: using guessed type unsigned __int8 (__thiscall *TargetColumnFindArgument::`vftable')(TargetColumnFindArgument *this, ORField *ele, unsigned __int16);

//----- (006DC140) --------------------------------------------------------
void __thiscall TargetColumnFindArgument::~TargetColumnFindArgument(TargetColumnFindArgument *this)
{
  this->vfptr = (ListIteratorDefault<ORField>Vtbl *)&ListIteratorDefault<ORField>::`vftable';
}
// 9C2BF4: using guessed type int (__stdcall *ListIteratorDefault<ORField>::`vftable')(int, NiGeometry *pkGeometry);

//----- (006DC150) --------------------------------------------------------
char __thiscall TargetColumnFindArgument::lid_Call(TargetColumnFindArgument *this, ORField *ele, unsigned __int16 handle)
{
  TargetColumnFindArgument *v3; // esi@1
  ORToken *v4; // eax@1
  char result; // al@6

  v3 = this;
  v4 = ORField::orf_ColumnName(ele);
  if ( v4->ort_Code[0] != v3->tcfa_target.ort_Code[0]
    || v4->ort_Code[1] != v3->tcfa_target.ort_Code[1]
    || v4->ort_Code[2] != v3->tcfa_target.ort_Code[2]
    || v4->ort_Code[3] != v3->tcfa_target.ort_Code[3]
    || v4->ort_Code[4] != v3->tcfa_target.ort_Code[4] )
  {
    result = 1;
  }
  else
  {
    v3->tcfa_content = ele->vfptr->orf_GetBuffer(ele);
    *v3->tcfa_type = ele->vfptr->orf_GetType(ele);
    result = 0;
  }
  return result;
}

//----- (006DC1C0) --------------------------------------------------------
void __thiscall RecordDataCompareArgument::RecordDataCompareArgument(RecordDataCompareArgument *this, char *col, char *content, int skip)
{
  RecordDataCompareArgument *v4; // esi@1
  char *v5; // ST00_4@1

  v4 = this;
  this->vfptr = (ListIteratorDefault<ORRecord>Vtbl *)&RecordDataCompareArgument::`vftable';
  v5 = this->rdca_column.ort_Name;
  *((_DWORD *)v5 + 4) = 0;
  *((_DWORD *)v5 + 3) = 0;
  *((_DWORD *)v5 + 2) = 0;
  *((_DWORD *)v5 + 1) = 0;
  *(_DWORD *)v5 = 0;
  strncpy(this->rdca_column.ort_Name, col, 0x14u);
  v4->rdca_record = 0;
  v4->rdca_skip = skip;
  v4->rdca_content = content;
}
// 9C2C3C: using guessed type unsigned __int8 (__thiscall *RecordDataCompareArgument::`vftable')(RecordDataCompareArgument *this, ORRecord *ele, unsigned __int16);

//----- (006DC210) --------------------------------------------------------
void __thiscall RecordDataCompareArgument::~RecordDataCompareArgument(RecordDataCompareArgument *this)
{
  this->vfptr = (ListIteratorDefault<ORRecord>Vtbl *)&ListIteratorDefault<ORRecord>::`vftable';
}
// 9C2A8C: using guessed type int (__stdcall *ListIteratorDefault<ORRecord>::`vftable')(int, NiGeometry *pkGeometry);

//----- (006DC220) --------------------------------------------------------
char __thiscall RecordDataCompareArgument::lid_Call(RecordDataCompareArgument *this, ORRecord *ele, unsigned __int16 handle)
{
  RecordDataCompareArgument *v3; // esi@1
  char *v4; // ST04_4@1
  int v5; // eax@2
  ColumnCheckArgument arg; // [sp+10h] [bp-34h]@1
  int v8; // [sp+40h] [bp-4h]@1

  v3 = this;
  v4 = this->rdca_content;
  arg.vfptr = (ListIteratorDefault<ORField>Vtbl *)&ColumnCheckArgument::`vftable';
  arg.cca_column = &this->rdca_column;
  arg.cca_contentstring = v4;
  *(_QWORD *)&arg.cca_contentindex.ort_Code[3] = 0i64;
  *(_QWORD *)&arg.cca_contentindex.ort_Code[1] = 0i64;
  arg.cca_contentindex.ort_Code[0] = 0;
  strncpy(arg.cca_contentindex.ort_Name, v4, 0x14u);
  arg.cca_found = 0;
  v8 = 0;
  ORRecord::orr_4AllInList(ele, (ListIteratorDefault<ORField> *)&arg.vfptr);
  if ( !arg.cca_found )
    return 1;
  v5 = v3->rdca_skip;
  if ( v5 > 0 )
  {
    v3->rdca_skip = v5 - 1;
    return 1;
  }
  v3->rdca_record = ele;
  return 0;
}
// 9C2C2C: using guessed type unsigned __int8 (__thiscall *ColumnCheckArgument::`vftable')(ColumnCheckArgument *this, ORField *ele, unsigned __int16);

//----- (006DC2D0) --------------------------------------------------------
void __thiscall TableNameCompareArgument::TableNameCompareArgument(TableNameCompareArgument *this, ORToken *tname)
{
  this->vfptr = (ListIteratorDefault<ORTable>Vtbl *)&TableNameCompareArgument::`vftable';
  *(_QWORD *)&this->tnca_tablename.ort_Code[3] = 0i64;
  *(_QWORD *)&this->tnca_tablename.ort_Code[1] = 0i64;
  this->tnca_tablename.ort_Code[0] = 0;
  *(_QWORD *)&this->tnca_tablename.ort_Name[0] = *(_QWORD *)&tname->ort_Code[0];
  *(_QWORD *)&this->tnca_tablename.ort_Code[2] = *(_QWORD *)&tname->ort_Code[2];
  this->tnca_tablename.ort_Code[4] = tname->ort_Code[4];
  this->tnca_found = 0;
}
// 9C2C44: using guessed type unsigned __int8 (__thiscall *TableNameCompareArgument::`vftable')(TableNameCompareArgument *this, ORTable *ele, unsigned __int16);

//----- (006DC320) --------------------------------------------------------
void __thiscall TableNameCompareArgument::~TableNameCompareArgument(TableNameCompareArgument *this)
{
  this->vfptr = (ListIteratorDefault<ORTable>Vtbl *)&ListIteratorDefault<ORTable>::`vftable';
}
// 9C2A94: using guessed type int (__stdcall *ListIteratorDefault<ORTable>::`vftable')(int, NiGeometry *pkGeometry);

//----- (006DC330) --------------------------------------------------------
char __thiscall TableNameCompareArgument::lid_Call(TableNameCompareArgument *this, ORTable *ele, unsigned __int16 handle)
{
  TableNameCompareArgument *v3; // esi@1
  ORTable *v4; // eax@1
  char result; // al@6

  v3 = this;
  v4 = ORTable::ort_GetTableName(ele);
  if ( v3->tnca_tablename.ort_Code[0] != v4->ort_TableName.ort_Code[0]
    || v3->tnca_tablename.ort_Code[1] != v4->ort_TableName.ort_Code[1]
    || v3->tnca_tablename.ort_Code[2] != v4->ort_TableName.ort_Code[2]
    || v3->tnca_tablename.ort_Code[3] != v4->ort_TableName.ort_Code[3]
    || v3->tnca_tablename.ort_Code[4] != v4->ort_TableName.ort_Code[4] )
  {
    result = 1;
  }
  else
  {
    v3->tnca_found = ele;
    result = 0;
  }
  return result;
}

//----- (006DC380) --------------------------------------------------------
void __thiscall ORColumnHeader::ORColumnHeader(ORColumnHeader *this)
{
  this->vfptr = (ORColumnHeaderVtbl *)&ORColumnHeader::`vftable';
  *(_QWORD *)&this->orch_ColumnName.ort_Code[3] = 0i64;
  *(_QWORD *)&this->orch_ColumnName.ort_Code[1] = 0i64;
  this->orch_ColumnName.ort_Code[0] = 0;
  this->orch_Length = 0;
}
// 9C2C4C: using guessed type int (__thiscall *ORColumnHeader::`vftable')(ORColumnHeader *this, struct ORTokenReader *, struct TokenArgument *);

//----- (006DC3A0) --------------------------------------------------------
void __thiscall ORColumnHeader::~ORColumnHeader(ORColumnHeader *this)
{
  this->vfptr = (ORColumnHeaderVtbl *)&ORColumnHeader::`vftable';
}
// 9C2C4C: using guessed type int (__thiscall *ORColumnHeader::`vftable')(ORColumnHeader *this, struct ORTokenReader *, struct TokenArgument *);

//----- (006DC3B0) --------------------------------------------------------
void __thiscall ORColumnHeader::orch_SetColumnName(ORColumnHeader *this, char *name)
{
  char *v2; // eax@1

  v2 = this->orch_ColumnName.ort_Name;
  *((_DWORD *)v2 + 4) = 0;
  *((_DWORD *)v2 + 3) = 0;
  *((_DWORD *)v2 + 2) = 0;
  *((_DWORD *)v2 + 1) = 0;
  *(_DWORD *)v2 = 0;
  strncpy(this->orch_ColumnName.ort_Name, name, 0x14u);
}

//----- (006DC3E0) --------------------------------------------------------
void __thiscall ORColumnHeaderIndex::ORColumnHeaderIndex(ORColumnHeaderIndex *this)
{
  *(_QWORD *)&this->orch_ColumnName.ort_Code[3] = 0i64;
  *(_QWORD *)&this->orch_ColumnName.ort_Code[1] = 0i64;
  this->orch_ColumnName.ort_Code[0] = 0;
  this->vfptr = (ORColumnHeaderVtbl *)&ORColumnHeaderIndex::`vftable';
  this->orch_Length = 20;
}
// 9C2C58: using guessed type int (__thiscall *ORColumnHeaderIndex::`vftable')(ORColumnHeader *this, struct ORTokenReader *, struct TokenArgument *);

//----- (006DC410) --------------------------------------------------------
void __thiscall ORColumnHeaderIndex::~ORColumnHeaderIndex(ORColumnHeaderIndex *this)
{
  this->vfptr = (ORColumnHeaderVtbl *)&ORColumnHeader::`vftable';
}
// 9C2C4C: using guessed type int (__thiscall *ORColumnHeader::`vftable')(ORColumnHeader *this, struct ORTokenReader *, struct TokenArgument *);

//----- (006DC420) --------------------------------------------------------
void __thiscall ORColumnHeaderString::ORColumnHeaderString(ORColumnHeaderString *this)
{
  *(_QWORD *)&this->orch_ColumnName.ort_Code[3] = 0i64;
  *(_QWORD *)&this->orch_ColumnName.ort_Code[1] = 0i64;
  this->orch_ColumnName.ort_Code[0] = 0;
  this->vfptr = (ORColumnHeaderVtbl *)&ORColumnHeaderString::`vftable';
  this->orch_Length = -1;
}
// 9C2C64: using guessed type int (__thiscall *ORColumnHeaderString::`vftable')(ORColumnHeaderString *this, struct ORTokenReader *result, struct TokenArgument *);

//----- (006DC450) --------------------------------------------------------
void __thiscall ORColumnHeaderString::~ORColumnHeaderString(ORColumnHeaderString *this)
{
  this->vfptr = (ORColumnHeaderVtbl *)&ORColumnHeader::`vftable';
}
// 9C2C4C: using guessed type int (__thiscall *ORColumnHeader::`vftable')(ORColumnHeader *this, struct ORTokenReader *, struct TokenArgument *);

//----- (006DC460) --------------------------------------------------------
void __thiscall ORColumnHeaderByte::ORColumnHeaderByte(ORColumnHeaderByte *this)
{
  *(_QWORD *)&this->orch_ColumnName.ort_Code[3] = 0i64;
  *(_QWORD *)&this->orch_ColumnName.ort_Code[1] = 0i64;
  this->orch_ColumnName.ort_Code[0] = 0;
  this->vfptr = (ORColumnHeaderVtbl *)&ORColumnHeaderByte::`vftable';
  this->orch_Length = 1;
}
// 9C2C70: using guessed type int (__thiscall *ORColumnHeaderByte::`vftable')(ORColumnHeader *this, struct ORTokenReader *, struct TokenArgument *);

//----- (006DC490) --------------------------------------------------------
void __thiscall ORColumnHeaderByte::~ORColumnHeaderByte(ORColumnHeaderByte *this)
{
  this->vfptr = (ORColumnHeaderVtbl *)&ORColumnHeader::`vftable';
}
// 9C2C4C: using guessed type int (__thiscall *ORColumnHeader::`vftable')(ORColumnHeader *this, struct ORTokenReader *, struct TokenArgument *);

//----- (006DC4A0) --------------------------------------------------------
void __thiscall ORColumnHeaderWord::ORColumnHeaderWord(ORColumnHeaderWord *this)
{
  *(_QWORD *)&this->orch_ColumnName.ort_Code[3] = 0i64;
  *(_QWORD *)&this->orch_ColumnName.ort_Code[1] = 0i64;
  this->orch_ColumnName.ort_Code[0] = 0;
  this->vfptr = (ORColumnHeaderVtbl *)&ORColumnHeaderWord::`vftable';
  this->orch_Length = 2;
}
// 9C2C7C: using guessed type int (__thiscall *ORColumnHeaderWord::`vftable')(ORColumnHeader *this, struct ORTokenReader *, struct TokenArgument *);

//----- (006DC4D0) --------------------------------------------------------
void __thiscall ORColumnHeaderWord::~ORColumnHeaderWord(ORColumnHeaderWord *this)
{
  this->vfptr = (ORColumnHeaderVtbl *)&ORColumnHeader::`vftable';
}
// 9C2C4C: using guessed type int (__thiscall *ORColumnHeader::`vftable')(ORColumnHeader *this, struct ORTokenReader *, struct TokenArgument *);

//----- (006DC4E0) --------------------------------------------------------
void __thiscall ORColumnHeaderDwrd::ORColumnHeaderDwrd(ORColumnHeaderDwrd *this)
{
  *(_QWORD *)&this->orch_ColumnName.ort_Code[3] = 0i64;
  *(_QWORD *)&this->orch_ColumnName.ort_Code[1] = 0i64;
  this->orch_ColumnName.ort_Code[0] = 0;
  this->vfptr = (ORColumnHeaderVtbl *)&ORColumnHeaderDwrd::`vftable';
  this->orch_Length = 4;
}
// 9C2C88: using guessed type int (__thiscall *ORColumnHeaderDwrd::`vftable')(ORColumnHeader *this, struct ORTokenReader *, struct TokenArgument *);

//----- (006DC510) --------------------------------------------------------
void __thiscall ORColumnHeaderDwrd::~ORColumnHeaderDwrd(ORColumnHeaderDwrd *this)
{
  this->vfptr = (ORColumnHeaderVtbl *)&ORColumnHeader::`vftable';
}
// 9C2C4C: using guessed type int (__thiscall *ORColumnHeader::`vftable')(ORColumnHeader *this, struct ORTokenReader *, struct TokenArgument *);

//----- (006DC520) --------------------------------------------------------
ORColumnHeader *__thiscall ORColumnHeaderList::orchl_AllocObject(ORColumnHeaderList *this, unsigned __int16 *hnd, unsigned __int16 type)
{
  ORColumnHeaderList *v3; // ebx@1
  int v4; // edi@1
  ORColumnHeader *result; // eax@4

  v3 = this;
  v4 = 0;
  while ( this->orchl_fieldname[v4] )
  {
    if ( ++v4 >= 128 )
      return 0;
  }
  switch ( type )
  {
    case 1u:
      result = (ORColumnHeader *)operator new(0x1Cu);
      if ( !result )
        goto LABEL_16;
      result->orch_ColumnName.ort_Code[4] = 0;
      result->orch_ColumnName.ort_Code[3] = 0;
      result->orch_ColumnName.ort_Code[2] = 0;
      result->orch_ColumnName.ort_Code[1] = 0;
      result->orch_ColumnName.ort_Code[0] = 0;
      result->vfptr = (ORColumnHeaderVtbl *)&ORColumnHeaderIndex::`vftable';
      result->orch_Length = 20;
      v3->orchl_fieldname[v4] = result;
      break;
    case 2u:
      result = (ORColumnHeader *)operator new(0x1Cu);
      if ( !result )
        goto LABEL_16;
      result->orch_ColumnName.ort_Code[4] = 0;
      result->orch_ColumnName.ort_Code[3] = 0;
      result->orch_ColumnName.ort_Code[2] = 0;
      result->orch_ColumnName.ort_Code[1] = 0;
      result->orch_ColumnName.ort_Code[0] = 0;
      result->vfptr = (ORColumnHeaderVtbl *)&ORColumnHeaderString::`vftable';
      result->orch_Length = -1;
      v3->orchl_fieldname[v4] = result;
      break;
    case 3u:
      result = (ORColumnHeader *)operator new(0x1Cu);
      if ( !result )
        goto LABEL_16;
      result->orch_ColumnName.ort_Code[4] = 0;
      result->orch_ColumnName.ort_Code[3] = 0;
      result->orch_ColumnName.ort_Code[2] = 0;
      result->orch_ColumnName.ort_Code[1] = 0;
      result->orch_ColumnName.ort_Code[0] = 0;
      result->vfptr = (ORColumnHeaderVtbl *)&ORColumnHeaderByte::`vftable';
      result->orch_Length = 1;
      v3->orchl_fieldname[v4] = result;
      break;
    case 4u:
      result = (ORColumnHeader *)operator new(0x1Cu);
      if ( !result )
        goto LABEL_16;
      result->orch_ColumnName.ort_Code[4] = 0;
      result->orch_ColumnName.ort_Code[3] = 0;
      result->orch_ColumnName.ort_Code[2] = 0;
      result->orch_ColumnName.ort_Code[1] = 0;
      result->orch_ColumnName.ort_Code[0] = 0;
      result->vfptr = (ORColumnHeaderVtbl *)&ORColumnHeaderWord::`vftable';
      result->orch_Length = 2;
      v3->orchl_fieldname[v4] = result;
      break;
    case 5u:
      result = (ORColumnHeader *)operator new(0x1Cu);
      if ( !result )
      {
LABEL_16:
        v3->orchl_fieldname[v4] = 0;
        goto LABEL_17;
      }
      result->orch_ColumnName.ort_Code[4] = 0;
      result->orch_ColumnName.ort_Code[3] = 0;
      result->orch_ColumnName.ort_Code[2] = 0;
      result->orch_ColumnName.ort_Code[1] = 0;
      result->orch_ColumnName.ort_Code[0] = 0;
      result->vfptr = (ORColumnHeaderVtbl *)&ORColumnHeaderDwrd::`vftable';
      result->orch_Length = 4;
      v3->orchl_fieldname[v4] = result;
      break;
    default:
LABEL_17:
      result = v3->orchl_fieldname[v4];
      break;
  }
  return result;
}
// 9C2C58: using guessed type int (__thiscall *ORColumnHeaderIndex::`vftable')(ORColumnHeader *this, struct ORTokenReader *, struct TokenArgument *);
// 9C2C64: using guessed type int (__thiscall *ORColumnHeaderString::`vftable')(ORColumnHeaderString *this, struct ORTokenReader *result, struct TokenArgument *);
// 9C2C70: using guessed type int (__thiscall *ORColumnHeaderByte::`vftable')(ORColumnHeader *this, struct ORTokenReader *, struct TokenArgument *);
// 9C2C7C: using guessed type int (__thiscall *ORColumnHeaderWord::`vftable')(ORColumnHeader *this, struct ORTokenReader *, struct TokenArgument *);
// 9C2C88: using guessed type int (__thiscall *ORColumnHeaderDwrd::`vftable')(ORColumnHeader *this, struct ORTokenReader *, struct TokenArgument *);

//----- (006DC690) --------------------------------------------------------
char __thiscall ORColumnHeaderList::orchl_FreeObject(ORColumnHeaderList *this, unsigned __int16 hnd, unsigned __int16 type)
{
  ORColumnHeader *v3; // eax@1
  char result; // al@2
  ORColumnHeader *v5; // ST00_4@3

  v3 = this->orchl_fieldname[hnd];
  if ( v3 )
  {
    v5 = this->orchl_fieldname[hnd];
    v3->vfptr = (ORColumnHeaderVtbl *)&ORColumnHeader::`vftable';
    operator delete(v5);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9C2C4C: using guessed type int (__thiscall *ORColumnHeader::`vftable')(ORColumnHeader *this, struct ORTokenReader *, struct TokenArgument *);

//----- (006DC6C0) --------------------------------------------------------
bool __thiscall ORTable::ort_MakePrimaryKey(ORTable *this, char *column)
{
  ORTable *v2; // esi@1
  ORKeyList *v3; // edi@1
  ORKeyList *v4; // eax@3
  ORKeyList *v5; // eax@4
  ORKeyList *v6; // edi@4
  bool result; // al@7
  ORKeyList *v8; // edi@9
  MakePrimaryKey arg; // [sp+18h] [bp-2Ch]@8
  int v10; // [sp+40h] [bp-4h]@3

  v2 = this;
  v3 = this->ort_PrimaryKey;
  if ( v3 )
  {
    ORKeyList::~ORKeyList(v3);
    operator delete(v3);
  }
  v4 = (ORKeyList *)operator new(0x6004u);
  v10 = 0;
  if ( v4 )
  {
    ORKeyList::ORKeyList(v4);
    v6 = v5;
  }
  else
  {
    v6 = 0;
  }
  v10 = -1;
  v2->ort_PrimaryKey = v6;
  if ( v6 )
  {
    arg.vfptr = (ListIteratorDefault<ORRecord>Vtbl *)&MakePrimaryKey::`vftable';
    *(_QWORD *)&arg.mpk_keycolumn.ort_Code[3] = 0i64;
    *(_QWORD *)&arg.mpk_keycolumn.ort_Code[1] = 0i64;
    arg.mpk_keycolumn.ort_Code[0] = 0;
    strncpy(arg.mpk_keycolumn.ort_Name, column, 0x14u);
    arg.mpk_keylist = v6;
    v10 = 1;
    List<ORRecord>::l_4AllInList((List<ORTable> *)&v2->ort_DataRecord, (ListIteratorDefault<ORTable> *)&arg);
    if ( !ORKeyList::okl_Sorting(v2->ort_PrimaryKey) )
    {
      v8 = v2->ort_PrimaryKey;
      if ( v8 )
      {
        ORKeyList::~ORKeyList(v2->ort_PrimaryKey);
        operator delete(v8);
      }
      v2->ort_PrimaryKey = 0;
    }
    result = v2->ort_PrimaryKey != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9C2C0C: using guessed type unsigned __int8 (__thiscall *MakePrimaryKey::`vftable')(MakePrimaryKey *this, ORRecord *ele, unsigned __int16);

//----- (006DC7E0) --------------------------------------------------------
char __thiscall ORTable::ort_ReadColumnName(ORTable *this, ORTokenReader *token)
{
  ORTable *v2; // edi@1
  int v3; // esi@1
  ORColumnHeader *v4; // eax@2
  ColumnNameArgument arg; // [sp+Ch] [bp-14h]@1
  int v7; // [sp+1Ch] [bp-4h]@1

  v2 = this;
  arg.vfptr = (ListIteratorDefault<ORColumnHeader>Vtbl *)&ColumnNameArgument::`vftable';
  arg.cna_token = token;
  v7 = 0;
  v3 = 0;
  while ( 1 )
  {
    v4 = v2->ort_HeaderList.orchl_fieldname[v3];
    if ( v4 )
    {
      if ( !arg.vfptr->lid_Call((ListIteratorDefault<ORColumnHeader> *)&arg, v4, v3) )
        break;
    }
    if ( ++v3 >= 128 )
      return 1;
  }
  return 0;
}
// 9C2C1C: using guessed type unsigned __int8 (__thiscall *ColumnNameArgument::`vftable')(ColumnNameArgument *this, ORColumnHeader *ele, unsigned __int16);

//----- (006DC870) --------------------------------------------------------
void *__thiscall ORRecord::orr_GetFieldData(ORRecord *this, char *targetcolumn, int *type)
{
  ORRecord *v3; // edi@1
  TargetColumnFindArgument arg; // [sp+Ch] [bp-30h]@1
  int v6; // [sp+38h] [bp-4h]@1

  v3 = this;
  arg.vfptr = (ListIteratorDefault<ORField>Vtbl *)&TargetColumnFindArgument::`vftable';
  *(_QWORD *)&arg.tcfa_target.ort_Code[3] = 0i64;
  *(_QWORD *)&arg.tcfa_target.ort_Code[1] = 0i64;
  arg.tcfa_target.ort_Code[0] = 0;
  strncpy(arg.tcfa_target.ort_Name, targetcolumn, 0x14u);
  arg.tcfa_content = 0;
  arg.tcfa_type = type;
  v6 = 0;
  ORRecord::orr_4AllInList(v3, (ListIteratorDefault<ORField> *)&arg.vfptr);
  return arg.tcfa_content;
}
// 9C2C34: using guessed type unsigned __int8 (__thiscall *TargetColumnFindArgument::`vftable')(TargetColumnFindArgument *this, ORField *ele, unsigned __int16);

//----- (006DC900) --------------------------------------------------------
ORRecord *__thiscall ORTable::ort_FindData(ORTable *this, char *column, char *key, int *type)
{
  ORTable *v4; // esi@1
  ORKeyList *v5; // ecx@1
  ORRecord *result; // eax@2
  ORRecord *v7; // eax@4

  v4 = this;
  v5 = this->ort_PrimaryKey;
  if ( v5 )
  {
    result = ORKeyList::okl_Searching(v5, key);
    if ( result )
    {
      v7 = ORKeyList::okl_Searching(v4->ort_PrimaryKey, key);
      result = (ORRecord *)ORRecord::orr_GetFieldData(v7, column, type);
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006DC950) --------------------------------------------------------
void *__thiscall ORTable::ort_FindData(ORTable *this, char *column, char *content, char *targetcolumn, int skip, int *type)
{
  ORTable *v6; // edi@1
  ORRecord *v7; // edi@2
  void *result; // eax@2
  RecordDataCompareArgument arg; // [sp+10h] [bp-54h]@1
  ListIteratorDefault<ORField> v10; // [sp+34h] [bp-30h]@2
  char dest[4]; // [sp+38h] [bp-2Ch]@2
  int v12; // [sp+3Ch] [bp-28h]@2
  int v13; // [sp+40h] [bp-24h]@2
  int v14; // [sp+44h] [bp-20h]@2
  int v15; // [sp+48h] [bp-1Ch]@2
  void *v16; // [sp+4Ch] [bp-18h]@2
  int *v17; // [sp+50h] [bp-14h]@2
  int v18; // [sp+60h] [bp-4h]@1

  v6 = this;
  arg.vfptr = (ListIteratorDefault<ORRecord>Vtbl *)&RecordDataCompareArgument::`vftable';
  *(_QWORD *)&arg.rdca_column.ort_Code[3] = 0i64;
  *(_QWORD *)&arg.rdca_column.ort_Code[1] = 0i64;
  arg.rdca_column.ort_Code[0] = 0;
  strncpy(arg.rdca_column.ort_Name, column, 0x14u);
  arg.rdca_content = content;
  arg.rdca_record = 0;
  arg.rdca_skip = skip;
  v18 = 0;
  List<ORRecord>::l_4AllInList((List<ORTable> *)&v6->ort_DataRecord, (ListIteratorDefault<ORTable> *)&arg);
  if ( arg.rdca_record )
  {
    v7 = arg.rdca_record;
    v10.vfptr = (ListIteratorDefault<ORField>Vtbl *)&TargetColumnFindArgument::`vftable';
    v15 = 0;
    v14 = 0;
    v13 = 0;
    v12 = 0;
    *(_DWORD *)dest = 0;
    strncpy(dest, targetcolumn, 0x14u);
    v16 = 0;
    v17 = type;
    LOBYTE(v18) = 1;
    ORRecord::orr_4AllInList(v7, &v10);
    result = v16;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9C2C34: using guessed type unsigned __int8 (__thiscall *TargetColumnFindArgument::`vftable')(TargetColumnFindArgument *this, ORField *ele, unsigned __int16);
// 9C2C3C: using guessed type unsigned __int8 (__thiscall *RecordDataCompareArgument::`vftable')(RecordDataCompareArgument *this, ORRecord *ele, unsigned __int16);

//----- (006DCA40) --------------------------------------------------------
char *__thiscall ORTable::ort_RecordBuffer(ORTable *this, int order)
{
  char *result; // eax@2
  OrderArgument arg; // [sp+4h] [bp-18h]@1
  int v4; // [sp+18h] [bp-4h]@1

  arg.vfptr = (ListIteratorDefault<ORRecord>Vtbl *)&OrderArgument::`vftable';
  arg.oa_target = order;
  arg.oa_record = 0;
  v4 = 0;
  List<ORRecord>::l_4AllInList((List<ORTable> *)&this->ort_DataRecord, (ListIteratorDefault<ORTable> *)&arg);
  if ( arg.oa_record )
    result = ORRecord::orr_GetBuffer(arg.oa_record);
  else
    result = 0;
  return result;
}
// 9C2C14: using guessed type unsigned __int8 (__thiscall *OrderArgument::`vftable')(OrderArgument *this, ORRecord *ele, unsigned __int16);

//----- (006DCAC0) --------------------------------------------------------
char *__thiscall ORTable::ort_RecordBuffer(ORTable *this, char *column, char *content, int skip)
{
  ORTable *v4; // edi@1
  char *result; // eax@2
  RecordDataCompareArgument arg; // [sp+Ch] [bp-34h]@1
  int v7; // [sp+3Ch] [bp-4h]@1

  v4 = this;
  arg.vfptr = (ListIteratorDefault<ORRecord>Vtbl *)&RecordDataCompareArgument::`vftable';
  *(_QWORD *)&arg.rdca_column.ort_Code[3] = 0i64;
  *(_QWORD *)&arg.rdca_column.ort_Code[1] = 0i64;
  arg.rdca_column.ort_Code[0] = 0;
  strncpy(arg.rdca_column.ort_Name, column, 0x14u);
  arg.rdca_content = content;
  arg.rdca_record = 0;
  arg.rdca_skip = skip;
  v7 = 0;
  List<ORRecord>::l_4AllInList((List<ORTable> *)&v4->ort_DataRecord, (ListIteratorDefault<ORTable> *)&arg);
  if ( arg.rdca_record )
    result = ORRecord::orr_GetBuffer(arg.rdca_record);
  else
    result = 0;
  return result;
}
// 9C2C3C: using guessed type unsigned __int8 (__thiscall *RecordDataCompareArgument::`vftable')(RecordDataCompareArgument *this, ORRecord *ele, unsigned __int16);

//----- (006DCB70) --------------------------------------------------------
char *__thiscall OptionReader::or_SelectFrom(OptionReader *this, ORToken table, char *key)
{
  char *result; // eax@2
  ORKeyList *v4; // ecx@3
  ORRecord *v5; // eax@4
  TableNameCompareArgument tname; // [sp+8h] [bp-2Ch]@1
  int v7; // [sp+30h] [bp-4h]@1

  tname.tnca_tablename = table;
  tname.vfptr = (ListIteratorDefault<ORTable>Vtbl *)&TableNameCompareArgument::`vftable';
  tname.tnca_found = 0;
  v7 = 0;
  List<ORRecord>::l_4AllInList(&this->or_TableList, (ListIteratorDefault<ORTable> *)&tname.vfptr);
  if ( tname.tnca_found && (v4 = tname.tnca_found->ort_PrimaryKey) != 0 )
  {
    v5 = ORKeyList::okl_Searching(v4, key);
    result = ORRecord::orr_GetBuffer(v5);
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9C2C44: using guessed type unsigned __int8 (__thiscall *TableNameCompareArgument::`vftable')(TableNameCompareArgument *this, ORTable *ele, unsigned __int16);

//----- (006DCC20) --------------------------------------------------------
char *__thiscall OptionReader::or_SelectFromOrder(OptionReader *this, ORToken table, int order)
{
  char *result; // eax@3
  ListIteratorDefault<ORTable> arg; // [sp+4h] [bp-38h]@2
  int v5; // [sp+8h] [bp-34h]@2
  ORRecord *v6; // [sp+Ch] [bp-30h]@2
  TableNameCompareArgument tname; // [sp+10h] [bp-2Ch]@1
  int v8; // [sp+38h] [bp-4h]@1

  tname.tnca_tablename = table;
  tname.vfptr = (ListIteratorDefault<ORTable>Vtbl *)&TableNameCompareArgument::`vftable';
  tname.tnca_found = 0;
  v8 = 0;
  List<ORRecord>::l_4AllInList(&this->or_TableList, (ListIteratorDefault<ORTable> *)&tname.vfptr);
  if ( tname.tnca_found
    && (arg.vfptr = (ListIteratorDefault<ORTable>Vtbl *)&OrderArgument::`vftable',
        v5 = order,
        v6 = 0,
        LOBYTE(v8) = 1,
        List<ORRecord>::l_4AllInList((List<ORTable> *)&tname.tnca_found->ort_DataRecord, &arg),
        v6) )
  {
    result = ORRecord::orr_GetBuffer(v6);
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9C2C14: using guessed type unsigned __int8 (__thiscall *OrderArgument::`vftable')(OrderArgument *this, ORRecord *ele, unsigned __int16);
// 9C2C44: using guessed type unsigned __int8 (__thiscall *TableNameCompareArgument::`vftable')(TableNameCompareArgument *this, ORTable *ele, unsigned __int16);

//----- (006DCCF0) --------------------------------------------------------
void *__thiscall OptionReader::or_Select(OptionReader *this, char *targetcolumn, ORToken table, char *key, int *type)
{
  void *result; // eax@2
  ORKeyList *v6; // ecx@3
  ORKeyList **v7; // esi@3
  ORRecord *v8; // eax@5
  TableNameCompareArgument tname; // [sp+14h] [bp-2Ch]@1
  int v10; // [sp+3Ch] [bp-4h]@1

  tname.tnca_tablename = table;
  tname.vfptr = (ListIteratorDefault<ORTable>Vtbl *)&TableNameCompareArgument::`vftable';
  tname.tnca_found = 0;
  v10 = 0;
  List<ORRecord>::l_4AllInList(&this->or_TableList, (ListIteratorDefault<ORTable> *)&tname.vfptr);
  if ( tname.tnca_found
    && (v6 = tname.tnca_found->ort_PrimaryKey, v7 = &tname.tnca_found->ort_PrimaryKey, v6)
    && ORKeyList::okl_Searching(v6, key) )
  {
    v8 = ORKeyList::okl_Searching(*v7, key);
    result = ORRecord::orr_GetFieldData(v8, targetcolumn, type);
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9C2C44: using guessed type unsigned __int8 (__thiscall *TableNameCompareArgument::`vftable')(TableNameCompareArgument *this, ORTable *ele, unsigned __int16);

//----- (006DCDC0) --------------------------------------------------------
char *__thiscall OptionReader::or_SelectFrom(OptionReader *this, ORToken table, char *column, char *content, int skip)
{
  char *result; // eax@2
  TableNameCompareArgument tname; // [sp+10h] [bp-2Ch]@1
  int v7; // [sp+38h] [bp-4h]@1

  tname.tnca_tablename = table;
  tname.vfptr = (ListIteratorDefault<ORTable>Vtbl *)&TableNameCompareArgument::`vftable';
  tname.tnca_found = 0;
  v7 = 0;
  List<ORRecord>::l_4AllInList(&this->or_TableList, (ListIteratorDefault<ORTable> *)&tname.vfptr);
  if ( tname.tnca_found )
    result = ORTable::ort_RecordBuffer(tname.tnca_found, column, content, skip);
  else
    result = 0;
  return result;
}
// 9C2C44: using guessed type unsigned __int8 (__thiscall *TableNameCompareArgument::`vftable')(TableNameCompareArgument *this, ORTable *ele, unsigned __int16);

//----- (006DCE70) --------------------------------------------------------
void *__thiscall OptionReader::or_Select(OptionReader *this, char *targetcolumn, ORToken table, char *column, char *content, int skip, int *type)
{
  void *result; // eax@2
  TableNameCompareArgument tname; // [sp+18h] [bp-2Ch]@1
  int v9; // [sp+40h] [bp-4h]@1

  tname.tnca_tablename = table;
  tname.vfptr = (ListIteratorDefault<ORTable>Vtbl *)&TableNameCompareArgument::`vftable';
  tname.tnca_found = 0;
  v9 = 0;
  List<ORRecord>::l_4AllInList(&this->or_TableList, (ListIteratorDefault<ORTable> *)&tname.vfptr);
  if ( tname.tnca_found )
    result = ORTable::ort_FindData(tname.tnca_found, column, content, targetcolumn, skip, type);
  else
    result = 0;
  return result;
}
// 9C2C44: using guessed type unsigned __int8 (__thiscall *TableNameCompareArgument::`vftable')(TableNameCompareArgument *this, ORTable *ele, unsigned __int16);

//----- (006DCF30) --------------------------------------------------------
bool __thiscall OptionReader::or_MakePrimaryKey(OptionReader *this, ORToken table, char *column)
{
  bool result; // al@2
  TableNameCompareArgument tname; // [sp+8h] [bp-2Ch]@1
  int v5; // [sp+30h] [bp-4h]@1

  tname.tnca_tablename = table;
  tname.vfptr = (ListIteratorDefault<ORTable>Vtbl *)&TableNameCompareArgument::`vftable';
  tname.tnca_found = 0;
  v5 = 0;
  List<ORRecord>::l_4AllInList(&this->or_TableList, (ListIteratorDefault<ORTable> *)&tname.vfptr);
  if ( tname.tnca_found )
    result = ORTable::ort_MakePrimaryKey(tname.tnca_found, column);
  else
    result = 0;
  return result;
}
// 9C2C44: using guessed type unsigned __int8 (__thiscall *TableNameCompareArgument::`vftable')(TableNameCompareArgument *this, ORTable *ele, unsigned __int16);

//----- (006DCFD0) --------------------------------------------------------
int __thiscall OptionReader::or_SelectCount(OptionReader *this)
{
  return this->or_TableList.l_ListNum;
}

//----- (006DCFE0) --------------------------------------------------------
void __thiscall RecordNumber::RecordNumber(RecordNumber *this, char *col, char *cnt)
{
  RecordNumber *v3; // esi@1
  char *v4; // eax@1

  v3 = this;
  v4 = this->rn_column.ort_Name;
  this->rn_Number = 0;
  this->vfptr = (ListIteratorDefault<ORRecord>Vtbl *)&RecordNumber::`vftable';
  *((_DWORD *)v4 + 4) = 0;
  *((_DWORD *)v4 + 3) = 0;
  *((_DWORD *)v4 + 2) = 0;
  *((_DWORD *)v4 + 1) = 0;
  *(_DWORD *)v4 = 0;
  strncpy(this->rn_column.ort_Name, col, 0x14u);
  v3->rn_content = cnt;
}
// 9C2C94: using guessed type unsigned __int8 (__thiscall *RecordNumber::`vftable')(RecordNumber *this, ORRecord *ele, unsigned __int16);

//----- (006DD020) --------------------------------------------------------
void __thiscall RecordNumber::~RecordNumber(RecordNumber *this)
{
  this->vfptr = (ListIteratorDefault<ORRecord>Vtbl *)&ListIteratorDefault<ORRecord>::`vftable';
}
// 9C2A8C: using guessed type int (__stdcall *ListIteratorDefault<ORRecord>::`vftable')(int, NiGeometry *pkGeometry);

//----- (006DD030) --------------------------------------------------------
char __thiscall RecordNumber::lid_Call(RecordNumber *this, ORRecord *ele, unsigned __int16 handle)
{
  RecordNumber *v3; // esi@1
  char *v4; // ST04_4@1
  char result; // al@2
  ColumnCheckArgument arg; // [sp+10h] [bp-34h]@1
  int v7; // [sp+40h] [bp-4h]@1

  v3 = this;
  v4 = this->rn_content;
  arg.vfptr = (ListIteratorDefault<ORField>Vtbl *)&ColumnCheckArgument::`vftable';
  arg.cca_column = &this->rn_column;
  arg.cca_contentstring = v4;
  *(_QWORD *)&arg.cca_contentindex.ort_Code[3] = 0i64;
  *(_QWORD *)&arg.cca_contentindex.ort_Code[1] = 0i64;
  arg.cca_contentindex.ort_Code[0] = 0;
  strncpy(arg.cca_contentindex.ort_Name, v4, 0x14u);
  arg.cca_found = 0;
  v7 = 0;
  ORRecord::orr_4AllInList(ele, (ListIteratorDefault<ORField> *)&arg.vfptr);
  if ( arg.cca_found )
  {
    result = 1;
    ++v3->rn_Number;
  }
  else
  {
    result = 1;
  }
  return result;
}
// 9C2C2C: using guessed type unsigned __int8 (__thiscall *ColumnCheckArgument::`vftable')(ColumnCheckArgument *this, ORField *ele, unsigned __int16);

//----- (006DD0E0) --------------------------------------------------------
int __thiscall ORTable::ort_RecordNum(ORTable *this, char *column, char *content)
{
  ORTable *v3; // edi@1
  RecordNumber rn; // [sp+Ch] [bp-30h]@1
  int v6; // [sp+38h] [bp-4h]@1

  v3 = this;
  rn.vfptr = (ListIteratorDefault<ORRecord>Vtbl *)&RecordNumber::`vftable';
  rn.rn_Number = 0;
  *(_QWORD *)&rn.rn_column.ort_Code[3] = 0i64;
  *(_QWORD *)&rn.rn_column.ort_Code[1] = 0i64;
  rn.rn_column.ort_Code[0] = 0;
  strncpy(rn.rn_column.ort_Name, column, 0x14u);
  rn.rn_content = content;
  v6 = 0;
  List<ORRecord>::l_4AllInList((List<ORTable> *)&v3->ort_DataRecord, (ListIteratorDefault<ORTable> *)&rn);
  return rn.rn_Number;
}
// 9C2C94: using guessed type unsigned __int8 (__thiscall *RecordNumber::`vftable')(RecordNumber *this, ORRecord *ele, unsigned __int16);

//----- (006DD180) --------------------------------------------------------
int __thiscall ORTable::ort_RecordNum(ORTable *this)
{
  return this->ort_DataRecord.l_ListNum;
}

//----- (006DD190) --------------------------------------------------------
char __thiscall ColumnNameArgument::lid_Call(ColumnNameArgument *this, ORColumnHeader *ele, unsigned __int16 handle)
{
  ColumnNameArgument *v3; // esi@1
  char *v4; // eax@1
  char result; // al@2
  char *v6; // ST00_4@3

  v3 = this;
  v4 = ORTokenReader::ortr_ReadString(this->cna_token);
  if ( v4 )
  {
    v6 = ele->orch_ColumnName.ort_Name;
    *((_DWORD *)v6 + 4) = 0;
    *((_DWORD *)v6 + 3) = 0;
    *((_DWORD *)v6 + 2) = 0;
    *((_DWORD *)v6 + 1) = 0;
    *(_DWORD *)v6 = 0;
    strncpy(ele->orch_ColumnName.ort_Name, v4, 0x14u);
    result = 1;
  }
  else
  {
    ORTokenReader::ortr_SetError(v3->cna_token, "Column type-name mismatch");
    result = 0;
  }
  return result;
}

//----- (006DD1E0) --------------------------------------------------------
void __thiscall ORColumnHeaderList::~ORColumnHeaderList(ORColumnHeaderList *this)
{
  ORColumnHeaderList *v1; // edi@1
  signed int v2; // esi@1
  ORColumnHeaderVtbl **v3; // eax@2
  ORColumnHeader *v4; // ST00_4@3

  v1 = this;
  v2 = 0;
  do
  {
    v3 = &v1->orchl_fieldname[v2]->vfptr;
    if ( v3 )
    {
      v4 = v1->orchl_fieldname[v2];
      *v3 = (ORColumnHeaderVtbl *)&ORColumnHeader::`vftable';
      operator delete(v4);
    }
    ++v2;
  }
  while ( v2 < 128 );
}
// 9C2C4C: using guessed type int (__thiscall *ORColumnHeader::`vftable')(ORColumnHeader *this, struct ORTokenReader *, struct TokenArgument *);

//----- (006DD210) --------------------------------------------------------
char __thiscall ORTable::ort_ReadData(ORTable *this, ORTokenReader *token)
{
  ORTable *v2; // ebx@1
  int v3; // eax@1
  ORRecord *v4; // edi@2
  char result; // al@4
  DataRecordArgument arg; // [sp+10h] [bp-18h]@8
  int v7; // [sp+24h] [bp-4h]@8

  v2 = this;
  v3 = this->ort_DataRecord.l_Finger.empty;
  if ( (_WORD)v3 != -1 )
  {
    v4 = this->ort_DataRecord.vfptr->l_AllocZ(&this->ort_DataRecord, v3);
    if ( v4 )
      goto LABEL_11;
  }
  if ( !List<ORRecord>::l_Enlargement(&v2->ort_DataRecord, 8) )
  {
    ORTokenReader::ortr_SetError(token, "Too many records");
    return 0;
  }
  if ( v2->ort_DataRecord.l_Finger.empty != -1
    && (v4 = v2->ort_DataRecord.vfptr->l_AllocZ(&v2->ort_DataRecord, v2->ort_DataRecord.l_Finger.empty)) != 0 )
  {
LABEL_11:
    ORRecord::orr_MakeBuffer(v4, v2->ort_RecordLength);
    arg.vfptr = (ListIteratorDefault<ORColumnHeader>Vtbl *)&DataRecordArgument::`vftable';
    arg.dra_token = token;
    arg.dra_datarecord = v4;
    v7 = 0;
    result = ORColumnHeaderList::orchl_4AllInList(
               &v2->ort_HeaderList,
               (ListIteratorDefault<ORColumnHeader> *)&arg.vfptr);
  }
  else
  {
    ORTokenReader::ortr_SetError(token, "Record alloc error after list enlargement");
    result = 0;
  }
  return result;
}
// 9C2C24: using guessed type unsigned __int8 (__thiscall *DataRecordArgument::`vftable')(DataRecordArgument *this, ORColumnHeader *ele, unsigned __int16);

//----- (006DD330) --------------------------------------------------------
char __thiscall OptionReader::or_ExecRecordIn(OptionReader *this, ORTokenReader *token)
{
  OptionReader *v2; // esi@1
  char *v3; // eax@1
  TableNameCompareArgument tname; // [sp+10h] [bp-40h]@5
  ORToken table; // [sp+2Ch] [bp-24h]@5
  int v7; // [sp+4Ch] [bp-4h]@5

  v2 = this;
  v3 = ORTokenReader::ortr_ReadString(token);
  if ( !v3 )
  {
    ORErrorMessage::operator=(&v2->or_Argument.errmsg, "#recordin has no table name");
    return 0;
  }
  *(_QWORD *)&table.ort_Code[3] = 0i64;
  *(_QWORD *)&table.ort_Code[1] = 0i64;
  *(_QWORD *)&table.ort_Name[0] = 0i64;
  strncpy(table.ort_Name, v3, 0x14u);
  tname.tnca_tablename = table;
  tname.vfptr = (ListIteratorDefault<ORTable>Vtbl *)&TableNameCompareArgument::`vftable';
  tname.tnca_found = 0;
  v7 = 0;
  List<ORRecord>::l_4AllInList(&v2->or_TableList, (ListIteratorDefault<ORTable> *)&tname.vfptr);
  if ( !tname.tnca_found )
  {
    ORErrorMessage::operator=(&v2->or_Argument.errmsg, "Unknown table name");
    return 0;
  }
  if ( !ORTable::ort_ReadData(tname.tnca_found, token) || !ORTokenReader::ortr_isEOL(token) )
    return 0;
  return 1;
}
// 9C2C44: using guessed type unsigned __int8 (__thiscall *TableNameCompareArgument::`vftable')(TableNameCompareArgument *this, ORTable *ele, unsigned __int16);

//----- (006DD430) --------------------------------------------------------
bool __thiscall OptionReader::or_ExecRecord(OptionReader *this, ORTokenReader *token)
{
  ORTable *v2; // eax@1
  bool result; // al@2

  v2 = this->or_CurrentTable;
  if ( v2 )
  {
    result = ORTable::ort_ReadData(v2, token) && ORTokenReader::ortr_isEOL(token);
  }
  else
  {
    ORErrorMessage::operator=(&this->or_Argument.errmsg, "Record without table");
    result = 0;
  }
  return result;
}

//----- (006DD480) --------------------------------------------------------
char *__thiscall OptionReader::or_SelectFrom(OptionReader *this, ORToken table, int key)
{
  OptionReader *v3; // esi@1
  _BYTE v4[20]; // ST00_20@1
  char buf[16]; // [sp+4h] [bp-14h]@1

  v3 = this;
  sprintf(buf, "%d", key);
  *(_QWORD *)v4 = *(_QWORD *)&table.ort_Name[0];
  *(_QWORD *)&v4[8] = *(_QWORD *)&table.ort_Code[2];
  *(_DWORD *)&v4[16] = table.ort_Code[4];
  return OptionReader::or_SelectFrom(v3, *(ORToken *)v4, buf);
}

//----- (006DD4F0) --------------------------------------------------------
void *__thiscall OptionReader::or_Select(OptionReader *this, char *targetcolumn, ORToken table, int key, int *type)
{
  OptionReader *v5; // esi@1
  _BYTE v6[20]; // ST04_20@1
  char buf[16]; // [sp+Ch] [bp-14h]@1

  v5 = this;
  sprintf(buf, "%d", key);
  *(_QWORD *)v6 = *(_QWORD *)&table.ort_Name[0];
  *(_QWORD *)&v6[8] = *(_QWORD *)&table.ort_Code[2];
  *(_DWORD *)&v6[16] = table.ort_Code[4];
  return OptionReader::or_Select(v5, targetcolumn, *(ORToken *)v6, buf, type);
}

//----- (006DD570) --------------------------------------------------------
char *__thiscall OptionReader::or_SelectFrom(OptionReader *this, ORToken table, char *column, int content, int skip)
{
  OptionReader *v5; // esi@1
  char *result; // eax@2
  ListIteratorDefault<ORTable> arg; // [sp+10h] [bp-3Ch]@1
  char v8[20]; // [sp+14h] [bp-38h]@1
  ORTable *v9; // [sp+28h] [bp-24h]@1
  char buf[16]; // [sp+2Ch] [bp-20h]@1
  int v11; // [sp+48h] [bp-4h]@1

  v5 = this;
  sprintf(buf, "%d", content);
  *(ORToken *)v8 = table;
  arg.vfptr = (ListIteratorDefault<ORTable>Vtbl *)&TableNameCompareArgument::`vftable';
  v9 = 0;
  v11 = 0;
  List<ORRecord>::l_4AllInList(&v5->or_TableList, &arg);
  if ( v9 )
    result = ORTable::ort_RecordBuffer(v9, column, buf, skip);
  else
    result = 0;
  return result;
}
// 9C2C44: using guessed type unsigned __int8 (__thiscall *TableNameCompareArgument::`vftable')(TableNameCompareArgument *this, ORTable *ele, unsigned __int16);

//----- (006DD630) --------------------------------------------------------
void *__thiscall OptionReader::or_Select(OptionReader *this, char *targetcolumn, ORToken table, char *column, int content, int skip, int *type)
{
  OptionReader *v7; // esi@1
  _BYTE v8[20]; // ST04_20@1
  char buf[16]; // [sp+14h] [bp-14h]@1

  v7 = this;
  sprintf(buf, "%d", content);
  *(_QWORD *)v8 = *(_QWORD *)&table.ort_Name[0];
  *(_QWORD *)&v8[8] = *(_QWORD *)&table.ort_Code[2];
  *(_DWORD *)&v8[16] = table.ort_Code[4];
  return OptionReader::or_Select(v7, targetcolumn, *(ORToken *)v8, column, buf, skip, type);
}

//----- (006DD6C0) --------------------------------------------------------
int __thiscall OptionReader::or_SelectCountFrom(OptionReader *this, ORToken table)
{
  int result; // eax@2
  TableNameCompareArgument tname; // [sp+4h] [bp-2Ch]@1
  int v4; // [sp+2Ch] [bp-4h]@1

  tname.tnca_tablename = table;
  tname.vfptr = (ListIteratorDefault<ORTable>Vtbl *)&TableNameCompareArgument::`vftable';
  tname.tnca_found = 0;
  v4 = 0;
  List<ORRecord>::l_4AllInList(&this->or_TableList, (ListIteratorDefault<ORTable> *)&tname.vfptr);
  if ( tname.tnca_found )
    result = tname.tnca_found->ort_DataRecord.l_ListNum;
  else
    result = -1;
  return result;
}
// 9C2C44: using guessed type unsigned __int8 (__thiscall *TableNameCompareArgument::`vftable')(TableNameCompareArgument *this, ORTable *ele, unsigned __int16);

//----- (006DD760) --------------------------------------------------------
int __thiscall OptionReader::or_SelectCountFrom(OptionReader *this, ORToken table, char *column, char *content)
{
  int result; // eax@2
  ORTable *v5; // ebx@3
  TableNameCompareArgument tname; // [sp+10h] [bp-4Ch]@1
  ListIteratorDefault<ORTable> arg; // [sp+2Ch] [bp-30h]@3
  int v8; // [sp+30h] [bp-2Ch]@3
  char dest[4]; // [sp+34h] [bp-28h]@3
  int v10; // [sp+38h] [bp-24h]@3
  int v11; // [sp+3Ch] [bp-20h]@3
  int v12; // [sp+40h] [bp-1Ch]@3
  int v13; // [sp+44h] [bp-18h]@3
  char *v14; // [sp+48h] [bp-14h]@3
  int v15; // [sp+58h] [bp-4h]@1

  tname.tnca_tablename = table;
  tname.vfptr = (ListIteratorDefault<ORTable>Vtbl *)&TableNameCompareArgument::`vftable';
  tname.tnca_found = 0;
  v15 = 0;
  List<ORRecord>::l_4AllInList(&this->or_TableList, (ListIteratorDefault<ORTable> *)&tname.vfptr);
  if ( tname.tnca_found )
  {
    v5 = tname.tnca_found;
    arg.vfptr = (ListIteratorDefault<ORTable>Vtbl *)&RecordNumber::`vftable';
    v8 = 0;
    v13 = 0;
    v12 = 0;
    v11 = 0;
    v10 = 0;
    *(_DWORD *)dest = 0;
    strncpy(dest, column, 0x14u);
    v14 = content;
    LOBYTE(v15) = 1;
    List<ORRecord>::l_4AllInList((List<ORTable> *)&v5->ort_DataRecord, &arg);
    result = v8;
  }
  else
  {
    result = -1;
  }
  return result;
}
// 9C2C44: using guessed type unsigned __int8 (__thiscall *TableNameCompareArgument::`vftable')(TableNameCompareArgument *this, ORTable *ele, unsigned __int16);
// 9C2C94: using guessed type unsigned __int8 (__thiscall *RecordNumber::`vftable')(RecordNumber *this, ORRecord *ele, unsigned __int16);

//----- (006DD840) --------------------------------------------------------
int __thiscall OptionReader::or_SelectCountFrom(OptionReader *this, ORToken table, char *column, int content)
{
  OptionReader *v4; // esi@1
  _BYTE v5[20]; // ST00_20@1
  char buf[16]; // [sp+8h] [bp-14h]@1

  v4 = this;
  sprintf(buf, "%d", content);
  *(_QWORD *)v5 = *(_QWORD *)&table.ort_Name[0];
  *(_QWORD *)&v5[8] = *(_QWORD *)&table.ort_Code[2];
  *(_DWORD *)&v5[16] = table.ort_Code[4];
  return OptionReader::or_SelectCountFrom(v4, *(ORToken *)v5, column, buf);
}

//----- (006DD8B0) --------------------------------------------------------
char __thiscall List<ORRecord>::l_Enlargement(List<ORRecord> *this, int extsize)
{
  List<ORRecord> *v2; // esi@1
  ListArray<ORRecord> *v3; // eax@2
  int v4; // ebx@2
  int v5; // edi@3
  signed __int64 v6; // rax@3
  void *v7; // eax@3
  char *v8; // ebx@6
  int v9; // eax@6
  ORRecord *v11; // eax@14
  char *v12; // ecx@14
  int v13; // edx@14
  int v14; // ecx@16
  int v15; // eax@17
  int v16; // eax@19
  int v17; // ecx@19
  ListStruct<ORRecord> *v18; // ST10_4@19
  void **v19; // ecx@19
  char *v20; // eax@19
  char *v21; // ebx@20
  ListArray<ORRecord> *v22; // edx@21
  int i; // [sp+10h] [bp-14h]@9
  int j; // [sp+14h] [bp-10h]@10
  ORRecord *extsizea; // [sp+2Ch] [bp+8h]@5

  v2 = this;
  if ( this->l_Finger.empty != -1 )
    return 0;
  v3 = this->l_ListArray;
  v4 = 0;
  if ( !v3 )
    return 0;
  v5 = extsize + v3->la_Size;
  v6 = 520i64 * (unsigned int)(extsize + v3->la_Size);
  v7 = operator new[](((v6 | -(HIDWORD(v6) != 0)) + 4) | -__CFADD__(v6 | -(HIDWORD(v6) != 0), 4));
  if ( v7 )
  {
    v4 = (int)v7 + 4;
    *(_DWORD *)v7 = v5;
    `eh vector constructor iterator'(
      (char *)v7 + 4,
      0x208u,
      v5,
      (void (__thiscall *)(void *))ORRecord::ORRecord,
      (void (__thiscall *)(void *))ORRecord::~ORRecord);
  }
  extsizea = (ORRecord *)v4;
  if ( !v4 )
    return 0;
  v8 = (char *)operator new[](12 * (v5 + 1));
  v9 = 0;
  if ( !v8 )
  {
    ORRecord::~ORRecord(extsizea);
    operator delete(extsizea);
    return 0;
  }
  i = 0;
  if ( v2->l_ListArray->la_Size > 0 )
  {
    for ( j = 0; ; v9 = j )
    {
      ORRecord::l_Clone((ORRecord *)((char *)extsizea + v9), (ORRecord *)((char *)v2->l_ListArray->la_Array + v9));
      j += 520;
      if ( ++i >= v2->l_ListArray->la_Size )
        break;
    }
  }
  memcpy(v8, (char *)v2->l_Array, 12 * v2->l_ListArray->la_Size);
  *(_WORD *)&v8[12 * v2->l_Array[v2->l_Finger.store].ls_Next + 6] = v5;
  *(_WORD *)&v8[12 * v2->l_Array[v2->l_Finger.store].ls_Prev + 4] = v5;
  if ( v5 > 0 )
  {
    v11 = extsizea;
    v12 = v8;
    v13 = v5;
    do
    {
      *(_DWORD *)v12 = v11;
      ++v11;
      v12 += 12;
      --v13;
    }
    while ( v13 );
  }
  v14 = v2->l_MaxSize;
  if ( v14 < v5 )
  {
    v15 = (int)&v8[12 * v14 + 4];
    do
    {
      *(_WORD *)v15 = v14 + 1;
      *(_BYTE *)(v15 + 4) = 0;
      *(_WORD *)(v15 + 2) = v14++ - 1;
      v15 += 12;
    }
    while ( v14 < v5 );
  }
  *(_WORD *)&v8[12 * v2->l_MaxSize + 6] = v5 - 1;
  *(_WORD *)&v8[12 * v5 - 8] = v2->l_MaxSize;
  v16 = (int)&v8[12 * v5];
  v17 = (int)&v2->l_Array[v2->l_MaxSize];
  *(_DWORD *)v16 = *(_DWORD *)v17;
  *(_DWORD *)(v16 + 4) = *(_DWORD *)(v17 + 4);
  *(_DWORD *)(v16 + 8) = *(_DWORD *)(v17 + 8);
  v18 = v2->l_Array;
  v2->l_Finger.empty = v2->l_MaxSize;
  operator delete[](v18);
  v19 = (void **)&v2->l_ListArray->la_Array;
  v2->l_Array = (ListStruct<ORRecord> *)v8;
  v20 = (char *)*v19;
  if ( *v19 )
  {
    v21 = v20 - 4;
    `eh vector destructor iterator'(v20, 0x208u, *((_DWORD *)v20 - 1), (void (__thiscall *)(void *))ORRecord::~ORRecord);
    operator delete[](v21);
  }
  v2->l_ListArray->la_Array = extsizea;
  v22 = v2->l_ListArray;
  v2->l_MaxSize = v5;
  v22->la_Size = (unsigned __int16)v5;
  v2->l_Finger.store = v5;
  return 1;
}

//----- (006DDB20) --------------------------------------------------------
void __thiscall ORKeyList::~ORKeyList(ORKeyList *this)
{
  `eh vector destructor iterator'(
    this,
    0x18u,
    1024,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
}

//----- (006DDB40) --------------------------------------------------------
void __thiscall ORKeyList::okl_AddKey(ORKeyList *this, ORToken *field, ORRecord *rec)
{
  int v3; // eax@1
  char *v4; // eax@2

  v3 = this->okl_KeyNum;
  if ( v3 < 1024 )
  {
    v4 = (char *)this + 24 * v3;
    *(_QWORD *)v4 = *(_QWORD *)&field->ort_Code[0];
    *((_QWORD *)v4 + 1) = *(_QWORD *)&field->ort_Code[2];
    *((_DWORD *)v4 + 4) = field->ort_Code[4];
    this->okl_Element[this->okl_KeyNum++].rec = rec;
  }
}

//----- (006DDBA0) --------------------------------------------------------
int __cdecl ORKeyList::okl_KeyCompare(const void *a, const void *b)
{
  int v2; // edx@1
  int v3; // esi@1
  int result; // eax@2

  v2 = *(_DWORD *)b;
  v3 = *(_DWORD *)a;
  if ( *(_DWORD *)b != *(_DWORD *)a
    || (v2 = *((_DWORD *)b + 1), v3 = *((_DWORD *)a + 1), v2 != v3)
    || (v2 = *((_DWORD *)b + 2), v3 = *((_DWORD *)a + 2), v2 != v3)
    || (v2 = *((_DWORD *)b + 3), v3 = *((_DWORD *)a + 3), v2 != v3) )
  {
    result = v2 - v3;
  }
  else
  {
    result = *((_DWORD *)b + 4) - *((_DWORD *)a + 4);
  }
  return result;
}

//----- (006DDBE0) --------------------------------------------------------
void __thiscall ORKeyList::ORKeyList(ORKeyList *this)
{
  ORKeyList *v1; // esi@1

  v1 = this;
  `eh vector constructor iterator'(
    this,
    0x18u,
    1024,
    (void (__thiscall *)(void *))Name5::Name5,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
  v1->okl_KeyNum = 0;
}

//----- (006DDC10) --------------------------------------------------------
char __thiscall ORKeyList::okl_Sorting(ORKeyList *this)
{
  int v1; // eax@1
  char result; // al@3

  v1 = this->okl_KeyNum;
  if ( v1 && v1 < 1024 )
  {
    qsort(this, v1, 0x18u, ORKeyList::okl_KeyCompare);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006DDC40) --------------------------------------------------------
ORRecord *__thiscall ORKeyList::okl_Searching(ORKeyList *this, char *index)
{
  ORKeyList *v2; // esi@1
  _DWORD *v3; // eax@1
  ORRecord *result; // eax@2
  ORToken indexkey; // [sp+8h] [bp-18h]@1

  v2 = this;
  *(_QWORD *)&indexkey.ort_Code[3] = 0i64;
  *(_QWORD *)&indexkey.ort_Code[1] = 0i64;
  indexkey.ort_Code[0] = 0;
  strncpy(indexkey.ort_Name, index, 0x14u);
  v3 = bsearch(&indexkey, v2, v2->okl_KeyNum, 0x18u, ORKeyList::okl_KeyCompare);
  if ( v3 )
    result = (ORRecord *)v3[5];
  else
    result = 0;
  return result;
}

//----- (006DDCC0) --------------------------------------------------------
void __thiscall ORField::ORField(ORField *this)
{
  this->vfptr = (ORFieldVtbl *)ORField::`vftable';
}
// 9C2D20: using guessed type int (*ORField::`vftable'[5])();

//----- (006DDCD0) --------------------------------------------------------
void __thiscall ORField::~ORField(ORField *this)
{
  this->vfptr = (ORFieldVtbl *)ORField::`vftable';
}
// 9C2D20: using guessed type int (*ORField::`vftable'[5])();

//----- (006DDCE0) --------------------------------------------------------
ORToken *__thiscall ORField::orf_ColumnName(ORField *this)
{
  return ORColumnHeader::orch_GetColumnName(this->orf_Header);
}

//----- (006DDCF0) --------------------------------------------------------
void __thiscall ORField::orf_SetColumnHead(ORField *this, ORColumnHeader *hd)
{
  this->orf_Header = hd;
}

//----- (006DDD00) --------------------------------------------------------
void __thiscall ORFieldIndex::ORFieldIndex(ORFieldIndex *this)
{
  this->vfptr = (ORFieldVtbl *)&ORFieldIndex::`vftable';
  this->orfi_Index = 0;
}
// 9C2D38: using guessed type unsigned __int8 (__thiscall *ORFieldIndex::`vftable')(ORFieldIndex *this, char *contentstring, union ORToken *);

//----- (006DDD10) --------------------------------------------------------
void __thiscall ORFieldIndex::~ORFieldIndex(ORFieldIndex *this)
{
  this->vfptr = (ORFieldVtbl *)ORField::`vftable';
}
// 9C2D20: using guessed type int (*ORField::`vftable'[5])();

//----- (006DDD20) --------------------------------------------------------
int __thiscall ORFieldIndex::orf_Alloc(ORFieldIndex *this, char *pnt)
{
  this->orfi_Index = (ORToken *)pnt;
  return ORColumnHeader::orch_GetLength(this->orf_Header);
}

//----- (006DDD40) --------------------------------------------------------
ORToken *__thiscall ORFieldIndex::orf_GetBuffer(ORFieldIndex *this)
{
  return this->orfi_Index;
}

//----- (006DDD50) --------------------------------------------------------
int ORFieldIndex::orf_GetType()
{
  return 1;
}

//----- (006DDD60) --------------------------------------------------------
void __thiscall ORFieldString::ORFieldString(ORFieldString *this)
{
  this->vfptr = (ORFieldVtbl *)&ORFieldString::`vftable';
  this->orfs_String = 0;
}
// 9C2D50: using guessed type unsigned __int8 (__thiscall *ORFieldString::`vftable')(ORFieldString *this, char *contentstring, union ORToken *);

//----- (006DDD70) --------------------------------------------------------
void __thiscall ORFieldString::~ORFieldString(ORFieldString *this)
{
  this->vfptr = (ORFieldVtbl *)ORField::`vftable';
}
// 9C2D20: using guessed type int (*ORField::`vftable'[5])();

//----- (006DDD80) --------------------------------------------------------
int __thiscall ORFieldString::orf_Alloc(ORFieldString *this, char *pnt)
{
  this->orfs_String = pnt;
  return ORColumnHeader::orch_GetLength(this->orf_Header);
}

//----- (006DDDA0) --------------------------------------------------------
bool __thiscall ORFieldString::orf_CompareContent(ORFieldString *this, char *contentstring, ORToken *contentindex)
{
  return strcmp(this->orfs_String, contentstring) == 0;
}

//----- (006DDDF0) --------------------------------------------------------
char *__thiscall ORFieldString::orf_GetBuffer(ORFieldString *this)
{
  return this->orfs_String;
}

//----- (006DDE00) --------------------------------------------------------
int ORFieldString::orf_GetType()
{
  return 2;
}

//----- (006DDE10) --------------------------------------------------------
void __thiscall ORFieldByte::ORFieldByte(ORFieldByte *this)
{
  this->vfptr = (ORFieldVtbl *)&ORFieldByte::`vftable';
  this->orfb_Byte = 0;
}
// 9C2D68: using guessed type unsigned __int8 (__thiscall *ORFieldByte::`vftable')(ORFieldByte *this, char *num, union ORToken *);

//----- (006DDE20) --------------------------------------------------------
void __thiscall ORFieldByte::~ORFieldByte(ORFieldByte *this)
{
  this->vfptr = (ORFieldVtbl *)ORField::`vftable';
}
// 9C2D20: using guessed type int (*ORField::`vftable'[5])();

//----- (006DDE30) --------------------------------------------------------
int __thiscall ORFieldByte::orf_Alloc(ORFieldByte *this, char *pnt)
{
  this->orfb_Byte = pnt;
  return ORColumnHeader::orch_GetLength(this->orf_Header);
}

//----- (006DDE50) --------------------------------------------------------
char __thiscall ORFieldByte::orf_Read(ORFieldByte *this, ORTokenReader *token)
{
  ORFieldByte *v2; // esi@1
  int v3; // eax@1
  char v4; // al@3
  char result; // [sp+Bh] [bp-1h]@1

  v2 = this;
  result = 0;
  v3 = ORTokenReader::ortr_ReadNumber(token, &result);
  if ( result && v3 < 256 )
  {
    *v2->orfb_Byte = v3;
    v4 = 1;
  }
  else
  {
    ORTokenReader::ortr_SetError(token, "Cannot read byte data");
    v4 = 0;
  }
  return v4;
}

//----- (006DDEA0) --------------------------------------------------------
bool __thiscall ORFieldByte::orf_CompareContent(ORFieldByte *this, char *contentstring, ORToken *contentindex)
{
  ORFieldByte *v3; // esi@1

  v3 = this;
  sscanf(contentstring, "%d", &contentstring);
  return contentstring == (char *)*v3->orfb_Byte;
}

//----- (006DDED0) --------------------------------------------------------
char *__thiscall ORFieldByte::orf_GetBuffer(ORFieldByte *this)
{
  return this->orfb_Byte;
}

//----- (006DDEE0) --------------------------------------------------------
int ORFieldByte::orf_GetType()
{
  return 3;
}

//----- (006DDEF0) --------------------------------------------------------
void __thiscall ORFieldWord::ORFieldWord(ORFieldWord *this)
{
  this->vfptr = (ORFieldVtbl *)&ORFieldWord::`vftable';
  this->orfw_Word = 0;
}
// 9C2D80: using guessed type unsigned __int8 (__thiscall *ORFieldWord::`vftable')(ORFieldWord *this, char *num, union ORToken *);

//----- (006DDF00) --------------------------------------------------------
void __thiscall ORFieldWord::~ORFieldWord(ORFieldWord *this)
{
  this->vfptr = (ORFieldVtbl *)ORField::`vftable';
}
// 9C2D20: using guessed type int (*ORField::`vftable'[5])();

//----- (006DDF10) --------------------------------------------------------
int __thiscall ORFieldWord::orf_Alloc(ORFieldWord *this, char *pnt)
{
  this->orfw_Word = (unsigned __int16 *)pnt;
  return ORColumnHeader::orch_GetLength(this->orf_Header);
}

//----- (006DDF30) --------------------------------------------------------
char __thiscall ORFieldWord::orf_Read(ORFieldWord *this, ORTokenReader *token)
{
  ORFieldWord *v2; // esi@1
  int v3; // eax@1
  char v4; // al@3
  char result; // [sp+Bh] [bp-1h]@1

  v2 = this;
  result = 0;
  v3 = ORTokenReader::ortr_ReadNumber(token, &result);
  if ( result && v3 < 0x10000 )
  {
    *v2->orfw_Word = v3;
    v4 = 1;
  }
  else
  {
    ORTokenReader::ortr_SetError(token, "Cannot read word data");
    v4 = 0;
  }
  return v4;
}

//----- (006DDF80) --------------------------------------------------------
bool __thiscall ORFieldWord::orf_CompareContent(ORFieldWord *this, char *contentstring, ORToken *contentindex)
{
  ORFieldWord *v3; // esi@1

  v3 = this;
  sscanf(contentstring, "%d", &contentstring);
  return contentstring == (char *)*v3->orfw_Word;
}

//----- (006DDFB0) --------------------------------------------------------
unsigned __int16 *__thiscall ORFieldWord::orf_GetBuffer(ORFieldWord *this)
{
  return this->orfw_Word;
}

//----- (006DDFC0) --------------------------------------------------------
int ORFieldWord::orf_GetType()
{
  return 4;
}

//----- (006DDFD0) --------------------------------------------------------
void __thiscall ORFieldDwrd::ORFieldDwrd(ORFieldDwrd *this)
{
  this->vfptr = (ORFieldVtbl *)&ORFieldDwrd::`vftable';
  this->orfd_Dwrd = 0;
}
// 9C2D98: using guessed type unsigned __int8 (__thiscall *ORFieldDwrd::`vftable')(ORFieldDwrd *this, char *num, union ORToken *);

//----- (006DDFE0) --------------------------------------------------------
void __thiscall ORFieldDwrd::~ORFieldDwrd(ORFieldDwrd *this)
{
  this->vfptr = (ORFieldVtbl *)ORField::`vftable';
}
// 9C2D20: using guessed type int (*ORField::`vftable'[5])();

//----- (006DDFF0) --------------------------------------------------------
int __thiscall ORFieldDwrd::orf_Alloc(ORFieldDwrd *this, char *pnt)
{
  this->orfd_Dwrd = (unsigned int *)pnt;
  return ORColumnHeader::orch_GetLength(this->orf_Header);
}

//----- (006DE010) --------------------------------------------------------
char __thiscall ORFieldDwrd::orf_Read(ORFieldDwrd *this, ORTokenReader *token)
{
  ORFieldDwrd *v2; // esi@1
  int v3; // eax@1
  char v4; // al@2
  char result; // [sp+Bh] [bp-1h]@1

  v2 = this;
  result = 0;
  v3 = ORTokenReader::ortr_ReadNumber(token, &result);
  if ( result )
  {
    *v2->orfd_Dwrd = v3;
    v4 = 1;
  }
  else
  {
    ORTokenReader::ortr_SetError(token, "Cannot read dwrd data");
    v4 = 0;
  }
  return v4;
}

//----- (006DE060) --------------------------------------------------------
bool __thiscall ORFieldDwrd::orf_CompareContent(ORFieldDwrd *this, char *contentstring, ORToken *contentindex)
{
  ORFieldDwrd *v3; // esi@1

  v3 = this;
  sscanf(contentstring, "%d", &contentstring);
  return contentstring == *(char **)v3->orfd_Dwrd;
}

//----- (006DE090) --------------------------------------------------------
unsigned int *__thiscall ORFieldDwrd::orf_GetBuffer(ORFieldDwrd *this)
{
  return this->orfd_Dwrd;
}

//----- (006DE0A0) --------------------------------------------------------
int ORFieldDwrd::orf_GetType()
{
  return 5;
}

//----- (006DE0B0) --------------------------------------------------------
void __thiscall ORRecord::ORRecord(ORRecord *this)
{
  this->orr_Buffer = 0;
  memset(this, 0, 0x200u);
}

//----- (006DE0D0) --------------------------------------------------------
void __thiscall ORRecord::l_Clone(ORRecord *this, ORRecord *rec)
{
  qmemcpy(this, rec, sizeof(ORRecord));
  memset(rec, 0, 0x200u);
  rec->orr_Buffer = 0;
}

//----- (006DE100) --------------------------------------------------------
char *__thiscall ORRecord::orr_GetBuffer(ORRecord *this)
{
  return this->orr_Buffer;
}

//----- (006DE110) --------------------------------------------------------
void __thiscall ORRecord::orr_MakeBuffer(ORRecord *this, int recorelength)
{
  ORRecord *v2; // esi@1

  v2 = this;
  this->orr_Buffer = (char *)operator new[](recorelength);
  v2->orr_Pointer = 0;
}

//----- (006DE140) --------------------------------------------------------
void __thiscall ORRecord::orr_AllocMemory(ORRecord *this, ORField *cell)
{
  this->orr_Pointer += ((int (__stdcall *)(_DWORD))cell->vfptr->orf_Alloc)(&this->orr_Buffer[this->orr_Pointer]);
}

//----- (006DE170) --------------------------------------------------------
ORField *__thiscall ORRecord::orr_AllocObject(ORRecord *this, unsigned __int16 *hnd, unsigned __int16 type)
{
  ORRecord *v3; // edi@1
  int v4; // esi@1
  ORField *result; // eax@4

  v3 = this;
  v4 = 0;
  while ( this->orr_FieldArray[v4] )
  {
    if ( ++v4 >= 128 )
      return 0;
  }
  switch ( type )
  {
    case 1u:
      result = (ORField *)operator new(0xCu);
      if ( !result )
        goto LABEL_16;
      result[1].vfptr = 0;
      result->vfptr = (ORFieldVtbl *)&ORFieldIndex::`vftable';
      v3->orr_FieldArray[v4] = result;
      break;
    case 2u:
      result = (ORField *)operator new(0xCu);
      if ( !result )
        goto LABEL_16;
      result[1].vfptr = 0;
      result->vfptr = (ORFieldVtbl *)&ORFieldString::`vftable';
      v3->orr_FieldArray[v4] = result;
      break;
    case 3u:
      result = (ORField *)operator new(0xCu);
      if ( !result )
        goto LABEL_16;
      result[1].vfptr = 0;
      result->vfptr = (ORFieldVtbl *)&ORFieldByte::`vftable';
      v3->orr_FieldArray[v4] = result;
      break;
    case 4u:
      result = (ORField *)operator new(0xCu);
      if ( !result )
        goto LABEL_16;
      result[1].vfptr = 0;
      result->vfptr = (ORFieldVtbl *)&ORFieldWord::`vftable';
      v3->orr_FieldArray[v4] = result;
      break;
    case 5u:
      result = (ORField *)operator new(0xCu);
      if ( !result )
      {
LABEL_16:
        v3->orr_FieldArray[v4] = 0;
        goto LABEL_17;
      }
      result[1].vfptr = 0;
      result->vfptr = (ORFieldVtbl *)&ORFieldDwrd::`vftable';
      v3->orr_FieldArray[v4] = result;
      break;
    default:
LABEL_17:
      result = v3->orr_FieldArray[v4];
      break;
  }
  return result;
}
// 9C2D38: using guessed type unsigned __int8 (__thiscall *ORFieldIndex::`vftable')(ORFieldIndex *this, char *contentstring, union ORToken *);
// 9C2D50: using guessed type unsigned __int8 (__thiscall *ORFieldString::`vftable')(ORFieldString *this, char *contentstring, union ORToken *);
// 9C2D68: using guessed type unsigned __int8 (__thiscall *ORFieldByte::`vftable')(ORFieldByte *this, char *num, union ORToken *);
// 9C2D80: using guessed type unsigned __int8 (__thiscall *ORFieldWord::`vftable')(ORFieldWord *this, char *num, union ORToken *);
// 9C2D98: using guessed type unsigned __int8 (__thiscall *ORFieldDwrd::`vftable')(ORFieldDwrd *this, char *num, union ORToken *);

//----- (006DE280) --------------------------------------------------------
char __thiscall ORRecord::orr_FreeObject(ORRecord *this, unsigned __int16 hnd, unsigned __int16 type)
{
  ORField *v3; // eax@1
  char result; // al@2
  ORField *v5; // ST00_4@3

  v3 = this->orr_FieldArray[hnd];
  if ( v3 )
  {
    v5 = this->orr_FieldArray[hnd];
    v3->vfptr = (ORFieldVtbl *)ORField::`vftable';
    operator delete(v5);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9C2D20: using guessed type int (*ORField::`vftable'[5])();

//----- (006DE2B0) --------------------------------------------------------
char __thiscall ORRecord::orr_4AllInList(ORRecord *this, ListIteratorDefault<ORField> *arg)
{
  ORRecord *v2; // ebx@1
  int v3; // esi@1
  ORField *v4; // eax@2

  v2 = this;
  v3 = 0;
  while ( 1 )
  {
    v4 = v2->orr_FieldArray[v3];
    if ( v4 )
    {
      if ( !arg->vfptr->lid_Call(arg, v4, v3) )
        break;
    }
    if ( ++v3 >= 128 )
      return 1;
  }
  return 0;
}

//----- (006DE2F0) --------------------------------------------------------
char __thiscall ORFieldIndex::orf_Read(ORFieldIndex *this, ORTokenReader *token)
{
  ORFieldIndex *v2; // esi@1
  char *v3; // eax@1
  char result; // al@2
  ORToken *v5; // ST00_4@3

  v2 = this;
  v3 = ORTokenReader::ortr_ReadString(token);
  if ( v3 )
  {
    v5 = v2->orfi_Index;
    v5->ort_Code[4] = 0;
    v5->ort_Code[3] = 0;
    v5->ort_Code[2] = 0;
    v5->ort_Code[1] = 0;
    v5->ort_Code[0] = 0;
    strncpy((char *)v5->ort_Code, v3, 0x14u);
    result = 1;
  }
  else
  {
    ORTokenReader::ortr_SetError(token, "Cannot read index data");
    result = 0;
  }
  return result;
}

//----- (006DE340) --------------------------------------------------------
bool __thiscall ORFieldIndex::orf_CompareContent(ORFieldIndex *this, char *contentstring, ORToken *contentindex)
{
  ORToken *v3; // eax@1

  v3 = this->orfi_Index;
  return contentindex->ort_Code[0] == v3->ort_Code[0]
      && contentindex->ort_Code[1] == v3->ort_Code[1]
      && contentindex->ort_Code[2] == v3->ort_Code[2]
      && contentindex->ort_Code[3] == v3->ort_Code[3]
      && contentindex->ort_Code[4] == v3->ort_Code[4];
}

//----- (006DE380) --------------------------------------------------------
char __thiscall ORFieldString::orf_Read(ORFieldString *this, ORTokenReader *token)
{
  ORFieldString *v2; // esi@1
  char *v3; // edi@1
  char result; // al@2
  unsigned __int16 v5; // ax@3
  unsigned int v6; // eax@3

  v2 = this;
  v3 = ORTokenReader::ortr_ReadString(token);
  if ( v3 )
  {
    v5 = ORColumnHeader::orch_GetLength(v2->orf_Header);
    memset(v2->orfs_String, 0, v5);
    v6 = ORColumnHeader::orch_GetLength(v2->orf_Header);
    strncpy(v2->orfs_String, v3, v6);
    result = 1;
  }
  else
  {
    ORTokenReader::ortr_SetError(token, "Cannot read string data");
    result = 0;
  }
  return result;
}

//----- (006DE3F0) --------------------------------------------------------
void __thiscall ORRecord::~ORRecord(ORRecord *this)
{
  ORRecord *v1; // edi@1
  signed int v2; // esi@3
  ORFieldVtbl **v3; // eax@4
  ORField *v4; // ST00_4@5

  v1 = this;
  if ( this->orr_Buffer )
    operator delete(this->orr_Buffer);
  v2 = 0;
  do
  {
    v3 = &v1->orr_FieldArray[v2]->vfptr;
    if ( v3 )
    {
      v4 = v1->orr_FieldArray[v2];
      *v3 = (ORFieldVtbl *)ORField::`vftable';
      operator delete(v4);
    }
    ++v2;
  }
  while ( v2 < 128 );
}
// 9C2D20: using guessed type int (*ORField::`vftable'[5])();

//----- (006DE440) --------------------------------------------------------
ORToken *__thiscall ORToken::ort_ToLower(ORToken *this)
{
  ORToken *result; // eax@1
  char *v2; // edx@1
  signed int v3; // esi@1
  unsigned __int8 v4; // bl@2
  char v5; // bl@5
  char v6; // bl@8
  char v7; // bl@11
  char v8; // bl@14

  result = this;
  v2 = (char *)&this->ort_Code[0] + 1;
  v3 = 4;
  do
  {
    v4 = *(v2 - 1);
    if ( v4 >= 0x41u && v4 <= 0x5Au )
      *(v2 - 1) = v4 + 32;
    v5 = *v2;
    if ( (unsigned __int8)*v2 >= 0x41u && (unsigned __int8)v5 <= 0x5Au )
      *v2 = v5 + 32;
    v6 = v2[1];
    if ( (unsigned __int8)v6 >= 0x41u && (unsigned __int8)v6 <= 0x5Au )
      v2[1] = v6 + 32;
    v7 = v2[2];
    if ( (unsigned __int8)v7 >= 0x41u && (unsigned __int8)v7 <= 0x5Au )
      v2[2] = v7 + 32;
    v8 = v2[3];
    if ( (unsigned __int8)v8 >= 0x41u && (unsigned __int8)v8 <= 0x5Au )
      v2[3] = v8 + 32;
    v2 += 5;
    --v3;
  }
  while ( v3 );
  return result;
}

//----- (006DE4C0) --------------------------------------------------------
void __thiscall ORLinebuffer::ORLinebuffer(ORLinebuffer *this, _iobuf *fp)
{
  this->orlb_fp = fp;
  this->orlb_Pointer = 0;
  this->orlb_LineLen = -1;
}

//----- (006DE500) --------------------------------------------------------
char __thiscall ORLinebuffer::orlb_Lineread(ORLinebuffer *this)
{
  ORLinebuffer *v1; // esi@1
  const char *v2; // edi@1
  char result; // al@2

  v1 = this;
  v2 = this->orlb_Buffer;
  if ( fgets(this->orlb_Buffer, 2048, this->orlb_fp) )
  {
    v1->orlb_LineLen = strlen(v2);
    v1->orlb_Pointer = 0;
    result = 1;
  }
  else
  {
    v1->orlb_LineLen = -1;
    result = 0;
  }
  return result;
}

//----- (006DE550) --------------------------------------------------------
void __thiscall ORLinebuffer::orlb_Clear(ORLinebuffer *this)
{
  this->orlb_Pointer = 0;
  this->orlb_LineLen = -1;
}

//----- (006DE570) --------------------------------------------------------
void __thiscall ORLinebuffer::orlb_FunGetc(ORLinebuffer *this)
{
  int v1; // eax@1

  v1 = this->orlb_Pointer;
  if ( v1 > 0 )
    this->orlb_Pointer = v1 - 1;
}

//----- (006DE590) --------------------------------------------------------
int __thiscall ORLinebuffer::orlb_FGetc(ORLinebuffer *this)
{
  int v1; // edx@1
  int result; // eax@2

  v1 = this->orlb_Pointer;
  if ( this->orlb_LineLen >= v1 )
  {
    result = this->orlb_Buffer[v1];
    this->orlb_Pointer = v1 + 1;
  }
  else
  {
    result = 999;
  }
  return result;
}

//----- (006DE5C0) --------------------------------------------------------
void __thiscall ORDelimiter::ORDelimiter(ORDelimiter *this)
{
  this->ord_Number = 0;
}

//----- (006DE5E0) --------------------------------------------------------
char __thiscall ORDelimiter::operator[](ORDelimiter *this, int chr)
{
  char result; // al@2
  int v3; // edx@3
  int v4; // eax@3

  if ( chr > 32 )
  {
    v3 = this->ord_Number;
    v4 = 0;
    if ( v3 <= 0 )
    {
LABEL_6:
      result = 0;
    }
    else
    {
      while ( this->ord_Array[v4] != chr )
      {
        if ( ++v4 >= v3 )
          goto LABEL_6;
      }
      result = 1;
    }
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (006DE620) --------------------------------------------------------
void __thiscall ORIgnore::ORIgnore(ORIgnore *this)
{
  this->ori_Number = 0;
}

//----- (006DE640) --------------------------------------------------------
char __thiscall ORIgnore::operator[](ORIgnore *this, int chr)
{
  int v2; // edx@1
  int v3; // eax@1
  char result; // al@4

  v2 = this->ori_Number;
  v3 = 0;
  if ( v2 <= 0 )
  {
LABEL_4:
    result = 0;
  }
  else
  {
    while ( this->ori_Array[v3] != chr )
    {
      if ( ++v3 >= v2 )
        goto LABEL_4;
    }
    result = 1;
  }
  return result;
}

//----- (006DE670) --------------------------------------------------------
void __thiscall ORExchange::ORExchange(ORExchange *this)
{
  this->ore_Number = 0;
}

//----- (006DE690) --------------------------------------------------------
int __thiscall ORExchange::operator[](ORExchange *this, int chr)
{
  int result; // eax@1
  int v3; // esi@1
  int v4; // edx@1

  result = chr;
  v3 = this->ore_Number;
  v4 = 0;
  if ( v3 > 0 )
  {
    while ( this->ore_Array[v4].from != chr )
    {
      if ( ++v4 >= v3 )
        return result;
    }
    result = this->ore_Array[v4].to;
  }
  return result;
}

//----- (006DE6C0) --------------------------------------------------------
void __thiscall ORComment::ORComment(ORComment *this)
{
  this->orc_Comment = 59;
}

//----- (006DE6E0) --------------------------------------------------------
bool __thiscall ORComment::operator[](ORComment *this, int chr)
{
  return chr == this->orc_Comment;
}

//----- (006DE6F0) --------------------------------------------------------
void __thiscall ORBrace::ORBrace(ORBrace *this)
{
  *this = (ORBrace)23899;
}

//----- (006DE710) --------------------------------------------------------
bool __thiscall ORBrace::orb_IsOpen(ORBrace *this, int chr)
{
  return this->orc_Open == chr;
}

//----- (006DE720) --------------------------------------------------------
bool __thiscall ORBrace::orb_IsClose(ORBrace *this, int chr)
{
  return this->orc_Close == chr;
}

//----- (006DE750) --------------------------------------------------------
void __thiscall ORErrorMessage::orem_Clear(ORErrorMessage *this)
{
  this->orem_Line = 0;
  this->orem_Message = "Noerr";
  this->orem_Err = 0;
}

//----- (006DE770) --------------------------------------------------------
void __thiscall ORErrorMessage::operator=(ORErrorMessage *this, char *msg)
{
  this->orem_Message = msg;
  this->orem_Err = 1;
}

//----- (006DE790) --------------------------------------------------------
void __thiscall ORErrorMessage::orem_NextLine(ORErrorMessage *this)
{
  ++this->orem_Line;
}

//----- (006DE7A0) --------------------------------------------------------
int __thiscall ORErrorMessage::orem_GetLine(ORErrorMessage *this)
{
  return this->orem_Line;
}

//----- (006DE7B0) --------------------------------------------------------
char *__thiscall ORErrorMessage::orem_GetMessage(ORErrorMessage *this)
{
  return this->orem_Message;
}

//----- (006DE7C0) --------------------------------------------------------
void __thiscall ORTokenReader::ORTokenReader(ORTokenReader *this, _iobuf *fp, TokenArgument *argument)
{
  this->ortr_LineBuffer.orlb_fp = fp;
  this->ortr_LineBuffer.orlb_Pointer = 0;
  this->ortr_LineBuffer.orlb_LineLen = -1;
  this->ortr_Argument = argument;
}

//----- (006DE800) --------------------------------------------------------
int __thiscall ORTokenReader::ortr_SkipBlank(ORTokenReader *this)
{
  int v1; // edx@1
  int result; // eax@2
  TokenArgument *v3; // esi@3
  int v4; // edi@6
  int v5; // edx@6

  while ( 1 )
  {
    v1 = this->ortr_LineBuffer.orlb_Pointer;
    if ( this->ortr_LineBuffer.orlb_LineLen < v1 )
      break;
    result = this->ortr_LineBuffer.orlb_Buffer[v1];
    this->ortr_LineBuffer.orlb_Pointer = v1 + 1;
    if ( result == 999 )
      break;
    v3 = this->ortr_Argument;
    if ( result == v3->comment.orc_Comment )
    {
      this->ortr_LineBuffer.orlb_Pointer = 0;
      this->ortr_LineBuffer.orlb_LineLen = -1;
    }
    else if ( result > 32 )
    {
      v4 = v3->delimiter.ord_Number;
      v5 = 0;
      if ( v4 <= 0 )
        return result;
      while ( v3->delimiter.ord_Array[v5] != result )
      {
        if ( ++v5 >= v4 )
          return result;
      }
    }
  }
  return 999;
}

//----- (006DE880) --------------------------------------------------------
void __thiscall ORTokenReader::ortr_SetError(ORTokenReader *this, char *err)
{
  TokenArgument *v2; // eax@1

  v2 = this->ortr_Argument;
  v2->errmsg.orem_Message = err;
  v2->errmsg.orem_Err = 1;
}

//----- (006DE8A0) --------------------------------------------------------
int __thiscall ORTokenReader::ortr_ReadNumber8(ORTokenReader *this, char *result)
{
  int v2; // eax@1
  int v3; // esi@2
  int v4; // edx@3
  int v5; // edx@5

  v2 = 0;
  while ( 1 )
  {
    v3 = this->ortr_LineBuffer.orlb_Pointer;
    if ( this->ortr_LineBuffer.orlb_LineLen < v3 )
      break;
    v4 = this->ortr_LineBuffer.orlb_Buffer[v3];
    this->ortr_LineBuffer.orlb_Pointer = v3 + 1;
    if ( (unsigned int)(v4 - 48) > 7 )
      break;
    v2 = v4 + 8 * v2 - 48;
    *result = 1;
  }
  v5 = this->ortr_LineBuffer.orlb_Pointer;
  if ( v5 > 0 )
    this->ortr_LineBuffer.orlb_Pointer = v5 - 1;
  return v2;
}

//----- (006DE900) --------------------------------------------------------
int __thiscall ORTokenReader::ortr_ReadNumber10(ORTokenReader *this, char *result)
{
  int v2; // eax@1
  int v3; // esi@2
  int v4; // edx@3
  int v5; // edx@5

  v2 = 0;
  while ( 1 )
  {
    v3 = this->ortr_LineBuffer.orlb_Pointer;
    if ( this->ortr_LineBuffer.orlb_LineLen < v3 )
      break;
    v4 = this->ortr_LineBuffer.orlb_Buffer[v3];
    this->ortr_LineBuffer.orlb_Pointer = v3 + 1;
    if ( (unsigned int)(v4 - 48) > 9 )
      break;
    v2 = v4 + 10 * v2 - 48;
    *result = 1;
  }
  v5 = this->ortr_LineBuffer.orlb_Pointer;
  if ( v5 > 0 )
    this->ortr_LineBuffer.orlb_Pointer = v5 - 1;
  return v2;
}

//----- (006DE960) --------------------------------------------------------
int __thiscall ORTokenReader::ortr_ReadNumber16(ORTokenReader *this, char *result)
{
  int v2; // eax@1
  int v3; // esi@2
  int v4; // edx@3
  int v5; // edx@9

  v2 = 0;
  while ( 1 )
  {
    v3 = this->ortr_LineBuffer.orlb_Pointer;
    if ( this->ortr_LineBuffer.orlb_LineLen < v3 )
      break;
    v4 = this->ortr_LineBuffer.orlb_Buffer[v3];
    this->ortr_LineBuffer.orlb_Pointer = v3 + 1;
    if ( (unsigned int)(v4 - 48) > 9 )
    {
      if ( (unsigned int)(v4 - 65) > 5 )
      {
        if ( (unsigned int)(v4 - 97) > 5 )
          break;
        v2 = v4 - 87 + 16 * v2;
        *result = 1;
      }
      else
      {
        v2 = v4 - 55 + 16 * v2;
        *result = 1;
      }
    }
    else
    {
      v2 = v4 - 48 + 16 * v2;
      *result = 1;
    }
  }
  v5 = this->ortr_LineBuffer.orlb_Pointer;
  if ( v5 > 0 )
    this->ortr_LineBuffer.orlb_Pointer = v5 - 1;
  return v2;
}

//----- (006DE9E0) --------------------------------------------------------
int __thiscall ORTokenReader::ortr_GetOctal(ORTokenReader *this)
{
  int v1; // ebx@1
  int result; // eax@1
  signed int v3; // edi@1
  int v4; // edx@2
  int v5; // esi@3

  v1 = this->ortr_LineBuffer.orlb_LineLen;
  result = 0;
  v3 = 0;
  while ( 1 )
  {
    v4 = this->ortr_LineBuffer.orlb_Pointer;
    if ( v1 < v4 )
      break;
    v5 = this->ortr_LineBuffer.orlb_Buffer[v4];
    this->ortr_LineBuffer.orlb_Pointer = v4 + 1;
    if ( (unsigned int)(v5 - 48) > 7 )
      break;
    ++v3;
    result = v5 + 8 * result - 48;
    if ( v3 >= 3 )
      return result;
  }
  return 999;
}

//----- (006DEA30) --------------------------------------------------------
int __thiscall ORTokenReader::ortr_GetDigit(ORTokenReader *this)
{
  int v1; // ebx@1
  int result; // eax@1
  signed int v3; // edi@1
  int v4; // edx@2
  int v5; // esi@3

  v1 = this->ortr_LineBuffer.orlb_LineLen;
  result = 0;
  v3 = 0;
  while ( 1 )
  {
    v4 = this->ortr_LineBuffer.orlb_Pointer;
    if ( v1 < v4 )
      break;
    v5 = this->ortr_LineBuffer.orlb_Buffer[v4];
    this->ortr_LineBuffer.orlb_Pointer = v4 + 1;
    if ( (unsigned int)(v5 - 48) > 9 )
      break;
    ++v3;
    result = v5 + 10 * result - 48;
    if ( v3 >= 3 )
      return result;
  }
  return 999;
}

//----- (006DEA80) --------------------------------------------------------
int __thiscall ORTokenReader::ortr_GetHexa(ORTokenReader *this)
{
  int v1; // ebx@1
  int result; // eax@1
  signed int v3; // edi@1
  int v4; // esi@2
  int v5; // edx@3
  int v6; // edx@4

  v1 = this->ortr_LineBuffer.orlb_LineLen;
  result = 0;
  v3 = 0;
  while ( 1 )
  {
    v4 = this->ortr_LineBuffer.orlb_Pointer;
    if ( v1 < v4 )
      break;
    v5 = this->ortr_LineBuffer.orlb_Buffer[v4];
    this->ortr_LineBuffer.orlb_Pointer = v4 + 1;
    if ( (unsigned int)(v5 - 48) > 9 )
    {
      if ( (unsigned int)(v5 - 65) > 5 )
      {
        if ( (unsigned int)(v5 - 97) > 5 )
          return 999;
        v6 = v5 - 87;
      }
      else
      {
        v6 = v5 - 55;
      }
    }
    else
    {
      v6 = v5 - 48;
    }
    ++v3;
    result = v6 + 16 * result;
    if ( v3 >= 2 )
      return result;
  }
  return 999;
}

//----- (006DEAF0) --------------------------------------------------------
int __thiscall ORTokenReader::ortr_ReadNumber(ORTokenReader *this, char *result)
{
  int v2; // eax@1
  ORTokenReader *v3; // ecx@1
  int v4; // eax@2
  bool v5; // zf@3
  int v6; // eax@3
  int v7; // edx@8
  int v8; // eax@9

  v2 = ORTokenReader::ortr_SkipBlank(this);
  if ( v2 == 45 )
  {
    v4 = -ORTokenReader::ortr_ReadNumber(v3, result);
  }
  else
  {
    v5 = v2 == 48;
    v6 = v3->ortr_LineBuffer.orlb_Pointer;
    if ( v5 )
    {
      if ( v3->ortr_LineBuffer.orlb_LineLen >= v6
        && (v7 = v3->ortr_LineBuffer.orlb_Buffer[v6], v3->ortr_LineBuffer.orlb_Pointer = v6 + 1, v7 == 120) )
      {
        v4 = ORTokenReader::ortr_ReadNumber16(v3, result);
      }
      else
      {
        v8 = v3->ortr_LineBuffer.orlb_Pointer;
        if ( v8 > 0 )
          v3->ortr_LineBuffer.orlb_Pointer = v8 - 1;
        *result = 1;
        v4 = ORTokenReader::ortr_ReadNumber8(v3, result);
      }
    }
    else
    {
      if ( v6 > 0 )
        v3->ortr_LineBuffer.orlb_Pointer = v6 - 1;
      v4 = ORTokenReader::ortr_ReadNumber10(v3, result);
    }
  }
  return v4;
}

//----- (006DEB70) --------------------------------------------------------
char __thiscall ORTokenReader::ortr_isEOL(ORTokenReader *this)
{
  int v1; // ecx@1
  char result; // al@2
  int v3; // eax@3

  if ( ORTokenReader::ortr_SkipBlank(this) == 999 )
  {
    result = 1;
  }
  else
  {
    v3 = *(_DWORD *)(v1 + 2060);
    *(_DWORD *)(v3 + 4) = "Extra data exist";
    *(_BYTE *)(v3 + 8) = 1;
    result = 0;
  }
  return result;
}

//----- (006DEBA0) --------------------------------------------------------
int __thiscall ORTokenReader::ortr_ReadChar(ORTokenReader *this)
{
  int result; // eax@1
  ORTokenReader *v2; // ecx@1
  TokenArgument *v3; // ecx@2
  int v4; // eax@4
  signed int v5; // edx@5
  TokenArgument *v6; // ecx@14

  result = ORTokenReader::ortr_SkipBlank(this);
  if ( result == 999 )
  {
    v3 = v2->ortr_Argument;
    v3->errmsg.orem_Message = "Unexpected EOF";
    v3->errmsg.orem_Err = 1;
    return result;
  }
  if ( result == 92 )
  {
    v4 = v2->ortr_LineBuffer.orlb_Pointer;
    if ( v2->ortr_LineBuffer.orlb_LineLen >= v4 )
    {
      v5 = v2->ortr_LineBuffer.orlb_Buffer[v4];
      v2->ortr_LineBuffer.orlb_Pointer = v4 + 1;
    }
    else
    {
      v5 = 999;
    }
    result = 999;
    if ( v5 == 100 )
    {
      result = ORTokenReader::ortr_GetDigit(v2);
    }
    else if ( v5 == 111 )
    {
      result = ORTokenReader::ortr_GetOctal(v2);
    }
    else
    {
      if ( v5 != 120 )
      {
LABEL_14:
        v6 = v2->ortr_Argument;
        v6->errmsg.orem_Message = "Invalid character";
        v6->errmsg.orem_Err = 1;
        return result;
      }
      result = ORTokenReader::ortr_GetHexa(v2);
    }
    if ( result < 256 )
      return result;
    goto LABEL_14;
  }
  return result;
}

//----- (006DEC30) --------------------------------------------------------
char *__thiscall ORTokenReader::ortr_ReadString(ORTokenReader *this)
{
  ORTokenReader *v1; // esi@1
  int v2; // eax@2
  TokenArgument *v3; // ecx@2
  int v4; // edi@2
  int v5; // edx@2
  int v6; // ecx@7
  int v7; // eax@8
  int v8; // ebx@8
  TokenArgument *v9; // edx@9
  int v10; // edi@9
  int v11; // ecx@9
  int v12; // eax@17
  int v13; // eax@20
  int v14; // ebx@25
  TokenArgument *v15; // edi@27
  TokenArgument *v16; // esi@31
  char *result; // eax@32
  int v18; // [sp+10h] [bp-Ch]@8
  int i; // [sp+18h] [bp-4h]@6

  v1 = this;
  while ( 1 )
  {
    v2 = ORTokenReader::ortr_SkipBlank(v1);
    v3 = v1->ortr_Argument;
    v4 = v3->ignore.ori_Number;
    v5 = 0;
    if ( v4 <= 0 )
      break;
    while ( v3->ignore.ori_Array[v5] != v2 )
    {
      if ( ++v5 >= v4 )
        goto LABEL_5;
    }
  }
LABEL_5:
  if ( v2 == 999 )
  {
LABEL_32:
    result = 0;
  }
  else
  {
    v1->ortr_Buffer[0] = v2;
    i = 1;
    do
    {
      v6 = v1->ortr_LineBuffer.orlb_Pointer;
      if ( v1->ortr_LineBuffer.orlb_LineLen < v6 )
        break;
      v7 = v1->ortr_LineBuffer.orlb_Buffer[v6];
      v8 = v6 + 1;
      v18 = v6 + 1;
      v1->ortr_LineBuffer.orlb_Pointer = v6 + 1;
      if ( v7 == 999 )
        break;
      v9 = v1->ortr_Argument;
      v10 = v9->ignore.ori_Number;
      v11 = 0;
      if ( v10 <= 0 )
      {
LABEL_13:
        if ( v9->brace.orc_Open == v7 || v9->brace.orc_Close == v7 )
        {
          if ( v8 > 0 )
            v1->ortr_LineBuffer.orlb_Pointer = v8 - 1;
          break;
        }
        if ( v7 == 92 )
        {
          if ( v1->ortr_LineBuffer.orlb_LineLen < v8 )
            goto LABEL_31;
          v12 = v1->ortr_LineBuffer.orlb_Buffer[v8];
          v1->ortr_LineBuffer.orlb_Pointer = v8 + 1;
          if ( v12 == 100 )
          {
            v13 = ORTokenReader::ortr_GetDigit(v1);
          }
          else if ( v12 == 111 )
          {
            v13 = ORTokenReader::ortr_GetOctal(v1);
          }
          else
          {
            if ( v12 != 120 )
              goto LABEL_31;
            v13 = ORTokenReader::ortr_GetHexa(v1);
          }
          if ( v13 >= 256 )
          {
LABEL_31:
            v16 = v1->ortr_Argument;
            v16->errmsg.orem_Message = "Invalid character";
            v16->errmsg.orem_Err = 1;
            goto LABEL_32;
          }
          v14 = v13;
        }
        else
        {
          v14 = v7;
        }
        v15 = v1->ortr_Argument;
        if ( ORDelimiter::operator[](&v15->delimiter, v14) )
          break;
        v1->ortr_Buffer[i] = ORExchange::operator[](&v15->exchange, v14);
      }
      else
      {
        while ( v9->ignore.ori_Array[v11] != v7 )
        {
          if ( ++v11 >= v10 )
          {
            v8 = v18;
            goto LABEL_13;
          }
        }
        --i;
      }
      ++i;
    }
    while ( i < 2048 );
    v1->ortr_Buffer[i] = 0;
    result = v1->ortr_Buffer;
  }
  return result;
}

//----- (006DEDD0) --------------------------------------------------------
char *__thiscall ORToken::ort_GetString(ORToken *this, char *buf)
{
  char *result; // eax@1

  result = buf;
  *(_QWORD *)buf = *(_QWORD *)&this->ort_Code[0];
  *((_QWORD *)buf + 1) = *(_QWORD *)&this->ort_Code[2];
  *((_DWORD *)buf + 4) = this->ort_Code[4];
  buf[20] = 0;
  return result;
}

//----- (006DEE00) --------------------------------------------------------
char __thiscall ORDelimiter::ord_Exec(ORDelimiter *this, ORTokenReader *token)
{
  ORDelimiter *v2; // esi@1
  TokenArgument *v3; // eax@2
  char result; // al@3
  int v5; // eax@4

  v2 = this;
  if ( this->ord_Number >= 32 )
  {
    v3 = token->ortr_Argument;
    v3->errmsg.orem_Message = "Too many delimiters";
    v3->errmsg.orem_Err = 1;
    return 0;
  }
  v5 = ORTokenReader::ortr_ReadChar(token);
  if ( v5 >= 256 )
    return 0;
  v2->ord_Array[v2->ord_Number] = v5;
  result = 1;
  ++v2->ord_Number;
  return result;
}

//----- (006DEE50) --------------------------------------------------------
char __thiscall ORIgnore::ori_Exec(ORIgnore *this, ORTokenReader *token)
{
  ORIgnore *v2; // esi@1
  TokenArgument *v3; // eax@2
  char result; // al@3
  int v5; // eax@4

  v2 = this;
  if ( this->ori_Number >= 32 )
  {
    v3 = token->ortr_Argument;
    v3->errmsg.orem_Message = "Too many delimiters";
    v3->errmsg.orem_Err = 1;
    return 0;
  }
  v5 = ORTokenReader::ortr_ReadChar(token);
  if ( v5 >= 256 )
    return 0;
  v2->ori_Array[v2->ori_Number] = v5;
  result = 1;
  ++v2->ori_Number;
  return result;
}

//----- (006DEEA0) --------------------------------------------------------
char __thiscall ORExchange::ore_Exec(ORExchange *this, ORTokenReader *token)
{
  ORExchange *v2; // esi@1
  TokenArgument *v3; // eax@2
  char result; // al@2
  int v5; // eax@3
  int v6; // eax@4

  v2 = this;
  if ( this->ore_Number < 32 )
  {
    v5 = ORTokenReader::ortr_ReadChar(token);
    if ( v5 < 256 && (v2->ore_Array[v2->ore_Number].from = v5, v6 = ORTokenReader::ortr_ReadChar(token), v6 < 256) )
    {
      v2->ore_Array[v2->ore_Number].to = v6;
      result = 1;
      ++v2->ore_Number;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    v3 = token->ortr_Argument;
    v3->errmsg.orem_Message = "Too many exchange";
    v3->errmsg.orem_Err = 1;
    result = 0;
  }
  return result;
}

//----- (006DEF10) --------------------------------------------------------
char __thiscall ORComment::orc_Exec(ORComment *this, ORTokenReader *token)
{
  ORComment *v2; // esi@1
  int v3; // eax@1
  char result; // al@2

  v2 = this;
  v3 = ORTokenReader::ortr_ReadChar(token);
  if ( v3 < 256 )
  {
    v2->orc_Comment = v3;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006DEF40) --------------------------------------------------------
char __thiscall ORBrace::orb_Exec(ORBrace *this, ORTokenReader *token)
{
  ORBrace *v2; // esi@1
  int v3; // eax@1
  char result; // al@2
  int v5; // eax@3

  v2 = this;
  v3 = ORTokenReader::ortr_ReadChar(token);
  if ( v3 >= 256 || (v2->orc_Open = v3, v5 = ORTokenReader::ortr_ReadChar(token), v5 >= 256) )
  {
    result = 0;
  }
  else
  {
    v2->orc_Close = v5;
    result = 1;
  }
  return result;
}

//----- (006DEF80) --------------------------------------------------------
void __thiscall ORErrorMessage::ORErrorMessage(ORErrorMessage *this)
{
  this->orem_Line = 0;
  this->orem_Message = "Noerr";
  this->orem_Err = 0;
}

//----- (006DEFA0) --------------------------------------------------------
ORToken *__thiscall ORTokenReader::ortr_ReadCommand(ORTokenReader *this, ORToken *com)
{
  ORTokenReader *v2; // esi@1
  char *v3; // edi@1
  int *v4; // eax@3
  int v5; // eax@3
  ORTokenReader *v6; // ecx@3
  TokenArgument *v7; // esi@5
  ORToken *result; // eax@5
  TokenArgument *v9; // esi@6
  char *v10; // eax@7

  v2 = this;
  v3 = this->ortr_LineBuffer.orlb_Buffer;
  do
  {
    if ( !fgets(v3, 2048, v2->ortr_LineBuffer.orlb_fp) )
    {
      v2->ortr_LineBuffer.orlb_LineLen = -1;
      v9 = v2->ortr_Argument;
      v9->errmsg.orem_Message = "Unexpected EOF";
      v9->errmsg.orem_Err = 1;
      return 0;
    }
    v2->ortr_LineBuffer.orlb_LineLen = strlen(v3);
    v4 = &v2->ortr_Argument->errmsg.orem_Line;
    v2->ortr_LineBuffer.orlb_Pointer = 0;
    ++*v4;
    v5 = ORTokenReader::ortr_SkipBlank(v2);
  }
  while ( v5 == 999 );
  if ( v5 == 35 )
  {
    v10 = ORTokenReader::ortr_ReadString(v6);
    *(_QWORD *)&com->ort_Code[3] = 0i64;
    *(_QWORD *)&com->ort_Code[1] = 0i64;
    com->ort_Code[0] = 0;
    strncpy((char *)com->ort_Code, v10, 0x14u);
    ORToken::ort_ToLower(com);
    result = com;
  }
  else
  {
    v7 = v2->ortr_Argument;
    v7->errmsg.orem_Message = "# comment expected";
    v7->errmsg.orem_Err = 1;
    result = 0;
  }
  return result;
}

//----- (006DF070) --------------------------------------------------------
void __thiscall WeddingEntryWin::WeddingEntryWin(WeddingEntryWin *this)
{
  WeddingEntryWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_pkCongratulator = 0;
  v1->m_pkBridegroom = 0;
  v1->m_pkBride = 0;
  v1->m_pkWedding = 0;
  v1->vfptr = (NiRefObjectVtbl *)&WeddingEntryWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&WeddingEntryWin::`vftable'{for `IDirectMessenger'};
}
// 9C2F94: using guessed type void (__thiscall *WeddingEntryWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C2FB4: using guessed type int (__thiscall *WeddingEntryWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006DF0B0) --------------------------------------------------------
void __thiscall WeddingEntryWin::~WeddingEntryWin(WeddingEntryWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&WeddingEntryWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&WeddingEntryWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9C2F94: using guessed type void (__thiscall *WeddingEntryWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C2FB4: using guessed type int (__thiscall *WeddingEntryWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006DF0D0) --------------------------------------------------------
void __thiscall WeddingEntryWin::OnCmdGetIn(WeddingEntryWin *this)
{
  WeddingEntryWin *v1; // esi@1

  v1 = this;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 8u, 0x58u, 0, 0);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}

//----- (006DF100) --------------------------------------------------------
void __thiscall WeddingEntryWin::OnCommand(WeddingEntryWin *this, unsigned int wParam, int lParam)
{
  WeddingEntryWin *v3; // esi@1

  v3 = this;
  if ( wParam )
  {
    if ( wParam == 1 )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
  }
  else
  {
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 8u, 0x58u, 0, 0);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
  }
}

//----- (006DF150) --------------------------------------------------------
char __thiscall WeddingEntryWin::Create(WeddingEntryWin *this, PgFrameWork *pkFrameWork)
{
  WeddingEntryWin *v2; // esi@1
  NiSourceTexture *v3; // ebx@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // edi@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  int v10; // edi@15
  NiSourceTexture *v11; // eax@15
  PgSprData *v12; // eax@16
  PgSprData *v13; // eax@18
  PgSprData *v14; // eax@18
  PgFont *v15; // eax@20
  unsigned int v16; // STD0_4@20
  NiUnsharedGeometryGroup *v17; // STB4_4@20
  PgSprData::PgHitTester *v18; // eax@20
  unsigned int v19; // STD0_4@20
  PgFont *v20; // eax@20
  unsigned int v21; // STD0_4@20
  NiUnsharedGeometryGroup *v22; // eax@20
  int v23; // eax@20
  unsigned int v24; // STD0_4@20
  PgFont *v25; // eax@20
  PgWinText *v26; // eax@20
  NiPointer<PgSprData::PgHitTester> *v27; // ecx@20
  unsigned int v28; // STD0_4@20
  PgFont *v29; // eax@20
  unsigned int v30; // STD0_4@20
  NiUnsharedGeometryGroup *v31; // eax@20
  int v32; // eax@20
  unsigned int v33; // STD0_4@20
  PgFont *v34; // eax@20
  PgWinText *v35; // eax@20
  NiPointer<PgSprData::PgHitTester> *v36; // ecx@20
  unsigned int v37; // STD0_4@20
  PgFont *v38; // eax@20
  unsigned int v39; // STD0_4@20
  NiUnsharedGeometryGroup *v40; // eax@20
  int v41; // eax@20
  unsigned int v42; // STD0_4@20
  PgFont *v43; // eax@20
  PgWinText *v44; // eax@20
  NiPointer<PgSprData::PgHitTester> *v45; // ecx@20
  unsigned int v46; // STD0_4@20
  PgFont *v47; // eax@20
  unsigned int v48; // STD0_4@20
  NiUnsharedGeometryGroup *v49; // eax@20
  int v50; // eax@20
  unsigned int v51; // STD0_4@20
  PgFont *v52; // eax@20
  PgWinText *v53; // eax@20
  NiPointer<PgSprData::PgHitTester> *v54; // ecx@20
  unsigned int v55; // STD0_4@20
  PgFont *v56; // eax@20
  PgWinText *v57; // edi@20
  NiUnsharedGeometryGroup *v58; // eax@20
  PgSprData *v59; // edi@20
  PgWinBut *v60; // eax@20
  PgWinBut *v61; // edi@20
  PgWin *v62; // STA4_4@20
  PgFont *v63; // STA0_4@20
  unsigned int v64; // ST9C_4@20
  unsigned int v65; // eax@20
  PgWinText *v66; // edi@20
  NiUnsharedGeometryGroup *v67; // eax@20
  PgSprData *v68; // edi@20
  PgWinBut *v69; // eax@20
  PgWinBut *v70; // edi@20
  PgWin *v71; // STA4_4@20
  PgFont *v72; // STA0_4@20
  unsigned int v73; // ST9C_4@20
  unsigned int v74; // eax@20
  PgWinText *v75; // edi@20
  NiRefObjectVtbl *v76; // ebx@20
  NiUnsharedGeometryGroup *v77; // eax@20
  unsigned int uiWidth; // [sp+D4h] [bp-24h]@18
  unsigned int uiHeight; // [sp+D8h] [bp-20h]@18
  int iYOff; // [sp+DCh] [bp-1Ch]@15
  NiPointer<NiNode> spNode; // [sp+E0h] [bp-18h]@1
  int uiLeft; // [sp+E4h] [bp-14h]@11
  int uiTop; // [sp+E8h] [bp-10h]@11
  int v84; // [sp+F4h] [bp-4h]@1
  PgWinText *pkTextWin; // [sp+100h] [bp+8h]@20
  PgSprData *pkTextWina; // [sp+100h] [bp+8h]@20
  PgWinText *pkTextWinb; // [sp+100h] [bp+8h]@20
  PgWinText *pkTextWinc; // [sp+100h] [bp+8h]@20
  PgWinText *pkTextWind; // [sp+100h] [bp+8h]@20
  PgWinText *pkTextWine; // [sp+100h] [bp+8h]@20
  PgWinText *pkTextWinf; // [sp+100h] [bp+8h]@20
  PgWinText *pkTextWing; // [sp+100h] [bp+8h]@20
  PgWinText *pkTextWinh; // [sp+100h] [bp+8h]@20
  PgWinText *pkTextWini; // [sp+100h] [bp+8h]@20
  PgWinText *pkTextWinj; // [sp+100h] [bp+8h]@20
  PgWinText *pkTextWink; // [sp+100h] [bp+8h]@20
  PgWinText *pkTextWinl; // [sp+100h] [bp+8h]@20
  PgWinText *pkTextWinm; // [sp+100h] [bp+8h]@20
  PgWinText *pkTextWinn; // [sp+100h] [bp+8h]@20
  PgWinText *pkTextWino; // [sp+100h] [bp+8h]@20
  PgWinText *pkTextWinp; // [sp+100h] [bp+8h]@20
  PgWinText *pkTextWinq; // [sp+100h] [bp+8h]@20
  PgWinText *pkTextWinr; // [sp+100h] [bp+8h]@20
  PgWinText *pkTextWins; // [sp+100h] [bp+8h]@20
  PgWinText *pkTextWint; // [sp+100h] [bp+8h]@20

  v2 = this;
  spNode.m_pObject = 0;
  v84 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v84 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
    goto LABEL_5;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "\\Game\\WeddingEntry.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "WeddingProposeInputWin", 0) )
  {
    v4 = spNode.m_pObject;
    v84 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v10 = uiLeft;
  iYOff = uiTop;
  v11 = MenuTexMgr::GetTexture(0x13u);
  if ( v11 )
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v11);
  else
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop - iYOff, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop, v13, (PgWin *)&v2->vfptr, 0, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop, v14, (PgWin *)&v2->vfptr, 0, 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "WinTitle",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
  {
    v84 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  v15 = Font::Get(0);
  pkTextWin = PgWinText::CreateWin(uiLeft - v10, uiTop, uiWidth, uiHeight, v15, (PgWin *)&v2->vfptr, 0, 0);
  ((void (__thiscall *)(PgWinText *))pkTextWin->vfptr[122].__vecDelDtor)(pkTextWin);
  ((void (__cdecl *)(struct D3DXCOLOR *, signed int))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor, 5);
  v16 = (unsigned int)pkTextWin->vfptr;
  v17 = TextData::Get(0xE3FEFE20);
  (*(void (__thiscall **)(PgWinText *))(v16 + 472))(pkTextWin);
  ((void (__cdecl *)(_DWORD, NiUnsharedGeometryGroup *))pkTextWin->vfptr[60].__vecDelDtor)(0, v17);
  pkTextWina = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, v3);
  PgSprData::Add(pkTextWina, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(pkTextWina, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinCloseBut::CreateWin(uiLeft - v10, uiTop - iYOff, pkTextWina, (PgWin *)&v2->vfptr);
  v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &uiLeft, &uiTop, v3)->m_akHitTester.m_pBase->m_pObject;
  pkTextWinb = (PgWinText *)v18->m_uiHeight;
  v19 = v18->m_uiWidth;
  v20 = Font::Get(0);
  pkTextWinc = PgWinText::CreateWin(uiLeft - v10, uiTop, v19, (unsigned int)pkTextWinb, v20, (PgWin *)&v2->vfptr, 0, 0);
  pkTextWinc->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinc, 5u);
  ((void (__stdcall *)(D3DXCOLOR *))pkTextWinc->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  v21 = (unsigned int)pkTextWinc->vfptr;
  v22 = TextData::Get(0x2D51287Fu);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v21 + 472))(pkTextWinc, v22);
  ((void (__stdcall *)(_DWORD))pkTextWinc->vfptr[60].__vecDelDtor)(0);
  pkTextWind = (PgWinText *)PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "Text01_Field",
                              &uiLeft,
                              &uiTop,
                              v3);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop, (PgSprData *)pkTextWind, (PgWin *)&v2->vfptr, 0, 0);
  v23 = *(_DWORD *)LODWORD(pkTextWind->m_kWorldBound.m_kCenter.x);
  pkTextWine = *(PgWinText **)(v23 + 24);
  v24 = *(_DWORD *)(v23 + 20);
  v25 = Font::Get(0);
  v26 = PgWinText::CreateWin(uiLeft - v10, uiTop + 2, v24, (unsigned int)pkTextWine, v25, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkBridegroom = v26;
  v26->vfptr[122].__vecDelDtor((NiRefObject *)v26, 5u);
  ((void (__stdcall *)(D3DXCOLOR *))v2->m_pkBridegroom->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  ((void (__stdcall *)(_DWORD))v2->m_pkBridegroom->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(void *))v2->m_pkBridegroom->vfptr[118].__vecDelDtor)(&unk_9C2E77);
  v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text02", &uiLeft, &uiTop, v3)->m_akHitTester.m_pBase;
  pkTextWinf = (PgWinText *)v27->m_pObject->m_uiHeight;
  v28 = v27->m_pObject->m_uiWidth;
  v29 = Font::Get(0);
  pkTextWing = PgWinText::CreateWin(uiLeft - v10, uiTop, v28, (unsigned int)pkTextWinf, v29, (PgWin *)&v2->vfptr, 0, 0);
  pkTextWing->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWing, 5u);
  ((void (__stdcall *)(D3DXCOLOR *))pkTextWing->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  v30 = (unsigned int)pkTextWing->vfptr;
  v31 = TextData::Get(0xDE02D6EB);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v30 + 472))(pkTextWing, v31);
  ((void (__stdcall *)(_DWORD))pkTextWing->vfptr[60].__vecDelDtor)(0);
  pkTextWinh = (PgWinText *)PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "Text02_Field",
                              &uiLeft,
                              &uiTop,
                              v3);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop, (PgSprData *)pkTextWinh, (PgWin *)&v2->vfptr, 0, 0);
  v32 = *(_DWORD *)LODWORD(pkTextWinh->m_kWorldBound.m_kCenter.x);
  pkTextWini = *(PgWinText **)(v32 + 24);
  v33 = *(_DWORD *)(v32 + 20);
  v34 = Font::Get(0);
  v35 = PgWinText::CreateWin(uiLeft - v10, uiTop + 2, v33, (unsigned int)pkTextWini, v34, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkBride = v35;
  v35->vfptr[122].__vecDelDtor((NiRefObject *)v35, 5u);
  ((void (__stdcall *)(D3DXCOLOR *))v2->m_pkBride->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  ((void (__stdcall *)(_DWORD))v2->m_pkBride->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(void *))v2->m_pkBride->vfptr[118].__vecDelDtor)(&unk_9C2E7E);
  v36 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text03", &uiLeft, &uiTop, v3)->m_akHitTester.m_pBase;
  pkTextWinj = (PgWinText *)v36->m_pObject->m_uiHeight;
  v37 = v36->m_pObject->m_uiWidth;
  v38 = Font::Get(0);
  pkTextWink = PgWinText::CreateWin(uiLeft - v10, uiTop, v37, (unsigned int)pkTextWinj, v38, (PgWin *)&v2->vfptr, 0, 0);
  pkTextWink->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWink, 5u);
  ((void (__stdcall *)(D3DXCOLOR *))pkTextWink->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  v39 = (unsigned int)pkTextWink->vfptr;
  v40 = TextData::Get(0x274B5F5Bu);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v39 + 472))(pkTextWink, v40);
  ((void (__stdcall *)(_DWORD))pkTextWink->vfptr[60].__vecDelDtor)(0);
  pkTextWinl = (PgWinText *)PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "Text03_Field",
                              &uiLeft,
                              &uiTop,
                              v3);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop, (PgSprData *)pkTextWinl, (PgWin *)&v2->vfptr, 0, 0);
  v41 = *(_DWORD *)LODWORD(pkTextWinl->m_kWorldBound.m_kCenter.x);
  pkTextWinm = *(PgWinText **)(v41 + 24);
  v42 = *(_DWORD *)(v41 + 20);
  v43 = Font::Get(0);
  v44 = PgWinText::CreateWin(uiLeft - v10, uiTop + 2, v42, (unsigned int)pkTextWinm, v43, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkCongratulator = v44;
  v44->vfptr[122].__vecDelDtor((NiRefObject *)v44, 5u);
  ((void (__stdcall *)(D3DXCOLOR *))v2->m_pkCongratulator->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  ((void (__stdcall *)(_DWORD))v2->m_pkCongratulator->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(void *))v2->m_pkCongratulator->vfptr[118].__vecDelDtor)(&unk_9C2E7F);
  v45 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text04", &uiLeft, &uiTop, v3)->m_akHitTester.m_pBase;
  pkTextWinn = (PgWinText *)v45->m_pObject->m_uiHeight;
  v46 = v45->m_pObject->m_uiWidth;
  v47 = Font::Get(0);
  pkTextWino = PgWinText::CreateWin(uiLeft - v10, uiTop, v46, (unsigned int)pkTextWinn, v47, (PgWin *)&v2->vfptr, 0, 0);
  pkTextWino->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWino, 5u);
  ((void (__stdcall *)(D3DXCOLOR *))pkTextWino->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  v48 = (unsigned int)pkTextWino->vfptr;
  v49 = TextData::Get(0x86E6B8C0);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v48 + 472))(pkTextWino, v49);
  ((void (__stdcall *)(_DWORD))pkTextWino->vfptr[60].__vecDelDtor)(0);
  pkTextWinp = (PgWinText *)PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "Text04_Field",
                              &uiLeft,
                              &uiTop,
                              v3);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop, (PgSprData *)pkTextWinp, (PgWin *)&v2->vfptr, 0, 0);
  v50 = *(_DWORD *)LODWORD(pkTextWinp->m_kWorldBound.m_kCenter.x);
  pkTextWinq = *(PgWinText **)(v50 + 24);
  v51 = *(_DWORD *)(v50 + 20);
  v52 = Font::Get(0);
  v53 = PgWinText::CreateWin(uiLeft - v10, uiTop + 2, v51, (unsigned int)pkTextWinq, v52, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkWedding = v53;
  v53->vfptr[122].__vecDelDtor((NiRefObject *)v53, 5u);
  ((void (__stdcall *)(D3DXCOLOR *))v2->m_pkWedding->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  ((void (__stdcall *)(_DWORD))v2->m_pkWedding->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(void *))v2->m_pkWedding->vfptr[118].__vecDelDtor)(&unk_9C2E97);
  v54 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text05", &uiLeft, &uiTop, v3)->m_akHitTester.m_pBase;
  pkTextWinr = (PgWinText *)v54->m_pObject->m_uiHeight;
  v55 = v54->m_pObject->m_uiWidth;
  v56 = Font::Get(0);
  v57 = PgWinText::CreateWin(uiLeft - v10, uiTop, v55, (unsigned int)pkTextWinr, v56, (PgWin *)&v2->vfptr, 0, 0);
  v57->vfptr[122].__vecDelDtor((NiRefObject *)v57, 5u);
  v57->vfptr[117].__vecDelDtor((NiRefObject *)v57, (unsigned int)&Color::m_kDxWhiteColor);
  pkTextWins = (PgWinText *)v57->vfptr;
  v58 = TextData::Get(0x759FEBE9u);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkTextWins[1].m_kChildren.m_pBase)(v57, v58);
  v57->vfptr[60].__vecDelDtor((NiRefObject *)v57, 0);
  v59 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Nor", &uiLeft, &uiTop, v3);
  PgSprData::Add(v59, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
  PgSprData::Add(v59, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
  v60 = PgWinBut::CreateWin(uiLeft, uiTop, v59, (PgWin *)&v2->vfptr, 0, 0, 0);
  v61 = v60;
  v62 = (PgWin *)v60;
  v63 = Font::Get(0);
  v64 = ((int (__thiscall *)(PgWinBut *))v61->vfptr[37].__vecDelDtor)(v61);
  v65 = ((int (__thiscall *)(PgWinBut *))v61->vfptr[36].__vecDelDtor)(v61);
  v66 = PgWinText::CreateWin(0, 1, v65, v64, v63, v62, 0, 0);
  v66->vfptr[122].__vecDelDtor((NiRefObject *)v66, 5u);
  pkTextWint = (PgWinText *)v66->vfptr;
  v67 = TextData::Get(0xE71DE12C);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkTextWint[1].m_kChildren.m_pBase)(v66, v67);
  v66->vfptr[60].__vecDelDtor((NiRefObject *)v66, 0);
  v68 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Nor", &uiLeft, &uiTop, v3);
  PgSprData::Add(v68, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Click");
  PgSprData::Add(v68, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Over");
  v69 = PgWinBut::CreateWin(uiLeft, uiTop, v68, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v70 = v69;
  v71 = (PgWin *)v69;
  v72 = Font::Get(0);
  v73 = ((int (__thiscall *)(PgWinBut *))v70->vfptr[37].__vecDelDtor)(v70);
  v74 = ((int (__thiscall *)(PgWinBut *))v70->vfptr[36].__vecDelDtor)(v70);
  v75 = PgWinText::CreateWin(0, 1, v74, v73, v72, v71, 0, 0);
  v75->vfptr[122].__vecDelDtor((NiRefObject *)v75, 5u);
  v76 = v75->vfptr;
  v77 = TextData::Get(0xDF01DB26);
  v76[118].__vecDelDtor((NiRefObject *)v75, (unsigned int)v77);
  v75->vfptr[60].__vecDelDtor((NiRefObject *)v75, 0);
  ((void (__thiscall *)(WeddingEntryWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  v84 = -1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006DFC70) --------------------------------------------------------
void __thiscall WeddingEntryWin::SetWeddingEntryData(WeddingEntryWin *this, PROTO_NC_ACT_WEDDING_HALL_GUEST_ENTER_READY_ACK *pkProto)
{
  WeddingEntryWin *v2; // edi@1
  unsigned int v3; // eax@1
  unsigned int v4; // edx@1
  unsigned int v5; // ecx@1
  unsigned int v6; // eax@1
  PgWinText *v7; // ecx@1
  unsigned int v8; // eax@1
  unsigned int v9; // edx@1
  unsigned int v10; // ecx@1
  unsigned int v11; // eax@1
  PgWinText *v12; // ecx@1
  NiUnsharedGeometryGroup *v13; // eax@2
  NiUnsharedGeometryGroup *v14; // eax@4
  char acWeddingStart[32]; // [sp+8h] [bp-5Ch]@4
  char acEnterTime[32]; // [sp+28h] [bp-3Ch]@2
  char acname[21]; // [sp+48h] [bp-1Ch]@1

  v2 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkBridegroom->vfptr[118].__vecDelDtor)(&unk_9C2E9E);
  ((void (__stdcall *)(_DWORD))v2->m_pkBride->vfptr[118].__vecDelDtor)(&unk_9C2E9F);
  ((void (__stdcall *)(_DWORD))v2->m_pkCongratulator->vfptr[118].__vecDelDtor)(&unk_9C2EA6);
  ((void (__stdcall *)(_DWORD))v2->m_pkWedding->vfptr[118].__vecDelDtor)(&unk_9C2EA7);
  v3 = pkProto->GroomID.n5_code[0];
  v4 = pkProto->GroomID.n5_code[2];
  *(_DWORD *)&acname[4] = pkProto->GroomID.n5_code[1];
  v5 = pkProto->GroomID.n5_code[4];
  *(_DWORD *)acname = v3;
  v6 = pkProto->GroomID.n5_code[3];
  *(_DWORD *)&acname[16] = v5;
  v7 = v2->m_pkBridegroom;
  *(_DWORD *)&acname[8] = v4;
  *(_DWORD *)&acname[12] = v6;
  acname[20] = 0;
  ((void (__stdcall *)(_DWORD))v7->vfptr[118].__vecDelDtor)(acname);
  v8 = pkProto->BrideID.n5_code[0];
  v9 = pkProto->BrideID.n5_code[2];
  *(_DWORD *)&acname[4] = pkProto->BrideID.n5_code[1];
  v10 = pkProto->BrideID.n5_code[4];
  *(_DWORD *)acname = v8;
  v11 = pkProto->BrideID.n5_code[3];
  *(_DWORD *)&acname[16] = v10;
  v12 = v2->m_pkBride;
  *(_DWORD *)&acname[8] = v9;
  *(_DWORD *)&acname[12] = v11;
  acname[20] = 0;
  ((void (__stdcall *)(_DWORD))v12->vfptr[118].__vecDelDtor)(acname);
  if ( pkProto != (PROTO_NC_ACT_WEDDING_HALL_GUEST_ENTER_READY_ACK *)-66 )
  {
    v13 = TextData2::Get(0xD8DB2709);
    strftime(acEnterTime, 0x1Fu, (const char *)v13, &pkProto->tm_EnterStart);
  }
  ((void (__stdcall *)(_DWORD))v2->m_pkCongratulator->vfptr[118].__vecDelDtor)(acEnterTime);
  if ( pkProto != (PROTO_NC_ACT_WEDDING_HALL_GUEST_ENTER_READY_ACK *)-102 )
  {
    v14 = TextData2::Get(0xD8DB2709);
    strftime(acWeddingStart, 0x1Fu, (const char *)v14, &pkProto->tm_WeddingStart);
  }
  ((void (__stdcall *)(_DWORD))v2->m_pkWedding->vfptr[118].__vecDelDtor)(acWeddingStart);
}

//----- (006DFDD0) --------------------------------------------------------
WeddingEntryWin *__cdecl WeddingEntryWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  WeddingEntryWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x168u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&WeddingEntryWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&WeddingEntryWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][1]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (WeddingEntryWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9C2F94: using guessed type void (__thiscall *WeddingEntryWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C2FB4: using guessed type int (__thiscall *WeddingEntryWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006DFF30) --------------------------------------------------------
WeddingEntryWin *__thiscall WeddingEntryWin::`scalar deleting destructor'(WeddingEntryWin *this, unsigned int a2)
{
  WeddingEntryWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&WeddingEntryWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&WeddingEntryWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C2F94: using guessed type void (__thiscall *WeddingEntryWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C2FB4: using guessed type int (__thiscall *WeddingEntryWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006DFF70) --------------------------------------------------------
void __thiscall WeddingInfoWin::WeddingInfoWin(WeddingInfoWin *this)
{
  WeddingInfoWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&WeddingInfoWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&WeddingInfoWin::`vftable'{for `IDirectMessenger'};
  CNSTimer_Interval::CNSTimer_Interval(&v1->m_kTimerInterval);
  v1->m_pkName = 0;
  v1->m_pkLevel = 0;
  v1->m_pkLogState = 0;
  v1->m_pkInArea = 0;
  v1->m_pkWeddingState = 0;
  v1->m_pkWeddingAnniversary = 0;
}
// 9C3440: using guessed type void (__thiscall *WeddingInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C345C: using guessed type int (__thiscall *WeddingInfoWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006E0000) --------------------------------------------------------
void __thiscall WeddingInfoWin::~WeddingInfoWin(WeddingInfoWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&WeddingInfoWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&WeddingInfoWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9C3440: using guessed type void (__thiscall *WeddingInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C345C: using guessed type int (__thiscall *WeddingInfoWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006E0020) --------------------------------------------------------
void WeddingInfoWin::OnShowWin()
{
  CLIENT_MARRYINFO *v1; // eax@1

  v1 = WeddingTask::GetMarryInfo();
  if ( v1 )
  {
    if ( v1->MarryStatus )
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 4u, 0x93u, 0, 0);
  }
}

//----- (006E0050) --------------------------------------------------------
void WeddingInfoWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "WeddingInfo");
}

//----- (006E0080) --------------------------------------------------------
void __thiscall WeddingInfoWin::OnChangeTab(WeddingInfoWin *this, DirectUserMsgBody_CommunityTabChanged::TabEnum eTab)
{
  char *v2; // esi@1

  v2 = (char *)&this->vfptr;
  if ( this->m_pkMsgHooker )
  {
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))this->m_pkMsgHooker->vfptr->SendDirectMessage)(40, &eTab, v2);
    if ( *((_DWORD *)v2 + 1) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v2 + 1) + 20))(40, &eTab, v2);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v2 + 20))(v2, 40, &eTab, v2);
}

//----- (006E00E0) --------------------------------------------------------
void __thiscall WeddingInfoWin::UpdateMeWin(WeddingInfoWin *this, float fCurTime)
{
  WeddingInfoWin *v2; // esi@1
  CLIENT_MARRYINFO *v3; // eax@1

  v2 = this;
  v3 = WeddingTask::GetMarryInfo();
  if ( v3 && v3->MarryStatus && !(v2->m_uFlags & 1) )
  {
    if ( CNSTimer_Interval::IsRun_GetCount(&v2->m_kTimerInterval, fCurTime) )
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 4u, 0x93u, 0, 0);
  }
}

//----- (006E0130) --------------------------------------------------------
void __thiscall WeddingInfoWin::OnWinClose(WeddingInfoWin *this)
{
  WeddingInfoWin *v1; // esi@1

  v1 = this;
  if ( this == (WeddingInfoWin *)g_pkToolTipWin->m_pkToolTipParentWin )
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
  GameFrameWork::CloseCommunityWin((GameFrameWork *)v1->m_pkFrameWork);
}

//----- (006E0160) --------------------------------------------------------
void __thiscall WeddingInfoWin::DeleteWedInfo(WeddingInfoWin *this, Name5 *PartnerName)
{
  WeddingInfoWin *v2; // esi@1
  CLIENT_MARRYINFO *v3; // eax@1

  v2 = this;
  v3 = WeddingTask::GetMarryInfo();
  if ( v3
    && v3->WifeName.n5_code[0] == PartnerName->n5_code[0]
    && v3->WifeName.n5_code[1] == PartnerName->n5_code[1]
    && v3->WifeName.n5_code[2] == PartnerName->n5_code[2]
    && v3->WifeName.n5_code[3] == PartnerName->n5_code[3]
    && v3->WifeName.n5_code[4] == PartnerName->n5_code[4] )
  {
    v3->MarryStatus = 0;
    v3->MarryDate = 0;
    v3->WifeName.n5_code[0] = 0;
    v3->WifeName.n5_code[1] = 0;
    v3->WifeName.n5_code[2] = 0;
    v3->WifeName.n5_code[3] = 0;
    v3->WifeName.n5_code[4] = 0;
    v3->WifeRegistNumber = -1;
    ((void (__stdcall *)(_DWORD))v2->m_pkName->vfptr[118].__vecDelDtor)(&unk_9C326A);
    ((void (__stdcall *)(_DWORD))v2->m_pkLevel->vfptr[118].__vecDelDtor)(&unk_9C326B);
    ((void (__stdcall *)(_DWORD))v2->m_pkLogState->vfptr[118].__vecDelDtor)(&unk_9C3279);
    ((void (__stdcall *)(_DWORD))v2->m_pkInArea->vfptr[118].__vecDelDtor)(&unk_9C327A);
    ((void (__stdcall *)(_DWORD))v2->m_pkWeddingState->vfptr[118].__vecDelDtor)(&unk_9C327B);
    ((void (__stdcall *)(_DWORD))v2->m_pkWeddingAnniversary->vfptr[118].__vecDelDtor)(&unk_9C3285);
  }
}

//----- (006E0260) --------------------------------------------------------
char __thiscall WeddingInfoWin::Create(WeddingInfoWin *this, PgFrameWork *pkFrameWork)
{
  WeddingInfoWin *v2; // esi@1
  NiNode *v3; // esi@2
  char result; // al@6
  NiTexturePalette *v5; // edi@7
  const char *v6; // eax@9
  PgSprData *v7; // eax@10
  int v8; // edi@11
  int v9; // ebx@11
  NiSourceTexture *v10; // eax@11
  PgSprData *v11; // eax@12
  PgSprData *v12; // eax@14
  PgFont *v13; // eax@16
  NiUnsharedGeometryGroup *v14; // eax@16
  PgSprData *v15; // eax@18
  PgFont *v16; // eax@18
  NiUnsharedGeometryGroup *v17; // eax@18
  PgFont *v18; // eax@18
  NiUnsharedGeometryGroup *v19; // eax@18
  NiAVObject *v20; // eax@18
  NiTexturingProperty *v21; // eax@18
  PgSprData *v22; // eax@20
  char *v23; // eax@20
  char *v24; // eax@20
  char *v25; // eax@20
  char *v26; // eax@20
  char *v27; // eax@20
  char *v28; // eax@20
  PgSprData::PgHitTester *v29; // eax@20
  PgFont *v30; // eax@20
  NiUnsharedGeometryGroup *v31; // STB8_4@20
  PgSprData::PgHitTester *v32; // eax@20
  PgFont *v33; // eax@20
  NiUnsharedGeometryGroup *v34; // eax@20
  PgSprData::PgHitTester *v35; // eax@20
  PgFont *v36; // eax@20
  NiUnsharedGeometryGroup *v37; // eax@20
  PgSprData::PgHitTester *v38; // eax@20
  PgFont *v39; // eax@20
  NiUnsharedGeometryGroup *v40; // eax@20
  PgSprData::PgHitTester *v41; // eax@20
  PgFont *v42; // eax@20
  NiUnsharedGeometryGroup *v43; // eax@20
  PgSprData::PgHitTester *v44; // eax@20
  PgFont *v45; // eax@20
  NiUnsharedGeometryGroup *v46; // eax@20
  PgSprData::PgHitTester *v47; // eax@20
  PgFont *v48; // eax@20
  NiTexturingProperty **v49; // eax@20
  NiUnsharedGeometryGroup *v50; // eax@20
  int v51; // eax@20
  NiTexturingProperty *v52; // edx@20
  unsigned int v53; // eax@20
  PgWin *v54; // STA8_4@20
  PgFont *v55; // eax@20
  float v56; // ecx@20
  unsigned int v57; // eax@20
  PgFont *v58; // eax@20
  PgWinText *v59; // eax@20
  int v60; // eax@20
  unsigned int v61; // edx@20
  PgFont *v62; // eax@20
  PgWinText *v63; // eax@20
  int v64; // eax@20
  PgFont *v65; // eax@20
  PgWinText *v66; // eax@20
  NiPointer<PgSprData::PgHitTester> *v67; // ecx@20
  PgFont *v68; // eax@20
  NiTexturingProperty **v69; // eax@20
  NiUnsharedGeometryGroup *v70; // eax@20
  int v71; // eax@20
  PgFont *v72; // eax@20
  PgWinText *v73; // eax@20
  NiPointer<PgSprData::PgHitTester> *v74; // ecx@20
  PgFont *v75; // eax@20
  NiTexturingProperty **v76; // eax@20
  NiUnsharedGeometryGroup *v77; // eax@20
  int v78; // eax@20
  PgFont *v79; // eax@20
  PgWinText *v80; // eax@20
  NiPointer<NiTexturingProperty> spTexProp; // [sp+D0h] [bp-28h]@18
  unsigned int v82; // [sp+D4h] [bp-24h]@16
  unsigned int uiWidth; // [sp+D8h] [bp-20h]@14
  unsigned int uiHeight; // [sp+DCh] [bp-1Ch]@14
  NiPointer<NiNode> spNode; // [sp+E0h] [bp-18h]@1
  int uiLeft; // [sp+E4h] [bp-14h]@10
  int uiTop; // [sp+E8h] [bp-10h]@10
  int v88; // [sp+F4h] [bp-4h]@1
  unsigned int *pkBut; // [sp+100h] [bp+8h]@16
  PgSprData *pkButa; // [sp+100h] [bp+8h]@16
  PgSprData *pkButb; // [sp+100h] [bp+8h]@17
  unsigned int *pkButc; // [sp+100h] [bp+8h]@18
  unsigned int *pkButd; // [sp+100h] [bp+8h]@18
  PgSprData *pkBute; // [sp+100h] [bp+8h]@20
  PgWinBut *pkButf; // [sp+100h] [bp+8h]@20
  PgSprData *pkButg; // [sp+100h] [bp+8h]@20
  PgWinBut *pkButh; // [sp+100h] [bp+8h]@20
  PgSprData *pkButi; // [sp+100h] [bp+8h]@20
  PgWinBut *pkButj; // [sp+100h] [bp+8h]@20
  PgSprData *pkButk; // [sp+100h] [bp+8h]@20
  PgWinBut *pkButl; // [sp+100h] [bp+8h]@20
  PgSprData *pkButm; // [sp+100h] [bp+8h]@20
  PgWinBut *pkButn; // [sp+100h] [bp+8h]@20
  PgSprData *pkButo; // [sp+100h] [bp+8h]@20
  PgWinBut *pkButp; // [sp+100h] [bp+8h]@20
  PgWinBut *pkButq; // [sp+100h] [bp+8h]@20
  unsigned int *pkButr; // [sp+100h] [bp+8h]@20
  PgWinBut *pkButs; // [sp+100h] [bp+8h]@20
  unsigned int *pkButt; // [sp+100h] [bp+8h]@20
  PgWinBut *pkButu; // [sp+100h] [bp+8h]@20
  unsigned int *pkButv; // [sp+100h] [bp+8h]@20
  PgWinBut *pkButw; // [sp+100h] [bp+8h]@20
  unsigned int *pkButx; // [sp+100h] [bp+8h]@20
  PgWinBut *pkButy; // [sp+100h] [bp+8h]@20
  unsigned int *pkButz; // [sp+100h] [bp+8h]@20
  PgWinBut *pkButba; // [sp+100h] [bp+8h]@20
  unsigned int *pkButbb; // [sp+100h] [bp+8h]@20
  PgWinBut *pkButbc; // [sp+100h] [bp+8h]@20
  PgWinBut *pkButbd; // [sp+100h] [bp+8h]@20
  PgWinBut *pkButbe; // [sp+100h] [bp+8h]@20
  PgWinBut *pkButbf; // [sp+100h] [bp+8h]@20
  PgWinBut *pkButbg; // [sp+100h] [bp+8h]@20
  PgWinBut *pkButbh; // [sp+100h] [bp+8h]@20
  PgWinBut *pkButbi; // [sp+100h] [bp+8h]@20
  PgWinBut *pkButbj; // [sp+100h] [bp+8h]@20
  PgWinBut *pkButbk; // [sp+100h] [bp+8h]@20
  PgWinBut *pkButbl; // [sp+100h] [bp+8h]@20
  PgWinBut *pkButbm; // [sp+100h] [bp+8h]@20
  PgWinBut *pkButbn; // [sp+100h] [bp+8h]@20

  v2 = this;
  spNode.m_pObject = 0;
  v88 = 0;
  if ( !MenuTexMgr::GetTexture(4u) )
    goto LABEL_23;
  v5 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = Folder::Merge(&Folder::m_acMenu, "\\Game\\WeddingInfo.nif");
  PgUtil::LoadNodeNifFile(v6, &spNode, v5);
  if ( !spNode.m_pObject )
    return 0;
  v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v7, 0, pkFrameWork, "WeddingInfoWin", 0) )
  {
LABEL_23:
    v3 = spNode.m_pObject;
    v88 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
    return 0;
  }
  v8 = uiLeft;
  v9 = uiTop;
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v11, (PgWin *)&v2->vfptr, 0, 0);
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop, v12, (PgWin *)&v2->vfptr, 0, 0);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v13 = Font::Get(0);
    pkBut = (unsigned int *)PgWinText::CreateWin(uiLeft - v8, uiTop, uiWidth, uiHeight, v13, (PgWin *)&v2->vfptr, 0, 0);
    (*(void (__thiscall **)(unsigned int *, signed int))(*pkBut + 488))(pkBut, 1);
    (*(void (__stdcall **)(struct D3DXCOLOR *))(*pkBut + 468))(&Color::m_kDxWinTitleColor);
    v82 = *pkBut;
    v14 = TextData::Get(0xE3504941);
    (*(void (__thiscall **)(unsigned int *, NiUnsharedGeometryGroup *))(v82 + 472))(pkBut, v14);
    (*(void (__stdcall **)(_DWORD))(*pkBut + 240))(0);
    pkButa = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, 0);
    PgSprData::Add(pkButa, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
    PgSprData::Add(pkButa, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, pkButa, (PgWin *)&v2->vfptr, 0xBu, 0, 0);
    MenuTexMgr::GetTexture(4u);
    if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
    {
      pkButb = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, 0);
      PgSprData::Add(pkButb, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
      PgSprData::Add(pkButb, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
      PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, pkButb, (PgWin *)&v2->vfptr, 0x11u, 0, 0);
    }
    v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v8, uiTop, v15, (PgWin *)&v2->vfptr, 0, 0);
    PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text04", &uiLeft, &uiTop, 0);
    v16 = Font::Get(TITLEBOLD);
    pkButc = (unsigned int *)PgWinText::CreateWin(
                               uiLeft - v8,
                               uiTop - v9,
                               uiWidth,
                               uiHeight,
                               v16,
                               (PgWin *)&v2->vfptr,
                               0,
                               0);
    (*(void (__thiscall **)(unsigned int *, signed int))(*pkButc + 488))(pkButc, 5);
    v82 = *pkButc;
    v17 = TextData::Get(0xC8F53F44);
    (*(void (__thiscall **)(unsigned int *, NiUnsharedGeometryGroup *))(v82 + 472))(pkButc, v17);
    (*(void (__stdcall **)(_DWORD))(*pkButc + 240))(0);
    PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Category", &uiLeft, &uiTop, 0);
    v18 = Font::Get(TITLEBOLD);
    pkButd = (unsigned int *)PgWinText::CreateWin(
                               uiLeft - v8,
                               uiTop - v9,
                               uiWidth,
                               uiHeight,
                               v18,
                               (PgWin *)&v2->vfptr,
                               0,
                               0);
    (*(void (__thiscall **)(unsigned int *, signed int))(*pkButd + 488))(pkButd, 5);
    v82 = *pkButd;
    v19 = TextData3::Get(0x2E4A1B0Bu);
    (*(void (__thiscall **)(_DWORD, _DWORD))(v82 + 472))(pkButd, v19);
    (*(void (__stdcall **)(_DWORD))(*pkButd + 240))(0);
    v20 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Base");
    v21 = (NiTexturingProperty *)NiAVObject::GetProperty(v20, 8);
    spTexProp.m_pObject = v21;
    if ( v21 )
      InterlockedIncrement((volatile LONG *)&v21->m_uiRefCount);
    LOBYTE(v88) = 1;
    v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Base", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v22, (PgWin *)&v2->vfptr, 0, 0);
    pkBute = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "FriendNor", &uiLeft, &uiTop, 0);
    PgSprData::Add(pkBute, (NiAVObject *)&spNode.m_pObject->vfptr, "FriendClick");
    PgSprData::Add(pkBute, (NiAVObject *)&spNode.m_pObject->vfptr, "FriendOver");
    pkButf = PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, pkBute, (PgWin *)&v2->vfptr, 0xCu, 0, 0);
    v23 = (char *)TextData::Get(0xDCF3EDF4);
    PgWin::SetToolTipWinText((PgWin *)&pkButf->vfptr, v23);
    pkButf->m_pkToolTipWin = g_pkToolTipWin;
    pkButg = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GuildNor", &uiLeft, &uiTop, 0);
    PgSprData::Add(pkButg, (NiAVObject *)&spNode.m_pObject->vfptr, "GuildClick");
    PgSprData::Add(pkButg, (NiAVObject *)&spNode.m_pObject->vfptr, "GuildOver");
    pkButh = PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, pkButg, (PgWin *)&v2->vfptr, 0xDu, 0, 0);
    v24 = (char *)TextData::Get(0x9BEAF4F4);
    PgWin::SetToolTipWinText((PgWin *)&pkButh->vfptr, v24);
    pkButh->m_pkToolTipWin = g_pkToolTipWin;
    pkButi = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MasterNor", &uiLeft, &uiTop, 0);
    PgSprData::Add(pkButi, (NiAVObject *)&spNode.m_pObject->vfptr, "MasterClick");
    PgSprData::Add(pkButi, (NiAVObject *)&spNode.m_pObject->vfptr, "MasterOver");
    pkButj = PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, pkButi, (PgWin *)&v2->vfptr, 0xFu, 0, 0);
    v25 = (char *)TextData::Get(0xF44C3A3C);
    PgWin::SetToolTipWinText((PgWin *)&pkButj->vfptr, v25);
    pkButj->m_pkToolTipWin = g_pkToolTipWin;
    pkButk = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "WeddingNor", &uiLeft, &uiTop, 0);
    PgSprData::Add(pkButk, (NiAVObject *)&spNode.m_pObject->vfptr, "WeddingClick");
    PgSprData::Add(pkButk, (NiAVObject *)&spNode.m_pObject->vfptr, "WeddingOver");
    pkButl = PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, pkButk, (PgWin *)&v2->vfptr, 0xAu, 0, 0);
    v26 = (char *)TextData::Get(0xC8F53F44);
    PgWin::SetToolTipWinText((PgWin *)&pkButl->vfptr, v26);
    pkButl->m_pkToolTipWin = g_pkToolTipWin;
    pkButm = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PartyMatchNor", &uiLeft, &uiTop, 0);
    PgSprData::Add(pkButm, (NiAVObject *)&spNode.m_pObject->vfptr, "PartyMatchClick");
    PgSprData::Add(pkButm, (NiAVObject *)&spNode.m_pObject->vfptr, "PartyMatchOver");
    pkButn = PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, pkButm, (PgWin *)&v2->vfptr, 0xEu, 0, 0);
    v27 = (char *)TextData::Get(0x1C4B503Eu);
    PgWin::SetToolTipWinText((PgWin *)&pkButn->vfptr, v27);
    pkButn->m_pkToolTipWin = g_pkToolTipWin;
    pkButo = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GuildAcademyNor", &uiLeft, &uiTop, 0);
    PgSprData::Add(pkButo, (NiAVObject *)&spNode.m_pObject->vfptr, "GuildAcademyClick");
    PgSprData::Add(pkButo, (NiAVObject *)&spNode.m_pObject->vfptr, "GuildAcademyOver");
    pkButp = PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, pkButo, (PgWin *)&v2->vfptr, 0x10u, 0, 0);
    v28 = (char *)TextData::Get(0x253B184Cu);
    PgWin::SetToolTipWinText((PgWin *)&pkButp->vfptr, v28);
    pkButp->m_pkToolTipWin = g_pkToolTipWin;
    v29 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Friend", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
    pkButq = (PgWinBut *)v29->m_uiHeight;
    v82 = v29->m_uiWidth;
    v30 = Font::Get(TITLEBOLD);
    pkButr = (unsigned int *)PgWinText::CreateWin(
                               uiLeft,
                               uiTop,
                               v82,
                               (unsigned int)pkButq,
                               v30,
                               (PgWin *)&v2->vfptr,
                               0,
                               0);
    (*(void (__thiscall **)(unsigned int *))(*pkButr + 488))(pkButr);
    v82 = *pkButr;
    v31 = TextData::Get(0xDCF3EDF4);
    (*(void (__thiscall **)(unsigned int *))(v82 + 472))(pkButr);
    (*(void (__cdecl **)(_DWORD, NiUnsharedGeometryGroup *, signed int))(*pkButr + 240))(0, v31, 1);
    v32 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HolyPromise", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
    pkButs = (PgWinBut *)v32->m_uiHeight;
    v82 = v32->m_uiWidth;
    v33 = Font::Get(TITLEBOLD);
    pkButt = (unsigned int *)PgWinText::CreateWin(
                               uiLeft,
                               uiTop,
                               v82,
                               (unsigned int)pkButs,
                               v33,
                               (PgWin *)&v2->vfptr,
                               0,
                               0);
    (*(void (__thiscall **)(unsigned int *))(*pkButt + 488))(pkButt);
    v82 = *pkButt;
    v34 = TextData::Get(0xF44C3A3C);
    (*(void (__thiscall **)(_DWORD, _DWORD))(v82 + 472))(pkButt, v34);
    (*(void (__stdcall **)(_DWORD))(*pkButt + 240))(0);
    v35 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Guild", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
    pkButu = (PgWinBut *)v35->m_uiHeight;
    v82 = v35->m_uiWidth;
    v36 = Font::Get(TITLEBOLD);
    pkButv = (unsigned int *)PgWinText::CreateWin(
                               uiLeft,
                               uiTop,
                               v82,
                               (unsigned int)pkButu,
                               v36,
                               (PgWin *)&v2->vfptr,
                               0,
                               0);
    (*(void (__thiscall **)(unsigned int *, signed int))(*pkButv + 488))(pkButv, 1);
    v82 = *pkButv;
    v37 = TextData::Get(0x9BEAF4F4);
    (*(void (__thiscall **)(_DWORD, _DWORD))(v82 + 472))(pkButv, v37);
    (*(void (__stdcall **)(_DWORD))(*pkButv + 240))(0);
    v38 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GuildAcademy", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
    pkButw = (PgWinBut *)v38->m_uiHeight;
    v82 = v38->m_uiWidth;
    v39 = Font::Get(TITLEBOLD);
    pkButx = (unsigned int *)PgWinText::CreateWin(
                               uiLeft,
                               uiTop,
                               v82,
                               (unsigned int)pkButw,
                               v39,
                               (PgWin *)&v2->vfptr,
                               0,
                               0);
    (*(void (__thiscall **)(unsigned int *, signed int))(*pkButx + 488))(pkButx, 1);
    v82 = *pkButx;
    v40 = TextData::Get(0x253B184Cu);
    (*(void (__thiscall **)(_DWORD, _DWORD))(v82 + 472))(pkButx, v40);
    (*(void (__stdcall **)(_DWORD))(*pkButx + 240))(0);
    v41 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Wedding", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
    pkButy = (PgWinBut *)v41->m_uiHeight;
    v82 = v41->m_uiWidth;
    v42 = Font::Get(TITLEBOLD);
    pkButz = (unsigned int *)PgWinText::CreateWin(
                               uiLeft,
                               uiTop,
                               v82,
                               (unsigned int)pkButy,
                               v42,
                               (PgWin *)&v2->vfptr,
                               0,
                               0);
    (*(void (__thiscall **)(unsigned int *, signed int))(*pkButz + 488))(pkButz, 1);
    v82 = *pkButz;
    v43 = TextData::Get(0xC8F53F44);
    (*(void (__thiscall **)(_DWORD, _DWORD))(v82 + 472))(pkButz, v43);
    (*(void (__stdcall **)(_DWORD))(*pkButz + 240))(0);
    v44 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PartyMatch", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
    pkButba = (PgWinBut *)v44->m_uiHeight;
    v82 = v44->m_uiWidth;
    v45 = Font::Get(TITLEBOLD);
    pkButbb = (unsigned int *)PgWinText::CreateWin(
                                uiLeft,
                                uiTop,
                                v82,
                                (unsigned int)pkButba,
                                v45,
                                (PgWin *)&v2->vfptr,
                                0,
                                0);
    (*(void (__thiscall **)(unsigned int *, signed int))(*pkButbb + 488))(pkButbb, 1);
    v82 = *pkButbb;
    v46 = TextData::Get(0x1C4B503Eu);
    (*(void (__thiscall **)(_DWORD, _DWORD))(v82 + 472))(pkButbb, v46);
    (*(void (__stdcall **)(_DWORD))(*pkButbb + 240))(0);
    LOBYTE(v88) = 0;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
    v47 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
    pkButbc = (PgWinBut *)v47->m_uiHeight;
    spTexProp.m_pObject = (NiTexturingProperty *)v47->m_uiWidth;
    v48 = Font::Get(0);
    v49 = (NiTexturingProperty **)PgWinText::CreateWin(
                                    uiLeft - v8,
                                    uiTop - v9 + 1,
                                    (unsigned int)spTexProp.m_pObject,
                                    (unsigned int)pkButbc,
                                    v48,
                                    (PgWin *)&v2->vfptr,
                                    0,
                                    0);
    pkButbd = (PgWinBut *)v49;
    spTexProp.m_pObject = *v49;
    v50 = TextData::Get(0x3EC0776Du);
    ((void (__thiscall *)(PgWinBut *, NiUnsharedGeometryGroup *))spTexProp.m_pObject[6].m_pkShaderMaps)(pkButbd, v50);
    ((void (__stdcall *)(_DWORD))pkButbd->vfptr[60].__vecDelDtor)(0);
    pkButbe = (PgWinBut *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text01_Field", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v8, uiTop, (PgSprData *)pkButbe, (PgWin *)&v2->vfptr, 0, 0);
    v51 = *(_DWORD *)LODWORD(pkButbe->m_kWorldBound.m_kCenter.x);
    v52 = *(NiTexturingProperty **)(v51 + 24);
    v53 = *(_DWORD *)(v51 + 20);
    v54 = g_pkToolTipWin;
    spTexProp.m_pObject = v52;
    v82 = v53;
    v55 = Font::Get(0);
    v2->m_pkName = PgWinAbbreviateText::CreateWin(
                     uiLeft - v8 + 5,
                     uiTop - v9 + 5,
                     v82,
                     (unsigned int)spTexProp.m_pObject,
                     v55,
                     (PgWin *)&v2->vfptr,
                     0,
                     0,
                     0,
                     1,
                     v54,
                     0x1Eu);
    v56 = pkButbe->m_kWorldBound.m_kCenter.x;
    v57 = *(_DWORD *)(*(_DWORD *)LODWORD(v56) + 20);
    spTexProp.m_pObject = *(NiTexturingProperty **)(*(_DWORD *)LODWORD(v56) + 24);
    v82 = v57;
    v58 = Font::Get(0);
    v59 = PgWinText::CreateWin(
            uiLeft - v8 + 5,
            uiTop - v9 + 22,
            v82,
            (unsigned int)spTexProp.m_pObject,
            v58,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v2->m_pkLevel = v59;
    v59->vfptr[60].__vecDelDtor((NiRefObject *)v59, 0);
    v60 = *(_DWORD *)LODWORD(pkButbe->m_kWorldBound.m_kCenter.x);
    v61 = *(_DWORD *)(v60 + 20);
    spTexProp.m_pObject = *(NiTexturingProperty **)(v60 + 24);
    v82 = v61;
    v62 = Font::Get(0);
    v63 = PgWinText::CreateWin(
            uiLeft - v8 + 5,
            uiTop - v9 + 35,
            v82,
            (unsigned int)spTexProp.m_pObject,
            v62,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v2->m_pkLogState = v63;
    v63->vfptr[60].__vecDelDtor((NiRefObject *)v63, 0);
    v64 = *(_DWORD *)LODWORD(pkButbe->m_kWorldBound.m_kCenter.x);
    pkButbf = *(PgWinBut **)(v64 + 24);
    spTexProp.m_pObject = *(NiTexturingProperty **)(v64 + 20);
    v65 = Font::Get(0);
    v66 = PgWinText::CreateWin(
            uiLeft - v8 + 5,
            uiTop - v9 + 47,
            (unsigned int)spTexProp.m_pObject,
            (unsigned int)pkButbf,
            v65,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v2->m_pkInArea = v66;
    v66->vfptr[60].__vecDelDtor((NiRefObject *)v66, 0);
    v67 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text02", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
    pkButbg = (PgWinBut *)v67->m_pObject->m_uiHeight;
    spTexProp.m_pObject = (NiTexturingProperty *)v67->m_pObject->m_uiWidth;
    v68 = Font::Get(0);
    v69 = (NiTexturingProperty **)PgWinText::CreateWin(
                                    uiLeft - v8,
                                    uiTop - v9 + 1,
                                    (unsigned int)spTexProp.m_pObject,
                                    (unsigned int)pkButbg,
                                    v68,
                                    (PgWin *)&v2->vfptr,
                                    0,
                                    0);
    pkButbh = (PgWinBut *)v69;
    spTexProp.m_pObject = *v69;
    v70 = TextData::Get(0xD912252F);
    ((void (__thiscall *)(PgWinBut *, NiUnsharedGeometryGroup *))spTexProp.m_pObject[6].m_pkShaderMaps)(pkButbh, v70);
    ((void (__stdcall *)(_DWORD))pkButbh->vfptr[60].__vecDelDtor)(0);
    pkButbi = (PgWinBut *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text02_Field", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v8, uiTop, (PgSprData *)pkButbi, (PgWin *)&v2->vfptr, 0, 0);
    v71 = *(_DWORD *)LODWORD(pkButbi->m_kWorldBound.m_kCenter.x);
    pkButbj = *(PgWinBut **)(v71 + 24);
    spTexProp.m_pObject = *(NiTexturingProperty **)(v71 + 20);
    v72 = Font::Get(0);
    v73 = PgWinText::CreateWin(
            uiLeft - v8,
            uiTop - v9 + 1,
            (unsigned int)spTexProp.m_pObject,
            (unsigned int)pkButbj,
            v72,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v2->m_pkWeddingState = v73;
    v73->vfptr[122].__vecDelDtor((NiRefObject *)v73, 5u);
    ((void (__stdcall *)(_DWORD))v2->m_pkWeddingState->vfptr[60].__vecDelDtor)(0);
    v74 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text03", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
    pkButbk = (PgWinBut *)v74->m_pObject->m_uiHeight;
    spTexProp.m_pObject = (NiTexturingProperty *)v74->m_pObject->m_uiWidth;
    v75 = Font::Get(0);
    v76 = (NiTexturingProperty **)PgWinText::CreateWin(
                                    uiLeft - v8,
                                    uiTop - v9 + 1,
                                    (unsigned int)spTexProp.m_pObject,
                                    (unsigned int)pkButbk,
                                    v75,
                                    (PgWin *)&v2->vfptr,
                                    0,
                                    0);
    pkButbl = (PgWinBut *)v76;
    spTexProp.m_pObject = *v76;
    v77 = TextData::Get(0x2F5A867Eu);
    ((void (__thiscall *)(_DWORD, _DWORD))spTexProp.m_pObject[6].m_pkShaderMaps)(pkButbl, v77);
    ((void (__stdcall *)(_DWORD))pkButbl->vfptr[60].__vecDelDtor)(0);
    pkButbm = (PgWinBut *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text03_Field", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v8, uiTop, (PgSprData *)pkButbm, (PgWin *)&v2->vfptr, 0, 0);
    v78 = *(_DWORD *)LODWORD(pkButbm->m_kWorldBound.m_kCenter.x);
    pkButbn = *(PgWinBut **)(v78 + 24);
    spTexProp.m_pObject = *(NiTexturingProperty **)(v78 + 20);
    v79 = Font::Get(0);
    v80 = PgWinText::CreateWin(
            uiLeft - v8,
            uiTop - v9 + 1,
            (unsigned int)spTexProp.m_pObject,
            (unsigned int)pkButbn,
            v79,
            (PgWin *)&v2->vfptr,
            0,
            0);
    v2->m_pkWeddingAnniversary = v80;
    v80->vfptr[122].__vecDelDtor((NiRefObject *)v80, 5u);
    ((void (__stdcall *)(_DWORD))v2->m_pkWeddingAnniversary->vfptr[60].__vecDelDtor)(0);
    ((void (__thiscall *)(WeddingInfoWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    CNSTimer_Interval::ReSet(&v2->m_kTimerInterval, Timer::ms_fCurTime);
    v2->m_kTimerInterval.m_fCheckTime = 5.0;
    v88 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    result = 1;
  }
  else
  {
    v88 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006E12A0) --------------------------------------------------------
void __thiscall WeddingInfoWin::OnCommand(WeddingInfoWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0xBu:
      WeddingInfoWin::OnWinClose(this);
      break;
    case 0xCu:
      WeddingInfoWin::OnChangeTab(this, 0);
      break;
    case 0xDu:
      WeddingInfoWin::OnChangeTab(this, TE_GUILD);
      break;
    case 0xEu:
      WeddingInfoWin::OnChangeTab(this, TE_PARTYMATCH);
      break;
    case 0xFu:
      WeddingInfoWin::OnChangeTab(this, TE_HOLYPROMISE);
      break;
    case 0x10u:
      WeddingInfoWin::OnChangeTab(this, TE_GUILDACADEMY);
      break;
    case 0x11u:
      WeddingInfoWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (006E1320) --------------------------------------------------------
void __thiscall WeddingInfoWin::SetWeddingInfo(WeddingInfoWin *this, PROTO_NC_CHAR_WEDDING_PARTNER_INFO_ACK *pkProto)
{
  WeddingInfoWin *v2; // esi@1
  CLIENT_MARRYINFO *v3; // eax@1
  CLIENT_MARRYINFO *v4; // edi@1
  char v5; // al@2
  unsigned int v6; // eax@5
  unsigned int v7; // edx@5
  unsigned int v8; // ecx@5
  unsigned int v9; // eax@5
  NiRefObjectVtbl **v10; // edx@5
  NiRefObjectVtbl *v11; // ST1C_4@5
  char *v12; // eax@5
  char *v13; // eax@5
  int v14; // ST0C_4@5
  NiRefObjectVtbl *v15; // ST1C_4@5
  char *v16; // eax@5
  char *v17; // eax@5
  NiRefObjectVtbl *v18; // ST1C_4@5
  NiUnsharedGeometryGroup *v19; // eax@5
  unsigned int v20; // eax@5
  int v21; // ecx@5
  NiUnsharedGeometryGroup *v22; // eax@5
  NiRefObjectVtbl *v23; // edi@6
  NiUnsharedGeometryGroup *v24; // ST0C_4@6
  char *v25; // eax@6
  char *v26; // eax@6
  MapInfo *v27; // eax@6
  NiRefObjectVtbl *v28; // edi@7
  int v29; // ST0C_4@7
  char *v30; // eax@7
  char *v31; // eax@7
  unsigned int v32; // eax@8
  NiUnsharedGeometryGroup *v33; // eax@8
  NiRefObjectVtbl *v34; // edi@8
  char *v35; // eax@8
  char *v36; // eax@8
  PgWinText *v37; // ecx@8
  NiRefObjectVtbl *v38; // edi@13
  NiUnsharedGeometryGroup *v39; // eax@13
  void *v40; // [sp-4h] [bp-F8h]@3
  unsigned int v41; // [sp-4h] [bp-F8h]@10
  tm pkJoinTime; // [sp+10h] [bp-E4h]@8
  tm pkWeddingAnniversary; // [sp+34h] [bp-C0h]@5
  char acWeddingAnniversary[64]; // [sp+58h] [bp-9Ch]@5
  char acTime[64]; // [sp+98h] [bp-5Ch]@8
  char acName[21]; // [sp+D8h] [bp-1Ch]@5

  v2 = this;
  v3 = WeddingTask::GetMarryInfo();
  v4 = v3;
  if ( !v3 )
    return;
  v5 = v3->MarryStatus;
  if ( !v4->MarryStatus )
  {
    ((void (__stdcall *)(void *))v2->m_pkName->vfptr[118].__vecDelDtor)(&unk_9C31EA);
    ((void (__stdcall *)(void *))v2->m_pkLevel->vfptr[118].__vecDelDtor)(&unk_9C31EB);
    ((void (__stdcall *)(void *))v2->m_pkLogState->vfptr[118].__vecDelDtor)(&unk_9C31F2);
    ((void (__stdcall *)(void *))v2->m_pkInArea->vfptr[118].__vecDelDtor)(&unk_9C31F3);
    ((void (__stdcall *)(void *))v2->m_pkWeddingState->vfptr[118].__vecDelDtor)(&unk_9C3203);
    v40 = &unk_9C320A;
LABEL_15:
    v37 = v2->m_pkWeddingAnniversary;
    goto LABEL_16;
  }
  if ( v5 != 2 )
  {
    ((void (__stdcall *)(void *))v2->m_pkName->vfptr[118].__vecDelDtor)(&unk_9C3212);
    ((void (__stdcall *)(void *))v2->m_pkLevel->vfptr[118].__vecDelDtor)(&unk_9C3213);
    ((void (__stdcall *)(void *))v2->m_pkLogState->vfptr[118].__vecDelDtor)(&unk_9C321A);
    ((void (__stdcall *)(void *))v2->m_pkInArea->vfptr[118].__vecDelDtor)(&unk_9C321B);
    if ( v4->MarryStatus == 1 )
    {
      v41 = -166846146;
    }
    else
    {
      if ( v4->MarryStatus != 3 )
      {
LABEL_14:
        v40 = &unk_9C3225;
        goto LABEL_15;
      }
      v41 = -317904859;
    }
    v38 = v2->m_pkWeddingState->vfptr;
    v39 = TextData::Get(v41);
    v38[118].__vecDelDtor((NiRefObject *)v2->m_pkWeddingState, (unsigned int)v39);
    goto LABEL_14;
  }
  v6 = v4->WifeName.n5_code[0];
  v7 = v4->WifeName.n5_code[2];
  *(_DWORD *)&acName[4] = v4->WifeName.n5_code[1];
  v8 = v4->WifeName.n5_code[4];
  *(_DWORD *)acName = v6;
  v9 = v4->WifeName.n5_code[3];
  *(_DWORD *)&acName[16] = v8;
  *(_DWORD *)&acName[8] = v7;
  v10 = &v2->m_pkName->vfptr;
  *(_DWORD *)&acName[12] = v9;
  acName[20] = 0;
  v11 = *v10;
  v12 = (char *)TextData::Get(0xA503DADA);
  v13 = fs(v12, acName);
  v11[118].__vecDelDtor((NiRefObject *)v2->m_pkName, (unsigned int)v13);
  v14 = pkProto->PartnerInfo.Level;
  v15 = v2->m_pkLevel->vfptr;
  v16 = (char *)TextData::Get(0xEF03E3DE);
  v17 = fs(v16, v14);
  v15[118].__vecDelDtor((NiRefObject *)v2->m_pkLevel, (unsigned int)v17);
  v18 = v2->m_pkWeddingState->vfptr;
  v19 = TextData::Get(0xFD10DFDA);
  v18[118].__vecDelDtor((NiRefObject *)v2->m_pkWeddingState, (unsigned int)v19);
  pkWeddingAnniversary.tm_min = 0;
  pkWeddingAnniversary.tm_hour = 0;
  pkWeddingAnniversary.tm_mday = 0;
  pkWeddingAnniversary.tm_year = 0;
  pkWeddingAnniversary.tm_sec = 0;
  pkWeddingAnniversary.tm_mon = 0;
  pkWeddingAnniversary.tm_wday = 0;
  pkWeddingAnniversary.tm_yday = 0;
  pkWeddingAnniversary.tm_isdst = 0;
  v20 = (unsigned int)v4->MarryDate;
  v21 = (*(unsigned int *)&v4->MarryDate >> 19) & 0x3F;
  pkWeddingAnniversary.tm_year = (unsigned __int8)*(_DWORD *)&v4->MarryDate + 100;
  pkWeddingAnniversary.tm_hour = v21;
  pkWeddingAnniversary.tm_min = v20 >> 25;
  pkWeddingAnniversary.tm_mday = (v20 >> 13) & 0x3F;
  pkWeddingAnniversary.tm_mon = ((v20 >> 8) & 0x1F) - 1;
  v22 = TextData2::Get(0x49121793u);
  strftime(acWeddingAnniversary, 0x3Fu, (const char *)v22, &pkWeddingAnniversary);
  ((void (__stdcall *)(char *))v2->m_pkWeddingAnniversary->vfptr[118].__vecDelDtor)(acWeddingAnniversary);
  if ( !pkProto->PartnerInfo.Connected )
  {
    pkJoinTime.tm_min = 0;
    pkJoinTime.tm_hour = 0;
    pkJoinTime.tm_mday = 0;
    pkJoinTime.tm_mon = 0;
    pkJoinTime.tm_year = 0;
    pkJoinTime.tm_sec = 0;
    pkJoinTime.tm_wday = 0;
    pkJoinTime.tm_yday = 0;
    pkJoinTime.tm_isdst = 0;
    v32 = (unsigned int)pkProto->PartnerInfo.LastConnect;
    pkJoinTime.tm_year = (unsigned __int8)*(_DWORD *)&pkProto->PartnerInfo.LastConnect + 100;
    pkJoinTime.tm_hour = (v32 >> 19) & 0x3F;
    pkJoinTime.tm_mon = ((v32 >> 8) & 0x1F) - 1;
    pkJoinTime.tm_min = v32 >> 25;
    pkJoinTime.tm_mday = (v32 >> 13) & 0x3F;
    v33 = TextData2::Get(0x49121793u);
    strftime(acTime, 0x40u, (const char *)v33, &pkJoinTime);
    v34 = v2->m_pkLogState->vfptr;
    v35 = (char *)TextData::Get(0x3B71153Cu);
    v36 = fs(v35, acTime);
    v34[118].__vecDelDtor((NiRefObject *)v2->m_pkLogState, (unsigned int)v36);
    v37 = v2->m_pkInArea;
    v40 = &unk_9C320B;
LABEL_16:
    v37->vfptr[118].__vecDelDtor((NiRefObject *)v37, (unsigned int)v40);
    return;
  }
  v23 = v2->m_pkLogState->vfptr;
  v24 = TextData::Get(0xDF0C2F2B);
  v25 = (char *)TextData::Get(0x3B71153Cu);
  v26 = fs(v25, v24);
  v23[118].__vecDelDtor((NiRefObject *)v2->m_pkLogState, (unsigned int)v26);
  v27 = IIDTableBase<MapInfo,MapInfoTab,unsigned short>::GetByID(pkProto->PartnerInfo.CurrentMap);
  if ( v27 )
  {
    v28 = v2->m_pkInArea->vfptr;
    v29 = (int)v27->Name;
    v30 = (char *)TextData::Get(0x41482147u);
    v31 = fs(v30, v29);
    v28[118].__vecDelDtor((NiRefObject *)v2->m_pkInArea, (unsigned int)v31);
  }
}

//----- (006E1780) --------------------------------------------------------
void __thiscall WeddingInfoWin::SetWeddingInfo(WeddingInfoWin *this)
{
  WeddingInfoWin *v1; // esi@1
  CLIENT_MARRYINFO *v2; // eax@1
  CLIENT_MARRYINFO *v3; // edi@1
  char v4; // al@4
  NiRefObjectVtbl *v5; // edi@6
  NiUnsharedGeometryGroup *v6; // eax@6
  unsigned int v7; // [sp-4h] [bp-Ch]@5

  v1 = this;
  v2 = WeddingTask::GetMarryInfo();
  v3 = v2;
  if ( v2 )
  {
    if ( v2->MarryStatus != 2 )
    {
      ((void (__stdcall *)(_DWORD))v1->m_pkWeddingAnniversary->vfptr[118].__vecDelDtor)(&unk_9C3226);
      ((void (__stdcall *)(_DWORD))v1->m_pkName->vfptr[118].__vecDelDtor)(&unk_9C3227);
      ((void (__stdcall *)(_DWORD))v1->m_pkLevel->vfptr[118].__vecDelDtor)(&unk_9C322F);
      ((void (__stdcall *)(_DWORD))v1->m_pkLogState->vfptr[118].__vecDelDtor)(&unk_9C3239);
      ((void (__stdcall *)(_DWORD))v1->m_pkInArea->vfptr[118].__vecDelDtor)(&unk_9C323A);
    }
    v4 = v3->MarryStatus;
    if ( v3->MarryStatus == 1 )
    {
      v7 = -166846146;
LABEL_6:
      v5 = v1->m_pkWeddingState->vfptr;
      v6 = TextData::Get(v7);
      v5[118].__vecDelDtor((NiRefObject *)v1->m_pkWeddingState, (unsigned int)v6);
      return;
    }
    if ( v4 == 3 )
    {
      v7 = -317904859;
      goto LABEL_6;
    }
    if ( v4 == 2 )
    {
      v7 = -49225766;
      goto LABEL_6;
    }
    ((void (__stdcall *)(_DWORD))v1->m_pkWeddingState->vfptr[118].__vecDelDtor)(&unk_9C323B);
  }
}

//----- (006E1860) --------------------------------------------------------
void __thiscall WeddingInfoWin::ChangeUserName(WeddingInfoWin *this, Name5 *OldName, Name5 *NewName)
{
  WeddingInfoWin *v3; // esi@1
  CLIENT_MARRYINFO *v4; // eax@1

  v3 = this;
  v4 = WeddingTask::GetMarryInfo();
  if ( v4
    && v4->WifeName.n5_code[0] == OldName->n5_code[0]
    && v4->WifeName.n5_code[1] == OldName->n5_code[1]
    && v4->WifeName.n5_code[2] == OldName->n5_code[2]
    && v4->WifeName.n5_code[3] == OldName->n5_code[3]
    && v4->WifeName.n5_code[4] == OldName->n5_code[4] )
  {
    *(_QWORD *)&v4->WifeName.n5_name[0] = *(_QWORD *)&NewName->n5_code[0];
    *(_QWORD *)&v4->WifeName.n5_code[2] = *(_QWORD *)&NewName->n5_code[2];
    v4->WifeName.n5_code[4] = NewName->n5_code[4];
    WeddingInfoWin::SetWeddingInfo(v3);
  }
}

//----- (006E18E0) --------------------------------------------------------
WeddingInfoWin *__cdecl WeddingInfoWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  WeddingInfoWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x18Cu);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    WeddingInfoWin::WeddingInfoWin((WeddingInfoWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (WeddingInfoWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (006E1A10) --------------------------------------------------------
WeddingInfoWin *__thiscall WeddingInfoWin::`scalar deleting destructor'(WeddingInfoWin *this, unsigned int a2)
{
  WeddingInfoWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&WeddingInfoWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&WeddingInfoWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C3440: using guessed type void (__thiscall *WeddingInfoWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C345C: using guessed type int (__thiscall *WeddingInfoWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006E1A50) --------------------------------------------------------
void WeddingProposeInputWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "WeddingProposeInput");
}

//----- (006E1A80) --------------------------------------------------------
void __thiscall WeddingProposeInputWin::OnShowWin(WeddingProposeInputWin *this)
{
  ((void (__stdcall *)(_DWORD))this->m_spEdit.m_pObject->vfptr[115].__vecDelDtor)(&unk_9C369A);
}

//----- (006E1AA0) --------------------------------------------------------
void __thiscall WeddingProposeInputWin::WeddingProposeInputWin(WeddingProposeInputWin *this)
{
  WeddingProposeInputWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&WeddingProposeInputWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&WeddingProposeInputWin::`vftable'{for `IDirectMessenger'};
  v1->m_spEdit.m_pObject = 0;
  v1->m_pkTitle = 0;
  v1->m_pkMessage = 0;
}
// 9C3798: using guessed type void (__thiscall *WeddingProposeInputWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C37B4: using guessed type int (__thiscall *WeddingProposeInputWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006E1AD0) --------------------------------------------------------
void __thiscall WeddingProposeInputWin::~WeddingProposeInputWin(WeddingProposeInputWin *this)
{
  WeddingProposeInputWin *v1; // esi@1
  EditWin *v2; // edi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&WeddingProposeInputWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&WeddingProposeInputWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spEdit.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9C3798: using guessed type void (__thiscall *WeddingProposeInputWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C37B4: using guessed type int (__thiscall *WeddingProposeInputWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006E1B60) --------------------------------------------------------
char __thiscall WeddingProposeInputWin::Create(WeddingProposeInputWin *this, PgFrameWork *pkFrameWork)
{
  WeddingProposeInputWin *v2; // esi@1
  NiSourceTexture *v3; // ebx@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // edi@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  int v10; // edi@15
  NiSourceTexture *v11; // eax@15
  PgSprData *v12; // eax@16
  PgSprData *v13; // eax@18
  PgSprData *v14; // eax@18
  PgSprData *v15; // eax@18
  PgFont *v16; // eax@20
  PgWinText *v17; // eax@20
  NiUnsharedGeometryGroup *v18; // eax@20
  int v19; // eax@22
  PgFont *v20; // eax@22
  PgWinText *v21; // eax@22
  NiRefObjectVtbl *v22; // edi@22
  NiUnsharedGeometryGroup *v23; // eax@22
  EditWin *v24; // eax@23
  PgSprData *v25; // edi@23
  PgWinBut *v26; // eax@23
  PgWinBut *v27; // edi@23
  PgWin *v28; // ST38_4@23
  PgFont *v29; // ST34_4@23
  unsigned int v30; // ST30_4@23
  unsigned int v31; // eax@23
  PgWinText *v32; // edi@23
  NiRefObjectVtbl *v33; // ebx@23
  NiUnsharedGeometryGroup *v34; // eax@23
  unsigned int uiWidth; // [sp+48h] [bp-24h]@18
  unsigned int uiHeight; // [sp+4Ch] [bp-20h]@18
  int iYOff; // [sp+50h] [bp-1Ch]@15
  int uiLeft; // [sp+54h] [bp-18h]@11
  int uiTop; // [sp+58h] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+5Ch] [bp-10h]@1
  int v41; // [sp+68h] [bp-4h]@1
  NiSourceTexture *pkTexture8a; // [sp+74h] [bp+8h]@20
  PgSprData *pkTexture8b; // [sp+74h] [bp+8h]@20
  NiSourceTexture *pkTexture8; // [sp+74h] [bp+8h]@20
  PgSprData *pkTexture8c; // [sp+74h] [bp+8h]@21
  NiSourceTexture *pkTexture8d; // [sp+74h] [bp+8h]@22
  NiSourceTexture *pkTexture8e; // [sp+74h] [bp+8h]@22

  v2 = this;
  spNode.m_pObject = 0;
  v41 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v41 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
    goto LABEL_5;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "\\Game\\WeddingProposeInput.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "WeddingProposeInputWin", 0) )
  {
    v4 = spNode.m_pObject;
    v41 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v10 = uiLeft;
  iYOff = uiTop;
  v11 = MenuTexMgr::GetTexture(0x13u);
  if ( v11 )
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v11);
  else
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop - iYOff, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop, v13, (PgWin *)&v2->vfptr, 0, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop, v14, (PgWin *)&v2->vfptr, 0, 0);
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel03", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop, v15, (PgWin *)&v2->vfptr, 0, 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "WinTitle",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
    goto LABEL_26;
  v16 = Font::Get(0);
  v17 = PgWinText::CreateWin(uiLeft - v10, uiTop, uiWidth, uiHeight, v16, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkTitle = v17;
  v17->vfptr[122].__vecDelDtor((NiRefObject *)v17, 5u);
  ((void (__stdcall *)(struct D3DXCOLOR *))v2->m_pkTitle->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
  pkTexture8a = (NiSourceTexture *)v2->m_pkTitle->vfptr;
  v18 = TextData::Get(0x84C0B9CA);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))&pkTexture8a[6].m_bStatic)(v2->m_pkTitle, v18);
  ((void (__stdcall *)(_DWORD))v2->m_pkTitle->vfptr[60].__vecDelDtor)(0);
  pkTexture8b = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, v3);
  PgSprData::Add(pkTexture8b, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(pkTexture8b, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinCloseBut::CreateWin(uiLeft - v10, uiTop - iYOff, pkTexture8b, (PgWin *)&v2->vfptr);
  pkTexture8 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    pkTexture8c = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, pkTexture8);
    PgSprData::Add(pkTexture8c, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(pkTexture8c, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v10, uiTop - iYOff, pkTexture8c, (PgWin *)&v2->vfptr, 1u, 0, 0);
  }
  pkTexture8d = (NiSourceTexture *)PgSprData::Create(
                                     (NiAVObject *)&spNode.m_pObject->vfptr,
                                     "Text01",
                                     &uiLeft,
                                     &uiTop,
                                     v3);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop - iYOff, (PgSprData *)pkTexture8d, (PgWin *)&v2->vfptr, 0, 0);
  v19 = *(_DWORD *)pkTexture8d->m_kFormatPrefs.m_eMipMapped;
  pkTexture8e = *(NiSourceTexture **)(v19 + 24);
  iYOff = *(_DWORD *)(v19 + 20);
  v20 = Font::Get(0);
  v21 = PgWinText::CreateWin(uiLeft - v10, uiTop, iYOff, (unsigned int)pkTexture8e, v20, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkMessage = v21;
  v21->vfptr[122].__vecDelDtor((NiRefObject *)v21, 5u);
  ((void (__stdcall *)(D3DXCOLOR *))v2->m_pkMessage->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  v22 = v2->m_pkMessage->vfptr;
  v23 = TextData::Get(0x20440A48u);
  v22[118].__vecDelDtor((NiRefObject *)v2->m_pkMessage, (unsigned int)v23);
  ((void (__stdcall *)(_DWORD))v2->m_pkMessage->vfptr[60].__vecDelDtor)(0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "Text01_Field",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
  {
LABEL_26:
    v41 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  v24 = EditWin::CreateWin(uiLeft, uiTop + 2, uiWidth, uiHeight, (PgWin *)&v2->vfptr, MULTILINE, 0x25u, 0, 1, 0, 1);
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spEdit, (NiD3DDefaultShader *)v24);
  EditWin::SetImeStatus(v2->m_spEdit.m_pObject, IS_KOREAN);
  v25 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Nor", &uiLeft, &uiTop, v3);
  PgSprData::Add(v25, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
  PgSprData::Add(v25, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
  v26 = PgWinBut::CreateWin(uiLeft, uiTop, v25, (PgWin *)&v2->vfptr, 0, 0, 0);
  v27 = v26;
  v28 = (PgWin *)v26;
  v29 = Font::Get(0);
  v30 = ((int (__thiscall *)(PgWinBut *))v27->vfptr[37].__vecDelDtor)(v27);
  v31 = ((int (__thiscall *)(PgWinBut *))v27->vfptr[36].__vecDelDtor)(v27);
  v32 = PgWinText::CreateWin(0, 1, v31, v30, v29, v28, 0, 0);
  v32->vfptr[122].__vecDelDtor((NiRefObject *)v32, 5u);
  v33 = v32->vfptr;
  v34 = TextData::Get(0xA6BE8DE4);
  v33[118].__vecDelDtor((NiRefObject *)v32, (unsigned int)v34);
  v32->vfptr[60].__vecDelDtor((NiRefObject *)v32, 0);
  ((void (__thiscall *)(WeddingProposeInputWin *))v2->vfptr[59].__vecDelDtor)(v2);
  v41 = -1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006E2150) --------------------------------------------------------
void __thiscall WeddingProposeInputWin::OnCmdOk(WeddingProposeInputWin *this)
{
  WeddingProposeInputWin *v1; // ebx@1
  EditWin *v2; // ecx@1
  char *v3; // eax@1
  ProcessingString *v4; // eax@1
  unsigned int v5; // eax@2
  NiUnsharedGeometryGroup *v6; // edi@4
  PROTO_NC_ACT_WEDDING_PROPOSEREQ_REQ kProto; // [sp+4h] [bp-2Ch]@1

  v1 = this;
  v2 = this->m_spEdit.m_pObject;
  *(_DWORD *)&kProto.propose_word[0] = 0;
  *(_DWORD *)&kProto.propose_word[4] = 0;
  *(_DWORD *)&kProto.propose_word[8] = 0;
  *(_DWORD *)&kProto.propose_word[12] = 0;
  *(_DWORD *)&kProto.propose_word[16] = 0;
  *(_DWORD *)&kProto.propose_word[20] = 0;
  *(_DWORD *)&kProto.propose_word[24] = 0;
  *(_DWORD *)&kProto.propose_word[28] = 0;
  *(_DWORD *)&kProto.propose_word[32] = 0;
  kProto.propose_word[36] = 0;
  v3 = (char *)((int (*)(void))v2->vfptr[113].__vecDelDtor)();
  v4 = TextFilterTable::FilterSlander(v3);
  if ( v4 )
  {
    qmemcpy(kProto.propose_word, v4, sizeof(kProto.propose_word));
    v5 = g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[6].dwEffectIndex[1];
    if ( v5 )
    {
      kProto.to = *(_WORD *)(v5 + 552);
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 8u, 0x4Fu, &kProto, 39);
    }
    else
    {
      v6 = TextData::Get(0xE8F3BFE1);
      if ( v1->m_pkMsgHooker )
      {
        ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->SendDirectMessage)(25, v6, &v1->vfptr);
        if ( v1->m_pkMsgHooker )
          ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            25,
            v6,
            &v1->vfptr);
      }
      v1->vfptr->DirectDispatchToParent((IDirectMessenger *)&v1->vfptr, 25, v6, (IDirectMessenger *)&v1->vfptr);
    }
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
  }
}

//----- (006E2250) --------------------------------------------------------
void __thiscall WeddingProposeInputWin::OnCommand(WeddingProposeInputWin *this, unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@3

  if ( wParam )
  {
    if ( wParam == 1 )
    {
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v3 )
        GameFrameWork::OpenPlayGuideSearchList(v3, "WeddingProposeInput");
    }
  }
  else
  {
    WeddingProposeInputWin::OnCmdOk(this);
  }
}

//----- (006E2290) --------------------------------------------------------
WeddingProposeInputWin *__cdecl WeddingProposeInputWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  WeddingProposeInputWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x164u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&WeddingProposeInputWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&WeddingProposeInputWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (WeddingProposeInputWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9C3798: using guessed type void (__thiscall *WeddingProposeInputWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C37B4: using guessed type int (__thiscall *WeddingProposeInputWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006E23E0) --------------------------------------------------------
WeddingProposeInputWin *__thiscall WeddingProposeInputWin::`scalar deleting destructor'(WeddingProposeInputWin *this, unsigned int a2)
{
  WeddingProposeInputWin *v2; // esi@1
  EditWin *v3; // edi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&WeddingProposeInputWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&WeddingProposeInputWin::`vftable'{for `IDirectMessenger'};
  v3 = this->m_spEdit.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C3798: using guessed type void (__thiscall *WeddingProposeInputWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C37B4: using guessed type int (__thiscall *WeddingProposeInputWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006E2480) --------------------------------------------------------
void WeddingProposeOutputWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "WeddingProposeOutput");
}

//----- (006E24B0) --------------------------------------------------------
void __thiscall WeddingProposeOutputWin::OnCmdAgree(WeddingProposeOutputWin *this)
{
  WeddingProposeOutputWin *v1; // ebx@1
  unsigned __int16 v2; // ax@1
  EditWin *v3; // ecx@1
  char *v4; // eax@1
  ProcessingString *v5; // eax@1
  PROTO_NC_ACT_WEDDING_PROPOSEACK_ACK kProto; // [sp+4h] [bp-2Ch]@1

  v1 = this;
  v2 = this->m_kFromHandle;
  v3 = this->m_spSendEdit.m_pObject;
  kProto.from = v2;
  *(_DWORD *)&kProto.response_word[0] = 0;
  *(_DWORD *)&kProto.response_word[4] = 0;
  *(_DWORD *)&kProto.response_word[8] = 0;
  *(_DWORD *)&kProto.response_word[12] = 0;
  *(_DWORD *)&kProto.response_word[16] = 0;
  *(_DWORD *)&kProto.response_word[20] = 0;
  *(_DWORD *)&kProto.response_word[24] = 0;
  *(_DWORD *)&kProto.response_word[28] = 0;
  *(_DWORD *)&kProto.response_word[32] = 0;
  kProto.response_word[36] = 0;
  kProto.reply = 1;
  v4 = (char *)((int (*)(void))v3->vfptr[113].__vecDelDtor)();
  v5 = TextFilterTable::FilterSlander(v4);
  if ( v5 )
  {
    qmemcpy(kProto.response_word, v5, sizeof(kProto.response_word));
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 8u, 0x51u, &kProto, 40);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
  }
}

//----- (006E2550) --------------------------------------------------------
void __thiscall WeddingProposeOutputWin::OnCmdRefusal(WeddingProposeOutputWin *this)
{
  WeddingProposeOutputWin *v1; // ebx@1
  unsigned __int16 v2; // ax@1
  EditWin *v3; // ecx@1
  char *v4; // eax@1
  ProcessingString *v5; // eax@1
  PROTO_NC_ACT_WEDDING_PROPOSEACK_ACK kProto; // [sp+4h] [bp-2Ch]@1

  v1 = this;
  v2 = this->m_kFromHandle;
  v3 = this->m_spSendEdit.m_pObject;
  kProto.from = v2;
  *(_DWORD *)&kProto.response_word[0] = 0;
  *(_DWORD *)&kProto.response_word[4] = 0;
  *(_DWORD *)&kProto.response_word[8] = 0;
  *(_DWORD *)&kProto.response_word[12] = 0;
  *(_DWORD *)&kProto.response_word[16] = 0;
  *(_DWORD *)&kProto.response_word[20] = 0;
  *(_DWORD *)&kProto.response_word[24] = 0;
  *(_DWORD *)&kProto.response_word[28] = 0;
  *(_DWORD *)&kProto.response_word[32] = 0;
  kProto.response_word[36] = 0;
  kProto.reply = 0;
  v4 = (char *)((int (*)(void))v3->vfptr[113].__vecDelDtor)();
  v5 = TextFilterTable::FilterSlander(v4);
  if ( v5 )
  {
    qmemcpy(kProto.response_word, v5, sizeof(kProto.response_word));
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 8u, 0x51u, &kProto, 40);
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
  }
}

//----- (006E25F0) --------------------------------------------------------
void __thiscall WeddingProposeOutputWin::WeddingProposeOutputWin(WeddingProposeOutputWin *this)
{
  WeddingProposeOutputWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&WeddingProposeOutputWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&WeddingProposeOutputWin::`vftable'{for `IDirectMessenger'};
  v1->m_spEdit.m_pObject = 0;
  v1->m_spSendEdit.m_pObject = 0;
  v1->m_pkAnswer = 0;
  v1->m_pkMessage = 0;
  v1->m_pkProposeMessage = 0;
}
// 9C3B14: using guessed type void (__thiscall *WeddingProposeOutputWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C3B34: using guessed type int (__thiscall *WeddingProposeOutputWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006E2630) --------------------------------------------------------
void __thiscall WeddingProposeOutputWin::~WeddingProposeOutputWin(WeddingProposeOutputWin *this)
{
  WeddingProposeOutputWin *v1; // esi@1
  EditWin *v2; // edi@1
  EditWin *v3; // edi@5

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&WeddingProposeOutputWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&WeddingProposeOutputWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spSendEdit.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_spEdit.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9C3B14: using guessed type void (__thiscall *WeddingProposeOutputWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C3B34: using guessed type int (__thiscall *WeddingProposeOutputWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006E26E0) --------------------------------------------------------
char __thiscall WeddingProposeOutputWin::Create(WeddingProposeOutputWin *this, PgFrameWork *pkFrameWork)
{
  WeddingProposeOutputWin *v2; // esi@1
  NiSourceTexture *v3; // ebx@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // edi@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  int v10; // edi@15
  NiSourceTexture *v11; // eax@15
  PgSprData *v12; // eax@16
  PgSprData *v13; // eax@18
  PgSprData *v14; // eax@18
  PgSprData *v15; // eax@18
  PgFont *v16; // eax@20
  unsigned int v17; // ST5C_4@20
  NiUnsharedGeometryGroup *v18; // eax@20
  int v19; // eax@22
  unsigned int v20; // ST5C_4@22
  PgFont *v21; // eax@22
  PgWinText *v22; // eax@22
  EditWin *v23; // eax@23
  NiPointer<PgSprData::PgHitTester> *v24; // ecx@23
  unsigned int v25; // ST5C_4@23
  PgFont *v26; // eax@23
  PgWinText *v27; // eax@23
  NiRefObjectVtbl *v28; // edi@23
  NiUnsharedGeometryGroup *v29; // eax@23
  EditWin *v30; // eax@24
  PgSprData *v31; // edi@24
  PgWinBut *v32; // eax@24
  PgWinBut *v33; // edi@24
  PgWin *v34; // ST40_4@24
  PgFont *v35; // ST3C_4@24
  unsigned int v36; // ST38_4@24
  unsigned int v37; // eax@24
  PgWinText *v38; // edi@24
  PgSprData *v39; // edi@24
  PgWinBut *v40; // eax@24
  PgWinBut *v41; // edi@24
  PgWin *v42; // ST34_4@24
  PgFont *v43; // ST30_4@24
  unsigned int v44; // ST2C_4@24
  unsigned int v45; // eax@24
  PgWinText *v46; // edi@24
  NiRefObjectVtbl *v47; // ebx@24
  NiUnsharedGeometryGroup *v48; // eax@24
  int iYOff; // [sp+60h] [bp-24h]@15
  unsigned int uiWidth; // [sp+64h] [bp-20h]@18
  unsigned int uiHeight; // [sp+68h] [bp-1Ch]@18
  NiPointer<NiNode> spNode; // [sp+6Ch] [bp-18h]@1
  int uiLeft; // [sp+70h] [bp-14h]@11
  int uiTop; // [sp+74h] [bp-10h]@11
  int v55; // [sp+80h] [bp-4h]@1
  PgWinText *pkTextWina; // [sp+8Ch] [bp+8h]@20
  NiSourceTexture *pkTextWin; // [sp+8Ch] [bp+8h]@20
  PgSprData *pkTextWinb; // [sp+8Ch] [bp+8h]@21
  PgWinText *pkTextWinc; // [sp+8Ch] [bp+8h]@22
  PgWinText *pkTextWind; // [sp+8Ch] [bp+8h]@22
  PgSprData *pkTextWine; // [sp+8Ch] [bp+8h]@23
  PgWinText *pkTextWinf; // [sp+8Ch] [bp+8h]@23
  PgWinText *pkTextWing; // [sp+8Ch] [bp+8h]@24

  v2 = this;
  spNode.m_pObject = 0;
  v55 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v55 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
    goto LABEL_5;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "\\Game\\WeddingProposeOutput.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "WeddingProposeOutputWin", 0) )
  {
    v4 = spNode.m_pObject;
    v55 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v10 = uiLeft;
  iYOff = uiTop;
  v11 = MenuTexMgr::GetTexture(0x13u);
  if ( v11 )
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v11);
  else
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop - iYOff, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop, v13, (PgWin *)&v2->vfptr, 0, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop, v14, (PgWin *)&v2->vfptr, 0, 0);
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel03", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop, v15, (PgWin *)&v2->vfptr, 0, 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "WinTitle",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
    goto LABEL_27;
  v16 = Font::Get(0);
  pkTextWina = PgWinText::CreateWin(uiLeft - v10, uiTop, uiWidth, uiHeight, v16, (PgWin *)&v2->vfptr, 0, 0);
  pkTextWina->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWina, 5u);
  ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWina->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
  v17 = (unsigned int)pkTextWina->vfptr;
  v18 = TextData::Get(0x84C0B9CA);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v17 + 472))(pkTextWina, v18);
  ((void (__stdcall *)(_DWORD))pkTextWina->vfptr[60].__vecDelDtor)(0);
  pkTextWin = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    pkTextWinb = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, pkTextWin);
    PgSprData::Add(pkTextWinb, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(pkTextWinb, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v10, uiTop, pkTextWinb, (PgWin *)&v2->vfptr, 2u, 0, 0);
  }
  pkTextWinc = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop - iYOff, (PgSprData *)pkTextWinc, (PgWin *)&v2->vfptr, 0, 0);
  v19 = *(_DWORD *)LODWORD(pkTextWinc->m_kWorldBound.m_kCenter.x);
  pkTextWind = *(PgWinText **)(v19 + 24);
  v20 = *(_DWORD *)(v19 + 20);
  v21 = Font::Get(0);
  v22 = PgWinText::CreateWin(uiLeft - v10, uiTop, v20, (unsigned int)pkTextWind, v21, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkMessage = v22;
  v22->vfptr[122].__vecDelDtor((NiRefObject *)v22, 5u);
  ((void (__stdcall *)(D3DXCOLOR *))v2->m_pkMessage->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  ((void (__stdcall *)(_DWORD))v2->m_pkMessage->vfptr[60].__vecDelDtor)(0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "Text01_Field",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight)
    || (v23 = EditWin::CreateWin(
                uiLeft,
                uiTop + 2,
                uiWidth,
                uiHeight,
                (PgWin *)&v2->vfptr,
                MULTILINE,
                0x25u,
                0,
                1,
                0,
                0),
        NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spEdit, (NiD3DDefaultShader *)v23),
        EditWin::SetImeStatus(v2->m_spEdit.m_pObject, IS_KOREAN),
        pkTextWine = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text02", &uiLeft, &uiTop, v3),
        PgWinSpr::CreateWin(uiLeft - v10, uiTop - iYOff, pkTextWine, (PgWin *)&v2->vfptr, 0, 0),
        v24 = pkTextWine->m_akHitTester.m_pBase,
        pkTextWinf = (PgWinText *)v24->m_pObject->m_uiHeight,
        v25 = v24->m_pObject->m_uiWidth,
        v26 = Font::Get(0),
        v27 = PgWinText::CreateWin(uiLeft - v10, uiTop, v25, (unsigned int)pkTextWinf, v26, (PgWin *)&v2->vfptr, 0, 0),
        v2->m_pkAnswer = v27,
        v27->vfptr[122].__vecDelDtor((NiRefObject *)v27, 5u),
        v28 = v2->m_pkAnswer->vfptr,
        v29 = TextData::Get(0x20ADDDEu),
        v28[118].__vecDelDtor((NiRefObject *)v2->m_pkAnswer, (unsigned int)v29),
        ((void (__stdcall *)(_DWORD))v2->m_pkAnswer->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text02_Field",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight)) )
  {
LABEL_27:
    v55 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  v30 = EditWin::CreateWin(uiLeft, uiTop + 2, uiWidth, uiHeight, (PgWin *)&v2->vfptr, NORMAL, 0x14u, 1u, 1, 0, 1);
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spSendEdit, (NiD3DDefaultShader *)v30);
  EditWin::SetImeStatus(v2->m_spSendEdit.m_pObject, IS_KOREAN);
  v31 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Nor", &uiLeft, &uiTop, v3);
  PgSprData::Add(v31, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
  PgSprData::Add(v31, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
  v32 = PgWinBut::CreateWin(uiLeft, uiTop, v31, (PgWin *)&v2->vfptr, 0, 0, 0);
  v33 = v32;
  v34 = (PgWin *)v32;
  v35 = Font::Get(0);
  v36 = ((int (__thiscall *)(PgWinBut *))v33->vfptr[37].__vecDelDtor)(v33);
  v37 = ((int (__thiscall *)(PgWinBut *))v33->vfptr[36].__vecDelDtor)(v33);
  v38 = PgWinText::CreateWin(0, 1, v37, v36, v35, v34, 0, 0);
  ((void (__thiscall *)(PgWinText *))v38->vfptr[122].__vecDelDtor)(v38);
  pkTextWing = (PgWinText *)v38->vfptr;
  TextData::Get(0xDD03DFE0);
  ((void (__thiscall *)(PgWinText *))pkTextWing[1].m_kChildren.m_pBase)(v38);
  ((void (__thiscall *)(PgWinText *))v38->vfptr[60].__vecDelDtor)(v38);
  v39 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Nor", &uiLeft, &uiTop, v3);
  PgSprData::Add(v39, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Click");
  PgSprData::Add(v39, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Over");
  v40 = PgWinBut::CreateWin(uiLeft, uiTop, v39, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v41 = v40;
  v42 = (PgWin *)v40;
  v43 = Font::Get(0);
  v44 = ((int (__thiscall *)(PgWinBut *))v41->vfptr[37].__vecDelDtor)(v41);
  v45 = ((int (__thiscall *)(PgWinBut *))v41->vfptr[36].__vecDelDtor)(v41);
  v46 = PgWinText::CreateWin(0, 1, v45, v44, v43, v42, 0, 0);
  ((void (__thiscall *)(PgWinText *))v46->vfptr[122].__vecDelDtor)(v46);
  v47 = v46->vfptr;
  v48 = TextData::Get(0xFC131F1F);
  v47[118].__vecDelDtor((NiRefObject *)v46, (unsigned int)v48);
  v46->vfptr[60].__vecDelDtor((NiRefObject *)v46, 0);
  ((void (__thiscall *)(WeddingProposeOutputWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  v55 = -1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006E2E40) --------------------------------------------------------
void __thiscall WeddingProposeOutputWin::OnCommand(WeddingProposeOutputWin *this, unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@4

  if ( wParam )
  {
    if ( wParam == 1 )
    {
      WeddingProposeOutputWin::OnCmdRefusal(this);
    }
    else if ( wParam == 2 )
    {
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v3 )
        GameFrameWork::OpenPlayGuideSearchList(v3, "WeddingProposeOutput");
    }
  }
  else
  {
    WeddingProposeOutputWin::OnCmdAgree(this);
  }
}

//----- (006E2E90) --------------------------------------------------------
void __thiscall WeddingProposeOutputWin::SetProposeData(WeddingProposeOutputWin *this, PROTO_NC_ACT_WEDDING_PROPOSEACK_REQ *pkProto)
{
  WeddingProposeOutputWin *v2; // esi@1
  Char *v3; // eax@1
  NiRefObjectVtbl *v4; // ebx@1
  int v5; // ST04_4@1
  char *v6; // eax@1
  char *v7; // eax@1

  v2 = this;
  this->m_kFromHandle = pkProto->from;
  v3 = CharMgr::GetChar(&g_kCharMgr, pkProto->from);
  v4 = v2->m_pkMessage->vfptr;
  v5 = ((int (__thiscall *)(_DWORD))v3->vfptr[2].DeleteAbStateByAbstateIndex)(v3);
  v6 = (char *)TextData::Get(0x1F64505Fu);
  v7 = fs(v6, v5);
  v4[118].__vecDelDtor((NiRefObject *)v2->m_pkMessage, (unsigned int)v7);
  ((void (__stdcall *)(_DWORD))v2->m_spEdit.m_pObject->vfptr[115].__vecDelDtor)(pkProto->propose_word);
  ((void (__stdcall *)(_DWORD))v2->m_spSendEdit.m_pObject->vfptr[115].__vecDelDtor)(&unk_9C39F3);
}

//----- (006E2F20) --------------------------------------------------------
WeddingProposeOutputWin *__cdecl WeddingProposeOutputWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  WeddingProposeOutputWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x170u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&WeddingProposeOutputWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&WeddingProposeOutputWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[2][0]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][1]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (WeddingProposeOutputWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9C3B14: using guessed type void (__thiscall *WeddingProposeOutputWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C3B34: using guessed type int (__thiscall *WeddingProposeOutputWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006E3080) --------------------------------------------------------
WeddingProposeOutputWin *__thiscall WeddingProposeOutputWin::`vector deleting destructor'(WeddingProposeOutputWin *this, unsigned int a2)
{
  WeddingProposeOutputWin *v2; // esi@1

  v2 = this;
  WeddingProposeOutputWin::~WeddingProposeOutputWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006E30B0) --------------------------------------------------------
void WeddingProposeResultWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "WeddingProposeResult");
}

//----- (006E30E0) --------------------------------------------------------
void __thiscall WeddingProposeResultWin::OnCommand(WeddingProposeResultWin *this, unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@3

  if ( wParam )
  {
    if ( wParam == 1 )
    {
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v3 )
        GameFrameWork::OpenPlayGuideSearchList(v3, "WeddingProposeResult");
    }
  }
  else
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
  }
}

//----- (006E3130) --------------------------------------------------------
void __thiscall WeddingProposeResultWin::WeddingProposeResultWin(WeddingProposeResultWin *this)
{
  WeddingProposeResultWin *v1; // esi@1
  EditWin *v2; // edi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&WeddingProposeResultWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&WeddingProposeResultWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkWeddingMessage.m_pObject = 0;
  v1->m_pkReply = 0;
  v2 = v1->m_pkWeddingMessage.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
    v1->m_pkWeddingMessage.m_pObject = 0;
  }
}
// 9C3E84: using guessed type void (__thiscall *WeddingProposeResultWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C3EA4: using guessed type int (__thiscall *WeddingProposeResultWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006E31D0) --------------------------------------------------------
void __thiscall WeddingProposeResultWin::~WeddingProposeResultWin(WeddingProposeResultWin *this)
{
  WeddingProposeResultWin *v1; // esi@1
  EditWin *v2; // edi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&WeddingProposeResultWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&WeddingProposeResultWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_pkWeddingMessage.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9C3E84: using guessed type void (__thiscall *WeddingProposeResultWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C3EA4: using guessed type int (__thiscall *WeddingProposeResultWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006E3260) --------------------------------------------------------
char __thiscall WeddingProposeResultWin::Create(WeddingProposeResultWin *this, PgFrameWork *pkFrameWork)
{
  WeddingProposeResultWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // ebx@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  int v10; // ebx@15
  NiSourceTexture *v11; // eax@15
  PgSprData *v12; // eax@16
  PgSprData *v13; // eax@18
  PgSprData *v14; // eax@18
  PgSprData *v15; // eax@18
  PgFont *v16; // eax@20
  PgWinText *v17; // edi@20
  unsigned int v18; // ST54_4@20
  NiUnsharedGeometryGroup *v19; // eax@20
  PgSprData *v20; // edi@20
  NiSourceTexture *v21; // edi@20
  PgSprData *v22; // edi@21
  PgSprData *v23; // edi@22
  NiPointer<PgSprData::PgHitTester> *v24; // ecx@22
  unsigned int v25; // edi@22
  unsigned int v26; // ST54_4@22
  PgFont *v27; // eax@22
  PgWinText *v28; // edi@22
  unsigned int v29; // ST54_4@22
  NiUnsharedGeometryGroup *v30; // eax@22
  PgSprData *v31; // edi@22
  NiPointer<PgSprData::PgHitTester> *v32; // ecx@22
  unsigned int v33; // edi@22
  PgFont *v34; // eax@22
  PgWinText *v35; // eax@22
  EditWin *v36; // eax@23
  PgSprData *v37; // edi@23
  PgWinBut *v38; // eax@23
  PgWinBut *v39; // edi@23
  PgWin *v40; // ST38_4@23
  PgFont *v41; // ST34_4@23
  unsigned int v42; // ST30_4@23
  unsigned int v43; // eax@23
  PgWinText *v44; // edi@23
  NiRefObjectVtbl *v45; // ebx@23
  NiUnsharedGeometryGroup *v46; // eax@23
  unsigned int uiWidth; // [sp+54h] [bp-24h]@18
  unsigned int uiHeight; // [sp+58h] [bp-20h]@18
  NiSourceTexture *pkTexture; // [sp+5Ch] [bp-1Ch]@1
  NiPointer<NiNode> spNode; // [sp+60h] [bp-18h]@1
  int uiLeft; // [sp+64h] [bp-14h]@11
  int uiTop; // [sp+68h] [bp-10h]@11
  int v53; // [sp+74h] [bp-4h]@1
  int iYOff; // [sp+80h] [bp+8h]@15
  int iYOffa; // [sp+80h] [bp+8h]@22

  v2 = this;
  spNode.m_pObject = 0;
  v53 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  pkTexture = v3;
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v53 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
    goto LABEL_5;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "\\Game\\WeddingProposeResult.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "WeddingProposeResultWin", 0) )
  {
    v4 = spNode.m_pObject;
    v53 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v10 = uiLeft;
  iYOff = uiTop;
  v11 = MenuTexMgr::GetTexture(0x13u);
  if ( v11 )
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v11);
  else
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop - iYOff, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop, v13, (PgWin *)&v2->vfptr, 0, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop, v14, (PgWin *)&v2->vfptr, 0, 0);
  v15 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel03", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop, v15, (PgWin *)&v2->vfptr, 0, 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "WinTitle",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
    goto LABEL_26;
  v16 = Font::Get(0);
  v17 = PgWinText::CreateWin(uiLeft - v10, uiTop, uiWidth, uiHeight, v16, (PgWin *)&v2->vfptr, 0, 0);
  v17->vfptr[122].__vecDelDtor((NiRefObject *)v17, 5u);
  v17->vfptr[117].__vecDelDtor((NiRefObject *)v17, (unsigned int)&Color::m_kDxWinTitleColor);
  v18 = (unsigned int)v17->vfptr;
  v19 = TextData::Get(0x94C274D7);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v18 + 472))(v17, v19);
  v17->vfptr[60].__vecDelDtor((NiRefObject *)v17, 0);
  v20 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(v20, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(v20, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinCloseBut::CreateWin(uiLeft - v10, uiTop - iYOff, v20, (PgWin *)&v2->vfptr);
  v21 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, v21);
    PgSprData::Add(v22, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(v22, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v10, uiTop - iYOff, v22, (PgWin *)&v2->vfptr, 1u, 0, 0);
  }
  v23 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text02", &uiLeft, &uiTop, pkTexture);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop - iYOff, v23, (PgWin *)&v2->vfptr, 0, 0);
  v24 = v23->m_akHitTester.m_pBase;
  v25 = v24->m_pObject->m_uiHeight;
  v26 = v24->m_pObject->m_uiWidth;
  v27 = Font::Get(0);
  v28 = PgWinText::CreateWin(uiLeft - v10, uiTop, v26, v25, v27, (PgWin *)&v2->vfptr, 0, 0);
  v28->vfptr[122].__vecDelDtor((NiRefObject *)v28, 5u);
  v28->vfptr[117].__vecDelDtor((NiRefObject *)v28, (unsigned int)&Color::m_kDxWhiteColor);
  v29 = (unsigned int)v28->vfptr;
  v30 = TextData::Get(0x20ADDDEu);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(v29 + 472))(v28, v30);
  v28->vfptr[60].__vecDelDtor((NiRefObject *)v28, 0);
  v31 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text02_Field", &uiLeft, &uiTop, pkTexture);
  PgWinSpr::CreateWin(uiLeft - v10, uiTop - iYOff, v31, (PgWin *)&v2->vfptr, 0, 0);
  v32 = v31->m_akHitTester.m_pBase;
  v33 = v32->m_pObject->m_uiHeight;
  iYOffa = v32->m_pObject->m_uiWidth;
  v34 = Font::Get(0);
  v35 = PgWinText::CreateWin(uiLeft - v10, uiTop, iYOffa, v33, v34, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkReply = v35;
  v35->vfptr[117].__vecDelDtor((NiRefObject *)v35, (unsigned int)&Color::m_kDxWhiteColor);
  ((void (__stdcall *)(_DWORD))v2->m_pkReply->vfptr[60].__vecDelDtor)(0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "Text01_Field",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
  {
LABEL_26:
    v53 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  v36 = EditWin::CreateWin(uiLeft, uiTop + 2, uiWidth, uiHeight, (PgWin *)&v2->vfptr, MULTILINE, 0x80u, 0, 1, 0, 0);
  NiPointer<PopupMenuWin>::operator=(
    (NiPointer<NiD3DDefaultShader> *)&v2->m_pkWeddingMessage,
    (NiD3DDefaultShader *)v36);
  EditWin::SetImeStatus(v2->m_pkWeddingMessage.m_pObject, IS_KOREAN);
  v37 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Nor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(v37, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
  PgSprData::Add(v37, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
  v38 = PgWinBut::CreateWin(uiLeft, uiTop, v37, (PgWin *)&v2->vfptr, 0, 0, 0);
  v39 = v38;
  v40 = (PgWin *)v38;
  v41 = Font::Get(0);
  v42 = ((int (__thiscall *)(PgWinBut *))v39->vfptr[37].__vecDelDtor)(v39);
  v43 = ((int (__thiscall *)(PgWinBut *))v39->vfptr[36].__vecDelDtor)(v39);
  v44 = PgWinText::CreateWin(0, 1, v43, v42, v41, v40, 0, 0);
  v44->vfptr[122].__vecDelDtor((NiRefObject *)v44, 5u);
  v45 = v44->vfptr;
  v46 = TextData::Get(0xA6BE8DE4);
  v45[118].__vecDelDtor((NiRefObject *)v44, (unsigned int)v46);
  v44->vfptr[60].__vecDelDtor((NiRefObject *)v44, 0);
  ((void (__thiscall *)(WeddingProposeResultWin *))v2->vfptr[59].__vecDelDtor)(v2);
  v53 = -1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006E38C0) --------------------------------------------------------
void __thiscall WeddingProposeResultWin::SetProposeResult(WeddingProposeResultWin *this, PROTO_NC_ACT_WEDDING_PROPOSEREQ_ACK *pkProto, bool bYes)
{
  WeddingProposeResultWin *v3; // esi@1
  Char *v4; // eax@1
  NiRefObjectVtbl **v5; // esi@1
  NiRefObjectVtbl *v6; // edi@1
  int v7; // ST04_4@2
  char *v8; // eax@2
  char *v9; // eax@2
  int v10; // ST04_4@3
  char *v11; // eax@3
  char *v12; // eax@3

  v3 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkReply->vfptr[118].__vecDelDtor)(&unk_9C3D73);
  ((void (__stdcall *)(_DWORD))v3->m_pkWeddingMessage.m_pObject->vfptr[115].__vecDelDtor)(&unk_9C3D7A);
  ((void (__stdcall *)(_DWORD))v3->m_pkReply->vfptr[118].__vecDelDtor)(pkProto->response_word);
  v4 = CharMgr::GetChar(&g_kCharMgr, pkProto->to);
  v5 = &v3->m_pkWeddingMessage.m_pObject->vfptr;
  v6 = *v5;
  if ( bYes )
  {
    v7 = ((int (*)(void))v4->vfptr[2].DeleteAbStateByAbstateIndex)();
    v8 = (char *)TextData::Get(0x1C624F72u);
    v9 = fs(v8, v7);
    v6[115].__vecDelDtor((NiRefObject *)v5, (unsigned int)v9);
  }
  else
  {
    v10 = ((int (*)(void))v4->vfptr[2].DeleteAbStateByAbstateIndex)();
    v11 = (char *)TextData::Get(0xEE51F60D);
    v12 = fs(v11, v10);
    v6[115].__vecDelDtor((NiRefObject *)v5, (unsigned int)v12);
  }
}

//----- (006E3990) --------------------------------------------------------
WeddingProposeResultWin *__cdecl WeddingProposeResultWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  WeddingProposeResultWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x160u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    WeddingProposeResultWin::WeddingProposeResultWin((WeddingProposeResultWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (WeddingProposeResultWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (006E3AC0) --------------------------------------------------------
WeddingProposeResultWin *__thiscall WeddingProposeResultWin::`vector deleting destructor'(WeddingProposeResultWin *this, unsigned int a2)
{
  WeddingProposeResultWin *v2; // esi@1
  EditWin *v3; // edi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&WeddingProposeResultWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&WeddingProposeResultWin::`vftable'{for `IDirectMessenger'};
  v3 = this->m_pkWeddingMessage.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C3E84: using guessed type void (__thiscall *WeddingProposeResultWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C3EA4: using guessed type int (__thiscall *WeddingProposeResultWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006E3B60) --------------------------------------------------------
void __thiscall WeddingTask::OnStart(WeddingTask *this)
{
  WeddingTask *v1; // esi@1

  v1 = this;
  this->m_pkWeddingProposeInputWin = WeddingProposeInputWin::CreateWin(0);
  v1->m_pkWeddingProposeOutputWin = WeddingProposeOutputWin::CreateWin(0);
  v1->m_pkWeddingProposeResultWin = WeddingProposeResultWin::CreateWin(0);
  v1->m_pkWeddingEntryWin = WeddingEntryWin::CreateWin(0);
}

//----- (006E3B90) --------------------------------------------------------
void __thiscall WeddingTask::DirectMessage(WeddingTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  WeddingTask *v4; // esi@1

  v4 = this;
  if ( iMsgTag == 27 && pvBody && !*(_DWORD *)pvBody )
  {
    if ( LOBYTE(this->m_pkWeddingProposeResultWin) )
    {
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 8u, 0x5Eu, 0, 0);
      LOBYTE(v4->m_pkWeddingProposeResultWin) = 0;
    }
  }
}

//----- (006E3BD0) --------------------------------------------------------
int __thiscall WeddingTask::Recv_NC_ACT_WEDDING_PROPOSE_WORD_REQ(WeddingTask *this)
{
  WeddingTask *v1; // esi@1

  v1 = this;
  if ( this->m_pkWeddingProposeInputWin
    && !(unsigned __int8)((int (*)(void))this->m_pkWeddingProposeInputWin->vfptr[65].__vecDelDtor)() )
  {
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkWeddingProposeInputWin->vfptr);
  }
  return 1;
}

//----- (006E3C00) --------------------------------------------------------
int __thiscall WeddingTask::Recv_NC_ACT_WEDDING_PROPOSEACK_REQ(WeddingTask *this, PROTO_NC_ACT_WEDDING_PROPOSEACK_REQ *pkProto)
{
  WeddingTask *v2; // esi@1

  v2 = this;
  WeddingProposeOutputWin::SetProposeData(this->m_pkWeddingProposeOutputWin, pkProto);
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkWeddingProposeOutputWin->vfptr);
  return 1;
}

//----- (006E3C30) --------------------------------------------------------
int __stdcall WeddingTask::Recv_NC_ACT_WEDDING_SOMEONE(PROTO_NC_ACT_WEDDING_SOMEONE *pkProto)
{
  return 1;
}

//----- (006E3C40) --------------------------------------------------------
WeddingProposeInputWin *__cdecl WeddingTask::GetWeddingProposeInputWin()
{
  return *(WeddingProposeInputWin **)(WeddingTask::ms_spWeddingTask + 96);
}
// B5C2AC: using guessed type int WeddingTask::ms_spWeddingTask;

//----- (006E3C50) --------------------------------------------------------
CLIENT_MARRYINFO *__cdecl WeddingTask::GetMarryInfo()
{
  return (CLIENT_MARRYINFO *)(WeddingTask::ms_spWeddingTask + 64);
}
// B5C2AC: using guessed type int WeddingTask::ms_spWeddingTask;

//----- (006E3C60) --------------------------------------------------------
int __thiscall WeddingTask::Recv_NC_ACT_WEDDING_PROPOSEREQ_ACK(WeddingTask *this, PROTO_NC_ACT_WEDDING_PROPOSEREQ_ACK *pkProto)
{
  WeddingTask *v2; // esi@1
  int v3; // eax@1
  int result; // eax@3
  char *v5; // esi@4
  char *v6; // edi@4

  v2 = this;
  v3 = pkProto->err;
  if ( (_WORD)v3 == 4800 )
  {
    WeddingProposeResultWin::SetProposeResult(this->m_pkWeddingProposeResultWin, pkProto, 1);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkWeddingProposeResultWin->vfptr);
    result = 1;
  }
  else if ( (_WORD)v3 == 4810 )
  {
    WeddingProposeResultWin::SetProposeResult(this->m_pkWeddingProposeResultWin, pkProto, 0);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkWeddingProposeResultWin->vfptr);
    result = 1;
  }
  else
  {
    v5 = (char *)&this->vfptr;
    v6 = ErrMsgTable::GetErrMsg(v3);
    if ( *((_DWORD *)v5 + 1) )
    {
      (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v5 + 1) + 4))(25, v6, v5);
      if ( *((_DWORD *)v5 + 1) )
        (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v5 + 1) + 20))(25, v6, v5);
    }
    (*(void (__thiscall **)(char *, signed int, char *, char *))(*(_DWORD *)v5 + 20))(v5, 25, v6, v5);
    result = 1;
  }
  return result;
}

//----- (006E3D20) --------------------------------------------------------
int __thiscall WeddingTask::Recv_NC_ACT_WEDDING_HALL_GUEST_ENTER_ACK(WeddingTask *this, PROTO_NC_ACT_WEDDING_HALL_GUEST_ENTER_ACK *pkProto)
{
  int v2; // eax@1
  char *v3; // esi@2
  char *v4; // edi@2

  v2 = pkProto->err;
  if ( (_WORD)v2 != 4928 )
  {
    v3 = (char *)&this->vfptr;
    v4 = ErrMsgTable::GetErrMsg(v2);
    if ( *((_DWORD *)v3 + 1) )
    {
      (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v3 + 1) + 4))(25, v4, v3);
      if ( *((_DWORD *)v3 + 1) )
        (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v3 + 1) + 20))(25, v4, v3);
    }
    (*(void (__thiscall **)(char *, signed int, char *, char *))(*(_DWORD *)v3 + 20))(v3, 25, v4, v3);
  }
  return 1;
}

//----- (006E3D90) --------------------------------------------------------
int __stdcall WeddingTask::Recv_NC_CHAR_WEDDING_PARTNER_INFO_ACK(PROTO_NC_CHAR_WEDDING_PARTNER_INFO_ACK *pkProto)
{
  PgFrameWork *v2; // eax@1

  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v2 )
    WeddingInfoWin::SetWeddingInfo((WeddingInfoWin *)v2[24].m_uiMessageNum, pkProto);
  return 1;
}

//----- (006E3DC0) --------------------------------------------------------
void __cdecl WeddingTask::Terminate()
{
  void (__thiscall ***v0)(_DWORD, _DWORD); // esi@1

  v0 = (void (__thiscall ***)(_DWORD, _DWORD))WeddingTask::ms_spWeddingTask;
  if ( WeddingTask::ms_spWeddingTask )
  {
    if ( !InterlockedDecrement((volatile LONG *)(WeddingTask::ms_spWeddingTask + 4)) )
    {
      if ( v0 )
        (**v0)(v0, 1);
    }
    WeddingTask::ms_spWeddingTask = 0;
  }
}
// B5C2AC: using guessed type int WeddingTask::ms_spWeddingTask;

//----- (006E3E00) --------------------------------------------------------
int __thiscall WeddingTask::Recv_NC_ACT_WEDDING_HALL_RESERV_ACK(WeddingTask *this, PROTO_NC_ACT_WEDDING_HALL_RESERV_ACK *pkProto)
{
  int v2; // eax@1
  NiUnsharedGeometryGroup *v3; // eax@3
  char *v4; // eax@4
  char *v5; // eax@5
  NiUnsharedGeometryGroup *v6; // eax@8
  char *v7; // esi@10
  char *v8; // edi@10
  char *v10; // [sp-4h] [bp-2Ch]@4
  char acDateTime[32]; // [sp+4h] [bp-24h]@3

  v2 = pkProto->err;
  if ( (_WORD)v2 == 4864 )
  {
    if ( pkProto != (PROTO_NC_ACT_WEDDING_HALL_RESERV_ACK *)-10 )
    {
      v3 = TextData2::Get(0xD8DB2709);
      strftime(acDateTime, 0x1Fu, (const char *)v3, &pkProto->tm_ReservedTime);
    }
    v10 = acDateTime;
    v4 = (char *)TextData::Get(0x7AFED2CEu);
LABEL_5:
    v5 = fs(v4, v10);
    MsgBox::Modeless(MSGBOX_OK, v5);
    return 1;
  }
  if ( (_WORD)v2 == 4870 )
  {
    if ( pkProto != (PROTO_NC_ACT_WEDDING_HALL_RESERV_ACK *)-10 )
    {
      v6 = TextData2::Get(0xD8DB2709);
      strftime(acDateTime, 0x1Fu, (const char *)v6, &pkProto->tm_ReservedTime);
    }
    v10 = acDateTime;
    v4 = (char *)TextData::Get(0x8908C0D3);
    goto LABEL_5;
  }
  v7 = (char *)&this->vfptr;
  v8 = ErrMsgTable::GetErrMsg(v2);
  if ( *((_DWORD *)v7 + 1) )
  {
    (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v7 + 1) + 4))(25, v8, v7);
    if ( *((_DWORD *)v7 + 1) )
      (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v7 + 1) + 20))(25, v8, v7);
  }
  (*(void (__thiscall **)(char *, signed int, char *, char *))(*(_DWORD *)v7 + 20))(v7, 25, v8, v7);
  return 1;
}

//----- (006E3F00) --------------------------------------------------------
int __thiscall WeddingTask::Recv_NC_ACT_WEDDING_HALL_GUEST_ENTER_READY_ACK(WeddingTask *this, PROTO_NC_ACT_WEDDING_HALL_GUEST_ENTER_READY_ACK *pkProto)
{
  WeddingTask *v2; // esi@1
  GameFrameWork *v3; // ebx@2
  char *v4; // eax@4
  const char *v5; // eax@4
  int result; // eax@5
  char *v7; // eax@10
  char *v8; // esi@11
  char *v9; // edi@11

  v2 = this;
  if ( pkProto->err == 4928 )
  {
    v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v3 )
    {
      if ( Timer::TimeCheck(&pkProto->tm_EnterStart)
        && Timer::TimeCheck(&pkProto->tm_WeddingStart)
        && Timer::TimeCheck(&pkProto->tm_WeddingEnd) )
      {
        WeddingEntryWin::SetWeddingEntryData(v2->m_pkWeddingEntryWin, pkProto);
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkWeddingEntryWin->vfptr);
        return 1;
      }
      v4 = (char *)TextData3::Get(0x80703D5D);
      v5 = fs(v4);
      GameFrameWork::AddSysMsg(v3, v5);
    }
    return 0;
  }
  if ( pkProto->err == 4930 )
  {
    v7 = (char *)TextData::Get(0xEE1DE136);
    MsgBox::Modeless(MSGBOX_OK, v7);
    result = 1;
  }
  else
  {
    v8 = (char *)&this->vfptr;
    v9 = ErrMsgTable::GetErrMsg(pkProto->err);
    if ( *((_DWORD *)v8 + 1) )
    {
      (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v8 + 1) + 4))(25, v9, v8);
      if ( *((_DWORD *)v8 + 1) )
        (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v8 + 1) + 20))(25, v9, v8);
    }
    (*(void (__thiscall **)(char *, signed int, char *, char *))(*(_DWORD *)v8 + 20))(v8, 25, v9, v8);
    result = 1;
  }
  return result;
}

//----- (006E4030) --------------------------------------------------------
int __thiscall WeddingTask::Recv_NC_ACT_WEDDING_DIVORCE_REQ_ACK(WeddingTask *this, PROTO_ERRORCODE *pkProto)
{
  unsigned __int16 v2; // ax@1
  WeddingTask *v3; // esi@1
  char *v4; // esi@2
  NiUnsharedGeometryGroup *v5; // edi@2
  char *v6; // eax@7
  MsgBox *v7; // eax@7
  int v8; // edx@8
  char *v9; // eax@12
  MsgBox *v10; // eax@12
  char *v11; // esi@16
  NiUnsharedGeometryGroup *v12; // edi@16
  char *v13; // esi@21
  NiUnsharedGeometryGroup *v14; // edi@21
  char *v15; // eax@26
  char *v16; // esi@27
  char *v17; // edi@27

  v2 = pkProto->err;
  v3 = this;
  if ( pkProto->err == 4992 )
  {
    v4 = (char *)&this->vfptr;
    v5 = TextData::Get(0x69B4ABA3u);
    if ( *((_DWORD *)v4 + 1) )
    {
      (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, char *))(**((_DWORD **)v4 + 1) + 4))(25, v5, v4);
      if ( *((_DWORD *)v4 + 1) )
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, char *))(**((_DWORD **)v4 + 1) + 20))(25, v5, v4);
    }
    (*(void (__thiscall **)(char *, signed int, NiUnsharedGeometryGroup *, char *))(*(_DWORD *)v4 + 20))(v4, 25, v5, v4);
  }
  else
  {
    switch ( v2 )
    {
      case 0x1384u:
        v6 = (char *)TextData::Get(0xCAEDDB1D);
        v7 = MsgBox::Modeless(MSGBOX_DENIALCLOSE, v6);
        if ( v3 )
          v8 = (int)&v3->vfptr;
        else
          v8 = 0;
        ((void (__stdcall *)(int))v7->vfptr->SetMsgHooker)(v8);
        v3->m_bDivorce = 1;
        break;
      case 0x1385u:
        v9 = (char *)TextData::Get(0xA6E6E51u);
        v10 = MsgBox::Modeless(MSGBOX_OK, v9);
        if ( v3 )
          ((void (__stdcall *)(IDirectMessengerVtbl **))v10->vfptr->SetMsgHooker)(&v3->vfptr);
        else
          ((void (__stdcall *)(_DWORD))v10->vfptr->SetMsgHooker)(0);
        break;
      case 0x1386u:
        v11 = (char *)&this->vfptr;
        v12 = TextData::Get(0x7CBCC7B9u);
        if ( *((_DWORD *)v11 + 1) )
        {
          (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, char *))(**((_DWORD **)v11 + 1) + 4))(
            25,
            v12,
            v11);
          if ( *((_DWORD *)v11 + 1) )
            (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, char *))(**((_DWORD **)v11 + 1) + 20))(
              25,
              v12,
              v11);
        }
        (*(void (__thiscall **)(char *, signed int, NiUnsharedGeometryGroup *, char *))(*(_DWORD *)v11 + 20))(
          v11,
          25,
          v12,
          v11);
        break;
      case 0x1387u:
        v13 = (char *)&this->vfptr;
        v14 = TextData::Get(0x1030E51Du);
        if ( *((_DWORD *)v13 + 1) )
        {
          (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, char *))(**((_DWORD **)v13 + 1) + 4))(
            25,
            v14,
            v13);
          if ( *((_DWORD *)v13 + 1) )
            (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, char *))(**((_DWORD **)v13 + 1) + 20))(
              25,
              v14,
              v13);
        }
        (*(void (__thiscall **)(char *, signed int, NiUnsharedGeometryGroup *, char *))(*(_DWORD *)v13 + 20))(
          v13,
          25,
          v14,
          v13);
        break;
      case 0x1389u:
        v15 = (char *)TextData2::Get(0x89C0CDB9);
        MsgBox::Modeless(MSGBOX_OK, v15);
        break;
      default:
        v16 = (char *)&this->vfptr;
        v17 = ErrMsgTable::GetErrMsg(pkProto->err);
        if ( *((_DWORD *)v16 + 1) )
        {
          (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v16 + 1) + 4))(25, v17, v16);
          if ( *((_DWORD *)v16 + 1) )
            (*(void (__stdcall **)(signed int, char *, char *))(**((_DWORD **)v16 + 1) + 20))(25, v17, v16);
        }
        (*(void (__thiscall **)(char *, signed int, char *, char *))(*(_DWORD *)v16 + 20))(v16, 25, v17, v16);
        break;
    }
  }
  return 1;
}

//----- (006E4250) --------------------------------------------------------
void __thiscall WeddingTask::~WeddingTask(WeddingTask *this)
{
  this->vfptr = (NiRefObjectVtbl *)&WeddingTask::`vftable'{for `NiRefObject'};
  this->vfptr = (IDirectMessengerVtbl *)&WeddingTask::`vftable'{for `IDirectMessenger'};
  ITask::~ITask((ITask *)&this->vfptr);
}
// 9C40C8: using guessed type void (__thiscall *WeddingTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C40E4: using guessed type int (__thiscall *WeddingTask::`vftable'{for `NiRefObject'})(void *p, char);

//----- (006E4270) --------------------------------------------------------
char __thiscall WeddingTask::OnProcessNetMsg(WeddingTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  PgFrameWork *v6; // eax@14
  PgFrameWork *v7; // eax@16

  if ( iDepart != 4 )
  {
    if ( iDepart == 8 )
    {
      switch ( iCommand )
      {
        case 78:
          WeddingTask::Recv_NC_ACT_WEDDING_PROPOSE_WORD_REQ(this);
          return 1;
        case 80:
          WeddingTask::Recv_NC_ACT_WEDDING_PROPOSEACK_REQ(this, (PROTO_NC_ACT_WEDDING_PROPOSEACK_REQ *)pvData);
          return 1;
        case 82:
          WeddingTask::Recv_NC_ACT_WEDDING_PROPOSEREQ_ACK(this, (PROTO_NC_ACT_WEDDING_PROPOSEREQ_ACK *)pvData);
          return 1;
        case 89:
          WeddingTask::Recv_NC_ACT_WEDDING_HALL_GUEST_ENTER_ACK(
            this,
            (PROTO_NC_ACT_WEDDING_HALL_GUEST_ENTER_ACK *)pvData);
          return 1;
        case 87:
          WeddingTask::Recv_NC_ACT_WEDDING_HALL_GUEST_ENTER_READY_ACK(
            this,
            (PROTO_NC_ACT_WEDDING_HALL_GUEST_ENTER_READY_ACK *)pvData);
          return 1;
        case 93:
          WeddingTask::Recv_NC_ACT_WEDDING_DIVORCE_REQ_ACK(this, (PROTO_ERRORCODE *)pvData);
          return 1;
        case 84:
          WeddingTask::Recv_NC_ACT_WEDDING_HALL_RESERV_ACK(this, (PROTO_NC_ACT_WEDDING_HALL_RESERV_ACK *)pvData);
          return 1;
        default:
          return 0;
        case 90:
          return 1;
      }
      return 1;
    }
    return 0;
  }
  if ( iCommand == 129 )
  {
    this->m_MarryInfo.MarryStatus = *((_BYTE *)pvData + 8) & 0xF;
    this->m_MarryInfo.MarryDate = *(ShineDateTime *)((char *)pvData + 9);
    *(_QWORD *)&this->m_MarryInfo.WifeName.n5_name[0] = *(_QWORD *)((char *)pvData + 17);
    *(_QWORD *)&this->m_MarryInfo.WifeName.n5_code[2] = *(_QWORD *)((char *)pvData + 25);
    this->m_MarryInfo.WifeName.n5_code[4] = *(_DWORD *)((char *)pvData + 33);
    this->m_MarryInfo.WifeRegistNumber = *(_DWORD *)((char *)pvData + 37);
    v7 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v7 )
      WeddingInfoWin::SetWeddingInfo((WeddingInfoWin *)v7[24].m_uiMessageNum);
    return 1;
  }
  if ( iCommand != 148 )
    return 0;
  v6 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v6 )
  {
    WeddingInfoWin::SetWeddingInfo(
      (WeddingInfoWin *)v6[24].m_uiMessageNum,
      (PROTO_NC_CHAR_WEDDING_PARTNER_INFO_ACK *)pvData);
    return 1;
  }
  return 1;
}

//----- (006E43E0) --------------------------------------------------------
void __thiscall WeddingTask::WeddingTask(WeddingTask *this)
{
  WeddingTask *v1; // esi@1

  v1 = this;
  ITask::ITask((ITask *)&this->vfptr, 0);
  v1->m_pkWeddingProposeInputWin = 0;
  v1->m_pkWeddingProposeOutputWin = 0;
  v1->m_pkWeddingProposeResultWin = 0;
  v1->m_pkWeddingEntryWin = 0;
  v1->vfptr = (NiRefObjectVtbl *)&WeddingTask::`vftable'{for `NiRefObject'};
  v1->vfptr = (IDirectMessengerVtbl *)&WeddingTask::`vftable'{for `IDirectMessenger'};
  v1->m_MarryInfo.MarryStatus = 0;
  v1->m_MarryInfo.MarryDate = 0;
  v1->m_MarryInfo.WifeName.n5_code[0] = 0;
  v1->m_MarryInfo.WifeName.n5_code[1] = 0;
  v1->m_MarryInfo.WifeName.n5_code[2] = 0;
  v1->m_MarryInfo.WifeName.n5_code[3] = 0;
  v1->m_MarryInfo.WifeName.n5_code[4] = 0;
  v1->m_MarryInfo.WifeRegistNumber = -1;
  v1->m_bDivorce = 0;
}
// 9C40C8: using guessed type void (__thiscall *WeddingTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C40E4: using guessed type int (__thiscall *WeddingTask::`vftable'{for `NiRefObject'})(void *p, char);

//----- (006E4430) --------------------------------------------------------
void __cdecl WeddingTask::Create(IDirectMessenger *pkMsgHooker)
{
  int v1; // eax@1
  WeddingTask *v2; // eax@2
  int v3; // eax@3
  int v4; // esi@3
  void (__thiscall ***v5)(_DWORD, _DWORD); // edi@7

  v1 = WeddingTask::ms_spWeddingTask;
  if ( !WeddingTask::ms_spWeddingTask )
  {
    v2 = (WeddingTask *)operator new(0x74u);
    if ( v2 )
    {
      WeddingTask::WeddingTask(v2);
      v4 = v3;
    }
    else
    {
      v4 = 0;
    }
    v1 = WeddingTask::ms_spWeddingTask;
    if ( WeddingTask::ms_spWeddingTask != v4 )
    {
      if ( WeddingTask::ms_spWeddingTask )
      {
        v5 = (void (__thiscall ***)(_DWORD, _DWORD))WeddingTask::ms_spWeddingTask;
        if ( !InterlockedDecrement((volatile LONG *)(WeddingTask::ms_spWeddingTask + 4)) )
        {
          if ( v5 )
            (**v5)(v5, 1);
        }
      }
      v1 = v4;
      WeddingTask::ms_spWeddingTask = v4;
      if ( v4 )
      {
        InterlockedIncrement((volatile LONG *)(v4 + 4));
        v1 = WeddingTask::ms_spWeddingTask;
      }
    }
  }
  (**(void (__cdecl ***)(IDirectMessenger *))(v1 + 8))(pkMsgHooker);
}
// B5C2AC: using guessed type int WeddingTask::ms_spWeddingTask;

//----- (006E44F0) --------------------------------------------------------
WeddingTask *__thiscall WeddingTask::`scalar deleting destructor'(WeddingTask *this, unsigned int a2)
{
  WeddingTask *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&WeddingTask::`vftable'{for `NiRefObject'};
  this->vfptr = (IDirectMessengerVtbl *)&WeddingTask::`vftable'{for `IDirectMessenger'};
  ITask::~ITask((ITask *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C40C8: using guessed type void (__thiscall *WeddingTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C40E4: using guessed type int (__thiscall *WeddingTask::`vftable'{for `NiRefObject'})(void *p, char);

//----- (006E4520) --------------------------------------------------------
bool __thiscall DirectionControllers::IsRunDirection(DirectionControllers *this)
{
  return this->m_spCurrentController.m_pObject != 0;
}

//----- (006E4530) --------------------------------------------------------
void __thiscall DirectionController::Update(DirectionController *this, float fAccolTime)
{
  DirectionController *v2; // edi@1
  NiPointer<TimerController> *v3; // esi@1

  v2 = this;
  v3 = this->m_vecRunTimers._Myfirst;
  if ( this->m_vecRunTimers._Mylast != v3 )
  {
    do
    {
      ((void (__stdcall *)(_DWORD))v3->m_pObject->vfptr[1].__vecDelDtor)(LODWORD(fAccolTime));
      ++v3;
    }
    while ( v2->m_vecRunTimers._Mylast != v3 );
  }
}

//----- (006E4560) --------------------------------------------------------
char __thiscall DirectionController::IsRuntimer(DirectionController *this)
{
  DirectionController *v1; // edi@1
  NiPointer<TimerController> *v2; // esi@1
  char result; // al@4

  v1 = this;
  v2 = this->m_vecRunTimers._Myfirst;
  if ( this->m_vecRunTimers._Mylast == v2 )
  {
LABEL_4:
    result = 0;
  }
  else
  {
    while ( !TimerController::IsEnable(v2->m_pObject) )
    {
      ++v2;
      if ( v1->m_vecRunTimers._Mylast == v2 )
        goto LABEL_4;
    }
    result = 1;
  }
  return result;
}

//----- (006E4590) --------------------------------------------------------
char __thiscall DirectionController::RunTimer(DirectionController *this)
{
  DirectionController *v1; // edi@1
  NiPointer<TimerController> *v2; // esi@1

  v1 = this;
  v2 = this->m_vecRunTimers._Myfirst;
  if ( this->m_vecRunTimers._Mylast != v2 )
  {
    do
    {
      TimerController::OnTimerEnable(v2->m_pObject, 1);
      ++v2;
    }
    while ( v1->m_vecRunTimers._Mylast != v2 );
  }
  return 1;
}

//----- (006E45C0) --------------------------------------------------------
void __thiscall DirectionControllers::Update(DirectionControllers *this, float fAccolTime)
{
  DirectionControllers *v2; // ebx@1
  DirectionController *v3; // edi@1
  NiPointer<TimerController> *i; // esi@2
  DirectionController *v5; // edi@4
  TimerController **v6; // esi@4
  DirectionController *v7; // esi@7

  v2 = this;
  v3 = this->m_spCurrentController.m_pObject;
  if ( v3 )
  {
    for ( i = v3->m_vecRunTimers._Myfirst; v3->m_vecRunTimers._Mylast != i; ++i )
      ((void (__stdcall *)(_DWORD))i->m_pObject->vfptr[1].__vecDelDtor)(LODWORD(fAccolTime));
    v5 = v2->m_spCurrentController.m_pObject;
    v6 = &v5->m_vecRunTimers._Myfirst->m_pObject;
    if ( (TimerController **)v5->m_vecRunTimers._Mylast == v6 )
    {
LABEL_7:
      v7 = v2->m_spCurrentController.m_pObject;
      if ( v7 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
        {
          if ( v7 )
            v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
        }
        v2->m_spCurrentController.m_pObject = 0;
      }
    }
    else
    {
      while ( !TimerController::IsEnable(*v6) )
      {
        ++v6;
        if ( (TimerController **)v5->m_vecRunTimers._Mylast == v6 )
          goto LABEL_7;
      }
    }
  }
}

//----- (006E4650) --------------------------------------------------------
char __thiscall DirectionControllers::DoRunDirection(DirectionControllers *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *rStrName)
{
  DirectionControllers *v2; // edi@1
  char result; // al@2
  DirectionController *v4; // edi@4
  TimerController **i; // esi@4

  v2 = this;
  if ( this->m_spCurrentController.m_pObject
    || (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::find(
          (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *)&this->m_mapDirectionCtrls,
          (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > > *)&rStrName,
          rStrName),
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v2->m_mapDirectionCtrls._Myhead == rStrName) )
  {
    result = 0;
  }
  else
  {
    NiPointer<NiActorManager>::operator=(
      (NiPointer<NiPixelData> *)&v2->m_spCurrentController,
      (NiPointer<NiPixelData> *)&rStrName[1]._Bx._Alias[12]);
    v4 = v2->m_spCurrentController.m_pObject;
    for ( i = &v4->m_vecRunTimers._Myfirst->m_pObject; (TimerController **)v4->m_vecRunTimers._Mylast != i; ++i )
      TimerController::OnTimerEnable(*i, 1);
    result = 1;
  }
  return result;
}

//----- (006E46B0) --------------------------------------------------------
char __thiscall DirectionController::AddTimer(DirectionController *this, NiPointer<TimerController> spTimer)
{
  TimerController *v2; // esi@1

  std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData>>>::push_back(
    (std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData> > > *)&this->m_vecRunTimers,
    (NiPointer<PgSprData> *)&spTimer);
  v2 = spTimer.m_pObject;
  if ( spTimer.m_pObject && !InterlockedDecrement((volatile LONG *)&spTimer.m_pObject->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  return 1;
}

//----- (006E4730) --------------------------------------------------------
char __thiscall DirectionControllers::AddController(DirectionControllers *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *rStrName, NiPointer<DirectionController> spController)
{
  DirectionControllers *v3; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v4; // eax@1
  unsigned int v5; // ecx@2
  int v6; // eax@2
  char *v7; // eax@5
  DirectionController *v8; // esi@8
  char v9; // al@12
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<DirectionController> > *v10; // eax@13
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *v11; // eax@13
  DirectionController *v12; // esi@14
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > >,bool> v13; // [sp+10h] [bp-3Ch]@6
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v14; // [sp+18h] [bp-34h]@1
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<DirectionController> > result; // [sp+1Ch] [bp-30h]@13
  int v16; // [sp+48h] [bp-4h]@1

  v3 = this;
  v16 = 0;
  v4 = std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::_Lbound(
         (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > *)&this->m_mapDirectionCtrls,
         rStrName);
  v14 = v4;
  if ( v4 == (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)v3->m_mapDirectionCtrls._Myhead )
    goto LABEL_20;
  v5 = v4->_Myval.first._Mysize;
  v6 = (int)&v4->_Myval;
  if ( *(_DWORD *)(v6 + 20) >= 0x10u )
    v6 = *(_DWORD *)v6;
  if ( std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
         rStrName,
         0,
         rStrName->_Mysize,
         (const char *)v6,
         v5) < 0 )
  {
LABEL_20:
    *(_DWORD *)&v13.second = v3->m_mapDirectionCtrls._Myhead;
    v7 = (char *)&v13.second;
  }
  else
  {
    v7 = (char *)&v14;
  }
  if ( v3->m_mapDirectionCtrls._Myhead == *(std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<DirectionController> > >,0> >::_Node **)v7 )
  {
    v10 = std::make_pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController> &>(
            &result,
            rStrName,
            &spController);
    LOBYTE(v16) = 1;
    v11 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>>>((std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<DirectionController> > >,0> > *)&v3->m_mapDirectionCtrls.comp, v10);
    std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>,0>>::_Linsert(
      (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> > *)&v3->m_mapDirectionCtrls,
      &v13,
      v11,
      0);
    LOBYTE(v16) = 0;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiNode>>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiNode>>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > *)&result);
    v16 = -1;
    if ( spController.m_pObject )
    {
      v12 = spController.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spController.m_pObject->m_uiRefCount) )
      {
        if ( v12 )
          v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
      }
    }
    v9 = 1;
  }
  else
  {
    v8 = spController.m_pObject;
    v16 = -1;
    if ( spController.m_pObject && !InterlockedDecrement((volatile LONG *)&spController.m_pObject->m_uiRefCount) )
    {
      if ( v8 )
        v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    }
    v9 = 0;
  }
  return v9;
}

//----- (006E4870) --------------------------------------------------------
NiPointer<DirectionControllers> *__cdecl CreateMetamorphosisDirection(NiPointer<DirectionControllers> *result, Char *pChar)
{
  PgSprData *v2; // eax@1
  DirectionControllers *v3; // eax@2
  DirectionController *v4; // eax@6
  DirectionController *v5; // edi@6
  PgSprData *v6; // eax@11
  TimerController *v7; // eax@12
  TimerController *v8; // edi@12
  PgSprData *v9; // esi@18
  PgSprData *v10; // eax@21
  DirectionController *v11; // eax@22
  DirectionController *v12; // esi@22
  void (__thiscall ***v13)(_DWORD, _DWORD); // esi@41
  DirectionController *v14; // eax@44
  DirectionController *v15; // edi@44
  TimerController *v16; // eax@49
  TimerController *v17; // eax@50
  TimerController *v18; // edi@50
  PgSprData *v19; // esi@56
  DirectionController *v20; // eax@59
  DirectionController *v21; // eax@60
  DirectionController *v22; // esi@60
  void (__thiscall ***v23)(_DWORD, _DWORD); // esi@79
  char (__thiscall *v25)(Char *, const char *); // [sp+0h] [bp-78h]@16
  int v26; // [sp+4h] [bp-74h]@16
  Char *v27; // [sp+8h] [bp-70h]@16
  DirectionController *v28; // [sp+Ch] [bp-6Ch]@16
  int v29; // [sp+10h] [bp-68h]@16
  signed int v30; // [sp+14h] [bp-64h]@16
  float fDelayTime; // [sp+18h] [bp-60h]@7
  int v32; // [sp+2Ch] [bp-4Ch]@1
  NiPointer<DirectionController> spUnMetamorDirection; // [sp+34h] [bp-44h]@16
  NiPointer<TimerController> spUnMetaActionEvent; // [sp+38h] [bp-40h]@14
  NiPointer<DirectionController> spMetamorDirection; // [sp+3Ch] [bp-3Ch]@9
  NiPointer<DirectionControllers> *v36; // [sp+40h] [bp-38h]@1
  float v37; // [sp+44h] [bp-34h]@7
  NiPointer<PgSprData> _Val; // [sp+48h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > rStrName; // [sp+4Ch] [bp-2Ch]@26
  int v40; // [sp+74h] [bp-4h]@1

  v36 = result;
  v32 = 0;
  v2 = (PgSprData *)operator new(0x1Cu);
  _Val.m_pObject = v2;
  v40 = 1;
  if ( v2 )
    DirectionControllers::DirectionControllers((DirectionControllers *)v2);
  else
    v3 = 0;
  result->m_pObject = v3;
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v40 = 0;
  v32 = 1;
  v4 = (DirectionController *)operator new(0x18u);
  v5 = v4;
  if ( v4 )
  {
    fDelayTime = COERCE_FLOAT(&NiRefObject::ms_uiObjects);
    v4->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
    v4->m_uiRefCount = 0;
    InterlockedIncrement((volatile LONG *)LODWORD(fDelayTime));
    v5->vfptr = (NiRefObjectVtbl *)&DirectionController::`vftable';
    v5->m_vecRunTimers._Myfirst = 0;
    v5->m_vecRunTimers._Mylast = 0;
    v5->m_vecRunTimers._Myend = 0;
    v37 = *(float *)&v5;
  }
  else
  {
    v37 = 0.0;
    v5 = 0;
  }
  spMetamorDirection.m_pObject = v5;
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v40 = 2;
  v6 = (PgSprData *)operator new(0x48u);
  _Val.m_pObject = v6;
  LOBYTE(v40) = 3;
  if ( v6 )
  {
    TimerController::TimerController((TimerController *)v6);
    v8 = v7;
  }
  else
  {
    v8 = 0;
  }
  spUnMetaActionEvent.m_pObject = v8;
  if ( v8 )
    InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  _Val.m_pObject = (PgSprData *)&v25;
  v30 = 15;
  v29 = 0;
  LOBYTE(v40) = 4;
  LOBYTE(v25) = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v25,
    "Metamorphosis",
    0xDu);
  TimerController::SetEventName(v8, *(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v25);
  TimerController::SetDelayTime(v8, 0.0);
  _Val.m_pObject = (PgSprData *)&v29;
  v25 = (char (__thiscall *)(Char *, const char *))Char::ActAction_BaseMode;
  v26 = 0;
  v27 = pChar;
  v29 = 0;
  v30 = 0;
  fDelayTime = 0.0;
  v28 = spUnMetamorDirection.m_pObject;
  boost::function1<void,char const *,std::allocator<void>>::assign_to<boost::_bi::bind_t<bool,boost::_mfi::mf1<bool,Char,char const *>,boost::_bi::list2<boost::_bi::value<Char *>,boost::arg<1>>>>(
    (boost::function1<void,char const *,std::allocator<void> > *)&v29,
    *(boost::_bi::bind_t<bool,boost::_mfi::mf1<bool,Char,char const *>,boost::_bi::list2<boost::_bi::value<Char *>,boost::arg<1> > > *)&v25);
  TimerController::SetCallBackFunc(v8, *(boost::function<void __cdecl(char const *),std::allocator<void> > *)&v29);
  _Val.m_pObject = (PgSprData *)v8;
  if ( v8 )
    InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  LOBYTE(v40) = 5;
  std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData>>>::push_back(
    (std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData> > > *)(LODWORD(v37) + 8),
    &_Val);
  v9 = _Val.m_pObject;
  LOBYTE(v40) = 4;
  if ( _Val.m_pObject && !InterlockedDecrement((volatile LONG *)&_Val.m_pObject->m_uiRefCount) )
    v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
  v10 = (PgSprData *)operator new(0x48u);
  _Val.m_pObject = v10;
  LOBYTE(v40) = 6;
  if ( v10 )
  {
    TimerController::TimerController((TimerController *)v10);
    v12 = v11;
  }
  else
  {
    v12 = 0;
  }
  spUnMetamorDirection.m_pObject = v12;
  if ( v12 )
    InterlockedIncrement((volatile LONG *)&v12->m_uiRefCount);
  LOBYTE(v40) = 7;
  TimerController::SetDelayTime((TimerController *)v12, 2.0);
  _Val.m_pObject = (PgSprData *)&v25;
  v30 = 15;
  v29 = 0;
  LOBYTE(v25) = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v25,
    "bird_idle",
    9u);
  TimerController::SetEventName(
    (TimerController *)v12,
    *(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v25);
  _Val.m_pObject = (PgSprData *)&v29;
  v25 = (char (__thiscall *)(Char *, const char *))Char::ActAction_BaseMode;
  v26 = 0;
  v27 = pChar;
  rStrName._Mysize = 0;
  v29 = 0;
  v30 = 0;
  fDelayTime = 0.0;
  v28 = spUnMetamorDirection.m_pObject;
  boost::function1<void,char const *,std::allocator<void>>::assign_to<boost::_bi::bind_t<bool,boost::_mfi::mf1<bool,Char,char const *>,boost::_bi::list2<boost::_bi::value<Char *>,boost::arg<1>>>>(
    (boost::function1<void,char const *,std::allocator<void> > *)&v29,
    *(boost::_bi::bind_t<bool,boost::_mfi::mf1<bool,Char,char const *>,boost::_bi::list2<boost::_bi::value<Char *>,boost::arg<1> > > *)&v25);
  TimerController::SetCallBackFunc(
    (TimerController *)v12,
    *(boost::function<void __cdecl(char const *),std::allocator<void> > *)&v29);
  _Val.m_pObject = (PgSprData *)v12;
  if ( v12 )
    InterlockedIncrement((volatile LONG *)&v12->m_uiRefCount);
  LOBYTE(v40) = 8;
  std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData>>>::push_back(
    (std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData> > > *)(LODWORD(v37) + 8),
    &_Val);
  LOBYTE(v40) = 7;
  if ( _Val.m_pObject && !InterlockedDecrement((volatile LONG *)&_Val.m_pObject->m_uiRefCount) )
    ((void (__stdcall *)(signed int))_Val.m_pObject->vfptr->__vecDelDtor)(1);
  rStrName._Myres = 15;
  rStrName._Mysize = 0;
  rStrName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&rStrName, "Metamorphosis", 0xDu);
  LOBYTE(v40) = 9;
  _Val.m_pObject = (PgSprData *)&fDelayTime;
  fDelayTime = v37;
  if ( v37 != 0.0 )
    InterlockedIncrement((volatile LONG *)(LODWORD(v37) + 4));
  DirectionControllers::AddController(v36->m_pObject, &rStrName, LODWORD(fDelayTime));
  if ( rStrName._Myres >= 0x10 )
    operator delete(rStrName._Bx._Ptr);
  LOBYTE(v40) = 4;
  if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) )
    v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
  LOBYTE(v40) = 2;
  if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
    v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
  v13 = (void (__thiscall ***)(_DWORD, _DWORD))LODWORD(v37);
  LOBYTE(v40) = 0;
  if ( v37 != 0.0 && !InterlockedDecrement((volatile LONG *)(LODWORD(v37) + 4)) )
    (**v13)(v13, 1);
  v14 = (DirectionController *)operator new(0x18u);
  v15 = v14;
  if ( v14 )
  {
    fDelayTime = COERCE_FLOAT(&NiRefObject::ms_uiObjects);
    v14->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
    v14->m_uiRefCount = 0;
    InterlockedIncrement((volatile LONG *)LODWORD(fDelayTime));
    v15->vfptr = (NiRefObjectVtbl *)&DirectionController::`vftable';
    v15->m_vecRunTimers._Myfirst = 0;
    v15->m_vecRunTimers._Mylast = 0;
    v15->m_vecRunTimers._Myend = 0;
    v37 = *(float *)&v15;
  }
  else
  {
    v37 = 0.0;
    v15 = 0;
  }
  spUnMetamorDirection.m_pObject = v15;
  if ( v15 )
    InterlockedIncrement((volatile LONG *)&v15->m_uiRefCount);
  v40 = 10;
  v16 = (TimerController *)operator new(0x48u);
  spUnMetaActionEvent.m_pObject = v16;
  LOBYTE(v40) = 11;
  if ( v16 )
  {
    TimerController::TimerController(v16);
    v18 = v17;
  }
  else
  {
    v18 = 0;
  }
  spUnMetaActionEvent.m_pObject = v18;
  if ( v18 )
    InterlockedIncrement((volatile LONG *)&v18->m_uiRefCount);
  spMetamorDirection.m_pObject = (DirectionController *)&v25;
  v30 = 15;
  v29 = 0;
  LOBYTE(v40) = 12;
  LOBYTE(v25) = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v25,
    "UnMetamorphosis",
    0xFu);
  TimerController::SetEventName(v18, *(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v25);
  TimerController::SetDelayTime(v18, 0.0);
  spMetamorDirection.m_pObject = (DirectionController *)&v29;
  v25 = (char (__thiscall *)(Char *, const char *))Char::ActAction_BaseMode;
  v26 = 0;
  v27 = pChar;
  v29 = 0;
  v30 = 0;
  fDelayTime = 0.0;
  v28 = spUnMetamorDirection.m_pObject;
  boost::function1<void,char const *,std::allocator<void>>::assign_to<boost::_bi::bind_t<bool,boost::_mfi::mf1<bool,Char,char const *>,boost::_bi::list2<boost::_bi::value<Char *>,boost::arg<1>>>>(
    (boost::function1<void,char const *,std::allocator<void> > *)&v29,
    *(boost::_bi::bind_t<bool,boost::_mfi::mf1<bool,Char,char const *>,boost::_bi::list2<boost::_bi::value<Char *>,boost::arg<1> > > *)&v25);
  TimerController::SetCallBackFunc(v18, *(boost::function<void __cdecl(char const *),std::allocator<void> > *)&v29);
  _Val.m_pObject = (PgSprData *)v18;
  if ( v18 )
    InterlockedIncrement((volatile LONG *)&v18->m_uiRefCount);
  LOBYTE(v40) = 13;
  std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData>>>::push_back(
    (std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData> > > *)(LODWORD(v37) + 8),
    &_Val);
  v19 = _Val.m_pObject;
  LOBYTE(v40) = 12;
  if ( _Val.m_pObject && !InterlockedDecrement((volatile LONG *)&_Val.m_pObject->m_uiRefCount) )
    v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
  v20 = (DirectionController *)operator new(0x48u);
  spMetamorDirection.m_pObject = v20;
  LOBYTE(v40) = 14;
  if ( v20 )
  {
    TimerController::TimerController((TimerController *)v20);
    v22 = v21;
  }
  else
  {
    v22 = 0;
  }
  spMetamorDirection.m_pObject = v22;
  if ( v22 )
    InterlockedIncrement((volatile LONG *)&v22->m_uiRefCount);
  LOBYTE(v40) = 15;
  TimerController::SetDelayTime((TimerController *)v22, 2.0);
  _Val.m_pObject = (PgSprData *)&v25;
  v30 = 15;
  v29 = 0;
  LOBYTE(v25) = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v25,
    "dummy",
    5u);
  TimerController::SetEventName(
    (TimerController *)v22,
    *(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&v25);
  _Val.m_pObject = (PgSprData *)&v29;
  rStrName._Myres = (unsigned int)pChar;
  v25 = Char::Shape_UnMetamorphosis;
  v26 = 0;
  v27 = pChar;
  rStrName._Mysize = 0;
  v29 = 0;
  v30 = 0;
  fDelayTime = 0.0;
  v28 = spUnMetamorDirection.m_pObject;
  boost::function1<void,char const *,std::allocator<void>>::assign_to<boost::_bi::bind_t<bool,boost::_mfi::mf1<bool,Char,char const *>,boost::_bi::list2<boost::_bi::value<Char *>,boost::arg<1>>>>(
    (boost::function1<void,char const *,std::allocator<void> > *)&v29,
    *(boost::_bi::bind_t<bool,boost::_mfi::mf1<bool,Char,char const *>,boost::_bi::list2<boost::_bi::value<Char *>,boost::arg<1> > > *)&v25);
  TimerController::SetCallBackFunc(
    (TimerController *)v22,
    *(boost::function<void __cdecl(char const *),std::allocator<void> > *)&v29);
  _Val.m_pObject = (PgSprData *)v22;
  if ( v22 )
    InterlockedIncrement((volatile LONG *)&v22->m_uiRefCount);
  LOBYTE(v40) = 16;
  std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData>>>::push_back(
    (std::vector<NiPointer<PgSprData>,std::allocator<NiPointer<PgSprData> > > *)(LODWORD(v37) + 8),
    &_Val);
  LOBYTE(v40) = 15;
  if ( _Val.m_pObject && !InterlockedDecrement((volatile LONG *)&_Val.m_pObject->m_uiRefCount) )
    ((void (__stdcall *)(signed int))_Val.m_pObject->vfptr->__vecDelDtor)(1);
  rStrName._Myres = 15;
  rStrName._Mysize = 0;
  rStrName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&rStrName, "UnMetamorphosis", 0xFu);
  LOBYTE(v40) = 17;
  _Val.m_pObject = (PgSprData *)&fDelayTime;
  fDelayTime = v37;
  if ( v37 != 0.0 )
    InterlockedIncrement((volatile LONG *)(LODWORD(v37) + 4));
  DirectionControllers::AddController(v36->m_pObject, &rStrName, LODWORD(fDelayTime));
  if ( rStrName._Myres >= 0x10 )
    operator delete(rStrName._Bx._Ptr);
  LOBYTE(v40) = 12;
  if ( v22 && !InterlockedDecrement((volatile LONG *)&v22->m_uiRefCount) )
    v22->vfptr->__vecDelDtor((NiRefObject *)v22, 1u);
  LOBYTE(v40) = 10;
  if ( v18 && !InterlockedDecrement((volatile LONG *)&v18->m_uiRefCount) )
    v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
  v23 = (void (__thiscall ***)(_DWORD, _DWORD))LODWORD(v37);
  LOBYTE(v40) = 0;
  if ( v37 != 0.0 && !InterlockedDecrement((volatile LONG *)(LODWORD(v37) + 4)) )
    (**v23)(v23, 1);
  return v36;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9C4150: using guessed type int (__thiscall *DirectionController::`vftable')(void *p, int);

//----- (006E4EE0) --------------------------------------------------------
boost::detail::function::unusable *__cdecl boost::detail::function::void_function_obj_invoker1<boost::_bi::bind_t<bool,boost::_mfi::mf1<bool,Char,char const *>,boost::_bi::list2<boost::_bi::value<Char *>,boost::arg<1>>>,void,char const *>::invoke(boost::detail::function::unusable *result, boost::detail::function::any_pointer function_obj_ptr, const char *a0)
{
  (*(void (__thiscall **)(int, const char *))function_obj_ptr.obj_ptr)(
    *((_DWORD *)function_obj_ptr.obj_ptr + 1) + *((_DWORD *)function_obj_ptr.obj_ptr + 2),
    a0);
  return result;
}

//----- (006E4F00) --------------------------------------------------------
void __thiscall boost::function1<void,char const *,std::allocator<void>>::assign_to<boost::_bi::bind_t<bool,boost::_mfi::mf1<bool,Char,char const *>,boost::_bi::list2<boost::_bi::value<Char *>,boost::arg<1>>>>(boost::function1<void,char const *,std::allocator<void> > *this, boost::_bi::bind_t<bool,boost::_mfi::mf1<bool,Char,char const *>,boost::_bi::list2<boost::_bi::value<Char *>,boost::arg<1> > > f)
{
  boost::function1<void,char const *,std::allocator<void> > *v2; // esi@1
  NiUnsharedGeometryGroup *v3; // eax@2
  NiUnsharedGeometryGroup v4; // [sp+4h] [bp-20h]@1
  NiGeometryGroupVtbl *v5; // [sp+10h] [bp-14h]@1
  std::exception pExceptionObject; // [sp+14h] [bp-10h]@5
  char *_What; // [sp+20h] [bp-4h]@5

  v2 = this;
  v4.m_uiRefCount = *((_DWORD *)&f.f_.f_ + 1);
  v4.vfptr = (NiGeometryGroupVtbl *)f.f_.f_;
  v4.m_pkD3DDevice = (IDirect3DDevice9 *)f.l_.a1_.t_;
  v5 = *(NiGeometryGroupVtbl **)&f.l_.a2_;
  if ( !NiD3DTimeSyncController::CanBeExtracted() )
  {
    v2->invoker = boost::detail::function::void_function_obj_invoker1<boost::_bi::bind_t<bool,boost::_mfi::mf1<bool,Char,char const *>,boost::_bi::list2<boost::_bi::value<Char *>,boost::arg<1>>>,void,char const *>::invoke;
    v2->manager = boost::detail::function::functor_manager<boost::_bi::bind_t<void,boost::_mfi::mf1<void,Char,char const *>,boost::_bi::list2<boost::_bi::value<Char *>,boost::arg<1>>>,std::allocator<void>>::manage;
    v3 = (NiUnsharedGeometryGroup *)operator new(0x10u);
    if ( !v3 )
    {
      _What = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&_What);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
    *v3 = v4;
    v3[1].vfptr = v5;
    v2->functor.obj_ptr = v3;
  }
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (006E4FA0) --------------------------------------------------------
std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<DirectionController> > *__cdecl std::make_pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController> &>(std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<DirectionController> > *result, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Val1, NiPointer<DirectionController> *_Val2)
{
  DirectionController *v3; // eax@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Right; // [sp+10h] [bp-2Ch]@1
  int v6; // [sp+38h] [bp-4h]@1

  _Right._Myres = 15;
  _Right._Mysize = 0;
  _Right._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Right, _Val1, 0, 0xFFFFFFFF);
  result->first._Myres = 15;
  result->first._Mysize = 0;
  v6 = 0;
  result->first._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&result->first, &_Right);
  v3 = _Val2->m_pObject;
  result->second = (NiPointer<DirectionController>)_Val2->m_pObject;
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  if ( _Right._Myres >= 0x10 )
    operator delete(_Right._Bx._Ptr);
  return result;
}

//----- (006E5050) --------------------------------------------------------
DirectionController *__thiscall DirectionController::`scalar deleting destructor'(DirectionController *this, unsigned int a2)
{
  DirectionController *v2; // esi@1
  NiPointer<TimerController> *v3; // eax@1

  v2 = this;
  v3 = this->m_vecRunTimers._Myfirst;
  if ( v3 )
  {
    std::_Destroy_range<std::allocator<NiPointer<PgSprData>>>(
      (NiPointer<PgSprData> *)v3,
      (NiPointer<PgSprData> *)this->m_vecRunTimers._Mylast);
    operator delete(v2->m_vecRunTimers._Myfirst);
  }
  v2->m_vecRunTimers._Myfirst = 0;
  v2->m_vecRunTimers._Mylast = 0;
  v2->m_vecRunTimers._Myend = 0;
  v2->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);

//----- (006E50F0) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<DirectionController> > >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>>>(std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<DirectionController> > >,0> > *this, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<DirectionController> > *_Val)
{
  std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<DirectionController> > >,0> > *v2; // esi@1
  void *v3; // edi@1
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<DirectionController> > *v4; // ebx@3
  DirectionController *v5; // eax@3
  int v7; // [sp+0h] [bp-38h]@1
  std::exception pExceptionObject; // [sp+10h] [bp-28h]@6
  char *v9; // [sp+1Ch] [bp-1Ch]@2
  char *v10; // [sp+20h] [bp-18h]@2
  void *p; // [sp+24h] [bp-14h]@1
  int *v12; // [sp+28h] [bp-10h]@1
  int v13; // [sp+34h] [bp-4h]@2

  v12 = &v7;
  v2 = this;
  v3 = operator new(0x30u);
  p = v3;
  if ( !v3 )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  *(_DWORD *)v3 = v2->_Myhead;
  *((_DWORD *)v3 + 1) = v2->_Myhead;
  *((_DWORD *)v3 + 2) = v2->_Myhead;
  *((_WORD *)v3 + 22) = 0;
  v13 = 0;
  v10 = (char *)v3 + 12;
  v9 = (char *)v3 + 12;
  LOBYTE(v13) = 1;
  if ( v3 != (void *)-12 )
  {
    v4 = _Val;
    *((_DWORD *)v3 + 8) = 15;
    *((_DWORD *)v3 + 7) = 0;
    *((_BYTE *)v3 + 12) = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)v3 + 12),
      &v4->first);
    v5 = v4->second.m_pObject;
    *((_DWORD *)v3 + 10) = v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  }
  return (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<DirectionController> > >,0> >::_Node *)v3;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (006E51E0) --------------------------------------------------------
void __thiscall std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>>::~map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiTexture>>>>(std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > > > *this)
{
  std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > > > *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *v2; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > v3; // ST04_4@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > result; // [sp+8h] [bp-14h]@1
  std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > > > *v5; // [sp+Ch] [bp-10h]@1
  int v6; // [sp+18h] [bp-4h]@1

  v1 = this;
  v5 = this;
  v2 = this->_Myhead;
  v3._Ptr = v2->_Left;
  v6 = 0;
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *)&this->comp,
    &result,
    v3,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > >)v2);
  operator delete(v1->_Myhead);
}

//----- (006E5240) --------------------------------------------------------
void __thiscall DirectionControllers::DirectionControllers(DirectionControllers *this)
{
  DirectionControllers *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<DirectionController> > >,0> >::_Node *v2; // eax@1
  std::exception pExceptionObject; // [sp+Ch] [bp-20h]@3
  DirectionControllers *v4; // [sp+18h] [bp-14h]@1
  char *_What; // [sp+1Ch] [bp-10h]@3
  int v6; // [sp+28h] [bp-4h]@1

  v1 = this;
  v4 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v1->vfptr = (NiRefObjectVtbl *)&DirectionControllers::`vftable';
  v6 = 0;
  v1->m_mapDirectionCtrls._Mysize = 0;
  v2 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<DirectionController> > >,0> >::_Node *)operator new(0x30u);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_mapDirectionCtrls._Myhead = v2;
  v2->_Left = v2;
  v1->m_mapDirectionCtrls._Myhead->_Parent = v1->m_mapDirectionCtrls._Myhead;
  v1->m_mapDirectionCtrls._Myhead->_Right = v1->m_mapDirectionCtrls._Myhead;
  v1->m_mapDirectionCtrls._Myhead->_Color = 1;
  v1->m_mapDirectionCtrls._Myhead->_Isnil = 1;
  v1->m_spCurrentController.m_pObject = 0;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9C4158: using guessed type int (__thiscall *DirectionControllers::`vftable')(void *p, char);

//----- (006E5300) --------------------------------------------------------
void __thiscall DirectionControllers::~DirectionControllers(DirectionControllers *this)
{
  DirectionControllers *v1; // edi@1
  DirectionController *v2; // esi@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > v3; // ST08_4@5
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > v4; // ST04_4@5
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > > result; // [sp+10h] [bp-18h]@5
  std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<DirectionController> > > > *v6; // [sp+14h] [bp-14h]@5
  DirectionControllers *v7; // [sp+18h] [bp-10h]@1
  int v8; // [sp+24h] [bp-4h]@1

  v1 = this;
  v7 = this;
  v2 = this->m_spCurrentController.m_pObject;
  v8 = 1;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v6 = &v1->m_mapDirectionCtrls;
  v3._Ptr = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)v1->m_mapDirectionCtrls._Myhead;
  v4._Ptr = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> >::_Node *)v1->m_mapDirectionCtrls._Myhead->_Left;
  LOBYTE(v8) = 2;
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<DirectionController>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<DirectionController>>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<NiTexture>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<NiTexture> > >,0> > *)&v1->m_mapDirectionCtrls,
    &result,
    v4,
    v3);
  operator delete(v1->m_mapDirectionCtrls._Myhead);
  v1->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);

//----- (006E53A0) --------------------------------------------------------
DirectionControllers *__thiscall DirectionControllers::`scalar deleting destructor'(DirectionControllers *this, unsigned int a2)
{
  DirectionControllers *v2; // esi@1

  v2 = this;
  DirectionControllers::~DirectionControllers(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006E53D0) --------------------------------------------------------
int __thiscall TimerController::GetLoopMaxCount(TimerController *this)
{
  return this->m_nLoopMaxCount;
}

//----- (006E53E0) --------------------------------------------------------
void __thiscall TimerController::SetLoopMaxCount(TimerController *this, int val)
{
  this->m_nLoopMaxCount = val;
}

//----- (006E53F0) --------------------------------------------------------
int __thiscall TimerController::GetCurRunCount(TimerController *this)
{
  return this->m_nLoopCurCount;
}

//----- (006E5400) --------------------------------------------------------
void __thiscall TimerController::SetDelayTime(TimerController *this, float fDelayTime)
{
  this->m_nLoopCurCount = 0;
  this->m_fMaxDelayTime = fDelayTime;
  this->m_fCurDelayTime = fDelayTime;
}

//----- (006E5420) --------------------------------------------------------
double __thiscall TimerController::GetDelayTime(TimerController *this)
{
  return this->m_fMaxDelayTime;
}

//----- (006E5430) --------------------------------------------------------
bool __thiscall TimerController::OnTimerEnable(TimerController *this, bool bEnable)
{
  int v2; // eax@1

  LOBYTE(v2) = bEnable;
  this->m_fFirstTime = 0.0;
  this->m_bEnable = bEnable;
  if ( bEnable )
  {
    v2 = this->m_nLoopMaxCount;
    if ( v2 )
    {
      this->m_nLoopCurCount = v2;
      LOBYTE(v2) = this->m_bEnable;
    }
    else
    {
      this->m_bEnable = 0;
    }
  }
  return v2;
}

//----- (006E5460) --------------------------------------------------------
bool __thiscall TimerController::IsEnable(TimerController *this)
{
  return this->m_bEnable;
}

//----- (006E5470) --------------------------------------------------------
char __thiscall TimerController::UpdateCheckTime(TimerController *this, float DeltaTime)
{
  double v2; // st7@2
  int v3; // eax@3
  double v4; // st6@3
  bool v5; // sf@3
  unsigned __int8 v6; // of@3
  int *v7; // eax@3
  int v8; // eax@5
  char result; // al@6
  TimerController *v10; // [sp+0h] [bp-4h]@1

  v10 = this;
  if ( this->m_bEnable
    && (DeltaTime = this->m_fCurDelayTime - DeltaTime, v2 = DeltaTime, this->m_fCurDelayTime = DeltaTime, v2 <= 0.0) )
  {
    v3 = this->m_nLoopCurCount - 1;
    v4 = v2 + this->m_fMaxDelayTime;
    v10 = (TimerController *)v3;
    v6 = __OFSUB__(v3, -1);
    v5 = v3 + 1 < 0;
    this->m_fCurDelayTime = v4;
    DeltaTime = -6.8056469e38/*NaN*/;
    v7 = (int *)&DeltaTime;
    if ( !(v5 ^ v6) )
      v7 = (int *)&v10;
    v8 = *v7;
    this->m_nLoopCurCount = v8;
    if ( v8 )
    {
      ((void (__stdcall *)(TimerController *))this->vfptr[2].__vecDelDtor)(v10);
      result = 1;
    }
    else
    {
      this->m_bEnable = 0;
      this->m_fFirstTime = 0.0;
      ((void (__stdcall *)(TimerController *))this->vfptr[2].__vecDelDtor)(v10);
      result = 1;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006E5500) --------------------------------------------------------
void __thiscall TimerController::Update(TimerController *this, float fAccolTime)
{
  TimerController *v2; // esi@1
  float v3; // ST08_4@4

  v2 = this;
  if ( this->m_bEnable )
  {
    if ( 0.0 == this->m_fFirstTime )
      this->m_fFirstTime = fAccolTime;
    v3 = fAccolTime - this->m_fFirstTime;
    TimerController::UpdateCheckTime(this, v3);
    v2->m_fFirstTime = fAccolTime;
  }
}

//----- (006E5540) --------------------------------------------------------
void __thiscall TimerController::TimerController(TimerController *this)
{
  TimerController *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v1->vfptr = (NiRefObjectVtbl *)&TimerController::`vftable';
  v1->m_CallBackFunction.manager = 0;
  v1->m_CallBackFunction.functor.obj_ptr = 0;
  v1->m_CallBackFunction.invoker = 0;
  v1->m_strEventName._Mysize = 0;
  v1->m_strEventName._Myres = 15;
  v1->m_strEventName._Bx._Buf[0] = 0;
  v1->m_fCurDelayTime = 0.0;
  v1->m_fMaxDelayTime = 0.0;
  v1->m_nLoopCurCount = 1;
  v1->m_fFirstTime = 0.0;
  v1->m_nLoopMaxCount = 1;
  v1->m_bEnable = 0;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9C4160: using guessed type int (__thiscall *TimerController::`vftable')(void *p, char);

//----- (006E55A0) --------------------------------------------------------
void __thiscall TimerController::TimerController(TimerController *this, float fDelayTime)
{
  TimerController *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v2->vfptr = (NiRefObjectVtbl *)&TimerController::`vftable';
  v2->m_CallBackFunction.manager = 0;
  v2->m_CallBackFunction.functor.obj_ptr = 0;
  v2->m_CallBackFunction.invoker = 0;
  v2->m_strEventName._Mysize = 0;
  v2->m_strEventName._Myres = 15;
  v2->m_strEventName._Bx._Buf[0] = 0;
  v2->m_fCurDelayTime = 0.0;
  v2->m_fMaxDelayTime = fDelayTime;
  v2->m_nLoopCurCount = 1;
  v2->m_nLoopMaxCount = 1;
  v2->m_bEnable = 0;
  v2->m_fFirstTime = 0.0;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9C4160: using guessed type int (__thiscall *TimerController::`vftable')(void *p, char);

//----- (006E5600) --------------------------------------------------------
void __thiscall TimerController::OnTimerMessage(TimerController *this)
{
  bool v1; // cf@1
  char *v2; // eax@1
  int v3; // [sp+0h] [bp-40h]@1
  std::exception v4; // [sp+1Ch] [bp-24h]@4
  char *_What; // [sp+28h] [bp-18h]@4
  char v6; // [sp+2Fh] [bp-11h]@6
  int *v7; // [sp+30h] [bp-10h]@1
  int v8; // [sp+3Ch] [bp-4h]@1

  v7 = &v3;
  v1 = this->m_strEventName._Myres < 0x10;
  v2 = this->m_strEventName._Bx._Buf;
  v8 = 0;
  if ( !v1 )
    v2 = *(char **)v2;
  if ( !this->m_CallBackFunction.manager )
  {
    _What = "call to empty boost::function";
    std::exception::exception(&v4, (const char *const *)&_What);
    v4.vfptr = (std::exceptionVtbl *)&boost::bad_function_call::`vftable';
    LOBYTE(v8) = 1;
    boost::throw_exception<boost::bad_function_call>((boost::bad_function_call *)&v4);
  }
  ((void (__cdecl *)(char *, void *, char *))this->m_CallBackFunction.invoker)(
    &v6,
    this->m_CallBackFunction.functor.obj_ptr,
    v2);
}
// 98CD40: using guessed type int (__thiscall *boost::bad_function_call::`vftable')(void *p, char);

//----- (006E56A0) --------------------------------------------------------
void __thiscall TimerController::SetCallBackFunc(TimerController *this, boost::function<void __cdecl(char const *),std::allocator<void> > Func)
{
  int v2; // eax@1
  char *v3; // esi@1
  boost::detail::function::any_pointer (__cdecl *v4)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // ecx@1
  boost::detail::function::any_pointer (__cdecl *v5)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // edi@1
  boost::detail::function::unusable *(__cdecl *v6)(boost::detail::function::unusable *, boost::detail::function::any_pointer, const char *); // ebx@1
  boost::detail::function::any_pointer (__cdecl *v7)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type); // edx@4
  int v8; // edx@4
  char v9; // [sp+10h] [bp-18h]@3
  int v10; // [sp+24h] [bp-4h]@1

  v2 = 0;
  v3 = (char *)&this->m_CallBackFunction;
  v4 = Func.manager;
  v5 = 0;
  v6 = 0;
  v10 = 0;
  if ( Func.manager )
  {
    v6 = Func.invoker;
    v5 = Func.manager;
    v2 = ((int (__cdecl *)(void *, _DWORD))Func.manager)(Func.functor.obj_ptr, 0);
    v4 = Func.manager;
  }
  if ( v3 != &v9 )
  {
    v7 = v5;
    v5 = *(boost::detail::function::any_pointer (__cdecl **)(boost::detail::function::any_pointer, boost::detail::function::functor_manager_operation_type))v3;
    *(_DWORD *)v3 = v7;
    v8 = v2;
    v2 = *((_DWORD *)v3 + 1);
    *((_DWORD *)v3 + 1) = v8;
    *((_DWORD *)v3 + 2) = v6;
  }
  if ( v5 )
  {
    ((void (__cdecl *)(int, signed int))v5)(v2, 1);
    v4 = Func.manager;
  }
  v10 = -1;
  if ( v4 )
    ((void (__cdecl *)(void *, signed int))v4)(Func.functor.obj_ptr, 1);
}

//----- (006E5740) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall TimerController::GetEventName(TimerController *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result)
{
  result->_Myres = 15;
  result->_Mysize = 0;
  result->_Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    result,
    &this->m_strEventName,
    0,
    0xFFFFFFFF);
  return result;
}

//----- (006E5770) --------------------------------------------------------
void __thiscall TimerController::SetEventName(TimerController *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > val)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &this->m_strEventName,
    &val,
    0,
    0xFFFFFFFF);
  if ( val._Myres >= 0x10 )
    operator delete(val._Bx._Ptr);
}

//----- (006E57D0) --------------------------------------------------------
TimerController *__thiscall TimerController::`scalar deleting destructor'(TimerController *this, unsigned int a2)
{
  TimerController *v2; // esi@1

  v2 = this;
  if ( this->m_strEventName._Myres >= 0x10 )
    operator delete(this->m_strEventName._Bx._Ptr);
  v2->m_strEventName._Myres = 15;
  v2->m_strEventName._Mysize = 0;
  v2->m_strEventName._Bx._Buf[0] = 0;
  if ( v2->m_CallBackFunction.manager )
    v2->m_CallBackFunction.functor.obj_ptr = (void *)((int (__cdecl *)(_DWORD, _DWORD))v2->m_CallBackFunction.manager)(
                                                       v2->m_CallBackFunction.functor.obj_ptr,
                                                       1);
  v2->m_CallBackFunction.manager = 0;
  v2->m_CallBackFunction.invoker = 0;
  v2->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);

//----- (006E5880) --------------------------------------------------------
void __thiscall GuildAcademyHallOfFameWin::GuildAcademyHallOfFameWin(GuildAcademyHallOfFameWin *this)
{
  GuildAcademyHallOfFameWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_pkGuildName = 0;
  v1->m_pkGuildFoundingDay = 0;
  v1->m_pkTotalGraduate = 0;
  v1->m_pListWinHallOfFame = 0;
  v1->m_pSlideBarHallOfFame = 0;
  v1->m_NumberOfGraduate = 0;
  v1->m_nSortColumn = 0;
  *(_DWORD *)&v1->m_bReverse1 = 0;
  v1->m_bReverse5 = 0;
  v1->vfptr = (NiRefObjectVtbl *)&GuildAcademyHallOfFameWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildAcademyHallOfFameWin::`vftable'{for `IDirectMessenger'};
}
// 9C4460: using guessed type void (__thiscall *GuildAcademyHallOfFameWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C447C: using guessed type int (__thiscall *GuildAcademyHallOfFameWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006E58E0) --------------------------------------------------------
void __thiscall GuildAcademyHallOfFameWin::~GuildAcademyHallOfFameWin(GuildAcademyHallOfFameWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GuildAcademyHallOfFameWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildAcademyHallOfFameWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9C4460: using guessed type void (__thiscall *GuildAcademyHallOfFameWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C447C: using guessed type int (__thiscall *GuildAcademyHallOfFameWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006E5930) --------------------------------------------------------
void __thiscall GuildAcademyHallOfFameWin::OnSortByTitle01(GuildAcademyHallOfFameWin *this)
{
  GuildAcademyHallOfFameWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  bool v3; // al@2

  v1 = this;
  v2 = this->m_pListWinHallOfFame;
  if ( v2 )
  {
    v3 = v1->m_bReverse1 == 0;
    v1->m_nSortColumn = 0;
    v1->m_bReverse1 = v3;
    SlideListWin::Sort(v2, 0, v3, 0);
    SlideListWin::UpdateViewList(v1->m_pListWinHallOfFame);
  }
}

//----- (006E5970) --------------------------------------------------------
void __thiscall GuildAcademyHallOfFameWin::OnSortByTitle02(GuildAcademyHallOfFameWin *this)
{
  GuildAcademyHallOfFameWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  bool v3; // al@2

  v1 = this;
  v2 = this->m_pListWinHallOfFame;
  if ( v2 )
  {
    v3 = v1->m_bReverse2 == 0;
    v1->m_nSortColumn = 1;
    v1->m_bReverse2 = v3;
    SlideListWin::Sort(v2, 1, v3, 0);
    SlideListWin::UpdateViewList(v1->m_pListWinHallOfFame);
  }
}

//----- (006E59B0) --------------------------------------------------------
void __thiscall GuildAcademyHallOfFameWin::OnSortByTitle03(GuildAcademyHallOfFameWin *this)
{
  GuildAcademyHallOfFameWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  bool v3; // al@2

  v1 = this;
  v2 = this->m_pListWinHallOfFame;
  if ( v2 )
  {
    v3 = v1->m_bReverse3 == 0;
    v1->m_nSortColumn = 2;
    v1->m_bReverse3 = v3;
    SlideListWin::Sort(v2, 2, v3, 1);
    SlideListWin::UpdateViewList(v1->m_pListWinHallOfFame);
  }
}

//----- (006E59F0) --------------------------------------------------------
void __thiscall GuildAcademyHallOfFameWin::OnSortByTitle04(GuildAcademyHallOfFameWin *this)
{
  GuildAcademyHallOfFameWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  bool v3; // al@2

  v1 = this;
  v2 = this->m_pListWinHallOfFame;
  if ( v2 )
  {
    v3 = v1->m_bReverse4 == 0;
    v1->m_nSortColumn = 3;
    v1->m_bReverse4 = v3;
    SlideListWin::Sort(v2, 3, v3, 0);
    SlideListWin::UpdateViewList(v1->m_pListWinHallOfFame);
  }
}

//----- (006E5A30) --------------------------------------------------------
void __thiscall GuildAcademyHallOfFameWin::OnSortByTitle05(GuildAcademyHallOfFameWin *this)
{
  GuildAcademyHallOfFameWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  bool v3; // al@2

  v1 = this;
  v2 = this->m_pListWinHallOfFame;
  if ( v2 )
  {
    v3 = v1->m_bReverse5 == 0;
    v1->m_nSortColumn = 4;
    v1->m_bReverse5 = v3;
    SlideListWin::Sort(v2, 4, v3, 0);
    SlideListWin::UpdateViewList(v1->m_pListWinHallOfFame);
  }
}

//----- (006E5A70) --------------------------------------------------------
void GuildAcademyHallOfFameWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "GuildAcademyHonor");
}

//----- (006E5AA0) --------------------------------------------------------
void __thiscall GuildAcademyHallOfFameWin::UpdateMeWin(GuildAcademyHallOfFameWin *this, float fCurTime)
{
  GuildAcademyHallOfFameWin *v2; // esi@1

  v2 = this;
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
    GameFrameWork::UpdateUIScroll(v2->m_pListWinHallOfFame, v2->m_pSlideBarHallOfFame);
}

//----- (006E5AD0) --------------------------------------------------------
void __thiscall GuildAcademyHallOfFameWin::OnClickWinCloseBtn(GuildAcademyHallOfFameWin *this)
{
  GuildAcademyHallOfFameWin *v1; // esi@1

  v1 = this;
  if ( this == (GuildAcademyHallOfFameWin *)g_pkToolTipWin->m_pkToolTipParentWin )
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}

//----- (006E5B00) --------------------------------------------------------
void __thiscall GuildAcademyHallOfFameWin::OnClickOKBtn(GuildAcademyHallOfFameWin *this)
{
  GuildAcademyHallOfFameWin *v1; // esi@1

  v1 = this;
  if ( this == (GuildAcademyHallOfFameWin *)g_pkToolTipWin->m_pkToolTipParentWin )
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}

//----- (006E5B30) --------------------------------------------------------
void __thiscall GuildAcademyHallOfFameWin::OnSlideBar(GuildAcademyHallOfFameWin *this)
{
  GuildAcademyHallOfFameWin *v1; // esi@1
  SlideBar *v2; // ecx@1
  SlideListWin *v3; // eax@2

  v1 = this;
  v2 = this->m_pSlideBarHallOfFame;
  if ( v2 )
  {
    v3 = v1->m_pListWinHallOfFame;
    if ( v3 )
    {
      SlideBar::SetSplitCnt(v2, v3->m_nSlideSplitCnt);
      v1->m_pListWinHallOfFame->m_nViewStartPos = v1->m_pSlideBarHallOfFame->m_nCurPos;
      SlideListWin::UpdateViewList(v1->m_pListWinHallOfFame);
    }
  }
}

//----- (006E5B80) --------------------------------------------------------
void __thiscall GuildAcademyHallOfFameWin::OnCommand(GuildAcademyHallOfFameWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0xBu:
      GuildAcademyHallOfFameWin::OnClickWinCloseBtn(this);
      break;
    case 0x14u:
      GuildAcademyHallOfFameWin::OnClickOKBtn(this);
      break;
    case 0xDu:
      GuildAcademyHallOfFameWin::OnSlideBar(this);
      break;
    case 0xEu:
      GuildAcademyHallOfFameWin::OnSortByTitle01(this);
      break;
    case 0xFu:
      GuildAcademyHallOfFameWin::OnSortByTitle02(this);
      break;
    case 0x10u:
      GuildAcademyHallOfFameWin::OnSortByTitle03(this);
      break;
    case 0x11u:
      GuildAcademyHallOfFameWin::OnSortByTitle04(this);
      break;
    case 0x12u:
      GuildAcademyHallOfFameWin::OnSortByTitle05(this);
      break;
    case 0x15u:
      GuildAcademyHallOfFameWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (006E5C20) --------------------------------------------------------
void __thiscall GuildAcademyHallOfFameWin::AddListItem_DefInfo(GuildAcademyHallOfFameWin *this, EACH_GRADUATE_DATA *pkData)
{
  GuildAcademyHallOfFameWin *v2; // ebx@1
  SlideListWin *v3; // ecx@1
  unsigned int v4; // eax@2
  unsigned int v5; // edx@2
  unsigned int v6; // eax@2
  unsigned int v7; // edi@2
  char *v8; // eax@2
  const char *v9; // eax@3
  const char *v10; // eax@5
  char acDateTime2[32]; // [sp+8h] [bp-5Ch]@5
  char acDateTime[32]; // [sp+28h] [bp-3Ch]@5
  char acname[21]; // [sp+48h] [bp-1Ch]@2

  v2 = this;
  v3 = this->m_pListWinHallOfFame;
  if ( v3 )
  {
    v4 = pkData->sName.n5_code[0];
    *(_DWORD *)&acname[4] = pkData->sName.n5_code[1];
    v5 = pkData->sName.n5_code[3];
    *(_DWORD *)acname = v4;
    v6 = pkData->sName.n5_code[2];
    *(_DWORD *)&acname[12] = v5;
    *(_DWORD *)&acname[8] = v6;
    *(_DWORD *)&acname[16] = pkData->sName.n5_code[4];
    acname[20] = 0;
    v7 = SlideListWin::AddText(v3, acname);
    v8 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), pkData->ClassID);
    if ( v8 )
      v9 = v8 + 21;
    else
      v9 = (const char *)&unk_96F8EB;
    SlideListWin::SetText(v2->m_pListWinHallOfFame, v7, 1u, v9);
    v10 = fs("%d", pkData->nGraduateLevel);
    SlideListWin::SetText(v2->m_pListWinHallOfFame, v7, 2u, v10);
    strftime(acDateTime, 0x20u, "%Y-%m-%d", &pkData->tm_dJoinDate);
    SlideListWin::SetText(v2->m_pListWinHallOfFame, v7, 3u, acDateTime);
    strftime(acDateTime2, 0x20u, "%Y-%m-%d", &pkData->tm_dGraduateDate);
    SlideListWin::SetText(v2->m_pListWinHallOfFame, v7, 4u, acDateTime2);
    SlideListWin::SetData(v2->m_pListWinHallOfFame, v7, (unsigned int)pkData);
    SlideListWin::SetFontSize(v2->m_pListWinHallOfFame, v7, 1);
    SlideListWin::SetFontColor(v2->m_pListWinHallOfFame, v7, 255, 255, 255);
  }
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (006E5D60) --------------------------------------------------------
void __thiscall GuildAcademyHallOfFameWin::On_Recv_NC_GUILD_ACADEMY_GET_GRADUATE_ACK(GuildAcademyHallOfFameWin *this, PROTO_NC_GUILD_ACADEMY_GET_GRADUATE_ACK *pkProto)
{
  unsigned int v2; // edx@1
  GuildAcademyHallOfFameWin *v3; // esi@1
  unsigned int v4; // ecx@1
  unsigned int v5; // eax@1
  PgWinText *v6; // ecx@1
  NiRefObjectVtbl *v7; // ebx@1
  char *v8; // eax@1
  SlideListWin *v9; // ecx@1
  SlideListWin *v10; // ebx@3
  int v11; // eax@4
  int v12; // ebx@4
  EACH_GRADUATE_DATA *v13; // edi@5
  char acDateTime[32]; // [sp+Ch] [bp-38h]@1
  char acname[17]; // [sp+2Ch] [bp-18h]@1

  v2 = pkProto->GraduateData.sGuildName.n4_code[2];
  v3 = this;
  v4 = pkProto->GraduateData.sGuildName.n4_code[1];
  *(_DWORD *)acname = pkProto->GraduateData.sGuildName.n4_code[0];
  v5 = pkProto->GraduateData.sGuildName.n4_code[3];
  *(_DWORD *)&acname[4] = v4;
  v6 = v3->m_pkGuildName;
  *(_DWORD *)&acname[8] = v2;
  *(_DWORD *)&acname[12] = v5;
  acname[16] = 0;
  ((void (__stdcall *)(_DWORD))v6->vfptr[118].__vecDelDtor)(acname);
  strftime(acDateTime, 0x20u, "%Y-%m-%d", &pkProto->GraduateData.tm_dGuildMakeDate);
  ((void (__stdcall *)(_DWORD))v3->m_pkGuildFoundingDay->vfptr[118].__vecDelDtor)(acDateTime);
  v7 = v3->m_pkTotalGraduate->vfptr;
  v8 = fs("%d", pkProto->GraduateData.nAllGraduateCount);
  v7[118].__vecDelDtor((NiRefObject *)v3->m_pkTotalGraduate, (unsigned int)v8);
  v9 = v3->m_pListWinHallOfFame;
  if ( v9 )
  {
    if ( pkProto->PartMask & 1 )
    {
      SlideListWin::RemoveAllList(v9);
      SlideBar::SetSplitCnt(v3->m_pSlideBarHallOfFame, 0);
      v10 = v3->m_pListWinHallOfFame;
      v10->m_fCurSlideBtnPos = 0.0;
      v10->m_nViewStartPos = (signed int)((double)v10->m_nSlideSplitCnt * 0.0);
      v3->m_pListWinHallOfFame->m_nViewStartPos = 0;
    }
    v11 = pkProto->GraduateData.NumOfEachGraduateData;
    v12 = 0;
    v3->m_NumberOfGraduate = v11;
    if ( v11 > 0 )
    {
      v13 = (EACH_GRADUATE_DATA *)&pkProto[1];
      do
      {
        GuildAcademyHallOfFameWin::AddListItem_DefInfo(v3, v13);
        ++v12;
        ++v13;
      }
      while ( v12 < v3->m_NumberOfGraduate );
    }
    SlideListWin::Sort(v3->m_pListWinHallOfFame, v3->m_nSortColumn, 0, 0);
    SlideListWin::AlignText(v3->m_pListWinHallOfFame, 4u);
    SlideListWin::AlignText(v3->m_pListWinHallOfFame, 0, 5u);
    SlideListWin::AlignText(v3->m_pListWinHallOfFame, 1u, 5u);
    SlideListWin::AlignText(v3->m_pListWinHallOfFame, 2u, 5u);
    SlideListWin::AlignText(v3->m_pListWinHallOfFame, 3u, 5u);
    SlideListWin::AlignText(v3->m_pListWinHallOfFame, 4u, 5u);
    SlideListWin::UpdateViewList(v3->m_pListWinHallOfFame);
    SlideBar::SetSplitCnt(v3->m_pSlideBarHallOfFame, v3->m_pListWinHallOfFame->m_nSlideSplitCnt);
  }
}

//----- (006E5F30) --------------------------------------------------------
GuildAcademyHallOfFameWin *__cdecl GuildAcademyHallOfFameWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  GuildAcademyHallOfFameWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x17Cu);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    GuildAcademyHallOfFameWin::GuildAcademyHallOfFameWin((GuildAcademyHallOfFameWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (GuildAcademyHallOfFameWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (006E6060) --------------------------------------------------------
char __thiscall GuildAcademyHallOfFameWin::Create(GuildAcademyHallOfFameWin *this, PgFrameWork *pkFrameWork)
{
  GuildAcademyHallOfFameWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiAVObject *v5; // eax@4
  NiTexturingProperty *v6; // eax@4
  NiTexturingProperty *v7; // edi@4
  NiTexturingProperty::Map *v8; // eax@6
  NiSourceTexture *v9; // eax@7
  NiNode *v10; // esi@10
  char result; // al@14
  PgSprData *v12; // eax@15
  NiNode *v13; // esi@18
  int v14; // edi@22
  int v15; // ebx@22
  NiSourceTexture *v16; // eax@22
  PgSprData *v17; // eax@23
  NiSourceTexture *v18; // eax@25
  PgSprData *v19; // eax@25
  PgFont *v20; // eax@27
  PgWinText *v21; // eax@27
  NiRefObjectVtbl *v22; // edx@27
  NiUnsharedGeometryGroup *v23; // eax@27
  PgSprData *v24; // eax@29
  PgSprData *v25; // eax@29
  NiPointer<PgSprData::PgHitTester> *v26; // ecx@29
  PgWinText *v27; // eax@29
  PgFont *v28; // eax@29
  PgWinText *v29; // eax@29
  NiSourceTexture *v30; // edx@29
  NiUnsharedGeometryGroup *v31; // eax@29
  int v32; // eax@29
  NiSourceTexture *v33; // edx@29
  PgWinText *v34; // eax@29
  PgWin *v35; // ST90_4@29
  PgFont *v36; // eax@29
  PgWinAbbreviateText *v37; // eax@29
  PgSprData::PgHitTester *v38; // eax@29
  PgWinText *v39; // edx@29
  PgFont *v40; // eax@29
  PgWinText *v41; // eax@29
  NiSourceTexture *v42; // ecx@29
  NiUnsharedGeometryGroup *v43; // eax@29
  int v44; // eax@29
  PgWinText *v45; // edx@29
  PgFont *v46; // eax@29
  PgWinText *v47; // eax@29
  PgSprData::PgHitTester *v48; // eax@29
  PgWinText *v49; // edx@29
  PgFont *v50; // eax@29
  PgWinText *v51; // eax@29
  NiSourceTexture *v52; // ecx@29
  NiUnsharedGeometryGroup *v53; // eax@29
  int v54; // eax@29
  PgWinText *v55; // edx@29
  PgFont *v56; // eax@29
  PgWinText *v57; // eax@29
  SLWCreateInfo::Item *v58; // eax@29
  PgWinText *v59; // eax@29
  PgWinText *v60; // eax@29
  PgWinText *v61; // eax@29
  PgWinText *v62; // eax@29
  PgWinText *v63; // eax@29
  PgWinText *v64; // eax@29
  PgSprData *v65; // eax@29
  SlideListWin *v66; // eax@29
  PgSprData *v67; // eax@29
  SlideBar *v68; // eax@29
  int v69; // eax@29
  PgWinText *v70; // edx@29
  PgFont *v71; // eax@29
  PgWinText *v72; // eax@29
  NiRefObjectVtbl *v73; // edx@29
  NiUnsharedGeometryGroup *v74; // eax@29
  float v75; // ecx@29
  PgWinText *v76; // eax@29
  PgFont *v77; // eax@29
  PgWinText *v78; // eax@29
  NiRefObjectVtbl *v79; // edx@29
  NiUnsharedGeometryGroup *v80; // eax@29
  float v81; // ecx@29
  PgWinText *v82; // eax@29
  PgFont *v83; // eax@29
  PgWinText *v84; // eax@29
  NiRefObjectVtbl *v85; // edx@29
  NiUnsharedGeometryGroup *v86; // eax@29
  float v87; // ecx@29
  PgWinText *v88; // eax@29
  PgFont *v89; // eax@29
  PgWinText *v90; // eax@29
  NiRefObjectVtbl *v91; // edx@29
  NiUnsharedGeometryGroup *v92; // eax@29
  float v93; // ecx@29
  PgWinText *v94; // eax@29
  PgFont *v95; // eax@29
  PgWinText *v96; // eax@29
  NiRefObjectVtbl *v97; // edx@29
  NiUnsharedGeometryGroup *v98; // eax@29
  float v99; // ecx@29
  NiSourceTexture *v100; // eax@29
  PgFont *v101; // eax@29
  PgWinText *v102; // edi@29
  NiRefObjectVtbl *v103; // ebx@29
  NiUnsharedGeometryGroup *v104; // eax@29
  unsigned int uiWidth; // [sp+A8h] [bp-6Ch]@25
  unsigned int uiHeight; // [sp+ACh] [bp-68h]@25
  SLWCreateInfo kCreateInfo; // [sp+B0h] [bp-64h]@29
  NiPointer<NiTexturingProperty> spTexProp; // [sp+CCh] [bp-48h]@4
  NiSourceTexture *pkTexture; // [sp+D0h] [bp-44h]@7
  NiSourceTexture *pkTexture8; // [sp+D4h] [bp-40h]@27
  int uiLeft; // [sp+D8h] [bp-3Ch]@15
  int uiTop; // [sp+DCh] [bp-38h]@15
  NiPointer<NiNode> spNode; // [sp+E0h] [bp-34h]@1
  PgWinText *pkTextWin; // [sp+E4h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+E8h] [bp-2Ch]@29
  int v116; // [sp+110h] [bp-4h]@1

  v2 = this;
  pkTextWin = (PgWinText *)pkFrameWork;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v116 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildAcademyHonor.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Frame");
  v6 = (NiTexturingProperty *)NiAVObject::GetProperty(v5, 8);
  v7 = v6;
  spTexProp.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v8 = *v7->m_kMaps.m_pBase;
  LOBYTE(v116) = 1;
  if ( !v8 || (v9 = (NiSourceTexture *)v8->m_spTexture.m_pObject, (pkTexture = v9) == 0) )
  {
    LOBYTE(v116) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v10 = spNode.m_pObject;
    v116 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
    return 0;
  }
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v9);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v12, 0, (PgFrameWork *)pkTextWin, "GuildAcademyRanking", 0) )
  {
    v14 = uiLeft;
    v15 = uiTop;
    v16 = MenuTexMgr::GetTexture(0x13u);
    if ( v16 )
      v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v16);
    else
      v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v17, (PgWin *)&v2->vfptr, 0, 0);
    v18 = MenuTexMgr::GetTexture(0x12u);
    v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, v18);
    PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v19, (PgWin *)&v2->vfptr, 0, 0);
    if ( PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "WinTitle",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight) )
    {
      v20 = Font::Get(MAIN_MENU);
      v21 = PgWinText::CreateWin(uiLeft - v14, uiTop - v15, uiWidth, uiHeight, v20, (PgWin *)&v2->vfptr, 0, 0);
      v22 = v21->vfptr;
      pkTextWin = v21;
      v22[122].__vecDelDtor((NiRefObject *)v21, 1u);
      ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v23 = TextData::Get(0x73F2C2B5u);
      (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))&pkTexture8[6].m_bStatic)(pkTextWin, v23);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "ClsNor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xBu, 0, 0);
      pkTexture8 = MenuTexMgr::GetTexture(4u);
      if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
      {
        pkTextWin = (PgWinText *)PgSprData::Create(
                                   (NiAVObject *)&spNode.m_pObject->vfptr,
                                   "HelpLinkNor",
                                   &uiLeft,
                                   &uiTop,
                                   pkTexture8);
        PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
        PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
        PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x15u, 0, 0);
      }
      v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
      PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v24, (PgWin *)&v2->vfptr, 0, 0);
      v25 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel03", &uiLeft, &uiTop, pkTexture);
      PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v25, (PgWin *)&v2->vfptr, 0, 0);
      v26 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Guild01", &uiLeft, &uiTop, pkTexture)->m_akHitTester.m_pBase;
      v27 = (PgWinText *)v26->m_pObject->m_uiWidth;
      pkTexture8 = (NiSourceTexture *)v26->m_pObject->m_uiHeight;
      pkTextWin = v27;
      v28 = Font::Get(0);
      v29 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v28,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v30 = (NiSourceTexture *)v29->vfptr;
      pkTextWin = v29;
      pkTexture8 = v30;
      v31 = TextData::Get(0xD8ECE04D);
      (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))&pkTexture8[6].m_bStatic)(pkTextWin, v31);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "Title1Desc",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgWinSpr::CreateWin(uiLeft - v14, uiTop, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0, 0);
      v32 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
      v33 = *(NiSourceTexture **)(v32 + 24);
      v34 = *(PgWinText **)(v32 + 20);
      v35 = g_pkToolTipWin;
      pkTexture8 = v33;
      pkTextWin = v34;
      v36 = Font::Get(0);
      v37 = PgWinAbbreviateText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v36,
              (PgWin *)&v2->vfptr,
              0,
              0,
              0,
              1,
              v35,
              0x1Eu);
      v2->m_pkGuildName = (PgWinText *)v37;
      v37->vfptr[122].__vecDelDtor((NiRefObject *)v37, 5u);
      ((void (__stdcall *)(const char *))v2->m_pkGuildName->vfptr[118].__vecDelDtor)("-");
      v38 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Guild02", &uiLeft, &uiTop, pkTexture)->m_akHitTester.m_pBase->m_pObject;
      v39 = (PgWinText *)v38->m_uiWidth;
      pkTexture8 = (NiSourceTexture *)v38->m_uiHeight;
      pkTextWin = v39;
      v40 = Font::Get(0);
      v41 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v40,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v42 = (NiSourceTexture *)v41->vfptr;
      pkTextWin = v41;
      pkTexture8 = v42;
      v43 = TextData::Get(0x6F877BF6u);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v43);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "Title2Desc",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgWinSpr::CreateWin(uiLeft - v14, uiTop, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0, 0);
      v44 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
      v45 = *(PgWinText **)(v44 + 20);
      pkTexture8 = *(NiSourceTexture **)(v44 + 24);
      pkTextWin = v45;
      v46 = Font::Get(0);
      v47 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v46,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v2->m_pkGuildFoundingDay = v47;
      v47->vfptr[122].__vecDelDtor((NiRefObject *)v47, 5u);
      ((void (__stdcall *)(_DWORD))v2->m_pkGuildFoundingDay->vfptr[60].__vecDelDtor)(0);
      v48 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Guild03", &uiLeft, &uiTop, pkTexture)->m_akHitTester.m_pBase->m_pObject;
      v49 = (PgWinText *)v48->m_uiWidth;
      pkTexture8 = (NiSourceTexture *)v48->m_uiHeight;
      pkTextWin = v49;
      v50 = Font::Get(0);
      v51 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v50,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v52 = (NiSourceTexture *)v51->vfptr;
      pkTextWin = v51;
      pkTexture8 = v52;
      v53 = TextData::Get(0x3533398Bu);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v53);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "Title3Desc",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgWinSpr::CreateWin(uiLeft - v14, uiTop, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0, 0);
      v54 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
      v55 = *(PgWinText **)(v54 + 20);
      pkTexture8 = *(NiSourceTexture **)(v54 + 24);
      pkTextWin = v55;
      v56 = Font::Get(0);
      v57 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v56,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v2->m_pkTotalGraduate = v57;
      v57->vfptr[122].__vecDelDtor((NiRefObject *)v57, 5u);
      ((void (__stdcall *)(_DWORD))v2->m_pkTotalGraduate->vfptr[60].__vecDelDtor)(0);
      kCreateInfo.m_arrItem._Myfirst = 0;
      kCreateInfo.m_arrItem._Mylast = 0;
      kCreateInfo.m_arrItem._Myend = 0;
      kCreateInfo.m_bMakeData = 0;
      kCreateInfo.m_nOffX = 0;
      kCreateInfo.m_nOffY = 0;
      LOBYTE(v116) = 2;
      v58 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
      v58->nItemType = 1;
      v58->pNode = spNode.m_pObject;
      pkTextWin = (PgWinText *)v58;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "ColumnBarNor");
      LOBYTE(v116) = 3;
      pkTextWin = (PgWinText *)((char *)pkTextWin + 72);
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkTextWin,
        &_Val);
      LOBYTE(v116) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "ColumnBarClick");
      LOBYTE(v116) = 4;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkTextWin,
        &_Val);
      LOBYTE(v116) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "ColumnBarOver");
      LOBYTE(v116) = 5;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkTextWin,
        &_Val);
      LOBYTE(v116) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      v59 = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkTextWin = v59;
      v59->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column01");
      LOBYTE(v116) = 6;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v116) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      v60 = pkTextWin;
      pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
      LOBYTE(v60->m_kLocal.m_Translate.x) = 1;
      v61 = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkTextWin = v61;
      v61->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column02");
      LOBYTE(v116) = 7;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v116) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
      v62 = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkTextWin = v62;
      v62->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column03");
      LOBYTE(v116) = 8;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v116) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
      v63 = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkTextWin = v63;
      v63->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column04");
      LOBYTE(v116) = 9;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v116) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
      v64 = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkTextWin = v64;
      v64->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column05");
      LOBYTE(v116) = 10;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v116) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
      SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
      v65 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, pkTexture);
      v66 = SlideListWin::CreateWin(uiLeft - v14, uiTop - v15, v65, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
      v2->m_pListWinHallOfFame = v66;
      v66->m_uiLClickMsg = 19;
      SlideListWin::UpdateViewList(v2->m_pListWinHallOfFame);
      v67 = PgSprData::Create(
              (NiAVObject *)&spNode.m_pObject->vfptr,
              "SlideBar_SlideBtnMiddle",
              &uiLeft,
              &uiTop,
              pkTexture);
      v68 = SlideBar::CreateWin(
              spNode.m_pObject,
              "SlideBar",
              "SlideBar_UpBtn",
              "SlideBar_DnBtn",
              v67,
              0,
              (PgWin *)&v2->vfptr);
      v2->m_pSlideBarHallOfFame = v68;
      v68->m_uiClickMsg = 13;
      v2->m_pSlideBarHallOfFame->m_eType = 1;
      SlideBar::SetSplitCnt(v2->m_pSlideBarHallOfFame, v2->m_pListWinHallOfFame->m_nSlideSplitCnt);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "Title01Nor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title01Click");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title01Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xEu, 0, 0);
      v69 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
      v70 = *(PgWinText **)(v69 + 20);
      pkTexture8 = *(NiSourceTexture **)(v69 + 24);
      pkTextWin = v70;
      v71 = Font::Get(MAIN_MENU);
      v72 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v71,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v73 = v72->vfptr;
      pkTextWin = v72;
      v73[122].__vecDelDtor((NiRefObject *)v72, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v74 = TextData::Get(0x4EA49695u);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v74);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "Title02Nor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title02Click");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title02Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xFu, 0, 0);
      v75 = pkTextWin->m_kWorldBound.m_kCenter.x;
      v76 = *(PgWinText **)(*(_DWORD *)LODWORD(v75) + 20);
      pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v75) + 24);
      pkTextWin = v76;
      v77 = Font::Get(MAIN_MENU);
      v78 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v77,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v79 = v78->vfptr;
      pkTextWin = v78;
      v79[122].__vecDelDtor((NiRefObject *)v78, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v80 = TextData::Get(0x4A5F8BA3u);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v80);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "Title03Nor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title03Click");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title03Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x10u, 0, 0);
      v81 = pkTextWin->m_kWorldBound.m_kCenter.x;
      v82 = *(PgWinText **)(*(_DWORD *)LODWORD(v81) + 20);
      pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v81) + 24);
      pkTextWin = v82;
      v83 = Font::Get(MAIN_MENU);
      v84 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v83,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v85 = v84->vfptr;
      pkTextWin = v84;
      v85[122].__vecDelDtor((NiRefObject *)v84, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v86 = TextData::Get(0x403E237Fu);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v86);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "Title04Nor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title04Click");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title04Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x11u, 0, 0);
      v87 = pkTextWin->m_kWorldBound.m_kCenter.x;
      v88 = *(PgWinText **)(*(_DWORD *)LODWORD(v87) + 20);
      pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v87) + 24);
      pkTextWin = v88;
      v89 = Font::Get(MAIN_MENU);
      v90 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v89,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v91 = v90->vfptr;
      pkTextWin = v90;
      v91[122].__vecDelDtor((NiRefObject *)v90, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v92 = TextData::Get(0x2445899Eu);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v92);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "Title05Nor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title05Click");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title05Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x12u, 0, 0);
      v93 = pkTextWin->m_kWorldBound.m_kCenter.x;
      v94 = *(PgWinText **)(*(_DWORD *)LODWORD(v93) + 20);
      pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v93) + 24);
      pkTextWin = v94;
      v95 = Font::Get(MAIN_MENU);
      v96 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v95,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v97 = v96->vfptr;
      pkTextWin = v96;
      v97[122].__vecDelDtor((NiRefObject *)v96, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v98 = TextData::Get(0xC6DFB9BB);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v98);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "Btn01Nor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x14u, 0, 0);
      v99 = pkTextWin->m_kWorldBound.m_kCenter.x;
      v100 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v99) + 20);
      pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v99) + 24);
      pkTexture = v100;
      v101 = Font::Get(MAIN_MENU);
      v102 = PgWinText::CreateWin(
               uiLeft - v14,
               uiTop - v15 + 1,
               (unsigned int)pkTexture,
               (unsigned int)pkTexture8,
               v101,
               (PgWin *)&v2->vfptr,
               0,
               0);
      v102->vfptr[122].__vecDelDtor((NiRefObject *)v102, 5u);
      v103 = v102->vfptr;
      v104 = TextData::Get(0x4F5F499Fu);
      v103[118].__vecDelDtor((NiRefObject *)v102, (unsigned int)v104);
      v102->vfptr[60].__vecDelDtor((NiRefObject *)v102, 0);
      ((void (__thiscall *)(GuildAcademyHallOfFameWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
        v2,
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        0.40000001,
        0.5);
      LOBYTE(v116) = 1;
      SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
      LOBYTE(v116) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
      v116 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 1;
    }
    else
    {
      LOBYTE(v116) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
      v116 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 0;
    }
  }
  else
  {
    LOBYTE(v116) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v13 = spNode.m_pObject;
    v116 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v13 )
      return 0;
    v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006E70B0) --------------------------------------------------------
GuildAcademyHallOfFameWin *__thiscall GuildAcademyHallOfFameWin::`scalar deleting destructor'(GuildAcademyHallOfFameWin *this, unsigned int a2)
{
  GuildAcademyHallOfFameWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildAcademyHallOfFameWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildAcademyHallOfFameWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C4460: using guessed type void (__thiscall *GuildAcademyHallOfFameWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C447C: using guessed type int (__thiscall *GuildAcademyHallOfFameWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006E70F0) --------------------------------------------------------
void __thiscall GuildAcademyItemRewardInvWin::GuildAcademyItemRewardInvWin(GuildAcademyItemRewardInvWin *this)
{
  GuildAcademyItemRewardInvWin *v1; // esi@1

  v1 = this;
  ItemIcon::ItemIcon((ItemIcon *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GuildAcademyItemRewardInvWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildAcademyItemRewardInvWin::`vftable'{for `IDirectMessenger'};
  v1->m_uiInvIndex = -1;
  ItemIcon::SetItem((ItemIcon *)&v1->vfptr, 0, 1);
  v1->m_bDisable = 0;
}
// 9C48C8: using guessed type void (__thiscall *GuildAcademyItemRewardInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C48E4: using guessed type int (__thiscall *GuildAcademyItemRewardInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006E7170) --------------------------------------------------------
void __thiscall GuildAcademyItemRewardInvWin::~GuildAcademyItemRewardInvWin(GuildAcademyItemRewardInvWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GuildAcademyItemRewardInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildAcademyItemRewardInvWin::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
}
// 9C48C8: using guessed type void (__thiscall *GuildAcademyItemRewardInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C48E4: using guessed type int (__thiscall *GuildAcademyItemRewardInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006E7190) --------------------------------------------------------
char __thiscall GuildAcademyItemRewardInvWin::Create(GuildAcademyItemRewardInvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent)
{
  GuildAcademyItemRewardInvWin *v5; // esi@1
  char result; // al@1

  v5 = this;
  result = ItemIcon::Create((ItemIcon *)&this->vfptr, iXPos, iYPos, pkParent);
  if ( result )
  {
    v5->m_uiInvIndex = uiInvIndex;
    result = 1;
  }
  return result;
}

//----- (006E71D0) --------------------------------------------------------
void __thiscall GuildAcademyItemRewardInvWin::OnFirstHitWin(GuildAcademyItemRewardInvWin *this)
{
  GuildAcademyItemRewardInvWin *v1; // esi@1
  ItemInfoWin *v2; // edi@3
  Item *v3; // eax@4

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->vfptr[81].__vecDelDtor)(0.0);
  if ( ItemIcon::GetItem((ItemIcon *)&v1->vfptr) && !v1->m_bDisable )
  {
    v2 = (ItemInfoWin *)v1->m_pkToolTipWin;
    if ( v2 )
    {
      v3 = ItemIcon::GetItem((ItemIcon *)&v1->vfptr);
      ItemInfoWin::SetItemInfo(v2, v3);
      PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
    }
  }
}

//----- (006E7220) --------------------------------------------------------
void __thiscall GuildAcademyItemRewardInvWin::Show(GuildAcademyItemRewardInvWin *this, int b)
{
  ItemIcon::Show((ItemIcon *)&this->vfptr, b);
}

//----- (006E7230) --------------------------------------------------------
bool __thiscall GuildAcademyItemRewardInvWin::IsDisable(GuildAcademyItemRewardInvWin *this)
{
  return this->m_bDisable;
}

//----- (006E7240) --------------------------------------------------------
void __stdcall GuildAcademyItemRewardWin::DirectMessage(int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  if ( iMsgTag == 27 && pvBody && !*(_DWORD *)pvBody )
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0x45u, 0, 0);
}

//----- (006E7270) --------------------------------------------------------
void __thiscall GuildAcademyItemRewardWin::InitializeRewardItem(GuildAcademyItemRewardWin *this)
{
  EditWin **v1; // esi@1
  signed int v2; // edi@1

  v1 = this->m_pkItemCountEditWin;
  v2 = 51;
  do
  {
    ItemIcon::SetItem((ItemIcon *)*(v1 - 51), 0, 1);
    ((void (__stdcall *)(_DWORD))(*v1)->vfptr[115].__vecDelDtor)(&unk_9C46CB);
    EditWin::SetEnable(*v1, 0);
    ++v1;
    --v2;
  }
  while ( v2 );
}

//----- (006E72C0) --------------------------------------------------------
void __thiscall GuildAcademyItemRewardWin::resetInven(GuildAcademyItemRewardWin *this, unsigned int uiIndex)
{
  GuildAcademyItemRewardWin *v2; // esi@1

  v2 = this;
  ItemIcon::SetItem((ItemIcon *)&this->m_apkInvWin[uiIndex]->vfptr, 0, 1);
  ((void (__stdcall *)(_DWORD))v2->m_pkItemCountEditWin[uiIndex]->vfptr[115].__vecDelDtor)(&unk_9C46E9);
  EditWin::SetEnable(v2->m_pkItemCountEditWin[uiIndex], 0);
}

//----- (006E7310) --------------------------------------------------------
void GuildAcademyItemRewardWin::OnClose()
{
  PROTO_NC_GUILD_ACADEMY_REWARD_STORAGE_CLOSE_CMD kProto; // [sp+1h] [bp-1h]@1

  kProto.nCloseType = 2;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x26u, 0x6Fu, &kProto, 1);
}

//----- (006E7330) --------------------------------------------------------
void GuildAcademyItemRewardWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "GuildAcademyItemGift");
}

//----- (006E7360) --------------------------------------------------------
void __thiscall GuildAcademyItemRewardWin::GuildAcademyItemRewardWin(GuildAcademyItemRewardWin *this)
{
  GuildAcademyItemRewardWin *v1; // esi@1
  int v2; // eax@1
  EditWin **v3; // eax@1
  signed int v4; // edx@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GuildAcademyItemRewardWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildAcademyItemRewardWin::`vftable'{for `IDirectMessenger'};
  v2 = (int)&v1->m_kDropContents;
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  v1->m_kDrop.m_pkSender = 0;
  *(_WORD *)(v2 + 60) = -1;
  *(_DWORD *)v2 = &DropContents::`vftable';
  *(_DWORD *)(v2 + 64) = 0;
  v1->m_kDrop.m_pkContents = &v1->m_kDropContents;
  v3 = v1->m_pkItemCountEditWin;
  v4 = 51;
  do
  {
    *(v3 - 51) = 0;
    *v3 = 0;
    ++v3;
    --v4;
  }
  while ( v4 );
  v1->m_pkCopperText = 0;
  v1->m_pkSilverText = 0;
  v1->m_pkGoldText = 0;
  v1->m_pkGemText = 0;
  v1->m_pkGuildAcademyInfo1 = 0;
  v1->m_pkGuildAcademyInfo2 = 0;
  v1->m_bFromReq = 0;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9C4B54: using guessed type void (__thiscall *GuildAcademyItemRewardWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C4B74: using guessed type int (__thiscall *GuildAcademyItemRewardWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006E73F0) --------------------------------------------------------
void __thiscall GuildAcademyItemRewardWin::~GuildAcademyItemRewardWin(GuildAcademyItemRewardWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GuildAcademyItemRewardWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildAcademyItemRewardWin::`vftable'{for `IDirectMessenger'};
  this->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  this->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9C4B54: using guessed type void (__thiscall *GuildAcademyItemRewardWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C4B74: using guessed type int (__thiscall *GuildAcademyItemRewardWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006E7420) --------------------------------------------------------
void __thiscall GuildAcademyItemRewardWin::SetRewardItem(GuildAcademyItemRewardWin *this, PROTO_NC_GUILD_ACADEMY_GET_REWARD_ITEM_ACK *pAck)
{
  GuildAcademyItemRewardWin *v2; // ebx@1
  PROTO_NC_GUILD_ACADEMY_GET_REWARD_ITEM_ACK *v3; // edi@2
  int v4; // esi@3
  Item *v5; // eax@3
  int v6; // edi@5
  CClientGuildAcademy *v7; // eax@10
  int v8; // esi@15
  Item *pkItem; // [sp+8h] [bp-3Ch]@3
  int i; // [sp+10h] [bp-34h]@1
  PROTO_NC_GUILD_ACADEMY_GET_REWARD_ITEM_ACK *v11; // [sp+14h] [bp-30h]@2
  int j; // [sp+18h] [bp-2Ch]@4
  int ja; // [sp+18h] [bp-2Ch]@15
  PROTO_NC_GUILD_ACADEMY_REWARD_STORAGE_OPEN_REQ kProto; // [sp+1Fh] [bp-25h]@18
  char acItemCount[32]; // [sp+20h] [bp-24h]@10

  v2 = this;
  i = 0;
  if ( pAck->NumOfRewardGood )
  {
    v3 = pAck + 2;
    v11 = pAck + 2;
    do
    {
      v4 = LOBYTE(v3[-1].Error);
      v5 = Item::Create(*(unsigned __int16 *)((char *)&v3[-1].Error + 1));
      pkItem = v5;
      if ( v5 )
      {
        ItemIcon::SetItem(*((ItemIcon **)&v2->m_kDropContents.ui_InvIndex + v4), v5, 1);
        ItemIcon::ShowLotText(*((ItemIcon **)&v2->m_kDropContents.ui_InvIndex + v4), 0);
        j = 0;
        if ( LOBYTE(v3->Error) )
        {
          v6 = (int)&v3[1].NumOfRewardGood;
          do
          {
            switch ( *(_DWORD *)(v6 - 4) )
            {
              case 2:
                ((void (__stdcall *)(const char *))v2->m_apkInvWin[v4 + 41]->vfptr[115].__vecDelDtor)("1");
                break;
              case 3:
                sprintf(acItemCount, "%I64d", *(_DWORD *)v6, *(_DWORD *)(v6 + 4));
                ((void (__stdcall *)(char *))v2->m_apkInvWin[v4 + 41]->vfptr[115].__vecDelDtor)(acItemCount);
                v7 = GuildAcademyTask::GetGuildAcademy();
                if ( (unsigned __int8)CClientGuildAcademy::AmIGuildAcademyMaster(v7) )
                  EditWin::SetEnable((EditWin *)v2->m_apkInvWin[v4 + 41], 1);
                break;
              case 4:
                ((void (__stdcall *)(const char *))v2->m_apkInvWin[v4 + 41]->vfptr[115].__vecDelDtor)("1");
                pkItem->m_kStruct.itemattr.blot.lot = *(_BYTE *)v6;
                break;
            }
            v6 += 12;
            ++j;
          }
          while ( j < SLOBYTE(v11->Error) );
          v3 = v11;
        }
        v8 = (int)v2->m_pkItemCountEditWin;
        ja = 51;
        do
        {
          (*(void (__stdcall **)(signed int))(**(_DWORD **)v8 + 484))(1);
          v8 += 4;
          --ja;
        }
        while ( ja );
      }
      v3 = (PROTO_NC_GUILD_ACADEMY_GET_REWARD_ITEM_ACK *)((char *)v3 + 16);
      ++i;
      v11 = v3;
    }
    while ( i < pAck->NumOfRewardGood );
  }
  kProto.nOpenType = 2;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x26u, 0x6Du, &kProto, 1);
  v2->m_bFromReq = 1;
}

//----- (006E75D0) --------------------------------------------------------
void __thiscall GuildAcademyItemRewardWin::OnClickWinCloseBtn(GuildAcademyItemRewardWin *this)
{
  GuildAcademyItemRewardWin *v1; // esi@1

  v1 = this;
  if ( this == (GuildAcademyItemRewardWin *)g_pkToolTipWin->m_pkToolTipParentWin )
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}

//----- (006E7600) --------------------------------------------------------
void __thiscall GuildAcademyItemRewardWin::OnInvLClick(GuildAcademyItemRewardWin *this, unsigned int uiInvIndex)
{
  GuildAcademyItemRewardWin *v2; // esi@1
  CClientGuildAcademy *v3; // eax@1
  Item *v4; // edi@2

  v2 = this;
  v3 = GuildAcademyTask::GetGuildAcademy();
  if ( (unsigned __int8)CClientGuildAcademy::AmIGuildAcademyMaster(v3) )
  {
    v4 = ItemIcon::GetItem((ItemIcon *)&v2->m_apkInvWin[uiInvIndex]->vfptr);
    if ( v4 )
    {
      v2->m_kDropContents.m_eSenderType = 20;
      v2->m_kDropContents.m_eType = 0;
      v2->m_kDropContents.m_apvParam[0] = v4;
      v2->m_kDropContents.m_apvParam[1] = 0;
      v2->m_kDropContents.m_uiSenderIndex = uiInvIndex;
      v2->m_kDropContents.m_uiLot = ((int (__thiscall *)(_DWORD))v4->vfptr[3].__vecDelDtor)(v4);
      v2->m_kDrop.m_pkSender = (PgWin *)v2;
      PgCursor::ms_pkDrop = &v2->m_kDrop;
      SoundMgr::PlayItemPutSound(v4->m_kStruct.itemid);
    }
  }
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (006E7690) --------------------------------------------------------
char __stdcall GuildAcademyItemRewardWin::IsExist(Item *item)
{
  unsigned int v2; // esi@1
  Item *v3; // eax@2
  int v4; // ebx@4

  v2 = 0;
  while ( 1 )
  {
    v3 = GuildAcademyStorage::Get(v2);
    if ( v3 )
    {
      if ( item->m_kStruct.itemid == v3->m_kStruct.itemid )
      {
        v4 = ((int (__thiscall *)(_DWORD))v3->vfptr[9].__vecDelDtor)(v3);
        if ( ((int (__thiscall *)(_DWORD))item->vfptr[9].__vecDelDtor)(item) == v4 )
          break;
      }
    }
    if ( (signed int)++v2 >= 72 )
      return 0;
  }
  return 1;
}

//----- (006E76F0) --------------------------------------------------------
void __thiscall GuildAcademyItemRewardInvWin::DoAction(GuildAcademyItemRewardInvWin *this)
{
  GuildAcademyItemRewardInvWin *v1; // esi@1
  PgWin *v2; // eax@2

  v1 = this;
  if ( !this->m_bDisable )
  {
    v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
    if ( v2 )
      PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiInvIndex);
  }
}

//----- (006E7720) --------------------------------------------------------
void __thiscall GuildAcademyItemRewardInvWin::DoRAction(GuildAcademyItemRewardInvWin *this)
{
  GuildAcademyItemRewardInvWin *v1; // esi@1
  PgWin *v2; // eax@2

  v1 = this;
  if ( !this->m_bDisable )
  {
    v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
    if ( v2 )
      PgWin::PostCommandMsg(v2, v1->m_uiRCmdMsg, v1->m_uiInvIndex);
  }
}

//----- (006E7750) --------------------------------------------------------
void __thiscall GuildAcademyItemRewardWin::UpdateAcademyInfo(GuildAcademyItemRewardWin *this)
{
  GuildAcademyItemRewardWin *v1; // esi@1
  CClientGuildAcademy *v2; // edi@1
  CClientGuildAcademyMember *v3; // ebx@1
  NiRefObjectVtbl *v4; // ST24_4@1
  unsigned int v5; // ST14_4@1
  unsigned int v6; // ST10_4@1
  int v7; // ST0C_4@1
  unsigned int v8; // ST08_4@1
  char *v9; // eax@1
  char *v10; // eax@1
  __int64 v11; // rax@1
  __int64 v12; // rax@1
  __int64 v13; // rax@1
  __int64 v14; // rax@1
  __int64 v15; // rax@1
  __int64 v16; // rax@1
  __int64 v17; // rax@1
  __int64 v18; // rax@1
  char acStr[128]; // [sp+10h] [bp-84h]@1

  v1 = this;
  GuildTask::GetGuild();
  v2 = GuildAcademyTask::GetGuildAcademy();
  v3 = GuildAcademyMemberTask::GetGuildAcademyMember();
  ((void (__stdcall *)(signed int))v1->m_pkGuildAcademyInfo1->vfptr[64].__vecDelDtor)(1);
  v4 = v1->m_pkGuildAcademyInfo1->vfptr;
  v5 = v2->m_GuildAcademy.nAcademyPoint;
  v6 = v2->m_GuildAcademy.nAcademyRank;
  v7 = v3->m_NumOfAcademyMembers;
  v8 = CClientGuildAcademyMember::GetNumOfOnlineMembers(v3);
  v9 = (char *)TextData::Get(0xCF512932);
  v10 = fs(v9, v8, v7, v6, v5);
  v4[118].__vecDelDtor((NiRefObject *)v1->m_pkGuildAcademyInfo1, (unsigned int)v10);
  ((void (__stdcall *)(signed int))v1->m_pkGuildAcademyInfo2->vfptr[64].__vecDelDtor)(1);
  v11 = GuildAcademyStorage::GetMoney();
  v12 = User::GetGem(v11);
  sprintf(acStr, "%I64d", v12);
  ((void (__stdcall *)(char *))v1->m_pkGemText->vfptr[118].__vecDelDtor)(acStr);
  v13 = GuildAcademyStorage::GetMoney();
  v14 = User::GetGold(v13);
  sprintf(acStr, "%I64d", v14);
  ((void (__stdcall *)(char *))v1->m_pkGoldText->vfptr[118].__vecDelDtor)(acStr);
  v15 = GuildAcademyStorage::GetMoney();
  v16 = User::GetSilver(v15);
  sprintf(acStr, "%I64d", v16);
  ((void (__stdcall *)(char *))v1->m_pkSilverText->vfptr[118].__vecDelDtor)(acStr);
  v17 = GuildAcademyStorage::GetMoney();
  v18 = User::GetCopper(v17);
  sprintf(acStr, "%I64d", v18);
  ((void (__stdcall *)(char *))v1->m_pkCopperText->vfptr[118].__vecDelDtor)(acStr);
}

//----- (006E78F0) --------------------------------------------------------
void __thiscall GuildAcademyItemRewardWin::OnClickInitializeBtn(GuildAcademyItemRewardWin *this)
{
  GuildAcademyItemRewardWin *v1; // ebx@1
  char *v2; // esi@1
  signed int v3; // edi@1
  CClientGuildAcademy *v4; // eax@3
  int v5; // eax@4
  unsigned int v6; // eax@5
  void *v7; // eax@7
  void *v8; // edi@7
  char *v9; // eax@14
  MsgBox *v10; // eax@14
  int key; // [sp+Ch] [bp-10h]@4
  NiUnsharedGeometryGroup *v12; // [sp+10h] [bp-Ch]@4
  NiUnsharedGeometryGroup *v13; // [sp+14h] [bp-8h]@4
  NiUnsharedGeometryGroup *v14; // [sp+18h] [bp-4h]@4

  v1 = this;
  v2 = (char *)this->m_pkItemCountEditWin;
  v3 = 51;
  do
  {
    (*(void (__stdcall **)(signed int))(**(_DWORD **)v2 + 484))(1);
    v2 += 4;
    --v3;
  }
  while ( v3 );
  v4 = GuildAcademyTask::GetGuildAcademy();
  if ( (unsigned __int8)CClientGuildAcademy::AmIGuildAcademyMaster(v4) )
  {
    v9 = (char *)TextData::Get(0x909494C4);
    v10 = MsgBox::Modal(MSGBOX_OKCANCEL, v9);
    v1->m_pkMsgBox = v10;
    ((void (__stdcall *)(IDirectMessengerVtbl **))v10->vfptr->SetMsgHooker)(&v1->vfptr);
  }
  else
  {
    v12 = &unk_96F8EB;
    v13 = &unk_96F8EB;
    v14 = &unk_96F8EB;
    key = -982641618;
    v5 = *(_DWORD *)(ITableBase<TextDataType,TextData>::ms_pkTable + 56);
    if ( v5 )
      v6 = *(_DWORD *)(v5 + 40);
    else
      v6 = 0;
    v7 = bsearch(&key, TextData::ms_apkNode, v6, 0x10u, TextDataNodeComp);
    v8 = v7;
    if ( v7 )
    {
      if ( strcmp(*((const char **)v7 + 2), "None") )
        SoundMgr::PlayGenderVoice(&g_kSoundMgr, *((char **)v8 + 2));
      if ( strcmp(*((const char **)v8 + 3), "None") )
        SoundMgr::PlayInterfaceSound(&g_kSoundMgr, *((char **)v8 + 3));
      GameFrameWork::AddSysMsg((GameFrameWork *)v1->m_pkFrameWork, *((const char **)v8 + 1));
    }
    else
    {
      GameFrameWork::AddSysMsg((GameFrameWork *)v1->m_pkFrameWork, (const char *)&unk_96F8EB);
    }
  }
}
// A88690: using guessed type int ITableBase<TextDataType,TextData>::ms_pkTable;

//----- (006E7A60) --------------------------------------------------------
void __thiscall GuildAcademyItemRewardWin::OnClickGuildAcademyStorageBtn(GuildAcademyItemRewardWin *this)
{
  GuildAcademyItemRewardWin *v1; // esi@1
  GuildAcademyStorageWin *v2; // eax@1
  CClientGuild *v3; // eax@2
  NiUnsharedGeometryGroup *v4; // eax@3
  PROTO_NC_GUILD_ACADEMY_REWARD_STORAGE_OPEN_REQ kProto; // [sp+7h] [bp-1h]@4

  v1 = this;
  v2 = GuildAcademyTask::GetGuildAcademyStorageWin();
  if ( !(unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[65].__vecDelDtor)(v2) )
  {
    v3 = GuildTask::GetGuild();
    if ( (unsigned __int8)CClientGuild::AmIGuildMember(v3) )
    {
      kProto.nOpenType = 0;
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x26u, 0x6Du, &kProto, 1);
    }
    else
    {
      v4 = TextData::Get(0x7290F5A0u);
      GameFrameWork::AddSysMsg((GameFrameWork *)v1->m_pkFrameWork, (const char *)v4);
    }
  }
}

//----- (006E7AD0) --------------------------------------------------------
void __thiscall GuildAcademyItemRewardInvWin::SetDisable(GuildAcademyItemRewardInvWin *this, bool bDisable)
{
  GuildAcademyItemRewardInvWin *v2; // ebx@1
  NiProperty *v3; // edi@2
  NiObjectNET *v4; // eax@3
  NiObjectNET *v5; // esi@3
  NiProperty *v6; // esi@7
  NiMaterialProperty *v7; // eax@8
  NiProperty *v8; // eax@9
  double v9; // st7@13
  NiTimeController *kColor; // ST14_4@15
  NiExtraData **kColor_4; // ST18_4@15
  unsigned int kColor_8; // ST1C_4@15

  v2 = this;
  if ( this->m_bDisable != bDisable )
  {
    v3 = NiAVObject::GetProperty((NiAVObject *)&this->vfptr, 9);
    if ( !v3 )
    {
      v4 = (NiObjectNET *)operator new(0x28u);
      v5 = v4;
      if ( v4 )
      {
        NiObjectNET::NiObjectNET(v4);
        v5->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
        LOWORD(v5[1].vfptr) = 0;
        v5[1].m_uiRefCount = 0;
        v5[1].m_pcName = (char *)1;
      }
      else
      {
        v5 = 0;
      }
      v3 = (NiProperty *)v5;
      NiAVObject::AttachProperty((NiAVObject *)&v2->vfptr, (NiProperty *)v5);
    }
    v6 = NiAVObject::GetProperty((NiAVObject *)&v2->vfptr, 3);
    if ( !v6 )
    {
      v7 = (NiMaterialProperty *)operator new(0x60u);
      if ( v7 )
        NiMaterialProperty::NiMaterialProperty(v7);
      else
        v8 = 0;
      v6 = v8;
      NiAVObject::AttachProperty((NiAVObject *)&v2->vfptr, v8);
    }
    v2->m_bDisable = bDisable;
    v3[1].m_uiRefCount = 0;
    v3[1].m_pcName = 0;
    ++v6[3].m_uiRefCount;
    if ( bDisable )
      v9 = 0.40000001;
    else
      v9 = 1.0;
    *(float *)&kColor = v9;
    *(float *)&kColor_4 = v9;
    v6[2].m_spControllers.m_pObject = kColor;
    *(float *)&kColor_8 = v9;
    v6[2].m_ppkExtra = kColor_4;
    v6[2].m_uiExtraDataSize = kColor_8;
    NiAVObject::UpdateProperties((NiAVObject *)&v2->vfptr);
  }
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);

//----- (006E7C00) --------------------------------------------------------
void __thiscall GuildAcademyItemRewardWin::UpdateMeWin(GuildAcademyItemRewardWin *this, float fCurTime)
{
  GuildAcademyItemRewardWin::UpdateAcademyInfo(this);
}

//----- (006E7C10) --------------------------------------------------------
char __userpurge GuildAcademyItemRewardWin::DropOnInv@<al>(GuildAcademyItemRewardWin *this@<ecx>, unsigned int a2@<ebx>, DropContents *pkContents, unsigned int uiReceiverInvIndex)
{
  GuildAcademyItemRewardWin *v4; // edi@1
  CClientGuildAcademy *v5; // eax@1
  NiUnsharedGeometryGroup *v6; // eax@2
  char result; // al@2
  DropContents::SenderType v8; // eax@3
  NiUnsharedGeometryGroup *v9; // eax@5
  void *v10; // esi@6
  int v11; // eax@7
  NiUnsharedGeometryGroup *v12; // eax@11
  int v13; // ebx@14
  NiUnsharedGeometryGroup *v14; // eax@15
  Item *v15; // ebx@16
  unsigned int v16; // esi@22
  unsigned int v17; // [sp-8h] [bp-Ch]@13
  DropContents *pkContentsa; // [sp+Ch] [bp+8h]@22
  NiRefObjectVtbl *uiReceiverInvIndexb; // [sp+10h] [bp+Ch]@22
  unsigned int uiReceiverInvIndexa; // [sp+10h] [bp+Ch]@22
  NiRefObjectVtbl *uiReceiverInvIndexc; // [sp+10h] [bp+Ch]@25

  v4 = this;
  v5 = GuildAcademyTask::GetGuildAcademy();
  if ( !(unsigned __int8)CClientGuildAcademy::AmIGuildAcademyMaster(v5) )
  {
    v6 = TextData::Get(0x186E6673u);
    GameFrameWork::AddSysMsg((GameFrameWork *)v4->m_pkFrameWork, (const char *)v6);
    return 0;
  }
  v8 = pkContents->m_eSenderType;
  if ( v8 != 19 && v8 != 20 )
  {
    v9 = TextData::Get(0x1D6C5880u);
    GameFrameWork::AddSysMsg((GameFrameWork *)v4->m_pkFrameWork, (const char *)v9);
    return 0;
  }
  v10 = pkContents->m_apvParam[0];
  if ( !v10 )
    return 0;
  v11 = *((_DWORD *)v10 + 28);
  if ( !v11 )
    return 0;
  if ( *(_DWORD *)(v11 + 118) == 4
    && (*(int (__thiscall **)(void *))(*(_DWORD *)v10 + 44))(pkContents->m_apvParam[0])
    && !(*(int (__thiscall **)(void *))(*(_DWORD *)v10 + 44))(v10) )
  {
    v12 = TextData::Get(0x60915CF4u);
    GameFrameWork::AddSysMsg((GameFrameWork *)v4->m_pkFrameWork, (const char *)v12);
    return 0;
  }
  v17 = a2;
  if ( (unsigned __int8)(*(int (__thiscall **)(void *))(*(_DWORD *)v10 + 4))(v10) != 24
    || (v13 = (*(int (__thiscall **)(void *))(*(_DWORD *)v10 + 16))(v10),
        (*(int (__thiscall **)(void *))(*(_DWORD *)v10 + 12))(v10) == v13) )
  {
    v15 = Item::Create(*((_WORD *)v10 + 4));
    if ( v15->vfptr[3].__vecDelDtor((NiRefObject *)v15, v17) )
      v15->vfptr[2].__vecDelDtor((NiRefObject *)v15, 0);
    v15->m_kStruct.itemattr.blot.lot = (*(int (__thiscall **)(void *))(*(_DWORD *)v10 + 36))(v10);
    ((void (__thiscall *)(Item *))v15->vfptr[9].__vecDelDtor)(v15);
    if ( (unsigned __int8)((int (__thiscall *)(Item *))v15->vfptr[1].__vecDelDtor)(v15)
      && (unsigned __int8)((int (__thiscall *)(Item *))v15->vfptr[1].__vecDelDtor)(v15) != 1
      && (unsigned __int8)((int (__thiscall *)(_DWORD))v15->vfptr[1].__vecDelDtor)(v15) != 2
      && (unsigned __int8)((int (__thiscall *)(_DWORD))v15->vfptr[1].__vecDelDtor)(v15) != 14 )
    {
      v16 = uiReceiverInvIndex;
      EditWin::SetEnable(v4->m_pkItemCountEditWin[uiReceiverInvIndex], 0);
      uiReceiverInvIndexb = v4->m_pkItemCountEditWin[uiReceiverInvIndex]->vfptr + 115;
      fs("%d", 1);
      ((void (__thiscall *)(EditWin *))uiReceiverInvIndexb->__vecDelDtor)(v4->m_pkItemCountEditWin[v16]);
      uiReceiverInvIndexa = (unsigned int)v4->m_pkItemCountEditWin;
      pkContentsa = (DropContents *)51;
      do
      {
        (*(void (__stdcall **)(signed int))(**(_DWORD **)uiReceiverInvIndexa + 484))(1);
        uiReceiverInvIndexa += 4;
        pkContentsa = (DropContents *)((char *)pkContentsa - 1);
      }
      while ( pkContentsa );
    }
    else
    {
      v16 = uiReceiverInvIndex;
      EditWin::SetEnable(v4->m_pkItemCountEditWin[uiReceiverInvIndex], 1);
      ((void (*)(void))v4->m_pkItemCountEditWin[uiReceiverInvIndex]->vfptr[120].__vecDelDtor)();
      uiReceiverInvIndexc = v4->m_pkItemCountEditWin[uiReceiverInvIndex]->vfptr + 115;
      fs("%d", 1);
      ((void (__thiscall *)(EditWin *))uiReceiverInvIndexc->__vecDelDtor)(v4->m_pkItemCountEditWin[v16]);
    }
    ItemIcon::SetItem((ItemIcon *)&v4->m_apkInvWin[v16]->vfptr, v15, 1);
    ItemIcon::ShowLotText((ItemIcon *)&v4->m_apkInvWin[v16]->vfptr, 0);
    GuildAcademyItemRewardInvWin::SetDisable(v4->m_apkInvWin[v16], 0);
    result = 1;
  }
  else
  {
    v14 = TextData::Get(0x60915CF4u);
    GameFrameWork::AddSysMsg((GameFrameWork *)v4->m_pkFrameWork, (const char *)v14);
    result = 0;
  }
  return result;
}
// 6E7C10: could not find valid save-restore pair for ebx

//----- (006E7E80) --------------------------------------------------------
void __thiscall GuildAcademyItemRewardWin::On_GuildAcademyStorage_Cell_Changed(GuildAcademyItemRewardWin *this)
{
  char *v1; // esi@1
  signed int v2; // edi@1
  Item *v3; // eax@2
  char v4; // al@3
  GuildAcademyItemRewardInvWin *v5; // ecx@3

  v1 = (char *)this->m_apkInvWin;
  v2 = 51;
  do
  {
    v3 = ItemIcon::GetItem(*(ItemIcon **)v1);
    if ( v3 )
    {
      v4 = GuildAcademyItemRewardWin::IsExist(v3);
      v5 = *(GuildAcademyItemRewardInvWin **)v1;
      if ( v4 )
      {
        GuildAcademyItemRewardInvWin::SetDisable(v5, 0);
      }
      else
      {
        GuildAcademyItemRewardInvWin::SetDisable(v5, 1);
        EditWin::SetEnable(*((EditWin **)v1 + 51), 0);
      }
    }
    v1 += 4;
    --v2;
  }
  while ( v2 );
}

//----- (006E7ED0) --------------------------------------------------------
char __userpurge GuildAcademyItemRewardInvWin::EatDropInstance@<al>(GuildAcademyItemRewardInvWin *this@<ecx>, unsigned int a2@<ebx>, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  GuildAcademyItemRewardInvWin *v5; // edi@1
  char result; // al@2
  DropContents *v7; // esi@3
  GuildAcademyItemRewardWin *v8; // eax@5

  v5 = this;
  if ( *pkDrop )
  {
    v7 = (DropContents *)(*pkDrop)->m_pkContents;
    if ( v7 )
    {
      v8 = (GuildAcademyItemRewardWin *)PgWin::GetParentWin((PgWin *)&this->vfptr);
      result = GuildAcademyItemRewardWin::DropOnInv(v8, a2, v7, v5->m_uiInvIndex);
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006E7F10) --------------------------------------------------------
GuildAcademyItemRewardInvWin *__cdecl GuildAcademyItemRewardInvWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent)
{
  PgWin *v4; // eax@1
  PgWin *v5; // esi@1
  PgWin *v6; // edi@8
  GuildAcademyItemRewardInvWin *v7; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v4 = (PgWin *)operator new(0x1C8u);
  v5 = v4;
  result.m_pObject = v4;
  v9 = 0;
  if ( v4 )
  {
    ItemIcon::ItemIcon((ItemIcon *)v4);
    LOBYTE(v9) = 1;
    v5->vfptr = (NiRefObjectVtbl *)&GuildAcademyItemRewardInvWin::`vftable'{for `NiNode'};
    v5->vfptr = (IDirectMessengerVtbl *)&GuildAcademyItemRewardInvWin::`vftable'{for `IDirectMessenger'};
    v5[1].m_kPropertyList.m_pkHead = (NiTListItem<NiPointer<NiProperty> > *)-1;
    ItemIcon::SetItem((ItemIcon *)v5, 0, 1);
    LOBYTE(v5[1].m_kPropertyList.m_pkTail) = 0;
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v9 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, v5);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, PgWin *))v5->vfptr[154].__vecDelDtor)(
                          v5,
                          iXPos,
                          iYPos,
                          uiInvIndex,
                          pkParent) )
  {
    ((void (__thiscall *)(PgWin *))v5->vfptr[89].__vecDelDtor)(v5);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = (GuildAcademyItemRewardInvWin *)v5;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v5);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = 0;
  }
  return v7;
}
// 9C48C8: using guessed type void (__thiscall *GuildAcademyItemRewardInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C48E4: using guessed type int (__thiscall *GuildAcademyItemRewardInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006E8080) --------------------------------------------------------
GuildAcademyItemRewardWin *__cdecl GuildAcademyItemRewardWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  GuildAcademyItemRewardWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x368u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    GuildAcademyItemRewardWin::GuildAcademyItemRewardWin((GuildAcademyItemRewardWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (GuildAcademyItemRewardWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (006E81B0) --------------------------------------------------------
char __thiscall GuildAcademyItemRewardWin::Create(GuildAcademyItemRewardWin *this, PgFrameWork *pkFrameWork)
{
  GuildAcademyItemRewardWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiAVObject *v5; // eax@4
  NiTexturingProperty *v6; // eax@4
  NiTexturingProperty *v7; // edi@4
  NiTexturingProperty::Map *v8; // eax@6
  NiSourceTexture *v9; // eax@7
  NiNode *v10; // esi@10
  char result; // al@14
  PgSprData *v12; // eax@15
  NiNode *v13; // esi@18
  int v14; // edi@22
  int v15; // ebx@22
  NiSourceTexture *v16; // eax@22
  PgSprData *v17; // eax@23
  NiSourceTexture *v18; // eax@25
  PgSprData *v19; // eax@25
  PgFont *v20; // eax@27
  NiRefObjectVtbl *v21; // STC4_4@27
  NiUnsharedGeometryGroup *v22; // eax@27
  PgSprData *v23; // eax@29
  PgSprData *v24; // eax@29
  PgFont *v25; // eax@30
  PgWinText *v26; // eax@30
  PgFont *v27; // eax@30
  PgWinText *v28; // eax@30
  NiUnsharedGeometryGroup *v29; // eax@30
  PgSprData *v30; // eax@30
  PgFont *v31; // ST9C_4@30
  unsigned int v32; // ST98_4@30
  unsigned int v33; // eax@30
  NiSourceTexture *v34; // STA8_4@30
  NiNode *v35; // edx@30
  PgSprData *v36; // eax@30
  PgFont *v37; // ST9C_4@30
  unsigned int v38; // ST98_4@30
  unsigned int v39; // eax@30
  NiSourceTexture *v40; // STA8_4@30
  NiNode *v41; // edx@30
  PgSprData *v42; // eax@30
  PgFont *v43; // ST9C_4@30
  unsigned int v44; // ST98_4@30
  unsigned int v45; // eax@30
  NiSourceTexture *v46; // STA8_4@30
  NiNode *v47; // edx@30
  PgSprData *v48; // eax@30
  PgFont *v49; // ST9C_4@30
  unsigned int v50; // ST98_4@30
  unsigned int v51; // eax@30
  char *tempString2; // STBC_4@31
  int v53; // eax@31
  unsigned int v54; // STC0_4@31
  PgFont *v55; // eax@31
  char *v56; // eax@32
  char *v57; // STBC_4@33
  const char *v58; // eax@33
  PgSprData *v59; // eax@33
  EditWin *v60; // eax@33
  PgSprData::PgHitTester *v61; // eax@34
  char *v62; // STBC_4@34
  PgFont *v63; // eax@34
  char *v64; // STBC_4@34
  NiUnsharedGeometryGroup *v65; // eax@34
  PgSprData::PgHitTester *v66; // eax@34
  char *v67; // STBC_4@34
  PgFont *v68; // eax@34
  int v69; // eax@34
  char *v70; // STBC_4@34
  PgFont *v71; // eax@34
  char *v72; // STBC_4@34
  NiUnsharedGeometryGroup *v73; // eax@34
  int v74; // eax@34
  char *v75; // STBC_4@34
  PgFont *v76; // eax@34
  char *v77; // STBC_4@34
  NiUnsharedGeometryGroup *v78; // eax@34
  int v79; // eax@34
  char *v80; // STBC_4@34
  PgFont *v81; // eax@34
  char *v82; // STBC_4@34
  NiUnsharedGeometryGroup *v83; // eax@34
  char *v84; // STBC_4@35
  const char *v85; // eax@35
  PgSprData *v86; // eax@35
  GuildAcademyItemRewardInvWin *v87; // eax@35
  NiNode *v88; // esi@38
  signed int v89; // [sp+C4h] [bp-30h]@30
  NiPointer<NiTexturingProperty> spTexProp; // [sp+C8h] [bp-2Ch]@4
  int i; // [sp+CCh] [bp-28h]@30
  unsigned int uiWidth; // [sp+D0h] [bp-24h]@25
  unsigned int uiHeight; // [sp+D4h] [bp-20h]@25
  NiSourceTexture *pkTexture; // [sp+D8h] [bp-1Ch]@7
  NiPointer<NiNode> spNode; // [sp+DCh] [bp-18h]@1
  int uiLeft; // [sp+E0h] [bp-14h]@15
  int uiTop; // [sp+E4h] [bp-10h]@15
  int v98; // [sp+F0h] [bp-4h]@1
  PgWinText *pkTextWinc; // [sp+FCh] [bp+8h]@27
  PgSprData *pkTextWind; // [sp+FCh] [bp+8h]@27
  NiSourceTexture *pkTextWin; // [sp+FCh] [bp+8h]@27
  PgSprData *pkTextWine; // [sp+FCh] [bp+8h]@28
  PgWinText *pkTextWinf; // [sp+FCh] [bp+8h]@30
  PgWinText *pkTextWing; // [sp+FCh] [bp+8h]@30
  PgWinText *pkTextWinh; // [sp+FCh] [bp+8h]@30
  PgWinText *pkTextWini; // [sp+FCh] [bp+8h]@30
  PgWinText *pkTextWinj; // [sp+FCh] [bp+8h]@30
  PgWinText *pkTextWink; // [sp+FCh] [bp+8h]@30
  PgWinText *pkTextWinl; // [sp+FCh] [bp+8h]@30
  PgWinText *pkTextWinm; // [sp+FCh] [bp+8h]@30
  PgWinText *pkTextWinn; // [sp+FCh] [bp+8h]@30
  const char *pkTextWino; // [sp+FCh] [bp+8h]@31
  PgWinText *pkTextWinp; // [sp+FCh] [bp+8h]@31
  PgWinText *pkTextWinq; // [sp+FCh] [bp+8h]@31
  PgWinText *pkTextWinr; // [sp+FCh] [bp+8h]@31
  PgWinText *pkTextWina; // [sp+FCh] [bp+8h]@32
  PgWinText *pkTextWins; // [sp+FCh] [bp+8h]@34
  PgWinText *pkTextWint; // [sp+FCh] [bp+8h]@34
  PgWinText *pkTextWinu; // [sp+FCh] [bp+8h]@34
  PgWinText *pkTextWinv; // [sp+FCh] [bp+8h]@34
  PgWinText *pkTextWinw; // [sp+FCh] [bp+8h]@34
  PgWinText *pkTextWinx; // [sp+FCh] [bp+8h]@34
  PgWinText *pkTextWiny; // [sp+FCh] [bp+8h]@34
  PgWinText *pkTextWinz; // [sp+FCh] [bp+8h]@34
  PgWinText *pkTextWinba; // [sp+FCh] [bp+8h]@34
  PgWinText *pkTextWinbb; // [sp+FCh] [bp+8h]@34
  PgWinText *pkTextWinbc; // [sp+FCh] [bp+8h]@34
  PgWinText *pkTextWinbd; // [sp+FCh] [bp+8h]@34
  PgWinText *pkTextWinbe; // [sp+FCh] [bp+8h]@34
  IconWin **pkTextWinb; // [sp+FCh] [bp+8h]@34

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v98 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildAcademyItemGift.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Frame");
  v6 = (NiTexturingProperty *)NiAVObject::GetProperty(v5, 8);
  v7 = v6;
  spTexProp.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v8 = *v7->m_kMaps.m_pBase;
  LOBYTE(v98) = 1;
  if ( !v8 || (v9 = (NiSourceTexture *)v8->m_spTexture.m_pObject, (pkTexture = v9) == 0) )
  {
    LOBYTE(v98) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v10 = spNode.m_pObject;
    v98 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
    return 0;
  }
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v9);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v12, 0, pkFrameWork, "GuildAcademyItemCompensation", 0) )
  {
    v14 = uiLeft;
    v15 = uiTop;
    v16 = MenuTexMgr::GetTexture(0x13u);
    if ( v16 )
      v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v16);
    else
      v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v17, (PgWin *)&v2->vfptr, 0, 0);
    v18 = MenuTexMgr::GetTexture(0x12u);
    v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, v18);
    PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v19, (PgWin *)&v2->vfptr, 0, 0);
    if ( !PgUtil::GetTriShapeRect(
            (NiAVObject *)&spNode.m_pObject->vfptr,
            "WinTitle",
            &uiLeft,
            &uiTop,
            &uiWidth,
            &uiHeight) )
      goto LABEL_45;
    v20 = Font::Get(MAIN_MENU);
    pkTextWinc = PgWinText::CreateWin(uiLeft - v14, uiTop - v15, uiWidth, uiHeight, v20, (PgWin *)&v2->vfptr, 0, 0);
    pkTextWinc->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinc, 1u);
    ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinc->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
    v21 = pkTextWinc->vfptr + 118;
    v22 = TextData::Get(0xC605FF25);
    v21->__vecDelDtor(pkTextWinc, v22);
    ((void (__stdcall *)(_DWORD))pkTextWinc->vfptr[60].__vecDelDtor)(0);
    pkTextWind = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, pkTexture);
    PgSprData::Add(pkTextWind, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
    PgSprData::Add(pkTextWind, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
    PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, pkTextWind, (PgWin *)&v2->vfptr, 0xBu, 0, 0);
    pkTextWin = MenuTexMgr::GetTexture(4u);
    if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
    {
      pkTextWine = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, pkTextWin);
      PgSprData::Add(pkTextWine, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
      PgSprData::Add(pkTextWine, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, pkTextWine, (PgWin *)&v2->vfptr, 0x11u, 0, 0);
    }
    v23 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
    PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v23, (PgWin *)&v2->vfptr, 0, 0);
    v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, pkTexture);
    PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v24, (PgWin *)&v2->vfptr, 0, 0);
    if ( PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "GuildInfoText",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight) )
    {
      v25 = Font::Get(MAIN_MENU);
      v26 = PgWinText::CreateWin(uiLeft - v14, uiTop - v15 - 5, uiWidth, uiHeight, v25, (PgWin *)&v2->vfptr, 0, 0);
      v2->m_pkGuildAcademyInfo1 = v26;
      v26->vfptr[122].__vecDelDtor((NiRefObject *)v26, 4u);
      ((void (__stdcall *)(void *))v2->m_pkGuildAcademyInfo1->vfptr[118].__vecDelDtor)(&unk_9C46BA);
      ((void (__stdcall *)(_DWORD))v2->m_pkGuildAcademyInfo1->vfptr[60].__vecDelDtor)(0);
      v27 = Font::Get(MAIN_MENU);
      v28 = PgWinText::CreateWin(uiLeft - v14, uiTop - v15 + 30, uiWidth, uiHeight - 30, v27, (PgWin *)&v2->vfptr, 0, 0);
      v2->m_pkGuildAcademyInfo2 = v28;
      v28->vfptr[122].__vecDelDtor((NiRefObject *)v28, 4u);
      pkTextWinf = (PgWinText *)&v2->m_pkGuildAcademyInfo2->vfptr[118];
      v29 = TextData::Get(0xF54672A1);
      ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkTextWinf->vfptr)(v2->m_pkGuildAcademyInfo2, v29);
      ((void (__stdcall *)(_DWORD))v2->m_pkGuildAcademyInfo2->vfptr[60].__vecDelDtor)(0);
      v30 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GemInput01", &uiLeft, &uiTop, pkTexture);
      pkTextWing = (PgWinText *)PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v30, (PgWin *)&v2->vfptr, 0, 0);
      v31 = Font::Get(0);
      v32 = ((int (*)(void))pkTextWing->vfptr[37].__vecDelDtor)();
      v33 = ((int (*)(void))pkTextWing->vfptr[36].__vecDelDtor)();
      pkTextWinh = PgWinText::CreateWin(0, 1, v33, v32, v31, (PgWin *)&pkTextWing->vfptr, 0, 0);
      pkTextWinh->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinh, 6u);
      ((void (__stdcall *)(void *))pkTextWinh->vfptr[118].__vecDelDtor)(&unk_9C46BB);
      ((void (__stdcall *)(_DWORD))pkTextWinh->vfptr[60].__vecDelDtor)(0);
      v34 = pkTexture;
      v35 = spNode.m_pObject;
      v2->m_pkGemText = pkTextWinh;
      v36 = PgSprData::Create((NiAVObject *)&v35->vfptr, "GoldInput01", &uiLeft, &uiTop, v34);
      pkTextWini = (PgWinText *)PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v36, (PgWin *)&v2->vfptr, 0, 0);
      v37 = Font::Get(0);
      v38 = ((int (*)(void))pkTextWini->vfptr[37].__vecDelDtor)();
      v39 = ((int (*)(void))pkTextWini->vfptr[36].__vecDelDtor)();
      pkTextWinj = PgWinText::CreateWin(0, 1, v39, v38, v37, (PgWin *)&pkTextWini->vfptr, 0, 0);
      pkTextWinj->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinj, 6u);
      ((void (__stdcall *)(void *))pkTextWinj->vfptr[118].__vecDelDtor)(&unk_9C46C2);
      ((void (__stdcall *)(_DWORD))pkTextWinj->vfptr[60].__vecDelDtor)(0);
      v40 = pkTexture;
      v41 = spNode.m_pObject;
      v2->m_pkGoldText = pkTextWinj;
      v42 = PgSprData::Create((NiAVObject *)&v41->vfptr, "SilverInput01", &uiLeft, &uiTop, v40);
      pkTextWink = (PgWinText *)PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v42, (PgWin *)&v2->vfptr, 0, 0);
      v43 = Font::Get(0);
      v44 = ((int (*)(void))pkTextWink->vfptr[37].__vecDelDtor)();
      v45 = ((int (*)(void))pkTextWink->vfptr[36].__vecDelDtor)();
      pkTextWinl = PgWinText::CreateWin(0, 1, v45, v44, v43, (PgWin *)&pkTextWink->vfptr, 0, 0);
      pkTextWinl->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinl, 6u);
      ((void (__stdcall *)(void *))pkTextWinl->vfptr[118].__vecDelDtor)(&unk_9C46C3);
      ((void (__stdcall *)(_DWORD))pkTextWinl->vfptr[60].__vecDelDtor)(0);
      v46 = pkTexture;
      v47 = spNode.m_pObject;
      v2->m_pkSilverText = pkTextWinl;
      v48 = PgSprData::Create((NiAVObject *)&v47->vfptr, "CopperInput01", &uiLeft, &uiTop, v46);
      pkTextWinm = (PgWinText *)PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v48, (PgWin *)&v2->vfptr, 0, 0);
      v49 = Font::Get(0);
      v50 = ((int (*)(void))pkTextWinm->vfptr[37].__vecDelDtor)();
      v51 = ((int (*)(void))pkTextWinm->vfptr[36].__vecDelDtor)();
      pkTextWinn = PgWinText::CreateWin(0, 1, v51, v50, v49, (PgWin *)&pkTextWinm->vfptr, 0, 0);
      pkTextWinn->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinn, 6u);
      ((void (__stdcall *)(void *))pkTextWinn->vfptr[118].__vecDelDtor)(&unk_9C46CA);
      ((void (__stdcall *)(_DWORD))pkTextWinn->vfptr[60].__vecDelDtor)(0);
      v2->m_pkCopperText = pkTextWinn;
      i = 10;
      v89 = 50;
      do
      {
        pkTextWino = fs("Level%02d", i - 9);
        tempString2 = fs("%02dLv", i);
        pkTextWinp = (PgWinText *)PgSprData::Create(
                                    (NiAVObject *)&spNode.m_pObject->vfptr,
                                    pkTextWino,
                                    &uiLeft,
                                    &uiTop,
                                    pkTexture);
        PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWinp, (PgWin *)&v2->vfptr, 0, 0);
        v53 = *(_DWORD *)LODWORD(pkTextWinp->m_kWorldBound.m_kCenter.x);
        pkTextWinq = *(PgWinText **)(v53 + 24);
        v54 = *(_DWORD *)(v53 + 20);
        v55 = Font::Get(0);
        pkTextWinr = PgWinText::CreateWin(
                       uiLeft - v14,
                       uiTop - v15 + 1,
                       v54,
                       (unsigned int)pkTextWinq,
                       v55,
                       (PgWin *)&v2->vfptr,
                       0,
                       0);
        pkTextWinr->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinr, 5u);
        ((void (__stdcall *)(char *))pkTextWinr->vfptr[118].__vecDelDtor)(tempString2);
        ((void (__stdcall *)(_DWORD))pkTextWinr->vfptr[60].__vecDelDtor)(0);
        ++i;
        --v89;
      }
      while ( v89 );
      v56 = 0;
      pkTextWina = (PgWinText *)v2->m_pkItemCountEditWin;
      do
      {
        v57 = v56 + 1;
        v58 = fs("Count%02d", v56 + 1);
        v59 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, v58, &uiLeft, &uiTop, pkTexture);
        PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v59, (PgWin *)&v2->vfptr, 0, 0);
        v60 = EditWin::CreateWin(
                uiLeft - v14 + 2,
                uiTop - v15 + 4,
                uiWidth,
                uiHeight,
                (PgWin *)&v2->vfptr,
                NUMBER,
                3u,
                3u,
                0,
                0,
                1);
        pkTextWina->vfptr = (NiRefObjectVtbl *)v60;
        EditWin::SetEnable(v60, 0);
        v56 = v57;
        pkTextWina = (PgWinText *)((char *)pkTextWina + 4);
      }
      while ( (signed int)v57 < 51 );
      v61 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Count52", &uiLeft, &uiTop, pkTexture)->m_akHitTester.m_pBase->m_pObject;
      pkTextWins = (PgWinText *)v61->m_uiHeight;
      v62 = (char *)v61->m_uiWidth;
      v63 = Font::Get(0);
      pkTextWint = PgWinText::CreateWin(
                     uiLeft - v14,
                     uiTop - v15 + 1,
                     (unsigned int)v62,
                     (unsigned int)pkTextWins,
                     v63,
                     (PgWin *)&v2->vfptr,
                     0,
                     0);
      v64 = (char *)&pkTextWint->vfptr[118];
      v65 = TextData::Get(0xD5D1C1BE);
      (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))v64)(pkTextWint, v65);
      ((void (__stdcall *)(_DWORD))pkTextWint->vfptr[60].__vecDelDtor)(0);
      v66 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Count53", &uiLeft, &uiTop, pkTexture)->m_akHitTester.m_pBase->m_pObject;
      pkTextWinu = (PgWinText *)v66->m_uiHeight;
      v67 = (char *)v66->m_uiWidth;
      v68 = Font::Get(0);
      pkTextWinv = PgWinText::CreateWin(
                     uiLeft - v14,
                     uiTop - v15 + 1,
                     (unsigned int)v67,
                     (unsigned int)pkTextWinu,
                     v68,
                     (PgWin *)&v2->vfptr,
                     0,
                     0);
      pkTextWinv->vfptr[118].__vecDelDtor((NiRefObject *)pkTextWinv, (unsigned int)"60 Lv");
      ((void (__stdcall *)(_DWORD))pkTextWinv->vfptr[60].__vecDelDtor)(0);
      pkTextWinw = (PgWinText *)PgSprData::Create(
                                  (NiAVObject *)&spNode.m_pObject->vfptr,
                                  "Btn01Nor",
                                  &uiLeft,
                                  &uiTop,
                                  pkTexture);
      PgSprData::Add((PgSprData *)pkTextWinw, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
      PgSprData::Add((PgSprData *)pkTextWinw, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWinw, (PgWin *)&v2->vfptr, 0xEu, 0, 0);
      v69 = *(_DWORD *)LODWORD(pkTextWinw->m_kWorldBound.m_kCenter.x);
      pkTextWinx = *(PgWinText **)(v69 + 24);
      v70 = *(char **)(v69 + 20);
      v71 = Font::Get(MAIN_MENU);
      pkTextWiny = PgWinText::CreateWin(
                     uiLeft - v14,
                     uiTop - v15 + 1,
                     (unsigned int)v70,
                     (unsigned int)pkTextWinx,
                     v71,
                     (PgWin *)&v2->vfptr,
                     0,
                     0);
      pkTextWiny->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWiny, 5u);
      v72 = (char *)&pkTextWiny->vfptr[118];
      v73 = TextData::Get(0x9BF9F4F6);
      (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))v72)(pkTextWiny, v73);
      ((void (__stdcall *)(_DWORD))pkTextWiny->vfptr[60].__vecDelDtor)(0);
      pkTextWinz = (PgWinText *)PgSprData::Create(
                                  (NiAVObject *)&spNode.m_pObject->vfptr,
                                  "Btn02Nor",
                                  &uiLeft,
                                  &uiTop,
                                  pkTexture);
      PgSprData::Add((PgSprData *)pkTextWinz, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Click");
      PgSprData::Add((PgSprData *)pkTextWinz, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWinz, (PgWin *)&v2->vfptr, 0xFu, 0, 0);
      v74 = *(_DWORD *)LODWORD(pkTextWinz->m_kWorldBound.m_kCenter.x);
      pkTextWinba = *(PgWinText **)(v74 + 24);
      v75 = *(char **)(v74 + 20);
      v76 = Font::Get(MAIN_MENU);
      pkTextWinbb = PgWinText::CreateWin(
                      uiLeft - v14,
                      uiTop - v15 + 1,
                      (unsigned int)v75,
                      (unsigned int)pkTextWinba,
                      v76,
                      (PgWin *)&v2->vfptr,
                      0,
                      0);
      pkTextWinbb->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinbb, 5u);
      v77 = (char *)&pkTextWinbb->vfptr[118];
      v78 = TextData::Get(0x9005EDF9);
      (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))v77)(pkTextWinbb, v78);
      ((void (__stdcall *)(_DWORD))pkTextWinbb->vfptr[60].__vecDelDtor)(0);
      pkTextWinbc = (PgWinText *)PgSprData::Create(
                                   (NiAVObject *)&spNode.m_pObject->vfptr,
                                   "Btn03Nor",
                                   &uiLeft,
                                   &uiTop,
                                   pkTexture);
      PgSprData::Add((PgSprData *)pkTextWinbc, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Click");
      PgSprData::Add((PgSprData *)pkTextWinbc, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWinbc, (PgWin *)&v2->vfptr, 0x10u, 0, 0);
      v79 = *(_DWORD *)LODWORD(pkTextWinbc->m_kWorldBound.m_kCenter.x);
      pkTextWinbd = *(PgWinText **)(v79 + 24);
      v80 = *(char **)(v79 + 20);
      v81 = Font::Get(MAIN_MENU);
      pkTextWinbe = PgWinText::CreateWin(
                      uiLeft - v14,
                      uiTop - v15 + 1,
                      (unsigned int)v80,
                      (unsigned int)pkTextWinbd,
                      v81,
                      (PgWin *)&v2->vfptr,
                      0,
                      0);
      pkTextWinbe->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinbe, 5u);
      v82 = (char *)&pkTextWinbe->vfptr[118];
      v83 = TextData::Get(0x958A94C3);
      (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))v82)(pkTextWinbe, v83);
      ((void (__stdcall *)(_DWORD))pkTextWinbe->vfptr[60].__vecDelDtor)(0);
      i = 0;
      pkTextWinb = (IconWin **)v2->m_apkInvWin;
      do
      {
        v84 = (char *)(i + 1);
        v85 = fs("IconSlot%02d", i + 1);
        v86 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, v85, &uiLeft, &uiTop, pkTexture);
        PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v86, (PgWin *)&v2->vfptr, 0, 0);
        v87 = GuildAcademyItemRewardInvWin::CreateWin(uiLeft - v14 + 1, uiTop - v15 + 1, i, (PgWin *)&v2->vfptr);
        *pkTextWinb = (IconWin *)v87;
        ItemIcon::SetItem((ItemIcon *)&v87->vfptr, 0, 1);
        ((void (__stdcall *)(signed int))(*pkTextWinb)->vfptr[129].__vecDelDtor)(12);
        (*pkTextWinb)->m_pkToolTipWin = (PgWin *)g_pkItemInfoWin;
        IconWin::ShowFocus(*pkTextWinb, 1);
        ++pkTextWinb;
        i = (int)v84;
      }
      while ( (signed int)v84 < 51 );
      ((void (__thiscall *)(GuildAcademyItemRewardWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
        v2,
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        0.30000001,
        0.5);
      LOBYTE(v98) = 0;
      if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
        spTexProp.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spTexProp.m_pObject, 1u);
      v88 = spNode.m_pObject;
      v98 = -1;
      if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v88 )
        v88->vfptr->__vecDelDtor((NiRefObject *)v88, 1u);
      result = 1;
    }
    else
    {
LABEL_45:
      LOBYTE(v98) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
      v98 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 0;
    }
  }
  else
  {
    LOBYTE(v98) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v13 = spNode.m_pObject;
    v98 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v13 )
      return 0;
    ((void (__thiscall *)(NiNode *))v13->vfptr->__vecDelDtor)(v13);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006E9030) --------------------------------------------------------
void __thiscall GuildAcademyItemRewardWin::OnClickApplyBtn(GuildAcademyItemRewardWin *this)
{
  GuildAcademyItemRewardWin *v1; // ebx@1
  char *v2; // esi@1
  signed int v3; // edi@1
  CClientGuildAcademy *v4; // eax@3
  NiUnsharedGeometryGroup *v5; // eax@4
  GUILD_ACADEMY_REWARD_ITEM *v6; // edi@5
  GUILD_ACADEMY_REWARD_ITEM *v7; // ebx@5
  int v8; // esi@5
  Item *v9; // esi@7
  NiRefObjectVtbl *v10; // edx@7
  void *(__thiscall *v11)(NiRefObject *, unsigned int); // eax@7
  void *(__thiscall *v12)(NiRefObject *, unsigned int); // eax@18
  unsigned int v13; // esi@18
  __int64 v14; // kr00_8@18
  int (*v15)(void); // eax@20
  const char *v16; // eax@20
  unsigned int v17; // ebx@20
  char *v18; // esi@24
  unsigned int v19; // eax@25
  unsigned int v20; // eax@26
  unsigned int v21; // ecx@26
  unsigned int v22; // ecx@28
  unsigned int v23; // esi@33
  int v24; // eax@34
  unsigned int v25; // eax@36
  unsigned int v26; // eax@37
  unsigned int v27; // ecx@37
  unsigned int v28; // ecx@39
  REWARD_ITEM_OPTION v29; // edx@45
  Net *v30; // esi@49
  int v31; // edi@49
  int v32; // ebx@49
  GUILD_ACADEMY_REWARD_ITEM *v33; // edi@50
  int v34; // edi@51
  int v35; // ST08_4@51
  char *v36; // eax@51
  const char *v37; // eax@51
  GuildAcademyItemRewardWin *v38; // [sp+10h] [bp-40h]@1
  std::vector<GUILD_ACADEMY_REWARD_ITEM,std::allocator<GUILD_ACADEMY_REWARD_ITEM> > sRewarditem; // [sp+14h] [bp-3Ch]@5
  int netcmd; // [sp+24h] [bp-2Ch]@5
  EditWin **v41; // [sp+28h] [bp-28h]@1
  PROTO_NC_GUILD_ACADEMY_SET_REWARD_ITEM_REQ kProto; // [sp+2Fh] [bp-21h]@50
  GUILD_ACADEMY_REWARD_ITEM temp; // [sp+30h] [bp-20h]@7
  int v44; // [sp+4Ch] [bp-4h]@5

  v1 = this;
  v2 = (char *)this->m_pkItemCountEditWin;
  v38 = this;
  v41 = this->m_pkItemCountEditWin;
  v3 = 51;
  do
  {
    (*(void (__stdcall **)(signed int))(**(_DWORD **)v2 + 484))(1);
    v2 += 4;
    --v3;
  }
  while ( v3 );
  v4 = GuildAcademyTask::GetGuildAcademy();
  if ( !(unsigned __int8)CClientGuildAcademy::AmIGuildAcademyMaster(v4) )
  {
    v5 = TextData::Get(0x186E6673u);
    GameFrameWork::AddSysMsg((GameFrameWork *)v1->m_pkFrameWork, (const char *)v5);
    return;
  }
  v6 = 0;
  v7 = 0;
  sRewarditem._Myfirst = 0;
  sRewarditem._Mylast = 0;
  sRewarditem._Myend = 0;
  v8 = (int)v41;
  v44 = 0;
  netcmd = 0;
  while ( !ItemIcon::GetItem(*(ItemIcon **)(v8 - 204)) )
  {
LABEL_48:
    v8 = (int)(v41 + 1);
    ++netcmd;
    ++v41;
    if ( netcmd >= 51 )
    {
      v30 = g_kNetMgr.m_spWorldMgr.m_pObject;
      v31 = v6 - v7;
      v32 = v31;
      if ( g_kNetMgr.m_spWorldMgr.m_pObject )
      {
        LOWORD(netcmd) = -26563;
        PgNet::AddNetMsg((PgNet *)&g_kNetMgr.m_spWorldMgr.m_pObject->vfptr, &netcmd, 2);
        kProto.NumOfRewardGood = v31;
        PgNet::AddNetMsg((PgNet *)&v30->vfptr, &kProto, 1);
        v33 = sRewarditem._Myfirst;
        PgNet::SendNetMsg((PgNet *)&v30->vfptr, sRewarditem._Myfirst, 16 * v32);
      }
      else
      {
        v33 = sRewarditem._Myfirst;
      }
      if ( v33 )
        operator delete(v33);
      return;
    }
  }
  v9 = ItemIcon::GetItem(*(ItemIcon **)(v8 - 204));
  v10 = v9->vfptr;
  temp.nItemID = v9->m_kStruct.itemid;
  v11 = v10[1].__vecDelDtor;
  temp.nLevel = netcmd + 10;
  temp.NumOfItemOption = 1;
  if ( (unsigned __int8)((int (__thiscall *)(Item *))v11)(v9)
    && (unsigned __int8)((int (__thiscall *)(Item *))v9->vfptr[1].__vecDelDtor)(v9) != 1
    && (unsigned __int8)((int (__thiscall *)(Item *))v9->vfptr[1].__vecDelDtor)(v9) != 2
    && (unsigned __int8)((int (__thiscall *)(_DWORD))v9->vfptr[1].__vecDelDtor)(v9) != 14
    && (unsigned __int8)((int (__thiscall *)(_DWORD))v9->vfptr[1].__vecDelDtor)(v9) != 22
    && (unsigned __int8)((int (__thiscall *)(_DWORD))v9->vfptr[1].__vecDelDtor)(v9) != 14
    && (unsigned __int8)((int (__thiscall *)(_DWORD))v9->vfptr[1].__vecDelDtor)(v9) != 19
    && (unsigned __int8)((int (__thiscall *)(_DWORD))v9->vfptr[1].__vecDelDtor)(v9) != 20
    && (unsigned __int8)((int (__thiscall *)(_DWORD))v9->vfptr[1].__vecDelDtor)(v9) != 25
    && (unsigned __int8)((int (__thiscall *)(_DWORD))v9->vfptr[1].__vecDelDtor)(v9) != 12 )
  {
    if ( v9->m_pkInfo->UpLimit )
    {
      v12 = v9->vfptr[9].__vecDelDtor;
      temp.ItemOption[0].nOptionType = 4;
      v14 = ((int (__thiscall *)(Item *))v12)(v9);
      HIDWORD(temp.ItemOption[0].nOptionData) = HIDWORD(v14);
      v13 = v14;
    }
    else
    {
      v13 = 0;
      temp.ItemOption[0].nOptionType = 2;
      HIDWORD(temp.ItemOption[0].nOptionData) = 0;
    }
LABEL_22:
    LODWORD(temp.ItemOption[0].nOptionData) = v13;
    if ( &temp >= v6 || v7 > &temp )
    {
      if ( v6 == sRewarditem._Myend )
      {
        v25 = v6 - v7;
        if ( v25 > 0xFFFFFFE )
LABEL_53:
          std::_Xlength_error("vector<T> too long");
        v26 = v25 + 1;
        v27 = sRewarditem._Myend - v7;
        if ( v26 > v27 )
        {
          if ( 0xFFFFFFF - (v27 >> 1) >= v27 )
            v28 = (v27 >> 1) + v27;
          else
            v28 = 0;
          if ( v28 < v26 )
            v28 = v26;
          std::vector<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo>>::reserve(
            (std::vector<NiColorA,std::allocator<NiColorA> > *)&sRewarditem,
            v28);
          v6 = sRewarditem._Mylast;
          v7 = sRewarditem._Myfirst;
        }
      }
      if ( !v6 )
        goto LABEL_47;
      v29 = temp.ItemOption[0].nOptionType;
      v24 = HIDWORD(temp.ItemOption[0].nOptionData);
      *(_DWORD *)&v6->nLevel = *(_DWORD *)&temp.nLevel;
      v6->ItemOption[0].nOptionType = v29;
      LODWORD(v6->ItemOption[0].nOptionData) = v13;
    }
    else
    {
      v18 = (char *)((char *)&temp - (char *)v7);
      if ( v6 == sRewarditem._Myend )
      {
        v19 = v6 - v7;
        if ( v19 > 0xFFFFFFE )
          goto LABEL_53;
        v20 = v19 + 1;
        v21 = sRewarditem._Myend - v7;
        if ( v20 > v21 )
        {
          if ( 0xFFFFFFF - (v21 >> 1) >= v21 )
            v22 = (v21 >> 1) + v21;
          else
            v22 = 0;
          if ( v22 < v20 )
            v22 = v20;
          std::vector<CollectWin::sRewardInfo,std::allocator<CollectWin::sRewardInfo>>::reserve(
            (std::vector<NiColorA,std::allocator<NiColorA> > *)&sRewarditem,
            v22);
          v6 = sRewarditem._Mylast;
          v7 = sRewarditem._Myfirst;
        }
      }
      v23 = (unsigned int)v7 + ((unsigned int)v18 & 0xFFFFFFF0);
      if ( !v6 )
        goto LABEL_47;
      *(_DWORD *)&v6->nLevel = *(_DWORD *)v23;
      v6->ItemOption[0].nOptionType = *(_DWORD *)(v23 + 4);
      LODWORD(v6->ItemOption[0].nOptionData) = *(_DWORD *)(v23 + 8);
      v24 = *(_DWORD *)(v23 + 12);
    }
    HIDWORD(v6->ItemOption[0].nOptionData) = v24;
LABEL_47:
    ++v6;
    sRewarditem._Mylast = v6;
    goto LABEL_48;
  }
  v15 = (int (*)(void))(*v41)->vfptr[113].__vecDelDtor;
  temp.ItemOption[0].nOptionType = 3;
  v16 = (const char *)v15();
  v17 = atoi(v16);
  if ( v17 <= ((int (__thiscall *)(Item *))v9->vfptr[4].__vecDelDtor)(v9) )
  {
    v13 = v17;
    v7 = sRewarditem._Myfirst;
    HIDWORD(temp.ItemOption[0].nOptionData) = 0;
    goto LABEL_22;
  }
  v34 = (int)v9->m_pkInfo->Name;
  v35 = ((int (__thiscall *)(Item *))v9->vfptr[4].__vecDelDtor)(v9);
  v36 = (char *)TextData::Get(0xB9E7482C);
  v37 = fs(v36, v34, v35);
  GameFrameWork::AddSysMsg((GameFrameWork *)v38->m_pkFrameWork, v37);
  if ( sRewarditem._Myfirst )
    operator delete(sRewarditem._Myfirst);
}

//----- (006E93D0) --------------------------------------------------------
void __thiscall GuildAcademyItemRewardWin::OnCommand(GuildAcademyItemRewardWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0xBu:
      GuildAcademyItemRewardWin::OnClickWinCloseBtn(this);
      break;
    case 0xEu:
      GuildAcademyItemRewardWin::OnClickApplyBtn(this);
      break;
    case 0xFu:
      GuildAcademyItemRewardWin::OnClickInitializeBtn(this);
      break;
    case 0x10u:
      GuildAcademyItemRewardWin::OnClickGuildAcademyStorageBtn(this);
      break;
    case 0xCu:
      GuildAcademyItemRewardWin::OnInvLClick(this, lParam);
      break;
    case 0x11u:
      GuildAcademyItemRewardWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (006E9440) --------------------------------------------------------
GuildAcademyItemRewardInvWin *__thiscall GuildAcademyItemRewardInvWin::`scalar deleting destructor'(GuildAcademyItemRewardInvWin *this, unsigned int a2)
{
  GuildAcademyItemRewardInvWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildAcademyItemRewardInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildAcademyItemRewardInvWin::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C48C8: using guessed type void (__thiscall *GuildAcademyItemRewardInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C48E4: using guessed type int (__thiscall *GuildAcademyItemRewardInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006E9480) --------------------------------------------------------
GuildAcademyItemRewardWin *__thiscall GuildAcademyItemRewardWin::`scalar deleting destructor'(GuildAcademyItemRewardWin *this, unsigned int a2)
{
  GuildAcademyItemRewardWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildAcademyItemRewardWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildAcademyItemRewardWin::`vftable'{for `IDirectMessenger'};
  this->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  this->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9C4B54: using guessed type void (__thiscall *GuildAcademyItemRewardWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C4B74: using guessed type int (__thiscall *GuildAcademyItemRewardWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006E94D0) --------------------------------------------------------
void __thiscall GuildAcademyMenuWin::GuildAcademyMenuWin(GuildAcademyMenuWin *this)
{
  GuildAcademyMenuWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GuildAcademyMenuWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildAcademyMenuWin::`vftable'{for `IDirectMessenger'};
}
// 9C4F50: using guessed type void (__thiscall *GuildAcademyMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C4F6C: using guessed type int (__thiscall *GuildAcademyMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006E94F0) --------------------------------------------------------
void __thiscall GuildAcademyMenuWin::~GuildAcademyMenuWin(GuildAcademyMenuWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GuildAcademyMenuWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildAcademyMenuWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9C4F50: using guessed type void (__thiscall *GuildAcademyMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C4F6C: using guessed type int (__thiscall *GuildAcademyMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006E9530) --------------------------------------------------------
void GuildAcademyMenuWin::OnClickJoinBtn()
{
  NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0xBu, 0, 0);
}

//----- (006E9550) --------------------------------------------------------
void GuildAcademyMenuWin::OnClickCheckRankingBtn()
{
  PROTO_NC_GUILD_ACADEMY_GET_RANKING_LIST_REQ pkProto; // [sp+0h] [bp-4h]@1

  pkProto.nRoundTime = 0;
  NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0x4Du, &pkProto, 4);
}

//----- (006E9580) --------------------------------------------------------
void GuildAcademyMenuWin::OnClickMoneyCompensationBtn()
{
  NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0x31u, 0, 0);
}

//----- (006E95A0) --------------------------------------------------------
void GuildAcademyMenuWin::OnClickItemCompensationBtn()
{
  NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0x35u, 0, 0);
}

//----- (006E95C0) --------------------------------------------------------
void __thiscall GuildAcademyMenuWin::OnClickPrevMenuBtn(GuildAcademyMenuWin *this)
{
  GuildAcademyMenuWin *v1; // esi@1
  GuildSelectWin *v2; // esi@1
  int YPos; // [sp+4h] [bp-8h]@1
  int XPos; // [sp+8h] [bp-4h]@1

  v1 = this;
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[45].__vecDelDtor)(v1, &XPos, &YPos);
  v2 = GuildTask::GetGuildSelectWin();
  v2->vfptr[43].__vecDelDtor((NiRefObject *)v2, XPos);
  v2->vfptr[44].__vecDelDtor((NiRefObject *)v2, YPos);
  if ( !(unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[65].__vecDelDtor)(v2) )
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
}

//----- (006E9630) --------------------------------------------------------
void GuildAcademyMenuWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "GuildMenu");
}

//----- (006E9660) --------------------------------------------------------
char __thiscall GuildAcademyMenuWin::Create(GuildAcademyMenuWin *this, PgFrameWork *pkFrameWork)
{
  GuildAcademyMenuWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  char result; // al@9
  int v8; // ebx@10
  int v9; // edi@10
  NiSourceTexture *v10; // eax@10
  PgSprData *v11; // eax@11
  PgSprData *v12; // eax@13
  PgSprData *v13; // eax@13
  PgSprData *v14; // ebx@13
  NiSourceTexture *v15; // ebx@13
  PgSprData *v16; // ebx@14
  NiNode *v17; // esi@16
  PgFont *v18; // eax@21
  PgWinText *v19; // ebx@21
  NiUnsharedGeometryGroup *v20; // eax@21
  PgSprData *v21; // ebx@21
  NiPointer<PgSprData::PgHitTester> *v22; // edx@21
  unsigned int v23; // ebx@21
  PgFont *v24; // eax@21
  PgWinText *v25; // ebx@21
  NiUnsharedGeometryGroup *v26; // eax@21
  PgSprData *v27; // ebx@21
  NiPointer<PgSprData::PgHitTester> *v28; // edx@21
  unsigned int v29; // ebx@21
  PgFont *v30; // eax@21
  PgWinText *v31; // ebx@21
  NiUnsharedGeometryGroup *v32; // eax@21
  PgSprData *v33; // ebx@21
  NiPointer<PgSprData::PgHitTester> *v34; // edx@21
  unsigned int v35; // ebx@21
  PgFont *v36; // eax@21
  PgWinText *v37; // ebx@21
  NiUnsharedGeometryGroup *v38; // eax@21
  PgSprData *v39; // ebx@21
  NiPointer<PgSprData::PgHitTester> *v40; // edx@21
  unsigned int v41; // ebx@21
  PgFont *v42; // eax@21
  PgWinText *v43; // ebx@21
  NiUnsharedGeometryGroup *v44; // eax@21
  PgSprData *v45; // ebx@21
  NiPointer<PgSprData::PgHitTester> *v46; // edx@21
  unsigned int v47; // ebx@21
  PgFont *v48; // eax@21
  PgWinText *v49; // ebx@21
  NiUnsharedGeometryGroup *v50; // eax@21
  PgSprData *v51; // ebx@21
  NiPointer<PgSprData::PgHitTester> *v52; // edx@21
  unsigned int v53; // ebx@21
  PgFont *v54; // eax@21
  PgWinText *v55; // ebx@21
  NiUnsharedGeometryGroup *v56; // eax@21
  PgSprData *v57; // ebx@21
  NiPointer<PgSprData::PgHitTester> *v58; // edx@21
  unsigned int v59; // ebx@21
  PgFont *v60; // eax@21
  PgWinText *v61; // edi@21
  NiRefObjectVtbl *v62; // ebx@21
  NiUnsharedGeometryGroup *v63; // eax@21
  NiNode *v64; // esi@22
  unsigned int uiWidth; // [sp+80h] [bp-20h]@15
  unsigned int uiHeight; // [sp+84h] [bp-1Ch]@15
  int uiLeft; // [sp+88h] [bp-18h]@4
  int uiTop; // [sp+8Ch] [bp-14h]@4
  NiPointer<NiNode> spNode; // [sp+90h] [bp-10h]@1
  int v70; // [sp+9Ch] [bp-4h]@1
  int iYOff; // [sp+A8h] [bp+8h]@10
  int iYOffa; // [sp+A8h] [bp+8h]@21
  int iYOffb; // [sp+A8h] [bp+8h]@21
  int iYOffc; // [sp+A8h] [bp+8h]@21
  int iYOffd; // [sp+A8h] [bp+8h]@21
  int iYOffe; // [sp+A8h] [bp+8h]@21
  int iYOfff; // [sp+A8h] [bp+8h]@21
  int iYOffg; // [sp+A8h] [bp+8h]@21
  int iYOffh; // [sp+A8h] [bp+8h]@21
  int iYOffi; // [sp+A8h] [bp+8h]@21
  int iYOffj; // [sp+A8h] [bp+8h]@21
  int iYOffk; // [sp+A8h] [bp+8h]@21
  int iYOffl; // [sp+A8h] [bp+8h]@21
  int iYOffm; // [sp+A8h] [bp+8h]@21
  int iYOffn; // [sp+A8h] [bp+8h]@21

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v70 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildMenu.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "GuildAcademyMenuWin", 0) )
  {
    v6 = spNode.m_pObject;
    v70 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = uiTop;
  v9 = uiLeft;
  iYOff = uiTop;
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v8, v11, (PgWin *)&v2->vfptr, 0, 0);
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop, v13, (PgWin *)&v2->vfptr, 0, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinCloseBut::CreateWin(uiLeft - v9, uiTop - iYOff, v14, (PgWin *)&v2->vfptr);
  v15 = MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, v15);
    PgSprData::Add(v16, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add(v16, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v9, uiTop - iYOff, v16, (PgWin *)&v2->vfptr, 0x15u, 0, 0);
  }
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v18 = Font::Get(0);
    v19 = PgWinText::CreateWin(uiLeft - v9, uiTop, uiWidth, uiHeight, v18, (PgWin *)&v2->vfptr, 0, 0);
    v19->vfptr[122].__vecDelDtor((NiRefObject *)v19, 1u);
    v19->vfptr[117].__vecDelDtor((NiRefObject *)v19, (unsigned int)&Color::m_kDxWinTitleColor);
    iYOffa = (int)v19->vfptr;
    v20 = TextData::Get(0x253B184Cu);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(iYOffa + 472))(v19, v20);
    v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
    v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
    PgSprData::Add(v21, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
    PgWinBut::CreateWin(uiLeft - v9, uiTop, v21, (PgWin *)&v2->vfptr, 0xAu, 0, 0);
    v22 = v21->m_akHitTester.m_pBase;
    v23 = v22->m_pObject->m_uiHeight;
    iYOffb = v22->m_pObject->m_uiWidth;
    v24 = Font::Get(0);
    v25 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOffb, v23, v24, (PgWin *)&v2->vfptr, 0, 0);
    v25->vfptr[122].__vecDelDtor((NiRefObject *)v25, 5u);
    iYOffc = (int)v25->vfptr;
    v26 = TextData::Get(0x4AAD92A3u);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(iYOffc + 472))(v25, v26);
    v25->vfptr[60].__vecDelDtor((NiRefObject *)v25, 0);
    v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v27, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Click");
    PgSprData::Add(v27, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Over");
    PgWinBut::CreateWin(uiLeft - v9, uiTop, v27, (PgWin *)&v2->vfptr, 0xBu, 0, 0);
    v28 = v27->m_akHitTester.m_pBase;
    v29 = v28->m_pObject->m_uiHeight;
    iYOffd = v28->m_pObject->m_uiWidth;
    v30 = Font::Get(0);
    v31 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOffd, v29, v30, (PgWin *)&v2->vfptr, 0, 0);
    v31->vfptr[122].__vecDelDtor((NiRefObject *)v31, 5u);
    iYOffe = (int)v31->vfptr;
    v32 = TextData::Get(0x23312946u);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(iYOffe + 472))(v31, v32);
    v31->vfptr[60].__vecDelDtor((NiRefObject *)v31, 0);
    v33 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v33, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Click");
    PgSprData::Add(v33, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Over");
    PgWinBut::CreateWin(uiLeft - v9, uiTop, v33, (PgWin *)&v2->vfptr, 0xCu, 0, 0);
    v34 = v33->m_akHitTester.m_pBase;
    v35 = v34->m_pObject->m_uiHeight;
    iYOfff = v34->m_pObject->m_uiWidth;
    v36 = Font::Get(0);
    v37 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOfff, v35, v36, (PgWin *)&v2->vfptr, 0, 0);
    v37->vfptr[122].__vecDelDtor((NiRefObject *)v37, 5u);
    iYOffg = (int)v37->vfptr;
    v38 = TextData::Get(0xED4F2825);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(iYOffg + 472))(v37, v38);
    v37->vfptr[60].__vecDelDtor((NiRefObject *)v37, 0);
    v39 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn04Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v39, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn04Click");
    PgSprData::Add(v39, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn04Over");
    PgWinBut::CreateWin(uiLeft - v9, uiTop, v39, (PgWin *)&v2->vfptr, 0xFu, 0, 0);
    v40 = v39->m_akHitTester.m_pBase;
    v41 = v40->m_pObject->m_uiHeight;
    iYOffh = v40->m_pObject->m_uiWidth;
    v42 = Font::Get(0);
    v43 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOffh, v41, v42, (PgWin *)&v2->vfptr, 0, 0);
    v43->vfptr[122].__vecDelDtor((NiRefObject *)v43, 5u);
    iYOffi = (int)v43->vfptr;
    v44 = TextData::Get(0xFD2D3B43);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(iYOffi + 472))(v43, v44);
    v43->vfptr[60].__vecDelDtor((NiRefObject *)v43, 0);
    v45 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn05Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v45, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn05Click");
    PgSprData::Add(v45, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn05Over");
    PgWinBut::CreateWin(uiLeft - v9, uiTop, v45, (PgWin *)&v2->vfptr, 0x10u, 0, 0);
    v46 = v45->m_akHitTester.m_pBase;
    v47 = v46->m_pObject->m_uiHeight;
    iYOffj = v46->m_pObject->m_uiWidth;
    v48 = Font::Get(0);
    v49 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOffj, v47, v48, (PgWin *)&v2->vfptr, 0, 0);
    v49->vfptr[122].__vecDelDtor((NiRefObject *)v49, 5u);
    iYOffk = (int)v49->vfptr;
    v50 = TextData::Get(0xE903174C);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(iYOffk + 472))(v49, v50);
    v49->vfptr[60].__vecDelDtor((NiRefObject *)v49, 0);
    v51 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn06Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v51, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn06Click");
    PgSprData::Add(v51, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn06Over");
    PgWinBut::CreateWin(uiLeft - v9, uiTop, v51, (PgWin *)&v2->vfptr, 0x11u, 0, 0);
    v52 = v51->m_akHitTester.m_pBase;
    v53 = v52->m_pObject->m_uiHeight;
    iYOffl = v52->m_pObject->m_uiWidth;
    v54 = Font::Get(0);
    v55 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOffl, v53, v54, (PgWin *)&v2->vfptr, 0, 0);
    v55->vfptr[122].__vecDelDtor((NiRefObject *)v55, 5u);
    iYOffm = (int)v55->vfptr;
    v56 = TextData::Get(0x91B58A99);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(iYOffm + 472))(v55, v56);
    v55->vfptr[60].__vecDelDtor((NiRefObject *)v55, 0);
    v57 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn07Nor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v57, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn07Click");
    PgSprData::Add(v57, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn07Over");
    PgWinBut::CreateWin(uiLeft - v9, uiTop, v57, (PgWin *)&v2->vfptr, 0x12u, 0, 0);
    v58 = v57->m_akHitTester.m_pBase;
    v59 = v58->m_pObject->m_uiHeight;
    iYOffn = v58->m_pObject->m_uiWidth;
    v60 = Font::Get(0);
    v61 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOffn, v59, v60, (PgWin *)&v2->vfptr, 0, 0);
    v61->vfptr[122].__vecDelDtor((NiRefObject *)v61, 5u);
    v62 = v61->vfptr;
    v63 = TextData2::Get(0x4D562842u);
    v62[118].__vecDelDtor((NiRefObject *)v61, (unsigned int)v63);
    v61->vfptr[60].__vecDelDtor((NiRefObject *)v61, 0);
    ((void (__thiscall *)(GuildAcademyMenuWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    v2->vfptr->SetMsgHooker(&v2->vfptr, &v2->vfptr);
    v70 = -1;
    if ( spNode.m_pObject )
    {
      v64 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v64 )
          v64->vfptr->__vecDelDtor((NiRefObject *)v64, 1u);
      }
    }
    result = 1;
  }
  else
  {
    v17 = spNode.m_pObject;
    v70 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v17 )
      v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006E9FA0) --------------------------------------------------------
void __thiscall GuildAcademyMenuWin::OnClickHallOfFameBtn(GuildAcademyMenuWin *this)
{
  GuildAcademyMenuWin *v1; // esi@1
  CClientGuild *v2; // eax@1
  CClientGuildAcademy *v3; // eax@2
  int v4; // esi@3
  NiUnsharedGeometryGroup *v5; // edi@3
  char *v6; // eax@7
  PROTO_NC_GUILD_ACADEMY_GET_GRADUATE_REQ pkProto; // [sp+8h] [bp-14h]@7

  v1 = this;
  v2 = GuildTask::GetGuild();
  if ( (unsigned __int8)CClientGuild::AmIGuildMember(v2)
    || (v3 = GuildAcademyTask::GetGuildAcademy(), CClientGuildAcademy::AmIGuildAcademyMember(v3)) )
  {
    *(_QWORD *)&pkProto.sGuildName.n4_code[2] = 0i64;
    *(_QWORD *)&pkProto.sGuildName.n4_name[0] = 0i64;
    v6 = GuildTask::GetGuildName(g_pkMainChar->m_dwGuildRegNum);
    *(_QWORD *)&pkProto.sGuildName.n4_code[2] = 0i64;
    *(_QWORD *)&pkProto.sGuildName.n4_name[0] = 0i64;
    strncpy(pkProto.sGuildName.n4_name, v6, 0x10u);
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0x49u, &pkProto, 16);
  }
  else
  {
    v4 = (int)&v1->vfptr;
    v5 = TextData::Get(0x1D2F7C72u);
    if ( *(_DWORD *)(v4 + 4) )
    {
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v4 + 4) + 4))(25, v5, v4);
      if ( *(_DWORD *)(v4 + 4) )
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v4 + 4) + 20))(25, v5, v4);
    }
    (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v4 + 20))(v4, 25, v5, v4);
  }
}

//----- (006EA090) --------------------------------------------------------
GuildAcademyMenuWin *__cdecl GuildAcademyMenuWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  GuildAcademyMenuWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x158u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&GuildAcademyMenuWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&GuildAcademyMenuWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (GuildAcademyMenuWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9C4F50: using guessed type void (__thiscall *GuildAcademyMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C4F6C: using guessed type int (__thiscall *GuildAcademyMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006EA1D0) --------------------------------------------------------
void __thiscall GuildAcademyMenuWin::OnClickLeaveBtn(GuildAcademyMenuWin *this)
{
  GuildAcademyMenuWin *v1; // ebx@1
  CClientGuildAcademy *v2; // eax@1
  NiUnsharedGeometryGroup *v3; // edi@2
  int v4; // eax@6
  ITask *v5; // eax@7
  ITask *v6; // esi@7

  v1 = this;
  v2 = GuildAcademyTask::GetGuildAcademy();
  if ( CClientGuildAcademy::AmIGuildAcademyMember(v2) )
  {
    v4 = ISingletonTask<GuildAcademyLeaveTask>::ms_pkSingletonTask;
    if ( !ISingletonTask<GuildAcademyLeaveTask>::ms_pkSingletonTask )
    {
      v5 = (ITask *)operator new(0x48u);
      v6 = v5;
      if ( v5 )
      {
        ITask::ITask(v5, 0);
        v6->vfptr = (NiRefObjectVtbl *)&GuildAcademyLeaveTask::`vftable'{for `NiRefObject'};
        v6->vfptr = (IDirectMessengerVtbl *)&GuildAcademyLeaveTask::`vftable'{for `IDirectMessenger'};
        v4 = (int)v6;
      }
      else
      {
        v4 = 0;
      }
      ISingletonTask<GuildAcademyLeaveTask>::ms_pkSingletonTask = v4;
    }
    (**(void (__cdecl ***)(_DWORD))(v4 + 8))(v1->m_pkFrameWork);
  }
  else
  {
    v3 = TextData::Get(0x26A937Cu);
    if ( v1->m_pkMsgHooker )
    {
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->SendDirectMessage)(25, v3, &v1->vfptr);
      if ( v1->m_pkMsgHooker )
        ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v1->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          25,
          v3,
          &v1->vfptr);
    }
    ((void (__cdecl *)(_DWORD))v1->vfptr->DirectDispatchToParent)(25);
  }
}
// 9C51C4: using guessed type void (__thiscall *GuildAcademyLeaveTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C51E0: using guessed type int (__thiscall *GuildAcademyLeaveTask::`vftable'{for `NiRefObject'})(void *p, char);
// B5C2B8: using guessed type int ISingletonTask<GuildAcademyLeaveTask>::ms_pkSingletonTask;

//----- (006EA2E0) --------------------------------------------------------
void __thiscall GuildAcademyMenuWin::OnCommand(GuildAcademyMenuWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0xAu:
      NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0xBu, 0, 0);
      break;
    case 0xBu:
      GuildAcademyMenuWin::OnClickCheckRankingBtn();
      break;
    case 0xCu:
      GuildAcademyMenuWin::OnClickHallOfFameBtn(this);
      break;
    case 0xFu:
      NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0x31u, 0, 0);
      break;
    case 0x10u:
      NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0x35u, 0, 0);
      break;
    case 0x11u:
      GuildAcademyMenuWin::OnClickLeaveBtn(this);
      break;
    case 0x12u:
      GuildAcademyMenuWin::OnClickPrevMenuBtn(this);
      break;
    case 0x15u:
      GuildAcademyMenuWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (006EA3A0) --------------------------------------------------------
GuildAcademyMenuWin *__thiscall GuildAcademyMenuWin::`scalar deleting destructor'(GuildAcademyMenuWin *this, unsigned int a2)
{
  GuildAcademyMenuWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildAcademyMenuWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildAcademyMenuWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C4F50: using guessed type void (__thiscall *GuildAcademyMenuWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C4F6C: using guessed type int (__thiscall *GuildAcademyMenuWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006EA3E0) --------------------------------------------------------
GuildAcademyLeaveTask *__thiscall ISingletonTask<GuildAcademyLeaveTask>::`scalar deleting destructor'(GuildAcademyLeaveTask *this, unsigned int a2)
{
  GuildAcademyLeaveTask *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ISingletonTask<GuildAcademyLeaveTask>::`vftable'{for `NiRefObject'};
  this->vfptr = (IDirectMessengerVtbl *)&ISingletonTask<GuildAcademyLeaveTask>::`vftable'{for `IDirectMessenger'};
  ISingletonTask<GuildAcademyLeaveTask>::ms_pkSingletonTask = 0;
  ITask::~ITask((ITask *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C5190: using guessed type void (__thiscall *ISingletonTask<GuildAcademyLeaveTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C51AC: using guessed type int (__thiscall *ISingletonTask<GuildAcademyLeaveTask>::`vftable'{for `NiRefObject'})(void *p, char);
// B5C2B8: using guessed type int ISingletonTask<GuildAcademyLeaveTask>::ms_pkSingletonTask;

//----- (006EA420) --------------------------------------------------------
void __thiscall GuildAcademyMoneyRewardWin::GuildAcademyMoneyRewardWin(GuildAcademyMoneyRewardWin *this)
{
  GuildAcademyMoneyRewardWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_pkGuildAcademyInfo1 = 0;
  v1->m_pkGuildAcademyInfo2 = 0;
  v1->m_pkGemText = 0;
  v1->m_pkGoldText = 0;
  v1->m_pkSilverText = 0;
  v1->m_pkCopperText = 0;
  v1->m_pkMsgBox = 0;
  v1->vfptr = (NiRefObjectVtbl *)&GuildAcademyMoneyRewardWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildAcademyMoneyRewardWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkMoneyEditWin[0] = 0;
  v1->m_pkMoneyEditWin[1] = 0;
  v1->m_pkMoneyEditWin[2] = 0;
  v1->m_pkMoneyEditWin[3] = 0;
  v1->m_pkMoneyEditWin[4] = 0;
  v1->m_pkMoneyEditWin[5] = 0;
  v1->m_pkMoneyEditWin[6] = 0;
  v1->m_pkMoneyEditWin[7] = 0;
  v1->m_pkMoneyEditWin[8] = 0;
  v1->m_pkMoneyEditWin[9] = 0;
  v1->m_pkMoneyEditWin[10] = 0;
  v1->m_pkMoneyEditWin[11] = 0;
  v1->m_pkMoneyEditWin[12] = 0;
  v1->m_pkMoneyEditWin[13] = 0;
  v1->m_pkMoneyEditWin[14] = 0;
  v1->m_pkMoneyEditWin[15] = 0;
  v1->m_pkMoneyEditWin[16] = 0;
  v1->m_pkMoneyEditWin[17] = 0;
  v1->m_pkMoneyEditWin[18] = 0;
  v1->m_pkMoneyEditWin[19] = 0;
  v1->m_pkMoneyEditWin[20] = 0;
  v1->m_pkMoneyEditWin[21] = 0;
  v1->m_pkMoneyEditWin[22] = 0;
  v1->m_pkMoneyEditWin[23] = 0;
  v1->m_pkMoneyEditWin[24] = 0;
  v1->m_pkMoneyEditWin[25] = 0;
  v1->m_pkMoneyEditWin[26] = 0;
  v1->m_pkMoneyEditWin[27] = 0;
  v1->m_pkMoneyEditWin[28] = 0;
  v1->m_pkMoneyEditWin[29] = 0;
  v1->m_pkMoneyEditWin[30] = 0;
  v1->m_pkMoneyEditWin[31] = 0;
  v1->m_pkMoneyEditWin[32] = 0;
  v1->m_pkMoneyEditWin[33] = 0;
  v1->m_pkMoneyEditWin[34] = 0;
  v1->m_pkMoneyEditWin[35] = 0;
  v1->m_pkMoneyEditWin[36] = 0;
  v1->m_pkMoneyEditWin[37] = 0;
  v1->m_pkMoneyEditWin[38] = 0;
  v1->m_pkMoneyEditWin[39] = 0;
  v1->m_bFromReq = 0;
}
// 9C542C: using guessed type void (__thiscall *GuildAcademyMoneyRewardWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C544C: using guessed type int (__thiscall *GuildAcademyMoneyRewardWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006EA560) --------------------------------------------------------
void __thiscall GuildAcademyMoneyRewardWin::~GuildAcademyMoneyRewardWin(GuildAcademyMoneyRewardWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GuildAcademyMoneyRewardWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildAcademyMoneyRewardWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9C542C: using guessed type void (__thiscall *GuildAcademyMoneyRewardWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C544C: using guessed type int (__thiscall *GuildAcademyMoneyRewardWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006EA580) --------------------------------------------------------
void __stdcall GuildAcademyMoneyRewardWin::DirectMessage(int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  if ( iMsgTag == 27 && pvBody && !*(_DWORD *)pvBody )
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0x41u, 0, 0);
}

//----- (006EA5B0) --------------------------------------------------------
void __thiscall GuildAcademyMoneyRewardWin::InitializeRewardMoney(GuildAcademyMoneyRewardWin *this, PROTO_NC_GUILD_ACADEMY_CLEAR_REWARD_MONEY_ACK *pAck)
{
  char *v2; // esi@1
  signed int v3; // ebx@1
  signed int v4; // edi@2

  v2 = (char *)this->m_pkMoneyEditWin;
  v3 = 10;
  do
  {
    v4 = 4;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 460))(&unk_9C521F);
      v2 += 4;
      --v4;
    }
    while ( v4 );
    --v3;
  }
  while ( v3 );
}

//----- (006EA5F0) --------------------------------------------------------
void __thiscall GuildAcademyMoneyRewardWin::SetMoneyValue(GuildAcademyMoneyRewardWin *this, int index, __int64 money)
{
  GuildAcademyMoneyRewardWin *v3; // ebx@1
  GuildAcademyMoneyRewardWin *v4; // ST24_4@1
  __int64 v5; // rax@1
  void *(__thiscall *v6)(NiRefObject *, unsigned int); // eax@1
  int v7; // ebx@1
  __int64 v8; // rax@1
  __int64 v9; // rax@1
  __int64 v10; // rax@1
  char acMoneyStr[32]; // [sp+14h] [bp-24h]@1

  v3 = this;
  v4 = this;
  v5 = User::GetGem(money);
  sprintf(acMoneyStr, "%I64d", v5);
  v6 = v3->m_pkMoneyEditWin[4 * index]->vfptr[115].__vecDelDtor;
  v7 = (int)v3 + 16 * index;
  ((void (__stdcall *)(_DWORD))v6)(acMoneyStr);
  v8 = User::GetGold(money);
  sprintf(acMoneyStr, "%I64d", v8);
  (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v7 + 376) + 460))(acMoneyStr);
  v9 = User::GetSilver(money);
  sprintf(acMoneyStr, "%I64d", v9);
  (*(void (__thiscall **)(_DWORD, _DWORD))(**(_DWORD **)(v7 + 380) + 460))(*(_DWORD *)(v7 + 380), acMoneyStr);
  v10 = User::GetCopper(money);
  sprintf(acMoneyStr, "%I64d", v10);
  (*((void (__stdcall **)(_DWORD))(&v4->vfptr)[4 * (index + 24)]->__vecDelDtor + 115))(acMoneyStr);
}

//----- (006EA700) --------------------------------------------------------
void __thiscall GuildAcademyMoneyRewardWin::SetEnable(GuildAcademyMoneyRewardWin *this, bool b)
{
  EditWin **v2; // esi@1
  signed int v3; // edi@1

  v2 = this->m_pkMoneyEditWin;
  v3 = 40;
  do
  {
    EditWin::SetEnable(*v2, b);
    ++v2;
    --v3;
  }
  while ( v3 );
}

//----- (006EA730) --------------------------------------------------------
void GuildAcademyMoneyRewardWin::OnClose()
{
  PROTO_NC_GUILD_ACADEMY_REWARD_STORAGE_CLOSE_CMD kProto; // [sp+1h] [bp-1h]@1

  kProto.nCloseType = 1;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x26u, 0x6Fu, &kProto, 1);
}

//----- (006EA750) --------------------------------------------------------
void GuildAcademyMoneyRewardWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "GuildAcademyGift");
}

//----- (006EA780) --------------------------------------------------------
void __thiscall GuildAcademyMoneyRewardWin::OnClickWinCloseBtn(GuildAcademyMoneyRewardWin *this)
{
  GuildAcademyMoneyRewardWin *v1; // esi@1

  v1 = this;
  if ( this == (GuildAcademyMoneyRewardWin *)g_pkToolTipWin->m_pkToolTipParentWin )
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}

//----- (006EA7B0) --------------------------------------------------------
void __thiscall GuildAcademyMoneyRewardWin::SetRewardMoney(GuildAcademyMoneyRewardWin *this, PROTO_NC_GUILD_ACADEMY_GET_REWARD_MONEY_ACK *pAck)
{
  GuildAcademyMoneyRewardWin *v2; // edi@1
  __int64 *v3; // esi@2
  int v4; // ebx@2

  v2 = this;
  if ( pAck->NumOfRewardGood > 0 )
  {
    v3 = (__int64 *)((char *)&pAck[1].Error + 1);
    v4 = pAck->NumOfRewardGood;
    do
    {
      switch ( *((_BYTE *)v3 - 1) )
      {
        case 0xA:
          GuildAcademyMoneyRewardWin::SetMoneyValue(v2, 0, *v3);
          break;
        case 0x10:
          GuildAcademyMoneyRewardWin::SetMoneyValue(v2, 1, *v3);
          break;
        case 0x15:
          GuildAcademyMoneyRewardWin::SetMoneyValue(v2, 2, *v3);
          break;
        case 0x1A:
          GuildAcademyMoneyRewardWin::SetMoneyValue(v2, 3, *v3);
          break;
        case 0x1F:
          GuildAcademyMoneyRewardWin::SetMoneyValue(v2, 4, *v3);
          break;
        case 0x24:
          GuildAcademyMoneyRewardWin::SetMoneyValue(v2, 5, *v3);
          break;
        case 0x29:
          GuildAcademyMoneyRewardWin::SetMoneyValue(v2, 6, *v3);
          break;
        case 0x2E:
          GuildAcademyMoneyRewardWin::SetMoneyValue(v2, 7, *v3);
          break;
        case 0x33:
          GuildAcademyMoneyRewardWin::SetMoneyValue(v2, 8, *v3);
          break;
        case 0x38:
          GuildAcademyMoneyRewardWin::SetMoneyValue(v2, 9, *v3);
          break;
        default:
          break;
      }
      v3 = (__int64 *)((char *)v3 + 9);
      --v4;
    }
    while ( v4 );
  }
  LOBYTE((&pAck)[1]) = 1;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x26u, 0x6Du, &(&pAck)[1], 1);
  v2->m_bFromReq = 1;
}

//----- (006EA8F0) --------------------------------------------------------
char __thiscall GuildAcademyMoneyRewardWin::Create(GuildAcademyMoneyRewardWin *this, PgFrameWork *pkFrameWork)
{
  GuildAcademyMoneyRewardWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiAVObject *v5; // eax@4
  NiTexturingProperty *v6; // eax@4
  NiTexturingProperty *v7; // edi@4
  NiTexturingProperty::Map *v8; // eax@6
  NiSourceTexture *v9; // eax@7
  NiNode *v10; // esi@10
  char result; // al@14
  PgSprData *v12; // eax@15
  NiNode *v13; // esi@18
  int v14; // edi@22
  int v15; // ebx@22
  NiSourceTexture *v16; // eax@22
  PgSprData *v17; // eax@23
  NiSourceTexture *v18; // eax@25
  PgSprData *v19; // eax@25
  PgFont *v20; // eax@27
  NiUnsharedGeometryGroup *v21; // eax@27
  PgSprData *v22; // eax@29
  PgSprData *v23; // eax@29
  PgFont *v24; // eax@30
  PgWinText *v25; // eax@30
  PgFont *v26; // eax@30
  PgWinText *v27; // eax@30
  NiUnsharedGeometryGroup *v28; // eax@30
  PgSprData *v29; // eax@30
  PgFont *v30; // ST88_4@30
  unsigned int v31; // ST84_4@30
  unsigned int v32; // eax@30
  NiSourceTexture *v33; // ST94_4@30
  NiNode *v34; // edx@30
  PgSprData *v35; // eax@30
  PgFont *v36; // ST88_4@30
  unsigned int v37; // ST84_4@30
  unsigned int v38; // eax@30
  NiSourceTexture *v39; // ST94_4@30
  NiNode *v40; // edx@30
  PgSprData *v41; // eax@30
  PgFont *v42; // ST88_4@30
  unsigned int v43; // ST84_4@30
  unsigned int v44; // eax@30
  NiSourceTexture *v45; // ST94_4@30
  NiNode *v46; // edx@30
  PgSprData *v47; // eax@30
  PgFont *v48; // ST88_4@30
  unsigned int v49; // ST84_4@30
  unsigned int v50; // eax@30
  char *tempString2; // STAC_4@31
  PgSprData::PgHitTester *v52; // eax@31
  unsigned int v53; // STB0_4@31
  PgFont *v54; // eax@31
  int v55; // eax@36
  const char *v56; // eax@43
  PgSprData *v57; // eax@43
  EditWin *v58; // eax@43
  int v59; // ecx@43
  EditWin **v60; // STA8_4@43
  NiPointer<PgSprData::PgHitTester> *v61; // ecx@45
  unsigned int v62; // STA8_4@45
  PgFont *v63; // eax@45
  NiRefObjectVtbl *v64; // STA8_4@45
  NiUnsharedGeometryGroup *v65; // eax@45
  PgSprData::PgHitTester *v66; // eax@45
  unsigned int v67; // STA8_4@45
  PgFont *v68; // eax@45
  NiRefObjectVtbl *v69; // STA8_4@45
  NiUnsharedGeometryGroup *v70; // eax@45
  PgSprData::PgHitTester *v71; // eax@45
  unsigned int v72; // STA8_4@45
  PgFont *v73; // eax@45
  PgWinText *v74; // edi@45
  NiRefObjectVtbl *v75; // ebx@45
  NiUnsharedGeometryGroup *v76; // eax@45
  NiNode *v77; // esi@47
  signed int v78; // [sp+A8h] [bp-44h]@31
  NiPointer<NiTexturingProperty> spTexProp; // [sp+B4h] [bp-38h]@4
  int i; // [sp+B8h] [bp-34h]@27
  int tempNum2; // [sp+BCh] [bp-30h]@30
  unsigned int uiWidth; // [sp+C0h] [bp-2Ch]@25
  unsigned int uiHeight; // [sp+C4h] [bp-28h]@25
  int tempNum; // [sp+C8h] [bp-24h]@30
  char *tempString; // [sp+CCh] [bp-20h]@31
  NiSourceTexture *pkTexture; // [sp+D0h] [bp-1Ch]@7
  NiPointer<NiNode> spNode; // [sp+D4h] [bp-18h]@1
  int uiLeft; // [sp+D8h] [bp-14h]@15
  int uiTop; // [sp+DCh] [bp-10h]@15
  int v90; // [sp+E8h] [bp-4h]@1
  PgWinText *jb; // [sp+F4h] [bp+8h]@27
  PgSprData *jc; // [sp+F4h] [bp+8h]@27
  NiSourceTexture *j; // [sp+F4h] [bp+8h]@27
  PgSprData *jd; // [sp+F4h] [bp+8h]@28
  NiRefObjectVtbl *je; // [sp+F4h] [bp+8h]@30
  PgWinSpr *jf; // [sp+F4h] [bp+8h]@30
  PgWinText *jg; // [sp+F4h] [bp+8h]@30
  PgWinSpr *jh; // [sp+F4h] [bp+8h]@30
  PgWinText *ji; // [sp+F4h] [bp+8h]@30
  PgWinSpr *jj; // [sp+F4h] [bp+8h]@30
  PgWinText *jk; // [sp+F4h] [bp+8h]@30
  PgWinSpr *jl; // [sp+F4h] [bp+8h]@30
  PgWinText *jm; // [sp+F4h] [bp+8h]@30
  int jn; // [sp+F4h] [bp+8h]@31
  PgWinText *jo; // [sp+F4h] [bp+8h]@31
  int ja; // [sp+F4h] [bp+8h]@36
  PgSprData *jp; // [sp+F4h] [bp+8h]@45
  int jq; // [sp+F4h] [bp+8h]@45
  PgWinText *jr; // [sp+F4h] [bp+8h]@45
  PgSprData *js; // [sp+F4h] [bp+8h]@45
  int jt; // [sp+F4h] [bp+8h]@45
  PgWinText *ju; // [sp+F4h] [bp+8h]@45
  PgSprData *jv; // [sp+F4h] [bp+8h]@45
  int jw; // [sp+F4h] [bp+8h]@45

  v2 = this;
  spNode.m_pObject = 0;
  this->m_pkFrameWork = pkFrameWork;
  v3 = pTexturePalette;
  v90 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildAcademyGift.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Frame");
  v6 = (NiTexturingProperty *)NiAVObject::GetProperty(v5, 8);
  v7 = v6;
  spTexProp.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v8 = *v7->m_kMaps.m_pBase;
  LOBYTE(v90) = 1;
  if ( !v8 || (v9 = (NiSourceTexture *)v8->m_spTexture.m_pObject, (pkTexture = v9) == 0) )
  {
    LOBYTE(v90) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v10 = spNode.m_pObject;
    v90 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
    return 0;
  }
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v9);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v12, 0, pkFrameWork, "GuildAcademyMoneyCompensation", 0) )
  {
    v14 = uiLeft;
    v15 = uiTop;
    v16 = MenuTexMgr::GetTexture(0x13u);
    if ( v16 )
      v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v16);
    else
      v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v17, (PgWin *)&v2->vfptr, 0, 0);
    v18 = MenuTexMgr::GetTexture(0x12u);
    v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, v18);
    PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v19, (PgWin *)&v2->vfptr, 0, 0);
    if ( !PgUtil::GetTriShapeRect(
            (NiAVObject *)&spNode.m_pObject->vfptr,
            "WinTitle",
            &uiLeft,
            &uiTop,
            &uiWidth,
            &uiHeight) )
      goto LABEL_54;
    v20 = Font::Get(MAIN_MENU);
    jb = PgWinText::CreateWin(uiLeft - v14, uiTop - v15, uiWidth, uiHeight, v20, (PgWin *)&v2->vfptr, 0, 0);
    jb->vfptr[122].__vecDelDtor((NiRefObject *)jb, 1u);
    ((void (__stdcall *)(struct D3DXCOLOR *))jb->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
    i = (int)&jb->vfptr[118];
    v21 = TextData::Get(0x739A99BBu);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))i)(jb, v21);
    ((void (__stdcall *)(_DWORD))jb->vfptr[60].__vecDelDtor)(0);
    jc = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, pkTexture);
    PgSprData::Add(jc, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
    PgSprData::Add(jc, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
    PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, jc, (PgWin *)&v2->vfptr, 0xBu, 0, 0);
    j = MenuTexMgr::GetTexture(4u);
    if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
    {
      jd = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkNor", &uiLeft, &uiTop, j);
      PgSprData::Add(jd, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
      PgSprData::Add(jd, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, jd, (PgWin *)&v2->vfptr, 0xFu, 0, 0);
    }
    v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
    PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v22, (PgWin *)&v2->vfptr, 0, 0);
    v23 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, pkTexture);
    PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v23, (PgWin *)&v2->vfptr, 0, 0);
    if ( PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "GuildInfoText",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight) )
    {
      v24 = Font::Get(MAIN_MENU);
      v25 = PgWinText::CreateWin(uiLeft - v14, uiTop - v15 - 5, uiWidth, uiHeight, v24, (PgWin *)&v2->vfptr, 0, 0);
      v2->m_pkGuildAcademyInfo1 = v25;
      v25->vfptr[122].__vecDelDtor((NiRefObject *)v25, 4u);
      ((void (__stdcall *)(void *))v2->m_pkGuildAcademyInfo1->vfptr[118].__vecDelDtor)(&unk_9C520E);
      ((void (__stdcall *)(_DWORD))v2->m_pkGuildAcademyInfo1->vfptr[60].__vecDelDtor)(0);
      v26 = Font::Get(MAIN_MENU);
      v27 = PgWinText::CreateWin(uiLeft - v14, uiTop - v15 + 30, uiWidth, uiHeight - 30, v26, (PgWin *)&v2->vfptr, 0, 0);
      v2->m_pkGuildAcademyInfo2 = v27;
      v27->vfptr[122].__vecDelDtor((NiRefObject *)v27, 4u);
      je = v2->m_pkGuildAcademyInfo2->vfptr + 118;
      v28 = TextData::Get(0xF54672A1);
      je->__vecDelDtor(v2->m_pkGuildAcademyInfo2, v28);
      ((void (__stdcall *)(_DWORD))v2->m_pkGuildAcademyInfo2->vfptr[60].__vecDelDtor)(0);
      v29 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GemInput11", &uiLeft, &uiTop, pkTexture);
      jf = PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v29, (PgWin *)&v2->vfptr, 0, 0);
      v30 = Font::Get(0);
      v31 = ((int (*)(void))jf->vfptr[37].__vecDelDtor)();
      v32 = ((int (*)(void))jf->vfptr[36].__vecDelDtor)();
      jg = PgWinText::CreateWin(0, 1, v32, v31, v30, (PgWin *)&jf->vfptr, 0, 0);
      jg->vfptr[122].__vecDelDtor((NiRefObject *)jg, 6u);
      ((void (__stdcall *)(void *))jg->vfptr[118].__vecDelDtor)(&unk_9C520F);
      ((void (__stdcall *)(_DWORD))jg->vfptr[60].__vecDelDtor)(0);
      v33 = pkTexture;
      v34 = spNode.m_pObject;
      v2->m_pkGemText = jg;
      v35 = PgSprData::Create((NiAVObject *)&v34->vfptr, "GoldInput11", &uiLeft, &uiTop, v33);
      jh = PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v35, (PgWin *)&v2->vfptr, 0, 0);
      v36 = Font::Get(0);
      v37 = ((int (*)(void))jh->vfptr[37].__vecDelDtor)();
      v38 = ((int (*)(void))jh->vfptr[36].__vecDelDtor)();
      ji = PgWinText::CreateWin(0, 1, v38, v37, v36, (PgWin *)&jh->vfptr, 0, 0);
      ji->vfptr[122].__vecDelDtor((NiRefObject *)ji, 6u);
      ((void (__stdcall *)(void *))ji->vfptr[118].__vecDelDtor)(&unk_9C5216);
      ((void (__stdcall *)(_DWORD))ji->vfptr[60].__vecDelDtor)(0);
      v39 = pkTexture;
      v40 = spNode.m_pObject;
      v2->m_pkGoldText = ji;
      v41 = PgSprData::Create((NiAVObject *)&v40->vfptr, "SilverInput11", &uiLeft, &uiTop, v39);
      jj = PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v41, (PgWin *)&v2->vfptr, 0, 0);
      v42 = Font::Get(0);
      v43 = ((int (*)(void))jj->vfptr[37].__vecDelDtor)();
      v44 = ((int (*)(void))jj->vfptr[36].__vecDelDtor)();
      jk = PgWinText::CreateWin(0, 1, v44, v43, v42, (PgWin *)&jj->vfptr, 0, 0);
      jk->vfptr[122].__vecDelDtor((NiRefObject *)jk, 6u);
      ((void (__stdcall *)(void *))jk->vfptr[118].__vecDelDtor)(&unk_9C5217);
      ((void (__stdcall *)(_DWORD))jk->vfptr[60].__vecDelDtor)(0);
      v45 = pkTexture;
      v46 = spNode.m_pObject;
      v2->m_pkSilverText = jk;
      v47 = PgSprData::Create((NiAVObject *)&v46->vfptr, "CopperInput11", &uiLeft, &uiTop, v45);
      jl = PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v47, (PgWin *)&v2->vfptr, 0, 0);
      v48 = Font::Get(0);
      v49 = ((int (*)(void))jl->vfptr[37].__vecDelDtor)();
      v50 = ((int (*)(void))jl->vfptr[36].__vecDelDtor)();
      jm = PgWinText::CreateWin(0, 1, v50, v49, v48, (PgWin *)&jl->vfptr, 0, 0);
      jm->vfptr[122].__vecDelDtor((NiRefObject *)jm, 6u);
      ((void (__stdcall *)(void *))jm->vfptr[118].__vecDelDtor)(&unk_9C521E);
      ((void (__stdcall *)(_DWORD))jm->vfptr[60].__vecDelDtor)(0);
      v2->m_pkCopperText = jm;
      tempNum = 10;
      tempNum2 = 15;
      i = 0;
      do
      {
        v78 = i + 1;
        tempString = fs("Level%02d", i + 1);
        tempString2 = fs("%d ~ %dLv", tempNum, tempNum2);
        v52 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, tempString, &uiLeft, &uiTop, pkTexture)->m_akHitTester.m_pBase->m_pObject;
        jn = v52->m_uiHeight;
        v53 = v52->m_uiWidth;
        v54 = Font::Get(0);
        jo = PgWinText::CreateWin(uiLeft - v14, uiTop - v15 + 1, v53, jn, v54, (PgWin *)&v2->vfptr, 0, 0);
        jo->vfptr[118].__vecDelDtor((NiRefObject *)jo, (unsigned int)tempString2);
        ((void (__stdcall *)(_DWORD))jo->vfptr[60].__vecDelDtor)(0);
        if ( i )
          tempNum += 5;
        else
          tempNum += 6;
        tempNum2 += 5;
        ++i;
      }
      while ( v78 < 10 );
      i = 0;
      tempNum2 = 93;
      do
      {
        v55 = 0;
        for ( ja = 0; ; v55 = ja )
        {
          switch ( v55 )
          {
            case 0:
              tempString = "GemInput";
              break;
            case 1:
              tempString = "GoldInput";
              break;
            case 2:
              tempString = "SilverInput";
              break;
            case 3:
              tempString = "CopperInput";
              break;
            default:
              break;
          }
          v56 = fs("%s%02d", tempString, i + 1);
          v57 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, v56, &uiLeft, &uiTop, pkTexture);
          PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v57, (PgWin *)&v2->vfptr, 0, 0);
          v58 = EditWin::CreateWin(
                  uiLeft - v14 + 2,
                  uiTop - v15 + 4,
                  uiWidth,
                  uiHeight,
                  (PgWin *)&v2->vfptr,
                  NUMBER,
                  3u,
                  3u,
                  0,
                  0,
                  1);
          v59 = ja + tempNum2;
          (&v2->vfptr)[v59] = (NiRefObjectVtbl *)v58;
          v60 = (EditWin **)((char *)v2 + 4 * v59);
          v58->vfptr[115].__vecDelDtor((NiRefObject *)v58, (unsigned int)"0");
          EditWin::SetEnable(*v60, 0);
          if ( ++ja >= 4 )
            break;
        }
        ++i;
        tempNum2 += 4;
      }
      while ( tempNum2 < 133 );
      jp = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Nor", &uiLeft, &uiTop, pkTexture);
      PgSprData::Add(jp, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
      PgSprData::Add(jp, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, jp, (PgWin *)&v2->vfptr, 0xCu, 0, 0);
      v61 = jp->m_akHitTester.m_pBase;
      jq = v61->m_pObject->m_uiHeight;
      v62 = v61->m_pObject->m_uiWidth;
      v63 = Font::Get(MAIN_MENU);
      jr = PgWinText::CreateWin(uiLeft - v14, uiTop - v15 + 1, v62, jq, v63, (PgWin *)&v2->vfptr, 0, 0);
      jr->vfptr[122].__vecDelDtor((NiRefObject *)jr, 5u);
      v64 = jr->vfptr + 118;
      v65 = TextData::Get(0x9BF9F4F6);
      v64->__vecDelDtor(jr, v65);
      ((void (__stdcall *)(_DWORD))jr->vfptr[60].__vecDelDtor)(0);
      js = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Nor", &uiLeft, &uiTop, pkTexture);
      PgSprData::Add(js, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Click");
      PgSprData::Add(js, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, js, (PgWin *)&v2->vfptr, 0xDu, 0, 0);
      v66 = js->m_akHitTester.m_pBase->m_pObject;
      jt = v66->m_uiHeight;
      v67 = v66->m_uiWidth;
      v68 = Font::Get(MAIN_MENU);
      ju = PgWinText::CreateWin(uiLeft - v14, uiTop - v15 + 1, v67, jt, v68, (PgWin *)&v2->vfptr, 0, 0);
      ju->vfptr[122].__vecDelDtor((NiRefObject *)ju, 5u);
      v69 = ju->vfptr + 118;
      v70 = TextData::Get(0x9005EDF9);
      v69->__vecDelDtor(ju, v70);
      ((void (__stdcall *)(_DWORD))ju->vfptr[60].__vecDelDtor)(0);
      jv = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Nor", &uiLeft, &uiTop, pkTexture);
      PgSprData::Add(jv, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Click");
      PgSprData::Add(jv, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, jv, (PgWin *)&v2->vfptr, 0xEu, 0, 0);
      v71 = jv->m_akHitTester.m_pBase->m_pObject;
      jw = v71->m_uiHeight;
      v72 = v71->m_uiWidth;
      v73 = Font::Get(MAIN_MENU);
      v74 = PgWinText::CreateWin(uiLeft - v14, uiTop - v15 + 1, v72, jw, v73, (PgWin *)&v2->vfptr, 0, 0);
      v74->vfptr[122].__vecDelDtor((NiRefObject *)v74, 5u);
      v75 = v74->vfptr;
      v76 = TextData::Get(0x958A94C3);
      v75[118].__vecDelDtor((NiRefObject *)v74, (unsigned int)v76);
      v74->vfptr[60].__vecDelDtor((NiRefObject *)v74, 0);
      ((void (__thiscall *)(GuildAcademyMoneyRewardWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
        v2,
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        0.40000001,
        0.5);
      LOBYTE(v90) = 0;
      if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
        spTexProp.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spTexProp.m_pObject, 1u);
      v77 = spNode.m_pObject;
      v90 = -1;
      if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v77 )
        v77->vfptr->__vecDelDtor((NiRefObject *)v77, 1u);
      result = 1;
    }
    else
    {
LABEL_54:
      LOBYTE(v90) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
      v90 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 0;
    }
  }
  else
  {
    LOBYTE(v90) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v13 = spNode.m_pObject;
    v90 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v13 )
      return 0;
    ((void (__thiscall *)(NiNode *))v13->vfptr->__vecDelDtor)(v13);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006EB620) --------------------------------------------------------
void __thiscall GuildAcademyMoneyRewardWin::OnClickApplyBtn(GuildAcademyMoneyRewardWin *this)
{
  GuildAcademyMoneyRewardWin *v1; // ebx@1
  CClientGuildAcademy *v2; // eax@1
  int v3; // esi@2
  signed int v4; // edi@2
  int v5; // esi@4
  const char *v6; // eax@5
  int v7; // ebx@5
  const char *v8; // eax@5
  int v9; // eax@5
  int v10; // ecx@5
  const char *v11; // eax@5
  int iSilver; // ST30_4@5
  const char *v13; // eax@5
  int v14; // eax@5
  __int64 v15; // rax@5
  Net *v16; // edi@6
  int v17; // edx@7
  signed int v18; // eax@7
  char *v19; // esi@7
  int v20; // ecx@8
  int v21; // ecx@8
  NiUnsharedGeometryGroup *v22; // eax@11
  int netcmd; // [sp+8h] [bp-B8h]@5
  PROTO_NC_GUILD_ACADEMY_SET_REWARD_MONEY_REQ kProto; // [sp+Fh] [bp-B1h]@7
  GUILD_ACADEMY_REWARD_MONEY temp[10]; // [sp+10h] [bp-B0h]@7
  __int64 Money[10]; // [sp+6Ch] [bp-54h]@5

  v1 = this;
  v2 = GuildAcademyTask::GetGuildAcademy();
  if ( (unsigned __int8)CClientGuildAcademy::AmIGuildAcademyMaster(v2) )
  {
    v3 = (int)v1->m_pkMoneyEditWin;
    v4 = 40;
    do
    {
      (*(void (__stdcall **)(signed int))(**(_DWORD **)v3 + 484))(1);
      v3 += 4;
      --v4;
    }
    while ( v4 );
    v5 = (int)&v1->m_pkMoneyEditWin[1];
    do
    {
      v6 = (const char *)(*(int (**)(void))(**(_DWORD **)(v5 - 4) + 452))();
      v7 = atoi(v6);
      v8 = (const char *)(*(int (**)(void))(**(_DWORD **)v5 + 452))();
      v9 = atoi(v8);
      v10 = *(_DWORD *)(v5 + 4);
      netcmd = v9;
      v11 = (const char *)(*(int (**)(void))(*(_DWORD *)v10 + 452))();
      iSilver = atoi(v11);
      v13 = (const char *)(*(int (**)(void))(**(_DWORD **)(v5 + 8) + 452))();
      v14 = atoi(v13);
      v15 = User::ConvertMoney(v14, iSilver, netcmd, v7);
      LODWORD(Money[v4]) = v15;
      HIDWORD(Money[v4++]) = HIDWORD(v15);
      v5 += 16;
    }
    while ( v4 < 10 );
    v16 = g_kNetMgr.m_spWorldMgr.m_pObject;
    if ( g_kNetMgr.m_spWorldMgr.m_pObject )
    {
      LOWORD(netcmd) = -26567;
      PgNet::AddNetMsg((PgNet *)&g_kNetMgr.m_spWorldMgr.m_pObject->vfptr, &netcmd, 2);
      kProto.NumOfRewardGood = 10;
      PgNet::AddNetMsg((PgNet *)&v16->vfptr, &kProto, 1);
      temp[0].nCen = Money[0];
      temp[0].nLevel = 10;
      v18 = 1;
      v19 = (char *)&temp[1].nCen;
      do
      {
        LOBYTE(v17) = 4 * v18;
        v19 += 9;
        v20 = v17 + v18 + 11;
        v17 = Money[v18];
        *(v19 - 10) = v20;
        v21 = HIDWORD(Money[v18]);
        *(_DWORD *)(v19 - 9) = v17;
        *(_DWORD *)(v19 - 5) = v21;
        ++v18;
      }
      while ( v18 < 10 );
      PgNet::SendNetMsg((PgNet *)&v16->vfptr, temp, 90);
    }
  }
  else
  {
    v22 = TextData::Get(0x186E6673u);
    GameFrameWork::AddSysMsg((GameFrameWork *)v1->m_pkFrameWork, (const char *)v22);
  }
}

//----- (006EB7F0) --------------------------------------------------------
void __thiscall GuildAcademyMoneyRewardWin::OnClickInitializeBtn(GuildAcademyMoneyRewardWin *this)
{
  GuildAcademyMoneyRewardWin *v1; // ebx@1
  char *v2; // esi@1
  signed int v3; // edi@1
  CClientGuildAcademy *v4; // eax@3
  int v5; // eax@4
  unsigned int v6; // eax@5
  void *v7; // eax@7
  void *v8; // edi@7
  char *v9; // eax@8
  MsgBox *v10; // eax@14
  NiUnsharedGeometryGroup *v11; // eax@15
  int key; // [sp+Ch] [bp-10h]@4
  NiUnsharedGeometryGroup *v13; // [sp+10h] [bp-Ch]@4
  NiUnsharedGeometryGroup *v14; // [sp+14h] [bp-8h]@4
  NiUnsharedGeometryGroup *v15; // [sp+18h] [bp-4h]@4

  v1 = this;
  v2 = (char *)this->m_pkMoneyEditWin;
  v3 = 40;
  do
  {
    (*(void (__stdcall **)(signed int))(**(_DWORD **)v2 + 484))(1);
    v2 += 4;
    --v3;
  }
  while ( v3 );
  v4 = GuildAcademyTask::GetGuildAcademy();
  if ( (unsigned __int8)CClientGuildAcademy::AmIGuildAcademyMaster(v4) )
  {
    v13 = &unk_96F8EB;
    v14 = &unk_96F8EB;
    v15 = &unk_96F8EB;
    key = -1869310780;
    v5 = *(_DWORD *)(ITableBase<TextDataType,TextData>::ms_pkTable + 56);
    if ( v5 )
      v6 = *(_DWORD *)(v5 + 40);
    else
      v6 = 0;
    v7 = bsearch(&key, TextData::ms_apkNode, v6, 0x10u, TextDataNodeComp);
    v8 = v7;
    if ( v7 )
    {
      if ( strcmp(*((const char **)v7 + 2), "None") )
        SoundMgr::PlayGenderVoice(&g_kSoundMgr, *((char **)v8 + 2));
      if ( strcmp(*((const char **)v8 + 3), "None") )
        SoundMgr::PlayInterfaceSound(&g_kSoundMgr, *((char **)v8 + 3));
      v9 = (char *)*((_DWORD *)v8 + 1);
    }
    else
    {
      v9 = (char *)&unk_96F8EB;
    }
    v10 = MsgBox::Modal(MSGBOX_OKCANCEL, v9);
    v1->m_pkMsgBox = v10;
    ((void (__stdcall *)(IDirectMessengerVtbl **))v10->vfptr->SetMsgHooker)(&v1->vfptr);
  }
  else
  {
    v11 = TextData::Get(0xC56E142E);
    GameFrameWork::AddSysMsg((GameFrameWork *)v1->m_pkFrameWork, (const char *)v11);
  }
}
// A88690: using guessed type int ITableBase<TextDataType,TextData>::ms_pkTable;

//----- (006EB950) --------------------------------------------------------
void __thiscall GuildAcademyMoneyRewardWin::OnClickGuildStorageBtn(GuildAcademyMoneyRewardWin *this)
{
  GuildAcademyMoneyRewardWin *v1; // esi@1
  GuildAcademyStorageWin *v2; // eax@1
  CClientGuild *v3; // eax@2
  NiUnsharedGeometryGroup *v4; // eax@4
  PROTO_NC_GUILD_ACADEMY_REWARD_STORAGE_OPEN_REQ kProto; // [sp+7h] [bp-1h]@3

  v1 = this;
  v2 = GuildAcademyTask::GetGuildAcademyStorageWin();
  if ( !(unsigned __int8)((int (__thiscall *)(_DWORD))v2->vfptr[65].__vecDelDtor)(v2) )
  {
    v3 = GuildTask::GetGuild();
    if ( (unsigned __int8)CClientGuild::AmIGuildMember(v3) )
    {
      kProto.nOpenType = 0;
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x26u, 0x6Du, &kProto, 1);
    }
    else
    {
      v4 = TextData::Get(0x7290F5A0u);
      GameFrameWork::AddSysMsg((GameFrameWork *)v1->m_pkFrameWork, (const char *)v4);
    }
  }
}

//----- (006EB9C0) --------------------------------------------------------
void __thiscall GuildAcademyMoneyRewardWin::UpdateAcademyInfo(GuildAcademyMoneyRewardWin *this)
{
  GuildAcademyMoneyRewardWin *v1; // esi@1
  CClientGuildAcademy *v2; // edi@1
  CClientGuildAcademyMember *v3; // ebx@1
  NiRefObjectVtbl *v4; // ST24_4@1
  unsigned int v5; // ST14_4@1
  unsigned int v6; // ST10_4@1
  int v7; // ST0C_4@1
  unsigned int v8; // ST08_4@1
  char *v9; // eax@1
  char *v10; // eax@1
  __int64 v11; // rax@1
  __int64 v12; // rax@1
  __int64 v13; // rax@1
  __int64 v14; // rax@1
  __int64 v15; // rax@1
  __int64 v16; // rax@1
  __int64 v17; // rax@1
  __int64 v18; // rax@1
  char acStr[128]; // [sp+10h] [bp-84h]@1

  v1 = this;
  GuildTask::GetGuild();
  v2 = GuildAcademyTask::GetGuildAcademy();
  v3 = GuildAcademyMemberTask::GetGuildAcademyMember();
  ((void (__stdcall *)(signed int))v1->m_pkGuildAcademyInfo1->vfptr[64].__vecDelDtor)(1);
  v4 = v1->m_pkGuildAcademyInfo1->vfptr;
  v5 = v2->m_GuildAcademy.nAcademyPoint;
  v6 = v2->m_GuildAcademy.nAcademyRank;
  v7 = v3->m_NumOfAcademyMembers;
  v8 = CClientGuildAcademyMember::GetNumOfOnlineMembers(v3);
  v9 = (char *)TextData::Get(0xCF512932);
  v10 = fs(v9, v8, v7, v6, v5);
  v4[118].__vecDelDtor((NiRefObject *)v1->m_pkGuildAcademyInfo1, (unsigned int)v10);
  ((void (__stdcall *)(signed int))v1->m_pkGuildAcademyInfo2->vfptr[64].__vecDelDtor)(1);
  v11 = GuildAcademyStorage::GetMoney();
  v12 = User::GetGem(v11);
  sprintf(acStr, "%I64d", v12);
  ((void (__stdcall *)(char *))v1->m_pkGemText->vfptr[118].__vecDelDtor)(acStr);
  v13 = GuildAcademyStorage::GetMoney();
  v14 = User::GetGold(v13);
  sprintf(acStr, "%I64d", v14);
  ((void (__stdcall *)(char *))v1->m_pkGoldText->vfptr[118].__vecDelDtor)(acStr);
  v15 = GuildAcademyStorage::GetMoney();
  v16 = User::GetSilver(v15);
  sprintf(acStr, "%I64d", v16);
  ((void (__stdcall *)(char *))v1->m_pkSilverText->vfptr[118].__vecDelDtor)(acStr);
  v17 = GuildAcademyStorage::GetMoney();
  v18 = User::GetCopper(v17);
  sprintf(acStr, "%I64d", v18);
  ((void (__stdcall *)(char *))v1->m_pkCopperText->vfptr[118].__vecDelDtor)(acStr);
}

//----- (006EBB60) --------------------------------------------------------
void __thiscall GuildAcademyMoneyRewardWin::OnCommand(GuildAcademyMoneyRewardWin *this, unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@6

  switch ( wParam )
  {
    case 0xBu:
      GuildAcademyMoneyRewardWin::OnClickWinCloseBtn(this);
      break;
    case 0xCu:
      GuildAcademyMoneyRewardWin::OnClickApplyBtn(this);
      break;
    case 0xDu:
      GuildAcademyMoneyRewardWin::OnClickInitializeBtn(this);
      break;
    case 0xEu:
      GuildAcademyMoneyRewardWin::OnClickGuildStorageBtn(this);
      break;
    case 0xFu:
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v3 )
        GameFrameWork::OpenPlayGuideSearchList(v3, "GuildAcademyGift");
      break;
    default:
      return;
  }
}

//----- (006EBBE0) --------------------------------------------------------
void __thiscall GuildAcademyMoneyRewardWin::UpdateMeWin(GuildAcademyMoneyRewardWin *this, float fCurTime)
{
  GuildAcademyMoneyRewardWin::UpdateAcademyInfo(this);
}

//----- (006EBBF0) --------------------------------------------------------
GuildAcademyMoneyRewardWin *__cdecl GuildAcademyMoneyRewardWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  GuildAcademyMoneyRewardWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x218u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    GuildAcademyMoneyRewardWin::GuildAcademyMoneyRewardWin((GuildAcademyMoneyRewardWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (GuildAcademyMoneyRewardWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (006EBD20) --------------------------------------------------------
GuildAcademyMoneyRewardWin *__thiscall GuildAcademyMoneyRewardWin::`scalar deleting destructor'(GuildAcademyMoneyRewardWin *this, unsigned int a2)
{
  GuildAcademyMoneyRewardWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildAcademyMoneyRewardWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildAcademyMoneyRewardWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C542C: using guessed type void (__thiscall *GuildAcademyMoneyRewardWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C544C: using guessed type int (__thiscall *GuildAcademyMoneyRewardWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006EBD60) --------------------------------------------------------
void __thiscall GuildAcademyNoticeEditorWin::GuildAcademyNoticeEditorWin(GuildAcademyNoticeEditorWin *this)
{
  GuildAcademyNoticeEditorWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GuildAcademyNoticeEditorWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildAcademyNoticeEditorWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkEditWin = 0;
}
// 9C5754: using guessed type void (__thiscall *GuildAcademyNoticeEditorWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C5774: using guessed type int (__thiscall *GuildAcademyNoticeEditorWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006EBD90) --------------------------------------------------------
void __thiscall GuildAcademyNoticeEditorWin::~GuildAcademyNoticeEditorWin(GuildAcademyNoticeEditorWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GuildAcademyNoticeEditorWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildAcademyNoticeEditorWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9C5754: using guessed type void (__thiscall *GuildAcademyNoticeEditorWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C5774: using guessed type int (__thiscall *GuildAcademyNoticeEditorWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006EBDB0) --------------------------------------------------------
void __thiscall GuildAcademyNoticeEditorWin::OnClose(GuildAcademyNoticeEditorWin *this)
{
  ((void (__stdcall *)(_DWORD))this->m_pkEditWin->vfptr[121].__vecDelDtor)(1);
}

//----- (006EBDD0) --------------------------------------------------------
void __thiscall GuildAcademyNoticeEditorWin::OnShowWin(GuildAcademyNoticeEditorWin *this)
{
  GuildAcademyNoticeEditorWin *v1; // esi@1

  v1 = this;
  ((void (*)(void))this->m_pkEditWin->vfptr[117].__vecDelDtor)();
  ((void (*)(void))v1->m_pkEditWin->vfptr[120].__vecDelDtor)();
}

//----- (006EBE00) --------------------------------------------------------
char __thiscall GuildAcademyNoticeEditorWin::Create(GuildAcademyNoticeEditorWin *this, PgFrameWork *pkFrameWork)
{
  GuildAcademyNoticeEditorWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  char result; // al@9
  int v8; // edi@10
  int v9; // ebx@10
  NiSourceTexture *v10; // eax@10
  PgSprData *v11; // eax@11
  PgSprData *v12; // eax@13
  PgSprData *v13; // eax@13
  PgSprData *v14; // edi@13
  NiNode *v15; // esi@14
  PgFont *v16; // eax@19
  PgWinText *v17; // edi@19
  NiUnsharedGeometryGroup *v18; // eax@19
  PgSprData *v19; // edi@19
  NiPointer<PgSprData::PgHitTester> *v20; // edx@19
  unsigned int v21; // edi@19
  PgFont *v22; // eax@19
  PgWinText *v23; // edi@19
  NiUnsharedGeometryGroup *v24; // eax@19
  PgSprData *v25; // edi@19
  NiPointer<PgSprData::PgHitTester> *v26; // edx@19
  unsigned int v27; // edi@19
  PgFont *v28; // eax@19
  PgWinText *v29; // edi@19
  NiRefObjectVtbl *v30; // ebx@19
  NiUnsharedGeometryGroup *v31; // eax@19
  NiNode *v32; // esi@20
  unsigned int uiWidth; // [sp+40h] [bp-20h]@13
  unsigned int uiHeight; // [sp+44h] [bp-1Ch]@13
  NiPointer<NiNode> spNode; // [sp+48h] [bp-18h]@1
  int uiLeft; // [sp+4Ch] [bp-14h]@4
  int uiTop; // [sp+50h] [bp-10h]@4
  int v38; // [sp+5Ch] [bp-4h]@1
  int iYOff; // [sp+68h] [bp+8h]@10
  int iYOffa; // [sp+68h] [bp+8h]@19
  int iYOffb; // [sp+68h] [bp+8h]@19
  int iYOffc; // [sp+68h] [bp+8h]@19
  int iYOffd; // [sp+68h] [bp+8h]@19

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v38 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildEditor.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "GuildAcademyNoticeEditorWin", 0) )
  {
    v6 = spNode.m_pObject;
    v38 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    return 0;
  }
  v8 = uiTop;
  v9 = uiLeft;
  iYOff = uiTop;
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v8, v11, (PgWin *)&v2->vfptr, 0, 0);
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop, v13, (PgWin *)&v2->vfptr, 0, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(v14, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinCloseBut::CreateWin(uiLeft - v9, uiTop - iYOff, v14, (PgWin *)&v2->vfptr);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v16 = Font::Get(0);
    v17 = PgWinText::CreateWin(uiLeft - v9, uiTop, uiWidth, uiHeight, v16, (PgWin *)&v2->vfptr, 0, 0);
    v17->vfptr[122].__vecDelDtor((NiRefObject *)v17, 1u);
    v17->vfptr[117].__vecDelDtor((NiRefObject *)v17, (unsigned int)&Color::m_kDxWinTitleColor);
    iYOffa = (int)v17->vfptr;
    v18 = TextData::Get(0x3D25058Eu);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(iYOffa + 472))(v17, v18);
    v17->vfptr[60].__vecDelDtor((NiRefObject *)v17, 0);
    v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "AddFrndNor", &uiLeft, &uiTop, 0);
    PgSprData::Add(v19, (NiAVObject *)&spNode.m_pObject->vfptr, "AddFrndClick");
    PgSprData::Add(v19, (NiAVObject *)&spNode.m_pObject->vfptr, "AddFrndOver");
    PgWinBut::CreateWin(uiLeft - v9, uiTop, v19, (PgWin *)&v2->vfptr, 0, 0, 0);
    v20 = v19->m_akHitTester.m_pBase;
    v21 = v20->m_pObject->m_uiHeight;
    iYOffb = v20->m_pObject->m_uiWidth;
    v22 = Font::Get(0);
    v23 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOffb, v21, v22, (PgWin *)&v2->vfptr, 0, 0);
    v23->vfptr[122].__vecDelDtor((NiRefObject *)v23, 5u);
    iYOffc = (int)v23->vfptr;
    v24 = TextData::Get(0x4F5F499Fu);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))(iYOffc + 472))(v23, v24);
    v23->vfptr[60].__vecDelDtor((NiRefObject *)v23, 0);
    v25 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "AddFrndNor01", &uiLeft, &uiTop, 0);
    PgSprData::Add(v25, (NiAVObject *)&spNode.m_pObject->vfptr, "AddFrndClick01");
    PgSprData::Add(v25, (NiAVObject *)&spNode.m_pObject->vfptr, "AddFrndOver01");
    PgWinBut::CreateWin(uiLeft - v9, uiTop, v25, (PgWin *)&v2->vfptr, 1u, 0, 0);
    v26 = v25->m_akHitTester.m_pBase;
    v27 = v26->m_pObject->m_uiHeight;
    iYOffd = v26->m_pObject->m_uiWidth;
    v28 = Font::Get(0);
    v29 = PgWinText::CreateWin(uiLeft - v9, uiTop + 1, iYOffd, v27, v28, (PgWin *)&v2->vfptr, 0, 0);
    v29->vfptr[122].__vecDelDtor((NiRefObject *)v29, 5u);
    v30 = v29->vfptr;
    v31 = TextData::Get(0x88A297E1);
    v30[118].__vecDelDtor((NiRefObject *)v29, (unsigned int)v31);
    v29->vfptr[60].__vecDelDtor((NiRefObject *)v29, 0);
    PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &uiLeft, &uiTop, &uiWidth, &uiHeight);
    v2->m_pkEditWin = EditWin::CreateWin(
                        uiLeft,
                        uiTop,
                        uiWidth,
                        uiHeight,
                        (PgWin *)&v2->vfptr,
                        MULTILINE,
                        0x190u,
                        4u,
                        0,
                        0,
                        1);
    ((void (__thiscall *)(GuildAcademyNoticeEditorWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    v38 = -1;
    if ( spNode.m_pObject )
    {
      v32 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v32 )
          v32->vfptr->__vecDelDtor((NiRefObject *)v32, 1u);
      }
    }
    result = 1;
  }
  else
  {
    v15 = spNode.m_pObject;
    v38 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v15 )
      v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006EC310) --------------------------------------------------------
GuildAcademyNoticeEditorWin *__cdecl GuildAcademyNoticeEditorWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  GuildAcademyNoticeEditorWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x15Cu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&GuildAcademyNoticeEditorWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&GuildAcademyNoticeEditorWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (GuildAcademyNoticeEditorWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9C5754: using guessed type void (__thiscall *GuildAcademyNoticeEditorWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C5774: using guessed type int (__thiscall *GuildAcademyNoticeEditorWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006EC450) --------------------------------------------------------
void __thiscall GuildAcademyNoticeEditorWin::OnCommand(GuildAcademyNoticeEditorWin *this, unsigned int wParam, int lParam)
{
  GuildAcademyNoticeEditorWin *v3; // edi@1
  char *v4; // eax@4
  char *v5; // esi@4
  char v6; // cl@6
  GuildAcademyNotifyTask *v7; // eax@7

  v3 = this;
  if ( wParam )
  {
    if ( wParam == 1 )
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
  }
  else
  {
    v4 = (char *)((int (*)(void))this->m_pkEditWin->vfptr[113].__vecDelDtor)();
    v5 = v4;
    if ( v4 && *v4 )
    {
      do
        v6 = *v4++;
      while ( v6 );
      v7 = ISingletonTask<GuildAcademyNotifyTask>::Run();
      GuildAcademyNotifyTask::SetInfo(v7, v5);
    }
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
  }
}

//----- (006EC4F0) --------------------------------------------------------
GuildAcademyNoticeEditorWin *__thiscall GuildAcademyNoticeEditorWin::`vector deleting destructor'(GuildAcademyNoticeEditorWin *this, unsigned int a2)
{
  GuildAcademyNoticeEditorWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildAcademyNoticeEditorWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildAcademyNoticeEditorWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C5754: using guessed type void (__thiscall *GuildAcademyNoticeEditorWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C5774: using guessed type int (__thiscall *GuildAcademyNoticeEditorWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006EC530) --------------------------------------------------------
ISingletonTask<GuildAcademyNotifyTask> *__thiscall ISingletonTask<GuildAcademyNotifyTask>::`vector deleting destructor'(ISingletonTask<GuildAcademyNotifyTask> *this, unsigned int a2)
{
  ISingletonTask<GuildAcademyNotifyTask> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ISingletonTask<GuildAcademyNotifyTask>::`vftable'{for `NiRefObject'};
  this->vfptr = (IDirectMessengerVtbl *)&ISingletonTask<GuildAcademyNotifyTask>::`vftable'{for `IDirectMessenger'};
  ISingletonTask<GuildAcademyNotifyTask>::ms_pkSingletonTask = 0;
  ITask::~ITask((ITask *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C5998: using guessed type void (__thiscall *ISingletonTask<GuildAcademyNotifyTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C59B4: using guessed type int (__thiscall *ISingletonTask<GuildAcademyNotifyTask>::`vftable'{for `NiRefObject'})(void *p, char);
// B5C2BC: using guessed type int ISingletonTask<GuildAcademyNotifyTask>::ms_pkSingletonTask;

//----- (006EC570) --------------------------------------------------------
GuildAcademyNotifyTask *__cdecl ISingletonTask<GuildAcademyNotifyTask>::Run()
{
  GuildAcademyNotifyTask *result; // eax@1
  ITask *v1; // eax@2
  GuildAcademyNotifyTask *v2; // esi@2

  result = (GuildAcademyNotifyTask *)ISingletonTask<GuildAcademyNotifyTask>::ms_pkSingletonTask;
  if ( !ISingletonTask<GuildAcademyNotifyTask>::ms_pkSingletonTask )
  {
    v1 = (ITask *)operator new(0x5Cu);
    v2 = (GuildAcademyNotifyTask *)v1;
    if ( v1 )
    {
      ITask::ITask(v1, 0);
      v2->vfptr = (NiRefObjectVtbl *)&GuildAcademyNotifyTask::`vftable'{for `NiRefObject'};
      v2->vfptr = (IDirectMessengerVtbl *)&GuildAcademyNotifyTask::`vftable'{for `IDirectMessenger'};
      v2->m_kNoticeMsg._Myres = 15;
      v2->m_kNoticeMsg._Mysize = 0;
      v2->m_kNoticeMsg._Bx._Buf[0] = 0;
    }
    else
    {
      v2 = 0;
    }
    result = v2;
    ISingletonTask<GuildAcademyNotifyTask>::ms_pkSingletonTask = (int)v2;
  }
  return result;
}
// 9C59CC: using guessed type void (__thiscall *GuildAcademyNotifyTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C59E8: using guessed type int (__thiscall *GuildAcademyNotifyTask::`vftable'{for `NiRefObject'})(void *p, char);
// B5C2BC: using guessed type int ISingletonTask<GuildAcademyNotifyTask>::ms_pkSingletonTask;

//----- (006EC600) --------------------------------------------------------
GuildAcademyNotifyTask *__thiscall GuildAcademyNotifyTask::`scalar deleting destructor'(GuildAcademyNotifyTask *this, unsigned int a2)
{
  GuildAcademyNotifyTask *v2; // esi@1

  v2 = this;
  if ( this->m_kNoticeMsg._Myres >= 0x10 )
    operator delete(this->m_kNoticeMsg._Bx._Ptr);
  v2->m_kNoticeMsg._Myres = 15;
  v2->m_kNoticeMsg._Mysize = 0;
  v2->m_kNoticeMsg._Bx._Buf[0] = 0;
  v2->vfptr = (NiRefObjectVtbl *)&ISingletonTask<GuildAcademyNotifyTask>::`vftable'{for `NiRefObject'};
  v2->vfptr = (IDirectMessengerVtbl *)&ISingletonTask<GuildAcademyNotifyTask>::`vftable'{for `IDirectMessenger'};
  ISingletonTask<GuildAcademyNotifyTask>::ms_pkSingletonTask = 0;
  ITask::~ITask((ITask *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C5998: using guessed type void (__thiscall *ISingletonTask<GuildAcademyNotifyTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C59B4: using guessed type int (__thiscall *ISingletonTask<GuildAcademyNotifyTask>::`vftable'{for `NiRefObject'})(void *p, char);
// B5C2BC: using guessed type int ISingletonTask<GuildAcademyNotifyTask>::ms_pkSingletonTask;

//----- (006EC660) --------------------------------------------------------
void __thiscall GuildAcademyRankingWin::GuildAcademyRankingWin(GuildAcademyRankingWin *this)
{
  GuildAcademyRankingWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_pkAggregationDate = 0;
  v1->m_pListWinRanking = 0;
  v1->m_pSlideBarRanking = 0;
  v1->m_pSlideBar = 0;
  v1->m_nSortColumn = 0;
  *(_DWORD *)&v1->m_bReverse1 = 0;
  v1->vfptr = (NiRefObjectVtbl *)&GuildAcademyRankingWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildAcademyRankingWin::`vftable'{for `IDirectMessenger'};
}
// 9C5CCC: using guessed type void (__thiscall *GuildAcademyRankingWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C5CEC: using guessed type int (__thiscall *GuildAcademyRankingWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006EC6B0) --------------------------------------------------------
void __thiscall GuildAcademyRankingWin::~GuildAcademyRankingWin(GuildAcademyRankingWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GuildAcademyRankingWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildAcademyRankingWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9C5CCC: using guessed type void (__thiscall *GuildAcademyRankingWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C5CEC: using guessed type int (__thiscall *GuildAcademyRankingWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006EC6D0) --------------------------------------------------------
void __thiscall GuildAcademyRankingWin::OnClickWinCloseBtn(GuildAcademyRankingWin *this)
{
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
}

//----- (006EC710) --------------------------------------------------------
void __thiscall GuildAcademyRankingWin::OnSortByTitle01(GuildAcademyRankingWin *this)
{
  GuildAcademyRankingWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  bool v3; // al@2

  v1 = this;
  v2 = this->m_pListWinRanking;
  if ( v2 )
  {
    v3 = v1->m_bReverse1 == 0;
    v1->m_nSortColumn = 0;
    v1->m_bReverse1 = v3;
    SlideListWin::Sort(v2, 0, v3, 1);
    SlideListWin::UpdateViewList(v1->m_pListWinRanking);
  }
}

//----- (006EC750) --------------------------------------------------------
void __thiscall GuildAcademyRankingWin::OnSortByTitle02(GuildAcademyRankingWin *this)
{
  GuildAcademyRankingWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  bool v3; // al@2

  v1 = this;
  v2 = this->m_pListWinRanking;
  if ( v2 )
  {
    v3 = v1->m_bReverse2 == 0;
    v1->m_nSortColumn = 1;
    v1->m_bReverse2 = v3;
    SlideListWin::Sort(v2, 1, v3, 0);
    SlideListWin::UpdateViewList(v1->m_pListWinRanking);
  }
}

//----- (006EC790) --------------------------------------------------------
void __thiscall GuildAcademyRankingWin::OnSortByTitle03(GuildAcademyRankingWin *this)
{
  GuildAcademyRankingWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  bool v3; // al@2

  v1 = this;
  v2 = this->m_pListWinRanking;
  if ( v2 )
  {
    v3 = v1->m_bReverse3 == 0;
    v1->m_nSortColumn = 2;
    v1->m_bReverse3 = v3;
    SlideListWin::Sort(v2, 2, v3, 0);
    SlideListWin::UpdateViewList(v1->m_pListWinRanking);
  }
}

//----- (006EC7D0) --------------------------------------------------------
void __thiscall GuildAcademyRankingWin::OnSortByTitle04(GuildAcademyRankingWin *this)
{
  GuildAcademyRankingWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  bool v3; // al@2

  v1 = this;
  v2 = this->m_pListWinRanking;
  if ( v2 )
  {
    v3 = v1->m_bReverse4 == 0;
    v1->m_nSortColumn = 3;
    v1->m_bReverse4 = v3;
    SlideListWin::Sort(v2, 3, v3, 1);
    SlideListWin::UpdateViewList(v1->m_pListWinRanking);
  }
}

//----- (006EC810) --------------------------------------------------------
void GuildAcademyRankingWin::OnClickThisWeekRankingBtn()
{
  PROTO_NC_GUILD_ACADEMY_GET_RANKING_LIST_REQ kProto; // [sp+0h] [bp-4h]@1

  kProto.nRoundTime = 0;
  NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0x4Du, &kProto, 4);
}

//----- (006EC840) --------------------------------------------------------
void GuildAcademyRankingWin::OnClickLastWeekRankingBtn()
{
  PROTO_NC_GUILD_ACADEMY_GET_RANKING_LIST_REQ kProto; // [sp+0h] [bp-4h]@1

  kProto.nRoundTime = 1;
  NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0x4Du, &kProto, 4);
}

//----- (006EC870) --------------------------------------------------------
void __thiscall GuildAcademyRankingWin::OnClickOKBtn(GuildAcademyRankingWin *this)
{
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
}

//----- (006EC880) --------------------------------------------------------
void GuildAcademyRankingWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "GuildAcademyRanking");
}

//----- (006EC8B0) --------------------------------------------------------
tm *__usercall localtime_4@<eax>(const int *_Time@<eax>)
{
  return _localtime32(_Time);
}

//----- (006EC8C0) --------------------------------------------------------
void __thiscall GuildAcademyRankingWin::UpdateMeWin(GuildAcademyRankingWin *this, float fCurTime)
{
  GuildAcademyRankingWin *v2; // esi@1

  v2 = this;
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
    GameFrameWork::UpdateUIScroll(v2->m_pListWinRanking, v2->m_pSlideBarRanking);
}

//----- (006EC8F0) --------------------------------------------------------
void __thiscall GuildAcademyRankingWin::OnSlideBar(GuildAcademyRankingWin *this)
{
  GuildAcademyRankingWin *v1; // esi@1
  SlideBar *v2; // ecx@1
  SlideListWin *v3; // eax@2

  v1 = this;
  v2 = this->m_pSlideBarRanking;
  if ( v2 )
  {
    v3 = v1->m_pListWinRanking;
    if ( v3 )
    {
      SlideBar::SetSplitCnt(v2, v3->m_nSlideSplitCnt);
      v1->m_pListWinRanking->m_nViewStartPos = v1->m_pSlideBarRanking->m_nCurPos;
      SlideListWin::UpdateViewList(v1->m_pListWinRanking);
    }
  }
}

//----- (006EC940) --------------------------------------------------------
void __thiscall GuildAcademyRankingWin::AddListItem_DefInfo(GuildAcademyRankingWin *this, GUILD_ACADEMY_EACH_RANKING_DATA *pkData)
{
  GuildAcademyRankingWin *v2; // edi@1
  const char *v3; // eax@2
  int v4; // eax@2
  unsigned int v5; // ebx@2
  unsigned int v6; // eax@2
  SlideListWin *v7; // ecx@2
  unsigned int v8; // ecx@2
  unsigned int v9; // eax@2
  unsigned int v10; // ecx@2
  unsigned int v11; // eax@2
  SlideListWin *v12; // ecx@2
  const char *v13; // eax@2
  char acname2[21]; // [sp+8h] [bp-30h]@2
  char acname[17]; // [sp+20h] [bp-18h]@2

  v2 = this;
  if ( this->m_pListWinRanking )
  {
    v3 = fs("%d", pkData->nRanking);
    v4 = SlideListWin::AddText(v2->m_pListWinRanking, v3);
    *(_QWORD *)acname = *(_QWORD *)&pkData->sGuildName.n4_name[0];
    v5 = v4;
    v6 = pkData->sGuildName.n4_code[2];
    *(_DWORD *)&acname[12] = pkData->sGuildName.n4_code[3];
    v7 = v2->m_pListWinRanking;
    *(_DWORD *)&acname[8] = v6;
    acname[16] = 0;
    SlideListWin::SetText(v7, v5, 1u, acname);
    v8 = pkData->sName.n5_code[1];
    v9 = pkData->sName.n5_code[0];
    *(_DWORD *)&acname2[8] = pkData->sName.n5_code[2];
    *(_DWORD *)&acname2[4] = v8;
    v10 = pkData->sName.n5_code[4];
    *(_DWORD *)acname2 = v9;
    v11 = pkData->sName.n5_code[3];
    *(_DWORD *)&acname2[16] = v10;
    v12 = v2->m_pListWinRanking;
    *(_DWORD *)&acname2[12] = v11;
    acname2[20] = 0;
    SlideListWin::SetText(v12, v5, 2u, acname2);
    v13 = fs("%d", pkData->nPoint);
    SlideListWin::SetText(v2->m_pListWinRanking, v5, 3u, v13);
    SlideListWin::SetData(v2->m_pListWinRanking, v5, (unsigned int)pkData);
    SlideListWin::SetFontSize(v2->m_pListWinRanking, v5, 1);
    SlideListWin::SetFontColor(v2->m_pListWinRanking, v5, 200, 255, 200);
  }
}

//----- (006ECA50) --------------------------------------------------------
void __thiscall GuildAcademyRankingWin::ChangeUserName(GuildAcademyRankingWin *this, Name5 *OldName, Name5 *NewName)
{
  GuildAcademyRankingWin *v3; // edi@1
  SlideListWin *v4; // ecx@1
  unsigned int v5; // eax@2
  unsigned int v6; // edx@2
  unsigned int v7; // eax@2
  unsigned int v8; // esi@4
  SlideListWin *v9; // ecx@5
  unsigned int dwData; // [sp+8h] [bp-38h]@5
  char acNewName[21]; // [sp+Ch] [bp-34h]@2
  char acOldName[21]; // [sp+24h] [bp-1Ch]@2

  v3 = this;
  v4 = this->m_pListWinRanking;
  if ( v4 )
  {
    *(_QWORD *)acNewName = *(_QWORD *)&NewName->n5_code[0];
    *(_DWORD *)&acNewName[8] = NewName->n5_code[2];
    v5 = NewName->n5_code[4];
    *(_DWORD *)&acNewName[12] = NewName->n5_code[3];
    *(_DWORD *)&acNewName[16] = v5;
    *(_QWORD *)acOldName = *(_QWORD *)&OldName->n5_code[0];
    *(_DWORD *)&acOldName[8] = OldName->n5_code[2];
    v6 = OldName->n5_code[3];
    v7 = OldName->n5_code[4];
    acNewName[20] = 0;
    *(_DWORD *)&acOldName[12] = v6;
    *(_DWORD *)&acOldName[16] = v7;
    acOldName[20] = 0;
    if ( acOldName[0] )
    {
      if ( acNewName[0] )
      {
        v8 = 0;
        if ( SlideListWin::GetItemSize(v4) )
        {
          do
          {
            v9 = v3->m_pListWinRanking;
            dwData = 0;
            SlideListWin::GetData(v9, v8, &dwData);
            if ( dwData )
            {
              if ( !_strcmpi(acOldName, (const char *)dwData) )
                SlideListWin::SetText(v3->m_pListWinRanking, v8, 2u, acNewName);
            }
            ++v8;
          }
          while ( v8 < SlideListWin::GetItemSize(v3->m_pListWinRanking) );
        }
      }
    }
  }
}

//----- (006ECB30) --------------------------------------------------------
void __thiscall GuildAcademyRankingWin::OnCommand(GuildAcademyRankingWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0xBu:
    case 0x15u:
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
      break;
    case 0xDu:
      GuildAcademyRankingWin::OnSlideBar(this);
      break;
    case 0xEu:
      GuildAcademyRankingWin::OnSortByTitle01(this);
      break;
    case 0xFu:
      GuildAcademyRankingWin::OnSortByTitle02(this);
      break;
    case 0x10u:
      GuildAcademyRankingWin::OnSortByTitle03(this);
      break;
    case 0x11u:
      GuildAcademyRankingWin::OnSortByTitle04(this);
      break;
    case 0x13u:
      GuildAcademyRankingWin::OnClickThisWeekRankingBtn();
      break;
    case 0x14u:
      GuildAcademyRankingWin::OnClickLastWeekRankingBtn();
      break;
    case 0x16u:
      GuildAcademyRankingWin::OnHelpLink();
      break;
    default:
      return;
  }
}

//----- (006ECBD0) --------------------------------------------------------
void __thiscall GuildAcademyRankingWin::On_Recv_NC_GUILD_ACADEMY_GET_RANKING_LIST_ACK(GuildAcademyRankingWin *this, PROTO_NC_GUILD_ACADEMY_GET_RANKING_LIST_ACK *pkProto)
{
  GuildAcademyRankingWin *v2; // esi@1
  tm *v3; // eax@2
  SlideListWin *v4; // ecx@3
  signed int v5; // ebx@6
  GUILD_ACADEMY_EACH_RANKING_DATA *pkData; // [sp+8h] [bp-28h]@7
  char acDate[32]; // [sp+Ch] [bp-24h]@2

  v2 = this;
  if ( pkProto->RankData.NumOfEachRankingData )
  {
    v3 = _localtime32(&pkProto->RankData.dAggregationDate);
    strftime(acDate, 0x20u, "%Y-%m-%d", v3);
    ((void (__stdcall *)(_DWORD))v2->m_pkAggregationDate->vfptr[118].__vecDelDtor)(acDate);
  }
  v4 = v2->m_pListWinRanking;
  if ( v4 )
  {
    if ( pkProto->PartMask & 1 )
      SlideListWin::RemoveAllList(v4);
    v5 = 0;
    if ( (signed int)pkProto->RankData.NumOfEachRankingData > 0 )
    {
      pkData = (GUILD_ACADEMY_EACH_RANKING_DATA *)&pkProto[1];
      do
      {
        GuildAcademyRankingWin::AddListItem_DefInfo(v2, pkData);
        ++pkData;
        ++v5;
      }
      while ( v5 < (signed int)pkProto->RankData.NumOfEachRankingData );
    }
    SlideListWin::Sort(v2->m_pListWinRanking, 0, 0, 1);
    SlideListWin::AlignText(v2->m_pListWinRanking, 4u);
    SlideListWin::AlignText(v2->m_pListWinRanking, 0, 5u);
    SlideListWin::AlignText(v2->m_pListWinRanking, 1u, 5u);
    SlideListWin::AlignText(v2->m_pListWinRanking, 2u, 5u);
    SlideListWin::AlignText(v2->m_pListWinRanking, 3u, 5u);
    SlideListWin::UpdateViewList(v2->m_pListWinRanking);
    SlideBar::SetSplitCnt(v2->m_pSlideBarRanking, v2->m_pListWinRanking->m_nSlideSplitCnt);
  }
}

//----- (006ECCF0) --------------------------------------------------------
GuildAcademyRankingWin *__cdecl GuildAcademyRankingWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  GuildAcademyRankingWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x170u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&GuildAcademyRankingWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&GuildAcademyRankingWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[2][0]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (GuildAcademyRankingWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9C5CCC: using guessed type void (__thiscall *GuildAcademyRankingWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C5CEC: using guessed type int (__thiscall *GuildAcademyRankingWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006ECE50) --------------------------------------------------------
char __thiscall GuildAcademyRankingWin::Create(GuildAcademyRankingWin *this, PgFrameWork *pkFrameWork)
{
  GuildAcademyRankingWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiAVObject *v5; // eax@4
  NiTexturingProperty *v6; // eax@4
  NiTexturingProperty *v7; // edi@4
  NiTexturingProperty::Map *v8; // eax@6
  NiSourceTexture *v9; // eax@7
  NiNode *v10; // esi@10
  char result; // al@14
  PgSprData *v12; // eax@15
  NiNode *v13; // esi@18
  int v14; // edi@22
  int v15; // ebx@22
  NiSourceTexture *v16; // eax@22
  PgSprData *v17; // eax@23
  NiSourceTexture *v18; // eax@25
  PgSprData *v19; // eax@25
  PgFont *v20; // eax@27
  PgWinText *v21; // eax@27
  NiRefObjectVtbl *v22; // edx@27
  NiUnsharedGeometryGroup *v23; // eax@27
  PgSprData *v24; // eax@29
  PgSprData *v25; // eax@29
  NiPointer<PgSprData::PgHitTester> *v26; // ecx@29
  PgWinText *v27; // eax@29
  PgFont *v28; // eax@29
  PgWinText *v29; // eax@29
  NiSourceTexture *v30; // edx@29
  NiUnsharedGeometryGroup *v31; // eax@29
  float v32; // ecx@29
  PgWinText *v33; // eax@29
  PgFont *v34; // eax@29
  PgWinText *v35; // eax@29
  SLWCreateInfo::Item *v36; // eax@29
  PgWinText *v37; // eax@29
  PgWinText *v38; // eax@29
  PgWinText *v39; // eax@29
  PgWinText *v40; // eax@29
  PgWinText *v41; // eax@29
  PgWinText *v42; // eax@29
  PgSprData *v43; // eax@29
  SlideListWin *v44; // eax@29
  PgSprData *v45; // eax@29
  SlideBar *v46; // eax@29
  int v47; // eax@29
  PgWinText *v48; // edx@29
  PgFont *v49; // eax@29
  PgWinText *v50; // eax@29
  NiRefObjectVtbl *v51; // edx@29
  NiUnsharedGeometryGroup *v52; // eax@29
  float v53; // ecx@29
  PgWinText *v54; // eax@29
  PgFont *v55; // eax@29
  PgWinText *v56; // eax@29
  NiRefObjectVtbl *v57; // edx@29
  NiUnsharedGeometryGroup *v58; // eax@29
  float v59; // ecx@29
  PgWinText *v60; // eax@29
  PgFont *v61; // eax@29
  PgWinText *v62; // eax@29
  NiRefObjectVtbl *v63; // edx@29
  NiUnsharedGeometryGroup *v64; // eax@29
  float v65; // ecx@29
  PgWinText *v66; // eax@29
  PgFont *v67; // eax@29
  PgWinText *v68; // eax@29
  NiRefObjectVtbl *v69; // edx@29
  NiUnsharedGeometryGroup *v70; // eax@29
  float v71; // ecx@29
  PgWinText *v72; // eax@29
  PgFont *v73; // eax@29
  PgWinText *v74; // eax@29
  NiRefObjectVtbl *v75; // edx@29
  NiUnsharedGeometryGroup *v76; // eax@29
  float v77; // ecx@29
  PgWinText *v78; // eax@29
  PgFont *v79; // eax@29
  PgWinText *v80; // eax@29
  NiRefObjectVtbl *v81; // edx@29
  NiUnsharedGeometryGroup *v82; // eax@29
  float v83; // ecx@29
  NiSourceTexture *v84; // eax@29
  PgFont *v85; // eax@29
  PgWinText *v86; // edi@29
  NiRefObjectVtbl *v87; // ebx@29
  NiUnsharedGeometryGroup *v88; // eax@29
  unsigned int uiWidth; // [sp+94h] [bp-6Ch]@25
  unsigned int uiHeight; // [sp+98h] [bp-68h]@25
  SLWCreateInfo kCreateInfo; // [sp+9Ch] [bp-64h]@29
  NiPointer<NiTexturingProperty> spTexProp; // [sp+B8h] [bp-48h]@4
  NiSourceTexture *pkTexture; // [sp+BCh] [bp-44h]@7
  NiSourceTexture *pkTexture8; // [sp+C0h] [bp-40h]@27
  int uiLeft; // [sp+C4h] [bp-3Ch]@15
  int uiTop; // [sp+C8h] [bp-38h]@15
  NiPointer<NiNode> spNode; // [sp+CCh] [bp-34h]@1
  PgWinText *pkTextWin; // [sp+D0h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+D4h] [bp-2Ch]@29
  int v100; // [sp+FCh] [bp-4h]@1

  v2 = this;
  pkTextWin = (PgWinText *)pkFrameWork;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v100 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildAcademyRanking.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Frame");
  v6 = (NiTexturingProperty *)NiAVObject::GetProperty(v5, 8);
  v7 = v6;
  spTexProp.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v8 = *v7->m_kMaps.m_pBase;
  LOBYTE(v100) = 1;
  if ( !v8 || (v9 = (NiSourceTexture *)v8->m_spTexture.m_pObject, (pkTexture = v9) == 0) )
  {
    LOBYTE(v100) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v10 = spNode.m_pObject;
    v100 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
    return 0;
  }
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v9);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v12, 0, (PgFrameWork *)pkTextWin, "GuildAcademyRanking", 0) )
  {
    v14 = uiLeft;
    v15 = uiTop;
    v16 = MenuTexMgr::GetTexture(0x13u);
    if ( v16 )
      v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v16);
    else
      v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v17, (PgWin *)&v2->vfptr, 0, 0);
    v18 = MenuTexMgr::GetTexture(0x12u);
    v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, v18);
    PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v19, (PgWin *)&v2->vfptr, 0, 0);
    if ( PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "WinTitle",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight) )
    {
      v20 = Font::Get(MAIN_MENU);
      v21 = PgWinText::CreateWin(uiLeft - v14, uiTop - v15, uiWidth, uiHeight, v20, (PgWin *)&v2->vfptr, 0, 0);
      v22 = v21->vfptr;
      pkTextWin = v21;
      v22[122].__vecDelDtor((NiRefObject *)v21, 1u);
      ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v23 = TextData::Get(0x78ACC6BCu);
      (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))&pkTexture8[6].m_bStatic)(pkTextWin, v23);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "ClsNor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xBu, 0, 0);
      pkTexture8 = MenuTexMgr::GetTexture(4u);
      if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
      {
        pkTextWin = (PgWinText *)PgSprData::Create(
                                   (NiAVObject *)&spNode.m_pObject->vfptr,
                                   "HelpLinkNor",
                                   &uiLeft,
                                   &uiTop,
                                   pkTexture8);
        PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
        PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
        PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x16u, 0, 0);
      }
      v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
      PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v24, (PgWin *)&v2->vfptr, 0, 0);
      v25 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel03", &uiLeft, &uiTop, pkTexture);
      PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v25, (PgWin *)&v2->vfptr, 0, 0);
      v26 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "FinalRecruitDate", &uiLeft, &uiTop, pkTexture)->m_akHitTester.m_pBase;
      v27 = (PgWinText *)v26->m_pObject->m_uiWidth;
      pkTexture8 = (NiSourceTexture *)v26->m_pObject->m_uiHeight;
      pkTextWin = v27;
      v28 = Font::Get(0);
      v29 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v28,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v30 = (NiSourceTexture *)v29->vfptr;
      pkTextWin = v29;
      pkTexture8 = v30;
      v31 = TextData::Get(0x13A97372u);
      (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))&pkTexture8[6].m_bStatic)(pkTextWin, v31);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "Date",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgWinSpr::CreateWin(uiLeft - v14, uiTop, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0, 0);
      v32 = pkTextWin->m_kWorldBound.m_kCenter.x;
      v33 = *(PgWinText **)(*(_DWORD *)LODWORD(v32) + 20);
      pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v32) + 24);
      pkTextWin = v33;
      v34 = Font::Get(0);
      v35 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v34,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v2->m_pkAggregationDate = v35;
      v35->vfptr[122].__vecDelDtor((NiRefObject *)v35, 5u);
      ((void (__stdcall *)(_DWORD))v2->m_pkAggregationDate->vfptr[60].__vecDelDtor)(0);
      kCreateInfo.m_arrItem._Myfirst = 0;
      kCreateInfo.m_arrItem._Mylast = 0;
      kCreateInfo.m_arrItem._Myend = 0;
      kCreateInfo.m_bMakeData = 0;
      kCreateInfo.m_nOffX = 0;
      kCreateInfo.m_nOffY = 0;
      LOBYTE(v100) = 2;
      v36 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
      v36->nItemType = 1;
      v36->pNode = spNode.m_pObject;
      pkTextWin = (PgWinText *)v36;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "ColumnBarNor");
      LOBYTE(v100) = 3;
      pkTextWin = (PgWinText *)((char *)pkTextWin + 72);
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkTextWin,
        &_Val);
      LOBYTE(v100) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "ColumnBarClick");
      LOBYTE(v100) = 4;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkTextWin,
        &_Val);
      LOBYTE(v100) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "ColumnBarOver");
      LOBYTE(v100) = 5;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkTextWin,
        &_Val);
      LOBYTE(v100) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      v37 = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkTextWin = v37;
      v37->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column01");
      LOBYTE(v100) = 6;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v100) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
      v38 = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkTextWin = v38;
      v38->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column02");
      LOBYTE(v100) = 7;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v100) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      v39 = pkTextWin;
      pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
      LOBYTE(v39->m_kLocal.m_Translate.x) = 1;
      v40 = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkTextWin = v40;
      v40->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column03");
      LOBYTE(v100) = 8;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v100) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      v41 = pkTextWin;
      pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
      LOBYTE(v41->m_kLocal.m_Translate.x) = 1;
      v42 = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkTextWin = v42;
      v42->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column04");
      LOBYTE(v100) = 9;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v100) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
      SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
      v43 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, pkTexture);
      v44 = SlideListWin::CreateWin(uiLeft - v14, uiTop - v15, v43, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
      v2->m_pListWinRanking = v44;
      v44->m_uiLClickMsg = 18;
      SlideListWin::UpdateViewList(v2->m_pListWinRanking);
      v45 = PgSprData::Create(
              (NiAVObject *)&spNode.m_pObject->vfptr,
              "SlideBar_SlideBtnMiddle",
              &uiLeft,
              &uiTop,
              pkTexture);
      v46 = SlideBar::CreateWin(
              spNode.m_pObject,
              "SlideBar",
              "SlideBar_UpBtn",
              "SlideBar_DnBtn",
              v45,
              0,
              (PgWin *)&v2->vfptr);
      v2->m_pSlideBarRanking = v46;
      v46->m_uiClickMsg = 13;
      v2->m_pSlideBarRanking->m_eType = 1;
      SlideBar::SetSplitCnt(v2->m_pSlideBarRanking, v2->m_pListWinRanking->m_nSlideSplitCnt);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "Title01Nor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title01Click");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title01Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xEu, 0, 0);
      v47 = *(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x);
      v48 = *(PgWinText **)(v47 + 20);
      pkTexture8 = *(NiSourceTexture **)(v47 + 24);
      pkTextWin = v48;
      v49 = Font::Get(MAIN_MENU);
      v50 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v49,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v51 = v50->vfptr;
      pkTextWin = v50;
      v51[122].__vecDelDtor((NiRefObject *)v50, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v52 = TextData::Get(0x9BAADEE3);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v52);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "Title02Nor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title02Click");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title02Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xFu, 0, 0);
      v53 = pkTextWin->m_kWorldBound.m_kCenter.x;
      v54 = *(PgWinText **)(*(_DWORD *)LODWORD(v53) + 20);
      pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v53) + 24);
      pkTextWin = v54;
      v55 = Font::Get(MAIN_MENU);
      v56 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v55,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v57 = v56->vfptr;
      pkTextWin = v56;
      v57[122].__vecDelDtor((NiRefObject *)v56, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v58 = TextData::Get(0xD8ECE04D);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v58);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "Title03Nor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title03Click");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title03Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x10u, 0, 0);
      v59 = pkTextWin->m_kWorldBound.m_kCenter.x;
      v60 = *(PgWinText **)(*(_DWORD *)LODWORD(v59) + 20);
      pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v59) + 24);
      pkTextWin = v60;
      v61 = Font::Get(MAIN_MENU);
      v62 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v61,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v63 = v62->vfptr;
      pkTextWin = v62;
      v63[122].__vecDelDtor((NiRefObject *)v62, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v64 = TextData::Get(0x92B39CE7);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v64);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "Title04Nor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title04Click");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title04Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x11u, 0, 0);
      v65 = pkTextWin->m_kWorldBound.m_kCenter.x;
      v66 = *(PgWinText **)(*(_DWORD *)LODWORD(v65) + 20);
      pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v65) + 24);
      pkTextWin = v66;
      v67 = Font::Get(MAIN_MENU);
      v68 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v67,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v69 = v68->vfptr;
      pkTextWin = v68;
      v69[122].__vecDelDtor((NiRefObject *)v68, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v70 = TextData::Get(0xA4AD92A3);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v70);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "Btn01Nor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x13u, 0, 0);
      v71 = pkTextWin->m_kWorldBound.m_kCenter.x;
      v72 = *(PgWinText **)(*(_DWORD *)LODWORD(v71) + 20);
      pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v71) + 24);
      pkTextWin = v72;
      v73 = Font::Get(MAIN_MENU);
      v74 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v73,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v75 = v74->vfptr;
      pkTextWin = v74;
      v75[122].__vecDelDtor((NiRefObject *)v74, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v76 = TextData::Get(0x5592667Cu);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v76);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "Btn02Nor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Click");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x14u, 0, 0);
      v77 = pkTextWin->m_kWorldBound.m_kCenter.x;
      v78 = *(PgWinText **)(*(_DWORD *)LODWORD(v77) + 20);
      pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v77) + 24);
      pkTextWin = v78;
      v79 = Font::Get(MAIN_MENU);
      v80 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v79,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v81 = v80->vfptr;
      pkTextWin = v80;
      v81[122].__vecDelDtor((NiRefObject *)v80, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v82 = TextData::Get(0x4D937075u);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v82);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "Btn03Nor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Click");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x15u, 0, 0);
      v83 = pkTextWin->m_kWorldBound.m_kCenter.x;
      v84 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v83) + 20);
      pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v83) + 24);
      pkTexture = v84;
      v85 = Font::Get(MAIN_MENU);
      v86 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTexture,
              (unsigned int)pkTexture8,
              v85,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v86->vfptr[122].__vecDelDtor((NiRefObject *)v86, 5u);
      v87 = v86->vfptr;
      v88 = TextData::Get(0x4F5F499Fu);
      v87[118].__vecDelDtor((NiRefObject *)v86, (unsigned int)v88);
      v86->vfptr[60].__vecDelDtor((NiRefObject *)v86, 0);
      ((void (__thiscall *)(GuildAcademyRankingWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
        v2,
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        0.40000001,
        0.5);
      LOBYTE(v100) = 1;
      SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
      LOBYTE(v100) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
      v100 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 1;
    }
    else
    {
      LOBYTE(v100) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
      v100 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 0;
    }
  }
  else
  {
    LOBYTE(v100) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v13 = spNode.m_pObject;
    v100 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v13 )
      return 0;
    v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006EDCE0) --------------------------------------------------------
GuildAcademyRankingWin *__thiscall GuildAcademyRankingWin::`scalar deleting destructor'(GuildAcademyRankingWin *this, unsigned int a2)
{
  GuildAcademyRankingWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildAcademyRankingWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildAcademyRankingWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C5CCC: using guessed type void (__thiscall *GuildAcademyRankingWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C5CEC: using guessed type int (__thiscall *GuildAcademyRankingWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006EDD30) --------------------------------------------------------
void __thiscall GuildAcademySelectWin::OnSortByTitle01(GuildAcademySelectWin *this)
{
  GuildAcademySelectWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  bool v3; // al@2

  v1 = this;
  v2 = this->m_pListWinGuild;
  if ( v2 )
  {
    v3 = v1->m_bReverse1 == 0;
    v1->m_nSortColumn = 0;
    v1->m_bReverse1 = v3;
    SlideListWin::Sort(v2, 0, v3, 0);
    SlideListWin::UpdateViewList(v1->m_pListWinGuild);
  }
}

//----- (006EDD70) --------------------------------------------------------
void __thiscall GuildAcademySelectWin::OnSortByTitle02(GuildAcademySelectWin *this)
{
  GuildAcademySelectWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  bool v3; // al@2

  v1 = this;
  v2 = this->m_pListWinGuild;
  if ( v2 )
  {
    v3 = v1->m_bReverse2 == 0;
    v1->m_nSortColumn = 1;
    v1->m_bReverse2 = v3;
    SlideListWin::Sort(v2, 1, v3, 0);
    SlideListWin::UpdateViewList(v1->m_pListWinGuild);
  }
}

//----- (006EDDB0) --------------------------------------------------------
void __thiscall GuildAcademySelectWin::OnSortByTitle03(GuildAcademySelectWin *this)
{
  GuildAcademySelectWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  bool v3; // al@2

  v1 = this;
  v2 = this->m_pListWinGuild;
  if ( v2 )
  {
    v3 = v1->m_bReverse3 == 0;
    v1->m_nSortColumn = 2;
    v1->m_bReverse3 = v3;
    SlideListWin::Sort(v2, 2, v3, 1);
    SlideListWin::UpdateViewList(v1->m_pListWinGuild);
  }
}

//----- (006EDDF0) --------------------------------------------------------
void __thiscall GuildAcademySelectWin::OnSortByTitle04(GuildAcademySelectWin *this)
{
  GuildAcademySelectWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  bool v3; // al@2

  v1 = this;
  v2 = this->m_pListWinGuild;
  if ( v2 )
  {
    v3 = v1->m_bReverse4 == 0;
    v1->m_nSortColumn = 3;
    v1->m_bReverse4 = v3;
    SlideListWin::Sort(v2, 3, v3, 1);
    SlideListWin::UpdateViewList(v1->m_pListWinGuild);
  }
}

//----- (006EDE30) --------------------------------------------------------
void __thiscall GuildAcademySelectWin::OnSortByTitle05(GuildAcademySelectWin *this)
{
  GuildAcademySelectWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  bool v3; // al@2

  v1 = this;
  v2 = this->m_pListWinGuild;
  if ( v2 )
  {
    v3 = v1->m_bReverse5 == 0;
    v1->m_nSortColumn = 4;
    v1->m_bReverse5 = v3;
    SlideListWin::Sort(v2, 4, v3, 1);
    SlideListWin::UpdateViewList(v1->m_pListWinGuild);
  }
}

//----- (006EDE70) --------------------------------------------------------
void GuildAcademySelectWin::OnClickRankingBtn()
{
  PROTO_NC_GUILD_ACADEMY_GET_RANKING_LIST_REQ pkProto; // [sp+0h] [bp-4h]@1

  pkProto.nRoundTime = 0;
  NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0x4Du, &pkProto, 4);
}

//----- (006EDED0) --------------------------------------------------------
void GuildAcademySelectWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "GuildAcademySelect");
}

//----- (006EDF00) --------------------------------------------------------
void __thiscall GuildAcademySelectWin::ProcessMeInput(GuildAcademySelectWin *this, bool *bHit)
{
  GuildAcademySelectWin *v2; // esi@1

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[78].__vecDelDtor)() )
  {
    if ( dword_B64790 )
      ++dword_B64790;
    if ( PgWin::ms_kbRbutPressed.m_iBool )
      ++PgWin::ms_kbRbutPressed.m_iBool;
    PgWinFrame::ProcessMeInput((PgWinFrame *)&v2->vfptr, bHit);
    PgWin::ms_kbRbutPressed.m_bReserveFalse = 0;
    if ( PgWin::ms_kbRbutPressed.m_iBool )
      --PgWin::ms_kbRbutPressed.m_iBool;
    byte_B6478C = 0;
    if ( dword_B64790 )
      --dword_B64790;
  }
}
// B6478C: using guessed type char byte_B6478C;
// B64790: using guessed type int dword_B64790;

//----- (006EDF80) --------------------------------------------------------
void __thiscall GuildAcademySelectWin::OnSlideBar(GuildAcademySelectWin *this)
{
  GuildAcademySelectWin *v1; // esi@1
  SlideBar *v2; // ecx@1
  SlideListWin *v3; // eax@2

  v1 = this;
  v2 = this->m_pkSlideBarGuildList;
  if ( v2 )
  {
    v3 = v1->m_pListWinGuild;
    if ( v3 )
    {
      SlideBar::SetSplitCnt(v2, v3->m_nSlideSplitCnt);
      v1->m_pListWinGuild->m_nViewStartPos = v1->m_pkSlideBarGuildList->m_nCurPos;
      SlideListWin::UpdateViewList(v1->m_pListWinGuild);
    }
  }
}

//----- (006EDFD0) --------------------------------------------------------
void __thiscall GuildAcademySelectWin::AddListItem_DefInfo(GuildAcademySelectWin *this, SHINE_GUILD_ACADEMY_LIST *pkData)
{
  GuildAcademySelectWin *v2; // edi@1
  SlideListWin *v3; // ecx@1
  unsigned int v4; // edx@2
  unsigned int v5; // eax@2
  unsigned int v6; // ecx@2
  unsigned int v7; // edx@2
  unsigned int v8; // ebx@2
  unsigned int v9; // ecx@2
  unsigned int v10; // edx@2
  SlideListWin *v11; // ecx@2
  const char *v12; // eax@2
  const char *v13; // eax@2
  const char *v14; // eax@2
  char acname2[21]; // [sp+8h] [bp-30h]@2
  char acname[17]; // [sp+20h] [bp-18h]@2

  v2 = this;
  v3 = this->m_pListWinGuild;
  if ( v3 )
  {
    v4 = pkData->GuildName.n4_code[1];
    *(_DWORD *)acname = pkData->GuildName.n4_code[0];
    *(_DWORD *)&acname[8] = pkData->GuildName.n4_code[2];
    *(_DWORD *)&acname[4] = v4;
    *(_DWORD *)&acname[12] = pkData->GuildName.n4_code[3];
    acname[16] = 0;
    v5 = SlideListWin::AddText(v3, acname);
    v6 = pkData->GuildMasterName.n5_code[0];
    v7 = pkData->GuildMasterName.n5_code[1];
    v8 = v5;
    *(_DWORD *)&acname2[8] = pkData->GuildMasterName.n5_code[2];
    *(_DWORD *)acname2 = v6;
    v9 = pkData->GuildMasterName.n5_code[3];
    *(_DWORD *)&acname2[4] = v7;
    v10 = pkData->GuildMasterName.n5_code[4];
    *(_DWORD *)&acname2[12] = v9;
    v11 = v2->m_pListWinGuild;
    *(_DWORD *)&acname2[16] = v10;
    acname2[20] = 0;
    SlideListWin::SetText(v11, v5, 1u, acname2);
    v12 = fs("%d", pkData->NumOfGuildMembers);
    SlideListWin::SetText(v2->m_pListWinGuild, v8, 2u, v12);
    v13 = fs("%d", pkData->NumOfAcademyMembers);
    SlideListWin::SetText(v2->m_pListWinGuild, v8, 3u, v13);
    v14 = fs("%d", pkData->NumOfGraduate);
    SlideListWin::SetText(v2->m_pListWinGuild, v8, 4u, v14);
    SlideListWin::SetData(v2->m_pListWinGuild, v8, (unsigned int)pkData);
    SlideListWin::SetFontSize(v2->m_pListWinGuild, v8, 1);
    SlideListWin::SetFontColor(v2->m_pListWinGuild, v8, 200, 200, 255);
  }
}

//----- (006EE100) --------------------------------------------------------
void __thiscall GuildAcademySelectWin::DirectMessage(GuildAcademySelectWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  GuildAcademySelectWin *v4; // edi@1
  float v5; // eax@2
  IDirectMessenger *v6; // eax@3
  SlideListWin *v7; // ecx@7
  unsigned int v8; // eax@7
  char *v9; // eax@7
  PROTO_NC_GUILD_ACADEMY_MEMBER_JOIN_REQ kProto; // [sp+4h] [bp-14h]@7

  v4 = this;
  if ( iMsgTag == 27 )
  {
    v5 = this->m_kWorld.m_Rotate.m_pEntry[1][2];
    if ( v5 == 0.0 )
      v6 = 0;
    else
      v6 = (IDirectMessenger *)(LODWORD(v5) + 232);
    if ( pkFrom == v6 && !*(_DWORD *)pvBody )
    {
      v7 = (SlideListWin *)LODWORD(this->m_kWorld.m_Rotate.m_pEntry[1][0]);
      *(_QWORD *)&kProto.sGuildName.n4_code[2] = 0i64;
      *(_QWORD *)&kProto.sGuildName.n4_name[0] = 0i64;
      v8 = SlideListWin::GetCurSelIndex(v7);
      v9 = SlideListWin::GetText((SlideListWin *)LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[1][0]), v8, 0);
      *(_QWORD *)&kProto.sGuildName.n4_code[2] = 0i64;
      *(_QWORD *)&kProto.sGuildName.n4_name[0] = 0i64;
      strncpy(kProto.sGuildName.n4_name, v9, 0x10u);
      LOBYTE(v4->m_kWorld.m_Rotate.m_pEntry[2][2]) = 1;
      ISingletonTask<GuildAcademyJoinReqTask>::Run();
      NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0x11u, &kProto, 16);
    }
  }
}

//----- (006EE1B0) --------------------------------------------------------
void __thiscall GuildAcademySelectWin::OnClickJoinBtn(GuildAcademySelectWin *this)
{
  GuildAcademySelectWin *v1; // esi@1
  char *v2; // eax@2
  int v3; // esi@2
  char *v4; // edi@2
  CClientGuildAcademy *v5; // eax@6
  int v6; // esi@7
  NiUnsharedGeometryGroup *v7; // edi@7
  int v8; // esi@12
  NiUnsharedGeometryGroup *v9; // edi@12
  unsigned int v10; // eax@16
  char *v11; // ST0C_4@16
  char *v12; // eax@16
  char *v13; // eax@16
  MsgBox *v14; // eax@16

  v1 = this;
  if ( User::Lv(&g_kUser) < 0x3C )
  {
    v5 = GuildAcademyTask::GetGuildAcademy();
    if ( CClientGuildAcademy::AmIGuildAcademyMember(v5) )
    {
      v6 = (int)&v1->vfptr;
      v7 = TextData::Get(0xFA2A187F);
      if ( *(_DWORD *)(v6 + 4) )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v6 + 4) + 4))(25, v7, v6);
        if ( *(_DWORD *)(v6 + 4) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v6 + 4) + 20))(25, v7, v6);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v6 + 20))(v6, 25, v7, v6);
    }
    else if ( (SlideListWin::GetCurSelIndex(v1->m_pListWinGuild) & 0x80000000) == 0 )
    {
      v10 = SlideListWin::GetCurSelIndex(v1->m_pListWinGuild);
      v11 = SlideListWin::GetText(v1->m_pListWinGuild, v10, 0);
      v12 = (char *)TextData::Get(0x7398D1CBu);
      v13 = fs(v12, v11);
      v14 = MsgBox::Modal(MSGBOX_OKCANCEL, v13);
      v1->m_pkMsgBox = v14;
      ((void (__stdcall *)(_DWORD))v14->vfptr->SetMsgHooker)(&v1->vfptr);
    }
    else
    {
      v8 = (int)&v1->vfptr;
      v9 = TextData::Get(0x919486CC);
      if ( *(_DWORD *)(v8 + 4) )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v8 + 4) + 4))(25, v9, v8);
        if ( *(_DWORD *)(v8 + 4) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v8 + 4) + 20))(25, v9, v8);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v8 + 20))(v8, 25, v9, v8);
    }
  }
  else
  {
    v2 = (char *)TextData::Get(0x6E82B0C0u);
    v3 = (int)&v1->vfptr;
    v4 = fs(v2, 60);
    if ( *(_DWORD *)(v3 + 4) )
    {
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v3 + 4) + 4))(25, v4, v3);
      if ( *(_DWORD *)(v3 + 4) )
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v3 + 4) + 20))(25, v4, v3);
    }
    (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v3 + 20))(v3, 25, v4, v3);
  }
}

//----- (006EE330) --------------------------------------------------------
void __thiscall GuildAcademySelectWin::OnClickHallOfFameBtn(GuildAcademySelectWin *this)
{
  GuildAcademySelectWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  int v3; // esi@2
  NiUnsharedGeometryGroup *v4; // edi@2
  unsigned int v5; // eax@6
  char *v6; // eax@6
  PROTO_NC_GUILD_ACADEMY_GET_GRADUATE_REQ Proto; // [sp+8h] [bp-14h]@1

  v1 = this;
  v2 = this->m_pListWinGuild;
  *(_QWORD *)&Proto.sGuildName.n4_code[2] = 0i64;
  *(_QWORD *)&Proto.sGuildName.n4_name[0] = 0i64;
  if ( (SlideListWin::GetCurSelIndex(v2) & 0x80000000) == 0 )
  {
    v5 = SlideListWin::GetCurSelIndex(v1->m_pListWinGuild);
    v6 = SlideListWin::GetText(v1->m_pListWinGuild, v5, 0);
    *(_QWORD *)&Proto.sGuildName.n4_code[2] = 0i64;
    *(_QWORD *)&Proto.sGuildName.n4_name[0] = 0i64;
    strncpy(Proto.sGuildName.n4_name, v6, 0x10u);
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0x49u, &Proto, 16);
  }
  else
  {
    v3 = (int)&v1->vfptr;
    v4 = TextData::Get(0x919486CC);
    if ( *(_DWORD *)(v3 + 4) )
    {
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v3 + 4) + 4))(25, v4, v3);
      if ( *(_DWORD *)(v3 + 4) )
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v3 + 4) + 20))(25, v4, v3);
    }
    (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v3 + 20))(v3, 25, v4, v3);
  }
}

//----- (006EE420) --------------------------------------------------------
void __thiscall GuildAcademySelectWin::On_Recv_NC_GUILD_ACADEMY_LIST_ACK(GuildAcademySelectWin *this, PROTO_NC_GUILD_ACADEMY_LIST_ACK *pkProto)
{
  GuildAcademySelectWin *v2; // edi@1
  SlideListWin *v3; // ecx@1
  signed int v4; // eax@4
  char *v5; // esi@5
  SlideListWin *v6; // ecx@6
  int v7; // edx@7
  unsigned int v8; // eax@7
  int v9; // ecx@7
  int v10; // edx@7
  unsigned int v11; // ebx@7
  int v12; // ecx@7
  int v13; // edx@7
  SlideListWin *v14; // ecx@7
  const char *v15; // eax@7
  const char *v16; // eax@7
  const char *v17; // eax@7
  int i; // [sp+8h] [bp-34h]@4
  char v19[4]; // [sp+Ch] [bp-30h]@7
  int v20; // [sp+10h] [bp-2Ch]@7
  int v21; // [sp+14h] [bp-28h]@7
  int v22; // [sp+18h] [bp-24h]@7
  int v23; // [sp+1Ch] [bp-20h]@7
  char v24; // [sp+20h] [bp-1Ch]@7
  char szText[4]; // [sp+24h] [bp-18h]@7
  int v26; // [sp+28h] [bp-14h]@7
  int v27; // [sp+2Ch] [bp-10h]@7
  int v28; // [sp+30h] [bp-Ch]@7
  char v29; // [sp+34h] [bp-8h]@7

  v2 = this;
  v3 = this->m_pListWinGuild;
  if ( v3 )
  {
    if ( pkProto->PartMask & 1 )
      SlideListWin::RemoveAllList(v3);
    v4 = pkProto->NumOfGuildAcademy;
    v2->m_TotalNumOfGuild = v4;
    i = 0;
    if ( v4 > 0 )
    {
      v5 = &pkProto[3].PartMask;
      do
      {
        v6 = v2->m_pListWinGuild;
        if ( v6 )
        {
          v7 = *((_DWORD *)v5 - 5);
          *(_DWORD *)szText = *((_DWORD *)v5 - 6);
          v27 = *((_DWORD *)v5 - 4);
          v26 = v7;
          v28 = *((_DWORD *)v5 - 3);
          v29 = 0;
          v8 = SlideListWin::AddText(v6, szText);
          v9 = *((_DWORD *)v5 - 2);
          v10 = *((_DWORD *)v5 - 1);
          v11 = v8;
          v21 = *(_DWORD *)v5;
          *(_DWORD *)v19 = v9;
          v12 = *((_DWORD *)v5 + 1);
          v20 = v10;
          v13 = *((_DWORD *)v5 + 2);
          v22 = v12;
          v14 = v2->m_pListWinGuild;
          v23 = v13;
          v24 = 0;
          SlideListWin::SetText(v14, v8, 1u, v19);
          v15 = fs("%d", *((_WORD *)v5 + 6));
          SlideListWin::SetText(v2->m_pListWinGuild, v11, 2u, v15);
          v16 = fs("%d", *((_WORD *)v5 + 7));
          SlideListWin::SetText(v2->m_pListWinGuild, v11, 3u, v16);
          v17 = fs("%d", *((_WORD *)v5 + 8));
          SlideListWin::SetText(v2->m_pListWinGuild, v11, 4u, v17);
          SlideListWin::SetData(v2->m_pListWinGuild, v11, (unsigned int)(v5 - 24));
          SlideListWin::SetFontSize(v2->m_pListWinGuild, v11, 1);
          SlideListWin::SetFontColor(v2->m_pListWinGuild, v11, 200, 200, 255);
        }
        v5 += 42;
        ++i;
      }
      while ( i < v2->m_TotalNumOfGuild );
    }
    SlideListWin::Sort(v2->m_pListWinGuild, 3, 1, 1);
    SlideListWin::AlignText(v2->m_pListWinGuild, 4u);
    SlideListWin::AlignText(v2->m_pListWinGuild, 0, 5u);
    SlideListWin::AlignText(v2->m_pListWinGuild, 1u, 5u);
    SlideListWin::AlignText(v2->m_pListWinGuild, 2u, 5u);
    SlideListWin::AlignText(v2->m_pListWinGuild, 3u, 5u);
    SlideListWin::AlignText(v2->m_pListWinGuild, 4u, 5u);
    SlideListWin::UpdateViewList(v2->m_pListWinGuild);
    SlideBar::SetSplitCnt(v2->m_pkSlideBarGuildList, v2->m_pListWinGuild->m_nSlideSplitCnt);
  }
}

//----- (006EE630) --------------------------------------------------------
void __thiscall GuildAcademySelectWin::AddGuildInfo(GuildAcademySelectWin *this, GuildAcademySelectWin::GuildInfo *kGuildInfo)
{
  GuildAcademySelectWin *v2; // edi@1
  void *v3; // eax@2
  unsigned int v4; // ebx@4
  char *v5; // eax@4
  char Name[128]; // [sp+Ch] [bp-104h]@4
  char Number[128]; // [sp+8Ch] [bp-84h]@6

  v2 = this;
  if ( kGuildInfo->m_strGuildName._Myres < 0x10 )
    v3 = kGuildInfo;
  else
    v3 = kGuildInfo->m_strGuildName._Bx._Ptr;
  sprintf(Name, "%s", v3);
  v4 = SlideListWin::AddText(v2->m_pListWinGuild, Name);
  v5 = kGuildInfo->m_MasterName._Bx._Buf;
  if ( kGuildInfo->m_MasterName._Myres >= 0x10 )
    v5 = *(char **)v5;
  sprintf(Name, "%s", v5);
  SlideListWin::SetText(v2->m_pListWinGuild, v4, 1u, Name);
  sprintf(Number, "%d", kGuildInfo->m_unGuildMember);
  SlideListWin::SetText(v2->m_pListWinGuild, v4, 2u, Number);
  sprintf(Number, "%d", kGuildInfo->m_unGuildAcademy);
  SlideListWin::SetText(v2->m_pListWinGuild, v4, 3u, Number);
  sprintf(Number, "%d", kGuildInfo->m_unGuildGraduates);
  SlideListWin::SetText(v2->m_pListWinGuild, v4, 4u, Number);
}

//----- (006EE750) --------------------------------------------------------
void __thiscall GuildAcademySelectWin::UpdateTimer(GuildAcademySelectWin *this, float fTime)
{
  GuildAcademySelectWin *v2; // esi@1
  double v3; // st7@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v4; // [sp-1Ch] [bp-24h]@2
  int v5; // [sp-Ch] [bp-14h]@2
  signed int v6; // [sp-8h] [bp-10h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v7; // [sp+4h] [bp-4h]@2
  float fDeltaTime; // [sp+10h] [bp+8h]@2

  v2 = this;
  if ( this->m_bTimer != 1 )
  {
    v3 = fTime - this->m_fOldTime;
    v7 = &v4;
    v6 = 15;
    fDeltaTime = v3;
    v5 = 0;
    v4._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v4,
      "SearchAcademy_ListCoolTime",
      0x1Au);
    if ( (double)(unsigned __int16)CSingleDataMap::GetValue(&g_kSingleDataMap, v4) <= fDeltaTime )
      v2->m_bTimer = 1;
  }
}

//----- (006EE7C0) --------------------------------------------------------
void __thiscall GuildAcademySelectWin::UpdateMeWin(GuildAcademySelectWin *this, float fCurTime)
{
  GuildAcademySelectWin *v2; // esi@1

  v2 = this;
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
    GameFrameWork::UpdateUIScroll(v2->m_pListWinGuild, v2->m_pkSlideBarGuildList);
  GuildAcademySelectWin::UpdateTimer(v2, fCurTime);
}

//----- (006EE810) --------------------------------------------------------
void __thiscall GuildAcademySelectWin::GuildAcademySelectWin(GuildAcademySelectWin *this)
{
  GuildAcademySelectWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GuildAcademySelectWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildAcademySelectWin::`vftable'{for `IDirectMessenger'};
  v1->m_spEdit.m_pObject = 0;
  v1->m_vecGuildInfo._Myfirst = 0;
  v1->m_vecGuildInfo._Mylast = 0;
  v1->m_vecGuildInfo._Myend = 0;
  v1->m_vecSearch._Myfirst = 0;
  v1->m_vecSearch._Mylast = 0;
  v1->m_vecSearch._Myend = 0;
  v1->m_nSortColumn = 0;
  v1->m_pkSlideBarGuildList = 0;
  v1->m_pkSlideBar = 0;
  v1->m_pListWinGuild = 0;
  v1->m_TotalNumOfGuild = 0;
  *(_DWORD *)&v1->m_bFromReq = 0;
  *(_WORD *)&v1->m_bReverse4 = 0;
  *(_DWORD *)&v1->m_acSearchName[0] = 0;
  *(_DWORD *)&v1->m_acSearchName[4] = 0;
  *(_DWORD *)&v1->m_acSearchName[8] = 0;
  *(_DWORD *)&v1->m_acSearchName[12] = 0;
  *(_DWORD *)&v1->m_acSearchName[16] = 0;
  *(_DWORD *)&v1->m_acSearchName[20] = 0;
  *(_DWORD *)&v1->m_acSearchName[24] = 0;
  *(_DWORD *)&v1->m_acSearchName[28] = 0;
  v1->m_fOldTime = 0.0;
  v1->m_bTimer = 1;
}
// 9C627C: using guessed type void (__thiscall *GuildAcademySelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C629C: using guessed type int (__thiscall *GuildAcademySelectWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006EE8D0) --------------------------------------------------------
void __thiscall GuildAcademySelectWin::~GuildAcademySelectWin(GuildAcademySelectWin *this)
{
  GuildAcademySelectWin *v1; // esi@1
  GuildAcademySelectWin::GuildInfo *v2; // eax@1
  GuildListWin::GuildInfo *v3; // eax@3
  EditWin *v4; // edi@5

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildAcademySelectWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildAcademySelectWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_vecSearch._Myfirst;
  if ( v2 )
  {
    std::_Destroy_range<std::allocator<GTRequestListWin::GuildInfo>>(
      (GuildListWin::GuildInfo *)v2,
      (GuildListWin::GuildInfo *)this->m_vecSearch._Mylast);
    operator delete(v1->m_vecSearch._Myfirst);
  }
  v1->m_vecSearch._Myfirst = 0;
  v1->m_vecSearch._Mylast = 0;
  v1->m_vecSearch._Myend = 0;
  v3 = (GuildListWin::GuildInfo *)v1->m_vecGuildInfo._Myfirst;
  if ( v3 )
  {
    std::_Destroy_range<std::allocator<GTRequestListWin::GuildInfo>>(
      v3,
      (GuildListWin::GuildInfo *)v1->m_vecGuildInfo._Mylast);
    operator delete(v1->m_vecGuildInfo._Myfirst);
  }
  v1->m_vecGuildInfo._Myfirst = 0;
  v1->m_vecGuildInfo._Mylast = 0;
  v1->m_vecGuildInfo._Myend = 0;
  v4 = v1->m_spEdit.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9C627C: using guessed type void (__thiscall *GuildAcademySelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C629C: using guessed type int (__thiscall *GuildAcademySelectWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006EE9E0) --------------------------------------------------------
GuildAcademySelectWin *__cdecl GuildAcademySelectWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  GuildAcademySelectWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1C8u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    GuildAcademySelectWin::GuildAcademySelectWin((GuildAcademySelectWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (GuildAcademySelectWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (006EEB10) --------------------------------------------------------
void __thiscall GuildAcademySelectWin::ClearAcademyList(GuildAcademySelectWin *this)
{
  GuildAcademySelectWin *v1; // esi@1
  GuildAcademySelectWin::GuildInfo *v2; // eax@1
  GuildAcademySelectWin::GuildInfo *v3; // ecx@1
  GuildListWin::GuildInfo *v4; // edi@2
  GuildListWin::GuildInfo *v5; // eax@3
  GuildListWin::GuildInfo *v6; // ecx@3
  GuildListWin::GuildInfo *v7; // edi@4
  SlideListWin *v8; // edi@5

  v1 = this;
  v2 = this->m_vecGuildInfo._Mylast;
  v3 = this->m_vecGuildInfo._Myfirst;
  if ( v3 != v2 )
  {
    v4 = std::_Move<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::GuildInfo *>(
           (GuildListWin::GuildInfo *)v2,
           (GuildListWin::GuildInfo *)v2,
           (GuildListWin::GuildInfo *)v3);
    std::_Destroy_range<std::allocator<GTRequestListWin::GuildInfo>>(
      v4,
      (GuildListWin::GuildInfo *)v1->m_vecGuildInfo._Mylast);
    v1->m_vecGuildInfo._Mylast = (GuildAcademySelectWin::GuildInfo *)v4;
  }
  v5 = (GuildListWin::GuildInfo *)v1->m_vecSearch._Mylast;
  v6 = (GuildListWin::GuildInfo *)v1->m_vecSearch._Myfirst;
  if ( v6 != v5 )
  {
    v7 = std::_Move<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::GuildInfo *>(v5, v5, v6);
    std::_Destroy_range<std::allocator<GTRequestListWin::GuildInfo>>(
      v7,
      (GuildListWin::GuildInfo *)v1->m_vecSearch._Mylast);
    v1->m_vecSearch._Mylast = (GuildAcademySelectWin::GuildInfo *)v7;
  }
  SlideListWin::RemoveAllList(v1->m_pListWinGuild);
  v1->m_pListWinGuild->m_nSlideSplitCnt = 0;
  v8 = v1->m_pListWinGuild;
  v8->m_fCurSlideBtnPos = 0.0;
  v8->m_nViewStartPos = (signed int)((double)v8->m_nSlideSplitCnt * 0.0);
  v1->m_pListWinGuild->m_nViewStartPos = 0;
  SlideBar::SetSplitCnt(v1->m_pkSlideBarGuildList, 0);
  *(_DWORD *)&v1->m_acSearchName[0] = 0;
  *(_DWORD *)&v1->m_acSearchName[4] = 0;
  *(_DWORD *)&v1->m_acSearchName[8] = 0;
  *(_DWORD *)&v1->m_acSearchName[12] = 0;
  *(_DWORD *)&v1->m_acSearchName[16] = 0;
  *(_DWORD *)&v1->m_acSearchName[20] = 0;
  *(_DWORD *)&v1->m_acSearchName[24] = 0;
  *(_DWORD *)&v1->m_acSearchName[28] = 0;
  ((void (__stdcall *)(_DWORD))v1->m_spEdit.m_pObject->vfptr[115].__vecDelDtor)(&unk_9C5F2E);
}

//----- (006EEC40) --------------------------------------------------------
void __thiscall GuildAcademySelectWin::OnClickWinCloseBtn(GuildAcademySelectWin *this)
{
  GuildAcademySelectWin *v1; // esi@1

  v1 = this;
  if ( this == (GuildAcademySelectWin *)g_pkToolTipWin->m_pkToolTipParentWin )
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
  GuildAcademySelectWin::ClearAcademyList(v1);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}

//----- (006EEC80) --------------------------------------------------------
void __thiscall GuildAcademySelectWin::ShowAll(GuildAcademySelectWin *this)
{
  GameFrameWork *v1; // esi@2
  NiUnsharedGeometryGroup *v2; // eax@3

  if ( this->m_bTimer )
  {
    this->m_bTimer = 0;
    this->m_fOldTime = Timer::ms_fCurTime;
    GuildAcademySelectWin::ClearAcademyList(this);
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0xBu, 0, 0);
  }
  else
  {
    v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v1 )
    {
      v2 = TextData3::Get(0x32D6F69u);
      GameFrameWork::AddSysMsg(v1, (const char *)v2);
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (006EECF0) --------------------------------------------------------
void __thiscall GuildAcademySelectWin::SetGuildList(GuildAcademySelectWin *this, SHINE_GUILD_ACADEMY_LIST *pkList)
{
  GuildAcademySelectWin *v2; // edi@1
  unsigned int v3; // edx@2
  unsigned int v4; // ecx@2
  unsigned int v5; // edx@2
  unsigned int v6; // ecx@2
  unsigned int v7; // eax@2
  unsigned int v8; // edx@2
  unsigned int v9; // eax@2
  unsigned int v10; // ecx@2
  GuildAcademySelectWin::GuildInfo kGuildInfo; // [sp+10h] [bp-80h]@1
  char acName[17]; // [sp+54h] [bp-3Ch]@2
  _DWORD acName2[5]; // [sp+68h] [bp-28h]@2
  char v14; // [sp+7Ch] [bp-14h]@2
  int v15; // [sp+8Ch] [bp-4h]@1

  v2 = this;
  kGuildInfo.m_strGuildName._Myres = 15;
  kGuildInfo.m_strGuildName._Mysize = 0;
  kGuildInfo.m_strGuildName._Bx._Buf[0] = 0;
  kGuildInfo.m_MasterName._Myres = 15;
  kGuildInfo.m_MasterName._Mysize = 0;
  kGuildInfo.m_MasterName._Bx._Buf[0] = 0;
  v15 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &kGuildInfo.m_strGuildName,
    (const char *)&unk_96F8EB,
    0);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &kGuildInfo.m_MasterName,
    (const char *)&unk_96F8EB,
    0);
  if ( pkList )
  {
    v3 = pkList->GuildName.n4_code[2];
    v4 = pkList->GuildName.n4_code[1];
    *(_DWORD *)acName = pkList->GuildName.n4_code[0];
    *(_DWORD *)&acName[12] = pkList->GuildName.n4_code[3];
    *(_DWORD *)&acName[8] = v3;
    *(_DWORD *)&acName[4] = v4;
    acName[16] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kGuildInfo.m_strGuildName,
      acName,
      strlen(acName));
    v5 = pkList->GuildMasterName.n5_code[0];
    v6 = pkList->GuildMasterName.n5_code[2];
    acName2[1] = pkList->GuildMasterName.n5_code[1];
    v7 = pkList->GuildMasterName.n5_code[4];
    acName2[0] = v5;
    v8 = pkList->GuildMasterName.n5_code[3];
    acName2[4] = v7;
    acName2[3] = v8;
    acName2[2] = v6;
    v14 = 0;
    LOBYTE(acName2[4]) = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &kGuildInfo.m_MasterName,
      (const char *)acName2,
      strlen((const char *)acName2));
    v9 = pkList->NumOfAcademyMembers;
    v10 = pkList->NumOfGraduate;
    kGuildInfo.m_unGuildMember = pkList->NumOfGuildMembers;
    kGuildInfo.m_unGuildAcademy = v9;
    kGuildInfo.m_unGuildGraduates = v10;
  }
  std::vector<GuildAcademySelectWin::GuildInfo,std::allocator<GuildAcademySelectWin::GuildInfo>>::push_back(
    (std::vector<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > *)&v2->m_vecGuildInfo,
    (GuildListWin::GuildInfo *)&kGuildInfo);
  if ( kGuildInfo.m_MasterName._Myres >= 0x10 )
    operator delete(kGuildInfo.m_MasterName._Bx._Ptr);
  kGuildInfo.m_MasterName._Myres = 15;
  kGuildInfo.m_MasterName._Mysize = 0;
  kGuildInfo.m_MasterName._Bx._Buf[0] = 0;
  if ( kGuildInfo.m_strGuildName._Myres >= 0x10 )
    operator delete(kGuildInfo.m_strGuildName._Bx._Ptr);
}

//----- (006EEE50) --------------------------------------------------------
void __thiscall GuildAcademySelectWin::Sort(GuildAcademySelectWin *this)
{
  std::_Sort<GuildAcademySelectWin::GuildInfo *,int,GuildAcademySelectWin::Order>(
    this->m_vecSearch._Myfirst,
    this->m_vecSearch._Mylast,
    this->m_vecSearch._Mylast - this->m_vecSearch._Myfirst,
    this->OrderSort);
}

//----- (006EEEA0) --------------------------------------------------------
char __thiscall GuildAcademySelectWin::Create(GuildAcademySelectWin *this, PgFrameWork *pkFrameWork)
{
  GuildAcademySelectWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiAVObject *v5; // eax@4
  NiTexturingProperty *v6; // eax@4
  NiTexturingProperty *v7; // edi@4
  NiTexturingProperty::Map *v8; // eax@6
  NiSourceTexture *v9; // eax@7
  NiNode *v10; // esi@10
  char result; // al@14
  PgSprData *v12; // eax@15
  NiNode *v13; // esi@18
  int v14; // edi@22
  int v15; // ebx@22
  NiSourceTexture *v16; // eax@22
  PgSprData *v17; // eax@23
  NiSourceTexture *v18; // eax@25
  PgSprData *v19; // eax@25
  PgFont *v20; // eax@27
  PgWinText *v21; // eax@27
  NiRefObjectVtbl *v22; // edx@27
  NiUnsharedGeometryGroup *v23; // eax@27
  PgSprData *v24; // eax@29
  SLWCreateInfo::Item *v25; // eax@29
  PgWinText *v26; // eax@29
  PgWinText *v27; // eax@29
  PgWinText *v28; // eax@29
  PgWinText *v29; // eax@29
  PgWinText *v30; // eax@29
  PgWinText *v31; // eax@29
  PgWinText *v32; // eax@29
  PgSprData *v33; // eax@29
  SlideListWin *v34; // eax@29
  PgSprData *v35; // eax@29
  SlideBar *v36; // eax@29
  float v37; // ecx@29
  PgWinText *v38; // eax@29
  PgFont *v39; // eax@29
  PgWinText *v40; // eax@29
  NiRefObjectVtbl *v41; // edx@29
  NiUnsharedGeometryGroup *v42; // eax@29
  float v43; // ecx@29
  PgWinText *v44; // eax@29
  PgFont *v45; // eax@29
  PgWinText *v46; // eax@29
  NiRefObjectVtbl *v47; // edx@29
  NiUnsharedGeometryGroup *v48; // eax@29
  float v49; // ecx@29
  PgWinText *v50; // eax@29
  PgFont *v51; // eax@29
  PgWinText *v52; // eax@29
  NiRefObjectVtbl *v53; // edx@29
  NiUnsharedGeometryGroup *v54; // eax@29
  float v55; // ecx@29
  PgWinText *v56; // eax@29
  PgFont *v57; // eax@29
  PgWinText *v58; // eax@29
  NiRefObjectVtbl *v59; // edx@29
  NiUnsharedGeometryGroup *v60; // eax@29
  float v61; // ecx@29
  PgWinText *v62; // eax@29
  PgFont *v63; // eax@29
  PgWinText *v64; // eax@29
  NiRefObjectVtbl *v65; // edx@29
  NiUnsharedGeometryGroup *v66; // eax@29
  float v67; // ecx@29
  PgWinText *v68; // eax@29
  PgFont *v69; // eax@29
  PgWinText *v70; // eax@29
  NiRefObjectVtbl *v71; // edx@29
  NiUnsharedGeometryGroup *v72; // eax@29
  float v73; // ecx@29
  PgWinText *v74; // eax@29
  PgFont *v75; // eax@29
  PgWinText *v76; // eax@29
  NiRefObjectVtbl *v77; // edx@29
  NiUnsharedGeometryGroup *v78; // eax@29
  float v79; // ecx@29
  PgWinText *v80; // eax@29
  PgFont *v81; // eax@29
  PgWinText *v82; // eax@29
  NiRefObjectVtbl *v83; // edx@29
  NiUnsharedGeometryGroup *v84; // eax@29
  NiPointer<PgSprData::PgHitTester> *v85; // ecx@29
  NiSourceTexture *v86; // eax@29
  PgFont *v87; // eax@29
  PgWinText *v88; // eax@29
  NiRefObjectVtbl *v89; // edx@29
  NiUnsharedGeometryGroup *v90; // eax@29
  EditWin *v91; // eax@29
  float v92; // ecx@29
  NiSourceTexture *v93; // eax@29
  PgFont *v94; // eax@29
  PgWinText *v95; // eax@29
  NiRefObjectVtbl *v96; // edx@29
  NiUnsharedGeometryGroup *v97; // eax@29
  float v98; // ecx@29
  NiSourceTexture *v99; // eax@29
  PgFont *v100; // eax@29
  PgWinText *v101; // edi@29
  NiRefObjectVtbl *v102; // ebx@29
  NiUnsharedGeometryGroup *v103; // eax@29
  unsigned int uiWidth; // [sp+B4h] [bp-6Ch]@25
  unsigned int uiHeight; // [sp+B8h] [bp-68h]@25
  SLWCreateInfo kCreateInfo; // [sp+BCh] [bp-64h]@29
  NiPointer<NiTexturingProperty> spTexProp; // [sp+D8h] [bp-48h]@4
  NiSourceTexture *pkTexture; // [sp+DCh] [bp-44h]@7
  NiSourceTexture *pkTexture8; // [sp+E0h] [bp-40h]@27
  int uiLeft; // [sp+E4h] [bp-3Ch]@15
  int uiTop; // [sp+E8h] [bp-38h]@15
  NiPointer<NiNode> spNode; // [sp+ECh] [bp-34h]@1
  PgWinText *pkTextWin; // [sp+F0h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+F4h] [bp-2Ch]@29
  int v115; // [sp+11Ch] [bp-4h]@1

  v2 = this;
  pkTextWin = (PgWinText *)pkFrameWork;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v115 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildAcademySelect.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Frame");
  v6 = (NiTexturingProperty *)NiAVObject::GetProperty(v5, 8);
  v7 = v6;
  spTexProp.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v8 = *v7->m_kMaps.m_pBase;
  LOBYTE(v115) = 1;
  if ( !v8 || (v9 = (NiSourceTexture *)v8->m_spTexture.m_pObject, (pkTexture = v9) == 0) )
  {
    LOBYTE(v115) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v10 = spNode.m_pObject;
    v115 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
    return 0;
  }
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v9);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v12, 0, (PgFrameWork *)pkTextWin, "GuildAcademySelect", 0) )
  {
    v14 = uiLeft;
    v15 = uiTop;
    v16 = MenuTexMgr::GetTexture(0x13u);
    if ( v16 )
      v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v16);
    else
      v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v17, (PgWin *)&v2->vfptr, 0, 0);
    v18 = MenuTexMgr::GetTexture(0x12u);
    v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, v18);
    PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v19, (PgWin *)&v2->vfptr, 0, 0);
    if ( PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "WinTitle",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight) )
    {
      v20 = Font::Get(MAIN_MENU);
      v21 = PgWinText::CreateWin(uiLeft - v14, uiTop - v15, uiWidth, uiHeight, v20, (PgWin *)&v2->vfptr, 0, 0);
      v22 = v21->vfptr;
      pkTextWin = v21;
      v22[122].__vecDelDtor((NiRefObject *)v21, 1u);
      ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v23 = TextData::Get(0x369271A4u);
      (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))&pkTexture8[6].m_bStatic)(pkTextWin, v23);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "ClsNor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xBu, 0, 0);
      pkTexture8 = MenuTexMgr::GetTexture(4u);
      if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
      {
        pkTextWin = (PgWinText *)PgSprData::Create(
                                   (NiAVObject *)&spNode.m_pObject->vfptr,
                                   "HelpLinkNor",
                                   &uiLeft,
                                   &uiTop,
                                   pkTexture8);
        PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
        PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
        PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x19u, 0, 0);
      }
      v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane", &uiLeft, &uiTop, pkTexture);
      PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v24, (PgWin *)&v2->vfptr, 0, 0);
      kCreateInfo.m_arrItem._Myfirst = 0;
      kCreateInfo.m_arrItem._Mylast = 0;
      kCreateInfo.m_arrItem._Myend = 0;
      kCreateInfo.m_bMakeData = 0;
      kCreateInfo.m_nOffX = 0;
      kCreateInfo.m_nOffY = 0;
      LOBYTE(v115) = 2;
      v25 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
      v25->nItemType = 1;
      v25->pNode = spNode.m_pObject;
      pkTextWin = (PgWinText *)v25;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "ColumnBarNor");
      LOBYTE(v115) = 3;
      pkTextWin = (PgWinText *)((char *)pkTextWin + 72);
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkTextWin,
        &_Val);
      LOBYTE(v115) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "ColumnBarClick");
      LOBYTE(v115) = 4;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkTextWin,
        &_Val);
      LOBYTE(v115) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "ColumnBarOver");
      LOBYTE(v115) = 5;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkTextWin,
        &_Val);
      LOBYTE(v115) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      v26 = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkTextWin = v26;
      v26->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column01");
      LOBYTE(v115) = 6;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v115) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      v27 = pkTextWin;
      pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
      LOBYTE(v27->m_kLocal.m_Translate.x) = 1;
      v28 = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkTextWin = v28;
      v28->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column02");
      LOBYTE(v115) = 7;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v115) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      v29 = pkTextWin;
      pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
      LOBYTE(v29->m_kLocal.m_Translate.x) = 1;
      v30 = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkTextWin = v30;
      v30->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column03");
      LOBYTE(v115) = 8;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v115) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
      v31 = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkTextWin = v31;
      v31->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column04");
      LOBYTE(v115) = 9;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v115) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
      v32 = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
      pkTextWin = v32;
      v32->vfptr = (NiRefObjectVtbl *)2;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
        &_Val,
        "Column05");
      LOBYTE(v115) = 10;
      std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
        (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
        &_Val);
      LOBYTE(v115) = 2;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
      pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
      kCreateInfo.m_nOffX = 5;
      kCreateInfo.m_nOffY = 0;
      SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
      v33 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane01", &uiLeft, &uiTop, pkTexture);
      v34 = SlideListWin::CreateWin(uiLeft - v14, uiTop - v15, v33, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
      v2->m_pListWinGuild = v34;
      v34->m_uiRClickMsg = 23;
      v2->m_pListWinGuild->m_uiLClickMsg = 24;
      SlideListWin::UpdateViewList(v2->m_pListWinGuild);
      SLWCreateInfo::Clear(&kCreateInfo);
      SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
      v35 = PgSprData::Create(
              (NiAVObject *)&spNode.m_pObject->vfptr,
              "SlideBar_SlideBtnMiddle",
              &uiLeft,
              &uiTop,
              pkTexture);
      v36 = SlideBar::CreateWin(
              spNode.m_pObject,
              "SlideBar",
              "SlideBar_UpBtn",
              "SlideBar_DnBtn",
              v35,
              0,
              (PgWin *)&v2->vfptr);
      v2->m_pkSlideBarGuildList = v36;
      v36->m_uiClickMsg = 17;
      v2->m_pkSlideBarGuildList->m_eType = 1;
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "Title01Nor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title01Click");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title01Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x12u, 0, 0);
      v37 = pkTextWin->m_kWorldBound.m_kCenter.x;
      v38 = *(PgWinText **)(*(_DWORD *)LODWORD(v37) + 20);
      pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v37) + 24);
      pkTextWin = v38;
      v39 = Font::Get(MAIN_MENU);
      v40 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v39,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v41 = v40->vfptr;
      pkTextWin = v40;
      v41[122].__vecDelDtor((NiRefObject *)v40, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v42 = TextData::Get(0x4EA49695u);
      (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))&pkTexture8[6].m_bStatic)(pkTextWin, v42);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "Title02Nor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title02Click");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title02Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x13u, 0, 0);
      v43 = pkTextWin->m_kWorldBound.m_kCenter.x;
      v44 = *(PgWinText **)(*(_DWORD *)LODWORD(v43) + 20);
      pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v43) + 24);
      pkTextWin = v44;
      v45 = Font::Get(MAIN_MENU);
      v46 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v45,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v47 = v46->vfptr;
      pkTextWin = v46;
      v47[122].__vecDelDtor((NiRefObject *)v46, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v48 = TextData::Get(0x92B39CE7);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v48);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "Title03Nor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title03Click");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title03Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x14u, 0, 0);
      v49 = pkTextWin->m_kWorldBound.m_kCenter.x;
      v50 = *(PgWinText **)(*(_DWORD *)LODWORD(v49) + 20);
      pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v49) + 24);
      pkTextWin = v50;
      v51 = Font::Get(MAIN_MENU);
      v52 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v51,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v53 = v52->vfptr;
      pkTextWin = v52;
      v53[122].__vecDelDtor((NiRefObject *)v52, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v54 = TextData::Get(0x75867FA9u);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v54);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "Title04Nor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title04Click");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title04Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x15u, 0, 0);
      v55 = pkTextWin->m_kWorldBound.m_kCenter.x;
      v56 = *(PgWinText **)(*(_DWORD *)LODWORD(v55) + 20);
      pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v55) + 24);
      pkTextWin = v56;
      v57 = Font::Get(MAIN_MENU);
      v58 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v57,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v59 = v58->vfptr;
      pkTextWin = v58;
      v59[122].__vecDelDtor((NiRefObject *)v58, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v60 = TextData::Get(0x86A3E3E4);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v60);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "Title05Nor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title05Click");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title05Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x16u, 0, 0);
      v61 = pkTextWin->m_kWorldBound.m_kCenter.x;
      v62 = *(PgWinText **)(*(_DWORD *)LODWORD(v61) + 20);
      pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v61) + 24);
      pkTextWin = v62;
      v63 = Font::Get(MAIN_MENU);
      v64 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v63,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v65 = v64->vfptr;
      pkTextWin = v64;
      v65[122].__vecDelDtor((NiRefObject *)v64, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v66 = TextData::Get(0xEA472B3C);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v66);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "Btn01Nor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xCu, 0, 0);
      v67 = pkTextWin->m_kWorldBound.m_kCenter.x;
      v68 = *(PgWinText **)(*(_DWORD *)LODWORD(v67) + 20);
      pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v67) + 24);
      pkTextWin = v68;
      v69 = Font::Get(MAIN_MENU);
      v70 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v69,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v71 = v70->vfptr;
      pkTextWin = v70;
      v71[122].__vecDelDtor((NiRefObject *)v70, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v72 = TextData::Get(0xD0502C33);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v72);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "Btn02Nor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Click");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xDu, 0, 0);
      v73 = pkTextWin->m_kWorldBound.m_kCenter.x;
      v74 = *(PgWinText **)(*(_DWORD *)LODWORD(v73) + 20);
      pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v73) + 24);
      pkTextWin = v74;
      v75 = Font::Get(MAIN_MENU);
      v76 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v75,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v77 = v76->vfptr;
      pkTextWin = v76;
      v77[122].__vecDelDtor((NiRefObject *)v76, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v78 = TextData::Get(0x73F2C2B5u);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v78);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "Btn03Nor",
                                 &uiLeft,
                                 &uiTop,
                                 pkTexture);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Click");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xEu, 0, 0);
      v79 = pkTextWin->m_kWorldBound.m_kCenter.x;
      v80 = *(PgWinText **)(*(_DWORD *)LODWORD(v79) + 20);
      pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v79) + 24);
      pkTextWin = v80;
      v81 = Font::Get(MAIN_MENU);
      v82 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTextWin,
              (unsigned int)pkTexture8,
              v81,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v83 = v82->vfptr;
      pkTextWin = v82;
      v83[122].__vecDelDtor((NiRefObject *)v82, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v84 = TextData::Get(0x23312946u);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v84);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      v85 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &uiLeft, &uiTop, pkTexture)->m_akHitTester.m_pBase;
      v86 = (NiSourceTexture *)v85->m_pObject->m_uiWidth;
      pkTexture8 = (NiSourceTexture *)v85->m_pObject->m_uiHeight;
      pkTexture = v86;
      v87 = Font::Get(0);
      v88 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTexture,
              (unsigned int)pkTexture8,
              v87,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v89 = v88->vfptr;
      pkTextWin = v88;
      v89[122].__vecDelDtor((NiRefObject *)v88, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v90 = TextData3::Get(0xB306566u);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v90);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "Search_Input",
                                 &uiLeft,
                                 &uiTop,
                                 0);
      PgWinSpr::CreateWin(uiLeft, uiTop, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0, 0);
      v91 = EditWin::CreateWin(
              uiLeft,
              uiTop + 2,
              *(_DWORD *)(*(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x) + 20),
              *(_DWORD *)(*(_DWORD *)LODWORD(pkTextWin->m_kWorldBound.m_kCenter.x) + 24),
              (PgWin *)&v2->vfptr,
              NORMAL,
              0x14u,
              1u,
              1,
              0,
              1);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spEdit, (NiD3DDefaultShader *)v91);
      EditWin::SetImeStatus(v2->m_spEdit.m_pObject, IS_KOREAN);
      pkTextWin = (PgWinText *)PgSprData::Create(
                                 (NiAVObject *)&spNode.m_pObject->vfptr,
                                 "SearchBtnNor",
                                 &uiLeft,
                                 &uiTop,
                                 0);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "SearchBtnClick");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "SearchBtnOver");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x1Au, 0, 0);
      v92 = pkTextWin->m_kWorldBound.m_kCenter.x;
      v93 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v92) + 20);
      pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v92) + 24);
      pkTexture = v93;
      v94 = Font::Get(0);
      v95 = PgWinText::CreateWin(
              uiLeft - v14,
              uiTop - v15 + 1,
              (unsigned int)pkTexture,
              (unsigned int)pkTexture8,
              v94,
              (PgWin *)&v2->vfptr,
              0,
              0);
      v96 = v95->vfptr;
      pkTextWin = v95;
      v96[122].__vecDelDtor((NiRefObject *)v95, 5u);
      pkTexture8 = (NiSourceTexture *)pkTextWin->vfptr;
      v97 = TextData3::Get(0x67775F79u);
      (*(void (__thiscall **)(_DWORD, _DWORD))&pkTexture8[6].m_bStatic)(pkTextWin, v97);
      ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
      pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn04Nor", &uiLeft, &uiTop, 0);
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn04Click");
      PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn04Over");
      PgWinBut::CreateWin(uiLeft - v14, uiTop - v15, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x1Bu, 0, 0);
      v98 = pkTextWin->m_kWorldBound.m_kCenter.x;
      v99 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v98) + 20);
      pkTexture8 = *(NiSourceTexture **)(*(_DWORD *)LODWORD(v98) + 24);
      pkTexture = v99;
      v100 = Font::Get(0);
      v101 = PgWinText::CreateWin(
               uiLeft - v14,
               uiTop - v15 + 1,
               (unsigned int)pkTexture,
               (unsigned int)pkTexture8,
               v100,
               (PgWin *)&v2->vfptr,
               0,
               0);
      v101->vfptr[122].__vecDelDtor((NiRefObject *)v101, 5u);
      v102 = v101->vfptr;
      v103 = TextData3::Get(0x7272A2EDu);
      v102[118].__vecDelDtor((NiRefObject *)v101, (unsigned int)v103);
      v101->vfptr[60].__vecDelDtor((NiRefObject *)v101, 0);
      ((void (__thiscall *)(GuildAcademySelectWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
        v2,
        PgWin::ms_uiScreenWidth,
        PgWin::ms_uiScreenHeight,
        0.40000001,
        0.5);
      LOBYTE(v115) = 1;
      SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
      LOBYTE(v115) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
      v115 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 1;
    }
    else
    {
      LOBYTE(v115) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
      v115 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 0;
    }
  }
  else
  {
    LOBYTE(v115) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v13 = spNode.m_pObject;
    v115 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v13 )
      return 0;
    v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006F0000) --------------------------------------------------------
void __thiscall GuildAcademySelectWin::DisplayInfoSetting(GuildAcademySelectWin *this)
{
  GuildAcademySelectWin *v1; // esi@1
  GuildAcademySelectWin::GuildInfo *v2; // edi@1
  GuildListWin::GuildInfo *v3; // edi@3
  char *v4; // eax@4
  char *v5; // edx@6
  char v6; // cl@7
  const char *v7; // ebx@8
  char **v8; // eax@8
  char *v9; // edx@10
  char v10; // cl@11
  unsigned int v11; // edx@16
  int v12; // edi@16
  int v13; // ebx@18
  GameFrameWork *v14; // edi@21
  NiUnsharedGeometryGroup *v15; // eax@22
  int v16; // [sp+Ch] [bp-4Ch]@2
  unsigned int i; // [sp+10h] [bp-48h]@1
  char strGuildName[32]; // [sp+14h] [bp-44h]@6
  char strMasterName[32]; // [sp+34h] [bp-24h]@10

  v1 = this;
  v2 = this->m_vecGuildInfo._Myfirst;
  i = 0;
  if ( this->m_vecGuildInfo._Mylast - v2 )
  {
    v16 = 0;
    do
    {
      v3 = (GuildListWin::GuildInfo *)&v2[v16];
      if ( v3->m_strGuildName._Myres < 0x10 )
        v4 = (char *)v3;
      else
        v4 = v3->m_strGuildName._Bx._Ptr;
      v5 = (char *)(strGuildName - v4);
      do
      {
        v6 = *v4;
        v4[(_DWORD)v5] = *v4;
        ++v4;
      }
      while ( v6 );
      _strlwr(strGuildName);
      _strlwr(v1->m_acSearchName);
      v7 = _mbsstr(strGuildName, v1->m_acSearchName);
      v8 = &v3->m_MasterName._Bx._Ptr;
      if ( v3->m_MasterName._Myres >= 0x10 )
        v8 = (char **)*v8;
      v9 = (char *)(strMasterName - (char *)v8);
      do
      {
        v10 = *(_BYTE *)v8;
        *((_BYTE *)v8 + (_DWORD)v9) = *(_BYTE *)v8;
        v8 = (char **)((char *)v8 + 1);
      }
      while ( v10 );
      _strlwr(strMasterName);
      if ( v7 || _mbsstr(strMasterName, v1->m_acSearchName) )
        std::vector<GuildAcademySelectWin::GuildInfo,std::allocator<GuildAcademySelectWin::GuildInfo>>::push_back(
          (std::vector<GuildListWin::GuildInfo,std::allocator<GuildListWin::GuildInfo> > *)&v1->m_vecSearch,
          v3);
      v2 = v1->m_vecGuildInfo._Myfirst;
      ++v16;
      ++i;
    }
    while ( i < v1->m_vecGuildInfo._Mylast - v2 );
  }
  std::_Sort<GuildAcademySelectWin::GuildInfo *,int,GuildAcademySelectWin::Order>(
    v1->m_vecSearch._Myfirst,
    v1->m_vecSearch._Mylast,
    v1->m_vecSearch._Mylast - v1->m_vecSearch._Myfirst,
    v1->OrderSort);
  v11 = (signed int)((unsigned __int64)(2021161081i64
                                      * (unsigned int)((char *)v1->m_vecSearch._Mylast - (char *)v1->m_vecSearch._Myfirst)) >> 32) >> 5;
  v12 = v11 + (v11 >> 31);
  if ( v12 )
  {
    SlideListWin::RemoveAllList(v1->m_pListWinGuild);
    if ( v12 )
    {
      v13 = 0;
      do
      {
        GuildAcademySelectWin::AddGuildInfo(v1, &v1->m_vecSearch._Myfirst[v13]);
        ++v13;
        --v12;
      }
      while ( v12 );
    }
  }
  else
  {
    v14 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v14 )
    {
      v15 = TextData3::Get(0xB5D1D1A8);
      GameFrameWork::AddSysMsg(v14, (const char *)v15);
    }
  }
  SlideListWin::UpdateViewList(v1->m_pListWinGuild);
}

//----- (006F01D0) --------------------------------------------------------
void __thiscall GuildAcademySelectWin::OnSearch(GuildAcademySelectWin *this)
{
  GuildAcademySelectWin *v1; // edi@1
  const char *v2; // ebx@1
  unsigned int v3; // esi@1
  GameFrameWork *v4; // ebx@1
  NiUnsharedGeometryGroup *v5; // eax@4
  NiUnsharedGeometryGroup *v6; // eax@6
  GuildListWin::GuildInfo *v7; // eax@7
  GuildListWin::GuildInfo *v8; // ecx@7
  GuildListWin::GuildInfo *v9; // esi@8
  int v10; // esi@9
  char *v11; // eax@9
  int v12; // esi@9
  char v13; // cl@10
  SlideListWin *v14; // esi@11
  BYTE dbcs; // [sp+Ch] [bp-4h]@1

  v1 = this;
  v2 = (const char *)((int (*)(void))this->m_spEdit.m_pObject->vfptr[113].__vecDelDtor)();
  v3 = strlen(v2);
  PgEditWin::SetCaretPos(v1->m_spEdit.m_pObject->m_spEditWin.m_pObject, v3);
  dbcs = *v2;
  v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v4 )
  {
    if ( IsDBCSLeadByte(dbcs) )
    {
      if ( v3 < 2 )
      {
        v5 = TextData3::Get(0x96D0CDB6);
        GameFrameWork::AddSysMsg(v4, (const char *)v5);
        return;
      }
    }
    else if ( v3 < 1 )
    {
      v6 = TextData3::Get(0x96D0CDB6);
      GameFrameWork::AddSysMsg(v4, (const char *)v6);
      return;
    }
    v7 = (GuildListWin::GuildInfo *)v1->m_vecSearch._Mylast;
    v8 = (GuildListWin::GuildInfo *)v1->m_vecSearch._Myfirst;
    if ( v8 != v7 )
    {
      v9 = std::_Move<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::GuildInfo *>(v7, v7, v8);
      std::_Destroy_range<std::allocator<GTRequestListWin::GuildInfo>>(
        v9,
        (GuildListWin::GuildInfo *)v1->m_vecSearch._Mylast);
      v1->m_vecSearch._Mylast = (GuildAcademySelectWin::GuildInfo *)v9;
    }
    v10 = (int)v1->m_acSearchName;
    *(_DWORD *)v10 = 0;
    *(_DWORD *)(v10 + 4) = 0;
    *(_DWORD *)(v10 + 8) = 0;
    *(_DWORD *)(v10 + 12) = 0;
    *(_DWORD *)(v10 + 16) = 0;
    *(_DWORD *)(v10 + 20) = 0;
    *(_DWORD *)(v10 + 24) = 0;
    *(_DWORD *)(v10 + 28) = 0;
    v11 = (char *)((int (*)(void))v1->m_spEdit.m_pObject->vfptr[113].__vecDelDtor)();
    v12 = v1->m_acSearchName - v11;
    do
    {
      v13 = *v11;
      v11[v12] = *v11;
      ++v11;
    }
    while ( v13 );
    SlideBar::SetSplitCnt(v1->m_pkSlideBarGuildList, 0);
    v1->m_pListWinGuild->m_nSlideSplitCnt = 0;
    v14 = v1->m_pListWinGuild;
    v14->m_fCurSlideBtnPos = 0.0;
    v14->m_nViewStartPos = (signed int)((double)v14->m_nSlideSplitCnt * 0.0);
    v1->m_pListWinGuild->m_nViewStartPos = 0;
    GuildAcademySelectWin::DisplayInfoSetting(v1);
  }
}

//----- (006F0360) --------------------------------------------------------
void __thiscall GuildAcademySelectWin::OnCommand(GuildAcademySelectWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0xBu:
      GuildAcademySelectWin::OnClickWinCloseBtn(this);
      break;
    case 0xCu:
      GuildAcademySelectWin::OnClickJoinBtn(this);
      break;
    case 0xDu:
      GuildAcademySelectWin::OnClickHallOfFameBtn(this);
      break;
    case 0xEu:
      GuildAcademySelectWin::OnClickRankingBtn();
      break;
    case 0x11u:
      GuildAcademySelectWin::OnSlideBar(this);
      break;
    case 0x12u:
      GuildAcademySelectWin::OnSortByTitle01(this);
      break;
    case 0x13u:
      GuildAcademySelectWin::OnSortByTitle02(this);
      break;
    case 0x14u:
      GuildAcademySelectWin::OnSortByTitle03(this);
      break;
    case 0x15u:
      GuildAcademySelectWin::OnSortByTitle04(this);
      break;
    case 0x16u:
      GuildAcademySelectWin::OnSortByTitle05(this);
      break;
    case 0x19u:
      GuildAcademySelectWin::OnHelpLink();
      break;
    case 0x1Au:
      GuildAcademySelectWin::OnSearch(this);
      break;
    case 0x1Bu:
      GuildAcademySelectWin::ShowAll(this);
      break;
    default:
      return;
  }
}

//----- (006F0430) --------------------------------------------------------
void __thiscall GuildAcademySelectWin::OnEditEnd(GuildAcademySelectWin *this, unsigned int wParam, int lParam)
{
  GuildAcademySelectWin *v3; // esi@1
  EditWin *v4; // edi@1
  NiRefObjectVtbl *v5; // ebx@1
  int v6; // eax@1

  v3 = this;
  v4 = this->m_spEdit.m_pObject;
  v5 = v4->vfptr;
  v6 = ((int (__thiscall *)(_DWORD))v4->vfptr[114].__vecDelDtor)(this->m_spEdit.m_pObject);
  v5[115].__vecDelDtor((NiRefObject *)v4, v6);
  ((void (*)(void))v3->m_spEdit.m_pObject->vfptr[120].__vecDelDtor)();
  GuildAcademySelectWin::OnSearch(v3);
}

//----- (006F0470) --------------------------------------------------------
void __cdecl ISingletonTask<GuildAcademyJoinReqTask>::Run()
{
  GuildAcademyJoinReqTask *v0; // eax@2
  int v1; // eax@3

  if ( !ISingletonTask<GuildAcademyJoinReqTask>::ms_pkSingletonTask )
  {
    v0 = (GuildAcademyJoinReqTask *)operator new(0x5Cu);
    if ( v0 )
    {
      GuildAcademyJoinReqTask::GuildAcademyJoinReqTask(v0);
      ISingletonTask<GuildAcademyJoinReqTask>::ms_pkSingletonTask = v1;
    }
    else
    {
      ISingletonTask<GuildAcademyJoinReqTask>::ms_pkSingletonTask = 0;
    }
  }
}
// B5C2C0: using guessed type int ISingletonTask<GuildAcademyJoinReqTask>::ms_pkSingletonTask;

//----- (006F04F0) --------------------------------------------------------
char __stdcall GuildAcademySelectWin::Order::operator()(GuildAcademySelectWin::GuildInfo *GuildInfo2, GuildAcademySelectWin::GuildInfo *GuildInfo)
{
  unsigned int v3; // ecx@1
  unsigned int v4; // eax@1
  char result; // al@2
  unsigned int v6; // eax@4
  unsigned int v7; // ecx@4
  bool v8; // cf@4
  GuildAcademySelectWin::GuildInfo *v9; // eax@7

  v3 = GuildInfo->m_unGuildAcademy;
  v4 = GuildInfo2->m_unGuildAcademy;
  if ( v4 < v3 )
    return 0;
  if ( v4 == v3 )
  {
    v6 = GuildInfo2->m_unGuildMember;
    v7 = GuildInfo->m_unGuildMember;
    v8 = v7 < v6;
    if ( v7 == v6 )
    {
      if ( GuildInfo2->m_unGuildGraduates == GuildInfo->m_unGuildGraduates )
      {
        v9 = GuildInfo->m_strGuildName._Myres < 0x10 ? GuildInfo : GuildInfo->m_strGuildName._Bx._Ptr;
        if ( std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
               &GuildInfo2->m_strGuildName,
               0,
               GuildInfo2->m_strGuildName._Mysize,
               v9->m_strGuildName._Bx._Buf,
               GuildInfo->m_strGuildName._Mysize) < 0 )
          return std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
                   &GuildInfo2->m_strGuildName,
                   &GuildInfo->m_strGuildName) != 0;
      }
      v8 = GuildInfo->m_unGuildGraduates < GuildInfo2->m_unGuildGraduates;
    }
    result = v8;
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (006F0570) --------------------------------------------------------
void __thiscall GuildListWin::GuildInfo::GuildInfo(GuildListWin::GuildInfo *this, GuildListWin::GuildInfo *__that)
{
  GuildListWin::GuildInfo *v2; // esi@1
  int v3; // ecx@1

  v2 = this;
  this->m_strGuildName._Myres = 15;
  this->m_strGuildName._Mysize = 0;
  this->m_strGuildName._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &this->m_strGuildName,
    &__that->m_strGuildName,
    0,
    0xFFFFFFFF);
  v3 = (int)&v2->m_MasterName;
  *(_DWORD *)(v3 + 20) = 15;
  *(_DWORD *)(v3 + 16) = 0;
  *(_BYTE *)v3 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &v2->m_MasterName,
    &__that->m_MasterName,
    0,
    0xFFFFFFFF);
  v2->m_unGuildType = __that->m_unGuildType;
  v2->m_unGuildGrade = __that->m_unGuildGrade;
  v2->m_unGuildTotalMember = __that->m_unGuildTotalMember;
}

//----- (006F0610) --------------------------------------------------------
void __cdecl std::_Destroy_range<std::allocator<GTRequestListWin::GuildInfo>>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last)
{
  char *v2; // esi@2

  if ( _First != _Last )
  {
    v2 = (char *)&_First->m_MasterName._Myres;
    do
    {
      if ( *(_DWORD *)v2 >= 0x10u )
        operator delete(*((void **)v2 - 5));
      *(_DWORD *)v2 = 15;
      *((_DWORD *)v2 - 1) = 0;
      *(v2 - 20) = 0;
      if ( *((_DWORD *)v2 - 7) >= 0x10u )
        operator delete(*((void **)v2 - 12));
      *((_DWORD *)v2 - 7) = 15;
      *((_DWORD *)v2 - 8) = 0;
      *(v2 - 48) = 0;
      v2 += 68;
    }
    while ( (GuildListWin::GuildInfo *)(v2 - 48) != _Last );
  }
}

//----- (006F0670) --------------------------------------------------------
void __cdecl std::swap<GTRequestListWin::GuildInfo>(GuildListWin::GuildInfo *_Left, GuildListWin::GuildInfo *_Right)
{
  unsigned int v2; // eax@1
  unsigned int v3; // ecx@1
  GuildListWin::GuildInfo _Tmp; // [sp+10h] [bp-54h]@1
  int v5; // [sp+60h] [bp-4h]@1

  GuildListWin::GuildInfo::GuildInfo(&_Tmp, _Left);
  v5 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_Left->m_strGuildName,
    &_Right->m_strGuildName,
    0,
    0xFFFFFFFF);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_Left->m_MasterName,
    &_Right->m_MasterName,
    0,
    0xFFFFFFFF);
  _Left->m_unGuildType = _Right->m_unGuildType;
  _Left->m_unGuildGrade = _Right->m_unGuildGrade;
  _Left->m_unGuildTotalMember = _Right->m_unGuildTotalMember;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_Right->m_strGuildName,
    &_Tmp.m_strGuildName,
    0,
    0xFFFFFFFF);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_Right->m_MasterName,
    &_Tmp.m_MasterName,
    0,
    0xFFFFFFFF);
  v2 = _Tmp.m_unGuildGrade;
  v3 = _Tmp.m_unGuildTotalMember;
  _Right->m_unGuildType = _Tmp.m_unGuildType;
  _Right->m_unGuildGrade = v2;
  _Right->m_unGuildTotalMember = v3;
  if ( _Tmp.m_MasterName._Myres >= 0x10 )
    operator delete(_Tmp.m_MasterName._Bx._Ptr);
  _Tmp.m_MasterName._Myres = 15;
  _Tmp.m_MasterName._Mysize = 0;
  _Tmp.m_MasterName._Bx._Buf[0] = 0;
  if ( _Tmp.m_strGuildName._Myres >= 0x10 )
    operator delete(_Tmp.m_strGuildName._Bx._Ptr);
}

//----- (006F0770) --------------------------------------------------------
void __cdecl std::_Push_heap<GuildAcademySelectWin::GuildInfo *,int,GuildAcademySelectWin::GuildInfo,GuildAcademySelectWin::Order>(GuildAcademySelectWin::GuildInfo *_First, int _Hole, int _Top, GuildAcademySelectWin::GuildInfo *_Val)
{
  int v4; // edi@1
  int v5; // eax@1
  int v6; // ecx@4
  unsigned int v7; // eax@4
  GuildAcademySelectWin::GuildInfo *v8; // esi@4
  unsigned int v9; // ecx@4
  unsigned int v10; // eax@6
  unsigned int v11; // ecx@6
  bool v12; // cf@6
  GuildAcademySelectWin::GuildInfo *v13; // eax@9
  const char *v14; // eax@13
  bool v15; // al@15
  GuildAcademySelectWin::GuildInfo *v16; // edi@19
  GuildAcademySelectWin::GuildInfo *v17; // esi@20
  int _Idx; // [sp+18h] [bp+Ch]@1

  v4 = _Hole;
  v5 = (_Hole - 1) / 2;
  _Idx = (_Hole - 1) / 2;
  if ( _Top < v4 )
  {
    while ( 1 )
    {
      v6 = 17 * v5;
      v7 = _First[v5].m_unGuildAcademy;
      v8 = &_First[4 * v6 / 0x44u];
      v9 = _Val->m_unGuildAcademy;
      if ( v7 < v9 )
        goto LABEL_20;
      if ( v7 == v9 )
        break;
LABEL_19:
      v16 = &_First[v4];
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v16->m_strGuildName,
        &v8->m_strGuildName,
        0,
        0xFFFFFFFF);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v16->m_MasterName,
        &v8->m_MasterName,
        0,
        0xFFFFFFFF);
      v16->m_unGuildMember = v8->m_unGuildMember;
      v16->m_unGuildAcademy = v8->m_unGuildAcademy;
      v16->m_unGuildGraduates = v8->m_unGuildGraduates;
      v4 = _Idx;
      _Idx = (_Idx - 1) / 2;
      if ( _Top >= v4 )
        goto LABEL_20;
      v5 = _Idx;
    }
    v10 = v8->m_unGuildMember;
    v11 = _Val->m_unGuildMember;
    v12 = v11 < v10;
    if ( v11 == v10 )
    {
      if ( v8->m_unGuildGraduates == _Val->m_unGuildGraduates )
      {
        v13 = _Val->m_strGuildName._Myres < 0x10 ? _Val : _Val->m_strGuildName._Bx._Ptr;
        if ( std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
               &v8->m_strGuildName,
               0,
               v8->m_strGuildName._Mysize,
               v13->m_strGuildName._Bx._Buf,
               _Val->m_strGuildName._Mysize) < 0 )
        {
          if ( _Val->m_strGuildName._Myres < 0x10 )
            v14 = (const char *)_Val;
          else
            v14 = _Val->m_strGuildName._Bx._Ptr;
          v15 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
                  &v8->m_strGuildName,
                  0,
                  v8->m_strGuildName._Mysize,
                  v14,
                  _Val->m_strGuildName._Mysize) != 0;
LABEL_18:
          if ( !v15 )
            goto LABEL_20;
          goto LABEL_19;
        }
      }
      v12 = _Val->m_unGuildGraduates < v8->m_unGuildGraduates;
    }
    v15 = v12;
    goto LABEL_18;
  }
LABEL_20:
  v17 = &_First[v4];
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_First[v4].m_strGuildName,
    &_Val->m_strGuildName,
    0,
    0xFFFFFFFF);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &v17->m_MasterName,
    &_Val->m_MasterName,
    0,
    0xFFFFFFFF);
  v17->m_unGuildMember = _Val->m_unGuildMember;
  v17->m_unGuildAcademy = _Val->m_unGuildAcademy;
  v17->m_unGuildGraduates = _Val->m_unGuildGraduates;
}

//----- (006F08B0) --------------------------------------------------------
GuildListWin::GuildInfo *__cdecl std::_Move_backward<GuildListWin::GuildInfo *,GuildListWin::GuildInfo *>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, GuildListWin::GuildInfo *_Dest)
{
  GuildListWin::GuildInfo *v3; // edi@2
  char *v4; // esi@2
  GuildListWin::GuildInfo *result; // eax@4

  if ( _First == _Last )
  {
    result = _Dest;
  }
  else
  {
    v3 = _Dest;
    v4 = (char *)&_Last->m_unGuildType;
    do
    {
      v4 -= 68;
      --v3;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v3->m_strGuildName,
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v4 - 2,
        0,
        0xFFFFFFFF);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v3->m_MasterName,
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v4 - 1,
        0,
        0xFFFFFFFF);
      v3->m_unGuildType = *(_DWORD *)v4;
      v3->m_unGuildGrade = *((_DWORD *)v4 + 1);
      v3->m_unGuildTotalMember = *((_DWORD *)v4 + 2);
    }
    while ( (GuildListWin::GuildInfo *)(v4 - 56) != _First );
    result = v3;
  }
  return result;
}

//----- (006F0910) --------------------------------------------------------
GuildListWin::GuildInfo *__cdecl std::_Move<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::GuildInfo *>(GuildListWin::GuildInfo *_First, GuildListWin::GuildInfo *_Last, GuildListWin::GuildInfo *_Dest)
{
  GuildListWin::GuildInfo *v3; // edi@2
  char *v4; // esi@2
  unsigned int v5; // ecx@3
  GuildListWin::GuildInfo *result; // eax@4

  if ( _First == _Last )
  {
    result = _Dest;
  }
  else
  {
    v3 = _Dest;
    v4 = (char *)&_First->m_unGuildType;
    do
    {
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v3->m_strGuildName,
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v4 - 2,
        0,
        0xFFFFFFFF);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v3->m_MasterName,
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v4 - 1,
        0,
        0xFFFFFFFF);
      v3->m_unGuildType = *(_DWORD *)v4;
      v3->m_unGuildGrade = *((_DWORD *)v4 + 1);
      v5 = *((_DWORD *)v4 + 2);
      v4 += 68;
      v3->m_unGuildTotalMember = v5;
      ++v3;
    }
    while ( (GuildListWin::GuildInfo *)(v4 - 56) != _Last );
    result = v3;
  }
  return result;
}

//----- (006F0970) --------------------------------------------------------
void __cdecl std::_Med3<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::Order>(GuildAcademySelectWin::GuildInfo *_First, GuildAcademySelectWin::GuildInfo *_Mid, GuildAcademySelectWin::GuildInfo *_Last)
{
  if ( GuildAcademySelectWin::Order::operator()(_Mid, _First) )
    std::swap<GTRequestListWin::GuildInfo>((GuildListWin::GuildInfo *)_Mid, (GuildListWin::GuildInfo *)_First);
  if ( GuildAcademySelectWin::Order::operator()(_Last, _Mid) )
    std::swap<GTRequestListWin::GuildInfo>((GuildListWin::GuildInfo *)_Last, (GuildListWin::GuildInfo *)_Mid);
  if ( GuildAcademySelectWin::Order::operator()(_Mid, _First) )
    std::swap<GTRequestListWin::GuildInfo>((GuildListWin::GuildInfo *)_Mid, (GuildListWin::GuildInfo *)_First);
}

//----- (006F09D0) --------------------------------------------------------
void __cdecl std::_Adjust_heap<GuildAcademySelectWin::GuildInfo *,int,GuildAcademySelectWin::GuildInfo,GuildAcademySelectWin::Order>(GuildAcademySelectWin::GuildInfo *_First, int _Hole, int _Bottom, GuildAcademySelectWin::GuildInfo *_Val)
{
  int v4; // ebx@1
  int v5; // esi@1
  bool v6; // zf@1
  GuildAcademySelectWin::GuildInfo *v7; // ebx@2
  unsigned int v8; // eax@2
  unsigned int v9; // ecx@2
  int v10; // edi@2
  unsigned int v11; // eax@4
  unsigned int v12; // ecx@4
  bool v13; // cf@4
  const char *v14; // eax@7
  unsigned int v15; // eax@10
  bool v16; // al@12
  GuildAcademySelectWin::GuildInfo *v17; // edi@17
  GuildAcademySelectWin::GuildInfo *v18; // ebx@17
  GuildAcademySelectWin::GuildInfo *v19; // esi@20
  GuildAcademySelectWin::GuildInfo *v20; // edi@20
  int _Top; // [sp+Ch] [bp-4h]@1

  v4 = _Bottom;
  v5 = 2 * _Hole + 2;
  _Top = _Hole;
  v6 = v5 == _Bottom;
  if ( v5 < _Bottom )
  {
    while ( 1 )
    {
      v7 = &_First[v5];
      v8 = v7->m_unGuildAcademy;
      v9 = v7[-1].m_unGuildAcademy;
      v10 = (int)&v7[-1];
      if ( v8 < v9 )
        goto LABEL_17;
      if ( v8 != v9 )
        goto LABEL_16;
      v11 = v7->m_unGuildMember;
      v12 = *(_DWORD *)(v10 + 56);
      v13 = v12 < v11;
      if ( v12 != v11 )
        goto LABEL_14;
      if ( v7->m_unGuildGraduates != *(_DWORD *)(v10 + 64) )
        break;
      v14 = (const char *)(*(_DWORD *)(v10 + 20) < 0x10u ? &v7[-1] : *(_DWORD *)v10);
      if ( std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
             &_First[v5].m_strGuildName,
             0,
             v7->m_strGuildName._Mysize,
             v14,
             *(_DWORD *)(v10 + 16)) >= 0 )
        break;
      v15 = *(_DWORD *)(v10 + 16);
      if ( *(_DWORD *)(v10 + 20) >= 0x10u )
        v10 = *(_DWORD *)v10;
      v16 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
              &v7->m_strGuildName,
              0,
              v7->m_strGuildName._Mysize,
              (const char *)v10,
              v15) != 0;
LABEL_15:
      if ( v16 )
LABEL_16:
        --v5;
LABEL_17:
      v17 = &_First[v5];
      v18 = &_First[_Hole];
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &_First[_Hole].m_strGuildName,
        &_First[v5].m_strGuildName,
        0,
        0xFFFFFFFF);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &v18->m_MasterName,
        &v17->m_MasterName,
        0,
        0xFFFFFFFF);
      v18->m_unGuildMember = v17->m_unGuildMember;
      _Hole = v5;
      v18->m_unGuildAcademy = v17->m_unGuildAcademy;
      v5 = 2 * v5 + 2;
      v18->m_unGuildGraduates = v17->m_unGuildGraduates;
      if ( v5 >= _Bottom )
      {
        v4 = _Bottom;
        v6 = v5 == _Bottom;
        goto LABEL_19;
      }
    }
    v13 = *(_DWORD *)(v10 + 64) < v7->m_unGuildGraduates;
LABEL_14:
    v16 = v13;
    goto LABEL_15;
  }
LABEL_19:
  if ( v6 )
  {
    v19 = &_First[v4 - 1];
    v20 = &_First[_Hole];
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &_First[_Hole].m_strGuildName,
      &v19->m_strGuildName,
      0,
      0xFFFFFFFF);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &v20->m_MasterName,
      &v19->m_MasterName,
      0,
      0xFFFFFFFF);
    v20->m_unGuildMember = v19->m_unGuildMember;
    v20->m_unGuildAcademy = v19->m_unGuildAcademy;
    v20->m_unGuildGraduates = v19->m_unGuildGraduates;
    _Hole = v4 - 1;
  }
  std::_Push_heap<GuildAcademySelectWin::GuildInfo *,int,GuildAcademySelectWin::GuildInfo,GuildAcademySelectWin::Order>(
    _First,
    _Hole,
    _Top,
    _Val);
}

//----- (006F0B40) --------------------------------------------------------
void __cdecl std::_Median<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::Order>(GuildAcademySelectWin::GuildInfo *_First, GuildAcademySelectWin::GuildInfo *_Mid, GuildAcademySelectWin::GuildInfo *_Last)
{
  signed int v3; // eax@1
  int v4; // eax@2
  int v5; // ebx@2
  GuildAcademySelectWin::GuildInfo *v6; // edx@2
  unsigned int v7; // esi@2
  GuildAcademySelectWin::GuildInfo *v8; // ST30_4@2
  GuildAcademySelectWin::GuildInfo *_Firsta; // [sp+Ch] [bp+8h]@2

  v3 = _Last - _First;
  if ( v3 <= 40 )
  {
    std::_Med3<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::Order>(_First, _Mid, _Last);
  }
  else
  {
    v4 = (v3 + 1) / 8;
    v5 = 136 * v4;
    v6 = &_First[2 * v4];
    v7 = 68 * v4;
    v8 = _First;
    _Firsta = &_First[v4];
    std::_Med3<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::Order>(v8, _Firsta, v6);
    std::_Med3<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::Order>(
      &_Mid[-v7 / 0x44],
      _Mid,
      &_Mid[v7 / 0x44]);
    std::_Med3<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::Order>(
      &_Last[-v5 / 0x44u],
      &_Last[-v7 / 0x44],
      _Last);
    std::_Med3<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::Order>(_Firsta, _Mid, &_Last[-v7 / 0x44]);
  }
}

//----- (006F0C00) --------------------------------------------------------
void __cdecl std::_Make_heap<GuildAcademySelectWin::GuildInfo *,int,GuildAcademySelectWin::GuildInfo,GuildAcademySelectWin::Order>(GuildAcademySelectWin::GuildInfo *_First, GuildAcademySelectWin::GuildInfo *_Last)
{
  int v2; // edi@1
  char *v3; // esi@2
  unsigned int v4; // ecx@3
  unsigned int v5; // edx@3
  signed int _Bottom; // [sp+10h] [bp-5Ch]@1
  GuildAcademySelectWin::GuildInfo _Val; // [sp+18h] [bp-54h]@3
  int v8; // [sp+68h] [bp-4h]@3

  _Bottom = _Last - _First;
  v2 = _Bottom / 2;
  if ( _Bottom / 2 > 0 )
  {
    v3 = (char *)&_First[v2].m_unGuildMember;
    do
    {
      v3 -= 68;
      --v2;
      _Val.m_strGuildName._Myres = 15;
      _Val.m_strGuildName._Mysize = 0;
      _Val.m_strGuildName._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &_Val.m_strGuildName,
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v3 - 2,
        0,
        0xFFFFFFFF);
      v8 = 0;
      _Val.m_MasterName._Myres = 15;
      _Val.m_MasterName._Mysize = 0;
      _Val.m_MasterName._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        &_Val.m_MasterName,
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v3 - 1,
        0,
        0xFFFFFFFF);
      v4 = *((_DWORD *)v3 + 1);
      v5 = *((_DWORD *)v3 + 2);
      _Val.m_unGuildMember = *(_DWORD *)v3;
      _Val.m_unGuildAcademy = v4;
      _Val.m_unGuildGraduates = v5;
      v8 = 1;
      std::_Adjust_heap<GuildAcademySelectWin::GuildInfo *,int,GuildAcademySelectWin::GuildInfo,GuildAcademySelectWin::Order>(
        _First,
        v2,
        _Bottom,
        &_Val);
      v8 = -1;
      if ( _Val.m_MasterName._Myres >= 0x10 )
        operator delete(_Val.m_MasterName._Bx._Ptr);
      _Val.m_MasterName._Myres = 15;
      _Val.m_MasterName._Mysize = 0;
      _Val.m_MasterName._Bx._Buf[0] = 0;
      if ( _Val.m_strGuildName._Myres >= 0x10 )
        operator delete(_Val.m_strGuildName._Bx._Ptr);
    }
    while ( v2 > 0 );
  }
}

//----- (006F0D40) --------------------------------------------------------
void __cdecl std::_Insertion_sort1<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::Order,GuildAcademySelectWin::GuildInfo>(GuildAcademySelectWin::GuildInfo *_First, GuildAcademySelectWin::GuildInfo *_Last)
{
  GuildListWin::GuildInfo *v2; // esi@1
  GuildAcademySelectWin::GuildInfo *v3; // edi@2
  int v4; // ebx@3
  unsigned int v5; // edx@3
  unsigned int v6; // ecx@3
  unsigned int v7; // eax@3
  unsigned int v8; // eax@3
  unsigned int v9; // eax@5
  bool v10; // cf@5
  unsigned int v11; // ecx@7
  const char *v12; // edx@8
  const char *v13; // eax@12
  int v14; // eax@14
  unsigned int v15; // ecx@14
  bool v16; // sf@14
  unsigned int v17; // eax@15
  const char *v18; // edx@19
  const char *v19; // eax@23
  int v20; // eax@25
  bool v21; // zf@25
  unsigned int v22; // eax@26
  bool v23; // al@27
  unsigned int v24; // edx@34
  unsigned int v25; // eax@34
  int v26; // esi@35
  unsigned int v27; // eax@36
  unsigned int v28; // eax@38
  bool v29; // cf@38
  const char **v30; // edi@40
  const char *v31; // edx@41
  unsigned int v32; // ecx@43
  const char *v33; // eax@45
  int v34; // eax@47
  unsigned int v35; // ecx@47
  bool v36; // sf@47
  unsigned int v37; // eax@48
  const char *v38; // edx@52
  const char *v39; // eax@56
  int v40; // eax@58
  bool v41; // zf@58
  unsigned int v42; // eax@59
  bool v43; // al@60
  unsigned int v44; // ecx@68
  unsigned int v45; // edx@68
  GuildAcademySelectWin::GuildInfo *_Next; // [sp+14h] [bp-58h]@2
  GuildAcademySelectWin::GuildInfo _Val; // [sp+18h] [bp-54h]@3
  int v48; // [sp+68h] [bp-4h]@3

  v2 = (GuildListWin::GuildInfo *)_First;
  if ( _First == _Last )
    return;
  v3 = _First + 1;
  _Next = _First + 1;
  if ( &_First[1] == _Last )
    return;
  do
  {
    v4 = (int)v3;
    _Val.m_strGuildName._Myres = 15;
    _Val.m_strGuildName._Mysize = 0;
    _Val.m_strGuildName._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &_Val.m_strGuildName,
      &v3->m_strGuildName,
      0,
      0xFFFFFFFF);
    v48 = 0;
    _Val.m_MasterName._Mysize = 0;
    _Val.m_MasterName._Bx._Buf[0] = 0;
    _Val.m_MasterName._Myres = 15;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      &_Val.m_MasterName,
      &v3->m_MasterName,
      0,
      0xFFFFFFFF);
    v5 = v3->m_unGuildMember;
    v6 = v3->m_unGuildAcademy;
    v7 = v3->m_unGuildGraduates;
    _Val.m_unGuildMember = v3->m_unGuildMember;
    _Val.m_unGuildAcademy = v6;
    _Val.m_unGuildGraduates = v7;
    v8 = v2->m_unGuildGrade;
    v48 = 1;
    if ( v6 >= v8 )
    {
      if ( v6 != v8 )
        goto LABEL_34;
      v9 = v2->m_unGuildType;
      v10 = v9 < v5;
      if ( v9 == v5 )
      {
        if ( _Val.m_unGuildGraduates == v2->m_unGuildTotalMember )
        {
          v11 = v2->m_strGuildName._Mysize;
          if ( v2->m_strGuildName._Myres < 0x10 )
            v12 = (const char *)v2;
          else
            v12 = v2->m_strGuildName._Bx._Ptr;
          if ( _Val.m_strGuildName._Mysize < v11 )
            v11 = _Val.m_strGuildName._Mysize;
          v13 = _Val.m_strGuildName._Bx._Ptr;
          if ( _Val.m_strGuildName._Myres < 0x10 )
            v13 = (const char *)&_Val;
          v14 = std::char_traits<char>::compare(v13, v12, v11);
          v15 = _Val.m_strGuildName._Mysize;
          v16 = v14 < 0;
          if ( !v14 )
          {
            v17 = v2->m_strGuildName._Mysize;
            if ( _Val.m_strGuildName._Mysize < v17 )
            {
LABEL_18:
              if ( v2->m_strGuildName._Myres < 0x10 )
                v18 = (const char *)v2;
              else
                v18 = v2->m_strGuildName._Bx._Ptr;
              if ( _Val.m_strGuildName._Mysize >= v2->m_strGuildName._Mysize )
                v15 = v2->m_strGuildName._Mysize;
              v19 = _Val.m_strGuildName._Bx._Ptr;
              if ( _Val.m_strGuildName._Myres < 0x10 )
                v19 = (const char *)&_Val;
              v20 = std::char_traits<char>::compare(v19, v18, v15);
              v21 = v20 == 0;
              if ( !v20 )
              {
                v22 = v2->m_strGuildName._Mysize;
                if ( _Val.m_strGuildName._Mysize < v22 )
                {
                  v6 = _Val.m_unGuildAcademy;
                  v5 = _Val.m_unGuildMember;
                  v23 = 1;
                  goto LABEL_33;
                }
                v21 = _Val.m_strGuildName._Mysize == v22;
              }
              v6 = _Val.m_unGuildAcademy;
              v5 = _Val.m_unGuildMember;
              v23 = !v21;
LABEL_33:
              if ( v23 )
              {
LABEL_34:
                std::_Move_backward<GuildListWin::GuildInfo *,GuildListWin::GuildInfo *>(
                  v2,
                  (GuildListWin::GuildInfo *)v3,
                  (GuildListWin::GuildInfo *)&v3[1]);
                std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                  &v2->m_strGuildName,
                  &_Val.m_strGuildName,
                  0,
                  0xFFFFFFFF);
                std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
                  &v2->m_MasterName,
                  &_Val.m_MasterName,
                  0,
                  0xFFFFFFFF);
                v24 = _Val.m_unGuildAcademy;
                v25 = _Val.m_unGuildGraduates;
                v2->m_unGuildType = _Val.m_unGuildMember;
                v2->m_unGuildGrade = v24;
                v2->m_unGuildTotalMember = v25;
                goto LABEL_69;
              }
              goto LABEL_35;
            }
            v16 = (_Val.m_strGuildName._Mysize != v17) < 0;
          }
          if ( v16 )
            goto LABEL_18;
          v6 = _Val.m_unGuildAcademy;
          v5 = _Val.m_unGuildMember;
        }
        v10 = v2->m_unGuildTotalMember < _Val.m_unGuildGraduates;
      }
      v23 = v10;
      goto LABEL_33;
    }
LABEL_35:
    v26 = (int)&v3->m_strGuildName._Myres;
    while ( 1 )
    {
      v27 = *(_DWORD *)(v26 - 28);
      v26 -= 68;
      if ( v6 < v27 )
        break;
      if ( v6 != v27 )
        goto LABEL_67;
      v28 = *(_DWORD *)(v26 + 36);
      v29 = v28 < v5;
      if ( v28 != v5 )
        goto LABEL_65;
      if ( _Val.m_unGuildGraduates != *(_DWORD *)(v26 + 44) )
        goto LABEL_64;
      v30 = (const char **)(v26 - 20);
      if ( *(_DWORD *)v26 < 0x10u )
        v31 = (const char *)(v26 - 20);
      else
        v31 = *v30;
      v32 = _Val.m_strGuildName._Mysize;
      if ( _Val.m_strGuildName._Mysize >= *(_DWORD *)(v26 - 4) )
        v32 = *(_DWORD *)(v26 - 4);
      v33 = _Val.m_strGuildName._Bx._Ptr;
      if ( _Val.m_strGuildName._Myres < 0x10 )
        v33 = (const char *)&_Val;
      v34 = std::char_traits<char>::compare(v33, v31, v32);
      v35 = _Val.m_strGuildName._Mysize;
      v36 = v34 < 0;
      if ( !v34 )
      {
        v37 = *(_DWORD *)(v26 - 4);
        if ( _Val.m_strGuildName._Mysize < v37 )
          goto LABEL_51;
        v36 = (_Val.m_strGuildName._Mysize != v37) < 0;
      }
      if ( !v36 )
      {
        v3 = _Next;
LABEL_64:
        v29 = *(_DWORD *)(v26 + 44) < _Val.m_unGuildGraduates;
LABEL_65:
        v43 = v29;
        goto LABEL_66;
      }
LABEL_51:
      if ( *(_DWORD *)v26 < 0x10u )
        v38 = (const char *)(v26 - 20);
      else
        v38 = *v30;
      if ( _Val.m_strGuildName._Mysize >= *(_DWORD *)(v26 - 4) )
        v35 = *(_DWORD *)(v26 - 4);
      v39 = _Val.m_strGuildName._Bx._Ptr;
      if ( _Val.m_strGuildName._Myres < 0x10 )
        v39 = (const char *)&_Val;
      v40 = std::char_traits<char>::compare(v39, v38, v35);
      v41 = v40 == 0;
      if ( !v40 )
      {
        v42 = *(_DWORD *)(v26 - 4);
        if ( _Val.m_strGuildName._Mysize < v42 )
        {
          v3 = _Next;
          v43 = 1;
          goto LABEL_66;
        }
        v41 = _Val.m_strGuildName._Mysize == v42;
      }
      v3 = _Next;
      v43 = !v41;
LABEL_66:
      if ( !v43 )
        break;
LABEL_67:
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v4,
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)(v26 - 20),
        0,
        0xFFFFFFFF);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)(v4 + 28),
        (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)(v26 + 8),
        0,
        0xFFFFFFFF);
      *(_DWORD *)(v4 + 56) = *(_DWORD *)(v26 + 36);
      v6 = _Val.m_unGuildAcademy;
      *(_DWORD *)(v4 + 60) = *(_DWORD *)(v26 + 40);
      v5 = _Val.m_unGuildMember;
      *(_DWORD *)(v4 + 64) = *(_DWORD *)(v26 + 44);
      v4 = v26 - 20;
      v3 = _Next;
    }
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v4,
      &_Val.m_strGuildName,
      0,
      0xFFFFFFFF);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)(v4 + 28),
      &_Val.m_MasterName,
      0,
      0xFFFFFFFF);
    v44 = _Val.m_unGuildAcademy;
    v45 = _Val.m_unGuildGraduates;
    v2 = (GuildListWin::GuildInfo *)_First;
    *(_DWORD *)(v4 + 56) = _Val.m_unGuildMember;
    *(_DWORD *)(v4 + 60) = v44;
    *(_DWORD *)(v4 + 64) = v45;
LABEL_69:
    v48 = -1;
    if ( _Val.m_MasterName._Myres >= 0x10 )
      operator delete(_Val.m_MasterName._Bx._Ptr);
    _Val.m_MasterName._Myres = 15;
    _Val.m_MasterName._Mysize = 0;
    _Val.m_MasterName._Bx._Buf[0] = 0;
    if ( _Val.m_strGuildName._Myres >= 0x10 )
      operator delete(_Val.m_strGuildName._Bx._Ptr);
    ++v3;
    _Next = v3;
  }
  while ( v3 != _Last );
}

//----- (006F10E0) --------------------------------------------------------
void __cdecl std::_Pop_heap_0<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::GuildInfo,GuildAcademySelectWin::Order>(GuildAcademySelectWin::GuildInfo *_First, GuildAcademySelectWin::GuildInfo *_Last)
{
  GuildAcademySelectWin::GuildInfo *v2; // edi@1
  GuildAcademySelectWin::GuildInfo _Val; // [sp+10h] [bp-54h]@1
  int v4; // [sp+60h] [bp-4h]@1

  v2 = _Last - 1;
  GuildListWin::GuildInfo::GuildInfo((GuildListWin::GuildInfo *)&_Val, (GuildListWin::GuildInfo *)&_Last[-1]);
  v4 = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_Last[-1].m_strGuildName,
    &_First->m_strGuildName,
    0,
    0xFFFFFFFF);
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &_Last[-1].m_MasterName,
    &_First->m_MasterName,
    0,
    0xFFFFFFFF);
  v2->m_unGuildMember = _First->m_unGuildMember;
  v2->m_unGuildAcademy = _First->m_unGuildAcademy;
  v2->m_unGuildGraduates = _First->m_unGuildGraduates;
  std::_Adjust_heap<GuildAcademySelectWin::GuildInfo *,int,GuildAcademySelectWin::GuildInfo,GuildAcademySelectWin::Order>(
    _First,
    0,
    ((char *)_Last - (char *)_First - 68) / 68,
    &_Val);
  if ( _Val.m_MasterName._Myres >= 0x10 )
    operator delete(_Val.m_MasterName._Bx._Ptr);
  _Val.m_MasterName._Myres = 15;
  _Val.m_MasterName._Mysize = 0;
  _Val.m_MasterName._Bx._Buf[0] = 0;
  if ( _Val.m_strGuildName._Myres >= 0x10 )
    operator delete(_Val.m_strGuildName._Bx._Ptr);
}

//----- (006F11E0) --------------------------------------------------------
std::pair<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::GuildInfo *> *__cdecl std::_Unguarded_partition<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::Order>(std::pair<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::GuildInfo *> *result, GuildAcademySelectWin::GuildInfo *_First, GuildAcademySelectWin::GuildInfo *_Last)
{
  GuildAcademySelectWin::GuildInfo *v3; // esi@1
  unsigned int v4; // ebx@1
  unsigned int v5; // edi@1
  int v6; // esi@2
  unsigned int v7; // eax@3
  unsigned int v8; // ecx@3
  unsigned int v9; // eax@5
  unsigned int v10; // ecx@5
  bool v11; // cf@5
  const char *v12; // eax@8
  const char *v13; // eax@12
  bool v14; // al@14
  unsigned int v15; // eax@19
  unsigned int v16; // ecx@19
  unsigned int v17; // eax@21
  unsigned int v18; // ecx@21
  bool v19; // cf@21
  const char *v20; // edi@23
  const char *v21; // eax@24
  int v22; // eax@29
  bool v23; // al@29
  unsigned int v24; // eax@37
  unsigned int v25; // ecx@37
  unsigned int v26; // eax@39
  unsigned int v27; // ecx@39
  bool v28; // cf@39
  const char *v29; // eax@42
  const char *v30; // eax@46
  bool v31; // al@48
  unsigned int v32; // eax@52
  unsigned int v33; // ecx@52
  unsigned int v34; // eax@54
  unsigned int v35; // ecx@54
  bool v36; // cf@54
  const char *v37; // ecx@57
  const char *v38; // ecx@61
  bool v39; // al@63
  unsigned int v40; // eax@71
  unsigned int v41; // ecx@71
  const char *v42; // edx@73
  unsigned int v43; // eax@73
  unsigned int v44; // ecx@73
  bool v45; // cf@73
  unsigned int v46; // edi@75
  unsigned int v47; // esi@77
  unsigned int v48; // ecx@77
  const char *v49; // eax@80
  int v50; // eax@82
  bool v51; // sf@82
  const char *v52; // edx@86
  unsigned int v53; // ecx@88
  const char *v54; // eax@91
  int v55; // eax@93
  bool v56; // zf@93
  bool v57; // al@95
  unsigned int v58; // eax@103
  unsigned int v59; // ecx@103
  bool v60; // cf@103
  const char *v61; // edx@105
  unsigned int v62; // ebx@105
  unsigned int v63; // edi@105
  unsigned int v64; // esi@107
  unsigned int v65; // ecx@107
  const char *v66; // eax@109
  int v67; // eax@111
  bool v68; // sf@111
  const char *v69; // eax@116
  bool v70; // al@118
  GuildListWin::GuildInfo *v71; // ST08_4@122
  GuildListWin::GuildInfo *v72; // edi@124
  bool v73; // zf@124
  unsigned int v74; // eax@125
  unsigned int v75; // ecx@125
  unsigned int v76; // eax@127
  unsigned int v77; // ecx@127
  bool v78; // cf@127
  unsigned int v79; // edx@129
  const char *v80; // ecx@130
  void *v81; // esi@135
  signed int v82; // eax@141
  int v83; // eax@148
  bool v84; // sf@150
  unsigned int v85; // esi@151
  unsigned int v86; // eax@151
  const char *v87; // edx@155
  unsigned int v88; // ecx@157
  unsigned int v89; // esi@157
  const char *v90; // eax@160
  int v91; // eax@162
  bool v92; // zf@162
  unsigned int v93; // eax@163
  bool v94; // al@164
  unsigned int v95; // ecx@170
  unsigned int v96; // eax@170
  unsigned int v97; // eax@172
  unsigned int v98; // ecx@172
  bool v99; // cf@172
  const char *v100; // edx@174
  unsigned int v101; // edi@174
  unsigned int v102; // esi@176
  unsigned int v103; // ecx@176
  const char *v104; // eax@179
  int v105; // eax@181
  bool v106; // sf@181
  const char *v107; // edx@185
  unsigned int v108; // ecx@187
  const char *v109; // eax@190
  int v110; // eax@192
  bool v111; // zf@192
  bool v112; // al@194
  GuildListWin::GuildInfo *v113; // esi@204
  GuildListWin::GuildInfo *v114; // ST08_4@208
  GuildListWin::GuildInfo *v115; // edi@209
  std::pair<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::GuildInfo *> *v116; // eax@214
  GuildAcademySelectWin::GuildInfo *_Glast; // [sp+Ch] [bp-10h]@69
  GuildAcademySelectWin::GuildInfo *_Plast; // [sp+10h] [bp-Ch]@1
  GuildAcademySelectWin::GuildInfo *_Pfirst; // [sp+14h] [bp-8h]@1
  GuildAcademySelectWin::GuildInfo *_Pfirsta; // [sp+14h] [bp-8h]@125
  GuildAcademySelectWin::GuildInfo *_Gfirst; // [sp+18h] [bp-4h]@69

  v3 = &_First[(_Last - _First) / 2];
  std::_Median<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::Order>(
    _First,
    &_First[(_Last - _First) / 2],
    _Last - 1);
  v4 = (unsigned int)v3;
  v5 = (unsigned int)&v3[1];
  _Pfirst = &_First[(_Last - _First) / 2];
  _Plast = v3 + 1;
  if ( _First < v3 )
  {
    v6 = (int)&v3[-1].m_strGuildName._Mysize;
    while ( 1 )
    {
      v7 = *(_DWORD *)(v6 + 44);
      v8 = *(_DWORD *)(v6 + 112);
      if ( v7 < v8 )
        goto LABEL_19;
      if ( v7 != v8 )
        goto LABEL_35;
      v9 = *(_DWORD *)(v6 + 40);
      v10 = *(_DWORD *)(v6 + 108);
      v11 = v10 < v9;
      if ( v10 != v9 )
        goto LABEL_17;
      if ( *(_DWORD *)(v6 + 48) != *(_DWORD *)(v6 + 116) )
        goto LABEL_16;
      v12 = (const char *)(*(_DWORD *)(v6 + 72) < 0x10u ? v4 : *(_DWORD *)v4);
      if ( std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
             (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)(v6 - 16),
             0,
             *(_DWORD *)v6,
             v12,
             *(_DWORD *)(v6 + 68)) >= 0 )
        break;
      if ( *(_DWORD *)(v6 + 72) < 0x10u )
        v13 = (const char *)v4;
      else
        v13 = *(const char **)v4;
      v5 = (unsigned int)_Plast;
      v14 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
              (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)(v6 - 16),
              0,
              *(_DWORD *)v6,
              v13,
              *(_DWORD *)(v6 + 68)) != 0;
LABEL_18:
      if ( v14 )
        goto LABEL_35;
LABEL_19:
      v15 = *(_DWORD *)(v6 + 112);
      v16 = *(_DWORD *)(v6 + 44);
      if ( v15 >= v16 )
      {
        if ( v15 != v16 )
          goto LABEL_35;
        v17 = *(_DWORD *)(v6 + 108);
        v18 = *(_DWORD *)(v6 + 40);
        v19 = v18 < v17;
        if ( v18 == v17 )
        {
          if ( *(_DWORD *)(v6 + 116) == *(_DWORD *)(v6 + 48) )
          {
            v20 = (const char *)(v6 - 16);
            if ( *(_DWORD *)(v6 + 4) < 0x10u )
              v21 = (const char *)(v6 - 16);
            else
              v21 = *(const char **)v20;
            if ( std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
                   (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v4,
                   0,
                   *(_DWORD *)(v6 + 68),
                   v21,
                   *(_DWORD *)v6) < 0 )
            {
              if ( *(_DWORD *)(v6 + 4) >= 0x10u )
                v20 = *(const char **)v20;
              v22 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
                      (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v4,
                      0,
                      *(_DWORD *)(v6 + 68),
                      v20,
                      *(_DWORD *)v6);
              v5 = (unsigned int)_Plast;
              v23 = v22 != 0;
LABEL_33:
              if ( v23 )
                goto LABEL_35;
              goto LABEL_34;
            }
            v5 = (unsigned int)_Plast;
          }
          v19 = *(_DWORD *)(v6 + 48) < *(_DWORD *)(v6 + 116);
        }
        v23 = v19;
        goto LABEL_33;
      }
LABEL_34:
      v4 -= 68;
      v6 -= 68;
      if ( (unsigned int)_First >= v4 )
      {
LABEL_35:
        _Pfirst = (GuildAcademySelectWin::GuildInfo *)v4;
        goto LABEL_36;
      }
    }
    v5 = (unsigned int)_Plast;
LABEL_16:
    v11 = *(_DWORD *)(v6 + 116) < *(_DWORD *)(v6 + 48);
LABEL_17:
    v14 = v11;
    goto LABEL_18;
  }
LABEL_36:
  if ( v5 < (unsigned int)_Last )
  {
    while ( 1 )
    {
      v24 = *(_DWORD *)(v5 + 60);
      v25 = *(_DWORD *)(v4 + 60);
      if ( v24 < v25 )
        goto LABEL_52;
      if ( v24 != v25 )
        goto LABEL_68;
      v26 = *(_DWORD *)(v5 + 56);
      v27 = *(_DWORD *)(v4 + 56);
      v28 = v27 < v26;
      if ( v27 != v26 )
        goto LABEL_50;
      if ( *(_DWORD *)(v5 + 64) != *(_DWORD *)(v4 + 64) )
        break;
      v29 = (const char *)(*(_DWORD *)(v4 + 20) < 0x10u ? v4 : *(_DWORD *)v4);
      if ( std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
             (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v5,
             0,
             *(_DWORD *)(v5 + 16),
             v29,
             *(_DWORD *)(v4 + 16)) >= 0 )
        break;
      if ( *(_DWORD *)(v4 + 20) < 0x10u )
        v30 = (const char *)v4;
      else
        v30 = *(const char **)v4;
      v31 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
              (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v5,
              0,
              *(_DWORD *)(v5 + 16),
              v30,
              *(_DWORD *)(v4 + 16)) != 0;
LABEL_51:
      if ( v31 )
        goto LABEL_68;
LABEL_52:
      v32 = *(_DWORD *)(v4 + 60);
      v33 = *(_DWORD *)(v5 + 60);
      if ( v32 >= v33 )
      {
        if ( v32 != v33 )
          goto LABEL_68;
        v34 = *(_DWORD *)(v4 + 56);
        v35 = *(_DWORD *)(v5 + 56);
        v36 = v35 < v34;
        if ( v35 == v34 )
        {
          if ( *(_DWORD *)(v4 + 64) == *(_DWORD *)(v5 + 64) )
          {
            v37 = (const char *)(*(_DWORD *)(v5 + 20) < 0x10u ? v5 : *(_DWORD *)v5);
            if ( std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
                   (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v4,
                   0,
                   *(_DWORD *)(v4 + 16),
                   v37,
                   *(_DWORD *)(v5 + 16)) < 0 )
            {
              if ( *(_DWORD *)(v5 + 20) < 0x10u )
                v38 = (const char *)v5;
              else
                v38 = *(const char **)v5;
              v39 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
                      (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v4,
                      0,
                      *(_DWORD *)(v4 + 16),
                      v38,
                      *(_DWORD *)(v5 + 16)) != 0;
LABEL_66:
              if ( v39 )
                goto LABEL_68;
              goto LABEL_67;
            }
          }
          v36 = *(_DWORD *)(v5 + 64) < *(_DWORD *)(v4 + 64);
        }
        v39 = v36;
        goto LABEL_66;
      }
LABEL_67:
      v5 += 68;
      if ( v5 >= (unsigned int)_Last )
      {
LABEL_68:
        _Plast = (GuildAcademySelectWin::GuildInfo *)v5;
        goto LABEL_69;
      }
    }
    v28 = *(_DWORD *)(v4 + 64) < *(_DWORD *)(v5 + 64);
LABEL_50:
    v31 = v28;
    goto LABEL_51;
  }
LABEL_69:
  _Gfirst = (GuildAcademySelectWin::GuildInfo *)v5;
  _Glast = (GuildAcademySelectWin::GuildInfo *)v4;
  while ( 2 )
  {
    while ( 2 )
    {
      if ( _Gfirst < _Last )
      {
        while ( 1 )
        {
          v40 = *(_DWORD *)(v4 + 60);
          v41 = _Gfirst->m_unGuildAcademy;
          if ( v40 < v41 )
          {
LABEL_101:
            if ( _Gfirst->m_unGuildAcademy < *(_DWORD *)(v4 + 60) )
              goto LABEL_122;
            if ( _Gfirst->m_unGuildAcademy != *(_DWORD *)(v4 + 60) )
              goto LABEL_124;
            v58 = _Gfirst->m_unGuildMember;
            v59 = *(_DWORD *)(v4 + 56);
            v60 = v59 < v58;
            if ( v59 == v58 )
            {
              if ( _Gfirst->m_unGuildGraduates == *(_DWORD *)(v4 + 64) )
              {
                v61 = (const char *)_Pfirst;
                v62 = _Pfirst->m_strGuildName._Myres;
                v63 = _Pfirst->m_strGuildName._Mysize;
                if ( v62 >= 0x10 )
                  v61 = _Pfirst->m_strGuildName._Bx._Ptr;
                v64 = _Gfirst->m_strGuildName._Mysize;
                v65 = v64;
                if ( v64 >= v63 )
                  v65 = _Pfirst->m_strGuildName._Mysize;
                v66 = (const char *)_Gfirst;
                if ( _Gfirst->m_strGuildName._Myres >= 0x10 )
                  v66 = _Gfirst->m_strGuildName._Bx._Ptr;
                v67 = std::char_traits<char>::compare(v66, v61, v65);
                v68 = v67 < 0;
                if ( !v67 )
                {
                  if ( v64 >= v63 )
                  {
                    LOBYTE(v67) = v64 != v63;
                    v68 = v67 < 0;
                    goto LABEL_114;
                  }
LABEL_115:
                  if ( v62 < 0x10 )
                    v69 = (const char *)_Pfirst;
                  else
                    v69 = _Pfirst->m_strGuildName._Bx._Ptr;
                  v70 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
                          &_Gfirst->m_strGuildName,
                          0,
                          v64,
                          v69,
                          v63) != 0;
LABEL_121:
                  v4 = (unsigned int)_Pfirst;
                  if ( v70 )
                    goto LABEL_124;
LABEL_122:
                  v71 = (GuildListWin::GuildInfo *)_Plast;
                  ++_Plast;
                  std::swap<GTRequestListWin::GuildInfo>(v71, (GuildListWin::GuildInfo *)_Gfirst);
                  goto LABEL_123;
                }
LABEL_114:
                if ( v68 )
                  goto LABEL_115;
              }
              v60 = _Pfirst->m_unGuildGraduates < _Gfirst->m_unGuildGraduates;
            }
            v70 = v60;
            goto LABEL_121;
          }
          if ( v40 == v41 )
            break;
LABEL_123:
          ++_Gfirst;
          if ( _Gfirst >= _Last )
            goto LABEL_124;
        }
        v42 = (const char *)_Gfirst;
        v43 = *(_DWORD *)(v4 + 56);
        v44 = _Gfirst->m_unGuildMember;
        v45 = v44 < v43;
        if ( v44 == v43 )
        {
          if ( *(_DWORD *)(v4 + 64) == _Gfirst->m_unGuildGraduates )
          {
            v46 = _Gfirst->m_strGuildName._Mysize;
            if ( _Gfirst->m_strGuildName._Myres >= 0x10 )
              v42 = _Gfirst->m_strGuildName._Bx._Ptr;
            v47 = *(_DWORD *)(v4 + 16);
            v48 = v47;
            if ( v47 >= v46 )
              v48 = _Gfirst->m_strGuildName._Mysize;
            if ( *(_DWORD *)(v4 + 20) < 0x10u )
              v49 = (const char *)v4;
            else
              v49 = *(const char **)v4;
            v50 = std::char_traits<char>::compare(v49, v42, v48);
            v51 = v50 < 0;
            if ( !v50 )
            {
              if ( v47 < v46 )
              {
LABEL_86:
                v52 = (const char *)_Gfirst;
                if ( _Gfirst->m_strGuildName._Myres >= 0x10 )
                  v52 = _Gfirst->m_strGuildName._Bx._Ptr;
                v53 = v47;
                if ( v47 >= v46 )
                  v53 = v46;
                if ( *(_DWORD *)(v4 + 20) < 0x10u )
                  v54 = (const char *)v4;
                else
                  v54 = *(const char **)v4;
                v55 = std::char_traits<char>::compare(v54, v52, v53);
                v56 = v55 == 0;
                if ( !v55 )
                {
                  if ( v47 < v46 )
                  {
                    v57 = 1;
                    goto LABEL_100;
                  }
                  v56 = v47 == v46;
                }
                v57 = !v56;
LABEL_100:
                if ( !v57 )
                  goto LABEL_101;
                goto LABEL_123;
              }
              LOBYTE(v50) = v47 != v46;
              v51 = v50 < 0;
            }
            if ( v51 )
              goto LABEL_86;
          }
          v45 = _Gfirst->m_unGuildGraduates < *(_DWORD *)(v4 + 64);
        }
        v57 = v45;
        goto LABEL_100;
      }
LABEL_124:
      v72 = (GuildListWin::GuildInfo *)_Glast;
      v73 = _Glast == _First;
      if ( _Glast <= _First )
        goto LABEL_204;
      do
      {
        v74 = v72[-1].m_unGuildGrade;
        v75 = *(_DWORD *)(v4 + 60);
        --v72;
        _Pfirsta = (GuildAcademySelectWin::GuildInfo *)v72;
        if ( v74 < v75 )
          goto LABEL_170;
        if ( v74 != v75 )
          goto LABEL_202;
        v76 = v72->m_unGuildType;
        v77 = *(_DWORD *)(v4 + 56);
        v78 = v77 < v76;
        if ( v77 != v76 )
          goto LABEL_168;
        if ( v72->m_unGuildTotalMember != *(_DWORD *)(v4 + 64) )
          goto LABEL_167;
        v79 = *(_DWORD *)(v4 + 16);
        if ( *(_DWORD *)(v4 + 20) < 0x10u )
          v80 = (const char *)v4;
        else
          v80 = *(const char **)v4;
        if ( v72->m_strGuildName._Mysize < v79 )
          v79 = v72->m_strGuildName._Mysize;
        if ( v72->m_strGuildName._Myres < 0x10 )
          v81 = v72;
        else
          v81 = v72->m_strGuildName._Bx._Ptr;
        if ( v79 < 4 )
        {
LABEL_140:
          if ( !v79 )
            goto LABEL_149;
        }
        else
        {
          while ( *(_DWORD *)v81 == *(_DWORD *)v80 )
          {
            v79 -= 4;
            v80 += 4;
            v81 = (char *)v81 + 4;
            if ( v79 < 4 )
              goto LABEL_140;
          }
        }
        v82 = *(_BYTE *)v81 - *v80;
        if ( *(_BYTE *)v81 != *v80 )
          goto LABEL_148;
        if ( v79 > 1 )
        {
          v82 = *((_BYTE *)v81 + 1) - v80[1];
          if ( *((_BYTE *)v81 + 1) != v80[1] )
            goto LABEL_148;
          if ( v79 > 2 )
          {
            v82 = *((_BYTE *)v81 + 2) - v80[2];
            if ( *((_BYTE *)v81 + 2) != v80[2] )
              goto LABEL_148;
            if ( v79 > 3 )
            {
              v82 = *((_BYTE *)v81 + 3) - v80[3];
LABEL_148:
              v83 = (v82 >> 31) | 1;
              goto LABEL_150;
            }
          }
        }
LABEL_149:
        v83 = 0;
LABEL_150:
        v84 = v83 < 0;
        if ( !v83 )
        {
          v85 = *(_DWORD *)(v4 + 16);
          v86 = v72->m_strGuildName._Mysize;
          if ( v86 < v85 )
            goto LABEL_154;
          v84 = (v86 != v85) < 0;
        }
        if ( !v84 )
        {
LABEL_167:
          v78 = *(_DWORD *)(v4 + 64) < v72->m_unGuildTotalMember;
LABEL_168:
          v94 = v78;
          goto LABEL_169;
        }
LABEL_154:
        if ( *(_DWORD *)(v4 + 20) < 0x10u )
          v87 = (const char *)v4;
        else
          v87 = *(const char **)v4;
        v88 = *(_DWORD *)(v4 + 16);
        v89 = v72->m_strGuildName._Mysize;
        if ( v89 < v88 )
          v88 = v72->m_strGuildName._Mysize;
        if ( v72->m_strGuildName._Myres < 0x10 )
          v90 = (const char *)v72;
        else
          v90 = v72->m_strGuildName._Bx._Ptr;
        v91 = std::char_traits<char>::compare(v90, v87, v88);
        v92 = v91 == 0;
        if ( !v91 )
        {
          v93 = *(_DWORD *)(v4 + 16);
          if ( v89 < v93 )
          {
            v94 = 1;
            goto LABEL_169;
          }
          v92 = v89 == v93;
        }
        v94 = !v92;
LABEL_169:
        if ( v94 )
          goto LABEL_202;
LABEL_170:
        v95 = *(_DWORD *)(v4 + 60);
        v96 = v72->m_unGuildGrade;
        if ( v95 >= v96 )
        {
          if ( v95 != v96 )
            break;
          v97 = *(_DWORD *)(v4 + 56);
          v98 = v72->m_unGuildType;
          v99 = v98 < v97;
          if ( v98 == v97 )
          {
            if ( *(_DWORD *)(v4 + 64) == v72->m_unGuildTotalMember )
            {
              v100 = (const char *)v72;
              v101 = v72->m_strGuildName._Mysize;
              if ( _Pfirsta->m_strGuildName._Myres >= 0x10 )
                v100 = _Pfirsta->m_strGuildName._Bx._Ptr;
              v102 = *(_DWORD *)(v4 + 16);
              v103 = v102;
              if ( v102 >= v101 )
                v103 = _Pfirsta->m_strGuildName._Mysize;
              if ( *(_DWORD *)(v4 + 20) < 0x10u )
                v104 = (const char *)v4;
              else
                v104 = *(const char **)v4;
              v105 = std::char_traits<char>::compare(v104, v100, v103);
              v106 = v105 < 0;
              if ( !v105 )
              {
                if ( v102 < v101 )
                  goto LABEL_185;
                LOBYTE(v105) = v102 != v101;
                v106 = v105 < 0;
              }
              if ( v106 )
              {
LABEL_185:
                v107 = (const char *)_Pfirsta;
                if ( _Pfirsta->m_strGuildName._Myres >= 0x10 )
                  v107 = _Pfirsta->m_strGuildName._Bx._Ptr;
                v108 = v102;
                if ( v102 >= v101 )
                  v108 = v101;
                if ( *(_DWORD *)(v4 + 20) < 0x10u )
                  v109 = (const char *)v4;
                else
                  v109 = *(const char **)v4;
                v110 = std::char_traits<char>::compare(v109, v107, v108);
                v111 = v110 == 0;
                if ( !v110 )
                {
                  if ( v102 < v101 )
                  {
                    v112 = 1;
LABEL_199:
                    if ( v112 )
                      break;
                    v72 = (GuildListWin::GuildInfo *)_Pfirsta;
                    goto LABEL_201;
                  }
                  v111 = v102 == v101;
                }
                v112 = !v111;
                goto LABEL_199;
              }
            }
            v99 = _Pfirsta->m_unGuildGraduates < *(_DWORD *)(v4 + 64);
          }
          v112 = v99;
          goto LABEL_199;
        }
LABEL_201:
        v4 -= 68;
        std::swap<GTRequestListWin::GuildInfo>((GuildListWin::GuildInfo *)v4, v72);
LABEL_202:
        _Glast = (GuildAcademySelectWin::GuildInfo *)v72;
      }
      while ( _First < (GuildAcademySelectWin::GuildInfo *)v72 );
      v72 = (GuildListWin::GuildInfo *)_Glast;
      v73 = _Glast == _First;
      _Pfirst = (GuildAcademySelectWin::GuildInfo *)v4;
LABEL_204:
      v113 = (GuildListWin::GuildInfo *)_Gfirst;
      if ( !v73 )
      {
        v115 = v72 - 1;
        _Glast = (GuildAcademySelectWin::GuildInfo *)v115;
        if ( _Gfirst == _Last )
        {
          v4 -= 68;
          _Pfirst = (GuildAcademySelectWin::GuildInfo *)v4;
          if ( v115 != (GuildListWin::GuildInfo *)v4 )
            std::swap<GTRequestListWin::GuildInfo>(v115, (GuildListWin::GuildInfo *)v4);
          --_Plast;
          std::swap<GTRequestListWin::GuildInfo>((GuildListWin::GuildInfo *)v4, (GuildListWin::GuildInfo *)_Plast);
        }
        else
        {
          std::swap<GTRequestListWin::GuildInfo>((GuildListWin::GuildInfo *)_Gfirst, v115);
          ++_Gfirst;
        }
        continue;
      }
      break;
    }
    if ( _Gfirst != _Last )
    {
      if ( _Plast != _Gfirst )
        std::swap<GTRequestListWin::GuildInfo>((GuildListWin::GuildInfo *)v4, (GuildListWin::GuildInfo *)_Plast);
      v114 = (GuildListWin::GuildInfo *)v4;
      v4 += 68;
      ++_Plast;
      _Pfirst = (GuildAcademySelectWin::GuildInfo *)v4;
      ++_Gfirst;
      std::swap<GTRequestListWin::GuildInfo>(v114, v113);
      continue;
    }
    break;
  }
  v116 = result;
  result->first = (GuildAcademySelectWin::GuildInfo *)v4;
  result->second = _Plast;
  return v116;
}

//----- (006F1900) --------------------------------------------------------
void __cdecl std::_Sort_heap<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::Order>(GuildAcademySelectWin::GuildInfo *_First, GuildAcademySelectWin::GuildInfo *_Last)
{
  GuildAcademySelectWin::GuildInfo *v2; // esi@1
  signed int i; // edi@1

  v2 = _Last;
  for ( i = (char *)_Last - (char *)_First; i / 68 > 1; --v2 )
  {
    std::_Pop_heap_0<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::GuildInfo,GuildAcademySelectWin::Order>(
      _First,
      v2);
    i -= 68;
  }
}

//----- (006F1960) --------------------------------------------------------
GuildAcademySelectWin *__thiscall GuildAcademySelectWin::`vector deleting destructor'(GuildAcademySelectWin *this, unsigned int a2)
{
  GuildAcademySelectWin *v2; // esi@1

  v2 = this;
  GuildAcademySelectWin::~GuildAcademySelectWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006F1990) --------------------------------------------------------
void __cdecl std::_Sort<GuildAcademySelectWin::GuildInfo *,int,GuildAcademySelectWin::Order>(GuildAcademySelectWin::GuildInfo *_First, GuildAcademySelectWin::GuildInfo *_Last, int _Ideal, GuildAcademySelectWin::Order _Pred)
{
  GuildAcademySelectWin::GuildInfo *v4; // ebx@1
  GuildAcademySelectWin::GuildInfo *v5; // edi@1
  int v6; // eax@1
  signed int v7; // esi@2
  std::pair<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::GuildInfo *> _Mid; // [sp+Ch] [bp-8h]@4

  v4 = _First;
  v5 = _Last;
  v6 = _Last - _First;
  if ( v6 <= 32 )
    goto LABEL_8;
  v7 = _Ideal;
  while ( v7 > 0 )
  {
    std::_Unguarded_partition<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::Order>(&_Mid, v4, v5);
    v7 = v7 / 2 / 2 + v7 / 2;
    if ( _Mid.first - v4 >= v5 - _Mid.second )
    {
      std::_Sort<GuildAcademySelectWin::GuildInfo *,int,GuildAcademySelectWin::Order>(_Mid.second, v5, v7, _Pred);
      v5 = _Mid.first;
    }
    else
    {
      std::_Sort<GuildAcademySelectWin::GuildInfo *,int,GuildAcademySelectWin::Order>(v4, _Mid.first, v7, _Pred);
      v4 = _Mid.second;
    }
    v6 = v5 - v4;
    if ( v6 <= 32 )
      goto LABEL_8;
  }
  if ( v6 <= 32 )
  {
LABEL_8:
    if ( v6 > 1 )
      std::_Insertion_sort1<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::Order,GuildAcademySelectWin::GuildInfo>(
        v4,
        v5);
  }
  else
  {
    if ( v5 - v4 > 1 )
      std::_Make_heap<GuildAcademySelectWin::GuildInfo *,int,GuildAcademySelectWin::GuildInfo,GuildAcademySelectWin::Order>(
        v4,
        v5);
    std::_Sort_heap<GuildAcademySelectWin::GuildInfo *,GuildAcademySelectWin::Order>(v4, v5);
  }
}

//----- (006F1AD0) --------------------------------------------------------
void __thiscall GuildAcademyStorageTabWin::GuildAcademyStorageTabWin(GuildAcademyStorageTabWin *this)
{
  GuildAcademyStorageTabWin *v1; // esi@1

  v1 = this;
  PgWinBut::PgWinBut((PgWinBut *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GuildAcademyStorageTabWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildAcademyStorageTabWin::`vftable'{for `IDirectMessenger'};
  v1->m_bDroppable = 1;
}
// 9C66E8: using guessed type void (__thiscall *GuildAcademyStorageTabWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C6704: using guessed type int (__thiscall *GuildAcademyStorageTabWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006F1B00) --------------------------------------------------------
void __thiscall GuildAcademyStorageTabWin::~GuildAcademyStorageTabWin(GuildAcademyStorageTabWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GuildAcademyStorageTabWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildAcademyStorageTabWin::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
}
// 9C66E8: using guessed type void (__thiscall *GuildAcademyStorageTabWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C6704: using guessed type int (__thiscall *GuildAcademyStorageTabWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006F1B20) --------------------------------------------------------
bool __thiscall GuildAcademyStorageTabWin::Create(GuildAcademyStorageTabWin *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg)
{
  return PgWinBut::Create((PgWinBut *)&this->vfptr, iXPos, iYPos, pkSprData, pkParent, uiCmdMsg, 0, 0) != 0;
}

//----- (006F1B50) --------------------------------------------------------
void __thiscall GuildAcademyStorageInvWin::GuildAcademyStorageInvWin(GuildAcademyStorageInvWin *this)
{
  GuildAcademyStorageInvWin *v1; // esi@1

  v1 = this;
  ItemIcon::ItemIcon((ItemIcon *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GuildAcademyStorageInvWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildAcademyStorageInvWin::`vftable'{for `IDirectMessenger'};
  v1->m_uiInvIndex = -1;
  ItemIcon::SetItem((ItemIcon *)&v1->vfptr, 0, 1);
}
// 9C693C: using guessed type void (__thiscall *GuildAcademyStorageInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C695C: using guessed type int (__thiscall *GuildAcademyStorageInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006F1BC0) --------------------------------------------------------
void __thiscall GuildAcademyStorageInvWin::~GuildAcademyStorageInvWin(GuildAcademyStorageInvWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GuildAcademyStorageInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildAcademyStorageInvWin::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
}
// 9C693C: using guessed type void (__thiscall *GuildAcademyStorageInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C695C: using guessed type int (__thiscall *GuildAcademyStorageInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006F1BE0) --------------------------------------------------------
char __thiscall GuildAcademyStorageInvWin::Create(GuildAcademyStorageInvWin *this, int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent)
{
  GuildAcademyStorageInvWin *v5; // esi@1
  char result; // al@1

  v5 = this;
  result = ItemIcon::Create((ItemIcon *)&this->vfptr, iXPos, iYPos, pkParent);
  if ( result )
  {
    v5->m_uiInvIndex = uiInvIndex;
    result = 1;
  }
  return result;
}

//----- (006F1C20) --------------------------------------------------------
void __thiscall GuildAcademyStorageInvWin::OnFirstHitWin(GuildAcademyStorageInvWin *this)
{
  GuildAcademyStorageInvWin *v1; // esi@1
  ItemInfoWin *v2; // edi@2
  Item *v3; // eax@3

  v1 = this;
  if ( ItemIcon::GetItem((ItemIcon *)&this->vfptr) )
  {
    v2 = (ItemInfoWin *)v1->m_pkToolTipWin;
    if ( v2 )
    {
      v3 = ItemIcon::GetItem((ItemIcon *)&v1->vfptr);
      ItemInfoWin::SetItemInfo(v2, v3);
      PgWin::OnFirstHitWin((PgWin *)&v1->vfptr);
    }
  }
}

//----- (006F1C90) --------------------------------------------------------
void GuildAcademyStorageWin::OnOk()
{
  PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  GameFrameWork::OnCloseGuildAcademyStorage();
}

//----- (006F1CB0) --------------------------------------------------------
void GuildAcademyStorageWin::OnCancel()
{
  PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  GameFrameWork::OnCloseGuildAcademyStorage();
}

//----- (006F1CE0) --------------------------------------------------------
void __stdcall GuildAcademyStorageWin::OnDrawingMoneyWinOk(__int64 i64Money)
{
  PROTO_NC_ITEM_WITHDRAW_REQ kProto; // [sp+0h] [bp-8h]@1

  kProto.cen = i64Money;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x2Fu, &kProto, 8);
}

//----- (006F1D10) --------------------------------------------------------
void __stdcall GuildAcademyStorageWin::OnDepositMoneyWinOk(__int64 i64Money)
{
  PROTO_NC_ITEM_DEPOSIT_REQ kProto; // [sp+0h] [bp-8h]@1

  kProto.cen = i64Money;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0xCu, 0x31u, &kProto, 8);
}

//----- (006F1D40) --------------------------------------------------------
void __thiscall GuildAcademyStorageWin::ResetContents(GuildAcademyStorageWin *this)
{
  GuildAcademyStorageWin *v1; // ebx@1
  ItemIcon **v2; // esi@1
  signed int v3; // edi@2
  unsigned int v4; // esi@4
  ItemIcon **v5; // edi@4
  Item *v6; // eax@5

  v1 = this;
  v2 = (ItemIcon **)this->m_apkInvWin;
  if ( this->m_apkInvWin[0] )
  {
    v3 = 36;
    do
    {
      ItemIcon::SetItem(*v2, 0, 1);
      ++v2;
      --v3;
    }
    while ( v3 );
    v4 = 0;
    v5 = (ItemIcon **)v1->m_apkInvWin;
    do
    {
      v6 = GuildAcademyStorage::Get(v4 + 36 * v1->m_uiCurPage);
      ItemIcon::SetItem(*v5, v6, 1);
      ++v4;
      ++v5;
    }
    while ( v4 < 0x24 );
  }
}

//----- (006F1DB0) --------------------------------------------------------
GuildAcademyStorageInvWin *__thiscall GuildAcademyStorageWin::GetInvWin(GuildAcademyStorageWin *this, unsigned int uiIndex)
{
  GuildAcademyStorageInvWin *result; // eax@2

  if ( uiIndex < 0x48 )
    result = this->m_apkInvWin[uiIndex];
  else
    result = 0;
  return result;
}

//----- (006F1DD0) --------------------------------------------------------
void GuildAcademyStorageWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "NPCBank");
}

//----- (006F1E00) --------------------------------------------------------
char __thiscall GuildAcademyStorageTabWin::EatDropInstance(GuildAcademyStorageTabWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  PgCursor::ms_bKeepDrop = 1;
  ((void (*)(void))this->vfptr[132].__vecDelDtor)();
  return 1;
}
// B648B8: using guessed type bool PgCursor::ms_bKeepDrop;

//----- (006F1E20) --------------------------------------------------------
void __thiscall GuildAcademyStorageWin::GuildAcademyStorageWin(GuildAcademyStorageWin *this)
{
  GuildAcademyStorageWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GuildAcademyStorageWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildAcademyStorageWin::`vftable'{for `IDirectMessenger'};
  v1->m_kDrop.m_pkSender = 0;
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  v1->m_kDropContents.m_uiLot = 0;
  v1->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v1->m_kDropContents.m_kItemID = -1;
  v1->m_uiCurPage = 0;
  v1->m_pkTitleTextWin = 0;
  v1->m_pkMoneyWin = 0;
  v1->m_kDrop.m_pkContents = &v1->m_kDropContents;
  v1->m_apkInvWin[0] = 0;
  v1->m_apkInvWin[1] = 0;
  v1->m_apkInvWin[2] = 0;
  v1->m_apkInvWin[3] = 0;
  v1->m_apkInvWin[4] = 0;
  v1->m_apkInvWin[5] = 0;
  v1->m_apkInvWin[6] = 0;
  v1->m_apkInvWin[7] = 0;
  v1->m_apkInvWin[8] = 0;
  v1->m_apkInvWin[9] = 0;
  v1->m_apkInvWin[10] = 0;
  v1->m_apkInvWin[11] = 0;
  v1->m_apkInvWin[12] = 0;
  v1->m_apkInvWin[13] = 0;
  v1->m_apkInvWin[14] = 0;
  v1->m_apkInvWin[15] = 0;
  v1->m_apkInvWin[16] = 0;
  v1->m_apkInvWin[17] = 0;
  v1->m_apkInvWin[18] = 0;
  v1->m_apkInvWin[19] = 0;
  v1->m_apkInvWin[20] = 0;
  v1->m_apkInvWin[21] = 0;
  v1->m_apkInvWin[22] = 0;
  v1->m_apkInvWin[23] = 0;
  v1->m_apkInvWin[24] = 0;
  v1->m_apkInvWin[25] = 0;
  v1->m_apkInvWin[26] = 0;
  v1->m_apkInvWin[27] = 0;
  v1->m_apkInvWin[28] = 0;
  v1->m_apkInvWin[29] = 0;
  v1->m_apkInvWin[30] = 0;
  v1->m_apkInvWin[31] = 0;
  v1->m_apkInvWin[32] = 0;
  v1->m_apkInvWin[33] = 0;
  v1->m_apkInvWin[34] = 0;
  v1->m_apkInvWin[35] = 0;
  v1->m_pkCopperText = 0;
  v1->m_pkSilverText = 0;
  v1->m_pkGoldText = 0;
  v1->m_pkGemText = 0;
  v1->m_bDivide = 0;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9C6BCC: using guessed type void (__thiscall *GuildAcademyStorageWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C6BEC: using guessed type int (__thiscall *GuildAcademyStorageWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006F1F80) --------------------------------------------------------
void __thiscall GuildAcademyStorageWin::~GuildAcademyStorageWin(GuildAcademyStorageWin *this)
{
  GuildAcademyStorageWin *v1; // esi@1
  MoneyWin *v2; // eax@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildAcademyStorageWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildAcademyStorageWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_pkMoneyWin;
  if ( v2 )
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v2->vfptr);
  v1->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v1->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9C6BCC: using guessed type void (__thiscall *GuildAcademyStorageWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C6BEC: using guessed type int (__thiscall *GuildAcademyStorageWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006F2010) --------------------------------------------------------
void __thiscall GuildAcademyStorageWin::ResetPage(GuildAcademyStorageWin *this)
{
  this->m_uiCurPage = 0;
  GuildAcademyStorageWin::ResetContents(this);
}

//----- (006F2020) --------------------------------------------------------
void __thiscall GuildAcademyStorageWin::OnTab1(GuildAcademyStorageWin *this)
{
  GuildAcademyStorageWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_apkTabOnSpr[0]->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_apkTabOnSpr[1]->vfptr[64].__vecDelDtor)(0);
  v1->m_uiCurPage = 0;
  GuildAcademyStorageWin::ResetContents(v1);
}

//----- (006F2060) --------------------------------------------------------
void __thiscall GuildAcademyStorageWin::OnTab2(GuildAcademyStorageWin *this)
{
  GuildAcademyStorageWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_apkTabOnSpr[0]->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_apkTabOnSpr[1]->vfptr[64].__vecDelDtor)(1);
  v1->m_uiCurPage = 1;
  GuildAcademyStorageWin::ResetContents(v1);
}

//----- (006F20A0) --------------------------------------------------------
void __thiscall GuildAcademyStorageWin::OnShowWin(GuildAcademyStorageWin *this)
{
  GuildAcademyStorageWin *v1; // esi@1

  v1 = this;
  PgWin::OnShowWin((PgWin *)&this->vfptr);
  ((void (__stdcall *)(_DWORD))v1->m_apkTabOnSpr[0]->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_apkTabOnSpr[1]->vfptr[64].__vecDelDtor)(0);
  v1->m_uiCurPage = 0;
  GuildAcademyStorageWin::ResetContents(v1);
}

//----- (006F20E0) --------------------------------------------------------
void GuildAcademyStorageWin::OnClose()
{
  PROTO_NC_GUILD_ACADEMY_REWARD_STORAGE_CLOSE_CMD kProto; // [sp+1h] [bp-1h]@1

  kProto.nCloseType = 0;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x26u, 0x6Fu, &kProto, 1);
  InventoryWin::ms_uiMode = 0;
}
// A8CBF4: using guessed type unsigned int InventoryWin::ms_uiMode;

//----- (006F2110) --------------------------------------------------------
void __thiscall GuildAcademyStorageInvWin::DoAction(GuildAcademyStorageInvWin *this)
{
  GuildAcademyStorageInvWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, v1->m_uiInvIndex);
}

//----- (006F2140) --------------------------------------------------------
void __thiscall GuildAcademyStorageInvWin::DoRAction(GuildAcademyStorageInvWin *this)
{
  GuildAcademyStorageInvWin *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiRCmdMsg, v1->m_uiInvIndex);
}

//----- (006F2170) --------------------------------------------------------
void __thiscall GuildAcademyStorageWin::OnInvShiftLClick(GuildAcademyStorageWin *this, unsigned int uiInvIndex)
{
  GuildAcademyStorageWin *v2; // esi@1
  Item *v3; // edi@1
  GameFrameWork *v4; // ebx@3
  char *v5; // ST0C_4@3
  int v6; // eax@3

  v2 = this;
  v3 = ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[uiInvIndex]->vfptr);
  if ( v3 )
  {
    v2->m_bDivide = 0;
    if ( (unsigned int)((int (__thiscall *)(_DWORD))v3->vfptr[3].__vecDelDtor)(v3) > 1 )
    {
      v2->m_bDivide = 1;
      GuildAcademyStorageWin::ms_kFrom.Inven &= 0x3FFu;
      GuildAcademyStorageWin::ms_kFrom.Inven ^= (GuildAcademyStorageWin::ms_kFrom.Inven ^ (uiInvIndex
                                                                                         + 36 * LOWORD(v2->m_uiCurPage))) & 0x3FF;
      v4 = (GameFrameWork *)v2->m_pkFrameWork;
      v5 = (char *)TextData::Get(0xFBF1412E);
      v6 = ((int (__thiscall *)(_DWORD))v3->vfptr[3].__vecDelDtor)(v3);
      GameFrameWork::OnOpenDivideWin(v4, (PgWin *)&v2->vfptr, 0x17u, v6 - 1, v5, 2u);
    }
  }
}
// B5C2C4: using guessed type union ITEM_INVEN GuildAcademyStorageWin::ms_kFrom;

//----- (006F2230) --------------------------------------------------------
void __thiscall GuildAcademyStorageWin::OnInvRClick(GuildAcademyStorageWin *this, unsigned int uiInvIndex)
{
  GuildAcademyStorageWin *v2; // edi@1
  CClientGuild *v3; // eax@1
  Item *v4; // eax@2
  Item *v5; // esi@2
  unsigned int v6; // eax@5
  NiUnsharedGeometryGroup *v7; // eax@6
  __int16 v8; // cx@7
  PgFrameWork *v9; // esi@8
  ITEM_INVEN kTo; // [sp+4h] [bp-8h]@7
  ITEM_INVEN kFrom; // [sp+8h] [bp-4h]@7

  v2 = this;
  v3 = GuildTask::GetGuild();
  if ( CClientGuild::CanIUseStorage(v3) )
  {
    v4 = ItemIcon::GetItem((ItemIcon *)&v2->m_apkInvWin[uiInvIndex]->vfptr);
    v5 = v4;
    if ( v4 )
    {
      if ( !PgCursor::ms_pkDrop && IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(v4->m_kStruct.itemid) )
      {
        v6 = Inventory::GetInvIdxLotIsNotMax(&g_kInventory, v5);
        if ( v6 == -1 )
        {
          v7 = TextData::Get(0x91A8CDCE);
          GameFrameWork::AddSysMsg((GameFrameWork *)v2->m_pkFrameWork, (const char *)v7);
        }
        else
        {
          v8 = 36 * LOWORD(v2->m_uiCurPage);
          kTo.Inven = v6 & 0x3FF | 0x2400;
          kFrom.Inven = (uiInvIndex + v8) & 0x3FF;
          if ( (kTo.Inven & 0x3FF) != -1 )
          {
            GameFrameWork::NcItemRelocReq((GameFrameWork *)v2->m_pkFrameWork, &kFrom, &kTo);
            SoundMgr::PlayItemPutSound(v5->m_kStruct.itemid);
            v9 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
            if ( !(unsigned __int8)(*(int (**)(void))(*(_DWORD *)v9[19].m_BackFrameID + 260))() )
              GameFrameWork::OpenInventoryWin((GameFrameWork *)v9);
          }
        }
      }
    }
  }
}
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (006F2360) --------------------------------------------------------
void __thiscall GuildAcademyStorageWin::OnDeposit(GuildAcademyStorageWin *this)
{
  GuildAcademyStorageWin *v1; // esi@1
  CClientGuild *v2; // eax@1
  MoneyWin *v3; // ecx@2
  char *v4; // eax@3
  char *v5; // eax@3

  v1 = this;
  v2 = GuildTask::GetGuild();
  if ( (unsigned __int8)CClientGuild::AmIGuildMember(v2) )
  {
    v3 = v1->m_pkMoneyWin;
    if ( v3 )
    {
      MoneyWin::Open(v3, (PgWin *)&v1->vfptr, 0x14u, 0, &byte_9C64D7);
      v4 = (char *)TextData::Get(0x2CB89180u);
      MoneyWin::SetTitle1(v1->m_pkMoneyWin, v4);
      v5 = (char *)TextData::Get(0x382C423Du);
      MoneyWin::SetTitle2(v1->m_pkMoneyWin, v5);
    }
  }
}

//----- (006F23C0) --------------------------------------------------------
void __thiscall GuildAcademyStorageWin::OnDrawing(GuildAcademyStorageWin *this)
{
  GuildAcademyStorageWin *v1; // esi@1
  CClientGuild *v2; // eax@1
  MoneyWin *v3; // ecx@2
  char *v4; // eax@3
  char *v5; // eax@3
  NiUnsharedGeometryGroup *v6; // eax@4

  v1 = this;
  v2 = GuildTask::GetGuild();
  if ( CClientGuild::CanIUseStorage(v2) )
  {
    v3 = v1->m_pkMoneyWin;
    if ( v3 )
    {
      MoneyWin::Open(v3, (PgWin *)&v1->vfptr, 0x15u, 0, &byte_9C64E3);
      v4 = (char *)TextData::Get(0x89B68F88);
      MoneyWin::SetTitle1(v1->m_pkMoneyWin, v4);
      v5 = (char *)TextData::Get(0xD5F0EF45);
      MoneyWin::SetTitle2(v1->m_pkMoneyWin, v5);
    }
  }
  else
  {
    v6 = TextData::Get(0x6BCCC8E3u);
    GameFrameWork::AddSysMsg((GameFrameWork *)v1->m_pkFrameWork, (const char *)v6);
  }
}

//----- (006F2440) --------------------------------------------------------
char __thiscall GuildAcademyStorageWin::DropOnInv(GuildAcademyStorageWin *this, DropContents *pkContents, unsigned int uiReceiverInvIndex)
{
  CClientGuild *v3; // eax@1
  DropContents::SenderType v4; // edx@2
  unsigned int v6; // edi@7
  PgFrameWork *v7; // eax@7
  unsigned int v8; // ebx@7
  unsigned __int16 v9; // si@7
  DivideWin *v10; // ecx@7
  InventoryWin *v11; // eax@10
  InvWin *v12; // eax@11
  ItemIcon *v13; // ecx@12
  Item *v14; // eax@14
  GameFrameWork *v15; // ecx@16
  unsigned __int16 v16; // ax@19
  Item *v17; // ebx@20
  unsigned __int16 v18; // ST0C_2@22
  SHINE_PUT_ON_BELONGED_ITEM v19; // eax@22
  GameFrameWork *v20; // esi@23
  _DWORD *v21; // eax@27
  int v22; // eax@28
  NiUnsharedGeometryGroup *v23; // eax@23
  Item *v24; // edi@35
  Item *v25; // eax@41
  int v26; // esi@43
  Item *v27; // eax@45
  unsigned int v28; // [sp-10h] [bp-28h]@26
  DivideWin *pkDivideWin; // [sp+0h] [bp-18h]@7
  DropContents::SenderType eSenderType; // [sp+4h] [bp-14h]@2
  Item *pkTargetItem; // [sp+8h] [bp-10h]@14
  ITEM_INVEN kTo; // [sp+Ch] [bp-Ch]@19
  GuildAcademyStorageWin *v33; // [sp+10h] [bp-8h]@1
  ITEM_INVEN kFrom; // [sp+14h] [bp-4h]@5
  ItemInfo *pkInfo; // [sp+20h] [bp+8h]@21

  v33 = this;
  v3 = GuildTask::GetGuild();
  if ( !(unsigned __int8)CClientGuild::AmIGuildMember(v3) )
    return 0;
  v4 = pkContents->m_eSenderType;
  eSenderType = v4;
  if ( v4 )
  {
    if ( v4 != 19 )
      return 0;
    kFrom.Inven &= 0x3FFu;
  }
  else
  {
    kFrom.Inven = kFrom.Inven & 0x3FF | 0x2400;
  }
  v6 = pkContents->m_uiSenderIndex;
  v7 = v33->m_pkFrameWork;
  v8 = pkContents->m_uiSenderIndex & 0x3FF;
  v9 = v8 | kFrom.Inven & 0xFC00;
  kFrom.Inven = v8 | kFrom.Inven & 0xFC00;
  v10 = (DivideWin *)v7[20].m_kMsgQ.m_uiHead;
  pkDivideWin = v10;
  if ( v10 && v10->m_uiResultValue )
  {
    if ( (kFrom.Inven & 0xFC00) == 9216 )
    {
      v11 = (InventoryWin *)v7[19].m_BackFrameID;
      if ( !v11 )
        goto LABEL_19;
      v12 = InventoryWin::GetInvWin(v11, v6);
      if ( !v12 )
        goto LABEL_18;
      v13 = (ItemIcon *)v12;
    }
    else
    {
      v13 = (ItemIcon *)&v33->m_apkInvWin[v6 % 0x24]->vfptr;
    }
    v14 = ItemIcon::GetItem(v13);
    v9 = v8 | kFrom.Inven & 0xFC00;
    kFrom.Inven = v8 | kFrom.Inven & 0xFC00;
    pkTargetItem = v14;
    if ( v14 )
    {
      if ( (unsigned int)((int (__thiscall *)(Item *))v14->vfptr[3].__vecDelDtor)(v14) > 1 )
      {
        v15 = (GameFrameWork *)v33->m_pkFrameWork;
        LOWORD(uiReceiverInvIndex) = (uiReceiverInvIndex + 36 * LOWORD(v33->m_uiCurPage)) & 0x3FF;
        GameFrameWork::NcItemSplitReq(v15, &kFrom, (ITEM_INVEN *)&uiReceiverInvIndex, pkDivideWin->m_uiResultValue);
        SoundMgr::PlayItemPutSound(pkTargetItem->m_kStruct.itemid);
        return 1;
      }
      v9 = kFrom.Inven;
    }
LABEL_18:
    v4 = eSenderType;
  }
LABEL_19:
  v16 = (uiReceiverInvIndex + 36 * LOWORD(v33->m_uiCurPage)) & 0x3FF;
  kTo.Inven = (uiReceiverInvIndex + 36 * LOWORD(v33->m_uiCurPage)) & 0x3FF;
  if ( v4 )
  {
    if ( v4 == 19 )
    {
      v25 = ItemIcon::GetItem((ItemIcon *)&v33->m_apkInvWin[v6 % 0x24]->vfptr);
      if ( v25 )
        SoundMgr::PlayItemPutSound(v25->m_kStruct.itemid);
      v26 = (int)v33;
      if ( v33->m_bDivide )
      {
        v33->m_bDivide = 0;
        if ( !pkDivideWin )
          return 0;
        v27 = GuildAcademyStorage::Get(kFrom.Inven & 0x3FF);
        if ( v27 )
        {
          if ( (unsigned int)((int (__thiscall *)(Item *))v27->vfptr[3].__vecDelDtor)(v27) > 1 )
          {
            GameFrameWork::NcItemSplitReq(*(GameFrameWork **)(v26 + 296), &kFrom, &kTo, pkDivideWin->m_uiResultValue);
            return 1;
          }
        }
      }
    }
  }
  else
  {
    v17 = (Item *)pkContents->m_apvParam[0];
    if ( v17 )
    {
      pkInfo = v17->m_pkInfo;
      if ( pkInfo )
      {
        v18 = v16 >> 10;
        uiReceiverInvIndex = 0;
        v19 = Item::GetPutOnBelongState(v17);
        if ( !CItemAuthorityBase::IA_CanInvenReloc(
                &g_kItemAuthority,
                pkInfo->BT_Inx,
                v19,
                v9 >> 10,
                v18,
                (E_RELOC_ERR *)&uiReceiverInvIndex) )
        {
          v20 = (GameFrameWork *)v33->m_pkFrameWork;
          v23 = TextData::Get(0x82B079E9);
LABEL_32:
          GameFrameWork::AddSysMsg(v20, (const char *)v23);
          return 0;
        }
        if ( CItemAuthorityBase::IA_IsDataPutOnBelonged(&g_kItemAuthority, pkInfo->BT_Inx)
          && Item::GetPutOnBelongState(v17) == 1 )
        {
          v28 = -857857511;
LABEL_31:
          v20 = (GameFrameWork *)v33->m_pkFrameWork;
          v23 = TextData::Get(v28);
          goto LABEL_32;
        }
      }
      v21 = (_DWORD *)((int (__thiscall *)(Item *))v17->vfptr[11].__vecDelDtor)(v17);
      if ( v21 )
      {
        v22 = *v21 & 0xFF;
        if ( v22 )
        {
          if ( v22 != 255 )
          {
            v28 = -1634432127;
            goto LABEL_31;
          }
        }
      }
    }
    if ( v6 < 0xC0 )
    {
      v24 = g_kInventory.m_aspInv[v6].m_pObject;
      if ( v24 )
        SoundMgr::PlayItemPutSound(v24->m_kStruct.itemid);
    }
  }
  if ( !((*(_DWORD *)&kFrom.Inven ^ *(_DWORD *)&kTo.Inven) & 0xFC00)
    && !((*(_DWORD *)&kFrom.Inven ^ *(_DWORD *)&kTo.Inven) & 0x3FF) )
  {
    return 0;
  }
  GameFrameWork::NcItemRelocReq((GameFrameWork *)v33->m_pkFrameWork, &kFrom, &kTo);
  return 1;
}

//----- (006F27E0) --------------------------------------------------------
void __thiscall GuildAcademyStorageWin::UpdateMeWin(GuildAcademyStorageWin *this, float fCurTime)
{
  GuildAcademyStorageWin *v2; // ebx@1
  __int64 v3; // rax@1
  __int64 v4; // rax@1
  __int64 v5; // rax@1
  __int64 v6; // rax@1
  __int64 v7; // rax@1
  __int64 v8; // rax@1
  __int64 v9; // rax@1
  __int64 v10; // rax@1
  int v11; // esi@1
  int v12; // edi@1
  char *v13; // eax@3
  unsigned int dwValue; // [sp+Ch] [bp-8Ch]@1
  int iUsing; // [sp+10h] [bp-88h]@1
  char acStr[128]; // [sp+14h] [bp-84h]@1

  v2 = this;
  v3 = GuildAcademyStorage::GetMoney();
  v4 = User::GetGem(v3);
  sprintf(acStr, "%I64d", v4);
  ((void (__stdcall *)(_DWORD))v2->m_pkGemText->vfptr[118].__vecDelDtor)(acStr);
  v5 = GuildAcademyStorage::GetMoney();
  v6 = User::GetGold(v5);
  sprintf(acStr, "%I64d", v6);
  ((void (__stdcall *)(_DWORD))v2->m_pkGoldText->vfptr[118].__vecDelDtor)(acStr);
  v7 = GuildAcademyStorage::GetMoney();
  v8 = User::GetSilver(v7);
  sprintf(acStr, "%I64d", v8);
  ((void (__stdcall *)(_DWORD))v2->m_pkSilverText->vfptr[118].__vecDelDtor)(acStr);
  v9 = GuildAcademyStorage::GetMoney();
  v10 = User::GetCopper(v9);
  sprintf(acStr, "%I64d", v10);
  ((void (__stdcall *)(_DWORD))v2->m_pkCopperText->vfptr[118].__vecDelDtor)(acStr);
  ChargedItemList::GetTotalEffectingValue(EE_MORESTORAGE, &dwValue);
  iUsing = dwValue + 2;
  v11 = 0;
  v12 = (int)v2->m_apkTabBtn;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v12 + 16) + 256))(v11 >= iUsing);
    if ( v11 < iUsing )
    {
      if ( v11 == v2->m_uiCurPage )
      {
        if ( v11 < 2 )
          v13 = (char *)TextData::Get(0x4142947Cu);
        else
          v13 = (char *)TextData::Get(0x32537F78u);
      }
      else if ( v11 < 2 )
      {
        v13 = (char *)TextData::Get(0xE4F8E933);
      }
      else
      {
        v13 = (char *)TextData::Get(0xE0E9FA1E);
      }
    }
    else
    {
      v13 = (char *)TextData::Get(0xE3F5403A);
    }
    PgWin::SetToolTipWinText(*(PgWin **)v12, v13);
    ++v11;
    v12 += 4;
  }
  while ( v11 < 2 );
}

//----- (006F2990) --------------------------------------------------------
char __thiscall GuildAcademyStorageInvWin::EatDropInstance(GuildAcademyStorageInvWin *this, PgWinDrop **pkDrop, int iDropXPos, int iDropYPos)
{
  GuildAcademyStorageInvWin *v4; // edi@1
  char result; // al@2
  DropContents *v6; // esi@3
  GuildAcademyStorageWin *v7; // eax@5

  v4 = this;
  if ( *pkDrop )
  {
    v6 = (DropContents *)(*pkDrop)->m_pkContents;
    if ( v6 )
    {
      v7 = (GuildAcademyStorageWin *)PgWin::GetParentWin((PgWin *)&this->vfptr);
      result = GuildAcademyStorageWin::DropOnInv(v7, v6, v4->m_uiInvIndex);
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006F29D0) --------------------------------------------------------
void __thiscall GuildAcademyStorageWin::OnInvLClick(GuildAcademyStorageWin *this, unsigned int uiInvIndex)
{
  GuildAcademyStorageWin *v2; // esi@1
  CClientGuild *v3; // eax@1
  Item *v4; // eax@4
  Item *v5; // edi@4
  int v6; // edx@5

  v2 = this;
  v3 = GuildTask::GetGuild();
  if ( CClientGuild::CanIUseStorage(v3) )
  {
    if ( g_pkKeyboard->m_aucKeystate[5] & 4 )
    {
      GuildAcademyStorageWin::OnInvShiftLClick(v2, uiInvIndex);
    }
    else
    {
      v4 = ItemIcon::GetItem((ItemIcon *)&v2->m_apkInvWin[uiInvIndex]->vfptr);
      v5 = v4;
      if ( v4 )
      {
        v6 = 9 * v2->m_uiCurPage;
        v2->m_kDropContents.m_eType = 0;
        v2->m_kDropContents.m_eSenderType = 19;
        v2->m_kDropContents.m_apvParam[1] = 0;
        v2->m_kDropContents.m_apvParam[0] = v4;
        v2->m_kDropContents.m_uiSenderIndex = uiInvIndex + 4 * v6;
        v2->m_kDropContents.m_uiLot = ((int (__thiscall *)(_DWORD))v4->vfptr[3].__vecDelDtor)(v4);
        v2->m_kDrop.m_pkSender = (PgWin *)v2;
        PgCursor::ms_pkDrop = &v2->m_kDrop;
        SoundMgr::PlayItemPutSound(v5->m_kStruct.itemid);
      }
    }
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (006F2A90) --------------------------------------------------------
void __thiscall GuildAcademyStorageWin::OnCommand(GuildAcademyStorageWin *this, unsigned int wParam, int lParam)
{
  GuildAcademyStorageWin *v3; // esi@1
  Item *v4; // eax@13
  int v5; // ecx@14

  v3 = this;
  switch ( wParam )
  {
    case 0xAu:
      GuildAcademyStorageWin::OnInvLClick(this, lParam);
      break;
    case 0xBu:
      GuildAcademyStorageWin::OnInvRClick(this, lParam);
      break;
    case 0xEu:
      GuildAcademyStorageWin::OnOk();
      break;
    case 0xFu:
      GuildAcademyStorageWin::OnCancel();
      break;
    case 0x10u:
      GuildAcademyStorageWin::OnTab1(this);
      break;
    case 0x11u:
      GuildAcademyStorageWin::OnTab2(this);
      break;
    case 0x12u:
      GuildAcademyStorageWin::OnDeposit(this);
      break;
    case 0x13u:
      GuildAcademyStorageWin::OnDrawing(this);
      break;
    case 0x14u:
      GuildAcademyStorageWin::OnDepositMoneyWinOk(*(_QWORD *)lParam);
      break;
    case 0x15u:
      GuildAcademyStorageWin::OnDrawingMoneyWinOk(*(_QWORD *)lParam);
      break;
    case 0x17u:
      if ( lParam )
      {
        v4 = ItemIcon::GetItem((ItemIcon *)&this->m_apkInvWin[(GuildAcademyStorageWin::ms_kFrom.Inven & 0x3FF) % 36]->vfptr);
        if ( v4 )
        {
          v3->m_kDropContents.m_eSenderType = 19;
          v3->m_kDropContents.m_eType = 0;
          v5 = GuildAcademyStorageWin::ms_kFrom.Inven & 0x3FF;
          v3->m_kDropContents.m_apvParam[0] = v4;
          v3->m_kDropContents.m_uiSenderIndex = v5;
          v3->m_kDropContents.m_apvParam[1] = 0;
          ((void (__thiscall *)(_DWORD))v4->vfptr[3].__vecDelDtor)(v4);
          v3->m_kDropContents.m_uiLot = lParam;
          v3->m_kDrop.m_pkSender = (PgWin *)v3;
          PgCursor::ms_pkDrop = &v3->m_kDrop;
        }
      }
      break;
    default:
      return;
    case 0x18u:
      GuildAcademyStorageWin::OnHelpLink();
      break;
  }
}
// B5C2C4: using guessed type union ITEM_INVEN GuildAcademyStorageWin::ms_kFrom;
// B648B4: using guessed type struct PgWinDrop *PgCursor::ms_pkDrop;

//----- (006F2C00) --------------------------------------------------------
GuildAcademyStorageTabWin *__cdecl GuildAcademyStorageTabWin::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg)
{
  PgWin *v5; // eax@1
  PgWin *v6; // esi@1
  PgWin *v7; // edi@8
  GuildAcademyStorageTabWin *v8; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v10; // [sp+20h] [bp-4h]@1

  v5 = (PgWin *)operator new(0x144u);
  v6 = v5;
  result.m_pObject = v5;
  v10 = 0;
  if ( v5 )
  {
    PgWinBut::PgWinBut((PgWinBut *)v5);
    v6->vfptr = (NiRefObjectVtbl *)&GuildAcademyStorageTabWin::`vftable'{for `NiNode'};
    v6->vfptr = (IDirectMessengerVtbl *)&GuildAcademyStorageTabWin::`vftable'{for `IDirectMessenger'};
    v6->m_bDroppable = 1;
  }
  else
  {
    v6 = 0;
  }
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v10 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v6);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgSprData *, PgWin *, unsigned int))v6->vfptr[140].__vecDelDtor)(
                          v6,
                          iXPos,
                          iYPos,
                          pkSprData,
                          pkParent,
                          uiCmdMsg) )
  {
    ((void (__thiscall *)(PgWin *))v6->vfptr[89].__vecDelDtor)(v6);
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = (GuildAcademyStorageTabWin *)v6;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v6);
    if ( result.m_pObject )
    {
      v7 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      }
    }
    v10 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v8 = 0;
  }
  return v8;
}
// 9C66E8: using guessed type void (__thiscall *GuildAcademyStorageTabWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C6704: using guessed type int (__thiscall *GuildAcademyStorageTabWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006F2D60) --------------------------------------------------------
GuildAcademyStorageInvWin *__cdecl GuildAcademyStorageInvWin::CreateWin(int iXPos, int iYPos, unsigned int uiInvIndex, PgWin *pkParent)
{
  PgWin *v4; // eax@1
  ItemIcon *v5; // esi@1
  PgWin *v6; // edi@8
  GuildAcademyStorageInvWin *v7; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v4 = (PgWin *)operator new(0x1C4u);
  v5 = (ItemIcon *)v4;
  result.m_pObject = v4;
  v9 = 0;
  if ( v4 )
  {
    ItemIcon::ItemIcon((ItemIcon *)v4);
    LOBYTE(v9) = 1;
    v5->vfptr = (NiRefObjectVtbl *)&GuildAcademyStorageInvWin::`vftable'{for `NiNode'};
    v5->vfptr = (IDirectMessengerVtbl *)&GuildAcademyStorageInvWin::`vftable'{for `IDirectMessenger'};
    v5[1].vfptr = (NiRefObjectVtbl *)-1;
    ItemIcon::SetItem(v5, 0, 1);
  }
  else
  {
    v5 = 0;
  }
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v9 = 2;
  PgWinMgr::Add(&Pgg_kWinMgr, (PgWin *)&v5->vfptr);
  if ( (unsigned __int8)((int (__thiscall *)(ItemIcon *, int, int, unsigned int, PgWin *))v5->vfptr[154].__vecDelDtor)(
                          v5,
                          iXPos,
                          iYPos,
                          uiInvIndex,
                          pkParent) )
  {
    ((void (__thiscall *)(ItemIcon *))v5->vfptr[89].__vecDelDtor)(v5);
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = (GuildAcademyStorageInvWin *)v5;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, (PgWin *)&v5->vfptr);
    if ( result.m_pObject )
    {
      v6 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    v9 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v7 = 0;
  }
  return v7;
}
// 9C693C: using guessed type void (__thiscall *GuildAcademyStorageInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C695C: using guessed type int (__thiscall *GuildAcademyStorageInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006F2EC0) --------------------------------------------------------
GuildAcademyStorageWin *__cdecl GuildAcademyStorageWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  GuildAcademyStorageWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x278u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    GuildAcademyStorageWin::GuildAcademyStorageWin((GuildAcademyStorageWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (GuildAcademyStorageWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (006F2FF0) --------------------------------------------------------
char __thiscall GuildAcademyStorageWin::Create(GuildAcademyStorageWin *this, PgFrameWork *pkFrameWork)
{
  GuildAcademyStorageWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  char result; // al@6
  const char *v6; // eax@9
  PgSprData *v7; // eax@10
  int v8; // edi@11
  int v9; // ebx@11
  NiSourceTexture *v10; // eax@11
  PgSprData *v11; // eax@12
  PgSprData *v12; // eax@16
  PgWinSpr *v13; // eax@16
  PgSprData *v14; // eax@16
  PgFont *v15; // eax@18
  PgWinText *v16; // eax@18
  NiRefObjectVtbl *v17; // edx@18
  NiUnsharedGeometryGroup *v18; // eax@18
  PgSprData *v19; // eax@18
  PgSprData *v20; // eax@19
  NiRefObjectVtbl *v21; // eax@19
  IconWin **v22; // ecx@19
  PgSprData *v23; // eax@20
  GuildAcademyStorageTabWin *v24; // eax@20
  NiSourceTexture *v25; // edx@20
  PgSprData *v26; // eax@20
  PgWinSpr *v27; // eax@20
  PgSprData *v28; // eax@20
  PgWinSpr *v29; // eax@20
  PgSprData *v30; // eax@20
  PgWinSpr *v31; // eax@20
  PgSprData *v32; // eax@20
  GuildAcademyStorageTabWin *v33; // eax@20
  NiSourceTexture *v34; // edx@20
  PgSprData *v35; // eax@20
  PgWinSpr *v36; // eax@20
  PgSprData *v37; // eax@20
  PgWinSpr *v38; // eax@20
  PgSprData *v39; // eax@20
  PgWinSpr *v40; // eax@20
  PgWinText *v41; // ST94_4@20
  PgFont *v42; // ST90_4@20
  unsigned int v43; // ST8C_4@20
  unsigned int v44; // eax@20
  PgWinText *v45; // eax@20
  NiRefObjectVtbl *v46; // edx@20
  NiUnsharedGeometryGroup *v47; // eax@20
  PgWinText *v48; // ST94_4@20
  PgFont *v49; // ST90_4@20
  unsigned int v50; // ST8C_4@20
  unsigned int v51; // eax@20
  PgWinText *v52; // eax@20
  NiRefObjectVtbl *v53; // edx@20
  NiUnsharedGeometryGroup *v54; // eax@20
  PgSprData *v55; // eax@20
  PgWinText *v56; // ST94_4@20
  PgFont *v57; // ST90_4@20
  unsigned int v58; // ST8C_4@20
  unsigned int v59; // eax@20
  PgWinText *v60; // eax@20
  NiRefObjectVtbl *v61; // edx@20
  NiSourceTexture *v62; // ST9C_4@20
  NiNode *v63; // edx@20
  PgSprData *v64; // eax@20
  PgWinText *v65; // ST94_4@20
  PgFont *v66; // ST90_4@20
  unsigned int v67; // ST8C_4@20
  unsigned int v68; // eax@20
  PgWinText *v69; // eax@20
  NiRefObjectVtbl *v70; // edx@20
  NiSourceTexture *v71; // ST9C_4@20
  PgSprData *v72; // eax@20
  PgWinText *v73; // ST94_4@20
  PgFont *v74; // ST90_4@20
  unsigned int v75; // ST8C_4@20
  unsigned int v76; // eax@20
  PgWinText *v77; // eax@20
  NiRefObjectVtbl *v78; // edx@20
  NiSourceTexture *v79; // ST9C_4@20
  NiNode *v80; // edx@20
  PgSprData *v81; // eax@20
  PgWinText *v82; // ST94_4@20
  PgFont *v83; // ST90_4@20
  unsigned int v84; // ST8C_4@20
  unsigned int v85; // eax@20
  PgWinText *v86; // eax@20
  NiRefObjectVtbl *v87; // edx@20
  NiSourceTexture *v88; // ST9C_4@20
  NiNode *v89; // edx@20
  NiNode *v90; // esi@21
  unsigned int uiHeight; // [sp+B0h] [bp-5Ch]@16
  unsigned int uiWidth; // [sp+B4h] [bp-58h]@16
  PgFrameWork *v93; // [sp+B8h] [bp-54h]@1
  NiRefObjectVtbl *v94; // [sp+BCh] [bp-50h]@19
  int i; // [sp+C0h] [bp-4Ch]@7
  NiSourceTexture *pkTexture; // [sp+C4h] [bp-48h]@1
  NiPointer<NiNode> spNode; // [sp+C8h] [bp-44h]@1
  int uiTop; // [sp+CCh] [bp-40h]@10
  int uiLeft; // [sp+D0h] [bp-3Ch]@10
  PgWinText *pkTextWin; // [sp+D4h] [bp-38h]@14
  char acShapeName[33]; // [sp+D8h] [bp-34h]@19
  int v102; // [sp+108h] [bp-4h]@1

  v2 = this;
  v93 = pkFrameWork;
  spNode.m_pObject = 0;
  v102 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  pkTexture = v3;
  if ( !v3 )
    goto LABEL_27;
  i = (int)pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = Folder::Merge(&Folder::m_acMenu, "Game\\NPCBank.nif");
  PgUtil::LoadNodeNifFile(v6, &spNode, (NiTexturePalette *)i);
  if ( !spNode.m_pObject )
    return 0;
  v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v7, 0, pkFrameWork, "StorageWin", 0) )
  {
LABEL_27:
    v4 = spNode.m_pObject;
    v102 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
    return 0;
  }
  v8 = uiLeft;
  v9 = uiTop;
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v11, (PgWin *)&v2->vfptr, 0, 0);
  pkTextWin = (PgWinText *)PgSprData::Create(
                             (NiAVObject *)&spNode.m_pObject->vfptr,
                             "ClsNor",
                             &uiLeft,
                             &uiTop,
                             pkTexture);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xFu, 0, 0);
  i = (int)MenuTexMgr::GetTexture(4u);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "HelpLinkNor",
                               &uiLeft,
                               &uiTop,
                               (NiSourceTexture *)i);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x18u, 0, 0);
  }
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, pkTexture);
  v13 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, pkTexture);
  PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v14, (PgWin *)&v2->vfptr, 0, 0);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v15 = Font::Get(0);
    v16 = PgWinText::CreateWin(uiLeft - v8, uiTop - v9 + 2, uiWidth, uiHeight, v15, (PgWin *)&v2->vfptr, 0, 0);
    v17 = v16->vfptr;
    pkTextWin = v16;
    v17[122].__vecDelDtor((NiRefObject *)v16, 5u);
    ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWin->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor);
    i = (int)&pkTextWin->vfptr[118];
    v18 = TextData::Get(0x1F46265Au);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))i)(pkTextWin, v18);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, pkTexture);
    PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v19, (PgWin *)&v2->vfptr, 0, 0);
    i = 0;
    pkTextWin = (PgWinText *)v2->m_apkInvWin;
    do
    {
      v94 = (NiRefObjectVtbl *)(i + 1);
      sprintf(acShapeName, "IconSlot%03d", i + 1);
      v20 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acShapeName, &uiLeft, &uiTop, pkTexture);
      PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v20, (PgWin *)&v2->vfptr, 0, 0);
      v21 = (NiRefObjectVtbl *)GuildAcademyStorageInvWin::CreateWin(
                                 uiLeft - v8 + 1,
                                 uiTop - v9 + 1,
                                 i,
                                 (PgWin *)&v2->vfptr);
      pkTextWin->vfptr = v21;
      ItemIcon::SetItem((ItemIcon *)v21, 0, 1);
      (*((void (__stdcall **)(_DWORD))pkTextWin->vfptr->__vecDelDtor + 129))(10);
      (*((void (__stdcall **)(_DWORD))pkTextWin->vfptr->__vecDelDtor + 140))(11);
      v22 = (IconWin **)pkTextWin;
      pkTextWin->vfptr[68].__vecDelDtor = (void *(__thiscall *)(NiRefObject *, unsigned int))g_pkItemInfoWin;
      IconWin::ShowFocus(*v22, 1);
      pkTextWin = (PgWinText *)((char *)pkTextWin + 4);
      i = (int)v94;
    }
    while ( (signed int)v94 < 36 );
    v23 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab01_Off", &uiLeft, &uiTop, pkTexture);
    v24 = GuildAcademyStorageTabWin::CreateWin(uiLeft - v8, uiTop - v9, v23, (PgWin *)&v2->vfptr, 0x10u);
    v25 = pkTexture;
    v2->m_apkTabBtn[0] = (PgWinBut *)v24;
    v24->m_pkToolTipWin = g_pkToolTipWin;
    v26 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab01_Dis", &uiLeft, &uiTop, v25);
    v27 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v26, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_apkTabDisableSpr[0] = v27;
    v27->vfptr[60].__vecDelDtor((NiRefObject *)v27, 0);
    ((void (__stdcall *)(_DWORD))v2->m_apkTabDisableSpr[0]->vfptr[64].__vecDelDtor)(0);
    v28 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab01_On", &uiLeft, &uiTop, pkTexture);
    v29 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v28, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_apkTabOnSpr[0] = v29;
    v29->vfptr[60].__vecDelDtor((NiRefObject *)v29, 0);
    ((void (__stdcall *)(_DWORD))v2->m_apkTabOnSpr[0]->vfptr[64].__vecDelDtor)(0);
    v30 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Num01", &uiLeft, &uiTop, 0);
    v31 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v30, (PgWin *)&v2->vfptr, 0, 0);
    v31->vfptr[60].__vecDelDtor((NiRefObject *)v31, 0);
    v32 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab02_Off", &uiLeft, &uiTop, pkTexture);
    v33 = GuildAcademyStorageTabWin::CreateWin(uiLeft - v8, uiTop - v9, v32, (PgWin *)&v2->vfptr, 0x11u);
    v34 = pkTexture;
    v2->m_apkTabBtn[1] = (PgWinBut *)v33;
    v33->m_pkToolTipWin = g_pkToolTipWin;
    v35 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab02_Dis", &uiLeft, &uiTop, v34);
    v36 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v35, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_apkTabDisableSpr[1] = v36;
    v36->vfptr[60].__vecDelDtor((NiRefObject *)v36, 0);
    ((void (__stdcall *)(_DWORD))v2->m_apkTabDisableSpr[1]->vfptr[64].__vecDelDtor)(0);
    v37 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab02_On", &uiLeft, &uiTop, pkTexture);
    v38 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v37, (PgWin *)&v2->vfptr, 0, 0);
    v2->m_apkTabOnSpr[1] = v38;
    v38->vfptr[60].__vecDelDtor((NiRefObject *)v38, 0);
    ((void (__stdcall *)(_DWORD))v2->m_apkTabOnSpr[1]->vfptr[64].__vecDelDtor)(0);
    v39 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Num02", &uiLeft, &uiTop, 0);
    v40 = PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v39, (PgWin *)&v2->vfptr, 0, 0);
    v40->vfptr[60].__vecDelDtor((NiRefObject *)v40, 0);
    ((void (__stdcall *)(signed int))v2->m_apkTabOnSpr[0]->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(signed int))v2->m_apkTabDisableSpr[1]->vfptr[64].__vecDelDtor)(1);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "DrawNor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "DrawClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "DrawOver");
    v41 = (PgWinText *)PgWinBut::CreateWin(
                         uiLeft - v8,
                         uiTop - v9,
                         (PgSprData *)pkTextWin,
                         (PgWin *)&v2->vfptr,
                         0x13u,
                         0,
                         0);
    pkTextWin = v41;
    v42 = Font::Get(0);
    v43 = ((int (*)(void))pkTextWin->vfptr[37].__vecDelDtor)();
    v44 = ((int (*)(void))pkTextWin->vfptr[36].__vecDelDtor)();
    v45 = PgWinText::CreateWin(0, 1, v44, v43, v42, (PgWin *)&v41->vfptr, 0, 0);
    v46 = v45->vfptr;
    pkTextWin = v45;
    v46[122].__vecDelDtor((NiRefObject *)v45, 5u);
    v94 = pkTextWin->vfptr + 118;
    v47 = TextData::Get(0x89B68F88);
    v94->__vecDelDtor(pkTextWin, v47);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "PayNor",
                               &uiLeft,
                               &uiTop,
                               pkTexture);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "PayClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "PayOver");
    v48 = (PgWinText *)PgWinBut::CreateWin(
                         uiLeft - v8,
                         uiTop - v9,
                         (PgSprData *)pkTextWin,
                         (PgWin *)&v2->vfptr,
                         0x12u,
                         0,
                         0);
    pkTextWin = v48;
    v49 = Font::Get(0);
    v50 = ((int (*)(void))pkTextWin->vfptr[37].__vecDelDtor)();
    v51 = ((int (*)(void))pkTextWin->vfptr[36].__vecDelDtor)();
    v52 = PgWinText::CreateWin(0, 1, v51, v50, v49, (PgWin *)&v48->vfptr, 0, 0);
    v53 = v52->vfptr;
    pkTextWin = v52;
    v53[122].__vecDelDtor((NiRefObject *)v52, 5u);
    v94 = pkTextWin->vfptr + 118;
    v54 = TextData::Get(0x2CB89180u);
    v94->__vecDelDtor(pkTextWin, v54);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v55 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GemInput", &uiLeft, &uiTop, pkTexture);
    v56 = (PgWinText *)PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v55, (PgWin *)&v2->vfptr, 0, 0);
    pkTextWin = v56;
    v57 = Font::Get(0);
    v58 = ((int (*)(void))pkTextWin->vfptr[37].__vecDelDtor)();
    v59 = ((int (*)(void))pkTextWin->vfptr[36].__vecDelDtor)();
    v60 = PgWinText::CreateWin(0, 1, v59, v58, v57, (PgWin *)&v56->vfptr, 0, 0);
    v61 = v60->vfptr;
    pkTextWin = v60;
    v61[122].__vecDelDtor((NiRefObject *)v60, 6u);
    ((void (__stdcall *)(void *))pkTextWin->vfptr[118].__vecDelDtor)(&unk_9C64CD);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v62 = pkTexture;
    v63 = spNode.m_pObject;
    v2->m_pkGemText = pkTextWin;
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&v63->vfptr, "GemBtn", &uiLeft, &uiTop, v62);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GemBtn");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GemBtn");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0, 0, 0);
    v64 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GoldInput", &uiLeft, &uiTop, pkTexture);
    v65 = (PgWinText *)PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v64, (PgWin *)&v2->vfptr, 0, 0);
    pkTextWin = v65;
    v66 = Font::Get(0);
    v67 = ((int (*)(void))pkTextWin->vfptr[37].__vecDelDtor)();
    v68 = ((int (*)(void))pkTextWin->vfptr[36].__vecDelDtor)();
    v69 = PgWinText::CreateWin(0, 1, v68, v67, v66, (PgWin *)&v65->vfptr, 0, 0);
    v70 = v69->vfptr;
    pkTextWin = v69;
    v70[122].__vecDelDtor((NiRefObject *)v69, 6u);
    ((void (__stdcall *)(void *))pkTextWin->vfptr[118].__vecDelDtor)(&unk_9C64CE);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v71 = pkTexture;
    v2->m_pkGoldText = pkTextWin;
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GoldBtn", &uiLeft, &uiTop, v71);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GoldBtn");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GoldBtn");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0, 0, 0);
    v72 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SilverInput", &uiLeft, &uiTop, pkTexture);
    v73 = (PgWinText *)PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v72, (PgWin *)&v2->vfptr, 0, 0);
    pkTextWin = v73;
    v74 = Font::Get(0);
    v75 = ((int (*)(void))pkTextWin->vfptr[37].__vecDelDtor)();
    v76 = ((int (*)(void))pkTextWin->vfptr[36].__vecDelDtor)();
    v77 = PgWinText::CreateWin(0, 1, v76, v75, v74, (PgWin *)&v73->vfptr, 0, 0);
    v78 = v77->vfptr;
    pkTextWin = v77;
    v78[122].__vecDelDtor((NiRefObject *)v77, 6u);
    ((void (__stdcall *)(void *))pkTextWin->vfptr[118].__vecDelDtor)(&unk_9C64CF);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v79 = pkTexture;
    v80 = spNode.m_pObject;
    v2->m_pkSilverText = pkTextWin;
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&v80->vfptr, "SilverBtn", &uiLeft, &uiTop, v79);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "SilverBtn");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "SilverBtn");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0, 0, 0);
    v81 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CopperInput", &uiLeft, &uiTop, pkTexture);
    v82 = (PgWinText *)PgWinSpr::CreateWin(uiLeft - v8, uiTop - v9, v81, (PgWin *)&v2->vfptr, 0, 0);
    pkTextWin = v82;
    v83 = Font::Get(0);
    v84 = ((int (*)(void))pkTextWin->vfptr[37].__vecDelDtor)();
    v85 = ((int (*)(void))pkTextWin->vfptr[36].__vecDelDtor)();
    v86 = PgWinText::CreateWin(0, 1, v85, v84, v83, (PgWin *)&v82->vfptr, 0, 0);
    v87 = v86->vfptr;
    pkTextWin = v86;
    v87[122].__vecDelDtor((NiRefObject *)v86, 6u);
    ((void (__stdcall *)(void *))pkTextWin->vfptr[118].__vecDelDtor)(&unk_9C64D6);
    ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
    v88 = pkTexture;
    v89 = spNode.m_pObject;
    v2->m_pkCopperText = pkTextWin;
    pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&v89->vfptr, "CopperBtn", &uiLeft, &uiTop, v88);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "CopperBtn");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "CopperBtn");
    PgWinBut::CreateWin(uiLeft - v8, uiTop - v9, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0, 0, 0);
    ((void (__thiscall *)(GuildAcademyStorageWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    v2->m_pkMoneyWin = MoneyWin::CreateWin(v93);
    v102 = -1;
    if ( spNode.m_pObject )
    {
      v90 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v90 )
          v90->vfptr->__vecDelDtor((NiRefObject *)v90, 1u);
      }
    }
    result = 1;
  }
  else
  {
    v102 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    result = 0;
  }
  return result;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006F3D40) --------------------------------------------------------
GuildAcademyStorageTabWin *__thiscall GuildAcademyStorageTabWin::`scalar deleting destructor'(GuildAcademyStorageTabWin *this, unsigned int a2)
{
  GuildAcademyStorageTabWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildAcademyStorageTabWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildAcademyStorageTabWin::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C66E8: using guessed type void (__thiscall *GuildAcademyStorageTabWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C6704: using guessed type int (__thiscall *GuildAcademyStorageTabWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006F3D80) --------------------------------------------------------
GuildAcademyStorageInvWin *__thiscall GuildAcademyStorageInvWin::`scalar deleting destructor'(GuildAcademyStorageInvWin *this, unsigned int a2)
{
  GuildAcademyStorageInvWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildAcademyStorageInvWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildAcademyStorageInvWin::`vftable'{for `IDirectMessenger'};
  ItemIcon::~ItemIcon((ItemIcon *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C693C: using guessed type void (__thiscall *GuildAcademyStorageInvWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C695C: using guessed type int (__thiscall *GuildAcademyStorageInvWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006F3DC0) --------------------------------------------------------
GuildAcademyStorageWin *__thiscall GuildAcademyStorageWin::`scalar deleting destructor'(GuildAcademyStorageWin *this, unsigned int a2)
{
  GuildAcademyStorageWin *v2; // esi@1
  MoneyWin *v3; // eax@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildAcademyStorageWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildAcademyStorageWin::`vftable'{for `IDirectMessenger'};
  v3 = this->m_pkMoneyWin;
  if ( v3 )
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
  v2->m_kDropContents.vfptr = (DropContentsVtbl *)&DropContents::`vftable';
  v2->m_kDrop.vfptr = (PgWinDropVtbl *)&PgWinDrop::`vftable';
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9734D0: using guessed type int (__thiscall *PgWinDrop::`vftable')(void *p, char);
// 9734D8: using guessed type int (__thiscall *DropContents::`vftable')(void *p, char);
// 9C6BCC: using guessed type void (__thiscall *GuildAcademyStorageWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C6BEC: using guessed type int (__thiscall *GuildAcademyStorageWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006F3E80) --------------------------------------------------------
void __thiscall GuildAcademyWin::OnSortByTitle01(GuildAcademyWin *this)
{
  GuildAcademyWin *v1; // esi@1
  SlideListWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_pListWinMember;
  if ( v2 )
  {
    v1->m_nSortColumn = 0;
    SlideListWin::Sort(v2, 0, 0, 0);
    SlideListWin::UpdateViewList(v1->m_pListWinMember);
  }
}

//----- (006F3EB0) --------------------------------------------------------
void __thiscall GuildAcademyWin::OnSortByTitle02(GuildAcademyWin *this)
{
  GuildAcademyWin *v1; // esi@1
  SlideListWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_pListWinMember;
  if ( v2 )
  {
    v1->m_nSortColumn = 1;
    SlideListWin::Sort(v2, 1, 0, 0);
    SlideListWin::UpdateViewList(v1->m_pListWinMember);
  }
}

//----- (006F3EE0) --------------------------------------------------------
void __thiscall GuildAcademyWin::OnSortByTitle03(GuildAcademyWin *this)
{
  GuildAcademyWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  bool v3; // al@2

  v1 = this;
  v2 = this->m_pListWinMember;
  if ( v2 )
  {
    v3 = v1->m_bReverse3 == 0;
    v1->m_nSortColumn = 2;
    v1->m_bReverse3 = v3;
    SlideListWin::Sort(v2, 2, v3, 1);
    SlideListWin::UpdateViewList(v1->m_pListWinMember);
  }
}

//----- (006F3F20) --------------------------------------------------------
void __thiscall GuildAcademyWin::OnSortByTitle04(GuildAcademyWin *this)
{
  GuildAcademyWin *v1; // esi@1
  SlideListWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_pListWinMember;
  if ( v2 )
  {
    v1->m_nSortColumn = 3;
    SlideListWin::Sort(v2, 3, 0, 0);
    SlideListWin::UpdateViewList(v1->m_pListWinMember);
  }
}

//----- (006F3F50) --------------------------------------------------------
void __thiscall GuildAcademyWin::OnSortByTitle05(GuildAcademyWin *this)
{
  GuildAcademyWin *v1; // esi@1
  SlideListWin *v2; // ecx@1

  v1 = this;
  v2 = this->m_pListWinMember;
  if ( v2 )
  {
    v1->m_nSortColumn = 4;
    SlideListWin::Sort(v2, 4, 0, 0);
    SlideListWin::UpdateViewList(v1->m_pListWinMember);
  }
}

//----- (006F3F80) --------------------------------------------------------
void GuildAcademyWin::OnClickJoinBtn()
{
  NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0xBu, 0, 0);
}

//----- (006F3FF0) --------------------------------------------------------
void GuildAcademyWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "GuildAcademyWin");
}

//----- (006F4020) --------------------------------------------------------
void __thiscall GuildAcademyWin::OnWinClose(GuildAcademyWin *this)
{
  GuildAcademyWin *v1; // esi@1

  v1 = this;
  if ( this == (GuildAcademyWin *)g_pkToolTipWin->m_pkToolTipParentWin )
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
  GameFrameWork::CloseCommunityWin((GameFrameWork *)v1->m_pkFrameWork);
}

//----- (006F4050) --------------------------------------------------------
void __thiscall GuildAcademyWin::OnTopWin(GuildAcademyWin *this)
{
  GameFrameWork::SetTopFriendAddWin((GameFrameWork *)this->m_pkFrameWork);
}

//----- (006F4060) --------------------------------------------------------
void __thiscall GuildAcademyWin::ProcessMeInput(GuildAcademyWin *this, bool *bHit)
{
  GuildAcademyWin *v2; // esi@1

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[78].__vecDelDtor)() )
  {
    if ( dword_B64790 )
      ++dword_B64790;
    if ( PgWin::ms_kbRbutPressed.m_iBool )
      ++PgWin::ms_kbRbutPressed.m_iBool;
    PgWinFrame::ProcessMeInput((PgWinFrame *)&v2->vfptr, bHit);
    PgWin::ms_kbRbutPressed.m_bReserveFalse = 0;
    if ( PgWin::ms_kbRbutPressed.m_iBool )
      --PgWin::ms_kbRbutPressed.m_iBool;
    byte_B6478C = 0;
    if ( dword_B64790 )
      --dword_B64790;
  }
}
// B6478C: using guessed type char byte_B6478C;
// B64790: using guessed type int dword_B64790;

//----- (006F40E0) --------------------------------------------------------
void __thiscall GuildAcademyWin::UpdateMeWin(GuildAcademyWin *this, float fCurTime)
{
  GuildAcademyWin *v2; // esi@1

  v2 = this;
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
  {
    GameFrameWork::UpdateUIScroll(v2->m_pListWinNotice, v2->m_pkSlideBarNotice);
    GameFrameWork::UpdateUIScroll(v2->m_pListWinMember, v2->m_pkSlideBarMemberList);
    GameFrameWork::UpdateUIScroll(v2->m_pListWinHistory, v2->m_pkSlideBarHistory);
  }
}

//----- (006F4140) --------------------------------------------------------
void __thiscall GuildAcademyWin::OnLClick(GuildAcademyWin *this, int nItemIndex)
{
  if ( this == (GuildAcademyWin *)g_pkToolTipWin->m_pkToolTipParentWin )
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
}

//----- (006F4160) --------------------------------------------------------
void __thiscall GuildAcademyWin::OnRClick(GuildAcademyWin *this, int nItemIndex)
{
  GuildAcademyWin *v2; // esi@1
  int v3; // edi@3
  int v4; // ebx@3
  unsigned int v5; // eax@3
  Name5 *v6; // eax@4
  CClientGuild *v7; // eax@10
  CClientGuild *v8; // eax@12
  CClientGuild *v9; // eax@14
  PopupMenuWin *v10; // ecx@16
  GUILD_ACADEMY_MEMBER_CLIENT *pkMemberClient; // [sp+Ch] [bp-4h]@3

  v2 = this;
  if ( this == (GuildAcademyWin *)g_pkToolTipWin->m_pkToolTipParentWin )
    ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
  v3 = PgWin::ms_iMsX;
  v4 = PgWin::ms_iMsY;
  v5 = SlideListWin::GetCurSelIndex(v2->m_pListWinMember);
  SlideListWin::GetData(v2->m_pListWinMember, v5, (unsigned int *)&pkMemberClient);
  if ( pkMemberClient )
  {
    v6 = User::GetMainCharID(&g_kUser);
    if ( pkMemberClient->sName.n5_code[0] != v6->n5_code[0]
      || pkMemberClient->sName.n5_code[1] != v6->n5_code[1]
      || pkMemberClient->sName.n5_code[2] != v6->n5_code[2]
      || pkMemberClient->sName.n5_code[3] != v6->n5_code[3]
      || pkMemberClient->sName.n5_code[4] != v6->n5_code[4] )
    {
      ((void (__stdcall *)(_DWORD, _DWORD))v2->m_pkMemberPopupMenu->vfptr[77].__vecDelDtor)(v3, v4);
      PopupMenuWin::Clear(v2->m_pkMemberPopupMenu);
      PopupMenuWin::AddMenu(v2->m_pkMemberPopupMenu, v3, (PopupMenu *)&v2->m_spPopupWhisperChat.m_pObject->vfptr);
      v7 = GuildTask::GetGuild();
      if ( CClientGuild::CanIForbidChat(v7) )
      {
        PopupMenuWin::AddMenu(v2->m_pkMemberPopupMenu, v3, (PopupMenu *)&v2->m_spPopupForbidChat.m_pObject->vfptr);
        PopupMenuWin::AddMenu(v2->m_pkMemberPopupMenu, v3, (PopupMenu *)&v2->m_spPopupPermitChat.m_pObject->vfptr);
      }
      v8 = GuildTask::GetGuild();
      if ( CClientGuild::CanIInvite(v8) )
        PopupMenuWin::AddMenu(v2->m_pkMemberPopupMenu, v3, (PopupMenu *)&v2->m_spPopupInviteGuild.m_pObject->vfptr);
      v9 = GuildTask::GetGuild();
      if ( CClientGuild::AmIGuildMaster(v9) )
        PopupMenuWin::AddMenu(v2->m_pkMemberPopupMenu, v3, (PopupMenu *)&v2->m_spPopupVanish.m_pObject->vfptr);
      v10 = v2->m_pkMemberPopupMenu;
      if ( v10->m_dwMenuCount )
      {
        PopupMenuWin::FinishMenu(v10, 0);
        PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v2->m_pkMemberPopupMenu->vfptr);
        ((void (__stdcall *)(_DWORD))v2->m_pkMemberPopupMenu->vfptr[60].__vecDelDtor)(1);
      }
      else
      {
        PopupMenuWin::Clear(v10);
      }
    }
    else
    {
      PopupMenuWin::Clear(v2->m_pkMemberPopupMenu);
      PgWinMgr::ClosePopupWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkMemberPopupMenu->vfptr);
    }
  }
}

//----- (006F4310) --------------------------------------------------------
void __thiscall GuildAcademyWin::OnChangeTab(GuildAcademyWin *this, DirectUserMsgBody_CommunityTabChanged::TabEnum eTab)
{
  char *v2; // esi@1

  v2 = (char *)&this->vfptr;
  if ( this->m_pkMsgHooker )
  {
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))this->m_pkMsgHooker->vfptr->SendDirectMessage)(40, &eTab, v2);
    if ( *((_DWORD *)v2 + 1) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v2 + 1) + 20))(40, &eTab, v2);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v2 + 20))(v2, 40, &eTab, v2);
}

//----- (006F4370) --------------------------------------------------------
void __stdcall GuildAcademyWin::OnSlideBar(SlideBar *pkSlideBar, SlideListWin *pkSlideListWin)
{
  if ( pkSlideBar )
  {
    if ( pkSlideListWin )
    {
      SlideBar::SetSplitCnt(pkSlideBar, pkSlideListWin->m_nSlideSplitCnt);
      pkSlideListWin->m_nViewStartPos = pkSlideBar->m_nCurPos;
      SlideListWin::UpdateViewList(pkSlideListWin);
    }
  }
}

//----- (006F43B0) --------------------------------------------------------
void __thiscall GuildAcademyWin::OnEditNotice(GuildAcademyWin *this)
{
  GuildAcademyWin *v1; // esi@1
  CClientGuild *v2; // eax@1
  char *v3; // eax@2

  v1 = this;
  v2 = GuildTask::GetGuild();
  if ( CClientGuild::AmIGuildMaster(v2) )
  {
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkNoticeEditor->vfptr);
  }
  else
  {
    v3 = (char *)TextData::Get(0x43C1E7Au);
    MsgBox::Modal(MSGBOX_OK, v3);
  }
}

//----- (006F43F0) --------------------------------------------------------
void __thiscall GuildAcademyWin::OnClickMasterTeleportBtn(GuildAcademyWin *this)
{
  GuildAcademyWin *v1; // esi@1
  CClientGuildAcademy *v2; // eax@1
  unsigned int v3; // eax@2
  int v4; // esi@4
  NiUnsharedGeometryGroup *v5; // edi@4
  GUILD_ACADEMY_MEMBER_CLIENT *pkMemberClient; // [sp+8h] [bp-34h]@2
  PROTO_NC_GUILD_ACADEMY_MASTER_TELEPORT_REQ kProto; // [sp+Ch] [bp-30h]@3
  char acname[21]; // [sp+20h] [bp-1Ch]@3

  v1 = this;
  v2 = GuildAcademyTask::GetGuildAcademy();
  if ( (unsigned __int8)CClientGuildAcademy::AmIGuildAcademyMaster(v2) )
  {
    v3 = SlideListWin::GetCurSelIndex(v1->m_pListWinMember);
    if ( SlideListWin::GetData(v1->m_pListWinMember, v3, (unsigned int *)&pkMemberClient) )
    {
      *(_QWORD *)acname = *(_QWORD *)&pkMemberClient->sName.n5_name[0];
      *(_QWORD *)&acname[8] = *(_QWORD *)&pkMemberClient->sName.n5_code[2];
      *(_DWORD *)&acname[16] = pkMemberClient->sName.n5_code[4];
      acname[20] = 0;
      *(_QWORD *)&kProto.sTargetCharID.n5_code[3] = 0i64;
      *(_QWORD *)&kProto.sTargetCharID.n5_code[1] = 0i64;
      kProto.sTargetCharID.n5_code[0] = 0;
      strncpy(kProto.sTargetCharID.n5_name, acname, 0x14u);
      NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0x1Fu, &kProto, 20);
    }
  }
  else
  {
    v4 = (int)&v1->vfptr;
    v5 = TextData::Get(0x3D634B4Eu);
    if ( *(_DWORD *)(v4 + 4) )
    {
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v4 + 4) + 4))(25, v5, v4);
      if ( *(_DWORD *)(v4 + 4) )
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v4 + 4) + 20))(25, v5, v4);
    }
    (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v4 + 20))(v4, 25, v5, v4);
  }
}

//----- (006F4520) --------------------------------------------------------
void __thiscall GuildAcademyWin::OnClickInvitePartyBtn(GuildAcademyWin *this)
{
  GuildAcademyWin *v1; // esi@1
  int v2; // esi@2
  NiUnsharedGeometryGroup *v3; // edi@2
  CClientGuild *v4; // eax@6
  CClientGuildAcademy *v5; // eax@7
  int v6; // esi@8
  NiUnsharedGeometryGroup *v7; // edi@8
  unsigned int v8; // eax@12
  GameFrameWork *v9; // ecx@13
  GUILD_ACADEMY_MEMBER_CLIENT *pkMemberClient; // [sp+8h] [bp-20h]@12
  char acname[21]; // [sp+Ch] [bp-1Ch]@13

  v1 = this;
  if ( (SlideListWin::GetCurSelIndex(this->m_pListWinMember) & 0x80000000) == 0 )
  {
    v4 = GuildTask::GetGuild();
    if ( (unsigned __int8)CClientGuild::AmIGuildMember(v4)
      || (v5 = GuildAcademyTask::GetGuildAcademy(), CClientGuildAcademy::AmIGuildAcademyMember(v5)) )
    {
      v8 = SlideListWin::GetCurSelIndex(v1->m_pListWinMember);
      if ( SlideListWin::GetData(v1->m_pListWinMember, v8, (unsigned int *)&pkMemberClient) )
      {
        *(_QWORD *)acname = *(_QWORD *)&pkMemberClient->sName.n5_name[0];
        *(_QWORD *)&acname[8] = *(_QWORD *)&pkMemberClient->sName.n5_code[2];
        v9 = (GameFrameWork *)v1->m_pkFrameWork;
        *(_DWORD *)&acname[16] = pkMemberClient->sName.n5_code[4];
        acname[20] = 0;
        GameFrameWork::NcPartyJoinReq(v9, acname);
      }
    }
    else
    {
      v6 = (int)&v1->vfptr;
      v7 = TextData::Get(0x1D2F7C72u);
      if ( *(_DWORD *)(v6 + 4) )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v6 + 4) + 4))(25, v7, v6);
        if ( *(_DWORD *)(v6 + 4) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v6 + 4) + 20))(25, v7, v6);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v6 + 20))(v6, 25, v7, v6);
    }
  }
  else
  {
    v2 = (int)&v1->vfptr;
    v3 = TextData::Get(0x8AA587D4);
    if ( *(_DWORD *)(v2 + 4) )
    {
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v2 + 4) + 4))(25, v3, v2);
      if ( *(_DWORD *)(v2 + 4) )
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v2 + 4) + 20))(25, v3, v2);
    }
    (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v2 + 20))(v2, 25, v3, v2);
  }
}

//----- (006F4680) --------------------------------------------------------
void __thiscall GuildAcademyWin::OnSlideBarMemberList(GuildAcademyWin *this)
{
  SlideListWin *v1; // esi@1
  SlideBar *v2; // edi@1

  v1 = this->m_pListWinMember;
  v2 = this->m_pkSlideBarMemberList;
  if ( v2 )
  {
    if ( v1 )
    {
      SlideBar::SetSplitCnt(v2, v1->m_nSlideSplitCnt);
      v1->m_nViewStartPos = v2->m_nCurPos;
      SlideListWin::UpdateViewList(v1);
    }
  }
}

//----- (006F46C0) --------------------------------------------------------
void __thiscall GuildAcademyWin::OnSlideBarNotice(GuildAcademyWin *this)
{
  SlideListWin *v1; // esi@1
  SlideBar *v2; // edi@1

  v1 = this->m_pListWinNotice;
  v2 = this->m_pkSlideBarNotice;
  if ( v2 )
  {
    if ( v1 )
    {
      SlideBar::SetSplitCnt(v2, v1->m_nSlideSplitCnt);
      v1->m_nViewStartPos = v2->m_nCurPos;
      SlideListWin::UpdateViewList(v1);
    }
  }
}

//----- (006F4700) --------------------------------------------------------
void __thiscall GuildAcademyWin::OnSlideBarHistory(GuildAcademyWin *this)
{
  SlideListWin *v1; // esi@1
  SlideBar *v2; // edi@1

  v1 = this->m_pListWinHistory;
  v2 = this->m_pkSlideBarHistory;
  if ( v2 )
  {
    if ( v1 )
    {
      SlideBar::SetSplitCnt(v2, v1->m_nSlideSplitCnt);
      v1->m_nViewStartPos = v2->m_nCurPos;
      SlideListWin::UpdateViewList(v1);
    }
  }
}

//----- (006F4740) --------------------------------------------------------
NiUnsharedGeometryGroup *__stdcall GuildAcademyWin::GetHistoryText(GUILD_HISTORY_MSG_TYPE hisType)
{
  NiUnsharedGeometryGroup *result; // eax@2

  switch ( hisType )
  {
    case 0x64u:
      result = TextData3::Get(0x4C8D4E49u);
      break;
    case 0x65u:
      result = TextData3::Get(0x4C3D0909u);
      break;
    case 0x66u:
      result = TextData3::Get(0x5435FF50u);
      break;
    case 0x67u:
      result = TextData3::Get(0x498B5859u);
      break;
    default:
      result = 0;
      break;
  }
  return result;
}

//----- (006F47B0) --------------------------------------------------------
void __thiscall GuildAcademyWin::AddListItem_DefInfo(GuildAcademyWin *this, GUILD_ACADEMY_MEMBER_CLIENT *pkData)
{
  GuildAcademyWin *v2; // edi@1
  SlideListWin *v3; // ecx@1
  unsigned int v4; // eax@4
  unsigned int v5; // edx@4
  unsigned int v6; // eax@4
  unsigned int v7; // ebx@4
  char *v8; // eax@4
  const char *v9; // eax@5
  const char *v10; // eax@7
  NiUnsharedGeometryGroup *v11; // eax@7
  const char *v12; // eax@7
  SlideListWin *v13; // ecx@7
  char acname[21]; // [sp+8h] [bp-1Ch]@4

  v2 = this;
  v3 = this->m_pListWinMember;
  if ( v3 && (!v2->m_bShowOnlineOnly || *(_BYTE *)&pkData->dLogonInfo & 1) )
  {
    v4 = pkData->sName.n5_code[0];
    *(_DWORD *)&acname[4] = pkData->sName.n5_code[1];
    v5 = pkData->sName.n5_code[3];
    *(_DWORD *)acname = v4;
    v6 = pkData->sName.n5_code[2];
    *(_DWORD *)&acname[12] = v5;
    *(_DWORD *)&acname[8] = v6;
    *(_DWORD *)&acname[16] = pkData->sName.n5_code[4];
    acname[20] = 0;
    v7 = SlideListWin::AddText(v3, acname);
    v8 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), pkData->nClassID);
    if ( v8 )
      v9 = v8 + 21;
    else
      v9 = (const char *)&unk_96F8EB;
    SlideListWin::SetText(v2->m_pListWinMember, v7, 1u, v9);
    v10 = fs("%d", pkData->nLevel);
    SlideListWin::SetText(v2->m_pListWinMember, v7, 2u, v10);
    v11 = TextData::Get(0x1844307Bu);
    SlideListWin::SetText(v2->m_pListWinMember, v7, 3u, (const char *)v11);
    v12 = fs(
            "%d-%d-%d",
            (*(unsigned int *)&pkData->dJoinInfo >> 1) & 0x7FF,
            (unsigned __int16)*(_DWORD *)&pkData->dJoinInfo >> 12,
            (*(unsigned int *)&pkData->dJoinInfo >> 16) & 0x1F);
    SlideListWin::SetText(v2->m_pListWinMember, v7, 4u, v12);
    SlideListWin::SetData(v2->m_pListWinMember, v7, (unsigned int)pkData);
    SlideListWin::SetFontSize(v2->m_pListWinMember, v7, 1);
    v13 = v2->m_pListWinMember;
    if ( *(_BYTE *)&pkData->dLogonInfo & 1 )
      SlideListWin::SetFontColor(v13, v7, 255, 255, 0);
    else
      SlideListWin::SetFontColor(v13, v7, 200, 200, 200);
  }
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (006F4920) --------------------------------------------------------
void __thiscall GuildAcademyWin::ViewAllInfo(GuildAcademyWin *this, PROTO_FRIEND_INFO *pData)
{
  GuildAcademyWin *v2; // edi@1
  unsigned int v3; // ecx@1
  unsigned int v4; // edx@1
  unsigned int v5; // eax@1
  unsigned int v6; // ecx@1
  char *v7; // eax@1
  NiUnsharedGeometryGroup *v8; // eax@2
  NiUnsharedGeometryGroup *v9; // ST14_4@4
  NiUnsharedGeometryGroup *v10; // eax@4
  NiUnsharedGeometryGroup *v11; // ST10_4@5
  NiUnsharedGeometryGroup *v12; // ST10_4@6
  char *v13; // ST14_4@7
  NiUnsharedGeometryGroup *v14; // eax@7
  unsigned int v15; // eax@7
  int v16; // ST14_4@10
  int v17; // ST10_4@10
  NiUnsharedGeometryGroup *v18; // eax@10
  NiUnsharedGeometryGroup *v19; // eax@8
  char szdata[128]; // [sp+8h] [bp-9Ch]@4
  char acname[21]; // [sp+88h] [bp-1Ch]@1

  v2 = this;
  ToolTipWin::ClearTipText((ToolTipWin *)g_pkToolTipWin);
  v3 = pData->charid.n5_code[1];
  v4 = pData->charid.n5_code[2];
  *(_DWORD *)acname = pData->charid.n5_code[0];
  v5 = pData->charid.n5_code[3];
  *(_DWORD *)&acname[4] = v3;
  v6 = pData->charid.n5_code[4];
  *(_DWORD *)&acname[12] = v5;
  *(_DWORD *)&acname[16] = v6;
  *(_DWORD *)&acname[8] = v4;
  acname[20] = 0;
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))g_pkToolTipWin->vfptr[137].__vecDelDtor)(
    0,
    acname,
    1,
    255,
    255,
    0);
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))g_pkToolTipWin->vfptr[137].__vecDelDtor)(
    1,
    &unk_9C6E26,
    255,
    255,
    255,
    0);
  v7 = CDataReader::GetRecord((CDataReader *)(ITableBase<ClassName,CharClass>::ms_pkTable + 4), pData->classid);
  if ( v7 )
    v8 = (NiUnsharedGeometryGroup *)(v7 + 21);
  else
    v8 = &unk_96F8EB;
  v9 = v8;
  v10 = TextData::Get(0x95A9DAED);
  sprintf(szdata, (const char *)v10, v9);
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))g_pkToolTipWin->vfptr[137].__vecDelDtor)(
    2,
    szdata,
    255,
    255,
    255,
    0);
  sprintf(szdata, "LV : %d", pData->level);
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))g_pkToolTipWin->vfptr[137].__vecDelDtor)(
    3,
    szdata,
    255,
    255,
    255,
    0);
  if ( pData->isparty )
  {
    v11 = TextData::Get(0xEFE6FA48);
    sprintf(szdata, (const char *)v11);
  }
  else
  {
    v12 = TextData::Get(0xA0989BF4);
    sprintf(szdata, (const char *)v12);
  }
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))g_pkToolTipWin->vfptr[137].__vecDelDtor)(
    4,
    szdata,
    255,
    255,
    255,
    0);
  v13 = MapInfoTab::GetByMapName(&pData->map)->Name;
  v14 = TextData::Get(0xDE353F4D);
  sprintf(szdata, (const char *)v14, v13);
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))g_pkToolTipWin->vfptr[137].__vecDelDtor)(
    5,
    szdata,
    255,
    255,
    255,
    0);
  v15 = (unsigned int)pData->logininfo;
  if ( *(_DWORD *)&pData->logininfo & 1 )
  {
    v19 = TextData::Get(0x8F909FD1);
LABEL_12:
    sprintf(szdata, (const char *)v19);
    goto LABEL_13;
  }
  if ( !(v15 & 0xFFE) )
  {
    v19 = TextData::Get(0x94E2F5DB);
    goto LABEL_12;
  }
  v16 = (v15 >> 16) & 0x1F;
  v17 = (unsigned __int16)v15 >> 12;
  v18 = TextData2::Get(0xF1ECBD28);
  sprintf(szdata, (const char *)v18, v17, v16);
LABEL_13:
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))g_pkToolTipWin->vfptr[137].__vecDelDtor)(
    6,
    szdata,
    255,
    255,
    255,
    0);
  ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))g_pkToolTipWin->vfptr[137].__vecDelDtor)(
    7,
    pData->statustitle,
    255,
    255,
    255,
    0);
  ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[139].__vecDelDtor)(v2);
  ((void (__stdcall *)(_DWORD, _DWORD))g_pkToolTipWin->vfptr[77].__vecDelDtor)(PgWin::ms_iMsX, PgWin::ms_iMsY);
}
// A88688: using guessed type int ITableBase<ClassName,CharClass>::ms_pkTable;

//----- (006F4C10) --------------------------------------------------------
void __thiscall GuildAcademyWin::InvalidateGuildAcademyHistoryList(GuildAcademyWin *this)
{
  GuildAcademyWin *v1; // edi@1
  SlideListWin *v2; // ecx@1
  CClientGuildAcademy *v3; // eax@2
  NiTListItem<GUILD_HISTORY *> *v4; // ecx@3
  unsigned int v5; // eax@3
  unsigned int v6; // esi@6
  NiTListItem<GUILD_HISTORY *> *v7; // ecx@6
  NiUnsharedGeometryGroup *v8; // eax@7
  const char *v9; // eax@12
  unsigned int v10; // ebx@12
  NiTListItem<GUILD_HISTORY *> *kIter; // [sp+4h] [bp-28h]@6
  unsigned int v12; // [sp+8h] [bp-24h]@4
  char *pkHistoryText; // [sp+Ch] [bp-20h]@11
  char acName[21]; // [sp+10h] [bp-1Ch]@6

  v1 = this;
  v2 = this->m_pListWinHistory;
  if ( v2 )
  {
    SlideListWin::RemoveAllList(v2);
    v3 = GuildAcademyTask::GetGuildAcademy();
    if ( v3 )
    {
      v4 = v3->m_kHistoryList.m_pkHead;
      v5 = v3->m_kHistoryList.m_kAllocator.m_uiCount;
      if ( v5 )
      {
        v12 = v5;
        while ( 1 )
        {
          v6 = (unsigned int)&v4->m_element->nHistoryNumber;
          v7 = v4->m_pkNext;
          *(_DWORD *)acName = *(_DWORD *)(v6 + 8);
          *(_DWORD *)&acName[4] = *(_DWORD *)(v6 + 12);
          kIter = v7;
          *(_DWORD *)&acName[8] = *(_DWORD *)(v6 + 16);
          *(_DWORD *)&acName[12] = *(_DWORD *)(v6 + 20);
          *(_DWORD *)&acName[16] = *(_DWORD *)(v6 + 24);
          acName[20] = 0;
          switch ( *(_DWORD *)(v6 + 28) )
          {
            case 0x64:
              v8 = TextData3::Get(0x4C8D4E49u);
              goto LABEL_11;
            case 0x65:
              v8 = TextData3::Get(0x4C3D0909u);
              goto LABEL_11;
            case 0x66:
              v8 = TextData3::Get(0x5435FF50u);
              goto LABEL_11;
            case 0x67:
              v8 = TextData3::Get(0x498B5859u);
LABEL_11:
              pkHistoryText = (char *)v8;
              if ( v8 )
              {
                v9 = fs("%d-%d-%d", *(_WORD *)(v6 + 4), *(_BYTE *)(v6 + 6), *(_BYTE *)(v6 + 7));
                v10 = SlideListWin::AddText(v1->m_pListWinHistory, v9);
                SlideListWin::SetText(v1->m_pListWinHistory, v10, 1u, acName);
                SlideListWin::SetText(v1->m_pListWinHistory, v10, 2u, pkHistoryText);
                SlideListWin::SetData(v1->m_pListWinHistory, v10, v6);
                SlideListWin::SetFontSize(v1->m_pListWinHistory, v10, 1);
              }
              break;
            default:
              break;
          }
          if ( !--v12 )
            break;
          v4 = kIter;
        }
      }
      SlideListWin::AlignText(v1->m_pListWinHistory, 4u);
      SlideListWin::AlignText(v1->m_pListWinHistory, 0, 5u);
      SlideListWin::AlignText(v1->m_pListWinHistory, 1u, 4u);
      SlideListWin::AlignText(v1->m_pListWinHistory, 2u, 4u);
      SlideListWin::UpdateViewList(v1->m_pListWinHistory);
    }
  }
}

//----- (006F4DB0) --------------------------------------------------------
void __thiscall GuildAcademyWin::UpdateViewList(GuildAcademyWin *this)
{
  GuildAcademyWin *v1; // esi@1
  CClientGuildAcademyMember *v2; // ebx@3
  signed int v3; // edi@3
  GUILD_ACADEMY_MEMBER_CLIENT *pkData; // [sp+4h] [bp-4h]@4

  v1 = this;
  if ( this->m_pListWinMember && (unsigned __int8)((int (*)(void))this->m_pListWinMember->vfptr[65].__vecDelDtor)() )
  {
    SlideListWin::RemoveAllList(v1->m_pListWinMember);
    v2 = GuildAcademyMemberTask::GetGuildAcademyMember();
    v3 = 0;
    if ( v2->m_NumOfAcademyMembers > 0u )
    {
      pkData = v2->m_AcademyMembers;
      do
      {
        if ( v1->m_bDefaultView )
          GuildAcademyWin::AddListItem_DefInfo(v1, pkData);
        ++pkData;
        ++v3;
      }
      while ( v3 < v2->m_NumOfAcademyMembers );
    }
    SlideListWin::Sort(v1->m_pListWinMember, v1->m_nSortColumn, 0, 0);
    SlideListWin::AlignText(v1->m_pListWinMember, 4u);
    SlideListWin::AlignText(v1->m_pListWinMember, 0, 5u);
    SlideListWin::AlignText(v1->m_pListWinMember, 1u, 5u);
    SlideListWin::AlignText(v1->m_pListWinMember, 2u, 5u);
    SlideListWin::AlignText(v1->m_pListWinMember, 3u, 5u);
    SlideListWin::AlignText(v1->m_pListWinMember, 4u, 5u);
    SlideListWin::UpdateViewList(v1->m_pListWinMember);
    SlideBar::SetSplitCnt(v1->m_pkSlideBarMemberList, v1->m_pListWinMember->m_nSlideSplitCnt);
  }
}

//----- (006F4EC0) --------------------------------------------------------
void __thiscall GuildAcademyWin::ChangeUserName(GuildAcademyWin *this, Name5 OldName, Name5 NewName)
{
  GuildAcademyWin *v3; // ebx@1
  SlideListWin *v4; // ecx@1
  CClientGuildAcademy *v5; // esi@2
  CClientGuildAcademyMember *v6; // edi@2
  GuildAcademyRankingWin *v7; // eax@2
  int v8; // edx@2
  int v9; // eax@2
  int v10; // ecx@3
  NiRefObjectVtbl *v11; // esi@12
  char *v12; // eax@12
  int v13; // eax@14
  char acNewName[21]; // [sp+8h] [bp-1Ch]@8

  v3 = this;
  v4 = this->m_pListWinMember;
  if ( v4 )
  {
    SlideListWin::RemoveAllList(v4);
    v5 = GuildAcademyTask::GetGuildAcademy();
    v6 = GuildAcademyMemberTask::GetGuildAcademyMember();
    v7 = GuildAcademyTask::GetGuildAcademyRankingWin();
    GuildAcademyRankingWin::ChangeUserName(v7, &OldName, &NewName);
    v8 = v6->m_NumOfAcademyMembers;
    v9 = 0;
    if ( v8 <= 0 )
    {
LABEL_8:
      *(_QWORD *)&acNewName[8] = *(_QWORD *)&NewName.n5_code[2];
      *(_QWORD *)acNewName = *(_QWORD *)&NewName.n5_name[0];
      *(_DWORD *)&acNewName[16] = NewName.n5_code[4];
      acNewName[20] = 0;
      if ( NewName.n5_name[0]
        && v5->m_GuildAcademy.sAcademyMasterName.n5_code[0] == OldName.n5_code[0]
        && *(_QWORD *)&v5->m_GuildAcademy.sAcademyMasterName.n5_code[1] == *(_QWORD *)&OldName.n5_code[1]
        && *(_QWORD *)&v5->m_GuildAcademy.sAcademyMasterName.n5_code[3] == *(_QWORD *)&OldName.n5_code[3] )
      {
        v5->m_GuildAcademy.sAcademyMasterName.n5_code[0] = NewName.n5_code[0];
        *(_QWORD *)&v5->m_GuildAcademy.sAcademyMasterName.n5_code[1] = *(_QWORD *)&NewName.n5_code[1];
        *(_QWORD *)&v5->m_GuildAcademy.sAcademyMasterName.n5_code[3] = *(_QWORD *)&NewName.n5_code[3];
        v11 = v3->m_pkGuildAcademyInfoTxt[0]->vfptr;
        v12 = fs("¾ÆÄ«µ¥¹Ì ¸¶½ºÅÍ : %s", acNewName);
        v11[118].__vecDelDtor((NiRefObject *)v3->m_pkGuildAcademyInfoTxt[0], (unsigned int)v12);
      }
    }
    else
    {
      v10 = (int)&v6->m_AcademyMembers[0].sName.n5_code[2];
      while ( __PAIR__(*(_DWORD *)(v10 - 4), *(_DWORD *)(v10 - 8)) != *(_QWORD *)&OldName.n5_name[0]
           || *(_QWORD *)v10 != *(_QWORD *)&OldName.n5_code[2]
           || *(_DWORD *)(v10 + 8) != OldName.n5_code[4] )
      {
        ++v9;
        v10 += 109;
        if ( v9 >= v8 )
          goto LABEL_8;
      }
      v13 = (int)&v6->m_AcademyMembers[v9];
      *(_QWORD *)v13 = *(_QWORD *)&NewName.n5_name[0];
      *(_QWORD *)(v13 + 8) = *(_QWORD *)&NewName.n5_code[2];
      *(_DWORD *)(v13 + 16) = NewName.n5_code[4];
      GuildAcademyWin::UpdateViewList(v3);
    }
  }
}

//----- (006F5060) --------------------------------------------------------
void __thiscall GuildAcademyWin::InvalidateAcademy(GuildAcademyWin *this)
{
  GuildAcademyWin *v1; // esi@1
  CClientGuild *v2; // ebx@2
  CClientGuildAcademy *v3; // edi@2
  CClientGuild *v4; // eax@2
  bool v5; // al@2
  void *(__thiscall *v6)(NiRefObject *, unsigned int); // edx@2
  int v7; // ebx@7
  unsigned int v8; // ecx@10
  unsigned int v9; // edx@10
  unsigned int v10; // ecx@10
  NiRefObjectVtbl **v11; // edx@10
  NiRefObjectVtbl *v12; // ebx@10
  char *v13; // eax@10
  char *v14; // eax@10
  NiRefObjectVtbl *v15; // ebx@10
  int v16; // ST28_4@10
  unsigned int v17; // ST24_4@10
  char *v18; // eax@10
  char *v19; // eax@10
  NiRefObjectVtbl *v20; // ebx@10
  unsigned int v21; // ST28_4@10
  char *v22; // eax@10
  char *v23; // eax@10
  NiRefObjectVtbl *v24; // ebx@10
  unsigned int v25; // ST28_4@10
  char *v26; // eax@10
  char *v27; // eax@10
  signed int v28; // ecx@10
  unsigned int v29; // edx@10
  int v30; // ST28_4@10
  int v31; // ST24_4@10
  char *v32; // eax@10
  char *v33; // eax@10
  unsigned int v34; // ecx@14
  unsigned int v35; // edx@14
  unsigned int v36; // ecx@14
  unsigned int v37; // edx@14
  NiUnsharedGeometryGroup *v38; // eax@14
  NiUnsharedGeometryGroup *v39; // eax@14
  NiUnsharedGeometryGroup *v40; // eax@14
  const char *v41; // eax@14
  NiUnsharedGeometryGroup *v42; // eax@14
  const char *v43; // eax@14
  NiUnsharedGeometryGroup *v44; // eax@14
  const char *v45; // eax@14
  SlideListWin *v46; // eax@14
  ColumnBut **v47; // edx@16
  PgWinText *v48; // eax@17
  char *v49; // edi@21
  int v50; // eax@23
  unsigned int v51; // edi@23
  unsigned int v52; // eax@23
  unsigned int v53; // ebx@27
  const void *v54; // eax@29
  SlideListWin *v55; // ecx@31
  const char *v56; // eax@34
  HDC__ *hDC; // [sp+10h] [bp-490h]@20
  unsigned int found; // [sp+14h] [bp-48Ch]@23
  char _Ptr; // [sp+18h] [bp-488h]@20
  int lengthSize; // [sp+1Ch] [bp-484h]@2
  PgWinText *pkTestWin; // [sp+20h] [bp-480h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strNotice; // [sp+24h] [bp-47Ch]@20
  char pcTemp[512]; // [sp+40h] [bp-460h]@14
  char acStr[256]; // [sp+240h] [bp-260h]@20
  char buffer[256]; // [sp+340h] [bp-160h]@27
  char acDateTime[32]; // [sp+440h] [bp-60h]@14
  char acAuthor[21]; // [sp+460h] [bp-40h]@14
  char acname[21]; // [sp+478h] [bp-28h]@10
  int v69; // [sp+49Ch] [bp-4h]@20

  v1 = this;
  GuildAcademyWin::UpdateViewList(this);
  if ( !v1->m_kTabIndex )
  {
    v2 = GuildTask::GetGuild();
    lengthSize = (int)v2;
    v3 = GuildAcademyTask::GetGuildAcademy();
    pkTestWin = (PgWinText *)GuildAcademyMemberTask::GetGuildAcademyMember();
    v4 = GuildTask::GetGuild();
    v5 = CClientGuild::AmIGuildMaster(v4);
    v6 = v1->m_pkEditNoticeBtn->vfptr[64].__vecDelDtor;
    if ( v5 )
      ((void (__stdcall *)(signed int))v6)(1);
    else
      ((void (__stdcall *)(_DWORD))v6)(0);
    if ( CClientGuildAcademy::AmIGuildAcademyMember(v3) || (unsigned __int8)CClientGuild::AmIGuildMember(v2) )
    {
      v8 = v3->m_GuildAcademy.sAcademyMasterName.n5_code[1];
      v9 = v3->m_GuildAcademy.sAcademyMasterName.n5_code[2];
      *(_DWORD *)acname = v3->m_GuildAcademy.sAcademyMasterName.n5_code[0];
      *(_DWORD *)&acname[12] = v3->m_GuildAcademy.sAcademyMasterName.n5_code[3];
      *(_DWORD *)&acname[4] = v8;
      v10 = v3->m_GuildAcademy.sAcademyMasterName.n5_code[4];
      *(_DWORD *)&acname[8] = v9;
      v11 = &v1->m_pkGuildAcademyInfoTxt[0]->vfptr;
      *(_DWORD *)&acname[16] = v10;
      acname[20] = 0;
      v12 = *v11;
      v13 = (char *)TextData3::Get(0x70B4C7CAu);
      v14 = fs(v13, acname);
      v12[118].__vecDelDtor((NiRefObject *)v1->m_pkGuildAcademyInfoTxt[0], (unsigned int)v14);
      ((void (__stdcall *)(signed int))v1->m_pkGuildAcademyInfoTxt[0]->vfptr[64].__vecDelDtor)(1);
      v15 = v1->m_pkGuildAcademyInfoTxt[1]->vfptr;
      v16 = LOWORD(pkTestWin->m_uiRefCount);
      v17 = CClientGuildAcademyMember::GetNumOfOnlineMembers((CClientGuildAcademyMember *)pkTestWin);
      v18 = (char *)TextData3::Get(0x9DA4BDA3);
      v19 = fs(v18, v17, v16);
      v15[118].__vecDelDtor((NiRefObject *)v1->m_pkGuildAcademyInfoTxt[1], (unsigned int)v19);
      ((void (__stdcall *)(signed int))v1->m_pkGuildAcademyInfoTxt[1]->vfptr[64].__vecDelDtor)(1);
      v20 = v1->m_pkGuildAcademyInfoTxt[2]->vfptr;
      v21 = v3->m_GuildAcademy.nAcademyPoint;
      v22 = (char *)TextData3::Get(0x5F67u);
      v23 = fs(v22, v21);
      v20[118].__vecDelDtor((NiRefObject *)v1->m_pkGuildAcademyInfoTxt[2], (unsigned int)v23);
      ((void (__stdcall *)(signed int))v1->m_pkGuildAcademyInfoTxt[2]->vfptr[64].__vecDelDtor)(1);
      v24 = v1->m_pkGuildAcademyInfoTxt[3]->vfptr;
      v25 = v3->m_GuildAcademy.nAcademyRank;
      v26 = (char *)TextData3::Get(0x7C862DFCu);
      v27 = fs(v26, v25);
      v24[118].__vecDelDtor((NiRefObject *)v1->m_pkGuildAcademyInfoTxt[3], (unsigned int)v27);
      ((void (__stdcall *)(signed int))v1->m_pkGuildAcademyInfoTxt[3]->vfptr[64].__vecDelDtor)(1);
      v28 = v3->m_GuildAcademy.dAcademyBuffUntilTime;
      v29 = v28 % 3600 + ((unsigned __int64)(-2004318071i64 * (v28 % 3600)) >> 32);
      v30 = ((signed int)v29 >> 5) + (v29 >> 31);
      v31 = v28 / 3600;
      pkTestWin = (PgWinText *)&v1->m_pkGuildAcademyInfoTxt[4]->vfptr[118];
      v32 = (char *)TextData2::Get(0xEFCFDD01);
      v33 = fs(v32, v31, v30);
      ((void (__thiscall *)(PgWinText *, char *))pkTestWin->vfptr)(v1->m_pkGuildAcademyInfoTxt[4], v33);
      ((void (__stdcall *)(signed int))v1->m_pkGuildAcademyInfoTxt[4]->vfptr[64].__vecDelDtor)(1);
    }
    else
    {
      v7 = (int)v1->m_pkGuildAcademyInfoTxt;
      pkTestWin = (PgWinText *)5;
      do
      {
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v7 + 256))(0);
        v7 += 4;
        pkTestWin = (PgWinText *)((char *)pkTestWin - 1);
      }
      while ( pkTestWin );
    }
    SlideListWin::RemoveAllList(v1->m_pListWinNotice);
    if ( (unsigned __int8)CClientGuild::AmIGuildMember((CClientGuild *)lengthSize)
      || CClientGuildAcademy::AmIGuildAcademyMember(v3) )
    {
      if ( v3->m_GuildAcademy.sNotify[0] )
      {
        v34 = v3->m_GuildAcademy.sNotifyCharID.n5_code[0];
        v35 = v3->m_GuildAcademy.sNotifyCharID.n5_code[1];
        *(_DWORD *)&acAuthor[8] = v3->m_GuildAcademy.sNotifyCharID.n5_code[2];
        *(_DWORD *)acAuthor = v34;
        v36 = v3->m_GuildAcademy.sNotifyCharID.n5_code[3];
        *(_DWORD *)&acAuthor[4] = v35;
        v37 = v3->m_GuildAcademy.sNotifyCharID.n5_code[4];
        *(_DWORD *)&acAuthor[12] = v36;
        *(_DWORD *)&acAuthor[16] = v37;
        acAuthor[20] = 0;
        pcTemp[0] = 0;
        memset(&pcTemp[1], 0, 0x1FFu);
        v38 = TextData2::Get(0x1A2B4123u);
        sprintf(pcTemp, "%s", v38);
        strftime(acDateTime, 0x1Fu, pcTemp, &v3->m_GuildAcademy.tm_dNotifyDate);
        SlideListWin::AddText(v1->m_pListWinNotice, &byte_9C6E27);
        v39 = TextData3::Get(0xB454C62u);
        SlideListWin::AddText(v1->m_pListWinNotice, (const char *)v39);
        SlideListWin::AddText(v1->m_pListWinNotice, &byte_9C6E2E);
        v40 = TextData::Get(0x8693CAE1);
        v41 = fs("%s : %s", v40, acAuthor);
        SlideListWin::AddText(v1->m_pListWinNotice, v41);
        v42 = TextData::Get(0x83936495);
        v43 = fs("%s : %s", v42, acDateTime);
        SlideListWin::AddText(v1->m_pListWinNotice, v43);
        SlideListWin::AddText(v1->m_pListWinNotice, &byte_9C6E2F);
        v44 = TextData::Get(0xE5E1C0D9);
        v45 = fs("%s :", v44);
        SlideListWin::AddText(v1->m_pListWinNotice, v45);
        SlideListWin::AddText(v1->m_pListWinNotice, byte_9C6E46);
        strcpy(pcTemp, v3->m_GuildAcademy.sNotify);
        v46 = v1->m_pListWinNotice;
        if ( v46->m_vecButList._Mylast - v46->m_vecButList._Myfirst )
        {
          v47 = v46->m_vecButList._Myfirst;
          if ( (*v47)->m_vecTextWin._Mylast - (*v47)->m_vecTextWin._Myfirst )
            v48 = *(*v47)->m_vecTextWin._Myfirst;
          else
            v48 = 0;
          pkTestWin = v48;
        }
        else
        {
          pkTestWin = 0;
        }
        hDC = pkTestWin->m_spTextGeom.m_pObject->m_spPgFont.m_pObject->m_kFontRenderStuff.hDC;
        acStr[0] = 0;
        memset(&acStr[1], 0, 0xFFu);
        strNotice._Myres = 15;
        strNotice._Mysize = 0;
        strNotice._Bx._Buf[0] = 0;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strNotice, pcTemp, strlen(pcTemp));
        v69 = 0;
        _Ptr = 10;
        while ( 1 )
        {
          memset(acStr, 0, 0x100u);
          v49 = strNotice._Bx._Ptr;
          if ( strNotice._Myres < 0x10 )
            v49 = (char *)&strNotice;
          v50 = ((int (*)(void))pkTestWin->vfptr[36].__vecDelDtor)();
          v51 = PgUtil::StringPixelCopy(acStr, v49, hDC, v50 - 10);
          v52 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::find(&strNotice, &_Ptr, 0, 1u);
          found = v52;
          if ( !v51 )
            break;
          if ( v52 > v51 || (lengthSize = v52, v52 == -1) )
            lengthSize = v51;
          buffer[0] = 0;
          memset(&buffer[1], 0, 0xFFu);
          v53 = lengthSize;
          if ( strNotice._Mysize < lengthSize )
            v53 = strNotice._Mysize;
          v54 = strNotice._Bx._Ptr;
          if ( strNotice._Myres < 0x10 )
            v54 = &strNotice;
          memcpy_s(buffer, 0x100u, v54, v53);
          v55 = v1->m_pListWinNotice;
          buffer[v53] = 0;
          SlideListWin::AddText(v55, buffer);
          if ( found > v51 )
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::erase(&strNotice, 0, lengthSize);
          else
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::erase(&strNotice, 0, lengthSize + 1);
        }
        v56 = strNotice._Bx._Ptr;
        if ( strNotice._Myres < 0x10 )
          v56 = (const char *)&strNotice;
        SlideListWin::AddText(v1->m_pListWinNotice, v56);
        SlideListWin::AlignText(v1->m_pListWinNotice, 4u);
        SlideListWin::UpdateViewList(v1->m_pListWinNotice);
        SlideBar::SetSplitCnt(v1->m_pkSlideBarNotice, v1->m_pListWinMember->m_nSlideSplitCnt);
        v69 = -1;
        if ( strNotice._Myres >= 0x10 )
          operator delete(strNotice._Bx._Ptr);
        strNotice._Myres = 15;
        strNotice._Mysize = 0;
        strNotice._Bx._Buf[0] = 0;
      }
    }
  }
  GuildAcademyWin::InvalidateGuildAcademyHistoryList(v1);
}

//----- (006F5770) --------------------------------------------------------
void __thiscall GuildAcademyWin::DeleteUser(GuildAcademyWin *this, Name5 kName)
{
  GuildAcademyWin *v2; // esi@1
  CClientGuildAcademyMember *v3; // eax@2
  PROTO_NC_GUILD_ACADEMY_MEMBER_LEAVE_CMD pkProto; // [sp+4h] [bp-18h]@2

  v2 = this;
  if ( this->m_pListWinMember )
  {
    v3 = GuildAcademyMemberTask::GetGuildAcademyMember();
    pkProto.CharID = kName;
    if ( !v3 || v3->vfptr->Recv_NC_GUILD_ACADEMY_MEMBER_LEAVE_CMD((CGuildAcademyMember *)v3, &pkProto) )
      GuildAcademyWin::InvalidateAcademy(v2);
  }
}

//----- (006F57E0) --------------------------------------------------------
void __thiscall GuildAcademyWin::~GuildAcademyWin(GuildAcademyWin *this)
{
  GuildAcademyWin *v1; // esi@1
  PopupMenuText *v2; // edi@1
  PopupMenuText *v3; // edi@5
  PopupMenuText *v4; // edi@9
  PopupMenuText *v5; // edi@13
  PopupMenuText *v6; // edi@17
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v7; // ST08_4@21
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v8; // ST04_4@21
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > result; // [sp+10h] [bp-18h]@21
  std::map<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> > > *v10; // [sp+14h] [bp-14h]@21
  GuildAcademyWin *v11; // [sp+18h] [bp-10h]@1
  int v12; // [sp+24h] [bp-4h]@1

  v1 = this;
  v11 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildAcademyWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildAcademyWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spPopupVanish.m_pObject;
  v12 = 5;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_spPopupPermitChat.m_pObject;
  LOBYTE(v12) = 4;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v4 = v1->m_spPopupForbidChat.m_pObject;
  LOBYTE(v12) = 3;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v5 = v1->m_spPopupInviteGuild.m_pObject;
  LOBYTE(v12) = 2;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  v6 = v1->m_spPopupWhisperChat.m_pObject;
  LOBYTE(v12) = 1;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  v10 = &v1->map_WinIndex;
  v7._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->map_WinIndex._Myhead;
  v8._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->map_WinIndex._Myhead->_Left;
  LOBYTE(v12) = 6;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->map_WinIndex,
    &result,
    v8,
    v7);
  operator delete(v1->map_WinIndex._Myhead);
  v12 = -1;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9C74F8: using guessed type void (__thiscall *GuildAcademyWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C7514: using guessed type int (__thiscall *GuildAcademyWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006F5930) --------------------------------------------------------
void __thiscall GuildAcademyWin::DirectMessage(GuildAcademyWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  GuildAcademyWin *v4; // edi@1
  SlideListWin *v5; // ecx@1
  signed int v6; // eax@2
  GUILD_ACADEMY_MEMBER_CLIENT *v7; // esi@8
  unsigned int v8; // edx@10
  GuildAcademyMemberVanishTask *v9; // eax@11
  unsigned __int16 v10; // [sp-Ch] [bp-34h]@9
  PROTO_NC_GUILD_ACADEMY_MEMBER_CHAT_BAN_CANCEL_REQ *v11; // [sp-8h] [bp-30h]@9
  GUILD_ACADEMY_MEMBER_CLIENT *pkMemberClient; // [sp+8h] [bp-20h]@7
  PROTO_NC_GUILD_ACADEMY_MEMBER_CHAT_BAN_CANCEL_REQ kProto; // [sp+Ch] [bp-1Ch]@8
  char v14; // [sp+20h] [bp-8h]@8

  v4 = this;
  v5 = (SlideListWin *)LODWORD(this->m_kWorld.m_fScale);
  if ( v5 )
  {
    v6 = SlideListWin::GetCurSelIndex(v5);
    if ( v6 >= 0 )
    {
      switch ( iMsgTag )
      {
        case 9:
        case 12:
          if ( &v4[-1].244 == ($31508301A7441FA869AF5D631E4A4428 *)g_pkToolTipWin->m_pkToolTipParentWin )
            ((void (__stdcall *)(_DWORD))g_pkToolTipWin->vfptr[64].__vecDelDtor)(0);
          break;
        case 71:
          GuildAcademyWin::InvalidateAcademy((GuildAcademyWin *)((char *)v4 - 232));
          break;
        case 15:
          SlideListWin::GetData((SlideListWin *)LODWORD(v4->m_kWorld.m_fScale), v6, (unsigned int *)&pkMemberClient);
          switch ( *(_DWORD *)pvBody )
          {
            case 0x3EE:
              v7 = pkMemberClient;
              Name5::n_string(&pkMemberClient->sName, kProto.sChatBanCancelTargetCharID.n5_name);
              v14 = 0;
              *(_QWORD *)&GameFrameWork::m_kWhisperCharID.n5_name[0] = *(_QWORD *)&v7->sName.n5_name[0];
              *(_QWORD *)&GameFrameWork::m_kWhisperCharID.n5_code[2] = *(_QWORD *)&v7->sName.n5_code[2];
              GameFrameWork::m_kWhisperCharID.n5_code[4] = v7->sName.n5_code[4];
              GameFrameWork::OnWhisperChatStart(
                (GameFrameWork *)LODWORD(v4->m_kLocal.m_Rotate.m_pEntry[1][0]),
                kProto.sChatBanCancelTargetCharID.n5_name);
              return;
            case 0x3EF:
              *(_QWORD *)&kProto.sChatBanCancelTargetCharID.n5_code[3] = 0i64;
              *(_QWORD *)&kProto.sChatBanCancelTargetCharID.n5_code[1] = 0i64;
              kProto.sChatBanCancelTargetCharID.n5_code[0] = 0;
              *(_QWORD *)&kProto.sChatBanCancelTargetCharID.n5_name[0] = *(_QWORD *)&pkMemberClient->sName.n5_name[0];
              kProto.sChatBanCancelTargetCharID.n5_code[2] = pkMemberClient->sName.n5_code[2];
              *(_QWORD *)&kProto.sChatBanCancelTargetCharID.n5_code[3] = pkMemberClient->sName.n5_code[3];
              v11 = &kProto;
              kProto.sChatBanCancelTargetCharID.n5_code[4] = pkMemberClient->sName.n5_code[4];
              v10 = 41;
              goto LABEL_14;
            case 0x3F0:
              *(_QWORD *)&kProto.sChatBanCancelTargetCharID.n5_code[2] = 0i64;
              *(_QWORD *)&kProto.sChatBanCancelTargetCharID.n5_name[0] = 0i64;
              *(_QWORD *)&kProto.sChatBanCancelTargetCharID.n5_name[0] = *(_QWORD *)&pkMemberClient->sName.n5_name[0];
              *(_QWORD *)&kProto.sChatBanCancelTargetCharID.n5_code[2] = pkMemberClient->sName.n5_code[2];
              *(_QWORD *)&kProto.sChatBanCancelTargetCharID.n5_code[3] = pkMemberClient->sName.n5_code[3];
              v8 = pkMemberClient->sName.n5_code[4];
              v11 = &kProto;
              v10 = 33;
              goto LABEL_13;
            case 0x3F2:
              v9 = ISingletonTask<GuildAcademyMemberVanishTask>::Run();
              GuildAcademyMemberVanishTask::SetInfo(v9, &pkMemberClient->sName);
              break;
            case 0x3F1:
              *(_QWORD *)&kProto.sChatBanCancelTargetCharID.n5_code[2] = 0i64;
              *(_QWORD *)&kProto.sChatBanCancelTargetCharID.n5_name[0] = 0i64;
              *(_QWORD *)&kProto.sChatBanCancelTargetCharID.n5_name[0] = *(_QWORD *)&pkMemberClient->sName.n5_name[0];
              *(_QWORD *)&kProto.sChatBanCancelTargetCharID.n5_code[2] = pkMemberClient->sName.n5_code[2];
              *(_QWORD *)&kProto.sChatBanCancelTargetCharID.n5_code[3] = pkMemberClient->sName.n5_code[3];
              v8 = pkMemberClient->sName.n5_code[4];
              v11 = &kProto;
              v10 = 138;
LABEL_13:
              kProto.sChatBanCancelTargetCharID.n5_code[4] = v8;
LABEL_14:
              NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, v10, v11, 20);
              break;
            default:
              return;
          }
          break;
        default:
          return;
      }
    }
  }
}

//----- (006F5BB0) --------------------------------------------------------
void __thiscall GuildAcademyWin::OnTab01(GuildAcademyWin *this)
{
  GuildAcademyWin *v1; // edi@1
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v3; // esi@1
  PgWin *v4; // ecx@2
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v5; // eax@5
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *j; // eax@6
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *i; // eax@9

  v1 = this;
  v2 = this->map_WinIndex._Myhead;
  this->m_kTabIndex = 0;
  v3 = v2->_Left;
  if ( v2->_Left != v2 )
  {
    do
    {
      v4 = v3->_Myval.first;
      if ( v4 )
        ((void (__stdcall *)(_DWORD))v4->vfptr[64].__vecDelDtor)(v3->_Myval.second == 0);
      if ( !v3->_Isnil )
      {
        v5 = v3->_Right;
        if ( v5->_Isnil )
        {
          for ( i = v3->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v3 != i->_Right )
              break;
            v3 = i;
          }
          v3 = i;
        }
        else
        {
          v3 = v3->_Right;
          for ( j = v5->_Left; !j->_Isnil; j = j->_Left )
            v3 = j;
        }
      }
    }
    while ( v3 != v1->map_WinIndex._Myhead );
  }
  GuildAcademyWin::InvalidateAcademy(v1);
  v1->m_pkTab01->m_bCheck = 1;
  v1->m_pkTab02->m_bCheck = 0;
  v1->m_pkTab03->m_bCheck = 0;
}

//----- (006F5C70) --------------------------------------------------------
void __thiscall GuildAcademyWin::OnTab02(GuildAcademyWin *this)
{
  GuildAcademyWin *v1; // edi@1
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v4; // eax@3
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *j; // eax@4
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *i; // eax@7

  v1 = this;
  v2 = this->map_WinIndex._Myhead;
  this->m_kTabIndex = 1;
  v3 = v2->_Left;
  if ( v2->_Left != v2 )
  {
    do
    {
      ((void (__stdcall *)(_DWORD))v3->_Myval.first->vfptr[64].__vecDelDtor)(v3->_Myval.second == 1);
      if ( !v3->_Isnil )
      {
        v4 = v3->_Right;
        if ( v4->_Isnil )
        {
          for ( i = v3->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v3 != i->_Right )
              break;
            v3 = i;
          }
          v3 = i;
        }
        else
        {
          v3 = v3->_Right;
          for ( j = v4->_Left; !j->_Isnil; j = j->_Left )
            v3 = j;
        }
      }
    }
    while ( v3 != v1->map_WinIndex._Myhead );
  }
  GuildAcademyWin::InvalidateAcademy(v1);
  v1->m_pkTab01->m_bCheck = 0;
  v1->m_pkTab02->m_bCheck = 1;
  v1->m_pkTab03->m_bCheck = 0;
}

//----- (006F5D30) --------------------------------------------------------
void __thiscall GuildAcademyWin::OnTab03(GuildAcademyWin *this)
{
  GuildAcademyWin *v1; // edi@1
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v4; // eax@3
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *j; // eax@4
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *i; // eax@7

  v1 = this;
  v2 = this->map_WinIndex._Myhead;
  this->m_kTabIndex = 2;
  v3 = v2->_Left;
  if ( v2->_Left != v2 )
  {
    do
    {
      ((void (__stdcall *)(_DWORD))v3->_Myval.first->vfptr[64].__vecDelDtor)(v3->_Myval.second == 2);
      if ( !v3->_Isnil )
      {
        v4 = v3->_Right;
        if ( v4->_Isnil )
        {
          for ( i = v3->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v3 != i->_Right )
              break;
            v3 = i;
          }
          v3 = i;
        }
        else
        {
          v3 = v3->_Right;
          for ( j = v4->_Left; !j->_Isnil; j = j->_Left )
            v3 = j;
        }
      }
    }
    while ( v3 != v1->map_WinIndex._Myhead );
  }
  GuildAcademyWin::InvalidateAcademy(v1);
  v1->m_pkTab01->m_bCheck = 0;
  v1->m_pkTab02->m_bCheck = 0;
  v1->m_pkTab03->m_bCheck = 1;
}

//----- (006F5DF0) --------------------------------------------------------
void __thiscall GuildAcademyWin::GuildAcademyWin(GuildAcademyWin *this)
{
  GuildAcademyWin *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *v2; // eax@1
  std::exception pExceptionObject; // [sp+Ch] [bp-20h]@3
  GuildAcademyWin *v4; // [sp+18h] [bp-14h]@1
  char *_What; // [sp+1Ch] [bp-10h]@3
  int v6; // [sp+28h] [bp-4h]@1

  v1 = this;
  v4 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GuildAcademyWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildAcademyWin::`vftable'{for `IDirectMessenger'};
  v6 = 0;
  v1->map_WinIndex._Mysize = 0;
  v2 = (std::_Tree_nod<std::_Tmap_traits<PgWin *,unsigned int,std::less<PgWin *>,std::allocator<std::pair<PgWin * const,unsigned int> >,0> >::_Node *)operator new(0x18u);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->map_WinIndex._Myhead = v2;
  v2->_Left = v2;
  v1->map_WinIndex._Myhead->_Parent = v1->map_WinIndex._Myhead;
  v1->map_WinIndex._Myhead->_Right = v1->map_WinIndex._Myhead;
  v1->map_WinIndex._Myhead->_Color = 1;
  v1->map_WinIndex._Myhead->_Isnil = 1;
  v1->m_spPopupWhisperChat.m_pObject = 0;
  v1->m_spPopupInviteGuild.m_pObject = 0;
  v1->m_spPopupForbidChat.m_pObject = 0;
  v1->m_spPopupPermitChat.m_pObject = 0;
  v1->m_spPopupVanish.m_pObject = 0;
  *(_WORD *)&v1->m_bShowOnlineOnly = 256;
  v1->m_nSortColumn = 0;
  v1->m_pkSlideBarMemberList = 0;
  v1->m_pkSlideBarNotice = 0;
  v1->m_pkSlideBar = 0;
  v1->m_pListWinMember = 0;
  v1->m_pListWinNotice = 0;
  v1->m_pkTitle1 = 0;
  v1->m_pkTitle2 = 0;
  v1->m_pkTitle3 = 0;
  v1->m_kTabIndex = 0;
  v1->m_pkGuildAcademyInfoTxt[0] = 0;
  v1->m_pkGuildAcademyInfoTxt[1] = 0;
  v1->m_pkGuildAcademyInfoTxt[2] = 0;
  v1->m_pkGuildAcademyInfoTxt[3] = 0;
  v1->m_pkGuildAcademyInfoTxt[4] = 0;
  v1->m_pkMemberPopupMenu = 0;
  v1->m_bReverse3 = 0;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9C74F8: using guessed type void (__thiscall *GuildAcademyWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C7514: using guessed type int (__thiscall *GuildAcademyWin::`vftable'{for `NiNode'})(void *p, char);

//----- (006F5F50) --------------------------------------------------------
GuildAcademyWin *__cdecl GuildAcademyWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  GuildAcademyWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1DCu);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    GuildAcademyWin::GuildAcademyWin((GuildAcademyWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (GuildAcademyWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (006F6080) --------------------------------------------------------
void __thiscall GuildAcademyWin::OnCommand(GuildAcademyWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0xBu:
      GuildAcademyWin::OnWinClose(this);
      break;
    case 0xDu:
      GuildAcademyWin::OnClickJoinBtn();
      break;
    case 0xEu:
      GuildAcademyWin::OnClickMasterTeleportBtn(this);
      break;
    case 0xFu:
      GuildAcademyWin::OnClickInvitePartyBtn(this);
      break;
    case 0x12u:
      GuildAcademyWin::OnSlideBarMemberList(this);
      break;
    case 0x13u:
      GuildAcademyWin::OnSlideBarNotice(this);
      break;
    case 0x14u:
      GuildAcademyWin::OnSortByTitle01(this);
      break;
    case 0x15u:
      GuildAcademyWin::OnSortByTitle02(this);
      break;
    case 0x16u:
      GuildAcademyWin::OnSortByTitle03(this);
      break;
    case 0x17u:
      GuildAcademyWin::OnSortByTitle04(this);
      break;
    case 0x18u:
      GuildAcademyWin::OnSortByTitle05(this);
      break;
    case 0x1Au:
      GuildAcademyWin::OnLClick(this, lParam);
      break;
    case 0x19u:
      GuildAcademyWin::OnRClick(this, lParam);
      break;
    case 0x1Bu:
      GuildAcademyWin::OnChangeTab(this, 0);
      break;
    case 0x1Cu:
      GuildAcademyWin::OnChangeTab(this, TE_GUILD);
      break;
    case 0x1Eu:
      GuildAcademyWin::OnChangeTab(this, TE_PARTYMATCH);
      break;
    case 0x1Du:
      GuildAcademyWin::OnChangeTab(this, TE_WEDDING);
      break;
    case 0x1Fu:
      GuildAcademyWin::OnChangeTab(this, TE_HOLYPROMISE);
      break;
    case 0xCu:
      GuildAcademyWin::OnEditNotice(this);
      break;
    case 0x20u:
      GuildAcademyWin::OnHelpLink();
      break;
    case 0x21u:
      GuildAcademyWin::OnTab01(this);
      break;
    case 0x22u:
      GuildAcademyWin::OnTab02(this);
      break;
    case 0x23u:
      GuildAcademyWin::OnTab03(this);
      break;
    case 0x27u:
      GuildAcademyWin::OnSlideBarHistory(this);
      break;
    default:
      return;
  }
}

//----- (006F6200) --------------------------------------------------------
void __thiscall GuildAcademyWin::OnShowWin(GuildAcademyWin *this)
{
  unsigned int v1; // eax@1
  int v2; // eax@2

  v1 = this->m_kTabIndex;
  if ( v1 )
  {
    v2 = v1 - 1;
    if ( v2 )
    {
      if ( v2 == 1 )
        GuildAcademyWin::OnTab03(this);
    }
    else
    {
      GuildAcademyWin::OnTab02(this);
    }
  }
  else
  {
    GuildAcademyWin::OnTab01(this);
  }
}

//----- (006F6230) --------------------------------------------------------
char __thiscall GuildAcademyWin::Create(GuildAcademyWin *this, PgFrameWork *pkFrameWork)
{
  GuildAcademyWin *v2; // esi@1
  NiTexturePalette *v3; // ebx@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  LONG v7; // eax@6
  int v9; // edi@11
  int v10; // ebx@11
  NiSourceTexture *v11; // eax@11
  PgSprData *v12; // eax@12
  PgSprData *v13; // eax@14
  PgFont *v14; // eax@17
  PgWinText *v15; // edi@17
  NiUnsharedGeometryGroup *v16; // eax@17
  PgSprData *v17; // edi@17
  PgSprData *v18; // ST130_4@17
  int v19; // edi@17
  PgSprData *v20; // eax@19
  PgSprData *v21; // eax@19
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v22; // eax@19
  PgSprData *v23; // eax@19
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v24; // eax@19
  PgSprData *v25; // eax@19
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v26; // eax@19
  PgFont *v27; // eax@19
  PgWinText *v28; // eax@19
  NiRefObjectVtbl *v29; // edx@19
  NiUnsharedGeometryGroup *v30; // eax@19
  PgFont *v31; // eax@19
  PgWinText *v32; // eax@19
  NiRefObjectVtbl *v33; // edx@19
  NiUnsharedGeometryGroup *v34; // eax@19
  SLWCreateInfo::Item *v35; // eax@19
  PgWinText *v36; // eax@27
  PgSprData *v37; // eax@35
  SlideListWin *v38; // eax@35
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v39; // eax@35
  SLWCreateInfo::Item *v40; // eax@35
  PgSprData *v41; // eax@39
  SlideListWin *v42; // eax@39
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v43; // eax@39
  SLWCreateInfo::Item *v44; // eax@39
  PgWinText *v45; // eax@47
  PgWinText *v46; // eax@49
  PgWinText *v47; // eax@51
  PgSprData *v48; // eax@51
  SlideListWin *v49; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v50; // eax@51
  PgWinText *v51; // eax@51
  SlideBar *v52; // eax@51
  int v53; // edx@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v54; // eax@51
  SlideBar *v55; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v56; // eax@51
  SlideBar *v57; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v58; // eax@51
  ColumnBut *v59; // eax@51
  PgWinText *v60; // edx@51
  int v61; // eax@51
  PgWinBut *v62; // edx@51
  PgFont *v63; // eax@51
  PgWinText *v64; // eax@51
  NiRefObjectVtbl *v65; // edx@51
  NiUnsharedGeometryGroup *v66; // eax@51
  ColumnBut *v67; // eax@51
  PgWinText *v68; // edx@51
  int v69; // eax@51
  PgWinBut *v70; // edx@51
  PgFont *v71; // eax@51
  PgWinText *v72; // eax@51
  NiRefObjectVtbl *v73; // edx@51
  NiUnsharedGeometryGroup *v74; // eax@51
  ColumnBut *v75; // eax@51
  PgWinText *v76; // edx@51
  int v77; // eax@51
  PgWinBut *v78; // edx@51
  PgFont *v79; // eax@51
  PgWinText *v80; // eax@51
  NiRefObjectVtbl *v81; // edx@51
  NiUnsharedGeometryGroup *v82; // eax@51
  float v83; // ecx@51
  PgWinText *v84; // eax@51
  PgFont *v85; // eax@51
  PgWinText *v86; // eax@51
  NiRefObjectVtbl *v87; // edx@51
  NiUnsharedGeometryGroup *v88; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v89; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v90; // eax@51
  float v91; // ecx@51
  PgWinText *v92; // eax@51
  PgFont *v93; // eax@51
  NiUnsharedGeometryGroup *v94; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v95; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v96; // eax@51
  float v97; // ecx@51
  PgWinText *v98; // eax@51
  PgFont *v99; // eax@51
  PgWinText *v100; // eax@51
  NiRefObjectVtbl *v101; // edx@51
  NiUnsharedGeometryGroup *v102; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v103; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v104; // eax@51
  float v105; // ecx@51
  PgWinText *v106; // eax@51
  PgFont *v107; // eax@51
  PgWinText *v108; // eax@51
  NiRefObjectVtbl *v109; // edx@51
  NiUnsharedGeometryGroup *v110; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v111; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v112; // eax@51
  float v113; // ecx@51
  PgWinText *v114; // eax@51
  PgFont *v115; // eax@51
  PgWinText *v116; // eax@51
  NiRefObjectVtbl *v117; // edx@51
  NiUnsharedGeometryGroup *v118; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v119; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v120; // eax@51
  float v121; // ecx@51
  PgWinText *v122; // eax@51
  PgFont *v123; // eax@51
  PgWinText *v124; // eax@51
  NiRefObjectVtbl *v125; // edx@51
  NiUnsharedGeometryGroup *v126; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v127; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v128; // eax@51
  float v129; // ecx@51
  PgWinText *v130; // eax@51
  PgFont *v131; // eax@51
  PgWinText *v132; // eax@51
  NiRefObjectVtbl *v133; // edx@51
  NiUnsharedGeometryGroup *v134; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v135; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v136; // eax@51
  float v137; // ecx@51
  PgWinText *v138; // eax@51
  PgFont *v139; // eax@51
  PgWinText *v140; // eax@51
  NiRefObjectVtbl *v141; // edx@51
  NiUnsharedGeometryGroup *v142; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v143; // eax@51
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v144; // eax@51
  PgFont *v145; // eax@52
  NiRefObjectVtbl *v146; // eax@52
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v147; // eax@52
  float v148; // ecx@53
  unsigned int v149; // eax@53
  PgFont *v150; // eax@53
  PgWinText *v151; // eax@53
  NiRefObjectVtbl *v152; // edx@53
  NiUnsharedGeometryGroup *v153; // eax@53
  float v154; // ecx@53
  unsigned int v155; // eax@53
  PgFont *v156; // eax@53
  PgWinText *v157; // eax@53
  NiRefObjectVtbl *v158; // edx@53
  NiUnsharedGeometryGroup *v159; // eax@53
  float v160; // ecx@53
  unsigned int v161; // eax@53
  PgFont *v162; // eax@53
  PgWinText *v163; // eax@53
  NiRefObjectVtbl *v164; // edx@53
  NiUnsharedGeometryGroup *v165; // eax@53
  PgWinBut *v166; // eax@53
  PgWinText *v167; // ecx@53
  int v168; // ecx@53
  int v169; // edx@53
  unsigned int v170; // ecx@53
  PgWin *v171; // ST138_4@53
  PgFont *v172; // eax@53
  PgWinText *v173; // eax@53
  NiRefObjectVtbl *v174; // edx@53
  NiUnsharedGeometryGroup *v175; // eax@53
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v176; // eax@53
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v177; // eax@53
  PgSprData *v178; // eax@53
  int v179; // edi@53
  char *v180; // eax@53
  char *v181; // eax@53
  char *v182; // eax@53
  char *v183; // eax@53
  char *v184; // eax@53
  PgWinBut *v185; // edi@53
  char *v186; // eax@53
  NiPointer<PgSprData::PgHitTester> *v187; // edx@53
  unsigned int v188; // edi@53
  unsigned int v189; // ebx@53
  PgFont *v190; // eax@53
  PgWinText *v191; // edi@53
  NiRefObjectVtbl *v192; // ebx@53
  NiUnsharedGeometryGroup *v193; // eax@53
  PgSprData::PgHitTester *v194; // eax@53
  unsigned int v195; // edi@53
  unsigned int v196; // ebx@53
  PgFont *v197; // eax@53
  PgWinText *v198; // edi@53
  NiRefObjectVtbl *v199; // ebx@53
  NiUnsharedGeometryGroup *v200; // eax@53
  NiPointer<PgSprData::PgHitTester> *v201; // ecx@53
  unsigned int v202; // edi@53
  unsigned int v203; // ebx@53
  PgFont *v204; // eax@53
  PgWinText *v205; // edi@53
  NiRefObjectVtbl *v206; // ebx@53
  NiUnsharedGeometryGroup *v207; // eax@53
  PgSprData::PgHitTester *v208; // eax@53
  unsigned int v209; // edi@53
  unsigned int v210; // ebx@53
  PgFont *v211; // eax@53
  PgWinText *v212; // edi@53
  NiRefObjectVtbl *v213; // ebx@53
  NiUnsharedGeometryGroup *v214; // eax@53
  NiPointer<PgSprData::PgHitTester> *v215; // ecx@53
  unsigned int v216; // edi@53
  unsigned int v217; // ebx@53
  PgFont *v218; // eax@53
  PgWinText *v219; // edi@53
  NiRefObjectVtbl *v220; // ebx@53
  NiUnsharedGeometryGroup *v221; // eax@53
  PgSprData::PgHitTester *v222; // eax@53
  unsigned int v223; // edi@53
  unsigned int v224; // ebx@53
  PgFont *v225; // eax@53
  PgWinText *v226; // edi@53
  NiRefObjectVtbl *v227; // ebx@53
  NiUnsharedGeometryGroup *v228; // eax@53
  NiSourceTexture *v229; // eax@53
  PopupMenuWin *v230; // eax@53
  char *v231; // eax@53
  NiD3DDefaultShader *v232; // eax@53
  char *v233; // eax@53
  NiD3DDefaultShader *v234; // eax@53
  char *v235; // eax@53
  NiD3DDefaultShader *v236; // eax@53
  char *v237; // eax@53
  NiD3DDefaultShader *v238; // eax@53
  char *v239; // eax@53
  NiD3DDefaultShader *v240; // eax@53
  NiNode *v241; // esi@54
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >,bool> v242; // [sp+154h] [bp-84h]@52
  SLWCreateInfo kCreateInfo; // [sp+15Ch] [bp-7Ch]@19
  unsigned int uiWidth; // [sp+178h] [bp-60h]@14
  unsigned int uiHeight; // [sp+17Ch] [bp-5Ch]@14
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > >,bool> result; // [sp+180h] [bp-58h]@19
  int iOffX; // [sp+188h] [bp-50h]@11
  std::pair<int const ,int> _Val; // [sp+18Ch] [bp-4Ch]@19
  PgWinBut *pkButWin; // [sp+194h] [bp-44h]@19
  unsigned int v250; // [sp+198h] [bp-40h]@17
  int uiLeft; // [sp+19Ch] [bp-3Ch]@4
  int uiTop; // [sp+1A0h] [bp-38h]@4
  NiPointer<NiNode> spNode; // [sp+1A4h] [bp-34h]@1
  PgWinText *pkTextWin; // [sp+1A8h] [bp-30h]@18
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v255; // [sp+1ACh] [bp-2Ch]@19
  int v256; // [sp+1D4h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  this->m_pkFrameWork = pkFrameWork;
  v3 = pTexturePalette;
  v256 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\GuildAcademyWin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "GuildAcademyWin", 0) )
  {
    v6 = spNode.m_pObject;
    v256 = -1;
    if ( spNode.m_pObject )
    {
      v7 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
      goto LABEL_7;
    }
    return 0;
  }
  v9 = uiLeft;
  v10 = uiTop;
  iOffX = uiLeft;
  v11 = MenuTexMgr::GetTexture(0x13u);
  if ( v11 )
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v11);
  else
    v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v12, (PgWin *)&v2->vfptr, 0, 0);
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "IconSlot", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v9, uiTop - v10, v13, (PgWin *)&v2->vfptr, 0, 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "WinTitle",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight) )
  {
    v6 = spNode.m_pObject;
    v256 = -1;
    if ( spNode.m_pObject )
    {
      v7 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
LABEL_7:
      if ( !v7 )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    return 0;
  }
  v14 = Font::Get(MAIN_MENU);
  v15 = PgWinText::CreateWin(uiLeft - v9, uiTop - v10, uiWidth, uiHeight, v14, (PgWin *)&v2->vfptr, 0, 0);
  v15->vfptr[122].__vecDelDtor((NiRefObject *)v15, 1u);
  v15->vfptr[117].__vecDelDtor((NiRefObject *)v15, (unsigned int)&Color::m_kDxWinTitleColor);
  v250 = (unsigned int)&v15->vfptr[118];
  v16 = TextData::Get(0xE3504941);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))v250)(v15, v16);
  v15->vfptr[60].__vecDelDtor((NiRefObject *)v15, 0);
  v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ClsNor", &uiLeft, &uiTop, 0);
  PgSprData::Add(v17, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsClick");
  PgSprData::Add(v17, (NiAVObject *)&spNode.m_pObject->vfptr, "ClsOver");
  v18 = v17;
  v19 = iOffX;
  PgWinBut::CreateWin(uiLeft - iOffX, uiTop - v10, v18, (PgWin *)&v2->vfptr, 0xBu, 0, 0);
  if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
  {
    pkTextWin = (PgWinText *)PgSprData::Create(
                               (NiAVObject *)&spNode.m_pObject->vfptr,
                               "HelpLinkNor",
                               &uiLeft,
                               &uiTop,
                               0);
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkClick");
    PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "HelpLinkOver");
    PgWinBut::CreateWin(uiLeft - v19, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x20u, 0, 0);
  }
  v20 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v19, uiTop - v10, v20, (PgWin *)&v2->vfptr, 0, 0);
  v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel02", &uiLeft, &uiTop, 0);
  _Val.first = (const int)PgWinSpr::CreateWin(uiLeft - v19, uiTop - v10, v21, (PgWin *)&v2->vfptr, 0, 0);
  _Val.second = 1;
  v22 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v22,
    0);
  v23 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel03", &uiLeft, &uiTop, 0);
  _Val.first = (const int)PgWinSpr::CreateWin(uiLeft - v19, uiTop - v10, v23, (PgWin *)&v2->vfptr, 0, 0);
  _Val.second = 2;
  v24 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v24,
    0);
  v25 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel04", &uiLeft, &uiTop, 0);
  _Val.first = (const int)PgWinSpr::CreateWin(uiLeft - v19, uiTop - v10, v25, (PgWin *)&v2->vfptr, 0, 0);
  _Val.second = 0;
  v26 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v26,
    0);
  PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text03", &uiLeft, &uiTop, 0);
  v27 = Font::Get(TITLEBOLD);
  v28 = PgWinText::CreateWin(uiLeft - v19, uiTop - v10, uiWidth, uiHeight, v27, (PgWin *)&v2->vfptr, 0, 0);
  v29 = v28->vfptr;
  pkTextWin = v28;
  v29[122].__vecDelDtor((NiRefObject *)v28, 5u);
  v250 = (unsigned int)&pkTextWin->vfptr[118];
  v30 = TextData::Get(0x253B184Cu);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))v250)(pkTextWin, v30);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Category", &uiLeft, &uiTop, 0);
  v31 = Font::Get(TITLEBOLD);
  v32 = PgWinText::CreateWin(uiLeft - v19, uiTop - v10, uiWidth, uiHeight, v31, (PgWin *)&v2->vfptr, 0, 0);
  v33 = v32->vfptr;
  pkTextWin = v32;
  v33[122].__vecDelDtor((NiRefObject *)v32, 5u);
  v250 = (unsigned int)&pkTextWin->vfptr[118];
  v34 = TextData3::Get(0x2E4A1B0Bu);
  (*(void (__thiscall **)(_DWORD, _DWORD))v250)(pkTextWin, v34);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  kCreateInfo.m_arrItem._Myfirst = 0;
  kCreateInfo.m_arrItem._Mylast = 0;
  kCreateInfo.m_arrItem._Myend = 0;
  kCreateInfo.m_bMakeData = 0;
  kCreateInfo.m_nOffX = 0;
  kCreateInfo.m_nOffY = 0;
  LOBYTE(v256) = 1;
  v35 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
  v35->nItemType = 1;
  pkTextWin = (PgWinText *)v35;
  v35->pNode = spNode.m_pObject;
  v255._Myres = 15;
  v255._Mysize = 0;
  v255._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v255, "ColumnBarNor", 0xCu);
  LOBYTE(v256) = 2;
  pkButWin = (PgWinBut *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2];
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
    &v255);
  LOBYTE(v256) = 1;
  if ( v255._Myres >= 0x10 )
    operator delete(v255._Bx._Ptr);
  v255._Myres = 15;
  v255._Mysize = 0;
  v255._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v255, "ColumnBarClick", 0xEu);
  LOBYTE(v256) = 3;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkButWin,
    &v255);
  LOBYTE(v256) = 1;
  if ( v255._Myres >= 0x10 )
    operator delete(v255._Bx._Ptr);
  v255._Myres = 15;
  v255._Mysize = 0;
  v255._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v255, "ColumnBarOver", 0xDu);
  LOBYTE(v256) = 4;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkButWin,
    &v255);
  LOBYTE(v256) = 1;
  if ( v255._Myres >= 0x10 )
    operator delete(v255._Bx._Ptr);
  pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pkTextWin->vfptr = (NiRefObjectVtbl *)2;
  v255._Myres = 15;
  v255._Mysize = 0;
  v255._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v255, "Column01", 8u);
  LOBYTE(v256) = 5;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
    &v255);
  LOBYTE(v256) = 1;
  if ( v255._Myres >= 0x10 )
    operator delete(v255._Bx._Ptr);
  v36 = pkTextWin;
  pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
  LOBYTE(v36->m_kLocal.m_Translate.x) = 1;
  pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pkTextWin->vfptr = (NiRefObjectVtbl *)2;
  v255._Myres = 15;
  v255._Mysize = 0;
  v255._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v255, "Column02", 8u);
  LOBYTE(v256) = 6;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
    &v255);
  LOBYTE(v256) = 1;
  if ( v255._Myres >= 0x10 )
    operator delete(v255._Bx._Ptr);
  pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
  pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pkTextWin->vfptr = (NiRefObjectVtbl *)2;
  v255._Myres = 15;
  v255._Mysize = 0;
  v255._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v255, "Column03", 8u);
  LOBYTE(v256) = 7;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
    &v255);
  LOBYTE(v256) = 1;
  if ( v255._Myres >= 0x10 )
    operator delete(v255._Bx._Ptr);
  pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
  pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pkTextWin->vfptr = (NiRefObjectVtbl *)2;
  v255._Myres = 15;
  v255._Mysize = 0;
  v255._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v255, "Column04", 8u);
  LOBYTE(v256) = 8;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
    &v255);
  LOBYTE(v256) = 1;
  if ( v255._Myres >= 0x10 )
    operator delete(v255._Bx._Ptr);
  pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
  pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pkTextWin->vfptr = (NiRefObjectVtbl *)2;
  v255._Myres = 15;
  v255._Mysize = 0;
  v255._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v255, "Column05", 8u);
  LOBYTE(v256) = 9;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
    &v255);
  LOBYTE(v256) = 1;
  if ( v255._Myres >= 0x10 )
    operator delete(v255._Bx._Ptr);
  pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
  SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
  v37 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SubText01", &uiLeft, &uiTop, 0);
  v38 = SlideListWin::CreateWin(uiLeft - iOffX, uiTop - v10, v37, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
  v2->m_pListWinMember = v38;
  v38->m_uiLClickMsg = 26;
  v2->m_pListWinMember->m_uiRClickMsg = 25;
  SlideListWin::UpdateViewList(v2->m_pListWinMember);
  _Val.first = (const int)v2->m_pListWinMember;
  _Val.second = 1;
  v39 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v39,
    0);
  SLWCreateInfo::Clear(&kCreateInfo);
  v40 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
  v40->nItemType = 1;
  v40->pNode = spNode.m_pObject;
  pkTextWin = (PgWinText *)v40;
  v255._Myres = 15;
  v255._Mysize = 0;
  v255._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v255, "ColumnBarNor01", 0xEu);
  LOBYTE(v256) = 10;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
    &v255);
  LOBYTE(v256) = 1;
  if ( v255._Myres >= 0x10 )
    operator delete(v255._Bx._Ptr);
  pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pkTextWin->vfptr = (NiRefObjectVtbl *)2;
  v255._Myres = 15;
  v255._Mysize = 0;
  v255._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v255, "Column06", 8u);
  LOBYTE(v256) = 11;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
    &v255);
  LOBYTE(v256) = 1;
  if ( v255._Myres >= 0x10 )
    operator delete(v255._Bx._Ptr);
  pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
  SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
  v41 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SubText02", &uiLeft, &uiTop, 0);
  v42 = SlideListWin::CreateWin(uiLeft - iOffX, uiTop - v10, v41, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
  v2->m_pListWinNotice = v42;
  v42->m_bCheckEnable = 0;
  SlideListWin::UpdateViewList(v2->m_pListWinNotice);
  _Val.first = (const int)v2->m_pListWinNotice;
  _Val.second = 0;
  v43 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v43,
    0);
  SLWCreateInfo::Clear(&kCreateInfo);
  v44 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
  v44->nItemType = 1;
  pkTextWin = (PgWinText *)v44;
  v44->pNode = spNode.m_pObject;
  v255._Myres = 15;
  v255._Mysize = 0;
  v255._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v255, "ColumnBar01Nor", 0xEu);
  LOBYTE(v256) = 12;
  pkButWin = (PgWinBut *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2];
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
    &v255);
  LOBYTE(v256) = 1;
  if ( v255._Myres >= 0x10 )
    operator delete(v255._Bx._Ptr);
  v255._Myres = 15;
  v255._Mysize = 0;
  v255._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v255, "ColumnBar01Click", 0x10u);
  LOBYTE(v256) = 13;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkButWin,
    &v255);
  LOBYTE(v256) = 1;
  if ( v255._Myres >= 0x10 )
    operator delete(v255._Bx._Ptr);
  v255._Myres = 15;
  v255._Mysize = 0;
  v255._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v255, "ColumnBar01Over", 0xFu);
  LOBYTE(v256) = 14;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkButWin,
    &v255);
  LOBYTE(v256) = 1;
  if ( v255._Myres >= 0x10 )
    operator delete(v255._Bx._Ptr);
  pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pkTextWin->vfptr = (NiRefObjectVtbl *)2;
  v255._Myres = 15;
  v255._Mysize = 0;
  v255._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v255, "ColumnHis01", 0xBu);
  LOBYTE(v256) = 15;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
    &v255);
  LOBYTE(v256) = 1;
  if ( v255._Myres >= 0x10 )
    operator delete(v255._Bx._Ptr);
  v45 = pkTextWin;
  pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
  LOBYTE(v45->m_kLocal.m_Translate.x) = 1;
  pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pkTextWin->vfptr = (NiRefObjectVtbl *)2;
  v255._Myres = 15;
  v255._Mysize = 0;
  v255._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v255, "ColumnHis02", 0xBu);
  LOBYTE(v256) = 16;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
    &v255);
  LOBYTE(v256) = 1;
  if ( v255._Myres >= 0x10 )
    operator delete(v255._Bx._Ptr);
  v46 = pkTextWin;
  pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
  LOBYTE(v46->m_kLocal.m_Translate.x) = 1;
  pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
  pkTextWin->vfptr = (NiRefObjectVtbl *)2;
  v255._Myres = 15;
  v255._Mysize = 0;
  v255._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v255, "ColumnHis03", 0xBu);
  LOBYTE(v256) = 17;
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
    (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
    &v255);
  LOBYTE(v256) = 1;
  if ( v255._Myres >= 0x10 )
    operator delete(v255._Bx._Ptr);
  v47 = pkTextWin;
  pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
  LOBYTE(v47->m_kLocal.m_Translate.x) = 1;
  SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
  v48 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SubText03", &uiLeft, &uiTop, 0);
  v49 = SlideListWin::CreateWin(uiLeft, uiTop, v48, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
  v2->m_pListWinHistory = v49;
  _Val.first = (const int)v49;
  _Val.second = 2;
  v50 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v50,
    0);
  v51 = (PgWinText *)PgSprData::Create(
                       (NiAVObject *)&spNode.m_pObject->vfptr,
                       "SlideBar_SlideBtnMiddle",
                       &uiLeft,
                       &uiTop,
                       0);
  pkTextWin = v51;
  v52 = SlideBar::CreateWin(
          spNode.m_pObject,
          "SlideBar02",
          "SlideBar_UpBtn02",
          "SlideBar_DnBtn02",
          (PgSprData *)v51,
          0,
          (PgWin *)&v2->vfptr);
  v2->m_pkSlideBarMemberList = v52;
  v52->m_uiClickMsg = 18;
  v2->m_pkSlideBarMemberList->m_eType = 1;
  v53 = (int)v2->m_pkSlideBarMemberList;
  _Val.second = 1;
  _Val.first = v53;
  v54 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v54,
    0);
  v55 = SlideBar::CreateWin(
          spNode.m_pObject,
          "SlideBar01",
          "SlideBar_UpBtn01",
          "SlideBar_DnBtn01",
          (PgSprData *)pkTextWin,
          0,
          (PgWin *)&v2->vfptr);
  v2->m_pkSlideBarNotice = v55;
  v55->m_uiClickMsg = 19;
  v2->m_pkSlideBarNotice->m_eType = 1;
  _Val.first = (const int)v2->m_pkSlideBarNotice;
  _Val.second = 0;
  v56 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v56,
    0);
  v57 = SlideBar::CreateWin(
          spNode.m_pObject,
          "SlideBar03",
          "SlideBar_UpBtn03",
          "SlideBar_DnBtn03",
          (PgSprData *)pkTextWin,
          0,
          (PgWin *)&v2->vfptr);
  v2->m_pkSlideBarHistory = v57;
  v57->m_uiClickMsg = 39;
  v2->m_pkSlideBarHistory->m_eType = 1;
  _Val.first = (const int)v2->m_pkSlideBarHistory;
  _Val.second = 2;
  v58 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v58,
    0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab01_Off", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Tab01_On");
  v59 = ColumnBut::CreateWin(uiLeft - iOffX, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x21u, 0);
  v60 = pkTextWin;
  v2->m_pkTab01 = v59;
  v61 = *(_DWORD *)LODWORD(v60->m_kWorldBound.m_kCenter.x);
  v62 = *(PgWinBut **)(v61 + 20);
  v250 = *(_DWORD *)(v61 + 24);
  pkButWin = v62;
  v63 = Font::Get(MAIN_MENU);
  v64 = PgWinText::CreateWin(
          uiLeft - iOffX,
          uiTop - v10 + 1,
          (unsigned int)pkButWin,
          v250,
          v63,
          (PgWin *)&v2->vfptr,
          0,
          0);
  v65 = v64->vfptr;
  pkTextWin = v64;
  v65[122].__vecDelDtor((NiRefObject *)v64, 5u);
  v250 = (unsigned int)&pkTextWin->vfptr[118];
  v66 = TextData3::Get(0x25581D98u);
  (*(void (__thiscall **)(_DWORD, _DWORD))v250)(pkTextWin, v66);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab02_Off", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Tab02_On");
  v67 = ColumnBut::CreateWin(uiLeft - iOffX, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x22u, 0);
  v68 = pkTextWin;
  v2->m_pkTab02 = v67;
  v69 = *(_DWORD *)LODWORD(v68->m_kWorldBound.m_kCenter.x);
  v70 = *(PgWinBut **)(v69 + 20);
  v250 = *(_DWORD *)(v69 + 24);
  pkButWin = v70;
  v71 = Font::Get(MAIN_MENU);
  v72 = PgWinText::CreateWin(
          uiLeft - iOffX,
          uiTop - v10 + 1,
          (unsigned int)pkButWin,
          v250,
          v71,
          (PgWin *)&v2->vfptr,
          0,
          0);
  v73 = v72->vfptr;
  pkTextWin = v72;
  v73[122].__vecDelDtor((NiRefObject *)v72, 5u);
  v250 = (unsigned int)&pkTextWin->vfptr[118];
  v74 = TextData3::Get(0x2CA1668Bu);
  (*(void (__thiscall **)(_DWORD, _DWORD))v250)(pkTextWin, v74);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Tab03_Off", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Tab03_On");
  v75 = ColumnBut::CreateWin(uiLeft - iOffX, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x23u, 0);
  v76 = pkTextWin;
  v2->m_pkTab03 = v75;
  v77 = *(_DWORD *)LODWORD(v76->m_kWorldBound.m_kCenter.x);
  v78 = *(PgWinBut **)(v77 + 20);
  v250 = *(_DWORD *)(v77 + 24);
  pkButWin = v78;
  v79 = Font::Get(MAIN_MENU);
  v80 = PgWinText::CreateWin(
          uiLeft - iOffX,
          uiTop - v10 + 1,
          (unsigned int)pkButWin,
          v250,
          v79,
          (PgWin *)&v2->vfptr,
          0,
          0);
  v81 = v80->vfptr;
  pkTextWin = v80;
  v81[122].__vecDelDtor((NiRefObject *)v80, 5u);
  v250 = (unsigned int)&pkTextWin->vfptr[118];
  v82 = TextData3::Get(0x8BA56B9D);
  (*(void (__thiscall **)(_DWORD, _DWORD))v250)(pkTextWin, v82);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  v2->m_pkTab01->m_bCheck = 1;
  v2->m_pkTab02->m_bCheck = 0;
  v2->m_pkTab03->m_bCheck = 0;
  SlideBar::SetSplitCnt(v2->m_pkSlideBarMemberList, v2->m_pListWinMember->m_nSlideSplitCnt);
  SlideBar::SetSplitCnt(v2->m_pkSlideBarNotice, v2->m_pListWinNotice->m_nSlideSplitCnt);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title01Nor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title01Click");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title01Over");
  pkButWin = PgWinBut::CreateWin(uiLeft - iOffX, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x14u, 0, 0);
  v83 = pkTextWin->m_kWorldBound.m_kCenter.x;
  v84 = *(PgWinText **)(*(_DWORD *)LODWORD(v83) + 20);
  v250 = *(_DWORD *)(*(_DWORD *)LODWORD(v83) + 24);
  pkTextWin = v84;
  v85 = Font::Get(MAIN_MENU);
  v86 = PgWinText::CreateWin(
          uiLeft - iOffX,
          uiTop - v10 + 1,
          (unsigned int)pkTextWin,
          v250,
          v85,
          (PgWin *)&v2->vfptr,
          0,
          0);
  v87 = v86->vfptr;
  pkTextWin = v86;
  v87[122].__vecDelDtor((NiRefObject *)v86, 5u);
  v250 = (unsigned int)&pkTextWin->vfptr[118];
  v88 = TextData::Get(0x4EA49695u);
  (*(void (__thiscall **)(_DWORD, _DWORD))v250)(pkTextWin, v88);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  _Val.first = (const int)pkButWin;
  _Val.second = 1;
  v89 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v89,
    0);
  _Val.first = (const int)pkTextWin;
  _Val.second = 1;
  v90 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v90,
    0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title02Nor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title02Click");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title02Over");
  pkButWin = PgWinBut::CreateWin(uiLeft - iOffX, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x15u, 0, 0);
  v91 = pkTextWin->m_kWorldBound.m_kCenter.x;
  v92 = *(PgWinText **)(*(_DWORD *)LODWORD(v91) + 20);
  v250 = *(_DWORD *)(*(_DWORD *)LODWORD(v91) + 24);
  pkTextWin = v92;
  v93 = Font::Get(MAIN_MENU);
  pkTextWin = PgWinText::CreateWin(
                uiLeft - iOffX,
                uiTop - v10 + 1,
                (unsigned int)pkTextWin,
                v250,
                v93,
                (PgWin *)&v2->vfptr,
                0,
                0);
  pkTextWin->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWin, 5u);
  v250 = (unsigned int)&pkTextWin->vfptr[118];
  v94 = TextData::Get(0x4A5F8BA3u);
  (*(void (__thiscall **)(_DWORD, _DWORD))v250)(pkTextWin, v94);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  _Val.first = (const int)pkButWin;
  _Val.second = 1;
  v95 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v95,
    0);
  _Val.first = (const int)pkTextWin;
  _Val.second = 1;
  v96 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v96,
    0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title03Nor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title03Click");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title03Over");
  pkButWin = PgWinBut::CreateWin(uiLeft - iOffX, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x16u, 0, 0);
  v97 = pkTextWin->m_kWorldBound.m_kCenter.x;
  v98 = *(PgWinText **)(*(_DWORD *)LODWORD(v97) + 20);
  v250 = *(_DWORD *)(*(_DWORD *)LODWORD(v97) + 24);
  pkTextWin = v98;
  v99 = Font::Get(MAIN_MENU);
  v100 = PgWinText::CreateWin(
           uiLeft - iOffX,
           uiTop - v10 + 1,
           (unsigned int)pkTextWin,
           v250,
           v99,
           (PgWin *)&v2->vfptr,
           0,
           0);
  v101 = v100->vfptr;
  pkTextWin = v100;
  v101[122].__vecDelDtor((NiRefObject *)v100, 5u);
  v250 = (unsigned int)&pkTextWin->vfptr[118];
  v102 = TextData::Get(0x8BF7ED01);
  (*(void (__thiscall **)(_DWORD, _DWORD))v250)(pkTextWin, v102);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  _Val.first = (const int)pkButWin;
  _Val.second = 1;
  v103 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v103,
    0);
  _Val.first = (const int)pkTextWin;
  _Val.second = 1;
  v104 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v104,
    0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title04Nor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title04Click");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title04Over");
  pkButWin = PgWinBut::CreateWin(uiLeft - iOffX, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x17u, 0, 0);
  v105 = pkTextWin->m_kWorldBound.m_kCenter.x;
  v106 = *(PgWinText **)(*(_DWORD *)LODWORD(v105) + 20);
  v250 = *(_DWORD *)(*(_DWORD *)LODWORD(v105) + 24);
  pkTextWin = v106;
  v107 = Font::Get(MAIN_MENU);
  v108 = PgWinText::CreateWin(
           uiLeft - iOffX,
           uiTop - v10 + 1,
           (unsigned int)pkTextWin,
           v250,
           v107,
           (PgWin *)&v2->vfptr,
           0,
           0);
  v109 = v108->vfptr;
  pkTextWin = v108;
  v109[122].__vecDelDtor((NiRefObject *)v108, 5u);
  v250 = (unsigned int)&pkTextWin->vfptr[118];
  v110 = TextData::Get(0xB8E4BFEC);
  (*(void (__thiscall **)(_DWORD, _DWORD))v250)(pkTextWin, v110);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  _Val.first = (const int)pkButWin;
  _Val.second = 1;
  v111 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v111,
    0);
  _Val.first = (const int)pkTextWin;
  _Val.second = 1;
  v112 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v112,
    0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Title05Nor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title05Click");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Title05Over");
  pkButWin = PgWinBut::CreateWin(uiLeft - iOffX, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x18u, 0, 0);
  v113 = pkTextWin->m_kWorldBound.m_kCenter.x;
  v114 = *(PgWinText **)(*(_DWORD *)LODWORD(v113) + 20);
  v250 = *(_DWORD *)(*(_DWORD *)LODWORD(v113) + 24);
  pkTextWin = v114;
  v115 = Font::Get(MAIN_MENU);
  v116 = PgWinText::CreateWin(
           uiLeft - iOffX,
           uiTop - v10 + 1,
           (unsigned int)pkTextWin,
           v250,
           v115,
           (PgWin *)&v2->vfptr,
           0,
           0);
  v117 = v116->vfptr;
  pkTextWin = v116;
  v117[122].__vecDelDtor((NiRefObject *)v116, 5u);
  v250 = (unsigned int)&pkTextWin->vfptr[118];
  v118 = TextData::Get(0xEE01D3E7);
  (*(void (__thiscall **)(_DWORD, _DWORD))v250)(pkTextWin, v118);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  _Val.first = (const int)pkButWin;
  _Val.second = 1;
  v119 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v119,
    0);
  _Val.first = (const int)pkTextWin;
  _Val.second = 1;
  v120 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v120,
    0);
  pkTextWin = (PgWinText *)PgSprData::Create(
                             (NiAVObject *)&spNode.m_pObject->vfptr,
                             "TitleHis01Nor",
                             &uiLeft,
                             &uiTop,
                             0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "TitleHis01Click");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "TitelHis01Over");
  pkButWin = PgWinBut::CreateWin(uiLeft - iOffX, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0, 0, 0);
  v121 = pkTextWin->m_kWorldBound.m_kCenter.x;
  v122 = *(PgWinText **)(*(_DWORD *)LODWORD(v121) + 20);
  v250 = *(_DWORD *)(*(_DWORD *)LODWORD(v121) + 24);
  pkTextWin = v122;
  v123 = Font::Get(MAIN_MENU);
  v124 = PgWinText::CreateWin(
           uiLeft - iOffX,
           uiTop - v10 + 1,
           (unsigned int)pkTextWin,
           v250,
           v123,
           (PgWin *)&v2->vfptr,
           0,
           0);
  v125 = v124->vfptr;
  pkTextWin = v124;
  v125[122].__vecDelDtor((NiRefObject *)v124, 5u);
  v250 = (unsigned int)&pkTextWin->vfptr[118];
  v126 = TextData3::Get(0x8D927778);
  (*(void (__thiscall **)(_DWORD, _DWORD))v250)(pkTextWin, v126);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  _Val.first = (const int)pkTextWin;
  _Val.second = 2;
  v127 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v127,
    0);
  _Val.first = (const int)pkButWin;
  _Val.second = 2;
  v128 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v128,
    0);
  pkTextWin = (PgWinText *)PgSprData::Create(
                             (NiAVObject *)&spNode.m_pObject->vfptr,
                             "TitleHis02Nor",
                             &uiLeft,
                             &uiTop,
                             0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "TitleHis02Click");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "TitelHis02Over");
  pkButWin = PgWinBut::CreateWin(uiLeft - iOffX, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0, 0, 0);
  v129 = pkTextWin->m_kWorldBound.m_kCenter.x;
  v130 = *(PgWinText **)(*(_DWORD *)LODWORD(v129) + 20);
  v250 = *(_DWORD *)(*(_DWORD *)LODWORD(v129) + 24);
  pkTextWin = v130;
  v131 = Font::Get(MAIN_MENU);
  v132 = PgWinText::CreateWin(
           uiLeft - iOffX,
           uiTop - v10 + 1,
           (unsigned int)pkTextWin,
           v250,
           v131,
           (PgWin *)&v2->vfptr,
           0,
           0);
  v133 = v132->vfptr;
  pkTextWin = v132;
  v133[122].__vecDelDtor((NiRefObject *)v132, 5u);
  v250 = (unsigned int)&pkTextWin->vfptr[118];
  v134 = TextData3::Get(0xE7C0CC1B);
  (*(void (__thiscall **)(_DWORD, _DWORD))v250)(pkTextWin, v134);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  _Val.first = (const int)pkTextWin;
  _Val.second = 2;
  v135 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v135,
    0);
  _Val.first = (const int)pkButWin;
  _Val.second = 2;
  v136 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v136,
    0);
  pkTextWin = (PgWinText *)PgSprData::Create(
                             (NiAVObject *)&spNode.m_pObject->vfptr,
                             "TitleHis03Nor",
                             &uiLeft,
                             &uiTop,
                             0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "TitleHis03Click");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "TitelHis03Over");
  pkButWin = PgWinBut::CreateWin(uiLeft - iOffX, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0, 0, 0);
  v137 = pkTextWin->m_kWorldBound.m_kCenter.x;
  v138 = *(PgWinText **)(*(_DWORD *)LODWORD(v137) + 20);
  v250 = *(_DWORD *)(*(_DWORD *)LODWORD(v137) + 24);
  pkTextWin = v138;
  v139 = Font::Get(MAIN_MENU);
  v140 = PgWinText::CreateWin(
           uiLeft - iOffX,
           uiTop - v10 + 1,
           (unsigned int)pkTextWin,
           v250,
           v139,
           (PgWin *)&v2->vfptr,
           0,
           0);
  v141 = v140->vfptr;
  pkTextWin = v140;
  v141[122].__vecDelDtor((NiRefObject *)v140, 5u);
  v250 = (unsigned int)&pkTextWin->vfptr[118];
  v142 = TextData3::Get(0x9B957B82);
  (*(void (__thiscall **)(_DWORD, _DWORD))v250)(pkTextWin, v142);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  _Val.first = (const int)pkTextWin;
  _Val.second = 2;
  v143 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v143,
    0);
  _Val.first = (const int)pkButWin;
  _Val.second = 2;
  v144 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, &_Val);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &result,
    v144,
    0);
  PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Text01", &uiLeft, &uiTop, &uiWidth, &uiHeight);
  _Val.second = (signed int)((double)uiHeight * 0.2000000029802322);
  *(_DWORD *)&result.second = 0;
  pkTextWin = (PgWinText *)-v10;
  pkButWin = (PgWinBut *)v2->m_pkGuildAcademyInfoTxt;
  v250 = 5;
  do
  {
    v145 = Font::Get(MAIN_MENU);
    v146 = (NiRefObjectVtbl *)PgWinText::CreateWin(
                                uiLeft - iOffX,
                                (int)pkTextWin + uiTop,
                                uiWidth,
                                uiHeight,
                                v145,
                                (PgWin *)&v2->vfptr,
                                0,
                                0);
    pkButWin->vfptr = v146;
    (*((void (__thiscall **)(_DWORD, _DWORD))v146->__vecDelDtor + 122))(v146, 0);
    (*((void (__stdcall **)(_DWORD))pkButWin->vfptr->__vecDelDtor + 118))(&unk_9C6E25);
    (*((void (__stdcall **)(_DWORD))pkButWin->vfptr->__vecDelDtor + 60))(0);
    result.first._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)pkButWin->vfptr;
    v147 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, (std::pair<int const ,int> *)&result);
    std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
      (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
      &v242,
      v147,
      0);
    pkButWin = (PgWinBut *)((char *)pkButWin + 4);
    pkTextWin = (PgWinText *)((char *)pkTextWin + _Val.second);
    --v250;
  }
  while ( v250 );
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Nor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
  PgWinBut::CreateWin(uiLeft - iOffX, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xDu, 0, 0);
  v148 = pkTextWin->m_kWorldBound.m_kCenter.x;
  v149 = *(_DWORD *)(*(_DWORD *)LODWORD(v148) + 20);
  _Val.second = *(_DWORD *)(*(_DWORD *)LODWORD(v148) + 24);
  v250 = v149;
  v150 = Font::Get(MAIN_MENU);
  v151 = PgWinText::CreateWin(uiLeft - iOffX, uiTop - v10 + 1, v250, _Val.second, v150, (PgWin *)&v2->vfptr, 0, 0);
  v152 = v151->vfptr;
  pkTextWin = v151;
  v152[122].__vecDelDtor((NiRefObject *)v151, 5u);
  _Val.second = (int)&pkTextWin->vfptr[118];
  v153 = TextData::Get(0xD0502C33);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))_Val.second)(pkTextWin, v153);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Nor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Click");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Over");
  PgWinBut::CreateWin(uiLeft - iOffX, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xEu, 0, 0);
  v154 = pkTextWin->m_kWorldBound.m_kCenter.x;
  v155 = *(_DWORD *)(*(_DWORD *)LODWORD(v154) + 20);
  _Val.second = *(_DWORD *)(*(_DWORD *)LODWORD(v154) + 24);
  v250 = v155;
  v156 = Font::Get(MAIN_MENU);
  v157 = PgWinText::CreateWin(uiLeft - iOffX, uiTop - v10 + 1, v250, _Val.second, v156, (PgWin *)&v2->vfptr, 0, 0);
  v158 = v157->vfptr;
  pkTextWin = v157;
  v158[122].__vecDelDtor((NiRefObject *)v157, 5u);
  _Val.second = (int)&pkTextWin->vfptr[118];
  v159 = TextData::Get(0x26579485u);
  (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))_Val.second)(pkTextWin, v159);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Nor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Click");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn03Over");
  PgWinBut::CreateWin(uiLeft - iOffX, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xFu, 0, 0);
  v160 = pkTextWin->m_kWorldBound.m_kCenter.x;
  v161 = *(_DWORD *)(*(_DWORD *)LODWORD(v160) + 20);
  _Val.second = *(_DWORD *)(*(_DWORD *)LODWORD(v160) + 24);
  v250 = v161;
  v162 = Font::Get(MAIN_MENU);
  v163 = PgWinText::CreateWin(uiLeft - iOffX, uiTop - v10 + 1, v250, _Val.second, v162, (PgWin *)&v2->vfptr, 0, 0);
  v164 = v163->vfptr;
  pkTextWin = v163;
  v164[122].__vecDelDtor((NiRefObject *)v163, 5u);
  _Val.second = (int)&pkTextWin->vfptr[118];
  v165 = TextData::Get(0x2B3D9AB4u);
  (*(void (__thiscall **)(_DWORD, _DWORD))_Val.second)(pkTextWin, v165);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn05Nor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn05Click");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn05Over");
  v166 = PgWinBut::CreateWin(uiLeft - iOffX, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xCu, 0, 0);
  v167 = pkTextWin;
  v2->m_pkEditNoticeBtn = v166;
  v168 = *(_DWORD *)LODWORD(v167->m_kWorldBound.m_kCenter.x);
  v169 = *(_DWORD *)(v168 + 24);
  v170 = *(_DWORD *)(v168 + 20);
  v171 = (PgWin *)v166;
  _Val.second = v169;
  v250 = v170;
  v172 = Font::Get(MAIN_MENU);
  v173 = PgWinText::CreateWin(0, 0, v250, _Val.second, v172, v171, 0, 0);
  v174 = v173->vfptr;
  pkTextWin = v173;
  v174[122].__vecDelDtor((NiRefObject *)v173, 5u);
  _Val.second = (int)&pkTextWin->vfptr[118];
  v175 = TextData::Get(0x92D1BCF5);
  (*(void (__thiscall **)(_DWORD, _DWORD))_Val.second)(pkTextWin, v175);
  ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v2->m_pkEditNoticeBtn->vfptr[64].__vecDelDtor)(0);
  result.first._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v2->m_pkEditNoticeBtn;
  *(_DWORD *)&result.second = 0;
  v176 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, (std::pair<int const ,int> *)&result);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &v242,
    v176,
    0);
  result.first._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)pkTextWin;
  *(_DWORD *)&result.second = 0;
  v177 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<NiNode *,Char *,std::less<NiNode *>,std::allocator<std::pair<NiNode * const,Char *>>,0>>::_Buynode<std::pair<NiNode *,Avatar *>>((std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)&v2->map_WinIndex, (std::pair<int const ,int> *)&result);
  std::_Tree<std::_Tmap_traits<HWND__ *,PgWin *,std::less<HWND__ *>,std::allocator<std::pair<HWND__ * const,PgWin *>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v2->map_WinIndex,
    &v242,
    v177,
    0);
  v178 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Base", &uiLeft, &uiTop, 0);
  v179 = iOffX;
  PgWinSpr::CreateWin(uiLeft - iOffX, uiTop - v10, v178, (PgWin *)&v2->vfptr, 0, 0);
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "FriendNor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "FriendClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "FriendOver");
  pkButWin = PgWinBut::CreateWin(uiLeft - v179, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x1Bu, 0, 0);
  v180 = (char *)TextData::Get(0xDCF3EDF4);
  PgWin::SetToolTipWinText((PgWin *)&pkButWin->vfptr, v180);
  pkButWin->m_pkToolTipWin = g_pkToolTipWin;
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GuildNor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GuildClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GuildOver");
  pkButWin = PgWinBut::CreateWin(uiLeft - v179, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x1Cu, 0, 0);
  v181 = (char *)TextData::Get(0x9BEAF4F4);
  PgWin::SetToolTipWinText((PgWin *)&pkButWin->vfptr, v181);
  pkButWin->m_pkToolTipWin = g_pkToolTipWin;
  pkTextWin = (PgWinText *)PgSprData::Create(
                             (NiAVObject *)&spNode.m_pObject->vfptr,
                             "GuildAcademyNor",
                             &uiLeft,
                             &uiTop,
                             0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GuildAcademyClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "GuildAcademyOver");
  pkButWin = PgWinBut::CreateWin(uiLeft - v179, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0xAu, 0, 0);
  v182 = (char *)TextData::Get(0x253B184Cu);
  PgWin::SetToolTipWinText((PgWin *)&pkButWin->vfptr, v182);
  pkButWin->m_pkToolTipWin = g_pkToolTipWin;
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MasterNor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "MasterClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "MasterOver");
  pkButWin = PgWinBut::CreateWin(uiLeft - v179, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x1Fu, 0, 0);
  v183 = (char *)TextData::Get(0xF44C3A3C);
  PgWin::SetToolTipWinText((PgWin *)&pkButWin->vfptr, v183);
  pkButWin->m_pkToolTipWin = g_pkToolTipWin;
  pkTextWin = (PgWinText *)PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "WeddingNor", &uiLeft, &uiTop, 0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "WeddingClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "WeddingOver");
  pkButWin = PgWinBut::CreateWin(uiLeft - v179, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x1Du, 0, 0);
  v184 = (char *)TextData::Get(0xC8F53F44);
  PgWin::SetToolTipWinText((PgWin *)&pkButWin->vfptr, v184);
  pkButWin->m_pkToolTipWin = g_pkToolTipWin;
  pkTextWin = (PgWinText *)PgSprData::Create(
                             (NiAVObject *)&spNode.m_pObject->vfptr,
                             "PartyMatchNor",
                             &uiLeft,
                             &uiTop,
                             0);
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "PartyMatchClick");
  PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "PartyMatchOver");
  v185 = PgWinBut::CreateWin(uiLeft - v179, uiTop - v10, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0x1Eu, 0, 0);
  v186 = (char *)TextData::Get(0x1C4B503Eu);
  PgWin::SetToolTipWinText((PgWin *)&v185->vfptr, v186);
  v185->m_pkToolTipWin = g_pkToolTipWin;
  v187 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Friend", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
  v188 = v187->m_pObject->m_uiHeight;
  v189 = v187->m_pObject->m_uiWidth;
  v190 = Font::Get(TITLEBOLD);
  v191 = PgWinText::CreateWin(uiLeft, uiTop, v189, v188, v190, (PgWin *)&v2->vfptr, 0, 0);
  v191->vfptr[122].__vecDelDtor((NiRefObject *)v191, 1u);
  v192 = v191->vfptr;
  v193 = TextData::Get(0xDCF3EDF4);
  v192[118].__vecDelDtor((NiRefObject *)v191, (unsigned int)v193);
  v191->vfptr[60].__vecDelDtor((NiRefObject *)v191, 0);
  v194 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Guild", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v195 = v194->m_uiHeight;
  v196 = v194->m_uiWidth;
  v197 = Font::Get(TITLEBOLD);
  v198 = PgWinText::CreateWin(uiLeft, uiTop, v196, v195, v197, (PgWin *)&v2->vfptr, 0, 0);
  v198->vfptr[122].__vecDelDtor((NiRefObject *)v198, 1u);
  v199 = v198->vfptr;
  v200 = TextData::Get(0x9BEAF4F4);
  v199[118].__vecDelDtor((NiRefObject *)v198, (unsigned int)v200);
  v198->vfptr[60].__vecDelDtor((NiRefObject *)v198, 0);
  v201 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GuildAcademy", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
  v202 = v201->m_pObject->m_uiHeight;
  v203 = v201->m_pObject->m_uiWidth;
  v204 = Font::Get(TITLEBOLD);
  v205 = PgWinText::CreateWin(uiLeft, uiTop, v203, v202, v204, (PgWin *)&v2->vfptr, 0, 0);
  v205->vfptr[122].__vecDelDtor((NiRefObject *)v205, 1u);
  v206 = v205->vfptr;
  v207 = TextData::Get(0x253B184Cu);
  v206[118].__vecDelDtor((NiRefObject *)v205, (unsigned int)v207);
  v205->vfptr[60].__vecDelDtor((NiRefObject *)v205, 0);
  v208 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HolyPromise", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v209 = v208->m_uiHeight;
  v210 = v208->m_uiWidth;
  v211 = Font::Get(TITLEBOLD);
  v212 = PgWinText::CreateWin(uiLeft, uiTop, v210, v209, v211, (PgWin *)&v2->vfptr, 0, 0);
  v212->vfptr[122].__vecDelDtor((NiRefObject *)v212, 1u);
  v213 = v212->vfptr;
  v214 = TextData::Get(0xF44C3A3C);
  v213[118].__vecDelDtor((NiRefObject *)v212, (unsigned int)v214);
  v212->vfptr[60].__vecDelDtor((NiRefObject *)v212, 0);
  v215 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Wedding", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase;
  v216 = v215->m_pObject->m_uiHeight;
  v217 = v215->m_pObject->m_uiWidth;
  v218 = Font::Get(TITLEBOLD);
  v219 = PgWinText::CreateWin(uiLeft, uiTop, v217, v216, v218, (PgWin *)&v2->vfptr, 0, 0);
  v219->vfptr[122].__vecDelDtor((NiRefObject *)v219, 1u);
  v220 = v219->vfptr;
  v221 = TextData::Get(0xC8F53F44);
  v220[118].__vecDelDtor((NiRefObject *)v219, (unsigned int)v221);
  v219->vfptr[60].__vecDelDtor((NiRefObject *)v219, 0);
  v222 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "PartyMatch", &uiLeft, &uiTop, 0)->m_akHitTester.m_pBase->m_pObject;
  v223 = v222->m_uiHeight;
  v224 = v222->m_uiWidth;
  v225 = Font::Get(TITLEBOLD);
  v226 = PgWinText::CreateWin(uiLeft, uiTop, v224, v223, v225, (PgWin *)&v2->vfptr, 0, 0);
  v226->vfptr[122].__vecDelDtor((NiRefObject *)v226, 1u);
  v227 = v226->vfptr;
  v228 = TextData::Get(0x1C4B503Eu);
  v227[118].__vecDelDtor((NiRefObject *)v226, (unsigned int)v228);
  v226->vfptr[60].__vecDelDtor((NiRefObject *)v226, 0);
  v229 = MenuTexMgr::GetTexture(1u);
  v230 = PopupMenuWin::CreateWin(v229, 4u, 4u, 0);
  v2->m_pkMemberPopupMenu = v230;
  ((void (__stdcall *)(IDirectMessengerVtbl **))v230->vfptr->SetMsgHooker)(&v2->vfptr);
  v231 = (char *)TextData::Get(0xBEEF0012);
  v232 = (NiD3DDefaultShader *)PopupMenuText::CreateWin(v231, 0, 0, 0, 0, 0, 0);
  v232[1].m_uiPassCount = 1006;
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spPopupWhisperChat, v232);
  v233 = (char *)TextData::Get(0x2C517CA2u);
  v234 = (NiD3DDefaultShader *)PopupMenuText::CreateWin(v233, 0, 0, 0, 0, 0, 0);
  v234[1].m_uiPassCount = 1007;
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spPopupInviteGuild, v234);
  v235 = (char *)TextData::Get(0xD7E44E28);
  v236 = (NiD3DDefaultShader *)PopupMenuText::CreateWin(v235, 0, 0, 0, 0, 0, 0);
  v236[1].m_uiPassCount = 1008;
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spPopupForbidChat, v236);
  v237 = (char *)TextData3::Get(0xF3D8756u);
  v238 = (NiD3DDefaultShader *)PopupMenuText::CreateWin(v237, 0, 0, 0, 0, 0, 0);
  v238[1].m_uiPassCount = 1009;
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spPopupPermitChat, v238);
  v239 = (char *)TextData::Get(0xA9A897DD);
  v240 = (NiD3DDefaultShader *)PopupMenuText::CreateWin(v239, 0, 0, 0, 0, 0, 0);
  v240[1].m_uiPassCount = 1010;
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spPopupVanish, v240);
  v2->m_pkNoticeEditor = GuildAcademyNoticeEditorWin::CreateWin(0);
  ((void (__thiscall *)(GuildAcademyWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.40000001,
    0.5);
  LOBYTE(v256) = 0;
  SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
  v256 = -1;
  if ( spNode.m_pObject )
  {
    v241 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v241 )
        v241->vfptr->__vecDelDtor((NiRefObject *)v241, 1u);
    }
  }
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (006F8AD0) --------------------------------------------------------
GuildAcademyMemberVanishTask *__cdecl ISingletonTask<GuildAcademyMemberVanishTask>::Run()
{
  GuildAcademyMemberVanishTask *result; // eax@1
  ITask *v1; // eax@2
  GuildAcademyMemberVanishTask *v2; // esi@2

  result = (GuildAcademyMemberVanishTask *)ISingletonTask<GuildAcademyMemberVanishTask>::ms_pkSingletonTask;
  if ( !ISingletonTask<GuildAcademyMemberVanishTask>::ms_pkSingletonTask )
  {
    v1 = (ITask *)operator new(0x5Cu);
    v2 = (GuildAcademyMemberVanishTask *)v1;
    if ( v1 )
    {
      ITask::ITask(v1, 0);
      v2->vfptr = (NiRefObjectVtbl *)&GuildAcademyMemberVanishTask::`vftable'{for `NiRefObject'};
      v2->vfptr = (IDirectMessengerVtbl *)&GuildAcademyMemberVanishTask::`vftable'{for `IDirectMessenger'};
      v2->m_kTargetName.n5_code[4] = 0;
      v2->m_kTargetName.n5_code[3] = 0;
      v2->m_kTargetName.n5_code[2] = 0;
      v2->m_kTargetName.n5_code[1] = 0;
      v2->m_kTargetName.n5_code[0] = 0;
    }
    else
    {
      v2 = 0;
    }
    result = v2;
    ISingletonTask<GuildAcademyMemberVanishTask>::ms_pkSingletonTask = (int)v2;
  }
  return result;
}
// 9C74C4: using guessed type void (__thiscall *GuildAcademyMemberVanishTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C74E0: using guessed type int (__thiscall *GuildAcademyMemberVanishTask::`vftable'{for `NiRefObject'})(void *p, char);
// B5C2C8: using guessed type int ISingletonTask<GuildAcademyMemberVanishTask>::ms_pkSingletonTask;

//----- (006F8B60) --------------------------------------------------------
GuildAcademyMemberVanishTask *__thiscall GuildAcademyMemberVanishTask::`vector deleting destructor'(GuildAcademyMemberVanishTask *this, unsigned int a2)
{
  GuildAcademyMemberVanishTask *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ISingletonTask<GuildAcademyMemberVanishTask>::`vftable'{for `NiRefObject'};
  this->vfptr = (IDirectMessengerVtbl *)&ISingletonTask<GuildAcademyMemberVanishTask>::`vftable'{for `IDirectMessenger'};
  ISingletonTask<GuildAcademyMemberVanishTask>::ms_pkSingletonTask = 0;
  ITask::~ITask((ITask *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C7490: using guessed type void (__thiscall *ISingletonTask<GuildAcademyMemberVanishTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C74AC: using guessed type int (__thiscall *ISingletonTask<GuildAcademyMemberVanishTask>::`vftable'{for `NiRefObject'})(void *p, char);
// B5C2C8: using guessed type int ISingletonTask<GuildAcademyMemberVanishTask>::ms_pkSingletonTask;

//----- (006F8BA0) --------------------------------------------------------
GuildAcademyWin *__thiscall GuildAcademyWin::`scalar deleting destructor'(GuildAcademyWin *this, unsigned int a2)
{
  GuildAcademyWin *v2; // esi@1

  v2 = this;
  GuildAcademyWin::~GuildAcademyWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006F8BD0) --------------------------------------------------------
void __thiscall GuildAcademyJoinReqTask::SetTargetID(GuildAcademyJoinReqTask *this, char *pcName)
{
  char *v2; // eax@1
  char *v3; // ecx@1
  int v4; // eax@1
  char v5; // dl@2

  v2 = this->m_acTargetID;
  *(_DWORD *)v2 = 0;
  *((_DWORD *)v2 + 1) = 0;
  *((_DWORD *)v2 + 2) = 0;
  *((_DWORD *)v2 + 3) = 0;
  v2[16] = 0;
  v3 = pcName;
  v4 = v2 - pcName;
  do
  {
    v5 = *v3;
    v3[v4] = *v3;
    ++v3;
  }
  while ( v5 );
}

//----- (006F8C00) --------------------------------------------------------
void __thiscall GuildAcademyJoinReqTask::OnStart(GuildAcademyJoinReqTask *this)
{
  GuildAcademyJoinReqTask *v1; // esi@1
  char *v2; // eax@2

  v1 = this;
  if ( !LOBYTE(GuildAcademySelectTask::GetGuildAcademySelectWin()[1].m_kLocal.m_Rotate.m_pEntry[2][1]) )
  {
    v1->m_pkInputBox = InputBox::CreateWin();
    v2 = (char *)TextData::Get(0x381C213Cu);
    InputBox::SetText(v1->m_pkInputBox, v2);
    v1->m_pkInputBox->vfptr->SetMsgHooker(&v1->m_pkInputBox->vfptr, &v1->vfptr);
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v1->m_pkInputBox->vfptr[59].__vecDelDtor)(
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.5,
      0.5);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkInputBox->vfptr);
  }
}

//----- (006F8C80) --------------------------------------------------------
void __thiscall GuildAcademyJoinReqTask::DirectMessage(GuildAcademyJoinReqTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  char *v4; // eax@3
  char *v5; // esi@3
  char *v6; // edi@3
  char v7; // dl@4
  PROTO_NC_GUILD_ACADEMY_MEMBER_JOIN_REQ kProto; // [sp+0h] [bp-14h]@3

  if ( iMsgTag == 28 )
  {
    if ( *(_DWORD *)pvBody )
    {
      this->m_pkMsgHooker = (IDirectMessenger *)2;
    }
    else
    {
      v4 = (char *)&this->m_eState;
      *(_DWORD *)v4 = 0;
      *((_DWORD *)v4 + 1) = 0;
      *((_DWORD *)v4 + 2) = 0;
      *((_DWORD *)v4 + 3) = 0;
      v5 = (char *)*((_DWORD *)pvBody + 1);
      *(_QWORD *)&kProto.sGuildName.n4_code[2] = 0i64;
      *(_QWORD *)&kProto.sGuildName.n4_name[0] = 0i64;
      v6 = (char *)&this->m_eState;
      do
      {
        v7 = *v5;
        *v6++ = *v5++;
      }
      while ( v7 );
      *(_QWORD *)&kProto.sGuildName.n4_code[2] = 0i64;
      *(_QWORD *)&kProto.sGuildName.n4_name[0] = 0i64;
      strncpy(kProto.sGuildName.n4_name, v4, 0x10u);
      NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0x11u, &kProto, 16);
    }
  }
}

//----- (006F8D30) --------------------------------------------------------
void __thiscall GuildAcademyJoinReqTask::GuildAcademyJoinReqTask(GuildAcademyJoinReqTask *this)
{
  GuildAcademyJoinReqTask *v1; // esi@1

  v1 = this;
  ITask::ITask((ITask *)&this->vfptr, 0);
  v1->vfptr = (NiRefObjectVtbl *)&GuildAcademyJoinReqTask::`vftable'{for `NiRefObject'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildAcademyJoinReqTask::`vftable'{for `IDirectMessenger'};
  v1->m_acTargetID[0] = 0;
}
// 9C7794: using guessed type void (__thiscall *GuildAcademyJoinReqTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C77B0: using guessed type int (__thiscall *GuildAcademyJoinReqTask::`vftable'{for `NiRefObject'})(void *p, char);

//----- (006F8D50) --------------------------------------------------------
void __stdcall GuildAcademyJoinReqTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_JOIN_ACK(PROTO_NC_GUILD_ACADEMY_MEMBER_JOIN_ACK *pkProto)
{
  unsigned int v2; // ecx@4
  unsigned int v3; // eax@4
  unsigned int v4; // ecx@4
  char *v5; // eax@4
  char *v6; // eax@4
  unsigned int v7; // eax@5
  unsigned int v8; // edx@5
  unsigned int v9; // eax@5
  GameFrameWork *v10; // edi@5
  signed int v11; // eax@5
  const char *v12; // eax@8
  char *v13; // eax@9
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v14; // [sp-1Ch] [bp-44h]@13
  signed int v15; // [sp-10h] [bp-38h]@2
  signed int v16; // [sp-Ch] [bp-34h]@2
  void *v17; // [sp-8h] [bp-30h]@2
  char *v18; // [sp-4h] [bp-2Ch]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v19; // [sp+Ch] [bp-1Ch]@13
  char acName[17]; // [sp+10h] [bp-18h]@4

  if ( LOBYTE(GuildAcademySelectTask::GetGuildAcademySelectWin()[1].m_kLocal.m_Rotate.m_pEntry[2][1]) )
  {
    v18 = 0;
    v17 = 0;
    v16 = 11;
    v15 = 38;
    LOBYTE(GuildAcademySelectTask::GetGuildAcademySelectWin()[1].m_kLocal.m_Rotate.m_pEntry[2][1]) = 0;
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, v15, v16, v17, (int)v18);
  }
  if ( pkProto->Error == 6024 )
  {
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 7u, 0, 0);
    v2 = pkProto->GuildName.n4_code[0];
    v3 = pkProto->GuildName.n4_code[2];
    *(_DWORD *)&acName[4] = pkProto->GuildName.n4_code[1];
    *(_DWORD *)acName = v2;
    v4 = pkProto->GuildName.n4_code[3];
    *(_DWORD *)&acName[8] = v3;
    *(_DWORD *)&acName[12] = v4;
    acName[16] = 0;
    v5 = (char *)TextData::Get(0x2F9B6F74u);
    v6 = fs(v5, acName);
    MsgBox::Modeless(MSGBOX_OK, v6, v17);
  }
  else
  {
    v7 = pkProto->GuildName.n4_code[0];
    v8 = pkProto->GuildName.n4_code[2];
    *(_DWORD *)&acName[4] = pkProto->GuildName.n4_code[1];
    *(_DWORD *)acName = v7;
    v9 = pkProto->GuildName.n4_code[3];
    *(_DWORD *)&acName[8] = v8;
    *(_DWORD *)&acName[12] = v9;
    acName[16] = 0;
    v10 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v11 = pkProto->Error;
    if ( v11 <= 12728 )
    {
      if ( v11 == 12728 )
      {
        v19 = &v14;
        v17 = (void *)15;
        v16 = 0;
        v14._Bx._Buf[0] = 0;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &v14,
          "Academy_CannotJoinNotTime",
          0x19u);
        v18 = (char *)(unsigned __int16)CSingleDataMap::GetValue(&g_kSingleDataMap, v14);
        v13 = (char *)TextData3::Get(0x4EFCD1ACu);
LABEL_14:
        v12 = fs(v13, v18);
LABEL_15:
        GameFrameWork::AddSysMsg(v10, v12);
      }
      else
      {
        switch ( v11 )
        {
          case 6025:
          case 6026:
            v12 = (const char *)TextData::Get(0x6E784590u);
            goto LABEL_15;
          case 6027:
            v18 = acName;
            v13 = (char *)TextData::Get(0x66C0CFEFu);
            goto LABEL_14;
          case 6028:
            v18 = acName;
            v13 = (char *)TextData::Get(0x516E736Fu);
            goto LABEL_14;
          case 6029:
            v12 = (const char *)TextData::Get(0x7574F8CBu);
            goto LABEL_15;
          case 6030:
            v18 = acName;
            v13 = (char *)TextData::Get(0x516E736Fu);
            goto LABEL_14;
          default:
            return;
        }
      }
    }
  }
}

//----- (006F8F20) --------------------------------------------------------
char __thiscall GuildAcademyJoinReqTask::OnProcessNetMsg(GuildAcademyJoinReqTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  GuildAcademyJoinReqTask *v5; // esi@1
  char result; // al@3

  v5 = this;
  if ( iDepart == 38 && iCommand == 18 )
  {
    if ( LOBYTE(GuildAcademySelectTask::GetGuildAcademySelectWin()[1].m_kLocal.m_Rotate.m_pEntry[2][1]) )
    {
      LOBYTE(GuildAcademySelectTask::GetGuildAcademySelectWin()[1].m_kLocal.m_Rotate.m_pEntry[2][1]) = 0;
      NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0xBu, 0, 0);
    }
    GuildAcademyJoinReqTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_JOIN_ACK((PROTO_NC_GUILD_ACADEMY_MEMBER_JOIN_ACK *)pvData);
    v5->m_eTaskState = 2;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006F8F80) --------------------------------------------------------
GuildAcademyJoinReqTask *__thiscall GuildAcademyJoinReqTask::`scalar deleting destructor'(GuildAcademyJoinReqTask *this, unsigned int a2)
{
  GuildAcademyJoinReqTask *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ISingletonTask<GuildAcademyJoinReqTask>::`vftable'{for `NiRefObject'};
  this->vfptr = (IDirectMessengerVtbl *)&ISingletonTask<GuildAcademyJoinReqTask>::`vftable'{for `IDirectMessenger'};
  ISingletonTask<GuildAcademyJoinReqTask>::ms_pkSingletonTask = 0;
  ITask::~ITask((ITask *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C7760: using guessed type void (__thiscall *ISingletonTask<GuildAcademyJoinReqTask>::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C777C: using guessed type int (__thiscall *ISingletonTask<GuildAcademyJoinReqTask>::`vftable'{for `NiRefObject'})(void *p, char);
// B5C2C0: using guessed type int ISingletonTask<GuildAcademyJoinReqTask>::ms_pkSingletonTask;

//----- (006F8FC0) --------------------------------------------------------
void __thiscall GuildAcademyLeaveTask::DirectMessage(GuildAcademyLeaveTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  unsigned int v4; // eax@2
  IDirectMessenger *v5; // eax@3

  if ( iMsgTag == 27 )
  {
    v4 = this->m_kSerialTaskList.m_kAllocator.m_uiCount;
    if ( v4 )
      v5 = (IDirectMessenger *)(v4 + 232);
    else
      v5 = 0;
    if ( pkFrom == v5 )
    {
      if ( *(_DWORD *)pvBody )
      {
        this->m_pkMsgHooker = (IDirectMessenger *)2;
      }
      else
      {
        this->m_kSerialTaskList.m_pkTail = (NiTListItem<NiPointer<ITask> > *)1;
        NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0x1Bu, 0, 0);
      }
    }
  }
}

//----- (006F9010) --------------------------------------------------------
void __thiscall GuildAcademyLeaveTask::OnStart(GuildAcademyLeaveTask *this)
{
  GuildAcademyLeaveTask *v1; // esi@1
  char *v2; // ST0C_4@1
  char *v3; // eax@1
  char *v4; // eax@1
  MsgBox *v5; // eax@1

  v1 = this;
  this->m_eState = 0;
  v2 = GuildTask::GetGuildName(g_pkMainChar->m_dwGuildRegNum);
  v3 = (char *)TextData::Get(0x86D6CFB9);
  v4 = fs(v3, v2);
  v5 = MsgBox::Modeless(MSGBOX_OKCANCEL, v4);
  v1->m_pkMsgBox = v5;
  ((void (__stdcall *)(_DWORD))v5->vfptr->SetMsgHooker)(&v1->vfptr);
}

//----- (006F9070) --------------------------------------------------------
void __stdcall GuildAcademyLeaveTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_LEAVE_ACK(PROTO_NC_GUILD_ACADEMY_MEMBER_LEAVE_ACK *pkProto)
{
  GameFrameWork *v2; // esi@1
  int v3; // eax@1
  PgWin *v4; // eax@2
  CClientGuild *v5; // eax@4
  char *v6; // eax@4
  char *v7; // eax@4
  CClientGuildAcademy *v8; // eax@4
  const char *v9; // eax@6
  char *v10; // eax@10
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v11; // [sp-1Ch] [bp-3Ch]@10
  int v12; // [sp-8h] [bp-28h]@4
  int v13; // [sp-4h] [bp-24h]@10
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v14; // [sp+4h] [bp-1Ch]@10
  char acMyGuildAcademyName[17]; // [sp+8h] [bp-18h]@4

  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  v3 = pkProto->Error;
  if ( (_WORD)v3 == 6016 )
  {
    GuildAcademyTask::GetGuildAcademy()->m_bIsGuildAcademyMember = 0;
    GuildAcademyMemberTask::GetGuildAcademyMember()->m_NumOfAcademyMembers = 0;
    GuildAcademyWin::InvalidateAcademy(v2->m_pkGuildAcademyWin);
    v4 = GuildAcademySelectTask::GetGuildAcademySelectWin();
    if ( (unsigned __int8)((int (__thiscall *)(PgWin *))v4->vfptr[65].__vecDelDtor)(v4) )
      NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0xBu, 0, 0);
    v5 = GuildTask::GetGuild();
    *(_DWORD *)acMyGuildAcademyName = v5->m_Guild.sName.n4_code[0];
    *(_DWORD *)&acMyGuildAcademyName[4] = v5->m_Guild.sName.n4_code[1];
    *(_DWORD *)&acMyGuildAcademyName[8] = v5->m_Guild.sName.n4_code[2];
    *(_DWORD *)&acMyGuildAcademyName[12] = v5->m_Guild.sName.n4_code[3];
    acMyGuildAcademyName[16] = 0;
    v6 = (char *)TextData::Get(0x629B6588u);
    v7 = fs(v6, acMyGuildAcademyName);
    MsgBox::Modeless(MSGBOX_OK, v7, v12);
    v8 = GuildAcademyTask::GetGuildAcademy();
    CClientGuildAcademy::ClearHistoryList(v8);
    GuildAcademyTask::InvalidateGuildAcademyWin();
  }
  else
  {
    switch ( v3 )
    {
      case 6048:
        v9 = (const char *)TextData::Get(0x26A937Cu);
        goto LABEL_11;
      case 6049:
        v9 = (const char *)TextData::Get(0x8AE7DEB7);
        goto LABEL_11;
      case 6036:
      case 6050:
        v9 = (const char *)TextData::Get(0x6BBB00C3u);
        goto LABEL_11;
      case 6051:
        v9 = (const char *)TextData::Get(0xCEF8D8D4);
        goto LABEL_11;
      case 6052:
        v14 = &v11;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
          &v11,
          "Guild_CannotLeaveTime");
        v13 = (unsigned __int16)CSingleDataMap::GetValue(&g_kSingleDataMap, v11);
        v10 = (char *)TextData2::Get(0xFD4F187E);
        v9 = fs(v10, v13);
LABEL_11:
        GameFrameWork::AddSysMsg(v2, v9);
        break;
      default:
        return;
    }
  }
}

//----- (006F9230) --------------------------------------------------------
char __thiscall GuildAcademyLeaveTask::OnProcessNetMsg(GuildAcademyLeaveTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  GuildAcademyLeaveTask *v5; // esi@1
  char result; // al@3

  v5 = this;
  if ( iDepart == 38 && iCommand == 28 )
  {
    GuildAcademyLeaveTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_LEAVE_ACK((PROTO_NC_GUILD_ACADEMY_MEMBER_LEAVE_ACK *)pvData);
    v5->m_eTaskState = 2;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006F9260) --------------------------------------------------------
void __thiscall GuildAcademyMasterAppointTask::SetInfo(GuildAcademyMasterAppointTask *this, Name5 *rkTargetName)
{
  *(_QWORD *)&this->m_kTargetName.n5_name[0] = *(_QWORD *)&rkTargetName->n5_code[0];
  *(_QWORD *)&this->m_kTargetName.n5_code[2] = *(_QWORD *)&rkTargetName->n5_code[2];
  this->m_kTargetName.n5_code[4] = rkTargetName->n5_code[4];
}

//----- (006F9290) --------------------------------------------------------
void __thiscall GuildAcademyMasterInitializeTask::SetInfo(GuildAcademyMasterInitializeTask *this, Name5 *rkTargetName)
{
  *(_QWORD *)&this->m_kTargetName.n5_name[0] = *(_QWORD *)&rkTargetName->n5_code[0];
  *(_QWORD *)&this->m_kTargetName.n5_code[2] = *(_QWORD *)&rkTargetName->n5_code[2];
  this->m_kTargetName.n5_code[4] = rkTargetName->n5_code[4];
}

//----- (006F92C0) --------------------------------------------------------
void __thiscall GuildAcademyMasterInitializeTask::DirectMessage(GuildAcademyMasterInitializeTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  GuildAcademyMasterInitializeTask *v4; // eax@1
  unsigned int v5; // ecx@2
  IDirectMessenger *v6; // ecx@3
  unsigned int v7; // ecx@7
  unsigned int v8; // edx@7
  PROTO_NC_GUILD_ACADEMY_SET_MASTER_REQ kProto; // [sp+0h] [bp-18h]@7

  v4 = this;
  if ( iMsgTag == 27 )
  {
    v5 = this->m_kTargetName.n5_code[3];
    if ( v5 )
      v6 = (IDirectMessenger *)(v5 + 232);
    else
      v6 = 0;
    if ( pkFrom == v6 )
    {
      if ( *(_DWORD *)pvBody )
      {
        v4->m_pkMsgHooker = (IDirectMessenger *)2;
      }
      else
      {
        v4->m_kSerialTaskList.m_pkTail = (NiTListItem<NiPointer<ITask> > *)1;
        v7 = v4->m_eState;
        kProto.sName.n5_code[0] = v4->m_kSerialTaskList.m_kAllocator.m_uiCount;
        v8 = v4->m_kTargetName.n5_code[0];
        kProto.sName.n5_code[1] = v7;
        *(_QWORD *)&kProto.sName.n5_code[2] = __PAIR__(v4->m_kTargetName.n5_code[1], v8);
        kProto.sName.n5_code[4] = v4->m_kTargetName.n5_code[2];
        NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0x59u, &kProto, 20);
      }
    }
  }
}

//----- (006F9360) --------------------------------------------------------
void __thiscall GuildAcademyMasterAppointTask::OnStart(GuildAcademyMasterAppointTask *this)
{
  GuildAcademyMasterAppointTask *v1; // esi@1
  unsigned int v2; // eax@1
  unsigned int v3; // edx@1
  unsigned int v4; // ecx@1
  unsigned int v5; // eax@1
  unsigned int v6; // ecx@1
  char *v7; // eax@1
  char *v8; // eax@1
  MsgBox *v9; // eax@1
  char pcTargetName[21]; // [sp+4h] [bp-1Ch]@1

  v1 = this;
  v2 = this->m_kTargetName.n5_code[0];
  v3 = this->m_kTargetName.n5_code[2];
  v4 = this->m_kTargetName.n5_code[1];
  *(_DWORD *)pcTargetName = v2;
  v5 = v1->m_kTargetName.n5_code[3];
  *(_DWORD *)&pcTargetName[8] = v3;
  *(_DWORD *)&pcTargetName[4] = v4;
  v6 = v1->m_kTargetName.n5_code[4];
  *(_DWORD *)&pcTargetName[12] = v5;
  *(_DWORD *)&pcTargetName[16] = v6;
  pcTargetName[20] = 0;
  v1->m_eState = 0;
  v7 = (char *)TextData::Get(0x5F4D8E83u);
  v8 = fs(v7, pcTargetName);
  v9 = MsgBox::Modal(MSGBOX_OKCANCEL, v8);
  v1->m_pkMsgBox = v9;
  ((void (__stdcall *)(_DWORD))v9->vfptr->SetMsgHooker)(&v1->vfptr);
}

//----- (006F93E0) --------------------------------------------------------
void __thiscall GuildAcademyMasterAppointTask::DirectMessage(GuildAcademyMasterAppointTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  GuildAcademyMasterAppointTask *v4; // esi@1
  unsigned int v5; // eax@2
  IDirectMessenger *v6; // eax@3
  unsigned int v7; // eax@7
  GuildAcademyMasterAppointTask::State v8; // edx@7
  unsigned int v9; // ecx@7
  PROTO_NC_GUILD_ACADEMY_SET_MASTER_REQ kProto; // [sp+4h] [bp-18h]@7

  v4 = this;
  if ( iMsgTag == 27 )
  {
    v5 = this->m_kTargetName.n5_code[3];
    if ( v5 )
      v6 = (IDirectMessenger *)(v5 + 232);
    else
      v6 = 0;
    if ( pkFrom == v6 )
    {
      if ( *(_DWORD *)pvBody )
      {
        this->m_pkMsgHooker = (IDirectMessenger *)2;
      }
      else
      {
        v7 = this->m_kTargetName.n5_code[0];
        v8 = this->m_eState;
        kProto.sName.n5_code[0] = this->m_kSerialTaskList.m_kAllocator.m_uiCount;
        v9 = this->m_kTargetName.n5_code[1];
        *(_QWORD *)&kProto.sName.n5_code[1] = __PAIR__(v7, v8);
        *(_QWORD *)&kProto.sName.n5_code[3] = __PAIR__(v4->m_kTargetName.n5_code[2], v9);
        NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0x59u, &kProto, 20);
        v4->m_kSerialTaskList.m_pkTail = (NiTListItem<NiPointer<ITask> > *)1;
      }
    }
  }
}

//----- (006F9480) --------------------------------------------------------
char __thiscall GuildAcademyMasterAppointTask::OnProcessNetMsg(GuildAcademyMasterAppointTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  GuildAcademyMasterAppointTask *v5; // edi@1
  char result; // al@3
  GameFrameWork *v7; // esi@4
  NiUnsharedGeometryGroup *v8; // eax@7

  v5 = this;
  if ( iDepart == 38 && iCommand == 90 )
  {
    v7 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v7 )
    {
      switch ( *(_WORD *)pvData )
      {
        case 0x17FF:
          v8 = TextData::Get(0x66B58AC6u);
          goto LABEL_15;
        case 0x17F0:
          v8 = TextData3::Get(0xC2B79E50);
          goto LABEL_15;
        case 0x17F1:
          v8 = TextData3::Get(0x720E346u);
          goto LABEL_15;
        case 0x17F2:
          v8 = TextData3::Get(0xB2A194D6);
          goto LABEL_15;
        case 0x17F3:
          v8 = TextData3::Get(0x5A93B0E4u);
          goto LABEL_15;
        case 0x17F4:
          v8 = TextData3::Get(0xB0B875DC);
          goto LABEL_15;
        case 0x17F5:
          v8 = TextData3::Get(0xDD65138E);
          goto LABEL_15;
        case 0x17F6:
          v8 = TextData3::Get(0x8FD08DE7);
LABEL_15:
          GameFrameWork::AddSysMsg(v7, (const char *)v8);
          break;
        default:
          break;
      }
      v5->m_eTaskState = 2;
      result = 1;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006F9570) --------------------------------------------------------
void __thiscall GuildAcademyMasterInitializeTask::OnStart(GuildAcademyMasterInitializeTask *this)
{
  GuildAcademyMasterInitializeTask *v1; // esi@1
  char *v2; // eax@1
  MsgBox *v3; // eax@1

  v1 = this;
  this->m_eState = 0;
  v2 = (char *)TextData::Get(0x44A2A5Eu);
  v3 = MsgBox::Modal(MSGBOX_OKCANCEL, v2);
  v1->m_pkMsgBox = v3;
  ((void (__stdcall *)(_DWORD))v3->vfptr->SetMsgHooker)(&v1->vfptr);
}

//----- (006F95B0) --------------------------------------------------------
char __thiscall GuildAcademyMasterInitializeTask::OnProcessNetMsg(GuildAcademyMasterInitializeTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  GuildAcademyMasterInitializeTask *v5; // edi@1
  char result; // al@3
  GameFrameWork *v7; // esi@4
  NiUnsharedGeometryGroup *v8; // eax@7

  v5 = this;
  if ( iDepart == 38 && iCommand == 90 )
  {
    v7 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v7 )
    {
      switch ( *(_WORD *)pvData )
      {
        case 0x17FF:
          v8 = TextData::Get(0x66B58AC6u);
          goto LABEL_15;
        case 0x17F0:
          v8 = TextData3::Get(0xC2B79E50);
          goto LABEL_15;
        case 0x17F1:
          v8 = TextData3::Get(0x720E346u);
          goto LABEL_15;
        case 0x17F2:
          v8 = TextData3::Get(0xB2A194D6);
          goto LABEL_15;
        case 0x17F3:
          v8 = TextData3::Get(0x5A93B0E4u);
          goto LABEL_15;
        case 0x17F4:
          v8 = TextData3::Get(0xB0B875DC);
          goto LABEL_15;
        case 0x17F5:
          v8 = TextData3::Get(0xDD65138E);
          goto LABEL_15;
        case 0x17F6:
          v8 = TextData3::Get(0x8FD08DE7);
LABEL_15:
          GameFrameWork::AddSysMsg(v7, (const char *)v8);
          break;
        default:
          break;
      }
      v5->m_eTaskState = 2;
      result = 1;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006F96A0) --------------------------------------------------------
unsigned int __thiscall CClientGuildAcademyMember::GetNumOfOnlineMembers(CClientGuildAcademyMember *this)
{
  int v1; // edx@1
  unsigned int result; // eax@1
  char *v3; // ecx@2

  v1 = this->m_NumOfAcademyMembers;
  result = 0;
  if ( this->m_NumOfAcademyMembers )
  {
    v3 = (char *)&this->m_AcademyMembers[0].dLogonInfo;
    do
    {
      if ( *v3 & 1 )
        ++result;
      v3 += 109;
      --v1;
    }
    while ( v1 );
  }
  return result;
}

//----- (006F96E0) --------------------------------------------------------
BOOL __thiscall GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_LIST_ACK(GuildAcademyMemberTask *this, PROTO_NC_GUILD_ACADEMY_MEMBER_LIST_ACK *pkProto)
{
  return CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_LIST_ACK((CGuildAcademyMember *)&this->vfptr, pkProto) != 0;
}

//----- (006F9700) --------------------------------------------------------
CClientGuildAcademyMember *__cdecl GuildAcademyMemberTask::GetGuildAcademyMember()
{
  CClientGuildAcademyMember *result; // eax@2

  if ( GuildAcademyMemberTask::ms_spGuildAcademyMemberTask )
    result = (CClientGuildAcademyMember *)(GuildAcademyMemberTask::ms_spGuildAcademyMemberTask + 64);
  else
    result = 0;
  return result;
}
// B5C2CC: using guessed type int GuildAcademyMemberTask::ms_spGuildAcademyMemberTask;

//----- (006F9710) --------------------------------------------------------
BOOL __thiscall GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_LOGOFF_CMD(GuildAcademyMemberTask *this, PROTO_NC_GUILD_ACADEMY_MEMBER_LOGOFF_CMD *pkProto)
{
  return CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_LOGOFF_CMD((CGuildAcademyMember *)&this->vfptr, pkProto) != 0;
}

//----- (006F9740) --------------------------------------------------------
void GuildAcademyMemberTask::OnFinish()
{
  void (__thiscall ***v1)(_DWORD, _DWORD); // esi@1

  v1 = (void (__thiscall ***)(_DWORD, _DWORD))GuildAcademyMemberTask::ms_spGuildAcademyMemberTask;
  if ( GuildAcademyMemberTask::ms_spGuildAcademyMemberTask )
  {
    if ( !InterlockedDecrement((volatile LONG *)(GuildAcademyMemberTask::ms_spGuildAcademyMemberTask + 4)) )
    {
      if ( v1 )
        (**v1)(v1, 1);
    }
    GuildAcademyMemberTask::ms_spGuildAcademyMemberTask = 0;
  }
}
// B5C2CC: using guessed type int GuildAcademyMemberTask::ms_spGuildAcademyMemberTask;

//----- (006F9780) --------------------------------------------------------
int __thiscall GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_JOIN_CMD(GuildAcademyMemberTask *this, PROTO_NC_GUILD_ACADEMY_MEMBER_JOIN_CMD *pkProto)
{
  GuildAcademyMemberTask *v2; // ebx@1
  int result; // eax@1
  PgWin *v4; // eax@2
  unsigned int v5; // ecx@4
  unsigned int v6; // edx@4
  unsigned int v7; // ecx@4
  unsigned int v8; // edx@4
  char *v9; // eax@4
  char *v10; // edi@4
  char acname[21]; // [sp+8h] [bp-1Ch]@4

  v2 = this;
  result = CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_JOIN_CMD((CGuildAcademyMember *)&this->vfptr, pkProto);
  if ( result )
  {
    v4 = GuildAcademySelectTask::GetGuildAcademySelectWin();
    if ( (unsigned __int8)((int (__thiscall *)(PgWin *))v4->vfptr[65].__vecDelDtor)(v4) )
      NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0xBu, 0, 0);
    v5 = pkProto->Member.sName.n5_code[0];
    v6 = pkProto->Member.sName.n5_code[1];
    *(_DWORD *)&acname[8] = pkProto->Member.sName.n5_code[2];
    *(_DWORD *)acname = v5;
    v7 = pkProto->Member.sName.n5_code[3];
    *(_DWORD *)&acname[4] = v6;
    v8 = pkProto->Member.sName.n5_code[4];
    *(_DWORD *)&acname[12] = v7;
    *(_DWORD *)&acname[16] = v8;
    acname[20] = 0;
    v9 = (char *)TextData::Get(0xAAED2111);
    v10 = fs(v9, acname);
    if ( v2->m_pkMsgHooker )
    {
      ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v2->m_pkMsgHooker->vfptr->SendDirectMessage)(
        25,
        v10,
        &v2->vfptr);
      if ( v2->m_pkMsgHooker )
        ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v2->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          25,
          v10,
          &v2->vfptr);
    }
    v2->vfptr->DirectDispatchToParent((IDirectMessenger *)&v2->vfptr, 25, v10, (IDirectMessenger *)&v2->vfptr);
    result = 1;
  }
  return result;
}

//----- (006F9870) --------------------------------------------------------
int __thiscall GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_LEAVE_CMD(GuildAcademyMemberTask *this, PROTO_NC_GUILD_ACADEMY_MEMBER_LEAVE_CMD *pkProto)
{
  GuildAcademyMemberTask *v2; // ebx@1
  int result; // eax@1
  PgWin *v4; // eax@2
  unsigned int v5; // ecx@4
  unsigned int v6; // edx@4
  unsigned int v7; // ecx@4
  unsigned int v8; // edx@4
  char *v9; // eax@4
  char *v10; // edi@4
  char acname[21]; // [sp+8h] [bp-1Ch]@4

  v2 = this;
  result = CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_LEAVE_CMD((CGuildAcademyMember *)&this->vfptr, pkProto);
  if ( result )
  {
    v4 = GuildAcademySelectTask::GetGuildAcademySelectWin();
    if ( (unsigned __int8)((int (__thiscall *)(PgWin *))v4->vfptr[65].__vecDelDtor)(v4) )
      NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0xBu, 0, 0);
    v5 = pkProto->CharID.n5_code[0];
    v6 = pkProto->CharID.n5_code[1];
    *(_DWORD *)&acname[8] = pkProto->CharID.n5_code[2];
    *(_DWORD *)acname = v5;
    v7 = pkProto->CharID.n5_code[3];
    *(_DWORD *)&acname[4] = v6;
    v8 = pkProto->CharID.n5_code[4];
    *(_DWORD *)&acname[12] = v7;
    *(_DWORD *)&acname[16] = v8;
    acname[20] = 0;
    v9 = (char *)TextData::Get(0xBC1932FF);
    v10 = fs(v9, acname);
    if ( v2->m_pkMsgHooker )
    {
      ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v2->m_pkMsgHooker->vfptr->SendDirectMessage)(
        25,
        v10,
        &v2->vfptr);
      if ( v2->m_pkMsgHooker )
        ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v2->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          25,
          v10,
          &v2->vfptr);
    }
    v2->vfptr->DirectDispatchToParent((IDirectMessenger *)&v2->vfptr, 25, v10, (IDirectMessenger *)&v2->vfptr);
    result = 1;
  }
  return result;
}

//----- (006F9960) --------------------------------------------------------
int __userpurge GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_VANISH_CMD@<eax>(GuildAcademyMemberTask *this@<ecx>, int a2@<edi>, PROTO_NC_GUILD_ACADEMY_MEMBER_VANISH_CMD *pkProto)
{
  GuildAcademyMemberTask *v3; // ebx@1
  int result; // eax@1
  PgWin *v5; // eax@2
  Name5 *v6; // eax@4
  unsigned int v7; // ecx@4
  CClientGuildAcademy *v8; // eax@9
  char *v9; // eax@9
  char *v10; // edi@9
  CClientGuildAcademy *v11; // eax@12
  unsigned int v12; // edx@13
  unsigned int v13; // ecx@13
  unsigned int v14; // edx@13
  char *v15; // eax@13
  char *v16; // edi@13
  int v17; // [sp-4h] [bp-28h]@9
  int v18; // [sp-4h] [bp-28h]@13
  unsigned int v19; // [sp+8h] [bp-1Ch]@13
  char acMyGuildAcademyName[17]; // [sp+Ch] [bp-18h]@9

  v3 = this;
  result = CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_LEAVE_CMD(
             (CGuildAcademyMember *)&this->vfptr,
             (PROTO_NC_GUILD_ACADEMY_MEMBER_LEAVE_CMD *)pkProto);
  if ( result )
  {
    v5 = GuildAcademySelectTask::GetGuildAcademySelectWin();
    if ( (unsigned __int8)((int (__thiscall *)(PgWin *))v5->vfptr[65].__vecDelDtor)(v5) )
      NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0xBu, 0, 0);
    v6 = User::GetMainCharID(&g_kUser);
    v7 = pkProto->CharID.n5_code[0];
    if ( pkProto->CharID.n5_code[0] != v6->n5_code[0]
      || pkProto->CharID.n5_code[1] != v6->n5_code[1]
      || pkProto->CharID.n5_code[2] != v6->n5_code[2]
      || pkProto->CharID.n5_code[3] != v6->n5_code[3]
      || pkProto->CharID.n5_code[4] != v6->n5_code[4] )
    {
      v12 = pkProto->CharID.n5_code[1];
      *(_DWORD *)&acMyGuildAcademyName[4] = pkProto->CharID.n5_code[2];
      v19 = v7;
      v13 = pkProto->CharID.n5_code[3];
      *(_DWORD *)acMyGuildAcademyName = v12;
      v14 = pkProto->CharID.n5_code[4];
      *(_DWORD *)&acMyGuildAcademyName[8] = v13;
      *(_DWORD *)&acMyGuildAcademyName[12] = v14;
      acMyGuildAcademyName[16] = 0;
      v15 = (char *)TextData::Get(0xCCEDD5FF);
      v16 = fs(v15, &v19, a2);
      if ( v3->m_pkMsgHooker )
      {
        ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v3->m_pkMsgHooker->vfptr->SendDirectMessage)(
          25,
          v16,
          &v3->vfptr);
        if ( v3->m_pkMsgHooker )
          ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v3->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            25,
            v16,
            &v3->vfptr);
      }
      ((void (__thiscall *)(IDirectMessengerVtbl **, signed int, char *, IDirectMessengerVtbl **, int))v3->vfptr->DirectDispatchToParent)(
        &v3->vfptr,
        25,
        v16,
        &v3->vfptr,
        v18);
    }
    else
    {
      GuildAcademyTask::GetGuildAcademy()->m_bIsGuildAcademyMember = 0;
      v8 = GuildAcademyTask::GetGuildAcademy();
      *(_DWORD *)acMyGuildAcademyName = v8->m_Guild.sName.n4_code[0];
      *(_DWORD *)&acMyGuildAcademyName[4] = v8->m_Guild.sName.n4_code[1];
      *(_DWORD *)&acMyGuildAcademyName[8] = v8->m_Guild.sName.n4_code[2];
      *(_DWORD *)&acMyGuildAcademyName[12] = v8->m_Guild.sName.n4_code[3];
      acMyGuildAcademyName[16] = 0;
      v9 = (char *)TextData::Get(0x7498906Du);
      v10 = fs(v9, acMyGuildAcademyName, a2);
      if ( v3->m_pkMsgHooker )
      {
        ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v3->m_pkMsgHooker->vfptr->SendDirectMessage)(
          25,
          v10,
          &v3->vfptr);
        if ( v3->m_pkMsgHooker )
          ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v3->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            25,
            v10,
            &v3->vfptr);
      }
      ((void (__thiscall *)(IDirectMessengerVtbl **, signed int, char *, IDirectMessengerVtbl **, int))v3->vfptr->DirectDispatchToParent)(
        &v3->vfptr,
        25,
        v10,
        &v3->vfptr,
        v17);
      v3->m_NumOfAcademyMembers = 0;
      v11 = GuildAcademyTask::GetGuildAcademy();
      CClientGuildAcademy::ClearHistoryList(v11);
      GuildAcademyTask::InvalidateGuildAcademyWin();
    }
    result = 1;
  }
  return result;
}
// 6F9960: could not find valid save-restore pair for edi

//----- (006F9B30) --------------------------------------------------------
int __thiscall GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_LOGON_CMD(GuildAcademyMemberTask *this, PROTO_NC_GUILD_ACADEMY_MEMBER_LOGON_CMD *pkProto)
{
  int result; // eax@1
  char *v3; // eax@3
  unsigned int v4; // ecx@8
  unsigned int v5; // edx@8
  unsigned int v6; // eax@8
  unsigned int v7; // eax@8
  char *v8; // eax@8
  char *v9; // edi@8
  GuildAcademyMemberTask *v10; // [sp+4h] [bp-20h]@1
  char acCharName[21]; // [sp+8h] [bp-1Ch]@3

  v10 = this;
  result = CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_LOGON_CMD((CGuildAcademyMember *)&this->vfptr, pkProto);
  if ( result )
  {
    if ( byte_B4FF8F )
    {
      v3 = (char *)((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)();
      *(_DWORD *)&acCharName[16] = 0;
      *(_DWORD *)&acCharName[12] = 0;
      *(_DWORD *)&acCharName[8] = 0;
      *(_DWORD *)&acCharName[4] = 0;
      *(_DWORD *)acCharName = 0;
      strncpy(acCharName, v3, 0x14u);
      if ( pkProto->CharID.n5_code[0] != *(_DWORD *)acCharName
        || pkProto->CharID.n5_code[1] != *(_DWORD *)&acCharName[4]
        || pkProto->CharID.n5_code[2] != *(_DWORD *)&acCharName[8]
        || pkProto->CharID.n5_code[3] != *(_DWORD *)&acCharName[12]
        || pkProto->CharID.n5_code[4] != *(_DWORD *)&acCharName[16] )
      {
        v4 = pkProto->CharID.n5_code[2];
        v5 = pkProto->CharID.n5_code[3];
        *(_DWORD *)acCharName = pkProto->CharID.n5_code[0];
        v6 = pkProto->CharID.n5_code[1];
        *(_DWORD *)&acCharName[8] = v4;
        *(_DWORD *)&acCharName[4] = v6;
        v7 = pkProto->CharID.n5_code[4];
        *(_DWORD *)&acCharName[12] = v5;
        *(_DWORD *)&acCharName[16] = v7;
        acCharName[20] = 0;
        v8 = (char *)TextData::Get(0x67DEDEC2u);
        v9 = fs(v8, acCharName);
        if ( v10->m_pkMsgHooker )
        {
          ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v10->m_pkMsgHooker->vfptr->SendDirectMessage)(
            25,
            v9,
            &v10->vfptr);
          if ( v10->m_pkMsgHooker )
            ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v10->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
              25,
              v9,
              &v10->vfptr);
        }
        v10->vfptr->DirectDispatchToParent((IDirectMessenger *)&v10->vfptr, 25, v9, (IDirectMessenger *)&v10->vfptr);
      }
    }
    result = 1;
  }
  return result;
}
// B4FF8F: using guessed type char byte_B4FF8F;

//----- (006F9C60) --------------------------------------------------------
int __thiscall GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_CHAT_BAN_ACK(GuildAcademyMemberTask *this, int iRevBytes, PROTO_NC_GUILD_ACADEMY_MEMBER_CHAT_BAN_ACK *pkProto)
{
  int v3; // eax@1
  GuildAcademyMemberTask *v4; // esi@1
  NiUnsharedGeometryGroup *v5; // eax@3
  int v6; // esi@10
  NiUnsharedGeometryGroup *v7; // edi@10

  v3 = pkProto->Error;
  v4 = this;
  if ( (_WORD)v3 != 6064 )
  {
    switch ( v3 )
    {
      case 6065:
        v5 = TextData::Get(0x7DB6D5CBu);
        goto LABEL_10;
      case 6066:
        v5 = TextData::Get(0x1D2F7C72u);
        goto LABEL_10;
      case 6067:
        v5 = TextData::Get(0xF0C3E24u);
        goto LABEL_10;
      case 6068:
        v5 = TextData::Get(0x277C607Eu);
        goto LABEL_10;
      case 6069:
        v5 = TextData::Get(0xCEF8D8D4);
        goto LABEL_10;
      case 6070:
        v5 = TextData::Get(0x38664AF3u);
        goto LABEL_10;
      case 6071:
        v5 = TextData::Get(0x23542449u);
LABEL_10:
        v6 = (int)&v4->vfptr;
        v7 = v5;
        if ( *(_DWORD *)(v6 + 4) )
        {
          (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v6 + 4) + 4))(25, v5, v6);
          if ( *(_DWORD *)(v6 + 4) )
            (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v6 + 4) + 20))(25, v7, v6);
        }
        (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v6 + 20))(v6, 25, v7, v6);
        break;
      default:
        return 1;
    }
  }
  return 1;
}

//----- (006F9D30) --------------------------------------------------------
int __thiscall GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_CHAT_BAN_CMD(GuildAcademyMemberTask *this, int iRevBytes, PROTO_NC_GUILD_ACADEMY_MEMBER_CHAT_BAN_CMD *pkProto)
{
  unsigned int v3; // edx@1
  GuildAcademyMemberTask *v4; // ebx@1
  unsigned int v5; // ecx@1
  unsigned int v6; // eax@1
  unsigned int v7; // ecx@1
  unsigned int v8; // edx@1
  unsigned int v9; // eax@1
  unsigned int v10; // ecx@1
  unsigned int v11; // edx@1
  unsigned int v12; // eax@1
  Name5 *v13; // eax@1
  char *v14; // eax@6
  char *v15; // edi@6
  char *v16; // eax@10
  char *v17; // edi@10
  char acTargetName[21]; // [sp+Ch] [bp-34h]@1
  char acSourceName[21]; // [sp+24h] [bp-1Ch]@1

  v3 = pkProto->sChatBanSourceCharID.n5_code[2];
  v4 = this;
  v5 = pkProto->sChatBanSourceCharID.n5_code[1];
  *(_DWORD *)acSourceName = pkProto->sChatBanSourceCharID.n5_code[0];
  v6 = pkProto->sChatBanSourceCharID.n5_code[3];
  *(_DWORD *)&acSourceName[4] = v5;
  v7 = pkProto->sChatBanSourceCharID.n5_code[4];
  *(_DWORD *)&acSourceName[8] = v3;
  v8 = pkProto->sChatBanTargetCharID.n5_code[0];
  *(_DWORD *)&acSourceName[12] = v6;
  v9 = pkProto->sChatBanTargetCharID.n5_code[1];
  *(_DWORD *)&acSourceName[16] = v7;
  v10 = pkProto->sChatBanTargetCharID.n5_code[2];
  *(_DWORD *)acTargetName = v8;
  v11 = pkProto->sChatBanTargetCharID.n5_code[3];
  *(_DWORD *)&acTargetName[4] = v9;
  v12 = pkProto->sChatBanTargetCharID.n5_code[4];
  *(_DWORD *)&acTargetName[8] = v10;
  acSourceName[20] = 0;
  *(_DWORD *)&acTargetName[12] = v11;
  *(_DWORD *)&acTargetName[16] = v12;
  acTargetName[20] = 0;
  v13 = User::GetMainCharID(&g_kUser);
  if ( pkProto->sChatBanTargetCharID.n5_code[0] != v13->n5_code[0]
    || pkProto->sChatBanTargetCharID.n5_code[1] != v13->n5_code[1]
    || pkProto->sChatBanTargetCharID.n5_code[2] != v13->n5_code[2]
    || pkProto->sChatBanTargetCharID.n5_code[3] != v13->n5_code[3]
    || pkProto->sChatBanTargetCharID.n5_code[4] != v13->n5_code[4] )
  {
    v16 = (char *)TextData::Get(0x90E835Fu);
    v17 = fs(v16, acSourceName, acTargetName);
    if ( v4->m_pkMsgHooker )
    {
      ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v4->m_pkMsgHooker->vfptr->SendDirectMessage)(
        25,
        v17,
        &v4->vfptr);
      if ( v4->m_pkMsgHooker )
        ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v4->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          25,
          v17,
          &v4->vfptr);
    }
    v4->vfptr->DirectDispatchToParent((IDirectMessenger *)&v4->vfptr, 25, v17, (IDirectMessenger *)&v4->vfptr);
  }
  else
  {
    v14 = (char *)TextData::Get(0xB8BEA83D);
    v15 = fs(v14, acSourceName);
    if ( v4->m_pkMsgHooker )
    {
      ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v4->m_pkMsgHooker->vfptr->SendDirectMessage)(
        25,
        v15,
        &v4->vfptr);
      if ( v4->m_pkMsgHooker )
        ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v4->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          25,
          v15,
          &v4->vfptr);
    }
    v4->vfptr->DirectDispatchToParent((IDirectMessenger *)&v4->vfptr, 25, v15, (IDirectMessenger *)&v4->vfptr);
  }
  return 1;
}

//----- (006F9E90) --------------------------------------------------------
int __thiscall GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_CHAT_BAN_CANCEL_ACK(GuildAcademyMemberTask *this, int iRevBytes, PROTO_NC_GUILD_ACADEMY_MEMBER_CHAT_BAN_CANCEL_ACK *pkProto)
{
  int v3; // eax@1
  GuildAcademyMemberTask *v4; // esi@1
  NiUnsharedGeometryGroup *v5; // eax@3
  int v6; // esi@12
  NiUnsharedGeometryGroup *v7; // edi@12

  v3 = pkProto->Error;
  v4 = this;
  if ( (_WORD)v3 != 12712 )
  {
    switch ( v3 )
    {
      case 12713:
        v5 = TextData::Get(0x7DB6D5CBu);
        goto LABEL_12;
      case 12714:
        v5 = TextData::Get(0x1D2F7C72u);
        goto LABEL_12;
      case 12715:
        v5 = TextData::Get(0xF0C3E24u);
        goto LABEL_12;
      case 12716:
        v5 = TextData::Get(0x277C607Eu);
        goto LABEL_12;
      case 12717:
        v5 = TextData::Get(0xCEF8D8D4);
        goto LABEL_12;
      case 12718:
        v5 = TextData3::Get(0x12E2E258u);
        goto LABEL_12;
      case 12719:
        v5 = TextData::Get(0x23542449u);
        goto LABEL_12;
      case 12720:
        v5 = TextData3::Get(0x5C5D43D2u);
        goto LABEL_12;
      case 12721:
        v5 = TextData3::Get(0x68702AC6u);
LABEL_12:
        v6 = (int)&v4->vfptr;
        v7 = v5;
        if ( *(_DWORD *)(v6 + 4) )
        {
          (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v6 + 4) + 4))(25, v5, v6);
          if ( *(_DWORD *)(v6 + 4) )
            (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v6 + 4) + 20))(25, v7, v6);
        }
        (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v6 + 20))(v6, 25, v7, v6);
        break;
      default:
        return 1;
    }
  }
  return 1;
}

//----- (006F9F90) --------------------------------------------------------
int __thiscall GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_CHAT_BAN_CANCEL_CMD(GuildAcademyMemberTask *this, int iRevBytes, PROTO_NC_GUILD_ACADEMY_MEMBER_CHAT_BAN_CANCEL_CMD *pkProto)
{
  unsigned int v3; // edx@1
  GuildAcademyMemberTask *v4; // ebx@1
  unsigned int v5; // ecx@1
  unsigned int v6; // eax@1
  unsigned int v7; // ecx@1
  unsigned int v8; // edx@1
  unsigned int v9; // eax@1
  unsigned int v10; // ecx@1
  unsigned int v11; // edx@1
  unsigned int v12; // eax@1
  Name5 *v13; // eax@1
  char *v14; // eax@6
  char *v15; // edi@6
  char *v16; // eax@10
  char *v17; // edi@10
  char acTargetName[21]; // [sp+Ch] [bp-34h]@1
  char acSourceName[21]; // [sp+24h] [bp-1Ch]@1

  v3 = pkProto->sChatBanCancelSourceCharID.n5_code[2];
  v4 = this;
  v5 = pkProto->sChatBanCancelSourceCharID.n5_code[1];
  *(_DWORD *)acSourceName = pkProto->sChatBanCancelSourceCharID.n5_code[0];
  v6 = pkProto->sChatBanCancelSourceCharID.n5_code[3];
  *(_DWORD *)&acSourceName[4] = v5;
  v7 = pkProto->sChatBanCancelSourceCharID.n5_code[4];
  *(_DWORD *)&acSourceName[8] = v3;
  v8 = pkProto->sChatBanCancelTargetCharID.n5_code[0];
  *(_DWORD *)&acSourceName[12] = v6;
  v9 = pkProto->sChatBanCancelTargetCharID.n5_code[1];
  *(_DWORD *)&acSourceName[16] = v7;
  v10 = pkProto->sChatBanCancelTargetCharID.n5_code[2];
  *(_DWORD *)acTargetName = v8;
  v11 = pkProto->sChatBanCancelTargetCharID.n5_code[3];
  *(_DWORD *)&acTargetName[4] = v9;
  v12 = pkProto->sChatBanCancelTargetCharID.n5_code[4];
  *(_DWORD *)&acTargetName[8] = v10;
  acSourceName[20] = 0;
  *(_DWORD *)&acTargetName[12] = v11;
  *(_DWORD *)&acTargetName[16] = v12;
  acTargetName[20] = 0;
  v13 = User::GetMainCharID(&g_kUser);
  if ( pkProto->sChatBanCancelTargetCharID.n5_code[0] != v13->n5_code[0]
    || pkProto->sChatBanCancelTargetCharID.n5_code[1] != v13->n5_code[1]
    || pkProto->sChatBanCancelTargetCharID.n5_code[2] != v13->n5_code[2]
    || pkProto->sChatBanCancelTargetCharID.n5_code[3] != v13->n5_code[3]
    || pkProto->sChatBanCancelTargetCharID.n5_code[4] != v13->n5_code[4] )
  {
    v16 = (char *)TextData3::Get(0x62F1DFAEu);
    v17 = fs(v16, acSourceName, acTargetName);
    if ( v4->m_pkMsgHooker )
    {
      ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v4->m_pkMsgHooker->vfptr->SendDirectMessage)(
        25,
        v17,
        &v4->vfptr);
      if ( v4->m_pkMsgHooker )
        ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v4->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          25,
          v17,
          &v4->vfptr);
    }
    v4->vfptr->DirectDispatchToParent((IDirectMessenger *)&v4->vfptr, 25, v17, (IDirectMessenger *)&v4->vfptr);
  }
  else
  {
    v14 = (char *)TextData3::Get(0x539D9A66u);
    v15 = fs(v14, acSourceName);
    if ( v4->m_pkMsgHooker )
    {
      ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v4->m_pkMsgHooker->vfptr->SendDirectMessage)(
        25,
        v15,
        &v4->vfptr);
      if ( v4->m_pkMsgHooker )
        ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v4->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          25,
          v15,
          &v4->vfptr);
    }
    v4->vfptr->DirectDispatchToParent((IDirectMessenger *)&v4->vfptr, 25, v15, (IDirectMessenger *)&v4->vfptr);
  }
  return 1;
}

//----- (006FA0F0) --------------------------------------------------------
char __userpurge GuildAcademyMemberTask::OnProcessNetMsg@<al>(GuildAcademyMemberTask *this@<ecx>, int a2@<edi>, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  GuildAcademyMemberTask *v6; // esi@1
  int v7; // esi@4
  char result; // al@7
  int v9; // esi@8
  int v10; // esi@12
  int v11; // esi@16
  int v12; // esi@21
  int v13; // esi@25
  int v14; // esi@30
  int v15; // esi@35

  v6 = this;
  if ( iDepart == 4 )
  {
    if ( iCommand == 151 && *(_DWORD *)pvData )
      NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0xDu, 0, 0);
    return 0;
  }
  if ( iDepart != 38 )
    return 0;
  switch ( iCommand )
  {
    case 14:
      CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_LIST_ACK(
        (CGuildAcademyMember *)&this->vfptr,
        (PROTO_NC_GUILD_ACADEMY_MEMBER_LIST_ACK *)pvData);
      v7 = (int)&v6->vfptr;
      if ( *(_DWORD *)(v7 + 4) )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v7 + 4) + 4))(71, 0, v7);
        if ( *(_DWORD *)(v7 + 4) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v7 + 4) + 20))(71, 0, v7);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v7 + 20))(v7, 71, 0, v7);
      result = 1;
      break;
    case 19:
      GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_JOIN_CMD(
        this,
        (PROTO_NC_GUILD_ACADEMY_MEMBER_JOIN_CMD *)pvData);
      v9 = (int)&v6->vfptr;
      if ( *(_DWORD *)(v9 + 4) )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v9 + 4) + 4))(71, 0, v9);
        if ( *(_DWORD *)(v9 + 4) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v9 + 4) + 20))(71, 0, v9);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v9 + 20))(v9, 71, 0, v9);
      result = 1;
      break;
    case 24:
      GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_VANISH_CMD(
        this,
        a2,
        (PROTO_NC_GUILD_ACADEMY_MEMBER_VANISH_CMD *)pvData);
      v10 = (int)&v6->vfptr;
      if ( *(_DWORD *)(v10 + 4) )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v10 + 4) + 4))(71, 0, v10);
        if ( *(_DWORD *)(v10 + 4) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v10 + 4) + 20))(71, 0, v10);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v10 + 20))(v10, 71, 0, v10);
      result = 1;
      break;
    case 96:
      GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_LEAVE_CMD(
        this,
        (PROTO_NC_GUILD_ACADEMY_MEMBER_LEAVE_CMD *)pvData);
      v11 = (int)&v6->vfptr;
      if ( *(_DWORD *)(v11 + 4) )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v11 + 4) + 4))(71, 0, v11);
        if ( *(_DWORD *)(v11 + 4) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v11 + 4) + 20))(71, 0, v11);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v11 + 20))(v11, 71, 0, v11);
      result = 1;
      break;
    case 100:
      this->vfptr->Recv_NC_GUILD_ACADEMY_MEMBER_INTRO_CMD(
        (CGuildAcademyMember *)&this->vfptr,
        (PROTO_NC_GUILD_ACADEMY_MEMBER_INTRO_CMD *)pvData);
      result = 1;
      break;
    case 97:
      GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_LOGON_CMD(
        this,
        (PROTO_NC_GUILD_ACADEMY_MEMBER_LOGON_CMD *)pvData);
      v12 = (int)&v6->vfptr;
      if ( *(_DWORD *)(v12 + 4) )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v12 + 4) + 4))(71, 0, v12);
        if ( *(_DWORD *)(v12 + 4) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v12 + 4) + 20))(71, 0, v12);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v12 + 20))(v12, 71, 0, v12);
      result = 1;
      break;
    case 98:
      CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_LOGOFF_CMD(
        (CGuildAcademyMember *)&this->vfptr,
        (PROTO_NC_GUILD_ACADEMY_MEMBER_LOGOFF_CMD *)pvData);
      v13 = (int)&v6->vfptr;
      if ( *(_DWORD *)(v13 + 4) )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v13 + 4) + 4))(71, 0, v13);
        if ( *(_DWORD *)(v13 + 4) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v13 + 4) + 20))(71, 0, v13);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v13 + 20))(v13, 71, 0, v13);
      result = 1;
      break;
    case 101:
      this->vfptr->Recv_NC_GUILD_ACADEMY_MEMBER_PARTY_CMD(
        (CGuildAcademyMember *)&this->vfptr,
        (PROTO_NC_GUILD_ACADEMY_MEMBER_PARTY_CMD *)pvData);
      result = 1;
      break;
    case 102:
      this->vfptr->Recv_NC_GUILD_ACADEMY_MEMBER_LEVEL_CMD(
        (CGuildAcademyMember *)&this->vfptr,
        (PROTO_NC_GUILD_ACADEMY_MEMBER_LEVEL_CMD *)pvData);
      v14 = (int)&v6->vfptr;
      if ( *(_DWORD *)(v14 + 4) )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v14 + 4) + 4))(71, 0, v14);
        if ( *(_DWORD *)(v14 + 4) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v14 + 4) + 20))(71, 0, v14);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v14 + 20))(v14, 71, 0, v14);
      result = 1;
      break;
    case 99:
      this->vfptr->Recv_NC_GUILD_ACADEMY_MEMBER_MAP_CMD(
        (CGuildAcademyMember *)&this->vfptr,
        (PROTO_NC_GUILD_ACADEMY_MEMBER_MAP_CMD *)pvData);
      result = 1;
      break;
    case 103:
      this->vfptr->Recv_NC_GUILD_ACADEMY_MEMBER_CLASS_CMD(
        (CGuildAcademyMember *)&this->vfptr,
        (PROTO_NC_GUILD_ACADEMY_MEMBER_CLASS_CMD *)pvData);
      v15 = (int)&v6->vfptr;
      if ( *(_DWORD *)(v15 + 4) )
      {
        (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v15 + 4) + 4))(71, 0, v15);
        if ( *(_DWORD *)(v15 + 4) )
          (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v15 + 4) + 20))(71, 0, v15);
      }
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v15 + 20))(v15, 71, 0, v15);
      result = 1;
      break;
    case 34:
      GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_CHAT_BAN_ACK(
        this,
        iRevBytes,
        (PROTO_NC_GUILD_ACADEMY_MEMBER_CHAT_BAN_ACK *)pvData);
      result = 1;
      break;
    case 35:
      GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_CHAT_BAN_CMD(
        this,
        iRevBytes,
        (PROTO_NC_GUILD_ACADEMY_MEMBER_CHAT_BAN_CMD *)pvData);
      result = 1;
      break;
    case 139:
      GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_CHAT_BAN_CANCEL_ACK(
        this,
        iRevBytes,
        (PROTO_NC_GUILD_ACADEMY_MEMBER_CHAT_BAN_CANCEL_ACK *)pvData);
      result = 1;
      break;
    case 140:
      GuildAcademyMemberTask::On_Recv_NC_GUILD_ACADEMY_MEMBER_CHAT_BAN_CANCEL_CMD(
        this,
        iRevBytes,
        (PROTO_NC_GUILD_ACADEMY_MEMBER_CHAT_BAN_CANCEL_CMD *)pvData);
      result = 1;
      break;
    default:
      return 0;
  }
  return result;
}

//----- (006FA5C0) --------------------------------------------------------
void __thiscall GuildAcademyMemberTask::GuildAcademyMemberTask(GuildAcademyMemberTask *this)
{
  GuildAcademyMemberTask *v1; // esi@1
  void (__thiscall ***v2)(_DWORD, _DWORD); // edi@3

  v1 = this;
  ITask::ITask((ITask *)&this->vfptr, 0);
  CGuildAcademyMember::CGuildAcademyMember((CGuildAcademyMember *)&v1->vfptr);
  v1->vfptr = (CGuildAcademyMemberVtbl *)&CClientGuildAcademyMember::`vftable';
  v1->vfptr = (NiRefObjectVtbl *)&GuildAcademyMemberTask::`vftable'{for `NiRefObject'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildAcademyMemberTask::`vftable'{for `IDirectMessenger'};
  v1->vfptr = (CGuildAcademyMemberVtbl *)&GuildAcademyMemberTask::`vftable';
  v1->m_kGuildNameToJoin.n4_code[3] = 0;
  v1->m_kGuildNameToJoin.n4_code[2] = 0;
  v1->m_kGuildNameToJoin.n4_code[1] = 0;
  v1->m_kGuildNameToJoin.n4_code[0] = 0;
  if ( (GuildAcademyMemberTask *)GuildAcademyMemberTask::ms_spGuildAcademyMemberTask != v1 )
  {
    if ( GuildAcademyMemberTask::ms_spGuildAcademyMemberTask )
    {
      v2 = (void (__thiscall ***)(_DWORD, _DWORD))GuildAcademyMemberTask::ms_spGuildAcademyMemberTask;
      if ( !InterlockedDecrement((volatile LONG *)(GuildAcademyMemberTask::ms_spGuildAcademyMemberTask + 4)) )
      {
        if ( v2 )
          (**v2)(v2, 1);
      }
    }
    GuildAcademyMemberTask::ms_spGuildAcademyMemberTask = (int)v1;
    InterlockedIncrement((volatile LONG *)&v1->m_uiRefCount);
  }
  v1->m_pkGuildAcademyJoinReqDlg = 0;
}
// 9C77E0: using guessed type int (__thiscall *CClientGuildAcademyMember::`vftable')(CGuildAcademyMember *this, struct PROTO_NC_GUILD_ACADEMY_MEMBER_LIST_ACK *);
// 9C7814: using guessed type int (__thiscall *GuildAcademyMemberTask::`vftable')(CGuildAcademyMember *this, struct PROTO_NC_GUILD_ACADEMY_MEMBER_LIST_ACK *);
// 9C7848: using guessed type void (__thiscall *GuildAcademyMemberTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C7864: using guessed type int (__thiscall *GuildAcademyMemberTask::`vftable'{for `NiRefObject'})(void *p, char);
// B5C2CC: using guessed type int GuildAcademyMemberTask::ms_spGuildAcademyMemberTask;

//----- (006FA6A0) --------------------------------------------------------
GuildAcademyMemberTask *__thiscall GuildAcademyMemberTask::`scalar deleting destructor'(GuildAcademyMemberTask *this, unsigned int a2)
{
  GuildAcademyMemberTask *v2; // esi@1

  v2 = this;
  CGuildAcademyMember::~CGuildAcademyMember((CGuildAcademyMember *)&this->vfptr);
  ITask::~ITask((ITask *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006FA710) --------------------------------------------------------
void __thiscall GuildAcademyNotifyTask::OnStart(GuildAcademyNotifyTask *this)
{
  GuildAcademyNotifyTask *v1; // esi@1
  unsigned int v2; // edi@1
  _WORD *v3; // eax@1
  _BYTE *v4; // ebx@1
  char **v5; // eax@1
  int v6; // edx@3
  char v7; // cl@4

  v1 = this;
  v2 = this->m_kNoticeMsg._Mysize + 3;
  v3 = operator new[](v2);
  v4 = v3;
  *v3 = LOWORD(v1->m_kNoticeMsg._Mysize) + 1;
  v5 = &v1->m_kNoticeMsg._Bx._Ptr;
  if ( v1->m_kNoticeMsg._Myres >= 0x10 )
    v5 = (char **)*v5;
  v6 = v4 + 2 - (_BYTE *)v5;
  do
  {
    v7 = *(_BYTE *)v5;
    *((_BYTE *)v5 + v6) = *(_BYTE *)v5;
    v5 = (char **)((char *)v5 + 1);
  }
  while ( v7 );
  NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0x24u, v4, v2);
  operator delete[](v4);
}

//----- (006FA770) --------------------------------------------------------
char __thiscall GuildAcademyNotifyTask::OnProcessNetMsg(GuildAcademyNotifyTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  GuildAcademyNotifyTask *v5; // ebx@1
  char result; // al@3
  NiUnsharedGeometryGroup *v7; // eax@5
  NiUnsharedGeometryGroup *v8; // edi@10

  v5 = this;
  if ( iDepart == 38 && iCommand == 37 )
  {
    switch ( *(_WORD *)pvData )
    {
      case 0x17B8:
        v7 = TextData::Get(0xC34FF660);
        goto LABEL_10;
      case 0x17B9:
        v7 = TextData::Get(0x76816B99u);
        goto LABEL_10;
      case 0x17BA:
        v7 = TextData::Get(0x43C1E7Au);
        goto LABEL_10;
      case 0x17BB:
        v7 = TextData::Get(0xD4D93C40);
        goto LABEL_10;
      case 0x17BC:
        v7 = TextData::Get(0xCEF8D8D4);
LABEL_10:
        v8 = v7;
        if ( v5->m_pkMsgHooker )
        {
          ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v5->m_pkMsgHooker->vfptr->SendDirectMessage)(25, v7, &v5->vfptr);
          if ( v5->m_pkMsgHooker )
            ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v5->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
              25,
              v8,
              &v5->vfptr);
        }
        v5->vfptr->DirectDispatchToParent((IDirectMessenger *)&v5->vfptr, 25, v8, (IDirectMessenger *)&v5->vfptr);
        break;
      default:
        break;
    }
    v5->m_eTaskState = 2;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006FA830) --------------------------------------------------------
void __thiscall GuildAcademyNotifyTask::SetInfo(GuildAcademyNotifyTask *this, char *pcNotice)
{
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
    &this->m_kNoticeMsg,
    pcNotice,
    strlen(pcNotice));
}

//----- (006FA860) --------------------------------------------------------
void __thiscall GuildAcademySelectTask::OnStart(GuildAcademySelectTask *this)
{
  GuildAcademySelectTask *v1; // esi@1
  GameFrameWork *v2; // edi@1
  GuildAcademySelectWin *v3; // eax@1
  int v4; // edx@2

  v1 = this;
  v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  v3 = GuildAcademySelectWin::CreateWin(0);
  GuildAcademySelectTask::m_pkGuildAcademySelectWin = (PgWin *)v3;
  if ( v1 )
    v4 = (int)&v1->vfptr;
  else
    v4 = 0;
  ((void (__stdcall *)(_DWORD))v3->vfptr->SetMsgHooker)(v4);
  if ( v2 )
    GameFrameWork::SetAutoCloseWin(v2, GuildAcademySelectTask::m_pkGuildAcademySelectWin);
}

//----- (006FA8C0) --------------------------------------------------------
void __cdecl GuildAcademySelectTask::OnNCGuildListReq()
{
  NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x1Du, 3u, 0, 0);
}

//----- (006FA8F0) --------------------------------------------------------
void __cdecl GuildAcademySelectTask::ShowGuildAcademySelectWin()
{
  if ( !(unsigned __int8)((int (*)(void))GuildAcademySelectTask::m_pkGuildAcademySelectWin->vfptr[65].__vecDelDtor)() )
    PgWinMgr::ShowWin(&Pgg_kWinMgr, GuildAcademySelectTask::m_pkGuildAcademySelectWin);
}

//----- (006FA920) --------------------------------------------------------
PgWin *__cdecl GuildAcademySelectTask::GetGuildAcademySelectWin()
{
  return GuildAcademySelectTask::m_pkGuildAcademySelectWin;
}

//----- (006FA930) --------------------------------------------------------
void __cdecl GuildAcademySelectTask::Terminate()
{
  void (__thiscall ***v0)(_DWORD, _DWORD); // esi@1

  v0 = (void (__thiscall ***)(_DWORD, _DWORD))GuildAcademySelectTask::ms_spGuildAcademySelectTask;
  if ( GuildAcademySelectTask::ms_spGuildAcademySelectTask )
  {
    if ( !InterlockedDecrement((volatile LONG *)(GuildAcademySelectTask::ms_spGuildAcademySelectTask + 4)) )
    {
      if ( v0 )
        (**v0)(v0, 1);
    }
    GuildAcademySelectTask::ms_spGuildAcademySelectTask = 0;
  }
}
// B5C2D4: using guessed type int GuildAcademySelectTask::ms_spGuildAcademySelectTask;

//----- (006FA970) --------------------------------------------------------
int __thiscall GuildAcademySelectTask::On_Recv_NC_GUILD_ACADEMY_LIST_ACK(GuildAcademySelectTask *this, PROTO_NC_GUILD_ACADEMY_LIST_ACK *pkProto)
{
  signed int v2; // esi@2
  SHINE_GUILD_ACADEMY_LIST *v3; // edi@3
  char *v5; // esi@8
  NiUnsharedGeometryGroup *v6; // edi@8

  if ( pkProto->Error == 6312 )
  {
    v2 = 0;
    if ( (signed int)pkProto->NumOfGuildAcademy > 0 )
    {
      v3 = (SHINE_GUILD_ACADEMY_LIST *)&pkProto[1];
      do
      {
        GuildAcademySelectWin::SetGuildList(
          (GuildAcademySelectWin *)GuildAcademySelectTask::m_pkGuildAcademySelectWin,
          v3);
        ++v2;
        ++v3;
      }
      while ( v2 < (signed int)pkProto->NumOfGuildAcademy );
    }
    GuildAcademySelectWin::On_Recv_NC_GUILD_ACADEMY_LIST_ACK(
      (GuildAcademySelectWin *)GuildAcademySelectTask::m_pkGuildAcademySelectWin,
      pkProto);
    if ( !(unsigned __int8)((int (*)(void))GuildAcademySelectTask::m_pkGuildAcademySelectWin->vfptr[65].__vecDelDtor)() )
    {
      PgWinMgr::ShowWin(&Pgg_kWinMgr, GuildAcademySelectTask::m_pkGuildAcademySelectWin);
      return 1;
    }
  }
  else if ( pkProto->Error == 6313 )
  {
    v5 = (char *)&this->vfptr;
    v6 = TextData::Get(0xCEF8D8D4);
    if ( *((_DWORD *)v5 + 1) )
    {
      (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, char *))(**((_DWORD **)v5 + 1) + 4))(25, v6, v5);
      if ( *((_DWORD *)v5 + 1) )
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, char *))(**((_DWORD **)v5 + 1) + 20))(25, v6, v5);
    }
    (*(void (__thiscall **)(char *, signed int, NiUnsharedGeometryGroup *, char *))(*(_DWORD *)v5 + 20))(v5, 25, v6, v5);
  }
  return 1;
}

//----- (006FAA50) --------------------------------------------------------
void __thiscall GuildAcademySelectTask::~GuildAcademySelectTask(GuildAcademySelectTask *this)
{
  GuildAcademySelectTask *v1; // esi@1
  GuildAcademySelectTask *v2; // ST08_4@1
  CGuildList *v3; // ecx@1

  v1 = this;
  v2 = this;
  v3 = (CGuildList *)&this->vfptr;
  v2->vfptr = (NiRefObjectVtbl *)&GuildAcademySelectTask::`vftable'{for `NiRefObject'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildAcademySelectTask::`vftable'{for `IDirectMessenger'};
  v3->vfptr = (CGuildListVtbl *)&GuildAcademySelectTask::`vftable';
  CGuildList::~CGuildList(v3);
  ITask::~ITask((ITask *)&v1->vfptr);
}
// 9C7888: using guessed type enum NiAnimationKey::KeyContent (__thiscall *GuildAcademySelectTask::`vftable')(NiPoint3Interpolator *this, unsigned __int16);
// 9C7894: using guessed type void (__thiscall *GuildAcademySelectTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C78B0: using guessed type int (__thiscall *GuildAcademySelectTask::`vftable'{for `NiRefObject'})(void *p, char);

//----- (006FAAC0) --------------------------------------------------------
char __thiscall GuildAcademySelectTask::OnProcessNetMsg(GuildAcademySelectTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  char result; // al@3

  if ( iDepart == 38 && iCommand == 12 )
  {
    GuildAcademySelectTask::On_Recv_NC_GUILD_ACADEMY_LIST_ACK(this, (PROTO_NC_GUILD_ACADEMY_LIST_ACK *)pvData);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006FAAF0) --------------------------------------------------------
void __thiscall GuildAcademySelectTask::GuildAcademySelectTask(GuildAcademySelectTask *this)
{
  GuildAcademySelectTask *v1; // esi@1

  v1 = this;
  ITask::ITask((ITask *)&this->vfptr, 0);
  CGuildList::CGuildList((CGuildList *)&v1->vfptr);
  v1->vfptr = (CGuildListVtbl *)&CClientGuildAcademySelectList::`vftable';
  v1->vfptr = (NiRefObjectVtbl *)&GuildAcademySelectTask::`vftable'{for `NiRefObject'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildAcademySelectTask::`vftable'{for `IDirectMessenger'};
  v1->vfptr = (CGuildListVtbl *)&GuildAcademySelectTask::`vftable';
}
// 9C787C: using guessed type enum NiAnimationKey::KeyContent (__thiscall *CClientGuildAcademySelectList::`vftable')(NiPoint3Interpolator *this, unsigned __int16);
// 9C7888: using guessed type enum NiAnimationKey::KeyContent (__thiscall *GuildAcademySelectTask::`vftable')(NiPoint3Interpolator *this, unsigned __int16);
// 9C7894: using guessed type void (__thiscall *GuildAcademySelectTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C78B0: using guessed type int (__thiscall *GuildAcademySelectTask::`vftable'{for `NiRefObject'})(void *p, char);

//----- (006FAB60) --------------------------------------------------------
void __cdecl GuildAcademySelectTask::Create(IDirectMessenger *pkMsgHooker)
{
  int v1; // eax@1
  ITask *v2; // eax@2
  int v3; // esi@2
  void (__thiscall ***v4)(_DWORD, _DWORD); // edi@7

  v1 = GuildAcademySelectTask::ms_spGuildAcademySelectTask;
  if ( !GuildAcademySelectTask::ms_spGuildAcademySelectTask )
  {
    v2 = (ITask *)operator new(0x4Cu);
    v3 = (int)v2;
    if ( v2 )
    {
      ITask::ITask(v2, 0);
      CGuildList::CGuildList((CGuildList *)(v3 + 64));
      *(_DWORD *)(v3 + 64) = &CClientGuildAcademySelectList::`vftable';
      *(_DWORD *)v3 = &GuildAcademySelectTask::`vftable'{for `NiRefObject'};
      *(_DWORD *)(v3 + 8) = &GuildAcademySelectTask::`vftable'{for `IDirectMessenger'};
      *(_DWORD *)(v3 + 64) = &GuildAcademySelectTask::`vftable';
    }
    else
    {
      v3 = 0;
    }
    v1 = GuildAcademySelectTask::ms_spGuildAcademySelectTask;
    if ( GuildAcademySelectTask::ms_spGuildAcademySelectTask != v3 )
    {
      if ( GuildAcademySelectTask::ms_spGuildAcademySelectTask )
      {
        v4 = (void (__thiscall ***)(_DWORD, _DWORD))GuildAcademySelectTask::ms_spGuildAcademySelectTask;
        if ( !InterlockedDecrement((volatile LONG *)(GuildAcademySelectTask::ms_spGuildAcademySelectTask + 4)) )
        {
          if ( v4 )
            (**v4)(v4, 1);
        }
      }
      v1 = v3;
      GuildAcademySelectTask::ms_spGuildAcademySelectTask = v3;
      if ( v3 )
      {
        InterlockedIncrement((volatile LONG *)(v3 + 4));
        v1 = GuildAcademySelectTask::ms_spGuildAcademySelectTask;
      }
    }
  }
  (**(void (__cdecl ***)(IDirectMessenger *))(v1 + 8))(pkMsgHooker);
}
// 9C787C: using guessed type enum NiAnimationKey::KeyContent (__thiscall *CClientGuildAcademySelectList::`vftable')(NiPoint3Interpolator *this, unsigned __int16);
// 9C7888: using guessed type enum NiAnimationKey::KeyContent (__thiscall *GuildAcademySelectTask::`vftable')(NiPoint3Interpolator *this, unsigned __int16);
// 9C7894: using guessed type void (__thiscall *GuildAcademySelectTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C78B0: using guessed type int (__thiscall *GuildAcademySelectTask::`vftable'{for `NiRefObject'})(void *p, char);
// B5C2D4: using guessed type int GuildAcademySelectTask::ms_spGuildAcademySelectTask;

//----- (006FAC50) --------------------------------------------------------
GuildAcademySelectTask *__thiscall GuildAcademySelectTask::`scalar deleting destructor'(GuildAcademySelectTask *this, unsigned int a2)
{
  GuildAcademySelectTask *v2; // esi@1
  GuildAcademySelectTask *v3; // ST0C_4@1
  CGuildList *v4; // ecx@1

  v2 = this;
  v3 = this;
  v4 = (CGuildList *)&this->vfptr;
  v3->vfptr = (NiRefObjectVtbl *)&GuildAcademySelectTask::`vftable'{for `NiRefObject'};
  v2->vfptr = (IDirectMessengerVtbl *)&GuildAcademySelectTask::`vftable'{for `IDirectMessenger'};
  v4->vfptr = (CGuildListVtbl *)&GuildAcademySelectTask::`vftable';
  CGuildList::~CGuildList(v4);
  ITask::~ITask((ITask *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C7888: using guessed type enum NiAnimationKey::KeyContent (__thiscall *GuildAcademySelectTask::`vftable')(NiPoint3Interpolator *this, unsigned __int16);
// 9C7894: using guessed type void (__thiscall *GuildAcademySelectTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C78B0: using guessed type int (__thiscall *GuildAcademySelectTask::`vftable'{for `NiRefObject'})(void *p, char);

//----- (006FACD0) --------------------------------------------------------
bool __thiscall CClientGuildAcademy::AmIGuildAcademyMember(CClientGuildAcademy *this)
{
  return this->m_bIsGuildAcademyMember != 0;
}

//----- (006FACE0) --------------------------------------------------------
bool __thiscall CClientGuildAcademy::IsGuildWar(CClientGuildAcademy *this)
{
  return this->m_bGuildWarStart != 0;
}

//----- (006FACF0) --------------------------------------------------------
void __thiscall GuildAcademyTask::OnStart(GuildAcademyTask *this)
{
  GuildAcademyTask *v1; // esi@1
  PgFrameWork *v2; // edi@1
  GuildAcademyMenuWin *v3; // eax@1
  GuildAcademyRankingWin *v4; // eax@1
  GuildAcademyHallOfFameWin *v5; // eax@1
  GuildAcademyMoneyRewardWin *v6; // eax@1
  GuildAcademyItemRewardWin *v7; // eax@1
  GuildAcademyStorageWin *v8; // eax@1
  GuildAcademyMemberTask *v9; // eax@3
  ITask *v10; // eax@4

  v1 = this;
  v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  v3 = GuildAcademyMenuWin::CreateWin(0);
  v1->m_pkGuildAcademyMenuWin = v3;
  ((void (__stdcall *)(_DWORD))v3->vfptr->SetMsgHooker)(&v1->vfptr);
  v4 = GuildAcademyRankingWin::CreateWin(v2);
  v1->m_pkGuildAcademyRankingWin = v4;
  ((void (__stdcall *)(_DWORD))v4->vfptr->SetMsgHooker)(&v1->vfptr);
  v5 = GuildAcademyHallOfFameWin::CreateWin(v2);
  v1->m_pkGuildAcademyHallOfFameWin = v5;
  ((void (__stdcall *)(_DWORD))v5->vfptr->SetMsgHooker)(&v1->vfptr);
  v6 = GuildAcademyMoneyRewardWin::CreateWin(v2);
  v1->m_pkGuildAcademyMoneyRewardWin = v6;
  ((void (__stdcall *)(_DWORD))v6->vfptr->SetMsgHooker)(&v1->vfptr);
  v7 = GuildAcademyItemRewardWin::CreateWin(v2);
  v1->m_pkGuildAcademyItemRewardWin = v7;
  ((void (__stdcall *)(_DWORD))v7->vfptr->SetMsgHooker)(&v1->vfptr);
  v8 = GuildAcademyStorageWin::CreateWin(v2);
  v1->m_pkGuildAcademyStorageWin = v8;
  ((void (__stdcall *)(_DWORD))v8->vfptr->SetMsgHooker)(&v1->vfptr);
  if ( v2 )
  {
    GameFrameWork::SetAutoCloseWin((GameFrameWork *)v2, (PgWin *)&v1->m_pkGuildAcademyMenuWin->vfptr);
    GameFrameWork::SetAutoCloseWin((GameFrameWork *)v2, (PgWin *)&v1->m_pkGuildAcademyRankingWin->vfptr);
    GameFrameWork::SetAutoCloseWin((GameFrameWork *)v2, (PgWin *)&v1->m_pkGuildAcademyHallOfFameWin->vfptr);
    GameFrameWork::SetAutoCloseWin((GameFrameWork *)v2, (PgWin *)&v1->m_pkGuildAcademyMoneyRewardWin->vfptr);
    GameFrameWork::SetAutoCloseWin((GameFrameWork *)v2, (PgWin *)&v1->m_pkGuildAcademyItemRewardWin->vfptr);
    GameFrameWork::SetAutoCloseWin((GameFrameWork *)v2, (PgWin *)&v1->m_pkGuildAcademyStorageWin->vfptr);
  }
  v9 = (GuildAcademyMemberTask *)operator new(0x2AF4u);
  if ( v9 )
    GuildAcademyMemberTask::GuildAcademyMemberTask(v9);
  else
    v10 = 0;
  ITask::AttachChildTask((ITask *)&v1->vfptr, v10);
}

//----- (006FAE90) --------------------------------------------------------
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_DELETE_CMD(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_DELETE_CMD *pCmd)
{
  int result; // eax@1

  result = 0;
  if ( this->m_bIsGuildAcademy )
  {
    this->m_bIsGuildAcademy = 0;
    this->m_bIsGuildAcademyMember = 0;
    result = 1;
  }
  return result;
}

//----- (006FAEC0) --------------------------------------------------------
BOOL __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_DISMISS_CMD(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_DISMISS_CMD *pCmd)
{
  return this->m_bIsGuildAcademy != 0;
}

//----- (006FAEE0) --------------------------------------------------------
BOOL __thiscall CClientGuildAcademy::AmIGuildAcademyMaster(CClientGuildAcademy *this)
{
  CClientGuildAcademy *v1; // esi@1
  Name5 *v2; // eax@1

  v1 = this;
  v2 = User::GetMainCharID(&g_kUser);
  return v2->n5_code[0] == v1->m_GuildAcademy.sAcademyMasterName.n5_code[0]
      && v2->n5_code[1] == v1->m_GuildAcademy.sAcademyMasterName.n5_code[1]
      && v2->n5_code[2] == v1->m_GuildAcademy.sAcademyMasterName.n5_code[2]
      && v2->n5_code[3] == v1->m_GuildAcademy.sAcademyMasterName.n5_code[3]
      && v2->n5_code[4] == v1->m_GuildAcademy.sAcademyMasterName.n5_code[4];
}

//----- (006FAF40) --------------------------------------------------------
BOOL __thiscall CClientGuildAcademy::IsGuildAcademyMaster(CClientGuildAcademy *this, Name5 charID)
{
  return charID.n5_code[0] == this->m_GuildAcademy.sAcademyMasterName.n5_code[0]
      && *(_QWORD *)&charID.n5_code[1] == *(_QWORD *)&this->m_GuildAcademy.sAcademyMasterName.n5_code[1]
      && *(_QWORD *)&charID.n5_code[3] == *(_QWORD *)&this->m_GuildAcademy.sAcademyMasterName.n5_code[3];
}

//----- (006FAFA0) --------------------------------------------------------
void __thiscall CClientGuildAcademy::ReqHistoryList(CClientGuildAcademy *this)
{
  CClientGuildAcademy *v1; // esi@1
  CClientGuild *v2; // eax@1
  CClientGuild *v3; // eax@2

  v1 = this;
  v2 = GuildTask::GetGuild();
  if ( CClientGuild::AmIGuildMaster(v2)
    || (v3 = GuildTask::GetGuild(), (unsigned __int8)CClientGuild::AmIGuildMember(v3))
    || (unsigned __int8)CClientGuildAcademy::AmIGuildAcademyMaster(v1)
    || v1->m_bIsGuildAcademyMember )
  {
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0x8Fu, 0, 0);
  }
}

//----- (006FAFF0) --------------------------------------------------------
void __cdecl GuildAcademyTask::Terminate()
{
  void (__thiscall ***v0)(_DWORD, _DWORD); // esi@1

  v0 = (void (__thiscall ***)(_DWORD, _DWORD))GuildAcademyTask::ms_spGuildAcademyTask;
  if ( GuildAcademyTask::ms_spGuildAcademyTask )
  {
    if ( !InterlockedDecrement((volatile LONG *)(GuildAcademyTask::ms_spGuildAcademyTask + 4)) )
    {
      if ( v0 )
        (**v0)(v0, 1);
    }
    GuildAcademyTask::ms_spGuildAcademyTask = 0;
  }
}
// B5C2D8: using guessed type int GuildAcademyTask::ms_spGuildAcademyTask;

//----- (006FB030) --------------------------------------------------------
void __cdecl GuildAcademyTask::InvalidateGuildAcademyWin()
{
  int v0; // esi@1

  v0 = GuildAcademyTask::ms_spGuildAcademyTask + 8;
  if ( *(_DWORD *)(GuildAcademyTask::ms_spGuildAcademyTask + 12) )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(GuildAcademyTask::ms_spGuildAcademyTask + 12) + 4))(
      71,
      0,
      GuildAcademyTask::ms_spGuildAcademyTask + 8);
    if ( *(_DWORD *)(v0 + 4) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v0 + 4) + 20))(71, 0, v0);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v0 + 20))(v0, 71, 0, v0);
}
// B5C2D8: using guessed type int GuildAcademyTask::ms_spGuildAcademyTask;

//----- (006FB080) --------------------------------------------------------
CClientGuildAcademy *__cdecl GuildAcademyTask::GetGuildAcademy()
{
  CClientGuildAcademy *result; // eax@2

  if ( GuildAcademyTask::ms_spGuildAcademyTask )
    result = (CClientGuildAcademy *)(GuildAcademyTask::ms_spGuildAcademyTask + 64);
  else
    result = 0;
  return result;
}
// B5C2D8: using guessed type int GuildAcademyTask::ms_spGuildAcademyTask;

//----- (006FB090) --------------------------------------------------------
GuildAcademyMenuWin *__cdecl GuildAcademyTask::GetGuildAcademyMenuWin()
{
  return *(GuildAcademyMenuWin **)(GuildAcademyTask::ms_spGuildAcademyTask + 2036);
}
// B5C2D8: using guessed type int GuildAcademyTask::ms_spGuildAcademyTask;

//----- (006FB0A0) --------------------------------------------------------
GuildAcademyRankingWin *__cdecl GuildAcademyTask::GetGuildAcademyRankingWin()
{
  return *(GuildAcademyRankingWin **)(GuildAcademyTask::ms_spGuildAcademyTask + 2040);
}
// B5C2D8: using guessed type int GuildAcademyTask::ms_spGuildAcademyTask;

//----- (006FB0B0) --------------------------------------------------------
GuildAcademyHallOfFameWin *__cdecl GuildAcademyTask::GetGuildAcademyHallOfFameWin()
{
  return *(GuildAcademyHallOfFameWin **)(GuildAcademyTask::ms_spGuildAcademyTask + 2044);
}
// B5C2D8: using guessed type int GuildAcademyTask::ms_spGuildAcademyTask;

//----- (006FB0C0) --------------------------------------------------------
GuildAcademyMoneyRewardWin *__cdecl GuildAcademyTask::GetGuildAcademyMoneyRewardWin()
{
  return *(GuildAcademyMoneyRewardWin **)(GuildAcademyTask::ms_spGuildAcademyTask + 2048);
}
// B5C2D8: using guessed type int GuildAcademyTask::ms_spGuildAcademyTask;

//----- (006FB0D0) --------------------------------------------------------
GuildAcademyItemRewardWin *__cdecl GuildAcademyTask::GetGuildAcademyItemRewardWin()
{
  return *(GuildAcademyItemRewardWin **)(GuildAcademyTask::ms_spGuildAcademyTask + 2052);
}
// B5C2D8: using guessed type int GuildAcademyTask::ms_spGuildAcademyTask;

//----- (006FB0E0) --------------------------------------------------------
GuildAcademyStorageWin *__cdecl GuildAcademyTask::GetGuildAcademyStorageWin()
{
  return *(GuildAcademyStorageWin **)(GuildAcademyTask::ms_spGuildAcademyTask + 2056);
}
// B5C2D8: using guessed type int GuildAcademyTask::ms_spGuildAcademyTask;

//----- (006FB0F0) --------------------------------------------------------
GuildSelectWin *__cdecl GuildAcademyTask::GetGuildSelectWin()
{
  return *(GuildSelectWin **)(GuildAcademyTask::ms_spGuildAcademyTask + 2060);
}
// B5C2D8: using guessed type int GuildAcademyTask::ms_spGuildAcademyTask;

//----- (006FB100) --------------------------------------------------------
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_NOTIFY_CMD(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_NOTIFY_CMD *pCmd)
{
  GuildAcademyTask *v2; // ebx@1
  int result; // eax@3
  PROTO_NC_GUILD_ACADEMY_NOTIFY_CMD *v4; // eax@4
  char v5; // cl@5

  v2 = this;
  if ( GuildTask::GetGuild()->m_bIsGuild || v2->m_bIsGuildAcademyMember )
  {
    qmemcpy(&v2->m_GuildAcademy.tm_dNotifyDate, &pCmd->tm_dNotifyDate, 0x34u);
    v4 = pCmd + 1;
    v2->m_GuildAcademy.sNotifyCharID.n5_code[4] = pCmd->sNotifyCharID.n5_code[4];
    do
    {
      v5 = v4->dNotifyDate;
      *((_BYTE *)&v4->dNotifyDate + v2->m_GuildAcademy.sNotify - (char *)&pCmd[1]) = v4->dNotifyDate;
      v4 = (PROTO_NC_GUILD_ACADEMY_NOTIFY_CMD *)((char *)v4 + 1);
    }
    while ( v5 );
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006FB190) --------------------------------------------------------
int __userpurge GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_MY_GUILD_ACADEMY_INFO_ACK@<eax>(GuildAcademyTask *this@<ecx>, int a2@<esi>, PROTO_NC_GUILD_ACADEMY_MY_GUILD_ACADEMY_INFO_ACK *pAck)
{
  char *v3; // esi@2
  int v5; // [sp-4h] [bp-4h]@2

  if ( pAck->Error == 6584 )
  {
    this->m_GuildAcademy.dAcademyBuffUntilTime = *(_DWORD *)&pAck[17].Error;
    this->m_GuildAcademy.nAcademyPoint = *(_DWORD *)&pAck[13].Error;
    v5 = a2;
    v3 = (char *)&this->vfptr;
    this->m_GuildAcademy.nAcademyRank = *(_DWORD *)&pAck[15].Error;
    if ( this->m_pkMsgHooker )
    {
      ((void (__stdcall *)(signed int, _DWORD, char *))this->m_pkMsgHooker->vfptr->SendDirectMessage)(71, 0, v3);
      if ( *((_DWORD *)v3 + 1) )
        (*(void (__stdcall **)(signed int, _DWORD, char *))(**((_DWORD **)v3 + 1) + 20))(71, 0, v3);
    }
    (*(void (__thiscall **)(char *, signed int, _DWORD, char *, int))(*(_DWORD *)v3 + 20))(v3, 71, 0, v3, v5);
    if ( *((_DWORD *)v3 + 1) )
    {
      (*(void (__stdcall **)(signed int, _DWORD, char *))(**((_DWORD **)v3 + 1) + 4))(41, 0, v3);
      if ( *((_DWORD *)v3 + 1) )
        (*(void (__stdcall **)(signed int, _DWORD, char *))(**((_DWORD **)v3 + 1) + 20))(41, 0, v3);
    }
    (*(void (__thiscall **)(char *, signed int, _DWORD))(*(_DWORD *)v3 + 20))(v3, 41, 0);
  }
  return 1;
}
// 6FB190: could not find valid save-restore pair for esi

//----- (006FB240) --------------------------------------------------------
int __thiscall GuildAcademyTask::On_Recv_NC_USER_CONNECTION_CHANGE_CHAR_ID_ACADEMY_MASTER_CMD(GuildAcademyTask *this, PROTO_NC_USER_CONNECTION_CHANGE_CHAR_ID_ACADEMY_MASTER_CMD *pkProto)
{
  _BYTE v2[20]; // ST00_20@1
  int v3; // esi@1

  *(_QWORD *)&this->m_GuildAcademy.sAcademyMasterName.n5_name[0] = *(_QWORD *)&pkProto->sMasterID.n5_name[0];
  *(_QWORD *)&this->m_GuildAcademy.sAcademyMasterName.n5_code[2] = *(_QWORD *)&pkProto->sMasterID.n5_code[2];
  this->m_GuildAcademy.sAcademyMasterName.n5_code[4] = pkProto->sMasterID.n5_code[4];
  *(_DWORD *)v2 = pkProto->sMasterID.n5_code[0];
  *(_QWORD *)&v2[4] = *(_QWORD *)&pkProto->sMasterID.n5_code[1];
  *(_QWORD *)&v2[12] = *(_QWORD *)&pkProto->sMasterID.n5_code[3];
  CharMgr::GetChar(&g_kCharMgr, *(Name5 *)v2);
  v3 = GuildAcademyTask::ms_spGuildAcademyTask + 8;
  if ( *(_DWORD *)(GuildAcademyTask::ms_spGuildAcademyTask + 12) )
  {
    (*(void (__stdcall **)(signed int, _DWORD, int))(**(_DWORD **)(GuildAcademyTask::ms_spGuildAcademyTask + 12) + 4))(
      71,
      0,
      GuildAcademyTask::ms_spGuildAcademyTask + 8);
    if ( *(_DWORD *)(v3 + 4) )
      (*(void (__stdcall **)(signed int, _DWORD, int))(**(_DWORD **)(v3 + 4) + 20))(71, 0, v3);
  }
  (*(void (__thiscall **)(int, signed int, _DWORD, int))(*(_DWORD *)v3 + 20))(v3, 71, 0, v3);
  return 1;
}
// B5C2D8: using guessed type int GuildAcademyTask::ms_spGuildAcademyTask;

//----- (006FB2F0) --------------------------------------------------------
int __thiscall GuildAcademyTask::On_Recv_NC_CHAR_GUILD_ACADEMY_CMD(GuildAcademyTask *this, PROTO_NC_CHAR_GUILD_ACADEMY_CMD *pkProto)
{
  GuildAcademyTask *v2; // esi@1
  int v3; // edi@3
  Char *v4; // ecx@4
  char *v5; // eax@5
  char *v6; // eax@5
  bool v7; // al@10
  int v8; // esi@16
  int v10; // [sp+Ch] [bp-1Ch]@1
  char dest[4]; // [sp+10h] [bp-18h]@5
  int v12; // [sp+14h] [bp-14h]@5
  int v13; // [sp+18h] [bp-10h]@5
  int v14; // [sp+1Ch] [bp-Ch]@5
  int v15; // [sp+20h] [bp-8h]@5

  v2 = this;
  v10 = 0;
  if ( pkProto->nGuildAcademyNo )
  {
    GUILD_ACADEMY_CLIENT::operator=(&this->m_GuildAcademy, (GUILD_ACADEMY_CLIENT *)&pkProto[1]);
    g_pkMainChar->m_dwGuildRegNum = pkProto->nGuildAcademyNo;
    if ( pkProto->isGuildAcademyMember )
    {
      v2->m_bIsGuildAcademyMember = 1;
      g_pkMainChar->m_GuildAcademyMemberFlag = 1;
      v3 = unk_A96B24;
      if ( unk_A96B24 )
      {
        do
        {
          v4 = *(Char **)(v3 + 8);
          v3 = *(_DWORD *)v3;
          v7 = 0;
          if ( g_pkMainChar != v4 )
          {
            v10 |= 1u;
            v5 = (char *)((int (*)(void))v4->vfptr[2].DeleteAbStateByAbstateIndex)();
            v15 = 0;
            v14 = 0;
            v13 = 0;
            v12 = 0;
            *(_DWORD *)dest = 0;
            strncpy(dest, v5, 0x14u);
            v6 = GuildAcademyTask::GetGuildAcademy()->m_GuildAcademy.sAcademyMasterName.n5_name;
            if ( *(_DWORD *)dest == *(_DWORD *)v6
              && v12 == *((_DWORD *)v6 + 1)
              && v13 == *((_DWORD *)v6 + 2)
              && v14 == *((_DWORD *)v6 + 3)
              && v15 == *((_DWORD *)v6 + 4) )
            {
              v7 = 1;
            }
          }
          if ( v10 & 1 )
            v10 &= 0xFFFFFFFE;
        }
        while ( !v7 && v3 );
      }
    }
    v8 = (int)&v2->vfptr;
    if ( *(_DWORD *)(v8 + 4) )
    {
      (*(void (__stdcall **)(signed int, _DWORD, int))(**(_DWORD **)(v8 + 4) + 4))(71, 0, v8);
      if ( *(_DWORD *)(v8 + 4) )
        (*(void (__stdcall **)(signed int, _DWORD, int))(**(_DWORD **)(v8 + 4) + 20))(71, 0, v8);
    }
    (*(void (__thiscall **)(int, signed int, _DWORD, int))(*(_DWORD *)v8 + 20))(v8, 71, 0, v8);
  }
  else
  {
    this->m_bIsGuildAcademyMember = 0;
  }
  return 1;
}

//----- (006FB440) --------------------------------------------------------
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_REWARD_STORAGE_WITHDRAW_CMD(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_REWARD_STORAGE_WITHDRAW_CMD *pkCmd)
{
  __int64 v2; // rdi@4
  unsigned int v3; // eax@4
  unsigned int v4; // ecx@4
  unsigned int v5; // edx@4
  unsigned int v6; // eax@4
  __int64 v7; // rax@8
  int v8; // eax@8
  char v9; // cl@9
  NiUnsharedGeometryGroup *v10; // eax@10
  NiUnsharedGeometryGroup *v11; // edx@10
  char v12; // cl@11
  unsigned int v13; // eax@12
  char *v14; // edi@12
  char v15; // cl@13
  __int64 v16; // rax@16
  unsigned int v17; // eax@16
  char *v18; // edi@16
  char v19; // cl@17
  NiUnsharedGeometryGroup *v20; // eax@18
  NiUnsharedGeometryGroup *v21; // esi@18
  char v22; // cl@19
  unsigned int v23; // eax@20
  char *v24; // edi@20
  char v25; // cl@21
  __int64 v26; // rax@24
  unsigned int v27; // eax@24
  char *v28; // edi@24
  char v29; // cl@25
  NiUnsharedGeometryGroup *v30; // eax@26
  NiUnsharedGeometryGroup *v31; // esi@26
  char v32; // cl@27
  unsigned int v33; // eax@28
  char *v34; // edi@28
  char v35; // cl@29
  __int64 v36; // rax@32
  unsigned int v37; // eax@32
  char *v38; // edi@32
  char v39; // cl@33
  NiUnsharedGeometryGroup *v40; // eax@34
  NiUnsharedGeometryGroup *v41; // esi@34
  char v42; // cl@35
  unsigned int v43; // eax@36
  char *v44; // edi@36
  char v45; // cl@37
  char *v46; // eax@40
  char *v47; // edi@40
  CClientGuild *v48; // eax@44
  unsigned int v49; // ecx@48
  unsigned int v50; // edx@48
  int v51; // eax@48
  unsigned int v52; // ecx@48
  unsigned int v53; // edx@48
  ItemInfo *v54; // eax@48
  ItemInfo *v55; // esi@48
  char *v56; // eax@49
  char *v57; // eax@50
  CClientGuild *v58; // eax@51
  unsigned int v59; // edx@53
  unsigned int v60; // eax@53
  int v61; // esi@53
  int v62; // edi@53
  unsigned int v63; // ecx@53
  unsigned int v64; // edx@53
  int v65; // esi@54
  int *v66; // eax@57
  char *v67; // eax@61
  char *v68; // eax@61
  char *v69; // edi@61
  CClientGuild *v70; // eax@65
  char *v71; // eax@45
  char *v72; // edi@68
  char *v74; // [sp-10h] [bp-244h]@49
  unsigned __int64 v75; // [sp-Ch] [bp-240h]@49
  char *v76; // [sp-8h] [bp-23Ch]@45
  char *v77; // [sp-4h] [bp-238h]@45
  int v78; // [sp-4h] [bp-238h]@49
  __int64 Money; // [sp+Ch] [bp-228h]@4
  GuildAcademyTask *v80; // [sp+14h] [bp-220h]@1
  char acStr1[256]; // [sp+18h] [bp-21Ch]@7
  char acStr2[256]; // [sp+118h] [bp-11Ch]@7
  char acname[21]; // [sp+218h] [bp-1Ch]@4

  v80 = this;
  if ( pkCmd->type )
  {
    if ( pkCmd->type == 1 )
    {
      if ( !HIDWORD(pkCmd->cen) && !LODWORD(pkCmd->lot) )
        return 1;
      v49 = pkCmd->charid.n5_code[0];
      v50 = pkCmd->charid.n5_code[1];
      *(_DWORD *)&acname[8] = pkCmd->charid.n5_code[2];
      v51 = pkCmd->item;
      *(_DWORD *)acname = v49;
      v52 = pkCmd->charid.n5_code[3];
      *(_DWORD *)&acname[4] = v50;
      v53 = pkCmd->charid.n5_code[4];
      *(_DWORD *)&acname[12] = v52;
      *(_DWORD *)&acname[16] = v53;
      acname[20] = 0;
      v54 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(v51);
      v55 = v54;
      if ( pkCmd->who == 3 )
      {
        v78 = (int)v54->Name;
        v75 = pkCmd->lot;
        v74 = acname;
        v56 = (char *)TextData::Get(0x4735AB76u);
      }
      else
      {
        v58 = GuildTask::GetGuild();
        if ( !(unsigned __int8)CClientGuild::AmIGuildMember(v58) )
          return 1;
        v78 = (int)v55->Name;
        v75 = pkCmd->lot;
        v74 = acname;
        v56 = (char *)TextData::Get(0xA4C0B9C4);
      }
      v57 = fs(v56, v74, v75, v78);
      goto LABEL_68;
    }
    if ( pkCmd->type != 2 )
      return 1;
    v2 = pkCmd->lot;
    Money = pkCmd->lot;
    GuildAcademyStorage::SetMoney(pkCmd->storage_cen);
    v3 = pkCmd->charid.n5_code[1];
    v4 = pkCmd->charid.n5_code[2];
    *(_DWORD *)acname = pkCmd->charid.n5_code[0];
    v5 = pkCmd->charid.n5_code[3];
    *(_DWORD *)&acname[4] = v3;
    v6 = pkCmd->charid.n5_code[4];
    *(_DWORD *)&acname[8] = v4;
    *(_DWORD *)&acname[12] = v5;
    *(_DWORD *)&acname[16] = v6;
    acname[20] = 0;
    if ( SHIDWORD(v2) < 0 || SHIDWORD(v2) <= 0 && !(_DWORD)v2 )
      return 1;
    memset(acStr1, 0, 0x100u);
    memset(acStr2, 0, 0x100u);
    if ( User::GetGem(v2) )
    {
      v7 = User::GetGem(v2);
      sprintf(acStr1, "%I64d", v7);
      v8 = 0;
      do
      {
        v9 = acStr1[v8];
        acStr2[v8++] = v9;
      }
      while ( v9 );
      v10 = TextData::Get(0x475F9699u);
      v11 = v10;
      do
      {
        v12 = (char)v10->vfptr;
        v10 = (NiUnsharedGeometryGroup *)((char *)v10 + 1);
      }
      while ( v12 );
      v13 = (char *)v10 - (char *)v11;
      v14 = &acStr1[255];
      do
        v15 = (v14++)[1];
      while ( v15 );
      qmemcpy(v14, v11, v13);
      v2 = Money;
    }
    if ( User::GetGold(v2) )
    {
      v16 = User::GetGold(v2);
      sprintf(acStr1, "%I64d", v16);
      v17 = strlen(acStr1) + 1;
      v18 = &acStr1[255];
      do
        v19 = (v18++)[1];
      while ( v19 );
      qmemcpy(v18, acStr1, v17);
      v20 = TextData::Get(0x47A395A3u);
      v21 = v20;
      do
      {
        v22 = (char)v20->vfptr;
        v20 = (NiUnsharedGeometryGroup *)((char *)v20 + 1);
      }
      while ( v22 );
      v23 = (char *)v20 - (char *)v21;
      v24 = &acStr1[255];
      do
        v25 = (v24++)[1];
      while ( v25 );
      qmemcpy(v24, v21, v23);
      v2 = Money;
    }
    if ( User::GetSilver(v2) )
    {
      v26 = User::GetSilver(v2);
      sprintf(acStr1, "%I64d", v26);
      v27 = strlen(acStr1) + 1;
      v28 = &acStr1[255];
      do
        v29 = (v28++)[1];
      while ( v29 );
      qmemcpy(v28, acStr1, v27);
      v30 = TextData::Get(0x98B595EF);
      v31 = v30;
      do
      {
        v32 = (char)v30->vfptr;
        v30 = (NiUnsharedGeometryGroup *)((char *)v30 + 1);
      }
      while ( v32 );
      v33 = (char *)v30 - (char *)v31;
      v34 = &acStr1[255];
      do
        v35 = (v34++)[1];
      while ( v35 );
      qmemcpy(v34, v31, v33);
      v2 = Money;
    }
    if ( User::GetCopper(v2) )
    {
      v36 = User::GetCopper(v2);
      sprintf(acStr1, "%I64d", v36);
      v37 = strlen(acStr1) + 1;
      v38 = &acStr1[255];
      do
        v39 = (v38++)[1];
      while ( v39 );
      qmemcpy(v38, acStr1, v37);
      v40 = TextData::Get(0x88AF99F5);
      v41 = v40;
      do
      {
        v42 = (char)v40->vfptr;
        v40 = (NiUnsharedGeometryGroup *)((char *)v40 + 1);
      }
      while ( v42 );
      v43 = (char *)v40 - (char *)v41;
      v44 = &acStr1[255];
      do
        v45 = (v44++)[1];
      while ( v45 );
      qmemcpy(v44, v41, v43);
    }
    if ( pkCmd->who == 3 )
    {
      v46 = (char *)TextData::Get(0xF346442B);
      v47 = fs(v46, acname, acStr2);
      if ( v80->m_pkMsgHooker )
      {
        ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v80->m_pkMsgHooker->vfptr->SendDirectMessage)(
          25,
          v47,
          &v80->vfptr);
        if ( v80->m_pkMsgHooker )
          ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v80->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            25,
            v47,
            &v80->vfptr);
      }
      v80->vfptr->DirectDispatchToParent((IDirectMessenger *)&v80->vfptr, 25, v47, (IDirectMessenger *)&v80->vfptr);
      return 1;
    }
    v48 = GuildTask::GetGuild();
    if ( !(unsigned __int8)CClientGuild::AmIGuildMember(v48) )
      return 1;
    v77 = acStr2;
    v76 = acname;
    v71 = (char *)TextData::Get(0x599062A1u);
LABEL_67:
    v57 = fs(v71, v76, v77);
LABEL_68:
    v72 = v57;
    if ( v80->m_pkMsgHooker )
    {
      ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v80->m_pkMsgHooker->vfptr->SendDirectMessage)(
        25,
        v57,
        &v80->vfptr);
      if ( v80->m_pkMsgHooker )
        ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v80->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
          25,
          v72,
          &v80->vfptr);
    }
    v80->vfptr->DirectDispatchToParent((IDirectMessenger *)&v80->vfptr, 25, v72, (IDirectMessenger *)&v80->vfptr);
    return 1;
  }
  v59 = pkCmd->charid.n5_code[1];
  v60 = pkCmd->charid.n5_code[2];
  v61 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
  v62 = pkCmd->item;
  *(_DWORD *)acname = pkCmd->charid.n5_code[0];
  v63 = pkCmd->charid.n5_code[3];
  *(_DWORD *)&acname[4] = v59;
  v64 = pkCmd->charid.n5_code[4];
  *(_DWORD *)&acname[12] = v63;
  *(_DWORD *)&acname[16] = v64;
  *(_DWORD *)&acname[8] = v60;
  acname[20] = 0;
  if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable + 16))(
                          ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                          v62) )
  {
    if ( (unsigned __int16)v62 <= *(_WORD *)(v61 + 200) )
    {
      v66 = (int *)(*(_DWORD *)(v61 + 196) + 4 * v62);
      if ( *v66 )
        v65 = *v66;
      else
        v65 = 0;
    }
    else
    {
      v65 = 0;
    }
  }
  else
  {
    v65 = 0;
  }
  if ( pkCmd->who != 3 )
  {
    v70 = GuildTask::GetGuild();
    if ( !(unsigned __int8)CClientGuild::AmIGuildMember(v70) )
      return 1;
    v77 = (char *)(v65 + 34);
    v76 = acname;
    v71 = (char *)TextData::Get(0x456C6A78u);
    goto LABEL_67;
  }
  v67 = (char *)TextData::Get(0x96830AC4);
  v68 = fs(v67, acname, v65 + 34);
  v69 = v68;
  if ( v80->m_pkMsgHooker )
  {
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v80->m_pkMsgHooker->vfptr->SendDirectMessage)(25, v68, &v80->vfptr);
    if ( v80->m_pkMsgHooker )
      ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v80->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
        25,
        v69,
        &v80->vfptr);
  }
  v80->vfptr->DirectDispatchToParent((IDirectMessenger *)&v80->vfptr, 25, v69, (IDirectMessenger *)&v80->vfptr);
  return 1;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (006FB9E0) --------------------------------------------------------
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_REWARD_STORAGE_DEPOSIT_CMD(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_REWARD_STORAGE_DEPOSIT_CMD *pkCmd)
{
  GuildAcademyTask *v2; // ebx@1
  CClientGuild *v3; // eax@1
  unsigned int v4; // edi@5
  int v5; // ebx@5
  unsigned int v6; // eax@5
  unsigned int v7; // ecx@5
  unsigned int v8; // edx@5
  unsigned int v9; // eax@5
  __int64 v10; // rax@9
  int v11; // eax@9
  char v12; // cl@10
  NiUnsharedGeometryGroup *v13; // eax@11
  NiUnsharedGeometryGroup *v14; // edx@11
  char v15; // cl@12
  unsigned int v16; // eax@13
  char *v17; // edi@13
  char v18; // cl@14
  __int64 v19; // rax@17
  unsigned int v20; // eax@17
  char *v21; // edi@17
  char v22; // cl@18
  NiUnsharedGeometryGroup *v23; // eax@19
  NiUnsharedGeometryGroup *v24; // ecx@19
  char v25; // dl@20
  unsigned int v26; // eax@21
  NiUnsharedGeometryGroup *v27; // esi@21
  char *v28; // edi@21
  char v29; // cl@22
  __int64 v30; // rax@25
  unsigned int v31; // eax@25
  char *v32; // edi@25
  char v33; // cl@26
  NiUnsharedGeometryGroup *v34; // eax@27
  NiUnsharedGeometryGroup *v35; // ecx@27
  char v36; // dl@28
  unsigned int v37; // eax@29
  NiUnsharedGeometryGroup *v38; // esi@29
  char *v39; // edi@29
  char v40; // cl@30
  __int64 v41; // rax@33
  unsigned int v42; // eax@33
  char *v43; // edi@33
  char v44; // cl@34
  NiUnsharedGeometryGroup *v45; // eax@35
  NiUnsharedGeometryGroup *v46; // ecx@35
  char v47; // dl@36
  unsigned int v48; // eax@37
  NiUnsharedGeometryGroup *v49; // esi@37
  char *v50; // edi@37
  char v51; // cl@38
  char *v52; // eax@40
  char *v53; // edi@40
  int v54; // eax@44
  unsigned int v55; // ecx@45
  unsigned int v56; // edx@45
  unsigned int v57; // ecx@45
  unsigned int v58; // edx@45
  char *v59; // ST1C_4@45
  unsigned __int64 v60; // ST14_8@45
  char *v61; // eax@45
  char *v62; // edi@45
  int v63; // eax@49
  unsigned int v64; // ecx@50
  unsigned int v65; // edx@50
  unsigned int v66; // ecx@50
  unsigned int v67; // edx@50
  char *v68; // ST1C_4@50
  char *v69; // eax@50
  char *v70; // edi@50
  unsigned int Money; // [sp+8h] [bp-228h]@5
  GuildAcademyTask *v73; // [sp+10h] [bp-220h]@1
  char acStr1[256]; // [sp+14h] [bp-21Ch]@8
  char acStr2[256]; // [sp+114h] [bp-11Ch]@8
  char acname[21]; // [sp+214h] [bp-1Ch]@5

  v2 = this;
  v73 = this;
  v3 = GuildTask::GetGuild();
  if ( (unsigned __int8)CClientGuild::AmIGuildMember(v3) )
  {
    if ( pkCmd->type )
    {
      if ( pkCmd->type == 1 )
      {
        v54 = pkCmd->item;
        if ( (_WORD)v54 != -1 )
        {
          v55 = pkCmd->charid.n5_code[1];
          *(_DWORD *)acname = pkCmd->charid.n5_code[0];
          v56 = pkCmd->charid.n5_code[2];
          *(_DWORD *)&acname[4] = v55;
          v57 = pkCmd->charid.n5_code[3];
          *(_DWORD *)&acname[8] = v56;
          v58 = pkCmd->charid.n5_code[4];
          *(_DWORD *)&acname[12] = v57;
          *(_DWORD *)&acname[16] = v58;
          acname[20] = 0;
          v59 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(v54)->Name;
          v60 = pkCmd->lot;
          v61 = (char *)TextData::Get(0xAAFFB2DF);
          v62 = fs(v61, acname, v60, v59);
          if ( v2->m_pkMsgHooker )
          {
            ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v2->m_pkMsgHooker->vfptr->SendDirectMessage)(
              25,
              v62,
              &v2->vfptr);
            if ( v2->m_pkMsgHooker )
              ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v2->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                25,
                v62,
                &v2->vfptr);
          }
          v2->vfptr->DirectDispatchToParent((IDirectMessenger *)&v2->vfptr, 25, v62, (IDirectMessenger *)&v2->vfptr);
        }
      }
      else if ( pkCmd->type == 2 )
      {
        v4 = pkCmd->lot;
        v5 = HIDWORD(pkCmd->cen);
        Money = pkCmd->lot;
        GuildAcademyStorage::SetMoney(pkCmd->storage_cen);
        v6 = pkCmd->charid.n5_code[1];
        v7 = pkCmd->charid.n5_code[2];
        *(_DWORD *)acname = pkCmd->charid.n5_code[0];
        v8 = pkCmd->charid.n5_code[3];
        *(_DWORD *)&acname[4] = v6;
        v9 = pkCmd->charid.n5_code[4];
        *(_DWORD *)&acname[8] = v7;
        *(_DWORD *)&acname[12] = v8;
        *(_DWORD *)&acname[16] = v9;
        acname[20] = 0;
        if ( v5 >= 0 && (v5 > 0 || v4) )
        {
          memset(acStr1, 0, 0x100u);
          memset(acStr2, 0, 0x100u);
          if ( User::GetGem(__PAIR__(v5, v4)) )
          {
            v10 = User::GetGem(__PAIR__(v5, v4));
            sprintf(acStr1, "%I64d", v10);
            v11 = 0;
            do
            {
              v12 = acStr1[v11];
              acStr2[v11++] = v12;
            }
            while ( v12 );
            v13 = TextData::Get(0x475F9699u);
            v14 = v13;
            do
            {
              v15 = (char)v13->vfptr;
              v13 = (NiUnsharedGeometryGroup *)((char *)v13 + 1);
            }
            while ( v15 );
            v16 = (char *)v13 - (char *)v14;
            v17 = &acStr1[255];
            do
              v18 = (v17++)[1];
            while ( v18 );
            qmemcpy(v17, v14, v16);
            v4 = Money;
          }
          if ( User::GetGold(__PAIR__(v5, v4)) )
          {
            v19 = User::GetGold(__PAIR__(v5, v4));
            sprintf(acStr1, "%I64d", v19);
            v20 = strlen(acStr1) + 1;
            v21 = &acStr1[255];
            do
              v22 = (v21++)[1];
            while ( v22 );
            qmemcpy(v21, acStr1, v20);
            v23 = TextData::Get(0x47A395A3u);
            v24 = v23;
            do
            {
              v25 = (char)v23->vfptr;
              v23 = (NiUnsharedGeometryGroup *)((char *)v23 + 1);
            }
            while ( v25 );
            v26 = (char *)v23 - (char *)v24;
            v27 = v24;
            v28 = &acStr1[255];
            do
              v29 = (v28++)[1];
            while ( v29 );
            qmemcpy(v28, v27, v26);
            v4 = Money;
          }
          if ( User::GetSilver(__PAIR__(v5, v4)) )
          {
            v30 = User::GetSilver(__PAIR__(v5, v4));
            sprintf(acStr1, "%I64d", v30);
            v31 = strlen(acStr1) + 1;
            v32 = &acStr1[255];
            do
              v33 = (v32++)[1];
            while ( v33 );
            qmemcpy(v32, acStr1, v31);
            v34 = TextData::Get(0x98B595EF);
            v35 = v34;
            do
            {
              v36 = (char)v34->vfptr;
              v34 = (NiUnsharedGeometryGroup *)((char *)v34 + 1);
            }
            while ( v36 );
            v37 = (char *)v34 - (char *)v35;
            v38 = v35;
            v39 = &acStr1[255];
            do
              v40 = (v39++)[1];
            while ( v40 );
            qmemcpy(v39, v38, v37);
            v4 = Money;
          }
          if ( User::GetCopper(__PAIR__(v5, v4)) )
          {
            v41 = User::GetCopper(__PAIR__(v5, v4));
            sprintf(acStr1, "%I64d", v41);
            v42 = strlen(acStr1) + 1;
            v43 = &acStr1[255];
            do
              v44 = (v43++)[1];
            while ( v44 );
            qmemcpy(v43, acStr1, v42);
            v45 = TextData::Get(0x88AF99F5);
            v46 = v45;
            do
            {
              v47 = (char)v45->vfptr;
              v45 = (NiUnsharedGeometryGroup *)((char *)v45 + 1);
            }
            while ( v47 );
            v48 = (char *)v45 - (char *)v46;
            v49 = v46;
            v50 = &acStr1[255];
            do
              v51 = (v50++)[1];
            while ( v51 );
            qmemcpy(v50, v49, v48);
          }
          v52 = (char *)TextData::Get(0x837E95AF);
          v53 = fs(v52, acname, acStr2);
          if ( v73->m_pkMsgHooker )
          {
            ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v73->m_pkMsgHooker->vfptr->SendDirectMessage)(
              25,
              v53,
              &v73->vfptr);
            if ( v73->m_pkMsgHooker )
              ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v73->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                25,
                v53,
                &v73->vfptr);
          }
          v73->vfptr->DirectDispatchToParent((IDirectMessenger *)&v73->vfptr, 25, v53, (IDirectMessenger *)&v73->vfptr);
        }
      }
    }
    else
    {
      v63 = pkCmd->item;
      if ( (_WORD)v63 != -1 )
      {
        v64 = pkCmd->charid.n5_code[1];
        *(_DWORD *)acname = pkCmd->charid.n5_code[0];
        v65 = pkCmd->charid.n5_code[2];
        *(_DWORD *)&acname[4] = v64;
        v66 = pkCmd->charid.n5_code[3];
        *(_DWORD *)&acname[8] = v65;
        v67 = pkCmd->charid.n5_code[4];
        *(_DWORD *)&acname[12] = v66;
        *(_DWORD *)&acname[16] = v67;
        acname[20] = 0;
        v68 = IIDTableBase<ItemInfo,ItemInfoTab,unsigned short>::GetByID(v63)->Name;
        v69 = (char *)TextData::Get(0x5EA05E90u);
        v70 = fs(v69, acname, v68);
        if ( v2->m_pkMsgHooker )
        {
          ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v2->m_pkMsgHooker->vfptr->SendDirectMessage)(
            25,
            v70,
            &v2->vfptr);
          if ( v2->m_pkMsgHooker )
            ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v2->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
              25,
              v70,
              &v2->vfptr);
        }
        v2->vfptr->DirectDispatchToParent((IDirectMessenger *)&v2->vfptr, 25, v70, (IDirectMessenger *)&v2->vfptr);
      }
    }
  }
  return 1;
}

//----- (006FBEE0) --------------------------------------------------------
int __thiscall GuildAcademyTask::On_Recv_NC_ITEM_GUILD_ACADEMY_REWARD_STORAGE_DEPOSIT_ACK(GuildAcademyTask *this, int iRevBytes, PROTO_NC_ITEM_GUILD_ACADEMY_REWARD_STORAGE_DEPOSIT_ACK *pAck)
{
  signed int v3; // eax@1
  GuildAcademyTask *v4; // esi@1
  PgFrameWork *v5; // esi@2
  NiUnsharedGeometryGroup *v7; // eax@7
  int v8; // esi@15
  NiUnsharedGeometryGroup *v9; // edi@15

  v3 = pAck->Error;
  v4 = this;
  if ( (_WORD)v3 != 6560 )
  {
    if ( v3 > 6561 )
    {
      switch ( v3 )
      {
        case 6562:
          v7 = TextData::Get(0xC3052536);
          goto LABEL_15;
        case 6564:
          v7 = TextData::Get(0xDD291C2D);
          goto LABEL_15;
        case 6565:
          v7 = TextData::Get(0xC34FF660);
          goto LABEL_15;
        case 6566:
          v7 = TextData::Get(0x76816B99u);
          goto LABEL_15;
        case 6567:
          v7 = TextData::Get(0xD4D93C40);
          goto LABEL_15;
        default:
          return 1;
      }
      return 1;
    }
    if ( v3 == 6561 )
    {
      v7 = TextData::Get(0x888A779F);
    }
    else
    {
      if ( v3 != 6115 )
        return 1;
      v7 = TextData::Get(0xA3BFB711);
    }
LABEL_15:
    v8 = (int)&v4->vfptr;
    v9 = v7;
    if ( *(_DWORD *)(v8 + 4) )
    {
      (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v8 + 4) + 4))(25, v7, v8);
      if ( *(_DWORD *)(v8 + 4) )
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v8 + 4) + 20))(25, v9, v8);
    }
    (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v8 + 20))(v8, 25, v9, v8);
    return 1;
  }
  v5 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( !(unsigned __int8)(*(int (**)(void))(*(_DWORD *)v5[19].m_BackFrameID + 260))() )
  {
    GameFrameWork::OpenInventoryWin((GameFrameWork *)v5);
    return 1;
  }
  return 1;
}

//----- (006FBFF0) --------------------------------------------------------
int __thiscall GuildAcademyTask::On_Recv_NC_ITEM_GUILD_ACADEMY_REWARD_STORAGE_WITHDRAW_ACK(GuildAcademyTask *this, int iRevBytes, PROTO_NC_ITEM_GUILD_ACADEMY_REWARD_STORAGE_WITHDRAW_ACK *pAck)
{
  int v3; // eax@1
  GuildAcademyTask *v4; // esi@1
  PgFrameWork *v5; // esi@2
  NiUnsharedGeometryGroup *v7; // eax@5
  int v8; // esi@13
  NiUnsharedGeometryGroup *v9; // edi@13

  v3 = pAck->Error;
  v4 = this;
  if ( (_WORD)v3 == 6112 )
  {
    v5 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( !(unsigned __int8)(*(int (**)(void))(*(_DWORD *)v5[19].m_BackFrameID + 260))() )
    {
      GameFrameWork::OpenInventoryWin((GameFrameWork *)v5);
      return 1;
    }
  }
  else
  {
    switch ( v3 )
    {
      case 6113:
        v7 = TextData::Get(0x888A779F);
        goto LABEL_13;
      case 6114:
        v7 = TextData::Get(0x81FBDEDF);
        goto LABEL_13;
      case 6115:
        v7 = TextData::Get(0xA3BFB711);
        goto LABEL_13;
      case 6116:
        v7 = TextData::Get(0x2D1A2931u);
        goto LABEL_13;
      case 6117:
        v7 = TextData::Get(0x6BCCC8E3u);
        goto LABEL_13;
      case 6118:
        v7 = TextData::Get(0xC34FF660);
        goto LABEL_13;
      case 6119:
        v7 = TextData::Get(0x76816B99u);
        goto LABEL_13;
      case 6120:
        v7 = TextData::Get(0xD4D93C40);
LABEL_13:
        v8 = (int)&v4->vfptr;
        v9 = v7;
        if ( *(_DWORD *)(v8 + 4) )
        {
          (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v8 + 4) + 4))(25, v7, v8);
          if ( *(_DWORD *)(v8 + 4) )
            (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v8 + 4) + 20))(25, v9, v8);
        }
        (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v8 + 20))(v8, 25, v9, v8);
        break;
      default:
        return 1;
    }
  }
  return 1;
}

//----- (006FC100) --------------------------------------------------------
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_GET_REWARD_MONEY_ACK(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_GET_REWARD_MONEY_ACK *pAck)
{
  GuildAcademyTask *v2; // esi@1
  int v3; // eax@1
  CClientGuildAcademy *v4; // ecx@4
  bool v5; // al@6
  NiUnsharedGeometryGroup *v7; // eax@8
  int v8; // esi@12
  NiUnsharedGeometryGroup *v9; // edi@12

  v2 = this;
  v3 = pAck->Error;
  if ( (_WORD)v3 != 6272 )
  {
    switch ( v3 )
    {
      case 6273:
        v7 = TextData::Get(0xCEF8D8D4);
        goto LABEL_12;
      case 6274:
      case 6276:
        v7 = TextData::Get(0x1D2F7C72u);
        goto LABEL_12;
      case 6275:
        v7 = TextData::Get(0xC34FF660);
        goto LABEL_12;
      case 6277:
        v7 = TextData::Get(0xD4D93C40);
LABEL_12:
        v8 = (int)&v2->vfptr;
        v9 = v7;
        if ( *(_DWORD *)(v8 + 4) )
        {
          (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v8 + 4) + 4))(25, v7, v8);
          if ( *(_DWORD *)(v8 + 4) )
            (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v8 + 4) + 20))(25, v9, v8);
        }
        (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v8 + 20))(v8, 25, v9, v8);
        break;
      default:
        return 1;
    }
    return 1;
  }
  GuildAcademyMoneyRewardWin::SetRewardMoney(this->m_pkGuildAcademyMoneyRewardWin, pAck);
  GuildAcademyMoneyRewardWin::UpdateAcademyInfo(v2->m_pkGuildAcademyMoneyRewardWin);
  if ( (unsigned __int8)((int (*)(void))v2->m_pkGuildAcademyMoneyRewardWin->vfptr[65].__vecDelDtor)() )
    return 1;
  PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkGuildAcademyMoneyRewardWin->vfptr);
  if ( GuildAcademyTask::ms_spGuildAcademyTask )
    v4 = (CClientGuildAcademy *)(GuildAcademyTask::ms_spGuildAcademyTask + 64);
  else
    v4 = 0;
  v5 = CClientGuildAcademy::AmIGuildAcademyMaster(v4);
  GuildAcademyMoneyRewardWin::SetEnable(v2->m_pkGuildAcademyMoneyRewardWin, v5);
  return 1;
}
// B5C2D8: using guessed type int GuildAcademyTask::ms_spGuildAcademyTask;

//----- (006FC220) --------------------------------------------------------
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_SET_REWARD_MONEY_ACK(GuildAcademyTask *this, int iRevBytes, PROTO_NC_GUILD_ACADEMY_SET_REWARD_MONEY_ACK *pAck)
{
  GuildAcademyTask *v3; // esi@1
  char *v4; // eax@2
  int result; // eax@2
  NiUnsharedGeometryGroup *v6; // eax@4
  int v7; // esi@8
  NiUnsharedGeometryGroup *v8; // edi@8

  v3 = this;
  if ( pAck->Error == 6336 )
  {
    v4 = (char *)TextData::Get(0xCBFE0E1F);
    MsgBox::Modeless(MSGBOX_OK, v4);
    result = 1;
  }
  else
  {
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0x31u, 0, 0);
    switch ( pAck->Error )
    {
      case 0x1881u:
        v6 = TextData::Get(0xCEF8D8D4);
        goto LABEL_8;
      case 0x1882u:
      case 0x1884u:
        v6 = TextData::Get(0x1D2F7C72u);
        goto LABEL_8;
      case 0x1883u:
        v6 = TextData::Get(0xC34FF660);
        goto LABEL_8;
      case 0x1885u:
        v6 = TextData::Get(0xD4D93C40);
LABEL_8:
        v7 = (int)&v3->vfptr;
        v8 = v6;
        if ( *(_DWORD *)(v7 + 4) )
        {
          (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v7 + 4) + 4))(25, v6, v7);
          if ( *(_DWORD *)(v7 + 4) )
            (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v7 + 4) + 20))(25, v8, v7);
        }
        (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v7 + 20))(v7, 25, v8, v7);
        break;
      default:
        break;
    }
    result = 1;
  }
  return result;
}

//----- (006FC300) --------------------------------------------------------
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_CLEAR_REWARD_MONEY_ACK(GuildAcademyTask *this, int iRevBytes, PROTO_NC_GUILD_ACADEMY_CLEAR_REWARD_MONEY_ACK *pAck)
{
  GuildAcademyTask *v3; // esi@1
  char *v4; // eax@2
  NiUnsharedGeometryGroup *v6; // eax@3
  int v7; // esi@7
  NiUnsharedGeometryGroup *v8; // edi@7

  v3 = this;
  switch ( pAck->Error )
  {
    case 0x1950u:
      GuildAcademyMoneyRewardWin::InitializeRewardMoney(this->m_pkGuildAcademyMoneyRewardWin, pAck);
      v4 = (char *)TextData::Get(0x33489E69u);
      MsgBox::Modeless(MSGBOX_OK, v4);
      return 1;
    case 0x1951u:
      v6 = TextData::Get(0xCEF8D8D4);
      goto LABEL_7;
    case 0x1952u:
    case 0x1954u:
      v6 = TextData::Get(0x76816B99u);
      goto LABEL_7;
    case 0x1953u:
      v6 = TextData::Get(0xC34FF660);
      goto LABEL_7;
    case 0x1955u:
      v6 = TextData::Get(0xD4D93C40);
LABEL_7:
      v7 = (int)&v3->vfptr;
      v8 = v6;
      if ( *(_DWORD *)(v7 + 4) )
      {
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v7 + 4) + 4))(25, v6, v7);
        if ( *(_DWORD *)(v7 + 4) )
          (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v7 + 4) + 20))(25, v8, v7);
      }
      (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v7 + 20))(v7, 25, v8, v7);
      break;
    default:
      return 1;
  }
  return 1;
}

//----- (006FC3D0) --------------------------------------------------------
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_GET_REWARD_ITEM_ACK(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_GET_REWARD_ITEM_ACK *pAck)
{
  GuildAcademyTask *v2; // esi@1
  int v3; // eax@1
  NiUnsharedGeometryGroup *v5; // eax@5
  int v6; // esi@9
  NiUnsharedGeometryGroup *v7; // edi@9

  v2 = this;
  v3 = pAck->Error;
  if ( (_WORD)v3 == 6280 )
  {
    GuildAcademyItemRewardWin::SetRewardItem(this->m_pkGuildAcademyItemRewardWin, pAck);
    GuildAcademyItemRewardWin::UpdateAcademyInfo(v2->m_pkGuildAcademyItemRewardWin);
    if ( !(unsigned __int8)((int (*)(void))v2->m_pkGuildAcademyItemRewardWin->vfptr[65].__vecDelDtor)() )
    {
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkGuildAcademyItemRewardWin->vfptr);
      return 1;
    }
  }
  else
  {
    switch ( v3 )
    {
      case 6281:
        v5 = TextData::Get(0xCEF8D8D4);
        goto LABEL_9;
      case 6283:
        v5 = TextData::Get(0xC34FF660);
        goto LABEL_9;
      case 6284:
        v5 = TextData::Get(0x76816B99u);
        goto LABEL_9;
      case 6282:
      case 6285:
        v5 = TextData::Get(0x1D2F7C72u);
LABEL_9:
        v6 = (int)&v2->vfptr;
        v7 = v5;
        if ( *(_DWORD *)(v6 + 4) )
        {
          (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v6 + 4) + 4))(25, v5, v6);
          if ( *(_DWORD *)(v6 + 4) )
            (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v6 + 4) + 20))(25, v7, v6);
        }
        (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v6 + 20))(v6, 25, v7, v6);
        break;
      default:
        return 1;
    }
  }
  return 1;
}

//----- (006FC4C0) --------------------------------------------------------
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_SET_REWARD_ITEM_ACK(GuildAcademyTask *this, int iRevBytes, PROTO_NC_GUILD_ACADEMY_SET_REWARD_ITEM_ACK *pAck)
{
  GuildAcademyTask *v3; // esi@1
  char *v4; // eax@2
  int result; // eax@2
  NiUnsharedGeometryGroup *v6; // eax@4
  int v7; // esi@8
  NiUnsharedGeometryGroup *v8; // edi@8

  v3 = this;
  if ( pAck->Error == 6408 )
  {
    v4 = (char *)TextData::Get(0xCBFE0E1F);
    MsgBox::Modeless(MSGBOX_OK, v4);
    result = 1;
  }
  else
  {
    NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0x35u, 0, 0);
    switch ( pAck->Error )
    {
      case 0x1909u:
        v6 = TextData::Get(0xCEF8D8D4);
        goto LABEL_8;
      case 0x190Au:
      case 0x190Cu:
        v6 = TextData::Get(0x76816B99u);
        goto LABEL_8;
      case 0x190Bu:
        v6 = TextData::Get(0xC34FF660);
        goto LABEL_8;
      case 0x190Du:
        v6 = TextData::Get(0x1D2F7C72u);
LABEL_8:
        v7 = (int)&v3->vfptr;
        v8 = v6;
        if ( *(_DWORD *)(v7 + 4) )
        {
          (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v7 + 4) + 4))(25, v6, v7);
          if ( *(_DWORD *)(v7 + 4) )
            (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v7 + 4) + 20))(25, v8, v7);
        }
        (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v7 + 20))(v7, 25, v8, v7);
        break;
      default:
        break;
    }
    result = 1;
  }
  return result;
}

//----- (006FC5A0) --------------------------------------------------------
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_CLEAR_REWARD_ITEM_ACK(GuildAcademyTask *this, int iRevBytes, PROTO_NC_GUILD_ACADEMY_CLEAR_REWARD_ITEM_ACK *pAck)
{
  GuildAcademyTask *v3; // esi@1
  char *v4; // eax@2
  NiUnsharedGeometryGroup *v6; // eax@3
  int v7; // esi@7
  NiUnsharedGeometryGroup *v8; // edi@7

  v3 = this;
  switch ( pAck->Error )
  {
    case 0x1998u:
      GuildAcademyItemRewardWin::InitializeRewardItem(this->m_pkGuildAcademyItemRewardWin);
      v4 = (char *)TextData::Get(0x33489E69u);
      MsgBox::Modeless(MSGBOX_OK, v4);
      return 1;
    case 0x1999u:
      v6 = TextData::Get(0xCEF8D8D4);
      goto LABEL_7;
    case 0x199Au:
    case 0x199Cu:
      v6 = TextData::Get(0x76816B99u);
      goto LABEL_7;
    case 0x199Bu:
      v6 = TextData::Get(0xC34FF660);
      goto LABEL_7;
    case 0x199Du:
      v6 = TextData::Get(0xD4D93C40);
LABEL_7:
      v7 = (int)&v3->vfptr;
      v8 = v6;
      if ( *(_DWORD *)(v7 + 4) )
      {
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v7 + 4) + 4))(25, v6, v7);
        if ( *(_DWORD *)(v7 + 4) )
          (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v7 + 4) + 20))(25, v8, v7);
      }
      (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v7 + 20))(v7, 25, v8, v7);
      break;
    default:
      return 1;
  }
  return 1;
}

//----- (006FC670) --------------------------------------------------------
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_GET_GRADUATE_ACK(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_GET_GRADUATE_ACK *pAck)
{
  GuildAcademyTask *v2; // esi@1
  int v3; // eax@1
  int v5; // eax@4
  int v6; // eax@5
  NiUnsharedGeometryGroup *v7; // eax@7
  int v8; // esi@10
  NiUnsharedGeometryGroup *v9; // edi@10

  v2 = this;
  v3 = pAck->Error;
  if ( (_WORD)v3 != 6568 )
  {
    v5 = v3 - 6569;
    if ( v5 )
    {
      v6 = v5 - 1;
      if ( v6 )
      {
        if ( v6 != 1 )
          return 1;
        v7 = TextData::Get(0xD4D93C40);
      }
      else
      {
        v7 = TextData::Get(0xC34FF660);
      }
    }
    else
    {
      v7 = TextData::Get(0xCEF8D8D4);
    }
    v8 = (int)&v2->vfptr;
    v9 = v7;
    if ( *(_DWORD *)(v8 + 4) )
    {
      (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v8 + 4) + 4))(25, v7, v8);
      if ( *(_DWORD *)(v8 + 4) )
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v8 + 4) + 20))(25, v9, v8);
    }
    (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v8 + 20))(v8, 25, v9, v8);
    return 1;
  }
  GuildAcademyHallOfFameWin::On_Recv_NC_GUILD_ACADEMY_GET_GRADUATE_ACK(this->m_pkGuildAcademyHallOfFameWin, pAck);
  if ( !(unsigned __int8)((int (*)(void))v2->m_pkGuildAcademyHallOfFameWin->vfptr[65].__vecDelDtor)() )
  {
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkGuildAcademyHallOfFameWin->vfptr);
    return 1;
  }
  return 1;
}

//----- (006FC730) --------------------------------------------------------
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_GET_RANKING_LIST_ACK(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_GET_RANKING_LIST_ACK *pAck)
{
  GuildAcademyTask *v2; // esi@1
  int v3; // eax@1
  int v5; // eax@4
  int v6; // eax@5
  NiUnsharedGeometryGroup *v7; // eax@7
  int v8; // esi@10
  NiUnsharedGeometryGroup *v9; // edi@10

  v2 = this;
  v3 = pAck->Error;
  if ( (_WORD)v3 != 6576 )
  {
    v5 = v3 - 6577;
    if ( v5 )
    {
      v6 = v5 - 1;
      if ( v6 )
      {
        if ( v6 != 1 )
          return 1;
        v7 = TextData::Get(0xD4D93C40);
      }
      else
      {
        v7 = TextData::Get(0xC34FF660);
      }
    }
    else
    {
      v7 = TextData::Get(0xCEF8D8D4);
    }
    v8 = (int)&v2->vfptr;
    v9 = v7;
    if ( *(_DWORD *)(v8 + 4) )
    {
      (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v8 + 4) + 4))(25, v7, v8);
      if ( *(_DWORD *)(v8 + 4) )
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v8 + 4) + 20))(25, v9, v8);
    }
    (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v8 + 20))(v8, 25, v9, v8);
    return 1;
  }
  GuildAcademyRankingWin::On_Recv_NC_GUILD_ACADEMY_GET_RANKING_LIST_ACK(this->m_pkGuildAcademyRankingWin, pAck);
  if ( !(unsigned __int8)((int (*)(void))v2->m_pkGuildAcademyRankingWin->vfptr[65].__vecDelDtor)() )
  {
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkGuildAcademyRankingWin->vfptr);
    return 1;
  }
  return 1;
}

//----- (006FC7F0) --------------------------------------------------------
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_MASTER_TELEPORT_ACK(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_MASTER_TELEPORT_ACK *pAck)
{
  signed int v2; // eax@1
  GuildAcademyTask *v3; // esi@1
  NiUnsharedGeometryGroup *v4; // eax@4
  int v5; // esi@10
  NiUnsharedGeometryGroup *v6; // edi@10

  v2 = pAck->Error;
  v3 = this;
  if ( v2 <= 15872 )
  {
    if ( v2 == 15872 )
    {
      v4 = TextData3::Get(0x1554484Eu);
LABEL_10:
      v5 = (int)&v3->vfptr;
      v6 = v4;
      if ( *(_DWORD *)(v5 + 4) )
      {
        (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v5 + 4) + 4))(25, v4, v5);
        if ( *(_DWORD *)(v5 + 4) )
          (*(void (__stdcall **)(signed int, NiUnsharedGeometryGroup *, int))(**(_DWORD **)(v5 + 4) + 20))(25, v6, v5);
      }
      (*(void (__thiscall **)(int, signed int, NiUnsharedGeometryGroup *, int))(*(_DWORD *)v5 + 20))(v5, 25, v6, v5);
    }
    else
    {
      switch ( v2 )
      {
        case 6056:
        case 6057:
          v4 = TextData::Get(0xCEF8D8D4);
          goto LABEL_10;
        case 6058:
          v4 = TextData::Get(0xC34FF660);
          goto LABEL_10;
        case 6059:
          v4 = TextData::Get(0xF0C3E24u);
          goto LABEL_10;
        case 6061:
          v4 = TextData::Get(0x96E2E7DD);
          goto LABEL_10;
        case 6062:
          v4 = TextData::Get(0x3D634B4Eu);
          goto LABEL_10;
        default:
          return 1;
      }
    }
  }
  return 1;
}

//----- (006FC8D0) --------------------------------------------------------
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_SET_MASTER_CMD(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_SET_MASTER_CMD *pkCmd)
{
  GuildAcademyTask *v2; // edi@1
  _BYTE v3[20]; // ST00_20@1
  unsigned int v4; // eax@1
  unsigned int v5; // ecx@1
  unsigned int v6; // eax@1
  unsigned int v7; // ecx@1
  char *v8; // eax@1
  char *v9; // ebx@1
  char acname[21]; // [sp+Ch] [bp-1Ch]@1

  v2 = this;
  *(_QWORD *)&this->m_GuildAcademy.sAcademyMasterName.n5_name[0] = *(_QWORD *)&pkCmd->sName.n5_name[0];
  *(_QWORD *)&this->m_GuildAcademy.sAcademyMasterName.n5_code[2] = *(_QWORD *)&pkCmd->sName.n5_code[2];
  this->m_GuildAcademy.sAcademyMasterName.n5_code[4] = pkCmd->sName.n5_code[4];
  *(_DWORD *)v3 = pkCmd->sName.n5_code[0];
  *(_QWORD *)&v3[4] = *(_QWORD *)&pkCmd->sName.n5_code[1];
  *(_QWORD *)&v3[12] = *(_QWORD *)&pkCmd->sName.n5_code[3];
  CharMgr::GetChar(&g_kCharMgr, *(Name5 *)v3);
  v4 = pkCmd->sName.n5_code[0];
  v5 = pkCmd->sName.n5_code[1];
  *(_DWORD *)&acname[8] = pkCmd->sName.n5_code[2];
  *(_DWORD *)acname = v4;
  v6 = pkCmd->sName.n5_code[3];
  *(_DWORD *)&acname[4] = v5;
  v7 = pkCmd->sName.n5_code[4];
  *(_DWORD *)&acname[12] = v6;
  *(_DWORD *)&acname[16] = v7;
  acname[20] = 0;
  v8 = (char *)TextData::Get(0x323435Fu);
  v9 = fs(v8, acname);
  if ( v2->m_pkMsgHooker )
  {
    ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v2->m_pkMsgHooker->vfptr->SendDirectMessage)(
      25,
      v9,
      &v2->vfptr);
    if ( v2->m_pkMsgHooker )
      ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v2->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
        25,
        v9,
        &v2->vfptr);
  }
  v2->vfptr->DirectDispatchToParent((IDirectMessenger *)&v2->vfptr, 25, v9, (IDirectMessenger *)&v2->vfptr);
  return 1;
}

//----- (006FC9D0) --------------------------------------------------------
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_SET_MASTER_BY_LEAVE_CMD(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_SET_MASTER_BY_LEAVE_CMD *pkCmd)
{
  GuildAcademyTask *v2; // edi@1
  _BYTE v3[20]; // ST00_20@1
  unsigned int v4; // eax@1
  unsigned int v5; // ecx@1
  unsigned int v6; // eax@1
  unsigned int v7; // ecx@1
  char *v8; // eax@1
  char *v9; // ebx@1
  char acname[21]; // [sp+Ch] [bp-1Ch]@1

  v2 = this;
  *(_QWORD *)&this->m_GuildAcademy.sAcademyMasterName.n5_name[0] = *(_QWORD *)&pkCmd->sNewAcademyMasterName.n5_name[0];
  *(_QWORD *)&this->m_GuildAcademy.sAcademyMasterName.n5_code[2] = *(_QWORD *)&pkCmd->sNewAcademyMasterName.n5_code[2];
  this->m_GuildAcademy.sAcademyMasterName.n5_code[4] = pkCmd->sNewAcademyMasterName.n5_code[4];
  *(_DWORD *)v3 = pkCmd->sNewAcademyMasterName.n5_code[0];
  *(_QWORD *)&v3[4] = *(_QWORD *)&pkCmd->sNewAcademyMasterName.n5_code[1];
  *(_QWORD *)&v3[12] = *(_QWORD *)&pkCmd->sNewAcademyMasterName.n5_code[3];
  CharMgr::GetChar(&g_kCharMgr, *(Name5 *)v3);
  v4 = pkCmd->sNewAcademyMasterName.n5_code[0];
  v5 = pkCmd->sNewAcademyMasterName.n5_code[1];
  *(_DWORD *)&acname[8] = pkCmd->sNewAcademyMasterName.n5_code[2];
  *(_DWORD *)acname = v4;
  v6 = pkCmd->sNewAcademyMasterName.n5_code[3];
  *(_DWORD *)&acname[4] = v5;
  v7 = pkCmd->sNewAcademyMasterName.n5_code[4];
  *(_DWORD *)&acname[12] = v6;
  *(_DWORD *)&acname[16] = v7;
  acname[20] = 0;
  v8 = (char *)TextData::Get(0x323435Fu);
  v9 = fs(v8, acname);
  if ( v2->m_pkMsgHooker )
  {
    ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v2->m_pkMsgHooker->vfptr->SendDirectMessage)(
      25,
      v9,
      &v2->vfptr);
    if ( v2->m_pkMsgHooker )
      ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v2->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
        25,
        v9,
        &v2->vfptr);
  }
  v2->vfptr->DirectDispatchToParent((IDirectMessenger *)&v2->vfptr, 25, v9, (IDirectMessenger *)&v2->vfptr);
  return 1;
}

//----- (006FCAD0) --------------------------------------------------------
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_REWARD_WANT_CMD(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_REWARD_WANT_CMD *pkCmd)
{
  __int64 v2; // rdi@2
  unsigned int v3; // ebx@2
  unsigned int v4; // esi@3
  __int64 v5; // rax@4
  int v6; // eax@4
  char v7; // cl@5
  NiUnsharedGeometryGroup *v8; // eax@6
  NiUnsharedGeometryGroup *v9; // edx@6
  char v10; // cl@7
  unsigned int v11; // eax@8
  char *v12; // edi@8
  char v13; // cl@9
  char *v14; // edi@10
  char v15; // al@11
  __int64 v16; // rax@14
  unsigned int v17; // eax@14
  char *v18; // edi@14
  char v19; // cl@15
  NiUnsharedGeometryGroup *v20; // eax@16
  NiUnsharedGeometryGroup *v21; // ecx@16
  char v22; // dl@17
  unsigned int v23; // eax@18
  NiUnsharedGeometryGroup *v24; // esi@18
  char *v25; // edi@18
  char v26; // cl@19
  char *v27; // edi@20
  char v28; // al@21
  __int64 v29; // rax@24
  unsigned int v30; // eax@24
  char *v31; // edi@24
  char v32; // cl@25
  NiUnsharedGeometryGroup *v33; // eax@26
  NiUnsharedGeometryGroup *v34; // ecx@26
  char v35; // dl@27
  unsigned int v36; // eax@28
  NiUnsharedGeometryGroup *v37; // esi@28
  char *v38; // edi@28
  char v39; // cl@29
  char *v40; // edi@30
  char v41; // al@31
  __int64 v42; // rax@34
  unsigned int v43; // eax@34
  char *v44; // edi@34
  char v45; // cl@35
  NiUnsharedGeometryGroup *v46; // eax@36
  NiUnsharedGeometryGroup *v47; // ecx@36
  char v48; // dl@37
  unsigned int v49; // eax@38
  NiUnsharedGeometryGroup *v50; // esi@38
  char *v51; // edi@38
  char v52; // cl@39
  char *v53; // edi@40
  char v54; // al@41
  char *v55; // eax@43
  GuildAcademyTask *v56; // ebx@43
  char *v57; // edi@43
  int v58; // esi@49
  int v59; // edi@49
  int v60; // edx@51
  int v61; // eax@52
  int v62; // eax@53
  unsigned int v63; // ST14_4@54
  int v64; // ST10_4@54
  char *v65; // eax@54
  char *v66; // eax@54
  int v67; // ST14_4@55
  char *v68; // eax@55
  char *v69; // edi@56
  GuildAcademyTask *v71; // [sp+0h] [bp-214h]@1
  unsigned int Money_4; // [sp+8h] [bp-20Ch]@2
  char acStr1[256]; // [sp+10h] [bp-204h]@2
  char acStr2[256]; // [sp+110h] [bp-104h]@2

  v71 = this;
  if ( pkCmd )
  {
    HIDWORD(v2) = pkCmd->nWant_Cen;
    LODWORD(v2) = HIDWORD(pkCmd->nWant_Cen);
    v3 = pkCmd->nWant_Cen;
    Money_4 = HIDWORD(pkCmd->nWant_Cen);
    memset(acStr1, 0, 0x100u);
    memset(acStr2, 0, 0x100u);
    if ( v2 )
    {
      HIDWORD(v2) = v2;
      if ( User::GetGem(__PAIR__(v2, v3)) )
      {
        v5 = User::GetGem(__PAIR__(v2, v3));
        sprintf(acStr1, "%I64d", v5);
        v6 = 0;
        do
        {
          v7 = acStr1[v6];
          acStr2[v6++] = v7;
        }
        while ( v7 );
        v8 = TextData::Get(0x475F9699u);
        v9 = v8;
        do
        {
          v10 = (char)v8->vfptr;
          v8 = (NiUnsharedGeometryGroup *)((char *)v8 + 1);
        }
        while ( v10 );
        v11 = (char *)v8 - (char *)v9;
        v12 = &acStr1[255];
        do
          v13 = (v12++)[1];
        while ( v13 );
        qmemcpy(v12, v9, v11);
        v14 = &acStr1[255];
        do
          v15 = (v14++)[1];
        while ( v15 );
        v4 = Money_4;
        *v14 = 0;
      }
      if ( User::GetGold(__PAIR__(v4, v3)) )
      {
        v16 = User::GetGold(__PAIR__(v4, v3));
        sprintf(acStr1, "%I64d", v16);
        v17 = strlen(acStr1) + 1;
        v18 = &acStr1[255];
        do
          v19 = (v18++)[1];
        while ( v19 );
        qmemcpy(v18, acStr1, v17);
        v20 = TextData::Get(0x47A395A3u);
        v21 = v20;
        do
        {
          v22 = (char)v20->vfptr;
          v20 = (NiUnsharedGeometryGroup *)((char *)v20 + 1);
        }
        while ( v22 );
        v23 = (char *)v20 - (char *)v21;
        v24 = v21;
        v25 = &acStr1[255];
        do
          v26 = (v25++)[1];
        while ( v26 );
        qmemcpy(v25, v24, v23);
        v27 = &acStr1[255];
        do
          v28 = (v27++)[1];
        while ( v28 );
        v4 = Money_4;
        *v27 = 0;
      }
      if ( User::GetSilver(__PAIR__(v4, v3)) )
      {
        v29 = User::GetSilver(__PAIR__(v4, v3));
        sprintf(acStr1, "%I64d", v29);
        v30 = strlen(acStr1) + 1;
        v31 = &acStr1[255];
        do
          v32 = (v31++)[1];
        while ( v32 );
        qmemcpy(v31, acStr1, v30);
        v33 = TextData::Get(0x98B595EF);
        v34 = v33;
        do
        {
          v35 = (char)v33->vfptr;
          v33 = (NiUnsharedGeometryGroup *)((char *)v33 + 1);
        }
        while ( v35 );
        v36 = (char *)v33 - (char *)v34;
        v37 = v34;
        v38 = &acStr1[255];
        do
          v39 = (v38++)[1];
        while ( v39 );
        qmemcpy(v38, v37, v36);
        v40 = &acStr1[255];
        do
          v41 = (v40++)[1];
        while ( v41 );
        v4 = Money_4;
        *v40 = 0;
      }
      if ( User::GetCopper(__PAIR__(v4, v3)) )
      {
        v42 = User::GetCopper(__PAIR__(Money_4, v3));
        sprintf(acStr1, "%I64d", v42);
        v43 = strlen(acStr1) + 1;
        v44 = &acStr1[255];
        do
          v45 = (v44++)[1];
        while ( v45 );
        qmemcpy(v44, acStr1, v43);
        v46 = TextData::Get(0x88AF99F5);
        v47 = v46;
        do
        {
          v48 = (char)v46->vfptr;
          v46 = (NiUnsharedGeometryGroup *)((char *)v46 + 1);
        }
        while ( v48 );
        v49 = (char *)v46 - (char *)v47;
        v50 = v47;
        v51 = &acStr1[255];
        do
          v52 = (v51++)[1];
        while ( v52 );
        qmemcpy(v51, v50, v49);
        v53 = &acStr1[255];
        do
          v54 = (v53++)[1];
        while ( v54 );
        *v53 = 0;
      }
      v55 = (char *)TextData::Get(0xD20BC4ED);
      v56 = v71;
      v57 = fs(v55, acStr2);
      if ( v71->m_pkMsgHooker )
      {
        ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v71->m_pkMsgHooker->vfptr->SendDirectMessage)(
          25,
          v57,
          &v71->vfptr);
        if ( v71->m_pkMsgHooker )
          ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v71->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            25,
            v57,
            &v71->vfptr);
      }
      v71->vfptr->DirectDispatchToParent((IDirectMessenger *)&v71->vfptr, 25, v57, (IDirectMessenger *)&v71->vfptr);
    }
    else
    {
      v56 = v71;
    }
    if ( pkCmd->nWant_ItemID != -1 )
    {
      v58 = ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;
      v59 = pkCmd->nWant_ItemID;
      if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable
                                                            + 16))(
                              ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable,
                              v59) )
      {
        if ( (unsigned __int16)v59 <= *(_WORD *)(v58 + 200) )
        {
          v60 = *(_DWORD *)(v58 + 196);
          if ( *(_DWORD *)(v60 + 4 * v59) )
          {
            v61 = *(_DWORD *)(v60 + 4 * v59);
            if ( v61 )
            {
              v62 = v61 + 34;
              if ( pkCmd->nWant_ItemLot )
              {
                v63 = pkCmd->nWant_ItemLot;
                v64 = v62;
                v65 = (char *)TextData::Get(0x731ABCE7u);
                v66 = fs(v65, v64, v63);
              }
              else
              {
                v67 = v62;
                v68 = (char *)TextData::Get(0xD26E0B33);
                v66 = fs(v68, v67);
              }
              v69 = v66;
              if ( v56->m_pkMsgHooker )
              {
                ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v56->m_pkMsgHooker->vfptr->SendDirectMessage)(
                  25,
                  v66,
                  &v56->vfptr);
                if ( v56->m_pkMsgHooker )
                  ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v56->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                    25,
                    v69,
                    &v56->vfptr);
              }
              v56->vfptr->DirectDispatchToParent(
                (IDirectMessenger *)&v56->vfptr,
                25,
                v69,
                (IDirectMessenger *)&v56->vfptr);
            }
          }
        }
      }
    }
  }
  return 1;
}
// A8C294: using guessed type int ITableBase<ItemInfo,ItemInfoTab>::ms_pkTable;

//----- (006FCF70) --------------------------------------------------------
void __thiscall CClientGuildAcademy::ClearHistoryList(CClientGuildAcademy *this)
{
  CClientGuildAcademy *v1; // edi@1
  NiTListItem<GUILD_HISTORY *> *v2; // esi@1
  unsigned int v3; // ebx@2
  GUILD_HISTORY *v4; // eax@3
  NiTListItem<GUILD_HISTORY *> **v5; // esi@6
  NiTListItem<GUILD_HISTORY *> *v6; // ST04_4@7

  v1 = this;
  v2 = this->m_kHistoryList.m_pkHead;
  if ( this->m_kHistoryList.m_kAllocator.m_uiCount )
  {
    v3 = this->m_kHistoryList.m_kAllocator.m_uiCount;
    do
    {
      v4 = v2->m_element;
      v2 = v2->m_pkNext;
      if ( v4 )
        operator delete(v4);
      --v3;
    }
    while ( v3 );
  }
  v5 = &v1->m_kHistoryList.m_pkHead->m_pkNext;
  while ( v5 )
  {
    v6 = (NiTListItem<GUILD_HISTORY *> *)v5;
    v5 = (NiTListItem<GUILD_HISTORY *> **)*v5;
    v1->m_kHistoryList.vfptr->DeleteItem(
      (NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *> *)&v1->m_kHistoryList,
      v6);
  }
  v1->m_kHistoryList.m_kAllocator.m_uiCount = 0;
  v1->m_kHistoryList.m_pkHead = 0;
  v1->m_kHistoryList.m_pkTail = 0;
}

//----- (006FCFE0) --------------------------------------------------------
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_HISTORY_LIST_ACK(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_HISTORY_LIST_ACK *pkCmd)
{
  int v2; // eax@1
  GuildAcademyTask *v3; // ebx@1
  int v4; // eax@2
  int v5; // eax@3
  NiUnsharedGeometryGroup *v6; // eax@5
  NiUnsharedGeometryGroup *v7; // edi@6
  int result; // eax@10
  _DWORD *v9; // esi@13
  PROTO_NC_GUILD_ACADEMY_HISTORY_LIST_ACK *v10; // edi@14
  _DWORD *v11; // eax@16
  int v12; // eax@18
  _DWORD *v13; // ecx@18
  PROTO_NC_GUILD_ACADEMY_HISTORY_LIST_ACK *pkCmda; // [sp+14h] [bp+8h]@14

  v2 = pkCmd->Error;
  v3 = this;
  if ( (_WORD)v2 != 12680 )
  {
    v4 = v2 - 12682;
    if ( !v4 )
    {
      v6 = TextData3::Get(0xB71BE151);
      goto LABEL_6;
    }
    v5 = v4 - 1;
    if ( !v5 )
    {
      v6 = TextData3::Get(0xBFD3D95D);
      goto LABEL_6;
    }
    if ( v5 == 1 )
    {
      v6 = TextData3::Get(0x9D01ED3A);
LABEL_6:
      v7 = v6;
      if ( v3->m_pkMsgHooker )
      {
        ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v3->m_pkMsgHooker->vfptr->SendDirectMessage)(
          25,
          v6,
          &v3->vfptr);
        if ( v3->m_pkMsgHooker )
          ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v3->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            25,
            v7,
            &v3->vfptr);
      }
      v3->vfptr->DirectDispatchToParent((IDirectMessenger *)&v3->vfptr, 25, v7, (IDirectMessenger *)&v3->vfptr);
    }
    return 1;
  }
  CClientGuildAcademy::ClearHistoryList((CClientGuildAcademy *)&this->vfptr);
  v9 = 0;
  if ( !pkCmd->HistoryCount )
    return 1;
  v10 = pkCmd + 3;
  pkCmda = (PROTO_NC_GUILD_ACADEMY_HISTORY_LIST_ACK *)pkCmd->HistoryCount;
  while ( 1 )
  {
    v11 = operator new(0x20u);
    if ( v11 )
    {
      v11[6] = 0;
      v11[5] = 0;
      v11[4] = 0;
      v11[3] = 0;
      v11[2] = 0;
      v9 = v11;
    }
    *v9 = *(_DWORD *)&v10[-2].Error;
    v9[1] = *(_DWORD *)&v10[-2].HistoryCount;
    v9[2] = *(_DWORD *)&v10[-1].Error;
    v9[3] = *(_DWORD *)&v10[-1].HistoryCount;
    v9[4] = *(_DWORD *)&v10->Error;
    v9[5] = *(_DWORD *)&v10->HistoryCount;
    v9[6] = *(_DWORD *)&v10[1].Error;
    v9[7] = *(_DWORD *)&v10[1].HistoryCount;
    v12 = (int)v3->m_kHistoryList.vfptr->NewItem((NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *> *)&v3->m_kHistoryList);
    *(_DWORD *)(v12 + 8) = v9;
    *(_DWORD *)v12 = 0;
    *(_DWORD *)(v12 + 4) = v3->m_kHistoryList.m_pkTail;
    v13 = &v3->m_kHistoryList.m_pkTail->m_pkNext;
    if ( v13 )
      *v13 = v12;
    else
      v3->m_kHistoryList.m_pkHead = (NiTListItem<GUILD_HISTORY *> *)v12;
    v3->m_kHistoryList.m_pkTail = (NiTListItem<GUILD_HISTORY *> *)v12;
    result = 1;
    ++v3->m_kHistoryList.m_kAllocator.m_uiCount;
    v10 += 4;
    pkCmda = (PROTO_NC_GUILD_ACADEMY_HISTORY_LIST_ACK *)((char *)pkCmda - 1);
    if ( !pkCmda )
      break;
    v9 = 0;
  }
  return result;
}

//----- (006FD130) --------------------------------------------------------
char __thiscall CClientGuildAcademy::FindEnemyGuildAcademyMember(CClientGuildAcademy *this, unsigned int GuildRegNum)
{
  CClientGuildAcademy *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> >::_Node *v3; // eax@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> >::_Node *v4; // esi@1
  char result; // al@3
  unsigned int v6; // edi@4
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> > > iter; // [sp+8h] [bp-4h]@1

  v2 = this;
  v3 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> >::_Node *)std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::find((std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&this->m_kGuildWarInfo, (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&iter, &GuildRegNum)->_Ptr;
  v4 = v2->m_kGuildWarInfo._Myhead;
  iter._Ptr = v3;
  if ( v3 == v4 )
  {
LABEL_8:
    result = 0;
  }
  else
  {
    if ( v3->_Myval.second != 2 )
    {
      v6 = GuildRegNum;
      while ( v3->_Myval.first != v6 || v3->_Myval.second != 2 )
      {
        std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const,int>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,boost::fast_pool_allocator<std::pair<unsigned int,unsigned int>,boost::default_user_allocator_new_delete,boost::details::pool::win32_mutex,32>,0> >,std::_Iterator_base0> *)&iter);
        v3 = iter._Ptr;
        if ( iter._Ptr == v4 )
          goto LABEL_8;
      }
    }
    result = 1;
  }
  return result;
}

//----- (006FD1A0) --------------------------------------------------------
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_WAR_END_CMD(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_WAR_END_CMD *pkCmd)
{
  PROTO_NC_GUILD_ACADEMY_WAR_END_CMD *v2; // edi@1
  GuildAcademyTask *v3; // esi@1
  PROTO_NC_GUILD_ACADEMY_WAR_END_CMD *v4; // ST04_4@2
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v5; // eax@2

  v2 = pkCmd;
  v3 = this;
  if ( pkCmd )
  {
    v4 = pkCmd;
    this->m_bGuildWarStart = 0;
    v5 = std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::find(
           (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&this->m_kGuildWarInfo,
           (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&pkCmd,
           &v4->EnemyGuildNo)->_Ptr;
    if ( v5 != (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v3->m_kGuildWarInfo._Myhead )
      LOBYTE(v5->_Myval.second) = v2->WarStatus;
  }
  return 1;
}

//----- (006FD1E0) --------------------------------------------------------
void __thiscall GuildAcademyTask::~GuildAcademyTask(GuildAcademyTask *this)
{
  GuildAcademyTask *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> >::_Node *v2; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *v3; // eax@1
  GuildAcademyMemberTask *v4; // edi@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > > result; // [sp+10h] [bp-14h]@2
  GuildAcademyTask *v6; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = this;
  v6 = this;
  this->vfptr = (NiRefObjectVtbl *)&GuildAcademyTask::`vftable'{for `NiRefObject'};
  this->vfptr = (IDirectMessengerVtbl *)&GuildAcademyTask::`vftable'{for `IDirectMessenger'};
  this->vfptr = (CGuildVtbl *)&GuildAcademyTask::`vftable';
  v2 = this->m_kGuildWarInfo._Myhead;
  v3 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v2->_Left;
  v7 = 2;
  if ( (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> >::_Node *)v3 != v2 )
  {
    do
      v3 = std::_Tree<std::_Tmap_traits<int,mhResTableElement *,std::less<int>,std::allocator<std::pair<int const,mhResTableElement *>>,0>>::erase(
             (std::_Tree<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > *)&v1->m_kGuildWarInfo,
             &result,
             (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> > >)v3)->_Ptr;
    while ( v3 != (std::_Tree_nod<std::_Tmap_traits<unsigned short,long,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,long> >,0> >::_Node *)v1->m_kGuildWarInfo._Myhead );
  }
  std::_Tree<std::_Tmap_traits<unsigned short,Char *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,Char *>>,0>>::clear((std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_kGuildWarInfo);
  v1->m_bGuildWarStart = 0;
  CClientGuildAcademy::ClearHistoryList((CClientGuildAcademy *)&v1->vfptr);
  v4 = v1->m_spGuildAcademyMemberTask.m_pObject;
  LOBYTE(v7) = 1;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  LOBYTE(v7) = 0;
  CClientGuildAcademy::~CClientGuildAcademy((CClientGuildAcademy *)&v1->vfptr);
  v7 = -1;
  ITask::~ITask((ITask *)&v1->vfptr);
}
// 9C793C: using guessed type int (__thiscall *GuildAcademyTask::`vftable')(CGuild *this, struct PROTO_NC_GUILD_MAKE_ACK *);
// 9C7990: using guessed type void (__thiscall *GuildAcademyTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C79AC: using guessed type int (__thiscall *GuildAcademyTask::`vftable'{for `NiRefObject'})(void *p, char);

//----- (006FD2C0) --------------------------------------------------------
void __thiscall GuildAcademyTask::GuildAcademyTask(GuildAcademyTask *this)
{
  GuildAcademyTask *v1; // esi@1
  GuildAcademyMemberTask *v2; // edi@1

  v1 = this;
  ITask::ITask((ITask *)&this->vfptr, 0);
  CClientGuildAcademy::CClientGuildAcademy((CClientGuildAcademy *)&v1->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GuildAcademyTask::`vftable'{for `NiRefObject'};
  v1->vfptr = (IDirectMessengerVtbl *)&GuildAcademyTask::`vftable'{for `IDirectMessenger'};
  v1->vfptr = (CGuildVtbl *)&GuildAcademyTask::`vftable';
  v1->m_spGuildAcademyMemberTask.m_pObject = 0;
  v1->m_bIsGuildAcademyMember = 0;
  v2 = v1->m_spGuildAcademyMemberTask.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spGuildAcademyMemberTask.m_pObject = 0;
  }
  v1->m_pkGuildAcademyMenuWin = 0;
  v1->m_pkGuildAcademyRankingWin = 0;
  v1->m_pkGuildAcademyHallOfFameWin = 0;
  v1->m_pkGuildAcademyMoneyRewardWin = 0;
  v1->m_pkGuildAcademyItemRewardWin = 0;
  v1->m_pkGuildAcademyStorageWin = 0;
}
// 9C793C: using guessed type int (__thiscall *GuildAcademyTask::`vftable')(CGuild *this, struct PROTO_NC_GUILD_MAKE_ACK *);
// 9C7990: using guessed type void (__thiscall *GuildAcademyTask::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C79AC: using guessed type int (__thiscall *GuildAcademyTask::`vftable'{for `NiRefObject'})(void *p, char);

//----- (006FD390) --------------------------------------------------------
void __cdecl GuildAcademyTask::Create(IDirectMessenger *pkMsgHooker)
{
  int v1; // eax@1
  GuildAcademyTask *v2; // eax@2
  int v3; // eax@3
  int v4; // esi@3
  void (__thiscall ***v5)(_DWORD, _DWORD); // edi@7

  v1 = GuildAcademyTask::ms_spGuildAcademyTask;
  if ( !GuildAcademyTask::ms_spGuildAcademyTask )
  {
    v2 = (GuildAcademyTask *)operator new(0x810u);
    if ( v2 )
    {
      GuildAcademyTask::GuildAcademyTask(v2);
      v4 = v3;
    }
    else
    {
      v4 = 0;
    }
    v1 = GuildAcademyTask::ms_spGuildAcademyTask;
    if ( GuildAcademyTask::ms_spGuildAcademyTask != v4 )
    {
      if ( GuildAcademyTask::ms_spGuildAcademyTask )
      {
        v5 = (void (__thiscall ***)(_DWORD, _DWORD))GuildAcademyTask::ms_spGuildAcademyTask;
        if ( !InterlockedDecrement((volatile LONG *)(GuildAcademyTask::ms_spGuildAcademyTask + 4)) )
        {
          if ( v5 )
            (**v5)(v5, 1);
        }
      }
      v1 = v4;
      GuildAcademyTask::ms_spGuildAcademyTask = v4;
      if ( v4 )
      {
        InterlockedIncrement((volatile LONG *)(v4 + 4));
        v1 = GuildAcademyTask::ms_spGuildAcademyTask;
      }
    }
  }
  (**(void (__cdecl ***)(IDirectMessenger *))(v1 + 8))(pkMsgHooker);
}
// B5C2D8: using guessed type int GuildAcademyTask::ms_spGuildAcademyTask;

//----- (006FD450) --------------------------------------------------------
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_WAR_INFO_CMD(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_WAR_INFO_LIST_CMD *pkCmd)
{
  int v2; // eax@1
  signed int v3; // edi@2
  char *v4; // esi@3
  char v5; // dl@4
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> > >,bool> result; // [sp+4h] [bp-14h]@4
  std::pair<unsigned long const ,unsigned char> _Val; // [sp+Ch] [bp-Ch]@4
  GuildAcademyTask *v8; // [sp+14h] [bp-4h]@1

  v2 = 0;
  v8 = this;
  if ( pkCmd )
  {
    v3 = 0;
    if ( pkCmd->NumOfWarInfo > 0u )
    {
      v4 = (char *)&pkCmd[3];
      do
      {
        v5 = *v4;
        _Val.first = *((_DWORD *)v4 - 1);
        _Val.second = v5;
        std::_Tree<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,unsigned char>>,1>>::insert<std::pair<unsigned long const,unsigned char>>(
          (std::_Tree<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> > *)&v8->m_kGuildWarInfo.comp,
          &result,
          &_Val);
        if ( *v4 == 2 )
          v8->m_bGuildWarStart = 1;
        ++v3;
        v4 += 5;
      }
      while ( v3 < pkCmd->NumOfWarInfo );
    }
    v2 = 1;
  }
  return v2;
}

//----- (006FD4C0) --------------------------------------------------------
int __thiscall GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_WAR_START_CMD(GuildAcademyTask *this, PROTO_NC_GUILD_ACADEMY_WAR_START_CMD *pkCmd)
{
  PROTO_NC_GUILD_ACADEMY_WAR_START_CMD *v2; // edi@1
  GuildAcademyTask *v3; // esi@1
  PROTO_NC_GUILD_ACADEMY_WAR_START_CMD *v4; // ST04_4@2
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *v5; // eax@2
  int v6; // eax@3
  char v7; // al@4
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> > >,bool> result; // [sp+8h] [bp-10h]@4
  std::pair<unsigned long const ,unsigned char> _Val; // [sp+10h] [bp-8h]@4

  v2 = pkCmd;
  v3 = this;
  if ( pkCmd )
  {
    v4 = pkCmd;
    this->m_bGuildWarStart = 1;
    v5 = std::_Tree<std::_Tmap_traits<unsigned long,NiPointer<NiControllerSequence>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,NiPointer<NiControllerSequence>>>,0>>::find(
           (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&this->m_kGuildWarInfo,
           (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > *)&pkCmd,
           &v4->EnemyGuildNo)->_Ptr;
    if ( v5 == (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v3->m_kGuildWarInfo._Myhead )
    {
      v7 = v2->WarStatus;
      _Val.first = v2->EnemyGuildNo;
      _Val.second = v7;
      std::_Tree<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,unsigned char>>,1>>::insert<std::pair<unsigned long const,unsigned char>>(
        (std::_Tree<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> > *)&v3->m_kGuildWarInfo.comp,
        &result,
        &_Val);
      v3->m_bGuildWarStart = 1;
      v6 = 1;
    }
    else
    {
      LOBYTE(v5->_Myval.second) = v2->WarStatus;
      v3->m_bGuildWarStart = 1;
      v6 = 1;
    }
  }
  else
  {
    v6 = 0;
  }
  return v6;
}

//----- (006FD550) --------------------------------------------------------
bool __thiscall GuildAcademyTask::OnProcessNetMsg(GuildAcademyTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  GuildAcademyTask *v5; // esi@1
  bool result; // al@4
  int v7; // esi@12
  int v8; // esi@19

  v5 = this;
  switch ( iDepart )
  {
    case 45:
      if ( iCommand != 14 )
        goto LABEL_40;
      GuildAcademyTask::On_Recv_NC_USER_CONNECTION_CHANGE_CHAR_ID_ACADEMY_MASTER_CMD(
        this,
        (PROTO_NC_USER_CONNECTION_CHANGE_CHAR_ID_ACADEMY_MASTER_CMD *)pvData);
$LN23_54:
      result = 1;
      break;
    case 4:
      if ( iCommand != 151 )
        goto LABEL_40;
      GuildAcademyTask::On_Recv_NC_CHAR_GUILD_ACADEMY_CMD(this, (PROTO_NC_CHAR_GUILD_ACADEMY_CMD *)pvData);
      result = 1;
      break;
    case 12:
      if ( iCommand == 48 )
      {
        GuildAcademyTask::On_Recv_NC_ITEM_GUILD_ACADEMY_REWARD_STORAGE_WITHDRAW_ACK(
          this,
          iRevBytes,
          (PROTO_NC_ITEM_GUILD_ACADEMY_REWARD_STORAGE_WITHDRAW_ACK *)pvData);
        result = 1;
      }
      else
      {
        if ( iCommand != 50 )
          goto LABEL_40;
        GuildAcademyTask::On_Recv_NC_ITEM_GUILD_ACADEMY_REWARD_STORAGE_DEPOSIT_ACK(
          this,
          iRevBytes,
          (PROTO_NC_ITEM_GUILD_ACADEMY_REWARD_STORAGE_DEPOSIT_ACK *)pvData);
        result = 1;
      }
      break;
    case 38:
      switch ( iCommand )
      {
        case 18:
        case 28:
        case 47:
          goto $LN23_54;
        case 95:
          GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_DELETE_CMD(this, (PROTO_NC_GUILD_ACADEMY_DELETE_CMD *)pvData);
          v7 = (int)&v5->vfptr;
          GuildAcademyMemberTask::GetGuildAcademyMember()->m_NumOfAcademyMembers = 0;
          if ( *(_DWORD *)(v7 + 4) )
            (*(void (__stdcall **)(signed int, _DWORD, int))(**(_DWORD **)(v7 + 4) + 4))(41, 0, v7);
          if ( *(_DWORD *)(v7 + 4) )
            (*(void (__stdcall **)(signed int, _DWORD, int))(**(_DWORD **)(v7 + 4) + 20))(41, 0, v7);
          (*(void (__thiscall **)(int, signed int, _DWORD, int))(*(_DWORD *)v7 + 20))(v7, 41, 0, v7);
          return 1;
        case 32:
          GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_MASTER_TELEPORT_ACK(
            this,
            (PROTO_NC_GUILD_ACADEMY_MASTER_TELEPORT_ACK *)pvData);
          return 1;
        case 8:
          GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_MY_GUILD_ACADEMY_INFO_ACK(
            this,
            (int)this,
            (PROTO_NC_GUILD_ACADEMY_MY_GUILD_ACADEMY_INFO_ACK *)pvData);
          return 1;
        case 38:
          GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_NOTIFY_CMD(this, (PROTO_NC_GUILD_ACADEMY_NOTIFY_CMD *)pvData);
          v8 = (int)&v5->vfptr;
          if ( *(_DWORD *)(v8 + 4) )
          {
            (*(void (__stdcall **)(signed int, _DWORD, int))(**(_DWORD **)(v8 + 4) + 4))(71, 0, v8);
            if ( *(_DWORD *)(v8 + 4) )
              (*(void (__stdcall **)(signed int, _DWORD, int))(**(_DWORD **)(v8 + 4) + 20))(71, 0, v8);
          }
          (*(void (__thiscall **)(int, signed int, _DWORD, int))(*(_DWORD *)v8 + 20))(v8, 71, 0, v8);
          return 1;
        case 50:
          GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_GET_REWARD_MONEY_ACK(
            this,
            (PROTO_NC_GUILD_ACADEMY_GET_REWARD_MONEY_ACK *)pvData);
          return 1;
        case 58:
          GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_SET_REWARD_MONEY_ACK(
            this,
            iRevBytes,
            (PROTO_NC_GUILD_ACADEMY_SET_REWARD_MONEY_ACK *)pvData);
          return 1;
        case 66:
          GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_CLEAR_REWARD_MONEY_ACK(
            this,
            iRevBytes,
            (PROTO_NC_GUILD_ACADEMY_CLEAR_REWARD_MONEY_ACK *)pvData);
          return 1;
        case 54:
          GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_GET_REWARD_ITEM_ACK(
            this,
            (PROTO_NC_GUILD_ACADEMY_GET_REWARD_ITEM_ACK *)pvData);
          return 1;
        case 62:
          GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_SET_REWARD_ITEM_ACK(
            this,
            iRevBytes,
            (PROTO_NC_GUILD_ACADEMY_SET_REWARD_ITEM_ACK *)pvData);
          return 1;
        case 70:
          GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_CLEAR_REWARD_ITEM_ACK(
            this,
            iRevBytes,
            (PROTO_NC_GUILD_ACADEMY_CLEAR_REWARD_ITEM_ACK *)pvData);
          return 1;
        case 74:
          GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_GET_GRADUATE_ACK(
            this,
            (PROTO_NC_GUILD_ACADEMY_GET_GRADUATE_ACK *)pvData);
          return 1;
        case 78:
          GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_GET_RANKING_LIST_ACK(
            this,
            (PROTO_NC_GUILD_ACADEMY_GET_RANKING_LIST_ACK *)pvData);
          return 1;
        case 115:
          GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_REWARD_STORAGE_WITHDRAW_CMD(
            this,
            (PROTO_NC_GUILD_ACADEMY_REWARD_STORAGE_WITHDRAW_CMD *)pvData);
          return 1;
        case 117:
          GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_REWARD_STORAGE_DEPOSIT_CMD(
            this,
            (PROTO_NC_GUILD_ACADEMY_REWARD_STORAGE_DEPOSIT_CMD *)pvData);
          return 1;
        case 91:
          GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_SET_MASTER_CMD(
            this,
            (PROTO_NC_GUILD_ACADEMY_SET_MASTER_CMD *)pvData);
          return 1;
        case 129:
          GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_SET_MASTER_BY_LEAVE_CMD(
            this,
            (PROTO_NC_GUILD_ACADEMY_SET_MASTER_BY_LEAVE_CMD *)pvData);
          return 1;
        case 124:
          GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_WAR_INFO_CMD(
            this,
            (PROTO_NC_GUILD_ACADEMY_WAR_INFO_LIST_CMD *)pvData);
          return 1;
        case 125:
          GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_WAR_START_CMD(this, (PROTO_NC_GUILD_ACADEMY_WAR_START_CMD *)pvData);
          return 1;
        case 126:
          GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_WAR_END_CMD(this, (PROTO_NC_GUILD_ACADEMY_WAR_END_CMD *)pvData);
          return 1;
        case 131:
          GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_REWARD_WANT_CMD(
            this,
            (PROTO_NC_GUILD_ACADEMY_REWARD_WANT_CMD *)pvData);
          return 1;
        case 144:
          GuildAcademyTask::On_Recv_NC_GUILD_ACADEMY_HISTORY_LIST_ACK(
            this,
            (PROTO_NC_GUILD_ACADEMY_HISTORY_LIST_ACK *)pvData);
          return 1;
        default:
          goto LABEL_40;
      }
      goto LABEL_40;
    default:
LABEL_40:
      result = 0;
      break;
  }
  return result;
}

//----- (006FD940) --------------------------------------------------------
GUILD_ACADEMY_CLIENT *__thiscall GUILD_ACADEMY_CLIENT::operator=(GUILD_ACADEMY_CLIENT *this, GUILD_ACADEMY_CLIENT *__that)
{
  GUILD_ACADEMY_CLIENT *result; // eax@1
  char *v3; // esi@1
  signed int v4; // ebx@1
  signed int v5; // edi@1
  char *v6; // ecx@3
  signed int v7; // esi@3

  result = this;
  *(_QWORD *)&this->sAcademyMasterName.n5_name[0] = *(_QWORD *)&__that->sAcademyMasterName.n5_name[0];
  *(_QWORD *)&this->sAcademyMasterName.n5_code[2] = *(_QWORD *)&__that->sAcademyMasterName.n5_code[2];
  this->sAcademyMasterName.n5_code[4] = __that->sAcademyMasterName.n5_code[4];
  this->nNumAcademyMembers = __that->nNumAcademyMembers;
  this->nMaxAcademyMembers = __that->nMaxAcademyMembers;
  this->nAcademyPoint = __that->nAcademyPoint;
  this->nAcademyRank = __that->nAcademyRank;
  this->dAcademyBuffUntilTime = __that->dAcademyBuffUntilTime;
  v3 = this->sIntro;
  v4 = (char *)__that - (char *)this;
  v5 = 128;
  do
  {
    *v3 = v3[v4];
    ++v3;
    --v5;
  }
  while ( v5 );
  this->dNotifyDate = __that->dNotifyDate;
  qmemcpy(&this->tm_dNotifyDate, &__that->tm_dNotifyDate, 0x38u);
  v6 = this->sNotify;
  v7 = 512;
  do
  {
    *v6 = v6[v4];
    ++v6;
    --v7;
  }
  while ( v7 );
  return result;
}

//----- (006FDA20) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,unsigned char>>,1>>::_Buynode<std::pair<unsigned long const,unsigned char>>(std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> > *this, std::pair<unsigned long const ,unsigned char> *_Val)
{
  std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> >::_Node *result; // eax@1
  std::exception pExceptionObject; // [sp+4h] [bp-Ch]@5

  v2 = this;
  result = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> >::_Node *)operator new(0x18u);
  if ( !result )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  result->_Left = v2->_Myhead;
  result->_Parent = v2->_Myhead;
  result->_Right = v2->_Myhead;
  *(_WORD *)&result->_Color = 0;
  if ( result != (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> >::_Node *)-12 )
    result->_Myval = *_Val;
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (006FDA90) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,unsigned char>>,1>>::insert<std::pair<unsigned long const,unsigned char>>(std::_Tree<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> > >,bool> *result, std::pair<unsigned long const ,unsigned char> *_Val)
{
  std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v4; // eax@1
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v5; // edx@1
  std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *v6; // ecx@1
  bool v7; // zf@1
  unsigned int v8; // edi@2
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> >::_Node *v9; // ecx@7
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> > >,bool> *v10; // eax@7

  v3 = (std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > *)this;
  v4 = (std::_Tree_nod<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> >::_Node *)std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const,unsigned char>>,1>>::_Buynode<std::pair<unsigned long const,unsigned char>>((std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> > *)&this->comp, _Val);
  v5 = v3->_Myhead;
  v6 = v5->_Parent;
  v7 = v6->_Isnil == 0;
  LOBYTE(_Val) = 1;
  if ( v7 )
  {
    v8 = v4->_Myval.first;
    do
    {
      v5 = v6;
      LOBYTE(_Val) = v8 < v6->_Myval.first;
      if ( (_BYTE)_Val )
        v6 = v6->_Left;
      else
        v6 = v6->_Right;
    }
    while ( !v6->_Isnil );
  }
  v9 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> >::_Node *)std::_Tree<std::_Tmap_traits<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>,1>>::_Insert(v3, (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const ,int> >,0> > > *)&_Val, (bool)_Val, v5, v4)->_Ptr;
  v10 = result;
  result->first._Ptr = v9;
  result->second = 1;
  return v10;
}

//----- (006FDB00) --------------------------------------------------------
void __thiscall CClientGuildAcademy::~CClientGuildAcademy(CClientGuildAcademy *this)
{
  CClientGuildAcademy *v1; // ebx@1
  char *v2; // esi@1
  NiTListItem<GUILD_HISTORY *> *v3; // edi@1
  NiTListItem<GUILD_HISTORY *> *v4; // ST08_4@2
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v5; // ST08_4@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > v6; // ST04_4@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > > result; // [sp+10h] [bp-18h]@3
  void *v8; // [sp+14h] [bp-14h]@1
  CClientGuildAcademy *v9; // [sp+18h] [bp-10h]@1
  int v10; // [sp+24h] [bp-4h]@1

  v1 = this;
  v9 = this;
  v10 = 0;
  v2 = (char *)&this->m_kHistoryList;
  v8 = v2;
  *(_DWORD *)v2 = &PgTList<GUILD_HISTORY *>::`vftable';
  v3 = this->m_kHistoryList.m_pkHead;
  LOBYTE(v10) = 2;
  while ( v3 )
  {
    v4 = v3;
    v3 = v3->m_pkNext;
    (*(void (__thiscall **)(char *, NiTListItem<GUILD_HISTORY *> *))(*(_DWORD *)v2 + 8))(v2, v4);
  }
  *((_DWORD *)v2 + 3) = 0;
  *((_DWORD *)v2 + 1) = 0;
  *((_DWORD *)v2 + 2) = 0;
  *(_DWORD *)v2 = &NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::`vftable';
  v8 = &v1->m_kGuildWarInfo;
  v5._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_kGuildWarInfo._Myhead;
  v6._Ptr = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> >::_Node *)v1->m_kGuildWarInfo._Myhead->_Left;
  LOBYTE(v10) = 4;
  std::_Tree<std::_Tmap_traits<enum  ActionMgr::eACTIONEFF_TYPE,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *,std::less<enum  ActionMgr::eACTIONEFF_TYPE>,std::allocator<std::pair<enum  ActionMgr::eACTIONEFF_TYPE const,std::multimap<float,ActionMgr::ActionEffectInfoEx *,std::less<float>,std::allocator<std::pair<float const,ActionMgr::ActionEffectInfoEx *>>> *>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<unsigned long,unsigned long,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned long> >,0> > *)&v1->m_kGuildWarInfo,
    &result,
    v6,
    v5);
  operator delete(v1->m_kGuildWarInfo._Myhead);
  v10 = -1;
  CGuild::~CGuild((CGuild *)&v1->vfptr);
}
// 9BF394: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>::`vftable')(void *p, char);
// 9BF3B4: using guessed type int (__thiscall *PgTList<GUILD_HISTORY *>::`vftable')(void *p, char);

//----- (006FDBC0) --------------------------------------------------------
void __thiscall CClientGuildAcademy::CClientGuildAcademy(CClientGuildAcademy *this)
{
  CClientGuildAcademy *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> >::_Node *v2; // eax@1
  std::exception pExceptionObject; // [sp+Ch] [bp-20h]@3
  CClientGuildAcademy *v4; // [sp+18h] [bp-14h]@1
  char *_What; // [sp+1Ch] [bp-10h]@3
  int v6; // [sp+28h] [bp-4h]@1

  v1 = this;
  v4 = this;
  CGuild::CGuild((CGuild *)&this->vfptr);
  v1->vfptr = (CGuildVtbl *)&CClientGuildAcademy::`vftable';
  v6 = 0;
  v1->m_kGuildWarInfo._Mysize = 0;
  v2 = (std::_Tree_nod<std::_Tmap_traits<unsigned long,unsigned char,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,unsigned char> >,1> >::_Node *)operator new(0x18u);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_kGuildWarInfo._Myhead = v2;
  v2->_Left = v2;
  v1->m_kGuildWarInfo._Myhead->_Parent = v1->m_kGuildWarInfo._Myhead;
  v1->m_kGuildWarInfo._Myhead->_Right = v1->m_kGuildWarInfo._Myhead;
  v1->m_kGuildWarInfo._Myhead->_Color = 1;
  v1->m_kGuildWarInfo._Myhead->_Isnil = 1;
  v1->m_kHistoryList.m_kAllocator.m_uiCount = 0;
  v1->m_kHistoryList.m_pkHead = 0;
  v1->m_kHistoryList.m_pkTail = 0;
  v1->m_kHistoryList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,GUILD_HISTORY *>Vtbl *)&PgTList<GUILD_HISTORY *>::`vftable';
  v1->m_bGuildWarStart = 0;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);
// 9BF3B4: using guessed type int (__thiscall *PgTList<GUILD_HISTORY *>::`vftable')(void *p, char);
// 9C79C4: using guessed type int (__thiscall *CClientGuildAcademy::`vftable')(CGuild *this, struct PROTO_NC_GUILD_MAKE_ACK *);

//----- (006FDCA0) --------------------------------------------------------
GuildAcademyTask *__thiscall GuildAcademyTask::`scalar deleting destructor'(GuildAcademyTask *this, unsigned int a2)
{
  GuildAcademyTask *v2; // esi@1

  v2 = this;
  GuildAcademyTask::~GuildAcademyTask(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (006FDCD0) --------------------------------------------------------
void __thiscall GuildAcademyMemberVanishTask::SetInfo(GuildAcademyMemberVanishTask *this, Name5 *rkTargetName)
{
  *(_QWORD *)&this->m_kTargetName.n5_name[0] = *(_QWORD *)&rkTargetName->n5_code[0];
  *(_QWORD *)&this->m_kTargetName.n5_code[2] = *(_QWORD *)&rkTargetName->n5_code[2];
  this->m_kTargetName.n5_code[4] = rkTargetName->n5_code[4];
}

//----- (006FDD00) --------------------------------------------------------
void __thiscall GuildAcademyMemberVanishTask::OnStart(GuildAcademyMemberVanishTask *this)
{
  GuildAcademyMemberVanishTask *v1; // esi@1
  unsigned int v2; // eax@1
  unsigned int v3; // edx@1
  unsigned int v4; // ecx@1
  unsigned int v5; // eax@1
  unsigned int v6; // ecx@1
  char *v7; // eax@1
  char *v8; // eax@1
  MsgBox *v9; // eax@1
  char pcTargetName[21]; // [sp+4h] [bp-1Ch]@1

  v1 = this;
  v2 = this->m_kTargetName.n5_code[0];
  v3 = this->m_kTargetName.n5_code[2];
  v4 = this->m_kTargetName.n5_code[1];
  *(_DWORD *)pcTargetName = v2;
  v5 = v1->m_kTargetName.n5_code[3];
  *(_DWORD *)&pcTargetName[8] = v3;
  *(_DWORD *)&pcTargetName[4] = v4;
  v6 = v1->m_kTargetName.n5_code[4];
  *(_DWORD *)&pcTargetName[12] = v5;
  *(_DWORD *)&pcTargetName[16] = v6;
  pcTargetName[20] = 0;
  v1->m_eState = 0;
  v7 = (char *)TextData::Get(0xC1E4B8E3);
  v8 = fs(v7, pcTargetName);
  v9 = MsgBox::Modeless(MSGBOX_OKCANCEL, v8);
  v1->m_pkMsgBox = v9;
  ((void (__stdcall *)(_DWORD))v9->vfptr->SetMsgHooker)(&v1->vfptr);
}

//----- (006FDD80) --------------------------------------------------------
void __thiscall GuildAcademyMemberVanishTask::DirectMessage(GuildAcademyMemberVanishTask *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  GuildAcademyMemberVanishTask *v4; // eax@1
  unsigned int v5; // ecx@2
  IDirectMessenger *v6; // ecx@3
  unsigned int v7; // ecx@7
  unsigned int v8; // edx@7
  PROTO_NC_GUILD_MEMBER_VANISH_REQ kProto; // [sp+0h] [bp-18h]@7

  v4 = this;
  if ( iMsgTag == 27 )
  {
    v5 = this->m_kTargetName.n5_code[3];
    if ( v5 )
      v6 = (IDirectMessenger *)(v5 + 232);
    else
      v6 = 0;
    if ( pkFrom == v6 )
    {
      if ( *(_DWORD *)pvBody )
      {
        v4->m_pkMsgHooker = (IDirectMessenger *)2;
      }
      else
      {
        v4->m_kSerialTaskList.m_pkTail = (NiTListItem<NiPointer<ITask> > *)1;
        v7 = v4->m_eState;
        kProto.CharID.n5_code[0] = v4->m_kSerialTaskList.m_kAllocator.m_uiCount;
        v8 = v4->m_kTargetName.n5_code[0];
        kProto.CharID.n5_code[1] = v7;
        *(_QWORD *)&kProto.CharID.n5_code[2] = __PAIR__(v4->m_kTargetName.n5_code[1], v8);
        kProto.CharID.n5_code[4] = v4->m_kTargetName.n5_code[2];
        NetMgr::SendNetMsgWorldMgr(&g_kNetMgr, 0x26u, 0x16u, &kProto, 20);
      }
    }
  }
}

//----- (006FDE20) --------------------------------------------------------
char __thiscall GuildAcademyMemberVanishTask::OnProcessNetMsg(GuildAcademyMemberVanishTask *this, int iDepart, int iCommand, int iRevBytes, void *pvData)
{
  GuildAcademyMemberVanishTask *v5; // ebx@1
  char result; // al@3
  int v7; // edx@4
  int v8; // ecx@4
  int v9; // edx@4
  int v10; // ecx@4
  signed int v11; // eax@4
  NiUnsharedGeometryGroup *v12; // edi@8
  NiUnsharedGeometryGroup *v13; // edi@12
  NiUnsharedGeometryGroup *v14; // edi@16
  NiUnsharedGeometryGroup *v15; // edi@20
  NiUnsharedGeometryGroup *v16; // edi@24
  NiUnsharedGeometryGroup *v17; // edi@28
  NiUnsharedGeometryGroup *v18; // edi@32
  NiUnsharedGeometryGroup *v19; // edi@36
  NiUnsharedGeometryGroup *v20; // edi@40
  char *v21; // eax@44
  char *v22; // edi@44
  char acCharName[21]; // [sp+4h] [bp-1Ch]@4

  v5 = this;
  if ( iDepart == 38 && iCommand == 23 )
  {
    v7 = *((_DWORD *)pvData + 1);
    *(_DWORD *)acCharName = *(_DWORD *)pvData;
    v8 = *((_DWORD *)pvData + 2);
    *(_DWORD *)&acCharName[4] = v7;
    v9 = *((_DWORD *)pvData + 3);
    *(_DWORD *)&acCharName[8] = v8;
    v10 = *((_DWORD *)pvData + 4);
    v11 = *((_WORD *)pvData + 10);
    *(_DWORD *)&acCharName[12] = v9;
    *(_DWORD *)&acCharName[16] = v10;
    acCharName[20] = 0;
    if ( (_WORD)v11 == 6016 )
    {
      v21 = (char *)TextData::Get(0xCCEDD5FF);
      v22 = fs(v21, acCharName);
      if ( v5->m_pkMsgHooker )
      {
        ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v5->m_pkMsgHooker->vfptr->SendDirectMessage)(
          25,
          v22,
          &v5->vfptr);
        if ( v5->m_pkMsgHooker )
          ((void (__stdcall *)(signed int, char *, IDirectMessengerVtbl **))v5->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
            25,
            v22,
            &v5->vfptr);
      }
      v5->vfptr->DirectDispatchToParent((IDirectMessenger *)&v5->vfptr, 25, v22, (IDirectMessenger *)&v5->vfptr);
    }
    else if ( v11 <= 12729 )
    {
      if ( v11 == 12729 )
      {
        v20 = TextData3::Get(0xAED5B21E);
        if ( v5->m_pkMsgHooker )
        {
          ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v5->m_pkMsgHooker->vfptr->SendDirectMessage)(
            25,
            v20,
            &v5->vfptr);
          if ( v5->m_pkMsgHooker )
            ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v5->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
              25,
              v20,
              &v5->vfptr);
        }
        v5->vfptr->DirectDispatchToParent((IDirectMessenger *)&v5->vfptr, 25, v20, (IDirectMessenger *)&v5->vfptr);
      }
      else
      {
        switch ( v11 )
        {
          case 6040:
            v12 = TextData::Get(0xC34FF660);
            if ( v5->m_pkMsgHooker )
            {
              ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v5->m_pkMsgHooker->vfptr->SendDirectMessage)(
                25,
                v12,
                &v5->vfptr);
              if ( v5->m_pkMsgHooker )
                ((void (__stdcall *)(signed int, NiUnsharedGeometryGroup *, IDirectMessengerVtbl **))v5->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                  25,
                  v12,
                  &v5->vfptr);
            }
            v5->vfptr->DirectDispatchToParent((IDirectMessenger *)&v5->vfptr, 25, v12, (IDirectMessenger *)&v5->vfptr);
            break;
          case 6041:
            v13 = TextData::Get(0x76816B99u);
            if ( v5->m_pkMsgHooker )
            {
              ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v5->m_pkMsgHooker->vfptr->SendDirectMessage)(
                25,
                v13,
                &v5->vfptr);
              if ( v5->m_pkMsgHooker )
                ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v5->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                  25,
                  v13,
                  &v5->vfptr);
            }
            v5->vfptr->DirectDispatchToParent((IDirectMessenger *)&v5->vfptr, 25, v13, (IDirectMessenger *)&v5->vfptr);
            break;
          case 6042:
            v14 = TextData::Get(0xF0C3E24u);
            if ( v5->m_pkMsgHooker )
            {
              ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v5->m_pkMsgHooker->vfptr->SendDirectMessage)(
                25,
                v14,
                &v5->vfptr);
              if ( v5->m_pkMsgHooker )
                ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v5->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                  25,
                  v14,
                  &v5->vfptr);
            }
            v5->vfptr->DirectDispatchToParent((IDirectMessenger *)&v5->vfptr, 25, v14, (IDirectMessenger *)&v5->vfptr);
            break;
          case 6043:
            v15 = TextData::Get(0x84B2CBE5);
            if ( v5->m_pkMsgHooker )
            {
              ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v5->m_pkMsgHooker->vfptr->SendDirectMessage)(
                25,
                v15,
                &v5->vfptr);
              if ( v5->m_pkMsgHooker )
                ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v5->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                  25,
                  v15,
                  &v5->vfptr);
            }
            v5->vfptr->DirectDispatchToParent((IDirectMessenger *)&v5->vfptr, 25, v15, (IDirectMessenger *)&v5->vfptr);
            break;
          case 6044:
            v16 = TextData::Get(0x889B9BBA);
            if ( v5->m_pkMsgHooker )
            {
              ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v5->m_pkMsgHooker->vfptr->SendDirectMessage)(
                25,
                v16,
                &v5->vfptr);
              if ( v5->m_pkMsgHooker )
                ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v5->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                  25,
                  v16,
                  &v5->vfptr);
            }
            v5->vfptr->DirectDispatchToParent((IDirectMessenger *)&v5->vfptr, 25, v16, (IDirectMessenger *)&v5->vfptr);
            break;
          case 6045:
            v17 = TextData::Get(0xD4D93C40);
            if ( v5->m_pkMsgHooker )
            {
              ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v5->m_pkMsgHooker->vfptr->SendDirectMessage)(
                25,
                v17,
                &v5->vfptr);
              if ( v5->m_pkMsgHooker )
                ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v5->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                  25,
                  v17,
                  &v5->vfptr);
            }
            v5->vfptr->DirectDispatchToParent((IDirectMessenger *)&v5->vfptr, 25, v17, (IDirectMessenger *)&v5->vfptr);
            break;
          case 6046:
            v18 = TextData::Get(0xD4D93C40);
            if ( v5->m_pkMsgHooker )
            {
              ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v5->m_pkMsgHooker->vfptr->SendDirectMessage)(
                25,
                v18,
                &v5->vfptr);
              if ( v5->m_pkMsgHooker )
                ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v5->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                  25,
                  v18,
                  &v5->vfptr);
            }
            v5->vfptr->DirectDispatchToParent((IDirectMessenger *)&v5->vfptr, 25, v18, (IDirectMessenger *)&v5->vfptr);
            break;
          case 6047:
            v19 = TextData::Get(0xCEF8D8D4);
            if ( v5->m_pkMsgHooker )
            {
              ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v5->m_pkMsgHooker->vfptr->SendDirectMessage)(
                25,
                v19,
                &v5->vfptr);
              if ( v5->m_pkMsgHooker )
                ((void (__stdcall *)(_DWORD, _DWORD, _DWORD))v5->m_pkMsgHooker->vfptr->DirectDispatchToParent)(
                  25,
                  v19,
                  &v5->vfptr);
            }
            v5->vfptr->DirectDispatchToParent((IDirectMessenger *)&v5->vfptr, 25, v19, (IDirectMessenger *)&v5->vfptr);
            break;
          default:
            break;
        }
      }
    }
    v5->m_eTaskState = 2;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006FE1F0) --------------------------------------------------------
void GuildAcademyStorage::GuildAcademyStorage()
{
  ;
}

//----- (006FE210) --------------------------------------------------------
__int64 __cdecl GuildAcademyStorage::GetMoney()
{
  return GuildAcademyStorage::ms_i64Money;
}
// B5C2E0: using guessed type __int64 GuildAcademyStorage::ms_i64Money;

//----- (006FE220) --------------------------------------------------------
void __cdecl GuildAcademyStorage::SetMoney(__int64 i64Money)
{
  GuildAcademyStorage::ms_i64Money = i64Money;
}
// B5C2E0: using guessed type __int64 GuildAcademyStorage::ms_i64Money;

//----- (006FE240) --------------------------------------------------------
void __cdecl GuildAcademyStorage::Clear()
{
  unsigned int v0; // edi@1
  int v1; // esi@2

  v0 = 0;
  do
  {
    v1 = GuildAcademyStorage::ms_aspInv[v0];
    if ( v1 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v1 + 4)) && v1 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v1)(v1, 1);
      GuildAcademyStorage::ms_aspInv[v0] = 0;
    }
    ++v0;
  }
  while ( v0 < 72 );
  GuildAcademyStorage::ms_i64Money = 0i64;
}
// B5C2E0: using guessed type __int64 GuildAcademyStorage::ms_i64Money;
// B5C2E8: using guessed type int GuildAcademyStorage::ms_aspInv[];

//----- (006FE2A0) --------------------------------------------------------
bool __cdecl GuildAcademyStorage::IsEmpty(unsigned int uiIndex)
{
  bool result; // al@2

  if ( uiIndex < 0x48 )
    result = GuildAcademyStorage::ms_aspInv[uiIndex] == 0;
  else
    result = 0;
  return result;
}
// B5C2E8: using guessed type int GuildAcademyStorage::ms_aspInv[];

//----- (006FE2C0) --------------------------------------------------------
Item *__cdecl GuildAcademyStorage::Get(unsigned int uiIndex)
{
  Item *result; // eax@2

  if ( uiIndex < 0x48 )
    result = (Item *)GuildAcademyStorage::ms_aspInv[uiIndex];
  else
    result = 0;
  return result;
}
// B5C2E8: using guessed type int GuildAcademyStorage::ms_aspInv[];

//----- (006FE2E0) --------------------------------------------------------
void __cdecl GuildAcademyStorage::Add(Item *pkItem, unsigned int uiIndex)
{
  Item *v2; // esi@2

  if ( uiIndex < 0x48 )
  {
    v2 = (Item *)GuildAcademyStorage::ms_aspInv[uiIndex];
    if ( v2 != pkItem )
    {
      if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
      GuildAcademyStorage::ms_aspInv[uiIndex] = (int)pkItem;
      if ( pkItem )
        InterlockedIncrement((volatile LONG *)&pkItem->m_uiRefCount);
    }
  }
}
// B5C2E8: using guessed type int GuildAcademyStorage::ms_aspInv[];

//----- (006FE340) --------------------------------------------------------
void __cdecl GuildAcademyStorage::Remove(unsigned int uiIndex)
{
  int v1; // esi@2

  if ( uiIndex < 0x48 )
  {
    v1 = GuildAcademyStorage::ms_aspInv[uiIndex];
    if ( v1 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v1 + 4)) )
      {
        if ( v1 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v1)(v1, 1);
      }
      GuildAcademyStorage::ms_aspInv[uiIndex] = 0;
    }
  }
}
// B5C2E8: using guessed type int GuildAcademyStorage::ms_aspInv[];

//----- (006FE390) --------------------------------------------------------
signed int __cdecl GuildAcademyStorage::GetEmpty()
{
  signed int result; // eax@1

  result = 0;
  while ( GuildAcademyStorage::ms_aspInv[result] )
  {
    if ( (unsigned int)++result >= 0x48 )
      return -1;
  }
  return result;
}
// B5C2E8: using guessed type int GuildAcademyStorage::ms_aspInv[];

//----- (006FE3B0) --------------------------------------------------------
signed int __cdecl GuildAcademyStorage::GetInvIdxLotIsNotMax(Item *pkItem)
{
  unsigned int v1; // edi@1
  int v2; // esi@2
  unsigned int v3; // ST0C_4@4
  signed int result; // eax@6

  v1 = 0;
  do
  {
    v2 = GuildAcademyStorage::ms_aspInv[v1];
    if ( v2 )
    {
      if ( *(_WORD *)(v2 + 8) == pkItem->m_kStruct.itemid )
      {
        v3 = (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v2 + 16))(GuildAcademyStorage::ms_aspInv[v1]);
        if ( v3 > (*(int (__thiscall **)(_DWORD))(*(_DWORD *)v2 + 12))(v2) )
          return v1;
      }
    }
    ++v1;
  }
  while ( v1 < 0x48 );
  result = 0;
  while ( GuildAcademyStorage::ms_aspInv[result] )
  {
    if ( (unsigned int)++result >= 0x48 )
      return -1;
  }
  return result;
}
// B5C2E8: using guessed type int GuildAcademyStorage::ms_aspInv[];

//----- (006FE430) --------------------------------------------------------
char __cdecl GuildAcademyStorage::SetContents(PROTO_NC_GUILD_ACADEMY_REWARD_STORAGE_OPEN_ACK *pkProto)
{
  int v1; // ecx@1
  PROTO_ITEMPACKET_INFORM *v2; // edi@1
  Item *v3; // eax@3
  Item *v4; // esi@3
  int v5; // edi@7
  Item **v6; // ebx@7
  unsigned int uiBuffSize; // [sp+14h] [bp-18h]@3
  int v9; // [sp+18h] [bp-14h]@2
  char *pcBuff; // [sp+1Ch] [bp-10h]@1
  int v11; // [sp+28h] [bp-4h]@5

  GuildAcademyStorage::Clear();
  GuildAcademyStorage::ms_i64Money = pkProto->cen;
  v1 = pkProto->itemcounter;
  v2 = (PROTO_ITEMPACKET_INFORM *)&pkProto[1];
  pcBuff = (char *)&pkProto[1];
  if ( v1 )
  {
    v9 = v1;
    do
    {
      v3 = Item::Create(v2, (ITEM_INVEN *)&pkProto, &uiBuffSize);
      v4 = v3;
      if ( v3 )
        InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
      v11 = 0;
      if ( (unsigned __int16)pkProto & 0xFC00 || ((unsigned __int16)pkProto & 0x3FFu) >= 0x48 )
      {
        if ( v4 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
            v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
          v4 = 0;
        }
      }
      else
      {
        v5 = GuildAcademyStorage::ms_aspInv[(unsigned __int16)pkProto & 0x3FF];
        v6 = (Item **)(4 * ((unsigned __int16)pkProto & 0x3FF) + 11911912);
        if ( (Item *)v5 != v4 )
        {
          if ( v5 && !InterlockedDecrement((volatile LONG *)(v5 + 4)) && v5 )
            (**(void (__thiscall ***)(_DWORD, _DWORD))v5)(v5, 1);
          *v6 = v4;
          if ( v4 )
            InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
        }
      }
      v2 = (PROTO_ITEMPACKET_INFORM *)&pcBuff[uiBuffSize];
      v11 = -1;
      pcBuff += uiBuffSize;
      if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      --v9;
    }
    while ( v9 );
  }
  return 1;
}
// B5C2E0: using guessed type __int64 GuildAcademyStorage::ms_i64Money;
// B5C2E8: using guessed type int GuildAcademyStorage::ms_aspInv[];

//----- (006FE580) --------------------------------------------------------
char __thiscall RaidInfo::SetItemLootingType(RaidInfo *this, char nItemGrade, char nItemLooting)
{
  char result; // al@3

  if ( (unsigned __int8)nItemLooting >= 4u || (unsigned __int8)nItemGrade >= 4u )
  {
    result = 0;
  }
  else
  {
    this->m_eItemType = (unsigned __int8)nItemGrade;
    this->m_eLootType = (unsigned __int8)nItemLooting;
    result = 1;
  }
  return result;
}

//----- (006FE5B0) --------------------------------------------------------
bool __thiscall RaidInfo::IsMeRaidMember(RaidInfo *this)
{
  return this->m_uiTotalMemberOnRaid != 0;
}

//----- (006FE5C0) --------------------------------------------------------
void __thiscall RaidInfo::SetBelongType(RaidInfo *this, int iType)
{
  this->m_iBelongType = iType;
}

//----- (006FE5D0) --------------------------------------------------------
int __thiscall RaidInfo::GetBelongType(RaidInfo *this)
{
  return this->m_iBelongType;
}

//----- (006FE5E0) --------------------------------------------------------
Char *__thiscall RaidInfo::GetCharByIndex(RaidInfo *this, unsigned int uiIdx)
{
  unsigned int v2; // edx@1
  unsigned int v3; // edi@1
  char *v4; // esi@3
  unsigned int v5; // edx@3
  Name5 *v6; // eax@4
  unsigned int v7; // ecx@4
  unsigned int v8; // edx@4
  int v9; // ecx@4
  int v10; // esi@4
  Char *result; // eax@5
  _BYTE v12[20]; // ST00_20@6
  Name5 kCharID; // [sp+8h] [bp-14h]@4

  v2 = uiIdx / 5;
  v3 = uiIdx % 5;
  if ( uiIdx / 5 >= 4
    || v3 >= 5
    || (v4 = (char *)&this->m_MemberInfo[v2],
        v5 = (signed int)((unsigned __int64)(2021161081i64
                                           * ((unsigned int)this->m_MemberInfo[v2]._Mylast - *(_DWORD *)v4)) >> 32) >> 5,
        v3 >= v5 + (v5 >> 31)) )
  {
    result = 0;
  }
  else
  {
    v6 = User::GetMainCharID(&g_kUser);
    v7 = v6->n5_code[1];
    kCharID.n5_code[0] = v6->n5_code[0];
    v8 = v6->n5_code[2];
    kCharID.n5_code[1] = v7;
    *(_QWORD *)&kCharID.n5_code[2] = __PAIR__(v6->n5_code[3], v8);
    v9 = *(_DWORD *)v4;
    kCharID.n5_code[4] = v6->n5_code[4];
    v10 = v9 + 68 * v3;
    if ( Name5::operator==((Name5 *)(v9 + 68 * v3), &kCharID) )
    {
      result = g_pkMainChar;
    }
    else
    {
      *(_DWORD *)v12 = *(_DWORD *)v10;
      *(_QWORD *)&v12[4] = *(_QWORD *)(v10 + 4);
      *(_QWORD *)&v12[12] = *(_QWORD *)(v10 + 12);
      result = CharMgr::GetChar(&g_kCharMgr, *(Name5 *)v12);
    }
  }
  return result;
}

//----- (006FE6C0) --------------------------------------------------------
char __thiscall RaidInfo::MemberInfomUpdate(RaidInfo *this, PROTO_NC_RAID_MEMBERINFORM_CMD *p)
{
  unsigned int v2; // eax@1
  unsigned int v3; // esi@1
  unsigned int v4; // eax@3
  signed int v5; // edx@3
  char *v6; // ecx@3
  int v7; // eax@4
  char result; // al@4

  v2 = p->nPartyIndex;
  v3 = p->nSlotIndex;
  if ( v2 > 4
    || v3 > 5
    || (v4 = v2,
        v5 = (char *)this->m_MemberInfo[4 * v4 / 0x10]._Mylast - (char *)this->m_MemberInfo[4 * v4 / 0x10]._Myfirst,
        v6 = (char *)&this->m_MemberInfo[4 * v4 / 0x10],
        v5 / 68 <= v3) )
  {
    result = 0;
  }
  else
  {
    v7 = 68 * v3;
    *(_DWORD *)(v7 + *(_DWORD *)v6 + 28) = p->hp;
    *(_DWORD *)(v7 + *(_DWORD *)v6 + 32) = p->sp;
    *(_BYTE *)(v7 + *(_DWORD *)v6 + 64) = 1;
    *(_DWORD *)(v7 + *(_DWORD *)v6 + 44) = p->lp;
    result = 1;
  }
  return result;
}

//----- (006FE750) --------------------------------------------------------
void __thiscall RaidInfo::ChangeRaidLooter(RaidInfo *this, Name5 kCharID)
{
  RaidInfo *v2; // esi@1
  Name5 *v3; // eax@1

  v2 = this;
  v3 = User::GetMainCharID(&g_kUser);
  v2->m_bIsMeRaidLooter = *(_QWORD *)&kCharID.n5_name[0] == *(_QWORD *)&v3->n5_code[0]
                       && *(_QWORD *)&kCharID.n5_code[2] == *(_QWORD *)&v3->n5_code[2]
                       && kCharID.n5_code[4] == v3->n5_code[4];
  v2->m_kRaidLooterID.n5_code[0] = kCharID.n5_code[0];
  v2->m_kRaidLooterID.n5_code[3] = kCharID.n5_code[3];
  *(_QWORD *)&v2->m_kRaidLooterID.n5_code[1] = *(_QWORD *)&kCharID.n5_code[1];
  v2->m_kRaidLooterID.n5_code[4] = kCharID.n5_code[4];
}

//----- (006FE7B0) --------------------------------------------------------
void __thiscall RaidInfo::ChangeRaidLeader(RaidInfo *this, Name5 kCharID)
{
  RaidInfo *v2; // esi@1
  Name5 *v3; // eax@1

  v2 = this;
  v3 = User::GetMainCharID(&g_kUser);
  v2->m_bIsMeRaidLeader = *(_QWORD *)&kCharID.n5_name[0] == *(_QWORD *)&v3->n5_code[0]
                       && *(_QWORD *)&kCharID.n5_code[2] == *(_QWORD *)&v3->n5_code[2]
                       && kCharID.n5_code[4] == v3->n5_code[4];
  v2->m_kRaidLeaderID.n5_code[0] = kCharID.n5_code[0];
  v2->m_kRaidLeaderID.n5_code[3] = kCharID.n5_code[3];
  *(_QWORD *)&v2->m_kRaidLeaderID.n5_code[1] = *(_QWORD *)&kCharID.n5_code[1];
  v2->m_kRaidLeaderID.n5_code[4] = kCharID.n5_code[4];
}

//----- (006FE810) --------------------------------------------------------
void __stdcall RaidInfo::ResetMemberInfo(RaidMemberInfo *pkMember)
{
  *(_QWORD *)&pkMember->m_kCharID.n5_code[3] = 0i64;
  *(_QWORD *)&pkMember->m_kCharID.n5_code[1] = 0i64;
  pkMember->m_kCharID.n5_code[0] = 0;
  strncpy(pkMember->m_kCharID.n5_name, &byte_9C7A18, 0x14u);
  pkMember->m_fX = 0.0;
  pkMember->m_byChrClass = 0;
  pkMember->m_fY = 0.0;
  pkMember->m_iLv = 0;
  pkMember->m_iHP = 0;
  pkMember->m_iSP = 0;
  pkMember->m_iMaxHP = 0;
  pkMember->m_iMaxSP = 0;
  pkMember->m_bShow = 0;
  pkMember->m_iLP = 0;
  pkMember->m_iMaxLP = 0;
}

//----- (006FE870) --------------------------------------------------------
RaidMemberInfo *__thiscall RaidInfo::GetRaidMemberInfo(RaidInfo *this, Name5 kCharID)
{
  RaidMemberInfo *result; // eax@2
  signed int v3; // ebx@3
  char *v4; // edi@3
  unsigned int v5; // edx@4
  bool v6; // zf@4
  unsigned int v7; // esi@4
  unsigned int v8; // edx@4
  int v9; // eax@5

  if ( this->m_uiTotalMemberOnRaid )
  {
    v3 = 0;
    v4 = (char *)this->m_MemberInfo;
    while ( 1 )
    {
      v5 = (signed int)((unsigned __int64)(2021161081i64 * (*((_DWORD *)v4 + 1) - *(_DWORD *)v4)) >> 32) >> 5;
      v6 = v5 + (v5 >> 31) == 0;
      v7 = v5 + (v5 >> 31);
      v8 = 0;
      if ( !v6 )
        break;
LABEL_10:
      ++v3;
      v4 += 16;
      if ( v3 >= 4 )
        return 0;
    }
    v9 = *(_DWORD *)v4;
    while ( *(_QWORD *)v9 != *(_QWORD *)&kCharID.n5_name[0]
         || *(_QWORD *)(v9 + 8) != *(_QWORD *)&kCharID.n5_code[2]
         || *(_DWORD *)(v9 + 16) != kCharID.n5_code[4] )
    {
      ++v8;
      v9 += 68;
      if ( v8 >= v7 )
        goto LABEL_10;
    }
    result = &this->m_MemberInfo[v3]._Myfirst[v8];
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (006FE920) --------------------------------------------------------
char __thiscall RaidInfo::MemberLoginInfo(RaidInfo *this, Name5 kCharID, unsigned int partyIdx, unsigned int slotIdx, bool IsLogin)
{
  char *v5; // esi@1
  char result; // al@2
  unsigned int v7; // eax@3

  v5 = (char *)&this->m_MemberInfo[partyIdx];
  if ( ((signed int)this->m_MemberInfo[partyIdx]._Mylast - *(_DWORD *)v5) / 68 <= slotIdx
    || (v7 = *(_DWORD *)v5 + 68 * slotIdx, *(_DWORD *)v7 != kCharID.n5_code[0])
    || *(_QWORD *)(v7 + 4) != *(_QWORD *)&kCharID.n5_code[1]
    || *(_QWORD *)(v7 + 12) != *(_QWORD *)&kCharID.n5_code[3] )
  {
    result = 0;
  }
  else
  {
    *(_BYTE *)(v7 + 20) = IsLogin != 0;
    result = 1;
  }
  return result;
}

//----- (006FE9A0) --------------------------------------------------------
RaidMemberInfo *__thiscall RaidInfo::GetRaidMemberInfoByIndex(RaidInfo *this, unsigned int uiIdx)
{
  unsigned int v2; // edx@1
  unsigned int v3; // edi@1
  char *v4; // esi@3
  unsigned int v5; // edx@3
  RaidMemberInfo *result; // eax@4

  v2 = uiIdx / 5;
  v3 = uiIdx % 5;
  if ( uiIdx / 5 >= 4
    || v3 >= 5
    || (v4 = (char *)&this->m_MemberInfo[v2],
        v5 = (signed int)((unsigned __int64)(2021161081i64
                                           * ((unsigned int)this->m_MemberInfo[v2]._Mylast - *(_DWORD *)v4)) >> 32) >> 5,
        v3 >= v5 + (v5 >> 31)) )
  {
    result = 0;
  }
  else
  {
    result = (RaidMemberInfo *)(*(_DWORD *)v4 + 68 * v3);
  }
  return result;
}

//----- (006FEA00) --------------------------------------------------------
void __thiscall RaidInfo::FindIndexByName(RaidInfo *this, char *strName, unsigned int *PatryIdx, unsigned int *slotIndex)
{
  unsigned int v4; // ecx@1
  unsigned int v5; // edx@2
  unsigned int v6; // esi@2
  RaidMemberInfo **v7; // edi@4
  unsigned int v8; // edx@4
  int v9; // eax@5
  int v10; // edx@6
  int v11; // eax@6
  RaidInfo *v12; // [sp+Ch] [bp-28h]@1
  char acstr[21]; // [sp+18h] [bp-1Ch]@6

  v12 = this;
  v4 = 0;
  while ( 1 )
  {
    v5 = v4 / 5;
    v6 = v4 % 5;
    if ( v4 / 5 < 4 && v6 < 5 )
    {
      v7 = &v12->m_MemberInfo[v5]._Myfirst;
      v8 = (signed int)((unsigned __int64)(2021161081i64
                                         * (unsigned int)((char *)v12->m_MemberInfo[v5]._Mylast - (char *)*v7)) >> 32) >> 5;
      if ( v6 < v8 + (v8 >> 31) )
      {
        v9 = (int)&(*v7)[v6];
        if ( v9 )
        {
          *(_DWORD *)acstr = *(_DWORD *)v9;
          *(_DWORD *)&acstr[4] = *(_DWORD *)(v9 + 4);
          *(_DWORD *)&acstr[8] = *(_DWORD *)(v9 + 8);
          v10 = *(_DWORD *)(v9 + 12);
          v11 = *(_DWORD *)(v9 + 16);
          *(_DWORD *)&acstr[12] = v10;
          *(_DWORD *)&acstr[16] = v11;
          acstr[20] = 0;
          if ( !strcmp(acstr, strName) )
            break;
        }
      }
    }
    if ( ++v4 >= 0x14 )
      return;
  }
  *PatryIdx = v4 / 5;
  *slotIndex = v4 % 5;
}

//----- (006FEB20) --------------------------------------------------------
bool __thiscall RaidInfo::IsLeader(RaidInfo *this, Name5 kCharID)
{
  return *(_QWORD *)&this->m_kRaidLeaderID.n5_name[0] == *(_QWORD *)&kCharID.n5_name[0]
      && *(_QWORD *)&this->m_kRaidLeaderID.n5_code[2] == *(_QWORD *)&kCharID.n5_code[2]
      && this->m_kRaidLeaderID.n5_code[4] == kCharID.n5_code[4];
}

//----- (006FEB60) --------------------------------------------------------
bool __thiscall RaidInfo::IsLooter(RaidInfo *this, Name5 kCharID)
{
  return *(_QWORD *)&this->m_kRaidLooterID.n5_name[0] == *(_QWORD *)&kCharID.n5_name[0]
      && *(_QWORD *)&this->m_kRaidLooterID.n5_code[2] == *(_QWORD *)&kCharID.n5_code[2]
      && this->m_kRaidLooterID.n5_code[4] == kCharID.n5_code[4];
}

//----- (006FEBA0) --------------------------------------------------------
char __thiscall RaidInfo::IsSubLeader(RaidInfo *this, Name5 kCharID)
{
  unsigned int v2; // edx@1
  unsigned int v3; // edi@1
  unsigned int v4; // esi@1
  Name5 *v5; // eax@2
  char result; // al@7

  v2 = (signed int)((unsigned __int64)(1717986919i64
                                     * (unsigned int)((char *)this->m_SubLeaderList._Mylast
                                                    - (char *)this->m_SubLeaderList._Myfirst)) >> 32) >> 3;
  v3 = 0;
  v4 = v2 + (v2 >> 31);
  if ( v4 )
  {
    v5 = this->m_SubLeaderList._Myfirst;
    while ( *(_QWORD *)&v5->n5_code[0] != *(_QWORD *)&kCharID.n5_name[0]
         || *(_QWORD *)&v5->n5_code[2] != *(_QWORD *)&kCharID.n5_code[2]
         || v5->n5_code[4] != kCharID.n5_code[4] )
    {
      ++v3;
      ++v5;
      if ( v3 >= v4 )
        goto LABEL_7;
    }
    result = 1;
  }
  else
  {
LABEL_7:
    result = 0;
  }
  return result;
}

//----- (006FEC10) --------------------------------------------------------
void __thiscall RaidInfo::ChangeUserName(RaidInfo *this, Name5 *OldName, Name5 *NewName)
{
  RaidInfo *v3; // esi@1
  _BYTE v4[20]; // ST00_20@1
  RaidMemberInfo *v5; // eax@1

  v3 = this;
  *(_DWORD *)v4 = OldName->n5_code[0];
  *(_QWORD *)&v4[4] = *(_QWORD *)&OldName->n5_code[1];
  *(_QWORD *)&v4[12] = *(_QWORD *)&OldName->n5_code[3];
  v5 = RaidInfo::GetRaidMemberInfo(this, *(Name5 *)v4);
  if ( v5 )
  {
    *(_QWORD *)&v5->m_kCharID.n5_name[0] = *(_QWORD *)&NewName->n5_code[0];
    *(_QWORD *)&v5->m_kCharID.n5_code[2] = *(_QWORD *)&NewName->n5_code[2];
    v5->m_kCharID.n5_code[4] = NewName->n5_code[4];
  }
  if ( v3->m_kRaidLooterID.n5_code[0] == OldName->n5_code[0]
    && v3->m_kRaidLooterID.n5_code[1] == OldName->n5_code[1]
    && v3->m_kRaidLooterID.n5_code[2] == OldName->n5_code[2]
    && v3->m_kRaidLooterID.n5_code[3] == OldName->n5_code[3]
    && v3->m_kRaidLooterID.n5_code[4] == OldName->n5_code[4] )
  {
    *(_QWORD *)&v3->m_kRaidLooterID.n5_name[0] = *(_QWORD *)&NewName->n5_code[0];
    *(_QWORD *)&v3->m_kRaidLooterID.n5_code[2] = *(_QWORD *)&NewName->n5_code[2];
    v3->m_kRaidLooterID.n5_code[4] = NewName->n5_code[4];
  }
  if ( v3->m_kJoinProposeCharID.n5_code[0] == OldName->n5_code[0]
    && v3->m_kJoinProposeCharID.n5_code[1] == OldName->n5_code[1]
    && v3->m_kJoinProposeCharID.n5_code[2] == OldName->n5_code[2]
    && v3->m_kJoinProposeCharID.n5_code[3] == OldName->n5_code[3]
    && v3->m_kJoinProposeCharID.n5_code[4] == OldName->n5_code[4] )
  {
    *(_QWORD *)&v3->m_kJoinProposeCharID.n5_name[0] = *(_QWORD *)&NewName->n5_code[0];
    *(_QWORD *)&v3->m_kJoinProposeCharID.n5_code[2] = *(_QWORD *)&NewName->n5_code[2];
    v3->m_kJoinProposeCharID.n5_code[4] = NewName->n5_code[4];
  }
}

//----- (006FED00) --------------------------------------------------------
char __thiscall RaidInfo::AddMember(RaidInfo *this, PROTO_NC_RAID_MEMBER_JOIN_BROAD_CMD *p)
{
  int v3; // eax@3
  char v4; // dl@3
  unsigned __int16 v5; // di@5
  std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *v6; // edi@8
  unsigned int v7; // eax@9
  unsigned int v8; // ecx@9
  unsigned int v9; // edx@9
  Name5 *v10; // eax@9
  int v11; // esi@14
  RaidMemberInfo *v12; // ebx@14
  Name5 *v13; // ebx@15
  Name5 *v14; // eax@15
  RaidInfo *v15; // [sp+8h] [bp-4Ch]@1
  RaidMemberInfo kMemberInfo; // [sp+Ch] [bp-48h]@9

  v15 = this;
  if ( !p )
    return 0;
  LOBYTE(v3) = p->nPartyIndex;
  v4 = p->nSlotIndex;
  if ( (unsigned __int8)v3 > 5u || (unsigned __int8)v4 > 5u )
    return 0;
  v3 = (unsigned __int8)v3;
  v5 = this->m_PartyInfo[(unsigned __int8)v3].nPartyNo;
  if ( v5 != -1 )
  {
    if ( v5 == p->nPartyNo )
      goto LABEL_8;
    return 0;
  }
  if ( v4 )
    return 0;
  this->m_PartyInfo[v3].nPartyNo = p->nPartyNo;
LABEL_8:
  this->m_PartyInfo[v3].nPartyIndex = p->nPartyIndex;
  v6 = &this->m_MemberInfo[v3];
  if ( this->m_MemberInfo[v3]._Mylast - v6->_Myfirst > (unsigned int)(unsigned __int8)v4 )
  {
    v11 = (unsigned __int8)v4;
    v12 = &v6->_Myfirst[(unsigned __int8)v4];
    if ( Name5::operator!=(&v12->m_kCharID, &p->sCharID) )
    {
      RaidInfo::ResetMemberInfo(v12);
      Name5::operator=(&v6->_Myfirst[v11].m_kCharID, &p->sCharID);
      v13 = &v6->_Myfirst[v11].m_kCharID;
      v14 = User::GetMainCharID(&g_kUser);
      if ( Name5::operator==(v13, v14) )
        v6->_Myfirst[v11].m_bShow = 1;
      v6->_Myfirst[v11].m_ucStatus = 1;
    }
  }
  else
  {
    *(_QWORD *)&kMemberInfo.m_kCharID.n5_code[3] = 0i64;
    *(_QWORD *)&kMemberInfo.m_kCharID.n5_code[1] = 0i64;
    kMemberInfo.m_kCharID.n5_code[0] = 0;
    RaidInfo::ResetMemberInfo(&kMemberInfo);
    v7 = p->sCharID.n5_code[1];
    v8 = p->sCharID.n5_code[2];
    kMemberInfo.m_kCharID.n5_code[0] = p->sCharID.n5_code[0];
    v9 = p->sCharID.n5_code[3];
    *(_QWORD *)&kMemberInfo.m_kCharID.n5_code[1] = __PAIR__(v8, v7);
    *(_QWORD *)&kMemberInfo.m_kCharID.n5_code[3] = __PAIR__(p->sCharID.n5_code[4], v9);
    v10 = User::GetMainCharID(&g_kUser);
    if ( Name5::operator==(&kMemberInfo.m_kCharID, v10) )
      kMemberInfo.m_bShow = 1;
    kMemberInfo.m_ucStatus = 1;
    std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::push_back(v6, &kMemberInfo);
  }
  ++v15->m_uiTotalMemberOnRaid;
  return 1;
}

//----- (006FEEA0) --------------------------------------------------------
char __thiscall RaidInfo::Replace(RaidInfo *this, PROTO_NC_RAID_SLOT_MOVE_BROAD_CMD *p)
{
  unsigned int v2; // ebx@1
  unsigned int v3; // esi@1
  unsigned int v4; // edi@1
  RaidInfo *v5; // edx@1
  unsigned int v6; // ecx@1
  unsigned int v7; // edi@6
  std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *v8; // ebx@6
  unsigned int v9; // edx@6
  unsigned int v10; // edi@6
  RaidMemberInfo *v11; // eax@8
  unsigned int v12; // ebx@12
  std::_Vector_const_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo> > > v13; // edi@14
  std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *v14; // eax@17
  RaidMemberInfo *v15; // ecx@17
  unsigned int v16; // ecx@17
  char *v17; // ebx@17
  unsigned int v18; // eax@17
  RaidMemberInfo *v19; // eax@19
  RaidMemberInfo *v20; // edi@21
  std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *v21; // ebx@25
  RaidMemberInfo *v22; // eax@25
  unsigned int v23; // edi@31
  RaidMemberInfo *v24; // edx@31
  RaidMemberInfo *v25; // eax@31
  char *v26; // eax@34
  RaidInfo *v27; // esi@34
  RaidMemberInfo PostSlot; // [sp+Ch] [bp-A0h]@12
  RaidInfo *v30; // [sp+50h] [bp-5Ch]@1
  unsigned int uiPostSlotIdx; // [sp+54h] [bp-58h]@1
  std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *v32; // [sp+58h] [bp-54h]@6
  unsigned int slotIdx; // [sp+5Ch] [bp-50h]@1
  unsigned int ToGroupNum; // [sp+60h] [bp-4Ch]@6
  RaidMemberInfo kMember; // [sp+64h] [bp-48h]@7

  v2 = p->PostPosition.nPartyIndex;
  v3 = p->PrePosition.nSlotIndex;
  v4 = p->PrePosition.nPartyIndex;
  v5 = this;
  v6 = p->PostPosition.nSlotIndex;
  v30 = v5;
  slotIdx = v2;
  uiPostSlotIdx = v6;
  if ( v4 > 4 || v3 > 5 || v2 > 4 || v6 > 5 )
    return 0;
  if ( v4 != v2 )
  {
    v14 = &v5->m_MemberInfo[v4];
    v15 = v5->m_MemberInfo[v4]._Mylast;
    v32 = v14;
    v16 = v15 - v14->_Myfirst;
    v17 = (char *)&v30->m_MemberInfo[v2];
    v18 = (*((_DWORD *)v17 + 1) - *(_DWORD *)v17) / 68;
    if ( v3 >= v16 )
    {
      v3 = uiPostSlotIdx;
      if ( uiPostSlotIdx >= v18 )
        return 0;
      ToGroupNum = v4;
      v4 = slotIdx;
    }
    else
    {
      if ( uiPostSlotIdx < v18 )
      {
        *(_QWORD *)&kMember.m_kCharID.n5_code[3] = 0i64;
        *(_QWORD *)&kMember.m_kCharID.n5_code[1] = 0i64;
        kMember.m_kCharID.n5_code[0] = 0;
        v19 = v32->_Mylast;
        if ( v32->_Myfirst == v19 )
          goto LABEL_38;
        if ( *(_DWORD *)v17 != *((_DWORD *)v17 + 1) )
        {
          v20 = &v32->_Myfirst[v3];
          RaidMemberInfo::operator=(&kMember, v20);
          RaidMemberInfo::operator=(v20, (RaidMemberInfo *)(68 * uiPostSlotIdx + *(_DWORD *)v17));
          RaidMemberInfo::operator=((RaidMemberInfo *)(68 * uiPostSlotIdx + *(_DWORD *)v17), &kMember);
LABEL_34:
          v26 = (char *)((int (*)(void))g_pkMainChar->vfptr[2].DeleteAbStateByAbstateIndex)();
          v27 = v30;
          RaidInfo::FindIndexByName(v30, v26, &ToGroupNum, &slotIdx);
          v27->m_uiMePartyIdx = ToGroupNum;
          return 1;
        }
        if ( v32->_Myfirst != v19 )
        {
          ToGroupNum = slotIdx;
        }
        else
        {
LABEL_38:
          v3 = uiPostSlotIdx;
          ToGroupNum = v4;
          v4 = slotIdx;
        }
        v21 = &v30->m_MemberInfo[v4];
        RaidMemberInfo::operator=(&kMember, &v21->_Myfirst[v3]);
        v22 = v32->_Myfirst;
        if ( v3 )
          v22 += v3;
        std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::erase(
          v21,
          (std::_Vector_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo> > > *)&slotIdx,
          (std::_Vector_const_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo> > >)v22);
        std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::push_back(&v30->m_MemberInfo[ToGroupNum], &kMember);
        goto LABEL_34;
      }
      ToGroupNum = slotIdx;
    }
    v23 = v4;
    v24 = v30->m_MemberInfo[4 * v23 / 0x10]._Myfirst;
    *(_QWORD *)&kMember.m_kCharID.n5_code[3] = 0i64;
    *(_QWORD *)&kMember.m_kCharID.n5_code[1] = 0i64;
    kMember.m_kCharID.n5_code[0] = 0;
    RaidMemberInfo::operator=(&kMember, &v24[v3]);
    v25 = v32->_Myfirst;
    if ( v3 )
      v25 += v3;
    std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::erase(
      &v30->m_MemberInfo[4 * v23 / 0x10],
      (std::_Vector_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo> > > *)&slotIdx,
      (std::_Vector_const_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo> > >)v25);
    std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::push_back(&v30->m_MemberInfo[ToGroupNum], &kMember);
    goto LABEL_34;
  }
  v7 = (unsigned int)v5 + 16 * v4;
  v8 = (std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *)(v7 + 132);
  v9 = (signed int)((unsigned __int64)(2021161081i64 * (*(_DWORD *)(v7 + 136) - *(_DWORD *)(v7 + 132))) >> 32) >> 5;
  ToGroupNum = v7;
  v10 = v9 + (v9 >> 31);
  v32 = v8;
  if ( v3 < v10 )
  {
    *(_QWORD *)&kMember.m_kCharID.n5_code[3] = 0i64;
    *(_QWORD *)&kMember.m_kCharID.n5_code[1] = 0i64;
    kMember.m_kCharID.n5_code[0] = 0;
    slotIdx = (unsigned int)&v8->_Myfirst[v3];
    RaidMemberInfo::operator=(&kMember, (RaidMemberInfo *)slotIdx);
    if ( uiPostSlotIdx < v10 )
    {
      v12 = uiPostSlotIdx;
      qmemcpy(&PostSlot, &v32->_Myfirst[uiPostSlotIdx], sizeof(PostSlot));
      RaidMemberInfo::operator=((RaidMemberInfo *)slotIdx, &PostSlot);
      RaidMemberInfo::operator=(&v32->_Myfirst[v12], &kMember);
    }
    else
    {
      v11 = v32->_Myfirst;
      if ( v3 )
        v11 += v3;
      if ( v11 != *(RaidMemberInfo **)(ToGroupNum + 136) )
      {
        std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::erase(
          v32,
          (std::_Vector_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo> > > *)&ToGroupNum,
          (std::_Vector_const_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo> > >)v11);
        std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::push_back(v32, &kMember);
      }
    }
    goto LABEL_34;
  }
  if ( v6 < v10 )
  {
    v13._Ptr = v8->_Myfirst;
    *(_QWORD *)&kMember.m_kCharID.n5_code[3] = 0i64;
    *(_QWORD *)&kMember.m_kCharID.n5_code[1] = 0i64;
    kMember.m_kCharID.n5_code[0] = 0;
    RaidMemberInfo::operator=(&kMember, &v13._Ptr[v3]);
    if ( uiPostSlotIdx )
      v13._Ptr += uiPostSlotIdx;
    std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::erase(
      v8,
      (std::_Vector_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo> > > *)&ToGroupNum,
      v13);
    std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::push_back(v8, &kMember);
    goto LABEL_34;
  }
  return 0;
}

//----- (006FF240) --------------------------------------------------------
char __thiscall RaidInfo::ConvertPartyToRaid(RaidInfo *this, PROTO_NC_RAID_MAKE_BROAD_CMD *p)
{
  RaidInfo *v2; // esi@1
  signed int v3; // eax@1
  char *v4; // ecx@1
  char *v5; // edx@1
  __int16 v6; // bx@2
  _BYTE v8[20]; // ST00_20@5
  char *v9; // edi@6
  std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *v10; // ebx@6
  _BYTE v11[20]; // ST00_20@8
  PartyMemberInfo *v12; // eax@8
  Name5 *v13; // eax@11
  Name5 *v14; // eax@17
  Name5 *v15; // eax@22
  unsigned int v16; // ecx@22
  unsigned int v17; // edx@22
  int v18; // eax@22
  unsigned int v19; // ecx@22
  bool v20; // cf@22
  unsigned int v21; // edx@25
  int v22; // esi@25
  RaidMemberInfo *v23; // esi@27
  RaidMemberInfo *v24; // eax@27
  _BYTE v25[20]; // ST00_20@29
  PartyMemberInfo *v26; // eax@29
  char v27; // cl@30
  char v28; // dl@30
  double v29; // st7@30
  int v30; // ecx@30
  int v31; // edx@30
  int v32; // ecx@30
  int v33; // edx@30
  int v34; // ecx@30
  unsigned int v35; // edx@30
  int v36; // edx@30
  int v37; // eax@30
  unsigned int i; // [sp+Ch] [bp-58h]@5
  RaidInfo *v39; // [sp+10h] [bp-54h]@1
  int v40; // [sp+14h] [bp-50h]@6
  char *v41; // [sp+18h] [bp-4Ch]@6
  RaidMemberInfo kRaidMemberInfo; // [sp+1Ch] [bp-48h]@5

  v2 = this;
  v39 = this;
  v3 = 0;
  v4 = &this->m_PartyInfo[0].nPartyIndex;
  v5 = (char *)p->nRaidPartyNo;
  do
  {
    v6 = *(_WORD *)v5;
    *v4 = v3;
    *((_WORD *)v4 - 1) = v6;
    ++v3;
    v5 += 2;
    v4 += 4;
  }
  while ( v3 < 4 );
  if ( !g_kParty.m_uiTotalMember )
    return 0;
  *(_DWORD *)v8 = v2->m_kRaidLeaderID.n5_code[0];
  *(_QWORD *)&v8[4] = *(_QWORD *)&v2->m_kRaidLeaderID.n5_code[1];
  *(_QWORD *)&v8[12] = *(_QWORD *)&v2->m_kRaidLeaderID.n5_code[3];
  Party::GetMemberInfo(&g_kParty, *(Name5 *)v8);
  *(_QWORD *)&kRaidMemberInfo.m_kCharID.n5_code[3] = 0i64;
  *(_QWORD *)&kRaidMemberInfo.m_kCharID.n5_code[1] = 0i64;
  kRaidMemberInfo.m_kCharID.n5_code[0] = 0;
  i = 0;
  if ( g_kParty.m_uiTotalMember != -1 )
  {
    v9 = &p->sFirstPartyCharID[0].n5_name[8];
    v10 = v2->m_MemberInfo;
    v40 = 0;
    v41 = &p->sFirstPartyCharID[0].n5_name[8];
    do
    {
      if ( v10->_Mylast - v10->_Myfirst > i )
      {
        *(_DWORD *)v11 = *((_DWORD *)v9 - 2);
        *(_DWORD *)&v11[4] = *((_DWORD *)v9 - 1);
        *(_DWORD *)&v11[8] = *(_DWORD *)v9;
        *(_QWORD *)&v11[12] = *(_QWORD *)(v9 + 4);
        v12 = Party::GetMemberInfo(&g_kParty, *(Name5 *)v11);
        if ( v12 )
        {
          v10->_Myfirst[v40].m_ucStatus = v12->m_ucStatus;
          if ( !v10->_Myfirst[v40].m_ucStatus )
            v10->_Myfirst[v40].m_bShow = 0;
        }
        else
        {
          v13 = User::GetMainCharID(&g_kUser);
          if ( *((_DWORD *)v9 - 2) == v13->n5_code[0]
            && *((_DWORD *)v9 - 1) == v13->n5_code[1]
            && *(_DWORD *)v9 == v13->n5_code[2]
            && *((_DWORD *)v9 + 1) == v13->n5_code[3]
            && *((_DWORD *)v9 + 2) == v13->n5_code[4] )
          {
            v10->_Myfirst[v40].m_ucStatus = 1;
          }
        }
        goto LABEL_38;
      }
      v14 = User::GetMainCharID(&g_kUser);
      if ( *((_DWORD *)v9 - 2) != v14->n5_code[0]
        || *((_DWORD *)v9 - 1) != v14->n5_code[1]
        || *(_DWORD *)v9 != v14->n5_code[2]
        || *((_DWORD *)v9 + 1) != v14->n5_code[3]
        || *((_DWORD *)v9 + 2) != v14->n5_code[4] )
      {
        *(_DWORD *)v25 = *((_DWORD *)v9 - 2);
        *(_DWORD *)&v25[4] = *((_DWORD *)v9 - 1);
        *(_DWORD *)&v25[8] = *(_DWORD *)v9;
        *(_QWORD *)&v25[12] = *(_QWORD *)(v9 + 4);
        v26 = Party::GetMemberInfo(&g_kParty, *(Name5 *)v25);
        if ( !v26 )
          return 0;
        v27 = v26->m_byChrClass;
        v28 = v26->m_ucStatus;
        kRaidMemberInfo.m_fX = v26->m_fX;
        v29 = v26->m_fY;
        kRaidMemberInfo.m_byChrClass = v27;
        v30 = v26->m_iLv;
        kRaidMemberInfo.m_fY = v29;
        kRaidMemberInfo.m_ucStatus = v28;
        v31 = v26->m_iHP;
        kRaidMemberInfo.m_iLv = v30;
        v32 = v26->m_iSP;
        kRaidMemberInfo.m_iHP = v31;
        v33 = v26->m_iMaxHP;
        kRaidMemberInfo.m_iSP = v32;
        v34 = v26->m_iMaxSP;
        kRaidMemberInfo.m_iMaxHP = v33;
        v35 = v26->m_kCharID.n5_code[0];
        kRaidMemberInfo.m_iMaxSP = v34;
        *(_QWORD *)&kRaidMemberInfo.m_kCharID.n5_name[0] = __PAIR__(v26->m_kCharID.n5_code[1], v35);
        *(_QWORD *)&kRaidMemberInfo.m_kCharID.n5_code[2] = *(_QWORD *)&v26->m_kCharID.n5_code[2];
        LOBYTE(v34) = v26->m_bShow;
        kRaidMemberInfo.m_kCharID.n5_code[4] = v26->m_kCharID.n5_code[4];
        v36 = v26->m_iLP;
        v37 = v26->m_iMaxLP;
        kRaidMemberInfo.m_bShow = v34;
        v19 = (unsigned int)v10->_Mylast;
        kRaidMemberInfo.m_iLP = v36;
        kRaidMemberInfo.m_iMaxLP = v37;
        v20 = (unsigned int)&kRaidMemberInfo < v19;
      }
      else
      {
        v15 = User::GetMainCharID(&g_kUser);
        v16 = v15->n5_code[1];
        kRaidMemberInfo.m_kCharID.n5_code[0] = v15->n5_code[0];
        v17 = v15->n5_code[2];
        kRaidMemberInfo.m_kCharID.n5_code[1] = v16;
        *(_QWORD *)&kRaidMemberInfo.m_kCharID.n5_code[2] = __PAIR__(v15->n5_code[3], v17);
        kRaidMemberInfo.m_kCharID.n5_code[4] = v15->n5_code[4];
        kRaidMemberInfo.m_byChrClass = User::GetMainCharClass(&g_kUser);
        kRaidMemberInfo.m_iLv = User::Lv(&g_kUser);
        kRaidMemberInfo.m_iHP = User::HP(&g_kUser);
        kRaidMemberInfo.m_iSP = User::SP(&g_kUser);
        kRaidMemberInfo.m_iMaxHP = User::MaxHP(&g_kUser);
        kRaidMemberInfo.m_iMaxSP = User::MaxSP(&g_kUser);
        kRaidMemberInfo.m_bShow = 1;
        kRaidMemberInfo.m_ucStatus = 1;
        kRaidMemberInfo.m_iLP = User::LP(&g_kUser);
        v18 = User::MaxLP(&g_kUser);
        v19 = (unsigned int)v10->_Mylast;
        kRaidMemberInfo.m_iMaxLP = v18;
        v20 = (unsigned int)&kRaidMemberInfo < v19;
      }
      if ( v20 && v10->_Myfirst <= &kRaidMemberInfo )
      {
        v21 = (signed int)((unsigned __int64)(2021161081i64 * ((char *)&kRaidMemberInfo - (char *)v10->_Myfirst)) >> 32) >> 5;
        v22 = v21 + (v21 >> 31);
        if ( (RaidMemberInfo *)v19 == v10->_Myend )
          std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::_Reserve(v10, 1u);
        v23 = &v10->_Myfirst[v22];
        v24 = v10->_Mylast;
        if ( !v24 )
          goto LABEL_36;
      }
      else
      {
        if ( (RaidMemberInfo *)v19 == v10->_Myend )
          std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::_Reserve(v10, 1u);
        v24 = v10->_Mylast;
        if ( !v24 )
          goto LABEL_37;
        v23 = &kRaidMemberInfo;
      }
      qmemcpy(v24, v23, sizeof(RaidMemberInfo));
      v9 = v41;
LABEL_36:
      v2 = v39;
LABEL_37:
      ++v10->_Mylast;
      ++v2->m_uiTotalMemberOnRaid;
LABEL_38:
      ++v40;
      v9 += 20;
      ++i;
      v41 = v9;
    }
    while ( i < g_kParty.m_uiTotalMember + 1 );
  }
  v2->m_uiMePartyIdx = 0;
  return 1;
}

//----- (006FF600) --------------------------------------------------------
char __thiscall RaidInfo::MemberInfoDetailInfo(RaidInfo *this, PROTO_NC_RAID_MEMBERCLASS_CMD *p)
{
  RaidInfo *v2; // edi@1
  PROTO_NC_RAID_MEMBERCLASS_CMD *v3; // esi@2
  unsigned int v4; // ecx@3
  int v5; // edx@5
  int v6; // eax@5
  int v7; // edx@5
  int v8; // eax@5
  int v9; // ecx@6
  signed int v10; // edx@6
  std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *v11; // ebx@6
  double v12; // st7@7
  unsigned int v13; // ecx@7
  unsigned int v14; // eax@7
  unsigned int v15; // eax@7
  int v16; // edx@7
  int v17; // ecx@7
  int v18; // eax@7
  int v19; // ecx@7
  int v20; // edx@7
  int v21; // eax@7
  int v22; // edx@9
  double v23; // st7@9
  Name5 *v24; // eax@11
  int v25; // edx@15
  int v26; // eax@15
  RaidMemberInfo *v27; // eax@17
  int v28; // edi@17
  int v29; // eax@17
  Name5 *v30; // ST20_4@17
  Name5 *v31; // eax@17
  Name5 *v32; // eax@20
  char result; // al@27
  RaidInfo *v34; // [sp+10h] [bp-70h]@1
  unsigned int uiIdx; // [sp+14h] [bp-6Ch]@3
  int i; // [sp+18h] [bp-68h]@1
  unsigned int uiSlot; // [sp+1Ch] [bp-64h]@3
  RaidMemberInfo kRaidMemberInfo; // [sp+20h] [bp-60h]@7
  char acstr[21]; // [sp+64h] [bp-1Ch]@5

  v2 = this;
  v34 = this;
  i = 0;
  if ( p->nNum )
  {
    v3 = p + 13;
    while ( 1 )
    {
      v4 = v3[-10].nNum;
      uiIdx = v4;
      uiSlot = v3[-9].nNum;
      if ( v4 > 4 || (unsigned int)v3[-9].nNum > 5 )
        break;
      v2->m_PartyInfo[v4].nPartyNo = *(_WORD *)&v3[-12].nNum;
      v2->m_PartyInfo[v4].nPartyIndex = v4;
      v5 = *(_DWORD *)&v3[-4].nNum;
      *(_DWORD *)acstr = *(_DWORD *)&v3[-8].nNum;
      v6 = *(_DWORD *)&v3->nNum;
      *(_DWORD *)&acstr[4] = v5;
      v7 = *(_DWORD *)&v3[4].nNum;
      *(_DWORD *)&acstr[8] = v6;
      v8 = *(_DWORD *)&v3[8].nNum;
      *(_DWORD *)&acstr[12] = v7;
      *(_DWORD *)&acstr[16] = v8;
      acstr[20] = 0;
      if ( strcmp(acstr, (const char *)&unk_9C7A14) )
      {
        v9 = v4;
        v10 = (char *)v2->m_MemberInfo[4 * v9 / 0x10u]._Mylast - (char *)v2->m_MemberInfo[4 * v9 / 0x10u]._Myfirst;
        v11 = &v2->m_MemberInfo[4 * v9 / 0x10u];
        if ( v10 / 68 == uiSlot )
        {
          *(_QWORD *)&kRaidMemberInfo.m_kCharID.n5_code[3] = 0i64;
          *(_QWORD *)&kRaidMemberInfo.m_kCharID.n5_code[1] = 0i64;
          kRaidMemberInfo.m_kCharID.n5_code[0] = 0;
          RaidInfo::ResetMemberInfo(&kRaidMemberInfo);
          v12 = (double)*(signed int *)&v3[38].nNum;
          v13 = *(_DWORD *)&v3->nNum;
          v14 = *(_DWORD *)&v3[-4].nNum;
          kRaidMemberInfo.m_kCharID.n5_code[0] = *(_DWORD *)&v3[-8].nNum;
          *(_QWORD *)&kRaidMemberInfo.m_kCharID.n5_code[2] = __PAIR__(*(_DWORD *)&v3[4].nNum, v13);
          LOBYTE(v13) = v3[12];
          kRaidMemberInfo.m_kCharID.n5_code[1] = v14;
          v15 = *(_DWORD *)&v3[8].nNum;
          v16 = v3[13].nNum;
          kRaidMemberInfo.m_byChrClass = v13;
          v17 = *(_DWORD *)&v3[18].nNum;
          kRaidMemberInfo.m_kCharID.n5_code[4] = v15;
          v18 = *(_DWORD *)&v3[14].nNum;
          kRaidMemberInfo.m_iMaxSP = v17;
          v19 = *(_DWORD *)&v3[38].nNum;
          kRaidMemberInfo.m_iLv = v16;
          v20 = *(_DWORD *)&v3[26].nNum;
          kRaidMemberInfo.m_iMaxHP = v18;
          v21 = *(_DWORD *)&v3[30].nNum;
          kRaidMemberInfo.m_iHP = v20;
          kRaidMemberInfo.m_iSP = v21;
          if ( v19 < 0 )
            v12 = v12 + 4294967300.0;
          v22 = *(_DWORD *)&v3[42].nNum;
          kRaidMemberInfo.m_fX = v12;
          v23 = (double)*(signed int *)&v3[42].nNum;
          if ( v22 < 0 )
            v23 = v23 + 4294967300.0;
          kRaidMemberInfo.m_fY = v23;
          v24 = User::GetMainCharID(&g_kUser);
          if ( *(_QWORD *)&kRaidMemberInfo.m_kCharID.n5_name[0] == *(_QWORD *)&v24->n5_code[0]
            && *(_QWORD *)&kRaidMemberInfo.m_kCharID.n5_code[2] == *(_QWORD *)&v24->n5_code[2]
            && kRaidMemberInfo.m_kCharID.n5_code[4] == v24->n5_code[4] )
          {
            kRaidMemberInfo.m_bShow = 1;
          }
          v25 = *(_DWORD *)&v3[34].nNum;
          v26 = *(_DWORD *)&v3[22].nNum;
          kRaidMemberInfo.m_ucStatus = 1;
          kRaidMemberInfo.m_iLP = v25;
          kRaidMemberInfo.m_iMaxLP = v26;
          std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::push_back(v11, &kRaidMemberInfo);
          ++v2->m_uiTotalMemberOnRaid;
        }
        else if ( v10 / 68 > uiSlot )
        {
          v27 = v11->_Myfirst;
          v28 = uiSlot;
          v27[v28].m_kCharID.n5_code[0] = *(_DWORD *)&v3[-8].nNum;
          v27[v28].m_kCharID.n5_code[1] = *(_DWORD *)&v3[-4].nNum;
          v27[v28].m_kCharID.n5_code[2] = *(_DWORD *)&v3->nNum;
          v29 = (int)&v27[uiSlot];
          *(_DWORD *)(v29 + 12) = *(_DWORD *)&v3[4].nNum;
          *(_DWORD *)(v29 + 16) = *(_DWORD *)&v3[8].nNum;
          v11->_Myfirst[v28].m_byChrClass = v3[12].nNum;
          v11->_Myfirst[v28].m_iLv = v3[13].nNum;
          v11->_Myfirst[v28].m_iMaxHP = *(_DWORD *)&v3[14].nNum;
          v11->_Myfirst[v28].m_iMaxSP = *(_DWORD *)&v3[18].nNum;
          v11->_Myfirst[v28].m_iHP = *(_DWORD *)&v3[26].nNum;
          v11->_Myfirst[v28].m_iSP = *(_DWORD *)&v3[30].nNum;
          v11->_Myfirst[v28].m_fX = (double)*(unsigned int *)&v3[38].nNum;
          v11->_Myfirst[v28].m_fY = (double)*(unsigned int *)&v3[42].nNum;
          v30 = &v11->_Myfirst[uiSlot].m_kCharID;
          v31 = User::GetMainCharID(&g_kUser);
          if ( Name5::operator!=(v30, v31) )
            v11->_Myfirst[v28].m_bShow = 0;
          v11->_Myfirst[v28].m_iLP = *(_DWORD *)&v3[34].nNum;
          v11->_Myfirst[v28].m_iMaxLP = *(_DWORD *)&v3[22].nNum;
          v2 = v34;
        }
        v32 = User::GetMainCharID(&g_kUser);
        if ( *(_DWORD *)&v3[-8].nNum == v32->n5_code[0]
          && *(_DWORD *)&v3[-4].nNum == v32->n5_code[1]
          && *(_DWORD *)&v3->nNum == v32->n5_code[2]
          && *(_DWORD *)&v3[4].nNum == v32->n5_code[3]
          && *(_DWORD *)&v3[8].nNum == v32->n5_code[4] )
        {
          v2->m_uiMePartyIdx = uiIdx;
        }
      }
      v3 += 58;
      if ( ++i >= p->nNum )
        goto LABEL_27;
    }
    result = 0;
  }
  else
  {
LABEL_27:
    result = 1;
  }
  return result;
}

//----- (006FF910) --------------------------------------------------------
void __thiscall RaidInfo::SetRaidSubLeader(RaidInfo *this, Name5 kCharID, bool bUp)
{
  RaidInfo *v3; // edi@1
  std::vector<Name5,std::allocator<Name5> > *v4; // ecx@2
  unsigned int v5; // edx@2
  unsigned int v6; // esi@2
  unsigned int v7; // edx@3
  Name5 *v8; // eax@4
  Name5 *v9; // eax@10
  Name5 *v10; // eax@14
  RaidInfo *v11; // esi@20
  Name5 *v12; // eax@20
  RaidInfo *v13; // [sp+Ch] [bp-4h]@1

  v3 = this;
  v13 = this;
  if ( bUp )
  {
    v4 = &this->m_SubLeaderList;
    v5 = (signed int)((unsigned __int64)(1717986919i64
                                       * (unsigned int)((char *)v3->m_SubLeaderList._Mylast
                                                      - (char *)v3->m_SubLeaderList._Myfirst)) >> 32) >> 3;
    v6 = v5 + (v5 >> 31);
    if ( v6 != 4 )
    {
      v7 = 0;
      if ( v6 )
      {
        v8 = v4->_Myfirst;
        while ( *(_QWORD *)&v8->n5_code[0] != *(_QWORD *)&kCharID.n5_name[0]
             || *(_QWORD *)&v8->n5_code[2] != *(_QWORD *)&kCharID.n5_code[2]
             || v8->n5_code[4] != kCharID.n5_code[4] )
        {
          ++v7;
          ++v8;
          if ( v7 >= v6 )
          {
            v3 = v13;
            goto LABEL_10;
          }
        }
      }
      else
      {
LABEL_10:
        std::vector<Name5,std::allocator<Name5>>::push_back(v4, &kCharID);
        v9 = User::GetMainCharID(&g_kUser);
        if ( kCharID.n5_code[0] == v9->n5_code[0]
          && *(_QWORD *)&kCharID.n5_code[1] == *(_QWORD *)&v9->n5_code[1]
          && *(_QWORD *)&kCharID.n5_code[3] == *(_QWORD *)&v9->n5_code[3] )
        {
          v3->m_bIsMeRaidSubLeader = 1;
        }
      }
    }
  }
  else
  {
    v10 = this->m_SubLeaderList._Myfirst;
    if ( v10 != this->m_SubLeaderList._Mylast )
    {
      while ( *(_QWORD *)&v10->n5_code[0] != *(_QWORD *)&kCharID.n5_name[0]
           || *(_QWORD *)&v10->n5_code[2] != *(_QWORD *)&kCharID.n5_code[2]
           || v10->n5_code[4] != kCharID.n5_code[4] )
      {
        ++v10;
        if ( v10 == this->m_SubLeaderList._Mylast )
          return;
      }
      v11 = this;
      std::_Move<Name5 *,Name5 *>(v10 + 1, this->m_SubLeaderList._Mylast, v10);
      --v11->m_SubLeaderList._Mylast;
      v12 = User::GetMainCharID(&g_kUser);
      if ( *(_QWORD *)&kCharID.n5_name[0] == *(_QWORD *)&v12->n5_code[0]
        && *(_QWORD *)&kCharID.n5_code[2] == *(_QWORD *)&v12->n5_code[2]
        && kCharID.n5_code[4] == v12->n5_code[4] )
      {
        v13->m_bIsMeRaidSubLeader = 0;
      }
    }
  }
}

//----- (006FFA90) --------------------------------------------------------
void __thiscall RaidInfo::ClearRaidInfo(RaidInfo *this)
{
  RaidInfo *v1; // esi@1
  char *v2; // ecx@1
  RaidMemberInfo **v3; // edi@1
  RaidMemberInfo *v4; // edx@2
  RaidMemberInfo *v5; // eax@3
  bool v6; // zf@4
  Name5 *v7; // eax@5
  int v12; // ST18_4@9
  int v13; // ST0C_4@9
  int v14; // eax@9
  signed int v15; // [sp+Ch] [bp-8h]@1
  char *v16; // [sp+10h] [bp-4h]@1

  v1 = this;
  v2 = &this->m_PartyInfo[0].nPartyIndex;
  v16 = v2;
  v3 = &v1->m_MemberInfo[0]._Mylast;
  v15 = 4;
  do
  {
    *((_WORD *)v2 - 1) = -1;
    *v2 = 0;
    v4 = *(v3 - 1);
    if ( v4 != *v3 )
    {
      v5 = std::_Move<RaidMemberInfo *,RaidMemberInfo *>(*v3, *v3, v4);
      v2 = v16;
      *v3 = v5;
    }
    v2 += 4;
    v3 += 4;
    v6 = v15-- == 1;
    v16 = v2;
  }
  while ( !v6 );
  v7 = v1->m_SubLeaderList._Myfirst;
  if ( v7 != v1->m_SubLeaderList._Mylast )
    v1->m_SubLeaderList._Mylast = v7;
  v1->m_bIsMeRaidLooter = 0;
  *(_WORD *)&v1->m_bIsMeRaidLeader = 0;
  v1->m_uiTotalMemberOnRaid = 0;
  v12 = (int)&v1->m_kRaidLeaderID;
  *(_DWORD *)(v12 + 16) = 0;
  *(_DWORD *)(v12 + 12) = 0;
  *(_DWORD *)(v12 + 8) = 0;
  *(_DWORD *)(v12 + 4) = 0;
  *(_DWORD *)v12 = 0;
  strncpy(v1->m_kRaidLeaderID.n5_name, &byte_9C7A15, 0x14u);
  v13 = (int)&v1->m_kRaidLooterID;
  *(_DWORD *)(v13 + 16) = 0;
  *(_DWORD *)(v13 + 12) = 0;
  *(_DWORD *)(v13 + 8) = 0;
  *(_DWORD *)(v13 + 4) = 0;
  *(_DWORD *)v13 = 0;
  strncpy(v1->m_kRaidLooterID.n5_name, &byte_9C7A16, 0x14u);
  v14 = (int)&v1->m_kJoinProposeCharID;
  v1->m_eLootType = 0;
  v1->m_eItemType = 0;
  v1->m_bDuringJoinPropose = 0;
  *(_DWORD *)(v14 + 16) = 0;
  *(_DWORD *)(v14 + 12) = 0;
  *(_DWORD *)(v14 + 8) = 0;
  *(_DWORD *)(v14 + 4) = 0;
  *(_DWORD *)v14 = 0;
  strncpy(v1->m_kJoinProposeCharID.n5_name, &byte_9C7A17, 0x14u);
  v1->m_bIsDisplayNotice = 1;
  v1->m_uiMePartyIdx = 4;
}

//----- (006FFBC0) --------------------------------------------------------
void __thiscall RaidInfo::RaidInfo(RaidInfo *this)
{
  RaidInfo *v1; // esi@1

  v1 = this;
  this->vfptr = (RaidInfoVtbl *)&RaidInfo::`vftable';
  *(_QWORD *)&this->m_kRaidLeaderID.n5_code[3] = 0i64;
  *(_QWORD *)&this->m_kRaidLeaderID.n5_code[1] = 0i64;
  this->m_kRaidLeaderID.n5_code[0] = 0;
  this->m_SubLeaderList._Myfirst = 0;
  this->m_SubLeaderList._Mylast = 0;
  this->m_SubLeaderList._Myend = 0;
  *(_QWORD *)&this->m_kRaidLooterID.n5_code[3] = 0i64;
  *(_QWORD *)&this->m_kRaidLooterID.n5_code[1] = 0i64;
  this->m_kRaidLooterID.n5_code[0] = 0;
  *(_QWORD *)&this->m_kJoinProposeCharID.n5_code[3] = 0i64;
  *(_QWORD *)&this->m_kJoinProposeCharID.n5_code[1] = 0i64;
  this->m_kJoinProposeCharID.n5_code[0] = 0;
  this->m_PartyInfo[0].nPartyIndex = 0;
  this->m_PartyInfo[1].nPartyIndex = 0;
  this->m_PartyInfo[2].nPartyIndex = 0;
  this->m_PartyInfo[3].nPartyIndex = 0;
  this->m_PartyInfo[0].nPartyNo = -1;
  this->m_PartyInfo[1].nPartyNo = -1;
  this->m_PartyInfo[2].nPartyNo = -1;
  this->m_PartyInfo[3].nPartyNo = -1;
  `eh vector constructor iterator'(
    this->m_MemberInfo,
    0x10u,
    4,
    (void (__thiscall *)(void *))CPartyFinder::CPartyFinder,
    (void (__thiscall *)(void *))std::vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>::~vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>);
  RaidInfo::ClearRaidInfo(v1);
}
// 9C7A20: using guessed type int (__thiscall *RaidInfo::`vftable')(void *p, char);

//----- (006FFC90) --------------------------------------------------------
char __thiscall RaidInfo::SetMember(RaidInfo *this, PROTO_NC_RAID_MEMBER_LIST_CMD *p)
{
  unsigned int v2; // edi@1
  char *v3; // esi@1
  int v4; // ecx@2
  int v5; // edx@2
  int v6; // eax@2
  int v7; // ecx@2
  unsigned int v8; // ecx@3
  RaidMemberInfo *v9; // ebx@3
  std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *v10; // edi@3
  unsigned int v11; // edx@4
  unsigned int v12; // ecx@4
  char v13; // al@4
  unsigned int v14; // edx@4
  int v15; // eax@9
  RaidInfo *v17; // [sp+Ch] [bp-68h]@1
  int i; // [sp+10h] [bp-64h]@1
  RaidMemberInfo kInfo; // [sp+14h] [bp-60h]@4
  char acstr[21]; // [sp+58h] [bp-1Ch]@2

  v2 = 0;
  v17 = this;
  i = 0;
  v3 = &p->memberarray[0].memberid.n5_name[8];
  do
  {
    v4 = *((_DWORD *)v3 - 1);
    v5 = *(_DWORD *)v3;
    *(_DWORD *)acstr = *((_DWORD *)v3 - 2);
    v6 = *((_DWORD *)v3 + 1);
    *(_DWORD *)&acstr[4] = v4;
    v7 = *((_DWORD *)v3 + 2);
    *(_DWORD *)&acstr[12] = v6;
    *(_DWORD *)&acstr[16] = v7;
    *(_DWORD *)&acstr[8] = v5;
    acstr[20] = 0;
    if ( strcmp(acstr, (const char *)&unk_9C7A19) )
    {
      v8 = v2 % 5;
      v9 = v17->m_MemberInfo[v2 / 5]._Myfirst;
      v10 = &v17->m_MemberInfo[v2 / 5];
      if ( v8 < v10->_Mylast - v9 )
      {
        if ( !v3[12] )
          v9[v8].m_bShow = 0;
        v10->_Myfirst[v8].m_ucStatus = v3[12];
        v15 = (int)&v10->_Myfirst[v8];
        *(_DWORD *)v15 = *((_DWORD *)v3 - 2);
        *(_DWORD *)(v15 + 4) = *((_DWORD *)v3 - 1);
        *(_DWORD *)(v15 + 8) = *(_DWORD *)v3;
        *(_DWORD *)(v15 + 12) = *((_DWORD *)v3 + 1);
        *(_DWORD *)(v15 + 16) = *((_DWORD *)v3 + 2);
      }
      else
      {
        *(_QWORD *)&kInfo.m_kCharID.n5_code[3] = 0i64;
        *(_QWORD *)&kInfo.m_kCharID.n5_code[1] = 0i64;
        kInfo.m_kCharID.n5_code[0] = 0;
        strncpy(kInfo.m_kCharID.n5_name, &byte_9C7A18, 0x14u);
        v11 = *((_DWORD *)v3 - 2);
        kInfo.m_fX = 0.0;
        v12 = *((_DWORD *)v3 - 1);
        kInfo.m_fY = 0.0;
        v13 = v3[12];
        *(_QWORD *)&kInfo.m_kCharID.n5_name[0] = __PAIR__(v12, v11);
        *(_QWORD *)&kInfo.m_kCharID.n5_code[2] = *(_QWORD *)v3;
        v14 = *((_DWORD *)v3 + 2);
        kInfo.m_byChrClass = 0;
        kInfo.m_iLv = 0;
        kInfo.m_iHP = 0;
        kInfo.m_iSP = 0;
        kInfo.m_iMaxHP = 0;
        kInfo.m_iMaxSP = 0;
        kInfo.m_bShow = 0;
        kInfo.m_iLP = 0;
        kInfo.m_iMaxLP = 0;
        kInfo.m_ucStatus = v13;
        kInfo.m_kCharID.n5_code[4] = v14;
        if ( !v13 )
          kInfo.m_bShow = 0;
        std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::push_back(v10, &kInfo);
        ++v17->m_uiTotalMemberOnRaid;
      }
      v2 = i;
    }
    ++v2;
    v3 += 21;
    i = v2;
  }
  while ( (signed int)v2 < 20 );
  return 1;
}

//----- (006FFE50) --------------------------------------------------------
char __thiscall RaidInfo::DeleteMember(RaidInfo *this, Name5 kID, std::_Vector_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo> > > nPartyIdx, char nSlotIdx)
{
  RaidInfo *v4; // esi@1
  std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *v5; // ecx@3
  std::_Vector_const_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo> > > v6; // edx@4
  int v7; // eax@4
  unsigned int v8; // ebx@9
  unsigned int v9; // edi@9
  _BYTE v10[20]; // ST04_20@9
  _BYTE v11[20]; // ST00_20@10
  _BYTE v12[20]; // ST04_20@11
  _BYTE v13[20]; // ST04_20@12
  char result; // al@13

  v4 = this;
  if ( LOBYTE(nPartyIdx._Ptr) > 4u
    || (unsigned __int8)nSlotIdx > 5u
    || (v5 = &this->m_MemberInfo[LOBYTE(nPartyIdx._Ptr)],
        v4->m_MemberInfo[LOBYTE(nPartyIdx._Ptr)]._Mylast - v4->m_MemberInfo[LOBYTE(nPartyIdx._Ptr)]._Myfirst <= (unsigned int)(unsigned __int8)nSlotIdx) )
  {
    result = 0;
  }
  else
  {
    v6._Ptr = v5->_Myfirst;
    v7 = (unsigned __int8)nSlotIdx;
    if ( nSlotIdx )
    {
      do
      {
        --v7;
        if ( v6._Ptr == v4->m_MemberInfo[LOBYTE(nPartyIdx._Ptr)]._Mylast )
          break;
        ++v6._Ptr;
      }
      while ( v7 );
    }
    if ( v6._Ptr != v4->m_MemberInfo[LOBYTE(nPartyIdx._Ptr)]._Mylast )
    {
      std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::erase(v5, &nPartyIdx, v6);
      --v4->m_uiTotalMemberOnRaid;
    }
    v9 = kID.n5_code[4];
    v8 = kID.n5_code[3];
    *(_QWORD *)v10 = *(_QWORD *)&kID.n5_name[0];
    *(_QWORD *)&v10[8] = *(_QWORD *)&kID.n5_code[2];
    *(_DWORD *)&v10[16] = kID.n5_code[4];
    if ( RaidInfo::IsSubLeader(v4, *(Name5 *)v10) )
    {
      *(_QWORD *)v11 = *(_QWORD *)&kID.n5_name[0];
      *(_DWORD *)&v11[8] = kID.n5_code[2];
      *(_QWORD *)&v11[12] = *(_QWORD *)&kID.n5_code[3];
      RaidInfo::SetRaidSubLeader(v4, *(Name5 *)v11, 0);
      v9 = kID.n5_code[4];
      v8 = kID.n5_code[3];
    }
    *(_QWORD *)v12 = *(_QWORD *)&kID.n5_name[0];
    *(_DWORD *)&v12[8] = kID.n5_code[2];
    *(_QWORD *)&v12[12] = __PAIR__(v9, v8);
    if ( RaidInfo::IsLooter(v4, *(Name5 *)v12) )
    {
      *(_DWORD *)v13 = v4->m_kRaidLeaderID.n5_code[0];
      *(_QWORD *)&v13[4] = *(_QWORD *)&v4->m_kRaidLeaderID.n5_code[1];
      *(_QWORD *)&v13[12] = *(_QWORD *)&v4->m_kRaidLeaderID.n5_code[3];
      RaidInfo::ChangeRaidLooter(v4, *(Name5 *)v13);
    }
    result = 1;
  }
  return result;
}

//----- (006FFF90) --------------------------------------------------------
char __thiscall RaidInfo::DeleteMember(RaidInfo *this, Name5 kID)
{
  char result; // al@1
  RaidInfo *v3; // esi@1
  _BYTE v4[20]; // ST00_20@2
  unsigned int nSlotIdx; // [sp+4h] [bp-24h]@2
  unsigned int nPartyIdx; // [sp+8h] [bp-20h]@2
  char acName[21]; // [sp+Ch] [bp-1Ch]@1

  result = kID.n5_name[0];
  v3 = this;
  *(_QWORD *)&acName[8] = *(_QWORD *)&kID.n5_code[2];
  *(_QWORD *)acName = *(_QWORD *)&kID.n5_name[0];
  *(_DWORD *)&acName[16] = kID.n5_code[4];
  acName[20] = 0;
  if ( kID.n5_name[0] )
  {
    RaidInfo::FindIndexByName(this, acName, &nPartyIdx, &nSlotIdx);
    *(_QWORD *)v4 = *(_QWORD *)&kID.n5_name[0];
    *(_QWORD *)&v4[8] = *(_QWORD *)&kID.n5_code[2];
    *(_DWORD *)&v4[16] = kID.n5_code[4];
    result = RaidInfo::DeleteMember(
               v3,
               *(Name5 *)v4,
               (std::_Vector_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo> > >)nPartyIdx,
               nSlotIdx);
  }
  return result;
}

//----- (00700030) --------------------------------------------------------
RaidMemberInfo *__thiscall RaidMemberInfo::operator=(RaidMemberInfo *this, RaidMemberInfo *__that)
{
  RaidMemberInfo *result; // eax@1

  result = this;
  *(_QWORD *)&this->m_kCharID.n5_name[0] = *(_QWORD *)&__that->m_kCharID.n5_name[0];
  *(_QWORD *)&this->m_kCharID.n5_code[2] = *(_QWORD *)&__that->m_kCharID.n5_code[2];
  this->m_kCharID.n5_code[4] = __that->m_kCharID.n5_code[4];
  this->m_ucStatus = __that->m_ucStatus;
  this->m_iLv = __that->m_iLv;
  this->m_iHP = __that->m_iHP;
  this->m_iSP = __that->m_iSP;
  this->m_iMaxHP = __that->m_iMaxHP;
  this->m_iMaxSP = __that->m_iMaxSP;
  this->m_iLP = __that->m_iLP;
  this->m_iMaxLP = __that->m_iMaxLP;
  this->m_byChrClass = __that->m_byChrClass;
  this->m_byInform = __that->m_byInform;
  this->m_fX = __that->m_fX;
  this->m_fY = __that->m_fY;
  this->m_bShow = __that->m_bShow;
  return result;
}

//----- (007000B0) --------------------------------------------------------
Name5 *__cdecl std::_Move<Name5 *,Name5 *>(Name5 *_First, Name5 *_Last, Name5 *_Dest)
{
  char *v3; // ecx@2
  Name5 *result; // eax@2
  unsigned int v5; // esi@3

  if ( _First == _Last )
  {
    result = _Dest;
  }
  else
  {
    v3 = (char *)&_First->n5_code[2];
    result = _Dest;
    do
    {
      result->n5_code[0] = *((_DWORD *)v3 - 2);
      result->n5_code[1] = *((_DWORD *)v3 - 1);
      result->n5_code[2] = *(_DWORD *)v3;
      result->n5_code[3] = *((_DWORD *)v3 + 1);
      v5 = *((_DWORD *)v3 + 2);
      v3 += 20;
      result->n5_code[4] = v5;
      ++result;
    }
    while ( (Name5 *)(v3 - 8) != _Last );
  }
  return result;
}

//----- (00700100) --------------------------------------------------------
RaidMemberInfo *__cdecl std::_Move<RaidMemberInfo *,RaidMemberInfo *>(RaidMemberInfo *_First, RaidMemberInfo *_Last, RaidMemberInfo *_Dest)
{
  char *v3; // ecx@2
  RaidMemberInfo *result; // eax@2

  if ( _First == _Last )
  {
    result = _Dest;
  }
  else
  {
    v3 = &_First->m_kCharID.n5_name[8];
    result = _Dest;
    do
    {
      result->m_kCharID.n5_code[0] = *((_DWORD *)v3 - 2);
      result->m_kCharID.n5_code[1] = *((_DWORD *)v3 - 1);
      result->m_kCharID.n5_code[2] = *(_DWORD *)v3;
      result->m_kCharID.n5_code[3] = *((_DWORD *)v3 + 1);
      result->m_kCharID.n5_code[4] = *((_DWORD *)v3 + 2);
      result->m_ucStatus = v3[12];
      result->m_iLv = *((_DWORD *)v3 + 4);
      result->m_iHP = *((_DWORD *)v3 + 5);
      result->m_iSP = *((_DWORD *)v3 + 6);
      result->m_iMaxHP = *((_DWORD *)v3 + 7);
      result->m_iMaxSP = *((_DWORD *)v3 + 8);
      result->m_iLP = *((_DWORD *)v3 + 9);
      result->m_iMaxLP = *((_DWORD *)v3 + 10);
      result->m_byChrClass = v3[44];
      result->m_byInform = v3[45];
      v3 += 68;
      ++result;
      result[-1].m_fX = *((float *)v3 - 5);
      result[-1].m_fY = *((float *)v3 - 4);
      result[-1].m_bShow = *(v3 - 12);
    }
    while ( (RaidMemberInfo *)(v3 - 8) != _Last );
  }
  return result;
}

//----- (007001A0) --------------------------------------------------------
RaidMemberInfo *__cdecl std::_Uninit_move<RaidMemberInfo *,RaidMemberInfo *,std::allocator<RaidMemberInfo>,RaidMemberInfo>(RaidMemberInfo *_First, RaidMemberInfo *_Last, RaidMemberInfo *_Dest)
{
  RaidMemberInfo *v3; // edx@1
  RaidMemberInfo *result; // eax@1

  v3 = _First;
  for ( result = _Dest; v3 != _Last; ++result )
  {
    if ( result )
      qmemcpy(result, v3, sizeof(RaidMemberInfo));
    ++v3;
  }
  return result;
}

//----- (007001E0) --------------------------------------------------------
void __thiscall std::vector<Name5,std::allocator<Name5>>::reserve(std::vector<Name5,std::allocator<Name5> > *this, unsigned int _Count)
{
  std::vector<Name5,std::allocator<Name5> > *v2; // esi@1
  Name5 *v3; // eax@4
  CollectCardChoiceWin::sRegistCardInfo *v4; // ST04_4@4
  CollectCardChoiceWin::sRegistCardInfo *v5; // ST00_4@4
  Name5 *v6; // ebx@4
  unsigned int v7; // edx@4
  int v8; // edi@4
  Name5 *i; // eax@5
  Name5 *v10; // eax@8
  int v11; // [sp+0h] [bp-24h]@1
  Name5 *_Ptr; // [sp+10h] [bp-14h]@4
  int *v13; // [sp+14h] [bp-10h]@1
  int v14; // [sp+20h] [bp-4h]@4

  v13 = &v11;
  v2 = this;
  if ( _Count > 0xCCCCCCC )
    std::_Xlength_error("vector<T> too long");
  if ( this->_Myend - this->_Myfirst < _Count )
  {
    v3 = (Name5 *)std::allocator<CollectWin::sCardInfo>::allocate(_Count);
    v4 = (CollectCardChoiceWin::sRegistCardInfo *)v2->_Mylast;
    v5 = (CollectCardChoiceWin::sRegistCardInfo *)v2->_Myfirst;
    _Ptr = v3;
    v14 = 0;
    std::_Uninit_move<CollectCardChoiceWin::sRegistCardInfo *,CollectCardChoiceWin::sRegistCardInfo *,std::allocator<CollectCardChoiceWin::sRegistCardInfo>,CollectCardChoiceWin::sRegistCardInfo>(
      v5,
      v4,
      (CollectCardChoiceWin::sRegistCardInfo *)v3);
    v6 = v2->_Myfirst;
    v7 = (signed int)((unsigned __int64)(1717986919i64 * (unsigned int)((char *)v2->_Mylast - (char *)v2->_Myfirst)) >> 32) >> 3;
    v8 = v7 + (v7 >> 31);
    if ( v2->_Myfirst )
    {
      for ( i = v2->_Mylast; v6 != i; ++v6 )
        ;
      operator delete(v2->_Myfirst);
    }
    v10 = _Ptr;
    v2->_Myend = &_Ptr[_Count];
    v2->_Mylast = &v10[v8];
    v2->_Myfirst = v10;
  }
}

//----- (007002F0) --------------------------------------------------------
void __thiscall std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::reserve(std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *this, unsigned int _Count)
{
  std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *v2; // esi@1
  RaidMemberInfo *v3; // eax@4
  RaidMemberInfo *v4; // ST04_4@4
  RaidMemberInfo *v5; // ST00_4@4
  RaidMemberInfo *v6; // ebx@4
  unsigned int v7; // edx@4
  int v8; // edi@4
  RaidMemberInfo *i; // eax@5
  RaidMemberInfo *v10; // eax@8
  int v11; // [sp+0h] [bp-24h]@1
  RaidMemberInfo *_Ptr; // [sp+10h] [bp-14h]@4
  int *v13; // [sp+14h] [bp-10h]@1
  int v14; // [sp+20h] [bp-4h]@4

  v13 = &v11;
  v2 = this;
  if ( _Count > 0x3C3C3C3 )
    std::_Xlength_error("vector<T> too long");
  if ( this->_Myend - this->_Myfirst < _Count )
  {
    v3 = std::allocator<GuildAcademySelectWin::GuildInfo>::allocate(_Count);
    v4 = v2->_Mylast;
    v5 = v2->_Myfirst;
    _Ptr = v3;
    v14 = 0;
    std::_Uninit_move<RaidMemberInfo *,RaidMemberInfo *,std::allocator<RaidMemberInfo>,RaidMemberInfo>(v5, v4, v3);
    v6 = v2->_Myfirst;
    v7 = (signed int)((unsigned __int64)(2021161081i64 * (unsigned int)((char *)v2->_Mylast - (char *)v2->_Myfirst)) >> 32) >> 5;
    v8 = v7 + (v7 >> 31);
    if ( v2->_Myfirst )
    {
      for ( i = v2->_Mylast; v6 != i; ++v6 )
        ;
      operator delete(v2->_Myfirst);
    }
    v10 = _Ptr;
    v2->_Myend = &_Ptr[_Count];
    v2->_Mylast = &v10[v8];
    v2->_Myfirst = v10;
  }
}

//----- (00700400) --------------------------------------------------------
std::_Vector_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo> > > *__thiscall std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::erase(std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *this, std::_Vector_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo> > > *result, std::_Vector_const_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo> > > _Where)
{
  std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *v3; // esi@1
  std::_Vector_iterator<std::_Vector_val<RaidMemberInfo,std::allocator<RaidMemberInfo> > > *v4; // eax@1

  v3 = this;
  std::_Move<RaidMemberInfo *,RaidMemberInfo *>(_Where._Ptr + 1, this->_Mylast, _Where._Ptr);
  v4 = result;
  --v3->_Mylast;
  result->_Ptr = _Where._Ptr;
  return v4;
}

//----- (00700430) --------------------------------------------------------
void __thiscall std::vector<Name5,std::allocator<Name5>>::_Reserve(std::vector<Name5,std::allocator<Name5> > *this, unsigned int _Count)
{
  unsigned int v2; // esi@1
  unsigned int v3; // esi@3
  unsigned int v4; // eax@3
  unsigned int v5; // eax@5

  v2 = this->_Mylast - this->_Myfirst;
  if ( 214748364 - _Count < v2 )
    std::_Xlength_error("vector<T> too long");
  v3 = _Count + v2;
  v4 = this->_Myend - this->_Myfirst;
  if ( v3 > v4 )
  {
    if ( 214748364 - (v4 >> 1) >= v4 )
      v5 = (v4 >> 1) + v4;
    else
      v5 = 0;
    if ( v5 < v3 )
      v5 = v3;
    std::vector<Name5,std::allocator<Name5>>::reserve(this, v5);
  }
}

//----- (007004B0) --------------------------------------------------------
void __thiscall std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::_Reserve(std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *this, unsigned int _Count)
{
  unsigned int v2; // esi@1
  unsigned int v3; // esi@3
  unsigned int v4; // eax@3
  unsigned int v5; // eax@5

  v2 = this->_Mylast - this->_Myfirst;
  if ( 63161283 - _Count < v2 )
    std::_Xlength_error("vector<T> too long");
  v3 = _Count + v2;
  v4 = this->_Myend - this->_Myfirst;
  if ( v3 > v4 )
  {
    if ( 63161283 - (v4 >> 1) >= v4 )
      v5 = (v4 >> 1) + v4;
    else
      v5 = 0;
    if ( v5 < v3 )
      v5 = v3;
    std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::reserve(this, v5);
  }
}

//----- (00700530) --------------------------------------------------------
RaidInfo *__thiscall RaidInfo::`vector deleting destructor'(RaidInfo *this, unsigned int a2)
{
  RaidInfo *v2; // esi@1

  v2 = this;
  this->vfptr = (RaidInfoVtbl *)&RaidInfo::`vftable';
  `eh vector destructor iterator'(
    this->m_MemberInfo,
    0x10u,
    4,
    (void (__thiscall *)(void *))std::vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>::~vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>);
  if ( v2->m_SubLeaderList._Myfirst )
    operator delete(v2->m_SubLeaderList._Myfirst);
  v2->m_SubLeaderList._Myfirst = 0;
  v2->m_SubLeaderList._Mylast = 0;
  v2->m_SubLeaderList._Myend = 0;
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C7A20: using guessed type int (__thiscall *RaidInfo::`vftable')(void *p, char);

//----- (007005C0) --------------------------------------------------------
void __thiscall std::vector<Name5,std::allocator<Name5>>::push_back(std::vector<Name5,std::allocator<Name5> > *this, Name5 *_Val)
{
  std::vector<Name5,std::allocator<Name5> > *v2; // edi@1
  Name5 *v3; // ecx@1
  unsigned int v4; // edx@3
  int v5; // esi@3
  int v6; // ecx@5
  Name5 *v7; // eax@5
  Name5 *v8; // eax@9

  v2 = this;
  v3 = this->_Mylast;
  if ( _Val >= v3 || v2->_Myfirst > _Val )
  {
    if ( v3 == v2->_Myend )
      std::vector<Name5,std::allocator<Name5>>::_Reserve(v2, 1u);
    v8 = v2->_Mylast;
    if ( v8 )
    {
      *(_QWORD *)&v8->n5_code[0] = *(_QWORD *)&_Val->n5_code[0];
      *(_QWORD *)&v8->n5_code[2] = *(_QWORD *)&_Val->n5_code[2];
      v8->n5_code[4] = _Val->n5_code[4];
    }
  }
  else
  {
    v4 = (signed int)((unsigned __int64)(1717986919i64 * ((char *)_Val - (char *)v2->_Myfirst)) >> 32) >> 3;
    v5 = v4 + (v4 >> 31);
    if ( v3 == v2->_Myend )
      std::vector<Name5,std::allocator<Name5>>::_Reserve(v2, 1u);
    v6 = (int)&v2->_Myfirst[v5];
    v7 = v2->_Mylast;
    if ( v7 )
    {
      v7->n5_code[0] = *(_DWORD *)v6;
      v7->n5_code[1] = *(_DWORD *)(v6 + 4);
      v7->n5_code[2] = *(_DWORD *)(v6 + 8);
      v7->n5_code[3] = *(_DWORD *)(v6 + 12);
      v7->n5_code[4] = *(_DWORD *)(v6 + 16);
      ++v2->_Mylast;
      return;
    }
  }
  ++v2->_Mylast;
}

//----- (00700670) --------------------------------------------------------
void __thiscall std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::push_back(std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *this, RaidMemberInfo *_Val)
{
  RaidMemberInfo *v2; // esi@1
  std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *v3; // ebx@1
  RaidMemberInfo *v4; // ecx@1
  unsigned int v5; // edx@3
  int v6; // esi@3
  RaidMemberInfo *v7; // edi@8

  v2 = _Val;
  v3 = this;
  v4 = this->_Mylast;
  if ( _Val >= v4 || v3->_Myfirst > _Val )
  {
    if ( v4 == v3->_Myend )
      std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::_Reserve(v3, 1u);
  }
  else
  {
    v5 = (signed int)((unsigned __int64)(2021161081i64 * ((char *)_Val - (char *)v3->_Myfirst)) >> 32) >> 5;
    v6 = v5 + (v5 >> 31);
    if ( v4 == v3->_Myend )
      std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::_Reserve(v3, 1u);
    v2 = &v3->_Myfirst[v6];
  }
  v7 = v3->_Mylast;
  if ( v7 )
    qmemcpy(v7, v2, sizeof(RaidMemberInfo));
  ++v3->_Mylast;
}

//----- (007006E0) --------------------------------------------------------
void __thiscall ExpeditionMemberAddWin::ExpeditionMemberAddWin(ExpeditionMemberAddWin *this)
{
  ExpeditionMemberAddWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ExpeditionMemberAddWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ExpeditionMemberAddWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkInputBox = 0;
}
// 9C8468: using guessed type void (__thiscall *ExpeditionMemberAddWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C8484: using guessed type int (__thiscall *ExpeditionMemberAddWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00700710) --------------------------------------------------------
void __thiscall ExpeditionMemberAddWin::~ExpeditionMemberAddWin(ExpeditionMemberAddWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ExpeditionMemberAddWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ExpeditionMemberAddWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9C8468: using guessed type void (__thiscall *ExpeditionMemberAddWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C8484: using guessed type int (__thiscall *ExpeditionMemberAddWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00700730) --------------------------------------------------------
void __thiscall ExpeditionMemberAddWin::SetTargetName(ExpeditionMemberAddWin *this, const char *szName)
{
  if ( szName )
    ((void (__stdcall *)(_DWORD))this->m_pkInputBox->vfptr[116].__vecDelDtor)(szName);
}

//----- (00700770) --------------------------------------------------------
void __thiscall ExpeditionMemberAddWin::OnClose(ExpeditionMemberAddWin *this)
{
  ((void (__stdcall *)(_DWORD))this->m_pkInputBox->vfptr[121].__vecDelDtor)(1);
}

//----- (00700790) --------------------------------------------------------
void __thiscall ExpeditionMemberAddWin::OnShowWin(ExpeditionMemberAddWin *this)
{
  ((void (*)(void))this->m_pkInputBox->vfptr[120].__vecDelDtor)();
}

//----- (007007A0) --------------------------------------------------------
void ExpeditionWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "RaidWin");
}

//----- (007007D0) --------------------------------------------------------
void __thiscall ExpeditionPartyWin::OpenPopupWin(ExpeditionPartyWin *this, unsigned int focusSlot)
{
  ExpeditionPartyWin *v2; // esi@1

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[65].__vecDelDtor)() )
  {
    if ( !v2->m_bOpenPopUp )
    {
      v2->m_bOpenPopUp = 1;
      v2->m_uiFocusSlotNum = focusSlot;
    }
  }
}

//----- (00700810) --------------------------------------------------------
void __thiscall ExpeditionLootSelectWin::ExpeditionLootSelectWin(ExpeditionLootSelectWin *this)
{
  ExpeditionLootSelectWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ExpeditionLootSelectWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ExpeditionLootSelectWin::`vftable'{for `IDirectMessenger'};
}
// 9C86A8: using guessed type void (__thiscall *ExpeditionLootSelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C86C4: using guessed type int (__thiscall *ExpeditionLootSelectWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00700830) --------------------------------------------------------
void __thiscall ExpeditionLootSelectWin::~ExpeditionLootSelectWin(ExpeditionLootSelectWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ExpeditionLootSelectWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ExpeditionLootSelectWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9C86A8: using guessed type void (__thiscall *ExpeditionLootSelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C86C4: using guessed type int (__thiscall *ExpeditionLootSelectWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00700850) --------------------------------------------------------
void __thiscall ExpeditionLootSelectWin::OnSlideBtnUp(ExpeditionLootSelectWin *this)
{
  SlideBar::OnClick1(this->m_pkSlideBarEx);
}

//----- (00700870) --------------------------------------------------------
void ExpeditionLootOptionWin::OnHelpLink()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenPlayGuideSearchList(v1, "RaidRootOption");
}

//----- (007008A0) --------------------------------------------------------
void __thiscall EntryIconWin::~EntryIconWin(EntryIconWin *this)
{
  EntryIconWin *v1; // esi@1
  NiScreenElements *v2; // edi@1
  NiScreenElements *v3; // edi@6
  NiMaterialProperty *v4; // edi@11
  NiMaterialProperty *v5; // edi@16
  PgWinLRBut *v6; // edi@21
  PgWinSpr *v7; // edi@26
  PgWinSpr *v8; // edi@31
  NiPointer<PgWinSpr> *v9; // ebx@36
  PgWinSpr *v10; // edi@37
  PgWinSpr *v11; // edi@43
  PgWinLRBut *v12; // edi@48
  NiMaterialProperty *v13; // edi@52
  NiMaterialProperty *v14; // edi@56
  NiScreenElements *v15; // edi@60
  NiScreenElements *v16; // edi@64
  PgWinSpr *v17; // edi@68
  PgWinSpr *v18; // edi@72
  PgWinSpr *v19; // edi@76
  PgWinText *v20; // edi@80
  PgWinText *v21; // edi@84
  PgWinAbbreviateText *v22; // edi@88
  signed int v23; // [sp+14h] [bp-10h]@36

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&EntryIconWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&EntryIconWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_spBackImagePlane.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spBackImagePlane.m_pObject = 0;
  }
  v3 = v1->m_spSubImagePlane.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spSubImagePlane.m_pObject = 0;
  }
  v4 = v1->m_spMtrlProp.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spMtrlProp.m_pObject = 0;
  }
  v5 = v1->m_spFixedMtrlProp.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spFixedMtrlProp.m_pObject = 0;
  }
  v6 = v1->m_spLRBut.m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v1->m_spLRBut.m_pObject = 0;
  }
  v7 = v1->m_spMemberMark.m_pObject;
  if ( v7 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v1->m_spMemberMark.m_pObject = 0;
  }
  v8 = v1->m_spLootingMark.m_pObject;
  if ( v8 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v1->m_spLootingMark.m_pObject = 0;
  }
  v9 = v1->m_spClassBar;
  v23 = 6;
  do
  {
    v10 = v9->m_pObject;
    if ( v9->m_pObject )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
      v9->m_pObject = 0;
    }
    ++v9;
    --v23;
  }
  while ( v23 );
  v11 = v1->m_spPosBar.m_pObject;
  if ( v11 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    v1->m_spPosBar.m_pObject = 0;
  }
  v12 = v1->m_spLRBut.m_pObject;
  if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
    v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
  NiObjectNET::~NiObjectNET((NiObjectNET *)&v1->m_spAlphaProp.vfptr);
  v13 = v1->m_spFixedMtrlProp.m_pObject;
  if ( v13 && !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) && v13 )
    v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
  v14 = v1->m_spMtrlProp.m_pObject;
  if ( v14 && !InterlockedDecrement((volatile LONG *)&v14->m_uiRefCount) && v14 )
    v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
  v15 = v1->m_spSubImagePlane.m_pObject;
  if ( v15 && !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) && v15 )
    v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
  v16 = v1->m_spBackImagePlane.m_pObject;
  if ( v16 && !InterlockedDecrement((volatile LONG *)&v16->m_uiRefCount) && v16 )
    v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
  v17 = v1->m_spPosBar.m_pObject;
  if ( v17 && !InterlockedDecrement((volatile LONG *)&v17->m_uiRefCount) && v17 )
    v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
  v18 = v1->m_spLootingMark.m_pObject;
  if ( v18 && !InterlockedDecrement((volatile LONG *)&v18->m_uiRefCount) && v18 )
    v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
  v19 = v1->m_spMemberMark.m_pObject;
  if ( v19 && !InterlockedDecrement((volatile LONG *)&v19->m_uiRefCount) && v19 )
    v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
  v20 = v1->m_spClassText.m_pObject;
  if ( v20 && !InterlockedDecrement((volatile LONG *)&v20->m_uiRefCount) && v20 )
    v20->vfptr->__vecDelDtor((NiRefObject *)v20, 1u);
  `eh vector destructor iterator'(
    v1->m_spClassBar,
    4u,
    6,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v21 = v1->m_spLevelText.m_pObject;
  if ( v21 && !InterlockedDecrement((volatile LONG *)&v21->m_uiRefCount) && v21 )
    v21->vfptr->__vecDelDtor((NiRefObject *)v21, 1u);
  v22 = v1->m_spNameText.m_pObject;
  if ( v22 && !InterlockedDecrement((volatile LONG *)&v22->m_uiRefCount) && v22 )
    v22->vfptr->__vecDelDtor((NiRefObject *)v22, 1u);
  PgWin::~PgWin((PgWin *)&v1->vfptr);
}
// 9C88E8: using guessed type void (__thiscall *EntryIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C8904: using guessed type int (__thiscall *EntryIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00700C80) --------------------------------------------------------
void __thiscall EntryIconWin::InitLeaderLooterMark(EntryIconWin *this)
{
  EntryIconWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_spMemberMark.m_pObject->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_spMemberMark.m_pObject->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_spLootingMark.m_pObject->vfptr[64].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_spLootingMark.m_pObject->vfptr[60].__vecDelDtor)(0);
}

//----- (00700CD0) --------------------------------------------------------
void __thiscall ExpeditionMemberAddWin::OnMemberAddOk(ExpeditionMemberAddWin *this)
{
  ExpeditionMemberAddWin *v1; // edi@1
  char *v2; // eax@1
  _BYTE v3[20]; // ST04_20@4
  Name5 kNullID; // [sp+Ch] [bp-2Ch]@1
  Name5 kCharID; // [sp+20h] [bp-18h]@1

  v1 = this;
  v2 = (char *)((int (*)(void))this->m_pkInputBox->vfptr[113].__vecDelDtor)();
  *(_QWORD *)&kCharID.n5_code[3] = 0i64;
  *(_QWORD *)&kCharID.n5_code[1] = 0i64;
  *(_QWORD *)&kCharID.n5_name[0] = 0i64;
  strncpy(kCharID.n5_name, v2, 0x14u);
  *(_QWORD *)&kNullID.n5_code[3] = 0i64;
  *(_QWORD *)&kNullID.n5_code[1] = 0i64;
  *(_QWORD *)&kNullID.n5_name[0] = 0i64;
  strncpy(kNullID.n5_name, &byte_9C7A5E, 0x14u);
  if ( *(_QWORD *)&kCharID.n5_name[0] != *(_QWORD *)&kNullID.n5_name[0]
    || *(_QWORD *)&kCharID.n5_code[2] != *(_QWORD *)&kNullID.n5_code[2]
    || kCharID.n5_code[4] != kNullID.n5_code[4] )
  {
    *(_QWORD *)v3 = *(_QWORD *)&kCharID.n5_name[0];
    *(_QWORD *)&v3[8] = *(_QWORD *)&kCharID.n5_code[2];
    *(_DWORD *)&v3[16] = kCharID.n5_code[4];
    GameFrameWork::NcRaidInvitationReq((GameFrameWork *)v1->m_pkFrameWork, *(Name5 *)v3);
  }
  ((void (__stdcall *)(void *))v1->m_pkInputBox->vfptr[115].__vecDelDtor)(&unk_9C7A5F);
  GameFrameWork::CloseRaidMemberAddWin((GameFrameWork *)v1->m_pkFrameWork);
}

//----- (00700DB0) --------------------------------------------------------
void __thiscall ExpeditionMemberAddWin::OnMemberAddCancel(ExpeditionMemberAddWin *this)
{
  ExpeditionMemberAddWin *v1; // esi@1

  v1 = this;
  ((void (__stdcall *)(_DWORD))this->m_pkInputBox->vfptr[115].__vecDelDtor)(&unk_9C7A91);
  GameFrameWork::CloseRaidMemberAddWin((GameFrameWork *)v1->m_pkFrameWork);
  PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v1->vfptr);
}

//----- (00700DE0) --------------------------------------------------------
void __thiscall ExpeditionMemberAddWin::OnCommand(ExpeditionMemberAddWin *this, unsigned int wParam, int lParam)
{
  ExpeditionMemberAddWin *v3; // esi@1

  v3 = this;
  if ( wParam )
  {
    if ( wParam == 1 )
    {
      ((void (__stdcall *)(_DWORD))this->m_pkInputBox->vfptr[115].__vecDelDtor)(&unk_9C7A91);
      GameFrameWork::CloseRaidMemberAddWin((GameFrameWork *)v3->m_pkFrameWork);
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
    }
  }
  else
  {
    ExpeditionMemberAddWin::OnMemberAddOk(this);
  }
}

//----- (00700E30) --------------------------------------------------------
void __thiscall ExpeditionMemberAddWin::OnEditEnd(ExpeditionMemberAddWin *this, unsigned int wParam, int lParam)
{
  ExpeditionMemberAddWin::OnMemberAddOk(this);
}

//----- (00700E40) --------------------------------------------------------
void __thiscall ExpeditionWin::~ExpeditionWin(ExpeditionWin *this)
{
  ExpeditionWin *v1; // esi@1
  char *v2; // ebx@1
  int v3; // edi@2
  PgWinSpr *v4; // edi@8
  PgWinBut *v5; // edi@13
  PgWinBut *v6; // edi@18
  PgWinBut *v7; // edi@23
  PgWinAbbreviateText *v8; // edi@28
  PgWinText *v9; // edi@33
  PgWinText *v10; // edi@38
  PgWinSpr *v11; // edi@43
  PgWinSpr *v12; // edi@48
  PopupMenuWin *v13; // edi@53
  PopupMenuWin *v14; // edi@57
  PgWinText *v15; // edi@61
  PgWinSpr *v16; // edi@65
  PgWinBut *v17; // edi@69
  PgWinBut *v18; // edi@73
  PgWinBut *v19; // edi@77
  PgWinSpr *v20; // edi@81
  PgWinSpr *v21; // edi@85
  PgWinSpr *v22; // edi@89
  PgWinSpr *v23; // edi@93
  PgWinText *v24; // edi@97
  PgWinText *v25; // edi@101
  PgWinAbbreviateText *v26; // edi@105
  signed int v27; // [sp+14h] [bp-10h]@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ExpeditionWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ExpeditionWin::`vftable'{for `IDirectMessenger'};
  v2 = (char *)this->m_spEntry;
  v27 = 20;
  do
  {
    v3 = *(_DWORD *)v2;
    if ( *(_DWORD *)v2 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v3 + 4)) && v3 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v3)(v3, 1);
      *(_DWORD *)v2 = 0;
    }
    v2 += 4;
    --v27;
  }
  while ( v27 );
  v4 = v1->m_spMovingSlorSpr.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spMovingSlorSpr.m_pObject = 0;
  }
  v5 = v1->m_spCreateBtn.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spCreateBtn.m_pObject = 0;
  }
  v6 = v1->m_spLeaveBtn.m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v1->m_spLeaveBtn.m_pObject = 0;
  }
  v7 = v1->m_spInviteBtn.m_pObject;
  if ( v7 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v1->m_spInviteBtn.m_pObject = 0;
  }
  v8 = v1->m_spNameText.m_pObject;
  if ( v8 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v1->m_spNameText.m_pObject = 0;
  }
  v9 = v1->m_spLevelText.m_pObject;
  if ( v9 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v1->m_spLevelText.m_pObject = 0;
  }
  v10 = v1->m_spClassText.m_pObject;
  if ( v10 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    v1->m_spClassText.m_pObject = 0;
  }
  v11 = v1->m_spMemberMark.m_pObject;
  if ( v11 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    v1->m_spMemberMark.m_pObject = 0;
  }
  v12 = v1->m_spLootingMark.m_pObject;
  if ( v12 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
      v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
    v1->m_spLootingMark.m_pObject = 0;
  }
  v13 = v1->m_spItemGradePopupMenu.m_pObject;
  if ( v13 && !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) && v13 )
    v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
  v14 = v1->m_spLootTypePopupMenu.m_pObject;
  if ( v14 && !InterlockedDecrement((volatile LONG *)&v14->m_uiRefCount) && v14 )
    v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
  v15 = v1->m_spLootName.m_pObject;
  if ( v15 && !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) && v15 )
    v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
  `eh vector destructor iterator'(
    v1->m_spText,
    4u,
    2,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_spBtn,
    4u,
    2,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v16 = v1->m_spCreateSpr.m_pObject;
  if ( v16 && !InterlockedDecrement((volatile LONG *)&v16->m_uiRefCount) && v16 )
    v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
  v17 = v1->m_spInviteBtn.m_pObject;
  if ( v17 && !InterlockedDecrement((volatile LONG *)&v17->m_uiRefCount) && v17 )
    v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
  v18 = v1->m_spLeaveBtn.m_pObject;
  if ( v18 && !InterlockedDecrement((volatile LONG *)&v18->m_uiRefCount) && v18 )
    v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
  v19 = v1->m_spCreateBtn.m_pObject;
  if ( v19 && !InterlockedDecrement((volatile LONG *)&v19->m_uiRefCount) && v19 )
    v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
  v20 = v1->m_spMovingSlorSpr.m_pObject;
  if ( v20 && !InterlockedDecrement((volatile LONG *)&v20->m_uiRefCount) && v20 )
    v20->vfptr->__vecDelDtor((NiRefObject *)v20, 1u);
  v21 = v1->m_spClassBar.m_pObject;
  if ( v21 && !InterlockedDecrement((volatile LONG *)&v21->m_uiRefCount) && v21 )
    v21->vfptr->__vecDelDtor((NiRefObject *)v21, 1u);
  v22 = v1->m_spLootingMark.m_pObject;
  if ( v22 && !InterlockedDecrement((volatile LONG *)&v22->m_uiRefCount) && v22 )
    v22->vfptr->__vecDelDtor((NiRefObject *)v22, 1u);
  v23 = v1->m_spMemberMark.m_pObject;
  if ( v23 && !InterlockedDecrement((volatile LONG *)&v23->m_uiRefCount) && v23 )
    v23->vfptr->__vecDelDtor((NiRefObject *)v23, 1u);
  v24 = v1->m_spClassText.m_pObject;
  if ( v24 && !InterlockedDecrement((volatile LONG *)&v24->m_uiRefCount) && v24 )
    v24->vfptr->__vecDelDtor((NiRefObject *)v24, 1u);
  v25 = v1->m_spLevelText.m_pObject;
  if ( v25 && !InterlockedDecrement((volatile LONG *)&v25->m_uiRefCount) && v25 )
    v25->vfptr->__vecDelDtor((NiRefObject *)v25, 1u);
  v26 = v1->m_spNameText.m_pObject;
  if ( v26 && !InterlockedDecrement((volatile LONG *)&v26->m_uiRefCount) && v26 )
    v26->vfptr->__vecDelDtor((NiRefObject *)v26, 1u);
  `eh vector destructor iterator'(
    v1->m_spEntry,
    4u,
    20,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9C8AD0: using guessed type void (__thiscall *ExpeditionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C8AEC: using guessed type int (__thiscall *ExpeditionWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00701300) --------------------------------------------------------
void __thiscall ExpeditionWin::ClickReset(ExpeditionWin *this)
{
  ExpeditionWin *v1; // esi@1
  unsigned int v2; // eax@2

  v1 = this;
  if ( this->m_bIsSelecteSlot )
  {
    v2 = this->m_uiSelectedNumber[0];
    this->m_bIsSelecteSlot = 0;
    *(_BYTE *)(*(&this->m_uiSelectPartyID + v2) + 412) = 0;
    ((void (__stdcall *)(_DWORD))this->m_spMovingSlorSpr.m_pObject->vfptr[64].__vecDelDtor)(0);
  }
  v1->m_uiSelectedNumber[1] = 0;
  v1->m_uiSelectedNumber[0] = 0;
  v1->m_uiSelectPartyID = 4;
}

//----- (00701360) --------------------------------------------------------
void __thiscall ExpeditionWin::DirectMessage(ExpeditionWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  if ( iMsgTag == 15 )
  {
    switch ( *(_DWORD *)pvBody )
    {
      case 0x404:
        GameFrameWork::NcRaidLootingTypeReq(
          (GameFrameWork *)LODWORD(this->m_kLocal.m_Rotate.m_pEntry[1][0]),
          LOBYTE(this->m_pcToolTipWinText),
          0);
        break;
      case 0x405:
        GameFrameWork::NcRaidLootingTypeReq(
          (GameFrameWork *)LODWORD(this->m_kLocal.m_Rotate.m_pEntry[1][0]),
          LOBYTE(this->m_pcToolTipWinText),
          1);
        break;
      case 0x406:
        GameFrameWork::NcRaidLootingTypeReq(
          (GameFrameWork *)LODWORD(this->m_kLocal.m_Rotate.m_pEntry[1][0]),
          LOBYTE(this->m_pcToolTipWinText),
          2);
        break;
      case 0x408:
        GameFrameWork::NcRaidLootingTypeReq(
          (GameFrameWork *)LODWORD(this->m_kLocal.m_Rotate.m_pEntry[1][0]),
          LOBYTE(this->m_pcToolTipWinText),
          3);
        break;
      case 0x40E:
        GameFrameWork::NcRaidLootingTypeReq(
          (GameFrameWork *)LODWORD(this->m_kLocal.m_Rotate.m_pEntry[1][0]),
          0,
          (char)this->m_pkToolTipParentWin);
        break;
      case 0x40F:
        GameFrameWork::NcRaidLootingTypeReq(
          (GameFrameWork *)LODWORD(this->m_kLocal.m_Rotate.m_pEntry[1][0]),
          1,
          (char)this->m_pkToolTipParentWin);
        break;
      case 0x410:
        GameFrameWork::NcRaidLootingTypeReq(
          (GameFrameWork *)LODWORD(this->m_kLocal.m_Rotate.m_pEntry[1][0]),
          2,
          (char)this->m_pkToolTipParentWin);
        break;
      case 0x411:
        GameFrameWork::NcRaidLootingTypeReq(
          (GameFrameWork *)LODWORD(this->m_kLocal.m_Rotate.m_pEntry[1][0]),
          3,
          (char)this->m_pkToolTipParentWin);
        break;
      default:
        return;
    }
  }
}

//----- (00701470) --------------------------------------------------------
void __thiscall ExpeditionPartyWin::~ExpeditionPartyWin(ExpeditionPartyWin *this)
{
  char *v1; // edi@1
  char *v2; // ebx@1
  int v3; // esi@2
  int v4; // esi@7
  int v5; // esi@12
  int v6; // esi@18
  int v7; // esi@23
  int v8; // esi@29
  PgWinSpr *v9; // esi@35
  PgWinBut *v10; // esi@40
  PgWinBut *v11; // esi@45
  PgWinBut *v12; // esi@50
  PgWinBut *v13; // esi@54
  PgWinSpr *v14; // esi@58
  ExpeditionPartyWin *v15; // [sp+10h] [bp-18h]@1
  signed int v16; // [sp+14h] [bp-14h]@1
  signed int v17; // [sp+18h] [bp-10h]@17

  v15 = this;
  this->vfptr = (NiRefObjectVtbl *)&ExpeditionPartyWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ExpeditionPartyWin::`vftable'{for `IDirectMessenger'};
  v1 = (char *)this->m_apkAbstateBufIcon;
  v2 = (char *)this->m_spParticipant;
  v16 = 5;
  do
  {
    v3 = *((_DWORD *)v2 - 5);
    if ( v3 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v3 + 4)) && v3 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v3)(v3, 1);
      *((_DWORD *)v2 - 5) = 0;
    }
    v4 = *(_DWORD *)v2;
    if ( *(_DWORD *)v2 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v4 + 4)) && v4 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v4)(v4, 1);
      *(_DWORD *)v2 = 0;
    }
    v5 = *((_DWORD *)v2 + 5);
    if ( v5 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v5 + 4)) && v5 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v5)(v5, 1);
      *((_DWORD *)v2 + 5) = 0;
    }
    v17 = 10;
    do
    {
      v6 = *((_DWORD *)v1 - 50);
      if ( v6 )
      {
        if ( !InterlockedDecrement((volatile LONG *)(v6 + 4)) && v6 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v6)(v6, 1);
        *((_DWORD *)v1 - 50) = 0;
      }
      v7 = *(_DWORD *)v1;
      if ( *(_DWORD *)v1 )
      {
        if ( !InterlockedDecrement((volatile LONG *)(v7 + 4)) && v7 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v7)(v7, 1);
        *(_DWORD *)v1 = 0;
      }
      v1 += 4;
      --v17;
    }
    while ( v17 );
    v8 = *((_DWORD *)v2 - 10);
    if ( v8 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(v8 + 4)) && v8 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v8)(v8, 1);
      *((_DWORD *)v2 - 10) = 0;
    }
    PgWinMgr::DestroyWin(&Pgg_kWinMgr, *((PgWin **)v2 + 118));
    v2 += 4;
    --v16;
  }
  while ( v16 );
  v9 = v15->m_spPanel.m_pObject;
  if ( v9 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v15->m_spPanel.m_pObject = 0;
  }
  v10 = v15->m_spMaxBtn.m_pObject;
  if ( v10 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    v15->m_spMaxBtn.m_pObject = 0;
  }
  v11 = v15->m_spMinBtn.m_pObject;
  if ( v11 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    v15->m_spMinBtn.m_pObject = 0;
  }
  `eh vector destructor iterator'(
    v15->m_spPopupMenu,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v12 = v15->m_spMaxBtn.m_pObject;
  if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
    v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
  v13 = v15->m_spMinBtn.m_pObject;
  if ( v13 && !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) && v13 )
    v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
  v14 = v15->m_spPanel.m_pObject;
  if ( v14 && !InterlockedDecrement((volatile LONG *)&v14->m_uiRefCount) && v14 )
    v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
  `eh vector destructor iterator'(
    v15->m_apkAbstateBufIcon,
    4u,
    50,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v15->m_apkAbstateBuf,
    4u,
    50,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v15->m_spParticipantName,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v15->m_spParticipant,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v15->m_spMember,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v15->m_spLRBut,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v15->vfptr);
}
// 9C8D10: using guessed type void (__thiscall *ExpeditionPartyWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C8D2C: using guessed type int (__thiscall *ExpeditionPartyWin::`vftable'{for `NiNode'})(void *p, char);

//----- (007017D0) --------------------------------------------------------
void __thiscall ExpeditionPartyWin::DirectMessage(ExpeditionPartyWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  ExpeditionPartyWin *v4; // edi@1
  signed int v5; // eax@3
  PgWinSpr *v6; // ecx@9
  void (__thiscall *v7)(NiPointer<AbstateIcon> *, int *, int *); // edx@13
  int v8; // eax@14
  int v9; // eax@16
  ExpeditionWin *v10; // ecx@18
  int iSy; // [sp+8h] [bp-8h]@13
  int iSx; // [sp+Ch] [bp-4h]@13

  v4 = this;
  if ( (unsigned __int8)((int (__thiscall *)(_DWORD))this[-1].m_apkAbstateBufIcon[1][1].m_pObject->m_uiDepth)(&this[-1].m_apkAbstateBufIcon[1][1]) )
  {
    if ( iMsgTag == 15 )
    {
      v5 = 0;
      switch ( *(_DWORD *)pvBody )
      {
        case 0x3F7:
          v5 = 1;
          break;
        case 0x3F8:
          v5 = 2;
          break;
        case 0x3F9:
          v5 = 4;
          break;
        case 0x3FA:
          v5 = 8;
          break;
        case 0x3FB:
          v5 = 16;
          break;
        default:
          break;
      }
      v6 = v4->m_apkAbstateBuf[4][9].m_pObject;
      if ( *((_BYTE *)pvBody + 4) )
        v4->m_apkAbstateBufIcon[0][(_DWORD)v6 + 6].m_pObject = (unsigned int)v4->m_apkAbstateBufIcon[0][(_DWORD)v6 + 6].m_pObject | v5;
      else
        v4->m_apkAbstateBufIcon[0][(_DWORD)v6 + 6].m_pObject = (unsigned int)v4->m_apkAbstateBufIcon[0][(_DWORD)v6 + 6].m_pObject & ~v5;
    }
    if ( pkFrom )
    {
      v7 = (void (__thiscall *)(NiPointer<AbstateIcon> *, int *, int *))LODWORD(v4[-1].m_apkAbstateBufIcon[1][1].m_pObject->m_kBound.m_kCenter.z);
      iSx = PgWin::ms_iMsX;
      iSy = PgWin::ms_iMsY;
      v7(&v4[-1].m_apkAbstateBufIcon[1][1], &iSx, &iSy);
      if ( iSx >= 0 )
      {
        v8 = ((int (__thiscall *)(_DWORD))LODWORD(v4[-1].m_apkAbstateBufIcon[1][1].m_pObject->m_kWorld.m_Translate.y))(&v4[-1].m_apkAbstateBufIcon[1][1]);
        if ( iSx < v8 && iSy >= 0 )
        {
          v9 = ((int (__thiscall *)(_DWORD))LODWORD(v4[-1].m_apkAbstateBufIcon[1][1].m_pObject->m_kWorld.m_Translate.z))(&v4[-1].m_apkAbstateBufIcon[1][1]);
          if ( iSy < v9 && iMsgTag == 4 )
          {
            v10 = *(ExpeditionWin **)(LODWORD(v4->m_kLocal.m_Rotate.m_pEntry[1][0]) + 1228);
            if ( v10 )
            {
              if ( v10->m_bIsSelect )
              {
                v10->m_bIsSelect = 0;
                ExpeditionWin::ClickReset(v10);
              }
            }
          }
        }
      }
    }
  }
}

//----- (00701910) --------------------------------------------------------
void __thiscall ExpeditionPartyWin::AlignBuf(ExpeditionPartyWin *this, int row, int column)
{
  char *v3; // esi@1
  signed int v4; // edi@2
  int v5; // ebx@3
  int v6; // ST20_4@3
  int v7; // eax@3
  int v8; // ebx@3
  int v9; // ST20_4@3
  int v10; // eax@3
  int v11; // ebx@3
  int *v12; // ST20_4@3
  int v13; // eax@3
  int v14; // ebx@3
  int *v15; // ST20_4@3
  int v16; // eax@3
  signed int v17; // [sp+Ch] [bp-14h]@1
  char *v18; // [sp+10h] [bp-10h]@1
  ExpeditionPartyWin *v19; // [sp+14h] [bp-Ch]@1
  char *v20; // [sp+18h] [bp-8h]@1
  char *columna; // [sp+2Ch] [bp+Ch]@1

  v19 = this;
  v3 = (char *)this->m_apkAbstateBufIcon;
  v18 = (char *)&this->m_spParticipant[column];
  v20 = (char *)this->m_spParticipant;
  columna = (char *)&this->m_spParticipant[column];
  v17 = 5;
  do
  {
    (*(void (**)(void))(**(_DWORD **)v20 + 168))();
    v4 = 0;
    do
    {
      v5 = **((_DWORD **)v3 - 50);
      v6 = *((_DWORD *)v3 - 50);
      v7 = (*(int (**)(void))(**(_DWORD **)v18 + 164))();
      (*(void (__thiscall **)(int, unsigned int))(v5 + 172))(v6, v4 + v7 + v19->m_uiHpBarWidth + 1);
      v8 = **((_DWORD **)v3 - 50);
      v9 = *((_DWORD *)v3 - 50);
      v10 = (*(int (**)(void))(**(_DWORD **)columna + 168))();
      (*(void (__thiscall **)(int, int))(v8 + 176))(v9, v10);
      v11 = **(_DWORD **)v3;
      v12 = *(int **)v3;
      v13 = (*(int (**)(void))(**(_DWORD **)v18 + 164))();
      (*(void (__thiscall **)(int *, unsigned int))(v11 + 172))(v12, v4 + v13 + v19->m_uiHpBarWidth + 3);
      v14 = **(_DWORD **)v3;
      v15 = *(int **)v3;
      v16 = (*(int (**)(void))(**(_DWORD **)columna + 168))();
      (*(void (__thiscall **)(int *, int))(v14 + 176))(v15, v16 + 2);
      v4 += 20;
      v3 += 4;
    }
    while ( v4 < 200 );
    v20 += 4;
    columna += 4;
    --v17;
  }
  while ( v17 );
  v19->m_uiVisiableNums = row;
}

//----- (00701A40) --------------------------------------------------------
void __thiscall ExpeditionPartyWin::SetOption(ExpeditionPartyWin *this, unsigned int uiIndex, unsigned int uiOpt)
{
  ExpeditionPartyWin *v3; // edi@1
  char *v4; // esi@1
  int v5; // esi@4
  int v6; // esi@7
  int v7; // esi@10
  int v8; // esi@13
  DirectUserMsgBody_PopupMenuSetCheckBox kBody; // [sp+Ch] [bp-8h]@1

  v3 = this;
  v4 = (char *)&this->m_spPopupMenu[uiIndex].m_pObject->vfptr;
  kBody.iPopupMenuID = 1015;
  kBody.bCheck = uiOpt & 1;
  if ( *((_DWORD *)v4 + 1) )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v4 + 1) + 4))(16, &kBody, v4);
    if ( *((_DWORD *)v4 + 1) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**((_DWORD **)v4 + 1) + 16))(16, &kBody, v4);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v4 + 16))(v4, 16, &kBody, v4);
  v5 = (int)&v3->m_spPopupMenu[uiIndex].m_pObject->vfptr;
  kBody.iPopupMenuID = 1016;
  kBody.bCheck = (uiOpt >> 1) & 1;
  if ( *(_DWORD *)(v5 + 4) )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v5 + 4) + 4))(16, &kBody, v5);
    if ( *(_DWORD *)(v5 + 4) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v5 + 4) + 16))(16, &kBody, v5);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v5 + 16))(v5, 16, &kBody, v5);
  v6 = (int)&v3->m_spPopupMenu[uiIndex].m_pObject->vfptr;
  kBody.iPopupMenuID = 1017;
  kBody.bCheck = (uiOpt >> 2) & 1;
  if ( *(_DWORD *)(v6 + 4) )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v6 + 4) + 4))(16, &kBody, v6);
    if ( *(_DWORD *)(v6 + 4) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v6 + 4) + 16))(16, &kBody, v6);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v6 + 16))(v6, 16, &kBody, v6);
  v7 = (int)&v3->m_spPopupMenu[uiIndex].m_pObject->vfptr;
  kBody.iPopupMenuID = 1018;
  kBody.bCheck = (uiOpt >> 3) & 1;
  if ( *(_DWORD *)(v7 + 4) )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v7 + 4) + 4))(16, &kBody, v7);
    if ( *(_DWORD *)(v7 + 4) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v7 + 4) + 16))(16, &kBody, v7);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v7 + 16))(v7, 16, &kBody, v7);
  v8 = (int)&v3->m_spPopupMenu[uiIndex].m_pObject->vfptr;
  kBody.iPopupMenuID = 1019;
  kBody.bCheck = (uiOpt >> 4) & 1;
  if ( *(_DWORD *)(v8 + 4) )
  {
    (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v8 + 4) + 4))(16, &kBody, v8);
    if ( *(_DWORD *)(v8 + 4) )
      (*(void (__stdcall **)(_DWORD, _DWORD, _DWORD))(**(_DWORD **)(v8 + 4) + 16))(16, &kBody, v8);
  }
  (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v8 + 16))(v8, 16, &kBody, v8);
  v3->m_uiBuffViewOption[uiIndex] = uiOpt;
}

//----- (00701C40) --------------------------------------------------------
void __thiscall ExpeditionLootSelectWin::OnSlideBar(ExpeditionLootSelectWin *this)
{
  ExpeditionLootSelectWin *v1; // esi@1
  SlideListWin *v2; // eax@1
  SlideBar *v3; // ecx@2

  v1 = this;
  v2 = this->m_pSeletMemberList;
  if ( v2 )
  {
    v3 = this->m_pkSlideBarEx;
    if ( v3 )
    {
      SlideBar::SetSplitCnt(v3, v2->m_nSlideSplitCnt);
      v1->m_pSeletMemberList->m_nViewStartPos = v1->m_pkSlideBarEx->m_nCurPos;
      SlideListWin::UpdateViewList(v1->m_pSeletMemberList);
    }
  }
}

//----- (00701C90) --------------------------------------------------------
void __thiscall ExpeditionLootOptionWin::ExpeditionLootOptionWin(ExpeditionLootOptionWin *this)
{
  ExpeditionLootOptionWin *v1; // esi@1
  PopupMenuWin *v2; // edi@1
  PopupMenuWin *v3; // edi@6

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ExpeditionLootOptionWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ExpeditionLootOptionWin::`vftable'{for `IDirectMessenger'};
  v1->m_spPopupMenu.m_pObject = 0;
  `eh vector constructor iterator'(
    v1->m_spBtn,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spText,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_spDicePopupMenu.m_pObject = 0;
  v1->m_spLootName.m_pObject = 0;
  v2 = v1->m_spPopupMenu.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spPopupMenu.m_pObject = 0;
  }
  v3 = v1->m_spDicePopupMenu.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
    {
      if ( v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
    v1->m_spDicePopupMenu.m_pObject = 0;
  }
}
// 9C8F50: using guessed type void (__thiscall *ExpeditionLootOptionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C8F6C: using guessed type int (__thiscall *ExpeditionLootOptionWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00701DA0) --------------------------------------------------------
void __thiscall ExpeditionLootOptionWin::~ExpeditionLootOptionWin(ExpeditionLootOptionWin *this)
{
  ExpeditionLootOptionWin *v1; // ebx@1
  NiPointer<PgWinText> *v2; // edi@1
  PgWinText *v3; // esi@2
  PgWinText *v4; // esi@7
  PgWinText *v5; // esi@13
  PgWinText *v6; // esi@18
  LOOTING_TYPE v7; // esi@23
  PgWinText *v8; // esi@28
  PopupMenuWin *v9; // esi@32
  PopupMenuWin *v10; // esi@36
  signed int v11; // [sp+14h] [bp-10h]@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&ExpeditionLootOptionWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ExpeditionLootOptionWin::`vftable'{for `IDirectMessenger'};
  PgWinMgr::DestroyWin(&Pgg_kWinMgr, (PgWin *)&this->m_spPopupMenu.m_pObject->vfptr);
  v2 = v1->m_spText;
  v11 = 5;
  do
  {
    v3 = v2[-5].m_pObject;
    if ( v3 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      v2[-5].m_pObject = 0;
    }
    v4 = v2->m_pObject;
    if ( v2->m_pObject )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      v2->m_pObject = 0;
    }
    ++v2;
    --v11;
  }
  while ( v11 );
  v5 = v1->m_spLootName.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spLootName.m_pObject = 0;
  }
  v6 = v1->m_spText[0].m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v1->m_spText[0].m_pObject = 0;
  }
  v7 = v1->m_eLootType[0];
  if ( v7 )
  {
    if ( !InterlockedDecrement((volatile LONG *)(v7 + 4)) && v7 )
      (**(void (__thiscall ***)(_DWORD, _DWORD))v7)(v7, 1);
    v1->m_eLootType[0] = 0;
  }
  v8 = v1->m_spLootName.m_pObject;
  if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
    v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
  v9 = v1->m_spDicePopupMenu.m_pObject;
  if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
    v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
  `eh vector destructor iterator'(
    v1->m_spText,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_spBtn,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v10 = v1->m_spPopupMenu.m_pObject;
  if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
    v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9C8F50: using guessed type void (__thiscall *ExpeditionLootOptionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C8F6C: using guessed type int (__thiscall *ExpeditionLootOptionWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00701FB0) --------------------------------------------------------
void __thiscall ExpeditionLootOptionWin::DirectMessage(ExpeditionLootOptionWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  if ( iMsgTag == 15 )
  {
    switch ( *(_DWORD *)pvBody )
    {
      case 0x404:
        GameFrameWork::NcRaidLootingTypeReq(
          (GameFrameWork *)LODWORD(this->m_kLocal.m_Rotate.m_pEntry[1][0]),
          LOBYTE(this->m_kWorld.m_Rotate.m_pEntry[1][0]),
          0);
        break;
      case 0x405:
        GameFrameWork::NcRaidLootingTypeReq(
          (GameFrameWork *)LODWORD(this->m_kLocal.m_Rotate.m_pEntry[1][0]),
          LOBYTE(this->m_kWorld.m_Rotate.m_pEntry[1][0]),
          1);
        break;
      case 0x406:
        GameFrameWork::NcRaidLootingTypeReq(
          (GameFrameWork *)LODWORD(this->m_kLocal.m_Rotate.m_pEntry[1][0]),
          LOBYTE(this->m_kWorld.m_Rotate.m_pEntry[1][0]),
          2);
        break;
      case 0x408:
        GameFrameWork::NcRaidLootingTypeReq(
          (GameFrameWork *)LODWORD(this->m_kLocal.m_Rotate.m_pEntry[1][0]),
          LOBYTE(this->m_kWorld.m_Rotate.m_pEntry[1][0]),
          3);
        break;
      default:
        return;
    }
  }
}

//----- (00702030) --------------------------------------------------------
void __thiscall ExpeditionLootOptionWin::SetLooter(ExpeditionLootOptionWin *this, const char *name)
{
  if ( name )
    ((void (__stdcall *)(_DWORD))this->m_spLootName.m_pObject->vfptr[118].__vecDelDtor)(name);
}

//----- (00702050) --------------------------------------------------------
void __thiscall EntryIconWin::EntryIconWin(EntryIconWin *this)
{
  EntryIconWin *v1; // esi@1

  v1 = this;
  PgWin::PgWin((PgWin *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&EntryIconWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&EntryIconWin::`vftable'{for `IDirectMessenger'};
  v1->m_spNameText.m_pObject = 0;
  v1->m_spLevelText.m_pObject = 0;
  `eh vector constructor iterator'(
    v1->m_spClassBar,
    4u,
    6,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_spClassText.m_pObject = 0;
  v1->m_spMemberMark.m_pObject = 0;
  v1->m_spLootingMark.m_pObject = 0;
  v1->m_spPosBar.m_pObject = 0;
  v1->m_spBackImagePlane.m_pObject = 0;
  v1->m_spSubImagePlane.m_pObject = 0;
  v1->m_spMtrlProp.m_pObject = 0;
  v1->m_spFixedMtrlProp.m_pObject = 0;
  NiObjectNET::NiObjectNET((NiObjectNET *)&v1->m_spAlphaProp.vfptr);
  v1->m_spAlphaProp.vfptr = (NiRefObjectVtbl *)&NiAlphaProperty::`vftable';
  v1->m_spAlphaProp.m_ucAlphaTestRef = 0;
  v1->m_spAlphaProp.m_uFlags = 236;
  v1->m_spLRBut.m_pObject = 0;
  v1->m_kAlphaControl.fTimeLeftToAppear = 1.0;
  v1->m_bIsKeep = 0;
  v1->m_kAlphaControl.fAlphaValue = 0.0;
}
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);
// 9C88E8: using guessed type void (__thiscall *EntryIconWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C8904: using guessed type int (__thiscall *EntryIconWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00702150) --------------------------------------------------------
void __thiscall EntryIconWin::OnCommand(EntryIconWin *this, unsigned int wParam, int lParam)
{
  EntryIconWin *v3; // esi@1
  PgWin *v4; // eax@2
  unsigned int v5; // edx@3

  v3 = this;
  if ( wParam == this->m_uiCmdMsg )
  {
    v4 = PgWin::GetParentWin((PgWin *)&this->vfptr);
    if ( !v4 )
      return;
    v5 = v3->m_uiCmdMsg;
    goto LABEL_7;
  }
  if ( wParam == this->m_uiRCmdMsg )
  {
    v4 = PgWin::GetParentWin((PgWin *)&this->vfptr);
    if ( v4 )
    {
      v5 = v3->m_uiRCmdMsg;
LABEL_7:
      PgWin::PostCommandMsg(v4, v5, v3->m_uiInvIndex);
      return;
    }
  }
}

//----- (007021A0) --------------------------------------------------------
void __thiscall EntryIconWin::ShowLeaderLooterMark(EntryIconWin *this)
{
  EntryIconWin *v1; // esi@1
  RaidMemberInfo *v2; // eax@1
  RaidMemberInfo *v3; // edi@1
  _BYTE v4[20]; // ST00_20@2
  PgWin *v5; // ebx@3
  char *v6; // eax@3
  void *(__thiscall *v7)(NiRefObject *, unsigned int); // eax@3
  _BYTE v8[20]; // ST00_20@4
  PgWin *v9; // ebx@5
  char *v10; // eax@5
  _BYTE v11[20]; // ST00_20@8
  PgWin *v12; // edi@10
  char *v13; // eax@10

  v1 = this;
  v2 = RaidInfo::GetRaidMemberInfoByIndex(&g_kRaidinfo, this->m_uiInvIndex - 1);
  v3 = v2;
  if ( !v2 )
  {
    ((void (__stdcall *)(_DWORD))v1->m_spMemberMark.m_pObject->vfptr[64].__vecDelDtor)(0);
    v1->m_spLootingMark.m_pObject->vfptr[64].__vecDelDtor((NiRefObject *)v1->m_spLootingMark.m_pObject, 0);
    return;
  }
  *(_DWORD *)v4 = v2->m_kCharID.n5_code[0];
  *(_QWORD *)&v4[4] = *(_QWORD *)&v2->m_kCharID.n5_code[1];
  *(_QWORD *)&v4[12] = *(_QWORD *)&v2->m_kCharID.n5_code[3];
  if ( RaidInfo::IsLeader(&g_kRaidinfo, *(Name5 *)v4) )
  {
    v5 = (PgWin *)&v1->m_spMemberMark.m_pObject->vfptr;
    v6 = (char *)TextData2::Get(0x84936ABE);
    PgWin::SetToolTipWinText(v5, v6);
    v1->m_spMemberMark.m_pObject->m_pkToolTipWin = g_pkToolTipWin;
    ((void (__stdcall *)(signed int))v1->m_spMemberMark.m_pObject->vfptr[60].__vecDelDtor)(1);
    ((void (__stdcall *)(signed int))v1->m_spMemberMark.m_pObject->vfptr[62].__vecDelDtor)(1);
    ((void (__stdcall *)(signed int))v1->m_spMemberMark.m_pObject->vfptr[64].__vecDelDtor)(1);
    v7 = v1->m_spMemberMark.m_pObject->vfptr[123].__vecDelDtor;
  }
  else
  {
    *(_DWORD *)v8 = v3->m_kCharID.n5_code[0];
    *(_QWORD *)&v8[4] = *(_QWORD *)&v3->m_kCharID.n5_code[1];
    *(_QWORD *)&v8[12] = *(_QWORD *)&v3->m_kCharID.n5_code[3];
    if ( RaidInfo::IsSubLeader(&g_kRaidinfo, *(Name5 *)v8) )
    {
      v9 = (PgWin *)&v1->m_spMemberMark.m_pObject->vfptr;
      v10 = (char *)TextData2::Get(0xDDE0AFBD);
      PgWin::SetToolTipWinText(v9, v10);
      v1->m_spMemberMark.m_pObject->m_pkToolTipWin = g_pkToolTipWin;
      ((void (__stdcall *)(signed int))v1->m_spMemberMark.m_pObject->vfptr[60].__vecDelDtor)(1);
      ((void (__stdcall *)(signed int))v1->m_spMemberMark.m_pObject->vfptr[62].__vecDelDtor)(1);
      ((void (__stdcall *)(signed int))v1->m_spMemberMark.m_pObject->vfptr[64].__vecDelDtor)(1);
      ((void (__stdcall *)(signed int))v1->m_spMemberMark.m_pObject->vfptr[123].__vecDelDtor)(1);
      goto LABEL_8;
    }
    v7 = v1->m_spMemberMark.m_pObject->vfptr[64].__vecDelDtor;
  }
  ((void (__stdcall *)(_DWORD))v7)(0);
LABEL_8:
  *(_DWORD *)v11 = v3->m_kCharID.n5_code[0];
  *(_QWORD *)&v11[4] = *(_QWORD *)&v3->m_kCharID.n5_code[1];
  *(_QWORD *)&v11[12] = *(_QWORD *)&v3->m_kCharID.n5_code[3];
  if ( RaidInfo::IsLooter(&g_kRaidinfo, *(Name5 *)v11) && g_kRaidinfo.m_eLootType == 2 )
  {
    v12 = (PgWin *)&v1->m_spLootingMark.m_pObject->vfptr;
    v13 = (char *)TextData2::Get(0x799878B4u);
    PgWin::SetToolTipWinText(v12, v13);
    v1->m_spLootingMark.m_pObject->m_pkToolTipWin = g_pkToolTipWin;
    ((void (__stdcall *)(signed int))v1->m_spLootingMark.m_pObject->vfptr[60].__vecDelDtor)(1);
    ((void (__stdcall *)(signed int))v1->m_spLootingMark.m_pObject->vfptr[62].__vecDelDtor)(1);
    ((void (__stdcall *)(signed int))v1->m_spLootingMark.m_pObject->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v1->m_spLootingMark.m_pObject->vfptr[69].__vecDelDtor)(1.0);
  }
  else
  {
    ((void (__stdcall *)(_DWORD))v1->m_spLootingMark.m_pObject->vfptr[64].__vecDelDtor)(0);
  }
  ((void (__stdcall *)(_DWORD))v1->m_spMemberMark.m_pObject->vfptr[69].__vecDelDtor)(1.0);
}

//----- (00702430) --------------------------------------------------------
char __thiscall ExpeditionMemberAddWin::Create(ExpeditionMemberAddWin *this, PgFrameWork *pkFrameWork)
{
  ExpeditionMemberAddWin *v2; // esi@1
  NiSourceTexture *v3; // ebx@1
  NiTexturePalette *v4; // edi@1
  const char *v5; // eax@3
  NiAVObject *v6; // eax@4
  NiTexturingProperty *v7; // eax@4
  NiTexturingProperty *v8; // edi@4
  NiTexturingProperty::Map *v9; // eax@6
  PgSprData *v10; // eax@8
  NiNode *v11; // esi@11
  NiSourceTexture *v13; // eax@16
  PgSprData *v14; // eax@17
  PgWinSpr *v15; // eax@19
  PgFont *v16; // eax@21
  unsigned int v17; // edi@21
  unsigned int v18; // ST14_4@21
  int v19; // eax@21
  EditWin *v20; // edi@21
  NiUnsharedGeometryGroup *v21; // eax@21
  PgSprData *v22; // edi@21
  NiPointer<PgSprData::PgHitTester> *v23; // edx@21
  unsigned int v24; // edi@21
  PgFont *v25; // eax@21
  PgWinText *v26; // edi@21
  NiUnsharedGeometryGroup *v27; // eax@21
  PgSprData *v28; // edi@21
  NiPointer<PgSprData::PgHitTester> *v29; // edx@21
  unsigned int v30; // edi@21
  unsigned int v31; // ebx@21
  PgFont *v32; // eax@21
  PgWinText *v33; // edi@21
  NiRefObjectVtbl *v34; // ebx@21
  NiUnsharedGeometryGroup *v35; // eax@21
  EditWin *v36; // eax@21
  NiTexturingProperty *v37; // edi@21
  NiNode *v38; // edi@23
  UIUtil ui; // [sp+44h] [bp-30h]@21
  NiPointer<NiTexturingProperty> spTexProp; // [sp+58h] [bp-1Ch]@4
  int uiLeft; // [sp+5Ch] [bp-18h]@8
  int uiTop; // [sp+60h] [bp-14h]@8
  NiPointer<NiNode> spNode; // [sp+64h] [bp-10h]@1
  int v44; // [sp+70h] [bp-4h]@1
  PgFrameWork *pkFrameWorka; // [sp+7Ch] [bp+8h]@21
  PgFrameWork *pkFrameWorkb; // [sp+7Ch] [bp+8h]@21
  PgFrameWork *pkFrameWorkc; // [sp+7Ch] [bp+8h]@21

  v2 = this;
  v3 = 0;
  spNode.m_pObject = 0;
  this->m_pkFrameWork = pkFrameWork;
  v4 = pTexturePalette;
  v44 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "Game\\MessageWin.nif");
  PgUtil::LoadNodeNifFile(v5, &spNode, v4);
  if ( !spNode.m_pObject )
    return 0;
  v6 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Panel01");
  v7 = (NiTexturingProperty *)NiAVObject::GetProperty(v6, 8);
  v8 = v7;
  spTexProp.m_pObject = v7;
  if ( v7 )
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  v9 = *v8->m_kMaps.m_pBase;
  LOBYTE(v44) = 1;
  if ( v9 )
    v3 = (NiSourceTexture *)v9->m_spTexture.m_pObject;
  v10 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Panel01", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v10, 0, pkFrameWork, "ExpeditionMemberAddWin", 0) )
  {
    LOBYTE(v44) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v11 = spNode.m_pObject;
    v44 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v11 )
        v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    }
    return 0;
  }
  v13 = MenuTexMgr::GetTexture(0x13u);
  if ( v13 )
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v13);
  else
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  v15 = PgWinSpr::CreateWin(uiLeft, uiTop, v14, (PgWin *)&v2->vfptr, 0, 0);
  if ( v15 )
    v15->vfptr[60].__vecDelDtor((NiRefObject *)v15, 0);
  v16 = Font::Get(0);
  v17 = v16->m_uiDefHeight;
  v18 = v16->m_uiDefHeight;
  v19 = ((int (__thiscall *)(ExpeditionMemberAddWin *))v2->vfptr[36].__vecDelDtor)(v2);
  v20 = EditWin::CreateWin(8, v17 + 3, v19 - 16, v18, (PgWin *)&v2->vfptr, MULTILINE, 0x64u, 1u, 1, 0, 1);
  EditWin::SetImeStatus(v20, IS_KOREAN);
  pkFrameWorka = (PgFrameWork *)v20->vfptr;
  v21 = TextData2::Get(0x89694B76);
  ((void (__thiscall *)(EditWin *, NiUnsharedGeometryGroup *))pkFrameWorka[12].m_BackFrameID)(v20, v21);
  EditWin::SetEnable(v20, 0);
  v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor02", &uiLeft, &uiTop, v3);
  PgSprData::Add(v22, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick02");
  PgSprData::Add(v22, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver02");
  PgWinBut::CreateWin(uiLeft, uiTop, v22, (PgWin *)&v2->vfptr, 0, 0, 0);
  v23 = v22->m_akHitTester.m_pBase;
  v24 = v23->m_pObject->m_uiHeight;
  pkFrameWorkb = (PgFrameWork *)v23->m_pObject->m_uiWidth;
  v25 = Font::Get(0);
  v26 = PgWinText::CreateWin(uiLeft, uiTop + 1, (unsigned int)pkFrameWorkb, v24, v25, (PgWin *)&v2->vfptr, 0, 0);
  v26->vfptr[122].__vecDelDtor((NiRefObject *)v26, 5u);
  pkFrameWorkc = (PgFrameWork *)v26->vfptr;
  v27 = TextData::Get(0x43706657u);
  ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkFrameWorkc[13].m_pkMsgHooker)(v26, v27);
  v26->vfptr[60].__vecDelDtor((NiRefObject *)v26, 0);
  v28 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BtnNor03", &uiLeft, &uiTop, v3);
  PgSprData::Add(v28, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnClick03");
  PgSprData::Add(v28, (NiAVObject *)&spNode.m_pObject->vfptr, "BtnOver03");
  PgWinBut::CreateWin(uiLeft, uiTop, v28, (PgWin *)&v2->vfptr, 1u, 0, 0);
  v29 = v28->m_akHitTester.m_pBase;
  v30 = v29->m_pObject->m_uiHeight;
  v31 = v29->m_pObject->m_uiWidth;
  v32 = Font::Get(0);
  v33 = PgWinText::CreateWin(uiLeft, uiTop + 1, v31, v30, v32, (PgWin *)&v2->vfptr, 0, 0);
  v33->vfptr[122].__vecDelDtor((NiRefObject *)v33, 5u);
  v34 = v33->vfptr;
  v35 = TextData::Get(0x88A297E1);
  v34[118].__vecDelDtor((NiRefObject *)v33, (unsigned int)v35);
  v33->vfptr[60].__vecDelDtor((NiRefObject *)v33, 0);
  UIUtil::UIUtil(&ui);
  LOBYTE(v44) = 2;
  UIUtil::SetOffset(&ui, 0, 0);
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v36 = UIUtil::CreateEdit(&ui, "LotInput", 16, NORMAL, 0, 1);
  v2->m_pkInputBox = v36;
  v36->vfptr[115].__vecDelDtor((NiRefObject *)v36, (unsigned int)&unk_9C7A5D);
  ((void (__stdcall *)(_DWORD))v2->m_pkInputBox->m_spEditWin.m_pObject->vfptr[15].__vecDelDtor)(0);
  ((void (__thiscall *)(ExpeditionMemberAddWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  LOBYTE(v44) = 1;
  UIUtil::~UIUtil(&ui);
  v37 = spTexProp.m_pObject;
  LOBYTE(v44) = 0;
  if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
    v37->vfptr->__vecDelDtor((NiRefObject *)v37, 1u);
  v38 = spNode.m_pObject;
  v44 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v38 )
    v38->vfptr->__vecDelDtor((NiRefObject *)v38, 1u);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (007028D0) --------------------------------------------------------
void __thiscall ExpeditionWin::ExpeditionWin(ExpeditionWin *this)
{
  ExpeditionWin *v1; // esi@1
  PgWinAbbreviateText *v2; // edi@1
  PgWinText *v3; // edi@6
  PgWinText *v4; // edi@11
  PgWinSpr *v5; // edi@16
  PgWinSpr *v6; // edi@21

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ExpeditionWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ExpeditionWin::`vftable'{for `IDirectMessenger'};
  `eh vector constructor iterator'(
    v1->m_spEntry,
    4u,
    20,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_spNameText.m_pObject = 0;
  v1->m_spLevelText.m_pObject = 0;
  v1->m_spClassText.m_pObject = 0;
  v1->m_spMemberMark.m_pObject = 0;
  v1->m_spLootingMark.m_pObject = 0;
  v1->m_spClassBar.m_pObject = 0;
  v1->m_spMovingSlorSpr.m_pObject = 0;
  v1->m_spCreateBtn.m_pObject = 0;
  v1->m_spLeaveBtn.m_pObject = 0;
  v1->m_spInviteBtn.m_pObject = 0;
  v1->m_spCreateSpr.m_pObject = 0;
  `eh vector constructor iterator'(
    v1->m_spBtn,
    4u,
    2,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spText,
    4u,
    2,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_spLootName.m_pObject = 0;
  v1->m_spLootTypePopupMenu.m_pObject = 0;
  v1->m_spItemGradePopupMenu.m_pObject = 0;
  v1->m_bIsSelect = 0;
  v1->m_bIsSelecteSlot = 0;
  v1->m_uiSelectedNumber[1] = 0;
  v1->m_uiSelectedNumber[0] = 0;
  v1->m_uiSelectPartyID = 4;
  v2 = v1->m_spNameText.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spNameText.m_pObject = 0;
  }
  v3 = v1->m_spLevelText.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spLevelText.m_pObject = 0;
  }
  v4 = v1->m_spClassText.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_spClassText.m_pObject = 0;
  }
  v5 = v1->m_spMemberMark.m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v1->m_spMemberMark.m_pObject = 0;
  }
  v6 = v1->m_spLootingMark.m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    v1->m_spLootingMark.m_pObject = 0;
  }
}
// 9C8AD0: using guessed type void (__thiscall *ExpeditionWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C8AEC: using guessed type int (__thiscall *ExpeditionWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00702AE0) --------------------------------------------------------
void __thiscall ExpeditionWin::OnCommand(ExpeditionWin *this, unsigned int wParam, int lParam)
{
  ExpeditionWin *v3; // esi@1
  PgWin *v4; // esi@3
  GameFrameWork *v5; // esi@11
  NiUnsharedGeometryGroup *v6; // eax@11
  unsigned int v7; // edi@19
  ExpeditionPartyWin *v8; // ebx@20
  Char *v9; // eax@27
  RaidMemberInfo *v10; // eax@32
  RaidMemberInfo *v11; // edi@32
  _BYTE v12[20]; // ST00_20@33
  void *(__thiscall *v13)(NiRefObject *, unsigned int); // eax@34
  _BYTE v14[20]; // ST00_20@36
  _BYTE v15[20]; // ST00_20@39
  bool v16; // zf@39
  void *(__thiscall *v17)(NiRefObject *, unsigned int); // edx@50
  NiRefObjectVtbl **v18; // ebx@54
  NiRefObjectVtbl *v19; // edi@54
  int v20; // eax@54
  NiRefObjectVtbl **v21; // ebx@54
  NiRefObjectVtbl *v22; // edi@54
  int v23; // eax@54
  unsigned int v24; // eax@57
  unsigned int v25; // ecx@57
  const char *v26; // eax@65
  unsigned int v27; // edi@65
  PgWinBut *v28; // edi@73
  int v29; // ebx@73
  int v30; // ebx@73
  int v31; // eax@73
  int v32; // edi@73
  int v33; // eax@73
  int v34; // edi@73
  int v35; // eax@73
  PopupMenuWin *v36; // esi@73
  PgWinBut *v37; // edi@77
  int v38; // ebx@77
  int v39; // ebx@77
  int v40; // eax@77
  int v41; // edi@77
  int v42; // eax@77
  int v43; // edi@77
  int v44; // eax@77
  unsigned int v45; // [sp+Ch] [bp-10h]@10
  int v46; // [sp+10h] [bp-Ch]@0
  NiRefObjectVtbl *wParama; // [sp+24h] [bp+8h]@73
  NiRefObjectVtbl *wParamb; // [sp+24h] [bp+8h]@77
  NiRefObjectVtbl **lParama; // [sp+28h] [bp+Ch]@73
  NiRefObjectVtbl **lParamb; // [sp+28h] [bp+Ch]@77

  v3 = this;
  switch ( wParam )
  {
    case 1u:
    case 6u:
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
      PgWin::OnClose((PgWin *)&v3->vfptr);
      return;
    case 2u:
      v4 = (PgWin *)this->m_pkFrameWork[34].m_uiMessageNum;
      if ( v4 )
      {
        if ( !(unsigned __int8)((int (__thiscall *)(PgWin *))v4->vfptr[65].__vecDelDtor)(v4) )
          PgWinMgr::ShowWin(&Pgg_kWinMgr, v4);
      }
      return;
    case 3u:
      if ( g_kRaidinfo.m_uiTotalMemberOnRaid )
      {
        v45 = 826544367;
        goto LABEL_11;
      }
      if ( g_kParty.m_uiTotalMember && (unsigned __int8)Party::IsMePartyMaster(&g_kParty) )
        GameFrameWork::NcRaidMakeReq((GameFrameWork *)v3->m_pkFrameWork);
      return;
    case 4u:
      if ( g_kRaidinfo.m_uiTotalMemberOnRaid )
        GameFrameWork::NcRaidLeaveReq((GameFrameWork *)this->m_pkFrameWork);
      return;
    case 5u:
      if ( g_kRaidinfo.m_bIsMeRaidLeader || g_kRaidinfo.m_bIsMeRaidSubLeader )
      {
        GameFrameWork::OpenRaidMemberAddWin((GameFrameWork *)this->m_pkFrameWork);
      }
      else
      {
        v45 = 69861649;
LABEL_11:
        v5 = (GameFrameWork *)this->m_pkFrameWork;
        v6 = TextData2::Get(v45);
        GameFrameWork::AddSysMsg(v5, (const char *)v6);
      }
      return;
    case 7u:
    case 8u:
    case 9u:
    case 0xAu:
      if ( !this->m_bIsSelecteSlot )
      {
        v7 = wParam - 7;
        if ( wParam - 7 < 4 )
        {
          v8 = GameFrameWork::GetRaidPartyWin((GameFrameWork *)this->m_pkFrameWork, v7);
          if ( g_kRaidinfo.m_MemberInfo[v7]._Myfirst != g_kRaidinfo.m_MemberInfo[v7]._Mylast
            && v8
            && !(unsigned __int8)((int (__thiscall *)(ExpeditionPartyWin *))v8->vfptr[65].__vecDelDtor)(v8) )
          {
            PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v8->vfptr);
            v3->m_bIsSelect = 1;
            v3->m_uiSelectPartyID = v7;
          }
        }
      }
      return;
    case 0x10u:
      if ( !lParam )
        return;
      if ( lParam <= 0 )
        goto LABEL_29;
      if ( (unsigned int)(lParam - 1) >= 0x14 )
        return;
      v9 = RaidInfo::GetCharByIndex(&g_kRaidinfo, lParam - 1);
      if ( v9 )
        GameFrameWork::TargetCharReq((GameFrameWork *)v3->m_pkFrameWork, v9);
LABEL_29:
      if ( !g_kRaidinfo.m_bIsMeRaidLeader )
        return;
      if ( !v3->m_uiSelectedNumber[0] )
      {
        if ( g_kRaidinfo.m_MemberInfo[(lParam - 1) / 5]._Mylast - g_kRaidinfo.m_MemberInfo[(lParam - 1) / 5]._Myfirst <= (unsigned int)((lParam - 1) % 5) )
          return;
        v3->m_uiSelectedNumber[0] = lParam;
        *(_BYTE *)(*(&v3->m_uiSelectPartyID + lParam) + 412) = 1;
        v10 = RaidInfo::GetRaidMemberInfoByIndex(&g_kRaidinfo, lParam - 1);
        v11 = v10;
        if ( !v10 )
        {
          ((void (__stdcall *)(_DWORD, int))v3->m_spMemberMark.m_pObject->vfptr[64].__vecDelDtor)(0, v46);
          ((void (__cdecl *)(_DWORD))v3->m_spLootingMark.m_pObject->vfptr[64].__vecDelDtor)(0);
LABEL_54:
          v18 = &v3->m_spLevelText.m_pObject->vfptr;
          v19 = *v18;
          v20 = (*(int (**)(void))(**(_DWORD **)(*(&v3->m_uiSelectPartyID + lParam) + 312) + 484))();
          v19[118].__vecDelDtor((NiRefObject *)v18, v20);
          v21 = &v3->m_spNameText.m_pObject->vfptr;
          v22 = *v21;
          v23 = (*(int (**)(void))(**(_DWORD **)(*(&v3->m_uiSelectPartyID + lParam) + 308) + 484))();
          v22[118].__vecDelDtor((NiRefObject *)v21, v23);
          ((void (__stdcall *)(signed int))v3->m_spMovingSlorSpr.m_pObject->vfptr[64].__vecDelDtor)(1);
          goto LABEL_56;
        }
        *(_DWORD *)v12 = v10->m_kCharID.n5_code[0];
        *(_QWORD *)&v12[4] = *(_QWORD *)&v10->m_kCharID.n5_code[1];
        *(_QWORD *)&v12[12] = *(_QWORD *)&v10->m_kCharID.n5_code[3];
        if ( RaidInfo::IsLeader(&g_kRaidinfo, *(Name5 *)v12) )
        {
          ((void (__stdcall *)(signed int))v3->m_spMemberMark.m_pObject->vfptr[64].__vecDelDtor)(1);
          v13 = v3->m_spMemberMark.m_pObject->vfptr[123].__vecDelDtor;
        }
        else
        {
          *(_DWORD *)v15 = v11->m_kCharID.n5_code[0];
          *(_QWORD *)&v15[4] = *(_QWORD *)&v11->m_kCharID.n5_code[1];
          *(_QWORD *)&v15[12] = *(_QWORD *)&v11->m_kCharID.n5_code[3];
          v16 = RaidInfo::IsSubLeader(&g_kRaidinfo, *(Name5 *)v15) == 0;
          v13 = v3->m_spMemberMark.m_pObject->vfptr[64].__vecDelDtor;
          if ( !v16 )
          {
            ((void (__stdcall *)(signed int))v13)(1);
            ((void (__stdcall *)(signed int))v3->m_spMemberMark.m_pObject->vfptr[123].__vecDelDtor)(1);
LABEL_36:
            *(_DWORD *)v14 = v11->m_kCharID.n5_code[0];
            *(_QWORD *)&v14[4] = *(_QWORD *)&v11->m_kCharID.n5_code[1];
            *(_QWORD *)&v14[12] = *(_QWORD *)&v11->m_kCharID.n5_code[3];
            if ( RaidInfo::IsLooter(&g_kRaidinfo, *(Name5 *)v14) && g_kRaidinfo.m_eLootType == 2 )
            {
              ((void (__stdcall *)(signed int))v3->m_spLootingMark.m_pObject->vfptr[64].__vecDelDtor)(1);
              ((void (__stdcall *)(_DWORD))v3->m_spLootingMark.m_pObject->vfptr[69].__vecDelDtor)(1.0);
            }
            else
            {
              ((void (__stdcall *)(_DWORD))v3->m_spLootingMark.m_pObject->vfptr[64].__vecDelDtor)(0);
            }
            ((void (__stdcall *)(_DWORD))v3->m_spMemberMark.m_pObject->vfptr[69].__vecDelDtor)(1.0);
            switch ( CharClass::GetBaseClassID(v11->m_byChrClass) )
            {
              case 1:
                ((void (__stdcall *)(_DWORD))v3->m_spClassBar.m_pObject->vfptr[123].__vecDelDtor)(0);
                ((void (__stdcall *)(signed int))v3->m_spClassBar.m_pObject->vfptr[64].__vecDelDtor)(1);
                break;
              case 6:
                ((void (__stdcall *)(signed int))v3->m_spClassBar.m_pObject->vfptr[123].__vecDelDtor)(1);
                ((void (__stdcall *)(signed int))v3->m_spClassBar.m_pObject->vfptr[64].__vecDelDtor)(1);
                break;
              case 0xB:
                ((void (__stdcall *)(signed int))v3->m_spClassBar.m_pObject->vfptr[123].__vecDelDtor)(2);
                ((void (__stdcall *)(_DWORD))v3->m_spClassBar.m_pObject->vfptr[64].__vecDelDtor)(1);
                break;
              case 0x10:
                ((void (__stdcall *)(signed int))v3->m_spClassBar.m_pObject->vfptr[123].__vecDelDtor)(3);
                ((void (__stdcall *)(_DWORD))v3->m_spClassBar.m_pObject->vfptr[64].__vecDelDtor)(1);
                break;
              case 0x15:
                ((void (__stdcall *)(signed int))v3->m_spClassBar.m_pObject->vfptr[123].__vecDelDtor)(4);
                ((void (__stdcall *)(_DWORD))v3->m_spClassBar.m_pObject->vfptr[64].__vecDelDtor)(1);
                break;
              case 0x1A:
                ((void (__stdcall *)(signed int))v3->m_spClassBar.m_pObject->vfptr[123].__vecDelDtor)(5);
                ((void (__stdcall *)(_DWORD))v3->m_spClassBar.m_pObject->vfptr[64].__vecDelDtor)(1);
                break;
              default:
                ((void (__stdcall *)(_DWORD))v3->m_spClassBar.m_pObject->vfptr[64].__vecDelDtor)(0);
                break;
            }
            v17 = v3->m_spLevelText.m_pObject->vfptr[117].__vecDelDtor;
            if ( v11->m_ucStatus )
            {
              ((void (__stdcall *)(D3DXCOLOR *, int))v17)(&Color::m_kDxWhiteColor, v46);
              ((void (__cdecl *)(D3DXCOLOR *))v3->m_spNameText.m_pObject->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
            }
            else
            {
              ((void (__stdcall *)(void *, int))v17)(&Color::m_kDxGrayColor, v46);
              ((void (__cdecl *)(void *))v3->m_spNameText.m_pObject->vfptr[117].__vecDelDtor)(&Color::m_kDxGrayColor);
            }
            goto LABEL_54;
          }
        }
        ((void (__stdcall *)(_DWORD))v13)(0);
        goto LABEL_36;
      }
      v3->m_uiSelectedNumber[1] = lParam;
LABEL_56:
      if ( v3->m_bIsSelecteSlot )
      {
        v24 = v3->m_uiSelectedNumber[0];
        v25 = v3->m_uiSelectedNumber[1];
        v3->m_bIsSelecteSlot = 0;
        if ( v24 == v25 )
        {
          *(_BYTE *)(*(&v3->m_uiSelectPartyID + v24) + 412) = 0;
        }
        else if ( v24 && v25 )
        {
          *(_BYTE *)(*(&v3->m_uiSelectPartyID + v24) + 412) = 0;
          *(_BYTE *)(*(&v3->m_uiSelectPartyID + v3->m_uiSelectedNumber[1]) + 412) = 0;
          GameFrameWork::NcRaidSlotMoveReq(
            (GameFrameWork *)v3->m_pkFrameWork,
            v3->m_uiSelectedNumber[0] - 1,
            v3->m_uiSelectedNumber[1] - 1);
        }
        ((void (__stdcall *)(_DWORD))v3->m_spMovingSlorSpr.m_pObject->vfptr[64].__vecDelDtor)(0);
        v3->m_uiSelectedNumber[1] = 0;
        v3->m_uiSelectedNumber[0] = 0;
      }
      else
      {
        v3->m_bIsSelecteSlot = 1;
      }
      return;
    case 0x11u:
      if ( (unsigned int)(lParam - 1) < 0x14 )
      {
        v26 = (const char *)((int (*)(void))this->m_spEntry[lParam - 1].m_pObject->m_spNameText.m_pObject->vfptr[121].__vecDelDtor)();
        v27 = (unsigned int)v26;
        if ( v26 )
        {
          if ( strcmp(v26, (const char *)&unk_9C7A92)
            && (unsigned __int8)((int (__thiscall *)(ExpeditionWin *))v3->vfptr[65].__vecDelDtor)(v3) )
          {
            PgFrameWork::AddMsg(v3->m_pkFrameWork, 0x81u, v27, 0);
          }
        }
      }
      return;
    case 0x12u:
      ExpeditionWin::OnHelpLink();
      return;
    case 0x13u:
      if ( g_kRaidinfo.m_bIsMeRaidLeader )
      {
        if ( !(unsigned __int8)((int (*)(void))this->m_spLootTypePopupMenu.m_pObject->vfptr[65].__vecDelDtor)() )
        {
          v28 = v3->m_spBtn[0].m_pObject;
          lParama = &v3->m_spLootTypePopupMenu.m_pObject->vfptr;
          wParama = *lParama + 77;
          v29 = ((int (__thiscall *)(PgWinBut *))v28->vfptr[42].__vecDelDtor)(v3->m_spBtn[0].m_pObject);
          v30 = ((int (__thiscall *)(ExpeditionWin *))v3->vfptr[42].__vecDelDtor)(v3) + v29;
          v31 = ((int (__thiscall *)(PgWinBut *))v28->vfptr[37].__vecDelDtor)(v28);
          v32 = (int)v28->vfptr[41].__vecDelDtor((NiRefObject *)v28, v30 + v31);
          v33 = ((int (__thiscall *)(ExpeditionWin *))v3->vfptr[41].__vecDelDtor)(v3);
          wParama->__vecDelDtor(lParama, v33 + v32);
          v34 = ((int (*)(void))v3->m_spBtn[0].m_pObject->vfptr[36].__vecDelDtor)();
          v35 = ((int (*)(void))v3->m_spLootTypePopupMenu.m_pObject->vfptr[37].__vecDelDtor)();
          ((void (__stdcall *)(int, int))v3->m_spLootTypePopupMenu.m_pObject->vfptr[135].__vecDelDtor)(v34 - 22, v35);
          PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v3->m_spLootTypePopupMenu.m_pObject->vfptr);
          v36 = v3->m_spLootTypePopupMenu.m_pObject;
          goto LABEL_78;
        }
        PgWinMgr::ClosePopupWin(&Pgg_kWinMgr, (PgWin *)&v3->m_spLootTypePopupMenu.m_pObject->vfptr);
      }
      return;
    case 0x14u:
      if ( g_kRaidinfo.m_bIsMeRaidLeader )
      {
        if ( (unsigned __int8)((int (*)(void))this->m_spItemGradePopupMenu.m_pObject->vfptr[65].__vecDelDtor)() )
        {
          PgWinMgr::ClosePopupWin(&Pgg_kWinMgr, (PgWin *)&v3->m_spItemGradePopupMenu.m_pObject->vfptr);
        }
        else
        {
          v37 = v3->m_spBtn[1].m_pObject;
          lParamb = &v3->m_spItemGradePopupMenu.m_pObject->vfptr;
          wParamb = *lParamb + 77;
          v38 = ((int (__thiscall *)(PgWinBut *))v37->vfptr[42].__vecDelDtor)(v3->m_spBtn[1].m_pObject);
          v39 = ((int (__thiscall *)(ExpeditionWin *))v3->vfptr[42].__vecDelDtor)(v3) + v38;
          v40 = ((int (__thiscall *)(PgWinBut *))v37->vfptr[37].__vecDelDtor)(v37);
          v41 = (int)v37->vfptr[41].__vecDelDtor((NiRefObject *)v37, v39 + v40);
          v42 = ((int (__thiscall *)(ExpeditionWin *))v3->vfptr[41].__vecDelDtor)(v3);
          wParamb->__vecDelDtor(lParamb, v42 + v41);
          v43 = ((int (*)(void))v3->m_spBtn[1].m_pObject->vfptr[36].__vecDelDtor)();
          v44 = ((int (*)(void))v3->m_spItemGradePopupMenu.m_pObject->vfptr[37].__vecDelDtor)();
          ((void (__stdcall *)(int, int))v3->m_spItemGradePopupMenu.m_pObject->vfptr[135].__vecDelDtor)(v43 - 22, v44);
          PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v3->m_spItemGradePopupMenu.m_pObject->vfptr);
          v36 = v3->m_spItemGradePopupMenu.m_pObject;
LABEL_78:
          v36->vfptr[130].__vecDelDtor((NiRefObject *)v36, 0);
        }
      }
      return;
    default:
      return;
  }
}

//----- (007033E0) --------------------------------------------------------
void __thiscall ExpeditionWin::SetLootingType(ExpeditionWin *this, char nLootingType)
{
  ExpeditionWin *v2; // esi@1
  PgWinText *v3; // ebx@2
  NiRefObjectVtbl *v4; // edi@2
  NiUnsharedGeometryGroup *v5; // eax@2
  PgWinText *v6; // ebx@3
  NiRefObjectVtbl *v7; // edi@3
  NiUnsharedGeometryGroup *v8; // eax@3
  PgWinText *v9; // ebx@4
  NiRefObjectVtbl *v10; // edi@4
  NiUnsharedGeometryGroup *v11; // eax@4

  v2 = this;
  switch ( nLootingType )
  {
    case 0:
      v3 = this->m_spText[0].m_pObject;
      v4 = v3->vfptr;
      v5 = TextData::Get(0xE54F4142);
      v4[118].__vecDelDtor((NiRefObject *)v3, (unsigned int)v5);
      v2->m_eLootType = (unsigned __int8)nLootingType;
      return;
    case 1:
      v6 = this->m_spText[0].m_pObject;
      v7 = v6->vfptr;
      v8 = TextData::Get(0x78A8A1CFu);
      goto LABEL_6;
    case 2:
      v9 = this->m_spText[0].m_pObject;
      v10 = v9->vfptr;
      v11 = TextData2::Get(0x799878B4u);
      v10[118].__vecDelDtor((NiRefObject *)v9, (unsigned int)v11);
      v2->m_eLootType = (unsigned __int8)nLootingType;
      return;
    case 3:
      v6 = this->m_spText[0].m_pObject;
      v7 = v6->vfptr;
      v8 = TextData2::Get(0x2C518D68u);
LABEL_6:
      v7[118].__vecDelDtor((NiRefObject *)v6, (unsigned int)v8);
      break;
    default:
      break;
  }
  v2->m_eLootType = (unsigned __int8)nLootingType;
}

//----- (007034C0) --------------------------------------------------------
void __thiscall ExpeditionWin::SetItemGrade(ExpeditionWin *this, char nItemGrade)
{
  ExpeditionWin *v2; // esi@1
  PgWinText *v3; // ebx@5
  NiRefObjectVtbl *v4; // edi@5
  NiUnsharedGeometryGroup *v5; // eax@5
  PgWinText *v6; // ebx@7
  NiRefObjectVtbl *v7; // edi@7
  NiUnsharedGeometryGroup *v8; // eax@7
  unsigned int v9; // [sp-Ch] [bp-10h]@2
  unsigned int v10; // [sp-Ch] [bp-10h]@3

  v2 = this;
  switch ( nItemGrade )
  {
    case 0:
      v9 = 225928826;
      goto LABEL_5;
    case 1:
      v10 = 225994362;
      goto LABEL_7;
    case 2:
      v9 = 226059898;
LABEL_5:
      v3 = this->m_spText[1].m_pObject;
      v4 = v3->vfptr;
      v5 = TextData3::Get(v9);
      v4[118].__vecDelDtor((NiRefObject *)v3, (unsigned int)v5);
      v2->m_eItemType = (unsigned __int8)nItemGrade;
      return;
    case 3:
      v10 = 226125434;
LABEL_7:
      v6 = this->m_spText[1].m_pObject;
      v7 = v6->vfptr;
      v8 = TextData3::Get(v10);
      v7[118].__vecDelDtor((NiRefObject *)v6, (unsigned int)v8);
      break;
    default:
      break;
  }
  v2->m_eItemType = (unsigned __int8)nItemGrade;
}

//----- (00703560) --------------------------------------------------------
void __thiscall ExpeditionPartyWin::ExpeditionPartyWin(ExpeditionPartyWin *this)
{
  ExpeditionPartyWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ExpeditionPartyWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ExpeditionPartyWin::`vftable'{for `IDirectMessenger'};
  `eh vector constructor iterator'(
    v1->m_spLRBut,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spMember,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spParticipant,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spParticipantName,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_apkAbstateBuf,
    4u,
    50,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_apkAbstateBufIcon,
    4u,
    50,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_spPanel.m_pObject = 0;
  v1->m_spMinBtn.m_pObject = 0;
  v1->m_spMaxBtn.m_pObject = 0;
  `eh vector constructor iterator'(
    v1->m_spPopupMenu,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_bExtend = 1;
  v1->m_uiGroupNum = 0;
  v1->m_uiBuffViewOption[0] = 0;
  v1->m_uiBuffViewOption[1] = 0;
  v1->m_uiBuffViewOption[2] = 0;
  v1->m_uiBuffViewOption[3] = 0;
  v1->m_uiBuffViewOption[4] = 0;
}
// 9C8D10: using guessed type void (__thiscall *ExpeditionPartyWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C8D2C: using guessed type int (__thiscall *ExpeditionPartyWin::`vftable'{for `NiNode'})(void *p, char);

//----- (007036D0) --------------------------------------------------------
char __thiscall ExpeditionPartyWin::Create(ExpeditionPartyWin *this, PgFrameWork *pkFrameWork, unsigned int index)
{
  ExpeditionPartyWin *v3; // edi@1
  NiTexturePalette *v4; // esi@1
  const char *v5; // eax@3
  NiAVObject *v6; // eax@4
  NiTexturingProperty *v7; // eax@4
  NiTexturingProperty *v8; // esi@4
  NiTexturingProperty::Map *v9; // eax@6
  NiSourceTexture *v10; // eax@7
  NiNode *v11; // esi@10
  char result; // al@14
  PgSprData *v13; // eax@15
  NiNode *v14; // esi@18
  int v15; // esi@22
  int v16; // ebx@22
  NiD3DDefaultShader *v17; // eax@22
  PgWinBut *v18; // eax@22
  NiUnsharedGeometryGroup *v19; // eax@22
  PgFont *v20; // eax@24
  PgWinText *v21; // esi@24
  NiD3DDefaultShader *v22; // eax@24
  NiD3DDefaultShader *v23; // eax@24
  NiAVObject *v24; // eax@24
  NiD3DDefaultShader *v25; // eax@24
  NiTexturingProperty::Map *v26; // eax@24
  int v27; // ebx@27
  PgSprData *v28; // esi@28
  PgWinSpr *v29; // eax@28
  PgWinSpr *v30; // esi@28
  unsigned int v31; // eax@33
  PgWin *v32; // ST60_4@35
  PgFont *v33; // eax@35
  PgWinAbbreviateText *v34; // eax@35
  PgWinAbbreviateText *v35; // esi@35
  unsigned int v36; // eax@40
  int v37; // esi@42
  PgWinLRBut *v38; // eax@42
  PgWinLRBut *v39; // esi@42
  unsigned int v40; // eax@47
  int v41; // esi@49
  bool v42; // zf@49
  NiTexturingProperty *v43; // esi@51
  NiNode *v44; // esi@53
  NiTexturePalette *v45; // esi@57
  const char *v46; // eax@59
  NiTexturingProperty *v47; // esi@60
  NiNode *v48; // esi@62
  int v49; // esi@66
  PgSprData *v50; // eax@68
  PgWinSpr *v51; // eax@68
  PgWinSpr *v52; // ebx@68
  AbstateIcon *v53; // eax@76
  AbstateIcon *v54; // ebx@76
  int v55; // eax@81
  signed int v56; // ebx@85
  PopupMenuWin **v57; // esi@85
  NiSourceTexture *v58; // eax@86
  PopupMenuWin *v59; // eax@86
  int v60; // ecx@86
  int v61; // eax@91
  char *v62; // eax@93
  PopupMenuTextCheck *v63; // eax@93
  char *v64; // eax@93
  PopupMenuTextCheck *v65; // eax@93
  char *v66; // eax@93
  PopupMenuTextCheck *v67; // eax@93
  char *v68; // eax@93
  PopupMenuTextCheck *v69; // eax@93
  char *v70; // eax@93
  PopupMenuTextCheck *v71; // eax@93
  NiTexturingProperty *v72; // esi@94
  NiNode *v73; // esi@96
  int iPosY; // [sp+78h] [bp-25Ch]@68
  int iPosX; // [sp+7Ch] [bp-258h]@68
  UIUtil ui; // [sp+80h] [bp-254h]@22
  int iOffY; // [sp+94h] [bp-240h]@22
  NiSourceTexture *pkTexture; // [sp+98h] [bp-23Ch]@25
  NiPointer<NiTexturingProperty> spTexProp; // [sp+9Ch] [bp-238h]@4
  unsigned int uiHeight; // [sp+A0h] [bp-234h]@22
  unsigned int uiWidth; // [sp+A4h] [bp-230h]@22
  int v82; // [sp+A8h] [bp-22Ch]@27
  int iOffX; // [sp+ACh] [bp-228h]@22
  int uiTop; // [sp+B0h] [bp-224h]@15
  int uiLeft; // [sp+B4h] [bp-220h]@15
  PgWinSpr *v86; // [sp+B8h] [bp-21Ch]@27
  unsigned int YPos; // [sp+BCh] [bp-218h]@28
  NiPointer<NiNode> spNode; // [sp+C0h] [bp-214h]@1
  char acStr[256]; // [sp+C4h] [bp-210h]@22
  char acNodeName[128]; // [sp+1C4h] [bp-110h]@28
  char acNodeMember[128]; // [sp+244h] [bp-90h]@28
  int v92; // [sp+2D0h] [bp-4h]@1

  v3 = this;
  spNode.m_pObject = 0;
  this->m_pkFrameWork = pkFrameWork;
  v4 = pTexturePalette;
  v92 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v5 = Folder::Merge(&Folder::m_acMenu, "Game\\RaidPartyWin.nif");
  PgUtil::LoadNodeNifFile(v5, &spNode, v4);
  if ( !spNode.m_pObject )
    return 0;
  v6 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Panel01");
  v7 = (NiTexturingProperty *)NiAVObject::GetProperty(v6, 8);
  v8 = v7;
  spTexProp.m_pObject = v7;
  if ( v7 )
    InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  v9 = *v8->m_kMaps.m_pBase;
  LOBYTE(v92) = 1;
  if ( !v9 || (v10 = (NiSourceTexture *)v9->m_spTexture.m_pObject) == 0 )
  {
    LOBYTE(v92) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v11 = spNode.m_pObject;
    v92 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v11 )
        v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    }
    return 0;
  }
  v13 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Party01Member01NameText", &uiLeft, &uiTop, v10);
  if ( PgWinFrame::Create((PgWinFrame *)&v3->vfptr, 0, 0, v13, 0, pkFrameWork, "ExpedtionPartyWin", 0) )
  {
    v15 = uiLeft;
    v16 = uiTop;
    iOffX = uiLeft;
    iOffY = uiTop;
    UIUtil::UIUtil(&ui);
    LOBYTE(v92) = 2;
    UIUtil::SetParent(&ui, (PgWin *)&v3->vfptr);
    UIUtil::SetOffset(&ui, v15, v16);
    UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
    v17 = (NiD3DDefaultShader *)UIUtil::CreateSpr(&ui, "Panel01", 0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_spPanel, v17);
    ((void (__stdcall *)(_DWORD))v3->m_spPanel.m_pObject->vfptr[60].__vecDelDtor)(0);
    v18 = UIUtil::CreateBtn(&ui, 0, "Party01Nor", "Party01Click", "Party01Over", 0, 0);
    v18->vfptr[60].__vecDelDtor((NiRefObject *)v18, 0);
    acStr[0] = 0;
    memset(&acStr[1], 0, 0xFFu);
    v19 = TextData2::Get(0x5F5D33Eu);
    sprintf(acStr, (const char *)v19, index + 1);
    if ( PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Party01Member01NameText",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight) )
    {
      v20 = Font::Get(BOLD);
      v21 = PgWinText::CreateWin(uiLeft, uiTop, uiWidth, uiHeight, v20, (PgWin *)&v3->vfptr, 0, 0);
      v21->vfptr[122].__vecDelDtor((NiRefObject *)v21, 5u);
      v21->vfptr[117].__vecDelDtor((NiRefObject *)v21, (unsigned int)&Color::m_kDxWhiteColor);
      v21->vfptr[118].__vecDelDtor((NiRefObject *)v21, (unsigned int)acStr);
      v21->vfptr[60].__vecDelDtor((NiRefObject *)v21, 0);
      UIUtil::CreateBtn(&ui, 1u, "ClsNor", "ClsClick", "ClsOver", 0, 0);
      v22 = (NiD3DDefaultShader *)UIUtil::CreateBtn(&ui, 2u, "MaxNor", "MaxClick", "MaxOver", 0, 0);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_spMaxBtn, v22);
      v23 = (NiD3DDefaultShader *)UIUtil::CreateBtn(&ui, 3u, "MinNor", "MinClick", "MinOver", 0, 0);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_spMinBtn, v23);
      v24 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HP_Fighter");
      v25 = (NiD3DDefaultShader *)NiAVObject::GetProperty(v24, 8);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&spTexProp, v25);
      v26 = *spTexProp.m_pObject->m_kMaps.m_pBase;
      if ( v26 )
        pkTexture = (NiSourceTexture *)v26->m_spTexture.m_pObject;
      else
        pkTexture = 0;
      v82 = 1;
      v27 = (int)v3->m_spParticipantName;
      v86 = (PgWinSpr *)5;
      do
      {
        v28 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "HP_Fighter", &uiLeft, &uiTop, pkTexture);
        PgSprData::Add(v28, (NiAVObject *)&spNode.m_pObject->vfptr, "HP_Cleric");
        PgSprData::Add(v28, (NiAVObject *)&spNode.m_pObject->vfptr, "HP_Archer");
        PgSprData::Add(v28, (NiAVObject *)&spNode.m_pObject->vfptr, "HP_Mage");
        PgSprData::Add(v28, (NiAVObject *)&spNode.m_pObject->vfptr, "HP_Joker");
        PgSprData::Add(v28, (NiAVObject *)&spNode.m_pObject->vfptr, "HP_Sentinel");
        acNodeName[0] = 0;
        memset(&acNodeName[1], 0, 0x7Fu);
        sprintf(acNodeName, "%s%.2dName", "Party01Member", v82);
        acNodeMember[0] = 0;
        memset(&acNodeMember[1], 0, 0x7Fu);
        sprintf(acNodeMember, "Party01Member%.2d", v82);
        PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          acNodeMember,
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight);
        v29 = PgWinSpr::CreateWin(uiLeft - iOffX, uiTop - iOffY, v28, (PgWin *)&v3->vfptr, 0, 0);
        v30 = *(PgWinSpr **)(v27 - 20);
        YPos = (unsigned int)v29;
        if ( v30 != v29 )
        {
          if ( v30 && !InterlockedDecrement((volatile LONG *)&v30->m_uiRefCount) && v30 )
            v30->vfptr->__vecDelDtor((NiRefObject *)v30, 1u);
          v31 = YPos;
          *(_DWORD *)(v27 - 20) = YPos;
          if ( v31 )
            InterlockedIncrement((volatile LONG *)(v31 + 4));
        }
        PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          acNodeName,
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight);
        v32 = g_pkToolTipWin;
        v33 = Font::Get(BOLD);
        v34 = PgWinAbbreviateText::CreateWin(
                uiLeft - iOffX,
                uiTop - iOffY,
                uiWidth,
                uiHeight,
                v33,
                (PgWin *)&v3->vfptr,
                "2",
                0,
                0,
                1,
                v32,
                0x14u);
        v35 = *(PgWinAbbreviateText **)v27;
        YPos = (unsigned int)v34;
        if ( v35 != v34 )
        {
          if ( v35 && !InterlockedDecrement((volatile LONG *)&v35->m_uiRefCount) && v35 )
            v35->vfptr->__vecDelDtor((NiRefObject *)v35, 1u);
          v36 = YPos;
          *(_DWORD *)v27 = YPos;
          if ( v36 )
            InterlockedIncrement((volatile LONG *)(v36 + 4));
        }
        (*(void (__stdcall **)(signed int))(**(_DWORD **)v27 + 488))(4);
        v37 = uiLeft;
        YPos = uiTop;
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v27 + 240))(0);
        v38 = PgWinLRBut::CreateWin(v37 - 4, YPos - 12, uiWidth, uiHeight + 12, (PgWin *)&v3->vfptr, 4u, 5u);
        v39 = *(PgWinLRBut **)(v27 - 60);
        YPos = (unsigned int)v38;
        if ( v39 != v38 )
        {
          if ( v39 && !InterlockedDecrement((volatile LONG *)&v39->m_uiRefCount) && v39 )
            v39->vfptr->__vecDelDtor((NiRefObject *)v39, 1u);
          v40 = YPos;
          *(_DWORD *)(v27 - 60) = YPos;
          if ( v40 )
            InterlockedIncrement((volatile LONG *)(v40 + 4));
        }
        v41 = v82;
        (*(void (__stdcall **)(int))(**(_DWORD **)(v27 - 60) + 520))(v82);
        (*(void (__stdcall **)(int))(**(_DWORD **)(v27 - 60) + 564))(v41);
        v27 += 4;
        v42 = v86 == (PgWinSpr *)1;
        v86 = (PgWinSpr *)((char *)v86 - 1);
        v82 = v41 + 1;
      }
      while ( !v42 );
      v3->m_uiHpBarWidth = ((int (*)(void))v3->m_spParticipant[0].m_pObject->vfptr[36].__vecDelDtor)();
      if ( MenuTexMgr::GetTexture(4u) )
      {
        v45 = pTexturePalette;
        if ( !Folder::m_bInit )
          Folder::Init();
        v46 = Folder::Merge(&Folder::m_acMenu, "Game\\BuffDeBuffWin.nif");
        PgUtil::LoadNodeNifFile(v46, &spNode, v45);
        if ( spNode.m_pObject )
        {
          v49 = (int)v3->m_apkAbstateBufIcon;
          pkTexture = (NiSourceTexture *)5;
          do
          {
            v82 = 1;
            YPos = 10;
            do
            {
              PgUtil::GetTriShapeRect(
                (NiAVObject *)&spNode.m_pObject->vfptr,
                "CharBuffBox00",
                &iPosX,
                &iPosY,
                &uiWidth,
                &uiHeight);
              v50 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CharBuffBox00", &uiLeft, &uiTop, 0);
              v51 = PgWinSpr::CreateWin(uiLeft + uiWidth * v82 - iOffX, uiTop - iOffY, v50, (PgWin *)&v3->vfptr, 0, 0);
              v52 = *(PgWinSpr **)(v49 - 200);
              v86 = v51;
              if ( v52 != v51 )
              {
                if ( v52 )
                {
                  if ( !InterlockedDecrement((volatile LONG *)&v52->m_uiRefCount) && v52 )
                    v52->vfptr->__vecDelDtor((NiRefObject *)v52, 1u);
                  v51 = v86;
                }
                *(_DWORD *)(v49 - 200) = v51;
                if ( v51 )
                  InterlockedIncrement((volatile LONG *)&v51->m_uiRefCount);
              }
              (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v49 - 200) + 240))(0);
              (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v49 - 200) + 256))(0);
              v53 = AbstateIcon::CreateWin(
                      uiWidth * v82 - iOffX + iPosX + 2,
                      iPosY - iOffY + 2,
                      uiWidth - 4,
                      uiHeight - 4,
                      (PgWin *)&v3->vfptr,
                      0);
              v54 = *(AbstateIcon **)v49;
              v86 = (PgWinSpr *)v53;
              if ( v54 != v53 )
              {
                if ( v54 && !InterlockedDecrement((volatile LONG *)&v54->m_uiRefCount) && v54 )
                  v54->vfptr->__vecDelDtor((NiRefObject *)v54, 1u);
                v55 = (int)v86;
                *(_DWORD *)v49 = v86;
                if ( v55 )
                  InterlockedIncrement((volatile LONG *)(v55 + 4));
              }
              (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v49 + 240))(0);
              (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v49 + 256))(0);
              ++v82;
              v49 += 4;
              --YPos;
            }
            while ( YPos );
            pkTexture = (NiSourceTexture *)((char *)pkTexture - 1);
          }
          while ( pkTexture );
          ExpeditionPartyWin::AlignBuf(v3, 10, 0);
          v3->m_uiGroupNum = index;
          v3->m_bOpenPopUp = 0;
          v56 = 0;
          v57 = (PopupMenuWin **)v3->m_spPopupMenu;
          do
          {
            v58 = MenuTexMgr::GetTexture(1u);
            v59 = PopupMenuWin::CreateWin(v58, 4u, 4u, 0);
            v60 = (int)*v57;
            v86 = (PgWinSpr *)v59;
            iOffX = v60;
            if ( (PopupMenuWin *)v60 != v59 )
            {
              if ( v60 && !InterlockedDecrement((volatile LONG *)(v60 + 4)) && iOffX )
                (**(void (__stdcall ***)(_DWORD))iOffX)(1);
              v61 = (int)v86;
              *v57 = (PopupMenuWin *)v86;
              if ( v61 )
                InterlockedIncrement((volatile LONG *)(v61 + 4));
            }
            (*v57)->vfptr->SetMsgHooker(&(*v57)->vfptr, &v3->vfptr);
            PopupMenuWin::Clear(*v57);
            v62 = (char *)TextData2::Get(0x3569283Du);
            v63 = PopupMenuTextCheck::CreateWin(v62, 0, 0, 0, 0, 0);
            v63->m_ePopupMenuID = 1015;
            PopupMenuWin::AddMenu(*v57, (int)v3, (PopupMenu *)&v63->vfptr);
            v64 = (char *)TextData2::Get(0x356C3181u);
            v65 = PopupMenuTextCheck::CreateWin(v64, 0, 0, 0, 0, 0);
            v65->m_ePopupMenuID = 1016;
            PopupMenuWin::AddMenu(*v57, (int)v3, (PopupMenu *)&v65->vfptr);
            v66 = (char *)TextData2::Get(0x3566338Fu);
            v67 = PopupMenuTextCheck::CreateWin(v66, 0, 0, 0, 0, 0);
            v67->m_ePopupMenuID = 1017;
            PopupMenuWin::AddMenu(*v57, (int)v3, (PopupMenu *)&v67->vfptr);
            v68 = (char *)TextData2::Get(0xDB1D2246);
            v69 = PopupMenuTextCheck::CreateWin(v68, 0, 0, 0, 0, 0);
            v69->m_ePopupMenuID = 1018;
            PopupMenuWin::AddMenu(*v57, (int)v3, (PopupMenu *)&v69->vfptr);
            v70 = (char *)TextData2::Get(0xDE13DBE2);
            v71 = PopupMenuTextCheck::CreateWin(v70, 0, 0, 0, 0, 0);
            v71->m_ePopupMenuID = 1019;
            PopupMenuWin::AddMenu(*v57, (int)v3, (PopupMenu *)&v71->vfptr);
            PopupMenuWin::FinishMenu(*v57, 0);
            ((void (__stdcall *)(_DWORD))(*v57)->vfptr[64].__vecDelDtor)(0);
            ExpeditionPartyWin::SetOption(v3, v56++, 0);
            ++v57;
          }
          while ( v56 < 5 );
          ((void (__thiscall *)(ExpeditionPartyWin *, unsigned int, unsigned int, _DWORD, _DWORD))v3->vfptr[59].__vecDelDtor)(
            v3,
            PgWin::ms_uiScreenWidth,
            PgWin::ms_uiScreenHeight,
            0.40000001,
            0.5);
          LOBYTE(v92) = 1;
          UIUtil::~UIUtil(&ui);
          v72 = spTexProp.m_pObject;
          LOBYTE(v92) = 0;
          if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
            v72->vfptr->__vecDelDtor((NiRefObject *)v72, 1u);
          v73 = spNode.m_pObject;
          v92 = -1;
          if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v73 )
            v73->vfptr->__vecDelDtor((NiRefObject *)v73, 1u);
          result = 1;
        }
        else
        {
          LOBYTE(v92) = 1;
          UIUtil::~UIUtil(&ui);
          v47 = spTexProp.m_pObject;
          LOBYTE(v92) = 0;
          if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
            v47->vfptr->__vecDelDtor((NiRefObject *)v47, 1u);
          v48 = spNode.m_pObject;
          v92 = -1;
          if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v48 )
            return 0;
          v48->vfptr->__vecDelDtor((NiRefObject *)v48, 1u);
          result = 0;
        }
      }
      else
      {
        LOBYTE(v92) = 1;
        UIUtil::~UIUtil(&ui);
        v43 = spTexProp.m_pObject;
        LOBYTE(v92) = 0;
        if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
          v43->vfptr->__vecDelDtor((NiRefObject *)v43, 1u);
        v44 = spNode.m_pObject;
        v92 = -1;
        if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v44 )
          return 0;
        v44->vfptr->__vecDelDtor((NiRefObject *)v44, 1u);
        result = 0;
      }
    }
    else
    {
      LOBYTE(v92) = 1;
      UIUtil::~UIUtil(&ui);
      LOBYTE(v92) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
      v92 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      result = 0;
    }
  }
  else
  {
    LOBYTE(v92) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v14 = spNode.m_pObject;
    v92 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v14 )
      return 0;
    v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (007043F0) --------------------------------------------------------
void __thiscall ExpeditionPartyWin::SetBuffUI(ExpeditionPartyWin *this, Char *pkMember, StateType type, int *AbstateNums, int index)
{
  NiTListItem<AbStateInst *> *v5; // eax@1
  unsigned int v6; // edi@1
  int v7; // esi@5
  AbStateInst *v8; // eax@5
  int v9; // ebx@5
  int v10; // edx@9
  AbstateIcon **v11; // esi@16
  double v12; // st7@16
  signed int v13; // eax@16
  unsigned int v14; // edx@18
  char *v15; // eax@18
  char *v16; // ST0C_4@20
  AbstateIcon *v17; // ST18_4@20
  char *v18; // eax@20
  char *v19; // eax@20
  int v20; // [sp-4h] [bp-14h]@18
  NiTListItem<AbStateInst *> *kIter; // [sp+4h] [bp-Ch]@5
  AbStateInst *pkAbState; // [sp+8h] [bp-8h]@5
  ExpeditionPartyWin *v23; // [sp+Ch] [bp-4h]@1
  AbnormalStateViewInfo *pkInfo; // [sp+18h] [bp+8h]@6

  v23 = this;
  v5 = AbStateInfectee::GetAbStateList((AbStateInfectee *)&pkMember->vfptr)->m_pkHead;
  v6 = *AbstateNums;
  if ( !v5 )
  {
    *AbstateNums = v6;
    return;
  }
  while ( v6 < 0xA )
  {
    v7 = ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;
    kIter = v5->m_pkNext;
    v8 = v5->m_element;
    v9 = v8->kID;
    pkAbState = v8;
    if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(*(_DWORD *)ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable
                                                          + 16))(
                            ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable,
                            v9) )
    {
      if ( (unsigned __int16)v9 <= *(_WORD *)(v7 + 200) )
      {
        v10 = *(_DWORD *)(v7 + 196);
        if ( *(_DWORD *)(v10 + 4 * v9) )
          pkInfo = *(AbnormalStateViewInfo **)(v10 + 4 * v9);
        else
          pkInfo = 0;
      }
      else
      {
        pkInfo = 0;
      }
    }
    else
    {
      pkInfo = 0;
    }
    if ( pkInfo->View )
    {
      if ( v23->m_uiVisiableNums - 1 >= v6 )
      {
        if ( pkInfo->TypeSort != type )
          goto LABEL_24;
        v11 = (AbstateIcon **)((char *)v23->m_apkAbstateBufIcon + 4 * (10 * index + v6));
        AbstateIcon::SetAbstate(*v11, pkAbState->kID);
        v12 = pkAbState->fLifeTime;
        v13 = (signed int)v12;
        if ( (unsigned int)(signed int)v12 > 0x927C0 )
        {
          PgWin::SetToolTipWinText((PgWin *)&(*v11)->vfptr, pkInfo->Descript);
        }
        else
        {
          if ( v13 < 60 )
          {
            v20 = (signed int)v12;
            v15 = (char *)TextData::Get(0x98B2A8E5);
          }
          else
          {
            v14 = (signed int)((signed int)v12 + ((unsigned __int64)(-2004318071i64 * v13) >> 32)) >> 5;
            v20 = v14 + (v14 >> 31);
            v15 = (char *)TextData::Get(0x9CACA8F0);
          }
          v16 = fs(v15, v20);
          v17 = *v11;
          v18 = (char *)TextData::Get(0xEC4E4530);
          v19 = fs(v18, pkInfo->Descript, "\n\n", v16);
          PgWin::SetToolTipWinText((PgWin *)&v17->vfptr, v19);
        }
        (*v11)->m_pkToolTipWin = g_pkToolTipWin;
        ((void (__cdecl *)(signed int))(*v11)->vfptr[64].__vecDelDtor)(1);
        ((void (__cdecl *)(signed int))(*v11)->vfptr[60].__vecDelDtor)(1);
        (*v11)->vfptr[62].__vecDelDtor((NiRefObject *)*v11, 1u);
        ((void (__stdcall *)(signed int))v23->m_apkAbstateBuf[0][v6 + 10 * index].m_pObject->vfptr[64].__vecDelDtor)(1);
      }
      else
      {
        ((void (__stdcall *)(_DWORD))v23->m_apkAbstateBuf[0][10 * index + v6].m_pObject->vfptr[64].__vecDelDtor)(0);
        ((void (__stdcall *)(_DWORD))v23->m_apkAbstateBufIcon[0][v6 + 10 * index].m_pObject->vfptr[64].__vecDelDtor)(0);
      }
      ++v6;
    }
LABEL_24:
    if ( !kIter )
    {
      *AbstateNums = v6;
      return;
    }
    v5 = kIter;
  }
  *AbstateNums = v6;
}
// 7043F0: could not find valid save-restore pair for ebx
// 7043F0: could not find valid save-restore pair for esi
// A8C2A4: using guessed type int ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;

//----- (00704620) --------------------------------------------------------
void __thiscall ExpeditionPartyWin::OnCommand(ExpeditionPartyWin *this, unsigned int wParam, int lParam)
{
  ExpeditionPartyWin *v3; // esi@1
  PgWinBut *v4; // ecx@3
  int v5; // esi@3
  signed int v6; // edi@3
  PgWinBut *v7; // ecx@6
  int v8; // esi@6
  signed int v9; // edi@6
  const char *v10; // eax@11
  unsigned int v11; // edi@11
  char *v12; // eax@17
  Char *v13; // eax@19
  NiUnsharedGeometryGroup *v14; // eax@21

  v3 = this;
  switch ( wParam )
  {
    case 1u:
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
      PgWin::OnClose((PgWin *)&v3->vfptr);
      break;
    case 2u:
      v4 = this->m_spMaxBtn.m_pObject;
      v3->m_bExtend = 1;
      ((void (__stdcall *)(_DWORD))v4->vfptr[60].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v3->m_spMaxBtn.m_pObject->vfptr[64].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v3->m_spMinBtn.m_pObject->vfptr[60].__vecDelDtor)(1);
      ((void (__stdcall *)(_DWORD))v3->m_spMinBtn.m_pObject->vfptr[64].__vecDelDtor)(1);
      ((void (__stdcall *)(_DWORD))v3->m_spPanel.m_pObject->vfptr[64].__vecDelDtor)(1);
      v5 = (int)v3->m_spParticipantName;
      v6 = 5;
      do
      {
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v5 - 20) + 256))(1);
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v5 + 256))(1);
        v5 += 4;
        --v6;
      }
      while ( v6 );
      break;
    case 3u:
      v7 = this->m_spMaxBtn.m_pObject;
      v3->m_bExtend = 0;
      ((void (__stdcall *)(_DWORD))v7->vfptr[60].__vecDelDtor)(1);
      ((void (__stdcall *)(_DWORD))v3->m_spMaxBtn.m_pObject->vfptr[64].__vecDelDtor)(1);
      ((void (__stdcall *)(_DWORD))v3->m_spMinBtn.m_pObject->vfptr[60].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v3->m_spMinBtn.m_pObject->vfptr[64].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v3->m_spPanel.m_pObject->vfptr[64].__vecDelDtor)(0);
      v8 = (int)v3->m_spParticipantName;
      v9 = 5;
      do
      {
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v8 - 20) + 256))(0);
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v8 + 256))(0);
        v8 += 4;
        --v9;
      }
      while ( v9 );
      break;
    case 5u:
      if ( lParam >= 0 && (unsigned int)(lParam - 1) < 5 )
      {
        v10 = (const char *)((int (*)(void))this->m_spParticipantName[(lParam - 1) % 5u].m_pObject->vfptr[121].__vecDelDtor)();
        v11 = (unsigned int)v10;
        if ( v10 )
        {
          if ( strcmp(v10, (const char *)&unk_9C7B3F)
            && (unsigned __int8)((int (__thiscall *)(_DWORD))v3->vfptr[65].__vecDelDtor)(v3) )
          {
            PgFrameWork::AddMsg(v3->m_pkFrameWork, 0x81u, v11, 0);
          }
        }
      }
      break;
    case 4u:
      if ( lParam >= 0 && (unsigned int)(lParam - 1) < 0x14 )
      {
        v12 = (char *)((int (*)(void))this->m_spParticipantName[(lParam - 1) % 5u].m_pObject->vfptr[121].__vecDelDtor)();
        if ( v12 )
        {
          if ( strcmp(v12, (const char *)&unk_9C7B5E) )
          {
            v13 = CharMgr::GetChar(&g_kCharMgr, v12);
            if ( v13 )
            {
              GameFrameWork::TargetCharReq((GameFrameWork *)v3->m_pkFrameWork, v13);
            }
            else
            {
              v14 = TextData2::Get(0x304B7C53u);
              GameFrameWork::AddSysMsg((GameFrameWork *)v3->m_pkFrameWork, (const char *)v14);
            }
          }
        }
      }
      break;
    default:
      return;
  }
}

//----- (007048E0) --------------------------------------------------------
char __thiscall ExpeditionLootOptionWin::Create(ExpeditionLootOptionWin *this, PgFrameWork *pkFrameWork)
{
  ExpeditionLootOptionWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiAVObject *v5; // eax@4
  NiTexturingProperty *v6; // eax@4
  NiTexturingProperty *v7; // edi@4
  NiTexturingProperty::Map *v8; // eax@6
  NiSourceTexture *v9; // eax@7
  NiNode *v10; // esi@10
  char result; // al@14
  PgSprData *v12; // eax@15
  NiNode *v13; // esi@18
  int v14; // edi@22
  int v15; // ebx@22
  NiSourceTexture *v16; // eax@22
  PgSprData *v17; // eax@23
  D3DXCOLOR v18; // ST2C_16@25
  char *v19; // eax@25
  PgWinText *v20; // eax@25
  D3DXCOLOR v21; // ST2C_16@25
  char *v22; // eax@25
  PgWinText *v23; // eax@25
  D3DXCOLOR v24; // ST2C_16@25
  char *v25; // eax@25
  PgWinText *v26; // eax@25
  D3DXCOLOR v27; // ST2C_16@25
  char *v28; // eax@25
  PgWinText *v29; // eax@25
  D3DXCOLOR v30; // ST2C_16@25
  char *v31; // eax@25
  PgWinText *v32; // eax@25
  D3DXCOLOR v33; // ST2C_16@25
  char *v34; // eax@25
  PgWinText *v35; // eax@25
  PgWinBut *v36; // edi@25
  D3DXCOLOR v37; // ST2C_16@25
  char *v38; // eax@25
  NiD3DDefaultShader *v39; // eax@25
  NiD3DDefaultShader *v40; // eax@25
  NiD3DDefaultShader *v41; // eax@25
  NiD3DDefaultShader *v42; // eax@25
  NiD3DDefaultShader *v43; // eax@25
  int v44; // edi@25
  PgWin *v45; // ebx@26
  D3DXCOLOR v46; // ST2C_16@26
  char *v47; // eax@26
  PgWinText *v48; // eax@26
  int v49; // ebx@26
  NiSourceTexture *v50; // edi@35
  NiSourceTexture *v51; // eax@37
  PopupMenuWin *v52; // eax@37
  int v53; // edi@37
  PopupMenuWin *v54; // ebx@37
  char *v55; // eax@44
  PopupMenuText *v56; // eax@44
  char *v57; // eax@44
  PopupMenuText *v58; // eax@44
  char *v59; // eax@44
  PopupMenuText *v60; // eax@44
  char *v61; // eax@44
  PopupMenuText *v62; // eax@44
  D3DXCOLOR v63; // ST2C_16@44
  PgWinText *v64; // eax@44
  PgWinText *v65; // edi@44
  PgWinText *v66; // ebx@44
  NiTexturingProperty *v67; // esi@51
  NiNode *v68; // esi@53
  UIUtil ui; // [sp+50h] [bp-34h]@25
  NiPointer<NiTexturingProperty> spTexProp; // [sp+64h] [bp-20h]@4
  int v71; // [sp+68h] [bp-1Ch]@25
  int uiLeft; // [sp+6Ch] [bp-18h]@15
  int uiTop; // [sp+70h] [bp-14h]@15
  NiPointer<NiNode> spNode; // [sp+74h] [bp-10h]@1
  int v75; // [sp+80h] [bp-4h]@1
  PgFrameWork *pkFrameWorka; // [sp+8Ch] [bp+8h]@26

  v2 = this;
  spNode.m_pObject = 0;
  this->m_pkFrameWork = pkFrameWork;
  v3 = pTexturePalette;
  v75 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\RaidRootOption.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Frame");
  v6 = (NiTexturingProperty *)NiAVObject::GetProperty(v5, 8);
  v7 = v6;
  spTexProp.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v8 = *v7->m_kMaps.m_pBase;
  LOBYTE(v75) = 1;
  if ( !v8 || (v9 = (NiSourceTexture *)v8->m_spTexture.m_pObject) == 0 )
  {
    LOBYTE(v75) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v10 = spNode.m_pObject;
    v75 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
    return 0;
  }
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v9);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v12, 0, pkFrameWork, "ExpeditionRootOptionWin", 0) )
  {
    v14 = uiLeft;
    v15 = uiTop;
    v16 = MenuTexMgr::GetTexture(0x13u);
    if ( v16 )
      v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v16);
    else
      v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v17, (PgWin *)&v2->vfptr, 0, 0);
    UIUtil::UIUtil(&ui);
    LOBYTE(v75) = 2;
    UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
    UIUtil::SetOffset(&ui, v14, v15);
    UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
    UIUtil::CreateSpr(&ui, "Panel01", 0);
    UIUtil::CreateSpr(&ui, "Panel02", 0);
    *(_QWORD *)&v18.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v18.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v19 = (char *)TextData2::Get(0xBC907078);
    v20 = UIUtil::CreateTextNoSpr(&ui, "WinTitle", v19, v18, 5u);
    v20->vfptr[122].__vecDelDtor((NiRefObject *)v20, 1u);
    *(_QWORD *)&v21.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v21.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v22 = (char *)TextData2::Get(0x5D49726Bu);
    v23 = UIUtil::CreateTextNoSpr(&ui, "RootItemText01", v22, v21, 5u);
    v23->vfptr[122].__vecDelDtor((NiRefObject *)v23, 1u);
    *(_QWORD *)&v24.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v24.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v25 = (char *)TextData2::Get(0x5544186Eu);
    v26 = UIUtil::CreateTextNoSpr(&ui, "RootItemText02", v25, v24, 5u);
    v26->vfptr[122].__vecDelDtor((NiRefObject *)v26, 1u);
    *(_QWORD *)&v27.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v27.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v28 = (char *)TextData2::Get(0x5549182Eu);
    v29 = UIUtil::CreateTextNoSpr(&ui, "RootItemText03", v28, v27, 5u);
    v29->vfptr[122].__vecDelDtor((NiRefObject *)v29, 1u);
    *(_QWORD *)&v30.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v30.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v31 = (char *)TextData2::Get(0x61406A86u);
    v32 = UIUtil::CreateTextNoSpr(&ui, "RootItemText04", v31, v30, 5u);
    v32->vfptr[122].__vecDelDtor((NiRefObject *)v32, 1u);
    *(_QWORD *)&v33.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v33.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v34 = (char *)TextData2::Get(0x59986183u);
    v35 = UIUtil::CreateTextNoSpr(&ui, "RootItemText05", v34, v33, 5u);
    v35->vfptr[122].__vecDelDtor((NiRefObject *)v35, 1u);
    UIUtil::CreateBtn(&ui, 0, "ClsNor", "ClsClick", "ClsOver", 0, 0);
    v36 = UIUtil::CreateBtn(&ui, 7u, "BtnNor", "BtnClick", "BtnOver", 0, 0);
    *(_QWORD *)&v37.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v37.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v38 = (char *)TextData2::Get(0x64462634u);
    UIUtil::CreateAttachedText((PgWin *)&v36->vfptr, v38, v37, 5u);
    v39 = (NiD3DDefaultShader *)UIUtil::CreateBtn(&ui, 1u, "RootItem01Nor", "RootItem01Click", "RootItem01Over", 0, 0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)v2->m_spBtn, v39);
    v40 = (NiD3DDefaultShader *)UIUtil::CreateBtn(&ui, 2u, "RootItem02Nor", "RootItem02Click", "RootItem02Over", 0, 0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spBtn[1], v40);
    v41 = (NiD3DDefaultShader *)UIUtil::CreateBtn(&ui, 3u, "RootItem03Nor", "RootItem03Click", "RootItem03Over", 0, 0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spBtn[2], v41);
    v42 = (NiD3DDefaultShader *)UIUtil::CreateBtn(&ui, 4u, "RootItem04Nor", "RootItem04Click", "RootItem04Over", 0, 0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spBtn[3], v42);
    v43 = (NiD3DDefaultShader *)UIUtil::CreateBtn(&ui, 5u, "RootItem05Nor", "RootItem05Click", "RootItem05Over", 0, 0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spBtn[4], v43);
    v44 = (int)v2->m_spText;
    v71 = 4;
    do
    {
      v45 = *(PgWin **)(v44 - 20);
      *(_QWORD *)&v46.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v46.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v47 = (char *)TextData::Get(0xE54F4142);
      v48 = UIUtil::CreateAttachedText(v45, v47, v46, 5u);
      v49 = *(_DWORD *)v44;
      pkFrameWorka = (PgFrameWork *)v48;
      if ( *(PgWinText **)v44 != v48 )
      {
        if ( v49 )
        {
          if ( !InterlockedDecrement((volatile LONG *)(v49 + 4)) && v49 )
            (**(void (__thiscall ***)(_DWORD, _DWORD))v49)(v49, 1);
          v48 = (PgWinText *)pkFrameWorka;
        }
        *(_DWORD *)v44 = v48;
        if ( v48 )
          InterlockedIncrement((volatile LONG *)&v48->m_uiRefCount);
      }
      *(_DWORD *)(v44 + 20) = 0;
      v44 += 4;
      --v71;
    }
    while ( v71 );
    v50 = MenuTexMgr::GetTexture(4u);
    if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
      UIUtil::CreateBtn(&ui, 8u, "HelpLinkNor", "HelpLinkOver", "HelpLinkClick", 0, v50);
    v51 = MenuTexMgr::GetTexture(1u);
    v52 = PopupMenuWin::CreateWin(v51, 4u, 4u, 0);
    v53 = (int)v2->m_spPopupMenu.m_pObject;
    v54 = v52;
    if ( (PopupMenuWin *)v53 != v52 )
    {
      if ( v53 && !InterlockedDecrement((volatile LONG *)(v53 + 4)) && v53 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v53)(v53, 1);
      v2->m_spPopupMenu.m_pObject = v54;
      if ( v54 )
        InterlockedIncrement((volatile LONG *)&v54->m_uiRefCount);
    }
    v2->m_spPopupMenu.m_pObject->vfptr->SetMsgHooker(&v2->m_spPopupMenu.m_pObject->vfptr, &v2->vfptr);
    PopupMenuWin::Clear(v2->m_spPopupMenu.m_pObject);
    v55 = (char *)TextData::Get(0xE54F4142);
    v56 = PopupMenuText::CreateWin(v55, 0, 0, 0, 0, 0, 0);
    v56->m_ePopupMenuID = 1028;
    PopupMenuWin::AddMenu(v2->m_spPopupMenu.m_pObject, v53, (PopupMenu *)&v56->vfptr);
    v57 = (char *)TextData::Get(0x78A8A1CFu);
    v58 = PopupMenuText::CreateWin(v57, 0, 0, 0, 0, 0, 0);
    v58->m_ePopupMenuID = 1029;
    PopupMenuWin::AddMenu(v2->m_spPopupMenu.m_pObject, v53, (PopupMenu *)&v58->vfptr);
    v59 = (char *)TextData2::Get(0x799878B4u);
    v60 = PopupMenuText::CreateWin(v59, 0, 0, 0, 0, 0, 0);
    v60->m_ePopupMenuID = 1030;
    PopupMenuWin::AddMenu(v2->m_spPopupMenu.m_pObject, v53, (PopupMenu *)&v60->vfptr);
    v61 = (char *)TextData2::Get(0x2C518D68u);
    v62 = PopupMenuText::CreateWin(v61, 0, 0, 0, 0, 0, 0);
    v62->m_ePopupMenuID = 1032;
    PopupMenuWin::AddMenu(v2->m_spPopupMenu.m_pObject, v53, (PopupMenu *)&v62->vfptr);
    PopupMenuWin::FinishMenu(v2->m_spPopupMenu.m_pObject, 0);
    ((void (__stdcall *)(_DWORD))v2->m_spPopupMenu.m_pObject->vfptr[64].__vecDelDtor)(0);
    *(_QWORD *)&v63.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v63.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v64 = UIUtil::CreateTextNoSpr(&ui, "RootName", &byte_9C7B5F, v63, 5u);
    v65 = v2->m_spLootName.m_pObject;
    v66 = v64;
    if ( v65 != v64 )
    {
      if ( v65 && !InterlockedDecrement((volatile LONG *)&v65->m_uiRefCount) && v65 )
        v65->vfptr->__vecDelDtor((NiRefObject *)v65, 1u);
      v2->m_spLootName.m_pObject = v66;
      if ( v66 )
        InterlockedIncrement((volatile LONG *)&v66->m_uiRefCount);
    }
    ((void (__stdcall *)(signed int))v2->m_spLootName.m_pObject->vfptr[122].__vecDelDtor)(1);
    ((void (__thiscall *)(ExpeditionLootOptionWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.1,
      0.30000001);
    LOBYTE(v75) = 1;
    UIUtil::~UIUtil(&ui);
    v67 = spTexProp.m_pObject;
    LOBYTE(v75) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
      v67->vfptr->__vecDelDtor((NiRefObject *)v67, 1u);
    v68 = spNode.m_pObject;
    v75 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v68 )
      v68->vfptr->__vecDelDtor((NiRefObject *)v68, 1u);
    result = 1;
  }
  else
  {
    LOBYTE(v75) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v13 = spNode.m_pObject;
    v75 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v13 )
      return 0;
    ((void (__thiscall *)(NiNode *))v13->vfptr->__vecDelDtor)(v13);
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (007051E0) --------------------------------------------------------
void __thiscall ExpeditionLootOptionWin::OnCommand(ExpeditionLootOptionWin *this, unsigned int wParam, int lParam)
{
  ExpeditionLootOptionWin *v3; // esi@1
  PgWin *v4; // edi@2
  PgWin *v5; // edi@6
  NiRefObjectVtbl *v6; // ebx@7
  int v7; // eax@7
  int v8; // eax@7
  GameFrameWork *v9; // esi@8
  NiUnsharedGeometryGroup *v10; // eax@8
  PgWin *v11; // ST04_4@11
  PgWinBut *v12; // edi@11
  NiRefObjectVtbl *v13; // ST14_4@11
  int v14; // ebx@11
  int v15; // ebx@11
  int v16; // eax@11
  int v17; // ebx@11
  int v18; // eax@11
  GameFrameWork *v19; // eax@12
  NiRefObjectVtbl **wParama; // [sp+14h] [bp+8h]@11

  v3 = this;
  switch ( wParam )
  {
    case 0u:
      v4 = (PgWin *)this->m_pkFrameWork[34].m_kMsgQ.m_pBase;
      if ( (unsigned __int8)((int (__thiscall *)(_DWORD))v4->vfptr[65].__vecDelDtor)(this->m_pkFrameWork[34].m_kMsgQ.m_pBase) )
        PgWinMgr::CloseWin(&Pgg_kWinMgr, v4);
      PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
      PgWin::OnClose((PgWin *)&v3->vfptr);
      break;
    case 7u:
      if ( g_kRaidinfo.m_bIsMeRaidLeader )
      {
        v5 = (PgWin *)this->m_pkFrameWork[34].m_kMsgQ.m_pBase;
        if ( !(unsigned __int8)((int (__thiscall *)(_DWORD))v5->vfptr[65].__vecDelDtor)(this->m_pkFrameWork[34].m_kMsgQ.m_pBase) )
        {
          PgWinMgr::ShowWin(&Pgg_kWinMgr, v5);
          v6 = v5->vfptr;
          v7 = ((int (__thiscall *)(_DWORD))v3->vfptr[42].__vecDelDtor)(v3);
          v8 = (int)v3->vfptr[41].__vecDelDtor((NiRefObject *)v3, v7 + 150);
          v6[77].__vecDelDtor((NiRefObject *)v5, v8);
        }
      }
      else
      {
        v9 = (GameFrameWork *)this->m_pkFrameWork;
        v10 = TextData2::Get(0xD5F3BA10);
        GameFrameWork::AddSysMsg(v9, (const char *)v10);
      }
      break;
    case 1u:
    case 2u:
    case 3u:
    case 4u:
    case 5u:
      if ( g_kRaidinfo.m_bIsMeRaidLeader
        && !(unsigned __int8)((int (*)(void))this->m_spPopupMenu.m_pObject->vfptr[65].__vecDelDtor)() )
      {
        v11 = (PgWin *)&v3->m_spPopupMenu.m_pObject->vfptr;
        v3->m_uiSelectLootSlot = wParam - 1;
        PgWinMgr::ClosePopupWin(&Pgg_kWinMgr, v11);
        v12 = v3->m_spBtn[v3->m_uiSelectLootSlot].m_pObject;
        wParama = &v3->m_spPopupMenu.m_pObject->vfptr;
        v13 = *wParama + 77;
        v14 = ((int (__thiscall *)(_DWORD))v12->vfptr[42].__vecDelDtor)(v3->m_spBtn[v3->m_uiSelectLootSlot].m_pObject);
        v15 = ((int (__thiscall *)(_DWORD))v12->vfptr[37].__vecDelDtor)(v12) + v14;
        v16 = ((int (__thiscall *)(_DWORD))v3->vfptr[42].__vecDelDtor)(v3);
        v17 = (int)v3->vfptr[41].__vecDelDtor((NiRefObject *)v3, v15 + v16);
        v18 = ((int (__thiscall *)(_DWORD))v12->vfptr[41].__vecDelDtor)(v12);
        v13->__vecDelDtor(wParama, v18 + v17);
        PgWinMgr::OpenPopupWin(&Pgg_kWinMgr, 0, (PgWin *)&v3->m_spPopupMenu.m_pObject->vfptr);
      }
      break;
    case 8u:
      v19 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v19 )
        GameFrameWork::OpenPlayGuideSearchList(v19, "RaidRootOption");
      break;
    default:
      return;
  }
}

//----- (007053F0) --------------------------------------------------------
void __thiscall ExpeditionLootOptionWin::SetLootingType(ExpeditionLootOptionWin *this, char nItemGrade, char nLootingType)
{
  char v3; // bl@1
  ExpeditionLootOptionWin *v4; // esi@1
  NiRefObjectVtbl *v5; // edi@2
  NiUnsharedGeometryGroup *v6; // eax@2
  unsigned int v7; // [sp-8h] [bp-10h]@4
  PgWinText *nItemGradea; // [sp+10h] [bp+8h]@2

  v3 = nItemGrade;
  v4 = this;
  switch ( nLootingType )
  {
    case 0:
      v5 = this->m_spText[(unsigned __int8)nItemGrade].m_pObject->vfptr;
      nItemGradea = this->m_spText[(unsigned __int8)nItemGrade].m_pObject;
      v6 = TextData::Get(0xE54F4142);
      goto LABEL_7;
    case 1:
      v5 = this->m_spText[(unsigned __int8)nItemGrade].m_pObject->vfptr;
      nItemGradea = this->m_spText[(unsigned __int8)nItemGrade].m_pObject;
      v6 = TextData::Get(0x78A8A1CFu);
      goto LABEL_7;
    case 2:
      v7 = 2040035508;
      goto LABEL_6;
    case 3:
      v7 = 743542120;
LABEL_6:
      v5 = this->m_spText[(unsigned __int8)nItemGrade].m_pObject->vfptr;
      nItemGradea = this->m_spText[(unsigned __int8)nItemGrade].m_pObject;
      v6 = TextData2::Get(v7);
LABEL_7:
      v5[118].__vecDelDtor((NiRefObject *)nItemGradea, (unsigned int)v6);
      break;
    default:
      break;
  }
  v4->m_eLootType[(unsigned __int8)v3] = (unsigned __int8)nLootingType;
}

//----- (007054A0) --------------------------------------------------------
char __thiscall EntryIconWin::Create(EntryIconWin *this, NiAVObject *pkObject, int group, int index, PgWin *pkParent, unsigned int uiCmdMsg, unsigned int uiRCmdMsg)
{
  EntryIconWin *v7; // esi@1
  NiAVObject *v8; // eax@2
  NiTexturingProperty *v9; // eax@2
  NiTexturingProperty *v10; // edi@2
  NiTexturingProperty::Map *v11; // eax@4
  NiRefObjectVtbl *v12; // edx@7
  NiTexturingProperty *v13; // ecx@7
  int v15; // edi@11
  float fHeight; // ST4C_4@11
  int v17; // ebx@11
  char *v18; // eax@11
  PgWinSpr *v19; // eax@11
  int v20; // ecx@11
  int v21; // eax@16
  char *v22; // eax@18
  PgWinSpr *v23; // eax@18
  int v24; // ecx@18
  int v25; // eax@23
  char *v26; // eax@25
  PgWinSpr *v27; // eax@25
  int v28; // ecx@25
  int v29; // eax@30
  char *v30; // eax@32
  PgWinSpr *v31; // eax@32
  int v32; // ecx@32
  int v33; // eax@37
  char *v34; // eax@39
  PgWinSpr *v35; // eax@39
  int v36; // ecx@39
  int v37; // eax@44
  char *v38; // eax@46
  PgWinSpr *v39; // eax@46
  int v40; // ecx@46
  int v41; // eax@51
  char *v42; // eax@53
  PgWinSpr *v43; // eax@53
  PgWinSpr *v44; // edi@53
  PgWinSpr *v45; // ebx@53
  int v46; // edi@60
  signed int v47; // ebx@60
  int (*v48)(void); // edx@62
  int v49; // edi@62
  int (*v50)(void); // edx@62
  int v51; // ebx@62
  int (*v52)(void); // edx@62
  int v53; // eax@62
  PgWinSpr *v54; // ecx@62
  int v55; // eax@62
  PgWinLRBut *v56; // eax@62
  PgWinLRBut *v57; // edi@62
  PgWinLRBut *v58; // ebx@62
  unsigned int v59; // edx@69
  NiScreenElements *v60; // edi@69
  NiScreenElementsData *v61; // eax@70
  NiScreenElementsData *v62; // eax@71
  NiScreenElements *v63; // eax@71
  NiScreenElements *v64; // ebx@71
  NiScreenElements *v65; // eax@72
  NiScreenElements *v66; // edi@74
  float v67; // ST4C_4@81
  float fWidth; // ST48_4@81
  float fTop; // ST44_4@81
  float fLeft; // ST40_4@81
  NiScreenElements *v71; // eax@81
  NiScreenElements *v72; // edi@81
  NiScreenElementsData *v73; // eax@82
  NiScreenElementsData *v74; // eax@83
  NiScreenElements *v75; // eax@83
  NiScreenElements *v76; // ebx@83
  NiScreenElements *v77; // eax@84
  NiScreenElements *v78; // edi@86
  NiScreenElementsData *v79; // eax@93
  float v80; // ST4C_4@93
  float v81; // ST48_4@93
  float v82; // ST44_4@93
  float v83; // ST40_4@93
  NiScreenElements *v84; // eax@93
  NiMaterialProperty *v85; // eax@93
  NiMaterialProperty *v86; // eax@94
  NiMaterialProperty *v87; // ebx@94
  NiMaterialProperty *v88; // edi@96
  NiMaterialProperty *v89; // eax@103
  float v90; // edx@103
  NiMaterialProperty *v91; // eax@103
  float v92; // ecx@103
  float v93; // edx@103
  float v94; // ecx@103
  NiMaterialProperty *v95; // eax@103
  float v96; // edx@103
  float v97; // ecx@103
  NiMaterialProperty *v98; // eax@103
  int v99; // edi@103
  NiObjectNET *v100; // eax@108
  int v101; // edi@108
  int v102; // eax@113
  int v103; // ecx@113
  PgSprData *v104; // edi@120
  PgWinSpr *v105; // eax@120
  PgWinSpr *v106; // edi@120
  int v107; // eax@125
  NiTexturingProperty *v108; // esi@128
  PgFont *v109; // eax@130
  PgWinText *v110; // eax@130
  PgWinText *v111; // edi@130
  int v112; // eax@135
  PgWin *v113; // ST48_4@138
  PgFont *v114; // eax@138
  PgWinAbbreviateText *v115; // eax@138
  PgWinAbbreviateText *v116; // edi@138
  int v117; // eax@143
  PgSprData *v118; // edi@145
  PgWinSpr *v119; // eax@145
  PgWinSpr *v120; // ebx@145
  PgWinSpr *v121; // edi@145
  NiTexturingProperty *v122; // esi@152
  UIUtil ui; // [sp+68h] [bp-260h]@2
  NiPointer<NiTexturingProperty> spTexProp; // [sp+7Ch] [bp-24Ch]@2
  unsigned int v125; // [sp+80h] [bp-248h]@1
  unsigned int uiHeight; // [sp+84h] [bp-244h]@120
  unsigned int uiWidth; // [sp+88h] [bp-240h]@120
  NiColorA kCommonValue; // [sp+8Ch] [bp-23Ch]@81
  unsigned int v129; // [sp+9Ch] [bp-22Ch]@1
  int uiLeft; // [sp+A0h] [bp-228h]@120
  int uiTop; // [sp+A4h] [bp-224h]@120
  int posY; // [sp+A8h] [bp-220h]@62
  int Height; // [sp+ACh] [bp-21Ch]@11
  int posX; // [sp+B0h] [bp-218h]@1
  int Width; // [sp+B4h] [bp-214h]@11
  char acNodeLevel[128]; // [sp+B8h] [bp-210h]@2
  char acNodeChief[128]; // [sp+138h] [bp-190h]@2
  char acNodeName[128]; // [sp+1B8h] [bp-110h]@2
  char acNodeLoot[128]; // [sp+238h] [bp-90h]@2
  int v140; // [sp+2C4h] [bp-4h]@2

  v7 = this;
  v125 = uiCmdMsg;
  posX = index;
  v129 = uiRCmdMsg;
  if ( !PgWin::Create((PgWin *)&this->vfptr, 0, 0, 1u, 1u, 0, "EntryIconWin", 0) )
    return 0;
  UIUtil::UIUtil(&ui);
  v140 = 0;
  UIUtil::SetParent(&ui, (PgWin *)&v7->vfptr);
  UIUtil::SetUIGeom(&ui, pkObject);
  acNodeChief[0] = 0;
  memset(&acNodeChief[1], 0, 0x7Fu);
  acNodeLoot[0] = 0;
  memset(&acNodeLoot[1], 0, 0x7Fu);
  acNodeLevel[0] = 0;
  memset(&acNodeLevel[1], 0, 0x7Fu);
  acNodeName[0] = 0;
  memset(&acNodeName[1], 0, 0x7Fu);
  v8 = (NiAVObject *)pkObject->vfptr[18].__vecDelDtor((NiRefObject *)pkObject, (unsigned int)"Frame");
  v9 = (NiTexturingProperty *)NiAVObject::GetProperty(v8, 8);
  v10 = v9;
  spTexProp.m_pObject = v9;
  if ( v9 )
    InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  v11 = *v10->m_kMaps.m_pBase;
  LOBYTE(v140) = 1;
  if ( !v11 || !v11->m_spTexture.m_pObject )
  {
    LOBYTE(v140) = 0;
    if ( InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) )
    {
LABEL_9:
      v140 = -1;
      UIUtil::~UIUtil(&ui);
      return 0;
    }
    v12 = v10->vfptr;
    v13 = v10;
LABEL_8:
    v12->__vecDelDtor(v13, 1);
    goto LABEL_9;
  }
  v15 = posX + 1;
  LODWORD(fHeight) = posX + 1;
  v17 = group + 1;
  v7->m_uiInvIndex = group + posX + 4 * group + 1;
  sprintf(acNodeChief, "Party%.2dMember%.2dChief", group + 1, fHeight);
  sprintf(acNodeLoot, "Party%.2dMember%.2dRoot", group + 1, v15);
  sprintf(acNodeLevel, "Party%.2dMember%.2dLevel", group + 1, v15);
  sprintf(acNodeName, "Party%.2dMember%.2dName", group + 1, v15);
  v18 = fs("Party%.2dMember%.2d", group + 1, v15);
  v19 = UIUtil::CreateSpr(&ui, v18, 0);
  v20 = (int)v7->m_spPosBar.m_pObject;
  Height = (int)v19;
  Width = v20;
  if ( (PgWinSpr *)v20 != v19 )
  {
    if ( v20 && !InterlockedDecrement((volatile LONG *)(v20 + 4)) && Width )
      (**(void (__stdcall ***)(_DWORD))Width)(1);
    v21 = Height;
    v7->m_spPosBar.m_pObject = (PgWinSpr *)Height;
    if ( v21 )
      InterlockedIncrement((volatile LONG *)(v21 + 4));
  }
  ((void (__stdcall *)(_DWORD))v7->m_spPosBar.m_pObject->vfptr[69].__vecDelDtor)(1.0);
  v22 = fs("Party%.2dMember%.2dClassFighter", v17, v15);
  v23 = UIUtil::CreateSpr(&ui, v22, 0);
  v24 = (int)v7->m_spClassBar[0].m_pObject;
  Height = (int)v23;
  Width = v24;
  if ( (PgWinSpr *)v24 != v23 )
  {
    if ( v24 && !InterlockedDecrement((volatile LONG *)(v24 + 4)) && Width )
      (**(void (__stdcall ***)(_DWORD))Width)(1);
    v25 = Height;
    v7->m_spClassBar[0].m_pObject = (PgWinSpr *)Height;
    if ( v25 )
      InterlockedIncrement((volatile LONG *)(v25 + 4));
  }
  v26 = fs("Party%.2dMember%.2dClassCleric", v17, v15);
  v27 = UIUtil::CreateSpr(&ui, v26, 0);
  v28 = (int)v7->m_spClassBar[1].m_pObject;
  Height = (int)v27;
  Width = v28;
  if ( (PgWinSpr *)v28 != v27 )
  {
    if ( v28 && !InterlockedDecrement((volatile LONG *)(v28 + 4)) && Width )
      (**(void (__stdcall ***)(_DWORD))Width)(1);
    v29 = Height;
    v7->m_spClassBar[1].m_pObject = (PgWinSpr *)Height;
    if ( v29 )
      InterlockedIncrement((volatile LONG *)(v29 + 4));
  }
  v30 = fs("Party%.2dMember%.2dClassArcher", v17, v15);
  v31 = UIUtil::CreateSpr(&ui, v30, 0);
  v32 = (int)v7->m_spClassBar[2].m_pObject;
  Height = (int)v31;
  Width = v32;
  if ( (PgWinSpr *)v32 != v31 )
  {
    if ( v32 && !InterlockedDecrement((volatile LONG *)(v32 + 4)) && Width )
      (**(void (__stdcall ***)(_DWORD))Width)(1);
    v33 = Height;
    v7->m_spClassBar[2].m_pObject = (PgWinSpr *)Height;
    if ( v33 )
      InterlockedIncrement((volatile LONG *)(v33 + 4));
  }
  v34 = fs("Party%.2dMember%.2dClassMage", v17, v15);
  v35 = UIUtil::CreateSpr(&ui, v34, 0);
  v36 = (int)v7->m_spClassBar[3].m_pObject;
  Height = (int)v35;
  Width = v36;
  if ( (PgWinSpr *)v36 != v35 )
  {
    if ( v36 && !InterlockedDecrement((volatile LONG *)(v36 + 4)) && Width )
      (**(void (__stdcall ***)(_DWORD))Width)(1);
    v37 = Height;
    v7->m_spClassBar[3].m_pObject = (PgWinSpr *)Height;
    if ( v37 )
      InterlockedIncrement((volatile LONG *)(v37 + 4));
  }
  v38 = fs("Party%.2dMember%.2dClassJoker", v17, v15);
  v39 = UIUtil::CreateSpr(&ui, v38, 0);
  v40 = (int)v7->m_spClassBar[4].m_pObject;
  Height = (int)v39;
  Width = v40;
  if ( (PgWinSpr *)v40 != v39 )
  {
    if ( v40 && !InterlockedDecrement((volatile LONG *)(v40 + 4)) && Width )
      (**(void (__stdcall ***)(_DWORD))Width)(1);
    v41 = Height;
    v7->m_spClassBar[4].m_pObject = (PgWinSpr *)Height;
    if ( v41 )
      InterlockedIncrement((volatile LONG *)(v41 + 4));
  }
  v42 = fs("Party%.2dMember%.2dClassSentinel", v17, v15);
  v43 = UIUtil::CreateSpr(&ui, v42, 0);
  v44 = v7->m_spClassBar[5].m_pObject;
  v45 = v43;
  if ( v44 != v43 )
  {
    if ( v44 && !InterlockedDecrement((volatile LONG *)&v44->m_uiRefCount) && v44 )
      v44->vfptr->__vecDelDtor((NiRefObject *)v44, 1u);
    v7->m_spClassBar[5].m_pObject = v45;
    if ( v45 )
      InterlockedIncrement((volatile LONG *)&v45->m_uiRefCount);
  }
  v46 = (int)v7->m_spClassBar;
  v47 = 6;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v46 + 256))(0);
    v46 += 4;
    --v47;
  }
  while ( v47 );
  v48 = (int (*)(void))v7->m_spPosBar.m_pObject->vfptr[41].__vecDelDtor;
  LOBYTE(v140) = 2;
  v49 = v48();
  v50 = (int (*)(void))v7->m_spPosBar.m_pObject->vfptr[42].__vecDelDtor;
  posX = v49;
  v51 = v50();
  v52 = (int (*)(void))v7->m_spPosBar.m_pObject->vfptr[36].__vecDelDtor;
  posY = v51;
  v53 = v52();
  v54 = v7->m_spPosBar.m_pObject;
  Width = v53;
  v55 = ((int (*)(void))v54->vfptr[37].__vecDelDtor)();
  Height = v55;
  v56 = PgWinLRBut::CreateWin(v49, v51, Width, v55, (PgWin *)&v7->vfptr, v125, v129);
  v57 = v7->m_spLRBut.m_pObject;
  v58 = v56;
  if ( v57 != v56 )
  {
    if ( v57 && !InterlockedDecrement((volatile LONG *)&v57->m_uiRefCount) && v57 )
      v57->vfptr->__vecDelDtor((NiRefObject *)v57, 1u);
    v7->m_spLRBut.m_pObject = v58;
    if ( v58 )
      InterlockedIncrement((volatile LONG *)&v58->m_uiRefCount);
  }
  v59 = v129;
  v7->m_uiCmdMsg = v125;
  v7->m_uiRCmdMsg = v59;
  v60 = (NiScreenElements *)operator new(0xC4u);
  v129 = (unsigned int)v60;
  LOBYTE(v140) = 3;
  if ( v60 )
  {
    v61 = (NiScreenElementsData *)operator new(0x70u);
    v125 = (unsigned int)v61;
    LOBYTE(v140) = 4;
    if ( v61 )
    {
      NiScreenElementsData::NiScreenElementsData(v61, 0, 1, 0, 1, 1, 4, 1, 2, 1);
      LOBYTE(v140) = 3;
      NiScreenElements::NiScreenElements(v60, v62);
      v64 = v63;
    }
    else
    {
      LOBYTE(v140) = 3;
      NiScreenElements::NiScreenElements(v60, 0);
      v64 = v65;
    }
  }
  else
  {
    v64 = 0;
  }
  v66 = v7->m_spSubImagePlane.m_pObject;
  LOBYTE(v140) = 2;
  if ( v66 != v64 )
  {
    if ( v66 && !InterlockedDecrement((volatile LONG *)&v66->m_uiRefCount) && v66 )
      v66->vfptr->__vecDelDtor((NiRefObject *)v66, 1u);
    v7->m_spSubImagePlane.m_pObject = v64;
    if ( v64 )
      InterlockedIncrement((volatile LONG *)&v64->m_uiRefCount);
  }
  NiScreenElementsData::Insert(
    (NiScreenElementsData *)v7->m_spSubImagePlane.m_pObject->m_spModelData.m_pObject,
    4u,
    0,
    0);
  v67 = (double)Height;
  fWidth = (double)Width;
  fTop = (double)posY;
  fLeft = (double)posX;
  NiScreenElementsData::SetRectangle(
    (NiScreenElementsData *)v7->m_spSubImagePlane.m_pObject->m_spModelData.m_pObject,
    0,
    fLeft,
    fTop,
    fWidth,
    v67);
  v71 = v7->m_spSubImagePlane.m_pObject;
  kCommonValue.r = 0.0;
  kCommonValue.g = 0.0;
  kCommonValue.b = 0.0;
  kCommonValue.a = 0.0;
  NiScreenElementsData::SetColors((NiScreenElementsData *)v71->m_spModelData.m_pObject, 0, &kCommonValue);
  v72 = (NiScreenElements *)operator new(0xC4u);
  v129 = (unsigned int)v72;
  LOBYTE(v140) = 5;
  if ( v72 )
  {
    v73 = (NiScreenElementsData *)operator new(0x70u);
    v125 = (unsigned int)v73;
    LOBYTE(v140) = 6;
    if ( v73 )
    {
      NiScreenElementsData::NiScreenElementsData(v73, 0, 1, 0, 1, 1, 4, 1, 2, 1);
      LOBYTE(v140) = 5;
      NiScreenElements::NiScreenElements(v72, v74);
      v76 = v75;
    }
    else
    {
      LOBYTE(v140) = 5;
      NiScreenElements::NiScreenElements(v72, 0);
      v76 = v77;
    }
  }
  else
  {
    v76 = 0;
  }
  v78 = v7->m_spBackImagePlane.m_pObject;
  LOBYTE(v140) = 2;
  if ( v78 != v76 )
  {
    if ( v78 && !InterlockedDecrement((volatile LONG *)&v78->m_uiRefCount) && v78 )
      v78->vfptr->__vecDelDtor((NiRefObject *)v78, 1u);
    v7->m_spBackImagePlane.m_pObject = v76;
    if ( v76 )
      InterlockedIncrement((volatile LONG *)&v76->m_uiRefCount);
  }
  NiScreenElementsData::Insert(
    (NiScreenElementsData *)v7->m_spBackImagePlane.m_pObject->m_spModelData.m_pObject,
    4u,
    0,
    0);
  v79 = (NiScreenElementsData *)v7->m_spBackImagePlane.m_pObject->m_spModelData.m_pObject;
  v80 = (double)(Height + 6);
  v129 = Width + 6;
  v81 = (double)(Width + 6);
  posY -= 4;
  posX -= 4;
  v82 = (double)posY;
  v83 = (double)posX;
  NiScreenElementsData::SetRectangle(v79, 0, v83, v82, v81, v80);
  v84 = v7->m_spBackImagePlane.m_pObject;
  kCommonValue.r = 0.0;
  kCommonValue.g = 0.0;
  kCommonValue.b = 0.0;
  kCommonValue.a = 0.0;
  NiScreenElementsData::SetColors((NiScreenElementsData *)v84->m_spModelData.m_pObject, 0, &kCommonValue);
  v85 = (NiMaterialProperty *)operator new(0x60u);
  posX = (int)v85;
  LOBYTE(v140) = 7;
  if ( v85 )
  {
    NiMaterialProperty::NiMaterialProperty(v85);
    v87 = v86;
  }
  else
  {
    v87 = 0;
  }
  v88 = v7->m_spFixedMtrlProp.m_pObject;
  LOBYTE(v140) = 2;
  if ( v88 != v87 )
  {
    if ( v88 && !InterlockedDecrement((volatile LONG *)&v88->m_uiRefCount) && v88 )
      v88->vfptr->__vecDelDtor((NiRefObject *)v88, 1u);
    v7->m_spFixedMtrlProp.m_pObject = v87;
    if ( v87 )
      InterlockedIncrement((volatile LONG *)&v87->m_uiRefCount);
  }
  v89 = v7->m_spFixedMtrlProp.m_pObject;
  kCommonValue.g = 255.0;
  v89->m_amb.r = 255.0;
  kCommonValue.b = 0.0;
  ++v89->m_uiRevID;
  kCommonValue.g = 255.0;
  v89->m_amb.g = kCommonValue.b;
  v90 = kCommonValue.g;
  kCommonValue.b = 0.0;
  v89->m_amb.b = 0.0;
  kCommonValue.a = 0.0;
  v91 = v7->m_spFixedMtrlProp.m_pObject;
  ++v91->m_uiRevID;
  kCommonValue.g = 255.0;
  v92 = kCommonValue.b;
  v91->m_diff.r = v90;
  v93 = kCommonValue.a;
  kCommonValue.b = 0.0;
  v91->m_diff.g = v92;
  kCommonValue.a = 0.0;
  v94 = kCommonValue.g;
  v91->m_diff.b = v93;
  v95 = v7->m_spFixedMtrlProp.m_pObject;
  ++v95->m_uiRevID;
  v96 = kCommonValue.b;
  v95->m_emit.r = v94;
  v97 = kCommonValue.a;
  v95->m_emit.g = v96;
  v95->m_emit.b = v97;
  v98 = v7->m_spFixedMtrlProp.m_pObject;
  ++v98->m_uiRevID;
  v98->m_fAlpha = 0.0;
  v99 = (int)v7->m_spFixedMtrlProp.m_pObject;
  posY = (int)v7->m_spSubImagePlane.m_pObject;
  posX = v99;
  if ( v99 )
    InterlockedIncrement((volatile LONG *)(v99 + 4));
  LOBYTE(v140) = 8;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(posY + 156),
    (NiPointer<NiRoom> *)&posX);
  LOBYTE(v140) = 2;
  if ( v99 && !InterlockedDecrement((volatile LONG *)(v99 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v99)(v99, 1);
  v100 = (NiObjectNET *)operator new(0x20u);
  v101 = (int)v100;
  posX = (int)v100;
  LOBYTE(v140) = 9;
  if ( v100 )
  {
    NiObjectNET::NiObjectNET(v100);
    *(_DWORD *)v101 = &NiAlphaProperty::`vftable';
    *(_WORD *)(v101 + 28) = 236;
    *(_BYTE *)(v101 + 30) = 0;
  }
  else
  {
    v101 = 0;
  }
  *(_WORD *)(v101 + 28) |= 1u;
  posY = (int)v7->m_spSubImagePlane.m_pObject;
  posX = v101;
  InterlockedIncrement((volatile LONG *)(v101 + 4));
  LOBYTE(v140) = 10;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(posY + 156),
    (NiPointer<NiRoom> *)&posX);
  LOBYTE(v140) = 2;
  if ( !InterlockedDecrement((volatile LONG *)(v101 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v101)(v101, 1);
  v102 = (int)v7->m_spFixedMtrlProp.m_pObject;
  v103 = (int)v7->m_spBackImagePlane.m_pObject;
  Width = v102;
  posY = v103;
  posX = v102;
  if ( v102 )
    InterlockedIncrement((volatile LONG *)(v102 + 4));
  LOBYTE(v140) = 11;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(posY + 156),
    (NiPointer<NiRoom> *)&posX);
  LOBYTE(v140) = 2;
  if ( Width && !InterlockedDecrement((volatile LONG *)(Width + 4)) )
    (**(void (__stdcall ***)(_DWORD))Width)(1);
  posY = (int)v7->m_spBackImagePlane.m_pObject;
  posX = v101;
  InterlockedIncrement((volatile LONG *)(v101 + 4));
  LOBYTE(v140) = 12;
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiPSysModifier>>::AddHead(
    (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NiRoom> > *)(posY + 156),
    (NiPointer<NiRoom> *)&posX);
  LOBYTE(v140) = 2;
  if ( !InterlockedDecrement((volatile LONG *)(v101 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v101)(v101, 1);
  NiAVObject::UpdateProperties((NiAVObject *)&v7->m_spBackImagePlane.m_pObject->vfptr);
  NiAVObject::Update((NiAVObject *)&v7->m_spBackImagePlane.m_pObject->vfptr, 0.0, 1);
  NiScreenElementsData::UpdateBound((NiScreenElementsData *)v7->m_spSubImagePlane.m_pObject->m_spModelData.m_pObject);
  NiAVObject::UpdateProperties((NiAVObject *)&v7->m_spSubImagePlane.m_pObject->vfptr);
  NiAVObject::Update((NiAVObject *)&v7->m_spSubImagePlane.m_pObject->vfptr, 0.0, 1);
  ((void (__thiscall *)(EntryIconWin *, NiScreenElements *, _DWORD))v7->vfptr[29].__vecDelDtor)(
    v7,
    v7->m_spSubImagePlane.m_pObject,
    0);
  NiAVObject::UpdateProperties((NiAVObject *)&v7->vfptr);
  v104 = PgSprData::Create(pkObject, "Chief01", &uiLeft, &uiTop, 0);
  PgSprData::Add(v104, pkObject, "Chief02");
  PgSprData::Add(v104, pkObject, "Rooter");
  PgUtil::GetTriShapeRect(pkObject, acNodeChief, &uiLeft, &uiTop, &uiWidth, &uiHeight);
  v105 = PgWinSpr::CreateWin(uiLeft, uiTop, v104, (PgWin *)&v7->vfptr, 0, 0);
  v106 = v7->m_spMemberMark.m_pObject;
  posX = (int)v105;
  if ( v106 != v105 )
  {
    if ( v106 && !InterlockedDecrement((volatile LONG *)&v106->m_uiRefCount) && v106 )
      v106->vfptr->__vecDelDtor((NiRefObject *)v106, 1u);
    v107 = posX;
    v7->m_spMemberMark.m_pObject = (PgWinSpr *)posX;
    if ( v107 )
      InterlockedIncrement((volatile LONG *)(v107 + 4));
  }
  ((void (__stdcall *)(_DWORD))v7->m_spMemberMark.m_pObject->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v7->m_spMemberMark.m_pObject->vfptr[123].__vecDelDtor)(0);
  if ( !PgUtil::GetTriShapeRect(pkObject, acNodeLevel, &uiLeft, &uiTop, &uiWidth, &uiHeight) )
    goto LABEL_157;
  v109 = Font::Get(SMALL);
  v110 = PgWinText::CreateWin(uiLeft, uiTop, uiWidth, uiHeight, v109, (PgWin *)&v7->vfptr, 0, 0);
  v111 = v7->m_spLevelText.m_pObject;
  posX = (int)v110;
  if ( v111 != v110 )
  {
    if ( v111 && !InterlockedDecrement((volatile LONG *)&v111->m_uiRefCount) && v111 )
      v111->vfptr->__vecDelDtor((NiRefObject *)v111, 1u);
    v112 = posX;
    v7->m_spLevelText.m_pObject = (PgWinText *)posX;
    if ( v112 )
      InterlockedIncrement((volatile LONG *)(v112 + 4));
  }
  ((void (__stdcall *)(signed int))v7->m_spLevelText.m_pObject->vfptr[122].__vecDelDtor)(6);
  ((void (__stdcall *)(D3DXCOLOR *))v7->m_spLevelText.m_pObject->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
  ((void (__stdcall *)(void *))v7->m_spLevelText.m_pObject->vfptr[118].__vecDelDtor)(&unk_9C7A42);
  ((void (__stdcall *)(_DWORD))v7->m_spLevelText.m_pObject->vfptr[60].__vecDelDtor)(0);
  if ( !PgUtil::GetTriShapeRect(pkObject, acNodeName, &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
LABEL_157:
    v108 = spTexProp.m_pObject;
    LOBYTE(v140) = 0;
    if ( InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
      goto LABEL_9;
    v12 = v108->vfptr;
    v13 = v108;
    goto LABEL_8;
  }
  v113 = g_pkToolTipWin;
  v114 = Font::Get(SMALL);
  v115 = PgWinAbbreviateText::CreateWin(
           uiLeft,
           uiTop,
           uiWidth,
           uiHeight,
           v114,
           (PgWin *)&v7->vfptr,
           0,
           0,
           0,
           1,
           v113,
           0xAu);
  v116 = v7->m_spNameText.m_pObject;
  posX = (int)v115;
  if ( v116 != v115 )
  {
    if ( v116 && !InterlockedDecrement((volatile LONG *)&v116->m_uiRefCount) && v116 )
      v116->vfptr->__vecDelDtor((NiRefObject *)v116, 1u);
    v117 = posX;
    v7->m_spNameText.m_pObject = (PgWinAbbreviateText *)posX;
    if ( v117 )
      InterlockedIncrement((volatile LONG *)(v117 + 4));
  }
  ((void (__stdcall *)(signed int))v7->m_spNameText.m_pObject->vfptr[122].__vecDelDtor)(4);
  ((void (__stdcall *)(_DWORD))v7->m_spNameText.m_pObject->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(void *))v7->m_spNameText.m_pObject->vfptr[118].__vecDelDtor)(&unk_9C7A43);
  v118 = PgSprData::Create(pkObject, "Rooter", &uiLeft, &uiTop, 0);
  PgUtil::GetTriShapeRect(pkObject, acNodeLoot, &uiLeft, &uiTop, &uiWidth, &uiHeight);
  v119 = PgWinSpr::CreateWin(uiLeft, uiTop, v118, (PgWin *)&v7->vfptr, 0, 0);
  v120 = v7->m_spLootingMark.m_pObject;
  v121 = v119;
  if ( v120 != v119 )
  {
    if ( v120 && !InterlockedDecrement((volatile LONG *)&v120->m_uiRefCount) && v120 )
      v120->vfptr->__vecDelDtor((NiRefObject *)v120, 1u);
    v7->m_spLootingMark.m_pObject = v121;
    if ( v121 )
      InterlockedIncrement((volatile LONG *)&v121->m_uiRefCount);
  }
  ((void (__stdcall *)(_DWORD))v7->m_spLootingMark.m_pObject->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v7->m_spLootingMark.m_pObject->vfptr[123].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v7->m_spMemberMark.m_pObject->vfptr[64].__vecDelDtor)(0);
  v7->m_spLootingMark.m_pObject->vfptr[64].__vecDelDtor((NiRefObject *)v7->m_spLootingMark.m_pObject, 0);
  v122 = spTexProp.m_pObject;
  LOBYTE(v140) = 0;
  if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
    v122->vfptr->__vecDelDtor((NiRefObject *)v122, 1u);
  v140 = -1;
  UIUtil::~UIUtil(&ui);
  return 1;
}
// 9704A4: using guessed type int (__thiscall *NiAlphaProperty::`vftable')(void *p, char);

//----- (00706500) --------------------------------------------------------
void __thiscall EntryIconWin::UpdateMeWin(EntryIconWin *this, float fCurTime)
{
  EntryIconWin *v2; // esi@1
  char v3; // bl@1
  double v4; // st7@2
  float fSin; // ST24_4@7
  double v6; // st7@7
  float v7; // ST24_4@10
  float v8; // ST24_4@10
  float v9; // ST24_4@11
  double v10; // st7@11
  float v11; // ST24_4@13
  PgWinLRBut *v12; // ecx@14
  float v13; // ST24_4@16
  float v14; // ST24_4@16
  float v15; // ST24_4@17
  NiMaterialProperty *v16; // eax@19
  float v17; // ST24_4@20
  int v18; // edi@20
  signed int v19; // ebx@20
  float v20; // ST24_4@21

  v2 = this;
  v3 = ((int (__stdcall *)(unsigned int, int))this->m_spLRBut.m_pObject->vfptr[83].__vecDelDtor)(
         PgWin::ms_iMsX,
         PgWin::ms_iMsY);
  if ( !v2->m_bIsKeep )
  {
    EntryIconWin::ShowLeaderLooterMark(v2);
    v4 = 0.0;
    if ( v3 )
    {
      if ( v2->m_kAlphaControl.fTimeLeftToAppear > 0.0 )
        v2->m_kAlphaControl.fTimeLeftToAppear = v2->m_kAlphaControl.fTimeLeftToAppear - Timer::ms_fDeltaTime * 10.0;
      if ( v2->m_kAlphaControl.fTimeLeftToAppear > 0.0 )
        goto LABEL_20;
      ((void (__stdcall *)(signed int))v2->m_spLRBut.m_pObject->vfptr[64].__vecDelDtor)(1);
      if ( v2->m_kAlphaControl.fAlphaValue >= 1.0 )
        goto LABEL_20;
      fSin = Timer::ms_fDeltaTime + Timer::ms_fDeltaTime + v2->m_kAlphaControl.fAlphaValue;
      v2->m_kAlphaControl.fAlphaValue = fSin;
      v6 = 0.69999999;
      if ( fSin > 0.69999999 )
        v2->m_kAlphaControl.fAlphaValue = 0.69999999;
      if ( v2->m_kAlphaControl.fAlphaValue < 0.69999999 )
      {
        v7 = NI_HALF_PI * v2->m_kAlphaControl.fAlphaValue;
        v8 = sin(v7);
        v6 = v8;
      }
      v9 = v6;
      v10 = v9;
    }
    else if ( v2->m_kAlphaControl.fAlphaValue <= 0.0 )
    {
      ((void (__stdcall *)(_DWORD))v2->m_spLRBut.m_pObject->vfptr[64].__vecDelDtor)(0);
      v10 = 0.0;
    }
    else
    {
      v11 = v2->m_kAlphaControl.fAlphaValue - (Timer::ms_fDeltaTime + Timer::ms_fDeltaTime);
      v2->m_kAlphaControl.fAlphaValue = v11;
      if ( v11 <= 0.0 )
      {
        v12 = v2->m_spLRBut.m_pObject;
        v2->m_kAlphaControl.fAlphaValue = 0.0;
        v2->m_kAlphaControl.fTimeLeftToAppear = 1.0;
        ((void (__stdcall *)(_DWORD))v12->vfptr[64].__vecDelDtor)(0);
        v4 = 0.0;
      }
      if ( v4 < v2->m_kAlphaControl.fAlphaValue )
      {
        v13 = NI_HALF_PI * v2->m_kAlphaControl.fAlphaValue;
        v14 = sin(v13);
        v4 = v14;
      }
      v15 = v4;
      v10 = v15;
    }
    v16 = v2->m_spFixedMtrlProp.m_pObject;
    ++v16->m_uiRevID;
    v16->m_fAlpha = v10;
LABEL_20:
    NiScreenElementsData::UpdateBound((NiScreenElementsData *)v2->m_spBackImagePlane.m_pObject->m_spModelData.m_pObject);
    NiAVObject::UpdateProperties((NiAVObject *)&v2->m_spBackImagePlane.m_pObject->vfptr);
    NiAVObject::Update((NiAVObject *)&v2->m_spBackImagePlane.m_pObject->vfptr, 0.0, 1);
    NiScreenElementsData::UpdateBound((NiScreenElementsData *)v2->m_spSubImagePlane.m_pObject->m_spModelData.m_pObject);
    NiAVObject::UpdateProperties((NiAVObject *)&v2->m_spSubImagePlane.m_pObject->vfptr);
    NiAVObject::Update((NiAVObject *)&v2->m_spSubImagePlane.m_pObject->vfptr, 0.0, 1);
    v2->vfptr[69].__vecDelDtor((NiRefObject *)v2, COERCE_UNSIGNED_INT(v2->m_spFixedMtrlProp.m_pObject->m_fAlpha));
    v17 = 1.0 - v2->m_spFixedMtrlProp.m_pObject->m_fAlpha;
    ((void (__stdcall *)(_DWORD))v2->m_spPosBar.m_pObject->vfptr[69].__vecDelDtor)(LODWORD(v17));
    v18 = (int)v2->m_spClassBar;
    v19 = 6;
    do
    {
      v20 = 1.0 - v2->m_spFixedMtrlProp.m_pObject->m_fAlpha;
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v18 + 276))(LODWORD(v20));
      v18 += 4;
      --v19;
    }
    while ( v19 );
  }
}
// A8B980: using guessed type float Timer::ms_fDeltaTime;
// B622D0: using guessed type const float NI_HALF_PI;

//----- (007067A0) --------------------------------------------------------
void __thiscall ExpeditionMemberAddWin::UpdateMeWin(ExpeditionMemberAddWin *this, float fCurTime)
{
  ExpeditionMemberAddWin *v2; // edi@1

  v2 = this;
  if ( g_pkKeyboard->m_aucKeystate[0] & 2 )
  {
    BYTE3(this->m_pkFrameWork[73].m_kMsgQ.m_uiAlloced) = 0;
    if ( PgWinMgr::IsIn(&Pgg_kWinMgr, (PgWin *)&this->vfptr) )
      PgTQueue<PgWinMgr::PgWinMsg>::Add(&stru_B6483C, (PgWinMgr::PgWinMsg)__PAIR__(1, (unsigned int)v2));
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (00706800) --------------------------------------------------------
EntryIconWin *__cdecl EntryIconWin::CreateWin(NiAVObject *pkObject, int group, int index, PgWin *pkParent, unsigned int uiCmdMsg, unsigned int uiRCmdMsg)
{
  PgWin *v6; // eax@1
  PgWin *v7; // eax@2
  PgWin *v8; // esi@2
  PgWin *v9; // edi@8
  EntryIconWin *v10; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v12; // [sp+20h] [bp-4h]@1

  v6 = (PgWin *)operator new(0x1A0u);
  result.m_pObject = v6;
  v12 = 0;
  if ( v6 )
  {
    EntryIconWin::EntryIconWin((EntryIconWin *)v6);
    v8 = v7;
  }
  else
  {
    v8 = 0;
  }
  if ( v8 )
    InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  v12 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v8);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, NiAVObject *, int, int, PgWin *, unsigned int, unsigned int))v8->vfptr[113].__vecDelDtor)(
                          v8,
                          pkObject,
                          group,
                          index,
                          pkParent,
                          uiCmdMsg,
                          uiRCmdMsg) )
  {
    ((void (__thiscall *)(PgWin *))v8->vfptr[89].__vecDelDtor)(v8);
    v12 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v10 = (EntryIconWin *)v8;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v8);
    if ( result.m_pObject )
    {
      v9 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v9 )
          v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      }
    }
    v12 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v10 = 0;
  }
  return v10;
}

//----- (00706940) --------------------------------------------------------
ExpeditionMemberAddWin *__cdecl ExpeditionMemberAddWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  ExpeditionMemberAddWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x15Cu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&ExpeditionMemberAddWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&ExpeditionMemberAddWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (ExpeditionMemberAddWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9C8468: using guessed type void (__thiscall *ExpeditionMemberAddWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C8484: using guessed type int (__thiscall *ExpeditionMemberAddWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00706A80) --------------------------------------------------------
ExpeditionWin *__cdecl ExpeditionWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  ExpeditionWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x20Cu);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    ExpeditionWin::ExpeditionWin((ExpeditionWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (ExpeditionWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00706BB0) --------------------------------------------------------
char __thiscall ExpeditionWin::Create(ExpeditionWin *this, PgFrameWork *pkFrameWork)
{
  ExpeditionWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiAVObject *v5; // eax@4
  NiTexturingProperty *v6; // eax@4
  NiTexturingProperty *v7; // edi@4
  NiTexturingProperty::Map *v8; // eax@6
  NiSourceTexture *v9; // eax@7
  NiNode *v10; // esi@10
  char result; // al@14
  PgSprData *v12; // eax@15
  NiNode *v13; // esi@18
  int v14; // edi@22
  int v15; // ebx@22
  NiSourceTexture *v16; // eax@22
  PgSprData *v17; // eax@23
  D3DXCOLOR v18; // ST9C_16@25
  char *v19; // eax@25
  PgWinText *v20; // eax@25
  NiD3DDefaultShader *v21; // eax@25
  PgWin *v22; // edi@25
  D3DXCOLOR v23; // ST9C_16@25
  char *v24; // eax@25
  NiD3DDefaultShader *v25; // eax@25
  PgWin *v26; // ebx@25
  D3DXCOLOR v27; // ST9C_16@25
  char *v28; // eax@25
  NiD3DDefaultShader *v29; // eax@25
  PgWin *v30; // ebx@25
  D3DXCOLOR v31; // ST9C_16@25
  char *v32; // eax@25
  PgWin *v33; // ebx@25
  char *v34; // eax@25
  PgWinBut *v35; // edi@25
  NiD3DDefaultShader *v36; // eax@25
  PgWin *v37; // ebx@25
  char *v38; // eax@25
  NiSourceTexture *v39; // edi@25
  D3DXCOLOR v40; // ST9C_16@27
  char *v41; // eax@27
  PgWinText *v42; // eax@27
  D3DXCOLOR v43; // ST9C_16@27
  char *v44; // eax@27
  PgWinText *v45; // eax@27
  NiD3DDefaultShader *v46; // eax@27
  NiD3DDefaultShader *v47; // eax@27
  D3DXCOLOR v48; // ST9C_16@27
  int v49; // edi@27
  char *v50; // eax@27
  NiD3DDefaultShader *v51; // eax@27
  D3DXCOLOR v52; // ST9C_16@27
  char *v53; // eax@27
  NiD3DDefaultShader *v54; // eax@27
  signed int v55; // ebx@27
  NiSourceTexture *v56; // eax@29
  PopupMenuWin *v57; // eax@29
  PopupMenuWin *v58; // edi@29
  PopupMenuWin *v59; // ebx@29
  int v60; // edi@36
  char *v61; // eax@36
  PopupMenuText *v62; // eax@36
  char *v63; // eax@36
  PopupMenuText *v64; // eax@36
  char *v65; // eax@36
  PopupMenuText *v66; // eax@36
  char *v67; // eax@36
  PopupMenuText *v68; // eax@36
  NiSourceTexture *v69; // eax@36
  PopupMenuWin *v70; // eax@36
  PopupMenuWin *v71; // ebx@36
  char *v72; // eax@43
  PopupMenuText *v73; // eax@43
  char *v74; // eax@43
  PopupMenuText *v75; // eax@43
  char *v76; // eax@43
  PopupMenuText *v77; // eax@43
  char *v78; // eax@43
  PopupMenuText *v79; // eax@43
  signed int v80; // edi@43
  char *v81; // STA4_4@44
  char *v82; // STA0_4@44
  char *v83; // eax@44
  PgWinBut *v84; // ebx@44
  D3DXCOLOR v85; // ST9C_16@44
  char *v86; // eax@44
  char *v87; // eax@44
  int v88; // eax@45
  EntryIconWin *v89; // eax@47
  IDirectMessengerVtbl *v90; // edi@47
  EntryIconWin *v91; // ebx@47
  IDirectMessengerVtbl *v92; // edi@54
  NiRTTI *v93; // eax@55
  PgWinSpr *v94; // eax@62
  PgWinSpr *v95; // edi@62
  PgWinSpr *v96; // ebx@62
  PgSprData *v97; // edi@69
  PgWinSpr *v98; // eax@69
  PgWinSpr *v99; // edi@69
  PgWinSpr *v100; // ebx@69
  PgSprData *v101; // edi@76
  PgWinSpr *v102; // eax@76
  PgWinSpr *v103; // edi@76
  PgWinSpr *v104; // ebx@76
  PgSprData *v105; // edi@83
  PgWinSpr *v106; // eax@83
  PgWinSpr *v107; // edi@83
  PgWinSpr *v108; // ebx@83
  PgWin *v109; // STA4_4@90
  PgFont *v110; // eax@90
  PgWinText *v111; // eax@90
  PgWinText *v112; // edi@90
  PgWinText *v113; // ebx@90
  PgWin *v114; // ST94_4@97
  PgFont *v115; // eax@97
  PgWinAbbreviateText *v116; // eax@97
  PgWinAbbreviateText *v117; // edi@97
  PgWinAbbreviateText *v118; // ebx@97
  NiTexturingProperty *v119; // esi@104
  NiNode *v120; // esi@106
  UIUtil ui; // [sp+C0h] [bp-50h]@22
  NiPointer<NiTexturingProperty> spTexProp; // [sp+D4h] [bp-3Ch]@4
  int iXPos; // [sp+D8h] [bp-38h]@25
  int iYPos; // [sp+DCh] [bp-34h]@25
  int i; // [sp+E0h] [bp-30h]@45
  int j; // [sp+E4h] [bp-2Ch]@46
  int uiLeftPos; // [sp+E8h] [bp-28h]@69
  int uiTopPos; // [sp+ECh] [bp-24h]@69
  unsigned int uiWidth; // [sp+F0h] [bp-20h]@69
  unsigned int uiHeight; // [sp+F4h] [bp-1Ch]@69
  int uiLeft; // [sp+F8h] [bp-18h]@15
  int uiTop; // [sp+FCh] [bp-14h]@15
  NiPointer<NiNode> spNode; // [sp+100h] [bp-10h]@1
  int v134; // [sp+10Ch] [bp-4h]@1
  PgFrameWork *pkFrameWorka; // [sp+118h] [bp+8h]@36
  PgFrameWork *pkFrameWorkb; // [sp+118h] [bp+8h]@43
  PgFrameWork *pkFrameWorkc; // [sp+118h] [bp+8h]@46

  v2 = this;
  spNode.m_pObject = 0;
  this->m_pkFrameWork = pkFrameWork;
  v3 = pTexturePalette;
  v134 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\RaidWin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Frame");
  v6 = (NiTexturingProperty *)NiAVObject::GetProperty(v5, 8);
  v7 = v6;
  spTexProp.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v8 = *v7->m_kMaps.m_pBase;
  LOBYTE(v134) = 1;
  if ( !v8 || (v9 = (NiSourceTexture *)v8->m_spTexture.m_pObject) == 0 )
  {
    LOBYTE(v134) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v10 = spNode.m_pObject;
    v134 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
    return 0;
  }
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v9);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v12, 0, pkFrameWork, "RaidWin", 0) )
  {
    v14 = uiLeft;
    v15 = uiTop;
    UIUtil::UIUtil(&ui);
    LOBYTE(v134) = 2;
    UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
    UIUtil::SetOffset(&ui, v14, v15);
    UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
    v16 = MenuTexMgr::GetTexture(0x13u);
    if ( v16 )
      v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v16);
    else
      v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
    PgWinSpr::CreateWin(uiLeft - v14, uiTop - v15, v17, (PgWin *)&v2->vfptr, 0, 0);
    UIUtil::CreateSpr(&ui, "Plane", 0);
    UIUtil::CreateSpr(&ui, "Plane01", 0);
    *(_QWORD *)&v18.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v18.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v19 = (char *)TextData2::Get(0xFDF7DB2E);
    v20 = UIUtil::CreateTextNoSpr(&ui, "WinTitle", v19, v18, 5u);
    v20->vfptr[122].__vecDelDtor((NiRefObject *)v20, 1u);
    UIUtil::CreateBtn(&ui, 1u, "ClsNor", "ClsClick", "ClsOver", 0, 0);
    v21 = (NiD3DDefaultShader *)UIUtil::CreateBtn(&ui, 5u, "OKNor03", "OKClick03", "OKOver03", "OKDisable03", 0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spInviteBtn, v21);
    v22 = (PgWin *)&v2->m_spInviteBtn.m_pObject->vfptr;
    *(_QWORD *)&v23.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v23.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v24 = (char *)TextData2::Get(0xFAF92532);
    UIUtil::CreateAttachedText(v22, v24, v23, 5u);
    v25 = (NiD3DDefaultShader *)UIUtil::CreateBtn(&ui, 3u, "OKNor01", "OKClick01", "OKOver01", "OKDisable01", 0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spCreateBtn, v25);
    v26 = (PgWin *)&v2->m_spCreateBtn.m_pObject->vfptr;
    *(_QWORD *)&v27.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v27.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v28 = (char *)TextData2::Get(0xF2E8292C);
    UIUtil::CreateAttachedText(v26, v28, v27, 5u);
    v29 = (NiD3DDefaultShader *)UIUtil::CreateBtn(&ui, 4u, "OKNor02", "OKClick02", "OKOver02", "OKDisable02", 0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spLeaveBtn, v29);
    v30 = (PgWin *)&v2->m_spLeaveBtn.m_pObject->vfptr;
    *(_QWORD *)&v31.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v31.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v32 = (char *)TextData2::Get(0x7E4D726u);
    UIUtil::CreateAttachedText(v30, v32, v31, 5u);
    v2->m_spCreateBtn.m_pObject->m_pkToolTipWin = g_pkToolTipWin;
    v33 = (PgWin *)&v2->m_spCreateBtn.m_pObject->vfptr;
    v34 = (char *)TextData2::Get(0xA885CBFC);
    PgWin::SetToolTipWinText(v33, v34);
    v35 = v2->m_spCreateBtn.m_pObject;
    iXPos = 0;
    iYPos = 0;
    ((void (__thiscall *)(PgWinBut *, int *, int *))v35->vfptr[45].__vecDelDtor)(v35, &iXPos, &iYPos);
    v36 = (NiD3DDefaultShader *)UIUtil::CreateSpr(&ui, "OKNor01", 0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spCreateSpr, v36);
    ((void (__stdcall *)(int, int))v2->m_spCreateSpr.m_pObject->vfptr[77].__vecDelDtor)(iXPos, iYPos);
    v2->m_spCreateSpr.m_pObject->m_pkToolTipWin = g_pkToolTipWin;
    v37 = (PgWin *)&v2->m_spCreateSpr.m_pObject->vfptr;
    v38 = (char *)TextData2::Get(0xA885CBFC);
    PgWin::SetToolTipWinText(v37, v38);
    ((void (__stdcall *)(_DWORD))v2->m_spCreateSpr.m_pObject->vfptr[69].__vecDelDtor)(0.0);
    v2->m_spCreateSpr.m_pObject->vfptr[64].__vecDelDtor((NiRefObject *)v2->m_spCreateSpr.m_pObject, 1u);
    v39 = MenuTexMgr::GetTexture(4u);
    if ( ((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("HelpLinkNor") )
      UIUtil::CreateBtn(&ui, 0x12u, "HelpLinkNor", "HelpLinkOver", "HelpLinkClick", 0, v39);
    *(_QWORD *)&v40.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v40.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v41 = (char *)TextData3::Get(0x949172F1);
    v42 = UIUtil::CreateTextNoSpr(&ui, "GainMethod", v41, v40, 5u);
    v42->vfptr[122].__vecDelDtor((NiRefObject *)v42, 4u);
    *(_QWORD *)&v43.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v43.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v44 = (char *)TextData3::Get(0xCF47F72D);
    v45 = UIUtil::CreateTextNoSpr(&ui, "ItemGrade", v44, v43, 5u);
    v45->vfptr[122].__vecDelDtor((NiRefObject *)v45, 4u);
    v46 = (NiD3DDefaultShader *)UIUtil::CreateBtn(
                                  &ui,
                                  0x13u,
                                  "GainMethodNor",
                                  "GainMethodClick",
                                  "GainMethodOver",
                                  0,
                                  0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)v2->m_spBtn, v46);
    v47 = (NiD3DDefaultShader *)UIUtil::CreateBtn(&ui, 0x14u, "ItemGradeNor", "ItemGradeClick", "ItemGradeOver", 0, 0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spBtn[1], v47);
    *(_QWORD *)&v48.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v48.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v49 = (int)v2->m_spText;
    v50 = (char *)TextData::Get(0xE54F4142);
    v51 = (NiD3DDefaultShader *)UIUtil::CreateTextNoSpr(&ui, "GainMethod_Text", v50, v48, 5u);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)v2->m_spText, v51);
    *(_QWORD *)&v52.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v52.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v53 = (char *)TextData3::Get(0xD77667Au);
    v54 = (NiD3DDefaultShader *)UIUtil::CreateTextNoSpr(&ui, "ItemGrade_Text", v53, v52, 5u);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spText[1], v54);
    v55 = 2;
    do
    {
      (*(void (__stdcall **)(signed int))(**(_DWORD **)v49 + 488))(4);
      v49 += 4;
      --v55;
    }
    while ( v55 );
    v2->m_eLootType = 0;
    v2->m_eItemType = 0;
    v56 = MenuTexMgr::GetTexture(1u);
    v57 = PopupMenuWin::CreateWin(v56, 4u, 4u, 0);
    v58 = v2->m_spLootTypePopupMenu.m_pObject;
    v59 = v57;
    if ( v58 != v57 )
    {
      if ( v58 && !InterlockedDecrement((volatile LONG *)&v58->m_uiRefCount) && v58 )
        v58->vfptr->__vecDelDtor((NiRefObject *)v58, 1u);
      v2->m_spLootTypePopupMenu.m_pObject = v59;
      if ( v59 )
        InterlockedIncrement((volatile LONG *)&v59->m_uiRefCount);
    }
    v60 = (int)&v2->vfptr;
    v2->m_spLootTypePopupMenu.m_pObject->vfptr->SetMsgHooker(&v2->m_spLootTypePopupMenu.m_pObject->vfptr, &v2->vfptr);
    PopupMenuWin::Clear(v2->m_spLootTypePopupMenu.m_pObject);
    v61 = (char *)TextData::Get(0xE54F4142);
    v62 = PopupMenuText::CreateWin(v61, 0, 0, 0, 0, 0, 0);
    v62->m_ePopupMenuID = 1028;
    PopupMenuWin::AddMenu(v2->m_spLootTypePopupMenu.m_pObject, (int)&v2->vfptr, (PopupMenu *)&v62->vfptr);
    v63 = (char *)TextData::Get(0x78A8A1CFu);
    v64 = PopupMenuText::CreateWin(v63, 0, 0, 0, 0, 0, 0);
    v64->m_ePopupMenuID = 1029;
    PopupMenuWin::AddMenu(v2->m_spLootTypePopupMenu.m_pObject, (int)&v2->vfptr, (PopupMenu *)&v64->vfptr);
    v65 = (char *)TextData2::Get(0x799878B4u);
    v66 = PopupMenuText::CreateWin(v65, 0, 0, 0, 0, 0, 0);
    v66->m_ePopupMenuID = 1030;
    PopupMenuWin::AddMenu(v2->m_spLootTypePopupMenu.m_pObject, (int)&v2->vfptr, (PopupMenu *)&v66->vfptr);
    v67 = (char *)TextData2::Get(0x2C518D68u);
    v68 = PopupMenuText::CreateWin(v67, 0, 0, 0, 0, 0, 0);
    v68->m_ePopupMenuID = 1032;
    PopupMenuWin::AddMenu(v2->m_spLootTypePopupMenu.m_pObject, (int)&v2->vfptr, (PopupMenu *)&v68->vfptr);
    PopupMenuWin::FinishMenu(v2->m_spLootTypePopupMenu.m_pObject, 0);
    ((void (__stdcall *)(_DWORD))v2->m_spLootTypePopupMenu.m_pObject->vfptr[64].__vecDelDtor)(0);
    v69 = MenuTexMgr::GetTexture(1u);
    v70 = PopupMenuWin::CreateWin(v69, 4u, 4u, 0);
    v71 = v2->m_spItemGradePopupMenu.m_pObject;
    pkFrameWorka = (PgFrameWork *)v70;
    if ( v71 != v70 )
    {
      if ( v71 && !InterlockedDecrement((volatile LONG *)&v71->m_uiRefCount) && v71 )
        v71->vfptr->__vecDelDtor((NiRefObject *)v71, 1u);
      v2->m_spItemGradePopupMenu.m_pObject = (PopupMenuWin *)pkFrameWorka;
      if ( pkFrameWorka )
        InterlockedIncrement((volatile LONG *)&pkFrameWorka->m_pkMsgHooker);
    }
    v2->m_spItemGradePopupMenu.m_pObject->vfptr->SetMsgHooker(&v2->m_spItemGradePopupMenu.m_pObject->vfptr, &v2->vfptr);
    PopupMenuWin::Clear(v2->m_spItemGradePopupMenu.m_pObject);
    v72 = (char *)TextData3::Get(0xD77667Au);
    v73 = PopupMenuText::CreateWin(v72, 0, 0, 0, 0, 0, 0);
    v73->m_ePopupMenuID = 1038;
    PopupMenuWin::AddMenu(v2->m_spItemGradePopupMenu.m_pObject, v60, (PopupMenu *)&v73->vfptr);
    v74 = (char *)TextData3::Get(0xD78667Au);
    v75 = PopupMenuText::CreateWin(v74, 0, 0, 0, 0, 0, 0);
    v75->m_ePopupMenuID = 1039;
    PopupMenuWin::AddMenu(v2->m_spItemGradePopupMenu.m_pObject, v60, (PopupMenu *)&v75->vfptr);
    v76 = (char *)TextData3::Get(0xD79667Au);
    v77 = PopupMenuText::CreateWin(v76, 0, 0, 0, 0, 0, 0);
    v77->m_ePopupMenuID = 1040;
    PopupMenuWin::AddMenu(v2->m_spItemGradePopupMenu.m_pObject, v60, (PopupMenu *)&v77->vfptr);
    v78 = (char *)TextData3::Get(0xD7A667Au);
    v79 = PopupMenuText::CreateWin(v78, 0, 0, 0, 0, 0, 0);
    v79->m_ePopupMenuID = 1041;
    PopupMenuWin::AddMenu(v2->m_spItemGradePopupMenu.m_pObject, v60, (PopupMenu *)&v79->vfptr);
    PopupMenuWin::FinishMenu(v2->m_spItemGradePopupMenu.m_pObject, 0);
    ((void (__stdcall *)(_DWORD))v2->m_spItemGradePopupMenu.m_pObject->vfptr[64].__vecDelDtor)(0);
    v80 = 1;
    pkFrameWorkb = (PgFrameWork *)4;
    do
    {
      v81 = fs("Party%.2dOver", v80);
      v82 = fs("Party%.2dClick", v80);
      v83 = fs("Party%.2dNor", v80);
      v84 = UIUtil::CreateBtn(&ui, v80 + 6, v83, v82, v81, 0, 0);
      *(_QWORD *)&v85.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
      *(_QWORD *)&v85.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
      v86 = (char *)TextData2::Get(0x5F5D33Eu);
      v87 = fs(v86, v80);
      UIUtil::CreateAttachedText((PgWin *)&v84->vfptr, v87, v85, 5u);
      ++v80;
      pkFrameWorkb = (PgFrameWork *)((char *)pkFrameWorkb - 1);
    }
    while ( pkFrameWorkb );
    i = 0;
    v88 = (int)v2->m_spEntry;
    do
    {
      j = 0;
      pkFrameWorkc = (PgFrameWork *)v88;
      do
      {
        v89 = EntryIconWin::CreateWin((NiAVObject *)&spNode.m_pObject->vfptr, i, j, (PgWin *)&v2->vfptr, 0x10u, 0x11u);
        v90 = pkFrameWorkc->vfptr;
        v91 = v89;
        if ( (EntryIconWin *)pkFrameWorkc->vfptr != v89 )
        {
          if ( v90 && !InterlockedDecrement((volatile LONG *)&v90->SendDirectMessage) && v90 )
            (*(void (__thiscall **)(IDirectMessengerVtbl *, signed int))v90->SetMsgHooker)(v90, 1);
          pkFrameWorkc->vfptr = (IDirectMessengerVtbl *)v91;
          if ( v91 )
            InterlockedIncrement((volatile LONG *)&v91->m_uiRefCount);
        }
        v92 = pkFrameWorkc->vfptr;
        if ( pkFrameWorkc->vfptr )
        {
          v93 = (NiRTTI *)(*((int (__thiscall **)(_DWORD))v92->SetMsgHooker + 1))(pkFrameWorkc->vfptr);
          if ( v93 )
          {
            while ( v93 != &PgWin::m_RTTI )
            {
              v93 = v93->m_pkBaseRTTI;
              if ( !v93 )
                goto LABEL_60;
            }
            ((void (__thiscall *)(ExpeditionWin *, IDirectMessengerVtbl *, _DWORD))v2->vfptr[29].__vecDelDtor)(
              v2,
              v92,
              0);
            NiAVObject::UpdateProperties((NiAVObject *)&v2->vfptr);
            NiAVObject::Update((NiAVObject *)&v2->vfptr, 0.0, 1);
          }
        }
LABEL_60:
        pkFrameWorkc = (PgFrameWork *)((char *)pkFrameWorkc + 4);
        ++j;
      }
      while ( j < 5 );
      v88 = (int)pkFrameWorkc;
      ++i;
    }
    while ( i < 4 );
    v94 = UIUtil::CreateSpr(&ui, "Party01Member01", 0);
    v95 = v2->m_spMovingSlorSpr.m_pObject;
    v96 = v94;
    if ( v95 != v94 )
    {
      if ( v95 && !InterlockedDecrement((volatile LONG *)&v95->m_uiRefCount) && v95 )
        v95->vfptr->__vecDelDtor((NiRefObject *)v95, 1u);
      v2->m_spMovingSlorSpr.m_pObject = v96;
      if ( v96 )
        InterlockedIncrement((volatile LONG *)&v96->m_uiRefCount);
    }
    ((void (__stdcall *)(_DWORD))v2->m_spMovingSlorSpr.m_pObject->vfptr[64].__vecDelDtor)(0);
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "Party01Member01",
      &uiLeft,
      &uiTop,
      &uiWidth,
      &uiHeight);
    v97 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Chief01", &uiLeft, &uiTop, 0);
    PgSprData::Add(v97, (NiAVObject *)&spNode.m_pObject->vfptr, "Chief02");
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "Party01Member01Chief",
      &uiLeftPos,
      &uiTopPos,
      &uiWidth,
      &uiHeight);
    v98 = PgWinSpr::CreateWin(uiLeft, uiTop, v97, (PgWin *)&v2->m_spMovingSlorSpr.m_pObject->vfptr, 0, 0);
    v99 = v2->m_spMemberMark.m_pObject;
    v100 = v98;
    if ( v99 != v98 )
    {
      if ( v99 && !InterlockedDecrement((volatile LONG *)&v99->m_uiRefCount) && v99 )
        v99->vfptr->__vecDelDtor((NiRefObject *)v99, 1u);
      v2->m_spMemberMark.m_pObject = v100;
      if ( v100 )
        InterlockedIncrement((volatile LONG *)&v100->m_uiRefCount);
    }
    ((void (__stdcall *)(_DWORD))v2->m_spMemberMark.m_pObject->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_spMemberMark.m_pObject->vfptr[123].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_spMemberMark.m_pObject->vfptr[64].__vecDelDtor)(0);
    v101 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Rooter", &uiLeft, &uiTop, 0);
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "Party01Member01Root",
      &uiLeft,
      &uiTop,
      &uiWidth,
      &uiHeight);
    v102 = PgWinSpr::CreateWin(
             uiLeft - uiLeftPos,
             uiTop - uiTopPos,
             v101,
             (PgWin *)&v2->m_spMovingSlorSpr.m_pObject->vfptr,
             0,
             0);
    v103 = v2->m_spLootingMark.m_pObject;
    v104 = v102;
    if ( v103 != v102 )
    {
      if ( v103 && !InterlockedDecrement((volatile LONG *)&v103->m_uiRefCount) && v103 )
        v103->vfptr->__vecDelDtor((NiRefObject *)v103, 1u);
      v2->m_spLootingMark.m_pObject = v104;
      if ( v104 )
        InterlockedIncrement((volatile LONG *)&v104->m_uiRefCount);
    }
    ((void (__stdcall *)(_DWORD))v2->m_spLootingMark.m_pObject->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_spLootingMark.m_pObject->vfptr[123].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_spLootingMark.m_pObject->vfptr[64].__vecDelDtor)(0);
    v105 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Party01Member01ClassFighter", &uiLeft, &uiTop, 0);
    PgSprData::Add(v105, (NiAVObject *)&spNode.m_pObject->vfptr, "Party01Member01ClassCleric");
    PgSprData::Add(v105, (NiAVObject *)&spNode.m_pObject->vfptr, "Party01Member01ClassArcher");
    PgSprData::Add(v105, (NiAVObject *)&spNode.m_pObject->vfptr, "Party01Member01ClassMage");
    PgSprData::Add(v105, (NiAVObject *)&spNode.m_pObject->vfptr, "Party01Member01ClassJoker");
    PgSprData::Add(v105, (NiAVObject *)&spNode.m_pObject->vfptr, "Party01Member01ClassSentinel");
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "Party01Member01Level",
      &uiLeft,
      &uiTop,
      &uiWidth,
      &uiHeight);
    v106 = PgWinSpr::CreateWin(
             uiLeft - uiLeftPos,
             uiTop - uiTopPos,
             v105,
             (PgWin *)&v2->m_spMovingSlorSpr.m_pObject->vfptr,
             0,
             0);
    v107 = v2->m_spClassBar.m_pObject;
    v108 = v106;
    if ( v107 != v106 )
    {
      if ( v107 && !InterlockedDecrement((volatile LONG *)&v107->m_uiRefCount) && v107 )
        v107->vfptr->__vecDelDtor((NiRefObject *)v107, 1u);
      v2->m_spClassBar.m_pObject = v108;
      if ( v108 )
        InterlockedIncrement((volatile LONG *)&v108->m_uiRefCount);
    }
    ((void (__stdcall *)(_DWORD))v2->m_spClassBar.m_pObject->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_spClassBar.m_pObject->vfptr[123].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v2->m_spClassBar.m_pObject->vfptr[64].__vecDelDtor)(0);
    v109 = (PgWin *)&v2->m_spMovingSlorSpr.m_pObject->vfptr;
    v110 = Font::Get(SMALL);
    v111 = PgWinText::CreateWin(uiLeft - uiLeftPos, uiTop - uiTopPos, uiWidth, uiHeight, v110, v109, 0, 0);
    v112 = v2->m_spLevelText.m_pObject;
    v113 = v111;
    if ( v112 != v111 )
    {
      if ( v112 && !InterlockedDecrement((volatile LONG *)&v112->m_uiRefCount) && v112 )
        v112->vfptr->__vecDelDtor((NiRefObject *)v112, 1u);
      v2->m_spLevelText.m_pObject = v113;
      if ( v113 )
        InterlockedIncrement((volatile LONG *)&v113->m_uiRefCount);
    }
    ((void (__stdcall *)(signed int))v2->m_spLevelText.m_pObject->vfptr[122].__vecDelDtor)(6);
    ((void (__stdcall *)(D3DXCOLOR *))v2->m_spLevelText.m_pObject->vfptr[117].__vecDelDtor)(&Color::m_kDxWhiteColor);
    ((void (__stdcall *)(_DWORD))v2->m_spLevelText.m_pObject->vfptr[60].__vecDelDtor)(0);
    PgUtil::GetTriShapeRect(
      (NiAVObject *)&spNode.m_pObject->vfptr,
      "Party01Member01Name",
      &uiLeft,
      &uiTop,
      &uiWidth,
      &uiHeight);
    v114 = (PgWin *)&v2->m_spMovingSlorSpr.m_pObject->vfptr;
    v115 = Font::Get(SMALL);
    v116 = PgWinAbbreviateText::CreateWin(
             uiLeft - uiLeftPos,
             uiTop - uiTopPos,
             uiWidth,
             uiHeight,
             v115,
             v114,
             0,
             0,
             0,
             1,
             0,
             0xAu);
    v117 = v2->m_spNameText.m_pObject;
    v118 = v116;
    if ( v117 != v116 )
    {
      if ( v117 && !InterlockedDecrement((volatile LONG *)&v117->m_uiRefCount) && v117 )
        v117->vfptr->__vecDelDtor((NiRefObject *)v117, 1u);
      v2->m_spNameText.m_pObject = v118;
      if ( v118 )
        InterlockedIncrement((volatile LONG *)&v118->m_uiRefCount);
    }
    ((void (__stdcall *)(signed int))v2->m_spNameText.m_pObject->vfptr[122].__vecDelDtor)(4);
    ((void (__stdcall *)(_DWORD))v2->m_spNameText.m_pObject->vfptr[60].__vecDelDtor)(0);
    ((void (__thiscall *)(ExpeditionWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.1,
      0.40000001);
    LOBYTE(v134) = 1;
    UIUtil::~UIUtil(&ui);
    v119 = spTexProp.m_pObject;
    LOBYTE(v134) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
      v119->vfptr->__vecDelDtor((NiRefObject *)v119, 1u);
    v120 = spNode.m_pObject;
    v134 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v120 )
      v120->vfptr->__vecDelDtor((NiRefObject *)v120, 1u);
    result = 1;
  }
  else
  {
    LOBYTE(v134) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v13 = spNode.m_pObject;
    v134 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v13 )
      return 0;
    ((void (__thiscall *)(NiNode *))v13->vfptr->__vecDelDtor)(v13);
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00707C70) --------------------------------------------------------
ExpeditionPartyWin *__cdecl ExpeditionPartyWin::CreateWin(PgFrameWork *pkFrameWork, unsigned int index)
{
  PgWin *v2; // eax@1
  PgWin *v3; // eax@2
  PgWin *v4; // esi@2
  PgWin *v5; // edi@8
  ExpeditionPartyWin *v6; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v2 = (PgWin *)operator new(0x384u);
  result.m_pObject = v2;
  v8 = 0;
  if ( v2 )
  {
    ExpeditionPartyWin::ExpeditionPartyWin((ExpeditionPartyWin *)v2);
    v4 = v3;
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v8 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v4);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, PgFrameWork *, unsigned int))v4->vfptr[135].__vecDelDtor)(
                          v4,
                          pkFrameWork,
                          index) )
  {
    ((void (__thiscall *)(PgWin *))v4->vfptr[89].__vecDelDtor)(v4);
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = (ExpeditionPartyWin *)v4;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v4);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = 0;
  }
  return v6;
}

//----- (00707DA0) --------------------------------------------------------
ExpeditionLootSelectWin *__cdecl ExpeditionLootSelectWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  ExpeditionLootSelectWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x160u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&ExpeditionLootSelectWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&ExpeditionLootSelectWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (ExpeditionLootSelectWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9C86A8: using guessed type void (__thiscall *ExpeditionLootSelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C86C4: using guessed type int (__thiscall *ExpeditionLootSelectWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00707EE0) --------------------------------------------------------
ExpeditionLootOptionWin *__cdecl ExpeditionLootOptionWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  ExpeditionLootOptionWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1A4u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    ExpeditionLootOptionWin::ExpeditionLootOptionWin((ExpeditionLootOptionWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (ExpeditionLootOptionWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00708010) --------------------------------------------------------
void __thiscall ExpeditionLootSelectWin::OnCommand(ExpeditionLootSelectWin *this, unsigned int wParam, int lParam)
{
  ExpeditionLootSelectWin *v3; // esi@1
  signed int v4; // eax@4
  char *v5; // edi@5
  char *v6; // eax@5
  _BYTE v7[20]; // ST00_20@7
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strText; // [sp+10h] [bp-40h]@5
  Name5 kCharID; // [sp+2Ch] [bp-24h]@7
  int v10; // [sp+4Ch] [bp-4h]@5

  v3 = this;
  if ( wParam )
  {
    if ( wParam == 3 )
    {
      ExpeditionLootSelectWin::OnSlideBar(this);
    }
    else if ( wParam == 4 )
    {
      v4 = SlideListWin::GetCurSelIndex(this->m_pSeletMemberList);
      if ( v4 >= 0 )
      {
        v5 = SlideListWin::GetText(v3->m_pSeletMemberList, v4, 0);
        strText._Myres = 15;
        strText._Mysize = 0;
        strText._Bx._Buf[0] = 0;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&strText, v5, strlen(v5));
        v6 = strText._Bx._Ptr;
        v10 = 0;
        if ( strText._Myres < 0x10 )
          v6 = (char *)&strText;
        *(_QWORD *)&kCharID.n5_code[3] = 0i64;
        *(_QWORD *)&kCharID.n5_code[1] = 0i64;
        *(_QWORD *)&kCharID.n5_name[0] = 0i64;
        strncpy(kCharID.n5_name, v6, 0x14u);
        *(_QWORD *)v7 = *(_QWORD *)&kCharID.n5_name[0];
        *(_QWORD *)&v7[8] = *(_QWORD *)&kCharID.n5_code[2];
        *(_DWORD *)&v7[16] = kCharID.n5_code[4];
        GameFrameWork::NcRaidSetLooterReq((GameFrameWork *)v3->m_pkFrameWork, *(Name5 *)v7);
        PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&v3->vfptr);
        PgWin::OnClose((PgWin *)&v3->vfptr);
        if ( strText._Myres >= 0x10 )
          operator delete(strText._Bx._Ptr);
      }
    }
  }
  else
  {
    PgWinMgr::CloseWin(&Pgg_kWinMgr, (PgWin *)&this->vfptr);
    PgWin::OnClose((PgWin *)&v3->vfptr);
  }
}

//----- (00708160) --------------------------------------------------------
void __thiscall ExpeditionWin::UpdateMeWin(ExpeditionWin *this, float fCurTime)
{
  ExpeditionWin *v2; // esi@1
  NiRefObjectVtbl **v3; // ebx@7
  NiRefObjectVtbl *v4; // edi@7
  char v5; // al@7
  bool v6; // al@11
  void *(__thiscall *v7)(NiRefObject *, unsigned int); // edx@11
  unsigned int v8; // eax@15
  int v9; // edi@16
  PgCursor *v10; // eax@18
  PgCursor *v11; // eax@20
  int v12; // ebx@20
  int v13; // edi@20
  NiRefObjectVtbl *v14; // edx@20
  int v15; // eax@20
  int v16; // eax@20
  int v17; // edi@21
  signed int v18; // ebx@22
  signed int v19; // esi@23
  std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *v20; // esi@27
  RaidMemberInfo *v21; // ebx@29
  int v22; // esi@30
  char *v23; // edi@30
  void (__stdcall *v24)(D3DXCOLOR *, D3DXCOLOR *); // edx@31
  int v25; // ecx@34
  int v26; // eax@34
  int *v27; // ebx@36
  int v28; // edi@36
  char *v29; // eax@36
  int v30; // eax@37
  char v31; // al@38
  int v32; // ecx@46
  bool v33; // zf@53
  D3DXCOLOR *v34; // [sp+0h] [bp-58h]@0
  std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > kInfo; // [sp+10h] [bp-48h]@29
  int *v36; // [sp+20h] [bp-38h]@30
  std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *v37; // [sp+24h] [bp-34h]@20
  char *v38; // [sp+28h] [bp-30h]@21
  char *v39; // [sp+2Ch] [bp-2Ch]@20
  char acstr[21]; // [sp+30h] [bp-28h]@37
  int v41; // [sp+54h] [bp-4h]@29

  v2 = this;
  if ( !(unsigned __int8)((int (*)(void))this->vfptr[65].__vecDelDtor)() )
    goto LABEL_14;
  if ( !v2->m_bIsSelect )
  {
    if ( RaidInfo::IsMeRaidMember(&g_kRaidinfo) || !(unsigned __int8)Party::IsMePartyMaster(&g_kParty) )
      ((void (__stdcall *)(_DWORD))v2->m_spCreateBtn.m_pObject->vfptr[60].__vecDelDtor)(0);
    else
      ((void (__stdcall *)(signed int))v2->m_spCreateBtn.m_pObject->vfptr[60].__vecDelDtor)(1);
    v3 = &v2->m_spCreateSpr.m_pObject->vfptr;
    v4 = *v3;
    v5 = ((int (*)(void))v2->m_spCreateBtn.m_pObject->vfptr[61].__vecDelDtor)();
    v4[60].__vecDelDtor((NiRefObject *)v3, v5 == 0);
    if ( g_kRaidinfo.m_bIsMeRaidLeader || g_kRaidinfo.m_bIsMeRaidSubLeader )
      ((void (__stdcall *)(signed int))v2->m_spInviteBtn.m_pObject->vfptr[60].__vecDelDtor)(1);
    else
      ((void (__stdcall *)(_DWORD))v2->m_spInviteBtn.m_pObject->vfptr[60].__vecDelDtor)(0);
    v6 = RaidInfo::IsMeRaidMember(&g_kRaidinfo);
    v7 = v2->m_spLeaveBtn.m_pObject->vfptr[60].__vecDelDtor;
    if ( v6 )
      ((void (__stdcall *)(signed int))v7)(1);
    else
      ((void (__stdcall *)(_DWORD))v7)(0);
LABEL_14:
    if ( !v2->m_bIsSelect )
      goto LABEL_19;
  }
  v8 = v2->m_uiSelectPartyID;
  if ( v8 < 4 )
  {
    v9 = *(&v2->m_pkFrameWork[33].m_kMsgQ.m_uiTail + v8);
    if ( v9 )
    {
      if ( (unsigned __int8)(*(int (__thiscall **)(int))(*(_DWORD *)v9 + 260))(v9) )
      {
        v10 = Cursor::GetPgCursor();
        (*(void (__thiscall **)(int, int, int))(*(_DWORD *)v9 + 308))(v9, v10->m_iScreenSpaceX, v10->m_iScreenSpaceY);
      }
    }
  }
LABEL_19:
  if ( v2->m_bIsSelecteSlot )
  {
    v11 = Cursor::GetPgCursor();
    v12 = v11->m_iScreenSpaceX;
    v13 = v11->m_iScreenSpaceY;
    v14 = v2->vfptr;
    v37 = (std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *)v2->m_spMovingSlorSpr.m_pObject;
    v39 = (char *)&v37->_Myfirst[4].m_iMaxHP;
    v15 = ((int (__thiscall *)(ExpeditionWin *))v14[42].__vecDelDtor)(v2);
    v16 = (int)v2->vfptr[41].__vecDelDtor((NiRefObject *)v2, v13 - v15 + 5);
    (*(void (__thiscall **)(std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *, int))v39)(v37, v12 - v16);
  }
  v39 = (char *)v2->m_spEntry;
  v17 = (int)v2->m_spEntry;
  v38 = (char *)4;
  do
  {
    v18 = 5;
    do
    {
      (*(void (__stdcall **)(void *))(**(_DWORD **)(*(_DWORD *)v17 + 308) + 472))(&unk_9C7A93);
      (*(void (__stdcall **)(void *))(**(_DWORD **)(*(_DWORD *)v17 + 312) + 472))(&unk_9C7AFF);
      v19 = 316;
      do
      {
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v19 + *(_DWORD *)v17) + 256))(0);
        v19 += 4;
      }
      while ( v19 < 340 );
      v17 += 4;
      --v18;
    }
    while ( v18 );
    --v38;
  }
  while ( v38 );
  v20 = g_kRaidinfo.m_MemberInfo;
  v37 = g_kRaidinfo.m_MemberInfo;
  v38 = v39;
  do
  {
    if ( v20->_Myfirst != v20->_Mylast )
    {
      std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>(
        &kInfo,
        v20);
      v21 = kInfo._Myfirst;
      v41 = 0;
      if ( kInfo._Mylast - kInfo._Myfirst )
      {
        v22 = (int)v38;
        v23 = (char *)&kInfo._Myfirst->m_iLv;
        v36 = &kInfo._Myfirst->m_iLv;
        v39 = (char *)(kInfo._Mylast - kInfo._Myfirst);
        do
        {
          v24 = *(void (__stdcall **)(D3DXCOLOR *, D3DXCOLOR *))(**(_DWORD **)(*(_DWORD *)v22 + 312) + 468);
          if ( *(v23 - 4) )
          {
            v24(&Color::m_kDxWhiteColor, v34);
            v34 = &Color::m_kDxWhiteColor;
          }
          else
          {
            v24((D3DXCOLOR *)&Color::m_kDxGrayColor, v34);
            v34 = (D3DXCOLOR *)&Color::m_kDxGrayColor;
          }
          (*(void (**)(void))(**(_DWORD **)(*(_DWORD *)v22 + 308) + 468))();
          v25 = *(_DWORD *)v23;
          v26 = *(_DWORD *)v22;
          if ( *(_DWORD *)v23 )
          {
            v27 = *(int **)(v26 + 312);
            v28 = *v27;
            v29 = fs("%d", v25);
            (*(void (__thiscall **)(int *, char *))(v28 + 472))(v27, v29);
            v23 = (char *)v36;
            v21 = kInfo._Myfirst;
          }
          else
          {
            (*(void (__stdcall **)(const char *))(**(_DWORD **)(v26 + 312) + 472))("?");
          }
          *(_DWORD *)acstr = *((_DWORD *)v23 - 6);
          *(_DWORD *)&acstr[4] = *((_DWORD *)v23 - 5);
          *(_DWORD *)&acstr[8] = *((_DWORD *)v23 - 4);
          v30 = *(_DWORD *)v22;
          *(_DWORD *)&acstr[12] = *((_DWORD *)v23 - 3);
          *(_DWORD *)&acstr[16] = *((_DWORD *)v23 - 2);
          acstr[20] = 0;
          (*(void (__stdcall **)(char *))(**(_DWORD **)(v30 + 308) + 472))(acstr);
          switch ( v23[28] )
          {
            case 1:
            case 2:
            case 3:
            case 4:
            case 5:
              v31 = 1;
              break;
            case 6:
            case 7:
            case 8:
            case 9:
            case 0xA:
              v31 = 6;
              break;
            case 0xB:
            case 0xC:
            case 0xD:
            case 0xE:
            case 0xF:
              v31 = 11;
              break;
            case 0x10:
            case 0x11:
            case 0x12:
            case 0x13:
            case 0x14:
              v31 = 16;
              break;
            case 0x15:
            case 0x16:
            case 0x17:
            case 0x18:
            case 0x19:
              v31 = 21;
              break;
            case 0x1A:
            case 0x1B:
              v31 = 26;
              break;
            default:
              v31 = 0;
              break;
          }
          switch ( v31 )
          {
            case 1:
              v32 = *(_DWORD *)(*(_DWORD *)v22 + 316);
              goto LABEL_52;
            case 6:
              v32 = *(_DWORD *)(*(_DWORD *)v22 + 320);
              goto LABEL_52;
            case 0xB:
              v32 = *(_DWORD *)(*(_DWORD *)v22 + 324);
              goto LABEL_52;
            case 0x10:
              v32 = *(_DWORD *)(*(_DWORD *)v22 + 328);
              goto LABEL_52;
            case 0x15:
              v32 = *(_DWORD *)(*(_DWORD *)v22 + 332);
              goto LABEL_52;
            case 0x1A:
              v32 = *(_DWORD *)(*(_DWORD *)v22 + 336);
LABEL_52:
              (*(void (__stdcall **)(signed int))(*(_DWORD *)v32 + 256))(1);
              break;
            default:
              break;
          }
          v23 += 68;
          v22 += 4;
          v33 = v39-- == (char *)1;
          v36 = (int *)v23;
        }
        while ( !v33 );
        v20 = v37;
      }
      v41 = -1;
      if ( v21 )
        operator delete(v21);
      kInfo._Myfirst = 0;
      kInfo._Mylast = 0;
      kInfo._Myend = 0;
    }
    v38 += 20;
    ++v20;
    v37 = v20;
  }
  while ( (signed int)v20 < (signed int)&unk_B5C4CC );
}

//----- (00708620) --------------------------------------------------------
void __thiscall ExpeditionPartyWin::UpdateMeWin(ExpeditionPartyWin *this, float fCurTime)
{
  ExpeditionPartyWin *v2; // ebx@1
  int v3; // esi@6
  signed int v4; // edi@7
  int v5; // eax@8
  Char *v6; // edi@9
  int v7; // edi@11
  RaidMemberInfo *v8; // esi@12
  unsigned int v9; // eax@13
  PgWinAbbreviateText *v10; // ecx@16
  void *(__thiscall *v11)(NiRefObject *, unsigned int); // edx@16
  double v12; // st7@18
  char v13; // al@22
  Name5 *v14; // eax@36
  unsigned int v15; // ecx@36
  Char *v16; // eax@39
  _BYTE v17[20]; // ST00_20@40
  NiTListItem<AbStateInst *> *v18; // eax@42
  int v19; // eax@43
  int v20; // esi@43
  int v21; // edx@43
  int v22; // eax@44
  int v23; // edx@47
  int v24; // eax@51
  bool v25; // zf@52
  PgWinSpr *v26; // esi@62
  int v27; // eax@62
  int v28; // ecx@62
  unsigned int v29; // eax@62
  NiPointer<AbstateIcon> *v30; // esi@62
  signed int v31; // edx@63
  int v32; // eax@66
  NiRefObjectVtbl *v33; // edx@66
  NiRefObjectVtbl *v34; // edx@66
  NiRefObjectVtbl *v35; // ebx@66
  int v36; // eax@66
  NiRefObjectVtbl *v37; // edx@66
  NiRefObjectVtbl *v38; // ebx@66
  int v39; // eax@66
  Char *v40; // esi@67
  std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > kInfo; // [sp+10h] [bp-78h]@11
  Name5 kCharID; // [sp+20h] [bp-68h]@36
  AbstateIcon *v43; // [sp+34h] [bp-54h]@66
  int v44; // [sp+38h] [bp-50h]@11
  int iBufXpos; // [sp+3Ch] [bp-4Ch]@62
  __int64 v46; // [sp+40h] [bp-48h]@18
  ExpeditionPartyWin *v47; // [sp+48h] [bp-40h]@1
  int BufNum; // [sp+4Ch] [bp-3Ch]@36
  Char *pkChar; // [sp+50h] [bp-38h]@3
  int y; // [sp+54h] [bp-34h]@3
  unsigned int j; // [sp+58h] [bp-30h]@6
  unsigned int uiBuffNums; // [sp+5Ch] [bp-2Ch]@18
  char acstr[21]; // [sp+60h] [bp-28h]@16
  int v54; // [sp+84h] [bp-4h]@11

  v2 = this;
  v25 = this->m_bOpenPopUp == 0;
  v47 = this;
  if ( !v25 && this->m_uiFocusSlotNum != 5 )
  {
    ((void (__stdcall *)(Char **, int *))this->vfptr[45].__vecDelDtor)(&pkChar, &y);
    if ( !(unsigned __int8)((int (*)(void))v2->m_spPopupMenu[v2->m_uiFocusSlotNum].m_pObject->vfptr[65].__vecDelDtor)() )
    {
      ((void (__stdcall *)(NiTListItem<AttackSequence *> **, int))v2->m_spPopupMenu[v2->m_uiFocusSlotNum].m_pObject->vfptr[77].__vecDelDtor)(
        &pkChar->m_kAttSeqList.m_pkTail,
        y);
      PgWinMgr::OpenPopupWin(
        &Pgg_kWinMgr,
        (PgWin *)&v2->vfptr,
        (PgWin *)&v2->m_spPopupMenu[v2->m_uiFocusSlotNum].m_pObject->vfptr);
    }
    v2->m_bOpenPopUp = 0;
  }
  pkChar = (Char *)v2->m_spParticipantName;
  v3 = (int)v2->m_apkAbstateBuf;
  j = 5;
  do
  {
    v4 = 10;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 256))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 240))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 248))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v3 + 200) + 256))(0);
      v5 = *(_DWORD *)(v3 + 200);
      v3 += 4;
      --v4;
      *(_BYTE *)(v5 + 382) = 0;
    }
    while ( v4 );
    v6 = pkChar;
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)((char *)&pkChar[-1].m_kTo.x + 3) + 256))(0);
    (*((void (__stdcall **)(_DWORD))v6->vfptr->Affect + 118))(&unk_9C7B3E);
    v25 = j-- == 1;
    pkChar = (Char *)((char *)v6 + 4);
  }
  while ( !v25 );
  if ( v2->m_bExtend )
  {
    std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>(
      &kInfo,
      &g_kRaidinfo.m_MemberInfo[v2->m_uiGroupNum]);
    v7 = 0;
    v54 = 0;
    v44 = kInfo._Mylast - kInfo._Myfirst;
    if ( v44 )
    {
      while ( 1 )
      {
        v8 = &kInfo._Myfirst[v7];
        if ( !kInfo._Myfirst[v7].m_iHP )
          break;
        v12 = (double)v8->m_iHP / (double)v8->m_iMaxHP * (double)v2->m_uiHpBarWidth;
        y = HIWORD(uiBuffNums) | 0xC00;
        v46 = (signed __int64)v12;
        v9 = (signed __int64)v12;
        if ( v9 >= 1 )
          goto LABEL_14;
        v9 = 1;
LABEL_16:
        ((void (__stdcall *)(unsigned int))v2->m_spParticipant[v7].m_pObject->vfptr[117].__vecDelDtor)(v9);
        *(_DWORD *)acstr = v8->m_kCharID.n5_code[0];
        *(_DWORD *)&acstr[4] = v8->m_kCharID.n5_code[1];
        *(_DWORD *)&acstr[8] = v8->m_kCharID.n5_code[2];
        *(_DWORD *)&acstr[12] = v8->m_kCharID.n5_code[3];
        v10 = v2->m_spParticipantName[v7].m_pObject;
        *(_DWORD *)&acstr[16] = v8->m_kCharID.n5_code[4];
        acstr[20] = 0;
        v11 = v10->vfptr[117].__vecDelDtor;
        if ( v8->m_ucStatus )
          ((void (__stdcall *)(D3DXCOLOR *))v11)(&Color::m_kDxWhiteColor);
        else
          ((void (__stdcall *)(void *))v11)(&Color::m_kDxGrayColor);
        ((void (__stdcall *)(char *))v2->m_spParticipantName[v7].m_pObject->vfptr[118].__vecDelDtor)(acstr);
        switch ( v8->m_byChrClass )
        {
          case 1:
          case 2:
          case 3:
          case 4:
          case 5:
            v13 = 1;
            break;
          case 6:
          case 7:
          case 8:
          case 9:
          case 0xA:
            v13 = 6;
            break;
          case 0xB:
          case 0xC:
          case 0xD:
          case 0xE:
          case 0xF:
            v13 = 11;
            break;
          case 0x10:
          case 0x11:
          case 0x12:
          case 0x13:
          case 0x14:
            v13 = 16;
            break;
          case 0x15:
          case 0x16:
          case 0x17:
          case 0x18:
          case 0x19:
            v13 = 21;
            break;
          case 0x1A:
          case 0x1B:
            v13 = 26;
            break;
          default:
            v13 = 0;
            break;
        }
        switch ( v13 )
        {
          case 1:
            ((void (__stdcall *)(_DWORD))v2->m_spParticipant[v7].m_pObject->vfptr[123].__vecDelDtor)(0);
            break;
          case 6:
            ((void (__stdcall *)(signed int))v2->m_spParticipant[v7].m_pObject->vfptr[123].__vecDelDtor)(1);
            break;
          case 0xB:
            ((void (__stdcall *)(signed int))v2->m_spParticipant[v7].m_pObject->vfptr[123].__vecDelDtor)(2);
            break;
          case 0x10:
            ((void (__stdcall *)(signed int))v2->m_spParticipant[v7].m_pObject->vfptr[123].__vecDelDtor)(3);
            break;
          case 0x15:
            ((void (__stdcall *)(signed int))v2->m_spParticipant[v7].m_pObject->vfptr[123].__vecDelDtor)(4);
            break;
          case 0x1A:
            ((void (__stdcall *)(signed int))v2->m_spParticipant[v7].m_pObject->vfptr[123].__vecDelDtor)(5);
            break;
          default:
            break;
        }
        ((void (__stdcall *)(signed int))v2->m_spParticipant[v7].m_pObject->vfptr[64].__vecDelDtor)(1);
        BufNum = 0;
        v14 = User::GetMainCharID(&g_kUser);
        v15 = v14->n5_code[0];
        *(_QWORD *)&kCharID.n5_code[1] = *(_QWORD *)&v14->n5_code[1];
        *(_QWORD *)&kCharID.n5_code[3] = *(_QWORD *)&v14->n5_code[3];
        if ( *(_QWORD *)&v8->m_kCharID.n5_name[0] != __PAIR__(kCharID.n5_code[1], v15)
          || *(_QWORD *)&v8->m_kCharID.n5_code[2] != *(_QWORD *)&kCharID.n5_code[2]
          || v8->m_kCharID.n5_code[4] != kCharID.n5_code[4] )
        {
          *(_DWORD *)v17 = v8->m_kCharID.n5_code[0];
          *(_QWORD *)&v17[4] = *(_QWORD *)&v8->m_kCharID.n5_code[1];
          *(_QWORD *)&v17[12] = *(_QWORD *)&v8->m_kCharID.n5_code[3];
          v16 = CharMgr::GetChar(&g_kCharMgr, *(Name5 *)v17);
        }
        else
        {
          v16 = g_pkMainChar;
          v2->m_apkAbstateBufIcon[v7][0].m_pObject->m_bEraseEnable = 1;
          v2->m_apkAbstateBufIcon[v7][1].m_pObject->m_bEraseEnable = 1;
          v2->m_apkAbstateBufIcon[v7][2].m_pObject->m_bEraseEnable = 1;
          v2->m_apkAbstateBufIcon[v7][3].m_pObject->m_bEraseEnable = 1;
          BYTE2((&v2->vfptr)[2 * (5 * v7 + 80)][95].__vecDelDtor) = 1;
        }
        pkChar = v16;
        if ( v16 )
        {
          v18 = AbStateInfectee::GetAbStateList((AbStateInfectee *)&v16->vfptr)->m_pkHead;
          uiBuffNums = 0;
          j = (unsigned int)v18;
          if ( v18 )
          {
            do
            {
              v19 = *(_WORD *)(*(_DWORD *)(j + 8) + 20);
              v20 = ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;
              j = *(_DWORD *)j;
              v21 = *(_DWORD *)ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;
              y = v19;
              if ( (unsigned __int8)(*(int (__thiscall **)(int, int))(v21 + 16))(
                                      ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable,
                                      v19) )
              {
                if ( (unsigned __int16)y <= *(_WORD *)(v20 + 200) )
                {
                  v23 = *(_DWORD *)(v20 + 196);
                  if ( *(_DWORD *)(v23 + 4 * (unsigned __int16)y) )
                    v22 = *(_DWORD *)(v23 + 4 * (unsigned __int16)y);
                  else
                    v22 = 0;
                }
                else
                {
                  v22 = 0;
                }
              }
              else
              {
                v22 = 0;
              }
              if ( *(_BYTE *)(v22 + 526) )
              {
                v24 = *(_DWORD *)(v22 + 522);
                if ( v24 == 1 )
                {
                  v25 = (v2->m_uiBuffViewOption[v7] & 1) == 0;
                  goto LABEL_59;
                }
                if ( v24 == 2 )
                {
                  v25 = (v2->m_uiBuffViewOption[v7] & 2) == 0;
                  goto LABEL_59;
                }
                if ( v24 == 3 )
                {
                  v25 = (v2->m_uiBuffViewOption[v7] & 4) == 0;
                  goto LABEL_59;
                }
                if ( !v24 )
                {
                  v25 = (v2->m_uiBuffViewOption[v7] & 8) == 0;
LABEL_59:
                  if ( !v25 )
                    ++uiBuffNums;
                  continue;
                }
              }
            }
            while ( j );
          }
          v26 = v2->m_spPanel.m_pObject;
          y = ((int (__thiscall *)(PgWinSpr *))v26->vfptr[36].__vecDelDtor)(v2->m_spPanel.m_pObject);
          v27 = ((int (__thiscall *)(PgWinSpr *))v26->vfptr[41].__vecDelDtor)(v26);
          v28 = v27 + y;
          v29 = 0;
          iBufXpos = v28;
          j = 0;
          y = 0;
          v30 = v2->m_apkAbstateBufIcon[v7];
          do
          {
            v31 = 0;
            if ( j >= uiBuffNums && uiBuffNums )
              v31 = 16;
            v32 = v31 + v29;
            v33 = v30[-50].m_pObject->vfptr;
            HIDWORD(v46) = iBufXpos + v32;
            ((void (__stdcall *)(int))v33[43].__vecDelDtor)(iBufXpos + v32);
            v34 = v2->m_spParticipant[v7].m_pObject->vfptr;
            v35 = v30[-50].m_pObject->vfptr;
            v43 = v30[-50].m_pObject;
            v36 = ((int (*)(void))v34[42].__vecDelDtor)();
            v35[44].__vecDelDtor((NiRefObject *)v43, v36);
            ((void (__stdcall *)(int))v30->m_pObject->vfptr[43].__vecDelDtor)(HIDWORD(v46) + 2);
            v37 = v47->m_spParticipant[v7].m_pObject->vfptr;
            v38 = v30->m_pObject->vfptr;
            HIDWORD(v46) = (NiPointer<AbstateIcon>)v30->m_pObject;
            v39 = ((int (*)(void))v37[42].__vecDelDtor)();
            v38[44].__vecDelDtor((NiRefObject *)HIDWORD(v46), v39 + 2);
            ++j;
            v2 = v47;
            v29 = y + 20;
            ++v30;
            y = v29;
          }
          while ( v29 < 0xC8 );
          v40 = pkChar;
          if ( v47->m_uiBuffViewOption[v7] & 1 )
            ExpeditionPartyWin::SetBuffUI(v47, pkChar, Skill, &BufNum, v7);
          if ( v2->m_uiBuffViewOption[v7] & 2 )
            ExpeditionPartyWin::SetBuffUI(v2, v40, Scroll, &BufNum, v7);
          if ( v2->m_uiBuffViewOption[v7] & 4 )
            ExpeditionPartyWin::SetBuffUI(v2, v40, Potion, &BufNum, v7);
          if ( v2->m_uiBuffViewOption[v7] & 8 )
            ExpeditionPartyWin::SetBuffUI(v2, v40, 0, &BufNum, v7);
          if ( v2->m_uiBuffViewOption[v7] & 0x10 )
            ExpeditionPartyWin::SetBuffUI(v2, v40, Debuff, &BufNum, v7);
        }
        if ( ++v7 >= (unsigned int)v44 )
          goto LABEL_78;
      }
      v9 = 1;
LABEL_14:
      if ( v9 > v2->m_uiHpBarWidth )
        v9 = v2->m_uiHpBarWidth;
      goto LABEL_16;
    }
LABEL_78:
    if ( kInfo._Myfirst )
      operator delete(kInfo._Myfirst);
  }
}
// A8C2A4: using guessed type int ITableBase<AbnormalStateViewInfo,AbnormalStateViewInfoTab>::ms_pkTable;

//----- (00708D10) --------------------------------------------------------
void __thiscall ExpeditionLootSelectWin::UpdateMeWin(ExpeditionLootSelectWin *this, float fCurTime)
{
  ExpeditionLootSelectWin *v2; // edi@1
  SlideListWin *v3; // ecx@1
  std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *v4; // ebx@1
  RaidMemberInfo *v5; // esi@2
  unsigned int v6; // ecx@4
  unsigned int v7; // edx@4
  unsigned int v8; // edi@4
  unsigned int v9; // ebx@4
  unsigned int v10; // eax@7
  std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > kInfo; // [sp+10h] [bp-60h]@2
  ExpeditionLootSelectWin *v12; // [sp+20h] [bp-50h]@1
  int v13; // [sp+24h] [bp-4Ch]@3
  std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo> > *v14; // [sp+28h] [bp-48h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strText; // [sp+2Ch] [bp-44h]@1
  char acstr[21]; // [sp+48h] [bp-28h]@4
  int v17; // [sp+6Ch] [bp-4h]@1

  v2 = this;
  v12 = this;
  strText._Myres = 15;
  strText._Mysize = 0;
  strText._Bx._Buf[0] = 0;
  v3 = this->m_pSeletMemberList;
  v17 = 0;
  SlideListWin::RemoveAllList(v3);
  v4 = g_kRaidinfo.m_MemberInfo;
  v14 = g_kRaidinfo.m_MemberInfo;
  do
  {
    std::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>::vector<RaidMemberInfo,std::allocator<RaidMemberInfo>>(
      &kInfo,
      v4);
    v5 = kInfo._Myfirst;
    LOBYTE(v17) = 1;
    if ( kInfo._Mylast - kInfo._Myfirst )
    {
      v13 = kInfo._Mylast - kInfo._Myfirst;
      do
      {
        v6 = v5->m_kCharID.n5_code[1];
        v7 = v5->m_kCharID.n5_code[2];
        v8 = v5->m_kCharID.n5_code[3];
        v9 = v5->m_kCharID.n5_code[4];
        *(_DWORD *)acstr = v5->m_kCharID.n5_code[0];
        *(_DWORD *)&acstr[4] = v6;
        *(_DWORD *)&acstr[8] = v7;
        *(_DWORD *)&acstr[12] = v8;
        *(_DWORD *)&acstr[16] = v9;
        acstr[20] = 0;
        if ( *(_DWORD *)acstr != g_kRaidinfo.m_kRaidLooterID.n5_code[0]
          || __PAIR__(v6, v7) != __PAIR__(
                                   g_kRaidinfo.m_kRaidLooterID.n5_code[1],
                                   g_kRaidinfo.m_kRaidLooterID.n5_code[2])
          || __PAIR__(v9, v8) != *(_QWORD *)&g_kRaidinfo.m_kRaidLooterID.n5_code[3] )
        {
          v2 = v12;
          SlideListWin::AddText(v12->m_pSeletMemberList, acstr);
        }
        else
        {
          v2 = v12;
          v10 = SlideListWin::AddText(v12->m_pSeletMemberList, acstr);
          SlideListWin::SetFontColor(v2->m_pSeletMemberList, v10, 0, 255, 255, 0);
        }
        ++v5;
        --v13;
      }
      while ( v13 );
      v5 = kInfo._Myfirst;
      v4 = v14;
    }
    LOBYTE(v17) = 0;
    if ( v5 )
      operator delete(v5);
    ++v4;
    kInfo._Myfirst = 0;
    kInfo._Mylast = 0;
    kInfo._Myend = 0;
    v14 = v4;
  }
  while ( (signed int)v4 < (signed int)&unk_B5C4CC );
  SlideListWin::UpdateViewList(v2->m_pSeletMemberList);
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
    GameFrameWork::UpdateUIScroll(v2->m_pSeletMemberList, v2->m_pkSlideBarEx);
}

//----- (00708EC0) --------------------------------------------------------
char __thiscall ExpeditionLootSelectWin::Create(ExpeditionLootSelectWin *this, PgFrameWork *pkFrameWork)
{
  ExpeditionLootSelectWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiAVObject *v5; // eax@4
  NiTexturingProperty *v6; // eax@4
  NiTexturingProperty *v7; // edi@4
  NiTexturingProperty::Map *v8; // eax@6
  NiSourceTexture *v9; // eax@7
  NiNode *v10; // edi@10
  char result; // al@14
  PgSprData *v12; // eax@15
  NiNode *v13; // edi@18
  int v14; // edi@22
  D3DXCOLOR v15; // ST1C_16@22
  char *v16; // eax@22
  PgWinText *v17; // eax@22
  SLWCreateInfo::Item *v18; // edi@22
  std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *v19; // edi@22
  SLWCreateInfo::Item *v20; // edi@28
  NiSourceTexture *v21; // edi@30
  PgSprData *v22; // eax@30
  SlideListWin *v23; // eax@30
  PgSprData *v24; // eax@30
  SlideBar *v25; // eax@30
  SlideBar *v26; // edi@30
  int v27; // eax@30
  int v28; // eax@30
  NiTexturingProperty *v29; // esi@30
  NiNode *v30; // esi@32
  UIUtil ui; // [sp+28h] [bp-78h]@22
  SLWCreateInfo kCreateInfo; // [sp+3Ch] [bp-64h]@22
  NiPointer<NiTexturingProperty> spTexProp; // [sp+58h] [bp-48h]@4
  NiSourceTexture *pkTexture; // [sp+5Ch] [bp-44h]@7
  int iOffX; // [sp+60h] [bp-40h]@22
  int iOffY; // [sp+64h] [bp-3Ch]@1
  int uiTop; // [sp+68h] [bp-38h]@15
  int uiLeft; // [sp+6Ch] [bp-34h]@15
  NiPointer<NiNode> spNode; // [sp+70h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+74h] [bp-2Ch]@22
  int v41; // [sp+9Ch] [bp-4h]@1

  v2 = this;
  iOffY = (int)pkFrameWork;
  spNode.m_pObject = 0;
  this->m_pkFrameWork = pkFrameWork;
  v3 = pTexturePalette;
  v41 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\RaidRootSelect.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Frame");
  v6 = (NiTexturingProperty *)NiAVObject::GetProperty(v5, 8);
  v7 = v6;
  spTexProp.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v8 = *v7->m_kMaps.m_pBase;
  LOBYTE(v41) = 1;
  if ( !v8 || (v9 = (NiSourceTexture *)v8->m_spTexture.m_pObject, (pkTexture = v9) == 0) )
  {
    LOBYTE(v41) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v10 = spNode.m_pObject;
    v41 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
    return 0;
  }
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v9);
  if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v12, 0, (PgFrameWork *)iOffY, "ExpeditionRootSelectWin", 0) )
  {
    v14 = uiLeft;
    iOffY = uiTop;
    iOffX = uiLeft;
    UIUtil::UIUtil(&ui);
    LOBYTE(v41) = 2;
    UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
    UIUtil::SetOffset(&ui, v14, iOffY);
    UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
    UIUtil::CreateSpr(&ui, "Panel01", 0);
    *(_QWORD *)&v15.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v15.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v16 = (char *)TextData2::Get(0x64462634u);
    v17 = UIUtil::CreateTextNoSpr(&ui, "WinTitle", v16, v15, 5u);
    v17->vfptr[122].__vecDelDtor((NiRefObject *)v17, 1u);
    kCreateInfo.m_arrItem._Myfirst = 0;
    kCreateInfo.m_arrItem._Mylast = 0;
    kCreateInfo.m_arrItem._Myend = 0;
    kCreateInfo.m_bMakeData = 0;
    kCreateInfo.m_nOffX = 0;
    kCreateInfo.m_nOffY = 0;
    LOBYTE(v41) = 3;
    v18 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
    v18->nItemType = 1;
    v18->pNode = spNode.m_pObject;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarNor", 0xCu);
    v19 = &v18->vecNodeName;
    LOBYTE(v41) = 4;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      v19,
      &_Val);
    LOBYTE(v41) = 3;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarOver", 0xDu);
    LOBYTE(v41) = 5;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      v19,
      &_Val);
    LOBYTE(v41) = 3;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "ColumnBarClick", 0xEu);
    LOBYTE(v41) = 6;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      v19,
      &_Val);
    LOBYTE(v41) = 3;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    v20 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    v20->nItemType = 2;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Val, "Column", 6u);
    LOBYTE(v41) = 7;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      &v20->vecNodeName,
      &_Val);
    LOBYTE(v41) = 3;
    if ( _Val._Myres >= 0x10 )
      operator delete(_Val._Bx._Ptr);
    v20->pNode = spNode.m_pObject;
    _Val._Myres = 15;
    _Val._Mysize = 0;
    _Val._Bx._Buf[0] = 0;
    kCreateInfo.m_nOffX = 3;
    kCreateInfo.m_nOffY = 0;
    SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
    v21 = pkTexture;
    v22 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Textbox", &uiLeft, &uiTop, pkTexture);
    v23 = SlideListWin::CreateWin(uiLeft - iOffX, uiTop - iOffY, v22, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
    v2->m_pSeletMemberList = v23;
    v23->m_uiLClickMsg = 4;
    SlideListWin::AlignText(v2->m_pSeletMemberList, 0);
    SlideListWin::UpdateViewList(v2->m_pSeletMemberList);
    v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle", &uiLeft, &uiTop, v21);
    v25 = SlideBar::CreateWin(
            spNode.m_pObject,
            "SlideBar",
            "SlideBar_UpBtn",
            "SlideBar_DnBtn",
            v24,
            0,
            (PgWin *)&v2->vfptr);
    v2->m_pkSlideBarEx = v25;
    v25->m_uiClickMsg = 3;
    v2->m_pkSlideBarEx->m_eType = 1;
    v26 = v2->m_pkSlideBarEx;
    iOffX = (int)v2->m_pkSlideBarEx->vfptr;
    v27 = (*(int (__thiscall **)(SlideBar *))(iOffX + 168))(v26);
    v28 = (int)v26->vfptr[41].__vecDelDtor((NiRefObject *)v26, v27);
    (*(void (__thiscall **)(SlideBar *, int))(iOffX + 308))(v2->m_pkSlideBarEx, v28);
    SlideBar::SetSplitCnt(v2->m_pkSlideBarEx, v2->m_pSeletMemberList->m_nSlideSplitCnt);
    UIUtil::CreateBtn(&ui, 0, "ClsNor", "ClsClick", "ClsOver", 0, 0);
    ((void (__thiscall *)(ExpeditionLootSelectWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.69999999,
      0.1);
    LOBYTE(v41) = 2;
    SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
    LOBYTE(v41) = 1;
    UIUtil::~UIUtil(&ui);
    v29 = spTexProp.m_pObject;
    LOBYTE(v41) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
      v29->vfptr->__vecDelDtor((NiRefObject *)v29, 1u);
    v30 = spNode.m_pObject;
    v41 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v30 )
      v30->vfptr->__vecDelDtor((NiRefObject *)v30, 1u);
    result = 1;
  }
  else
  {
    LOBYTE(v41) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v13 = spNode.m_pObject;
    v41 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v13 )
      return 0;
    v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
    result = 0;
  }
  return result;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00709420) --------------------------------------------------------
ExpeditionMemberAddWin *__thiscall ExpeditionMemberAddWin::`vector deleting destructor'(ExpeditionMemberAddWin *this, unsigned int a2)
{
  ExpeditionMemberAddWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ExpeditionMemberAddWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ExpeditionMemberAddWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C8468: using guessed type void (__thiscall *ExpeditionMemberAddWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C8484: using guessed type int (__thiscall *ExpeditionMemberAddWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00709460) --------------------------------------------------------
ExpeditionLootSelectWin *__thiscall ExpeditionLootSelectWin::`vector deleting destructor'(ExpeditionLootSelectWin *this, unsigned int a2)
{
  ExpeditionLootSelectWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ExpeditionLootSelectWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ExpeditionLootSelectWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C86A8: using guessed type void (__thiscall *ExpeditionLootSelectWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C86C4: using guessed type int (__thiscall *ExpeditionLootSelectWin::`vftable'{for `NiNode'})(void *p, char);

//----- (007094A0) --------------------------------------------------------
EntryIconWin *__thiscall EntryIconWin::`scalar deleting destructor'(EntryIconWin *this, unsigned int a2)
{
  EntryIconWin *v2; // esi@1

  v2 = this;
  EntryIconWin::~EntryIconWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007094D0) --------------------------------------------------------
ExpeditionWin *__thiscall ExpeditionWin::`scalar deleting destructor'(ExpeditionWin *this, unsigned int a2)
{
  ExpeditionWin *v2; // esi@1

  v2 = this;
  ExpeditionWin::~ExpeditionWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00709500) --------------------------------------------------------
ExpeditionPartyWin *__thiscall ExpeditionPartyWin::`vector deleting destructor'(ExpeditionPartyWin *this, unsigned int a2)
{
  ExpeditionPartyWin *v2; // esi@1

  v2 = this;
  ExpeditionPartyWin::~ExpeditionPartyWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00709530) --------------------------------------------------------
ExpeditionLootOptionWin *__thiscall ExpeditionLootOptionWin::`vector deleting destructor'(ExpeditionLootOptionWin *this, unsigned int a2)
{
  ExpeditionLootOptionWin *v2; // esi@1

  v2 = this;
  ExpeditionLootOptionWin::~ExpeditionLootOptionWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00709560) --------------------------------------------------------
void __cdecl ConvertCommaNumber(__int64 i64Val, char *pNumberString)
{
  char *v2; // eax@1
  char v3; // dl@2
  int v4; // eax@3
  char v5; // dl@4
  char v6; // dl@4
  char v7; // dl@4
  char v8; // al@4
  char v9; // dl@6
  char v10; // dl@6
  char v11; // al@6
  char v12; // dl@8
  char v13; // al@8
  char comma2[4]; // [sp+Ch] [bp-Ch]@1
  char comma1[4]; // [sp+10h] [bp-8h]@4
  char comma0[4]; // [sp+14h] [bp-4h]@4

  sprintf(pNumberString, "%I64d", i64Val);
  v2 = pNumberString;
  *(_DWORD *)comma2 = pNumberString + 1;
  do
    v3 = *v2++;
  while ( v3 );
  v4 = (int)&v2[-*(_DWORD *)comma2];
  if ( v4 <= 9 )
  {
    if ( v4 <= 6 )
    {
      if ( v4 > 3 )
      {
        *(_WORD *)&comma2[1] = 0;
        *(_DWORD *)comma1 = 0;
        comma2[3] = 0;
        *(_WORD *)comma2 = (unsigned __int8)pNumberString[v4 - 3];
        v12 = pNumberString[v4 - 2];
        v13 = pNumberString[v4 - 1];
        comma2[1] = v12;
        comma2[2] = v13;
        comma2[3] = 0;
        sprintf(pNumberString, "%I64d,%s", i64Val / 1000, comma2);
      }
    }
    else
    {
      comma2[0] = pNumberString[v4 - 3];
      v9 = pNumberString[v4 - 2];
      *(_WORD *)&comma2[1] = 0;
      comma2[1] = v9;
      comma2[2] = pNumberString[v4 - 1];
      comma1[0] = pNumberString[v4 - 6];
      v10 = pNumberString[v4 - 5];
      v11 = pNumberString[v4 - 4];
      comma1[1] = v10;
      comma1[2] = v11;
      comma2[3] = 0;
      comma1[3] = 0;
      sprintf(pNumberString, "%I64d,%s,%s", i64Val / 1000000, comma1, comma2);
    }
  }
  else
  {
    comma0[0] = pNumberString[v4 - 3];
    v5 = pNumberString[v4 - 2];
    *(_WORD *)&comma0[1] = 0;
    comma0[1] = v5;
    comma0[2] = pNumberString[v4 - 1];
    comma1[0] = pNumberString[v4 - 6];
    v6 = pNumberString[v4 - 5];
    *(_WORD *)&comma1[1] = 0;
    comma1[1] = v6;
    comma1[2] = pNumberString[v4 - 4];
    comma2[0] = pNumberString[v4 - 9];
    v7 = pNumberString[v4 - 8];
    v8 = pNumberString[v4 - 7];
    comma2[1] = v7;
    comma2[2] = v8;
    comma0[3] = 0;
    comma1[3] = 0;
    comma2[3] = 0;
    sprintf(pNumberString, "%I64d,%s,%s,%s", i64Val / 1000000000, comma2, comma1, comma0);
  }
}

//----- (00709710) --------------------------------------------------------
void __thiscall CoinEditWin::CoinEditWin(CoinEditWin *this)
{
  CoinEditWin *v1; // esi@1

  v1 = this;
  EditWin::EditWin((EditWin *)&this->vfptr);
  LODWORD(v1->i64Money) = 0;
  HIDWORD(v1->i64Money) = 0;
  v1->m_pkMoneyText = 0;
  v1->vfptr = (NiRefObjectVtbl *)&CoinEditWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CoinEditWin::`vftable'{for `IDirectMessenger'};
}
// 9C9614: using guessed type void (__thiscall *CoinEditWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C9634: using guessed type int (__thiscall *CoinEditWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00709740) --------------------------------------------------------
void __thiscall CoinEditWin::~CoinEditWin(CoinEditWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&CoinEditWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CoinEditWin::`vftable'{for `IDirectMessenger'};
  EditWin::~EditWin((EditWin *)&this->vfptr);
}
// 9C9614: using guessed type void (__thiscall *CoinEditWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C9634: using guessed type int (__thiscall *CoinEditWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00709760) --------------------------------------------------------
void __thiscall CoinEditWin::InputNumberDone(CoinEditWin *this)
{
  CoinEditWin *v1; // esi@1
  char pNumberString[64]; // [sp+4h] [bp-44h]@1

  v1 = this;
  pNumberString[0] = 0;
  memset(&pNumberString[1], 0, 0x3Fu);
  v1->vfptr[115].__vecDelDtor((NiRefObject *)v1, (unsigned int)&unk_9C91BD);
  ((void (__stdcall *)(_DWORD))v1->m_pkMoneyText->vfptr[64].__vecDelDtor)(1);
  if ( v1->i64Money )
  {
    ConvertCommaNumber(v1->i64Money, pNumberString);
    ((void (__stdcall *)(_DWORD))v1->m_pkMoneyText->vfptr[118].__vecDelDtor)(pNumberString);
  }
  else
  {
    ((void (__stdcall *)(_DWORD))v1->m_pkMoneyText->vfptr[118].__vecDelDtor)(&off_9C91BE);
  }
}
// 9C91BE: using guessed type void *off_9C91BE;

//----- (00709820) --------------------------------------------------------
void __thiscall CoinExchangeWin::CoinExchangeWin(CoinExchangeWin *this)
{
  CoinExchangeWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_pkTabMoneyBut = 0;
  v1->m_pkExchangeBut = 0;
  v1->m_pkTab01 = 0;
  v1->m_pkTab02 = 0;
  v1->m_pkTabText1 = 0;
  v1->m_pkTabText2 = 0;
  v1->m_pkExchangeableCoinText = 0;
  v1->m_pkBottomText = 0;
  v1->m_pkCoinEdit = 0;
  v1->m_pkText01 = 0;
  v1->m_pkText02 = 0;
  v1->m_uiCurFoscus = 0;
  LODWORD(v1->m_i64Coin) = 0;
  HIDWORD(v1->m_i64Coin) = 0;
  v1->vfptr = (NiRefObjectVtbl *)&CoinExchangeWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&CoinExchangeWin::`vftable'{for `IDirectMessenger'};
}
// 9C9828: using guessed type void (__thiscall *CoinExchangeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C9844: using guessed type int (__thiscall *CoinExchangeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (007098A0) --------------------------------------------------------
void __thiscall CoinExchangeWin::~CoinExchangeWin(CoinExchangeWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&CoinExchangeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CoinExchangeWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9C9828: using guessed type void (__thiscall *CoinExchangeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C9844: using guessed type int (__thiscall *CoinExchangeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (007098C0) --------------------------------------------------------
void __thiscall CoinExchangeWin::SetEditFocus(CoinExchangeWin *this, unsigned int uiFocus)
{
  CoinExchangeWin *v2; // edx@1
  CoinEditWin *v3; // ecx@1

  v2 = this;
  v3 = this->m_pkCoinEdit;
  if ( v3 )
  {
    v2->m_uiCurFoscus = uiFocus;
    if ( uiFocus )
    {
      if ( uiFocus == 1 )
        ((void (*)(void))v3->vfptr[120].__vecDelDtor)();
    }
    else
    {
      ((void (__stdcall *)(_DWORD))v3->vfptr[121].__vecDelDtor)(1);
    }
  }
}

//----- (00709900) --------------------------------------------------------
void __thiscall CoinExchangeWin::SetExchangeableCoin(CoinExchangeWin *this, __int64 coin)
{
  CoinExchangeWin *v2; // esi@1
  char pNumberString[64]; // [sp+4h] [bp-44h]@1

  v2 = this;
  pNumberString[0] = 0;
  memset(&pNumberString[1], 0, 0x3Fu);
  ConvertCommaNumber(coin, pNumberString);
  ((void (__stdcall *)(_DWORD))v2->m_pkExchangeableCoinText->vfptr[118].__vecDelDtor)(pNumberString);
}

//----- (00709960) --------------------------------------------------------
void __thiscall GambleWin::GambleWin(GambleWin *this)
{
  GambleWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_pkMyCoinText = 0;
  v1->m_pkAbleCoinText = 0;
  v1->m_pkLeaveBtn = 0;
  v1->vfptr = (NiRefObjectVtbl *)&GambleWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GambleWin::`vftable'{for `IDirectMessenger'};
}
// 9C9A68: using guessed type void (__thiscall *GambleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C9A84: using guessed type int (__thiscall *GambleWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00709990) --------------------------------------------------------
void __thiscall GambleWin::~GambleWin(GambleWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GambleWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GambleWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9C9A68: using guessed type void (__thiscall *GambleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C9A84: using guessed type int (__thiscall *GambleWin::`vftable'{for `NiNode'})(void *p, char);

//----- (007099B0) --------------------------------------------------------
void __thiscall GambleMiniWin::GambleMiniWin(GambleMiniWin *this)
{
  GambleMiniWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GambleMiniWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GambleMiniWin::`vftable'{for `IDirectMessenger'};
}
// 9C9CA8: using guessed type void (__thiscall *GambleMiniWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C9CC4: using guessed type int (__thiscall *GambleMiniWin::`vftable'{for `NiNode'})(void *p, char);

//----- (007099D0) --------------------------------------------------------
void __thiscall GambleMiniWin::~GambleMiniWin(GambleMiniWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GambleMiniWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GambleMiniWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9C9CA8: using guessed type void (__thiscall *GambleMiniWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C9CC4: using guessed type int (__thiscall *GambleMiniWin::`vftable'{for `NiNode'})(void *p, char);

//----- (007099F0) --------------------------------------------------------
void __stdcall GambleMiniWin::OnCommand(unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@2

  if ( !wParam )
  {
    v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    GameFrameWork::OnOpenGambleHouseWin(v3, 0);
  }
}

//----- (00709A20) --------------------------------------------------------
void __thiscall GambleHouseCardWin::GambleHouseCardWin(GambleHouseCardWin *this)
{
  GambleHouseCardWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->m_pkMyCoinText = 0;
  v1->m_pkAbleCoinText = 0;
  v1->vfptr = (NiRefObjectVtbl *)&GambleHouseCardWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GambleHouseCardWin::`vftable'{for `IDirectMessenger'};
}
// 9C9EE8: using guessed type void (__thiscall *GambleHouseCardWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C9F04: using guessed type int (__thiscall *GambleHouseCardWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00709A50) --------------------------------------------------------
void __thiscall GambleHouseCardWin::~GambleHouseCardWin(GambleHouseCardWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GambleHouseCardWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GambleHouseCardWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9C9EE8: using guessed type void (__thiscall *GambleHouseCardWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C9F04: using guessed type int (__thiscall *GambleHouseCardWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00709A70) --------------------------------------------------------
void __thiscall GambleHouseCardWin::OnCommand(GambleHouseCardWin *this, unsigned int wParam, int lParam)
{
  if ( !wParam )
    PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
}

//----- (00709A90) --------------------------------------------------------
void __usercall CoinEditWin::SetFocus(CoinEditWin *this@<ecx>, int a2@<edi>)
{
  CoinEditWin *v2; // esi@1
  PgWinEditText *v3; // ecx@2
  int v4; // ST0C_4@4
  NiRefObjectVtbl *v5; // edi@4
  char *v6; // eax@4

  v2 = this;
  if ( this->m_bEnalbe )
  {
    EditWin::ms_pkCurEditWin = (PgWin *)this;
    ((void (*)(void))this->m_spEditWin.m_pObject->vfptr[3].__vecDelDtor)();
    v3 = v2->m_spTextWin.m_pObject;
    v2->m_uiLastBlinkTime = 0;
    v2->m_iShowCaret = 0;
    ((void (__stdcall *)(signed int))v3->vfptr[64].__vecDelDtor)(1);
    if ( v2->i64Money )
    {
      v4 = a2;
      v5 = v2->vfptr;
      v6 = fs("%I64d", LODWORD(v2->i64Money), HIDWORD(v2->i64Money));
      ((void (__thiscall *)(CoinEditWin *, char *, int))v5[115].__vecDelDtor)(v2, v6, v4);
      ((void (__cdecl *)(_DWORD))v2->m_pkMoneyText->vfptr[64].__vecDelDtor)(0);
    }
    else
    {
      v2->vfptr[115].__vecDelDtor((NiRefObject *)v2, 10260927u);
      ((void (__stdcall *)(_DWORD))v2->m_pkMoneyText->vfptr[64].__vecDelDtor)(0);
    }
  }
}
// 709A90: could not find valid save-restore pair for edi

//----- (00709B50) --------------------------------------------------------
void __thiscall CoinExchangeWin::OnShowWin(CoinExchangeWin *this)
{
  CoinExchangeWin *v1; // esi@1
  CoinEditWin *v2; // ecx@1
  CoinEditWin *v3; // eax@3
  MHDiceGameTask *v4; // edi@4
  unsigned __int64 v5; // rax@9
  unsigned int v6; // edi@9
  __int64 v7; // kr00_8@10
  GameFrameWork *v8; // eax@11
  NiPointer<MHDiceGameTask> result; // [sp+Ch] [bp-50h]@3
  MHDiceGameTask *pkTask; // [sp+14h] [bp-48h]@3
  char pNumberString; // [sp+18h] [bp-44h]@9
  char dst; // [sp+19h] [bp-43h]@9

  v1 = this;
  PgWin::OnShowWin((PgWin *)&this->vfptr);
  v2 = v1->m_pkCoinEdit;
  if ( v2 )
  {
    v1->m_uiCurFoscus = 1;
    ((void (*)(void))v2->vfptr[120].__vecDelDtor)();
  }
  v3 = v1->m_pkCoinEdit;
  LODWORD(v1->m_i64Coin) = 0;
  HIDWORD(v1->m_i64Coin) = 0;
  LODWORD(v3->i64Money) = 0;
  HIDWORD(v3->i64Money) = 0;
  CoinEditWin::InputNumberDone(v1->m_pkCoinEdit);
  pkTask = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  if ( result.m_pObject )
  {
    v4 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
  }
  if ( pkTask )
  {
    if ( v1->m_pkTab01->m_bCheck )
    {
      v5 = User::ExchangeableCoin(&g_kUser);
      pkTask = (MHDiceGameTask *)HIDWORD(v5);
      v6 = v5;
      pNumberString = 0;
      memset(&dst, 0, 0x3Fu);
      ConvertCommaNumber(__PAIR__((unsigned int)pkTask, v6), &pNumberString);
      ((void (__stdcall *)(_DWORD))v1->m_pkExchangeableCoinText->vfptr[118].__vecDelDtor)(&pNumberString);
    }
    else
    {
      v7 = User::Coin(&g_kUser);
      pkTask = (MHDiceGameTask *)HIDWORD(v7);
      pNumberString = 0;
      memset(&dst, 0, 0x3Fu);
      ConvertCommaNumber(v7, &pNumberString);
      ((void (__stdcall *)(_DWORD))v1->m_pkExchangeableCoinText->vfptr[118].__vecDelDtor)(&pNumberString);
    }
  }
  v8 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v8 )
    GameFrameWork::OpenPlayGuideWin(v8, BIL_GBHOUSE_2);
}

//----- (00709CC0) --------------------------------------------------------
void __thiscall CoinExchangeWin::OnClose(CoinExchangeWin *this)
{
  CoinExchangeWin *v1; // esi@1
  CoinEditWin *v2; // ecx@1

  v1 = this;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 8u, 0xBu, 0, 0);
  v2 = v1->m_pkCoinEdit;
  if ( v2 )
  {
    v1->m_uiCurFoscus = 0;
    ((void (__stdcall *)(_DWORD))v2->vfptr[121].__vecDelDtor)(1);
  }
  ((void (__stdcall *)(_DWORD))v1->m_pkExchangeBut->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkGemText->vfptr[118].__vecDelDtor)(&unk_9C91C2);
  ((void (__stdcall *)(_DWORD))v1->m_pkGoldText->vfptr[118].__vecDelDtor)(&unk_9C91C3);
  ((void (__stdcall *)(_DWORD))v1->m_pkSilverText->vfptr[118].__vecDelDtor)(&unk_9C91CA);
  ((void (__stdcall *)(_DWORD))v1->m_pkCopperText->vfptr[118].__vecDelDtor)(&unk_9C91CB);
}

//----- (00709D60) --------------------------------------------------------
void __stdcall GambleWin::OnCommand(unsigned int wParam, int lParam)
{
  GameFrameWork *v3; // eax@3
  MHDiceGameTask *v4; // edi@4
  void (__thiscall ***v5)(_DWORD, _DWORD); // esi@5

  if ( wParam )
  {
    if ( wParam == 1 )
    {
      v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      GameFrameWork::OnOpenGambleHouseWin(v3, 0);
    }
  }
  else
  {
    v4 = MHDiceGameTask::GetDiceGameTask((NiPointer<MHDiceGameTask> *)&wParam)->m_pObject;
    if ( wParam )
    {
      v5 = (void (__thiscall ***)(_DWORD, _DWORD))wParam;
      if ( !InterlockedDecrement((volatile LONG *)(wParam + 4)) )
      {
        if ( v5 )
          (**v5)(v5, 1);
      }
    }
    if ( v4 )
      MHDiceGameTask::NcGambleGambleHouseExitReq();
  }
}

//----- (00709DE0) --------------------------------------------------------
void __thiscall GambleWin::ChangeCoin(GambleWin *this)
{
  GambleWin *v1; // esi@1
  MHDiceGameTask *v2; // edi@2
  __int64 v3; // kr00_8@6
  NiPointer<MHDiceGameTask> result; // [sp+Ch] [bp-90h]@1
  __int64 i64Val; // [sp+10h] [bp-8Ch]@1
  char pCoinString[64]; // [sp+18h] [bp-84h]@6
  char pExchageString[64]; // [sp+58h] [bp-44h]@6

  v1 = this;
  HIDWORD(i64Val) = (NiPointer<MHDiceGameTask>)MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  if ( result.m_pObject )
  {
    v2 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
  }
  if ( HIDWORD(i64Val) )
  {
    pCoinString[0] = 0;
    memset(&pCoinString[1], 0, 0x3Fu);
    pExchageString[0] = 0;
    memset(&pExchageString[1], 0, 0x3Fu);
    v3 = User::Coin(&g_kUser);
    i64Val = User::ExchangeableCoin(&g_kUser);
    ConvertCommaNumber(v3, pCoinString);
    ConvertCommaNumber(i64Val, pExchageString);
    ((void (__stdcall *)(_DWORD))v1->m_pkMyCoinText->vfptr[118].__vecDelDtor)(pCoinString);
    ((void (__stdcall *)(_DWORD))v1->m_pkAbleCoinText->vfptr[118].__vecDelDtor)(pExchageString);
  }
}

//----- (00709F00) --------------------------------------------------------
void __thiscall GambleHouseCardWin::ChangeCoin(GambleHouseCardWin *this)
{
  GambleHouseCardWin *v1; // esi@1
  MHDiceGameTask *v2; // edi@2
  __int64 v3; // kr00_8@6
  NiPointer<MHDiceGameTask> result; // [sp+Ch] [bp-90h]@1
  __int64 i64Val; // [sp+10h] [bp-8Ch]@1
  char pCoinString[64]; // [sp+18h] [bp-84h]@6
  char pExchageString[64]; // [sp+58h] [bp-44h]@6

  v1 = this;
  HIDWORD(i64Val) = (NiPointer<MHDiceGameTask>)MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  if ( result.m_pObject )
  {
    v2 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
  }
  if ( HIDWORD(i64Val) )
  {
    pCoinString[0] = 0;
    memset(&pCoinString[1], 0, 0x3Fu);
    pExchageString[0] = 0;
    memset(&pExchageString[1], 0, 0x3Fu);
    v3 = User::Coin(&g_kUser);
    i64Val = User::ExchangeableCoin(&g_kUser);
    ConvertCommaNumber(v3, pCoinString);
    ConvertCommaNumber(i64Val, pExchageString);
    ((void (__stdcall *)(_DWORD))v1->m_pkMyCoinText->vfptr[118].__vecDelDtor)(pCoinString);
    ((void (__stdcall *)(_DWORD))v1->m_pkAbleCoinText->vfptr[118].__vecDelDtor)(pExchageString);
  }
}

//----- (0070A020) --------------------------------------------------------
void __thiscall CoinExchangeWin::OnEditEnd(CoinExchangeWin *this, unsigned int wParam, int lParam)
{
  CoinExchangeWin *v3; // esi@1
  const char *v4; // eax@2
  __int64 v5; // rax@2
  int v6; // ecx@2
  GBHouse *v7; // eax@3
  __int64 v8; // rax@4
  unsigned int v9; // ebx@4
  unsigned int v10; // edi@4
  GBHouse *v11; // ST20_4@4
  __int64 v12; // rax@4
  char *v13; // eax@4
  GBHouse *v14; // ST20_4@4
  __int64 v15; // rax@4
  char *v16; // eax@4
  GBHouse *v17; // ST20_4@4
  __int64 v18; // rax@4
  char *v19; // eax@4
  GBHouse *v20; // ST20_4@4
  __int64 v21; // rax@4
  char *v22; // eax@4
  GBHouse *v23; // eax@5
  __int64 v24; // rax@6
  unsigned int v25; // ebx@6
  unsigned int v26; // edi@6
  unsigned __int64 v27; // rax@6
  __int64 v28; // kr00_8@9
  GBHouse *v29; // ST20_4@9
  __int64 v30; // rax@9
  char *v31; // eax@9
  GBHouse *v32; // ST20_4@9
  __int64 v33; // rax@9
  char *v34; // eax@9
  GBHouse *v35; // ST20_4@9
  __int64 v36; // rax@9
  char *v37; // eax@9
  GBHouse *v38; // ST20_4@9
  __int64 v39; // rax@9
  char *v40; // eax@9
  GBHouse *pkHouse; // [sp+4h] [bp-4h]@5

  v3 = this;
  if ( this->m_uiCurFoscus == 1 )
  {
    v4 = (const char *)((int (*)(void))this->m_pkCoinEdit->vfptr[113].__vecDelDtor)();
    v5 = _atoi64(v4);
    LODWORD(v3->m_i64Coin) = v5;
    v6 = v3->m_i64Coin;
    LODWORD(v5) = v3->m_pkCoinEdit;
    HIDWORD(v3->m_i64Coin) = HIDWORD(v5);
    *(_DWORD *)(v5 + 328) = v6;
    *(_DWORD *)(v5 + 332) = HIDWORD(v3->m_i64Coin);
    CoinEditWin::InputNumberDone(v3->m_pkCoinEdit);
    if ( v3->m_pkTab01->m_bCheck )
    {
      v7 = GBHouseTab::GetByIndex(0);
      if ( v7 )
      {
        v8 = v7->GB_GameMoney * v3->m_i64Coin;
        v9 = HIDWORD(v8);
        v10 = v8;
        v11 = (GBHouse *)v3->m_pkGemText->vfptr;
        v12 = User::GetGem(v8);
        v13 = fs("%I64d", v12);
        (*(void (__thiscall **)(PgWinText *, char *))&v11[42].GB_ResetTimeSec)(v3->m_pkGemText, v13);
        v14 = (GBHouse *)v3->m_pkGoldText->vfptr;
        v15 = User::GetGold(__PAIR__(v9, v10));
        v16 = fs("%I64d", v15);
        (*(void (__thiscall **)(PgWinText *, char *))&v14[42].GB_ResetTimeSec)(v3->m_pkGoldText, v16);
        v17 = (GBHouse *)v3->m_pkSilverText->vfptr;
        v18 = User::GetSilver(__PAIR__(v9, v10));
        v19 = fs("%I64d", v18);
        (*(void (__thiscall **)(PgWinText *, char *))&v17[42].GB_ResetTimeSec)(v3->m_pkSilverText, v19);
        v20 = (GBHouse *)v3->m_pkCopperText->vfptr;
        v21 = User::GetCopper(__PAIR__(v9, v10));
        v22 = fs("%I64d", v21);
        (*(void (__thiscall **)(PgWinText *, char *))&v20[42].GB_ResetTimeSec)(v3->m_pkCopperText, v22);
      }
    }
    else
    {
      v23 = GBHouseTab::GetByIndex(0);
      pkHouse = v23;
      if ( v23 )
      {
        v24 = v23->GB_GameMoney * v3->m_i64Coin;
        v25 = HIDWORD(v24);
        v26 = v24;
        v27 = (unsigned __int64)pkHouse->GB_ExchangeTax * v24 / 0x3E8;
        if ( v25 | v26 && !v27 )
          v27 = 1i64;
        v28 = __PAIR__(v25, v26) - v27;
        v29 = (GBHouse *)v3->m_pkGemText->vfptr;
        v30 = User::GetGem(__PAIR__(v25, v26) - v27);
        v31 = fs("%I64d", v30);
        (*(void (__thiscall **)(PgWinText *, char *))&v29[42].GB_ResetTimeSec)(v3->m_pkGemText, v31);
        v32 = (GBHouse *)v3->m_pkGoldText->vfptr;
        v33 = User::GetGold(v28);
        v34 = fs("%I64d", v33);
        (*(void (__thiscall **)(PgWinText *, char *))&v32[42].GB_ResetTimeSec)(v3->m_pkGoldText, v34);
        v35 = (GBHouse *)v3->m_pkSilverText->vfptr;
        v36 = User::GetSilver(v28);
        v37 = fs("%I64d", v36);
        (*(void (__thiscall **)(PgWinText *, char *))&v35[42].GB_ResetTimeSec)(v3->m_pkSilverText, v37);
        v38 = (GBHouse *)v3->m_pkCopperText->vfptr;
        v39 = User::GetCopper(v28);
        v40 = fs("%I64d", v39);
        (*(void (__thiscall **)(PgWinText *, char *))&v38[42].GB_ResetTimeSec)(v3->m_pkCopperText, v40);
      }
    }
    if ( SHIDWORD(v3->m_i64Coin) >= 0 && (SHIDWORD(v3->m_i64Coin) > 0 || LODWORD(v3->m_i64Coin)) )
      v3->m_pkExchangeBut->vfptr[60].__vecDelDtor((NiRefObject *)v3->m_pkExchangeBut, 1u);
    else
      v3->m_pkExchangeBut->vfptr[60].__vecDelDtor((NiRefObject *)v3->m_pkExchangeBut, 0);
  }
}

//----- (0070A300) --------------------------------------------------------
void __thiscall CoinExchangeWin::OnExchange(CoinExchangeWin *this)
{
  CoinExchangeWin *v1; // esi@1
  const char *v2; // eax@2
  __int64 v3; // rax@2
  int v4; // ecx@2
  CoinEditWin *v5; // eax@3
  int v6; // ebx@3
  MHDiceGameTask *v7; // edi@5
  MHDiceGameTask *v8; // ebx@6
  char *v9; // eax@15
  unsigned __int64 v10; // [sp-Ch] [bp-20h]@11
  int iCoin; // [sp+8h] [bp-Ch]@3
  int iCoin_4; // [sp+Ch] [bp-8h]@3
  NiPointer<MHDiceGameTask> result; // [sp+10h] [bp-4h]@5

  v1 = this;
  if ( (unsigned __int8)((int (*)(void))this->m_pkCoinEdit->vfptr[122].__vecDelDtor)() )
  {
    v2 = (const char *)((int (*)(void))v1->m_pkCoinEdit->vfptr[113].__vecDelDtor)();
    v3 = _atoi64(v2);
    LODWORD(v1->m_i64Coin) = v3;
    v4 = v1->m_i64Coin;
    LODWORD(v3) = v1->m_pkCoinEdit;
    HIDWORD(v1->m_i64Coin) = HIDWORD(v3);
    *(_DWORD *)(v3 + 328) = v4;
    *(_DWORD *)(v3 + 332) = HIDWORD(v1->m_i64Coin);
    CoinEditWin::InputNumberDone(v1->m_pkCoinEdit);
  }
  v5 = v1->m_pkCoinEdit;
  v6 = HIDWORD(v5->i64Money);
  iCoin = v5->i64Money;
  iCoin_4 = v6;
  if ( v6 || LODWORD(v5->i64Money) )
  {
    v7 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
    if ( result.m_pObject )
    {
      v8 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v8 )
          v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      }
      v6 = iCoin_4;
    }
    if ( v7 )
    {
      HIDWORD(v10) = v6;
      if ( v1->m_pkTab01->m_bCheck )
      {
        LODWORD(v10) = iCoin;
        MHDiceGameTask::NcGambleCoinBuyReq(v10);
        PgWin::PostMsg((PgWin *)&v1->vfptr, 1u, 0, 0);
        return;
      }
      LODWORD(v10) = iCoin;
      MHDiceGameTask::NcGambleCoinSellReq(v10);
    }
    PgWin::PostMsg((PgWin *)&v1->vfptr, 1u, 0, 0);
  }
  else
  {
    v9 = (char *)TextData::Get(0x3BAFA08Du);
    MsgBox::Modal(MSGBOX_OK, v9);
  }
}

//----- (0070A440) --------------------------------------------------------
void __thiscall CoinExchangeWin::OnTAB1(CoinExchangeWin *this)
{
  CoinExchangeWin *v1; // esi@1
  NiRefObjectVtbl *v2; // edi@1
  NiUnsharedGeometryGroup *v3; // eax@1
  NiRefObjectVtbl *v4; // edi@1
  NiUnsharedGeometryGroup *v5; // eax@1
  NiRefObjectVtbl *v6; // edi@1
  NiUnsharedGeometryGroup *v7; // eax@1
  CoinEditWin *v8; // eax@1
  MHDiceGameTask *v9; // edi@1
  __int64 v10; // kr00_8@6
  NiPointer<MHDiceGameTask> result; // [sp+Ch] [bp-50h]@1
  unsigned __int64 nExchangeableCoin; // [sp+10h] [bp-4Ch]@2
  char pNumberString; // [sp+18h] [bp-44h]@6
  char dst; // [sp+19h] [bp-43h]@6

  v1 = this;
  this->m_pkTab01->m_bCheck = 1;
  this->m_pkTab02->m_bCheck = 0;
  v2 = this->m_pkText01->vfptr;
  v3 = TextData2::Get(0xC2BD3C17);
  v2[118].__vecDelDtor((NiRefObject *)v1->m_pkText01, (unsigned int)v3);
  v4 = v1->m_pkText02->vfptr;
  v5 = TextData2::Get(0x40603B82u);
  v4[118].__vecDelDtor((NiRefObject *)v1->m_pkText02, (unsigned int)v5);
  v6 = v1->m_pkBottomText->vfptr;
  v7 = TextData2::Get(0xCB54363B);
  v6[118].__vecDelDtor((NiRefObject *)v1->m_pkBottomText, (unsigned int)v7);
  ((void (__stdcall *)(_DWORD))v1->m_pkGemText->vfptr[118].__vecDelDtor)(&unk_9C91E3);
  ((void (__stdcall *)(_DWORD))v1->m_pkGoldText->vfptr[118].__vecDelDtor)(&unk_9C91EA);
  ((void (__stdcall *)(_DWORD))v1->m_pkSilverText->vfptr[118].__vecDelDtor)(&unk_9C91EB);
  ((void (__stdcall *)(_DWORD))v1->m_pkCopperText->vfptr[118].__vecDelDtor)(&unk_9C9202);
  v8 = v1->m_pkCoinEdit;
  LODWORD(v8->i64Money) = 0;
  HIDWORD(v8->i64Money) = 0;
  CoinEditWin::InputNumberDone(v1->m_pkCoinEdit);
  ((void (__stdcall *)(_DWORD))v1->m_pkExchangeBut->vfptr[60].__vecDelDtor)(0);
  v9 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  if ( result.m_pObject )
  {
    HIDWORD(nExchangeableCoin) = result;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( HIDWORD(nExchangeableCoin) )
        (**(void (__stdcall ***)(_DWORD))HIDWORD(nExchangeableCoin))(1);
    }
  }
  if ( v9 )
  {
    v10 = User::ExchangeableCoin(&g_kUser);
    HIDWORD(nExchangeableCoin) = HIDWORD(v10);
    pNumberString = 0;
    memset(&dst, 0, 0x3Fu);
    ConvertCommaNumber(v10, &pNumberString);
    ((void (__stdcall *)(_DWORD))v1->m_pkExchangeableCoinText->vfptr[118].__vecDelDtor)(&pNumberString);
  }
}

//----- (0070A5F0) --------------------------------------------------------
void __thiscall CoinExchangeWin::OnTAB2(CoinExchangeWin *this)
{
  CoinExchangeWin *v1; // esi@1
  NiRefObjectVtbl *v2; // edi@1
  NiUnsharedGeometryGroup *v3; // eax@1
  NiRefObjectVtbl *v4; // edi@1
  NiUnsharedGeometryGroup *v5; // eax@1
  NiRefObjectVtbl *v6; // edi@1
  NiUnsharedGeometryGroup *v7; // eax@1
  CoinEditWin *v8; // eax@1
  MHDiceGameTask *v9; // edi@1
  __int64 v10; // kr00_8@6
  NiPointer<MHDiceGameTask> result; // [sp+Ch] [bp-50h]@1
  unsigned __int64 nCoin; // [sp+10h] [bp-4Ch]@2
  char pNumberString; // [sp+18h] [bp-44h]@6
  char dst; // [sp+19h] [bp-43h]@6

  v1 = this;
  this->m_pkTab01->m_bCheck = 0;
  this->m_pkTab02->m_bCheck = 1;
  v2 = this->m_pkText01->vfptr;
  v3 = TextData2::Get(0x3544492Bu);
  v2[118].__vecDelDtor((NiRefObject *)v1->m_pkText01, (unsigned int)v3);
  v4 = v1->m_pkText02->vfptr;
  v5 = TextData2::Get(0x828D8F7B);
  v4[118].__vecDelDtor((NiRefObject *)v1->m_pkText02, (unsigned int)v5);
  v6 = v1->m_pkBottomText->vfptr;
  v7 = TextData2::Get(0x2C2A4A36u);
  v6[118].__vecDelDtor((NiRefObject *)v1->m_pkBottomText, (unsigned int)v7);
  ((void (__stdcall *)(_DWORD))v1->m_pkGemText->vfptr[118].__vecDelDtor)(&unk_9C9203);
  ((void (__stdcall *)(_DWORD))v1->m_pkGoldText->vfptr[118].__vecDelDtor)(&unk_9C920A);
  ((void (__stdcall *)(_DWORD))v1->m_pkSilverText->vfptr[118].__vecDelDtor)(&unk_9C920B);
  ((void (__stdcall *)(_DWORD))v1->m_pkCopperText->vfptr[118].__vecDelDtor)(&unk_9C921D);
  v8 = v1->m_pkCoinEdit;
  LODWORD(v8->i64Money) = 0;
  HIDWORD(v8->i64Money) = 0;
  CoinEditWin::InputNumberDone(v1->m_pkCoinEdit);
  ((void (__stdcall *)(_DWORD))v1->m_pkExchangeBut->vfptr[60].__vecDelDtor)(0);
  v9 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  if ( result.m_pObject )
  {
    HIDWORD(nCoin) = result;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( HIDWORD(nCoin) )
        (**(void (__stdcall ***)(_DWORD))HIDWORD(nCoin))(1);
    }
  }
  if ( v9 )
  {
    v10 = User::Coin(&g_kUser);
    HIDWORD(nCoin) = HIDWORD(v10);
    pNumberString = 0;
    memset(&dst, 0, 0x3Fu);
    ConvertCommaNumber(v10, &pNumberString);
    ((void (__stdcall *)(_DWORD))v1->m_pkExchangeableCoinText->vfptr[118].__vecDelDtor)(&pNumberString);
  }
}

//----- (0070A7A0) --------------------------------------------------------
void __userpurge CoinExchangeWin::UpdateMeWin(CoinExchangeWin *this@<ecx>, int a2@<ebx>, int a3@<edi>, float fCurTime)
{
  CoinExchangeWin *v4; // esi@1
  const char *v5; // eax@2
  int v6; // ebx@2
  int v7; // edi@2
  __int64 v8; // kr00_8@2
  GBHouse *v9; // eax@3
  __int64 v10; // rax@4
  unsigned int v11; // ebx@4
  unsigned int v12; // edi@4
  GBHouse *v13; // ST24_4@4
  __int64 v14; // rax@4
  char *v15; // eax@4
  GBHouse *v16; // ST24_4@4
  __int64 v17; // rax@4
  char *v18; // eax@4
  GBHouse *v19; // ST24_4@4
  __int64 v20; // rax@4
  char *v21; // eax@4
  GBHouse *v22; // ST24_4@4
  __int64 v23; // rax@4
  GBHouse *v24; // eax@4
  GBHouse *v25; // eax@5
  __int64 v26; // rax@6
  unsigned int v27; // ebx@6
  unsigned int v28; // edi@6
  unsigned __int64 v29; // rax@6
  __int64 v30; // kr08_8@9
  GBHouse *v31; // ST24_4@9
  __int64 v32; // rax@9
  char *v33; // eax@9
  GBHouse *v34; // ST24_4@9
  __int64 v35; // rax@9
  char *v36; // eax@9
  GBHouse *v37; // ST24_4@9
  __int64 v38; // rax@9
  char *v39; // eax@9
  GBHouse *v40; // ST24_4@9
  __int64 v41; // rax@9
  int v42; // [sp-4h] [bp-14h]@2
  GBHouse *pkHouse; // [sp+Ch] [bp-4h]@5

  v4 = this;
  if ( !(unsigned __int8)((int (*)(void))this->m_pkCoinEdit->vfptr[122].__vecDelDtor)() )
    return;
  v42 = a2;
  v5 = (const char *)((int (__stdcall *)(int))v4->m_pkCoinEdit->vfptr[113].__vecDelDtor)(a3);
  v8 = _atoi64(v5);
  v7 = HIDWORD(v8);
  v6 = v8;
  if ( v4->m_pkTab01->m_bCheck )
  {
    v9 = GBHouseTab::GetByIndex(0);
    if ( v9 )
    {
      v10 = v9->GB_GameMoney * v8;
      v11 = HIDWORD(v10);
      v12 = v10;
      v13 = (GBHouse *)v4->m_pkGemText->vfptr;
      v14 = User::GetGem(v10);
      v15 = fs("%I64d", v14);
      (*(void (__thiscall **)(PgWinText *, char *, int))&v13[42].GB_ResetTimeSec)(v4->m_pkGemText, v15, v42);
      v16 = (GBHouse *)v4->m_pkGoldText->vfptr;
      v17 = User::GetGold(__PAIR__(v11, v12));
      v18 = fs("%I64d", v17);
      (*(void (__thiscall **)(PgWinText *, char *))&v16[42].GB_ResetTimeSec)(v4->m_pkGoldText, v18);
      v19 = (GBHouse *)v4->m_pkSilverText->vfptr;
      v20 = User::GetSilver(__PAIR__(v11, v12));
      v21 = fs("%I64d", v20);
      (*(void (__thiscall **)(PgWinText *, char *))&v19[42].GB_ResetTimeSec)(v4->m_pkSilverText, v21);
      v22 = (GBHouse *)v4->m_pkCopperText->vfptr;
      v23 = User::GetCopper(__PAIR__(v11, v12));
      fs("%I64d", v23);
      v24 = v22;
LABEL_10:
      (*(void (__thiscall **)(PgWinText *))&v24[42].GB_ResetTimeSec)(v4->m_pkCopperText);
      v7 = HIDWORD(v8);
      v6 = v8;
      goto LABEL_11;
    }
  }
  else
  {
    v25 = GBHouseTab::GetByIndex(0);
    pkHouse = v25;
    if ( v25 )
    {
      v26 = v25->GB_GameMoney * v8;
      v27 = HIDWORD(v26);
      v28 = v26;
      v29 = (unsigned __int64)pkHouse->GB_ExchangeTax * v26 / 0x3E8;
      if ( v27 | v28 && !v29 )
        v29 = 1i64;
      v30 = __PAIR__(v27, v28) - v29;
      v31 = (GBHouse *)v4->m_pkGemText->vfptr;
      v32 = User::GetGem(__PAIR__(v27, v28) - v29);
      v33 = fs("%I64d", v32);
      (*(void (__thiscall **)(PgWinText *, char *, int))&v31[42].GB_ResetTimeSec)(v4->m_pkGemText, v33, v42);
      v34 = (GBHouse *)v4->m_pkGoldText->vfptr;
      v35 = User::GetGold(v30);
      v36 = fs("%I64d", v35);
      (*(void (__thiscall **)(PgWinText *, char *))&v34[42].GB_ResetTimeSec)(v4->m_pkGoldText, v36);
      v37 = (GBHouse *)v4->m_pkSilverText->vfptr;
      v38 = User::GetSilver(v30);
      v39 = fs("%I64d", v38);
      (*(void (__thiscall **)(PgWinText *, char *))&v37[42].GB_ResetTimeSec)(v4->m_pkSilverText, v39);
      v40 = (GBHouse *)v4->m_pkCopperText->vfptr;
      v41 = User::GetCopper(v30);
      fs("%I64d", v41);
      v24 = v40;
      goto LABEL_10;
    }
  }
LABEL_11:
  if ( v7 || v6 )
    ((void (__cdecl *)(signed int))v4->m_pkExchangeBut->vfptr[60].__vecDelDtor)(1);
  else
    ((void (__thiscall *)(PgWinBut *))v4->m_pkExchangeBut->vfptr[60].__vecDelDtor)(v4->m_pkExchangeBut);
}
// 70A7A0: could not find valid save-restore pair for ebx

//----- (0070AA50) --------------------------------------------------------
char __thiscall GambleWin::Create(GambleWin *this, PgFrameWork *pkFrameWork)
{
  GambleWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // ebx@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  NiSourceTexture *v10; // eax@15
  PgSprData *v11; // eax@16
  PgWinSpr *v12; // eax@18
  D3DXCOLOR v13; // ST1C_16@18
  char *v14; // eax@18
  PgWinText *v15; // eax@18
  D3DXCOLOR v16; // ST1C_16@18
  char *v17; // eax@18
  PgWinText *v18; // edi@18
  NiRefObjectVtbl *v19; // ebx@18
  PgFont *v20; // eax@18
  D3DXCOLOR v21; // ST1C_16@18
  char *v22; // eax@18
  PgWinText *v23; // eax@18
  D3DXCOLOR v24; // ST1C_16@18
  char *v25; // eax@18
  PgWinText *v26; // eax@18
  D3DXCOLOR v27; // ST1C_16@18
  PgWinText *v28; // eax@18
  D3DXCOLOR v29; // ST1C_16@18
  PgWinText *v30; // eax@18
  D3DXCOLOR v31; // ST14_16@18
  PgWinAbbreviateText *v32; // eax@18
  D3DXCOLOR v33; // ST14_16@18
  PgWinAbbreviateText *v34; // eax@18
  NiNode *v35; // esi@19
  UIUtil ui; // [sp+40h] [bp-2Ch]@18
  int uiLeft; // [sp+54h] [bp-18h]@11
  int uiTop; // [sp+58h] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+5Ch] [bp-10h]@1
  int v40; // [sp+68h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v40 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v40 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "Game\\GB_MoneyInfoMax.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "GambleWin", 0) )
  {
    v4 = spNode.m_pObject;
    v40 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
    goto LABEL_5;
  }
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft, uiTop, v11, (PgWin *)&v2->vfptr, 0, 0);
  UIUtil::UIUtil(&ui);
  LOBYTE(v40) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, 0, 0);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v12 = UIUtil::CreateSpr(&ui, "Panel01", 0);
  v12->vfptr[60].__vecDelDtor((NiRefObject *)v12, 0);
  UIUtil::CreateBtn(&ui, 1u, "ClsNor", "ClsClick", "ClsOver", 0, 0);
  v2->m_pkLeaveBtn = UIUtil::CreateBtn(&ui, 0, "BtnNor", "BtnClick", "BtnOver", 0, 0);
  *(_QWORD *)&v13.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v13.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v14 = (char *)TextData2::Get(0x31525197u);
  v15 = UIUtil::CreateAttachedText((PgWin *)&v2->m_pkLeaveBtn->vfptr, v14, v13, 5u);
  v15->vfptr[60].__vecDelDtor((NiRefObject *)v15, 0);
  *(_QWORD *)&v16.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v16.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v17 = (char *)TextData2::Get(0x2B548F7Fu);
  v18 = UIUtil::CreateTextNoSpr(&ui, "WinTitle", v17, v16, 5u);
  v18->vfptr[60].__vecDelDtor((NiRefObject *)v18, 0);
  v19 = v18->vfptr;
  v20 = Font::Get(MAIN_MENU);
  v19[113].__vecDelDtor((NiRefObject *)v18, (unsigned int)v20);
  *(_QWORD *)&v21.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v21.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v22 = (char *)TextData2::Get(0x3544492Bu);
  v23 = UIUtil::CreateTextNoSpr(&ui, "Text01", v22, v21, 5u);
  v23->vfptr[60].__vecDelDtor((NiRefObject *)v23, 0);
  *(_QWORD *)&v24.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v24.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v25 = (char *)TextData2::Get(0xC2BD3C17);
  v26 = UIUtil::CreateTextNoSpr(&ui, "Text02", v25, v24, 5u);
  v26->vfptr[60].__vecDelDtor((NiRefObject *)v26, 0);
  *(_QWORD *)&v27.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v27.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v28 = UIUtil::CreateTextNoSpr(&ui, "TextCoin01", "Coin", v27, 5u);
  v28->vfptr[60].__vecDelDtor((NiRefObject *)v28, 0);
  *(_QWORD *)&v29.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v29.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v30 = UIUtil::CreateTextNoSpr(&ui, "TextCoin02", "Coin", v29, 5u);
  v30->vfptr[60].__vecDelDtor((NiRefObject *)v30, 0);
  *(_QWORD *)&v31.r = *(_QWORD *)&Color::m_kDxBlueColor.r;
  *(_QWORD *)&v31.b = qword_A695F8;
  v32 = UIUtil::CreateText(&ui, "Text03", "000,000,000", 0, v31, 5u, 0, 0);
  v2->m_pkMyCoinText = (PgWinText *)v32;
  v32->vfptr[60].__vecDelDtor((NiRefObject *)v32, 0);
  *(_QWORD *)&v33.r = *(_QWORD *)&Color::m_kDxBlueColor.r;
  *(_QWORD *)&v33.b = qword_A695F8;
  v34 = UIUtil::CreateText(&ui, "Text04", "000,000,000", 0, v33, 5u, 0, 0);
  v2->m_pkAbleCoinText = (PgWinText *)v34;
  v34->vfptr[60].__vecDelDtor((NiRefObject *)v34, 0);
  PgWin::InitPosRightTop((PgWin *)&v2->vfptr, PgWin::ms_uiScreenWidth, PgWin::ms_uiScreenHeight, 1.0, 0.30000001);
  LOBYTE(v40) = 0;
  UIUtil::~UIUtil(&ui);
  v40 = -1;
  if ( spNode.m_pObject )
  {
    v35 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v35 )
        v35->vfptr->__vecDelDtor((NiRefObject *)v35, 1u);
    }
  }
  return 1;
}
// A695F0: using guessed type struct D3DXCOLOR Color::m_kDxBlueColor;
// A695F8: using guessed type __int64 qword_A695F8;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0070AF60) --------------------------------------------------------
void __thiscall GambleWin::OnShowWin(GambleWin *this)
{
  GambleWin *v1; // esi@1

  v1 = this;
  GambleWin::ChangeCoin(this);
  PgWin::OnShowWin((PgWin *)&v1->vfptr);
}

//----- (0070AF70) --------------------------------------------------------
char __thiscall GambleMiniWin::Create(GambleMiniWin *this, PgFrameWork *pkFrameWork)
{
  GambleMiniWin *v2; // edi@1
  NiTexturePalette *v3; // esi@1
  const char *v4; // eax@3
  NiNode *v5; // eax@3
  NiNode *v6; // esi@7
  char result; // al@10
  PgSprData *v8; // esi@11
  PgWinBut *v9; // esi@11
  char *v10; // eax@11
  NiNode *v11; // esi@12
  int iLeft; // [sp+14h] [bp-18h]@11
  int iTop; // [sp+18h] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+1Ch] [bp-10h]@1
  int v15; // [sp+28h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v15 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\GB_MoneyInfoMin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = spNode.m_pObject;
  if ( spNode.m_pObject )
  {
    v2->m_pkFrameWork = pkFrameWork;
    v8 = PgSprData::Create((NiAVObject *)&v5->vfptr, "MinimumNor", &iLeft, &iTop, 0);
    PgSprData::Add(v8, (NiAVObject *)&spNode.m_pObject->vfptr, "MinimumClick");
    PgSprData::Add(v8, (NiAVObject *)&spNode.m_pObject->vfptr, "MinimumOver");
    v9 = PgWinBut::CreateWin(0, 0, v8, (PgWin *)&v2->vfptr, 0, 0, 0);
    v9->m_pkToolTipWin = g_pkToolTipWin;
    v10 = (char *)TextData2::Get(0xD7F9364E);
    PgWin::SetToolTipWinText((PgWin *)&v9->vfptr, v10);
    PgWin::InitPosRightTop(
      (PgWin *)&v2->vfptr,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.98000002,
      0.30000001);
    v15 = -1;
    if ( spNode.m_pObject )
    {
      v11 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v11 )
          v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
      }
    }
    result = 1;
  }
  else
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("Game\\GB_MoneyInfoMin.nif load fail", "LoadFail", spNode.m_pObject);
      v5 = spNode.m_pObject;
    }
    v15 = -1;
    if ( v5 )
    {
      v6 = v5;
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    result = 0;
  }
  return result;
}
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0070B120) --------------------------------------------------------
char __thiscall GambleHouseCardWin::Create(GambleHouseCardWin *this, PgFrameWork *pkFrameWork)
{
  GambleHouseCardWin *v2; // esi@1
  NiSourceTexture *v3; // edi@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // ebx@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  NiSourceTexture *v10; // eax@15
  PgSprData *v11; // eax@16
  PgWinSpr *v12; // eax@18
  D3DXCOLOR v13; // ST18_16@18
  char *v14; // eax@18
  PgWinText *v15; // edi@18
  NiRefObjectVtbl *v16; // ebx@18
  PgFont *v17; // eax@18
  D3DXCOLOR v18; // ST18_16@18
  char *v19; // eax@18
  PgWinText *v20; // eax@18
  D3DXCOLOR v21; // ST18_16@18
  char *v22; // eax@18
  PgWinText *v23; // eax@18
  D3DXCOLOR v24; // ST18_16@18
  char *v25; // eax@18
  PgWinText *v26; // eax@18
  D3DXCOLOR v27; // ST18_16@18
  char *v28; // eax@18
  PgWinText *v29; // eax@18
  D3DXCOLOR v30; // ST10_16@18
  PgWinAbbreviateText *v31; // eax@18
  D3DXCOLOR v32; // ST10_16@18
  PgWinAbbreviateText *v33; // eax@18
  NiNode *v34; // esi@19
  UIUtil ui; // [sp+3Ch] [bp-2Ch]@18
  int uiLeft; // [sp+50h] [bp-18h]@11
  int uiTop; // [sp+54h] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+58h] [bp-10h]@1
  int v39; // [sp+64h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v39 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v39 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "Game\\GB_MoneyCard.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "GambleHouseCardWin", 0) )
  {
    v4 = spNode.m_pObject;
    v39 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
    goto LABEL_5;
  }
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft, uiTop, v11, (PgWin *)&v2->vfptr, 0, 0);
  UIUtil::UIUtil(&ui);
  LOBYTE(v39) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, 0, 0);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v12 = UIUtil::CreateSpr(&ui, "Panel01", 0);
  v12->vfptr[60].__vecDelDtor((NiRefObject *)v12, 0);
  UIUtil::CreateBtn(&ui, 0, "ClsNor", "ClsClick", "ClsOver", 0, 0);
  *(_QWORD *)&v13.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v13.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v14 = (char *)TextData2::Get(0xD1F84B38);
  v15 = UIUtil::CreateTextNoSpr(&ui, "WinTitle", v14, v13, 5u);
  v15->vfptr[60].__vecDelDtor((NiRefObject *)v15, 0);
  v16 = v15->vfptr;
  v17 = Font::Get(MAIN_MENU);
  v16[113].__vecDelDtor((NiRefObject *)v15, (unsigned int)v17);
  *(_QWORD *)&v18.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v18.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v19 = (char *)TextData2::Get(0x3544492Bu);
  v20 = UIUtil::CreateTextNoSpr(&ui, "Text01", v19, v18, 5u);
  v20->vfptr[60].__vecDelDtor((NiRefObject *)v20, 0);
  *(_QWORD *)&v21.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v21.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v22 = (char *)TextData2::Get(0xC2BD3C17);
  v23 = UIUtil::CreateTextNoSpr(&ui, "Text02", v22, v21, 5u);
  v23->vfptr[60].__vecDelDtor((NiRefObject *)v23, 0);
  *(_QWORD *)&v24.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v24.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v25 = (char *)TextData2::Get(0x96A2F6DF);
  v26 = UIUtil::CreateTextNoSpr(&ui, "TextCoin01", v25, v24, 5u);
  v26->vfptr[60].__vecDelDtor((NiRefObject *)v26, 0);
  *(_QWORD *)&v27.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v27.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v28 = (char *)TextData2::Get(0x96A2F6DF);
  v29 = UIUtil::CreateTextNoSpr(&ui, "TextCoin02", v28, v27, 5u);
  v29->vfptr[60].__vecDelDtor((NiRefObject *)v29, 0);
  *(_QWORD *)&v30.r = *(_QWORD *)&Color::m_kDxBlueColor.r;
  *(_QWORD *)&v30.b = qword_A695F8;
  v31 = UIUtil::CreateText(&ui, "Text03", "000,000,000", 0, v30, 5u, 0, 0);
  v2->m_pkMyCoinText = (PgWinText *)v31;
  v31->vfptr[60].__vecDelDtor((NiRefObject *)v31, 0);
  *(_QWORD *)&v32.r = *(_QWORD *)&Color::m_kDxBlueColor.r;
  *(_QWORD *)&v32.b = qword_A695F8;
  v33 = UIUtil::CreateText(&ui, "Text04", "000,000,000", 0, v32, 5u, 0, 0);
  v2->m_pkAbleCoinText = (PgWinText *)v33;
  v33->vfptr[60].__vecDelDtor((NiRefObject *)v33, 0);
  ((void (__thiscall *)(GambleHouseCardWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  LOBYTE(v39) = 0;
  UIUtil::~UIUtil(&ui);
  v39 = -1;
  if ( spNode.m_pObject )
  {
    v34 = spNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v34 )
        v34->vfptr->__vecDelDtor((NiRefObject *)v34, 1u);
    }
  }
  return 1;
}
// A695F0: using guessed type struct D3DXCOLOR Color::m_kDxBlueColor;
// A695F8: using guessed type __int64 qword_A695F8;
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0070B5D0) --------------------------------------------------------
void __thiscall GambleHouseCardWin::OnShowWin(GambleHouseCardWin *this)
{
  GambleHouseCardWin *v1; // esi@1

  v1 = this;
  GambleHouseCardWin::ChangeCoin(this);
  PgWin::OnShowWin((PgWin *)&v1->vfptr);
}

//----- (0070B5E0) --------------------------------------------------------
char __thiscall CoinEditWin::Create(CoinEditWin *this, int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, EditWin::Type eType, unsigned int uiLimitTextLen, unsigned int uiStopFlag, bool bClearTextOnEnd, Font::Type eFontType, bool bForceFocusWhenClick)
{
  CoinEditWin *v12; // esi@1
  PgFont *v13; // eax@1
  PgFont *v14; // edi@1
  PgFont *v15; // ebx@1
  char result; // al@9
  unsigned int v17; // edi@11
  PgEditWin *v18; // eax@12
  PgFont *v19; // eax@14
  bool v20; // zf@14
  PgWinEditText **v21; // edi@14
  NiD3DDefaultShader *v22; // eax@15
  NiD3DDefaultShader *v23; // eax@16
  NiScreenElementsData *v24; // edi@20
  PgWin *v25; // eax@20
  NiScreenElements *v26; // ebx@20
  NiScreenElements *v27; // eax@21
  NiScreenElements *v28; // edi@22
  PgWin *v29; // eax@29
  int v30; // eax@30
  float v31; // ecx@32
  NiAVObject *v32; // ecx@32
  PgWin *v33; // eax@32
  PgWin *v34; // edi@32
  NiProperty *v35; // eax@33
  NiAVObject *v36; // ecx@35
  NiScreenElements *v37; // eax@35
  float v38; // edx@35
  float v39; // ecx@35
  float v40; // edx@35
  PgFont *v41; // eax@35
  PgWinText *v42; // eax@35
  tagSIZE kSize; // [sp+2Ch] [bp-50h]@20
  float v44; // [sp+34h] [bp-48h]@32
  float v45; // [sp+38h] [bp-44h]@32
  float v46; // [sp+3Ch] [bp-40h]@32
  bool v47[4]; // [sp+40h] [bp-3Ch]@1
  unsigned int uiStyle; // [sp+44h] [bp-38h]@1
  int iLimitLength; // [sp+48h] [bp-34h]@1
  unsigned int v50; // [sp+4Ch] [bp-30h]@1
  PgWin *v51; // [sp+50h] [bp-2Ch]@1
  unsigned int v52; // [sp+54h] [bp-28h]@1
  unsigned int v53; // [sp+58h] [bp-24h]@1
  tagRECT kRect; // [sp+5Ch] [bp-20h]@11
  int v55; // [sp+78h] [bp-4h]@20

  v53 = uiWidth;
  uiStyle = eType;
  v12 = this;
  v47[0] = bClearTextOnEnd;
  v52 = uiHeight;
  v51 = pkParent;
  iLimitLength = uiLimitTextLen;
  v50 = uiStopFlag;
  v13 = Font::Get(eFontType);
  v14 = v12->m_spFont.m_pObject;
  v15 = v13;
  if ( v14 != v13 )
  {
    if ( v14 && !InterlockedDecrement((volatile LONG *)&v14->m_uiRefCount) && v14 )
      v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
    v12->m_spFont.m_pObject = v15;
    if ( v15 )
      InterlockedIncrement((volatile LONG *)&v15->m_uiRefCount);
  }
  if ( v12->m_spFont.m_pObject && PgWin::Create((PgWin *)&v12->vfptr, iXPos, iYPos, v53, v52, v51, 0, 0) )
  {
    kRect.top = iYPos;
    v17 = uiStyle;
    kRect.left = iXPos;
    kRect.right = iXPos + v53;
    kRect.bottom = iYPos + v52;
    if ( uiStyle == 1342181380 )
      v18 = PgEditWin::CreateWin(
              g_hMainInstance,
              g_hMainWnd,
              uiStyle,
              v50,
              iLimitLength,
              v47[0],
              &kRect,
              v12->m_spFont.m_pObject->m_hFont);
    else
      v18 = PgEditWin::CreateWin(g_hMainInstance, g_hMainWnd, uiStyle, v50, iLimitLength, v47[0], 0, 0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v12->m_spEditWin, (NiD3DDefaultShader *)v18);
    EditWin::SetFont((EditWin *)&v12->vfptr);
    v19 = v12->m_spFont.m_pObject;
    v12->m_eType = uiStyle;
    v20 = v17 == 1342177312;
    v21 = &v12->m_spTextWin.m_pObject;
    if ( v20 )
    {
      v22 = (NiD3DDefaultShader *)PgWinPasswdText::CreateWin(0, 0, v53, v52, v19, (PgWin *)&v12->vfptr, 0, 0);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v12->m_spTextWin, v22);
    }
    else
    {
      v23 = (NiD3DDefaultShader *)PgWinEditText::CreateWin(0, 0, v53, v52, v19, (PgWin *)&v12->vfptr, 0, 0);
      NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v12->m_spTextWin, v23);
      if ( uiStyle == 1342181380 )
      {
        (*v21)->m_spTextGeom.m_pObject->m_bAutoWordWrap = 1;
        PgWinEditText::SetAutoAlign(*v21, 0);
      }
    }
    ((void (__stdcall *)(PgWinEditText *))v12->m_spEditWin.m_pObject->vfptr[22].__vecDelDtor)(*v21);
    v12->m_bForceFocusWhenClick = bForceFocusWhenClick;
    if ( bForceFocusWhenClick )
      PgWinBut::CreateWin(0, 0, v53, v52, (PgWin *)&v12->vfptr, 0, 0, 0);
    SelectObject(v12->m_spFont.m_pObject->m_kFontRenderStuff.hDC, v12->m_spFont.m_pObject->m_hFont);
    PgFont::GetTextSize(v12->m_spFont.m_pObject, (char *)&off_9C91BE + 2, 1, &kSize);
    v24 = PgUtil::CreateScreenGeometryData(2u, kSize.cy + 2);
    v25 = (PgWin *)operator new(0xC4u);
    v51 = v25;
    v26 = 0;
    v55 = 0;
    if ( v25 )
    {
      NiScreenElements::NiScreenElements((NiScreenElements *)v25, v24);
      v26 = v27;
    }
    v28 = v12->m_spCaret.m_pObject;
    v55 = -1;
    if ( v28 != v26 )
    {
      if ( v28 && !InterlockedDecrement((volatile LONG *)&v28->m_uiRefCount) && v28 )
        v28->vfptr->__vecDelDtor((NiRefObject *)v28, 1u);
      v12->m_spCaret.m_pObject = v26;
      if ( v26 )
        InterlockedIncrement((volatile LONG *)&v26->m_uiRefCount);
    }
    v29 = (PgWin *)operator new(0x60u);
    v51 = v29;
    v55 = 1;
    if ( v29 )
      NiMaterialProperty::NiMaterialProperty((NiMaterialProperty *)v29);
    else
      v30 = 0;
    ++*(_DWORD *)(v30 + 88);
    v44 = 1.0;
    v45 = 1.0;
    v46 = 1.0;
    *(float *)(v30 + 68) = 1.0;
    v31 = v46;
    *(float *)(v30 + 72) = 1.0;
    *(float *)(v30 + 76) = v31;
    v32 = (NiAVObject *)&v12->m_spCaret.m_pObject->vfptr;
    v55 = -1;
    NiAVObject::AttachProperty(v32, (NiProperty *)v30);
    v33 = (PgWin *)operator new(0x28u);
    v34 = v33;
    v51 = v33;
    v55 = 2;
    if ( v33 )
    {
      NiObjectNET::NiObjectNET((NiObjectNET *)&v33->vfptr);
      v34->vfptr = (NiRefObjectVtbl *)&NiVertexColorProperty::`vftable';
      v34->m_uFlags = 0;
      v34->m_pkParent = 0;
      LODWORD(v34->m_kWorldBound.m_kCenter.x) = 1;
      v35 = (NiProperty *)v34;
    }
    else
    {
      v35 = 0;
    }
    v35[1].m_uiRefCount = 0;
    v35[1].m_pcName = 0;
    v36 = (NiAVObject *)&v12->m_spCaret.m_pObject->vfptr;
    v55 = -1;
    NiAVObject::AttachProperty(v36, v35);
    v37 = v12->m_spCaret.m_pObject;
    v38 = v37->m_kLocal.m_Translate.y;
    v39 = v37->m_kLocal.m_Translate.x;
    v45 = -2.0;
    v40 = v37->m_kLocal.m_Translate.z;
    v37->m_kLocal.m_Translate.x = v39;
    v37->m_kLocal.m_Translate.y = v45;
    v37->m_kLocal.m_Translate.z = v40;
    ((void (__thiscall *)(CoinEditWin *, NiScreenElements *, _DWORD))v12->vfptr[29].__vecDelDtor)(
      v12,
      v12->m_spCaret.m_pObject,
      0);
    NiAVObject::UpdateProperties((NiAVObject *)&v12->vfptr);
    NiAVObject::Update((NiAVObject *)&v12->vfptr, 0.0, 0);
    v41 = Font::Get(MAIN_MENU);
    v42 = PgWinText::CreateWin(-2, -3, v53, v52, v41, (PgWin *)&v12->vfptr, 0, 0);
    v12->m_pkMoneyText = v42;
    v42->vfptr[122].__vecDelDtor((NiRefObject *)v42, 5u);
    ((void (__stdcall *)(void *))v12->m_pkMoneyText->vfptr[118].__vecDelDtor)(&unk_9C91A7);
    ((void (__stdcall *)(_DWORD))v12->m_pkMoneyText->vfptr[64].__vecDelDtor)(0);
    ((void (__stdcall *)(_DWORD))v12->m_pkMoneyText->vfptr[60].__vecDelDtor)(0);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 97042C: using guessed type int (__thiscall *NiVertexColorProperty::`vftable')(void *p, char);
// 9C91BE: using guessed type void *off_9C91BE;

//----- (0070BA20) --------------------------------------------------------
void __thiscall CoinExchangeWin::OnCommand(CoinExchangeWin *this, unsigned int wParam, int lParam)
{
  switch ( wParam )
  {
    case 0u:
      CoinExchangeWin::OnTAB2(this);
      break;
    case 1u:
      CoinExchangeWin::OnTAB1(this);
      break;
    case 2u:
      PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
      break;
    case 4u:
      CoinExchangeWin::OnExchange(this);
      break;
    default:
      return;
  }
}

//----- (0070BA80) --------------------------------------------------------
CoinEditWin *__cdecl CoinEditWin::CreateWin(int iXPos, int iYPos, unsigned int uiWidth, unsigned int uiHeight, PgWin *pkParent, EditWin::Type eType, unsigned int uiLimitTextLen, unsigned int uiStopFlag, int bClearTextOnEnd, Font::Type eFontType, int bForceFocusWhenClick)
{
  PgWin *v11; // eax@1
  PgWin *v12; // esi@1
  PgWin *v13; // edi@8
  CoinEditWin *v14; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v16; // [sp+20h] [bp-4h]@1

  v11 = (PgWin *)operator new(0x158u);
  v12 = v11;
  result.m_pObject = v11;
  v16 = 0;
  if ( v11 )
  {
    EditWin::EditWin((EditWin *)v11);
    v12->vfptr = (NiRefObjectVtbl *)&CoinEditWin::`vftable'{for `NiNode'};
    v12->vfptr = (IDirectMessengerVtbl *)&CoinEditWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v12[1].m_kWorldBound.m_kCenter.y) = 0;
    LODWORD(v12[1].m_kWorldBound.m_kCenter.z) = 0;
    LODWORD(v12[1].m_kWorldBound.m_fRadius) = 0;
  }
  else
  {
    v12 = 0;
  }
  if ( v12 )
    InterlockedIncrement((volatile LONG *)&v12->m_uiRefCount);
  v16 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v12);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, unsigned int, unsigned int, PgWin *, EditWin::Type, unsigned int, unsigned int, int, Font::Type, int))v12->vfptr[123].__vecDelDtor)(
                          v12,
                          iXPos,
                          iYPos,
                          uiWidth,
                          uiHeight,
                          pkParent,
                          eType,
                          uiLimitTextLen,
                          uiStopFlag,
                          bClearTextOnEnd,
                          eFontType,
                          bForceFocusWhenClick) )
  {
    ((void (__thiscall *)(PgWin *))v12->vfptr[89].__vecDelDtor)(v12);
    v16 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) )
      v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
    v14 = (CoinEditWin *)v12;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v12);
    if ( result.m_pObject )
    {
      v13 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v13 )
          v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
      }
    }
    v16 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) )
      v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
    v14 = 0;
  }
  return v14;
}
// 9C9614: using guessed type void (__thiscall *CoinEditWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C9634: using guessed type int (__thiscall *CoinEditWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0070BC00) --------------------------------------------------------
CoinExchangeWin *__cdecl CoinExchangeWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  CoinExchangeWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x1A8u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    CoinExchangeWin::CoinExchangeWin((CoinExchangeWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (CoinExchangeWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (0070BD30) --------------------------------------------------------
char __thiscall CoinExchangeWin::Create(CoinExchangeWin *this, PgFrameWork *pkFrameWork)
{
  CoinExchangeWin *v2; // esi@1
  NiSourceTexture *v3; // ebx@1
  NiNode *v4; // esi@2
  bool v5; // zf@4
  NiTexturePalette *v7; // edi@8
  const char *v8; // eax@10
  PgSprData *v9; // eax@11
  NiSourceTexture *v10; // eax@15
  PgSprData *v11; // eax@16
  PgWinSpr *v12; // eax@18
  D3DXCOLOR v13; // ST48_16@18
  char *v14; // eax@18
  PgWinText *v15; // edi@18
  PgFont *v16; // eax@18
  PgSprData *v17; // edi@18
  NiPointer<PgSprData::PgHitTester> *v18; // ecx@18
  unsigned int v19; // edi@18
  PgFont *v20; // eax@18
  PgWinText *v21; // eax@18
  NiRefObjectVtbl *v22; // edi@18
  NiUnsharedGeometryGroup *v23; // eax@18
  PgSprData *v24; // edi@18
  PgSprData::PgHitTester *v25; // eax@18
  unsigned int v26; // edi@18
  PgFont *v27; // eax@18
  PgWinText *v28; // eax@18
  NiRefObjectVtbl *v29; // edi@18
  NiUnsharedGeometryGroup *v30; // eax@18
  D3DXCOLOR v31; // ST48_16@18
  char *v32; // eax@18
  PgWinText *v33; // eax@18
  D3DXCOLOR v34; // ST48_16@18
  char *v35; // eax@18
  PgWinText *v36; // eax@18
  D3DXCOLOR v37; // ST48_16@18
  char *v38; // eax@18
  PgWinText *v39; // eax@18
  D3DXCOLOR v40; // ST48_16@18
  PgWinText *v41; // eax@18
  D3DXCOLOR v42; // ST48_16@18
  PgWinText *v43; // eax@18
  D3DXCOLOR v44; // ST40_16@18
  PgWinAbbreviateText *v45; // eax@18
  NiRefObjectVtbl *v46; // edi@18
  PgFont *v47; // eax@18
  D3DXCOLOR v48; // ST48_16@18
  char *v49; // eax@18
  PgWinText *v50; // eax@18
  NiRefObjectVtbl *v51; // edi@18
  PgFont *v52; // eax@18
  PgWinBut *v53; // eax@18
  D3DXCOLOR v54; // ST48_16@18
  char *v55; // eax@18
  PgWinText *v56; // eax@18
  D3DXCOLOR v57; // ST40_16@18
  D3DXCOLOR v58; // ST40_16@18
  D3DXCOLOR v59; // ST40_16@18
  D3DXCOLOR v60; // ST40_16@18
  PgSprData *v61; // eax@18
  NiNode *v62; // esi@20
  UIUtil ui; // [sp+6Ch] [bp-34h]@18
  unsigned int uiWidth; // [sp+80h] [bp-20h]@18
  unsigned int uiHeight; // [sp+84h] [bp-1Ch]@18
  int uiLeft; // [sp+88h] [bp-18h]@11
  int uiTop; // [sp+8Ch] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+90h] [bp-10h]@1
  int v69; // [sp+9Ch] [bp-4h]@1
  NiRefObjectVtbl *bResult; // [sp+A8h] [bp+8h]@18
  unsigned int bResulta; // [sp+A8h] [bp+8h]@18
  unsigned int bResultb; // [sp+A8h] [bp+8h]@18

  v2 = this;
  spNode.m_pObject = 0;
  v69 = 0;
  v3 = MenuTexMgr::GetTexture(4u);
  if ( !v3 )
  {
    v4 = spNode.m_pObject;
    v69 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = spNode.m_pObject == 0;
LABEL_5:
    if ( !v5 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    return 0;
  }
  v7 = pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v8 = Folder::Merge(&Folder::m_acMenu, "Game\\GB_ChangeCoin.nif");
  PgUtil::LoadNodeNifFile(v8, &spNode, v7);
  if ( !spNode.m_pObject )
    return 0;
  v9 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v3);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v9, 0, pkFrameWork, "CoinExchangeWin", 0) )
  {
    v4 = spNode.m_pObject;
    v69 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v5 = v4 == 0;
    goto LABEL_5;
  }
  v10 = MenuTexMgr::GetTexture(0x13u);
  if ( v10 )
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v10);
  else
    v11 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft, uiTop, v11, (PgWin *)&v2->vfptr, 0, 0);
  UIUtil::UIUtil(&ui);
  LOBYTE(v69) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, 0, 0);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v12 = UIUtil::CreateSpr(&ui, "Panel01", 0);
  v12->vfptr[60].__vecDelDtor((NiRefObject *)v12, 0);
  *(_QWORD *)&v13.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v13.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v14 = (char *)TextData2::Get(0x2C497E6Eu);
  v15 = UIUtil::CreateTextNoSpr(&ui, "WinTitle", v14, v13, 5u);
  bResult = v15->vfptr;
  v16 = Font::Get(MAIN_MENU);
  bResult[113].__vecDelDtor((NiRefObject *)v15, (unsigned int)v16);
  v15->vfptr[60].__vecDelDtor((NiRefObject *)v15, 0);
  v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CoinChangeOff", &uiLeft, &uiTop, v3);
  PgSprData::Add(v17, (NiAVObject *)&spNode.m_pObject->vfptr, "CoinChangeOn");
  v2->m_pkTab01 = ColumnBut::CreateWin(uiLeft, uiTop, v17, (PgWin *)&v2->vfptr, 1u, 0);
  v18 = v17->m_akHitTester.m_pBase;
  v19 = v18->m_pObject->m_uiHeight;
  bResulta = v18->m_pObject->m_uiWidth;
  v20 = Font::Get(MAIN_MENU);
  v21 = PgWinText::CreateWin(uiLeft, uiTop, bResulta, v19, v20, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkTabText1 = v21;
  v21->vfptr[122].__vecDelDtor((NiRefObject *)v21, 5u);
  v22 = v2->m_pkTabText1->vfptr;
  v23 = TextData2::Get(0x1D383984u);
  v22[118].__vecDelDtor((NiRefObject *)v2->m_pkTabText1, (unsigned int)v23);
  ((void (__stdcall *)(_DWORD))v2->m_pkTabText1->vfptr[60].__vecDelDtor)(0);
  v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MoneyChangeOff", &uiLeft, &uiTop, v3);
  PgSprData::Add(v24, (NiAVObject *)&spNode.m_pObject->vfptr, "MoneyChangeOn");
  v2->m_pkTab02 = ColumnBut::CreateWin(uiLeft, uiTop, v24, (PgWin *)&v2->vfptr, 0, 0);
  v25 = v24->m_akHitTester.m_pBase->m_pObject;
  v26 = v25->m_uiHeight;
  bResultb = v25->m_uiWidth;
  v27 = Font::Get(MAIN_MENU);
  v28 = PgWinText::CreateWin(uiLeft, uiTop, bResultb, v26, v27, (PgWin *)&v2->vfptr, 0, 0);
  v2->m_pkTabText2 = v28;
  v28->vfptr[122].__vecDelDtor((NiRefObject *)v28, 5u);
  v29 = v2->m_pkTabText2->vfptr;
  v30 = TextData2::Get(0x70D0E1C9u);
  v29[118].__vecDelDtor((NiRefObject *)v2->m_pkTabText2, (unsigned int)v30);
  ((void (__stdcall *)(_DWORD))v2->m_pkTabText2->vfptr[60].__vecDelDtor)(0);
  *(_QWORD *)&v31.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v31.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v32 = (char *)TextData2::Get(0xC2BD3C17);
  v33 = UIUtil::CreateTextNoSpr(&ui, "Text01", v32, v31, 5u);
  v2->m_pkText01 = v33;
  v33->vfptr[60].__vecDelDtor((NiRefObject *)v33, 0);
  *(_QWORD *)&v34.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v34.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v35 = (char *)TextData2::Get(0x204F376Cu);
  v36 = UIUtil::CreateTextNoSpr(&ui, "Text02", v35, v34, 5u);
  v36->vfptr[60].__vecDelDtor((NiRefObject *)v36, 0);
  *(_QWORD *)&v37.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v37.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v38 = (char *)TextData2::Get(0x40603B82u);
  v39 = UIUtil::CreateTextNoSpr(&ui, "Text03", v38, v37, 5u);
  v2->m_pkText02 = v39;
  v39->vfptr[60].__vecDelDtor((NiRefObject *)v39, 0);
  *(_QWORD *)&v40.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v40.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v41 = UIUtil::CreateTextNoSpr(&ui, "TextCoin01", "Coin", v40, 5u);
  v41->vfptr[60].__vecDelDtor((NiRefObject *)v41, 0);
  *(_QWORD *)&v42.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v42.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v43 = UIUtil::CreateTextNoSpr(&ui, "TextCoin02", "Coin", v42, 5u);
  v43->vfptr[60].__vecDelDtor((NiRefObject *)v43, 0);
  *(_QWORD *)&v44.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v44.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v45 = UIUtil::CreateText(&ui, "Text04", "000,000,000,000", 0, v44, 5u, 0, 0);
  v2->m_pkExchangeableCoinText = (PgWinText *)v45;
  v45->vfptr[60].__vecDelDtor((NiRefObject *)v45, 0);
  v46 = v2->m_pkExchangeableCoinText->vfptr;
  v47 = Font::Get(MAIN_MENU);
  v46[113].__vecDelDtor((NiRefObject *)v2->m_pkExchangeableCoinText, (unsigned int)v47);
  ((void (__stdcall *)(signed int))v2->m_pkExchangeableCoinText->vfptr[122].__vecDelDtor)(5);
  *(_QWORD *)&v48.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v48.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v49 = (char *)TextData2::Get(0xCB54363B);
  v50 = UIUtil::CreateTextNoSpr(&ui, "Text06", v49, v48, 5u);
  v2->m_pkBottomText = v50;
  v51 = v50->vfptr;
  v52 = Font::Get(MAIN_MENU);
  v51[113].__vecDelDtor((NiRefObject *)v2->m_pkBottomText, (unsigned int)v52);
  ((void (__stdcall *)(_DWORD))v2->m_pkBottomText->vfptr[60].__vecDelDtor)(0);
  v53 = UIUtil::CreateBtn(&ui, 4u, "ChangeBtnNor", "ChangeBtnClick", "ChangeBtnOver", "ChangeBtnOff", 0);
  v2->m_pkExchangeBut = v53;
  v53->vfptr[60].__vecDelDtor((NiRefObject *)v53, 0);
  *(_QWORD *)&v54.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v54.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v55 = (char *)TextData::Get(0xA7F8ECE9);
  v56 = UIUtil::CreateAttachedText((PgWin *)&v2->m_pkExchangeBut->vfptr, v55, v54, 5u);
  v56->vfptr[60].__vecDelDtor((NiRefObject *)v56, 0);
  UIUtil::CreateBtn(&ui, 2u, "ClsNor", "ClsClick", "ClsOver", 0, 0);
  *(_QWORD *)&v57.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v57.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v2->m_pkCopperText = (PgWinText *)UIUtil::CreateText(&ui, "CopperInput", "0", 0, v57, 5u, 0, 0);
  *(_QWORD *)&v58.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v58.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v2->m_pkSilverText = (PgWinText *)UIUtil::CreateText(&ui, "SilverInput", "0", 0, v58, 5u, 0, 0);
  *(_QWORD *)&v59.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v59.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v2->m_pkGoldText = (PgWinText *)UIUtil::CreateText(&ui, "GoldInput", "0", 0, v59, 5u, 0, 0);
  *(_QWORD *)&v60.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v60.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v2->m_pkGemText = (PgWinText *)UIUtil::CreateText(&ui, "GemInput", "0", 0, v60, 5u, 0, 0);
  BYTE3(bResultb) = PgUtil::GetTriShapeRect(
                      (NiAVObject *)&spNode.m_pObject->vfptr,
                      "Text05",
                      &uiLeft,
                      &uiTop,
                      &uiWidth,
                      &uiHeight);
  v61 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text05", &uiLeft, &uiTop, v3);
  PgWinSpr::CreateWin(uiLeft, uiTop, v61, (PgWin *)&v2->vfptr, 0, 0);
  if ( BYTE3(bResultb) )
    v2->m_pkCoinEdit = CoinEditWin::CreateWin(
                         uiLeft + 2,
                         uiTop + 4,
                         uiWidth,
                         uiHeight,
                         (PgWin *)&v2->vfptr,
                         NUMBER,
                         0xCu,
                         3u,
                         0,
                         0,
                         1);
  ((void (__thiscall *)(CoinExchangeWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  CoinExchangeWin::OnTAB1(v2);
  LOBYTE(v69) = 0;
  UIUtil::~UIUtil(&ui);
  v62 = spNode.m_pObject;
  v69 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v62 )
    v62->vfptr->__vecDelDtor((NiRefObject *)v62, 1u);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (0070C640) --------------------------------------------------------
GambleWin *__cdecl GambleWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  GambleWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x164u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&GambleWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&GambleWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[1][0]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (GambleWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9C9A68: using guessed type void (__thiscall *GambleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C9A84: using guessed type int (__thiscall *GambleWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0070C790) --------------------------------------------------------
GambleMiniWin *__cdecl GambleMiniWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  GambleMiniWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x158u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&GambleMiniWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&GambleMiniWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (GambleMiniWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9C9CA8: using guessed type void (__thiscall *GambleMiniWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C9CC4: using guessed type int (__thiscall *GambleMiniWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0070C8D0) --------------------------------------------------------
GambleHouseCardWin *__cdecl GambleHouseCardWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  GambleHouseCardWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x160u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&GambleHouseCardWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&GambleHouseCardWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (GambleHouseCardWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9C9EE8: using guessed type void (__thiscall *GambleHouseCardWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C9F04: using guessed type int (__thiscall *GambleHouseCardWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0070CA20) --------------------------------------------------------
CoinEditWin *__thiscall CoinEditWin::`scalar deleting destructor'(CoinEditWin *this, unsigned int a2)
{
  CoinEditWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&CoinEditWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CoinEditWin::`vftable'{for `IDirectMessenger'};
  EditWin::~EditWin((EditWin *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C9614: using guessed type void (__thiscall *CoinEditWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C9634: using guessed type int (__thiscall *CoinEditWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0070CA60) --------------------------------------------------------
CoinExchangeWin *__thiscall CoinExchangeWin::`vector deleting destructor'(CoinExchangeWin *this, unsigned int a2)
{
  CoinExchangeWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&CoinExchangeWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&CoinExchangeWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C9828: using guessed type void (__thiscall *CoinExchangeWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C9844: using guessed type int (__thiscall *CoinExchangeWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0070CAA0) --------------------------------------------------------
GambleWin *__thiscall GambleWin::`scalar deleting destructor'(GambleWin *this, unsigned int a2)
{
  GambleWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GambleWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GambleWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C9A68: using guessed type void (__thiscall *GambleWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C9A84: using guessed type int (__thiscall *GambleWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0070CAE0) --------------------------------------------------------
GambleMiniWin *__thiscall GambleMiniWin::`scalar deleting destructor'(GambleMiniWin *this, unsigned int a2)
{
  GambleMiniWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GambleMiniWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GambleMiniWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C9CA8: using guessed type void (__thiscall *GambleMiniWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C9CC4: using guessed type int (__thiscall *GambleMiniWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0070CB20) --------------------------------------------------------
GambleHouseCardWin *__thiscall GambleHouseCardWin::`vector deleting destructor'(GambleHouseCardWin *this, unsigned int a2)
{
  GambleHouseCardWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GambleHouseCardWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GambleHouseCardWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9C9EE8: using guessed type void (__thiscall *GambleHouseCardWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9C9F04: using guessed type int (__thiscall *GambleHouseCardWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0070CB60) --------------------------------------------------------
unsigned int __cdecl ITableBase<GBHouse,GBHouseTab>::GetTotal()
{
  int v0; // eax@1
  unsigned int result; // eax@2

  v0 = *(_DWORD *)(ITableBase<GBHouse,GBHouseTab>::ms_pkTable + 56);
  if ( v0 )
    result = *(_DWORD *)(v0 + 40);
  else
    result = 0;
  return result;
}
// A8C1CC: using guessed type int ITableBase<GBHouse,GBHouseTab>::ms_pkTable;

//----- (0070CB80) --------------------------------------------------------
GBHouse *__cdecl GBHouseTab::GetByIndex(unsigned int uiIndex)
{
  unsigned int v1; // esi@1
  GBHouse *result; // eax@4

  v1 = uiIndex;
  if ( uiIndex >= ITableBase<GBHouse,GBHouseTab>::GetTotal() )
  {
LABEL_4:
    result = 0;
  }
  else
  {
    while ( !CDataReader::GetRecord((CDataReader *)(ITableBase<GBHouse,GBHouseTab>::ms_pkTable + 4), v1) )
    {
      if ( ++v1 >= ITableBase<GBHouse,GBHouseTab>::GetTotal() )
        goto LABEL_4;
    }
    result = (GBHouse *)CDataReader::GetRecord((CDataReader *)(ITableBase<GBHouse,GBHouseTab>::ms_pkTable + 4), v1);
  }
  return result;
}
// A8C1CC: using guessed type int ITableBase<GBHouse,GBHouseTab>::ms_pkTable;

//----- (0070CBD0) --------------------------------------------------------
GameFrameWork *__stdcall MHDiceGameTask::Recv_NC_GAMBLE_COIN_EXCHANGEMACHINE_UI_OPEN_CMD(PROTO_NC_GAMBLE_COIN_EXCHANGEMACHINE_UI_OPEN_CMD *pkProto)
{
  GameFrameWork *result; // eax@2

  if ( pkProto )
  {
    result = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( !result )
      return result;
    GameFrameWork::OnOpenExchangeCoinWin(result);
  }
  return (GameFrameWork *)1;
}

//----- (0070CC10) --------------------------------------------------------
int __stdcall MHDiceGameTask::Recv_NC_GAMBLE_COIN_VIPCARD_UI_OPEN_ACK(PROTO_NC_GAMBLE_COIN_VIPCARD_UI_OPEN_ACK *pkProto)
{
  GameFrameWork *v2; // eax@2

  if ( pkProto )
  {
    v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( 10264 == pkProto->nError )
    {
      if ( v2 )
        GameFrameWork::OnOpenVipCardWin(v2);
    }
  }
  return 1;
}

//----- (0070CC50) --------------------------------------------------------
void MHDiceGameTask::NcGambleGambleHouseExitReq()
{
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Fu, 2u, 0, 0);
}

//----- (0070CC70) --------------------------------------------------------
void __stdcall MHDiceGameTask::NcGambleCoinVipcardUIopenReq(int uSlotNum)
{
  BYTE3(uSlotNum) = uSlotNum;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Fu, 0xDu, (char *)&uSlotNum + 3, 1);
}

//----- (0070CCA0) --------------------------------------------------------
void __stdcall MHDiceGameTask::NcGambleCoinBuyReq(unsigned __int64 Coin)
{
  PROTO_NC_GAMBLE_COIN_BUY_REQ kProto; // [sp+0h] [bp-8h]@1

  kProto.nCoin = Coin;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Fu, 0xFu, &kProto, 8);
}

//----- (0070CCD0) --------------------------------------------------------
void __stdcall MHDiceGameTask::NcGambleCoinSellReq(unsigned __int64 Coin)
{
  PROTO_NC_GAMBLE_COIN_SELL_REQ kProto; // [sp+0h] [bp-8h]@1

  kProto.nCoin = Coin;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Fu, 0x13u, &kProto, 8);
}

//----- (0070CD00) --------------------------------------------------------
void __stdcall MHDiceGameTask::NcGambleTypeAndWhereStandReq(unsigned __int16 nNpcHandle)
{
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Fu, 0x17u, &nNpcHandle, 2);
}

//----- (0070CD30) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_GAME_LEAVE_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_GAME_LEAVE_ACK *pkProto)
{
  if ( pkProto->nError == 9760 )
    MHDiceGameTask::ShutDownGambleHouse(this);
  return 1;
}

//----- (0070CD50) --------------------------------------------------------
void MHDiceGameTask::NcGambleDiceTaisaiAllRankReq()
{
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Fu, 0x6Bu, 0, 0);
}

//----- (0070CD70) --------------------------------------------------------
void MHDiceGameTask::NcGambleDiceTaisaiCurrRankReq()
{
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Fu, 0x6Fu, 0, 0);
}

//----- (0070CD90) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_DICE_ROLL_RESULT_CMD(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_DICE_ROLL_RESULT_CMD *pkProto)
{
  MHDiceGameTask *v2; // esi@1
  GambleDiceGameWin *v3; // ecx@2

  v2 = this;
  if ( pkProto->nError == 9840 )
  {
    this->m_eDiceSaiGameStatus = 3;
    DiceTaiSai::ConvertDice(pkProto->nDiceInfo.nNumber, &this->m_nDiceVariety);
    v2->m_DiceAniCode[0] = 100 * pkProto->nDiceInfo.nNumber[0];
    v2->m_DiceAniCode[1] = 100 * pkProto->nDiceInfo.nNumber[1];
    v3 = v2->m_pkGambleDiceGameWin;
    v2->m_DiceAniCode[2] = 100 * pkProto->nDiceInfo.nNumber[2];
    GambleDiceGameWin::DiceAnimationStart(v3, v2->m_DiceAniCode);
  }
  return 1;
}

//----- (0070CE10) --------------------------------------------------------
int __stdcall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_LARGE_AMOUNT_ACK(PROTO_NC_GAMBLE_DICE_TAISAI_LARGE_AMOUNT_ACK *pkProto)
{
  return 1;
}

//----- (0070CE20) --------------------------------------------------------
void __stdcall MHDiceGameTask::NcGambleDiceTaisaiGameLargeAmountReq(unsigned int Money)
{
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Fu, 0x7Du, &Money, 4);
}

//----- (0070CE50) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_DICE_ROLL_CMD(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_DICE_ROLL_CMD *pkProto)
{
  int result; // eax@1

  result = 1;
  if ( pkProto->nError == 9824 )
    this->m_eDiceSaiGameStatus = 2;
  return result;
}

//----- (0070CE80) --------------------------------------------------------
GameFrameWork *__thiscall MHDiceGameTask::Recv_NC_GAMBLE_GAMBLEHOUSE_EXIT_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_GAMBLEHOUSE_EXIT_ACK *pkProto)
{
  MHDiceGameTask *v2; // ebx@1
  GameFrameWork *result; // eax@2
  GameFrameWork *v4; // esi@2
  PgWin *v5; // esi@4
  MHDiceGameTask::DICE_GAME_MODE v6; // eax@6

  v2 = this;
  if ( pkProto )
  {
    result = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v4 = result;
    if ( !result )
      return result;
    if ( pkProto->nError == 10240 )
    {
      GameFrameWork::OnOpenGambleHouseWin(result, 1);
      v5 = (PgWin *)&v4->m_pkCoinExchangeWin->vfptr;
      if ( v5 )
        PgWinMgr::CloseWin(&Pgg_kWinMgr, v5);
      v6 = v2->m_eDiceGameMode;
      if ( v6 == 2 )
      {
        MHDiceGameTask::ShutDownGambleHouse(v2);
        return (GameFrameWork *)1;
      }
      if ( v6 == 4 )
        MHDiceGameTask::ShutDownSlotMachine(v2);
    }
  }
  return (GameFrameWork *)1;
}

//----- (0070CF10) --------------------------------------------------------
PgFrameWork *__stdcall MHDiceGameTask::Recv_NC_GAMBLE_COIN_CHANGE_CMD(PROTO_NC_GAMBLE_COIN_CHANGE_CMD *pkProto)
{
  PgFrameWork *result; // eax@2
  int v3; // esi@2
  GambleHouseCardWin *v4; // ecx@3
  GambleWin *v5; // ecx@5

  if ( pkProto )
  {
    result = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v3 = (int)result;
    if ( !result )
      return result;
    User::SetCoin(&g_kUser, pkProto->nCoin);
    v4 = *(GambleHouseCardWin **)(v3 + 812);
    if ( v4 )
      GambleHouseCardWin::ChangeCoin(v4);
    v5 = *(GambleWin **)(v3 + 820);
    if ( v5 )
      GambleWin::ChangeCoin(v5);
  }
  return (PgFrameWork *)1;
}

//----- (0070CF80) --------------------------------------------------------
PgFrameWork *__stdcall MHDiceGameTask::Recv_NC_GAMBLE_EXCHANGECOIN_CHANGE_CMD(PROTO_NC_GAMBLE_EXCHANGECOIN_CHANGE_CMD *pkProto)
{
  PgFrameWork *result; // eax@2
  int v3; // esi@2
  GambleHouseCardWin *v4; // ecx@3
  GambleWin *v5; // ecx@5
  CoinExchangeWin *v6; // esi@7
  __int64 v7; // rax@8

  if ( pkProto )
  {
    result = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v3 = (int)result;
    if ( !result )
      return result;
    User::SetExchangeableCoin(&g_kUser, pkProto->nExchangeCoin);
    v4 = *(GambleHouseCardWin **)(v3 + 812);
    if ( v4 )
      GambleHouseCardWin::ChangeCoin(v4);
    v5 = *(GambleWin **)(v3 + 820);
    if ( v5 )
      GambleWin::ChangeCoin(v5);
    v6 = *(CoinExchangeWin **)(v3 + 816);
    if ( v6 )
    {
      v7 = User::ExchangeableCoin(&g_kUser);
      CoinExchangeWin::SetExchangeableCoin(v6, v7);
    }
  }
  return (PgFrameWork *)1;
}

//----- (0070D000) --------------------------------------------------------
void __thiscall MHDiceGameTask::NcGambleDiceTaisaiGameJoinReq(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_GAME_JOIN_REQ *pkProto)
{
  MHDiceGameTask *v2; // edi@1
  Char *v3; // eax@3
  NiPoint3 *v4; // eax@4
  float v5; // ecx@4
  float v6; // edx@4
  double v7; // st6@4
  char v8; // al@6
  NiPoint3 kDir; // [sp+Ch] [bp-54h]@6
  NiPoint3 result; // [sp+18h] [bp-48h]@4
  NiPoint3 kPos; // [sp+24h] [bp-3Ch]@4
  float v12; // [sp+30h] [bp-30h]@6
  float fAngle; // [sp+34h] [bp-2Ch]@4
  NiMatrix3 v14; // [sp+38h] [bp-28h]@6

  v2 = this;
  if ( pkProto && this->m_bInitialFinished )
  {
    v3 = CharMgr::GetChar(&g_kCharMgr, this->m_nNpcHandle);
    if ( v3 )
    {
      v4 = Char::GetDirToChar(g_pkMainChar, &result, v3);
      v5 = v4->y;
      kPos.x = v4->x;
      v6 = v4->z;
      kPos.y = v5;
      kPos.z = 0.0;
      NiPoint3::Unitize(&kPos);
      result.z = kPos.y * 0.0 - kPos.x;
      fAngle = kPos.y + kPos.x * 0.0 + 0.0 * kPos.z;
      fAngle = NiACos(fAngle) * 57.2957763671875;
      v7 = fAngle * 0.5;
      if ( result.z > 0.0 )
        v7 = 180.0 - v7;
      fAngle = v7;
      v8 = (signed int)fAngle;
      pkProto->nDirect = v8;
      v12 = (NI_PI + NI_PI) * (double)(unsigned __int8)v8 / 180.0;
      NiMatrix3::MakeZRotation(&v14, v12);
      NiMatrix3::operator*(&v14, &kDir, &World::ms_kNorthDir);
      ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[6].Affect)(&kDir);
    }
    if ( !MHDiceGameTask::IsDicegamePlaying(v2) )
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Fu, 0x64u, pkProto, 4);
  }
}
// B622CC: using guessed type const float NI_PI;

//----- (0070D170) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_TIMER_CMD(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_TIMER_CMD *pkProto)
{
  MHDiceGameTask *v2; // esi@1
  GambleDiceGameWin *v3; // eax@2
  PgWinSpr *v4; // ebx@2
  PgWinSpr *v5; // edi@2
  float v6; // ST10_4@2
  int v7; // eax@2
  float v8; // ST14_4@2
  GambleDiceGameWin *v9; // eax@2
  PgWinSpr *v10; // edi@2
  PgWinSpr *v11; // ebx@2
  float v12; // ST10_4@2
  signed int v13; // eax@2
  float v14; // ST14_4@2
  GambleDiceGameWin *v15; // esi@2
  NiRefObjectVtbl **v16; // edi@2
  int (*v17)(void); // edx@2
  NiRefObjectVtbl *v18; // esi@2
  int v19; // eax@2
  int result; // eax@2

  v2 = this;
  if ( pkProto->bIsStart )
  {
    this->m_nLengthInOneGame = pkProto->nTimer / 10;
    result = 1;
  }
  else
  {
    this->m_IsClockCastPlaying = 0;
    this->m_IsClockAlramPlaying = 0;
    this->m_fTimerPosOnPregress = 0.0;
    v3 = this->m_pkGambleDiceGameWin;
    this->m_fClockAlramTime = 0.0;
    v4 = v3->m_spTimer.m_pObject;
    v5 = v3->m_spTimerFill.m_pObject;
    v6 = (double)((int (__thiscall *)(PgWinSpr *))v5->vfptr[41].__vecDelDtor)(v3->m_spTimerFill.m_pObject) - 8.0;
    v7 = ((int (__thiscall *)(PgWinSpr *))v5->vfptr[42].__vecDelDtor)(v5) - 10;
    v4->m_kLocal.m_Translate.x = v6;
    v8 = (double)v7;
    v4->m_kLocal.m_Translate.y = v8;
    v4->m_kLocal.m_Translate.z = 1.0;
    v9 = v2->m_pkGambleDiceGameWin;
    v10 = v9->m_spTimerFill.m_pObject;
    v11 = v9->m_spTimerBack.m_pObject;
    v12 = (double)((int (__thiscall *)(PgWinSpr *))v10->vfptr[41].__vecDelDtor)(v9->m_spTimerFill.m_pObject);
    v13 = ((int (__thiscall *)(PgWinSpr *))v10->vfptr[42].__vecDelDtor)(v10);
    v11->m_kLocal.m_Translate.x = v12;
    v14 = (double)v13;
    v11->m_kLocal.m_Translate.y = v14;
    v11->m_kLocal.m_Translate.z = 1.0;
    v15 = v2->m_pkGambleDiceGameWin;
    v16 = &v15->m_spTimerBack.m_pObject->vfptr;
    v17 = (int (*)(void))v15->m_spTimerFill.m_pObject->vfptr[36].__vecDelDtor;
    v18 = *v16;
    v19 = v17();
    v18[117].__vecDelDtor((NiRefObject *)v16, v19);
    ((void (*)(void))g_kSoundMgr.m_pkInterfaceGroup->vfptr->UnloadAllSound)();
    result = 1;
  }
  return result;
}

//----- (0070D2C0) --------------------------------------------------------
int __stdcall MHDiceGameTask::Recv_NC_CHAR_CLIENT_COININFO_CMD(PROTO_NC_CHAR_COININFO_CMD *pkProto)
{
  PgFrameWork *v2; // eax@2
  PgFrameWork *v3; // esi@2
  GambleHouseCardWin *v4; // ecx@3
  GambleWin *v5; // ecx@5
  CoinExchangeWin *v6; // esi@7
  __int64 v7; // rax@8

  if ( pkProto )
  {
    User::SetCoin(&g_kUser, pkProto->nCoin);
    User::SetExchangeableCoin(&g_kUser, pkProto->nExchangedCoin);
    v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v3 = v2;
    if ( v2 )
    {
      v4 = (GambleHouseCardWin *)v2[22].m_kMsgQ.m_uiHead;
      if ( v4 )
        GambleHouseCardWin::ChangeCoin(v4);
      v5 = (GambleWin *)v3[22].m_BackFrameID;
      if ( v5 )
        GambleWin::ChangeCoin(v5);
      v6 = (CoinExchangeWin *)v3[22].m_kMsgQ.m_uiTail;
      if ( v6 )
      {
        v7 = User::ExchangeableCoin(&g_kUser);
        CoinExchangeWin::SetExchangeableCoin(v6, v7);
      }
    }
  }
  return 1;
}

//----- (0070D350) --------------------------------------------------------
int __stdcall MHDiceGameTask::Recv_NC_GAMBLE_ENTER_PLAYER_DIRECT_CMD(PROTO_NC_GAMBLE_ENTER_PLAYER_DIRECT_CMD *pkProto)
{
  Char *v2; // esi@2
  int result; // eax@4
  NiPoint3 kDir; // [sp+Ch] [bp-38h]@3
  float v5; // [sp+18h] [bp-2Ch]@3
  NiMatrix3 v6; // [sp+1Ch] [bp-28h]@3

  if ( pkProto )
  {
    v2 = CharMgr::GetChar(&g_kCharMgr, pkProto->nHandle);
    if ( v2 )
    {
      v5 = (NI_PI + NI_PI) * (double)pkProto->nDirect / 180.0;
      NiMatrix3::MakeZRotation(&v6, v5);
      NiMatrix3::operator*(&v6, &kDir, &World::ms_kNorthDir);
      ((void (__thiscall *)(Char *, NiPoint3 *))v2->vfptr[6].Affect)(v2, &kDir);
    }
    result = 1;
  }
  else
  {
    result = 1;
  }
  return result;
}
// B622CC: using guessed type const float NI_PI;

//----- (0070D400) --------------------------------------------------------
PgFrameWork *__stdcall MHDiceGameTask::Recv_NC_GAMBLE_COIN_BUY_ACK(PROTO_NC_GAMBLE_COIN_BUY_ACK *pkProto)
{
  PgFrameWork *result; // eax@2
  GameFrameWork *v3; // esi@2
  NiUnsharedGeometryGroup *v4; // eax@4

  if ( !pkProto )
    return (PgFrameWork *)1;
  result = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  v3 = (GameFrameWork *)result;
  if ( !result )
    return result;
  if ( pkProto->nError == 10253 )
  {
    v4 = TextData2::Get(0xC5CC491B);
LABEL_7:
    GameFrameWork::AddSysMsg(v3, (const char *)v4);
    return (PgFrameWork *)1;
  }
  if ( pkProto->nError == 10252 )
  {
    v4 = TextData2::Get(0x619A873u);
    goto LABEL_7;
  }
  return (PgFrameWork *)1;
}

//----- (0070D470) --------------------------------------------------------
PgFrameWork *__stdcall MHDiceGameTask::Recv_NC_GAMBLE_COIN_SELL_ACK(PROTO_NC_GAMBLE_COIN_SELL_ACK *pkProto)
{
  PgFrameWork *result; // eax@2
  GameFrameWork *v3; // esi@2
  NiUnsharedGeometryGroup *v4; // eax@4

  if ( pkProto )
  {
    result = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v3 = (GameFrameWork *)result;
    if ( !result )
      return result;
    if ( pkProto->nError == 10260 )
    {
      v4 = TextData2::Get(0x768675A6u);
      GameFrameWork::AddSysMsg(v3, (const char *)v4);
    }
  }
  return (PgFrameWork *)1;
}

//----- (0070D4D0) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_TYPE_AND_WHERE_STAND_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_TYPE_AND_WHERE_STAND_ACK *pkProto)
{
  Char *v2; // eax@2
  Char *v3; // edi@2
  NiNode *v4; // esi@3
  NiRefObjectVtbl *v5; // ST14_4@4
  char *v6; // eax@4
  NiShader *v7; // eax@4
  NiShader *v8; // eax@4
  float v9; // ecx@5
  float v10; // edx@5
  float v11; // eax@5
  float v12; // edx@5
  float v13; // eax@5
  float v14; // ecx@5
  void (__thiscall *v15)(AbStateInfectee *, ABSTATEINDEX, bool, int); // edx@5
  NiPoint3 *v16; // eax@5
  GAMBLE_TYPE v17; // eax@5
  MHDiceGameTask *v18; // eax@6
  MHDiceGameTask *v19; // edx@8
  float v20; // ecx@10
  float v21; // edx@10
  int v22; // eax@11
  NiPoint3 result; // [sp+8h] [bp-50h]@5
  NiPoint3 pos; // [sp+14h] [bp-44h]@5
  NiPoint3 kPos; // [sp+20h] [bp-38h]@5
  MHDiceGameTask *v26; // [sp+2Ch] [bp-2Ch]@1
  NiMatrix3 mat; // [sp+30h] [bp-28h]@5

  v26 = this;
  if ( 9728 == pkProto->nError )
  {
    v2 = CharMgr::GetChar(&g_kCharMgr, pkProto->nNpcHandle);
    v3 = v2;
    if ( v2 )
    {
      v4 = v2->m_spScene.m_pObject;
      if ( v4 )
      {
        v5 = v4->vfptr;
        v6 = fs("Avatar%.2d", pkProto->nWhereStand + 1);
        v7 = (NiShader *)v5[18].__vecDelDtor((NiRefObject *)v4, (unsigned int)v6);
        v8 = CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, v7);
        if ( v8 )
        {
          v9 = *(float *)&v8[5].m_pszName;
          v10 = *(float *)&v8[5].m_uiImplementation;
          v11 = *(float *)&v8[6].vfptr;
          pos.y = v10;
          v12 = v4->m_kLocal.m_Translate.y;
          pos.z = v11;
          v13 = v4->m_kLocal.m_Translate.z;
          pos.x = v9;
          v14 = v4->m_kLocal.m_Translate.x;
          kPos.y = v12;
          v15 = v3->vfptr[6].SetAbStateProperty;
          kPos.z = v13;
          kPos.x = v14;
          ((void (__thiscall *)(Char *, NiPoint3 *))v15)(v3, &kPos);
          qmemcpy(&mat, &v4->m_kWorld, sizeof(mat));
          v16 = NiMatrix3::operator*(&mat, &result, &pos);
          pos.x = v16->x;
          pos.y = v16->y;
          pos.z = v16->z;
          result.x = pos.x * 1.5;
          result.y = pos.y * 1.5;
          result.z = 1.5 * pos.z;
          kPos.x = result.x + kPos.x;
          kPos.y = kPos.y + result.y;
          kPos.z = kPos.z + result.z;
          g_pkMainChar[1].m_kCharShape.m_kItemUpGrade.m_arrLinkData[7].dwEffectIndex[0] = 0;
          MainChar::SetStartReserveAct((MainChar *)g_pkMainChar, RESERVEACT_PICKGROUND);
          MainChar::SetRevserveMovePos((MainChar *)g_pkMainChar, &kPos);
          MainChar::StartMoveTarget((MainChar *)g_pkMainChar);
          v17 = pkProto->nGambleType;
          if ( v17 == 2 )
          {
            v18 = v26;
            v26->m_eDiceGameMode = 5;
          }
          else if ( v17 == 1 )
          {
            v19 = v26;
            v26->m_eDiceGameMode = 3;
            v18 = v19;
          }
          else
          {
            v18 = v26;
          }
          v18->m_nWhereStand = pkProto->nWhereStand;
          v20 = kPos.x;
          v18->m_nNpcHandle = pkProto->nNpcHandle;
          v21 = kPos.y;
          v18->m_kDestPos.x = v20;
          v18->m_kDestPos.y = v21;
          v18->m_kDestPos.z = 0.0;
        }
      }
      v22 = 1;
    }
    else
    {
      v22 = 1;
    }
  }
  else
  {
    v22 = 1;
  }
  return v22;
}

//----- (0070D6D0) --------------------------------------------------------
int __stdcall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_DICE_ROLL_RESULT_EMOTION_CMD(PROTO_NC_GAMBLE_DICE_TAISAI_DICE_ROLL_RESULT_EMOTION_CMD *pkProto)
{
  PROTO_NC_GAMBLE_DICE_TAISAI_DICE_ROLL_RESULT_EMOTION_CMD *v2; // ebx@3
  int v3; // edi@5
  unsigned int v4; // esi@5
  char *v5; // eax@9
  int result; // eax@12
  Char *pkChar; // [sp+Ch] [bp-8h]@4
  int i; // [sp+10h] [bp-4h]@2

  if ( pkProto && (i = 0, pkProto->nGamerCnt) )
  {
    v2 = pkProto + 3;
    while ( 1 )
    {
      pkChar = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)&v2[-2].nGamerCnt);
      if ( !pkChar )
        break;
      v3 = *(_DWORD *)&v2->nGamerCnt;
      v4 = 0;
      if ( ITableBase<ActionViewInfo,ActionViewTable>::GetTotal() )
      {
        while ( *(_DWORD *)(CDataReader::GetRecord(
                              (CDataReader *)(ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable + 4),
                              v4)
                          + 105) != v3 )
        {
          if ( ++v4 >= ITableBase<ActionViewInfo,ActionViewTable>::GetTotal() )
            goto LABEL_11;
        }
        v5 = CDataReader::GetRecord((CDataReader *)(ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable + 4), v4);
        if ( v5 )
          ((void (__stdcall *)(_DWORD))pkChar->vfptr[14].Deaffect)((unsigned __int8)*v5);
      }
LABEL_11:
      v2 += 6;
      if ( ++i >= pkProto->nGamerCnt )
        goto LABEL_12;
    }
    result = 0;
  }
  else
  {
LABEL_12:
    result = 1;
  }
  return result;
}
// A8A074: using guessed type int ITableBase<ActionViewInfo,ActionViewTable>::ms_pkTable;

//----- (0070D790) --------------------------------------------------------
int __stdcall MHDiceGameTask::Recv_NC_GAMBLE_COIN_USE_COINITEM_MESSAGE_CMD(PROTO_NC_GAMBLE_COIN_USE_COINITEM_MESSAGE_CMD *pkProto)
{
  GameFrameWork *v2; // esi@2
  unsigned __int64 v3; // ST04_8@3
  char *v4; // eax@3
  const char *v5; // eax@3
  int result; // eax@4

  if ( pkProto )
  {
    v2 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v2 )
    {
      v3 = pkProto->nAddCoin;
      v4 = (char *)TextData2::Get(0xDBE95533);
      v5 = fs(v4, v3);
      GameFrameWork::AddSysMsg(v2, v5);
    }
    result = 1;
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (0070D7F0) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_LARGE_AMOUNT_CMD(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_LARGE_AMOUNT_CMD *pkProto)
{
  PgFrameWork *v2; // eax@2
  bool v3; // zf@2
  GameFrameWork *v4; // ebx@2
  unsigned int *v5; // edi@3
  Char *v6; // esi@4
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v7; // eax@6
  bool v8; // cf@6
  int v9; // edi@7
  D3DXCOLOR *v10; // eax@9
  D3DXCOLOR v11; // ST0C_16@9
  int v12; // ST04_4@9
  char *v13; // eax@9
  char *v14; // eax@9
  PgWin *v15; // ST18_4@11
  int v16; // edx@12
  int v17; // eax@13
  D3DXCOLOR v18; // [sp+10h] [bp-4Ch]@9
  PROTO_NC_GAMBLE_DICE_TAISAI_LARGE_AMOUNT_CMD *v19; // [sp+20h] [bp-3Ch]@1
  MHDiceGameTask *v20; // [sp+24h] [bp-38h]@1
  int i; // [sp+28h] [bp-34h]@2
  char *v22; // [sp+2Ch] [bp-30h]@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+30h] [bp-2Ch]@6
  int v24; // [sp+58h] [bp-4h]@6

  v20 = this;
  v19 = pkProto;
  if ( pkProto )
  {
    v2 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v3 = pkProto->nGamerCnt == 0;
    v4 = (GameFrameWork *)v2;
    i = 0;
    if ( !v3 )
    {
      v5 = (unsigned int *)&pkProto[3];
      v22 = &pkProto[3].nGamerCnt;
      do
      {
        v6 = CharMgr::GetChar(&g_kCharMgr, *((_WORD *)v5 - 1));
        if ( v6 && *v5 )
        {
          v7 = MHDiceGameTask::GetMoneyToString(v20, &result, *v5);
          v8 = v7->_Myres < 0x10;
          v24 = 0;
          if ( v8 )
            v9 = (int)v7;
          else
            v9 = (int)v7->_Bx._Ptr;
          v10 = ColorInfoTable::GetDxColor(&v18, Center_Announcement);
          *(_QWORD *)&v11.r = *(_QWORD *)&v10->r;
          *(_QWORD *)&v11.b = *(_QWORD *)&v10->b;
          v12 = ((int (__thiscall *)(Char *))v6->vfptr[2].DeleteAbStateByAbstateIndex)(v6);
          v13 = (char *)TextData2::Get(0x4746208Au);
          v14 = fs(v13, v12, v9);
          GameFrameWork::AddAnnounceMsg(v4, v9, (int)v6, v14, v11);
          v24 = -1;
          if ( result._Myres >= 0x10 )
            operator delete(result._Bx._Ptr);
          v15 = (PgWin *)&v4->m_pkAnnounceWin->vfptr;
          result._Myres = 15;
          result._Mysize = 0;
          result._Bx._Buf[0] = 0;
          PgWinMgr::SetTopWin(&Pgg_kWinMgr, v15);
          v5 = (unsigned int *)v22;
        }
        v16 = v19->nGamerCnt;
        v5 = (unsigned int *)((char *)v5 + 6);
        ++i;
        v22 = (char *)v5;
      }
      while ( i < v16 );
    }
    v17 = 1;
  }
  else
  {
    v17 = 0;
  }
  return v17;
}

//----- (0070D970) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_GAME_BETTING_INFO_CMD(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_GAME_BETTING_INFO_CMD *pkProto)
{
  PROTO_NC_GAMBLE_DICE_TAISAI_GAME_BETTING_INFO_CMD *v2; // ebx@1
  MHDiceGameTask *v3; // edi@1
  int v4; // esi@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v5; // eax@5
  int v6; // ecx@6
  int v7; // eax@10
  int v8; // esi@15
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v9; // eax@16
  int v10; // ecx@17
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > result; // [sp+Ch] [bp-4h]@5
  int i; // [sp+18h] [bp+8h]@3
  int ia; // [sp+18h] [bp+8h]@14

  v2 = pkProto;
  v3 = this;
  if ( !(pkProto->PartMask & 1) || this->m_eStatusOfInfoTrans )
  {
    v7 = 1;
    if ( pkProto->PartMask & 2 && this->m_eStatusOfInfoTrans == 1 )
    {
      ia = 0;
      if ( v2->nBettingCnt > 0u )
      {
        v8 = (int)&v2[1].nBettingCnt + 1;
        do
        {
          v9 = std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::find(
                 (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v3->map_ParticipantInfo.comp,
                 &result,
                 (const unsigned __int16 *)(v8 - 2))->_Ptr;
          if ( v9 != v3->map_ParticipantInfo._Myhead )
          {
            v10 = *(_DWORD *)(v8 + 4);
            if ( v10 )
              v9->_Myval.second.m_BettingInfo.nBetMoney[*(_DWORD *)v8] += v10;
            MHDiceGameTask::CheckBettingChip(v3, *(DICE_TAISAI_BETTING *)v8, 0);
          }
          v8 += 10;
          ++ia;
        }
        while ( ia < v2->nBettingCnt );
      }
      v7 = 1;
      if ( v2->PartMask & 2 )
        v3->m_eStatusOfInfoTrans = 0;
    }
  }
  else
  {
    i = 0;
    if ( v2->nBettingCnt > 0u )
    {
      v4 = (int)&v2[1].nBettingCnt + 1;
      do
      {
        v5 = std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::find(
               (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v3->map_ParticipantInfo.comp,
               &result,
               (const unsigned __int16 *)(v4 - 2))->_Ptr;
        if ( v5 != v3->map_ParticipantInfo._Myhead )
        {
          v6 = *(_DWORD *)(v4 + 4);
          if ( v6 )
            v5->_Myval.second.m_BettingInfo.nBetMoney[*(_DWORD *)v4] += v6;
          MHDiceGameTask::CheckBettingChip(v3, *(DICE_TAISAI_BETTING *)v4, 0);
        }
        v4 += 10;
        ++i;
      }
      while ( i < v2->nBettingCnt );
    }
    v7 = 1;
    if ( !(v2->PartMask & 2) )
      v3->m_eStatusOfInfoTrans = 1;
  }
  return v7;
}

//----- (0070DA90) --------------------------------------------------------
void __usercall MHDiceGameTask::NcGambleDiceTaisaiGameLeaveReq(MHDiceGameTask *this@<ecx>, int a2@<edi>)
{
  MHDiceGameTask *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v3; // edx@1
  DICE_TAISAI_GAME_STATUS v4; // ebx@1
  signed int v5; // eax@1
  unsigned int *v6; // ecx@1
  PgWin *v7; // esi@6
  char *v8; // eax@11
  NiD3DDefaultShader *v9; // eax@11
  PgFrameWork *v10; // esi@13
  NiUnsharedGeometryGroup *v11; // eax@13
  D3DXCOLOR *v12; // eax@13
  D3DXCOLOR v13; // ST04_16@13
  char *v14; // eax@13
  D3DXCOLOR v15; // [sp+Ch] [bp-18h]@13
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > result; // [sp+1Ch] [bp-8h]@1
  unsigned __int16 _Keyval[2]; // [sp+20h] [bp-4h]@1

  v2 = this;
  *(_DWORD *)_Keyval = g_pkMainChar->m_kHandle;
  v3 = std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::find(
         (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&this->map_ParticipantInfo.comp,
         &result,
         _Keyval)->_Ptr;
  v4 = v2->m_eDiceSaiGameStatus;
  v5 = 0;
  v6 = v3->_Myval.second.m_BettingInfo.nBetMoney;
  while ( !*v6 )
  {
    ++v5;
    ++v6;
    if ( v5 >= 52 )
      goto LABEL_4;
  }
  if ( !v2->m_spExitConfirmWin.m_pObject && v4 == 1 && !v2->m_bOutReserveOnMiniHouse )
  {
    v8 = (char *)TextData2::Get(0xCCF40DFD);
    v9 = (NiD3DDefaultShader *)MsgBox::Modeless(MSGBOX_OKCANCEL, v8);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spExitConfirmWin, v9);
    v2->m_spExitConfirmWin.m_pObject->vfptr->SetMsgHooker(&v2->m_spExitConfirmWin.m_pObject->vfptr, &v2->vfptr);
    return;
  }
LABEL_4:
  if ( v4 == 2 || v4 == 3 )
  {
    v3->_Myval.second.m_bReserveQuit = 1;
    v10 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    v11 = TextData2::Get(0xDFD0BFCD);
    GameFrameWork::AddSysMsg((GameFrameWork *)v10, (const char *)v11);
    v12 = ColorInfoTable::GetDxColor(&v15, Center_Announcement);
    *(_QWORD *)&v13.r = *(_QWORD *)&v12->r;
    *(_QWORD *)&v13.b = *(_QWORD *)&v12->b;
    v14 = (char *)TextData2::Get(0xDFD0BFCD);
    GameFrameWork::AddAnnounceMsg((GameFrameWork *)v10, a2, (int)v10, v14, v13);
    PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)v10[28].m_kMsgQ.m_uiHead);
  }
  else
  {
    v7 = v2->m_spExitConfirmWin.m_pObject;
    if ( v7 )
      PgWinMgr::SetTopWin(&Pgg_kWinMgr, v7);
    else
      NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Fu, 0x68u, 0, 0);
  }
}

//----- (0070DC00) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_BETTING_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_ACK *pkProto)
{
  PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_ACK *v2; // ebx@1
  MHDiceGameTask *v3; // esi@1
  int *v4; // eax@1
  int v5; // edi@1
  int v6; // eax@2
  unsigned __int16 v7; // ax@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *v8; // eax@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v9; // ebx@4
  int v10; // ecx@5
  DICE_TAISAI_BETTING v11; // eax@7
  BETTING_LEVEL_MONEY v12; // ST0C_4@9
  GambleDiceGameWin *v13; // ecx@9
  DICE_TAISAI_BETTING v14; // ST08_4@9
  unsigned int v15; // eax@9
  PgFrameWork *v16; // esi@11
  const char *v17; // eax@11
  D3DXCOLOR *v18; // eax@11
  D3DXCOLOR v19; // ST04_16@11
  char *v20; // eax@11
  GameFrameWork *v21; // esi@15
  const char *v22; // eax@16
  D3DXCOLOR v23; // [sp+Ch] [bp-1Ch]@11
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > v24; // [sp+1Ch] [bp-Ch]@4
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > > result; // [sp+20h] [bp-8h]@1
  std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *v26; // [sp+24h] [bp-4h]@1

  v2 = pkProto;
  v3 = this;
  v26 = (std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *)&this->map_BettingReq;
  v4 = (int *)std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::find(
                (std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > *)&this->map_BettingReq.comp,
                &result,
                &pkProto->nBettingIndex);
  v5 = *v4;
  if ( (std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *)*v4 == v3->map_BettingReq._Myhead )
  {
    v6 = 0;
  }
  else
  {
    v7 = v2->nError;
    if ( v2->nError == 9776 )
    {
      pkProto = (PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_ACK *)g_pkMainChar->m_kHandle;
      v8 = std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::find(
             (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v3->map_ParticipantInfo.comp,
             &v24,
             (const unsigned __int16 *)&pkProto);
      v9 = v8->_Ptr;
      if ( v8->_Ptr != v3->map_ParticipantInfo._Myhead )
      {
        v10 = *(_DWORD *)(v5 + 20);
        if ( v10 )
          v9->_Myval.second.m_BettingInfo.nBetMoney[*(_DWORD *)(v5 + 16)] += v10;
      }
      v11 = *(_DWORD *)(v5 + 16);
      if ( v9->_Myval.second.m_BettingInfo.nBetMoney[v11] )
        GambleDiceGameWin::SetMarkButton(v3->m_pkGambleDiceGameWin, v11, BET_BETTING, 0);
      v12 = v3->m_eBettingAmount;
      v13 = v3->m_pkGambleDiceGameWin;
      v14 = *(_DWORD *)(v5 + 16);
      v3->m_eDiceSaiGameStatus = 1;
      GambleDiceGameWin::ChipAnimation(v13, v14, v12, 0);
      v15 = EntryInfo::GetTotalBettingMoney(&v9->_Myval.second);
      GambleDiceGameWin::SetMoneyWin(v3->m_pkGambleDiceGameWin, v15);
    }
    else if ( v7 == 9787 )
    {
      v16 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      v17 = ErrMsgTable::GetErrMsg(v2->nError);
      GameFrameWork::AddSysMsg((GameFrameWork *)v16, v17);
      v18 = ColorInfoTable::GetDxColor(&v23, Center_Announcement);
      *(_QWORD *)&v19.r = *(_QWORD *)&v18->r;
      *(_QWORD *)&v19.b = *(_QWORD *)&v18->b;
      v20 = ErrMsgTable::GetErrMsg(v2->nError);
      GameFrameWork::AddAnnounceMsg((GameFrameWork *)v16, v5, (int)v16, v20, v19);
      PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)v16[28].m_kMsgQ.m_uiHead);
    }
    else if ( 9783 == v7 || 9786 == v7 || 9782 == v7 )
    {
      v21 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v21 )
      {
        v22 = fs("%d", v2->nError);
        GameFrameWork::AddSysMsg(v21, v22);
      }
    }
    std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::erase(
      v26,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *)&pkProto,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > >)v5);
    v6 = 1;
  }
  return v6;
}

//----- (0070DDC0) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_BETTING_CMD(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CMD *pkProto)
{
  PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CMD *v2; // esi@1
  MHDiceGameTask *v3; // edi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v4; // eax@2
  unsigned int v5; // ecx@3

  v2 = pkProto;
  v3 = this;
  if ( pkProto->nPlayerHnd == g_pkMainChar->m_kHandle )
    return 1;
  v4 = std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::find(
         (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&this->map_ParticipantInfo.comp,
         (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *)&pkProto,
         &pkProto->nPlayerHnd)->_Ptr;
  if ( v4 != v3->map_ParticipantInfo._Myhead )
  {
    v5 = v2->BettingInfo.nMoney;
    if ( v5 )
      v4->_Myval.second.m_BettingInfo.nBetMoney[v2->BettingInfo.nBetting] += v5;
    v3->m_eDiceSaiGameStatus = 1;
    MHDiceGameTask::CheckBettingChip(v3, v2->BettingInfo.nBetting, 0);
    return 1;
  }
  return 0;
}

//----- (0070DE30) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_ACK *pkProto)
{
  PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_ACK *v2; // edi@1
  MHDiceGameTask *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *v4; // ebx@1
  int v5; // eax@2
  unsigned __int16 v6; // ax@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *v7; // eax@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v8; // edi@4
  DICE_TAISAI_BETTING v9; // eax@6
  unsigned int v10; // eax@8
  PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_ACK **v11; // eax@8
  PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_ACK *v12; // ecx@8
  char v13; // bl@8
  PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_ACK *v14; // edi@9
  signed int v15; // eax@10
  PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_ACK *v16; // ecx@10
  PgFrameWork *v17; // edi@17
  NiUnsharedGeometryGroup *v18; // eax@17
  D3DXCOLOR *v19; // eax@17
  D3DXCOLOR v20; // ST04_16@17
  char *v21; // eax@17
  unsigned __int16 v22; // dx@17
  GambleDiceGameWin *v23; // ecx@17
  PgFrameWork *v24; // esi@20
  D3DXCOLOR *v25; // eax@20
  D3DXCOLOR v26; // ST04_16@20
  char *v27; // eax@20
  GameFrameWork *v28; // esi@23
  const char *v29; // eax@24
  D3DXCOLOR v30; // [sp+Ch] [bp-20h]@17
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > result; // [sp+1Ch] [bp-10h]@4
  std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *v32; // [sp+20h] [bp-Ch]@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > > itr; // [sp+24h] [bp-8h]@1
  DICE_TAISAI_BETTING bettingIdx; // [sp+28h] [bp-4h]@1

  v2 = pkProto;
  v3 = this;
  v32 = (std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *)&this->map_BettingReq;
  v4 = std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::find(
         (std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > *)&this->map_BettingReq.comp,
         (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > > *)&bettingIdx,
         &pkProto->nBettingCancelIndex)->_Ptr;
  itr._Ptr = v4;
  if ( v4 == v3->map_BettingReq._Myhead )
  {
    v5 = 0;
  }
  else
  {
    v6 = v2->nError;
    if ( v2->nError == 9792 )
    {
      pkProto = (PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_ACK *)g_pkMainChar->m_kHandle;
      v7 = std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::find(
             (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v3->map_ParticipantInfo.comp,
             &result,
             (const unsigned __int16 *)&pkProto);
      v8 = v7->_Ptr;
      if ( v7->_Ptr != v3->map_ParticipantInfo._Myhead )
        v8->_Myval.second.m_BettingInfo.nBetMoney[v4->_Myval.second.nBetting] -= v4->_Myval.second.nMoney;
      v9 = v4->_Myval.second.nBetting;
      if ( !v8->_Myval.second.m_BettingInfo.nBetMoney[v9] )
        GambleDiceGameWin::SetMarkButton(v3->m_pkGambleDiceGameWin, v9, 0, 0);
      bettingIdx = v4->_Myval.second.nBetting;
      v10 = EntryInfo::GetTotalBettingMoney(&v8->_Myval.second);
      GambleDiceGameWin::SetMoneyWin(v3->m_pkGambleDiceGameWin, v10);
      v11 = (PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_ACK **)v3->map_ParticipantInfo._Myhead;
      v12 = *v11;
      v13 = 0;
      pkProto = v12;
      if ( (PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_ACK **)v12 == v11 )
        goto LABEL_28;
      v14 = (PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_ACK *)v11;
      do
      {
        v15 = 0;
        v16 = v12 + 4;
        while ( !*(_DWORD *)v16 )
        {
          ++v15;
          ++v16;
          if ( v15 >= 52 )
            goto LABEL_15;
        }
        v13 = 1;
LABEL_15:
        std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >,std::_Iterator_base0> *)&pkProto);
        v12 = pkProto;
      }
      while ( pkProto != v14 );
      if ( !v13 )
      {
LABEL_28:
        v17 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
        v18 = TextData2::Get(0x8AA5ACB9);
        GameFrameWork::AddSysMsg((GameFrameWork *)v17, (const char *)v18);
        v19 = ColorInfoTable::GetDxColor(&v30, Center_Announcement);
        *(_QWORD *)&v20.r = *(_QWORD *)&v19->r;
        *(_QWORD *)&v20.b = *(_QWORD *)&v19->b;
        v21 = (char *)TextData2::Get(0x8AA5ACB9);
        GameFrameWork::AddAnnounceMsg((GameFrameWork *)v17, (int)v17, (int)v3, v21, v20);
        PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)v17[28].m_kMsgQ.m_uiHead);
        v22 = v3->map_ParticipantInfo._Mysize;
        v23 = v3->m_pkGambleDiceGameWin;
        v3->m_eDiceSaiGameStatus = 0;
        v3->m_nNumberOfEntrant = v22;
        GambleDiceGameWin::TurnOnLight(v23, 1, 0, 0);
      }
      MHDiceGameTask::CheckBettingChip(v3, bettingIdx, 0);
      v4 = itr._Ptr;
    }
    else if ( v6 == 9802 )
    {
      v24 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      v25 = ColorInfoTable::GetDxColor(&v30, Center_Announcement);
      *(_QWORD *)&v26.r = *(_QWORD *)&v25->r;
      *(_QWORD *)&v26.b = *(_QWORD *)&v25->b;
      v27 = ErrMsgTable::GetErrMsg(v2->nError);
      GameFrameWork::AddAnnounceMsg((GameFrameWork *)v24, (int)v2, (int)v24, v27, v26);
      PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)v24[28].m_kMsgQ.m_uiHead);
    }
    else if ( 9800 == v6 || 9799 == v6 )
    {
      v28 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      if ( v28 )
      {
        v29 = fs("%d", v2->nError);
        GameFrameWork::AddSysMsg(v28, v29);
      }
    }
    std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::erase(
      v32,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > > *)&pkProto,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > >)v4);
    v5 = 1;
  }
  return v5;
}

//----- (0070E0A0) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_CMD(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_CMD *pkProto)
{
  PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_CMD *v2; // ebx@1
  MHDiceGameTask *v3; // esi@1
  PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_CMD *v4; // ST10_4@2
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v5; // eax@2
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node **v6; // eax@3
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v7; // ecx@3
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v8; // edi@4
  signed int v9; // eax@5
  unsigned int *v10; // ecx@5
  PgFrameWork *v11; // edi@12
  NiUnsharedGeometryGroup *v12; // eax@12
  D3DXCOLOR *v13; // eax@12
  D3DXCOLOR v14; // ST04_16@12
  char *v15; // eax@12
  unsigned __int16 v16; // dx@12
  GambleDiceGameWin *v17; // ecx@12
  D3DXCOLOR result; // [sp+Ch] [bp-14h]@12
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > itr; // [sp+1Ch] [bp-4h]@2
  char IsEmpty_3; // [sp+2Bh] [bp+Bh]@2

  v2 = pkProto;
  v3 = this;
  if ( pkProto->nPlayerHnd == g_pkMainChar->m_kHandle )
    return 1;
  v4 = pkProto;
  IsEmpty_3 = 0;
  v5 = std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::find(
         (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&this->map_ParticipantInfo.comp,
         &itr,
         &v4->nPlayerHnd)->_Ptr;
  if ( v5 != v3->map_ParticipantInfo._Myhead )
  {
    v5->_Myval.second.m_BettingInfo.nBetMoney[v2->BettingCancelInfo.nBetting] -= v2->BettingCancelInfo.nMoney;
    v6 = &v3->map_ParticipantInfo._Myhead->_Left;
    v7 = *v6;
    itr._Ptr = v7;
    if ( (std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node **)v7 == v6 )
      goto LABEL_18;
    v8 = (std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *)v6;
    do
    {
      v9 = 0;
      v10 = v7->_Myval.second.m_BettingInfo.nBetMoney;
      while ( !*v10 )
      {
        ++v9;
        ++v10;
        if ( v9 >= 52 )
          goto LABEL_10;
      }
      IsEmpty_3 = 1;
LABEL_10:
      std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >,std::_Iterator_base0> *)&itr._Ptr);
      v7 = itr._Ptr;
    }
    while ( itr._Ptr != v8 );
    if ( !IsEmpty_3 )
    {
LABEL_18:
      v11 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
      v12 = TextData2::Get(0x8AA5ACB9);
      GameFrameWork::AddSysMsg((GameFrameWork *)v11, (const char *)v12);
      v13 = ColorInfoTable::GetDxColor(&result, Center_Announcement);
      *(_QWORD *)&v14.r = *(_QWORD *)&v13->r;
      *(_QWORD *)&v14.b = *(_QWORD *)&v13->b;
      v15 = (char *)TextData2::Get(0x8AA5ACB9);
      GameFrameWork::AddAnnounceMsg((GameFrameWork *)v11, (int)v11, (int)v3, v15, v14);
      PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)v11[28].m_kMsgQ.m_uiHead);
      v16 = v3->map_ParticipantInfo._Mysize;
      v17 = v3->m_pkGambleDiceGameWin;
      v3->m_eDiceSaiGameStatus = 0;
      v3->m_nNumberOfEntrant = v16;
      GambleDiceGameWin::TurnOnLight(v17, 1, 0, 0);
    }
    MHDiceGameTask::CheckBettingChip(v3, v2->BettingCancelInfo.nBetting, 0);
    return 1;
  }
  return 0;
}

//----- (0070E1F0) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_GAME_LEAVE_CMD(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_GAME_LEAVE_CMD *pkProto)
{
  PROTO_NC_GAMBLE_DICE_TAISAI_GAME_LEAVE_CMD *v2; // esi@1
  std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *v3; // ebx@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > *v4; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > v5; // edi@1
  MHDiceGameTask *v6; // ecx@1
  DICE_TAISAI_BETTING v8; // esi@5
  unsigned int v9; // eax@6
  MHDiceGameTask *v10; // ebx@9
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node **v11; // eax@9
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v12; // ecx@9
  signed int v13; // eax@10
  unsigned int *v14; // edx@10
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v15; // eax@14
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *j; // eax@15
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *i; // eax@18
  PgFrameWork *v18; // esi@23
  Char *v19; // eax@24
  int v20; // edi@25
  D3DXCOLOR *v21; // eax@25
  D3DXCOLOR v22; // ST08_16@25
  char *v23; // eax@25
  char *v24; // eax@25
  unsigned __int16 v25; // dx@26
  D3DXCOLOR v26; // [sp+Ch] [bp-18h]@25
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > result; // [sp+1Ch] [bp-8h]@1
  MHDiceGameTask *v28; // [sp+20h] [bp-4h]@1
  PROTO_NC_GAMBLE_DICE_TAISAI_GAME_LEAVE_CMD *pkProtoa; // [sp+2Ch] [bp+8h]@1

  v2 = pkProto;
  pkProtoa = (PROTO_NC_GAMBLE_DICE_TAISAI_GAME_LEAVE_CMD *)((char *)pkProto + 1);
  v3 = (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&this->map_ParticipantInfo.comp;
  v28 = this;
  v4 = std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::find(
         (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&this->map_ParticipantInfo.comp,
         &result,
         (const unsigned __int16 *)pkProtoa);
  v5._Ptr = v4->_Ptr;
  v6 = v28;
  if ( v4->_Ptr == v28->map_ParticipantInfo._Myhead )
    return 0;
  if ( v2->bReserve )
  {
    v5._Ptr->_Myval.second.m_bReserveQuit = 1;
    return 1;
  }
  if ( v28->m_eDiceSaiGameStatus == 1 )
  {
    v8 = 0;
    do
    {
      v9 = v5._Ptr->_Myval.second.m_BettingInfo.nBetMoney[v8];
      if ( v9 )
      {
        v5._Ptr->_Myval.second.m_BettingInfo.nBetMoney[v8] -= v9;
        MHDiceGameTask::CheckBettingChip(v6, v8, 0);
        v6 = v28;
      }
      ++v8;
    }
    while ( (signed int)v8 < 52 );
  }
  std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::erase(
    v3,
    &result,
    v5);
  v10 = v28;
  v11 = &v28->map_ParticipantInfo._Myhead->_Left;
  v12 = *v11;
  if ( (std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node **)*v11 != v11 )
  {
LABEL_10:
    v13 = 0;
    v14 = v12->_Myval.second.m_BettingInfo.nBetMoney;
    while ( !*v14 )
    {
      ++v13;
      ++v14;
      if ( v13 >= 52 )
      {
        if ( !v12->_Isnil )
        {
          v15 = v12->_Right;
          if ( v15->_Isnil )
          {
            for ( i = v12->_Parent; !i->_Isnil; i = i->_Parent )
            {
              if ( v12 != i->_Right )
                break;
              v12 = i;
            }
            v12 = i;
          }
          else
          {
            v12 = v12->_Right;
            for ( j = v15->_Left; !j->_Isnil; j = j->_Left )
              v12 = j;
          }
        }
        if ( v12 != v28->map_ParticipantInfo._Myhead )
          goto LABEL_10;
        goto LABEL_23;
      }
    }
    return 1;
  }
LABEL_23:
  v18 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v18 )
  {
    v19 = CharMgr::GetChar(&g_kCharMgr, *(_WORD *)&pkProtoa->bReserve);
    if ( v19 )
    {
      v20 = ((int (__thiscall *)(Char *))v19->vfptr[2].DeleteAbStateByAbstateIndex)(v19);
      v21 = ColorInfoTable::GetDxColor(&v26, Center_Announcement);
      *(_QWORD *)&v22.r = *(_QWORD *)&v21->r;
      *(_QWORD *)&v22.b = *(_QWORD *)&v21->b;
      v23 = (char *)TextData2::Get(0x37452093u);
      v24 = fs(v23, v20);
      GameFrameWork::AddAnnounceMsg((GameFrameWork *)v18, v20, (int)v18, v24, v22);
      PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)v18[28].m_kMsgQ.m_uiHead);
    }
  }
  v25 = v10->map_ParticipantInfo._Mysize;
  v10->m_eDiceSaiGameStatus = 0;
  v10->m_nNumberOfEntrant = v25;
  return 1;
}

//----- (0070E3B0) --------------------------------------------------------
void __thiscall MHDiceGameTask::NcGambleDiceTaisaiGameBettingReq(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_REQ *pkProto)
{
  PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_REQ *v2; // esi@1
  unsigned __int16 v3; // dx@2
  unsigned __int16 v4; // ax@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *v5; // edx@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *v6; // eax@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *v7; // eax@9
  PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_REQ **v8; // eax@11
  DICE_TAISAI_BETTING v9; // edx@14
  std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > *v10; // edi@14
  unsigned int v11; // eax@14
  std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *v12; // eax@14
  std::pair<unsigned short,DiceTaiSaiBetting> _Val; // [sp+8h] [bp-Ch]@12

  v2 = pkProto;
  if ( this->map_BettingReq._Mysize )
  {
    if ( this->map_BettingReq._Myhead->_Left != this->map_BettingReq._Myhead )
    {
      do
      {
        v4 = this->m_nReqCount;
        this->m_nReqCount = v4 + 1;
        v2->nBettingIndex = v4;
        v5 = this->map_BettingReq._Myhead;
        v6 = v5->_Parent;
        while ( !v6->_Isnil )
        {
          if ( v6->_Myval.first >= v2->nBettingIndex )
          {
            v5 = v6;
            v6 = v6->_Left;
          }
          else
          {
            v6 = v6->_Right;
          }
        }
        v7 = this->map_BettingReq._Myhead;
        pkProto = (PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_REQ *)v5;
        if ( v5 == v7 || v2->nBettingIndex < v5->_Myval.first )
        {
          _Val.second.nMoney = (unsigned int)v7;
          v8 = (PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_REQ **)&_Val.second.nMoney;
        }
        else
        {
          v8 = &pkProto;
        }
      }
      while ( *v8 != (PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_REQ *)this->map_BettingReq._Myhead );
    }
  }
  else
  {
    v3 = this->m_nReqCount;
    this->m_nReqCount = v3 + 1;
    v2->nBettingIndex = v3;
  }
  v9 = v2->BettingInfo.nBetting;
  v10 = (std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > *)&this->map_BettingReq.comp;
  _Val.first = v2->nBettingIndex;
  v11 = v2->BettingInfo.nMoney;
  _Val.second.nBetting = v9;
  _Val.second.nMoney = v11;
  v12 = std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::_Buynode<std::pair<unsigned short,DiceTaiSaiBetting>>(
          (std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > *)&this->map_BettingReq.comp,
          &_Val);
  std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::_Linsert(
    v10,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > >,bool> *)&_Val.second,
    v12,
    0);
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Fu, 0x71u, v2, 10);
}

//----- (0070E490) --------------------------------------------------------
void __thiscall MHDiceGameTask::NcGambleDiceTaisaiGameBettingCancelReq(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_REQ *pkProto)
{
  PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_REQ *v2; // esi@1
  unsigned __int16 v3; // dx@2
  unsigned __int16 v4; // ax@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *v5; // edx@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *v6; // eax@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *v7; // eax@9
  PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_REQ **v8; // eax@11
  DICE_TAISAI_BETTING v9; // edx@14
  std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > *v10; // edi@14
  unsigned int v11; // eax@14
  std::_Tree_nod<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> >::_Node *v12; // eax@14
  std::pair<unsigned short,DiceTaiSaiBetting> _Val; // [sp+8h] [bp-Ch]@12

  v2 = pkProto;
  if ( this->map_BettingReq._Mysize )
  {
    if ( this->map_BettingReq._Myhead->_Left != this->map_BettingReq._Myhead )
    {
      do
      {
        v4 = this->m_nReqCount;
        this->m_nReqCount = v4 + 1;
        v2->nBettingCancelIndex = v4;
        v5 = this->map_BettingReq._Myhead;
        v6 = v5->_Parent;
        while ( !v6->_Isnil )
        {
          if ( v6->_Myval.first >= v2->nBettingCancelIndex )
          {
            v5 = v6;
            v6 = v6->_Left;
          }
          else
          {
            v6 = v6->_Right;
          }
        }
        v7 = this->map_BettingReq._Myhead;
        pkProto = (PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_REQ *)v5;
        if ( v5 == v7 || v2->nBettingCancelIndex < v5->_Myval.first )
        {
          _Val.second.nMoney = (unsigned int)v7;
          v8 = (PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_REQ **)&_Val.second.nMoney;
        }
        else
        {
          v8 = &pkProto;
        }
      }
      while ( *v8 != (PROTO_NC_GAMBLE_DICE_TAISAI_BETTING_CANCEL_REQ *)this->map_BettingReq._Myhead );
    }
  }
  else
  {
    v3 = this->m_nReqCount;
    this->m_nReqCount = v3 + 1;
    v2->nBettingCancelIndex = v3;
  }
  v9 = v2->BettingCancelInfo.nBetting;
  v10 = (std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > *)&this->map_BettingReq.comp;
  _Val.first = v2->nBettingCancelIndex;
  v11 = v2->BettingCancelInfo.nMoney;
  _Val.second.nBetting = v9;
  _Val.second.nMoney = v11;
  v12 = std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::_Buynode<std::pair<unsigned short,DiceTaiSaiBetting>>(
          (std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > *)&this->map_BettingReq.comp,
          &_Val);
  std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::_Linsert(
    v10,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,DiceTaiSaiBetting> >,0> > >,bool> *)&_Val.second,
    v12,
    0);
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Fu, 0x74u, v2, 10);
}

//----- (0070E570) --------------------------------------------------------
int __userpurge MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_BET_START_CMD@<eax>(MHDiceGameTask *this@<ecx>, int a2@<edi>, PROTO_NC_GAMBLE_DICE_TAISAI_BET_START_CMD *pkProto)
{
  MHDiceGameTask *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node **v4; // eax@2
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v5; // edx@2
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v6; // eax@4
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *j; // eax@5
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *i; // eax@8
  PgFrameWork *v9; // eax@13
  _DWORD **v10; // eax@14
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node **v11; // ecx@17
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v12; // eax@17
  NiUnsharedGeometryGroup *v13; // eax@23
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > result; // [sp+8h] [bp-10Ch]@20
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > > itr; // [sp+Ch] [bp-108h]@17
  char pcScript[256]; // [sp+10h] [bp-104h]@23

  v3 = this;
  if ( pkProto )
  {
    this->m_eDiceSaiGameMode = pkProto->bModeType;
    GambleDiceGameWin::UpdateHistory(this->m_pkGambleDiceGameWin, pkProto->CurrentRollingDice.nNumber, 0);
    v4 = &v3->map_ParticipantInfo._Myhead->_Left;
    v5 = *v4;
    if ( (std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node **)*v4 != v4 )
    {
      do
      {
        memset(&v5->_Myval.second, 0, 0xD0u);
        if ( !v5->_Isnil )
        {
          v6 = v5->_Right;
          if ( v6->_Isnil )
          {
            for ( i = v5->_Parent; !i->_Isnil; i = i->_Parent )
            {
              if ( v5 != i->_Right )
                break;
              v5 = i;
            }
            v5 = i;
          }
          else
          {
            v5 = v5->_Right;
            for ( j = v6->_Left; !j->_Isnil; j = j->_Left )
              v5 = j;
          }
        }
      }
      while ( v5 != v3->map_ParticipantInfo._Myhead );
    }
    GambleDiceGameWin::AllReset(v3->m_pkGambleDiceGameWin);
    v3->m_eDiceSaiGameStatus = 0;
    v9 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v9 )
    {
      v10 = (_DWORD **)v9[22].m_BackFrameID;
      if ( v10 )
      {
        if ( v10[88] )
          (*(void (__thiscall **)(_DWORD *, signed int))(*v10[88] + 240))(v10[88], 1);
      }
    }
    v11 = &v3->map_ParticipantInfo._Myhead->_Left;
    v12 = *v11;
    itr._Ptr = v12;
    if ( (std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node **)v12 != v11 )
    {
      do
      {
        if ( v12->_Myval.second.m_bReserveQuit == 1 )
        {
          if ( v12->_Myval.first == g_pkMainChar->m_kHandle )
          {
            MHDiceGameTask::NcGambleDiceTaisaiGameLeaveReq(v3, a2);
            return 1;
          }
          v12 = std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::erase(
                  (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v3->map_ParticipantInfo.comp,
                  &result,
                  (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > >)v12)->_Ptr;
          itr._Ptr = v12;
        }
        else
        {
          std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >,std::_Iterator_base0> *)&itr._Ptr);
          v12 = itr._Ptr;
        }
      }
      while ( v12 != v3->map_ParticipantInfo._Myhead );
    }
    v3->m_hMobID = 8669;
    memset(pcScript, 0, 0x100u);
    v13 = TextData2::Get(0x367E5072u);
    sprintf(pcScript, "%s", v13);
    NpcDialogWin::OpenNpcScriptDialog(v3->m_pkNpcDlgWin, v3->m_hMobID, pcScript, 0);
    PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v3->m_pkNpcDlgWin->vfptr);
    v3->m_nNumberOfEntrant = v3->map_ParticipantInfo._Mysize;
    std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::clear((std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *)&v3->map_BettingReq);
    v3->m_fClockAlramTime = 0.0;
    v3->m_fClockCastTime = 0.0;
    v3->m_bIsResetTimer = 0;
    *(_WORD *)&v3->m_IsClockCastPlaying = 0;
    v3->m_IsBettingStartPlaying = 0;
    v3->m_bGameStartClick = 0;
    v3->m_bComeinMHOnResultStauts = 0;
    *(_WORD *)&v3->m_bPrintDiceResult[0] = 0;
    v3->m_bPrintDiceResult[2] = 0;
    v3->m_fDiceResultTime = 0.0;
    v3->m_fDiplayLightTime = 0.0;
    *(_WORD *)&v3->m_bIsNonBettingOver = 0;
  }
  return 1;
}

//----- (0070E7B0) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_GAME_JOIN_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_GAME_JOIN_ACK *pkProto)
{
  MHDiceGameTask *v2; // ebx@1
  PgFrameWork *v3; // esi@1
  unsigned __int16 v4; // ax@2
  D3DXCOLOR *v5; // eax@4
  D3DXCOLOR v6; // ST04_16@4
  char *v7; // eax@4
  int v9; // ST10_4@8
  char *v10; // eax@8
  char *v11; // eax@8
  NiD3DDefaultShader *v12; // eax@8
  const char *v13; // eax@11
  unsigned int v14; // edx@12
  GambleDiceGameWin *v15; // ecx@12
  char *v16; // esi@13
  bool v17; // zf@17
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v18; // eax@19
  int v19; // edx@19
  unsigned __int16 v20; // dx@20
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v21; // eax@20
  PgWin *v22; // eax@20
  GambleDiceGameWin *v23; // eax@20
  PgWinSpr *v24; // esi@20
  PgWinSpr *v25; // edi@20
  signed int v26; // eax@20
  NiRefObjectVtbl *v27; // edx@20
  double v28; // st7@20
  void *(__thiscall *v29)(NiRefObject *, unsigned int); // eax@20
  int v30; // eax@20
  DICE_TAISAI_GAME_STATUS v31; // eax@20
  int v32; // eax@24
  int v33; // ecx@24
  int v34; // esi@24
  double v35; // st6@24
  GambleDiceGameWin *v36; // eax@24
  NiRefObjectVtbl **v37; // edi@24
  NiRefObjectVtbl *v38; // edx@24
  signed int v39; // eax@24
  NiRefObjectVtbl *v40; // edx@24
  double v41; // st7@24
  void *(__thiscall *v42)(NiRefObject *, unsigned int); // eax@24
  double v43; // st7@24
  int v44; // eax@24
  void *(__thiscall *v45)(NiRefObject *, unsigned int); // edx@24
  GambleDiceGameWin *v46; // eax@24
  PgWinSpr *v47; // esi@24
  PgWinSpr *v48; // edi@24
  void *(__thiscall *v49)(NiRefObject *, unsigned int); // edx@24
  double v50; // st7@24
  GambleDiceGameWin *v51; // eax@25
  int v52; // eax@25
  NiRefObjectVtbl *v53; // esi@25
  GambleDiceGameWin *v54; // eax@25
  PgWinSpr *v55; // esi@25
  void *(__thiscall *v56)(NiRefObject *, unsigned int); // edx@25
  float v57; // ecx@26
  DICE_TAISAI_GAME_STATUS v58; // eax@26
  unsigned int v59; // eax@30
  unsigned int v60; // ST10_4@31
  char *v61; // eax@31
  char *v62; // eax@31
  PgWinText *v63; // ecx@31
  std::pair<unsigned short,EntryInfo> _Val; // [sp+10h] [bp-1D4h]@19
  D3DXCOLOR result; // [sp+ECh] [bp-F8h]@4
  __int64 v66; // [sp+FCh] [bp-E8h]@17
  int i; // [sp+104h] [bp-E0h]@13
  char v68; // [sp+108h] [bp-DCh]@19
  char v69; // [sp+1DCh] [bp-8h]@19

  v2 = this;
  v3 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( !v3 )
    return 0;
  v4 = pkProto->nError;
  if ( pkProto->nError != 9744 )
  {
    switch ( v4 )
    {
      case 0x261Bu:
        v5 = ColorInfoTable::GetDxColor(&result, Center_Announcement);
        *(_QWORD *)&v6.r = *(_QWORD *)&v5->r;
        *(_QWORD *)&v6.b = *(_QWORD *)&v5->b;
        v7 = ErrMsgTable::GetErrMsg(pkProto->nError);
        GameFrameWork::AddAnnounceMsg((GameFrameWork *)v3, (int)pkProto, (int)v3, v7, v6);
        PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)v3[28].m_kMsgQ.m_uiHead);
        break;
      case 0x261Au:
        if ( !v2->m_spLowLevelWarnigWin.m_pObject )
        {
          v9 = pkProto->nUseMinLv;
          v10 = (char *)TextData2::Get(0x236E0F79u);
          v11 = fs(v10, v9);
          v12 = (NiD3DDefaultShader *)MsgBox::Modal(MSGBOX_OK, v11);
          NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spLowLevelWarnigWin, v12);
          v2->m_spLowLevelWarnigWin.m_pObject->vfptr->SetMsgHooker(
            &v2->m_spLowLevelWarnigWin.m_pObject->vfptr,
            &v2->vfptr);
        }
        break;
      case 0x2617u:
      case 0x2615u:
        v13 = fs("%d", pkProto->nError);
        GameFrameWork::AddSysMsg((GameFrameWork *)v3, v13);
        break;
    }
    return 0;
  }
  std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::clear((std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v2->map_ParticipantInfo.comp);
  std::_Tree<std::_Tmap_traits<unsigned short,DiceTaiSaiBetting,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,DiceTaiSaiBetting>>,0>>::clear((std::_Tree<std::_Tmap_traits<NiAVObject *,World::AniObjectType,std::less<NiAVObject *>,std::allocator<std::pair<NiAVObject * const,World::AniObjectType> >,0> > *)&v2->map_BettingReq);
  v2->m_fAlphaValueOfDiceWindow = 0.0;
  v2->m_eDiceSaiGameMode = 0;
  v2->m_eDiceSaiGameStatus = pkProto->nGameStatus;
  v2->m_nLengthInOneGame = ((signed int)(1717986919 * (unsigned __int64)pkProto->nTimer >> 32) >> 2)
                         + ((unsigned int)(1717986919 * (unsigned __int64)pkProto->nTimer >> 32) >> 31);
  v2->m_nInterval = SLOWORD(pkProto->nInterval) / 10;
  v2->m_nGameCnt = pkProto->nGamerCnt;
  v2->m_nGetSystemTaxRate = pkProto->nGetSysRate;
  v14 = pkProto->nMaxBetMoney;
  v2->m_eBettingAmount = 0;
  v2->m_bOutReserveOnMiniHouse = 0;
  v2->m_nMaxBetMoney = v14;
  v2->m_bIsGusetStatus = 1;
  v2->m_nInvenRemainMoney = User::Coin(&g_kUser);
  v2->m_pkGambleDiceGameWin = (GambleDiceGameWin *)v3[23].vfptr;
  v2->m_pkMiniGameWin = (mhMinimizeDiceGameWin *)v3[22].vfptr;
  v2->m_pkDiceHelpWin = (mhDiceHelpWin *)v3[22].m_pkMsgHooker;
  v2->m_pkDiceRankWin = (mhDiceRankWin *)v3[22].m_uiMessageNum;
  v2->m_pkDiceRateSheetWin = (mhDiceRateSheetWin *)v3[22].m_kMsgQ.m_pBase;
  v15 = v2->m_pkGambleDiceGameWin;
  v2->m_pkNpcDlgWin = (NpcDialogWin *)v3[22].m_kMsgQ.m_uiAlloced;
  if ( !v15 )
    return 0;
  ((void (__stdcall *)(_DWORD))v15->vfptr[69].__vecDelDtor)(v2->m_fAlphaValueOfDiceWindow);
  ((void (__stdcall *)(_DWORD))v2->m_pkGambleDiceGameWin->vfptr[60].__vecDelDtor)(0);
  GambleDiceGameWin::UpdateHistory(v2->m_pkGambleDiceGameWin, 0, 1);
  v2->m_nNumberOfEntrant = v2->m_nGameCnt;
  i = 6;
  v16 = pkProto->DiceHistory[6].nNumber;
  do
  {
    if ( v16 )
      GambleDiceGameWin::UpdateHistory(v2->m_pkGambleDiceGameWin, v16, 0);
    v16 -= 3;
    --i;
  }
  while ( i >= 0 );
  v17 = v2->m_nGameCnt == 0;
  HIDWORD(v66) = 0;
  if ( !v17 )
  {
    i = (int)&pkProto[1];
    do
    {
      v69 = 0;
      memset(&v68, 0, 0xD0u);
      _Val.first = *(_WORD *)i;
      qmemcpy(&_Val.second, &v68, sizeof(_Val.second));
      v18 = std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Buynode<std::pair<unsigned short,EntryInfo>>(
              (std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v2->map_ParticipantInfo.comp,
              &_Val);
      std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Linsert(
        (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v2->map_ParticipantInfo.comp,
        (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > >,bool> *)&result.b,
        v18,
        0);
      v19 = v2->m_nGameCnt;
      i += 2;
      ++HIDWORD(v66);
    }
    while ( SHIDWORD(v66) < v19 );
  }
  v20 = g_pkMainChar->m_kHandle;
  v69 = 0;
  memset(&v68, 0, 0xD0u);
  _Val.first = v20;
  qmemcpy(&_Val.second, &v68, sizeof(_Val.second));
  v21 = std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Buynode<std::pair<unsigned short,EntryInfo>>(
          (std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v2->map_ParticipantInfo.comp,
          &_Val);
  std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Linsert(
    (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&v2->map_ParticipantInfo.comp,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > >,bool> *)&result.b,
    v21,
    0);
  v22 = (PgWin *)&v2->m_pkGambleDiceGameWin->vfptr;
  ++v2->m_nNumberOfEntrant;
  PgWinMgr::ShowWin(&Pgg_kWinMgr, v22);
  GambleDiceGameWin::SetMoneyWin(v2->m_pkGambleDiceGameWin, 0i64);
  v23 = v2->m_pkGambleDiceGameWin;
  v24 = v23->m_spTimerFill.m_pObject;
  v25 = v23->m_spTimer.m_pObject;
  v26 = ((int (__thiscall *)(PgWinSpr *))v24->vfptr[41].__vecDelDtor)(v24);
  v27 = v24->vfptr;
  v26 -= 8;
  HIDWORD(v66) = v26;
  v28 = (double)v26;
  v29 = v27[42].__vecDelDtor;
  result.g = v28;
  v30 = ((int (__thiscall *)(PgWinSpr *))v29)(v24) - 10;
  HIDWORD(v66) = v30;
  v25->m_kLocal.m_Translate.x = result.g;
  result.b = (double)v30;
  v25->m_kLocal.m_Translate.y = result.b;
  result.a = 1.0;
  v25->m_kLocal.m_Translate.z = 1.0;
  ((void (__stdcall *)(signed int))v2->m_pkGambleDiceGameWin->m_spTimerFill.m_pObject->vfptr[64].__vecDelDtor)(1);
  GambleDiceGameWin::OnBettingAmount(v2->m_pkGambleDiceGameWin, 0, (BETTING_LEVEL_COIN)v2->m_eBettingAmount);
  v31 = v2->m_eDiceSaiGameStatus;
  v2->m_fClockCastTime = 0.0;
  v2->m_fTimerPosOnPregress = 0.0;
  v2->m_bIsResetTimer = 0;
  *(_WORD *)&v2->m_IsClockCastPlaying = 0;
  v2->m_IsBettingStartPlaying = 0;
  v2->m_bGameStartClick = 0;
  *(_WORD *)&v2->m_bIsNonBettingOver = 0;
  if ( v31 == 1 )
  {
    HIDWORD(v66) = v2->m_nLengthInOneGame - v2->m_nInterval;
    v2->m_fClockAlramTime = (double)SHIDWORD(v66);
  }
  else
  {
    v2->m_fClockAlramTime = 0.0;
  }
  if ( v31 == 1 )
  {
    v32 = ((int (*)(void))v2->m_pkGambleDiceGameWin->m_spTimerFill.m_pObject->vfptr[36].__vecDelDtor)();
    v33 = v2->m_nInterval;
    v34 = v32 - 25;
    i = v2->m_nLengthInOneGame;
    HIDWORD(v66) = v32 - 25;
    v35 = (double)(unsigned int)(v32 - 25) / (double)i;
    v36 = v2->m_pkGambleDiceGameWin;
    v2->m_fTimerPosOnPregress = (double)(i - v33) * v35 + v2->m_fTimerPosOnPregress;
    v37 = &v36->m_spTimerFill.m_pObject->vfptr;
    v38 = *v37;
    i = (int)v36->m_spTimer.m_pObject;
    v39 = ((int (__thiscall *)(NiRefObjectVtbl **))v38[41].__vecDelDtor)(v37);
    v40 = *v37;
    HIDWORD(v66) = v39;
    v41 = (double)v39;
    v42 = v40[42].__vecDelDtor;
    result.g = v41 + v2->m_fTimerPosOnPregress;
    HIDWORD(v66) = ((int (__thiscall *)(NiRefObjectVtbl **))v42)(v37) - 10;
    v43 = (double)SHIDWORD(v66);
    v44 = i;
    *(float *)(i + 88) = result.g;
    result.b = v43;
    *(float *)(v44 + 92) = result.b;
    result.a = 1.0;
    *(float *)(v44 + 96) = 1.0;
    v45 = v2->m_pkGambleDiceGameWin->m_spTimerBack.m_pObject->vfptr[117].__vecDelDtor;
    v66 = (signed __int64)v2->m_fTimerPosOnPregress;
    ((void (__stdcall *)(_DWORD))v45)(v34 - v66);
    v46 = v2->m_pkGambleDiceGameWin;
    v47 = v46->m_spTimerFill.m_pObject;
    v48 = v46->m_spTimerBack.m_pObject;
    HIDWORD(v66) = ((int (__thiscall *)(PgWinSpr *))v47->vfptr[41].__vecDelDtor)(v46->m_spTimerFill.m_pObject);
    v49 = v47->vfptr[42].__vecDelDtor;
    result.g = (double)SHIDWORD(v66) + v2->m_fTimerPosOnPregress + 8.0;
    HIDWORD(v66) = ((int (__thiscall *)(PgWinSpr *))v49)(v47);
    v50 = (double)SHIDWORD(v66);
  }
  else
  {
    v51 = v2->m_pkGambleDiceGameWin;
    v2->m_fTimerPosOnPregress = 0.0;
    v52 = ((int (*)(void))v51->m_spTimerFill.m_pObject->vfptr[36].__vecDelDtor)();
    v53 = v2->m_pkGambleDiceGameWin->m_spTimerBack.m_pObject->vfptr;
    v66 = (signed __int64)v2->m_fTimerPosOnPregress;
    ((void (__stdcall *)(_DWORD))v53[117].__vecDelDtor)(v52 - 7 - v66);
    v54 = v2->m_pkGambleDiceGameWin;
    v55 = v54->m_spTimerFill.m_pObject;
    v48 = v54->m_spTimerBack.m_pObject;
    HIDWORD(v66) = ((int (__thiscall *)(PgWinSpr *))v55->vfptr[41].__vecDelDtor)(v54->m_spTimerFill.m_pObject);
    v56 = v55->vfptr[42].__vecDelDtor;
    result.g = (double)SHIDWORD(v66) + v2->m_fTimerPosOnPregress + 8.0;
    HIDWORD(v66) = ((int (__thiscall *)(PgWinSpr *))v56)(v55);
    v50 = (double)SHIDWORD(v66);
  }
  result.b = v50;
  v57 = result.b;
  v48->m_kLocal.m_Translate.x = result.g;
  result.a = 1.0;
  v48->m_kLocal.m_Translate.y = v57;
  v48->m_kLocal.m_Translate.z = 1.0;
  v58 = v2->m_eDiceSaiGameStatus;
  v2->m_bComeinMHOnResultStauts = v58 == 2 || v58 == 3;
  *(_WORD *)&v2->m_bPrintDiceResult[0] = 0;
  v2->m_bPrintDiceResult[2] = 0;
  GambleDiceGameWin::TurnOnLight(v2->m_pkGambleDiceGameWin, 1, 0, 0);
  GambleDiceGameWin::EnableBetLevelBtn(v2->m_pkGambleDiceGameWin, v2->m_nMaxBetMoney);
  SoundMgr::PlayInterfaceSound(&g_kSoundMgr, DiceConnect);
  SoundMgr::StopBGM(&g_kSoundMgr);
  v59 = v2->m_nMaxBetMoney;
  v2->m_bIsEnterGameRoom = 1;
  v2->m_eDiceGameMode = 2;
  if ( v59 )
  {
    v60 = v59;
    v61 = (char *)TextData2::Get(0x620EE2AEu);
    v62 = fs(v61, v60);
    v63 = v2->m_pkGambleDiceGameWin->m_spTitleText.m_pObject;
    if ( v63 )
      ((void (__stdcall *)(char *))v63->vfptr[118].__vecDelDtor)(v62);
  }
  v2->m_hMobID = -1;
  return 1;
}

//----- (0070EFA0) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_GAME_JOIN_CMD(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_GAME_JOIN_CMD *pkProto)
{
  std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> >::_Node *v3; // eax@1
  Char *v4; // edi@1
  PgFrameWork *v5; // esi@1
  int v6; // edi@3
  char *v7; // eax@3
  const char *v8; // eax@3
  D3DXCOLOR *v9; // eax@3
  D3DXCOLOR v10; // ST08_16@3
  char *v11; // eax@3
  char *v12; // eax@3
  int v13; // eax@6
  std::pair<unsigned short,EntryInfo> _Val; // [sp+Ch] [bp-1CCh]@1
  D3DXCOLOR result; // [sp+E8h] [bp-F0h]@1
  MHDiceGameTask *v16; // [sp+F8h] [bp-E0h]@1
  char v17; // [sp+FCh] [bp-DCh]@1
  char v18; // [sp+1D0h] [bp-8h]@1

  v18 = 0;
  memset(&v17, 0, 0xD0u);
  _Val.first = pkProto->nPlayerHnd;
  qmemcpy(&_Val.second, &v17, sizeof(_Val.second));
  v2 = (std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&this->map_ParticipantInfo.comp;
  v16 = this;
  v3 = std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Buynode<std::pair<unsigned short,EntryInfo>>(
         (std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > *)&this->map_ParticipantInfo.comp,
         &_Val);
  std::_Tree<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const,EntryInfo>>,0>>::_Linsert(
    v2,
    (std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<unsigned short,EntryInfo,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,EntryInfo> >,0> > >,bool> *)&result.b,
    v3,
    0);
  v4 = CharMgr::GetChar(&g_kCharMgr, pkProto->nPlayerHnd);
  v5 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v5 )
  {
    if ( v4 )
    {
      v6 = ((int (__thiscall *)(Char *))v4->vfptr[2].DeleteAbStateByAbstateIndex)(v4);
      v7 = (char *)TextData2::Get(0x7F90C3D5u);
      v8 = fs(v7, v6);
      GameFrameWork::AddSysMsg((GameFrameWork *)v5, v8);
      v9 = ColorInfoTable::GetDxColor(&result, Center_Announcement);
      *(_QWORD *)&v10.r = *(_QWORD *)&v9->r;
      *(_QWORD *)&v10.b = *(_QWORD *)&v9->b;
      v11 = (char *)TextData2::Get(0x7F90C3D5u);
      v12 = fs(v11, v6);
      GameFrameWork::AddAnnounceMsg((GameFrameWork *)v5, v6, (int)v5, v12, v10);
      PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)v5[28].m_kMsgQ.m_uiHead);
    }
    if ( v16->m_eDiceSaiGameStatus == DTGS_NONE_BETTING )
      v16->m_nNumberOfEntrant = v16->map_ParticipantInfo._Mysize;
    v13 = 1;
  }
  else
  {
    v13 = 0;
  }
  return v13;
}

//----- (0070F110) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_ALL_RANK_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_ALL_RANK_ACK *pkProto)
{
  MHDiceGameTask *v2; // esi@1
  mhDiceRankWin *v3; // ecx@6

  v2 = this;
  if ( pkProto->nError == 9872 && this->m_pkGambleDiceGameWin )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkDiceRankWin->vfptr[65].__vecDelDtor)() )
      PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkDiceRankWin->vfptr);
    else
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkDiceRankWin->vfptr);
    v3 = v2->m_pkDiceRankWin;
    if ( v3->m_nCurSelTab != 1 )
      mhDiceRankWin::OnTAB1(v3);
    mhDiceRankWin::UpdateAllRankList(v2->m_pkDiceRankWin, pkProto);
    mhDiceRankWin::UpdateViewList(v2->m_pkDiceRankWin);
  }
  return 1;
}

//----- (0070F190) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_DICE_TAISAI_CURR_RANK_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_DICE_TAISAI_CURR_RANK_ACK *pkProto)
{
  MHDiceGameTask *v2; // esi@1
  mhDiceRankWin *v3; // ecx@6

  v2 = this;
  if ( pkProto->nError == 9888 && this->m_pkGambleDiceGameWin )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkDiceRankWin->vfptr[65].__vecDelDtor)() )
      PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkDiceRankWin->vfptr);
    else
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkDiceRankWin->vfptr);
    v3 = v2->m_pkDiceRankWin;
    if ( v3->m_nCurSelTab == 1 )
      mhDiceRankWin::OnTAB2(v3);
    mhDiceRankWin::UpdateCurRankList(v2->m_pkDiceRankWin, pkProto);
    mhDiceRankWin::UpdateViewList(v2->m_pkDiceRankWin);
  }
  return 1;
}

//----- (0070F210) --------------------------------------------------------
void __thiscall mhDiceRankWin::OnTAB1(mhDiceRankWin *this)
{
  mhDiceRankWin *v1; // esi@1

  v1 = this;
  this->m_pkTab01->m_bCheck = 1;
  this->m_pkTab02->m_bCheck = 0;
  ((void (__stdcall *)(_DWORD))this->m_pkTab02->vfptr[123].__vecDelDtor)(0);
  v1->m_nCurSelTab = 1;
  mhDiceRankWin::UpdateViewList(v1);
}

//----- (0070F260) --------------------------------------------------------
void __thiscall mhDiceRankWin::OnTAB2(mhDiceRankWin *this)
{
  mhDiceRankWin *v1; // esi@1

  v1 = this;
  this->m_pkTab01->m_bCheck = 0;
  ((void (__stdcall *)(_DWORD))this->m_pkTab01->vfptr[123].__vecDelDtor)(0);
  v1->m_pkTab02->m_bCheck = 1;
  v1->m_nCurSelTab = 2;
  mhDiceRankWin::UpdateViewList(v1);
}

//----- (0070F2B0) --------------------------------------------------------
void __thiscall mhDiceRankWin::UpdateAllRankList(mhDiceRankWin *this, PROTO_NC_GAMBLE_DICE_TAISAI_ALL_RANK_ACK *pkProto)
{
  DiceRankInfo *v2; // eax@2
  char *v3; // edi@2
  DiceRankInfo *v4; // ecx@2
  signed int v5; // edi@4
  PROTO_NC_GAMBLE_DICE_TAISAI_ALL_RANK_ACK *v6; // esi@5
  unsigned int v7; // ecx@6
  unsigned int v8; // edx@6
  unsigned int v9; // ebx@6
  std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *v10; // [sp+4h] [bp-24h]@2
  DiceRankInfo kInfo; // [sp+Ch] [bp-1Ch]@6

  if ( pkProto )
  {
    v2 = this->m_CarrerRankList._Mylast;
    v3 = (char *)&this->m_CarrerRankList;
    v4 = this->m_CarrerRankList._Myfirst;
    v10 = (std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *)v3;
    if ( v4 != v2 )
      *((_DWORD *)v3 + 1) = std::_Move<DiceRankInfo *,DiceRankInfo *>(v2, v2, v4);
    v5 = 0;
    if ( pkProto->nRankAllCnt )
    {
      v6 = pkProto + 1;
      do
      {
        v7 = *(_DWORD *)((char *)&v6[1].nError + 1);
        v8 = *(_DWORD *)&v6[2].nRankAllCnt;
        v9 = *(_DWORD *)&v6[6].nRankAllCnt;
        kInfo.sCharID.n5_code[0] = *(_DWORD *)&v6->nError;
        *(_QWORD *)&kInfo.sCharID.n5_code[3] = *(_QWORD *)&v6[4].nError;
        *(_QWORD *)&kInfo.sCharID.n5_code[1] = __PAIR__(v8, v7);
        kInfo.nWinCnt = v9;
        std::vector<SlotJackpotRankInfo,std::allocator<SlotJackpotRankInfo>>::push_back(v10, &kInfo);
        ++v5;
        v6 += 8;
      }
      while ( v5 < pkProto->nRankAllCnt );
    }
  }
}

//----- (0070F360) --------------------------------------------------------
void __thiscall mhDiceRankWin::UpdateCurRankList(mhDiceRankWin *this, PROTO_NC_GAMBLE_DICE_TAISAI_CURR_RANK_ACK *pkProto)
{
  DiceRankInfo *v2; // eax@2
  char *v3; // edi@2
  DiceRankInfo *v4; // ecx@2
  signed int v5; // edi@4
  PROTO_NC_GAMBLE_DICE_TAISAI_CURR_RANK_ACK *v6; // esi@5
  unsigned int v7; // ecx@6
  unsigned int v8; // edx@6
  unsigned int v9; // ebx@6
  std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *v10; // [sp+4h] [bp-24h]@2
  DiceRankInfo kInfo; // [sp+Ch] [bp-1Ch]@6

  if ( pkProto )
  {
    v2 = this->m_CurRankList._Mylast;
    v3 = (char *)&this->m_CurRankList;
    v4 = this->m_CurRankList._Myfirst;
    v10 = (std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *)v3;
    if ( v4 != v2 )
      *((_DWORD *)v3 + 1) = std::_Move<DiceRankInfo *,DiceRankInfo *>(v2, v2, v4);
    v5 = 0;
    if ( pkProto->nRankCurrCnt )
    {
      v6 = pkProto + 1;
      do
      {
        v7 = *(_DWORD *)((char *)&v6[1].nError + 1);
        v8 = *(_DWORD *)&v6[2].nRankCurrCnt;
        v9 = *(_DWORD *)&v6[6].nRankCurrCnt;
        kInfo.sCharID.n5_code[0] = *(_DWORD *)&v6->nError;
        *(_QWORD *)&kInfo.sCharID.n5_code[3] = *(_QWORD *)&v6[4].nError;
        *(_QWORD *)&kInfo.sCharID.n5_code[1] = __PAIR__(v8, v7);
        kInfo.nWinCnt = v9;
        std::vector<SlotJackpotRankInfo,std::allocator<SlotJackpotRankInfo>>::push_back(v10, &kInfo);
        ++v5;
        v6 += 8;
      }
      while ( v5 < pkProto->nRankCurrCnt );
    }
  }
}

//----- (0070F410) --------------------------------------------------------
void __thiscall BettingBut::~BettingBut(BettingBut *this)
{
  this->vfptr = (NiRefObjectVtbl *)&BettingBut::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&BettingBut::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
}
// 9CBEB0: using guessed type void (__thiscall *BettingBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CBECC: using guessed type int (__thiscall *BettingBut::`vftable'{for `NiNode'})(void *p, char);

//----- (0070F430) --------------------------------------------------------
void __thiscall BettingBut::SwitchSpr(BettingBut *this, float fDelta)
{
  BettingBut *v2; // esi@1

  v2 = this;
  if ( this->m_fAlphaOfButton <= 0.1000000014901161 )
  {
    ((void (__stdcall *)(_DWORD))this->vfptr[123].__vecDelDtor)(this->m_uiNextSprIdx);
    v2->m_bIsSwitched = 1;
  }
  else
  {
    this->m_fAlphaOfButton = this->m_fAlphaOfButton - fDelta;
  }
  v2->vfptr[69].__vecDelDtor((NiRefObject *)v2, COERCE_UNSIGNED_INT(v2->m_fAlphaOfButton));
}

//----- (0070F490) --------------------------------------------------------
void __thiscall ToggleBut::ToggleBut(ToggleBut *this)
{
  ToggleBut *v1; // esi@1

  v1 = this;
  PgWinBut::PgWinBut((PgWinBut *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&ToggleBut::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&ToggleBut::`vftable'{for `IDirectMessenger'};
}
// 9CC108: using guessed type void (__thiscall *ToggleBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CC124: using guessed type int (__thiscall *ToggleBut::`vftable'{for `NiNode'})(void *p, char);

//----- (0070F4B0) --------------------------------------------------------
void __thiscall ToggleBut::~ToggleBut(ToggleBut *this)
{
  this->vfptr = (NiRefObjectVtbl *)&ToggleBut::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ToggleBut::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
}
// 9CC108: using guessed type void (__thiscall *ToggleBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CC124: using guessed type int (__thiscall *ToggleBut::`vftable'{for `NiNode'})(void *p, char);

//----- (0070F4D0) --------------------------------------------------------
void __thiscall ToggleBut::ReleaseMeInput(ToggleBut *this)
{
  ToggleBut *v1; // esi@1
  void *(__thiscall *v2)(NiRefObject *, unsigned int); // edx@2

  v1 = this;
  if ( this->m_bClickCheck )
    goto LABEL_7;
  v2 = this->vfptr[138].__vecDelDtor;
  if ( this->m_bHadBeenPushed )
    ((void (__stdcall *)(_DWORD))v2)(2);
  else
    ((void (__stdcall *)(_DWORD))v2)(0);
  if ( v1->m_bHighlight )
  {
    this = v1;
LABEL_7:
    v1->vfptr[138].__vecDelDtor((NiRefObject *)this, 1u);
  }
}

//----- (0070F510) --------------------------------------------------------
void __thiscall ToggleBut::SetMark(ToggleBut *this, bool bMark)
{
  ToggleBut *v2; // esi@1
  NiRefObjectVtbl *v3; // edx@1
  void *(__thiscall *v4)(NiRefObject *, unsigned int); // eax@2

  v2 = this;
  v3 = this->vfptr;
  this->m_bHighlight = bMark;
  if ( (unsigned __int8)((int (*)(void))v3[78].__vecDelDtor)() )
  {
    v4 = v2->vfptr[138].__vecDelDtor;
    if ( v2->m_bHighlight )
      v4((NiRefObject *)&v2->vfptr, 1u);
    else
      v4((NiRefObject *)&v2->vfptr, 0);
  }
}

//----- (0070F560) --------------------------------------------------------
void __thiscall MiniHouseDiceGameWin::SetMoneyWin(MiniHouseDiceGameWin *this, unsigned int nPlayerMoney)
{
  this->m_nUserBettingMoney = nPlayerMoney;
}

//----- (0070F570) --------------------------------------------------------
void __thiscall mhMinimizeDiceGameWin::mhMinimizeDiceGameWin(mhMinimizeDiceGameWin *this)
{
  mhMinimizeDiceGameWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&mhMinimizeDiceGameWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&mhMinimizeDiceGameWin::`vftable'{for `IDirectMessenger'};
  v1->m_bAutoOnOff = 0;
}
// 9CC35C: using guessed type void (__thiscall *mhMinimizeDiceGameWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CC37C: using guessed type int (__thiscall *mhMinimizeDiceGameWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0070F5A0) --------------------------------------------------------
void __thiscall mhMinimizeDiceGameWin::~mhMinimizeDiceGameWin(mhMinimizeDiceGameWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&mhMinimizeDiceGameWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhMinimizeDiceGameWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9CC35C: using guessed type void (__thiscall *mhMinimizeDiceGameWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CC37C: using guessed type int (__thiscall *mhMinimizeDiceGameWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0070F5C0) --------------------------------------------------------
void __thiscall mhDiceHelpWin::mhDiceHelpWin(mhDiceHelpWin *this)
{
  mhDiceHelpWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&mhDiceHelpWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&mhDiceHelpWin::`vftable'{for `IDirectMessenger'};
}
// 9CC5A0: using guessed type void (__thiscall *mhDiceHelpWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CC5BC: using guessed type int (__thiscall *mhDiceHelpWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0070F5E0) --------------------------------------------------------
void __thiscall mhDiceHelpWin::~mhDiceHelpWin(mhDiceHelpWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&mhDiceHelpWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhDiceHelpWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9CC5A0: using guessed type void (__thiscall *mhDiceHelpWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CC5BC: using guessed type int (__thiscall *mhDiceHelpWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0070F600) --------------------------------------------------------
void __thiscall mhDiceHelpWin::UpdateMeWin(mhDiceHelpWin *this, float fCurTime)
{
  mhDiceHelpWin *v2; // esi@1

  v2 = this;
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
    GameFrameWork::UpdateUIScroll(v2->m_pListWin, v2->m_pSlideBar);
}

//----- (0070F630) --------------------------------------------------------
void __thiscall mhDiceRankWin::DirectMessage(mhDiceRankWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  mhDiceRankWin *v4; // esi@1
  SlideListWin *v5; // ecx@1

  v4 = this;
  v5 = (SlideListWin *)this->m_pkSprRankGold[6];
  if ( v5 )
    v4->m_pkSprRankGold[7] = (PgWinSpr *)SlideListWin::GetCurSelIndex(v5);
}

//----- (0070F680) --------------------------------------------------------
void __thiscall mhDiceRateSheetWin::mhDiceRateSheetWin(mhDiceRateSheetWin *this)
{
  mhDiceRateSheetWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&mhDiceRateSheetWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&mhDiceRateSheetWin::`vftable'{for `IDirectMessenger'};
}
// 9CC7E0: using guessed type void (__thiscall *mhDiceRateSheetWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CC7FC: using guessed type int (__thiscall *mhDiceRateSheetWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0070F6A0) --------------------------------------------------------
void __thiscall mhDiceRateSheetWin::~mhDiceRateSheetWin(mhDiceRateSheetWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&mhDiceRateSheetWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhDiceRateSheetWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9CC7E0: using guessed type void (__thiscall *mhDiceRateSheetWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CC7FC: using guessed type int (__thiscall *mhDiceRateSheetWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0070F6C0) --------------------------------------------------------
void __thiscall GambleDiceGameWin::SetMoneyWin(GambleDiceGameWin *this, __int64 nPlayerMoney)
{
  this->m_nUserBettingMoney = nPlayerMoney;
}

//----- (0070F6E0) --------------------------------------------------------
void __thiscall BettingBut::BettingBut(BettingBut *this)
{
  BettingBut *v1; // esi@1

  v1 = this;
  PgWinBut::PgWinBut((PgWinBut *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&BettingBut::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&BettingBut::`vftable'{for `IDirectMessenger'};
  v1->m_kTimer.m_fStartTime = 0.0;
  v1->m_kTimer.m_fObjectTime = 0.0;
  v1->m_kTimer.m_fElapsedTime = 0.0;
  v1->m_Pos = 0;
}
// 9CBEB0: using guessed type void (__thiscall *BettingBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CBECC: using guessed type int (__thiscall *BettingBut::`vftable'{for `NiNode'})(void *p, char);

//----- (0070F720) --------------------------------------------------------
void __thiscall ToggleBut::ProcessMeInput(ToggleBut *this, bool *bHit)
{
  ToggleBut *v2; // esi@1
  void *(__thiscall *v3)(NiRefObject *, unsigned int); // edx@22
  ToggleBut *v4; // ecx@22

  v2 = this;
  if ( !(unsigned __int8)((int (*)(void))this->vfptr[78].__vecDelDtor)() )
    return;
  if ( dword_B64790 )
    ++dword_B64790;
  if ( dword_B6479C )
    ++dword_B6479C;
  PgWin::ProcessMeInput((PgWin *)&v2->vfptr, bHit);
  byte_B6478C = 0;
  byte_B64798 = 0;
  if ( dword_B64790 >= 1 && *bHit )
  {
    if ( v2->m_eType )
    {
      PgWin::ms_pkCapture = (PgWin *)v2;
      v2->m_bHadBeenPushed = 1;
      byte_B6478C = 1;
    }
    else
    {
      ((void (__thiscall *)(_DWORD))v2->vfptr[132].__vecDelDtor)(v2);
      if ( v2->m_bEnableClickSound )
        PgExternalLib::ClickSound();
      v2->m_bHadBeenPushed = 0;
      byte_B6478C = 1;
    }
  }
  else if ( dword_B6479C >= 1 )
  {
    v2->m_bHadBeenPushed = 0;
    if ( (ToggleBut *)PgWin::ms_pkCapture == v2 )
    {
      PgWin::ms_pkCapture = 0;
      byte_B64798 = 1;
    }
    if ( *bHit )
    {
      if ( v2->m_eType == 1 )
      {
        ((void (__thiscall *)(_DWORD))v2->vfptr[132].__vecDelDtor)(v2);
        if ( v2->m_bEnableClickSound )
          PgExternalLib::ClickSound();
      }
      byte_B64798 = 1;
    }
  }
  if ( v2->m_bClickCheck )
  {
LABEL_29:
    v3 = v2->vfptr[138].__vecDelDtor;
    v4 = v2;
    goto LABEL_30;
  }
  v3 = v2->vfptr[138].__vecDelDtor;
  v4 = v2;
  if ( !*bHit )
  {
    if ( v2->m_bHadBeenPushed )
      v3((NiRefObject *)&v2->vfptr, 2u);
    else
      v3((NiRefObject *)&v2->vfptr, 0);
    if ( !v2->m_bHighlight )
      goto LABEL_31;
    goto LABEL_29;
  }
  if ( !v2->m_bHadBeenPushed )
  {
    v3((NiRefObject *)&v2->vfptr, 2u);
    goto LABEL_31;
  }
LABEL_30:
  v3((NiRefObject *)&v4->vfptr, 1u);
LABEL_31:
  if ( byte_B6478C && dword_B64790 )
    --dword_B64790;
  byte_B6478C = 0;
  if ( byte_B64798 && dword_B6479C )
    --dword_B6479C;
  byte_B64798 = 0;
  if ( dword_B64790 )
    --dword_B64790;
  if ( dword_B6479C )
    --dword_B6479C;
}
// B6478C: using guessed type char byte_B6478C;
// B64790: using guessed type int dword_B64790;
// B64798: using guessed type char byte_B64798;
// B6479C: using guessed type int dword_B6479C;

//----- (0070F8C0) --------------------------------------------------------
void __thiscall ToggleBut::SetButShow(ToggleBut *this, PgWinBut::ButShow eShow)
{
  ToggleBut *v2; // esi@1
  void *(__thiscall *v3)(NiRefObject *, unsigned int); // edx@4
  ToggleBut *v4; // ecx@4

  v2 = this;
  if ( this->m_eButShow != eShow )
  {
    ((void (__stdcall *)(_DWORD))this->vfptr[139].__vecDelDtor)(eShow);
    v2->m_eButShow = eShow;
    switch ( eShow )
    {
      case 0:
        goto LABEL_3;
      case 1:
        v3 = v2->vfptr[123].__vecDelDtor;
        v4 = v2;
        if ( v2->m_uiButNum <= 1 )
          goto LABEL_5;
        v3((NiRefObject *)&v2->vfptr, 1u);
        break;
      case 2:
        v3 = v2->vfptr[123].__vecDelDtor;
        v4 = v2;
        if ( v2->m_uiButNum <= 2 )
LABEL_5:
          v3((NiRefObject *)&v4->vfptr, 0);
        else
          v3((NiRefObject *)&v2->vfptr, 2u);
        break;
      case 3:
        if ( v2->m_uiButNum <= 3 )
LABEL_3:
          v2->vfptr[123].__vecDelDtor((NiRefObject *)v2, 0);
        else
          v2->vfptr[123].__vecDelDtor((NiRefObject *)v2, 3u);
        break;
      default:
        return;
    }
  }
}

//----- (0070F980) --------------------------------------------------------
void __stdcall MiniHouseDiceGameWin::OnBettingButton(unsigned int uiMsgCmd, bool IsLeftBtn)
{
  DICE_TAISAI_GAME_STATUS v3; // esi@1
  MHDiceGameTask *v4; // edi@2
  void (__thiscall ***v5)(_DWORD, _DWORD); // esi@8
  MHDiceGameTask *v6; // ecx@12
  void (__cdecl ***v7)(_DWORD); // esi@13
  MHDiceGameTask *v8; // ecx@18
  MHDiceGameTask *v9; // esi@19
  NiPointer<MHDiceGameTask> v10; // [sp+10h] [bp-14h]@18
  NiPointer<MHDiceGameTask> result; // [sp+14h] [bp-10h]@1
  int v12; // [sp+20h] [bp-4h]@12

  v3 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject->m_eDiceSaiGameStatus;
  if ( result.m_pObject )
  {
    v4 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
  }
  if ( !IsLeftBtn || v3 && v3 != 1 )
  {
    if ( v3 == DTGS_NONE_BETTING || v3 == 1 )
    {
      v8 = MHDiceGameTask::GetDiceGameTask(&v10)->m_pObject;
      v12 = 1;
      MHDiceGameTask::OnBettingCancel(v8, (DICE_TAISAI_BETTING)uiMsgCmd);
      v12 = -1;
      if ( v10.m_pObject )
      {
        v9 = v10.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&v10.m_pObject->m_uiRefCount) )
        {
          if ( v9 )
            v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
        }
      }
    }
  }
  else
  {
    MHDiceGameTask::GetDiceGameTask((NiPointer<MHDiceGameTask> *)&IsLeftBtn);
    v5 = (void (__thiscall ***)(_DWORD, _DWORD))IsLeftBtn;
    if ( IsLeftBtn && !InterlockedDecrement((volatile LONG *)(IsLeftBtn + 4)) && v5 )
      (**v5)(v5, 1);
    v6 = MHDiceGameTask::GetDiceGameTask((NiPointer<MHDiceGameTask> *)&IsLeftBtn)->m_pObject;
    v12 = 0;
    MHDiceGameTask::OnBetting(v6, (DICE_TAISAI_BETTING)uiMsgCmd);
    v12 = -1;
    if ( IsLeftBtn )
    {
      v7 = (void (__cdecl ***)(_DWORD))IsLeftBtn;
      if ( !InterlockedDecrement((volatile LONG *)(IsLeftBtn + 4)) )
      {
        if ( v7 )
          (**v7)(1);
      }
    }
  }
}

//----- (0070FAF0) --------------------------------------------------------
void __thiscall MiniHouseDiceGameWin::OnBettingAmout(MiniHouseDiceGameWin *this, unsigned int uiButton, BETTING_LEVEL_MONEY amount)
{
  MiniHouseDiceGameWin *v3; // ebx@1
  ToggleBut *v4; // esi@1
  bool v5; // zf@1
  void *(__thiscall *v6)(NiRefObject *, unsigned int); // eax@2
  signed int v7; // edi@4
  int v8; // ebx@4
  int v9; // esi@7
  int (__thiscall *v10)(int); // eax@7
  MHDiceGameTask *v11; // esi@10
  NiPointer<MHDiceGameTask> result; // [sp+8h] [bp-4h]@1

  v3 = this;
  v4 = this->m_pkChipSelectBut[amount].m_pObject;
  v5 = v4->m_bHighlight == 0;
  result.m_pObject = (MHDiceGameTask *)this;
  if ( !v5 )
  {
    v6 = v4->vfptr[78].__vecDelDtor;
    v4->m_bHighlight = 0;
    if ( (unsigned __int8)((int (__thiscall *)(ToggleBut *))v6)(v4) )
      v4->vfptr[138].__vecDelDtor((NiRefObject *)v4, v4->m_bHighlight != 0);
    v7 = 0;
    v8 = (int)v3->m_pkChipSelectBut;
    do
    {
      if ( v7 != amount )
      {
        if ( (unsigned __int8)(*(int (**)(void))(**((_DWORD **)&result.m_pObject->m_DiceTaiSai.m_Dice[69].isTriple
                                                  + amount)
                                               + 244))() )
        {
          v9 = *(_DWORD *)v8;
          v10 = *(int (__thiscall **)(int))(**(_DWORD **)v8 + 312);
          *(_BYTE *)(v9 + 324) = 1;
          if ( (unsigned __int8)v10(v9) )
            (*(void (__thiscall **)(int, _DWORD))(*(_DWORD *)v9 + 552))(v9, *(_BYTE *)(v9 + 324) != 0);
        }
      }
      ++v7;
      v8 += 4;
    }
    while ( v7 < 6 );
    SoundMgr::PlayInterfaceSound(&g_kSoundMgr, Dice_CoinClick);
    MHDiceGameTask::GetDiceGameTask(&result)->m_pObject->m_eBettingAmount = amount;
    v11 = result.m_pObject;
    if ( result.m_pObject && !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v11 )
        v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    }
  }
}

//----- (0070FC00) --------------------------------------------------------
void MiniHouseDiceGameWin::OnMinimalize()
{
  MHDiceGameTask *v1; // ecx@1
  MHDiceGameTask *v2; // esi@2
  NiPointer<MHDiceGameTask> result; // [sp+8h] [bp-10h]@1
  int v4; // [sp+14h] [bp-4h]@1

  v1 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  v4 = 0;
  MHDiceGameTask::OpenDiceWin();
  v4 = -1;
  if ( result.m_pObject )
  {
    v2 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
  }
}

//----- (0070FC80) --------------------------------------------------------
void MiniHouseDiceGameWin::OnClickRanking()
{
  MHDiceGameTask *v1; // ecx@1
  MHDiceGameTask *v2; // esi@2
  NiPointer<MHDiceGameTask> result; // [sp+8h] [bp-10h]@1
  int v4; // [sp+14h] [bp-4h]@1

  v1 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  v4 = 0;
  MHDiceGameTask::Recv_NC_DICE_TAISAI_RANK_REQ(0);
  v4 = -1;
  if ( result.m_pObject )
  {
    v2 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
  }
}

//----- (0070FD00) --------------------------------------------------------
void __thiscall MiniHouseDiceGameWin::OnVisibleChip(MiniHouseDiceGameWin *this, DICE_TAISAI_BETTING index, bool IsShow, int chipLevel, bool bPlaySound)
{
  MiniHouseDiceGameWin *v5; // esi@1

  v5 = this;
  if ( IsShow )
  {
    ((void (__stdcall *)(_DWORD))this->m_spChips[index].m_pObject->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v5->m_spChips[index].m_pObject->vfptr[123].__vecDelDtor)(chipLevel);
    if ( bPlaySound )
    {
      if ( chipLevel <= 3 )
        SoundMgr::PlayInterfaceSound(&g_kSoundMgr, DiceChipsPiledUp_Single);
      else
        SoundMgr::PlayInterfaceSound(&g_kSoundMgr, DiceChipsPiledUp_Pair);
    }
  }
  else
  {
    ((void (__stdcall *)(_DWORD))this->m_spChips[index].m_pObject->vfptr[64].__vecDelDtor)(0);
  }
}

//----- (0070FD80) --------------------------------------------------------
void __thiscall MiniHouseDiceGameWin::TurnOnLight(MiniHouseDiceGameWin *this, int bIsAll, bool bOnlyNext, int bTwinkle)
{
  MiniHouseDiceGameWin *v4; // edi@1
  int v5; // esi@5
  signed int v6; // ebx@5
  char *v7; // esi@8
  signed int v8; // ebx@8
  unsigned __int16 *v9; // esi@10
  unsigned __int16 *v10; // eax@12
  signed int v11; // ecx@12
  signed int v12; // ebx@17

  v4 = this;
  if ( (_BYTE)bTwinkle )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_spLightSpr[0].m_pObject->vfptr[65].__vecDelDtor)() )
    {
      LOBYTE(bTwinkle) = 0;
      LOBYTE(bIsAll) = 1;
    }
    else
    {
      LOBYTE(bTwinkle) = 1;
      LOBYTE(bIsAll) = 0;
    }
    v5 = (int)&v4->m_spLightSpr[1];
    v6 = 16;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v5 - 4) + 256))(bTwinkle);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v5 + 256))(bIsAll);
      v5 += 8;
      --v6;
    }
    while ( v6 );
    *(_DWORD *)&v4->m_uiOnLightIdx[0] = 983047;
    *(_DWORD *)&v4->m_uiOnLightIdx[2] = 2031639;
  }
  else
  {
    v7 = (char *)this->m_spLightSpr;
    v8 = 32;
    if ( (_BYTE)bIsAll )
    {
      do
      {
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v7 + 256))(1);
        v7 += 4;
        --v8;
      }
      while ( v8 );
      v9 = v4->m_uiOnLightIdx;
      v4->m_uiOnLightIdx[0] = 7;
      *(_DWORD *)&v4->m_uiOnLightIdx[1] = 1507343;
      v4->m_uiOnLightIdx[3] = 31;
    }
    else
    {
      do
      {
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v7 + 256))(0);
        v7 += 4;
        --v8;
      }
      while ( v8 );
      v9 = v4->m_uiOnLightIdx;
      v10 = v4->m_uiOnLightIdx;
      v11 = 4;
      do
      {
        if ( *v10 >= 0x20u )
          *v10 = 0;
        ++v10;
        --v11;
      }
      while ( v11 );
    }
    if ( bOnlyNext )
    {
      v12 = 4;
      do
      {
        ((void (__stdcall *)(_DWORD))v4->m_spLightSpr[*v9].m_pObject->vfptr[64].__vecDelDtor)(0);
        if ( ++*v9 >= 0x20u )
          *v9 = 0;
        ((void (__stdcall *)(_DWORD))v4->m_spLightSpr[*v9].m_pObject->vfptr[64].__vecDelDtor)(1);
        ++v9;
        --v12;
      }
      while ( v12 );
    }
  }
}

//----- (0070FEE0) --------------------------------------------------------
void __thiscall MiniHouseDiceGameWin::GameStartEff(MiniHouseDiceGameWin *this)
{
  MiniHouseDiceGameWin *v1; // esi@1
  DICE_TAISAI_GAME_STATUS v2; // ebx@2
  MHDiceGameTask *v3; // edi@3
  NiNode *v4; // eax@8
  float v5; // ST14_4@8
  NiPointer<MHDiceGameTask> result; // [sp+20h] [bp-4h]@2

  v1 = this;
  if ( this->m_pStartEffect.m_pObject )
  {
    v2 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject->m_eDiceSaiGameStatus;
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    if ( v2 == DTGS_NONE_BETTING || v2 == 1 )
    {
      result.m_pObject = (MHDiceGameTask *)(PgWin::ms_uiScreenWidth >> 1);
      v4 = v1->m_pStartEffect.m_pObject;
      v5 = (double)(PgWin::ms_uiScreenWidth >> 1);
      v4->m_kLocal.m_Translate.x = v5;
      v4->m_kLocal.m_Translate.y = -500.0;
      v4->m_kLocal.m_Translate.z = 0.0;
      v1->m_pStartEffect.m_pObject->m_uFlags &= 0xFFFEu;
      PgWinMgr::StartFullScreenEffect(
        &Pgg_kWinMgr,
        Timer::ms_fCurTime,
        (NiAVObject *)&v1->m_pStartEffect.m_pObject->vfptr);
      ((void (*)(void))g_kSoundMgr.m_pkInterfaceGroup->vfptr->StopAllSound)();
      ((void (*)(void))g_kSoundMgr.m_pkInterfaceGroup->vfptr->UnloadAllSound)();
      SoundMgr::PlayInterfaceSound(&g_kSoundMgr, DiceBettingLogo);
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0070FFE0) --------------------------------------------------------
void __thiscall MiniHouseDiceGameWin::EnableBetLevelBtn(MiniHouseDiceGameWin *this, unsigned int money)
{
  MiniHouseDiceGameWin *v2; // ebx@1
  char *v3; // esi@1
  signed int v4; // edi@1

  v2 = this;
  v3 = (char *)this->m_pkChipSelectBut;
  v4 = 6;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 240))(1);
    v3 += 4;
    --v4;
  }
  while ( v4 );
  if ( money < 0xF4240 )
    ((void (__stdcall *)(_DWORD))v2->m_pkChipSelectBut[4].m_pObject->vfptr[60].__vecDelDtor)(0);
  if ( money < 0x186A0 )
    ((void (__stdcall *)(_DWORD))v2->m_pkChipSelectBut[3].m_pObject->vfptr[60].__vecDelDtor)(0);
  if ( money < 0x2710 )
    ((void (__stdcall *)(_DWORD))v2->m_pkChipSelectBut[2].m_pObject->vfptr[60].__vecDelDtor)(0);
}

//----- (00710060) --------------------------------------------------------
void __stdcall mhMinimizeDiceGameWin::OnCommand(unsigned int wParam, int lParam)
{
  MHDiceGameTask *v3; // ecx@2
  void (__thiscall ***v4)(_DWORD, _DWORD); // esi@3

  if ( !wParam )
  {
    v3 = MHDiceGameTask::GetDiceGameTask((NiPointer<MHDiceGameTask> *)&wParam)->m_pObject;
    MHDiceGameTask::OpenDiceWin();
    if ( wParam )
    {
      v4 = (void (__thiscall ***)(_DWORD, _DWORD))wParam;
      if ( !InterlockedDecrement((volatile LONG *)(wParam + 4)) )
      {
        if ( v4 )
          (**v4)(v4, 1);
      }
    }
  }
}

//----- (007100F0) --------------------------------------------------------
void __stdcall mhMinimizeDiceGameWin::UpdateMeWin(float fCurTime)
{
  MHDiceGameTask *v2; // edi@1
  MHDiceGameTask *v3; // esi@2
  NiPointer<MHDiceGameTask> result; // [sp+Ch] [bp-4h]@1

  v2 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  if ( result.m_pObject )
  {
    v3 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
  }
  if ( v2 )
    MHDiceGameTask::UpdateDiceTaisaiGame(v2, fCurTime);
}

//----- (00710150) --------------------------------------------------------
void __thiscall mhDiceHelpWin::CloseWin(mhDiceHelpWin *this)
{
  mhDiceHelpWin *v1; // esi@1
  MHDiceGameTask *v2; // ecx@1
  MHDiceGameTask *v3; // esi@2
  NiPointer<MHDiceGameTask> result; // [sp+8h] [bp-10h]@1
  int v5; // [sp+14h] [bp-4h]@1

  v1 = this;
  v2 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  v5 = 0;
  MHDiceGameTask::OnCloseWin((PgWin *)&v1->vfptr);
  v5 = -1;
  if ( result.m_pObject )
  {
    v3 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
  }
}

//----- (007101D0) --------------------------------------------------------
void __thiscall mhDiceHelpWin::OnSlideBar(mhDiceHelpWin *this)
{
  mhDiceHelpWin *v1; // esi@1
  SlideBar *v2; // ecx@1

  v1 = this;
  v2 = this->m_pSlideBar;
  if ( v2 )
  {
    SlideBar::SetSplitCnt(v2, v1->m_pListWin->m_nSlideSplitCnt);
    v1->m_pListWin->m_nViewStartPos = v1->m_pSlideBar->m_nCurPos;
    SlideListWin::UpdateViewList(v1->m_pListWin);
  }
}

//----- (00710220) --------------------------------------------------------
void __thiscall MHDiceRewardMoneyWin::MHDiceRewardMoneyWin(MHDiceRewardMoneyWin *this)
{
  MHDiceRewardMoneyWin *v1; // esi@1
  PgWinText *v2; // edi@1
  PgWinText *v3; // edi@6
  PgWinBut *v4; // edi@11

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&MHDiceRewardMoneyWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MHDiceRewardMoneyWin::`vftable'{for `IDirectMessenger'};
  v1->m_pkCopperText.m_pObject = 0;
  v1->m_pkSilverText.m_pObject = 0;
  v1->m_pkGoldText.m_pObject = 0;
  v1->m_pkGemText.m_pObject = 0;
  v1->m_pkTitleText1.m_pObject = 0;
  v1->m_pkTitleText2.m_pObject = 0;
  v1->m_pkOkBut.m_pObject = 0;
  v2 = v1->m_pkTitleText1.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_pkTitleText1.m_pObject = 0;
  }
  v3 = v1->m_pkTitleText2.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_pkTitleText2.m_pObject = 0;
  }
  v4 = v1->m_pkOkBut.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_pkOkBut.m_pObject = 0;
  }
  v1->m_IsRewardWin = 1;
}
// 9CCA34: using guessed type void (__thiscall *MHDiceRewardMoneyWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CCA54: using guessed type int (__thiscall *MHDiceRewardMoneyWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00710340) --------------------------------------------------------
void __thiscall MHDiceRewardMoneyWin::~MHDiceRewardMoneyWin(MHDiceRewardMoneyWin *this)
{
  MHDiceRewardMoneyWin *v1; // esi@1
  PgWinBut *v2; // edi@1
  PgWinText *v3; // edi@5
  PgWinText *v4; // edi@9
  PgWinText *v5; // edi@13
  PgWinText *v6; // edi@17
  PgWinText *v7; // edi@21
  PgWinText *v8; // edi@25

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&MHDiceRewardMoneyWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MHDiceRewardMoneyWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_pkOkBut.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  v3 = v1->m_pkTitleText2.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v4 = v1->m_pkTitleText1.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v5 = v1->m_pkGemText.m_pObject;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  v6 = v1->m_pkGoldText.m_pObject;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  v7 = v1->m_pkSilverText.m_pObject;
  if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  v8 = v1->m_pkCopperText.m_pObject;
  if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
    v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9CCA34: using guessed type void (__thiscall *MHDiceRewardMoneyWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CCA54: using guessed type int (__thiscall *MHDiceRewardMoneyWin::`vftable'{for `NiNode'})(void *p, char);

//----- (007104B0) --------------------------------------------------------
void __thiscall MHDiceRewardMoneyWin::OnCmdOk(MHDiceRewardMoneyWin *this)
{
  MHDiceGameTask *v1; // ecx@1
  MHDiceGameTask *v2; // esi@2
  NiPointer<MHDiceGameTask> result; // [sp+8h] [bp-14h]@1
  PROTO_NC_DICE_TAISAI_RECEIPT_INCOME_MONEY_REQ data; // [sp+Ch] [bp-10h]@1
  int v5; // [sp+18h] [bp-4h]@1

  data.nInvenSlot.Inven = this->m_nInvenSlot.Inven;
  v1 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  v5 = 0;
  MHDiceGameTask::Recv_NC_DICE_TAISAI_RECEIPT_INCOME_MONEY_REQ(&data);
  v5 = -1;
  if ( result.m_pObject )
  {
    v2 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
  }
}

//----- (00710540) --------------------------------------------------------
void __thiscall MHDiceRewardMoneyWin::SetTitle1(MHDiceRewardMoneyWin *this, char *pcTitle)
{
  PgWinText *v2; // ecx@1

  v2 = this->m_pkTitleText1.m_pObject;
  if ( v2 )
    ((void (__stdcall *)(_DWORD))v2->vfptr[118].__vecDelDtor)(pcTitle);
}

//----- (00710560) --------------------------------------------------------
void __thiscall MHDiceRewardMoneyWin::SetTitle2(MHDiceRewardMoneyWin *this, char *pcTitle)
{
  PgWinText *v2; // ecx@1

  v2 = this->m_pkTitleText2.m_pObject;
  if ( v2 )
    ((void (__stdcall *)(_DWORD))v2->vfptr[118].__vecDelDtor)(pcTitle);
}

//----- (00710580) --------------------------------------------------------
void __thiscall mhDiceRateSheetWin::OnCommand(mhDiceRateSheetWin *this, unsigned int wParam, int lParam)
{
  mhDiceRateSheetWin *v3; // esi@1
  MHDiceGameTask *v4; // ecx@3
  void (__thiscall ***v5)(_DWORD, _DWORD); // esi@4
  MHDiceGameTask *v6; // ecx@7
  MHDiceGameTask *v7; // esi@8
  LONG v8; // eax@8
  MHDiceGameTask *v9; // ecx@9
  NiPointer<MHDiceGameTask> v10; // [sp+Ch] [bp-14h]@9
  NiPointer<MHDiceGameTask> result; // [sp+10h] [bp-10h]@7
  int v12; // [sp+1Ch] [bp-4h]@3

  v3 = this;
  if ( !wParam )
  {
    v9 = MHDiceGameTask::GetDiceGameTask(&v10)->m_pObject;
    v12 = 0;
    MHDiceGameTask::OnCloseWin((PgWin *)&v3->vfptr);
    v12 = -1;
    if ( !v10.m_pObject )
      return;
    v7 = v10.m_pObject;
    v8 = InterlockedDecrement((volatile LONG *)&v10.m_pObject->m_uiRefCount);
    goto LABEL_11;
  }
  if ( wParam == 1 )
  {
    v4 = MHDiceGameTask::GetDiceGameTask((NiPointer<MHDiceGameTask> *)&wParam)->m_pObject;
    MHDiceGameTask::OnCloseWin((PgWin *)&v3->vfptr);
    v12 = -1;
    if ( wParam )
    {
      v5 = (void (__thiscall ***)(_DWORD, _DWORD))wParam;
      if ( !InterlockedDecrement((volatile LONG *)(wParam + 4)) )
      {
        if ( v5 )
          (**v5)(v5, 1);
      }
    }
    v6 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
    v12 = 2;
    MHDiceGameTask::OpenHelpWin(v6);
    v12 = -1;
    if ( result.m_pObject )
    {
      v7 = result.m_pObject;
      v8 = InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount);
LABEL_11:
      if ( !v8 )
      {
        if ( v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      }
      return;
    }
  }
}

//----- (007106A0) --------------------------------------------------------
int __thiscall MHDiceAniActor::SetAct(MHDiceAniActor *this, MHDiceAniActor::DICE_ANIIDX AniIndex, NiActorManager *ActorMgr)
{
  MHDiceAniActor *v3; // esi@1
  int result; // eax@2

  v3 = this;
  if ( ActorMgr )
  {
    this->m_uiAniSeqID = AniIndex + this->m_AniSeqIDOffset;
    NiActorManager::Reset(ActorMgr);
    NiActorManager::Update(ActorMgr, 0.0);
    result = NiActorManager::SetTargetAnimation(ActorMgr, v3->m_uiAniSeqID) != 0;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00710700) --------------------------------------------------------
int __thiscall MHDiceAniActor::SetAction(MHDiceAniActor *this, MHDiceAniActor::DICE_ANIIDX AniIndex, NiActorManager *ActorMgr, float fTime)
{
  NiActorManager *v4; // edi@1
  MHDiceAniActor *v5; // esi@1
  unsigned __int16 v6; // ax@2
  NiActorManager *v7; // ecx@2
  int result; // eax@3
  NiControllerSequence *v9; // ecx@5

  v4 = ActorMgr;
  v5 = this;
  if ( ActorMgr
    && (v6 = AniIndex + this->m_AniSeqIDOffset,
        v7 = ActorMgr,
        v5->m_uiAniSeqID = v6,
        NiActorManager::Reset(v7),
        NiActorManager::Update(v4, 0.0),
        NiActorManager::SetTargetAnimation(v4, v5->m_uiAniSeqID))
    && NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
         (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v4->m_kSequenceMap,
         v5->m_uiAniSeqID,
         (NiVBSet **)&ActorMgr)
    && (v9 = (NiControllerSequence *)ActorMgr) != 0 )
  {
    *(float *)&ActorMgr->m_eNextID = -3.4028235e38;
    NiControllerSequence::Update(v9, fTime, 1);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00710790) --------------------------------------------------------
int __thiscall MHDiceAniActor::update(MHDiceAniActor *this, float fTime, NiActorManager *ActorMgr)
{
  int result; // eax@2
  NiActorManager *v4; // esi@3

  if ( this->m_uiAniSeqID == 999 )
  {
    result = 0;
  }
  else
  {
    v4 = ActorMgr;
    if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
           (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&ActorMgr->m_kSequenceMap,
           ActorMgr->m_eTargetID,
           (NiVBSet **)&ActorMgr)
      && ActorMgr )
    {
      NiActorManager::Update(v4, fTime);
      NiAVObject::Update(v4->m_spNIFRoot.m_pObject, fTime, 1);
      result = 1;
    }
    else
    {
      result = 0;
    }
  }
  return result;
}

//----- (00710800) --------------------------------------------------------
void __thiscall MHChipEffect::Start(MHChipEffect *this, NiNode *pkParent, NiQuaternion Qut, NiPoint3 pos)
{
  MHChipEffect *v4; // esi@1

  v4 = this;
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))pkParent->vfptr[29].__vecDelDtor)(
    pkParent,
    this->m_spEffect.m_pObject,
    0);
  NsEffect::SetEffectNode(&v4->m_kEffect, (NiAVObject *)&v4->m_spEffect.m_pObject->vfptr);
  NsEffect::Start(&v4->m_kEffect, Timer::ms_fCurTime);
  v4->m_kMarkCheck.m_fMarkTime = v4->m_kEffect.m_fMaxTime;
  CNSTimer_MarkCheck::ReSet(&v4->m_kMarkCheck, Timer::ms_fCurTime, OVER);
  v4->m_bLive = 1;
  NiAVObject::UpdateProperties((NiAVObject *)&pkParent->vfptr);
  NiAVObject::UpdateEffects((NiAVObject *)&pkParent->vfptr);
  NiQuaternion::ToRotation(&Qut, &v4->m_spEffect.m_pObject->m_kLocal.m_Rotate);
  v4->m_spEffect.m_pObject->m_kLocal.m_Translate = pos;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00710890) --------------------------------------------------------
bool __thiscall MHChipEffect::Update(MHChipEffect *this, float fTime)
{
  MHChipEffect *v2; // esi@1
  int v3; // eax@3
  NiNode *v4; // ecx@5

  v2 = this;
  if ( this->m_bLive )
  {
    if ( !this->m_bLoop )
    {
      CNSTimer_MarkCheck::Update(&this->m_kMarkCheck, fTime);
      if ( v3 == 1 )
      {
        if ( v2->m_spEffect.m_pObject )
        {
          v4 = v2->m_spEffect.m_pObject->m_pkParent;
          if ( v4 )
          {
            ((void (__stdcall *)(float *, NiNode *))v4->vfptr[30].__vecDelDtor)(&fTime, v2->m_spEffect.m_pObject);
            NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&fTime);
          }
          v2->m_bLive = 0;
        }
      }
    }
  }
  return v2->m_bLive;
}

//----- (007108F0) --------------------------------------------------------
void __stdcall GambleDiceGameWin::OnBettingButton(unsigned int uiMsgCmd, bool IsLeftBtn)
{
  DICE_TAISAI_GAME_STATUS v3; // esi@1
  MHDiceGameTask *v4; // edi@2
  void (__thiscall ***v5)(_DWORD, _DWORD); // esi@8
  MHDiceGameTask *v6; // ecx@12
  void (__cdecl ***v7)(_DWORD); // esi@13
  MHDiceGameTask *v8; // ecx@18
  MHDiceGameTask *v9; // esi@19
  NiPointer<MHDiceGameTask> v10; // [sp+10h] [bp-14h]@18
  NiPointer<MHDiceGameTask> result; // [sp+14h] [bp-10h]@1
  int v12; // [sp+20h] [bp-4h]@12

  v3 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject->m_eDiceSaiGameStatus;
  if ( result.m_pObject )
  {
    v4 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
  }
  if ( !IsLeftBtn || v3 && v3 != 1 )
  {
    if ( v3 == DTGS_NONE_BETTING || v3 == 1 )
    {
      v8 = MHDiceGameTask::GetDiceGameTask(&v10)->m_pObject;
      v12 = 1;
      MHDiceGameTask::OnBettingCancel(v8, (DICE_TAISAI_BETTING)uiMsgCmd);
      v12 = -1;
      if ( v10.m_pObject )
      {
        v9 = v10.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&v10.m_pObject->m_uiRefCount) )
        {
          if ( v9 )
            v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
        }
      }
    }
  }
  else
  {
    MHDiceGameTask::GetDiceGameTask((NiPointer<MHDiceGameTask> *)&IsLeftBtn);
    v5 = (void (__thiscall ***)(_DWORD, _DWORD))IsLeftBtn;
    if ( IsLeftBtn && !InterlockedDecrement((volatile LONG *)(IsLeftBtn + 4)) && v5 )
      (**v5)(v5, 1);
    v6 = MHDiceGameTask::GetDiceGameTask((NiPointer<MHDiceGameTask> *)&IsLeftBtn)->m_pObject;
    v12 = 0;
    MHDiceGameTask::OnBetting(v6, (DICE_TAISAI_BETTING)uiMsgCmd);
    v12 = -1;
    if ( IsLeftBtn )
    {
      v7 = (void (__cdecl ***)(_DWORD))IsLeftBtn;
      if ( !InterlockedDecrement((volatile LONG *)(IsLeftBtn + 4)) )
      {
        if ( v7 )
          (**v7)(1);
      }
    }
  }
}

//----- (00710A60) --------------------------------------------------------
void __thiscall GambleDiceGameWin::OnBettingAmount(GambleDiceGameWin *this, unsigned int uiButton, BETTING_LEVEL_COIN amount)
{
  GambleDiceGameWin *v3; // ebx@1
  ToggleBut *v4; // esi@1
  bool v5; // zf@1
  void *(__thiscall *v6)(NiRefObject *, unsigned int); // eax@2
  signed int v7; // edi@4
  int v8; // ebx@4
  int v9; // esi@7
  int (__thiscall *v10)(int); // eax@7
  MHDiceGameTask *v11; // esi@10
  NiPointer<MHDiceGameTask> result; // [sp+8h] [bp-4h]@1

  v3 = this;
  v4 = this->m_pkChipSelectBut[amount].m_pObject;
  v5 = v4->m_bHighlight == 0;
  result.m_pObject = (MHDiceGameTask *)this;
  if ( !v5 )
  {
    v6 = v4->vfptr[78].__vecDelDtor;
    v4->m_bHighlight = 0;
    if ( (unsigned __int8)((int (__thiscall *)(ToggleBut *))v6)(v4) )
      v4->vfptr[138].__vecDelDtor((NiRefObject *)v4, v4->m_bHighlight != 0);
    v7 = 0;
    v8 = (int)v3->m_pkChipSelectBut;
    do
    {
      if ( v7 != amount )
      {
        if ( (unsigned __int8)(*(int (**)(void))(**((_DWORD **)&result.m_pObject->m_DiceTaiSai.m_Dice[69].isTriple
                                                  + amount)
                                               + 244))() )
        {
          v9 = *(_DWORD *)v8;
          v10 = *(int (__thiscall **)(int))(**(_DWORD **)v8 + 312);
          *(_BYTE *)(v9 + 324) = 1;
          if ( (unsigned __int8)v10(v9) )
            (*(void (__thiscall **)(int, _DWORD))(*(_DWORD *)v9 + 552))(v9, *(_BYTE *)(v9 + 324) != 0);
        }
      }
      ++v7;
      v8 += 4;
    }
    while ( v7 < 5 );
    SoundMgr::PlayInterfaceSound(&g_kSoundMgr, Dice_CoinClick);
    MHDiceGameTask::GetDiceGameTask(&result)->m_pObject->m_eBettingAmount = amount;
    v11 = result.m_pObject;
    if ( result.m_pObject && !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v11 )
        v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    }
  }
}

//----- (00710B70) --------------------------------------------------------
void GambleDiceGameWin::OnMinimalize()
{
  MHDiceGameTask *v1; // ecx@1
  MHDiceGameTask *v2; // esi@2
  NiPointer<MHDiceGameTask> result; // [sp+8h] [bp-10h]@1
  int v4; // [sp+14h] [bp-4h]@1

  v1 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  v4 = 0;
  MHDiceGameTask::OpenDiceWin();
  v4 = -1;
  if ( result.m_pObject )
  {
    v2 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
  }
}

//----- (00710BF0) --------------------------------------------------------
void GambleDiceGameWin::OnClickRanking()
{
  MHDiceGameTask *v1; // ecx@1
  MHDiceGameTask *v2; // esi@2
  NiPointer<MHDiceGameTask> result; // [sp+8h] [bp-10h]@1
  int v4; // [sp+14h] [bp-4h]@1

  v1 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  v4 = 0;
  MHDiceGameTask::NcGambleDiceTaisaiAllRankReq();
  v4 = -1;
  if ( result.m_pObject )
  {
    v2 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v2 )
        v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    }
  }
}

//----- (00710C70) --------------------------------------------------------
void __thiscall GambleDiceGameWin::ChipAnimation(GambleDiceGameWin *this, DICE_TAISAI_BETTING index, BETTING_LEVEL_MONEY nLevel, int nPos)
{
  GambleDiceGameWin *v4; // esi@1
  BettingBut *v5; // eax@2
  float v6; // ecx@2
  float v7; // edx@2
  PgWinSpr *v8; // eax@2
  float v9; // edx@2
  float v10; // eax@2
  long double v11; // st7@2
  double v12; // st7@4
  double v13; // st6@5
  double v14; // st7@5
  float v15; // edi@9
  float v16; // ebx@9
  _BYTE v17[12]; // ST14_12@9
  int v18; // eax@9
  NiQuaternion v19; // ST04_16@9
  MHDiceGameTask *v20; // eax@10
  NiNode *v21; // esi@11
  NiPoint3 vT; // [sp+18h] [bp-50h]@2
  NiPoint3 axis; // [sp+24h] [bp-44h]@2
  NiQuaternion v24; // [sp+30h] [bp-38h]@2
  NiPoint3 vStandPos; // [sp+40h] [bp-28h]@2
  NiNode *pkParent; // [sp+4Ch] [bp-1Ch]@1
  float v27; // [sp+50h] [bp-18h]@2
  float v28; // [sp+54h] [bp-14h]@2
  float fAngle; // [sp+58h] [bp-10h]@2
  int v30; // [sp+64h] [bp-4h]@10

  v4 = this;
  pkParent = this->m_EffectPos.m_pObject;
  if ( pkParent )
  {
    v5 = this->m_spBettingBut[index].m_pObject;
    v6 = v5->m_kLocal.m_Translate.x;
    v7 = v5->m_kLocal.m_Translate.y;
    v24.m_fZ = v5->m_kLocal.m_Translate.z;
    v8 = v4->m_spLightSpr[6].m_pObject;
    v24.m_fX = v6;
    vStandPos.x = v8->m_kLocal.m_Translate.x;
    v24.m_fY = v7;
    v9 = v8->m_kLocal.m_Translate.y;
    v10 = v8->m_kLocal.m_Translate.z;
    fAngle = v6 - vStandPos.x;
    v28 = v24.m_fY - v9;
    v27 = v24.m_fZ - v10;
    vStandPos.x = fAngle;
    vStandPos.y = v28;
    vStandPos.z = v27;
    axis.x = 0.0;
    axis.y = 1.0;
    v24.m_fX = 0.0;
    v24.m_fY = 1.0;
    axis.z = 0.0;
    v24.m_fZ = 0.0;
    NiPoint3::Unitize(&vStandPos);
    NiPoint3::Unitize((NiPoint3 *)&v24.m_fX);
    fAngle = v24.m_fY * vStandPos.y + vStandPos.x * v24.m_fX + v24.m_fZ * vStandPos.z;
    NiPoint3::UnitCross((NiPoint3 *)&v24.m_fX, &vT, &vStandPos);
    v11 = fAngle;
    if ( fAngle < 0.0 )
    {
      fAngle = v11 * -1.0;
      v11 = fAngle;
    }
    v27 = acos(v11);
    v12 = v27;
    v27 = NI_PI / 7.0;
    if ( v27 >= v12 )
    {
      fAngle = NI_PI;
      axis.x = -400.0;
      axis.y = 200.0;
      v14 = 0.0;
      axis.z = 0.0;
      vT.z = 0.0;
    }
    else
    {
      v13 = NI_PI;
      v14 = 0.0;
      if ( vT.z <= 0.0 )
      {
        fAngle = v13 + 0.4000000059604645;
        axis.x = -200.0;
        axis.y = 200.0;
        axis.z = 0.0;
        vT.z = 0.0;
      }
      else
      {
        fAngle = v13 - 0.4000000059604645;
        axis.x = -600.0;
        axis.y = 200.0;
        axis.z = 0.0;
        vT.z = 0.0;
      }
    }
    v15 = axis.x;
    axis.x = v14;
    v16 = axis.y;
    axis.y = v14;
    axis.z = 1.0;
    NiQuaternion::NiQuaternion(&v24, fAngle, &axis);
    *(float *)v17 = v15;
    *(_QWORD *)&v17[4] = __PAIR__(LODWORD(vT.z), LODWORD(v16));
    *(_QWORD *)&v19.m_fW = *(_QWORD *)v18;
    *(_QWORD *)&v19.m_fY = *(_QWORD *)(v18 + 8);
    MHChipEffect::Start(v4->m_pkChipThrowEff, pkParent, v19, *(NiPoint3 *)v17);
  }
  v20 = MHDiceGameTask::GetDiceGameTask((NiPointer<MHDiceGameTask> *)&pkParent)->m_pObject;
  v30 = 0;
  MHDiceGameTask::CheckBettingChip(v20, index, 1);
  v30 = -1;
  if ( pkParent )
  {
    v21 = pkParent;
    if ( !InterlockedDecrement((volatile LONG *)&pkParent->m_uiRefCount) )
    {
      if ( v21 )
        v21->vfptr->__vecDelDtor((NiRefObject *)v21, 1u);
    }
  }
  SoundMgr::PlayInterfaceSound(&g_kSoundMgr, DiceOutMoney);
}
// B622CC: using guessed type const float NI_PI;

//----- (00710F10) --------------------------------------------------------
void __thiscall GambleDiceGameWin::OnVisibleChip(GambleDiceGameWin *this, DICE_TAISAI_BETTING index, bool IsShow, int chipLevel, bool bPlaySound)
{
  GambleDiceGameWin *v5; // esi@1

  v5 = this;
  if ( IsShow )
  {
    ((void (__stdcall *)(_DWORD))this->m_spChips[index].m_pObject->vfptr[64].__vecDelDtor)(1);
    ((void (__stdcall *)(_DWORD))v5->m_spChips[index].m_pObject->vfptr[123].__vecDelDtor)(chipLevel);
    if ( bPlaySound )
    {
      if ( chipLevel <= 3 )
        SoundMgr::PlayInterfaceSound(&g_kSoundMgr, DiceChipsPiledUp_Single);
      else
        SoundMgr::PlayInterfaceSound(&g_kSoundMgr, DiceChipsPiledUp_Pair);
    }
  }
  else
  {
    ((void (__stdcall *)(_DWORD))this->m_spChips[index].m_pObject->vfptr[64].__vecDelDtor)(0);
  }
}

//----- (00710F90) --------------------------------------------------------
void __thiscall GambleDiceGameWin::TurnOnLight(GambleDiceGameWin *this, int bIsAll, bool bOnlyNext, int bTwinkle)
{
  GambleDiceGameWin *v4; // edi@1
  int v5; // esi@5
  signed int v6; // ebx@5
  char *v7; // esi@8
  signed int v8; // ebx@8
  unsigned __int16 *v9; // esi@10
  unsigned __int16 *v10; // eax@12
  signed int v11; // ecx@12
  signed int v12; // ebx@17

  v4 = this;
  if ( (_BYTE)bTwinkle )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_spLightSpr[0].m_pObject->vfptr[65].__vecDelDtor)() )
    {
      LOBYTE(bTwinkle) = 0;
      LOBYTE(bIsAll) = 1;
    }
    else
    {
      LOBYTE(bTwinkle) = 1;
      LOBYTE(bIsAll) = 0;
    }
    v5 = (int)&v4->m_spLightSpr[1];
    v6 = 16;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v5 - 4) + 256))(bTwinkle);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v5 + 256))(bIsAll);
      v5 += 8;
      --v6;
    }
    while ( v6 );
    *(_DWORD *)&v4->m_uiOnLightIdx[0] = 983047;
    *(_DWORD *)&v4->m_uiOnLightIdx[2] = 2031639;
  }
  else
  {
    v7 = (char *)this->m_spLightSpr;
    v8 = 32;
    if ( (_BYTE)bIsAll )
    {
      do
      {
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v7 + 256))(1);
        v7 += 4;
        --v8;
      }
      while ( v8 );
      v9 = v4->m_uiOnLightIdx;
      v4->m_uiOnLightIdx[0] = 7;
      *(_DWORD *)&v4->m_uiOnLightIdx[1] = 1507343;
      v4->m_uiOnLightIdx[3] = 31;
    }
    else
    {
      do
      {
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v7 + 256))(0);
        v7 += 4;
        --v8;
      }
      while ( v8 );
      v9 = v4->m_uiOnLightIdx;
      v10 = v4->m_uiOnLightIdx;
      v11 = 4;
      do
      {
        if ( *v10 >= 0x20u )
          *v10 = 0;
        ++v10;
        --v11;
      }
      while ( v11 );
    }
    if ( bOnlyNext )
    {
      v12 = 4;
      do
      {
        ((void (__stdcall *)(_DWORD))v4->m_spLightSpr[*v9].m_pObject->vfptr[64].__vecDelDtor)(0);
        if ( ++*v9 >= 0x20u )
          *v9 = 0;
        ((void (__stdcall *)(_DWORD))v4->m_spLightSpr[*v9].m_pObject->vfptr[64].__vecDelDtor)(1);
        ++v9;
        --v12;
      }
      while ( v12 );
    }
  }
}

//----- (007110F0) --------------------------------------------------------
void __thiscall GambleDiceGameWin::GameStartEff(GambleDiceGameWin *this)
{
  GambleDiceGameWin *v1; // esi@1
  DICE_TAISAI_GAME_STATUS v2; // ebx@2
  MHDiceGameTask *v3; // edi@3
  NiNode *v4; // eax@8
  float v5; // ST14_4@8
  NiPointer<MHDiceGameTask> result; // [sp+20h] [bp-4h]@2

  v1 = this;
  if ( this->m_pStartEffect.m_pObject )
  {
    v2 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject->m_eDiceSaiGameStatus;
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    if ( v2 == DTGS_NONE_BETTING || v2 == 1 )
    {
      result.m_pObject = (MHDiceGameTask *)(PgWin::ms_uiScreenWidth >> 1);
      v4 = v1->m_pStartEffect.m_pObject;
      v5 = (double)(PgWin::ms_uiScreenWidth >> 1);
      v4->m_kLocal.m_Translate.x = v5;
      v4->m_kLocal.m_Translate.y = -500.0;
      v4->m_kLocal.m_Translate.z = 0.0;
      v1->m_pStartEffect.m_pObject->m_uFlags &= 0xFFFEu;
      PgWinMgr::StartFullScreenEffect(
        &Pgg_kWinMgr,
        Timer::ms_fCurTime,
        (NiAVObject *)&v1->m_pStartEffect.m_pObject->vfptr);
      ((void (*)(void))g_kSoundMgr.m_pkInterfaceGroup->vfptr->StopAllSound)();
      ((void (*)(void))g_kSoundMgr.m_pkInterfaceGroup->vfptr->UnloadAllSound)();
      SoundMgr::PlayInterfaceSound(&g_kSoundMgr, DiceBettingLogo);
    }
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (007111F0) --------------------------------------------------------
void __thiscall GambleDiceGameWin::EnableBetLevelBtn(GambleDiceGameWin *this, unsigned int money)
{
  GambleDiceGameWin *v2; // ebx@1
  char *v3; // esi@1
  signed int v4; // edi@1

  v2 = this;
  v3 = (char *)this->m_pkChipSelectBut;
  v4 = 6;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 240))(1);
    v3 += 4;
    --v4;
  }
  while ( v4 );
  if ( money < 0x2710 )
    ((void (__stdcall *)(_DWORD))v2->m_pkChipSelectBut[3].m_pObject->vfptr[60].__vecDelDtor)(0);
  if ( money < 0x3E8 )
    ((void (__stdcall *)(_DWORD))v2->m_pkChipSelectBut[2].m_pObject->vfptr[60].__vecDelDtor)(0);
  if ( money < 0x1F4 )
    ((void (__stdcall *)(_DWORD))v2->m_pkChipSelectBut[1].m_pObject->vfptr[60].__vecDelDtor)(0);
}

//----- (00711270) --------------------------------------------------------
char __thiscall BettingBut::Create(BettingBut *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, int Pos, char *pcName, unsigned int uiExtStyle)
{
  BettingBut *v9; // esi@1
  char result; // al@1
  void *(__thiscall *v11)(NiRefObject *, unsigned int); // edx@2

  v9 = this;
  result = PgWinSpr::Create((PgWinSpr *)&this->vfptr, iXPos, iYPos, pkSprData, pkParent, pcName, uiExtStyle);
  if ( result )
  {
    v9->vfptr[138].__vecDelDtor((NiRefObject *)v9, 0);
    v11 = v9->vfptr[129].__vecDelDtor;
    v9->m_uiButNum = pkSprData->m_akGeomData.m_uiSize;
    v11((NiRefObject *)&v9->vfptr, uiCmdMsg);
    v9->m_fAlphaOfButton = 1.0;
    v9->m_Pos = Pos;
    v9->m_fTime = 0.0;
    v9->m_eBetState = 0;
    *(_WORD *)&v9->m_bIsShowEgde = 256;
    v9->m_bIsResetTimer = 0;
    result = 1;
  }
  return result;
}

//----- (00711310) --------------------------------------------------------
void __thiscall BettingBut::DoAction(BettingBut *this)
{
  BettingBut *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, 1);
}

//----- (00711330) --------------------------------------------------------
void __thiscall BettingBut::ProcessMeInput(BettingBut *this, bool *bHit)
{
  BettingBut *v2; // esi@1
  BET_STATE v3; // eax@1
  bool *v4; // edi@13
  NiRefObjectVtbl *v5; // edx@28
  BettingBut *v6; // ecx@28
  PgSpr *v7; // eax@33
  NiPointer<NiScreenElements> *v8; // ecx@35
  NiScreenElements *v9; // eax@38
  PgSpr *v10; // eax@51
  NiPointer<NiScreenElements> *v11; // ecx@52
  bool *v12; // esi@54

  v2 = this;
  v3 = this->m_eBetState;
  if ( v3 == 2 )
  {
LABEL_49:
    if ( v3 != 3 && v3 != 4 )
      return;
    goto LABEL_51;
  }
  if ( v3 != 3 )
  {
    if ( v3 != 4 )
    {
      if ( !(unsigned __int8)((int (*)(void))this->vfptr[78].__vecDelDtor)() )
        return;
      if ( dword_B64790 )
        ++dword_B64790;
      if ( dword_B6479C )
        ++dword_B6479C;
      if ( PgWin::ms_kbRbutPressed.m_iBool )
        ++PgWin::ms_kbRbutPressed.m_iBool;
      if ( PgWin::ms_kbRbutReleased.m_iBool )
        ++PgWin::ms_kbRbutReleased.m_iBool;
      v4 = bHit;
      PgWinBut::ProcessMeInput((PgWinBut *)&v2->vfptr, bHit);
      if ( dword_B64790 >= 1 || dword_B6479C >= 1 )
        goto LABEL_41;
      PgWin::ms_kbRbutPressed.m_bReserveFalse = 0;
      PgWin::ms_kbRbutReleased.m_bReserveFalse = 0;
      if ( PgWin::ms_kbRbutPressed.m_iBool >= 1 && *v4 )
      {
        if ( v2->m_eType )
        {
          PgWin::ms_pkCapture = (PgWin *)v2;
          v2->m_bHadBeenPushed = 1;
          PgWin::ms_kbRbutPressed.m_bReserveFalse = 1;
        }
        else
        {
          ((void (__thiscall *)(_DWORD))v2->vfptr[140].__vecDelDtor)(v2);
          v2->m_bHadBeenPushed = 0;
          PgWin::ms_kbRbutPressed.m_bReserveFalse = 1;
        }
      }
      else if ( PgWin::ms_kbRbutReleased.m_iBool >= 1 )
      {
        v2->m_bHadBeenPushed = 0;
        if ( (BettingBut *)PgWin::ms_pkCapture == v2 )
        {
          PgWin::ms_pkCapture = 0;
          PgWin::ms_kbRbutReleased.m_bReserveFalse = 1;
        }
        if ( !*v4 )
          goto LABEL_30;
        if ( v2->m_eType == 1 )
          ((void (__thiscall *)(_DWORD))v2->vfptr[140].__vecDelDtor)(v2);
        PgWin::ms_kbRbutReleased.m_bReserveFalse = 1;
      }
      if ( *v4 )
      {
        v5 = v2->vfptr;
        v6 = v2;
        if ( v2->m_bHadBeenPushed )
        {
          v5[138].__vecDelDtor((NiRefObject *)v2, 1u);
LABEL_33:
          v7 = v2->m_spSpr.m_pObject;
          if ( v2->m_bHighlight )
          {
            if ( v7->m_akGeom.m_uiSize > 3 )
            {
              v9 = v7->m_akGeom.m_pBase[3].m_pObject;
              if ( v9 )
                ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v2->vfptr[29].__vecDelDtor)(v2, v9, 1);
            }
          }
          else if ( v7->m_akGeom.m_uiSize > 3 )
          {
            v8 = v7->m_akGeom.m_pBase;
            if ( v8[3].m_pObject )
            {
              ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v2->vfptr[30].__vecDelDtor)(v2, &bHit, v8[3].m_pObject);
              NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&bHit);
            }
          }
          PgWin::Bool::RealizeFalse(&PgWin::ms_kbRbutPressed);
          PgWin::Bool::RealizeFalse(&PgWin::ms_kbRbutReleased);
LABEL_41:
          if ( dword_B64790 )
            --dword_B64790;
          if ( dword_B6479C )
            --dword_B6479C;
          if ( PgWin::ms_kbRbutPressed.m_iBool )
            --PgWin::ms_kbRbutPressed.m_iBool;
          if ( PgWin::ms_kbRbutReleased.m_iBool )
            --PgWin::ms_kbRbutReleased.m_iBool;
          return;
        }
        goto LABEL_32;
      }
LABEL_30:
      v5 = v2->vfptr;
      v6 = v2;
      if ( v2->m_bHadBeenPushed )
      {
        v5[138].__vecDelDtor((NiRefObject *)v2, 2u);
        goto LABEL_33;
      }
LABEL_32:
      v5[138].__vecDelDtor((NiRefObject *)v6, 0);
      goto LABEL_33;
    }
    goto LABEL_49;
  }
LABEL_51:
  v10 = this->m_spSpr.m_pObject;
  if ( v10->m_akGeom.m_uiSize > 3 )
  {
    v11 = v10->m_akGeom.m_pBase;
    if ( v11[3].m_pObject )
    {
      ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v2->vfptr[30].__vecDelDtor)(v2, &bHit, v11[3].m_pObject);
      if ( bHit )
      {
        v12 = bHit;
        if ( !InterlockedDecrement((volatile LONG *)bHit + 1) )
        {
          if ( v12 )
            (**(void (__thiscall ***)(_DWORD, _DWORD))v12)(v12, 1);
        }
      }
    }
  }
}
// B64790: using guessed type int dword_B64790;
// B6479C: using guessed type int dword_B6479C;

//----- (007115A0) --------------------------------------------------------
void __thiscall BettingBut::UpdateMeWin(BettingBut *this, float fCurTime)
{
  BettingBut *v2; // esi@1
  float v3; // ST0C_4@3
  double v4; // st7@3
  double v5; // st7@8
  PgSpr *v6; // eax@9
  NiScreenElements *v7; // eax@11
  NiScreenElements *v8; // eax@15

  v2 = this;
  if ( this->m_bIsResetTimer )
  {
    v3 = this->m_kTimer.m_fObjectTime;
    fCurTime = fCurTime - this->m_kTimer.m_fStartTime;
    v4 = fCurTime;
    this->m_kTimer.m_fObjectTime = fCurTime;
    this->m_kTimer.m_fElapsedTime = v4 - v3;
  }
  else
  {
    this->m_kTimer.m_fStartTime = fCurTime;
    this->m_kTimer.m_fObjectTime = 0.0;
    this->m_kTimer.m_fElapsedTime = 0.0;
    this->m_bIsResetTimer = 1;
  }
  if ( this->m_bIsSwitched )
  {
    if ( this->m_fAlphaOfButton < 1.0 )
      this->m_fAlphaOfButton = this->m_kTimer.m_fElapsedTime + this->m_fAlphaOfButton;
    ((void (__stdcall *)(_DWORD))this->vfptr[69].__vecDelDtor)(this->m_fAlphaOfButton);
    if ( v2->m_eBetState == 2 )
    {
      fCurTime = v2->m_kTimer.m_fElapsedTime + v2->m_fTime;
      v5 = fCurTime;
      v2->m_fTime = fCurTime;
      if ( v5 > 0.800000011920929 )
      {
        v6 = v2->m_spSpr.m_pObject;
        if ( v2->m_bIsShowEgde )
        {
          if ( v6->m_akGeom.m_uiSize > 3 )
          {
            v7 = v6->m_akGeom.m_pBase[3].m_pObject;
            if ( v7 )
            {
              ((void (__thiscall *)(BettingBut *, float *, NiScreenElements *))v2->vfptr[30].__vecDelDtor)(
                v2,
                &fCurTime,
                v7);
              NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&fCurTime);
            }
          }
          v2->m_bIsShowEgde = 0;
          v2->m_fTime = 0.0;
        }
        else
        {
          if ( v6->m_akGeom.m_uiSize > 3 )
          {
            v8 = v6->m_akGeom.m_pBase[3].m_pObject;
            if ( v8 )
              ((void (__thiscall *)(BettingBut *, NiScreenElements *, signed int))v2->vfptr[29].__vecDelDtor)(v2, v8, 1);
          }
          v2->m_bIsShowEgde = 1;
          v2->m_fTime = 0.0;
        }
      }
    }
  }
  else
  {
    BettingBut::SwitchSpr(this, this->m_kTimer.m_fElapsedTime);
  }
}

//----- (00711710) --------------------------------------------------------
void __thiscall BettingBut::SetButtonSpr(BettingBut *this, unsigned int index)
{
  BettingBut *v2; // esi@1
  PgSpr *v3; // eax@1
  NiScreenElements *v4; // eax@3
  void (__thiscall ***v5)(_DWORD, _DWORD); // esi@5
  NiScreenElements *v6; // eax@9

  v2 = this;
  ((void (__stdcall *)(unsigned int))this->vfptr[123].__vecDelDtor)(index);
  v3 = v2->m_spSpr.m_pObject;
  if ( v2->m_bHighlight )
  {
    if ( v3->m_akGeom.m_uiSize > 3 )
    {
      v6 = v3->m_akGeom.m_pBase[3].m_pObject;
      if ( v6 )
        ((void (__thiscall *)(BettingBut *, NiScreenElements *, signed int))v2->vfptr[29].__vecDelDtor)(v2, v6, 1);
    }
  }
  else if ( v3->m_akGeom.m_uiSize > 3 )
  {
    v4 = v3->m_akGeom.m_pBase[3].m_pObject;
    if ( v4 )
    {
      ((void (__thiscall *)(BettingBut *, unsigned int *, NiScreenElements *))v2->vfptr[30].__vecDelDtor)(
        v2,
        &index,
        v4);
      if ( index )
      {
        v5 = (void (__thiscall ***)(_DWORD, _DWORD))index;
        if ( !InterlockedDecrement((volatile LONG *)(index + 4)) )
        {
          if ( v5 )
            (**v5)(v5, 1);
        }
      }
    }
  }
}

//----- (007117A0) --------------------------------------------------------
void __thiscall BettingBut::SetBettingState(BettingBut *this, BET_STATE state)
{
  BettingBut *v2; // esi@1
  PgSpr *v3; // eax@2

  v2 = this;
  this->m_eBetState = state;
  if ( state == 3 )
  {
    v3 = this->m_spSpr.m_pObject;
    this->m_bIsSwitched = 0;
    this->m_uiNextSprIdx = 2;
    if ( v3->m_akGeom.m_uiSize <= 2 || !v3->m_akGeom.m_pBase[2].m_pObject )
    {
      ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))this->vfptr[29].__vecDelDtor)(this, 0, 1);
      NiAVObject::Update((NiAVObject *)&v2->vfptr, 0.0, 0);
      NiAVObject::UpdateProperties((NiAVObject *)&v2->vfptr);
    }
  }
  else if ( state == 2 )
  {
    this->m_bIsSwitched = 1;
    this->m_uiNextSprIdx = 1;
  }
}

//----- (00711820) --------------------------------------------------------
char __thiscall ToggleBut::Create(ToggleBut *this, int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, int Pos, char *pcName, unsigned int uiExtStyle)
{
  ToggleBut *v9; // esi@1
  char result; // al@1
  void *(__thiscall *v11)(NiRefObject *, unsigned int); // edx@2

  v9 = this;
  result = PgWinSpr::Create((PgWinSpr *)&this->vfptr, iXPos, iYPos, pkSprData, pkParent, pcName, uiExtStyle);
  if ( result )
  {
    v9->vfptr[138].__vecDelDtor((NiRefObject *)v9, 1u);
    v11 = v9->vfptr[129].__vecDelDtor;
    v9->m_uiButNum = pkSprData->m_akGeomData.m_uiSize;
    v11((NiRefObject *)&v9->vfptr, uiCmdMsg);
    v9->m_bHighlight = 0;
    v9->m_bEnableClickSound = 0;
    result = 1;
  }
  return result;
}

//----- (00711890) --------------------------------------------------------
void __userpurge MiniHouseDiceGameWin::OnCommand(MiniHouseDiceGameWin *this@<ecx>, int a2@<edi>, unsigned int wParam, int lParam)
{
  MiniHouseDiceGameWin *v4; // esi@1
  MHDiceGameTask *v5; // ecx@9
  MHDiceGameTask *v6; // ecx@11
  MHDiceGameTask *v7; // ecx@12
  NiPointer<MHDiceGameTask> result; // [sp+8h] [bp-10h]@12
  int v9; // [sp+14h] [bp-4h]@9

  v4 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[61].__vecDelDtor)() )
  {
    switch ( wParam )
    {
      case 0x34u:
        MiniHouseDiceGameWin::OnBettingAmout(v4, 0x34u, 0);
        break;
      case 0x35u:
        MiniHouseDiceGameWin::OnBettingAmout(v4, 0x35u, BLM_1SIL);
        break;
      case 0x36u:
        MiniHouseDiceGameWin::OnBettingAmout(v4, 0x36u, BLM_10SIL);
        break;
      case 0x37u:
        MiniHouseDiceGameWin::OnBettingAmout(v4, 0x37u, BLM_100SIL);
        break;
      case 0x38u:
        MiniHouseDiceGameWin::OnBettingAmout(v4, 0x38u, BLM_1GOLD);
        break;
      case 0x39u:
        MiniHouseDiceGameWin::OnBettingAmout(v4, 0x39u, BLM_MAX);
        break;
      case 0x3Au:
        v5 = MHDiceGameTask::GetDiceGameTask((NiPointer<MHDiceGameTask> *)&wParam)->m_pObject;
        MHDiceGameTask::Recv_NC_DICE_TAISAI_GAME_LEAVE_REQ(v5, a2);
        v9 = -1;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&wParam);
        break;
      case 0x3Bu:
        MiniHouseDiceGameWin::OnMinimalize();
        break;
      case 0x3Cu:
        v6 = MHDiceGameTask::GetDiceGameTask((NiPointer<MHDiceGameTask> *)&lParam)->m_pObject;
        MHDiceGameTask::Recv_NC_DICE_TAISAI_RANK_REQ(0);
        v9 = -1;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&lParam);
        break;
      case 0x3Du:
        v7 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
        v9 = 2;
        MHDiceGameTask::OpenHelpWin(v7);
        v9 = -1;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&result);
        break;
      case 0u:
      case 1u:
      case 2u:
      case 3u:
      case 4u:
      case 5u:
      case 6u:
      case 7u:
      case 8u:
      case 9u:
      case 0xAu:
      case 0xBu:
      case 0xCu:
      case 0xDu:
      case 0xEu:
      case 0xFu:
      case 0x10u:
      case 0x11u:
      case 0x12u:
      case 0x13u:
      case 0x14u:
      case 0x15u:
      case 0x16u:
      case 0x17u:
      case 0x18u:
      case 0x19u:
      case 0x1Au:
      case 0x1Bu:
      case 0x1Cu:
      case 0x1Du:
      case 0x1Eu:
      case 0x1Fu:
      case 0x20u:
      case 0x21u:
      case 0x22u:
      case 0x23u:
      case 0x24u:
      case 0x25u:
      case 0x26u:
      case 0x27u:
      case 0x28u:
      case 0x29u:
      case 0x2Au:
      case 0x2Bu:
      case 0x2Cu:
      case 0x2Du:
      case 0x2Eu:
      case 0x2Fu:
      case 0x30u:
      case 0x31u:
      case 0x32u:
      case 0x33u:
        MiniHouseDiceGameWin::OnBettingButton(wParam, lParam != 0);
        break;
      default:
        return;
    }
  }
}

//----- (00711AF0) --------------------------------------------------------
void __thiscall MiniHouseDiceGameWin::AllReset(MiniHouseDiceGameWin *this)
{
  MiniHouseDiceGameWin *v1; // edi@1
  char *v2; // esi@1
  signed int v3; // ebx@1
  int v4; // esi@3
  signed int v5; // ebx@3
  unsigned __int64 v6; // rax@5
  unsigned int v7; // esi@5
  unsigned int v8; // ebx@5
  int v9; // edi@6
  signed __int64 v10; // kr00_8@6
  MiniHouseDiceGameWin *v11; // ebx@10
  int v12; // esi@12
  int v13; // edi@13
  MiniHouseDiceGameWin *v14; // [sp+10h] [bp-Ch]@1
  int i; // [sp+14h] [bp-8h]@5
  int v16; // [sp+18h] [bp-4h]@5

  v1 = this;
  v14 = this;
  v2 = (char *)this->m_spBettingBut;
  v3 = 52;
  do
  {
    *(_DWORD *)(*(_DWORD *)v2 + 332) = 0;
    *(_BYTE *)(*(_DWORD *)v2 + 328) = 0;
    BettingBut::SetButtonSpr(*(BettingBut **)v2, 0);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 276))(1.0);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v2 + 52) + 256))(0);
    PgWin::RemoveAllChildWin(*((PgWin **)v2 + 52));
    v2 += 4;
    --v3;
  }
  while ( v3 );
  v1->m_nUserBettingMoney = 0;
  v4 = (int)v1->m_spShareNumSpr;
  v5 = 8;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v4 - 64) + 492))(0);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 492))(0);
    v4 += 4;
    --v5;
  }
  while ( v5 );
  v6 = User::GetMoney(&g_kUser);
  v7 = v6;
  v1->m_nInvenRemainMoney = v6;
  v8 = HIDWORD(v6);
  i = 10;
  v16 = (int)&v1->m_spMyBetNumSpr[10];
  while ( 1 )
  {
    v9 = (signed __int64)__PAIR__(v8, v7) % 10;
    v10 = (signed __int64)__PAIR__(v8, v7) / 10;
    v8 = (unsigned __int64)((signed __int64)__PAIR__(v8, v7) / 10) >> 32;
    v7 = v10;
    if ( v9 < 0 )
      v9 = 0;
    (*(void (__stdcall **)(int))(**(_DWORD **)v16 + 492))(v9);
    if ( !(v8 | (unsigned int)v10) )
      break;
    v16 -= 4;
    if ( --i < 0 )
      goto LABEL_10;
  }
  v12 = i - 1;
  if ( i - 1 < 0 )
  {
LABEL_10:
    v11 = v14;
    goto LABEL_11;
  }
  v11 = v14;
  v13 = (int)&v14->m_spMyBetNumSpr[v12];
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v13 + 492))(0);
    v13 -= 4;
    --v12;
  }
  while ( v12 >= 0 );
LABEL_11:
  v11->m_fDiceAniTime = 0.0;
  v11->m_fRewardTime = 0.0;
  v11->m_uiSuccessNum = 0;
  v11->m_fResultTime = 0.0;
  *(_DWORD *)&v11->m_bResultDiceAni = 0;
}

//----- (00711C60) --------------------------------------------------------
void __thiscall MiniHouseDiceGameWin::ChipAnimation(MiniHouseDiceGameWin *this, DICE_TAISAI_BETTING index, BETTING_LEVEL_MONEY nLevel, int nPos)
{
  MiniHouseDiceGameWin *v4; // esi@1
  BettingBut *v5; // eax@2
  float v6; // ecx@2
  float v7; // edx@2
  PgWinSpr *v8; // eax@2
  float v9; // edx@2
  float v10; // eax@2
  long double v11; // st7@2
  double v12; // st7@4
  double v13; // st6@5
  double v14; // st7@5
  float v15; // edi@9
  float v16; // ebx@9
  _BYTE v17[12]; // ST14_12@9
  int v18; // eax@9
  NiQuaternion v19; // ST04_16@9
  MHDiceGameTask *v20; // eax@10
  NiNode *v21; // esi@11
  NiPoint3 vT; // [sp+18h] [bp-50h]@2
  NiPoint3 axis; // [sp+24h] [bp-44h]@2
  NiQuaternion v24; // [sp+30h] [bp-38h]@2
  NiPoint3 vStandPos; // [sp+40h] [bp-28h]@2
  NiNode *pkParent; // [sp+4Ch] [bp-1Ch]@1
  float v27; // [sp+50h] [bp-18h]@2
  float v28; // [sp+54h] [bp-14h]@2
  float fAngle; // [sp+58h] [bp-10h]@2
  int v30; // [sp+64h] [bp-4h]@10

  v4 = this;
  pkParent = this->m_EffectPos.m_pObject;
  if ( pkParent )
  {
    v5 = this->m_spBettingBut[index].m_pObject;
    v6 = v5->m_kLocal.m_Translate.x;
    v7 = v5->m_kLocal.m_Translate.y;
    v24.m_fZ = v5->m_kLocal.m_Translate.z;
    v8 = v4->m_spLightSpr[6].m_pObject;
    v24.m_fX = v6;
    vStandPos.x = v8->m_kLocal.m_Translate.x;
    v24.m_fY = v7;
    v9 = v8->m_kLocal.m_Translate.y;
    v10 = v8->m_kLocal.m_Translate.z;
    fAngle = v6 - vStandPos.x;
    v28 = v24.m_fY - v9;
    v27 = v24.m_fZ - v10;
    vStandPos.x = fAngle;
    vStandPos.y = v28;
    vStandPos.z = v27;
    axis.x = 0.0;
    axis.y = 1.0;
    v24.m_fX = 0.0;
    v24.m_fY = 1.0;
    axis.z = 0.0;
    v24.m_fZ = 0.0;
    NiPoint3::Unitize(&vStandPos);
    NiPoint3::Unitize((NiPoint3 *)&v24.m_fX);
    fAngle = v24.m_fY * vStandPos.y + vStandPos.x * v24.m_fX + v24.m_fZ * vStandPos.z;
    NiPoint3::UnitCross((NiPoint3 *)&v24.m_fX, &vT, &vStandPos);
    v11 = fAngle;
    if ( fAngle < 0.0 )
    {
      fAngle = v11 * -1.0;
      v11 = fAngle;
    }
    v27 = acos(v11);
    v12 = v27;
    v27 = NI_PI / 7.0;
    if ( v27 >= v12 )
    {
      fAngle = NI_PI;
      axis.x = -400.0;
      axis.y = 200.0;
      v14 = 0.0;
      axis.z = 0.0;
      vT.z = 0.0;
    }
    else
    {
      v13 = NI_PI;
      v14 = 0.0;
      if ( vT.z <= 0.0 )
      {
        fAngle = v13 + 0.4000000059604645;
        axis.x = -200.0;
        axis.y = 200.0;
        axis.z = 0.0;
        vT.z = 0.0;
      }
      else
      {
        fAngle = v13 - 0.4000000059604645;
        axis.x = -600.0;
        axis.y = 200.0;
        axis.z = 0.0;
        vT.z = 0.0;
      }
    }
    v15 = axis.x;
    axis.x = v14;
    v16 = axis.y;
    axis.y = v14;
    axis.z = 1.0;
    NiQuaternion::NiQuaternion(&v24, fAngle, &axis);
    *(float *)v17 = v15;
    *(_QWORD *)&v17[4] = __PAIR__(LODWORD(vT.z), LODWORD(v16));
    *(_QWORD *)&v19.m_fW = *(_QWORD *)v18;
    *(_QWORD *)&v19.m_fY = *(_QWORD *)(v18 + 8);
    MHChipEffect::Start(v4->m_pkChipThrowEff, pkParent, v19, *(NiPoint3 *)v17);
  }
  v20 = MHDiceGameTask::GetDiceGameTask((NiPointer<MHDiceGameTask> *)&pkParent)->m_pObject;
  v30 = 0;
  MHDiceGameTask::CheckBettingChip(v20, index, 1);
  v30 = -1;
  if ( pkParent )
  {
    v21 = pkParent;
    if ( !InterlockedDecrement((volatile LONG *)&pkParent->m_uiRefCount) )
    {
      if ( v21 )
        v21->vfptr->__vecDelDtor((NiRefObject *)v21, 1u);
    }
  }
  SoundMgr::PlayInterfaceSound(&g_kSoundMgr, DiceOutMoney);
}
// B622CC: using guessed type const float NI_PI;

//----- (00711F00) --------------------------------------------------------
void __thiscall MiniHouseDiceGameWin::ShowResult(MiniHouseDiceGameWin *this, DICE_TAISAI_BETTING index, bool IsSuccess, bool IsNonBetting)
{
  MiniHouseDiceGameWin *v4; // esi@1
  BettingBut *v5; // eax@4
  BettingBut *v6; // eax@4
  float vPos; // ST24_4@4
  BettingBut *v8; // ebx@4
  float vPos_4; // ST28_4@4
  float vPos_8; // ST2C_4@4
  float v11; // ST18_4@4
  float v12; // ST1C_4@4
  BettingBut *v13; // esi@11
  PgSpr *v14; // eax@11
  unsigned int IsSuccessa; // [sp+3Ch] [bp+Ch]@4
  NiNode *IsNonBettinga; // [sp+40h] [bp+10h]@4

  v4 = this;
  if ( IsNonBetting )
  {
    this->m_spBettingBut[index].m_pObject->m_bHighlight = 0;
    BettingBut::SetButtonSpr(this->m_spBettingBut[index].m_pObject, 2u);
    v4->m_spBettingBut[index].m_pObject->m_eBetState = 4;
  }
  else if ( IsSuccess )
  {
    this->m_spBettingBut[index].m_pObject->m_bHighlight = 1;
    v5 = this->m_spBettingBut[index].m_pObject;
    v5->m_eBetState = 2;
    v5->m_bIsSwitched = 1;
    v5->m_uiNextSprIdx = 1;
    BettingBut::SetButtonSpr(this->m_spBettingBut[index].m_pObject, 1u);
    v6 = v4->m_spBettingBut[index].m_pObject;
    vPos = v6->m_kLocal.m_Translate.x;
    v8 = v4->m_spBettingBut[index].m_pObject;
    vPos_4 = v6->m_kLocal.m_Translate.y;
    vPos_8 = v6->m_kLocal.m_Translate.z;
    IsNonBettinga = v4->m_pkResultEffectList[v4->m_uiSuccessNum]->m_spEffect.m_pObject;
    v11 = (double)((unsigned int)((int (__thiscall *)(BettingBut *))v8->vfptr[36].__vecDelDtor)(v4->m_spBettingBut[index].m_pObject) >> 1)
        + vPos;
    IsSuccessa = (unsigned int)((int (__thiscall *)(BettingBut *))v8->vfptr[37].__vecDelDtor)(v8) >> 1;
    IsNonBettinga->m_kLocal.m_Translate.x = v11;
    v12 = (double)IsSuccessa + vPos_4;
    IsNonBettinga->m_kLocal.m_Translate.y = v12;
    IsNonBettinga->m_kLocal.m_Translate.z = vPos_8;
    SpEffect::Start(v4->m_pkResultEffectList[v4->m_uiSuccessNum], v4->m_pRunEffect.m_pObject);
    if ( ((signed int)index > 9 && (signed int)index < 19 || index == 29 || index == 30) && !v4->m_bIsHappendBigPot )
      v4->m_bIsHappendBigPot = 1;
    ++v4->m_uiSuccessNum;
  }
  else
  {
    this->m_spBettingBut[index].m_pObject->m_bHighlight = 0;
    v13 = this->m_spBettingBut[index].m_pObject;
    v14 = v13->m_spSpr.m_pObject;
    v13->m_eBetState = 3;
    v13->m_bIsSwitched = 0;
    v13->m_uiNextSprIdx = 2;
    if ( v14->m_akGeom.m_uiSize <= 2 || !v14->m_akGeom.m_pBase[2].m_pObject )
    {
      ((void (__thiscall *)(BettingBut *, _DWORD, signed int))v13->vfptr[29].__vecDelDtor)(v13, 0, 1);
      NiAVObject::Update((NiAVObject *)&v13->vfptr, 0.0, 0);
      NiAVObject::UpdateProperties((NiAVObject *)&v13->vfptr);
    }
  }
}

//----- (007120E0) --------------------------------------------------------
void __userpurge MiniHouseDiceGameWin::UpdateTimeText(MiniHouseDiceGameWin *this@<ecx>, int a2@<edi>, float fRemainTime, bool IsShow)
{
  MiniHouseDiceGameWin *v4; // esi@1
  PgWinText *v5; // ecx@5
  void *(__thiscall *v6)(NiRefObject *, unsigned int); // eax@5
  NiRefObjectVtbl **v7; // esi@8
  int v8; // ST08_4@8
  NiRefObjectVtbl *v9; // edi@8
  char *v10; // eax@8
  char *v11; // eax@8
  PgWinText *v12; // ecx@10
  float fRemainTimea; // [sp+Ch] [bp+8h]@4

  v4 = this;
  if ( IsShow )
  {
    if ( fRemainTime < 0.0 )
      fRemainTime = 0.0;
    ((void (__stdcall *)(signed int))this->m_spTimeCountText.m_pObject->vfptr[64].__vecDelDtor)(1);
    LODWORD(fRemainTimea) = (signed int)fRemainTime;
    if ( LOWORD(fRemainTimea) != v4->m_uiCurrentTime )
    {
      v5 = v4->m_spTimeCountText.m_pObject;
      v4->m_uiCurrentTime = LOWORD(fRemainTimea);
      v6 = v5->vfptr[117].__vecDelDtor;
      if ( LOWORD(fRemainTimea) <= 0xAu )
        ((void (__cdecl *)(D3DXCOLOR *))v6)(&Color::m_kDxRedColor);
      else
        ((void (__cdecl *)(D3DXCOLOR *))v6)(&Color::m_kDxWhiteColor);
      v7 = &v4->m_spTimeCountText.m_pObject->vfptr;
      v8 = a2;
      v9 = *v7;
      v10 = (char *)TextData2::Get(0xF2E7153E);
      v11 = fs(v10, LOWORD(fRemainTimea));
      ((void (__thiscall *)(NiRefObjectVtbl **, char *, int))v9[118].__vecDelDtor)(v7, v11, v8);
    }
  }
  else
  {
    v12 = this->m_spTimeCountText.m_pObject;
    if ( v12 )
      ((void (__stdcall *)(_DWORD))v12->vfptr[64].__vecDelDtor)(0);
  }
}
// 7120E0: could not find valid save-restore pair for edi

//----- (007121C0) --------------------------------------------------------
void __thiscall MiniHouseDiceGameWin::DiceAnimationStart(MiniHouseDiceGameWin *this, unsigned int *AniCode)
{
  MiniHouseDiceGameWin *v2; // esi@1
  NiRefObjectVtbl *v3; // eax@1
  float vPos; // ST14_4@1
  double v5; // st7@1
  NiNode *v6; // eax@1
  float vPos_4; // ST18_4@1
  float v8; // ST20_4@1
  float v9; // ST24_4@1
  signed int v10; // edi@1
  int v11; // esi@1

  v2 = this;
  v3 = this->vfptr;
  this->m_fResultTime = 0.1;
  vPos = (double)((int (*)(void))v3[41].__vecDelDtor)();
  v5 = (double)((int (__thiscall *)(MiniHouseDiceGameWin *))v2->vfptr[42].__vecDelDtor)(v2);
  v6 = v2->m_pkDiceRollEffect->m_spEffect.m_pObject;
  vPos_4 = v5;
  v8 = vPos + 540.0;
  v6->m_kLocal.m_Translate.x = v8;
  v9 = vPos_4 - 420.0;
  v6->m_kLocal.m_Translate.y = v9;
  v6->m_kLocal.m_Translate.z = 1000.0;
  PgWinMgr::StartFullScreenEffect(
    &Pgg_kWinMgr,
    Timer::ms_fCurTime,
    (NiAVObject *)v2->m_pkDiceRollEffect->m_spEffect.m_pObject);
  SoundMgr::PlayInterfaceSound(&g_kSoundMgr, DiceRoll_Pair);
  v2->m_AniActor[0].m_NextAni = *AniCode;
  v2->m_AniActor[1].m_NextAni = AniCode[1];
  v2->m_AniActor[2].m_NextAni = AniCode[2];
  v10 = 0;
  v11 = (int)v2->m_spResultDice;
  do
  {
    (*(void (__stdcall **)(unsigned int))(**(_DWORD **)v11 + 492))(AniCode[v10++] / 0x64 - 1);
    v11 += 4;
  }
  while ( v10 < 3 );
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (007122C0) --------------------------------------------------------
void __thiscall MiniHouseDiceGameWin::SetMarkButton(MiniHouseDiceGameWin *this, DICE_TAISAI_BETTING nPos, BET_STATE bState, bool IsMark)
{
  MiniHouseDiceGameWin *v4; // esi@1

  v4 = this;
  BettingBut::SetBettingState(this->m_spBettingBut[nPos].m_pObject, bState);
  v4->m_spBettingBut[nPos].m_pObject->m_bHighlight = IsMark;
  if ( bState == BET_RESET )
    BettingBut::SetButtonSpr(v4->m_spBettingBut[nPos].m_pObject, 0);
}

//----- (00712310) --------------------------------------------------------
char __thiscall mhMinimizeDiceGameWin::Create(mhMinimizeDiceGameWin *this, PgFrameWork *pkFrameWork)
{
  mhMinimizeDiceGameWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiNode *v5; // eax@3
  NiNode *v6; // esi@7
  char result; // al@10
  PgSprData *v8; // edi@11
  PgWinBut *v9; // edi@11
  char *v10; // eax@11
  NiNode *v11; // esi@12
  int iLeft; // [sp+14h] [bp-18h]@11
  int iTop; // [sp+18h] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+1Ch] [bp-10h]@1
  int v15; // [sp+28h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v15 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\DiceGameMainMin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = spNode.m_pObject;
  if ( spNode.m_pObject )
  {
    v2->m_pkFrameWork = pkFrameWork;
    v8 = PgSprData::Create((NiAVObject *)&v5->vfptr, "100CopperNor", &iLeft, &iTop, 0);
    PgSprData::Add(v8, (NiAVObject *)&spNode.m_pObject->vfptr, "100CopperClick");
    PgSprData::Add(v8, (NiAVObject *)&spNode.m_pObject->vfptr, "100CopperOver");
    v9 = PgWinBut::CreateWin(0, 0, v8, (PgWin *)&v2->vfptr, 0, 0, 0);
    v9->m_pkToolTipWin = g_pkToolTipWin;
    v10 = (char *)TextData2::Get(0xD7F9364E);
    PgWin::SetToolTipWinText((PgWin *)&v9->vfptr, v10);
    ((void (__thiscall *)(mhMinimizeDiceGameWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.1,
      0.30000001);
    v15 = -1;
    if ( spNode.m_pObject )
    {
      v11 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v11 )
          v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
      }
    }
    result = 1;
  }
  else
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("Game\\MyHomeMinButton.nif load fail", "LoadFail", spNode.m_pObject);
      v5 = spNode.m_pObject;
    }
    v15 = -1;
    if ( v5 )
    {
      v6 = v5;
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    result = 0;
  }
  return result;
}
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (007124D0) --------------------------------------------------------
void __thiscall mhDiceHelpWin::OnCommand(mhDiceHelpWin *this, unsigned int wParam, int lParam)
{
  mhDiceHelpWin *v3; // edi@1
  NiPointer<MHDiceGameTask> *v4; // eax@3
  void (__thiscall ***v5)(_DWORD, _DWORD); // esi@4

  v3 = this;
  switch ( wParam )
  {
    case 0u:
    case 1u:
      mhDiceHelpWin::CloseWin(this);
      break;
    case 2u:
      v4 = MHDiceGameTask::GetDiceGameTask((NiPointer<MHDiceGameTask> *)&wParam);
      MHDiceGameTask::OpenDiceRateWin(v4->m_pObject);
      if ( wParam )
      {
        v5 = (void (__thiscall ***)(_DWORD, _DWORD))wParam;
        if ( !InterlockedDecrement((volatile LONG *)(wParam + 4)) )
        {
          if ( v5 )
            (**v5)(v5, 1);
        }
      }
      mhDiceHelpWin::CloseWin(v3);
      break;
    case 3u:
      mhDiceHelpWin::OnSlideBar(this);
      break;
    default:
      return;
  }
}

//----- (007125B0) --------------------------------------------------------
void __thiscall mhDiceRankWin::UpdateMedal(mhDiceRankWin *this)
{
  mhDiceRankWin *v1; // edi@1
  MHDiceGameTask *v2; // ecx@1
  bool v3; // bl@1
  MHDiceGameTask *v4; // esi@2
  int v5; // ebx@6
  int v6; // esi@6
  signed int v7; // edi@6
  SlideListWin *v8; // ecx@8
  int v9; // eax@8
  int v10; // edx@8
  int v11; // esi@9
  int v12; // eax@10
  int v13; // edi@11
  int v14; // ebx@12
  int v15; // eax@13
  int v16; // eax@17
  int v17; // edi@17
  int v18; // eax@17
  SlideListWin *v19; // edi@18
  int v20; // eax@18
  int v21; // ebx@19
  int v22; // ecx@20
  int v23; // edi@21
  int v24; // eax@25
  int v25; // ebx@25
  int v26; // eax@25
  mhDiceRankWin *v27; // ebx@26
  int v28; // ecx@27
  int v29; // eax@33
  int nViewStartIndex; // [sp+10h] [bp-28h]@8
  NiPointer<MHDiceGameTask> result; // [sp+18h] [bp-20h]@1
  int v32; // [sp+1Ch] [bp-1Ch]@9
  int nPosX; // [sp+20h] [bp-18h]@18
  mhDiceRankWin *v34; // [sp+24h] [bp-14h]@1
  int i; // [sp+28h] [bp-10h]@8
  int v36; // [sp+34h] [bp-4h]@1

  v1 = this;
  v34 = this;
  v2 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  v36 = 0;
  v3 = MHDiceGameTask::IsGambleMode(v2);
  v36 = -1;
  if ( result.m_pObject )
  {
    v4 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
  }
  if ( !v3 )
  {
    v5 = (int)v1->m_pkSprRankSilver;
    v6 = (int)v1->m_pkSprRankSilver;
    v7 = 20;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v6 - 80) + 256))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v6 - 80) + 240))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v6 + 256))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v6 + 240))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v6 + 80) + 256))(0);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v6 + 80) + 240))(0);
      v6 += 4;
      --v7;
    }
    while ( v7 );
    v8 = v34->m_pUserList;
    v9 = (char *)v8->m_vecButList._Mylast - (char *)v8->m_vecButList._Myfirst;
    nViewStartIndex = v8->m_nViewStartPos;
    v10 = 0;
    i = 0;
    if ( (signed int)(v9 & 0xFFFFFFFC) > 0 )
    {
      v11 = v5;
      v32 = -432 - (_DWORD)v34;
      while ( 1 )
      {
        v12 = v8->m_vecButList._Mylast - v8->m_vecButList._Myfirst;
        if ( v10 < (unsigned int)v12
          && (v13 = *(int *)((char *)v8->m_vecButList._Myfirst + v11 + v32),
              (*(_DWORD *)(v13 + 336) - *(_DWORD *)(v13 + 332)) >> 2)
          && (v14 = **(_DWORD **)(v13 + 332)) != 0 )
        {
          if ( v10 < v12 && v13 )
          {
            v16 = ((int (*)(void))v8->vfptr[41].__vecDelDtor)();
            v17 = (*(int (__thiscall **)(int))(*(_DWORD *)v13 + 164))(v13) + v16;
            v18 = (*(int (__thiscall **)(int))(*(_DWORD *)v14 + 164))(v14);
            v10 = i;
            v15 = v17 + v18;
          }
          else
          {
            v15 = 0;
          }
        }
        else
        {
          v15 = 0;
        }
        nPosX = v15 + 10;
        v19 = v34->m_pUserList;
        v20 = v19->m_vecButList._Mylast - v19->m_vecButList._Myfirst;
        if ( v10 < (unsigned int)v20
          && (v21 = *(int *)((char *)v19->m_vecButList._Myfirst + v11 + v32),
              (*(_DWORD *)(v21 + 336) - *(_DWORD *)(v21 + 332)) >> 2)
          && (v22 = **(_DWORD **)(v21 + 332)) != 0 )
        {
          if ( v10 < v20 && v21 )
          {
            v24 = (*(int (**)(void))(*(_DWORD *)v22 + 168))();
            v25 = (*(int (__thiscall **)(int))(*(_DWORD *)v21 + 168))(v21) + v24;
            v26 = ((int (__thiscall *)(SlideListWin *))v19->vfptr[42].__vecDelDtor)(v19);
            v10 = i;
            v23 = v25 + v26;
          }
          else
          {
            v23 = 0;
          }
        }
        else
        {
          v23 = 0;
        }
        v27 = v34;
        if ( v10 < v34->m_iMedalCnt[0] - nViewStartIndex )
          break;
        if ( v10 < v34->m_iMedalCnt[1] - nViewStartIndex )
        {
          (*(void (__stdcall **)(signed int))(**(_DWORD **)v11 + 256))(1);
          (*(void (__stdcall **)(int))(**(_DWORD **)v11 + 172))(nPosX);
          v28 = *(_DWORD *)v11;
          goto LABEL_32;
        }
        if ( v10 < v34->m_iMedalCnt[2] - nViewStartIndex )
        {
          (*(void (__stdcall **)(signed int))(**(_DWORD **)(v11 + 80) + 256))(1);
          (*(void (__stdcall **)(int))(**(_DWORD **)(v11 + 80) + 172))(nPosX);
          v28 = *(_DWORD *)(v11 + 80);
          goto LABEL_32;
        }
LABEL_33:
        v8 = v27->m_pUserList;
        ++v10;
        v29 = v8->m_vecButList._Mylast - v8->m_vecButList._Myfirst;
        v11 += 4;
        i = v10;
        if ( v10 >= v29 )
          return;
      }
      (*(void (__stdcall **)(signed int))(**(_DWORD **)(v11 - 80) + 256))(1);
      (*(void (__stdcall **)(int))(**(_DWORD **)(v11 - 80) + 172))(nPosX);
      v28 = *(_DWORD *)(v11 - 80);
LABEL_32:
      (*(void (__stdcall **)(int))(*(_DWORD *)v28 + 176))(v23);
      v10 = i;
      goto LABEL_33;
    }
  }
}

//----- (007128C0) --------------------------------------------------------
void __thiscall MHDiceRewardMoneyWin::OnCommand(MHDiceRewardMoneyWin *this, unsigned int wParam, int lParam)
{
  if ( wParam )
  {
    if ( wParam <= 2 )
      PgWin::PostMsg((PgWin *)&this->vfptr, 1u, 0, 0);
  }
  else
  {
    MHDiceRewardMoneyWin::OnCmdOk(this);
  }
}

//----- (007128F0) --------------------------------------------------------
void __thiscall MHDiceRewardMoneyWin::Open(MHDiceRewardMoneyWin *this, unsigned int uiOkMsg, unsigned int uiCancelMsg, char *pcText1, char *pcText2)
{
  MHDiceRewardMoneyWin *v5; // esi@1
  PgWinText *v6; // ecx@2
  PgWinText *v7; // ecx@5

  v5 = this;
  if ( pcText1 )
  {
    v6 = this->m_pkTitleText1.m_pObject;
    if ( v6 )
      ((void (__stdcall *)(_DWORD))v6->vfptr[118].__vecDelDtor)(pcText1);
  }
  if ( pcText2 )
  {
    v7 = v5->m_pkTitleText2.m_pObject;
    if ( v7 )
      ((void (__stdcall *)(_DWORD))v7->vfptr[118].__vecDelDtor)(pcText2);
  }
  v5->m_uiOkMsg = uiOkMsg;
  v5->m_uiCancelMsg = uiCancelMsg;
  PgWinMgr::DoModal(&Pgg_kWinMgr, (PgWin *)&v5->vfptr, 0, 0, 0);
}

//----- (00712960) --------------------------------------------------------
char __thiscall mhDiceRateSheetWin::Create(mhDiceRateSheetWin *this, PgFrameWork *pkFrameWork)
{
  mhDiceRateSheetWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiNode *v5; // ecx@3
  NiNode *v6; // esi@7
  bool v7; // zf@8
  NiAVObject *v9; // eax@12
  NiTexturingProperty *v10; // eax@12
  NiTexturingProperty *v11; // edi@12
  NiTexturingProperty::Map *v12; // eax@14
  NiSourceTexture *v13; // eax@15
  PgSprData *v14; // eax@21
  int v15; // edi@27
  int v16; // ebx@27
  NiSourceTexture *v17; // eax@27
  PgSprData *v18; // eax@28
  PgFont *v19; // eax@32
  NiUnsharedGeometryGroup *v20; // eax@32
  D3DXCOLOR v21; // ST234_16@32
  char *v22; // eax@32
  PgSprData *v23; // eax@32
  PgFont *v24; // ST238_4@32
  unsigned int v25; // ST234_4@32
  unsigned int v26; // eax@32
  NiUnsharedGeometryGroup *v27; // eax@32
  PgSprData *v28; // eax@32
  PgFont *v29; // ST238_4@32
  unsigned int v30; // ST234_4@32
  unsigned int v31; // eax@32
  NiUnsharedGeometryGroup *v32; // eax@32
  PgSprData *v33; // eax@32
  PgFont *v34; // ST238_4@32
  unsigned int v35; // ST234_4@32
  unsigned int v36; // eax@32
  NiUnsharedGeometryGroup *v37; // eax@32
  PgSprData *v38; // eax@32
  PgFont *v39; // ST238_4@32
  unsigned int v40; // ST234_4@32
  unsigned int v41; // eax@32
  NiUnsharedGeometryGroup *v42; // eax@32
  PgFont *v43; // eax@33
  NiUnsharedGeometryGroup *v44; // eax@33
  PgFont *v45; // eax@34
  NiUnsharedGeometryGroup *v46; // eax@34
  PgFont *v47; // eax@35
  NiUnsharedGeometryGroup *v48; // eax@35
  PgFont *v49; // eax@36
  NiUnsharedGeometryGroup *v50; // eax@36
  PgFont *v51; // eax@37
  NiUnsharedGeometryGroup *v52; // eax@37
  PgFont *v53; // eax@38
  NiUnsharedGeometryGroup *v54; // eax@38
  PgFont *v55; // eax@39
  NiUnsharedGeometryGroup *v56; // eax@39
  PgFont *v57; // eax@40
  NiUnsharedGeometryGroup *v58; // eax@40
  PgFont *v59; // eax@41
  NiUnsharedGeometryGroup *v60; // eax@41
  PgFont *v61; // eax@42
  NiUnsharedGeometryGroup *v62; // eax@42
  PgFont *v63; // eax@43
  NiUnsharedGeometryGroup *v64; // eax@43
  PgFont *v65; // eax@44
  NiUnsharedGeometryGroup *v66; // eax@44
  PgFont *v67; // eax@45
  NiUnsharedGeometryGroup *v68; // eax@45
  PgFont *v69; // eax@46
  NiUnsharedGeometryGroup *v70; // eax@46
  PgFont *v71; // eax@47
  NiUnsharedGeometryGroup *v72; // eax@47
  PgFont *v73; // eax@48
  NiUnsharedGeometryGroup *v74; // eax@48
  PgFont *v75; // eax@49
  NiUnsharedGeometryGroup *v76; // eax@49
  PgFont *v77; // eax@50
  NiUnsharedGeometryGroup *v78; // eax@50
  PgFont *v79; // eax@51
  NiUnsharedGeometryGroup *v80; // eax@51
  PgFont *v81; // eax@52
  NiUnsharedGeometryGroup *v82; // eax@52
  PgFont *v83; // eax@53
  NiUnsharedGeometryGroup *v84; // eax@53
  PgFont *v85; // eax@54
  NiUnsharedGeometryGroup *v86; // eax@54
  PgFont *v87; // eax@55
  NiUnsharedGeometryGroup *v88; // eax@55
  PgFont *v89; // eax@56
  NiUnsharedGeometryGroup *v90; // eax@56
  PgFont *v91; // eax@57
  NiUnsharedGeometryGroup *v92; // eax@57
  PgFont *v93; // eax@58
  NiUnsharedGeometryGroup *v94; // eax@58
  PgFont *v95; // eax@59
  NiUnsharedGeometryGroup *v96; // eax@59
  PgFont *v97; // eax@60
  NiUnsharedGeometryGroup *v98; // eax@60
  PgFont *v99; // eax@61
  NiUnsharedGeometryGroup *v100; // eax@61
  PgFont *v101; // eax@62
  NiUnsharedGeometryGroup *v102; // eax@62
  PgFont *v103; // eax@63
  PgWinText *v104; // edi@63
  NiRefObjectVtbl *v105; // ebx@63
  UIUtil ui; // [sp+258h] [bp-40h]@27
  NiRefObjectVtbl *v107; // [sp+26Ch] [bp-2Ch]@32
  NiSourceTexture *pkTexture; // [sp+270h] [bp-28h]@15
  NiPointer<NiTexturingProperty> spTexProp; // [sp+274h] [bp-24h]@12
  unsigned int uiWidth; // [sp+278h] [bp-20h]@30
  unsigned int uiHeight; // [sp+27Ch] [bp-1Ch]@30
  int uiLeft; // [sp+280h] [bp-18h]@21
  int uiTop; // [sp+284h] [bp-14h]@21
  NiPointer<NiNode> spNode; // [sp+288h] [bp-10h]@1
  int v115; // [sp+294h] [bp-4h]@1
  PgWinText *pkTextWin; // [sp+2A0h] [bp+8h]@32
  PgWinText *pkTextWina; // [sp+2A0h] [bp+8h]@32
  PgWinText *pkTextWinb; // [sp+2A0h] [bp+8h]@32
  PgWinText *pkTextWinc; // [sp+2A0h] [bp+8h]@32
  PgWinText *pkTextWind; // [sp+2A0h] [bp+8h]@32
  PgWinText *pkTextWine; // [sp+2A0h] [bp+8h]@32
  PgWinText *pkTextWinf; // [sp+2A0h] [bp+8h]@32
  PgWinText *pkTextWing; // [sp+2A0h] [bp+8h]@32
  PgWinText *pkTextWinh; // [sp+2A0h] [bp+8h]@32
  PgWinText *pkTextWini; // [sp+2A0h] [bp+8h]@32
  PgWinText *pkTextWinj; // [sp+2A0h] [bp+8h]@33
  PgWinText *pkTextWink; // [sp+2A0h] [bp+8h]@34
  PgWinText *pkTextWinl; // [sp+2A0h] [bp+8h]@35
  PgWinText *pkTextWinm; // [sp+2A0h] [bp+8h]@36
  PgWinText *pkTextWinn; // [sp+2A0h] [bp+8h]@37
  PgWinText *pkTextWino; // [sp+2A0h] [bp+8h]@38
  PgWinText *pkTextWinp; // [sp+2A0h] [bp+8h]@39
  PgWinText *pkTextWinq; // [sp+2A0h] [bp+8h]@40
  PgWinText *pkTextWinr; // [sp+2A0h] [bp+8h]@41
  PgWinText *pkTextWins; // [sp+2A0h] [bp+8h]@42
  PgWinText *pkTextWint; // [sp+2A0h] [bp+8h]@43
  PgWinText *pkTextWinu; // [sp+2A0h] [bp+8h]@44
  PgWinText *pkTextWinv; // [sp+2A0h] [bp+8h]@45
  PgWinText *pkTextWinw; // [sp+2A0h] [bp+8h]@46
  PgWinText *pkTextWinx; // [sp+2A0h] [bp+8h]@47
  PgWinText *pkTextWiny; // [sp+2A0h] [bp+8h]@48
  PgWinText *pkTextWinz; // [sp+2A0h] [bp+8h]@49
  PgWinText *pkTextWinba; // [sp+2A0h] [bp+8h]@50
  PgWinText *pkTextWinbb; // [sp+2A0h] [bp+8h]@51
  PgWinText *pkTextWinbc; // [sp+2A0h] [bp+8h]@52
  PgWinText *pkTextWinbd; // [sp+2A0h] [bp+8h]@53
  PgWinText *pkTextWinbe; // [sp+2A0h] [bp+8h]@54
  PgWinText *pkTextWinbf; // [sp+2A0h] [bp+8h]@55
  PgWinText *pkTextWinbg; // [sp+2A0h] [bp+8h]@56
  PgWinText *pkTextWinbh; // [sp+2A0h] [bp+8h]@57
  PgWinText *pkTextWinbi; // [sp+2A0h] [bp+8h]@58
  PgWinText *pkTextWinbj; // [sp+2A0h] [bp+8h]@59
  PgWinText *pkTextWinbk; // [sp+2A0h] [bp+8h]@60
  PgWinText *pkTextWinbl; // [sp+2A0h] [bp+8h]@61
  PgWinText *pkTextWinbm; // [sp+2A0h] [bp+8h]@62

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v115 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\DiceGameRateSheet.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = spNode.m_pObject;
  if ( !spNode.m_pObject )
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("Game\\DiceGaemRateSheet.nif load fail", "LoadFail", 0);
      v5 = spNode.m_pObject;
    }
    v115 = -1;
    if ( !v5 )
      return 0;
    v6 = v5;
    if ( InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      return 0;
    v7 = v6 == 0;
    goto LABEL_9;
  }
  v2->m_pkFrameWork = pkFrameWork;
  v9 = (NiAVObject *)((int (__stdcall *)(const char *))v5->vfptr[18].__vecDelDtor)("Frame");
  v10 = (NiTexturingProperty *)NiAVObject::GetProperty(v9, 8);
  v11 = v10;
  spTexProp.m_pObject = v10;
  if ( v10 )
    InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
  v12 = *v11->m_kMaps.m_pBase;
  LOBYTE(v115) = 1;
  if ( !v12 || (v13 = (NiSourceTexture *)v12->m_spTexture.m_pObject, (pkTexture = v13) == 0) )
  {
    LOBYTE(v115) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    v6 = spNode.m_pObject;
    v115 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v7 = v6 == 0;
    goto LABEL_9;
  }
  v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v13);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v14, 0, pkFrameWork, "DiceGaemRateSheet", 0) )
  {
    LOBYTE(v115) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    v6 = spNode.m_pObject;
    v115 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      return 0;
    v7 = v6 == 0;
LABEL_9:
    if ( !v7 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    return 0;
  }
  v15 = uiLeft;
  v16 = uiTop;
  UIUtil::UIUtil(&ui);
  LOBYTE(v115) = 2;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, v15, v16);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v17 = MenuTexMgr::GetTexture(0x13u);
  if ( v17 )
    v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v17);
  else
    v18 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v15, uiTop - v16, v18, (PgWin *)&v2->vfptr, 0, 0);
  UIUtil::CreateSpr(&ui, "Panel01", 0);
  UIUtil::CreateSpr(&ui, "Plane02", 0);
  if ( !PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "WinTitle",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight)
    || (v19 = Font::Get(MAIN_MENU),
        pkTextWin = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v19, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWin->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWin, 1u),
        v107 = pkTextWin->vfptr,
        v20 = TextData2::Get(0x16313564u),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWin, (unsigned int)v20),
        ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0),
        UIUtil::CreateBtn(&ui, 0, "ClsNor", "ClsClick", "ClsOver", 0, 0),
        pkTextWina = (PgWinText *)UIUtil::CreateBtn(&ui, 1u, "Btn01Nor", "Btn01Click", "Btn01Over", 0, 0),
        *(_QWORD *)&v21.r = *(_QWORD *)&Color::m_kDxWhiteColor.r,
        *(_QWORD *)&v21.b = *(_QWORD *)&Color::m_kDxWhiteColor.b,
        v22 = (char *)TextData2::Get(0x34361593u),
        UIUtil::CreateAttachedText((PgWin *)&pkTextWina->vfptr, v22, v21, 5u),
        v23 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text_menu01", &uiLeft, &uiTop, pkTexture),
        pkTextWinb = (PgWinText *)PgWinSpr::CreateWin(uiLeft - v15, uiTop - v16, v23, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWinb->vfptr[60].__vecDelDtor((NiRefObject *)pkTextWinb, 0),
        v24 = Font::Get(0),
        v25 = ((int (*)(void))pkTextWinb->vfptr[37].__vecDelDtor)(),
        v26 = ((int (*)(void))pkTextWinb->vfptr[36].__vecDelDtor)(),
        pkTextWinc = PgWinText::CreateWin(0, 1, v26, v25, v24, (PgWin *)&pkTextWinb->vfptr, 0, 0),
        pkTextWinc->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinc, 5u),
        v107 = pkTextWinc->vfptr,
        v27 = TextData2::Get(0xAA926474),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWinc, (unsigned int)v27),
        ((void (__stdcall *)(_DWORD))pkTextWinc->vfptr[60].__vecDelDtor)(0),
        v28 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text_menu02", &uiLeft, &uiTop, pkTexture),
        pkTextWind = (PgWinText *)PgWinSpr::CreateWin(uiLeft - v15, uiTop - v16, v28, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWind->vfptr[60].__vecDelDtor((NiRefObject *)pkTextWind, 0),
        v29 = Font::Get(0),
        v30 = ((int (*)(void))pkTextWind->vfptr[37].__vecDelDtor)(),
        v31 = ((int (*)(void))pkTextWind->vfptr[36].__vecDelDtor)(),
        pkTextWine = PgWinText::CreateWin(0, 1, v31, v30, v29, (PgWin *)&pkTextWind->vfptr, 0, 0),
        pkTextWine->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWine, 5u),
        v107 = pkTextWine->vfptr,
        v32 = TextData2::Get(0xDFD0BEE9),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWine, (unsigned int)v32),
        ((void (__stdcall *)(_DWORD))pkTextWine->vfptr[60].__vecDelDtor)(0),
        v33 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text_menu03", &uiLeft, &uiTop, pkTexture),
        pkTextWinf = (PgWinText *)PgWinSpr::CreateWin(uiLeft - v15, uiTop - v16, v33, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWinf->vfptr[60].__vecDelDtor((NiRefObject *)pkTextWinf, 0),
        v34 = Font::Get(0),
        v35 = ((int (*)(void))pkTextWinf->vfptr[37].__vecDelDtor)(),
        v36 = ((int (*)(void))pkTextWinf->vfptr[36].__vecDelDtor)(),
        pkTextWing = PgWinText::CreateWin(0, 1, v36, v35, v34, (PgWin *)&pkTextWinf->vfptr, 0, 0),
        pkTextWing->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWing, 5u),
        v107 = pkTextWing->vfptr,
        v37 = TextData2::Get(0x8DEAA2C7),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWing, (unsigned int)v37),
        ((void (__stdcall *)(_DWORD))pkTextWing->vfptr[60].__vecDelDtor)(0),
        v38 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Text_menu04", &uiLeft, &uiTop, pkTexture),
        pkTextWinh = (PgWinText *)PgWinSpr::CreateWin(uiLeft - v15, uiTop - v16, v38, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWinh->vfptr[60].__vecDelDtor((NiRefObject *)pkTextWinh, 0),
        v39 = Font::Get(0),
        v40 = ((int (*)(void))pkTextWinh->vfptr[37].__vecDelDtor)(),
        v41 = ((int (*)(void))pkTextWinh->vfptr[36].__vecDelDtor)(),
        pkTextWini = PgWinText::CreateWin(0, 1, v41, v40, v39, (PgWin *)&pkTextWinh->vfptr, 0, 0),
        pkTextWini->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWini, 5u),
        v107 = pkTextWini->vfptr,
        v42 = TextData2::Get(0x7E97C0C9u),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWini, (unsigned int)v42),
        ((void (__stdcall *)(_DWORD))pkTextWini->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_case01",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v43 = Font::Get(MAIN_MENU),
        pkTextWinj = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v43, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWinj->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinj, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinj->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWinj->vfptr,
        v44 = TextData2::Get(0x7495D5CEu),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWinj, (unsigned int)v44),
        ((void (__stdcall *)(_DWORD))pkTextWinj->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_rate01",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v45 = Font::Get(MAIN_MENU),
        pkTextWink = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v45, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWink->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWink, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWink->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWink->vfptr,
        v46 = TextData2::Get(0xF2F81C2D),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWink, (unsigned int)v46),
        ((void (__stdcall *)(_DWORD))pkTextWink->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_case02",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v47 = Font::Get(MAIN_MENU),
        pkTextWinl = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v47, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWinl->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinl, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinl->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWinl->vfptr,
        v48 = TextData2::Get(0x8F6E81D2),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWinl, (unsigned int)v48),
        ((void (__stdcall *)(_DWORD))pkTextWinl->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_rate02",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v49 = Font::Get(MAIN_MENU),
        pkTextWinm = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v49, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWinm->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinm, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinm->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWinm->vfptr,
        v50 = TextData2::Get(0xF2F81C2D),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWinm, (unsigned int)v50),
        ((void (__stdcall *)(_DWORD))pkTextWinm->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_case03",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v51 = Font::Get(MAIN_MENU),
        pkTextWinn = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v51, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWinn->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinn, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinn->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWinn->vfptr,
        v52 = TextData2::Get(0x7D7870E5u),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWinn, (unsigned int)v52),
        ((void (__stdcall *)(_DWORD))pkTextWinn->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_rate03",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v53 = Font::Get(MAIN_MENU),
        pkTextWino = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v53, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWino->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWino, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWino->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWino->vfptr,
        v54 = TextData2::Get(0xF2F8232D),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWino, (unsigned int)v54),
        ((void (__stdcall *)(_DWORD))pkTextWino->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_case04",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v55 = Font::Get(MAIN_MENU),
        pkTextWinp = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v55, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWinp->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinp, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinp->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWinp->vfptr,
        v56 = TextData2::Get(0x354C7E7Bu),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWinp, (unsigned int)v56),
        ((void (__stdcall *)(_DWORD))pkTextWinp->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_rate04",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v57 = Font::Get(MAIN_MENU),
        pkTextWinq = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v57, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWinq->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinq, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinq->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWinq->vfptr,
        v58 = TextData2::Get(0x222D1C2Du),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWinq, (unsigned int)v58),
        ((void (__stdcall *)(_DWORD))pkTextWinq->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_case05",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v59 = Font::Get(MAIN_MENU),
        pkTextWinr = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v59, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWinr->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinr, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinr->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWinr->vfptr,
        v60 = TextData2::Get(0x94A5C5C3),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWinr, (unsigned int)v60),
        ((void (__stdcall *)(_DWORD))pkTextWinr->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_rate05",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v61 = Font::Get(MAIN_MENU),
        pkTextWins = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v61, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWins->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWins, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWins->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWins->vfptr,
        v62 = TextData2::Get(0xF22C1D2D),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWins, (unsigned int)v62),
        ((void (__stdcall *)(_DWORD))pkTextWins->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_case06",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v63 = Font::Get(MAIN_MENU),
        pkTextWint = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v63, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWint->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWint, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWint->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWint->vfptr,
        v64 = TextData2::Get(0x28164A15u),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWint, (unsigned int)v64),
        ((void (__stdcall *)(_DWORD))pkTextWint->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_rate06",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v65 = Font::Get(MAIN_MENU),
        pkTextWinu = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v65, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWinu->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinu, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinu->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWinu->vfptr,
        v66 = TextData2::Get(0xF228202D),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWinu, (unsigned int)v66),
        ((void (__stdcall *)(_DWORD))pkTextWinu->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_case07",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v67 = Font::Get(MAIN_MENU),
        pkTextWinv = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v67, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWinv->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinv, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinv->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWinv->vfptr,
        v68 = TextData2::Get(0x27164A16u),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWinv, (unsigned int)v68),
        ((void (__stdcall *)(_DWORD))pkTextWinv->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_rate07",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v69 = Font::Get(MAIN_MENU),
        pkTextWinw = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v69, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWinw->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinw, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinw->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWinw->vfptr,
        v70 = TextData2::Get(0xF2281E2D),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWinw, (unsigned int)v70),
        ((void (__stdcall *)(_DWORD))pkTextWinw->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_case08",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v71 = Font::Get(MAIN_MENU),
        pkTextWinx = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v71, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWinx->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinx, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinx->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWinx->vfptr,
        v72 = TextData2::Get(0x26164A17u),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWinx, (unsigned int)v72),
        ((void (__stdcall *)(_DWORD))pkTextWinx->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_rate08",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v73 = Font::Get(MAIN_MENU),
        pkTextWiny = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v73, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWiny->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWiny, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWiny->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWiny->vfptr,
        v74 = TextData2::Get(0xF2301C2D),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWiny, (unsigned int)v74),
        ((void (__stdcall *)(_DWORD))pkTextWiny->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_case09",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v75 = Font::Get(MAIN_MENU),
        pkTextWinz = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v75, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWinz->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinz, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinz->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWinz->vfptr,
        v76 = TextData2::Get(0x25164A18u),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWinz, (unsigned int)v76),
        ((void (__stdcall *)(_DWORD))pkTextWinz->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_rate09",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v77 = Font::Get(MAIN_MENU),
        pkTextWinba = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v77, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWinba->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinba, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinba->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWinba->vfptr,
        v78 = TextData2::Get(0xF22A1C2D),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWinba, (unsigned int)v78),
        ((void (__stdcall *)(_DWORD))pkTextWinba->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_case10",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v79 = Font::Get(MAIN_MENU),
        pkTextWinbb = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v79, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWinbb->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinbb, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinbb->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWinbb->vfptr,
        v80 = TextData2::Get(0x24164A19u),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWinbb, (unsigned int)v80),
        ((void (__stdcall *)(_DWORD))pkTextWinbb->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_rate10",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v81 = Font::Get(MAIN_MENU),
        pkTextWinbc = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v81, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWinbc->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinbc, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinbc->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWinbc->vfptr,
        v82 = TextData2::Get(0xF2F8232D),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWinbc, (unsigned int)v82),
        ((void (__stdcall *)(_DWORD))pkTextWinbc->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_case11",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v83 = Font::Get(MAIN_MENU),
        pkTextWinbd = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v83, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWinbd->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinbd, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinbd->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWinbd->vfptr,
        v84 = TextData2::Get(0x32064E66u),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWinbd, (unsigned int)v84),
        ((void (__stdcall *)(_DWORD))pkTextWinbd->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_rate11",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v85 = Font::Get(MAIN_MENU),
        pkTextWinbe = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v85, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWinbe->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinbe, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinbe->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWinbe->vfptr,
        v86 = TextData2::Get(0xF2F8212D),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWinbe, (unsigned int)v86),
        ((void (__stdcall *)(_DWORD))pkTextWinbe->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_case12",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v87 = Font::Get(MAIN_MENU),
        pkTextWinbf = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v87, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWinbf->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinbf, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinbf->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWinbf->vfptr,
        v88 = TextData2::Get(0x2E507E74u),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWinbf, (unsigned int)v88),
        ((void (__stdcall *)(_DWORD))pkTextWinbf->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_rate12",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v89 = Font::Get(MAIN_MENU),
        pkTextWinbg = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v89, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWinbg->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinbg, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinbg->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWinbg->vfptr,
        v90 = TextData2::Get(0xF2F8202D),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWinbg, (unsigned int)v90),
        ((void (__stdcall *)(_DWORD))pkTextWinbg->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_case13",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v91 = Font::Get(MAIN_MENU),
        pkTextWinbh = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v91, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWinbh->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinbh, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinbh->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWinbh->vfptr,
        v92 = TextData2::Get(0x96F0BDDD),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWinbh, (unsigned int)v92),
        ((void (__stdcall *)(_DWORD))pkTextWinbh->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_rate13",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v93 = Font::Get(MAIN_MENU),
        pkTextWinbi = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v93, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWinbi->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinbi, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinbi->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWinbi->vfptr,
        v94 = TextData2::Get(0xF2F81C2D),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWinbi, (unsigned int)v94),
        ((void (__stdcall *)(_DWORD))pkTextWinbi->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_case14",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v95 = Font::Get(MAIN_MENU),
        pkTextWinbj = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v95, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWinbj->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinbj, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinbj->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWinbj->vfptr,
        v96 = TextData2::Get(0x9BF0C7E6),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWinbj, (unsigned int)v96),
        ((void (__stdcall *)(_DWORD))pkTextWinbj->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_rate14",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v97 = Font::Get(MAIN_MENU),
        pkTextWinbk = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v97, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWinbk->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinbk, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinbk->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWinbk->vfptr,
        v98 = TextData2::Get(0xF2F81D2D),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWinbk, (unsigned int)v98),
        ((void (__stdcall *)(_DWORD))pkTextWinbk->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_case15",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v99 = Font::Get(MAIN_MENU),
        pkTextWinbl = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v99, (PgWin *)&v2->vfptr, 0, 0),
        pkTextWinbl->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinbl, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinbl->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWinbl->vfptr,
        v100 = TextData2::Get(0x88F0C4DB),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWinbl, (unsigned int)v100),
        ((void (__stdcall *)(_DWORD))pkTextWinbl->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_rate15",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight))
    || (v101 = Font::Get(MAIN_MENU),
        pkTextWinbm = PgWinText::CreateWin(
                        uiLeft - v15,
                        uiTop - v16,
                        uiWidth,
                        uiHeight,
                        v101,
                        (PgWin *)&v2->vfptr,
                        0,
                        0),
        pkTextWinbm->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWinbm, 1u),
        ((void (__stdcall *)(struct D3DXCOLOR *))pkTextWinbm->vfptr[117].__vecDelDtor)(&Color::m_kDxWinTitleColor),
        v107 = pkTextWinbm->vfptr,
        v102 = TextData2::Get(0xF2F81E2D),
        v107[118].__vecDelDtor((NiRefObject *)pkTextWinbm, (unsigned int)v102),
        ((void (__stdcall *)(_DWORD))pkTextWinbm->vfptr[60].__vecDelDtor)(0),
        !PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "Text_caseNum",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight)) )
  {
    LOBYTE(v115) = 1;
    UIUtil::~UIUtil(&ui);
    LOBYTE(v115) = 0;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
    v115 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    return 0;
  }
  v103 = Font::Get(MAIN_MENU);
  v104 = PgWinText::CreateWin(uiLeft - v15, uiTop - v16, uiWidth, uiHeight, v103, (PgWin *)&v2->vfptr, 0, 0);
  ((void (__thiscall *)(PgWinText *))v104->vfptr[122].__vecDelDtor)(v104);
  ((void (__thiscall *)(PgWinText *))v104->vfptr[117].__vecDelDtor)(v104);
  v105 = v104->vfptr;
  TextData2::Get(0xE7F2D5E8);
  ((void (__thiscall *)(PgWinText *))v105[118].__vecDelDtor)(v104);
  ((void (__thiscall *)(PgWinText *))v104->vfptr[60].__vecDelDtor)(v104);
  ((void (__thiscall *)(mhDiceRateSheetWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.1,
    0.30000001);
  LOBYTE(v115) = 1;
  UIUtil::~UIUtil(&ui);
  LOBYTE(v115) = 0;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
  v115 = -1;
  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
  return 1;
}
// A696E0: using guessed type struct D3DXCOLOR Color::m_kDxWinTitleColor;
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00714540) --------------------------------------------------------
void __userpurge GambleDiceGameWin::OnCommand(GambleDiceGameWin *this@<ecx>, int a2@<edi>, unsigned int wParam, int lParam)
{
  GambleDiceGameWin *v4; // esi@1
  MHDiceGameTask *v5; // ecx@8
  MHDiceGameTask *v6; // ecx@10
  MHDiceGameTask *v7; // ecx@11
  NiPointer<MHDiceGameTask> result; // [sp+8h] [bp-10h]@11
  int v9; // [sp+14h] [bp-4h]@8

  v4 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[61].__vecDelDtor)() )
  {
    switch ( wParam )
    {
      case 0x34u:
        GambleDiceGameWin::OnBettingAmount(v4, 0x34u, 0);
        break;
      case 0x35u:
        GambleDiceGameWin::OnBettingAmount(v4, 0x35u, BLM_500_COIN);
        break;
      case 0x36u:
        GambleDiceGameWin::OnBettingAmount(v4, 0x36u, BLM_1000_COIN);
        break;
      case 0x37u:
        GambleDiceGameWin::OnBettingAmount(v4, 0x37u, BLM_10000_COIN);
        break;
      case 0x38u:
        GambleDiceGameWin::OnBettingAmount(v4, 0x38u, BLM_MAX_COIN);
        break;
      case 0x39u:
        v5 = MHDiceGameTask::GetDiceGameTask((NiPointer<MHDiceGameTask> *)&wParam)->m_pObject;
        MHDiceGameTask::NcGambleDiceTaisaiGameLeaveReq(v5, a2);
        v9 = -1;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&wParam);
        break;
      case 0x3Au:
        GambleDiceGameWin::OnMinimalize();
        break;
      case 0x3Bu:
        v6 = MHDiceGameTask::GetDiceGameTask((NiPointer<MHDiceGameTask> *)&lParam)->m_pObject;
        MHDiceGameTask::NcGambleDiceTaisaiAllRankReq();
        v9 = -1;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&lParam);
        break;
      case 0x3Cu:
        v7 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
        v9 = 2;
        MHDiceGameTask::OpenHelpWin(v7);
        v9 = -1;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&result);
        break;
      case 0u:
      case 1u:
      case 2u:
      case 3u:
      case 4u:
      case 5u:
      case 6u:
      case 7u:
      case 8u:
      case 9u:
      case 0xAu:
      case 0xBu:
      case 0xCu:
      case 0xDu:
      case 0xEu:
      case 0xFu:
      case 0x10u:
      case 0x11u:
      case 0x12u:
      case 0x13u:
      case 0x14u:
      case 0x15u:
      case 0x16u:
      case 0x17u:
      case 0x18u:
      case 0x19u:
      case 0x1Au:
      case 0x1Bu:
      case 0x1Cu:
      case 0x1Du:
      case 0x1Eu:
      case 0x1Fu:
      case 0x20u:
      case 0x21u:
      case 0x22u:
      case 0x23u:
      case 0x24u:
      case 0x25u:
      case 0x26u:
      case 0x27u:
      case 0x28u:
      case 0x29u:
      case 0x2Au:
      case 0x2Bu:
      case 0x2Cu:
      case 0x2Du:
      case 0x2Eu:
      case 0x2Fu:
      case 0x30u:
      case 0x31u:
      case 0x32u:
      case 0x33u:
        GambleDiceGameWin::OnBettingButton(wParam, lParam != 0);
        break;
      default:
        return;
    }
  }
}

//----- (00714780) --------------------------------------------------------
void __thiscall GambleDiceGameWin::AllReset(GambleDiceGameWin *this)
{
  GambleDiceGameWin *v1; // ebx@1
  char *v2; // esi@1
  signed int v3; // edi@1
  int v4; // esi@3
  signed int v5; // edi@3
  unsigned int v6; // ebx@5
  unsigned int v7; // edi@5
  unsigned __int64 v8; // kr00_8@5
  void (__thiscall ***v9)(_DWORD, _DWORD); // esi@6
  int v10; // eax@9
  int v11; // esi@10
  signed __int64 v12; // kr08_8@10
  int v13; // ebx@14
  MHDiceGameTask *v14; // edi@15
  MHDiceGameTask *v15; // esi@16
  int v16; // esi@22
  int v17; // edi@23
  int i; // [sp+14h] [bp-18h]@5
  NiPointer<MHDiceGameTask> result; // [sp+18h] [bp-14h]@9
  GambleDiceGameWin *v20; // [sp+1Ch] [bp-10h]@1
  int v21; // [sp+28h] [bp-4h]@5

  v1 = this;
  v20 = this;
  v2 = (char *)this->m_spBettingBut;
  v3 = 52;
  do
  {
    *(_DWORD *)(*(_DWORD *)v2 + 332) = 0;
    *(_BYTE *)(*(_DWORD *)v2 + 328) = 0;
    BettingBut::SetButtonSpr(*(BettingBut **)v2, 0);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v2 + 276))(1.0);
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v2 + 52) + 256))(0);
    PgWin::RemoveAllChildWin(*((PgWin **)v2 + 52));
    v2 += 4;
    --v3;
  }
  while ( v3 );
  LODWORD(v1->m_nUserBettingMoney) = 0;
  HIDWORD(v1->m_nUserBettingMoney) = 0;
  LODWORD(v1->m_nTempBettingMoeny) = 0;
  HIDWORD(v1->m_nTempBettingMoeny) = 0;
  v4 = (int)v1->m_spShareNumSpr;
  v5 = 7;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v4 - 56) + 492))(0);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 492))(0);
    v4 += 4;
    --v5;
  }
  while ( v5 );
  MHDiceGameTask::GetDiceGameTask((NiPointer<MHDiceGameTask> *)&i);
  v21 = 0;
  v8 = User::Coin(&g_kUser);
  v6 = HIDWORD(v8);
  v7 = v8;
  v21 = -1;
  if ( i )
  {
    v9 = (void (__thiscall ***)(_DWORD, _DWORD))i;
    if ( !InterlockedDecrement((volatile LONG *)(i + 4)) )
    {
      if ( v9 )
        (**v9)(v9, 1);
    }
  }
  v10 = (int)v20;
  LODWORD(v20->m_nInvenRemainMoney) = v8;
  *(_DWORD *)(v10 + 1676) = HIDWORD(v8);
  i = 11;
  result.m_pObject = (MHDiceGameTask *)(v10 + 1432);
  while ( 1 )
  {
    v11 = (signed __int64)__PAIR__(v6, v7) % 10;
    v12 = (signed __int64)__PAIR__(v6, v7) / 10;
    v6 = (unsigned __int64)((signed __int64)__PAIR__(v6, v7) / 10) >> 32;
    v7 = v12;
    if ( v11 < 0 )
      v11 = 0;
    (*((void (__stdcall **)(_DWORD))result.m_pObject->vfptr->__vecDelDtor + 123))(v11);
    if ( !(v6 | (unsigned int)v12) )
      break;
    result.m_pObject = (MHDiceGameTask *)((char *)result.m_pObject - 4);
    if ( --i < 0 )
      goto LABEL_14;
  }
  v16 = i - 1;
  if ( i - 1 < 0 )
  {
LABEL_14:
    v13 = (int)v20;
    goto LABEL_15;
  }
  v13 = (int)v20;
  v17 = (int)&v20->m_spMyBetNumSpr[v16];
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v17 + 492))(0);
    v17 -= 4;
    --v16;
  }
  while ( v16 >= 0 );
LABEL_15:
  v14 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  if ( result.m_pObject )
  {
    v15 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v15 )
        v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
    }
  }
  if ( v14 )
  {
    LODWORD(v14->m_nInvenRemainMoney) = *(_DWORD *)(v13 + 1672);
    HIDWORD(v14->m_nInvenRemainMoney) = *(_DWORD *)(v13 + 1676);
  }
  *(_DWORD *)(v13 + 1648) = 0;
  *(float *)(v13 + 1768) = 0.0;
  *(_DWORD *)(v13 + 1757) = 0;
  *(float *)(v13 + 1772) = 0.0;
  *(float *)(v13 + 1776) = 0.0;
}

//----- (007149D0) --------------------------------------------------------
void __thiscall GambleDiceGameWin::ShowResult(GambleDiceGameWin *this, DICE_TAISAI_BETTING index, bool IsSuccess, bool IsNonBetting)
{
  GambleDiceGameWin *v4; // esi@1
  BettingBut *v5; // eax@4
  BettingBut *v6; // eax@4
  float vPos; // ST24_4@4
  BettingBut *v8; // ebx@4
  float vPos_4; // ST28_4@4
  float vPos_8; // ST2C_4@4
  float v11; // ST18_4@4
  float v12; // ST1C_4@4
  BettingBut *v13; // esi@11
  PgSpr *v14; // eax@11
  unsigned int IsSuccessa; // [sp+3Ch] [bp+Ch]@4
  NiNode *IsNonBettinga; // [sp+40h] [bp+10h]@4

  v4 = this;
  if ( IsNonBetting )
  {
    this->m_spBettingBut[index].m_pObject->m_bHighlight = 0;
    BettingBut::SetButtonSpr(this->m_spBettingBut[index].m_pObject, 2u);
    v4->m_spBettingBut[index].m_pObject->m_eBetState = 4;
  }
  else if ( IsSuccess )
  {
    this->m_spBettingBut[index].m_pObject->m_bHighlight = 1;
    v5 = this->m_spBettingBut[index].m_pObject;
    v5->m_eBetState = 2;
    v5->m_bIsSwitched = 1;
    v5->m_uiNextSprIdx = 1;
    BettingBut::SetButtonSpr(this->m_spBettingBut[index].m_pObject, 1u);
    v6 = v4->m_spBettingBut[index].m_pObject;
    vPos = v6->m_kLocal.m_Translate.x;
    v8 = v4->m_spBettingBut[index].m_pObject;
    vPos_4 = v6->m_kLocal.m_Translate.y;
    vPos_8 = v6->m_kLocal.m_Translate.z;
    IsNonBettinga = v4->m_pkResultEffectList[v4->m_uiSuccessNum]->m_spEffect.m_pObject;
    v11 = (double)((unsigned int)((int (__thiscall *)(BettingBut *))v8->vfptr[36].__vecDelDtor)(v4->m_spBettingBut[index].m_pObject) >> 1)
        + vPos;
    IsSuccessa = (unsigned int)((int (__thiscall *)(BettingBut *))v8->vfptr[37].__vecDelDtor)(v8) >> 1;
    IsNonBettinga->m_kLocal.m_Translate.x = v11;
    v12 = (double)IsSuccessa + vPos_4;
    IsNonBettinga->m_kLocal.m_Translate.y = v12;
    IsNonBettinga->m_kLocal.m_Translate.z = vPos_8;
    SpEffect::Start(v4->m_pkResultEffectList[v4->m_uiSuccessNum], v4->m_pRunEffect.m_pObject);
    if ( ((signed int)index > 9 && (signed int)index < 19 || index == 29 || index == 30) && !v4->m_bIsHappendBigPot )
      v4->m_bIsHappendBigPot = 1;
    ++v4->m_uiSuccessNum;
  }
  else
  {
    this->m_spBettingBut[index].m_pObject->m_bHighlight = 0;
    v13 = this->m_spBettingBut[index].m_pObject;
    v14 = v13->m_spSpr.m_pObject;
    v13->m_eBetState = 3;
    v13->m_bIsSwitched = 0;
    v13->m_uiNextSprIdx = 2;
    if ( v14->m_akGeom.m_uiSize <= 2 || !v14->m_akGeom.m_pBase[2].m_pObject )
    {
      ((void (__thiscall *)(BettingBut *, _DWORD, signed int))v13->vfptr[29].__vecDelDtor)(v13, 0, 1);
      NiAVObject::Update((NiAVObject *)&v13->vfptr, 0.0, 0);
      NiAVObject::UpdateProperties((NiAVObject *)&v13->vfptr);
    }
  }
}

//----- (00714BB0) --------------------------------------------------------
void __userpurge GambleDiceGameWin::UpdateTimeText(GambleDiceGameWin *this@<ecx>, int a2@<edi>, float fRemainTime, bool IsShow)
{
  GambleDiceGameWin *v4; // esi@1
  PgWinText *v5; // ecx@5
  void *(__thiscall *v6)(NiRefObject *, unsigned int); // eax@5
  NiRefObjectVtbl **v7; // esi@8
  int v8; // ST08_4@8
  NiRefObjectVtbl *v9; // edi@8
  char *v10; // eax@8
  char *v11; // eax@8
  PgWinText *v12; // ecx@10
  float fRemainTimea; // [sp+Ch] [bp+8h]@4

  v4 = this;
  if ( IsShow )
  {
    if ( fRemainTime < 0.0 )
      fRemainTime = 0.0;
    ((void (__stdcall *)(signed int))this->m_spTimeCountText.m_pObject->vfptr[64].__vecDelDtor)(1);
    LODWORD(fRemainTimea) = (signed int)fRemainTime;
    if ( LOWORD(fRemainTimea) != v4->m_uiCurrentTime )
    {
      v5 = v4->m_spTimeCountText.m_pObject;
      v4->m_uiCurrentTime = LOWORD(fRemainTimea);
      v6 = v5->vfptr[117].__vecDelDtor;
      if ( LOWORD(fRemainTimea) <= 0xAu )
        ((void (__cdecl *)(D3DXCOLOR *))v6)(&Color::m_kDxRedColor);
      else
        ((void (__cdecl *)(D3DXCOLOR *))v6)(&Color::m_kDxWhiteColor);
      v7 = &v4->m_spTimeCountText.m_pObject->vfptr;
      v8 = a2;
      v9 = *v7;
      v10 = (char *)TextData2::Get(0xF2E7153E);
      v11 = fs(v10, LOWORD(fRemainTimea));
      ((void (__thiscall *)(NiRefObjectVtbl **, char *, int))v9[118].__vecDelDtor)(v7, v11, v8);
    }
  }
  else
  {
    v12 = this->m_spTimeCountText.m_pObject;
    if ( v12 )
      ((void (__stdcall *)(_DWORD))v12->vfptr[64].__vecDelDtor)(0);
  }
}
// 714BB0: could not find valid save-restore pair for edi

//----- (00714C90) --------------------------------------------------------
void __thiscall GambleDiceGameWin::DiceAnimationStart(GambleDiceGameWin *this, unsigned int *AniCode)
{
  GambleDiceGameWin *v2; // esi@1
  NiRefObjectVtbl *v3; // eax@1
  float vPos; // ST14_4@1
  double v5; // st7@1
  NiNode *v6; // eax@1
  float vPos_4; // ST18_4@1
  float v8; // ST20_4@1
  float v9; // ST24_4@1
  signed int v10; // edi@1
  int v11; // esi@1

  v2 = this;
  v3 = this->vfptr;
  this->m_fResultTime = 0.1;
  vPos = (double)((int (*)(void))v3[41].__vecDelDtor)();
  v5 = (double)((int (__thiscall *)(GambleDiceGameWin *))v2->vfptr[42].__vecDelDtor)(v2);
  v6 = v2->m_pkDiceRollEffect->m_spEffect.m_pObject;
  vPos_4 = v5;
  v8 = vPos + 540.0;
  v6->m_kLocal.m_Translate.x = v8;
  v9 = vPos_4 - 420.0;
  v6->m_kLocal.m_Translate.y = v9;
  v6->m_kLocal.m_Translate.z = 1000.0;
  PgWinMgr::StartFullScreenEffect(
    &Pgg_kWinMgr,
    Timer::ms_fCurTime,
    (NiAVObject *)v2->m_pkDiceRollEffect->m_spEffect.m_pObject);
  SoundMgr::PlayInterfaceSound(&g_kSoundMgr, DiceRoll_Pair);
  v2->m_AniActor[0].m_NextAni = *AniCode;
  v2->m_AniActor[1].m_NextAni = AniCode[1];
  v2->m_AniActor[2].m_NextAni = AniCode[2];
  v10 = 0;
  v11 = (int)v2->m_spResultDice;
  do
  {
    (*(void (__stdcall **)(unsigned int))(**(_DWORD **)v11 + 492))(AniCode[v10++] / 0x64 - 1);
    v11 += 4;
  }
  while ( v10 < 3 );
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (00714D90) --------------------------------------------------------
void __thiscall GambleDiceGameWin::SetMarkButton(GambleDiceGameWin *this, DICE_TAISAI_BETTING nPos, BET_STATE bState, bool IsMark)
{
  GambleDiceGameWin *v4; // esi@1

  v4 = this;
  BettingBut::SetBettingState(this->m_spBettingBut[nPos].m_pObject, bState);
  v4->m_spBettingBut[nPos].m_pObject->m_bHighlight = IsMark;
  if ( bState == BET_RESET )
    BettingBut::SetButtonSpr(v4->m_spBettingBut[nPos].m_pObject, 0);
}

//----- (00714DE0) --------------------------------------------------------
void __thiscall MiniHouseDiceGameWin::UpdateMeWin(MiniHouseDiceGameWin *this, float fCurTime)
{
  MiniHouseDiceGameWin *v2; // ebx@1
  bool v3; // zf@1
  double v4; // st7@3
  DICE_TAISAI_GAME_STATUS v5; // esi@4
  MHDiceGameTask *v6; // edi@5
  SpEffect **v7; // esi@15
  signed int v8; // edi@15
  MHDiceGameTask *v9; // esi@20
  int v10; // esi@25
  signed int v11; // edi@25
  signed int v12; // eax@33
  NiRefObjectVtbl *v13; // edx@33
  double v14; // st7@33
  void *(__thiscall *v15)(NiRefObject *, unsigned int); // eax@33
  NiNode *v16; // eax@33
  double v17; // st7@33
  NiActorManager *v18; // eax@36
  NiNode *v19; // eax@37
  NiActorManager *v20; // eax@40
  NiNode *v21; // eax@41
  NiActorManager *v22; // eax@44
  NiNode *v23; // eax@45
  int v24; // edi@47
  float v25; // ecx@48
  int v26; // esi@48
  float v27; // eax@48
  int v28; // edx@48
  int (__thiscall *v29)(int); // eax@48
  NiAVObject *v30; // ebx@48
  int v31; // eax@48
  float v32; // ecx@48
  int v33; // esi@48
  float v34; // edx@48
  float v35; // eax@48
  void *(__thiscall *v36)(NiRefObject *, unsigned int); // edx@48
  NiAVObject *v37; // eax@48
  NiAVObject *v38; // esi@48
  float v39; // eax@48
  int v40; // ecx@48
  int v41; // esi@53
  unsigned int v42; // ecx@53
  unsigned int v43; // edi@53
  signed int v44; // eax@55
  int v45; // ecx@66
  unsigned int v46; // ebx@68
  signed int v47; // edi@68
  int v48; // esi@69
  signed __int64 v49; // kr00_8@69
  int v50; // esi@74
  int v51; // edi@75
  int v52; // ebx@79
  _DWORD *v53; // esi@80
  int v54; // eax@82
  int v55; // ecx@84
  MHDiceGameTask *v56; // edi@86
  int v57; // esi@92
  signed int v58; // edi@92
  DICE_TAISAI_BETTING v59; // edi@94
  PgWin **v60; // esi@94
  void (*v61)(void); // eax@95
  MHDiceGameTask *v62; // ecx@96
  MHDiceGameTask *v63; // ebx@97
  char *v64; // eax@100
  MiniHouseDiceGameWin *v65; // edi@106
  unsigned int v66; // ecx@106
  unsigned int v67; // esi@106
  int v68; // eax@107
  int v69; // ecx@108
  int v70; // eax@110
  signed int v71; // edi@110
  unsigned int v72; // ebx@110
  int v73; // esi@111
  signed __int64 v74; // kr08_8@111
  int v75; // esi@116
  int v76; // edi@117
  unsigned __int64 v77; // rax@119
  unsigned int v78; // esi@119
  bool v79; // cf@119
  int v80; // esi@119
  int v81; // ebx@119
  int v82; // edi@120
  signed __int64 v83; // kr10_8@120
  int v84; // esi@125
  int v85; // edi@126
  MiniHouseDiceGameWin *v86; // esi@128
  double v87; // st7@129
  int v88; // ecx@132
  int v89; // eax@134
  NiActorManager *v90; // esi@137
  char *v91; // edi@138
  unsigned int v92; // ebx@139
  NiTMapItem<unsigned int,NiControllerSequence *> *v93; // edi@139
  NiControllerSequence *v94; // ecx@143
  int v95; // esi@147
  int v96; // edi@147
  signed int v97; // ebx@147
  int v98; // eax@149
  MiniHouseDiceGameWin *v99; // ebx@152
  NiNode **v100; // esi@152
  int v101; // eax@154
  NiNode *v102; // ecx@156
  char *v103; // edi@158
  SpEffect *v104; // ecx@162
  float v105; // [sp+4Ch] [bp-74h]@0
  NiQuaternion v106; // [sp+5Ch] [bp-64h]@48
  NiPoint3 vPos; // [sp+6Ch] [bp-54h]@33
  bool v108; // [sp+7Bh] [bp-45h]@19
  float v109; // [sp+7Ch] [bp-44h]@48
  float v110; // [sp+80h] [bp-40h]@33
  int i; // [sp+84h] [bp-3Ch]@33
  MiniHouseDiceGameWin *v112; // [sp+88h] [bp-38h]@1
  NiPointer<MHDiceGameTask> result; // [sp+8Ch] [bp-34h]@3
  char *v114; // [sp+90h] [bp-30h]@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > BettingInfo; // [sp+94h] [bp-2Ch]@48
  int v116; // [sp+BCh] [bp-4h]@96

  v2 = this;
  v3 = this->m_bIsResetTimer == 0;
  v112 = this;
  if ( v3 )
  {
    this->m_DiceTimer.m_fStartTime = fCurTime;
    this->m_DiceTimer.m_fObjectTime = 0.0;
    this->m_DiceTimer.m_fElapsedTime = 0.0;
    this->m_bIsResetTimer = 1;
  }
  else
  {
    v114 = (char *)LODWORD(this->m_DiceTimer.m_fObjectTime);
    *(float *)&result.m_pObject = fCurTime - this->m_DiceTimer.m_fStartTime;
    v4 = *(float *)&result.m_pObject;
    this->m_DiceTimer.m_fObjectTime = *(float *)&result.m_pObject;
    this->m_DiceTimer.m_fElapsedTime = v4 - *(float *)&v114;
  }
  v5 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject->m_eDiceSaiGameStatus;
  if ( *(float *)&result.m_pObject != 0.0 )
  {
    v6 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
  }
  if ( v5 != 1 )
  {
    if ( v5 )
    {
      if ( v5 == 2 )
      {
        v2->m_nTempBettingMoeny = 0;
        v2->m_nUserBettingMoney = 0;
      }
      else if ( v5 == 3 )
      {
        if ( 0.0 != v2->m_fResultTime )
          v2->m_fResultTime = v2->m_DiceTimer.m_fElapsedTime + v2->m_fResultTime;
        v7 = v2->m_pkResultEffectList;
        v8 = 10;
        do
        {
          if ( (*v7)->m_bLive )
            SpEffect::Update(*v7, fCurTime);
          ++v7;
          --v8;
        }
        while ( v8 );
        v108 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject->m_bComeinMHOnResultStauts;
        if ( *(float *)&result.m_pObject != 0.0 )
        {
          v9 = result.m_pObject;
          if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
          {
            if ( v9 )
              v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
          }
        }
        if ( v108 )
        {
          MiniHouseDiceGameWin::AllReset(v2);
        }
        else
        {
          v10 = (int)v2->m_spBettingBut;
          v11 = 52;
          do
          {
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v10 + 324))(LODWORD(fCurTime));
            v10 += 4;
            --v11;
          }
          while ( v11 );
        }
        if ( v2->m_bResultDiceAni )
          v2->m_fRewardTime = v2->m_DiceTimer.m_fElapsedTime + v2->m_fRewardTime;
        if ( v2->m_fRewardTime > 2.5 && !v2->m_bRewardAni )
        {
          v3 = v2->m_nUserBettingMoney == 0;
          v2->m_bRewardAni = 1;
          if ( !v3 )
          {
            if ( v2->m_bIsHappendBigPot )
            {
              *(float *)&v12 = COERCE_FLOAT(((int (*)(void))v2->vfptr[41].__vecDelDtor)());
              v13 = v2->vfptr;
              result.m_pObject = (MHDiceGameTask *)v12;
              v14 = (double)v12;
              v15 = v13[42].__vecDelDtor;
              v110 = v14;
              *(float *)&result.m_pObject = COERCE_FLOAT(((int (__thiscall *)(MiniHouseDiceGameWin *))v15)(v2));
              v16 = v2->m_pBigpotEff.m_pObject;
              *(float *)&i = (double)(signed int)result.m_pObject;
              vPos.x = v110 + 540.0;
              v17 = *(float *)&i;
              v16->m_kLocal.m_Translate.x = vPos.x;
              vPos.y = v17 - 420.0;
              v16->m_kLocal.m_Translate.y = vPos.y;
              vPos.z = 1000.0;
              v16->m_kLocal.m_Translate.z = 1000.0;
              PgWinMgr::StartFullScreenEffect(
                &Pgg_kWinMgr,
                Timer::ms_fCurTime,
                (NiAVObject *)&v2->m_pBigpotEff.m_pObject->vfptr);
              SoundMgr::PlayInterfaceSound(&g_kSoundMgr, Dice_fanfare);
            }
            else
            {
              SpEffect::Start(v2->m_pkRewardEff, v2->m_pRunEffect.m_pObject);
            }
          }
          if ( v2->m_pkDice[0].m_bIsCanAnimation && (v18 = v2->m_pkDice[0].m_pActorMgr.m_pObject) != 0 )
            v19 = (NiNode *)v18->m_spNIFRoot.m_pObject;
          else
            v19 = v2->m_pkDice[0].m_pNiNode.m_pObject;
          v19->m_uFlags |= 1u;
          if ( v2->m_pkDice[1].m_bIsCanAnimation && (v20 = v2->m_pkDice[1].m_pActorMgr.m_pObject) != 0 )
            v21 = (NiNode *)v20->m_spNIFRoot.m_pObject;
          else
            v21 = v2->m_pkDice[1].m_pNiNode.m_pObject;
          v21->m_uFlags |= 1u;
          if ( v2->m_pkDice[2].m_bIsCanAnimation && (v22 = v2->m_pkDice[2].m_pActorMgr.m_pObject) != 0 )
            v23 = (NiNode *)v22->m_spNIFRoot.m_pObject;
          else
            v23 = v2->m_pkDice[2].m_pNiNode.m_pObject;
          v23->m_uFlags |= 1u;
          v24 = (int)v2->m_spResultDicePos;
          v114 = (char *)3;
          do
          {
            (*(void (__stdcall **)(signed int))(**(_DWORD **)v24 + 256))(1);
            v25 = *(float *)(*(_DWORD *)v24 + 88);
            v26 = *(_DWORD *)v24;
            v27 = *(float *)(*(_DWORD *)v24 + 96);
            vPos.y = *(float *)(*(_DWORD *)v24 + 92);
            v28 = *(_DWORD *)v26;
            vPos.x = v25;
            vPos.z = v27;
            result.m_pObject = (MHDiceGameTask *)((unsigned int)(*(int (__thiscall **)(int))(v28 + 144))(v26) >> 1);
            v29 = *(int (__thiscall **)(int))(*(_DWORD *)v26 + 148);
            v109 = (double)(unsigned int)result.m_pObject + vPos.x;
            result.m_pObject = (MHDiceGameTask *)((unsigned int)v29(v26) >> 1);
            v30 = (NiAVObject *)&v112->m_pRunEffect.m_pObject->vfptr;
            v110 = (double)(unsigned int)result.m_pObject + vPos.y;
            i = SLODWORD(vPos.z);
            NiQuaternion::NiQuaternion((NiQuaternion *)&BettingInfo._Bx._Alias[12], 0.0, 0.0, 0.0, 0.0);
            v32 = *(float *)(v31 + 4);
            v33 = *(_DWORD *)(v24 + 24);
            v106.m_fW = *(float *)v31;
            v34 = *(float *)(v31 + 8);
            v35 = *(float *)(v31 + 12);
            v106.m_fY = v34;
            v36 = v30->vfptr[29].__vecDelDtor;
            v106.m_fZ = v35;
            v37 = *(NiAVObject **)v33;
            v106.m_fX = v32;
            ((void (__thiscall *)(NiAVObject *, NiAVObject *, _DWORD))v36)(v30, v37, 0);
            NsEffect::SetEffectNode((NsEffect *)(v33 + 28), *(NiAVObject **)v33);
            NsEffect::Start((NsEffect *)(v33 + 28), Timer::ms_fCurTime);
            *(float *)(v33 + 16) = *(float *)(v33 + 40);
            CNSTimer_MarkCheck::ReSet((CNSTimer_MarkCheck *)(v33 + 4), Timer::ms_fCurTime, OVER);
            *(_BYTE *)(v33 + 64) = 1;
            NiAVObject::UpdateProperties(v30);
            NiAVObject::UpdateEffects(v30);
            NiQuaternion::ToRotation(&v106, (NiMatrix3 *)(*(_DWORD *)v33 + 52));
            v38 = *(NiAVObject **)v33;
            v39 = v110;
            v40 = i;
            v38->m_kLocal.m_Translate.x = v109;
            v24 += 4;
            v3 = v114-- == (char *)1;
            v38->m_kLocal.m_Translate.y = v39;
            LODWORD(v38->m_kLocal.m_Translate.z) = v40;
          }
          while ( !v3 );
          if ( !v112->m_bIsHappendBigPot )
            SoundMgr::PlayInterfaceSound(&g_kSoundMgr, DiceFinalResult);
        }
        if ( v112->m_bRewardAni && v112->m_fRewardTime > 4.0 )
        {
          v41 = (int)v112;
          v42 = v112->m_nTempBettingMoeny;
          v43 = v112->m_nUserBettingMoney;
          if ( v43 != v42 && !v112->m_bReverseCount )
          {
            v44 = abs(v43 - v42);
            if ( v44 <= 100000 )
            {
              if ( v44 <= 10000 )
              {
                if ( v44 <= 1000 )
                {
                  if ( v44 <= 100 )
                  {
                    if ( v44 > 10 )
                      v44 = 10;
                  }
                  else
                  {
                    v44 = 100;
                  }
                }
                else
                {
                  v44 = 1000;
                }
              }
              else
              {
                v44 = 10000;
              }
            }
            else
            {
              v44 = 100000;
            }
            if ( v42 >= v43 )
              v45 = v42 - v44;
            else
              v45 = v44 + v42;
            v112->m_nTempBettingMoeny = v45;
            v46 = 0;
            v47 = v45;
            i = 7;
            v114 = (char *)(v41 + 1352);
            while ( 1 )
            {
              v48 = v47 % 10;
              v49 = (signed __int64)__PAIR__(v46, v47) / 10;
              v46 = (unsigned __int64)((signed __int64)__PAIR__(v46, v47) / 10) >> 32;
              v47 = v49;
              if ( v48 < 0 )
                v48 = 0;
              (*(void (__stdcall **)(int))(**(_DWORD **)v114 + 492))(v48);
              if ( !(v46 | (unsigned int)v49) )
                break;
              v114 -= 4;
              if ( --i < 0 )
                goto LABEL_77;
            }
            v50 = i - 1;
            if ( i - 1 >= 0 )
            {
              v51 = (int)&v112->m_spShareNumSpr[v50];
              do
              {
                (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v51 + 492))(0);
                v51 -= 4;
                --v50;
              }
              while ( v50 >= 0 );
            }
LABEL_77:
            if ( v112->m_nUserBettingMoney == v112->m_nTempBettingMoeny )
              v112->m_bReverseCount = 1;
          }
          v52 = (int)v112->m_pkDiceUpEff;
          v114 = (char *)3;
          do
          {
            v53 = *(_DWORD **)v52;
            if ( *(_BYTE *)(*(_DWORD *)v52 + 64) )
            {
              if ( !*((_BYTE *)v53 + 65) )
              {
                CNSTimer_MarkCheck::Update((CNSTimer_MarkCheck *)(v53 + 1), fCurTime);
                if ( v54 == 1 )
                {
                  if ( *v53 )
                  {
                    v55 = *(_DWORD *)(*v53 + 32);
                    if ( v55 )
                    {
                      (*(void (__stdcall **)(NiPointer<MHDiceGameTask> *, _DWORD))(*(_DWORD *)v55 + 120))(&result, *v53);
                      if ( *(float *)&result.m_pObject != 0.0 )
                      {
                        v56 = result.m_pObject;
                        if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
                        {
                          if ( v56 )
                            v56->vfptr->__vecDelDtor((NiRefObject *)v56, 1u);
                        }
                      }
                    }
                    *((_BYTE *)v53 + 64) = 0;
                  }
                }
              }
            }
            v52 += 4;
            --v114;
          }
          while ( *(float *)&v114 != 0.0 );
        }
      }
      goto LABEL_128;
    }
    v57 = (int)v2->m_spResultDicePos;
    v58 = 3;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v57 + 256))(0);
      v57 += 4;
      --v58;
    }
    while ( v58 );
  }
  v59 = 0;
  v60 = (PgWin **)v2->m_spBettingBut;
  do
  {
    v3 = (unsigned __int8)((int (__stdcall *)(unsigned int, int, _DWORD))(*v60)->vfptr[83].__vecDelDtor)(
                            PgWin::ms_iMsX,
                            PgWin::ms_iMsY,
                            LODWORD(v105)) == 0;
    v61 = (void (*)(void))v60[52]->vfptr[69].__vecDelDtor;
    if ( v3 )
    {
      v105 = 1.0;
      v61();
      LOBYTE((*v60)[1].m_kWorldBound.m_kCenter.y) = 0;
      ((void (__stdcall *)(signed int))(*v60)->vfptr[138].__vecDelDtor)(4);
    }
    else
    {
      v105 = 0.30000001;
      v61();
      LOBYTE((*v60)[1].m_kWorldBound.m_kCenter.y) = 1;
      v62 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
      v116 = 0;
      MHDiceGameTask::GetBettingInfo(v62, &BettingInfo, v59);
      LOBYTE(v116) = 2;
      if ( *(float *)&result.m_pObject != 0.0 )
      {
        v63 = result.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
        {
          if ( v63 )
            v63->vfptr->__vecDelDtor((NiRefObject *)v63, 1u);
        }
      }
      v64 = BettingInfo._Bx._Ptr;
      if ( BettingInfo._Myres < 0x10 )
        v64 = (char *)&BettingInfo;
      PgWin::SetToolTipWinText(*v60, v64);
      v116 = -1;
      if ( BettingInfo._Myres >= 0x10 )
        operator delete(BettingInfo._Bx._Ptr);
    }
    ++v59;
    ++v60;
  }
  while ( (signed int)v59 < 52 );
  v65 = v112;
  v66 = v112->m_nTempBettingMoeny;
  v67 = v112->m_nUserBettingMoney;
  if ( v67 != v66 )
  {
    v68 = abs(v67 - v66);
    if ( v66 >= v67 )
      v69 = v66 - v68;
    else
      v69 = v68 + v66;
    v70 = (int)v112;
    v112->m_nTempBettingMoeny = v69;
    v71 = v65->m_nTempBettingMoeny;
    v72 = 0;
    i = 7;
    v114 = (char *)(v70 + 1288);
    while ( 1 )
    {
      v73 = v71 % 10;
      v74 = (signed __int64)__PAIR__(v72, v71) / 10;
      v72 = (unsigned __int64)((signed __int64)__PAIR__(v72, v71) / 10) >> 32;
      v71 = v74;
      if ( v73 < 0 )
        v73 = 0;
      (*(void (__stdcall **)(int))(**(_DWORD **)v114 + 492))(v73);
      if ( !(v72 | (unsigned int)v74) )
        break;
      v114 -= 4;
      if ( --i < 0 )
        goto LABEL_119;
    }
    v75 = i - 1;
    if ( i - 1 >= 0 )
    {
      v76 = (int)&v112->m_spBetNumSpr[v75];
      do
      {
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v76 + 492))(0);
        v76 -= 4;
        --v75;
      }
      while ( v75 >= 0 );
    }
LABEL_119:
    v77 = User::GetMoney(&g_kUser);
    v78 = v77;
    LODWORD(v77) = v112;
    v79 = v78 < v112->m_nTempBettingMoeny;
    v80 = v78 - v112->m_nTempBettingMoeny;
    i = 10;
    v81 = HIDWORD(v77) - v79;
    v112->m_nInvenRemainMoney = v80;
    v114 = (char *)(v77 + 1444);
    while ( 1 )
    {
      v82 = __PAIR__(v81, v80) % 10;
      v83 = __PAIR__(v81, v80) / 10;
      v81 = (unsigned __int64)(__PAIR__(v81, v80) / 10) >> 32;
      v80 = v83;
      if ( v82 < 0 )
        v82 = 0;
      (*(void (__stdcall **)(int))(**(_DWORD **)v114 + 492))(v82);
      if ( !(v81 | (unsigned int)v83) )
        break;
      v114 -= 4;
      if ( --i < 0 )
        goto LABEL_128;
    }
    v84 = i - 1;
    if ( i - 1 >= 0 )
    {
      v85 = (int)&v112->m_spMyBetNumSpr[v84];
      do
      {
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v85 + 492))(0);
        v85 -= 4;
        --v84;
      }
      while ( v84 >= 0 );
    }
  }
LABEL_128:
  v86 = v112;
  if ( v112->m_fResultTime > 0.1000000014901161 )
  {
    SpEffect::Update(v112->m_pkDiceRollEffect, fCurTime);
    *(float *)&result.m_pObject = v86->m_DiceTimer.m_fElapsedTime + v86->m_fDiceAniTime;
    v87 = *(float *)&result.m_pObject;
    v86->m_fDiceAniTime = *(float *)&result.m_pObject;
    if ( v87 > 1.659999966621399 && !v86->m_bResultDiceAni )
    {
      v86->m_bResultDiceAni = 1;
      v114 = (char *)&v86->m_AniActor[0].m_uiAniSeqID;
      i = (int)&v86->m_pkDice[0].m_pActorMgr;
      result.m_pObject = (MHDiceGameTask *)3;
      do
      {
        v88 = i;
        if ( *(_BYTE *)(i + 4) && *(_DWORD *)i )
          v89 = *(_DWORD *)(*(_DWORD *)i + 12);
        else
          v89 = *(_DWORD *)(i - 4);
        *(_WORD *)(v89 + 28) &= 0xFFFEu;
        if ( *(_BYTE *)(v88 + 4) )
        {
          v90 = *(NiActorManager **)i;
          if ( *(_DWORD *)i )
          {
            v91 = v114;
            *(_WORD *)v114 = *((_WORD *)v114 + 1) + *((_WORD *)v114 + 2);
            NiActorManager::Reset(v90);
            NiActorManager::Update(v90, 0.0);
            if ( NiActorManager::SetTargetAnimation(v90, *(_WORD *)v91) )
            {
              v92 = *(_WORD *)v91;
              v93 = v90->m_kSequenceMap.m_ppkHashTable[v90->m_kSequenceMap.vfptr->KeyToHashIndex(
                                                         (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *> *)&v90->m_kSequenceMap,
                                                         v92)];
              if ( v93 )
              {
                while ( !v90->m_kSequenceMap.vfptr->IsKeysEqual(
                           (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *> *)&v90->m_kSequenceMap,
                           v92,
                           v93->m_key) )
                {
                  v93 = v93->m_pkNext;
                  if ( !v93 )
                    goto LABEL_145;
                }
                v94 = v93->m_val;
                if ( v94 )
                {
                  v94->m_fOffset = -3.4028235e38;
                  NiControllerSequence::Update(v94, fCurTime, 1);
                }
              }
            }
          }
        }
LABEL_145:
        i += 44;
        v114 += 12;
        --result.m_pObject;
      }
      while ( *(float *)&result.m_pObject != 0.0 );
      SoundMgr::PlayInterfaceSound(&g_kSoundMgr, DiceRoll_Single01);
    }
  }
  v95 = (int)v112->m_AniActor;
  v96 = (int)&v112->m_pkDice[0].m_pActorMgr;
  v97 = 3;
  do
  {
    if ( *(_BYTE *)(v96 + 4) )
      v98 = *(_DWORD *)v96;
    else
      v98 = 0;
    (*(void (__thiscall **)(int, _DWORD, int))(*(_DWORD *)v95 + 4))(v95, LODWORD(fCurTime), v98);
    v96 += 44;
    v95 += 12;
    --v97;
  }
  while ( v97 );
  v99 = v112;
  v100 = &v112->m_pkChipThrowEff->m_spEffect.m_pObject;
  if ( *((_BYTE *)v100 + 64) )
  {
    if ( !*((_BYTE *)v100 + 65) )
    {
      CNSTimer_MarkCheck::Update((CNSTimer_MarkCheck *)(v100 + 1), fCurTime);
      if ( v101 == 1 )
      {
        if ( *v100 )
        {
          v102 = (*v100)->m_pkParent;
          if ( v102 )
          {
            ((void (__stdcall *)(char **, NiNode *))v102->vfptr[30].__vecDelDtor)(&v114, *v100);
            if ( *(float *)&v114 != 0.0 )
            {
              v103 = v114;
              if ( !InterlockedDecrement((volatile LONG *)v114 + 1) )
              {
                if ( v103 )
                  (**(void (__thiscall ***)(char *, signed int))v103)(v103, 1);
              }
            }
          }
          *((_BYTE *)v100 + 64) = 0;
        }
      }
    }
  }
  v104 = v99->m_pkRewardEff;
  if ( v104->m_bLive )
    SpEffect::Update(v104, fCurTime);
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (007158E0) --------------------------------------------------------
void __thiscall MiniHouseDiceGameWin::UpdateHistory(MiniHouseDiceGameWin *this, char *arrayNum, bool IsClear)
{
  MiniHouseDiceGameWin *v3; // esi@1
  NiTListItem<PgWinSpr *> *v4; // eax@2
  PgWinSpr *v5; // ecx@3
  signed int v6; // eax@7
  NiTListItem<PgWinSpr *> *v7; // ebx@8
  PgWinSpr *v8; // edx@9
  NiTListItem<PgWinSpr *> **v9; // eax@11
  PgWinSpr **v10; // ecx@12
  NiTListItem<PgWinSpr *> **v11; // edi@12
  NiTListItem<PgWinSpr *> *v12; // edi@20
  PgWin **v13; // ebx@21
  PgWin *v14; // eax@22
  PgWinSpr *v15; // eax@28
  PgWin *v16; // ecx@28
  PgWinSpr *v17; // eax@28
  PgWin *v18; // ecx@28
  PgWinSpr *v19; // eax@28
  PgWin *v20; // ecx@28
  void *kPos; // [sp+4h] [bp-4h]@15

  v3 = this;
  if ( IsClear )
  {
    v4 = this->m_kHistoryList.m_pkHead;
    while ( v4 )
    {
      v5 = v4->m_element;
      v4 = v4->m_pkNext;
      if ( v5 )
        v5->m_pkParent = 0;
    }
    NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *>::RemoveAll((NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *> *)&v3->m_kHistoryList);
    return;
  }
  v6 = this->m_kHistoryList.m_kAllocator.m_uiCount;
  if ( v6 == 21 )
  {
    v7 = this->m_kHistoryList.m_pkHead;
    *(_DWORD *)&IsClear = 3;
    do
    {
      v8 = v7->m_element;
      v7 = v7->m_pkNext;
      if ( v8 )
        v8->m_pkParent = 0;
      v9 = &v3->m_kHistoryList.m_pkHead->m_pkNext;
      if ( v9 )
      {
        while ( 1 )
        {
          v10 = (PgWinSpr **)(v9 + 2);
          v11 = v9;
          v9 = (NiTListItem<PgWinSpr *> **)*v9;
          if ( v8 == *v10 )
            break;
          if ( !v9 )
            goto LABEL_14;
        }
      }
      else
      {
LABEL_14:
        v11 = 0;
      }
      kPos = v11;
      if ( v11 )
        NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&v3->m_kHistoryList,
          &kPos);
      *(_DWORD *)&IsClear = IsClear - 1;
    }
    while ( IsClear );
    v6 = 18;
    goto LABEL_20;
  }
  if ( v6 > 0 )
  {
LABEL_20:
    v12 = v3->m_kHistoryList.m_pkHead;
    if ( v12 )
    {
      v13 = (PgWin **)&v3->m_spHistroyPos[v6 + 2];
      do
      {
        v14 = (PgWin *)&v12->m_element->vfptr;
        v12 = v12->m_pkNext;
        if ( v14 )
        {
          v14->m_pkParent = 0;
          PgWin::AttachChildWin(*v13, v14);
          --v13;
        }
      }
      while ( v12 );
    }
  }
  if ( *arrayNum && arrayNum[1] && arrayNum[2] )
  {
    v15 = PgWinSpr::CreateWin(0, 0, (PgSprData *)v3->m_spHistroyPos[(unsigned __int8)*arrayNum + 20].m_pObject, 0, 0, 0);
    v16 = (PgWin *)&v3->m_spHistroyPos[2].m_pObject->vfptr;
    *(_DWORD *)&IsClear = v15;
    PgWin::AttachChildWin(v16, (PgWin *)&v15->vfptr);
    NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v3->m_kHistoryList,
      (NiD3DXEffectParameter *const *)&IsClear);
    v17 = PgWinSpr::CreateWin(
            0,
            0,
            (PgSprData *)v3->m_spHistroyPos[(unsigned __int8)arrayNum[1] + 20].m_pObject,
            0,
            0,
            0);
    v18 = (PgWin *)&v3->m_spHistroyPos[1].m_pObject->vfptr;
    *(_DWORD *)&IsClear = v17;
    PgWin::AttachChildWin(v18, (PgWin *)&v17->vfptr);
    NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v3->m_kHistoryList,
      (NiD3DXEffectParameter *const *)&IsClear);
    v19 = PgWinSpr::CreateWin(
            0,
            0,
            (PgSprData *)v3->m_spHistroyPos[(unsigned __int8)arrayNum[2] + 20].m_pObject,
            0,
            0,
            0);
    v20 = (PgWin *)&v3->m_spHistroyPos[0].m_pObject->vfptr;
    *(_DWORD *)&IsClear = v19;
    PgWin::AttachChildWin(v20, (PgWin *)&v19->vfptr);
    NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v3->m_kHistoryList,
      (NiD3DXEffectParameter *const *)&IsClear);
  }
}

//----- (00715AB0) --------------------------------------------------------
void __thiscall mhDiceRankWin::UpdateMeWin(mhDiceRankWin *this, float fCurTime)
{
  mhDiceRankWin *v2; // esi@1

  v2 = this;
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
    GameFrameWork::UpdateUIScroll(v2->m_pUserList, v2->m_pkSlideBarEx);
  mhDiceRankWin::UpdateMedal(v2);
}

//----- (00715AF0) --------------------------------------------------------
void __thiscall MHDiceRewardMoneyWin::UpdateMeWin(MHDiceRewardMoneyWin *this, float fCurTime)
{
  MHDiceRewardMoneyWin *v2; // edi@1

  v2 = this;
  if ( g_pkKeyboard->m_aucKeystate[0] & 2 )
  {
    BYTE3(PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID)[73].m_kMsgQ.m_uiAlloced) = 0;
    if ( PgWinMgr::IsIn(&Pgg_kWinMgr, (PgWin *)&this->vfptr) )
      PgTQueue<PgWinMgr::PgWinMsg>::Add(&stru_B6483C, (PgWinMgr::PgWinMsg)__PAIR__(1, (unsigned int)v2));
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (00715B50) --------------------------------------------------------
void __thiscall GambleDiceGameWin::UpdateMeWin(GambleDiceGameWin *this, float fCurTime)
{
  GambleDiceGameWin *v2; // edi@1
  bool v3; // zf@1
  double v4; // st7@3
  DICE_TAISAI_GAME_STATUS v5; // esi@4
  MHDiceGameTask *v6; // ebx@5
  SpEffect **v7; // esi@15
  signed int v8; // ebx@15
  bool v9; // bl@22
  MHDiceGameTask *v10; // esi@23
  int v11; // esi@28
  signed int v12; // ebx@28
  signed int v13; // eax@37
  NiRefObjectVtbl *v14; // edx@37
  double v15; // st7@37
  void *(__thiscall *v16)(NiRefObject *, unsigned int); // eax@37
  NiNode *v17; // eax@37
  double v18; // st7@37
  NiActorManager *v19; // eax@40
  NiNode *v20; // eax@41
  NiActorManager *v21; // eax@44
  NiNode *v22; // eax@45
  NiActorManager *v23; // eax@48
  NiNode *v24; // eax@49
  int v25; // edi@51
  float v26; // ecx@52
  int v27; // esi@52
  float v28; // eax@52
  int v29; // edx@52
  int (__thiscall *v30)(int); // eax@52
  NiAVObject *v31; // ebx@52
  int v32; // eax@52
  float v33; // ecx@52
  int v34; // esi@52
  float v35; // edx@52
  float v36; // eax@52
  void *(__thiscall *v37)(NiRefObject *, unsigned int); // edx@52
  NiAVObject *v38; // eax@52
  NiAVObject *v39; // esi@52
  float v40; // eax@52
  int v41; // ecx@52
  GambleDiceGameWin *v42; // ecx@56
  unsigned int v43; // esi@57
  unsigned int v44; // ebx@57
  unsigned int v45; // edi@57
  signed int v46; // eax@60
  signed int v47; // edi@75
  unsigned int v48; // ebx@75
  int v49; // esi@76
  signed __int64 v50; // kr00_8@76
  int v51; // esi@81
  int v52; // edi@82
  int v53; // ebx@87
  _DWORD *v54; // esi@88
  int v55; // eax@90
  int v56; // ecx@92
  MHDiceGameTask *v57; // edi@94
  int v58; // esi@100
  signed int v59; // ebx@100
  DICE_TAISAI_BETTING v60; // ebx@102
  PgWin **v61; // esi@102
  void (*v62)(void); // eax@103
  MHDiceGameTask *v63; // ecx@104
  char *v64; // eax@108
  unsigned int v65; // esi@114
  int v66; // eax@114
  unsigned int v67; // ecx@114
  unsigned int v68; // ebx@114
  int v69; // eax@116
  signed int v70; // edi@121
  unsigned int v71; // ebx@121
  int v72; // esi@122
  signed __int64 v73; // kr10_8@122
  int v74; // esi@127
  int v75; // edi@128
  unsigned __int64 v76; // rax@130
  GambleDiceGameWin *v77; // esi@130
  bool v78; // cf@130
  unsigned int v79; // edi@130
  int v80; // ebx@130
  int v81; // esi@135
  signed __int64 v82; // kr18_8@135
  int v83; // esi@140
  int v84; // edi@141
  MHDiceGameTask *v85; // edi@143
  MHDiceGameTask *v86; // esi@144
  GambleDiceGameWin *v87; // eax@148
  GambleDiceGameWin *v88; // esi@149
  double v89; // st7@150
  int v90; // ecx@153
  int v91; // eax@155
  NiActorManager *v92; // esi@158
  NiPointer<PgWinSpr> *v93; // edi@159
  unsigned int v94; // ebx@160
  NiTMapItem<unsigned int,NiControllerSequence *> *v95; // edi@160
  NiControllerSequence *v96; // ecx@164
  int v97; // esi@168
  int v98; // edi@168
  signed int v99; // ebx@168
  int v100; // eax@170
  GambleDiceGameWin *v101; // ebx@173
  NiNode **v102; // esi@173
  int v103; // eax@175
  NiNode *v104; // ecx@177
  NiPointer<PgWinSpr> *v105; // edi@179
  SpEffect *v106; // ecx@183
  float v107; // [sp+54h] [bp-70h]@0
  NiQuaternion v108; // [sp+64h] [bp-60h]@52
  NiPoint3 vPos; // [sp+74h] [bp-50h]@37
  float v110; // [sp+80h] [bp-44h]@52
  float v111; // [sp+84h] [bp-40h]@37
  int i; // [sp+88h] [bp-3Ch]@37
  GambleDiceGameWin *v113; // [sp+8Ch] [bp-38h]@1
  NiPointer<MHDiceGameTask> result; // [sp+90h] [bp-34h]@3
  NiPointer<PgWinSpr> *v115; // [sp+94h] [bp-30h]@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > BettingInfo; // [sp+98h] [bp-2Ch]@52
  int v117; // [sp+C0h] [bp-4h]@104

  v2 = this;
  v3 = this->m_bIsResetTimer == 0;
  v113 = this;
  if ( v3 )
  {
    this->m_DiceTimer.m_fStartTime = fCurTime;
    this->m_DiceTimer.m_fObjectTime = 0.0;
    this->m_DiceTimer.m_fElapsedTime = 0.0;
    this->m_bIsResetTimer = 1;
  }
  else
  {
    v115 = (NiPointer<PgWinSpr> *)LODWORD(this->m_DiceTimer.m_fObjectTime);
    *(float *)&result.m_pObject = fCurTime - this->m_DiceTimer.m_fStartTime;
    v4 = *(float *)&result.m_pObject;
    this->m_DiceTimer.m_fObjectTime = *(float *)&result.m_pObject;
    this->m_DiceTimer.m_fElapsedTime = v4 - *(float *)&v115;
  }
  v5 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject->m_eDiceSaiGameStatus;
  if ( *(float *)&result.m_pObject != 0.0 )
  {
    v6 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
  }
  if ( v5 != 1 )
  {
    if ( v5 )
    {
      if ( v5 == 2 )
      {
        LODWORD(v2->m_nTempBettingMoeny) = 0;
        HIDWORD(v2->m_nTempBettingMoeny) = 0;
        LODWORD(v2->m_nUserBettingMoney) = 0;
        HIDWORD(v2->m_nUserBettingMoney) = 0;
      }
      else if ( v5 == 3 )
      {
        if ( 0.0 != v2->m_fResultTime )
          v2->m_fResultTime = v2->m_DiceTimer.m_fElapsedTime + v2->m_fResultTime;
        v7 = v2->m_pkResultEffectList;
        v8 = 10;
        do
        {
          if ( (*v7)->m_bLive )
            SpEffect::Update(*v7, fCurTime);
          ++v7;
          --v8;
        }
        while ( v8 );
        if ( LODWORD(v2->m_nUserBettingMoney) != LODWORD(v2->m_nTempBettingMoeny)
          || HIDWORD(v2->m_nUserBettingMoney) != HIDWORD(v2->m_nTempBettingMoeny) )
        {
          OutputDebugStringA("´Ù¸§");
        }
        v9 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject->m_bComeinMHOnResultStauts;
        if ( *(float *)&result.m_pObject != 0.0 )
        {
          v10 = result.m_pObject;
          if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
          {
            if ( v10 )
              v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
          }
        }
        if ( v9 )
        {
          GambleDiceGameWin::AllReset(v2);
        }
        else
        {
          v11 = (int)v2->m_spBettingBut;
          v12 = 52;
          do
          {
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v11 + 324))(LODWORD(fCurTime));
            v11 += 4;
            --v12;
          }
          while ( v12 );
        }
        if ( v2->m_bResultDiceAni )
          v2->m_fRewardTime = v2->m_DiceTimer.m_fElapsedTime + v2->m_fRewardTime;
        if ( v2->m_fRewardTime > 2.5 && !v2->m_bRewardAni )
        {
          v3 = HIDWORD(v2->m_nUserBettingMoney) == 0;
          v2->m_bRewardAni = 1;
          if ( !v3 || LODWORD(v2->m_nUserBettingMoney) )
          {
            if ( v2->m_bIsHappendBigPot )
            {
              *(float *)&v13 = COERCE_FLOAT(((int (*)(void))v2->vfptr[41].__vecDelDtor)());
              v14 = v2->vfptr;
              result.m_pObject = (MHDiceGameTask *)v13;
              v15 = (double)v13;
              v16 = v14[42].__vecDelDtor;
              v111 = v15;
              *(float *)&result.m_pObject = COERCE_FLOAT(((int (__thiscall *)(GambleDiceGameWin *))v16)(v2));
              v17 = v2->m_pBigpotEff.m_pObject;
              *(float *)&i = (double)(signed int)result.m_pObject;
              vPos.x = v111 + 540.0;
              v18 = *(float *)&i;
              v17->m_kLocal.m_Translate.x = vPos.x;
              vPos.y = v18 - 420.0;
              v17->m_kLocal.m_Translate.y = vPos.y;
              vPos.z = 1000.0;
              v17->m_kLocal.m_Translate.z = 1000.0;
              PgWinMgr::StartFullScreenEffect(
                &Pgg_kWinMgr,
                Timer::ms_fCurTime,
                (NiAVObject *)&v2->m_pBigpotEff.m_pObject->vfptr);
              SoundMgr::PlayInterfaceSound(&g_kSoundMgr, Dice_fanfare);
            }
            else
            {
              SpEffect::Start(v2->m_pkRewardEff, v2->m_pRunEffect.m_pObject);
            }
          }
          if ( v2->m_pkDice[0].m_bIsCanAnimation && (v19 = v2->m_pkDice[0].m_pActorMgr.m_pObject) != 0 )
            v20 = (NiNode *)v19->m_spNIFRoot.m_pObject;
          else
            v20 = v2->m_pkDice[0].m_pNiNode.m_pObject;
          v20->m_uFlags |= 1u;
          if ( v2->m_pkDice[1].m_bIsCanAnimation && (v21 = v2->m_pkDice[1].m_pActorMgr.m_pObject) != 0 )
            v22 = (NiNode *)v21->m_spNIFRoot.m_pObject;
          else
            v22 = v2->m_pkDice[1].m_pNiNode.m_pObject;
          v22->m_uFlags |= 1u;
          if ( v2->m_pkDice[2].m_bIsCanAnimation && (v23 = v2->m_pkDice[2].m_pActorMgr.m_pObject) != 0 )
            v24 = (NiNode *)v23->m_spNIFRoot.m_pObject;
          else
            v24 = v2->m_pkDice[2].m_pNiNode.m_pObject;
          v24->m_uFlags |= 1u;
          v25 = (int)v2->m_spResultDicePos;
          v115 = (NiPointer<PgWinSpr> *)3;
          do
          {
            (*(void (__stdcall **)(signed int))(**(_DWORD **)v25 + 256))(1);
            v26 = *(float *)(*(_DWORD *)v25 + 88);
            v27 = *(_DWORD *)v25;
            v28 = *(float *)(*(_DWORD *)v25 + 96);
            vPos.y = *(float *)(*(_DWORD *)v25 + 92);
            v29 = *(_DWORD *)v27;
            vPos.x = v26;
            vPos.z = v28;
            result.m_pObject = (MHDiceGameTask *)((unsigned int)(*(int (__thiscall **)(int))(v29 + 144))(v27) >> 1);
            v30 = *(int (__thiscall **)(int))(*(_DWORD *)v27 + 148);
            v110 = (double)(unsigned int)result.m_pObject + vPos.x;
            result.m_pObject = (MHDiceGameTask *)((unsigned int)v30(v27) >> 1);
            v31 = (NiAVObject *)&v113->m_pRunEffect.m_pObject->vfptr;
            v111 = (double)(unsigned int)result.m_pObject + vPos.y;
            i = SLODWORD(vPos.z);
            NiQuaternion::NiQuaternion((NiQuaternion *)&BettingInfo._Bx._Alias[12], 0.0, 0.0, 0.0, 0.0);
            v33 = *(float *)(v32 + 4);
            v34 = *(_DWORD *)(v25 + 24);
            v108.m_fW = *(float *)v32;
            v35 = *(float *)(v32 + 8);
            v36 = *(float *)(v32 + 12);
            v108.m_fY = v35;
            v37 = v31->vfptr[29].__vecDelDtor;
            v108.m_fZ = v36;
            v38 = *(NiAVObject **)v34;
            v108.m_fX = v33;
            ((void (__thiscall *)(NiAVObject *, NiAVObject *, _DWORD))v37)(v31, v38, 0);
            NsEffect::SetEffectNode((NsEffect *)(v34 + 28), *(NiAVObject **)v34);
            NsEffect::Start((NsEffect *)(v34 + 28), Timer::ms_fCurTime);
            *(float *)(v34 + 16) = *(float *)(v34 + 40);
            CNSTimer_MarkCheck::ReSet((CNSTimer_MarkCheck *)(v34 + 4), Timer::ms_fCurTime, OVER);
            *(_BYTE *)(v34 + 64) = 1;
            NiAVObject::UpdateProperties(v31);
            NiAVObject::UpdateEffects(v31);
            NiQuaternion::ToRotation(&v108, (NiMatrix3 *)(*(_DWORD *)v34 + 52));
            v39 = *(NiAVObject **)v34;
            v40 = v111;
            v41 = i;
            v39->m_kLocal.m_Translate.x = v110;
            v25 += 4;
            v3 = v115 == (NiPointer<PgWinSpr> *)1;
            v115 = (NiPointer<PgWinSpr> *)((char *)v115 - 1);
            v39->m_kLocal.m_Translate.y = v40;
            LODWORD(v39->m_kLocal.m_Translate.z) = v41;
          }
          while ( !v3 );
          if ( !v113->m_bIsHappendBigPot )
            SoundMgr::PlayInterfaceSound(&g_kSoundMgr, DiceFinalResult);
        }
        if ( v113->m_bRewardAni )
        {
          v42 = v113;
          if ( v113->m_fRewardTime > 4.0 )
          {
            v43 = v113->m_nTempBettingMoeny;
            v44 = v113->m_nUserBettingMoney;
            v45 = HIDWORD(v113->m_nTempBettingMoeny);
            if ( (v44 != v43 || HIDWORD(v113->m_nUserBettingMoney) != v45) && !v113->m_bReverseCount )
            {
              v46 = abs(v44 - v43);
              if ( v46 <= 100000 )
              {
                if ( v46 <= 10000 )
                {
                  if ( v46 <= 1000 )
                  {
                    if ( v46 <= 100 )
                    {
                      if ( v46 > 10 )
                        v46 = 10;
                    }
                    else
                    {
                      v46 = 100;
                    }
                  }
                  else
                  {
                    v46 = 1000;
                  }
                }
                else
                {
                  v46 = 10000;
                }
              }
              else
              {
                v46 = 100000;
              }
              if ( v45 > HIDWORD(v113->m_nUserBettingMoney) || v45 >= HIDWORD(v113->m_nUserBettingMoney) && v43 >= v44 )
                v113->m_nTempBettingMoeny = __PAIR__(v45, v43) - v46;
              else
                v113->m_nTempBettingMoeny = __PAIR__(v45, v43) + v46;
              v47 = v42->m_nTempBettingMoeny;
              v48 = HIDWORD(v42->m_nTempBettingMoeny);
              i = 6;
              v115 = &v42->m_spShareNumSpr[6];
              while ( 1 )
              {
                v49 = v47 % 10;
                v50 = (signed __int64)__PAIR__(v48, v47) / 10;
                v48 = (unsigned __int64)((signed __int64)__PAIR__(v48, v47) / 10) >> 32;
                v47 = v50;
                if ( v49 < 0 )
                  v49 = 0;
                ((void (__stdcall *)(int))v115->m_pObject->vfptr[123].__vecDelDtor)(v49);
                if ( !(v48 | (unsigned int)v50) )
                  break;
                --v115;
                if ( --i < 0 )
                  goto LABEL_84;
              }
              v51 = i - 1;
              if ( i - 1 >= 0 )
              {
                v52 = (int)&v113->m_spShareNumSpr[v51];
                do
                {
                  (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v52 + 492))(0);
                  v52 -= 4;
                  --v51;
                }
                while ( v51 >= 0 );
              }
LABEL_84:
              if ( LODWORD(v113->m_nUserBettingMoney) == LODWORD(v113->m_nTempBettingMoeny)
                && HIDWORD(v113->m_nUserBettingMoney) == HIDWORD(v113->m_nTempBettingMoeny) )
              {
                v113->m_bReverseCount = 1;
              }
            }
            v53 = (int)v113->m_pkDiceUpEff;
            v115 = (NiPointer<PgWinSpr> *)3;
            do
            {
              v54 = *(_DWORD **)v53;
              if ( *(_BYTE *)(*(_DWORD *)v53 + 64) )
              {
                if ( !*((_BYTE *)v54 + 65) )
                {
                  CNSTimer_MarkCheck::Update((CNSTimer_MarkCheck *)(v54 + 1), fCurTime);
                  if ( v55 == 1 )
                  {
                    if ( *v54 )
                    {
                      v56 = *(_DWORD *)(*v54 + 32);
                      if ( v56 )
                      {
                        (*(void (__stdcall **)(NiPointer<MHDiceGameTask> *, _DWORD))(*(_DWORD *)v56 + 120))(
                          &result,
                          *v54);
                        if ( *(float *)&result.m_pObject != 0.0 )
                        {
                          v57 = result.m_pObject;
                          if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
                          {
                            if ( v57 )
                              v57->vfptr->__vecDelDtor((NiRefObject *)v57, 1u);
                          }
                        }
                      }
                      *((_BYTE *)v54 + 64) = 0;
                    }
                  }
                }
              }
              v53 += 4;
              v115 = (NiPointer<PgWinSpr> *)((char *)v115 - 1);
            }
            while ( *(float *)&v115 != 0.0 );
          }
        }
      }
      goto LABEL_149;
    }
    v58 = (int)v2->m_spResultDicePos;
    v59 = 3;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v58 + 256))(0);
      v58 += 4;
      --v59;
    }
    while ( v59 );
  }
  v60 = 0;
  v61 = (PgWin **)v2->m_spBettingBut;
  do
  {
    v3 = (unsigned __int8)((int (__stdcall *)(unsigned int, int, _DWORD))(*v61)->vfptr[83].__vecDelDtor)(
                            PgWin::ms_iMsX,
                            PgWin::ms_iMsY,
                            LODWORD(v107)) == 0;
    v62 = (void (*)(void))v61[52]->vfptr[69].__vecDelDtor;
    if ( v3 )
    {
      v107 = 1.0;
      v62();
      LOBYTE((*v61)[1].m_kWorldBound.m_kCenter.y) = 0;
      ((void (__stdcall *)(signed int))(*v61)->vfptr[138].__vecDelDtor)(4);
    }
    else
    {
      v107 = 0.30000001;
      v62();
      LOBYTE((*v61)[1].m_kWorldBound.m_kCenter.y) = 1;
      v63 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
      v117 = 0;
      MHDiceGameTask::GetBettingInfo(v63, &BettingInfo, v60);
      LOBYTE(v117) = 2;
      if ( *(float *)&result.m_pObject != 0.0 )
      {
        v115 = (NiPointer<PgWinSpr> *)result.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) && *(float *)&v115 != 0.0 )
          ((void (__stdcall *)(signed int))v115->m_pObject->vfptr)(1);
      }
      v64 = BettingInfo._Bx._Ptr;
      if ( BettingInfo._Myres < 0x10 )
        v64 = (char *)&BettingInfo;
      PgWin::SetToolTipWinText(*v61, v64);
      v117 = -1;
      if ( BettingInfo._Myres >= 0x10 )
        operator delete(BettingInfo._Bx._Ptr);
    }
    ++v60;
    ++v61;
  }
  while ( (signed int)v60 < 52 );
  v65 = v2->m_nTempBettingMoeny;
  v66 = v2->m_nUserBettingMoney;
  v67 = HIDWORD(v2->m_nTempBettingMoeny);
  v68 = HIDWORD(v2->m_nUserBettingMoney);
  if ( v66 != v65 || v68 != v67 )
  {
    v69 = abs(v66 - v65);
    if ( v67 > v68 || v67 >= v68 && v65 >= LODWORD(v2->m_nUserBettingMoney) )
      v2->m_nTempBettingMoeny = __PAIR__(v67, v65) - v69;
    else
      v2->m_nTempBettingMoeny = __PAIR__(v67, v65) + v69;
    v70 = v113->m_nTempBettingMoeny;
    v71 = HIDWORD(v113->m_nTempBettingMoeny);
    i = 6;
    v115 = &v113->m_spBetNumSpr[6];
    while ( 1 )
    {
      v72 = v70 % 10;
      v73 = (signed __int64)__PAIR__(v71, v70) / 10;
      v71 = (unsigned __int64)((signed __int64)__PAIR__(v71, v70) / 10) >> 32;
      v70 = v73;
      if ( v72 < 0 )
        v72 = 0;
      ((void (__stdcall *)(int))v115->m_pObject->vfptr[123].__vecDelDtor)(v72);
      if ( !(v71 | (unsigned int)v73) )
        break;
      --v115;
      if ( --i < 0 )
        goto LABEL_130;
    }
    v74 = i - 1;
    if ( i - 1 >= 0 )
    {
      v75 = (int)&v113->m_spBetNumSpr[v74];
      do
      {
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v75 + 492))(0);
        v75 -= 4;
        --v74;
      }
      while ( v74 >= 0 );
    }
LABEL_130:
    MHDiceGameTask::GetDiceGameTask(&result);
    v117 = 3;
    v76 = User::Coin(&g_kUser);
    v77 = v113;
    v78 = (unsigned int)v76 < LODWORD(v113->m_nTempBettingMoeny);
    LODWORD(v76) = v76 - LODWORD(v113->m_nTempBettingMoeny);
    v117 = -1;
    v79 = v76;
    v80 = HIDWORD(v76) - (v78 + HIDWORD(v113->m_nTempBettingMoeny));
    if ( *(float *)&result.m_pObject != 0.0 )
    {
      v115 = (NiPointer<PgWinSpr> *)result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) && *(float *)&v115 != 0.0 )
        ((void (__stdcall *)(signed int))v115->m_pObject->vfptr)(1);
    }
    LODWORD(v113->m_nInvenRemainMoney) = v79;
    HIDWORD(v77->m_nInvenRemainMoney) = v80;
    i = 11;
    v115 = &v77->m_spMyBetNumSpr[11];
    while ( 1 )
    {
      v81 = __PAIR__(v80, v79) % 10;
      v82 = __PAIR__(v80, v79) / 10;
      v80 = (unsigned __int64)(__PAIR__(v80, v79) / 10) >> 32;
      v79 = v82;
      if ( v81 < 0 )
        v81 = 0;
      ((void (__stdcall *)(int))v115->m_pObject->vfptr[123].__vecDelDtor)(v81);
      if ( !(v80 | (unsigned int)v82) )
        break;
      --v115;
      if ( --i < 0 )
        goto LABEL_143;
    }
    v83 = i - 1;
    if ( i - 1 >= 0 )
    {
      v84 = (int)&v113->m_spMyBetNumSpr[v83];
      do
      {
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v84 + 492))(0);
        v84 -= 4;
        --v83;
      }
      while ( v83 >= 0 );
    }
LABEL_143:
    v85 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
    if ( *(float *)&result.m_pObject != 0.0 )
    {
      v86 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v86 )
          v86->vfptr->__vecDelDtor((NiRefObject *)v86, 1u);
      }
    }
    if ( v85 )
    {
      v87 = v113;
      LODWORD(v85->m_nInvenRemainMoney) = v113->m_nInvenRemainMoney;
      HIDWORD(v85->m_nInvenRemainMoney) = HIDWORD(v87->m_nInvenRemainMoney);
    }
  }
LABEL_149:
  v88 = v113;
  if ( v113->m_fResultTime > 0.1000000014901161 )
  {
    SpEffect::Update(v113->m_pkDiceRollEffect, fCurTime);
    *(float *)&result.m_pObject = v88->m_DiceTimer.m_fElapsedTime + v88->m_fDiceAniTime;
    v89 = *(float *)&result.m_pObject;
    v88->m_fDiceAniTime = *(float *)&result.m_pObject;
    if ( v89 > 1.659999966621399 && !v88->m_bResultDiceAni )
    {
      v88->m_bResultDiceAni = 1;
      v115 = (NiPointer<PgWinSpr> *)&v88->m_AniActor[0].m_uiAniSeqID;
      i = (int)&v88->m_pkDice[0].m_pActorMgr;
      result.m_pObject = (MHDiceGameTask *)3;
      do
      {
        v90 = i;
        if ( *(_BYTE *)(i + 4) && *(_DWORD *)i )
          v91 = *(_DWORD *)(*(_DWORD *)i + 12);
        else
          v91 = *(_DWORD *)(i - 4);
        *(_WORD *)(v91 + 28) &= 0xFFFEu;
        if ( *(_BYTE *)(v90 + 4) )
        {
          v92 = *(NiActorManager **)i;
          if ( *(_DWORD *)i )
          {
            v93 = v115;
            LOWORD(v115->m_pObject) = HIWORD(v115->m_pObject) + LOWORD(v115[1].m_pObject);
            NiActorManager::Reset(v92);
            NiActorManager::Update(v92, 0.0);
            if ( NiActorManager::SetTargetAnimation(v92, LOWORD(v93->m_pObject)) )
            {
              v94 = LOWORD(v93->m_pObject);
              v95 = v92->m_kSequenceMap.m_ppkHashTable[v92->m_kSequenceMap.vfptr->KeyToHashIndex(
                                                         (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *> *)&v92->m_kSequenceMap,
                                                         v94)];
              if ( v95 )
              {
                while ( !v92->m_kSequenceMap.vfptr->IsKeysEqual(
                           (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *> *)&v92->m_kSequenceMap,
                           v94,
                           v95->m_key) )
                {
                  v95 = v95->m_pkNext;
                  if ( !v95 )
                    goto LABEL_166;
                }
                v96 = v95->m_val;
                if ( v96 )
                {
                  v96->m_fOffset = -3.4028235e38;
                  NiControllerSequence::Update(v96, fCurTime, 1);
                }
              }
            }
          }
        }
LABEL_166:
        i += 44;
        v115 += 3;
        --result.m_pObject;
      }
      while ( *(float *)&result.m_pObject != 0.0 );
      SoundMgr::PlayInterfaceSound(&g_kSoundMgr, DiceRoll_Single01);
    }
  }
  v97 = (int)v113->m_AniActor;
  v98 = (int)&v113->m_pkDice[0].m_pActorMgr;
  v99 = 3;
  do
  {
    if ( *(_BYTE *)(v98 + 4) )
      v100 = *(_DWORD *)v98;
    else
      v100 = 0;
    (*(void (__thiscall **)(int, _DWORD, int))(*(_DWORD *)v97 + 4))(v97, LODWORD(fCurTime), v100);
    v98 += 44;
    v97 += 12;
    --v99;
  }
  while ( v99 );
  v101 = v113;
  v102 = &v113->m_pkChipThrowEff->m_spEffect.m_pObject;
  if ( *((_BYTE *)v102 + 64) )
  {
    if ( !*((_BYTE *)v102 + 65) )
    {
      CNSTimer_MarkCheck::Update((CNSTimer_MarkCheck *)(v102 + 1), fCurTime);
      if ( v103 == 1 )
      {
        if ( *v102 )
        {
          v104 = (*v102)->m_pkParent;
          if ( v104 )
          {
            ((void (__stdcall *)(NiPointer<PgWinSpr> **, NiNode *))v104->vfptr[30].__vecDelDtor)(&v115, *v102);
            if ( *(float *)&v115 != 0.0 )
            {
              v105 = v115;
              if ( !InterlockedDecrement((volatile LONG *)&v115[1]) )
              {
                if ( v105 )
                  ((void (__thiscall *)(NiPointer<PgWinSpr> *, signed int))v105->m_pObject->vfptr)(v105, 1);
              }
            }
          }
          *((_BYTE *)v102 + 64) = 0;
        }
      }
    }
  }
  v106 = v101->m_pkRewardEff;
  if ( v106->m_bLive )
    SpEffect::Update(v106, fCurTime);
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (007167A0) --------------------------------------------------------
void __thiscall GambleDiceGameWin::UpdateHistory(GambleDiceGameWin *this, char *arrayNum, bool IsClear)
{
  GambleDiceGameWin *v3; // esi@1
  NiTListItem<PgWinSpr *> *v4; // eax@2
  PgWinSpr *v5; // ecx@3
  signed int v6; // eax@7
  NiTListItem<PgWinSpr *> *v7; // ebx@8
  PgWinSpr *v8; // edx@9
  NiTListItem<PgWinSpr *> **v9; // eax@11
  PgWinSpr **v10; // ecx@12
  NiTListItem<PgWinSpr *> **v11; // edi@12
  NiTListItem<PgWinSpr *> *v12; // edi@20
  PgWin **v13; // ebx@21
  PgWin *v14; // eax@22
  PgWinSpr *v15; // eax@28
  PgWin *v16; // ecx@28
  PgWinSpr *v17; // eax@28
  PgWin *v18; // ecx@28
  PgWinSpr *v19; // eax@28
  PgWin *v20; // ecx@28
  void *kPos; // [sp+4h] [bp-4h]@15

  v3 = this;
  if ( IsClear )
  {
    v4 = this->m_kHistoryList.m_pkHead;
    while ( v4 )
    {
      v5 = v4->m_element;
      v4 = v4->m_pkNext;
      if ( v5 )
        v5->m_pkParent = 0;
    }
    NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *>::RemoveAll((NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *> *)&v3->m_kHistoryList);
    return;
  }
  v6 = this->m_kHistoryList.m_kAllocator.m_uiCount;
  if ( v6 == 21 )
  {
    v7 = this->m_kHistoryList.m_pkHead;
    *(_DWORD *)&IsClear = 3;
    do
    {
      v8 = v7->m_element;
      v7 = v7->m_pkNext;
      if ( v8 )
        v8->m_pkParent = 0;
      v9 = &v3->m_kHistoryList.m_pkHead->m_pkNext;
      if ( v9 )
      {
        while ( 1 )
        {
          v10 = (PgWinSpr **)(v9 + 2);
          v11 = v9;
          v9 = (NiTListItem<PgWinSpr *> **)*v9;
          if ( v8 == *v10 )
            break;
          if ( !v9 )
            goto LABEL_14;
        }
      }
      else
      {
LABEL_14:
        v11 = 0;
      }
      kPos = v11;
      if ( v11 )
        NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiLight *>::RemovePos(
          (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DShaderInterface *> *)&v3->m_kHistoryList,
          &kPos);
      *(_DWORD *)&IsClear = IsClear - 1;
    }
    while ( IsClear );
    v6 = 18;
    goto LABEL_20;
  }
  if ( v6 > 0 )
  {
LABEL_20:
    v12 = v3->m_kHistoryList.m_pkHead;
    if ( v12 )
    {
      v13 = (PgWin **)&v3->m_spHistroyPos[v6 + 2];
      do
      {
        v14 = (PgWin *)&v12->m_element->vfptr;
        v12 = v12->m_pkNext;
        if ( v14 )
        {
          v14->m_pkParent = 0;
          PgWin::AttachChildWin(*v13, v14);
          --v13;
        }
      }
      while ( v12 );
    }
  }
  if ( *arrayNum && arrayNum[1] && arrayNum[2] )
  {
    v15 = PgWinSpr::CreateWin(0, 0, (PgSprData *)v3->m_spHistroyPos[(unsigned __int8)*arrayNum + 20].m_pObject, 0, 0, 0);
    v16 = (PgWin *)&v3->m_spHistroyPos[2].m_pObject->vfptr;
    *(_DWORD *)&IsClear = v15;
    PgWin::AttachChildWin(v16, (PgWin *)&v15->vfptr);
    NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v3->m_kHistoryList,
      (NiD3DXEffectParameter *const *)&IsClear);
    v17 = PgWinSpr::CreateWin(
            0,
            0,
            (PgSprData *)v3->m_spHistroyPos[(unsigned __int8)arrayNum[1] + 20].m_pObject,
            0,
            0,
            0);
    v18 = (PgWin *)&v3->m_spHistroyPos[1].m_pObject->vfptr;
    *(_DWORD *)&IsClear = v17;
    PgWin::AttachChildWin(v18, (PgWin *)&v17->vfptr);
    NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v3->m_kHistoryList,
      (NiD3DXEffectParameter *const *)&IsClear);
    v19 = PgWinSpr::CreateWin(
            0,
            0,
            (PgSprData *)v3->m_spHistroyPos[(unsigned __int8)arrayNum[2] + 20].m_pObject,
            0,
            0,
            0);
    v20 = (PgWin *)&v3->m_spHistroyPos[0].m_pObject->vfptr;
    *(_DWORD *)&IsClear = v19;
    PgWin::AttachChildWin(v20, (PgWin *)&v19->vfptr);
    NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
      (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v3->m_kHistoryList,
      (NiD3DXEffectParameter *const *)&IsClear);
  }
}

//----- (00716970) --------------------------------------------------------
void __thiscall MiniHouseDiceGameWin::MiniHouseDiceGameWin(MiniHouseDiceGameWin *this)
{
  MiniHouseDiceGameWin *v1; // esi@1
  int v2; // ebx@1
  NiNode *v3; // ebx@8
  NiNode *v4; // ebx@13
  void (__stdcall ***v5)(_DWORD); // [sp+14h] [bp-14h]@2
  signed int v6; // [sp+18h] [bp-10h]@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&MiniHouseDiceGameWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MiniHouseDiceGameWin::`vftable'{for `IDirectMessenger'};
  v1->m_spTimer.m_pObject = 0;
  v1->m_spTimerFill.m_pObject = 0;
  v1->m_spTimerBack.m_pObject = 0;
  v1->m_pStartEffect.m_pObject = 0;
  v1->m_spTitleText.m_pObject = 0;
  `eh vector constructor iterator'(
    v1->m_spLightSpr,
    4u,
    32,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_pkDice,
    0x2Cu,
    3,
    (void (__thiscall *)(void *))ResElement::ResElement,
    (void (__thiscall *)(void *))ResElement::~ResElement);
  `eh vector constructor iterator'(
    v1->m_AniActor,
    0xCu,
    3,
    (void (__thiscall *)(void *))MHDiceAniActor::MHDiceAniActor,
    (void (__thiscall *)(void *))mhObjAniActor::~mhObjAniActor);
  v1->m_EffectPos.m_pObject = 0;
  v1->m_pRunEffect.m_pObject = 0;
  v2 = (int)v1->m_spNumTex;
  `eh vector constructor iterator'(
    v1->m_spNumTex,
    4u,
    10,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spHistory,
    4u,
    21,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spBettingBut,
    4u,
    52,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spChips,
    4u,
    52,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spBetMoney,
    4u,
    8,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spBetNumSpr,
    4u,
    8,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spShareMoney,
    4u,
    8,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spShareNumSpr,
    4u,
    8,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spMyMoney,
    4u,
    12,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spMyBetNumSpr,
    4u,
    12,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_sp100CooperChip.m_pObject = 0;
  v1->m_sp1SilverChip.m_pObject = 0;
  v1->m_sp10SilverChip.m_pObject = 0;
  v1->m_sp100SilverChip.m_pObject = 0;
  v1->m_spGoldChip.m_pObject = 0;
  v1->m_spMaxChip.m_pObject = 0;
  `eh vector constructor iterator'(
    v1->m_spHistroyPos,
    4u,
    21,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spDiceNum,
    4u,
    6,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spResultDiceNum,
    4u,
    6,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_kHistoryList.m_kAllocator.m_uiCount = 0;
  v1->m_kHistoryList.m_pkHead = 0;
  v1->m_kHistoryList.m_pkTail = 0;
  v1->m_kHistoryList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>Vtbl *)&PgTList<PgWinSpr *>::`vftable';
  `eh vector constructor iterator'(
    v1->m_pkChipSelectBut,
    4u,
    6,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spResultDicePos,
    4u,
    3,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spResultDice,
    4u,
    3,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_spTimeCountText.m_pObject = 0;
  v1->m_DiceTimer.m_fStartTime = 0.0;
  v1->m_DiceTimer.m_fObjectTime = 0.0;
  v1->m_DiceTimer.m_fElapsedTime = 0.0;
  v1->m_pBigpotEff.m_pObject = 0;
  v6 = 10;
  do
  {
    v5 = *(void (__stdcall ****)(_DWORD))v2;
    if ( *(_DWORD *)v2 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(*(_DWORD *)v2 + 4)) && v5 )
        (**v5)(1);
      *(_DWORD *)v2 = 0;
    }
    v2 += 4;
    --v6;
  }
  while ( v6 );
  v3 = v1->m_pStartEffect.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_pStartEffect.m_pObject = 0;
  }
  v4 = v1->m_pRunEffect.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_pRunEffect.m_pObject = 0;
  }
  *(_DWORD *)&v1->m_uiOnLightIdx[0] = 0;
  *(_DWORD *)&v1->m_uiOnLightIdx[2] = 0;
  v1->m_pkDiceRollEffect = 0;
  v1->m_pkChipThrowEff = 0;
  v1->m_pkRewardEff = 0;
  v1->m_pkDiceUpEff[0] = 0;
  v1->m_pkDiceUpEff[1] = 0;
  v1->m_pkDiceUpEff[2] = 0;
}
// 98C1A4: using guessed type int (__thiscall *PgTList<PgWinSpr *>::`vftable')(void *p, char);
// 9CCCA8: using guessed type void (__thiscall *MiniHouseDiceGameWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CCCC4: using guessed type int (__thiscall *MiniHouseDiceGameWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00716D70) --------------------------------------------------------
void __thiscall MiniHouseDiceGameWin::~MiniHouseDiceGameWin(MiniHouseDiceGameWin *this)
{
  MiniHouseDiceGameWin *v1; // esi@1
  NiNode *v2; // edi@1
  NiNode *v3; // edi@6
  SpEffect *v4; // edi@11
  NiNode *v5; // ebx@12
  MHChipEffect *v6; // edi@17
  SpEffect *v7; // edi@19
  NiNode *v8; // ebx@20
  SpEffect *v9; // edi@26
  NiNode *v10; // ebx@27
  MHChipEffect *v11; // edi@34
  NiNode *v12; // ebx@35
  NiNode *v13; // ebx@40
  NiNode *v14; // edi@46
  PgWinText *v15; // edi@50
  int v16; // edi@54
  NiTListItem<PgWinSpr *> **v17; // ebx@54
  NiTListItem<PgWinSpr *> **v18; // ST0C_4@55
  PgSprData *v19; // edi@56
  PgSprData *v20; // edi@60
  PgSprData *v21; // edi@64
  PgSprData *v22; // edi@68
  PgSprData *v23; // edi@72
  PgSprData *v24; // edi@76
  NiNode *v25; // edi@80
  NiNode *v26; // edi@84
  PgWinText *v27; // edi@88
  NiNode *v28; // edi@92
  PgWinSpr *v29; // edi@96
  PgWinSpr *v30; // edi@100
  PgWinSpr *v31; // edi@104
  signed int v32; // [sp+18h] [bp-14h]@25
  signed int v33; // [sp+18h] [bp-14h]@33
  SpEffect **v34; // [sp+1Ch] [bp-10h]@25
  MHChipEffect **v35; // [sp+1Ch] [bp-10h]@33

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&MiniHouseDiceGameWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MiniHouseDiceGameWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_pStartEffect.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_pStartEffect.m_pObject = 0;
  }
  v3 = v1->m_pRunEffect.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_pRunEffect.m_pObject = 0;
  }
  v4 = v1->m_pkDiceRollEffect;
  if ( v4 )
  {
    NsEffect::~NsEffect(&v4->m_kEffect);
    ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v4->m_kMarkCheck);
    v5 = v4->m_spEffect.m_pObject;
    if ( v4->m_spEffect.m_pObject && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    operator delete(v4);
  }
  v6 = v1->m_pkChipThrowEff;
  if ( v6 )
  {
    MHChipEffect::~MHChipEffect(v1->m_pkChipThrowEff);
    operator delete(v6);
  }
  v7 = v1->m_pkRewardEff;
  if ( v7 )
  {
    NsEffect::~NsEffect(&v7->m_kEffect);
    ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v7->m_kMarkCheck);
    v8 = v7->m_spEffect.m_pObject;
    if ( v7->m_spEffect.m_pObject && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    operator delete(v7);
  }
  v34 = v1->m_pkResultEffectList;
  v32 = 10;
  do
  {
    v9 = *v34;
    if ( *v34 )
    {
      NsEffect::~NsEffect(&v9->m_kEffect);
      ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v9->m_kMarkCheck);
      v10 = v9->m_spEffect.m_pObject;
      if ( v9->m_spEffect.m_pObject && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
      operator delete(v9);
    }
    ++v34;
    --v32;
  }
  while ( v32 );
  v35 = v1->m_pkDiceUpEff;
  v33 = 3;
  do
  {
    v11 = *v35;
    if ( *v35 )
    {
      v12 = v11->m_spEffect.m_pObject;
      if ( v11->m_spEffect.m_pObject )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
          v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
        v11->m_spEffect.m_pObject = 0;
      }
      NsEffect::~NsEffect(&v11->m_kEffect);
      ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v11->m_kMarkCheck);
      v13 = v11->m_spEffect.m_pObject;
      if ( v11->m_spEffect.m_pObject && !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) && v13 )
        v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
      operator delete(v11);
    }
    ++v35;
    --v33;
  }
  while ( v33 );
  v14 = v1->m_pBigpotEff.m_pObject;
  if ( v14 && !InterlockedDecrement((volatile LONG *)&v14->m_uiRefCount) && v14 )
    v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
  v15 = v1->m_spTimeCountText.m_pObject;
  if ( v15 && !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) && v15 )
    v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
  `eh vector destructor iterator'(
    v1->m_spResultDice,
    4u,
    3,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_spResultDicePos,
    4u,
    3,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_pkChipSelectBut,
    4u,
    6,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v16 = (int)&v1->m_kHistoryList;
  v1->m_kHistoryList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>Vtbl *)&PgTList<PgWinSpr *>::`vftable';
  v17 = &v1->m_kHistoryList.m_pkHead->m_pkNext;
  while ( v17 )
  {
    v18 = v17;
    v17 = (NiTListItem<PgWinSpr *> **)*v17;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v16 + 8))(&v1->m_kHistoryList, v18);
  }
  v1->m_kHistoryList.m_kAllocator.m_uiCount = 0;
  v1->m_kHistoryList.m_pkHead = 0;
  v1->m_kHistoryList.m_pkTail = 0;
  *(_DWORD *)v16 = &NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`vftable';
  `eh vector destructor iterator'(
    v1->m_spResultDiceNum,
    4u,
    6,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_spDiceNum,
    4u,
    6,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_spHistroyPos,
    4u,
    21,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v19 = v1->m_spMaxChip.m_pObject;
  if ( v19 && !InterlockedDecrement((volatile LONG *)&v19->m_uiRefCount) && v19 )
    v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
  v20 = v1->m_spGoldChip.m_pObject;
  if ( v20 && !InterlockedDecrement((volatile LONG *)&v20->m_uiRefCount) && v20 )
    v20->vfptr->__vecDelDtor((NiRefObject *)v20, 1u);
  v21 = v1->m_sp100SilverChip.m_pObject;
  if ( v21 && !InterlockedDecrement((volatile LONG *)&v21->m_uiRefCount) && v21 )
    v21->vfptr->__vecDelDtor((NiRefObject *)v21, 1u);
  v22 = v1->m_sp10SilverChip.m_pObject;
  if ( v22 && !InterlockedDecrement((volatile LONG *)&v22->m_uiRefCount) && v22 )
    v22->vfptr->__vecDelDtor((NiRefObject *)v22, 1u);
  v23 = v1->m_sp1SilverChip.m_pObject;
  if ( v23 && !InterlockedDecrement((volatile LONG *)&v23->m_uiRefCount) && v23 )
    v23->vfptr->__vecDelDtor((NiRefObject *)v23, 1u);
  v24 = v1->m_sp100CooperChip.m_pObject;
  if ( v24 && !InterlockedDecrement((volatile LONG *)&v24->m_uiRefCount) && v24 )
    v24->vfptr->__vecDelDtor((NiRefObject *)v24, 1u);
  `eh vector destructor iterator'(
    v1->m_spMyBetNumSpr,
    4u,
    12,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_spMyMoney,
    4u,
    12,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_spShareNumSpr,
    4u,
    8,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_spShareMoney,
    4u,
    8,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_spBetNumSpr,
    4u,
    8,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_spBetMoney,
    4u,
    8,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_spChips,
    4u,
    52,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_spBettingBut,
    4u,
    52,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_spHistory,
    4u,
    21,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_spNumTex,
    4u,
    10,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v25 = v1->m_pRunEffect.m_pObject;
  if ( v25 && !InterlockedDecrement((volatile LONG *)&v25->m_uiRefCount) && v25 )
    v25->vfptr->__vecDelDtor((NiRefObject *)v25, 1u);
  v26 = v1->m_EffectPos.m_pObject;
  if ( v26 && !InterlockedDecrement((volatile LONG *)&v26->m_uiRefCount) && v26 )
    v26->vfptr->__vecDelDtor((NiRefObject *)v26, 1u);
  `eh vector destructor iterator'(v1->m_AniActor, 0xCu, 3, (void (__thiscall *)(void *))mhObjAniActor::~mhObjAniActor);
  `eh vector destructor iterator'(v1->m_pkDice, 0x2Cu, 3, (void (__thiscall *)(void *))ResElement::~ResElement);
  `eh vector destructor iterator'(
    v1->m_spLightSpr,
    4u,
    32,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v27 = v1->m_spTitleText.m_pObject;
  if ( v27 && !InterlockedDecrement((volatile LONG *)&v27->m_uiRefCount) && v27 )
    v27->vfptr->__vecDelDtor((NiRefObject *)v27, 1u);
  v28 = v1->m_pStartEffect.m_pObject;
  if ( v28 && !InterlockedDecrement((volatile LONG *)&v28->m_uiRefCount) && v28 )
    v28->vfptr->__vecDelDtor((NiRefObject *)v28, 1u);
  v29 = v1->m_spTimerBack.m_pObject;
  if ( v29 && !InterlockedDecrement((volatile LONG *)&v29->m_uiRefCount) && v29 )
    v29->vfptr->__vecDelDtor((NiRefObject *)v29, 1u);
  v30 = v1->m_spTimerFill.m_pObject;
  if ( v30 && !InterlockedDecrement((volatile LONG *)&v30->m_uiRefCount) && v30 )
    v30->vfptr->__vecDelDtor((NiRefObject *)v30, 1u);
  v31 = v1->m_spTimer.m_pObject;
  if ( v31 && !InterlockedDecrement((volatile LONG *)&v31->m_uiRefCount) && v31 )
    v31->vfptr->__vecDelDtor((NiRefObject *)v31, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 98C02C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`vftable')(void *p, char);
// 98C1A4: using guessed type int (__thiscall *PgTList<PgWinSpr *>::`vftable')(void *p, char);
// 9CCCA8: using guessed type void (__thiscall *MiniHouseDiceGameWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CCCC4: using guessed type int (__thiscall *MiniHouseDiceGameWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00717490) --------------------------------------------------------
void __thiscall GambleDiceGameWin::GambleDiceGameWin(GambleDiceGameWin *this)
{
  GambleDiceGameWin *v1; // esi@1
  int v2; // ebx@1
  NiNode *v3; // ebx@8
  NiNode *v4; // ebx@13
  void (__stdcall ***v5)(_DWORD); // [sp+14h] [bp-14h]@2
  signed int v6; // [sp+18h] [bp-10h]@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GambleDiceGameWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GambleDiceGameWin::`vftable'{for `IDirectMessenger'};
  v1->m_spTimer.m_pObject = 0;
  v1->m_spTimerFill.m_pObject = 0;
  v1->m_spTimerBack.m_pObject = 0;
  v1->m_pStartEffect.m_pObject = 0;
  v1->m_spTitleText.m_pObject = 0;
  `eh vector constructor iterator'(
    v1->m_spLightSpr,
    4u,
    32,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_pkDice,
    0x2Cu,
    3,
    (void (__thiscall *)(void *))ResElement::ResElement,
    (void (__thiscall *)(void *))ResElement::~ResElement);
  `eh vector constructor iterator'(
    v1->m_AniActor,
    0xCu,
    3,
    (void (__thiscall *)(void *))MHDiceAniActor::MHDiceAniActor,
    (void (__thiscall *)(void *))mhObjAniActor::~mhObjAniActor);
  v1->m_EffectPos.m_pObject = 0;
  v1->m_pRunEffect.m_pObject = 0;
  v2 = (int)v1->m_spNumTex;
  `eh vector constructor iterator'(
    v1->m_spNumTex,
    4u,
    10,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spHistory,
    4u,
    21,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spBettingBut,
    4u,
    52,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spChips,
    4u,
    52,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spBetMoney,
    4u,
    7,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spBetNumSpr,
    4u,
    7,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spShareMoney,
    4u,
    7,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spShareNumSpr,
    4u,
    7,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spMyMoney,
    4u,
    12,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spMyBetNumSpr,
    4u,
    12,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_sp100CooperChip.m_pObject = 0;
  v1->m_sp1SilverChip.m_pObject = 0;
  v1->m_sp10SilverChip.m_pObject = 0;
  v1->m_sp100SilverChip.m_pObject = 0;
  v1->m_spGoldChip.m_pObject = 0;
  v1->m_spMaxChip.m_pObject = 0;
  `eh vector constructor iterator'(
    v1->m_spHistroyPos,
    4u,
    21,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spDiceNum,
    4u,
    6,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spResultDiceNum,
    4u,
    6,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_kHistoryList.m_kAllocator.m_uiCount = 0;
  v1->m_kHistoryList.m_pkHead = 0;
  v1->m_kHistoryList.m_pkTail = 0;
  v1->m_kHistoryList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>Vtbl *)&PgTList<PgWinSpr *>::`vftable';
  `eh vector constructor iterator'(
    v1->m_pkChipSelectBut,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spResultDicePos,
    4u,
    3,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector constructor iterator'(
    v1->m_spResultDice,
    4u,
    3,
    (void (__thiscall *)(void *))NiPointer<PgWinLRBut>::`default constructor closure',
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v1->m_spTimeCountText.m_pObject = 0;
  v1->m_DiceTimer.m_fStartTime = 0.0;
  v1->m_DiceTimer.m_fObjectTime = 0.0;
  v1->m_DiceTimer.m_fElapsedTime = 0.0;
  v1->m_pBigpotEff.m_pObject = 0;
  v6 = 10;
  do
  {
    v5 = *(void (__stdcall ****)(_DWORD))v2;
    if ( *(_DWORD *)v2 )
    {
      if ( !InterlockedDecrement((volatile LONG *)(*(_DWORD *)v2 + 4)) && v5 )
        (**v5)(1);
      *(_DWORD *)v2 = 0;
    }
    v2 += 4;
    --v6;
  }
  while ( v6 );
  v3 = v1->m_pStartEffect.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_pStartEffect.m_pObject = 0;
  }
  v4 = v1->m_pRunEffect.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->m_pRunEffect.m_pObject = 0;
  }
  *(_DWORD *)&v1->m_uiOnLightIdx[0] = 0;
  *(_DWORD *)&v1->m_uiOnLightIdx[2] = 0;
  v1->m_pkDiceRollEffect = 0;
  v1->m_pkChipThrowEff = 0;
  v1->m_pkRewardEff = 0;
  v1->m_pkDiceUpEff[0] = 0;
  v1->m_pkDiceUpEff[1] = 0;
  v1->m_pkDiceUpEff[2] = 0;
}
// 98C1A4: using guessed type int (__thiscall *PgTList<PgWinSpr *>::`vftable')(void *p, char);
// 9CCEE8: using guessed type void (__thiscall *GambleDiceGameWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CCF04: using guessed type int (__thiscall *GambleDiceGameWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00717890) --------------------------------------------------------
void __thiscall GambleDiceGameWin::~GambleDiceGameWin(GambleDiceGameWin *this)
{
  GambleDiceGameWin *v1; // esi@1
  NiNode *v2; // edi@1
  NiNode *v3; // edi@6
  SpEffect *v4; // edi@11
  NiNode *v5; // ebx@12
  MHChipEffect *v6; // edi@17
  SpEffect *v7; // edi@19
  NiNode *v8; // ebx@20
  SpEffect *v9; // edi@26
  NiNode *v10; // ebx@27
  MHChipEffect *v11; // edi@34
  NiNode *v12; // ebx@35
  NiNode *v13; // ebx@40
  NiNode *v14; // edi@46
  PgWinText *v15; // edi@50
  int v16; // edi@54
  NiTListItem<PgWinSpr *> **v17; // ebx@54
  NiTListItem<PgWinSpr *> **v18; // ST0C_4@55
  PgSprData *v19; // edi@56
  PgSprData *v20; // edi@60
  PgSprData *v21; // edi@64
  PgSprData *v22; // edi@68
  PgSprData *v23; // edi@72
  PgSprData *v24; // edi@76
  NiNode *v25; // edi@80
  NiNode *v26; // edi@84
  PgWinText *v27; // edi@88
  NiNode *v28; // edi@92
  PgWinSpr *v29; // edi@96
  PgWinSpr *v30; // edi@100
  PgWinSpr *v31; // edi@104
  signed int v32; // [sp+18h] [bp-14h]@25
  signed int v33; // [sp+18h] [bp-14h]@33
  SpEffect **v34; // [sp+1Ch] [bp-10h]@25
  MHChipEffect **v35; // [sp+1Ch] [bp-10h]@33

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&GambleDiceGameWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GambleDiceGameWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_pStartEffect.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_pStartEffect.m_pObject = 0;
  }
  v3 = v1->m_pRunEffect.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_pRunEffect.m_pObject = 0;
  }
  v4 = v1->m_pkDiceRollEffect;
  if ( v4 )
  {
    NsEffect::~NsEffect(&v4->m_kEffect);
    ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v4->m_kMarkCheck);
    v5 = v4->m_spEffect.m_pObject;
    if ( v4->m_spEffect.m_pObject && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    operator delete(v4);
  }
  v6 = v1->m_pkChipThrowEff;
  if ( v6 )
  {
    MHChipEffect::~MHChipEffect(v1->m_pkChipThrowEff);
    operator delete(v6);
  }
  v7 = v1->m_pkRewardEff;
  if ( v7 )
  {
    NsEffect::~NsEffect(&v7->m_kEffect);
    ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v7->m_kMarkCheck);
    v8 = v7->m_spEffect.m_pObject;
    if ( v7->m_spEffect.m_pObject && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    operator delete(v7);
  }
  v34 = v1->m_pkResultEffectList;
  v32 = 10;
  do
  {
    v9 = *v34;
    if ( *v34 )
    {
      NsEffect::~NsEffect(&v9->m_kEffect);
      ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v9->m_kMarkCheck);
      v10 = v9->m_spEffect.m_pObject;
      if ( v9->m_spEffect.m_pObject && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
      operator delete(v9);
    }
    ++v34;
    --v32;
  }
  while ( v32 );
  v35 = v1->m_pkDiceUpEff;
  v33 = 3;
  do
  {
    v11 = *v35;
    if ( *v35 )
    {
      v12 = v11->m_spEffect.m_pObject;
      if ( v11->m_spEffect.m_pObject )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
          v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
        v11->m_spEffect.m_pObject = 0;
      }
      NsEffect::~NsEffect(&v11->m_kEffect);
      ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v11->m_kMarkCheck);
      v13 = v11->m_spEffect.m_pObject;
      if ( v11->m_spEffect.m_pObject && !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) && v13 )
        v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
      operator delete(v11);
    }
    ++v35;
    --v33;
  }
  while ( v33 );
  v14 = v1->m_pBigpotEff.m_pObject;
  if ( v14 && !InterlockedDecrement((volatile LONG *)&v14->m_uiRefCount) && v14 )
    v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
  v15 = v1->m_spTimeCountText.m_pObject;
  if ( v15 && !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) && v15 )
    v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
  `eh vector destructor iterator'(
    v1->m_spResultDice,
    4u,
    3,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_spResultDicePos,
    4u,
    3,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_pkChipSelectBut,
    4u,
    5,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v16 = (int)&v1->m_kHistoryList;
  v1->m_kHistoryList.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>Vtbl *)&PgTList<PgWinSpr *>::`vftable';
  v17 = &v1->m_kHistoryList.m_pkHead->m_pkNext;
  while ( v17 )
  {
    v18 = v17;
    v17 = (NiTListItem<PgWinSpr *> **)*v17;
    (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v16 + 8))(&v1->m_kHistoryList, v18);
  }
  v1->m_kHistoryList.m_kAllocator.m_uiCount = 0;
  v1->m_kHistoryList.m_pkHead = 0;
  v1->m_kHistoryList.m_pkTail = 0;
  *(_DWORD *)v16 = &NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`vftable';
  `eh vector destructor iterator'(
    v1->m_spResultDiceNum,
    4u,
    6,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_spDiceNum,
    4u,
    6,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_spHistroyPos,
    4u,
    21,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v19 = v1->m_spMaxChip.m_pObject;
  if ( v19 && !InterlockedDecrement((volatile LONG *)&v19->m_uiRefCount) && v19 )
    v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
  v20 = v1->m_spGoldChip.m_pObject;
  if ( v20 && !InterlockedDecrement((volatile LONG *)&v20->m_uiRefCount) && v20 )
    v20->vfptr->__vecDelDtor((NiRefObject *)v20, 1u);
  v21 = v1->m_sp100SilverChip.m_pObject;
  if ( v21 && !InterlockedDecrement((volatile LONG *)&v21->m_uiRefCount) && v21 )
    v21->vfptr->__vecDelDtor((NiRefObject *)v21, 1u);
  v22 = v1->m_sp10SilverChip.m_pObject;
  if ( v22 && !InterlockedDecrement((volatile LONG *)&v22->m_uiRefCount) && v22 )
    v22->vfptr->__vecDelDtor((NiRefObject *)v22, 1u);
  v23 = v1->m_sp1SilverChip.m_pObject;
  if ( v23 && !InterlockedDecrement((volatile LONG *)&v23->m_uiRefCount) && v23 )
    v23->vfptr->__vecDelDtor((NiRefObject *)v23, 1u);
  v24 = v1->m_sp100CooperChip.m_pObject;
  if ( v24 && !InterlockedDecrement((volatile LONG *)&v24->m_uiRefCount) && v24 )
    v24->vfptr->__vecDelDtor((NiRefObject *)v24, 1u);
  `eh vector destructor iterator'(
    v1->m_spMyBetNumSpr,
    4u,
    12,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_spMyMoney,
    4u,
    12,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_spShareNumSpr,
    4u,
    7,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_spShareMoney,
    4u,
    7,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_spBetNumSpr,
    4u,
    7,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_spBetMoney,
    4u,
    7,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_spChips,
    4u,
    52,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_spBettingBut,
    4u,
    52,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_spHistory,
    4u,
    21,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  `eh vector destructor iterator'(
    v1->m_spNumTex,
    4u,
    10,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v25 = v1->m_pRunEffect.m_pObject;
  if ( v25 && !InterlockedDecrement((volatile LONG *)&v25->m_uiRefCount) && v25 )
    v25->vfptr->__vecDelDtor((NiRefObject *)v25, 1u);
  v26 = v1->m_EffectPos.m_pObject;
  if ( v26 && !InterlockedDecrement((volatile LONG *)&v26->m_uiRefCount) && v26 )
    v26->vfptr->__vecDelDtor((NiRefObject *)v26, 1u);
  `eh vector destructor iterator'(v1->m_AniActor, 0xCu, 3, (void (__thiscall *)(void *))mhObjAniActor::~mhObjAniActor);
  `eh vector destructor iterator'(v1->m_pkDice, 0x2Cu, 3, (void (__thiscall *)(void *))ResElement::~ResElement);
  `eh vector destructor iterator'(
    v1->m_spLightSpr,
    4u,
    32,
    (void (__thiscall *)(void *))NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>);
  v27 = v1->m_spTitleText.m_pObject;
  if ( v27 && !InterlockedDecrement((volatile LONG *)&v27->m_uiRefCount) && v27 )
    v27->vfptr->__vecDelDtor((NiRefObject *)v27, 1u);
  v28 = v1->m_pStartEffect.m_pObject;
  if ( v28 && !InterlockedDecrement((volatile LONG *)&v28->m_uiRefCount) && v28 )
    v28->vfptr->__vecDelDtor((NiRefObject *)v28, 1u);
  v29 = v1->m_spTimerBack.m_pObject;
  if ( v29 && !InterlockedDecrement((volatile LONG *)&v29->m_uiRefCount) && v29 )
    v29->vfptr->__vecDelDtor((NiRefObject *)v29, 1u);
  v30 = v1->m_spTimerFill.m_pObject;
  if ( v30 && !InterlockedDecrement((volatile LONG *)&v30->m_uiRefCount) && v30 )
    v30->vfptr->__vecDelDtor((NiRefObject *)v30, 1u);
  v31 = v1->m_spTimer.m_pObject;
  if ( v31 && !InterlockedDecrement((volatile LONG *)&v31->m_uiRefCount) && v31 )
    v31->vfptr->__vecDelDtor((NiRefObject *)v31, 1u);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 98C02C: using guessed type int (__thiscall *NiTListBase<NiTPointerAllocator<unsigned int>,PgWinSpr *>::`vftable')(void *p, char);
// 98C1A4: using guessed type int (__thiscall *PgTList<PgWinSpr *>::`vftable')(void *p, char);
// 9CCEE8: using guessed type void (__thiscall *GambleDiceGameWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CCF04: using guessed type int (__thiscall *GambleDiceGameWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00717FB0) --------------------------------------------------------
BettingBut *__cdecl BettingBut::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, int Pos, char *pcName, unsigned int uiExtStyle)
{
  PgWin *v8; // eax@1
  PgWin *v9; // esi@1
  PgWin *v10; // edi@8
  BettingBut *v11; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v13; // [sp+20h] [bp-4h]@1

  v8 = (PgWin *)operator new(0x174u);
  v9 = v8;
  result.m_pObject = v8;
  v13 = 0;
  if ( v8 )
  {
    PgWinBut::PgWinBut((PgWinBut *)v8);
    v9->vfptr = (NiRefObjectVtbl *)&BettingBut::`vftable'{for `NiNode'};
    v9->vfptr = (IDirectMessengerVtbl *)&BettingBut::`vftable'{for `IDirectMessenger'};
    v9[1].m_kLocal.m_Rotate.m_pEntry[1][1] = 0.0;
    v9[1].m_kLocal.m_Rotate.m_pEntry[1][2] = 0.0;
    v9[1].m_kLocal.m_Rotate.m_pEntry[2][0] = 0.0;
    LODWORD(v9[1].m_kWorldBound.m_kCenter.x) = 0;
  }
  else
  {
    v9 = 0;
  }
  if ( v9 )
    InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  v13 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v9);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgSprData *, PgWin *, unsigned int, int, char *, unsigned int))v9->vfptr[141].__vecDelDtor)(
                          v9,
                          iXPos,
                          iYPos,
                          pkSprData,
                          pkParent,
                          uiCmdMsg,
                          Pos,
                          pcName,
                          uiExtStyle) )
  {
    ((void (__thiscall *)(PgWin *))v9->vfptr[89].__vecDelDtor)(v9);
    v13 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v11 = (BettingBut *)v9;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v9);
    if ( result.m_pObject )
    {
      v10 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v10 )
          v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
      }
    }
    v13 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v11 = 0;
  }
  return v11;
}
// 9CBEB0: using guessed type void (__thiscall *BettingBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CBECC: using guessed type int (__thiscall *BettingBut::`vftable'{for `NiNode'})(void *p, char);

//----- (00718120) --------------------------------------------------------
ToggleBut *__cdecl ToggleBut::CreateWin(int iXPos, int iYPos, PgSprData *pkSprData, PgWin *pkParent, unsigned int uiCmdMsg, int Pos, char *pcName, unsigned int uiExtStyle)
{
  PgWin *v8; // eax@1
  PgWin *v9; // esi@1
  PgWin *v10; // edi@8
  ToggleBut *v11; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v13; // [sp+20h] [bp-4h]@1

  v8 = (PgWin *)operator new(0x148u);
  v9 = v8;
  result.m_pObject = v8;
  v13 = 0;
  if ( v8 )
  {
    PgWinBut::PgWinBut((PgWinBut *)v8);
    v9->vfptr = (NiRefObjectVtbl *)&ToggleBut::`vftable'{for `NiNode'};
    v9->vfptr = (IDirectMessengerVtbl *)&ToggleBut::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v9 = 0;
  }
  if ( v9 )
    InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  v13 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v9);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, int, int, PgSprData *, PgWin *, unsigned int, int, char *, unsigned int))v9->vfptr[140].__vecDelDtor)(
                          v9,
                          iXPos,
                          iYPos,
                          pkSprData,
                          pkParent,
                          uiCmdMsg,
                          Pos,
                          pcName,
                          uiExtStyle) )
  {
    ((void (__thiscall *)(PgWin *))v9->vfptr[89].__vecDelDtor)(v9);
    v13 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v11 = (ToggleBut *)v9;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v9);
    if ( result.m_pObject )
    {
      v10 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v10 )
          v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
      }
    }
    v13 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v11 = 0;
  }
  return v11;
}
// 9CC108: using guessed type void (__thiscall *ToggleBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CC124: using guessed type int (__thiscall *ToggleBut::`vftable'{for `NiNode'})(void *p, char);

//----- (00718280) --------------------------------------------------------
MiniHouseDiceGameWin *__cdecl MiniHouseDiceGameWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  MiniHouseDiceGameWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x6F8u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    MiniHouseDiceGameWin::MiniHouseDiceGameWin((MiniHouseDiceGameWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (MiniHouseDiceGameWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (007183B0) --------------------------------------------------------
NiDX92DBufferData *__thiscall MiniHouseDiceGameWin::MakeButton(MiniHouseDiceGameWin *this, NiAVObject *pkObject, const char *pcTriShapeName, int *iLeft, int *iTop, unsigned int uiCmdMsg, NiSourceTexture *pkTexture)
{
  signed int v7; // esi@1
  NiDX92DBufferData *v8; // eax@3
  NiDX92DBufferData *v9; // esi@3
  LONG (__stdcall *v10)(volatile LONG *); // ebx@9
  NiDX92DBufferData *v11; // edi@13
  NiDX92DBufferData *result; // eax@19
  int uiLeft; // [sp+14h] [bp-B0h]@1
  int uiTop; // [sp+18h] [bp-ACh]@1
  MiniHouseDiceGameWin *v15; // [sp+1Ch] [bp-A8h]@1
  int v16; // [sp+20h] [bp-A4h]@3
  int v17; // [sp+24h] [bp-A0h]@3
  unsigned int v18; // [sp+28h] [bp-9Ch]@1
  PgSprData *pkSprData; // [sp+2Ch] [bp-98h]@1
  NiPointer<NiDX92DBufferData> element; // [sp+30h] [bp-94h]@3
  char acNodeName[128]; // [sp+34h] [bp-90h]@2
  int v22; // [sp+C0h] [bp-4h]@3

  v18 = uiCmdMsg;
  v15 = this;
  pkSprData = PgSprData::Create(pkObject, pcTriShapeName, &uiLeft, &uiTop, pkTexture);
  v7 = 2;
  do
  {
    memset(acNodeName, 0, 0x80u);
    sprintf(acNodeName, "%s%.2d", pcTriShapeName, v7);
    PgSprData::Add(pkSprData, pkObject, acNodeName);
    ++v7;
  }
  while ( v7 < 5 );
  v17 = uiTop;
  v16 = uiLeft;
  v8 = (NiDX92DBufferData *)operator new(0x174u);
  v9 = v8;
  element.m_pObject = v8;
  v22 = 0;
  if ( v8 )
  {
    PgWinBut::PgWinBut((PgWinBut *)v8);
    v9->vfptr = (NiRefObjectVtbl *)&BettingBut::`vftable'{for `NiNode'};
    v9[11].m_pkSurface = (IDirect3DSurface9 *)&BettingBut::`vftable'{for `IDirectMessenger'};
    *(float *)&v9[17].m_pkPixelFormat = 0.0;
    *(float *)&v9[18].vfptr = 0.0;
    *(float *)&v9[18].m_uiRefCount = 0.0;
    v9[16].m_uiRefCount = 0;
  }
  else
  {
    v9 = 0;
  }
  if ( v9 )
    InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  v22 = 1;
  if ( v9 )
  {
    element.m_pObject = v9;
    InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
    LOBYTE(v22) = 2;
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(&stru_B6481C, &element);
    v10 = InterlockedDecrement;
    LOBYTE(v22) = 1;
    if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
  }
  else
  {
    v10 = InterlockedDecrement;
  }
  if ( (unsigned __int8)((int (__thiscall *)(NiDX92DBufferData *, int, int, PgSprData *, MiniHouseDiceGameWin *, unsigned int, _DWORD, _DWORD, _DWORD))v9->vfptr[141].__vecDelDtor)(
                          v9,
                          v16,
                          v17,
                          pkSprData,
                          v15,
                          v18,
                          0,
                          0,
                          0) )
  {
    ((void (__thiscall *)(NiDX92DBufferData *))v9->vfptr[89].__vecDelDtor)(v9);
    v22 = -1;
    if ( !v10((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    result = v9;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, (NiPointer<PgWin> *)&element, (PgWin *)v9);
    v11 = element.m_pObject;
    if ( element.m_pObject && !v10((volatile LONG *)&element.m_pObject->m_uiRefCount) && v11 )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    v22 = -1;
    if ( !v10((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    result = 0;
  }
  return result;
}
// 9CBEB0: using guessed type void (__thiscall *BettingBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CBECC: using guessed type int (__thiscall *BettingBut::`vftable'{for `NiNode'})(void *p, char);

//----- (00718610) --------------------------------------------------------
mhMinimizeDiceGameWin *__cdecl mhMinimizeDiceGameWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  mhMinimizeDiceGameWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x15Cu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&mhMinimizeDiceGameWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&mhMinimizeDiceGameWin::`vftable'{for `IDirectMessenger'};
    LOBYTE(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (mhMinimizeDiceGameWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9CC35C: using guessed type void (__thiscall *mhMinimizeDiceGameWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CC37C: using guessed type int (__thiscall *mhMinimizeDiceGameWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00718760) --------------------------------------------------------
mhDiceHelpWin *__cdecl mhDiceHelpWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  mhDiceHelpWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x160u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&mhDiceHelpWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&mhDiceHelpWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (mhDiceHelpWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9CC5A0: using guessed type void (__thiscall *mhDiceHelpWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CC5BC: using guessed type int (__thiscall *mhDiceHelpWin::`vftable'{for `NiNode'})(void *p, char);

//----- (007188A0) --------------------------------------------------------
MHDiceRewardMoneyWin *__cdecl MHDiceRewardMoneyWin::CreateWin(PgFrameWork *pkFrameWork, int IsRewardWin)
{
  PgWin *v2; // eax@1
  PgWin *v3; // eax@2
  PgWin *v4; // esi@2
  PgWin *v5; // edi@8
  MHDiceRewardMoneyWin *v6; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v8; // [sp+20h] [bp-4h]@1

  v2 = (PgWin *)operator new(0x190u);
  result.m_pObject = v2;
  v8 = 0;
  if ( v2 )
  {
    MHDiceRewardMoneyWin::MHDiceRewardMoneyWin((MHDiceRewardMoneyWin *)v2);
    v4 = v3;
  }
  else
  {
    v4 = 0;
  }
  if ( v4 )
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  v8 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v4);
  if ( (unsigned __int8)((int (__thiscall *)(PgWin *, PgFrameWork *, int))v4->vfptr[135].__vecDelDtor)(
                          v4,
                          pkFrameWork,
                          IsRewardWin) )
  {
    ((void (__thiscall *)(PgWin *))v4->vfptr[89].__vecDelDtor)(v4);
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = (MHDiceRewardMoneyWin *)v4;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v4);
    if ( result.m_pObject )
    {
      v5 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    v8 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v6 = 0;
  }
  return v6;
}

//----- (007189D0) --------------------------------------------------------
mhDiceRateSheetWin *__cdecl mhDiceRateSheetWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  mhDiceRateSheetWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x158u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&mhDiceRateSheetWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&mhDiceRateSheetWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (mhDiceRateSheetWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9CC7E0: using guessed type void (__thiscall *mhDiceRateSheetWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CC7FC: using guessed type int (__thiscall *mhDiceRateSheetWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00718B10) --------------------------------------------------------
GambleDiceGameWin *__cdecl GambleDiceGameWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  GambleDiceGameWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x6F8u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    GambleDiceGameWin::GambleDiceGameWin((GambleDiceGameWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (GambleDiceGameWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (00718C40) --------------------------------------------------------
NiDX92DBufferData *__thiscall GambleDiceGameWin::MakeButton(GambleDiceGameWin *this, NiAVObject *pkObject, const char *pcTriShapeName, int *iLeft, int *iTop, unsigned int uiCmdMsg, NiSourceTexture *pkTexture)
{
  signed int v7; // esi@1
  NiDX92DBufferData *v8; // eax@3
  NiDX92DBufferData *v9; // esi@3
  LONG (__stdcall *v10)(volatile LONG *); // ebx@9
  NiDX92DBufferData *v11; // edi@13
  NiDX92DBufferData *result; // eax@19
  int uiLeft; // [sp+14h] [bp-B0h]@1
  int uiTop; // [sp+18h] [bp-ACh]@1
  GambleDiceGameWin *v15; // [sp+1Ch] [bp-A8h]@1
  int v16; // [sp+20h] [bp-A4h]@3
  int v17; // [sp+24h] [bp-A0h]@3
  unsigned int v18; // [sp+28h] [bp-9Ch]@1
  PgSprData *pkSprData; // [sp+2Ch] [bp-98h]@1
  NiPointer<NiDX92DBufferData> element; // [sp+30h] [bp-94h]@3
  char acNodeName[128]; // [sp+34h] [bp-90h]@2
  int v22; // [sp+C0h] [bp-4h]@3

  v18 = uiCmdMsg;
  v15 = this;
  pkSprData = PgSprData::Create(pkObject, pcTriShapeName, &uiLeft, &uiTop, pkTexture);
  v7 = 2;
  do
  {
    memset(acNodeName, 0, 0x80u);
    sprintf(acNodeName, "%s%.2d", pcTriShapeName, v7);
    PgSprData::Add(pkSprData, pkObject, acNodeName);
    ++v7;
  }
  while ( v7 < 5 );
  v17 = uiTop;
  v16 = uiLeft;
  v8 = (NiDX92DBufferData *)operator new(0x174u);
  v9 = v8;
  element.m_pObject = v8;
  v22 = 0;
  if ( v8 )
  {
    PgWinBut::PgWinBut((PgWinBut *)v8);
    v9->vfptr = (NiRefObjectVtbl *)&BettingBut::`vftable'{for `NiNode'};
    v9[11].m_pkSurface = (IDirect3DSurface9 *)&BettingBut::`vftable'{for `IDirectMessenger'};
    *(float *)&v9[17].m_pkPixelFormat = 0.0;
    *(float *)&v9[18].vfptr = 0.0;
    *(float *)&v9[18].m_uiRefCount = 0.0;
    v9[16].m_uiRefCount = 0;
  }
  else
  {
    v9 = 0;
  }
  if ( v9 )
    InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  v22 = 1;
  if ( v9 )
  {
    element.m_pObject = v9;
    InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
    LOBYTE(v22) = 2;
    NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiPointer<NSBShader>>::AddTail(&stru_B6481C, &element);
    v10 = InterlockedDecrement;
    LOBYTE(v22) = 1;
    if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
  }
  else
  {
    v10 = InterlockedDecrement;
  }
  if ( (unsigned __int8)((int (__thiscall *)(NiDX92DBufferData *, int, int, PgSprData *, GambleDiceGameWin *, unsigned int, _DWORD, _DWORD, _DWORD))v9->vfptr[141].__vecDelDtor)(
                          v9,
                          v16,
                          v17,
                          pkSprData,
                          v15,
                          v18,
                          0,
                          0,
                          0) )
  {
    ((void (__thiscall *)(NiDX92DBufferData *))v9->vfptr[89].__vecDelDtor)(v9);
    v22 = -1;
    if ( !v10((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    result = v9;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, (NiPointer<PgWin> *)&element, (PgWin *)v9);
    v11 = element.m_pObject;
    if ( element.m_pObject && !v10((volatile LONG *)&element.m_pObject->m_uiRefCount) && v11 )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    v22 = -1;
    if ( !v10((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    result = 0;
  }
  return result;
}
// 9CBEB0: using guessed type void (__thiscall *BettingBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CBECC: using guessed type int (__thiscall *BettingBut::`vftable'{for `NiNode'})(void *p, char);

//----- (00718EA0) --------------------------------------------------------
char __thiscall MHDiceRewardMoneyWin::Create(MHDiceRewardMoneyWin *this, PgFrameWork *pkFrameWork, int IsRewardWin)
{
  MHDiceRewardMoneyWin *v3; // esi@1
  NiSourceTexture *v4; // edi@1
  const char *v6; // eax@9
  PgSprData *v7; // eax@10
  PgSprData *v8; // ebx@13
  NiD3DDefaultShader *v9; // eax@13
  PgWinBut *v10; // ebx@13
  PgWin *v11; // ST64_4@13
  PgFont *v12; // ST60_4@13
  unsigned int v13; // ST5C_4@13
  unsigned int v14; // eax@13
  NiTexturePalette **v15; // ebx@13
  NiUnsharedGeometryGroup *v16; // eax@13
  PgSprData *v17; // ebx@13
  PgWinBut *v18; // ebx@13
  PgFont *v19; // ST64_4@13
  unsigned int v20; // ST60_4@13
  unsigned int v21; // eax@13
  PgWinText *v22; // ebx@13
  NiTexturePalette *v23; // edx@13
  PgSprData *v24; // ebx@15
  NiD3DDefaultShader *v25; // eax@15
  PgWinBut *v26; // ebx@15
  PgWin *v27; // ST64_4@15
  PgFont *v28; // ST60_4@15
  unsigned int v29; // ST5C_4@15
  unsigned int v30; // eax@15
  PgWinBut *v31; // eax@16
  PgWinBut *v32; // eax@16
  PgWinBut *v33; // eax@16
  PgWinBut *v34; // eax@16
  char v35; // bl@16
  PgSprData *v36; // eax@16
  PgFont *v37; // eax@17
  NiD3DDefaultShader *v38; // eax@17
  char v39; // bl@18
  PgSprData *v40; // eax@18
  PgFont *v41; // eax@19
  NiD3DDefaultShader *v42; // eax@19
  char v43; // bl@20
  PgSprData *v44; // eax@20
  PgFont *v45; // eax@21
  NiD3DDefaultShader *v46; // eax@21
  char v47; // bl@22
  PgSprData *v48; // eax@22
  PgFont *v49; // eax@23
  NiD3DDefaultShader *v50; // eax@23
  PgSprData *v51; // eax@24
  PgWinSpr *v52; // ebx@24
  PgFont *v53; // ST60_4@24
  unsigned int v54; // ST5C_4@24
  unsigned int v55; // eax@24
  NiD3DDefaultShader *v56; // eax@24
  NiUnsharedGeometryGroup *v57; // eax@25
  NiUnsharedGeometryGroup *v58; // eax@25
  NiUnsharedGeometryGroup *v59; // eax@25
  void *v60; // eax@25
  PgSprData *v61; // eax@28
  PgWinSpr *v62; // ST64_4@28
  PgFont *v63; // ST60_4@28
  unsigned int v64; // ST5C_4@28
  unsigned int v65; // eax@28
  NiD3DDefaultShader *v66; // eax@28
  NiRefObjectVtbl *v67; // edi@28
  NiUnsharedGeometryGroup *v68; // eax@28
  NiNode *v69; // esi@29
  UIUtil ui; // [sp+80h] [bp-58h]@16
  unsigned int uiWidth; // [sp+94h] [bp-44h]@16
  unsigned int uiHeight; // [sp+98h] [bp-40h]@16
  NiTexturePalette *pTexturePalette; // [sp+9Ch] [bp-3Ch]@7
  int uiLeft; // [sp+A0h] [bp-38h]@10
  int uiTop; // [sp+A4h] [bp-34h]@10
  NiPointer<NiNode> spNode; // [sp+A8h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strText; // [sp+ACh] [bp-2Ch]@25
  int v78; // [sp+D4h] [bp-4h]@1

  v3 = this;
  spNode.m_pObject = 0;
  v78 = 0;
  v4 = MenuTexMgr::GetTexture(4u);
  if ( !v4 )
  {
    v78 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( spNode.m_pObject )
        spNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spNode.m_pObject, 1u);
    }
    return 0;
  }
  pTexturePalette = ::pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v6 = Folder::Merge(&Folder::m_acMenu, "Game\\DiceGameReport.nif");
  PgUtil::LoadNodeNifFile(v6, &spNode, pTexturePalette);
  if ( !spNode.m_pObject )
    return 0;
  v7 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane01", &uiLeft, &uiTop, v4);
  v3->m_IsRewardWin = IsRewardWin != 0;
  if ( IsRewardWin )
  {
    if ( !PgWinFrame::Create((PgWinFrame *)&v3->vfptr, 0, 0, v7, 0, pkFrameWork, "MHDiceRewardMoneyWin", 0) )
    {
LABEL_12:
      v78 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      return 0;
    }
    v8 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Nor", &uiLeft, &uiTop, v4);
    PgSprData::Add(v8, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Click");
    PgSprData::Add(v8, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn01Over");
    v9 = (NiD3DDefaultShader *)PgWinBut::CreateWin(uiLeft, uiTop, v8, (PgWin *)&v3->vfptr, 0, 0, 0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_pkOkBut, v9);
    v10 = v3->m_pkOkBut.m_pObject;
    v11 = (PgWin *)&v3->m_pkOkBut.m_pObject->vfptr;
    v12 = Font::Get(0);
    v13 = ((int (__thiscall *)(PgWinBut *))v10->vfptr[37].__vecDelDtor)(v10);
    v14 = ((int (__thiscall *)(PgWinBut *))v10->vfptr[36].__vecDelDtor)(v10);
    v15 = (NiTexturePalette **)PgWinText::CreateWin(0, 1, v14, v13, v12, v11, 0, 0);
    ((void (__thiscall *)(NiTexturePalette **, signed int))(*v15)[61].vfptr)(v15, 5);
    pTexturePalette = *v15;
    v16 = TextData2::Get(0x96947FE1);
    ((void (__thiscall *)(NiTexturePalette **, NiUnsharedGeometryGroup *))pTexturePalette[59].vfptr)(v15, v16);
    ((void (__thiscall *)(NiTexturePalette **, _DWORD))(*v15)[30].vfptr)(v15, 0);
    v17 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Nor", &uiLeft, &uiTop, v4);
    PgSprData::Add(v17, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Click");
    PgSprData::Add(v17, (NiAVObject *)&spNode.m_pObject->vfptr, "Btn02Over");
    v18 = PgWinBut::CreateWin(uiLeft, uiTop, v17, (PgWin *)&v3->vfptr, 1u, 0, 0);
    v19 = Font::Get(0);
    v20 = ((int (__thiscall *)(PgWinBut *))v18->vfptr[37].__vecDelDtor)(v18);
    v21 = ((int (__thiscall *)(PgWinBut *))v18->vfptr[36].__vecDelDtor)(v18);
    v22 = PgWinText::CreateWin(0, 1, v21, v20, v19, (PgWin *)&v18->vfptr, 0, 0);
    v22->vfptr[122].__vecDelDtor((NiRefObject *)v22, 5u);
    pTexturePalette = (NiTexturePalette *)v22->vfptr;
    TextData2::Get(0x8C94D3E2);
    v23 = pTexturePalette;
  }
  else
  {
    if ( !PgWinFrame::Create((PgWinFrame *)&v3->vfptr, 0, 0, v7, 0, pkFrameWork, "MHDiceExpectMoneyWin", 0) )
      goto LABEL_12;
    v24 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "OKNor", &uiLeft, &uiTop, v4);
    PgSprData::Add(v24, (NiAVObject *)&spNode.m_pObject->vfptr, "OKClick");
    PgSprData::Add(v24, (NiAVObject *)&spNode.m_pObject->vfptr, "OKOver");
    v25 = (NiD3DDefaultShader *)PgWinBut::CreateWin(uiLeft, uiTop, v24, (PgWin *)&v3->vfptr, 2u, 0, 0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_pkOkBut, v25);
    v26 = v3->m_pkOkBut.m_pObject;
    v27 = (PgWin *)&v3->m_pkOkBut.m_pObject->vfptr;
    v28 = Font::Get(0);
    v29 = ((int (__thiscall *)(PgWinBut *))v26->vfptr[37].__vecDelDtor)(v26);
    v30 = ((int (__thiscall *)(PgWinBut *))v26->vfptr[36].__vecDelDtor)(v26);
    v22 = PgWinText::CreateWin(0, 1, v30, v29, v28, v27, 0, 0);
    v22->vfptr[122].__vecDelDtor((NiRefObject *)v22, 5u);
    pTexturePalette = (NiTexturePalette *)v22->vfptr;
    TextData::Get(0x4F5F499Fu);
    v23 = pTexturePalette;
  }
  ((void (__thiscall *)(PgWinText *))v23[59].vfptr)(v22);
  v22->vfptr[60].__vecDelDtor((NiRefObject *)v22, 0);
  UIUtil::UIUtil(&ui);
  LOBYTE(v78) = 1;
  UIUtil::SetOffset(&ui, 0, 0);
  UIUtil::SetParent(&ui, (PgWin *)&v3->vfptr);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v31 = UIUtil::CreateBtn(&ui, 0, "MyCopperBtn", "MyCopperBtn", "MyCopperBtn", "MyCopperBtn", v4);
  v31->vfptr[60].__vecDelDtor((NiRefObject *)v31, 0);
  v32 = UIUtil::CreateBtn(&ui, 0, "MySilverBtn", "MySilverBtn", "MySilverBtn", "MySilverBtn", v4);
  v32->vfptr[60].__vecDelDtor((NiRefObject *)v32, 0);
  v33 = UIUtil::CreateBtn(&ui, 0, "MyGoldBtn", "MyGoldBtn", "MyGoldBtn", "MyGoldBtn", v4);
  v33->vfptr[60].__vecDelDtor((NiRefObject *)v33, 0);
  v34 = UIUtil::CreateBtn(&ui, 0, "MyGemBtn", "MyGemBtn", "MyGemBtn", "MyGemBtn", v4);
  v34->vfptr[60].__vecDelDtor((NiRefObject *)v34, 0);
  v35 = PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "MyCopperInput",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight);
  v36 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MyCopperInput", &uiLeft, &uiTop, v4);
  PgWinSpr::CreateWin(uiLeft, uiTop, v36, (PgWin *)&v3->vfptr, 0, 0);
  if ( v35 )
  {
    v37 = Font::Get(0);
    v38 = (NiD3DDefaultShader *)PgWinText::CreateWin(
                                  uiLeft + 2,
                                  uiTop + 4,
                                  uiWidth,
                                  uiHeight,
                                  v37,
                                  (PgWin *)&v3->vfptr,
                                  0,
                                  0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_pkCopperText, v38);
    ((void (__stdcall *)(signed int))v3->m_pkCopperText.m_pObject->vfptr[122].__vecDelDtor)(5);
    ((void (__stdcall *)(void *))v3->m_pkCopperText.m_pObject->vfptr[118].__vecDelDtor)(&unk_9CA172);
    v3->m_pkCopperText.m_pObject->vfptr[60].__vecDelDtor((NiRefObject *)v3->m_pkCopperText.m_pObject, 0);
  }
  v39 = PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "MySilverInput",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight);
  v40 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MySilverInput", &uiLeft, &uiTop, v4);
  PgWinSpr::CreateWin(uiLeft, uiTop, v40, (PgWin *)&v3->vfptr, 0, 0);
  if ( v39 )
  {
    v41 = Font::Get(0);
    v42 = (NiD3DDefaultShader *)PgWinText::CreateWin(
                                  uiLeft + 2,
                                  uiTop + 4,
                                  uiWidth,
                                  uiHeight,
                                  v41,
                                  (PgWin *)&v3->vfptr,
                                  0,
                                  0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_pkSilverText, v42);
    ((void (__stdcall *)(signed int))v3->m_pkSilverText.m_pObject->vfptr[122].__vecDelDtor)(5);
    ((void (__stdcall *)(void *))v3->m_pkSilverText.m_pObject->vfptr[118].__vecDelDtor)(&unk_9CA173);
    v3->m_pkSilverText.m_pObject->vfptr[60].__vecDelDtor((NiRefObject *)v3->m_pkSilverText.m_pObject, 0);
  }
  v43 = PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "MyGoldInput",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight);
  v44 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MyGoldInput", &uiLeft, &uiTop, v4);
  PgWinSpr::CreateWin(uiLeft, uiTop, v44, (PgWin *)&v3->vfptr, 0, 0);
  if ( v43 )
  {
    v45 = Font::Get(0);
    v46 = (NiD3DDefaultShader *)PgWinText::CreateWin(
                                  uiLeft + 2,
                                  uiTop + 4,
                                  uiWidth,
                                  uiHeight,
                                  v45,
                                  (PgWin *)&v3->vfptr,
                                  0,
                                  0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_pkGoldText, v46);
    ((void (__stdcall *)(signed int))v3->m_pkGoldText.m_pObject->vfptr[122].__vecDelDtor)(5);
    ((void (__stdcall *)(void *))v3->m_pkGoldText.m_pObject->vfptr[118].__vecDelDtor)(&unk_9CA17F);
    v3->m_pkGoldText.m_pObject->vfptr[60].__vecDelDtor((NiRefObject *)v3->m_pkGoldText.m_pObject, 0);
  }
  v47 = PgUtil::GetTriShapeRect(
          (NiAVObject *)&spNode.m_pObject->vfptr,
          "MyGemInput",
          &uiLeft,
          &uiTop,
          &uiWidth,
          &uiHeight);
  v48 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MyGemInput", &uiLeft, &uiTop, v4);
  PgWinSpr::CreateWin(uiLeft, uiTop, v48, (PgWin *)&v3->vfptr, 0, 0);
  if ( v47 )
  {
    v49 = Font::Get(0);
    v50 = (NiD3DDefaultShader *)PgWinText::CreateWin(
                                  uiLeft + 2,
                                  uiTop + 4,
                                  uiWidth,
                                  uiHeight,
                                  v49,
                                  (PgWin *)&v3->vfptr,
                                  0,
                                  0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_pkGemText, v50);
    ((void (__stdcall *)(signed int))v3->m_pkGemText.m_pObject->vfptr[122].__vecDelDtor)(5);
    ((void (__stdcall *)(void *))v3->m_pkGemText.m_pObject->vfptr[118].__vecDelDtor)(&unk_9CA18F);
    v3->m_pkGemText.m_pObject->vfptr[60].__vecDelDtor((NiRefObject *)v3->m_pkGemText.m_pObject, 0);
  }
  v51 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextBox", &uiLeft, &uiTop, v4);
  v52 = PgWinSpr::CreateWin(uiLeft, uiTop, v51, (PgWin *)&v3->vfptr, 0, 0);
  v52->vfptr[60].__vecDelDtor((NiRefObject *)v52, 0);
  v53 = Font::Get(0);
  v54 = ((int (__thiscall *)(PgWinSpr *))v52->vfptr[37].__vecDelDtor)(v52);
  v55 = ((int (__thiscall *)(PgWinSpr *))v52->vfptr[36].__vecDelDtor)(v52);
  v56 = (NiD3DDefaultShader *)PgWinText::CreateWin(0, 1, v55, v54, v53, (PgWin *)&v52->vfptr, 0, 0);
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_pkTitleText1, v56);
  ((void (__stdcall *)(signed int))v3->m_pkTitleText1.m_pObject->vfptr[122].__vecDelDtor)(4);
  ((void (__stdcall *)(void *))v3->m_pkTitleText1.m_pObject->vfptr[118].__vecDelDtor)(&unk_9CA1B7);
  v3->m_pkTitleText1.m_pObject->vfptr[60].__vecDelDtor((NiRefObject *)v3->m_pkTitleText1.m_pObject, 0);
  if ( IsRewardWin )
  {
    v57 = TextData2::Get(0x96E6C0DE);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &strText,
      (const char *)v57);
    LOBYTE(v78) = 2;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
    v58 = TextData2::Get(0x889AABCD);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
      &strText,
      (const char *)v58,
      strlen((const char *)v58));
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
    v59 = TextData2::Get(0xA1737AE5);
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(
      &strText,
      (const char *)v59,
      strlen((const char *)v59));
    v60 = strText._Bx._Ptr;
    if ( strText._Myres < 0x10 )
      v60 = &strText;
    ((void (__stdcall *)(void *))v3->m_pkTitleText1.m_pObject->vfptr[118].__vecDelDtor)(v60);
    LOBYTE(v78) = 1;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&strText);
  }
  else
  {
    v61 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextBox01", &uiLeft, &uiTop, v4);
    v62 = PgWinSpr::CreateWin(uiLeft, uiTop, v61, (PgWin *)&v3->vfptr, 0, 0);
    v63 = Font::Get(0);
    v64 = ((int (__thiscall *)(PgWinSpr *))v62->vfptr[37].__vecDelDtor)(v62);
    v65 = ((int (__thiscall *)(PgWinSpr *))v62->vfptr[36].__vecDelDtor)(v62);
    v66 = (NiD3DDefaultShader *)PgWinText::CreateWin(0, 1, v65, v64, v63, (PgWin *)&v62->vfptr, 0, 0);
    NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v3->m_pkTitleText2, v66);
    ((void (__stdcall *)(signed int))v3->m_pkTitleText2.m_pObject->vfptr[122].__vecDelDtor)(5);
    v67 = v3->m_pkTitleText2.m_pObject->vfptr;
    pTexturePalette = (NiTexturePalette *)v3->m_pkTitleText2.m_pObject;
    v68 = TextData::Get(0x3B609389u);
    v67[118].__vecDelDtor((NiRefObject *)pTexturePalette, (unsigned int)v68);
    v3->m_pkTitleText2.m_pObject->vfptr[60].__vecDelDtor((NiRefObject *)v3->m_pkTitleText2.m_pObject, 0);
  }
  ((void (__thiscall *)(MHDiceRewardMoneyWin *, unsigned int, unsigned int, _DWORD, _DWORD))v3->vfptr[59].__vecDelDtor)(
    v3,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  LOBYTE(v78) = 0;
  UIUtil::~UIUtil(&ui);
  v69 = spNode.m_pObject;
  v78 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v69 )
    v69->vfptr->__vecDelDtor((NiRefObject *)v69, 1u);
  return 1;
}
// A8975C: using guessed type bool Folder::m_bInit;

//----- (007198E0) --------------------------------------------------------
char __thiscall MiniHouseDiceGameWin::Create(MiniHouseDiceGameWin *this, PgFrameWork *pkFrameWork)
{
  MiniHouseDiceGameWin *v2; // ebx@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiAVObject *v5; // eax@4
  NiTexturingProperty *v6; // eax@4
  NiTexturingProperty *v7; // edi@4
  NiTexturingProperty::Map *v8; // eax@6
  NiSourceTexture *v9; // eax@7
  NiNode *v10; // edi@10
  char v11; // al@14
  PgSprData *v12; // esi@15
  PgFrameWork *v13; // eax@15
  NiNode *v14; // esi@18
  int v15; // edi@23
  int v16; // esi@23
  NiD3DDefaultShader *v17; // eax@23
  NiD3DDefaultShader *v18; // eax@23
  PgWinSpr *v19; // eax@23
  NiD3DDefaultShader *v20; // eax@23
  int v21; // esi@23
  int v22; // ebx@23
  PgWinSpr *v23; // eax@24
  int v24; // edi@24
  PgWinSpr *v25; // esi@24
  signed int v26; // ebx@32
  PgSprData *v27; // edi@33
  int v28; // esi@33
  signed int v29; // edi@41
  char *v30; // esi@41
  NiDX92DBufferData *v31; // eax@42
  NiDX92DBufferData *v32; // ebx@42
  int v33; // eax@47
  NiDX92DBufferData *v34; // eax@49
  MiniHouseDiceGameWin *v35; // esi@50
  unsigned int v36; // ebx@50
  PgWinSpr *v37; // eax@51
  int v38; // esi@51
  PgWinSpr *v39; // edi@51
  PgWinSpr *v40; // eax@59
  PgWinSpr *v41; // esi@59
  char *v42; // eax@59
  PgWinSpr *v43; // esi@59
  char *v44; // eax@59
  PgWinSpr *v45; // esi@59
  char *v46; // eax@59
  PgSprData *v47; // eax@59
  MiniHouseDiceGameWin *v48; // ebx@59
  PgSprData *v49; // edi@59
  PgSprData *v50; // esi@59
  PgSprData *v51; // eax@66
  PgSprData *v52; // esi@66
  PgSprData *v53; // edi@66
  PgSprData *v54; // eax@73
  PgSprData *v55; // esi@73
  PgSprData *v56; // edi@73
  PgSprData *v57; // eax@80
  PgSprData *v58; // esi@80
  PgSprData *v59; // edi@80
  PgSprData *v60; // eax@87
  PgSprData *v61; // esi@87
  PgSprData *v62; // edi@87
  PgSprData *v63; // eax@94
  PgSprData *v64; // esi@94
  PgSprData *v65; // edi@94
  int v66; // ebx@101
  PgSprData *v67; // edi@102
  signed int v68; // esi@102
  NiPointer<PgSprData::PgHitTester> *v69; // eax@107
  int v70; // esi@107
  int v71; // edx@107
  char *v72; // ecx@107
  int v73; // eax@107
  int v74; // eax@107
  int v75; // eax@107
  int v76; // edx@107
  int v77; // eax@107
  int v78; // eax@107
  int v79; // eax@107
  int v80; // esi@108
  int v81; // eax@108
  int v82; // eax@108
  int v83; // edx@108
  int v84; // eax@108
  PgWinSpr *v85; // eax@109
  int v86; // esi@109
  PgWinSpr *v87; // edi@109
  PgSprData *v88; // esi@117
  MiniHouseDiceGameWin *v89; // edi@117
  char *v90; // esi@117
  PgWinSpr *v91; // eax@118
  PgWinSpr *v92; // ebx@118
  PgWinSpr *v93; // eax@126
  float v94; // ebx@126
  char *v95; // eax@131
  float *v96; // esi@134
  PgWinSpr *v97; // eax@135
  PgWinSpr *v98; // ebx@135
  PgWinSpr *v99; // eax@143
  float v100; // ebx@143
  char *v101; // eax@148
  PgSprData *v102; // esi@151
  float *v103; // esi@151
  PgWinSpr *v104; // eax@152
  PgWinSpr *v105; // ebx@152
  PgWinSpr *v106; // eax@160
  float v107; // ebx@160
  char *v108; // eax@165
  signed int v109; // ebx@168
  unsigned __int64 v110; // kr00_8@168
  int v111; // esi@169
  signed __int64 v112; // kr08_8@169
  int v113; // esi@174
  int v114; // ebx@175
  PgWinBut *v115; // esi@177
  char *v116; // eax@177
  PgWinBut *v117; // esi@177
  char *v118; // eax@177
  PgSprData *v119; // esi@177
  ToggleBut *v120; // eax@177
  ToggleBut *v121; // esi@177
  ToggleBut *v122; // ebx@177
  PgWin *v123; // esi@184
  NiUnsharedGeometryGroup *v124; // eax@184
  char *v125; // eax@184
  PgSprData *v126; // esi@184
  ToggleBut *v127; // eax@184
  ToggleBut *v128; // esi@184
  ToggleBut *v129; // ebx@184
  PgWin *v130; // esi@191
  NiUnsharedGeometryGroup *v131; // eax@191
  char *v132; // eax@191
  PgSprData *v133; // esi@191
  ToggleBut *v134; // eax@191
  ToggleBut *v135; // esi@191
  ToggleBut *v136; // ebx@191
  PgWin *v137; // esi@198
  NiUnsharedGeometryGroup *v138; // eax@198
  char *v139; // eax@198
  PgSprData *v140; // esi@198
  ToggleBut *v141; // eax@198
  ToggleBut *v142; // esi@198
  ToggleBut *v143; // ebx@198
  PgWin *v144; // esi@205
  NiUnsharedGeometryGroup *v145; // eax@205
  char *v146; // eax@205
  PgSprData *v147; // esi@205
  ToggleBut *v148; // eax@205
  ToggleBut *v149; // esi@205
  ToggleBut *v150; // ebx@205
  PgWin *v151; // esi@212
  NiUnsharedGeometryGroup *v152; // eax@212
  char *v153; // eax@212
  PgSprData *v154; // esi@212
  ToggleBut *v155; // eax@212
  ToggleBut *v156; // esi@212
  ToggleBut *v157; // ebx@212
  PgWin *v158; // esi@219
  char *v159; // eax@219
  int v160; // ebx@219
  int v161; // esi@220
  int (__thiscall *v162)(int); // eax@220
  ToggleBut *v163; // esi@223
  void *(__thiscall *v164)(NiRefObject *, unsigned int); // eax@223
  ToggleBut *v165; // ecx@223
  PgWinBut *v166; // eax@225
  PgWinBut *v167; // esi@225
  PgWinBut *v168; // ebx@225
  PgWinBut *v169; // esi@232
  char *v170; // eax@232
  PgSprData *v171; // esi@232
  int v172; // ebx@232
  float *v173; // esi@232
  PgWinSpr *v174; // eax@233
  PgWinSpr *v175; // ebx@233
  char *v176; // eax@238
  PgWinSpr *v177; // eax@240
  float v178; // ebx@240
  char *v179; // eax@245
  NiTexturingProperty *v180; // esi@249
  NiNode *v181; // esi@251
  PgFont *v182; // eax@255
  PgWinText *v183; // eax@255
  PgWinText *v184; // esi@255
  PgWinText *v185; // ebx@255
  NiTexturingProperty *v186; // esi@263
  NiNode *v187; // esi@265
  PgFont *v188; // eax@269
  PgWinText *v189; // eax@269
  PgWinText *v190; // esi@269
  PgWinText *v191; // ebx@269
  NiTexturingProperty *v192; // esi@277
  NiNode *v193; // esi@279
  PgFont *v194; // eax@283
  PgWinText *v195; // esi@283
  PgWinText *v196; // ebx@283
  int v197; // eax@291
  char v198; // cl@292
  char *v199; // eax@293
  char v200; // cl@294
  NiObjectNET *v201; // ebx@295
  SpEffect *v202; // esi@295
  NiNode *v203; // eax@296
  SpEffect *v204; // eax@296
  NiNode *v205; // ecx@298
  int v206; // eax@300
  char v207; // cl@301
  char *v208; // eax@302
  char v209; // cl@303
  NiObjectNET *v210; // eax@304
  NiNode *v211; // esi@304
  NiNode *v212; // ebx@304
  int v213; // eax@313
  char v214; // cl@314
  char *v215; // eax@315
  char v216; // cl@316
  NiObjectNET *v217; // ebx@317
  void *v218; // esi@317
  int v219; // ebx@318
  int v220; // eax@323
  int v221; // esi@327
  int v222; // eax@329
  char v223; // cl@330
  char *v224; // eax@331
  char v225; // cl@332
  NiObjectNET *v226; // ebx@333
  SpEffect *v227; // esi@333
  NiNode *v228; // eax@334
  SpEffect *v229; // eax@334
  NiNode *v230; // eax@336
  NiMatrix3 *v231; // ecx@336
  int v232; // eax@338
  char v233; // cl@339
  char *v234; // eax@340
  char v235; // cl@341
  NiObjectNET *v236; // eax@342
  NiNode *v237; // esi@342
  NiNode *v238; // ebx@342
  int v239; // eax@351
  char v240; // cl@352
  char *v241; // eax@353
  char v242; // cl@354
  SpEffect **v243; // esi@355
  SpEffect *v244; // ebx@356
  NiNode *v245; // eax@357
  SpEffect *v246; // eax@357
  bool v247; // zf@359
  int v248; // eax@362
  char v249; // cl@363
  char *v250; // eax@364
  char v251; // cl@365
  void *v252; // esi@367
  int v253; // ebx@368
  int v254; // eax@373
  int v255; // eax@377
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v256; // eax@380
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v257; // esi@380
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v258; // eax@391
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v259; // eax@395
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v260; // esi@395
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v261; // eax@406
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v262; // eax@410
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v263; // esi@410
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v264; // eax@421
  MiniHouseDiceGameWin *v265; // ebx@423
  int v266; // ebx@423
  int v267; // eax@426
  int v268; // eax@430
  int v269; // edx@432
  int v270; // ecx@432
  MiniHouseDiceGameWin *v271; // edx@432
  int v272; // eax@434
  int v273; // ecx@436
  int v274; // eax@438
  MiniHouseDiceGameWin *v275; // ecx@441
  NiRefObjectVtbl *v276; // edx@441
  void *(__thiscall *v277)(NiRefObject *, unsigned int); // edx@441
  NiTexturingProperty *v278; // esi@447
  NiNode *v279; // esi@449
  int v280; // [sp+124h] [bp-270h]@107
  PgSprData *fAngle; // [sp+128h] [bp-26Ch]@107
  MiniHouseDiceGameWin *fAngle_4; // [sp+12Ch] [bp-268h]@107
  int iTop; // [sp+148h] [bp-24Ch]@102
  NiPointer<NiTexturingProperty> spTexProp; // [sp+14Ch] [bp-248h]@4
  UIUtil ui; // [sp+150h] [bp-244h]@23
  unsigned int uiHeight; // [sp+164h] [bp-230h]@1
  unsigned int uiWidth; // [sp+168h] [bp-22Ch]@1
  float v288; // [sp+16Ch] [bp-228h]@336
  __int64 i64Val; // [sp+170h] [bp-224h]@102
  int iOffY; // [sp+178h] [bp-21Ch]@23
  NiSourceTexture *pkTexture; // [sp+17Ch] [bp-218h]@7
  MiniHouseDiceGameWin *v292; // [sp+180h] [bp-214h]@1
  int iOffX; // [sp+184h] [bp-210h]@23
  int i; // [sp+188h] [bp-20Ch]@32
  int v295; // [sp+18Ch] [bp-208h]@42
  int uiTop; // [sp+190h] [bp-204h]@1
  int uiLeft; // [sp+194h] [bp-200h]@1
  char *v298; // [sp+198h] [bp-1FCh]@24
  NiPointer<NiNode> spNode; // [sp+19Ch] [bp-1F8h]@1
  NiMatrix3 kMatX; // [sp+1A0h] [bp-1F4h]@423
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > Directoryname; // [sp+1C4h] [bp-1D0h]@378
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > Filename; // [sp+1E0h] [bp-1B4h]@378
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > result; // [sp+1FCh] [bp-198h]@380
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strPath; // [sp+218h] [bp-17Ch]@378
  char acNodeName[128]; // [sp+234h] [bp-160h]@33
  char *pcTriShapeName; // [sp+2B4h] [bp-E0h]@41
  const char *v307; // [sp+2B8h] [bp-DCh]@41
  const char *v308; // [sp+2BCh] [bp-D8h]@41
  const char *v309; // [sp+2C0h] [bp-D4h]@41
  const char *v310; // [sp+2C4h] [bp-D0h]@41
  const char *v311; // [sp+2C8h] [bp-CCh]@41
  const char *v312; // [sp+2CCh] [bp-C8h]@41
  const char *v313; // [sp+2D0h] [bp-C4h]@41
  const char *v314; // [sp+2D4h] [bp-C0h]@41
  const char *v315; // [sp+2D8h] [bp-BCh]@41
  const char *v316; // [sp+2DCh] [bp-B8h]@41
  const char *v317; // [sp+2E0h] [bp-B4h]@41
  const char *v318; // [sp+2E4h] [bp-B0h]@41
  const char *v319; // [sp+2E8h] [bp-ACh]@41
  const char *v320; // [sp+2ECh] [bp-A8h]@41
  const char *v321; // [sp+2F0h] [bp-A4h]@41
  const char *v322; // [sp+2F4h] [bp-A0h]@41
  const char *v323; // [sp+2F8h] [bp-9Ch]@41
  const char *v324; // [sp+2FCh] [bp-98h]@41
  const char *v325; // [sp+300h] [bp-94h]@41
  char dst[4]; // [sp+304h] [bp-90h]@24
  const char *v327; // [sp+308h] [bp-8Ch]@41
  const char *v328; // [sp+30Ch] [bp-88h]@41
  const char *v329; // [sp+310h] [bp-84h]@41
  const char *v330; // [sp+314h] [bp-80h]@41
  const char *v331; // [sp+318h] [bp-7Ch]@41
  const char *v332; // [sp+31Ch] [bp-78h]@41
  const char *v333; // [sp+320h] [bp-74h]@41
  const char *v334; // [sp+324h] [bp-70h]@41
  const char *v335; // [sp+328h] [bp-6Ch]@41
  const char *v336; // [sp+32Ch] [bp-68h]@41
  char *pcTag; // [sp+330h] [bp-64h]@41
  const char *v338; // [sp+334h] [bp-60h]@41
  const char *v339; // [sp+338h] [bp-5Ch]@41
  const char *v340; // [sp+33Ch] [bp-58h]@41
  const char *v341; // [sp+340h] [bp-54h]@41
  const char *v342; // [sp+344h] [bp-50h]@41
  const char *v343; // [sp+348h] [bp-4Ch]@41
  const char *v344; // [sp+34Ch] [bp-48h]@41
  const char *v345; // [sp+350h] [bp-44h]@41
  const char *v346; // [sp+354h] [bp-40h]@41
  char *v347; // [sp+358h] [bp-3Ch]@41
  const char *v348; // [sp+35Ch] [bp-38h]@41
  char *acShareBetType[8]; // [sp+360h] [bp-34h]@41
  const char *v350; // [sp+380h] [bp-14h]@41
  int v351; // [sp+390h] [bp-4h]@1

  v2 = this;
  v292 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v351 = 0;
  uiHeight = 0;
  uiWidth = 0;
  uiLeft = 0;
  uiTop = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\DiceGameMain.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Frame");
  v6 = (NiTexturingProperty *)NiAVObject::GetProperty(v5, 8);
  v7 = v6;
  spTexProp.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v8 = *v7->m_kMaps.m_pBase;
  LOBYTE(v351) = 1;
  if ( !v8 || (v9 = (NiSourceTexture *)v8->m_spTexture.m_pObject, (pkTexture = v9) == 0) )
  {
    LOBYTE(v351) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v10 = spNode.m_pObject;
    v351 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
    return 0;
  }
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v9);
  v13 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v12, 0, v13, "DiceGame", 0) )
  {
    LOBYTE(v351) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v14 = spNode.m_pObject;
    v351 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v14 )
      v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
    return 0;
  }
  v15 = uiLeft;
  v16 = uiTop;
  iOffX = uiLeft;
  iOffY = uiTop;
  UIUtil::UIUtil(&ui);
  LOBYTE(v351) = 2;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, v15, v16);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v17 = (NiD3DDefaultShader *)UIUtil::CreateSpr(&ui, "TimmerFill", 0);
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spTimerFill, v17);
  v18 = (NiD3DDefaultShader *)UIUtil::CreateSpr(&ui, "TimmerFillBack", 0);
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spTimerBack, v18);
  ((void (__stdcall *)(signed int))v2->m_spTimerBack.m_pObject->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v2->m_spTimerBack.m_pObject->vfptr[60].__vecDelDtor)(0);
  v19 = UIUtil::CreateSpr(&ui, "Panel01", 0);
  v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
  UIUtil::CreateSpr(&ui, "Panel02", 0);
  UIUtil::CreateSpr(&ui, "Panel03", 0);
  UIUtil::CreateSpr(&ui, "Panel04", 0);
  v20 = (NiD3DDefaultShader *)UIUtil::CreateSpr(&ui, "Timmer", 0);
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spTimer, v20);
  v21 = 0;
  v22 = (int)v2->m_spLightSpr;
  do
  {
    memset(dst, 0, 0x80u);
    v298 = (char *)(v21 + 1);
    sprintf(dst, "ResultLight%.2d", v21 + 1);
    v23 = UIUtil::CreateSpr(&ui, dst, 0);
    v24 = *(_DWORD *)v22;
    v25 = v23;
    if ( *(PgWinSpr **)v22 != v23 )
    {
      if ( v24 && !InterlockedDecrement((volatile LONG *)(v24 + 4)) && v24 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v24)(v24, 1);
      *(_DWORD *)v22 = v25;
      if ( v25 )
        InterlockedIncrement((volatile LONG *)&v25->m_uiRefCount);
    }
    (*(void (__stdcall **)(signed int))(**(_DWORD **)v22 + 256))(1);
    v21 = (int)v298;
    v22 += 4;
  }
  while ( (signed int)v298 < 32 );
  v26 = 0;
  i = (int)v292->m_spNumTex;
  do
  {
    memset(acNodeName, 0, 0x80u);
    sprintf(acNodeName, "Num%.2d", v26);
    v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acNodeName, &uiLeft, &uiTop, pkTexture);
    v28 = *(_DWORD *)i;
    if ( *(PgSprData **)i != v27 )
    {
      if ( v28 && !InterlockedDecrement((volatile LONG *)(v28 + 4)) && v28 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v28)(v28, 1);
      *(_DWORD *)i = v27;
      if ( v27 )
        InterlockedIncrement((volatile LONG *)&v27->m_uiRefCount);
    }
    i += 4;
    ++v26;
  }
  while ( v26 < 10 );
  v29 = 0;
  pcTriShapeName = "bet_EVENNor";
  v307 = "bet_ODDNor";
  v308 = "bet_BIGNor";
  v309 = "bet_SMALLNor";
  v310 = "bet_Dice11Nor";
  v311 = "bet_Dice22Nor";
  v312 = "bet_Dice33Nor";
  v313 = "bet_Dice44Nor";
  v314 = "bet_Dice55Nor";
  v315 = "bet_Dice66Nor";
  v316 = "bet_Dice111Nor";
  v317 = "bet_Dice222Nor";
  v318 = "bet_Dice333Nor";
  v319 = "bet_Dice444Nor";
  v320 = "bet_Dice555Nor";
  v321 = "bet_Dice666Nor";
  v322 = "bet_AnyTripleNor";
  v323 = "bet_Num4Nor";
  v324 = "bet_Num5Nor";
  v325 = "bet_Num6Nor";
  *(_DWORD *)dst = "bet_Num7Nor";
  v327 = "bet_Num8Nor";
  v328 = "bet_Num9Nor";
  v329 = "bet_Num10Nor";
  v330 = "bet_Num11Nor";
  v331 = "bet_Num12Nor";
  v332 = "bet_Num13Nor";
  v333 = "bet_Num14Nor";
  v334 = "bet_Num15Nor";
  v335 = "bet_Num16Nor";
  v336 = "bet_Num17Nor";
  pcTag = "bet_Dice12Nor";
  v338 = "bet_Dice13Nor";
  v339 = "bet_Dice14Nor";
  v340 = "bet_Dice15Nor";
  v341 = "bet_Dice16Nor";
  v342 = "bet_Dice23Nor";
  v343 = "bet_Dice24Nor";
  v344 = "bet_Dice25Nor";
  v345 = "bet_Dice26Nor";
  v346 = "bet_Dice34Nor";
  v347 = "bet_Dice35Nor";
  v348 = "bet_Dice36Nor";
  acShareBetType[0] = "bet_Dice45Nor";
  acShareBetType[1] = "bet_Dice46Nor";
  acShareBetType[2] = "bet_Dice56Nor";
  acShareBetType[3] = "bet_ONENor";
  acShareBetType[4] = "bet_TWONor";
  acShareBetType[5] = "bet_THREENor";
  acShareBetType[6] = "bet_FOURNor";
  acShareBetType[7] = "bet_FIVENor";
  v350 = "bet_SIXNor";
  v30 = (char *)v292->m_spBettingBut;
  do
  {
    v31 = MiniHouseDiceGameWin::MakeButton(
            v292,
            (NiAVObject *)&spNode.m_pObject->vfptr,
            (&pcTriShapeName)[4 * v29],
            &uiLeft,
            &uiTop,
            v29,
            pkTexture);
    v32 = *(NiDX92DBufferData **)v30;
    v295 = (int)v31;
    if ( v32 != v31 )
    {
      if ( v32 && !InterlockedDecrement((volatile LONG *)&v32->m_uiRefCount) && v32 )
        v32->vfptr->__vecDelDtor((NiRefObject *)v32, 1u);
      v33 = v295;
      *(_DWORD *)v30 = v295;
      if ( v33 )
        InterlockedIncrement((volatile LONG *)(v33 + 4));
    }
    *(_BYTE *)(*(_DWORD *)v30 + 328) = 0;
    *(_DWORD *)(*(_DWORD *)v30 + 272) = g_pkToolTipWin;
    v34 = *(NiDX92DBufferData **)v30;
    ++v29;
    v30 += 4;
    LOBYTE(v34[16].vfptr) = 0;
  }
  while ( v29 < 52 );
  v35 = v292;
  v292->vfptr[130].__vecDelDtor((NiRefObject *)v292, 1u);
  v36 = 0;
  pcTag = "History1_1";
  v338 = "History1_2";
  v339 = "History1_3";
  v340 = "History2_1";
  v341 = "History2_2";
  v342 = "History2_3";
  v343 = "History3_1";
  v344 = "History3_2";
  v345 = "History3_3";
  v346 = "History4_1";
  v347 = "History4_2";
  v348 = "History4_3";
  acShareBetType[0] = "History5_1";
  acShareBetType[1] = "History5_2";
  acShareBetType[2] = "History5_3";
  acShareBetType[3] = "History6_1";
  acShareBetType[4] = "History6_2";
  acShareBetType[5] = "History6_3";
  acShareBetType[6] = "History7_1";
  acShareBetType[7] = "History7_2";
  v350 = "History7_3";
  i = (int)v35->m_spHistroyPos;
  do
  {
    v37 = UIUtil::CreateSpr(&ui, (&pcTag)[4 * v36], 0);
    v38 = *(_DWORD *)i;
    v39 = v37;
    if ( *(PgWinSpr **)i != v37 )
    {
      if ( v38 && !InterlockedDecrement((volatile LONG *)(v38 + 4)) && v38 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v38)(v38, 1);
      *(_DWORD *)i = v39;
      if ( v39 )
        InterlockedIncrement((volatile LONG *)&v39->m_uiRefCount);
    }
    i += 4;
    ++v36;
  }
  while ( v36 < 0x15 );
  v40 = UIUtil::CreateSpr(&ui, "Panel_dice", 0);
  v40->vfptr[60].__vecDelDtor((NiRefObject *)v40, 0);
  v41 = UIUtil::CreateSpr(&ui, "Tip_Betting", 0);
  v41->vfptr[69].__vecDelDtor((NiRefObject *)v41, COERCE_UNSIGNED_INT(0.0));
  v41->m_pkToolTipWin = g_pkToolTipWin;
  v42 = (char *)TextData2::Get(0xFAE4B91C);
  PgWin::SetToolTipWinText((PgWin *)&v41->vfptr, v42);
  v43 = UIUtil::CreateSpr(&ui, "Tip_Share", 0);
  v43->vfptr[69].__vecDelDtor((NiRefObject *)v43, COERCE_UNSIGNED_INT(0.0));
  v43->m_pkToolTipWin = g_pkToolTipWin;
  v44 = (char *)TextData2::Get(0x7E97C0C9u);
  PgWin::SetToolTipWinText((PgWin *)&v43->vfptr, v44);
  v45 = UIUtil::CreateSpr(&ui, "Tip_InvenMoney", 0);
  v45->vfptr[69].__vecDelDtor((NiRefObject *)v45, COERCE_UNSIGNED_INT(0.0));
  v45->m_pkToolTipWin = g_pkToolTipWin;
  v46 = (char *)TextData2::Get(0x4445191Eu);
  PgWin::SetToolTipWinText((PgWin *)&v45->vfptr, v46);
  v47 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "History_dice01", &uiLeft, &uiTop, 0);
  v48 = v292;
  v49 = v47;
  v50 = v292->m_spDiceNum[0].m_pObject;
  if ( v50 != v47 )
  {
    if ( v50 && !InterlockedDecrement((volatile LONG *)&v50->m_uiRefCount) && v50 )
      v50->vfptr->__vecDelDtor((NiRefObject *)v50, 1u);
    v48->m_spDiceNum[0].m_pObject = v49;
    if ( v49 )
      InterlockedIncrement((volatile LONG *)&v49->m_uiRefCount);
  }
  v51 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "History_dice02", &uiLeft, &uiTop, 0);
  v52 = v48->m_spDiceNum[1].m_pObject;
  v53 = v51;
  if ( v52 != v51 )
  {
    if ( v52 && !InterlockedDecrement((volatile LONG *)&v52->m_uiRefCount) && v52 )
      v52->vfptr->__vecDelDtor((NiRefObject *)v52, 1u);
    v48->m_spDiceNum[1].m_pObject = v53;
    if ( v53 )
      InterlockedIncrement((volatile LONG *)&v53->m_uiRefCount);
  }
  v54 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "History_dice03", &uiLeft, &uiTop, 0);
  v55 = v48->m_spDiceNum[2].m_pObject;
  v56 = v54;
  if ( v55 != v54 )
  {
    if ( v55 && !InterlockedDecrement((volatile LONG *)&v55->m_uiRefCount) && v55 )
      v55->vfptr->__vecDelDtor((NiRefObject *)v55, 1u);
    v48->m_spDiceNum[2].m_pObject = v56;
    if ( v56 )
      InterlockedIncrement((volatile LONG *)&v56->m_uiRefCount);
  }
  v57 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "History_dice04", &uiLeft, &uiTop, 0);
  v58 = v48->m_spDiceNum[3].m_pObject;
  v59 = v57;
  if ( v58 != v57 )
  {
    if ( v58 && !InterlockedDecrement((volatile LONG *)&v58->m_uiRefCount) && v58 )
      v58->vfptr->__vecDelDtor((NiRefObject *)v58, 1u);
    v48->m_spDiceNum[3].m_pObject = v59;
    if ( v59 )
      InterlockedIncrement((volatile LONG *)&v59->m_uiRefCount);
  }
  v60 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "History_dice05", &uiLeft, &uiTop, 0);
  v61 = v48->m_spDiceNum[4].m_pObject;
  v62 = v60;
  if ( v61 != v60 )
  {
    if ( v61 && !InterlockedDecrement((volatile LONG *)&v61->m_uiRefCount) && v61 )
      v61->vfptr->__vecDelDtor((NiRefObject *)v61, 1u);
    v48->m_spDiceNum[4].m_pObject = v62;
    if ( v62 )
      InterlockedIncrement((volatile LONG *)&v62->m_uiRefCount);
  }
  v63 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "History_dice06", &uiLeft, &uiTop, 0);
  v64 = v48->m_spDiceNum[5].m_pObject;
  v65 = v63;
  if ( v64 != v63 )
  {
    if ( v64 && !InterlockedDecrement((volatile LONG *)&v64->m_uiRefCount) && v64 )
      v64->vfptr->__vecDelDtor((NiRefObject *)v64, 1u);
    v48->m_spDiceNum[5].m_pObject = v65;
    if ( v65 )
      InterlockedIncrement((volatile LONG *)&v65->m_uiRefCount);
  }
  i = 0;
  v66 = (int)v48->m_spChips;
  do
  {
    dst[0] = 0;
    memset(&dst[1], 0, 0x7Fu);
    sprintf(dst, "%s01", "ChipPatternA");
    v67 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, dst, (int *)&i64Val + 1, &iTop, pkTexture);
    v68 = 2;
    do
    {
      memset(dst, 0, 0x80u);
      sprintf(dst, "%s%.2d", "ChipPatternA", v68);
      PgSprData::Add(v67, (NiAVObject *)&spNode.m_pObject->vfptr, dst);
      ++v68;
    }
    while ( v68 <= 5 );
    if ( (i <= 2 || i >= 7) && i != 1 )
    {
      v80 = *(_DWORD *)(v66 - 208);
      v81 = *(_DWORD *)v80;
      v298 = (char *)v67->m_akHitTester.m_pBase[4].m_pObject->m_uiHeight;
      v82 = (*(int (__thiscall **)(int))(v81 + 168))(v80);
      v83 = *(_DWORD *)v80;
      v298 = (char *)(v82 - (_DWORD)v298);
      fAngle_4 = v292;
      fAngle = v67;
      v84 = (*(int (__thiscall **)(int))(v83 + 148))(v80);
      v280 = (int)&v298[v84];
      v79 = (*(int (__thiscall **)(int))(*(_DWORD *)v80 + 164))(v80);
    }
    else
    {
      v69 = v67->m_akHitTester.m_pBase;
      v70 = *(_DWORD *)(v66 - 208);
      v71 = v69->m_pObject->m_uiWidth;
      v72 = (char *)v69[4].m_pObject->m_uiHeight;
      v73 = *(_DWORD *)v70;
      v298 = v72;
      v295 = v71;
      v74 = (*(int (__thiscall **)(int))(v73 + 168))(v70);
      v298 = (char *)(v74 - (_DWORD)v298);
      v75 = (*(int (__thiscall **)(int))(*(_DWORD *)v70 + 164))(v70);
      v76 = *(_DWORD *)v70;
      v295 = v75 - v295;
      fAngle_4 = v292;
      fAngle = v67;
      v77 = (*(int (__thiscall **)(int))(v76 + 148))(v70);
      v280 = (int)&v298[v77];
      v78 = (*(int (__thiscall **)(int))(*(_DWORD *)v70 + 144))(v70);
      v79 = v295 + v78;
    }
    v85 = PgWinSpr::CreateWin(v79, v280, fAngle, (PgWin *)&fAngle_4->vfptr, 0, 0);
    v86 = *(_DWORD *)v66;
    v87 = v85;
    if ( *(PgWinSpr **)v66 != v85 )
    {
      if ( v86 && !InterlockedDecrement((volatile LONG *)(v86 + 4)) && v86 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v86)(v86, 1);
      *(_DWORD *)v66 = v87;
      if ( v87 )
        InterlockedIncrement((volatile LONG *)&v87->m_uiRefCount);
    }
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v66 + 240))(0);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v66 + 256))(0);
    v66 += 4;
    ++i;
  }
  while ( i < 52 );
  v88 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BetMoneyNum00", &uiLeft, &uiTop, pkTexture);
  i = (int)v88;
  PgSprData::Add(v88, (NiAVObject *)&spNode.m_pObject->vfptr, "BetMoneyNum01");
  PgSprData::Add(v88, (NiAVObject *)&spNode.m_pObject->vfptr, "BetMoneyNum02");
  PgSprData::Add(v88, (NiAVObject *)&spNode.m_pObject->vfptr, "BetMoneyNum03");
  PgSprData::Add(v88, (NiAVObject *)&spNode.m_pObject->vfptr, "BetMoneyNum04");
  PgSprData::Add(v88, (NiAVObject *)&spNode.m_pObject->vfptr, "BetMoneyNum05");
  PgSprData::Add(v88, (NiAVObject *)&spNode.m_pObject->vfptr, "BetMoneyNum06");
  PgSprData::Add(v88, (NiAVObject *)&spNode.m_pObject->vfptr, "BetMoneyNum07");
  PgSprData::Add(v88, (NiAVObject *)&spNode.m_pObject->vfptr, "BetMoneyNum08");
  PgSprData::Add(v88, (NiAVObject *)&spNode.m_pObject->vfptr, "BetMoneyNum09");
  v89 = v292;
  acShareBetType[1] = "bet_Gold02";
  acShareBetType[2] = "bet_Gold01";
  acShareBetType[3] = "bet_Silver03";
  acShareBetType[4] = "bet_Silver02";
  acShareBetType[5] = "bet_Silver01";
  acShareBetType[6] = "bet_Cooper03";
  acShareBetType[7] = "bet_Cooper02";
  v350 = "bet_Cooper01";
  v295 = 0;
  v90 = (char *)v292->m_spBetNumSpr;
  do
  {
    *(float *)&v91 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, acShareBetType[v295 + 1], 0));
    v92 = (PgWinSpr *)*((_DWORD *)v90 - 8);
    v298 = (char *)v91;
    if ( v92 != v91 )
    {
      if ( v92 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v92->m_uiRefCount) && v92 )
          v92->vfptr->__vecDelDtor((NiRefObject *)v92, 1u);
        v91 = (PgWinSpr *)v298;
      }
      *((float *)v90 - 8) = *(float *)&v91;
      if ( *(float *)&v91 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v91->m_uiRefCount);
    }
    (*(void (__stdcall **)(signed int))(**((_DWORD **)v90 - 8) + 256))(1);
    *(float *)&v93 = COERCE_FLOAT(PgWinSpr::CreateWin(uiLeft, uiTop, (PgSprData *)i, (PgWin *)&v89->vfptr, 0, 0));
    v94 = *(float *)v90;
    v298 = (char *)v93;
    if ( (PgWinSpr *)LODWORD(v94) != v93 )
    {
      if ( v94 != 0.0 && !InterlockedDecrement((volatile LONG *)(LODWORD(v94) + 4)) && v94 != 0.0 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))LODWORD(v94))(LODWORD(v94), 1);
      v95 = v298;
      *(float *)v90 = *(float *)&v298;
      if ( v95 )
        InterlockedIncrement((volatile LONG *)v95 + 1);
    }
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v90 + 240))(0);
    (*(void (__stdcall **)(_DWORD, _DWORD))(**((_DWORD **)v90 - 8) + 116))(*(_DWORD *)v90, 0);
    v90 += 4;
    ++v295;
  }
  while ( (unsigned int)v295 < 8 );
  acShareBetType[1] = "Share_Gold02";
  acShareBetType[2] = "Share_Gold01";
  acShareBetType[3] = "Share_Silver03";
  acShareBetType[4] = "Share_Silver02";
  acShareBetType[5] = "Share_Silver01";
  acShareBetType[6] = "Share_Cooper03";
  acShareBetType[7] = "Share_Cooper02";
  v350 = "Share_Cooper01";
  v295 = 0;
  v96 = (float *)v89->m_spShareNumSpr;
  do
  {
    *(float *)&v97 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, acShareBetType[v295 + 1], 0));
    v98 = (PgWinSpr *)*((_DWORD *)v96 - 8);
    v298 = (char *)v97;
    if ( v98 != v97 )
    {
      if ( v98 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v98->m_uiRefCount) && v98 )
          v98->vfptr->__vecDelDtor((NiRefObject *)v98, 1u);
        v97 = (PgWinSpr *)v298;
      }
      *(v96 - 8) = *(float *)&v97;
      if ( *(float *)&v97 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v97->m_uiRefCount);
    }
    (*(void (__stdcall **)(signed int))(**((_DWORD **)v96 - 8) + 256))(1);
    *(float *)&v99 = COERCE_FLOAT(PgWinSpr::CreateWin(uiLeft, uiTop, (PgSprData *)i, (PgWin *)&v89->vfptr, 0, 0));
    v100 = *v96;
    v298 = (char *)v99;
    if ( (PgWinSpr *)LODWORD(v100) != v99 )
    {
      if ( v100 != 0.0 && !InterlockedDecrement((volatile LONG *)(LODWORD(v100) + 4)) && v100 != 0.0 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))LODWORD(v100))(LODWORD(v100), 1);
      v101 = v298;
      *v96 = *(float *)&v298;
      if ( v101 )
        InterlockedIncrement((volatile LONG *)v101 + 1);
    }
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v96 + 240))(0);
    (*(void (__stdcall **)(_DWORD, _DWORD))(**((_DWORD **)v96 - 8) + 116))(*(_DWORD *)v96, 0);
    ++v96;
    ++v295;
  }
  while ( (unsigned int)v295 < 8 );
  v102 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Num00", &uiLeft, &uiTop, pkTexture);
  i = (int)v102;
  PgSprData::Add(v102, (NiAVObject *)&spNode.m_pObject->vfptr, "Num01");
  PgSprData::Add(v102, (NiAVObject *)&spNode.m_pObject->vfptr, "Num02");
  PgSprData::Add(v102, (NiAVObject *)&spNode.m_pObject->vfptr, "Num03");
  PgSprData::Add(v102, (NiAVObject *)&spNode.m_pObject->vfptr, "Num04");
  PgSprData::Add(v102, (NiAVObject *)&spNode.m_pObject->vfptr, "Num05");
  PgSprData::Add(v102, (NiAVObject *)&spNode.m_pObject->vfptr, "Num06");
  PgSprData::Add(v102, (NiAVObject *)&spNode.m_pObject->vfptr, "Num07");
  PgSprData::Add(v102, (NiAVObject *)&spNode.m_pObject->vfptr, "Num08");
  PgSprData::Add(v102, (NiAVObject *)&spNode.m_pObject->vfptr, "Num09");
  v347 = "MyMoney_Gem03";
  v348 = "MyMoney_Gem02";
  acShareBetType[0] = "MyMoney_Gem01";
  acShareBetType[1] = "MyMoney_Gold02";
  acShareBetType[2] = "MyMoney_Gold01";
  acShareBetType[3] = "MyMoney_Silver03";
  acShareBetType[4] = "MyMoney_Silver02";
  acShareBetType[5] = "MyMoney_Silver01";
  acShareBetType[6] = "MyMoney_Cooper03";
  acShareBetType[7] = "MyMoney_Cooper02";
  v350 = "MyMoney_Cooper01";
  v295 = 0;
  v103 = (float *)v89->m_spMyBetNumSpr;
  do
  {
    *(float *)&v104 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, (&v347)[4 * v295], 0));
    v105 = (PgWinSpr *)*((_DWORD *)v103 - 12);
    v298 = (char *)v104;
    if ( v105 != v104 )
    {
      if ( v105 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v105->m_uiRefCount) && v105 )
          v105->vfptr->__vecDelDtor((NiRefObject *)v105, 1u);
        v104 = (PgWinSpr *)v298;
      }
      *(v103 - 12) = *(float *)&v104;
      if ( *(float *)&v104 != 0.0 )
        InterlockedIncrement((volatile LONG *)&v104->m_uiRefCount);
    }
    (*(void (__stdcall **)(signed int))(**((_DWORD **)v103 - 12) + 256))(1);
    *(float *)&v106 = COERCE_FLOAT(PgWinSpr::CreateWin(uiLeft, uiTop, (PgSprData *)i, (PgWin *)&v89->vfptr, 0, 0));
    v107 = *v103;
    v298 = (char *)v106;
    if ( (PgWinSpr *)LODWORD(v107) != v106 )
    {
      if ( v107 != 0.0 && !InterlockedDecrement((volatile LONG *)(LODWORD(v107) + 4)) && v107 != 0.0 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))LODWORD(v107))(LODWORD(v107), 1);
      v108 = v298;
      *v103 = *(float *)&v298;
      if ( v108 )
        InterlockedIncrement((volatile LONG *)v108 + 1);
    }
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v103 + 240))(0);
    (*(void (__stdcall **)(_DWORD, _DWORD))(**((_DWORD **)v103 - 12) + 116))(*(_DWORD *)v103, 0);
    (*(void (__stdcall **)(signed int))(**(_DWORD **)v103 + 492))(1);
    ++v103;
    ++v295;
  }
  while ( (unsigned int)v295 < 0xB );
  v110 = User::GetMoney(&g_kUser);
  HIDWORD(i64Val) = HIDWORD(v110);
  v109 = v110;
  i = 10;
  v295 = (int)&v89->m_spMyBetNumSpr[10];
  while ( 1 )
  {
    v111 = v109 % 10;
    v112 = (signed __int64)__PAIR__(HIDWORD(i64Val), v109) / 10;
    HIDWORD(i64Val) = (unsigned __int64)((signed __int64)__PAIR__(HIDWORD(i64Val), v109) / 10) >> 32;
    v109 = v112;
    if ( v111 < 0 )
      v111 = 0;
    (*(void (__stdcall **)(int))(**(_DWORD **)v295 + 492))(v111);
    if ( !(HIDWORD(i64Val) | (unsigned int)v112) )
      break;
    v295 -= 4;
    if ( --i < 0 )
      goto LABEL_177;
  }
  v113 = i - 1;
  if ( i - 1 >= 0 )
  {
    v114 = (int)&v89->m_spMyBetNumSpr[v113];
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v114 + 492))(0);
      v114 -= 4;
      --v113;
    }
    while ( v113 >= 0 );
  }
LABEL_177:
  v89->m_nTempBettingMoeny = 0;
  v89->m_nUserBettingMoney = 0;
  v115 = UIUtil::CreateBtn(&ui, 0x3Cu, "RankingNor", "RankingClick", "RankingOver", 0, 0);
  v115->m_pkToolTipWin = g_pkToolTipWin;
  v116 = (char *)TextData2::Get(0xD9CBC7D8);
  PgWin::SetToolTipWinText((PgWin *)&v115->vfptr, v116);
  v117 = UIUtil::CreateBtn(&ui, 0x3Du, "HelpNor", "HelpClick", "HelpOver", 0, 0);
  v117->m_pkToolTipWin = g_pkToolTipWin;
  v118 = (char *)TextData2::Get(0x34361593u);
  PgWin::SetToolTipWinText((PgWin *)&v117->vfptr, v118);
  v119 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "100CopperNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(v119, (NiAVObject *)&spNode.m_pObject->vfptr, "100CopperClick");
  PgSprData::Add(v119, (NiAVObject *)&spNode.m_pObject->vfptr, "100CopperOver");
  v120 = ToggleBut::CreateWin(uiLeft, uiTop, v119, (PgWin *)&v89->vfptr, 0x34u, 0, 0, 0);
  v121 = v89->m_pkChipSelectBut[0].m_pObject;
  v122 = v120;
  if ( v121 != v120 )
  {
    if ( v121 && !InterlockedDecrement((volatile LONG *)&v121->m_uiRefCount) && v121 )
      v121->vfptr->__vecDelDtor((NiRefObject *)v121, 1u);
    v89->m_pkChipSelectBut[0].m_pObject = v122;
    if ( v122 )
      InterlockedIncrement((volatile LONG *)&v122->m_uiRefCount);
  }
  v89->m_pkChipSelectBut[0].m_pObject->m_pkToolTipWin = g_pkToolTipWin;
  v123 = (PgWin *)&v89->m_pkChipSelectBut[0].m_pObject->vfptr;
  v124 = TextData::Get(0x88AF99F5);
  v125 = fs("100 %s", v124);
  PgWin::SetToolTipWinText(v123, v125);
  v126 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "1SiverNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(v126, (NiAVObject *)&spNode.m_pObject->vfptr, "1SiverClick");
  PgSprData::Add(v126, (NiAVObject *)&spNode.m_pObject->vfptr, "1SiverOver");
  v127 = ToggleBut::CreateWin(uiLeft, uiTop, v126, (PgWin *)&v89->vfptr, 0x35u, 0, 0, 0);
  v128 = v89->m_pkChipSelectBut[1].m_pObject;
  v129 = v127;
  if ( v128 != v127 )
  {
    if ( v128 && !InterlockedDecrement((volatile LONG *)&v128->m_uiRefCount) && v128 )
      v128->vfptr->__vecDelDtor((NiRefObject *)v128, 1u);
    v89->m_pkChipSelectBut[1].m_pObject = v129;
    if ( v129 )
      InterlockedIncrement((volatile LONG *)&v129->m_uiRefCount);
  }
  v89->m_pkChipSelectBut[1].m_pObject->m_pkToolTipWin = g_pkToolTipWin;
  v130 = (PgWin *)&v89->m_pkChipSelectBut[1].m_pObject->vfptr;
  v131 = TextData::Get(0x98B595EF);
  v132 = fs("1 %s", v131);
  PgWin::SetToolTipWinText(v130, v132);
  v133 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "10SiverNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(v133, (NiAVObject *)&spNode.m_pObject->vfptr, "10SiverClick");
  PgSprData::Add(v133, (NiAVObject *)&spNode.m_pObject->vfptr, "10SiverOver");
  PgSprData::Add(v133, (NiAVObject *)&spNode.m_pObject->vfptr, "10SiverDisable");
  v134 = ToggleBut::CreateWin(uiLeft, uiTop, v133, (PgWin *)&v89->vfptr, 0x36u, 0, 0, 0);
  v135 = v89->m_pkChipSelectBut[2].m_pObject;
  v136 = v134;
  if ( v135 != v134 )
  {
    if ( v135 && !InterlockedDecrement((volatile LONG *)&v135->m_uiRefCount) && v135 )
      v135->vfptr->__vecDelDtor((NiRefObject *)v135, 1u);
    v89->m_pkChipSelectBut[2].m_pObject = v136;
    if ( v136 )
      InterlockedIncrement((volatile LONG *)&v136->m_uiRefCount);
  }
  v89->m_pkChipSelectBut[2].m_pObject->m_pkToolTipWin = g_pkToolTipWin;
  v137 = (PgWin *)&v89->m_pkChipSelectBut[2].m_pObject->vfptr;
  v138 = TextData::Get(0x98B595EF);
  v139 = fs("10 %s", v138);
  PgWin::SetToolTipWinText(v137, v139);
  v140 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "100SiverNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(v140, (NiAVObject *)&spNode.m_pObject->vfptr, "100SiverClick");
  PgSprData::Add(v140, (NiAVObject *)&spNode.m_pObject->vfptr, "100SiverOver");
  PgSprData::Add(v140, (NiAVObject *)&spNode.m_pObject->vfptr, "100SiverDisable");
  v141 = ToggleBut::CreateWin(uiLeft, uiTop, v140, (PgWin *)&v89->vfptr, 0x37u, 0, 0, 0);
  v142 = v89->m_pkChipSelectBut[3].m_pObject;
  v143 = v141;
  if ( v142 != v141 )
  {
    if ( v142 && !InterlockedDecrement((volatile LONG *)&v142->m_uiRefCount) && v142 )
      v142->vfptr->__vecDelDtor((NiRefObject *)v142, 1u);
    v89->m_pkChipSelectBut[3].m_pObject = v143;
    if ( v143 )
      InterlockedIncrement((volatile LONG *)&v143->m_uiRefCount);
  }
  v89->m_pkChipSelectBut[3].m_pObject->m_pkToolTipWin = g_pkToolTipWin;
  v144 = (PgWin *)&v89->m_pkChipSelectBut[3].m_pObject->vfptr;
  v145 = TextData::Get(0x98B595EF);
  v146 = fs("100 %s", v145);
  PgWin::SetToolTipWinText(v144, v146);
  v147 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "GoldNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(v147, (NiAVObject *)&spNode.m_pObject->vfptr, "GoldClick");
  PgSprData::Add(v147, (NiAVObject *)&spNode.m_pObject->vfptr, "GoldOver");
  PgSprData::Add(v147, (NiAVObject *)&spNode.m_pObject->vfptr, "GoldDisable");
  v148 = ToggleBut::CreateWin(uiLeft, uiTop, v147, (PgWin *)&v89->vfptr, 0x38u, 0, 0, 0);
  v149 = v89->m_pkChipSelectBut[4].m_pObject;
  v150 = v148;
  if ( v149 != v148 )
  {
    if ( v149 && !InterlockedDecrement((volatile LONG *)&v149->m_uiRefCount) && v149 )
      v149->vfptr->__vecDelDtor((NiRefObject *)v149, 1u);
    v89->m_pkChipSelectBut[4].m_pObject = v150;
    if ( v150 )
      InterlockedIncrement((volatile LONG *)&v150->m_uiRefCount);
  }
  v89->m_pkChipSelectBut[4].m_pObject->m_pkToolTipWin = g_pkToolTipWin;
  v151 = (PgWin *)&v89->m_pkChipSelectBut[4].m_pObject->vfptr;
  v152 = TextData::Get(0x47A395A3u);
  v153 = fs("1 %s", v152);
  PgWin::SetToolTipWinText(v151, v153);
  v154 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "MaxNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(v154, (NiAVObject *)&spNode.m_pObject->vfptr, "MaxClick");
  PgSprData::Add(v154, (NiAVObject *)&spNode.m_pObject->vfptr, "MaxOver");
  v155 = ToggleBut::CreateWin(uiLeft, uiTop, v154, (PgWin *)&v89->vfptr, 0x39u, 0, 0, 0);
  v156 = v89->m_pkChipSelectBut[5].m_pObject;
  v157 = v155;
  if ( v156 != v155 )
  {
    if ( v156 && !InterlockedDecrement((volatile LONG *)&v156->m_uiRefCount) && v156 )
      v156->vfptr->__vecDelDtor((NiRefObject *)v156, 1u);
    v89->m_pkChipSelectBut[5].m_pObject = v157;
    if ( v157 )
      InterlockedIncrement((volatile LONG *)&v157->m_uiRefCount);
  }
  v89->m_pkChipSelectBut[5].m_pObject->m_pkToolTipWin = g_pkToolTipWin;
  v158 = (PgWin *)&v89->m_pkChipSelectBut[5].m_pObject->vfptr;
  v159 = (char *)TextData2::Get(0x9B8D6ACE);
  PgWin::SetToolTipWinText(v158, v159);
  v160 = (int)&v89->m_pkChipSelectBut[1];
  v298 = (char *)5;
  do
  {
    v161 = *(_DWORD *)v160;
    v162 = *(int (__thiscall **)(int))(**(_DWORD **)v160 + 312);
    *(_BYTE *)(v161 + 324) = 1;
    if ( (unsigned __int8)v162(v161) )
      (*(void (__thiscall **)(int, _DWORD))(*(_DWORD *)v161 + 552))(v161, *(_BYTE *)(v161 + 324) != 0);
    v160 += 4;
    --v298;
  }
  while ( *(float *)&v298 != 0.0 );
  v163 = v89->m_pkChipSelectBut[0].m_pObject;
  v164 = v163->vfptr[78].__vecDelDtor;
  v165 = v89->m_pkChipSelectBut[0].m_pObject;
  v163->m_bHighlight = 0;
  if ( (unsigned __int8)((int (__thiscall *)(ToggleBut *))v164)(v165) )
    v163->vfptr[138].__vecDelDtor((NiRefObject *)v163, v163->m_bHighlight != 0);
  v166 = UIUtil::CreateBtn(&ui, 0x3Bu, "MinNor", "MinClick", "MinOver", 0, 0);
  v167 = (PgWinBut *)v89->m_EffectPos.m_pObject;
  v168 = v166;
  if ( v167 != v166 )
  {
    if ( v167 && !InterlockedDecrement((volatile LONG *)&v167->m_uiRefCount) && v167 )
      v167->vfptr->__vecDelDtor((NiRefObject *)v167, 1u);
    v89->m_EffectPos.m_pObject = (NiNode *)v168;
    if ( v168 )
      InterlockedIncrement((volatile LONG *)&v168->m_uiRefCount);
  }
  UIUtil::CreateBtn(&ui, 0x3Au, "ClsNor", "ClsClick", "ClsOver", 0, 0);
  v169 = UIUtil::CreateBtn(&ui, 0x3Au, "ExitNor", "ExitClick", "ExitOver", 0, 0);
  v169->m_pkToolTipWin = g_pkToolTipWin;
  v170 = (char *)TextData2::Get(0xFA4A423F);
  PgWin::SetToolTipWinText((PgWin *)&v169->vfptr, v170);
  v171 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ResultDiceNum01", &uiLeft, &uiTop, 0);
  i = (int)v171;
  PgSprData::Add(v171, (NiAVObject *)&spNode.m_pObject->vfptr, "ResultDiceNum02");
  PgSprData::Add(v171, (NiAVObject *)&spNode.m_pObject->vfptr, "ResultDiceNum03");
  PgSprData::Add(v171, (NiAVObject *)&spNode.m_pObject->vfptr, "ResultDiceNum04");
  PgSprData::Add(v171, (NiAVObject *)&spNode.m_pObject->vfptr, "ResultDiceNum05");
  PgSprData::Add(v171, (NiAVObject *)&spNode.m_pObject->vfptr, "ResultDiceNum06");
  v172 = 0;
  v173 = (float *)v89->m_spResultDice;
  do
  {
    memset(dst, 0, 0x80u);
    v295 = v172 + 1;
    sprintf(dst, "ResultDice%.2d", v172 + 1);
    *(float *)&v174 = COERCE_FLOAT(UIUtil::CreateSpr(&ui, dst, 0));
    v175 = (PgWinSpr *)*((_DWORD *)v173 - 3);
    v298 = (char *)v174;
    if ( v175 != v174 )
    {
      if ( v175 && !InterlockedDecrement((volatile LONG *)&v175->m_uiRefCount) && v175 )
        v175->vfptr->__vecDelDtor((NiRefObject *)v175, 1u);
      v176 = v298;
      *(v173 - 3) = *(float *)&v298;
      if ( v176 )
        InterlockedIncrement((volatile LONG *)v176 + 1);
    }
    (*(void (__stdcall **)(_DWORD))(**((_DWORD **)v173 - 3) + 256))(0);
    *(float *)&v177 = COERCE_FLOAT(PgWinSpr::CreateWin(uiLeft, uiTop, (PgSprData *)i, (PgWin *)&v89->vfptr, 0, 0));
    v178 = *v173;
    v298 = (char *)v177;
    if ( (PgWinSpr *)LODWORD(v178) != v177 )
    {
      if ( v178 != 0.0 && !InterlockedDecrement((volatile LONG *)(LODWORD(v178) + 4)) && v178 != 0.0 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))LODWORD(v178))(LODWORD(v178), 1);
      v179 = v298;
      *v173 = *(float *)&v298;
      if ( v179 )
        InterlockedIncrement((volatile LONG *)v179 + 1);
    }
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v173 + 240))(0);
    (*(void (__stdcall **)(_DWORD, _DWORD))(**((_DWORD **)v173 - 3) + 116))(*(_DWORD *)v173, 0);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v173 + 492))(0);
    v172 = v295;
    ++v173;
  }
  while ( v295 < 3 );
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Title", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v182 = Font::Get(MAIN_MENU);
    v183 = PgWinText::CreateWin(uiLeft - iOffX, uiTop - iOffY, uiWidth, uiHeight, v182, (PgWin *)&v89->vfptr, 0, 0);
    v184 = v89->m_spTitleText.m_pObject;
    v185 = v183;
    if ( v184 != v183 )
    {
      if ( v184 && !InterlockedDecrement((volatile LONG *)&v184->m_uiRefCount) && v184 )
        v184->vfptr->__vecDelDtor((NiRefObject *)v184, 1u);
      v89->m_spTitleText.m_pObject = v185;
      if ( v185 )
        InterlockedIncrement((volatile LONG *)&v185->m_uiRefCount);
    }
    ((void (__stdcall *)(signed int))v89->m_spTitleText.m_pObject->vfptr[122].__vecDelDtor)(5);
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, signed int))v89->m_spTitleText.m_pObject->vfptr[116].__vecDelDtor)(
      0,
      0,
      0,
      255);
    ((void (__stdcall *)(_DWORD))v89->m_spTitleText.m_pObject->vfptr[60].__vecDelDtor)(0);
    if ( PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "TextBox_DiceResult",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight) )
    {
      v188 = Font::Get(LARGE);
      v189 = PgWinText::CreateWin(uiLeft - iOffX, uiTop - iOffY, uiWidth, uiHeight, v188, (PgWin *)&v89->vfptr, 0, 0);
      v190 = v89->m_spTimeCountText.m_pObject;
      v191 = v189;
      if ( v190 != v189 )
      {
        if ( v190 && !InterlockedDecrement((volatile LONG *)&v190->m_uiRefCount) && v190 )
          v190->vfptr->__vecDelDtor((NiRefObject *)v190, 1u);
        v89->m_spTimeCountText.m_pObject = v191;
        if ( v191 )
          InterlockedIncrement((volatile LONG *)&v191->m_uiRefCount);
      }
      ((void (__stdcall *)(signed int))v89->m_spTimeCountText.m_pObject->vfptr[122].__vecDelDtor)(5);
      ((void (__stdcall *)(_DWORD))v89->m_spTimeCountText.m_pObject->vfptr[60].__vecDelDtor)(0);
      if ( PgUtil::GetTriShapeRect(
             (NiAVObject *)&spNode.m_pObject->vfptr,
             "Frame",
             &uiLeft,
             &uiTop,
             &uiWidth,
             &uiHeight) )
      {
        v194 = Font::Get(BOLD);
        v195 = PgWinText::CreateWin(uiLeft - iOffX, uiTop - iOffY, uiWidth, uiHeight, v194, (PgWin *)&v89->vfptr, 0, 0);
        v195->vfptr[60].__vecDelDtor((NiRefObject *)v195, 0);
        v196 = (PgWinText *)v89->m_pRunEffect.m_pObject;
        if ( v196 != v195 )
        {
          if ( v196 && !InterlockedDecrement((volatile LONG *)&v196->m_uiRefCount) && v196 )
            v196->vfptr->__vecDelDtor((NiRefObject *)v196, 1u);
          v89->m_pRunEffect.m_pObject = (NiNode *)v195;
          InterlockedIncrement((volatile LONG *)&v195->m_uiRefCount);
        }
        if ( !Folder::m_bInit )
          Folder::Init();
        v197 = 0;
        do
        {
          v198 = *(&Folder::m_acEffect + v197);
          *(&Folder::m_acMerge + v197++) = v198;
        }
        while ( v198 );
        v199 = &Folder::m_acMerge - 1;
        do
          v200 = (v199++)[1];
        while ( v200 );
        *(_DWORD *)v199 = 1701013828;
        *((_DWORD *)v199 + 1) = 1869768788;
        *((_DWORD *)v199 + 2) = 1768828535;
        *((_WORD *)v199 + 6) = 102;
        v201 = Ns_LoadNifFile(&Folder::m_acMerge, 0);
        v202 = (SpEffect *)operator new(0x44u);
        HIDWORD(i64Val) = v202;
        LOBYTE(v351) = 3;
        if ( v202 )
        {
          v203 = (NiNode *)NiObject::Clone((NiObject *)&v201->vfptr);
          SpEffect::SpEffect(v202, v203);
        }
        else
        {
          v204 = 0;
        }
        v89->m_pkDiceRollEffect = v204;
        v205 = v204->m_spEffect.m_pObject;
        LOBYTE(v351) = 2;
        NiMatrix3::MakeRotation(&v205->m_kLocal.m_Rotate, NI_PI, 0.0, 1.0, 0.0);
        if ( !Folder::m_bInit )
          Folder::Init();
        v206 = 0;
        do
        {
          v207 = *(&Folder::m_acEffect + v206);
          *(&Folder::m_acMerge + v206++) = v207;
        }
        while ( v207 );
        v208 = &Folder::m_acMerge - 1;
        do
          v209 = (v208++)[1];
        while ( v209 );
        *(_DWORD *)v208 = 1701013828;
        *((_DWORD *)v208 + 1) = 1953785154;
        *((_DWORD *)v208 + 2) = 1399287401;
        *((_DWORD *)v208 + 3) = 1953653108;
        *((_DWORD *)v208 + 4) = 1718185518;
        v208[20] = 0;
        v210 = Ns_LoadNifFile(&Folder::m_acMerge, 0);
        v211 = v89->m_pStartEffect.m_pObject;
        v212 = (NiNode *)v210;
        if ( (NiObjectNET *)v211 != v210 )
        {
          if ( v211 && !InterlockedDecrement((volatile LONG *)&v211->m_uiRefCount) && v211 )
            v211->vfptr->__vecDelDtor((NiRefObject *)v211, 1u);
          v89->m_pStartEffect.m_pObject = v212;
          if ( v212 )
            InterlockedIncrement((volatile LONG *)&v212->m_uiRefCount);
        }
        if ( !Folder::m_bInit )
          Folder::Init();
        v213 = 0;
        do
        {
          v214 = *(&Folder::m_acEffect + v213);
          *(&Folder::m_acMerge + v213++) = v214;
        }
        while ( v214 );
        v215 = &Folder::m_acMerge - 1;
        do
          v216 = (v215++)[1];
        while ( v216 );
        *(_DWORD *)v215 = 1852403523;
        *((_DWORD *)v215 + 1) = 1414808898;
        *((_DWORD *)v215 + 2) = 776425033;
        *((_DWORD *)v215 + 3) = byte_66696E;
        v217 = Ns_LoadNifFile(&Folder::m_acMerge, 0);
        v218 = operator new(0x60u);
        HIDWORD(i64Val) = v218;
        LOBYTE(v351) = 4;
        if ( v218 )
        {
          iOffX = (int)NiObject::Clone((NiObject *)&v217->vfptr);
          *(_DWORD *)v218 = 0;
          LOBYTE(v351) = 5;
          CNSTimer_MarkCheck::CNSTimer_MarkCheck((CNSTimer_MarkCheck *)((char *)v218 + 4));
          LOBYTE(v351) = 6;
          NsEffect::NsEffect((NsEffect *)((char *)v218 + 28));
          v219 = *(_DWORD *)v218;
          LOBYTE(v351) = 7;
          if ( v219 != iOffX )
          {
            if ( v219 && !InterlockedDecrement((volatile LONG *)(v219 + 4)) && v219 )
              (**(void (__thiscall ***)(_DWORD, _DWORD))v219)(v219, 1);
            v220 = iOffX;
            *(_DWORD *)v218 = iOffX;
            if ( v220 )
              InterlockedIncrement((volatile LONG *)(v220 + 4));
          }
          *((_WORD *)v218 + 32) = 0;
        }
        else
        {
          v218 = 0;
        }
        v89->m_pkChipThrowEff = (MHChipEffect *)v218;
        v221 = *(_DWORD *)v218;
        *(float *)&v298 = fabs(0.6000000238418579);
        LOBYTE(v351) = 2;
        *(float *)(v221 + 100) = *(float *)&v298;
        if ( !Folder::m_bInit )
          Folder::Init();
        v222 = 0;
        do
        {
          v223 = *(&Folder::m_acEffect + v222);
          *(&Folder::m_acMerge + v222++) = v223;
        }
        while ( v223 );
        v224 = &Folder::m_acMerge - 1;
        do
          v225 = (v224++)[1];
        while ( v225 );
        *(_DWORD *)v224 = 1467245890;
        *((_DWORD *)v224 + 1) = 1848536681;
        *((_WORD *)v224 + 4) = 26217;
        v224[10] = 0;
        v226 = Ns_LoadNifFile(&Folder::m_acMerge, 0);
        v227 = (SpEffect *)operator new(0x44u);
        HIDWORD(i64Val) = v227;
        LOBYTE(v351) = 8;
        if ( v227 )
        {
          v228 = (NiNode *)NiObject::Clone((NiObject *)&v226->vfptr);
          SpEffect::SpEffect(v227, v228);
        }
        else
        {
          v229 = 0;
        }
        v89->m_pkRewardEff = v229;
        v230 = v229->m_spEffect.m_pObject;
        v288 = 500.0;
        *(float *)&i64Val = 340.0;
        v230->m_kLocal.m_Translate.x = 500.0;
        *((float *)&i64Val + 1) = 1000.0;
        v230->m_kLocal.m_Translate.y = 340.0;
        v230->m_kLocal.m_Translate.z = 1000.0;
        v231 = &v89->m_pkRewardEff->m_spEffect.m_pObject->m_kLocal.m_Rotate;
        LOBYTE(v351) = 2;
        NiMatrix3::MakeRotation(v231, NI_PI, 0.0, 0.0, 0.1);
        if ( !Folder::m_bInit )
          Folder::Init();
        v232 = 0;
        do
        {
          v233 = *(&Folder::m_acEffect + v232);
          *(&Folder::m_acMerge + v232++) = v233;
        }
        while ( v233 );
        v234 = &Folder::m_acMerge - 1;
        do
          v235 = (v234++)[1];
        while ( v235 );
        *(_DWORD *)v234 = 1701013828;
        *((_DWORD *)v234 + 1) = 1801675082;
        *((_DWORD *)v234 + 2) = 779382640;
        *((_DWORD *)v234 + 3) = byte_66696E;
        v236 = Ns_LoadNifFile(&Folder::m_acMerge, 0);
        v237 = v89->m_pBigpotEff.m_pObject;
        v238 = (NiNode *)v236;
        if ( (NiObjectNET *)v237 != v236 )
        {
          if ( v237 && !InterlockedDecrement((volatile LONG *)&v237->m_uiRefCount) && v237 )
            v237->vfptr->__vecDelDtor((NiRefObject *)v237, 1u);
          v89->m_pBigpotEff.m_pObject = v238;
          if ( v238 )
            InterlockedIncrement((volatile LONG *)&v238->m_uiRefCount);
        }
        if ( !Folder::m_bInit )
          Folder::Init();
        v239 = 0;
        do
        {
          v240 = *(&Folder::m_acEffect + v239);
          *(&Folder::m_acMerge + v239++) = v240;
        }
        while ( v240 );
        v241 = &Folder::m_acMerge - 1;
        do
          v242 = (v241++)[1];
        while ( v242 );
        *(_DWORD *)v241 = 1701013828;
        *((_DWORD *)v241 + 1) = 1701667143;
        *((_DWORD *)v241 + 2) = 776885314;
        *((_DWORD *)v241 + 3) = byte_66696E;
        iOffX = (int)Ns_LoadNifFile(&Folder::m_acMerge, 0);
        v243 = v89->m_pkResultEffectList;
        v298 = (char *)10;
        do
        {
          v244 = (SpEffect *)operator new(0x44u);
          HIDWORD(i64Val) = v244;
          LOBYTE(v351) = 9;
          if ( v244 )
          {
            v245 = (NiNode *)NiObject::Clone((NiObject *)iOffX);
            SpEffect::SpEffect(v244, v245);
          }
          else
          {
            v246 = 0;
          }
          *v243 = v246;
          ++v243;
          v247 = v298-- == (char *)1;
          LOBYTE(v351) = 2;
        }
        while ( !v247 );
        if ( !Folder::m_bInit )
          Folder::Init();
        v248 = 0;
        do
        {
          v249 = *(&Folder::m_acEffect + v248);
          *(&Folder::m_acMerge + v248++) = v249;
        }
        while ( v249 );
        v250 = &Folder::m_acMerge - 1;
        do
          v251 = (v250++)[1];
        while ( v251 );
        *(_DWORD *)v250 = 1701013828;
        *((_DWORD *)v250 + 1) = 1701667143;
        *((_DWORD *)v250 + 2) = 1667843167;
        *((_DWORD *)v250 + 3) = 1936020069;
        *((_DWORD *)v250 + 4) = 779381877;
        *((_DWORD *)v250 + 5) = byte_66696E;
        iOffX = (int)Ns_LoadNifFile(&Folder::m_acMerge, 0);
        v298 = (char *)v89->m_pkDiceUpEff;
        v295 = 3;
        do
        {
          v252 = operator new(0x60u);
          HIDWORD(i64Val) = v252;
          LOBYTE(v351) = 10;
          if ( v252 )
          {
            iOffY = (int)NiObject::Clone((NiObject *)iOffX);
            *(_DWORD *)v252 = 0;
            LOBYTE(v351) = 11;
            CNSTimer_MarkCheck::CNSTimer_MarkCheck((CNSTimer_MarkCheck *)((char *)v252 + 4));
            LOBYTE(v351) = 12;
            NsEffect::NsEffect((NsEffect *)((char *)v252 + 28));
            v253 = *(_DWORD *)v252;
            LOBYTE(v351) = 13;
            if ( v253 != iOffY )
            {
              if ( v253 && !InterlockedDecrement((volatile LONG *)(v253 + 4)) && v253 )
                (**(void (__thiscall ***)(_DWORD, _DWORD))v253)(v253, 1);
              v254 = iOffY;
              *(_DWORD *)v252 = iOffY;
              if ( v254 )
                InterlockedIncrement((volatile LONG *)(v254 + 4));
            }
            *((_WORD *)v252 + 32) = 0;
          }
          else
          {
            v252 = 0;
          }
          v255 = (int)v298;
          *(_DWORD *)v298 = v252;
          v247 = v295-- == 1;
          LOBYTE(v351) = 2;
          v298 = (char *)(v255 + 4);
        }
        while ( !v247 );
        strPath._Myres = 15;
        strPath._Mysize = 0;
        strPath._Bx._Buf[0] = 0;
        Directoryname._Myres = 15;
        Directoryname._Mysize = 0;
        Directoryname._Bx._Buf[0] = 0;
        Filename._Myres = 15;
        Filename._Mysize = 0;
        Filename._Bx._Buf[0] = 0;
        LOBYTE(v351) = 16;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &Directoryname,
          "MiniGame01_Dice",
          0xFu);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &Filename,
          "MiniGame01_DiceA",
          0x10u);
        if ( !Folder::m_bInit )
          Folder::Init();
        v256 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(
                 (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&acShareBetType[2],
                 &Folder::m_acCharacter,
                 &Directoryname);
        LOBYTE(v351) = 17;
        v257 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&result, v256, "\\");
        if ( &strPath != v257 )
        {
          if ( strPath._Myres >= 0x10 )
            operator delete(strPath._Bx._Ptr);
          strPath._Myres = 15;
          strPath._Mysize = 0;
          strPath._Bx._Buf[0] = 0;
          if ( v257->_Myres >= 0x10 )
          {
            strPath._Bx._Ptr = v257->_Bx._Ptr;
            v257->_Bx._Ptr = 0;
          }
          else
          {
            memmove(strPath._Bx._Buf, v257->_Bx._Buf, v257->_Mysize + 1);
          }
          strPath._Mysize = v257->_Mysize;
          strPath._Myres = v257->_Myres;
          v257->_Myres = 15;
          v257->_Mysize = 0;
          v257->_Bx._Buf[0] = 0;
        }
        if ( result._Myres >= 0x10 )
          operator delete(result._Bx._Ptr);
        result._Myres = 15;
        result._Mysize = 0;
        result._Bx._Buf[0] = 0;
        LOBYTE(v351) = 16;
        if ( acShareBetType[7] >= (char *)0x10 )
          operator delete(acShareBetType[2]);
        v258 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(
                 (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&acShareBetType[2],
                 &Filename,
                 ".kfm");
        LOBYTE(v351) = 19;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strPath, v258, 0, 0xFFFFFFFF);
        LOBYTE(v351) = 16;
        if ( acShareBetType[7] >= (char *)0x10 )
          operator delete(acShareBetType[2]);
        ResElement::CreateResElement(v89->m_pkDice, &strPath, &Filename);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &Directoryname,
          "MiniGame02_Dice",
          0xFu);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &Filename,
          "MiniGame01_DiceB",
          0x10u);
        if ( !Folder::m_bInit )
          Folder::Init();
        v259 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(
                 (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&acShareBetType[2],
                 &Folder::m_acCharacter,
                 &Directoryname);
        LOBYTE(v351) = 20;
        v260 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&result, v259, "\\");
        if ( &strPath != v260 )
        {
          if ( strPath._Myres >= 0x10 )
            operator delete(strPath._Bx._Ptr);
          strPath._Myres = 15;
          strPath._Mysize = 0;
          strPath._Bx._Buf[0] = 0;
          if ( v260->_Myres >= 0x10 )
          {
            strPath._Bx._Ptr = v260->_Bx._Ptr;
            v260->_Bx._Ptr = 0;
          }
          else
          {
            memmove(strPath._Bx._Buf, v260->_Bx._Buf, v260->_Mysize + 1);
          }
          strPath._Mysize = v260->_Mysize;
          strPath._Myres = v260->_Myres;
          v260->_Myres = 15;
          v260->_Mysize = 0;
          v260->_Bx._Buf[0] = 0;
        }
        if ( result._Myres >= 0x10 )
          operator delete(result._Bx._Ptr);
        result._Myres = 15;
        result._Mysize = 0;
        result._Bx._Buf[0] = 0;
        LOBYTE(v351) = 16;
        if ( acShareBetType[7] >= (char *)0x10 )
          operator delete(acShareBetType[2]);
        v261 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(
                 (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&acShareBetType[2],
                 &Filename,
                 ".kfm");
        LOBYTE(v351) = 22;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strPath, v261, 0, 0xFFFFFFFF);
        LOBYTE(v351) = 16;
        if ( acShareBetType[7] >= (char *)0x10 )
          operator delete(acShareBetType[2]);
        ResElement::CreateResElement(&v89->m_pkDice[1], &strPath, &Filename);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &Directoryname,
          "MiniGame03_Dice",
          0xFu);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &Filename,
          "MiniGame01_DiceC",
          0x10u);
        if ( !Folder::m_bInit )
          Folder::Init();
        v262 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(
                 (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&acShareBetType[2],
                 &Folder::m_acCharacter,
                 &Directoryname);
        LOBYTE(v351) = 23;
        v263 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&result, v262, "\\");
        if ( &strPath != v263 )
        {
          if ( strPath._Myres >= 0x10 )
            operator delete(strPath._Bx._Ptr);
          strPath._Myres = 15;
          strPath._Mysize = 0;
          strPath._Bx._Buf[0] = 0;
          if ( v263->_Myres >= 0x10 )
          {
            strPath._Bx._Ptr = v263->_Bx._Ptr;
            v263->_Bx._Ptr = 0;
          }
          else
          {
            memmove(strPath._Bx._Buf, v263->_Bx._Buf, v263->_Mysize + 1);
          }
          strPath._Mysize = v263->_Mysize;
          strPath._Myres = v263->_Myres;
          v263->_Myres = 15;
          v263->_Mysize = 0;
          v263->_Bx._Buf[0] = 0;
        }
        if ( result._Myres >= 0x10 )
          operator delete(result._Bx._Ptr);
        result._Myres = 15;
        result._Mysize = 0;
        result._Bx._Buf[0] = 0;
        LOBYTE(v351) = 16;
        if ( acShareBetType[7] >= (char *)0x10 )
          operator delete(acShareBetType[2]);
        v264 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&result, &Filename, ".kfm");
        LOBYTE(v351) = 25;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strPath, v264, 0, 0xFFFFFFFF);
        LOBYTE(v351) = 16;
        if ( result._Myres >= 0x10 )
          operator delete(result._Bx._Ptr);
        v265 = v292;
        result._Myres = 15;
        result._Mysize = 0;
        result._Bx._Buf[0] = 0;
        ResElement::CreateResElement(&v292->m_pkDice[2], &strPath, &Filename);
        NiMatrix3::MakeRotation(&kMatX, NI_PI, 1.0, 0.0, 0.0);
        v288 = 500.0;
        *(float *)&i64Val = 350.0;
        *((float *)&i64Val + 1) = 1000.0;
        qmemcpy(acShareBetType, &kMatX, 0x24u);
        *(float *)&v298 = 0.0;
        iOffX = (int)&v265->m_AniActor[0].m_AniSeqIDOffset;
        v266 = (int)&v265->m_pkDice[0].m_pActorMgr;
        do
        {
          if ( *(_BYTE *)(v266 + 4) && *(_DWORD *)v266 )
            v267 = *(_DWORD *)(*(_DWORD *)v266 + 12);
          else
            v267 = *(_DWORD *)(v266 - 4);
          qmemcpy((void *)(v267 + 52), acShareBetType, 0x24u);
          if ( *(_BYTE *)(v266 + 4) && *(_DWORD *)v266 )
            v268 = *(_DWORD *)(*(_DWORD *)v266 + 12);
          else
            v268 = *(_DWORD *)(v266 - 4);
          v269 = i64Val;
          *(float *)(v268 + 88) = v288;
          v270 = HIDWORD(i64Val);
          *(_DWORD *)(v268 + 92) = v269;
          v271 = v292;
          *(_DWORD *)(v268 + 96) = v270;
          if ( *(_BYTE *)(v266 + 4) && *(_DWORD *)v266 )
            v272 = *(_DWORD *)(*(_DWORD *)v266 + 12);
          else
            v272 = *(_DWORD *)(v266 - 4);
          ((void (__stdcall *)(int, _DWORD))v271->m_pRunEffect.m_pObject->vfptr[29].__vecDelDtor)(v272, 0);
          v273 = (int)v298;
          *(_WORD *)iOffX = (_WORD)v298 + 1;
          if ( *(_BYTE *)(v266 + 4) && *(_DWORD *)v266 )
            v274 = *(_DWORD *)(*(_DWORD *)v266 + 12);
          else
            v274 = *(_DWORD *)(v266 - 4);
          *(_WORD *)(v274 + 28) |= 1u;
          iOffX += 12;
          v266 += 44;
          v298 = (char *)(v273 + 1);
        }
        while ( v273 + 1 < 3 );
        v275 = v292;
        v276 = v292->vfptr;
        v292->m_fDiceAniTime = 0.0;
        v277 = v276[59].__vecDelDtor;
        v275->m_fRewardTime = 0.0;
        v275->m_fResultTime = 0.0;
        v275->m_uiSuccessNum = 0;
        *(_DWORD *)&v275->m_bIsResetTimer = 0;
        v275->m_bIsHappendBigPot = 0;
        ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v277)(
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          0.5,
          0.5);
        if ( Filename._Myres >= 0x10 )
          operator delete(Filename._Bx._Ptr);
        Filename._Myres = 15;
        Filename._Mysize = 0;
        Filename._Bx._Buf[0] = 0;
        if ( Directoryname._Myres >= 0x10 )
          operator delete(Directoryname._Bx._Ptr);
        Directoryname._Myres = 15;
        Directoryname._Mysize = 0;
        Directoryname._Bx._Buf[0] = 0;
        if ( strPath._Myres >= 0x10 )
          operator delete(strPath._Bx._Ptr);
        strPath._Myres = 15;
        strPath._Mysize = 0;
        strPath._Bx._Buf[0] = 0;
        LOBYTE(v351) = 1;
        UIUtil::~UIUtil(&ui);
        v278 = spTexProp.m_pObject;
        LOBYTE(v351) = 0;
        if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
          v278->vfptr->__vecDelDtor((NiRefObject *)v278, 1u);
        v279 = spNode.m_pObject;
        v351 = -1;
        if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v279 )
          v279->vfptr->__vecDelDtor((NiRefObject *)v279, 1u);
        v11 = 1;
      }
      else
      {
        LOBYTE(v351) = 1;
        UIUtil::~UIUtil(&ui);
        v192 = spTexProp.m_pObject;
        LOBYTE(v351) = 0;
        if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
          v192->vfptr->__vecDelDtor((NiRefObject *)v192, 1u);
        v193 = spNode.m_pObject;
        v351 = -1;
        if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v193 )
          return 0;
        v193->vfptr->__vecDelDtor((NiRefObject *)v193, 1u);
        v11 = 0;
      }
    }
    else
    {
      LOBYTE(v351) = 1;
      UIUtil::~UIUtil(&ui);
      v186 = spTexProp.m_pObject;
      LOBYTE(v351) = 0;
      if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
        v186->vfptr->__vecDelDtor((NiRefObject *)v186, 1u);
      v187 = spNode.m_pObject;
      v351 = -1;
      if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v187 )
        return 0;
      v187->vfptr->__vecDelDtor((NiRefObject *)v187, 1u);
      v11 = 0;
    }
  }
  else
  {
    LOBYTE(v351) = 1;
    UIUtil::~UIUtil(&ui);
    v180 = spTexProp.m_pObject;
    LOBYTE(v351) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
      v180->vfptr->__vecDelDtor((NiRefObject *)v180, 1u);
    v181 = spNode.m_pObject;
    v351 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v181 )
      return 0;
    v181->vfptr->__vecDelDtor((NiRefObject *)v181, 1u);
    v11 = 0;
  }
  return v11;
}
// A8975C: using guessed type bool Folder::m_bInit;
// B622CC: using guessed type const float NI_PI;

//----- (0071C7D0) --------------------------------------------------------
char __thiscall GambleDiceGameWin::Create(GambleDiceGameWin *this, PgFrameWork *pkFrameWork)
{
  GambleDiceGameWin *v2; // ebx@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiAVObject *v5; // eax@4
  NiTexturingProperty *v6; // eax@4
  NiTexturingProperty *v7; // edi@4
  NiTexturingProperty::Map *v8; // eax@6
  NiSourceTexture *v9; // eax@7
  NiNode *v10; // edi@10
  char v11; // al@14
  PgSprData *v12; // esi@15
  PgFrameWork *v13; // eax@15
  NiNode *v14; // esi@18
  int v15; // edi@23
  int v16; // esi@23
  NiD3DDefaultShader *v17; // eax@23
  NiD3DDefaultShader *v18; // eax@23
  PgWinSpr *v19; // eax@23
  NiD3DDefaultShader *v20; // eax@23
  int v21; // esi@23
  int v22; // ebx@23
  PgWinSpr *v23; // eax@24
  int v24; // edi@24
  PgWinSpr *v25; // esi@24
  signed int v26; // ebx@32
  PgSprData *v27; // edi@33
  int v28; // esi@33
  signed int v29; // edi@41
  char *v30; // esi@41
  NiDX92DBufferData *v31; // eax@42
  NiDX92DBufferData *v32; // ebx@42
  int v33; // eax@47
  NiDX92DBufferData *v34; // eax@49
  GambleDiceGameWin *v35; // esi@50
  unsigned int v36; // ebx@50
  PgWinSpr *v37; // eax@51
  int v38; // esi@51
  PgWinSpr *v39; // edi@51
  PgWinSpr *v40; // eax@59
  PgWinSpr *v41; // esi@59
  char *v42; // eax@59
  PgWinSpr *v43; // esi@59
  char *v44; // eax@59
  PgWinSpr *v45; // esi@59
  char *v46; // eax@59
  PgSprData *v47; // eax@59
  GambleDiceGameWin *v48; // ebx@59
  PgSprData *v49; // edi@59
  PgSprData *v50; // esi@59
  PgSprData *v51; // eax@66
  PgSprData *v52; // esi@66
  PgSprData *v53; // edi@66
  PgSprData *v54; // eax@73
  PgSprData *v55; // esi@73
  PgSprData *v56; // edi@73
  PgSprData *v57; // eax@80
  PgSprData *v58; // esi@80
  PgSprData *v59; // edi@80
  PgSprData *v60; // eax@87
  PgSprData *v61; // esi@87
  PgSprData *v62; // edi@87
  PgSprData *v63; // eax@94
  PgSprData *v64; // esi@94
  PgSprData *v65; // edi@94
  int v66; // ebx@101
  PgSprData *v67; // edi@102
  signed int v68; // esi@102
  NiPointer<PgSprData::PgHitTester> *v69; // eax@107
  int v70; // esi@107
  NiPointer<MHDiceGameTask> v71; // edx@107
  int v72; // ecx@107
  int v73; // eax@107
  int v74; // eax@107
  int v75; // eax@107
  int v76; // edx@107
  int v77; // eax@107
  int v78; // eax@107
  char *v79; // eax@107
  int v80; // esi@108
  int v81; // eax@108
  int v82; // eax@108
  int v83; // edx@108
  int v84; // eax@108
  PgWinSpr *v85; // eax@109
  int v86; // esi@109
  PgWinSpr *v87; // edi@109
  PgSprData *v88; // esi@117
  GambleDiceGameWin *v89; // edi@117
  MHDiceGameTask *v90; // ebx@117
  char *v91; // esi@117
  PgWinSpr *v92; // eax@118
  PgWinSpr *v93; // ebx@118
  int v94; // eax@123
  PgWinSpr *v95; // eax@125
  PgWinSpr *v96; // ebx@125
  int v97; // eax@130
  MHDiceGameTask *v98; // ebx@133
  NiPointer<PgWinSpr> *v99; // esi@133
  PgWinSpr *v100; // eax@134
  PgWinSpr *v101; // ebx@134
  int v102; // eax@139
  PgWinSpr *v103; // eax@141
  PgWinSpr *v104; // ebx@141
  int v105; // eax@146
  PgSprData *v106; // esi@149
  MHDiceGameTask *v107; // ebx@149
  NiPointer<PgWinSpr> *v108; // esi@149
  PgWinSpr *v109; // eax@150
  PgWinSpr *v110; // ebx@150
  int v111; // eax@155
  PgWinSpr *v112; // eax@157
  PgWinSpr *v113; // ebx@157
  int v114; // eax@162
  signed int v115; // ebx@165
  unsigned __int64 v116; // kr00_8@165
  MHDiceGameTask *v117; // esi@166
  int v118; // esi@170
  signed __int64 v119; // kr08_8@170
  int v120; // esi@175
  int v121; // ebx@176
  PgWinBut *v122; // esi@178
  char *v123; // eax@178
  PgWinBut *v124; // esi@178
  char *v125; // eax@178
  PgSprData *v126; // esi@178
  ToggleBut *v127; // eax@178
  ToggleBut *v128; // esi@178
  ToggleBut *v129; // ebx@178
  PgWin *v130; // esi@185
  char *v131; // eax@185
  PgSprData *v132; // esi@185
  ToggleBut *v133; // eax@185
  ToggleBut *v134; // esi@185
  ToggleBut *v135; // ebx@185
  PgWin *v136; // esi@192
  char *v137; // eax@192
  PgSprData *v138; // esi@192
  ToggleBut *v139; // eax@192
  ToggleBut *v140; // esi@192
  ToggleBut *v141; // ebx@192
  PgWin *v142; // esi@199
  char *v143; // eax@199
  PgSprData *v144; // esi@199
  ToggleBut *v145; // eax@199
  ToggleBut *v146; // esi@199
  ToggleBut *v147; // ebx@199
  PgWin *v148; // esi@206
  char *v149; // eax@206
  PgSprData *v150; // esi@206
  ToggleBut *v151; // eax@206
  ToggleBut *v152; // esi@206
  ToggleBut *v153; // ebx@206
  PgWin *v154; // esi@213
  char *v155; // eax@213
  int v156; // ebx@213
  int v157; // esi@214
  int (__thiscall *v158)(int); // eax@214
  ToggleBut *v159; // esi@217
  void *(__thiscall *v160)(NiRefObject *, unsigned int); // eax@217
  ToggleBut *v161; // ecx@217
  PgWinBut *v162; // eax@219
  PgWinBut *v163; // esi@219
  PgWinBut *v164; // ebx@219
  PgWinBut *v165; // esi@226
  char *v166; // eax@226
  PgSprData *v167; // esi@226
  MHDiceGameTask *v168; // ebx@226
  NiPointer<PgWinSpr> *v169; // esi@226
  PgWinSpr *v170; // eax@227
  PgWinSpr *v171; // ebx@227
  int v172; // eax@232
  PgWinSpr *v173; // eax@234
  PgWinSpr *v174; // ebx@234
  int v175; // eax@239
  NiTexturingProperty *v176; // esi@243
  NiNode *v177; // esi@245
  PgFont *v178; // eax@249
  PgWinText *v179; // eax@249
  PgWinText *v180; // esi@249
  PgWinText *v181; // ebx@249
  NiTexturingProperty *v182; // esi@257
  NiNode *v183; // esi@259
  PgFont *v184; // eax@263
  PgWinText *v185; // eax@263
  PgWinText *v186; // esi@263
  PgWinText *v187; // ebx@263
  NiTexturingProperty *v188; // esi@271
  NiNode *v189; // esi@273
  PgFont *v190; // eax@277
  PgWinText *v191; // esi@277
  PgWinText *v192; // ebx@277
  int v193; // eax@285
  char v194; // cl@286
  char *v195; // eax@287
  char v196; // cl@288
  NiObjectNET *v197; // ebx@289
  SpEffect *v198; // esi@289
  NiNode *v199; // eax@290
  SpEffect *v200; // eax@290
  NiNode *v201; // ecx@292
  int v202; // eax@294
  char v203; // cl@295
  char *v204; // eax@296
  char v205; // cl@297
  NiObjectNET *v206; // eax@298
  NiNode *v207; // esi@298
  NiNode *v208; // ebx@298
  int v209; // eax@307
  char v210; // cl@308
  char *v211; // eax@309
  char v212; // cl@310
  NiObjectNET *v213; // ebx@311
  void *v214; // esi@311
  int v215; // ebx@312
  int v216; // eax@317
  int v217; // esi@321
  int v218; // eax@323
  char v219; // cl@324
  char *v220; // eax@325
  char v221; // cl@326
  NiObjectNET *v222; // ebx@327
  SpEffect *v223; // esi@327
  NiNode *v224; // eax@328
  SpEffect *v225; // eax@328
  NiNode *v226; // eax@330
  NiMatrix3 *v227; // ecx@330
  int v228; // eax@332
  char v229; // cl@333
  char *v230; // eax@334
  char v231; // cl@335
  NiObjectNET *v232; // eax@336
  NiNode *v233; // esi@336
  NiNode *v234; // ebx@336
  int v235; // eax@345
  char v236; // cl@346
  char *v237; // eax@347
  char v238; // cl@348
  SpEffect **v239; // esi@349
  SpEffect *v240; // ebx@350
  NiNode *v241; // eax@351
  SpEffect *v242; // eax@351
  bool v243; // zf@353
  int v244; // eax@356
  char v245; // cl@357
  char *v246; // eax@358
  char v247; // cl@359
  void *v248; // esi@361
  NiObject *v249; // edi@362
  NiObject *v250; // ebx@362
  int v251; // eax@371
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v252; // eax@374
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v253; // esi@374
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v254; // eax@385
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v255; // eax@389
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v256; // esi@389
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v257; // eax@400
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v258; // eax@404
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v259; // esi@404
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v260; // eax@415
  GambleDiceGameWin *v261; // ebx@417
  int v262; // ebx@417
  int v263; // eax@420
  int v264; // eax@424
  int v265; // ecx@426
  int v266; // edx@426
  int v267; // eax@428
  int v268; // ecx@430
  int v269; // eax@432
  GambleDiceGameWin *v270; // ecx@435
  NiRefObjectVtbl *v271; // edx@435
  void *(__thiscall *v272)(NiRefObject *, unsigned int); // edx@435
  NiTexturingProperty *v273; // esi@441
  NiNode *v274; // esi@443
  char *v275; // [sp+124h] [bp-294h]@107
  PgSprData *fAngle; // [sp+128h] [bp-290h]@107
  GambleDiceGameWin *fAngle_4; // [sp+12Ch] [bp-28Ch]@107
  int iTop; // [sp+148h] [bp-270h]@102
  NiPointer<NiTexturingProperty> spTexProp; // [sp+14Ch] [bp-26Ch]@4
  UIUtil ui; // [sp+150h] [bp-268h]@23
  unsigned int uiHeight; // [sp+164h] [bp-254h]@1
  unsigned int uiWidth; // [sp+168h] [bp-250h]@1
  float v283; // [sp+16Ch] [bp-24Ch]@330
  __int64 i64Val; // [sp+170h] [bp-248h]@102
  NiSourceTexture *pkTexture; // [sp+178h] [bp-240h]@7
  int iOffY; // [sp+17Ch] [bp-23Ch]@23
  GambleDiceGameWin *v287; // [sp+180h] [bp-238h]@1
  int iOffX; // [sp+184h] [bp-234h]@23
  NiPointer<MHDiceGameTask> result; // [sp+188h] [bp-230h]@107
  int i; // [sp+18Ch] [bp-22Ch]@32
  int uiTop; // [sp+190h] [bp-228h]@1
  int uiLeft; // [sp+194h] [bp-224h]@1
  char *v293; // [sp+198h] [bp-220h]@24
  NiPointer<NiNode> spNode; // [sp+19Ch] [bp-21Ch]@1
  NiMatrix3 kMatX; // [sp+1A0h] [bp-218h]@417
  NiMatrix3 kMat; // [sp+1C4h] [bp-1F4h]@374
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > Directoryname; // [sp+1E8h] [bp-1D0h]@372
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > Filename; // [sp+204h] [bp-1B4h]@372
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v299; // [sp+220h] [bp-198h]@374
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strPath; // [sp+23Ch] [bp-17Ch]@372
  char acNodeName[128]; // [sp+258h] [bp-160h]@33
  char *pcTriShapeName; // [sp+2D8h] [bp-E0h]@41
  const char *v303; // [sp+2DCh] [bp-DCh]@41
  const char *v304; // [sp+2E0h] [bp-D8h]@41
  const char *v305; // [sp+2E4h] [bp-D4h]@41
  const char *v306; // [sp+2E8h] [bp-D0h]@41
  const char *v307; // [sp+2ECh] [bp-CCh]@41
  const char *v308; // [sp+2F0h] [bp-C8h]@41
  const char *v309; // [sp+2F4h] [bp-C4h]@41
  const char *v310; // [sp+2F8h] [bp-C0h]@41
  const char *v311; // [sp+2FCh] [bp-BCh]@41
  const char *v312; // [sp+300h] [bp-B8h]@41
  const char *v313; // [sp+304h] [bp-B4h]@41
  const char *v314; // [sp+308h] [bp-B0h]@41
  const char *v315; // [sp+30Ch] [bp-ACh]@41
  const char *v316; // [sp+310h] [bp-A8h]@41
  const char *v317; // [sp+314h] [bp-A4h]@41
  const char *v318; // [sp+318h] [bp-A0h]@41
  const char *v319; // [sp+31Ch] [bp-9Ch]@41
  const char *v320; // [sp+320h] [bp-98h]@41
  const char *v321; // [sp+324h] [bp-94h]@41
  char dst[4]; // [sp+328h] [bp-90h]@24
  const char *v323; // [sp+32Ch] [bp-8Ch]@41
  const char *v324; // [sp+330h] [bp-88h]@41
  const char *v325; // [sp+334h] [bp-84h]@41
  const char *v326; // [sp+338h] [bp-80h]@41
  const char *v327; // [sp+33Ch] [bp-7Ch]@41
  const char *v328; // [sp+340h] [bp-78h]@41
  const char *v329; // [sp+344h] [bp-74h]@41
  const char *v330; // [sp+348h] [bp-70h]@41
  const char *v331; // [sp+34Ch] [bp-6Ch]@41
  const char *v332; // [sp+350h] [bp-68h]@41
  char *acHistory[21]; // [sp+354h] [bp-64h]@41
  int v334; // [sp+3B4h] [bp-4h]@1

  v2 = this;
  v287 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v334 = 0;
  uiHeight = 0;
  uiWidth = 0;
  uiLeft = 0;
  uiTop = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\GB_DiceGameMain.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = (NiAVObject *)((int (__stdcall *)(const char *))spNode.m_pObject->vfptr[18].__vecDelDtor)("Frame");
  v6 = (NiTexturingProperty *)NiAVObject::GetProperty(v5, 8);
  v7 = v6;
  spTexProp.m_pObject = v6;
  if ( v6 )
    InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  v8 = *v7->m_kMaps.m_pBase;
  LOBYTE(v334) = 1;
  if ( !v8 || (v9 = (NiSourceTexture *)v8->m_spTexture.m_pObject, (pkTexture = v9) == 0) )
  {
    LOBYTE(v334) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v10 = spNode.m_pObject;
    v334 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
    {
      if ( v10 )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    }
    return 0;
  }
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v9);
  v13 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v12, 0, v13, "GambleDiceGame", 0) )
  {
    LOBYTE(v334) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v14 = spNode.m_pObject;
    v334 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v14 )
      v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
    return 0;
  }
  v15 = uiLeft;
  v16 = uiTop;
  iOffX = uiLeft;
  iOffY = uiTop;
  UIUtil::UIUtil(&ui);
  LOBYTE(v334) = 2;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, v15, v16);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v17 = (NiD3DDefaultShader *)UIUtil::CreateSpr(&ui, "TimmerFill", 0);
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spTimerFill, v17);
  v18 = (NiD3DDefaultShader *)UIUtil::CreateSpr(&ui, "TimmerFillBack", 0);
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spTimerBack, v18);
  ((void (__stdcall *)(signed int))v2->m_spTimerBack.m_pObject->vfptr[64].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v2->m_spTimerBack.m_pObject->vfptr[60].__vecDelDtor)(0);
  v19 = UIUtil::CreateSpr(&ui, "Panel01", 0);
  v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
  UIUtil::CreateSpr(&ui, "Panel02", 0);
  UIUtil::CreateSpr(&ui, "Panel03", 0);
  UIUtil::CreateSpr(&ui, "Panel04", 0);
  v20 = (NiD3DDefaultShader *)UIUtil::CreateSpr(&ui, "Timmer", 0);
  NiPointer<PopupMenuWin>::operator=((NiPointer<NiD3DDefaultShader> *)&v2->m_spTimer, v20);
  v21 = 0;
  v22 = (int)v2->m_spLightSpr;
  do
  {
    memset(dst, 0, 0x80u);
    v293 = (char *)(v21 + 1);
    sprintf(dst, "ResultLight%.2d", v21 + 1);
    v23 = UIUtil::CreateSpr(&ui, dst, 0);
    v24 = *(_DWORD *)v22;
    v25 = v23;
    if ( *(PgWinSpr **)v22 != v23 )
    {
      if ( v24 && !InterlockedDecrement((volatile LONG *)(v24 + 4)) && v24 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v24)(v24, 1);
      *(_DWORD *)v22 = v25;
      if ( v25 )
        InterlockedIncrement((volatile LONG *)&v25->m_uiRefCount);
    }
    (*(void (__stdcall **)(signed int))(**(_DWORD **)v22 + 256))(1);
    v21 = (int)v293;
    v22 += 4;
  }
  while ( (signed int)v293 < 32 );
  v26 = 0;
  i = (int)v287->m_spNumTex;
  do
  {
    memset(acNodeName, 0, 0x80u);
    sprintf(acNodeName, "Num%.2d", v26);
    v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, acNodeName, &uiLeft, &uiTop, pkTexture);
    v28 = *(_DWORD *)i;
    if ( *(PgSprData **)i != v27 )
    {
      if ( v28 && !InterlockedDecrement((volatile LONG *)(v28 + 4)) && v28 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v28)(v28, 1);
      *(_DWORD *)i = v27;
      if ( v27 )
        InterlockedIncrement((volatile LONG *)&v27->m_uiRefCount);
    }
    i += 4;
    ++v26;
  }
  while ( v26 < 10 );
  v29 = 0;
  pcTriShapeName = "bet_EVENNor";
  v303 = "bet_ODDNor";
  v304 = "bet_BIGNor";
  v305 = "bet_SMALLNor";
  v306 = "bet_Dice11Nor";
  v307 = "bet_Dice22Nor";
  v308 = "bet_Dice33Nor";
  v309 = "bet_Dice44Nor";
  v310 = "bet_Dice55Nor";
  v311 = "bet_Dice66Nor";
  v312 = "bet_Dice111Nor";
  v313 = "bet_Dice222Nor";
  v314 = "bet_Dice333Nor";
  v315 = "bet_Dice444Nor";
  v316 = "bet_Dice555Nor";
  v317 = "bet_Dice666Nor";
  v318 = "bet_AnyTripleNor";
  v319 = "bet_Num4Nor";
  v320 = "bet_Num5Nor";
  v321 = "bet_Num6Nor";
  *(_DWORD *)dst = "bet_Num7Nor";
  v323 = "bet_Num8Nor";
  v324 = "bet_Num9Nor";
  v325 = "bet_Num10Nor";
  v326 = "bet_Num11Nor";
  v327 = "bet_Num12Nor";
  v328 = "bet_Num13Nor";
  v329 = "bet_Num14Nor";
  v330 = "bet_Num15Nor";
  v331 = "bet_Num16Nor";
  v332 = "bet_Num17Nor";
  acHistory[0] = "bet_Dice12Nor";
  acHistory[1] = "bet_Dice13Nor";
  acHistory[2] = "bet_Dice14Nor";
  acHistory[3] = "bet_Dice15Nor";
  acHistory[4] = "bet_Dice16Nor";
  acHistory[5] = "bet_Dice23Nor";
  acHistory[6] = "bet_Dice24Nor";
  acHistory[7] = "bet_Dice25Nor";
  acHistory[8] = "bet_Dice26Nor";
  acHistory[9] = "bet_Dice34Nor";
  acHistory[10] = "bet_Dice35Nor";
  acHistory[11] = "bet_Dice36Nor";
  acHistory[12] = "bet_Dice45Nor";
  acHistory[13] = "bet_Dice46Nor";
  acHistory[14] = "bet_Dice56Nor";
  acHistory[15] = "bet_ONENor";
  acHistory[16] = "bet_TWONor";
  acHistory[17] = "bet_THREENor";
  acHistory[18] = "bet_FOURNor";
  acHistory[19] = "bet_FIVENor";
  acHistory[20] = "bet_SIXNor";
  v30 = (char *)v287->m_spBettingBut;
  do
  {
    v31 = GambleDiceGameWin::MakeButton(
            v287,
            (NiAVObject *)&spNode.m_pObject->vfptr,
            (&pcTriShapeName)[4 * v29],
            &uiLeft,
            &uiTop,
            v29,
            pkTexture);
    v32 = *(NiDX92DBufferData **)v30;
    v293 = (char *)v31;
    if ( v32 != v31 )
    {
      if ( v32 && !InterlockedDecrement((volatile LONG *)&v32->m_uiRefCount) && v32 )
        v32->vfptr->__vecDelDtor((NiRefObject *)v32, 1u);
      v33 = (int)v293;
      *(_DWORD *)v30 = v293;
      if ( v33 )
        InterlockedIncrement((volatile LONG *)(v33 + 4));
    }
    *(_BYTE *)(*(_DWORD *)v30 + 328) = 0;
    *(_DWORD *)(*(_DWORD *)v30 + 272) = g_pkToolTipWin;
    v34 = *(NiDX92DBufferData **)v30;
    ++v29;
    v30 += 4;
    LOBYTE(v34[16].vfptr) = 0;
  }
  while ( v29 < 52 );
  v35 = v287;
  v287->vfptr[130].__vecDelDtor((NiRefObject *)v287, 1u);
  v36 = 0;
  acHistory[0] = "History1_1";
  acHistory[1] = "History1_2";
  acHistory[2] = "History1_3";
  acHistory[3] = "History2_1";
  acHistory[4] = "History2_2";
  acHistory[5] = "History2_3";
  acHistory[6] = "History3_1";
  acHistory[7] = "History3_2";
  acHistory[8] = "History3_3";
  acHistory[9] = "History4_1";
  acHistory[10] = "History4_2";
  acHistory[11] = "History4_3";
  acHistory[12] = "History5_1";
  acHistory[13] = "History5_2";
  acHistory[14] = "History5_3";
  acHistory[15] = "History6_1";
  acHistory[16] = "History6_2";
  acHistory[17] = "History6_3";
  acHistory[18] = "History7_1";
  acHistory[19] = "History7_2";
  acHistory[20] = "History7_3";
  i = (int)v35->m_spHistroyPos;
  do
  {
    v37 = UIUtil::CreateSpr(&ui, acHistory[v36], 0);
    v38 = *(_DWORD *)i;
    v39 = v37;
    if ( *(PgWinSpr **)i != v37 )
    {
      if ( v38 && !InterlockedDecrement((volatile LONG *)(v38 + 4)) && v38 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v38)(v38, 1);
      *(_DWORD *)i = v39;
      if ( v39 )
        InterlockedIncrement((volatile LONG *)&v39->m_uiRefCount);
    }
    i += 4;
    ++v36;
  }
  while ( v36 < 0x15 );
  v40 = UIUtil::CreateSpr(&ui, "Panel_dice", 0);
  v40->vfptr[60].__vecDelDtor((NiRefObject *)v40, 0);
  v41 = UIUtil::CreateSpr(&ui, "Tip_Betting", 0);
  v41->vfptr[69].__vecDelDtor((NiRefObject *)v41, COERCE_UNSIGNED_INT(0.0));
  v41->m_pkToolTipWin = g_pkToolTipWin;
  v42 = (char *)TextData2::Get(0xFAE4B91C);
  PgWin::SetToolTipWinText((PgWin *)&v41->vfptr, v42);
  v43 = UIUtil::CreateSpr(&ui, "Tip_Share", 0);
  v43->vfptr[69].__vecDelDtor((NiRefObject *)v43, COERCE_UNSIGNED_INT(0.0));
  v43->m_pkToolTipWin = g_pkToolTipWin;
  v44 = (char *)TextData2::Get(0x7E97C0C9u);
  PgWin::SetToolTipWinText((PgWin *)&v43->vfptr, v44);
  v45 = UIUtil::CreateSpr(&ui, "Tip_InvenMoney", 0);
  v45->vfptr[69].__vecDelDtor((NiRefObject *)v45, COERCE_UNSIGNED_INT(0.0));
  v45->m_pkToolTipWin = g_pkToolTipWin;
  v46 = (char *)TextData2::Get(0x4445191Eu);
  PgWin::SetToolTipWinText((PgWin *)&v45->vfptr, v46);
  v47 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "History_dice01", &uiLeft, &uiTop, 0);
  v48 = v287;
  v49 = v47;
  v50 = v287->m_spDiceNum[0].m_pObject;
  if ( v50 != v47 )
  {
    if ( v50 && !InterlockedDecrement((volatile LONG *)&v50->m_uiRefCount) && v50 )
      v50->vfptr->__vecDelDtor((NiRefObject *)v50, 1u);
    v48->m_spDiceNum[0].m_pObject = v49;
    if ( v49 )
      InterlockedIncrement((volatile LONG *)&v49->m_uiRefCount);
  }
  v51 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "History_dice02", &uiLeft, &uiTop, 0);
  v52 = v48->m_spDiceNum[1].m_pObject;
  v53 = v51;
  if ( v52 != v51 )
  {
    if ( v52 && !InterlockedDecrement((volatile LONG *)&v52->m_uiRefCount) && v52 )
      v52->vfptr->__vecDelDtor((NiRefObject *)v52, 1u);
    v48->m_spDiceNum[1].m_pObject = v53;
    if ( v53 )
      InterlockedIncrement((volatile LONG *)&v53->m_uiRefCount);
  }
  v54 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "History_dice03", &uiLeft, &uiTop, 0);
  v55 = v48->m_spDiceNum[2].m_pObject;
  v56 = v54;
  if ( v55 != v54 )
  {
    if ( v55 && !InterlockedDecrement((volatile LONG *)&v55->m_uiRefCount) && v55 )
      v55->vfptr->__vecDelDtor((NiRefObject *)v55, 1u);
    v48->m_spDiceNum[2].m_pObject = v56;
    if ( v56 )
      InterlockedIncrement((volatile LONG *)&v56->m_uiRefCount);
  }
  v57 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "History_dice04", &uiLeft, &uiTop, 0);
  v58 = v48->m_spDiceNum[3].m_pObject;
  v59 = v57;
  if ( v58 != v57 )
  {
    if ( v58 && !InterlockedDecrement((volatile LONG *)&v58->m_uiRefCount) && v58 )
      v58->vfptr->__vecDelDtor((NiRefObject *)v58, 1u);
    v48->m_spDiceNum[3].m_pObject = v59;
    if ( v59 )
      InterlockedIncrement((volatile LONG *)&v59->m_uiRefCount);
  }
  v60 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "History_dice05", &uiLeft, &uiTop, 0);
  v61 = v48->m_spDiceNum[4].m_pObject;
  v62 = v60;
  if ( v61 != v60 )
  {
    if ( v61 && !InterlockedDecrement((volatile LONG *)&v61->m_uiRefCount) && v61 )
      v61->vfptr->__vecDelDtor((NiRefObject *)v61, 1u);
    v48->m_spDiceNum[4].m_pObject = v62;
    if ( v62 )
      InterlockedIncrement((volatile LONG *)&v62->m_uiRefCount);
  }
  v63 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "History_dice06", &uiLeft, &uiTop, 0);
  v64 = v48->m_spDiceNum[5].m_pObject;
  v65 = v63;
  if ( v64 != v63 )
  {
    if ( v64 && !InterlockedDecrement((volatile LONG *)&v64->m_uiRefCount) && v64 )
      v64->vfptr->__vecDelDtor((NiRefObject *)v64, 1u);
    v48->m_spDiceNum[5].m_pObject = v65;
    if ( v65 )
      InterlockedIncrement((volatile LONG *)&v65->m_uiRefCount);
  }
  i = 0;
  v66 = (int)v48->m_spChips;
  do
  {
    dst[0] = 0;
    memset(&dst[1], 0, 0x7Fu);
    sprintf(dst, "%s01", "ChipPatternA");
    v67 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, dst, (int *)&i64Val + 1, &iTop, pkTexture);
    v68 = 2;
    do
    {
      memset(dst, 0, 0x80u);
      sprintf(dst, "%s%.2d", "ChipPatternA", v68);
      PgSprData::Add(v67, (NiAVObject *)&spNode.m_pObject->vfptr, dst);
      ++v68;
    }
    while ( v68 <= 5 );
    if ( (i <= 2 || i >= 7) && i != 1 )
    {
      v80 = *(_DWORD *)(v66 - 208);
      v81 = *(_DWORD *)v80;
      result.m_pObject = (MHDiceGameTask *)v67->m_akHitTester.m_pBase[4].m_pObject->m_uiHeight;
      v82 = (*(int (__thiscall **)(int))(v81 + 168))(v80);
      v83 = *(_DWORD *)v80;
      result.m_pObject = (MHDiceGameTask *)(v82 - (unsigned int)result.m_pObject);
      fAngle_4 = v287;
      fAngle = v67;
      v84 = (*(int (__thiscall **)(int))(v83 + 148))(v80);
      v275 = (char *)result.m_pObject + v84;
      v79 = (char *)(*(int (__thiscall **)(int))(*(_DWORD *)v80 + 164))(v80);
    }
    else
    {
      v69 = v67->m_akHitTester.m_pBase;
      v70 = *(_DWORD *)(v66 - 208);
      v71.m_pObject = (MHDiceGameTask *)v69->m_pObject->m_uiWidth;
      v72 = v69[4].m_pObject->m_uiHeight;
      v73 = *(_DWORD *)v70;
      v293 = (char *)v72;
      result.m_pObject = v71.m_pObject;
      v74 = (*(int (__thiscall **)(int))(v73 + 168))(v70);
      v293 = (char *)(v74 - (_DWORD)v293);
      v75 = (*(int (__thiscall **)(int))(*(_DWORD *)v70 + 164))(v70);
      v76 = *(_DWORD *)v70;
      result.m_pObject = (MHDiceGameTask *)(v75 - (unsigned int)result.m_pObject);
      fAngle_4 = v287;
      fAngle = v67;
      v77 = (*(int (__thiscall **)(int))(v76 + 148))(v70);
      v275 = &v293[v77];
      v78 = (*(int (__thiscall **)(int))(*(_DWORD *)v70 + 144))(v70);
      v79 = (char *)result.m_pObject + v78;
    }
    v85 = PgWinSpr::CreateWin((int)v79, (int)v275, fAngle, (PgWin *)&fAngle_4->vfptr, 0, 0);
    v86 = *(_DWORD *)v66;
    v87 = v85;
    if ( *(PgWinSpr **)v66 != v85 )
    {
      if ( v86 && !InterlockedDecrement((volatile LONG *)(v86 + 4)) && v86 )
        (**(void (__thiscall ***)(_DWORD, _DWORD))v86)(v86, 1);
      *(_DWORD *)v66 = v87;
      if ( v87 )
        InterlockedIncrement((volatile LONG *)&v87->m_uiRefCount);
    }
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v66 + 240))(0);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v66 + 256))(0);
    v66 += 4;
    ++i;
  }
  while ( i < 52 );
  v88 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "BetMoneyNum00", &uiLeft, &uiTop, pkTexture);
  i = (int)v88;
  PgSprData::Add(v88, (NiAVObject *)&spNode.m_pObject->vfptr, "BetMoneyNum01");
  PgSprData::Add(v88, (NiAVObject *)&spNode.m_pObject->vfptr, "BetMoneyNum02");
  PgSprData::Add(v88, (NiAVObject *)&spNode.m_pObject->vfptr, "BetMoneyNum03");
  PgSprData::Add(v88, (NiAVObject *)&spNode.m_pObject->vfptr, "BetMoneyNum04");
  PgSprData::Add(v88, (NiAVObject *)&spNode.m_pObject->vfptr, "BetMoneyNum05");
  PgSprData::Add(v88, (NiAVObject *)&spNode.m_pObject->vfptr, "BetMoneyNum06");
  PgSprData::Add(v88, (NiAVObject *)&spNode.m_pObject->vfptr, "BetMoneyNum07");
  PgSprData::Add(v88, (NiAVObject *)&spNode.m_pObject->vfptr, "BetMoneyNum08");
  PgSprData::Add(v88, (NiAVObject *)&spNode.m_pObject->vfptr, "BetMoneyNum09");
  v89 = v287;
  v90 = 0;
  v91 = (char *)v287->m_spBetNumSpr;
  do
  {
    memset(dst, 0, 0x80u);
    result.m_pObject = (MHDiceGameTask *)((char *)v90 + 1);
    sprintf(dst, "BetCoin%.2d", (char *)&v90->vfptr + 1);
    v92 = UIUtil::CreateSpr(&ui, dst, 0);
    v93 = (PgWinSpr *)*((_DWORD *)v91 - 7);
    v293 = (char *)v92;
    if ( v93 != v92 )
    {
      if ( v93 && !InterlockedDecrement((volatile LONG *)&v93->m_uiRefCount) && v93 )
        v93->vfptr->__vecDelDtor((NiRefObject *)v93, 1u);
      v94 = (int)v293;
      *((_DWORD *)v91 - 7) = v293;
      if ( v94 )
        InterlockedIncrement((volatile LONG *)(v94 + 4));
    }
    (*(void (__stdcall **)(signed int))(**((_DWORD **)v91 - 7) + 256))(1);
    v95 = PgWinSpr::CreateWin(uiLeft, uiTop, (PgSprData *)i, (PgWin *)&v89->vfptr, 0, 0);
    v96 = *(PgWinSpr **)v91;
    v293 = (char *)v95;
    if ( v96 != v95 )
    {
      if ( v96 && !InterlockedDecrement((volatile LONG *)&v96->m_uiRefCount) && v96 )
        v96->vfptr->__vecDelDtor((NiRefObject *)v96, 1u);
      v97 = (int)v293;
      *(_DWORD *)v91 = v293;
      if ( v97 )
        InterlockedIncrement((volatile LONG *)(v97 + 4));
    }
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v91 + 240))(0);
    (*(void (__stdcall **)(_DWORD, _DWORD))(**((_DWORD **)v91 - 7) + 116))(*(_DWORD *)v91, 0);
    v90 = result.m_pObject;
    v91 += 4;
  }
  while ( (signed int)result.m_pObject < 7 );
  v98 = 0;
  v99 = v89->m_spShareNumSpr;
  do
  {
    memset(dst, 0, 0x80u);
    result.m_pObject = (MHDiceGameTask *)((char *)v98 + 1);
    sprintf(dst, "ShareCoin%.2d", (char *)&v98->vfptr + 1);
    v100 = UIUtil::CreateSpr(&ui, dst, 0);
    v101 = v99[-7].m_pObject;
    v293 = (char *)v100;
    if ( v101 != v100 )
    {
      if ( v101 && !InterlockedDecrement((volatile LONG *)&v101->m_uiRefCount) && v101 )
        v101->vfptr->__vecDelDtor((NiRefObject *)v101, 1u);
      v102 = (int)v293;
      v99[-7].m_pObject = (PgWinSpr *)v293;
      if ( v102 )
        InterlockedIncrement((volatile LONG *)(v102 + 4));
    }
    ((void (__stdcall *)(signed int))v99[-7].m_pObject->vfptr[64].__vecDelDtor)(1);
    v103 = PgWinSpr::CreateWin(uiLeft, uiTop, (PgSprData *)i, (PgWin *)&v89->vfptr, 0, 0);
    v104 = v99->m_pObject;
    v293 = (char *)v103;
    if ( v104 != v103 )
    {
      if ( v104 && !InterlockedDecrement((volatile LONG *)&v104->m_uiRefCount) && v104 )
        v104->vfptr->__vecDelDtor((NiRefObject *)v104, 1u);
      v105 = (int)v293;
      v99->m_pObject = (PgWinSpr *)v293;
      if ( v105 )
        InterlockedIncrement((volatile LONG *)(v105 + 4));
    }
    ((void (__stdcall *)(_DWORD))v99->m_pObject->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(PgWinSpr *, _DWORD))v99[-7].m_pObject->vfptr[29].__vecDelDtor)(v99->m_pObject, 0);
    v98 = result.m_pObject;
    ++v99;
  }
  while ( (signed int)result.m_pObject < 7 );
  v106 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Num00", &uiLeft, &uiTop, pkTexture);
  i = (int)v106;
  PgSprData::Add(v106, (NiAVObject *)&spNode.m_pObject->vfptr, "Num01");
  PgSprData::Add(v106, (NiAVObject *)&spNode.m_pObject->vfptr, "Num02");
  PgSprData::Add(v106, (NiAVObject *)&spNode.m_pObject->vfptr, "Num03");
  PgSprData::Add(v106, (NiAVObject *)&spNode.m_pObject->vfptr, "Num04");
  PgSprData::Add(v106, (NiAVObject *)&spNode.m_pObject->vfptr, "Num05");
  PgSprData::Add(v106, (NiAVObject *)&spNode.m_pObject->vfptr, "Num06");
  PgSprData::Add(v106, (NiAVObject *)&spNode.m_pObject->vfptr, "Num07");
  PgSprData::Add(v106, (NiAVObject *)&spNode.m_pObject->vfptr, "Num08");
  PgSprData::Add(v106, (NiAVObject *)&spNode.m_pObject->vfptr, "Num09");
  v107 = 0;
  v108 = v89->m_spMyBetNumSpr;
  do
  {
    memset(dst, 0, 0x80u);
    result.m_pObject = (MHDiceGameTask *)((char *)v107 + 1);
    sprintf(dst, "MyMoney%.2d", (char *)&v107->vfptr + 1);
    v109 = UIUtil::CreateSpr(&ui, dst, 0);
    v110 = v108[-12].m_pObject;
    v293 = (char *)v109;
    if ( v110 != v109 )
    {
      if ( v110 && !InterlockedDecrement((volatile LONG *)&v110->m_uiRefCount) && v110 )
        v110->vfptr->__vecDelDtor((NiRefObject *)v110, 1u);
      v111 = (int)v293;
      v108[-12].m_pObject = (PgWinSpr *)v293;
      if ( v111 )
        InterlockedIncrement((volatile LONG *)(v111 + 4));
    }
    ((void (__stdcall *)(signed int))v108[-12].m_pObject->vfptr[64].__vecDelDtor)(1);
    v112 = PgWinSpr::CreateWin(uiLeft, uiTop, (PgSprData *)i, (PgWin *)&v89->vfptr, 0, 0);
    v113 = v108->m_pObject;
    v293 = (char *)v112;
    if ( v113 != v112 )
    {
      if ( v113 && !InterlockedDecrement((volatile LONG *)&v113->m_uiRefCount) && v113 )
        v113->vfptr->__vecDelDtor((NiRefObject *)v113, 1u);
      v114 = (int)v293;
      v108->m_pObject = (PgWinSpr *)v293;
      if ( v114 )
        InterlockedIncrement((volatile LONG *)(v114 + 4));
    }
    ((void (__stdcall *)(_DWORD))v108->m_pObject->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(signed int))v108->m_pObject->vfptr[123].__vecDelDtor)(1);
    ((void (__stdcall *)(PgWinSpr *, _DWORD))v108[-12].m_pObject->vfptr[29].__vecDelDtor)(v108->m_pObject, 0);
    v107 = result.m_pObject;
    ++v108;
  }
  while ( (signed int)result.m_pObject < 12 );
  MHDiceGameTask::GetDiceGameTask(&result);
  LOBYTE(v334) = 3;
  v116 = User::Coin(&g_kUser);
  HIDWORD(i64Val) = HIDWORD(v116);
  v115 = v116;
  LOBYTE(v334) = 2;
  if ( *(float *)&result.m_pObject != 0.0 )
  {
    v117 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v117 )
        v117->vfptr->__vecDelDtor((NiRefObject *)v117, 1u);
    }
  }
  v293 = (char *)11;
  i = (int)&v89->m_spMyBetNumSpr[11];
  while ( 1 )
  {
    v118 = v115 % 10;
    v119 = (signed __int64)__PAIR__(HIDWORD(i64Val), v115) / 10;
    HIDWORD(i64Val) = (unsigned __int64)((signed __int64)__PAIR__(HIDWORD(i64Val), v115) / 10) >> 32;
    v115 = v119;
    if ( v118 < 0 )
      v118 = 0;
    (*(void (__stdcall **)(int))(**(_DWORD **)i + 492))(v118);
    if ( !(HIDWORD(i64Val) | (unsigned int)v119) )
      break;
    i -= 4;
    if ( (signed int)--v293 < 0 )
      goto LABEL_178;
  }
  v120 = (int)(v293 - 1);
  if ( (signed int)(v293 - 1) >= 0 )
  {
    v121 = (int)&v89->m_spMyBetNumSpr[v120];
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v121 + 492))(0);
      v121 -= 4;
      --v120;
    }
    while ( v120 >= 0 );
  }
LABEL_178:
  LODWORD(v89->m_nTempBettingMoeny) = 0;
  HIDWORD(v89->m_nTempBettingMoeny) = 0;
  LODWORD(v89->m_nUserBettingMoney) = 0;
  HIDWORD(v89->m_nUserBettingMoney) = 0;
  v122 = UIUtil::CreateBtn(&ui, 0x3Bu, "RankingNor", "RankingClick", "RankingOver", 0, 0);
  v122->m_pkToolTipWin = g_pkToolTipWin;
  v123 = (char *)TextData2::Get(0xD9CBC7D8);
  PgWin::SetToolTipWinText((PgWin *)&v122->vfptr, v123);
  v124 = UIUtil::CreateBtn(&ui, 0x3Cu, "HelpNor", "HelpClick", "HelpOver", 0, 0);
  v124->m_pkToolTipWin = g_pkToolTipWin;
  v125 = (char *)TextData2::Get(0x34361593u);
  PgWin::SetToolTipWinText((PgWin *)&v124->vfptr, v125);
  v126 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Coin01Nor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(v126, (NiAVObject *)&spNode.m_pObject->vfptr, "Coin01Click");
  PgSprData::Add(v126, (NiAVObject *)&spNode.m_pObject->vfptr, "Coin01Over");
  v127 = ToggleBut::CreateWin(uiLeft, uiTop, v126, (PgWin *)&v89->vfptr, 0x34u, 0, 0, 0);
  v128 = v89->m_pkChipSelectBut[0].m_pObject;
  v129 = v127;
  if ( v128 != v127 )
  {
    if ( v128 && !InterlockedDecrement((volatile LONG *)&v128->m_uiRefCount) && v128 )
      v128->vfptr->__vecDelDtor((NiRefObject *)v128, 1u);
    v89->m_pkChipSelectBut[0].m_pObject = v129;
    if ( v129 )
      InterlockedIncrement((volatile LONG *)&v129->m_uiRefCount);
  }
  v89->m_pkChipSelectBut[0].m_pObject->m_pkToolTipWin = g_pkToolTipWin;
  v130 = (PgWin *)&v89->m_pkChipSelectBut[0].m_pObject->vfptr;
  v131 = (char *)TextData2::Get(0x4F1704F0u);
  PgWin::SetToolTipWinText(v130, v131);
  v132 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Coin02Nor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(v132, (NiAVObject *)&spNode.m_pObject->vfptr, "Coin02Click");
  PgSprData::Add(v132, (NiAVObject *)&spNode.m_pObject->vfptr, "Coin02Over");
  v133 = ToggleBut::CreateWin(uiLeft, uiTop, v132, (PgWin *)&v89->vfptr, 0x35u, 0, 0, 0);
  v134 = v89->m_pkChipSelectBut[1].m_pObject;
  v135 = v133;
  if ( v134 != v133 )
  {
    if ( v134 && !InterlockedDecrement((volatile LONG *)&v134->m_uiRefCount) && v134 )
      v134->vfptr->__vecDelDtor((NiRefObject *)v134, 1u);
    v89->m_pkChipSelectBut[1].m_pObject = v135;
    if ( v135 )
      InterlockedIncrement((volatile LONG *)&v135->m_uiRefCount);
  }
  v89->m_pkChipSelectBut[1].m_pObject->m_pkToolTipWin = g_pkToolTipWin;
  v136 = (PgWin *)&v89->m_pkChipSelectBut[1].m_pObject->vfptr;
  v137 = (char *)TextData2::Get(0x4F1704F4u);
  PgWin::SetToolTipWinText(v136, v137);
  v138 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Coin03Nor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(v138, (NiAVObject *)&spNode.m_pObject->vfptr, "Coin03Click");
  PgSprData::Add(v138, (NiAVObject *)&spNode.m_pObject->vfptr, "Coin03Over");
  PgSprData::Add(v138, (NiAVObject *)&spNode.m_pObject->vfptr, "Coin03Disable");
  v139 = ToggleBut::CreateWin(uiLeft, uiTop, v138, (PgWin *)&v89->vfptr, 0x36u, 0, 0, 0);
  v140 = v89->m_pkChipSelectBut[2].m_pObject;
  v141 = v139;
  if ( v140 != v139 )
  {
    if ( v140 && !InterlockedDecrement((volatile LONG *)&v140->m_uiRefCount) && v140 )
      v140->vfptr->__vecDelDtor((NiRefObject *)v140, 1u);
    v89->m_pkChipSelectBut[2].m_pObject = v141;
    if ( v141 )
      InterlockedIncrement((volatile LONG *)&v141->m_uiRefCount);
  }
  v89->m_pkChipSelectBut[2].m_pObject->m_pkToolTipWin = g_pkToolTipWin;
  v142 = (PgWin *)&v89->m_pkChipSelectBut[2].m_pObject->vfptr;
  v143 = (char *)TextData2::Get(0x1B1DF85Au);
  PgWin::SetToolTipWinText(v142, v143);
  v144 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Coin04Nor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(v144, (NiAVObject *)&spNode.m_pObject->vfptr, "Coin04Click");
  PgSprData::Add(v144, (NiAVObject *)&spNode.m_pObject->vfptr, "Coin04Over");
  PgSprData::Add(v144, (NiAVObject *)&spNode.m_pObject->vfptr, "Coin04Disable");
  v145 = ToggleBut::CreateWin(uiLeft, uiTop, v144, (PgWin *)&v89->vfptr, 0x37u, 0, 0, 0);
  v146 = v89->m_pkChipSelectBut[3].m_pObject;
  v147 = v145;
  if ( v146 != v145 )
  {
    if ( v146 && !InterlockedDecrement((volatile LONG *)&v146->m_uiRefCount) && v146 )
      v146->vfptr->__vecDelDtor((NiRefObject *)v146, 1u);
    v89->m_pkChipSelectBut[3].m_pObject = v147;
    if ( v147 )
      InterlockedIncrement((volatile LONG *)&v147->m_uiRefCount);
  }
  v89->m_pkChipSelectBut[3].m_pObject->m_pkToolTipWin = g_pkToolTipWin;
  v148 = (PgWin *)&v89->m_pkChipSelectBut[3].m_pObject->vfptr;
  v149 = (char *)TextData2::Get(0x21116226u);
  PgWin::SetToolTipWinText(v148, v149);
  v150 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "CoinMaxNor", &uiLeft, &uiTop, pkTexture);
  PgSprData::Add(v150, (NiAVObject *)&spNode.m_pObject->vfptr, "CoinMaxClick");
  PgSprData::Add(v150, (NiAVObject *)&spNode.m_pObject->vfptr, "CoinMaxOver");
  v151 = ToggleBut::CreateWin(uiLeft, uiTop, v150, (PgWin *)&v89->vfptr, 0x38u, 0, 0, 0);
  v152 = v89->m_pkChipSelectBut[4].m_pObject;
  v153 = v151;
  if ( v152 != v151 )
  {
    if ( v152 && !InterlockedDecrement((volatile LONG *)&v152->m_uiRefCount) && v152 )
      v152->vfptr->__vecDelDtor((NiRefObject *)v152, 1u);
    v89->m_pkChipSelectBut[4].m_pObject = v153;
    if ( v153 )
      InterlockedIncrement((volatile LONG *)&v153->m_uiRefCount);
  }
  v89->m_pkChipSelectBut[4].m_pObject->m_pkToolTipWin = g_pkToolTipWin;
  v154 = (PgWin *)&v89->m_pkChipSelectBut[4].m_pObject->vfptr;
  v155 = (char *)TextData2::Get(0x9B8D6ACE);
  PgWin::SetToolTipWinText(v154, v155);
  v156 = (int)&v89->m_pkChipSelectBut[1];
  v293 = (char *)4;
  do
  {
    v157 = *(_DWORD *)v156;
    v158 = *(int (__thiscall **)(int))(**(_DWORD **)v156 + 312);
    *(_BYTE *)(v157 + 324) = 1;
    if ( (unsigned __int8)v158(v157) )
      (*(void (__thiscall **)(int, _DWORD))(*(_DWORD *)v157 + 552))(v157, *(_BYTE *)(v157 + 324) != 0);
    v156 += 4;
    --v293;
  }
  while ( v293 );
  v159 = v89->m_pkChipSelectBut[0].m_pObject;
  v160 = v159->vfptr[78].__vecDelDtor;
  v161 = v89->m_pkChipSelectBut[0].m_pObject;
  v159->m_bHighlight = 0;
  if ( (unsigned __int8)((int (__thiscall *)(ToggleBut *))v160)(v161) )
    v159->vfptr[138].__vecDelDtor((NiRefObject *)v159, v159->m_bHighlight != 0);
  v162 = UIUtil::CreateBtn(&ui, 0x3Au, "MinNor", "MinClick", "MinOver", 0, 0);
  v163 = (PgWinBut *)v89->m_EffectPos.m_pObject;
  v164 = v162;
  if ( v163 != v162 )
  {
    if ( v163 && !InterlockedDecrement((volatile LONG *)&v163->m_uiRefCount) && v163 )
      v163->vfptr->__vecDelDtor((NiRefObject *)v163, 1u);
    v89->m_EffectPos.m_pObject = (NiNode *)v164;
    if ( v164 )
      InterlockedIncrement((volatile LONG *)&v164->m_uiRefCount);
  }
  UIUtil::CreateBtn(&ui, 0x39u, "ClsNor", "ClsClick", "ClsOver", 0, 0);
  v165 = UIUtil::CreateBtn(&ui, 0x39u, "ExitNor", "ExitClick", "ExitOver", 0, 0);
  v165->m_pkToolTipWin = g_pkToolTipWin;
  v166 = (char *)TextData2::Get(0xFA4A423F);
  PgWin::SetToolTipWinText((PgWin *)&v165->vfptr, v166);
  v167 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "ResultDiceNum01", &uiLeft, &uiTop, 0);
  i = (int)v167;
  PgSprData::Add(v167, (NiAVObject *)&spNode.m_pObject->vfptr, "ResultDiceNum02");
  PgSprData::Add(v167, (NiAVObject *)&spNode.m_pObject->vfptr, "ResultDiceNum03");
  PgSprData::Add(v167, (NiAVObject *)&spNode.m_pObject->vfptr, "ResultDiceNum04");
  PgSprData::Add(v167, (NiAVObject *)&spNode.m_pObject->vfptr, "ResultDiceNum05");
  PgSprData::Add(v167, (NiAVObject *)&spNode.m_pObject->vfptr, "ResultDiceNum06");
  v168 = 0;
  v169 = v89->m_spResultDice;
  do
  {
    memset(dst, 0, 0x80u);
    result.m_pObject = (MHDiceGameTask *)((char *)v168 + 1);
    sprintf(dst, "ResultDice%.2d", (char *)&v168->vfptr + 1);
    v170 = UIUtil::CreateSpr(&ui, dst, 0);
    v171 = v169[-3].m_pObject;
    v293 = (char *)v170;
    if ( v171 != v170 )
    {
      if ( v171 && !InterlockedDecrement((volatile LONG *)&v171->m_uiRefCount) && v171 )
        v171->vfptr->__vecDelDtor((NiRefObject *)v171, 1u);
      v172 = (int)v293;
      v169[-3].m_pObject = (PgWinSpr *)v293;
      if ( v172 )
        InterlockedIncrement((volatile LONG *)(v172 + 4));
    }
    ((void (__stdcall *)(_DWORD))v169[-3].m_pObject->vfptr[64].__vecDelDtor)(0);
    v173 = PgWinSpr::CreateWin(uiLeft, uiTop, (PgSprData *)i, (PgWin *)&v89->vfptr, 0, 0);
    v174 = v169->m_pObject;
    v293 = (char *)v173;
    if ( v174 != v173 )
    {
      if ( v174 && !InterlockedDecrement((volatile LONG *)&v174->m_uiRefCount) && v174 )
        v174->vfptr->__vecDelDtor((NiRefObject *)v174, 1u);
      v175 = (int)v293;
      v169->m_pObject = (PgWinSpr *)v293;
      if ( v175 )
        InterlockedIncrement((volatile LONG *)(v175 + 4));
    }
    ((void (__stdcall *)(_DWORD))v169->m_pObject->vfptr[60].__vecDelDtor)(0);
    ((void (__stdcall *)(PgWinSpr *, _DWORD))v169[-3].m_pObject->vfptr[29].__vecDelDtor)(v169->m_pObject, 0);
    ((void (__stdcall *)(_DWORD))v169->m_pObject->vfptr[123].__vecDelDtor)(0);
    v168 = result.m_pObject;
    ++v169;
  }
  while ( (signed int)result.m_pObject < 3 );
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "Title", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v178 = Font::Get(BOLD);
    v179 = PgWinText::CreateWin(uiLeft - iOffX, uiTop - iOffY, uiWidth, uiHeight, v178, (PgWin *)&v89->vfptr, 0, 0);
    v180 = v89->m_spTitleText.m_pObject;
    v181 = v179;
    if ( v180 != v179 )
    {
      if ( v180 && !InterlockedDecrement((volatile LONG *)&v180->m_uiRefCount) && v180 )
        v180->vfptr->__vecDelDtor((NiRefObject *)v180, 1u);
      v89->m_spTitleText.m_pObject = v181;
      if ( v181 )
        InterlockedIncrement((volatile LONG *)&v181->m_uiRefCount);
    }
    ((void (__stdcall *)(signed int))v89->m_spTitleText.m_pObject->vfptr[122].__vecDelDtor)(5);
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, signed int))v89->m_spTitleText.m_pObject->vfptr[116].__vecDelDtor)(
      0,
      0,
      0,
      255);
    ((void (__stdcall *)(_DWORD))v89->m_spTitleText.m_pObject->vfptr[60].__vecDelDtor)(0);
    if ( PgUtil::GetTriShapeRect(
           (NiAVObject *)&spNode.m_pObject->vfptr,
           "TextBox_DiceResult",
           &uiLeft,
           &uiTop,
           &uiWidth,
           &uiHeight) )
    {
      v184 = Font::Get(LARGE);
      v185 = PgWinText::CreateWin(uiLeft - iOffX, uiTop - iOffY, uiWidth, uiHeight, v184, (PgWin *)&v89->vfptr, 0, 0);
      v186 = v89->m_spTimeCountText.m_pObject;
      v187 = v185;
      if ( v186 != v185 )
      {
        if ( v186 && !InterlockedDecrement((volatile LONG *)&v186->m_uiRefCount) && v186 )
          v186->vfptr->__vecDelDtor((NiRefObject *)v186, 1u);
        v89->m_spTimeCountText.m_pObject = v187;
        if ( v187 )
          InterlockedIncrement((volatile LONG *)&v187->m_uiRefCount);
      }
      ((void (__stdcall *)(signed int))v89->m_spTimeCountText.m_pObject->vfptr[122].__vecDelDtor)(5);
      ((void (__stdcall *)(_DWORD))v89->m_spTimeCountText.m_pObject->vfptr[60].__vecDelDtor)(0);
      if ( PgUtil::GetTriShapeRect(
             (NiAVObject *)&spNode.m_pObject->vfptr,
             "Frame",
             &uiLeft,
             &uiTop,
             &uiWidth,
             &uiHeight) )
      {
        v190 = Font::Get(BOLD);
        v191 = PgWinText::CreateWin(uiLeft - iOffX, uiTop - iOffY, uiWidth, uiHeight, v190, (PgWin *)&v89->vfptr, 0, 0);
        v191->vfptr[60].__vecDelDtor((NiRefObject *)v191, 0);
        v192 = (PgWinText *)v89->m_pRunEffect.m_pObject;
        if ( v192 != v191 )
        {
          if ( v192 && !InterlockedDecrement((volatile LONG *)&v192->m_uiRefCount) && v192 )
            v192->vfptr->__vecDelDtor((NiRefObject *)v192, 1u);
          v89->m_pRunEffect.m_pObject = (NiNode *)v191;
          InterlockedIncrement((volatile LONG *)&v191->m_uiRefCount);
        }
        if ( !Folder::m_bInit )
          Folder::Init();
        v193 = 0;
        do
        {
          v194 = *(&Folder::m_acEffect + v193);
          *(&Folder::m_acMerge + v193++) = v194;
        }
        while ( v194 );
        v195 = &Folder::m_acMerge - 1;
        do
          v196 = (v195++)[1];
        while ( v196 );
        *(_DWORD *)v195 = 1701013828;
        *((_DWORD *)v195 + 1) = 1869768788;
        *((_DWORD *)v195 + 2) = 1768828535;
        *((_WORD *)v195 + 6) = 102;
        v197 = Ns_LoadNifFile(&Folder::m_acMerge, 0);
        v198 = (SpEffect *)operator new(0x44u);
        HIDWORD(i64Val) = v198;
        LOBYTE(v334) = 4;
        if ( v198 )
        {
          v199 = (NiNode *)NiObject::Clone((NiObject *)&v197->vfptr);
          SpEffect::SpEffect(v198, v199);
        }
        else
        {
          v200 = 0;
        }
        v89->m_pkDiceRollEffect = v200;
        v201 = v200->m_spEffect.m_pObject;
        LOBYTE(v334) = 2;
        NiMatrix3::MakeRotation(&v201->m_kLocal.m_Rotate, NI_PI, 0.0, 1.0, 0.0);
        if ( !Folder::m_bInit )
          Folder::Init();
        v202 = 0;
        do
        {
          v203 = *(&Folder::m_acEffect + v202);
          *(&Folder::m_acMerge + v202++) = v203;
        }
        while ( v203 );
        v204 = &Folder::m_acMerge - 1;
        do
          v205 = (v204++)[1];
        while ( v205 );
        *(_DWORD *)v204 = 1701013828;
        *((_DWORD *)v204 + 1) = 1953785154;
        *((_DWORD *)v204 + 2) = 1399287401;
        *((_DWORD *)v204 + 3) = 1953653108;
        *((_DWORD *)v204 + 4) = 1718185518;
        v204[20] = 0;
        v206 = Ns_LoadNifFile(&Folder::m_acMerge, 0);
        v207 = v89->m_pStartEffect.m_pObject;
        v208 = (NiNode *)v206;
        if ( (NiObjectNET *)v207 != v206 )
        {
          if ( v207 && !InterlockedDecrement((volatile LONG *)&v207->m_uiRefCount) && v207 )
            v207->vfptr->__vecDelDtor((NiRefObject *)v207, 1u);
          v89->m_pStartEffect.m_pObject = v208;
          if ( v208 )
            InterlockedIncrement((volatile LONG *)&v208->m_uiRefCount);
        }
        if ( !Folder::m_bInit )
          Folder::Init();
        v209 = 0;
        do
        {
          v210 = *(&Folder::m_acEffect + v209);
          *(&Folder::m_acMerge + v209++) = v210;
        }
        while ( v210 );
        v211 = &Folder::m_acMerge - 1;
        do
          v212 = (v211++)[1];
        while ( v212 );
        *(_DWORD *)v211 = 1852403523;
        *((_DWORD *)v211 + 1) = 1414808898;
        *((_DWORD *)v211 + 2) = 776425033;
        *((_DWORD *)v211 + 3) = byte_66696E;
        v213 = Ns_LoadNifFile(&Folder::m_acMerge, 0);
        v214 = operator new(0x60u);
        HIDWORD(i64Val) = v214;
        LOBYTE(v334) = 5;
        if ( v214 )
        {
          iOffX = (int)NiObject::Clone((NiObject *)&v213->vfptr);
          *(_DWORD *)v214 = 0;
          LOBYTE(v334) = 6;
          CNSTimer_MarkCheck::CNSTimer_MarkCheck((CNSTimer_MarkCheck *)((char *)v214 + 4));
          LOBYTE(v334) = 7;
          NsEffect::NsEffect((NsEffect *)((char *)v214 + 28));
          v215 = *(_DWORD *)v214;
          LOBYTE(v334) = 8;
          if ( v215 != iOffX )
          {
            if ( v215 && !InterlockedDecrement((volatile LONG *)(v215 + 4)) && v215 )
              (**(void (__thiscall ***)(_DWORD, _DWORD))v215)(v215, 1);
            v216 = iOffX;
            *(_DWORD *)v214 = iOffX;
            if ( v216 )
              InterlockedIncrement((volatile LONG *)(v216 + 4));
          }
          *((_WORD *)v214 + 32) = 0;
        }
        else
        {
          v214 = 0;
        }
        v89->m_pkChipThrowEff = (MHChipEffect *)v214;
        v217 = *(_DWORD *)v214;
        *(float *)&result.m_pObject = fabs(0.6000000238418579);
        LOBYTE(v334) = 2;
        *(float *)(v217 + 100) = *(float *)&result.m_pObject;
        if ( !Folder::m_bInit )
          Folder::Init();
        v218 = 0;
        do
        {
          v219 = *(&Folder::m_acEffect + v218);
          *(&Folder::m_acMerge + v218++) = v219;
        }
        while ( v219 );
        v220 = &Folder::m_acMerge - 1;
        do
          v221 = (v220++)[1];
        while ( v221 );
        *(_DWORD *)v220 = 1467245890;
        *((_DWORD *)v220 + 1) = 1848536681;
        *((_WORD *)v220 + 4) = 26217;
        v220[10] = 0;
        v222 = Ns_LoadNifFile(&Folder::m_acMerge, 0);
        v223 = (SpEffect *)operator new(0x44u);
        HIDWORD(i64Val) = v223;
        LOBYTE(v334) = 9;
        if ( v223 )
        {
          v224 = (NiNode *)NiObject::Clone((NiObject *)&v222->vfptr);
          SpEffect::SpEffect(v223, v224);
        }
        else
        {
          v225 = 0;
        }
        v89->m_pkRewardEff = v225;
        v226 = v225->m_spEffect.m_pObject;
        v283 = 500.0;
        *(float *)&i64Val = 340.0;
        v226->m_kLocal.m_Translate.x = 500.0;
        *((float *)&i64Val + 1) = 1000.0;
        v226->m_kLocal.m_Translate.y = 340.0;
        v226->m_kLocal.m_Translate.z = 1000.0;
        v227 = &v89->m_pkRewardEff->m_spEffect.m_pObject->m_kLocal.m_Rotate;
        LOBYTE(v334) = 2;
        NiMatrix3::MakeRotation(v227, NI_PI, 0.0, 0.0, 0.1);
        if ( !Folder::m_bInit )
          Folder::Init();
        v228 = 0;
        do
        {
          v229 = *(&Folder::m_acEffect + v228);
          *(&Folder::m_acMerge + v228++) = v229;
        }
        while ( v229 );
        v230 = &Folder::m_acMerge - 1;
        do
          v231 = (v230++)[1];
        while ( v231 );
        *(_DWORD *)v230 = 1701013828;
        *((_DWORD *)v230 + 1) = 1801675082;
        *((_DWORD *)v230 + 2) = 779382640;
        *((_DWORD *)v230 + 3) = byte_66696E;
        v232 = Ns_LoadNifFile(&Folder::m_acMerge, 0);
        v233 = v89->m_pBigpotEff.m_pObject;
        v234 = (NiNode *)v232;
        if ( (NiObjectNET *)v233 != v232 )
        {
          if ( v233 && !InterlockedDecrement((volatile LONG *)&v233->m_uiRefCount) && v233 )
            v233->vfptr->__vecDelDtor((NiRefObject *)v233, 1u);
          v89->m_pBigpotEff.m_pObject = v234;
          if ( v234 )
            InterlockedIncrement((volatile LONG *)&v234->m_uiRefCount);
        }
        if ( !Folder::m_bInit )
          Folder::Init();
        v235 = 0;
        do
        {
          v236 = *(&Folder::m_acEffect + v235);
          *(&Folder::m_acMerge + v235++) = v236;
        }
        while ( v236 );
        v237 = &Folder::m_acMerge - 1;
        do
          v238 = (v237++)[1];
        while ( v238 );
        *(_DWORD *)v237 = 1701013828;
        *((_DWORD *)v237 + 1) = 1701667143;
        *((_DWORD *)v237 + 2) = 776885314;
        *((_DWORD *)v237 + 3) = byte_66696E;
        iOffX = (int)Ns_LoadNifFile(&Folder::m_acMerge, 0);
        v239 = v89->m_pkResultEffectList;
        iOffY = 10;
        do
        {
          v240 = (SpEffect *)operator new(0x44u);
          HIDWORD(i64Val) = v240;
          LOBYTE(v334) = 10;
          if ( v240 )
          {
            v241 = (NiNode *)NiObject::Clone((NiObject *)iOffX);
            SpEffect::SpEffect(v240, v241);
          }
          else
          {
            v242 = 0;
          }
          *v239 = v242;
          ++v239;
          v243 = iOffY-- == 1;
          LOBYTE(v334) = 2;
        }
        while ( !v243 );
        if ( !Folder::m_bInit )
          Folder::Init();
        v244 = 0;
        do
        {
          v245 = *(&Folder::m_acEffect + v244);
          *(&Folder::m_acMerge + v244++) = v245;
        }
        while ( v245 );
        v246 = &Folder::m_acMerge - 1;
        do
          v247 = (v246++)[1];
        while ( v247 );
        *(_DWORD *)v246 = 1701013828;
        *((_DWORD *)v246 + 1) = 1701667143;
        *((_DWORD *)v246 + 2) = 1667843167;
        *((_DWORD *)v246 + 3) = 1936020069;
        *((_DWORD *)v246 + 4) = 779381877;
        *((_DWORD *)v246 + 5) = byte_66696E;
        iOffX = (int)Ns_LoadNifFile(&Folder::m_acMerge, 0);
        iOffY = (int)v89->m_pkDiceUpEff;
        v293 = (char *)3;
        do
        {
          v248 = operator new(0x60u);
          HIDWORD(i64Val) = v248;
          LOBYTE(v334) = 11;
          if ( v248 )
          {
            v249 = NiObject::Clone((NiObject *)iOffX);
            *(_DWORD *)v248 = 0;
            LOBYTE(v334) = 12;
            CNSTimer_MarkCheck::CNSTimer_MarkCheck((CNSTimer_MarkCheck *)((char *)v248 + 4));
            LOBYTE(v334) = 13;
            NsEffect::NsEffect((NsEffect *)((char *)v248 + 28));
            v250 = *(NiObject **)v248;
            LOBYTE(v334) = 14;
            if ( v250 != v249 )
            {
              if ( v250 && !InterlockedDecrement((volatile LONG *)&v250->m_uiRefCount) && v250 )
                v250->vfptr->__vecDelDtor((NiRefObject *)v250, 1u);
              *(_DWORD *)v248 = v249;
              if ( v249 )
                InterlockedIncrement((volatile LONG *)&v249->m_uiRefCount);
            }
            *((_WORD *)v248 + 32) = 0;
          }
          else
          {
            v248 = 0;
          }
          v251 = iOffY;
          *(_DWORD *)iOffY = v248;
          v243 = v293-- == (char *)1;
          LOBYTE(v334) = 2;
          iOffY = v251 + 4;
        }
        while ( !v243 );
        strPath._Myres = 15;
        strPath._Mysize = 0;
        strPath._Bx._Buf[0] = 0;
        Directoryname._Myres = 15;
        Directoryname._Mysize = 0;
        Directoryname._Bx._Buf[0] = 0;
        Filename._Myres = 15;
        Filename._Mysize = 0;
        Filename._Bx._Buf[0] = 0;
        LOBYTE(v334) = 17;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &Directoryname,
          "MiniGame01_Dice",
          0xFu);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &Filename,
          "MiniGame01_DiceA",
          0x10u);
        if ( !Folder::m_bInit )
          Folder::Init();
        v252 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(
                 (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&kMat.m_pEntry[0][2],
                 &Folder::m_acCharacter,
                 &Directoryname);
        LOBYTE(v334) = 18;
        v253 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&v299, v252, "\\");
        if ( &strPath != v253 )
        {
          if ( strPath._Myres >= 0x10 )
            operator delete(strPath._Bx._Ptr);
          strPath._Myres = 15;
          strPath._Mysize = 0;
          strPath._Bx._Buf[0] = 0;
          if ( v253->_Myres >= 0x10 )
          {
            strPath._Bx._Ptr = v253->_Bx._Ptr;
            v253->_Bx._Ptr = 0;
          }
          else
          {
            memmove(strPath._Bx._Buf, v253->_Bx._Buf, v253->_Mysize + 1);
          }
          strPath._Mysize = v253->_Mysize;
          strPath._Myres = v253->_Myres;
          v253->_Myres = 15;
          v253->_Mysize = 0;
          v253->_Bx._Buf[0] = 0;
        }
        if ( v299._Myres >= 0x10 )
          operator delete(v299._Bx._Ptr);
        v299._Myres = 15;
        v299._Mysize = 0;
        v299._Bx._Buf[0] = 0;
        LOBYTE(v334) = 17;
        if ( LODWORD(kMat.m_pEntry[2][1]) >= 0x10 )
          operator delete((void *)LODWORD(kMat.m_pEntry[0][2]));
        v254 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(
                 (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&kMat.m_pEntry[0][2],
                 &Filename,
                 ".kfm");
        LOBYTE(v334) = 20;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strPath, v254, 0, 0xFFFFFFFF);
        LOBYTE(v334) = 17;
        if ( LODWORD(kMat.m_pEntry[2][1]) >= 0x10 )
          operator delete((void *)LODWORD(kMat.m_pEntry[0][2]));
        ResElement::CreateResElement(v287->m_pkDice, &strPath, &Filename);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &Directoryname,
          "MiniGame02_Dice",
          0xFu);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &Filename,
          "MiniGame01_DiceB",
          0x10u);
        if ( !Folder::m_bInit )
          Folder::Init();
        v255 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(
                 (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&kMat.m_pEntry[0][2],
                 &Folder::m_acCharacter,
                 &Directoryname);
        LOBYTE(v334) = 21;
        v256 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&v299, v255, "\\");
        if ( &strPath != v256 )
        {
          if ( strPath._Myres >= 0x10 )
            operator delete(strPath._Bx._Ptr);
          strPath._Myres = 15;
          strPath._Mysize = 0;
          strPath._Bx._Buf[0] = 0;
          if ( v256->_Myres >= 0x10 )
          {
            strPath._Bx._Ptr = v256->_Bx._Ptr;
            v256->_Bx._Ptr = 0;
          }
          else
          {
            memmove(strPath._Bx._Buf, v256->_Bx._Buf, v256->_Mysize + 1);
          }
          strPath._Mysize = v256->_Mysize;
          strPath._Myres = v256->_Myres;
          v256->_Myres = 15;
          v256->_Mysize = 0;
          v256->_Bx._Buf[0] = 0;
        }
        if ( v299._Myres >= 0x10 )
          operator delete(v299._Bx._Ptr);
        v299._Myres = 15;
        v299._Mysize = 0;
        v299._Bx._Buf[0] = 0;
        LOBYTE(v334) = 17;
        if ( LODWORD(kMat.m_pEntry[2][1]) >= 0x10 )
          operator delete((void *)LODWORD(kMat.m_pEntry[0][2]));
        v257 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(
                 (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&kMat.m_pEntry[0][2],
                 &Filename,
                 ".kfm");
        LOBYTE(v334) = 23;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strPath, v257, 0, 0xFFFFFFFF);
        LOBYTE(v334) = 17;
        if ( LODWORD(kMat.m_pEntry[2][1]) >= 0x10 )
          operator delete((void *)LODWORD(kMat.m_pEntry[0][2]));
        ResElement::CreateResElement(&v287->m_pkDice[1], &strPath, &Filename);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &Directoryname,
          "MiniGame03_Dice",
          0xFu);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
          &Filename,
          "MiniGame01_DiceC",
          0x10u);
        if ( !Folder::m_bInit )
          Folder::Init();
        v258 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(
                 (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)&kMat.m_pEntry[0][2],
                 &Folder::m_acCharacter,
                 &Directoryname);
        LOBYTE(v334) = 24;
        v259 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&v299, v258, "\\");
        if ( &strPath != v259 )
        {
          if ( strPath._Myres >= 0x10 )
            operator delete(strPath._Bx._Ptr);
          strPath._Myres = 15;
          strPath._Mysize = 0;
          strPath._Bx._Buf[0] = 0;
          if ( v259->_Myres >= 0x10 )
          {
            strPath._Bx._Ptr = v259->_Bx._Ptr;
            v259->_Bx._Ptr = 0;
          }
          else
          {
            memmove(strPath._Bx._Buf, v259->_Bx._Buf, v259->_Mysize + 1);
          }
          strPath._Mysize = v259->_Mysize;
          strPath._Myres = v259->_Myres;
          v259->_Myres = 15;
          v259->_Mysize = 0;
          v259->_Bx._Buf[0] = 0;
        }
        if ( v299._Myres >= 0x10 )
          operator delete(v299._Bx._Ptr);
        v299._Myres = 15;
        v299._Mysize = 0;
        v299._Bx._Buf[0] = 0;
        LOBYTE(v334) = 17;
        if ( LODWORD(kMat.m_pEntry[2][1]) >= 0x10 )
          operator delete((void *)LODWORD(kMat.m_pEntry[0][2]));
        v260 = std::operator+<char,std::char_traits<char>,std::allocator<char>>(&v299, &Filename, ".kfm");
        LOBYTE(v334) = 26;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strPath, v260, 0, 0xFFFFFFFF);
        LOBYTE(v334) = 17;
        if ( v299._Myres >= 0x10 )
          operator delete(v299._Bx._Ptr);
        v261 = v287;
        v299._Myres = 15;
        v299._Mysize = 0;
        v299._Bx._Buf[0] = 0;
        ResElement::CreateResElement(&v287->m_pkDice[2], &strPath, &Filename);
        NiMatrix3::MakeRotation(&kMatX, NI_PI, 1.0, 0.0, 0.0);
        v283 = 500.0;
        *(float *)&i64Val = 350.0;
        qmemcpy(&kMat, &kMatX, sizeof(kMat));
        *((float *)&i64Val + 1) = 1000.0;
        iOffY = 0;
        iOffX = (int)&v261->m_AniActor[0].m_AniSeqIDOffset;
        v262 = (int)&v261->m_pkDice[0].m_pActorMgr;
        do
        {
          if ( *(_BYTE *)(v262 + 4) && *(_DWORD *)v262 )
            v263 = *(_DWORD *)(*(_DWORD *)v262 + 12);
          else
            v263 = *(_DWORD *)(v262 - 4);
          qmemcpy((void *)(v263 + 52), &kMat, 0x24u);
          if ( *(_BYTE *)(v262 + 4) && *(_DWORD *)v262 )
            v264 = *(_DWORD *)(*(_DWORD *)v262 + 12);
          else
            v264 = *(_DWORD *)(v262 - 4);
          v265 = i64Val;
          *(float *)(v264 + 88) = v283;
          v266 = HIDWORD(i64Val);
          *(_DWORD *)(v264 + 92) = v265;
          *(_DWORD *)(v264 + 96) = v266;
          if ( *(_BYTE *)(v262 + 4) && *(_DWORD *)v262 )
            v267 = *(_DWORD *)(*(_DWORD *)v262 + 12);
          else
            v267 = *(_DWORD *)(v262 - 4);
          ((void (__stdcall *)(int, _DWORD))v287->m_pRunEffect.m_pObject->vfptr[29].__vecDelDtor)(v267, 0);
          v268 = iOffY;
          *(_WORD *)iOffX = iOffY + 1;
          if ( *(_BYTE *)(v262 + 4) && *(_DWORD *)v262 )
            v269 = *(_DWORD *)(*(_DWORD *)v262 + 12);
          else
            v269 = *(_DWORD *)(v262 - 4);
          *(_WORD *)(v269 + 28) |= 1u;
          iOffX += 12;
          v262 += 44;
          iOffY = v268 + 1;
        }
        while ( v268 + 1 < 3 );
        v270 = v287;
        v271 = v287->vfptr;
        v287->m_fDiceAniTime = 0.0;
        v272 = v271[59].__vecDelDtor;
        v270->m_fRewardTime = 0.0;
        v270->m_fResultTime = 0.0;
        v270->m_uiSuccessNum = 0;
        *(_DWORD *)&v270->m_bIsResetTimer = 0;
        v270->m_bIsHappendBigPot = 0;
        ((void (__stdcall *)(unsigned int, unsigned int, _DWORD, _DWORD))v272)(
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          0.5,
          0.5);
        if ( Filename._Myres >= 0x10 )
          operator delete(Filename._Bx._Ptr);
        Filename._Myres = 15;
        Filename._Mysize = 0;
        Filename._Bx._Buf[0] = 0;
        if ( Directoryname._Myres >= 0x10 )
          operator delete(Directoryname._Bx._Ptr);
        Directoryname._Myres = 15;
        Directoryname._Mysize = 0;
        Directoryname._Bx._Buf[0] = 0;
        if ( strPath._Myres >= 0x10 )
          operator delete(strPath._Bx._Ptr);
        strPath._Myres = 15;
        strPath._Mysize = 0;
        strPath._Bx._Buf[0] = 0;
        LOBYTE(v334) = 1;
        UIUtil::~UIUtil(&ui);
        v273 = spTexProp.m_pObject;
        LOBYTE(v334) = 0;
        if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
          v273->vfptr->__vecDelDtor((NiRefObject *)v273, 1u);
        v274 = spNode.m_pObject;
        v334 = -1;
        if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v274 )
          v274->vfptr->__vecDelDtor((NiRefObject *)v274, 1u);
        v11 = 1;
      }
      else
      {
        LOBYTE(v334) = 1;
        UIUtil::~UIUtil(&ui);
        v188 = spTexProp.m_pObject;
        LOBYTE(v334) = 0;
        if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
          v188->vfptr->__vecDelDtor((NiRefObject *)v188, 1u);
        v189 = spNode.m_pObject;
        v334 = -1;
        if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v189 )
          return 0;
        v189->vfptr->__vecDelDtor((NiRefObject *)v189, 1u);
        v11 = 0;
      }
    }
    else
    {
      LOBYTE(v334) = 1;
      UIUtil::~UIUtil(&ui);
      v182 = spTexProp.m_pObject;
      LOBYTE(v334) = 0;
      if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
        v182->vfptr->__vecDelDtor((NiRefObject *)v182, 1u);
      v183 = spNode.m_pObject;
      v334 = -1;
      if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v183 )
        return 0;
      v183->vfptr->__vecDelDtor((NiRefObject *)v183, 1u);
      v11 = 0;
    }
  }
  else
  {
    LOBYTE(v334) = 1;
    UIUtil::~UIUtil(&ui);
    v176 = spTexProp.m_pObject;
    LOBYTE(v334) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&spTexProp.m_pObject->m_uiRefCount) )
      v176->vfptr->__vecDelDtor((NiRefObject *)v176, 1u);
    v177 = spNode.m_pObject;
    v334 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v177 )
      return 0;
    v177->vfptr->__vecDelDtor((NiRefObject *)v177, 1u);
    v11 = 0;
  }
  return v11;
}
// A8975C: using guessed type bool Folder::m_bInit;
// B622CC: using guessed type const float NI_PI;

//----- (0071F5A0) --------------------------------------------------------
void __thiscall mhDiceRankWin::mhDiceRankWin(mhDiceRankWin *this)
{
  mhDiceRankWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&mhDiceRankWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&mhDiceRankWin::`vftable'{for `IDirectMessenger'};
  v1->m_CarrerRankList._Myfirst = 0;
  v1->m_CarrerRankList._Mylast = 0;
  v1->m_CarrerRankList._Myend = 0;
  v1->m_CurRankList._Myfirst = 0;
  v1->m_CurRankList._Mylast = 0;
  v1->m_CurRankList._Myend = 0;
}
// 9CD130: using guessed type void (__thiscall *mhDiceRankWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CD14C: using guessed type int (__thiscall *mhDiceRankWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0071F5F0) --------------------------------------------------------
void __thiscall mhDiceRankWin::~mhDiceRankWin(mhDiceRankWin *this)
{
  mhDiceRankWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&mhDiceRankWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhDiceRankWin::`vftable'{for `IDirectMessenger'};
  if ( this->m_CurRankList._Myfirst )
    operator delete(this->m_CurRankList._Myfirst);
  v1->m_CurRankList._Myfirst = 0;
  v1->m_CurRankList._Mylast = 0;
  v1->m_CurRankList._Myend = 0;
  if ( v1->m_CarrerRankList._Myfirst )
    operator delete(v1->m_CarrerRankList._Myfirst);
  v1->m_CarrerRankList._Myfirst = 0;
  v1->m_CarrerRankList._Mylast = 0;
  v1->m_CarrerRankList._Myend = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9CD130: using guessed type void (__thiscall *mhDiceRankWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CD14C: using guessed type int (__thiscall *mhDiceRankWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0071F660) --------------------------------------------------------
mhDiceRankWin *__cdecl mhDiceRankWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  mhDiceRankWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x28Cu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&mhDiceRankWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&mhDiceRankWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[2].m_kWorldBound.m_kCenter.z) = 0;
    LODWORD(v2[2].m_kWorldBound.m_fRadius) = 0;
    LODWORD(v2[2].m_kLocal.m_Rotate.m_pEntry[0][0]) = 0;
    LODWORD(v2[2].m_kLocal.m_Rotate.m_pEntry[0][2]) = 0;
    LODWORD(v2[2].m_kLocal.m_Rotate.m_pEntry[1][0]) = 0;
    LODWORD(v2[2].m_kLocal.m_Rotate.m_pEntry[1][1]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (mhDiceRankWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9CD130: using guessed type void (__thiscall *mhDiceRankWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CD14C: using guessed type int (__thiscall *mhDiceRankWin::`vftable'{for `NiNode'})(void *p, char);

//----- (0071F7C0) --------------------------------------------------------
void __thiscall mhDiceRankWin::UpdateList(mhDiceRankWin *this, std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > RankList)
{
  mhDiceRankWin *v2; // edi@1
  int v3; // esi@1
  DiceRankInfo *v4; // ebx@1
  int v5; // ecx@1
  unsigned int v6; // edx@1
  unsigned int v7; // eax@1
  unsigned int v8; // edx@2
  MHDiceGameTask *v9; // ecx@7
  MHDiceGameTask *v10; // ebx@8
  unsigned int v11; // ebx@16
  SlideListWin *v12; // ecx@16
  unsigned int v13; // eax@16
  unsigned int v14; // edx@16
  NiPointer<MHDiceGameTask> result; // [sp+14h] [bp-BCh]@7
  int *v16; // [sp+18h] [bp-B8h]@3
  int v17; // [sp+1Ch] [bp-B4h]@3
  unsigned int i; // [sp+20h] [bp-B0h]@2
  bool v19; // [sp+27h] [bp-A9h]@7
  char szdata[128]; // [sp+28h] [bp-A8h]@1
  char acname[21]; // [sp+A8h] [bp-28h]@16
  int v22; // [sp+CCh] [bp-4h]@1

  v2 = this;
  v3 = 0;
  v22 = 0;
  szdata[0] = 0;
  memset(&szdata[1], 0, 0x7Fu);
  v4 = RankList._Myfirst;
  v2->m_iMedalCnt[0] = 0;
  v5 = (int)v2->m_iMedalCnt;
  *(_DWORD *)(v5 + 4) = 0;
  *(_DWORD *)(v5 + 8) = 0;
  v6 = (signed int)((unsigned __int64)(715827883i64
                                     * (unsigned int)((char *)RankList._Mylast - (char *)RankList._Myfirst)) >> 32) >> 2;
  v7 = v6 + (v6 >> 31);
  if ( v7 )
  {
    v8 = RankList._Myfirst->nWinCnt;
    i = 0;
    if ( v7 > 0 )
    {
      v17 = 1;
      v16 = v2->m_iMedalCnt;
      while ( 1 )
      {
        if ( v4[v3].nWinCnt < v8 )
        {
          ++v16;
          ++v17;
        }
        v9 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
        LOBYTE(v22) = 1;
        v19 = MHDiceGameTask::IsGambleMode(v9);
        LOBYTE(v22) = 0;
        if ( result.m_pObject )
        {
          v10 = result.m_pObject;
          if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
          {
            if ( v10 )
              v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
          }
        }
        if ( v19 )
        {
          sprintf(szdata, "%d%s", v17, "  ");
        }
        else if ( v17 - 1 >= 3 )
        {
          sprintf(szdata, "%d%s", v17, "  ");
        }
        else
        {
          *v16 = i + 1;
          sprintf(szdata, "%s", &unk_9CA171);
        }
        v11 = SlideListWin::AddText(v2->m_pUserList, szdata);
        *(_DWORD *)acname = RankList._Myfirst[v3].sCharID.n5_code[0];
        *(_DWORD *)&acname[4] = RankList._Myfirst[v3].sCharID.n5_code[1];
        *(_DWORD *)&acname[8] = RankList._Myfirst[v3].sCharID.n5_code[2];
        v12 = v2->m_pUserList;
        *(_DWORD *)&acname[12] = RankList._Myfirst[v3].sCharID.n5_code[3];
        *(_DWORD *)&acname[16] = RankList._Myfirst[v3].sCharID.n5_code[4];
        acname[20] = 0;
        SlideListWin::SetText(v12, v11, 1u, acname);
        SlideListWin::AlignText(v2->m_pUserList, 1u, 4u);
        sprintf(szdata, "%d", RankList._Myfirst[v3].nWinCnt);
        SlideListWin::SetText(v2->m_pUserList, v11, 2u, szdata);
        v4 = RankList._Myfirst;
        v13 = RankList._Myfirst[v3].nWinCnt;
        ++i;
        v14 = (signed int)((unsigned __int64)(715827883i64
                                            * (unsigned int)((char *)RankList._Mylast - (char *)RankList._Myfirst)) >> 32) >> 2;
        ++v3;
        if ( i >= v14 + (v14 >> 31) )
          break;
        v8 = v13;
      }
    }
  }
  SlideListWin::UpdateViewList(v2->m_pUserList);
  if ( RankList._Myfirst )
    operator delete(RankList._Myfirst);
}

//----- (0071FA40) --------------------------------------------------------
void __thiscall mhDiceRankWin::UpdateViewList(mhDiceRankWin *this)
{
  mhDiceRankWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  bool v3; // zf@2
  std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > v4; // [sp-10h] [bp-18h]@2
  std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *v5; // [sp+4h] [bp-4h]@2

  v1 = this;
  v2 = this->m_pUserList;
  if ( v2 )
  {
    SlideListWin::RemoveAllList(v2);
    v3 = v1->m_nCurSelTab == 1;
    v5 = &v4;
    if ( v3 )
      std::vector<SlotJackpotRankInfo,std::allocator<SlotJackpotRankInfo>>::vector<SlotJackpotRankInfo,std::allocator<SlotJackpotRankInfo>>(
        &v4,
        &v1->m_CarrerRankList);
    else
      std::vector<SlotJackpotRankInfo,std::allocator<SlotJackpotRankInfo>>::vector<SlotJackpotRankInfo,std::allocator<SlotJackpotRankInfo>>(
        &v4,
        &v1->m_CurRankList);
    mhDiceRankWin::UpdateList(v1, v4);
    SlideBar::SetSplitCnt(v1->m_pkSlideBarEx, 0);
  }
}

//----- (0071FAA0) --------------------------------------------------------
void __thiscall mhDiceRankWin::OnCommand(mhDiceRankWin *this, unsigned int wParam, int lParam)
{
  mhDiceRankWin *v3; // ebx@1
  MHDiceGameTask *v4; // edi@2
  void (__thiscall ***v5)(_DWORD, _DWORD); // esi@3
  MHDiceGameTask *v6; // edi@10
  MHDiceGameTask *v7; // esi@11
  MHDiceGameTask *v8; // ecx@19
  MHDiceGameTask *v9; // esi@20
  NiPointer<MHDiceGameTask> v10; // [sp+10h] [bp-14h]@19
  NiPointer<MHDiceGameTask> result; // [sp+14h] [bp-10h]@10
  int v12; // [sp+20h] [bp-4h]@19

  v3 = this;
  switch ( wParam )
  {
    case 0u:
      v4 = MHDiceGameTask::GetDiceGameTask((NiPointer<MHDiceGameTask> *)&wParam)->m_pObject;
      if ( wParam )
      {
        v5 = (void (__thiscall ***)(_DWORD, _DWORD))wParam;
        if ( !InterlockedDecrement((volatile LONG *)(wParam + 4)) )
        {
          if ( v5 )
            (**v5)(v5, 1);
        }
      }
      if ( v4 && MHDiceGameTask::IsGambleMode(v4) )
        MHDiceGameTask::NcGambleDiceTaisaiAllRankReq();
      else
        mhDiceRankWin::OnTAB1(v3);
      break;
    case 1u:
      v6 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
      if ( result.m_pObject )
      {
        v7 = result.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
        {
          if ( v7 )
            v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
        }
      }
      if ( v6 && MHDiceGameTask::IsGambleMode(v6) )
        MHDiceGameTask::NcGambleDiceTaisaiCurrRankReq();
      else
        mhDiceRankWin::OnTAB2(v3);
      break;
    case 2u:
      mhDiceRankWin::OnSlideBar(this);
      break;
    case 4u:
    case 5u:
      v8 = MHDiceGameTask::GetDiceGameTask(&v10)->m_pObject;
      v12 = 0;
      MHDiceGameTask::OnCloseWin((PgWin *)&v3->vfptr);
      v12 = -1;
      if ( v10.m_pObject )
      {
        v9 = v10.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&v10.m_pObject->m_uiRefCount) )
        {
          if ( v9 )
            v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
        }
      }
      break;
    default:
      return;
  }
}

//----- (0071FC60) --------------------------------------------------------
char __thiscall mhDiceHelpWin::Create(mhDiceHelpWin *this, PgFrameWork *pkFrameWork)
{
  mhDiceHelpWin *v2; // esi@1
  const char *v3; // eax@3
  NiNode *v4; // ecx@3
  NiNode *v5; // esi@7
  char result; // al@10
  NiAVObject *v7; // eax@11
  NiTexturingProperty *v8; // edi@11
  NiTexturingProperty::Map *v9; // eax@13
  NiSourceTexture *v10; // eax@14
  NiNode *v11; // edi@17
  PgSprData *v12; // eax@22
  NiNode *v13; // edi@25
  int v14; // edi@29
  NiSourceTexture *v15; // eax@29
  PgSprData *v16; // eax@30
  PgFont *v17; // eax@34
  PgWinText *v18; // edi@34
  NiUnsharedGeometryGroup *v19; // eax@34
  SLWCreateInfo::Item *v20; // eax@34
  PgSprData *v21; // eax@34
  SlideListWin *v22; // eax@34
  NiUnsharedGeometryGroup *v23; // eax@35
  NiUnsharedGeometryGroup *v24; // eax@35
  NiUnsharedGeometryGroup *v25; // eax@35
  NiUnsharedGeometryGroup *v26; // eax@35
  NiUnsharedGeometryGroup *v27; // eax@35
  NiUnsharedGeometryGroup *v28; // eax@35
  NiUnsharedGeometryGroup *v29; // eax@35
  NiUnsharedGeometryGroup *v30; // eax@35
  NiUnsharedGeometryGroup *v31; // eax@35
  NiUnsharedGeometryGroup *v32; // eax@35
  PgWinText *v33; // eax@35
  NiRefObjectVtbl *v34; // edx@35
  char *v35; // edi@36
  int v36; // eax@38
  unsigned int v37; // eax@38
  unsigned int v38; // edi@38
  unsigned int v39; // eax@38
  unsigned int v40; // edi@42
  const void *v41; // eax@44
  SlideListWin *v42; // ecx@46
  PgSprData *v43; // eax@50
  SlideBar *v44; // eax@50
  PgWinBut *v45; // edi@50
  D3DXCOLOR v46; // ST1C_16@50
  char *v47; // eax@50
  SLWCreateInfo kCreateInfo; // [sp+28h] [bp-28Ch]@34
  unsigned int found; // [sp+44h] [bp-270h]@38
  unsigned int uiHeight; // [sp+48h] [bp-26Ch]@32
  unsigned int uiWidth; // [sp+4Ch] [bp-268h]@32
  UIUtil ui; // [sp+50h] [bp-264h]@29
  PgWinText *pkTestWin; // [sp+64h] [bp-250h]@29
  HDC__ *hDC; // [sp+68h] [bp-24Ch]@14
  NiPointer<NiTexturingProperty> spTexProp; // [sp+6Ch] [bp-248h]@1
  char _Ptr; // [sp+70h] [bp-244h]@35
  unsigned int iLen; // [sp+74h] [bp-240h]@1
  int uiTop; // [sp+78h] [bp-23Ch]@22
  int uiLeft; // [sp+7Ch] [bp-238h]@22
  int lengthSize; // [sp+80h] [bp-234h]@34
  NiPointer<NiNode> spNode; // [sp+84h] [bp-230h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strText; // [sp+88h] [bp-22Ch]@34
  char acStr[256]; // [sp+A4h] [bp-210h]@35
  char buffer[256]; // [sp+1A4h] [bp-110h]@42
  int v65; // [sp+2B0h] [bp-4h]@1

  v2 = this;
  iLen = (unsigned int)pkFrameWork;
  spNode.m_pObject = 0;
  v65 = 0;
  spTexProp.m_pObject = (NiTexturingProperty *)pTexturePalette;
  if ( !Folder::m_bInit )
    Folder::Init();
  v3 = Folder::Merge(&Folder::m_acMenu, "Game\\DiceGameHelp.nif");
  PgUtil::LoadNodeNifFile(v3, &spNode, (NiTexturePalette *)spTexProp.m_pObject);
  v4 = spNode.m_pObject;
  if ( !spNode.m_pObject )
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("Game\\DiceGameHelp.nif load fail", "LoadFail", 0);
      v4 = spNode.m_pObject;
    }
    v65 = -1;
    if ( v4 )
    {
      v5 = v4;
      if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
      {
        if ( v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
    }
    return 0;
  }
  v2->m_pkFrameWork = pkFrameWork;
  v7 = (NiAVObject *)((int (__stdcall *)(const char *))v4->vfptr[18].__vecDelDtor)("Frame");
  v8 = (NiTexturingProperty *)NiAVObject::GetProperty(v7, 8);
  spTexProp.m_pObject = v8;
  if ( v8 )
    InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  v9 = *v8->m_kMaps.m_pBase;
  LOBYTE(v65) = 1;
  if ( !v9 || (v10 = (NiSourceTexture *)v9->m_spTexture.m_pObject, (hDC = (HDC__ *)v10) == 0) )
  {
    LOBYTE(v65) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v11 = spNode.m_pObject;
    v65 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v11 )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    return 0;
  }
  v12 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v10);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v12, 0, (PgFrameWork *)iLen, "DiceHelp", 0) )
  {
    LOBYTE(v65) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v13 = spNode.m_pObject;
    v65 = -1;
    if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v13 )
    {
      v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
      return 0;
    }
    return 0;
  }
  v14 = uiLeft;
  iLen = uiTop;
  pkTestWin = (PgWinText *)uiLeft;
  UIUtil::UIUtil(&ui);
  LOBYTE(v65) = 2;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, v14, iLen);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v15 = MenuTexMgr::GetTexture(0x13u);
  if ( v15 )
    v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v15);
  else
    v16 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
  PgWinSpr::CreateWin(uiLeft - v14, uiTop - iLen, v16, (PgWin *)&v2->vfptr, 0, 0);
  UIUtil::CreateSpr(&ui, "Panel01", 0);
  UIUtil::CreateSpr(&ui, "Panel02", 0);
  if ( PgUtil::GetTriShapeRect((NiAVObject *)&spNode.m_pObject->vfptr, "WinTitle", &uiLeft, &uiTop, &uiWidth, &uiHeight) )
  {
    v17 = Font::Get(MAIN_MENU);
    v18 = PgWinText::CreateWin(uiLeft - v14, uiTop - iLen, uiWidth, uiHeight, v17, (PgWin *)&v2->vfptr, 0, 0);
    v18->vfptr[122].__vecDelDtor((NiRefObject *)v18, 1u);
    lengthSize = (int)&v18->vfptr[118];
    v19 = TextData2::Get(0x34361593u);
    (*(void (__thiscall **)(PgWinText *, NiUnsharedGeometryGroup *))lengthSize)(v18, v19);
    v18->vfptr[60].__vecDelDtor((NiRefObject *)v18, 0);
    kCreateInfo.m_arrItem._Myfirst = 0;
    kCreateInfo.m_arrItem._Mylast = 0;
    kCreateInfo.m_arrItem._Myend = 0;
    kCreateInfo.m_bMakeData = 0;
    kCreateInfo.m_nOffX = 0;
    kCreateInfo.m_nOffY = 0;
    LOBYTE(v65) = 3;
    SLWCreateInfo::Clear(&kCreateInfo);
    v20 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
    v20->nItemType = 1;
    v20->pNode = spNode.m_pObject;
    lengthSize = (int)v20;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &strText,
      "Column01");
    LOBYTE(v65) = 4;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)(lengthSize + 72),
      &strText);
    LOBYTE(v65) = 3;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&strText);
    lengthSize = (int)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
    *(_DWORD *)lengthSize = 2;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
      &strText,
      "Column01");
    LOBYTE(v65) = 5;
    std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
      (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)(lengthSize + 72),
      &strText);
    LOBYTE(v65) = 3;
    std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&strText);
    *(NiPointer<NiNode> *)(lengthSize + 4) = spNode;
    SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
    v21 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Plane01", &uiLeft, &uiTop, (NiSourceTexture *)hDC);
    v22 = SlideListWin::CreateWin(
            uiLeft - (_DWORD)pkTestWin + 20,
            uiTop - iLen + 50,
            v21,
            (PgWin *)&v2->vfptr,
            &kCreateInfo,
            0,
            0);
    v2->m_pListWin = v22;
    if ( v22 )
    {
      strText._Myres = 15;
      strText._Mysize = 0;
      strText._Bx._Buf[0] = 0;
      LOBYTE(v65) = 6;
      v23 = TextData2::Get(0x40311889u);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator=(&strText, (const char *)v23);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
      v24 = TextData2::Get(0x47311344u);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strText, (const char *)v24);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
      v25 = TextData2::Get(0x4B352598u);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strText, (const char *)v25);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
      v26 = TextData2::Get(0x808782DD);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strText, (const char *)v26);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
      v27 = TextData2::Get(0x3F768289u);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strText, (const char *)v27);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
      v28 = TextData2::Get(0x3F778289u);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strText, (const char *)v28);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
      v29 = TextData2::Get(0x3F788289u);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strText, (const char *)v29);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
      v30 = TextData2::Get(0x3F798289u);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strText, (const char *)v30);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
      v31 = TextData2::Get(0x3F7A8289u);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strText, (const char *)v31);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
      v32 = TextData2::Get(0x68B3DAA3u);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strText, (const char *)v32);
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, byte_9CAE08, 0);
      acStr[0] = 0;
      memset(&acStr[1], 0, 0xFFu);
      v33 = SlideListWin::GetTextWin(v2->m_pListWin, 0, 0);
      v34 = v18->vfptr;
      pkTestWin = v33;
      hDC = *(HDC__ **)(((int (__thiscall *)(PgWinText *))v34[114].__vecDelDtor)(v18) + 192);
      _Ptr = 10;
      while ( 1 )
      {
        memset(acStr, 0, 0x100u);
        v35 = strText._Bx._Ptr;
        if ( strText._Myres < 0x10 )
          v35 = (char *)&strText;
        v36 = ((int (*)(void))pkTestWin->vfptr[36].__vecDelDtor)();
        v37 = PgUtil::StringPixelCopy(acStr, v35, hDC, v36);
        v38 = v37;
        iLen = v37;
        v39 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::find(&strText, &_Ptr, 0, 1u);
        found = v39;
        if ( !v38 )
          break;
        if ( v39 >= v38 || (lengthSize = v39, v39 == -1) )
          lengthSize = v38;
        buffer[0] = 0;
        memset(&buffer[1], 0, 0xFFu);
        v40 = lengthSize;
        if ( strText._Mysize < lengthSize )
          v40 = strText._Mysize;
        v41 = strText._Bx._Ptr;
        if ( strText._Myres < 0x10 )
          v41 = &strText;
        memcpy_s(buffer, 0xFFu, v41, v40);
        v42 = v2->m_pListWin;
        buffer[v40] = 0;
        SlideListWin::AddText(v42, buffer);
        SlideListWin::AddText(v2->m_pListWin, &byte_9CA167);
        if ( found > iLen )
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::erase(&strText, 0, lengthSize);
        else
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::erase(&strText, 0, lengthSize + 1);
      }
      v2->m_pListWin->m_bCheckEnable = 0;
      SlideListWin::AlignText(v2->m_pListWin, 4u);
      SlideListWin::UpdateViewList(v2->m_pListWin);
      LOBYTE(v65) = 3;
      std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&strText);
    }
    v43 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle", &uiLeft, &uiTop, 0);
    v44 = SlideBar::CreateWin(
            spNode.m_pObject,
            "SlideBar",
            "SlideBar_UpBtn",
            "SlideBar_DnBtn",
            v43,
            0,
            (PgWin *)&v2->vfptr);
    v2->m_pSlideBar = v44;
    v44->m_uiClickMsg = 3;
    v2->m_pSlideBar->m_eType = 1;
    SlideBar::SetSplitCnt(v2->m_pSlideBar, v2->m_pListWin->m_nSlideSplitCnt);
    UIUtil::CreateBtn(&ui, 1u, "ClsNor", "ClsClick", "ClsOver", 0, 0);
    v45 = UIUtil::CreateBtn(&ui, 2u, "Btn02Nor", "Btn02Click", "Btn02Over", 0, 0);
    *(_QWORD *)&v46.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v46.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v47 = (char *)TextData2::Get(0xE2ED9AD6);
    UIUtil::CreateAttachedText((PgWin *)&v45->vfptr, v47, v46, 5u);
    ((void (__thiscall *)(mhDiceHelpWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.1,
      0.30000001);
    LOBYTE(v65) = 2;
    SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
    LOBYTE(v65) = 1;
    UIUtil::~UIUtil(&ui);
    LOBYTE(v65) = 0;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
    v65 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    result = 1;
  }
  else
  {
    LOBYTE(v65) = 1;
    UIUtil::~UIUtil(&ui);
    LOBYTE(v65) = 0;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
    v65 = -1;
    NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
    result = 0;
  }
  return result;
}
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (007206B0) --------------------------------------------------------
char __thiscall mhDiceRankWin::Create(mhDiceRankWin *this, PgFrameWork *pkFrameWork)
{
  mhDiceRankWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiNode *v5; // ecx@3
  NiNode *v6; // esi@7
  char result; // al@10
  NiAVObject *v8; // eax@11
  NiTexturingProperty *v9; // eax@11
  NiTexturingProperty *v10; // edi@11
  NiTexturingProperty::Map *v11; // eax@13
  NiSourceTexture *v12; // eax@14
  NiNode *v13; // esi@17
  PgSprData *v14; // eax@21
  NiNode *v15; // esi@24
  int v16; // edi@28
  int v17; // ebx@28
  NiSourceTexture *v18; // eax@28
  PgSprData *v19; // eax@29
  PgFont *v20; // eax@32
  PgWinText *v21; // eax@32
  NiRefObjectVtbl *v22; // edx@32
  NiUnsharedGeometryGroup *v23; // eax@32
  D3DXCOLOR v24; // ST60_16@32
  char *v25; // eax@32
  SLWCreateInfo::Item *v26; // eax@32
  PgSprData *v27; // eax@32
  SlideListWin *v28; // eax@32
  PgSprData *v29; // eax@32
  SlideBar *v30; // eax@32
  PgWinBut *v31; // ecx@32
  int (*v32)(void); // edx@32
  int v33; // eax@32
  int v34; // eax@32
  float v35; // ecx@32
  PgWinText *v36; // eax@32
  PgFont *v37; // eax@32
  NiUnsharedGeometryGroup *v38; // eax@32
  float v39; // ecx@32
  PgWinText *v40; // eax@32
  PgFont *v41; // eax@32
  NiUnsharedGeometryGroup *v42; // eax@32
  PgFont *v43; // eax@35
  NiUnsharedGeometryGroup *v44; // eax@35
  PgFont *v45; // eax@36
  NiUnsharedGeometryGroup *v46; // eax@36
  PgFont *v47; // eax@37
  PgWinText *v48; // edi@37
  NiRefObjectVtbl *v49; // ebx@37
  NiUnsharedGeometryGroup *v50; // eax@37
  int v51; // edi@37
  signed int v52; // ebx@37
  PgSprData *pkSprData; // ST174_4@38
  PgWinSpr *v54; // eax@38
  PgWinSpr *v55; // eax@38
  PgWinSpr *v56; // eax@38
  SLWCreateInfo kCreateInfo; // [sp+178h] [bp-80h]@32
  UIUtil ui; // [sp+194h] [bp-64h]@28
  NiPointer<NiTexturingProperty> spTexProp; // [sp+1A8h] [bp-50h]@11
  NiSourceTexture *pkTexture; // [sp+1ACh] [bp-4Ch]@14
  unsigned int uiWidth; // [sp+1B0h] [bp-48h]@31
  unsigned int uiHeight; // [sp+1B4h] [bp-44h]@31
  PgWinBut *pkBtn; // [sp+1B8h] [bp-40h]@32
  int uiTop; // [sp+1BCh] [bp-3Ch]@21
  int uiLeft; // [sp+1C0h] [bp-38h]@21
  NiPointer<NiNode> spNode; // [sp+1C4h] [bp-34h]@1
  PgWinText *pkTextWin; // [sp+1C8h] [bp-30h]@32
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+1CCh] [bp-2Ch]@32
  int v69; // [sp+1F4h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v69 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\DiceGameHallOfFame.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = spNode.m_pObject;
  if ( !spNode.m_pObject )
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("Game\\DiceGameHallOfFame.nif load fail", "LoadFail", spNode.m_pObject);
      v5 = spNode.m_pObject;
    }
    v69 = -1;
    if ( v5 )
    {
      v6 = v5;
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    return 0;
  }
  v2->m_pkFrameWork = pkFrameWork;
  v8 = (NiAVObject *)((int (__stdcall *)(const char *))v5->vfptr[18].__vecDelDtor)("Frame");
  v9 = (NiTexturingProperty *)NiAVObject::GetProperty(v8, 8);
  v10 = v9;
  spTexProp.m_pObject = v9;
  if ( v9 )
    InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  v11 = *v10->m_kMaps.m_pBase;
  LOBYTE(v69) = 1;
  if ( v11 && (v12 = (NiSourceTexture *)v11->m_spTexture.m_pObject, (pkTexture = v12) != 0) )
  {
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v12);
    if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v14, 0, pkFrameWork, "DiceRank", 0) )
    {
      v16 = uiLeft;
      v17 = uiTop;
      UIUtil::UIUtil(&ui);
      LOBYTE(v69) = 2;
      UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
      UIUtil::SetOffset(&ui, v16, v17);
      UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
      v18 = MenuTexMgr::GetTexture(0x13u);
      if ( v18 )
        v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v18);
      else
        v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
      PgWinSpr::CreateWin(uiLeft - v16, uiTop - v17, v19, (PgWin *)&v2->vfptr, 0, 0);
      UIUtil::CreateSpr(&ui, "Panel01", 0);
      UIUtil::CreateSpr(&ui, "Panel02", 0);
      UIUtil::CreateSpr(&ui, "Panel03", 0);
      UIUtil::CreateSpr(&ui, "Plane01", 0);
      if ( PgUtil::GetTriShapeRect(
             (NiAVObject *)&spNode.m_pObject->vfptr,
             "WinTitle",
             &uiLeft,
             &uiTop,
             &uiWidth,
             &uiHeight) )
      {
        v20 = Font::Get(MAIN_MENU);
        v21 = PgWinText::CreateWin(uiLeft - v16, uiTop - v17, uiWidth, uiHeight, v20, (PgWin *)&v2->vfptr, 0, 0);
        v22 = v21->vfptr;
        pkTextWin = v21;
        v22[122].__vecDelDtor((NiRefObject *)v21, 1u);
        pkBtn = (PgWinBut *)&pkTextWin->vfptr[118];
        v23 = TextData2::Get(0x38956697u);
        ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkBtn->vfptr)(pkTextWin, v23);
        ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
        pkBtn = UIUtil::CreateBtn(&ui, 5u, "Btn01Nor", "Btn01Click", "Btn01Over", 0, 0);
        *(_QWORD *)&v24.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
        *(_QWORD *)&v24.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
        v25 = (char *)TextData::Get(0x4F5F499Fu);
        UIUtil::CreateAttachedText((PgWin *)&pkBtn->vfptr, v25, v24, 5u);
        UIUtil::CreateBtn(&ui, 4u, "ClsNor", "ClsClick", "ClsOver", 0, 0);
        kCreateInfo.m_arrItem._Myfirst = 0;
        kCreateInfo.m_arrItem._Mylast = 0;
        kCreateInfo.m_arrItem._Myend = 0;
        kCreateInfo.m_bMakeData = 0;
        kCreateInfo.m_nOffX = 0;
        kCreateInfo.m_nOffY = 0;
        LOBYTE(v69) = 3;
        v26 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
        v26->nItemType = 1;
        v26->pNode = spNode.m_pObject;
        pkTextWin = (PgWinText *)v26;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
          &_Val,
          "ColumnBarNor");
        LOBYTE(v69) = 4;
        pkBtn = (PgWinBut *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2];
        std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
          (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
          &_Val);
        LOBYTE(v69) = 3;
        std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
          &_Val,
          "ColumnBarOver");
        LOBYTE(v69) = 5;
        std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
          (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkBtn,
          &_Val);
        LOBYTE(v69) = 3;
        std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
        pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
        pkTextWin->vfptr = (NiRefObjectVtbl *)2;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
          &_Val,
          "Column01");
        LOBYTE(v69) = 6;
        std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
          (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
          &_Val);
        LOBYTE(v69) = 3;
        std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
        pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
        pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
        pkTextWin->vfptr = (NiRefObjectVtbl *)2;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
          &_Val,
          "Column02");
        LOBYTE(v69) = 7;
        std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
          (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
          &_Val);
        LOBYTE(v69) = 3;
        std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
        pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
        pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
        pkTextWin->vfptr = (NiRefObjectVtbl *)2;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
          &_Val,
          "Column03");
        LOBYTE(v69) = 8;
        std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
          (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
          &_Val);
        LOBYTE(v69) = 3;
        std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
        pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
        kCreateInfo.m_nOffX = 3;
        kCreateInfo.m_nOffY = 0;
        SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
        v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextBox", &uiLeft, &uiTop, pkTexture);
        v28 = SlideListWin::CreateWin(uiLeft - v16, uiTop - v17, v27, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
        v2->m_pUserList = v28;
        v28->m_uiLClickMsg = 3;
        SlideListWin::AlignText(v2->m_pUserList, 0);
        SlideListWin::UpdateViewList(v2->m_pUserList);
        v29 = PgSprData::Create(
                (NiAVObject *)&spNode.m_pObject->vfptr,
                "SlideBar_SlideBtnMiddle",
                &uiLeft,
                &uiTop,
                pkTexture);
        v30 = SlideBar::CreateWin(
                spNode.m_pObject,
                "SlideBar",
                "SlideBar_UpBtn",
                "SlideBar_DnBtn",
                v29,
                0,
                (PgWin *)&v2->vfptr);
        v2->m_pkSlideBarEx = v30;
        v30->m_uiClickMsg = 2;
        v2->m_pkSlideBarEx->m_eType = 1;
        v31 = (PgWinBut *)v2->m_pkSlideBarEx;
        v32 = (int (*)(void))v2->m_pkSlideBarEx->vfptr[42].__vecDelDtor;
        pkTextWin = (PgWinText *)v2->m_pkSlideBarEx->vfptr;
        pkBtn = v31;
        v33 = v32();
        v34 = ((int (__stdcall *)(int))pkBtn->vfptr[41].__vecDelDtor)(v33);
        ((void (__thiscall *)(SlideBar *, int))pkTextWin[1].m_ppkExtra)(v2->m_pkSlideBarEx, v34);
        SlideBar::SetSplitCnt(v2->m_pkSlideBarEx, v2->m_pUserList->m_nSlideSplitCnt);
        pkTextWin = (PgWinText *)PgSprData::Create(
                                   (NiAVObject *)&spNode.m_pObject->vfptr,
                                   "JobTabOff01",
                                   &uiLeft,
                                   &uiTop,
                                   pkTexture);
        PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "JobTabOn01");
        v2->m_pkTab01 = ColumnBut::CreateWin(
                          uiLeft - v16,
                          uiTop - v17,
                          (PgSprData *)pkTextWin,
                          (PgWin *)&v2->vfptr,
                          0,
                          0);
        v35 = pkTextWin->m_kWorldBound.m_kCenter.x;
        v36 = *(PgWinText **)(*(_DWORD *)LODWORD(v35) + 20);
        pkBtn = *(PgWinBut **)(*(_DWORD *)LODWORD(v35) + 24);
        pkTextWin = v36;
        v37 = Font::Get(MAIN_MENU);
        pkTextWin = PgWinText::CreateWin(
                      uiLeft - v16,
                      uiTop - v17 + 1,
                      (unsigned int)pkTextWin,
                      (unsigned int)pkBtn,
                      v37,
                      (PgWin *)&v2->vfptr,
                      0,
                      0);
        pkTextWin->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWin, 5u);
        pkBtn = (PgWinBut *)&pkTextWin->vfptr[118];
        v38 = TextData2::Get(0xAA906580);
        ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))pkBtn->vfptr)(pkTextWin, v38);
        ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
        pkTextWin = (PgWinText *)PgSprData::Create(
                                   (NiAVObject *)&spNode.m_pObject->vfptr,
                                   "JobTabOff02",
                                   &uiLeft,
                                   &uiTop,
                                   pkTexture);
        PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "JobTabOn02");
        v2->m_pkTab02 = ColumnBut::CreateWin(
                          uiLeft - v16,
                          uiTop - v17,
                          (PgSprData *)pkTextWin,
                          (PgWin *)&v2->vfptr,
                          1u,
                          0);
        v39 = pkTextWin->m_kWorldBound.m_kCenter.x;
        v40 = *(PgWinText **)(*(_DWORD *)LODWORD(v39) + 20);
        pkBtn = *(PgWinBut **)(*(_DWORD *)LODWORD(v39) + 24);
        pkTextWin = v40;
        v41 = Font::Get(MAIN_MENU);
        pkTextWin = PgWinText::CreateWin(
                      uiLeft - v16,
                      uiTop - v17 + 1,
                      (unsigned int)pkTextWin,
                      (unsigned int)pkBtn,
                      v41,
                      (PgWin *)&v2->vfptr,
                      0,
                      0);
        pkTextWin->vfptr[122].__vecDelDtor((NiRefObject *)pkTextWin, 5u);
        pkBtn = (PgWinBut *)&pkTextWin->vfptr[118];
        v42 = TextData2::Get(0x41382D9Eu);
        ((void (__thiscall *)(_DWORD, _DWORD))pkBtn->vfptr)(pkTextWin, v42);
        ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
        if ( PgUtil::GetTriShapeRect(
               (NiAVObject *)&spNode.m_pObject->vfptr,
               "Text01",
               &uiLeft,
               &uiTop,
               &uiWidth,
               &uiHeight) )
        {
          v43 = Font::Get(SMALL);
          pkTextWin = PgWinText::CreateWin(uiLeft - v16, uiTop - v17, uiWidth, uiHeight, v43, (PgWin *)&v2->vfptr, 0, 0);
          pkBtn = (PgWinBut *)&pkTextWin->vfptr[118];
          v44 = TextData::Get(0x91B1F3ED);
          ((void (__thiscall *)(_DWORD, _DWORD))pkBtn->vfptr)(pkTextWin, v44);
          ((void (__stdcall *)(signed int))pkTextWin->vfptr[122].__vecDelDtor)(5);
          ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
          if ( PgUtil::GetTriShapeRect(
                 (NiAVObject *)&spNode.m_pObject->vfptr,
                 "Text02",
                 &uiLeft,
                 &uiTop,
                 &uiWidth,
                 &uiHeight) )
          {
            v45 = Font::Get(SMALL);
            pkTextWin = PgWinText::CreateWin(
                          uiLeft - v16,
                          uiTop - v17,
                          uiWidth,
                          uiHeight,
                          v45,
                          (PgWin *)&v2->vfptr,
                          0,
                          0);
            pkBtn = (PgWinBut *)&pkTextWin->vfptr[118];
            v46 = TextData::Get(0x1F4282A9u);
            ((void (__thiscall *)(_DWORD, _DWORD))pkBtn->vfptr)(pkTextWin, v46);
            ((void (__stdcall *)(signed int))pkTextWin->vfptr[122].__vecDelDtor)(5);
            ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
            if ( PgUtil::GetTriShapeRect(
                   (NiAVObject *)&spNode.m_pObject->vfptr,
                   "Text03",
                   &uiLeft,
                   &uiTop,
                   &uiWidth,
                   &uiHeight) )
            {
              v47 = Font::Get(SMALL);
              v48 = PgWinText::CreateWin(uiLeft - v16, uiTop - v17, uiWidth, uiHeight, v47, (PgWin *)&v2->vfptr, 0, 0);
              v49 = v48->vfptr;
              v50 = TextData2::Get(0xF7402742);
              v49[118].__vecDelDtor((NiRefObject *)v48, (unsigned int)v50);
              v48->vfptr[122].__vecDelDtor((NiRefObject *)v48, 5u);
              v48->vfptr[60].__vecDelDtor((NiRefObject *)v48, 0);
              v51 = (int)v2->m_pkSprRankSilver;
              v52 = 0;
              do
              {
                pkBtn = (PgWinBut *)PgSprData::Create(
                                      (NiAVObject *)&spNode.m_pObject->vfptr,
                                      "Rank_Gold",
                                      &uiLeft,
                                      &uiTop,
                                      pkTexture);
                pkTextWin = (PgWinText *)PgSprData::Create(
                                           (NiAVObject *)&spNode.m_pObject->vfptr,
                                           "Rank_Silver",
                                           &uiLeft,
                                           &uiTop,
                                           pkTexture);
                pkSprData = PgSprData::Create(
                              (NiAVObject *)&spNode.m_pObject->vfptr,
                              "Rank_Bronze",
                              &uiLeft,
                              &uiTop,
                              pkTexture);
                v54 = PgWinSpr::CreateWin(0, 0, (PgSprData *)pkBtn, (PgWin *)&v2->vfptr, 0, 0);
                *(_DWORD *)(v51 - 80) = v54;
                v54->vfptr[60].__vecDelDtor((NiRefObject *)v54, 0);
                (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v51 - 80) + 256))(0);
                v55 = PgWinSpr::CreateWin(0, 0, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 0, 0);
                *(_DWORD *)v51 = v55;
                v55->vfptr[60].__vecDelDtor((NiRefObject *)v55, 0);
                (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v51 + 256))(0);
                v56 = PgWinSpr::CreateWin(0, 0, pkSprData, (PgWin *)&v2->vfptr, 0, 0);
                *(_DWORD *)(v51 + 80) = v56;
                v56->vfptr[60].__vecDelDtor((NiRefObject *)v56, 0);
                (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v51 + 80) + 256))(0);
                v52 += 4;
                v51 += 4;
              }
              while ( v52 < 80 );
              ((void (__thiscall *)(mhDiceRankWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
                v2,
                PgWin::ms_uiScreenWidth,
                PgWin::ms_uiScreenHeight,
                0.40000001,
                0.5);
              v2->m_pkTab01->m_bCheck = 1;
              v2->m_pkTab02->m_bCheck = 0;
              v2->m_nCurSelTab = 1;
              LOBYTE(v69) = 2;
              SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
              LOBYTE(v69) = 1;
              UIUtil::~UIUtil(&ui);
              LOBYTE(v69) = 0;
              NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
              v69 = -1;
              NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
              return 1;
            }
          }
        }
        LOBYTE(v69) = 2;
        SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
      }
      LOBYTE(v69) = 1;
      UIUtil::~UIUtil(&ui);
      LOBYTE(v69) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
      v69 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      return 0;
    }
    LOBYTE(v69) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    v15 = spNode.m_pObject;
    v69 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v15 )
      return 0;
    v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
    result = 0;
  }
  else
  {
    LOBYTE(v69) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    v13 = spNode.m_pObject;
    v69 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v13 )
      return 0;
    v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
    result = 0;
  }
  return result;
}
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00721250) --------------------------------------------------------
void __thiscall MHDiceAniActor::MHDiceAniActor(MHDiceAniActor *this)
{
  this->vfptr = (mhObjActorVtbl *)&MHDiceAniActor::`vftable';
  this->m_uiAniSeqID = 999;
}
// 9CCA20: using guessed type int (__thiscall *MHDiceAniActor::`vftable')(void *p, char);

//----- (00721270) --------------------------------------------------------
void __thiscall MHChipEffect::~MHChipEffect(MHChipEffect *this)
{
  MHChipEffect *v1; // esi@1
  NiNode *v2; // edi@1
  NiNode *v3; // esi@6

  v1 = this;
  v2 = this->m_spEffect.m_pObject;
  if ( this->m_spEffect.m_pObject )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spEffect.m_pObject = 0;
  }
  NsEffect::~NsEffect(&v1->m_kEffect);
  ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)&v1->m_kMarkCheck);
  v3 = v1->m_spEffect.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
  {
    if ( v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  }
}

//----- (00721320) --------------------------------------------------------
void __thiscall mhDiceRankWin::OnSlideBar(mhDiceRankWin *this)
{
  mhDiceRankWin *v1; // esi@1
  SlideListWin *v2; // eax@1
  SlideBar *v3; // ecx@2

  v1 = this;
  v2 = this->m_pUserList;
  if ( v2 )
  {
    v3 = this->m_pkSlideBarEx;
    if ( v3 )
    {
      SlideBar::SetSplitCnt(v3, v2->m_nSlideSplitCnt);
      v1->m_pUserList->m_nViewStartPos = v1->m_pkSlideBarEx->m_nCurPos;
      SlideListWin::UpdateViewList(v1->m_pUserList);
    }
  }
}

//----- (00721370) --------------------------------------------------------
BettingBut *__thiscall BettingBut::`vector deleting destructor'(BettingBut *this, unsigned int a2)
{
  BettingBut *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&BettingBut::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&BettingBut::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9CBEB0: using guessed type void (__thiscall *BettingBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CBECC: using guessed type int (__thiscall *BettingBut::`vftable'{for `NiNode'})(void *p, char);

//----- (007213B0) --------------------------------------------------------
ToggleBut *__thiscall ToggleBut::`scalar deleting destructor'(ToggleBut *this, unsigned int a2)
{
  ToggleBut *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&ToggleBut::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&ToggleBut::`vftable'{for `IDirectMessenger'};
  PgWinBut::~PgWinBut((PgWinBut *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9CC108: using guessed type void (__thiscall *ToggleBut::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CC124: using guessed type int (__thiscall *ToggleBut::`vftable'{for `NiNode'})(void *p, char);

//----- (007213F0) --------------------------------------------------------
mhMinimizeDiceGameWin *__thiscall mhMinimizeDiceGameWin::`vector deleting destructor'(mhMinimizeDiceGameWin *this, unsigned int a2)
{
  mhMinimizeDiceGameWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&mhMinimizeDiceGameWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhMinimizeDiceGameWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9CC35C: using guessed type void (__thiscall *mhMinimizeDiceGameWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CC37C: using guessed type int (__thiscall *mhMinimizeDiceGameWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00721430) --------------------------------------------------------
mhDiceHelpWin *__thiscall mhDiceHelpWin::`vector deleting destructor'(mhDiceHelpWin *this, unsigned int a2)
{
  mhDiceHelpWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&mhDiceHelpWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhDiceHelpWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9CC5A0: using guessed type void (__thiscall *mhDiceHelpWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CC5BC: using guessed type int (__thiscall *mhDiceHelpWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00721470) --------------------------------------------------------
mhDiceRateSheetWin *__thiscall mhDiceRateSheetWin::`vector deleting destructor'(mhDiceRateSheetWin *this, unsigned int a2)
{
  mhDiceRateSheetWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&mhDiceRateSheetWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&mhDiceRateSheetWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9CC7E0: using guessed type void (__thiscall *mhDiceRateSheetWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CC7FC: using guessed type int (__thiscall *mhDiceRateSheetWin::`vftable'{for `NiNode'})(void *p, char);

//----- (007214B0) --------------------------------------------------------
void __thiscall BettingBut::DoRAction(BettingBut *this)
{
  BettingBut *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, 0);
}

//----- (007214D0) --------------------------------------------------------
void __thiscall ToggleBut::DoAction(ToggleBut *this)
{
  ToggleBut *v1; // esi@1
  PgWin *v2; // eax@1

  v1 = this;
  v2 = PgWin::GetParentWin((PgWin *)&this->vfptr);
  if ( v2 )
    PgWin::PostCommandMsg(v2, v1->m_uiCmdMsg, 1);
}

//----- (007214F0) --------------------------------------------------------
void __thiscall BettingBut::SetButShow(BettingBut *this, PgWinBut::ButShow eShow)
{
  BettingBut *v2; // esi@1
  BET_STATE v3; // eax@1
  PgWinBut::ButShow v4; // edi@4
  bool v5; // zf@5
  PgSpr *v6; // eax@6
  NiScreenElements *v7; // eax@7
  BET_STATE v8; // eax@9
  int v9; // eax@10
  int v10; // eax@11
  NiScreenElements *v11; // eax@15
  PgSpr *v12; // eax@17
  NiScreenElements *v13; // eax@18
  NiScreenElements *v14; // eax@21
  PgSpr *v15; // eax@23
  NiScreenElements *v16; // eax@24
  PgSpr *v17; // eax@26
  NiScreenElements *v18; // eax@27
  void *(__thiscall *v19)(NiRefObject *, unsigned int); // eax@30
  BettingBut *v20; // ecx@30
  NiPointer<HazeAccumulator> v21; // [sp+34h] [bp-4h]@22

  v2 = this;
  v3 = this->m_eBetState;
  if ( v3 != 2 && v3 != 3 && v3 != 4 )
  {
    v4 = eShow;
    if ( this->m_eButShow != eShow )
    {
      ((void (__stdcall *)(_DWORD))this->vfptr[139].__vecDelDtor)(eShow);
      v5 = v2->m_bHighlight == 0;
      v2->m_eButShow = v4;
      if ( v5 )
      {
        v6 = v2->m_spSpr.m_pObject;
        if ( v6->m_akGeom.m_uiSize > 3 )
        {
          v7 = v6->m_akGeom.m_pBase[3].m_pObject;
          if ( v7 )
          {
            ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v2->vfptr[30].__vecDelDtor)(v2, &eShow, v7);
            NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&eShow);
          }
        }
      }
      v8 = v2->m_eBetState;
      if ( v8 )
      {
        v9 = v8 - 1;
        if ( v9 )
        {
          v10 = v9 - 1;
          if ( v10 )
          {
            if ( v10 == 1 )
            {
              if ( v2->m_uiButNum > 3 )
              {
                v11 = PgSpr::GetGeometry(v2->m_spSpr.m_pObject, v2->m_uiSelectSprIndex);
                if ( v11 )
                {
                  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v2->vfptr[30].__vecDelDtor)(v2, &eShow, v11);
                  NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&eShow);
                }
                v12 = v2->m_spSpr.m_pObject;
                if ( v12->m_akGeom.m_uiSize > 2 )
                {
                  v13 = v12->m_akGeom.m_pBase[2].m_pObject;
                  if ( v13 )
                  {
                    ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v2->vfptr[29].__vecDelDtor)(v2, v13, 1);
                    NiAVObject::Update((NiAVObject *)&v2->vfptr, 0.0, 0);
                    NiAVObject::UpdateProperties((NiAVObject *)&v2->vfptr);
                  }
                }
              }
              else
              {
                v2->vfptr[123].__vecDelDtor((NiRefObject *)v2, 0);
              }
            }
          }
          else if ( v2->m_uiButNum <= 3 )
          {
LABEL_33:
            v2->vfptr[123].__vecDelDtor((NiRefObject *)v2, 0);
          }
          else
          {
            v14 = PgSpr::GetGeometry(v2->m_spSpr.m_pObject, v2->m_uiSelectSprIndex);
            if ( v14 )
            {
              ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v2->vfptr[30].__vecDelDtor)(v2, &v21, v14);
              NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>(&v21);
            }
            v15 = v2->m_spSpr.m_pObject;
            if ( v15->m_akGeom.m_uiSize > 1 )
            {
              v16 = v15->m_akGeom.m_pBase[1].m_pObject;
              if ( v16 )
              {
                ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v2->vfptr[29].__vecDelDtor)(v2, v16, 1);
                if ( v2->m_bHighlight == 1 )
                {
                  v17 = v2->m_spSpr.m_pObject;
                  if ( v17->m_akGeom.m_uiSize > 3 )
                  {
                    v18 = v17->m_akGeom.m_pBase[3].m_pObject;
                    if ( v18 )
                      ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v2->vfptr[29].__vecDelDtor)(v2, v18, 1);
                  }
                }
                NiAVObject::Update((NiAVObject *)&v2->vfptr, 0.0, 0);
                NiAVObject::UpdateProperties((NiAVObject *)&v2->vfptr);
              }
            }
          }
        }
        else
        {
          v19 = v2->vfptr[123].__vecDelDtor;
          v20 = v2;
          if ( v2->m_uiButNum >= 4 )
LABEL_35:
            v19((NiRefObject *)&v20->vfptr, 1u);
          else
            v19((NiRefObject *)&v2->vfptr, 0);
        }
      }
      else
      {
        switch ( v4 )
        {
          case 0:
          case 1:
            goto LABEL_33;
          case 2:
            v19 = v2->vfptr[123].__vecDelDtor;
            v20 = v2;
            if ( v2->m_uiButNum > 2 )
              goto LABEL_35;
            goto LABEL_37;
          case 3:
            v19 = v2->vfptr[123].__vecDelDtor;
            v20 = v2;
            if ( v2->m_uiButNum > 3 )
              v19((NiRefObject *)&v2->vfptr, 2u);
            else
LABEL_37:
              v19((NiRefObject *)&v20->vfptr, 0);
            break;
          default:
            v2->vfptr[123].__vecDelDtor((NiRefObject *)v2, 0);
            v2->m_eButShow = 0;
            break;
        }
      }
    }
  }
}

//----- (00721790) --------------------------------------------------------
MHDiceRewardMoneyWin *__thiscall MHDiceRewardMoneyWin::`vector deleting destructor'(MHDiceRewardMoneyWin *this, unsigned int a2)
{
  MHDiceRewardMoneyWin *v2; // esi@1

  v2 = this;
  MHDiceRewardMoneyWin::~MHDiceRewardMoneyWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007217C0) --------------------------------------------------------
MiniHouseDiceGameWin *__thiscall MiniHouseDiceGameWin::`vector deleting destructor'(MiniHouseDiceGameWin *this, unsigned int a2)
{
  MiniHouseDiceGameWin *v2; // esi@1

  v2 = this;
  MiniHouseDiceGameWin::~MiniHouseDiceGameWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007217F0) --------------------------------------------------------
GambleDiceGameWin *__thiscall GambleDiceGameWin::`scalar deleting destructor'(GambleDiceGameWin *this, unsigned int a2)
{
  GambleDiceGameWin *v2; // esi@1

  v2 = this;
  GambleDiceGameWin::~GambleDiceGameWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00721820) --------------------------------------------------------
DiceRankInfo *__cdecl std::_Uninit_copy<std::_Vector_const_iterator<std::_Vector_val<DiceRankInfo,std::allocator<DiceRankInfo>>>,DiceRankInfo *,std::allocator<DiceRankInfo>>(std::_Vector_const_iterator<std::_Vector_val<DiceRankInfo,std::allocator<DiceRankInfo> > > _First, std::_Vector_const_iterator<std::_Vector_val<DiceRankInfo,std::allocator<DiceRankInfo> > > _Last, DiceRankInfo *_Dest)
{
  DiceRankInfo *v3; // ecx@1
  DiceRankInfo *result; // eax@1

  v3 = _First._Ptr;
  for ( result = _Dest; v3 != _Last._Ptr; ++result )
  {
    if ( result )
    {
      result->sCharID.n5_code[0] = v3->sCharID.n5_code[0];
      result->sCharID.n5_code[1] = v3->sCharID.n5_code[1];
      result->sCharID.n5_code[2] = v3->sCharID.n5_code[2];
      result->sCharID.n5_code[3] = v3->sCharID.n5_code[3];
      result->sCharID.n5_code[4] = v3->sCharID.n5_code[4];
      result->nWinCnt = v3->nWinCnt;
    }
    ++v3;
  }
  return result;
}

//----- (00721870) --------------------------------------------------------
void __thiscall std::vector<SlotJackpotRankInfo,std::allocator<SlotJackpotRankInfo>>::vector<SlotJackpotRankInfo,std::allocator<SlotJackpotRankInfo>>(std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *this, std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *_Right)
{
  std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *v2; // esi@1
  unsigned int v3; // edi@1
  DiceRankInfo *v4; // eax@4
  DiceRankInfo *v5; // ecx@4
  DiceRankInfo *v6; // ST00_4@4
  int v7; // [sp+0h] [bp-24h]@1
  std::vector<HeightMapMaker::TriangleIndex *,std::allocator<HeightMapMaker::TriangleIndex *> > *v8; // [sp+10h] [bp-14h]@1
  int *v9; // [sp+14h] [bp-10h]@1
  int v10; // [sp+20h] [bp-4h]@4

  v9 = &v7;
  v2 = this;
  v8 = (std::vector<HeightMapMaker::TriangleIndex *,std::allocator<HeightMapMaker::TriangleIndex *> > *)this;
  this->_Myfirst = 0;
  this->_Mylast = 0;
  this->_Myend = 0;
  v3 = _Right->_Mylast - _Right->_Myfirst;
  this->_Myfirst = 0;
  this->_Mylast = 0;
  this->_Myend = 0;
  if ( v3 )
  {
    if ( v3 > 0xAAAAAAA )
      std::_Xlength_error("vector<T> too long");
    v4 = std::allocator<DiceRankInfo>::allocate(v3);
    v2->_Myend = &v4[v3];
    v2->_Myfirst = v4;
    v2->_Mylast = v4;
    v5 = _Right->_Mylast;
    v6 = _Right->_Myfirst;
    v10 = 0;
    v2->_Mylast = std::_Uninit_copy<std::_Vector_const_iterator<std::_Vector_val<DiceRankInfo,std::allocator<DiceRankInfo>>>,DiceRankInfo *,std::allocator<DiceRankInfo>>(
                    (std::_Vector_const_iterator<std::_Vector_val<DiceRankInfo,std::allocator<DiceRankInfo> > >)v6,
                    (std::_Vector_const_iterator<std::_Vector_val<DiceRankInfo,std::allocator<DiceRankInfo> > >)v5,
                    v4);
  }
}

//----- (00721950) --------------------------------------------------------
mhDiceRankWin *__thiscall mhDiceRankWin::`vector deleting destructor'(mhDiceRankWin *this, unsigned int a2)
{
  mhDiceRankWin *v2; // esi@1

  v2 = this;
  mhDiceRankWin::~mhDiceRankWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00721980) --------------------------------------------------------
void __thiscall MHDiceGameTask::NcGambleSlotmachineGameLeaveReq(MHDiceGameTask *this)
{
  MHDiceGameTask *v1; // esi@1
  SlotMachineWin *v2; // ecx@1
  char pProto; // [sp+7h] [bp-1h]@4

  v1 = this;
  v2 = this->m_pkSlotMachineWin;
  if ( !v2 || SlotMachineWin::canExit(v2) )
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Fu, 0xCAu, &pProto, 1);
  else
    v1->m_bLeaveReserve = v1->m_bLeaveReserve == 0;
}

//----- (007219D0) --------------------------------------------------------
void __stdcall MHDiceGameTask::NcGambleSlotmachineStartReq(PROTO_NC_GAMBLE_SLOTMACHINE_START_REQ *pkProto)
{
  if ( pkProto )
    NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Fu, 0xCCu, pkProto, 4);
}

//----- (00721A00) --------------------------------------------------------
void __thiscall MHDiceGameTask::NcGambleSlotmachineStopbuttonReq(MHDiceGameTask *this)
{
  MHDiceGameTask *v1; // [sp-2h] [bp-4h]@1

  v1 = this;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Fu, 0xCEu, (char *)&v1 + 3, 1);
}

//----- (00721A20) --------------------------------------------------------
void __thiscall MHDiceGameTask::NcGambleSlotmachineWheelstopReq(MHDiceGameTask *this)
{
  MHDiceGameTask *v1; // [sp-2h] [bp-4h]@1

  v1 = this;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Fu, 0xD0u, (char *)&v1 + 3, 1);
}

//----- (00721A40) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_START_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_SLOTMACHINE_START_ACK *pkProto)
{
  SlotMachineWin *v2; // ecx@1

  v2 = this->m_pkSlotMachineWin;
  if ( pkProto->nError == 10447 )
  {
    if ( v2 )
    {
      SlotMachineWin::Spin(v2, 1);
      return 1;
    }
  }
  else if ( v2 )
  {
    SlotMachineWin::Spin(v2, 0);
  }
  return 1;
}

//----- (00721A80) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_STOPBUTTON_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_SLOTMACHINE_STOPBUTTON_ACK *pkProto)
{
  MHDiceGameTask *v2; // esi@1
  signed int v3; // edx@2
  int *v4; // eax@2
  char *v5; // ecx@2
  SlotMachineWin *v6; // ecx@4
  int result[9]; // [sp+4h] [bp-28h]@2

  v2 = this;
  if ( pkProto->nError == 10450 )
  {
    v3 = 2;
    v4 = &result[1];
    v5 = &pkProto->screen.Card[2][1];
    do
    {
      *(v4 - 1) = (unsigned __int8)*(v5 - 1);
      *v4 = (unsigned __int8)*v5;
      v4[1] = (unsigned __int8)v5[1];
      v4 += 3;
      v5 -= 3;
      --v3;
    }
    while ( v3 >= 0 );
    v6 = v2->m_pkSlotMachineWin;
    if ( v6 )
      SlotMachineWin::Stop(v6, result);
  }
  return 1;
}

//----- (00721B00) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_WHEELSTOP_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_SLOTMACHINE_WHEELSTOP_ACK *pkProto)
{
  SlotMachineWin *v2; // ecx@2

  if ( pkProto->nError == 10452 )
  {
    v2 = this->m_pkSlotMachineWin;
    if ( v2 )
      SlotMachineWin::WheelStop(v2, pkProto);
  }
  return 1;
}

//----- (00721B30) --------------------------------------------------------
int __stdcall MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_STAND_UP_CMD(PROTO_NC_GAMBLE_SLOTMACHINE_STAND_UP_CMD *pkProto)
{
  return 1;
}

//----- (00721B40) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_JACKPOTINFO_CMD(MHDiceGameTask *this, PROTO_NC_GAMBLE_SLOTMACHINE_JACKPOTINFO_CMD *pkProto)
{
  SlotMachineWin *v2; // ecx@2

  if ( pkProto )
  {
    v2 = this->m_pkSlotMachineWin;
    if ( v2 )
      SlotMachineWin::SetJackPotCoin(v2, pkProto);
  }
  return 1;
}

//----- (00721B70) --------------------------------------------------------
void __thiscall MHDiceGameTask::NcGambleSlotmachineJackpotRankReq(MHDiceGameTask *this)
{
  MHDiceGameTask *v1; // [sp-2h] [bp-4h]@1

  v1 = this;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Fu, 0xD9u, (char *)&v1 + 3, 1);
}

//----- (00721B90) --------------------------------------------------------
void __thiscall MHDiceGameTask::NcGambleSlotmachineWinRankReq(MHDiceGameTask *this)
{
  MHDiceGameTask *v1; // [sp-2h] [bp-4h]@1

  v1 = this;
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Fu, 0xDBu, (char *)&v1 + 3, 1);
}

//----- (00721BB0) --------------------------------------------------------
void __thiscall MHDiceGameTask::UpdateSlotMachineGame(MHDiceGameTask *this, float fTime)
{
  MHDiceGameTask *v2; // esi@1

  v2 = this;
  if ( this->m_eDiceGameMode == 4
    && !(unsigned __int8)((int (*)(void))this->m_pkSlotMachineWin->vfptr[65].__vecDelDtor)() )
  {
    ((void (__stdcall *)(_DWORD))v2->m_pkSlotMachineWin->vfptr[81].__vecDelDtor)(LODWORD(fTime));
  }
}

//----- (00721BF0) --------------------------------------------------------
void MHDiceGameTask::OpenSlotMachineWin()
{
  GameFrameWork *v1; // eax@1

  v1 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v1 )
    GameFrameWork::OpenSlotMachineWin(v1);
}

//----- (00721C10) --------------------------------------------------------
void __thiscall MHDiceGameTask::OpenSlotHelpWin(MHDiceGameTask *this)
{
  MHDiceGameTask *v1; // esi@1

  v1 = this;
  if ( this->m_pkGBSlotHelpWin )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkGBSlotHelpWin->vfptr[65].__vecDelDtor)() )
      PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkGBSlotHelpWin->vfptr);
    else
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v1->m_pkGBSlotHelpWin->vfptr);
  }
}

//----- (00721C60) --------------------------------------------------------
void __stdcall MHDiceGameTask::NcGambleSlotmachineGameJoinReq(PROTO_NC_GAMBLE_SLOTMACHINE_GAME_JOIN_REQ *pkProto)
{
  Char *v2; // eax@1
  NiPoint3 *v3; // eax@2
  float v4; // ecx@2
  float v5; // edx@2
  long double v6; // st7@2
  double v7; // st7@4
  double v8; // st6@7
  char v9; // al@9
  NiPoint3 result; // [sp+8h] [bp-54h]@2
  NiPoint3 kDir; // [sp+14h] [bp-48h]@9
  NiPoint3 kPos; // [sp+20h] [bp-3Ch]@2
  float v13; // [sp+2Ch] [bp-30h]@9
  float value; // [sp+30h] [bp-2Ch]@2
  NiMatrix3 v15; // [sp+34h] [bp-28h]@9

  v2 = CharMgr::GetChar(&g_kCharMgr, pkProto->nNpcHandle);
  if ( v2 )
  {
    v3 = Char::GetDirToChar(g_pkMainChar, &result, v2);
    v4 = v3->y;
    kPos.x = v3->x;
    v5 = v3->z;
    kPos.y = v4;
    kPos.z = 0.0;
    NiPoint3::Unitize(&kPos);
    value = kPos.x * 0.0 + kPos.y + kPos.z * 0.0;
    kPos.z = kPos.y * 0.0 - kPos.x;
    v6 = value;
    if ( value <= -1.0 )
    {
      v7 = NI_PI;
    }
    else if ( v6 >= 1.0 )
    {
      v7 = 0.0;
    }
    else
    {
      value = acos(v6);
      v7 = value;
    }
    value = v7;
    value = value * 57.2957763671875;
    v8 = value * 0.5;
    if ( kPos.z > 0.0 )
      v8 = 180.0 - v8;
    value = v8;
    v9 = (signed int)value;
    pkProto->nDirect = v9;
    v13 = (NI_PI + NI_PI) * (double)(unsigned __int8)v9 / 180.0;
    NiMatrix3::MakeZRotation(&v15, v13);
    NiMatrix3::operator*(&v15, &kDir, &World::ms_kNorthDir);
    ((void (__stdcall *)(NiPoint3 *))g_pkMainChar->vfptr[6].Affect)(&kDir);
  }
  NetMgr::SendNetMsgZoneMgr(&g_kNetMgr, 0x2Fu, 0xC8u, pkProto, 4);
}
// B622CC: using guessed type const float NI_PI;

//----- (00721DE0) --------------------------------------------------------
PgFrameWork *__thiscall MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_GAME_JOIN_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_SLOTMACHINE_GAME_JOIN_ACK *pkProto)
{
  MHDiceGameTask *v2; // esi@1
  PgFrameWork *result; // eax@1
  int v4; // edi@1
  unsigned __int64 v5; // rax@4
  SlotMachineWin *v6; // ecx@4
  __int64 v7; // rax@5

  v2 = this;
  result = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  v4 = (int)result;
  if ( result )
  {
    if ( pkProto->nError == 10432 )
    {
      v5 = User::Coin(&g_kUser);
      v2->m_fAlphaValueOfDiceWindow = 0.0;
      v2->m_nInvenRemainMoney = v5;
      v2->m_pkSlotMachineWin = *(SlotMachineWin **)(v4 + 832);
      v2->m_pkGBSlotRankWin = *(GBSlotRankWin **)(v4 + 836);
      v2->m_pkGBSlotHelpWin = *(GBSlotHelpWin **)(v4 + 840);
      v6 = v2->m_pkSlotMachineWin;
      v2->m_pkMiniSlotMachineWin = *(MiniSlotMachineWin **)(v4 + 844);
      if ( v6 )
      {
        ((void (__stdcall *)(_DWORD))v6->vfptr[69].__vecDelDtor)(0.0);
        ((void (__stdcall *)(_DWORD))v2->m_pkSlotMachineWin->vfptr[60].__vecDelDtor)(0);
        PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkSlotMachineWin->vfptr);
        v2->m_pkSlotMachineWin->m_i1BetPerCoin = pkProto->BettingUnit;
        SlotMachineWin::InitMachine(v2->m_pkSlotMachineWin);
        v7 = User::Coin(&g_kUser);
        SlotMachineWin::SetCoin(v2->m_pkSlotMachineWin, v7);
        v2->m_bLeaveReserve = 0;
        v2->m_bIsEnterGameRoom = 1;
        v2->m_eDiceGameMode = 4;
        v2->m_hMobID = -1;
        SoundMgr::PlayInterfaceSound(&g_kSoundMgr, GB_SM_Open);
        SoundMgr::StopBGM(&g_kSoundMgr);
        SoundMgr::PlayBGM(&g_kSoundMgr, "GB_SlotMachine.mp3");
        result = (PgFrameWork *)1;
      }
      else
      {
        result = (PgFrameWork *)1;
      }
    }
    else
    {
      result = 0;
    }
  }
  return result;
}

//----- (00721F40) --------------------------------------------------------
Char *__stdcall MHDiceGameTask::Recv_NC_GAMBLE_PLAYERACT_CMD(PROTO_NC_GAMBLE_PLAYERACT_CMD *pkProto)
{
  Char *result; // eax@2
  int v3; // esi@2
  ActionViewInfo *v4; // eax@3

  if ( pkProto )
  {
    result = CharMgr::GetChar(&g_kCharMgr, pkProto->playerhandle);
    v3 = (int)result;
    if ( !result )
      return result;
    v4 = ActionViewTable::GetByEventCode(pkProto->effect_body);
    if ( v4 )
      (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v3 + 452))(v3, v4->nIndex);
  }
  return (Char *)1;
}

//----- (00721FA0) --------------------------------------------------------
void __stdcall MHDiceGameTask::AddMsg(char *pcText, bool Sysmsg, bool AnnounceMsg)
{
  GameFrameWork *v4; // eax@1
  int v5; // esi@1
  D3DXCOLOR *v6; // eax@5
  D3DXCOLOR v7; // ST04_16@5
  D3DXCOLOR result; // [sp+8h] [bp-10h]@5

  v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  v5 = (int)v4;
  if ( v4 )
  {
    if ( Sysmsg )
      GameFrameWork::AddSysMsg(v4, pcText);
    if ( AnnounceMsg )
    {
      v6 = ColorInfoTable::GetDxColor(&result, Center_Announcement);
      *(_QWORD *)&v7.r = *(_QWORD *)&v6->r;
      *(_QWORD *)&v7.b = *(_QWORD *)&v6->b;
      GameFrameWork::AddAnnounceMsg((GameFrameWork *)v5, (int)pcText, v5, pcText, v7);
      PgWinMgr::SetTopWin(&Pgg_kWinMgr, *(PgWin **)(v5 + 1028));
    }
  }
}

//----- (00722020) --------------------------------------------------------
int __stdcall MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_SOMEONE_GET_JACKPOT_CMD(PROTO_NC_GAMBLE_SLOTMACHINE_SOMEONE_GET_JACKPOT_CMD *pkProto)
{
  unsigned int v2; // edx@2
  unsigned int v3; // ecx@2
  unsigned int v4; // edx@2
  unsigned int v5; // ecx@2
  int v6; // eax@2
  int v7; // ST0C_4@2
  int v8; // ST08_4@2
  char *v9; // eax@2
  const char *v10; // esi@2
  GameFrameWork *v11; // eax@2
  int result; // eax@4
  char acName[21]; // [sp+0h] [bp-1Ch]@2

  if ( pkProto )
  {
    v2 = pkProto->charid.n5_code[1];
    *(_DWORD *)acName = pkProto->charid.n5_code[0];
    v3 = pkProto->charid.n5_code[2];
    *(_DWORD *)&acName[4] = v2;
    v4 = pkProto->charid.n5_code[3];
    *(_DWORD *)&acName[8] = v3;
    v5 = pkProto->charid.n5_code[4];
    *(_DWORD *)&acName[12] = v4;
    v6 = pkProto->price;
    v7 = HIDWORD(pkProto->price);
    *(_DWORD *)&acName[16] = v5;
    v8 = v6;
    acName[20] = 0;
    v9 = (char *)TextData2::Get(0x7344739u);
    v10 = fs(v9, acName, v8, v7);
    v11 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v11 )
      GameFrameWork::AddSysMsg(v11, v10);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007220D0) --------------------------------------------------------
void __thiscall MHDiceGameTask::ShutDownSlotMachine(MHDiceGameTask *this)
{
  MHDiceGameTask *v1; // esi@1
  SlotMachineWin *v2; // ecx@1
  NiUnsharedGeometryGroup *v3; // edi@3
  GameFrameWork *v4; // eax@3
  int v5; // esi@3
  D3DXCOLOR *v6; // eax@4
  D3DXCOLOR v7; // ST04_16@4
  D3DXCOLOR result; // [sp+Ch] [bp-10h]@4

  v1 = this;
  v2 = this->m_pkSlotMachineWin;
  if ( v2 )
    SlotMachineWin::InitMachine(v2);
  MHDiceGameTask::OnCloseWin((PgWin *)&v1->m_pkSlotMachineWin->vfptr);
  MHDiceGameTask::OnCloseWin((PgWin *)&v1->m_pkGBSlotHelpWin->vfptr);
  MHDiceGameTask::OnCloseWin((PgWin *)&v1->m_pkGBSlotRankWin->vfptr);
  MHDiceGameTask::OnCloseWin((PgWin *)&v1->m_pkMiniSlotMachineWin->vfptr);
  v1->m_pkSlotMachineWin = 0;
  v1->m_pkGBSlotHelpWin = 0;
  v1->m_pkGBSlotRankWin = 0;
  v1->m_pkMiniSlotMachineWin = 0;
  v1->m_bIsEnterGameRoom = 0;
  v1->m_eDiceGameMode = 0;
  ((void (*)(void))g_kSoundMgr.m_pkInterfaceGroup->vfptr->UnloadAllSound)();
  ((void (*)(void))g_kSoundMgr.m_pkBGMGroup->vfptr->UnloadAllSound)();
  World::PlayBGM(&g_kWorld);
  v3 = TextData2::Get(0xD905313C);
  v4 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  v5 = (int)v4;
  if ( v4 )
  {
    GameFrameWork::AddSysMsg(v4, (const char *)v3);
    v6 = ColorInfoTable::GetDxColor(&result, Center_Announcement);
    *(_QWORD *)&v7.r = *(_QWORD *)&v6->r;
    *(_QWORD *)&v7.b = *(_QWORD *)&v6->b;
    GameFrameWork::AddAnnounceMsg((GameFrameWork *)v5, (int)v3, v5, (char *)v3, v7);
    PgWinMgr::SetTopWin(&Pgg_kWinMgr, *(PgWin **)(v5 + 1028));
  }
}

//----- (007221E0) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_GAME_LEAVE_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_SLOTMACHINE_GAME_LEAVE_ACK *pkProto)
{
  if ( pkProto->nError == 10440 )
    MHDiceGameTask::ShutDownSlotMachine(this);
  return 1;
}

//----- (00722200) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_WINRANKING_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_SLOTMACHINE_WINRANKING_ACK *pkProto)
{
  MHDiceGameTask *v2; // esi@1
  GBSlotRankWin *v3; // ecx@6

  v2 = this;
  if ( pkProto && this->m_pkGBSlotRankWin )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkGBSlotRankWin->vfptr[65].__vecDelDtor)() )
      PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkGBSlotRankWin->vfptr);
    else
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkGBSlotRankWin->vfptr);
    v3 = v2->m_pkGBSlotRankWin;
    if ( v3->m_nCurSelTab == 1 )
      GBSlotRankWin::OnTAB2(v3);
    GBSlotRankWin::UpdateWinRankList(v2->m_pkGBSlotRankWin, pkProto);
    GBSlotRankWin::UpdateViewList(v2->m_pkGBSlotRankWin);
  }
  return 1;
}

//----- (00722290) --------------------------------------------------------
int __thiscall MHDiceGameTask::Recv_NC_GAMBLE_SLOTMACHINE_JACKPOTRANKING_ACK(MHDiceGameTask *this, PROTO_NC_GAMBLE_SLOTMACHINE_JACKPOTRANKING_ACK *pkProto)
{
  MHDiceGameTask *v2; // esi@1
  GBSlotRankWin *v3; // ecx@6

  v2 = this;
  if ( pkProto && this->m_pkGBSlotRankWin )
  {
    if ( (unsigned __int8)((int (*)(void))this->m_pkGBSlotRankWin->vfptr[65].__vecDelDtor)() )
      PgWinMgr::SetTopWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkGBSlotRankWin->vfptr);
    else
      PgWinMgr::ShowWin(&Pgg_kWinMgr, (PgWin *)&v2->m_pkGBSlotRankWin->vfptr);
    v3 = v2->m_pkGBSlotRankWin;
    if ( v3->m_nCurSelTab != 1 )
      GBSlotRankWin::OnTAB1(v3);
    GBSlotRankWin::UpdateJackpotRankList(v2->m_pkGBSlotRankWin, pkProto);
    GBSlotRankWin::UpdateViewList(v2->m_pkGBSlotRankWin);
  }
  return 1;
}

//----- (00722320) --------------------------------------------------------
void __thiscall GBSlotRankWin::OnTAB1(GBSlotRankWin *this)
{
  GBSlotRankWin *v1; // esi@1
  NiRefObjectVtbl *v2; // edi@1
  NiUnsharedGeometryGroup *v3; // eax@1

  v1 = this;
  v2 = this->m_pkTabText->vfptr;
  v3 = TextData2::Get(0xD75E3C3E);
  v2[118].__vecDelDtor((NiRefObject *)v1->m_pkTabText, (unsigned int)v3);
  v1->m_pkTab01->m_bCheck = 1;
  v1->m_pkTab02->m_bCheck = 0;
  ((void (__stdcall *)(_DWORD))v1->m_pkTab02->vfptr[123].__vecDelDtor)(0);
  v1->m_nCurSelTab = 1;
  GBSlotRankWin::UpdateViewList(v1);
}

//----- (00722390) --------------------------------------------------------
void __thiscall GBSlotRankWin::OnTAB2(GBSlotRankWin *this)
{
  GBSlotRankWin *v1; // esi@1
  NiRefObjectVtbl *v2; // edi@1
  NiUnsharedGeometryGroup *v3; // eax@1

  v1 = this;
  v2 = this->m_pkTabText->vfptr;
  v3 = TextData2::Get(0xF7402742);
  v2[118].__vecDelDtor((NiRefObject *)v1->m_pkTabText, (unsigned int)v3);
  v1->m_pkTab01->m_bCheck = 0;
  ((void (__stdcall *)(_DWORD))v1->m_pkTab01->vfptr[123].__vecDelDtor)(0);
  v1->m_pkTab02->m_bCheck = 1;
  v1->m_nCurSelTab = 2;
  GBSlotRankWin::UpdateViewList(v1);
}

//----- (00722400) --------------------------------------------------------
SlotJackpotRankInfo *__cdecl std::_Move<SlotJackpotRankInfo *,SlotJackpotRankInfo *>(SlotJackpotRankInfo *_First, SlotJackpotRankInfo *_Last, SlotJackpotRankInfo *_Dest)
{
  char *v3; // ecx@2
  SlotJackpotRankInfo *result; // eax@2
  unsigned int v5; // esi@3

  if ( _First == _Last )
  {
    result = _Dest;
  }
  else
  {
    v3 = &_First->sCharID.n5_name[8];
    result = _Dest;
    do
    {
      result->sCharID.n5_code[0] = *((_DWORD *)v3 - 2);
      result->sCharID.n5_code[1] = *((_DWORD *)v3 - 1);
      result->sCharID.n5_code[2] = *(_DWORD *)v3;
      result->sCharID.n5_code[3] = *((_DWORD *)v3 + 1);
      result->sCharID.n5_code[4] = *((_DWORD *)v3 + 2);
      result->JackpotPrice = *((_DWORD *)v3 + 3);
      v5 = *((_DWORD *)v3 + 3);
      v3 += 24;
      result->JackpotPrice = v5;
      ++result;
    }
    while ( (SlotJackpotRankInfo *)(v3 - 8) != _Last );
  }
  return result;
}

//----- (00722460) --------------------------------------------------------
DiceRankInfo *__cdecl std::_Uninit_move<SlotJackpotRankInfo *,SlotJackpotRankInfo *,std::allocator<SlotJackpotRankInfo>,SlotJackpotRankInfo>(DiceRankInfo *_First, DiceRankInfo *_Last, DiceRankInfo *_Dest)
{
  DiceRankInfo *v3; // ecx@1
  DiceRankInfo *result; // eax@1

  v3 = _First;
  for ( result = _Dest; v3 != _Last; ++result )
  {
    if ( result )
    {
      result->sCharID.n5_code[0] = v3->sCharID.n5_code[0];
      result->sCharID.n5_code[1] = v3->sCharID.n5_code[1];
      result->sCharID.n5_code[2] = v3->sCharID.n5_code[2];
      result->sCharID.n5_code[3] = v3->sCharID.n5_code[3];
      result->sCharID.n5_code[4] = v3->sCharID.n5_code[4];
      result->nWinCnt = v3->nWinCnt;
    }
    ++v3;
  }
  return result;
}

//----- (007224B0) --------------------------------------------------------
void __thiscall GBSlotRankWin::UpdateJackpotRankList(GBSlotRankWin *this, PROTO_NC_GAMBLE_SLOTMACHINE_JACKPOTRANKING_ACK *pkProto)
{
  SlotJackpotRankInfo *v2; // eax@2
  std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *v3; // ebx@2
  SlotJackpotRankInfo *v4; // ecx@2
  signed int v5; // edi@4
  PROTO_NC_GAMBLE_SLOTMACHINE_JACKPOTRANKING_ACK *v6; // esi@5
  unsigned int v7; // ecx@6
  unsigned int v8; // edx@6
  unsigned int v9; // eax@6
  unsigned int v10; // ecx@6
  SlotJackpotRankInfo kInfo; // [sp+8h] [bp-1Ch]@6

  if ( pkProto )
  {
    v2 = this->m_JackpotRankList._Mylast;
    v3 = (std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *)&this->m_JackpotRankList;
    v4 = this->m_JackpotRankList._Myfirst;
    if ( v4 != v2 )
      v3->_Mylast = (DiceRankInfo *)std::_Move<SlotJackpotRankInfo *,SlotJackpotRankInfo *>(v2, v2, v4);
    v5 = 0;
    if ( pkProto->ListLen )
    {
      v6 = pkProto + 9;
      do
      {
        v7 = *(_DWORD *)&v6[-8].ListLen;
        v8 = *(_DWORD *)&v6[-4].ListLen;
        kInfo.JackpotPrice = *(_DWORD *)&v6[12].ListLen;
        v9 = *(_DWORD *)&v6->ListLen;
        kInfo.sCharID.n5_code[0] = v7;
        v10 = *(_DWORD *)&v6[4].ListLen;
        *(_QWORD *)&kInfo.sCharID.n5_code[1] = __PAIR__(v9, v8);
        *(_QWORD *)&kInfo.sCharID.n5_code[3] = __PAIR__(*(_DWORD *)&v6[8].ListLen, v10);
        std::vector<SlotJackpotRankInfo,std::allocator<SlotJackpotRankInfo>>::push_back(v3, (DiceRankInfo *)&kInfo);
        ++v5;
        v6 += 24;
      }
      while ( v5 < pkProto->ListLen );
    }
  }
}

//----- (00722550) --------------------------------------------------------
void __thiscall GBSlotRankWin::UpdateWinRankList(GBSlotRankWin *this, PROTO_NC_GAMBLE_SLOTMACHINE_WINRANKING_ACK *pkProto)
{
  SlotJackpotRankInfo *v2; // eax@2
  std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *v3; // ebx@2
  SlotJackpotRankInfo *v4; // ecx@2
  signed int v5; // edi@4
  PROTO_NC_GAMBLE_SLOTMACHINE_WINRANKING_ACK *v6; // esi@5
  unsigned int v7; // ecx@6
  unsigned int v8; // edx@6
  unsigned int v9; // eax@6
  unsigned int v10; // ecx@6
  SlotJackpotRankInfo kInfo; // [sp+8h] [bp-1Ch]@6

  if ( pkProto )
  {
    v2 = this->m_WinRankList._Mylast;
    v3 = (std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *)&this->m_WinRankList;
    v4 = this->m_WinRankList._Myfirst;
    if ( v4 != v2 )
      v3->_Mylast = (DiceRankInfo *)std::_Move<SlotJackpotRankInfo *,SlotJackpotRankInfo *>(v2, v2, v4);
    v5 = 0;
    if ( pkProto->ListLen )
    {
      v6 = pkProto + 9;
      do
      {
        v7 = *(_DWORD *)&v6[-8].ListLen;
        v8 = *(_DWORD *)&v6[-4].ListLen;
        kInfo.JackpotPrice = *(_DWORD *)&v6[12].ListLen;
        v9 = *(_DWORD *)&v6->ListLen;
        kInfo.sCharID.n5_code[0] = v7;
        v10 = *(_DWORD *)&v6[4].ListLen;
        *(_QWORD *)&kInfo.sCharID.n5_code[1] = __PAIR__(v9, v8);
        *(_QWORD *)&kInfo.sCharID.n5_code[3] = __PAIR__(*(_DWORD *)&v6[8].ListLen, v10);
        std::vector<SlotJackpotRankInfo,std::allocator<SlotJackpotRankInfo>>::push_back(v3, (DiceRankInfo *)&kInfo);
        ++v5;
        v6 += 24;
      }
      while ( v5 < pkProto->ListLen );
    }
  }
}

//----- (007225F0) --------------------------------------------------------
char __thiscall CEaseInOutInterpolation::Setup(CEaseInOutInterpolation *this, float from, float to, float time)
{
  char result; // al@2

  if ( time > 0.0 )
  {
    result = 1;
    this->_value = from;
    this->_target = to;
    this->_speed = 0.0;
    this->_acceleration = (to - from) / (time * time * 0.25);
    this->_totalTime = time;
    this->_remainingTime = time;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00722640) --------------------------------------------------------
BOOL __thiscall CEaseInOutInterpolation::Interpolate(CEaseInOutInterpolation *this, float deltaTime)
{
  double v2; // st7@1
  double v3; // st5@2
  float deltaTimea; // [sp+8h] [bp+8h]@1

  v2 = deltaTime;
  deltaTimea = this->_remainingTime - deltaTime;
  this->_remainingTime = deltaTimea;
  if ( this->_totalTime * 0.5 <= deltaTimea )
    v3 = this->_acceleration * v2 + this->_speed;
  else
    v3 = this->_speed - this->_acceleration * v2;
  this->_speed = v3;
  this->_value = v2 * this->_speed + this->_value;
  return deltaTimea <= 0.0;
}

//----- (007226B0) --------------------------------------------------------
char __thiscall CEaseInOutInterpolation::SetupWithDist(CEaseInOutInterpolation *this, float dist, float time, float speed)
{
  char result; // al@2
  double v5; // st6@3
  double v6; // st7@3

  if ( dist > 0.0 )
  {
    result = 1;
    this->_value = 0.0;
    this->_target = 0.0;
    this->_speed = speed;
    this->_acceleration = speed / (time * time);
    v5 = dist;
    v6 = time;
    this->_totalDist = *(float *)&v5;
    this->_remainingDist = *(float *)&v5;
    this->_totalTime = *(float *)&v6;
    this->_remainingTime = *(float *)&v6;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00722700) --------------------------------------------------------
bool __thiscall CEaseInOutInterpolation::InterpoateWithDist(CEaseInOutInterpolation *this, float deltaTime)
{
  bool result; // al@2
  double v3; // st6@3
  float deltaTimeb; // [sp+8h] [bp+8h]@3
  float deltaTimea; // [sp+8h] [bp+8h]@5
  float deltaTimec; // [sp+8h] [bp+8h]@7

  if ( 0.0 == this->_remainingDist )
  {
    result = 1;
  }
  else
  {
    v3 = deltaTime;
    deltaTimeb = this->_remainingTime - deltaTime;
    this->_remainingTime = deltaTimeb;
    if ( this->_totalTime > (double)deltaTimeb )
      this->_speed = this->_speed - v3 * this->_speed * 0.5;
    deltaTimea = v3 * this->_speed;
    this->_value = deltaTimea;
    if ( this->_remainingDist >= (double)deltaTimea )
    {
      deltaTimec = this->_remainingDist - deltaTimea;
      this->_remainingDist = deltaTimec;
      result = deltaTimec <= 0.0;
    }
    else
    {
      result = 0;
      this->_value = this->_remainingDist;
      this->_remainingDist = 0.0;
    }
  }
  return result;
}

//----- (007227A0) --------------------------------------------------------
void __thiscall SlotEntry::setMaxSpeed(SlotEntry *this, float speed)
{
  this->_MaxSpeed = speed;
}

//----- (007227B0) --------------------------------------------------------
void __thiscall SlotEntry::roll(SlotEntry *this)
{
  double v1; // st6@1
  double v2; // st7@2
  float v3; // [sp+0h] [bp-8h]@1
  float v4; // [sp+4h] [bp-4h]@1

  this->_fWheelTime = 0.0;
  this->me_state = 0;
  v1 = this->_MaxSpeed;
  this->_bUseTimer = 0;
  v3 = v1;
  v4 = this->_Time;
  if ( v4 > 0.0 )
  {
    v2 = v4;
    this->_easeInOut._value = 0.0;
    this->_easeInOut._target = v3;
    this->_easeInOut._speed = 0.0;
    this->_easeInOut._acceleration = (v3 - 0.0) / (v2 * v2 * 0.25);
    this->_easeInOut._totalTime = *(float *)&v2;
    this->_easeInOut._remainingTime = *(float *)&v2;
  }
}

//----- (00722820) --------------------------------------------------------
void __thiscall SlotMachineWin::Spin(SlotMachineWin *this, bool bSucceed)
{
  SlotMachineWin *v2; // esi@1
  PgWinBut *v3; // ecx@3

  v2 = this;
  if ( this->me_State == 2 )
  {
    if ( bSucceed )
    {
      v3 = this->m_pkButs[0];
      v2->me_State = 3;
      v2->m_bTransition = 1;
      ((void (__stdcall *)(_DWORD))v3->vfptr[60].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v2->m_pkButs[1]->vfptr[60].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v2->m_pkButs[2]->vfptr[60].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v2->m_pkButs[3]->vfptr[60].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v2->m_pkButs[4]->vfptr[60].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v2->m_pkButs[2]->vfptr[60].__vecDelDtor)(0);
      ((void (__stdcall *)(_DWORD))v2->m_pkButs[5]->vfptr[60].__vecDelDtor)(1);
      SoundMgr::PlayInterfaceSound(&g_kSoundMgr, GB_SM_Spin);
    }
    else
    {
      this->me_State = 1;
    }
  }
}

//----- (00722900) --------------------------------------------------------
void __thiscall SlotMachineWin::Stop(SlotMachineWin *this, int *result)
{
  if ( this->me_State == 4 )
  {
    this->me_State = 5;
    this->m_iResult[0] = *result;
    this->m_iResult[1] = result[1];
    this->m_iResult[2] = result[2];
    this->m_iResult[3] = result[3];
    this->m_iResult[4] = result[4];
    this->m_iResult[5] = result[5];
    this->m_iResult[6] = result[6];
    this->m_iResult[7] = result[7];
    this->m_iResult[8] = result[8];
    this->m_bTransition = 1;
    ((void (__stdcall *)(_DWORD))this->m_pkButs[5]->vfptr[60].__vecDelDtor)(0);
    SoundMgr::PlayInterfaceSound(&g_kSoundMgr, GB_SM_Stop);
  }
}

//----- (007229A0) --------------------------------------------------------
void __thiscall SlotMachineWin::ResetCoin(SlotMachineWin *this)
{
  char *v1; // esi@1
  signed int v2; // edi@1

  this->m_iBetNum = -1;
  v1 = (char *)this->m_pkBetIndicator;
  v2 = 32;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v1 + 256))(0);
    v1 += 4;
    --v2;
  }
  while ( v2 );
}

//----- (007229E0) --------------------------------------------------------
void __thiscall SlotMachineWin::UpdateCoin(SlotMachineWin *this, __int64 *from, __int64 *to, SlotMachineWin::COIN_TYPE type, bool immediately)
{
  int v5; // edx@1
  signed int v6; // eax@5
  __int64 v7; // rdi@17
  bool v8; // zf@22
  unsigned int v9; // edi@24
  unsigned int v10; // ecx@24
  int v11; // ebx@26
  int v12; // esi@28
  int v13; // ecx@31
  int v14; // edi@40
  int v15; // esi@41
  int v16; // ecx@43
  unsigned int i64Val_4; // [sp+8h] [bp-8h]@28
  SlotMachineWin *v18; // [sp+Ch] [bp-4h]@1
  int count; // [sp+24h] [bp+14h]@24

  v5 = *((_DWORD *)to + 1);
  v18 = this;
  if ( *(_DWORD *)to == *(_DWORD *)from && v5 == *((_DWORD *)from + 1) )
    return;
  if ( immediately )
  {
    *(_DWORD *)from = *(_DWORD *)to;
    *((_DWORD *)from + 1) = v5;
  }
  v6 = abs(*(_DWORD *)to - *(_DWORD *)from);
  if ( v6 <= 1000000 )
  {
    if ( v6 <= 100000 )
    {
      if ( v6 <= 10000 )
      {
        if ( v6 <= 1000 )
        {
          if ( v6 <= 100 )
          {
            if ( v6 > 10 )
              v6 = 10;
          }
          else
          {
            v6 = 100;
          }
        }
        else
        {
          v6 = 1000;
        }
      }
      else
      {
        v6 = 10000;
      }
    }
    else
    {
      v6 = 100000;
    }
  }
  else
  {
    v6 = 1000000;
  }
  v7 = *from;
  if ( *from >= *to )
    *from = v7 - v6;
  else
    *from = v7 + v6;
  if ( *((_DWORD *)from + 1) <= 0 )
  {
    if ( *((_DWORD *)from + 1) < 0 )
      *from = 0i64;
    else
      v8 = *(_DWORD *)from == 0;
  }
  v9 = *(_DWORD *)from;
  v10 = *((_DWORD *)from + 1);
  count = 7;
  if ( type == CT_USERCOIN )
    count = 11;
  v11 = (int)&v18->m_pkBetNum[count];
  while ( 1 )
  {
    v12 = (signed __int64)__PAIR__(v10, v9) % 10;
    i64Val_4 = (unsigned __int64)((signed __int64)__PAIR__(v10, v9) / 10) >> 32;
    v9 = (signed __int64)__PAIR__(v10, v9) / 10;
    if ( v12 < 0 )
      v12 = 0;
    if ( type )
    {
      if ( type == 1 )
      {
        v13 = *(_DWORD *)v11;
      }
      else
      {
        if ( type != 2 )
          goto LABEL_37;
        v13 = *(_DWORD *)(v11 + 64);
      }
    }
    else
    {
      v13 = *(_DWORD *)(v11 + 144);
    }
    (*(void (__stdcall **)(int))(*(_DWORD *)v13 + 492))(v12);
LABEL_37:
    if ( !(i64Val_4 | v9) )
      break;
    v11 -= 4;
    if ( --count < 0 )
      return;
    v10 = i64Val_4;
  }
  v14 = count - 1;
  if ( count - 1 >= 0 )
  {
    v15 = (int)&v18->m_pkBetNum[v14];
    while ( type )
    {
      if ( type == 1 )
      {
        v16 = *(_DWORD *)v15;
        goto LABEL_48;
      }
      if ( type == 2 )
      {
        v16 = *(_DWORD *)(v15 + 64);
        goto LABEL_48;
      }
LABEL_49:
      v15 -= 4;
      if ( --v14 < 0 )
        return;
    }
    v16 = *(_DWORD *)(v15 + 144);
LABEL_48:
    (*(void (__stdcall **)(_DWORD))(*(_DWORD *)v16 + 492))(0);
    goto LABEL_49;
  }
}

//----- (00722B90) --------------------------------------------------------
bool __thiscall SlotMachineWin::canExit(SlotMachineWin *this)
{
  SlotMachineWin::MachineState v1; // eax@1

  v1 = this->me_State;
  return v1 == EM_IDLE || v1 == 1;
}

//----- (00722BB0) --------------------------------------------------------
void __thiscall SlotMachineWin::SetCoin(SlotMachineWin *this, __int64 nCoin)
{
  this->m_nTempUserCoin = nCoin;
}

//----- (00722BD0) --------------------------------------------------------
void __thiscall SlotMachineWin::SetJackPotCoin(SlotMachineWin *this, PROTO_NC_GAMBLE_SLOTMACHINE_JACKPOTINFO_CMD *pkProto)
{
  SlotMachineWin *v2; // esi@1
  PROTO_NC_GAMBLE_SLOTMACHINE_JACKPOTINFO_CMD *v3; // ebx@2
  int v4; // eax@3
  NiRefObjectVtbl *v5; // edi@4
  char *v6; // eax@4
  PgWinText *v7; // ecx@4
  int i; // [sp+8h] [bp-4h]@1

  v2 = this;
  i = 0;
  if ( pkProto->JackPotNum )
  {
    v3 = pkProto + 3;
    while ( 1 )
    {
      v4 = *(_WORD *)&v3[-2].JackPotNum;
      if ( v4 == 10 )
        break;
      if ( v4 == 100 )
      {
        v5 = v2->m_pkJackPotText[1]->vfptr;
        v6 = fs("%d", *(_DWORD *)&v3->JackPotNum);
        v7 = v2->m_pkJackPotText[1];
        goto LABEL_9;
      }
      if ( (_WORD)v4 == 500 )
      {
        v5 = v2->m_pkJackPotText[0]->vfptr;
        v6 = fs("%d", *(_DWORD *)&v3->JackPotNum);
        v7 = v2->m_pkJackPotText[0];
        goto LABEL_9;
      }
LABEL_10:
      v3 += 6;
      if ( ++i >= pkProto->JackPotNum )
        return;
    }
    v5 = v2->m_pkJackPotText[2]->vfptr;
    v6 = fs("%d", *(_DWORD *)&v3->JackPotNum);
    v7 = v2->m_pkJackPotText[2];
LABEL_9:
    v5[118].__vecDelDtor((NiRefObject *)v7, (unsigned int)v6);
    goto LABEL_10;
  }
}

//----- (00722C90) --------------------------------------------------------
void __thiscall SlotMachineWin::WheelStop(SlotMachineWin *this, PROTO_NC_GAMBLE_SLOTMACHINE_WHEELSTOP_ACK *pkProto)
{
  char *v2; // eax@1

  this->m_bRecivedResult = 1;
  this->m_WinState = pkProto->WinLine;
  v2 = (char *)&this->m_nShareCoin;
  *(_DWORD *)v2 = pkProto->win;
  *((_DWORD *)v2 + 1) = 0;
  SlotMachineWin::UpdateCoin(this, &this->m_nPreShareCoin, &this->m_nShareCoin, CT_SHARECOIN, 1);
}

//----- (00722CD0) --------------------------------------------------------
void __thiscall GBSlotRankWin::DirectMessage(GBSlotRankWin *this, int iMsgTag, void *pvBody, IDirectMessenger *pkFrom)
{
  GBSlotRankWin *v4; // esi@1
  SlideListWin *v5; // ecx@1

  v4 = this;
  v5 = (SlideListWin *)LODWORD(this->m_kWorld.m_Rotate.m_pEntry[2][0]);
  if ( v5 )
    LODWORD(v4->m_kWorld.m_Rotate.m_pEntry[2][1]) = SlideListWin::GetCurSelIndex(v5);
}

//----- (00722CF0) --------------------------------------------------------
void __thiscall MiniSlotMachineWin::MiniSlotMachineWin(MiniSlotMachineWin *this)
{
  MiniSlotMachineWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&MiniSlotMachineWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&MiniSlotMachineWin::`vftable'{for `IDirectMessenger'};
  v1->m_bAutoOnOff = 0;
}
// 9CDC88: using guessed type void (__thiscall *MiniSlotMachineWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CDCA4: using guessed type int (__thiscall *MiniSlotMachineWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00722D20) --------------------------------------------------------
void __thiscall MiniSlotMachineWin::~MiniSlotMachineWin(MiniSlotMachineWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&MiniSlotMachineWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MiniSlotMachineWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9CDC88: using guessed type void (__thiscall *MiniSlotMachineWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CDCA4: using guessed type int (__thiscall *MiniSlotMachineWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00722D40) --------------------------------------------------------
void __thiscall GBSlotHelpWin::GBSlotHelpWin(GBSlotHelpWin *this)
{
  GBSlotHelpWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GBSlotHelpWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GBSlotHelpWin::`vftable'{for `IDirectMessenger'};
}
// 9CDEC8: using guessed type void (__thiscall *GBSlotHelpWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CDEE4: using guessed type int (__thiscall *GBSlotHelpWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00722D60) --------------------------------------------------------
void __thiscall GBSlotHelpWin::~GBSlotHelpWin(GBSlotHelpWin *this)
{
  this->vfptr = (NiRefObjectVtbl *)&GBSlotHelpWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GBSlotHelpWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
}
// 9CDEC8: using guessed type void (__thiscall *GBSlotHelpWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CDEE4: using guessed type int (__thiscall *GBSlotHelpWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00722D80) --------------------------------------------------------
void __thiscall GBSlotHelpWin::UpdateMeWin(GBSlotHelpWin *this, float fCurTime)
{
  GBSlotHelpWin *v2; // esi@1

  v2 = this;
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
    GameFrameWork::UpdateUIScroll(v2->m_pListWin, v2->m_pSlideBar);
}

//----- (00722DB0) --------------------------------------------------------
void __thiscall SlotEntry::setAlpha(SlotEntry *this, float fAlpha)
{
  PgWinSpr *v2; // ecx@1

  v2 = this->ms_kSpr.m_pObject;
  if ( v2 )
    ((void (__stdcall *)(_DWORD))v2->vfptr[69].__vecDelDtor)(LODWORD(fAlpha));
}

//----- (00722DD0) --------------------------------------------------------
void __thiscall SlotMachineWin::SlotMachineWin(SlotMachineWin *this)
{
  SlotMachineWin *v1; // esi@1
  PgWinSpr **v2; // eax@1
  signed int v3; // ecx@1
  NiNode *v4; // edi@3

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&SlotMachineWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&SlotMachineWin::`vftable'{for `IDirectMessenger'};
  v1->m_MachineTimer.m_fStartTime = 0.0;
  v1->m_MachineTimer.m_fObjectTime = 0.0;
  v1->m_MachineTimer.m_fElapsedTime = 0.0;
  v1->m_GameTimer.m_fStartTime = 0.0;
  v1->m_GameTimer.m_fObjectTime = 0.0;
  v1->m_GameTimer.m_fElapsedTime = 0.0;
  `eh vector constructor iterator'(
    v1->ms_Slot,
    0x68u,
    9,
    (void (__thiscall *)(void *))SlotEntry::SlotEntry,
    (void (__thiscall *)(void *))SlotEntry::~SlotEntry);
  v1->ms_EffectPos.m_pObject = 0;
  v1->m_pkWinEffect[0] = 0;
  v1->m_pkWinEffect[1] = 0;
  v1->m_pkWinEffect[2] = 0;
  v1->m_pkWinEffect[3] = 0;
  v1->m_pkBarEffect[0] = 0;
  v1->m_pkBarEffect[1] = 0;
  v1->m_pkBetCoin[0] = 0;
  v1->m_pkBetNum[0] = 0;
  v1->m_pkShareCoin[0] = 0;
  v1->m_pkShareNum[0] = 0;
  v1->m_pkBetCoin[1] = 0;
  v1->m_pkBetNum[1] = 0;
  v1->m_pkShareCoin[1] = 0;
  v1->m_pkShareNum[1] = 0;
  v1->m_pkBetCoin[2] = 0;
  v1->m_pkBetNum[2] = 0;
  v1->m_pkShareCoin[2] = 0;
  v1->m_pkShareNum[2] = 0;
  v1->m_pkBetCoin[3] = 0;
  v1->m_pkBetNum[3] = 0;
  v1->m_pkShareCoin[3] = 0;
  v1->m_pkShareNum[3] = 0;
  v1->m_pkBetCoin[4] = 0;
  v1->m_pkBetNum[4] = 0;
  v1->m_pkShareCoin[4] = 0;
  v1->m_pkShareNum[4] = 0;
  v1->m_pkBetCoin[5] = 0;
  v1->m_pkBetNum[5] = 0;
  v1->m_pkShareCoin[5] = 0;
  v1->m_pkShareNum[5] = 0;
  v1->m_pkBetCoin[6] = 0;
  v1->m_pkBetNum[6] = 0;
  v1->m_pkShareCoin[6] = 0;
  v1->m_pkShareNum[6] = 0;
  v1->m_pkBetCoin[7] = 0;
  v1->m_pkBetNum[7] = 0;
  v1->m_pkShareCoin[7] = 0;
  v1->m_pkShareNum[7] = 0;
  v2 = v1->m_pkMyCoinNum;
  v3 = 12;
  do
  {
    *(v2 - 12) = 0;
    *v2 = 0;
    ++v2;
    --v3;
  }
  while ( v3 );
  v1->m_pkBetIndicator[0] = 0;
  v1->m_pkBetIndicator[1] = 0;
  v1->m_pkBetIndicator[2] = 0;
  v1->m_pkBetIndicator[3] = 0;
  v1->m_pkBetIndicator[4] = 0;
  v1->m_pkBetIndicator[5] = 0;
  v1->m_pkBetIndicator[6] = 0;
  v1->m_pkBetIndicator[7] = 0;
  v1->m_pkBetIndicator[8] = 0;
  v1->m_pkBetIndicator[9] = 0;
  v1->m_pkBetIndicator[10] = 0;
  v1->m_pkBetIndicator[11] = 0;
  v1->m_pkBetIndicator[12] = 0;
  v1->m_pkBetIndicator[13] = 0;
  v1->m_pkBetIndicator[14] = 0;
  v1->m_pkBetIndicator[15] = 0;
  v1->m_pkBetIndicator[16] = 0;
  v1->m_pkBetIndicator[17] = 0;
  v1->m_pkBetIndicator[18] = 0;
  v1->m_pkBetIndicator[19] = 0;
  v1->m_pkBetIndicator[20] = 0;
  v1->m_pkBetIndicator[21] = 0;
  v1->m_pkBetIndicator[22] = 0;
  v1->m_pkBetIndicator[23] = 0;
  v1->m_pkBetIndicator[24] = 0;
  v1->m_pkBetIndicator[25] = 0;
  v1->m_pkBetIndicator[26] = 0;
  v1->m_pkBetIndicator[27] = 0;
  v1->m_pkBetIndicator[28] = 0;
  v1->m_pkBetIndicator[29] = 0;
  v1->m_pkBetIndicator[30] = 0;
  v1->m_pkBetIndicator[31] = 0;
  v1->m_pkJackPotText[0] = 0;
  v1->m_pkJackPotText[1] = 0;
  v1->m_pkJackPotText[2] = 0;
  v1->m_pkButs[0] = 0;
  v1->m_pkButs[1] = 0;
  v1->m_pkButs[2] = 0;
  v1->m_pkButs[3] = 0;
  v1->m_pkButs[4] = 0;
  v1->m_pkButs[5] = 0;
  v1->m_pkWinLines[0] = 0;
  v1->m_pkWinLines[1] = 0;
  v1->m_pkWinLines[2] = 0;
  v1->m_pkWinLines[3] = 0;
  v1->m_pkWinLines[4] = 0;
  v1->m_pkWinLines[5] = 0;
  v1->m_pkWinLines[6] = 0;
  v1->m_pkWinLines[7] = 0;
  v1->m_pkWinSlots[0] = 0;
  v1->m_pkWinSlots[1] = 0;
  v1->m_pkWinSlots[2] = 0;
  v1->m_pkWinSlots[3] = 0;
  v1->m_pkWinSlots[4] = 0;
  v1->m_pkWinSlots[5] = 0;
  v1->m_pkWinSlots[6] = 0;
  v1->m_pkWinSlots[7] = 0;
  v1->m_pkWinSlots[8] = 0;
  v1->m_pkTitleText[0] = 0;
  v1->m_pkTitleText[1] = 0;
  v1->m_fAlpha = 0.0;
  v1->m_bTurnLight = 1;
  v1->m_bMachineTimeSetting = 0;
  v4 = v1->ms_EffectPos.m_pObject;
  if ( v4 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v1->ms_EffectPos.m_pObject = 0;
  }
  v1->me_State = 0;
  v1->m_iStopID = 0;
  v1->m_i1BetPerCoin = 10;
  LODWORD(v1->m_nTempUserCoin) = 0;
  HIDWORD(v1->m_nTempUserCoin) = 0;
  LODWORD(v1->m_nPreBettingCoin) = 0;
  HIDWORD(v1->m_nPreBettingCoin) = 0;
  LODWORD(v1->m_nBettingCoin) = 0;
  HIDWORD(v1->m_nBettingCoin) = 0;
  LODWORD(v1->m_nPreShareCoin) = 0;
  HIDWORD(v1->m_nPreShareCoin) = 0;
  LODWORD(v1->m_nShareCoin) = 0;
  HIDWORD(v1->m_nShareCoin) = 0;
  LODWORD(v1->m_nUserCoin) = 0;
  HIDWORD(v1->m_nUserCoin) = 0;
}
// 9CE10C: using guessed type void (__thiscall *SlotMachineWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CE12C: using guessed type int (__thiscall *SlotMachineWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00723180) --------------------------------------------------------
char __thiscall SlotMachineWin::SendBettingInfo(SlotMachineWin *this)
{
  SlotMachineWin *v1; // edi@1
  char v2; // al@2
  MHDiceGameTask *v3; // esi@4
  int v4; // ebx@7
  char v5; // al@8
  char v6; // cl@9
  char v7; // dl@9
  int v8; // esi@9
  int v9; // eax@10
  NiPointer<MHDiceGameTask> result; // [sp+4h] [bp-30h]@3
  MHDiceGameTask *pkTask; // [sp+8h] [bp-2Ch]@3
  PROTO_NC_GAMBLE_SLOTMACHINE_START_REQ kProto; // [sp+Ch] [bp-28h]@15
  int value[8]; // [sp+10h] [bp-24h]@9

  v1 = this;
  if ( this->me_State == 1 )
  {
    this->me_State = 2;
    pkTask = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v4 = v1->m_iBetNum;
    if ( v4 != -1 && (v5 = 0, pkTask) )
    {
      v6 = 0;
      v7 = 0;
      v8 = 0;
      value[0] = 0;
      value[1] = 0;
      value[2] = 0;
      value[3] = 0;
      value[4] = 0;
      value[5] = 0;
      value[6] = 0;
      value[7] = 0;
      if ( v4 >= 0 )
      {
        v9 = v4 + 1;
        do
        {
          ++value[v8++];
          if ( v8 == 8 )
            v8 = 0;
          --v9;
        }
        while ( v9 );
        v7 = value[7];
        v5 = value[6];
        v6 = value[1];
      }
      kProto.betting = (SLOTMACHINE_BettingLine)(value[2] & 7 | *(_BYTE *)&kProto.betting & 0xC0 | 8 * (v6 & 7));
      *((_BYTE *)&kProto.betting + 1) ^= ((LOBYTE(value[0]) ^ *((_BYTE *)&kProto.betting + 1)) & 7 ^ *((_BYTE *)&kProto.betting + 1) ^ 8 * LOBYTE(value[4])) & 0x38 ^ (LOBYTE(value[0]) ^ *((_BYTE *)&kProto.betting + 1)) & 7;
      *((_BYTE *)&kProto.betting + 2) = value[5] & 7 | *((_BYTE *)&kProto.betting + 2) & 0xC0 | 8 * (v5 & 7);
      *((_BYTE *)&kProto.betting + 3) ^= ((*((_BYTE *)&kProto.betting + 3) ^ 8 * v7) & 0x38 ^ *((_BYTE *)&kProto.betting
                                                                                              + 3) ^ LOBYTE(value[3])) & 7 ^ (*((_BYTE *)&kProto.betting + 3) ^ 8 * v7) & 0x38;
      MHDiceGameTask::NcGambleSlotmachineStartReq(&kProto);
      v2 = 1;
    }
    else
    {
      v2 = 0;
    }
  }
  else
  {
    v2 = 0;
  }
  return v2;
}

//----- (00723300) --------------------------------------------------------
void __thiscall GBSlotRankWin::UpdateMeWin(GBSlotRankWin *this, float fCurTime)
{
  GBSlotRankWin *v2; // esi@1

  v2 = this;
  if ( PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID) )
    GameFrameWork::UpdateUIScroll(v2->m_pUserList, v2->m_pkSlideBarEx);
}

//----- (00723330) --------------------------------------------------------
void __stdcall MiniSlotMachineWin::OnCommand(unsigned int wParam, int lParam)
{
  MHDiceGameTask *v3; // ecx@2
  void (__thiscall ***v4)(_DWORD, _DWORD); // esi@3

  if ( !wParam )
  {
    v3 = MHDiceGameTask::GetDiceGameTask((NiPointer<MHDiceGameTask> *)&wParam)->m_pObject;
    MHDiceGameTask::OpenSlotMachineWin();
    if ( wParam )
    {
      v4 = (void (__thiscall ***)(_DWORD, _DWORD))wParam;
      if ( !InterlockedDecrement((volatile LONG *)(wParam + 4)) )
      {
        if ( v4 )
          (**v4)(v4, 1);
      }
    }
  }
}

//----- (007233C0) --------------------------------------------------------
void __stdcall MiniSlotMachineWin::UpdateMeWin(float fCurTime)
{
  MHDiceGameTask *v2; // edi@1
  MHDiceGameTask *v3; // esi@2
  NiPointer<MHDiceGameTask> result; // [sp+Ch] [bp-4h]@1

  v2 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  if ( result.m_pObject )
  {
    v3 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
  }
  if ( v2 )
    MHDiceGameTask::UpdateSlotMachineGame(v2, fCurTime);
}

//----- (00723420) --------------------------------------------------------
void __thiscall GBSlotHelpWin::CloseWin(GBSlotHelpWin *this)
{
  GBSlotHelpWin *v1; // esi@1
  MHDiceGameTask *v2; // ecx@1
  MHDiceGameTask *v3; // esi@2
  NiPointer<MHDiceGameTask> result; // [sp+8h] [bp-10h]@1
  int v5; // [sp+14h] [bp-4h]@1

  v1 = this;
  v2 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  v5 = 0;
  MHDiceGameTask::OnCloseWin((PgWin *)&v1->vfptr);
  v5 = -1;
  if ( result.m_pObject )
  {
    v3 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
  }
}

//----- (007234A0) --------------------------------------------------------
void __thiscall GBSlotHelpWin::OnSlideBar(GBSlotHelpWin *this)
{
  GBSlotHelpWin *v1; // esi@1
  SlideBar *v2; // ecx@1

  v1 = this;
  v2 = this->m_pSlideBar;
  if ( v2 )
  {
    SlideBar::SetSplitCnt(v2, v1->m_pListWin->m_nSlideSplitCnt);
    v1->m_pListWin->m_nViewStartPos = v1->m_pSlideBar->m_nCurPos;
    SlideListWin::UpdateViewList(v1->m_pListWin);
  }
}

//----- (007234F0) --------------------------------------------------------
void __thiscall SlotEntry::reset(SlotEntry *this)
{
  SlotEntry *v1; // esi@1
  double v2; // st7@2
  double v3; // st7@3
  double v4; // st5@3
  double v5; // st6@3
  PgWinSpr *v6; // eax@4
  PgSpr *v7; // eax@4
  PgSprData *v8; // eax@5
  NiScreenElementsData *v9; // edi@7
  NiPoint2 kValue; // [sp+4h] [bp-Ch]@2
  float v11; // [sp+Ch] [bp-4h]@2

  v1 = this;
  if ( this->ms_kSpr.m_pObject )
  {
    kValue.y = this->_MaxSpeed;
    v11 = this->_Time;
    v2 = 0.0;
    if ( v11 > 0.0 )
    {
      v3 = v11;
      this->_easeInOut._value = 0.0;
      v4 = kValue.y;
      this->_easeInOut._target = kValue.y;
      this->_easeInOut._speed = 0.0;
      this->_easeInOut._acceleration = (v4 - 0.0) / (v3 * v3 * 0.25);
      v5 = v3;
      v2 = 0.0;
      this->_easeInOut._totalTime = v5;
      this->_easeInOut._remainingTime = v5;
    }
    v6 = this->ms_kSpr.m_pObject;
    this->_fMove = v2;
    this->_fOverDist = v2;
    this->_bUseTimer = 0;
    this->me_state = 3;
    this->_bTransiton = 0;
    v7 = v6->m_spSpr.m_pObject;
    if ( v7 )
      v8 = v7->m_spSprData.m_pObject;
    else
      v8 = 0;
    v9 = v8->m_akGeomData.m_pBase->m_pObject;
    if ( v9 )
    {
      kValue.x = v2;
      kValue.y = v2;
      NiScreenElementsData::SetTexture(v9, 0, 0, 0, &kValue);
      kValue.x = 0.0;
      kValue.y = v1->cHeightInTex;
      NiScreenElementsData::SetTexture(v9, 0, 1, 0, &kValue);
      kValue.x = 1.0;
      kValue.y = v1->cHeightInTex;
      NiScreenElementsData::SetTexture(v9, 0, 2, 0, &kValue);
      kValue.x = 1.0;
      kValue.y = 0.0;
      NiScreenElementsData::SetTexture(v9, 0, 3, 0, &kValue);
    }
  }
}

//----- (00723610) --------------------------------------------------------
void __thiscall SlotEntry::setup(SlotEntry *this, NiAVObject *pkNode, char *pcTag, PgWin *pkParent, float speed, float time)
{
  SlotEntry *v6; // esi@1
  NiSourceTexture *v7; // eax@1
  PgWinSpr *v8; // eax@1
  PgWinSpr *v9; // edi@1
  PgWinSpr *v10; // ebx@1
  PgSpr *v11; // eax@8
  NiAVObject *v12; // ecx@9
  NiTexturingProperty *v13; // eax@11
  UIUtil ui; // [sp+10h] [bp-20h]@1
  int v15; // [sp+2Ch] [bp-4h]@1

  v6 = this;
  UIUtil::UIUtil(&ui);
  v15 = 0;
  UIUtil::SetParent(&ui, pkParent);
  UIUtil::SetOffset(&ui, 0, 0);
  UIUtil::SetUIGeom(&ui, pkNode);
  v7 = MenuTexMgr::GetTexture(0x19u);
  v8 = UIUtil::CreateSpr(&ui, pcTag, v7);
  v9 = v6->ms_kSpr.m_pObject;
  v10 = v8;
  if ( v9 != v8 )
  {
    if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v6->ms_kSpr.m_pObject = v10;
    if ( v10 )
      InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
  }
  v11 = v6->ms_kSpr.m_pObject->m_spSpr.m_pObject;
  if ( v11->m_akGeom.m_uiSize )
    v12 = (NiAVObject *)v11->m_akGeom.m_pBase->m_pObject;
  else
    v12 = 0;
  v13 = (NiTexturingProperty *)NiAVObject::GetProperty(v12, 8);
  NiTexturingProperty::SetBaseClampMode(v13, WRAP_S_WRAP_T);
  v6->_MaxSpeed = speed;
  v6->_Time = time;
  SlotEntry::reset(v6);
  v15 = -1;
  UIUtil::~UIUtil(&ui);
}

//----- (00723720) --------------------------------------------------------
void __thiscall SlotEntry::update(SlotEntry *this, float fTime)
{
  SlotEntry *v2; // esi@1
  SlotEntry::ESLOT_STATE v3; // eax@4
  int v4; // eax@5
  double v5; // st7@8
  double v6; // st7@9
  double v7; // st7@16
  double v8; // st7@19
  PgSpr *v9; // eax@24
  PgSprData *v10; // eax@25
  NiScreenElementsData *v11; // edi@27
  NiPoint2 kValue; // [sp+14h] [bp-10h]@28
  NiPoint2 kUV; // [sp+1Ch] [bp-8h]@4
  float acel; // [sp+2Ch] [bp+8h]@4
  float acela; // [sp+2Ch] [bp+8h]@18
  float acelb; // [sp+2Ch] [bp+8h]@28

  v2 = this;
  if ( this->me_state == 3 )
    return;
  if ( !this->_bUseTimer )
  {
    this->_DiceTimer.m_fStartTime = fTime;
    this->_DiceTimer.m_fObjectTime = 0.0;
    this->_DiceTimer.m_fElapsedTime = 0.0;
    this->_bUseTimer = 1;
    return;
  }
  kUV.y = this->_DiceTimer.m_fObjectTime;
  acel = fTime - this->_DiceTimer.m_fStartTime;
  this->_DiceTimer.m_fObjectTime = acel;
  this->_DiceTimer.m_fElapsedTime = acel - kUV.y;
  v3 = this->me_state;
  if ( v3 == ES_INCREASE )
  {
    if ( (unsigned __int8)CEaseInOutInterpolation::Interpolate(&this->_easeInOut, this->_DiceTimer.m_fElapsedTime) )
      v7 = v2->_MaxSpeed;
    else
      v7 = v2->_easeInOut._value;
    acela = v7;
    if ( v2->_fWheelTime <= 5.0 )
    {
      v8 = v2->_DiceTimer.m_fElapsedTime + v2->_fWheelTime;
    }
    else
    {
      SoundMgr::PlayInterfaceSound(&g_kSoundMgr, GB_SM_ReelLoop);
      v8 = 0.0;
    }
    v2->_fWheelTime = v8;
    v6 = v2->_DiceTimer.m_fElapsedTime * acela;
LABEL_22:
    acel = v6;
    goto LABEL_23;
  }
  v4 = v3 - 1;
  if ( !v4 )
  {
    if ( CEaseInOutInterpolation::InterpoateWithDist(&this->_easeInOut, this->_DiceTimer.m_fElapsedTime) )
    {
      v2->me_state = 2;
      v2->_bTransiton = 1;
      CEaseInOutInterpolation::SetupWithDist(&v2->_easeInOut, v2->_fOverDist, 0.2, 50.0);
      return;
    }
    acel = v2->_easeInOut._value;
    if ( 0.0 == acel )
      return;
    goto LABEL_23;
  }
  if ( v4 == 1 )
  {
    if ( CEaseInOutInterpolation::InterpoateWithDist(&this->_easeInOut, this->_DiceTimer.m_fElapsedTime) )
    {
      v2->me_state = 3;
      return;
    }
    v5 = v2->_easeInOut._value;
    if ( 0.0 == v5 )
      return;
    v6 = -v5;
    goto LABEL_22;
  }
LABEL_23:
  if ( v2->me_state != 3 )
  {
    v9 = v2->ms_kSpr.m_pObject->m_spSpr.m_pObject;
    if ( v9 )
      v10 = v9->m_spSprData.m_pObject;
    else
      v10 = 0;
    v11 = v10->m_akGeomData.m_pBase->m_pObject;
    if ( v11 )
    {
      NiScreenElementsData::GetTexture(v11, 0, 0, 0, &kUV);
      acelb = acel * 0.001953125;
      kValue.x = 0.0;
      kValue.y = kUV.y - acelb;
      NiScreenElementsData::SetTexture(v11, 0, 0, 0, &kValue);
      kValue.x = 0.0;
      kValue.y = kUV.y - acelb + (float)v2->cHeightInTex;
      NiScreenElementsData::SetTexture(v11, 0, 1, 0, &kValue);
      kValue.x = 1.0;
      kValue.y = kUV.y - acelb + (float)v2->cHeightInTex;
      NiScreenElementsData::SetTexture(v11, 0, 2, 0, &kValue);
      kValue.x = 1.0;
      kValue.y = kUV.y - acelb;
      NiScreenElementsData::SetTexture(v11, 0, 3, 0, &kValue);
    }
  }
}

//----- (00723970) --------------------------------------------------------
void __thiscall SlotEntry::stop(SlotEntry *this, int num)
{
  SlotEntry *v2; // esi@1
  PgWinSpr *v3; // eax@1
  PgSpr *v4; // eax@1
  PgSprData *v5; // eax@2
  NiScreenElementsData *v6; // edi@4
  double v7; // st7@5
  double v8; // st6@5
  double v9; // st6@6
  NiPoint2 kValue; // [sp+8h] [bp-Ch]@5
  float v11; // [sp+10h] [bp-4h]@5
  float fka; // [sp+1Ch] [bp+8h]@5
  float fkb; // [sp+1Ch] [bp+8h]@5
  float fkc; // [sp+1Ch] [bp+8h]@5
  float fk; // [sp+1Ch] [bp+8h]@5

  v2 = this;
  v3 = this->ms_kSpr.m_pObject;
  this->me_state = 1;
  this->_bUseTimer = 0;
  v4 = v3->m_spSpr.m_pObject;
  if ( v4 )
    v5 = v4->m_spSprData.m_pObject;
  else
    v5 = 0;
  v6 = v5->m_akGeomData.m_pBase->m_pObject;
  if ( v6 )
  {
    v11 = (double)(num + 13);
    fka = v11 / 9.0;
    kValue.x = 0.0;
    kValue.y = fka;
    NiScreenElementsData::SetTexture(v6, 0, 0, 0, &kValue);
    kValue.x = 0.0;
    kValue.y = (float)v2->cHeightInTex + fka;
    NiScreenElementsData::SetTexture(v6, 0, 1, 0, &kValue);
    kValue.x = 1.0;
    kValue.y = (float)v2->cHeightInTex + fka;
    NiScreenElementsData::SetTexture(v6, 0, 2, 0, &kValue);
    kValue.x = 1.0;
    kValue.y = fka;
    NiScreenElementsData::SetTexture(v6, 0, 3, 0, &kValue);
    kValue.y = (double)(rand() % 57 / 4);
    v7 = kValue.y;
    v2->_fOverDist = kValue.y;
    v8 = fka;
    fkb = v11 * (float)v2->cHeightInTex;
    fkc = (v8 - fkb) * 512.0;
    fk = v7 + fkc + 739.5555610656738;
    kValue.y = v2->_MaxSpeed;
    if ( fk > 0.0 )
    {
      v2->_easeInOut._value = 0.0;
      v2->_easeInOut._target = 0.0;
      v9 = kValue.y;
      v2->_easeInOut._speed = kValue.y;
      v2->_easeInOut._acceleration = v9 / 9.0;
      v2->_easeInOut._totalDist = fk;
      v2->_easeInOut._remainingDist = fk;
      v2->_easeInOut._totalTime = 3.0;
      v2->_easeInOut._remainingTime = 3.0;
    }
    SoundMgr::PlayInterfaceSound(&g_kSoundMgr, "GB_SM_ReelEnd");
  }
}

//----- (00723AE0) --------------------------------------------------------
void __thiscall SlotMachineWin::~SlotMachineWin(SlotMachineWin *this)
{
  SlotMachineWin *v1; // esi@1
  MHChipEffect **v2; // edi@1
  void *v3; // edi@6
  PgWinSpr **v4; // eax@18
  signed int v5; // ecx@18
  NiNode *v6; // edi@20
  NiNode *v7; // edi@25
  MHChipEffect *p; // [sp+18h] [bp-18h]@2
  char *pa; // [sp+18h] [bp-18h]@5
  signed int v10; // [sp+1Ch] [bp-14h]@1
  void **v11; // [sp+1Ch] [bp-14h]@5
  void (__stdcall ***v12)(_DWORD); // [sp+20h] [bp-10h]@7
  void (__stdcall ***v13)(_DWORD); // [sp+20h] [bp-10h]@12

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&SlotMachineWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&SlotMachineWin::`vftable'{for `IDirectMessenger'};
  v2 = this->m_pkWinEffect;
  v10 = 4;
  do
  {
    p = *v2;
    if ( *v2 )
    {
      MHChipEffect::~MHChipEffect(*v2);
      operator delete(p);
    }
    ++v2;
    --v10;
  }
  while ( v10 );
  v11 = (void **)v1->m_pkBarEffect;
  pa = (char *)2;
  do
  {
    v3 = *v11;
    if ( *v11 )
    {
      v12 = *(void (__stdcall ****)(_DWORD))v3;
      if ( *(_DWORD *)v3 )
      {
        if ( !InterlockedDecrement((volatile LONG *)(*(_DWORD *)v3 + 4)) && v12 )
          (**v12)(1);
        *(_DWORD *)v3 = 0;
      }
      NsEffect::~NsEffect((NsEffect *)((char *)v3 + 28));
      ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)((char *)v3 + 4));
      v13 = *(void (__stdcall ****)(_DWORD))v3;
      if ( *(_DWORD *)v3 && !InterlockedDecrement((volatile LONG *)(*(_DWORD *)v3 + 4)) && v13 )
        (**v13)(1);
      operator delete(v3);
    }
    ++v11;
    --pa;
  }
  while ( pa );
  v1->m_pkBetCoin[0] = 0;
  v1->m_pkBetNum[0] = 0;
  v1->m_pkShareCoin[0] = 0;
  v1->m_pkShareNum[0] = 0;
  v1->m_pkBetCoin[1] = 0;
  v1->m_pkBetNum[1] = 0;
  v1->m_pkShareCoin[1] = 0;
  v1->m_pkShareNum[1] = 0;
  v1->m_pkBetCoin[2] = 0;
  v1->m_pkBetNum[2] = 0;
  v1->m_pkShareCoin[2] = 0;
  v1->m_pkShareNum[2] = 0;
  v1->m_pkBetCoin[3] = 0;
  v1->m_pkBetNum[3] = 0;
  v1->m_pkShareCoin[3] = 0;
  v1->m_pkShareNum[3] = 0;
  v1->m_pkBetCoin[4] = 0;
  v1->m_pkBetNum[4] = 0;
  v1->m_pkShareCoin[4] = 0;
  v1->m_pkShareNum[4] = 0;
  v1->m_pkBetCoin[5] = 0;
  v1->m_pkBetNum[5] = 0;
  v1->m_pkShareCoin[5] = 0;
  v1->m_pkShareNum[5] = 0;
  v1->m_pkBetCoin[6] = 0;
  v1->m_pkBetNum[6] = 0;
  v1->m_pkShareCoin[6] = 0;
  v1->m_pkShareNum[6] = 0;
  v1->m_pkBetCoin[7] = 0;
  v1->m_pkBetNum[7] = 0;
  v1->m_pkShareCoin[7] = 0;
  v1->m_pkShareNum[7] = 0;
  v4 = v1->m_pkMyCoinNum;
  v5 = 12;
  do
  {
    *(v4 - 12) = 0;
    *v4 = 0;
    ++v4;
    --v5;
  }
  while ( v5 );
  v1->m_pkBetIndicator[0] = 0;
  v1->m_pkBetIndicator[1] = 0;
  v1->m_pkBetIndicator[2] = 0;
  v1->m_pkBetIndicator[3] = 0;
  v1->m_pkBetIndicator[4] = 0;
  v1->m_pkBetIndicator[5] = 0;
  v1->m_pkBetIndicator[6] = 0;
  v1->m_pkBetIndicator[7] = 0;
  v1->m_pkBetIndicator[8] = 0;
  v1->m_pkBetIndicator[9] = 0;
  v1->m_pkBetIndicator[10] = 0;
  v1->m_pkBetIndicator[11] = 0;
  v1->m_pkBetIndicator[12] = 0;
  v1->m_pkBetIndicator[13] = 0;
  v1->m_pkBetIndicator[14] = 0;
  v1->m_pkBetIndicator[15] = 0;
  v1->m_pkBetIndicator[16] = 0;
  v1->m_pkBetIndicator[17] = 0;
  v1->m_pkBetIndicator[18] = 0;
  v1->m_pkBetIndicator[19] = 0;
  v1->m_pkBetIndicator[20] = 0;
  v1->m_pkBetIndicator[21] = 0;
  v1->m_pkBetIndicator[22] = 0;
  v1->m_pkBetIndicator[23] = 0;
  v1->m_pkBetIndicator[24] = 0;
  v1->m_pkBetIndicator[25] = 0;
  v1->m_pkBetIndicator[26] = 0;
  v1->m_pkBetIndicator[27] = 0;
  v1->m_pkBetIndicator[28] = 0;
  v1->m_pkBetIndicator[29] = 0;
  v1->m_pkBetIndicator[30] = 0;
  v1->m_pkBetIndicator[31] = 0;
  v1->m_pkJackPotText[0] = 0;
  v1->m_pkJackPotText[1] = 0;
  v1->m_pkJackPotText[2] = 0;
  v1->m_pkButs[0] = 0;
  v1->m_pkButs[1] = 0;
  v1->m_pkButs[2] = 0;
  v1->m_pkButs[3] = 0;
  v1->m_pkButs[4] = 0;
  v1->m_pkButs[5] = 0;
  v1->m_pkWinLines[0] = 0;
  v1->m_pkWinLines[1] = 0;
  v1->m_pkWinLines[2] = 0;
  v1->m_pkWinLines[3] = 0;
  v1->m_pkWinLines[4] = 0;
  v1->m_pkWinLines[5] = 0;
  v1->m_pkWinLines[6] = 0;
  v1->m_pkWinLines[7] = 0;
  v1->m_pkWinSlots[0] = 0;
  v1->m_pkWinSlots[1] = 0;
  v1->m_pkWinSlots[2] = 0;
  v1->m_pkWinSlots[3] = 0;
  v1->m_pkWinSlots[4] = 0;
  v1->m_pkWinSlots[5] = 0;
  v1->m_pkWinSlots[6] = 0;
  v1->m_pkWinSlots[7] = 0;
  v1->m_pkWinSlots[8] = 0;
  v6 = v1->ms_EffectPos.m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v1->ms_EffectPos.m_pObject = 0;
  }
  v7 = v1->ms_EffectPos.m_pObject;
  if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  `eh vector destructor iterator'(v1->ms_Slot, 0x68u, 9, (void (__thiscall *)(void *))SlotEntry::~SlotEntry);
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9CE10C: using guessed type void (__thiscall *SlotMachineWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CE12C: using guessed type int (__thiscall *SlotMachineWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00723EC0) --------------------------------------------------------
char __thiscall SlotMachineWin::Create(SlotMachineWin *this, PgFrameWork *pkFrameWork)
{
  SlotMachineWin *v2; // ebx@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  PgSprData *v5; // eax@4
  NiNode *v6; // esi@5
  LONG v7; // eax@6
  PgWinSpr *v9; // eax@11
  PgWinSpr *v10; // eax@13
  PgWinSpr *v11; // eax@15
  PgWinSpr *v12; // eax@17
  PgWinSpr *v13; // eax@19
  PgWinSpr *v14; // eax@21
  PgWinSpr *v15; // eax@23
  PgWinSpr *v16; // eax@25
  PgWinSpr *v17; // eax@27
  PgWinSpr *v18; // eax@29
  PgWinSpr *v19; // esi@29
  D3DXCOLOR v20; // STA0_16@37
  char *v21; // eax@37
  PgWinText *v22; // eax@37
  NiRefObjectVtbl *v23; // esi@37
  PgFont *v24; // eax@37
  D3DXCOLOR v25; // STA0_16@37
  PgWinText *v26; // eax@37
  NiRefObjectVtbl *v27; // esi@37
  PgFont *v28; // eax@37
  PgWinSpr *v29; // esi@37
  char *v30; // eax@37
  PgWinSpr *v31; // esi@37
  char *v32; // eax@37
  PgWinSpr *v33; // esi@37
  char *v34; // eax@37
  PgWinSpr *v35; // esi@37
  char *v36; // eax@37
  PgWinSpr *v37; // esi@37
  char *v38; // eax@37
  PgWinSpr *v39; // esi@37
  char *v40; // eax@37
  PgWinBut *v41; // esi@37
  char *v42; // eax@37
  PgWinBut *v43; // esi@37
  char *v44; // eax@37
  PgWinBut *v45; // esi@37
  char *v46; // eax@37
  PgWinBut *v47; // eax@37
  char *v48; // eax@37
  PgWinBut *v49; // eax@37
  char *v50; // eax@37
  PgWinBut *v51; // eax@37
  char *v52; // eax@37
  PgWinBut *v53; // eax@37
  char *v54; // eax@37
  PgWinBut *v55; // eax@37
  char *v56; // eax@37
  PgWinBut *v57; // eax@37
  char *v58; // eax@37
  PgSprData *v59; // esi@37
  PgWinText **v60; // edi@37
  D3DXCOLOR v61; // STA0_16@38
  PgWinText *v62; // eax@38
  NiRefObjectVtbl *v63; // esi@38
  PgFont *v64; // eax@38
  signed int v65; // esi@39
  PgWinSpr *v66; // eax@40
  signed int v67; // esi@43
  int v68; // edi@43
  PgWinSpr *v69; // eax@44
  PgWinSpr *v70; // eax@47
  signed int v71; // esi@49
  SlotEntry *v72; // edi@49
  signed int v73; // esi@51
  int v74; // edi@51
  PgWinSpr *v75; // eax@52
  signed int v76; // esi@55
  PgWinSpr **v77; // edi@55
  PgWinSpr *v78; // eax@56
  NiTexturePalette *v79; // esi@59
  int v80; // eax@61
  char v81; // cl@62
  char *v82; // eax@63
  char v83; // cl@64
  PgSprData *v84; // edi@68
  signed int v85; // esi@68
  unsigned int v86; // edi@70
  int v87; // esi@70
  PgWinSpr *v88; // eax@71
  PgWinSpr *v89; // eax@71
  unsigned int v90; // edi@72
  int v91; // esi@72
  PgWinSpr *v92; // eax@73
  PgWinSpr *v93; // eax@73
  PgSprData *v94; // edi@74
  signed int v95; // esi@74
  unsigned int v96; // edi@76
  PgWinSpr **v97; // esi@76
  PgWinSpr *v98; // eax@77
  PgWinSpr *v99; // eax@77
  int v100; // eax@80
  char v101; // cl@81
  char *v102; // eax@82
  char v103; // cl@83
  NiObjectNET *v104; // edi@84
  void *v105; // esi@84
  PgSprData *v106; // edi@85
  PgSprData *v107; // eax@90
  int v108; // ecx@94
  int v109; // eax@96
  char v110; // cl@97
  char *v111; // eax@98
  char v112; // cl@99
  NiObjectNET *v113; // edi@100
  void *v114; // esi@100
  PgSprData *v115; // edi@101
  PgSprData *v116; // eax@106
  int v117; // eax@112
  char v118; // cl@113
  char *v119; // eax@114
  char v120; // cl@115
  NiObjectNET *v121; // edi@116
  void *v122; // esi@116
  PgSprData *v123; // edi@117
  PgSprData *v124; // eax@122
  int v125; // eax@128
  char v126; // cl@129
  char *v127; // eax@130
  char v128; // cl@131
  NiObjectNET *v129; // edi@132
  void *v130; // esi@132
  PgSprData *v131; // edi@133
  PgSprData *v132; // eax@138
  int v133; // eax@144
  char v134; // cl@145
  char *v135; // eax@146
  char v136; // cl@147
  NiObjectNET *v137; // edi@148
  void *v138; // esi@148
  PgSprData *v139; // edi@149
  PgSprData *v140; // eax@154
  int v141; // eax@160
  char v142; // cl@161
  char *v143; // edi@162
  char v144; // al@163
  NiObjectNET *v145; // edi@164
  void *v146; // esi@164
  PgSprData *v147; // edi@165
  PgSprData *v148; // eax@165
  D3DXCOLOR v149; // STA0_16@175
  PgWinText *v150; // esi@175
  NiRefObjectVtbl *v151; // edi@175
  PgFont *v152; // eax@175
  PgWinText *v153; // edi@175
  NiNode *v154; // esi@181
  __int64 v155; // STC8_8@181
  _BYTE STA8_12_181[12]; // STA8_12@181
  int v157; // eax@181
  NiQuaternion v158; // ST98_16@181
  int v159; // eax@181
  int v160; // ecx@181
  NiNode *v161; // esi@182
  NiNode *v162; // esi@185
  char *pcTag; // [sp+D0h] [bp-ECh]@76
  const char *v164; // [sp+D4h] [bp-E8h]@76
  const char *v165; // [sp+D8h] [bp-E4h]@76
  const char *v166; // [sp+DCh] [bp-E0h]@76
  char *acShareBetType[8]; // [sp+E0h] [bp-DCh]@70
  int uiLeft; // [sp+100h] [bp-BCh]@4
  int uiTop; // [sp+104h] [bp-B8h]@4
  void *v170; // [sp+108h] [bp-B4h]@84
  NiPointer<NiNode> spNumNode; // [sp+10Ch] [bp-B0h]@59
  NiPointer<NiNode> spNode; // [sp+110h] [bp-ACh]@1
  UIUtil ui; // [sp+114h] [bp-A8h]@11
  PgSprData *pkSprData; // [sp+128h] [bp-94h]@38
  char acNodeName[128]; // [sp+12Ch] [bp-90h]@38
  int v176; // [sp+1B8h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v176 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\GB_SlotMachineMain.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  if ( !spNode.m_pObject )
    return 0;
  v5 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, 0);
  if ( !PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v5, 0, pkFrameWork, "SlotMachineWin", 0) )
  {
    v6 = spNode.m_pObject;
    v176 = -1;
    if ( spNode.m_pObject )
    {
      v7 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
      goto LABEL_7;
    }
    return 0;
  }
  UIUtil::UIUtil(&ui);
  LOBYTE(v176) = 1;
  UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
  UIUtil::SetOffset(&ui, 0, 0);
  UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
  v9 = UIUtil::CreateSpr(&ui, "Panel01", 0);
  if ( v9 )
    v9->vfptr[60].__vecDelDtor((NiRefObject *)v9, 0);
  v10 = UIUtil::CreateSpr(&ui, "Panel02", 0);
  if ( v10 )
    v10->vfptr[60].__vecDelDtor((NiRefObject *)v10, 0);
  v11 = UIUtil::CreateSpr(&ui, "Panel03", 0);
  if ( v11 )
    v11->vfptr[60].__vecDelDtor((NiRefObject *)v11, 0);
  v12 = UIUtil::CreateSpr(&ui, "Panel04", 0);
  if ( v12 )
    v12->vfptr[60].__vecDelDtor((NiRefObject *)v12, 0);
  v13 = UIUtil::CreateSpr(&ui, "Panel05", 0);
  if ( v13 )
    v13->vfptr[60].__vecDelDtor((NiRefObject *)v13, 0);
  v14 = UIUtil::CreateSpr(&ui, "Panel06", 0);
  if ( v14 )
    v14->vfptr[60].__vecDelDtor((NiRefObject *)v14, 0);
  v15 = UIUtil::CreateSpr(&ui, "Panel07", 0);
  if ( v15 )
    v15->vfptr[60].__vecDelDtor((NiRefObject *)v15, 0);
  v16 = UIUtil::CreateSpr(&ui, "Panel08", 0);
  if ( v16 )
    v16->vfptr[60].__vecDelDtor((NiRefObject *)v16, 0);
  v17 = UIUtil::CreateSpr(&ui, "Panel09", 0);
  if ( v17 )
    v17->vfptr[60].__vecDelDtor((NiRefObject *)v17, 0);
  v18 = UIUtil::CreateSpr(&ui, "Coin", 0);
  v19 = v18;
  if ( v18 )
    v18->vfptr[60].__vecDelDtor((NiRefObject *)v18, 0);
  v2->m_pkFrameSpr[0] = UIUtil::CreateSpr(&ui, "Cooper", 0);
  if ( v19 )
    v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
  v2->m_pkFrameSpr[1] = UIUtil::CreateSpr(&ui, "Silver", 0);
  if ( v19 )
    v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
  v2->m_pkFrameSpr[2] = UIUtil::CreateSpr(&ui, "Gold", 0);
  if ( v19 )
    v19->vfptr[60].__vecDelDtor((NiRefObject *)v19, 0);
  *(_QWORD *)&v20.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v20.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v21 = (char *)TextData2::Get(0x9CEEC8C9);
  v22 = UIUtil::CreateTextNoSpr(&ui, "Title01", v21, v20, 5u);
  v2->m_pkTitleText[0] = v22;
  v23 = v22->vfptr;
  v24 = Font::Get(MAIN_MENU);
  v23[113].__vecDelDtor((NiRefObject *)v2->m_pkTitleText[0], (unsigned int)v24);
  ((void (__stdcall *)(signed int))v2->m_pkTitleText[0]->vfptr[122].__vecDelDtor)(5);
  *(_QWORD *)&v25.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v25.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  v26 = UIUtil::CreateTextNoSpr(&ui, "Title02", byte_9CD38E, v25, 5u);
  v2->m_pkTitleText[1] = v26;
  v27 = v26->vfptr;
  v28 = Font::Get(MAIN_MENU);
  v27[113].__vecDelDtor((NiRefObject *)v2->m_pkTitleText[1], (unsigned int)v28);
  ((void (__stdcall *)(signed int))v2->m_pkTitleText[1]->vfptr[122].__vecDelDtor)(5);
  v29 = UIUtil::CreateSpr(&ui, "Button1", 0);
  v29->m_pkToolTipWin = g_pkToolTipWin;
  v30 = (char *)TextData2::Get(0xBB02D632);
  PgWin::SetToolTipWinText((PgWin *)&v29->vfptr, v30);
  v31 = UIUtil::CreateSpr(&ui, "Button2", 0);
  v31->m_pkToolTipWin = g_pkToolTipWin;
  v32 = (char *)TextData2::Get(0x7C9E7B6Du);
  PgWin::SetToolTipWinText((PgWin *)&v31->vfptr, v32);
  v33 = UIUtil::CreateSpr(&ui, "Button3", 0);
  v33->m_pkToolTipWin = g_pkToolTipWin;
  v34 = (char *)TextData2::Get(0x6DAE81D1u);
  PgWin::SetToolTipWinText((PgWin *)&v33->vfptr, v34);
  v35 = UIUtil::CreateSpr(&ui, "ButtonAll", 0);
  v35->m_pkToolTipWin = g_pkToolTipWin;
  v36 = (char *)TextData2::Get(0x30642117u);
  PgWin::SetToolTipWinText((PgWin *)&v35->vfptr, v36);
  v37 = UIUtil::CreateSpr(&ui, "ButtonCenter", 0);
  v37->m_pkToolTipWin = g_pkToolTipWin;
  v38 = (char *)TextData2::Get(0x7AA98967u);
  PgWin::SetToolTipWinText((PgWin *)&v37->vfptr, v38);
  v39 = UIUtil::CreateSpr(&ui, "ButtonJackpot", 0);
  v39->m_pkToolTipWin = g_pkToolTipWin;
  v40 = (char *)TextData2::Get(0xD9692A0C);
  PgWin::SetToolTipWinText((PgWin *)&v39->vfptr, v40);
  UIUtil::CreateBtn(&ui, 0, "MinNor", "MinClick", "MinOver", 0, 0);
  v41 = UIUtil::CreateBtn(&ui, 1u, "ExitNor", "ExitClick", "ExitOver", 0, 0);
  v41->m_pkToolTipWin = g_pkToolTipWin;
  v42 = (char *)TextData2::Get(0xFA4A423F);
  PgWin::SetToolTipWinText((PgWin *)&v41->vfptr, v42);
  v43 = UIUtil::CreateBtn(&ui, 9u, "RankingNor", "RankingClick", "RankingOver", 0, 0);
  v43->m_pkToolTipWin = g_pkToolTipWin;
  v44 = (char *)TextData2::Get(0xD9CBC7D8);
  PgWin::SetToolTipWinText((PgWin *)&v43->vfptr, v44);
  v45 = UIUtil::CreateBtn(&ui, 8u, "HelpNor", "HelpClick", "HelpOver", 0, 0);
  v45->m_pkToolTipWin = g_pkToolTipWin;
  v46 = (char *)TextData2::Get(0x34361593u);
  PgWin::SetToolTipWinText((PgWin *)&v45->vfptr, v46);
  UIUtil::CreateBtn(&ui, 1u, "CloseNor", "CloseClick", "CloseOver", 0, 0);
  v47 = UIUtil::CreateBtn(&ui, 3u, "BetOneNor", "BetOneClick", "BetOneOver", "BetOneDisable", 0);
  v2->m_pkButs[0] = v47;
  v47->m_pkToolTipWin = g_pkToolTipWin;
  v48 = (char *)TextData2::Get(0x1883316Fu);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkButs[0]->vfptr, v48);
  v2->m_pkButs[0]->m_bEnableClickSound = 0;
  v49 = UIUtil::CreateBtn(&ui, 5u, "BetEightNor", "BetEightClick", "BetEightOver", "BetEightDisable", 0);
  v2->m_pkButs[1] = v49;
  v49->m_pkToolTipWin = g_pkToolTipWin;
  v50 = (char *)TextData2::Get(0x25BB707Au);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkButs[1]->vfptr, v50);
  v2->m_pkButs[1]->m_bEnableClickSound = 0;
  v51 = UIUtil::CreateBtn(&ui, 4u, "CancelOneBetNor", "CancelOneBetClick", "CancelOneBetOver", "CancelOneBetDisable", 0);
  v2->m_pkButs[2] = v51;
  v51->m_pkToolTipWin = g_pkToolTipWin;
  v52 = (char *)TextData2::Get(0xB4D603B3);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkButs[2]->vfptr, v52);
  v2->m_pkButs[2]->m_bEnableClickSound = 0;
  v53 = UIUtil::CreateBtn(&ui, 2u, "SpinNor", "SpinClick", "SpinOver", "SpinDisable", 0);
  v2->m_pkButs[4] = v53;
  v53->m_pkToolTipWin = g_pkToolTipWin;
  v54 = (char *)TextData2::Get(0xFC13301A);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkButs[4]->vfptr, v54);
  v2->m_pkButs[4]->m_bEnableClickSound = 0;
  v55 = UIUtil::CreateBtn(&ui, 7u, "StopNor", "StopClick", "StopOver", "StopDisable", 0);
  v2->m_pkButs[5] = v55;
  v55->m_pkToolTipWin = g_pkToolTipWin;
  v56 = (char *)TextData2::Get(0xFC15361E);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkButs[5]->vfptr, v56);
  v2->m_pkButs[5]->m_bEnableClickSound = 0;
  v57 = UIUtil::CreateBtn(&ui, 6u, "ResetNor", "ResetClick", "ResetOver", "ResetDisable", 0);
  v2->m_pkButs[3] = v57;
  v57->m_pkToolTipWin = g_pkToolTipWin;
  v58 = (char *)TextData2::Get(0xF0592831);
  PgWin::SetToolTipWinText((PgWin *)&v2->m_pkButs[3]->vfptr, v58);
  v2->m_pkButs[3]->m_bEnableClickSound = 0;
  v59 = 0;
  v60 = v2->m_pkJackPotText;
  do
  {
    memset(acNodeName, 0, 0x80u);
    pkSprData = (PgSprData *)((char *)v59 + 1);
    sprintf(acNodeName, "Coin%.2d", (char *)&v59->vfptr + 1);
    *(_QWORD *)&v61.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
    *(_QWORD *)&v61.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
    v62 = UIUtil::CreateTextNoSpr(&ui, acNodeName, byte_9CD3B2, v61, 5u);
    *v60 = v62;
    v63 = v62->vfptr;
    v64 = Font::Get(MAIN_MENU);
    v63[113].__vecDelDtor((NiRefObject *)*v60, (unsigned int)v64);
    v59 = pkSprData;
    ++v60;
  }
  while ( (signed int)pkSprData < 3 );
  v65 = 0;
  do
  {
    memset(acNodeName, 0, 0x80u);
    sprintf(acNodeName, "LineDarkLight%.2d", ++v65);
    v66 = UIUtil::CreateSpr(&ui, acNodeName, 0);
    if ( v66 )
      v66->vfptr[64].__vecDelDtor((NiRefObject *)v66, 1u);
  }
  while ( v65 < 8 );
  v67 = 0;
  v68 = (int)v2->m_pkWinLines;
  do
  {
    memset(acNodeName, 0, 0x80u);
    sprintf(acNodeName, "LineHighLight%.2d", ++v67);
    v69 = UIUtil::CreateSpr(&ui, acNodeName, 0);
    *(_DWORD *)v68 = v69;
    if ( v69 )
    {
      v69->vfptr[64].__vecDelDtor((NiRefObject *)v69, 1u);
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v68 + 276))(1.0);
    }
    v68 += 4;
  }
  while ( v67 < 8 );
  v70 = UIUtil::CreateSpr(&ui, "BaseSlot", 0);
  if ( v70 )
    v70->vfptr[60].__vecDelDtor((NiRefObject *)v70, 0);
  v71 = 0;
  v72 = v2->ms_Slot;
  do
  {
    memset(acNodeName, 0, 0x80u);
    sprintf(acNodeName, "Slot%.2d", ++v71);
    SlotEntry::setup(
      v72,
      (NiAVObject *)&spNode.m_pObject->vfptr,
      acNodeName,
      (PgWin *)&v2->vfptr,
      SlotMachineWin::ms_fk1,
      SlotMachineWin::ms_fk2);
    ++v72;
  }
  while ( v71 < 9 );
  v73 = 0;
  v74 = (int)v2->m_pkWinSlots;
  do
  {
    memset(acNodeName, 0, 0x80u);
    sprintf(acNodeName, "SlotHighLight%.2d", ++v73);
    v75 = UIUtil::CreateSpr(&ui, acNodeName, 0);
    *(_DWORD *)v74 = v75;
    if ( v75 )
    {
      v75->vfptr[64].__vecDelDtor((NiRefObject *)v75, 1u);
      ((void (__stdcall *)(_DWORD))*(void (__stdcall **)(float))(**(_DWORD **)v74 + 276))(v2->m_fAlpha);
    }
    v74 += 4;
  }
  while ( v73 < 9 );
  v76 = 0;
  v77 = v2->m_pkBetIndicator;
  do
  {
    memset(acNodeName, 0, 0x80u);
    sprintf(acNodeName, "Bet%.2d", ++v76);
    v78 = UIUtil::CreateSpr(&ui, acNodeName, 0);
    *v77 = v78;
    if ( v78 )
      v78->vfptr[64].__vecDelDtor((NiRefObject *)v78, 0);
    ++v77;
  }
  while ( v76 < 32 );
  v2->m_iBetNum = -1;
  spNumNode.m_pObject = 0;
  v79 = pTexturePalette;
  LOBYTE(v176) = 2;
  if ( !Folder::m_bInit )
    Folder::Init();
  v80 = 0;
  do
  {
    v81 = *(&Folder::m_acMenu + v80);
    *(&Folder::m_acMerge + v80++) = v81;
  }
  while ( v81 );
  v82 = &Folder::m_acMerge - 1;
  do
    v83 = (v82++)[1];
  while ( v83 );
  *(_DWORD *)v82 = 1701667143;
  *((_DWORD *)v82 + 1) = 1667843164;
  *((_DWORD *)v82 + 2) = 1835091813;
  *((_DWORD *)v82 + 3) = 1767984485;
  *((_DWORD *)v82 + 4) = 1768828526;
  *((_WORD *)v82 + 10) = 102;
  PgUtil::LoadNodeNifFile(&Folder::m_acMerge, &spNumNode, v79);
  if ( !spNumNode.m_pObject )
  {
    LOBYTE(v176) = 0;
    UIUtil::~UIUtil(&ui);
    v6 = spNode.m_pObject;
    v176 = -1;
    if ( spNode.m_pObject )
    {
      v7 = InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount);
LABEL_7:
      if ( !v7 )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    return 0;
  }
  v84 = PgSprData::Create((NiAVObject *)&spNumNode.m_pObject->vfptr, "BetMoneyNum00", &uiLeft, &uiTop, 0);
  pkSprData = v84;
  v85 = 0;
  do
  {
    memset(acNodeName, 0, 0x80u);
    sprintf(acNodeName, "BetMoneyNum%.2d", ++v85);
    PgSprData::Add(v84, (NiAVObject *)&spNumNode.m_pObject->vfptr, acNodeName);
  }
  while ( v85 < 9 );
  acShareBetType[0] = "BetCoin08";
  acShareBetType[1] = "BetCoin01";
  acShareBetType[2] = "BetCoin02";
  acShareBetType[3] = "BetCoin03";
  acShareBetType[4] = "BetCoin04";
  acShareBetType[5] = "BetCoin05";
  acShareBetType[6] = "BetCoin06";
  acShareBetType[7] = "BetCoin07";
  v86 = 0;
  v87 = (int)v2->m_pkBetCoin;
  do
  {
    v88 = UIUtil::CreateSpr(&ui, acShareBetType[v86], 0);
    *(_DWORD *)v87 = v88;
    v88->vfptr[64].__vecDelDtor((NiRefObject *)v88, 1u);
    v89 = PgWinSpr::CreateWin(uiLeft, uiTop, pkSprData, (PgWin *)&v2->vfptr, 0, 0);
    *(_DWORD *)(v87 + 32) = v89;
    v89->vfptr[60].__vecDelDtor((NiRefObject *)v89, 0);
    (*(void (__stdcall **)(_DWORD, _DWORD))(**(_DWORD **)v87 + 116))(*(_DWORD *)(v87 + 32), 0);
    ++v86;
    v87 += 4;
  }
  while ( v86 < 8 );
  acShareBetType[0] = "ShareCoin08";
  acShareBetType[1] = "ShareCoin01";
  acShareBetType[2] = "ShareCoin02";
  acShareBetType[3] = "ShareCoin03";
  acShareBetType[4] = "ShareCoin04";
  acShareBetType[5] = "ShareCoin05";
  acShareBetType[6] = "ShareCoin06";
  acShareBetType[7] = "ShareCoin07";
  v90 = 0;
  v91 = (int)v2->m_pkShareCoin;
  do
  {
    v92 = UIUtil::CreateSpr(&ui, acShareBetType[v90], 0);
    *(_DWORD *)v91 = v92;
    v92->vfptr[64].__vecDelDtor((NiRefObject *)v92, 1u);
    v93 = PgWinSpr::CreateWin(uiLeft, uiTop, pkSprData, (PgWin *)&v2->vfptr, 0, 0);
    *(_DWORD *)(v91 + 32) = v93;
    v93->vfptr[60].__vecDelDtor((NiRefObject *)v93, 0);
    (*(void (__stdcall **)(_DWORD, _DWORD))(**(_DWORD **)v91 + 116))(*(_DWORD *)(v91 + 32), 0);
    ++v90;
    v91 += 4;
  }
  while ( v90 < 8 );
  v94 = PgSprData::Create((NiAVObject *)&spNumNode.m_pObject->vfptr, "Num00", &uiLeft, &uiTop, 0);
  pkSprData = v94;
  v95 = 0;
  do
  {
    memset(acNodeName, 0, 0x80u);
    sprintf(acNodeName, "Num%.2d", ++v95);
    PgSprData::Add(v94, (NiAVObject *)&spNumNode.m_pObject->vfptr, acNodeName);
  }
  while ( v95 < 9 );
  pcTag = "MyMoney01";
  v164 = "MyMoney02";
  v165 = "MyMoney03";
  v166 = "MyMoney04";
  acShareBetType[0] = "MyMoney05";
  acShareBetType[1] = "MyMoney06";
  acShareBetType[2] = "MyMoney07";
  acShareBetType[3] = "MyMoney08";
  acShareBetType[4] = "MyMoney09";
  acShareBetType[5] = "MyMoney10";
  acShareBetType[6] = "MyMoney11";
  acShareBetType[7] = "MyMoney12";
  v96 = 0;
  v97 = v2->m_pkMyCoinNum;
  do
  {
    v98 = UIUtil::CreateSpr(&ui, (&pcTag)[4 * v96], 0);
    *(v97 - 12) = v98;
    v98->vfptr[64].__vecDelDtor((NiRefObject *)v98, 1u);
    v99 = PgWinSpr::CreateWin(uiLeft, uiTop, pkSprData, (PgWin *)&v2->vfptr, 0, 0);
    *v97 = v99;
    v99->vfptr[60].__vecDelDtor((NiRefObject *)v99, 0);
    ((void (__stdcall *)(PgWinSpr *, _DWORD))(*(v97 - 12))->vfptr[29].__vecDelDtor)(*v97, 0);
    ((void (__stdcall *)(_DWORD))(*v97)->vfptr[123].__vecDelDtor)(0);
    ++v96;
    ++v97;
  }
  while ( v96 < 0xC );
  if ( !Folder::m_bInit )
    Folder::Init();
  v100 = 0;
  do
  {
    v101 = *(&Folder::m_acEffect + v100);
    *(&Folder::m_acMerge + v100++) = v101;
  }
  while ( v101 );
  v102 = &Folder::m_acMerge - 1;
  do
    v103 = (v102++)[1];
  while ( v103 );
  *(_DWORD *)v102 = 1398751815;
  *((_DWORD *)v102 + 1) = 1333030764;
  *((_DWORD *)v102 + 2) = 1768711534;
  *((_DWORD *)v102 + 3) = 1848534382;
  *((_WORD *)v102 + 8) = 26217;
  v102[18] = 0;
  v104 = Ns_LoadNifFile(&Folder::m_acMerge, 0);
  v105 = operator new(0x60u);
  v170 = v105;
  LOBYTE(v176) = 3;
  if ( v105 )
  {
    pkSprData = (PgSprData *)NiObject::Clone((NiObject *)&v104->vfptr);
    *(_DWORD *)v105 = 0;
    LOBYTE(v176) = 4;
    CNSTimer_MarkCheck::CNSTimer_MarkCheck((CNSTimer_MarkCheck *)((char *)v105 + 4));
    LOBYTE(v176) = 5;
    NsEffect::NsEffect((NsEffect *)((char *)v105 + 28));
    v106 = *(PgSprData **)v105;
    LOBYTE(v176) = 6;
    if ( v106 != pkSprData )
    {
      if ( v106 && !InterlockedDecrement((volatile LONG *)&v106->m_uiRefCount) && v106 )
        v106->vfptr->__vecDelDtor((NiRefObject *)v106, 1u);
      v107 = pkSprData;
      *(_DWORD *)v105 = pkSprData;
      if ( v107 )
        InterlockedIncrement((volatile LONG *)&v107->m_uiRefCount);
    }
    *((_WORD *)v105 + 32) = 0;
  }
  else
  {
    v105 = 0;
  }
  v2->m_pkWinEffect[0] = (MHChipEffect *)v105;
  v108 = *(_DWORD *)v105;
  LOBYTE(v176) = 2;
  NiMatrix3::MakeRotation((NiMatrix3 *)(v108 + 52), NI_HALF_PI, 0.0, 0.5, 0.0);
  if ( !Folder::m_bInit )
    Folder::Init();
  v109 = 0;
  do
  {
    v110 = *(&Folder::m_acEffect + v109);
    *(&Folder::m_acMerge + v109++) = v110;
  }
  while ( v110 );
  v111 = &Folder::m_acMerge - 1;
  do
    v112 = (v111++)[1];
  while ( v112 );
  *(_DWORD *)v111 = 1398751815;
  *((_DWORD *)v111 + 1) = 1098149740;
  *((_DWORD *)v111 + 2) = 1766616172;
  *((_DWORD *)v111 + 3) = 1848534382;
  *((_WORD *)v111 + 8) = 26217;
  v111[18] = 0;
  v113 = Ns_LoadNifFile(&Folder::m_acMerge, 0);
  v114 = operator new(0x60u);
  v170 = v114;
  LOBYTE(v176) = 7;
  if ( v114 )
  {
    pkSprData = (PgSprData *)NiObject::Clone((NiObject *)&v113->vfptr);
    *(_DWORD *)v114 = 0;
    LOBYTE(v176) = 8;
    CNSTimer_MarkCheck::CNSTimer_MarkCheck((CNSTimer_MarkCheck *)((char *)v114 + 4));
    LOBYTE(v176) = 9;
    NsEffect::NsEffect((NsEffect *)((char *)v114 + 28));
    v115 = *(PgSprData **)v114;
    LOBYTE(v176) = 10;
    if ( v115 != pkSprData )
    {
      if ( v115 && !InterlockedDecrement((volatile LONG *)&v115->m_uiRefCount) && v115 )
        v115->vfptr->__vecDelDtor((NiRefObject *)v115, 1u);
      v116 = pkSprData;
      *(_DWORD *)v114 = pkSprData;
      if ( v116 )
        InterlockedIncrement((volatile LONG *)&v116->m_uiRefCount);
    }
    *((_WORD *)v114 + 32) = 0;
  }
  else
  {
    v114 = 0;
  }
  v2->m_pkWinEffect[1] = (MHChipEffect *)v114;
  LOBYTE(v176) = 2;
  if ( !Folder::m_bInit )
    Folder::Init();
  v117 = 0;
  do
  {
    v118 = *(&Folder::m_acEffect + v117);
    *(&Folder::m_acMerge + v117++) = v118;
  }
  while ( v118 );
  v119 = &Folder::m_acMerge - 1;
  do
    v120 = (v119++)[1];
  while ( v120 );
  *(_DWORD *)v119 = 1398751815;
  *((_DWORD *)v119 + 1) = 1131704172;
  *((_DWORD *)v119 + 2) = 1702129253;
  *((_DWORD *)v119 + 3) = 1768828530;
  *((_WORD *)v119 + 8) = 102;
  v121 = Ns_LoadNifFile(&Folder::m_acMerge, 0);
  v122 = operator new(0x60u);
  v170 = v122;
  LOBYTE(v176) = 11;
  if ( v122 )
  {
    pkSprData = (PgSprData *)NiObject::Clone((NiObject *)&v121->vfptr);
    *(_DWORD *)v122 = 0;
    LOBYTE(v176) = 12;
    CNSTimer_MarkCheck::CNSTimer_MarkCheck((CNSTimer_MarkCheck *)((char *)v122 + 4));
    LOBYTE(v176) = 13;
    NsEffect::NsEffect((NsEffect *)((char *)v122 + 28));
    v123 = *(PgSprData **)v122;
    LOBYTE(v176) = 14;
    if ( v123 != pkSprData )
    {
      if ( v123 && !InterlockedDecrement((volatile LONG *)&v123->m_uiRefCount) && v123 )
        v123->vfptr->__vecDelDtor((NiRefObject *)v123, 1u);
      v124 = pkSprData;
      *(_DWORD *)v122 = pkSprData;
      if ( v124 )
        InterlockedIncrement((volatile LONG *)&v124->m_uiRefCount);
    }
    *((_WORD *)v122 + 32) = 0;
  }
  else
  {
    v122 = 0;
  }
  v2->m_pkWinEffect[2] = (MHChipEffect *)v122;
  LOBYTE(v176) = 2;
  if ( !Folder::m_bInit )
    Folder::Init();
  v125 = 0;
  do
  {
    v126 = *(&Folder::m_acEffect + v125);
    *(&Folder::m_acMerge + v125++) = v126;
  }
  while ( v126 );
  v127 = &Folder::m_acMerge - 1;
  do
    v128 = (v127++)[1];
  while ( v128 );
  *(_DWORD *)v127 = 1398751815;
  *((_DWORD *)v127 + 1) = 1249144684;
  *((_DWORD *)v127 + 2) = 1349215073;
  *((_DWORD *)v127 + 3) = 1848538223;
  *((_WORD *)v127 + 8) = 26217;
  v127[18] = 0;
  v129 = Ns_LoadNifFile(&Folder::m_acMerge, 0);
  v130 = operator new(0x60u);
  v170 = v130;
  LOBYTE(v176) = 15;
  if ( v130 )
  {
    pkSprData = (PgSprData *)NiObject::Clone((NiObject *)&v129->vfptr);
    *(_DWORD *)v130 = 0;
    LOBYTE(v176) = 16;
    CNSTimer_MarkCheck::CNSTimer_MarkCheck((CNSTimer_MarkCheck *)((char *)v130 + 4));
    LOBYTE(v176) = 17;
    NsEffect::NsEffect((NsEffect *)((char *)v130 + 28));
    v131 = *(PgSprData **)v130;
    LOBYTE(v176) = 18;
    if ( v131 != pkSprData )
    {
      if ( v131 && !InterlockedDecrement((volatile LONG *)&v131->m_uiRefCount) && v131 )
        v131->vfptr->__vecDelDtor((NiRefObject *)v131, 1u);
      v132 = pkSprData;
      *(_DWORD *)v130 = pkSprData;
      if ( v132 )
        InterlockedIncrement((volatile LONG *)&v132->m_uiRefCount);
    }
    *((_WORD *)v130 + 32) = 0;
  }
  else
  {
    v130 = 0;
  }
  v2->m_pkWinEffect[3] = (MHChipEffect *)v130;
  LOBYTE(v176) = 2;
  if ( !Folder::m_bInit )
    Folder::Init();
  v133 = 0;
  do
  {
    v134 = *(&Folder::m_acEffect + v133);
    *(&Folder::m_acMerge + v133++) = v134;
  }
  while ( v134 );
  v135 = &Folder::m_acMerge - 1;
  do
    v136 = (v135++)[1];
  while ( v136 );
  *(_DWORD *)v135 = 1398751815;
  *((_DWORD *)v135 + 1) = 1282699116;
  *((_DWORD *)v135 + 2) = 1919252069;
  *((_DWORD *)v135 + 3) = 1701602377;
  *((_DWORD *)v135 + 4) = 1718185518;
  v135[20] = 0;
  v137 = Ns_LoadNifFile(&Folder::m_acMerge, 0);
  v138 = operator new(0x60u);
  v170 = v138;
  LOBYTE(v176) = 19;
  if ( v138 )
  {
    pkSprData = (PgSprData *)NiObject::Clone((NiObject *)&v137->vfptr);
    *(_DWORD *)v138 = 0;
    LOBYTE(v176) = 20;
    CNSTimer_MarkCheck::CNSTimer_MarkCheck((CNSTimer_MarkCheck *)((char *)v138 + 4));
    LOBYTE(v176) = 21;
    NsEffect::NsEffect((NsEffect *)((char *)v138 + 28));
    v139 = *(PgSprData **)v138;
    LOBYTE(v176) = 22;
    if ( v139 != pkSprData )
    {
      if ( v139 && !InterlockedDecrement((volatile LONG *)&v139->m_uiRefCount) && v139 )
        v139->vfptr->__vecDelDtor((NiRefObject *)v139, 1u);
      v140 = pkSprData;
      *(_DWORD *)v138 = pkSprData;
      if ( v140 )
        InterlockedIncrement((volatile LONG *)&v140->m_uiRefCount);
    }
    *((_WORD *)v138 + 32) = 0;
  }
  else
  {
    v138 = 0;
  }
  v2->m_pkBarEffect[0] = (MHChipEffect *)v138;
  LOBYTE(v176) = 2;
  if ( !Folder::m_bInit )
    Folder::Init();
  v141 = 0;
  do
  {
    v142 = *(&Folder::m_acEffect + v141);
    *(&Folder::m_acMerge + v141++) = v142;
  }
  while ( v142 );
  v143 = &Folder::m_acMerge - 1;
  do
    v144 = (v143++)[1];
  while ( v144 );
  qmemcpy(v143, "GB_SlotLeverAction.nif", 0x17u);
  v145 = Ns_LoadNifFile(&Folder::m_acMerge, 0);
  v146 = operator new(0x60u);
  v170 = v146;
  LOBYTE(v176) = 23;
  if ( v146 )
  {
    pkSprData = (PgSprData *)NiObject::Clone((NiObject *)&v145->vfptr);
    *(_DWORD *)v146 = 0;
    LOBYTE(v176) = 24;
    CNSTimer_MarkCheck::CNSTimer_MarkCheck((CNSTimer_MarkCheck *)((char *)v146 + 4));
    LOBYTE(v176) = 25;
    NsEffect::NsEffect((NsEffect *)((char *)v146 + 28));
    v147 = *(PgSprData **)v146;
    v148 = pkSprData;
    LOBYTE(v176) = 26;
    if ( v147 != pkSprData )
    {
      if ( v147 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v147->m_uiRefCount) && v147 )
          v147->vfptr->__vecDelDtor((NiRefObject *)v147, 1u);
        v148 = pkSprData;
      }
      *(_DWORD *)v146 = v148;
      if ( v148 )
        InterlockedIncrement((volatile LONG *)&v148->m_uiRefCount);
    }
    *((_WORD *)v146 + 32) = 0;
  }
  else
  {
    v146 = 0;
  }
  v2->m_pkBarEffect[1] = (MHChipEffect *)v146;
  *(_QWORD *)&v149.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
  *(_QWORD *)&v149.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
  LOBYTE(v176) = 2;
  v150 = UIUtil::CreateTextNoSpr(&ui, "Panel01", &byte_9CD429, v149, 5u);
  v151 = v150->vfptr;
  v152 = Font::Get(MAIN_MENU);
  v151[113].__vecDelDtor((NiRefObject *)v150, (unsigned int)v152);
  v150->vfptr[60].__vecDelDtor((NiRefObject *)v150, 0);
  v153 = (PgWinText *)v2->ms_EffectPos.m_pObject;
  if ( v153 != v150 )
  {
    if ( v153 && !InterlockedDecrement((volatile LONG *)&v153->m_uiRefCount) && v153 )
      v153->vfptr->__vecDelDtor((NiRefObject *)v153, 1u);
    v2->ms_EffectPos.m_pObject = (NiNode *)v150;
    InterlockedIncrement((volatile LONG *)&v150->m_uiRefCount);
  }
  v154 = v2->ms_EffectPos.m_pObject;
  *(float *)&v155 = 225.0;
  *((float *)&v155 + 1) = 0.0;
  NiQuaternion::NiQuaternion((NiQuaternion *)&acShareBetType[4], 0.0, 0.0, 0.0, 0.0);
  *(float *)STA8_12_181 = 856.0;
  *(_QWORD *)&STA8_12_181[4] = v155;
  *(_QWORD *)&v158.m_fW = *(_QWORD *)v157;
  *(_QWORD *)&v158.m_fY = *(_QWORD *)(v157 + 8);
  MHChipEffect::Start(v2->m_pkBarEffect[0], v154, v158, *(NiPoint3 *)STA8_12_181);
  v159 = (int)&v2->m_nTempUserCoin;
  v160 = (int)&v2->m_nUserCoin;
  *(_DWORD *)v160 = 0;
  *(_DWORD *)(v160 + 4) = 0;
  *(_DWORD *)v159 = 0;
  *(_DWORD *)(v159 + 4) = 0;
  SlotMachineWin::UpdateCoin(v2, &v2->m_nUserCoin, &v2->m_nTempUserCoin, 0, 1);
  ((void (__thiscall *)(SlotMachineWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
    v2,
    PgWin::ms_uiScreenWidth,
    PgWin::ms_uiScreenHeight,
    0.5,
    0.5);
  LOBYTE(v176) = 1;
  if ( spNumNode.m_pObject )
  {
    v161 = spNumNode.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&spNumNode.m_pObject->m_uiRefCount) )
    {
      if ( v161 )
        v161->vfptr->__vecDelDtor((NiRefObject *)v161, 1u);
    }
  }
  LOBYTE(v176) = 0;
  UIUtil::~UIUtil(&ui);
  v162 = spNode.m_pObject;
  v176 = -1;
  if ( spNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) && v162 )
    v162->vfptr->__vecDelDtor((NiRefObject *)v162, 1u);
  return 1;
}
// A78B1C: using guessed type float SlotMachineWin::ms_fk1;
// A78B20: using guessed type float SlotMachineWin::ms_fk2;
// A8975C: using guessed type bool Folder::m_bInit;
// B622D0: using guessed type const float NI_HALF_PI;

//----- (007256E0) --------------------------------------------------------
void __thiscall SlotMachineWin::Betting(SlotMachineWin *this, SlotMachineWin::BETTING_TYPE bet)
{
  SlotMachineWin *v2; // esi@1
  SlotMachineWin::MachineState v3; // eax@1
  NiPointer<MHDiceGameTask> *v4; // eax@3
  void (__thiscall ***v5)(_DWORD, _DWORD); // edi@3
  MHDiceGameTask *v6; // ebx@3
  int v7; // edi@9
  signed int v8; // ebx@9
  int v9; // ebx@11
  unsigned int v10; // edi@11
  int v11; // ecx@11
  int v12; // edi@13
  __int64 v13; // rcx@13
  __int64 v14; // ST00_8@13
  unsigned __int64 v15; // rax@15
  unsigned __int64 v16; // rcx@21
  int v17; // ebx@21
  int v18; // edx@28
  unsigned __int8 v19; // cf@28
  int v20; // eax@28
  unsigned int v21; // ecx@29
  unsigned int v22; // edi@29
  signed __int64 v23; // rax@29
  int v24; // ebx@30
  int v25; // ebx@31
  int v26; // ecx@32
  __int64 v27; // rax@33
  int v28; // eax@34
  char *v29; // eax@35
  int v30; // edi@36
  signed __int64 v31; // rcx@38
  signed __int64 v32; // rax@39
  __int64 v33; // rax@40
  char *v34; // eax@43
  int v35; // eax@44
  int v36; // ebx@44
  void *(__thiscall *v37)(NiRefObject *, unsigned int); // eax@49
  bool v38; // [sp-Ch] [bp-28h]@30
  SoundGroupInterface::SndIndex v39; // [sp-Ch] [bp-28h]@31
  unsigned int v40; // [sp+4h] [bp-18h]@13
  int v41; // [sp+4h] [bp-18h]@40
  __int64 addBet; // [sp+Ch] [bp-10h]@3
  __int64 v43; // [sp+14h] [bp-8h]@3
  SlotMachineWin::BETTING_TYPE beta; // [sp+24h] [bp+8h]@24
  SlotMachineWin::BETTING_TYPE betb; // [sp+24h] [bp+8h]@45

  v2 = this;
  v3 = this->me_State;
  if ( v3 == EM_IDLE || v3 == 1 )
  {
    v4 = MHDiceGameTask::GetDiceGameTask((NiPointer<MHDiceGameTask> *)&addBet + 1);
    v5 = (void (__thiscall ***)(_DWORD, _DWORD))HIDWORD(addBet);
    v6 = v4->m_pObject;
    HIDWORD(v43) = (NiPointer<MHDiceGameTask>)v4->m_pObject;
    if ( HIDWORD(addBet) && !InterlockedDecrement((volatile LONG *)(HIDWORD(addBet) + 4)) && v5 )
      (**v5)(v5, 1);
    if ( v6 )
    {
      switch ( bet )
      {
        case 4:
          v7 = (int)v2->m_pkBetIndicator;
          v8 = 32;
          do
          {
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v7 + 256))(0);
            v7 += 4;
            --v8;
          }
          while ( v8 );
          v9 = v2->m_iBetNum;
          v10 = (unsigned __int64)v2->m_iBetNum >> 32;
          v11 = v2->m_iBetNum;
          if ( (signed __int64)v2->m_iBetNum >= 32 )
          {
            v10 = (unsigned __int64)(31 - v9) >> 32;
            LODWORD(addBet) = 31 - v9;
            v11 = 31 - v9;
          }
          v12 = (__PAIR__(v10, v11) + 1) >> 32;
          v40 = v2->m_nTempUserCoin;
          HIDWORD(v13) = HIDWORD(v2->m_nTempUserCoin);
          v14 = v2->m_i1BetPerCoin;
          LODWORD(addBet) = v11 + 1;
          v43 = v2->m_i1BetPerCoin;
          if ( (signed __int64)__PAIR__(HIDWORD(v13), v40) < v14 * __PAIR__(v12, v11 + 1) )
          {
            v12 = (unsigned __int64)((signed __int64)__PAIR__(HIDWORD(v13), v40) / v43) >> 32;
            LODWORD(addBet) = (signed __int64)__PAIR__(HIDWORD(v13), v40) / v43;
          }
          v15 = v43 * __PAIR__(v12, (unsigned int)addBet);
          if ( SHIDWORD(v13) < (signed int)(v43 * __PAIR__((unsigned int)v12, (unsigned int)addBet) >> 32)
            || (LODWORD(v13) = v40, SHIDWORD(v13) <= SHIDWORD(v15)) && v40 < (unsigned int)v15 )
          {
            v2->m_iBetNum = 0;
            goto LABEL_49;
          }
          if ( v12 <= 0 && (v12 < 0 || (unsigned int)addBet <= 0x20) )
          {
            v16 = v13 - v15;
            HIDWORD(v2->m_nTempUserCoin) = HIDWORD(v16);
            v17 = 0;
            v2->m_nBettingCoin = v15;
            LODWORD(v2->m_nTempUserCoin) = v16;
            if ( v12 >= 0 && (v12 > 0 || (unsigned int)addBet > 0) )
            {
              beta = (SlotMachineWin::BETTING_TYPE)v2->m_pkBetIndicator;
              do
              {
                (*(void (__stdcall **)(signed int))(**(_DWORD **)beta + 256))(1);
                beta += 4;
                ++v17;
              }
              while ( v17 < __PAIR__(v12, (unsigned int)addBet) );
            }
            v2->m_iBetNum = addBet - 1;
            goto LABEL_49;
          }
          return;
        case 3:
          v18 = v2->m_nBettingCoin;
          v19 = __CFADD__(v18, v2->m_nTempUserCoin);
          LODWORD(v2->m_nTempUserCoin) += v18;
          v20 = HIDWORD(v2->m_nBettingCoin);
          LODWORD(v2->m_nBettingCoin) = 0;
          HIDWORD(v2->m_nTempUserCoin) += v20 + v19;
          HIDWORD(v2->m_nBettingCoin) = 0;
          SlotMachineWin::ResetCoin(v2);
          SoundMgr::PlayInterfaceSound(&g_kSoundMgr, GB_SM_Reset);
          goto LABEL_49;
        case 0:
          v21 = HIDWORD(v2->m_nTempUserCoin);
          v22 = v2->m_nTempUserCoin;
          v23 = v2->m_i1BetPerCoin;
          if ( (signed __int64)__PAIR__(v21, v22) < v23 )
            goto LABEL_49;
          v24 = v2->m_iBetNum;
          v38 = 1;
          if ( v24 == 31 )
            goto LABEL_43;
          v25 = v24 + 1;
          v19 = __CFADD__((_DWORD)v23, v2->m_nBettingCoin);
          LODWORD(v2->m_nBettingCoin) += v23;
          v2->m_iBetNum = v25;
          HIDWORD(v2->m_nBettingCoin) += HIDWORD(v23) + v19;
          v2->m_nTempUserCoin = __PAIR__(v21, v22) - v23;
          v2->m_pkBetIndicator[v25]->vfptr[64].__vecDelDtor((NiRefObject *)v2->m_pkBetIndicator[v25], 1u);
          v39 = 50;
          goto LABEL_48;
        case 1:
          v26 = v2->m_iBetNum;
          if ( v26 == -1 )
            return;
          v27 = v2->m_i1BetPerCoin;
          v19 = LODWORD(v2->m_nBettingCoin) < (unsigned int)v27;
          LODWORD(v2->m_nBettingCoin) -= v27;
          HIDWORD(v2->m_nBettingCoin) -= v19 + HIDWORD(v27);
          v2->m_nTempUserCoin += v27;
          ((void (__stdcall *)(_DWORD))v2->m_pkBetIndicator[v26]->vfptr[64].__vecDelDtor)(0);
          --v2->m_iBetNum;
          SoundMgr::PlayInterfaceSound(&g_kSoundMgr, GB_SM_Cancle);
          goto LABEL_49;
        case 2:
          v28 = v2->m_iBetNum;
          if ( v28 == 31 )
          {
            v29 = (char *)TextData2::Get(0x6C96ADE6u);
            MHDiceGameTask::AddMsg(v29, 1, 1);
            return;
          }
          v30 = 8;
          if ( v28 + 8 >= 32 )
            v30 = 31 - v28;
          v31 = v2->m_nTempUserCoin;
          if ( v31 < v30 * v2->m_i1BetPerCoin )
          {
            v32 = v31 / v2->m_i1BetPerCoin;
            LODWORD(v31) = v2->m_nTempUserCoin;
            v30 = v32;
          }
          v41 = v30 * v2->m_i1BetPerCoin;
          v33 = v41;
          if ( v31 < v41 )
            goto LABEL_49;
          if ( v2->m_iBetNum == 32 )
          {
            v38 = 1;
LABEL_43:
            v34 = (char *)TextData2::Get(0x6C96ADE6u);
            MHDiceGameTask::AddMsg(v34, 1, v38);
          }
          else
          {
            LODWORD(v33) = v30 * v2->m_i1BetPerCoin;
            v2->m_nBettingCoin += v33;
            v35 = v2->m_iBetNum;
            HIDWORD(v2->m_nTempUserCoin) = (unsigned __int64)(v31 - v41) >> 32;
            HIDWORD(v31) = v2->m_iBetNum + 1;
            LODWORD(v2->m_nTempUserCoin) = v31 - v41;
            if ( SHIDWORD(v31) <= v30 + v35 )
            {
              betb = (SlotMachineWin::BETTING_TYPE)&v2->m_pkBetIndicator[v36];
              do
              {
                (*(void (__stdcall **)(signed int))(**(_DWORD **)betb + 256))(1);
                betb += 4;
                ++v36;
              }
              while ( v36 <= v30 + v2->m_iBetNum );
            }
            v2->m_iBetNum += v30;
            v39 = 52;
LABEL_48:
            v2->m_bClickBetBut = 1;
            SoundMgr::PlayInterfaceSound(&g_kSoundMgr, v39);
LABEL_49:
            v37 = v2->m_pkButs[0]->vfptr[60].__vecDelDtor;
            if ( v2->m_iBetNum == -1 )
            {
              ((void (__stdcall *)(signed int))v37)(1);
              ((void (__stdcall *)(signed int))v2->m_pkButs[1]->vfptr[60].__vecDelDtor)(1);
              ((void (__stdcall *)(_DWORD))v2->m_pkButs[2]->vfptr[60].__vecDelDtor)(0);
              ((void (__stdcall *)(_DWORD))v2->m_pkButs[3]->vfptr[60].__vecDelDtor)(0);
              ((void (__stdcall *)(_DWORD))v2->m_pkButs[4]->vfptr[60].__vecDelDtor)(0);
              ((void (__stdcall *)(_DWORD))v2->m_pkButs[5]->vfptr[60].__vecDelDtor)(0);
              v2->me_State = 0;
              *(_WORD *)&v2->m_bTransition = 1;
              v2->m_bClickBetBut = 0;
            }
            else
            {
              ((void (__stdcall *)(signed int))v37)(1);
              ((void (__stdcall *)(signed int))v2->m_pkButs[1]->vfptr[60].__vecDelDtor)(1);
              ((void (__stdcall *)(signed int))v2->m_pkButs[3]->vfptr[60].__vecDelDtor)(1);
              ((void (__stdcall *)(signed int))v2->m_pkButs[4]->vfptr[60].__vecDelDtor)(1);
              ((void (__stdcall *)(signed int))v2->m_pkButs[2]->vfptr[60].__vecDelDtor)(1);
              v2->m_bTransition = 1;
              v2->me_State = 1;
            }
          }
          break;
        default:
          goto LABEL_49;
      }
    }
  }
}

//----- (00725BE0) --------------------------------------------------------
void __thiscall SlotMachineWin::InitMachine(SlotMachineWin *this)
{
  SlotMachineWin *v1; // esi@1
  char *v2; // eax@1
  char *v3; // ecx@1
  int v4; // edi@1
  int v5; // edi@3
  int v6; // edi@5
  int v7; // eax@7
  PgWinSpr *v8; // ecx@8
  NiRefObjectVtbl **v9; // edi@14
  NiRefObjectVtbl *v10; // ebx@14
  int v11; // ST0C_4@14
  char *v12; // eax@14
  char *v13; // eax@14
  SlotEntry *v14; // edi@14
  signed int v15; // ebx@14
  int v16; // esi@16
  signed int v17; // edi@16
  signed int v18; // [sp+Ch] [bp-4h]@1
  signed int v19; // [sp+Ch] [bp-4h]@3
  signed int v20; // [sp+Ch] [bp-4h]@5

  v1 = this;
  v2 = (char *)&this->m_nTempUserCoin;
  v3 = (char *)&this->m_nUserCoin;
  *(_DWORD *)v3 = 0;
  *((_DWORD *)v3 + 1) = 0;
  v1->m_iBetNum = -1;
  v1->m_bMachineTimeSetting = 0;
  v1->m_bClickBetBut = 0;
  *(_DWORD *)v2 = 0;
  *((_DWORD *)v2 + 1) = 0;
  LODWORD(v1->m_nPreBettingCoin) = 0;
  HIDWORD(v1->m_nPreBettingCoin) = 0;
  LODWORD(v1->m_nBettingCoin) = 0;
  HIDWORD(v1->m_nBettingCoin) = 0;
  LODWORD(v1->m_nPreShareCoin) = 0;
  HIDWORD(v1->m_nPreShareCoin) = 0;
  LODWORD(v1->m_nShareCoin) = 0;
  HIDWORD(v1->m_nShareCoin) = 0;
  SlotMachineWin::UpdateCoin(v1, (__int64 *)v3, (__int64 *)v2, 0, 1);
  v1->m_fSlotAlpha = 1.0;
  v1->me_State = 0;
  v4 = (int)v1->m_pkShareNum;
  v18 = 8;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)(v4 - 64) + 492))(0);
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v4 + 492))(0);
    v4 += 4;
    --v18;
  }
  while ( v18 );
  v5 = (int)v1->m_pkMyCoinNum;
  v19 = 12;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v5 + 492))(0);
    v5 += 4;
    --v19;
  }
  while ( v19 );
  v6 = (int)v1->m_pkFrameSpr;
  v20 = 3;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v6 + 256))(0);
    v6 += 4;
    --v20;
  }
  while ( v20 );
  v7 = v1->m_i1BetPerCoin;
  if ( v7 == 10 )
  {
    v8 = v1->m_pkFrameSpr[0];
LABEL_13:
    ((void (__stdcall *)(_DWORD))v8->vfptr[64].__vecDelDtor)(1);
    goto LABEL_14;
  }
  if ( v7 == 100 )
  {
    v8 = v1->m_pkFrameSpr[1];
    goto LABEL_13;
  }
  if ( v7 == 500 )
  {
    v8 = v1->m_pkFrameSpr[2];
    goto LABEL_13;
  }
LABEL_14:
  v9 = &v1->m_pkTitleText[1]->vfptr;
  v10 = *v9;
  v11 = v1->m_i1BetPerCoin;
  v12 = (char *)TextData2::Get(0x8FBD9882);
  v13 = fs(v12, v11);
  v10[118].__vecDelDtor((NiRefObject *)v9, (unsigned int)v13);
  ((void (__stdcall *)(_DWORD))v1->m_pkButs[0]->vfptr[60].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkButs[1]->vfptr[60].__vecDelDtor)(1);
  ((void (__stdcall *)(_DWORD))v1->m_pkButs[2]->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkButs[3]->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkButs[4]->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkButs[5]->vfptr[60].__vecDelDtor)(0);
  ((void (__stdcall *)(_DWORD))v1->m_pkButs[2]->vfptr[60].__vecDelDtor)(0);
  v1->_easeInOut[0]._value = 0.99000001;
  v1->_easeInOut[0]._target = 1.0;
  v1->_easeInOut[0]._speed = 0.0;
  v1->_easeInOut[0]._acceleration = 3.9999962;
  v1->_easeInOut[0]._totalTime = 0.1;
  v1->_easeInOut[0]._remainingTime = 0.1;
  v1->_easeInOut[1]._value = 0.99000001;
  v1->_easeInOut[1]._target = 1.0;
  v1->_easeInOut[1]._speed = 0.0;
  v1->_easeInOut[1]._acceleration = 3.9999962;
  v1->_easeInOut[1]._totalTime = 0.1;
  v1->_easeInOut[1]._remainingTime = 0.1;
  v1->_easeInOut[2]._value = 0.99000001;
  v1->_easeInOut[2]._target = 1.0;
  v1->_easeInOut[2]._speed = 0.0;
  v1->_easeInOut[2]._acceleration = 3.9999962;
  v1->_easeInOut[2]._totalTime = 0.1;
  v1->_easeInOut[2]._remainingTime = 0.1;
  v14 = v1->ms_Slot;
  v15 = 9;
  v1->_easeInOut[3]._value = 0.99000001;
  v1->_easeInOut[3]._target = 1.0;
  v1->_easeInOut[3]._speed = 0.0;
  v1->_easeInOut[3]._acceleration = 3.9999962;
  v1->_easeInOut[3]._totalTime = 0.1;
  v1->_easeInOut[3]._remainingTime = 0.1;
  v1->_easeInOut[4]._value = 0.99000001;
  v1->_easeInOut[4]._target = 1.0;
  v1->_easeInOut[4]._speed = 0.0;
  v1->_easeInOut[4]._acceleration = 3.9999962;
  v1->_easeInOut[4]._totalTime = 0.1;
  v1->_easeInOut[4]._remainingTime = 0.1;
  v1->_easeInOut[5]._value = 0.99000001;
  v1->_easeInOut[5]._target = 1.0;
  v1->_easeInOut[5]._speed = 0.0;
  v1->_easeInOut[5]._acceleration = 3.9999962;
  v1->_easeInOut[5]._totalTime = 0.1;
  v1->_easeInOut[5]._remainingTime = 0.1;
  do
  {
    SlotEntry::reset(v14);
    ++v14;
    --v15;
  }
  while ( v15 );
  v1->m_iBetNum = -1;
  v16 = (int)v1->m_pkBetIndicator;
  v17 = 32;
  do
  {
    (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v16 + 256))(0);
    v16 += 4;
    --v17;
  }
  while ( v17 );
}

//----- (00725F20) --------------------------------------------------------
void __thiscall SlotMachineWin::UpdateResult(SlotMachineWin *this, float fCurTime)
{
  SlotMachineWin *v2; // esi@1
  char *v3; // edi@2
  signed int v4; // ebx@2
  int v5; // edi@4
  int v6; // ebx@4
  PgFrameWork *v7; // eax@8
  _DWORD **v8; // eax@9
  int v9; // ecx@14
  unsigned __int8 v10; // cf@14
  int v11; // edx@14
  signed int v12; // edi@14
  double v13; // st7@16
  double v14; // st6@17
  double v15; // st6@19
  bool v16; // zf@23
  int v17; // edi@24
  signed int v18; // ebx@24
  int v19; // edi@26
  signed int v20; // ebx@26
  int v21; // ebx@47
  char v22; // al@55
  NiNode *v23; // edi@56
  float z; // ST2C_4@56
  float y; // ST28_4@56
  float x; // ST24_4@56
  float w; // ST20_4@56
  _BYTE v28[12]; // ST24_12@56
  int v29; // eax@56
  NiQuaternion v30; // ST14_16@56
  NiNode *v31; // edi@58
  float v32; // ST2C_4@58
  float v33; // ST28_4@58
  float v34; // ST24_4@58
  float v35; // ST20_4@58
  _BYTE v36[12]; // ST24_12@58
  int v37; // eax@58
  NiQuaternion v38; // ST14_16@58
  NiNode *v39; // edi@60
  float v40; // ST2C_4@60
  float v41; // ST28_4@60
  float v42; // ST24_4@60
  float v43; // ST20_4@60
  _BYTE v44[12]; // ST24_12@60
  int v45; // eax@60
  NiQuaternion v46; // ST14_16@60
  NiNode *v47; // edi@62
  float v48; // ST2C_4@62
  float v49; // ST28_4@62
  float v50; // ST24_4@62
  float v51; // ST20_4@62
  _BYTE v52[12]; // ST24_12@62
  int v53; // eax@62
  NiQuaternion v54; // ST14_16@62
  char v55; // al@63
  double v56; // st6@69
  double v57; // st7@72
  NiQuaternion v58; // [sp+3Ch] [bp-50h]@56
  float v59; // [sp+4Ch] [bp-40h]@72
  float v60; // [sp+50h] [bp-3Ch]@56
  __int64 v61; // [sp+54h] [bp-38h]@56
  float v62; // [sp+5Ch] [bp-30h]@4
  bool bWinOneLine; // [sp+63h] [bp-29h]@23
  int result[9]; // [sp+64h] [bp-28h]@23

  v2 = this;
  if ( this->m_GameTimer.m_fObjectTime <= 6.5 )
  {
    if ( this->m_GameTimer.m_fObjectTime <= 5.0 || this->m_bMachineTimeSetting )
    {
      v12 = 0;
    }
    else
    {
      v9 = this->m_nShareCoin;
      v10 = __CFADD__(v9, v2->m_nTempUserCoin);
      LODWORD(v2->m_nTempUserCoin) += v9;
      v11 = HIDWORD(v2->m_nShareCoin);
      v2->m_bMachineTimeSetting = 1;
      HIDWORD(v2->m_nTempUserCoin) += v11 + v10;
      v12 = 0;
      LODWORD(v2->m_nShareCoin) = 0;
      HIDWORD(v2->m_nShareCoin) = 0;
    }
    v13 = 0.0;
    if ( v2->m_bTurnLight )
    {
      v62 = v2->m_GameTimer.m_fElapsedTime + v2->m_GameTimer.m_fElapsedTime + v2->m_fAlpha;
      v14 = v62;
      v2->m_fAlpha = v62;
      if ( v14 > 1.0 )
        v2->m_bTurnLight = 0;
    }
    else
    {
      v62 = v2->m_fAlpha - (v2->m_GameTimer.m_fElapsedTime + v2->m_GameTimer.m_fElapsedTime);
      v15 = v62;
      v2->m_fAlpha = v62;
      if ( v15 < 0.0 )
        v2->m_bTurnLight = 1;
    }
    if ( !v2->m_bRecivedResult )
      goto LABEL_77;
    if ( v2->m_GameTimer.m_fObjectTime > 1.5 )
    {
      v16 = (*((_BYTE *)&v2->m_WinState + 1) & 1) == 0;
      bWinOneLine = 0;
      result[0] = 0;
      result[1] = 0;
      result[2] = 0;
      result[3] = 0;
      result[4] = 0;
      result[5] = 0;
      result[6] = 0;
      result[7] = 0;
      result[8] = 0;
      if ( v16 )
      {
        if ( *(_BYTE *)&v2->m_WinState & 1 )
        {
          ((void (__stdcall *)(_DWORD))v2->m_pkWinLines[0]->vfptr[69].__vecDelDtor)(v2->m_fAlpha);
          v13 = 0.0;
          result[2] = 1;
          result[1] = 1;
          result[0] = 1;
        }
        if ( *(_BYTE *)&v2->m_WinState & 2 )
        {
          ((void (__stdcall *)(_DWORD))v2->m_pkWinLines[7]->vfptr[69].__vecDelDtor)(v2->m_fAlpha);
          v13 = 0.0;
          result[5] = 1;
          result[4] = 1;
          result[3] = 1;
        }
        if ( *(_BYTE *)&v2->m_WinState & 4 )
        {
          ((void (__stdcall *)(_DWORD))v2->m_pkWinLines[2]->vfptr[69].__vecDelDtor)(v2->m_fAlpha);
          v13 = 0.0;
          result[8] = 1;
          result[7] = 1;
          result[6] = 1;
        }
        if ( *(_BYTE *)&v2->m_WinState & 8 )
        {
          ((void (__stdcall *)(_DWORD))v2->m_pkWinLines[1]->vfptr[69].__vecDelDtor)(v2->m_fAlpha);
          v13 = 0.0;
          result[6] = 1;
          result[3] = 1;
          result[0] = 1;
        }
        if ( *(_BYTE *)&v2->m_WinState & 0x10 )
        {
          ((void (__stdcall *)(_DWORD))v2->m_pkWinLines[6]->vfptr[69].__vecDelDtor)(v2->m_fAlpha);
          v13 = 0.0;
          result[7] = 1;
          result[4] = 1;
          result[1] = 1;
        }
        if ( *(_BYTE *)&v2->m_WinState & 0x20 )
        {
          ((void (__stdcall *)(_DWORD))v2->m_pkWinLines[3]->vfptr[69].__vecDelDtor)(v2->m_fAlpha);
          v13 = 0.0;
          result[8] = 1;
          result[5] = 1;
          result[2] = 1;
        }
        if ( *(_BYTE *)&v2->m_WinState & 0x40 )
        {
          ((void (__stdcall *)(_DWORD))v2->m_pkWinLines[5]->vfptr[69].__vecDelDtor)(v2->m_fAlpha);
          v13 = 0.0;
          result[8] = 1;
          result[4] = 1;
          result[0] = 1;
        }
        if ( *(_BYTE *)&v2->m_WinState & 0x80 )
        {
          ((void (__stdcall *)(_DWORD))v2->m_pkWinLines[4]->vfptr[69].__vecDelDtor)(v2->m_fAlpha);
          v13 = 0.0;
          result[6] = 1;
          result[4] = 1;
          result[2] = 1;
        }
        if ( *((_BYTE *)&v2->m_WinState + 1) & 2 )
          result[4] = 1;
        v21 = (int)v2->m_pkWinSlots;
        LODWORD(v62) = (char *)v2 + 1116;
        do
        {
          if ( result[v12] )
          {
            ((void (__stdcall *)(_DWORD))*(void (__stdcall **)(float))(**(_DWORD **)v21 + 276))(v2->m_fAlpha);
            v13 = 0.0;
            if ( v12 != 4 )
              bWinOneLine = 1;
          }
          else if ( *(_DWORD *)LODWORD(v62) )
          {
            ((void (__stdcall *)(_DWORD))*(void (__stdcall **)(float))(**(_DWORD **)LODWORD(v62) + 276))(v2->m_fSlotAlpha);
            v13 = 0.0;
          }
          LODWORD(v62) += 104;
          ++v12;
          v21 += 4;
        }
        while ( v12 < 9 );
      }
      else
      {
        v17 = (int)v2->m_pkWinLines;
        v18 = 8;
        do
        {
          ((void (__stdcall *)(_DWORD))*(void (__stdcall **)(float))(**(_DWORD **)v17 + 276))(v2->m_fAlpha);
          v17 += 4;
          --v18;
        }
        while ( v18 );
        v19 = (int)v2->m_pkWinSlots;
        v20 = 9;
        do
        {
          ((void (__stdcall *)(_DWORD))*(void (__stdcall **)(float))(**(_DWORD **)v19 + 276))(v2->m_fAlpha);
          v19 += 4;
          --v20;
        }
        while ( v20 );
        v13 = 0.0;
      }
      if ( v2->m_bTransition )
      {
        v22 = *((_BYTE *)&v2->m_WinState + 1);
        if ( v22 & 4 )
        {
          v23 = v2->ms_EffectPos.m_pObject;
          v60 = v13;
          *(float *)&v61 = v13;
          *((float *)&v61 + 1) = 1.0;
          z = v13;
          y = v13;
          x = v13;
          w = v13;
          NiQuaternion::NiQuaternion(&v58, w, x, y, z);
          *(float *)v28 = v60;
          *(_QWORD *)&v28[4] = v61;
          *(_QWORD *)&v30.m_fW = *(_QWORD *)v29;
          *(_QWORD *)&v30.m_fY = *(_QWORD *)(v29 + 8);
          MHChipEffect::Start(v2->m_pkWinEffect[3], v23, v30, *(NiPoint3 *)v28);
        }
        else if ( v22 & 1 )
        {
          v31 = v2->ms_EffectPos.m_pObject;
          v60 = v13;
          *(float *)&v61 = v13;
          *((float *)&v61 + 1) = 1.0;
          v32 = v13;
          v33 = v13;
          v34 = v13;
          v35 = v13;
          NiQuaternion::NiQuaternion(&v58, v35, v34, v33, v32);
          *(float *)v36 = v60;
          *(_QWORD *)&v36[4] = v61;
          *(_QWORD *)&v38.m_fW = *(_QWORD *)v37;
          *(_QWORD *)&v38.m_fY = *(_QWORD *)(v37 + 8);
          MHChipEffect::Start(v2->m_pkWinEffect[1], v31, v38, *(NiPoint3 *)v36);
        }
        else if ( bWinOneLine )
        {
          v39 = v2->ms_EffectPos.m_pObject;
          v60 = v13;
          *(float *)&v61 = v13;
          *((float *)&v61 + 1) = 1.0;
          v40 = v13;
          v41 = v13;
          v42 = v13;
          v43 = v13;
          NiQuaternion::NiQuaternion(&v58, v43, v42, v41, v40);
          *(float *)v44 = v60;
          *(_QWORD *)&v44[4] = v61;
          *(_QWORD *)&v46.m_fW = *(_QWORD *)v45;
          *(_QWORD *)&v46.m_fY = *(_QWORD *)(v45 + 8);
          MHChipEffect::Start(v2->m_pkWinEffect[0], v39, v46, *(NiPoint3 *)v44);
        }
        else if ( v22 & 2 )
        {
          v47 = v2->ms_EffectPos.m_pObject;
          v60 = v13;
          *(float *)&v61 = v13;
          *((float *)&v61 + 1) = 1.0;
          v48 = v13;
          v49 = v13;
          v50 = v13;
          v51 = v13;
          NiQuaternion::NiQuaternion(&v58, v51, v50, v49, v48);
          *(float *)v52 = v60;
          *(_QWORD *)&v52[4] = v61;
          *(_QWORD *)&v54.m_fW = *(_QWORD *)v53;
          *(_QWORD *)&v54.m_fY = *(_QWORD *)(v53 + 8);
          MHChipEffect::Start(v2->m_pkWinEffect[2], v47, v54, *(NiPoint3 *)v52);
        }
        v55 = *((_BYTE *)&v2->m_WinState + 1);
        if ( v55 & 5 || bWinOneLine || v55 & 2 )
          SoundMgr::PlayInterfaceSound(&g_kSoundMgr, GB_SM_Win);
        else
          SoundMgr::PlayInterfaceSound(&g_kSoundMgr, GB_SM_Lose);
        v2->m_fSlotAlpha = 1.0;
        v2->m_bTransition = 0;
        v13 = 0.0;
      }
      else
      {
        v62 = v2->m_fSlotAlpha - v2->m_GameTimer.m_fElapsedTime;
        v56 = v62;
        v2->m_fSlotAlpha = v62;
        if ( v56 < 0.30000001 )
          v2->m_fSlotAlpha = 0.30000001;
      }
    }
    if ( v2->m_bRecivedResult )
    {
      v59 = v2->m_GameTimer.m_fObjectTime;
      v62 = fCurTime - v2->m_GameTimer.m_fStartTime;
      v57 = v62;
      v2->m_GameTimer.m_fObjectTime = v62;
      v13 = v57 - v59;
    }
    else
    {
LABEL_77:
      v2->m_GameTimer.m_fStartTime = fCurTime;
      v2->m_GameTimer.m_fObjectTime = v13;
    }
    v2->m_GameTimer.m_fElapsedTime = v13;
  }
  else
  {
    this->m_fSlotAlpha = 1.0;
    this->m_iStopID = 0;
    this->me_State = 0;
    *(_WORD *)&this->m_bTransition = 257;
    this->m_bClickBetBut = 0;
    v3 = (char *)this->m_pkWinLines;
    v4 = 8;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v3 + 276))(0.0);
      v3 += 4;
      --v4;
    }
    while ( v4 );
    v5 = (int)v2->m_pkWinSlots;
    v6 = (int)&v2->ms_Slot[0].ms_kSpr;
    LODWORD(v62) = 9;
    do
    {
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v5 + 276))(0.0);
      if ( *(_DWORD *)v6 )
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v6 + 276))(1.0);
      v5 += 4;
      v6 += 104;
      --LODWORD(v62);
    }
    while ( v62 != 0.0 );
    LODWORD(v2->m_nBettingCoin) = 0;
    HIDWORD(v2->m_nBettingCoin) = 0;
    SlotMachineWin::Betting(v2, BT_REBET);
    v7 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
    if ( v7 )
    {
      v8 = (_DWORD **)v7[22].m_BackFrameID;
      if ( v8 )
      {
        if ( v8[88] )
          (*(void (__thiscall **)(_DWORD *, signed int))(*v8[88] + 240))(v8[88], 1);
      }
    }
  }
}

//----- (00726650) --------------------------------------------------------
void __thiscall SlotMachineWin::ProcessMeInput(SlotMachineWin *this, bool *bHit)
{
  SlotMachineWin *v2; // esi@1
  GameFrameWork *v3; // eax@1
  SlotMachineWin::MachineState v4; // eax@3
  struct NiInputKeyboard *v5; // eax@5
  SlotMachineWin::MachineState v6; // eax@16
  NiPointer<MHDiceGameTask> *v7; // eax@18
  bool *v8; // edi@18
  MHDiceGameTask *v9; // ebx@18
  int v10; // eax@23
  unsigned __int8 v11; // cf@23
  void *(__thiscall *v12)(NiRefObject *, unsigned int); // eax@23
  SlotMachineWin::MachineState v13; // eax@34
  PgWinBut *v14; // ecx@36
  MHDiceGameTask *v15; // edi@40

  v2 = this;
  PgWinFrame::ProcessMeInput((PgWinFrame *)&this->vfptr, bHit);
  v3 = (GameFrameWork *)PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
  if ( v3 && GameFrameWork::IsDuringEdit(v3) )
    return;
  v4 = v2->me_State;
  if ( v4 && v4 != 1 )
    goto LABEL_31;
  v5 = g_pkKeyboard;
  if ( g_pkKeyboard->m_aucKeystate[15] & 2 && !(g_pkKeyboard->m_aucKeystateLastUpdate[15] & 2) )
  {
    if ( !(unsigned __int8)((int (*)(void))v2->m_pkButs[0]->vfptr[61].__vecDelDtor)() )
      return;
    SlotMachineWin::Betting(v2, 0);
    CEaseInOutInterpolation::Setup(v2->_easeInOut, 0.30000001, 1.0, 0.30000001);
    ((void (__stdcall *)(_DWORD))v2->m_pkButs[0]->vfptr[69].__vecDelDtor)(0.30000001);
    v5 = g_pkKeyboard;
  }
  if ( v5->m_aucKeystate[15] & 0x40 && !(v5->m_aucKeystateLastUpdate[15] & 0x40) )
  {
    if ( !(unsigned __int8)((int (*)(void))v2->m_pkButs[2]->vfptr[61].__vecDelDtor)() )
      return;
    SlotMachineWin::Betting(v2, BT_UNONEBET);
    CEaseInOutInterpolation::Setup(&v2->_easeInOut[2], 0.30000001, 1.0, 0.30000001);
    ((void (__stdcall *)(_DWORD))v2->m_pkButs[2]->vfptr[69].__vecDelDtor)(0.30000001);
    v5 = g_pkKeyboard;
  }
  if ( v5->m_aucKeystate[15] & 8 && !(v5->m_aucKeystateLastUpdate[15] & 8) )
  {
    if ( !(unsigned __int8)((int (*)(void))v2->m_pkButs[3]->vfptr[61].__vecDelDtor)() )
      return;
    v6 = v2->me_State;
    if ( v6 == EM_IDLE || v6 == 1 )
    {
      v7 = MHDiceGameTask::GetDiceGameTask((NiPointer<MHDiceGameTask> *)&bHit);
      v8 = bHit;
      v9 = v7->m_pObject;
      if ( bHit && !InterlockedDecrement((volatile LONG *)bHit + 1) && v8 )
        (**(void (__thiscall ***)(bool *, signed int))v8)(v8, 1);
      if ( v9 )
      {
        v10 = v2->m_nBettingCoin;
        v11 = __CFADD__(v10, v2->m_nTempUserCoin);
        LODWORD(v2->m_nTempUserCoin) += v10;
        HIDWORD(v2->m_nTempUserCoin) += HIDWORD(v2->m_nBettingCoin) + v11;
        LODWORD(v2->m_nBettingCoin) = 0;
        HIDWORD(v2->m_nBettingCoin) = 0;
        SlotMachineWin::ResetCoin(v2);
        SoundMgr::PlayInterfaceSound(&g_kSoundMgr, GB_SM_Reset);
        v12 = v2->m_pkButs[0]->vfptr[60].__vecDelDtor;
        if ( v2->m_iBetNum == -1 )
        {
          ((void (__stdcall *)(signed int))v12)(1);
          ((void (__stdcall *)(signed int))v2->m_pkButs[1]->vfptr[60].__vecDelDtor)(1);
          ((void (__stdcall *)(_DWORD))v2->m_pkButs[2]->vfptr[60].__vecDelDtor)(0);
          ((void (__stdcall *)(_DWORD))v2->m_pkButs[3]->vfptr[60].__vecDelDtor)(0);
          ((void (__stdcall *)(_DWORD))v2->m_pkButs[4]->vfptr[60].__vecDelDtor)(0);
          ((void (__stdcall *)(_DWORD))v2->m_pkButs[5]->vfptr[60].__vecDelDtor)(0);
          v2->me_State = 0;
          *(_WORD *)&v2->m_bTransition = 1;
          v2->m_bClickBetBut = 0;
        }
        else
        {
          ((void (__stdcall *)(signed int))v12)(1);
          ((void (__stdcall *)(signed int))v2->m_pkButs[1]->vfptr[60].__vecDelDtor)(1);
          ((void (__stdcall *)(signed int))v2->m_pkButs[3]->vfptr[60].__vecDelDtor)(1);
          ((void (__stdcall *)(signed int))v2->m_pkButs[4]->vfptr[60].__vecDelDtor)(1);
          ((void (__stdcall *)(signed int))v2->m_pkButs[2]->vfptr[60].__vecDelDtor)(1);
          v2->m_bTransition = 1;
          v2->me_State = 1;
        }
      }
    }
    CEaseInOutInterpolation::Setup(&v2->_easeInOut[3], 0.30000001, 1.0, 0.30000001);
    ((void (__stdcall *)(_DWORD))v2->m_pkButs[3]->vfptr[69].__vecDelDtor)(0.30000001);
    v5 = g_pkKeyboard;
  }
  if ( v5->m_aucKeystate[15] & 0x10 && !(v5->m_aucKeystateLastUpdate[15] & 0x10) )
  {
    if ( !(unsigned __int8)((int (*)(void))v2->m_pkButs[1]->vfptr[61].__vecDelDtor)() )
      return;
    SlotMachineWin::Betting(v2, BT_8BET);
    CEaseInOutInterpolation::Setup(&v2->_easeInOut[1], 0.30000001, 1.0, 0.30000001);
    ((void (__stdcall *)(_DWORD))v2->m_pkButs[1]->vfptr[69].__vecDelDtor)(0.30000001);
LABEL_31:
    v5 = g_pkKeyboard;
  }
  if ( v5->m_aucKeystate[7] & 2 && !(v5->m_aucKeystateLastUpdate[7] & 2) )
  {
    v13 = v2->me_State;
    if ( v13 == 1 )
    {
      if ( !(unsigned __int8)((int (*)(void))v2->m_pkButs[4]->vfptr[61].__vecDelDtor)() )
        return;
      SlotMachineWin::SendBettingInfo(v2);
      CEaseInOutInterpolation::Setup(&v2->_easeInOut[4], 0.30000001, 1.0, 0.30000001);
      v14 = v2->m_pkButs[4];
      goto LABEL_43;
    }
    if ( v13 == 4
      && (unsigned __int8)((int (*)(void))v2->m_pkButs[5]->vfptr[61].__vecDelDtor)()
      && v2->m_GameTimer.m_fObjectTime > 2.0 )
    {
      v15 = MHDiceGameTask::GetDiceGameTask((NiPointer<MHDiceGameTask> *)&bHit)->m_pObject;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&bHit);
      if ( v15 )
        MHDiceGameTask::NcGambleSlotmachineStopbuttonReq(v15);
      CEaseInOutInterpolation::Setup(&v2->_easeInOut[5], 0.30000001, 1.0, 0.30000001);
      v14 = v2->m_pkButs[5];
LABEL_43:
      ((void (__stdcall *)(_DWORD))v14->vfptr[69].__vecDelDtor)(0.30000001);
      return;
    }
  }
}
// A8C4A4: using guessed type struct NiInputKeyboard *g_pkKeyboard;

//----- (00726AC0) --------------------------------------------------------
char __thiscall MiniSlotMachineWin::Create(MiniSlotMachineWin *this, PgFrameWork *pkFrameWork)
{
  MiniSlotMachineWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiNode *v5; // eax@3
  NiNode *v6; // esi@7
  char result; // al@10
  PgSprData *v8; // eax@11
  PgWinBut *v9; // edi@11
  char *v10; // eax@11
  NiNode *v11; // esi@12
  int iLeft; // [sp+14h] [bp-18h]@11
  int iTop; // [sp+18h] [bp-14h]@11
  NiPointer<NiNode> spNode; // [sp+1Ch] [bp-10h]@1
  int v15; // [sp+28h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v15 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\GB_SlotMachineMin.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = spNode.m_pObject;
  if ( spNode.m_pObject )
  {
    v2->m_pkFrameWork = pkFrameWork;
    v8 = PgSprData::Create((NiAVObject *)&v5->vfptr, "GB_SlotMachineMin", &iLeft, &iTop, 0);
    v9 = PgWinBut::CreateWin(0, 0, v8, (PgWin *)&v2->vfptr, 0, 0, 0);
    v9->m_pkToolTipWin = g_pkToolTipWin;
    v10 = (char *)TextData2::Get(0xD7F9364E);
    PgWin::SetToolTipWinText((PgWin *)&v9->vfptr, v10);
    ((void (__thiscall *)(MiniSlotMachineWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
      v2,
      PgWin::ms_uiScreenWidth,
      PgWin::ms_uiScreenHeight,
      0.1,
      0.30000001);
    v15 = -1;
    if ( spNode.m_pObject )
    {
      v11 = spNode.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) )
      {
        if ( v11 )
          v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
      }
    }
    result = 1;
  }
  else
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("Game\\MyHomeMinButton.nif load fail", "LoadFail", spNode.m_pObject);
      v5 = spNode.m_pObject;
    }
    v15 = -1;
    if ( v5 )
    {
      v6 = v5;
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    result = 0;
  }
  return result;
}
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00726C50) --------------------------------------------------------
void __thiscall GBSlotHelpWin::OnCommand(GBSlotHelpWin *this, unsigned int wParam, int lParam)
{
  if ( wParam <= 1 )
  {
    GBSlotHelpWin::CloseWin(this);
  }
  else if ( wParam == 2 )
  {
    GBSlotHelpWin::OnSlideBar(this);
  }
}

//----- (00726C80) --------------------------------------------------------
void __thiscall SlotMachineWin::OnCommand(SlotMachineWin *this, unsigned int wParam, int lParam)
{
  SlotMachineWin *v3; // esi@1
  MHDiceGameTask *v4; // ebx@1
  MHDiceGameTask *v5; // edi@2
  SlotMachineWin::MachineState v6; // eax@13
  MHDiceGameTask *v7; // ebx@15
  void (__thiscall ***v8)(_DWORD, _DWORD); // edi@16
  int v9; // ecx@20
  unsigned __int8 v10; // cf@20
  void *(__thiscall *v11)(NiRefObject *, unsigned int); // edx@20
  NiPointer<MHDiceGameTask> result; // [sp+Ch] [bp-4h]@1

  v3 = this;
  v4 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  if ( result.m_pObject )
  {
    v5 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
  }
  if ( v4 )
  {
    switch ( wParam )
    {
      case 0u:
        MHDiceGameTask::OpenSlotMachineWin();
        break;
      case 1u:
        MHDiceGameTask::NcGambleSlotmachineGameLeaveReq(v4);
        break;
      case 2u:
        SlotMachineWin::SendBettingInfo(v3);
        break;
      case 3u:
        SlotMachineWin::Betting(v3, 0);
        break;
      case 4u:
        SlotMachineWin::Betting(v3, BT_UNONEBET);
        break;
      case 5u:
        SlotMachineWin::Betting(v3, BT_8BET);
        break;
      case 6u:
        v6 = v3->me_State;
        if ( v6 == EM_IDLE || v6 == 1 )
        {
          v7 = MHDiceGameTask::GetDiceGameTask((NiPointer<MHDiceGameTask> *)&wParam)->m_pObject;
          if ( wParam )
          {
            v8 = (void (__thiscall ***)(_DWORD, _DWORD))wParam;
            if ( !InterlockedDecrement((volatile LONG *)(wParam + 4)) )
            {
              if ( v8 )
                (**v8)(v8, 1);
            }
          }
          if ( v7 )
          {
            v9 = v3->m_nBettingCoin;
            v10 = __CFADD__(v9, v3->m_nTempUserCoin);
            LODWORD(v3->m_nTempUserCoin) += v9;
            HIDWORD(v3->m_nTempUserCoin) += HIDWORD(v3->m_nBettingCoin) + v10;
            LODWORD(v3->m_nBettingCoin) = 0;
            HIDWORD(v3->m_nBettingCoin) = 0;
            SlotMachineWin::ResetCoin(v3);
            SoundMgr::PlayInterfaceSound(&g_kSoundMgr, GB_SM_Reset);
            v11 = v3->m_pkButs[0]->vfptr[60].__vecDelDtor;
            if ( v3->m_iBetNum == -1 )
            {
              ((void (__stdcall *)(signed int))v11)(1);
              ((void (__stdcall *)(signed int))v3->m_pkButs[1]->vfptr[60].__vecDelDtor)(1);
              ((void (__stdcall *)(_DWORD))v3->m_pkButs[2]->vfptr[60].__vecDelDtor)(0);
              ((void (__stdcall *)(_DWORD))v3->m_pkButs[3]->vfptr[60].__vecDelDtor)(0);
              ((void (__stdcall *)(_DWORD))v3->m_pkButs[4]->vfptr[60].__vecDelDtor)(0);
              ((void (__stdcall *)(_DWORD))v3->m_pkButs[5]->vfptr[60].__vecDelDtor)(0);
              v3->me_State = 0;
              *(_WORD *)&v3->m_bTransition = 1;
              v3->m_bClickBetBut = 0;
            }
            else
            {
              ((void (__stdcall *)(signed int))v11)(1);
              ((void (__stdcall *)(signed int))v3->m_pkButs[1]->vfptr[60].__vecDelDtor)(1);
              ((void (__stdcall *)(signed int))v3->m_pkButs[3]->vfptr[60].__vecDelDtor)(1);
              ((void (__stdcall *)(signed int))v3->m_pkButs[4]->vfptr[60].__vecDelDtor)(1);
              ((void (__stdcall *)(signed int))v3->m_pkButs[2]->vfptr[60].__vecDelDtor)(1);
              v3->m_bTransition = 1;
              v3->me_State = 1;
            }
          }
        }
        break;
      case 7u:
        if ( v3->me_State == 4 && v3->m_GameTimer.m_fObjectTime > 2.0 )
          MHDiceGameTask::NcGambleSlotmachineStopbuttonReq(v4);
        break;
      case 8u:
        MHDiceGameTask::OpenSlotHelpWin(v4);
        break;
      case 9u:
        MHDiceGameTask::NcGambleSlotmachineJackpotRankReq(v4);
        break;
      default:
        return;
    }
  }
}

//----- (00726F30) --------------------------------------------------------
void __thiscall SlotMachineWin::UpdateMeWin(SlotMachineWin *this, float fCurTime)
{
  SlotMachineWin *v2; // esi@1
  MHDiceGameTask *v3; // edi@1
  MHDiceGameTask *v4; // ebx@2
  SlotEntry *v5; // ebx@6
  bool v6; // zf@12
  char *v7; // eax@14
  char *v8; // eax@17
  double v9; // st7@18
  double v10; // st7@19
  double v11; // st7@21
  int v12; // ebx@23
  signed int v13; // edi@23
  int v14; // ebx@25
  signed int v15; // edi@25
  int v16; // ebx@29
  signed int v17; // edi@29
  int v18; // ebx@31
  signed int v19; // edi@31
  char *v20; // eax@39
  double v21; // st7@40
  double v22; // st7@44
  SlotEntry *v23; // ecx@45
  int v24; // ecx@46
  int v25; // edx@46
  NiNode *v26; // ebx@47
  _BYTE ST14_12_47[12]; // ST14_12@47
  int v28; // eax@47
  NiQuaternion v29; // ST04_16@47
  NiNode *v30; // eax@47
  PgFrameWork *v31; // eax@49
  _DWORD **v32; // eax@50
  double v33; // st7@56
  MHChipEffect *v34; // ecx@57
  NiNode *v35; // eax@59
  int v36; // eax@64
  int v37; // ebx@66
  int v38; // edi@66
  double v39; // st7@69
  int v40; // edi@71
  int v41; // ebx@71
  double v42; // st7@72
  double v43; // st6@72
  double v44; // st6@73
  double v45; // st7@76
  float y_4; // ST1C_4@78
  unsigned int v47; // ebx@79
  unsigned int v48; // ecx@79
  int v49; // edi@79
  __int64 v50; // rax@81
  signed int v51; // eax@81
  unsigned int v52; // ebx@102
  int v53; // edi@103
  signed __int64 v54; // kr00_8@103
  int v55; // edi@108
  int v56; // esi@109
  NiQuaternion v57; // [sp+20h] [bp-70h]@47
  float v58; // [sp+30h] [bp-60h]@47
  __int64 v59; // [sp+34h] [bp-5Ch]@47
  NiPointer<MHDiceGameTask> result; // [sp+3Ch] [bp-54h]@1
  float v61; // [sp+40h] [bp-50h]@6
  int resultSeq[9]; // [sp+44h] [bp-4Ch]@66
  int stopSeq[9]; // [sp+68h] [bp-28h]@66

  v2 = this;
  v3 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
  if ( *(float *)&result.m_pObject != 0.0 )
  {
    v4 = result.m_pObject;
    if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
    {
      if ( v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
  }
  if ( v3 )
  {
    v5 = v2->ms_Slot;
    LODWORD(v61) = 9;
    do
    {
      SlotEntry::update(v5, fCurTime);
      ++v5;
      --LODWORD(v61);
    }
    while ( v61 != 0.0 );
    switch ( v2->me_State )
    {
      case 0:
        if ( v3->m_bLeaveReserve )
          MHDiceGameTask::NcGambleSlotmachineGameLeaveReq(v3);
        if ( v2->m_bMachineTimeSetting )
        {
          if ( v2->m_MachineTimer.m_fObjectTime > 300.0 && !v2->m_bClickBetBut )
          {
            v8 = (char *)TextData2::Get(0x8BDBE3C2);
            MHDiceGameTask::AddMsg(v8, 1, 1);
            MHDiceGameTask::NcGambleSlotmachineGameLeaveReq(v3);
            v2->m_bMachineTimeSetting = 0;
          }
          result.m_pObject = (MHDiceGameTask *)LODWORD(v2->m_MachineTimer.m_fObjectTime);
          v61 = fCurTime - v2->m_MachineTimer.m_fStartTime;
          v9 = v61;
          v2->m_MachineTimer.m_fObjectTime = v61;
          v2->m_MachineTimer.m_fElapsedTime = v9 - *(float *)&result.m_pObject;
          if ( v2->m_bTurnLight )
          {
            v61 = v2->m_MachineTimer.m_fElapsedTime + v2->m_MachineTimer.m_fElapsedTime + v2->m_fAlpha;
            v10 = v61;
            v2->m_fAlpha = v61;
            if ( v10 > 1.0 )
              v2->m_bTurnLight = 0;
          }
          else
          {
            v61 = v2->m_fAlpha - (v2->m_MachineTimer.m_fElapsedTime + v2->m_MachineTimer.m_fElapsedTime);
            v11 = v61;
            v2->m_fAlpha = v61;
            if ( v11 < 0.0 )
              v2->m_bTurnLight = 1;
          }
          v12 = (int)v2->m_pkWinLines;
          v13 = 8;
          do
          {
            ((void (__stdcall *)(_DWORD))*(void (__stdcall **)(float))(**(_DWORD **)v12 + 276))(v2->m_fAlpha);
            v12 += 4;
            --v13;
          }
          while ( v13 );
          v14 = (int)v2->m_pkWinSlots;
          v15 = 9;
          do
          {
            ((void (__stdcall *)(_DWORD))*(void (__stdcall **)(float))(**(_DWORD **)v14 + 276))(v2->m_fAlpha);
            v14 += 4;
            --v15;
          }
          while ( v15 );
        }
        else
        {
          v2->m_MachineTimer.m_fStartTime = fCurTime;
          v2->m_MachineTimer.m_fObjectTime = 0.0;
          v2->m_MachineTimer.m_fElapsedTime = 0.0;
          v6 = v2->m_iBetNum == -1;
          v2->m_bRecivedResult = 0;
          *(_WORD *)&v2->m_bTransition = 257;
          if ( v6 && !v3->m_bLeaveReserve )
          {
            v7 = (char *)TextData2::Get(0x829F85A6);
            MHDiceGameTask::AddMsg(v7, 1, 1);
          }
        }
        goto LABEL_71;
      case 1:
        if ( v2->m_bTransition )
        {
          v16 = (int)v2->m_pkWinLines;
          v2->m_GameTimer.m_fStartTime = fCurTime;
          v17 = 8;
          v2->m_GameTimer.m_fObjectTime = 0.0;
          v2->m_GameTimer.m_fElapsedTime = 0.0;
          v2->m_bTransition = 0;
          do
          {
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v16 + 276))(0.0);
            v16 += 4;
            --v17;
          }
          while ( v17 );
          v18 = (int)v2->m_pkWinSlots;
          v19 = 9;
          do
          {
            (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v18 + 276))(0.0);
            v18 += 4;
            --v19;
          }
          while ( v19 );
        }
        else
        {
          if ( v2->m_bMachineTimeSetting )
          {
            v2->m_MachineTimer.m_fStartTime = fCurTime;
            v2->m_MachineTimer.m_fObjectTime = 0.0;
            v2->m_MachineTimer.m_fElapsedTime = 0.0;
            v2->m_bMachineTimeSetting = 0;
            if ( v3->m_bLeaveReserve )
              MHDiceGameTask::NcGambleSlotmachineGameLeaveReq(v3);
          }
          else
          {
            if ( v2->m_MachineTimer.m_fObjectTime > 300.0 && !v2->m_bClickBetBut )
            {
              v20 = (char *)TextData2::Get(0x8BDBE3C2);
              MHDiceGameTask::AddMsg(v20, 1, 1);
              MHDiceGameTask::NcGambleSlotmachineGameLeaveReq(v3);
              v2->m_bMachineTimeSetting = 1;
            }
            result.m_pObject = (MHDiceGameTask *)LODWORD(v2->m_MachineTimer.m_fObjectTime);
            v61 = fCurTime - v2->m_MachineTimer.m_fStartTime;
            v21 = v61;
            v2->m_MachineTimer.m_fObjectTime = v61;
            v2->m_MachineTimer.m_fElapsedTime = v21 - *(float *)&result.m_pObject;
          }
          if ( v2->m_GameTimer.m_fObjectTime > 30.0 && v2->m_bClickBetBut )
          {
            SlotMachineWin::SendBettingInfo(v2);
            v2->m_GameTimer.m_fStartTime = fCurTime;
            v2->m_GameTimer.m_fObjectTime = 0.0;
            v2->m_GameTimer.m_fElapsedTime = 0.0;
          }
          result.m_pObject = (MHDiceGameTask *)LODWORD(v2->m_GameTimer.m_fObjectTime);
          v61 = fCurTime - v2->m_GameTimer.m_fStartTime;
          v22 = v61;
          v2->m_GameTimer.m_fObjectTime = v61;
          v2->m_GameTimer.m_fElapsedTime = v22 - *(float *)&result.m_pObject;
        }
        goto LABEL_71;
      case 3:
        v23 = v2->ms_Slot;
        do
        {
          SlotEntry::roll(v23);
          v23 = (SlotEntry *)(v24 + 104);
        }
        while ( v25 != 1 );
        v2->me_State = 4;
        v2->m_GameTimer.m_fStartTime = fCurTime;
        v2->m_GameTimer.m_fObjectTime = 0.0;
        v2->m_GameTimer.m_fElapsedTime = 0.0;
        v26 = v2->ms_EffectPos.m_pObject;
        v58 = 856.0;
        *(float *)&v59 = 225.0;
        *((float *)&v59 + 1) = 1.0;
        NiQuaternion::NiQuaternion(&v57, 0.0, 0.0, 0.0, 0.0);
        *(float *)ST14_12_47 = v58;
        *(_QWORD *)&ST14_12_47[4] = v59;
        *(_QWORD *)&v29.m_fW = *(_QWORD *)v28;
        *(_QWORD *)&v29.m_fY = *(_QWORD *)(v28 + 8);
        MHChipEffect::Start(v2->m_pkBarEffect[1], v26, v29, *(NiPoint3 *)ST14_12_47);
        v30 = v2->m_pkBarEffect[0]->m_spEffect.m_pObject;
        if ( v30 )
          v30->m_uFlags |= 1u;
        SoundMgr::PlayInterfaceSound(&g_kSoundMgr, GB_SM_ReelStart);
        v31 = PgFrameMgr::GetFrameWork(&Pgg_kFrameMgr, GameFrameWorkID);
        if ( v31 )
        {
          v32 = (_DWORD **)v31[22].m_BackFrameID;
          if ( v32 )
          {
            if ( v32[88] )
              (*(void (__thiscall **)(_DWORD *, _DWORD))(*v32[88] + 240))(v32[88], 0);
          }
        }
        goto LABEL_71;
      case 4:
        if ( v2->m_GameTimer.m_fObjectTime <= 10.0 )
        {
          result.m_pObject = (MHDiceGameTask *)LODWORD(v2->m_GameTimer.m_fObjectTime);
          v61 = fCurTime - v2->m_GameTimer.m_fStartTime;
          v33 = v61;
          v2->m_GameTimer.m_fObjectTime = v61;
          v2->m_GameTimer.m_fElapsedTime = v33 - *(float *)&result.m_pObject;
        }
        else if ( v2->m_bTransition )
        {
          v2->m_bTransition = 0;
          MHDiceGameTask::NcGambleSlotmachineStopbuttonReq(v3);
        }
        v34 = v2->m_pkBarEffect[1];
        if ( v34->m_bLive )
        {
          if ( !MHChipEffect::Update(v34, fCurTime) )
          {
            v35 = v2->m_pkBarEffect[0]->m_spEffect.m_pObject;
            if ( v35 )
              v35->m_uFlags &= 0xFFFEu;
          }
        }
        goto LABEL_71;
      case 5:
        if ( v2->m_bTransition )
        {
          v2->m_GameTimer.m_fStartTime = fCurTime;
          v2->m_GameTimer.m_fObjectTime = 0.0;
          v2->m_GameTimer.m_fElapsedTime = 0.0;
          SlotEntry::stop(v2->ms_Slot, v2->m_iResult[6]);
          ++v2->m_iStopID;
          v2->m_bTransition = 0;
        }
        else if ( v2->m_GameTimer.m_fObjectTime <= 1.0 )
        {
          result.m_pObject = (MHDiceGameTask *)LODWORD(v2->m_GameTimer.m_fObjectTime);
          v61 = fCurTime - v2->m_GameTimer.m_fStartTime;
          v39 = v61;
          v2->m_GameTimer.m_fObjectTime = v61;
          v2->m_GameTimer.m_fElapsedTime = v39 - *(float *)&result.m_pObject;
        }
        else
        {
          v2->m_GameTimer.m_fStartTime = fCurTime;
          v2->m_GameTimer.m_fObjectTime = 0.0;
          v2->m_GameTimer.m_fElapsedTime = 0.0;
          v36 = v2->m_iStopID;
          if ( v36 == 9 )
          {
            v2->m_iStopID = 0;
            v2->me_State = 7;
            v2->m_bTransition = 1;
            v2->m_bRecivedResult = 0;
            MHDiceGameTask::NcGambleSlotmachineWheelstopReq(v3);
            return;
          }
          stopSeq[4] = 4;
          resultSeq[6] = 0;
          stopSeq[0] = 0;
          stopSeq[1] = 3;
          stopSeq[2] = 6;
          stopSeq[3] = 1;
          stopSeq[5] = 7;
          stopSeq[6] = 2;
          stopSeq[7] = 5;
          stopSeq[8] = 8;
          v37 = stopSeq[v36];
          resultSeq[0] = 6;
          resultSeq[1] = 7;
          resultSeq[2] = 8;
          resultSeq[3] = 3;
          resultSeq[4] = 4;
          resultSeq[5] = 5;
          resultSeq[7] = 1;
          resultSeq[8] = 2;
          v38 = resultSeq[v37];
          if ( v36 == 8 )
          {
            ((void (*)(void))g_kSoundMgr.m_pkInterfaceGroup->vfptr->StopAllSound)();
            ((void (*)(void))g_kSoundMgr.m_pkInterfaceGroup->vfptr->UnloadAllSound)();
          }
          SlotEntry::stop(&v2->ms_Slot[v37], v2->m_iResult[v38]);
          ++v2->m_iStopID;
        }
LABEL_71:
        v40 = (int)v2->m_pkButs;
        v41 = (int)&v2->_easeInOut[0]._speed;
        LODWORD(v61) = 6;
        do
        {
          result.m_pObject = (MHDiceGameTask *)LODWORD(v2->m_GameTimer.m_fElapsedTime);
          v42 = *(float *)&result.m_pObject;
          *(float *)&result.m_pObject = *(float *)(v41 - 8) - *(float *)&result.m_pObject;
          v43 = *(float *)&result.m_pObject;
          *(float *)&result.m_pObject = v43;
          *(float *)(v41 - 8) = v43;
          if ( *(float *)(v41 - 4) * 0.5 <= v43 )
            v44 = *(float *)(v41 + 4) * v42 + *(float *)v41;
          else
            v44 = *(float *)v41 - *(float *)(v41 + 4) * v42;
          *(float *)v41 = v44;
          *(float *)(v41 - 16) = v42 * *(float *)v41 + *(float *)(v41 - 16);
          if ( *(float *)&result.m_pObject <= 0.0 )
            v45 = 1.0;
          else
            v45 = *(float *)(v41 - 16);
          y_4 = v45;
          (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v40 + 276))(LODWORD(y_4));
          v40 += 4;
          v41 += 32;
          --LODWORD(v61);
        }
        while ( v61 != 0.0 );
        SlotMachineWin::UpdateCoin(v2, &v2->m_nUserCoin, &v2->m_nTempUserCoin, 0, 0);
        SlotMachineWin::UpdateCoin(v2, &v2->m_nPreBettingCoin, &v2->m_nBettingCoin, CT_BETTINGCOIN, 0);
        v47 = v2->m_nShareCoin;
        v48 = v2->m_nPreShareCoin;
        v49 = HIDWORD(v2->m_nPreShareCoin);
        if ( v47 == v48 && HIDWORD(v2->m_nShareCoin) == v49 )
          return;
        v50 = LODWORD(v2->m_nShareCoin) - LODWORD(v2->m_nPreShareCoin);
        v51 = (HIDWORD(v50) ^ v50) - HIDWORD(v50);
        if ( v51 <= 1000000 )
        {
          if ( v51 <= 100000 )
          {
            if ( v51 <= 10000 )
            {
              if ( v51 <= 1000 )
              {
                if ( v51 <= 100 )
                {
                  if ( v51 > 10 )
                    v51 = 10;
                }
                else
                {
                  v51 = 100;
                }
              }
              else
              {
                v51 = 1000;
              }
            }
            else
            {
              v51 = 10000;
            }
          }
          else
          {
            v51 = 100000;
          }
        }
        else
        {
          v51 = 1000000;
        }
        if ( v49 > SHIDWORD(v2->m_nShareCoin) || v49 >= SHIDWORD(v2->m_nShareCoin) && v48 >= v47 )
          v2->m_nPreShareCoin = __PAIR__(v49, v48) - v51;
        else
          v2->m_nPreShareCoin = __PAIR__(v49, v48) + v51;
        if ( SHIDWORD(v2->m_nPreShareCoin) <= 0 )
        {
          if ( SHIDWORD(v2->m_nPreShareCoin) < 0 )
          {
            LODWORD(v2->m_nPreShareCoin) = 0;
            HIDWORD(v2->m_nPreShareCoin) = 0;
          }
          else
          {
            v6 = LODWORD(v2->m_nPreShareCoin) == 0;
          }
        }
        v52 = v2->m_nPreShareCoin;
        HIDWORD(v59) = HIDWORD(v2->m_nPreShareCoin);
        LODWORD(v61) = 7;
        result.m_pObject = (MHDiceGameTask *)&v2->m_pkShareNum[7];
        break;
      case 7:
        v2->m_bMachineTimeSetting = 0;
        SlotMachineWin::UpdateResult(v2, fCurTime);
        goto LABEL_71;
      default:
        goto LABEL_71;
    }
    while ( 1 )
    {
      v53 = (signed __int64)__PAIR__(HIDWORD(v59), v52) % 10;
      v54 = (signed __int64)__PAIR__(HIDWORD(v59), v52) / 10;
      HIDWORD(v59) = (unsigned __int64)((signed __int64)__PAIR__(HIDWORD(v59), v52) / 10) >> 32;
      v52 = v54;
      if ( v53 < 0 )
        v53 = 0;
      (*((void (__stdcall **)(_DWORD))result.m_pObject->vfptr->__vecDelDtor + 123))(v53);
      if ( !(HIDWORD(v59) | (unsigned int)v54) )
        break;
      result.m_pObject = (MHDiceGameTask *)((char *)result.m_pObject - 4);
      if ( --LODWORD(v61) < 0 )
        return;
    }
    v55 = LODWORD(v61) - 1;
    if ( LODWORD(v61) - 1 >= 0 )
    {
      v56 = (int)&v2->m_pkShareNum[v55];
      do
      {
        (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v56 + 492))(0);
        v56 -= 4;
        --v55;
      }
      while ( v55 >= 0 );
    }
  }
}

//----- (007278B0) --------------------------------------------------------
SlotMachineWin *__cdecl SlotMachineWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // eax@2
  PgWin *v3; // esi@2
  PgWin *v4; // edi@8
  SlotMachineWin *v5; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v7; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x850u);
  result.m_pObject = v1;
  v7 = 0;
  if ( v1 )
  {
    SlotMachineWin::SlotMachineWin((SlotMachineWin *)v1);
    v3 = v2;
  }
  else
  {
    v3 = 0;
  }
  if ( v3 )
    InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  v7 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v3);
  if ( (unsigned __int8)v3->vfptr[135].__vecDelDtor((NiRefObject *)v3, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v3->vfptr[89].__vecDelDtor)(v3);
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = (SlotMachineWin *)v3;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v3);
    if ( result.m_pObject )
    {
      v4 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v4 )
          v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      }
    }
    v7 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v5 = 0;
  }
  return v5;
}

//----- (007279E0) --------------------------------------------------------
MiniSlotMachineWin *__cdecl MiniSlotMachineWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  MiniSlotMachineWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x15Cu);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&MiniSlotMachineWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&MiniSlotMachineWin::`vftable'{for `IDirectMessenger'};
    LOBYTE(v2[1].m_kLocal.m_Rotate.m_pEntry[0][1]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (MiniSlotMachineWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9CDC88: using guessed type void (__thiscall *MiniSlotMachineWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CDCA4: using guessed type int (__thiscall *MiniSlotMachineWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00727B30) --------------------------------------------------------
GBSlotHelpWin *__cdecl GBSlotHelpWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  GBSlotHelpWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x160u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&GBSlotHelpWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&GBSlotHelpWin::`vftable'{for `IDirectMessenger'};
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (GBSlotHelpWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9CDEC8: using guessed type void (__thiscall *GBSlotHelpWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CDEE4: using guessed type int (__thiscall *GBSlotHelpWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00727C70) --------------------------------------------------------
void __thiscall GBSlotRankWin::GBSlotRankWin(GBSlotRankWin *this)
{
  GBSlotRankWin *v1; // esi@1

  v1 = this;
  PgWinFrame::PgWinFrame((PgWinFrame *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&GBSlotRankWin::`vftable'{for `NiNode'};
  v1->vfptr = (IDirectMessengerVtbl *)&GBSlotRankWin::`vftable'{for `IDirectMessenger'};
  v1->m_JackpotRankList._Myfirst = 0;
  v1->m_JackpotRankList._Mylast = 0;
  v1->m_JackpotRankList._Myend = 0;
  v1->m_WinRankList._Myfirst = 0;
  v1->m_WinRankList._Mylast = 0;
  v1->m_WinRankList._Myend = 0;
}
// 9CE37C: using guessed type void (__thiscall *GBSlotRankWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CE39C: using guessed type int (__thiscall *GBSlotRankWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00727CC0) --------------------------------------------------------
void __thiscall GBSlotRankWin::~GBSlotRankWin(GBSlotRankWin *this)
{
  GBSlotRankWin *v1; // esi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&GBSlotRankWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GBSlotRankWin::`vftable'{for `IDirectMessenger'};
  if ( this->m_WinRankList._Myfirst )
    operator delete(this->m_WinRankList._Myfirst);
  v1->m_WinRankList._Myfirst = 0;
  v1->m_WinRankList._Mylast = 0;
  v1->m_WinRankList._Myend = 0;
  if ( v1->m_JackpotRankList._Myfirst )
    operator delete(v1->m_JackpotRankList._Myfirst);
  v1->m_JackpotRankList._Myfirst = 0;
  v1->m_JackpotRankList._Mylast = 0;
  v1->m_JackpotRankList._Myend = 0;
  PgWinFrame::~PgWinFrame((PgWinFrame *)&v1->vfptr);
}
// 9CE37C: using guessed type void (__thiscall *GBSlotRankWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CE39C: using guessed type int (__thiscall *GBSlotRankWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00727D30) --------------------------------------------------------
GBSlotRankWin *__cdecl GBSlotRankWin::CreateWin(PgFrameWork *pkFrameWork)
{
  PgWin *v1; // eax@1
  PgWin *v2; // esi@1
  PgWin *v3; // edi@8
  GBSlotRankWin *v4; // eax@13
  NiPointer<PgWin> result; // [sp+14h] [bp-10h]@1
  int v6; // [sp+20h] [bp-4h]@1

  v1 = (PgWin *)operator new(0x194u);
  v2 = v1;
  result.m_pObject = v1;
  v6 = 0;
  if ( v1 )
  {
    PgWinFrame::PgWinFrame((PgWinFrame *)v1);
    v2->vfptr = (NiRefObjectVtbl *)&GBSlotRankWin::`vftable'{for `NiNode'};
    v2->vfptr = (IDirectMessengerVtbl *)&GBSlotRankWin::`vftable'{for `IDirectMessenger'};
    LODWORD(v2[1].m_kLocal.m_Rotate.m_pEntry[2][2]) = 0;
    LODWORD(v2[1].m_kLocal.m_Translate.x) = 0;
    LODWORD(v2[1].m_kLocal.m_Translate.y) = 0;
    LODWORD(v2[1].m_kLocal.m_fScale) = 0;
    LODWORD(v2[1].m_kWorld.m_Rotate.m_pEntry[0][0]) = 0;
    LODWORD(v2[1].m_kWorld.m_Rotate.m_pEntry[0][1]) = 0;
  }
  else
  {
    v2 = 0;
  }
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v6 = 1;
  PgWinMgr::Add(&Pgg_kWinMgr, v2);
  if ( (unsigned __int8)v2->vfptr[135].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkFrameWork) )
  {
    ((void (__thiscall *)(PgWin *))v2->vfptr[89].__vecDelDtor)(v2);
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = (GBSlotRankWin *)v2;
  }
  else
  {
    PgWinMgr::Remove(&Pgg_kWinMgr, &result, v2);
    if ( result.m_pObject )
    {
      v3 = result.m_pObject;
      if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
    }
    v6 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v4 = 0;
  }
  return v4;
}
// 9CE37C: using guessed type void (__thiscall *GBSlotRankWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CE39C: using guessed type int (__thiscall *GBSlotRankWin::`vftable'{for `NiNode'})(void *p, char);

//----- (00727E90) --------------------------------------------------------
void __thiscall GBSlotRankWin::UpdateList(GBSlotRankWin *this, std::vector<SlotJackpotRankInfo,std::allocator<SlotJackpotRankInfo> > RankList)
{
  GBSlotRankWin *v2; // edi@1
  int v3; // esi@1
  SlotJackpotRankInfo *v4; // ebx@1
  unsigned int v5; // eax@1
  unsigned int v6; // ecx@2
  MHDiceGameTask *v7; // ecx@7
  MHDiceGameTask *v8; // ebx@8
  unsigned int v9; // ebx@13
  SlideListWin *v10; // ecx@13
  unsigned int v11; // eax@13
  unsigned int v12; // edx@13
  NiPointer<MHDiceGameTask> result; // [sp+14h] [bp-B8h]@7
  int v14; // [sp+18h] [bp-B4h]@3
  unsigned int i; // [sp+1Ch] [bp-B0h]@2
  bool v16; // [sp+23h] [bp-A9h]@7
  char szdata[128]; // [sp+24h] [bp-A8h]@1
  char acname[21]; // [sp+A4h] [bp-28h]@13
  int v19; // [sp+C8h] [bp-4h]@1

  v2 = this;
  v3 = 0;
  v19 = 0;
  szdata[0] = 0;
  memset(&szdata[1], 0, 0x7Fu);
  v4 = RankList._Myfirst;
  v5 = RankList._Mylast - RankList._Myfirst;
  if ( v5 )
  {
    v6 = RankList._Myfirst->JackpotPrice;
    i = 0;
    if ( v5 > 0 )
    {
      v14 = 1;
      while ( 1 )
      {
        if ( v4[v3].JackpotPrice < v6 )
          ++v14;
        v7 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
        LOBYTE(v19) = 1;
        v16 = MHDiceGameTask::IsGambleMode(v7);
        LOBYTE(v19) = 0;
        if ( result.m_pObject )
        {
          v8 = result.m_pObject;
          if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
          {
            if ( v8 )
              v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
          }
        }
        if ( v16 )
          sprintf(szdata, "%d%s", v14, "  ");
        v9 = SlideListWin::AddText(v2->m_pUserList, szdata);
        *(_DWORD *)acname = RankList._Myfirst[v3].sCharID.n5_code[0];
        *(_DWORD *)&acname[4] = RankList._Myfirst[v3].sCharID.n5_code[1];
        *(_DWORD *)&acname[8] = RankList._Myfirst[v3].sCharID.n5_code[2];
        v10 = v2->m_pUserList;
        *(_DWORD *)&acname[12] = RankList._Myfirst[v3].sCharID.n5_code[3];
        *(_DWORD *)&acname[16] = RankList._Myfirst[v3].sCharID.n5_code[4];
        acname[20] = 0;
        SlideListWin::SetText(v10, v9, 1u, acname);
        SlideListWin::AlignText(v2->m_pUserList, 1u, 4u);
        sprintf(szdata, "%d", RankList._Myfirst[v3].JackpotPrice);
        SlideListWin::SetText(v2->m_pUserList, v9, 2u, szdata);
        v4 = RankList._Myfirst;
        v11 = RankList._Myfirst[v3].JackpotPrice;
        ++i;
        v12 = (signed int)((unsigned __int64)(715827883i64
                                            * (unsigned int)((char *)RankList._Mylast - (char *)RankList._Myfirst)) >> 32) >> 2;
        ++v3;
        if ( i >= v12 + (v12 >> 31) )
          break;
        v6 = v11;
      }
    }
  }
  SlideListWin::UpdateViewList(v2->m_pUserList);
  if ( RankList._Myfirst )
    operator delete(RankList._Myfirst);
}

//----- (007280B0) --------------------------------------------------------
void __thiscall GBSlotRankWin::UpdateViewList(GBSlotRankWin *this)
{
  GBSlotRankWin *v1; // esi@1
  SlideListWin *v2; // ecx@1
  bool v3; // zf@2
  std::vector<SlotJackpotRankInfo,std::allocator<SlotJackpotRankInfo> > v4; // [sp-10h] [bp-18h]@2
  std::vector<SlotJackpotRankInfo,std::allocator<SlotJackpotRankInfo> > *v5; // [sp+4h] [bp-4h]@2

  v1 = this;
  v2 = this->m_pUserList;
  if ( v2 )
  {
    SlideListWin::RemoveAllList(v2);
    v3 = v1->m_nCurSelTab == 1;
    v5 = &v4;
    if ( v3 )
      std::vector<SlotJackpotRankInfo,std::allocator<SlotJackpotRankInfo>>::vector<SlotJackpotRankInfo,std::allocator<SlotJackpotRankInfo>>(
        (std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *)&v4,
        (std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *)&v1->m_JackpotRankList);
    else
      std::vector<SlotJackpotRankInfo,std::allocator<SlotJackpotRankInfo>>::vector<SlotJackpotRankInfo,std::allocator<SlotJackpotRankInfo>>(
        (std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *)&v4,
        (std::vector<DiceRankInfo,std::allocator<DiceRankInfo> > *)&v1->m_WinRankList);
    GBSlotRankWin::UpdateList(v1, v4);
    SlideBar::SetSplitCnt(v1->m_pkSlideBarEx, 0);
  }
}

//----- (00728110) --------------------------------------------------------
void __thiscall GBSlotRankWin::OnCommand(GBSlotRankWin *this, unsigned int wParam, int lParam)
{
  GBSlotRankWin *v3; // ebx@1
  MHDiceGameTask *v4; // edi@2
  void (__thiscall ***v5)(_DWORD, _DWORD); // esi@3
  MHDiceGameTask *v6; // edi@10
  MHDiceGameTask *v7; // esi@11
  MHDiceGameTask *v8; // ecx@19
  MHDiceGameTask *v9; // esi@20
  NiPointer<MHDiceGameTask> v10; // [sp+10h] [bp-14h]@19
  NiPointer<MHDiceGameTask> result; // [sp+14h] [bp-10h]@10
  int v12; // [sp+20h] [bp-4h]@19

  v3 = this;
  switch ( wParam )
  {
    case 0u:
      v4 = MHDiceGameTask::GetDiceGameTask((NiPointer<MHDiceGameTask> *)&wParam)->m_pObject;
      if ( wParam )
      {
        v5 = (void (__thiscall ***)(_DWORD, _DWORD))wParam;
        if ( !InterlockedDecrement((volatile LONG *)(wParam + 4)) )
        {
          if ( v5 )
            (**v5)(v5, 1);
        }
      }
      if ( v4 && MHDiceGameTask::IsGambleMode(v4) )
        MHDiceGameTask::NcGambleSlotmachineJackpotRankReq(v4);
      else
        GBSlotRankWin::OnTAB1(v3);
      break;
    case 1u:
      v6 = MHDiceGameTask::GetDiceGameTask(&result)->m_pObject;
      if ( result.m_pObject )
      {
        v7 = result.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
        {
          if ( v7 )
            v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
        }
      }
      if ( v6 && MHDiceGameTask::IsGambleMode(v6) )
        MHDiceGameTask::NcGambleSlotmachineWinRankReq(v6);
      else
        GBSlotRankWin::OnTAB2(v3);
      break;
    case 2u:
      GBSlotRankWin::OnSlideBar(this);
      break;
    case 4u:
    case 5u:
      v8 = MHDiceGameTask::GetDiceGameTask(&v10)->m_pObject;
      v12 = 0;
      MHDiceGameTask::OnCloseWin((PgWin *)&v3->vfptr);
      v12 = -1;
      if ( v10.m_pObject )
      {
        v9 = v10.m_pObject;
        if ( !InterlockedDecrement((volatile LONG *)&v10.m_pObject->m_uiRefCount) )
        {
          if ( v9 )
            v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
        }
      }
      break;
    default:
      return;
  }
}

//----- (007282D0) --------------------------------------------------------
char __thiscall GBSlotRankWin::Create(GBSlotRankWin *this, PgFrameWork *pkFrameWork)
{
  GBSlotRankWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiNode *v5; // ecx@3
  NiNode *v6; // esi@7
  char result; // al@10
  NiAVObject *v8; // eax@11
  NiTexturingProperty *v9; // eax@11
  NiTexturingProperty *v10; // edi@11
  NiTexturingProperty::Map *v11; // eax@13
  NiSourceTexture *v12; // eax@14
  NiNode *v13; // esi@17
  PgSprData *v14; // eax@21
  NiNode *v15; // esi@24
  int v16; // edi@28
  int v17; // ebx@28
  NiSourceTexture *v18; // eax@28
  PgSprData *v19; // eax@29
  PgFont *v20; // eax@32
  PgWinText *v21; // eax@32
  NiRefObjectVtbl *v22; // edx@32
  NiUnsharedGeometryGroup *v23; // eax@32
  D3DXCOLOR v24; // ST48_16@32
  char *v25; // eax@32
  SLWCreateInfo::Item *v26; // eax@32
  PgSprData *v27; // eax@32
  SlideListWin *v28; // eax@32
  PgSprData *v29; // eax@32
  SlideBar *v30; // eax@32
  PgWinBut *v31; // ecx@32
  int (*v32)(void); // edx@32
  int v33; // eax@32
  int v34; // eax@32
  float v35; // ecx@32
  PgWinText *v36; // eax@32
  PgFont *v37; // eax@32
  PgWinText *v38; // eax@32
  NiRefObjectVtbl *v39; // edx@32
  NiUnsharedGeometryGroup *v40; // eax@32
  ColumnBut *v41; // eax@32
  PgWinText *v42; // edx@32
  int v43; // eax@32
  NiSourceTexture *v44; // edx@32
  PgFont *v45; // eax@32
  PgWinText *v46; // eax@32
  NiRefObjectVtbl *v47; // edx@32
  NiUnsharedGeometryGroup *v48; // eax@32
  PgFont *v49; // eax@35
  NiUnsharedGeometryGroup *v50; // eax@35
  PgFont *v51; // eax@36
  PgWinText *v52; // eax@36
  PgWinBut *v53; // ecx@36
  NiUnsharedGeometryGroup *v54; // eax@36
  PgFont *v55; // eax@37
  PgWinText *v56; // eax@37
  NiRefObjectVtbl *v57; // edi@37
  NiUnsharedGeometryGroup *v58; // eax@37
  SLWCreateInfo kCreateInfo; // [sp+6Ch] [bp-80h]@32
  UIUtil ui; // [sp+88h] [bp-64h]@28
  NiPointer<NiTexturingProperty> spTexProp; // [sp+9Ch] [bp-50h]@11
  NiSourceTexture *pkTexture; // [sp+A0h] [bp-4Ch]@14
  unsigned int uiHeight; // [sp+A4h] [bp-48h]@31
  unsigned int uiWidth; // [sp+A8h] [bp-44h]@31
  PgWinBut *pkBtn; // [sp+ACh] [bp-40h]@32
  int uiTop; // [sp+B0h] [bp-3Ch]@21
  int uiLeft; // [sp+B4h] [bp-38h]@21
  NiPointer<NiNode> spNode; // [sp+B8h] [bp-34h]@1
  PgWinText *pkTextWin; // [sp+BCh] [bp-30h]@32
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Val; // [sp+C0h] [bp-2Ch]@32
  int v71; // [sp+E8h] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v71 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\DiceGameHallOfFame.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = spNode.m_pObject;
  if ( !spNode.m_pObject )
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("Game\\DiceGameHallOfFame.nif load fail", "LoadFail", spNode.m_pObject);
      v5 = spNode.m_pObject;
    }
    v71 = -1;
    if ( v5 )
    {
      v6 = v5;
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    return 0;
  }
  v2->m_pkFrameWork = pkFrameWork;
  v8 = (NiAVObject *)((int (__stdcall *)(const char *))v5->vfptr[18].__vecDelDtor)("Frame");
  v9 = (NiTexturingProperty *)NiAVObject::GetProperty(v8, 8);
  v10 = v9;
  spTexProp.m_pObject = v9;
  if ( v9 )
    InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  v11 = *v10->m_kMaps.m_pBase;
  LOBYTE(v71) = 1;
  if ( v11 && (v12 = (NiSourceTexture *)v11->m_spTexture.m_pObject, (pkTexture = v12) != 0) )
  {
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v12);
    if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v14, 0, pkFrameWork, "SlotRank", 0) )
    {
      v16 = uiLeft;
      v17 = uiTop;
      UIUtil::UIUtil(&ui);
      LOBYTE(v71) = 2;
      UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
      UIUtil::SetOffset(&ui, v16, v17);
      UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
      v18 = MenuTexMgr::GetTexture(0x13u);
      if ( v18 )
        v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v18);
      else
        v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
      PgWinSpr::CreateWin(uiLeft - v16, uiTop - v17, v19, (PgWin *)&v2->vfptr, 0, 0);
      UIUtil::CreateSpr(&ui, "Panel01", 0);
      UIUtil::CreateSpr(&ui, "Panel02", 0);
      UIUtil::CreateSpr(&ui, "Panel03", 0);
      UIUtil::CreateSpr(&ui, "Plane01", 0);
      if ( PgUtil::GetTriShapeRect(
             (NiAVObject *)&spNode.m_pObject->vfptr,
             "WinTitle",
             &uiLeft,
             &uiTop,
             &uiWidth,
             &uiHeight) )
      {
        v20 = Font::Get(MAIN_MENU);
        v21 = PgWinText::CreateWin(uiLeft - v16, uiTop - v17, uiWidth, uiHeight, v20, (PgWin *)&v2->vfptr, 0, 0);
        v22 = v21->vfptr;
        pkTextWin = v21;
        v22[122].__vecDelDtor((NiRefObject *)v21, 1u);
        pkBtn = (PgWinBut *)pkTextWin->vfptr;
        v23 = TextData2::Get(0x38956697u);
        ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))LODWORD(pkBtn[1].m_kWorld.m_Translate.z))(
          pkTextWin,
          v23);
        ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
        pkBtn = UIUtil::CreateBtn(&ui, 5u, "Btn01Nor", "Btn01Click", "Btn01Over", 0, 0);
        *(_QWORD *)&v24.r = *(_QWORD *)&Color::m_kDxWhiteColor.r;
        *(_QWORD *)&v24.b = *(_QWORD *)&Color::m_kDxWhiteColor.b;
        v25 = (char *)TextData::Get(0x4F5F499Fu);
        UIUtil::CreateAttachedText((PgWin *)&pkBtn->vfptr, v25, v24, 5u);
        UIUtil::CreateBtn(&ui, 4u, "ClsNor", "ClsClick", "ClsOver", 0, 0);
        kCreateInfo.m_arrItem._Myfirst = 0;
        kCreateInfo.m_arrItem._Mylast = 0;
        kCreateInfo.m_arrItem._Myend = 0;
        kCreateInfo.m_bMakeData = 0;
        kCreateInfo.m_nOffX = 0;
        kCreateInfo.m_nOffY = 0;
        LOBYTE(v71) = 3;
        v26 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
        v26->nItemType = 1;
        v26->pNode = spNode.m_pObject;
        pkTextWin = (PgWinText *)v26;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
          &_Val,
          "ColumnBarNor");
        LOBYTE(v71) = 4;
        pkBtn = (PgWinBut *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2];
        std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
          (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
          &_Val);
        LOBYTE(v71) = 3;
        std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
          &_Val,
          "ColumnBarOver");
        LOBYTE(v71) = 5;
        std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
          (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)pkBtn,
          &_Val);
        LOBYTE(v71) = 3;
        std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
        pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
        pkTextWin->vfptr = (NiRefObjectVtbl *)2;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
          &_Val,
          "Column01");
        LOBYTE(v71) = 6;
        std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
          (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
          &_Val);
        LOBYTE(v71) = 3;
        std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
        pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
        pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
        pkTextWin->vfptr = (NiRefObjectVtbl *)2;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
          &_Val,
          "Column02");
        LOBYTE(v71) = 7;
        std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
          (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
          &_Val);
        LOBYTE(v71) = 3;
        std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
        pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
        pkTextWin = (PgWinText *)SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
        pkTextWin->vfptr = (NiRefObjectVtbl *)2;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
          &_Val,
          "Column03");
        LOBYTE(v71) = 8;
        std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
          (std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *)&pkTextWin->m_kLocal.m_Rotate.m_pEntry[1][2],
          &_Val);
        LOBYTE(v71) = 3;
        std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&_Val);
        pkTextWin->m_uiRefCount = (unsigned int)spNode.m_pObject;
        kCreateInfo.m_nOffX = 3;
        kCreateInfo.m_nOffY = 0;
        SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
        v27 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "TextBox", &uiLeft, &uiTop, pkTexture);
        v28 = SlideListWin::CreateWin(uiLeft - v16, uiTop - v17, v27, (PgWin *)&v2->vfptr, &kCreateInfo, 0, 0);
        v2->m_pUserList = v28;
        v28->m_uiLClickMsg = 3;
        SlideListWin::AlignText(v2->m_pUserList, 0);
        SlideListWin::UpdateViewList(v2->m_pUserList);
        v29 = PgSprData::Create(
                (NiAVObject *)&spNode.m_pObject->vfptr,
                "SlideBar_SlideBtnMiddle",
                &uiLeft,
                &uiTop,
                pkTexture);
        v30 = SlideBar::CreateWin(
                spNode.m_pObject,
                "SlideBar",
                "SlideBar_UpBtn",
                "SlideBar_DnBtn",
                v29,
                0,
                (PgWin *)&v2->vfptr);
        v2->m_pkSlideBarEx = v30;
        v30->m_uiClickMsg = 2;
        v2->m_pkSlideBarEx->m_eType = 1;
        v31 = (PgWinBut *)v2->m_pkSlideBarEx;
        v32 = (int (*)(void))v2->m_pkSlideBarEx->vfptr[42].__vecDelDtor;
        pkTextWin = (PgWinText *)v2->m_pkSlideBarEx->vfptr;
        pkBtn = v31;
        v33 = v32();
        v34 = ((int (__stdcall *)(int))pkBtn->vfptr[41].__vecDelDtor)(v33);
        ((void (__thiscall *)(SlideBar *, int))pkTextWin[1].m_ppkExtra)(v2->m_pkSlideBarEx, v34);
        SlideBar::SetSplitCnt(v2->m_pkSlideBarEx, v2->m_pUserList->m_nSlideSplitCnt);
        pkTextWin = (PgWinText *)PgSprData::Create(
                                   (NiAVObject *)&spNode.m_pObject->vfptr,
                                   "JobTabOff01",
                                   &uiLeft,
                                   &uiTop,
                                   pkTexture);
        PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "JobTabOn01");
        v2->m_pkTab01 = ColumnBut::CreateWin(
                          uiLeft - v16,
                          uiTop - v17,
                          (PgSprData *)pkTextWin,
                          (PgWin *)&v2->vfptr,
                          0,
                          0);
        v35 = pkTextWin->m_kWorldBound.m_kCenter.x;
        v36 = *(PgWinText **)(*(_DWORD *)LODWORD(v35) + 20);
        pkBtn = *(PgWinBut **)(*(_DWORD *)LODWORD(v35) + 24);
        pkTextWin = v36;
        v37 = Font::Get(MAIN_MENU);
        v38 = PgWinText::CreateWin(
                uiLeft - v16,
                uiTop - v17 + 1,
                (unsigned int)pkTextWin,
                (unsigned int)pkBtn,
                v37,
                (PgWin *)&v2->vfptr,
                0,
                0);
        v39 = v38->vfptr;
        pkTextWin = v38;
        v39[122].__vecDelDtor((NiRefObject *)v38, 5u);
        pkBtn = (PgWinBut *)pkTextWin->vfptr;
        v40 = TextData2::Get(0x80FBD6CE);
        ((void (__thiscall *)(PgWinText *, NiUnsharedGeometryGroup *))LODWORD(pkBtn[1].m_kWorld.m_Translate.z))(
          pkTextWin,
          v40);
        ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
        pkTextWin = (PgWinText *)PgSprData::Create(
                                   (NiAVObject *)&spNode.m_pObject->vfptr,
                                   "JobTabOff02",
                                   &uiLeft,
                                   &uiTop,
                                   pkTexture);
        PgSprData::Add((PgSprData *)pkTextWin, (NiAVObject *)&spNode.m_pObject->vfptr, "JobTabOn02");
        v41 = ColumnBut::CreateWin(uiLeft - v16, uiTop - v17, (PgSprData *)pkTextWin, (PgWin *)&v2->vfptr, 1u, 0);
        v42 = pkTextWin;
        v2->m_pkTab02 = v41;
        v43 = *(_DWORD *)LODWORD(v42->m_kWorldBound.m_kCenter.x);
        v44 = *(NiSourceTexture **)(v43 + 20);
        pkBtn = *(PgWinBut **)(v43 + 24);
        pkTexture = v44;
        v45 = Font::Get(MAIN_MENU);
        v46 = PgWinText::CreateWin(
                uiLeft - v16,
                uiTop - v17 + 1,
                (unsigned int)pkTexture,
                (unsigned int)pkBtn,
                v45,
                (PgWin *)&v2->vfptr,
                0,
                0);
        v47 = v46->vfptr;
        pkTextWin = v46;
        v47[122].__vecDelDtor((NiRefObject *)v46, 5u);
        pkBtn = (PgWinBut *)pkTextWin->vfptr;
        v48 = TextData2::Get(0x41382D9Eu);
        ((void (__thiscall *)(_DWORD, _DWORD))LODWORD(pkBtn[1].m_kWorld.m_Translate.z))(pkTextWin, v48);
        ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
        if ( PgUtil::GetTriShapeRect(
               (NiAVObject *)&spNode.m_pObject->vfptr,
               "Text01",
               &uiLeft,
               &uiTop,
               &uiWidth,
               &uiHeight) )
        {
          v49 = Font::Get(SMALL);
          pkTextWin = PgWinText::CreateWin(uiLeft - v16, uiTop - v17, uiWidth, uiHeight, v49, (PgWin *)&v2->vfptr, 0, 0);
          pkBtn = (PgWinBut *)pkTextWin->vfptr;
          v50 = TextData::Get(0x91B1F3ED);
          ((void (__thiscall *)(_DWORD, _DWORD))LODWORD(pkBtn[1].m_kWorld.m_Translate.z))(pkTextWin, v50);
          ((void (__stdcall *)(signed int))pkTextWin->vfptr[122].__vecDelDtor)(5);
          ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
          if ( PgUtil::GetTriShapeRect(
                 (NiAVObject *)&spNode.m_pObject->vfptr,
                 "Text02",
                 &uiLeft,
                 &uiTop,
                 &uiWidth,
                 &uiHeight) )
          {
            v51 = Font::Get(SMALL);
            v52 = PgWinText::CreateWin(uiLeft - v16, uiTop - v17, uiWidth, uiHeight, v51, (PgWin *)&v2->vfptr, 0, 0);
            v53 = (PgWinBut *)v52->vfptr;
            pkTextWin = v52;
            pkBtn = v53;
            v54 = TextData::Get(0x1F4282A9u);
            ((void (__thiscall *)(_DWORD, _DWORD))LODWORD(pkBtn[1].m_kWorld.m_Translate.z))(pkTextWin, v54);
            ((void (__stdcall *)(signed int))pkTextWin->vfptr[122].__vecDelDtor)(5);
            ((void (__stdcall *)(_DWORD))pkTextWin->vfptr[60].__vecDelDtor)(0);
            if ( PgUtil::GetTriShapeRect(
                   (NiAVObject *)&spNode.m_pObject->vfptr,
                   "Text03",
                   &uiLeft,
                   &uiTop,
                   &uiWidth,
                   &uiHeight) )
            {
              v55 = Font::Get(SMALL);
              v56 = PgWinText::CreateWin(uiLeft - v16, uiTop - v17, uiWidth, uiHeight, v55, (PgWin *)&v2->vfptr, 0, 0);
              v2->m_pkTabText = v56;
              v57 = v56->vfptr;
              v58 = TextData2::Get(0xD75E3C3E);
              v57[118].__vecDelDtor((NiRefObject *)v2->m_pkTabText, (unsigned int)v58);
              ((void (__stdcall *)(signed int))v2->m_pkTabText->vfptr[122].__vecDelDtor)(5);
              ((void (__stdcall *)(_DWORD))v2->m_pkTabText->vfptr[60].__vecDelDtor)(0);
              ((void (__thiscall *)(GBSlotRankWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
                v2,
                PgWin::ms_uiScreenWidth,
                PgWin::ms_uiScreenHeight,
                0.40000001,
                0.5);
              v2->m_pkTab01->m_bCheck = 1;
              v2->m_pkTab02->m_bCheck = 0;
              v2->m_nCurSelTab = 1;
              LOBYTE(v71) = 2;
              SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
              LOBYTE(v71) = 1;
              UIUtil::~UIUtil(&ui);
              LOBYTE(v71) = 0;
              NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
              v71 = -1;
              NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
              return 1;
            }
          }
        }
        LOBYTE(v71) = 2;
        SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
      }
      LOBYTE(v71) = 1;
      UIUtil::~UIUtil(&ui);
      LOBYTE(v71) = 0;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
      v71 = -1;
      NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
      return 0;
    }
    LOBYTE(v71) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    v15 = spNode.m_pObject;
    v71 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v15 )
      return 0;
    v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
    result = 0;
  }
  else
  {
    LOBYTE(v71) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    v13 = spNode.m_pObject;
    v71 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v13 )
      return 0;
    v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
    result = 0;
  }
  return result;
}
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00728D60) --------------------------------------------------------
char __thiscall GBSlotHelpWin::Create(GBSlotHelpWin *this, PgFrameWork *pkFrameWork)
{
  GBSlotHelpWin *v2; // esi@1
  NiTexturePalette *v3; // edi@1
  const char *v4; // eax@3
  NiNode *v5; // ecx@3
  NiNode *v6; // esi@7
  char result; // al@10
  NiAVObject *v8; // eax@11
  NiTexturingProperty *v9; // eax@11
  NiTexturingProperty *v10; // edi@11
  NiTexturingProperty::Map *v11; // eax@13
  NiSourceTexture *v12; // eax@14
  NiNode *v13; // esi@17
  PgSprData *v14; // eax@21
  NiNode *v15; // esi@24
  int v16; // edi@28
  int v17; // ebx@28
  NiSourceTexture *v18; // eax@28
  PgSprData *v19; // eax@29
  PgFont *v20; // eax@33
  PgWinText *v21; // edi@33
  NiRefObjectVtbl *v22; // ebx@33
  NiUnsharedGeometryGroup *v23; // eax@33
  SLWCreateInfo::Item *v24; // ebx@33
  SLWCreateInfo::Item *v25; // ebx@33
  PgSprData *v26; // eax@33
  SlideListWin *v27; // eax@33
  NiUnsharedGeometryGroup *v28; // eax@34
  NiUnsharedGeometryGroup *v29; // eax@34
  NiUnsharedGeometryGroup *v30; // eax@34
  NiUnsharedGeometryGroup *v31; // eax@34
  NiUnsharedGeometryGroup *v32; // eax@34
  NiUnsharedGeometryGroup *v33; // eax@34
  NiUnsharedGeometryGroup *v34; // eax@34
  NiUnsharedGeometryGroup *v35; // eax@34
  NiUnsharedGeometryGroup *v36; // eax@34
  NiUnsharedGeometryGroup *v37; // eax@34
  NiUnsharedGeometryGroup *v38; // eax@34
  NiUnsharedGeometryGroup *v39; // eax@34
  NiUnsharedGeometryGroup *v40; // eax@34
  NiUnsharedGeometryGroup *v41; // eax@34
  NiUnsharedGeometryGroup *v42; // eax@34
  NiUnsharedGeometryGroup *v43; // eax@34
  NiUnsharedGeometryGroup *v44; // eax@34
  char *v45; // edi@35
  int v46; // eax@37
  unsigned int v47; // ebx@37
  unsigned int v48; // eax@37
  unsigned int v49; // edi@41
  const void *v50; // eax@43
  SlideListWin *v51; // ecx@45
  PgSprData *v52; // eax@49
  SlideBar *v53; // eax@49
  SLWCreateInfo kCreateInfo; // [sp+28h] [bp-288h]@33
  UIUtil ui; // [sp+44h] [bp-26Ch]@28
  unsigned int found; // [sp+58h] [bp-258h]@37
  unsigned int uiHeight; // [sp+5Ch] [bp-254h]@31
  unsigned int uiWidth; // [sp+60h] [bp-250h]@31
  NiPointer<NiTexturingProperty> spTexProp; // [sp+64h] [bp-24Ch]@11
  HDC__ *hDC; // [sp+68h] [bp-248h]@28
  PgWinText *pkTestWin; // [sp+6Ch] [bp-244h]@28
  char _Ptr; // [sp+70h] [bp-240h]@34
  int lengthSize; // [sp+74h] [bp-23Ch]@14
  int uiLeft; // [sp+78h] [bp-238h]@21
  int uiTop; // [sp+7Ch] [bp-234h]@21
  NiPointer<NiNode> spNode; // [sp+80h] [bp-230h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strText; // [sp+84h] [bp-22Ch]@33
  char acStr[256]; // [sp+A0h] [bp-210h]@34
  char buffer[256]; // [sp+1A0h] [bp-110h]@41
  int v70; // [sp+2ACh] [bp-4h]@1

  v2 = this;
  spNode.m_pObject = 0;
  v3 = pTexturePalette;
  v70 = 0;
  if ( !Folder::m_bInit )
    Folder::Init();
  v4 = Folder::Merge(&Folder::m_acMenu, "Game\\DiceGameHelp.nif");
  PgUtil::LoadNodeNifFile(v4, &spNode, v3);
  v5 = spNode.m_pObject;
  if ( !spNode.m_pObject )
  {
    if ( NiMessageBox::ms_pfnMessageBox )
    {
      NiMessageBox::ms_pfnMessageBox("Game\\DiceGameHelp.nif load fail", "LoadFail", spNode.m_pObject);
      v5 = spNode.m_pObject;
    }
    v70 = -1;
    if ( v5 )
    {
      v6 = v5;
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
    }
    return 0;
  }
  v2->m_pkFrameWork = pkFrameWork;
  v8 = (NiAVObject *)((int (__stdcall *)(const char *))v5->vfptr[18].__vecDelDtor)("Frame");
  v9 = (NiTexturingProperty *)NiAVObject::GetProperty(v8, 8);
  v10 = v9;
  spTexProp.m_pObject = v9;
  if ( v9 )
    InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  v11 = *v10->m_kMaps.m_pBase;
  LOBYTE(v70) = 1;
  if ( v11 && (v12 = (NiSourceTexture *)v11->m_spTexture.m_pObject, (lengthSize = (int)v12) != 0) )
  {
    v14 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Frame", &uiLeft, &uiTop, v12);
    if ( PgWinFrame::Create((PgWinFrame *)&v2->vfptr, 0, 0, v14, 0, pkFrameWork, "SlotHelp", 0) )
    {
      v16 = uiLeft;
      v17 = uiTop;
      pkTestWin = (PgWinText *)uiLeft;
      hDC = (HDC__ *)uiTop;
      UIUtil::UIUtil(&ui);
      LOBYTE(v70) = 2;
      UIUtil::SetParent(&ui, (PgWin *)&v2->vfptr);
      UIUtil::SetOffset(&ui, v16, v17);
      UIUtil::SetUIGeom(&ui, (NiAVObject *)&spNode.m_pObject->vfptr);
      v18 = MenuTexMgr::GetTexture(0x13u);
      if ( v18 )
        v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, v18);
      else
        v19 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "Theme", &uiLeft, &uiTop, 0);
      PgWinSpr::CreateWin(uiLeft - v16, uiTop - v17, v19, (PgWin *)&v2->vfptr, 0, 0);
      UIUtil::CreateSpr(&ui, "Panel01", 0);
      UIUtil::CreateSpr(&ui, "Panel02", 0);
      if ( PgUtil::GetTriShapeRect(
             (NiAVObject *)&spNode.m_pObject->vfptr,
             "WinTitle",
             &uiLeft,
             &uiTop,
             &uiWidth,
             &uiHeight) )
      {
        v20 = Font::Get(MAIN_MENU);
        v21 = PgWinText::CreateWin(uiLeft - v16, uiTop - v17, uiWidth, uiHeight, v20, (PgWin *)&v2->vfptr, 0, 0);
        v21->vfptr[122].__vecDelDtor((NiRefObject *)v21, 5u);
        v22 = v21->vfptr;
        v23 = TextData2::Get(0x34361593u);
        v22[118].__vecDelDtor((NiRefObject *)v21, (unsigned int)v23);
        v21->vfptr[60].__vecDelDtor((NiRefObject *)v21, 0);
        UIUtil::CreateBtn(&ui, 1u, "ClsNor", "ClsClick", "ClsOver", 0, 0);
        kCreateInfo.m_arrItem._Myfirst = 0;
        kCreateInfo.m_arrItem._Mylast = 0;
        kCreateInfo.m_arrItem._Myend = 0;
        kCreateInfo.m_bMakeData = 0;
        kCreateInfo.m_nOffX = 0;
        kCreateInfo.m_nOffY = 0;
        LOBYTE(v70) = 3;
        SLWCreateInfo::Clear(&kCreateInfo);
        v24 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 1);
        v24->nItemType = 1;
        v24->pNode = spNode.m_pObject;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
          &strText,
          "Column01");
        LOBYTE(v70) = 4;
        std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
          &v24->vecNodeName,
          &strText);
        LOBYTE(v70) = 3;
        std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&strText);
        v25 = SLWCreateInfo::AddItemInfo(&kCreateInfo, 2);
        v25->nItemType = 2;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(
          &strText,
          "Column01");
        LOBYTE(v70) = 5;
        std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>::push_back(
          &v25->vecNodeName,
          &strText);
        LOBYTE(v70) = 3;
        std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&strText);
        v25->pNode = spNode.m_pObject;
        SLWCreateInfo::MakeTempData(&kCreateInfo, 0);
        v26 = PgSprData::Create(
                (NiAVObject *)&spNode.m_pObject->vfptr,
                "Plane01",
                &uiLeft,
                &uiTop,
                (NiSourceTexture *)lengthSize);
        v27 = SlideListWin::CreateWin(
                uiLeft - (_DWORD)pkTestWin + 20,
                uiTop - (_DWORD)hDC + 50,
                v26,
                (PgWin *)&v2->vfptr,
                &kCreateInfo,
                0,
                0);
        v2->m_pListWin = v27;
        if ( v27 )
        {
          strText._Myres = 15;
          strText._Mysize = 0;
          strText._Bx._Buf[0] = 0;
          LOBYTE(v70) = 6;
          v28 = TextData2::Get(0x80D2BEE4);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator=(&strText, (const char *)v28);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
          v29 = TextData2::Get(0x80D3BEE4);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strText, (const char *)v29);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
          v30 = TextData2::Get(0x80D4BEE4);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strText, (const char *)v30);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
          v31 = TextData2::Get(0x80D5BEE4);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strText, (const char *)v31);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
          v32 = TextData2::Get(0x80D6BEE4);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strText, (const char *)v32);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
          v33 = TextData2::Get(0x80D7BEE4);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strText, (const char *)v33);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
          v34 = TextData2::Get(0x80D8BEE4);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strText, (const char *)v34);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
          v35 = TextData2::Get(0x80D9BEE4);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strText, (const char *)v35);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
          v36 = TextData2::Get(0x80DABEE4);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strText, (const char *)v36);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
          v37 = TextData2::Get(0x80D1BFE4);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strText, (const char *)v37);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
          v38 = TextData2::Get(0x80D2BFE4);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strText, (const char *)v38);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
          v39 = TextData2::Get(0x80D3BFE4);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strText, (const char *)v39);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
          v40 = TextData2::Get(0x80D4BFE4);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strText, (const char *)v40);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
          v41 = TextData2::Get(0x80D5BFE4);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strText, (const char *)v41);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
          v42 = TextData2::Get(0x80D6BFE4);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strText, (const char *)v42);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
          v43 = TextData2::Get(0x80D7BFE4);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strText, (const char *)v43);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, "\n", 1u);
          v44 = TextData2::Get(0x80D8BFE4);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(&strText, (const char *)v44);
          std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strText, byte_9CDC3C, 0);
          acStr[0] = 0;
          memset(&acStr[1], 0, 0xFFu);
          pkTestWin = SlideListWin::GetTextWin(v2->m_pListWin, 0, 0);
          hDC = *(HDC__ **)(((int (__thiscall *)(PgWinText *))v21->vfptr[114].__vecDelDtor)(v21) + 192);
          _Ptr = 10;
          while ( 1 )
          {
            memset(acStr, 0, 0x100u);
            v45 = strText._Bx._Ptr;
            if ( strText._Myres < 0x10 )
              v45 = (char *)&strText;
            v46 = ((int (*)(void))pkTestWin->vfptr[36].__vecDelDtor)();
            v47 = PgUtil::StringPixelCopy(acStr, v45, hDC, v46);
            v48 = std::basic_string<char,std::char_traits<char>,std::allocator<char>>::find(&strText, &_Ptr, 0, 1u);
            found = v48;
            if ( !v47 )
              break;
            if ( v48 >= v47 || (lengthSize = v48, v48 == -1) )
              lengthSize = v47;
            buffer[0] = 0;
            memset(&buffer[1], 0, 0xFFu);
            v49 = lengthSize;
            if ( strText._Mysize < lengthSize )
              v49 = strText._Mysize;
            v50 = strText._Bx._Ptr;
            if ( strText._Myres < 0x10 )
              v50 = &strText;
            memcpy_s(buffer, 0xFFu, v50, v49);
            v51 = v2->m_pListWin;
            buffer[v49] = 0;
            SlideListWin::AddText(v51, buffer);
            SlideListWin::AddText(v2->m_pListWin, byte_9CD42A);
            if ( found > v47 )
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::erase(&strText, 0, lengthSize);
            else
              std::basic_string<char,std::char_traits<char>,std::allocator<char>>::erase(&strText, 0, lengthSize + 1);
          }
          v2->m_pListWin->m_bCheckEnable = 0;
          SlideListWin::AlignText(v2->m_pListWin, 4u);
          SlideListWin::UpdateViewList(v2->m_pListWin);
          LOBYTE(v70) = 3;
          std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,CAbstractProperty *>((std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *> *)&strText);
        }
        v52 = PgSprData::Create((NiAVObject *)&spNode.m_pObject->vfptr, "SlideBar_SlideBtnMiddle", &uiLeft, &uiTop, 0);
        v53 = SlideBar::CreateWin(
                spNode.m_pObject,
                "SlideBar",
                "SlideBar_UpBtn",
                "SlideBar_DnBtn",
                v52,
                0,
                (PgWin *)&v2->vfptr);
        v2->m_pSlideBar = v53;
        v53->m_uiClickMsg = 2;
        v2->m_pSlideBar->m_eType = 1;
        SlideBar::SetSplitCnt(v2->m_pSlideBar, v2->m_pListWin->m_nSlideSplitCnt);
        ((void (__thiscall *)(GBSlotHelpWin *, unsigned int, unsigned int, _DWORD, _DWORD))v2->vfptr[59].__vecDelDtor)(
          v2,
          PgWin::ms_uiScreenWidth,
          PgWin::ms_uiScreenHeight,
          0.1,
          0.30000001);
        LOBYTE(v70) = 2;
        SLWCreateInfo::~SLWCreateInfo(&kCreateInfo);
        LOBYTE(v70) = 1;
        UIUtil::~UIUtil(&ui);
        LOBYTE(v70) = 0;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
        v70 = -1;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
        result = 1;
      }
      else
      {
        LOBYTE(v70) = 1;
        UIUtil::~UIUtil(&ui);
        LOBYTE(v70) = 0;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spTexProp);
        v70 = -1;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spNode);
        result = 0;
      }
    }
    else
    {
      LOBYTE(v70) = 0;
      if ( !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) )
        v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
      v15 = spNode.m_pObject;
      v70 = -1;
      if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v15 )
        return 0;
      v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
      result = 0;
    }
  }
  else
  {
    LOBYTE(v70) = 0;
    if ( !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    v13 = spNode.m_pObject;
    v70 = -1;
    if ( !spNode.m_pObject || InterlockedDecrement((volatile LONG *)&spNode.m_pObject->m_uiRefCount) || !v13 )
      return 0;
    v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
    result = 0;
  }
  return result;
}
// A80174: using guessed type int (__cdecl *NiMessageBox::ms_pfnMessageBox)(_DWORD, _DWORD, _DWORD);
// A8975C: using guessed type bool Folder::m_bInit;

//----- (00729860) --------------------------------------------------------
void __thiscall GBSlotRankWin::OnSlideBar(GBSlotRankWin *this)
{
  GBSlotRankWin *v1; // esi@1
  SlideListWin *v2; // eax@1
  SlideBar *v3; // ecx@2

  v1 = this;
  v2 = this->m_pUserList;
  if ( v2 )
  {
    v3 = this->m_pkSlideBarEx;
    if ( v3 )
    {
      SlideBar::SetSplitCnt(v3, v2->m_nSlideSplitCnt);
      v1->m_pUserList->m_nViewStartPos = v1->m_pkSlideBarEx->m_nCurPos;
      SlideListWin::UpdateViewList(v1->m_pUserList);
    }
  }
}

//----- (007298B0) --------------------------------------------------------
void __thiscall SlotEntry::SlotEntry(SlotEntry *this)
{
  SlotEntry *v1; // esi@1
  PgWinSpr *v2; // edi@1

  v1 = this;
  this->_DiceTimer.m_fStartTime = 0.0;
  this->_DiceTimer.m_fObjectTime = 0.0;
  this->_DiceTimer.m_fElapsedTime = 0.0;
  this->ms_kSpr.m_pObject = 0;
  this->cHeightInTex = 0.11111111;
  v2 = this->ms_kSpr.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->ms_kSpr.m_pObject = 0;
  }
  v1->_iCurID = 1;
}

//----- (00729940) --------------------------------------------------------
void __thiscall SlotEntry::~SlotEntry(SlotEntry *this)
{
  PgWinSpr *v1; // esi@1

  v1 = this->ms_kSpr.m_pObject;
  if ( v1 && !InterlockedDecrement((volatile LONG *)&v1->m_uiRefCount) )
  {
    if ( v1 )
      v1->vfptr->__vecDelDtor((NiRefObject *)v1, 1u);
  }
}

//----- (00729970) --------------------------------------------------------
MiniSlotMachineWin *__thiscall MiniSlotMachineWin::`vector deleting destructor'(MiniSlotMachineWin *this, unsigned int a2)
{
  MiniSlotMachineWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&MiniSlotMachineWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&MiniSlotMachineWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9CDC88: using guessed type void (__thiscall *MiniSlotMachineWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CDCA4: using guessed type int (__thiscall *MiniSlotMachineWin::`vftable'{for `NiNode'})(void *p, char);

//----- (007299B0) --------------------------------------------------------
GBSlotHelpWin *__thiscall GBSlotHelpWin::`vector deleting destructor'(GBSlotHelpWin *this, unsigned int a2)
{
  GBSlotHelpWin *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&GBSlotHelpWin::`vftable'{for `NiNode'};
  this->vfptr = (IDirectMessengerVtbl *)&GBSlotHelpWin::`vftable'{for `IDirectMessenger'};
  PgWinFrame::~PgWinFrame((PgWinFrame *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9CDEC8: using guessed type void (__thiscall *GBSlotHelpWin::`vftable'{for `IDirectMessenger'})(NiD3DShaderProgramCreatorAsm *this, unsigned int);
// 9CDEE4: using guessed type int (__thiscall *GBSlotHelpWin::`vftable'{for `NiNode'})(void *p, char);

//----- (007299F0) --------------------------------------------------------
SlotMachineWin *__thiscall SlotMachineWin::`vector deleting destructor'(SlotMachineWin *this, unsigned int a2)
{
  SlotMachineWin *v2; // esi@1

  v2 = this;
  SlotMachineWin::~SlotMachineWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00729A20) --------------------------------------------------------
void __thiscall mhDiceRankWin::ProcessMeInput(ChatBlockListWin *this, bool *bHit)
{
  ChatBlockListWin *v2; // esi@1

  v2 = this;
  if ( (unsigned __int8)((int (*)(void))this->vfptr[78].__vecDelDtor)() )
  {
    if ( dword_B64790 )
      ++dword_B64790;
    if ( PgWin::ms_kbRbutPressed.m_iBool )
      ++PgWin::ms_kbRbutPressed.m_iBool;
    PgWinFrame::ProcessMeInput((PgWinFrame *)&v2->vfptr, bHit);
    PgWin::ms_kbRbutPressed.m_bReserveFalse = 0;
    if ( PgWin::ms_kbRbutPressed.m_iBool )
      --PgWin::ms_kbRbutPressed.m_iBool;
    byte_B6478C = 0;
    if ( dword_B64790 )
      --dword_B64790;
  }
}
// B6478C: using guessed type char byte_B6478C;
// B64790: using guessed type int dword_B64790;

//----- (00729AA0) --------------------------------------------------------
GBSlotRankWin *__thiscall GBSlotRankWin::`vector deleting destructor'(GBSlotRankWin *this, unsigned int a2)
{
  GBSlotRankWin *v2; // esi@1

  v2 = this;
  GBSlotRankWin::~GBSlotRankWin(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00729AD0) --------------------------------------------------------
bool __thiscall MoverSlot::IsView(MoverSlot *this)
{
  MoverSlotView *v1; // eax@1
  bool result; // al@2

  v1 = this->m_pkMoverSlotView;
  if ( v1 )
    result = v1->IsViewChar != 0;
  else
    result = 0;
  return result;
}

//----- (00729AF0) --------------------------------------------------------
void __thiscall Mover::Affect(Mover *this, AbStateInst *pkAbState, bool bNoVisual)
{
  if ( this->m_bAbility )
    Char::Affect((Char *)&this->vfptr, pkAbState, bNoVisual);
}

//----- (00729B10) --------------------------------------------------------
bool __thiscall Mover::IsMoverMovable(Mover *this)
{
  MoverMain *v1; // eax@1
  bool result; // al@2

  v1 = this->m_pkMoverMain;
  if ( v1 )
    result = v1->RunSpeed || v1->WalkSpeed;
  else
    result = 0;
  return result;
}

//----- (00729B40) --------------------------------------------------------
bool __thiscall Mover::IsFeed(Mover *this)
{
  return this->m_bFeed;
}

//----- (00729B50) --------------------------------------------------------
bool __thiscall Mover::IsAbility(Mover *this)
{
  return this->m_bAbility;
}

//----- (00729B60) --------------------------------------------------------
void __thiscall MoverSlot::Act(MoverSlot *this, CharAniType eType)
{
  MoverSlot *v2; // esi@1
  Char *v3; // ecx@1
  MoverSlotView *v4; // eax@2
  NiActorManager *v5; // ebx@4
  MoverSlot::sSlotAniCode *v6; // edi@7
  unsigned int v7; // eax@8
  NiPointer<NiActorManager> spActor; // [sp+20h] [bp-14h]@4
  MoverSlot::sSlotAniCode *pkSlotAniCode; // [sp+24h] [bp-10h]@7
  int v10; // [sp+30h] [bp-4h]@6

  v2 = this;
  v3 = this->m_pkChar;
  if ( v3 )
  {
    v4 = v2->m_pkMoverSlotView;
    if ( v4 )
    {
      if ( v4->IsViewChar )
      {
        v5 = (NiActorManager *)v3->vfptr->GetActor(&v3->vfptr);
        spActor.m_pObject = v5;
        if ( v5 )
          InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
        v10 = 0;
        if ( v5 )
        {
          pkSlotAniCode = 0;
          NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
            (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v2->m_kSlotAni,
            eType,
            (NiVBSet **)&pkSlotAniCode);
          v6 = pkSlotAniCode;
          if ( pkSlotAniCode )
          {
            ((void (__stdcall *)(unsigned int, _DWORD, _DWORD))v2->m_pkChar->vfptr[10].SetAbStateProperty)(
              pkSlotAniCode->m_dwAniCode,
              0,
              0);
            v7 = v6->m_dwLegCode;
            if ( v6->m_dwLegCode )
            {
              if ( v2->m_dwCurLegCode != v7 )
                ((void (__stdcall *)(unsigned int, signed int))v2->m_pkChar->vfptr[10].IsVisible)(v7, 1);
            }
            else
            {
              NiActorManager::DeactivateSequence(v5, v2->m_dwCurLegCode, 0.0);
            }
            v2->m_dwCurLegCode = v6->m_dwLegCode;
          }
        }
        v10 = -1;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spActor);
      }
    }
  }
}

//----- (00729C60) --------------------------------------------------------
void __thiscall MoverSlot::RideOff(MoverSlot *this)
{
  MoverSlot *v1; // edi@1
  Char *v2; // eax@1
  NiActorManager *v3; // esi@2
  unsigned int v4; // eax@5

  v1 = this;
  v2 = this->m_pkChar;
  if ( v2 )
  {
    v3 = (NiActorManager *)((int (*)(void))v2->vfptr->GetActor)();
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
    if ( v3 )
    {
      v4 = v1->m_dwCurLegCode;
      if ( v4 )
      {
        NiActorManager::DeactivateSequence(v3, v4, 0.0);
        v1->m_dwCurLegCode = 0;
      }
      if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
  }
}

//----- (00729D10) --------------------------------------------------------
Char *__thiscall Mover::GetSlotChar(Mover *this, unsigned int uiSlot)
{
  MoverSlot *v2; // eax@2
  Char *result; // eax@3

  if ( uiSlot < this->m_kMoverSlots._Mylast - this->m_kMoverSlots._Myfirst
    && (v2 = this->m_kMoverSlots._Myfirst[uiSlot]) != 0 )
  {
    result = v2->m_pkChar;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00729D50) --------------------------------------------------------
NiPointer<NiNode> *__thiscall Mover::GetSlotNode(Mover *this, NiPointer<NiNode> *result, unsigned int uiSlot)
{
  MoverSlot *v3; // ecx@2
  NiPointer<NiNode> *v4; // eax@3

  if ( uiSlot < this->m_kMoverSlots._Mylast - this->m_kMoverSlots._Myfirst
    && (v3 = this->m_kMoverSlots._Myfirst[uiSlot]) != 0 )
  {
    MoverSlot::GetSlotNode(v3, result);
    v4 = result;
  }
  else
  {
    v4 = result;
    result->m_pObject = 0;
  }
  return v4;
}

//----- (00729DA0) --------------------------------------------------------
void __thiscall Mover::ActSlot(Mover *this, CharAniType eType)
{
  unsigned int v2; // eax@1
  unsigned int v3; // ebx@1
  MoverSlot *v4; // esi@4
  Char *v5; // ecx@5
  MoverSlotView *v6; // eax@6
  int v7; // eax@8
  NiActorManager *v8; // edi@8
  NiVBSet *v9; // ebx@12
  unsigned int v10; // eax@13
  Mover *v11; // [sp+24h] [bp-1Ch]@1
  unsigned int i; // [sp+28h] [bp-18h]@1
  unsigned int uiSize; // [sp+2Ch] [bp-14h]@1
  NiVBSet *val; // [sp+30h] [bp-10h]@12
  int v15; // [sp+3Ch] [bp-4h]@10

  v11 = this;
  v2 = 0;
  v3 = this->m_kMoverSlots._Mylast - this->m_kMoverSlots._Myfirst;
  uiSize = v3;
  i = 0;
  if ( v3 )
  {
    while ( 1 )
    {
      v4 = this->m_kMoverSlots._Myfirst[v2];
      if ( v4 )
      {
        v5 = v4->m_pkChar;
        if ( v5 )
        {
          v6 = v4->m_pkMoverSlotView;
          if ( v6 )
          {
            if ( v6->IsViewChar )
            {
              v7 = v5->vfptr->GetActor(&v5->vfptr);
              v8 = (NiActorManager *)v7;
              if ( v7 )
                InterlockedIncrement((volatile LONG *)(v7 + 4));
              v15 = 0;
              if ( v8 )
              {
                val = 0;
                NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
                  (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v4->m_kSlotAni,
                  eType,
                  &val);
                v9 = val;
                if ( val )
                {
                  ((void (__stdcall *)(unsigned int, _DWORD, _DWORD))v4->m_pkChar->vfptr[10].SetAbStateProperty)(
                    val->m_uiFVF,
                    0,
                    0);
                  v10 = v9->m_uiIndex;
                  if ( v9->m_uiIndex )
                  {
                    if ( v4->m_dwCurLegCode != v10 )
                      ((void (__stdcall *)(unsigned int, signed int))v4->m_pkChar->vfptr[10].IsVisible)(v10, 1);
                  }
                  else
                  {
                    NiActorManager::DeactivateSequence(v8, v4->m_dwCurLegCode, 0.0);
                  }
                  v4->m_dwCurLegCode = v9->m_uiIndex;
                }
                v15 = -1;
                if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
                  v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
                v3 = uiSize;
              }
              else
              {
                v15 = -1;
              }
            }
          }
        }
      }
      v2 = i + 1;
      i = v2;
      if ( v2 >= v3 )
        break;
      this = v11;
    }
  }
}

//----- (00729F00) --------------------------------------------------------
void __thiscall Mover::RideOn(Mover *this, Char *pkChar, unsigned int uiSlot)
{
  Mover *v3; // esi@1
  unsigned int v4; // edi@1
  Char *v5; // ebx@2
  unsigned int v6; // eax@4
  bool v7; // zf@4
  AbStateInfecteeVtbl *v8; // edi@5
  int v9; // eax@5
  MoverSlot *v10; // edi@6
  unsigned int v11; // eax@9
  MoverSlotView *v12; // edi@9
  NiNode *v13; // eax@12
  AbStateInfecteeVtbl *v14; // edi@14
  NiPointer<NiNode> v15; // [sp-Ch] [bp-28h]@12
  unsigned int v16; // [sp-8h] [bp-24h]@12
  unsigned int v17; // [sp-4h] [bp-20h]@9
  int v18; // [sp+18h] [bp-4h]@7

  v3 = this;
  v4 = uiSlot;
  if ( uiSlot < this->m_kMoverSlots._Mylast - this->m_kMoverSlots._Myfirst )
  {
    v5 = pkChar;
    if ( pkChar )
    {
      if ( !uiSlot )
      {
        v6 = Char::GetSpecialEventCode(pkChar);
        v7 = v3->m_bAbility == 0;
        v3->m_uiSpecialEventCode = v6;
        if ( !v7 )
        {
          v8 = v3->vfptr;
          v9 = ((int (__thiscall *)(Char *))v5->vfptr[2].DeleteAbStateByAbstateIndex)(v5);
          ((void (__thiscall *)(Mover *, int))v8[2].GetAbstateColor)(v3, v9);
          v4 = uiSlot;
        }
      }
      v10 = v3->m_kMoverSlots._Myfirst[v4];
      if ( v10 )
      {
        MoverSlot::GetHideNode(v10, (NiPointer<NiNode> *)&pkChar);
        v18 = 0;
        if ( pkChar )
          LOWORD(pkChar->m_kAbStateProperty.iUnAttackableCount) &= 0xFFFEu;
        v11 = uiSlot;
        v10->m_pkChar = v5;
        v12 = v10->m_pkMoverSlotView;
        v17 = v11;
        if ( v12 )
          LOBYTE(uiSlot) = v12->IsViewChar != 0;
        else
          LOBYTE(uiSlot) = 0;
        v13 = v3->m_spCarrierNode.m_pObject;
        v16 = uiSlot;
        uiSlot = (unsigned int)&v15;
        v15.m_pObject = v13;
        if ( v13 )
          InterlockedIncrement((volatile LONG *)&v13->m_uiRefCount);
        Char::RideOn(v5, (Char *)&v3->vfptr, v15, v16, v17);
        v14 = v3->vfptr;
        v17 = ((int (__thiscall *)(Char *))v5->vfptr[2].DeleteAbStateByAbstateIndex)(v5);
        ((void (__thiscall *)(Mover *, unsigned int))v14[2].GetAbstateColor)(v3, v17);
        v18 = -1;
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&pkChar);
      }
      ((void (*)(void))v3->vfptr[10].DeleteAbStateByAbstateIndex)();
    }
  }
}

//----- (0072A040) --------------------------------------------------------
void __thiscall Mover::RideOff(Mover *this, unsigned int uiSlot)
{
  MoverSlot *v2; // esi@2
  unsigned int v3; // edi@3
  Char *v4; // ecx@5

  if ( uiSlot < this->m_kMoverSlots._Mylast - this->m_kMoverSlots._Myfirst )
  {
    v2 = this->m_kMoverSlots._Myfirst[uiSlot];
    if ( v2 )
    {
      MoverSlot::GetHideNode(v2, (NiPointer<NiNode> *)&uiSlot);
      v3 = uiSlot;
      if ( uiSlot )
        *(_WORD *)(uiSlot + 28) |= 1u;
      MoverSlot::RideOff(v2);
      v4 = v2->m_pkChar;
      if ( v4 )
        Char::RideOff(v4);
      v2->m_pkChar = 0;
      if ( v3 )
      {
        if ( !InterlockedDecrement((volatile LONG *)(v3 + 4)) )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v3)(v3, 1);
      }
    }
  }
}

//----- (0072A100) --------------------------------------------------------
void __thiscall Mover::RideAllOff(Mover *this)
{
  unsigned int v1; // ebx@1
  unsigned int v2; // eax@1
  MoverSlot *v3; // esi@3
  NiNode *v4; // edi@4
  Char *v5; // ecx@6
  NiPointer<NiNode> result; // [sp+10h] [bp-18h]@4
  const unsigned int uiSize; // [sp+14h] [bp-14h]@1
  Mover *v8; // [sp+18h] [bp-10h]@1
  int v9; // [sp+24h] [bp-4h]@4

  v8 = this;
  v1 = 0;
  v2 = this->m_kMoverSlots._Mylast - this->m_kMoverSlots._Myfirst;
  uiSize = v2;
  if ( v2 )
  {
    do
    {
      if ( v1 < this->m_kMoverSlots._Mylast - this->m_kMoverSlots._Myfirst )
      {
        v3 = this->m_kMoverSlots._Myfirst[v1];
        if ( v3 )
        {
          MoverSlot::GetHideNode(v3, &result);
          v4 = result.m_pObject;
          v9 = 0;
          if ( result.m_pObject )
            result.m_pObject->m_uFlags |= 1u;
          MoverSlot::RideOff(v3);
          v5 = v3->m_pkChar;
          if ( v5 )
            Char::RideOff(v5);
          v3->m_pkChar = 0;
          v9 = -1;
          if ( v4 )
          {
            if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
              v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
          }
          v2 = uiSize;
          this = v8;
        }
      }
      ++v1;
    }
    while ( v1 < v2 );
  }
}

//----- (0072A1F0) --------------------------------------------------------
AbStateInfectee::AbstateColor __thiscall Mover::GetAbstateColor(Mover *this, unsigned int *a2)
{
  Mover *v2; // ebx@1
  AbStateInfectee::AbstateColor result; // eax@2
  unsigned int v4; // esi@3
  unsigned int v5; // edx@3
  unsigned int v6; // edi@3
  MoverSlot *v7; // eax@4
  Char *v8; // ecx@5
  char v9; // [sp+4h] [bp-4h]@6

  v2 = this;
  if ( this->m_bAbility )
  {
    result.dwRGB = (unsigned int)a2;
    *a2 = this->m_kAbstateColor.dwRGB;
  }
  else
  {
    v4 = this->m_kMoverSlots._Mylast - this->m_kMoverSlots._Myfirst;
    v5 = 0;
    v6 = 0;
    if ( v4 )
    {
      do
      {
        v7 = v2->m_kMoverSlots._Myfirst[v6];
        if ( v7 )
        {
          v8 = v7->m_pkChar;
          if ( v8 )
          {
            v5 = *(_DWORD *)((int (__stdcall *)(char *))v8->vfptr->GetAbstateColor)(&v9);
            if ( v5 )
              break;
          }
        }
        ++v6;
      }
      while ( v6 < v4 );
    }
    result.dwRGB = (unsigned int)a2;
    *a2 = v5;
  }
  return result;
}

//----- (0072A270) --------------------------------------------------------
char __thiscall Mover::IsEmptySlot(Mover *this)
{
  unsigned int v1; // edx@1
  unsigned int v2; // eax@1
  MoverSlot **v3; // esi@2
  char result; // al@6

  v1 = 0;
  v2 = this->m_kMoverSlots._Mylast - this->m_kMoverSlots._Myfirst;
  if ( v2 )
  {
    v3 = this->m_kMoverSlots._Myfirst;
    while ( !*v3 || (*v3)->m_pkChar )
    {
      ++v1;
      ++v3;
      if ( v1 >= v2 )
        goto LABEL_6;
    }
    result = 1;
  }
  else
  {
LABEL_6:
    result = 0;
  }
  return result;
}

//----- (0072A2B0) --------------------------------------------------------
bool __thiscall Mover::IsSlotView(Mover *this, unsigned int uiSlot, bool bEffect)
{
  MoverSlot *v3; // eax@2
  bool result; // al@5
  MoverSlotView *v5; // eax@6

  if ( uiSlot >= this->m_kMoverSlots._Mylast - this->m_kMoverSlots._Myfirst )
    goto LABEL_11;
  v3 = this->m_kMoverSlots._Myfirst[uiSlot];
  if ( !v3 )
    goto LABEL_11;
  if ( !bEffect && !uiSlot )
    return 1;
  v5 = v3->m_pkMoverSlotView;
  if ( v5 )
    result = v5->IsViewChar != 0;
  else
LABEL_11:
    result = 0;
  return result;
}

//----- (0072A300) --------------------------------------------------------
char __thiscall Mover::GetNextSlot(Mover *this, unsigned int *uiSlot)
{
  unsigned int v2; // edx@1
  unsigned int v3; // eax@1
  MoverSlot **v4; // esi@2
  char result; // al@6

  v2 = 0;
  v3 = this->m_kMoverSlots._Mylast - this->m_kMoverSlots._Myfirst;
  if ( v3 )
  {
    v4 = this->m_kMoverSlots._Myfirst;
    while ( !*v4 || (*v4)->m_pkChar )
    {
      ++v2;
      ++v4;
      if ( v2 >= v3 )
        goto LABEL_6;
    }
    *uiSlot = v2;
    result = 1;
  }
  else
  {
LABEL_6:
    result = 0;
  }
  return result;
}

//----- (0072A350) --------------------------------------------------------
void __thiscall MoverSlot::~MoverSlot(MoverSlot *this)
{
  MoverSlot *v1; // edi@1
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // esi@1
  NiNode *v3; // esi@1
  NiNode *v4; // edi@5

  v1 = this;
  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kSlotAni;
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMap<enum  CharAniType,MoverSlot::sSlotAniCode *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)&this->m_kSlotAni);
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v2);
  operator delete[](v2->m_ppkHashTable);
  v3 = v1->m_spHideNode.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v4 = v1->m_spSlotNode.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
  {
    if ( v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  }
}
// 9CE604: using guessed type int (__thiscall *NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::`vftable')(void *p, char);
// 9CE624: using guessed type int (__thiscall *NiTMap<enum  CharAniType,MoverSlot::sSlotAniCode *>::`vftable')(void *p, char);

//----- (0072A420) --------------------------------------------------------
void __userpurge Mover::Update(Mover *this@<ecx>, NiPoint3 *a2@<edi>, float fTime)
{
  double v3; // st7@1
  Mover *v4; // ebx@1
  unsigned int v5; // ecx@1
  unsigned int v6; // eax@1
  MoverSlot *v7; // edi@3
  Char *v8; // esi@4
  AbStateInfecteeVtbl *v9; // edi@7
  float v10; // ST00_4@7
  NiNode *v11; // edi@9
  float v12; // edx@10
  float v13; // eax@10
  NiNode *v14; // esi@12
  NiPoint3 *v15; // [sp+4h] [bp-30h]@2
  NiPoint3 kPos; // [sp+1Ch] [bp-18h]@8
  NiPointer<NiNode> spSlotNode; // [sp+28h] [bp-Ch]@9
  MoverSlot *pkMoverSlot; // [sp+2Ch] [bp-8h]@3
  unsigned int i; // [sp+30h] [bp-4h]@1
  unsigned int uiSize; // [sp+3Ch] [bp+8h]@1

  v3 = fTime;
  v4 = this;
  Char::Update((Char *)&this->vfptr, fTime);
  v5 = 0;
  v6 = v4->m_kMoverSlots._Mylast - v4->m_kMoverSlots._Myfirst;
  uiSize = v6;
  i = 0;
  if ( v6 )
  {
    v15 = a2;
    do
    {
      v7 = v4->m_kMoverSlots._Myfirst[v5];
      pkMoverSlot = v7;
      if ( v7 )
      {
        v8 = v7->m_pkChar;
        if ( v8 )
        {
          if ( !v5 && v8->m_kHandle == g_pkMainChar->m_kHandle )
          {
            v9 = v8->vfptr;
            ((void (__thiscall *)(Mover *))v4->vfptr[8].AddAbStateByAbstateIndex)(v4);
            v10 = v3;
            ((void (__thiscall *)(Char *, _DWORD))v9[8].SetAbStateProperty)(v8, LODWORD(v10));
            v7 = pkMoverSlot;
          }
          ((void (__thiscall *)(Mover *, NiPoint3 *, NiPoint3 *))v4->vfptr[6].SetAbStateProperty)(v4, &kPos, v15);
          if ( i )
          {
            MoverSlot::GetSlotNode(v7, &spSlotNode);
            v11 = spSlotNode.m_pObject;
            if ( spSlotNode.m_pObject )
            {
              v12 = spSlotNode.m_pObject->m_kWorld.m_Translate.y;
              v13 = spSlotNode.m_pObject->m_kWorld.m_Translate.z;
              kPos.x = spSlotNode.m_pObject->m_kWorld.m_Translate.x;
              v3 = v12;
              kPos.y = v12;
              if ( !InterlockedDecrement((volatile LONG *)&spSlotNode.m_pObject->m_uiRefCount) )
                v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
            }
          }
          v15 = &kPos;
          v8->vfptr[5].~AbStateInfectee((AbStateInfectee *)v8);
          v14 = v8->m_spScene.m_pObject;
          if ( v14 )
          {
            InterlockedIncrement((volatile LONG *)&v14->m_uiRefCount);
            v14->m_kLocal.m_Translate = kPos;
            if ( !InterlockedDecrement((volatile LONG *)&v14->m_uiRefCount) )
              v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
          }
          v6 = uiSize;
        }
      }
      v5 = i + 1;
      i = v5;
    }
    while ( v5 < v6 );
  }
}
// 72A420: could not find valid save-restore pair for edi

//----- (0072A590) --------------------------------------------------------
void __usercall Mover::ActStand(Mover *this@<ecx>, int a2@<ebx>, int a3@<edi>)
{
  Mover *v3; // esi@1

  v3 = this;
  Mover::ActSlot(this, MSCA_STAND);
  if ( v3->m_spActor.m_pObject->m_eTargetID != 101000 )
    Char::ActAction((Char *)&v3->vfptr, a2, a3, STAND, NORMALSTAND);
}

//----- (0072A5C0) --------------------------------------------------------
void __usercall Mover::ActWalk(Mover *this@<ecx>, int a2@<ebx>, int a3@<edi>, double a4@<st0>)
{
  Mover *v4; // esi@1
  NiActorManager *v5; // ecx@4
  NiActorManager *v6; // ecx@8

  v4 = this;
  Mover::ActSlot(this, MSCA_WALK);
  if ( v4->m_eMoveMode == MOVE_MODE_WALK
    && (unsigned __int8)((int (__thiscall *)(Mover *))v4->vfptr[7].GetAbstateColor)(v4) == 1
    && (unsigned __int8)((int (__thiscall *)(Mover *))v4->vfptr[20].AddAbStateByAbstateIndex)(v4) == 1 )
  {
    v5 = v4->m_spActor.m_pObject;
    if ( v5->m_eTargetID != 201000 )
      NiActorManager::SetTargetAnimation(v5, 0x31128u);
  }
  if ( !(unsigned __int8)((int (__thiscall *)(Mover *))v4->vfptr[7].GetAbstateColor)(v4)
    && (unsigned __int8)((int (__thiscall *)(Mover *))v4->vfptr[20].AddAbStateByAbstateIndex)(v4) == 1 )
  {
    v6 = v4->m_spActor.m_pObject;
    if ( v6->m_eTargetID == 201000 )
      NiActorManager::SetTargetAnimation(v6, 0x18A9Eu);
  }
  if ( v4->m_spActor.m_pObject->m_eTargetID != 201000 )
    Char::ActWalk((Char *)&v4->vfptr, a2, a3, a4);
}

//----- (0072A660) --------------------------------------------------------
void __usercall Mover::ActRun(Mover *this@<ecx>, int a2@<ebx>, int a3@<edi>, double a4@<st0>)
{
  Mover *v4; // esi@1
  NiActorManager *v5; // ecx@4
  NiActorManager *v6; // ecx@8

  v4 = this;
  Mover::ActSlot(this, MSCA_RUN);
  if ( v4->m_eMoveMode == 1
    && (unsigned __int8)((int (__thiscall *)(Mover *))v4->vfptr[7].GetAbstateColor)(v4) == 1
    && (unsigned __int8)((int (__thiscall *)(Mover *))v4->vfptr[20].AddAbStateByAbstateIndex)(v4) == 1 )
  {
    v5 = v4->m_spActor.m_pObject;
    if ( v5->m_eTargetID != 202000 )
      NiActorManager::SetTargetAnimation(v5, 0x31510u);
  }
  if ( !(unsigned __int8)((int (__thiscall *)(Mover *))v4->vfptr[7].GetAbstateColor)(v4)
    && (unsigned __int8)((int (__thiscall *)(Mover *))v4->vfptr[20].AddAbStateByAbstateIndex)(v4) == 1 )
  {
    v6 = v4->m_spActor.m_pObject;
    if ( v6->m_eTargetID == 202000 )
      NiActorManager::SetTargetAnimation(v6, 0x18A9Eu);
  }
  if ( v4->m_spActor.m_pObject->m_eTargetID != 202000 )
    Char::ActRun((Char *)&v4->vfptr, a2, a3, a4);
}

//----- (0072A700) --------------------------------------------------------
char __thiscall Mover::ActJump(Mover *this)
{
  Mover *v1; // esi@1
  char result; // al@2
  ActionInfoSet *v3; // eax@4
  ActionInfo *v4; // eax@4
  int v5; // ecx@6
  unsigned int v6; // edx@6

  v1 = this;
  Mover::ActSlot(this, MSCA_SPECIAL);
  if ( v1->m_uiSpecialEventCode == v1->m_spActor.m_pObject->m_eTargetID
    || (unsigned __int8)((int (__thiscall *)(_DWORD))v1->vfptr[7].GetAbstateColor)(v1) )
  {
    result = 0;
  }
  else
  {
    v1->vfptr[10].SetAbStateProperty((AbStateInfectee *)v1, (ABSTATEINDEX)v1->m_uiSpecialEventCode, 0, 0);
    v3 = ActionInfoTable::GetMoverActionInfo(v1->m_kMoverID);
    v4 = ActionInfoSet::GetByEventCode(v3, v1->m_uiSpecialEventCode);
    if ( v4 )
    {
      v5 = (int)&v1->m_kActionMgr;
      *(_DWORD *)(v5 + 20) = 0;
      *(_WORD *)(v5 + 76) = 0;
      *(_BYTE *)(v5 + 78) = 0;
      *(_WORD *)(v5 + 79) = 0;
      *(_DWORD *)(v5 + 20) = v4;
      v6 = v4->uiEventCode;
      *(_DWORD *)(v5 + 24) = v6;
      if ( 10000 * (v6 / 0x2710) == 300000 )
        v1->m_kActionMgr.m_pkLastAttackActInfo = v4;
      ActionMgr::SetActionStartTime((ActionMgr *)v5, Timer::ms_fCurTime);
      result = 1;
    }
    else
    {
      result = 0;
    }
  }
  return result;
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0072A7D0) --------------------------------------------------------
void __usercall Mover::ActDamage1(Mover *this@<ecx>, int a2@<ebx>, int a3@<edi>)
{
  Mover *v3; // esi@1

  v3 = this;
  Mover::ActSlot(this, MSCA_DAMAGE);
  Char::ActDamage1((Char *)&v3->vfptr, a2, a3);
}

//----- (0072A7F0) --------------------------------------------------------
void __usercall Mover::ActCriticalStun(Mover *this@<ecx>, int a2@<ebx>, int a3@<edi>)
{
  Mover *v3; // esi@1

  v3 = this;
  Mover::ActSlot(this, MSCA_CRITICAL);
  Char::ActCriticalStun((Char *)&v3->vfptr, a2, a3);
}

//----- (0072A810) --------------------------------------------------------
void __thiscall Mover::SetMoverEffect(Mover *this, bool bShow, Mover *pkMover, char nGrade)
{
  Mover *v4; // esi@1
  NiNode *v5; // ecx@6
  NiNode *v6; // edi@7
  char *v7; // ebx@9
  NiExtraData *v8; // edx@10
  const char *v9; // esi@10
  Mover *v10; // [sp+18h] [bp-90h]@1
  unsigned int dwScale; // [sp+1Ch] [bp-8Ch]@10
  unsigned int dwEffectHandle; // [sp+20h] [bp-88h]@1
  char acKey[128]; // [sp+24h] [bp-84h]@11

  v4 = this;
  v10 = this;
  LOBYTE(dwEffectHandle) = nGrade;
  if ( bShow )
  {
    if ( pkMover )
    {
      if ( nGrade )
      {
        v5 = pkMover->m_spScene.m_pObject;
        if ( v5 )
        {
          v6 = (NiNode *)((int (__stdcall *)(_DWORD))v5->vfptr[18].__vecDelDtor)("EFNODE");
          if ( v6 )
          {
            if ( (unsigned __int8)nGrade < 0x14u )
            {
              v7 = MoverUpgradeEffectTab::GetByGrade(dwEffectHandle)->EffectFileName;
              if ( strcmp(v7, "-") )
              {
                v8 = *v6->m_ppkExtra;
                *(float *)&dwScale = 0.0;
                v9 = (const char *)v8[1].vfptr;
                if ( v9 )
                {
                  acKey[0] = 0;
                  memset(&acKey[1], 0, 0x7Fu);
                  sscanf(v9, "%s", acKey);
                  if ( !_strnicmp(acKey, "Scale", 5u) )
                  {
                    *(float *)&dwScale = 0.0;
                    sscanf(v9, "%s %d ", acKey, &dwScale);
                    *(float *)&dwScale = (double)dwScale * 0.009999999776482582;
                  }
                }
                dwEffectHandle = 0;
                EffectMgr::CreateAttachScaleEffect(
                  &g_kEffectMgr,
                  &dwEffectHandle,
                  v7,
                  v6,
                  *(float *)&dwScale,
                  Timer::ms_fCurTime);
                v10->m_hMoverEffect = dwEffectHandle;
              }
            }
          }
        }
      }
    }
  }
  else if ( this->m_hMoverEffect )
  {
    EffectMgr::RemoveEffect(&g_kEffectMgr, (Effect *)this->m_hMoverEffect);
    v4->m_hMoverEffect = 0;
  }
}
// A8B97C: using guessed type float Timer::ms_fCurTime;

//----- (0072AA00) --------------------------------------------------------
void __thiscall MoverSlot::MoverSlot(MoverSlot *this, const unsigned int uiSlot)
{
  MoverSlot *v2; // esi@1
  char *v3; // eax@1
  unsigned int v4; // ST08_4@1

  v2 = this;
  this->m_uiSlot = uiSlot;
  this->m_spSlotNode.m_pObject = 0;
  this->m_spHideNode.m_pObject = 0;
  this->m_kSlotAni.m_uiHashSize = 37;
  this->m_kSlotAni.vfptr = (NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum CharAniType,MoverSlot::sSlotAniCode *>Vtbl *)&NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::`vftable';
  this->m_kSlotAni.m_kAllocator.m_uiCount = 0;
  v3 = (char *)operator new[](0x94u);
  v4 = 4 * v2->m_kSlotAni.m_uiHashSize;
  v2->m_kSlotAni.m_ppkHashTable = (NiTMapItem<enum CharAniType,MoverSlot::sSlotAniCode *> **)v3;
  memset(v3, 0, v4);
  v2->m_kSlotAni.vfptr = (NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum CharAniType,MoverSlot::sSlotAniCode *>Vtbl *)&NiTMap<enum  CharAniType,MoverSlot::sSlotAniCode *>::`vftable';
  v2->m_dwCurLegCode = 0;
  v2->m_pkMoverSlotView = 0;
  v2->m_pkChar = 0;
}
// 9CE604: using guessed type int (__thiscall *NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::`vftable')(void *p, char);
// 9CE624: using guessed type int (__thiscall *NiTMap<enum  CharAniType,MoverSlot::sSlotAniCode *>::`vftable')(void *p, char);

//----- (0072AAA0) --------------------------------------------------------
void __thiscall Mover::Mover(Mover *this)
{
  Mover *v1; // esi@1

  v1 = this;
  Char::Char((Char *)&this->vfptr);
  v1->vfptr = (AbStateInfecteeVtbl *)&Mover::`vftable'{for `AbStateInfectee'};
  v1->vfptr = (IEffectHolderVtbl *)&Mover::`vftable'{for `IEffectHolder'};
  v1->vfptr = (AttackSequenceManagerVtbl *)&Mover::`vftable'{for `AttackSequenceManager'};
  v1->m_kMoverSlots._Myfirst = 0;
  v1->m_kMoverSlots._Mylast = 0;
  v1->m_kMoverSlots._Myend = 0;
  *(_WORD *)&v1->m_bFeed = 0;
  v1->m_uiSpecialEventCode = 0;
  v1->m_pkMoverMain = 0;
  v1->m_pkMoverView = 0;
  v1->m_bWay = 0;
  v1->m_hMoverEffect = 0;
  v1->m_kMoverID = -1;
}
// 9CE644: using guessed type struct NiActorManager *(__thiscall *Mover::`vftable'{for `AttackSequenceManager'})(Char *__hidden this);
// 9CE664: using guessed type int (__stdcall *Mover::`vftable'{for `IEffectHolder'})(int);
// 9CE66C: using guessed type void (__thiscall *Mover::`vftable'{for `AbStateInfectee'})(Mover *this, AbStateInst *pkAbState, bool);

//----- (0072AB10) --------------------------------------------------------
void __thiscall Mover::~Mover(Mover *this)
{
  Mover *v1; // esi@1

  v1 = this;
  this->vfptr = (AbStateInfecteeVtbl *)&Mover::`vftable'{for `AbStateInfectee'};
  this->vfptr = (IEffectHolderVtbl *)&Mover::`vftable'{for `IEffectHolder'};
  this->vfptr = (AttackSequenceManagerVtbl *)&Mover::`vftable'{for `AttackSequenceManager'};
  this->m_hMoverEffect = 0;
  if ( this->m_kMoverSlots._Myfirst )
    operator delete(this->m_kMoverSlots._Myfirst);
  v1->m_kMoverSlots._Myfirst = 0;
  v1->m_kMoverSlots._Mylast = 0;
  v1->m_kMoverSlots._Myend = 0;
  Char::~Char((Char *)&v1->vfptr);
}
// 9CE644: using guessed type struct NiActorManager *(__thiscall *Mover::`vftable'{for `AttackSequenceManager'})(Char *__hidden this);
// 9CE664: using guessed type int (__stdcall *Mover::`vftable'{for `IEffectHolder'})(int);
// 9CE66C: using guessed type void (__thiscall *Mover::`vftable'{for `AbStateInfectee'})(Mover *this, AbStateInst *pkAbState, bool);

//----- (0072ABB0) --------------------------------------------------------
MoverSlot *__cdecl MoverSlot::Create(NiPointer<NiNode> spSlotNode, NiPointer<NiNode> spHideNode, const unsigned int uiSlot, const char *pcMoverIdx, const char *pcMoverTypeIdx)
{
  MoverSlot *v5; // eax@1
  MoverSlot *v6; // eax@2
  MoverSlotView *v7; // eax@4
  MoverSlot *v8; // edi@4
  MoverSlot *result; // eax@13
  int v10; // eax@21
  unsigned int v11; // eax@24
  char *v12; // eax@25
  char *v13; // ebx@25
  unsigned int v14; // eax@26
  unsigned int v15; // edi@26
  unsigned int v16; // esi@26
  unsigned int v17; // ecx@26
  const char *v18; // eax@28
  int v19; // eax@30
  bool v20; // bl@34
  NiVBSet *v21; // eax@45
  int v22; // edx@45
  unsigned int v23; // ecx@46
  NiNode *v24; // [sp-4h] [bp-68h]@16
  unsigned int v25; // [sp+10h] [bp-54h]@4
  char *v26; // [sp+14h] [bp-50h]@25
  unsigned int j; // [sp+18h] [bp-4Ch]@24
  char *_First2; // [sp+1Ch] [bp-48h]@1
  unsigned int i; // [sp+20h] [bp-44h]@20
  int v30; // [sp+24h] [bp-40h]@21
  unsigned int v31; // [sp+28h] [bp-3Ch]@22
  const unsigned int uiCount; // [sp+2Ch] [bp-38h]@1
  int v33; // [sp+30h] [bp-34h]@1
  MoverSlot *v34; // [sp+34h] [bp-30h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v35; // [sp+38h] [bp-2Ch]@26
  int v36; // [sp+60h] [bp-4h]@1

  _First2 = (char *)pcMoverTypeIdx;
  v33 = 0;
  v36 = 1;
  v5 = (MoverSlot *)operator new(0x28u);
  uiCount = (const unsigned int)v5;
  LOBYTE(v36) = 2;
  if ( v5 )
  {
    MoverSlot::MoverSlot(v5, uiSlot);
    v34 = v6;
  }
  else
  {
    v34 = 0;
  }
  LOBYTE(v36) = 1;
  v25 = uiSlot + 1;
  v7 = MoverSlotViewTab::GetByMoverIdx(pcMoverIdx, uiSlot + 1);
  v8 = v34;
  v34->m_pkMoverSlotView = v7;
  if ( v7 )
  {
    if ( spHideNode.m_pObject )
      spHideNode.m_pObject->m_uFlags |= 1u;
    v24 = spSlotNode.m_pObject;
    uiCount = (const unsigned int)&v24;
    if ( spSlotNode.m_pObject )
      InterlockedIncrement((volatile LONG *)&spSlotNode.m_pObject->m_uiRefCount);
    MoverSlot::SetSlotNode(v34, (NiPointer<NiNode>)v24);
    v24 = spHideNode.m_pObject;
    uiCount = (const unsigned int)&v24;
    if ( spHideNode.m_pObject )
      InterlockedIncrement((volatile LONG *)&spHideNode.m_pObject->m_uiRefCount);
    MoverSlot::SetHideNode(v34, (NiPointer<NiNode>)v24);
    v24 = (NiNode *)(uiSlot + 1);
    uiCount = MoverSlotCharAniTab::GetCountByMoverTypeIdx(pcMoverTypeIdx);
    i = 0;
    if ( uiCount )
    {
      do
      {
        v10 = *(_DWORD *)(ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::ms_pkTable + 56);
        v30 = 0;
        if ( v10 )
          v31 = *(_DWORD *)(v10 + 40);
        else
          v31 = 0;
        v11 = 0;
        for ( j = 0; v11 < v31; j = v11 )
        {
          v12 = CDataReader::GetRecord(
                  (CDataReader *)(ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::ms_pkTable + 4),
                  v11);
          v13 = v12;
          v26 = v12;
          if ( v12 )
          {
            v35._Myres = 15;
            v35._Mysize = 0;
            v35._Bx._Buf[0] = 0;
            std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v35, v12, strlen(v12));
            v33 |= 1u;
            v14 = strlen(_First2);
            v15 = v35._Mysize;
            v16 = v14;
            v17 = v35._Mysize;
            if ( v35._Mysize >= v14 )
              v17 = v14;
            v18 = v35._Bx._Ptr;
            if ( v35._Myres < 0x10 )
              v18 = (const char *)&v35;
            v19 = std::char_traits<char>::compare(v18, _First2, v17);
            v20 = 0;
            if ( !v19 && v15 >= v16 )
            {
              LOBYTE(v19) = v15 != v16;
              if ( !v19 && (unsigned __int8)v13[16] == v25 )
                v20 = 1;
            }
            v36 = 1;
            if ( v33 & 1 )
            {
              v33 &= 0xFFFFFFFE;
              if ( v35._Myres >= 0x10 )
                operator delete(v35._Bx._Ptr);
              v35._Myres = 15;
              v35._Mysize = 0;
              v35._Bx._Buf[0] = 0;
            }
            if ( v20 )
            {
              if ( v30 == i )
              {
                v21 = (NiVBSet *)operator new(8u);
                v22 = (int)v26;
                if ( v21 )
                {
                  v23 = *(_DWORD *)(v26 + 25);
                  v21->m_uiIndex = *(_DWORD *)(v26 + 21);
                  v21->m_uiFVF = v23;
                }
                else
                {
                  v21 = 0;
                }
                v24 = (NiNode *)v21;
                NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::SetAt(
                  (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v34->m_kSlotAni,
                  *(_DWORD *)(v22 + 17),
                  v21);
                break;
              }
              ++v30;
            }
          }
          v11 = j + 1;
        }
        ++i;
      }
      while ( i < uiCount );
    }
    LOBYTE(v36) = 0;
    if ( spSlotNode.m_pObject
      && !InterlockedDecrement((volatile LONG *)&spSlotNode.m_pObject->m_uiRefCount)
      && spSlotNode.m_pObject )
    {
      spSlotNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spSlotNode.m_pObject, 1u);
    }
    v36 = -1;
    if ( spHideNode.m_pObject
      && !InterlockedDecrement((volatile LONG *)&spHideNode.m_pObject->m_uiRefCount)
      && spHideNode.m_pObject )
    {
      spHideNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spHideNode.m_pObject, 1u);
    }
    result = v34;
  }
  else
  {
    MoverSlot::~MoverSlot(v8);
    operator delete(v8);
    LOBYTE(v36) = 0;
    if ( spSlotNode.m_pObject
      && !InterlockedDecrement((volatile LONG *)&spSlotNode.m_pObject->m_uiRefCount)
      && spSlotNode.m_pObject )
    {
      spSlotNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spSlotNode.m_pObject, 1u);
    }
    v36 = -1;
    if ( spHideNode.m_pObject && !InterlockedDecrement((volatile LONG *)&spHideNode.m_pObject->m_uiRefCount) )
    {
      if ( spHideNode.m_pObject )
        spHideNode.m_pObject->vfptr->__vecDelDtor((NiRefObject *)spHideNode.m_pObject, 1u);
    }
    result = 0;
  }
  return result;
}
// A8C230: using guessed type int ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::ms_pkTable;

//----- (0072AEF0) --------------------------------------------------------
char __thiscall Mover::Init(Mover *this, unsigned int kMoverID, unsigned __int16 kMoverHandle, int iHP)
{
  Mover *v4; // esi@1
  AbStateInfecteeVtbl *v5; // edx@1
  char v6; // bl@1
  bool (__thiscall *v7)(AbStateInfectee *, ABSTATEINDEX, float, bool); // eax@1
  unsigned int v8; // edi@1
  void (__thiscall *v9)(NpNs_MoveToTarget *); // eax@3
  Name3 *v10; // eax@3
  MapInfo *v11; // eax@3
  int v12; // eax@5
  unsigned int v13; // ebx@6
  char *v14; // eax@9
  char v15; // al@14
  MoverView *v16; // eax@15
  MoverHG *v17; // eax@16
  const char *v18; // ST00_4@16
  MoverAbility *v19; // edi@16
  void (__thiscall *v20)(AbStateInfectee *, AbStateInst *, bool); // edx@17
  Name3 result; // [sp+Ch] [bp-Ch]@3

  v4 = this;
  v5 = this->vfptr;
  this->m_kHandle = kMoverHandle;
  v6 = ((int (*)(void))v5[1].AddAbStateByAbstateIndex)();
  v7 = v4->vfptr[1].AddAbStateByAbstateIndex;
  v8 = 0;
  v4->m_byMode = 1;
  v4->m_eStandMode = 0;
  if ( v6 != (unsigned __int8)((int (__thiscall *)(Mover *))v7)(v4) )
    v4->m_bIsChangeCampMode = 1;
  v9 = v4->m_kMoveToTarget.vfptr->Stop;
  v4->m_kMoverID = kMoverID;
  v4->m_kCharShape.m_kClassID = 0;
  v4->m_bUserCharacter = 0;
  v9((NpNs_MoveToTarget *)&v4->m_kMoveToTarget.vfptr);
  v4->m_bConnectServer = 1;
  v10 = World::GetMapName(&g_kWorld, &result);
  v11 = MapInfoTab::GetByMapName(v10);
  if ( v11 )
    v4->m_fMaxViewLength = (double)v11->Sight;
  v12 = *(_DWORD *)(ITableBase<MoverMain,MoverMainTab>::ms_pkTable + 56);
  if ( v12 )
    v13 = *(_DWORD *)(v12 + 40);
  else
    v13 = 0;
  if ( v13 )
  {
    while ( 1 )
    {
      v14 = CDataReader::GetRecord((CDataReader *)(ITableBase<MoverMain,MoverMainTab>::ms_pkTable + 4), v8);
      if ( v14 )
      {
        if ( *(_DWORD *)v14 == kMoverID )
          break;
      }
      if ( ++v8 >= v13 )
        goto LABEL_12;
    }
  }
  else
  {
LABEL_12:
    v14 = 0;
  }
  v4->m_pkMoverMain = (MoverMain *)v14;
  if ( v14 && (v16 = MoverViewTab::GetByMoverIdx(v14 + 4), (v4->m_pkMoverView = v16) != 0) )
  {
    v17 = MoverHGTab::GetByMoverIdx(v4->m_pkMoverMain->MoverIDX);
    v18 = v4->m_pkMoverMain->MoverIDX;
    v4->m_bFeed = v17 != 0;
    v19 = MoverAbilityTab::GetByMoverIdx(v18);
    if ( v19 )
    {
      v20 = v4->vfptr[4].Affect;
      v4->m_bAbility = 1;
      ((void (__thiscall *)(Mover *, int))v20)(v4, iHP);
      ((void (__thiscall *)(Mover *, unsigned int))v4->vfptr[4].SetAbStateProperty)(v4, v19->HP);
    }
    v15 = 1;
  }
  else
  {
    v15 = 0;
  }
  return v15;
}
// A89D24: using guessed type int ITableBase<MoverMain,MoverMainTab>::ms_pkTable;

//----- (0072B060) --------------------------------------------------------
char __thiscall Mover::InitView(Mover *this, int bEquip, unsigned int uiFrame)
{
  Mover *v3; // ebx@1
  char *v4; // esi@1
  NiNode *v5; // eax@1
  NiNode *v6; // edi@1
  NiActorManager *v7; // eax@9
  char result; // al@10
  NiNode *v9; // edi@11
  unsigned int v10; // eax@13
  const char *v11; // eax@17
  NiRefObjectVtbl *v12; // edx@19
  NiNode *v13; // eax@19
  NiNode *v14; // edi@24
  NiRefObjectVtbl *v15; // edi@25
  char *v16; // eax@25
  MoverView *v17; // eax@28
  NiNode *v18; // edi@35
  char v19; // bl@39
  NiNode *v20; // [sp-14h] [bp-44h]@31
  NiPointer<NiNode> v21; // [sp-10h] [bp-40h]@29
  unsigned int v22; // [sp-Ch] [bp-3Ch]@29
  const char *v23; // [sp-8h] [bp-38h]@29
  const char *v24; // [sp-4h] [bp-34h]@18
  NiPointer<NiNode> spHideNode; // [sp+10h] [bp-20h]@26
  unsigned int _Val; // [sp+14h] [bp-1Ch]@29
  NiPointer<NiNode> spNode; // [sp+18h] [bp-18h]@1
  NiPointer<NiNode> spSlotNode; // [sp+1Ch] [bp-14h]@19
  unsigned int i; // [sp+20h] [bp-10h]@14
  int v30; // [sp+2Ch] [bp-4h]@13

  v3 = this;
  v4 = (char *)&this->m_kActionMgr;
  *((float *)v4 + 22) = 0.0;
  *((float *)v4 + 23) = 0.0;
  *((_DWORD *)v4 + 3) = 0;
  *((_DWORD *)v4 + 1) = 0;
  *((_DWORD *)v4 + 2) = 0;
  *((_DWORD *)v4 + 4) = 0;
  *((_DWORD *)v4 + 6) = 0;
  *((_DWORD *)v4 + 21) = 0;
  *((_DWORD *)v4 + 24) = 0;
  v4[104] = 0;
  *((_DWORD *)v4 + 5) = 0;
  *((_WORD *)v4 + 38) = 0;
  v4[78] = 0;
  *(_WORD *)(v4 + 79) = 0;
  *((float *)v4 + 25) = 0.0;
  v5 = (NiNode *)CharResMgr::GetMoverActor(&g_kCharResMgr, this->m_kMoverID);
  v6 = (NiNode *)v3->m_spActor.m_pObject;
  spNode.m_pObject = v5;
  if ( v6 != v5 )
  {
    if ( v6 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      v5 = spNode.m_pObject;
    }
    v3->m_spActor.m_pObject = (NiActorManager *)v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  }
  v3->m_kActionMgr.m_pkActInfoSet = ActionInfoTable::GetMoverActionInfo(v3->m_kMoverID);
  v7 = v3->m_spActor.m_pObject;
  v3->m_kActionMgr.m_pkChar = (Char *)v3;
  if ( !v7 )
    goto LABEL_44;
  v9 = (NiNode *)v7->m_spNIFRoot.m_pObject;
  spNode.m_pObject = v9;
  if ( v9 )
    InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  v10 = 0;
  v30 = 0;
  if ( v9 )
  {
    for ( i = 0; ; v10 = i )
    {
      if ( v10 )
      {
        v24 = (const char *)(v10 + 1);
        v11 = fs("#Chair%02d", v10 + 1);
      }
      else
      {
        v11 = "#Chair";
      }
      v12 = v9->vfptr;
      v24 = v11;
      v13 = (NiNode *)v12[18].__vecDelDtor((NiRefObject *)v9, (unsigned int)v11);
      spSlotNode.m_pObject = v13;
      if ( v13 )
      {
        InterlockedIncrement((volatile LONG *)&v13->m_uiRefCount);
        v13 = spSlotNode.m_pObject;
      }
      LOBYTE(v30) = 1;
      if ( v13 )
      {
        if ( i )
        {
          v15 = v9->vfptr;
          v24 = (const char *)(i + 1);
          v16 = fs("HideSlot%02d", i + 1);
          v14 = (NiNode *)v15[18].__vecDelDtor((NiRefObject *)spNode.m_pObject, (unsigned int)v16);
        }
        else
        {
          v14 = 0;
        }
        spHideNode.m_pObject = v14;
        if ( v14 )
          InterlockedIncrement((volatile LONG *)&v14->m_uiRefCount);
        v17 = v3->m_pkMoverView;
        LOBYTE(v30) = 2;
        if ( v17 )
        {
          v24 = v17->MoverTypeIDX;
          v23 = (const char *)v17;
          v22 = i;
          _Val = (unsigned int)&v21;
          v21.m_pObject = v14;
          if ( v14 )
            InterlockedIncrement((volatile LONG *)&v14->m_uiRefCount);
          v20 = spSlotNode.m_pObject;
          _Val = (unsigned int)&v20;
          InterlockedIncrement((volatile LONG *)&spSlotNode.m_pObject->m_uiRefCount);
          _Val = (unsigned int)MoverSlot::Create((NiPointer<NiNode>)v20, v21, v22, v23, v24);
          std::vector<NiAVObject *,std::allocator<NiAVObject *>>::push_back(
            (std::vector<unsigned long,std::allocator<unsigned long> > *)&v3->m_kMoverSlots,
            &_Val);
        }
        LOBYTE(v30) = 1;
        if ( v14 && !InterlockedDecrement((volatile LONG *)&v14->m_uiRefCount) )
          v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
        v18 = spSlotNode.m_pObject;
        LOBYTE(v30) = 0;
        if ( !InterlockedDecrement((volatile LONG *)&spSlotNode.m_pObject->m_uiRefCount) )
          v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
        v9 = spNode.m_pObject;
      }
      else
      {
        LOBYTE(v30) = 0;
      }
      if ( ++i >= 0xA )
        break;
    }
    v3->m_spActor.m_pObject->m_pkCallbackObject = (NiActorManager::CallbackObject *)v4;
    NiActorManager::RegisterCallback(
      v3->m_spActor.m_pObject,
      TEXT_KEY_EVENT,
      NiActorManager::ANY_SEQUENCE_ID,
      g_kTextKeyMatch);
    v19 = ((int (__thiscall *)(Mover *, int))v3->vfptr[18].GetAbstateColor)(v3, bEquip);
    v30 = -1;
    if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    result = v19;
  }
  else
  {
LABEL_44:
    result = 0;
  }
  return result;
}

//----- (0072B320) --------------------------------------------------------
char __thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *this, unsigned int key, NiVBSet **val)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v3; // esi@1
  NiTMapItem<unsigned int,NiVBSet *> *v4; // edi@1
  char result; // al@4

  v3 = this;
  v4 = this->m_ppkHashTable[((int (__stdcall *)(_DWORD))this->vfptr->KeyToHashIndex)(key)];
  if ( v4 )
  {
    while ( !v3->vfptr->IsKeysEqual(v3, key, v4->m_key) )
    {
      v4 = v4->m_pkNext;
      if ( !v4 )
        goto LABEL_4;
    }
    *val = v4->m_val;
    result = 1;
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}

//----- (0072B380) --------------------------------------------------------
void __thiscall MoverSlot::SetSlotNode(MoverSlot *this, NiPointer<NiNode> spSlotNode)
{
  MoverSlot *v2; // edi@1
  NiNode *v3; // esi@1
  NiNode *v4; // eax@1
  NiNode *v5; // esi@10

  v2 = this;
  v3 = this->m_spSlotNode.m_pObject;
  v4 = spSlotNode.m_pObject;
  if ( v3 != spSlotNode.m_pObject )
  {
    if ( v3 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      v4 = spSlotNode.m_pObject;
    }
    v2->m_spSlotNode.m_pObject = v4;
    if ( v4 )
    {
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
      v4 = spSlotNode.m_pObject;
    }
  }
  if ( v4 )
  {
    v5 = v4;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
    {
      if ( v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
  }
}

//----- (0072B430) --------------------------------------------------------
NiPointer<NiNode> *__thiscall MoverSlot::GetSlotNode(MoverSlot *this, NiPointer<NiNode> *result)
{
  NiNode *v2; // eax@1

  v2 = this->m_spSlotNode.m_pObject;
  result->m_pObject = v2;
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  return result;
}

//----- (0072B460) --------------------------------------------------------
void __thiscall MoverSlot::SetHideNode(MoverSlot *this, NiPointer<NiNode> spHideNode)
{
  MoverSlot *v2; // edi@1
  NiNode *v3; // esi@1
  NiNode *v4; // eax@1
  NiNode *v5; // esi@10

  v2 = this;
  v3 = this->m_spHideNode.m_pObject;
  v4 = spHideNode.m_pObject;
  if ( v3 != spHideNode.m_pObject )
  {
    if ( v3 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      v4 = spHideNode.m_pObject;
    }
    v2->m_spHideNode.m_pObject = v4;
    if ( v4 )
    {
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
      v4 = spHideNode.m_pObject;
    }
  }
  if ( v4 )
  {
    v5 = v4;
    if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
    {
      if ( v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
  }
}

//----- (0072B510) --------------------------------------------------------
NiPointer<NiNode> *__thiscall MoverSlot::GetHideNode(MoverSlot *this, NiPointer<NiNode> *result)
{
  NiNode *v2; // eax@1

  v2 = this->m_spHideNode.m_pObject;
  result->m_pObject = v2;
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  return result;
}

//----- (0072B540) --------------------------------------------------------
void __thiscall NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::~NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>(NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum CharAniType,MoverSlot::sSlotAniCode *> *this)
{
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum CharAniType,MoverSlot::sSlotAniCode *> *v1; // esi@1

  v1 = this;
  this->vfptr = (NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum CharAniType,MoverSlot::sSlotAniCode *>Vtbl *)&NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v1->m_ppkHashTable);
}
// 9CE604: using guessed type int (__thiscall *NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::`vftable')(void *p, char);

//----- (0072B560) --------------------------------------------------------
NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum CharAniType,MoverSlot::sSlotAniCode *> *__thiscall NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::`vector deleting destructor'(NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum CharAniType,MoverSlot::sSlotAniCode *> *this, unsigned int a2)
{
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum CharAniType,MoverSlot::sSlotAniCode *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum CharAniType,MoverSlot::sSlotAniCode *>Vtbl *)&NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9CE604: using guessed type int (__thiscall *NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::`vftable')(void *p, char);

//----- (0072B5A0) --------------------------------------------------------
NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *__thiscall NiTMap<enum  CharAniType,MoverSlot::sSlotAniCode *>::`vector deleting destructor'(NiTMap<enum CharAniType,MoverSlot::sSlotAniCode *> *this, unsigned int a2)
{
  NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *v2; // esi@1

  v2 = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this;
  this->vfptr = (NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum CharAniType,MoverSlot::sSlotAniCode *>Vtbl *)&NiTMap<enum  CharAniType,MoverSlot::sSlotAniCode *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll((NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> > *)this);
  v2->vfptr = (NiTMapBase<DFALL<NiPointer<PgWinBut> >,unsigned long,NiPointer<PgWinBut> >Vtbl *)&NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::`vftable';
  NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::RemoveAll(v2);
  operator delete[](v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9CE604: using guessed type int (__thiscall *NiTMapBase<DFALL<MoverSlot::sSlotAniCode *>,enum  CharAniType,MoverSlot::sSlotAniCode *>::`vftable')(void *p, char);
// 9CE624: using guessed type int (__thiscall *NiTMap<enum  CharAniType,MoverSlot::sSlotAniCode *>::`vftable')(void *p, char);

//----- (0072B620) --------------------------------------------------------
BOOL __thiscall Mover::IsEndPathFinding(Mover *this)
{
  return this->m_bWay == 0;
}

//----- (0072B630) --------------------------------------------------------
Mover *__thiscall Mover::`vector deleting destructor'(char *this, unsigned int a2)
{
  return Mover::`scalar deleting destructor'((Mover *)(this - 88), a2);
}

//----- (0072B640) --------------------------------------------------------
Mover *__thiscall Mover::`vector deleting destructor'(char *this, unsigned int a2)
{
  return Mover::`scalar deleting destructor'((Mover *)(this - 64), a2);
}

//----- (0072B650) --------------------------------------------------------
Mover *__thiscall Mover::`scalar deleting destructor'(Mover *this, unsigned int a2)
{
  Mover *v2; // esi@1

  v2 = this;
  this->vfptr = (AbStateInfecteeVtbl *)&Mover::`vftable'{for `AbStateInfectee'};
  this->vfptr = (IEffectHolderVtbl *)&Mover::`vftable'{for `IEffectHolder'};
  this->vfptr = (AttackSequenceManagerVtbl *)&Mover::`vftable'{for `AttackSequenceManager'};
  this->m_hMoverEffect = 0;
  if ( this->m_kMoverSlots._Myfirst )
    operator delete(this->m_kMoverSlots._Myfirst);
  v2->m_kMoverSlots._Myfirst = 0;
  v2->m_kMoverSlots._Mylast = 0;
  v2->m_kMoverSlots._Myend = 0;
  Char::~Char((Char *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9CE644: using guessed type struct NiActorManager *(__thiscall *Mover::`vftable'{for `AttackSequenceManager'})(Char *__hidden this);
// 9CE664: using guessed type int (__stdcall *Mover::`vftable'{for `IEffectHolder'})(int);
// 9CE66C: using guessed type void (__thiscall *Mover::`vftable'{for `AbStateInfectee'})(Mover *this, AbStateInst *pkAbState, bool);

//----- (0072B700) --------------------------------------------------------
MoverSlotView *__cdecl MoverSlotViewTab::GetByMoverIdx(const char *pcMoverIdx, unsigned int uiSlot)
{
  int v2; // eax@1
  unsigned int v3; // esi@4
  char *v4; // eax@5
  char *v5; // ebx@5
  unsigned int v6; // eax@6
  unsigned int v7; // edi@6
  unsigned int v8; // esi@6
  unsigned int v9; // ecx@6
  const char *v10; // eax@8
  int v11; // eax@10
  bool v12; // bl@14
  MoverSlotView *pkMoverSlotView; // [sp+10h] [bp-40h]@5
  unsigned int i; // [sp+14h] [bp-3Ch]@4
  unsigned int v16; // [sp+1Ch] [bp-34h]@2
  int v17; // [sp+20h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v18; // [sp+24h] [bp-2Ch]@6
  int v19; // [sp+4Ch] [bp-4h]@16

  v17 = 0;
  v2 = *(_DWORD *)(ITableBase<MoverSlotView,MoverSlotViewTab>::ms_pkTable + 56);
  if ( v2 )
    v16 = *(_DWORD *)(v2 + 40);
  else
    v16 = 0;
  v3 = 0;
  i = 0;
  if ( v16 <= 0 )
    return 0;
  while ( 1 )
  {
    v4 = CDataReader::GetRecord((CDataReader *)(ITableBase<MoverSlotView,MoverSlotViewTab>::ms_pkTable + 4), v3);
    v5 = v4;
    pkMoverSlotView = (MoverSlotView *)v4;
    if ( v4 )
      break;
LABEL_22:
    i = ++v3;
    if ( v3 >= v16 )
      return 0;
  }
  v18._Myres = 15;
  v18._Mysize = 0;
  v18._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v18, v4, strlen(v4));
  v17 |= 1u;
  v6 = strlen(pcMoverIdx);
  v7 = v18._Mysize;
  v8 = v6;
  v9 = v18._Mysize;
  if ( v18._Mysize >= v6 )
    v9 = v6;
  v10 = v18._Bx._Ptr;
  if ( v18._Myres < 0x10 )
    v10 = (const char *)&v18;
  v11 = std::char_traits<char>::compare(v10, pcMoverIdx, v9);
  v12 = 0;
  if ( !v11 && v7 >= v8 )
  {
    LOBYTE(v11) = v7 != v8;
    if ( !v11 && (unsigned __int8)v5[32] == uiSlot )
      v12 = 1;
  }
  v19 = -1;
  if ( v17 & 1 )
  {
    v17 &= 0xFFFFFFFE;
    if ( v18._Myres >= 0x10 )
      operator delete(v18._Bx._Ptr);
    v18._Myres = 15;
    v18._Mysize = 0;
    v18._Bx._Buf[0] = 0;
  }
  if ( !v12 )
  {
    v3 = i;
    goto LABEL_22;
  }
  return pkMoverSlotView;
}
// A8C22C: using guessed type int ITableBase<MoverSlotView,MoverSlotViewTab>::ms_pkTable;

//----- (0072B870) --------------------------------------------------------
unsigned int __cdecl MoverSlotCharAniTab::GetCountByMoverTypeIdx(const char *pcMoverTypeIdx)
{
  int v1; // eax@1
  unsigned int result; // eax@4
  char *v3; // eax@5
  unsigned int v4; // eax@6
  unsigned int v5; // ebx@6
  unsigned int v6; // esi@6
  unsigned int v7; // ecx@6
  unsigned int v8; // edi@8
  const char *v9; // eax@8
  int v10; // eax@10
  bool v11; // zf@10
  signed int v12; // eax@12
  bool v13; // bl@15
  unsigned int i; // [sp+10h] [bp-3Ch]@4
  unsigned int v15; // [sp+18h] [bp-34h]@2
  unsigned int uiCount; // [sp+1Ch] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v17; // [sp+20h] [bp-2Ch]@6
  int v18; // [sp+48h] [bp-4h]@15

  v1 = *(_DWORD *)(ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::ms_pkTable + 56);
  uiCount = 0;
  if ( v1 )
    v15 = *(_DWORD *)(v1 + 40);
  else
    v15 = 0;
  result = 0;
  i = 0;
  if ( v15 > 0 )
  {
    do
    {
      v3 = CDataReader::GetRecord(
             (CDataReader *)(ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::ms_pkTable + 4),
             result);
      if ( v3 )
      {
        v17._Myres = 15;
        v17._Mysize = 0;
        v17._Bx._Buf[0] = 0;
        std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v17, v3, strlen(v3));
        v4 = strlen(pcMoverTypeIdx);
        v5 = v17._Mysize;
        v6 = v4;
        v7 = v17._Mysize;
        if ( v17._Mysize >= v4 )
          v7 = v4;
        v8 = v17._Myres;
        v9 = v17._Bx._Ptr;
        if ( v17._Myres < 0x10 )
          v9 = (const char *)&v17;
        v10 = std::char_traits<char>::compare(v9, pcMoverTypeIdx, v7);
        v11 = v10 == 0;
        if ( !v10 )
        {
          if ( v5 >= v6 )
            v12 = v5 != v6;
          else
            v12 = -1;
          v11 = v12 == 0;
        }
        v13 = v11;
        v18 = -1;
        if ( v8 >= 0x10 )
          operator delete(v17._Bx._Ptr);
        v17._Myres = 15;
        v17._Mysize = 0;
        v17._Bx._Buf[0] = 0;
        if ( v13 )
          ++uiCount;
      }
      result = i + 1;
      i = result;
    }
    while ( result < v15 );
    result = uiCount;
  }
  return result;
}
// A8C230: using guessed type int ITableBase<MoverSlotCharAni,MoverSlotCharAniTab>::ms_pkTable;

//----- (0072B9D0) --------------------------------------------------------
MoverAbility *__cdecl MoverAbilityTab::GetByMoverIdx(const char *pcMoverIdx)
{
  int v1; // eax@1
  unsigned int v2; // edi@1
  char *v3; // eax@5
  unsigned int v4; // eax@6
  unsigned int v5; // ebx@6
  unsigned int v6; // esi@6
  unsigned int v7; // ecx@6
  unsigned int v8; // edi@8
  const char *v9; // eax@8
  int v10; // eax@10
  bool v11; // zf@10
  signed int v12; // eax@12
  bool v13; // bl@15
  MoverAbility *pkMoverAbility; // [sp+10h] [bp-3Ch]@5
  unsigned int i; // [sp+18h] [bp-34h]@4
  unsigned int v17; // [sp+1Ch] [bp-30h]@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v18; // [sp+20h] [bp-2Ch]@6
  int v19; // [sp+48h] [bp-4h]@15

  v1 = *(_DWORD *)(ITableBase<MoverAbility,MoverAbilityTab>::ms_pkTable + 56);
  v2 = 0;
  if ( v1 )
    v17 = *(_DWORD *)(v1 + 40);
  else
    v17 = 0;
  i = 0;
  if ( v17 <= 0 )
    return 0;
  while ( 1 )
  {
    v3 = CDataReader::GetRecord((CDataReader *)(ITableBase<MoverAbility,MoverAbilityTab>::ms_pkTable + 4), v2);
    pkMoverAbility = (MoverAbility *)v3;
    if ( v3 )
      break;
LABEL_19:
    i = ++v2;
    if ( v2 >= v17 )
      return 0;
  }
  v18._Myres = 15;
  v18._Mysize = 0;
  v18._Bx._Buf[0] = 0;
  std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v18, v3, strlen(v3));
  v4 = strlen(pcMoverIdx);
  v5 = v18._Mysize;
  v6 = v4;
  v7 = v18._Mysize;
  if ( v18._Mysize >= v4 )
    v7 = v4;
  v8 = v18._Myres;
  v9 = v18._Bx._Ptr;
  if ( v18._Myres < 0x10 )
    v9 = (const char *)&v18;
  v10 = std::char_traits<char>::compare(v9, pcMoverIdx, v7);
  v11 = v10 == 0;
  if ( !v10 )
  {
    if ( v5 >= v6 )
      v12 = v5 != v6;
    else
      v12 = -1;
    v11 = v12 == 0;
  }
  v13 = v11;
  v19 = -1;
  if ( v8 >= 0x10 )
    operator delete(v18._Bx._Ptr);
  v18._Myres = 15;
  v18._Mysize = 0;
  v18._Bx._Buf[0] = 0;
  if ( !v13 )
  {
    v2 = i;
    goto LABEL_19;
  }
  return pkMoverAbility;
}
// A8C234: using guessed type int ITableBase<MoverAbility,MoverAbilityTab>::ms_pkTable;

//----- (0072BB20) --------------------------------------------------------
HRESULT __stdcall StringVPrintfWorkerW(wchar_t *pszDest, unsigned int cchDest, const wchar_t *pszFormat, char *argList)
{
  HRESULT result; // eax@2
  unsigned int v5; // esi@3
  int v6; // eax@3
  bool v7; // zf@4

  if ( cchDest )
  {
    v5 = cchDest - 1;
    v6 = _vsnwprintf(pszDest, cchDest - 1, pszFormat, argList);
    if ( v6 < 0 || (v7 = v6 == v5, v6 > v5) )
    {
      pszDest[v5] = 0;
      result = -2147024774;
    }
    else
    {
      result = 0;
      if ( v7 )
        pszDest[v5] = 0;
    }
  }
  else
  {
    result = -2147024809;
  }
  return result;
}

//----- (0072BB80) --------------------------------------------------------
HRESULT StringCbPrintfW(wchar_t *pszDest, unsigned int cbDest, const wchar_t *pszFormat, ...)
{
  HRESULT result; // eax@2
  va_list va; // [sp+14h] [bp+14h]@1

  va_start(va, pszFormat);
  if ( cbDest >> 1 <= 0x7FFFFFFF )
    result = StringVPrintfWorkerW(pszDest, cbDest >> 1, pszFormat, va);
  else
    result = -2147024809;
  return result;
}

//----- (0072BBB0) --------------------------------------------------------
void __thiscall std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::_Chassign(std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *this, unsigned int _Off, unsigned int _Count, wchar_t _Ch)
{
  _WORD *v4; // eax@1
  char *v5; // edi@7
  int v6; // eax@8
  wchar_t *v7; // edi@8
  unsigned int i; // ecx@8

  v4 = this;
  if ( _Count == 1 )
  {
    if ( this->_Myres >= 8 )
      v4 = this->_Bx._Ptr;
    v4[_Off] = _Ch;
  }
  else
  {
    if ( this->_Myres >= 8 )
      v4 = this->_Bx._Ptr;
    v5 = (char *)&v4[_Off];
    if ( _Count )
    {
      v6 = (_Ch << 16) | _Ch;
      memset32(v5, v6, _Count >> 1);
      v7 = (wchar_t *)&v5[4 * (_Count >> 1)];
      for ( i = _Count & 1; i; --i )
      {
        *v7 = _Ch;
        ++v7;
      }
    }
  }
}

//----- (0072BC10) --------------------------------------------------------
std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *__thiscall std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::erase(std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *this, unsigned int _Off, unsigned int _Count)
{
  std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *v3; // esi@1
  unsigned int v4; // eax@1
  unsigned int v5; // edi@3
  unsigned int v6; // eax@3
  unsigned int v7; // edx@6
  char *v8; // ebx@7
  char *v9; // edx@10
  int v10; // eax@12
  bool v11; // cf@12

  v3 = this;
  v4 = this->_Mysize;
  if ( v4 < _Off )
    std::_Xout_of_range("invalid string position");
  v5 = _Count;
  v6 = v4 - _Off;
  if ( v6 < _Count )
    v5 = v6;
  if ( v5 )
  {
    v7 = this->_Myres;
    if ( v7 < 8 )
      v8 = (char *)this;
    else
      v8 = (char *)this->_Bx._Ptr;
    if ( v7 < 8 )
      v9 = (char *)this;
    else
      v9 = (char *)this->_Bx._Ptr;
    memmove(&v9[2 * _Off], &v8[2 * (_Off + v5)], 2 * (v6 - v5));
    v10 = v3->_Mysize - v5;
    v11 = v3->_Myres < 8;
    v3->_Mysize = v10;
    if ( !v11 )
    {
      v3->_Bx._Ptr[v10] = 0;
      return v3;
    }
    v3->_Bx._Buf[v10] = 0;
  }
  return v3;
}

//----- (0072BCA0) --------------------------------------------------------
void __thiscall std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::_Copy(std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *this, unsigned int _Newsize, unsigned int _Oldlen)
{
  std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *v3; // edi@1
  unsigned int v4; // esi@1
  unsigned int v5; // ebx@3
  unsigned int v6; // ecx@3
  char *v7; // eax@6
  unsigned int v8; // ecx@6
  char *v9; // ebx@9
  unsigned int v10; // ecx@12
  char *v11; // eax@14
  int v12; // [sp+0h] [bp-34h]@1
  std::exception pExceptionObject; // [sp+10h] [bp-24h]@10
  wchar_t *_Ptr; // [sp+1Ch] [bp-18h]@10
  std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *v15; // [sp+20h] [bp-14h]@1
  int *v16; // [sp+24h] [bp-10h]@1
  int v17; // [sp+30h] [bp-4h]@6

  v16 = &v12;
  v3 = this;
  v15 = this;
  v4 = _Newsize | 7;
  if ( (_Newsize | 7) <= 0x7FFFFFFE )
  {
    v5 = this->_Myres;
    v6 = this->_Myres >> 1;
    if ( v6 > v4 / 3 )
    {
      v4 = v6 + v5;
      if ( v5 > 2147483646 - v6 )
        v4 = 2147483646;
    }
  }
  else
  {
    v4 = _Newsize;
  }
  v7 = 0;
  v8 = v4 + 1;
  v17 = 0;
  if ( v4 != -1 )
  {
    if ( v8 > 0x7FFFFFFF || (v7 = (char *)operator new(2 * v8)) == 0 )
    {
      _Ptr = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&_Ptr);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
  }
  v9 = v7;
  v10 = _Oldlen;
  if ( _Oldlen )
  {
    if ( v3->_Myres < 8 )
      v11 = (char *)v3;
    else
      v11 = (char *)v3->_Bx._Ptr;
    memcpy(v9, v11, 2 * _Oldlen);
    v10 = _Oldlen;
  }
  if ( v3->_Myres >= 8 )
  {
    operator delete(v3->_Bx._Ptr);
    v10 = _Oldlen;
  }
  v3->_Bx._Ptr = (wchar_t *)v9;
  v3->_Myres = v4;
  v3->_Mysize = v10;
  if ( v4 >= 8 )
    v3 = (std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *)v9;
  v3->_Bx._Buf[v10] = 0;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0072BE20) --------------------------------------------------------
void __thiscall std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::~basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>(std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *this)
{
  std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *v1; // esi@1

  v1 = this;
  if ( this->_Myres >= 8 )
    operator delete(this->_Bx._Ptr);
  v1->_Myres = 7;
  v1->_Mysize = 0;
  v1->_Bx._Buf[0] = 0;
}

//----- (0072BE50) --------------------------------------------------------
std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *__thiscall std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::append(std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *this, unsigned int _Count, wchar_t _Ch)
{
  std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *v3; // esi@1
  unsigned int v4; // eax@1
  unsigned int v5; // edi@4
  unsigned int v6; // ecx@6
  bool v7; // cf@8
  std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *result; // eax@9

  v3 = this;
  v4 = this->_Mysize;
  if ( -1 - v4 <= _Count )
    std::_Xlength_error("string too long");
  if ( !_Count )
    return v3;
  v5 = v4 + _Count;
  if ( v4 + _Count > 0x7FFFFFFE )
    std::_Xlength_error("string too long");
  v6 = this->_Myres;
  if ( v6 < v5 )
  {
    std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::_Copy(v3, v4 + _Count, v4);
    if ( v5 )
    {
LABEL_8:
      std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::_Chassign(
        v3,
        v3->_Mysize,
        _Count,
        _Ch);
      v7 = v3->_Myres < 8;
      v3->_Mysize = v5;
      if ( !v7 )
      {
        v3->_Bx._Ptr[v5] = 0;
        return v3;
      }
      v3->_Bx._Buf[v5] = 0;
    }
    return v3;
  }
  if ( v5 )
    goto LABEL_8;
  v3->_Mysize = 0;
  if ( v6 < 8 )
  {
    result = v3;
    v3->_Bx._Buf[0] = 0;
  }
  else
  {
    *v3->_Bx._Ptr = 0;
    result = v3;
  }
  return result;
}

//----- (0072BF10) --------------------------------------------------------
std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *__thiscall std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::append(std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *this, std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *_Right, unsigned int _Roff, unsigned int _Count)
{
  std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *v4; // edx@1
  unsigned int v5; // eax@1
  std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *v6; // esi@1
  unsigned int v7; // ebx@3
  unsigned int v8; // eax@3
  unsigned int v9; // eax@5
  unsigned int v10; // edi@8
  unsigned int v11; // ecx@10
  char *v12; // ecx@13
  std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *result; // eax@16
  char *v14; // eax@20
  bool v15; // cf@22

  v4 = _Right;
  v5 = _Right->_Mysize;
  v6 = this;
  if ( v5 < _Roff )
    std::_Xout_of_range("invalid string position");
  v7 = _Count;
  v8 = v5 - _Roff;
  if ( v8 < _Count )
    v7 = v8;
  v9 = this->_Mysize;
  if ( -1 - v9 <= v7 )
    std::_Xlength_error("string too long");
  if ( !v7 )
    return v6;
  v10 = v9 + v7;
  if ( v9 + v7 > 0x7FFFFFFE )
    std::_Xlength_error("string too long");
  v11 = this->_Myres;
  if ( v11 < v10 )
  {
    std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::_Copy(v6, v9 + v7, v9);
    v4 = _Right;
    if ( v10 )
    {
LABEL_12:
      if ( v4->_Myres < 8 )
        v12 = (char *)v4;
      else
        v12 = (char *)v4->_Bx._Ptr;
      if ( v6->_Myres < 8 )
        v14 = (char *)v6;
      else
        v14 = (char *)v6->_Bx._Ptr;
      memcpy(&v14[2 * v6->_Mysize], &v12[2 * _Roff], 2 * v7);
      v15 = v6->_Myres < 8;
      v6->_Mysize = v10;
      if ( !v15 )
      {
        v6->_Bx._Ptr[v10] = 0;
        return v6;
      }
      v6->_Bx._Buf[v10] = 0;
    }
    return v6;
  }
  if ( v10 )
    goto LABEL_12;
  v6->_Mysize = 0;
  if ( v11 < 8 )
  {
    result = v6;
    v6->_Bx._Buf[0] = 0;
  }
  else
  {
    *v6->_Bx._Ptr = 0;
    result = v6;
  }
  return result;
}

//----- (0072C020) --------------------------------------------------------
std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *__thiscall std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::assign(std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *this, std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *_Right, unsigned int _Roff, unsigned int _Count)
{
  std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *v4; // esi@1
  std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *v5; // ecx@1
  unsigned int v6; // edi@1
  unsigned int v7; // edi@3
  std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *result; // eax@6
  unsigned int v9; // eax@9
  char *v10; // eax@14
  int v11; // ebx@20
  bool v12; // cf@20

  v4 = this;
  v5 = _Right;
  v6 = _Right->_Mysize;
  if ( v6 < _Roff )
    std::_Xout_of_range("invalid string position");
  v7 = v6 - _Roff;
  if ( _Count < v7 )
    v7 = _Count;
  if ( v4 == _Right )
  {
    std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::erase(v4, _Roff + v7, 0xFFFFFFFF);
    std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::erase(v4, 0, _Roff);
    return v4;
  }
  if ( v7 > 0x7FFFFFFE )
    std::_Xlength_error("string too long");
  v9 = v4->_Myres;
  if ( v9 < v7 )
  {
    std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::_Copy(v4, v7, v4->_Mysize);
    v5 = _Right;
    if ( !v7 )
      return v4;
LABEL_11:
    if ( v5->_Myres >= 8 )
      v5 = (std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *)v5->_Bx._Ptr;
    if ( v4->_Myres < 8 )
      v10 = (char *)v4;
    else
      v10 = (char *)v4->_Bx._Ptr;
    v11 = v7;
    memcpy(v10, (char *)v5 + 2 * _Roff, 2 * v7);
    v12 = v4->_Myres < 8;
    v4->_Mysize = v7;
    if ( !v12 )
    {
      v4->_Bx._Ptr[v11] = 0;
      return v4;
    }
    v4->_Bx._Buf[v11] = 0;
    return v4;
  }
  if ( v7 )
    goto LABEL_11;
  v4->_Mysize = 0;
  if ( v9 < 8 )
  {
    result = v4;
    v4->_Bx._Buf[0] = 0;
  }
  else
  {
    *v4->_Bx._Ptr = 0;
    result = v4;
  }
  return result;
}

//----- (0072C120) --------------------------------------------------------
std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *__thiscall std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::assign(std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *this, const wchar_t *_Ptr, unsigned int _Count)
{
  std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *v3; // esi@1
  unsigned int v4; // edx@2
  char *v5; // ecx@6
  _BYTE *v6; // ecx@10
  std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *result; // eax@12
  unsigned int v8; // eax@15
  char *v9; // eax@18
  unsigned int v10; // ebx@24
  bool v11; // cf@24

  v3 = this;
  if ( !_Ptr )
    goto LABEL_30;
  v4 = this->_Myres;
  if ( v4 >= 8 )
    this = (std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *)this->_Bx._Ptr;
  if ( _Ptr < (const wchar_t *)this
    || (v4 < 8 ? (v5 = (char *)v3) : (v5 = (char *)v3->_Bx._Ptr), &v5[2 * v3->_Mysize] <= (char *)_Ptr) )
  {
LABEL_30:
    if ( _Count > 0x7FFFFFFE )
      std::_Xlength_error("string too long");
    v8 = v3->_Myres;
    if ( v8 >= _Count )
    {
      if ( !_Count )
      {
        v3->_Mysize = 0;
        if ( v8 < 8 )
        {
          result = v3;
          v3->_Bx._Buf[0] = 0;
        }
        else
        {
          *v3->_Bx._Ptr = 0;
          result = v3;
        }
        return result;
      }
    }
    else
    {
      std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::_Copy(v3, _Count, v3->_Mysize);
      if ( !_Count )
        return v3;
    }
    if ( v3->_Myres < 8 )
      v9 = (char *)v3;
    else
      v9 = (char *)v3->_Bx._Ptr;
    v10 = _Count;
    memcpy(v9, (char *)_Ptr, 2 * _Count);
    v11 = v3->_Myres < 8;
    v3->_Mysize = _Count;
    if ( !v11 )
    {
      v3->_Bx._Ptr[v10] = 0;
      return v3;
    }
    v3->_Bx._Buf[v10] = 0;
    return v3;
  }
  if ( v4 < 8 )
    v6 = v3;
  else
    v6 = v3->_Bx._Ptr;
  return std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::assign(
           v3,
           v3,
           ((char *)_Ptr - v6) >> 1,
           _Count);
}

//----- (0072C210) --------------------------------------------------------
std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *__thiscall std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::append(std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *this, const wchar_t *_Ptr, unsigned int _Count)
{
  char *v3; // edx@1
  std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *v4; // esi@1
  unsigned int v5; // ecx@2
  unsigned int v6; // eax@3
  char *v7; // eax@7
  _BYTE *v8; // eax@11
  std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *result; // eax@13
  unsigned int v10; // eax@14
  unsigned int v11; // edi@17
  unsigned int v12; // ecx@19
  char *v13; // eax@22
  bool v14; // cf@28

  v3 = (char *)_Ptr;
  v4 = this;
  if ( !_Ptr
    || ((v5 = this->_Myres, v5 < 8) ? (v6 = (unsigned int)v4) : (v6 = (unsigned int)v4->_Bx._Ptr),
        (unsigned int)_Ptr < v6
     || (v5 < 8 ? (v7 = (char *)v4) : (v7 = (char *)v4->_Bx._Ptr), &v7[2 * v4->_Mysize] <= (char *)_Ptr)) )
  {
    v10 = v4->_Mysize;
    if ( -1 - v10 <= _Count )
      std::_Xlength_error("string too long");
    if ( _Count )
    {
      v11 = v10 + _Count;
      if ( v10 + _Count > 0x7FFFFFFE )
        std::_Xlength_error("string too long");
      v12 = v4->_Myres;
      if ( v12 >= v11 )
      {
        if ( !v11 )
        {
          v4->_Mysize = 0;
          if ( v12 < 8 )
          {
            result = v4;
            v4->_Bx._Buf[0] = 0;
          }
          else
          {
            *v4->_Bx._Ptr = 0;
            result = v4;
          }
          return result;
        }
        goto LABEL_21;
      }
      std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::_Copy(v4, v10 + _Count, v10);
      v3 = (char *)_Ptr;
      if ( v11 )
      {
LABEL_21:
        if ( v4->_Myres < 8 )
          v13 = (char *)v4;
        else
          v13 = (char *)v4->_Bx._Ptr;
        memcpy(&v13[2 * v4->_Mysize], v3, 2 * _Count);
        v14 = v4->_Myres < 8;
        v4->_Mysize = v11;
        if ( !v14 )
        {
          v4->_Bx._Ptr[v11] = 0;
          return v4;
        }
        v4->_Bx._Buf[v11] = 0;
        return v4;
      }
    }
    return v4;
  }
  if ( v5 < 8 )
    v8 = v4;
  else
    v8 = v4->_Bx._Ptr;
  return std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::append(
           v4,
           v4,
           ((char *)_Ptr - v8) >> 1,
           _Count);
}

//----- (0072C330) --------------------------------------------------------
void __cdecl CallSpawnerJS(std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *command)
{
  unsigned int v1; // edi@1
  unsigned int v2; // ecx@2
  _WORD *v3; // eax@3
  _WORD *v4; // eax@8
  void *v5; // eax@12
  std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > escapedCommand; // [sp+Ch] [bp-2Ch]@1
  int v7; // [sp+34h] [bp-4h]@1

  v1 = 0;
  memset((char *)communicationBuffer, 0, 0xFA0u);
  escapedCommand._Myres = 7;
  escapedCommand._Mysize = 0;
  escapedCommand._Bx._Buf[0] = 0;
  v7 = 0;
  if ( command->_Mysize <= 0 )
    goto LABEL_21;
  do
  {
    v2 = command->_Myres;
    if ( v2 < 8 )
      v3 = command;
    else
      v3 = command->_Bx._Ptr;
    if ( v3[v1] == 34 )
    {
      std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::append(
        &escapedCommand,
        &word_9CE908,
        1u);
    }
    else
    {
      if ( v2 < 8 )
        v4 = command;
      else
        v4 = command->_Bx._Ptr;
      std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::append(&escapedCommand, 1u, v4[v1]);
    }
    ++v1;
  }
  while ( v1 < command->_Mysize );
  v5 = escapedCommand._Bx._Ptr;
  if ( escapedCommand._Myres < 8 )
LABEL_21:
    v5 = &escapedCommand;
  if ( StringCbPrintfW(communicationBuffer, 0xFA0u, &pszFormat, v5) >= 0 )
    OutputDebugStringW(communicationBuffer);
  else
    OutputDebugStringW((LPCWSTR)&off_9CE958);
  if ( escapedCommand._Myres >= 8 )
    operator delete(escapedCommand._Bx._Ptr);
}
// 9CE958: using guessed type void *off_9CE958;

//----- (0072C440) --------------------------------------------------------
std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *__cdecl CallSpawnerJSAndReturnValue(std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *result, std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *command)
{
  unsigned int v2; // ebx@1
  unsigned int v3; // ecx@2
  _WORD *v4; // eax@3
  _WORD *v5; // eax@8
  void *v6; // eax@13
  signed int v7; // eax@17
  std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > escapedCommand; // [sp+14h] [bp-2Ch]@1
  int v10; // [sp+3Ch] [bp-4h]@1

  v2 = 0;
  memset((char *)communicationBuffer, 0, 0xFA0u);
  escapedCommand._Myres = 7;
  escapedCommand._Mysize = 0;
  escapedCommand._Bx._Buf[0] = 0;
  v10 = 0;
  if ( !command->_Mysize )
    goto LABEL_29;
  do
  {
    v3 = command->_Myres;
    if ( v3 < 8 )
      v4 = command;
    else
      v4 = command->_Bx._Ptr;
    if ( v4[v2] == 34 )
    {
      std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::append(
        &escapedCommand,
        &word_9CE90C,
        1u);
    }
    else
    {
      if ( v3 < 8 )
        v5 = command;
      else
        v5 = command->_Bx._Ptr;
      std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::append(&escapedCommand, 1u, v5[v2]);
    }
    ++v2;
  }
  while ( v2 < command->_Mysize );
  if ( escapedCommand._Myres >= 8 )
    v6 = escapedCommand._Bx._Ptr;
  else
LABEL_29:
    v6 = &escapedCommand;
  if ( StringCbPrintfW(communicationBuffer, 0xFA0u, &off_9CE9B8, v6) < 0 )
  {
    OutputDebugStringW(&off_9CEA00);
    result->_Myres = 7;
    result->_Mysize = 0;
    result->_Bx._Buf[0] = 0;
    std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::assign(
      result,
      (const wchar_t *)&unk_9CE954,
      0);
    goto LABEL_24;
  }
  memset((char *)resultBuffer, 0, 0xFA0u);
  v7 = GetEnvironmentVariableW(communicationBuffer, resultBuffer, 0xFA0u);
  if ( v7 >= 0 )
  {
    if ( v7 <= 2000 )
    {
      result->_Myres = 7;
      result->_Mysize = 0;
      result->_Bx._Buf[0] = 0;
      std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::assign(
        result,
        resultBuffer,
        wcslen(resultBuffer));
LABEL_24:
      if ( escapedCommand._Myres >= 8 )
        operator delete(escapedCommand._Bx._Ptr);
      return result;
    }
    OutputDebugStringW(&off_9CEB00);
    result->_Myres = 7;
    result->_Mysize = 0;
    result->_Bx._Buf[0] = 0;
    std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::assign(result, &word_9CEAFC, 0);
    if ( escapedCommand._Myres >= 8 )
      operator delete(escapedCommand._Bx._Ptr);
  }
  else
  {
    OutputDebugStringW(&off_9CEA80);
    result->_Myres = 7;
    result->_Mysize = 0;
    result->_Bx._Buf[0] = 0;
    std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::assign(result, &word_9CEA7C, 0);
    if ( escapedCommand._Myres >= 8 )
      operator delete(escapedCommand._Bx._Ptr);
  }
  return result;
}

//----- (0072C650) --------------------------------------------------------
void __thiscall CMD5Checksum::~CMD5Checksum(CMD5Checksum *this)
{
  this->vfptr = (CMD5ChecksumVtbl *)&CMD5Checksum::`vftable';
}
// 9CEB80: using guessed type int (__thiscall *CMD5Checksum::`vftable')(void *p, char);

//----- (0072C660) --------------------------------------------------------
CMD5Checksum *__thiscall CMD5Checksum::`vector deleting destructor'(CMD5Checksum *this, unsigned int a2)
{
  CMD5Checksum *v2; // esi@1

  v2 = this;
  this->vfptr = (CMD5ChecksumVtbl *)&CMD5Checksum::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9CEB80: using guessed type int (__thiscall *CMD5Checksum::`vftable')(void *p, char);

//----- (0072C690) --------------------------------------------------------
void __thiscall CMD5Checksum::Transform(CMD5Checksum *this, char *Block)
{
  CMD5Checksum *v2; // eax@1
  char *v3; // ecx@1
  unsigned int *v4; // edx@1
  signed int v5; // esi@1
  unsigned int v6; // esi@3
  unsigned int v7; // edx@3
  unsigned int v8; // ecx@3
  int v9; // eax@3
  int v10; // eax@3
  int v11; // ecx@3
  int v12; // ecx@3
  int v13; // edx@3
  int v14; // edx@3
  int v15; // esi@3
  int v16; // esi@3
  int v17; // eax@3
  int v18; // eax@3
  int v19; // ecx@3
  int v20; // ecx@3
  int v21; // edx@3
  int v22; // edx@3
  int v23; // esi@3
  int v24; // esi@3
  int v25; // eax@3
  int v26; // eax@3
  int v27; // ecx@3
  int v28; // ecx@3
  int v29; // edx@3
  int v30; // edx@3
  int v31; // esi@3
  int v32; // esi@3
  int v33; // eax@3
  int v34; // eax@3
  int v35; // ecx@3
  int v36; // ecx@3
  int v37; // edx@3
  int v38; // edx@3
  int v39; // esi@3
  int v40; // esi@3
  int v41; // eax@3
  int v42; // eax@3
  int v43; // ecx@3
  int v44; // ecx@3
  int v45; // edx@3
  int v46; // edx@3
  int v47; // esi@3
  int v48; // esi@3
  int v49; // eax@3
  unsigned int v50; // ecx@3
  int v51; // eax@3
  int v52; // ecx@3
  int v53; // edx@3
  int v54; // edx@3
  int v55; // esi@3
  int v56; // esi@3
  int v57; // eax@3
  unsigned int v58; // ecx@3
  int v59; // eax@3
  int v60; // ecx@3
  int v61; // edx@3
  int v62; // edx@3
  int v63; // esi@3
  int v64; // esi@3
  int v65; // eax@3
  unsigned int a; // ST14_4@3
  int v67; // ecx@3
  int v68; // ecx@3
  int v69; // edx@3
  int v70; // edx@3
  int v71; // esi@3
  int v72; // esi@3
  int v73; // eax@3
  int v74; // eax@3
  int v75; // ecx@3
  int v76; // ecx@3
  int v77; // edx@3
  int v78; // edx@3
  int v79; // esi@3
  int v80; // esi@3
  int v81; // eax@3
  int v82; // eax@3
  int v83; // edi@3
  int v84; // edi@3
  int v85; // edx@3
  int v86; // edx@3
  int v87; // ecx@3
  int v88; // ecx@3
  int v89; // eax@3
  int v90; // eax@3
  int v91; // esi@3
  int v92; // esi@3
  int v93; // edi@3
  int v94; // edi@3
  int v95; // ecx@3
  int v96; // ecx@3
  int v97; // eax@3
  int v98; // eax@3
  int v99; // edx@3
  int v100; // edx@3
  int v101; // esi@3
  int v102; // esi@3
  int v103; // ecx@3
  int v104; // ecx@3
  int v105; // eax@3
  int v106; // eax@3
  int v107; // edx@3
  int v108; // edx@3
  int v109; // esi@3
  int v110; // esi@3
  int v111; // ecx@3
  int v112; // ecx@3
  int v113; // eax@3
  int v114; // eax@3
  int v115; // edx@3
  int v116; // edx@3
  int v117; // esi@3
  int v118; // esi@3
  int v119; // ecx@3
  int v120; // ecx@3
  int v121; // eax@3
  int v122; // eax@3
  int v123; // edx@3
  int v124; // edx@3
  int v125; // esi@3
  int v126; // esi@3
  int v127; // edi@3
  int v128; // edi@3
  int v129; // eax@3
  int v130; // eax@3
  int v131; // edx@3
  int v132; // edx@3
  CMD5Checksum *v133; // ecx@3
  int v134; // esi@3
  int v135; // esi@3
  int v136; // eax@3
  CMD5Checksum *v137; // [sp+Ch] [bp-50h]@1
  unsigned int X[16]; // [sp+18h] [bp-44h]@1

  v2 = this;
  v137 = this;
  v3 = Block + 2;
  v4 = X;
  v5 = 16;
  do
  {
    *v4 = (unsigned __int8)*(v3 - 2) | (((unsigned __int8)*(v3 - 1) | (((unsigned __int8)*v3 | ((unsigned __int8)v3[1] << 8)) << 8)) << 8);
    ++v4;
    v3 += 4;
    --v5;
  }
  while ( v5 );
  v6 = v2->m_lMD5[1];
  v7 = v2->m_lMD5[2];
  v8 = v2->m_lMD5[3];
  v9 = __ROL4__(X[0] + (v6 & v7 | v8 & ~v6) + v2->m_lMD5[0] - 680876936, 7);
  v10 = v6 + v9;
  v11 = __ROL4__(X[1] + (v10 & v6 | v7 & ~v10) + v8 - 389564586, 12);
  v12 = v10 + v11;
  v13 = __ROR4__(X[2] + (v10 & v12 | v6 & ~v12) + v7 + 606105819, 15);
  v14 = v12 + v13;
  v15 = __ROR4__(X[3] + (v14 & v12 | v10 & ~v14) + v6 - 1044525330, 10);
  v16 = v14 + v15;
  v17 = __ROL4__(X[4] + (v16 & v14 | v12 & ~v16) + v10 - 176418897, 7);
  v18 = v16 + v17;
  v19 = __ROL4__(X[5] + (v18 & v16 | v14 & ~v18) + v12 + 1200080426, 12);
  v20 = v18 + v19;
  v21 = __ROR4__(X[6] + (v18 & v20 | v16 & ~v20) + v14 - 1473231341, 15);
  v22 = v20 + v21;
  v23 = __ROR4__(X[7] + (v22 & v20 | v18 & ~v22) + v16 - 45705983, 10);
  v24 = v22 + v23;
  v25 = __ROL4__(X[8] + (v24 & v22 | v20 & ~v24) + v18 + 1770035416, 7);
  v26 = v24 + v25;
  v27 = __ROL4__(X[9] + (v26 & v24 | v22 & ~v26) + v20 - 1958414417, 12);
  v28 = v26 + v27;
  v29 = __ROR4__(X[10] + (v26 & v28 | v24 & ~v28) + v22 - 42063, 15);
  v30 = v28 + v29;
  v31 = __ROR4__(X[11] + (v30 & v28 | v26 & ~v30) + v24 - 1990404162, 10);
  v32 = v30 + v31;
  v33 = __ROL4__(X[12] + (v32 & v30 | v28 & ~v32) + v26 + 1804603682, 7);
  v34 = v32 + v33;
  v35 = __ROL4__(X[13] + (v34 & v32 | v30 & ~v34) + v28 - 40341101, 12);
  v36 = v34 + v35;
  v37 = __ROR4__(X[14] + (v34 & v36 | v32 & ~v36) + v30 - 1502002290, 15);
  v38 = v36 + v37;
  v39 = __ROR4__(X[15] + (v38 & v36 | v34 & ~v38) + v32 + 1236535329, 10);
  v40 = v38 + v39;
  v41 = __ROL4__(X[1] + (v40 & v36 | v38 & ~v36) + v34 - 165796510, 5);
  v42 = v40 + v41;
  v43 = __ROL4__(X[6] + (v42 & v38 | v40 & ~v38) + v36 - 1069501632, 9);
  v44 = v42 + v43;
  v45 = __ROL4__(X[11] + (v40 & v44 | v42 & ~v40) + v38 + 643717713, 14);
  v46 = v44 + v45;
  v47 = __ROR4__(X[0] + (v42 & v46 | v44 & ~v42) + v40 - 373897302, 12);
  v48 = v46 + v47;
  v49 = __ROL4__(X[5] + (v48 & v44 | v46 & ~v44) + v42 - 701558691, 5);
  v50 = X[10] + ((v48 + v49) & v46 | v48 & ~v46) + v44 + 38016083;
  v51 = v48 + v49;
  v50 = __ROL4__(v50, 9);
  v52 = v51 + v50;
  v53 = __ROL4__(X[15] + (v48 & v52 | v51 & ~v48) + v46 - 660478335, 14);
  v54 = v52 + v53;
  v55 = __ROR4__(X[4] + (v51 & v54 | v52 & ~v51) + v48 - 405537848, 12);
  v56 = v54 + v55;
  v57 = __ROL4__(X[9] + (v56 & v52 | v54 & ~v52) + v51 + 568446438, 5);
  v58 = X[14] + ((v56 + v57) & v54 | v56 & ~v54) + v52 - 1019803690;
  v59 = v56 + v57;
  v58 = __ROL4__(v58, 9);
  v60 = v59 + v58;
  v61 = __ROL4__(X[3] + (v56 & v60 | v59 & ~v56) + v54 - 187363961, 14);
  v62 = v60 + v61;
  v63 = __ROR4__(X[8] + (v59 & v62 | v60 & ~v59) + v56 + 1163531501, 12);
  v64 = v62 + v63;
  v65 = __ROL4__(X[13] + (v64 & v60 | v62 & ~v60) + v59 - 1444681467, 5);
  a = v64 + v65;
  v67 = __ROL4__(X[2] + ((v64 + v65) & v62 | v64 & ~v62) + v60 - 51403784, 9);
  v68 = v64 + v65 + v67;
  v69 = __ROL4__(X[7] + (v64 & v68 | (v64 + v65) & ~v64) + v62 + 1735328473, 14);
  v70 = v68 + v69;
  v71 = __ROR4__(X[12] + (a & v70 | v68 & ~a) + v64 - 1926607734, 12);
  v72 = v70 + v71;
  v73 = __ROL4__(X[5] + (v72 ^ v70 ^ v68) + a - 378558, 4);
  v74 = v72 + v73;
  v75 = __ROL4__(X[8] + (v74 ^ v72 ^ v70) + v68 - 2022574463, 11);
  v76 = v74 + v75;
  v77 = __ROL4__(X[11] + (v74 ^ v72 ^ v76) + v70 + 1839030562, 16);
  v78 = v76 + v77;
  v79 = __ROR4__(X[14] + (v74 ^ v78 ^ v76) + v72 - 35309556, 9);
  v80 = v78 + v79;
  v81 = __ROL4__(X[1] + (v80 ^ v78 ^ v76) + v74 - 1530992060, 4);
  v82 = v80 + v81;
  v83 = __ROL4__(X[4] + (v82 ^ v80 ^ v78) + v76 + 1272893353, 11);
  v84 = v82 + v83;
  v85 = __ROL4__(X[7] + (v82 ^ v80 ^ v84) + v78 - 155497632, 16);
  v86 = v84 + v85;
  v87 = __ROR4__(X[10] + (v82 ^ v86 ^ v84) + v80 - 1094730640, 9);
  v88 = v86 + v87;
  v89 = __ROL4__(X[13] + (v88 ^ v86 ^ v84) + v82 + 681279174, 4);
  v90 = v88 + v89;
  v91 = __ROL4__(X[0] + (v90 ^ v88 ^ v86) + v84 - 358537222, 11);
  v92 = v90 + v91;
  v93 = __ROL4__(X[3] + (v90 ^ v88 ^ v92) + v86 - 722521979, 16);
  v94 = v92 + v93;
  v95 = __ROR4__(X[6] + (v90 ^ v94 ^ v92) + v88 + 76029189, 9);
  v96 = v94 + v95;
  v97 = __ROL4__(X[9] + (v96 ^ v94 ^ v92) + v90 - 640364487, 4);
  v98 = v96 + v97;
  v99 = __ROL4__(X[12] + (v98 ^ v96 ^ v94) + v92 - 421815835, 11);
  v100 = v98 + v99;
  v101 = __ROL4__(X[15] + (v98 ^ v96 ^ v100) + v94 + 530742520, 16);
  v102 = v100 + v101;
  v103 = __ROR4__(X[2] + (v98 ^ v102 ^ v100) + v96 - 995338651, 9);
  v104 = v102 + v103;
  v105 = __ROL4__(X[0] + (v102 ^ (v104 | ~v100)) + v98 - 198630844, 6);
  v106 = v104 + v105;
  v107 = __ROL4__(X[7] + (v104 ^ (v106 | ~v102)) + v100 + 1126891415, 10);
  v108 = v106 + v107;
  v109 = __ROL4__(X[14] + (v106 ^ (v108 | ~v104)) + v102 - 1416354905, 15);
  v110 = v108 + v109;
  v111 = __ROR4__(X[5] + (v108 ^ (v110 | ~v106)) + v104 - 57434055, 11);
  v112 = v110 + v111;
  v113 = __ROL4__(X[12] + (v110 ^ (v112 | ~v108)) + v106 + 1700485571, 6);
  v114 = v112 + v113;
  v115 = __ROL4__(X[3] + (v112 ^ (v114 | ~v110)) + v108 - 1894986606, 10);
  v116 = v114 + v115;
  v117 = __ROL4__(X[10] + (v114 ^ (v116 | ~v112)) + v110 - 1051523, 15);
  v118 = v116 + v117;
  v119 = __ROR4__(X[1] + (v116 ^ (v118 | ~v114)) + v112 - 2054922799, 11);
  v120 = v118 + v119;
  v121 = __ROL4__(X[8] + (v118 ^ (v120 | ~v116)) + v114 + 1873313359, 6);
  v122 = v120 + v121;
  v123 = __ROL4__(X[15] + (v120 ^ (v122 | ~v118)) + v116 - 30611744, 10);
  v124 = v122 + v123;
  v125 = __ROL4__(X[6] + (v122 ^ (v124 | ~v120)) + v118 - 1560198380, 15);
  v126 = v124 + v125;
  v127 = __ROR4__(X[13] + (v124 ^ (v126 | ~v122)) + v120 + 1309151649, 11);
  v128 = v126 + v127;
  v129 = __ROL4__(X[4] + (v126 ^ (v128 | ~v124)) + v122 - 145523070, 6);
  v130 = v128 + v129;
  v131 = __ROL4__(X[11] + (v128 ^ (v130 | ~v126)) + v124 - 1120210379, 10);
  v132 = v130 + v131;
  v133 = v137;
  v134 = __ROL4__(X[2] + (v130 ^ (v132 | ~v128)) + v126 + 718787259, 15);
  v135 = v132 + v134;
  v137->m_lMD5[0] += v130;
  v136 = __ROR4__(X[9] + (v132 ^ (v135 | ~v130)) + v128 - 343485551, 11);
  v133->m_lMD5[1] += v135 + v136;
  v133->m_lMD5[2] += v135;
  v137->m_lMD5[3] += v132;
}

//----- (0072CD70) --------------------------------------------------------
void __thiscall CMD5Checksum::Update(CMD5Checksum *this, char *Input, unsigned int nInputLen)
{
  CMD5Checksum *v3; // esi@1
  unsigned int v4; // ecx@1
  unsigned int v5; // edi@1
  unsigned int v6; // eax@1
  unsigned int v7; // ecx@1
  int v8; // eax@1
  int v9; // ebx@3
  unsigned int j; // ebx@4
  unsigned int i; // [sp+18h] [bp+Ch]@4

  v3 = this;
  v4 = this->m_nCount[0];
  v5 = nInputLen;
  v6 = v4 >> 3;
  v7 = v4 + 8 * nInputLen;
  v8 = v6 & 0x3F;
  v3->m_nCount[0] = v7;
  if ( v7 < 8 * nInputLen )
    ++v3->m_nCount[1];
  v3->m_nCount[1] += nInputLen >> 29;
  v9 = 64 - v8;
  if ( nInputLen < 64 - v8 )
  {
    i = 0;
  }
  else
  {
    memcpy(&v3->m_lpszBuffer[v8], Input, 64 - v8);
    CMD5Checksum::Transform(v3, v3->m_lpszBuffer);
    i = v9;
    for ( j = v9 + 63; j < v5; j += 64 )
    {
      CMD5Checksum::Transform(v3, &Input[j - 63]);
      i += 64;
    }
    v8 = 0;
  }
  memcpy(&v3->m_lpszBuffer[v8], &Input[i], v5 - i);
}

//----- (0072CE20) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall CMD5Checksum::Final(CMD5Checksum *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result)
{
  CMD5Checksum *v2; // esi@1
  unsigned int v3; // ecx@1
  int v4; // eax@1
  unsigned int v5; // ecx@3
  signed int v6; // eax@3
  unsigned int v7; // ecx@5
  int v8; // eax@5
  signed int v9; // esi@7
  unsigned __int8 v10; // al@8
  unsigned int v11; // edx@20
  unsigned int v12; // ecx@21
  unsigned int v13; // edx@21
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > Str; // [sp+14h] [bp-78h]@13
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > strMD5; // [sp+30h] [bp-5Ch]@7
  char lptemp[32]; // [sp+4Ch] [bp-40h]@9
  char v18; // [sp+6Ch] [bp-20h]@6
  char v19; // [sp+6Dh] [bp-1Fh]@6
  char v20; // [sp+6Eh] [bp-1Eh]@6
  char v21[5]; // [sp+6Fh] [bp-1Dh]@6
  char Bits[8]; // [sp+74h] [bp-18h]@1
  int v23; // [sp+88h] [bp-4h]@7

  v2 = this;
  *(_DWORD *)&Bits[4] = 0;
  v3 = 0;
  v4 = (int)v2->m_nCount;
  do
  {
    Bits[v3] = *(_BYTE *)v4;
    Bits[v3 + 1] = *(_BYTE *)(v4 + 1);
    Bits[v3 + 2] = *(_BYTE *)(v4 + 2);
    Bits[v3 + 3] = *(_BYTE *)(v4 + 3);
    v3 += 4;
    v4 += 4;
  }
  while ( v3 < 8 );
  v5 = (v2->m_nCount[0] >> 3) & 0x3F;
  v6 = 56;
  if ( v5 >= 0x38 )
    v6 = 120;
  CMD5Checksum::Update(v2, PADDING, v6 - v5);
  CMD5Checksum::Update(v2, Bits, 8u);
  v7 = 0;
  v8 = (int)&v2->m_lMD5[0] + 2;
  do
  {
    *(&v18 + v7) = *(_BYTE *)(v8 - 2);
    *(&v19 + v7) = *(_BYTE *)(v8 - 1);
    *(&v20 + v7) = *(_BYTE *)v8;
    v21[v7] = *(_BYTE *)(v8 + 1);
    v7 += 4;
    v8 += 4;
  }
  while ( v7 < 0x10 );
  strMD5._Myres = 15;
  strMD5._Mysize = 0;
  strMD5._Bx._Buf[0] = 0;
  v23 = 0;
  v9 = 0;
  do
  {
    v10 = *(&v18 + v9);
    if ( v10 )
    {
      if ( v10 > 0xFu )
        sprintf(lptemp, "%x", v10);
      else
        sprintf(lptemp, "0%x", v10);
    }
    else
    {
      sprintf(lptemp, "00");
    }
    Str._Myres = 15;
    Str._Mysize = 0;
    Str._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&Str, lptemp, strlen(lptemp));
    LOBYTE(v23) = 1;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::append(&strMD5, &Str, 0, 0xFFFFFFFF);
    LOBYTE(v23) = 0;
    if ( Str._Myres >= 0x10 )
      operator delete(Str._Bx._Ptr);
    ++v9;
  }
  while ( v9 < 16 );
  result->_Myres = 15;
  result->_Mysize = 0;
  result->_Bx._Buf[0] = 0;
  if ( result == &strMD5 )
  {
    if ( strMD5._Myres >= 0x10 )
      operator delete(strMD5._Bx._Ptr);
  }
  else
  {
    if ( result->_Myres >= 0x10 )
      operator delete(result->_Bx._Ptr);
    result->_Myres = 15;
    result->_Mysize = 0;
    result->_Bx._Buf[0] = 0;
    if ( strMD5._Myres >= 0x10 )
    {
      v12 = strMD5._Mysize;
      v13 = strMD5._Myres;
      result->_Bx._Ptr = strMD5._Bx._Ptr;
      result->_Mysize = v12;
      result->_Myres = v13;
    }
    else
    {
      memmove(result->_Bx._Buf, strMD5._Bx._Buf, strMD5._Mysize + 1);
      v11 = strMD5._Myres;
      result->_Mysize = strMD5._Mysize;
      result->_Myres = v11;
    }
  }
  return result;
}
// 72CE20: using guessed type char var_1D[5];

//----- (0072D030) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__cdecl CMD5Checksum::GetMD5(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result, char *pBuf, unsigned int nLength)
{
  CMD5Checksum MD5Checksum; // [sp+14h] [bp-6Ch]@1
  int v5; // [sp+7Ch] [bp-4h]@1

  MD5Checksum.vfptr = (CMD5ChecksumVtbl *)&CMD5Checksum::`vftable';
  memset(MD5Checksum.m_lpszBuffer, 0, 0x40u);
  MD5Checksum.m_nCount[1] = 0;
  MD5Checksum.m_nCount[0] = 0;
  MD5Checksum.m_lMD5[0] = 1732584193;
  MD5Checksum.m_lMD5[1] = -271733879;
  MD5Checksum.m_lMD5[2] = -1732584194;
  MD5Checksum.m_lMD5[3] = 271733878;
  v5 = 0;
  CMD5Checksum::Update(&MD5Checksum, pBuf, nLength);
  CMD5Checksum::Final(&MD5Checksum, result);
  return result;
}
// 9CEB80: using guessed type int (__thiscall *CMD5Checksum::`vftable')(void *p, char);

//----- (0072D0E0) --------------------------------------------------------
void __thiscall CDataReader::CDataReader(CDataReader *this)
{
  this->vfptr = (CDataReaderVtbl *)&CDataReader::`vftable';
  *(_QWORD *)&this->m_sFileMD5.n8_code[6] = 0i64;
  *(_QWORD *)&this->m_sFileMD5.n8_code[4] = 0i64;
  *(_QWORD *)&this->m_sFileMD5.n8_code[2] = 0i64;
  *(_QWORD *)&this->m_sFileMD5.n8_name[0] = 0i64;
  this->m_pHead = 0;
  this->m_nBFSize = 0;
  this->m_nDataArraySize = 0;
  this->m_nFileCheckSum = 0;
}
// 9CEB94: using guessed type int (__thiscall *CDataReader::`vftable')(void *p, char);

//----- (0072D110) --------------------------------------------------------
void __thiscall CDataReader::ClearBF(CDataReader *this)
{
  CDataReader *v1; // esi@1

  v1 = this;
  if ( this->m_nBFSize )
  {
    operator delete(this->m_pHead);
    v1->m_pHead = 0;
    v1->m_pData = 0;
  }
  v1->m_nFileCheckSum = 0;
  v1->m_nBFSize = 0;
}

//----- (0072D140) --------------------------------------------------------
void __cdecl CDataReader::Encription(char *pBF, unsigned int nSize)
{
  char v2; // al@1
  signed int v3; // ecx@1
  char Key_3; // [sp+Fh] [bp+Fh]@1

  v2 = nSize;
  v3 = nSize - 1;
  for ( Key_3 = nSize; v3 >= 0; Key_3 = v2 )
  {
    pBF[v3] ^= v2;
    v2 = Key_3 ^ ((v3 & 0xF) + 85) ^ 11 * v3 ^ 0xAA;
    --v3;
  }
}

//----- (0072D180) --------------------------------------------------------
char *__thiscall CDataReader::GetRecord(CDataReader *this, unsigned int RecordNo)
{
  CDataReader::HEAD *v2; // eax@1
  char *result; // eax@2

  v2 = this->m_pHead;
  if ( v2 && RecordNo < v2->nNumOfRecord )
    result = this->m_pDataArray[RecordNo];
  else
    result = 0;
  return result;
}

//----- (0072D1B0) --------------------------------------------------------
void __thiscall CDataReader::~CDataReader(CDataReader *this)
{
  CDataReader *v1; // esi@1

  v1 = this;
  this->vfptr = (CDataReaderVtbl *)&CDataReader::`vftable';
  if ( this->m_nBFSize )
  {
    operator delete(this->m_pHead);
    v1->m_pHead = 0;
    v1->m_pData = 0;
  }
  v1->m_nBFSize = 0;
  v1->m_nFileCheckSum = 0;
  if ( v1->m_nDataArraySize )
    operator delete[](v1->m_pDataArray);
  v1->m_nDataArraySize = 0;
}
// 9CEB94: using guessed type int (__thiscall *CDataReader::`vftable')(void *p, char);

//----- (0072D1F0) --------------------------------------------------------
CDataReader *__thiscall CDataReader::`scalar deleting destructor'(CDataReader *this, unsigned int a2)
{
  CDataReader *v2; // esi@1

  v2 = this;
  this->vfptr = (CDataReaderVtbl *)&CDataReader::`vftable';
  if ( this->m_nBFSize )
  {
    operator delete(this->m_pHead);
    v2->m_pHead = 0;
    v2->m_pData = 0;
  }
  v2->m_nBFSize = 0;
  v2->m_nFileCheckSum = 0;
  if ( v2->m_nDataArraySize )
    operator delete[](v2->m_pDataArray);
  v2->m_nDataArraySize = 0;
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9CEB94: using guessed type int (__thiscall *CDataReader::`vftable')(void *p, char);

//----- (0072D250) --------------------------------------------------------
int __thiscall CDataReader::Read(CDataReader *this, const char *pFN)
{
  CDataReader *v2; // esi@1
  _iobuf *v3; // eax@1
  _iobuf *v4; // edi@1
  int v5; // eax@2
  unsigned int v6; // eax@2
  unsigned int v7; // ecx@2
  CDataReader::HEAD *v8; // eax@5
  unsigned int v9; // ecx@5
  int result; // eax@10
  CDataReader::HEAD *v11; // eax@11
  CDataReader::HEAD *v12; // eax@14
  unsigned int v13; // edi@15
  unsigned int v14; // eax@17
  char *v15; // eax@21
  unsigned int i; // ecx@21
  unsigned int v17; // eax@23
  CDataReader::HEAD *v18; // edx@24
  unsigned int v19; // ecx@24
  char *v20; // eax@26
  int v21; // esi@28
  Name8 v22; // [sp-20h] [bp-64h]@28
  char *v23; // [sp-Ch] [bp-50h]@28
  char *v24; // [sp-8h] [bp-4Ch]@28
  unsigned int v25; // [sp-4h] [bp-48h]@5
  unsigned int nSize; // [sp+10h] [bp-34h]@6
  char *FileName; // [sp+14h] [bp-30h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > sFileMD5; // [sp+18h] [bp-2Ch]@26
  int v29; // [sp+40h] [bp-4h]@26

  v2 = this;
  FileName = (char *)pFN;
  v3 = fopen(pFN, "rb");
  v4 = v3;
  if ( !v3 )
    return 0;
  v5 = _fileno(v3);
  v6 = _filelength(v5);
  v7 = v2->m_nBFSize;
  v2->m_nFileSize = v6;
  if ( v7 < v6 )
  {
    if ( v7 )
    {
      operator delete(v2->m_pHead);
      v2->m_pHead = 0;
      v2->m_pData = 0;
    }
    v25 = v2->m_nFileSize;
    v2->m_nBFSize = 0;
    v2->m_nFileCheckSum = 0;
    v8 = (CDataReader::HEAD *)operator new[](v25);
    v9 = v2->m_nFileSize;
    v2->m_pHead = v8;
    v2->m_pData = 0;
    v2->m_nBFSize = v9;
  }
  nSize = fread(v2->m_pHead, v2->m_nFileSize, 1u, v4);
  fclose(v4);
  if ( nSize != 1 )
  {
    if ( v2->m_nBFSize )
    {
      operator delete(v2->m_pHead);
      v2->m_pHead = 0;
      v2->m_pData = 0;
    }
    v2->m_nBFSize = 0;
    v2->m_nFileCheckSum = 0;
    return 0;
  }
  v11 = v2->m_pHead;
  if ( v11 && v11->nDataMode )
    CDataReader::Encription((char *)&v11->nDataSize, v2->m_nFileSize - 36);
  v12 = v2->m_pHead;
  v2->m_pData = (char *)&v12[1] + 56 * v12->nNumOfField;
  if ( v12 )
    v13 = v12->nNumOfRecord;
  else
    v13 = 0;
  v14 = v2->m_nDataArraySize;
  if ( v14 < v13 )
  {
    if ( v14 )
      operator delete[](v2->m_pDataArray);
    v2->m_nDataArraySize = 0;
    v2->m_pDataArray = (char **)operator new[](4 * v13);
    v2->m_nDataArraySize = v13;
  }
  v15 = v2->m_pData;
  for ( i = 0; i < v13; v15 += *(_WORD *)v15 )
    v2->m_pDataArray[i++] = v15 + 2;
  v17 = 0;
  v2->m_nFileCheckSum = 0;
  if ( v2->m_nBFSize > 0 )
  {
    v18 = v2->m_pHead;
    v19 = 0;
    do
    {
      v19 += v17 * *((_BYTE *)&v18->nVersionKey + v17);
      ++v17;
      v2->m_nFileCheckSum = v19;
    }
    while ( v17 < v2->m_nBFSize );
  }
  CMD5Checksum::GetMD5(&sFileMD5, (char *)v2->m_pHead, v2->m_nBFSize);
  v20 = sFileMD5._Bx._Ptr;
  v29 = 0;
  if ( sFileMD5._Myres < 0x10 )
    v20 = (char *)&sFileMD5;
  v21 = (int)&v2->m_sFileMD5;
  v25 = 32;
  v24 = v20;
  v23 = (char *)v21;
  *(_DWORD *)(v21 + 28) = 0;
  *(_DWORD *)(v21 + 24) = 0;
  *(_DWORD *)(v21 + 20) = 0;
  *(_DWORD *)(v21 + 16) = 0;
  *(_DWORD *)(v21 + 12) = 0;
  *(_DWORD *)(v21 + 8) = 0;
  *(_DWORD *)(v21 + 4) = 0;
  *(_DWORD *)v21 = 0;
  strncpy(v23, v24, v25);
  qmemcpy(&v22, (const void *)v21, sizeof(v22));
  if ( CShnDataFileCheckSum::InitDataFileCheckSum(&ShnDataFile, FileName, v22) )
  {
    if ( sFileMD5._Myres >= 0x10 )
      operator delete(sFileMD5._Bx._Ptr);
    result = 1;
  }
  else
  {
    if ( sFileMD5._Myres >= 0x10 )
      operator delete(sFileMD5._Bx._Ptr);
    result = 0;
  }
  return result;
}

//----- (0072D4B0) --------------------------------------------------------
int __thiscall CDataReader::Read(CDataReader *this, const char *pFN, unsigned int nVersionKey, unsigned int nStructSize)
{
  CDataReader *v4; // esi@1
  int result; // eax@2
  CDataReader::HEAD *v6; // eax@3

  v4 = this;
  if ( CDataReader::Read(this, pFN) && (v6 = v4->m_pHead, v6->nVersionKey == nVersionKey) )
    result = v6->nFieldSize - 2 == nStructSize;
  else
    result = 0;
  return result;
}

//----- (0072D4F0) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned short>>,0>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned short>>(std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > *this, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> *_Val)
{
  std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > *v2; // esi@1
  void *v3; // edi@1
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> *v4; // ebx@3
  int v6; // [sp+0h] [bp-38h]@1
  std::exception pExceptionObject; // [sp+10h] [bp-28h]@5
  char *v8; // [sp+1Ch] [bp-1Ch]@2
  char *v9; // [sp+20h] [bp-18h]@2
  void *p; // [sp+24h] [bp-14h]@1
  int *v11; // [sp+28h] [bp-10h]@1
  int v12; // [sp+34h] [bp-4h]@2

  v11 = &v6;
  v2 = this;
  v3 = operator new(0x30u);
  p = v3;
  if ( !v3 )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  *(_DWORD *)v3 = v2->_Myhead;
  *((_DWORD *)v3 + 1) = v2->_Myhead;
  *((_DWORD *)v3 + 2) = v2->_Myhead;
  *((_WORD *)v3 + 22) = 0;
  v12 = 0;
  v9 = (char *)v3 + 12;
  v8 = (char *)v3 + 12;
  LOBYTE(v12) = 1;
  if ( v3 != (void *)-12 )
  {
    v4 = _Val;
    *((_DWORD *)v3 + 8) = 15;
    *((_DWORD *)v3 + 7) = 0;
    *((_BYTE *)v3 + 12) = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)v3 + 12),
      &v4->first,
      0,
      0xFFFFFFFF);
    *((_WORD *)v3 + 20) = v4->second;
  }
  return (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *)v3;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0072D5D0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned short>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > _Where, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *_Node)
{
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *v4; // ebx@1
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > *v5; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v6; // eax@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v7; // edi@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > *v8; // eax@2
  char *v9; // eax@4
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *v10; // eax@17
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *v11; // ecx@23
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > >,bool> v12; // [sp+Ch] [bp-8h]@23

  v4 = _Node;
  v5 = (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > *)this;
  v6 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)this->_Myhead;
  v7 = &_Node->_Myval.first;
  if ( !this->_Mysize )
  {
    std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned short>>,0>>::_Insert(
      (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > *)this,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > > *)result,
      1,
      v6,
      (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)_Node);
    return result;
  }
  if ( _Where._Ptr == (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *)v6->_Left )
  {
    v9 = _Where._Ptr->_Myval.first._Bx._Buf;
    if ( _Where._Ptr->_Myval.first._Myres >= 0x10 )
      v9 = *(char **)v9;
    if ( std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
           &_Node->_Myval.first,
           0,
           _Node->_Myval.first._Mysize,
           v9,
           _Where._Ptr->_Myval.first._Mysize) < 0 )
    {
      std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned short>>,0>>::_Insert(
        v5,
        (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > > *)result,
        1,
        (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)_Where._Ptr,
        (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)v4);
      return result;
    }
    goto LABEL_23;
  }
  if ( (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)_Where._Ptr == v6 )
  {
    if ( std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::operator()(
           &v6->_Right->_Myval.first,
           &_Node->_Myval.first) )
    {
      std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned short>>,0>>::_Insert(
        v5,
        (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > > *)result,
        0,
        v5->_Myhead->_Right,
        (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)v4);
      return result;
    }
    goto LABEL_23;
  }
  if ( std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::operator()(
         &_Node->_Myval.first,
         &_Where._Ptr->_Myval.first) )
  {
    _Node = _Where._Ptr;
    std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,bool,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,bool>>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >,std::_Iterator_base0> *)&_Node);
    if ( std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::operator()(
           &_Node->_Myval.first,
           v7) )
    {
      if ( _Node->_Right->_Isnil )
      {
        std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned short>>,0>>::_Insert(
          v5,
          (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > > *)result,
          0,
          (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)_Node,
          (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)v4);
        v8 = result;
      }
      else
      {
        std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned short>>,0>>::_Insert(
          v5,
          (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > > *)result,
          1,
          (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)_Where._Ptr,
          (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)v4);
        v8 = result;
      }
      return v8;
    }
  }
  if ( !std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::operator()(
          &_Where._Ptr->_Myval.first,
          v7) )
    goto LABEL_23;
  _Node = _Where._Ptr;
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,NiPointer<NiAmbientLight>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,NiPointer<NiAmbientLight>>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,NiPointer<INsFile_NodeCreater>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,NiPointer<INsFile_NodeCreater> > >,0> >,std::_Iterator_base0> *)&_Node);
  v10 = _Node;
  if ( _Node == (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *)v5->_Myhead )
    goto LABEL_20;
  if ( !std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::operator()(
          v7,
          &_Node->_Myval.first) )
  {
LABEL_23:
    v11 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *)std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned int>>,0>>::_Linsert(v5, &v12, (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)v4, 0)->first._Ptr;
    v8 = result;
    result->_Ptr = v11;
    return v8;
  }
  v10 = _Node;
LABEL_20:
  if ( _Where._Ptr->_Right->_Isnil )
  {
    std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned short>>,0>>::_Insert(
      v5,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > > *)result,
      0,
      (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)_Where._Ptr,
      (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)v4);
    v8 = result;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned short>>,0>>::_Insert(
      v5,
      (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > > *)result,
      1,
      (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)v10,
      (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)v4);
    v8 = result;
  }
  return v8;
}

//----- (0072D790) --------------------------------------------------------
unsigned __int16 *__thiscall std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned short>>>::operator[](std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> > > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Keyval)
{
  std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> > > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *v3; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > v4; // ebx@1
  const char *v5; // eax@2
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *v6; // eax@5
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *v7; // esi@5
  unsigned __int16 *v8; // eax@7
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > > result; // [sp+10h] [bp-34h]@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v10; // [sp+14h] [bp-30h]@5
  __int16 v11; // [sp+30h] [bp-14h]@5
  int v12; // [sp+40h] [bp-4h]@5

  v2 = this;
  v3 = std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,int,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,int>>,1>>::_Lbound(
         (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> > *)this,
         _Keyval);
  v4._Ptr = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> >::_Node *)v3;
  if ( v3 == (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CAbstractProperty *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,CAbstractProperty *> >,0> >::_Node *)v2->_Myhead )
    goto LABEL_11;
  v5 = v3->_Myval.first._Bx._Buf;
  if ( v4._Ptr->_Myval.first._Myres >= 0x10 )
    v5 = *(const char **)v5;
  if ( std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
         _Keyval,
         0,
         _Keyval->_Mysize,
         v5,
         v4._Ptr->_Myval.first._Mysize) >= 0 )
  {
    v8 = &v4._Ptr->_Myval.second;
  }
  else
  {
LABEL_11:
    v10._Myres = 15;
    v10._Mysize = 0;
    v10._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v10, _Keyval, 0, 0xFFFFFFFF);
    v11 = 0;
    v12 = 0;
    v6 = std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned short>>,0>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned short>>(
           (std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > *)&v2->comp,
           (std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> *)&v10);
    std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned short>>,0>>::_Insert(
      (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> >,0> > *)&v2->comp,
      &result,
      v4,
      v6);
    v7 = result._Ptr;
    if ( v10._Myres >= 0x10 )
      operator delete(v10._Bx._Ptr);
    v8 = &v7->_Myval.second;
  }
  return v8;
}

//----- (0072D870) --------------------------------------------------------
int __thiscall CSingleDataMap::InitSingleDataArray(CSingleDataMap *this, const char *pFN, unsigned int nVersionKey, unsigned int nStructSize)
{
  unsigned int v5; // edi@6
  char *v6; // eax@7
  char *v7; // esi@7
  unsigned __int16 v8; // si@8
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Keyval; // [sp+10h] [bp-74h]@8
  std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> > > *v10; // [sp+2Ch] [bp-58h]@1
  unsigned int nDataCount; // [sp+30h] [bp-54h]@4
  CDataReader SingleData; // [sp+34h] [bp-50h]@1
  int v13; // [sp+80h] [bp-4h]@1

  v10 = (std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,unsigned short> > > *)this;
  CDataReader::CDataReader(&SingleData);
  v13 = 0;
  if ( !CDataReader::Read(&SingleData, pFN, nVersionKey, nStructSize) )
  {
LABEL_2:
    v13 = -1;
    CDataReader::~CDataReader(&SingleData);
    return 0;
  }
  if ( SingleData.m_pHead )
    nDataCount = SingleData.m_pHead->nNumOfRecord;
  else
    nDataCount = 0;
  v5 = 0;
  if ( nDataCount > 0 )
  {
    do
    {
      v6 = CDataReader::GetRecord(&SingleData, v5);
      v7 = v6;
      if ( !v6 )
        goto LABEL_2;
      _Keyval._Myres = 15;
      _Keyval._Mysize = 0;
      _Keyval._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Keyval, v6, strlen(v6));
      v8 = *((_WORD *)v7 + 16);
      LOBYTE(v13) = 1;
      *std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned short>>>::operator[](
         v10,
         &_Keyval) = v8;
      LOBYTE(v13) = 0;
      if ( _Keyval._Myres >= 0x10 )
        operator delete(_Keyval._Bx._Ptr);
      ++v5;
      _Keyval._Myres = 15;
      _Keyval._Mysize = 0;
      _Keyval._Bx._Buf[0] = 0;
    }
    while ( v5 < nDataCount );
  }
  v13 = -1;
  CDataReader::~CDataReader(&SingleData);
  return 1;
}

//----- (0072D9A0) --------------------------------------------------------
__int16 __thiscall CSingleDataMap::GetValue(CSingleDataMap *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > sIndex)
{
  __int16 v2; // si@1

  v2 = *std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,unsigned short,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,unsigned short>>>::operator[](
          &this->m_SingleData,
          &sIndex);
  if ( sIndex._Myres >= 0x10 )
    operator delete(sIndex._Bx._Ptr);
  return v2;
}

//----- (0072DA00) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *__cdecl std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Min(std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Pnode)
{
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v2; // ecx@1

  result = _Pnode;
  v2 = _Pnode->_Left;
  if ( !_Pnode->_Left->_Isnil )
  {
    do
    {
      result = v2;
      v2 = v2->_Left;
    }
    while ( !v2->_Isnil );
  }
  return result;
}

//----- (0072DA20) --------------------------------------------------------
std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >,std::_Iterator_base0> *__thiscall std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>,std::_Iterator_base0>::operator--(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >,std::_Iterator_base0> *this)
{
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >,std::_Iterator_base0> *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v2; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *i; // edx@3
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v4; // ecx@4
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v5; // edx@5

  result = this;
  v2 = this->_Ptr;
  if ( v2->_Isnil )
  {
    result->_Ptr = v2->_Right;
    return result;
  }
  i = v2->_Left;
  if ( !v2->_Left->_Isnil )
  {
    v4 = i->_Right;
    if ( !v4->_Isnil )
    {
      do
      {
        v5 = v4;
        v4 = v4->_Right;
      }
      while ( !v4->_Isnil );
      result->_Ptr = v5;
      return result;
    }
LABEL_11:
    result->_Ptr = i;
    return result;
  }
  for ( i = v2->_Parent; !i->_Isnil; i = i->_Parent )
  {
    if ( result->_Ptr != i->_Left )
      break;
    result->_Ptr = i;
  }
  if ( !result->_Ptr->_Isnil )
    goto LABEL_11;
  return result;
}

//----- (0072DA80) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::_Rrotate(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Wherenode)
{
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v2; // eax@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v3; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v4; // ecx@3
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v5; // ecx@5

  v2 = _Wherenode->_Left;
  _Wherenode->_Left = _Wherenode->_Left->_Right;
  v3 = v2->_Right;
  if ( !v3->_Isnil )
    v3->_Parent = _Wherenode;
  v2->_Parent = _Wherenode->_Parent;
  v4 = this->_Myhead;
  if ( _Wherenode == v4->_Parent )
  {
    v4->_Parent = v2;
    v2->_Right = _Wherenode;
    _Wherenode->_Parent = v2;
  }
  else
  {
    v5 = _Wherenode->_Parent;
    if ( _Wherenode == v5->_Right )
    {
      v5->_Right = v2;
      v2->_Right = _Wherenode;
      _Wherenode->_Parent = v2;
    }
    else
    {
      v5->_Left = v2;
      v2->_Right = _Wherenode;
      _Wherenode->_Parent = v2;
    }
  }
}

//----- (0072DAE0) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Lbound(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Keyval)
{
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *result; // eax@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v3; // edi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v4; // edx@2
  unsigned int v5; // ebx@2
  const char *v6; // eax@4
  unsigned int v7; // esi@6
  unsigned int v8; // ecx@6
  int v9; // eax@10
  bool v10; // sf@10
  unsigned int v11; // [sp+4h] [bp-8h]@2
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Wherenode; // [sp+8h] [bp-4h]@1

  result = this->_Myhead;
  v3 = result->_Parent;
  _Wherenode = this->_Myhead;
  if ( !v3->_Isnil )
  {
    v4 = _Keyval;
    v5 = _Keyval->_Mysize;
    v11 = _Keyval->_Myres;
    while ( 1 )
    {
      v6 = v3->_Myval.first._Bx._Buf;
      if ( v11 >= 0x10 )
        v4 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v4->_Bx._Ptr;
      v7 = v3->_Myval.first._Mysize;
      v8 = v3->_Myval.first._Mysize;
      if ( v7 >= v5 )
        v8 = v5;
      if ( v3->_Myval.first._Myres >= 0x10 )
        v6 = *(const char **)v6;
      v9 = std::char_traits<char>::compare(v6, v4->_Bx._Buf, v8);
      v10 = v9 < 0;
      if ( !v9 )
      {
        if ( v7 < v5 )
          goto LABEL_14;
        LOBYTE(v9) = v7 != v5;
        v10 = v9 < 0;
      }
      if ( v10 )
      {
LABEL_14:
        v3 = v3->_Right;
        goto LABEL_16;
      }
      _Wherenode = v3;
      v3 = v3->_Left;
LABEL_16:
      if ( v3->_Isnil )
        return _Wherenode;
      v4 = _Keyval;
    }
  }
  return result;
}

//----- (0072DB70) --------------------------------------------------------
void __thiscall std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>(NsPathMaker *this)
{
  NsPathMaker *v1; // esi@1

  v1 = this;
  if ( this->m_strTempPath._Myres >= 0x10 )
    operator delete(this->m_strTempPath._Bx._Ptr);
  v1->m_strTempPath._Myres = 15;
  v1->m_strTempPath._Mysize = 0;
  v1->m_strTempPath._Bx._Buf[0] = 0;
  if ( v1->m_strDefaultPath._Myres >= 0x10 )
    operator delete(v1->m_strDefaultPath._Bx._Ptr);
  v1->m_strDefaultPath._Myres = 15;
  v1->m_strDefaultPath._Mysize = 0;
  v1->m_strDefaultPath._Bx._Buf[0] = 0;
}

//----- (0072DBC0) --------------------------------------------------------
void __cdecl std::_Dest_val<std::allocator<GTRequestListWin::GuildInfo>,GTRequestListWin::GuildInfo>(std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > *_Alval, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > *_Pdest)
{
  if ( _Pdest->second._Myres >= 0x10 )
    operator delete(_Pdest->second._Bx._Ptr);
  _Pdest->second._Myres = 15;
  _Pdest->second._Mysize = 0;
  _Pdest->second._Bx._Buf[0] = 0;
  if ( _Pdest->first._Myres >= 0x10 )
    operator delete(_Pdest->first._Bx._Ptr);
  _Pdest->first._Myres = 15;
  _Pdest->first._Mysize = 0;
  _Pdest->first._Bx._Buf[0] = 0;
}

//----- (0072DC10) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *result, bool _Addleft, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Wherenode, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Newnode)
{
  unsigned int v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v6; // edi@8
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v7; // edx@8
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v8; // edx@11
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v9; // edx@13
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v10; // eax@15
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v11; // edx@16
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v12; // esi@16
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v13; // esi@17
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v14; // edx@19
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v15; // esi@21
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v16; // esi@23
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v17; // edx@27
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v18; // esi@27
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v19; // edi@27
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v20; // edi@29
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v21; // edi@31
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v22; // edx@37
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v23; // esi@37
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v24; // esi@39
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v25; // esi@41
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v26; // edi@47
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v27; // edi@49
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v28; // ecx@55
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *v29; // eax@55

  v5 = this->_Mysize;
  if ( v5 >= 0x4924923 )
  {
    if ( _Newnode->_Myval.second._Myres >= 0x10 )
      operator delete(_Newnode->_Myval.second._Bx._Ptr);
    _Newnode->_Myval.second._Myres = 15;
    _Newnode->_Myval.second._Mysize = 0;
    _Newnode->_Myval.second._Bx._Buf[0] = 0;
    if ( _Newnode->_Myval.first._Myres >= 0x10 )
      operator delete(_Newnode->_Myval.first._Bx._Ptr);
    _Newnode->_Myval.first._Myres = 15;
    _Newnode->_Myval.first._Mysize = 0;
    _Newnode->_Myval.first._Bx._Buf[0] = 0;
    operator delete(_Newnode);
    std::_Xlength_error("map/set<T> too long");
  }
  v6 = _Newnode;
  this->_Mysize = v5 + 1;
  _Newnode->_Parent = _Wherenode;
  v7 = this->_Myhead;
  if ( _Wherenode == v7 )
  {
    v7->_Parent = _Newnode;
    this->_Myhead->_Left = _Newnode;
    this->_Myhead->_Right = _Newnode;
  }
  else if ( _Addleft )
  {
    _Wherenode->_Left = _Newnode;
    v8 = this->_Myhead;
    if ( _Wherenode == v8->_Left )
      v8->_Left = _Newnode;
  }
  else
  {
    _Wherenode->_Right = _Newnode;
    v9 = this->_Myhead;
    if ( _Wherenode == v9->_Right )
      v9->_Right = _Newnode;
  }
  v10 = _Newnode;
  while ( !v10->_Parent->_Color )
  {
    v11 = v10->_Parent;
    v12 = v11->_Parent;
    if ( v11 == v12->_Left )
    {
      v13 = v12->_Right;
      if ( v13->_Color )
      {
        if ( v10 == v11->_Right )
        {
          v10 = v10->_Parent;
          v14 = v11->_Right;
          v10->_Right = v14->_Left;
          if ( !v14->_Left->_Isnil )
            v14->_Left->_Parent = v10;
          v14->_Parent = v10->_Parent;
          v15 = this->_Myhead;
          if ( v10 == v15->_Parent )
          {
            v15->_Parent = v14;
          }
          else
          {
            v16 = v10->_Parent;
            if ( v10 == v16->_Left )
              v16->_Left = v14;
            else
              v16->_Right = v14;
          }
          v14->_Left = v10;
          v10->_Parent = v14;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Left;
        v17->_Left = v17->_Left->_Right;
        v19 = v18->_Right;
        if ( !v19->_Isnil )
          v19->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v20 = this->_Myhead;
        if ( v17 == v20->_Parent )
        {
          v20->_Parent = v18;
          v18->_Right = v17;
        }
        else
        {
          v21 = v17->_Parent;
          if ( v17 == v21->_Right )
          {
            v21->_Right = v18;
            v18->_Right = v17;
          }
          else
          {
            v21->_Left = v18;
            v18->_Right = v17;
          }
        }
LABEL_53:
        v6 = _Newnode;
        v17->_Parent = v18;
        continue;
      }
    }
    else
    {
      v13 = v12->_Left;
      if ( v13->_Color )
      {
        if ( v10 == v11->_Left )
        {
          v10 = v10->_Parent;
          v22 = v11->_Left;
          v10->_Left = v22->_Right;
          v23 = v22->_Right;
          if ( !v23->_Isnil )
            v23->_Parent = v10;
          v22->_Parent = v10->_Parent;
          v24 = this->_Myhead;
          if ( v10 == v24->_Parent )
          {
            v24->_Parent = v22;
          }
          else
          {
            v25 = v10->_Parent;
            if ( v10 == v25->_Right )
              v25->_Right = v22;
            else
              v25->_Left = v22;
          }
          v22->_Right = v10;
          v10->_Parent = v22;
        }
        v10->_Parent->_Color = 1;
        v10->_Parent->_Parent->_Color = 0;
        v17 = v10->_Parent->_Parent;
        v18 = v17->_Right;
        v17->_Right = v18->_Left;
        if ( !v18->_Left->_Isnil )
          v18->_Left->_Parent = v17;
        v18->_Parent = v17->_Parent;
        v26 = this->_Myhead;
        if ( v17 == v26->_Parent )
        {
          v26->_Parent = v18;
        }
        else
        {
          v27 = v17->_Parent;
          if ( v17 == v27->_Left )
            v27->_Left = v18;
          else
            v27->_Right = v18;
        }
        v18->_Left = v17;
        goto LABEL_53;
      }
    }
    v11->_Color = 1;
    v13->_Color = 1;
    v10->_Parent->_Parent->_Color = 0;
    v10 = v10->_Parent->_Parent;
  }
  v28 = this->_Myhead->_Parent;
  v29 = result;
  result->_Ptr = v6;
  v28->_Color = 1;
  return v29;
}

//----- (0072DE70) --------------------------------------------------------
void __thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Erase(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Rootnode)
{
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *i; // edi@1
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *v4; // [sp+Ch] [bp-4h]@1

  v2 = _Rootnode;
  v4 = this;
  for ( i = _Rootnode; !i->_Isnil; v2 = i )
  {
    std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Erase(
      v4,
      i->_Right);
    i = i->_Left;
    if ( v2->_Myval.second._Myres >= 0x10 )
      operator delete(v2->_Myval.second._Bx._Ptr);
    v2->_Myval.second._Myres = 15;
    v2->_Myval.second._Mysize = 0;
    v2->_Myval.second._Bx._Buf[0] = 0;
    if ( v2->_Myval.first._Myres >= 0x10 )
      operator delete(v2->_Myval.first._Bx._Ptr);
    v2->_Myval.first._Myres = 15;
    v2->_Myval.first._Mysize = 0;
    v2->_Myval.first._Bx._Buf[0] = 0;
    operator delete(v2);
  }
}

//----- (0072DEF0) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::erase(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > _Where)
{
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v3; // edi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v4; // ebx@4
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v5; // eax@7
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v6; // esi@8
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *v7; // ecx@10
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v8; // eax@10
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v9; // eax@17
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v10; // eax@23
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v11; // ecx@29
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v12; // ecx@31
  char v13; // cl@34
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v14; // eax@38
  unsigned int v15; // eax@63
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *v16; // eax@65
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *v17; // [sp+Ch] [bp-4h]@1

  v3 = _Where._Ptr;
  v17 = this;
  if ( _Where._Ptr->_Isnil )
    std::_Xout_of_range("invalid map/set<T> iterator");
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >,std::_Iterator_base0> *)&_Where._Ptr);
  if ( v3->_Left->_Isnil )
  {
    v4 = v3->_Right;
LABEL_8:
    v6 = v3->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v7 = v17;
    v8 = v17->_Myhead;
    if ( v8->_Parent == v3 )
    {
      v8->_Parent = v4;
    }
    else if ( v6->_Left == v3 )
    {
      v6->_Left = v4;
    }
    else
    {
      v6->_Right = v4;
    }
    if ( v17->_Myhead->_Left == v3 )
    {
      if ( v4->_Isnil )
      {
        v9 = v6;
      }
      else
      {
        v9 = std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Min(v4);
        v7 = v17;
      }
      v7->_Myhead->_Left = v9;
    }
    if ( v7->_Myhead->_Right == v3 )
    {
      if ( v4->_Isnil )
      {
        v7->_Myhead->_Right = v6;
      }
      else
      {
        v10 = std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Max(v4);
        v7 = v17;
        v17->_Myhead->_Right = v10;
      }
    }
    goto LABEL_35;
  }
  if ( v3->_Right->_Isnil )
  {
    v4 = v3->_Left;
    goto LABEL_8;
  }
  v5 = _Where._Ptr;
  v4 = _Where._Ptr->_Right;
  if ( _Where._Ptr == v3 )
    goto LABEL_8;
  v3->_Left->_Parent = _Where._Ptr;
  v5->_Left = v3->_Left;
  if ( v5 == v3->_Right )
  {
    v6 = v5;
  }
  else
  {
    v6 = v5->_Parent;
    if ( !v4->_Isnil )
      v4->_Parent = v6;
    v6->_Left = v4;
    v5->_Right = v3->_Right;
    v3->_Right->_Parent = v5;
  }
  v11 = v17->_Myhead;
  if ( v11->_Parent == v3 )
  {
    v11->_Parent = v5;
  }
  else
  {
    v12 = v3->_Parent;
    if ( v12->_Left == v3 )
      v12->_Left = v5;
    else
      v12->_Right = v5;
  }
  v5->_Parent = v3->_Parent;
  v13 = v5->_Color;
  v5->_Color = v3->_Color;
  v3->_Color = v13;
  v7 = v17;
LABEL_35:
  if ( v3->_Color == 1 )
  {
    for ( ; v4 != v7->_Myhead->_Parent; v6 = v6->_Parent )
    {
      if ( v4->_Color != 1 )
        break;
      v14 = v6->_Left;
      if ( v4 == v6->_Left )
      {
        v14 = v6->_Right;
        if ( !v14->_Color )
        {
          v14->_Color = 1;
          v6->_Color = 0;
          std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::_Lrotate(
            v7,
            v6);
          v14 = v6->_Right;
          v7 = v17;
        }
        if ( v14->_Isnil )
          goto LABEL_53;
        if ( v14->_Left->_Color != 1 || v14->_Right->_Color != 1 )
        {
          if ( v14->_Right->_Color == 1 )
          {
            v14->_Left->_Color = 1;
            v14->_Color = 0;
            std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::_Rrotate(
              v7,
              v14);
            v14 = v6->_Right;
            v7 = v17;
          }
          v14->_Color = v6->_Color;
          v6->_Color = 1;
          v14->_Right->_Color = 1;
          std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::_Lrotate(
            v7,
            v6);
          break;
        }
      }
      else
      {
        if ( !v14->_Color )
        {
          v14->_Color = 1;
          v6->_Color = 0;
          std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::_Rrotate(
            v7,
            v6);
          v14 = v6->_Left;
          v7 = v17;
        }
        if ( v14->_Isnil )
          goto LABEL_53;
        if ( v14->_Right->_Color != 1 || v14->_Left->_Color != 1 )
        {
          if ( v14->_Left->_Color == 1 )
          {
            v14->_Right->_Color = 1;
            v14->_Color = 0;
            std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::_Lrotate(
              v7,
              v14);
            v14 = v6->_Left;
            v7 = v17;
          }
          v14->_Color = v6->_Color;
          v6->_Color = 1;
          v14->_Left->_Color = 1;
          std::_Tree<std::_Tmap_traits<int,EpicQuestWin::QData,std::less<int>,std::allocator<std::pair<int const,EpicQuestWin::QData>>,1>>::_Rrotate(
            v7,
            v6);
          break;
        }
      }
      v14->_Color = 0;
LABEL_53:
      v4 = v6;
    }
    v4->_Color = 1;
  }
  if ( v3->_Myval.second._Myres >= 0x10 )
    operator delete(v3->_Myval.second._Bx._Ptr);
  v3->_Myval.second._Myres = 15;
  v3->_Myval.second._Mysize = 0;
  v3->_Myval.second._Bx._Buf[0] = 0;
  if ( v3->_Myval.first._Myres >= 0x10 )
    operator delete(v3->_Myval.first._Bx._Ptr);
  v3->_Myval.first._Myres = 15;
  v3->_Myval.first._Mysize = 0;
  v3->_Myval.first._Bx._Buf[0] = 0;
  operator delete(v3);
  v15 = v17->_Mysize;
  if ( v15 > 0 )
    v17->_Mysize = v15 - 1;
  v16 = result;
  result->_Ptr = _Where._Ptr;
  return v16;
}

//----- (0072E190) --------------------------------------------------------
std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > >,bool> *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Linsert(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > >,bool> *result, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Node, bool _Leftish)
{
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v4; // edx@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v5; // ebx@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v6; // edi@1
  bool v7; // al@1
  unsigned int v8; // ecx@2
  const char *v9; // eax@4
  const char *v10; // edx@6
  unsigned int v11; // esi@8
  unsigned int v12; // ecx@8
  int v13; // eax@12
  bool v14; // sf@12
  unsigned int v15; // edi@17
  unsigned int v16; // esi@19
  unsigned int v17; // edx@21
  char *v18; // ecx@24
  int v19; // eax@26
  bool v20; // sf@26
  signed int v21; // eax@28
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v22; // esi@37
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *v23; // eax@39
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v24; // ecx@40
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > >,bool> *v25; // eax@40
  bool v26; // cf@42
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > *v27; // ebx@42
  unsigned int v28; // edx@42
  const char *v29; // eax@43
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Wherenode; // [sp+Ch] [bp-14h]@4
  unsigned int v31; // [sp+10h] [bp-10h]@2
  unsigned int v32; // [sp+14h] [bp-Ch]@2
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *v33; // [sp+18h] [bp-8h]@1
  bool _Addleft; // [sp+1Ch] [bp-4h]@1

  v4 = _Node;
  v5 = this->_Myhead->_Parent;
  v6 = this->_Myhead;
  v7 = 1;
  v33 = this;
  _Addleft = 1;
  if ( !v5->_Isnil )
  {
    v8 = _Node->_Myval.first._Mysize;
    v32 = _Node->_Myval.first._Mysize;
    v31 = _Node->_Myval.first._Myres;
    while ( 1 )
    {
      _Wherenode = v5;
      v9 = v5->_Myval.first._Bx._Buf;
      if ( _Leftish )
      {
        if ( v31 < 0x10 )
          v10 = v4->_Myval.first._Bx._Buf;
        else
          v10 = v4->_Myval.first._Bx._Ptr;
        v11 = v5->_Myval.first._Mysize;
        v12 = v5->_Myval.first._Mysize;
        if ( v11 >= v32 )
          v12 = v32;
        if ( v5->_Myval.first._Myres >= 0x10 )
          v9 = *(const char **)v9;
        v13 = std::char_traits<char>::compare(v9, v10, v12);
        v14 = v13 < 0;
        if ( !v13 )
        {
          if ( v11 < v32 )
          {
            v7 = 0;
            goto LABEL_32;
          }
          v14 = (v11 != v32) < 0;
        }
        v7 = !v14;
      }
      else
      {
        v15 = v5->_Myval.first._Mysize;
        if ( v5->_Myval.first._Myres >= 0x10 )
          v9 = *(const char **)v9;
        v16 = _Node->_Myval.first._Mysize;
        if ( v8 < v16 )
          v16 = v8;
        v17 = v16;
        if ( v16 >= v15 )
          v17 = v5->_Myval.first._Mysize;
        if ( v31 < 0x10 )
          v18 = _Node->_Myval.first._Bx._Buf;
        else
          v18 = _Node->_Myval.first._Bx._Ptr;
        v19 = std::char_traits<char>::compare(v18, v9, v17);
        v20 = v19 < 0;
        if ( !v19 )
        {
          if ( v16 >= v15 )
            v21 = v16 != v15;
          else
            v21 = -1;
          v20 = v21 < 0;
        }
        v7 = v20;
      }
LABEL_32:
      _Addleft = v7;
      if ( v7 )
        v5 = v5->_Left;
      else
        v5 = v5->_Right;
      v4 = _Node;
      if ( v5->_Isnil )
      {
        v6 = _Wherenode;
        this = v33;
        break;
      }
      v8 = v32;
    }
  }
  v22 = v6;
  *(_DWORD *)&_Leftish = v6;
  if ( v7 )
  {
    if ( v6 == this->_Myhead->_Left )
    {
      v23 = std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Insert(
              this,
              (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *)&_Leftish,
              1,
              v6,
              v4);
LABEL_40:
      v24 = v23->_Ptr;
      v25 = result;
      result->first._Ptr = v24;
      result->second = 1;
      return v25;
    }
    std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >,std::_Iterator_base0> *)&_Leftish);
    v22 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)_Leftish;
    v4 = _Node;
  }
  v26 = v4->_Myval.first._Myres < 0x10;
  v27 = &v4->_Myval;
  v28 = v4->_Myval.first._Mysize;
  if ( v26 )
    v29 = (const char *)v27;
  else
    v29 = v27->first._Bx._Ptr;
  if ( std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
         &v22->_Myval.first,
         0,
         v22->_Myval.first._Mysize,
         v29,
         v28) < 0 )
  {
    v23 = std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Insert(
            v33,
            (std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *)&_Leftish,
            _Addleft,
            v6,
            _Node);
    goto LABEL_40;
  }
  std::_Dest_val<std::allocator<GTRequestListWin::GuildInfo>,GTRequestListWin::GuildInfo>(&v33->_Alval, v27);
  operator delete(_Node);
  v25 = result;
  result->first._Ptr = v22;
  result->second = 0;
  return v25;
}

//----- (0072E340) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Insert(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > _Where, std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *_Node)
{
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v4; // ebx@1
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *v5; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v6; // eax@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v7; // edi@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *v8; // eax@2
  char *v9; // eax@4
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v10; // eax@17
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v11; // ecx@23
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > >,bool> v12; // [sp+Ch] [bp-8h]@23

  v4 = _Node;
  v5 = this;
  v6 = this->_Myhead;
  v7 = &_Node->_Myval.first;
  if ( !this->_Mysize )
  {
    std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Insert(
      this,
      result,
      1,
      v6,
      _Node);
    return result;
  }
  if ( _Where._Ptr == v6->_Left )
  {
    v9 = _Where._Ptr->_Myval.first._Bx._Buf;
    if ( _Where._Ptr->_Myval.first._Myres >= 0x10 )
      v9 = *(char **)v9;
    if ( std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
           &_Node->_Myval.first,
           0,
           _Node->_Myval.first._Mysize,
           v9,
           _Where._Ptr->_Myval.first._Mysize) < 0 )
    {
      std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Insert(
        v5,
        result,
        1,
        _Where._Ptr,
        v4);
      return result;
    }
    goto LABEL_23;
  }
  if ( _Where._Ptr == v6 )
  {
    if ( std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::operator()(
           &v6->_Right->_Myval.first,
           &_Node->_Myval.first) )
    {
      std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Insert(
        v5,
        result,
        0,
        v5->_Myhead->_Right,
        v4);
      return result;
    }
    goto LABEL_23;
  }
  if ( std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::operator()(
         &_Node->_Myval.first,
         &_Where._Ptr->_Myval.first) )
  {
    _Node = _Where._Ptr;
    std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>,std::_Iterator_base0>::operator--((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >,std::_Iterator_base0> *)&_Node);
    if ( std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::operator()(
           &_Node->_Myval.first,
           v7) )
    {
      if ( _Node->_Right->_Isnil )
      {
        std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Insert(
          v5,
          result,
          0,
          _Node,
          v4);
        v8 = result;
      }
      else
      {
        std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Insert(
          v5,
          result,
          1,
          _Where._Ptr,
          v4);
        v8 = result;
      }
      return v8;
    }
  }
  if ( !std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::operator()(
          &_Where._Ptr->_Myval.first,
          v7) )
    goto LABEL_23;
  _Node = _Where._Ptr;
  std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>,std::_Iterator_base0>::operator++((std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >,std::_Iterator_base0> *)&_Node);
  v10 = _Node;
  if ( _Node == v5->_Myhead )
    goto LABEL_20;
  if ( !std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::operator()(
          v7,
          &_Node->_Myval.first) )
  {
LABEL_23:
    v11 = std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Linsert(
            v5,
            &v12,
            v4,
            0)->first._Ptr;
    v8 = result;
    result->_Ptr = v11;
    return v8;
  }
  v10 = _Node;
LABEL_20:
  if ( _Where._Ptr->_Right->_Isnil )
  {
    std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Insert(
      v5,
      result,
      0,
      _Where._Ptr,
      v4);
    v8 = result;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Insert(
      v5,
      result,
      1,
      v10,
      v4);
    v8 = result;
  }
  return v8;
}

//----- (0072E500) --------------------------------------------------------
std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *__thiscall std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::erase(std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *result, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > _Last)
{
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v5; // eax@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v6; // ecx@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node **v7; // ecx@3
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > *v8; // eax@3
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > v9; // edx@5
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v10; // eax@6
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v11; // ecx@7
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *j; // eax@7
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *i; // eax@10
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > v14; // [sp+4h] [bp-4h]@14

  v4 = this;
  v5 = this->_Myhead;
  v6 = _First._Ptr;
  if ( _First._Ptr != v5->_Left || _Last._Ptr != v5 )
  {
    for ( ; _First._Ptr != _Last._Ptr; v6 = _First._Ptr )
    {
      v9._Ptr = v6;
      if ( !v6->_Isnil )
      {
        v10 = v6->_Right;
        if ( v10->_Isnil )
        {
          for ( i = v6->_Parent; !i->_Isnil; i = i->_Parent )
          {
            if ( v6 != i->_Right )
              break;
            v6 = i;
          }
          _First._Ptr = i;
        }
        else
        {
          v11 = v6->_Right;
          for ( j = v10->_Left; !j->_Isnil; j = j->_Left )
            v11 = j;
          _First._Ptr = v11;
        }
      }
      std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::erase(
        v4,
        &v14,
        v9);
    }
    v8 = result;
    result->_Ptr = v6;
  }
  else
  {
    std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Erase(
      v4,
      v5->_Parent);
    v4->_Myhead->_Parent = v4->_Myhead;
    v4->_Myhead->_Left = v4->_Myhead;
    v4->_Myhead->_Right = v4->_Myhead;
    v7 = &v4->_Myhead->_Left;
    v8 = result;
    v4->_Mysize = 0;
    result->_Ptr = *v7;
  }
  return v8;
}

//----- (0072E5C0) --------------------------------------------------------
void __thiscall std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>>::~map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>>(std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > > *this)
{
  std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > > *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v2; // eax@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > v3; // ST04_4@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > result; // [sp+8h] [bp-14h]@1
  std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > > *v5; // [sp+Ch] [bp-10h]@1
  int v6; // [sp+18h] [bp-4h]@1

  v1 = this;
  v5 = this;
  v2 = this->_Myhead;
  v3._Ptr = v2->_Left;
  v6 = 0;
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::erase(
    (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *)&this->comp,
    &result,
    v3,
    (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > >)v2);
  operator delete(v1->_Myhead);
}

//----- (0072E620) --------------------------------------------------------
void __thiscall ItemMixData::~ItemMixData(ItemMixData *this)
{
  ItemMixData *v1; // edi@1
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v3; // ST08_4@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > v4; // ST08_4@1
  std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > v5; // ST04_4@1
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > result; // [sp+Ch] [bp-18h]@1
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *v7; // [sp+10h] [bp-14h]@1
  ItemMixData *v8; // [sp+14h] [bp-10h]@1
  int v9; // [sp+20h] [bp-4h]@1

  v1 = this;
  v8 = this;
  v2 = (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *)&this->m_ItemMixDataMap.comp;
  v3 = this->m_ItemMixDataMap._Myhead->_Parent;
  v9 = 1;
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Erase(
    (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *)&this->m_ItemMixDataMap.comp,
    v3);
  v2->_Myhead->_Parent = v2->_Myhead;
  v2->_Myhead->_Left = v2->_Myhead;
  v2->_Myhead->_Right = v2->_Myhead;
  v2->_Mysize = 0;
  v7 = v2;
  v4._Ptr = v2->_Myhead;
  v5._Ptr = v2->_Myhead->_Left;
  LOBYTE(v9) = 2;
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::erase(
    v2,
    &result,
    v5,
    v4);
  operator delete(v2->_Myhead);
  v9 = -1;
  CDataReader::~CDataReader(&v1->m_ItemMixDataReader);
}

//----- (0072E6C0) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>(std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > *_Val)
{
  std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *v2; // esi@1
  void *v3; // edi@1
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > *v4; // eax@3
  int v5; // ecx@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v6; // edx@3
  int v8; // [sp+0h] [bp-38h]@1
  std::exception pExceptionObject; // [sp+10h] [bp-28h]@5
  char *v10; // [sp+1Ch] [bp-1Ch]@2
  char *v11; // [sp+20h] [bp-18h]@2
  void *p; // [sp+24h] [bp-14h]@1
  int *v13; // [sp+28h] [bp-10h]@1
  int v14; // [sp+34h] [bp-4h]@2

  v13 = &v8;
  v2 = this;
  v3 = operator new(0x48u);
  p = v3;
  if ( !v3 )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  *(_DWORD *)v3 = v2->_Myhead;
  *((_DWORD *)v3 + 1) = v2->_Myhead;
  *((_DWORD *)v3 + 2) = v2->_Myhead;
  *((_WORD *)v3 + 34) = 0;
  v14 = 0;
  v11 = (char *)v3 + 12;
  v10 = (char *)v3 + 12;
  LOBYTE(v14) = 1;
  if ( v3 != (void *)-12 )
  {
    v4 = _Val;
    *((_DWORD *)v3 + 8) = 15;
    *((_DWORD *)v3 + 7) = 0;
    *((_BYTE *)v3 + 12) = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)v3 + 12),
      &v4->first);
    v5 = (int)v3 + 40;
    v6 = &_Val->second;
    *(_DWORD *)(v5 + 20) = 15;
    *(_DWORD *)(v5 + 16) = 0;
    LOBYTE(v14) = 2;
    *(_BYTE *)v5 = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)v3 + 40),
      v6);
  }
  return (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)v3;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0072E7C0) --------------------------------------------------------
std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *__thiscall std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>(std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *this, std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > *_Val)
{
  std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *v2; // esi@1
  void *v3; // edi@1
  std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > *v4; // eax@3
  int v5; // ecx@3
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v6; // edx@3
  int v8; // [sp+0h] [bp-38h]@1
  std::exception pExceptionObject; // [sp+10h] [bp-28h]@5
  char *v10; // [sp+1Ch] [bp-1Ch]@2
  char *v11; // [sp+20h] [bp-18h]@2
  void *p; // [sp+24h] [bp-14h]@1
  int *v13; // [sp+28h] [bp-10h]@1
  int v14; // [sp+34h] [bp-4h]@2

  v13 = &v8;
  v2 = this;
  v3 = operator new(0x48u);
  p = v3;
  if ( !v3 )
  {
    _Val = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Val);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  *(_DWORD *)v3 = v2->_Myhead;
  *((_DWORD *)v3 + 1) = v2->_Myhead;
  *((_DWORD *)v3 + 2) = v2->_Myhead;
  *((_WORD *)v3 + 34) = 0;
  v14 = 0;
  v11 = (char *)v3 + 12;
  v10 = (char *)v3 + 12;
  LOBYTE(v14) = 1;
  if ( v3 != (void *)-12 )
  {
    v4 = _Val;
    *((_DWORD *)v3 + 8) = 15;
    *((_DWORD *)v3 + 7) = 0;
    *((_BYTE *)v3 + 12) = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)v3 + 12),
      &v4->first,
      0,
      0xFFFFFFFF);
    v5 = (int)v3 + 40;
    v6 = &_Val->second;
    *(_DWORD *)(v5 + 20) = 15;
    *(_DWORD *)(v5 + 16) = 0;
    LOBYTE(v14) = 2;
    *(_BYTE *)v5 = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(
      (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)((char *)v3 + 40),
      v6);
  }
  return (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)v3;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0072E8C0) --------------------------------------------------------
void __thiscall ItemMixData::ItemMixData(ItemMixData *this)
{
  ItemMixData *v1; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v2; // eax@1
  std::exception pExceptionObject; // [sp+8h] [bp-20h]@3
  ItemMixData *v4; // [sp+14h] [bp-14h]@1
  char *_What; // [sp+18h] [bp-10h]@3
  int v6; // [sp+24h] [bp-4h]@1

  v1 = this;
  v4 = this;
  CDataReader::CDataReader(&this->m_ItemMixDataReader);
  v6 = 0;
  v1->m_ItemMixDataMap._Mysize = 0;
  v2 = (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)operator new(0x48u);
  if ( !v2 )
  {
    _What = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_What);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v1->m_ItemMixDataMap._Myhead = v2;
  v2->_Left = v2;
  v1->m_ItemMixDataMap._Myhead->_Parent = v1->m_ItemMixDataMap._Myhead;
  v1->m_ItemMixDataMap._Myhead->_Right = v1->m_ItemMixDataMap._Myhead;
  v1->m_ItemMixDataMap._Myhead->_Color = 1;
  v1->m_ItemMixDataMap._Myhead->_Isnil = 1;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (0072E970) --------------------------------------------------------
int __thiscall ItemMixData::Read(ItemMixData *this, const char *pFN, unsigned int nVersionKey, unsigned int nStructSize)
{
  ItemMixData *v4; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v5; // ST08_4@1
  CDataReader::HEAD *v7; // eax@3
  char *v8; // edi@9
  int v9; // edx@9
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v10; // eax@9
  int v11; // esi@9
  unsigned int v12; // edx@10
  int v13; // eax@10
  bool v14; // cf@10
  const char *v15; // ecx@14
  int v16; // eax@16
  bool v17; // sf@16
  signed int v18; // eax@18
  int *v19; // eax@22
  bool v20; // zf@24
  const char *v21; // esi@27
  char *v22; // eax@27
  int v23; // edi@27
  char v24; // cl@28
  ItemMixData *v25; // esi@29
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v26; // eax@29
  std::pair<std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > >,bool> result; // [sp+10h] [bp-8Ch]@29
  unsigned int v28; // [sp+18h] [bp-84h]@10
  int v29; // [sp+1Ch] [bp-80h]@23
  int v30; // [sp+20h] [bp-7Ch]@9
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v31; // [sp+24h] [bp-78h]@9
  ItemMixData *v32; // [sp+28h] [bp-74h]@1
  unsigned int i; // [sp+2Ch] [bp-70h]@6
  unsigned int DataCounter; // [sp+30h] [bp-6Ch]@1
  bool v35; // [sp+37h] [bp-65h]@24
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v36; // [sp+38h] [bp-64h]@27
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v37; // [sp+54h] [bp-48h]@27
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Keyval; // [sp+70h] [bp-2Ch]@9
  int v39; // [sp+98h] [bp-4h]@9

  v4 = this;
  v5 = this->m_ItemMixDataMap._Myhead->_Parent;
  v32 = this;
  DataCounter = (unsigned int)pFN;
  std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Erase(
    (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *)&this->m_ItemMixDataMap.comp,
    v5);
  v4->m_ItemMixDataMap._Myhead->_Parent = v4->m_ItemMixDataMap._Myhead;
  v4->m_ItemMixDataMap._Myhead->_Left = v4->m_ItemMixDataMap._Myhead;
  v4->m_ItemMixDataMap._Myhead->_Right = v4->m_ItemMixDataMap._Myhead;
  v4->m_ItemMixDataMap._Mysize = 0;
  if ( !CDataReader::Read(&v4->m_ItemMixDataReader, pFN, nVersionKey, nStructSize) )
    return 0;
  v7 = v4->m_ItemMixDataReader.m_pHead;
  if ( v7 )
    DataCounter = v7->nNumOfRecord;
  else
    DataCounter = 0;
  i = 0;
  if ( DataCounter > 0 )
  {
    while ( 1 )
    {
      v8 = CDataReader::GetRecord(&v4->m_ItemMixDataReader, i);
      _Keyval._Myres = 15;
      _Keyval._Mysize = 0;
      _Keyval._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&_Keyval, v8, strlen(v8));
      v9 = (int)v4->m_ItemMixDataMap._Myhead;
      v39 = 0;
      v30 = v9;
      v10 = std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Lbound(
              (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *)&v4->m_ItemMixDataMap.comp,
              &_Keyval);
      v11 = (int)v4->m_ItemMixDataMap._Myhead;
      v31 = v10;
      if ( v10 == (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)v11 )
        goto LABEL_37;
      v12 = v10->_Myval.first._Mysize;
      v13 = (int)&v10->_Myval;
      v14 = *(_DWORD *)(v13 + 20) < 0x10u;
      v28 = v12;
      if ( !v14 )
        v13 = *(_DWORD *)v13;
      if ( _Keyval._Mysize < v12 )
        v12 = _Keyval._Mysize;
      v15 = _Keyval._Bx._Ptr;
      if ( _Keyval._Myres < 0x10 )
        v15 = (const char *)&_Keyval;
      v16 = std::char_traits<char>::compare(v15, (const char *)v13, v12);
      v17 = v16 < 0;
      if ( !v16 )
      {
        if ( _Keyval._Mysize >= v28 )
          v18 = _Keyval._Mysize != v28;
        else
          v18 = -1;
        v17 = v18 < 0;
      }
      if ( v17 )
      {
LABEL_37:
        v29 = v11;
        v19 = &v29;
      }
      else
      {
        v19 = (int *)&v31;
      }
      v20 = *v19 == v30;
      v39 = -1;
      v35 = !v20;
      if ( _Keyval._Myres >= 0x10 )
        operator delete(_Keyval._Bx._Ptr);
      if ( v35 )
        return 0;
      v21 = v8 + 32;
      v36._Myres = 15;
      v36._Mysize = 0;
      v36._Bx._Buf[0] = 0;
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v36, v8, strlen(v8));
      v22 = v8 + 32;
      v39 = 1;
      v37._Myres = 15;
      v37._Mysize = 0;
      v37._Bx._Buf[0] = 0;
      v23 = (int)(v8 + 33);
      do
        v24 = *v22++;
      while ( v24 );
      std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v37, v21, (unsigned int)&v22[-v23]);
      v25 = v32;
      v39 = 2;
      v26 = std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>(
              (std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *)&v32->m_ItemMixDataMap.comp,
              (std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > *)&v36);
      std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Linsert(
        (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *)&v25->m_ItemMixDataMap.comp,
        &result,
        v26,
        0);
      v39 = -1;
      if ( v37._Myres >= 0x10 )
        operator delete(v37._Bx._Ptr);
      v37._Myres = 15;
      v37._Mysize = 0;
      v37._Bx._Buf[0] = 0;
      if ( v36._Myres >= 0x10 )
        operator delete(v36._Bx._Ptr);
      v36._Myres = 15;
      v36._Mysize = 0;
      v36._Bx._Buf[0] = 0;
      if ( ++i >= DataCounter )
        return 1;
      v4 = v32;
    }
  }
  return 1;
}

//----- (0072EC00) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>>::operator[](std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > > *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *_Keyval)
{
  std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > > *v2; // esi@1
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v3; // eax@1
  unsigned int v4; // ecx@2
  int v5; // eax@2
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v6; // eax@5
  std::_Tree_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > > _Where; // [sp+10h] [bp-68h]@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > _Right; // [sp+14h] [bp-64h]@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v10; // [sp+30h] [bp-48h]@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > v11; // [sp+4Ch] [bp-2Ch]@5
  int v12; // [sp+74h] [bp-4h]@5

  v2 = this;
  v3 = std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Lbound(
         (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *)&this->comp,
         _Keyval);
  _Where._Ptr = v3;
  if ( v3 == v2->_Myhead )
    goto LABEL_14;
  v4 = v3->_Myval.first._Mysize;
  v5 = (int)&v3->_Myval;
  if ( *(_DWORD *)(v5 + 20) >= 0x10u )
    v5 = *(_DWORD *)v5;
  if ( std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
         _Keyval,
         0,
         _Keyval->_Mysize,
         (const char *)v5,
         v4) < 0 )
  {
LABEL_14:
    _Right._Myres = 15;
    _Right._Mysize = 0;
    _Right._Bx._Buf[0] = 0;
    v12 = 0;
    v10._Myres = 15;
    v10._Mysize = 0;
    v10._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v10, _Keyval, 0, 0xFFFFFFFF);
    LOBYTE(v12) = 1;
    v11._Myres = 15;
    v11._Mysize = 0;
    v11._Bx._Buf[0] = 0;
    std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign(&v11, &_Right);
    LOBYTE(v12) = 2;
    v6 = std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Buynode<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>(
           (std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *)&v2->comp,
           (std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > *)&v10);
    std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Insert(
      (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *)&v2->comp,
      &_Where,
      (std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > >)_Where._Ptr,
      v6);
    if ( v11._Myres >= 0x10 )
      operator delete(v11._Bx._Ptr);
    v11._Myres = 15;
    v11._Mysize = 0;
    v11._Bx._Buf[0] = 0;
    if ( v10._Myres >= 0x10 )
      operator delete(v10._Bx._Ptr);
    v10._Myres = 15;
    v10._Mysize = 0;
    v10._Bx._Buf[0] = 0;
    if ( _Right._Myres >= 0x10 )
      operator delete(_Right._Bx._Ptr);
  }
  return &_Where._Ptr->_Myval.second;
}

//----- (0072ED40) --------------------------------------------------------
std::basic_string<char,std::char_traits<char>,std::allocator<char> > *__thiscall ItemMixData::GetMixItemIndex(ItemMixData *this, std::basic_string<char,std::char_traits<char>,std::allocator<char> > *sRawItemIndex)
{
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v2; // ebx@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v3; // edi@1
  std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > > *v4; // esi@1
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *v5; // eax@1
  unsigned int v6; // ecx@2
  int v7; // eax@2
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > **v8; // eax@5
  std::basic_string<char,std::char_traits<char>,std::allocator<char> > *result; // eax@8
  std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *v10; // [sp+Ch] [bp-4h]@6

  v2 = this->m_ItemMixDataMap._Myhead;
  v3 = sRawItemIndex;
  v4 = &this->m_ItemMixDataMap;
  v5 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,0>>::_Lbound(
                                                                                 (std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> > *)&this->m_ItemMixDataMap.comp,
                                                                                 sRawItemIndex);
  sRawItemIndex = v5;
  if ( v5 == (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)v4->_Myhead )
    goto LABEL_13;
  v6 = (unsigned int)v5[1]._Bx._Ptr;
  v7 = (int)&v5->_Bx._Alias[12];
  if ( *(_DWORD *)(v7 + 20) >= 0x10u )
    v7 = *(_DWORD *)v7;
  if ( std::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(
         v3,
         0,
         v3->_Mysize,
         (const char *)v7,
         v6) < 0 )
  {
LABEL_13:
    v10 = v4->_Myhead;
    v8 = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > **)&v10;
  }
  else
  {
    v8 = &sRawItemIndex;
  }
  if ( (std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,0> >::_Node *)*v8 == v2 )
  {
    result = 0;
  }
  else
  {
    result = std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>>::operator[](
               v4,
               v3);
    if ( result->_Myres >= 0x10 )
      result = (std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)result->_Bx._Ptr;
  }
  return result;
}

//----- (0072EDC0) --------------------------------------------------------
void __thiscall CQuest::~CQuest(CQuest *this)
{
  CQuest *v1; // esi@1
  PLAYER_QUEST_INFO *v2; // eax@1
  CQuest::NPC_QUEST_STATUS *v3; // eax@3

  v1 = this;
  v2 = this->m_pQuestArray;
  this->vfptr = (CQuestVtbl *)&CQuest::`vftable';
  if ( v2 )
  {
    free(v2);
    v1->m_pQuestArray = 0;
  }
  v3 = v1->m_pQuestListWithNPC;
  v1->m_NumOfQuestBF = 0;
  v1->m_NumOfQuest = 0;
  if ( v3 )
    operator delete[](v3);
  v1->m_NumOfQuestListWithNPC = 0;
  v1->m_MaxOfQuestListWithNPC = 0;
}
// 9CEBA4: using guessed type int (__stdcall *CQuest::`vftable')(int);

//----- (0072EE00) --------------------------------------------------------
char *__thiscall CQuest::InitQuestBF(CQuest *this, int NumOfQuest)
{
  CQuest *v2; // esi@1
  char *result; // eax@6
  bool v4; // zf@9

  v2 = this;
  if ( this->m_NumOfQuestBF < NumOfQuest )
  {
    if ( this->m_pQuestArray )
    {
      free(this->m_pQuestArray);
      v2->m_pQuestArray = 0;
    }
    v2->m_NumOfQuestBF = 0;
  }
  if ( !v2->m_pQuestArray )
  {
    result = (char *)malloc(32 * NumOfQuest);
    v2->m_pQuestArray = (PLAYER_QUEST_INFO *)result;
    if ( !result )
    {
      v2->m_NumOfQuest = 0;
      return result;
    }
    memset(result, 0, 32 * NumOfQuest);
    v2->m_NumOfQuestBF = NumOfQuest;
  }
  v4 = v2->m_pQuestArray == 0;
  v2->m_NumOfQuest = 0;
  return (char *)!v4;
}

//----- (0072EE80) --------------------------------------------------------
void __thiscall CQuest::ClearQuest(CQuest *this)
{
  this->m_NumOfQuest = 0;
  this->m_ProcessedTime = _time32(0);
}

//----- (0072EEA0) --------------------------------------------------------
PLAYER_QUEST_INFO *__thiscall CQuest::GetQuestInfo(CQuest *this, unsigned __int16 nID)
{
  int v2; // edx@2
  int v3; // eax@2
  PLAYER_QUEST_INFO *v4; // edi@3
  PLAYER_QUEST_INFO *v5; // ecx@3
  PLAYER_QUEST_INFO *result; // eax@6

  if ( !this->m_NumOfQuestBF )
    goto LABEL_12;
  v2 = this->m_NumOfQuest;
  v3 = 0;
  if ( v2 <= 0 )
    goto LABEL_12;
  v4 = this->m_pQuestArray;
  v5 = this->m_pQuestArray;
  while ( v5->ID != nID )
  {
    ++v3;
    ++v5;
    if ( v3 >= v2 )
      return 0;
  }
  if ( v3 != -1 )
    result = &v4[v3];
  else
LABEL_12:
    result = 0;
  return result;
}

//----- (0072EEF0) --------------------------------------------------------
int __thiscall CQuest::SetQuestInfo(CQuest *this, PLAYER_QUEST_INFO *pQuestInfo)
{
  int v2; // edx@2
  int v3; // eax@2
  PLAYER_QUEST_INFO *v4; // edi@3
  PLAYER_QUEST_INFO *v5; // ecx@3
  int result; // eax@6
  PLAYER_QUEST_INFO *v7; // eax@8

  if ( !this->m_NumOfQuestBF )
    goto LABEL_13;
  v2 = this->m_NumOfQuest;
  v3 = 0;
  if ( v2 <= 0 )
    goto LABEL_13;
  v4 = this->m_pQuestArray;
  v5 = this->m_pQuestArray;
  while ( v5->ID != pQuestInfo->ID )
  {
    ++v3;
    ++v5;
    if ( v3 >= v2 )
      return 0;
  }
  if ( v3 != -1 && (v7 = &v4[v3]) != 0 )
  {
    qmemcpy(v7, pQuestInfo, sizeof(PLAYER_QUEST_INFO));
    result = 1;
  }
  else
  {
LABEL_13:
    result = 0;
  }
  return result;
}

//----- (0072EF50) --------------------------------------------------------
int __thiscall CQuest::AddQuestInfo(CQuest *this, PLAYER_QUEST_INFO *pQuestInfo)
{
  CQuest *v2; // ebx@1
  int result; // eax@1
  int v4; // edi@2

  v2 = this;
  result = CQuest::SetQuestInfo(this, pQuestInfo);
  if ( !result )
  {
    v4 = v2->m_NumOfQuest;
    if ( v4 >= v2->m_NumOfQuestBF )
      return result;
    qmemcpy(&v2->m_pQuestArray[v4], pQuestInfo, sizeof(v2->m_pQuestArray[v4]));
    ++v2->m_NumOfQuest;
  }
  return 1;
}

//----- (0072EF90) --------------------------------------------------------
void __thiscall CQuest::SetQuestClear(CQuest *this, unsigned __int16 nID)
{
  CQuest *v2; // esi@1
  int v3; // ecx@2
  int v4; // eax@2
  unsigned __int16 *v5; // edx@3

  v2 = this;
  if ( this->m_NumOfQuestBF )
  {
    v3 = this->m_NumOfQuest;
    v4 = 0;
    if ( v3 > 0 )
    {
      v5 = &v2->m_pQuestArray->ID;
      while ( *v5 != nID )
      {
        ++v4;
        v5 += 16;
        if ( v4 >= v3 )
          return;
      }
      if ( v4 != -1 )
      {
        memcpy((char *)&v2->m_pQuestArray[v4], (char *)&v2->m_pQuestArray[v4 + 1], 32 * (v3 - v4 - 1));
        --v2->m_NumOfQuest;
      }
    }
  }
}

//----- (0072EFF0) --------------------------------------------------------
QUEST_DATA *__thiscall CQuest::SetQuestAccept(CQuest *this, unsigned __int16 nID)
{
  CQuest *v2; // ebx@1
  QUEST_DATA *result; // eax@1
  PLAYER_QUEST_INFO *v4; // esi@2
  bool v5; // zf@3
  __int64 v6; // rax@8
  PLAYER_QUEST_INFO *v7; // edi@8
  PLAYER_QUEST_INFO QuestInfo; // [sp+8h] [bp-20h]@8

  v2 = this;
  result = CQuestData::GetQuestData(this->m_pQuestData, nID);
  if ( result )
  {
    v4 = CQuest::GetQuestInfo(v2, nID);
    if ( v4 )
    {
      v5 = v4->Status == 20;
      v4->Status = 6;
      if ( v5 )
      {
        LODWORD(v4->Data.StartTime) = 0;
        HIDWORD(v4->Data.StartTime) = 0;
        LODWORD(v4->Data.EndTime) = 0;
        HIDWORD(v4->Data.EndTime) = 0;
        v4->Data.RepeatCount = 0;
        *(_DWORD *)&v4->Data.ProgressStep = 0;
        *(_DWORD *)&v4->Data.End_NPCMobCount[3] = 0;
        HIBYTE(v4->Data.End_RunningTimeSec) = 0;
        v4->Data.StartTime = _time64(0);
        result = (QUEST_DATA *)1;
      }
      else
      {
        v4->Data.ProgressStep = 0;
        *(_DWORD *)&v4->Data.End_NPCMobCount[0] = 0;
        v4->Data.End_NPCMobCount[4] = 0;
        *((_BYTE *)&v4->Data + 26) &= 0xFCu;
        v4->Data.End_RunningTimeSec = 0;
        result = (QUEST_DATA *)1;
      }
    }
    else if ( v2->m_NumOfQuest < v2->m_NumOfQuestBF )
    {
      QuestInfo.ID = nID;
      QuestInfo.Status = 6;
      QuestInfo.Data.StartTime = 0i64;
      QuestInfo.Data.EndTime = 0i64;
      QuestInfo.Data.RepeatCount = 0;
      *(_DWORD *)&QuestInfo.Data.ProgressStep = 0;
      *(_DWORD *)&QuestInfo.Data.End_NPCMobCount[3] = 0;
      HIBYTE(QuestInfo.Data.End_RunningTimeSec) = 0;
      v6 = _time64(0);
      v7 = &v2->m_pQuestArray[v2->m_NumOfQuest];
      QuestInfo.Data.StartTime = v6;
      qmemcpy(v7, &QuestInfo, sizeof(PLAYER_QUEST_INFO));
      result = (QUEST_DATA *)1;
      ++v2->m_NumOfQuest;
    }
    else
    {
      result = 0;
    }
  }
  return result;
}

//----- (0072F0F0) --------------------------------------------------------
int __thiscall CQuest::SetQuestCancel(CQuest *this, unsigned __int16 nID)
{
  CQuest *v2; // edi@1
  int v3; // edx@2
  int v4; // eax@2
  PLAYER_QUEST_INFO *v5; // esi@3
  PLAYER_QUEST_INFO *v6; // ecx@3
  int v7; // esi@6
  QUEST_DATA *v8; // eax@10
  int result; // eax@13

  v2 = this;
  if ( !this->m_NumOfQuestBF )
    goto LABEL_18;
  v3 = this->m_NumOfQuest;
  v4 = 0;
  if ( v3 <= 0 )
    goto LABEL_18;
  v5 = this->m_pQuestArray;
  v6 = this->m_pQuestArray;
  while ( v6->ID != nID )
  {
    ++v4;
    ++v6;
    if ( v4 >= v3 )
    {
      v7 = 0;
      goto LABEL_10;
    }
  }
  if ( v4 != -1 )
    v7 = (int)&v5[v4];
  else
LABEL_18:
    v7 = 0;
LABEL_10:
  v8 = CQuestData::GetQuestData(v2->m_pQuestData, nID);
  if ( v7 && v8 )
  {
    if ( v8->Repeatable )
    {
      *(_BYTE *)(v7 + 2) = 4;
      *(_BYTE *)(v7 + 23) = 0;
      *(_DWORD *)(v7 + 24) = 0;
      *(_BYTE *)(v7 + 28) = 0;
      *(_BYTE *)(v7 + 29) &= 0xFCu;
      *(_WORD *)(v7 + 30) = 0;
      result = 1;
    }
    else
    {
      CQuest::SetQuestClear(v2, nID);
      result = 1;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0072F190) --------------------------------------------------------
int __thiscall CQuest::SetQuestProgress(CQuest *this, unsigned __int16 nID, char ProgressStep)
{
  int v3; // edx@2
  int v4; // eax@2
  PLAYER_QUEST_INFO *v5; // esi@3
  PLAYER_QUEST_INFO *v6; // ecx@3
  int result; // eax@6
  int v8; // eax@8

  if ( !this->m_NumOfQuestBF )
    goto LABEL_13;
  v3 = this->m_NumOfQuest;
  v4 = 0;
  if ( v3 <= 0 )
    goto LABEL_13;
  v5 = this->m_pQuestArray;
  v6 = this->m_pQuestArray;
  while ( v6->ID != nID )
  {
    ++v4;
    ++v6;
    if ( v4 >= v3 )
      return 0;
  }
  if ( v4 != -1 && (v8 = (int)&v5[v4]) != 0 )
  {
    *(_BYTE *)(v8 + 23) = ProgressStep;
    result = 1;
  }
  else
  {
LABEL_13:
    result = 0;
  }
  return result;
}

//----- (0072F1F0) --------------------------------------------------------
int __thiscall CQuest::SetQuestFailed(CQuest *this, unsigned __int16 nID)
{
  int v2; // edx@2
  int v3; // eax@2
  PLAYER_QUEST_INFO *v4; // esi@3
  PLAYER_QUEST_INFO *v5; // ecx@3
  int result; // eax@6
  int v7; // eax@8

  if ( !this->m_NumOfQuestBF )
    goto LABEL_13;
  v2 = this->m_NumOfQuest;
  v3 = 0;
  if ( v2 <= 0 )
    goto LABEL_13;
  v4 = this->m_pQuestArray;
  v5 = this->m_pQuestArray;
  while ( v5->ID != nID )
  {
    ++v3;
    ++v5;
    if ( v3 >= v2 )
      return 0;
  }
  if ( v3 != -1 && (v7 = (int)&v4[v3]) != 0 )
  {
    *(_BYTE *)(v7 + 2) = 7;
    result = 1;
  }
  else
  {
LABEL_13:
    result = 0;
  }
  return result;
}

//----- (0072F250) --------------------------------------------------------
QUEST_DATA *__thiscall CQuest::SetQuestDone(CQuest *this, PLAYER_QUEST_INFO *pQuestInfo)
{
  CQuest *v2; // ebx@1
  QUEST_DATA *result; // eax@2
  QUEST_DATA *v4; // edi@3
  __int64 v5; // rax@4

  v2 = this;
  if ( pQuestInfo )
  {
    result = CQuestData::GetQuestData(this->m_pQuestData, pQuestInfo->ID);
    v4 = result;
    if ( result )
    {
      pQuestInfo->Status = 2 * (result->Repeatable != 0) + 2;
      v5 = _time64(0);
      ++pQuestInfo->Data.RepeatCount;
      pQuestInfo->Data.EndTime = v5;
      v2->vfptr->Occure_Quest_Done(v2, pQuestInfo, v4);
      result = (QUEST_DATA *)1;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0072F2C0) --------------------------------------------------------
int __thiscall CQuest::SetQuestAbort(CQuest *this, unsigned __int16 nID)
{
  int v2; // edx@2
  int v3; // eax@2
  PLAYER_QUEST_INFO *v4; // esi@3
  PLAYER_QUEST_INFO *v5; // ecx@3
  int result; // eax@6
  int v7; // eax@8

  if ( !this->m_NumOfQuestBF )
    goto LABEL_13;
  v2 = this->m_NumOfQuest;
  v3 = 0;
  if ( v2 <= 0 )
    goto LABEL_13;
  v4 = this->m_pQuestArray;
  v5 = this->m_pQuestArray;
  while ( v5->ID != nID )
  {
    ++v3;
    ++v5;
    if ( v3 >= v2 )
      return 0;
  }
  if ( v3 != -1 && (v7 = (int)&v4[v3]) != 0 )
  {
    *(_BYTE *)(v7 + 2) = 1;
    result = 1;
  }
  else
  {
LABEL_13:
    result = 0;
  }
  return result;
}

//----- (0072F320) --------------------------------------------------------
BOOL __thiscall CQuest::Recv_NC_CHAR_QUEST_DOING_CMD_ACK(CQuest *this, PROTO_NC_CHAR_QUEST_DOING_CMD *pQuestPlayerDoingData)
{
  PROTO_NC_CHAR_QUEST_DOING_CMD *v2; // esi@1
  CQuest *v3; // ebx@1
  unsigned __int8 v4; // al@3
  char *v5; // esi@6
  int v6; // eax@7
  unsigned __int16 *v7; // ecx@8
  int v8; // edi@11
  signed int v9; // eax@12
  PLAYER_QUEST_INFO *v10; // eax@14
  int v11; // ecx@18
  int bFailed; // [sp+8h] [bp-8h]@3
  char i; // [sp+Fh] [bp-1h]@3

  v2 = pQuestPlayerDoingData;
  v3 = this;
  if ( pQuestPlayerDoingData->bNeedClear )
  {
    this->m_NumOfQuest = 0;
    this->m_ProcessedTime = _time32(0);
  }
  v4 = 0;
  bFailed = 0;
  i = 0;
  if ( pQuestPlayerDoingData->nNumOfDoingQuest )
  {
    while ( 1 )
    {
      v5 = (char *)&v2[1] + 32 * v4;
      if ( !v3->m_NumOfQuestBF )
        goto LABEL_11;
      v6 = 0;
      if ( v3->m_NumOfQuest <= 0 )
        goto LABEL_11;
      v7 = &v3->m_pQuestArray->ID;
      while ( *v7 != *(_WORD *)v5 )
      {
        ++v6;
        v7 += 16;
        if ( v6 >= v3->m_NumOfQuest )
          goto LABEL_11;
      }
      if ( v6 != -1 && (v10 = &v3->m_pQuestArray[v6]) != 0 )
      {
        qmemcpy(v10, v5, sizeof(PLAYER_QUEST_INFO));
      }
      else
      {
LABEL_11:
        v8 = v3->m_NumOfQuest;
        if ( v8 >= v3->m_NumOfQuestBF )
        {
          v9 = 0;
          goto LABEL_18;
        }
        qmemcpy(&v3->m_pQuestArray[v8], v5, sizeof(v3->m_pQuestArray[v8]));
        ++v3->m_NumOfQuest;
      }
      v9 = 1;
LABEL_18:
      v11 = v9 == 0;
      v4 = i + 1;
      i = v4;
      bFailed |= v11;
      if ( v4 >= pQuestPlayerDoingData->nNumOfDoingQuest )
        return bFailed == 0;
      v2 = pQuestPlayerDoingData;
    }
  }
  return bFailed == 0;
}

//----- (0072F400) --------------------------------------------------------
BOOL __thiscall CQuest::Recv_NC_CHAR_QUEST_DONE_CMD_ACK(CQuest *this, PROTO_NC_CHAR_QUEST_DONE_CMD *pQuestPlayerDoneData)
{
  CQuest *v2; // edx@1
  unsigned __int16 v3; // bx@1
  int v4; // esi@2
  __int16 v5; // di@2
  char *v6; // eax@2
  unsigned int v7; // ecx@2
  unsigned int v8; // eax@2
  int v9; // eax@3
  unsigned __int16 *v10; // ecx@4
  int v11; // edi@7
  signed int v12; // eax@8
  PLAYER_QUEST_INFO *v13; // eax@10
  PLAYER_QUEST_INFO PlayerQuestInfo; // [sp+4h] [bp-24h]@1
  int bFailed; // [sp+24h] [bp-4h]@1

  v2 = this;
  v3 = 0;
  bFailed = 0;
  PlayerQuestInfo.Status = 2;
  if ( pQuestPlayerDoneData->nDoneQuestCount > 0u )
  {
    while ( 1 )
    {
      v4 = v2->m_NumOfQuestBF;
      v5 = *((_WORD *)&pQuestPlayerDoneData[1].chrregnum + 5 * v3);
      v6 = (char *)pQuestPlayerDoneData + 10 * v3;
      v7 = *(_DWORD *)(v6 + 14);
      v8 = *(_DWORD *)(v6 + 18);
      PlayerQuestInfo.ID = *((_WORD *)&pQuestPlayerDoneData[1].chrregnum + 5 * v3);
      PlayerQuestInfo.Data.EndTime = __PAIR__(v8, v7);
      if ( v4 )
      {
        v9 = 0;
        if ( v2->m_NumOfQuest > 0 )
        {
          v10 = &v2->m_pQuestArray->ID;
          while ( *v10 != v5 )
          {
            ++v9;
            v10 += 16;
            if ( v9 >= v2->m_NumOfQuest )
              goto LABEL_7;
          }
          if ( v9 != -1 )
          {
            v13 = &v2->m_pQuestArray[v9];
            if ( v13 )
              break;
          }
        }
      }
LABEL_7:
      v11 = v2->m_NumOfQuest;
      if ( v11 < v4 )
      {
        qmemcpy(&v2->m_pQuestArray[v11], &PlayerQuestInfo, sizeof(v2->m_pQuestArray[v11]));
        ++v2->m_NumOfQuest;
        goto LABEL_13;
      }
      v12 = 0;
LABEL_14:
      ++v3;
      bFailed |= v12 == 0;
      if ( v3 >= pQuestPlayerDoneData->nDoneQuestCount )
        return bFailed == 0;
    }
    qmemcpy(v13, &PlayerQuestInfo, sizeof(PLAYER_QUEST_INFO));
LABEL_13:
    v12 = 1;
    goto LABEL_14;
  }
  return bFailed == 0;
}

//----- (0072F4D0) --------------------------------------------------------
int __thiscall CQuest::Recv_NC_QUEST_GIVE_UP_ACK(CQuest *this, PROTO_NC_QUEST_GIVE_UP_ACK *pAck)
{
  int result; // eax@2

  if ( pAck->ErrorCode == 2881 )
    result = CQuest::SetQuestCancel(this, pAck->nQuestID);
  else
    result = 0;
  return result;
}

//----- (0072F500) --------------------------------------------------------
BOOL __thiscall CQuest::Recv_NC_CHAR_QUEST_READ_CMD_ACK(CQuest *this, PROTO_NC_CHAR_QUEST_READ_CMD *pQuestPlayerReadData)
{
  CQuest *v2; // edx@1
  PROTO_NC_CHAR_QUEST_READ_CMD *v3; // ecx@1
  int v4; // eax@1
  int v5; // esi@2
  __int16 v6; // di@2
  int v7; // eax@3
  unsigned __int16 *v8; // ecx@4
  int v9; // edi@7
  signed int v10; // eax@8
  PLAYER_QUEST_INFO *v11; // eax@10
  bool v12; // zf@14
  PLAYER_QUEST_INFO PlayerQuestInfo; // [sp+4h] [bp-28h]@1
  int i; // [sp+24h] [bp-8h]@1
  int bFailed; // [sp+28h] [bp-4h]@1

  v2 = this;
  v3 = pQuestPlayerReadData;
  LOWORD(v4) = 0;
  bFailed = 0;
  PlayerQuestInfo.Status = 20;
  i = 0;
  if ( pQuestPlayerReadData->nNumOfReadQuest > 0u )
  {
    while ( 1 )
    {
      v5 = v2->m_NumOfQuestBF;
      v6 = *((_WORD *)&v3[1].chrregnum + (unsigned __int16)v4);
      PlayerQuestInfo.ID = *((_WORD *)&v3[1].chrregnum + (unsigned __int16)v4);
      if ( v5 )
      {
        v7 = 0;
        if ( v2->m_NumOfQuest > 0 )
        {
          v8 = &v2->m_pQuestArray->ID;
          while ( *v8 != v6 )
          {
            ++v7;
            v8 += 16;
            if ( v7 >= v2->m_NumOfQuest )
              goto LABEL_7;
          }
          if ( v7 != -1 )
          {
            v11 = &v2->m_pQuestArray[v7];
            if ( v11 )
              break;
          }
        }
      }
LABEL_7:
      v9 = v2->m_NumOfQuest;
      if ( v9 < v5 )
      {
        qmemcpy(&v2->m_pQuestArray[v9], &PlayerQuestInfo, sizeof(v2->m_pQuestArray[v9]));
        ++v2->m_NumOfQuest;
        goto LABEL_13;
      }
      v10 = 0;
LABEL_14:
      v12 = v10 == 0;
      v4 = i + 1;
      i = v4;
      bFailed |= v12;
      v3 = pQuestPlayerReadData;
      if ( (unsigned __int16)v4 >= pQuestPlayerReadData->nNumOfReadQuest )
        return bFailed == 0;
    }
    qmemcpy(v11, &PlayerQuestInfo, sizeof(PLAYER_QUEST_INFO));
LABEL_13:
    v10 = 1;
    goto LABEL_14;
  }
  return bFailed == 0;
}

//----- (0072F5D0) --------------------------------------------------------
BOOL __thiscall CQuest::Recv_NC_CHAR_QUEST_REPEAT_CMD_ACK(CQuest *this, PROTO_NC_CHAR_QUEST_REPEAT_CMD *pQuestPlayerRepeatData)
{
  CQuest *v2; // edx@1
  PROTO_NC_CHAR_QUEST_REPEAT_CMD *v3; // ecx@1
  int v4; // eax@1
  char *v5; // esi@2
  int v6; // eax@3
  unsigned __int16 *v7; // ecx@4
  int v8; // edi@7
  signed int v9; // eax@8
  PLAYER_QUEST_INFO *v10; // eax@10
  bool v11; // zf@14
  int i; // [sp+4h] [bp-8h]@1
  int bFailed; // [sp+8h] [bp-4h]@1

  v2 = this;
  v3 = pQuestPlayerRepeatData;
  LOWORD(v4) = 0;
  bFailed = 0;
  i = 0;
  if ( pQuestPlayerRepeatData->nNumOfRepeatQuest > 0u )
  {
    while ( 1 )
    {
      v5 = (char *)&v3[1] + 32 * (unsigned __int16)v4;
      if ( v2->m_NumOfQuestBF )
      {
        v6 = 0;
        if ( v2->m_NumOfQuest > 0 )
        {
          v7 = &v2->m_pQuestArray->ID;
          while ( *v7 != *(_WORD *)v5 )
          {
            ++v6;
            v7 += 16;
            if ( v6 >= v2->m_NumOfQuest )
              goto LABEL_7;
          }
          if ( v6 != -1 )
          {
            v10 = &v2->m_pQuestArray[v6];
            if ( v10 )
              break;
          }
        }
      }
LABEL_7:
      v8 = v2->m_NumOfQuest;
      if ( v8 < v2->m_NumOfQuestBF )
      {
        qmemcpy(&v2->m_pQuestArray[v8], v5, sizeof(v2->m_pQuestArray[v8]));
        ++v2->m_NumOfQuest;
        goto LABEL_13;
      }
      v9 = 0;
LABEL_14:
      v11 = v9 == 0;
      v4 = i + 1;
      i = v4;
      bFailed |= v11;
      v3 = pQuestPlayerRepeatData;
      if ( (unsigned __int16)v4 >= pQuestPlayerRepeatData->nNumOfRepeatQuest )
        return bFailed == 0;
    }
    qmemcpy(v10, v5, sizeof(PLAYER_QUEST_INFO));
LABEL_13:
    v9 = 1;
    goto LABEL_14;
  }
  return bFailed == 0;
}

//----- (0072F690) --------------------------------------------------------
int __thiscall CQuest::Send_NC_QUEST_CLIENT_SCENARIO_DONE_REQ(CQuest *this, int nScenarioID)
{
  CQuest *v2; // edi@1
  int v3; // ebx@1
  int v4; // esi@4
  QUEST_DATA *v5; // eax@6
  int result; // eax@12
  int bResult; // [sp+8h] [bp-8h]@1
  int v8; // [sp+Ch] [bp-4h]@2

  v2 = this;
  v3 = 0;
  bResult = 0;
  if ( this->m_NumOfQuest <= 0 )
  {
    result = 0;
  }
  else
  {
    v8 = 0;
    do
    {
      if ( v3 >= 0 )
      {
        v4 = (int)&v2->m_pQuestArray[v8];
        if ( v4 )
        {
          if ( *(_BYTE *)(v4 + 2) == 6 )
          {
            v5 = CQuestData::GetQuestData(v2->m_pQuestData, *(_WORD *)v4);
            if ( v5 )
            {
              if ( v5->End.bScenario == 1 && v5->End.ScenarioID == (_WORD)nScenarioID && !(*(_BYTE *)(v4 + 29) & 2) )
                bResult = 1;
            }
          }
        }
      }
      ++v8;
      ++v3;
    }
    while ( v3 < v2->m_NumOfQuest );
    result = bResult;
    if ( bResult )
    {
      v2->vfptr->_Send_NC_QUEST_CLIENT_SCENARIO_DONE_REQ(v2, nScenarioID);
      result = bResult;
    }
  }
  return result;
}

//----- (0072F730) --------------------------------------------------------
int __thiscall CQuest::Recv_NC_QUEST_CLIENT_SCENARIO_DONE_ACK(CQuest *this, PROTO_NC_QUEST_CLIENT_SCENARIO_DONE_ACK *pAck)
{
  return ((int (__stdcall *)(_DWORD))this->vfptr->QuestPlayer_ScenarioDone)(pAck->nScenarioID);
}

//----- (0072F750) --------------------------------------------------------
void __thiscall CQuest::Recv_NC_QUEST_NOTIFY_MOB_KILL_CMD(CQuest *this, PROTO_NC_QUEST_NOTIFY_MOB_KILL_CMD *pCmd)
{
  unsigned int v2; // edi@1
  CQuest *v3; // ebx@1
  PROTO_NC_QUEST_NOTIFY_MOB_KILL_CMD *v4; // esi@2

  v2 = 0;
  v3 = this;
  if ( pCmd->NumOfActionQuest )
  {
    v4 = pCmd + 1;
    do
    {
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD))&v3->vfptr->gap4[4])(
        v3,
        *(_WORD *)&v4->NumOfActionQuest,
        *(_WORD *)&v4[2].NumOfActionQuest);
      ++v2;
      v4 += 4;
    }
    while ( v2 < pCmd->NumOfActionQuest );
  }
}

//----- (0072F790) --------------------------------------------------------
int __thiscall CQuest::QuestPlayer_LevelChange(CQuest *this, int nPlayerLevel)
{
  CQuest *v2; // edi@1
  int v3; // ebx@1
  int v4; // esi@4
  QUEST_DATA *v5; // eax@6
  int v6; // eax@8
  int result; // eax@11
  int bResult; // [sp+8h] [bp-8h]@1
  int v9; // [sp+Ch] [bp-4h]@2

  v2 = this;
  v3 = 0;
  bResult = 0;
  if ( this->m_NumOfQuest <= 0 )
  {
    result = 0;
  }
  else
  {
    v9 = 0;
    do
    {
      if ( v3 >= 0 )
      {
        v4 = (int)&v2->m_pQuestArray[v9];
        if ( v4 )
        {
          if ( *(_BYTE *)(v4 + 2) == 6 )
          {
            v5 = CQuestData::GetQuestData(v2->m_pQuestData, *(_WORD *)v4);
            if ( v5 )
            {
              if ( v5->End.bLevel == 1 )
              {
                v6 = v5->End.Level;
                if ( (unsigned __int8)v6 <= (unsigned __int8)nPlayerLevel )
                {
                  bResult = 1;
                  v2->vfptr->Occure_LevelChange(v2, *(_WORD *)v4, nPlayerLevel, v6);
                }
              }
            }
          }
        }
      }
      ++v9;
      ++v3;
    }
    while ( v3 < v2->m_NumOfQuest );
    result = bResult;
  }
  return result;
}

//----- (0072F820) --------------------------------------------------------
BOOL __stdcall CQuest::IsQuestArea(unsigned int CurrentX, unsigned int CurrentY, unsigned int QuestX, unsigned int QuestY, unsigned int QuestRange)
{
  return QuestRange >= (unsigned int)(signed __int64)sqrt((double)(abs(CurrentY - QuestY) + abs(CurrentX - QuestY)));
}

//----- (0072F880) --------------------------------------------------------
QUEST_DATA *__stdcall CQuest::IsQuestNPCMob(QUEST_DATA *lpQuestData, unsigned __int16 nNPCID)
{
  QUEST_DATA *result; // eax@1
  signed int v4; // edx@4
  char *v5; // eax@4

  result = lpQuestData;
  if ( lpQuestData )
  {
    if ( !lpQuestData->Start.bNPC || lpQuestData->Start.NPCID != nNPCID )
    {
      v4 = 0;
      v5 = &lpQuestData->End.NPCMobList[0].NPCMobAction;
      while ( !*(v5 - 4) || *v5 && *v5 != 3 || *((_WORD *)v5 - 1) != nNPCID )
      {
        ++v4;
        v5 += 8;
        if ( v4 >= 5 )
          return 0;
      }
    }
    result = (QUEST_DATA *)1;
  }
  return result;
}

//----- (0072F8E0) --------------------------------------------------------
int __stdcall CQuest::IsConversationNPCMob(QUEST_DATA *lpQuestData, unsigned __int16 nNPCID)
{
  signed int v3; // ecx@2
  char *v4; // eax@2
  int result; // eax@7

  if ( lpQuestData )
  {
    v3 = 0;
    v4 = &lpQuestData->End.NPCMobList[0].NPCMobAction;
    while ( !*(v4 - 4) || *v4 != 3 || *((_WORD *)v4 - 1) != nNPCID )
    {
      ++v3;
      v4 += 8;
      if ( v3 >= 5 )
        goto LABEL_7;
    }
    result = 1;
  }
  else
  {
LABEL_7:
    result = 0;
  }
  return result;
}

//----- (0072F920) --------------------------------------------------------
unsigned __int16 __stdcall CQuest::GetRewardNPC(QUEST_DATA *lpQuestData)
{
  signed int v2; // eax@2
  char *v3; // ecx@2
  unsigned __int16 result; // ax@6

  if ( lpQuestData )
  {
    v2 = 0;
    v3 = &lpQuestData->End.NPCMobList[0].NPCMobAction;
    while ( !*(v3 - 4) || *v3 )
    {
      ++v2;
      v3 += 8;
      if ( v2 >= 5 )
        goto LABEL_6;
    }
    result = lpQuestData->End.NPCMobList[v2].NPCMobID;
  }
  else
  {
LABEL_6:
    result = -1;
  }
  return result;
}

//----- (0072F960) --------------------------------------------------------
int __thiscall CQuest::IsSoonableQuest(CQuest *this, QUEST_DATA *lpQuestData)
{
  QUEST_DATA *v2; // ebx@1
  CQuest *v3; // esi@1
  unsigned __int8 v4; // al@2
  PLAYER_QUEST_INFO *v5; // eax@10
  char v6; // cl@11
  tm *v7; // esi@22
  int v8; // eax@22
  tm EndTM; // [sp+8h] [bp-78h]@22
  tm StartTM; // [sp+2Ch] [bp-54h]@22
  tm CurrentTM; // [sp+50h] [bp-30h]@22
  unsigned int LocationX; // [sp+74h] [bp-Ch]@7
  __int64 timeptr; // [sp+78h] [bp-8h]@7

  v2 = lpQuestData;
  v3 = this;
  if ( lpQuestData->Start.bLevel )
  {
    v4 = ((int (*)(void))this->vfptr->GetQuestPlayerLevel)();
    if ( (unsigned __int8)(v4 + 5) < v2->Start.LevelMin || v4 > v2->Start.LevelMax )
      return 0;
  }
  if ( v2->Start.bItem && v3->vfptr->GetQuestPlayerItemLot(v3, v2->Start.ItemID) < v2->Start.ItemLot )
    return 0;
  if ( v2->Start.bLocation )
  {
    v3->vfptr->GetPlayerCurrentLocation(
      v3,
      (unsigned __int16 *)&lpQuestData,
      &LocationX,
      (unsigned int *)((char *)&timeptr + 4));
    if ( v2->Start.Location != (_WORD)lpQuestData
      || !v3->vfptr->IsQuestArea(
            v3,
            LocationX,
            HIDWORD(timeptr),
            v2->Start.LocationX,
            v2->Start.LocationY,
            v2->Start.LocationRange) )
    {
      return 0;
    }
  }
  if ( v2->Start.bQuest )
  {
    v5 = CQuest::GetQuestInfo(v3, v2->Start.QuestID);
    if ( v5 )
    {
      v6 = v5->Status;
      if ( v6 == 2 )
      {
        if ( v3->vfptr->IsSoonableDailyQuest(v3, v5) != 1 )
          goto LABEL_15;
      }
      else if ( v6 == 4 )
      {
        goto LABEL_15;
      }
    }
    return 0;
  }
LABEL_15:
  if ( v2->Start.bRace && v2->Start.Race != (unsigned __int8)v3->vfptr->GetQuestPlayerRace(v3)
    || v2->Start.bClass && v2->Start.Class != (unsigned __int8)v3->vfptr->GetQuestPlayerClass(v3)
    || v2->Start.bGender && v2->Start.Gender != (unsigned __int8)v3->vfptr->GetQuestPlayerGender(v3) )
  {
    return 0;
  }
  if ( v2->Start.bDate )
  {
    _time64(&timeptr);
    qmemcpy(&CurrentTM, _localtime64(&timeptr), sizeof(CurrentTM));
    lpQuestData = (QUEST_DATA *)((char *)v2 + 72);
    qmemcpy(&StartTM, _localtime64(&v2->Start.DateStart), sizeof(StartTM));
    LocationX = (unsigned int)&v2->Start.DateEnd;
    v7 = _localtime64(&v2->Start.DateEnd);
    v8 = v2->Start.DateMode;
    qmemcpy(&EndTM, v7, sizeof(EndTM));
    switch ( v8 )
    {
      case 0:
        if ( CurrentTM.tm_year < StartTM.tm_year || CurrentTM.tm_year > EndTM.tm_year )
          return 0;
        return 1;
      case 1:
        if ( CurrentTM.tm_mon >= StartTM.tm_mon && CurrentTM.tm_mon <= EndTM.tm_mon )
          return 1;
        return 0;
      case 2:
        if ( CurrentTM.tm_mday >= StartTM.tm_mday && CurrentTM.tm_mday <= EndTM.tm_mday )
          return 1;
        return 0;
      case 3:
        if ( timeptr >= *(_QWORD *)&lpQuestData->nQuestDataSize
          && (SHIDWORD(timeptr) < *(_DWORD *)(LocationX + 4)
           || SHIDWORD(timeptr) <= *(_DWORD *)(LocationX + 4) && (unsigned int)timeptr <= *(_DWORD *)LocationX) )
        {
          return 1;
        }
        return 0;
      default:
        return 1;
    }
  }
  return 1;
}

//----- (0072FB80) --------------------------------------------------------
int __thiscall CQuest::IsDoingableQuest(CQuest *this, QUEST_DATA *lpQuestData)
{
  CQuest *v2; // esi@1
  int result; // eax@2
  unsigned __int8 v4; // al@4

  v2 = this;
  result = 0;
  if ( CQuest::IsSoonableQuest(this, lpQuestData) )
  {
    if ( !lpQuestData->Start.bLevel
      || (v4 = v2->vfptr->GetQuestPlayerLevel(v2), v4 >= lpQuestData->Start.LevelMin)
      && v4 <= lpQuestData->Start.LevelMax )
    {
      result = 1;
    }
  }
  return result;
}

//----- (0072FBC0) --------------------------------------------------------
int __thiscall CQuest::IsDoingableQuest(CQuest *this, unsigned __int16 hQuestID)
{
  CQuest *v2; // edi@1
  QUEST_DATA *v3; // eax@1
  QUEST_DATA *v4; // esi@1
  int result; // eax@2
  char v6; // al@5

  v2 = this;
  v3 = CQuestData::GetQuestData(this->m_pQuestData, hQuestID);
  v4 = v3;
  result = 0;
  if ( v3 )
  {
    if ( CQuest::IsSoonableQuest(v2, v3) )
    {
      if ( !v4->Start.bLevel
        || (v6 = v2->vfptr->GetQuestPlayerLevel(v2), (unsigned __int8)v6 >= v4->Start.LevelMin)
        && (unsigned __int8)v6 <= v4->Start.LevelMax )
      {
        result = 1;
      }
    }
  }
  return result;
}

//----- (0072FC20) --------------------------------------------------------
int __thiscall CQuest::IsRewardAbleQuest(CQuest *this, PLAYER_QUEST_INFO *pQuestInfo)
{
  CQuest *v2; // edi@1
  QUEST_DATA *v3; // eax@1
  QUEST_DATA *v4; // ebx@1
  signed int v6; // edx@5
  int v7; // ecx@5
  int v8; // esi@10
  unsigned int LocationX; // [sp+8h] [bp-Ch]@16
  unsigned int LocationY; // [sp+Ch] [bp-8h]@16
  int nLocation; // [sp+10h] [bp-4h]@10

  v2 = this;
  v3 = CQuestData::GetQuestData(this->m_pQuestData, pQuestInfo->ID);
  v4 = v3;
  if ( v3 && (!v3->End.bLevel || (unsigned __int8)v2->vfptr->GetQuestPlayerLevel(v2) >= v3->End.Level) )
  {
    v6 = 0;
    v7 = (int)&v4->End.NPCMobList[0].NPCMobAction;
    while ( !*(_BYTE *)(v7 - 4)
         || (unsigned __int8)(*(_BYTE *)v7 - 1) > 2u
         || (unsigned __int8)pQuestInfo->Data.End_NPCMobCount[v6] >= *(_BYTE *)(v7 + 1) )
    {
      ++v6;
      v7 += 8;
      if ( v6 >= 5 )
      {
        nLocation = 0;
        v8 = (int)&v4->End.ItemList[0].ItemID;
        do
        {
          if ( *(_BYTE *)(v8 - 2)
            && (v2->vfptr->IsQuestPlayerItemLock(v2, *(_WORD *)v8) == 1
             || v2->vfptr->GetQuestPlayerItemLot(v2, *(_WORD *)v8) < *(_WORD *)(v8 + 2)) )
          {
            return 0;
          }
          v8 += 6;
          ++nLocation;
        }
        while ( nLocation < 5 );
        if ( v4->End.bLocation )
        {
          v2->vfptr->GetPlayerCurrentLocation(v2, (unsigned __int16 *)&nLocation, &LocationX, &LocationY);
          if ( v4->End.Location != (_WORD)nLocation
            || !v2->vfptr->IsQuestArea(
                  v2,
                  LocationX,
                  LocationY,
                  v4->End.LocationX,
                  v4->End.LocationY,
                  v4->End.LocationRange) )
          {
            return 0;
          }
        }
        if ( v4->End.bScenario && !(*((_BYTE *)&pQuestInfo->Data + 26) & 2)
          || v4->End.bRace && v4->End.Race != (unsigned __int8)v2->vfptr->GetQuestPlayerRace(v2)
          || v4->End.bClass && v4->End.Class != (unsigned __int8)v2->vfptr->GetQuestPlayerClass(v2)
          || v4->End.bTimeLimit && v4->End.TimeLimit <= pQuestInfo->Data.End_RunningTimeSec )
        {
          return 0;
        }
        return 1;
      }
    }
  }
  return 0;
}

//----- (0072FDB0) --------------------------------------------------------
char __thiscall CQuest::IsSoonableDailyQuest(CQuest *this, PLAYER_QUEST_INFO *pQuestInfo)
{
  PLAYER_QUEST_INFO *v2; // esi@1
  CQuest *v3; // edi@1
  char result; // al@2
  QUEST_DATA *v5; // eax@3
  int v6; // eax@6
  char bReternValue_3; // [sp+13h] [bp+Bh]@5

  v2 = pQuestInfo;
  v3 = this;
  if ( pQuestInfo && (v5 = CQuestData::GetQuestData(this->m_pQuestData, pQuestInfo->ID)) != 0 && v5->Type == 10 )
  {
    bReternValue_3 = 0;
    switch ( v5->nDailyQuestType )
    {
      case 1:
        v6 = v3->m_QuestRestTime.tResetDayQuest;
        goto LABEL_7;
      case 2:
        v6 = v3->m_QuestRestTime.tResetWeekQuest;
        goto LABEL_7;
      case 3:
        v6 = v3->m_QuestRestTime.tResetMonthQuest;
        goto LABEL_7;
      case 4:
        v6 = v3->m_QuestRestTime.tResetYearQuest;
LABEL_7:
        if ( v2->Data.EndTime >= v6 )
          goto LABEL_13;
        result = 1;
        break;
      default:
        bReternValue_3 = 0;
LABEL_13:
        result = bReternValue_3;
        break;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0072FE50) --------------------------------------------------------
void __thiscall CQuest::CQuest(CQuest *this, CQuestData *pQuestData)
{
  CQuest *v2; // esi@1

  v2 = this;
  this->vfptr = (CQuestVtbl *)&CQuest::`vftable';
  this->m_pQuestData = pQuestData;
  this->m_NumOfQuest = 0;
  this->m_ProcessedTime = _time32(0);
  v2->m_NumOfQuestBF = 0;
  v2->m_pQuestArray = 0;
  v2->m_MaxOfQuestListWithNPC = 0;
  v2->m_NumOfQuestListWithNPC = 0;
  v2->m_pQuestListWithNPC = 0;
  v2->m_QuestStatusPriority[1] = 21;
  v2->m_QuestStatusPriority[2] = 21;
  v2->m_QuestStatusPriority[3] = 21;
  v2->m_QuestStatusPriority[4] = 21;
  v2->m_QuestStatusPriority[9] = 21;
  v2->m_QuestStatusPriority[10] = 21;
  v2->m_QuestStatusPriority[11] = 21;
  v2->m_QuestStatusPriority[12] = 21;
  v2->m_QuestStatusPriority[13] = 21;
  v2->m_QuestStatusPriority[14] = 21;
  v2->m_QuestStatusPriority[15] = 21;
  v2->m_QuestStatusPriority[16] = 21;
  v2->m_QuestStatusPriority[17] = 21;
  v2->m_QuestStatusPriority[18] = 21;
  v2->m_QuestStatusPriority[19] = 21;
  v2->m_QuestStatusPriority[8] = 0;
  v2->m_QuestStatusPriority[6] = 1;
  v2->m_QuestStatusPriority[20] = 2;
  v2->m_QuestStatusPriority[5] = 2;
  v2->m_QuestStatusPriority[7] = 2;
  v2->m_QuestStatusPriority[0] = 22;
  v2->m_QuestTypePriority[1] = 11;
  v2->m_QuestTypePriority[4] = 11;
  v2->m_QuestTypePriority[10] = 11;
  v2->m_QuestTypePriority[3] = 0;
  v2->m_QuestTypePriority[2] = 1;
  v2->m_QuestTypePriority[6] = 2;
  v2->m_QuestTypePriority[7] = 2;
  v2->m_QuestTypePriority[8] = 2;
  v2->m_QuestTypePriority[5] = 3;
  v2->m_QuestTypePriority[9] = 4;
  v2->m_QuestTypePriority[0] = 5;
}
// 9CEBA4: using guessed type int (__stdcall *CQuest::`vftable')(int);

//----- (0072FF30) --------------------------------------------------------
QUEST_DATA *__thiscall CQuest::SetQuestDone(CQuest *this, unsigned __int16 nID)
{
  int v2; // esi@2
  int v3; // eax@2
  PLAYER_QUEST_INFO *v4; // edx@3
  QUEST_DATA *result; // eax@6

  if ( !this->m_NumOfQuestBF )
    goto LABEL_12;
  v2 = this->m_NumOfQuest;
  v3 = 0;
  if ( v2 <= 0 )
    goto LABEL_12;
  v4 = this->m_pQuestArray;
  while ( v4->ID != nID )
  {
    ++v3;
    ++v4;
    if ( v3 >= v2 )
      return CQuest::SetQuestDone(this, 0);
  }
  if ( v3 != -1 )
    result = CQuest::SetQuestDone(this, &this->m_pQuestArray[v3]);
  else
LABEL_12:
    result = CQuest::SetQuestDone(this, 0);
  return result;
}

//----- (0072FFA0) --------------------------------------------------------
int __thiscall CQuest::GetNewQuestStatus(CQuest *this, QUEST_DATA *lpQuestData)
{
  CQuest *v2; // esi@1
  int v3; // edx@2
  int v4; // eax@2
  PLAYER_QUEST_INFO *v5; // ecx@3
  unsigned __int8 v6; // al@8
  int result; // eax@10
  int v8; // eax@12
  bool v9; // zf@12
  int v10; // eax@12
  PLAYER_QUEST_INFO *v11; // ecx@12

  v2 = this;
  if ( !this->m_NumOfQuestBF )
    goto LABEL_6;
  v3 = this->m_NumOfQuest;
  v4 = 0;
  if ( v3 <= 0 )
    goto LABEL_6;
  v5 = this->m_pQuestArray;
  while ( v5->ID != lpQuestData->ID )
  {
    ++v4;
    ++v5;
    if ( v4 >= v3 )
      goto LABEL_6;
  }
  if ( v4 == -1
    || (v8 = v4, v9 = &v2->m_pQuestArray[v8] == 0, v10 = (int)&v2->m_pQuestArray[v8], v11 = (PLAYER_QUEST_INFO *)v10, v9) )
  {
LABEL_6:
    if ( CQuest::IsSoonableQuest(v2, lpQuestData)
      && (!lpQuestData->Start.bLevel
       || (v6 = v2->vfptr->GetQuestPlayerLevel(v2), v6 >= lpQuestData->Start.LevelMin)
       && v6 <= lpQuestData->Start.LevelMax) )
    {
LABEL_22:
      result = 5;
    }
    else
    {
LABEL_10:
      result = CQuest::IsSoonableQuest(v2, lpQuestData) != 0 ? 3 : 0;
    }
  }
  else
  {
    result = *(_BYTE *)(v10 + 2);
    switch ( result )
    {
      default:
        return result;
      case 3:
        if ( !CQuest::IsDoingableQuest(v2, lpQuestData) )
          goto LABEL_10;
        result = 5;
        break;
      case 4:
        result = CQuest::IsDoingableQuest(v2, lpQuestData) != 0 ? 4 : 0;
        break;
      case 5:
        result = CQuest::IsDoingableQuest(v2, lpQuestData) != 0 ? 5 : 0;
        break;
      case 20:
        result = CQuest::IsDoingableQuest(v2, lpQuestData) != 0 ? 0x14 : 0;
        break;
      case 6:
      case 8:
        result = CQuest::IsRewardAbleQuest(v2, v11) != 0 ? 8 : 6;
        break;
      case 2:
        if ( v2->vfptr->IsSoonableDailyQuest(v2, v11) == 1 && CQuest::IsDoingableQuest(v2, lpQuestData) == 1 )
          goto LABEL_22;
        result = 2;
        break;
    }
  }
  return result;
}

//----- (00730120) --------------------------------------------------------
QUEST_DATA *__thiscall CQuest::GetNewQuestStatus(CQuest *this, unsigned __int16 nID)
{
  CQuest *v2; // esi@1
  QUEST_DATA *result; // eax@1

  v2 = this;
  result = CQuestData::GetQuestData(this->m_pQuestData, nID);
  if ( result )
    result = (QUEST_DATA *)CQuest::GetNewQuestStatus(v2, result);
  return result;
}

//----- (00730150) --------------------------------------------------------
int __thiscall CQuest::IsDoingQuest(CQuest *this, unsigned __int16 hQuestID)
{
  CQuest *v2; // esi@1
  QUEST_DATA *v3; // eax@1
  int v4; // eax@2
  int result; // eax@5

  v2 = this;
  v3 = CQuestData::GetQuestData(this->m_pQuestData, hQuestID);
  result = 0;
  if ( v3 )
  {
    v4 = CQuest::GetNewQuestStatus(v2, v3);
    if ( v4 == 6 || v4 == 7 || v4 == 8 )
      result = 1;
  }
  return result;
}

//----- (00730190) --------------------------------------------------------
PLAYER_QUEST_STATUS __thiscall CQuest::DoingQuestUpdateStatus(CQuest *this, int nIndex)
{
  CQuest *v2; // esi@1
  PLAYER_QUEST_INFO *v3; // edi@3
  PLAYER_QUEST_STATUS result; // eax@4
  QUEST_DATA *v5; // eax@5

  v2 = this;
  if ( nIndex < this->m_NumOfQuest && nIndex >= 0 && (v3 = &this->m_pQuestArray[nIndex]) != 0 )
  {
    v5 = CQuestData::GetQuestData(this->m_pQuestData, v3->ID);
    if ( v5 )
    {
      LOBYTE(result) = CQuest::GetNewQuestStatus(v2, v5);
      v3->Status = result;
      result = (unsigned __int8)result;
    }
    else
    {
      v3->Status = 0;
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007301F0) --------------------------------------------------------
int __thiscall CQuest::GetQuestStatusWithNPC(CQuest *this, CQuest::NPC_QUEST_STATUS *kQuestStatus, QUEST_DATA *lpQuestData, unsigned int uiMainCharLv, bool bQmark, bool bLowRepeat)
{
  CQuest::NPC_QUEST_STATUS *v6; // ebx@1
  unsigned __int16 v7; // ST04_2@1
  CQuest *v8; // edi@1
  int v9; // eax@2
  int result; // eax@3
  PLAYER_QUEST_STATUS eQuestState; // [sp+14h] [bp+8h]@2

  v6 = kQuestStatus;
  v7 = kQuestStatus->hID;
  v8 = this;
  kQuestStatus->eResultState = 0;
  kQuestStatus->lpQuestData = lpQuestData;
  if ( CQuest::IsQuestNPCMob(lpQuestData, v7) )
  {
    v9 = CQuest::GetNewQuestStatus(v8, lpQuestData);
    eQuestState = v9;
    switch ( v9 )
    {
      case 0:
      case 1:
      case 2:
      case 3:
        goto $LN19_67;
      case 4:
      case 7:
        if ( lpQuestData && lpQuestData->Start.bNPC && lpQuestData->Start.NPCID == v6->hID )
          break;
        return 0;
      case 5:
      case 20:
        if ( lpQuestData && lpQuestData->Start.bNPC && lpQuestData->Start.NPCID == v6->hID )
          break;
        return 0;
      case 6:
        if ( CQuest::IsConversationNPCMob(lpQuestData, v6->hID)
          || lpQuestData && lpQuestData->Start.bNPC && lpQuestData->Start.NPCID == v6->hID )
        {
          goto LABEL_22;
        }
        return 0;
      case 8:
        if ( v6->hID == CQuest::GetRewardNPC(lpQuestData) )
          goto LABEL_22;
        if ( !lpQuestData || !lpQuestData->Start.bNPC || lpQuestData->Start.NPCID != v6->hID )
          goto $LN19_67;
        eQuestState = 6;
LABEL_22:
        v9 = eQuestState;
        break;
      default:
        break;
    }
    if ( bQmark == 1 && (v9 == 5 || v9 == 20) && (unsigned int)lpQuestData->Start.LevelMin + 5 < uiMainCharLv )
      v9 = 9;
    v6->eResultState = v9;
    v6->nLevel = lpQuestData->Start.LevelMin;
    result = v9 != 0;
  }
  else
  {
$LN19_67:
    result = 0;
  }
  return result;
}

//----- (00730350) --------------------------------------------------------
int __thiscall CQuest::QuestPlayer_NPCMobKill(CQuest *this, int nMobID, const unsigned __int16 nQuestID)
{
  CQuest *v3; // edi@1
  int v4; // ebx@1
  int v5; // esi@4
  QUEST_DATA *v6; // eax@7
  int v7; // ebx@8
  int v8; // eax@8
  signed int v9; // ecx@12
  unsigned __int8 v10; // al@13
  int v11; // ebx@13
  PLAYER_QUEST_STATUS v12; // eax@13
  int result; // eax@21
  int bResult; // [sp+8h] [bp-18h]@1
  int v15; // [sp+Ch] [bp-14h]@8
  QUEST_DATA *pQuestData; // [sp+10h] [bp-10h]@7
  int v17; // [sp+14h] [bp-Ch]@2
  int i; // [sp+18h] [bp-8h]@1
  int nMobCount; // [sp+1Ch] [bp-4h]@8

  v3 = this;
  v4 = 0;
  bResult = 0;
  i = 0;
  if ( this->m_NumOfQuest <= 0 )
  {
    result = 0;
  }
  else
  {
    v17 = 0;
    do
    {
      if ( v4 >= 0 )
      {
        v5 = (int)&v3->m_pQuestArray[v17];
        if ( v5 )
        {
          if ( *(_BYTE *)(v5 + 2) == 6 && nQuestID == *(_WORD *)v5 )
          {
            v6 = CQuestData::GetQuestData(v3->m_pQuestData, *(_WORD *)v5);
            pQuestData = v6;
            if ( v6 )
            {
              v7 = 0;
              v8 = (int)&v6->End.NPCMobList[0].NPCMobID;
              nMobCount = 0;
              v15 = v8;
              do
              {
                if ( *(_BYTE *)(v8 - 2) == 1 && *(_WORD *)v8 == (_WORD)nMobID && *(_BYTE *)(v8 + 2) == 1 )
                {
                  v9 = *(_BYTE *)(v8 + 3);
                  if ( *(_BYTE *)(v7 + v5 + 24) < v9 )
                  {
                    v10 = *(_BYTE *)(v7 + v5 + 24) + 1;
                    *(_BYTE *)(nMobCount + v5 + 24) = v10;
                    bResult = 1;
                    v3->vfptr->Occure_NPCMobKill(v3, *(_WORD *)v5, nMobID, v10, v9);
                    v11 = *(_BYTE *)(v5 + 2);
                    v12 = CQuest::DoingQuestUpdateStatus(v3, i);
                    if ( v11 == 6 )
                    {
                      if ( v12 == 8 )
                      {
                        v3->vfptr->Occure_NewStatusReward(v3, (PLAYER_QUEST_INFO *)v5, pQuestData);
                      }
                      else if ( v12 == 7 )
                      {
                        v3->vfptr->Occure_NewStatusFailed(v3, (PLAYER_QUEST_INFO *)v5, pQuestData);
                      }
                    }
                  }
                }
                v7 = nMobCount + 1;
                v8 = v15 + 8;
                nMobCount = v7;
                v15 += 8;
              }
              while ( v7 < 5 );
              v4 = i;
            }
          }
        }
      }
      ++v17;
      i = ++v4;
    }
    while ( v4 < v3->m_NumOfQuest );
    result = bResult;
  }
  return result;
}

//----- (00730490) --------------------------------------------------------
int __thiscall CQuest::QuestPlayer_TakeItem(CQuest *this, int nItemID, int nCurrentLot)
{
  CQuest *v3; // esi@1
  int v4; // ebx@1
  int v5; // edi@4
  QUEST_DATA *v6; // eax@6
  int v7; // ecx@7
  signed int v8; // ebx@10
  int v9; // ebx@11
  PLAYER_QUEST_STATUS v10; // eax@11
  bool v11; // zf@16
  int result; // eax@19
  int bResult; // [sp+8h] [bp-18h]@1
  signed int v14; // [sp+Ch] [bp-14h]@7
  int v15; // [sp+10h] [bp-10h]@7
  QUEST_DATA *pQuestData; // [sp+14h] [bp-Ch]@6
  int v17; // [sp+18h] [bp-8h]@2
  int i; // [sp+1Ch] [bp-4h]@1

  v3 = this;
  v4 = 0;
  bResult = 0;
  i = 0;
  if ( this->m_NumOfQuest <= 0 )
  {
    result = 0;
  }
  else
  {
    v17 = 0;
    do
    {
      if ( v4 >= 0 )
      {
        v5 = (int)&v3->m_pQuestArray[v17];
        if ( v5 )
        {
          if ( *(_BYTE *)(v5 + 2) == 6 )
          {
            v6 = CQuestData::GetQuestData(v3->m_pQuestData, *(_WORD *)v5);
            pQuestData = v6;
            if ( v6 )
            {
              v7 = (int)&v6->End.ItemList[0].ItemID;
              v15 = (int)&v6->End.ItemList[0].ItemID;
              v14 = 5;
              do
              {
                if ( *(_BYTE *)(v7 - 2) == 1 && *(_WORD *)v7 == (_WORD)nItemID )
                {
                  v8 = *(_WORD *)(v7 + 2);
                  v3->vfptr->Occure_TakeItem(v3, *(_WORD *)v5, nItemID, nCurrentLot, v8);
                  if ( (unsigned __int16)nCurrentLot <= v8 )
                  {
                    v9 = *(_BYTE *)(v5 + 2);
                    bResult = 1;
                    v10 = CQuest::DoingQuestUpdateStatus(v3, i);
                    if ( v9 == 6 )
                    {
                      if ( v10 == 8 )
                      {
                        v3->vfptr->Occure_NewStatusReward(v3, (PLAYER_QUEST_INFO *)v5, pQuestData);
                      }
                      else if ( v10 == 7 )
                      {
                        v3->vfptr->Occure_NewStatusFailed(v3, (PLAYER_QUEST_INFO *)v5, pQuestData);
                      }
                    }
                  }
                }
                v7 = v15 + 6;
                v11 = v14-- == 1;
                v15 += 6;
              }
              while ( !v11 );
              v4 = i;
            }
          }
        }
      }
      ++v17;
      i = ++v4;
    }
    while ( v4 < v3->m_NumOfQuest );
    result = bResult;
  }
  return result;
}

//----- (007305A0) --------------------------------------------------------
int __thiscall CQuest::QuestPlayer_DestroyItem(CQuest *this, int nItemID, int nCurrentLot)
{
  CQuest *v3; // esi@1
  int v4; // edi@1
  int v5; // ebx@4
  QUEST_DATA *v6; // eax@5
  int v7; // ecx@6
  signed int v8; // edi@9
  int v9; // edi@11
  QUEST_DATA *v10; // eax@12
  void (__thiscall *v11)(CQuest *, PLAYER_QUEST_INFO *, QUEST_DATA *); // edx@18
  bool v12; // zf@22
  PLAYER_QUEST_STATUS CurrentStatus; // [sp+8h] [bp-1Ch]@10
  int bResult; // [sp+Ch] [bp-18h]@1
  signed int v16; // [sp+10h] [bp-14h]@6
  int v17; // [sp+14h] [bp-10h]@6
  QUEST_DATA *pQuestData; // [sp+18h] [bp-Ch]@5
  int i; // [sp+1Ch] [bp-8h]@1
  int v20; // [sp+20h] [bp-4h]@2

  v3 = this;
  v4 = 0;
  bResult = 0;
  i = 0;
  if ( this->m_NumOfQuest > 0 )
  {
    v20 = 0;
    while ( 1 )
    {
      if ( v4 >= 0 )
      {
        v5 = (int)&v3->m_pQuestArray[v20];
        if ( v5 )
        {
          v6 = CQuestData::GetQuestData(v3->m_pQuestData, *(_WORD *)v5);
          pQuestData = v6;
          if ( v6 )
            break;
        }
      }
LABEL_24:
      ++v20;
      i = ++v4;
      if ( v4 >= v3->m_NumOfQuest )
        return bResult;
    }
    v7 = (int)&v6->End.ItemList[0].ItemID;
    v17 = (int)&v6->End.ItemList[0].ItemID;
    v16 = 5;
    while ( 1 )
    {
      if ( *(_BYTE *)(v7 - 2) != 1 )
        goto LABEL_22;
      if ( *(_WORD *)v7 != (_WORD)nItemID )
        goto LABEL_22;
      v8 = *(_WORD *)(v7 + 2);
      v3->vfptr->Occure_DestroyItem(v3, *(_WORD *)v5, nItemID, nCurrentLot, v8);
      if ( (unsigned __int16)nCurrentLot >= v8 )
        goto LABEL_22;
      bResult = 1;
      CurrentStatus = *(_BYTE *)(v5 + 2);
      if ( i < v3->m_NumOfQuest && (v9 = (int)&v3->m_pQuestArray[v20]) != 0 )
      {
        v10 = CQuestData::GetQuestData(v3->m_pQuestData, *(_WORD *)v9);
        if ( v10 )
          LOBYTE(v10) = CQuest::GetNewQuestStatus(v3, v10);
        *(_BYTE *)(v9 + 2) = (_BYTE)v10;
        v10 = (QUEST_DATA *)(unsigned __int8)v10;
      }
      else
      {
        v10 = 0;
      }
      if ( CurrentStatus != 8 )
        goto LABEL_22;
      if ( v10 == (QUEST_DATA *)6 )
        break;
      if ( v10 == (QUEST_DATA *)7 )
      {
        v11 = v3->vfptr->Occure_NewStatusFailed;
        goto LABEL_21;
      }
LABEL_22:
      v7 = v17 + 6;
      v12 = v16-- == 1;
      v17 += 6;
      if ( v12 )
      {
        v4 = i;
        goto LABEL_24;
      }
    }
    v11 = v3->vfptr->Occure_NewStatusIng;
LABEL_21:
    v11(v3, (PLAYER_QUEST_INFO *)v5, pQuestData);
    goto LABEL_22;
  }
  return 0;
}

//----- (007306E0) --------------------------------------------------------
int __thiscall CQuest::QuestPlayer_CheckLocation(CQuest *this)
{
  CQuest *v1; // edi@1
  void (__thiscall *v2)(CQuest *, unsigned __int16 *, unsigned int *, unsigned int *); // edx@1
  int v3; // eax@1
  int v4; // ecx@1
  int v5; // esi@4
  QUEST_DATA *v6; // eax@6
  void (__thiscall *v7)(CQuest *, unsigned __int16, unsigned __int16); // eax@11
  int v8; // ST0C_4@11
  int v9; // ebx@11
  PLAYER_QUEST_STATUS v10; // eax@11
  int v11; // eax@16
  int result; // eax@17
  unsigned int LocationX; // [sp+8h] [bp-1Ch]@1
  unsigned int LocationY; // [sp+Ch] [bp-18h]@1
  int bResult; // [sp+10h] [bp-14h]@1
  QUEST_DATA *pQuestData; // [sp+14h] [bp-10h]@6
  int nLocation; // [sp+18h] [bp-Ch]@1
  unsigned int v18; // [sp+1Ch] [bp-8h]@2
  int i; // [sp+20h] [bp-4h]@1

  v1 = this;
  v2 = this->vfptr->GetPlayerCurrentLocation;
  bResult = 0;
  ((void (__stdcall *)(int *, unsigned int *, unsigned int *))v2)(&nLocation, &LocationX, &LocationY);
  v3 = v1->m_NumOfQuest;
  v4 = 0;
  i = 0;
  if ( v3 <= 0 )
  {
    result = 0;
  }
  else
  {
    v18 = 0;
    if ( v3 <= 0 )
      goto LABEL_16;
    do
    {
      if ( v4 >= 0 )
      {
        v5 = (int)&v1->m_pQuestArray[v18 / 0x20];
        if ( v5 )
        {
          if ( *(_BYTE *)(v5 + 2) == 6 )
          {
            v6 = CQuestData::GetQuestData(v1->m_pQuestData, *(_WORD *)v5);
            pQuestData = v6;
            if ( v6 )
            {
              if ( v6->End.bLocation == 1 && v6->End.Location == (_WORD)nLocation && !(*(_BYTE *)(v5 + 29) & 1) )
              {
                if ( v1->vfptr->IsQuestArea(
                       v1,
                       LocationX,
                       LocationY,
                       v6->End.LocationX,
                       v6->End.LocationY,
                       v6->End.LocationRange) )
                {
                  *(_BYTE *)(v5 + 29) |= 1u;
                  v7 = v1->vfptr->Occure_CheckLocation;
                  v8 = *(_WORD *)v5;
                  bResult = 1;
                  v7(v1, v8, nLocation);
                  v9 = *(_BYTE *)(v5 + 2);
                  v10 = CQuest::DoingQuestUpdateStatus(v1, i);
                  if ( v9 == 6 )
                  {
                    if ( v10 == 8 )
                    {
                      v1->vfptr->Occure_NewStatusReward(v1, (PLAYER_QUEST_INFO *)v5, pQuestData);
                    }
                    else if ( v10 == 7 )
                    {
                      v1->vfptr->Occure_NewStatusFailed(v1, (PLAYER_QUEST_INFO *)v5, pQuestData);
                    }
                  }
                }
              }
            }
          }
        }
      }
LABEL_16:
      v11 = v1->m_NumOfQuest;
      v18 += 32;
      v4 = i + 1;
      i = v4;
    }
    while ( v4 < v11 );
    result = bResult;
  }
  return result;
}

//----- (00730820) --------------------------------------------------------
int __thiscall CQuest::QuestPlayer_ScenarioDone(CQuest *this, int nScenarioID)
{
  CQuest *v2; // edi@1
  int v3; // eax@1
  int v4; // ecx@1
  int v5; // esi@4
  QUEST_DATA *v6; // eax@6
  char v7; // al@9
  int v8; // ebx@10
  PLAYER_QUEST_STATUS v9; // eax@10
  int result; // eax@16
  int bResult; // [sp+4h] [bp-10h]@1
  QUEST_DATA *pQuestData; // [sp+8h] [bp-Ch]@6
  int v13; // [sp+Ch] [bp-8h]@2
  int i; // [sp+10h] [bp-4h]@1

  v2 = this;
  v3 = this->m_NumOfQuest;
  v4 = 0;
  bResult = 0;
  i = 0;
  if ( v3 <= 0 )
  {
    result = 0;
  }
  else
  {
    v13 = 0;
    do
    {
      if ( v4 >= 0 )
      {
        v5 = (int)&v2->m_pQuestArray[v13];
        if ( v5 )
        {
          if ( *(_BYTE *)(v5 + 2) == 6 )
          {
            v6 = CQuestData::GetQuestData(v2->m_pQuestData, *(_WORD *)v5);
            pQuestData = v6;
            if ( v6 )
            {
              if ( v6->End.bScenario == 1 && v6->End.ScenarioID == (_WORD)nScenarioID )
              {
                v7 = *(_BYTE *)(v5 + 29);
                if ( !(v7 & 2) )
                {
                  *(_BYTE *)(v5 + 29) = v7 | 2;
                  bResult = 1;
                  v2->vfptr->Occure_ScenarioDone(v2, *(_WORD *)v5, nScenarioID);
                  v8 = *(_BYTE *)(v5 + 2);
                  v9 = CQuest::DoingQuestUpdateStatus(v2, i);
                  if ( v8 == 6 )
                  {
                    if ( v9 == 8 )
                    {
                      v2->vfptr->Occure_NewStatusReward(v2, (PLAYER_QUEST_INFO *)v5, pQuestData);
                    }
                    else if ( v9 == 7 )
                    {
                      v2->vfptr->Occure_NewStatusFailed(v2, (PLAYER_QUEST_INFO *)v5, pQuestData);
                    }
                  }
                }
              }
            }
          }
        }
      }
      ++v13;
      v4 = i + 1;
      i = v4;
    }
    while ( v4 < v2->m_NumOfQuest );
    result = bResult;
  }
  return result;
}

//----- (00730910) --------------------------------------------------------
int __thiscall CQuest::QuestPlayer_RaceChange(CQuest *this, int nRace)
{
  CQuest *v2; // esi@1
  int v3; // eax@1
  int v4; // ecx@1
  int v5; // edi@4
  QUEST_DATA *v6; // eax@6
  int v7; // ebx@9
  PLAYER_QUEST_STATUS v8; // eax@9
  int result; // eax@15
  int bResult; // [sp+4h] [bp-10h]@1
  QUEST_DATA *pQuestData; // [sp+8h] [bp-Ch]@6
  int v12; // [sp+Ch] [bp-8h]@2
  int i; // [sp+10h] [bp-4h]@1

  v2 = this;
  v3 = this->m_NumOfQuest;
  v4 = 0;
  bResult = 0;
  i = 0;
  if ( v3 <= 0 )
  {
    result = 0;
  }
  else
  {
    v12 = 0;
    do
    {
      if ( v4 >= 0 )
      {
        v5 = (int)&v2->m_pQuestArray[v12];
        if ( v5 )
        {
          if ( *(_BYTE *)(v5 + 2) == 6 )
          {
            v6 = CQuestData::GetQuestData(v2->m_pQuestData, *(_WORD *)v5);
            pQuestData = v6;
            if ( v6 )
            {
              if ( v6->End.bRace == 1 && v6->End.Race == (_BYTE)nRace )
              {
                bResult = 1;
                v2->vfptr->Occure_RaceChange(v2, *(_WORD *)v5, nRace);
                v7 = *(_BYTE *)(v5 + 2);
                v8 = CQuest::DoingQuestUpdateStatus(v2, i);
                if ( v7 == 6 )
                {
                  if ( v8 == 8 )
                  {
                    v2->vfptr->Occure_NewStatusReward(v2, (PLAYER_QUEST_INFO *)v5, pQuestData);
                  }
                  else if ( v8 == 7 )
                  {
                    v2->vfptr->Occure_NewStatusFailed(v2, (PLAYER_QUEST_INFO *)v5, pQuestData);
                  }
                }
              }
            }
          }
        }
      }
      ++v12;
      v4 = i + 1;
      i = v4;
    }
    while ( v4 < v2->m_NumOfQuest );
    result = bResult;
  }
  return result;
}

//----- (007309F0) --------------------------------------------------------
int __thiscall CQuest::QuestPlayer_ClassChange(CQuest *this, int nClass)
{
  CQuest *v2; // esi@1
  int v3; // eax@1
  int v4; // ecx@1
  int v5; // edi@4
  QUEST_DATA *v6; // eax@6
  int v7; // ebx@9
  PLAYER_QUEST_STATUS v8; // eax@9
  int result; // eax@15
  int bResult; // [sp+4h] [bp-10h]@1
  QUEST_DATA *pQuestData; // [sp+8h] [bp-Ch]@6
  int v12; // [sp+Ch] [bp-8h]@2
  int i; // [sp+10h] [bp-4h]@1

  v2 = this;
  v3 = this->m_NumOfQuest;
  v4 = 0;
  bResult = 0;
  i = 0;
  if ( v3 <= 0 )
  {
    result = 0;
  }
  else
  {
    v12 = 0;
    do
    {
      if ( v4 >= 0 )
      {
        v5 = (int)&v2->m_pQuestArray[v12];
        if ( v5 )
        {
          if ( *(_BYTE *)(v5 + 2) == 6 )
          {
            v6 = CQuestData::GetQuestData(v2->m_pQuestData, *(_WORD *)v5);
            pQuestData = v6;
            if ( v6 )
            {
              if ( v6->End.bClass == 1 && v6->End.Class == (_BYTE)nClass )
              {
                bResult = 1;
                v2->vfptr->Occure_ClassChange(v2, *(_WORD *)v5, nClass);
                v7 = *(_BYTE *)(v5 + 2);
                v8 = CQuest::DoingQuestUpdateStatus(v2, i);
                if ( v7 == 6 )
                {
                  if ( v8 == 8 )
                  {
                    v2->vfptr->Occure_NewStatusReward(v2, (PLAYER_QUEST_INFO *)v5, pQuestData);
                  }
                  else if ( v8 == 7 )
                  {
                    v2->vfptr->Occure_NewStatusFailed(v2, (PLAYER_QUEST_INFO *)v5, pQuestData);
                  }
                }
              }
            }
          }
        }
      }
      ++v12;
      v4 = i + 1;
      i = v4;
    }
    while ( v4 < v2->m_NumOfQuest );
    result = bResult;
  }
  return result;
}

//----- (00730AD0) --------------------------------------------------------
int __thiscall CQuest::QuestPlayer_TimeProcess(CQuest *this)
{
  CQuest *v1; // esi@1
  int v2; // eax@1
  int v4; // edx@3
  int v5; // eax@3
  int v6; // edi@6
  QUEST_DATA *v7; // eax@8
  QUEST_DATA *v8; // ebx@8
  int v9; // eax@10
  int v10; // eax@11
  PLAYER_QUEST_STATUS CurrentStatus; // ST18_4@11
  PLAYER_QUEST_STATUS v12; // eax@11
  void (__thiscall *v13)(CQuest *, PLAYER_QUEST_INFO *, QUEST_DATA *); // eax@13
  int PassedTime; // [sp+Ch] [bp-10h]@3
  int bResult; // [sp+10h] [bp-Ch]@1
  int v16; // [sp+14h] [bp-8h]@4
  int i; // [sp+18h] [bp-4h]@3

  v1 = this;
  bResult = 0;
  v2 = _time32(0);
  if ( v2 == v1->m_ProcessedTime )
    return 0;
  v4 = (unsigned __int16)(LOWORD(v1->m_ProcessedTime) - v2);
  v1->m_ProcessedTime = v2;
  v5 = 0;
  PassedTime = v4;
  i = 0;
  if ( v1->m_NumOfQuest > 0 )
  {
    v16 = 0;
    if ( v1->m_NumOfQuest <= 0 )
      goto LABEL_17;
    while ( 1 )
    {
      if ( v5 < 0 )
        goto LABEL_17;
      v6 = (int)&v1->m_pQuestArray[v16];
      if ( !v6 )
        goto LABEL_17;
      if ( *(_BYTE *)(v6 + 2) != 6 )
        goto LABEL_17;
      v7 = CQuestData::GetQuestData(v1->m_pQuestData, *(_WORD *)v6);
      v8 = v7;
      if ( !v7 )
        goto LABEL_17;
      if ( v7->End.bTimeLimit != 1 )
        goto LABEL_17;
      v9 = *(_WORD *)(v6 + 30);
      if ( v8->End.TimeLimit < (unsigned __int16)v9 )
        goto LABEL_17;
      v10 = PassedTime + v9;
      bResult = 1;
      *(_WORD *)(v6 + 30) = v10;
      v1->vfptr->Occure_TimeProcess(v1, *(_WORD *)v6, v10, v8->End.TimeLimit);
      CurrentStatus = *(_BYTE *)(v6 + 2);
      v12 = CQuest::DoingQuestUpdateStatus(v1, i);
      if ( CurrentStatus != 6 )
        goto LABEL_17;
      if ( v12 == 8 )
        break;
      if ( v12 == 7 )
      {
        v13 = v1->vfptr->Occure_NewStatusFailed;
        goto LABEL_16;
      }
LABEL_17:
      ++v16;
      v5 = i + 1;
      i = v5;
      if ( v5 >= v1->m_NumOfQuest )
        return bResult;
    }
    v13 = v1->vfptr->Occure_NewStatusReward;
LABEL_16:
    v13(v1, (PLAYER_QUEST_INFO *)v6, v8);
    goto LABEL_17;
  }
  return bResult;
}

//----- (00730BE0) --------------------------------------------------------
void __thiscall CQuest::AllDoingQuestUpdateStatus(CQuest *this)
{
  CQuest *v1; // edi@1
  int v2; // ebx@1
  int v3; // esi@4
  QUEST_DATA *v4; // eax@5
  int v5; // [sp+8h] [bp-4h]@2

  v1 = this;
  v2 = 0;
  if ( this->m_NumOfQuest > 0 )
  {
    v5 = 0;
    do
    {
      if ( v2 >= 0 )
      {
        v3 = (int)&v1->m_pQuestArray[v5];
        if ( v3 )
        {
          v4 = CQuestData::GetQuestData(v1->m_pQuestData, *(_WORD *)v3);
          if ( v4 )
            LOBYTE(v4) = CQuest::GetNewQuestStatus(v1, v4);
          *(_BYTE *)(v3 + 2) = (_BYTE)v4;
        }
      }
      ++v5;
      ++v2;
    }
    while ( v2 < v1->m_NumOfQuest );
  }
}

//----- (00730C30) --------------------------------------------------------
int __thiscall CQuest::GetQuestListWithNPC(CQuest *this, unsigned __int16 hNCPID)
{
  CQuest *v2; // esi@1
  signed int j; // edi@1
  CQuestData *v4; // ecx@2
  QUEST_DATA_HEAD *v5; // eax@2
  unsigned __int16 v6; // ax@3
  QUEST_DATA *v7; // eax@6
  CQuest::NPC_QUEST_STATUS *v8; // eax@14
  signed int v10; // edx@17
  int v11; // edi@17
  CQuestData *v12; // ecx@18
  QUEST_DATA_HEAD *v13; // eax@18
  unsigned __int16 v14; // ax@19
  QUEST_DATA *v15; // eax@22
  QUEST_DATA *v16; // ebx@22
  PLAYER_QUEST_STATUS v17; // eax@24
  int v18; // eax@24
  CQuest::NPC_QUEST_STATUS TempQuestStatus; // [sp+Ch] [bp-18h]@1
  int iBF; // [sp+1Ch] [bp-8h]@17
  int i; // [sp+20h] [bp-4h]@17

  v2 = this;
  this->m_NumOfQuestListWithNPC = 0;
  this->m_MaxOfQuestListWithNPC = 0;
  TempQuestStatus.hID = hNCPID;
  for ( j = 0; ; ++j )
  {
    v4 = v2->m_pQuestData;
    v5 = v4->m_pDataHead;
    v6 = v5 ? v5->NumOfQuest : 0;
    if ( j >= v6 )
      break;
    v7 = CQuestData::GetQuestDataByIndex(v4, j);
    if ( v7 )
    {
      if ( CQuest::GetQuestStatusWithNPC(v2, &TempQuestStatus, v7, 0, 0, 0) )
        ++v2->m_NumOfQuestListWithNPC;
    }
  }
  if ( v2->m_NumOfQuestListWithNPC > v2->m_MaxOfQuestListWithNPC && v2->m_pQuestListWithNPC )
  {
    operator delete[](v2->m_pQuestListWithNPC);
    v2->m_pQuestListWithNPC = 0;
  }
  if ( !v2->m_pQuestListWithNPC )
  {
    v8 = (CQuest::NPC_QUEST_STATUS *)operator new[](16 * v2->m_NumOfQuestListWithNPC);
    v2->m_pQuestListWithNPC = v8;
    if ( !v8 )
    {
      v2->m_NumOfQuestListWithNPC = 0;
      v2->m_MaxOfQuestListWithNPC = 0;
      return 0;
    }
    v2->m_MaxOfQuestListWithNPC = v2->m_NumOfQuestListWithNPC;
  }
  v10 = 0;
  iBF = 0;
  i = 0;
  v11 = 0;
  while ( 1 )
  {
    v12 = v2->m_pQuestData;
    v13 = v12->m_pDataHead;
    v14 = v13 ? v13->NumOfQuest : 0;
    if ( v10 >= v14 )
      break;
    v15 = CQuestData::GetQuestDataByIndex(v12, v10);
    v16 = v15;
    if ( v15 )
    {
      if ( CQuest::GetQuestStatusWithNPC(v2, &TempQuestStatus, v15, 0, 0, 0) )
      {
        v2->m_pQuestListWithNPC[v11].hID = hNCPID;
        v17 = TempQuestStatus.eResultState;
        v2->m_pQuestListWithNPC[v11].lpQuestData = v16;
        v2->m_pQuestListWithNPC[v11].eResultState = v17;
        v18 = iBF;
        v2->m_pQuestListWithNPC[v11].nLevel = v16->Start.LevelMin;
        ++v11;
        iBF = v18 + 1;
        if ( v18 + 1 >= v2->m_MaxOfQuestListWithNPC )
          break;
      }
    }
    v10 = ++i;
  }
  return iBF != 0;
}

//----- (00730D80) --------------------------------------------------------
void __thiscall CQuest::GetQuestStatusWithNPC(CQuest *this, CQuest::NPC_QUEST_STATUS *kQuestStatus, PLAYER_QUEST_STATUS eDontWantStatus, unsigned int uiMainCharLv, bool bLowRepeat)
{
  CQuest *v5; // ebx@1
  CQuest::NPC_QUEST_STATUS *v6; // esi@1
  unsigned __int16 v7; // ax@1
  PLAYER_QUEST_STATUS v8; // edi@1
  CQuestData *v9; // ecx@1
  QUEST_DATA **v10; // ecx@1
  int v11; // edx@1
  signed int v12; // eax@1
  QUEST_DATA *v13; // eax@2
  int v14; // edx@2
  QUEST_DATA *v15; // esi@7
  bool v16; // zf@10
  unsigned int v17; // ecx@12
  unsigned int v18; // edx@12
  signed int v19; // ecx@21
  CQuest::NPC_QUEST_STATUS TempQuestStatus; // [sp+10h] [bp-3Ch]@1
  std::vector<QUEST_DATA *,std::allocator<QUEST_DATA *> > vecMobidAscociatedQuestData; // [sp+20h] [bp-2Ch]@1
  int i; // [sp+30h] [bp-1Ch]@1
  CQuest *v23; // [sp+34h] [bp-18h]@1
  QUEST_DATA *lpResultData; // [sp+38h] [bp-14h]@1
  int nLevel; // [sp+3Ch] [bp-10h]@1
  int v26; // [sp+48h] [bp-4h]@1

  v5 = this;
  v23 = this;
  v6 = kQuestStatus;
  v7 = kQuestStatus->hID;
  v8 = 0;
  lpResultData = 0;
  nLevel = -1;
  TempQuestStatus.hID = v7;
  vecMobidAscociatedQuestData._Myfirst = 0;
  vecMobidAscociatedQuestData._Mylast = 0;
  vecMobidAscociatedQuestData._Myend = 0;
  v9 = this->m_pQuestData;
  v26 = 0;
  CQuestData::GetMobIdAssociatedWithQuestData(v9, v7, &vecMobidAscociatedQuestData);
  v10 = vecMobidAscociatedQuestData._Myfirst;
  v11 = 0;
  v12 = vecMobidAscociatedQuestData._Mylast - vecMobidAscociatedQuestData._Myfirst;
  i = 0;
  if ( v12 <= 0 )
    goto LABEL_2;
  while ( 1 )
  {
    if ( v12 <= (unsigned int)v11 )
      std::_Xout_of_range("invalid vector<T> subscript");
    v15 = v10[v11];
    if ( CQuest::GetQuestStatusWithNPC(v5, &TempQuestStatus, v10[v11], uiMainCharLv, 1, bLowRepeat) )
    {
      if ( TempQuestStatus.eResultState == eDontWantStatus )
      {
        if ( lpResultData )
          goto LABEL_28;
        v16 = v15->Start.bLevel == 0;
        lpResultData = v15;
        v8 = TempQuestStatus.eResultState;
        if ( !v16 )
        {
          nLevel = v15->Start.LevelMin;
          goto LABEL_28;
        }
LABEL_27:
        nLevel = -1;
        goto LABEL_28;
      }
      v17 = v23->m_QuestStatusPriority[TempQuestStatus.eResultState];
      v18 = v23->m_QuestStatusPriority[v8];
      if ( v17 < v18 || v8 == eDontWantStatus )
      {
        v16 = v15->Start.bLevel == 0;
        lpResultData = v15;
        v8 = TempQuestStatus.eResultState;
        if ( !v16 )
        {
          nLevel = v15->Start.LevelMin;
          goto LABEL_28;
        }
        goto LABEL_27;
      }
      if ( v17 == v18 )
      {
        if ( v15->Start.bLevel )
          v19 = v15->Start.LevelMin;
        else
          v19 = -1;
        if ( v19 < nLevel )
        {
          lpResultData = v15;
          v8 = TempQuestStatus.eResultState;
          nLevel = v19;
        }
      }
      else if ( v17 > v18 && (v8 == 9 || v8 == 20) )
      {
        v16 = v15->Start.bLevel == 0;
        lpResultData = v15;
        v8 = TempQuestStatus.eResultState;
        if ( !v16 )
        {
          nLevel = v15->Start.LevelMin;
          goto LABEL_28;
        }
        goto LABEL_27;
      }
    }
LABEL_28:
    v10 = vecMobidAscociatedQuestData._Myfirst;
    v11 = i + 1;
    v12 = vecMobidAscociatedQuestData._Mylast - vecMobidAscociatedQuestData._Myfirst;
    i = v11;
    if ( v11 >= v12 )
      break;
    v5 = v23;
  }
  v6 = kQuestStatus;
LABEL_2:
  v13 = lpResultData;
  v14 = nLevel;
  v6->eResultState = v8;
  v6->lpQuestData = v13;
  v6->nLevel = v14;
  if ( v10 )
    operator delete(v10);
}

//----- (00730F20) --------------------------------------------------------
char __thiscall ShineObjectHandleUnion::sohu_HandleSplit(ShineObjectHandleUnion *this, unsigned __int16 *hnd)
{
  unsigned __int16 v2; // ax@1
  char result; // al@2

  v2 = this->sohu_Handle;
  if ( this->sohu_Handle >= 0x1F40u )
  {
    if ( v2 >= 0x251Cu )
    {
      if ( v2 < 0x251Cu || v2 >= 0x2904u )
      {
        if ( v2 < 0x2904u || v2 >= 0x34BCu )
        {
          if ( v2 < 0x34BCu || v2 >= 0x42BCu )
          {
            if ( v2 < 0x42BCu || v2 >= 0x43BCu )
            {
              if ( v2 < 0x43BCu || v2 >= 0x4BBCu )
              {
                if ( v2 < 0x4BBCu || v2 >= 0x4FA4u )
                {
                  if ( v2 < 0x4FA4u || v2 >= 0x509Eu )
                  {
                    if ( v2 < 0x509Eu || v2 >= 0x5486u )
                    {
                      if ( v2 < 0x5486u || v2 >= 0x567Au )
                      {
                        if ( v2 < 0x567Au || v2 >= 0x5A62u )
                        {
                          if ( v2 < 0x5C56u || v2 >= 0x6232u )
                          {
                            result = -1;
                            *hnd = -1;
                          }
                          else
                          {
                            *hnd = v2 - 23638;
                            result = 12;
                          }
                        }
                        else
                        {
                          *hnd = v2 - 22138;
                          result = 11;
                        }
                      }
                      else
                      {
                        *hnd = v2 - 21638;
                        result = 10;
                      }
                    }
                    else
                    {
                      *hnd = v2 - 20638;
                      result = 7;
                    }
                  }
                  else
                  {
                    *hnd = v2 - 20388;
                    result = 6;
                  }
                }
                else
                {
                  *hnd = v2 - 19388;
                  result = 9;
                }
              }
              else
              {
                *hnd = v2 - 17340;
                result = 8;
              }
            }
            else
            {
              *hnd = v2 - 17084;
              result = 4;
            }
          }
          else
          {
            *hnd = v2 - 13500;
            result = 0;
          }
        }
        else
        {
          *hnd = v2 - 10500;
          result = 1;
        }
      }
      else
      {
        *hnd = v2 - 9500;
        result = 3;
      }
    }
    else
    {
      *hnd = v2 - 8000;
      result = 2;
    }
  }
  else
  {
    *hnd = v2;
    result = 5;
  }
  return result;
}

//----- (00731100) --------------------------------------------------------
void __thiscall CWeaponTitle::CWeaponTitle(CWeaponTitle *this)
{
  CWeaponTitle *v1; // esi@1

  v1 = this;
  CDataReader::CDataReader(&this->m_WeaponTitleData);
  v1->m_ppWTDArray = 0;
  v1->m_MaxArrayIndex = 0;
}

//----- (00731120) --------------------------------------------------------
int __thiscall CWeaponTitle::Read(CWeaponTitle *this, const char *pFN, unsigned int nVersionKey, unsigned int nStructSize)
{
  CWeaponTitle *v4; // esi@1
  unsigned int v5; // edi@1
  int result; // eax@3
  CDataReader::HEAD *v7; // eax@4
  unsigned int v8; // ebx@5
  char *v9; // eax@8
  char v10; // cl@8
  unsigned int v11; // eax@9
  unsigned int v12; // edi@12
  char *v13; // eax@13
  unsigned int v14; // ST08_4@13
  unsigned int v15; // edi@13
  char *v16; // eax@14

  v4 = this;
  v5 = 0;
  if ( this->m_ppWTDArray )
  {
    operator delete[](this->m_ppWTDArray);
    v4->m_ppWTDArray = 0;
  }
  v4->m_MaxArrayIndex = 0;
  result = CDataReader::Read(&v4->m_WeaponTitleData, pFN, nVersionKey, nStructSize);
  if ( result )
  {
    v7 = v4->m_WeaponTitleData.m_pHead;
    if ( v7 )
      v8 = v7->nNumOfRecord;
    else
      v8 = 0;
    if ( v8 )
    {
      while ( 1 )
      {
        v9 = CDataReader::GetRecord(&v4->m_WeaponTitleData, v5);
        v10 = v9[2];
        if ( (unsigned __int8)v10 >= 0xAu )
          break;
        v11 = (unsigned __int8)v10 + 10 * *(_WORD *)v9;
        if ( v4->m_MaxArrayIndex <= v11 )
          v4->m_MaxArrayIndex = v11 + 1;
        if ( ++v5 >= v8 )
          goto LABEL_12;
      }
      result = 0;
    }
    else
    {
LABEL_12:
      v12 = v4->m_MaxArrayIndex;
      if ( v12 )
      {
        v13 = (char *)operator new[](4 * v12);
        v14 = 4 * v4->m_MaxArrayIndex;
        v4->m_ppWTDArray = (WEAPON_TITLE_DATA **)v13;
        memset(v13, 0, v14);
        v15 = 0;
        if ( v8 )
        {
          do
          {
            v16 = CDataReader::GetRecord(&v4->m_WeaponTitleData, v15++);
            v4->m_ppWTDArray[(unsigned __int8)v16[2] + 10 * *(_WORD *)v16] = (WEAPON_TITLE_DATA *)v16;
          }
          while ( v15 < v8 );
        }
      }
      result = 1;
    }
  }
  return result;
}

//----- (00731220) --------------------------------------------------------
int __thiscall CWeaponTitle::GetMaxLevel(CWeaponTitle *this, unsigned __int16 MobID)
{
  unsigned int v2; // edi@1
  unsigned int v3; // edx@1
  int result; // eax@2
  unsigned int v5; // eax@3
  int v6; // esi@3

  v2 = this->m_MaxArrayIndex;
  v3 = 10 * MobID;
  if ( v3 < v2 )
  {
    v5 = 0;
    v6 = 10 * MobID;
    do
    {
      if ( v5 + v3 >= v2 )
        break;
      if ( !this->m_ppWTDArray[v6] )
        break;
      ++v5;
      ++v6;
    }
    while ( v5 < 0xA );
    result = v5 - 1;
  }
  else
  {
    result = -1;
  }
  return result;
}

//----- (00731270) --------------------------------------------------------
unsigned int __thiscall CWeaponTitle::GetLevel(CWeaponTitle *this, unsigned __int16 MobID, unsigned int MobKillCount)
{
  unsigned int v3; // edi@1
  unsigned int result; // eax@2
  int v5; // esi@3
  WEAPON_TITLE_DATA *v6; // edx@5

  v3 = 10 * MobID;
  if ( v3 < this->m_MaxArrayIndex )
  {
    result = 0;
    v5 = 10 * MobID;
    do
    {
      if ( result + v3 >= this->m_MaxArrayIndex )
        break;
      v6 = this->m_ppWTDArray[v5];
      if ( !v6 )
        break;
      if ( MobKillCount < v6->MobKillCount )
        return result;
      ++result;
      ++v5;
    }
    while ( result < 0xA );
    --result;
  }
  else
  {
    result = -1;
  }
  return result;
}

//----- (007312C0) --------------------------------------------------------
WEAPON_TITLE_DATA *__thiscall CWeaponTitle::GetLevelData(CWeaponTitle *this, unsigned __int16 MobID, unsigned int MobKillCount, unsigned int *pLevel)
{
  unsigned int v4; // eax@1
  int v5; // ecx@1
  WEAPON_TITLE_DATA *result; // eax@2
  unsigned int v7; // eax@3

  v4 = CWeaponTitle::GetLevel(this, MobID, MobKillCount);
  *pLevel = v4;
  if ( v4 == -1 || (v7 = v4 + 10 * MobID, v7 >= *(_DWORD *)(v5 + 68)) )
    result = 0;
  else
    result = *(WEAPON_TITLE_DATA **)(*(_DWORD *)(v5 + 64) + 4 * v7);
  return result;
}

//----- (00731300) --------------------------------------------------------
WEAPON_TITLE_DATA *__thiscall CWeaponTitle::GetPrevLevelData(CWeaponTitle *this, unsigned __int16 MobID, unsigned int dwLevel)
{
  unsigned int v3; // eax@2
  WEAPON_TITLE_DATA *result; // eax@3

  if ( dwLevel - 1 > 9 || (v3 = dwLevel + 10 * MobID - 1, v3 >= this->m_MaxArrayIndex) )
    result = 0;
  else
    result = this->m_ppWTDArray[v3];
  return result;
}

//----- (00731330) --------------------------------------------------------
WEAPON_TITLE_DATA *__thiscall CWeaponTitle::GetData(CWeaponTitle *this, unsigned __int16 MobID, unsigned int Level)
{
  unsigned int v3; // eax@1
  WEAPON_TITLE_DATA *result; // eax@2

  v3 = Level + 10 * MobID;
  if ( v3 < this->m_MaxArrayIndex )
    result = this->m_ppWTDArray[v3];
  else
    result = 0;
  return result;
}

//----- (00731360) --------------------------------------------------------
void __thiscall CWeaponTitle::~CWeaponTitle(CWeaponTitle *this)
{
  CWeaponTitle *v1; // esi@1

  v1 = this;
  if ( this->m_ppWTDArray )
  {
    operator delete[](this->m_ppWTDArray);
    v1->m_ppWTDArray = 0;
  }
  v1->m_MaxArrayIndex = 0;
  CDataReader::~CDataReader(&v1->m_WeaponTitleData);
}

//----- (00731390) --------------------------------------------------------
int __thiscall CCharacterTitleData::Read(CCharacterTitleData *this, const char *pFN, unsigned int nVersionKey, unsigned int nStructSize)
{
  return CDataReader::Read(&this->m_CharacterTitleData, pFN, nVersionKey, nStructSize);
}

//----- (007313A0) --------------------------------------------------------
char *__thiscall CCharacterTitleData::GetTitleString(CCharacterTitleData *this, char Type, char ElementNo)
{
  CDataReader::HEAD *v3; // eax@1
  char *v4; // eax@3
  char *result; // eax@5

  v3 = this->m_CharacterTitleData.m_pHead;
  if ( v3
    && (unsigned __int8)Type < v3->nNumOfRecord
    && (v4 = CDataReader::GetRecord(&this->m_CharacterTitleData, (unsigned __int8)Type)) != 0 )
  {
    switch ( ElementNo )
    {
      case 0:
        result = v4 + 12;
        break;
      case 1:
        result = v4 + 52;
        break;
      case 2:
        result = v4 + 92;
        break;
      case 3:
        result = v4 + 132;
        break;
      default:
        goto LABEL_9;
    }
  }
  else
  {
LABEL_9:
    result = szCTNull;
  }
  return result;
}

//----- (00731410) --------------------------------------------------------
void __thiscall CShnDataFileCheckSum::_unnamed_type_CheckSumData_::_unnamed_type_CheckSumData_($1C13CF29CE6EB6434BA18BBEB785AFFD *this)
{
  *(_QWORD *)&this->CheckSum.n8_code[6] = 0i64;
  *(_QWORD *)&this->CheckSum.n8_code[4] = 0i64;
  *(_QWORD *)&this->CheckSum.n8_code[2] = 0i64;
  *(_QWORD *)&this->CheckSum.n8_name[0] = 0i64;
}

//----- (00731430) --------------------------------------------------------
char __thiscall CShnDataFileCheckSum::InitDataFileCheckSum(CShnDataFileCheckSum *this, const char *FileName, Name8 nCheckSum)
{
  signed int v3; // kr00_4@1
  signed int i; // esi@1
  const char *v5; // edi@3
  signed int v6; // esi@4
  const char *v7; // eax@4
  bool v8; // cf@7
  bool v9; // zf@7
  int v11; // eax@13
  CShnDataFileCheckSum *Index; // [sp+0h] [bp-8Ch]@1
  char Token[4]; // [sp+4h] [bp-88h]@1
  char FileNameBuff[128]; // [sp+8h] [bp-84h]@1

  Index = this;
  *(_WORD *)Token = *(_WORD *)"/\\";
  Token[2] = 0;
  Token[3] = 0;
  strcpy(FileNameBuff, FileName);
  v3 = strlen(FileNameBuff);
  for ( i = 0; i < v3; ++i )
    FileNameBuff[i] = tolower(FileNameBuff[i]);
  v5 = strtok(FileNameBuff, Token);
  if ( v5 )
  {
    while ( 1 )
    {
      v6 = 0;
      v7 = Index->CheckSumData[0].DataFileName;
      do
      {
        if ( !strcmp(v7, v5) )
          break;
        ++v6;
        v7 += 65;
      }
      while ( v6 < 50 );
      v8 = (unsigned int)v6 < 0x32;
      v9 = v6 == 50;
      if ( v6 != 50 )
        break;
      v5 = strtok(0, Token);
      if ( !v5 )
        return 1;
    }
  }
  else
  {
    v6 = (signed int)Index;
    v8 = (unsigned int)Index < 0x32;
    v9 = Index == (CShnDataFileCheckSum *)50;
    if ( Index == (CShnDataFileCheckSum *)50 )
      return 1;
  }
  if ( (v8 || v9) && Index->InitCheckSumCnt <= 50 )
  {
    v11 = (int)&Index->InitCheckSumCnt + 64 * v6 + v6;
    *(_QWORD *)(v11 + 5) = *(_QWORD *)&nCheckSum.n8_name[0];
    *(_QWORD *)(v11 + 13) = *(_QWORD *)&nCheckSum.n8_code[2];
    *(_QWORD *)(v11 + 21) = *(_QWORD *)&nCheckSum.n8_code[4];
    *(_QWORD *)(v11 + 29) = *(_QWORD *)&nCheckSum.n8_code[6];
    *(_BYTE *)(v11 + 4) = 1;
    ++Index->InitCheckSumCnt;
    return 1;
  }
  return 0;
}

//----- (007315E0) --------------------------------------------------------
Name8 *__thiscall CShnDataFileCheckSum::GetDataFileCheckSum(CShnDataFileCheckSum *this, SHN_DATA_FILE_INDEX Index)
{
  Name8 *result; // eax@2

  if ( (unsigned int)Index > 0x31 )
    result = 0;
  else
    result = (Name8 *)((char *)&this->CheckSumData[0].CheckSum + 64 * Index + Index);
  return result;
}

//----- (00731600) --------------------------------------------------------
char *__thiscall CShnDataFileCheckSum::GetDataFileName(CShnDataFileCheckSum *this, SHN_DATA_FILE_INDEX Index)
{
  char *result; // eax@2

  if ( (unsigned int)Index > 0x31 )
    result = 0;
  else
    result = &this->CheckSumData[0].DataFileName[64 * Index] + Index;
  return result;
}

//----- (00731620) --------------------------------------------------------
void __thiscall CShnDataFileCheckSum::CShnDataFileCheckSum(CShnDataFileCheckSum *this)
{
  CShnDataFileCheckSum *v1; // ebx@1
  char *v2; // esi@1
  char *v3; // eax@1
  signed int v4; // ecx@1
  const char *v5; // edi@3
  int i; // esi@4
  int FileNameLen; // [sp+Ch] [bp-8h]@4
  signed int v8; // [sp+10h] [bp-4h]@3

  v1 = this;
  v2 = (char *)this->CheckSumData;
  `eh vector constructor iterator'(
    this->CheckSumData,
    0x41u,
    50,
    (void (__thiscall *)(void *))CShnDataFileCheckSum::_unnamed_type_CheckSumData_::_unnamed_type_CheckSumData_,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
  v1->InitCheckSumCnt = 0;
  v3 = v2;
  v4 = 50;
  do
  {
    *v3 = 0;
    v3 += 65;
    --v4;
  }
  while ( v4 );
  *(_DWORD *)&v1->CheckSumData[0].DataFileName[0] = *(_DWORD *)"Abstate.shn";
  *(_DWORD *)&v1->CheckSumData[0].DataFileName[4] = 778400865;
  *(_DWORD *)&v1->CheckSumData[0].DataFileName[8] = 7235699;
  *(_DWORD *)&v1->CheckSumData[1].DataFileName[0] = *(_DWORD *)"ActiveSkill.shn";
  *(_DWORD *)&v1->CheckSumData[1].DataFileName[4] = 1800627574;
  *(_DWORD *)&v1->CheckSumData[1].DataFileName[8] = 778857577;
  *(_DWORD *)&v1->CheckSumData[1].DataFileName[12] = 7235699;
  qmemcpy(v1->CheckSumData[2].DataFileName, "CharacterTitleData.shn", 0x17u);
  *(_DWORD *)&v1->CheckSumData[3].DataFileName[0] = *(_DWORD *)"ChargedEffect.shn";
  *(_DWORD *)&v1->CheckSumData[3].DataFileName[4] = 1164207463;
  *(_DWORD *)&v1->CheckSumData[3].DataFileName[8] = 1667589734;
  *(_DWORD *)&v1->CheckSumData[3].DataFileName[12] = 1752378996;
  *(_WORD *)&v1->CheckSumData[3].DataFileName[16] = 110;
  *(_DWORD *)&v1->CheckSumData[4].DataFileName[0] = *(_DWORD *)"ClassName.shn";
  *(_DWORD *)&v1->CheckSumData[4].DataFileName[4] = 1835093619;
  *(_DWORD *)&v1->CheckSumData[4].DataFileName[8] = 1752378981;
  *(_WORD *)&v1->CheckSumData[4].DataFileName[12] = 110;
  *(_DWORD *)&v1->CheckSumData[5].DataFileName[0] = *(_DWORD *)"Gather.shn";
  *(_DWORD *)&v1->CheckSumData[5].DataFileName[4] = 1932423781;
  *(_WORD *)&v1->CheckSumData[5].DataFileName[8] = 28264;
  v1->CheckSumData[5].DataFileName[10] = 0;
  *(_DWORD *)&v1->CheckSumData[6].DataFileName[0] = *(_DWORD *)"GradeItemOption.shn";
  *(_DWORD *)&v1->CheckSumData[6].DataFileName[4] = 1702119781;
  *(_DWORD *)&v1->CheckSumData[6].DataFileName[8] = 1953517421;
  *(_DWORD *)&v1->CheckSumData[6].DataFileName[12] = 778989417;
  *(_DWORD *)&v1->CheckSumData[6].DataFileName[16] = 7235699;
  *(_DWORD *)&v1->CheckSumData[7].DataFileName[0] = *(_DWORD *)"ItemDismantle.shn";
  *(_DWORD *)&v1->CheckSumData[7].DataFileName[4] = 1836280132;
  *(_DWORD *)&v1->CheckSumData[7].DataFileName[8] = 1819569761;
  *(_DWORD *)&v1->CheckSumData[7].DataFileName[12] = 1752378981;
  *(_WORD *)&v1->CheckSumData[7].DataFileName[16] = 110;
  *(_DWORD *)&v1->CheckSumData[8].DataFileName[0] = *(_DWORD *)"ItemInfo.shn";
  *(_DWORD *)&v1->CheckSumData[8].DataFileName[4] = 1868983881;
  *(_DWORD *)&v1->CheckSumData[8].DataFileName[8] = 1852338990;
  v1->CheckSumData[8].DataFileName[12] = 0;
  *(_DWORD *)&v1->CheckSumData[9].DataFileName[0] = *(_DWORD *)"MapInfo.shn";
  *(_DWORD *)&v1->CheckSumData[9].DataFileName[4] = 779052654;
  *(_DWORD *)&v1->CheckSumData[9].DataFileName[8] = 7235699;
  *(_DWORD *)&v1->CheckSumData[10].DataFileName[0] = *(_DWORD *)"MiniHouse.shn";
  *(_DWORD *)&v1->CheckSumData[10].DataFileName[4] = 1937076040;
  *(_DWORD *)&v1->CheckSumData[10].DataFileName[8] = 1752378981;
  *(_WORD *)&v1->CheckSumData[10].DataFileName[12] = 110;
  qmemcpy(v1->CheckSumData[11].DataFileName, "MiniHouseFurniture.shn", 0x17u);
  *(_DWORD *)&v1->CheckSumData[12].DataFileName[0] = *(_DWORD *)"MiniHouseObjAni.shn";
  *(_DWORD *)&v1->CheckSumData[12].DataFileName[4] = 1937076040;
  *(_DWORD *)&v1->CheckSumData[12].DataFileName[8] = 1784827749;
  *(_DWORD *)&v1->CheckSumData[12].DataFileName[12] = 778661441;
  *(_DWORD *)&v1->CheckSumData[12].DataFileName[16] = 7235699;
  *(_DWORD *)&v1->CheckSumData[13].DataFileName[0] = *(_DWORD *)"MobInfo.shn";
  *(_DWORD *)&v1->CheckSumData[13].DataFileName[4] = 779052654;
  *(_DWORD *)&v1->CheckSumData[13].DataFileName[8] = 7235699;
  *(_DWORD *)&v1->CheckSumData[14].DataFileName[0] = *(_DWORD *)"PassiveSkill.shn";
  *(_DWORD *)&v1->CheckSumData[14].DataFileName[4] = 1399158377;
  *(_DWORD *)&v1->CheckSumData[14].DataFileName[8] = 1819044203;
  *(_DWORD *)&v1->CheckSumData[14].DataFileName[12] = 1852338990;
  v1->CheckSumData[14].DataFileName[16] = 0;
  *(_DWORD *)&v1->CheckSumData[15].DataFileName[0] = *(_DWORD *)"Riding.shn";
  *(_DWORD *)&v1->CheckSumData[15].DataFileName[4] = 1932420974;
  *(_WORD *)&v1->CheckSumData[15].DataFileName[8] = 28264;
  v1->CheckSumData[15].DataFileName[10] = 0;
  *(_DWORD *)&v1->CheckSumData[16].DataFileName[0] = *(_DWORD *)"SubAbstate.shn";
  *(_DWORD *)&v1->CheckSumData[16].DataFileName[4] = 1635021666;
  *(_DWORD *)&v1->CheckSumData[16].DataFileName[8] = 1932420468;
  *(_WORD *)&v1->CheckSumData[16].DataFileName[12] = 28264;
  v1->CheckSumData[16].DataFileName[14] = 0;
  *(_DWORD *)&v1->CheckSumData[17].DataFileName[0] = *(_DWORD *)"UpgradeInfo.shn";
  *(_DWORD *)&v1->CheckSumData[17].DataFileName[4] = 1231381601;
  *(_DWORD *)&v1->CheckSumData[17].DataFileName[8] = 779052654;
  *(_DWORD *)&v1->CheckSumData[17].DataFileName[12] = 7235699;
  *(_DWORD *)&v1->CheckSumData[18].DataFileName[0] = *(_DWORD *)"WeaponAttrib.shn";
  *(_DWORD *)&v1->CheckSumData[18].DataFileName[4] = 1950445167;
  *(_DWORD *)&v1->CheckSumData[18].DataFileName[8] = 1651077748;
  *(_DWORD *)&v1->CheckSumData[18].DataFileName[12] = 1852338990;
  v1->CheckSumData[18].DataFileName[16] = 0;
  *(_DWORD *)&v1->CheckSumData[19].DataFileName[0] = *(_DWORD *)"WeaponTitleData.shn";
  *(_DWORD *)&v1->CheckSumData[19].DataFileName[4] = 1767140975;
  *(_DWORD *)&v1->CheckSumData[19].DataFileName[8] = 1147497588;
  *(_DWORD *)&v1->CheckSumData[19].DataFileName[12] = 778138721;
  *(_DWORD *)&v1->CheckSumData[19].DataFileName[16] = 7235699;
  qmemcpy(
    v1->CheckSumData[20].DataFileName,
    "MiniHouseFurnitureObjEffect.shn",
    sizeof(v1->CheckSumData[20].DataFileName));
  *(_DWORD *)&v1->CheckSumData[21].DataFileName[0] = *(_DWORD *)"MiniHouseEndure.shn";
  *(_DWORD *)&v1->CheckSumData[21].DataFileName[4] = 1937076040;
  *(_DWORD *)&v1->CheckSumData[21].DataFileName[8] = 1684948325;
  *(_DWORD *)&v1->CheckSumData[21].DataFileName[12] = 778400373;
  *(_DWORD *)&v1->CheckSumData[21].DataFileName[16] = 7235699;
  *(_DWORD *)&v1->CheckSumData[22].DataFileName[0] = *(_DWORD *)"DiceDividind.shn";
  *(_DWORD *)&v1->CheckSumData[22].DataFileName[4] = 1769367876;
  *(_DWORD *)&v1->CheckSumData[22].DataFileName[8] = 1684957540;
  *(_DWORD *)&v1->CheckSumData[22].DataFileName[12] = 1852338990;
  v1->CheckSumData[22].DataFileName[16] = 0;
  *(_DWORD *)&v1->CheckSumData[23].DataFileName[0] = *(_DWORD *)"ActionViewInfo.shn";
  *(_DWORD *)&v1->CheckSumData[23].DataFileName[4] = 1767272047;
  *(_DWORD *)&v1->CheckSumData[23].DataFileName[8] = 1850308453;
  *(_DWORD *)&v1->CheckSumData[23].DataFileName[12] = 1932423014;
  *(_WORD *)&v1->CheckSumData[23].DataFileName[16] = 28264;
  v1->CheckSumData[23].DataFileName[18] = 0;
  *(_DWORD *)&v1->CheckSumData[24].DataFileName[0] = *(_DWORD *)"MapLinkPoint.shn";
  *(_DWORD *)&v1->CheckSumData[24].DataFileName[4] = 1349217897;
  *(_DWORD *)&v1->CheckSumData[24].DataFileName[8] = 1953393007;
  *(_DWORD *)&v1->CheckSumData[24].DataFileName[12] = 1852338990;
  v1->CheckSumData[24].DataFileName[16] = 0;
  *(_DWORD *)&v1->CheckSumData[25].DataFileName[0] = *(_DWORD *)"MapWayPoint.shn";
  *(_DWORD *)&v1->CheckSumData[25].DataFileName[4] = 1867544929;
  *(_DWORD *)&v1->CheckSumData[25].DataFileName[8] = 779382377;
  *(_DWORD *)&v1->CheckSumData[25].DataFileName[12] = 7235699;
  *(_DWORD *)&v1->CheckSumData[26].DataFileName[0] = *(_DWORD *)"AbStateView.shn";
  *(_DWORD *)&v1->CheckSumData[26].DataFileName[4] = 1449489505;
  *(_DWORD *)&v1->CheckSumData[26].DataFileName[8] = 779576681;
  *(_DWORD *)&v1->CheckSumData[26].DataFileName[12] = 7235699;
  *(_DWORD *)&v1->CheckSumData[27].DataFileName[0] = *(_DWORD *)"ActiveSkillView.shn";
  *(_DWORD *)&v1->CheckSumData[27].DataFileName[4] = 1800627574;
  *(_DWORD *)&v1->CheckSumData[27].DataFileName[8] = 1449946217;
  *(_DWORD *)&v1->CheckSumData[27].DataFileName[12] = 779576681;
  *(_DWORD *)&v1->CheckSumData[27].DataFileName[16] = 7235699;
  qmemcpy(v1->CheckSumData[28].DataFileName, "CharacterTitleStateView.shn", 0x1Cu);
  *(_DWORD *)&v1->CheckSumData[29].DataFileName[0] = *(_DWORD *)"EffectViewInfo.shn";
  *(_DWORD *)&v1->CheckSumData[29].DataFileName[4] = 1767273571;
  *(_DWORD *)&v1->CheckSumData[29].DataFileName[8] = 1850308453;
  *(_DWORD *)&v1->CheckSumData[29].DataFileName[12] = 1932423014;
  *(_WORD *)&v1->CheckSumData[29].DataFileName[16] = 28264;
  v1->CheckSumData[29].DataFileName[18] = 0;
  *(_DWORD *)&v1->CheckSumData[30].DataFileName[0] = *(_DWORD *)"ItemShopView.shn";
  *(_DWORD *)&v1->CheckSumData[30].DataFileName[4] = 1886349395;
  *(_DWORD *)&v1->CheckSumData[30].DataFileName[8] = 2003134806;
  *(_DWORD *)&v1->CheckSumData[30].DataFileName[12] = 1852338990;
  v1->CheckSumData[30].DataFileName[16] = 0;
  *(_DWORD *)&v1->CheckSumData[31].DataFileName[0] = *(_DWORD *)"ItemViewInfo.shn";
  *(_DWORD *)&v1->CheckSumData[31].DataFileName[4] = 2003134806;
  *(_DWORD *)&v1->CheckSumData[31].DataFileName[8] = 1868983881;
  *(_DWORD *)&v1->CheckSumData[31].DataFileName[12] = 1852338990;
  v1->CheckSumData[31].DataFileName[16] = 0;
  *(_DWORD *)&v1->CheckSumData[32].DataFileName[0] = *(_DWORD *)"MapViewInfo.shn";
  *(_DWORD *)&v1->CheckSumData[32].DataFileName[4] = 1232561513;
  *(_DWORD *)&v1->CheckSumData[32].DataFileName[8] = 779052654;
  *(_DWORD *)&v1->CheckSumData[32].DataFileName[12] = 7235699;
  *(_DWORD *)&v1->CheckSumData[33].DataFileName[0] = *(_DWORD *)"MobViewInfo.shn";
  *(_DWORD *)&v1->CheckSumData[33].DataFileName[4] = 1232561513;
  *(_DWORD *)&v1->CheckSumData[33].DataFileName[8] = 779052654;
  *(_DWORD *)&v1->CheckSumData[33].DataFileName[12] = 7235699;
  *(_DWORD *)&v1->CheckSumData[34].DataFileName[0] = *(_DWORD *)"NPCViewInfo.shn";
  *(_DWORD *)&v1->CheckSumData[34].DataFileName[4] = 1232561513;
  *(_DWORD *)&v1->CheckSumData[34].DataFileName[8] = 779052654;
  *(_DWORD *)&v1->CheckSumData[34].DataFileName[12] = 7235699;
  *(_DWORD *)&v1->CheckSumData[35].DataFileName[0] = *(_DWORD *)"PassiveSkillView.shn";
  *(_DWORD *)&v1->CheckSumData[35].DataFileName[4] = 1399158377;
  *(_DWORD *)&v1->CheckSumData[35].DataFileName[8] = 1819044203;
  *(_DWORD *)&v1->CheckSumData[35].DataFileName[12] = 2003134806;
  *(_DWORD *)&v1->CheckSumData[35].DataFileName[16] = 1852338990;
  v1->CheckSumData[35].DataFileName[20] = 0;
  *(_DWORD *)&v1->CheckSumData[36].DataFileName[0] = *(_DWORD *)"ProduceView.shn";
  *(_DWORD *)&v1->CheckSumData[36].DataFileName[4] = 1449485173;
  *(_DWORD *)&v1->CheckSumData[36].DataFileName[8] = 779576681;
  *(_DWORD *)&v1->CheckSumData[36].DataFileName[12] = 7235699;
  *(_DWORD *)&v1->CheckSumData[37].DataFileName[0] = *(_DWORD *)"CollectCardView.shn";
  *(_DWORD *)&v1->CheckSumData[37].DataFileName[4] = 1131701093;
  *(_DWORD *)&v1->CheckSumData[37].DataFileName[8] = 1449423457;
  *(_DWORD *)&v1->CheckSumData[37].DataFileName[12] = 779576681;
  *(_DWORD *)&v1->CheckSumData[37].DataFileName[16] = 7235699;
  *(_DWORD *)&v1->CheckSumData[38].DataFileName[0] = *(_DWORD *)"GTIView.shn";
  *(_DWORD *)&v1->CheckSumData[38].DataFileName[4] = 779576681;
  *(_DWORD *)&v1->CheckSumData[38].DataFileName[8] = 7235699;
  qmemcpy(v1->CheckSumData[39].DataFileName, "ItemViewEquipTypeInfo.shn", 0x1Au);
  *(_DWORD *)&v1->CheckSumData[40].DataFileName[0] = *(_DWORD *)"SingleData.shn";
  *(_DWORD *)&v1->CheckSumData[40].DataFileName[4] = 1631872364;
  *(_DWORD *)&v1->CheckSumData[40].DataFileName[8] = 1932419444;
  *(_WORD *)&v1->CheckSumData[40].DataFileName[12] = 28264;
  v1->CheckSumData[40].DataFileName[14] = 0;
  *(_DWORD *)&v1->CheckSumData[41].DataFileName[0] = *(_DWORD *)"MarketSearchInfo.shn";
  *(_DWORD *)&v1->CheckSumData[41].DataFileName[4] = 1699968101;
  *(_DWORD *)&v1->CheckSumData[41].DataFileName[8] = 1751347809;
  *(_DWORD *)&v1->CheckSumData[41].DataFileName[12] = 1868983881;
  *(_DWORD *)&v1->CheckSumData[41].DataFileName[16] = 1852338990;
  v1->CheckSumData[41].DataFileName[20] = 0;
  *(_DWORD *)&v1->CheckSumData[42].DataFileName[0] = *(_DWORD *)"ItemMoney.shn";
  *(_DWORD *)&v1->CheckSumData[42].DataFileName[4] = 1701736269;
  *(_DWORD *)&v1->CheckSumData[42].DataFileName[8] = 1752379001;
  *(_WORD *)&v1->CheckSumData[42].DataFileName[12] = 110;
  *(_DWORD *)&v1->CheckSumData[43].DataFileName[0] = *(_DWORD *)"PupMain.shn";
  *(_DWORD *)&v1->CheckSumData[43].DataFileName[4] = 778987873;
  *(_DWORD *)&v1->CheckSumData[43].DataFileName[8] = 7235699;
  *(_DWORD *)&v1->CheckSumData[44].DataFileName[0] = *(_DWORD *)"ChatColor.shn";
  *(_DWORD *)&v1->CheckSumData[44].DataFileName[4] = 1869377347;
  *(_DWORD *)&v1->CheckSumData[44].DataFileName[8] = 1752378994;
  *(_WORD *)&v1->CheckSumData[44].DataFileName[12] = 110;
  *(_DWORD *)&v1->CheckSumData[45].DataFileName[0] = *(_DWORD *)"TermExtendMatch.shn";
  *(_DWORD *)&v1->CheckSumData[45].DataFileName[4] = 1702131781;
  *(_DWORD *)&v1->CheckSumData[45].DataFileName[8] = 1632461934;
  *(_DWORD *)&v1->CheckSumData[45].DataFileName[12] = 778593140;
  *(_DWORD *)&v1->CheckSumData[45].DataFileName[16] = 7235699;
  *(_DWORD *)&v1->CheckSumData[46].DataFileName[0] = *(_DWORD *)"MinimonInfo.shn";
  *(_DWORD *)&v1->CheckSumData[46].DataFileName[4] = 1231974253;
  *(_DWORD *)&v1->CheckSumData[46].DataFileName[8] = 779052654;
  *(_DWORD *)&v1->CheckSumData[46].DataFileName[12] = 7235699;
  qmemcpy(v1->CheckSumData[47].DataFileName, "MinimonAutoUseItem.shn", 0x17u);
  qmemcpy(v1->CheckSumData[48].DataFileName, "ChargedDeletableBuff.shn", 0x19u);
  *(_DWORD *)&v1->CheckSumData[49].DataFileName[0] = *(_DWORD *)"SlanderFilter.shn";
  *(_DWORD *)&v1->CheckSumData[49].DataFileName[4] = 1181902180;
  *(_DWORD *)&v1->CheckSumData[49].DataFileName[8] = 1702128745;
  *(_DWORD *)&v1->CheckSumData[49].DataFileName[12] = 1752378994;
  *(_WORD *)&v1->CheckSumData[49].DataFileName[16] = 110;
  v5 = v1->CheckSumData[0].DataFileName;
  v8 = 50;
  do
  {
    FileNameLen = strlen(v5);
    for ( i = 0; i < FileNameLen; ++i )
      v5[i] = tolower(v5[i]);
    v5 += 65;
    --v8;
  }
  while ( v8 );
}

//----- (00732060) --------------------------------------------------------
int __thiscall CChatRestrict::Del(CChatRestrict *this, Name5 *pCharID)
{
  int v2; // edi@1
  int v3; // edx@1
  char *v4; // eax@2
  int result; // eax@9

  v2 = this->m_NumOfChatRestrict;
  v3 = 0;
  if ( this->m_NumOfChatRestrict <= 0 )
  {
LABEL_9:
    result = 0;
  }
  else
  {
    v4 = &this->m_ChatRestrict[0].sCharID.n5_name[8];
    while ( *((_DWORD *)v4 - 2) != pCharID->n5_code[0]
         || *((_DWORD *)v4 - 1) != pCharID->n5_code[1]
         || *(_DWORD *)v4 != pCharID->n5_code[2]
         || *((_DWORD *)v4 + 1) != pCharID->n5_code[3]
         || *((_DWORD *)v4 + 2) != pCharID->n5_code[4] )
    {
      ++v3;
      v4 += 22;
      if ( v3 >= v2 )
        goto LABEL_9;
    }
    this->m_NumOfChatRestrict = v2 - 1;
    memcpy(this->m_ChatRestrict[v3].sCharID.n5_name, this->m_ChatRestrict[v3 + 1].sCharID.n5_name, 22 * (v2 - 1 - v3));
    result = 1;
  }
  return result;
}

//----- (007320E0) --------------------------------------------------------
PROTO_CHAT_RESTRICT_INFO *__thiscall CChatRestrict::Get(CChatRestrict *this, Name5 *pCharID)
{
  int v2; // edx@1
  char *v3; // eax@2
  PROTO_CHAT_RESTRICT_INFO *result; // eax@9

  v2 = 0;
  if ( this->m_NumOfChatRestrict <= 0 )
  {
LABEL_9:
    result = 0;
  }
  else
  {
    v3 = &this->m_ChatRestrict[0].sCharID.n5_name[8];
    while ( *((_DWORD *)v3 - 2) != pCharID->n5_code[0]
         || *((_DWORD *)v3 - 1) != pCharID->n5_code[1]
         || *(_DWORD *)v3 != pCharID->n5_code[2]
         || *((_DWORD *)v3 + 1) != pCharID->n5_code[3]
         || *((_DWORD *)v3 + 2) != pCharID->n5_code[4] )
    {
      ++v2;
      v3 += 22;
      if ( v2 >= this->m_NumOfChatRestrict )
        goto LABEL_9;
    }
    result = &this->m_ChatRestrict[v2];
  }
  return result;
}

//----- (00732140) --------------------------------------------------------
void __thiscall CChatRestrict::CChatRestrict(CChatRestrict *this)
{
  CChatRestrict *v1; // esi@1

  v1 = this;
  `eh vector constructor iterator'(
    this->m_ChatRestrict,
    0x16u,
    100,
    (void (__thiscall *)(void *))Name5::Name5,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
  v1->m_NumOfChatRestrict = 0;
}

//----- (00732170) --------------------------------------------------------
void __thiscall CChatRestrict::~CChatRestrict(CChatRestrict *this)
{
  this->m_NumOfChatRestrict = 0;
  `eh vector destructor iterator'(
    this->m_ChatRestrict,
    0x16u,
    100,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
}

//----- (00732190) --------------------------------------------------------
int __thiscall CChatRestrict::Add(CChatRestrict *this, PROTO_CHAT_RESTRICT_INFO *pInfo)
{
  CChatRestrict *v2; // edi@1
  int v3; // ecx@1
  int result; // eax@2
  int v5; // esi@3
  int v6; // edx@4
  int v7; // ecx@13
  int v8; // edx@14

  v2 = this;
  v3 = this->m_NumOfChatRestrict;
  if ( v3 <= 100 )
  {
    v5 = 0;
    if ( v3 <= 0 )
    {
LABEL_11:
      if ( v3 < 100 )
      {
        v8 = (int)&v2->m_ChatRestrict[v3];
        *(_QWORD *)v8 = *(_QWORD *)&pInfo->sCharID.n5_name[0];
        *(_QWORD *)(v8 + 8) = *(_QWORD *)&pInfo->sCharID.n5_code[2];
        *(_DWORD *)(v8 + 16) = pInfo->sCharID.n5_code[4];
        *(_BYTE *)(v8 + 20) = pInfo->bIsGM;
        *(_BYTE *)(v8 + 21) = pInfo->bIsDeleted;
        ++v2->m_NumOfChatRestrict;
        result = 1;
      }
      else
      {
        result = 0;
      }
    }
    else
    {
      v6 = (int)&v2->m_ChatRestrict[0].sCharID.n5_code[2];
      while ( *(_DWORD *)(v6 - 8) != pInfo->sCharID.n5_code[0]
           || *(_DWORD *)(v6 - 4) != pInfo->sCharID.n5_code[1]
           || *(_DWORD *)v6 != pInfo->sCharID.n5_code[2]
           || *(_DWORD *)(v6 + 4) != pInfo->sCharID.n5_code[3]
           || *(_DWORD *)(v6 + 8) != pInfo->sCharID.n5_code[4] )
      {
        ++v5;
        v6 += 22;
        if ( v5 >= v3 )
          goto LABEL_11;
      }
      v7 = (int)&v2->m_ChatRestrict[v5];
      *(_QWORD *)v7 = *(_QWORD *)&pInfo->sCharID.n5_name[0];
      *(_QWORD *)(v7 + 8) = *(_QWORD *)&pInfo->sCharID.n5_code[2];
      *(_DWORD *)(v7 + 16) = pInfo->sCharID.n5_code[4];
      *(_BYTE *)(v7 + 20) = pInfo->bIsGM;
      *(_BYTE *)(v7 + 21) = pInfo->bIsDeleted;
      result = 2;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00732270) --------------------------------------------------------
void __thiscall CItemAuthorityBase::CItemAuthorityBase(CItemAuthorityBase *this)
{
  CItemAuthorityBase *v1; // eax@1
  signed int v2; // edi@1
  char *v3; // esi@1
  signed int v4; // ecx@2

  v1 = this;
  v2 = 17;
  this->vfptr = (CItemAuthorityBaseVtbl *)&CItemAuthorityBase::`vftable';
  v3 = (char *)this->IA_ChrBelong;
  do
  {
    v4 = 0;
    do
    {
      v3[v4 + 289] = 0;
      v3[v4] = 0;
      v3[v4++ - 289] = 0;
    }
    while ( v4 < 17 );
    v3 += 17;
    --v2;
  }
  while ( v2 );
  v1->IA_Common[8][9] = 1;
  *(_WORD *)&v1->IA_Common[9][8] = 257;
  v1->IA_Common[9][3] = 1;
  *(_WORD *)&v1->IA_Common[9][12] = 257;
  v1->IA_Common[9][14] = 1;
  *(_WORD *)&v1->IA_Common[9][15] = 257;
  v1->IA_Common[9][0] = 1;
  v1->IA_Common[9][6] = 1;
  v1->IA_Common[12][12] = 1;
  v1->IA_Common[3][3] = 1;
  v1->IA_Common[13][13] = 1;
  v1->IA_Common[14][14] = 1;
  v1->IA_Common[15][15] = 1;
  v1->IA_Common[0][0] = 1;
  v1->IA_Common[0][9] = 1;
  v1->IA_Common[6][6] = 1;
  v1->IA_Common[6][9] = 1;
  v1->IA_Common[2][9] = 1;
  v1->IA_Common[4][9] = 1;
  v1->IA_Common[5][9] = 1;
  v1->IA_ChrBelong[8][9] = 1;
  *(_WORD *)&v1->IA_ChrBelong[9][8] = 257;
  v1->IA_ChrBelong[9][3] = 1;
  *(_WORD *)&v1->IA_ChrBelong[9][12] = 257;
  v1->IA_ChrBelong[9][14] = 1;
  *(_WORD *)&v1->IA_ChrBelong[9][15] = 257;
  v1->IA_ChrBelong[12][12] = 1;
  v1->IA_ChrBelong[3][3] = 1;
  v1->IA_ChrBelong[13][13] = 1;
  v1->IA_ChrBelong[14][14] = 1;
  v1->IA_ChrBelong[15][15] = 1;
  *(_WORD *)&v1->IA_Common[16][16] = 257;
  v1->IA_ChrBelong[0][9] = 1;
  v1->IA_ChrBelong[6][6] = 1;
  v1->IA_ChrBelong[6][9] = 1;
  v1->IA_ChrBelong[2][9] = 1;
  v1->IA_ChrBelong[4][9] = 1;
  v1->IA_ChrBelong[5][9] = 1;
  v1->IA_AccBelong[8][9] = 1;
  *(_WORD *)&v1->IA_AccBelong[9][8] = 257;
  v1->IA_AccBelong[9][3] = 1;
  *(_WORD *)&v1->IA_AccBelong[9][12] = 257;
  v1->IA_AccBelong[9][14] = 1;
  *(_WORD *)&v1->IA_AccBelong[9][15] = 257;
  v1->IA_AccBelong[9][6] = 1;
  v1->IA_AccBelong[12][12] = 1;
  v1->IA_AccBelong[3][3] = 1;
  v1->IA_AccBelong[13][13] = 1;
  v1->IA_AccBelong[14][14] = 1;
  v1->IA_AccBelong[16][16] = 1;
  v1->IA_AccBelong[15][15] = 1;
  *(_WORD *)&v1->IA_ChrBelong[16][16] = 257;
  v1->IA_AccBelong[0][9] = 1;
  v1->IA_AccBelong[6][6] = 1;
  v1->IA_AccBelong[6][9] = 1;
  v1->IA_AccBelong[2][9] = 1;
  v1->IA_AccBelong[4][9] = 1;
  v1->IA_AccBelong[5][9] = 1;
}
// 9CF1E8: using guessed type int (__thiscall *CItemAuthorityBase::`vftable')(void *p, char);

//----- (00732420) --------------------------------------------------------
void __thiscall CItemAuthorityBase::~CItemAuthorityBase(CItemAuthorityBase *this)
{
  this->vfptr = (CItemAuthorityBaseVtbl *)&CItemAuthorityBase::`vftable';
}
// 9CF1E8: using guessed type int (__thiscall *CItemAuthorityBase::`vftable')(void *p, char);

//----- (00732430) --------------------------------------------------------
int __thiscall CItemAuthorityBase::IA_CanPlayerTrade(CItemAuthorityBase *this, E_BelongType eType, SHINE_PUT_ON_BELONGED_ITEM eBelongState)
{
  CItemAuthorityBase *v3; // esi@1
  int result; // eax@1

  v3 = this;
  result = ((int (__stdcall *)(E_BelongType))this->vfptr->IA_GetBelongTypeInfo)(eType);
  if ( result )
  {
    if ( *(_BYTE *)(result + 4) )
    {
      if ( eBelongState == SPOBI_NOT_BELONGED )
        result = (int)v3->vfptr->IA_GetBelongTypeInfo(v3, 0);
    }
    result = *(_BYTE *)(result + 8) == 0;
  }
  return result;
}

//----- (00732480) --------------------------------------------------------
int __thiscall CItemAuthorityBase::IA_CanNpcSell(CItemAuthorityBase *this, E_BelongType eType)
{
  int result; // eax@1

  result = ((int (__stdcall *)(E_BelongType))this->vfptr->IA_GetBelongTypeInfo)(eType);
  if ( result )
    result = *(_BYTE *)(result + 6) == 0;
  return result;
}

//----- (007324B0) --------------------------------------------------------
int __thiscall CItemAuthorityBase::IA_CanStorage(CItemAuthorityBase *this, E_BelongType eType, SHINE_PUT_ON_BELONGED_ITEM eBelongState, unsigned __int16 FromInven, unsigned __int16 ToInven)
{
  CItemAuthorityBase *v5; // esi@1
  int v6; // eax@1
  int result; // eax@2

  v5 = this;
  v6 = ((int (__stdcall *)(E_BelongType))this->vfptr->IA_GetBelongTypeInfo)(eType);
  if ( !v6 )
    goto LABEL_14;
  if ( *(_BYTE *)(v6 + 4) && eBelongState == SPOBI_NOT_BELONGED )
    v6 = (int)v5->vfptr->IA_GetBelongTypeInfo(v5, 0);
  if ( !*(_BYTE *)(v6 + 7) || FromInven != 6 && FromInven && ToInven != 6 && ToInven )
    result = 1;
  else
LABEL_14:
    result = 0;
  return result;
}

//----- (00732520) --------------------------------------------------------
int __thiscall CItemAuthorityBase::IA_IsWorkChrBelonged(CItemAuthorityBase *this, E_BelongType eType, SHINE_PUT_ON_BELONGED_ITEM eBelongState)
{
  CItemAuthorityBase *v3; // esi@1
  BelongTypeInfo *v4; // eax@1
  int result; // eax@8

  v3 = this;
  v4 = this->vfptr->IA_GetBelongTypeInfo(this, eType);
  if ( !v4 )
    goto LABEL_12;
  if ( v4->PutOnBelonged && eBelongState == SPOBI_NOT_BELONGED )
    v4 = v3->vfptr->IA_GetBelongTypeInfo(v3, 0);
  if ( v4->NoDrop && v4->NoStorage && v4->NoTrade )
    result = 1;
  else
LABEL_12:
    result = 0;
  return result;
}

//----- (00732580) --------------------------------------------------------
int __thiscall CItemAuthorityBase::IA_IsWorkAccBelonged(CItemAuthorityBase *this, E_BelongType eType, SHINE_PUT_ON_BELONGED_ITEM eBelongState)
{
  CItemAuthorityBase *v3; // esi@1
  int v4; // eax@1
  int result; // eax@7

  v3 = this;
  v4 = ((int (__stdcall *)(E_BelongType))this->vfptr->IA_GetBelongTypeInfo)(eType);
  if ( !v4 )
    goto LABEL_11;
  if ( *(_BYTE *)(v4 + 4) && eBelongState == SPOBI_NOT_BELONGED )
    v4 = (int)v3->vfptr->IA_GetBelongTypeInfo(v3, 0);
  if ( *(_BYTE *)(v4 + 5) && *(_BYTE *)(v4 + 8) )
    result = 1;
  else
LABEL_11:
    result = 0;
  return result;
}

//----- (007325D0) --------------------------------------------------------
int __thiscall CItemAuthorityBase::IA_IsDataPutOnBelonged(CItemAuthorityBase *this, E_BelongType eType)
{
  int result; // eax@1

  result = ((int (__stdcall *)(E_BelongType))this->vfptr->IA_GetBelongTypeInfo)(eType);
  if ( result )
    result = *(_BYTE *)(result + 4);
  return result;
}

//----- (007325F0) --------------------------------------------------------
BOOL __thiscall CItemAuthorityBase::IA_IsDataChrBelonged(CItemAuthorityBase *this, E_BelongType eType)
{
  int v2; // eax@1

  v2 = ((int (__stdcall *)(E_BelongType))this->vfptr->IA_GetBelongTypeInfo)(eType);
  return v2 && *(_BYTE *)(v2 + 5) && *(_BYTE *)(v2 + 7) && *(_BYTE *)(v2 + 8);
}

//----- (00732630) --------------------------------------------------------
BOOL __thiscall CItemAuthorityBase::IA_IsDataAccBelonged(CItemAuthorityBase *this, E_BelongType eType)
{
  int v2; // eax@1

  v2 = ((int (__stdcall *)(E_BelongType))this->vfptr->IA_GetBelongTypeInfo)(eType);
  return v2 && *(_BYTE *)(v2 + 5) && *(_BYTE *)(v2 + 8);
}

//----- (00732660) --------------------------------------------------------
CItemAuthorityBase *__thiscall CItemAuthorityBase::`scalar deleting destructor'(CItemAuthorityBase *this, unsigned int a2)
{
  CItemAuthorityBase *v2; // esi@1

  v2 = this;
  this->vfptr = (CItemAuthorityBaseVtbl *)&CItemAuthorityBase::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9CF1E8: using guessed type int (__thiscall *CItemAuthorityBase::`vftable')(void *p, char);

//----- (00732690) --------------------------------------------------------
E_RELOC_ERR *__thiscall CItemAuthorityBase::IA_CanInvenReloc(CItemAuthorityBase *this, E_BelongType eType, SHINE_PUT_ON_BELONGED_ITEM eBelongState, unsigned __int16 FromInven, unsigned __int16 ToInven, E_RELOC_ERR *eRelocErr)
{
  E_RELOC_ERR *result; // eax@1
  CItemAuthorityBase *v7; // esi@1
  int v8; // eax@6

  result = eRelocErr;
  v7 = this;
  if ( eRelocErr )
  {
    if ( FromInven >= 0x11u )
      return 0;
    if ( ToInven < 0x11u )
    {
      *eRelocErr = 0;
      if ( CItemAuthorityBase::IA_IsWorkChrBelonged(this, eType, eBelongState) )
      {
        v8 = (int)v7->IA_ChrBelong + 16 * FromInven + FromInven + ToInven;
        if ( !*(_BYTE *)v8 )
        {
          *eRelocErr = 1;
          return (E_RELOC_ERR *)*(_BYTE *)v8;
        }
        return (E_RELOC_ERR *)*(_BYTE *)v8;
      }
      if ( CItemAuthorityBase::IA_IsWorkAccBelonged(v7, eType, eBelongState) )
      {
        v8 = (int)v7->IA_AccBelong + 16 * FromInven + FromInven + ToInven;
        if ( !*(_BYTE *)v8 )
        {
          *eRelocErr = 2;
          return (E_RELOC_ERR *)*(_BYTE *)v8;
        }
        return (E_RELOC_ERR *)*(_BYTE *)v8;
      }
      if ( CItemAuthorityBase::IA_CanStorage(v7, eType, eBelongState, FromInven, ToInven) )
      {
        v8 = (int)v7->IA_Common + 16 * FromInven + FromInven + ToInven;
        if ( !*(_BYTE *)v8 )
          *eRelocErr = 3;
        return (E_RELOC_ERR *)*(_BYTE *)v8;
      }
    }
    result = 0;
  }
  return result;
}

//----- (007327B0) --------------------------------------------------------
void __thiscall CChargedItem::CChargedItem(CChargedItem *this)
{
  this->m_NumOfChargedItem = 0;
}

//----- (007327C0) --------------------------------------------------------
void __thiscall CChargedItem::Clear(CChargedItem *this)
{
  this->m_NumOfChargedItem = 0;
}

//----- (007327D0) --------------------------------------------------------
int __thiscall CChargedItem::Add(CChargedItem *this, PROTO_CHARGED_ITEM_INFO *pInfo)
{
  int v2; // eax@1
  int result; // eax@2
  int v4; // eax@3
  char *v5; // eax@3

  v2 = this->m_NumOfChargedItem;
  if ( v2 < 24 )
  {
    v4 = v2;
    this->m_ChargedItemBF[v4].ItemOrderNo = pInfo->ItemOrderNo;
    v5 = (char *)this + v4 * 16;
    *((_DWORD *)v5 + 1) = pInfo->ItemCode;
    *((_DWORD *)v5 + 2) = pInfo->ItemAmount;
    *((_DWORD *)v5 + 3) = pInfo->ItemRegisterDate;
    result = 1;
    ++this->m_NumOfChargedItem;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00732820) --------------------------------------------------------
int __thiscall CChargedItem::Del(CChargedItem *this, PROTO_CHARGED_ITEM_INFO *pInfo)
{
  int v2; // esi@1
  int v3; // edx@1
  CChargedItem *v4; // eax@2
  int result; // eax@5

  v2 = this->m_NumOfChargedItem;
  v3 = 0;
  if ( v2 <= 0 )
  {
LABEL_5:
    result = 0;
  }
  else
  {
    v4 = this;
    while ( v4->m_ChargedItemBF[0].ItemOrderNo != pInfo->ItemOrderNo )
    {
      ++v3;
      v4 = (CChargedItem *)((char *)v4 + 16);
      if ( v3 >= v2 )
        goto LABEL_5;
    }
    this->m_NumOfChargedItem = v2 - 1;
    memcpy((char *)this + 16 * v3, (char *)&this->m_ChargedItemBF[v3 + 1], 16 * (v2 - 1 - v3));
    result = 1;
  }
  return result;
}

//----- (00732880) --------------------------------------------------------
PROTO_CHARGED_ITEM_INFO *__thiscall CChargedItem::Find(CChargedItem *this, unsigned int ItemOrderNo)
{
  int v2; // esi@1
  int v3; // eax@1
  CChargedItem *v4; // edx@2
  PROTO_CHARGED_ITEM_INFO *result; // eax@5

  v2 = this->m_NumOfChargedItem;
  v3 = 0;
  if ( v2 <= 0 )
  {
LABEL_5:
    result = 0;
  }
  else
  {
    v4 = this;
    while ( v4->m_ChargedItemBF[0].ItemOrderNo != ItemOrderNo )
    {
      ++v3;
      v4 = (CChargedItem *)((char *)v4 + 16);
      if ( v3 >= v2 )
        goto LABEL_5;
    }
    result = &this->m_ChargedItemBF[v3];
  }
  return result;
}

//----- (007328C0) --------------------------------------------------------
PROTO_CHARGED_ITEM_INFO *__thiscall CChargedItem::Seek(CChargedItem *this, int Index)
{
  PROTO_CHARGED_ITEM_INFO *result; // eax@2

  if ( Index < this->m_NumOfChargedItem )
    result = &this->m_ChargedItemBF[Index];
  else
    result = 0;
  return result;
}

//----- (007328E0) --------------------------------------------------------
const char *__thiscall CQuestData::GetDialog(CQuestData *this, unsigned int nID)
{
  CQuestData *v2; // ebx@1
  const char *result; // eax@2
  CDataReader::HEAD *v4; // eax@3
  unsigned int v5; // edi@4
  unsigned int v6; // esi@6
  char *v7; // eax@7

  v2 = this;
  if ( this->m_pQuestDialog )
  {
    v4 = this->m_pQuestDialog->m_pHead;
    if ( v4 )
      v5 = v4->nNumOfRecord;
    else
      v5 = 0;
    v6 = 0;
    if ( v5 )
    {
      while ( 1 )
      {
        v7 = CDataReader::GetRecord(v2->m_pQuestDialog, v6);
        if ( v7 )
        {
          if ( *(_DWORD *)v7 == nID )
            break;
        }
        if ( ++v6 >= v5 )
          goto LABEL_10;
      }
      result = v7 + 4;
    }
    else
    {
LABEL_10:
      result = v2->m_pNULLSTR;
    }
  }
  else
  {
    result = this->m_pNULLSTR;
  }
  return result;
}

//----- (00732940) --------------------------------------------------------
QUEST_DATA *__thiscall CQuestData::GetQuestDataByIndex(CQuestData *this, unsigned int Index)
{
  QUEST_DATA_HEAD *v2; // eax@1
  unsigned __int16 v3; // ax@2
  QUEST_DATA *result; // eax@5

  v2 = this->m_pDataHead;
  if ( v2 )
    v3 = v2->NumOfQuest;
  else
    v3 = 0;
  if ( Index < v3 )
    result = this->m_ppQuestDataArray[Index];
  else
    result = 0;
  return result;
}

//----- (00732970) --------------------------------------------------------
CBaseObject **__stdcall std::allocator<QUEST_DATA *>::allocate(unsigned int _Count)
{
  CBaseObject **result; // eax@1
  std::exception pExceptionObject; // [sp+0h] [bp-Ch]@4

  result = 0;
  if ( _Count )
  {
    if ( _Count > 0x3FFFFFFF || (result = (CBaseObject **)operator new(4 * _Count)) == 0 )
    {
      _Count = 0;
      std::exception::exception(&pExceptionObject, (const char *const *)&_Count);
      pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
      _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
    }
  }
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (007329D0) --------------------------------------------------------
std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *__cdecl std::_Uninit_move<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>> *,std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>> *,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>,std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>(std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *_First, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *_Last, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *_Dest)
{
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *v3; // ecx@1
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *result; // eax@1

  v3 = _First;
  for ( result = _Dest; v3 != _Last; ++result )
  {
    if ( result )
      result->_Ptr = v3->_Ptr;
    ++v3;
  }
  return result;
}

//----- (00732A00) --------------------------------------------------------
std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *__thiscall std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::lower_bound(std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,0> > *this, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *result, const unsigned __int16 *_Keyval)
{
  const unsigned __int16 *v3; // ebx@1
  std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,0> > *v4; // esi@1
  int v5; // eax@1
  int v6; // edx@1
  unsigned int v7; // eax@1
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *v8; // ecx@3
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v9; // edi@3
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v10; // esi@3
  int v11; // edx@3
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *i; // eax@3
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v13; // ecx@5
  unsigned __int16 v14; // cx@8
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *v15; // eax@11
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *_Where; // [sp+1Ch] [bp+Ch]@10

  v3 = _Keyval;
  v4 = this;
  v5 = ldiv((*_Keyval ^ 0xDEADBEEF) & 0x7FFFFFFF, 127773);
  v7 = (16807 * v6 - 2836 * v5 + ((char)-(16807 * v6 - 2836 * v5 < 0) & 0x7FFFFFFF)) & v4->_Mask;
  if ( v4->_Maxidx <= v7 )
    v7 += -1 - (v4->_Mask >> 1);
  v8 = v4->_Vec._Myfirst;
  v9 = v8[2 * v7]._Ptr;
  v10 = v4->_List._Myhead;
  v11 = (int)&v8[2 * v7];
  for ( i = v8[2 * v7]._Ptr; ; i = i->_Next )
  {
    if ( v9 == v10 )
      v13 = v10;
    else
      v13 = **(std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node ***)(v11 + 4);
    if ( i == v13 )
    {
      v15 = result;
      result->_Ptr = v10;
      return v15;
    }
    v14 = i->_Myval.first;
    if ( v14 >= *_Keyval )
      break;
  }
  _Where = i;
  if ( *v3 >= v14 )
  {
    v15 = result;
    result->_Ptr = _Where;
  }
  else
  {
    v15 = result;
    result->_Ptr = v10;
  }
  return v15;
}

//----- (00732AD0) --------------------------------------------------------
std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *__thiscall std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::upper_bound(std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *this, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *result, const unsigned __int16 *_Keyval)
{
  std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *v3; // esi@1
  int v4; // eax@1
  int v5; // edx@1
  unsigned int v6; // eax@1
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *v7; // ecx@3
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v8; // esi@3
  int v9; // eax@3
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v10; // ecx@3
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v11; // eax@4
  unsigned __int16 v12; // dx@7
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *v13; // eax@10
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *_Keyvala; // [sp+14h] [bp+Ch]@13

  v3 = this;
  v4 = ldiv((*_Keyval ^ 0xDEADBEEF) & 0x7FFFFFFF, 127773);
  v6 = (16807 * v5 - 2836 * v4 + ((char)-(16807 * v5 - 2836 * v4 < 0) & 0x7FFFFFFF)) & v3->_Mask;
  if ( v3->_Maxidx <= v6 )
    v6 += -1 - (v3->_Mask >> 1);
  v7 = v3->_Vec._Myfirst;
  v8 = v3->_List._Myhead;
  v9 = (int)&v7[2 * v6];
  v10 = *(std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node **)v9;
  if ( *(std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node **)v9 == v8 )
    v11 = v8;
  else
    v11 = **(std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node ***)(v9 + 4);
  if ( v11 == v10 )
  {
LABEL_10:
    v13 = result;
    result->_Ptr = v8;
  }
  else
  {
    v12 = *_Keyval;
    while ( 1 )
    {
      v11 = v11->_Prev;
      if ( v11->_Myval.first <= v12 )
        break;
      if ( v11 == v10 )
        goto LABEL_10;
    }
    if ( v11->_Myval.first >= v12 )
    {
      _Keyvala = v11->_Next;
      v13 = result;
      result->_Ptr = _Keyvala;
    }
    else
    {
      v13 = result;
      result->_Ptr = v8;
    }
  }
  return v13;
}

//----- (00732B90) --------------------------------------------------------
std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *__stdcall std::_List_val<std::pair<unsigned short const,QUEST_DATA *>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>>::_Buynode<std::pair<unsigned short,QUEST_DATA *>>(std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *_Next, std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *_Prev, std::pair<unsigned short,QUEST_DATA *> *_Val)
{
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *result; // eax@1
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v5; // edx@2
  std::exception pExceptionObject; // [sp+0h] [bp-Ch]@5

  result = (std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *)operator new(0x10u);
  if ( !result )
  {
    _Next = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Next);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v5 = _Prev;
  result->_Next = _Next;
  result->_Prev = v5;
  if ( result != (std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *)-8 )
    result->_Myval = (std::pair<unsigned short const ,QUEST_DATA *>)*_Val;
  return result;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00732C00) --------------------------------------------------------
char __thiscall CQuestData::GetMobIdAssociatedWithQuestData(CQuestData *this, unsigned __int16 MobId, std::vector<QUEST_DATA *,std::allocator<QUEST_DATA *> > *rQuestList)
{
  std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *v3; // esi@1
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v4; // ebx@1
  char v5; // al@2
  std::vector<CBaseObject *,std::allocator<CBaseObject *> > *v6; // edi@3
  unsigned int v7; // eax@4
  QUEST_DATA **v8; // esi@4
  CBaseObject **v9; // edx@5
  CBaseObject **v10; // ecx@6
  int v11; // esi@6
  unsigned int v12; // eax@7
  unsigned int v13; // eax@8
  unsigned int v14; // ecx@8
  unsigned int v15; // ecx@10
  CBaseObject **v16; // eax@15
  CBaseObject **v17; // ecx@17
  unsigned int v18; // eax@18
  unsigned int v19; // eax@19
  unsigned int v20; // ecx@19
  unsigned int v21; // ecx@21
  CBaseObject **v22; // eax@26
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > v23; // [sp+8h] [bp-Ch]@1
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > result; // [sp+Ch] [bp-8h]@1
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > loweriter; // [sp+10h] [bp-4h]@1

  v3 = (std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *)&this->m_mhmap_QuestDataByMobID.comp;
  loweriter._Ptr = std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::lower_bound(
                     (std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,0> > *)&this->m_mhmap_QuestDataByMobID,
                     &result,
                     &MobId)->_Ptr;
  v4 = loweriter._Ptr;
  *(std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *)&MobId = (std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >)std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::upper_bound(v3, &v23, &MobId)->_Ptr;
  if ( (std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *)MobId == v4 )
  {
    v5 = 0;
  }
  else
  {
    v6 = (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)rQuestList;
    std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(
      (std::vector<CBaseObject *,std::allocator<CBaseObject *> > *)rQuestList,
      0x32u);
    do
    {
      v7 = (unsigned int)v6->_Mylast;
      v8 = &v4->_Myval.second;
      if ( (unsigned int)&v4->_Myval.second >= v7 || (v9 = v6->_Myfirst, v6->_Myfirst > (CBaseObject **)v8) )
      {
        v17 = v6->_Myend;
        if ( (CBaseObject **)v7 == v17 )
        {
          v18 = (signed int)(v7 - (unsigned int)v6->_Myfirst) >> 2;
          if ( v18 > 0x3FFFFFFE )
LABEL_30:
            std::_Xlength_error("vector<T> too long");
          v19 = v18 + 1;
          v20 = v17 - v6->_Myfirst;
          if ( v19 > v20 )
          {
            if ( 0x3FFFFFFF - (v20 >> 1) >= v20 )
              v21 = (v20 >> 1) + v20;
            else
              v21 = 0;
            if ( v21 < v19 )
              v21 = v19;
            std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v6, v21);
            v4 = loweriter._Ptr;
          }
        }
        v22 = v6->_Mylast;
        if ( v22 )
          *v22 = (CBaseObject *)*v8;
      }
      else
      {
        v10 = v6->_Myend;
        v11 = ((char *)v8 - (char *)v9) >> 2;
        if ( (CBaseObject **)v7 == v10 )
        {
          v12 = (signed int)(v7 - (_DWORD)v9) >> 2;
          if ( v12 > 0x3FFFFFFE )
            goto LABEL_30;
          v13 = v12 + 1;
          v14 = v10 - v9;
          if ( v13 > v14 )
          {
            if ( 0x3FFFFFFF - (v14 >> 1) >= v14 )
              v15 = (v14 >> 1) + v14;
            else
              v15 = 0;
            if ( v15 < v13 )
              v15 = v13;
            std::vector<ColumnBut *,std::allocator<ColumnBut *>>::reserve(v6, v15);
            v4 = loweriter._Ptr;
          }
        }
        v16 = v6->_Mylast;
        if ( v16 )
          *v16 = v6->_Myfirst[v11];
      }
      ++v6->_Mylast;
      v4 = v4->_Next;
      loweriter._Ptr = v4;
    }
    while ( v4 != (std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *)MobId );
    v5 = 1;
  }
  return v5;
}

//----- (00732D40) --------------------------------------------------------
void __thiscall std::vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>::_Insert_n(std::vector<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,std::allocator<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > > > *this, std::_Vector_const_iterator<std::_Vector_val<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,std::allocator<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > > > > _Where, unsigned int _Count, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *_Val)
{
  std::vector<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,std::allocator<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > > > *v4; // esi@1
  unsigned int v5; // edi@1
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *v6; // ebx@2
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *v7; // ecx@2
  int v8; // eax@2
  unsigned int v9; // edx@4
  unsigned int v10; // eax@4
  unsigned int v11; // eax@6
  CBaseObject **v12; // eax@10
  signed int v13; // ebx@10
  int v14; // ecx@10
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *v15; // ebx@10
  int v16; // edi@10
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v17; // ecx@14
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *v18; // eax@14
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *v19; // ST00_4@14
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *v20; // eax@14
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v21; // ecx@15
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *v22; // edi@15
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *v23; // ST18_4@15
  int v24; // [sp+0h] [bp-24h]@1
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *_Newvec; // [sp+10h] [bp-14h]@10
  int *v26; // [sp+14h] [bp-10h]@1
  int v27; // [sp+20h] [bp-4h]@10

  v26 = &v24;
  v4 = this;
  v5 = _Count;
  if ( _Count )
  {
    v6 = this->_Mylast;
    v7 = this->_Myfirst;
    v8 = v4->_Mylast - v4->_Myfirst;
    if ( 0x3FFFFFFF - v8 < _Count )
      std::_Xlength_error("vector<T> too long");
    v9 = v8 + _Count;
    v10 = v4->_Myend - v7;
    if ( v10 >= v9 )
    {
      if ( v6 - _Where._Ptr >= _Count )
      {
        v21 = _Val->_Ptr;
        v22 = &v6[-_Count];
        _Val = (std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *)(4 * _Count);
        v23 = &v6[-_Count];
        _Count = (unsigned int)v21;
        v4->_Mylast = std::_Uninit_move<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>> *,std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>> *,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>,std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>(
                        v23,
                        v6,
                        v6);
        std::_Copy_backward<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>>>> *,std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,ActiveSkillInfo *>>>> *>(
          _Where._Ptr,
          v22,
          v6);
        std::fill<std::_List_iterator<std::_List_val<std::pair<unsigned short const,QUEST_DATA *>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>>> *,std::_List_iterator<std::_List_val<std::pair<unsigned short const,QUEST_DATA *>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>>>>(
          _Where._Ptr,
          (std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *)((char *)_Where._Ptr + (unsigned int)_Val),
          (std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *)&_Count);
      }
      else
      {
        v17 = _Val->_Ptr;
        _Val = (std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *)(4 * _Count);
        _Count = (unsigned int)v17;
        std::_Uninit_move<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>> *,std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>> *,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>,std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>(
          _Where._Ptr,
          v6,
          &_Where._Ptr[v5]);
        v18 = v4->_Mylast;
        v19 = v4->_Mylast;
        v27 = 2;
        std::_Uninit_fill_n<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>> *,unsigned int,std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>,std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>(
          v19,
          v5 - (v18 - _Where._Ptr),
          (std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *)&_Count);
        v20 = _Val;
        v4->_Mylast = (std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *)((char *)v4->_Mylast + (unsigned int)_Val);
        std::fill<std::_List_iterator<std::_List_val<std::pair<unsigned short const,QUEST_DATA *>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>>> *,std::_List_iterator<std::_List_val<std::pair<unsigned short const,QUEST_DATA *>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>>>>(
          _Where._Ptr,
          (char *)v4->_Mylast - (char *)v20,
          (std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *)&_Count);
      }
    }
    else
    {
      if ( 0x3FFFFFFF - (v10 >> 1) >= v10 )
      {
        v11 = (v10 >> 1) + v10;
        _Count = v11;
      }
      else
      {
        _Count = 0;
        v11 = 0;
      }
      if ( v11 < v9 )
      {
        _Count = v9;
        v11 = v9;
      }
      v12 = std::allocator<QUEST_DATA *>::allocate(v11);
      v13 = (char *)_Where._Ptr - (char *)v4->_Myfirst;
      _Newvec = (std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *)v12;
      v13 >>= 2;
      v27 = 0;
      std::_Uninit_fill_n<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>> *,unsigned int,std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>,std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>(
        (std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *)&v12[v13],
        v5,
        _Val);
      std::_Uninit_move<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>> *,std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>> *,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>,std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>(
        v4->_Myfirst,
        _Where._Ptr,
        _Newvec);
      v14 = v13 + v5;
      v15 = _Newvec;
      std::_Uninit_move<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>> *,std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>> *,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>,std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>(
        _Where._Ptr,
        v4->_Mylast,
        &_Newvec[v14]);
      v16 = v4->_Mylast - v4->_Myfirst + v5;
      if ( v4->_Myfirst )
        operator delete(v4->_Myfirst);
      v4->_Myend = &v15[_Count];
      v4->_Mylast = &v15[v16];
      v4->_Myfirst = v15;
    }
  }
}

//----- (00732FA0) --------------------------------------------------------
QUEST_DATA *__thiscall CQuestData::GetQuestData(CQuestData *this, unsigned __int16 QuestID)
{
  CQuestData *v2; // esi@1
  QUEST_DATA *result; // eax@2
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > iter; // [sp+4h] [bp-4h]@1

  v2 = this;
  std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::lower_bound(
    (std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,0> > *)&this->m_hashmap_QuestData.comp,
    &iter,
    &QuestID);
  if ( iter._Ptr == v2->m_hashmap_QuestData._List._Myhead )
    result = 0;
  else
    result = iter._Ptr->_Myval.second;
  return result;
}

//----- (00732FE0) --------------------------------------------------------
const char *__thiscall CQuestData::GetQuestName(CQuestData *this, unsigned __int16 QuestID)
{
  CQuestData *v2; // esi@1
  QUEST_DATA *v3; // eax@2
  const char *v4; // eax@3
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > result; // [sp+4h] [bp-4h]@1

  v2 = this;
  *(_DWORD *)&QuestID = QuestID;
  std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::lower_bound(
    (std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,0> > *)&this->m_hashmap_QuestData.comp,
    &result,
    &QuestID);
  if ( result._Ptr != v2->m_hashmap_QuestData._List._Myhead && (v3 = result._Ptr->_Myval.second) != 0 )
    v4 = CQuestData::GetDialog(v2, v3->NameID);
  else
    v4 = v2->m_pNULLSTR;
  return v4;
}

//----- (00733030) --------------------------------------------------------
void __thiscall std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::~_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>(std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *this)
{
  std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *v1; // esi@1
  void **v2; // ecx@3
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v3; // eax@3
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v4; // edi@4

  v1 = this;
  if ( this->_Vec._Myfirst )
    operator delete(this->_Vec._Myfirst);
  v1->_Vec._Myfirst = 0;
  v1->_Vec._Mylast = 0;
  v1->_Vec._Myend = 0;
  v2 = (void **)&v1->_List._Myhead->_Next;
  v3 = (std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *)*v2;
  *v2 = v2;
  v1->_List._Myhead->_Prev = v1->_List._Myhead;
  v1->_List._Mysize = 0;
  if ( v3 != v1->_List._Myhead )
  {
    do
    {
      v4 = v3->_Next;
      operator delete(v3);
      v3 = v4;
    }
    while ( v4 != v1->_List._Myhead );
  }
  operator delete(v1->_List._Myhead);
}

//----- (007330A0) --------------------------------------------------------
void __thiscall std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,0>>::_Check_size(std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,0> > *this)
{
  std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,0> > *v1; // ebx@1
  double v2; // st7@1
  unsigned int v3; // esi@1
  signed int v4; // eax@2
  std::vector<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,std::allocator<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > > > *v5; // ecx@5
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *v6; // edi@5
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > v9; // ST08_4@9
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > _Val; // [sp+8h] [bp-4h]@1

  v1 = this;
  v2 = this->_Max_bucket_size;
  v3 = this->_Maxidx;
  *(float *)&_Val._Ptr = (double)this->_List._Mysize / (double)v3;
  if ( *(float *)&_Val._Ptr > v2 )
  {
    v4 = 0;
    do
    {
      if ( v3 >= 0x1FFFFFFF )
        break;
      ++v4;
      v3 *= 2;
    }
    while ( v4 < 3 );
    v5 = &this->_Vec;
    v6 = v1->_Vec._Myfirst;
    _Val._Ptr = v1->_List._Myhead;
    if ( v6 != v1->_Vec._Mylast )
    {
      v5 = &v1->_Vec;
      v1->_Vec._Mylast = v6;
    }
    std::vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>::_Insert_n(
      v5,
      (std::_Vector_const_iterator<std::_Vector_val<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,std::allocator<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > > > >)v5->_Myfirst,
      2 * v3,
      &_Val);
    v1->_Mask = v3 - 1;
    v9._Ptr = v1->_List._Myhead;
    v1->_Maxidx = v3;
    std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,0>>::_Reinsert(
      v1,
      v9);
  }
}

//----- (00733150) --------------------------------------------------------
void __thiscall std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::_Check_size(std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *this)
{
  std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *v1; // ebx@1
  double v2; // st7@1
  unsigned int v3; // esi@1
  signed int v4; // eax@2
  std::vector<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,std::allocator<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > > > *v5; // ecx@5
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *v6; // edi@5
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > v9; // ST08_4@9
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > _Val; // [sp+8h] [bp-4h]@1

  v1 = this;
  v2 = this->_Max_bucket_size;
  v3 = this->_Maxidx;
  *(float *)&_Val._Ptr = (double)this->_List._Mysize / (double)v3;
  if ( *(float *)&_Val._Ptr > v2 )
  {
    v4 = 0;
    do
    {
      if ( v3 >= 0x1FFFFFFF )
        break;
      ++v4;
      v3 *= 2;
    }
    while ( v4 < 3 );
    v5 = &this->_Vec;
    v6 = v1->_Vec._Myfirst;
    _Val._Ptr = v1->_List._Myhead;
    if ( v6 != v1->_Vec._Mylast )
    {
      v5 = &v1->_Vec;
      v1->_Vec._Mylast = v6;
    }
    std::vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>::_Insert_n(
      v5,
      (std::_Vector_const_iterator<std::_Vector_val<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,std::allocator<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > > > >)v5->_Myfirst,
      2 * v3,
      &_Val);
    v1->_Mask = v3 - 1;
    v9._Ptr = v1->_List._Myhead;
    v1->_Maxidx = v3;
    std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::_Reinsert(
      v1,
      v9);
  }
}

//----- (00733200) --------------------------------------------------------
void __thiscall std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::clear(std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *this)
{
  std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *v1; // esi@1
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v2; // ecx@1
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v3; // eax@1
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v4; // edi@2
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *v5; // edi@3
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *v6; // edx@3
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > _Val; // [sp+8h] [bp-4h]@3

  v1 = this;
  v2 = this->_List._Myhead;
  v3 = v2->_Next;
  v2->_Next = v2;
  v1->_List._Myhead->_Prev = v1->_List._Myhead;
  v1->_List._Mysize = 0;
  if ( v3 != v1->_List._Myhead )
  {
    do
    {
      v4 = v3->_Next;
      operator delete(v3);
      v3 = v4;
    }
    while ( v4 != v1->_List._Myhead );
  }
  v5 = v1->_Vec._Myfirst;
  v6 = v1->_Vec._Mylast;
  _Val._Ptr = v1->_List._Myhead;
  if ( v5 != v6 )
    v1->_Vec._Mylast = v5;
  std::vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>::_Insert_n(
    &v1->_Vec,
    (std::_Vector_const_iterator<std::_Vector_val<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,std::allocator<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > > > >)v1->_Vec._Myfirst,
    0x10u,
    &_Val);
  v1->_Mask = 7;
  v1->_Maxidx = 8;
}
// 733200: could not find valid save-restore pair for ebx

//----- (00733290) --------------------------------------------------------
void __thiscall std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,0>>::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,0>>(std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *this, stdext::hash_compare<unsigned short,std::less<unsigned short> > *_Parg, std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > *_Al)
{
  std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *v3; // esi@1
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v4; // eax@1
  std::vector<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,std::allocator<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > > > *v5; // ecx@2
  stdext::hash_compare<unsigned short,std::less<unsigned short> > *v6; // edx@2
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *v7; // edi@2
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *v8; // eax@2
  std::exception pExceptionObject; // [sp+10h] [bp-1Ch]@7
  std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *v12; // [sp+1Ch] [bp-10h]@1
  int v13; // [sp+28h] [bp-4h]@2

  v3 = this;
  v12 = this;
  this->comp = (stdext::hash_compare<unsigned short,std::less<unsigned short> >)_Parg->comp.0;
  this->_List._Mysize = 0;
  v4 = (std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *)operator new(0x10u);
  if ( !v4 )
  {
    _Parg = 0;
    std::exception::exception(&pExceptionObject, (const char *const *)&_Parg);
    pExceptionObject.vfptr = (std::exceptionVtbl *)&std::bad_alloc::`vftable';
    _CxxThrowException(&pExceptionObject, &_TI2_AVbad_alloc_std__);
  }
  v3->_List._Myhead = v4;
  v4->_Next = v4;
  v3->_List._Myhead->_Prev = v3->_List._Myhead;
  v5 = &v3->_Vec;
  v13 = 0;
  v5->_Myfirst = 0;
  v5->_Mylast = 0;
  v5->_Myend = 0;
  v6 = (stdext::hash_compare<unsigned short,std::less<unsigned short> > *)v3->_List._Myhead;
  v3->_Max_bucket_size = 1.0;
  v7 = v3->_Vec._Myfirst;
  v8 = v3->_Vec._Mylast;
  LOBYTE(v13) = 1;
  _Parg = v6;
  if ( v7 != v8 )
    v3->_Vec._Mylast = v7;
  std::vector<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>,std::allocator<std::_List_iterator<std::_List_val<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>> const,std::list<ItemViewDummy *,std::allocator<ItemViewDummy *>>>>>>>>::_Insert_n(
    v5,
    (std::_Vector_const_iterator<std::_Vector_val<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,std::allocator<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > > > >)v5->_Myfirst,
    0x10u,
    (std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *)&_Parg);
  v3->_Mask = 7;
  v3->_Maxidx = 8;
}
// 96E594: using guessed type int (__thiscall *std::bad_alloc::`vftable')(void *p, char);

//----- (00733380) --------------------------------------------------------
std::pair<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,bool> *__thiscall std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,0>>::_Insert(std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,0> > *this, std::pair<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,bool> *result, std::pair<unsigned short const ,QUEST_DATA *> *_Val, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > _Plist)
{
  std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,0> > *v4; // edi@1
  int v5; // eax@1
  int v6; // edx@1
  unsigned int v7; // ebx@1
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *v8; // eax@3
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v9; // ecx@3
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v10; // esi@3
  std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *v11; // edi@3
  int v12; // eax@3
  unsigned __int16 v13; // ax@5
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v14; // edx@8
  int v15; // eax@10
  std::pair<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,bool> *v16; // eax@16
  std::pair<unsigned short const ,QUEST_DATA *> **v17; // edx@19
  std::pair<unsigned short const ,QUEST_DATA *> *v18; // ecx@19
  std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,0> > *v19; // [sp+Ch] [bp-4h]@1
  std::pair<unsigned short const ,QUEST_DATA *> *_Vala; // [sp+1Ch] [bp+Ch]@10

  v4 = this;
  v19 = this;
  v5 = ldiv((_Val->first ^ 0xDEADBEEF) & 0x7FFFFFFF, 127773);
  v7 = (16807 * v6 - 2836 * v5 + ((char)-(16807 * v6 - 2836 * v5 < 0) & 0x7FFFFFFF)) & v4->_Mask;
  if ( v4->_Maxidx <= v7 )
    v7 += -1 - (v4->_Mask >> 1);
  v8 = v4->_Vec._Myfirst;
  v9 = v8[2 * v7]._Ptr;
  v10 = v4->_List._Myhead;
  v11 = &v4->_List;
  v12 = (int)&v8[2 * v7];
  if ( v10 == v9 )
    goto LABEL_8;
  v10 = **(std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node ***)(v12 + 4);
  if ( v10 == v9 )
    goto LABEL_8;
  v13 = _Val->first;
  while ( 1 )
  {
    v10 = v10->_Prev;
    if ( v10->_Myval.first <= v13 )
      break;
    if ( v10 == v9 )
      goto LABEL_8;
  }
  if ( v10->_Myval.first < v13 )
  {
    v10 = v10->_Next;
LABEL_8:
    v14 = _Plist._Ptr;
    if ( v10 != _Plist._Ptr->_Next )
    {
      std::list<std::pair<unsigned short const,QUEST_DATA *>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>>::_Splice_same(
        v11,
        (std::_List_const_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >)v10,
        v11,
        (std::_List_const_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >)_Plist._Ptr,
        (std::_List_const_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >)_Plist._Ptr->_Next,
        1u);
      v14 = _Plist._Ptr;
    }
    v15 = (int)&v19->_Vec._Myfirst[2 * v7];
    _Vala = (std::pair<unsigned short const ,QUEST_DATA *> *)v14;
    if ( *(std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node **)v15 == v11->_Myhead )
    {
      *(_DWORD *)v15 = v14;
      v19->_Vec._Myfirst[2 * v7 + 1]._Ptr = v14;
    }
    else if ( *(std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node **)v15 == v10 )
    {
      *(_DWORD *)v15 = v14;
    }
    else
    {
      v17 = *(std::pair<unsigned short const ,QUEST_DATA *> ***)(v15 + 4);
      v18 = *v17;
      *(_DWORD *)(v15 + 4) = *v17;
      if ( v18 != _Vala )
        v19->_Vec._Myfirst[2 * v7 + 1]._Ptr = v19->_Vec._Myfirst[2 * v7 + 1]._Ptr->_Prev;
    }
    std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,0>>::_Check_size(v19);
    v16 = result;
    result->first = _Plist;
    result->second = 1;
    return v16;
  }
  if ( _Plist._Ptr != v11->_Myhead )
  {
    _Plist._Ptr->_Prev->_Next = _Plist._Ptr->_Next;
    _Plist._Ptr->_Next->_Prev = _Plist._Ptr->_Prev;
    operator delete(_Plist._Ptr);
    --v11->_Mysize;
  }
  v16 = result;
  result->first._Ptr = v10;
  result->second = 0;
  return v16;
}

//----- (007334D0) --------------------------------------------------------
void __thiscall std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,0>>::_Reinsert(std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,0> > *this, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > _Last)
{
  std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,0> > *v2; // esi@1
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > v3; // ST08_4@3
  bool v4; // bl@3
  std::pair<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,bool> result; // [sp+4h] [bp-8h]@3
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *_Lasta; // [sp+14h] [bp+8h]@2

  v2 = this;
  if ( this->_List._Myhead->_Next != _Last._Ptr )
  {
    _Lasta = _Last._Ptr->_Prev;
    do
    {
      v3._Ptr = v2->_List._Myhead->_Next;
      v4 = v3._Ptr == _Lasta;
      std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,0>>::_Insert(
        v2,
        &result,
        &v3._Ptr->_Myval,
        v3);
    }
    while ( !v4 );
  }
}

//----- (00733520) --------------------------------------------------------
std::pair<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,bool> *__thiscall std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::_Insert(std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *this, std::pair<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,bool> *result, std::pair<unsigned short const ,QUEST_DATA *> *_Val, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > _Plist)
{
  std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *v4; // edi@1
  int v5; // eax@1
  int v6; // edx@1
  unsigned int v7; // ebx@1
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *v8; // eax@3
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v9; // ecx@3
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v10; // esi@3
  int v11; // eax@3
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v12; // eax@9
  int v13; // eax@11
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v14; // edx@14
  std::pair<unsigned short const ,QUEST_DATA *> *v15; // ecx@15
  std::pair<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,bool> *v16; // eax@18
  std::pair<unsigned short const ,QUEST_DATA *> *_Vala; // [sp+18h] [bp+Ch]@11

  v4 = this;
  v5 = ldiv((_Val->first ^ 0xDEADBEEF) & 0x7FFFFFFF, 127773);
  v7 = (16807 * v6 - 2836 * v5 + ((char)-(16807 * v6 - 2836 * v5 < 0) & 0x7FFFFFFF)) & v4->_Mask;
  if ( v4->_Maxidx <= v7 )
    v7 += -1 - (v4->_Mask >> 1);
  v8 = v4->_Vec._Myfirst;
  v9 = v8[2 * v7]._Ptr;
  v10 = v4->_List._Myhead;
  v11 = (int)&v8[2 * v7];
  if ( v10 != v9 )
  {
    v10 = **(std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node ***)(v11 + 4);
    if ( v10 != v9 )
    {
      while ( 1 )
      {
        v10 = v10->_Prev;
        if ( _Val->first >= v10->_Myval.first )
          break;
        if ( v10 == v9 )
          goto LABEL_9;
      }
      v10 = v10->_Next;
    }
  }
LABEL_9:
  v12 = _Plist._Ptr;
  if ( v10 != _Plist._Ptr->_Next )
  {
    std::list<std::pair<unsigned short const,QUEST_DATA *>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>>::_Splice_same(
      &v4->_List,
      (std::_List_const_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >)v10,
      &v4->_List,
      (std::_List_const_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >)_Plist._Ptr,
      (std::_List_const_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >)_Plist._Ptr->_Next,
      1u);
    v12 = _Plist._Ptr;
  }
  _Vala = (std::pair<unsigned short const ,QUEST_DATA *> *)v12;
  v13 = (int)&v4->_Vec._Myfirst[2 * v7];
  if ( *(std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node **)v13 != v4->_List._Myhead )
  {
    if ( *(std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node **)v13 == v10 )
    {
      v14 = _Plist._Ptr;
    }
    else
    {
      v15 = **(std::pair<unsigned short const ,QUEST_DATA *> ***)(v13 + 4);
      *(_DWORD *)(v13 + 4) = v15;
      if ( v15 == _Vala )
        goto LABEL_18;
      v13 = (int)&v4->_Vec._Myfirst[2 * v7 + 1];
      v14 = *(std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node **)(*(_DWORD *)v13 + 4);
    }
    *(_DWORD *)v13 = v14;
    goto LABEL_18;
  }
  *(std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > *)v13 = _Plist;
  v4->_Vec._Myfirst[2 * v7 + 1]._Ptr = (std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *)_Vala;
LABEL_18:
  std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::_Check_size(v4);
  v16 = result;
  result->first = _Plist;
  result->second = 1;
  return v16;
}

//----- (00733620) --------------------------------------------------------
void __thiscall std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::_Reinsert(std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *this, std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > _Last)
{
  std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *v2; // esi@1
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > v3; // ST08_4@3
  bool v4; // bl@3
  std::pair<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,bool> result; // [sp+4h] [bp-8h]@3
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *_Lasta; // [sp+14h] [bp+8h]@2

  v2 = this;
  if ( this->_List._Myhead->_Next != _Last._Ptr )
  {
    _Lasta = _Last._Ptr->_Prev;
    do
    {
      v3._Ptr = v2->_List._Myhead->_Next;
      v4 = v3._Ptr == _Lasta;
      std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::_Insert(
        v2,
        &result,
        &v3._Ptr->_Myval,
        v3);
    }
    while ( !v4 );
  }
}

//----- (00733670) --------------------------------------------------------
void __thiscall CQuestData::ClearBF(CQuestData *this)
{
  CQuestData *v1; // esi@1
  QUEST_DATA_HEAD *v2; // eax@5
  unsigned int v3; // edi@6
  QUEST_DATA **v4; // edx@7
  QUEST_DATA *v5; // edx@10
  QUEST_DATA *v6; // ecx@12

  v1 = this;
  if ( this->m_pBF )
  {
    operator delete(this->m_pBF);
    v1->m_pBF = 0;
  }
  if ( v1->m_ppQuestDataArray )
  {
    if ( !v1->m_bReadonly )
    {
      v2 = v1->m_pDataHead;
      if ( v2 )
      {
        v3 = 0;
        if ( v2->NumOfQuest > 0u )
        {
          do
          {
            v4 = v1->m_ppQuestDataArray;
            if ( v4[v3] )
            {
              if ( v4[v3]->pScriptStart )
                operator delete[](v4[v3]->pScriptStart);
              v5 = v1->m_ppQuestDataArray[v3];
              if ( v5->pScriptDoing )
                operator delete[](v5->pScriptDoing);
              v6 = v1->m_ppQuestDataArray[v3];
              if ( v6->pScriptEnd )
                operator delete[](v6->pScriptEnd);
              operator delete(v1->m_ppQuestDataArray[v3]);
            }
            ++v3;
          }
          while ( v3 < v1->m_pDataHead->NumOfQuest );
        }
      }
    }
    operator delete[](v1->m_ppQuestDataArray);
    v1->m_ppQuestDataArray = 0;
  }
  if ( v1->m_pDataHead )
  {
    operator delete(v1->m_pDataHead);
    v1->m_pDataHead = 0;
  }
  std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::clear((std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *)&v1->m_hashmap_QuestData);
}

//----- (00733760) --------------------------------------------------------
void __thiscall CQuestData::CQuestData(CQuestData *this, CDataReader *pQuestDialog)
{
  CQuestData *v2; // esi@1

  v2 = this;
  this->m_pQuestDialog = pQuestDialog;
  std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,0>>::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,0>>(
    (std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *)&this->m_hashmap_QuestData,
    (stdext::hash_compare<unsigned short,std::less<unsigned short> > *)&pQuestDialog + 3,
    (std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > *)&pQuestDialog + 3);
  std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,0>>::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,0>>(
    (std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *)&v2->m_mhmap_QuestDataByMobID.comp,
    (stdext::hash_compare<unsigned short,std::less<unsigned short> > *)&pQuestDialog + 3,
    (std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > *)&pQuestDialog + 3);
  v2->m_pNULLSTR = NULLSTR;
  v2->m_ReadError = 1;
  v2->m_bReadonly = 0;
  v2->m_pBF = 0;
  v2->m_pDataHead = 0;
  v2->m_ppQuestDataArray = 0;
}

//----- (007337F0) --------------------------------------------------------
void __thiscall CQuestData::~CQuestData(CQuestData *this)
{
  CQuestData *v1; // esi@1

  v1 = this;
  CQuestData::ClearBF(this);
  std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::~_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>((std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *)&v1->m_mhmap_QuestDataByMobID.comp);
  std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::~_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>((std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *)&v1->m_hashmap_QuestData);
}

//----- (00733850) --------------------------------------------------------
void __thiscall CQuestData::QuestData_HashDataIn(CQuestData *this)
{
  CQuestData *v1; // edi@1
  QUEST_DATA_HEAD *v2; // eax@1
  unsigned __int16 v3; // ax@2
  int v4; // ebx@4
  int v5; // esi@5
  unsigned __int16 v6; // dx@7
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v7; // ebx@7
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v8; // eax@7
  int v9; // ecx@7
  unsigned int v10; // ebx@8
  int v11; // edx@8
  QUEST_DATA *v12; // eax@9
  unsigned __int16 v13; // ax@11
  QUEST_DATA **v14; // edx@13
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node **v15; // ecx@13
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node ***v16; // esi@13
  QUEST_DATA *v17; // eax@13
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v18; // ebx@13
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v19; // eax@13
  unsigned int v20; // ecx@13
  char *v21; // ebx@14
  QUEST_DATA **v22; // edx@18
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v23; // edi@18
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node *v24; // eax@18
  std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node **v25; // ecx@18
  std::pair<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,bool> v26; // [sp+Ch] [bp-4Ch]@19
  std::pair<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,bool> v27; // [sp+14h] [bp-44h]@14
  std::pair<std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >,bool> result; // [sp+1Ch] [bp-3Ch]@8
  std::pair<unsigned short,QUEST_DATA *> v29; // [sp+24h] [bp-34h]@18
  std::pair<unsigned short,QUEST_DATA *> v30; // [sp+2Ch] [bp-2Ch]@13
  std::pair<unsigned short,QUEST_DATA *> _Val; // [sp+34h] [bp-24h]@7
  unsigned int NumOfQuest; // [sp+3Ch] [bp-1Ch]@4
  QUEST_DATA *lpQuestData; // [sp+40h] [bp-18h]@8
  std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > v34; // [sp+44h] [bp-14h]@8
  std::list<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > *k; // [sp+48h] [bp-10h]@5
  int j; // [sp+4Ch] [bp-Ch]@8
  CQuestData *v37; // [sp+50h] [bp-8h]@1
  unsigned int i; // [sp+54h] [bp-4h]@4

  v1 = this;
  v2 = this->m_pDataHead;
  v37 = this;
  if ( v2 )
    v3 = v2->NumOfQuest;
  else
    v3 = 0;
  v4 = v3;
  NumOfQuest = v3;
  std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::clear((std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *)&this->m_hashmap_QuestData);
  std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::clear((std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *)&v1->m_mhmap_QuestDataByMobID.comp);
  i = 0;
  if ( v4 )
  {
    v5 = (int)&v1->m_hashmap_QuestData._List;
    for ( k = &v1->m_hashmap_QuestData._List; ; v5 = (int)k )
    {
      v6 = v1->m_ppQuestDataArray[i]->ID;
      _Val.second = v1->m_ppQuestDataArray[i];
      v7 = **(std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node ***)v5;
      _Val.first = v6;
      v8 = std::_List_val<std::pair<unsigned short const,QUEST_DATA *>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>>::_Buynode<std::pair<unsigned short,QUEST_DATA *>>(
             v7,
             v7->_Prev,
             &_Val);
      v9 = *(_DWORD *)(v5 + 4);
      if ( (unsigned int)(536870910 - v9) < 1
        || ((*(_DWORD *)(v5 + 4) = v9 + 1,
             v7->_Prev = v8,
             v8->_Prev->_Next = v8,
             std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,0>>::_Insert(
               (std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,0> > *)&v1->m_hashmap_QuestData.comp,
               &result,
               (std::pair<unsigned short const ,QUEST_DATA *> *)(**(_DWORD **)v5 + 8),
               (std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >)(*(std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > > **)v5)->_Ptr),
             v10 = i,
             v11 = v1->m_ppQuestDataArray[i]->ID,
             lpQuestData = v1->m_ppQuestDataArray[i],
             j = v11,
             std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::lower_bound(
               (std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,0> > *)&v1->m_hashmap_QuestData.comp,
               &v34,
               (const unsigned __int16 *)&j),
             v34._Ptr == v1->m_hashmap_QuestData._List._Myhead)
         || (v12 = v34._Ptr->_Myval.second) == 0
         || !v12->Start.bNPC ? (v13 = -1) : (v13 = v12->Start.NPCID),
            v14 = v1->m_ppQuestDataArray,
            v15 = &v1->m_mhmap_QuestDataByMobID._List._Myhead->_Next,
            v16 = (std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node ***)&v1->m_mhmap_QuestDataByMobID._List,
            v30.first = v13,
            v17 = v14[v10],
            v18 = *v15,
            v30.second = v17,
            v19 = std::_List_val<std::pair<unsigned short const,QUEST_DATA *>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>>::_Buynode<std::pair<unsigned short,QUEST_DATA *>>(
                    v18,
                    v18->_Prev,
                    &v30),
            v20 = v1->m_mhmap_QuestDataByMobID._List._Mysize,
            536870910 - v20 < 1) )
      {
LABEL_23:
        std::_Xlength_error("list<T> too long");
      }
      v1->m_mhmap_QuestDataByMobID._List._Mysize = v20 + 1;
      v18->_Prev = v19;
      v19->_Prev->_Next = v19;
      std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::_Insert(
        (std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *)&v1->m_mhmap_QuestDataByMobID.comp,
        &v27,
        &(**v16)->_Myval,
        (std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >)**v16);
      j = 0;
      v21 = &lpQuestData->End.NPCMobList[0].NPCMobAction;
      do
      {
        if ( *(v21 - 4) && (!*v21 || *v21 == 3) )
        {
          v22 = v1->m_ppQuestDataArray;
          v29.first = *((_WORD *)v21 - 1);
          v23 = **v16;
          v29.second = v22[i];
          v24 = std::_List_val<std::pair<unsigned short const,QUEST_DATA *>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>>::_Buynode<std::pair<unsigned short,QUEST_DATA *>>(
                  v23,
                  v23->_Prev,
                  &v29);
          v25 = v16[1];
          if ( (unsigned int)(536870910 - (_DWORD)v25) < 1 )
            goto LABEL_23;
          v16[1] = (std::_List_nod<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > >::_Node **)((char *)v25 + 1);
          v23->_Prev = v24;
          v24->_Prev->_Next = v24;
          std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short>>,std::allocator<std::pair<unsigned short const,QUEST_DATA *>>,1>>::_Insert(
            (std::_Hash<std::_Hmap_traits<unsigned short,QUEST_DATA *,stdext::hash_compare<unsigned short,std::less<unsigned short> >,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> >,1> > *)&v37->m_mhmap_QuestDataByMobID.comp,
            &v26,
            &(**v16)->_Myval,
            (std::_List_iterator<std::_List_val<std::pair<unsigned short const ,QUEST_DATA *>,std::allocator<std::pair<unsigned short const ,QUEST_DATA *> > > >)**v16);
          v1 = v37;
        }
        v21 += 8;
        ++j;
      }
      while ( j < 5 );
      if ( ++i >= NumOfQuest )
        break;
    }
  }
}

//----- (00733A50) --------------------------------------------------------
_iobuf *__thiscall CQuestData::ReadModeRead(CQuestData *this, const char *pFN)
{
  CQuestData *v2; // esi@1
  _iobuf *result; // eax@1
  _iobuf *v4; // edi@1
  int v5; // eax@3
  int v6; // ebx@3
  QUEST_DATA_HEAD *v7; // eax@3
  unsigned int v8; // ebx@7
  char *v9; // eax@7
  char *v10; // eax@10
  QUEST_DATA_HEAD *v11; // ecx@10
  QUEST_DATA *v12; // eax@10
  unsigned int v13; // edx@10
  int v14; // ecx@11
  int v15; // edi@11
  _iobuf *fp; // [sp+10h] [bp+8h]@1

  v2 = this;
  CQuestData::ClearBF(this);
  result = fopen(pFN, "rb");
  v4 = result;
  fp = result;
  if ( !result )
  {
    v2->m_ReadError = 1;
    return result;
  }
  v5 = _fileno(result);
  v6 = _filelength(v5);
  v7 = (QUEST_DATA_HEAD *)operator new(4u);
  v2->m_pDataHead = v7;
  if ( fread(v7, 4u, 1u, v4) != 1 )
  {
    v2->m_ReadError = 2;
ERROR_READ:
    CQuestData::ClearBF(v2);
    fclose(v4);
    return 0;
  }
  if ( v2->m_pDataHead->VersionNo != 6 )
  {
    v2->m_ReadError = 3;
    goto ERROR_READ;
  }
  v8 = v6 - 4;
  v9 = (char *)operator new[](v8);
  v2->m_pBF = v9;
  if ( fread(v9, v8, 1u, v4) != 1 )
  {
    v2->m_ReadError = 4;
    goto ERROR_READ;
  }
  v10 = (char *)operator new[](4 * v2->m_pDataHead->NumOfQuest);
  v11 = v2->m_pDataHead;
  v2->m_ppQuestDataArray = (QUEST_DATA **)v10;
  memset(v10, 0, 4 * v11->NumOfQuest);
  v12 = (QUEST_DATA *)v2->m_pBF;
  v13 = 0;
  if ( v2->m_pDataHead->NumOfQuest > 0u )
  {
    do
    {
      v2->m_ppQuestDataArray[v13] = v12;
      v12->pScriptStart = (char *)&v12[1].ID;
      v14 = v12->SizeOfScriptStart;
      v12->pScriptDoing = (char *)&v12[1].ID + v14;
      v15 = v12->SizeOfScriptDoing;
      v12->pScriptEnd = (char *)&v12[1].ID + v15 + v14;
      ++v13;
      v12 = (QUEST_DATA *)((char *)v12 + v14 + v15 + v12->SizeOfScriptEnd + 680);
    }
    while ( v13 < v2->m_pDataHead->NumOfQuest );
    v4 = fp;
  }
  fclose(v4);
  v2->m_ReadError = 0;
  CQuestData::QuestData_HashDataIn(v2);
  return (_iobuf *)1;
}

//----- (00733BE0) --------------------------------------------------------
_iobuf *__thiscall CQuestData::ReadModeEdit(CQuestData *this, const char *pFN)
{
  CQuestData *v2; // edi@1
  _iobuf *result; // eax@1
  _iobuf *v4; // ebx@1
  int v5; // eax@3
  QUEST_DATA_HEAD *v6; // eax@3
  QUEST_DATA_HEAD *v7; // eax@6
  QUEST_DATA_HEAD *v8; // eax@8
  void *v9; // esi@9
  void *v10; // eax@10
  unsigned int v11; // ST18_4@10
  void *v12; // eax@10
  unsigned int v13; // ST08_4@10
  void *v14; // ST04_4@10
  unsigned int i; // [sp+10h] [bp+8h]@8

  v2 = this;
  CQuestData::ClearBF(this);
  result = fopen(pFN, "rb");
  v4 = result;
  if ( !result )
  {
    v2->m_ReadError = 1;
    return result;
  }
  v5 = _fileno(result);
  _filelength(v5);
  v6 = (QUEST_DATA_HEAD *)operator new(4u);
  v2->m_pDataHead = v6;
  if ( fread(v6, 4u, 1u, v4) != 1 )
  {
    v2->m_ReadError = 2;
ERROR_READ_0:
    CQuestData::ClearBF(v2);
    fclose(v4);
    return 0;
  }
  v7 = v2->m_pDataHead;
  if ( v7->VersionNo != 6 )
  {
    v2->m_ReadError = 3;
    goto ERROR_READ_0;
  }
  v2->m_ppQuestDataArray = (QUEST_DATA **)operator new[](4 * v7->NumOfQuest);
  v8 = v2->m_pDataHead;
  v2->m_ReadError = 4;
  i = 0;
  if ( v8->NumOfQuest > 0u )
  {
    do
    {
      v9 = operator new(0x2A8u);
      memset((char *)v9, 0, 0x2A8u);
      v2->m_ppQuestDataArray[i] = (QUEST_DATA *)v9;
      if ( fread(v9, 0x2A8u, 1u, v4) != 1 )
        goto ERROR_READ_0;
      v10 = operator new[](*((_WORD *)v9 + 330));
      v11 = *((_WORD *)v9 + 332);
      *((_DWORD *)v9 + 167) = v10;
      *((_DWORD *)v9 + 168) = operator new[](v11);
      v12 = operator new[](*((_WORD *)v9 + 331));
      v13 = *((_WORD *)v9 + 330);
      v14 = (void *)*((_DWORD *)v9 + 167);
      *((_DWORD *)v9 + 169) = v12;
      if ( fread(v14, v13, 1u, v4) != 1
        || fread(*((void **)v9 + 168), *((_WORD *)v9 + 332), 1u, v4) != 1
        || fread(*((void **)v9 + 169), *((_WORD *)v9 + 331), 1u, v4) != 1 )
      {
        goto ERROR_READ_0;
      }
      *(_DWORD *)v9 = *((_WORD *)v9 + 330) + *((_WORD *)v9 + 331) + *((_WORD *)v9 + 332) + 680;
    }
    while ( ++i < v2->m_pDataHead->NumOfQuest );
  }
  fclose(v4);
  v2->m_ReadError = 0;
  CQuestData::QuestData_HashDataIn(v2);
  return (_iobuf *)1;
}

//----- (00733DF0) --------------------------------------------------------
_iobuf *__thiscall CQuestData::Read(CQuestData *this, const char *pFN, int bReadonly)
{
  _iobuf *result; // eax@2

  this->m_bReadonly = bReadonly;
  if ( bReadonly )
    result = CQuestData::ReadModeRead(this, pFN);
  else
    result = CQuestData::ReadModeEdit(this, pFN);
  return result;
}

//----- (00733E20) --------------------------------------------------------
void __thiscall PROTO_FRIEND_INFO::PROTO_FRIEND_INFO(PROTO_FRIEND_INFO *this)
{
  *(_QWORD *)&this->charid.n5_code[3] = 0i64;
  *(_QWORD *)&this->charid.n5_code[1] = 0i64;
  this->charid.n5_code[0] = 0;
  *(_QWORD *)&this->map.n3_code[1] = 0i64;
  this->map.n3_code[0] = 0;
}

//----- (00733E40) --------------------------------------------------------
PROTO_FRIEND_INFO *__thiscall PROTO_FRIEND_INFO::operator=(PROTO_FRIEND_INFO *this, PROTO_FRIEND_INFO *__that)
{
  PROTO_FRIEND_INFO *result; // eax@1
  char *v3; // edx@1
  signed int v4; // edi@1

  result = this;
  this->logininfo = __that->logininfo;
  *(_QWORD *)&this->charid.n5_name[0] = *(_QWORD *)&__that->charid.n5_name[0];
  *(_QWORD *)&this->charid.n5_code[2] = *(_QWORD *)&__that->charid.n5_code[2];
  this->charid.n5_code[4] = __that->charid.n5_code[4];
  this->classid = __that->classid;
  this->level = __that->level;
  this->isparty = __that->isparty;
  this->flag = __that->flag;
  *(_QWORD *)&this->map.n3_name[0] = *(_QWORD *)&__that->map.n3_name[0];
  this->map.n3_code[2] = __that->map.n3_code[2];
  v3 = this->statustitle;
  v4 = 32;
  do
  {
    *v3 = v3[(char *)__that - (char *)this];
    ++v3;
    --v4;
  }
  while ( v4 );
  return result;
}

//----- (00733EC0) --------------------------------------------------------
int __thiscall CFriend::Del(CFriend *this, Name5 *pCharID)
{
  int v2; // edi@1
  int v3; // edx@1
  char *v4; // eax@2
  int result; // eax@9

  v2 = this->m_NumOfFriend;
  v3 = 0;
  if ( this->m_NumOfFriend <= 0 )
  {
LABEL_9:
    result = 0;
  }
  else
  {
    v4 = &this->m_Friends[0].charid.n5_name[8];
    while ( *((_DWORD *)v4 - 2) != pCharID->n5_code[0]
         || *((_DWORD *)v4 - 1) != pCharID->n5_code[1]
         || *(_DWORD *)v4 != pCharID->n5_code[2]
         || *((_DWORD *)v4 + 1) != pCharID->n5_code[3]
         || *((_DWORD *)v4 + 2) != pCharID->n5_code[4] )
    {
      ++v3;
      v4 += 72;
      if ( v3 >= v2 )
        goto LABEL_9;
    }
    this->m_NumOfFriend = v2 - 1;
    memcpy((char *)&this->m_Friends[v3], (char *)&this->m_Friends[v3 + 1], 72 * (v2 - 1 - v3));
    result = 1;
  }
  return result;
}

//----- (00733F40) --------------------------------------------------------
PROTO_FRIEND_INFO *__thiscall CFriend::Get(CFriend *this, Name5 *pCharID)
{
  int v2; // edx@1
  char *v3; // eax@2
  PROTO_FRIEND_INFO *result; // eax@9

  v2 = 0;
  if ( this->m_NumOfFriend <= 0 )
  {
LABEL_9:
    result = 0;
  }
  else
  {
    v3 = &this->m_Friends[0].charid.n5_name[8];
    while ( *((_DWORD *)v3 - 2) != pCharID->n5_code[0]
         || *((_DWORD *)v3 - 1) != pCharID->n5_code[1]
         || *(_DWORD *)v3 != pCharID->n5_code[2]
         || *((_DWORD *)v3 + 1) != pCharID->n5_code[3]
         || *((_DWORD *)v3 + 2) != pCharID->n5_code[4] )
    {
      ++v2;
      v3 += 72;
      if ( v2 >= this->m_NumOfFriend )
        goto LABEL_9;
    }
    result = &this->m_Friends[v2];
  }
  return result;
}

//----- (00733FA0) --------------------------------------------------------
int __thiscall CFriend::Login(CFriend *this, Name5 *pCharID)
{
  int v2; // edx@1
  char *v3; // eax@2
  int result; // eax@9

  v2 = 0;
  if ( this->m_NumOfFriend <= 0 )
  {
LABEL_9:
    result = 0;
  }
  else
  {
    v3 = &this->m_Friends[0].charid.n5_name[8];
    while ( *((_DWORD *)v3 - 2) != pCharID->n5_code[0]
         || *((_DWORD *)v3 - 1) != pCharID->n5_code[1]
         || *(_DWORD *)v3 != pCharID->n5_code[2]
         || *((_DWORD *)v3 + 1) != pCharID->n5_code[3]
         || *((_DWORD *)v3 + 2) != pCharID->n5_code[4] )
    {
      ++v2;
      v3 += 72;
      if ( v2 >= this->m_NumOfFriend )
        goto LABEL_9;
    }
    *(_DWORD *)&this->m_Friends[v2].logininfo |= 1u;
    result = 1;
  }
  return result;
}

//----- (00734010) --------------------------------------------------------
int __thiscall CFriend::MapChange(CFriend *this, Name5 charid, Name3 *pMapName)
{
  int v3; // edx@1
  char *v4; // eax@2
  int result; // eax@7
  char *v6; // eax@8

  v3 = 0;
  if ( this->m_NumOfFriend <= 0 )
  {
LABEL_7:
    result = 0;
  }
  else
  {
    v4 = &this->m_Friends[0].charid.n5_name[8];
    while ( __PAIR__(*((_DWORD *)v4 - 1), *((_DWORD *)v4 - 2)) != *(_QWORD *)&charid.n5_name[0]
         || *(_QWORD *)v4 != *(_QWORD *)&charid.n5_code[2]
         || *((_DWORD *)v4 + 2) != charid.n5_code[4] )
    {
      ++v3;
      v4 += 72;
      if ( v3 >= this->m_NumOfFriend )
        goto LABEL_7;
    }
    v6 = this->m_Friends[v3].map.n3_name;
    *(_QWORD *)v6 = *(_QWORD *)&pMapName->n3_code[0];
    *((_DWORD *)v6 + 2) = pMapName->n3_code[2];
    result = 1;
  }
  return result;
}

//----- (00734080) --------------------------------------------------------
int __thiscall CFriend::PartyChange(CFriend *this, Name5 charid, char IsParty)
{
  int v3; // edx@1
  char *v4; // eax@2
  int result; // eax@7

  v3 = 0;
  if ( this->m_NumOfFriend <= 0 )
  {
LABEL_7:
    result = 0;
  }
  else
  {
    v4 = &this->m_Friends[0].charid.n5_name[8];
    while ( __PAIR__(*((_DWORD *)v4 - 1), *((_DWORD *)v4 - 2)) != *(_QWORD *)&charid.n5_name[0]
         || *(_QWORD *)v4 != *(_QWORD *)&charid.n5_code[2]
         || *((_DWORD *)v4 + 2) != charid.n5_code[4] )
    {
      ++v3;
      v4 += 72;
      if ( v3 >= this->m_NumOfFriend )
        goto LABEL_7;
    }
    this->m_Friends[v3].isparty = IsParty;
    result = 1;
  }
  return result;
}

//----- (007340E0) --------------------------------------------------------
int __thiscall CFriend::LevelChange(CFriend *this, Name5 charid, char Level)
{
  int v3; // edx@1
  char *v4; // eax@2
  int result; // eax@7

  v3 = 0;
  if ( this->m_NumOfFriend <= 0 )
  {
LABEL_7:
    result = 0;
  }
  else
  {
    v4 = &this->m_Friends[0].charid.n5_name[8];
    while ( __PAIR__(*((_DWORD *)v4 - 1), *((_DWORD *)v4 - 2)) != *(_QWORD *)&charid.n5_name[0]
         || *(_QWORD *)v4 != *(_QWORD *)&charid.n5_code[2]
         || *((_DWORD *)v4 + 2) != charid.n5_code[4] )
    {
      ++v3;
      v4 += 72;
      if ( v3 >= this->m_NumOfFriend )
        goto LABEL_7;
    }
    this->m_Friends[v3].level = Level;
    result = 1;
  }
  return result;
}

//----- (00734140) --------------------------------------------------------
void __thiscall CFriend::CFriend(CFriend *this)
{
  CFriend *v1; // esi@1

  v1 = this;
  `eh vector constructor iterator'(
    this->m_Friends,
    0x48u,
    100,
    (void (__thiscall *)(void *))PROTO_FRIEND_INFO::PROTO_FRIEND_INFO,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
  v1->m_NumOfFriend = 0;
}

//----- (00734170) --------------------------------------------------------
void __thiscall CFriend::~CFriend(CFriend *this)
{
  this->m_NumOfFriend = 0;
  `eh vector destructor iterator'(
    this->m_Friends,
    0x48u,
    100,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
}

//----- (00734190) --------------------------------------------------------
int __thiscall CFriend::Add(CFriend *this, PROTO_FRIEND_INFO *pInfo)
{
  CFriend *v2; // esi@1
  int v3; // edi@1
  int result; // eax@2
  int v5; // ecx@3
  int v6; // eax@4

  v2 = this;
  v3 = this->m_NumOfFriend;
  if ( this->m_NumOfFriend <= 100 )
  {
    v5 = 0;
    if ( v3 <= 0 )
    {
LABEL_11:
      if ( v3 < 100 )
      {
        PROTO_FRIEND_INFO::operator=(&v2->m_Friends[v3], pInfo);
        ++v2->m_NumOfFriend;
        result = 1;
      }
      else
      {
        result = 0;
      }
    }
    else
    {
      v6 = (int)&v2->m_Friends[0].charid.n5_code[2];
      while ( *(_DWORD *)(v6 - 8) != pInfo->charid.n5_code[0]
           || *(_DWORD *)(v6 - 4) != pInfo->charid.n5_code[1]
           || *(_DWORD *)v6 != pInfo->charid.n5_code[2]
           || *(_DWORD *)(v6 + 4) != pInfo->charid.n5_code[3]
           || *(_DWORD *)(v6 + 8) != pInfo->charid.n5_code[4] )
      {
        ++v5;
        v6 += 72;
        if ( v5 >= v3 )
          goto LABEL_11;
      }
      PROTO_FRIEND_INFO::operator=(&v2->m_Friends[v5], pInfo);
      result = 2;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00734230) --------------------------------------------------------
int __thiscall CFriend::Logout(CFriend *this, Name5 *pCharID)
{
  CFriend *v2; // edi@1
  int v3; // edx@1
  int v4; // esi@1
  char *v5; // eax@2
  int result; // eax@9
  _SYSTEMTIME SystemTime; // [sp+Ch] [bp-14h]@11

  v2 = this;
  v3 = this->m_NumOfFriend;
  v4 = 0;
  if ( this->m_NumOfFriend <= 0 )
    goto LABEL_9;
  v5 = &this->m_Friends[0].charid.n5_name[8];
  while ( *((_DWORD *)v5 - 2) != pCharID->n5_code[0]
       || *((_DWORD *)v5 - 1) != pCharID->n5_code[1]
       || *(_DWORD *)v5 != pCharID->n5_code[2]
       || *((_DWORD *)v5 + 1) != pCharID->n5_code[3]
       || *((_DWORD *)v5 + 2) != pCharID->n5_code[4] )
  {
    ++v4;
    v5 += 72;
    if ( v4 >= v3 )
      goto LABEL_9;
  }
  if ( v4 >= v3 )
  {
LABEL_9:
    result = 0;
  }
  else
  {
    GetLocalTime(&SystemTime);
    v2->m_Friends[v4].logininfo = (PROTO_FRIEND_DATE)(*(_DWORD *)&v2->m_Friends[v4].logininfo & 0xFC000000 | 2 * (SystemTime.wYear & 0x7FF | ((SystemTime.wMonth & 0xF | 16 * (SystemTime.wDay & 0x1F | 32 * (SystemTime.wHour & 0x1F))) << 11)));
    result = 1;
  }
  return result;
}

//----- (00734300) --------------------------------------------------------
void __thiscall CHolyPromise::ClearUp(CHolyPromise *this)
{
  CHolyPromise *v1; // ebx@1
  tm tmDeleteTime; // [sp+Ch] [bp-28h]@1
  int DeleteTime; // [sp+30h] [bp-4h]@1

  v1 = this;
  *(_QWORD *)&this->m_HolyPromisesUp.PromiseCharID.n5_code[3] = 0i64;
  *(_QWORD *)&this->m_HolyPromisesUp.PromiseCharID.n5_code[1] = 0i64;
  this->m_HolyPromisesUp.PromiseCharID.n5_code[0] = 0;
  strncpy(this->m_HolyPromisesUp.PromiseCharID.n5_name, (char *)&unk_96F8EB, 0x14u);
  DeleteTime = _time32(0);
  qmemcpy(&tmDeleteTime, _localtime32(&DeleteTime), sizeof(tmDeleteTime));
  v1->m_HolyPromisesUp.LogonInfo = (PROTO_HOLY_PROMISE_DATE)(*(_DWORD *)&v1->m_HolyPromisesUp.LogonInfo & 0xFC000000 | 2 * (tmDeleteTime.tm_year & 0x7FF | ((tmDeleteTime.tm_mon & 0xF | 16 * (tmDeleteTime.tm_mday & 0x1F | 32 * (tmDeleteTime.tm_hour & 0x1F))) << 11)));
}

//----- (00734390) --------------------------------------------------------
void __thiscall CHolyPromise::ClearMember(CHolyPromise *this)
{
  this->m_HolyPromisesMemberCount = 0;
}

//----- (007343A0) --------------------------------------------------------
int __stdcall CHolyPromise::IsDelPenlety(PROTO_HOLY_PROMISE_DATE *pLoginInfo)
{
  unsigned int v2; // ecx@1
  int result; // eax@2
  int v4; // esi@3
  tm tmLastConnect; // [sp+0h] [bp-28h]@3

  v2 = (unsigned int)*pLoginInfo;
  if ( *(_DWORD *)pLoginInfo & 1 )
  {
    result = 1;
  }
  else
  {
    tmLastConnect.tm_sec = 0;
    tmLastConnect.tm_min = 0;
    tmLastConnect.tm_wday = 0;
    tmLastConnect.tm_yday = 0;
    tmLastConnect.tm_isdst = 0;
    tmLastConnect.tm_year = ((v2 >> 1) & 0x7FF) - 1900;
    tmLastConnect.tm_hour = ((v2 >> 21) & 0x1F) + 120;
    tmLastConnect.tm_mon = ((unsigned __int16)v2 >> 12) - 1;
    tmLastConnect.tm_mday = (v2 >> 16) & 0x1F;
    v4 = _mktime32(&tmLastConnect);
    result = v4 > _time32(0);
  }
  return result;
}

//----- (00734460) --------------------------------------------------------
int __thiscall CHolyPromise::SetMember(CHolyPromise *this, PROTO_HOLY_PROMISE_INFO *pInfo)
{
  CHolyPromise *v2; // edi@1
  int v3; // ecx@1
  int result; // eax@2
  int v5; // esi@3
  int v6; // edx@4
  int v7; // ecx@13
  int v8; // edx@14

  v2 = this;
  v3 = this->m_HolyPromisesMemberCount;
  if ( v3 <= 20 )
  {
    v5 = 0;
    if ( v3 <= 0 )
    {
LABEL_11:
      if ( v3 < 20 )
      {
        v8 = (int)&v2->m_HolyPromisesMember[v3];
        *(_QWORD *)v8 = *(_QWORD *)&pInfo->PromiseCharID.n5_name[0];
        *(_QWORD *)(v8 + 8) = *(_QWORD *)&pInfo->PromiseCharID.n5_code[2];
        *(_DWORD *)(v8 + 16) = pInfo->PromiseCharID.n5_code[4];
        *(PROTO_HOLY_PROMISE_DATE *)(v8 + 20) = pInfo->LogonInfo;
        *(_BYTE *)(v8 + 24) = pInfo->Level;
        *(_BYTE *)(v8 + 25) = pInfo->Flags;
        ++v2->m_HolyPromisesMemberCount;
        result = 1;
      }
      else
      {
        result = 0;
      }
    }
    else
    {
      v6 = (int)&v2->m_HolyPromisesMember[0].PromiseCharID.n5_code[2];
      while ( *(_DWORD *)(v6 - 8) != pInfo->PromiseCharID.n5_code[0]
           || *(_DWORD *)(v6 - 4) != pInfo->PromiseCharID.n5_code[1]
           || *(_DWORD *)v6 != pInfo->PromiseCharID.n5_code[2]
           || *(_DWORD *)(v6 + 4) != pInfo->PromiseCharID.n5_code[3]
           || *(_DWORD *)(v6 + 8) != pInfo->PromiseCharID.n5_code[4] )
      {
        ++v5;
        v6 += 26;
        if ( v5 >= v3 )
          goto LABEL_11;
      }
      v7 = (int)&v2->m_HolyPromisesMember[v5];
      *(_QWORD *)v7 = *(_QWORD *)&pInfo->PromiseCharID.n5_name[0];
      *(_QWORD *)(v7 + 8) = *(_QWORD *)&pInfo->PromiseCharID.n5_code[2];
      *(_DWORD *)(v7 + 16) = pInfo->PromiseCharID.n5_code[4];
      *(PROTO_HOLY_PROMISE_DATE *)(v7 + 20) = pInfo->LogonInfo;
      *(_BYTE *)(v7 + 24) = pInfo->Level;
      *(_BYTE *)(v7 + 25) = pInfo->Flags;
      result = 2;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00734550) --------------------------------------------------------
int __thiscall CHolyPromise::DelMember(CHolyPromise *this, Name5 *pCharID)
{
  int v2; // edi@1
  int v3; // edx@1
  char *v4; // eax@2
  int result; // eax@9

  v2 = this->m_HolyPromisesMemberCount;
  v3 = 0;
  if ( v2 <= 0 )
  {
LABEL_9:
    result = 0;
  }
  else
  {
    v4 = &this->m_HolyPromisesMember[0].PromiseCharID.n5_name[8];
    while ( *((_DWORD *)v4 - 2) != pCharID->n5_code[0]
         || *((_DWORD *)v4 - 1) != pCharID->n5_code[1]
         || *(_DWORD *)v4 != pCharID->n5_code[2]
         || *((_DWORD *)v4 + 1) != pCharID->n5_code[3]
         || *((_DWORD *)v4 + 2) != pCharID->n5_code[4] )
    {
      ++v3;
      v4 += 26;
      if ( v3 >= v2 )
        goto LABEL_9;
    }
    this->m_HolyPromisesMemberCount = v2 - 1;
    memcpy(
      this->m_HolyPromisesMember[v3].PromiseCharID.n5_name,
      this->m_HolyPromisesMember[v3 + 1].PromiseCharID.n5_name,
      26 * (v2 - 1 - v3));
    result = 1;
  }
  return result;
}

//----- (007345D0) --------------------------------------------------------
CHolyPromise *__thiscall CHolyPromise::Get(CHolyPromise *this, Name5 *pCharID, int *pBFIndex)
{
  CHolyPromise *result; // eax@1
  int v4; // ecx@7
  int v5; // esi@7
  char *v6; // edx@8

  result = this;
  if ( this->m_HolyPromisesUp.PromiseCharID.n5_code[0] != pCharID->n5_code[0]
    || this->m_HolyPromisesUp.PromiseCharID.n5_code[1] != pCharID->n5_code[1]
    || this->m_HolyPromisesUp.PromiseCharID.n5_code[2] != pCharID->n5_code[2]
    || this->m_HolyPromisesUp.PromiseCharID.n5_code[3] != pCharID->n5_code[3]
    || this->m_HolyPromisesUp.PromiseCharID.n5_code[4] != pCharID->n5_code[4] )
  {
    v4 = this->m_HolyPromisesMemberCount;
    v5 = 0;
    if ( v4 <= 0 )
    {
LABEL_15:
      result = 0;
    }
    else
    {
      v6 = &result->m_HolyPromisesMember[0].PromiseCharID.n5_name[8];
      while ( *((_DWORD *)v6 - 2) != pCharID->n5_code[0]
           || *((_DWORD *)v6 - 1) != pCharID->n5_code[1]
           || *(_DWORD *)v6 != pCharID->n5_code[2]
           || *((_DWORD *)v6 + 1) != pCharID->n5_code[3]
           || *((_DWORD *)v6 + 2) != pCharID->n5_code[4] )
      {
        ++v5;
        v6 += 26;
        if ( v5 >= v4 )
          goto LABEL_15;
      }
      *pBFIndex = v5;
      result = (CHolyPromise *)((char *)result + 26 * v5 + 32);
    }
  }
  else
  {
    *pBFIndex = -1;
  }
  return result;
}

//----- (00734670) --------------------------------------------------------
int __thiscall CHolyPromise::Del(CHolyPromise *this, Name5 *pCharID)
{
  int result; // eax@6

  if ( this->m_HolyPromisesUp.PromiseCharID.n5_code[0] != pCharID->n5_code[0]
    || this->m_HolyPromisesUp.PromiseCharID.n5_code[1] != pCharID->n5_code[1]
    || this->m_HolyPromisesUp.PromiseCharID.n5_code[2] != pCharID->n5_code[2]
    || this->m_HolyPromisesUp.PromiseCharID.n5_code[3] != pCharID->n5_code[3]
    || this->m_HolyPromisesUp.PromiseCharID.n5_code[4] != pCharID->n5_code[4] )
  {
    result = CHolyPromise::DelMember(this, pCharID);
  }
  else
  {
    CHolyPromise::ClearUp(this);
    result = 1;
  }
  return result;
}

//----- (007346C0) --------------------------------------------------------
int __stdcall CHolyPromise::Logout(PROTO_HOLY_PROMISE_INFO *pInfo)
{
  int result; // eax@2
  _SYSTEMTIME LocalTime; // [sp+4h] [bp-14h]@3

  if ( pInfo )
  {
    GetLocalTime(&LocalTime);
    pInfo->LogonInfo = (PROTO_HOLY_PROMISE_DATE)(*(_DWORD *)&pInfo->LogonInfo & 0xFC000000 | 2
                                                                                           * (LocalTime.wYear & 0x7FF | ((LocalTime.wMonth & 0xF | 16 * (LocalTime.wDay & 0x1F | 32 * (LocalTime.wHour & 0x1F))) << 11)));
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00734750) --------------------------------------------------------
void __thiscall CHolyPromise::SetUp(CHolyPromise *this, PROTO_HOLY_PROMISE_INFO *pInfo)
{
  *(_QWORD *)&this->m_HolyPromisesUp.PromiseCharID.n5_name[0] = *(_QWORD *)&pInfo->PromiseCharID.n5_name[0];
  *(_QWORD *)&this->m_HolyPromisesUp.PromiseCharID.n5_code[2] = *(_QWORD *)&pInfo->PromiseCharID.n5_code[2];
  this->m_HolyPromisesUp.PromiseCharID.n5_code[4] = pInfo->PromiseCharID.n5_code[4];
  this->m_HolyPromisesUp.LogonInfo = pInfo->LogonInfo;
  this->m_HolyPromisesUp.Level = pInfo->Level;
  this->m_HolyPromisesUp.Flags = pInfo->Flags;
}

//----- (00734790) --------------------------------------------------------
int __thiscall CHolyPromise::Add(CHolyPromise *this, PROTO_HOLY_PROMISE_INFO *pInfo)
{
  int result; // eax@6

  if ( this->m_HolyPromisesUp.PromiseCharID.n5_code[0] != pInfo->PromiseCharID.n5_code[0]
    || this->m_HolyPromisesUp.PromiseCharID.n5_code[1] != pInfo->PromiseCharID.n5_code[1]
    || this->m_HolyPromisesUp.PromiseCharID.n5_code[2] != pInfo->PromiseCharID.n5_code[2]
    || this->m_HolyPromisesUp.PromiseCharID.n5_code[3] != pInfo->PromiseCharID.n5_code[3]
    || this->m_HolyPromisesUp.PromiseCharID.n5_code[4] != pInfo->PromiseCharID.n5_code[4] )
  {
    result = CHolyPromise::SetMember(this, pInfo) != 0;
  }
  else
  {
    *(_QWORD *)&this->m_HolyPromisesUp.PromiseCharID.n5_name[0] = *(_QWORD *)&pInfo->PromiseCharID.n5_name[0];
    *(_QWORD *)&this->m_HolyPromisesUp.PromiseCharID.n5_code[2] = *(_QWORD *)&pInfo->PromiseCharID.n5_code[2];
    this->m_HolyPromisesUp.PromiseCharID.n5_code[4] = pInfo->PromiseCharID.n5_code[4];
    this->m_HolyPromisesUp.LogonInfo = pInfo->LogonInfo;
    this->m_HolyPromisesUp.Level = pInfo->Level;
    this->m_HolyPromisesUp.Flags = pInfo->Flags;
    result = 1;
  }
  return result;
}

//----- (00734810) --------------------------------------------------------
int __thiscall CHolyPromise::Add(CHolyPromise *this, PROTO_NC_HOLY_PROMISE_LIST_CMD *pInfo)
{
  PROTO_NC_HOLY_PROMISE_LIST_CMD *v2; // esi@1
  CHolyPromise *v3; // edi@1
  signed int v4; // ebx@1
  PROTO_NC_HOLY_PROMISE_LIST_CMD *pInfoa; // [sp+14h] [bp+8h]@4

  v2 = pInfo;
  v3 = this;
  *(_QWORD *)&this->m_HolyPromisesUp.PromiseCharID.n5_name[0] = *(_QWORD *)&pInfo->UpInfo.PromiseCharID.n5_name[0];
  *(_QWORD *)&this->m_HolyPromisesUp.PromiseCharID.n5_code[2] = *(_QWORD *)&pInfo->UpInfo.PromiseCharID.n5_code[2];
  this->m_HolyPromisesUp.PromiseCharID.n5_code[4] = pInfo->UpInfo.PromiseCharID.n5_code[4];
  this->m_HolyPromisesUp.LogonInfo = pInfo->UpInfo.LogonInfo;
  this->m_HolyPromisesUp.Level = pInfo->UpInfo.Level;
  this->m_HolyPromisesUp.Flags = pInfo->UpInfo.Flags;
  v4 = 0;
  if ( pInfo->nPart & 1 )
    this->m_HolyPromisesMemberCount = 0;
  if ( pInfo->MemberCount > 0u )
  {
    pInfoa = pInfo + 1;
    do
    {
      if ( !CHolyPromise::SetMember(v3, &pInfoa->UpInfo) )
        break;
      pInfoa = (PROTO_NC_HOLY_PROMISE_LIST_CMD *)((char *)pInfoa + 26);
      ++v4;
    }
    while ( v4 < v2->MemberCount );
  }
  return 1;
}

//----- (00734890) --------------------------------------------------------
int __thiscall CHolyPromise::Login(CHolyPromise *this, Name5 *pCharID)
{
  int result; // eax@6
  int v3; // edx@7
  char *v4; // eax@8
  int v5; // edx@16

  if ( this->m_HolyPromisesUp.PromiseCharID.n5_code[0] != pCharID->n5_code[0]
    || this->m_HolyPromisesUp.PromiseCharID.n5_code[1] != pCharID->n5_code[1]
    || this->m_HolyPromisesUp.PromiseCharID.n5_code[2] != pCharID->n5_code[2]
    || this->m_HolyPromisesUp.PromiseCharID.n5_code[3] != pCharID->n5_code[3]
    || this->m_HolyPromisesUp.PromiseCharID.n5_code[4] != pCharID->n5_code[4] )
  {
    v3 = 0;
    if ( this->m_HolyPromisesMemberCount <= 0 )
      goto LABEL_15;
    v4 = &this->m_HolyPromisesMember[0].PromiseCharID.n5_name[8];
    while ( *((_DWORD *)v4 - 2) != pCharID->n5_code[0]
         || *((_DWORD *)v4 - 1) != pCharID->n5_code[1]
         || *(_DWORD *)v4 != pCharID->n5_code[2]
         || *((_DWORD *)v4 + 1) != pCharID->n5_code[3]
         || *((_DWORD *)v4 + 2) != pCharID->n5_code[4] )
    {
      ++v3;
      v4 += 26;
      if ( v3 >= this->m_HolyPromisesMemberCount )
        goto LABEL_15;
    }
    v5 = v3;
    if ( (CHolyPromise *)((char *)this + v5 * 26) == (CHolyPromise *)-32 )
    {
LABEL_15:
      result = 0;
    }
    else
    {
      *(_DWORD *)&this->m_HolyPromisesMember[v5].LogonInfo |= 1u;
      result = 1;
    }
  }
  else
  {
    result = 1;
    *(_DWORD *)&this->m_HolyPromisesUp.LogonInfo |= 1u;
  }
  return result;
}

//----- (00734930) --------------------------------------------------------
int __thiscall CHolyPromise::Logout(CHolyPromise *this, Name5 *pCharID)
{
  int result; // eax@6
  int v3; // edi@7
  int v4; // edx@7
  char *v5; // eax@8

  if ( this->m_HolyPromisesUp.PromiseCharID.n5_code[0] != pCharID->n5_code[0]
    || this->m_HolyPromisesUp.PromiseCharID.n5_code[1] != pCharID->n5_code[1]
    || this->m_HolyPromisesUp.PromiseCharID.n5_code[2] != pCharID->n5_code[2]
    || this->m_HolyPromisesUp.PromiseCharID.n5_code[3] != pCharID->n5_code[3]
    || this->m_HolyPromisesUp.PromiseCharID.n5_code[4] != pCharID->n5_code[4] )
  {
    v3 = this->m_HolyPromisesMemberCount;
    v4 = 0;
    if ( v3 <= 0 )
    {
LABEL_15:
      result = 0;
    }
    else
    {
      v5 = &this->m_HolyPromisesMember[0].PromiseCharID.n5_name[8];
      while ( *((_DWORD *)v5 - 2) != pCharID->n5_code[0]
           || *((_DWORD *)v5 - 1) != pCharID->n5_code[1]
           || *(_DWORD *)v5 != pCharID->n5_code[2]
           || *((_DWORD *)v5 + 1) != pCharID->n5_code[3]
           || *((_DWORD *)v5 + 2) != pCharID->n5_code[4] )
      {
        ++v4;
        v5 += 26;
        if ( v4 >= v3 )
          goto LABEL_15;
      }
      result = CHolyPromise::Logout(&this->m_HolyPromisesMember[v4]);
    }
  }
  else
  {
    result = CHolyPromise::Logout(&this->m_HolyPromisesUp);
  }
  return result;
}

//----- (007349D0) --------------------------------------------------------
int __thiscall CHolyPromise::LevelChange(CHolyPromise *this, Name5 *pCharID, char Level)
{
  int result; // eax@6
  int v4; // edx@7
  char *v5; // eax@8
  int v6; // edx@16

  if ( this->m_HolyPromisesUp.PromiseCharID.n5_code[0] != pCharID->n5_code[0]
    || this->m_HolyPromisesUp.PromiseCharID.n5_code[1] != pCharID->n5_code[1]
    || this->m_HolyPromisesUp.PromiseCharID.n5_code[2] != pCharID->n5_code[2]
    || this->m_HolyPromisesUp.PromiseCharID.n5_code[3] != pCharID->n5_code[3]
    || this->m_HolyPromisesUp.PromiseCharID.n5_code[4] != pCharID->n5_code[4] )
  {
    v4 = 0;
    if ( this->m_HolyPromisesMemberCount <= 0 )
      goto LABEL_15;
    v5 = &this->m_HolyPromisesMember[0].PromiseCharID.n5_name[8];
    while ( *((_DWORD *)v5 - 2) != pCharID->n5_code[0]
         || *((_DWORD *)v5 - 1) != pCharID->n5_code[1]
         || *(_DWORD *)v5 != pCharID->n5_code[2]
         || *((_DWORD *)v5 + 1) != pCharID->n5_code[3]
         || *((_DWORD *)v5 + 2) != pCharID->n5_code[4] )
    {
      ++v4;
      v5 += 26;
      if ( v4 >= this->m_HolyPromisesMemberCount )
        goto LABEL_15;
    }
    v6 = v4;
    if ( (CHolyPromise *)((char *)this + v6 * 26) == (CHolyPromise *)-32 )
    {
LABEL_15:
      result = 0;
    }
    else
    {
      this->m_HolyPromisesMember[v6].Level = Level;
      result = 1;
    }
  }
  else
  {
    this->m_HolyPromisesUp.Level = Level;
    result = 1;
  }
  return result;
}

//----- (00734A80) --------------------------------------------------------
void __thiscall CHolyPromise::CHolyPromise(CHolyPromise *this)
{
  CHolyPromise *v1; // esi@1

  v1 = this;
  *(_QWORD *)&this->m_HolyPromisesUp.PromiseCharID.n5_code[3] = 0i64;
  *(_QWORD *)&this->m_HolyPromisesUp.PromiseCharID.n5_code[1] = 0i64;
  this->m_HolyPromisesUp.PromiseCharID.n5_code[0] = 0;
  `eh vector constructor iterator'(
    this->m_HolyPromisesMember,
    0x1Au,
    20,
    (void (__thiscall *)(void *))Name5::Name5,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
  CHolyPromise::ClearUp(v1);
  v1->m_HolyPromisesMemberCount = 0;
}

//----- (00734AC0) --------------------------------------------------------
void __thiscall CHolyPromise::~CHolyPromise(CHolyPromise *this)
{
  CHolyPromise *v1; // esi@1

  v1 = this;
  CHolyPromise::ClearUp(this);
  v1->m_HolyPromisesMemberCount = 0;
  `eh vector destructor iterator'(
    v1->m_HolyPromisesMember,
    0x1Au,
    20,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
}

//----- (00734AF0) --------------------------------------------------------
PROTO_NC_PARTY_FINDER_INFO *__thiscall PROTO_NC_PARTY_FINDER_INFO::operator=(PROTO_NC_PARTY_FINDER_INFO *this, PROTO_NC_PARTY_FINDER_INFO *__that)
{
  PROTO_NC_PARTY_FINDER_INFO *result; // eax@1
  char *v3; // edx@1
  signed int v4; // edi@1

  result = this;
  this->nPastSecond = __that->nPastSecond;
  this->dRegistTime = __that->dRegistTime;
  *(_QWORD *)&this->sCharID.n5_name[0] = *(_QWORD *)&__that->sCharID.n5_name[0];
  *(_QWORD *)&this->sCharID.n5_code[2] = *(_QWORD *)&__that->sCharID.n5_code[2];
  this->sCharID.n5_code[4] = __that->sCharID.n5_code[4];
  v3 = this->sMsg;
  v4 = 128;
  do
  {
    *v3 = v3[(char *)__that - (char *)this];
    ++v3;
    --v4;
  }
  while ( v4 );
  return result;
}

//----- (00734B40) --------------------------------------------------------
CPartyFinder::PARTY_FINDER_INFO_LIST *__thiscall CPartyFinder::Find(CPartyFinder *this, Name5 *psCharID)
{
  CPartyFinder::PARTY_FINDER_INFO_LIST *result; // eax@1

  result = this->m_pListTop;
  if ( result )
  {
    while ( result->Info.sCharID.n5_code[0] != psCharID->n5_code[0]
         || result->Info.sCharID.n5_code[1] != psCharID->n5_code[1]
         || result->Info.sCharID.n5_code[2] != psCharID->n5_code[2]
         || result->Info.sCharID.n5_code[3] != psCharID->n5_code[3]
         || result->Info.sCharID.n5_code[4] != psCharID->n5_code[4] )
    {
      result = result->pLinkDn;
      if ( !result )
        goto LABEL_8;
    }
  }
  else
  {
LABEL_8:
    result = 0;
  }
  return result;
}

//----- (00734B90) --------------------------------------------------------
void __thiscall CPartyFinder::DelNode(CPartyFinder *this, CPartyFinder::PARTY_FINDER_INFO_LIST *pList)
{
  CPartyFinder *v2; // esi@1
  CPartyFinder::PARTY_FINDER_INFO_LIST *v3; // ecx@2
  CPartyFinder::PARTY_FINDER_INFO_LIST *v4; // ecx@5

  v2 = this;
  if ( pList )
  {
    v3 = pList->pLinkUp;
    if ( v3 )
      v3->pLinkDn = pList->pLinkDn;
    else
      v2->m_pListTop = pList->pLinkDn;
    v4 = pList->pLinkDn;
    if ( v4 )
    {
      v4->pLinkUp = pList->pLinkUp;
      operator delete(pList);
      --v2->m_NumOfInfo;
    }
    else
    {
      v2->m_pListBottom = pList->pLinkUp;
      operator delete(pList);
      --v2->m_NumOfInfo;
    }
  }
}

//----- (00734C00) --------------------------------------------------------
int __thiscall CPartyFinder::Add(CPartyFinder *this, PROTO_NC_PARTY_FINDER_INFO *pInfo)
{
  CPartyFinder *v2; // esi@1
  CPartyFinder::PARTY_FINDER_INFO_LIST *v3; // eax@1
  int result; // eax@2
  void *v5; // eax@3
  PROTO_NC_PARTY_FINDER_INFO *v6; // edi@4
  CPartyFinder::PARTY_FINDER_INFO_LIST *v7; // eax@8

  v2 = this;
  v3 = CPartyFinder::Find(this, &pInfo->sCharID);
  if ( v3 )
  {
    PROTO_NC_PARTY_FINDER_INFO::operator=(&v3->Info, pInfo);
    result = 1;
  }
  else
  {
    v5 = operator new(0xA4u);
    if ( v5 )
    {
      *(_DWORD *)((char *)v5 + 22) = 0;
      *(_DWORD *)((char *)v5 + 18) = 0;
      *(_DWORD *)((char *)v5 + 14) = 0;
      *(_DWORD *)((char *)v5 + 10) = 0;
      *(_DWORD *)((char *)v5 + 6) = 0;
      v6 = (PROTO_NC_PARTY_FINDER_INFO *)v5;
    }
    else
    {
      v6 = 0;
    }
    v6[1].sCharID.n5_code[0] = 0;
    v6[1].dRegistTime = (int)v2->m_pListBottom;
    PROTO_NC_PARTY_FINDER_INFO::operator=(v6, pInfo);
    if ( !v2->m_pListTop )
      v2->m_pListTop = (CPartyFinder::PARTY_FINDER_INFO_LIST *)v6;
    v7 = v2->m_pListBottom;
    if ( v7 )
      v7->pLinkDn = (CPartyFinder::PARTY_FINDER_INFO_LIST *)v6;
    ++v2->m_NumOfInfo;
    v2->m_pListBottom = (CPartyFinder::PARTY_FINDER_INFO_LIST *)v6;
    result = 1;
  }
  return result;
}

//----- (00734CA0) --------------------------------------------------------
CPartyFinder::PARTY_FINDER_INFO_LIST *__thiscall CPartyFinder::Del(CPartyFinder *this, Name5 *psCharID)
{
  CPartyFinder *v2; // esi@1
  CPartyFinder::PARTY_FINDER_INFO_LIST *result; // eax@1

  v2 = this;
  result = CPartyFinder::Find(this, psCharID);
  if ( result )
  {
    CPartyFinder::DelNode(v2, result);
    result = (CPartyFinder::PARTY_FINDER_INFO_LIST *)1;
  }
  return result;
}

//----- (00734CD0) --------------------------------------------------------
void __thiscall CPartyFinder::Clear(CPartyFinder *this)
{
  CPartyFinder *v1; // esi@1
  CPartyFinder::PARTY_FINDER_INFO_LIST *v2; // eax@2

  v1 = this;
  while ( v1->m_pListTop )
  {
    v2 = v1->m_pListTop;
    v1->m_pListTop = v2->pLinkDn;
    if ( v2 )
      operator delete(v2);
  }
  v1->m_NumOfInfo = 0;
  v1->m_pListBottom = 0;
}

//----- (00734D20) --------------------------------------------------------
void __thiscall GUILD_MEMBER_CLIENT::GUILD_MEMBER_CLIENT(GUILD_MEMBER_CLIENT *this)
{
  *(_QWORD *)&this->sName.n5_code[3] = 0i64;
  *(_QWORD *)&this->sName.n5_code[1] = 0i64;
  this->sName.n5_code[0] = 0;
  *(_QWORD *)&this->sMap.n3_code[1] = 0i64;
  this->sMap.n3_code[0] = 0;
}

//----- (00734D40) --------------------------------------------------------
void __thiscall CGuildMember::~CGuildMember(CGuildMember *this)
{
  this->vfptr = (CGuildMemberVtbl *)CGuildMember::`vftable';
  `eh vector destructor iterator'(
    this->m_Members,
    0x6Eu,
    400,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
}
// 9CF1F4: using guessed type int (__stdcall *CGuildMember::`vftable'[6])(int);

//----- (00734D60) --------------------------------------------------------
int __thiscall CGuildMember::GetIndex(CGuildMember *this, Name5 *pMemberName)
{
  int v2; // esi@1
  int result; // eax@1
  char *v4; // ecx@2

  v2 = this->m_NumOfMembers;
  result = 0;
  if ( v2 <= 0 )
  {
LABEL_9:
    result = -1;
  }
  else
  {
    v4 = &this->m_Members[0].sName.n5_name[8];
    while ( *((_DWORD *)v4 - 2) != pMemberName->n5_code[0]
         || *((_DWORD *)v4 - 1) != pMemberName->n5_code[1]
         || *(_DWORD *)v4 != pMemberName->n5_code[2]
         || *((_DWORD *)v4 + 1) != pMemberName->n5_code[3]
         || *((_DWORD *)v4 + 2) != pMemberName->n5_code[4] )
    {
      ++result;
      v4 += 110;
      if ( result >= v2 )
        goto LABEL_9;
    }
  }
  return result;
}

//----- (00734DB0) --------------------------------------------------------
GUILD_MEMBER_CLIENT *__thiscall GUILD_MEMBER_CLIENT::operator=(GUILD_MEMBER_CLIENT *this, GUILD_MEMBER_CLIENT *__that)
{
  GUILD_MEMBER_CLIENT *result; // eax@1
  char *v3; // esi@1
  signed int v4; // edx@1

  result = this;
  *(_QWORD *)&this->sName.n5_name[0] = *(_QWORD *)&__that->sName.n5_name[0];
  *(_QWORD *)&this->sName.n5_code[2] = *(_QWORD *)&__that->sName.n5_code[2];
  this->sName.n5_code[4] = __that->sName.n5_code[4];
  this->nGrade = __that->nGrade;
  this->nFlags = __that->nFlags;
  this->nExpRatio = __that->nExpRatio;
  v3 = this->sIntro;
  v4 = 64;
  do
  {
    *v3 = v3[(char *)__that - (char *)this];
    ++v3;
    --v4;
  }
  while ( v4 );
  this->dLogonInfo = __that->dLogonInfo;
  this->nClassID = __that->nClassID;
  this->nLevel = __that->nLevel;
  this->bIsParty = __that->bIsParty;
  *(_QWORD *)&this->sMap.n3_name[0] = *(_QWORD *)&__that->sMap.n3_name[0];
  this->sMap.n3_code[2] = __that->sMap.n3_code[2];
  return result;
}

//----- (00734E40) --------------------------------------------------------
int __thiscall CGuildMember::Recv_NC_GUILD_MEMBER_JOIN_CMD(CGuildMember *this, PROTO_NC_GUILD_MEMBER_JOIN_CMD *pCmd)
{
  CGuildMember *v2; // esi@1
  int v3; // eax@1
  int result; // eax@2

  v2 = this;
  v3 = this->m_NumOfMembers;
  if ( (unsigned __int16)v3 < 0x190u )
  {
    GUILD_MEMBER_CLIENT::operator=(&this->m_Members[v3], &pCmd->Member);
    result = 1;
    ++v2->m_NumOfMembers;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00734E80) --------------------------------------------------------
int __thiscall CGuildMember::Recv_NC_GUILD_MEMBER_LEAVE_CMD(CGuildMember *this, PROTO_NC_GUILD_MEMBER_LEAVE_CMD *pCmd)
{
  CGuildMember *v2; // esi@1
  int v3; // eax@1
  int result; // eax@2

  v2 = this;
  v3 = CGuildMember::GetIndex(this, &pCmd->CharID);
  if ( v3 == -1 )
  {
    result = 0;
  }
  else
  {
    memcpy(v2->m_Members[v3].sName.n5_name, v2->m_Members[v3 + 1].sName.n5_name, 110 * (--v2->m_NumOfMembers - v3));
    result = 1;
  }
  return result;
}

//----- (00734ED0) --------------------------------------------------------
int __thiscall CGuildMember::Recv_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_CMD(CGuildMember *this, PROTO_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_CMD *pCmd)
{
  CGuildMember *v2; // esi@1
  int v3; // eax@1
  int result; // eax@2

  v2 = this;
  v3 = this->m_NumOfMembers;
  if ( (unsigned __int16)v3 < 0x190u )
  {
    GUILD_MEMBER_CLIENT::operator=(&this->m_Members[v3], &pCmd->Member);
    result = 1;
    ++v2->m_NumOfMembers;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00734F10) --------------------------------------------------------
SHINE_GUILD_WAR_INFO *__thiscall SHINE_GUILD_WAR_INFO::operator=(SHINE_GUILD_WAR_INFO *this, SHINE_GUILD_WAR_INFO *__that)
{
  SHINE_GUILD_WAR_INFO *result; // eax@1

  result = this;
  this->nNo = __that->nNo;
  *(_QWORD *)&this->sName.n4_name[0] = *(_QWORD *)&__that->sName.n4_name[0];
  *(_QWORD *)&this->sName.n4_code[2] = *(_QWORD *)&__that->sName.n4_code[2];
  this->nGrade = __that->nGrade;
  this->nWarStatus = __that->nWarStatus;
  this->nWarStatusRemainSec = __that->nWarStatusRemainSec;
  this->dRequestDate = __that->dRequestDate;
  this->dStartDate = __that->dStartDate;
  this->dEndDate = __that->dEndDate;
  qmemcpy(&this->tm_dRequestDate, &__that->tm_dRequestDate, sizeof(this->tm_dRequestDate));
  qmemcpy(&this->tm_dStartDate, &__that->tm_dStartDate, sizeof(this->tm_dStartDate));
  qmemcpy(&this->tm_dEndDate, &__that->tm_dEndDate, 0x28u);
  qmemcpy(&this->MyScore, &__that->MyScore, sizeof(this->MyScore));
  qmemcpy(&this->EnemyScore, &__that->EnemyScore, sizeof(this->EnemyScore));
  return result;
}

//----- (00734FC0) --------------------------------------------------------
int __thiscall CGuildWar::Update(CGuildWar *this, unsigned int nRequestGuildNo, char nWarStatus, int *pWarEndDate, tm *pdEndDate)
{
  CGuildWar::GUILD_WAR_LIST *v5; // eax@1
  int result; // eax@4

  v5 = this->m_pGuildWarListTop;
  if ( v5 )
  {
    while ( v5->WarInfo.nRequestNo != nRequestGuildNo )
    {
      v5 = v5->pLinkDn;
      if ( !v5 )
        goto LABEL_4;
    }
    v5->WarInfo.nWarStatus = nWarStatus;
    v5->WarInfo.dEndDate = *pWarEndDate;
    qmemcpy(&v5->WarInfo.tm_dEndDate, pdEndDate, sizeof(v5->WarInfo.tm_dEndDate));
    result = 1;
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}

//----- (00735010) --------------------------------------------------------
void __thiscall CPartyFinder::CPartyFinder(CPartyFinder *this)
{
  this->m_NumOfInfo = 0;
  this->m_pListTop = 0;
  this->m_pListBottom = 0;
}

//----- (00735020) --------------------------------------------------------
int __stdcall CGuild::IsSetDismiss(GUILD_MEMBER_CLIENT *pMember)
{
  int result; // eax@2

  if ( pMember )
    result = pMember->nGrade > 0u ? 0xD02 : 0;
  else
    result = 3329;
  return result;
}

//----- (00735050) --------------------------------------------------------
int __stdcall CGuild::IsSetNotify(GUILD_MEMBER_CLIENT *pMember)
{
  int result; // eax@2

  if ( pMember )
    result = pMember->nGrade > 2u ? 0xD12 : 0;
  else
    result = 3345;
  return result;
}

//----- (00735080) --------------------------------------------------------
int __stdcall CGuild::IsSetInvite(GUILD_MEMBER_CLIENT *pMember)
{
  int result; // eax@2

  if ( pMember )
    result = pMember->nGrade > 1u ? 0xCD3 : 0;
  else
    result = 3280;
  return result;
}

//----- (007350B0) --------------------------------------------------------
int __stdcall CGuild::IsSetVanish(GUILD_MEMBER_CLIENT *pMember)
{
  int result; // eax@2

  if ( pMember )
    result = pMember->nGrade > 1u ? 0xCF3 : 0;
  else
    result = 3313;
  return result;
}

//----- (007350E0) --------------------------------------------------------
int __stdcall CGuild::IsSetMemberGrade(GUILD_MEMBER_CLIENT *pMember)
{
  int result; // eax@2

  if ( pMember )
    result = pMember->nGrade > 0u ? 0xCEB : 0;
  else
    result = 3305;
  return result;
}

//----- (00735110) --------------------------------------------------------
int __stdcall CGuild::IsSetWar(GUILD_MEMBER_CLIENT *pMember)
{
  int result; // eax@2

  if ( pMember )
    result = pMember->nGrade > 1u ? 0xD22 : 0;
  else
    result = 3361;
  return result;
}

//----- (00735140) --------------------------------------------------------
bool __stdcall CGuild::IsUseStorage(GUILD_MEMBER_CLIENT *pMember)
{
  bool result; // al@2

  if ( pMember )
    result = pMember->nGrade == 0;
  else
    result = 0;
  return result;
}

//----- (00735160) --------------------------------------------------------
void __thiscall CGuild::MakeAcademy(CGuild *this, Name5 *pAcademyMaster)
{
  CGuild *v2; // esi@1
  unsigned int *v3; // eax@1
  char dest[4]; // [sp+Ch] [bp-18h]@2
  int v5; // [sp+10h] [bp-14h]@2
  int v6; // [sp+14h] [bp-10h]@2
  int v7; // [sp+18h] [bp-Ch]@2
  int v8; // [sp+1Ch] [bp-8h]@2

  v2 = this;
  this->m_GuildAcademyGraduateCount = 0;
  v3 = (unsigned int *)pAcademyMaster;
  this->m_bIsGuildAcademy = 1;
  this->nAcademyRewardStorageMoney = 0i64;
  this->m_PreAcademyRank = 0;
  this->m_bisGuildAcademyBuff = 0;
  if ( !pAcademyMaster )
  {
    v8 = 0;
    v7 = 0;
    v6 = 0;
    v5 = 0;
    *(_DWORD *)dest = 0;
    strncpy(dest, "Unknown", 0x14u);
    v3 = (unsigned int *)dest;
  }
  v2->m_GuildAcademy.sAcademyMasterName.n5_code[0] = *v3;
  v2->m_GuildAcademy.sAcademyMasterName.n5_code[1] = v3[1];
  v2->m_GuildAcademy.sAcademyMasterName.n5_code[2] = v3[2];
  v2->m_GuildAcademy.sAcademyMasterName.n5_code[3] = v3[3];
  v2->m_GuildAcademy.sAcademyMasterName.n5_code[4] = v3[4];
  v2->m_GuildAcademy.nAcademyPoint = 0;
  v2->m_GuildAcademy.nAcademyRank = 0;
  v2->m_GuildAcademy.dAcademyBuffUntilTime = 0;
  v2->m_GuildAcademy.sIntro[0] = 0;
  v2->m_GuildAcademy.sNotify[0] = 0;
  *(_DWORD *)&v2->m_GuildAcademy.nNumAcademyMembers = 6553600;
}

//----- (00735240) --------------------------------------------------------
signed int __stdcall NiPoint3Interpolator::GetKeyContent(unsigned __int16 usChannel)
{
  return 1;
}

//----- (00735250) --------------------------------------------------------
BOOL __stdcall CGuild::Recv_NC_GUILD_MONEY_ADD_ACK(PROTO_NC_GUILD_MONEY_ADD_ACK *pAck)
{
  return pAck->Error == 3137;
}

//----- (00735270) --------------------------------------------------------
BOOL __stdcall CGuild::Recv_NC_GUILD_WAR_ACK(PROTO_NC_GUILD_WAR_ACK *pAck)
{
  return pAck->Error == 3137;
}

//----- (00735290) --------------------------------------------------------
int __thiscall CGuild::Recv_NC_GUILD_DISMISS_CMD(CGuild *this, PROTO_NC_GUILD_DISMISS_CMD *pCmd)
{
  int result; // eax@2

  if ( this->m_bIsGuild )
  {
    this->m_Guild.nDismissStatus = pCmd->nDismissStatus;
    this->m_Guild.dDismissDate = pCmd->dDismissDate;
    qmemcpy(&this->m_Guild.tm_dDismissDate, &pCmd->tm_dDismissDate, sizeof(this->m_Guild.tm_dDismissDate));
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007352E0) --------------------------------------------------------
int __thiscall CGuild::Recv_NC_GUILD_DELETE_CMD(CGuild *this, PROTO_NC_GUILD_DELETE_CMD *pCmd)
{
  int result; // eax@1

  result = 0;
  if ( this->m_bIsGuild )
  {
    this->m_bIsGuild = 0;
    this->m_bIsGuildAcademy = 0;
    this->m_bisGuildAcademyBuff = 0;
    this->m_PreAcademyRank = 0;
    this->nAcademyRewardStorageMoney = 0i64;
    this->m_GuildAcademyGraduateCount = 0;
    result = 1;
  }
  return result;
}

//----- (00735320) --------------------------------------------------------
int __thiscall CGuild::Recv_NC_GUILD_MONEY_SUB_CMD(CGuild *this, PROTO_NC_GUILD_MONEY_SUB_CMD *pCmd)
{
  int result; // eax@2

  if ( this->m_bIsGuild )
  {
    this->m_Guild.nMoney = pCmd->GuildTotalMoney;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00735350) --------------------------------------------------------
int __thiscall CGuild::Recv_NC_GUILD_NOTIFY_CMD(CGuild *this, PROTO_NC_GUILD_NOTIFY_CMD *pCmd)
{
  int result; // eax@2
  PROTO_NC_GUILD_NOTIFY_CMD *v3; // eax@3
  signed int v4; // edx@3
  char v5; // cl@4

  if ( this->m_bIsGuild )
  {
    this->m_Guild.dNotifyDate = pCmd->dNotifyDate;
    qmemcpy(&this->m_Guild.tm_dNotifyDate, &pCmd->tm_dNotifyDate, 0x38u);
    v3 = pCmd + 1;
    v4 = this->m_Guild.sNotify - (char *)&pCmd[1];
    do
    {
      v5 = v3->dNotifyDate;
      *((_BYTE *)&v3->dNotifyDate + v4) = v3->dNotifyDate;
      v3 = (PROTO_NC_GUILD_NOTIFY_CMD *)((char *)v3 + 1);
    }
    while ( v5 );
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007353D0) --------------------------------------------------------
int __thiscall CGuild::Recv_NC_GUILD_GRADE_CMD(CGuild *this, PROTO_NC_GUILD_GRADE_CMD *pCmd)
{
  int result; // eax@2

  if ( this->m_bIsGuild )
  {
    this->m_Guild.nGrade = pCmd->Grade;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007353F0) --------------------------------------------------------
int __thiscall CGuild::Recv_NC_GUILD_WAR_START_CMD(CGuild *this, PROTO_NC_GUILD_WAR_START_CMD *pCmd)
{
  int result; // eax@2

  if ( this->m_bIsGuild )
  {
    CGuildWar::Update(&this->m_GuildWar, pCmd->RequestNo, 2, &pCmd->EndDate, &pCmd->tm_EndDate);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00735430) --------------------------------------------------------
int __thiscall CGuild::Recv_NC_GUILD_WAR_COOLDOWN_DONE_CMD(CGuild *this, PROTO_NC_GUILD_WAR_COOLDOWN_DONE_CMD *pCmd)
{
  int result; // eax@1

  result = 0;
  if ( this->m_bIsGuild )
  {
    this->m_Guild.nWarEnemy = 0;
    this->m_Guild.nWarStatus = 0;
    result = 1;
  }
  return result;
}

//----- (00735450) --------------------------------------------------------
int __thiscall CGuild::Recv_NC_GUILD_ACADEMY_NOTIFY_CMD(CGuild *this, PROTO_NC_GUILD_ACADEMY_NOTIFY_CMD *pCmd)
{
  int result; // eax@2
  PROTO_NC_GUILD_ACADEMY_NOTIFY_CMD *v3; // eax@4
  signed int v4; // edx@4
  char v5; // cl@5

  if ( this->m_bIsGuildAcademy && pCmd )
  {
    this->m_GuildAcademy.dNotifyDate = pCmd->dNotifyDate;
    qmemcpy(&this->m_GuildAcademy.tm_dNotifyDate, &pCmd->tm_dNotifyDate, 0x38u);
    v3 = pCmd + 1;
    v4 = this->m_GuildAcademy.sNotify - (char *)&pCmd[1];
    do
    {
      v5 = v3->dNotifyDate;
      *((_BYTE *)&v3->dNotifyDate + v4) = v3->dNotifyDate;
      v3 = (PROTO_NC_GUILD_ACADEMY_NOTIFY_CMD *)((char *)v3 + 1);
    }
    while ( v5 );
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007354E0) --------------------------------------------------------
void __thiscall GUILD_TOURNAMENT_LIST::GUILD_TOURNAMENT_LIST(GUILD_TOURNAMENT_LIST *this)
{
  *(_QWORD *)&this->sGuildName.n4_code[2] = 0i64;
  *(_QWORD *)&this->sGuildName.n4_name[0] = 0i64;
}

//----- (00735500) --------------------------------------------------------
void __thiscall CGuildTournament::~CGuildTournament(CGuildTournament *this)
{
  `eh vector destructor iterator'(
    this->m_TournamentList,
    0x15u,
    31,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
}

//----- (00735520) --------------------------------------------------------
void __thiscall CGuildTournament::Clear(CGuildTournament *this)
{
  char *v1; // esi@1
  signed int v2; // edi@1

  this->m_bReceiveFromServer = 0;
  this->m_nNumOfList = 0;
  v1 = &this->m_TournamentList[0].sGuildName.n4_name[8];
  v2 = 31;
  do
  {
    *((_DWORD *)v1 - 3) = 0;
    *(v1 - 13) = 0;
    *((_DWORD *)v1 + 1) = 0;
    *(_DWORD *)v1 = 0;
    *((_DWORD *)v1 - 1) = 0;
    *((_DWORD *)v1 - 2) = 0;
    strncpy(v1 - 8, (char *)&unk_96F8EB, 0x10u);
    v1 += 21;
    --v2;
  }
  while ( v2 );
}

//----- (00735570) --------------------------------------------------------
void __thiscall GUILD_ACADEMY_MEMBER_CLIENT::GUILD_ACADEMY_MEMBER_CLIENT(GUILD_ACADEMY_MEMBER_CLIENT *this)
{
  *(_QWORD *)&this->sName.n5_code[3] = 0i64;
  *(_QWORD *)&this->sName.n5_code[1] = 0i64;
  this->sName.n5_code[0] = 0;
  *(_QWORD *)&this->sMap.n3_code[1] = 0i64;
  this->sMap.n3_code[0] = 0;
}

//----- (00735590) --------------------------------------------------------
void __thiscall CGuildAcademyMember::~CGuildAcademyMember(CGuildAcademyMember *this)
{
  this->vfptr = (CGuildAcademyMemberVtbl *)&CGuildAcademyMember::`vftable';
  `eh vector destructor iterator'(
    this->m_AcademyMembers,
    0x6Du,
    100,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
}
// 9CF254: using guessed type int (__thiscall *CGuildAcademyMember::`vftable')(CGuildAcademyMember *this, struct PROTO_NC_GUILD_ACADEMY_MEMBER_LIST_ACK *);

//----- (007355B0) --------------------------------------------------------
int __thiscall CGuildAcademyMember::GetIndex(CGuildAcademyMember *this, Name5 *pAcademyMemberName)
{
  int v2; // esi@1
  int result; // eax@1
  char *v4; // ecx@2

  v2 = this->m_NumOfAcademyMembers;
  result = 0;
  if ( v2 <= 0 )
  {
LABEL_9:
    result = -1;
  }
  else
  {
    v4 = &this->m_AcademyMembers[0].sName.n5_name[8];
    while ( *((_DWORD *)v4 - 2) != pAcademyMemberName->n5_code[0]
         || *((_DWORD *)v4 - 1) != pAcademyMemberName->n5_code[1]
         || *(_DWORD *)v4 != pAcademyMemberName->n5_code[2]
         || *((_DWORD *)v4 + 1) != pAcademyMemberName->n5_code[3]
         || *((_DWORD *)v4 + 2) != pAcademyMemberName->n5_code[4] )
    {
      ++result;
      v4 += 109;
      if ( result >= v2 )
        goto LABEL_9;
    }
  }
  return result;
}

//----- (00735600) --------------------------------------------------------
GUILD_ACADEMY_MEMBER_CLIENT *__thiscall GUILD_ACADEMY_MEMBER_CLIENT::operator=(GUILD_ACADEMY_MEMBER_CLIENT *this, GUILD_ACADEMY_MEMBER_CLIENT *__that)
{
  GUILD_ACADEMY_MEMBER_CLIENT *result; // eax@1
  char *v3; // esi@1
  signed int v4; // edx@1

  result = this;
  *(_QWORD *)&this->sName.n5_name[0] = *(_QWORD *)&__that->sName.n5_name[0];
  *(_QWORD *)&this->sName.n5_code[2] = *(_QWORD *)&__that->sName.n5_code[2];
  this->sName.n5_code[4] = __that->sName.n5_code[4];
  this->nGrade = __that->nGrade;
  v3 = this->sIntro;
  v4 = 64;
  do
  {
    *v3 = v3[(char *)__that - (char *)this];
    ++v3;
    --v4;
  }
  while ( v4 );
  this->dLogonInfo = __that->dLogonInfo;
  this->nClassID = __that->nClassID;
  this->nLevel = __that->nLevel;
  this->bIsParty = __that->bIsParty;
  *(_QWORD *)&this->sMap.n3_name[0] = *(_QWORD *)&__that->sMap.n3_name[0];
  this->sMap.n3_code[2] = __that->sMap.n3_code[2];
  this->dJoinInfo = __that->dJoinInfo;
  this->nJoinLevel = __that->nJoinLevel;
  return result;
}

//----- (00735690) --------------------------------------------------------
int __thiscall CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_JOIN_CMD(CGuildAcademyMember *this, PROTO_NC_GUILD_ACADEMY_MEMBER_JOIN_CMD *pCmd)
{
  CGuildAcademyMember *v2; // esi@1
  unsigned int v3; // eax@1
  int result; // eax@2

  v2 = this;
  v3 = this->m_NumOfAcademyMembers;
  if ( v3 < 0x64 )
  {
    GUILD_ACADEMY_MEMBER_CLIENT::operator=(&this->m_AcademyMembers[v3], &pCmd->Member);
    result = 1;
    ++v2->m_NumOfAcademyMembers;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007356D0) --------------------------------------------------------
int __thiscall CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_LEAVE_CMD(CGuildAcademyMember *this, PROTO_NC_GUILD_ACADEMY_MEMBER_LEAVE_CMD *pCmd)
{
  CGuildAcademyMember *v2; // esi@1
  int v3; // eax@1
  int result; // eax@2

  v2 = this;
  v3 = CGuildAcademyMember::GetIndex(this, &pCmd->CharID);
  if ( v3 == -1 )
  {
    result = 0;
  }
  else
  {
    memcpy(
      v2->m_AcademyMembers[v3].sName.n5_name,
      v2->m_AcademyMembers[v3 + 1].sName.n5_name,
      109 * (--v2->m_NumOfAcademyMembers - v3));
    result = 1;
  }
  return result;
}

//----- (00735720) --------------------------------------------------------
int __thiscall CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_CMD(CGuildAcademyMember *this, PROTO_NC_GUILD_ACADEMY_MEMBER_GUILD_JOIN_CMD *pCmd)
{
  CGuildAcademyMember *v2; // esi@1
  int v3; // eax@1
  int result; // eax@2

  v2 = this;
  v3 = CGuildAcademyMember::GetIndex(this, &pCmd->Member.sName);
  if ( v3 == -1 )
  {
    result = 0;
  }
  else
  {
    memcpy(
      v2->m_AcademyMembers[v3].sName.n5_name,
      v2->m_AcademyMembers[v3 + 1].sName.n5_name,
      109 * (--v2->m_NumOfAcademyMembers - v3));
    result = 1;
  }
  return result;
}

//----- (00735780) --------------------------------------------------------
void __thiscall CGuildMember::CGuildMember(CGuildMember *this)
{
  CGuildMember *v1; // esi@1
  int v2; // esi@1
  signed int v3; // edi@1

  v1 = this;
  this->vfptr = (CGuildMemberVtbl *)CGuildMember::`vftable';
  `eh vector constructor iterator'(
    this->m_Members,
    0x6Eu,
    400,
    (void (__thiscall *)(void *))GUILD_MEMBER_CLIENT::GUILD_MEMBER_CLIENT,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
  v1->m_NumOfMembers = 0;
  v2 = (int)&v1->m_Members[0].sName.n5_code[3];
  v3 = 400;
  do
  {
    *(_DWORD *)(v2 + 4) = 0;
    *(_DWORD *)v2 = 0;
    *(_DWORD *)(v2 - 4) = 0;
    *(_DWORD *)(v2 - 8) = 0;
    *(_DWORD *)(v2 - 12) = 0;
    strncpy((char *)(v2 - 12), (char *)&unk_96F8EB, 0x14u);
    *(_DWORD *)(v2 + 79) &= 0xFC000000;
    *(_BYTE *)(v2 + 8) = 0;
    *(_DWORD *)(v2 + 9) = 0;
    *(_WORD *)(v2 + 13) = 0;
    *(_BYTE *)(v2 + 15) = 0;
    *(_WORD *)(v2 + 83) = 0;
    *(_BYTE *)(v2 + 85) = 0;
    *(_DWORD *)(v2 + 94) = 0;
    *(_DWORD *)(v2 + 90) = 0;
    *(_DWORD *)(v2 + 86) = 0;
    strncpy((char *)(v2 + 86), (char *)&unk_96F8EB, 0xCu);
    v2 += 110;
    --v3;
  }
  while ( v3 );
}
// 9CF1F4: using guessed type int (__stdcall *CGuildMember::`vftable'[6])(int);

//----- (00735830) --------------------------------------------------------
GUILD_MEMBER_CLIENT *__thiscall CGuildMember::Get(CGuildMember *this, Name5 *pMemberName)
{
  CGuildMember *v2; // esi@1
  int v3; // eax@1
  GUILD_MEMBER_CLIENT *result; // eax@2

  v2 = this;
  v3 = CGuildMember::GetIndex(this, pMemberName);
  if ( v3 == -1 )
    result = 0;
  else
    result = &v2->m_Members[v3];
  return result;
}

//----- (00735860) --------------------------------------------------------
int __thiscall CGuildMember::Recv_NC_GUILD_MEMBER_LIST_ACK(CGuildMember *this, PROTO_NC_GUILD_MEMBER_LIST_ACK *pAck)
{
  PROTO_NC_GUILD_MEMBER_LIST_ACK *v2; // eax@1
  int v3; // edx@1
  int result; // eax@2
  int v5; // ebx@3
  char *v6; // edx@4
  char *v7; // eax@5
  _BYTE *v8; // esi@5
  int v9; // ecx@7
  bool v10; // sf@7
  unsigned __int8 v11; // of@7
  int v12; // edx@8
  CGuildMember *v13; // [sp+4h] [bp-8h]@1
  signed int v14; // [sp+8h] [bp-4h]@5

  v2 = pAck;
  v3 = pAck->MemberCount;
  v13 = this;
  if ( v3 + pAck->MemberIndex <= 400 )
  {
    v5 = 0;
    if ( v3 > 0 )
    {
      v6 = (char *)&pAck[18].MemberCount;
      do
      {
        v7 = this->m_Members[v5 + v2->MemberIndex].sName.n5_name;
        *(_DWORD *)v7 = *(_DWORD *)(v6 - 106);
        *((_DWORD *)v7 + 1) = *(_DWORD *)(v6 - 102);
        *((_DWORD *)v7 + 2) = *(_DWORD *)(v6 - 98);
        *((_DWORD *)v7 + 3) = *(_DWORD *)(v6 - 94);
        *((_DWORD *)v7 + 4) = *(_DWORD *)(v6 - 90);
        v7[20] = *(v6 - 86);
        *(_DWORD *)(v7 + 21) = *(_DWORD *)(v6 - 85);
        *(_WORD *)(v7 + 25) = *(_WORD *)(v6 - 81);
        v8 = v7 + 27;
        v14 = 64;
        do
        {
          *v8 = v8[v6 - 106 - v7];
          ++v8;
          --v14;
        }
        while ( v14 );
        *(_DWORD *)(v7 + 91) = *(_DWORD *)(v6 - 15);
        v7[95] = *(v6 - 11);
        v7[96] = *(v6 - 10);
        v7[97] = *(v6 - 9);
        *(_DWORD *)(v7 + 98) = *((_DWORD *)v6 - 2);
        *(_DWORD *)(v7 + 102) = *((_DWORD *)v6 - 1);
        *(_DWORD *)(v7 + 106) = *(_DWORD *)v6;
        v2 = pAck;
        v9 = pAck->MemberCount;
        ++v5;
        v6 += 110;
        v11 = __OFSUB__(v5, v9);
        v10 = v5 - v9 < 0;
        this = v13;
      }
      while ( v10 ^ v11 );
    }
    v12 = v2->MemberIndex + v2->MemberCount;
    if ( this->m_NumOfMembers < v12 )
      this->m_NumOfMembers = v12;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00735960) --------------------------------------------------------
int __thiscall CGuildMember::Recv_NC_GUILD_MEMBER_GRADE_CMD(CGuildMember *this, PROTO_NC_GUILD_MEMBER_GRADE_CMD *pCmd)
{
  CGuildMember *v2; // esi@1
  int v3; // eax@1
  int v4; // eax@2
  int result; // eax@3

  v2 = this;
  v3 = CGuildMember::GetIndex(this, &pCmd->CharID);
  if ( v3 != -1 && (v4 = (int)&v2->m_Members[v3]) != 0 )
  {
    *(_BYTE *)(v4 + 20) = pCmd->Grade;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007359A0) --------------------------------------------------------
int __thiscall CGuildMember::Recv_NC_GUILD_MEMBER_FLAGS_CMD(CGuildMember *this, PROTO_NC_GUILD_MEMBER_FLAGS_CMD *pCmd)
{
  CGuildMember *v2; // esi@1
  int v3; // eax@1
  int v4; // eax@2
  int result; // eax@3

  v2 = this;
  v3 = CGuildMember::GetIndex(this, &pCmd->CharID);
  if ( v3 != -1 && (v4 = (int)&v2->m_Members[v3]) != 0 )
  {
    *(_DWORD *)(v4 + 21) = pCmd->Flags;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007359E0) --------------------------------------------------------
int __thiscall CGuildMember::Recv_NC_GUILD_MEMBER_EXP_RATIO_CMD(CGuildMember *this, PROTO_NC_GUILD_MEMBER_EXP_RATIO_CMD *pCmd)
{
  CGuildMember *v2; // esi@1
  int v3; // eax@1
  int v4; // eax@2
  int result; // eax@3

  v2 = this;
  v3 = CGuildMember::GetIndex(this, &pCmd->CharID);
  if ( v3 != -1 && (v4 = (int)&v2->m_Members[v3]) != 0 )
  {
    *(_WORD *)(v4 + 25) = pCmd->ExpRatio;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00735A20) --------------------------------------------------------
int __thiscall CGuildMember::Recv_NC_GUILD_MEMBER_LOGON_CMD(CGuildMember *this, PROTO_NC_GUILD_MEMBER_LOGON_CMD *pCmd)
{
  CGuildMember *v2; // esi@1
  int v3; // eax@1
  int v4; // eax@2
  int result; // eax@3

  v2 = this;
  v3 = CGuildMember::GetIndex(this, &pCmd->CharID);
  if ( v3 != -1 && (v4 = (int)&v2->m_Members[v3]) != 0 )
  {
    *(_DWORD *)(v4 + 91) |= 1u;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00735A60) --------------------------------------------------------
int __thiscall CGuildMember::Recv_NC_GUILD_MEMBER_LOGOFF_CMD(CGuildMember *this, PROTO_NC_GUILD_MEMBER_LOGOFF_CMD *pCmd)
{
  CGuildMember *v2; // esi@1
  int v3; // eax@1
  int v4; // esi@2
  int result; // eax@3
  int v6; // eax@4
  int v7; // ecx@4
  int v8; // eax@4
  _SYSTEMTIME LocalTime; // [sp+4h] [bp-14h]@4

  v2 = this;
  v3 = CGuildMember::GetIndex(this, &pCmd->CharID);
  if ( v3 != -1 && (v4 = (int)&v2->m_Members[v3]) != 0 )
  {
    GetLocalTime(&LocalTime);
    *(_DWORD *)(v4 + 91) &= 0xFFFFFFFE;
    v6 = *(_DWORD *)(v4 + 91) ^ ((unsigned __int16)*(_DWORD *)(v4 + 91) ^ (unsigned __int16)(2 * LocalTime.wYear)) & 0xFFE;
    *(_DWORD *)(v4 + 91) = v6;
    v7 = v6 ^ (unsigned __int16)((v6 ^ (LocalTime.wMonth << 12)) & 0xF000);
    *(_DWORD *)(v4 + 91) = v7;
    v8 = v7 ^ (v7 ^ (LocalTime.wDay << 16)) & 0x1F0000;
    *(_DWORD *)(v4 + 91) = v8;
    *(_DWORD *)(v4 + 91) = v8 ^ (v8 ^ (LocalTime.wHour << 21)) & 0x3E00000;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00735B20) --------------------------------------------------------
int __thiscall CGuildMember::Recv_NC_GUILD_MEMBER_PARTY_CMD(CGuildMember *this, PROTO_NC_GUILD_MEMBER_PARTY_CMD *pCmd)
{
  CGuildMember *v2; // esi@1
  int v3; // eax@1
  int v4; // eax@2
  int result; // eax@3

  v2 = this;
  v3 = CGuildMember::GetIndex(this, &pCmd->CharID);
  if ( v3 != -1 && (v4 = (int)&v2->m_Members[v3]) != 0 )
  {
    *(_BYTE *)(v4 + 97) = pCmd->Party;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00735B60) --------------------------------------------------------
int __thiscall CGuildMember::Recv_NC_GUILD_MEMBER_LEVEL_CMD(CGuildMember *this, PROTO_NC_GUILD_MEMBER_LEVEL_CMD *pCmd)
{
  CGuildMember *v2; // esi@1
  int v3; // eax@1
  int v4; // eax@2
  int result; // eax@3

  v2 = this;
  v3 = CGuildMember::GetIndex(this, &pCmd->CharID);
  if ( v3 != -1 && (v4 = (int)&v2->m_Members[v3]) != 0 )
  {
    *(_BYTE *)(v4 + 96) = pCmd->Level;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00735BA0) --------------------------------------------------------
int __thiscall CGuildMember::Recv_NC_GUILD_MEMBER_MAP_CMD(CGuildMember *this, PROTO_NC_GUILD_MEMBER_MAP_CMD *pCmd)
{
  CGuildMember *v2; // esi@1
  int v3; // eax@1
  int v4; // eax@2
  int result; // eax@3

  v2 = this;
  v3 = CGuildMember::GetIndex(this, &pCmd->CharID);
  if ( v3 != -1 && (v4 = (int)&v2->m_Members[v3]) != 0 )
  {
    *(_QWORD *)(v4 + 98) = *(_QWORD *)&pCmd->sMap.n3_name[0];
    *(_DWORD *)(v4 + 106) = pCmd->sMap.n3_code[2];
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00735BF0) --------------------------------------------------------
int __thiscall CGuildMember::Recv_NC_GUILD_MEMBER_INTRO_CMD(CGuildMember *this, PROTO_NC_GUILD_MEMBER_INTRO_CMD *pCmd)
{
  CGuildMember *v2; // esi@1
  int v3; // eax@1
  int v4; // eax@2
  int v5; // ecx@2
  int result; // eax@3
  PROTO_NC_GUILD_MEMBER_INTRO_CMD *v7; // eax@4
  int v8; // edx@4
  char v9; // cl@5

  v2 = this;
  v3 = CGuildMember::GetIndex(this, &pCmd->CharID);
  if ( v3 != -1
    && (v4 = v3, v5 = (int)&v2->m_Members[v4], (CGuildMember *)((char *)v2 + v4 * 110) != (CGuildMember *)-6) )
  {
    v7 = pCmd + 1;
    v8 = v5 + 27 - (_DWORD)(pCmd + 1);
    do
    {
      v9 = v7->CharID.n5_name[0];
      v7->CharID.n5_name[v8] = v7->CharID.n5_name[0];
      v7 = (PROTO_NC_GUILD_MEMBER_INTRO_CMD *)((char *)v7 + 1);
    }
    while ( v9 );
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00735C40) --------------------------------------------------------
int __thiscall CGuildMember::Recv_NC_GUILD_MEMBER_CLASS_CMD(CGuildMember *this, PROTO_NC_GUILD_MEMBER_CLASS_CMD *pCmd)
{
  CGuildMember *v2; // esi@1
  int v3; // eax@1
  int v4; // eax@2
  int result; // eax@3

  v2 = this;
  v3 = CGuildMember::GetIndex(this, &pCmd->CharID);
  if ( v3 != -1 && (v4 = (int)&v2->m_Members[v3]) != 0 )
  {
    *(_BYTE *)(v4 + 95) = pCmd->ClassID;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00735C80) --------------------------------------------------------
int __thiscall CGuild::Recv_NC_GUILD_MY_GUILD_INFO_ACK(CGuild *this, PROTO_NC_GUILD_MY_GUILD_INFO_ACK *pAck)
{
  CGuild *v2; // esi@1
  int result; // eax@2

  v2 = this;
  if ( pAck->Error == 3137 )
  {
    GUILD_CLIENT::operator=(&this->m_Guild, (GUILD_CLIENT *)&pAck[1]);
    result = 1;
    v2->m_bIsGuild = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00735CC0) --------------------------------------------------------
void __thiscall CGuildTournament::CGuildTournament(CGuildTournament *this)
{
  CGuildTournament *v1; // esi@1

  v1 = this;
  `eh vector constructor iterator'(
    this->m_TournamentList,
    0x15u,
    31,
    (void (__thiscall *)(void *))GUILD_TOURNAMENT_LIST::GUILD_TOURNAMENT_LIST,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
  v1->m_MatchType = 0;
  CGuildTournament::Clear(v1);
}

//----- (00735CF0) --------------------------------------------------------
void __thiscall CGuildAcademyMember::CGuildAcademyMember(CGuildAcademyMember *this)
{
  CGuildAcademyMember *v1; // esi@1

  v1 = this;
  this->vfptr = (CGuildAcademyMemberVtbl *)&CGuildAcademyMember::`vftable';
  `eh vector constructor iterator'(
    this->m_AcademyMembers,
    0x6Du,
    100,
    (void (__thiscall *)(void *))GUILD_ACADEMY_MEMBER_CLIENT::GUILD_ACADEMY_MEMBER_CLIENT,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
  v1->m_NumOfAcademyMembers = 0;
}
// 9CF254: using guessed type int (__thiscall *CGuildAcademyMember::`vftable')(CGuildAcademyMember *this, struct PROTO_NC_GUILD_ACADEMY_MEMBER_LIST_ACK *);

//----- (00735D20) --------------------------------------------------------
int __thiscall CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_LIST_ACK(CGuildAcademyMember *this, PROTO_NC_GUILD_ACADEMY_MEMBER_LIST_ACK *pAck)
{
  PROTO_NC_GUILD_ACADEMY_MEMBER_LIST_ACK *v2; // eax@1
  int v3; // edx@1
  int result; // eax@2
  int v5; // ebx@3
  char *v6; // edx@4
  char *v7; // eax@5
  _BYTE *v8; // esi@5
  int v9; // ecx@7
  bool v10; // sf@7
  unsigned __int8 v11; // of@7
  int v12; // edx@8
  CGuildAcademyMember *v13; // [sp+4h] [bp-8h]@1
  signed int v14; // [sp+8h] [bp-4h]@5

  v2 = pAck;
  v3 = pAck->AcademyMemberCount;
  v13 = this;
  if ( v3 + pAck->AcademyMemberIndex <= 100 )
  {
    v5 = 0;
    if ( v3 > 0 )
    {
      v6 = (char *)&pAck[17].AcademyMemberCount;
      do
      {
        v7 = this->m_AcademyMembers[v5 + v2->AcademyMemberIndex].sName.n5_name;
        *(_DWORD *)v7 = *((_DWORD *)v6 - 25);
        *((_DWORD *)v7 + 1) = *((_DWORD *)v6 - 24);
        *((_DWORD *)v7 + 2) = *((_DWORD *)v6 - 23);
        *((_DWORD *)v7 + 3) = *((_DWORD *)v6 - 22);
        *((_DWORD *)v7 + 4) = *((_DWORD *)v6 - 21);
        v7[20] = *(v6 - 80);
        v8 = v7 + 21;
        v14 = 64;
        do
        {
          *v8 = v8[v6 - 100 - v7];
          ++v8;
          --v14;
        }
        while ( v14 );
        *(_DWORD *)(v7 + 85) = *(_DWORD *)(v6 - 15);
        v7[89] = *(v6 - 11);
        v7[90] = *(v6 - 10);
        v7[91] = *(v6 - 9);
        *((_DWORD *)v7 + 23) = *((_DWORD *)v6 - 2);
        *((_DWORD *)v7 + 24) = *((_DWORD *)v6 - 1);
        *((_DWORD *)v7 + 25) = *(_DWORD *)v6;
        *((_DWORD *)v7 + 26) = *((_DWORD *)v6 + 1);
        v7[108] = v6[8];
        v2 = pAck;
        v9 = pAck->AcademyMemberCount;
        ++v5;
        v6 += 109;
        v11 = __OFSUB__(v5, v9);
        v10 = v5 - v9 < 0;
        this = v13;
      }
      while ( v10 ^ v11 );
    }
    v12 = v2->AcademyMemberIndex + v2->AcademyMemberCount;
    if ( this->m_NumOfAcademyMembers < v12 )
      this->m_NumOfAcademyMembers = v12;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00735E20) --------------------------------------------------------
int __thiscall CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_INTRO_CMD(CGuildAcademyMember *this, PROTO_NC_GUILD_ACADEMY_MEMBER_INTRO_CMD *pCmd)
{
  CGuildAcademyMember *v2; // esi@1
  int v3; // eax@1
  int v4; // eax@2
  int v5; // ecx@2
  int result; // eax@3
  PROTO_NC_GUILD_ACADEMY_MEMBER_INTRO_CMD *v7; // eax@4
  int v8; // edx@4
  char v9; // cl@5

  v2 = this;
  v3 = CGuildAcademyMember::GetIndex(this, &pCmd->CharID);
  if ( v3 != -1
    && (v4 = v3,
        v5 = (int)&v2->m_AcademyMembers[v4],
        (CGuildAcademyMember *)((char *)v2 + v4 * 109) != (CGuildAcademyMember *)-6) )
  {
    v7 = pCmd + 1;
    v8 = v5 + 21 - (_DWORD)(pCmd + 1);
    do
    {
      v9 = v7->CharID.n5_name[0];
      v7->CharID.n5_name[v8] = v7->CharID.n5_name[0];
      v7 = (PROTO_NC_GUILD_ACADEMY_MEMBER_INTRO_CMD *)((char *)v7 + 1);
    }
    while ( v9 );
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00735E70) --------------------------------------------------------
int __thiscall CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_LOGON_CMD(CGuildAcademyMember *this, PROTO_NC_GUILD_ACADEMY_MEMBER_LOGON_CMD *pCmd)
{
  CGuildAcademyMember *v2; // esi@1
  int v3; // eax@1
  int v4; // eax@2
  int result; // eax@3

  v2 = this;
  v3 = CGuildAcademyMember::GetIndex(this, &pCmd->CharID);
  if ( v3 != -1 && (v4 = (int)&v2->m_AcademyMembers[v3]) != 0 )
  {
    *(_DWORD *)(v4 + 85) |= 1u;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00735EB0) --------------------------------------------------------
int __thiscall CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_LOGOFF_CMD(CGuildAcademyMember *this, PROTO_NC_GUILD_ACADEMY_MEMBER_LOGOFF_CMD *pCmd)
{
  CGuildAcademyMember *v2; // esi@1
  int v3; // eax@1
  int v4; // esi@2
  int result; // eax@3
  int v6; // eax@4
  int v7; // ecx@4
  int v8; // eax@4
  _SYSTEMTIME LocalTime; // [sp+4h] [bp-14h]@4

  v2 = this;
  v3 = CGuildAcademyMember::GetIndex(this, &pCmd->CharID);
  if ( v3 != -1 && (v4 = (int)&v2->m_AcademyMembers[v3]) != 0 )
  {
    GetLocalTime(&LocalTime);
    *(_DWORD *)(v4 + 85) &= 0xFFFFFFFE;
    v6 = *(_DWORD *)(v4 + 85) ^ ((unsigned __int16)*(_DWORD *)(v4 + 85) ^ (unsigned __int16)(2 * LocalTime.wYear)) & 0xFFE;
    *(_DWORD *)(v4 + 85) = v6;
    v7 = v6 ^ (unsigned __int16)((v6 ^ (LocalTime.wMonth << 12)) & 0xF000);
    *(_DWORD *)(v4 + 85) = v7;
    v8 = v7 ^ (v7 ^ (LocalTime.wDay << 16)) & 0x1F0000;
    *(_DWORD *)(v4 + 85) = v8;
    *(_DWORD *)(v4 + 85) = v8 ^ (v8 ^ (LocalTime.wHour << 21)) & 0x3E00000;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00735F70) --------------------------------------------------------
int __thiscall CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_PARTY_CMD(CGuildAcademyMember *this, PROTO_NC_GUILD_ACADEMY_MEMBER_PARTY_CMD *pCmd)
{
  CGuildAcademyMember *v2; // esi@1
  int v3; // eax@1
  int v4; // eax@2
  int result; // eax@3

  v2 = this;
  v3 = CGuildAcademyMember::GetIndex(this, &pCmd->CharID);
  if ( v3 != -1 && (v4 = (int)&v2->m_AcademyMembers[v3]) != 0 )
  {
    *(_BYTE *)(v4 + 91) = pCmd->Party;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00735FB0) --------------------------------------------------------
int __thiscall CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_LEVEL_CMD(CGuildAcademyMember *this, PROTO_NC_GUILD_ACADEMY_MEMBER_LEVEL_CMD *pCmd)
{
  CGuildAcademyMember *v2; // esi@1
  int v3; // eax@1
  int v4; // eax@2
  int result; // eax@3

  v2 = this;
  v3 = CGuildAcademyMember::GetIndex(this, &pCmd->CharID);
  if ( v3 != -1 && (v4 = (int)&v2->m_AcademyMembers[v3]) != 0 )
  {
    *(_BYTE *)(v4 + 90) = pCmd->Level;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00735FF0) --------------------------------------------------------
int __thiscall CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_MAP_CMD(CGuildAcademyMember *this, PROTO_NC_GUILD_ACADEMY_MEMBER_MAP_CMD *pCmd)
{
  CGuildAcademyMember *v2; // esi@1
  int v3; // eax@1
  int v4; // eax@2
  int result; // eax@3

  v2 = this;
  v3 = CGuildAcademyMember::GetIndex(this, &pCmd->CharID);
  if ( v3 != -1 && (v4 = (int)&v2->m_AcademyMembers[v3]) != 0 )
  {
    *(_QWORD *)(v4 + 92) = *(_QWORD *)&pCmd->sMap.n3_name[0];
    *(_DWORD *)(v4 + 100) = pCmd->sMap.n3_code[2];
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00736040) --------------------------------------------------------
int __thiscall CGuildAcademyMember::Recv_NC_GUILD_ACADEMY_MEMBER_CLASS_CMD(CGuildAcademyMember *this, PROTO_NC_GUILD_ACADEMY_MEMBER_CLASS_CMD *pCmd)
{
  CGuildAcademyMember *v2; // esi@1
  int v3; // eax@1
  int v4; // eax@2
  int result; // eax@3

  v2 = this;
  v3 = CGuildAcademyMember::GetIndex(this, &pCmd->CharID);
  if ( v3 != -1 && (v4 = (int)&v2->m_AcademyMembers[v3]) != 0 )
  {
    *(_BYTE *)(v4 + 89) = pCmd->ClassID;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00736080) --------------------------------------------------------
int __thiscall CGuildWar::Add(CGuildWar *this, SHINE_GUILD_WAR_INFO *pWarInfo)
{
  CGuildWar *v2; // edi@1
  CGuildWar::GUILD_WAR_LIST *v3; // ecx@1
  SHINE_GUILD_WAR_INFO *v4; // eax@4
  SHINE_GUILD_WAR_INFO *v5; // esi@5
  int result; // eax@6
  CGuildWar::GUILD_WAR_LIST *v7; // eax@10

  v2 = this;
  v3 = this->m_pGuildWarListTop;
  if ( v3 )
  {
    while ( v3->WarInfo.nRequestNo != pWarInfo->nRequestNo )
    {
      v3 = v3->pLinkDn;
      if ( !v3 )
        goto LABEL_4;
    }
    SHINE_GUILD_WAR_INFO::operator=(&v3->WarInfo, pWarInfo);
    result = 1;
  }
  else
  {
LABEL_4:
    v4 = (SHINE_GUILD_WAR_INFO *)operator new(0xF4u);
    if ( v4 )
    {
      v4->sName.n4_code[3] = 0;
      v4->sName.n4_code[2] = 0;
      v4->sName.n4_code[1] = 0;
      v4->sName.n4_code[0] = 0;
      v5 = v4;
    }
    else
    {
      v5 = 0;
    }
    *(unsigned int *)((char *)&v5[1].sName.n4_code[0] + 2) = 0;
    *(unsigned int *)((char *)&v5[1].nNo + 2) = (unsigned int)&v2->m_pGuildWarListBottom->WarInfo.nNo;
    SHINE_GUILD_WAR_INFO::operator=(v5, pWarInfo);
    if ( !v2->m_pGuildWarListTop )
      v2->m_pGuildWarListTop = (CGuildWar::GUILD_WAR_LIST *)v5;
    v7 = v2->m_pGuildWarListBottom;
    if ( v7 )
      v7->pLinkDn = (CGuildWar::GUILD_WAR_LIST *)v5;
    ++v2->m_NumOfWarList;
    v2->m_pGuildWarListBottom = (CGuildWar::GUILD_WAR_LIST *)v5;
    result = 1;
  }
  return result;
}

//----- (00736130) --------------------------------------------------------
int __thiscall CGuildWar::Del(CGuildWar *this, unsigned int nRequestGuildNo)
{
  CGuildWar *v2; // esi@1
  CGuildWar::GUILD_WAR_LIST *v3; // eax@1
  int result; // eax@4
  CGuildWar::GUILD_WAR_LIST *v5; // ecx@5
  CGuildWar::GUILD_WAR_LIST *v6; // ecx@8

  v2 = this;
  v3 = this->m_pGuildWarListTop;
  if ( v3 )
  {
    while ( v3->WarInfo.nRequestNo != nRequestGuildNo )
    {
      v3 = v3->pLinkDn;
      if ( !v3 )
        goto LABEL_4;
    }
    v5 = v3->pLinkUp;
    if ( v5 )
      v5->pLinkDn = v3->pLinkDn;
    else
      v2->m_pGuildWarListTop = v3->pLinkDn;
    v6 = v3->pLinkDn;
    if ( v6 )
      v6->pLinkUp = v3->pLinkUp;
    else
      v2->m_pGuildWarListBottom = v3->pLinkUp;
    operator delete(v3);
    --v2->m_NumOfWarList;
    result = 1;
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}

//----- (007361B0) --------------------------------------------------------
int __thiscall CGuildWarAble::Add(CGuildWarAble *this, SHINE_GUILD_WAR_ABLE_INFO *pWarInfo)
{
  CGuildWarAble *v2; // esi@1
  void *v3; // eax@1
  CGuildWarAble::GUILD_WAR_ABLE_LIST *v4; // ecx@6

  v2 = this;
  v3 = operator new(0x34u);
  if ( v3 )
  {
    *((_DWORD *)v3 + 4) = 0;
    *((_DWORD *)v3 + 3) = 0;
    *((_DWORD *)v3 + 2) = 0;
    *((_DWORD *)v3 + 1) = 0;
    *(_DWORD *)((char *)v3 + 38) = 0;
    *(_DWORD *)((char *)v3 + 34) = 0;
    *(_DWORD *)((char *)v3 + 30) = 0;
    *(_DWORD *)((char *)v3 + 26) = 0;
  }
  else
  {
    v3 = 0;
  }
  *((_DWORD *)v3 + 12) = 0;
  *((_DWORD *)v3 + 11) = v2->m_pGuildWarAbleListBottom;
  *(_DWORD *)v3 = pWarInfo->nNo;
  *(_QWORD *)((char *)v3 + 4) = *(_QWORD *)&pWarInfo->sName.n4_name[0];
  *(_QWORD *)((char *)v3 + 12) = *(_QWORD *)&pWarInfo->sName.n4_code[2];
  *((_BYTE *)v3 + 20) = pWarInfo->nType;
  *((_BYTE *)v3 + 21) = pWarInfo->nGrade;
  *((_BYTE *)v3 + 22) = pWarInfo->nWarStatus;
  *(_WORD *)((char *)v3 + 23) = pWarInfo->nNumMembers;
  *((_BYTE *)v3 + 25) = pWarInfo->nWarable;
  *(_QWORD *)((char *)v3 + 26) = *(_QWORD *)&pWarInfo->sTargetName.n4_name[0];
  *(_QWORD *)((char *)v3 + 34) = *(_QWORD *)&pWarInfo->sTargetName.n4_code[2];
  if ( !v2->m_pGuildWarAbleListTop )
    v2->m_pGuildWarAbleListTop = (CGuildWarAble::GUILD_WAR_ABLE_LIST *)v3;
  v4 = v2->m_pGuildWarAbleListBottom;
  if ( v4 )
    v4->pLinkDn = (CGuildWarAble::GUILD_WAR_ABLE_LIST *)v3;
  ++v2->m_NumOfWarAbleList;
  v2->m_pGuildWarAbleListBottom = (CGuildWarAble::GUILD_WAR_ABLE_LIST *)v3;
  return 1;
}

//----- (00736270) --------------------------------------------------------
int __thiscall CGuild::Recv_NC_GUILD_WAR_TARGET_CMD(CGuild *this, PROTO_NC_GUILD_WAR_TARGET_CMD *pCmd)
{
  int result; // eax@2

  if ( this->m_bIsGuild )
  {
    if ( pCmd->WarInfo.nRequestNo == this->m_Guild.nNo )
    {
      this->m_Guild.nWarEnemy = pCmd->WarInfo.nNo;
      *(_QWORD *)&this->m_Guild.sWarEnemyName.n4_name[0] = *(_QWORD *)&pCmd->WarInfo.sName.n4_name[0];
      *(_QWORD *)&this->m_Guild.sWarEnemyName.n4_code[2] = *(_QWORD *)&pCmd->WarInfo.sName.n4_code[2];
      this->m_Guild.nWarEnemyGrade = pCmd->WarInfo.nGrade;
      this->m_Guild.nWarStatus = pCmd->WarInfo.nWarStatus;
      this->m_Guild.dWarRequestDate = pCmd->WarInfo.dRequestDate;
      this->m_Guild.dWarStartDate = pCmd->WarInfo.dStartDate;
      this->m_Guild.dWarEndDate = pCmd->WarInfo.dEndDate;
      qmemcpy(
        &this->m_Guild.tm_dWarRequestDate,
        &pCmd->WarInfo.tm_dRequestDate,
        sizeof(this->m_Guild.tm_dWarRequestDate));
      qmemcpy(&this->m_Guild.tm_dWarStartDate, &pCmd->WarInfo.tm_dStartDate, sizeof(this->m_Guild.tm_dWarStartDate));
      qmemcpy(&this->m_Guild.tm_dWarEndDate, &pCmd->WarInfo.tm_dEndDate, sizeof(this->m_Guild.tm_dWarEndDate));
      qmemcpy(&this->m_Guild.MyScore, &pCmd->WarInfo.MyScore, sizeof(this->m_Guild.MyScore));
      qmemcpy(&this->m_Guild.EnemyScore, &pCmd->WarInfo.EnemyScore, sizeof(this->m_Guild.EnemyScore));
    }
    result = CGuildWar::Add(&this->m_GuildWar, &pCmd->WarInfo);
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00736350) --------------------------------------------------------
int __thiscall CGuild::Recv_NC_GUILD_WAR_END_CMD(CGuild *this, PROTO_NC_GUILD_WAR_END_CMD *pCmd)
{
  CGuild *v2; // esi@1
  int result; // eax@2
  unsigned int v4; // eax@3

  v2 = this;
  if ( this->m_bIsGuild )
  {
    v4 = pCmd->RequestNo;
    if ( this->m_Guild.nNo == v4 )
      CGuildWar::Update(&this->m_GuildWar, v4, 3, &this->m_Guild.dWarEndDate, &this->m_Guild.tm_dWarEndDate);
    else
      CGuildWar::Del(&this->m_GuildWar, pCmd->RequestNo);
    v2->m_Guild.nFame = pCmd->GuildTotalFame;
    result = 1;
    if ( pCmd->WarResult )
    {
      if ( pCmd->WarResult == 1 )
      {
        ++v2->m_Guild.nWarLoseCount;
      }
      else if ( pCmd->WarResult == 2 )
      {
        ++v2->m_Guild.nWarDrawCount;
      }
    }
    else
    {
      ++v2->m_Guild.nWarWinCount;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007363E0) --------------------------------------------------------
void __thiscall CGuildWar::Clear(CGuildWar *this)
{
  CGuildWar *v1; // esi@1
  CGuildWar::GUILD_WAR_LIST *v2; // eax@2

  v1 = this;
  while ( v1->m_pGuildWarListTop )
  {
    v2 = v1->m_pGuildWarListTop;
    v1->m_pGuildWarListTop = v2->pLinkDn;
    if ( v2 )
      operator delete(v2);
  }
  v1->m_NumOfWarList = 0;
  v1->m_pGuildWarListBottom = 0;
}

//----- (00736420) --------------------------------------------------------
void __thiscall CGuildWarAble::Clear(CGuildWarAble *this)
{
  CGuildWarAble *v1; // esi@1
  CGuildWarAble::GUILD_WAR_ABLE_LIST *v2; // eax@2

  v1 = this;
  while ( v1->m_pGuildWarAbleListTop )
  {
    v2 = v1->m_pGuildWarAbleListTop;
    v1->m_pGuildWarAbleListTop = v2->pLinkDn;
    if ( v2 )
      operator delete(v2);
  }
  v1->m_NumOfWarAbleList = 0;
  v1->m_pGuildWarAbleListBottom = 0;
}

//----- (00736460) --------------------------------------------------------
void __thiscall CGuild::Make(CGuild *this, unsigned int nNo, Name4 *pName, char nType, int dCreateDate)
{
  CGuild *v5; // ebx@1
  char *v6; // esi@1

  v5 = this;
  v6 = (char *)&this->m_Guild;
  memset((char *)&this->m_Guild, 0, 0x42Bu);
  *(_DWORD *)v6 = nNo;
  *(_QWORD *)&v5->m_Guild.sName.n4_name[0] = *(_QWORD *)&pName->n4_code[0];
  *(_QWORD *)&v5->m_Guild.sName.n4_code[2] = *(_QWORD *)&pName->n4_code[2];
  v5->m_Guild.nStoneLevel = 0;
  v5->m_Guild.nWarStatus = 0;
  v5->m_Guild.nType = nType;
  LODWORD(v5->m_Guild.nMoney) = 0;
  HIDWORD(v5->m_Guild.nMoney) = 0;
  v5->m_Guild.nGrade = 1;
  v5->m_Guild.nFame = 0;
  LODWORD(v5->m_Guild.nExp) = 0;
  HIDWORD(v5->m_Guild.nExp) = 0;
  *(_DWORD *)&v5->m_Guild.nNumMembers = 13107201;
  v5->m_Guild.dCreateDate = dCreateDate;
  v5->m_Guild.dWarRequestDate = dCreateDate;
  v5->m_Guild.dWarStartDate = dCreateDate;
  v5->m_Guild.dWarEndDate = dCreateDate;
  qmemcpy(&v5->m_Guild.tm_dCreateDate, _localtime32(&v5->m_Guild.dCreateDate), sizeof(v5->m_Guild.tm_dCreateDate));
  qmemcpy(
    &v5->m_Guild.tm_dWarRequestDate,
    _localtime32(&v5->m_Guild.dWarRequestDate),
    sizeof(v5->m_Guild.tm_dWarRequestDate));
  qmemcpy(&v5->m_Guild.tm_dWarStartDate, _localtime32(&v5->m_Guild.dWarStartDate), sizeof(v5->m_Guild.tm_dWarStartDate));
  qmemcpy(&v5->m_Guild.tm_dWarEndDate, _localtime32(&v5->m_Guild.dWarEndDate), sizeof(v5->m_Guild.tm_dWarEndDate));
  v5->m_Guild.nWarEnemy = 0;
  v5->m_Guild.sWarEnemyName.n4_code[3] = 0;
  v5->m_Guild.sWarEnemyName.n4_code[2] = 0;
  v5->m_Guild.sWarEnemyName.n4_code[1] = 0;
  v5->m_Guild.sWarEnemyName.n4_code[0] = 0;
  strncpy(v5->m_Guild.sWarEnemyName.n4_name, (char *)&unk_96F8EB, 0x10u);
  v5->m_Guild.nWarEnemyGrade = 0;
  v5->m_Guild.nWarWinCount = 0;
  v5->m_Guild.nWarLoseCount = 0;
  v5->m_Guild.nWarDrawCount = 0;
  v5->m_Guild.nDismissStatus = 0;
  v5->m_Guild.dDismissDate = dCreateDate;
  qmemcpy(&v5->m_Guild.tm_dDismissDate, _localtime32(&v5->m_Guild.dDismissDate), sizeof(v5->m_Guild.tm_dDismissDate));
  v5->m_Guild.sIntro[0] = 0;
  v5->m_Guild.dNotifyDate = dCreateDate;
  qmemcpy(&v5->m_Guild.tm_dDismissDate, _localtime32(&v5->m_Guild.dDismissDate), sizeof(v5->m_Guild.tm_dDismissDate));
  v5->m_Guild.sNotifyCharID.n5_code[4] = 0;
  v5->m_Guild.sNotifyCharID.n5_code[3] = 0;
  v5->m_Guild.sNotifyCharID.n5_code[2] = 0;
  v5->m_Guild.sNotifyCharID.n5_code[1] = 0;
  v5->m_Guild.sNotifyCharID.n5_code[0] = 0;
  strncpy(v5->m_Guild.sNotifyCharID.n5_name, (char *)&unk_96F8EB, 0x14u);
  v5->m_Guild.sNotify[0] = 0;
  v5->m_EmblemInfo = (GUILD_EMBLEM_INFO)-1;
  v5->m_EmblemState = 255;
  v5->m_EmblemCreateDate = 0;
  v5->m_EmblemDeleteDate = 0;
  v5->m_bIsGuild = 1;
  CGuildWar::Clear(&v5->m_GuildWar);
  LODWORD(v5->m_GuildToken) = 0;
  HIDWORD(v5->m_GuildToken) = 0;
  *(_WORD *)&v5->m_GTCondInfo.nGTGrade = 0;
  v5->m_GTCondInfo.nMatchTime = dCreateDate;
  v5->m_GTCondInfo.nMyGTCondition = 0;
  qmemcpy(
    &v5->m_GTCondInfo.tm_nMatchTime,
    _localtime32(&v5->m_GTCondInfo.nMatchTime),
    sizeof(v5->m_GTCondInfo.tm_nMatchTime));
}

//----- (00736660) --------------------------------------------------------
int __thiscall CGuild::Recv_NC_GUILD_MAKE_ACK(CGuild *this, PROTO_NC_GUILD_MAKE_ACK *pAck)
{
  CGuild::Make(this, pAck->No, &pAck->Name, pAck->Type, pAck->dCreateDate);
  return 1;
}

//----- (00736690) --------------------------------------------------------
int __thiscall CGuild::Recv_NC_GUILD_WAR_LIST_ACK(CGuild *this, PROTO_NC_GUILD_WAR_LIST_ACK *pAck)
{
  PROTO_NC_GUILD_WAR_LIST_ACK *v2; // ebx@1
  CGuild *v3; // esi@1
  int result; // eax@2
  signed int v5; // edi@5
  SHINE_GUILD_WAR_INFO *v6; // esi@6
  PROTO_NC_GUILD_WAR_LIST_ACK *pAcka; // [sp+10h] [bp+8h]@6

  v2 = pAck;
  v3 = this;
  if ( pAck->Error == 3137 )
  {
    if ( pAck->PartMask & 1 )
      CGuildWar::Clear(&this->m_GuildWar);
    v5 = 0;
    if ( pAck->NumOfWarInfo > 0u )
    {
      pAcka = (PROTO_NC_GUILD_WAR_LIST_ACK *)&v3->m_GuildWar;
      v6 = (SHINE_GUILD_WAR_INFO *)&v2[1];
      do
      {
        CGuildWar::Add((CGuildWar *)pAcka, v6);
        ++v5;
        ++v6;
      }
      while ( v5 < v2->NumOfWarInfo );
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00736710) --------------------------------------------------------
void __thiscall CGuild::CGuild(CGuild *this)
{
  this->vfptr = (CGuildVtbl *)&CGuild::`vftable';
  *(_QWORD *)&this->m_Guild.sName.n4_code[2] = 0i64;
  *(_QWORD *)&this->m_Guild.sName.n4_name[0] = 0i64;
  *(_QWORD *)&this->m_Guild.sWarEnemyName.n4_code[2] = 0i64;
  *(_QWORD *)&this->m_Guild.sWarEnemyName.n4_name[0] = 0i64;
  *(_QWORD *)&this->m_Guild.sNotifyCharID.n5_code[3] = 0i64;
  *(_QWORD *)&this->m_Guild.sNotifyCharID.n5_code[1] = 0i64;
  this->m_Guild.sNotifyCharID.n5_code[0] = 0;
  this->m_GuildWar.m_NumOfWarList = 0;
  this->m_GuildWar.m_pGuildWarListTop = 0;
  this->m_GuildWar.m_pGuildWarListBottom = 0;
  *(_QWORD *)&this->m_GuildAcademy.sAcademyMasterName.n5_code[3] = 0i64;
  *(_QWORD *)&this->m_GuildAcademy.sAcademyMasterName.n5_code[1] = 0i64;
  this->m_GuildAcademy.sAcademyMasterName.n5_code[0] = 0;
  *(_QWORD *)&this->m_GuildAcademy.sNotifyCharID.n5_code[3] = 0i64;
  *(_QWORD *)&this->m_GuildAcademy.sNotifyCharID.n5_code[1] = 0i64;
  this->m_GuildAcademy.sNotifyCharID.n5_code[0] = 0;
  this->m_GuildAcademyGraduateCount = 0;
  this->m_bIsGuild = 0;
  this->m_GuildToken = 0i64;
  this->m_bIsGuildAcademy = 0;
  this->m_bisGuildAcademyBuff = 0;
  this->m_PreAcademyRank = 0;
  this->nAcademyRewardStorageMoney = 0i64;
  this->m_EmblemInfo = (GUILD_EMBLEM_INFO)-1;
  this->m_EmblemState = 255;
  this->m_EmblemCreateDate = 0;
  this->m_EmblemDeleteDate = 0;
}
// 9CF28C: using guessed type int (__thiscall *CGuild::`vftable')(CGuild *this, struct PROTO_NC_GUILD_MAKE_ACK *);

//----- (00736810) --------------------------------------------------------
void __thiscall CGuild::~CGuild(CGuild *this)
{
  this->vfptr = (CGuildVtbl *)&CGuild::`vftable';
  CGuildWar::Clear(&this->m_GuildWar);
}
// 9CF28C: using guessed type int (__thiscall *CGuild::`vftable')(CGuild *this, struct PROTO_NC_GUILD_MAKE_ACK *);

//----- (00736830) --------------------------------------------------------
void __thiscall PROTO_KQ_MAP_INFO::PROTO_KQ_MAP_INFO(PROTO_KQ_MAP_INFO *this)
{
  *(_QWORD *)&this->MapBase.n3_code[1] = 0i64;
  this->MapBase.n3_code[0] = 0;
  *(_QWORD *)&this->MapName.n3_code[1] = 0i64;
  this->MapName.n3_code[0] = 0;
}

//----- (00736850) --------------------------------------------------------
void __thiscall CKQ::Clear(CKQ *this)
{
  CKQ *v1; // esi@1

  v1 = this;
  this->m_ServerTime = _time32(0);
  v1->m_NumOfSchedule = 0;
}

//----- (00736870) --------------------------------------------------------
int __thiscall CKQ::Del(CKQ *this, unsigned int Handle)
{
  int v2; // edx@1
  int v3; // esi@1
  char *v4; // eax@2
  int result; // eax@5

  v2 = this->m_NumOfSchedule;
  v3 = 0;
  if ( this->m_NumOfSchedule <= 0 )
  {
LABEL_5:
    result = -1;
  }
  else
  {
    v4 = (char *)this->m_Schedule;
    while ( *(_DWORD *)v4 != Handle )
    {
      ++v3;
      v4 += 377;
      if ( v3 >= v2 )
        goto LABEL_5;
    }
    if ( v3 != -1 )
    {
      this->m_NumOfSchedule = v2 - 1;
      memcpy((char *)&this->m_Schedule[v3], (char *)&this->m_Schedule[v3 + 1], 377 * (v2 - 1 - v3));
    }
    result = v3;
  }
  return result;
}

//----- (007368E0) --------------------------------------------------------
PROTO_KQ_INFO *__thiscall CKQ::Get(CKQ *this, unsigned int Handle)
{
  int v2; // eax@1
  char *v3; // edx@2
  PROTO_KQ_INFO *result; // eax@5

  v2 = 0;
  if ( this->m_NumOfSchedule <= 0 )
    goto LABEL_5;
  v3 = (char *)this->m_Schedule;
  while ( *(_DWORD *)v3 != Handle )
  {
    ++v2;
    v3 += 377;
    if ( v2 >= this->m_NumOfSchedule )
      goto LABEL_5;
  }
  if ( v2 == -1 )
LABEL_5:
    result = 0;
  else
    result = &this->m_Schedule[v2];
  return result;
}

//----- (00736920) --------------------------------------------------------
void __thiscall CKQ::Add(CKQ *this, PROTO_NC_KQ_LIST_ADD_ACK *pAddInfo)
{
  CKQ *v2; // edx@1
  PROTO_NC_KQ_LIST_ADD_ACK *v3; // ebx@2
  int v4; // esi@3
  int v5; // eax@4
  PROTO_KQ_INFO *v6; // ecx@5
  int i; // [sp+4h] [bp-4h]@1

  v2 = this;
  i = 0;
  if ( pAddInfo->NumOfAdd > 0u )
  {
    v3 = pAddInfo + 1;
    do
    {
      v4 = v2->m_NumOfSchedule;
      if ( v2->m_NumOfSchedule < 300 )
      {
        v5 = 0;
        if ( v4 <= 0 )
          goto LABEL_8;
        v6 = v2->m_Schedule;
        while ( v6->Handle != *(_DWORD *)&v3->NumOfAdd )
        {
          ++v5;
          ++v6;
          if ( v5 >= v4 )
            goto LABEL_8;
        }
        if ( v5 == -1 )
        {
LABEL_8:
          qmemcpy(&v2->m_Schedule[v4], v3, 0x8Du);
          ++v2->m_NumOfSchedule;
        }
        else
        {
          qmemcpy(&v2->m_Schedule[v5], v3, 0x8Du);
        }
      }
      v3 = (PROTO_NC_KQ_LIST_ADD_ACK *)((char *)v3 + 141);
      ++i;
    }
    while ( i < pAddInfo->NumOfAdd );
  }
}

//----- (007369C0) --------------------------------------------------------
int __thiscall CKQ::Update(CKQ *this, PROTO_NC_KQ_LIST_UPDATE_ACK *pUpdateInfo)
{
  PROTO_NC_KQ_LIST_UPDATE_ACK *v2; // ebx@2
  int v3; // edx@3
  char *v4; // esi@4
  int result; // eax@9
  int v6; // edx@11
  int bSucc; // [sp+4h] [bp-8h]@1
  int i; // [sp+8h] [bp-4h]@1

  bSucc = 1;
  i = 0;
  if ( pUpdateInfo->NumOfUpdate <= 0u )
  {
    result = 1;
  }
  else
  {
    v2 = pUpdateInfo + 3;
    do
    {
      v3 = 0;
      if ( this->m_NumOfSchedule <= 0 )
        goto LABEL_7;
      v4 = (char *)this->m_Schedule;
      while ( *(_DWORD *)v4 != *(_DWORD *)&v2[-2].NumOfUpdate )
      {
        ++v3;
        v4 += 377;
        if ( v3 >= this->m_NumOfSchedule )
          goto LABEL_7;
      }
      if ( v3 == -1 )
      {
LABEL_7:
        bSucc = 0;
      }
      else
      {
        v6 = v3;
        this->m_Schedule[v6].Status = v2->NumOfUpdate;
        this->m_Schedule[v6].NumOfJoiner = *(unsigned __int16 *)((char *)v2 + 1);
      }
      v2 = (PROTO_NC_KQ_LIST_UPDATE_ACK *)((char *)v2 + 7);
      ++i;
    }
    while ( i < pUpdateInfo->NumOfUpdate );
    result = bSucc;
  }
  return result;
}

//----- (00736A50) --------------------------------------------------------
void __thiscall PROTO_KQ_INFO::PROTO_KQ_INFO(PROTO_KQ_INFO *this)
{
  `eh vector constructor iterator'(
    this->MapLink,
    0x1Au,
    4,
    (void (__thiscall *)(void *))PROTO_KQ_MAP_INFO::PROTO_KQ_MAP_INFO,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
}

//----- (00736A80) --------------------------------------------------------
void __thiscall PROTO_KQ_INFO::~PROTO_KQ_INFO(PROTO_KQ_INFO *this)
{
  `eh vector destructor iterator'(
    this->MapLink,
    0x1Au,
    4,
    (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
}

//----- (00736AA0) --------------------------------------------------------
void __thiscall CKQ::~CKQ(CKQ *this)
{
  CKQ *v1; // esi@1

  v1 = this;
  this->m_ServerTime = _time32(0);
  v1->m_NumOfSchedule = 0;
  `eh vector destructor iterator'(
    v1->m_Schedule,
    0x179u,
    300,
    (void (__thiscall *)(void *))PROTO_KQ_INFO::~PROTO_KQ_INFO);
}

//----- (00736AE0) --------------------------------------------------------
void __thiscall CKQ::CKQ(CKQ *this)
{
  CKQ *v1; // esi@1

  v1 = this;
  `eh vector constructor iterator'(
    this->m_Schedule,
    0x179u,
    300,
    (void (__thiscall *)(void *))PROTO_KQ_INFO::PROTO_KQ_INFO,
    (void (__thiscall *)(void *))PROTO_KQ_INFO::~PROTO_KQ_INFO);
  v1->m_ServerTime = _time32(0);
  v1->m_NumOfSchedule = 0;
}

//----- (00736B20) --------------------------------------------------------
char __thiscall CFindWay::Load(CFindWay *this, const char *_szFileName)
{
  CFindWay *v2; // esi@1
  _iobuf *v3; // eax@1
  _iobuf *v4; // edi@1
  char result; // al@2
  unsigned int *v6; // ebx@4
  char *v7; // eax@5
  char *v8; // eax@7
  unsigned int v9; // ST04_4@7
  int v10; // edx@9

  v2 = this;
  v3 = fopen(_szFileName, "rb");
  v4 = v3;
  if ( v3 && fread(&v2->m_uiRealOneSideDataSize, 4u, 1u, v3) == 1 )
  {
    v6 = &v2->m_uiOneSideBlockCnt;
    if ( fread(&v2->m_uiOneSideBlockCnt, 4u, 1u, v4) != 1 )
      goto LABEL_12;
    v7 = v2->m_pBlockInfoByte;
    v2->m_uiRealTotalBlockSize = v2->m_uiRealOneSideDataSize * *v6;
    if ( v7 )
    {
      operator delete(v7);
      v2->m_pBlockInfoByte = 0;
    }
    v8 = (char *)operator new[](v2->m_uiRealTotalBlockSize);
    v9 = v2->m_uiRealTotalBlockSize;
    v2->m_pBlockInfoByte = v8;
    if ( fread(v8, v9, 1u, v4) == 1 )
    {
      fclose(v4);
      v10 = 8 * v2->m_uiRealOneSideDataSize;
      v2->FWMapSy = *v6;
      v2->FWMapSx = v10;
      v2->m_bLoaded = 1;
      result = 1;
    }
    else
    {
LABEL_12:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00736BF0) --------------------------------------------------------
bool __thiscall CFindWay::GetBlock(CFindWay *this, unsigned int _uiX, unsigned int _uiY)
{
  unsigned int v3; // eax@1
  bool result; // al@3

  v3 = this->m_uiOneSideBlockCnt;
  if ( _uiX >= v3 || _uiY >= v3 )
    result = 1;
  else
    result = ((unsigned __int8)(1 << (_uiX - 8 * (_uiX >> 3))) & *(&this->m_pBlockInfoByte[_uiY
                                                                                         * this->m_uiRealOneSideDataSize]
                                                                 + (_uiX >> 3))) != 0;
  return result;
}

//----- (00736C40) --------------------------------------------------------
bool __thiscall CFindWay::GetBlock(CFindWay *this, float _fX, float _fY)
{
  CFindWay *v3; // esi@1
  unsigned int v4; // ecx@1
  unsigned int v5; // eax@1
  unsigned int v6; // edi@1
  bool result; // al@3

  v3 = this;
  v4 = (signed __int64)(_fX / 6.25);
  v5 = v3->m_uiOneSideBlockCnt;
  v6 = (signed __int64)(_fY / 6.25);
  if ( v4 >= v5 || v6 >= v5 )
    result = 1;
  else
    result = ((unsigned __int8)(1 << (v4 - 8 * (v4 >> 3))) & *(&v3->m_pBlockInfoByte[v6 * v3->m_uiRealOneSideDataSize]
                                                             + (v4 >> 3))) != 0;
  return result;
}

//----- (00736CD0) --------------------------------------------------------
void __thiscall CFindWay::~CFindWay(CFindWay *this)
{
  CFindWay *v1; // esi@1

  v1 = this;
  if ( this->m_pBlockInfoByte && this->m_bLoaded == 1 )
  {
    operator delete(this->m_pBlockInfoByte);
    v1->m_pBlockInfoByte = 0;
    v1->m_bLoaded = 0;
  }
  if ( v1->LenMap )
  {
    operator delete(v1->LenMap);
    v1->LenMap = 0;
  }
}

//----- (00736D20) --------------------------------------------------------
int __thiscall CFindWay::LineIntersect(CFindWay *this)
{
  CFindWay *v1; // edi@1
  unsigned int v2; // eax@1
  unsigned int v3; // ebx@1
  unsigned int v4; // ecx@1
  unsigned int v5; // esi@1
  unsigned int v6; // eax@1
  signed int v7; // edx@1
  unsigned int v8; // edx@14
  unsigned int by; // [sp+10h] [bp-1Ch]@1
  unsigned int x; // [sp+14h] [bp-18h]@1
  signed int v12; // [sp+18h] [bp-14h]@1
  unsigned int v13; // [sp+1Ch] [bp-10h]@5
  unsigned int ay; // [sp+20h] [bp-Ch]@5
  unsigned int y; // [sp+24h] [bp-8h]@1

  v1 = this;
  v2 = this->LineStartPos.X - this->Pos.X;
  v3 = this->LineStartPos.Y;
  v4 = this->LineStartPos.X;
  v5 = abs(v2);
  x = v4;
  v6 = abs(v3 - v1->Pos.Y);
  y = v3;
  v12 = v1->Pos.X < v4 ? -1 : 1;
  v7 = v1->Pos.Y < v3 ? -1 : 1;
  by = v1->Pos.Y < v3 ? -1 : 1;
  if ( !v5 )
    v12 = 0;
  if ( !v6 )
  {
    v7 = 0;
    by = 0;
  }
  v13 = v5;
  ay = v6;
  while ( v4 != v1->Pos.X || y != v1->Pos.Y )
  {
    if ( v6 < v5 == 1 )
    {
      v4 += v12;
      ay += v6;
      x = v4;
      if ( ay > v5 )
      {
        y += v7;
        ay -= v5;
      }
    }
    else
    {
      y += v7;
      v13 += v5;
      if ( v13 > v6 )
      {
        v4 += v12;
        v13 -= v6;
        x = v4;
      }
    }
    v8 = v1->m_uiOneSideBlockCnt;
    if ( v4 >= v8
      || y >= v8
      || (unsigned __int8)(1 << (v4 - 8 * (v4 >> 3))) & *(&v1->m_pBlockInfoByte[y * v1->m_uiRealOneSideDataSize]
                                                        + (v4 >> 3)) )
    {
      return 1;
    }
    v4 = x;
    v7 = by;
  }
  return 0;
}

//----- (00736E40) --------------------------------------------------------
void __thiscall CFindWay::LenMapInit(CFindWay *this, int nSizeX, int nSizeY)
{
  CFindWay *v3; // esi@1

  v3 = this;
  if ( this->LenMap && (this->LenMapSx != nSizeX || this->LenMapSy != nSizeY) )
  {
    operator delete(this->LenMap);
    v3->LenMap = 0;
  }
  if ( !v3->LenMap )
  {
    v3->LenMap = (unsigned __int16 *)operator new[](2 * nSizeY * nSizeX);
    v3->LenMapSx = nSizeX;
    v3->LenMapSy = nSizeY;
  }
}

//----- (00736EC0) --------------------------------------------------------
void __thiscall CFindWay::LenMapClear(CFindWay *this)
{
  CFindWay *v1; // esi@1
  signed int v2; // ecx@1
  int v3; // ebx@1
  signed int v4; // edi@1
  int v5; // eax@1
  int v6; // edx@5
  int v7; // edx@7
  int v8; // [sp+Ch] [bp-10h]@1
  int v9; // [sp+10h] [bp-Ch]@4
  int v10; // [sp+14h] [bp-8h]@2
  int v11; // [sp+18h] [bp-4h]@1

  v1 = this;
  memset((char *)this->LenMap, -1, 2 * this->LenMapSy * this->LenMapSx);
  v2 = v1->StartPos.X;
  v3 = (signed int)(v1->EndPos.X - v2) / 2 - v1->LenMapSx / 2 + v2;
  v11 = v1->LenMapSy / 2;
  v8 = v1->LenMapSx / 2;
  v4 = v1->StartPos.Y;
  v5 = v4 + (signed int)(v1->EndPos.Y - v4) / 2 - v11;
  v1->BaseLenMapX = v3;
  v1->BaseLenMapY = v5;
  if ( v2 < v3
    || (v10 = v3 + v1->LenMapSx, v2 >= v10)
    || v4 < v5
    || (v9 = v5 + v1->LenMapSy, v4 >= v9)
    || (v6 = v1->EndPos.X, v6 < v3)
    || v6 >= v10
    || (v7 = v1->EndPos.Y, v7 < v5)
    || v7 >= v9 )
  {
    v1->BaseLenMapX = v2 - v8;
    v1->BaseLenMapY = v4 - v11;
    v1->LenMapInRange = 0;
  }
  else
  {
    v1->LenMapInRange = 1;
  }
}

//----- (00736FC0) --------------------------------------------------------
int __thiscall CFindWay::LenMapSet(CFindWay *this, int x, int y, unsigned __int16 value)
{
  int v4; // esi@1
  int result; // eax@2
  int v6; // edx@3
  int v7; // edi@4

  v4 = this->BaseLenMapX;
  if ( v4 > x || (v6 = this->BaseLenMapY, v6 > y) )
  {
    result = 0;
  }
  else
  {
    v7 = this->LenMapSx;
    if ( v7 + v4 > x && v6 + this->LenMapSy > y )
    {
      this->LenMap[x + v7 * (y - v6) - v4] = value;
      result = 1;
    }
    else
    {
      result = 0;
    }
  }
  return result;
}

//----- (00737030) --------------------------------------------------------
int __thiscall CFindWay::SearchMoveable(CFindWay *this)
{
  unsigned __int16 v1; // bx@1
  CFindWay *v2; // esi@1
  unsigned int v3; // ecx@1
  unsigned int v4; // eax@1
  unsigned int v5; // edx@1
  unsigned int v6; // edi@2
  unsigned int v7; // eax@3
  int v8; // ecx@7
  __int16 v9; // bx@9
  __int16 v10; // ax@9
  int v11; // ecx@14
  __int16 v12; // bx@16
  __int16 v13; // ax@16
  unsigned int v14; // edi@20
  unsigned int v15; // eax@21
  int v16; // ecx@25
  __int16 v17; // bx@27
  __int16 v18; // ax@27
  unsigned int v19; // eax@29
  int v20; // ecx@33
  __int16 v21; // bx@35
  __int16 v22; // ax@35
  unsigned int v23; // eax@39
  unsigned int v24; // eax@41
  unsigned int v25; // ecx@47
  unsigned int v26; // eax@49
  int P1; // [sp+Ch] [bp-20h]@1
  unsigned int P1_4; // [sp+10h] [bp-1Ch]@1
  unsigned int P2; // [sp+14h] [bp-18h]@1
  unsigned int P2_4; // [sp+18h] [bp-14h]@1
  unsigned __int16 FoundLen; // [sp+1Ch] [bp-10h]@0
  signed int v33; // [sp+20h] [bp-Ch]@1
  signed int v34; // [sp+24h] [bp-8h]@1
  int FoundOne; // [sp+28h] [bp-4h]@1

  v1 = FoundLen;
  v2 = this;
  v3 = this->EndPos.Y;
  v4 = v2->EndPos.X;
  v5 = v4 - 1;
  P2_4 = v3 + 1;
  P1_4 = v3 - 1;
  FoundOne = 0;
  P1 = v4 - 1;
  P2 = v4 + 1;
  v34 = v3;
  v33 = v3;
  while ( 2 )
  {
    v6 = v5;
    if ( (signed int)v5 >= (signed int)P2 )
      goto LABEL_20;
    do
    {
      v7 = v2->m_uiOneSideBlockCnt;
      if ( v6 >= v7 )
        goto LABEL_18;
      if ( P1_4 < v7
        && !((unsigned __int8)(1 << (v6 - 8 * (v6 >> 3))) & *(&v2->m_pBlockInfoByte[P1_4 * v2->m_uiRealOneSideDataSize]
                                                            + (v6 >> 3))) )
      {
        if ( !FoundOne )
        {
          v9 = abs(v6 - v2->StartPos.X);
          v10 = abs(P1_4 - v2->StartPos.Y);
          v2->NewPos.Y = P1_4;
          v1 = v10 + v9;
          FoundOne = 1;
          goto LABEL_10;
        }
        v8 = abs(P1_4 - v2->StartPos.Y) + abs(v6 - v2->StartPos.X);
        if ( v1 > (unsigned __int16)v8 )
        {
          v2->NewPos.Y = P1_4;
          v1 = v8;
LABEL_10:
          v2->NewPos.X = v6;
          goto LABEL_11;
        }
      }
LABEL_11:
      if ( P2_4 < v2->m_uiOneSideBlockCnt
        && !((unsigned __int8)(1 << (v6 - 8 * (v6 >> 3))) & *(&v2->m_pBlockInfoByte[P2_4 * v2->m_uiRealOneSideDataSize]
                                                            + (v6 >> 3))) )
      {
        if ( FoundOne )
        {
          v11 = abs(P2_4 - v2->StartPos.Y) + abs(v6 - v2->StartPos.X);
          if ( v1 <= (unsigned __int16)v11 )
            goto LABEL_18;
          v2->NewPos.Y = P2_4;
          v1 = v11;
        }
        else
        {
          v12 = abs(v6 - v2->StartPos.X);
          v13 = abs(P2_4 - v2->StartPos.Y);
          v2->NewPos.Y = P2_4;
          v1 = v13 + v12;
          FoundOne = 1;
        }
        v2->NewPos.X = v6;
      }
LABEL_18:
      ++v6;
    }
    while ( (signed int)v6 < (signed int)P2 );
    v5 = P1;
LABEL_20:
    v14 = v33;
    if ( v33 < v34 )
    {
      while ( 2 )
      {
        v15 = v2->m_uiOneSideBlockCnt;
        if ( v5 < v15
          && v14 < v15
          && !((unsigned __int8)(1 << (v5 - 8 * (v5 >> 3))) & *(&v2->m_pBlockInfoByte[v14 * v2->m_uiRealOneSideDataSize]
                                                              + (v5 >> 3))) )
        {
          if ( FoundOne )
          {
            v16 = abs(P1 - v2->StartPos.X) + abs(v14 - v2->StartPos.Y);
            if ( v1 > (unsigned __int16)v16 )
            {
              v2->NewPos.X = P1;
              v1 = v16;
              goto LABEL_28;
            }
          }
          else
          {
            v17 = abs(v14 - v2->StartPos.Y);
            v18 = abs(P1 - v2->StartPos.X);
            v2->NewPos.X = P1;
            v1 = v18 + v17;
            FoundOne = 1;
LABEL_28:
            v2->NewPos.Y = v14;
          }
        }
        v19 = v2->m_uiOneSideBlockCnt;
        if ( P2 < v19
          && v14 < v19
          && !((unsigned __int8)(1 << (P2 - 8 * (P2 >> 3))) & *(&v2->m_pBlockInfoByte[v14 * v2->m_uiRealOneSideDataSize]
                                                              + (P2 >> 3))) )
        {
          if ( FoundOne )
          {
            v20 = abs(P2 - v2->StartPos.X) + abs(v14 - v2->StartPos.Y);
            if ( v1 > (unsigned __int16)v20 )
            {
              v2->NewPos.X = P2;
              v1 = v20;
              goto LABEL_36;
            }
          }
          else
          {
            v21 = abs(v14 - v2->StartPos.Y);
            v22 = abs(P2 - v2->StartPos.X);
            v2->NewPos.X = P2;
            v1 = v22 + v21;
            FoundOne = 1;
LABEL_36:
            v2->NewPos.Y = v14;
          }
        }
        v5 = P1;
        if ( (signed int)++v14 >= v34 )
          break;
        continue;
      }
    }
    if ( !FoundOne )
    {
      v23 = v2->StartPos.X;
      if ( v23 >= v5 && v23 <= P2 )
      {
        v24 = v2->StartPos.Y;
        if ( v24 >= P1_4 && v24 <= P2_4 )
          return 0;
      }
      if ( v5 )
        P1 = --v5;
      if ( P1_4 )
      {
        --P1_4;
        --v33;
      }
      v25 = v2->FWMapSx;
      if ( P2 < v25 )
        ++P2;
      v26 = v2->FWMapSy;
      if ( P2_4 < v26 )
      {
        ++P2_4;
        ++v34;
      }
      if ( !(v5 + P1_4) && P2 + P2_4 == v26 + v25 - 2 )
        return 0;
      continue;
    }
    return 1;
  }
}

//----- (007373C0) --------------------------------------------------------
void __thiscall CFindWay::FindWay(CFindWay *this)
{
  CFindWay *v1; // esi@1
  unsigned int v2; // ecx@1
  unsigned int v3; // eax@1
  unsigned int v4; // edi@1
  unsigned int v5; // ecx@4
  unsigned int v6; // eax@4
  unsigned int v7; // edx@4
  unsigned int v8; // ecx@5
  unsigned int v9; // edx@5
  unsigned int v10; // ecx@8
  unsigned int v11; // edx@8
  unsigned int v12; // ecx@9
  unsigned int v13; // edx@9
  unsigned int v14; // eax@9
  unsigned int v15; // ecx@10
  unsigned int v16; // edx@10
  unsigned int v17; // eax@11
  int v18; // ebx@11
  unsigned int v19; // ecx@11
  int v20; // edi@11
  int v21; // eax@11
  int v22; // ecx@11
  unsigned int v23; // eax@11
  unsigned int v24; // ecx@11
  unsigned int v25; // edi@12
  int v26; // edx@12
  unsigned int v27; // eax@12
  unsigned int v28; // ecx@16
  unsigned int v29; // edx@17
  int v30; // ecx@18
  int v31; // edx@18
  int v32; // eax@18
  int v33; // edi@19
  int v34; // eax@22
  unsigned int v35; // edx@22
  signed int v36; // edi@23
  int v37; // ecx@23
  int v38; // eax@23
  int v39; // edx@24
  unsigned int v40; // ecx@28
  int v41; // edx@31
  int v42; // ecx@32
  unsigned int v43; // eax@35
  int v44; // eax@35
  int v45; // ecx@35
  __int16 v46; // di@35
  unsigned int v47; // eax@35
  unsigned int v48; // ecx@36
  signed int v49; // edx@38
  int v50; // eax@40
  unsigned int v51; // eax@41
  unsigned int v52; // ecx@45
  unsigned int v53; // edx@45
  unsigned int v54; // ecx@46
  unsigned int v55; // edx@46
  int v56; // edi@49
  int v57; // ecx@49
  int v58; // eax@49
  int v59; // edx@51
  int v60; // ebx@54
  int v61; // eax@58
  int v62; // ecx@58
  int v63; // edx@59
  int v64; // ebx@62
  int v65; // eax@66
  int v66; // ecx@66
  int v67; // edx@67
  int v68; // ebx@70
  int v69; // eax@74
  int v70; // ecx@74
  int v71; // edx@75
  int v72; // ebx@78
  bool v73; // zf@82
  unsigned int v74; // ecx@83
  unsigned int v75; // edx@83
  int v76; // eax@83
  int v77; // eax@85
  unsigned int v78; // edx@85
  unsigned int v79; // ebx@85
  int v80; // edi@85
  int v81; // eax@87
  unsigned __int16 v82; // [sp+10h] [bp-14h]@22
  unsigned int v83; // [sp+10h] [bp-14h]@85
  int v84; // [sp+14h] [bp-10h]@26
  int j; // [sp+18h] [bp-Ch]@25
  int ja; // [sp+18h] [bp-Ch]@49
  int jb; // [sp+18h] [bp-Ch]@85
  unsigned int BI; // [sp+1Ch] [bp-8h]@22
  signed __int16 BIa; // [sp+1Ch] [bp-8h]@46
  char v90; // [sp+23h] [bp-1h]@49
  char v91; // [sp+23h] [bp-1h]@58
  char v92; // [sp+23h] [bp-1h]@66
  char v93; // [sp+23h] [bp-1h]@74

  v1 = this;
  v2 = this->EndPos.X;
  v3 = v1->m_uiOneSideBlockCnt;
  v4 = v1->EndPos.Y;
  v1->NoJunc = 0;
  v1->ChangedEndPos = 0;
  if ( v2 >= v3
    || v4 >= v3
    || (unsigned __int8)(1 << (v2 - 8 * (v2 >> 3))) & *(&v1->m_pBlockInfoByte[v4 * v1->m_uiRealOneSideDataSize]
                                                      + (v2 >> 3)) )
  {
    v5 = v1->StartPos.X;
    v6 = v1->EndPos.Y;
    v1->LineStartPos.X = v1->EndPos.X;
    v7 = v1->StartPos.Y;
    v1->Pos.X = v5;
    v1->LineStartPos.Y = v6;
    v1->Pos.Y = v7;
    if ( !CFindWay::SearchMoveable(v1) )
    {
      v10 = v1->StartPos.X;
      v11 = v1->StartPos.Y;
      v1->GoalReached = 0;
      v1->ChangedEndPos = 1;
      v1->EndPos.X = v10;
      v1->EndPos.Y = v11;
      v1->JuncList[0].X = v10;
      v1->JuncList[0].Y = v11;
      v1->NumOfJunc = 1;
      return;
    }
    v8 = v1->NewPos.Y;
    v9 = v1->NewPos.X;
    v1->EndPos.X = v9;
    v1->EndPos.Y = v8;
    v1->JuncList[0].X = v9;
    v1->JuncList[0].Y = v8;
    v1->ChangedEndPos = 1;
    if ( v9 == v1->StartPos.X && v8 == v1->StartPos.Y )
    {
      v1->NumOfJunc = 1;
      v1->GoalReached = 0;
      return;
    }
  }
  v12 = v1->StartPos.Y;
  v13 = v1->EndPos.X;
  v1->LineStartPos.X = v1->StartPos.X;
  v14 = v1->EndPos.Y;
  v1->LineStartPos.Y = v12;
  v1->Pos.X = v13;
  v1->Pos.Y = v14;
  if ( CFindWay::LineIntersect(v1) )
  {
    CFindWay::LenMapClear(v1);
    v17 = v1->StartPos.X;
    v18 = v1->StartPos.Y;
    v19 = v1->StartPos.Y;
    v1->PList[0].X = v17;
    v1->PCnt = 1;
    v20 = v17;
    v21 = v18 - v1->EndPos.Y;
    v1->PList[0].Y = v19;
    v1->DiffY = v21;
    v22 = v20 - v1->EndPos.X;
    v1->DiffX = v22;
    v1->LList[0] = abs(v22) + abs(v21);
    CFindWay::LenMapSet(v1, v20, v18, 1u);
    v23 = v1->StartPos.Y;
    v24 = v1->StartPos.X;
    v1->Pos.X = v24;
    v1->Pos.Y = v23;
    v1->NewPos.X = v24;
    v1->NewPos.Y = v23;
    v1->Step = 1;
    v1->GoalReached = 0;
    v1->NearLength = -1;
    do
    {
      v25 = v1->PCnt;
      v26 = 0;
      v27 = 0;
      v1->Shortest = 0;
      if ( v25 )
      {
        do
        {
          if ( v1->LList[v27] < v1->LList[v26] )
          {
            v26 = v27;
            v1->Shortest = v27;
          }
          ++v27;
        }
        while ( v27 < v1->PCnt );
      }
      v28 = v1->Shortest;
      v1->Pos.X = v1->PList[v28].X;
      v1->Pos.Y = v1->PList[v28].Y;
      if ( v1->LList[v28] < v1->NearLength )
      {
        v29 = v1->Pos.Y;
        v1->NearPos.X = v1->Pos.X;
        v1->NearPos.Y = v29;
        v1->NearLength = v1->LList[v28];
      }
      v1->PCnt = v25 - 1;
      v1->PList[v28].X = v1->PList[v25 - 1].X;
      v1->PList[v28].Y = v1->PList[v25 - 1].Y;
      v1->LList[v1->Shortest] = v1->LList[v1->PCnt];
      v30 = v1->Pos.X;
      v31 = v1->BaseLenMapX;
      v32 = v1->Pos.Y;
      if ( v31 <= v30 )
      {
        v33 = v1->BaseLenMapY;
        if ( v33 <= v32 && v31 + v1->LenMapSx > v30 && v33 + v1->LenMapSy > v32 )
        {
          v34 = v1->LenMapSx * (v32 - v33) - v31;
          v35 = v1->Pos.X;
          v82 = v1->LenMap[v30 + v34] + 1;
          v1->NewPos.Y = v1->Pos.Y;
          --v1->NewPos.Y;
          v1->NewPos.X = v35;
          v1->Dir = 2;
          BI = 0;
          do
          {
            v36 = v1->NewPos.X;
            v37 = v1->BaseLenMapX;
            v38 = v1->NewPos.Y;
            if ( v37 <= v36 )
            {
              v39 = v1->BaseLenMapY;
              if ( v39 <= v38 )
              {
                j = v37 + v1->LenMapSx;
                if ( j > v36 )
                {
                  v84 = v39 + v1->LenMapSy;
                  if ( v84 > v38 && v1->LenMap[v36 + v1->LenMapSx * (v38 - v39) - v37] == -1 )
                  {
                    v40 = v1->m_uiOneSideBlockCnt;
                    if ( v36 < v40
                      && v38 < v40
                      && !((unsigned __int8)(1 << (v36 - 8 * ((unsigned int)v36 >> 3))) & *(&v1->m_pBlockInfoByte[v38 * v1->m_uiRealOneSideDataSize]
                                                                                          + ((unsigned int)v36 >> 3))) )
                    {
                      v41 = v1->BaseLenMapX;
                      if ( v41 <= v36 )
                      {
                        v42 = v1->BaseLenMapY;
                        if ( v42 <= v38 && j > v36 && v84 > v38 )
                        {
                          v1->LenMap[v36 + v1->LenMapSx * (v38 - v42) - v41] = v82;
                          v43 = v1->PCnt;
                          v1->PList[v43].X = v1->NewPos.X;
                          v1->PList[v43].Y = v1->NewPos.Y;
                          v44 = v1->NewPos.Y - v1->EndPos.Y;
                          v45 = v1->NewPos.X - v1->EndPos.X;
                          v1->DiffY = v44;
                          v46 = abs(v44);
                          v47 = v1->PCnt;
                          v1->DiffX = v45;
                          v1->LList[v47] = abs(v45) + v46;
                          if ( ++v1->PCnt >= 0x300 )
                            break;
                        }
                      }
                    }
                  }
                }
              }
            }
            v48 = v1->NewPos.X;
            if ( v48 != v1->EndPos.X || v1->NewPos.Y != v1->EndPos.Y )
            {
              v49 = BI;
            }
            else
            {
              v1->GoalReached = 1;
              v49 = 7;
            }
            v50 = v1->Dir;
            v1->NewPos.X = v48 + v1->XTbl[v50];
            v1->NewPos.Y += v1->YTbl[v50];
            v1->Dir = v1->DirTbl[v50];
            BI = v49 + 1;
          }
          while ( (unsigned int)(v49 + 1) < 8 );
        }
      }
      v51 = v1->PCnt;
      if ( v51 >= 0x300 )
        break;
      if ( v1->GoalReached )
        goto LABEL_46;
    }
    while ( v51 );
    if ( !v1->GoalReached )
    {
      v52 = v1->NearPos.X;
      v53 = v1->NearPos.Y;
      v1->ChangedEndPos = 1;
      v1->EndPos.X = v52;
      v1->EndPos.Y = v53;
    }
LABEL_46:
    v54 = v1->EndPos.Y;
    v55 = v1->EndPos.X;
    v1->NewPos.X = v55;
    v1->NewPos.Y = v54;
    v1->JuncBF[0].X = v55;
    v1->JuncBF[0].Y = v54;
    BIa = -1;
    v1->NoJunc = 1;
    while ( v1->NewPos.X != v1->StartPos.X || v1->NewPos.Y != v1->StartPos.Y )
    {
      --v1->NewPos.Y;
      v1->Dir = 2;
      v56 = v1->BaseLenMapX;
      v57 = v1->NewPos.Y;
      v58 = v1->NewPos.X;
      v90 = 2;
      ja = 2;
      do
      {
        if ( v56 <= v58 )
        {
          v59 = v1->BaseLenMapY;
          if ( v59 <= v57 && v56 + v1->LenMapSx > v58 && v59 + v1->LenMapSy > v57 )
          {
            v60 = v58 + v1->LenMapSx * (v57 - v59) - v56;
            if ( v1->LenMap[v60] < (unsigned __int16)BIa && v58 < v1->FWMapSx && v57 < v1->FWMapSy )
            {
              BIa = v1->LenMap[v60];
              v1->ShPos.X = v1->NewPos.X;
              v1->ShPos.Y = v1->NewPos.Y;
            }
          }
        }
        v61 = v1->XTbl[(unsigned __int8)v90] + v58;
        v1->NewPos.X = v61;
        v62 = v1->YTbl[(unsigned __int8)v90] + v57;
        v1->NewPos.Y = v62;
        v91 = v1->DirTbl[(unsigned __int8)v90];
        v1->Dir = v91;
        if ( v56 <= v61 )
        {
          v63 = v1->BaseLenMapY;
          if ( v63 <= v62 && v56 + v1->LenMapSx > v61 && v63 + v1->LenMapSy > v62 )
          {
            v64 = v61 + v1->LenMapSx * (v62 - v63) - v56;
            if ( v1->LenMap[v64] < (unsigned __int16)BIa && v61 < v1->FWMapSx && v62 < v1->FWMapSy )
            {
              BIa = v1->LenMap[v64];
              v1->ShPos.X = v61;
              v1->ShPos.Y = v62;
            }
          }
        }
        v65 = v1->XTbl[(unsigned __int8)v91] + v61;
        v1->NewPos.X = v65;
        v66 = v1->YTbl[(unsigned __int8)v91] + v62;
        v1->NewPos.Y = v66;
        v92 = v1->DirTbl[(unsigned __int8)v91];
        v1->Dir = v92;
        if ( v56 <= v65 )
        {
          v67 = v1->BaseLenMapY;
          if ( v67 <= v66 && v56 + v1->LenMapSx > v65 && v67 + v1->LenMapSy > v66 )
          {
            v68 = v65 + v1->LenMapSx * (v66 - v67) - v56;
            if ( v1->LenMap[v68] < (unsigned __int16)BIa && v65 < v1->FWMapSx && v66 < v1->FWMapSy )
            {
              BIa = v1->LenMap[v68];
              v1->ShPos.X = v65;
              v1->ShPos.Y = v66;
            }
          }
        }
        v69 = v1->XTbl[(unsigned __int8)v92] + v65;
        v1->NewPos.X = v69;
        v70 = v1->YTbl[(unsigned __int8)v92] + v66;
        v1->NewPos.Y = v70;
        v93 = v1->DirTbl[(unsigned __int8)v92];
        v1->Dir = v93;
        if ( v56 <= v69 )
        {
          v71 = v1->BaseLenMapY;
          if ( v71 <= v70 && v56 + v1->LenMapSx > v69 && v71 + v1->LenMapSy > v70 )
          {
            v72 = v69 + v1->LenMapSx * (v70 - v71) - v56;
            if ( v1->LenMap[v72] < (unsigned __int16)BIa && v69 < v1->FWMapSx && v70 < v1->FWMapSy )
            {
              BIa = v1->LenMap[v72];
              v1->ShPos.X = v69;
              v1->ShPos.Y = v70;
            }
          }
        }
        v58 = v1->XTbl[(unsigned __int8)v93] + v69;
        v1->NewPos.X = v58;
        v57 = v1->YTbl[(unsigned __int8)v93] + v70;
        v73 = ja-- == 1;
        v1->NewPos.Y = v57;
        v90 = v1->DirTbl[(unsigned __int8)v93];
        v1->Dir = v90;
      }
      while ( !v73 );
      v74 = v1->ShPos.Y;
      v75 = v1->ShPos.X;
      v1->NewPos.X = v1->ShPos.X;
      v76 = v1->NoJunc;
      v1->NewPos.Y = v74;
      v1->JuncBF[v76].X = v75;
      v1->JuncBF[v76].Y = v1->ShPos.Y;
      if ( ++v1->NoJunc >= 512 )
      {
        v1->GoalReached = 0;
        break;
      }
    }
    v77 = v1->NoJunc;
    v78 = v1->StartPos.Y;
    v79 = v1->StartPos.X;
    v80 = 0;
    v1->NumOfJunc = 0;
    v83 = v78;
    jb = v77;
    while ( v80 < jb )
    {
      v1->LineStartPos.X = v79;
      v1->LineStartPos.Y = v83;
      v1->Pos.X = v1->JuncBF[v80].X;
      v1->Pos.Y = v1->JuncBF[v80].Y;
      if ( CFindWay::LineIntersect(v1) )
      {
        ++v80;
      }
      else
      {
        v79 = v1->JuncBF[v80].X;
        v83 = v1->JuncBF[v80].Y;
        v81 = v1->NumOfJunc;
        v1->JuncList[v81].X = v79;
        v1->JuncList[v81].Y = v1->JuncBF[v80].Y;
        ++v1->NumOfJunc;
        jb = v80;
        v80 = 0;
      }
    }
  }
  else
  {
    v15 = v1->EndPos.X;
    v16 = v1->EndPos.Y;
    v1->GoalReached = 1;
    v1->NumOfJunc = 1;
    v1->JuncList[0].X = v15;
    v1->JuncList[0].Y = v16;
  }
}

//----- (00737D60) --------------------------------------------------------
void __thiscall CFindWay::Init(CFindWay *this)
{
  CFindWay *v1; // ebx@1
  int v2; // ecx@1
  int v3; // edx@1
  unsigned int dwYTbl[13]; // [sp+Ch] [bp-78h]@1
  unsigned int dwXTbl[13]; // [sp+40h] [bp-44h]@1
  _DWORD bDirTbl[4]; // [sp+74h] [bp-10h]@1

  v1 = this;
  dwXTbl[2] = 1;
  dwXTbl[9] = 1;
  dwYTbl[2] = 1;
  dwYTbl[4] = 1;
  bDirTbl[0] = 100926208;
  bDirTbl[1] = 786440;
  bDirTbl[2] = 513;
  dwXTbl[0] = 0;
  dwXTbl[1] = 0;
  dwXTbl[3] = 2;
  dwXTbl[4] = -1;
  dwXTbl[5] = 0;
  dwXTbl[6] = 0;
  dwXTbl[7] = 0;
  dwXTbl[8] = -1;
  dwXTbl[10] = 0;
  dwXTbl[11] = 0;
  dwXTbl[12] = -2;
  dwYTbl[0] = 0;
  dwYTbl[1] = -1;
  dwYTbl[3] = 0;
  dwYTbl[5] = 0;
  dwYTbl[6] = 2;
  dwYTbl[7] = 0;
  dwYTbl[8] = -1;
  dwYTbl[9] = -2;
  dwYTbl[10] = 0;
  dwYTbl[11] = 0;
  dwYTbl[12] = 0;
  this->NoJunc = 0;
  this->NumOfJunc = 0;
  this->LenMap = 0;
  CFindWay::LenMapInit(this, 256, 256);
  v2 = bDirTbl[1];
  v3 = bDirTbl[2];
  *(_DWORD *)&v1->DirTbl[0] = bDirTbl[0];
  *(_DWORD *)&v1->DirTbl[4] = v2;
  qmemcpy(v1->XTbl, dwXTbl, sizeof(v1->XTbl));
  qmemcpy(v1->YTbl, dwYTbl, sizeof(v1->YTbl));
  *(_DWORD *)&v1->DirTbl[8] = v3;
  v1->DirTbl[12] = 9;
}

//----- (00737E50) --------------------------------------------------------
void __thiscall CFindWay::CFindWay(CFindWay *this)
{
  this->m_bLoaded = 0;
  this->m_pBlockInfoByte = 0;
  CFindWay::Init(this);
}

//----- (00737E70) --------------------------------------------------------
bool __thiscall AreaInfoData::AE_Circle::IntersectTest(AreaInfoData::AE_Circle *this, float fX, float fY)
{
  float fDistX; // ST00_4@1
  double v4; // st7@1
  float fDistY; // [sp+Ch] [bp+8h]@1
  float fDistYa; // [sp+Ch] [bp+8h]@1
  float fDistYb; // [sp+Ch] [bp+8h]@1

  fDistX = fX - this->fCenterX;
  fDistY = fY - this->fCenterY;
  fDistYa = fDistY * fDistY + fDistX * fDistX;
  v4 = fDistYa;
  fDistYb = this->fRadius * this->fRadius;
  return fDistYb > v4;
}

//----- (00737ED0) --------------------------------------------------------
bool __thiscall AreaInfoData::AE_Square::IntersectTest(AreaInfoData::AE_Square *this, float fX, float fY)
{
  float fTransX; // ST04_4@1
  float fTransY; // ST08_4@1
  double v5; // st4@1
  float fSina; // [sp+10h] [bp+8h]@1
  float fSinb; // [sp+10h] [bp+8h]@1
  float fSin; // [sp+10h] [bp+8h]@1
  float fCosa; // [sp+14h] [bp+Ch]@1
  float fCos; // [sp+14h] [bp+Ch]@1

  fTransX = fX - this->fCenterX;
  fTransY = fY - this->fCenterY;
  fSina = -this->fAngle;
  fCosa = cos(fSina);
  fSinb = sin(fSina);
  v5 = fCosa;
  fCos = fCosa * fTransX + fSinb * fTransY;
  fSin = fTransY * v5 - fTransX * fSinb;
  return fSin >= -this->fRadiusV
      && this->fRadiusV >= (double)fSin
      && fCos >= -this->fRadiusU
      && this->fRadiusU >= (double)fCos;
}
// 737ED0: could not find valid save-restore pair for esi

//----- (00737FA0) --------------------------------------------------------
void __thiscall AreaInfoData::AreaInfoData(AreaInfoData *this)
{
  this->vfptr = (AreaInfoDataVtbl *)&AreaInfoData::`vftable';
  this->m_uiTotalDataCnt = 0;
  memset((char *)this->m_pData, 0, 0x400u);
}
// 9CF2E0: using guessed type int (__thiscall *AreaInfoData::`vftable')(void *p, char);

//----- (00737FD0) --------------------------------------------------------
AreaInfoData::IAreaData *__thiscall AreaInfoData::GetData(AreaInfoData *this, Name8 *Name)
{
  unsigned int v2; // edi@1
  unsigned int v3; // edx@1
  AreaInfoData::IAreaData **v4; // esi@2
  AreaInfoData::IAreaData *result; // eax@3

  v2 = this->m_uiTotalDataCnt;
  v3 = 0;
  if ( v2 )
  {
    v4 = this->m_pData;
    do
    {
      result = *v4;
      if ( !*v4 )
        break;
      if ( Name->n8_code[0] == result->Name.n8_code[0]
        && Name->n8_code[1] == result->Name.n8_code[1]
        && Name->n8_code[2] == result->Name.n8_code[2]
        && Name->n8_code[3] == result->Name.n8_code[3]
        && Name->n8_code[4] == result->Name.n8_code[4]
        && Name->n8_code[5] == result->Name.n8_code[5]
        && Name->n8_code[6] == result->Name.n8_code[6]
        && Name->n8_code[7] == result->Name.n8_code[7] )
      {
        return result;
      }
      ++v3;
      ++v4;
    }
    while ( v3 < v2 );
  }
  return 0;
}

//----- (00738040) --------------------------------------------------------
AreaInfoData::IAreaData *__thiscall AreaInfoData::GetData(AreaInfoData *this, const char *szName)
{
  AreaInfoData *v2; // esi@1
  Name8 Name; // [sp+4h] [bp-24h]@1

  v2 = this;
  *(_QWORD *)&Name.n8_code[6] = 0i64;
  *(_QWORD *)&Name.n8_code[4] = 0i64;
  *(_QWORD *)&Name.n8_code[2] = 0i64;
  *(_QWORD *)&Name.n8_name[0] = 0i64;
  strncpy(Name.n8_name, (char *)szName, 0x20u);
  return AreaInfoData::GetData(v2, &Name);
}

//----- (007380A0) --------------------------------------------------------
void __thiscall AreaInfoData::RemoveAll(AreaInfoData *this)
{
  void **v1; // esi@1
  signed int v2; // edi@1

  this->m_uiTotalDataCnt = 0;
  v1 = (void **)this->m_pData;
  v2 = 256;
  do
  {
    if ( *v1 )
      operator delete(*v1);
    *v1 = 0;
    ++v1;
    --v2;
  }
  while ( v2 );
}

//----- (007380E0) --------------------------------------------------------
void __thiscall AreaInfoData::~AreaInfoData(AreaInfoData *this)
{
  void **v1; // esi@1
  signed int v2; // edi@1

  this->vfptr = (AreaInfoDataVtbl *)&AreaInfoData::`vftable';
  this->m_uiTotalDataCnt = 0;
  v1 = (void **)this->m_pData;
  v2 = 256;
  do
  {
    if ( *v1 )
      operator delete(*v1);
    *v1 = 0;
    ++v1;
    --v2;
  }
  while ( v2 );
}
// 9CF2E0: using guessed type int (__thiscall *AreaInfoData::`vftable')(void *p, char);

//----- (00738120) --------------------------------------------------------
char __thiscall AreaInfoData::Load(AreaInfoData *this, const char *szFileName)
{
  AreaInfoData *v2; // esi@1
  _iobuf *v3; // ebx@1
  char result; // al@2
  AreaInfoData::IAreaData *v5; // eax@7
  AreaInfoData::IAreaData *v6; // esi@8
  unsigned int v7; // eax@10
  AreaInfoData::IAreaData *v8; // eax@12
  AreaInfoData::IAreaData *v9; // esi@13
  unsigned int v10; // eax@15
  unsigned int *v11; // esi@15
  unsigned int *v12; // [sp+Ch] [bp-58h]@3
  int nAreaType; // [sp+10h] [bp-54h]@6
  float v14; // [sp+14h] [bp-50h]@15
  unsigned int i; // [sp+18h] [bp-4Ch]@3
  AreaInfoData::IAreaData **v16; // [sp+1Ch] [bp-48h]@4
  Name8 Name; // [sp+20h] [bp-44h]@6
  char szName[32]; // [sp+40h] [bp-24h]@6

  v2 = this;
  v3 = fopen(szFileName, "rb");
  if ( v3 )
  {
    AreaInfoData::RemoveAll(v2);
    v12 = &v2->m_uiTotalDataCnt;
    fread(&v2->m_uiTotalDataCnt, 4u, 1u, v3);
    i = 0;
    if ( v2->m_uiTotalDataCnt > 0 )
    {
      v16 = v2->m_pData;
      do
      {
        if ( i >= 0x100 )
          break;
        *(_QWORD *)&Name.n8_code[6] = 0i64;
        *(_QWORD *)&Name.n8_code[4] = 0i64;
        *(_QWORD *)&Name.n8_code[2] = 0i64;
        *(_QWORD *)&Name.n8_name[0] = 0i64;
        fread(szName, 1u, 0x20u, v3);
        *(_QWORD *)&Name.n8_code[6] = 0i64;
        *(_QWORD *)&Name.n8_code[4] = 0i64;
        *(_QWORD *)&Name.n8_code[2] = 0i64;
        *(_QWORD *)&Name.n8_name[0] = 0i64;
        strncpy(Name.n8_name, szName, 0x20u);
        fread(&nAreaType, 4u, 1u, v3);
        if ( nAreaType )
        {
          if ( nAreaType == 1 )
          {
            v8 = (AreaInfoData::IAreaData *)operator new(0x3Cu);
            if ( v8 )
            {
              v8->Name.n8_code[7] = 0;
              v8->Name.n8_code[6] = 0;
              v8->Name.n8_code[5] = 0;
              v8->Name.n8_code[4] = 0;
              v8->Name.n8_code[3] = 0;
              v8->Name.n8_code[2] = 0;
              v8->Name.n8_code[1] = 0;
              v8->Name.n8_code[0] = 0;
              v8->vfptr = (AreaInfoData::IAreaDataVtbl *)&AreaInfoData::AE_Square::`vftable';
              v9 = v8;
            }
            else
            {
              v9 = 0;
            }
            v10 = Name.n8_code[0];
            *v16 = v9;
            v9->Name.n8_code[0] = v10;
            *(_QWORD *)&v9->Name.n8_code[1] = *(_QWORD *)&Name.n8_code[1];
            *(_QWORD *)&v9->Name.n8_code[3] = *(_QWORD *)&Name.n8_code[3];
            *(_QWORD *)&v9->Name.n8_code[5] = *(_QWORD *)&Name.n8_code[5];
            v9->Name.n8_code[7] = Name.n8_code[7];
            v9->nAreaType = nAreaType;
            fread(&v9[1], 4u, 1u, v3);
            fread(&v9[1].Name, 4u, 1u, v3);
            fread(&v9[1].Name.n8_code[1], 4u, 1u, v3);
            fread(&v9[1].Name.n8_code[2], 4u, 1u, v3);
            v11 = &v9[1].Name.n8_code[3];
            fread(v11, 4u, 1u, v3);
            v14 = atan(1.0);
            v14 = v14 * 4.0;
            *(float *)v11 = v14 * *(float *)v11 / 180.0;
          }
        }
        else
        {
          v5 = (AreaInfoData::IAreaData *)operator new(0x34u);
          if ( v5 )
          {
            v5->Name.n8_code[7] = 0;
            v5->Name.n8_code[6] = 0;
            v5->Name.n8_code[5] = 0;
            v5->Name.n8_code[4] = 0;
            v5->Name.n8_code[3] = 0;
            v5->Name.n8_code[2] = 0;
            v5->Name.n8_code[1] = 0;
            v5->Name.n8_code[0] = 0;
            v5->vfptr = (AreaInfoData::IAreaDataVtbl *)&AreaInfoData::AE_Circle::`vftable';
            v6 = v5;
          }
          else
          {
            v6 = 0;
          }
          v7 = Name.n8_code[0];
          *v16 = v6;
          v6->Name.n8_code[0] = v7;
          *(_QWORD *)&v6->Name.n8_code[1] = *(_QWORD *)&Name.n8_code[1];
          *(_QWORD *)&v6->Name.n8_code[3] = *(_QWORD *)&Name.n8_code[3];
          *(_QWORD *)&v6->Name.n8_code[5] = *(_QWORD *)&Name.n8_code[5];
          v6->Name.n8_code[7] = Name.n8_code[7];
          v6->nAreaType = nAreaType;
          fread(&v6[1], 4u, 1u, v3);
          fread(&v6[1].Name, 4u, 1u, v3);
          fread(&v6[1].Name.n8_code[1], 4u, 1u, v3);
        }
        ++v16;
        ++i;
      }
      while ( i < *v12 );
    }
    fclose(v3);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9CF2E8: using guessed type bool (__thiscall *AreaInfoData::AE_Square::`vftable')(AreaInfoData::AE_Square *this, float fSin, float);
// 9CF2F0: using guessed type bool (__thiscall *AreaInfoData::AE_Circle::`vftable')(AreaInfoData::AE_Circle *this, float fDistY, float);

//----- (007383D0) --------------------------------------------------------
AreaInfoData *__thiscall AreaInfoData::`vector deleting destructor'(AreaInfoData *this, unsigned int a2)
{
  AreaInfoData *v2; // esi@1

  v2 = this;
  AreaInfoData::~AreaInfoData(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (00738400) --------------------------------------------------------
char __stdcall DiceTaiSai::ConvertDice(char *pSource, int *pTarget)
{
  int v4; // edx@4
  char v5; // cl@5
  int v6; // ecx@8
  int v7; // edx@8
  int v8; // ecx@8

  if ( pSource && pTarget )
  {
    v4 = 0;
    while ( 1 )
    {
      v5 = pSource[v4];
      if ( (unsigned __int8)v5 < 1u || (unsigned __int8)v5 > 6u )
        break;
      if ( ++v4 >= 3 )
      {
        *pTarget = 0;
        v6 = 6 * *pTarget;
        *pTarget = v6;
        v7 = 6 * (v6 + (unsigned __int8)*pSource) - 6;
        *pTarget = v7;
        v8 = 6 * (v7 + (unsigned __int8)pSource[1]) - 6;
        *pTarget = v8;
        *pTarget = (unsigned __int8)pSource[2] + v8 - 1;
        return 1;
      }
    }
  }
  return 0;
}

//----- (00738470) --------------------------------------------------------
char __stdcall DiceTaiSai::ConvertDice(int nSource, char *pTarget)
{
  char result; // al@2

  if ( __PAIR__((unsigned int)pTarget, nSource) > 0xD7 )
  {
    result = 0;
  }
  else
  {
    pTarget[2] = nSource % 6 + 1;
    pTarget[1] = nSource / 6 % 6 + 1;
    *pTarget = nSource / 6 / 6 % 6 + 1;
    result = 1;
  }
  return result;
}

//----- (007384F0) --------------------------------------------------------
char __thiscall DiceTaiSai::get_PrizeWinningBet(DiceTaiSai *this, int nDiceVariety, DiceTaiSaiPrizeWinning *pPrizeWinningBet)
{
  signed int v4; // eax@4
  char *v5; // eax@6
  char v6; // bl@6
  int v7; // ecx@16
  int v8; // edi@17
  int v9; // ecx@18
  int v10; // edi@19
  int v11; // ecx@21
  int v12; // ecx@22
  int v13; // edi@24
  signed int v14; // esi@24
  int v15; // ecx@25
  int v16; // edi@33
  signed int v17; // esi@33
  int v18; // ecx@34
  int v19; // edi@42
  signed int v20; // esi@42
  int v21; // ecx@43
  int v22; // edi@51
  signed int v23; // esi@51
  int v24; // ecx@52
  int v25; // edi@60
  signed int v26; // esi@60
  int v27; // ecx@61
  int v28; // edi@69
  signed int v29; // esi@69
  int v30; // ecx@70
  int v31; // edi@78
  signed int v32; // esi@78
  int v33; // ecx@79
  int v34; // edi@87
  signed int v35; // esi@87
  int v36; // ecx@88
  int v37; // edi@96
  signed int v38; // esi@96
  int v39; // ecx@97
  int v40; // edi@105
  signed int v41; // esi@105
  int v42; // ecx@106
  int v43; // edi@114
  signed int v44; // esi@114
  int v45; // ecx@115
  int v46; // edi@123
  signed int v47; // esi@123
  int v48; // ecx@124
  int v49; // edi@132
  signed int v50; // esi@132
  int v51; // ecx@133
  int v52; // edi@141
  signed int v53; // esi@141
  int v54; // ecx@142
  int v55; // edi@150
  signed int v56; // esi@150
  int v57; // ecx@151
  char v58; // bl@157
  signed int v59; // edx@159
  char *v60; // ecx@166
  signed int v61; // edx@167
  char *v62; // ecx@174
  signed int v63; // edx@175
  char *v64; // ecx@182
  signed int v65; // edx@183
  char *v66; // ecx@190
  signed int v67; // edx@191
  char *v68; // ecx@198
  signed int v69; // edx@199
  char *v70; // ecx@206
  int v71; // [sp+0h] [bp-8h]@24
  int v72; // [sp+4h] [bp-4h]@24
  char nPrizeWinningBetCnt_3; // [sp+13h] [bp+Bh]@6

  if ( (unsigned int)nDiceVariety > 0xD7 )
    return 0;
  if ( !pPrizeWinningBet )
    return 0;
  v4 = 0;
  do
  {
    pPrizeWinningBet->nPrizeWinningBetCnt = 0;
    pPrizeWinningBet->PrizeWinningBetInfo[v4].nSingle = 0;
    ++v4;
  }
  while ( v4 < 12 );
  v5 = (char *)this + 22 * nDiceVariety;
  v6 = 0;
  nPrizeWinningBetCnt_3 = 0;
  if ( v5[3] == 1 )
  {
    pPrizeWinningBet->PrizeWinningBetInfo[0].nBetting = 0;
  }
  else
  {
    if ( v5[3] != 2 )
      goto LABEL_11;
    pPrizeWinningBet->PrizeWinningBetInfo[0].nBetting = 1;
  }
  v6 = 1;
  nPrizeWinningBetCnt_3 = 1;
LABEL_11:
  if ( v5[4] == 1 )
  {
    pPrizeWinningBet->PrizeWinningBetInfo[(unsigned __int8)v6].nBetting = 2;
  }
  else
  {
    if ( v5[4] != 2 )
      goto LABEL_16;
    pPrizeWinningBet->PrizeWinningBetInfo[(unsigned __int8)v6].nBetting = 3;
  }
  nPrizeWinningBetCnt_3 = ++v6;
LABEL_16:
  v7 = v5[5];
  if ( v7 > 0 )
  {
    v8 = (unsigned __int8)v6++;
    pPrizeWinningBet->PrizeWinningBetInfo[v8].nBetting = v7 + 3;
    nPrizeWinningBetCnt_3 = v6;
  }
  v9 = v5[6];
  if ( v9 > 0 )
  {
    v10 = (unsigned __int8)v6++;
    pPrizeWinningBet->PrizeWinningBetInfo[v10].nBetting = v9 + 9;
    nPrizeWinningBetCnt_3 = v6;
  }
  if ( 2 * (v5[6] > 0) - 1 > 0 )
  {
    v11 = (unsigned __int8)v6++;
    pPrizeWinningBet->PrizeWinningBetInfo[v11].nBetting = 16;
    nPrizeWinningBetCnt_3 = v6;
  }
  v12 = v5[7];
  if ( v12 > 0 )
  {
    pPrizeWinningBet->PrizeWinningBetInfo[(unsigned __int8)v6].nBetting = v12 + 13;
    nPrizeWinningBetCnt_3 = v6 + 1;
  }
  v13 = 0;
  v71 = 1;
  v72 = 2;
  v14 = 0;
  do
  {
    v15 = 0;
    while ( (unsigned __int8)v5[v15] != *(&v71 + v14) )
    {
      if ( ++v15 >= 3 )
        goto LABEL_30;
    }
    ++v13;
LABEL_30:
    ++v14;
  }
  while ( v14 < 2 );
  if ( v13 == 2 )
    pPrizeWinningBet->PrizeWinningBetInfo[(unsigned __int8)nPrizeWinningBetCnt_3++].nBetting = 31;
  v16 = 0;
  v71 = 1;
  v72 = 3;
  v17 = 0;
  do
  {
    v18 = 0;
    while ( (unsigned __int8)v5[v18] != *(&v71 + v17) )
    {
      if ( ++v18 >= 3 )
        goto LABEL_39;
    }
    ++v16;
LABEL_39:
    ++v17;
  }
  while ( v17 < 2 );
  if ( v16 == 2 )
    pPrizeWinningBet->PrizeWinningBetInfo[(unsigned __int8)nPrizeWinningBetCnt_3++].nBetting = 32;
  v19 = 0;
  v71 = 1;
  v72 = 4;
  v20 = 0;
  do
  {
    v21 = 0;
    while ( (unsigned __int8)v5[v21] != *(&v71 + v20) )
    {
      if ( ++v21 >= 3 )
        goto LABEL_48;
    }
    ++v19;
LABEL_48:
    ++v20;
  }
  while ( v20 < 2 );
  if ( v19 == 2 )
    pPrizeWinningBet->PrizeWinningBetInfo[(unsigned __int8)nPrizeWinningBetCnt_3++].nBetting = 33;
  v22 = 0;
  v71 = 1;
  v72 = 5;
  v23 = 0;
  do
  {
    v24 = 0;
    while ( (unsigned __int8)v5[v24] != *(&v71 + v23) )
    {
      if ( ++v24 >= 3 )
        goto LABEL_57;
    }
    ++v22;
LABEL_57:
    ++v23;
  }
  while ( v23 < 2 );
  if ( v22 == 2 )
    pPrizeWinningBet->PrizeWinningBetInfo[(unsigned __int8)nPrizeWinningBetCnt_3++].nBetting = 34;
  v25 = 0;
  v71 = 1;
  v72 = 6;
  v26 = 0;
  do
  {
    v27 = 0;
    while ( (unsigned __int8)v5[v27] != *(&v71 + v26) )
    {
      if ( ++v27 >= 3 )
        goto LABEL_66;
    }
    ++v25;
LABEL_66:
    ++v26;
  }
  while ( v26 < 2 );
  if ( v25 == 2 )
    pPrizeWinningBet->PrizeWinningBetInfo[(unsigned __int8)nPrizeWinningBetCnt_3++].nBetting = 35;
  v28 = 0;
  v71 = 2;
  v72 = 3;
  v29 = 0;
  do
  {
    v30 = 0;
    while ( (unsigned __int8)v5[v30] != *(&v71 + v29) )
    {
      if ( ++v30 >= 3 )
        goto LABEL_75;
    }
    ++v28;
LABEL_75:
    ++v29;
  }
  while ( v29 < 2 );
  if ( v28 == 2 )
    pPrizeWinningBet->PrizeWinningBetInfo[(unsigned __int8)nPrizeWinningBetCnt_3++].nBetting = 36;
  v31 = 0;
  v71 = 2;
  v72 = 4;
  v32 = 0;
  do
  {
    v33 = 0;
    while ( (unsigned __int8)v5[v33] != *(&v71 + v32) )
    {
      if ( ++v33 >= 3 )
        goto LABEL_84;
    }
    ++v31;
LABEL_84:
    ++v32;
  }
  while ( v32 < 2 );
  if ( v31 == 2 )
    pPrizeWinningBet->PrizeWinningBetInfo[(unsigned __int8)nPrizeWinningBetCnt_3++].nBetting = 37;
  v34 = 0;
  v71 = 2;
  v72 = 5;
  v35 = 0;
  do
  {
    v36 = 0;
    while ( (unsigned __int8)v5[v36] != *(&v71 + v35) )
    {
      if ( ++v36 >= 3 )
        goto LABEL_93;
    }
    ++v34;
LABEL_93:
    ++v35;
  }
  while ( v35 < 2 );
  if ( v34 == 2 )
    pPrizeWinningBet->PrizeWinningBetInfo[(unsigned __int8)nPrizeWinningBetCnt_3++].nBetting = 38;
  v37 = 0;
  v71 = 2;
  v72 = 6;
  v38 = 0;
  do
  {
    v39 = 0;
    while ( (unsigned __int8)v5[v39] != *(&v71 + v38) )
    {
      if ( ++v39 >= 3 )
        goto LABEL_102;
    }
    ++v37;
LABEL_102:
    ++v38;
  }
  while ( v38 < 2 );
  if ( v37 == 2 )
    pPrizeWinningBet->PrizeWinningBetInfo[(unsigned __int8)nPrizeWinningBetCnt_3++].nBetting = 39;
  v40 = 0;
  v71 = 3;
  v72 = 4;
  v41 = 0;
  do
  {
    v42 = 0;
    while ( (unsigned __int8)v5[v42] != *(&v71 + v41) )
    {
      if ( ++v42 >= 3 )
        goto LABEL_111;
    }
    ++v40;
LABEL_111:
    ++v41;
  }
  while ( v41 < 2 );
  if ( v40 == 2 )
    pPrizeWinningBet->PrizeWinningBetInfo[(unsigned __int8)nPrizeWinningBetCnt_3++].nBetting = 40;
  v43 = 0;
  v71 = 3;
  v72 = 5;
  v44 = 0;
  do
  {
    v45 = 0;
    while ( (unsigned __int8)v5[v45] != *(&v71 + v44) )
    {
      if ( ++v45 >= 3 )
        goto LABEL_120;
    }
    ++v43;
LABEL_120:
    ++v44;
  }
  while ( v44 < 2 );
  if ( v43 == 2 )
    pPrizeWinningBet->PrizeWinningBetInfo[(unsigned __int8)nPrizeWinningBetCnt_3++].nBetting = 41;
  v46 = 0;
  v71 = 3;
  v72 = 6;
  v47 = 0;
  do
  {
    v48 = 0;
    while ( (unsigned __int8)v5[v48] != *(&v71 + v47) )
    {
      if ( ++v48 >= 3 )
        goto LABEL_129;
    }
    ++v46;
LABEL_129:
    ++v47;
  }
  while ( v47 < 2 );
  if ( v46 == 2 )
    pPrizeWinningBet->PrizeWinningBetInfo[(unsigned __int8)nPrizeWinningBetCnt_3++].nBetting = 42;
  v49 = 0;
  v71 = 4;
  v72 = 5;
  v50 = 0;
  do
  {
    v51 = 0;
    while ( (unsigned __int8)v5[v51] != *(&v71 + v50) )
    {
      if ( ++v51 >= 3 )
        goto LABEL_138;
    }
    ++v49;
LABEL_138:
    ++v50;
  }
  while ( v50 < 2 );
  if ( v49 == 2 )
    pPrizeWinningBet->PrizeWinningBetInfo[(unsigned __int8)nPrizeWinningBetCnt_3++].nBetting = 43;
  v52 = 0;
  v71 = 4;
  v72 = 6;
  v53 = 0;
  do
  {
    v54 = 0;
    while ( (unsigned __int8)v5[v54] != *(&v71 + v53) )
    {
      if ( ++v54 >= 3 )
        goto LABEL_147;
    }
    ++v52;
LABEL_147:
    ++v53;
  }
  while ( v53 < 2 );
  if ( v52 == 2 )
    pPrizeWinningBet->PrizeWinningBetInfo[(unsigned __int8)nPrizeWinningBetCnt_3++].nBetting = 44;
  v55 = 0;
  v71 = 5;
  v72 = 6;
  v56 = 0;
  do
  {
    v57 = 0;
    while ( (unsigned __int8)v5[v57] != *(&v71 + v56) )
    {
      if ( ++v57 >= 3 )
        goto LABEL_156;
    }
    ++v55;
LABEL_156:
    ++v56;
  }
  while ( v56 < 2 );
  v58 = nPrizeWinningBetCnt_3;
  if ( v55 == 2 )
  {
    pPrizeWinningBet->PrizeWinningBetInfo[(unsigned __int8)nPrizeWinningBetCnt_3].nBetting = 45;
    v58 = nPrizeWinningBetCnt_3 + 1;
  }
  v59 = 0;
  if ( *v5 == 1 )
    v59 = 1;
  if ( v5[1] == 1 )
    ++v59;
  if ( v5[2] == 1 )
    ++v59;
  if ( v59 > 0 )
  {
    v60 = &pPrizeWinningBet->nPrizeWinningBetCnt + 8 * (unsigned __int8)v58;
    v60[4] = v59;
    *((_DWORD *)v60 + 2) = 46;
    ++v58;
  }
  v61 = 0;
  if ( *v5 == 2 )
    v61 = 1;
  if ( v5[1] == 2 )
    ++v61;
  if ( v5[2] == 2 )
    ++v61;
  if ( v61 > 0 )
  {
    v62 = &pPrizeWinningBet->nPrizeWinningBetCnt + 8 * (unsigned __int8)v58;
    v62[4] = v61;
    *((_DWORD *)v62 + 2) = 47;
    ++v58;
  }
  v63 = 0;
  if ( *v5 == 3 )
    v63 = 1;
  if ( v5[1] == 3 )
    ++v63;
  if ( v5[2] == 3 )
    ++v63;
  if ( v63 > 0 )
  {
    v64 = &pPrizeWinningBet->nPrizeWinningBetCnt + 8 * (unsigned __int8)v58;
    v64[4] = v63;
    *((_DWORD *)v64 + 2) = 48;
    ++v58;
  }
  v65 = 0;
  if ( *v5 == 4 )
    v65 = 1;
  if ( v5[1] == 4 )
    ++v65;
  if ( v5[2] == 4 )
    ++v65;
  if ( v65 > 0 )
  {
    v66 = &pPrizeWinningBet->nPrizeWinningBetCnt + 8 * (unsigned __int8)v58;
    v66[4] = v65;
    *((_DWORD *)v66 + 2) = 49;
    ++v58;
  }
  v67 = 0;
  if ( *v5 == 5 )
    v67 = 1;
  if ( v5[1] == 5 )
    ++v67;
  if ( v5[2] == 5 )
    ++v67;
  if ( v67 > 0 )
  {
    v68 = &pPrizeWinningBet->nPrizeWinningBetCnt + 8 * (unsigned __int8)v58;
    v68[4] = v67;
    *((_DWORD *)v68 + 2) = 50;
    ++v58;
  }
  v69 = 0;
  if ( *v5 == 6 )
    v69 = 1;
  if ( v5[1] == 6 )
    ++v69;
  if ( v5[2] == 6 )
    ++v69;
  if ( v69 > 0 )
  {
    v70 = &pPrizeWinningBet->nPrizeWinningBetCnt + 8 * (unsigned __int8)v58;
    v70[4] = v69;
    *((_DWORD *)v70 + 2) = 51;
    ++v58;
  }
  pPrizeWinningBet->nPrizeWinningBetCnt = v58;
  return 1;
}

//----- (00738BD0) --------------------------------------------------------
void __thiscall DiceTaiSaiDividind::DiceTaiSaiDividind(DiceTaiSaiDividind *this)
{
  DiceTaiSaiDividind *v1; // eax@1
  signed int v2; // ecx@1

  v1 = this;
  v2 = 0;
  do
  {
    v1->DividendRate[v2] = 0;
    v1->bIsInitDividendRate[v2++] = 0;
  }
  while ( v2 < 15 );
  v1->ConertDividendRateTable[4] = 2;
  v1->ConertDividendRateTable[5] = 2;
  v1->ConertDividendRateTable[6] = 2;
  v1->ConertDividendRateTable[7] = 2;
  v1->ConertDividendRateTable[8] = 2;
  v1->ConertDividendRateTable[9] = 2;
  v1->ConertDividendRateTable[10] = 3;
  v1->ConertDividendRateTable[11] = 3;
  v1->ConertDividendRateTable[12] = 3;
  v1->ConertDividendRateTable[13] = 3;
  v1->ConertDividendRateTable[14] = 3;
  v1->ConertDividendRateTable[15] = 3;
  v1->ConertDividendRateTable[22] = 10;
  v1->ConertDividendRateTable[23] = 10;
  v1->ConertDividendRateTable[24] = 10;
  v1->ConertDividendRateTable[25] = 10;
  v1->ConertDividendRateTable[0] = 0;
  v1->ConertDividendRateTable[1] = 0;
  v1->ConertDividendRateTable[31] = 11;
  v1->ConertDividendRateTable[32] = 11;
  v1->ConertDividendRateTable[33] = 11;
  v1->ConertDividendRateTable[34] = 11;
  v1->ConertDividendRateTable[35] = 11;
  v1->ConertDividendRateTable[36] = 11;
  v1->ConertDividendRateTable[37] = 11;
  v1->ConertDividendRateTable[38] = 11;
  v1->ConertDividendRateTable[39] = 11;
  v1->ConertDividendRateTable[40] = 11;
  v1->ConertDividendRateTable[41] = 11;
  v1->ConertDividendRateTable[42] = 11;
  v1->ConertDividendRateTable[43] = 11;
  v1->ConertDividendRateTable[44] = 11;
  v1->ConertDividendRateTable[45] = 11;
  v1->ConertDividendRateTable[19] = 7;
  v1->ConertDividendRateTable[28] = 7;
  v1->ConertDividendRateTable[2] = 1;
  v1->ConertDividendRateTable[3] = 1;
  v1->ConertDividendRateTable[16] = 4;
  v1->ConertDividendRateTable[17] = 5;
  v1->ConertDividendRateTable[18] = 6;
  v1->ConertDividendRateTable[20] = 8;
  v1->ConertDividendRateTable[21] = 9;
  v1->ConertDividendRateTable[26] = 9;
  v1->ConertDividendRateTable[27] = 8;
  v1->ConertDividendRateTable[29] = 6;
  v1->ConertDividendRateTable[30] = 5;
  v1->ConertDividendRateTable[46] = 14;
  v1->ConertDividendRateTable[47] = 14;
  v1->ConertDividendRateTable[48] = 14;
  v1->ConertDividendRateTable[49] = 14;
  v1->ConertDividendRateTable[50] = 14;
  v1->ConertDividendRateTable[51] = 14;
}

//----- (00738D40) --------------------------------------------------------
char __thiscall DiceTaiSaiDividind::isInitFinishe(DiceTaiSaiDividind *this)
{
  int v1; // eax@1

  v1 = 0;
  while ( this->bIsInitDividendRate[v1] )
  {
    if ( ++v1 >= 15 )
      return 1;
  }
  return 0;
}

//----- (00738D60) --------------------------------------------------------
char __thiscall DiceTaiSaiDividind::Init(DiceTaiSaiDividind *this, DividendRate nDividind, unsigned __int16 nDividindRate)
{
  int v4; // eax@3

  if ( (signed int)nDividind < 15 )
  {
    this->DividendRate[nDividind] = nDividindRate;
    this->bIsInitDividendRate[nDividind] = 1;
    v4 = 0;
    while ( this->bIsInitDividendRate[v4] )
    {
      if ( ++v4 >= 15 )
        return 1;
    }
  }
  return 0;
}

//----- (00738DA0) --------------------------------------------------------
unsigned int __thiscall DiceTaiSaiDividind::get_MaxBettingMoney(DiceTaiSaiDividind *this, DICE_TAISAI_BETTING nBet, unsigned int nMaxBetMoney)
{
  unsigned int result; // eax@2
  DividendRate v4; // eax@3

  if ( (signed int)nBet < 52
    && (v4 = this->ConertDividendRateTable[nBet], (signed int)v4 < 15)
    && this->bIsInitDividendRate[v4] )
  {
    result = 100 * nMaxBetMoney / this->DividendRate[v4];
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00738DE0) --------------------------------------------------------
unsigned int __thiscall DiceTaiSaiDividind::get_DividindMoney(DiceTaiSaiDividind *this, DICE_TAISAI_BETTING nBet, int nSingleNum, unsigned int nBetMoney)
{
  DividendRate v5; // eax@3

  if ( (signed int)nBet >= 52 )
    return 0;
  v5 = this->ConertDividendRateTable[nBet];
  if ( (unsigned int)(nBet - 46) <= 5 )
  {
    if ( nSingleNum == 1 )
    {
      v5 = 12;
      goto LABEL_11;
    }
    if ( nSingleNum == 2 )
    {
      v5 = 13;
      goto LABEL_11;
    }
    if ( nSingleNum == 3 )
    {
      v5 = 14;
      goto LABEL_11;
    }
    return 0;
  }
  if ( (signed int)v5 >= 15 )
    return 0;
LABEL_11:
  if ( !this->bIsInitDividendRate[v5] )
    return 0;
  return (signed __int64)((double)this->DividendRate[v5] / 100.0 * (double)nBetMoney);
}

//----- (00738E80) --------------------------------------------------------
void __thiscall DiceTaiSai::Init(DiceTaiSai *this, int NoSumTriple)
{
  int v2; // edi@1
  char *v3; // esi@1
  int v4; // eax@3
  int v5; // esi@3
  unsigned __int8 v6; // cl@4
  signed int v7; // edi@4
  unsigned __int8 v8; // dl@6
  unsigned __int8 v9; // bl@6
  char v10; // cl@15
  char v11; // dl@15
  char v12; // cl@18
  char v13; // cl@18
  unsigned __int8 v14; // dl@20
  char v15; // cl@21
  char v16; // cl@21
  unsigned __int8 v17; // cl@22
  unsigned __int8 v18; // dl@22
  char v19; // cl@23
  char v20; // cl@23
  unsigned __int8 v21; // cl@24
  unsigned __int8 v22; // dl@24
  char v23; // cl@25
  char v24; // cl@25
  char v25; // cl@26
  char v26; // dl@29
  char v27; // cl@29
  char v28; // bl@31
  char v29; // cl@36
  char v30; // cl@41
  signed int v31; // [sp+Ch] [bp-Ch]@3
  DiceTaiSai *nSameNum; // [sp+10h] [bp-8h]@1
  int nSameNuma; // [sp+10h] [bp-8h]@4

  v2 = 0;
  nSameNum = this;
  v3 = &this->m_Dice[0].isBig;
  do
  {
    DiceTaiSai::ConvertDice(v2, v3 - 4);
    *(v3 - 1) = -1;
    *v3 = -1;
    v3[1] = -1;
    v3[2] = -1;
    v3[3] = -1;
    *((_DWORD *)v3 + 1) = 3;
    *((_DWORD *)v3 + 2) = 50331648;
    *((_DWORD *)v3 + 3) = 0;
    *((_WORD *)v3 + 8) = 0;
    ++v2;
    v3 += 22;
  }
  while ( v2 < 216 );
  v4 = (int)&nSameNum->m_Dice[0].nDominoCnt;
  v5 = (int)nSameNum->m_Dice[0].nDominoNum;
  v31 = 216;
  do
  {
    v6 = *(_BYTE *)(v4 - 8);
    v7 = 0;
    nSameNuma = 0;
    if ( v6 == *(_BYTE *)(v4 - 7) )
    {
      nSameNuma = v6;
      v7 = 1;
    }
    v8 = *(_BYTE *)(v4 - 7);
    v9 = *(_BYTE *)(v4 - 6);
    if ( v8 == v9 )
    {
      nSameNuma = v8;
      ++v7;
    }
    if ( v9 == v6 )
    {
      nSameNuma = v9;
      ++v7;
    }
    if ( v7 == 1 )
    {
      *(_BYTE *)(v4 - 3) = nSameNuma;
      *(_BYTE *)(v4 + 7) = 2;
      *(_BYTE *)v4 = 1;
LABEL_15:
      v10 = *(_BYTE *)(v4 - 8);
      v11 = *(_BYTE *)(v4 - 7);
      *(_BYTE *)(v4 + 1) = v10;
      if ( v10 == v11 )
        v11 = *(_BYTE *)(v4 - 6);
      goto LABEL_19;
    }
    if ( v7 == 3 )
    {
      *(_BYTE *)(v4 - 2) = nSameNuma;
      *(_BYTE *)(v4 + 7) = 1;
      *(_BYTE *)v4 = 0;
      goto LABEL_20;
    }
    if ( *(_BYTE *)v4 == 1 )
      goto LABEL_15;
    if ( *(_BYTE *)v4 != 3 )
      goto LABEL_20;
    v12 = *(_BYTE *)(v4 - 8);
    v11 = *(_BYTE *)(v4 - 7);
    *(_BYTE *)(v4 + 1) = v12;
    *(_BYTE *)(v4 + 3) = v12;
    v13 = *(_BYTE *)(v4 - 6);
    *(_BYTE *)(v4 + 4) = v13;
    *(_BYTE *)(v4 + 5) = v11;
    *(_BYTE *)(v4 + 6) = v13;
LABEL_19:
    *(_BYTE *)(v4 + 2) = v11;
LABEL_20:
    v14 = *(_BYTE *)(v5 + 1);
    if ( *(_BYTE *)v5 > v14 )
    {
      v15 = v14 ^ *(_BYTE *)v5;
      *(_BYTE *)v5 = v15;
      v16 = v14 ^ v15;
      *(_BYTE *)v5 ^= v16;
      *(_BYTE *)(v5 + 1) = v16;
    }
    v17 = *(_BYTE *)(v5 + 2);
    v18 = *(_BYTE *)(v5 + 3);
    if ( v17 > v18 )
    {
      v19 = v18 ^ v17;
      *(_BYTE *)(v5 + 2) = v19;
      v20 = v18 ^ v19;
      *(_BYTE *)(v5 + 2) ^= v20;
      *(_BYTE *)(v5 + 3) = v20;
    }
    v21 = *(_BYTE *)(v5 + 4);
    v22 = *(_BYTE *)(v5 + 5);
    if ( v21 > v22 )
    {
      v23 = v22 ^ v21;
      *(_BYTE *)(v5 + 4) = v23;
      v24 = v22 ^ v23;
      *(_BYTE *)(v5 + 4) ^= v24;
      *(_BYTE *)(v5 + 5) = v24;
    }
    v25 = *(_BYTE *)(v4 + 7);
    if ( v25 == 1 )
    {
      *(_BYTE *)(v4 + 8) = *(_BYTE *)(v4 - 8);
      *(_BYTE *)(v4 + 9) = 3;
      goto LABEL_39;
    }
    if ( v25 == 2 )
    {
      v26 = *(_BYTE *)(v4 - 7);
      v27 = *(_BYTE *)(v4 - 8);
      if ( v27 == v26 )
      {
        v26 = *(_BYTE *)(v4 - 6);
        *(_BYTE *)(v4 + 8) = v27;
        *(_BYTE *)(v4 + 9) = 2;
      }
      else
      {
        v28 = *(_BYTE *)(v4 - 6);
        if ( v27 != v28 )
        {
          if ( v26 != v28 )
            goto LABEL_39;
          *(_BYTE *)(v4 + 8) = v26;
          *(_BYTE *)(v4 + 9) = 2;
          *(_BYTE *)(v4 + 10) = v27;
          goto LABEL_38;
        }
        *(_BYTE *)(v4 + 8) = v27;
        *(_BYTE *)(v4 + 9) = 2;
      }
    }
    else
    {
      if ( v25 != 3 )
        goto LABEL_39;
      v26 = *(_BYTE *)(v4 - 7);
      *(_BYTE *)(v4 + 8) = *(_BYTE *)(v4 - 8);
      v29 = *(_BYTE *)(v4 - 6);
      *(_BYTE *)(v4 + 9) = 1;
      *(_BYTE *)(v4 + 12) = v29;
      *(_BYTE *)(v4 + 13) = 1;
    }
    *(_BYTE *)(v4 + 10) = v26;
LABEL_38:
    *(_BYTE *)(v4 + 11) = 1;
LABEL_39:
    if ( !NoSumTriple )
    {
      if ( *(_BYTE *)(v4 - 2) > 0 )
        goto LABEL_42;
LABEL_41:
      v30 = *(_BYTE *)(v4 - 6) + *(_BYTE *)(v4 - 7) + *(_BYTE *)(v4 - 8);
      *(_BYTE *)(v4 - 1) = v30;
      *(_BYTE *)(v4 - 5) = (v30 % 2 != 0) + 1;
      *(_BYTE *)(v4 - 4) = ((unsigned __int8)(v30 - 11) > 6u) + 1;
      goto LABEL_42;
    }
    if ( *(_BYTE *)(v4 - 2) <= 0 )
      goto LABEL_41;
    if ( nSameNuma != 1 && nSameNuma != 6 )
      *(_BYTE *)(v4 - 1) = *(_BYTE *)(v4 - 6) + *(_BYTE *)(v4 - 7) + *(_BYTE *)(v4 - 8);
LABEL_42:
    v5 += 22;
    v4 += 22;
    --v31;
  }
  while ( v31 );
}

//----- (007390D0) --------------------------------------------------------
void __thiscall CGuildList::CGuildList(CGuildList *this)
{
  this->vfptr = (CGuildListVtbl *)&CGuildList::`vftable';
  this->m_pGuildList = 0;
}
// 9CF2F8: using guessed type enum NiAnimationKey::KeyContent (__thiscall *CGuildList::`vftable')(NiPoint3Interpolator *this, unsigned __int16);

//----- (007390E0) --------------------------------------------------------
int __thiscall CGuildList::Recv_NC_GUILD_LIST_ACK(CGuildList *this, PROTO_NC_GUILD_LIST_ACK *pAck)
{
  CGuildList *v2; // edi@1
  int result; // eax@2
  PROTO_NC_GUILD_LIST_ACK *v4; // esi@3
  unsigned int v5; // esi@6

  v2 = this;
  if ( pAck->Error == 3137 )
  {
    v4 = this->m_pGuildList;
    if ( v4 && this->m_NumOfGuildListBF < pAck->nGuildListCnt )
    {
      `eh vector destructor iterator'(
        &v4[1],
        0x2Eu,
        0,
        (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
      operator delete(v4);
      v2->m_pGuildList = 0;
    }
    v5 = 46 * pAck->nGuildListCnt + 7;
    if ( !v2->m_pGuildList )
    {
      v2->m_pGuildList = (PROTO_NC_GUILD_LIST_ACK *)operator new[](46 * pAck->nGuildListCnt + 7);
      v2->m_NumOfGuildListBF = pAck->nGuildListCnt;
    }
    memcpy((char *)v2->m_pGuildList, (char *)pAck, v5);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00739170) --------------------------------------------------------
void __thiscall CGuildList::~CGuildList(CGuildList *this)
{
  CGuildList *v1; // esi@1
  PROTO_NC_GUILD_LIST_ACK *v2; // edi@1

  v1 = this;
  v2 = this->m_pGuildList;
  this->vfptr = (CGuildListVtbl *)&CGuildList::`vftable';
  if ( v2 )
  {
    `eh vector destructor iterator'(
      &v2[1],
      0x2Eu,
      0,
      (void (__thiscall *)(void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
    operator delete(v2);
    v1->m_pGuildList = 0;
  }
}
// 9CF2F8: using guessed type enum NiAnimationKey::KeyContent (__thiscall *CGuildList::`vftable')(NiPoint3Interpolator *this, unsigned __int16);

//----- (007391B0) --------------------------------------------------------
char *fs(char *format, ...)
{
  char *result; // eax@2
  char v2; // si@3
  char *v3; // esi@3
  va_list va; // [sp+Ch] [bp+Ch]@1

  va_start(va, format);
  if ( format )
  {
    v2 = NULLSTR[4104];
    ++*(_DWORD *)&NULLSTR[4104];
    v3 = (char *)(((v2 & 7) << 9) + 11923672);
    vsprintf(v3, format, va);
    result = v3;
  }
  else
  {
    result = (char *)(((NULLSTR[4104] & 1) << 9) + 11923672);
    ++*(_DWORD *)&NULLSTR[4104];
  }
  return result;
}

//----- (00739210) --------------------------------------------------------
char __thiscall Encrypt::Stream::Allocate(Encrypt::Stream *this, unsigned int dwSize)
{
  Encrypt::Stream *v2; // esi@1
  char *v3; // eax@1

  v2 = this;
  operator delete(this->m_pcData);
  v3 = (char *)operator new(dwSize);
  v2->m_dwSize = dwSize;
  v2->m_pcData = v3;
  return 1;
}

//----- (00739240) --------------------------------------------------------
void __thiscall Encrypt::Stream::Stream(Encrypt::Stream *this)
{
  this->vfptr = (Encrypt::StreamVtbl *)&Encrypt::Stream::`vftable';
  this->m_pcData = 0;
  this->m_dwSize = 0;
}
// 9CF304: using guessed type int (__thiscall *Encrypt::Stream::`vftable')(void *p, char);

//----- (00739260) --------------------------------------------------------
void __thiscall Encrypt::Stream::~Stream(Encrypt::Stream *this)
{
  char *v1; // ST00_4@1

  v1 = this->m_pcData;
  this->vfptr = (Encrypt::StreamVtbl *)&Encrypt::Stream::`vftable';
  operator delete(v1);
}
// 9CF304: using guessed type int (__thiscall *Encrypt::Stream::`vftable')(void *p, char);

//----- (00739280) --------------------------------------------------------
bool __thiscall Encrypt::FileStream::Load(Encrypt::FileStream *this, char *acFn)
{
  Encrypt::FileStream *v2; // ebx@1
  _iobuf *v3; // eax@1
  _iobuf *v4; // esi@1
  bool result; // al@2
  unsigned int v6; // edi@3
  char *v7; // eax@3
  unsigned int v8; // ebx@3

  v2 = this;
  v3 = fopen(acFn, "rb");
  v4 = v3;
  if ( v3 )
  {
    fseek(v3, 0, 2);
    v6 = ftell(v4);
    fseek(v4, 0, 0);
    operator delete(v2->m_pcData);
    v7 = (char *)operator new(v6);
    v2->m_pcData = v7;
    v2->m_dwSize = v6;
    v8 = fread(v7, 1u, v6, v4);
    fclose(v4);
    result = v6 == v8;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00739300) --------------------------------------------------------
bool __thiscall Encrypt::FileStream::Save(Encrypt::FileStream *this, char *acFn)
{
  Encrypt::FileStream *v2; // esi@1
  _iobuf *v3; // eax@3
  _iobuf *v4; // edi@3
  bool result; // al@4
  unsigned int v6; // ebx@5

  v2 = this;
  if ( this->m_dwSize && this->m_pcData )
  {
    v3 = fopen(acFn, "wb");
    v4 = v3;
    if ( v3 )
    {
      v6 = fwrite(v2->m_pcData, 1u, v2->m_dwSize, v3);
      fclose(v4);
      result = v2->m_dwSize == v6;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00739370) --------------------------------------------------------
void __cdecl Encrypt::EncryptXor(char *pcDest, unsigned int dwDestSize, char *pcSrc, unsigned int dwSrcSize, char *pcKey)
{
  unsigned int v5; // ecx@2
  int v6; // edx@3
  char *v7; // esi@3
  unsigned int iKeyLen; // [sp+0h] [bp-4h]@1

  iKeyLen = strlen(pcKey);
  if ( iKeyLen )
  {
    v5 = 0;
    if ( dwSrcSize )
    {
      do
      {
        v6 = v5 % iKeyLen;
        v7 = &pcDest[v5++];
        *v7 = v7[pcSrc - pcDest] ^ pcKey[v6];
      }
      while ( v5 < dwSrcSize );
    }
  }
}

//----- (007393D0) --------------------------------------------------------
char __thiscall Encrypt::EncryptMethodXor::Encrypt(Encrypt::EncryptMethodXor *this, Encrypt::Stream *rkEncStream, Encrypt::Stream *rkOrgStream)
{
  unsigned int v3; // edi@1
  char v4; // bl@1
  unsigned int v5; // edi@4
  char *v6; // eax@4
  char *v7; // ecx@4
  unsigned int v8; // esi@4
  int v9; // eax@4
  unsigned int v10; // edi@4
  char v11; // dl@4
  char v12; // dl@7
  char result; // al@12
  char *pcKey; // [sp+8h] [bp-8h]@3
  char v15; // [sp+Fh] [bp-1h]@4

  v3 = rkOrgStream->m_dwSize;
  v4 = 0;
  if ( v3 && rkOrgStream->m_pcData && (pcKey = this->m_acKey, this->m_acKey[0]) )
  {
    v15 = 0;
    v5 = v3 + 1;
    operator delete(rkEncStream->m_pcData);
    v6 = (char *)operator new(v5);
    rkEncStream->m_pcData = v6;
    rkEncStream->m_dwSize = v5;
    Encrypt::EncryptXor(v6, v5, rkOrgStream->m_pcData, rkOrgStream->m_dwSize, pcKey);
    v7 = rkEncStream->m_pcData;
    v8 = rkEncStream->m_dwSize;
    v9 = (int)v7;
    v10 = (unsigned int)&v7[v8 - 1];
    v11 = 0;
    if ( (unsigned int)v7 < v10 )
    {
      if ( (signed int)(v10 - (_DWORD)v7) < 2 )
      {
        v12 = 0;
      }
      else
      {
        do
        {
          v15 += *(_BYTE *)v9;
          v4 += *(_BYTE *)(v9 + 1);
          v9 += 2;
        }
        while ( v9 < (signed int)&v7[v8 - 2] );
        v12 = 0;
      }
      if ( v9 < v10 )
        v12 = *(_BYTE *)v9;
      v11 = v15 + v4 + v12;
    }
    v7[v8 - 1] = v11;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00739490) --------------------------------------------------------
char __thiscall Encrypt::EncryptMethodXor::Decrypt(Encrypt::EncryptMethodXor *this, Encrypt::Stream *rkOrgStream, Encrypt::Stream *rkEncStream)
{
  Encrypt::Stream *v3; // edi@1
  unsigned int v4; // esi@1
  char *v5; // eax@2
  unsigned int v6; // esi@4
  char v7; // bl@4
  char v8; // dl@4
  char v9; // cl@4
  char v10; // bl@8
  unsigned int v11; // eax@11
  char result; // al@12
  char *pcKey; // [sp+8h] [bp-Ch]@3
  char *v14; // [sp+Ch] [bp-8h]@2

  v3 = rkEncStream;
  v4 = rkEncStream->m_dwSize;
  if ( !v4 )
    goto LABEL_16;
  v5 = rkEncStream->m_pcData;
  v14 = v5;
  if ( !v5 )
    goto LABEL_16;
  pcKey = this->m_acKey;
  if ( !this->m_acKey[0] )
    goto LABEL_16;
  v6 = (unsigned int)&v5[v4 - 1];
  v7 = 0;
  v8 = 0;
  v9 = 0;
  if ( (unsigned int)v5 < v6 )
  {
    if ( (signed int)(v6 - (_DWORD)v5) >= 2 )
    {
      do
      {
        v8 += *v5;
        v9 += v5[1];
        v5 += 2;
      }
      while ( (signed int)v5 < (signed int)(v6 - 1) );
    }
    if ( (unsigned int)v5 >= v6 )
      v10 = 0;
    else
      v10 = *v5;
    v3 = rkEncStream;
    v7 = v8 + v9 + v10;
  }
  v11 = v3->m_dwSize;
  if ( v7 == v14[v11 - 1] )
  {
    Encrypt::Stream::Allocate(rkOrgStream, v11 - 1);
    Encrypt::EncryptXor(rkOrgStream->m_pcData, rkOrgStream->m_dwSize - 1, v3->m_pcData, v3->m_dwSize - 1, pcKey);
    result = 1;
  }
  else
  {
LABEL_16:
    result = 0;
  }
  return result;
}

//----- (00739550) --------------------------------------------------------
char __thiscall Encrypt::EncryptStream::SaveEncrypted(Encrypt::EncryptStream *this, char *fn, Encrypt::IEncryptMethod *rkMethod)
{
  char result; // al@3
  Encrypt::FileStream kEncStream; // [sp+4h] [bp-18h]@1
  int v5; // [sp+18h] [bp-4h]@1

  kEncStream.m_pcData = 0;
  kEncStream.m_dwSize = 0;
  kEncStream.vfptr = (Encrypt::StreamVtbl *)&Encrypt::FileStream::`vftable';
  v5 = 0;
  if ( (unsigned __int8)((int (__stdcall *)(Encrypt::FileStream *, Encrypt::EncryptStream *))rkMethod->vfptr->Encrypt)(
                          &kEncStream,
                          this)
    && Encrypt::FileStream::Save(&kEncStream, fn) )
  {
    v5 = -1;
    kEncStream.vfptr = (Encrypt::StreamVtbl *)&Encrypt::Stream::`vftable';
    operator delete(kEncStream.m_pcData);
    result = 1;
  }
  else
  {
    v5 = -1;
    kEncStream.vfptr = (Encrypt::StreamVtbl *)&Encrypt::Stream::`vftable';
    operator delete(kEncStream.m_pcData);
    result = 0;
  }
  return result;
}
// 9725FC: using guessed type int (__thiscall *Encrypt::FileStream::`vftable')(void *p, char);
// 9CF304: using guessed type int (__thiscall *Encrypt::Stream::`vftable')(void *p, char);

//----- (00739610) --------------------------------------------------------
bool __thiscall Encrypt::EncryptStream::LoadOriginal(Encrypt::EncryptStream *this, char *fn)
{
  return Encrypt::FileStream::Load(&this->m_kOriginal, fn) != 0;
}

//----- (00739630) --------------------------------------------------------
bool __thiscall Encrypt::EncryptStream::SaveOriginal(Encrypt::EncryptStream *this, char *fn)
{
  return Encrypt::FileStream::Save(&this->m_kOriginal, fn) != 0;
}

//----- (00739650) --------------------------------------------------------
Encrypt::Stream *__thiscall Encrypt::Stream::`vector deleting destructor'(Encrypt::Stream *this, unsigned int a2)
{
  Encrypt::Stream *v2; // esi@1
  char *v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pcData;
  this->vfptr = (Encrypt::StreamVtbl *)&Encrypt::Stream::`vftable';
  operator delete(v3);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9CF304: using guessed type int (__thiscall *Encrypt::Stream::`vftable')(void *p, char);

//----- (00739680) --------------------------------------------------------
void __thiscall Encrypt::EncryptMethodXor::EncryptMethodXor(Encrypt::EncryptMethodXor *this, char *pcKey)
{
  char *v2; // eax@1
  Encrypt::EncryptMethodXor *v3; // esi@1
  char v4; // cl@3

  v2 = pcKey;
  v3 = this;
  this->vfptr = (Encrypt::IEncryptMethodVtbl *)Encrypt::EncryptMethodXor::`vftable';
  if ( strlen(pcKey) < 0x1F )
  {
    do
    {
      v4 = *v2;
      v2[v3->m_acKey - pcKey] = *v2;
      ++v2;
    }
    while ( v4 );
  }
  else
  {
    strncpy(v3->m_acKey, pcKey, 0x1Fu);
    v3->m_acKey[31] = 0;
  }
}
// 9CF30C: using guessed type bool (__thiscall *Encrypt::EncryptMethodXor::`vftable'[2])(Encrypt::EncryptMethodXor *this, Encrypt::Stream *rkEncStream, struct Stream *);

//----- (007396E0) --------------------------------------------------------
char __thiscall Encrypt::EncryptStream::LoadEncrypted(Encrypt::EncryptStream *this, char *fn, Encrypt::IEncryptMethod *rkMethod)
{
  Encrypt::EncryptStream *v3; // esi@1
  char result; // al@3
  Encrypt::FileStream kEncStream; // [sp+8h] [bp-18h]@1
  int v6; // [sp+1Ch] [bp-4h]@1

  v3 = this;
  kEncStream.m_pcData = 0;
  kEncStream.m_dwSize = 0;
  kEncStream.vfptr = (Encrypt::StreamVtbl *)&Encrypt::FileStream::`vftable';
  v6 = 0;
  if ( Encrypt::FileStream::Load(&kEncStream, fn)
    && (unsigned __int8)((int (__stdcall *)(Encrypt::EncryptStream *, Encrypt::FileStream *))rkMethod->vfptr->Decrypt)(
                          v3,
                          &kEncStream) )
  {
    v6 = -1;
    kEncStream.vfptr = (Encrypt::StreamVtbl *)&Encrypt::Stream::`vftable';
    operator delete(kEncStream.m_pcData);
    result = 1;
  }
  else
  {
    v6 = -1;
    kEncStream.vfptr = (Encrypt::StreamVtbl *)&Encrypt::Stream::`vftable';
    operator delete(kEncStream.m_pcData);
    result = 0;
  }
  return result;
}
// 9725FC: using guessed type int (__thiscall *Encrypt::FileStream::`vftable')(void *p, char);
// 9CF304: using guessed type int (__thiscall *Encrypt::Stream::`vftable')(void *p, char);

//----- (007397A0) --------------------------------------------------------
void __cdecl enable_sperror(bool bEnable)
{
  NULLSTR[5136] = bEnable;
}

//----- (007397B0) --------------------------------------------------------
void __cdecl enable_spcritical(bool bEnable)
{
  NULLSTR[5137] = bEnable;
}

//----- (007397C0) --------------------------------------------------------
char __thiscall CTextDataMem::ReadFieldStr(CTextDataMem *this, CFieldNode *pFieldNode, char *pcStr, int iMaxStr)
{
  char *v4; // eax@1
  char *v5; // edx@1
  char *v6; // eax@4
  int v7; // esi@4
  char v8; // dl@6

  v4 = (char *)pFieldNode->m_offset;
  v5 = &this->m_kData.pcData[this->m_kData.iLen];
  this->m_kData.pcCurrPos = v4;
  if ( v4 < v5 )
  {
    do
    {
      if ( *v4 == 34 )
        break;
      ++v4;
    }
    while ( v4 < &this->m_kData.pcData[this->m_kData.iLen] );
  }
  v6 = v4 + 1;
  v7 = 0;
  if ( v6 < v5 )
  {
    while ( v7 < iMaxStr )
    {
      v8 = *v6++;
      if ( v8 == 92 )
      {
        v8 = *v6++;
        if ( v6 >= &this->m_kData.pcData[this->m_kData.iLen] )
          return 0;
        if ( v8 == 110 )
          v8 = 10;
      }
      else if ( v8 == 34 )
      {
        pcStr[v7] = 0;
        return 1;
      }
      pcStr[v7++] = v8;
      if ( v6 >= &this->m_kData.pcData[this->m_kData.iLen] )
        return 1;
    }
  }
  return 1;
}

//----- (00739870) --------------------------------------------------------
CFieldNode *__thiscall INode::FindField(INode *this, char *token)
{
  INode *v2; // ebx@1
  std::_List_nod<INode *,std::allocator<INode *> >::_Node *v3; // eax@1
  std::_List_nod<INode *,std::allocator<INode *> >::_Node *v4; // esi@1
  CFieldNode *result; // eax@5

  v2 = this;
  v3 = this->m_childList._Myhead;
  v4 = v3->_Next;
  if ( v3->_Next == v3 )
  {
LABEL_5:
    result = 0;
  }
  else
  {
    while ( ((int (*)(void))v4->_Myval->vfptr->GetType)() != 1 || strcmp(token, v4->_Myval->m_token) )
    {
      v4 = v4->_Next;
      if ( v4 == v2->m_childList._Myhead )
        goto LABEL_5;
    }
    result = (CFieldNode *)v4->_Myval;
  }
  return result;
}

//----- (00739910) --------------------------------------------------------
void __usercall putShortMSB(internal_state *s@<eax>, unsigned int b@<ecx>)
{
  int v2; // edi@1

  *(_BYTE *)(s[2].dummy + s[5].dummy) = BYTE1(b);
  v2 = s[2].dummy;
  *(_BYTE *)(++s[5].dummy + v2) = b;
  ++s[5].dummy;
}

//----- (00739940) --------------------------------------------------------
void __usercall flush_pending(z_stream_s *strm@<eax>)
{
  z_stream_s *v1; // esi@1
  internal_state *v2; // eax@1
  unsigned int v3; // edi@1
  internal_state *v4; // eax@4
  internal_state *v5; // esi@4

  v1 = strm;
  v2 = strm->state;
  v3 = v2[5].dummy;
  if ( v3 > v1->avail_out )
    v3 = v1->avail_out;
  if ( v3 )
  {
    memcpy(v1->next_out, (char *)v2[4].dummy, v3);
    v4 = v1->state;
    v1->next_out += v3;
    v4[4].dummy += v3;
    v1->total_out += v3;
    v1->avail_out -= v3;
    v1->state[5].dummy -= v3;
    v5 = v1->state;
    if ( !v5[5].dummy )
      v5[4].dummy = v5[2].dummy;
  }
}

//----- (00739990) --------------------------------------------------------
int __cdecl deflate(z_stream_s *strm, int flush)
{
  z_stream_s *v2; // edi@1
  internal_state *v3; // esi@2
  int v4; // ecx@3
  int v5; // eax@7
  int result; // eax@10
  int v7; // edx@11
  signed int v8; // eax@13
  char v9; // al@14
  const char *v10; // eax@19
  signed int v11; // eax@21
  int v12; // eax@23
  unsigned int v13; // ecx@26
  internal_state *v14; // eax@28
  internal_state *v15; // eax@29
  int v16; // eax@41
  block_state v17; // eax@48
  int v18; // eax@61
  internal_state *v19; // eax@65
  int v20; // eax@66
  int old_flush; // [sp+10h] [bp+8h]@11

  v2 = strm;
  if ( !strm )
    return -2;
  v3 = strm->state;
  if ( !v3 )
    return -2;
  v4 = flush;
  if ( (unsigned int)flush > 4 )
    return -2;
  if ( !strm->next_out || !strm->next_in && strm->avail_in || (v5 = v3[1].dummy, v5 == 666) && flush != 4 )
  {
    strm->msg = "stream error";
    return -2;
  }
  if ( !strm->avail_out )
  {
    strm->msg = "buffer error";
    return -5;
  }
  v7 = v3[8].dummy;
  v3->dummy = (int)strm;
  old_flush = v7;
  v3[8].dummy = flush;
  if ( v5 == 42 )
  {
    if ( v3[6].dummy == 2 )
    {
      *(_BYTE *)(v3[2].dummy + v3[5].dummy++) = 31;
      *(_BYTE *)(v3[5].dummy++ + v3[2].dummy) = -117;
      *(_BYTE *)(v3[5].dummy++ + v3[2].dummy) = 8;
      *(_BYTE *)(v3[5].dummy++ + v3[2].dummy) = 0;
      *(_BYTE *)(v3[5].dummy++ + v3[2].dummy) = 0;
      *(_BYTE *)(v3[5].dummy++ + v3[2].dummy) = 0;
      *(_BYTE *)(v3[5].dummy++ + v3[2].dummy) = 0;
      *(_BYTE *)(v3[5].dummy++ + v3[2].dummy) = 0;
      v8 = v3[31].dummy;
      if ( v8 == 9 )
      {
        v9 = 2;
      }
      else if ( v3[32].dummy >= 2 || v8 < 2 )
      {
        v9 = 4;
      }
      else
      {
        v9 = 0;
      }
      *(_BYTE *)(v3[5].dummy++ + v3[2].dummy) = v9;
      *(_BYTE *)(v3[5].dummy++ + v3[2].dummy) = -1;
      v3[1].dummy = 113;
      v10 = (const char *)crc32(0, 0, 0);
    }
    else
    {
      if ( v3[32].dummy >= 2 || (v11 = v3[31].dummy, v11 < 2) )
      {
        v12 = 0;
      }
      else if ( v11 >= 6 )
      {
        v12 = (v11 != 6) + 2;
      }
      else
      {
        v12 = 1;
      }
      v13 = (v12 << 6) | (((v3[10].dummy - 8) << 12) + 2048);
      if ( v3[25].dummy )
        v13 |= 0x20u;
      v3[1].dummy = 113;
      putShortMSB(v3, 31 * (v13 / 0x1F + 1));
      if ( v3[25].dummy )
      {
        putShortMSB(v14, HIWORD(v2->adler));
        putShortMSB(v15, LOWORD(v2->adler));
      }
      v10 = adler32(0, 0, 0);
    }
    v4 = flush;
    v2->adler = (unsigned int)v10;
  }
  if ( v3[5].dummy )
  {
    flush_pending(v2);
    if ( !v2->avail_out )
    {
LABEL_34:
      v3[8].dummy = -1;
      return 0;
    }
    v4 = flush;
  }
  else if ( !v2->avail_in && v4 <= old_flush && v4 != 4 )
  {
    v2->msg = "buffer error";
    return -5;
  }
  v16 = v3[1].dummy;
  if ( v16 == 666 )
  {
    if ( v2->avail_in )
    {
      v2->msg = "buffer error";
      return -5;
    }
LABEL_45:
    if ( !v3[27].dummy && (!v4 || v16 == 666) )
      goto LABEL_60;
    goto LABEL_48;
  }
  if ( !v2->avail_in )
    goto LABEL_45;
LABEL_48:
  v17 = (signed int)configuration_table[v3[31].dummy].func(v3, v4);
  if ( v17 == 2 || v17 == 3 )
    v3[1].dummy = 666;
  if ( v17 == need_more || v17 == 2 )
  {
    if ( v2->avail_out )
      return 0;
    v3[8].dummy = -1;
    return 0;
  }
  if ( v17 == 1 )
  {
    if ( flush == 1 )
    {
      _tr_align(v3);
    }
    else
    {
      _tr_stored_block(v3, 0, 0, 0);
      if ( flush == 3 )
      {
        *(_WORD *)(v3[15].dummy + 2 * v3[17].dummy - 2) = 0;
        memset((char *)v3[15].dummy, 0, 2 * v3[17].dummy - 2);
      }
    }
    flush_pending(v2);
    if ( !v2->avail_out )
      goto LABEL_34;
  }
  v4 = flush;
LABEL_60:
  if ( v4 != 4 )
    return 0;
  v18 = v3[6].dummy;
  if ( v18 > 0 )
  {
    if ( v18 == 2 )
    {
      *(_BYTE *)(v3[2].dummy + v3[5].dummy++) = v2->adler;
      *(_BYTE *)(v3[5].dummy++ + v3[2].dummy) = BYTE1(v2->adler);
      *(_BYTE *)(v3[5].dummy++ + v3[2].dummy) = BYTE2(v2->adler);
      *(_BYTE *)(v3[5].dummy++ + v3[2].dummy) = BYTE3(v2->adler);
      *(_BYTE *)(v3[5].dummy++ + v3[2].dummy) = v2->total_in;
      *(_BYTE *)(v3[5].dummy++ + v3[2].dummy) = BYTE1(v2->total_in);
      *(_BYTE *)(v3[5].dummy++ + v3[2].dummy) = BYTE2(v2->total_in);
      *(_BYTE *)(v3[5].dummy++ + v3[2].dummy) = BYTE3(v2->total_in);
    }
    else
    {
      putShortMSB(v3, HIWORD(v2->adler));
      putShortMSB(v19, LOWORD(v2->adler));
    }
    flush_pending(v2);
    v20 = v3[6].dummy;
    if ( v20 > 0 )
      v3[6].dummy = -v20;
    result = v3[5].dummy == 0;
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (00739D90) --------------------------------------------------------
int __cdecl deflateEnd(z_stream_s *strm)
{
  internal_state *v1; // eax@2
  int v2; // edi@3
  int result; // eax@6
  void *v4; // eax@7
  internal_state *v5; // edx@9
  internal_state *v6; // edx@11
  internal_state *v7; // edx@13

  if ( strm && (v1 = strm->state) != 0 )
  {
    v2 = v1[1].dummy;
    if ( v2 == 42 || v2 == 113 || v2 == 666 )
    {
      v4 = (void *)v1[2].dummy;
      if ( v4 )
        strm->zfree(strm->opaque, v4);
      v5 = strm->state;
      if ( v5[15].dummy )
        strm->zfree(strm->opaque, (void *)v5[15].dummy);
      v6 = strm->state;
      if ( v6[14].dummy )
        strm->zfree(strm->opaque, (void *)v6[14].dummy);
      v7 = strm->state;
      if ( v7[12].dummy )
        strm->zfree(strm->opaque, (void *)v7[12].dummy);
      strm->zfree(strm->opaque, strm->state);
      strm->state = 0;
      result = v2 != 113 ? 0 : 0xFFFFFFFD;
    }
    else
    {
      result = -2;
    }
  }
  else
  {
    result = -2;
  }
  return result;
}

//----- (00739E60) --------------------------------------------------------
void __usercall lm_init(internal_state *s@<esi>)
{
  int v1; // ecx@1
  int v2; // edx@1
  int v3; // eax@1
  int v4; // edx@1

  v1 = s[17].dummy;
  v2 = s[15].dummy;
  s[13].dummy = 2 * s[9].dummy;
  *(_WORD *)(v2 + 2 * v1 - 2) = 0;
  memset((char *)s[15].dummy, 0, 2 * s[17].dummy - 2);
  v3 = s[31].dummy;
  s[30].dummy = configuration_table[s[31].dummy].max_lazy;
  s[33].dummy = configuration_table[v3].good_length;
  s[34].dummy = configuration_table[v3].nice_length;
  v4 = configuration_table[v3].max_chain;
  s[25].dummy = 0;
  s[21].dummy = 0;
  s[27].dummy = 0;
  s[24].dummy = 0;
  s[16].dummy = 0;
  s[29].dummy = v4;
  s[28].dummy = 2;
  s[22].dummy = 2;
}

//----- (00739EF0) --------------------------------------------------------
unsigned int __usercall longest_match@<eax>(internal_state *s@<edi>, unsigned int cur_match)
{
  unsigned int v2; // edx@1
  int v3; // esi@1
  int v4; // ecx@1
  unsigned int result; // eax@1
  unsigned int v6; // esi@4
  unsigned int v7; // ebx@8
  int v8; // edx@9
  unsigned int v9; // ecx@13
  int v10; // edx@13
  char v11; // bl@14
  char v12; // bl@15
  char v13; // bl@16
  char v14; // bl@17
  char v15; // bl@18
  char v16; // bl@19
  char v17; // bl@20
  char v18; // bl@21
  int v19; // edx@23
  unsigned int limit; // [sp+Ch] [bp-10h]@2
  unsigned int nice_match; // [sp+10h] [bp-Ch]@1
  unsigned int chain_length; // [sp+14h] [bp-8h]@1
  char scan_end; // [sp+1Ah] [bp-2h]@4
  char scan_end1; // [sp+1Bh] [bp-1h]@4

  v2 = s[25].dummy;
  nice_match = s[34].dummy;
  v3 = s[9].dummy;
  v4 = v2 + s[12].dummy;
  chain_length = s[29].dummy;
  result = s[28].dummy;
  if ( v2 <= v3 - 262 )
    limit = 0;
  else
    limit = v2 - v3 + 262;
  scan_end1 = *(_BYTE *)(result + v4 - 1);
  v6 = v4 + 258;
  scan_end = *(_BYTE *)(result + v4);
  if ( result >= s[33].dummy )
    chain_length >>= 2;
  if ( nice_match > s[27].dummy )
    nice_match = s[27].dummy;
  v7 = cur_match;
  do
  {
    v8 = v7 + s[12].dummy;
    if ( *(_BYTE *)(v8 + result) == scan_end
      && *(_BYTE *)(v8 + result - 1) == scan_end1
      && *(_BYTE *)v8 == *(_BYTE *)v4
      && *(_BYTE *)(v8 + 1) == *(_BYTE *)(v4 + 1) )
    {
      v9 = v4 + 2;
      v10 = v8 + 2;
      do
      {
        v11 = *(_BYTE *)(v9++ + 1);
        if ( v11 != *(_BYTE *)(v10 + 1) )
          break;
        v12 = *(_BYTE *)(v9++ + 1);
        if ( v12 != *(_BYTE *)(v10 + 2) )
          break;
        v13 = *(_BYTE *)(v9++ + 1);
        if ( v13 != *(_BYTE *)(v10 + 3) )
          break;
        v14 = *(_BYTE *)(v9++ + 1);
        if ( v14 != *(_BYTE *)(v10 + 4) )
          break;
        v15 = *(_BYTE *)(v9++ + 1);
        if ( v15 != *(_BYTE *)(v10 + 5) )
          break;
        v16 = *(_BYTE *)(v9++ + 1);
        if ( v16 != *(_BYTE *)(v10 + 6) )
          break;
        v17 = *(_BYTE *)(v9++ + 1);
        if ( v17 != *(_BYTE *)(v10 + 7) )
          break;
        v18 = *(_BYTE *)(v9++ + 1);
        v10 += 8;
        if ( v18 != *(_BYTE *)v10 )
          break;
      }
      while ( v9 < v6 );
      v19 = v9 - v6 + 258;
      v4 = v6 - 258;
      if ( v19 > (signed int)result )
      {
        s[26].dummy = cur_match;
        result = v19;
        if ( v19 >= (signed int)nice_match )
          break;
        scan_end1 = *(_BYTE *)(v19 + v4 - 1);
        scan_end = *(_BYTE *)(v19 + v4);
      }
    }
    v7 = *(_WORD *)(s[14].dummy + 2 * (cur_match & s[11].dummy));
    cur_match = v7;
    if ( v7 <= limit )
      break;
    --chain_length;
  }
  while ( chain_length );
  if ( result > s[27].dummy )
    result = s[27].dummy;
  return result;
}

//----- (0073A050) --------------------------------------------------------
unsigned int __usercall longest_match_fast@<eax>(internal_state *s@<esi>, unsigned int cur_match@<edx>)
{
  int v2; // ecx@1
  int v3; // eax@1
  unsigned int v4; // ecx@1
  unsigned int v5; // edi@1
  unsigned int v6; // eax@3
  int v7; // ecx@3
  char v8; // bl@4
  char v9; // bl@5
  char v10; // bl@6
  char v11; // bl@7
  char v12; // bl@8
  char v13; // bl@9
  char v14; // bl@10
  char v15; // bl@11
  unsigned int result; // eax@13
  unsigned int v17; // ecx@14

  v2 = s[12].dummy;
  v3 = v2 + s[25].dummy;
  v4 = cur_match + v2;
  v5 = v3 + 258;
  if ( *(_BYTE *)v4 != *(_BYTE *)v3 || *(_BYTE *)(v4 + 1) != *(_BYTE *)(v3 + 1) )
    goto LABEL_19;
  v6 = v3 + 2;
  v7 = v4 + 2;
  do
  {
    v8 = *(_BYTE *)(v6++ + 1);
    if ( v8 != *(_BYTE *)(v7 + 1) )
      break;
    v9 = *(_BYTE *)(v6++ + 1);
    if ( v9 != *(_BYTE *)(v7 + 2) )
      break;
    v10 = *(_BYTE *)(v6++ + 1);
    if ( v10 != *(_BYTE *)(v7 + 3) )
      break;
    v11 = *(_BYTE *)(v6++ + 1);
    if ( v11 != *(_BYTE *)(v7 + 4) )
      break;
    v12 = *(_BYTE *)(v6++ + 1);
    if ( v12 != *(_BYTE *)(v7 + 5) )
      break;
    v13 = *(_BYTE *)(v6++ + 1);
    if ( v13 != *(_BYTE *)(v7 + 6) )
      break;
    v14 = *(_BYTE *)(v6++ + 1);
    if ( v14 != *(_BYTE *)(v7 + 7) )
      break;
    v15 = *(_BYTE *)(v6++ + 1);
    v7 += 8;
    if ( v15 != *(_BYTE *)v7 )
      break;
  }
  while ( v6 < v5 );
  result = v6 - v5 + 258;
  if ( (signed int)result < 3 )
  {
LABEL_19:
    result = 2;
  }
  else
  {
    v17 = s[27].dummy;
    s[26].dummy = cur_match;
    if ( result > v17 )
      result = v17;
  }
  return result;
}

//----- (0073A0F0) --------------------------------------------------------
void __usercall fill_window(internal_state *s@<esi>)
{
  unsigned int v1; // edi@1
  unsigned int v2; // eax@3
  int v3; // ebx@3
  int v4; // edx@4
  int v5; // eax@4
  _WORD *v6; // ecx@4
  int v7; // eax@5
  __int16 v8; // ax@6
  unsigned int v9; // edx@9
  _WORD *v10; // ecx@9
  int v11; // eax@10
  __int16 v12; // ax@11
  int v13; // edi@15
  char *v14; // eax@16
  unsigned int v15; // ebx@16
  int v16; // edx@19
  int v17; // ecx@19
  const char *v18; // eax@20
  unsigned int v19; // edi@25
  int v20; // edx@26
  int v21; // ecx@26
  int v22; // eax@26
  int wsize; // [sp+8h] [bp-Ch]@1
  int v24; // [sp+Ch] [bp-8h]@16
  unsigned int more; // [sp+10h] [bp-4h]@3

  v1 = s[9].dummy;
  for ( wsize = s[9].dummy; ; v1 = wsize )
  {
    v2 = s[25].dummy;
    v3 = s[13].dummy - s[27].dummy - v2;
    more = s[13].dummy - s[27].dummy - v2;
    if ( v2 >= v1 + s[9].dummy - 262 )
    {
      memcpy((char *)s[12].dummy, (char *)(s[12].dummy + v1), v1);
      v4 = s[17].dummy;
      v5 = s[15].dummy;
      s[26].dummy -= v1;
      s[25].dummy -= v1;
      s[21].dummy -= v1;
      v6 = (_WORD *)(v5 + 2 * v4);
      do
      {
        v7 = *(v6 - 1);
        --v6;
        if ( v7 < v1 )
          v8 = 0;
        else
          v8 = v7 - v1;
        --v4;
        *v6 = v8;
      }
      while ( v4 );
      v9 = v1;
      v10 = (_WORD *)(s[14].dummy + 2 * v1);
      do
      {
        v11 = *(v10 - 1);
        --v10;
        if ( v11 < v1 )
          v12 = 0;
        else
          v12 = v11 - v1;
        --v9;
        *v10 = v12;
      }
      while ( v9 );
      more = v1 + v3;
    }
    v13 = s->dummy;
    if ( !*(_DWORD *)(s->dummy + 4) )
      break;
    v14 = (char *)(s[12].dummy + s[25].dummy + s[27].dummy);
    v15 = *(_DWORD *)(v13 + 4);
    v24 = s[12].dummy + s[25].dummy + s[27].dummy;
    if ( v15 > more )
      v15 = more;
    if ( v15 )
    {
      v16 = *(_DWORD *)(v13 + 28);
      *(_DWORD *)(v13 + 4) -= v15;
      v17 = *(_DWORD *)(v16 + 24);
      if ( v17 == 1 )
      {
        v18 = adler32(*(_DWORD *)(v13 + 48), *(const char **)v13, v15);
        goto LABEL_23;
      }
      if ( v17 == 2 )
      {
        v18 = (const char *)crc32(*(_DWORD *)(v13 + 48), *(const char **)v13, v15);
LABEL_23:
        *(_DWORD *)(v13 + 48) = v18;
        v14 = (char *)v24;
      }
      memcpy(v14, *(char **)v13, v15);
      *(_DWORD *)v13 += v15;
      *(_DWORD *)(v13 + 8) += v15;
    }
    s[27].dummy += v15;
    v19 = s[27].dummy;
    if ( v19 >= 3 )
    {
      v20 = s[12].dummy + s[25].dummy;
      v21 = s[20].dummy;
      v22 = *(_BYTE *)v20;
      s[16].dummy = v22;
      s[16].dummy = s[19].dummy & (*(_BYTE *)(v20 + 1) ^ (v22 << v21));
    }
    if ( v19 >= 0x106 || !*(_DWORD *)(s->dummy + 4) )
      return;
  }
}

//----- (0073A240) --------------------------------------------------------
signed int __cdecl deflate_stored(internal_state *s, int flush)
{
  unsigned int v2; // eax@3
  bool v3; // zf@5
  int v4; // ecx@5
  unsigned int v5; // edx@5
  unsigned int v6; // eax@5
  char *v7; // edx@8
  int v8; // edi@10
  int v9; // eax@10
  unsigned int v10; // ebx@10
  int v11; // eax@13
  int v12; // edi@13
  int v13; // edx@16
  unsigned int v14; // ecx@16
  char *v15; // eax@18
  int v16; // edi@20
  int v17; // eax@20
  unsigned int v18; // ebx@20
  int v19; // eax@23
  int v20; // edi@23
  signed int result; // eax@26
  int v22; // ecx@28
  char *v23; // eax@29
  int v24; // eax@31
  int max_block_size; // [sp+Ch] [bp-4h]@1

  max_block_size = 0xFFFF;
  if ( (unsigned int)(s[3].dummy - 5) < 0xFFFF )
    max_block_size = s[3].dummy - 5;
  while ( 1 )
  {
    v2 = s[27].dummy;
    if ( v2 <= 1 )
    {
      fill_window(s);
      v2 = s[27].dummy;
      if ( !v2 )
        break;
    }
    v3 = v2 + s[25].dummy == 0;
    s[25].dummy += v2;
    v4 = s[21].dummy;
    v5 = s[25].dummy;
    s[27].dummy = 0;
    v6 = v4 + max_block_size;
    if ( !v3 && v5 < v6 )
      goto LABEL_36;
    s[27].dummy = v5 - v6;
    s[25].dummy = v6;
    if ( v4 < 0 )
      v7 = 0;
    else
      v7 = (char *)(v4 + s[12].dummy);
    _tr_flush_block(s, v7, max_block_size, 0);
    v8 = s->dummy;
    s[21].dummy = s[25].dummy;
    v9 = *(_DWORD *)(v8 + 28);
    v10 = *(_DWORD *)(v9 + 20);
    if ( v10 > *(_DWORD *)(v8 + 16) )
      v10 = *(_DWORD *)(v8 + 16);
    if ( v10 )
    {
      memcpy(*(char **)(v8 + 12), *(char **)(v9 + 16), v10);
      v11 = *(_DWORD *)(v8 + 28);
      *(_DWORD *)(v8 + 12) += v10;
      *(_DWORD *)(v11 + 16) += v10;
      *(_DWORD *)(v8 + 20) += v10;
      *(_DWORD *)(v8 + 16) -= v10;
      *(_DWORD *)(*(_DWORD *)(v8 + 28) + 20) -= v10;
      v12 = *(_DWORD *)(v8 + 28);
      if ( !*(_DWORD *)(v12 + 20) )
        *(_DWORD *)(v12 + 16) = *(_DWORD *)(v12 + 8);
    }
    if ( *(_DWORD *)(s->dummy + 16) )
    {
LABEL_36:
      v13 = s[21].dummy;
      v14 = s[25].dummy - v13;
      if ( v14 < s[9].dummy - 262 )
        continue;
      if ( v13 < 0 )
        v15 = 0;
      else
        v15 = (char *)(v13 + s[12].dummy);
      _tr_flush_block(s, v15, v14, 0);
      v16 = s->dummy;
      s[21].dummy = s[25].dummy;
      v17 = *(_DWORD *)(v16 + 28);
      v18 = *(_DWORD *)(v17 + 20);
      if ( v18 > *(_DWORD *)(v16 + 16) )
        v18 = *(_DWORD *)(v16 + 16);
      if ( v18 )
      {
        memcpy(*(char **)(v16 + 12), *(char **)(v17 + 16), v18);
        v19 = *(_DWORD *)(v16 + 28);
        *(_DWORD *)(v16 + 12) += v18;
        *(_DWORD *)(v19 + 16) += v18;
        *(_DWORD *)(v16 + 20) += v18;
        *(_DWORD *)(v16 + 16) -= v18;
        *(_DWORD *)(*(_DWORD *)(v16 + 28) + 20) -= v18;
        v20 = *(_DWORD *)(v16 + 28);
        if ( !*(_DWORD *)(v20 + 20) )
          *(_DWORD *)(v20 + 16) = *(_DWORD *)(v20 + 8);
      }
      if ( *(_DWORD *)(s->dummy + 16) )
        continue;
    }
    return 0;
  }
  if ( !flush )
    return 0;
  v22 = s[21].dummy;
  if ( v22 < 0 )
    v23 = 0;
  else
    v23 = (char *)(v22 + s[12].dummy);
  _tr_flush_block(s, v23, s[25].dummy - v22, flush == 4);
  s[21].dummy = s[25].dummy;
  flush_pending((z_stream_s *)s->dummy);
  v24 = 0;
  if ( *(_DWORD *)(s->dummy + 16) )
  {
    LOBYTE(v24) = flush == 4;
    result = 2 * v24 + 1;
  }
  else
  {
    result = flush != 4 ? 0 : 2;
  }
  return result;
}

//----- (0073A420) --------------------------------------------------------
signed int __cdecl deflate_fast(internal_state *s, int flush)
{
  internal_state *v2; // esi@1
  unsigned int v3; // ebx@1
  unsigned int v4; // eax@3
  int v5; // edx@8
  int v6; // edi@8
  int v7; // eax@8
  int v8; // ecx@8
  unsigned int v9; // eax@10
  signed int v10; // ecx@11
  unsigned __int8 v11; // al@14
  __int16 v12; // cx@14
  unsigned __int16 v13; // cx@14
  int v14; // eax@15
  unsigned int v15; // eax@20
  int v16; // ebx@20
  int v17; // edx@23
  int v18; // ecx@23
  int v19; // eax@23
  int v20; // ebx@23
  int v22; // edx@25
  int v23; // ecx@25
  int v24; // eax@25
  unsigned __int8 v25; // al@26
  int v26; // ecx@29
  char *v27; // eax@30
  internal_state v28; // edi@32
  int v29; // eax@32
  unsigned int v30; // ebx@32
  int v31; // eax@35
  int v32; // edi@35
  signed int result; // eax@38
  int v34; // ecx@39
  char *v35; // eax@40
  int v36; // eax@42
  unsigned int hash_head; // [sp+Ch] [bp-4h]@1
  int bflush; // [sp+18h] [bp+8h]@20

  v2 = s;
  v3 = 0;
  for ( hash_head = 0; ; v3 = hash_head )
  {
    v4 = v2[27].dummy;
    if ( v4 < 0x106 )
    {
      fill_window(v2);
      v4 = v2[27].dummy;
      if ( v4 < 0x106 && !flush )
        return 0;
      if ( !v4 )
        break;
    }
    if ( v4 >= 3 )
    {
      v5 = v2[25].dummy;
      v6 = v2[11].dummy;
      v7 = v2[19].dummy & (*(_BYTE *)(v2[12].dummy + v5 + 2) ^ (v2[16].dummy << v2[20].dummy));
      v8 = v2[15].dummy;
      v2[16].dummy = v7;
      *(_WORD *)(v2[14].dummy + 2 * (v5 & v6)) = *(_WORD *)(v8 + 2 * v7);
      hash_head = *(_WORD *)(v2[14].dummy + 2 * (v2[11].dummy & v2[25].dummy));
      v3 = *(_WORD *)(v2[14].dummy + 2 * (v2[11].dummy & v2[25].dummy));
      *(_WORD *)(v2[15].dummy + 2 * v2[16].dummy) = v2[25].dummy;
    }
    if ( v3 )
    {
      v9 = v2[25].dummy - v3;
      if ( v9 <= v2[9].dummy - 262 )
      {
        v10 = v2[32].dummy;
        if ( v10 >= 2 )
        {
          if ( v10 == 3 && v9 == 1 )
            v2[22].dummy = longest_match_fast(v2, v3);
        }
        else
        {
          v2[22].dummy = longest_match(v2, v3);
        }
      }
    }
    if ( v2[22].dummy < 3u )
    {
      v25 = *(_BYTE *)(v2[25].dummy + v2[12].dummy);
      *(_WORD *)(v2[1447].dummy + 2 * v2[1446].dummy) = 0;
      *(_BYTE *)(v2[1444].dummy + v2[1446].dummy++) = v25;
      ++LOWORD(v2[v25 + 35].dummy);
      v16 = v2[1446].dummy == v2[1445].dummy - 1;
      --v2[27].dummy;
LABEL_27:
      ++v2[25].dummy;
      goto LABEL_28;
    }
    v11 = v2[22].dummy;
    v12 = LOWORD(v2[25].dummy) - LOWORD(v2[26].dummy);
    *(_WORD *)(v2[1447].dummy + 2 * v2[1446].dummy) = v12;
    v11 -= 3;
    *(_BYTE *)(v2[1444].dummy +  (__cdecl *v1y++) = v11;
    ++LOWORD(v2[(unsigned __int8)_length_code[v11] + 292].dummy);
    v13 = v12 - 1;
    if ( v13 >= 0x100u )
      v14 = (unsigned __int8)byte_9D05A0[(unsigned int)v13 >> 7];
    else
      v14 = (unsigned __int8)_dist_code[v13];
    ++LOWORD(v2[v14 + 608].dummy);
    v15 = v2[22].dummy;
    v16 = v2[1446].dummy == v2[1445].dummy - 1;
    v2[27].dummy -= v15;
    bflush = v16;
    if ( v15 <= v2[30].dummy && v2[27].dummy >= 3u )
    {
      v2[22].dummy = v15 - 1;
      do
      {
        v17 = ++v2[25].dummy;
        v18 = v2[15].dummy;
        v19 = v2[19].dummy & ((v2[16].dummy << v2[20].dummy) ^ *(_BYTE *)(v17 + v2[12].dummy + 2));
        v20 = v2[11].dummy;
        v2[16].dummy = v19;
        *(_WORD *)(v2[14].dummy + 2 * (v17 & v20)) = *(_WORD *)(v18 + 2 * v19);
        hash_head = *(_WORD *)(v2[14].dummy + 2 * (v2[11].dummy & v2[25].dummy));
        *(_WORD *)(v2[15].dummy + 2 * v2[16].dummy) = v2[25].dummy;
      }
      while ( v2[22].dummy-- != 1 );
      v16 = bflush;
      goto LABEL_27;
    }
    v2[25].dummy += v15;
    v22 = v2[25].dummy + v2[12].dummy;
    v23 = v2[20].dummy;
    v2[22].dummy = 0;
    v24 = *(_BYTE *)v22;
    v2[16].dummy = v24;
    v2[16].dummy = v2[19].dummy & (*(_BYTE *)(v22 + 1) ^ (v24 << v23));
LABEL_28:
    if ( v16 )
    {
      v26 = v2[21].dummy;
      if ( v26 < 0 )
        v27 = 0;
      else
        v27 = (char *)(v26 + v2[12].dummy);
      _tr_flush_block(v2, v27, v2[25].dummy - v26, 0);
      v28.dummy = v2->dummy;
      v2[21].dummy = v2[25].dummy;
      v29 = *(_DWORD *)(v28.dummy + 28);
      v30 = *(_DWORD *)(v29 + 20);
      if ( v30 > *(_DWORD *)(v28.dummy + 16) )
        v30 = *(_DWORD *)(v28.dummy + 16);
      if ( v30 )
      {
        memcpy(*(char **)(v28.dummy + 12), *(char **)(v29 + 16), v30);
        v31 = *(_DWORD *)(v28.dummy + 28);
        *(_DWORD *)(v28.dummy + 12) += v30;
        *(_DWORD *)(v31 + 16) += v30;
        *(_DWORD *)(v28.dummy + 20) += v30;
        *(_DWORD *)(v28.dummy + 16) -= v30;
        *(_DWORD *)(*(_DWORD *)(v28.dummy + 28) + 20) -= v30;
        v32 = *(_DWORD *)(v28.dummy + 28);
        if ( !*(_DWORD *)(v32 + 20) )
          *(_DWORD *)(v32 + 16) = *(_DWORD *)(v32 + 8);
      }
      if ( !*(_DWORD *)(v2->dummy + 16) )
        return 0;
    }
  }
  v34 = v2[21].dummy;
  if ( v34 < 0 )
    v35 = 0;
  else
    v35 = (char *)(v34 + v2[12].dummy);
  _tr_flush_block(v2, v35, v2[25].dummy - v34, flush == 4);
  v2[21].dummy = v2[25].dummy;
  flush_pending((z_stream_s *)v2->dummy);
  v36 = 0;
  if ( *(_DWORD *)(v2->dummy + 16) )
  {
    LOBYTE(v36) = flush == 4;
    result = 2 * v36 + 1;
  }
  else
  {
    result = flush != 4 ? 0 : 2;
  }
  return result;
}

//----- (0073A7A0) --------------------------------------------------------
signed int __cdecl deflate_slow(internal_state *s, int flush)
{
  internal_state *v2; // esi@1
  unsigned int v3; // eax@2
  int v4; // edx@7
  int v5; // edi@7
  int v6; // eax@7
  int v7; // ecx@7
  unsigned int v8; // ecx@8
  unsigned int v9; // eax@10
  signed int v10; // ecx@11
  unsigned int v11; // eax@12
  unsigned int v12; // eax@17
  unsigned int v13; // eax@22
  unsigned int v14; // edi@24
  unsigned __int8 v15; // al@24
  __int16 v16; // cx@24
  unsigned __int16 v17; // cx@24
  int v18; // eax@25
  int v19; // eax@27
  int v20; // ecx@27
  unsigned int v21; // edx@28
  int v22; // ebx@29
  int v23; // ecx@29
  int v24; // edx@29
  int v25; // eax@29
  int v26; // ecx@29
  int v27; // eax@31
  int v28; // edx@32
  char *v29; // ecx@33
  internal_state v30; // edi@35
  int v31; // eax@35
  unsigned int v32; // ebx@35
  int v33; // eax@38
  int v34; // edi@38
  bool v35; // zf@40
  signed int result; // eax@42
  unsigned __int8 v37; // al@44
  int v38; // ecx@45
  char *v39; // eax@46
  internal_state v40; // edi@48
  int v41; // eax@48
  unsigned int v42; // ebx@48
  int v43; // eax@51
  int v44; // edi@51
  internal_state v45; // ecx@53
  unsigned __int8 v46; // al@56
  int v47; // ecx@57
  char *v48; // eax@58
  int v49; // eax@60
  unsigned int hash_head; // [sp+Ch] [bp-4h]@1
  int bflush; // [sp+18h] [bp+8h]@27

  v2 = s;
  hash_head = 0;
  while ( 1 )
  {
    v3 = v2[27].dummy;
    if ( v3 < 0x106 )
    {
      fill_window(v2);
      v3 = v2[27].dummy;
      if ( v3 < 0x106 && !flush )
        return 0;
      if ( !v3 )
        break;
    }
    if ( v3 >= 3 )
    {
      v4 = v2[25].dummy;
      v5 = v2[11].dummy;
      v6 = v2[19].dummy & (*(_BYTE *)(v2[12].dummy + v4 + 2) ^ (v2[16].dummy << v2[20].dummy));
      v7 = v2[15].dummy;
      v2[16].dummy = v6;
      *(_WORD *)(v2[14].dummy + 2 * (v4 & v5)) = *(_WORD *)(v7 + 2 * v6);
      hash_head = *(_WORD *)(v2[14].dummy + 2 * (v2[11].dummy & v2[25].dummy));
      *(_WORD *)(v2[15].dummy + 2 * v2[16].dummy) = v2[25].dummy;
    }
    v8 = v2[22].dummy;
    v2[23].dummy = v2[26].dummy;
    v2[28].dummy = v8;
    v2[22].dummy = 2;
    if ( !hash_head )
      goto LABEL_22;
    if ( v8 >= v2[30].dummy )
      goto LABEL_22;
    v9 = v2[25].dummy - hash_head;
    if ( v9 > v2[9].dummy - 262 )
      goto LABEL_22;
    v10 = v2[32].dummy;
    if ( v10 < 2 )
    {
      v11 = longest_match(v2, hash_head);
LABEL_16:
      v2[22].dummy = v11;
      goto LABEL_17;
    }
    if ( v10 == 3 && v9 == 1 )
    {
      v11 = longest_match_fast(v2, hash_head);
      goto LABEL_16;
    }
LABEL_17:
    v12 = v2[22].dummy;
    if ( v12 <= 5 && (v2[32].dummy == 1 || v12 == 3 && (unsigned int)(v2[25].dummy - v2[26].dummy) > 0x1000) )
      v2[22].dummy = 2;
LABEL_22:
    v13 = v2[28].dummy;
    if ( v13 < 3 || v2[22].dummy > v13 )
    {
      if ( v2[24].dummy )
      {
        v37 = *(_BYTE *)(v2[25].dummy + v2[12].dummy - 1);
        *(_WORD *)(v2[1447].dummy + 2 * v2[1446].dummy) = 0;
        *(_BYTE *)(v2[1444].dummy + v2[1446].dummy++) = v37;
        ++LOWORD(v2[v37 + 35].dummy);
        if ( v2[1446].dummy == v2[1445].dummy - 1 )
        {
          v38 = v2[21].dummy;
          if ( v38 < 0 )
            v39 = 0;
          else
            v39 = (char *)(v38 + v2[12].dummy);
          _tr_flush_block(v2, v39, v2[25].dummy - v38, 0);
          v40.dummy = v2->dummy;
          v2[21].dummy = v2[25].dummy;
          v41 = *(_DWORD *)(v40.dummy + 28);
          v42 = *(_DWORD *)(v41 + 20);
          if ( v42 > *(_DWORD *)(v40.dummy + 16) )
            v42 = *(_DWORD *)(v40.dummy + 16);
          if ( v42 )
          {
            memcpy(*(char **)(v40.dummy + 12), *(char **)(v41 + 16), v42);
            v43 = *(_DWORD *)(v40.dummy + 28);
            *(_DWORD *)(v40.dummy + 12) += v42;
            *(_DWORD *)(v43 + 16) += v42;
            *(_DWORD *)(v40.dummy + 20) += v42;
            *(_DWORD *)(v40.dummy + 16) -= v42;
            *(_DWORD *)(*(_DWORD *)(v40.dummy + 28) + 20) -= v42;
            v44 = *(_DWORD *)(v40.dummy + 28);
            if ( !*(_DWORD *)(v44 + 20) )
              *(_DWORD *)(v44 + 16) = *(_DWORD *)(v44 + 8);
          }
        }
        v45.dummy = v2->dummy;
        ++v2[25].dummy;
        --v2[27].dummy;
        v35 = *(_DWORD *)(v45.dummy + 16) == 0;
        goto LABEL_41;
      }
      ++v2[25].dummy;
      --v2[27].dummy;
      v2[24].dummy = 1;
    }
    else
    {
      v14 = v2[25].dummy + v2[27].dummy - 3;
      v15 = v2[28].dummy;
      v16 = LOWORD(v2[25].dummy) - LOWORD(v2[23].dummy) - 1;
      *(_WORD *)(v2[1447].dummy + 2 * v2[1446].dummy) = v16;
      v15 -= 3;
      *(_BYTE *)(v2[1444].dummy + v2[1446].dummy++) = v15;
      ++LOWORD(v2[(unsigned __int8)_length_code[v15] + 292].dummy);
      v17 = v16 - 1;
      if ( v17 >= 0x100u )
        v18 = (unsigned __int8)byte_9D05A0[(unsigned int)v17 >> 7];
      else
        v18 = (unsigned __int8)_dist_code[v17];
      ++LOWORD(v2[v18 + 608].dummy);
      v19 = v2[28].dummy;
      v20 = v2[1446].dummy == v2[1445].dummy - 1;
      v2[27].dummy += 1 - v19;
      v2[28].dummy = v19 - 2;
      bflush = v20;
      do
      {
        v21 = ++v2[25].dummy;
        if ( v21 <= v14 )
        {
          v22 = v2[14].dummy;
          v23 = *(_BYTE *)(v2[12].dummy + v21 + 2);
          v24 = v2[11].dummy & v21;
          v25 = v2[19].dummy & (v23 ^ (v2[16].dummy << v2[20].dummy));
          v26 = v2[15].dummy;
          v2[16].dummy = v25;
          *(_WORD *)(v22 + 2 * v24) = *(_WORD *)(v26 + 2 * v25);
          hash_head = *(_WORD *)(v2[14].dummy + 2 * (v2[11].dummy & v2[25].dummy));
          *(_WORD *)(v2[15].dummy + 2 * v2[16].dummy) = v2[25].dummy;
        }
        v35 = v2[28].dummy-- == 1;
      }
      while ( !v35 );
      v27 = ++v2[25].dummy;
      v2[24].dummy = 0;
      v2[22].dummy = 2;
      if ( bflush )
      {
        v28 = v2[21].dummy;
        if ( v28 < 0 )
          v29 = 0;
        else
          v29 = (char *)(v28 + v2[12].dummy);
        _tr_flush_block(v2, v29, v27 - v28, 0);
        v30.dummy = v2->dummy;
        v2[21].dummy = v2[25].dummy;
        v31 = *(_DWORD *)(v30.dummy + 28);
        v32 = *(_DWORD *)(v31 + 20);
        if ( v32 > *(_DWORD *)(v30.dummy + 16) )
          v32 = *(_DWORD *)(v30.dummy + 16);
        if ( v32 )
        {
          memcpy(*(char **)(v30.dummy + 12), *(char **)(v31 + 16), v32);
          v33 = *(_DWORD *)(v30.dummy + 28);
          *(_DWORD *)(v30.dummy + 12) += v32;
          *(_DWORD *)(v33 + 16) += v32;
          *(_DWORD *)(v30.dummy + 20) += v32;
          *(_DWORD *)(v30.dummy + 16) -= v32;
          *(_DWORD *)(*(_DWORD *)(v30.dummy + 28) + 20) -= v32;
          v34 = *(_DWORD *)(v30.dummy + 28);
          if ( !*(_DWORD *)(v34 + 20) )
            *(_DWORD *)(v34 + 16) = *(_DWORD *)(v34 + 8);
        }
        v35 = *(_DWORD *)(v2->dummy + 16) == 0;
LABEL_41:
        if ( v35 )
          return 0;
      }
    }
  }
  if ( v2[24].dummy )
  {
    v46 = *(_BYTE *)(v2[25].dummy + v2[12].dummy - 1);
    *(_WORD *)(v2[1447].dummy + 2 * v2[1446].dummy) = 0;
    *(_BYTE *)(v2[1444].dummy + v2[1446].dummy++) = v46;
    ++LOWORD(v2[v46 + 35].dummy);
    v2[24].dummy = 0;
  }
  v47 = v2[21].dummy;
  if ( v47 < 0 )
    v48 = 0;
  else
    v48 = (char *)(v47 + v2[12].dummy);
  _tr_flush_block(v2, v48, v2[25].dummy - v47, flush == 4);
  v2[21].dummy = v2[25].dummy;
  flush_pending((z_stream_s *)v2->dummy);
  v49 = 0;
  if ( *(_DWORD *)(v2->dummy + 16) )
  {
    LOBYTE(v49) = flush == 4;
    result = 2 * v49 + 1;
  }
  else
  {
    result = flush != 4 ? 0 : 2;
  }
  return result;
}

//----- (0073AC20) --------------------------------------------------------
int __cdecl deflateReset(z_stream_s *strm)
{
  internal_state *v1; // esi@2
  int v2; // eax@5
  int v3; // eax@7
  const char *v4; // eax@8
  int result; // eax@10

  if ( strm && (v1 = strm->state) != 0 && strm->zalloc && strm->zfree )
  {
    strm->total_out = 0;
    strm->total_in = 0;
    strm->msg = 0;
    strm->data_type = 2;
    v1[4].dummy = v1[2].dummy;
    v2 = v1[6].dummy;
    v1[5].dummy = 0;
    if ( v2 < 0 )
      v1[6].dummy = -v2;
    v3 = v1[6].dummy;
    v1[1].dummy = v1[6].dummy != 0 ? 42 : 113;
    if ( v3 == 2 )
      v4 = (const char *)crc32(0, 0, 0);
    else
      v4 = adler32(0, 0, 0);
    strm->adler = (unsigned int)v4;
    v1[8].dummy = 0;
    _tr_init(v1);
    lm_init(v1);
    result = 0;
  }
  else
  {
    result = -2;
  }
  return result;
}

//----- (0073ACC0) --------------------------------------------------------
int __cdecl deflateInit2_(z_stream_s *strm, int level, int method, int windowBits, int memLevel, int strategy, const char *version, int stream_size)
{
  int result; // eax@5
  int v9; // ebx@12
  internal_state *v10; // eax@24
  internal_state *v11; // esi@24
  signed int v12; // eax@25
  void *v13; // eax@25
  unsigned int v14; // edx@25
  void *v15; // eax@25
  unsigned int v16; // edx@25
  char *v17; // eax@25
  unsigned int v18; // ecx@25
  bool v19; // zf@25
  int wrap; // [sp+0h] [bp-4h]@1

  wrap = 1;
  if ( !version || *version != 49 || stream_size != 56 )
    return -6;
  if ( !strm )
    return -2;
  strm->msg = 0;
  if ( !strm->zalloc )
  {
    strm->zalloc = zcalloc;
    strm->opaque = 0;
  }
  if ( !strm->zfree )
    strm->zfree = zcfree;
  if ( level == -1 )
    level = 6;
  v9 = windowBits;
  if ( windowBits < 0 )
  {
    wrap = 0;
    v9 = -windowBits;
LABEL_16:
    windowBits = v9;
    goto LABEL_17;
  }
  if ( windowBits > 15 )
  {
    wrap = 2;
    v9 = windowBits - 16;
    goto LABEL_16;
  }
LABEL_17:
  if ( (unsigned int)(memLevel - 1) > 8
    || method != 8
    || (unsigned int)(v9 - 8) > 7
    || (unsigned int)level > 9
    || (unsigned int)strategy > 3 )
  {
    result = -2;
  }
  else
  {
    if ( v9 == 8 )
    {
      windowBits = 9;
      v9 = 9;
    }
    v10 = (internal_state *)((int (__stdcall *)(void *))strm->zalloc)(strm->opaque);
    v11 = v10;
    if ( v10 )
    {
      strm->state = v10;
      v10[6].dummy = wrap;
      v10[10].dummy = v9;
      v12 = 1 << (memLevel + 7);
      v11[18].dummy = memLevel + 7;
      v11[11].dummy = (1 << windowBits) - 1;
      v11[17].dummy = v12;
      v11[19].dummy = v12 - 1;
      v11->dummy = (int)strm;
      v11[9].dummy = 1 << windowBits;
      v11[20].dummy = (memLevel + 9) / 3u;
      v13 = strm->zalloc(strm->opaque, 1 << windowBits, 2u);
      v14 = v11[9].dummy;
      v11[12].dummy = (int)v13;
      v15 = strm->zalloc(strm->opaque, v14, 2u);
      v16 = v11[17].dummy;
      v11[14].dummy = (int)v15;
      v11[15].dummy = (int)strm->zalloc(strm->opaque, v16, 2u);
      v11[1445].dummy = 1 << (memLevel + 6);
      v17 = (char *)strm->zalloc(strm->opaque, 1 << (memLevel + 6), 4u);
      v18 = v11[1445].dummy;
      v19 = v11[12].dummy == 0;
      v11[2].dummy = (int)v17;
      v11[3].dummy = 4 * v18;
      if ( !v19 && v11[14].dummy && v11[15].dummy && v17 )
      {
        v11[1447].dummy = (int)&v17[2 * (v18 >> 1)];
        v11[1444].dummy = (int)(&v17[2 * v18] + v18);
        v11[31].dummy = level;
        v11[32].dummy = strategy;
        LOBYTE(v11[7].dummy) = 8;
        return deflateReset(strm);
      }
      v11[1].dummy = 666;
      strm->msg = "insufficient memory";
      deflateEnd(strm);
    }
    result = -4;
  }
  return result;
}
// 73ACC0: could not find valid save-restore pair for esi

//----- (0073AEF0) --------------------------------------------------------
int __cdecl deflateInit_(z_stream_s *strm, int level, const char *version, int stream_size)
{
  return deflateInit2_(strm, level, 8, 15, 8, 0, version, stream_size);
}

//----- (0073AF20) --------------------------------------------------------
int __cdecl inflateReset(z_stream_s *strm)
{
  internal_state *v1; // eax@2
  int result; // eax@3

  if ( strm && (v1 = strm->state) != 0 )
  {
    v1[6].dummy = 0;
    strm->total_out = 0;
    strm->total_in = 0;
    strm->msg = 0;
    strm->adler = 1;
    v1->dummy = 0;
    v1[1].dummy = 0;
    v1[3].dummy = 0;
    v1[8].dummy = 0;
    v1[9].dummy = 0;
    v1[12].dummy = 0;
    v1[13].dummy = 0;
    v1[25].dummy = (int)&v1[330].dummy;
    v1[18].dummy = (int)&v1[330].dummy;
    v1[17].dummy = (int)&v1[330].dummy;
    result = 0;
  }
  else
  {
    result = -2;
  }
  return result;
}

//----- (0073AF80) --------------------------------------------------------
int __cdecl inflateInit2_(z_stream_s *strm, int windowBits, const char *version, int stream_size)
{
  internal_state *v4; // eax@9
  int result; // eax@10
  int v6; // ecx@11

  if ( version && *version == 49 && stream_size == 56 )
  {
    if ( strm )
    {
      strm->msg = 0;
      if ( !strm->zalloc )
      {
        strm->zalloc = zcalloc;
        strm->opaque = 0;
      }
      if ( !strm->zfree )
        strm->zfree = zcfree;
      v4 = (internal_state *)strm->zalloc(strm->opaque, 1u, 7080u);
      if ( !v4 )
        return -4;
      v6 = windowBits;
      strm->state = v4;
      if ( windowBits >= 0 )
      {
        v4[2].dummy = (windowBits >> 4) + 1;
        if ( windowBits < 48 )
          v6 = windowBits & 0xF;
      }
      else
      {
        v4[2].dummy = 0;
        v6 = -windowBits;
      }
      if ( (unsigned int)(v6 - 8) <= 7 )
      {
        v4[7].dummy = v6;
        v4[11].dummy = 0;
        return inflateReset(strm);
      }
      strm->zfree(strm->opaque, v4);
      strm->state = 0;
    }
    result = -2;
  }
  else
  {
    result = -6;
  }
  return result;
}

//----- (0073B050) --------------------------------------------------------
int __cdecl inflateInit_(z_stream_s *strm, const char *version, int stream_size)
{
  return inflateInit2_(strm, 15, version, stream_size);
}

//----- (0073B070) --------------------------------------------------------
int __usercall updatewindow@<eax>(z_stream_s *strm@<ebx>, unsigned int out@<eax>)
{
  internal_state *v2; // esi@1
  unsigned int v3; // edi@1
  void *v4; // eax@2
  int result; // eax@3
  int v6; // ecx@5
  unsigned int v7; // edi@6
  unsigned int v8; // eax@6
  unsigned int v9; // eax@8
  unsigned int v10; // edi@10
  int v11; // edx@11
  unsigned int v12; // eax@12
  unsigned int v13; // edx@14
  unsigned int dist; // [sp+8h] [bp-4h]@8

  v2 = strm->state;
  v3 = out;
  if ( v2[11].dummy || (v4 = strm->zalloc(strm->opaque, 1 << v2[7].dummy, 1u), (v2[11].dummy = (int)v4) != 0) )
  {
    if ( !v2[8].dummy )
    {
      v6 = v2[7].dummy;
      v2[10].dummy = 0;
      v2[9].dummy = 0;
      v2[8].dummy = 1 << v6;
    }
    v7 = v3 - strm->avail_out;
    v8 = v2[8].dummy;
    if ( v7 < v8 )
    {
      v9 = v8 - v2[10].dummy;
      dist = v9;
      if ( v9 > v7 )
      {
        dist = v7;
        v9 = v7;
      }
      memcpy((char *)(v2[10].dummy + v2[11].dummy), &strm->next_out[-v7], v9);
      v10 = v7 - dist;
      if ( v10 )
      {
        memcpy((char *)v2[11].dummy, &strm->next_out[-v10], v10);
        v11 = v2[8].dummy;
        v2[10].dummy = v10;
        v2[9].dummy = v11;
        result = 0;
      }
      else
      {
        v12 = v2[8].dummy;
        v2[10].dummy += dist;
        if ( v2[10].dummy == v12 )
          v2[10].dummy = 0;
        v13 = v2[9].dummy;
        if ( v13 < v12 )
          v2[9].dummy = dist + v13;
        result = 0;
      }
    }
    else
    {
      memcpy((char *)v2[11].dummy, &strm->next_out[-v8], v2[8].dummy);
      v2[9].dummy = v2[8].dummy;
      v2[10].dummy = 0;
      result = 0;
    }
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (0073B170) --------------------------------------------------------
int __cdecl inflate(z_stream_s *strm, int flush)
{
  z_stream_s *v2; // edx@1
  internal_state *v3; // edi@2
  char *v4; // eax@8
  unsigned int v5; // ecx@8
  unsigned int v6; // ebx@8
  unsigned int v7; // ecx@8
  char *v8; // eax@8
  unsigned int v9; // esi@8
  int result; // eax@9
  int v11; // edx@17
  int v12; // edx@17
  int v13; // eax@18
  const char *v14; // eax@27
  int v15; // edx@31
  int v16; // edx@31
  int v17; // edx@41
  int v18; // edx@41
  int v19; // edx@47
  int v20; // edx@47
  int v21; // edx@54
  int v22; // edx@54
  bool v23; // zf@55
  unsigned int v24; // ecx@60
  int v25; // eax@64
  code v26; // ecx@70
  unsigned int v27; // edx@71
  int v28; // eax@74
  code v29; // ecx@79
  unsigned int v30; // edx@80
  int v31; // eax@83
  int v32; // edx@89
  int v33; // edx@89
  int v34; // eax@93
  int v35; // edx@96
  int v36; // edx@96
  unsigned int v37; // ecx@97
  const char *v38; // eax@99
  int v39; // ecx@102
  int v40; // edx@105
  int v41; // edx@105
  int v42; // ecx@106
  unsigned int v43; // ebx@106
  int v44; // ecx@112
  int v45; // edx@114
  int v46; // edx@114
  int v47; // ecx@115
  unsigned int v48; // ecx@118
  int v49; // edx@127
  int v50; // edx@127
  int v51; // ecx@128
  unsigned int v52; // ebx@128
  char v53; // dl@128
  unsigned int v54; // edx@128
  int v55; // ecx@128
  bool v56; // cf@128
  int v57; // edx@134
  int v58; // edx@134
  int v59; // eax@138
  code v60; // ecx@143
  unsigned int v61; // edx@143
  int v62; // edx@145
  int v63; // edx@145
  signed int v64; // edx@145
  int v65; // ecx@145
  int v66; // edx@149
  int v67; // edx@149
  int v68; // ecx@150
  code v69; // ecx@151
  int v70; // edx@154
  int v71; // edx@154
  int v72; // ecx@155
  int v73; // ecx@156
  int v74; // edx@160
  int v75; // edx@160
  unsigned int v76; // ebx@161
  signed int v77; // edx@161
  int v78; // edx@164
  int v79; // edx@164
  unsigned int v80; // ebx@165
  int v81; // edx@166
  int v82; // edx@169
  unsigned int v83; // edx@172
  int v84; // ecx@176
  unsigned int v85; // edx@181
  unsigned int v86; // ecx@181
  char *v87; // edx@181
  code v88; // edx@182
  unsigned int v89; // ecx@182
  int v90; // edx@184
  int v91; // edx@184
  signed int v92; // edx@184
  int v93; // ecx@184
  int v94; // edx@189
  unsigned int v95; // ecx@198
  int v96; // edx@201
  int v97; // edx@201
  int v98; // ecx@202
  code v99; // edx@204
  unsigned int v100; // ecx@204
  int v101; // edx@206
  int v102; // edx@206
  signed int v103; // edx@206
  int v104; // ecx@206
  int v105; // edx@210
  unsigned int v106; // ecx@215
  int v107; // edx@218
  int v108; // edx@218
  int v109; // ecx@219
  unsigned int v110; // ecx@224
  code v111; // ecx@225
  unsigned int v112; // edx@225
  unsigned int v113; // ecx@226
  int v114; // edx@226
  int v115; // edx@226
  int v116; // edx@230
  int v117; // edx@234
  int v118; // ecx@234
  int v119; // edx@244
  int v120; // edx@244
  unsigned int v121; // ecx@245
  const char *v122; // eax@247
  int v123; // ecx@250
  int v124; // edx@260
  int v125; // edx@260
  unsigned int v126; // eax@266
  unsigned int v127; // ecx@266
  unsigned int v128; // edx@271
  unsigned int v129; // eax@271
  z_stream_s *v130; // esi@277
  unsigned int v131; // eax@277
  unsigned int v132; // ebx@277
  const char *v133; // eax@280
  unsigned int v134; // [sp-14h] [bp-48h]@246
  const char *v135; // [sp-10h] [bp-44h]@246
  unsigned int in; // [sp+4h] [bp-30h]@8
  unsigned int ina; // [sp+4h] [bp-30h]@277
  char *from; // [sp+8h] [bp-2Ch]@228
  char *froma; // [sp+8h] [bp-2Ch]@234
  int ret; // [sp+Ch] [bp-28h]@8
  code last; // [sp+10h] [bp-24h]@151
  code lasta; // [sp+10h] [bp-24h]@187
  code lastb; // [sp+10h] [bp-24h]@208
  code lastc; // [sp+10h] [bp-24h]@228
  unsigned int len; // [sp+14h] [bp-20h]@71
  unsigned int lena; // [sp+14h] [bp-20h]@80
  __int16 lenb; // [sp+14h] [bp-20h]@156
  unsigned int out; // [sp+18h] [bp-1Ch]@8
  char *put; // [sp+1Ch] [bp-18h]@8
  char hbuf[4]; // [sp+20h] [bp-14h]@20
  unsigned int left; // [sp+24h] [bp-10h]@8
  code this; // [sp+28h] [bp-Ch]@60
  char *next; // [sp+2Ch] [bp-8h]@8
  unsigned int have; // [sp+30h] [bp-4h]@8

  v2 = strm;
  if ( !strm )
    return -2;
  v3 = strm->state;
  if ( !v3 || !strm->next_out || !strm->next_in && strm->avail_in )
    return -2;
  if ( v3->dummy == 11 )
    v3->dummy = 12;
  v4 = strm->next_out;
  left = strm->avail_out;
  v5 = strm->avail_in;
  have = v5;
  in = v5;
  v6 = v3[12].dummy;
  out = left;
  v7 = v3->dummy;
  put = v4;
  v8 = strm->next_in;
  v9 = v3[13].dummy;
  next = strm->next_in;
  ret = 0;
  if ( v7 > 0x1C )
    return -2;
  while ( 2 )
  {
    switch ( v7 )
    {
      case 0u:
        if ( v3[2].dummy )
        {
          if ( v9 < 0x10 )
          {
            while ( have )
            {
              v11 = (unsigned __int8)*v8;
              --have;
              v12 = v11 << v9;
              ++v8;
              v9 += 8;
              next = v8;
              v6 += v12;
              if ( v9 >= 0x10 )
                goto LABEL_18;
            }
            goto inf_leave;
          }
LABEL_18:
          v13 = v3[2].dummy;
          if ( v13 & 2 && v6 == 35615 )
          {
            v3[5].dummy = crc32(0, 0, 0);
            *(_WORD *)hbuf = -29921;
            v3[5].dummy = crc32(v3[5].dummy, hbuf, 2u);
            v8 = next;
            v6 = 0;
            v9 = 0;
            v3->dummy = 1;
          }
          else
          {
            v3[4].dummy = 0;
            if ( !(v13 & 1) || ((v6 >> 8) + ((unsigned __int8)v6 << 8)) % 0x1F )
            {
              v8 = next;
              strm->msg = "incorrect header check";
              goto LABEL_263;
            }
            if ( (v6 & 0xF) != 8 )
            {
              strm->msg = "unknown compression method";
              v8 = next;
              goto LABEL_263;
            }
            v6 >>= 4;
            v9 -= 4;
            if ( (v6 & 0xF) + 8 > v3[7].dummy )
            {
              v8 = next;
              strm->msg = "invalid window size";
              goto LABEL_263;
            }
            v14 = adler32(0, 0, 0);
            v3[5].dummy = (int)v14;
            strm->adler = (unsigned int)v14;
            v8 = next;
            v3->dummy = ~BYTE1(v6) & 2 | 9;
            v6 = 0;
            v9 = 0;
          }
        }
        else
        {
          v3->dummy = 12;
        }
        goto LABEL_264;
      case 1u:
        if ( v9 >= 0x10 )
          goto LABEL_32;
        do
        {
          if ( !have )
            goto inf_leave;
          v15 = (unsigned __int8)*v8;
          --have;
          v16 = v15 << v9;
          ++v8;
          v9 += 8;
          next = v8;
          v6 += v16;
        }
        while ( v9 < 0x10 );
LABEL_32:
        v3[4].dummy = v6;
        if ( (_BYTE)v6 != 8 )
        {
          strm->msg = "unknown compression method";
          goto LABEL_263;
        }
        if ( v6 & 0xE000 )
        {
          strm->msg = "unknown header flags set";
          goto LABEL_263;
        }
        if ( v6 & 0x200 )
        {
          hbuf[0] = 8;
          hbuf[1] = BYTE1(v6);
          v3[5].dummy = crc32(v3[5].dummy, hbuf, 2u);
          v8 = next;
        }
        v6 = 0;
        v9 = 0;
        v3->dummy = 2;
        do
        {
LABEL_40:
          if ( !have )
            goto inf_leave;
          v17 = (unsigned __int8)*v8;
          --have;
          v18 = v17 << v9;
          ++v8;
          v9 += 8;
          next = v8;
          v6 += v18;
        }
        while ( v9 < 0x20 );
LABEL_42:
        if ( v3[4].dummy & 0x200 )
        {
          *(_WORD *)hbuf = v6;
          hbuf[2] = v6 >> 16;
          hbuf[3] = BYTE3(v6);
          v3[5].dummy = crc32(v3[5].dummy, hbuf, 4u);
          v8 = next;
        }
        v6 = 0;
        v9 = 0;
        v3->dummy = 3;
        do
        {
LABEL_46:
          if ( !have )
            goto inf_leave;
          v19 = (unsigned __int8)*v8;
          --have;
          v20 = v19 << v9;
          ++v8;
          v9 += 8;
          next = v8;
          v6 += v20;
        }
        while ( v9 < 0x10 );
LABEL_48:
        if ( v3[4].dummy & 0x200 )
        {
          *(_WORD *)hbuf = v6;
          v3[5].dummy = crc32(v3[5].dummy, hbuf, 2u);
          v8 = next;
        }
        v6 = 0;
        v9 = 0;
        v3->dummy = 4;
$LN720_0:
        if ( !(v3[4].dummy & 0x400) )
          goto LABEL_58;
        if ( v9 < 0x10 )
        {
          while ( have )
          {
            v21 = (unsigned __int8)*v8;
            --have;
            v22 = v21 << v9;
            ++v8;
            v9 += 8;
            next = v8;
            v6 += v22;
            if ( v9 >= 0x10 )
              goto LABEL_55;
          }
          goto inf_leave;
        }
LABEL_55:
        v23 = (v3[4].dummy & 0x200) == 0;
        v3[14].dummy = v6;
        if ( !v23 )
        {
          *(_WORD *)hbuf = v6;
          v3[5].dummy = crc32(v3[5].dummy, hbuf, 2u);
          v8 = next;
        }
        v6 = 0;
        v9 = 0;
LABEL_58:
        v3->dummy = 5;
$LN721_0:
        if ( v3[4].dummy & 0x400 )
        {
          v24 = v3[14].dummy;
          this = (code)v24;
          if ( v24 > have )
          {
            v24 = have;
            this = (code)have;
          }
          if ( v24 )
          {
            if ( v3[4].dummy & 0x200 )
            {
              v25 = crc32(v3[5].dummy, next, *(_DWORD *)&this);
              v24 = (unsigned int)this;
              v3[5].dummy = v25;
              v8 = next;
            }
            have -= v24;
            v8 += v24;
            v3[14].dummy -= v24;
            next = v8;
          }
          if ( v3[14].dummy )
            goto inf_leave;
        }
        v3->dummy = 6;
$LN363_2:
        if ( v3[4].dummy & 0x800 )
        {
          if ( !have )
            goto inf_leave;
          v26 = 0;
          do
          {
            v27 = (unsigned __int8)v8[(*(_DWORD *)&v26)++];
            len = v27;
          }
          while ( v27 && *(_DWORD *)&v26 < have );
          v23 = (v3[4].dummy & 0x2000) == 0;
          this = v26;
          if ( !v23 )
          {
            v28 = crc32(v3[5].dummy, next, *(_DWORD *)&v26);
            v26 = this;
            v3[5].dummy = v28;
            v8 = next;
          }
          have -= *(_DWORD *)&v26;
          v8 += *(_DWORD *)&v26;
          next = v8;
          if ( len )
            goto inf_leave;
        }
        v3->dummy = 7;
$LN354_3:
        if ( v3[4].dummy & 0x1000 )
        {
          if ( !have )
            goto inf_leave;
          v29 = 0;
          do
          {
            v30 = (unsigned __int8)v8[(*(_DWORD *)&v29)++];
            lena = v30;
          }
          while ( v30 && *(_DWORD *)&v29 < have );
          v23 = (v3[4].dummy & 0x2000) == 0;
          this = v29;
          if ( !v23 )
          {
            v31 = crc32(v3[5].dummy, next, *(_DWORD *)&v29);
            v29 = this;
            v3[5].dummy = v31;
            v8 = next;
          }
          have -= *(_DWORD *)&v29;
          v8 += *(_DWORD *)&v29;
          next = v8;
          if ( lena )
            goto inf_leave;
        }
        v3->dummy = 8;
$LN345_1:
        if ( v3[4].dummy & 0x200 )
        {
          if ( v9 < 0x10 )
          {
            while ( have )
            {
              v32 = (unsigned __int8)*v8;
              --have;
              v33 = v32 << v9;
              ++v8;
              v9 += 8;
              next = v8;
              v6 += v33;
              if ( v9 >= 0x10 )
                goto LABEL_90;
            }
            goto inf_leave;
          }
LABEL_90:
          if ( v6 != LOWORD(v3[5].dummy) )
          {
            strm->msg = "header crc mismatch";
            goto LABEL_263;
          }
          v6 = 0;
          v9 = 0;
        }
        v34 = crc32(0, 0, 0);
        v3[5].dummy = v34;
        strm->adler = v34;
        v8 = next;
        v3->dummy = 11;
        goto LABEL_264;
      case 2u:
        if ( v9 < 0x20 )
          goto LABEL_40;
        goto LABEL_42;
      case 3u:
        if ( v9 < 0x10 )
          goto LABEL_46;
        goto LABEL_48;
      case 4u:
        goto $LN720_0;
      case 5u:
        goto $LN721_0;
      case 6u:
        goto $LN363_2;
      case 7u:
        goto $LN354_3;
      case 8u:
        goto $LN345_1;
      case 9u:
        if ( v9 >= 0x20 )
          goto LABEL_97;
        do
        {
          if ( !have )
            goto inf_leave;
          v35 = (unsigned __int8)*v8;
          --have;
          v36 = v35 << v9;
          ++v8;
          v9 += 8;
          next = v8;
          v6 += v36;
        }
        while ( v9 < 0x20 );
LABEL_97:
        v2 = strm;
        v37 = (v6 >> 24) + ((v6 >> 8) & 0xFF00) + (((v6 << 16) + (v6 & 0xFF00)) << 8);
        v3[5].dummy = v37;
        strm->adler = v37;
        v6 = 0;
        v9 = 0;
        v3->dummy = 10;
$LN317_2:
        if ( !v3[3].dummy )
        {
          v2->next_in = v8;
          v126 = have;
          v2->next_out = put;
          v127 = left;
          v2->avail_in = v126;
          v2->avail_out = v127;
          v3[13].dummy = v9;
          v3[12].dummy = v6;
          return 2;
        }
        v38 = adler32(0, 0, 0);
        v3[5].dummy = (int)v38;
        strm->adler = (unsigned int)v38;
        v8 = next;
        v3->dummy = 11;
$LN312_2:
        if ( flush == 5 )
          goto inf_leave;
$LN311_2:
        if ( v3[1].dummy )
        {
          v39 = v9 & 7;
          v6 >>= v39;
          v9 -= v39;
          v3->dummy = 24;
        }
        else
        {
          if ( v9 < 3 )
          {
            while ( have )
            {
              v40 = (unsigned __int8)*v8;
              --have;
              v41 = v40 << v9;
              ++v8;
              v9 += 8;
              next = v8;
              v6 += v41;
              if ( v9 >= 3 )
                goto LABEL_106;
            }
            goto inf_leave;
          }
LABEL_106:
          v42 = v6 & 1;
          v43 = v6 >> 1;
          v3[1].dummy = v42;
          switch ( v43 & 3 )
          {
            case 0u:
              v6 = v43 >> 2;
              v3->dummy = 13;
              v9 -= 3;
              break;
            case 1u:
              v6 = v43 >> 2;
              v3[17].dummy = (int)"`\a";
              v3[19].dummy = 9;
              v3[18].dummy = (int)&unk_9CFBE8;
              v3[20].dummy = 5;
              v3->dummy = 18;
              v9 -= 3;
              break;
            case 2u:
              v6 = v43 >> 2;
              v3->dummy = 15;
              v9 -= 3;
              break;
            case 3u:
              strm->msg = "invalid block type";
              v3->dummy = 27;
              goto LABEL_111;
            default:
LABEL_111:
              v6 = v43 >> 2;
              v9 -= 3;
              break;
          }
        }
        goto LABEL_264;
      case 0xAu:
        goto $LN317_2;
      case 0xBu:
        goto $LN312_2;
      case 0xCu:
        goto $LN311_2;
      case 0xDu:
        v44 = v9 & 7;
        v9 -= v44;
        v6 >>= v44;
        if ( v9 >= 0x20 )
          goto LABEL_115;
        do
        {
          if ( !have )
            goto inf_leave;
          v45 = (unsigned __int8)*v8;
          --have;
          v46 = v45 << v9;
          ++v8;
          v9 += 8;
          next = v8;
          v6 += v46;
        }
        while ( v9 < 0x20 );
LABEL_115:
        v47 = (unsigned __int16)v6;
        if ( (unsigned __int16)v6 != ~v6 >> 16 )
        {
          strm->msg = "invalid stored block lengths";
          goto LABEL_263;
        }
        v6 = 0;
        v3[14].dummy = v47;
        v9 = 0;
        v3->dummy = 14;
$LN723_0:
        v48 = v3[14].dummy;
        this = (code)v48;
        if ( !v48 )
          goto LABEL_194;
        if ( v48 > have )
        {
          v48 = have;
          this = (code)have;
        }
        if ( v48 > left )
        {
          v48 = left;
          this = (code)left;
        }
        if ( !v48 )
          goto inf_leave;
        memcpy(put, next, *(_DWORD *)&this);
        have -= *(_DWORD *)&this;
        next += *(_DWORD *)&this;
        left -= *(_DWORD *)&this;
        put += *(_DWORD *)&this;
        v3[14].dummy -= *(_DWORD *)&this;
        v8 = next;
        goto LABEL_264;
      case 0xEu:
        goto $LN723_0;
      case 0xFu:
        if ( v9 >= 0xE )
          goto LABEL_128;
        do
        {
          if ( !have )
            goto inf_leave;
          v49 = (unsigned __int8)*v8;
          --have;
          v50 = v49 << v9;
          ++v8;
          v9 += 8;
          next = v8;
          v6 += v50;
        }
        while ( v9 < 0xE );
LABEL_128:
        v51 = v6 & 0x1F;
        v52 = v6 >> 5;
        v53 = v52;
        v3[22].dummy = v51 + 257;
        v52 >>= 5;
        v54 = (v53 & 0x1F) + 1;
        v55 = (v52 & 0xF) + 4;
        v6 = v52 >> 4;
        v9 -= 14;
        v56 = v3[22].dummy < 0x11Eu;
        v23 = v3[22].dummy == 286;
        v3[23].dummy = v54;
        v3[21].dummy = v55;
        if ( !v56 && !v23 || v54 > 0x1E )
        {
          strm->msg = "too many length or distance symbols";
          goto LABEL_263;
        }
        v3[24].dummy = 0;
        v3->dummy = 16;
$LN502_0:
        if ( (unsigned int)v3[24].dummy < v3[21].dummy )
        {
          while ( v9 >= 3 )
          {
LABEL_135:
            *((_WORD *)&v3[26].dummy + order[v3[24].dummy++]) = v6 & 7;
            v6 >>= 3;
            v9 -= 3;
            if ( (unsigned int)v3[24].dummy >= v3[21].dummy )
              goto LABEL_136;
          }
          while ( have )
          {
            v57 = (unsigned __int8)*v8;
            --have;
            v58 = v57 << v9;
            ++v8;
            v9 += 8;
            next = v8;
            v6 += v58;
            if ( v9 >= 3 )
              goto LABEL_135;
          }
          goto inf_leave;
        }
LABEL_136:
        while ( v3[24].dummy < 0x13u )
          *((_WORD *)&v3[26].dummy + order[v3[24].dummy++]) = 0;
        v3[25].dummy = (int)&v3[330].dummy;
        v3[17].dummy = (int)&v3[330].dummy;
        v3[19].dummy = 7;
        v59 = inflate_table(
                0,
                (unsigned __int16 *)&v3[26],
                0x13u,
                (code **)&v3[25],
                (unsigned int *)&v3[19],
                (unsigned __int16 *)&v3[186]);
        ret = v59;
        v23 = v59 == 0;
        v8 = next;
        if ( !v23 )
        {
          strm->msg = "invalid code lengths set";
          goto LABEL_263;
        }
        v3[24].dummy = 0;
        v3->dummy = 17;
$LN724_0:
        if ( v3[24].dummy < (unsigned int)(v3[22].dummy + v3[23].dummy) )
        {
          while ( 1 )
          {
            v60 = *(code *)(v3[17].dummy + 4 * (v6 & ((1 << v3[19].dummy) - 1)));
            v61 = (unsigned __int8)(*(_WORD *)(v3[17].dummy + 4 * (v6 & ((1 << v3[19].dummy) - 1))) >> 8);
            this = *(code *)(v3[17].dummy + 4 * (v6 & ((1 << v3[19].dummy) - 1)));
            if ( v61 > v9 )
              break;
LABEL_146:
            if ( *(unsigned int *)&v60 >> 16 >= 0x10 )
            {
              v69 = (code)(unsigned __int8)v60.bits;
              last = v69;
              if ( this.val == 16 )
              {
                if ( v9 < *(_DWORD *)&v69 + 2 )
                {
                  while ( have )
                  {
                    v70 = (unsigned __int8)*v8;
                    --have;
                    v71 = v70 << v9;
                    v69 = last;
                    ++v8;
                    v9 += 8;
                    v6 += v71;
                    next = v8;
                    if ( v9 >= *(_DWORD *)&last + 2 )
                      goto LABEL_155;
                  }
                  goto inf_leave;
                }
LABEL_155:
                v6 >>= v69.op;
                v9 -= *(_DWORD *)&v69;
                v72 = v3[24].dummy;
                if ( !v72 )
                {
                  strm->msg = "invalid bit length repeat";
                  goto LABEL_263;
                }
                lenb = *((_WORD *)&v3[25].dummy + v72 + 1);
                v73 = (v6 & 3) + 3;
                v6 >>= 2;
                this = (code)v73;
                v9 -= 2;
              }
              else
              {
                if ( this.val == 17 )
                {
                  if ( v9 < *(_DWORD *)&v69 + 3 )
                  {
                    while ( have )
                    {
                      v74 = (unsigned __int8)*v8;
                      --have;
                      v75 = v74 << v9;
                      v69 = last;
                      ++v8;
                      v9 += 8;
                      v6 += v75;
                      next = v8;
                      if ( v9 >= *(_DWORD *)&last + 3 )
                        goto LABEL_161;
                    }
                    goto inf_leave;
                  }
LABEL_161:
                  v76 = v6 >> v69.op;
                  this = (code)((v76 & 7) + 3);
                  v6 = v76 >> 3;
                  v77 = -3;
                }
                else
                {
                  if ( v9 < *(_DWORD *)&v69 + 7 )
                  {
                    while ( have )
                    {
                      v78 = (unsigned __int8)*v8;
                      --have;
                      v79 = v78 << v9;
                      v69 = last;
                      ++v8;
                      v9 += 8;
                      v6 += v79;
                      next = v8;
                      if ( v9 >= *(_DWORD *)&last + 7 )
                        goto LABEL_165;
                    }
                    goto inf_leave;
                  }
LABEL_165:
                  v80 = v6 >> v69.op;
                  this = (code)((v80 & 0x7F) + 11);
                  v6 = v80 >> 7;
                  v77 = -7;
                }
                v81 = v77 - *(_DWORD *)&v69;
                v73 = (int)this;
                v9 += v81;
                lenb = 0;
              }
              if ( v73 + v3[24].dummy > (unsigned int)(v3[22].dummy + v3[23].dummy) )
              {
                strm->msg = "invalid bit length repeat";
                goto LABEL_263;
              }
              for ( ; this; ++v3[24].dummy )
              {
                v82 = v3[24].dummy;
                --*(_DWORD *)&this;
                *((_WORD *)&v3[26].dummy + v82) = lenb;
              }
            }
            else
            {
              if ( v9 < (unsigned __int8)v60.bits )
              {
                while ( have )
                {
                  v66 = (unsigned __int8)*v8;
                  --have;
                  v67 = v66 << v9;
                  v60.bits = this.bits;
                  ++v8;
                  v9 += 8;
                  v6 += v67;
                  next = v8;
                  if ( v9 >= (unsigned __int8)this.bits )
                    goto LABEL_150;
                }
                goto inf_leave;
              }
LABEL_150:
              v68 = (unsigned __int8)v60.bits;
              v6 >>= v68;
              v9 -= v68;
              *((_WORD *)&v3[26].dummy + v3[24].dummy++) = this.val;
            }
            if ( v3[24].dummy >= (unsigned int)(v3[22].dummy + v3[23].dummy) )
              goto LABEL_171;
          }
          while ( have )
          {
            v62 = (unsigned __int8)*v8;
            --have;
            v63 = v62 << v9;
            ++v8;
            v9 += 8;
            v6 += v63;
            v64 = 1 << v3[19].dummy;
            v65 = v3[17].dummy;
            next = v8;
            v60 = *(code *)(v65 + 4 * (v6 & (v64 - 1)));
            this = v60;
            if ( (unsigned __int8)v60.bits <= v9 )
              goto LABEL_146;
          }
          goto inf_leave;
        }
LABEL_171:
        if ( v3->dummy == 27 )
          goto LABEL_264;
        v3[25].dummy = (int)&v3[330].dummy;
        v3[17].dummy = (int)&v3[330].dummy;
        v83 = v3[22].dummy;
        v3[19].dummy = 9;
        ret = inflate_table(
                LENS,
                (unsigned __int16 *)&v3[26],
                v83,
                (code **)&v3[25],
                (unsigned int *)&v3[19],
                (unsigned __int16 *)&v3[186]);
        if ( ret )
        {
          v8 = next;
          strm->msg = "invalid literal/lengths set";
          goto LABEL_263;
        }
        v3[18].dummy = v3[25].dummy;
        v84 = v3[22].dummy;
        v3[20].dummy = 6;
        ret = inflate_table(
                DISTS,
                (unsigned __int16 *)&v3[26] + v84,
                v3[23].dummy,
                (code **)&v3[25],
                (unsigned int *)&v3[20],
                (unsigned __int16 *)&v3[186]);
        if ( ret )
        {
          strm->msg = "invalid distances set";
          v8 = next;
          goto LABEL_263;
        }
        v8 = next;
        v3->dummy = 18;
$LN725_0:
        if ( have >= 6 && left >= 0x102 )
        {
          v85 = left;
          strm->next_out = put;
          strm->next_in = next;
          strm->avail_out = v85;
          strm->avail_in = have;
          v3[12].dummy = v6;
          v3[13].dummy = v9;
          inflate_fast(strm, out);
          v86 = strm->avail_out;
          v6 = v3[12].dummy;
          v9 = v3[13].dummy;
          put = strm->next_out;
          v87 = strm->next_in;
          have = strm->avail_in;
          left = v86;
          next = v87;
          v8 = v87;
          goto LABEL_264;
        }
        v88 = *(code *)(v3[17].dummy + 4 * (v6 & ((1 << v3[19].dummy) - 1)));
        v89 = (unsigned __int8)(*(_WORD *)(v3[17].dummy + 4 * (v6 & ((1 << v3[19].dummy) - 1))) >> 8);
        this = *(code *)(v3[17].dummy + 4 * (v6 & ((1 << v3[19].dummy) - 1)));
        if ( v89 > v9 )
        {
          while ( have )
          {
            v90 = (unsigned __int8)*v8;
            --have;
            v91 = v90 << v9;
            ++v8;
            v9 += 8;
            v6 += v91;
            v92 = 1 << v3[19].dummy;
            v93 = v3[17].dummy;
            next = v8;
            v88 = *(code *)(v93 + 4 * (v6 & (v92 - 1)));
            this = v88;
            if ( (unsigned __int8)v88.bits <= v9 )
              goto LABEL_185;
          }
          goto inf_leave;
        }
LABEL_185:
        if ( v88.op && !(v88.op & 0xF0) )
        {
          lasta = v88;
          this = *(code *)(v3[17].dummy
                         + 4 * ((*(unsigned int *)&this >> 16) + ((v6 & ((1 << (v88.bits + v88.op)) - 1)) >> v88.bits)));
          if ( (unsigned __int8)v88.bits + (unsigned int)(unsigned __int8)this.bits > v9 )
          {
            while ( have )
            {
              v94 = (unsigned __int8)*v8 << v9;
              --have;
              ++v8;
              v6 += v94;
              v9 += 8;
              next = v8;
              this = *(code *)(v3[17].dummy
                             + 4 * (lasta.val + ((v6 & ((1 << (lasta.bits + lasta.op)) - 1)) >> lasta.bits)));
              if ( (unsigned __int8)lasta.bits + (unsigned int)(unsigned __int8)this.bits <= v9 )
                goto LABEL_190;
            }
            goto inf_leave;
          }
LABEL_190:
          v88 = this;
          v6 >>= lasta.bits;
          v9 -= (unsigned __int8)lasta.bits;
        }
        v6 >>= v88.bits;
        v9 -= (unsigned __int8)v88.bits;
        v3[14].dummy = *(unsigned int *)&v88 >> 16;
        if ( !v88.op )
        {
          v3->dummy = 23;
          goto LABEL_264;
        }
        if ( v88.op & 0x20 )
        {
LABEL_194:
          v3->dummy = 11;
          goto LABEL_264;
        }
        if ( v88.op & 0x40 )
        {
          strm->msg = "invalid literal/length code";
          goto LABEL_263;
        }
        v3[16].dummy = v88.op & 0xF;
        v3->dummy = 19;
$LN680:
        v95 = v3[16].dummy;
        if ( v95 )
        {
          if ( v9 < v95 )
          {
            while ( have )
            {
              v96 = (unsigned __int8)*v8;
              --have;
              v97 = v96 << v9;
              ++v8;
              v9 += 8;
              next = v8;
              v6 += v97;
              if ( v9 >= v3[16].dummy )
                goto LABEL_202;
            }
            goto inf_leave;
          }
LABEL_202:
          v98 = v3[16].dummy;
          v3[14].dummy += v6 & ((1 << v98) - 1);
          v6 >>= v98;
          v9 -= v98;
        }
        v3->dummy = 20;
$LN681_0:
        v99 = *(code *)(v3[18].dummy + 4 * (v6 & ((1 << v3[20].dummy) - 1)));
        v100 = (unsigned __int8)(*(_WORD *)(v3[18].dummy + 4 * (v6 & ((1 << v3[20].dummy) - 1))) >> 8);
        this = *(code *)(v3[18].dummy + 4 * (v6 & ((1 << v3[20].dummy) - 1)));
        if ( v100 > v9 )
        {
          while ( have )
          {
            v101 = (unsigned __int8)*v8;
            --have;
            v102 = v101 << v9;
            ++v8;
            v9 += 8;
            v6 += v102;
            v103 = 1 << v3[20].dummy;
            v104 = v3[18].dummy;
            next = v8;
            v99 = *(code *)(v104 + 4 * (v6 & (v103 - 1)));
            this = v99;
            if ( (unsigned __int8)v99.bits <= v9 )
              goto LABEL_207;
          }
          goto inf_leave;
        }
LABEL_207:
        if ( !(v99.op & 0xF0) )
        {
          lastb = v99;
          this = *(code *)(v3[18].dummy
                         + 4 * ((*(unsigned int *)&this >> 16) + ((v6 & ((1 << (v99.bits + v99.op)) - 1)) >> v99.bits)));
          if ( (unsigned __int8)v99.bits + (unsigned int)(unsigned __int8)this.bits > v9 )
          {
            while ( have )
            {
              v105 = (unsigned __int8)*v8 << v9;
              --have;
              ++v8;
              v6 += v105;
              v9 += 8;
              next = v8;
              this = *(code *)(v3[18].dummy
                             + 4 * (lastb.val + ((v6 & ((1 << (lastb.bits + lastb.op)) - 1)) >> lastb.bits)));
              if ( (unsigned __int8)lastb.bits + (unsigned int)(unsigned __int8)this.bits <= v9 )
                goto LABEL_211;
            }
            goto inf_leave;
          }
LABEL_211:
          v99 = this;
          v6 >>= lastb.bits;
          v9 -= (unsigned __int8)lastb.bits;
        }
        v6 >>= v99.bits;
        v9 -= (unsigned __int8)v99.bits;
        if ( v99.op & 0x40 )
        {
          strm->msg = "invalid distance code";
          goto LABEL_263;
        }
        v3[15].dummy = *(unsigned int *)&v99 >> 16;
        v3[16].dummy = v99.op & 0xF;
        v3->dummy = 21;
$LN682_0:
        v106 = v3[16].dummy;
        if ( v106 )
        {
          if ( v9 < v106 )
          {
            while ( have )
            {
              v107 = (unsigned __int8)*v8;
              --have;
              v108 = v107 << v9;
              ++v8;
              v9 += 8;
              next = v8;
              v6 += v108;
              if ( v9 >= v3[16].dummy )
                goto LABEL_219;
            }
            goto inf_leave;
          }
LABEL_219:
          v109 = v3[16].dummy;
          v3[15].dummy += v6 & ((1 << v109) - 1);
          v6 >>= v109;
          v9 -= v109;
        }
        if ( v3[15].dummy > out + v3[9].dummy - left )
        {
          strm->msg = "invalid distance too far back";
          goto LABEL_263;
        }
        v3->dummy = 22;
$LN683_0:
        if ( !left )
          goto inf_leave;
        v110 = v3[15].dummy;
        if ( v110 <= out - left )
        {
          v116 = (int)&put[-v110];
          v113 = v3[14].dummy;
          from = (char *)v116;
          lastc = (code)v3[14].dummy;
          goto LABEL_231;
        }
        v111 = (code)(v110 - (out - left));
        v112 = v3[10].dummy;
        this = v111;
        if ( *(_DWORD *)&v111 <= v112 )
        {
          v115 = v3[10].dummy + v3[11].dummy - *(_DWORD *)&v111;
          v113 = (unsigned int)this;
        }
        else
        {
          v113 = *(_DWORD *)&v111 - v112;
          v114 = v3[8].dummy + v3[11].dummy;
          this = (code)v113;
          v115 = v114 - v113;
        }
        from = (char *)v115;
        lastc = (code)v3[14].dummy;
        if ( v113 > *(_DWORD *)&lastc )
        {
          v113 = v3[14].dummy;
LABEL_231:
          this = (code)v113;
        }
        if ( v113 > left )
        {
          v113 = left;
          this = (code)left;
        }
        left -= v113;
        v117 = *(_DWORD *)&lastc - v113;
        v118 = from - put;
        v3[14].dummy = v117;
        for ( froma = (char *)(from - put); ; v118 = (int)froma )
        {
          *put = put[v118];
          v23 = (*(_DWORD *)&this)-- == 1;
          ++put;
          if ( v23 )
            break;
        }
        if ( !v3[14].dummy )
          v3->dummy = 18;
        goto LABEL_264;
      case 0x10u:
        goto $LN502_0;
      case 0x11u:
        goto $LN724_0;
      case 0x12u:
        goto $LN725_0;
      case 0x13u:
        goto $LN680;
      case 0x14u:
        goto $LN681_0;
      case 0x15u:
        goto $LN682_0;
      case 0x16u:
        goto $LN683_0;
      case 0x17u:
        if ( !left )
          goto inf_leave;
        *put = v3[14].dummy;
        --left;
        ++put;
        v3->dummy = 18;
        goto LABEL_264;
      case 0x18u:
        if ( !v3[2].dummy )
          goto LABEL_255;
        if ( v9 >= 0x20 )
          goto LABEL_245;
        do
        {
          if ( !have )
            goto inf_leave;
          v119 = (unsigned __int8)*v8;
          --have;
          v120 = v119 << v9;
          ++v8;
          v9 += 8;
          next = v8;
          v6 += v120;
        }
        while ( v9 < 0x20 );
LABEL_245:
        v121 = out - left;
        strm->total_out += out - left;
        v3[6].dummy += v121;
        if ( v121 )
        {
          v135 = &put[-v121];
          v134 = v3[5].dummy;
          if ( v3[4].dummy )
            v122 = (const char *)crc32(v134, v135, v121);
          else
            v122 = adler32(v134, v135, v121);
          v3[5].dummy = (int)v122;
          strm->adler = (unsigned int)v122;
          v8 = next;
        }
        out = left;
        v123 = v6;
        if ( !v3[4].dummy )
          v123 = (v6 >> 24) + ((v6 >> 8) & 0xFF00) + (((v6 << 16) + (v6 & 0xFF00)) << 8);
        if ( v123 != v3[5].dummy )
        {
          strm->msg = "incorrect data check";
LABEL_263:
          v3->dummy = 27;
LABEL_264:
          v7 = v3->dummy;
          if ( v3->dummy > 0x1Cu )
            return -2;
          v2 = strm;
          continue;
        }
        v6 = 0;
        v9 = 0;
LABEL_255:
        v3->dummy = 25;
$LN727_0:
        if ( !v3[2].dummy || !v3[4].dummy )
          goto LABEL_268;
        if ( v9 < 0x20 )
        {
          while ( have )
          {
            v124 = (unsigned __int8)*v8;
            --have;
            v125 = v124 << v9;
            ++v8;
            v9 += 8;
            next = v8;
            v6 += v125;
            if ( v9 >= 0x20 )
              goto LABEL_261;
          }
          goto inf_leave;
        }
LABEL_261:
        if ( v6 != v3[6].dummy )
        {
          strm->msg = "incorrect length check";
          goto LABEL_263;
        }
        v6 = 0;
        v9 = 0;
LABEL_268:
        v3->dummy = 26;
$LN729_0:
        ret = 1;
inf_leave:
        strm->next_out = put;
        v128 = left;
        strm->next_in = v8;
        v129 = have;
        strm->avail_out = v128;
        strm->avail_in = v129;
        v23 = v3[8].dummy == 0;
        v3[12].dummy = v6;
        v3[13].dummy = v9;
        if ( v23 && (v3->dummy >= 24 || out == strm->avail_out) || !updatewindow(strm, out) )
        {
          v130 = strm;
          v131 = in - strm->avail_in;
          v132 = out - strm->avail_out;
          v130->total_in += v131;
          v130->total_out += v132;
          v3[6].dummy += v132;
          ina = v131;
          if ( v3[2].dummy && v132 )
          {
            if ( v3[4].dummy )
              v133 = (const char *)crc32(v3[5].dummy, &strm->next_out[-v132], v132);
            else
              v133 = adler32(v3[5].dummy, &strm->next_out[-v132], v132);
            v3[5].dummy = (int)v133;
            strm->adler = (unsigned int)v133;
            v131 = ina;
          }
          strm->data_type = v3[13].dummy + (v3->dummy != 11 ? 0 : 0x80) + (v3[1].dummy != 0 ? 0x40 : 0);
          if ( (v131 || v132) && flush != 4 )
          {
            result = ret;
          }
          else
          {
            result = ret;
            if ( !ret )
              result = -5;
          }
        }
        else
        {
          v3->dummy = 28;
LABEL_276:
          result = -4;
        }
        return result;
      case 0x19u:
        goto $LN727_0;
      case 0x1Au:
        goto $LN729_0;
      case 0x1Bu:
        ret = -3;
        goto inf_leave;
      case 0x1Cu:
        goto LABEL_276;
      default:
        return -2;
    }
  }
}

//----- (0073C4C0) --------------------------------------------------------
int __cdecl inflateEnd(z_stream_s *strm)
{
  internal_state *v1; // eax@2
  void (__cdecl *v2)(void *, void *); // ecx@3
  void *v3; // eax@4
  int result; // eax@6

  if ( strm && (v1 = strm->state) != 0 && (v2 = strm->zfree) != 0 )
  {
    v3 = (void *)v1[11].dummy;
    if ( v3 )
      v2(strm->opaque, v3);
    strm->zfree(strm->opaque, strm->state);
    strm->state = 0;
    result = 0;
  }
  else
  {
    result = -2;
  }
  return result;
}

//----- (0073C510) --------------------------------------------------------
const char *__cdecl adler32(unsigned int adler, const char *buf, unsigned int len)
{
  const char *v3; // esi@1
  unsigned int v4; // ecx@1
  unsigned int v5; // edi@1
  const char *result; // eax@2
  unsigned int i; // ebx@3
  unsigned int v8; // eax@4
  unsigned int v9; // edx@7
  int v10; // ecx@8
  int v11; // edi@8
  int v12; // ecx@8
  int v13; // edi@8
  int v14; // ecx@8
  int v15; // edi@8
  int v16; // ecx@8
  int v17; // edi@8
  int v18; // ecx@8
  int v19; // edi@8
  int v20; // ecx@8
  int v21; // edi@8
  int v22; // ecx@8
  int v23; // edi@8
  int v24; // ecx@8
  int v25; // edi@8
  int v26; // ecx@8
  int v27; // edi@8
  int v28; // ecx@8
  int v29; // edi@8
  int v30; // ecx@8
  int v31; // edi@8
  int v32; // ecx@8
  int v33; // edi@8
  int v34; // ecx@8
  int v35; // edi@8
  int v36; // ecx@8
  int v37; // edi@8
  int v38; // ecx@8
  int v39; // edi@8

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

//----- (0073C650) --------------------------------------------------------
void __fastcall init_block(int a1, internal_state *s)
{
  internal_state *v2; // eax@1
  signed int v3; // ecx@1
  internal_state *v4; // eax@3
  signed int v5; // ecx@3
  internal_state *v6; // eax@5
  signed int v7; // ecx@5

  v2 = s + 35;
  v3 = 286;
  do
  {
    LOWORD(v2->dummy) = 0;
    ++v2;
    --v3;
  }
  while ( v3 );
  v4 = s + 608;
  v5 = 30;
  do
  {
    LOWORD(v4->dummy) = 0;
    ++v4;
    --v5;
  }
  while ( v5 );
  v6 = s + 669;
  v7 = 19;
  do
  {
    LOWORD(v6->dummy) = 0;
    ++v6;
    --v7;
  }
  while ( v7 );
  LOWORD(s[291].dummy) = 1;
  s[1449].dummy = 0;
  s[1448].dummy = 0;
  s[1450].dummy = 0;
  s[1446].dummy = 0;
}

//----- (0073C6D0) --------------------------------------------------------
void __usercall pqdownheap(internal_state *s@<eax>, ct_data_s *tree@<edi>, int k)
{
  int v3; // edx@1
  int v4; // ecx@1
  bool v5; // sf@1
  unsigned __int8 v6; // of@1
  int v7; // esi@3
  unsigned __int16 v8; // dx@3
  unsigned __int16 v9; // bx@3
  int v10; // esi@7
  unsigned __int16 v11; // dx@7
  unsigned __int16 v12; // bx@7
  int v13; // edx@9
  int v14; // edx@10
  int v15; // esi@10
  int v; // [sp+8h] [bp-4h]@1

  v3 = s[1298].dummy;
  v4 = 2 * k;
  v = s[k + 725].dummy;
  v6 = __OFSUB__(2 * k, v3);
  v5 = 2 * k - v3 < 0;
  if ( 2 * k > v3 )
  {
    s[k + 725] = s[k + 725];
  }
  else
  {
    while ( 1 )
    {
      if ( v5 ^ v6 )
      {
        v7 = s[v4 + 726].dummy;
        v8 = tree[v7].fc.freq;
        v9 = tree[s[v4 + 725].dummy].fc.freq;
        if ( v8 < v9 || v8 == v9 && *((_BYTE *)&s[1300].dummy + v7) <= *((_BYTE *)&s[1300].dummy + s[v4 + 725].dummy) )
          ++v4;
      }
      v10 = s[v4 + 725].dummy;
      v11 = tree[v].fc.freq;
      v12 = tree[v10].fc.freq;
      if ( v11 < v12 )
        break;
      if ( v11 == v12 )
      {
        v13 = v;
        if ( *((_BYTE *)&s[1300].dummy + v) <= *((_BYTE *)&s[1300].dummy + v10) )
          goto LABEL_13;
      }
      s[k + 725].dummy = v10;
      v14 = s[1298].dummy;
      v15 = v4;
      v4 *= 2;
      k = v15;
      v6 = __OFSUB__(v4, v14);
      v5 = v4 - v14 < 0;
      if ( v4 > v14 )
      {
        s[v15 + 725].dummy = v;
        return;
      }
    }
    v13 = v;
LABEL_13:
    s[k + 725].dummy = v13;
  }
}

//----- (0073C7B0) --------------------------------------------------------
void __usercall gen_bitlen(internal_state *s@<eax>, tree_desc_s *desc@<ecx>)
{
  int v2; // edx@1
  ct_data_s *v3; // ebx@1
  static_tree_desc_s *v4; // ecx@1
  int v5; // edi@1
  int v6; // esi@1
  int v7; // ecx@1
  int v8; // edx@3
  int v9; // ecx@3
  int v10; // esi@6
  int v11; // edi@8
  char *v12; // edi@13
  int v13; // ecx@14
  char *i; // edx@14
  int v15; // edx@17
  int v16; // edi@19
  internal_state *v17; // esi@20
  int v18; // ecx@21
  int v19; // edi@22
  unsigned __int16 *v20; // esi@22
  ct_data_s *tree; // [sp+Ch] [bp-28h]@1
  ct_data_s *stree; // [sp+10h] [bp-24h]@1
  const int *extra; // [sp+14h] [bp-20h]@1
  const int *extraa; // [sp+14h] [bp-20h]@21
  int base; // [sp+18h] [bp-1Ch]@1
  int max_code; // [sp+1Ch] [bp-18h]@1
  int v27; // [sp+20h] [bp-14h]@2
  char *v28; // [sp+20h] [bp-14h]@18
  int h; // [sp+24h] [bp-10h]@2
  internal_state *n; // [sp+28h] [bp-Ch]@2
  int na; // [sp+28h] [bp-Ch]@19
  int overflow; // [sp+2Ch] [bp-8h]@1
  int max_length; // [sp+30h] [bp-4h]@1

  v2 = desc->max_code;
  v3 = desc->dyn_tree;
  v4 = desc->stat_desc;
  max_code = v2;
  stree = (ct_data_s *)v4->dummy;
  extra = (const int *)v4[1].dummy;
  v5 = v4[4].dummy;
  base = v4[2].dummy;
  s[717].dummy = 0;
  s[718].dummy = 0;
  s[719].dummy = 0;
  s[720].dummy = 0;
  s[721].dummy = 0;
  s[722].dummy = 0;
  s[723].dummy = 0;
  s[724].dummy = 0;
  v3[s[s[1299].dummy + 725].dummy].dl.dad = 0;
  v6 = 0;
  v7 = s[1299].dummy + 1;
  tree = v3;
  max_length = v5;
  overflow = 0;
  if ( v7 < 573 )
  {
    n = &s[v7 + 725];
    v27 = 573 - v7;
    h = 573;
    do
    {
      v8 = n->dummy;
      v9 = v3[v3[n->dummy].dl.dad].dl.dad + 1;
      if ( v9 > v5 )
      {
        ++v6;
        v9 = v5;
        overflow = v6;
      }
      v3[v8].dl.dad = v9;
      if ( v8 <= max_code )
      {
        ++*((_WORD *)&s[717].dummy + v9);
        v10 = 0;
        if ( v8 >= base )
          v10 = extra[v8 - base];
        v11 = v3[v8].fc.freq;
        s[1448].dummy += v11 * (v10 + v9);
        if ( stree )
          s[1449].dummy += v11 * (v10 + stree[v8].dl.dad);
        v5 = max_length;
        v6 = overflow;
      }
      ++n;
      --v27;
    }
    while ( v27 );
    if ( v6 )
    {
      v12 = (char *)&s[717] + 2 * v5;
      do
      {
        v13 = max_length - 1;
        for ( i = (char *)&s[717] + 2 * (max_length - 1); !*(_WORD *)i; --v13 )
          i -= 2;
        *((_WORD *)&s[717].dummy + v13 + 1) += 2;
        --*((_WORD *)&s[717].dummy + v13);
        --*(_WORD *)v12;
        v6 -= 2;
      }
      while ( v6 > 0 );
      v15 = max_length;
      if ( max_length )
      {
        v28 = v12;
        do
        {
          v16 = *(_WORD *)v12;
          na = v16;
          if ( v16 )
          {
            v17 = &s[h + 725];
            do
            {
              v18 = v17[-1].dummy;
              --h;
              --v17;
              extraa = (const int *)v17;
              if ( v18 <= max_code )
              {
                v19 = v3[v18].dl.dad;
                v20 = &v3[v18].dl.dad;
                if ( v19 != v15 )
                {
                  v3 = tree;
                  s[1448].dummy += tree[v18].fc.freq * (v15 - v19);
                  *v20 = v15;
                }
                v16 = --na;
                v17 = (internal_state *)extraa;
              }
            }
            while ( v16 );
          }
          v12 = v28 - 2;
          --v15;
          v28 -= 2;
        }
        while ( v15 );
      }
    }
  }
}

//----- (0073C9B0) --------------------------------------------------------
void __usercall scan_tree(ct_data_s *tree@<ecx>, int max_code@<eax>, internal_state *s)
{
  ct_data_s *v3; // edi@1
  signed int v4; // edx@1
  signed int v5; // ecx@1
  signed int v6; // esi@1
  int v7; // ebx@4
  int v8; // eax@5
  int nextlen; // [sp+Ch] [bp-10h]@1
  int v10; // [sp+10h] [bp-Ch]@4
  int prevlen; // [sp+14h] [bp-8h]@1
  unsigned __int16 *v12; // [sp+18h] [bp-4h]@4

  v3 = tree;
  v4 = 0;
  prevlen = -1;
  nextlen = tree->dl.dad;
  v5 = 7;
  v6 = 4;
  if ( !nextlen )
  {
    v5 = 138;
    v6 = 3;
  }
  v3[max_code + 1].dl.dad = -1;
  if ( max_code >= 0 )
  {
    v12 = &v3[1].dl.dad;
    v10 = max_code + 1;
    v7 = nextlen;
    do
    {
      v8 = v7;
      v7 = *v12;
      if ( ++v4 >= v5 || v8 != v7 )
      {
        if ( v4 >= v6 )
        {
          if ( v8 )
          {
            if ( v8 != prevlen )
              ++LOWORD(s[v8 + 669].dummy);
            ++LOWORD(s[685].dummy);
          }
          else if ( v4 > 10 )
          {
            ++LOWORD(s[687].dummy);
          }
          else
          {
            ++LOWORD(s[686].dummy);
          }
        }
        else
        {
          LOWORD(s[v8 + 669].dummy) += v4;
        }
        v4 = 0;
        prevlen = v8;
        if ( v7 )
        {
          if ( v8 == v7 )
          {
            v5 = 6;
            v6 = 3;
          }
          else
          {
            v5 = 7;
            v6 = 4;
          }
        }
        else
        {
          v5 = 138;
          v6 = 3;
        }
      }
      v12 += 2;
      --v10;
    }
    while ( v10 );
  }
}

//----- (0073CA90) --------------------------------------------------------
void __usercall send_tree(internal_state *s@<eax>, ct_data_s *tree@<edx>, int max_code@<ecx>)
{
  ct_data_s *v3; // esi@1
  int v4; // ebx@1
  int v5; // edx@1
  int v6; // edi@1
  signed int v7; // ecx@1
  int v8; // esi@5
  int v9; // edi@8
  int v10; // ecx@8
  unsigned __int16 v11; // si@9
  __int16 v12; // dx@9
  int v13; // ecx@9
  int v14; // edx@9
  int v15; // ecx@9
  bool v16; // zf@11
  int v17; // ecx@15
  unsigned __int16 v18; // dx@16
  unsigned __int16 v19; // ST14_2@16
  __int16 v20; // dx@16
  int v21; // ecx@16
  __int16 v22; // di@16
  __int16 v23; // di@17
  int v24; // ecx@17
  int v25; // ecx@19
  unsigned __int16 v26; // dx@20
  unsigned __int16 v27; // ST14_2@20
  __int16 v28; // dx@20
  int v29; // ecx@20
  __int16 v30; // di@20
  int v31; // ecx@22
  unsigned __int16 v32; // dx@22
  unsigned __int16 v33; // ST14_2@23
  __int16 v34; // dx@23
  int v35; // ecx@23
  int v36; // edx@23
  int v37; // ecx@24
  int v38; // ecx@26
  unsigned __int16 v39; // dx@27
  unsigned __int16 v40; // ST14_2@27
  __int16 v41; // dx@27
  int v42; // ecx@27
  __int16 v43; // di@27
  __int16 v44; // di@28
  int v45; // ecx@28
  int v46; // ecx@29
  unsigned __int16 v47; // dx@29
  unsigned __int16 v48; // ST14_2@30
  __int16 v49; // dx@30
  int v50; // ecx@30
  int v51; // edx@30
  int v52; // ecx@32
  unsigned __int16 v53; // dx@33
  unsigned __int16 v54; // ST14_2@33
  __int16 v55; // dx@33
  int v56; // ecx@33
  __int16 v57; // di@33
  __int16 v58; // di@34
  int v59; // ecx@34
  int v60; // ecx@35
  unsigned __int16 v61; // dx@35
  unsigned __int16 v62; // ST14_2@36
  __int16 v63; // dx@36
  int v64; // ecx@36
  int v65; // edx@36
  int curlen; // [sp+Ch] [bp-1Ch]@5
  int v67; // [sp+10h] [bp-18h]@4
  int val; // [sp+14h] [bp-14h]@1
  unsigned __int16 *v69; // [sp+18h] [bp-10h]@4
  int nextlen; // [sp+1Ch] [bp-Ch]@1
  int len; // [sp+20h] [bp-8h]@1
  int lena; // [sp+20h] [bp-8h]@15
  int lenb; // [sp+20h] [bp-8h]@19
  int lenc; // [sp+20h] [bp-8h]@26
  int lend; // [sp+20h] [bp-8h]@32
  int count; // [sp+24h] [bp-4h]@5

  v3 = tree;
  v4 = tree->dl.dad;
  v5 = 0;
  v6 = max_code;
  val = -1;
  nextlen = v4;
  v7 = 7;
  len = 4;
  if ( !v4 )
  {
    v7 = 138;
    len = 3;
  }
  if ( v6 >= 0 )
  {
    v69 = &v3[1].dl.dad;
    v67 = v6 + 1;
    do
    {
      v8 = nextlen;
      ++v5;
      curlen = nextlen;
      nextlen = *v69;
      count = v5;
      if ( v5 < v7 && v8 == *v69 )
        goto LABEL_44;
      if ( v5 < len )
      {
        do
        {
          v9 = HIWORD(s[v8 + 669].dummy);
          v10 = s[1453].dummy;
          if ( v10 <= 16 - v9 )
          {
            LOWORD(s[1452].dummy) |= LOWORD(s[v8 + 669].dummy) << v10;
            v15 = v9 + v10;
          }
          else
          {
            v11 = s[v8 + 669].dummy;
            v12 = v11 << v10;
            v13 = s[2].dummy;
            LOWORD(s[1452].dummy) |= v12;
            *(_BYTE *)(v13 + s[5].dummy++) = s[1452].dummy;
            *(_BYTE *)(s[5].dummy + s[2].dummy) = BYTE1(s[1452].dummy);
            v14 = s[1453].dummy;
            ++s[5].dummy;
            v15 = v14 + v9 - 16;
            LOWORD(s[1452].dummy) = v11 >> (16 - v14);
            v8 = curlen;
          }
          v16 = count-- == 1;
          s[1453].dummy = v15;
        }
        while ( !v16 );
        goto LABEL_39;
      }
      if ( v8 )
      {
        if ( v8 != val )
        {
          lena = HIWORD(s[v8 + 669].dummy);
          v17 = s[1453].dummy;
          if ( v17 <= 16 - lena )
          {
            v23 = LOWORD(s[v8 + 669].dummy) << v17;
            v24 = s[1453].dummy;
            LOWORD(s[1452].dummy) |= v23;
            s[1453].dummy = lena + v24;
          }
          else
          {
            v18 = s[v8 + 669].dummy;
            v19 = v18;
            v20 = v18 << v17;
            v21 = s[2].dummy;
            LOWORD(s[1452].dummy) |= v20;
            *(_BYTE *)(v21 + s[5].dummy++) = s[1452].dummy;
            *(_BYTE *)(s[5].dummy + s[2].dummy) = BYTE1(s[1452].dummy);
            v5 = s[1453].dummy;
            ++s[5].dummy;
            v22 = v19 >> (16 - v5);
            s[1453].dummy = v5 + lena - 16;
            LOWORD(v5) = count;
            LOWORD(s[1452].dummy) = v22;
          }
          LOWORD(v5) = v5 - 1;
          LOWORD(count) = v5;
        }
        lenb = HIWORD(s[685].dummy);
        v25 = s[1453].dummy;
        if ( v25 <= 16 - lenb )
        {
          LOWORD(s[1452].dummy) |= LOWORD(s[685].dummy) << v25;
          s[1453].dummy = lenb + v25;
        }
        else
        {
          v26 = s[685].dummy;
          v27 = v26;
          v28 = v26 << v25;
          v29 = s[2].dummy;
          LOWORD(s[1452].dummy) |= v28;
          *(_BYTE *)(v29 + s[5].dummy++) = s[1452].dummy;
          *(_BYTE *)(s[5].dummy + s[2].dummy) = BYTE1(s[1452].dummy);
          v5 = s[1453].dummy;
          ++s[5].dummy;
          v30 = v27 >> (16 - v5);
          s[1453].dummy = v5 + lenb - 16;
          LOWORD(v5) = count;
          LOWORD(s[1452].dummy) = v30;
        }
        v31 = s[1453].dummy;
        v32 = v5 - 3;
        if ( v31 > 14 )
        {
          v33 = v32;
          v34 = v32 << v31;
          v35 = s[2].dummy;
          LOWORD(s[1452].dummy) |= v34;
          *(_BYTE *)(v35 + s[5].dummy++) = s[1452].dummy;
          *(_BYTE *)(s[5].dummy + s[2].dummy) = BYTE1(s[1452].dummy);
          v36 = s[1453].dummy;
          ++s[5].dummy;
          s[1453].dummy = v36 - 14;
          LOWORD(s[1452].dummy) = v33 >> (16 - v36);
          goto LABEL_39;
        }
        LOWORD(s[1452].dummy) |= v32 << v31;
        v37 = v31 + 2;
      }
      else if ( v5 > 10 )
      {
        lend = HIWORD(s[687].dummy);
        v52 = s[1453].dummy;
        if ( v52 <= 16 - lend )
        {
          v58 = LOWORD(s[687].dummy) << v52;
          v59 = s[1453].dummy;
          LOWORD(s[1452].dummy) |= v58;
          s[1453].dummy = lend + v59;
        }
        else
        {
          v53 = s[687].dummy;
          v54 = v53;
          v55 = v53 << v52;
          v56 = s[2].dummy;
          LOWORD(s[1452].dummy) |= v55;
          *(_BYTE *)(v56 + s[5].dummy++) = s[1452].dummy;
          *(_BYTE *)(s[5].dummy + s[2].dummy) = BYTE1(s[1452].dummy);
          v5 = s[1453].dummy;
          ++s[5].dummy;
          v57 = v54 >> (16 - v5);
          s[1453].dummy = v5 + lend - 16;
          LOWORD(v5) = count;
          LOWORD(s[1452].dummy) = v57;
        }
        v60 = s[1453].dummy;
        v61 = v5 - 11;
        if ( v60 > 9 )
        {
          v62 = v61;
          v63 = v61 << v60;
          v64 = s[2].dummy;
          LOWORD(s[1452].dummy) |= v63;
          *(_BYTE *)(v64 + s[5].dummy++) = s[1452].dummy;
          *(_BYTE *)(s[5].dummy + s[2].dummy) = BYTE1(s[1452].dummy);
          v65 = s[1453].dummy;
          ++s[5].dummy;
          s[1453].dummy = v65 - 9;
          LOWORD(s[1452].dummy) = v62 >> (16 - v65);
          goto LABEL_39;
        }
        LOWORD(s[1452].dummy) |= v61 << v60;
        v37 = v60 + 7;
      }
      else
      {
        lenc = HIWORD(s[686].dummy);
        v38 = s[1453].dummy;
        if ( v38 <= 16 - lenc )
        {
          v44 = LOWORD(s[686].dummy) << v38;
          v45 = s[1453].dummy;
          LOWORD(s[1452].dummy) |= v44;
          s[1453].dummy = lenc + v45;
        }
        else
        {
          v39 = s[686].dummy;
          v40 = v39;
          v41 = v39 << v38;
          v42 = s[2].dummy;
          LOWORD(s[1452].dummy) |= v41;
          *(_BYTE *)(v42 + s[5].dummy++) = s[1452].dummy;
          *(_BYTE *)(s[5].dummy + s[2].dummy) = BYTE1(s[1452].dummy);
          v5 = s[1453].dummy;
          ++s[5].dummy;
          v43 = v40 >> (16 - v5);
          s[1453].dummy = v5 + lenc - 16;
          LOWORD(v5) = count;
          LOWORD(s[1452].dummy) = v43;
        }
        v46 = s[1453].dummy;
        v47 = v5 - 3;
        if ( v46 > 13 )
        {
          v48 = v47;
          v49 = v47 << v46;
          v50 = s[2].dummy;
          LOWORD(s[1452].dummy) |= v49;
          *(_BYTE *)(v50 + s[5].dummy++) = s[1452].dummy;
          *(_BYTE *)(s[5].dummy + s[2].dummy) = BYTE1(s[1452].dummy);
          v51 = s[1453].dummy;
          ++s[5].dummy;
          s[1453].dummy = v51 - 13;
          LOWORD(s[1452].dummy) = v48 >> (16 - v51);
          goto LABEL_39;
        }
        LOWORD(s[1452].dummy) |= v47 << v46;
        v37 = v46 + 3;
      }
      s[1453].dummy = v37;
LABEL_39:
      v5 = 0;
      val = v8;
      if ( nextlen )
      {
        if ( v8 == nextlen )
        {
          v7 = 6;
          len = 3;
        }
        else
        {
          v7 = 7;
          len = 4;
        }
      }
      else
      {
        v7 = 138;
        len = 3;
      }
LABEL_44:
      v69 += 2;
      --v67;
    }
    while ( v67 );
  }
}

//----- (0073D010) --------------------------------------------------------
void __usercall send_all_trees(internal_state *s@<esi>, int lcodes, int dcodes, int blcodes)
{
  int v4; // ecx@1
  __int16 v5; // ax@1
  __int16 v6; // dx@2
  int v7; // ecx@2
  int v8; // edx@2
  int v9; // ecx@4
  __int16 v10; // ax@4
  __int16 v11; // dx@5
  int v12; // ecx@5
  int v13; // edx@5
  int v14; // ecx@7
  __int16 v15; // ax@7
  __int16 v16; // dx@8
  int v17; // ecx@8
  int v18; // edx@8
  int i; // edi@10
  int v20; // ecx@11
  unsigned __int16 v21; // ax@12
  __int16 v22; // dx@12
  int v23; // ecx@12
  int v24; // edx@12

  v4 = s[1453].dummy;
  v5 = lcodes - 257;
  if ( v4 <= 11 )
  {
    LOWORD(s[1452].dummy) |= v5 << v4;
    s[1453].dummy = v4 + 5;
  }
  else
  {
    v6 = v5 << v4;
    v7 = s[5].dummy;
    LOWORD(s[1452].dummy) |= v6;
    *(_BYTE *)(v7 + s[2].dummy) = s[1452].dummy;
    *(_BYTE *)(++s[5].dummy + s[2].dummy) = BYTE1(s[1452].dummy);
    v8 = s[1453].dummy;
    ++s[5].dummy;
    s[1453].dummy = v8 - 11;
    LOWORD(s[1452].dummy) = (unsigned __int16)(lcodes - 257) >> (16 - v8);
  }
  v9 = s[1453].dummy;
  v10 = dcodes - 1;
  if ( v9 <= 11 )
  {
    LOWORD(s[1452].dummy) |= v10 << v9;
    s[1453].dummy = v9 + 5;
  }
  else
  {
    v11 = v10 << v9;
    v12 = s[5].dummy;
    LOWORD(s[1452].dummy) |= v11;
    *(_BYTE *)(v12 + s[2].dummy) = s[1452].dummy;
    *(_BYTE *)(++s[5].dummy + s[2].dummy) = BYTE1(s[1452].dummy);
    v13 = s[1453].dummy;
    ++s[5].dummy;
    s[1453].dummy = v13 - 11;
    LOWORD(s[1452].dummy) = (unsigned __int16)(dcodes - 1) >> (16 - v13);
  }
  v14 = s[1453].dummy;
  v15 = blcodes - 4;
  if ( v14 <= 12 )
  {
    LOWORD(s[1452].dummy) |= v15 << v14;
    s[1453].dummy = v14 + 4;
  }
  else
  {
    v16 = v15 << v14;
    v17 = s[5].dummy;
    LOWORD(s[1452].dummy) |= v16;
    *(_BYTE *)(v17 + s[2].dummy) = s[1452].dummy;
    *(_BYTE *)(++s[5].dummy + s[2].dummy) = BYTE1(s[1452].dummy);
    v18 = s[1453].dummy;
    ++s[5].dummy;
    s[1453].dummy = v18 - 12;
    LOWORD(s[1452].dummy) = (unsigned __int16)(blcodes - 4) >> (16 - v18);
  }
  for ( i = 0; i < blcodes; ++i )
  {
    v20 = s[1453].dummy;
    if ( v20 <= 13 )
    {
      LOWORD(s[1452].dummy) |= HIWORD(s[(unsigned __int8)bl_order[i] + 669].dummy) << v20;
      s[1453].dummy = v20 + 3;
    }
    else
    {
      v21 = HIWORD(s[(unsigned __int8)bl_order[i] + 669].dummy);
      v22 = HIWORD(s[(unsigned __int8)bl_order[i] + 669].dummy) << v20;
      v23 = s[5].dummy;
      LOWORD(s[1452].dummy) |= v22;
      *(_BYTE *)(v23 + s[2].dummy) = s[1452].dummy;
      *(_BYTE *)(++s[5].dummy + s[2].dummy) = BYTE1(s[1452].dummy);
      v24 = s[1453].dummy;
      ++s[5].dummy;
      LOWORD(s[1452].dummy) = v21 >> (16 - v24);
      s[1453].dummy = v24 - 13;
    }
  }
  send_tree(s, (ct_data_s *)&s[35], lcodes - 1);
  send_tree(s, (ct_data_s *)&s[608], dcodes - 1);
}

//----- (0073D260) --------------------------------------------------------
void __usercall compress_block(internal_state *s@<eax>, ct_data_s *ltree, ct_data_s *dtree)
{
  ct_data_s *v3; // ebx@1
  unsigned int v4; // edx@1
  unsigned int v5; // ecx@4
  int v6; // esi@4
  bool v7; // zf@4
  int v8; // ecx@4
  int v9; // edx@5
  unsigned __int16 v10; // si@6
  __int16 v11; // dx@6
  int v12; // ecx@6
  int v13; // edx@6
  int v14; // ecx@7
  int v15; // edi@8
  unsigned __int16 v16; // dx@9
  unsigned __int16 v17; // ST0C_2@9
  __int16 v18; // dx@9
  int v19; // ecx@9
  int v20; // edx@9
  int v21; // ebx@11
  int v22; // esi@12
  int v23; // ecx@12
  __int16 v24; // di@13
  int v25; // ecx@13
  int v26; // ebx@13
  int v27; // ecx@13
  unsigned int v28; // edx@16
  int v29; // esi@17
  int v30; // edi@19
  int v31; // ecx@19
  unsigned __int16 v32; // di@20
  __int16 v33; // dx@20
  int v34; // ecx@20
  int v35; // edx@20
  __int16 v36; // di@20
  int v37; // edi@22
  int v38; // edx@23
  int v39; // ecx@23
  __int16 v40; // si@24
  int v41; // ecx@24
  int v42; // ebx@24
  int v43; // edx@24
  int v44; // edx@28
  int v45; // ecx@28
  unsigned __int16 v46; // si@29
  __int16 v47; // dx@29
  int v48; // ecx@29
  int v49; // edx@29
  int val; // [sp+Ch] [bp-10h]@11
  int vala; // [sp+Ch] [bp-10h]@19
  unsigned int lx; // [sp+10h] [bp-Ch]@4
  int len; // [sp+14h] [bp-8h]@5
  int lena; // [sp+14h] [bp-8h]@8
  unsigned int dist; // [sp+18h] [bp-4h]@4
  unsigned int dista; // [sp+18h] [bp-4h]@16
  ct_data_s *ltreea; // [sp+24h] [bp+8h]@28

  v3 = ltree;
  v4 = 0;
  if ( s[1446].dummy )
  {
    while ( 1 )
    {
      v5 = *(_WORD *)(s[1447].dummy + 2 * v4);
      v6 = *(_BYTE *)(v4 + s[1444].dummy);
      dist = v5;
      v7 = v5 == 0;
      v8 = s[1453].dummy;
      lx = v4 + 1;
      if ( v7 )
        break;
      v15 = (unsigned __int8)_length_code[v6];
      lena = v3[v15 + 257].dl.dad;
      if ( v8 <= 16 - lena )
      {
        LOWORD(s[1452].dummy) |= ltree[v15 + 257].fc.freq << v8;
        s[1453].dummy = lena + v8;
      }
      else
      {
        v16 = ltree[v15 + 257].fc.freq;
        v17 = v16;
        v18 = v16 << v8;
        v19 = s[2].dummy;
        LOWORD(s[1452].dummy) |= v18;
        *(_BYTE *)(v19 + s[5].dummy++) = s[1452].dummy;
        *(_BYTE *)(s[5].dummy + s[2].dummy) = BYTE1(s[1452].dummy);
        v20 = s[1453].dummy;
        ++s[5].dummy;
        s[1453].dummy = v20 + lena - 16;
        LOWORD(s[1452].dummy) = v17 >> (16 - v20);
      }
      v21 = extra_lbits[v15];
      val = v21;
      if ( v21 )
      {
        v22 = v6 - base_length[v15];
        v23 = s[1453].dummy;
        if ( v23 <= 16 - v21 )
        {
          LOWORD(s[1452].dummy) |= (_WORD)v22 << v23;
          v27 = v21 + v23;
        }
        else
        {
          v24 = (_WORD)v22 << v23;
          v25 = s[2].dummy;
          LOWORD(s[1452].dummy) |= v24;
          *(_BYTE *)(v25 + s[5].dummy++) = s[1452].dummy;
          *(_BYTE *)(s[5].dummy + s[2].dummy) = BYTE1(s[1452].dummy);
          v26 = s[1453].dummy;
          ++s[5].dummy;
          v27 = v26 + val - 16;
          LOWORD(s[1452].dummy) = (unsigned __int16)v22 >> (16 - v26);
        }
        s[1453].dummy = v27;
      }
      v28 = dist - 1;
      dista = v28;
      if ( v28 >= 0x100 )
        v29 = (unsigned __int8)byte_9D05A0[v28 >> 7];
      else
        v29 = (unsigned __int8)_dist_code[v28];
      v30 = dtree[v29].dl.dad;
      v31 = s[1453].dummy;
      vala = dtree[v29].dl.dad;
      if ( v31 <= 16 - v30 )
      {
        LOWORD(s[1452].dummy) |= dtree[v29].fc.freq << v31;
        s[1453].dummy = v30 + v31;
      }
      else
      {
        v32 = dtree[v29].fc.freq;
        v33 = dtree[v29].fc.freq << v31;
        v34 = s[2].dummy;
        LOWORD(s[1452].dummy) |= v33;
        *(_BYTE *)(v34 + s[5].dummy++) = s[1452].dummy;
        *(_BYTE *)(s[5].dummy + s[2].dummy) = BYTE1(s[1452].dummy);
        v35 = s[1453].dummy;
        ++s[5].dummy;
        v36 = v32 >> (16 - v35);
        s[1453].dummy = v35 + vala - 16;
        v28 = dista;
        LOWORD(s[1452].dummy) = v36;
      }
      v37 = extra_dbits[v29];
      v3 = ltree;
      if ( v37 )
      {
        v38 = v28 - base_dist[v29];
        v39 = s[1453].dummy;
        if ( v39 > 16 - v37 )
        {
          v40 = (_WORD)v38 << v39;
          v41 = s[2].dummy;
          LOWORD(s[1452].dummy) |= v40;
          *(_BYTE *)(v41 + s[5].dummy++) = s[1452].dummy;
          *(_BYTE *)(s[5].dummy + s[2].dummy) = BYTE1(s[1452].dummy);
          v42 = s[1453].dummy;
          ++s[5].dummy;
          LOWORD(s[1452].dummy) = (unsigned __int16)v38 >> (16 - v42);
          v43 = v42 + v37 - 16;
          v3 = ltree;
          s[1453].dummy = v43;
          goto LABEL_27;
        }
        LOWORD(s[1452].dummy) |= (_WORD)v38 << v39;
        v14 = v37 + v39;
        goto LABEL_26;
      }
LABEL_27:
      if ( lx >= s[1446].dummy )
        goto LABEL_28;
      v4 = lx;
    }
    v9 = v3[v6].dl.dad;
    len = v3[v6].dl.dad;
    if ( v8 > 16 - v9 )
    {
      v10 = v3[v6].fc.freq;
      v11 = v10 << v8;
      v12 = s[2].dummy;
      LOWORD(s[1452].dummy) |= v11;
      *(_BYTE *)(v12 + s[5].dummy++) = s[1452].dummy;
      *(_BYTE *)(s[5].dummy + s[2].dummy) = BYTE1(s[1452].dummy);
      v13 = s[1453].dummy;
      ++s[5].dummy;
      s[1453].dummy = v13 + len - 16;
      LOWORD(s[1452].dummy) = v10 >> (16 - v13);
      goto LABEL_27;
    }
    LOWORD(s[1452].dummy) |= v3[v6].fc.freq << v8;
    v14 = v9 + v8;
LABEL_26:
    s[1453].dummy = v14;
    goto LABEL_27;
  }
LABEL_28:
  v44 = v3[256].dl.dad;
  v45 = s[1453].dummy;
  ltreea = (ct_data_s *)v3[256].dl.dad;
  if ( v45 <= 16 - v44 )
  {
    LOWORD(s[1452].dummy) |= v3[256].fc.freq << v45;
    s[1453].dummy = v44 + v45;
    s[1451].dummy = v3[256].dl.dad;
  }
  else
  {
    v46 = v3[256].fc.freq;
    v47 = v3[256].fc.freq << v45;
    v48 = s[2].dummy;
    LOWORD(s[1452].dummy) |= v47;
    *(_BYTE *)(v48 + s[5].dummy++) = s[1452].dummy;
    *(_BYTE *)(s[5].dummy + s[2].dummy) = BYTE1(s[1452].dummy);
    v49 = s[1453].dummy;
    ++s[5].dummy;
    s[1453].dummy = (int)&ltreea[-4] + v49;
    LOWORD(s[1452].dummy) = v46 >> (16 - v49);
    s[1451].dummy = v3[256].dl.dad;
  }
}

//----- (0073D670) --------------------------------------------------------
void __usercall set_data_type(internal_state *s@<eax>)
{
  int v1; // edi@1
  int v2; // ebx@1
  internal_state *v3; // edx@1
  internal_state *v4; // edx@3
  signed int v5; // [sp+Ch] [bp-Ch]@3
  signed int v6; // [sp+10h] [bp-8h]@1
  int v7; // [sp+10h] [bp-8h]@3
  int v8; // [sp+14h] [bp-4h]@3

  v1 = 0;
  v2 = 0;
  v3 = s + 43;
  v6 = 60;
  do
  {
    v1 += LOWORD(v3[-1].dummy);
    v2 += LOWORD(v3->dummy);
    v3 += 2;
    --v6;
  }
  while ( v6 );
  v8 = 0;
  v7 = 0;
  v4 = s + 164;
  v5 = 64;
  do
  {
    v8 += LOWORD(v4[-1].dummy);
    v7 += LOWORD(v4->dummy);
    v4 += 2;
    --v5;
  }
  while ( v5 );
  *(_DWORD *)(s->dummy + 44) = (v1 + v2 + (unsigned int)LOWORD(s[162].dummy)) >> 2 >= v8
                                                                                    + v7
                                                                                    + LOWORD(s[35].dummy)
                                                                                    + LOWORD(s[36].dummy)
                                                                                    + LOWORD(s[37].dummy)
                                                                                    + LOWORD(s[38].dummy)
                                                                                    + LOWORD(s[39].dummy)
                                                                                    + LOWORD(s[40].dummy)
                                                                                    + (unsigned int)LOWORD(s[41].dummy);
}

//----- (0073D740) --------------------------------------------------------
void __usercall bi_flush(internal_state *s@<eax>)
{
  int v1; // ecx@1
  __int16 v2; // dx@4

  v1 = s[1453].dummy;
  if ( v1 == 16 )
  {
    *(_BYTE *)(s[2].dummy + s[5].dummy++) = s[1452].dummy;
    *(_BYTE *)(s[5].dummy++ + s[2].dummy) = BYTE1(s[1452].dummy);
    LOWORD(s[1452].dummy) = 0;
    s[1453].dummy = 0;
  }
  else if ( v1 >= 8 )
  {
    *(_BYTE *)(s[2].dummy + s[5].dummy) = s[1452].dummy;
    v2 = BYTE1(s[1452].dummy);
    ++s[5].dummy;
    s[1453].dummy -= 8;
    LOWORD(s[1452].dummy) = v2;
  }
}

//----- (0073D7C0) --------------------------------------------------------
void __usercall bi_windup(internal_state *s@<eax>)
{
  int v1; // ecx@1
  int v2; // ecx@2
  int v3; // edx@2
  char v4; // bl@2

  v1 = s[1453].dummy;
  if ( v1 > 8 )
  {
    *(_BYTE *)(s[2].dummy + s[5].dummy++) = s[1452].dummy;
    v2 = s[5].dummy;
    v3 = s[2].dummy;
    v4 = BYTE1(s[1452].dummy);
LABEL_5:
    *(_BYTE *)(v2 + v3) = v4;
    ++s[5].dummy;
    goto LABEL_6;
  }
  if ( v1 > 0 )
  {
    v2 = s[2].dummy;
    v3 = s[5].dummy;
    v4 = s[1452].dummy;
    goto LABEL_5;
  }
LABEL_6:
  LOWORD(s[1452].dummy) = 0;
  s[1453].dummy = 0;
}

//----- (0073D820) --------------------------------------------------------
void __usercall copy_block(internal_state *s@<eax>, unsigned int len@<ecx>, char *buf, int header)
{
  int v4; // edx@1
  char v5; // bl@9

  v4 = s[1453].dummy;
  if ( v4 <= 8 )
  {
    if ( v4 <= 0 )
      goto LABEL_6;
    *(_BYTE *)(s[2].dummy + s[5].dummy) = s[1452].dummy;
  }
  else
  {
    *(_BYTE *)(s[5].dummy++ + s[2].dummy) = s[1452].dummy;
    *(_BYTE *)(s[5].dummy + s[2].dummy) = BYTE1(s[1452].dummy);
  }
  ++s[5].dummy;
LABEL_6:
  LOWORD(s[1452].dummy) = 0;
  s[1453].dummy = 0;
  s[1451].dummy = 8;
  if ( header )
  {
    *(_BYTE *)(s[5].dummy++ + s[2].dummy) = len;
    *(_BYTE *)(s[5].dummy++ + s[2].dummy) = BYTE1(len);
    *(_BYTE *)(s[5].dummy++ + s[2].dummy) = ~(_BYTE)len;
    *(_BYTE *)(s[5].dummy++ + s[2].dummy) = (unsigned __int16)~(_WORD)len >> 8;
  }
  for ( ; len; --len )
  {
    v5 = *buf++;
    *(_BYTE *)(s[5].dummy++ + s[2].dummy) = v5;
  }
}

//----- (0073D8F0) --------------------------------------------------------
void __cdecl _tr_init(internal_state *s)
{
  s[708].dummy = (int)&s[35].dummy;
  s[711].dummy = (int)&s[608].dummy;
  s[710].dummy = (int)&static_l_desc;
  s[713].dummy = (int)&static_d_desc;
  s[714].dummy = (int)&s[669].dummy;
  s[716].dummy = (int)&static_bl_desc;
  LOWORD(s[1452].dummy) = 0;
  s[1453].dummy = 0;
  s[1451].dummy = 8;
  init_block(0, s);
}

//----- (0073D960) --------------------------------------------------------
void __usercall gen_codes(ct_data_s *tree@<edi>, unsigned __int16 *bl_count@<edx>, int max_code)
{
  unsigned __int16 v3; // cx@1
  signed int v4; // eax@1
  signed int v5; // edx@1
  int i; // esi@3
  int v7; // edx@4
  unsigned int v8; // eax@5
  unsigned int v9; // ecx@5
  unsigned int v10; // eax@5
  int v11; // ebx@6
  unsigned __int16 next_code[16]; // [sp+4h] [bp-24h]@1

  v3 = 0;
  v4 = 1;
  v5 = (char *)bl_count - (char *)&next_code[1];
  do
  {
    v3 = 2 * (v3 + *(unsigned __int16 *)((char *)&next_code[v4] + v5));
    next_code[v4++] = v3;
  }
  while ( v4 <= 15 );
  for ( i = 0; i <= max_code; ++i )
  {
    v7 = tree[i].dl.dad;
    if ( tree[i].dl.dad )
    {
      v8 = next_code[v7];
      v9 = v8;
      next_code[v7] = v8 + 1;
      v10 = 0;
      do
      {
        v11 = v9 & 1;
        --v7;
        v9 >>= 1;
        v10 = 2 * (v11 | v10);
      }
      while ( v7 > 0 );
      tree[i].fc.freq = v10 >> 1;
    }
  }
}

//----- (0073D9F0) --------------------------------------------------------
void __usercall build_tree(internal_state *s@<esi>, tree_desc_s *desc)
{
  ct_data_s *v2; // edi@1
  static_tree_desc_s *v3; // eax@1
  int v4; // edx@1
  int v5; // ebx@1
  int v6; // ecx@1
  int v7; // eax@1
  int v8; // eax@8
  signed int i; // ebx@14
  int v10; // eax@16
  int v11; // ecx@16
  int v12; // ebx@16
  int v13; // eax@16
  unsigned __int8 v14; // dl@16
  int elems; // [sp+8h] [bp-8h]@1
  signed int max_code; // [sp+Ch] [bp-4h]@1

  v2 = desc->dyn_tree;
  v3 = desc->stat_desc;
  v4 = v3[3].dummy;
  v5 = v3->dummy;
  v6 = -1;
  v7 = 0;
  elems = v4;
  max_code = -1;
  s[1298].dummy = 0;
  for ( s[1299].dummy = 573; v7 < v4; ++v7 )
  {
    if ( v2[v7].fc.freq )
    {
      s[++s[1298].dummy + 725].dummy = v7;
      max_code = v7;
      *((_BYTE *)&s[1300].dummy + v7) = 0;
      v6 = v7;
    }
    else
    {
      v2[v7].dl.dad = 0;
    }
  }
  if ( s[1298].dummy < 2 )
  {
    do
    {
      if ( v6 >= 2 )
        v8 = 0;
      else
        v8 = ++v6;
      s[++s[1298].dummy + 725].dummy = v8;
      v2[v8].fc.freq = 1;
      *((_BYTE *)&s[1300].dummy + v8) = 0;
      --s[1448].dummy;
      if ( v5 )
        s[1449].dummy -= *(_WORD *)(v5 + 4 * v8 + 2);
    }
    while ( s[1298].dummy < 2 );
    max_code = v6;
  }
  desc->max_code = v6;
  for ( i = s[1298].dummy / 2; i >= 1; --i )
    pqdownheap(s, v2, i);
  do
  {
    v10 = s[1298].dummy;
    v11 = s[v10 + 725].dummy;
    v12 = s[726].dummy;
    s[1298].dummy = v10 - 1;
    s[726].dummy = v11;
    pqdownheap(s, v2, 1);
    v13 = s[726].dummy;
    s[--s[1299].dummy + 725].dummy = v12;
    s[--s[1299].dummy + 725].dummy = v13;
    v2[elems].fc.freq = v2[v12].fc.freq + v2[v13].fc.freq;
    v14 = *((_BYTE *)&s[1300].dummy + v12);
    if ( v14 < *((_BYTE *)&s[1300].dummy + v13) )
      v14 = *((_BYTE *)&s[1300].dummy + v13);
    *((_BYTE *)&s[1300].dummy + elems) = v14 + 1;
    v2[v13].dl.dad = elems;
    v2[v12].dl.dad = elems;
    s[726].dummy = elems++;
    pqdownheap(s, v2, 1);
  }
  while ( s[1298].dummy >= 2 );
  s[--s[1299].dummy + 725] = s[726];
  gen_bitlen(s, desc);
  gen_codes(v2, (unsigned __int16 *)&s[717], max_code);
}

//----- (0073DBF0) --------------------------------------------------------
int __usercall build_bl_tree@<eax>(internal_state *s@<eax>)
{
  internal_state *v1; // esi@1
  int result; // eax@1

  v1 = s;
  scan_tree((ct_data_s *)&v1[35], s[709].dummy, v1);
  scan_tree((ct_data_s *)&v1[608], v1[712].dummy, v1);
  build_tree(v1, (tree_desc_s *)&v1[714]);
  result = 18;
  while ( !HIWORD(v1[(unsigned __int8)bl_order[result] + 669].dummy) )
  {
    if ( HIWORD(v1[*(_BYTE *)(result + 10288843) + 669].dummy) )
    {
      v1[1448].dummy += 3 * --result + 17;
      return result;
    }
    if ( HIWORD(v1[*(_BYTE *)(result + 10288842) + 669].dummy) )
    {
      result -= 2;
      v1[1448].dummy += 3 * result + 17;
      return result;
    }
    if ( HIWORD(v1[*(_BYTE *)(result + 10288841) + 669].dummy) )
    {
      result -= 3;
      break;
    }
    result -= 4;
    if ( result < 3 )
    {
      v1[1448].dummy += 3 * result + 17;
      return result;
    }
  }
  v1[1448].dummy += 3 * result + 17;
  return result;
}

//----- (0073DCC0) --------------------------------------------------------
void __cdecl _tr_stored_block(internal_state *s, char *buf, unsigned int stored_len, int eof)
{
  int v4; // ecx@1
  __int16 v5; // dx@2
  int v6; // ecx@2
  char v7; // bl@2
  int v8; // edx@2

  v4 = s[1453].dummy;
  if ( v4 <= 13 )
  {
    s[1453].dummy = v4 + 3;
    LOWORD(s[1452].dummy) |= (_WORD)eof << v4;
    copy_block(s, stored_len, buf, 1);
  }
  else
  {
    v5 = (_WORD)eof << v4;
    v6 = s[2].dummy;
    LOWORD(s[1452].dummy) |= v5;
    *(_BYTE *)(v6 + s[5].dummy) = s[1452].dummy;
    v7 = BYTE1(s[1452].dummy);
    *(_BYTE *)(++s[5].dummy + s[2].dummy) = v7;
    v8 = s[1453].dummy;
    ++s[5].dummy;
    s[1453].dummy = v8 - 13;
    LOWORD(s[1452].dummy) = (unsigned __int16)eof >> (16 - v8);
    copy_block(s, stored_len, buf, 1);
  }
}

//----- (0073DD70) --------------------------------------------------------
void __cdecl _tr_align(internal_state *s)
{
  int v1; // ecx@1
  int v2; // edx@2
  int v3; // ecx@4
  int v4; // edx@5
  int v5; // eax@7
  signed int v6; // ecx@7
  int v7; // edx@9
  signed int v8; // ecx@11
  int v9; // edx@12
  int v10; // eax@12

  v1 = s[1453].dummy;
  LOWORD(s[1452].dummy) |= 2 << v1;
  if ( v1 <= 13 )
  {
    s[1453].dummy = v1 + 3;
  }
  else
  {
    *(_BYTE *)(s[2].dummy + s[5].dummy++) = s[1452].dummy;
    *(_BYTE *)(s[5].dummy + s[2].dummy) = BYTE1(s[1452].dummy);
    v2 = s[1453].dummy;
    ++s[5].dummy;
    s[1453].dummy = v2 - 13;
    LOWORD(s[1452].dummy) = 2u >> (16 - v2);
  }
  v3 = s[1453].dummy;
  LOWORD(s[1452].dummy) = s[1452].dummy;
  if ( v3 <= 9 )
  {
    s[1453].dummy = v3 + 7;
  }
  else
  {
    *(_BYTE *)(s[2].dummy + s[5].dummy++) = s[1452].dummy;
    *(_BYTE *)(s[5].dummy + s[2].dummy) = BYTE1(s[1452].dummy);
    v4 = s[1453].dummy;
    ++s[5].dummy;
    s[1453].dummy = v4 - 9;
    LOWORD(s[1452].dummy) = 0;
  }
  bi_flush(s);
  v6 = *(_DWORD *)(v5 + 5812);
  if ( *(_DWORD *)(v5 + 5804) - v6 + 11 < 9 )
  {
    *(_WORD *)(v5 + 5808) |= 2 << v6;
    if ( v6 <= 13 )
    {
      *(_DWORD *)(v5 + 5812) = v6 + 3;
    }
    else
    {
      *(_BYTE *)(*(_DWORD *)(v5 + 8) + (*(_DWORD *)(v5 + 20))++) = *(_BYTE *)(v5 + 5808);
      *(_BYTE *)(*(_DWORD *)(v5 + 20) + *(_DWORD *)(v5 + 8)) = *(_BYTE *)(v5 + 5809);
      v7 = *(_DWORD *)(v5 + 5812);
      ++*(_DWORD *)(v5 + 20);
      *(_DWORD *)(v5 + 5812) = v7 - 13;
      *(_WORD *)(v5 + 5808) = 2u >> (16 - v7);
    }
    v8 = *(_DWORD *)(v5 + 5812);
    *(_WORD *)(v5 + 5808) = *(_WORD *)(v5 + 5808);
    if ( v8 > 9 )
    {
      *(_BYTE *)(*(_DWORD *)(v5 + 8) + (*(_DWORD *)(v5 + 20))++) = *(_BYTE *)(v5 + 5808);
      *(_BYTE *)(*(_DWORD *)(v5 + 20) + *(_DWORD *)(v5 + 8)) = *(_BYTE *)(v5 + 5809);
      v9 = *(_DWORD *)(v5 + 5812);
      ++*(_DWORD *)(v5 + 20);
      *(_DWORD *)(v5 + 5812) = v9 - 9;
      *(_WORD *)(v5 + 5808) = 0;
      bi_flush((internal_state *)v5);
      *(_DWORD *)(v10 + 5804) = 7;
      return;
    }
    *(_DWORD *)(v5 + 5812) = v8 + 7;
    bi_flush((internal_state *)v5);
  }
  *(_DWORD *)(v5 + 5804) = 7;
}

//----- (0073DF70) --------------------------------------------------------
void __cdecl _tr_flush_block(internal_state *s, char *buf, unsigned int stored_len, int eof)
{
  int v4; // eax@4
  unsigned int v5; // edx@4
  unsigned int v6; // ecx@4
  int v7; // edi@10
  int v8; // ecx@10
  bool v9; // zf@11
  int v10; // ecx@11
  unsigned __int16 v11; // ax@12
  __int16 v12; // dx@13
  int v13; // ecx@13
  int v14; // edx@13
  unsigned __int16 v15; // dx@16
  __int16 v16; // ax@17
  int v17; // ecx@17
  int v18; // eax@17
  int max_blindex; // [sp+Ch] [bp-4h]@1

  max_blindex = 0;
  if ( s[31].dummy <= 0 )
  {
    v6 = stored_len + 5;
LABEL_7:
    v5 = v6;
    goto LABEL_8;
  }
  if ( *(_DWORD *)(s->dummy + 44) == 2 )
    set_data_type(s);
  build_tree(s, (tree_desc_s *)&s[708]);
  build_tree(s, (tree_desc_s *)&s[711]);
  v4 = build_bl_tree(s);
  v5 = (unsigned int)(s[1448].dummy + 10) >> 3;
  v6 = (unsigned int)(s[1449].dummy + 10) >> 3;
  max_blindex = v4;
  if ( v6 <= v5 )
    goto LABEL_7;
LABEL_8:
  if ( stored_len + 4 <= v5 && buf )
  {
    v7 = eof;
    _tr_stored_block(s, buf, stored_len, eof);
  }
  else
  {
    v7 = eof;
    v9 = v6 == v5;
    v10 = s[1453].dummy;
    if ( v9 )
    {
      v11 = eof + 2;
      if ( v10 <= 13 )
      {
        LOWORD(s[1452].dummy) |= v11 << v10;
        s[1453].dummy = v10 + 3;
      }
      else
      {
        v12 = v11 << v10;
        v13 = s[5].dummy;
        LOWORD(s[1452].dummy) |= v12;
        *(_BYTE *)(v13 + s[2].dummy) = s[1452].dummy;
        *(_BYTE *)(++s[5].dummy + s[2].dummy) = BYTE1(s[1452].dummy);
        v14 = s[1453].dummy;
        ++s[5].dummy;
        s[1453].dummy = v14 - 13;
        LOWORD(s[1452].dummy) = v11 >> (16 - v14);
      }
      compress_block(s, static_ltree, static_dtree);
    }
    else
    {
      v15 = eof + 4;
      if ( v10 <= 13 )
      {
        LOWORD(s[1452].dummy) |= v15 << v10;
        s[1453].dummy = v10 + 3;
      }
      else
      {
        v16 = v15 << v10;
        v17 = s[5].dummy;
        LOWORD(s[1452].dummy) |= v16;
        *(_BYTE *)(v17 + s[2].dummy) = s[1452].dummy;
        *(_BYTE *)(++s[5].dummy + s[2].dummy) = BYTE1(s[1452].dummy);
        v18 = s[1453].dummy;
        ++s[5].dummy;
        s[1453].dummy = v18 - 13;
        LOWORD(s[1452].dummy) = v15 >> (16 - v18);
      }
      send_all_trees(s, s[709].dummy + 1, s[712].dummy + 1, max_blindex + 1);
      compress_block(s, (ct_data_s *)&s[35], (ct_data_s *)&s[608]);
    }
  }
  init_block(v8, s);
  if ( v7 )
    bi_windup(s);
}

//----- (0073E160) --------------------------------------------------------
int __usercall crc32_little@<eax>(unsigned int crc@<eax>, const char *buf@<ecx>, unsigned int len@<edx>)
{
  unsigned int v3; // esi@1
  unsigned int i; // eax@1
  unsigned int v5; // edi@5
  unsigned int v6; // edx@6
  unsigned int v7; // eax@6
  unsigned int v8; // edx@6
  unsigned int v9; // eax@6
  unsigned int v10; // edx@6
  unsigned int v11; // eax@6
  unsigned int v12; // edx@6
  unsigned int v13; // edx@8
  unsigned int v14; // eax@9

  v3 = len;
  for ( i = ~crc; v3; --v3 )
  {
    if ( !((unsigned __int8)buf & 3) )
      break;
    i = crc_table[0][(unsigned __int8)(i ^ *buf++)] ^ (i >> 8);
  }
  if ( v3 >= 0x20 )
  {
    v5 = v3 >> 5;
    do
    {
      v6 = *((_DWORD *)buf + 1) ^ crc_table[3][(*(_DWORD *)buf ^ i) & 0xFF] ^ crc_table[0][(*(_DWORD *)buf ^ i) >> 24] ^ crc_table[2][(unsigned __int16)(*(_WORD *)buf ^ i) >> 8] ^ crc_table[1][((*(_DWORD *)buf ^ i) >> 16) & 0xFF];
      v7 = *((_DWORD *)buf + 2) ^ crc_table[3][(unsigned __int8)v6] ^ crc_table[0][v6 >> 24] ^ crc_table[2][(unsigned __int16)v6 >> 8] ^ crc_table[1][(v6 >> 16) & 0xFF];
      v8 = *((_DWORD *)buf + 3) ^ crc_table[3][(unsigned __int8)v7] ^ crc_table[0][v7 >> 24] ^ crc_table[2][(unsigned __int16)v7 >> 8] ^ crc_table[1][(v7 >> 16) & 0xFF];
      v9 = *((_DWORD *)buf + 4) ^ crc_table[3][(unsigned __int8)v8] ^ crc_table[0][v8 >> 24] ^ crc_table[2][(unsigned __int16)v8 >> 8] ^ crc_table[1][(v8 >> 16) & 0xFF];
      v10 = *((_DWORD *)buf + 5) ^ crc_table[3][(unsigned __int8)v9] ^ crc_table[0][v9 >> 24] ^ crc_table[2][(unsigned __int16)v9 >> 8] ^ crc_table[1][(v9 >> 16) & 0xFF];
      buf += 32;
      v11 = *((_DWORD *)buf - 2) ^ crc_table[3][(unsigned __int8)v10] ^ crc_table[0][v10 >> 24] ^ crc_table[2][(unsigned __int16)v10 >> 8] ^ crc_table[1][(v10 >> 16) & 0xFF];
      v3 -= 32;
      v12 = *((_DWORD *)buf - 1) ^ crc_table[3][(unsigned __int8)v11] ^ crc_table[0][v11 >> 24] ^ crc_table[2][(unsigned __int16)v11 >> 8] ^ crc_table[1][(v11 >> 16) & 0xFF];
      i = crc_table[3][(unsigned __int8)v12] ^ crc_table[0][v12 >> 24] ^ crc_table[2][(unsigned __int16)v12 >> 8] ^ crc_table[1][(v12 >> 16) & 0xFF];
      --v5;
    }
    while ( v5 );
  }
  if ( v3 >= 4 )
  {
    v13 = v3 >> 2;
    do
    {
      v14 = *(_DWORD *)buf ^ i;
      buf += 4;
      v3 -= 4;
      --v13;
      i = crc_table[3][(unsigned __int8)v14] ^ crc_table[0][v14 >> 24] ^ crc_table[2][(unsigned __int16)v14 >> 8] ^ crc_table[1][(v14 >> 16) & 0xFF];
    }
    while ( v13 );
  }
  for ( ; v3; --v3 )
    i = crc_table[0][(unsigned __int8)(i ^ *buf++)] ^ (i >> 8);
  return ~i;
}

//----- (0073E420) --------------------------------------------------------
int __cdecl crc32(unsigned int crc, const char *buf, unsigned int len)
{
  int result; // eax@2

  if ( buf )
    result = crc32_little(crc, buf, len);
  else
    result = 0;
  return result;
}

//----- (0073E440) --------------------------------------------------------
void *__cdecl zcalloc(void *opaque, unsigned int items, unsigned int size)
{
  return malloc(size * items);
}

//----- (0073E460) --------------------------------------------------------
void __cdecl zcfree(void *opaque, void *ptr)
{
  free(ptr);
}

//----- (0073E480) --------------------------------------------------------
void __cdecl inflate_fast(z_stream_s *strm, unsigned int start)
{
  internal_state *v2; // eax@1
  char *v3; // edx@1
  unsigned int v4; // ebx@1
  unsigned int v5; // ecx@1
  char *v6; // esi@1
  unsigned int v7; // edi@1
  int v8; // edx@1
  int v9; // ebx@3
  unsigned int v10; // eax@4
  int v11; // ecx@4
  char v12; // dl@4
  int v13; // eax@8
  unsigned int v14; // edx@9
  int v15; // edx@14
  unsigned int v16; // edx@15
  int v17; // ecx@15
  char v18; // al@15
  int v19; // ecx@17
  unsigned int v20; // eax@18
  int v21; // edx@19
  int v22; // edx@19
  int v23; // edx@20
  int v24; // edx@21
  unsigned int v25; // edx@21
  int v26; // ecx@21
  unsigned int v27; // eax@22
  int v28; // ecx@23
  int v29; // ecx@24
  char v30; // dl@26
  int v31; // edx@29
  int v32; // eax@29
  int v33; // ecx@30
  char v34; // dl@31
  unsigned int v35; // eax@32
  char v36; // dl@34
  char v37; // dl@38
  unsigned int v38; // edx@41
  char v39; // al@42
  char v40; // cl@47
  unsigned int v41; // ecx@47
  char *v42; // edx@53
  char *v43; // ST44_4@63
  int v44; // edi@63
  unsigned int lmask; // [sp+Ch] [bp-3Ch]@1
  unsigned int whave; // [sp+10h] [bp-38h]@1
  char *beg; // [sp+14h] [bp-34h]@1
  unsigned int dmask; // [sp+18h] [bp-30h]@1
  char *end; // [sp+1Ch] [bp-2Ch]@1
  char *window; // [sp+20h] [bp-28h]@1
  unsigned int wsize; // [sp+24h] [bp-24h]@1
  code *dcode; // [sp+28h] [bp-20h]@1
  code *lcode; // [sp+2Ch] [bp-1Ch]@1
  code this; // [sp+30h] [bp-18h]@22
  unsigned __int16 this_2; // [sp+32h] [bp-16h]@15
  unsigned int write; // [sp+34h] [bp-14h]@1
  internal_state *state; // [sp+38h] [bp-10h]@1
  char *last; // [sp+3Ch] [bp-Ch]@1
  unsigned int dist; // [sp+40h] [bp-8h]@18
  unsigned int dista; // [sp+40h] [bp-8h]@21
  char *in; // [sp+44h] [bp-4h]@1
  unsigned int len; // [sp+54h] [bp+Ch]@9

  v2 = strm->state;
  v3 = strm->next_in - 1;
  in = v3;
  v4 = v2[12].dummy;
  v5 = strm->avail_out;
  last = &v3[strm->avail_in - 5];
  v6 = strm->next_out - 1;
  beg = &v6[v5 - start];
  end = &v6[v5 - 257];
  wsize = v2[8].dummy;
  whave = v2[9].dummy;
  write = v2[10].dummy;
  window = (char *)v2[11].dummy;
  lcode = (code *)v2[17].dummy;
  dcode = (code *)v2[18].dummy;
  state = strm->state;
  v7 = v2[13].dummy;
  v8 = (1 << v2[19].dummy) - 1;
  lmask = (1 << v2[19].dummy) - 1;
  dmask = (1 << v2[20].dummy) - 1;
  while ( 1 )
  {
    if ( v7 < 0xF )
    {
      v9 = ((unsigned __int8)in[1] << v7) + v4;
      in += 2;
      v4 = ((unsigned __int8)*in << (v7 + 8)) + v9;
      v7 += 16;
    }
    v10 = (unsigned int)lcode[v4 & v8];
    v11 = (unsigned __int8)(*(_WORD *)&lcode[v4 & v8].op >> 8);
    v4 >>= v11;
    v7 -= v11;
    v12 = v10;
    if ( (_BYTE)v10 )
      break;
LABEL_8:
    ++v6;
    v13 = v10 >> 16;
LABEL_52:
    *v6 = v13;
LABEL_53:
    v42 = last;
    if ( in >= last || v6 >= end )
      goto LABEL_63;
    v8 = lmask;
  }
  while ( 1 )
  {
    if ( v12 & 0x10 )
    {
      v14 = v12 & 0xF;
      len = v10 >> 16;
      if ( v14 )
      {
        if ( v7 < v14 )
        {
          v4 += (unsigned __int8)*++in << v7;
          v7 += 8;
        }
        len += v4 & ((1 << v14) - 1);
        v4 >>= v14;
        v7 -= v14;
      }
      if ( v7 < 0xF )
      {
        v15 = (unsigned __int8)in[1];
        in += 2;
        v4 += ((unsigned __int8)*in << (v7 + 8)) + (v15 << v7);
        v7 += 16;
      }
      v16 = (unsigned int)dcode[v4 & dmask];
      v17 = (unsigned __int8)(*(_WORD *)&dcode[v4 & dmask].op >> 8);
      v18 = (char)dcode[v4 & dmask];
      v4 >>= v17;
      v7 -= v17;
      this_2 = HIWORD(v16);
      if ( !(v18 & 0x10) )
      {
        while ( !(v18 & 0x40) )
        {
          v16 = (unsigned int)*(&dcode[this_2] + (v4 & ((1 << v18) - 1)));
          v19 = (unsigned __int8)(*(_WORD *)&dcode[this_2 + (v4 & ((1 << v18) - 1))].op >> 8);
          v18 = (char)*(&dcode[this_2] + (v4 & ((1 << v18) - 1)));
          v4 >>= v19;
          v7 -= v19;
          this_2 = HIWORD(v16);
          if ( v18 & 0x10 )
            goto LABEL_18;
        }
        strm->msg = "invalid distance code";
        goto LABEL_61;
      }
LABEL_18:
      v20 = v18 & 0xF;
      dist = v16 >> 16;
      if ( v7 < v20 )
      {
        v21 = (unsigned __int8)(in++)[1];
        v22 = v21 << v7;
        v7 += 8;
        v4 += v22;
        if ( v7 < v20 )
        {
          v23 = (unsigned __int8)(in++)[1];
          v4 += v23 << v7;
          v7 += 8;
        }
      }
      v7 -= v20;
      v24 = v4 & ((1 << v20) - 1);
      v4 >>= v20;
      v25 = v24 + dist;
      v26 = v6 - beg;
      dista = v25;
      if ( v25 > v6 - beg )
      {
        v27 = v25 - v26;
        this = (code)(v25 - v26);
        if ( v25 - v26 > whave )
        {
          strm->msg = "invalid distance too far back";
          state->dummy = 27;
          goto LABEL_62;
        }
        v28 = (int)(window - 1);
        if ( !write )
        {
          v29 = wsize - v27 + v28;
          if ( v27 < len )
          {
            len -= v27;
            do
            {
              v30 = *(_BYTE *)(v29++ + 1);
              ++v6;
              --v27;
              *v6 = v30;
            }
            while ( v27 );
            goto LABEL_39;
          }
LABEL_40:
          if ( len > 2 )
          {
            v38 = (len - 3) / 3 + 1;
            do
            {
              len -= 3;
              v6[1] = *(_BYTE *)(v29 + 1);
              v6[2] = *(_BYTE *)(v29 + 2);
              v39 = *(_BYTE *)(v29 + 3);
              v29 += 3;
              v6 += 3;
              --v38;
              *v6 = v39;
            }
            while ( v38 );
          }
          if ( len )
          {
            *++v6 = *(_BYTE *)(v29 + 1);
            if ( len > 1 )
            {
              LOBYTE(v13) = *(_BYTE *)(v29 + 2);
LABEL_51:
              ++v6;
              goto LABEL_52;
            }
          }
          goto LABEL_53;
        }
        if ( write >= v27 )
        {
          v29 = write - v27 + v28;
          if ( v27 >= len )
            goto LABEL_40;
          len -= v27;
          do
          {
            v37 = *(_BYTE *)(v29++ + 1);
            ++v6;
            --v27;
            *v6 = v37;
          }
          while ( v27 );
        }
        else
        {
          v31 = wsize + write - v27;
          v32 = *(_DWORD *)&this - write;
          v29 = v31 + v28;
          if ( *(_DWORD *)&this - write >= len )
            goto LABEL_40;
          len -= v32;
          v33 = v29 - (_DWORD)v6;
          do
          {
            v34 = (v6++)[v33 + 1];
            --v32;
            *v6 = v34;
          }
          while ( v32 );
          v35 = write;
          v29 = (int)(window - 1);
          if ( write >= len )
            goto LABEL_40;
          len -= write;
          do
          {
            v36 = *(_BYTE *)(v29++ + 1);
            ++v6;
            --v35;
            *v6 = v36;
          }
          while ( v35 );
        }
LABEL_39:
        v29 = (int)&v6[-dista];
        goto LABEL_40;
      }
      v13 = (int)&v6[-v25];
      do
      {
        v6[1] = *(_BYTE *)(v13 + 1);
        v6[2] = *(_BYTE *)(v13 + 2);
        v40 = *(_BYTE *)(v13 + 3);
        v13 += 3;
        v6 += 3;
        *v6 = v40;
        v41 = len - 3;
        len = v41;
      }
      while ( v41 > 2 );
      if ( v41 )
      {
        *++v6 = *(_BYTE *)(v13 + 1);
        if ( v41 > 1 )
        {
          LOBYTE(v13) = *(_BYTE *)(v13 + 2);
          goto LABEL_51;
        }
      }
      goto LABEL_53;
    }
    if ( v12 & 0x40 )
      break;
    v10 = (unsigned int)*(&lcode[v10 >> 16] + (v4 & ((1 << v12) - 1)));
    v4 >>= SBYTE1(v10);
    v7 -= BYTE1(v10);
    v12 = v10;
    if ( !(_BYTE)v10 )
      goto LABEL_8;
  }
  if ( v12 & 0x20 )
  {
    state->dummy = 11;
    goto LABEL_62;
  }
  strm->msg = "invalid literal/length code";
LABEL_61:
  state->dummy = 27;
LABEL_62:
  v42 = last;
LABEL_63:
  v43 = &in[-(v7 >> 3)];
  v44 = v7 - 8 * (v7 >> 3);
  strm->next_in = v43 + 1;
  strm->next_out = v6 + 1;
  strm->avail_out = end - v6 + 257;
  strm->avail_in = v42 - v43 + 5;
  state[13].dummy = v44;
  state[12].dummy = ((1 << v44) - 1) & v4;
}

//----- (0073E890) --------------------------------------------------------
int __cdecl inflate_table(codetype type, unsigned __int16 *lens, unsigned int codes, code **table, unsigned int *bits, unsigned __int16 *work)
{
  unsigned int v6; // eax@1
  unsigned int v7; // ecx@3
  unsigned int v8; // eax@3
  int result; // eax@9
  unsigned int v10; // edi@10
  int v11; // esi@24
  unsigned int v12; // eax@24
  unsigned int v13; // eax@30
  unsigned __int16 v14; // cx@31
  unsigned int v15; // eax@32
  unsigned int v16; // esi@42
  unsigned int v17; // ebx@42
  signed int v18; // edi@42
  unsigned __int16 *v19; // edx@45
  unsigned __int16 v20; // ax@47
  int v21; // ecx@47
  int v22; // eax@50
  signed int v23; // eax@53
  signed int v24; // edx@53
  code *v25; // ecx@53
  unsigned int i; // eax@55
  int v27; // edx@58
  unsigned int v28; // eax@60
  bool v29; // zf@60
  char v30; // cl@67
  unsigned int v31; // edx@67
  signed int v32; // eax@67
  unsigned __int16 *v33; // esi@68
  int v34; // eax@69
  code *v35; // edx@76
  unsigned int j; // eax@81
  int v37; // [sp+10h] [bp-88h]@64
  unsigned int mask; // [sp+18h] [bp-80h]@42
  signed int v39; // [sp+1Ch] [bp-7Ch]@42
  unsigned __int16 *extra; // [sp+20h] [bp-78h]@38
  unsigned __int16 *v41; // [sp+24h] [bp-74h]@45
  unsigned int huff; // [sp+28h] [bp-70h]@58
  unsigned int low; // [sp+2Ch] [bp-6Ch]@42
  unsigned __int16 *base; // [sp+30h] [bp-68h]@38
  int end; // [sp+34h] [bp-64h]@38
  unsigned int used; // [sp+38h] [bp-60h]@42
  code *next; // [sp+3Ch] [bp-5Ch]@42
  unsigned int max; // [sp+40h] [bp-58h]@6
  unsigned int root; // [sp+48h] [bp-50h]@3
  unsigned int len; // [sp+4Ch] [bp-4Ch]@42
  code this; // [sp+50h] [bp-48h]@48
  code thisa; // [sp+50h] [bp-48h]@75
  unsigned __int16 offs[16]; // [sp+54h] [bp-44h]@30
  unsigned __int16 count[16]; // [sp+74h] [bp-24h]@1

  *(_DWORD *)count = 0;
  *(_DWORD *)&count[2] = 0;
  *(_DWORD *)&count[4] = 0;
  *(_DWORD *)&count[6] = 0;
  *(_DWORD *)&count[8] = 0;
  *(_DWORD *)&count[10] = 0;
  *(_DWORD *)&count[12] = 0;
  *(_DWORD *)&count[14] = 0;
  v6 = 0;
  if ( codes )
  {
    do
      ++count[lens[v6++]];
    while ( v6 < codes );
  }
  v7 = *bits;
  root = *bits;
  v8 = 15;
  do
  {
    if ( count[v8] )
      break;
    --v8;
  }
  while ( v8 >= 1 );
  max = v8;
  if ( v7 > v8 )
  {
    root = v8;
    v7 = v8;
  }
  if ( !v8 )
  {
    **table = (code)320;
    ++*table;
    **table = (code)320;
    ++*table;
    *bits = 1;
    return 0;
  }
  v10 = 1;
  while ( !count[v10] )
  {
    if ( count[v10 + 1] )
    {
      ++v10;
      break;
    }
    if ( count[v10 + 2] )
    {
      v10 += 2;
      break;
    }
    if ( count[v10 + 3] )
    {
      v10 += 3;
      break;
    }
    if ( count[v10 + 4] )
    {
      v10 += 4;
      break;
    }
    v10 += 5;
    if ( v10 > 0xF )
      break;
  }
  if ( v7 < v10 )
    root = v10;
  v11 = 1;
  v12 = 1;
  do
  {
    v11 = 2 * v11 - count[v12];
    if ( v11 < 0 )
      return -1;
    ++v12;
  }
  while ( v12 <= 0xF );
  if ( v11 > 0 && (type == CODES || codes - count[0] != 1) )
    return -1;
  offs[1] = 0;
  v13 = 1;
  do
  {
    v14 = count[v13] + offs[v13];
    ++v13;
    offs[v13] = v14;
  }
  while ( v13 < 15 );
  v15 = 0;
  if ( codes )
  {
    do
    {
      if ( lens[v15] )
        work[offs[lens[v15]]++] = v15;
      ++v15;
    }
    while ( v15 < codes );
  }
  if ( type )
  {
    if ( type == 1 )
    {
      base = (unsigned __int16 *)&lbase[-257];
      extra = (unsigned __int16 *)&lext[-257];
      end = 256;
    }
    else
    {
      base = (unsigned __int16 *)dbase;
      extra = (unsigned __int16 *)dext;
      end = -1;
    }
  }
  else
  {
    extra = work;
    base = work;
    end = 19;
  }
  next = *table;
  len = v10;
  v16 = 0;
  v17 = 0;
  v18 = 1 << root;
  low = -1;
  v39 = 1 << root;
  used = 1 << root;
  mask = (1 << root) - 1;
  if ( type == 1 && (unsigned int)(1 << root) >= 0x506 )
    return 1;
  v19 = work;
  v41 = work;
  while ( 1 )
  {
    v20 = *v19;
    v21 = *v19;
    if ( v21 < end )
    {
      this.op = 0;
LABEL_52:
      this.val = v20;
      goto LABEL_53;
    }
    if ( v21 <= end )
    {
      this.op = 96;
      v20 = 0;
      goto LABEL_52;
    }
    v22 = *v19;
    this.op = extra[v22];
    this.val = base[v22];
LABEL_53:
    v23 = 1 << (len - v17);
    v24 = v18;
    v25 = &next[v18 + (v16 >> v17)];
    do
    {
      v25 -= v23;
      v24 -= v23;
      this.bits = len - v17;
      *v25 = this;
    }
    while ( v24 );
    for ( i = 1 << (len - 1); i & v16; i >>= 1 )
      ;
    if ( i )
    {
      v27 = v16 & (i - 1);
      v16 = i + v27;
      huff = i + v27;
    }
    else
    {
      v16 = 0;
      huff = 0;
    }
    v28 = len;
    v19 = v41 + 1;
    v29 = count[len] == 1;
    --count[v28];
    ++v41;
    if ( !v29 )
      goto LABEL_63;
    if ( len == max )
      break;
    v28 = lens[*v19];
    len = lens[*v19];
LABEL_63:
    if ( v28 <= root || (v37 = v16 & mask, (v16 & mask) == low) )
    {
      v18 = v39;
    }
    else
    {
      if ( !v17 )
        v17 = root;
      v30 = len - v17;
      next += v39;
      v31 = len;
      v32 = 1 << (len - v17);
      if ( len < max )
      {
        v33 = &count[len];
        do
        {
          v34 = v32 - *v33;
          if ( v34 <= 0 )
            break;
          ++v31;
          ++v30;
          ++v33;
          v32 = 2 * v34;
        }
        while ( v31 < max );
        v16 = huff;
      }
      result = 1;
      v18 = 1 << v30;
      used += 1 << v30;
      v39 = 1 << v30;
      if ( type == 1 && used >= 0x506 )
        return result;
      (*table)[v37].op = v30;
      (*table)[v37].bits = root;
      (*table)[v37].val = next - *table;
      v19 = v41;
      low = v37;
    }
  }
  thisa.op = 64;
  thisa.bits = len - v17;
  thisa.val = 0;
  if ( v16 )
  {
    v35 = next;
    while ( 1 )
    {
      if ( v17 && (v16 & mask) != low )
      {
        LOBYTE(v28) = root;
        v35 = *table;
        v17 = 0;
        LOBYTE(len) = root;
        thisa.bits = root;
      }
      v35[v16 >> v17] = thisa;
      for ( j = 1 << (v28 - 1); j & v16; j >>= 1 )
        ;
      if ( !j )
        break;
      v16 = j + ((j - 1) & v16);
      if ( !v16 )
        break;
      LOBYTE(v28) = len;
    }
  }
  *table += used;
  *bits = root;
  return 0;
}

//----- (0073ED20) --------------------------------------------------------
NiSGIReader *__thiscall NiBMPReader::`scalar deleting destructor'(NiSGIReader *this, unsigned int a2)
{
  NiSGIReader *v2; // esi@1

  v2 = this;
  this->vfptr = (NiImageReaderVtbl *)&NiImageReader::`vftable';
  DeleteCriticalSection(&this->m_kReadCriticalSection.m_kCriticalSection);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9D2A6C: using guessed type int (__thiscall *NiImageReader::`vftable')(void *p, char);

//----- (0073ED50) --------------------------------------------------------
char __thiscall NiPixelFormat::operator==(NiPixelFormat *this, NiPixelFormat *kOther)
{
  unsigned int v2; // edx@5
  unsigned int v3; // eax@5
  char result; // al@8
  signed int v5; // edi@9
  char *v6; // edx@9
  char *v7; // eax@9

  if ( kOther->m_eFormat == this->m_eFormat
    && kOther->m_uFlags == this->m_uFlags
    && kOther->m_eTiling == this->m_eTiling
    && kOther->m_ucBitsPerPixel == this->m_ucBitsPerPixel
    && ((v2 = kOther->m_uiRendererHint, v3 = this->m_uiRendererHint, v2 == v3) || v3 == -1 || v2 == -1) )
  {
    v5 = 0;
    v6 = &kOther->m_akComponents[0].m_ucBitsPerComponent;
    v7 = (char *)this->m_akComponents;
    while ( *(_DWORD *)&v7[(char *)kOther - (char *)this] == *(_DWORD *)v7
         && *((_DWORD *)v6 - 1) == *((_DWORD *)v7 + 1)
         && *v6 == v7[8]
         && v6[1] == v7[9] )
    {
      ++v5;
      v6 += 12;
      v7 += 12;
      if ( v5 >= 4 )
        return 1;
    }
    result = 0;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0073EDE0) --------------------------------------------------------
void __thiscall NiPNGReader::Unpack4BitSourceRowPal(NiPNGReader *this, char *pucSrc, char *pucDest)
{
  unsigned int v3; // esi@1
  char *v4; // eax@2

  v3 = 0;
  if ( this->m_usWidth & 0xFFFE )
  {
    v4 = pucDest;
    do
    {
      ++v3;
      *v4 = v4[pucSrc - pucDest] - LOBYTE(this->m_usMinPalIndex);
      ++v4;
    }
    while ( v3 < (unsigned int)this->m_usWidth >> 1 );
  }
}

//----- (0073EE20) --------------------------------------------------------
void __thiscall NiPNGReader::Unpack8BitSourceRowPal(NiPNGReader *this, char *pucSrc, char *pucDest)
{
  unsigned int v3; // esi@1
  char *v4; // eax@2

  v3 = 0;
  if ( this->m_usWidth > 0u )
  {
    v4 = pucDest;
    do
    {
      ++v3;
      *v4 = v4[pucSrc - pucDest] - LOBYTE(this->m_usMinPalIndex);
      ++v4;
    }
    while ( v3 < this->m_usWidth );
  }
}

//----- (0073EE50) --------------------------------------------------------
void __thiscall NiPNGReader::Unpack32BitFrom24BitSourceRow(NiPNGReader *this, char *pucSrc, char *pucDest)
{
  unsigned int v3; // esi@1
  char *v4; // eax@2
  char *v5; // edx@2

  v3 = 0;
  if ( this->m_usWidth > 0u )
  {
    v4 = pucDest;
    v5 = pucSrc + 2;
    do
    {
      *v4 = *(v5 - 2);
      v4[1] = *(v5 - 1);
      v4[2] = *v5;
      v4[3] = -1;
      ++v3;
      v4 += 4;
      v5 += 3;
    }
    while ( v3 < this->m_usWidth );
  }
}

//----- (0073EEA0) --------------------------------------------------------
void __thiscall NiPNGReader::Unpack32BitFrom32BitSourceRow(NiPNGReader *this, char *pucSrc, char *pucDest)
{
  unsigned int v3; // esi@1
  char *v4; // eax@2
  char *v5; // edx@2

  v3 = 0;
  if ( this->m_usWidth > 0u )
  {
    v4 = pucDest;
    v5 = pucSrc + 2;
    do
    {
      *v4 = *(v5 - 2);
      v4[1] = *(v5 - 1);
      v4[2] = *v5;
      v4[3] = v5[1];
      ++v3;
      v4 += 4;
      v5 += 4;
    }
    while ( v3 < this->m_usWidth );
  }
}

//----- (0073EEF0) --------------------------------------------------------
bool __stdcall NiPNGReader::CanReadFile(const char *pcFileExtension)
{
  return NiStricmp(pcFileExtension, ".png") == 0;
}

//----- (0073EF10) --------------------------------------------------------
int __thiscall NiBinaryStream::Read(NiBinaryStream *this, void *pvBuffer, unsigned int uiBytes)
{
  NiBinaryStream *v3; // ST00_4@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // ecx@1
  unsigned int uiSize; // [sp+0h] [bp-4h]@1

  uiSize = (unsigned int)this;
  v3 = this;
  v4 = this->m_pfnRead;
  uiSize = 1;
  return v4(v3, pvBuffer, uiBytes, &uiSize, 1u);
}

//----- (0073EF40) --------------------------------------------------------
void __thiscall NiPNGReader::NiPNGReader(NiPNGReader *this)
{
  NiPNGReader *v1; // ebx@1
  char *v2; // ST00_4@1

  v1 = this;
  this->vfptr = (NiImageReaderVtbl *)&NiImageReader::`vftable';
  v2 = (char *)&this->m_kReadCriticalSection;
  *((_DWORD *)v2 + 6) = 0;
  *((_DWORD *)v2 + 7) = 0;
  InitializeCriticalSection(&this->m_kReadCriticalSection.m_kCriticalSection);
  v1->vfptr = (NiImageReaderVtbl *)&NiPNGReader::`vftable';
  NiPixelFormat::NiPixelFormat(&v1->m_kFormat);
  v1->m_usPalLength = 0;
  v1->m_ucCoSize = 0;
  *(_DWORD *)&v1->m_usWidth = 0;
  *(_DWORD *)&v1->m_ucPixelSize = 0;
  *(_WORD *)&v1->m_bColormapped = 0;
  *(_DWORD *)&v1->m_ucIDLength = 0;
  *(_DWORD *)&v1->m_usXOrigin = 0;
  qmemcpy(&v1->m_kFormat, &NiPixelFormat::RGB24, sizeof(v1->m_kFormat));
  v1->m_uiRawDataMax = 0;
  v1->m_pucRawData = 0;
  v1->m_uiColorMapMax = 0;
  v1->m_pkColorMap = 0;
  v1->m_pfnUnpacker = 0;
}
// 9D2A6C: using guessed type int (__thiscall *NiImageReader::`vftable')(void *p, char);
// 9D2A80: using guessed type int (__thiscall *NiPNGReader::`vftable')(void *p, char);

//----- (0073EFC0) --------------------------------------------------------
NiPNGReader *__thiscall NiPNGReader::`scalar deleting destructor'(NiPNGReader *this, unsigned int a2)
{
  NiPNGReader *v2; // esi@1
  char *v3; // ST04_4@1

  v2 = this;
  v3 = this->m_pucRawData;
  this->vfptr = (NiImageReaderVtbl *)&NiPNGReader::`vftable';
  operator delete(v3);
  operator delete(v2->m_pkColorMap);
  v2->vfptr = (NiImageReaderVtbl *)&NiImageReader::`vftable';
  DeleteCriticalSection(&v2->m_kReadCriticalSection.m_kCriticalSection);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9D2A6C: using guessed type int (__thiscall *NiImageReader::`vftable')(void *p, char);
// 9D2A80: using guessed type int (__thiscall *NiPNGReader::`vftable')(void *p, char);

//----- (0073F010) --------------------------------------------------------
void __cdecl NiPNGReaderReadCB(png_struct_def *png_ptr, char *data, unsigned int length)
{
  int v3; // ecx@0
  _DWORD *v4; // eax@1
  void (__cdecl *v5)(_DWORD *, char *, unsigned int, int *, signed int); // edx@1
  int v6; // [sp+0h] [bp-4h]@1

  v6 = v3;
  v4 = png_get_io_ptr(png_ptr);
  v5 = (void (__cdecl *)(_DWORD *, char *, unsigned int, int *, signed int))v4[1];
  v6 = 1;
  v5(v4, data, length, &v6, 1);
}

//----- (0073F040) --------------------------------------------------------
NiPixelData *__thiscall NiPNGReader::ReadBody(NiPNGReader *this, NiFile *kIst, NiPixelData *pkOptDest)
{
  png_struct_def *v3; // eax@1
  NiPixelData *result; // eax@4
  png_info_struct *v5; // edi@7
  int v6; // esi@7
  void *v7; // ST20_4@9
  void *v8; // eax@9
  int v9; // eax@10
  int v10; // ecx@10
  unsigned int i; // edx@10
  unsigned int v12; // eax@13
  _BYTE *v13; // ecx@14
  NiPixelData *v14; // ebx@16
  NiPixelData *v15; // eax@21
  NiPixelData *v16; // eax@22
  NiPalette *v17; // eax@26
  char *v18; // eax@27
  NiPalette *v19; // edi@29
  char *v20; // ecx@38
  unsigned int *v21; // edx@38
  unsigned int v22; // eax@38
  int v23; // ebx@38
  char *v24; // eax@45
  unsigned int v25; // ecx@45
  int iVar; // [sp+Ch] [bp-1Ch]@1
  NiPNGReader *v27; // [sp+10h] [bp-18h]@1
  unsigned int uiRow; // [sp+14h] [bp-14h]@42
  char *pucDestPixels; // [sp+18h] [bp-10h]@27
  NiPixelData *pkDest; // [sp+1Ch] [bp-Ch]@20
  png_struct_def *pPng; // [sp+20h] [bp-8h]@1
  png_info_struct *pInfo; // [sp+24h] [bp-4h]@1

  v27 = this;
  ((void (__stdcall *)(_DWORD, _DWORD))kIst->vfptr[1].__vecDelDtor)(0, 0);
  pPng = 0;
  pInfo = 0;
  v3 = png_create_read_struct(
         "1.2.8",
         &iVar,
         (void (__cdecl *)(png_struct_def *, const char *))ITableBase<TextDataType3,TextData3>::BeforeTerminate,
         (void (__cdecl *)(png_struct_def *, const char *))ITableBase<TextDataType3,TextData3>::BeforeTerminate);
  pPng = v3;
  if ( !v3 )
    return 0;
  pInfo = (png_info_struct *)png_create_info_struct(v3);
  if ( !pInfo )
  {
    png_destroy_read_struct(&pPng, 0, 0);
    return 0;
  }
  if ( _setjmp3(pPng, 0) )
  {
    png_destroy_read_struct(&pPng, &pInfo, 0);
    result = 0;
  }
  else
  {
    png_set_read_fn(pPng, kIst, NiPNGReaderReadCB);
    png_set_sig_bytes(pPng, 0);
    png_read_png(pPng, pInfo, 0);
    v5 = pInfo;
    v6 = (int)v27;
    if ( pInfo->palette )
    {
      v27->m_bColormapped = 1;
      *(_WORD *)(v6 + 68) = v5->num_palette;
      if ( *(_DWORD *)(v6 + 164) < (unsigned int)v5->num_palette )
      {
        v7 = *(void **)(v6 + 168);
        *(_DWORD *)(v6 + 164) = v5->num_palette;
        operator delete(v7);
        v8 = operator new(4 * *(_WORD *)(v6 + 68));
        v5 = pInfo;
        *(_DWORD *)(v6 + 168) = v8;
      }
      v9 = *(_DWORD *)(v6 + 168);
      v10 = 0;
      for ( i = 0; i < *(_WORD *)(v6 + 68); v5 = pInfo )
      {
        *(_BYTE *)(v9 + 2) = v5->palette[v10].blue;
        *(_BYTE *)(v9 + 1) = pInfo->palette[v10].green;
        *(_BYTE *)v9 = pInfo->palette[v10].red;
        *(_BYTE *)(v9 + 3) = -1;
        ++i;
        v9 += 4;
        ++v10;
      }
      if ( v5->trans )
      {
        v12 = 0;
        if ( v5->num_trans > 0u )
        {
          v13 = (_BYTE *)(*(_DWORD *)(v6 + 168) + 3);
          do
          {
            *v13 = v5->trans[v12];
            v5 = pInfo;
            ++v12;
            v13 += 4;
          }
          while ( v12 < pInfo->num_trans );
        }
      }
    }
    v14 = pkOptDest;
    if ( pkOptDest
      && *pkOptDest->m_puiWidth == *(_WORD *)(v6 + 76)
      && *pkOptDest->m_puiHeight == *(_WORD *)(v6 + 78)
      && NiPixelFormat::operator==(&pkOptDest->m_kPixelFormat, (NiPixelFormat *)(v6 + 88)) )
    {
      pkDest = pkOptDest;
    }
    else
    {
      v15 = (NiPixelData *)operator new(0x70u);
      if ( v15 )
      {
        NiPixelData::NiPixelData(v15, *(_WORD *)(v6 + 76), *(_WORD *)(v6 + 78), (NiPixelFormat *)(v6 + 88), 1u, 1u);
        pkDest = v16;
      }
      else
      {
        pkDest = 0;
      }
      v14 = pkDest;
      v5 = pInfo;
    }
    if ( *(_BYTE *)(v6 + 84) )
    {
      v17 = (NiPalette *)operator new(0x24u);
      if ( v17 )
      {
        NiPalette::NiPalette(v17, *(_BYTE *)(v6 + 83), *(_WORD *)(v6 + 68), *(NiPalette::PaletteEntry **)(v6 + 168));
        pucDestPixels = v18;
      }
      else
      {
        pucDestPixels = 0;
        v18 = 0;
      }
      v19 = v14->m_spPalette.m_pObject;
      if ( (char *)v19 != v18 )
      {
        if ( v19 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v19->m_uiRefCount) && v19 )
            v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
          v18 = pucDestPixels;
        }
        v14->m_spPalette.m_pObject = (NiPalette *)v18;
        if ( v18 )
          InterlockedIncrement((volatile LONG *)v18 + 1);
      }
      v5 = pInfo;
    }
    v20 = &v14->m_pucPixels[*v14->m_puiOffsetInBytes];
    v21 = v14->m_puiWidth;
    v22 = *v21;
    v23 = *v21 * v14->m_uiPixelStride;
    pucDestPixels = v20;
    if ( !v23 )
      v23 = v22 >> 1;
    if ( *(_BYTE *)(v6 + 85) )
    {
      v20 += v23 * (*(_WORD *)(v6 + 78) - 1);
      pucDestPixels = v20;
      v23 = -v23;
    }
    uiRow = 0;
    if ( *(_WORD *)(v6 + 78) > 0u )
    {
      while ( 1 )
      {
        v24 = v5->row_pointers[uiRow];
        *(_DWORD *)(v6 + 160) = v24;
        (*(void (__thiscall **)(int, char *, char *))(v6 + 172))(v6, v24, v20);
        v25 = *(_WORD *)(v6 + 78);
        pucDestPixels += v23;
        if ( ++uiRow >= v25 )
          break;
        v5 = pInfo;
        v20 = pucDestPixels;
      }
    }
    *(_DWORD *)(v6 + 160) = 0;
    png_destroy_read_struct(&pPng, &pInfo, 0);
    result = pkDest;
  }
  return result;
}

//----- (0073F380) --------------------------------------------------------
void __cdecl NiStreamLoadBinary<unsigned int>(NiBinaryStream *binstream, unsigned int *value)
{
  int v2; // ecx@0
  unsigned int (__cdecl *v3)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@1
  int v4; // [sp+0h] [bp-4h]@1

  v4 = v2;
  v3 = binstream->m_pfnRead;
  v4 = 4;
  v3(binstream, value, 4u, (unsigned int *)&v4, 1u);
}

//----- (0073F3B0) --------------------------------------------------------
char __thiscall NiPNGReader::ReadHeader(NiPNGReader *this, NiFile *kIst, unsigned int *uiWidth, unsigned int *uiHeight, NiPixelFormat *kFormat, bool *bMipmap, unsigned int *uiNumFaces)
{
  NiFile *v7; // esi@1
  NiPNGReader *v8; // ebx@1
  unsigned int (__cdecl *v9)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  unsigned int (__cdecl *v10)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  unsigned int (__cdecl *v11)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  unsigned int (__cdecl *v12)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  unsigned int (__cdecl *v13)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  unsigned int (__cdecl *v14)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  unsigned int (__cdecl *v15)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@1
  unsigned int (__cdecl *v16)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  unsigned int v17; // ecx@1
  int v18; // eax@1
  unsigned int *v19; // edi@2
  unsigned int (__cdecl *v20)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // ecx@2
  unsigned int *v21; // edi@2
  unsigned int (__cdecl *v22)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@2
  unsigned int (__cdecl *v23)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // ecx@2
  unsigned int (__cdecl *v24)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // ecx@2
  unsigned int (__cdecl *v25)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // ecx@2
  unsigned int (__cdecl *v26)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // ecx@2
  unsigned int (__cdecl *v27)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // ecx@2
  char v28; // al@3
  char v29; // dl@4
  char v30; // cl@4
  bool v31; // zf@15
  int v32; // eax@16
  NiPixelFormat *v33; // edi@16
  NiPixelFormat *v34; // esi@17
  unsigned int *v35; // ecx@20
  NiPixelFormat *v36; // edi@20
  const void *v37; // esi@20
  bool *v38; // eax@20
  unsigned int uiCRC; // [sp+Ch] [bp-Ch]@2
  int v41; // [sp+10h] [bp-8h]@1
  char uIM; // [sp+16h] [bp-2h]@2
  char uFM; // [sp+17h] [bp-1h]@2

  v7 = kIst;
  v8 = this;
  *uiNumFaces = 1;
  v9 = v7->m_pfnRead;
  v41 = 1;
  v9((NiBinaryStream *)&v7->vfptr, this->m_aucHeader, 1u, (unsigned int *)&v41, 1u);
  v10 = v7->m_pfnRead;
  v41 = 1;
  v10((NiBinaryStream *)&v7->vfptr, &v8->m_aucHeader[1], 1u, (unsigned int *)&v41, 1u);
  v11 = v7->m_pfnRead;
  v41 = 1;
  v11((NiBinaryStream *)&v7->vfptr, &v8->m_aucHeader[2], 1u, (unsigned int *)&v41, 1u);
  v12 = v7->m_pfnRead;
  v41 = 1;
  v12((NiBinaryStream *)&v7->vfptr, &v8->m_aucHeader[3], 1u, (unsigned int *)&v41, 1u);
  v13 = v7->m_pfnRead;
  v41 = 1;
  v13((NiBinaryStream *)&v7->vfptr, &v8->m_aucHeader[4], 1u, (unsigned int *)&v41, 1u);
  v14 = v7->m_pfnRead;
  v41 = 1;
  v14((NiBinaryStream *)&v7->vfptr, &v8->m_aucHeader[5], 1u, (unsigned int *)&v41, 1u);
  v7->m_pfnRead((NiBinaryStream *)v7, &v8->m_aucHeader[6], 1u, (unsigned int *)&v41, 1u);
  v41 = 1;
  v7->m_pfnRead((NiBinaryStream *)v7, &v8->m_aucHeader[7], 1u, (unsigned int *)&v41, 1u);
  v15 = v7->m_pfnRead;
  v41 = 4;
  v15((NiBinaryStream *)&v7->vfptr, &v8->m_uiLength, 4u, (unsigned int *)&v41, 1u);
  v8->m_uiLength = BYTE3(v8->m_uiLength)
                 + ((BYTE2(v8->m_uiLength) + ((BYTE1(v8->m_uiLength) + (LOBYTE(v8->m_uiLength) << 8)) << 8)) << 8);
  v16 = v7->m_pfnRead;
  v41 = 4;
  v16((NiBinaryStream *)&v7->vfptr, &v8->m_uiType, 4u, (unsigned int *)&v41, 1u);
  v17 = v8->m_uiType;
  v18 = (int)v8->m_acType;
  *(_BYTE *)(v18 + 1) = LOWORD(v8->m_uiType) >> 8;
  *(_BYTE *)v18 = v17;
  *(_BYTE *)(v18 + 2) = v17 >> 16;
  *(_BYTE *)(v18 + 3) = BYTE3(v17);
  *(_BYTE *)(v18 + 4) = 0;
  if ( !strcmp(v8->m_acType, "IHDR") )
  {
    v19 = uiWidth;
    v20 = v7->m_pfnRead;
    v41 = 4;
    v20((NiBinaryStream *)&v7->vfptr, uiWidth, 4u, (unsigned int *)&v41, 1u);
    *v19 = *((_BYTE *)v19 + 3) + ((*((_BYTE *)v19 + 2) + ((*((_BYTE *)v19 + 1) + (*(_BYTE *)v19 << 8)) << 8)) << 8);
    v21 = uiHeight;
    v22 = v7->m_pfnRead;
    v41 = 4;
    v22((NiBinaryStream *)&v7->vfptr, uiHeight, 4u, (unsigned int *)&v41, 1u);
    *v21 = *((_BYTE *)v21 + 3) + ((*((_BYTE *)v21 + 2) + ((*((_BYTE *)v21 + 1) + (*(_BYTE *)v21 << 8)) << 8)) << 8);
    v23 = v7->m_pfnRead;
    v41 = 1;
    v23((NiBinaryStream *)&v7->vfptr, (char *)&uiNumFaces + 3, 1u, (unsigned int *)&v41, 1u);
    v24 = v7->m_pfnRead;
    v41 = 1;
    v24((NiBinaryStream *)&v7->vfptr, &v8->m_ucImgType, 1u, (unsigned int *)&v41, 1u);
    v25 = v7->m_pfnRead;
    v41 = 1;
    v25((NiBinaryStream *)&v7->vfptr, (char *)&kIst + 3, 1u, (unsigned int *)&v41, 1u);
    v41 = 1;
    v7->m_pfnRead((NiBinaryStream *)v7, &uFM, 1u, (unsigned int *)&v41, 1u);
    v26 = v7->m_pfnRead;
    v41 = 1;
    v26((NiBinaryStream *)&v7->vfptr, &uIM, 1u, (unsigned int *)&v41, 1u);
    v27 = v7->m_pfnRead;
    v41 = 4;
    v27((NiBinaryStream *)&v7->vfptr, &uiCRC, 4u, (unsigned int *)&v41, 1u);
  }
  v28 = BYTE3(uiNumFaces);
  switch ( v8->m_ucImgType )
  {
    case 0:
    case 2:
      v29 = 2 * BYTE3(uiNumFaces);
      v8->m_bColormapped = 0;
      v30 = v29 + v28;
      goto LABEL_8;
    case 3:
      v8->m_ucPixelSize = BYTE3(uiNumFaces);
      v8->m_bColormapped = 1;
      break;
    case 4:
      v8->m_ucPixelSize = 4 * BYTE3(uiNumFaces);
      v8->m_bColormapped = 0;
      break;
    case 6:
      v30 = 4 * BYTE3(uiNumFaces);
      *(_WORD *)&v8->m_bAlpha = 1;
LABEL_8:
      v8->m_ucPixelSize = v30;
      break;
    default:
      break;
  }
  switch ( v8->m_ucPixelSize )
  {
    case 4:
      v8->m_uiBytesPerPixel = 0;
      v8->m_pfnUnpacker = NiPNGReader::Unpack4BitSourceRowPal;
      break;
    case 8:
      v8->m_uiBytesPerPixel = 1;
      v8->m_pfnUnpacker = NiPNGReader::Unpack8BitSourceRowPal;
      break;
    case 0xF:
    case 0x10:
      v8->m_uiBytesPerPixel = 2;
      break;
    case 0x18:
      v8->m_uiBytesPerPixel = 3;
      v8->m_pfnUnpacker = NiPNGReader::Unpack32BitFrom24BitSourceRow;
      break;
    case 0x20:
      v8->m_uiBytesPerPixel = 4;
      v8->m_pfnUnpacker = NiPNGReader::Unpack32BitFrom32BitSourceRow;
      break;
    default:
      break;
  }
  v31 = v8->m_bColormapped == 0;
  v8->m_bAlpha = 1;
  if ( v31 )
  {
    v32 = (int)&v8->m_kFormat.m_uFlags;
    v34 = &NiPixelFormat::RGBA32;
    v33 = &v8->m_kFormat;
  }
  else
  {
    v31 = v28 == 4;
    v32 = (int)&v8->m_kFormat.m_uFlags;
    v33 = &v8->m_kFormat;
    if ( v31 )
      v34 = &NiPixelFormat::PALA4;
    else
      v34 = &NiPixelFormat::PALA8;
  }
  qmemcpy(v33, v34, sizeof(NiPixelFormat));
  v35 = uiHeight;
  v36 = kFormat;
  v8->m_usWidth = *(_WORD *)uiWidth;
  v37 = (const void *)v32;
  v38 = bMipmap;
  v8->m_usHeight = *(_WORD *)v35;
  qmemcpy(v36, v37, sizeof(NiPixelFormat));
  *v38 = 0;
  return 1;
}

//----- (0073F760) --------------------------------------------------------
NiPixelData *__thiscall NiPNGReader::ReadFile(NiPNGReader *this, NiFile *kIst, NiPixelData *pkOptDest)
{
  NiPNGReader *v3; // esi@1
  NiPixelData *result; // eax@2
  unsigned int uiNumFaces; // [sp+Ch] [bp-58h]@1
  unsigned int uiW; // [sp+10h] [bp-54h]@1
  unsigned int uiH; // [sp+14h] [bp-50h]@1
  bool bMipmap; // [sp+1Bh] [bp-49h]@1
  NiPixelFormat kFmt; // [sp+1Ch] [bp-48h]@1

  v3 = this;
  NiPixelFormat::NiPixelFormat(&kFmt);
  if ( v3->vfptr->ReadHeader((NiImageReader *)v3, kIst, &uiW, &uiH, &kFmt, &bMipmap, &uiNumFaces) )
    result = NiPNGReader::ReadBody(v3, kIst, pkOptDest);
  else
    result = 0;
  return result;
}

//----- (0073F7E0) --------------------------------------------------------
lua_TValue *__usercall index2addr@<eax>(lua_State *L@<esi>, int idx@<ecx>)
{
  CallInfo *v2; // edx@1
  lua_TValue *result; // eax@2
  int v4; // eax@8
  GCObject *v5; // ecx@9
  int v6; // edx@9
  bool v7; // zf@9
  bool v8; // sf@9
  unsigned __int8 v9; // of@9

  v2 = L->ci;
  if ( idx > 0 )
  {
    result = &v2->func[idx];
    if ( result < L->top )
      return result;
    return &luaO_nilobject_;
  }
  if ( idx > -1001000 )
    return &L->top[idx];
  if ( idx == -1001000 )
    return &L->l_G->l_registry;
  v4 = -1001000 - idx;
  if ( v2->func->u.i.tt__ == 2146936086 )
    return &luaO_nilobject_;
  v5 = v2->func->u.i.v__.gc;
  v6 = *(&v5->p.marked + 1);
  v9 = __OFSUB__(v4, v6);
  v7 = v4 == v6;
  v8 = v4 - v6 < 0;
  result = (lua_TValue *)&(&v5->p.k)[v4];
  if ( !((unsigned __int8)(v8 ^ v9) | v7) )
    return &luaO_nilobject_;
  return result;
}

//----- (0073F830) --------------------------------------------------------
void __cdecl growstack(lua_State *L, void *ud)
{
  luaD_growstack(L, *(_DWORD *)ud);
}

//----- (0073F850) --------------------------------------------------------
int __cdecl lua_checkstack(lua_State *L, int size)
{
  int v2; // ecx@1
  lua_TValue *v3; // eax@1
  CallInfo *v4; // edi@1
  int result; // eax@2
  lua_TValue *v6; // ecx@7

  v2 = size;
  v3 = L->top;
  v4 = L->ci;
  if ( L->stack_last - v3 > size )
  {
    result = 1;
    goto LABEL_7;
  }
  if ( v3 - L->stack + 5 > 1000000 - size )
    return 0;
  result = luaD_rawrunprotected(L, growstack, &size) == 0;
  if ( result )
  {
    v2 = size;
LABEL_7:
    v6 = &L->top[v2];
    if ( v4->top < v6 )
      v4->top = v6;
  }
  return result;
}

//----- (0073F8C0) --------------------------------------------------------
void __cdecl lua_xmove(lua_State *from, lua_State *to, int n)
{
  int i; // ecx@2
  lua_TValue *v4; // eax@3
  lua_TValue *v5; // edx@3

  if ( from != to )
  {
    from->top -= n;
    for ( i = 0; i < n; v4->u.i.tt__ = v5->u.i.tt__ )
    {
      v4 = to->top;
      v5 = &from->top[i];
      to->top = v4 + 1;
      v4->u.i.v__.b = v5->u.i.v__.b;
      ++i;
    }
  }
}

//----- (0073F910) --------------------------------------------------------
int (__cdecl *__cdecl lua_atpanic(lua_State *L, int (__cdecl *panicf)(lua_State *)))(lua_State *)
{
  global_State *v2; // ecx@1
  int (__cdecl *result)(lua_State *); // eax@1

  v2 = L->l_G;
  result = v2->panic;
  v2->panic = panicf;
  return result;
}

//----- (0073F930) --------------------------------------------------------
const long double *__cdecl lua_version(lua_State *L)
{
  const long double *result; // eax@2

  if ( L )
    result = L->l_G->version;
  else
    result = &version;
  return result;
}

//----- (0073F950) --------------------------------------------------------
int __cdecl lua_absindex(lua_State *L, int idx)
{
  int result; // eax@2

  if ( (unsigned int)idx >= 0xFFF0B9D9 || idx == 0 )
    result = idx + L->top - L->ci->func;
  else
    result = idx;
  return result;
}

//----- (0073F980) --------------------------------------------------------
int __cdecl lua_gettop(lua_State *L)
{
  return ((char *)L->top - (char *)L->ci->func - 8) >> 3;
}

//----- (0073F9A0) --------------------------------------------------------
void __cdecl lua_settop(lua_State *L, int idx)
{
  lua_TValue *i; // ecx@2

  if ( idx < 0 )
  {
    L->top += idx + 1;
  }
  else
  {
    for ( i = &L->ci->func[idx + 1]; L->top < i; ++L->top )
      L->top->u.i.tt__ = 2146936064;
    L->top = i;
  }
}

//----- (0073F9F0) --------------------------------------------------------
void __cdecl lua_remove(lua_State *L, int idx)
{
  CallInfo *v2; // esi@1
  lua_TValue *v3; // eax@2
  int v4; // eax@8
  GCObject *v5; // ecx@9
  int v6; // esi@9
  bool v7; // zf@9
  bool v8; // sf@9
  unsigned __int8 v9; // of@9
  lua_TValue *v10; // eax@11
  int v11; // ecx@12

  v2 = L->ci;
  if ( idx > 0 )
  {
    v3 = &v2->func[idx];
    if ( v3 < L->top )
      goto LABEL_11;
LABEL_10:
    v3 = &luaO_nilobject_;
    goto LABEL_11;
  }
  if ( idx > -1001000 )
  {
    v3 = &L->top[idx];
    goto LABEL_11;
  }
  if ( idx == -1001000 )
  {
    v3 = &L->l_G->l_registry;
    goto LABEL_11;
  }
  v4 = -1001000 - idx;
  if ( v2->func->u.i.tt__ == 2146936086 )
    goto LABEL_10;
  v5 = v2->func->u.i.v__.gc;
  v6 = *(&v5->p.marked + 1);
  v9 = __OFSUB__(v4, v6);
  v7 = v4 == v6;
  v8 = v4 - v6 < 0;
  v3 = (lua_TValue *)&(&v5->p.k)[v4];
  if ( !((unsigned __int8)(v8 ^ v9) | v7) )
    goto LABEL_10;
LABEL_11:
  v10 = v3 + 1;
  if ( v10 < L->top )
  {
    v11 = (int)&v10[-1];
    do
    {
      *(_DWORD *)v11 = v10->u.i.v__.b;
      *(_DWORD *)(v11 + 4) = v10->u.i.tt__;
      ++v10;
      v11 += 8;
    }
    while ( v10 < L->top );
  }
  --L->top;
}

//----- (0073FA80) --------------------------------------------------------
void __cdecl lua_insert(lua_State *L, int idx)
{
  CallInfo *v2; // edx@1
  lua_TValue *v3; // ecx@2
  int v4; // eax@8
  GCObject *v5; // ecx@9
  int v6; // edx@9
  lua_TValue *v7; // eax@11
  int v8; // edx@12
  lua_TValue *v9; // eax@14

  v2 = L->ci;
  if ( idx > 0 )
  {
    v3 = &v2->func[idx];
    if ( v3 < L->top )
      goto LABEL_11;
LABEL_10:
    v3 = &luaO_nilobject_;
    goto LABEL_11;
  }
  if ( idx > -1001000 )
  {
    v3 = &L->top[idx];
    goto LABEL_11;
  }
  if ( idx == -1001000 )
  {
    v3 = &L->l_G->l_registry;
    goto LABEL_11;
  }
  v4 = -1001000 - idx;
  if ( v2->func->u.i.tt__ == 2146936086 )
    goto LABEL_10;
  v5 = v2->func->u.i.v__.gc;
  v6 = *(&v5->p.marked + 1);
  v3 = (lua_TValue *)&(&v5->p.k)[v4];
  if ( v4 > v6 )
    goto LABEL_10;
LABEL_11:
  v7 = L->top;
  if ( v7 > v3 )
  {
    v8 = (int)&v7[-1];
    do
    {
      v7->u.i.v__.b = *(_DWORD *)v8;
      v7->u.i.tt__ = *(_DWORD *)(v8 + 4);
      --v7;
      v8 -= 8;
    }
    while ( v7 > v3 );
  }
  v9 = L->top;
  v3->u.i.v__.b = v9->u.i.v__.b;
  v3->u.i.tt__ = v9->u.i.tt__;
}

//----- (0073FB10) --------------------------------------------------------
void __usercall moveto(lua_State *L@<esi>, lua_TValue *fr@<edi>, int idx@<ecx>)
{
  CallInfo *v3; // edx@1
  lua_TValue *v4; // eax@2
  lua_TValue *v5; // edx@8
  int v6; // eax@8
  int v7; // edx@9
  int v8; // ebx@9
  bool v9; // zf@9
  bool v10; // sf@9
  unsigned __int8 v11; // of@9
  int v12; // eax@12
  GCObject *v13; // ecx@16

  v3 = L->ci;
  if ( idx > 0 )
  {
    v4 = &v3->func[idx];
    if ( v4 < L->top )
      goto LABEL_11;
LABEL_10:
    v4 = &luaO_nilobject_;
    goto LABEL_11;
  }
  if ( idx > -1001000 )
  {
    v4 = &L->top[idx];
    goto LABEL_11;
  }
  if ( idx == -1001000 )
  {
    v4 = &L->l_G->l_registry;
    goto LABEL_11;
  }
  v5 = v3->func;
  v6 = -1001000 - idx;
  if ( v5->u.i.tt__ == 2146936086 )
    goto LABEL_10;
  v7 = v5->u.i.v__.b;
  v8 = *(_BYTE *)(v7 + 6);
  v11 = __OFSUB__(v6, v8);
  v9 = v6 == v8;
  v10 = v6 - v8 < 0;
  v4 = (lua_TValue *)(v7 + 8 * v6 + 8);
  if ( !((unsigned __int8)(v10 ^ v11) | v9) )
    goto LABEL_10;
LABEL_11:
  *v4 = *fr;
  if ( idx < -1001000 )
  {
    v12 = fr->u.i.tt__;
    if ( (fr->u.i.tt__ & 0x7FFFFF00) != 2146936064 )
      LOBYTE(v12) = 3;
    if ( v12 & 0x40 && *(_BYTE *)(fr->u.i.v__.b + 5) & 3 )
    {
      v13 = L->ci->func->u.i.v__.gc;
      if ( v13->h.marked & 4 )
        luaC_barrier_(L, v13, fr->u.i.v__.gc);
    }
  }
}

//----- (0073FBC0) --------------------------------------------------------
void __cdecl lua_replace(lua_State *L, int idx)
{
  moveto(L, L->top - 1, idx);
  --L->top;
}

//----- (0073FBE0) --------------------------------------------------------
void __cdecl lua_copy(lua_State *L, int fromidx, int toidx)
{
  CallInfo *v3; // edx@1
  lua_TValue *v4; // edi@2
  int v5; // eax@8
  GCObject *v6; // ecx@9
  lua_TValue *v7; // edi@9

  v3 = L->ci;
  if ( fromidx > 0 )
  {
    v4 = &v3->func[fromidx];
    if ( v4 < L->top )
    {
      moveto(L, v4, toidx);
      return;
    }
LABEL_10:
    v7 = &luaO_nilobject_;
    goto LABEL_11;
  }
  if ( fromidx > -1001000 )
  {
    moveto(L, &L->top[fromidx], toidx);
    return;
  }
  if ( fromidx == -1001000 )
  {
    moveto(L, &L->l_G->l_registry, toidx);
    return;
  }
  v5 = -1001000 - fromidx;
  if ( v3->func->u.i.tt__ == 2146936086 )
    goto LABEL_10;
  v6 = v3->func->u.i.v__.gc;
  v7 = (lua_TValue *)&(&v6->p.k)[v5];
  if ( v5 > *(&v6->p.marked + 1) )
    goto LABEL_10;
LABEL_11:
  moveto(L, v7, toidx);
}

//----- (0073FC70) --------------------------------------------------------
void __cdecl lua_pushvalue(lua_State *L, int idx)
{
  CallInfo *v2; // esi@1
  lua_TValue *v3; // eax@2
  lua_TValue *v4; // ecx@3
  lua_TValue *v5; // eax@5
  lua_TValue *v6; // ecx@5
  global_State *v7; // eax@7
  lua_TValue *v8; // ecx@7
  int v9; // eax@8
  GCObject *v10; // ecx@9
  int v11; // esi@9
  bool v12; // zf@9
  bool v13; // sf@9
  unsigned __int8 v14; // of@9
  lua_TValue *v15; // eax@9
  lua_TValue *v16; // ecx@11

  v2 = L->ci;
  if ( idx > 0 )
  {
    v3 = &v2->func[idx];
    if ( v3 < L->top )
    {
      v4 = L->top;
      v4->u.i.v__.b = v3->u.i.v__.b;
      v4->u.i.tt__ = v3->u.i.tt__;
      ++L->top;
      return;
    }
LABEL_10:
    v15 = &luaO_nilobject_;
    goto LABEL_11;
  }
  if ( idx > -1001000 )
  {
    v5 = L->top;
    v6 = L->top;
    v6->u.i.v__.b = v5[idx].u.i.v__.b;
    v6->u.i.tt__ = v5[idx].u.i.tt__;
    ++L->top;
    return;
  }
  if ( idx == -1001000 )
  {
    v7 = L->l_G;
    v8 = L->top;
    v8->u.i.v__.b = v7->l_registry.u.i.v__.b;
    v8->u.i.tt__ = v7->l_registry.u.i.tt__;
    ++L->top;
    return;
  }
  v9 = -1001000 - idx;
  if ( v2->func->u.i.tt__ == 2146936086 )
    goto LABEL_10;
  v10 = v2->func->u.i.v__.gc;
  v11 = *(&v10->p.marked + 1);
  v14 = __OFSUB__(v9, v11);
  v12 = v9 == v11;
  v13 = v9 - v11 < 0;
  v15 = (lua_TValue *)&(&v10->p.k)[v9];
  if ( !((unsigned __int8)(v13 ^ v14) | v12) )
    goto LABEL_10;
LABEL_11:
  v16 = L->top;
  v16->u.i.v__.b = v15->u.i.v__.b;
  v16->u.i.tt__ = v15->u.i.tt__;
  ++L->top;
}

//----- (0073FD20) --------------------------------------------------------
int __cdecl lua_type(lua_State *L, int idx)
{
  CallInfo *v2; // esi@1
  lua_TValue *v3; // eax@2
  int result; // eax@3
  int v5; // eax@8
  GCObject *v6; // ecx@9
  int v7; // eax@12

  v2 = L->ci;
  if ( idx <= 0 )
  {
    if ( idx <= -1001000 )
    {
      if ( idx == -1001000 )
      {
        v3 = &L->l_G->l_registry;
      }
      else
      {
        v5 = -1001000 - idx;
        if ( v2->func->u.i.tt__ == 2146936086 )
          return -1;
        v6 = v2->func->u.i.v__.gc;
        if ( v5 > *(&v6->p.marked + 1) )
          return -1;
        v3 = (lua_TValue *)&(&v6->p.k)[v5];
      }
    }
    else
    {
      v3 = &L->top[idx];
    }
  }
  else
  {
    v3 = &v2->func[idx];
    if ( v3 >= L->top )
      return -1;
  }
  if ( v3 == &luaO_nilobject_ )
    return -1;
  v7 = v3->u.i.tt__;
  if ( (v7 & 0x7FFFFF00) == 2146936064 )
    result = v7 & 0xF;
  else
    result = 3;
  return result;
}

//----- (0073FDB0) --------------------------------------------------------
char *__cdecl lua_typename(lua_State *L, int t)
{
  return off_9D3290[t];
}
// 9D3290: using guessed type char *off_9D3290[11];

//----- (0073FDC0) --------------------------------------------------------
BOOL __cdecl lua_iscfunction(lua_State *L, int idx)
{
  CallInfo *v2; // edx@1
  lua_TValue *v3; // eax@2
  int v4; // eax@8
  GCObject *v5; // ecx@9
  int v6; // edx@9
  bool v7; // zf@9
  bool v8; // sf@9
  unsigned __int8 v9; // of@9
  int v10; // eax@11

  v2 = L->ci;
  if ( idx > 0 )
  {
    v3 = &v2->func[idx];
    if ( v3 < L->top )
      goto LABEL_11;
    goto LABEL_10;
  }
  if ( idx <= -1001000 )
  {
    if ( idx == -1001000 )
    {
      v3 = &L->l_G->l_registry;
    }
    else
    {
      v4 = -1001000 - idx;
      if ( v2->func->u.i.tt__ == 2146936086
        || (v5 = v2->func->u.i.v__.gc,
            v6 = *(&v5->p.marked + 1),
            v9 = __OFSUB__(v4, v6),
            v7 = v4 == v6,
            v8 = v4 - v6 < 0,
            v3 = (lua_TValue *)&(&v5->p.k)[v4],
            !((unsigned __int8)(v8 ^ v9) | v7)) )
      {
LABEL_10:
        v3 = &luaO_nilobject_;
        goto LABEL_11;
      }
    }
  }
  else
  {
    v3 = &L->top[idx];
  }
LABEL_11:
  v10 = v3->u.i.tt__;
  return v10 == 2146936086 || v10 == 2146936166;
}

//----- (0073FE40) --------------------------------------------------------
lua_TValue *__cdecl lua_isnumber(lua_State *L, int idx)
{
  CallInfo *v2; // esi@1
  lua_TValue *v3; // eax@2
  int v4; // eax@8
  GCObject *v5; // ecx@9
  int v6; // edx@9
  bool v7; // zf@9
  bool v8; // sf@9
  unsigned __int8 v9; // of@9
  lua_TValue *result; // eax@12
  lua_TValue n; // [sp+4h] [bp-8h]@12

  v2 = L->ci;
  if ( idx > 0 )
  {
    v3 = &v2->func[idx];
    if ( v3 < L->top )
      goto LABEL_11;
    goto LABEL_10;
  }
  if ( idx <= -1001000 )
  {
    if ( idx == -1001000 )
    {
      v3 = &L->l_G->l_registry;
    }
    else
    {
      v4 = -1001000 - idx;
      if ( v2->func->u.i.tt__ == 2146936086
        || (v5 = v2->func->u.i.v__.gc,
            v6 = *(&v5->p.marked + 1),
            v9 = __OFSUB__(v4, v6),
            v7 = v4 == v6,
            v8 = v4 - v6 < 0,
            v3 = (lua_TValue *)&(&v5->p.k)[v4],
            !((unsigned __int8)(v8 ^ v9) | v7)) )
      {
LABEL_10:
        v3 = &luaO_nilobject_;
        goto LABEL_11;
      }
    }
  }
  else
  {
    v3 = &L->top[idx];
  }
LABEL_11:
  if ( (v3->u.i.tt__ & 0x7FFFFF00) != 2146936064 || (result = luaV_tonumber(v3, &n)) != 0 )
    result = (lua_TValue *)1;
  return result;
}

//----- (0073FED0) --------------------------------------------------------
BOOL __cdecl lua_isstring(lua_State *L, int idx)
{
  int v2; // eax@1

  v2 = lua_type(L, idx);
  return v2 == 4 || v2 == 3;
}

//----- (0073FF00) --------------------------------------------------------
int __cdecl lua_rawequal(lua_State *L, int index1, int index2)
{
  CallInfo *v3; // esi@1
  lua_TValue *v4; // edi@3
  int v5; // ecx@8
  GCObject *v6; // eax@9
  int v7; // edi@9
  bool v8; // zf@9
  bool v9; // sf@9
  unsigned __int8 v10; // of@9
  lua_TValue *v11; // eax@12
  int v12; // eax@18
  GCObject *v13; // ecx@19
  int v14; // edx@19
  int v15; // edx@24
  int result; // eax@28

  v3 = L->ci;
  if ( index1 > 0 )
  {
    if ( &v3->func[index1] < L->top )
    {
      v4 = &v3->func[index1];
      goto LABEL_11;
    }
LABEL_10:
    v4 = &luaO_nilobject_;
    goto LABEL_11;
  }
  if ( index1 > -1001000 )
  {
    v4 = &L->top[index1];
    goto LABEL_11;
  }
  if ( index1 == -1001000 )
  {
    v4 = &L->l_G->l_registry;
    goto LABEL_11;
  }
  v5 = -1001000 - index1;
  if ( v3->func->u.i.tt__ == 2146936086 )
    goto LABEL_10;
  v6 = v3->func->u.i.v__.gc;
  v7 = *(&v6->p.marked + 1);
  v10 = __OFSUB__(v5, v7);
  v8 = v5 == v7;
  v9 = v5 - v7 < 0;
  v4 = (lua_TValue *)&(&v6->p.k)[v5];
  if ( !((unsigned __int8)(v9 ^ v10) | v8) )
    goto LABEL_10;
LABEL_11:
  if ( index2 <= 0 )
  {
    if ( index2 > -1001000 )
    {
      v11 = &L->top[index2];
      goto LABEL_21;
    }
    if ( index2 == -1001000 )
    {
      v11 = &L->l_G->l_registry;
      goto LABEL_21;
    }
    v12 = -1001000 - index2;
    if ( v3->func->u.i.tt__ != 2146936086 )
    {
      v13 = v3->func->u.i.v__.gc;
      v14 = *(&v13->p.marked + 1);
      v10 = __OFSUB__(v12, v14);
      v8 = v12 == v14;
      v9 = v12 - v14 < 0;
      v11 = (lua_TValue *)&(&v13->p.k)[v12];
      if ( (unsigned __int8)(v9 ^ v10) | v8 )
        goto LABEL_21;
    }
    goto LABEL_20;
  }
  v11 = &v3->func[index2];
  if ( v11 >= L->top )
LABEL_20:
    v11 = &luaO_nilobject_;
LABEL_21:
  result = 0;
  if ( v4 != &luaO_nilobject_ && v11 != &luaO_nilobject_ )
  {
    v15 = (v4->u.i.tt__ & 0x7FFFFF00) == 2146936064 ? (unsigned __int8)(v4->u.i.tt__ == v11->u.i.tt__) : (unsigned __int8)((v11->u.i.tt__ & 0x7FFFFF00) != 2146936064);
    if ( v15 && luaV_equalobj_(0, v4, v11) )
      result = 1;
  }
  return result;
}

//----- (00740020) --------------------------------------------------------
int __cdecl lua_compare(lua_State *L, int index1, int index2, int op)
{
  CallInfo *v4; // esi@1
  lua_TValue *v5; // edi@2
  int v6; // edx@8
  GCObject *v7; // ecx@9
  int v8; // edi@9
  bool v9; // zf@9
  bool v10; // sf@9
  unsigned __int8 v11; // of@9
  lua_TValue *v12; // ecx@12
  int v13; // ecx@18
  GCObject *v14; // edx@19
  int v15; // eax@19
  int v17; // edx@29

  v4 = L->ci;
  if ( index1 > 0 )
  {
    v5 = &v4->func[index1];
    if ( v5 < L->top )
      goto LABEL_11;
LABEL_10:
    v5 = &luaO_nilobject_;
    goto LABEL_11;
  }
  if ( index1 > -1001000 )
  {
    v5 = &L->top[index1];
    goto LABEL_11;
  }
  if ( index1 == -1001000 )
  {
    v5 = &L->l_G->l_registry;
    goto LABEL_11;
  }
  v6 = -1001000 - index1;
  if ( v4->func->u.i.tt__ == 2146936086 )
    goto LABEL_10;
  v7 = v4->func->u.i.v__.gc;
  v8 = *(&v7->p.marked + 1);
  v11 = __OFSUB__(v6, v8);
  v9 = v6 == v8;
  v10 = v6 - v8 < 0;
  v5 = (lua_TValue *)&(&v7->p.k)[v6];
  if ( !((unsigned __int8)(v10 ^ v11) | v9) )
    goto LABEL_10;
LABEL_11:
  if ( index2 > 0 )
  {
    v12 = &v4->func[index2];
    if ( v12 < L->top )
      goto LABEL_21;
    goto LABEL_20;
  }
  if ( index2 <= -1001000 )
  {
    if ( index2 == -1001000 )
    {
      v12 = &L->l_G->l_registry;
    }
    else
    {
      v13 = -1001000 - index2;
      if ( v4->func->u.i.tt__ == 2146936086
        || (v14 = v4->func->u.i.v__.gc,
            v15 = *(&v14->p.marked + 1),
            v11 = __OFSUB__(v13, v15),
            v9 = v13 == v15,
            v10 = v13 - v15 < 0,
            v12 = (lua_TValue *)&(&v14->p.k)[v13],
            !((unsigned __int8)(v10 ^ v11) | v9)) )
      {
LABEL_20:
        v12 = &luaO_nilobject_;
        goto LABEL_21;
      }
    }
  }
  else
  {
    v12 = &L->top[index2];
  }
LABEL_21:
  if ( v5 != &luaO_nilobject_ && v12 != &luaO_nilobject_ )
  {
    if ( op )
    {
      if ( op == 1 )
        return luaV_lessthan(L, v5, v12);
      if ( op == 2 )
        return luaV_lessequal(L, v5, v12);
    }
    else
    {
      if ( (v5->u.i.tt__ & 0x7FFFFF00) == 2146936064 )
        v17 = v5->u.i.tt__ == v12->u.i.tt__;
      else
        v17 = (v12->u.i.tt__ & 0x7FFFFF00) != 2146936064;
      if ( v17 && luaV_equalobj_(L, v5, v12) )
        return 1;
    }
  }
  return 0;
}

//----- (00740170) --------------------------------------------------------
double __cdecl lua_tonumberx(lua_State *L, int idx, int *isnum)
{
  CallInfo *v3; // esi@1
  lua_TValue *v4; // eax@2
  int v5; // eax@8
  GCObject *v6; // ecx@9
  int v7; // edx@9
  bool v8; // zf@9
  bool v9; // sf@9
  unsigned __int8 v10; // of@9
  double result; // st7@15
  lua_TValue n; // [sp+4h] [bp-8h]@12

  v3 = L->ci;
  if ( idx > 0 )
  {
    v4 = &v3->func[idx];
    if ( v4 < L->top )
      goto LABEL_11;
    goto LABEL_10;
  }
  if ( idx <= -1001000 )
  {
    if ( idx == -1001000 )
    {
      v4 = &L->l_G->l_registry;
    }
    else
    {
      v5 = -1001000 - idx;
      if ( v3->func->u.i.tt__ == 2146936086
        || (v6 = v3->func->u.i.v__.gc,
            v7 = *(&v6->p.marked + 1),
            v10 = __OFSUB__(v5, v7),
            v8 = v5 == v7,
            v9 = v5 - v7 < 0,
            v4 = (lua_TValue *)&(&v6->p.k)[v5],
            !((unsigned __int8)(v9 ^ v10) | v8)) )
      {
LABEL_10:
        v4 = &luaO_nilobject_;
        goto LABEL_11;
      }
    }
  }
  else
  {
    v4 = &L->top[idx];
  }
LABEL_11:
  if ( (v4->u.i.tt__ & 0x7FFFFF00) != 2146936064 || (v4 = luaV_tonumber(v4, &n)) != 0 )
  {
    if ( isnum )
      *isnum = 1;
    result = v4->u.d__;
  }
  else
  {
    if ( isnum )
      *isnum = 0;
    result = 0.0;
  }
  return result;
}

//----- (00740220) --------------------------------------------------------
int __cdecl lua_tointegerx(lua_State *L, int idx, int *isnum)
{
  CallInfo *v3; // esi@1
  lua_TValue *v4; // eax@2
  int v5; // eax@8
  GCObject *v6; // ecx@9
  int v7; // edx@9
  bool v8; // zf@9
  bool v9; // sf@9
  unsigned __int8 v10; // of@9
  int result; // eax@15
  lua_TValue n; // [sp+Ch] [bp-8h]@12
  int res; // [sp+1Ch] [bp+8h]@16

  v3 = L->ci;
  if ( idx > 0 )
  {
    v4 = &v3->func[idx];
    if ( v4 < L->top )
      goto LABEL_11;
    goto LABEL_10;
  }
  if ( idx <= -1001000 )
  {
    if ( idx == -1001000 )
    {
      v4 = &L->l_G->l_registry;
    }
    else
    {
      v5 = -1001000 - idx;
      if ( v3->func->u.i.tt__ == 2146936086
        || (v6 = v3->func->u.i.v__.gc,
            v7 = *(&v6->p.marked + 1),
            v10 = __OFSUB__(v5, v7),
            v8 = v5 == v7,
            v9 = v5 - v7 < 0,
            v4 = (lua_TValue *)&(&v6->p.k)[v5],
            !((unsigned __int8)(v9 ^ v10) | v8)) )
      {
LABEL_10:
        v4 = &luaO_nilobject_;
        goto LABEL_11;
      }
    }
  }
  else
  {
    v4 = &L->top[idx];
  }
LABEL_11:
  if ( (v4->u.i.tt__ & 0x7FFFFF00) != 2146936064 || (v4 = luaV_tonumber(v4, &n)) != 0 )
  {
    res = (signed int)v4->u.d__;
    if ( isnum )
      *isnum = 1;
    result = res;
  }
  else
  {
    if ( isnum )
      *isnum = 0;
    result = 0;
  }
  return result;
}

//----- (007402E0) --------------------------------------------------------
unsigned int __cdecl lua_tounsignedx(lua_State *L, int idx, int *isnum)
{
  CallInfo *v3; // esi@1
  lua_TValue *v4; // eax@2
  int v5; // eax@8
  GCObject *v6; // ecx@9
  int v7; // edx@9
  bool v8; // zf@9
  bool v9; // sf@9
  unsigned __int8 v10; // of@9
  unsigned int result; // eax@15
  __int64 l; // [sp+Ch] [bp-10h]@16
  lua_TValue n; // [sp+14h] [bp-8h]@12

  v3 = L->ci;
  if ( idx > 0 )
  {
    v4 = &v3->func[idx];
    if ( v4 < L->top )
      goto LABEL_11;
    goto LABEL_10;
  }
  if ( idx <= -1001000 )
  {
    if ( idx == -1001000 )
    {
      v4 = &L->l_G->l_registry;
    }
    else
    {
      v5 = -1001000 - idx;
      if ( v3->func->u.i.tt__ == 2146936086
        || (v6 = v3->func->u.i.v__.gc,
            v7 = *(&v6->p.marked + 1),
            v10 = __OFSUB__(v5, v7),
            v8 = v5 == v7,
            v9 = v5 - v7 < 0,
            v4 = (lua_TValue *)&(&v6->p.k)[v5],
            !((unsigned __int8)(v9 ^ v10) | v8)) )
      {
LABEL_10:
        v4 = &luaO_nilobject_;
        goto LABEL_11;
      }
    }
  }
  else
  {
    v4 = &L->top[idx];
  }
LABEL_11:
  if ( (v4->u.i.tt__ & 0x7FFFFF00) != 2146936064 || (v4 = luaV_tonumber(v4, &n)) != 0 )
  {
    l = (signed __int64)v4->u.d__;
    if ( isnum )
      *isnum = 1;
    result = l;
  }
  else
  {
    if ( isnum )
      *isnum = 0;
    result = 0;
  }
  return result;
}

//----- (007403A0) --------------------------------------------------------
BOOL __cdecl lua_toboolean(lua_State *L, int idx)
{
  CallInfo *v2; // esi@1
  lua_TValue *v3; // eax@2
  int v4; // eax@8
  GCObject *v5; // ecx@9
  int v6; // edx@9
  bool v7; // zf@9
  bool v8; // sf@9
  unsigned __int8 v9; // of@9
  int v10; // ecx@11

  v2 = L->ci;
  if ( idx > 0 )
  {
    v3 = &v2->func[idx];
    if ( v3 < L->top )
      goto LABEL_11;
    goto LABEL_10;
  }
  if ( idx <= -1001000 )
  {
    if ( idx == -1001000 )
    {
      v3 = &L->l_G->l_registry;
    }
    else
    {
      v4 = -1001000 - idx;
      if ( v2->func->u.i.tt__ == 2146936086
        || (v5 = v2->func->u.i.v__.gc,
            v6 = *(&v5->p.marked + 1),
            v9 = __OFSUB__(v4, v6),
            v7 = v4 == v6,
            v8 = v4 - v6 < 0,
            v3 = (lua_TValue *)&(&v5->p.k)[v4],
            !((unsigned __int8)(v8 ^ v9) | v7)) )
      {
LABEL_10:
        v3 = &luaO_nilobject_;
        goto LABEL_11;
      }
    }
  }
  else
  {
    v3 = &L->top[idx];
  }
LABEL_11:
  v10 = v3->u.i.tt__;
  return v10 != 2146936064 && (v10 != 2146936065 || v3->u.i.v__.b);
}

//----- (00740420) --------------------------------------------------------
const char *__cdecl lua_tolstring(lua_State *L, int idx, unsigned int *len)
{
  CallInfo *v3; // ecx@1
  lua_TValue *v4; // eax@2
  lua_TValue *v5; // ecx@8
  int v6; // eax@8
  int v7; // ecx@9
  int v8; // edx@9
  bool v9; // zf@9
  bool v10; // sf@9
  unsigned __int8 v11; // of@9

  v3 = L->ci;
  if ( idx > 0 )
  {
    v4 = &v3->func[idx];
    if ( v4 < L->top )
      goto LABEL_11;
LABEL_10:
    v4 = &luaO_nilobject_;
    goto LABEL_11;
  }
  if ( idx > -1001000 )
  {
    v4 = &L->top[idx];
    goto LABEL_11;
  }
  if ( idx == -1001000 )
  {
    v4 = &L->l_G->l_registry;
    goto LABEL_11;
  }
  v5 = v3->func;
  v6 = -1001000 - idx;
  if ( v5->u.i.tt__ == 2146936086 )
    goto LABEL_10;
  v7 = v5->u.i.v__.b;
  v8 = *(_BYTE *)(v7 + 6);
  v11 = __OFSUB__(v6, v8);
  v9 = v6 == v8;
  v10 = v6 - v8 < 0;
  v4 = (lua_TValue *)(v7 + 8 * v6 + 8);
  if ( !((unsigned __int8)(v10 ^ v11) | v9) )
    goto LABEL_10;
LABEL_11:
  if ( (v4->u.i.tt__ | 0x70) != 2146936180 )
  {
    if ( !luaV_tostring(L, v4) )
    {
      if ( len )
        *len = 0;
      return 0;
    }
    if ( L->l_G->GCdebt > 0 )
      luaC_step(L);
    v4 = index2addr(L, idx);
  }
  if ( len )
    *len = *(_DWORD *)(v4->u.i.v__.b + 12);
  return (const char *)(v4->u.i.v__.b + 16);
}

//----- (007404E0) --------------------------------------------------------
unsigned int __cdecl lua_rawlen(lua_State *L, int idx)
{
  CallInfo *v2; // esi@1
  lua_TValue *v3; // eax@2
  int v4; // eax@8
  GCObject *v5; // ecx@9
  int v6; // edx@9
  bool v7; // zf@9
  bool v8; // sf@9
  unsigned __int8 v9; // of@9
  int v10; // ecx@11
  int v11; // ecx@13
  int v12; // ecx@14
  unsigned int result; // eax@16

  v2 = L->ci;
  if ( idx > 0 )
  {
    v3 = &v2->func[idx];
    if ( v3 < L->top )
      goto LABEL_11;
LABEL_10:
    v3 = &luaO_nilobject_;
    goto LABEL_11;
  }
  if ( idx > -1001000 )
  {
    v3 = &L->top[idx];
    goto LABEL_11;
  }
  if ( idx == -1001000 )
  {
    v3 = &L->l_G->l_registry;
    goto LABEL_11;
  }
  v4 = -1001000 - idx;
  if ( v2->func->u.i.tt__ == 2146936086 )
    goto LABEL_10;
  v5 = v2->func->u.i.v__.gc;
  v6 = *(&v5->p.marked + 1);
  v9 = __OFSUB__(v4, v6);
  v7 = v4 == v6;
  v8 = v4 - v6 < 0;
  v3 = (lua_TValue *)&(&v5->p.k)[v4];
  if ( !((unsigned __int8)(v8 ^ v9) | v7) )
    goto LABEL_10;
LABEL_11:
  v10 = v3->u.i.tt__;
  if ( (v3->u.i.tt__ & 0x7FFFFF00) != 2146936064 )
    LOBYTE(v10) = 3;
  v11 = (v10 & 0xF) - 4;
  if ( v11 )
  {
    v12 = v11 - 1;
    if ( v12 )
    {
      if ( v12 == 2 )
        result = *(_DWORD *)(v3->u.i.v__.b + 16);
      else
        result = 0;
    }
    else
    {
      result = luaH_getn((Table *)v3->u.i.v__.gc);
    }
  }
  else
  {
    result = *(_DWORD *)(v3->u.i.v__.b + 12);
  }
  return result;
}

//----- (00740590) --------------------------------------------------------
void *__cdecl lua_touserdata(lua_State *L, int idx)
{
  CallInfo *v2; // esi@1
  lua_TValue *v3; // eax@2
  int v4; // eax@8
  GCObject *v5; // ecx@9
  int v6; // edx@9
  bool v7; // zf@9
  bool v8; // sf@9
  unsigned __int8 v9; // of@9
  int v10; // ecx@11
  int v11; // ecx@13
  void *result; // eax@15

  v2 = L->ci;
  if ( idx > 0 )
  {
    v3 = &v2->func[idx];
    if ( v3 < L->top )
      goto LABEL_11;
LABEL_10:
    v3 = &luaO_nilobject_;
    goto LABEL_11;
  }
  if ( idx > -1001000 )
  {
    v3 = &L->top[idx];
    goto LABEL_11;
  }
  if ( idx == -1001000 )
  {
    v3 = &L->l_G->l_registry;
    goto LABEL_11;
  }
  v4 = -1001000 - idx;
  if ( v2->func->u.i.tt__ == 2146936086 )
    goto LABEL_10;
  v5 = v2->func->u.i.v__.gc;
  v6 = *(&v5->p.marked + 1);
  v9 = __OFSUB__(v4, v6);
  v7 = v4 == v6;
  v8 = v4 - v6 < 0;
  v3 = (lua_TValue *)&(&v5->p.k)[v4];
  if ( !((unsigned __int8)(v8 ^ v9) | v7) )
    goto LABEL_10;
LABEL_11:
  v10 = v3->u.i.tt__;
  if ( (v3->u.i.tt__ & 0x7FFFFF00) != 2146936064 )
    LOBYTE(v10) = 3;
  v11 = (v10 & 0xF) - 2;
  if ( v11 )
  {
    if ( v11 == 5 )
      result = (void *)(v3->u.i.v__.b + 24);
    else
      result = 0;
  }
  else
  {
    result = (void *)v3->u.i.v__.b;
  }
  return result;
}

//----- (00740630) --------------------------------------------------------
lua_State *__cdecl lua_tothread(lua_State *L, int idx)
{
  CallInfo *v2; // esi@1
  lua_TValue *v3; // eax@2
  int v4; // eax@8
  GCObject *v5; // ecx@9
  int v6; // edx@9
  bool v7; // zf@9
  bool v8; // sf@9
  unsigned __int8 v9; // of@9
  lua_State *result; // eax@12

  v2 = L->ci;
  if ( idx <= 0 )
  {
    if ( idx > -1001000 )
    {
      v3 = &L->top[idx];
      goto LABEL_11;
    }
    if ( idx == -1001000 )
    {
      v3 = &L->l_G->l_registry;
      goto LABEL_11;
    }
    v4 = -1001000 - idx;
    if ( v2->func->u.i.tt__ != 2146936086 )
    {
      v5 = v2->func->u.i.v__.gc;
      v6 = *(&v5->p.marked + 1);
      v9 = __OFSUB__(v4, v6);
      v7 = v4 == v6;
      v8 = v4 - v6 < 0;
      v3 = (lua_TValue *)&(&v5->p.k)[v4];
      if ( (unsigned __int8)(v8 ^ v9) | v7 )
        goto LABEL_11;
    }
    goto LABEL_10;
  }
  v3 = &v2->func[idx];
  if ( v3 >= L->top )
LABEL_10:
    v3 = &luaO_nilobject_;
LABEL_11:
  if ( v3->u.i.tt__ == 2146936136 )
    result = (lua_State *)v3->u.i.v__.b;
  else
    result = 0;
  return result;
}

//----- (007406A0) --------------------------------------------------------
void *__cdecl lua_topointer(lua_State *L, int idx)
{
  CallInfo *v2; // ecx@1
  lua_TValue *v3; // eax@2
  lua_TValue *v4; // ecx@8
  int v5; // eax@8
  int v6; // ecx@9
  int v7; // edi@9
  bool v8; // zf@9
  bool v9; // sf@9
  unsigned __int8 v10; // of@9
  int v11; // ecx@11
  void *result; // eax@14

  v2 = L->ci;
  if ( idx > 0 )
  {
    v3 = &v2->func[idx];
    if ( v3 < L->top )
      goto LABEL_11;
LABEL_10:
    v3 = &luaO_nilobject_;
    goto LABEL_11;
  }
  if ( idx > -1001000 )
  {
    v3 = &L->top[idx];
    goto LABEL_11;
  }
  if ( idx == -1001000 )
  {
    v3 = &L->l_G->l_registry;
    goto LABEL_11;
  }
  v4 = v2->func;
  v5 = -1001000 - idx;
  if ( v4->u.i.tt__ == 2146936086 )
    goto LABEL_10;
  v6 = v4->u.i.v__.b;
  v7 = *(_BYTE *)(v6 + 6);
  v10 = __OFSUB__(v5, v7);
  v8 = v5 == v7;
  v9 = v5 - v7 < 0;
  v3 = (lua_TValue *)(v6 + 8 * v5 + 8);
  if ( !((unsigned __int8)(v9 ^ v10) | v8) )
    goto LABEL_10;
LABEL_11:
  v11 = v3->u.i.tt__;
  if ( (v3->u.i.tt__ & 0x7FFFFF00) != 2146936064 )
    LOBYTE(v11) = 3;
  switch ( v11 & 0x3F )
  {
    case 5:
    case 6:
    case 8:
    case 0x16:
    case 0x26:
      result = (void *)v3->u.i.v__.b;
      break;
    case 2:
    case 7:
      result = lua_touserdata(L, idx);
      break;
    default:
      result = 0;
      break;
  }
  return result;
}

//----- (00740790) --------------------------------------------------------
void __cdecl lua_pushnil(lua_State *L)
{
  L->top->u.i.tt__ = 2146936064;
  ++L->top;
}

//----- (007407B0) --------------------------------------------------------
void __cdecl lua_pushnumber(lua_State *L, long double n)
{
  lua_TValue *v2; // eax@1

  v2 = L->top;
  v2->u.d__ = n;
  if ( (v2->u.i.tt__ & 0x7FFFFF00) == 2146936064 )
    luaG_runerror(L, "C API - attempt to push a signaling NaN");
  L->top = v2 + 1;
}

//----- (007407F0) --------------------------------------------------------
void __cdecl lua_pushinteger(lua_State *L, int n)
{
  lua_TValue *v2; // eax@1

  v2 = L->top + 1;
  v2[-1].u.d__ = (double)n;
  L->top = v2;
}

//----- (00740810) --------------------------------------------------------
void __cdecl lua_pushunsigned(lua_State *L, unsigned int u)
{
  lua_TValue *v2; // eax@2
  lua_TValue *v3; // eax@3

  if ( u > 0x7FFFFFFF )
  {
    v3 = L->top;
    v3->u.d__ = (double)u;
    L->top = v3 + 1;
  }
  else
  {
    v2 = L->top + 1;
    v2[-1].u.d__ = (double)(signed int)u;
    L->top = v2;
  }
}

//----- (00740860) --------------------------------------------------------
const char *__cdecl lua_pushlstring(lua_State *L, const char *s, unsigned int len)
{
  GCObject *v3; // eax@3
  lua_TValue *v4; // ecx@3

  if ( L->l_G->GCdebt > 0 )
    luaC_step(L);
  v3 = luaS_newlstr(L, s, len);
  v4 = L->top;
  v4->u.i.v__.b = (int)v3;
  v4->u.i.tt__ = v3->cl.c.tt | 0x7FF7A540;
  ++L->top;
  return (const char *)&v3->u.uv.len;
}

//----- (007408B0) --------------------------------------------------------
const char *__cdecl lua_pushstring(lua_State *L, const char *s)
{
  const char *result; // eax@2
  GCObject *v3; // eax@5
  lua_TValue *v4; // ecx@5

  if ( s )
  {
    if ( L->l_G->GCdebt > 0 )
      luaC_step(L);
    v3 = luaS_new(L, s);
    v4 = L->top;
    v4->u.i.v__.b = (int)v3;
    v4->u.i.tt__ = v3->cl.c.tt | 0x7FF7A540;
    ++L->top;
    result = (const char *)&v3->u.uv.len;
  }
  else
  {
    L->top->u.i.tt__ = 2146936064;
    ++L->top;
    result = 0;
  }
  return result;
}

//----- (00740910) --------------------------------------------------------
const char *__cdecl lua_pushvfstring(lua_State *L, const char *fmt, char *argp)
{
  if ( L->l_G->GCdebt > 0 )
    luaC_step(L);
  return luaO_pushvfstring(L, fmt, argp);
}

//----- (00740940) --------------------------------------------------------
const char *lua_pushfstring(lua_State *L, const char *fmt, ...)
{
  va_list va; // [sp+14h] [bp+10h]@1

  va_start(va, fmt);
  if ( L->l_G->GCdebt > 0 )
    luaC_step(L);
  return luaO_pushvfstring(L, fmt, va);
}

//----- (00740970) --------------------------------------------------------
void __cdecl lua_pushcclosure(lua_State *L, int (__cdecl *fn)(lua_State *), int n)
{
  int v3; // esi@1
  lua_TValue *v4; // ecx@2
  GCObject *v5; // eax@5
  lua_TValue *v6; // ecx@6
  GCObject *v7; // edx@6
  lua_TValue *v8; // ecx@7

  v3 = n;
  if ( n )
  {
    if ( L->l_G->GCdebt > 0 )
      luaC_step(L);
    v5 = luaF_newCclosure(L, n);
    v5->p.code = (unsigned int *)fn;
    L->top -= n;
    do
    {
      v6 = L->top;
      v7 = v6[v3-- - 1].u.i.v__.gc;
      *((_DWORD *)&v5->p.p + 2 * v3) = v7;
      *((_DWORD *)&v5->p.lineinfo + 2 * v3) = v6[v3].u.i.tt__;
    }
    while ( v3 );
    v8 = L->top;
    v8->u.i.v__.b = (int)v5;
    v8->u.i.tt__ = 2146936166;
    ++L->top;
  }
  else
  {
    v4 = L->top;
    v4->u.i.v__.b = (int)fn;
    v4->u.i.tt__ = 2146936086;
    ++L->top;
  }
}

//----- (00740A00) --------------------------------------------------------
void __cdecl lua_pushboolean(lua_State *L, int b)
{
  lua_TValue *v2; // ecx@1

  v2 = L->top;
  v2->u.i.tt__ = 2146936065;
  v2->u.i.v__.b = b != 0;
  ++L->top;
}

//----- (00740A20) --------------------------------------------------------
void __cdecl lua_pushlightuserdata(lua_State *L, void *p)
{
  lua_TValue *v2; // ecx@1

  v2 = L->top;
  v2->u.i.v__.b = (int)p;
  v2->u.i.tt__ = 2146936066;
  ++L->top;
}

//----- (00740A40) --------------------------------------------------------
BOOL __cdecl lua_pushthread(lua_State *L)
{
  lua_TValue *v1; // ecx@1
  global_State *v2; // ecx@1

  v1 = L->top;
  v1->u.i.v__.b = (int)L;
  v1->u.i.tt__ = 2146936136;
  v2 = L->l_G;
  ++L->top;
  return v2->mainthread == L;
}

//----- (00740A70) --------------------------------------------------------
void __cdecl lua_getglobal(lua_State *L, const char *var)
{
  Node *v2; // eax@1
  lua_TValue *v3; // edi@1
  lua_TValue *v4; // ebx@1
  GCObject *v5; // eax@1

  v2 = luaH_getint((Table *)L->l_G->l_registry.u.i.v__.gc, 2);
  v3 = L->top;
  v4 = (lua_TValue *)v2;
  L->top = v3 + 1;
  v5 = luaS_new(L, var);
  v3->u.i.v__.b = (int)v5;
  v3->u.i.tt__ = v5->cl.c.tt | 0x7FF7A540;
  luaV_gettable(L, v4, L->top - 1, L->top - 1);
}

//----- (00740AD0) --------------------------------------------------------
void __cdecl lua_gettable(lua_State *L, int idx)
{
  CallInfo *v2; // esi@1
  lua_TValue *v3; // eax@2
  int v4; // eax@8
  GCObject *v5; // ecx@9
  int v6; // esi@9
  bool v7; // zf@9
  bool v8; // sf@9
  unsigned __int8 v9; // of@9

  v2 = L->ci;
  if ( idx > 0 )
  {
    v3 = &v2->func[idx];
    if ( v3 < L->top )
      goto LABEL_11;
    goto LABEL_10;
  }
  if ( idx <= -1001000 )
  {
    if ( idx == -1001000 )
    {
      v3 = &L->l_G->l_registry;
    }
    else
    {
      v4 = -1001000 - idx;
      if ( v2->func->u.i.tt__ == 2146936086
        || (v5 = v2->func->u.i.v__.gc,
            v6 = *(&v5->p.marked + 1),
            v9 = __OFSUB__(v4, v6),
            v7 = v4 == v6,
            v8 = v4 - v6 < 0,
            v3 = (lua_TValue *)&(&v5->p.k)[v4],
            !((unsigned __int8)(v8 ^ v9) | v7)) )
      {
LABEL_10:
        v3 = &luaO_nilobject_;
        goto LABEL_11;
      }
    }
  }
  else
  {
    v3 = &L->top[idx];
  }
LABEL_11:
  luaV_gettable(L, v3, L->top - 1, L->top - 1);
}

//----- (00740B50) --------------------------------------------------------
void __cdecl lua_getfield(lua_State *L, int idx, const char *k)
{
  CallInfo *v3; // edx@1
  lua_TValue *v4; // edi@2
  int v5; // eax@8
  GCObject *v6; // ecx@9
  lua_TValue *v7; // ebx@11
  GCObject *v8; // eax@11

  v3 = L->ci;
  if ( idx > 0 )
  {
    v4 = &v3->func[idx];
    if ( v4 < L->top )
      goto LABEL_11;
    goto LABEL_10;
  }
  if ( idx <= -1001000 )
  {
    if ( idx == -1001000 )
    {
      v4 = &L->l_G->l_registry;
    }
    else
    {
      v5 = -1001000 - idx;
      if ( v3->func->u.i.tt__ == 2146936086
        || (v6 = v3->func->u.i.v__.gc, v4 = (lua_TValue *)&(&v6->p.k)[v5], v5 > *(&v6->p.marked + 1)) )
      {
LABEL_10:
        v4 = &luaO_nilobject_;
        goto LABEL_11;
      }
    }
  }
  else
  {
    v4 = &L->top[idx];
  }
LABEL_11:
  v7 = L->top;
  v8 = luaS_new(L, k);
  v7->u.i.v__.b = (int)v8;
  v7->u.i.tt__ = v8->cl.c.tt | 0x7FF7A540;
  ++L->top;
  luaV_gettable(L, v4, L->top - 1, L->top - 1);
}

//----- (00740BF0) --------------------------------------------------------
void __cdecl lua_rawget(lua_State *L, int idx)
{
  CallInfo *v2; // edx@1
  lua_TValue *v3; // eax@2
  int v4; // eax@8
  GCObject *v5; // ecx@9
  int v6; // edx@9
  bool v7; // zf@9
  bool v8; // sf@9
  unsigned __int8 v9; // of@9
  Node *v10; // eax@11
  lua_TValue *v11; // ecx@11

  v2 = L->ci;
  if ( idx > 0 )
  {
    v3 = &v2->func[idx];
    if ( v3 < L->top )
      goto LABEL_11;
    goto LABEL_10;
  }
  if ( idx <= -1001000 )
  {
    if ( idx == -1001000 )
    {
      v3 = &L->l_G->l_registry;
    }
    else
    {
      v4 = -1001000 - idx;
      if ( v2->func->u.i.tt__ == 2146936086
        || (v5 = v2->func->u.i.v__.gc,
            v6 = *(&v5->p.marked + 1),
            v9 = __OFSUB__(v4, v6),
            v7 = v4 == v6,
            v8 = v4 - v6 < 0,
            v3 = (lua_TValue *)&(&v5->p.k)[v4],
            !((unsigned __int8)(v8 ^ v9) | v7)) )
      {
LABEL_10:
        v3 = &luaO_nilobject_;
        goto LABEL_11;
      }
    }
  }
  else
  {
    v3 = &L->top[idx];
  }
LABEL_11:
  v10 = luaH_get((Table *)v3->u.i.v__.gc, L->top - 1);
  v11 = L->top;
  v11[-1].u.i.v__.b = v10->i_val.u.i.v__.b;
  v11[-1].u.i.tt__ = v10->i_val.u.i.tt__;
}

//----- (00740C70) --------------------------------------------------------
void __cdecl lua_rawgeti(lua_State *L, int idx, int n)
{
  CallInfo *v3; // edx@1
  lua_TValue *v4; // eax@2
  int v5; // eax@8
  GCObject *v6; // ecx@9
  int v7; // edx@9
  bool v8; // zf@9
  bool v9; // sf@9
  unsigned __int8 v10; // of@9
  Node *v11; // eax@11
  lua_TValue *v12; // ecx@11

  v3 = L->ci;
  if ( idx > 0 )
  {
    v4 = &v3->func[idx];
    if ( v4 < L->top )
      goto LABEL_11;
    goto LABEL_10;
  }
  if ( idx <= -1001000 )
  {
    if ( idx == -1001000 )
    {
      v4 = &L->l_G->l_registry;
    }
    else
    {
      v5 = -1001000 - idx;
      if ( v3->func->u.i.tt__ == 2146936086
        || (v6 = v3->func->u.i.v__.gc,
            v7 = *(&v6->p.marked + 1),
            v10 = __OFSUB__(v5, v7),
            v8 = v5 == v7,
            v9 = v5 - v7 < 0,
            v4 = (lua_TValue *)&(&v6->p.k)[v5],
            !((unsigned __int8)(v9 ^ v10) | v8)) )
      {
LABEL_10:
        v4 = &luaO_nilobject_;
        goto LABEL_11;
      }
    }
  }
  else
  {
    v4 = &L->top[idx];
  }
LABEL_11:
  v11 = luaH_getint((Table *)v4->u.i.v__.gc, n);
  v12 = L->top;
  v12->u.i.v__.b = v11->i_val.u.i.v__.b;
  v12->u.i.tt__ = v11->i_val.u.i.tt__;
  ++L->top;
}

//----- (00740CF0) --------------------------------------------------------
void __cdecl lua_createtable(lua_State *L, int narray, int nrec)
{
  GCObject *v3; // eax@3
  lua_TValue *v4; // ecx@3

  if ( L->l_G->GCdebt > 0 )
    luaC_step(L);
  v3 = luaH_new(L);
  v4 = L->top;
  v4->u.i.v__.b = (int)v3;
  v4->u.i.tt__ = 2146936133;
  ++L->top;
  if ( narray > 0 || nrec > 0 )
    luaH_resize(L, (Table *)v3, narray, nrec);
}

//----- (00740D40) --------------------------------------------------------
int __cdecl lua_getmetatable(lua_State *L, int objindex)
{
  CallInfo *v2; // edx@1
  lua_TValue *v3; // eax@2
  int v4; // eax@8
  GCObject *v5; // ecx@9
  int v6; // edx@9
  bool v7; // zf@9
  bool v8; // sf@9
  unsigned __int8 v9; // of@9
  int v10; // edx@11
  char v11; // cl@12
  int v12; // ecx@14
  Table *v13; // edx@17
  int result; // eax@22
  lua_TValue *v15; // eax@23

  v2 = L->ci;
  if ( objindex <= 0 )
  {
    if ( objindex > -1001000 )
    {
      v3 = &L->top[objindex];
      goto LABEL_11;
    }
    if ( objindex == -1001000 )
    {
      v3 = &L->l_G->l_registry;
      goto LABEL_11;
    }
    v4 = -1001000 - objindex;
    if ( v2->func->u.i.tt__ != 2146936086 )
    {
      v5 = v2->func->u.i.v__.gc;
      v6 = *(&v5->p.marked + 1);
      v9 = __OFSUB__(v4, v6);
      v7 = v4 == v6;
      v8 = v4 - v6 < 0;
      v3 = (lua_TValue *)&(&v5->p.k)[v4];
      if ( (unsigned __int8)(v8 ^ v9) | v7 )
        goto LABEL_11;
    }
    goto LABEL_10;
  }
  v3 = &v2->func[objindex];
  if ( v3 >= L->top )
LABEL_10:
    v3 = &luaO_nilobject_;
LABEL_11:
  v10 = v3->u.i.tt__;
  if ( (v10 & 0x7FFFFF00) == 2146936064 )
    v11 = v3->u.i.tt__;
  else
    v11 = 3;
  v12 = (v11 & 0xF) - 5;
  if ( v12 )
  {
    if ( v12 == 2 )
    {
      v13 = *(Table **)(v3->u.i.v__.b + 8);
    }
    else if ( (v10 & 0x7FFFFF00) == 2146936064 )
    {
      v13 = L->l_G->mt[v3->u.i.tt__ & 0xF];
    }
    else
    {
      v13 = L->l_G->mt[3];
    }
  }
  else
  {
    v13 = *(Table **)(v3->u.i.v__.b + 8);
  }
  if ( v13 )
  {
    v15 = L->top;
    v15->u.i.v__.b = (int)v13;
    v15->u.i.tt__ = 2146936133;
    ++L->top;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00740E30) --------------------------------------------------------
void __cdecl lua_getuservalue(lua_State *L, int idx)
{
  CallInfo *v2; // esi@1
  lua_TValue *v3; // eax@2
  int v4; // eax@8
  GCObject *v5; // ecx@9
  int v6; // esi@9
  bool v7; // zf@9
  bool v8; // sf@9
  unsigned __int8 v9; // of@9
  int v10; // ecx@11
  lua_TValue *v11; // eax@11

  v2 = L->ci;
  if ( idx <= 0 )
  {
    if ( idx > -1001000 )
    {
      v3 = &L->top[idx];
      goto LABEL_11;
    }
    if ( idx == -1001000 )
    {
      v3 = &L->l_G->l_registry;
      goto LABEL_11;
    }
    v4 = -1001000 - idx;
    if ( v2->func->u.i.tt__ != 2146936086 )
    {
      v5 = v2->func->u.i.v__.gc;
      v6 = *(&v5->p.marked + 1);
      v9 = __OFSUB__(v4, v6);
      v7 = v4 == v6;
      v8 = v4 - v6 < 0;
      v3 = (lua_TValue *)&(&v5->p.k)[v4];
      if ( (unsigned __int8)(v8 ^ v9) | v7 )
        goto LABEL_11;
    }
    goto LABEL_10;
  }
  v3 = &v2->func[idx];
  if ( v3 >= L->top )
LABEL_10:
    v3 = &luaO_nilobject_;
LABEL_11:
  v10 = *(_DWORD *)(v3->u.i.v__.b + 12);
  v11 = L->top;
  if ( v10 )
  {
    v11->u.i.v__.b = v10;
    v11->u.i.tt__ = 2146936133;
    ++L->top;
  }
  else
  {
    v11->u.i.tt__ = 2146936064;
    ++L->top;
  }
}

//----- (00740EC0) --------------------------------------------------------
void __cdecl lua_setglobal(lua_State *L, const char *var)
{
  lua_State *v2; // esi@1
  Node *v3; // eax@1
  lua_TValue *v4; // edi@1
  lua_TValue *v5; // ebx@1
  GCObject *v6; // eax@1

  v2 = L;
  v3 = luaH_getint((Table *)L->l_G->l_registry.u.i.v__.gc, 2);
  v4 = L->top;
  v5 = (lua_TValue *)v3;
  L->top = v4 + 1;
  v6 = luaS_new(L, var);
  v4->u.i.v__.b = (int)v6;
  v4->u.i.tt__ = v6->cl.c.tt | 0x7FF7A540;
  luaV_settable(v2, v5, v2->top - 1, v2->top - 2);
  v2->top -= 2;
}

//----- (00740F20) --------------------------------------------------------
void __cdecl lua_setfield(lua_State *L, int idx, const char *k)
{
  CallInfo *v3; // edx@1
  lua_TValue *v4; // edi@2
  int v5; // eax@8
  GCObject *v6; // ecx@9
  lua_TValue *v7; // ebx@11
  GCObject *v8; // eax@11

  v3 = L->ci;
  if ( idx > 0 )
  {
    v4 = &v3->func[idx];
    if ( v4 < L->top )
      goto LABEL_11;
    goto LABEL_10;
  }
  if ( idx <= -1001000 )
  {
    if ( idx == -1001000 )
    {
      v4 = &L->l_G->l_registry;
    }
    else
    {
      v5 = -1001000 - idx;
      if ( v3->func->u.i.tt__ == 2146936086
        || (v6 = v3->func->u.i.v__.gc, v4 = (lua_TValue *)&(&v6->p.k)[v5], v5 > *(&v6->p.marked + 1)) )
      {
LABEL_10:
        v4 = &luaO_nilobject_;
        goto LABEL_11;
      }
    }
  }
  else
  {
    v4 = &L->top[idx];
  }
LABEL_11:
  v7 = L->top;
  L->top = v7 + 1;
  v8 = luaS_new(L, k);
  v7->u.i.v__.b = (int)v8;
  v7->u.i.tt__ = v8->cl.c.tt | 0x7FF7A540;
  luaV_settable(L, v4, L->top - 1, L->top - 2);
  L->top -= 2;
}

//----- (00740FC0) --------------------------------------------------------
void __cdecl lua_rawset(lua_State *L, int idx)
{
  CallInfo *v2; // edx@1
  lua_TValue *v3; // ebx@2
  int v4; // eax@8
  GCObject *v5; // ecx@9
  lua_TValue *v6; // edi@11
  Node *v7; // eax@11
  lua_TValue *v8; // ecx@11
  int v9; // eax@11
  GCObject *v10; // ebx@15

  v2 = L->ci;
  if ( idx > 0 )
  {
    v3 = &v2->func[idx];
    if ( v3 < L->top )
      goto LABEL_11;
LABEL_10:
    v3 = &luaO_nilobject_;
    goto LABEL_11;
  }
  if ( idx > -1001000 )
  {
    v3 = &L->top[idx];
    goto LABEL_11;
  }
  if ( idx == -1001000 )
  {
    v3 = &L->l_G->l_registry;
    goto LABEL_11;
  }
  v4 = -1001000 - idx;
  if ( v2->func->u.i.tt__ == 2146936086 )
    goto LABEL_10;
  v5 = v2->func->u.i.v__.gc;
  v3 = (lua_TValue *)&(&v5->p.k)[v4];
  if ( v4 > *(&v5->p.marked + 1) )
    goto LABEL_10;
LABEL_11:
  v6 = L->top;
  v7 = luaH_set(L, (Table *)v3->u.i.v__.gc, v6 - 2);
  v7->i_val.u.i.v__.b = v6[-1].u.i.v__.b;
  v7->i_val.u.i.tt__ = v6[-1].u.i.tt__;
  *(_BYTE *)(v3->u.i.v__.b + 6) = 0;
  v8 = L->top;
  v9 = v8[-1].u.i.tt__;
  if ( (v8[-1].u.i.tt__ & 0x7FFFFF00) != 2146936064 )
    LOBYTE(v9) = 3;
  if ( v9 & 0x40 )
  {
    if ( *(_BYTE *)(v8[-1].u.i.v__.b + 5) & 3 )
    {
      v10 = (GCObject *)v3->u.i.v__.b;
      if ( v10->h.marked & 4 )
        luaC_barrierback_(L, v10);
    }
  }
  L->top -= 2;
}

//----- (00741090) --------------------------------------------------------
void __cdecl lua_rawseti(lua_State *L, int idx, int n)
{
  CallInfo *v3; // edx@1
  lua_TValue *v4; // edi@2
  int v5; // eax@8
  GCObject *v6; // ecx@9
  lua_TValue *v7; // ecx@11
  int v8; // eax@11
  GCObject *v9; // edi@15

  v3 = L->ci;
  if ( idx > 0 )
  {
    v4 = &v3->func[idx];
    if ( v4 < L->top )
      goto LABEL_11;
LABEL_10:
    v4 = &luaO_nilobject_;
    goto LABEL_11;
  }
  if ( idx > -1001000 )
  {
    v4 = &L->top[idx];
    goto LABEL_11;
  }
  if ( idx == -1001000 )
  {
    v4 = &L->l_G->l_registry;
    goto LABEL_11;
  }
  v5 = -1001000 - idx;
  if ( v3->func->u.i.tt__ == 2146936086 )
    goto LABEL_10;
  v6 = v3->func->u.i.v__.gc;
  v4 = (lua_TValue *)&(&v6->p.k)[v5];
  if ( v5 > *(&v6->p.marked + 1) )
    goto LABEL_10;
LABEL_11:
  luaH_setint(L, (Table *)v4->u.i.v__.gc, n, L->top - 1);
  v7 = L->top;
  v8 = v7[-1].u.i.tt__;
  if ( (v7[-1].u.i.tt__ & 0x7FFFFF00) != 2146936064 )
    LOBYTE(v8) = 3;
  if ( v8 & 0x40 )
  {
    if ( *(_BYTE *)(v7[-1].u.i.v__.b + 5) & 3 )
    {
      v9 = (GCObject *)v4->u.i.v__.b;
      if ( v9->h.marked & 4 )
        luaC_barrierback_(L, v9);
    }
  }
  --L->top;
}

//----- (00741150) --------------------------------------------------------
int __cdecl lua_setmetatable(lua_State *L, int objindex)
{
  CallInfo *v2; // edx@1
  lua_TValue *v3; // esi@2
  int v4; // eax@8
  GCObject *v5; // ecx@9
  lua_TValue *v6; // eax@11
  Table *v7; // edi@12
  int v8; // edx@14
  char v9; // al@15
  int v10; // eax@17
  int result; // eax@20

  v2 = L->ci;
  if ( objindex <= 0 )
  {
    if ( objindex > -1001000 )
    {
      v3 = &L->top[objindex];
      goto LABEL_11;
    }
    if ( objindex == -1001000 )
    {
      v3 = &L->l_G->l_registry;
      goto LABEL_11;
    }
    v4 = -1001000 - objindex;
    if ( v2->func->u.i.tt__ != 2146936086 )
    {
      v5 = v2->func->u.i.v__.gc;
      v3 = (lua_TValue *)&(&v5->p.k)[v4];
      if ( v4 <= *(&v5->p.marked + 1) )
        goto LABEL_11;
    }
    goto LABEL_10;
  }
  v3 = &v2->func[objindex];
  if ( v3 >= L->top )
LABEL_10:
    v3 = &luaO_nilobject_;
LABEL_11:
  v6 = L->top;
  if ( v6[-1].u.i.tt__ == 2146936064 )
    v7 = 0;
  else
    v7 = (Table *)v6[-1].u.i.v__.gc;
  v8 = v3->u.i.tt__ & 0x7FFFFF00;
  if ( v8 == 2146936064 )
    v9 = v3->u.i.tt__;
  else
    v9 = 3;
  v10 = (v9 & 0xF) - 5;
  if ( !v10 )
  {
    *(_DWORD *)(v3->u.i.v__.b + 8) = v7;
    if ( v7 )
    {
      if ( v7->marked & 3 && *(_BYTE *)(v3->u.i.v__.b + 5) & 4 )
        luaC_barrierback_(L, v3->u.i.v__.gc);
      luaC_checkfinalizer(L, v3->u.i.v__.gc, v7);
    }
    goto LABEL_32;
  }
  if ( v10 == 2 )
  {
    *(_DWORD *)(v3->u.i.v__.b + 8) = v7;
    if ( v7 )
    {
      if ( v7->marked & 3 && *(_BYTE *)(v3->u.i.v__.b + 5) & 4 )
        luaC_barrier_(L, v3->u.i.v__.gc, (GCObject *)&v7->next);
      luaC_checkfinalizer(L, v3->u.i.v__.gc, v7);
    }
LABEL_32:
    --L->top;
    return 1;
  }
  if ( v8 == 2146936064 )
  {
    L->l_G->mt[v3->u.i.tt__ & 0xF] = v7;
    --L->top;
    result = 1;
  }
  else
  {
    L->l_G->mt[3] = v7;
    --L->top;
    result = 1;
  }
  return result;
}

//----- (007412A0) --------------------------------------------------------
void __cdecl lua_setuservalue(lua_State *L, int idx)
{
  CallInfo *v2; // edx@1
  lua_TValue *v3; // eax@2
  int v4; // eax@8
  GCObject *v5; // ecx@9
  int v6; // edx@9
  bool v7; // zf@9
  bool v8; // sf@9
  unsigned __int8 v9; // of@9
  lua_TValue *v10; // ecx@11
  lua_TValue *v11; // edx@13
  GCObject *v12; // eax@14

  v2 = L->ci;
  if ( idx > 0 )
  {
    v3 = &v2->func[idx];
    if ( v3 < L->top )
      goto LABEL_11;
LABEL_10:
    v3 = &luaO_nilobject_;
    goto LABEL_11;
  }
  if ( idx > -1001000 )
  {
    v3 = &L->top[idx];
    goto LABEL_11;
  }
  if ( idx == -1001000 )
  {
    v3 = &L->l_G->l_registry;
    goto LABEL_11;
  }
  v4 = -1001000 - idx;
  if ( v2->func->u.i.tt__ == 2146936086 )
    goto LABEL_10;
  v5 = v2->func->u.i.v__.gc;
  v6 = *(&v5->p.marked + 1);
  v9 = __OFSUB__(v4, v6);
  v7 = v4 == v6;
  v8 = v4 - v6 < 0;
  v3 = (lua_TValue *)&(&v5->p.k)[v4];
  if ( !((unsigned __int8)(v8 ^ v9) | v7) )
    goto LABEL_10;
LABEL_11:
  v10 = L->top;
  if ( v10[-1].u.i.tt__ == 2146936064 )
  {
    *(_DWORD *)(v3->u.i.v__.b + 12) = 0;
    --L->top;
  }
  else
  {
    *(_DWORD *)(v3->u.i.v__.b + 12) = v10[-1].u.i.v__.gc;
    v11 = L->top;
    if ( *(_BYTE *)(v11[-1].u.i.v__.b + 5) & 3 )
    {
      v12 = (GCObject *)v3->u.i.v__.b;
      if ( v12->h.marked & 4 )
        luaC_barrier_(L, v12, v11[-1].u.i.v__.gc);
    }
    --L->top;
  }
}

//----- (00741350) --------------------------------------------------------
int __cdecl lua_getctx(lua_State *L, int *ctx)
{
  CallInfo *v2; // eax@1
  int result; // eax@4

  v2 = L->ci;
  if ( v2->callstatus & 8 )
  {
    if ( ctx )
      *ctx = v2->u.c.ctx;
    result = L->ci->u.c.status;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00741380) --------------------------------------------------------
void __cdecl lua_callk(lua_State *L, int nargs, int nresults, int ctx, int (__cdecl *k)(lua_State *))
{
  lua_TValue *v5; // eax@1
  CallInfo *v6; // eax@6
  lua_TValue *v7; // esi@6
  int v8; // [sp-4h] [bp-Ch]@3

  v5 = &L->top[-nargs - 1];
  if ( !k || L->nny )
  {
    v8 = 0;
  }
  else
  {
    L->ci->u.l.savedpc = (const unsigned int *)k;
    L->ci->u.c.ctx = ctx;
    v8 = 1;
  }
  luaD_call(L, v5, nresults, v8);
  if ( nresults == -1 )
  {
    v6 = L->ci;
    v7 = L->top;
    if ( v6->top < v7 )
      v6->top = v7;
  }
}

//----- (007413E0) --------------------------------------------------------
void __cdecl f_call(lua_State *L, void *ud)
{
  luaD_call(L, *(lua_TValue **)ud, *((_DWORD *)ud + 1), 0);
}

//----- (00741400) --------------------------------------------------------
int __cdecl lua_pcallk(lua_State *L, int nargs, int nresults, int errfunc, int ctx, int (__cdecl *k)(lua_State *))
{
  int v6; // eax@2
  lua_TValue *v7; // ecx@4
  int v8; // ebx@6
  CallInfo *v9; // edi@6
  int result; // eax@6
  int v11; // ST0C_4@7
  CallInfo *v12; // ecx@9
  lua_TValue *v13; // esi@9
  CallS c; // [sp+4h] [bp-8h]@4

  if ( errfunc )
    v6 = (char *)index2addr(L, errfunc) - (char *)L->stack;
  else
    v6 = 0;
  v7 = &L->top[-nargs - 1];
  c.func = &L->top[-nargs - 1];
  if ( !k || L->nny )
  {
    v8 = nresults;
    v11 = (char *)v7 - (char *)L->stack;
    c.nresults = nresults;
    result = luaD_pcall(L, f_call, &c, v11, v6);
  }
  else
  {
    v8 = nresults;
    v9 = L->ci;
    v9->u.l.savedpc = (const unsigned int *)k;
    v9->u.c.ctx = ctx;
    v9->extra = (char *)c.func - (char *)L->stack;
    v9->u.c.old_allowhook = L->allowhook;
    v9->u.c.old_errfunc = L->errfunc;
    L->errfunc = v6;
    v9->callstatus |= 0x10u;
    luaD_call(L, c.func, nresults, 1);
    v9->callstatus &= 0xEFu;
    L->errfunc = v9->u.c.old_errfunc;
    result = 0;
  }
  if ( v8 == -1 )
  {
    v12 = L->ci;
    v13 = L->top;
    if ( v12->top < v13 )
      v12->top = v13;
  }
  return result;
}

//----- (007414C0) --------------------------------------------------------
int __cdecl lua_load(lua_State *L, const char *(__cdecl *reader)(lua_State *, void *, unsigned int *), void *data, const char *chunkname, const char *mode)
{
  const char *v5; // edi@1
  int v6; // ebx@3
  GCObject *v7; // edi@4
  Node *v8; // eax@5
  int v9; // ecx@5
  int v10; // ecx@5
  GCObject *v11; // eax@8
  GCObject *v12; // edi@9
  Zio z; // [sp+Ch] [bp-14h]@3

  v5 = chunkname;
  if ( !chunkname )
    v5 = "?";
  luaZ_init(L, &z, reader, data);
  v6 = luaD_protectedparser(L, &z, v5, mode);
  if ( !v6 )
  {
    v7 = L->top[-1].u.i.v__.gc;
    if ( *(&v7->p.marked + 1) == 1 )
    {
      v8 = luaH_getint((Table *)L->l_G->l_registry.u.i.v__.gc, 2);
      v9 = *((_DWORD *)v7->p.p + 2);
      *(_DWORD *)v9 = v8->i_val.u.i.v__.b;
      *(_DWORD *)(v9 + 4) = v8->i_val.u.i.tt__;
      v10 = v8->i_val.u.i.tt__;
      if ( (v8->i_val.u.i.tt__ & 0x7FFFFF00) != 2146936064 )
        LOBYTE(v10) = 3;
      if ( v10 & 0x40 )
      {
        v11 = (GCObject *)v8->i_val.u.i.v__.b;
        if ( v11->h.marked & 3 )
        {
          v12 = (GCObject *)v7->u.uv.len;
          if ( v12->h.marked & 4 )
            luaC_barrier_(L, v12, v11);
        }
      }
    }
  }
  return v6;
}

//----- (00741580) --------------------------------------------------------
int __cdecl lua_dump(lua_State *L, int (__cdecl *writer)(lua_State *, const void *, unsigned int, void *), void *data)
{
  lua_TValue *v3; // eax@1
  int result; // eax@2

  v3 = L->top;
  if ( v3[-1].u.i.tt__ == 2146936134 )
    result = luaU_dump(L, *(Proto **)(v3[-1].u.i.v__.b + 12), writer, data, 0);
  else
    result = 1;
  return result;
}

//----- (007415C0) --------------------------------------------------------
int __cdecl lua_status(lua_State *L)
{
  return L->status;
}

//----- (007415D0) --------------------------------------------------------
int __cdecl lua_gc(lua_State *L, int what, int data)
{
  global_State *v3; // esi@1
  signed int v4; // edi@1
  int result; // eax@2
  int v6; // edi@8
  int v7; // eax@9
  int v8; // edi@15

  v3 = L->l_G;
  v4 = 0;
  switch ( what )
  {
    case 0:
      result = 0;
      v3->gcrunning = 0;
      break;
    case 1:
      luaE_setdebt(v3, 0);
      result = 0;
      v3->gcrunning = 1;
      break;
    case 2:
      luaC_fullgc(L, 0);
      result = 0;
      break;
    case 3:
      result = (v3->totalbytes + v3->GCdebt) >> 10;
      break;
    case 4:
      result = (v3->totalbytes + v3->GCdebt) & 0x3FF;
      break;
    case 5:
      if ( v3->gckind == 2 )
      {
        v6 = v3->GCestimate == 0;
        luaC_forcestep(L);
        result = v6;
      }
      else
      {
        v7 = (data << 10) - 1600;
        if ( v3->gcrunning )
          v7 += v3->GCdebt;
        luaE_setdebt(v3, v7);
        luaC_forcestep(L);
        if ( v3->gcstate != 5 )
          goto LABEL_20;
        result = 1;
      }
      break;
    case 6:
      result = v3->gcpause;
      v3->gcpause = data;
      break;
    case 8:
      result = v3->gcmajorinc;
      v3->gcmajorinc = data;
      break;
    case 7:
      v8 = v3->gcstepmul;
      v3->gcstepmul = data;
      result = v8;
      break;
    case 9:
      result = v3->gcrunning;
      break;
    case 10:
      luaC_changemode(L, 2);
      result = 0;
      break;
    case 11:
      luaC_changemode(L, 0);
      result = 0;
      break;
    default:
      v4 = -1;
LABEL_20:
      result = v4;
      break;
  }
  return result;
}

//----- (00741750) --------------------------------------------------------
void __cdecl __noreturn lua_error(lua_State *L)
{
  luaG_errormsg(L);
}

//----- (00741760) --------------------------------------------------------
int __cdecl lua_next(lua_State *L, int idx)
{
  CallInfo *v2; // edx@1
  lua_TValue *v3; // eax@2
  int v4; // eax@8
  GCObject *v5; // ecx@9
  int v6; // edx@9
  bool v7; // zf@9
  bool v8; // sf@9
  unsigned __int8 v9; // of@9
  int result; // eax@11

  v2 = L->ci;
  if ( idx <= 0 )
  {
    if ( idx > -1001000 )
    {
      v3 = &L->top[idx];
      goto LABEL_11;
    }
    if ( idx == -1001000 )
    {
      v3 = &L->l_G->l_registry;
      goto LABEL_11;
    }
    v4 = -1001000 - idx;
    if ( v2->func->u.i.tt__ != 2146936086 )
    {
      v5 = v2->func->u.i.v__.gc;
      v6 = *(&v5->p.marked + 1);
      v9 = __OFSUB__(v4, v6);
      v7 = v4 == v6;
      v8 = v4 - v6 < 0;
      v3 = (lua_TValue *)&(&v5->p.k)[v4];
      if ( (unsigned __int8)(v8 ^ v9) | v7 )
        goto LABEL_11;
    }
    goto LABEL_10;
  }
  v3 = &v2->func[idx];
  if ( v3 >= L->top )
LABEL_10:
    v3 = &luaO_nilobject_;
LABEL_11:
  result = luaH_next(L, (Table *)v3->u.i.v__.gc, L->top - 1);
  if ( result )
    ++L->top;
  else
    --L->top;
  return result;
}

//----- (007417F0) --------------------------------------------------------
void __cdecl lua_concat(lua_State *L, int n)
{
  lua_TValue *v2; // edi@6
  GCObject *v3; // eax@6

  if ( n < 2 )
  {
    if ( !n )
    {
      v2 = L->top;
      v3 = luaS_newlstr(L, (const char *)&unk_96F8EB, 0);
      v2->u.i.v__.b = (int)v3;
      v2->u.i.tt__ = v3->cl.c.tt | 0x7FF7A540;
      ++L->top;
    }
  }
  else
  {
    if ( L->l_G->GCdebt > 0 )
      luaC_step(L);
    luaV_concat(L, n);
  }
}

//----- (00741860) --------------------------------------------------------
void __cdecl lua_len(lua_State *L, int idx)
{
  CallInfo *v2; // edx@1
  lua_TValue *v3; // eax@2
  int v4; // eax@8
  GCObject *v5; // ecx@9
  int v6; // edx@9
  bool v7; // zf@9
  bool v8; // sf@9
  unsigned __int8 v9; // of@9

  v2 = L->ci;
  if ( idx > 0 )
  {
    v3 = &v2->func[idx];
    if ( v3 < L->top )
      goto LABEL_11;
    goto LABEL_10;
  }
  if ( idx <= -1001000 )
  {
    if ( idx == -1001000 )
    {
      v3 = &L->l_G->l_registry;
    }
    else
    {
      v4 = -1001000 - idx;
      if ( v2->func->u.i.tt__ == 2146936086
        || (v5 = v2->func->u.i.v__.gc,
            v6 = *(&v5->p.marked + 1),
            v9 = __OFSUB__(v4, v6),
            v7 = v4 == v6,
            v8 = v4 - v6 < 0,
            v3 = (lua_TValue *)&(&v5->p.k)[v4],
            !((unsigned __int8)(v8 ^ v9) | v7)) )
      {
LABEL_10:
        v3 = &luaO_nilobject_;
        goto LABEL_11;
      }
    }
  }
  else
  {
    v3 = &L->top[idx];
  }
LABEL_11:
  luaV_objlen(L, L->top, v3);
  ++L->top;
}

//----- (007418E0) --------------------------------------------------------
int __cdecl lua_newuserdata(lua_State *L, unsigned int size)
{
  GCObject *v2; // eax@3
  lua_TValue *v3; // ecx@3

  if ( L->l_G->GCdebt > 0 )
    luaC_step(L);
  v2 = luaS_newudata(L, size, 0);
  v3 = L->top;
  v3->u.i.v__.b = (int)v2;
  v3->u.i.tt__ = 2146936135;
  ++L->top;
  return (int)&v2->h.gclist;
}

//----- (00741920) --------------------------------------------------------
NiUnsharedGeometryGroup *__usercall aux_upvalue@<eax>(lua_TValue *fi@<edx>, int n@<eax>, lua_TValue **val@<edi>, GCObject **owner@<esi>)
{
  int v4; // ecx@1
  int v5; // ecx@3
  GCObject *v6; // ecx@5
  int v8; // ecx@10
  int v9; // edx@10
  int v10; // eax@14

  v4 = fi->u.i.tt__;
  if ( (fi->u.i.tt__ & 0x7FFFFF00) != 2146936064 )
    LOBYTE(v4) = 3;
  v5 = v4 & 0x3F;
  if ( v5 != 6 )
  {
    if ( v5 == 38 )
    {
      v6 = (GCObject *)fi->u.i.v__.b;
      if ( n >= 1 && n <= *(&v6->p.marked + 1) )
      {
        *val = (lua_TValue *)&(&v6->p.k)[n];
        if ( owner )
          *owner = v6;
        return &unk_96F8EB;
      }
    }
    return 0;
  }
  v8 = fi->u.i.v__.b;
  v9 = *(_DWORD *)(fi->u.i.v__.b + 12);
  if ( n < 1 || n > *(_DWORD *)(v9 + 40) )
    return 0;
  *val = *(lua_TValue **)(*(_DWORD *)(v8 + 4 * n + 12) + 8);
  if ( owner )
    *owner = *(GCObject **)(v8 + 4 * n + 12);
  v10 = *(_DWORD *)(*(_DWORD *)(v9 + 28) + 8 * n - 8);
  if ( !v10 )
    return &unk_96F8EB;
  return (NiUnsharedGeometryGroup *)(v10 + 16);
}

//----- (007419B0) --------------------------------------------------------
NiUnsharedGeometryGroup *__cdecl lua_getupvalue(lua_State *L, int funcindex, int n)
{
  CallInfo *v3; // edx@1
  lua_TValue *v4; // eax@2
  int v5; // eax@8
  GCObject *v6; // ecx@9
  int v7; // edx@9
  bool v8; // zf@9
  bool v9; // sf@9
  unsigned __int8 v10; // of@9
  int v11; // ecx@11
  int v12; // ecx@13
  NiUnsharedGeometryGroup *result; // eax@15
  int v14; // eax@16
  int v15; // edx@18
  int v16; // eax@20
  int v17; // esi@20
  int v18; // ecx@22
  lua_TValue *v19; // ecx@24

  v3 = L->ci;
  if ( funcindex > 0 )
  {
    v4 = &v3->func[funcindex];
    if ( v4 < L->top )
      goto LABEL_11;
LABEL_10:
    v4 = &luaO_nilobject_;
    goto LABEL_11;
  }
  if ( funcindex > -1001000 )
  {
    v4 = &L->top[funcindex];
    goto LABEL_11;
  }
  if ( funcindex == -1001000 )
  {
    v4 = &L->l_G->l_registry;
    goto LABEL_11;
  }
  v5 = -1001000 - funcindex;
  if ( v3->func->u.i.tt__ == 2146936086 )
    goto LABEL_10;
  v6 = v3->func->u.i.v__.gc;
  v7 = *(&v6->p.marked + 1);
  v10 = __OFSUB__(v5, v7);
  v8 = v5 == v7;
  v9 = v5 - v7 < 0;
  v4 = (lua_TValue *)&(&v6->p.k)[v5];
  if ( !((unsigned __int8)(v9 ^ v10) | v8) )
    goto LABEL_10;
LABEL_11:
  v11 = v4->u.i.tt__;
  if ( (v4->u.i.tt__ & 0x7FFFFF00) != 2146936064 )
    LOBYTE(v11) = 3;
  v12 = v11 & 0x3F;
  if ( v12 != 6 )
  {
    if ( v12 == 38 )
    {
      v14 = v4->u.i.v__.b;
      if ( n >= 1 && n <= *(_BYTE *)(v14 + 6) )
      {
        v15 = v14 + 8 * n + 8;
        goto LABEL_19;
      }
    }
    return 0;
  }
  v16 = v4->u.i.v__.b;
  v17 = *(_DWORD *)(v16 + 12);
  if ( n < 1 || n > *(_DWORD *)(v17 + 40) )
    return 0;
  v15 = *(_DWORD *)(*(_DWORD *)(v16 + 4 * n + 12) + 8);
  v18 = *(_DWORD *)(*(_DWORD *)(v17 + 28) + 8 * n - 8);
  if ( v18 )
  {
    result = (NiUnsharedGeometryGroup *)(v18 + 16);
    if ( v18 == -16 )
      return result;
    goto LABEL_24;
  }
LABEL_19:
  result = &unk_96F8EB;
LABEL_24:
  v19 = L->top;
  v19->u.i.v__.b = *(_DWORD *)v15;
  v19->u.i.tt__ = *(_DWORD *)(v15 + 4);
  ++L->top;
  return result;
}

//----- (00741AA0) --------------------------------------------------------
NiUnsharedGeometryGroup *__cdecl lua_setupvalue(lua_State *L, int funcindex, int n)
{
  CallInfo *v3; // edx@1
  lua_TValue *v4; // edx@2
  int v5; // eax@8
  GCObject *v6; // ecx@9
  int v7; // edx@9
  bool v8; // zf@9
  bool v9; // sf@9
  unsigned __int8 v10; // of@9
  NiUnsharedGeometryGroup *v11; // esi@11
  lua_TValue *v12; // eax@12
  lua_TValue *v13; // ecx@12
  lua_TValue *v14; // ecx@12
  int v15; // eax@12
  GCObject *v16; // ecx@15
  GCObject *owner; // [sp+8h] [bp-8h]@1
  lua_TValue *val; // [sp+Ch] [bp-4h]@1

  v3 = L->ci;
  val = 0;
  owner = 0;
  if ( funcindex > 0 )
  {
    v4 = &v3->func[funcindex];
    if ( v4 < L->top )
      goto LABEL_11;
LABEL_10:
    v4 = &luaO_nilobject_;
    goto LABEL_11;
  }
  if ( funcindex > -1001000 )
  {
    v4 = &L->top[funcindex];
    goto LABEL_11;
  }
  if ( funcindex == -1001000 )
  {
    v4 = &L->l_G->l_registry;
    goto LABEL_11;
  }
  v5 = -1001000 - funcindex;
  if ( v3->func->u.i.tt__ == 2146936086 )
    goto LABEL_10;
  v6 = v3->func->u.i.v__.gc;
  v7 = *(&v6->p.marked + 1);
  v10 = __OFSUB__(v5, v7);
  v8 = v5 == v7;
  v9 = v5 - v7 < 0;
  v4 = (lua_TValue *)&(&v6->p.k)[v5];
  if ( !((unsigned __int8)(v9 ^ v10) | v8) )
    goto LABEL_10;
LABEL_11:
  v11 = aux_upvalue(v4, n, &val, &owner);
  if ( v11 )
  {
    --L->top;
    v12 = L->top;
    v13 = val;
    val->u.i.v__.b = v12->u.i.v__.b;
    v13->u.i.tt__ = v12->u.i.tt__;
    v14 = L->top;
    v15 = v14->u.i.tt__;
    if ( (v14->u.i.tt__ & 0x7FFFFF00) != 2146936064 )
      LOBYTE(v15) = 3;
    if ( v15 & 0x40 )
    {
      v16 = (GCObject *)v14->u.i.v__.b;
      if ( v16->h.marked & 3 )
      {
        if ( owner->h.marked & 4 )
          luaC_barrier_(L, owner, v16);
      }
    }
  }
  return v11;
}

//----- (00741B80) --------------------------------------------------------
Proto **__usercall getupvalref@<eax>(lua_State *L@<ecx>, int fidx@<eax>, int n@<edi>, LClosure **pf@<esi>)
{
  CallInfo *v4; // edx@1
  lua_TValue *v5; // eax@2
  int v6; // ecx@8
  GCObject *v7; // eax@9
  int v8; // edx@9
  LClosure *v9; // eax@11

  v4 = L->ci;
  if ( fidx > 0 )
  {
    v5 = &v4->func[fidx];
    if ( v5 < L->top )
      goto LABEL_11;
LABEL_10:
    v5 = &luaO_nilobject_;
    goto LABEL_11;
  }
  if ( fidx > -1001000 )
  {
    v5 = &L->top[fidx];
    goto LABEL_11;
  }
  if ( fidx == -1001000 )
  {
    v5 = &L->l_G->l_registry;
    goto LABEL_11;
  }
  v6 = -1001000 - fidx;
  if ( v4->func->u.i.tt__ == 2146936086 )
    goto LABEL_10;
  v7 = v4->func->u.i.v__.gc;
  v8 = *(&v7->p.marked + 1);
  v5 = (lua_TValue *)&(&v7->p.k)[v6];
  if ( v6 > v8 )
    goto LABEL_10;
LABEL_11:
  v9 = (LClosure *)v5->u.i.v__.b;
  if ( pf )
    *pf = v9;
  return &v9->p + n;
}

//----- (00741BE0) --------------------------------------------------------
void *__cdecl lua_upvalueid(lua_State *L, int fidx, int n)
{
  CallInfo *v3; // edi@1
  lua_TValue *v4; // ecx@2
  int v5; // ecx@8
  GCObject *v6; // edx@9
  int v7; // ebx@9
  bool v8; // zf@9
  bool v9; // sf@9
  unsigned __int8 v10; // of@9
  int v11; // edx@11
  int v12; // edx@13
  void *result; // eax@15
  lua_TValue *v14; // eax@18
  int v15; // ecx@24
  GCObject *v16; // eax@25
  int v17; // edx@25
  lua_TValue *v18; // eax@25

  v3 = L->ci;
  if ( fidx > 0 )
  {
    v4 = &v3->func[fidx];
    if ( v4 < L->top )
      goto LABEL_11;
LABEL_10:
    v4 = &luaO_nilobject_;
    goto LABEL_11;
  }
  if ( fidx > -1001000 )
  {
    v4 = &L->top[fidx];
    goto LABEL_11;
  }
  if ( fidx == -1001000 )
  {
    v4 = &L->l_G->l_registry;
    goto LABEL_11;
  }
  v5 = -1001000 - fidx;
  if ( v3->func->u.i.tt__ == 2146936086 )
    goto LABEL_10;
  v6 = v3->func->u.i.v__.gc;
  v7 = *(&v6->p.marked + 1);
  v10 = __OFSUB__(v5, v7);
  v8 = v5 == v7;
  v9 = v5 - v7 < 0;
  v4 = (lua_TValue *)&(&v6->p.k)[v5];
  if ( !((unsigned __int8)(v9 ^ v10) | v8) )
    goto LABEL_10;
LABEL_11:
  v11 = v4->u.i.tt__;
  if ( (v4->u.i.tt__ & 0x7FFFFF00) != 2146936064 )
    LOBYTE(v11) = 3;
  v12 = v11 & 0x3F;
  if ( v12 == 6 )
  {
    if ( fidx <= 0 )
    {
      if ( fidx > -1001000 )
        return *(void **)(L->top[fidx].u.i.v__.b + 4 * n + 12);
      if ( fidx == -1001000 )
        return *(void **)(L->l_G->l_registry.u.i.v__.b + 4 * n + 12);
      v15 = -1001000 - fidx;
      if ( v3->func->u.i.tt__ != 2146936086 )
      {
        v16 = v3->func->u.i.v__.gc;
        v17 = *(&v16->p.marked + 1);
        v18 = (lua_TValue *)&(&v16->p.k)[v15];
        if ( v15 <= v17 )
          return *(void **)(v18->u.i.v__.b + 4 * n + 12);
      }
    }
    else
    {
      v14 = &v3->func[fidx];
      if ( v14 < L->top )
        return *(void **)(v14->u.i.v__.b + 4 * n + 12);
    }
    v18 = &luaO_nilobject_;
    return *(void **)(v18->u.i.v__.b + 4 * n + 12);
  }
  if ( v12 == 38 )
    result = (void *)(v4->u.i.v__.b + 8 * n + 8);
  else
    result = 0;
  return result;
}

//----- (00741D00) --------------------------------------------------------
void __cdecl lua_upvaluejoin(lua_State *L, int fidx1, int n1, int fidx2, int n2)
{
  lua_State *v5; // ebx@1
  Proto **v6; // eax@1
  CallInfo *v7; // esi@1
  lua_TValue *v8; // ecx@2
  int v9; // ecx@8
  GCObject *v10; // edx@9
  int v11; // esi@9
  bool v12; // zf@9
  bool v13; // sf@9
  unsigned __int8 v14; // of@9
  Proto **v15; // ecx@11
  GCObject *v16; // ecx@11

  v5 = L;
  v6 = getupvalref(L, fidx1, n1, (LClosure **)&L);
  v7 = v5->ci;
  if ( fidx2 > 0 )
  {
    v8 = &v7->func[fidx2];
    if ( v8 < v5->top )
      goto LABEL_11;
LABEL_10:
    v8 = &luaO_nilobject_;
    goto LABEL_11;
  }
  if ( fidx2 > -1001000 )
  {
    v8 = &v5->top[fidx2];
    goto LABEL_11;
  }
  if ( fidx2 == -1001000 )
  {
    v8 = &v5->l_G->l_registry;
    goto LABEL_11;
  }
  v9 = -1001000 - fidx2;
  if ( v7->func->u.i.tt__ == 2146936086 )
    goto LABEL_10;
  v10 = v7->func->u.i.v__.gc;
  v11 = *(&v10->p.marked + 1);
  v14 = __OFSUB__(v9, v11);
  v12 = v9 == v11;
  v13 = v9 - v11 < 0;
  v8 = (lua_TValue *)&(&v10->p.k)[v9];
  if ( !((unsigned __int8)(v13 ^ v14) | v12) )
    goto LABEL_10;
LABEL_11:
  v15 = (Proto **)(v8->u.i.v__.b + 4 * n2 + 12);
  *v6 = *v15;
  v16 = (GCObject *)*v15;
  if ( v16->h.marked & 3 )
  {
    if ( L->marked & 4 )
      luaC_barrier_(v5, (GCObject *)&L->next, v16);
  }
}

//----- (00741DA0) --------------------------------------------------------
int __cdecl findfield(lua_State *L, int objidx, int level)
{
  int result; // eax@8

  if ( level && lua_type(L, -1) == 5 )
  {
    lua_pushnil(L);
    if ( lua_next(L, -2) )
    {
      while ( 1 )
      {
        if ( lua_type(L, -2) == 4 )
        {
          if ( lua_rawequal(L, objidx, -1) )
          {
            lua_settop(L, -2);
            return 1;
          }
          if ( findfield(L, objidx, level - 1) )
            break;
        }
        lua_settop(L, -2);
        if ( !lua_next(L, -2) )
          goto LABEL_8;
      }
      lua_remove(L, -2);
      lua_pushlstring(L, ".", 1u);
      lua_insert(L, -2);
      lua_concat(L, 3);
      result = 1;
    }
    else
    {
LABEL_8:
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00741E80) --------------------------------------------------------
int __usercall pushglobalfuncname@<eax>(lua_State *L@<esi>, lua_Debug *ar)
{
  int v2; // edi@1
  int result; // eax@2
  lua_State *v4; // [sp+0h] [bp-Ch]@0

  v2 = lua_gettop(v4);
  lua_getinfo(L, "f", ar);
  lua_rawgeti(L, -1001000, 2);
  if ( findfield(L, v2 + 1, 2) )
  {
    lua_copy(L, -1, v2 + 1);
    lua_settop(L, -3);
    result = 1;
  }
  else
  {
    lua_settop(L, v2);
    result = 0;
  }
  return result;
}

//----- (00741EF0) --------------------------------------------------------
void __usercall pushfuncname(lua_State *L@<ecx>, lua_Debug *ar@<eax>)
{
  lua_State *v2; // esi@1
  char v3; // cl@3
  const char *v4; // eax@7

  v2 = L;
  if ( *ar->namewhat )
  {
    lua_pushfstring(L, "function '%s'", ar->name);
  }
  else
  {
    v3 = *ar->what;
    if ( v3 == 109 )
    {
      lua_pushlstring(v2, "main chunk", 0xAu);
    }
    else if ( v3 == 67 )
    {
      if ( pushglobalfuncname(v2, ar) )
      {
        v4 = lua_tolstring(v2, -1, 0);
        lua_pushfstring(v2, "function '%s'", v4);
        lua_remove(v2, -2);
      }
      else
      {
        lua_pushlstring(v2, "?", 1u);
      }
    }
    else
    {
      lua_pushfstring(v2, "function <%s:%d>", ar->short_src, ar->linedefined);
    }
  }
}

//----- (00741F90) --------------------------------------------------------
int __thiscall countlevels(lua_State *L)
{
  lua_State *v1; // edi@1
  signed int v2; // esi@1
  int v3; // ebx@2
  int result; // eax@8
  lua_State *v5; // [sp+8h] [bp-6Ch]@1
  lua_Debug ar; // [sp+Ch] [bp-68h]@1

  v1 = L;
  v2 = 1;
  v5 = L;
  if ( lua_getstack(L, 1, &ar) )
  {
    do
    {
      v3 = v2;
      v2 *= 2;
    }
    while ( lua_getstack(v1, v2, &ar) );
    while ( v3 < v2 )
    {
      if ( lua_getstack(v5, (v2 + v3) / 2, &ar) )
        v3 = (v2 + v3) / 2 + 1;
      else
        v2 = (v2 + v3) / 2;
    }
    result = v2 - 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00742040) --------------------------------------------------------
void __cdecl luaL_traceback(lua_State *L, lua_State *L1, const char *msg, int level)
{
  int v4; // edi@3
  int v5; // eax@10
  int v6; // eax@12
  signed int numlevels; // [sp+Ch] [bp-74h]@1
  int top; // [sp+14h] [bp-6Ch]@1
  lua_Debug ar; // [sp+18h] [bp-68h]@3

  top = lua_gettop(L);
  numlevels = countlevels(L1);
  if ( msg )
    lua_pushfstring(L, "%s\n", msg);
  lua_pushlstring(L, "stack traceback:", 0x10u);
  v4 = level;
  while ( lua_getstack(L1, v4, &ar) )
  {
    if ( ++v4 == (numlevels <= 22 ? 0 : 0xC) )
    {
      lua_pushlstring(L, "\n\t...", 5u);
      v4 = numlevels - 10;
    }
    else
    {
      lua_getinfo(L1, "Slnt", &ar);
      lua_pushfstring(L, "\n\t%s:", ar.short_src);
      if ( ar.currentline > 0 )
        lua_pushfstring(L, "%d:", ar.currentline);
      lua_pushlstring(L, " in ", 4u);
      pushfuncname(L, &ar);
      if ( ar.istailcall )
        lua_pushlstring(L, "\n\t(...tail calls...)", 0x14u);
      v5 = lua_gettop(L);
      lua_concat(L, v5 - top);
    }
  }
  v6 = lua_gettop(L);
  lua_concat(L, v6 - top);
}

//----- (007421A0) --------------------------------------------------------
void __cdecl luaL_where(lua_State *L, int level)
{
  lua_Debug ar; // [sp+4h] [bp-68h]@1

  if ( lua_getstack(L, level, &ar) && (lua_getinfo(L, "Sl", &ar), ar.currentline > 0) )
    lua_pushfstring(L, "%s:%d: ", ar.short_src, ar.currentline);
  else
    lua_pushlstring(L, (const char *)&unk_96F8EB, 0);
}

//----- (00742230) --------------------------------------------------------
void __noreturn luaL_error(lua_State *L, const char *fmt, ...)
{
  va_list va; // [sp+14h] [bp+10h]@1

  va_start(va, fmt);
  luaL_where(L, 1);
  lua_pushvfstring(L, fmt, va);
  lua_concat(L, 2);
  lua_error(L);
}

//----- (00742270) --------------------------------------------------------
int __cdecl luaL_fileresult(lua_State *L, int stat, const char *fname)
{
  int v3; // edi@1
  int result; // eax@2
  const char *v5; // [sp-10h] [bp-14h]@3

  v3 = *_errno();
  if ( stat )
  {
    lua_pushboolean(L, 1);
    result = 1;
  }
  else
  {
    lua_pushnil(L);
    v5 = strerror(v3);
    if ( fname )
    {
      lua_pushfstring(L, "%s: %s", fname, v5);
      lua_pushinteger(L, v3);
      result = 3;
    }
    else
    {
      lua_pushstring(L, v5);
      lua_pushinteger(L, v3);
      result = 3;
    }
  }
  return result;
}

//----- (00742300) --------------------------------------------------------
int __cdecl luaL_execresult(lua_State *L, int stat)
{
  int v2; // esi@2
  const char *v3; // eax@2
  int result; // eax@2

  if ( stat == -1 )
  {
    v2 = *_errno();
    lua_pushnil(L);
    v3 = strerror(v2);
    lua_pushstring(L, v3);
    lua_pushinteger(L, v2);
    result = 3;
  }
  else
  {
    if ( stat )
      lua_pushnil(L);
    else
      lua_pushboolean(L, 1);
    lua_pushstring(L, "exit");
    lua_pushinteger(L, stat);
    result = 3;
  }
  return result;
}

//----- (00742380) --------------------------------------------------------
int __cdecl luaL_newmetatable(lua_State *L, const char *tname)
{
  int result; // eax@2

  lua_getfield(L, -1001000, tname);
  if ( lua_type(L, -1) )
  {
    result = 0;
  }
  else
  {
    lua_settop(L, -2);
    lua_createtable(L, 0, 0);
    lua_pushvalue(L, -1);
    lua_setfield(L, -1001000, tname);
    result = 1;
  }
  return result;
}

//----- (007423E0) --------------------------------------------------------
void __cdecl luaL_setmetatable(lua_State *L, const char *tname)
{
  lua_getfield(L, -1001000, tname);
  lua_setmetatable(L, -2);
}

//----- (00742410) --------------------------------------------------------
void *__cdecl luaL_testudata(lua_State *L, int ud, const char *tname)
{
  void *v3; // esi@1
  void *result; // eax@5

  v3 = lua_touserdata(L, ud);
  if ( v3 && lua_getmetatable(L, ud) )
  {
    lua_getfield(L, -1001000, tname);
    if ( !lua_rawequal(L, -1, -2) )
      v3 = 0;
    lua_settop(L, -3);
    result = v3;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00742480) --------------------------------------------------------
void __cdecl luaL_checkstack(lua_State *L, int space, const char *msg)
{
  if ( !lua_checkstack(L, space + 20) )
  {
    if ( msg )
      luaL_error(L, "stack overflow (%s)", msg);
    luaL_error(L, "stack overflow");
  }
}

//----- (007424D0) --------------------------------------------------------
char *__cdecl luaL_prepbuffsize(luaL_Buffer *B, unsigned int sz)
{
  luaL_Buffer *v2; // esi@1
  unsigned int v3; // ecx@1
  unsigned int v4; // eax@1
  lua_State *v5; // ebx@1
  unsigned int v6; // edi@1
  unsigned int v7; // edi@2
  char *v8; // ebx@7
  lua_State *L; // [sp+14h] [bp+8h]@1

  v2 = B;
  v3 = B->size;
  v4 = B->n;
  v5 = B->L;
  v6 = B->size - v4;
  L = B->L;
  if ( v6 < sz )
  {
    v7 = 2 * v3;
    if ( 2 * v3 - v4 < sz )
      v7 = v4 + sz;
    if ( v7 < v4 || v7 - v4 < sz )
      luaL_error(v5, "buffer too large");
    v8 = (char *)lua_newuserdata(v5, v7);
    memcpy(v8, v2->b, v2->n);
    if ( v2->b != v2->initb )
      lua_remove(L, -2);
    v2->b = v8;
    v2->size = v7;
  }
  return &v2->b[v2->n];
}

//----- (00742560) --------------------------------------------------------
void __cdecl luaL_addlstring(luaL_Buffer *B, const char *s, unsigned int l)
{
  char *v3; // eax@1

  v3 = luaL_prepbuffsize(B, l);
  memcpy(v3, (char *)s, l);
  B->n += l;
}

//----- (00742590) --------------------------------------------------------
void __cdecl luaL_addstring(luaL_Buffer *B, const char *s)
{
  unsigned int v2; // esi@1
  char *v3; // eax@1

  v2 = strlen(s);
  v3 = luaL_prepbuffsize(B, v2);
  memcpy(v3, (char *)s, v2);
  B->n += v2;
}

//----- (007425D0) --------------------------------------------------------
void __cdecl luaL_pushresult(luaL_Buffer *B)
{
  lua_State *v1; // edi@1

  v1 = B->L;
  lua_pushlstring(B->L, B->b, B->n);
  if ( B->b != B->initb )
    lua_remove(v1, -2);
}

//----- (00742610) --------------------------------------------------------
void __cdecl luaL_pushresultsize(luaL_Buffer *B, unsigned int sz)
{
  luaL_Buffer *v2; // esi@1
  lua_State *v3; // edi@1

  v2 = B;
  v2->n += sz;
  v3 = B->L;
  lua_pushlstring(B->L, B->b, B->n);
  if ( v2->b != v2->initb )
    lua_remove(v3, -2);
}

//----- (00742650) --------------------------------------------------------
void __cdecl luaL_addvalue(luaL_Buffer *B)
{
  luaL_Buffer *v1; // esi@1
  lua_State *v2; // ebx@1
  luaL_Buffer *v3; // edi@3
  char *v4; // eax@3
  char *s; // [sp+Ch] [bp-4h]@1

  v1 = B;
  v2 = B->L;
  s = (char *)lua_tolstring(B->L, -1, (unsigned int *)&B);
  if ( v1->b != v1->initb )
    lua_insert(v2, -2);
  v3 = B;
  v4 = luaL_prepbuffsize(v1, (unsigned int)B);
  memcpy(v4, s, (unsigned int)v3);
  v1->n += (unsigned int)v3;
  lua_remove(v2, (v1->b == v1->initb) - 2);
}

//----- (007426C0) --------------------------------------------------------
void __cdecl luaL_buffinit(lua_State *L, luaL_Buffer *B)
{
  B->L = L;
  B->b = B->initb;
  B->n = 0;
  B->size = 512;
}

//----- (007426F0) --------------------------------------------------------
char *__cdecl luaL_buffinitsize(lua_State *L, luaL_Buffer *B, unsigned int sz)
{
  B->L = L;
  B->b = B->initb;
  B->n = 0;
  B->size = 512;
  return luaL_prepbuffsize(B, sz);
}

//----- (00742720) --------------------------------------------------------
const char *__cdecl getF(lua_State *L, void *ud, unsigned int *size)
{
  const char *result; // eax@2

  if ( *(_DWORD *)ud <= 0 )
  {
    if ( feof(*((_iobuf **)ud + 1)) )
    {
      result = 0;
    }
    else
    {
      *size = fread((char *)ud + 8, 1u, 0x200u, *((_iobuf **)ud + 1));
      result = (char *)ud + 8;
    }
  }
  else
  {
    *size = *(_DWORD *)ud;
    *(_DWORD *)ud = 0;
    result = (char *)ud + 8;
  }
  return result;
}

//----- (00742780) --------------------------------------------------------
int __usercall errfile@<eax>(lua_State *L@<esi>, int fnameindex@<edi>, const char *what)
{
  int *v3; // eax@1
  char *v4; // ebx@1
  const char *v5; // eax@1

  v3 = _errno();
  v4 = strerror(*v3);
  v5 = lua_tolstring(L, fnameindex, 0);
  lua_pushfstring(L, "cannot %s %s: %s", what, v5 + 1, v4);
  lua_remove(L, fnameindex);
  return 7;
}

//----- (007427C0) --------------------------------------------------------
int __usercall skipBOM@<eax>(LoadF *lf@<esi>)
{
  const char *v1; // edi@1
  int result; // eax@2
  int v3; // ecx@3
  _iobuf *v4; // ST00_4@5

  v1 = "ï»¿";
  lf->n = 0;
  while ( 1 )
  {
    result = getc(lf->f);
    if ( result == -1 )
      break;
    v3 = *v1++;
    if ( result != v3 )
      break;
    lf->buff[lf->n++] = result;
    if ( !*v1 )
    {
      v4 = lf->f;
      lf->n = 0;
      return getc(v4);
    }
  }
  return result;
}

//----- (00742810) --------------------------------------------------------
int __usercall skipcomment@<eax>(LoadF *lf@<eax>, int *cp@<edi>)
{
  LoadF *v2; // esi@1
  int v3; // eax@1
  int v4; // eax@2
  int result; // eax@4

  v2 = lf;
  v3 = skipBOM(lf);
  *cp = v3;
  if ( v3 == 35 )
  {
    do
      v4 = getc(v2->f);
    while ( v4 != -1 && v4 != 10 );
    *cp = getc(v2->f);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00742850) --------------------------------------------------------
int __cdecl luaL_loadfilex(lua_State *L, const char *filename, const char *mode)
{
  int v3; // eax@1
  int v4; // edi@1
  int v5; // eax@3
  int v6; // eax@4
  int result; // eax@10
  int *v8; // eax@12
  char *v9; // esi@12
  const char *v10; // eax@12
  const char *v11; // ST30_4@16
  const char *v12; // eax@16
  int v13; // esi@16
  int *v14; // eax@19
  char *v15; // esi@19
  const char *v16; // eax@19
  int fnameindex; // [sp+Ch] [bp-21Ch]@1
  int c; // [sp+14h] [bp-214h]@3
  int readstatus; // [sp+18h] [bp-210h]@1
  LoadF lf; // [sp+1Ch] [bp-20Ch]@2

  readstatus = (int)mode;
  v3 = lua_gettop(L);
  v4 = v3 + 1;
  fnameindex = v3 + 1;
  if ( filename )
  {
    lua_pushfstring(L, "@%s", filename);
    lf.f = fopen(filename, "r");
    if ( !lf.f )
    {
      v8 = _errno();
      v9 = strerror(*v8);
      v10 = lua_tolstring(L, v4, 0);
      lua_pushfstring(L, "cannot %s %s: %s", "open", v10 + 1, v9);
      lua_remove(L, v4);
      return 7;
    }
  }
  else
  {
    lua_pushlstring(L, "=stdin", 6u);
    lf.f = __iob_func();
  }
  v5 = skipBOM(&lf);
  c = v5;
  if ( v5 == 35 )
  {
    do
      v6 = getc(lf.f);
    while ( v6 != -1 && v6 != 10 );
    v5 = getc(lf.f);
    lf.buff[lf.n++] = 10;
    c = v5;
  }
  if ( v5 == 27 )
  {
    if ( !filename )
    {
LABEL_15:
      lf.buff[lf.n++] = v5;
      goto LABEL_16;
    }
    lf.f = freopen(filename, "rb", lf.f);
    if ( !lf.f )
      return errfile(L, v4, "reopen");
    skipcomment(&lf, &c);
    v5 = c;
    v4 = fnameindex;
  }
  if ( v5 != -1 )
    goto LABEL_15;
LABEL_16:
  v11 = (const char *)readstatus;
  v12 = lua_tolstring(L, -1, 0);
  v13 = lua_load(L, getF, &lf, v12, v11);
  readstatus = ferror(lf.f);
  if ( filename )
    fclose(lf.f);
  if ( readstatus )
  {
    lua_settop(L, v4);
    v14 = _errno();
    v15 = strerror(*v14);
    v16 = lua_tolstring(L, v4, 0);
    lua_pushfstring(L, "cannot %s %s: %s", "read", v16 + 1, v15);
    lua_remove(L, v4);
    result = 7;
  }
  else
  {
    lua_remove(L, v4);
    result = v13;
  }
  return result;
}

//----- (00742AE0) --------------------------------------------------------
const char *__cdecl getS(lua_State *L, void *ud, unsigned int *size)
{
  unsigned int v3; // ecx@1
  const char *result; // eax@2

  v3 = *((_DWORD *)ud + 1);
  if ( v3 )
  {
    *size = v3;
    *((_DWORD *)ud + 1) = 0;
    result = *(const char **)ud;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00742B10) --------------------------------------------------------
int __cdecl luaL_loadbufferx(lua_State *L, const char *buff, unsigned int size, const char *name, const char *mode)
{
  LoadS ls; // [sp+0h] [bp-8h]@1

  ls.s = buff;
  ls.size = size;
  return lua_load(L, getS, &ls, name, mode);
}

//----- (00742B50) --------------------------------------------------------
int __cdecl luaL_getmetafield(lua_State *L, int obj, const char *event)
{
  if ( !lua_getmetatable(L, obj) )
    return 0;
  lua_pushstring(L, event);
  lua_rawget(L, -2);
  if ( !lua_type(L, -1) )
  {
    lua_settop(L, -3);
    return 0;
  }
  lua_remove(L, -2);
  return 1;
}

//----- (00742BB0) --------------------------------------------------------
int __cdecl luaL_callmeta(lua_State *L, int obj, const char *event)
{
  int v3; // edi@1

  v3 = lua_absindex(L, obj);
  if ( !lua_getmetatable(L, v3) )
    return 0;
  lua_pushstring(L, event);
  lua_rawget(L, -2);
  if ( !lua_type(L, -1) )
  {
    lua_settop(L, -3);
    return 0;
  }
  lua_remove(L, -2);
  lua_pushvalue(L, v3);
  lua_callk(L, 1, 1, 0, 0);
  return 1;
}

//----- (00742C30) --------------------------------------------------------
int __cdecl luaL_len(lua_State *L, int idx)
{
  int v2; // edi@1
  int isnum; // [sp+8h] [bp-4h]@1

  lua_len(L, idx);
  v2 = lua_tointegerx(L, -1, &isnum);
  if ( !isnum )
    luaL_error(L, "object length is not a number");
  lua_settop(L, -2);
  return v2;
}

//----- (00742C80) --------------------------------------------------------
const char *__cdecl luaL_tolstring(lua_State *L, int idx, unsigned int *len)
{
  const char *result; // eax@3
  bool v4; // zf@4
  const char *v5; // eax@4
  void *v6; // ST10_4@8
  int v7; // eax@8
  char *v8; // eax@8

  if ( luaL_callmeta(L, idx, "__tostring") )
  {
LABEL_9:
    result = lua_tolstring(L, -1, len);
  }
  else
  {
    switch ( lua_type(L, idx) )
    {
      case 3:
      case 4:
        lua_pushvalue(L, idx);
        result = lua_tolstring(L, -1, len);
        break;
      case 1:
        v4 = lua_toboolean(L, idx) == 0;
        v5 = "true";
        if ( v4 )
          v5 = "false";
        lua_pushstring(L, v5);
        result = lua_tolstring(L, -1, len);
        break;
      case 0:
        lua_pushlstring(L, "nil", 3u);
        result = lua_tolstring(L, -1, len);
        break;
      default:
        v6 = lua_topointer(L, idx);
        v7 = lua_type(L, idx);
        v8 = lua_typename(L, v7);
        lua_pushfstring(L, "%s: %p", v8, v6);
        goto LABEL_9;
    }
  }
  return result;
}

//----- (00742D80) --------------------------------------------------------
int __cdecl luaL_getsubtable(lua_State *L, int idx, const char *fname)
{
  int result; // eax@2
  int v4; // edi@3

  lua_getfield(L, idx, fname);
  if ( lua_type(L, -1) == 5 )
  {
    result = 1;
  }
  else
  {
    lua_settop(L, -2);
    v4 = lua_absindex(L, idx);
    lua_createtable(L, 0, 0);
    lua_pushvalue(L, -1);
    lua_setfield(L, v4, fname);
    result = 0;
  }
  return result;
}

//----- (00742DF0) --------------------------------------------------------
void __cdecl luaL_requiref(lua_State *L, const char *modname, int (__cdecl *openf)(lua_State *), int glb)
{
  int v4; // edi@2

  lua_pushcclosure(L, openf, 0);
  lua_pushstring(L, modname);
  lua_callk(L, 1, 1, 0, 0);
  lua_getfield(L, -1001000, "_LOADED");
  if ( lua_type(L, -1) != 5 )
  {
    lua_settop(L, -2);
    v4 = lua_absindex(L, -1001000);
    lua_createtable(L, 0, 0);
    lua_pushvalue(L, -1);
    lua_setfield(L, v4, "_LOADED");
  }
  lua_pushvalue(L, -2);
  lua_setfield(L, -2, modname);
  lua_settop(L, -2);
  if ( glb )
  {
    lua_pushvalue(L, -1);
    lua_setglobal(L, modname);
  }
}

//----- (00742EB0) --------------------------------------------------------
const char *__cdecl luaL_gsub(lua_State *L, const char *s, const char *p, const char *r)
{
  lua_State *v4; // ebx@1
  char *v5; // edi@1
  const char *v6; // eax@1
  const char *v7; // esi@2
  unsigned int v8; // eax@2
  unsigned int v9; // esi@2
  unsigned int v10; // ebx@3
  unsigned int v11; // ecx@11
  unsigned int v12; // esi@11
  unsigned int v13; // edi@12
  char *v14; // ebx@17
  unsigned int v15; // esi@22
  char *v16; // eax@22
  lua_State *v17; // esi@22
  unsigned int l; // [sp+14h] [bp-228h]@1
  const char *wild; // [sp+20h] [bp-21Ch]@1
  char *v21; // [sp+24h] [bp-218h]@8
  luaL_Buffer b; // [sp+28h] [bp-214h]@1

  v4 = L;
  v5 = (char *)s;
  l = strlen(p);
  b.L = L;
  b.b = b.initb;
  b.n = 0;
  b.size = 512;
  strstr((char *)s, (char *)p);
  wild = v6;
  if ( v6 )
  {
    do
    {
      v7 = v6;
      v8 = b.n;
      v9 = v7 - v5;
      if ( b.size - b.n < v9 )
      {
        v10 = 2 * b.size;
        if ( 2 * b.size - b.n < v9 )
          v10 = b.n + v9;
        if ( v10 < b.n || v10 - b.n < v9 )
          luaL_error(b.L, "buffer too large");
        v21 = (char *)lua_newuserdata(b.L, v10);
        memcpy(v21, b.b, b.n);
        if ( b.b != b.initb )
          lua_remove(b.L, -2);
        v8 = b.n;
        b.b = v21;
        b.size = v10;
      }
      memcpy(&b.b[v8], v5, v9);
      b.n += v9;
      v11 = b.n;
      v12 = strlen(r);
      if ( b.size - b.n < v12 )
      {
        v13 = 2 * b.size;
        if ( 2 * b.size - b.n < v12 )
          v13 = v12 + b.n;
        if ( v13 < b.n || v13 - b.n < v12 )
          luaL_error(b.L, "buffer too large");
        v14 = (char *)lua_newuserdata(b.L, v13);
        memcpy(v14, b.b, b.n);
        if ( b.b != b.initb )
          lua_remove(b.L, -2);
        v11 = b.n;
        b.b = v14;
        b.size = v13;
      }
      memcpy(&b.b[v11], (char *)r, v12);
      v5 = (char *)&wild[l];
      b.n += v12;
      strstr((char *)&wild[l], (char *)p);
      wild = v6;
    }
    while ( v6 );
    v4 = L;
  }
  v15 = strlen(v5);
  v16 = luaL_prepbuffsize(&b, v15);
  memcpy(v16, v5, v15);
  b.n += v15;
  v17 = b.L;
  lua_pushlstring(b.L, b.b, b.n);
  if ( b.b != b.initb )
    lua_remove(v17, -2);
  return lua_tolstring(v4, -1, 0);
}

//----- (00743190) --------------------------------------------------------
void *__cdecl l_alloc(void *ud, void *ptr, unsigned int osize, unsigned int nsize)
{
  void *result; // eax@2

  if ( nsize )
  {
    result = realloc(ptr, nsize);
  }
  else
  {
    free(ptr);
    result = 0;
  }
  return result;
}

//----- (007431C0) --------------------------------------------------------
int __cdecl panic(lua_State *L)
{
  const char *v1; // ST0C_4@1
  _iobuf *v2; // eax@1
  _iobuf *v3; // eax@1

  v1 = lua_tolstring(L, -1, 0);
  v2 = __iob_func();
  fprintf(v2 + 2, "PANIC: unprotected error in call to Lua API (%s)\n", v1);
  v3 = __iob_func();
  fflush(v3 + 2);
  return 0;
}

//----- (00743200) --------------------------------------------------------
lua_State *__cdecl luaL_newstate()
{
  lua_State *result; // eax@1
  lua_State *v1; // esi@1

  result = lua_newstate(l_alloc, 0);
  v1 = result;
  if ( result )
  {
    lua_atpanic(result, panic);
    result = v1;
  }
  return result;
}

//----- (00743230) --------------------------------------------------------
void __cdecl luaL_checkversion_(lua_State *L, long double ver)
{
  const long double *v2; // edi@1

  v2 = lua_version(L);
  if ( v2 != lua_version(0) )
    luaL_error(L, "multiple Lua VMs detected");
  if ( ver != *(double *)v2 )
    luaL_error(L, "version mismatch: app. needs %f, Lua core provides %f", ver, *(double *)v2);
  lua_pushnumber(L, -4660.0);
  if ( lua_tointegerx(L, -1, 0) != -4660 || lua_tounsignedx(L, -1, 0) != -4660 )
    luaL_error(L, "bad conversion number->int; must recompile Lua with proper settings");
  lua_settop(L, -2);
}

//----- (007432F0) --------------------------------------------------------
void __cdecl __noreturn luaL_argerror(lua_State *L, int narg, const char *extramsg)
{
  const char *v3; // eax@6
  lua_Debug ar; // [sp+8h] [bp-68h]@1

  if ( !lua_getstack(L, 0, &ar) )
    luaL_error(L, "bad argument #%d (%s)", narg, extramsg);
  lua_getinfo(L, "n", &ar);
  if ( !strcmp(ar.namewhat, "method") && !--narg )
    luaL_error(L, "calling '%s' on bad self (%s)", ar.name, extramsg);
  v3 = ar.name;
  if ( !ar.name )
  {
    if ( pushglobalfuncname(L, &ar) )
      v3 = lua_tolstring(L, -1, 0);
    else
      v3 = "?";
    ar.name = v3;
  }
  luaL_error(L, "bad argument #%d to '%s' (%s)", narg, v3, extramsg);
}

//----- (00743400) --------------------------------------------------------
void *__cdecl luaL_checkudata(lua_State *L, int ud, const char *tname)
{
  void *result; // eax@1
  int v4; // eax@2
  char *v5; // eax@2
  const char *v6; // eax@2

  result = luaL_testudata(L, ud, tname);
  if ( !result )
  {
    v4 = lua_type(L, ud);
    v5 = lua_typename(L, v4);
    v6 = lua_pushfstring(L, "%s expected, got %s", tname, v5);
    luaL_argerror(L, ud, v6);
  }
  return result;
}

//----- (00743450) --------------------------------------------------------
void __cdecl luaL_checktype(lua_State *L, int narg, int t)
{
  char *v3; // ebx@2
  int v4; // eax@3
  char *v5; // eax@3
  const char *v6; // eax@3

  if ( lua_type(L, narg) != t )
  {
    v3 = lua_typename(L, t);
    v4 = lua_type(L, narg);
    v5 = lua_typename(L, v4);
    v6 = lua_pushfstring(L, "%s expected, got %s", v3, v5);
    luaL_argerror(L, narg, v6);
  }
}

//----- (007434B0) --------------------------------------------------------
void __cdecl luaL_checkany(lua_State *L, int narg)
{
  if ( lua_type(L, narg) == -1 )
    luaL_argerror(L, narg, "value expected");
}

//----- (007434E0) --------------------------------------------------------
const char *__cdecl luaL_checklstring(lua_State *L, int narg, unsigned int *len)
{
  const char *result; // eax@1
  int v4; // eax@3
  char *v5; // eax@3
  const char *v6; // eax@3
  char *v7; // [sp+Ch] [bp-4h]@2

  result = lua_tolstring(L, narg, len);
  if ( !result )
  {
    v7 = lua_typename(L, 4);
    v4 = lua_type(L, narg);
    v5 = lua_typename(L, v4);
    v6 = lua_pushfstring(L, "%s expected, got %s", v7, v5);
    luaL_argerror(L, narg, v6);
  }
  return result;
}

//----- (00743540) --------------------------------------------------------
const char *__cdecl luaL_optlstring(lua_State *L, int narg, const char *def, unsigned int *len)
{
  const char *result; // eax@2

  if ( lua_type(L, narg) > 0 )
  {
    result = luaL_checklstring(L, narg, len);
  }
  else
  {
    result = def;
    if ( len )
    {
      if ( def )
        *len = strlen(def);
      else
        *len = 0;
    }
  }
  return result;
}

//----- (007435A0) --------------------------------------------------------
double __cdecl luaL_checknumber(lua_State *L, int narg)
{
  double result; // st7@1
  char *v3; // ebx@2
  int v4; // eax@3
  char *v5; // eax@3
  const char *v6; // eax@3
  int isnum; // [sp+10h] [bp-4h]@1

  result = lua_tonumberx(L, narg, &isnum);
  if ( !isnum )
  {
    v3 = lua_typename(L, 3);
    v4 = lua_type(L, narg);
    v5 = lua_typename(L, v4);
    v6 = lua_pushfstring(L, "%s expected, got %s", v3, v5);
    luaL_argerror(L, narg, v6);
  }
  return result;
}

//----- (00743610) --------------------------------------------------------
long double __cdecl luaL_optnumber(lua_State *L, int narg, long double def)
{
  long double result; // st7@2

  if ( lua_type(L, narg) > 0 )
    result = luaL_checknumber(L, narg);
  else
    result = def;
  return result;
}

//----- (00743640) --------------------------------------------------------
int __cdecl luaL_checkinteger(lua_State *L, int narg)
{
  int result; // eax@1
  char *v3; // ebx@2
  int v4; // eax@3
  char *v5; // eax@3
  const char *v6; // eax@3
  int isnum; // [sp+Ch] [bp-4h]@1

  result = lua_tointegerx(L, narg, &isnum);
  if ( !isnum )
  {
    v3 = lua_typename(L, 3);
    v4 = lua_type(L, narg);
    v5 = lua_typename(L, v4);
    v6 = lua_pushfstring(L, "%s expected, got %s", v3, v5);
    luaL_argerror(L, narg, v6);
  }
  return result;
}

//----- (007436A0) --------------------------------------------------------
unsigned int __cdecl luaL_checkunsigned(lua_State *L, int narg)
{
  unsigned int result; // eax@1
  char *v3; // ebx@2
  int v4; // eax@3
  char *v5; // eax@3
  const char *v6; // eax@3
  int isnum; // [sp+Ch] [bp-4h]@1

  result = lua_tounsignedx(L, narg, &isnum);
  if ( !isnum )
  {
    v3 = lua_typename(L, 3);
    v4 = lua_type(L, narg);
    v5 = lua_typename(L, v4);
    v6 = lua_pushfstring(L, "%s expected, got %s", v3, v5);
    luaL_argerror(L, narg, v6);
  }
  return result;
}

//----- (00743700) --------------------------------------------------------
int __cdecl luaL_optinteger(lua_State *L, int narg, int def)
{
  int result; // eax@2

  if ( lua_type(L, narg) > 0 )
    result = luaL_checkinteger(L, narg);
  else
    result = def;
  return result;
}

//----- (00743730) --------------------------------------------------------
void __cdecl luaL_setfuncs(lua_State *L, luaL_Reg *l, int nup)
{
  int v3; // ebx@1
  luaL_Reg *i; // edi@3
  int v5; // ebx@5
  luaL_Reg *la; // [sp+24h] [bp+Ch]@5

  luaL_checkversion_(L, 502.0);
  v3 = nup;
  if ( !lua_checkstack(L, nup + 20) )
    luaL_error(L, "stack overflow (%s)", "too many upvalues");
  for ( i = l; i->name; ++i )
  {
    if ( v3 > 0 )
    {
      v5 = -v3;
      la = (luaL_Reg *)nup;
      do
      {
        lua_pushvalue(L, v5);
        la = (luaL_Reg *)((char *)la - 1);
      }
      while ( la );
      v3 = nup;
    }
    lua_pushcclosure(L, i->func, v3);
    lua_setfield(L, -2 - nup, i->name);
  }
  lua_settop(L, -1 - v3);
}

//----- (007437E0) --------------------------------------------------------
int __cdecl luaL_checkoption(lua_State *L, int narg, const char *def, const char *const *lst)
{
  const char *v4; // esi@1
  const char *v5; // eax@4
  char *v6; // esi@5
  int v7; // eax@6
  char *v8; // eax@6
  const char *v9; // eax@6
  const char *v10; // ecx@8
  int result; // eax@8
  const char *v12; // eax@11

  v4 = def;
  if ( def )
  {
    if ( lua_type(L, narg) > 0 )
      v4 = luaL_checklstring(L, narg, 0);
  }
  else
  {
    v5 = lua_tolstring(L, narg, 0);
    if ( !v5 )
    {
      v6 = lua_typename(L, 4);
      v7 = lua_type(L, narg);
      v8 = lua_typename(L, v7);
      v9 = lua_pushfstring(L, "%s expected, got %s", v6, v8);
      luaL_argerror(L, narg, v9);
    }
    v4 = v5;
  }
  v10 = *lst;
  result = 0;
  if ( !*lst )
  {
LABEL_11:
    v12 = lua_pushfstring(L, "invalid option '%s'", v4);
    luaL_argerror(L, narg, v12);
  }
  while ( strcmp(v10, v4) )
  {
    v10 = lst[result++ + 1];
    if ( !v10 )
      goto LABEL_11;
  }
  return result;
}

//----- (007438D0) --------------------------------------------------------
void __cdecl luaL_openlibs(lua_State *L)
{
  int (__cdecl *v1)(lua_State *); // eax@1
  luaL_Reg *v2; // esi@1

  v1 = loadedlibs[0].func;
  v2 = loadedlibs;
  if ( loadedlibs[0].func )
  {
    do
    {
      luaL_requiref(L, v2->name, v1, 1);
      lua_settop(L, -2);
      v1 = v2[1].func;
      ++v2;
    }
    while ( v1 );
  }
  luaL_getsubtable(L, -1001000, "_PRELOAD");
  lua_settop(L, -2);
}

//----- (00743930) --------------------------------------------------------
void __cdecl luaE_setdebt(global_State *g, int debt)
{
  g->totalbytes += g->GCdebt - debt;
  g->GCdebt = debt;
}

//----- (00743950) --------------------------------------------------------
CallInfo *__cdecl luaE_extendCI(lua_State *L)
{
  CallInfo *result; // eax@1

  result = (CallInfo *)luaM_realloc_(L, 0, 0, 0x28u);
  L->ci->next = result;
  result->previous = L->ci;
  result->next = 0;
  return result;
}

//----- (00743980) --------------------------------------------------------
void __cdecl luaE_freeCI(lua_State *L)
{
  CallInfo *v1; // eax@1
  CallInfo *v2; // esi@1
  CallInfo *i; // eax@1

  v1 = L->ci;
  v2 = v1->next;
  v1->next = 0;
  for ( i = v2; v2; i = v2 )
  {
    v2 = v2->next;
    luaM_realloc_(L, i, 0x28u, 0);
  }
}

//----- (007439C0) --------------------------------------------------------
void __usercall stack_init(lua_State *L1@<esi>, lua_State *L@<eax>)
{
  signed int v2; // eax@1
  lua_TValue *v3; // eax@3
  int v4; // edx@3
  char *v5; // eax@3

  L1->stack = (lua_TValue *)luaM_realloc_(L, 0, 0, 0x140u);
  L1->stacksize = 40;
  v2 = 0;
  do
  {
    L1->stack[v2].u.i.tt__ = 2146936064;
    ++v2;
  }
  while ( v2 < 40 );
  v3 = L1->stack;
  v4 = L1->stacksize;
  L1->top = v3;
  L1->stack_last = &v3[v4 - 5];
  v5 = (char *)&L1->base_ci;
  *((_DWORD *)v5 + 2) = 0;
  *((_DWORD *)v5 + 3) = 0;
  v5[18] = 0;
  *(_DWORD *)v5 = L1->top;
  L1->top->u.i.tt__ = 2146936064;
  ++L1->top;
  *((_DWORD *)v5 + 1) = L1->top + 20;
  L1->ci = &L1->base_ci;
}

//----- (00743A40) --------------------------------------------------------
void __usercall init_registry(lua_State *L@<esi>, global_State *g@<ebx>)
{
  GCObject *v2; // edi@1
  lua_State *v3; // [sp+0h] [bp-10h]@0
  lua_TValue mt; // [sp+8h] [bp-8h]@1

  v2 = luaH_new(v3);
  g->l_registry.u.i.v__.b = (int)v2;
  g->l_registry.u.i.tt__ = 2146936133;
  luaH_resize(L, (Table *)v2, 2, 0);
  mt = (lua_TValue)__PAIR__(2146936136, (unsigned int)L);
  luaH_setint(L, (Table *)v2, 1, &mt);
  mt = (lua_TValue)__PAIR__(2146936133, (unsigned int)luaH_new(L));
  luaH_setint(L, (Table *)v2, 2, &mt);
}

//----- (00743AA0) --------------------------------------------------------
void __cdecl f_luaopen(lua_State *L)
{
  global_State *v1; // ebx@1
  GCObject *v2; // eax@1

  v1 = L->l_G;
  stack_init(L, L);
  init_registry(L, v1);
  luaS_resize(L, 32);
  luaT_init(L);
  luaX_init(L);
  v2 = luaS_newlstr(L, "not enough memory", 0x11u);
  v1->memerrmsg = (TString *)v2;
  v2->h.marked |= 0x20u;
  v1->gcrunning = 1;
}

//----- (00743AF0) --------------------------------------------------------
void __usercall close_state(lua_State *L@<esi>)
{
  global_State *v1; // edi@1

  v1 = L->l_G;
  luaF_close(L, L->stack);
  luaC_freeallobjects(L);
  luaM_realloc_(L, L->l_G->strt.hash, 4 * L->l_G->strt.size, 0);
  v1->buff.buffer = (char *)luaM_realloc_(L, v1->buff.buffer, v1->buff.buffsize, 0);
  v1->buff.buffsize = 0;
  if ( L->stack )
  {
    L->ci = &L->base_ci;
    luaE_freeCI(L);
    luaM_realloc_(L, L->stack, 8 * L->stacksize, 0);
  }
  v1->frealloc(v1->ud, L, 384, 0);
}

//----- (00743B90) --------------------------------------------------------
GCObject *__cdecl lua_newthread(lua_State *L)
{
  GCObject *v1; // esi@3
  lua_TValue *v2; // eax@3
  global_State *v3; // ecx@3
  int v4; // edx@3

  if ( L->l_G->GCdebt > 0 )
    luaC_step(L);
  v1 = luaC_newobj(L, 8, 0x70u, 0, 0);
  v2 = L->top;
  v2->u.i.v__.b = (int)v1;
  v2->u.i.tt__ = 2146936136;
  v3 = L->l_G;
  ++L->top;
  v1->p.code = (unsigned int *)v3;
  v1->p.sizelineinfo = 0;
  v1->p.sizek = 0;
  *(_DWORD *)&v1->th.nCcalls = 0x1000000;
  v1->p.sizecode = 0;
  v1->h.sizearray = 0;
  v1->p.p = 0;
  v1->p.cache = 0;
  v1->p.linedefined = 0;
  v1->p.sizep = 0;
  LOWORD(v1->p.source) = 1;
  *(&v1->p.marked + 1) = 0;
  v1->p.lastlinedefined = 0;
  LOBYTE(v1->p.sizeupvalues) = L->hookmask;
  v4 = L->basehookcount;
  v1->p.sizek = v4;
  v1->p.sizelineinfo = (int)L->hook;
  v1->p.sizecode = v4;
  stack_init((lua_State *)v1, L);
  return v1;
}

//----- (00743C30) --------------------------------------------------------
void __cdecl luaE_freethread(lua_State *L, lua_State *L1)
{
  luaF_close(L1, L1->stack);
  if ( L1->stack )
  {
    L1->ci = &L1->base_ci;
    luaE_freeCI(L1);
    luaM_realloc_(L1, L1->stack, 8 * L1->stacksize, 0);
  }
  luaM_realloc_(L, L1, 0x70u, 0);
}

//----- (00743C90) --------------------------------------------------------
lua_State *__cdecl lua_newstate(void *(__cdecl *f)(void *, void *, unsigned int, unsigned int), void *ud)
{
  _BYTE *v2; // eax@1
  _BYTE *v3; // esi@1
  int v4; // edi@2
  void *v5; // eax@2
  void *v7; // [sp+10h] [bp-18h]@1
  char str[4]; // [sp+14h] [bp-14h]@2
  int *v9; // [sp+18h] [bp-10h]@2
  lua_TValue *v10; // [sp+1Ch] [bp-Ch]@2
  lua_State *(__cdecl *v11)(void *(__cdecl *)(void *, void *, unsigned int, unsigned int), void *); // [sp+20h] [bp-8h]@2

  v7 = ud;
  v2 = (_BYTE *)f(ud, 0, 8u, 384u);
  v3 = v2;
  if ( !v2 )
    return 0;
  *(_DWORD *)v2 = 0;
  v2[4] = 8;
  v2[164] = 33;
  v4 = (int)(v2 + 112);
  v2[5] = 1;
  *(_BYTE *)(v4 + 54) = 0;
  *((_WORD *)v2 + 18) = 1;
  v5 = v7;
  *((_DWORD *)v3 + 3) = v3 + 112;
  *((_DWORD *)v3 + 7) = 0;
  *((_DWORD *)v3 + 4) = 0;
  *((_DWORD *)v3 + 8) = 0;
  *((_DWORD *)v3 + 16) = 0;
  *((_DWORD *)v3 + 13) = 0;
  *((_DWORD *)v3 + 11) = 0;
  *(_DWORD *)(v3 + 38) = 0x1000000;
  *((_DWORD *)v3 + 12) = 0;
  *((_DWORD *)v3 + 14) = 0;
  v3[6] = 0;
  *((_DWORD *)v3 + 17) = 0;
  *(_DWORD *)v4 = f;
  *(_DWORD *)(v4 + 4) = v5;
  *(_DWORD *)(v4 + 156) = v3;
  v7 = (void *)_time64(0);
  *(_DWORD *)str = v3;
  v9 = (int *)&v7;
  v10 = &luaO_nilobject_;
  v11 = lua_newstate;
  *((_DWORD *)v3 + 40) = luaS_hash(str, 0x10u, (unsigned int)v7);
  *((_DWORD *)v3 + 58) = v3 + 216;
  *((_DWORD *)v3 + 59) = v3 + 216;
  v3[167] = 0;
  *((_DWORD *)v3 + 33) = 0;
  *((_DWORD *)v3 + 36) = 0;
  *((_DWORD *)v3 + 35) = 0;
  *((_DWORD *)v3 + 34) = 0;
  *((_DWORD *)v3 + 39) = 2146936064;
  *((_DWORD *)v3 + 60) = 0;
  *((_DWORD *)v3 + 62) = 0;
  *((_DWORD *)v3 + 66) = 0;
  *((_DWORD *)v3 + 68) = lua_version(0);
  v3[165] = 5;
  *((_DWORD *)v3 + 43) = 0;
  *((_DWORD *)v3 + 44) = 0;
  *((_DWORD *)v3 + 52) = 0;
  *((_DWORD *)v3 + 46) = 0;
  *((_DWORD *)v3 + 45) = 0;
  *((_DWORD *)v3 + 48) = 0;
  *((_DWORD *)v3 + 47) = 0;
  *((_DWORD *)v3 + 51) = 0;
  *((_DWORD *)v3 + 50) = 0;
  *((_DWORD *)v3 + 49) = 0;
  *((_DWORD *)v3 + 30) = 384;
  *((_DWORD *)v3 + 31) = 0;
  *((_DWORD *)v3 + 63) = 200;
  *((_DWORD *)v3 + 64) = 200;
  *((_DWORD *)v3 + 65) = 200;
  *((_DWORD *)v3 + 87) = 0;
  *((_DWORD *)v3 + 88) = 0;
  *((_DWORD *)v3 + 89) = 0;
  *((_DWORD *)v3 + 90) = 0;
  *((_DWORD *)v3 + 91) = 0;
  *((_DWORD *)v3 + 92) = 0;
  *((_DWORD *)v3 + 93) = 0;
  *((_DWORD *)v3 + 94) = 0;
  *((_DWORD *)v3 + 95) = 0;
  if ( luaD_rawrunprotected((lua_State *)v3, (void (__cdecl *)(lua_State *, void *))f_luaopen, 0) )
  {
    close_state((lua_State *)v3);
    return 0;
  }
  return (lua_State *)v3;
}

//----- (00743E50) --------------------------------------------------------
void __cdecl lua_close(lua_State *L)
{
  close_state(L->l_G->mainthread);
}

//----- (00743E70) --------------------------------------------------------
unsigned int __cdecl luaO_int2fb(unsigned int x)
{
  unsigned int v1; // ecx@1
  int v2; // eax@1
  unsigned int result; // eax@2

  v1 = x;
  v2 = 0;
  if ( x >= 8 )
  {
    if ( x >= 0x10 )
    {
      do
      {
        v1 = (v1 + 1) >> 1;
        ++v2;
      }
      while ( v1 >= 0x10 );
    }
    result = (v1 - 8) | (8 * v2 + 8);
  }
  else
  {
    result = x;
  }
  return result;
}

//----- (00743EA0) --------------------------------------------------------
int __cdecl luaO_fb2int(int x)
{
  int result; // eax@1

  result = x;
  if ( (x >> 3) & 0x1F )
    result = ((x & 7) + 8) << (((x >> 3) & 0x1F) - 1);
  return result;
}

//----- (00743EC0) --------------------------------------------------------
int __cdecl luaO_ceillog2(unsigned int x)
{
  unsigned int v1; // eax@1
  int i; // ecx@1

  v1 = x - 1;
  for ( i = 0; v1 >= 0x100; i += 8 )
    v1 >>= 8;
  return i + log_2[v1];
}

//----- (00743EF0) --------------------------------------------------------
long double __cdecl luaO_arith(int op, long double v1, long double v2)
{
  long double result; // st7@2

  switch ( op )
  {
    case 0:
      result = v1 + v2;
      break;
    case 1:
      result = v1 - v2;
      break;
    case 2:
      result = v1 * v2;
      break;
    case 3:
      result = v1 / v2;
      break;
    case 4:
      result = v1 - floor(v1 / v2) * v2;
      break;
    case 5:
      result = pow(v1, v2);
      break;
    case 6:
      result = -v1;
      break;
    default:
      result = 0.0;
      break;
  }
  return result;
}

//----- (00743F80) --------------------------------------------------------
int __cdecl luaO_hexavalue(int c)
{
  int result; // eax@2

  if ( byte_9D4E79[c] & 2 )
    result = c - 48;
  else
    result = (c | 0x20) - 87;
  return result;
}

//----- (00743FA0) --------------------------------------------------------
double __usercall readhexa@<st0>(const char **s@<ecx>, int *count@<edx>, long double r)
{
  double v3; // st6@2
  int v4; // eax@3
  int v5; // eax@4
  double result; // st7@7

  if ( byte_9D4E79[**s] & 0x10 )
  {
    v3 = r;
    do
    {
      v4 = **s;
      if ( byte_9D4E79[v4] & 2 )
        v5 = v4 - 48;
      else
        v5 = (v4 | 0x20) - 87;
      ++*count;
      ++*s;
      v3 = v3 * 16.0 + (double)v5;
    }
    while ( byte_9D4E79[**s] & 0x10 );
    result = v3;
  }
  else
  {
    result = r;
  }
  return result;
}

//----- (00744000) --------------------------------------------------------
long double __cdecl lua_strx2number(const char *s, char **endptr)
{
  const char *v2; // eax@1
  char **v3; // edi@1
  int v4; // edx@1
  int v5; // esi@1
  int v6; // edx@2
  char v7; // cl@9
  const char **v8; // ecx@11
  double v9; // st7@11
  const char *v10; // eax@11
  char v12; // cl@16
  char v13; // cl@18
  int v14; // edx@18
  signed int v15; // edi@19
  char v16; // cl@23
  int neg; // [sp+14h] [bp-Ch]@4
  int i; // [sp+18h] [bp-8h]@1
  int e; // [sp+1Ch] [bp-4h]@1

  v2 = s;
  v3 = endptr;
  *endptr = (char *)s;
  v4 = *v2;
  v5 = 0;
  e = 0;
  i = 0;
  if ( byte_9D4E79[v4] & 8 )
  {
    do
      v6 = (v2++)[1];
    while ( byte_9D4E79[v6] & 8 );
  }
  if ( *v2 == 45 )
  {
    ++v2;
    neg = 1;
  }
  else
  {
    if ( *v2 == 43 )
      ++v2;
    neg = 0;
  }
  if ( *v2 != 48 )
    return 0.0;
  v7 = v2[1];
  if ( v7 != 120 && v7 != 88 )
    return 0.0;
  s = v2 + 2;
  v9 = readhexa(&s, &i, 0.0);
  v10 = s;
  if ( *s == 46 )
  {
    ++s;
    v9 = readhexa(v8, &e, v9);
    v10 = s;
    v5 = e;
  }
  if ( !i && !v5 )
    return 0.0;
  *v3 = (char *)v10;
  v12 = *v10;
  e = -4 * v5;
  if ( v12 == 112 || v12 == 80 )
  {
    v13 = (v10++)[1];
    v14 = 0;
    if ( v13 == 45 )
    {
      ++v10;
      v15 = 1;
    }
    else
    {
      if ( v13 == 43 )
        ++v10;
      v15 = 0;
    }
    v16 = *v10;
    if ( !(byte_9D4E79[*v10] & 2) )
      goto ret;
    do
    {
      ++v10;
      v14 = v16 + 10 * v14 - 48;
      v16 = *v10;
    }
    while ( byte_9D4E79[*v10] & 2 );
    if ( v15 )
      v14 = -v14;
    e += v14;
    v3 = endptr;
  }
  *v3 = (char *)v10;
ret:
  if ( neg )
    v9 = -v9;
  return ldexp(v9, e);
}

//----- (00744140) --------------------------------------------------------
int __cdecl luaO_str2d(const char *s, unsigned int len, long double *result)
{
  int v3; // eax@1
  int v4; // eax@2
  int v5; // eax@3
  char *v6; // eax@6
  char *endptr; // [sp+4h] [bp-4h]@4

  strpbrk((char *)s, "nN");
  if ( v3
    || ((strpbrk((char *)s, "xX"), !v5) ? (*result = strtod(s, &endptr)) : (*result = lua_strx2number(s, &endptr)),
        v6 = endptr,
        endptr == s) )
  {
    v4 = 0;
  }
  else
  {
    if ( byte_9D4E79[(unsigned __int8)*endptr] & 8 )
    {
      do
        endptr = ++v6;
      while ( byte_9D4E79[(unsigned __int8)*v6] & 8 );
    }
    v4 = v6 == &s[len];
  }
  return v4;
}

//----- (007441D0) --------------------------------------------------------
const char *__cdecl luaO_pushvfstring(lua_State *L, const char *fmt, char *argp)
{
  const char *v3; // edi@1
  const char *v4; // eax@1
  char *v5; // ebx@2
  lua_TValue *v6; // ST24_4@5
  GCObject *v7; // eax@5
  const char *v8; // ecx@6
  unsigned int v9; // eax@8
  lua_TValue *v10; // edi@8
  GCObject *v11; // eax@8
  lua_TValue *v12; // edi@9
  char v13; // cl@9
  GCObject *v14; // eax@9
  lua_TValue *v15; // eax@10
  long double v16; // st7@10
  lua_TValue *v17; // eax@11
  char *v18; // ecx@11
  int v19; // edx@12
  unsigned int v20; // eax@12
  lua_TValue *v21; // edi@12
  GCObject *v22; // eax@12
  lua_TValue *v23; // edi@13
  GCObject *v24; // eax@13
  const char *v25; // eax@14
  lua_TValue *v26; // ebx@17
  GCObject *v27; // eax@17
  const char *result; // eax@19
  int n; // [sp+10h] [bp-2Ch]@1
  const char *e; // [sp+14h] [bp-28h]@1
  char buff; // [sp+1Bh] [bp-21h]@9
  char *v32; // [sp+1Ch] [bp-20h]@1
  char string; // [sp+20h] [bp-1Ch]@12

  v3 = fmt;
  v32 = argp;
  n = 0;
  strchr((char *)fmt, 37);
  e = v4;
  if ( v4 )
  {
    v5 = argp - 4;
    v32 -= 8;
    do
    {
      if ( (signed int)(((char *)L->stack_last - (char *)L->top) & 0xFFFFFFF8) <= 16 )
        luaD_growstack(L, 2);
      v6 = L->top;
      L->top = v6 + 1;
      v7 = luaS_newlstr(L, v3, e - v3);
      v6->u.i.v__.b = (int)v7;
      v6->u.i.tt__ = v7->cl.c.tt | 0x7FF7A540;
      switch ( e[1] )
      {
        case 115:
          v8 = (const char *)*((_DWORD *)v5 + 1);
          v32 += 4;
          v5 += 4;
          if ( !v8 )
            v8 = "(null)";
          v9 = strlen(v8);
          v10 = L->top;
          L->top = v10 + 1;
          v11 = luaS_newlstr(L, v8, v9);
          v10->u.i.v__.b = (int)v11;
          v10->u.i.tt__ = v11->cl.c.tt | 0x7FF7A540;
          break;
        case 99:
          v12 = L->top;
          v13 = v5[4];
          v32 += 4;
          v5 += 4;
          buff = v13;
          L->top = v12 + 1;
          v14 = luaS_newlstr(L, &buff, 1u);
          v12->u.i.v__.b = (int)v14;
          v12->u.i.tt__ = v14->cl.c.tt | 0x7FF7A540;
          break;
        case 100:
          v15 = L->top;
          v32 += 4;
          L->top = v15 + 1;
          v16 = (double)*((signed int *)v5 + 1);
          v5 += 4;
          v15->u.d__ = v16;
          break;
        case 102:
          v17 = L->top;
          L->top = v17 + 1;
          v18 = v32 + 8;
          *v17 = *((lua_TValue *)v32 + 1);
          v32 = v18;
          v5 += 8;
          break;
        case 112:
          v19 = *((_DWORD *)v5 + 1);
          v32 += 4;
          v5 += 4;
          v20 = sprintf(&string, "%p", v19);
          v21 = L->top;
          L->top = v21 + 1;
          v22 = luaS_newlstr(L, &string, v20);
          v21->u.i.v__.b = (int)v22;
          v21->u.i.tt__ = v22->cl.c.tt | 0x7FF7A540;
          break;
        case 37:
          v23 = L->top;
          L->top = v23 + 1;
          v24 = luaS_newlstr(L, "%", 1u);
          v23->u.i.v__.b = (int)v24;
          v23->u.i.tt__ = v24->cl.c.tt | 0x7FF7A540;
          break;
        default:
          luaG_runerror(L, "invalid option '%%%c' to 'lua_pushfstring'", e[1]);
          return result;
      }
      n += 2;
      v3 = e + 2;
      strchr((char *)e + 2, 37);
      e = v25;
    }
    while ( v25 );
  }
  if ( (signed int)(((char *)L->stack_last - (char *)L->top) & 0xFFFFFFF8) <= 8 )
    luaD_growstack(L, 1);
  v26 = L->top;
  L->top = v26 + 1;
  v27 = luaS_newlstr(L, v3, strlen(v3));
  v26->u.i.v__.b = (int)v27;
  v26->u.i.tt__ = v27->cl.c.tt | 0x7FF7A540;
  if ( n > 0 )
    luaV_concat(L, n + 1);
  return (const char *)(L->top[-1].u.i.v__.b + 16);
}

//----- (007444C0) --------------------------------------------------------
const char *luaO_pushfstring(lua_State *L, const char *fmt, ...)
{
  va_list va; // [sp+10h] [bp+10h]@1

  va_start(va, fmt);
  return luaO_pushvfstring(L, fmt, va);
}

//----- (007444E0) --------------------------------------------------------
void __cdecl luaO_chunkid(char *out, const char *source, unsigned int bufflen)
{
  unsigned int v3; // esi@1
  char *v4; // ebx@2
  int v5; // eax@9
  char *v6; // edi@9
  int v7; // edi@11
  int v8; // edi@16

  v3 = strlen(source);
  if ( *source == 61 )
  {
    v4 = (char *)(source + 1);
    if ( v3 > bufflen )
    {
      memcpy(out, v4, bufflen - 1);
      out[bufflen - 1] = 0;
    }
    else
    {
      memcpy(out, v4, v3);
    }
    return;
  }
  if ( *source != 64 )
  {
    strchr((char *)source, 10);
    *(_DWORD *)out = *(_DWORD *)"[string \"";
    *((_DWORD *)out + 1) = 543649385;
    out[8] = 34;
    v6 = out + 9;
    if ( v3 >= bufflen - 15 )
    {
      if ( !v5 )
      {
LABEL_14:
        if ( v3 > bufflen - 15 )
          v3 = bufflen - 15;
        memcpy(v6, (char *)source, v3);
        v8 = (int)&v6[v3];
        *(_WORD *)v8 = *(_WORD *)"...";
        *(_BYTE *)(v8 + 2) = a____3[2];
        v7 = v8 + 3;
        goto LABEL_17;
      }
    }
    else if ( !v5 )
    {
      memcpy(v6, (char *)source, v3);
      v7 = (int)&v6[v3];
LABEL_17:
      *(_WORD *)v7 = *(_WORD *)"\"]";
      *(_BYTE *)(v7 + 2) = 0;
      return;
    }
    v3 = v5 - (_DWORD)source;
    goto LABEL_14;
  }
  if ( v3 > bufflen )
  {
    *(_WORD *)out = *(_WORD *)"...";
    out[2] = a____3[2];
    memcpy(out + 3, (char *)&source[v3 - (bufflen - 3) + 1], bufflen - 3);
  }
  else
  {
    memcpy(out, (char *)source + 1, v3);
  }
}

//----- (00744620) --------------------------------------------------------
void __usercall seterrorobj(lua_State *L@<edi>, int errcode@<eax>, lua_TValue *oldtop@<ecx>)
{
  int v3; // eax@1
  lua_TValue *v4; // esi@1
  lua_TValue *v5; // eax@3
  GCObject *v6; // eax@4
  TString *v7; // eax@5

  v3 = errcode - 4;
  v4 = oldtop;
  if ( v3 )
  {
    if ( v3 == 2 )
    {
      v6 = luaS_newlstr(L, "error in error handling", 0x17u);
      v4->u.i.v__.b = (int)v6;
      v4->u.i.tt__ = v6->cl.c.tt | 0x7FF7A540;
      L->top = v4 + 1;
    }
    else
    {
      v5 = L->top;
      oldtop->u.i.v__.b = v5[-1].u.i.v__.b;
      oldtop->u.i.tt__ = v5[-1].u.i.tt__;
      L->top = oldtop + 1;
    }
  }
  else
  {
    v7 = L->l_G->memerrmsg;
    oldtop->u.i.v__.b = (int)v7;
    oldtop->u.i.tt__ = v7->tsv.tt | 0x7FF7A540;
    L->top = oldtop + 1;
  }
}

//----- (00744690) --------------------------------------------------------
void __cdecl __noreturn luaD_throw(lua_State *L, int errcode)
{
  lua_State *i; // eax@1
  global_State *v3; // edx@2
  lua_State *v4; // esi@3
  lua_TValue *v5; // edx@3
  lua_TValue *v6; // ecx@3
  int (__cdecl *v7)(lua_State *); // ecx@5

  for ( i = L; !i->errorJmp; i = i->l_G->mainthread )
  {
    v3 = i->l_G;
    i->status = errcode;
    if ( !v3->mainthread->errorJmp )
    {
      v7 = v3->panic;
      if ( v7 )
        v7(i);
      abort();
    }
    v4 = v3->mainthread;
    v5 = v4->top;
    v6 = i->top;
    v4->top = v5 + 1;
    v5->u.i.v__.b = v6[-1].u.i.v__.b;
    v5->u.i.tt__ = v6[-1].u.i.tt__;
  }
  i->errorJmp->status = errcode;
  longjmp(i->errorJmp->b, 1);
}

//----- (00744710) --------------------------------------------------------
int __cdecl luaD_rawrunprotected(lua_State *L, void (__cdecl *f)(lua_State *, void *), void *ud)
{
  unsigned __int16 oldnCcalls; // [sp+Ch] [bp-54h]@1
  lua_longjmp lj; // [sp+14h] [bp-4Ch]@1

  oldnCcalls = L->nCcalls;
  lj.status = 0;
  lj.previous = L->errorJmp;
  L->errorJmp = &lj;
  if ( !_setjmp3(lj.b, 0) )
    f(L, ud);
  L->errorJmp = lj.previous;
  L->nCcalls = oldnCcalls;
  return lj.status;
}

//----- (00744790) --------------------------------------------------------
void __cdecl luaD_reallocstack(lua_State *L, int newsize)
{
  lua_State *v2; // esi@1
  lua_TValue *v3; // eax@1
  int v4; // edi@1
  lua_TValue *v5; // eax@5
  lua_TValue *v6; // edi@5
  GCObject *v7; // eax@5
  CallInfo *i; // eax@7
  lua_TValue *oldstack; // [sp+14h] [bp+8h]@1

  v2 = L;
  v3 = L->stack;
  v4 = L->stacksize;
  oldstack = L->stack;
  if ( (unsigned int)(newsize + 1) > 0x1FFFFFFF )
    luaM_toobig(v2);
  for ( v2->stack = (lua_TValue *)luaM_realloc_(v2, v3, 8 * v4, 8 * newsize); v4 < newsize; ++v4 )
    v2->stack[v4].u.i.tt__ = 2146936064;
  v5 = v2->stack;
  v6 = v2->top;
  v2->stack_last = &v5[newsize - 5];
  v2->top = &v5[v6 - oldstack];
  v7 = v2->openupval;
  for ( v2->stacksize = newsize; v7; v7 = v7->gch.next )
    v7->ts.tsv.hash = (unsigned int)&v2->stack[(signed int)(v7->ts.tsv.hash - (signed int)oldstack) >> 3];
  for ( i = v2->ci; i; i = i->previous )
  {
    i->top = &v2->stack[i->top - oldstack];
    i->func = &v2->stack[i->func - oldstack];
    if ( i->callstatus & 1 )
      i->u.c.ctx = (int)&v2->stack[(i->u.c.ctx - (signed int)oldstack) >> 3];
  }
}

//----- (00744880) --------------------------------------------------------
void __cdecl luaD_growstack(lua_State *L, int n)
{
  int v2; // eax@1
  int v3; // eax@3

  v2 = L->stacksize;
  if ( v2 > 1000000 )
    luaD_throw(L, 6);
  v3 = 2 * v2;
  if ( v3 > 1000000 )
    v3 = 1000000;
  if ( v3 < L->top - L->stack + n + 5 )
    v3 = L->top - L->stack + n + 5;
  if ( v3 > 1000000 )
  {
    luaD_reallocstack(L, 1000200);
    luaG_runerror(L, "stack overflow");
  }
  luaD_reallocstack(L, v3);
}

//----- (007448F0) --------------------------------------------------------
void __cdecl luaD_shrinkstack(lua_State *L)
{
  CallInfo *v1; // ecx@1
  lua_TValue *i; // eax@1
  signed int v3; // ecx@5
  int v4; // eax@5

  v1 = L->ci;
  for ( i = L->top; v1; v1 = v1->previous )
  {
    if ( i < v1->top )
      i = v1->top;
  }
  v3 = i - L->stack + 1;
  v4 = v3 / 8 + v3 + 10;
  if ( v4 > 1000000 )
    v4 = 1000000;
  if ( v3 <= 1000000 && v4 < L->stacksize )
    luaD_reallocstack(L, v4);
}

//----- (00744950) --------------------------------------------------------
void __cdecl luaD_hook(lua_State *L, int event, int line)
{
  lua_TValue *v3; // eax@3
  lua_TValue *v4; // ecx@3
  CallInfo *v5; // edi@3
  int v6; // edx@3
  int v7; // ebx@3
  signed int v8; // ecx@3
  char *v9; // ecx@5
  void (__cdecl *hook)(lua_State *, lua_Debug *); // [sp+4h] [bp-70h]@1
  int ci_top; // [sp+8h] [bp-6Ch]@3
  lua_Debug ar; // [sp+Ch] [bp-68h]@3

  hook = L->hook;
  if ( hook && L->allowhook )
  {
    v3 = L->top;
    v4 = L->stack;
    v5 = L->ci;
    v6 = (char *)v5->top - (char *)v4;
    v7 = (char *)v3 - (char *)v4;
    ar.event = event;
    ci_top = v6;
    v8 = (unsigned int)((char *)L->stack_last - (char *)v3) & 0xFFFFFFF8;
    ar.currentline = line;
    ar.i_ci = v5;
    if ( v8 <= 160 )
      luaD_growstack(L, 20);
    v5->top = L->top + 20;
    L->allowhook = 0;
    v5->callstatus |= 2u;
    hook(L, &ar);
    v9 = (char *)L->stack + ci_top;
    L->allowhook = 1;
    v5->top = (lua_TValue *)v9;
    L->top = (lua_TValue *)((char *)L->stack + v7);
    v5->callstatus &= 0xFDu;
  }
}

//----- (00744A10) --------------------------------------------------------
lua_TValue *__usercall tryfuncTM@<eax>(lua_State *L@<esi>, lua_TValue *func@<edi>)
{
  lua_TValue *v2; // ebx@1
  signed int v3; // ecx@1
  lua_TValue *v4; // eax@3
  int v5; // ecx@4
  lua_TValue *v6; // eax@7
  int v7; // ecx@8
  int v8; // ecx@10
  int v9; // eax@10
  lua_TValue *result; // eax@18
  int funcr; // [sp+4h] [bp-4h]@1

  v2 = luaT_gettmbyobj(L, func, TM_CALL);
  v3 = (char *)func - (char *)L->stack;
  funcr = (char *)func - (char *)L->stack;
  if ( (v2->u.i.tt__ | 0x70) != 2146936182 )
    luaG_typeerror(L, func, "call");
  v4 = L->top;
  if ( v4 > func )
  {
    v5 = (int)&v4[-1];
    do
    {
      v4->u.i.v__.b = *(_DWORD *)v5;
      v4->u.i.tt__ = *(_DWORD *)(v5 + 4);
      --v4;
      v5 -= 8;
    }
    while ( v4 > func );
    v3 = funcr;
  }
  ++L->top;
  v6 = L->top;
  if ( (signed int)((unsigned int)((char *)L->stack_last - (char *)v6) & 0xFFFFFFF8) <= 0 )
  {
    v7 = L->stacksize;
    if ( v7 > 1000000 )
      luaD_throw(L, 6);
    v8 = 2 * v7;
    v9 = v6 - L->stack + 5;
    if ( v8 > 1000000 )
      v8 = 1000000;
    if ( v8 < v9 )
      v8 = v9;
    if ( v8 > 1000000 )
    {
      luaD_reallocstack(L, 1000200);
      luaG_runerror(L, "stack overflow");
    }
    luaD_reallocstack(L, v8);
    v3 = funcr;
  }
  result = (lua_TValue *)((char *)L->stack + v3);
  result->u.i.v__.b = v2->u.i.v__.b;
  result->u.i.tt__ = v2->u.i.tt__;
  return result;
}

//----- (00744AF0) --------------------------------------------------------
int __cdecl luaD_poscall(lua_State *L, lua_TValue *firstResult)
{
  lua_State *v2; // esi@1
  char v3; // al@1
  CallInfo *v4; // ebx@1
  signed int v5; // edi@3
  lua_TValue *v6; // edx@3
  int v7; // edi@6
  lua_TValue *v8; // eax@6
  int v9; // ecx@6
  lua_TValue *v10; // edi@7
  lua_TValue *v11; // esi@9
  int v12; // edx@9
  int wanted; // [sp+Ch] [bp-4h]@6

  v2 = L;
  v3 = L->hookmask;
  v4 = L->ci;
  if ( v3 & 6 )
  {
    if ( v3 & 2 )
    {
      v5 = (char *)firstResult - (char *)L->stack;
      luaD_hook(L, 1, -1);
      v6 = (lua_TValue *)((char *)L->stack + v5);
      L->oldpc = v4->previous->u.l.savedpc;
    }
    else
    {
      v6 = firstResult;
      L->oldpc = v4->previous->u.l.savedpc;
    }
  }
  else
  {
    v6 = firstResult;
  }
  v7 = v4->nresults;
  v8 = v4->func;
  L->ci = v4->previous;
  wanted = v7;
  v9 = v7;
  if ( v7 )
  {
    v10 = v6;
    do
    {
      if ( v10 >= v2->top )
        break;
      v11 = v8;
      v8->u.i.v__.b = v10->u.i.v__.b;
      v12 = v10->u.i.tt__;
      ++v8;
      ++v10;
      --v9;
      v11->u.i.tt__ = v12;
      v2 = L;
    }
    while ( v9 );
    v7 = wanted;
  }
  for ( ; v9 > 0; ++v8 )
  {
    --v9;
    v8->u.i.tt__ = 2146936064;
  }
  v2->top = v8;
  return v7 + 1;
}

//----- (00744BA0) --------------------------------------------------------
void __cdecl unroll(lua_State *L)
{
  CallInfo *v1; // eax@2
  char v2; // cl@3
  CallInfo *v3; // ecx@6
  lua_TValue *v4; // edx@6
  char v5; // cl@8
  const unsigned int *v6; // edx@10
  int v7; // eax@10

  while ( L->ci != &L->base_ci )
  {
    v1 = L->ci;
    if ( v1->callstatus & 1 )
    {
      luaV_finishOp(L);
      luaV_execute(L);
    }
    else
    {
      v2 = v1->callstatus;
      if ( v2 & 0x10 )
      {
        v1->callstatus = v2 & 0xEF;
        L->errfunc = v1->u.c.old_errfunc;
      }
      if ( v1->nresults == -1 )
      {
        v3 = L->ci;
        v4 = L->top;
        if ( v3->top < v4 )
          v3->top = v4;
      }
      v5 = v1->callstatus;
      if ( !(v5 & 0x20) )
        v1->u.c.status = 1;
      v6 = v1->u.l.savedpc;
      v1->callstatus = v5 & 0xCF | 8;
      v7 = ((int (__cdecl *)(_DWORD))v6)(L);
      luaD_poscall(L, &L->top[-v7]);
    }
  }
}

//----- (00744C30) --------------------------------------------------------
int __usercall recover@<eax>(lua_State *L@<eax>, int status)
{
  lua_State *v2; // edi@1
  CallInfo *v3; // esi@1
  int result; // eax@4
  lua_TValue *v5; // ebx@5

  v2 = L;
  v3 = L->ci;
  if ( v3 )
  {
    while ( !(v3->callstatus & 0x10) )
    {
      v3 = v3->previous;
      if ( !v3 )
        goto LABEL_4;
    }
    v5 = (lua_TValue *)((char *)L->stack + v3->extra);
    luaF_close(L, v5);
    seterrorobj(v2, status, v5);
    v2->ci = v3;
    v2->allowhook = v3->u.c.old_allowhook;
    v2->nny = 0;
    luaD_shrinkstack(v2);
    v2->errfunc = v3->u.c.old_errfunc;
    v3->callstatus |= 0x20u;
    v3->u.c.status = status;
    result = 1;
  }
  else
  {
LABEL_4:
    result = 0;
  }
  return result;
}

//----- (00744CA0) --------------------------------------------------------
void __usercall __noreturn resume_error(lua_State *L@<esi>, const char *msg@<eax>, lua_TValue *firstArg@<edi>)
{
  GCObject *v3; // eax@1
  lua_State *v4; // [sp+0h] [bp-8h]@0
  const char *v5; // [sp+4h] [bp-4h]@0

  L->top = firstArg;
  v3 = luaS_new(v4, v5);
  firstArg->u.i.v__.b = (int)v3;
  firstArg->u.i.tt__ = v3->cl.c.tt | 0x7FF7A540;
  ++L->top;
  luaD_throw(L, -1);
}

//----- (00744CD0) --------------------------------------------------------
int __cdecl lua_yieldk(lua_State *L, int nresults, int ctx, int (__cdecl *k)(lua_State *))
{
  CallInfo *v4; // ecx@1
  bool v5; // zf@5

  v4 = L->ci;
  if ( L->nny )
  {
    if ( L != L->l_G->mainthread )
      luaG_runerror(L, "attempt to yield across a C-call boundary");
    luaG_runerror(L, "attempt to yield from outside a coroutine");
  }
  L->status = 1;
  v5 = (v4->callstatus & 1) == 0;
  v4->extra = (char *)v4->func - (char *)L->stack;
  if ( v5 )
  {
    v4->u.l.savedpc = (const unsigned int *)k;
    if ( k )
      v4->u.c.ctx = ctx;
    v4->func = &L->top[-nresults - 1];
    luaD_throw(L, 1);
  }
  return 0;
}

//----- (00744D50) --------------------------------------------------------
int __cdecl luaD_pcall(lua_State *L, void (__cdecl *func)(lua_State *, void *), void *u, int old_top, int ef)
{
  lua_State *v5; // edi@1
  unsigned __int16 v6; // dx@1
  CallInfo *v7; // eax@1
  int v8; // esi@1
  int result; // eax@1
  int v10; // ebx@1
  lua_TValue *v11; // esi@2
  int old_errfunc; // [sp+Ch] [bp-Ch]@1
  unsigned __int16 old_nny; // [sp+10h] [bp-8h]@1
  CallInfo *old_ci; // [sp+14h] [bp-4h]@1
  char old_allowhooks_3; // [sp+23h] [bp+Bh]@1

  v5 = L;
  v6 = L->nny;
  v7 = L->ci;
  v8 = L->errfunc;
  old_allowhooks_3 = L->allowhook;
  old_nny = v6;
  old_ci = v7;
  old_errfunc = v8;
  v5->errfunc = ef;
  result = luaD_rawrunprotected(v5, func, u);
  v10 = result;
  if ( result )
  {
    v11 = (lua_TValue *)((char *)v5->stack + old_top);
    luaF_close(v5, (lua_TValue *)((char *)v5->stack + old_top));
    seterrorobj(v5, v10, v11);
    v5->ci = old_ci;
    v5->allowhook = old_allowhooks_3;
    v5->nny = old_nny;
    luaD_shrinkstack(v5);
    v5->errfunc = old_errfunc;
    result = v10;
  }
  else
  {
    v5->errfunc = v8;
  }
  return result;
}

//----- (00744DE0) --------------------------------------------------------
void __cdecl f_parser(lua_State *L, void *ud)
{
  int v2; // ecx@1
  int *v3; // eax@1
  _BYTE *v4; // ecx@2
  int v5; // ebx@2
  char *v6; // edi@4
  int v7; // eax@6
  GCObject *v8; // eax@9
  int v9; // eax@11
  GCObject *v10; // esi@15
  signed int v11; // ebx@15
  _DWORD *v12; // edi@16
  GCObject *v13; // eax@17

  v2 = **(_DWORD **)ud;
  **(_DWORD **)ud = v2 - 1;
  v3 = *(int **)ud;
  if ( v2 )
  {
    v4 = (_BYTE *)v3[1];
    v5 = *v4;
    v3[1] = (int)(v4 + 1);
  }
  else
  {
    v5 = luaZ_fill(*(Zio **)ud);
  }
  v6 = (char *)*((_DWORD *)ud + 13);
  if ( v5 == 27 )
  {
    if ( v6 )
    {
      strchr(v6, 98);
      if ( !v7 )
      {
        luaO_pushfstring(L, "attempt to load a %s chunk (mode is '%s')", "binary", v6);
        luaD_throw(L, 3);
      }
    }
    v8 = luaU_undump(L, *(Zio **)ud, (Mbuffer *)((char *)ud + 4), *((const char **)ud + 14));
  }
  else
  {
    if ( v6 )
    {
      strchr(v6, 116);
      if ( !v9 )
      {
        luaO_pushfstring(L, "attempt to load a %s chunk (mode is '%s')", "text", v6);
        luaD_throw(L, 3);
      }
    }
    v8 = luaY_parser(
           L,
           *(Zio **)ud,
           (Mbuffer *)((char *)ud + 4),
           (Dyndata *)((char *)ud + 16),
           *((const char **)ud + 14),
           v5);
  }
  v10 = v8;
  v11 = 0;
  if ( *(&v8->p.marked + 1) )
  {
    v12 = &v8->p.p;
    do
    {
      v13 = luaF_newupval(L);
      *v12 = v13;
      if ( v13->h.marked & 3 && v10->h.marked & 4 )
        luaC_barrier_(L, v10, v13);
      ++v11;
      ++v12;
    }
    while ( v11 < *(&v10->p.marked + 1) );
  }
}

//----- (00744F00) --------------------------------------------------------
int __cdecl luaD_protectedparser(lua_State *L, Zio *z, const char *name, const char *mode)
{
  lua_State *v4; // esi@1
  int v5; // ecx@1
  int v6; // ST40_4@1
  int v7; // ebx@1
  SParser p; // [sp+Ch] [bp-3Ch]@1

  v4 = L;
  ++v4->nny;
  p.name = name;
  v5 = (char *)v4->top - (char *)v4->stack;
  p.z = z;
  v6 = L->errfunc;
  p.mode = mode;
  p.dyd.actvar.arr = 0;
  p.dyd.actvar.size = 0;
  p.dyd.gt.arr = 0;
  p.dyd.gt.size = 0;
  p.dyd.label.arr = 0;
  p.dyd.label.size = 0;
  p.buff.buffer = 0;
  p.buff.buffsize = 0;
  v7 = luaD_pcall(L, f_parser, &p, v5, v6);
  p.buff.buffer = (char *)luaM_realloc_(L, p.buff.buffer, p.buff.buffsize, 0);
  p.buff.buffsize = 0;
  luaM_realloc_(L, p.dyd.actvar.arr, 2 * p.dyd.actvar.size, 0);
  luaM_realloc_(L, p.dyd.gt.arr, 16 * p.dyd.gt.size, 0);
  luaM_realloc_(L, p.dyd.label.arr, 16 * p.dyd.label.size, 0);
  --v4->nny;
  return v7;
}

//----- (00744FC0) --------------------------------------------------------
int __cdecl luaD_precall(lua_State *L, lua_TValue *func, int nresults)
{
  lua_TValue *v3; // eax@1
  lua_State *v4; // esi@1
  int v5; // ecx@2
  unsigned int v6; // edi@2
  int v7; // ecx@4
  int (__cdecl *v8)(lua_State *); // ebx@8
  CallInfo *v9; // eax@12
  int v10; // eax@18
  int v12; // ebx@19
  char *v13; // ecx@21
  int v14; // eax@21
  int v15; // edi@25
  lua_TValue *v16; // eax@25
  lua_TValue *v17; // ecx@26
  CallInfo *v18; // edi@28
  CallInfo *v19; // eax@29
  int v20; // edx@30
  lua_TValue *v21; // ecx@30
  global_State *v22; // edx@30
  CallInfo *v23; // eax@33
  int v24; // ecx@33
  lua_TValue *base; // [sp+14h] [bp+8h]@24
  lua_TValue *funca; // [sp+18h] [bp+Ch]@21

  v3 = func;
  v4 = L;
  while ( 1 )
  {
    v5 = v3->u.i.tt__;
    v6 = (char *)v3 - (char *)L->stack;
    if ( (v3->u.i.tt__ & 0x7FFFFF00) != 2146936064 )
      LOBYTE(v5) = 3;
    v7 = v5 & 0x3F;
    if ( v7 == 6 )
      break;
    if ( v7 == 22 )
    {
      v8 = (int (__cdecl *)(lua_State *))v3->u.i.v__.b;
      goto Cfunc;
    }
    if ( v7 == 38 )
    {
      v8 = *(int (__cdecl **)(lua_State *))(v3->u.i.v__.b + 12);
Cfunc:
      if ( (signed int)(((char *)L->stack_last - (char *)L->top) & 0xFFFFFFF8) <= 160 )
        luaD_growstack(L, 20);
      v9 = L->ci->next;
      if ( !v9 )
        v9 = luaE_extendCI(L);
      L->ci = v9;
      v9->nresults = nresults;
      v9->func = (lua_TValue *)((char *)L->stack + v6);
      v9->top = L->top + 20;
      v9->callstatus = 0;
      if ( L->l_G->GCdebt > 0 )
        luaC_step(L);
      if ( L->hookmask & 1 )
        luaD_hook(L, 0, -1);
      v10 = v8(L);
      luaD_poscall(L, &L->top[-v10]);
      return 1;
    }
    v3 = tryfuncTM(L, v3);
  }
  v12 = *(_DWORD *)(v3->u.i.v__.b + 12);
  if ( L->stack_last - L->top <= *(_BYTE *)(v12 + 78) )
    luaD_growstack(L, *(_BYTE *)(v12 + 78));
  v13 = (char *)L->stack + v6;
  v14 = (((char *)L->top - v13) >> 3) - 1;
  for ( funca = (lua_TValue *)((char *)L->stack + v6); v14 < *(_BYTE *)(v12 + 76); ++v14 )
  {
    L->top->u.i.tt__ = 2146936064;
    ++L->top;
  }
  if ( *(_BYTE *)(v12 + 77) )
  {
    v15 = *(_BYTE *)(v12 + 76);
    v16 = &L->top[-v14];
    base = L->top;
    if ( v15 > 0 )
    {
      do
      {
        v17 = v4->top;
        v4->top = v17 + 1;
        v17->u.i.v__.b = v16->u.i.v__.b;
        v17->u.i.tt__ = v16->u.i.tt__;
        v16->u.i.tt__ = 2146936064;
        ++v16;
        --v15;
      }
      while ( v15 );
    }
    v13 = (char *)funca;
  }
  else
  {
    base = (lua_TValue *)(v13 + 8);
  }
  v18 = v4->ci->next;
  if ( !v18 )
  {
    v19 = luaE_extendCI(v4);
    v13 = (char *)funca;
    v18 = v19;
  }
  v4->ci = v18;
  v18->nresults = nresults;
  v18->func = (lua_TValue *)v13;
  v18->u.c.ctx = (int)base;
  v20 = (int)&base[*(_BYTE *)(v12 + 78)];
  v18->top = (lua_TValue *)v20;
  v18->u.l.savedpc = *(const unsigned int **)(v12 + 12);
  v18->callstatus = 1;
  v21 = (lua_TValue *)v20;
  v22 = v4->l_G;
  v4->top = v21;
  if ( v22->GCdebt > 0 )
    luaC_step(v4);
  if ( v4->hookmask & 1 )
  {
    v23 = v18->previous;
    ++v18->u.l.savedpc;
    v24 = 0;
    if ( v23->callstatus & 1 && (*((_BYTE *)v23->u.l.savedpc - 4) & 0x3F) == 30 )
    {
      v18->callstatus |= 0x40u;
      v24 = 4;
    }
    luaD_hook(v4, v24, -1);
    --v18->u.l.savedpc;
  }
  return 0;
}

//----- (00745200) --------------------------------------------------------
void __cdecl luaD_call(lua_State *L, lua_TValue *func, int nResults, int allowyield)
{
  unsigned __int16 v4; // ax@1

  v4 = ++L->nCcalls;
  if ( v4 >= 0xC8u )
  {
    if ( v4 == 200 )
      luaG_runerror(L, "C stack overflow");
    if ( v4 >= 0xE1u )
      luaD_throw(L, 6);
  }
  if ( !allowyield )
    ++L->nny;
  if ( !luaD_precall(L, func, nResults) )
    luaV_execute(L);
  if ( !allowyield )
    --L->nny;
  --L->nCcalls;
}

//----- (00745290) --------------------------------------------------------
void __cdecl resume(lua_State *L, void *ud)
{
  CallInfo *v2; // eax@1
  lua_TValue *v3; // edx@1
  char v4; // cl@3
  char *v5; // ecx@10
  const unsigned int *v6; // edi@12

  v2 = L->ci;
  v3 = (lua_TValue *)ud;
  if ( L->nCcalls >= 0xC8u )
    resume_error(L, "C stack overflow", (lua_TValue *)ud);
  v4 = L->status;
  if ( v4 )
  {
    if ( v4 != 1 )
      resume_error(L, "cannot resume dead coroutine", (lua_TValue *)ud);
    L->status = 0;
    v5 = (char *)L->stack + v2->extra;
    v2->func = (lua_TValue *)v5;
    LOBYTE(v5) = v2->callstatus;
    if ( (unsigned __int8)v5 & 1 )
    {
      luaV_execute(L);
      unroll(L);
    }
    else
    {
      v6 = v2->u.l.savedpc;
      if ( v6 )
      {
        LOBYTE(v5) = (unsigned __int8)v5 | 8;
        v2->u.c.status = 1;
        v2->callstatus = (char)v5;
        v3 = &L->top[-((int (__fastcall *)(_DWORD, _DWORD))v6)(v5, ud)];
      }
      luaD_poscall(L, v3);
      unroll(L);
    }
  }
  else
  {
    if ( v2 != &L->base_ci )
      resume_error(L, "cannot resume non-suspended coroutine", (lua_TValue *)ud);
    if ( !luaD_precall(L, (lua_TValue *)ud - 1, -1) )
      luaV_execute(L);
  }
}

//----- (00745370) --------------------------------------------------------
int __cdecl lua_resume(lua_State *L, lua_State *from, int nargs)
{
  unsigned __int16 v3; // ax@2
  int v4; // eax@4
  int v5; // ebx@4
  lua_TValue *v6; // ecx@11

  if ( from )
    v3 = from->nCcalls + 1;
  else
    v3 = 1;
  L->nCcalls = v3;
  L->nny = 0;
  v4 = luaD_rawrunprotected(L, resume, &L->top[-nargs]);
  v5 = v4;
  if ( v4 == -1 )
  {
    v5 = 2;
  }
  else if ( v4 )
  {
    while ( v5 != 1 )
    {
      if ( !recover(L, v5) )
      {
        v6 = L->top;
        L->status = v5;
        seterrorobj(L, v5, v6);
        L->ci->top = L->top;
        break;
      }
      v5 = luaD_rawrunprotected(L, (void (__cdecl *)(lua_State *, void *))unroll, 0);
      if ( !v5 )
        break;
    }
  }
  --L->nCcalls;
  L->nny = 1;
  return v5;
}

//----- (00745420) --------------------------------------------------------
void __cdecl luaC_barrierback_(lua_State *L, GCObject *o)
{
  global_State *v2; // ecx@1

  v2 = L->l_G;
  o->h.marked &= 0xFBu;
  o->h.gclist = v2->grayagain;
  v2->grayagain = o;
}

//----- (00745440) --------------------------------------------------------
GCObject *__cdecl luaC_newobj(lua_State *L, int tt, unsigned int sz, GCObject **list, int offset)
{
  global_State *v5; // esi@1
  char *v6; // eax@1
  GCObject **v7; // ecx@1
  GCObject *result; // eax@1
  char v9; // dl@3

  v5 = L->l_G;
  v6 = (char *)luaM_realloc_(L, 0, tt & 0xF, sz);
  v7 = list;
  result = (GCObject *)&v6[offset];
  if ( !list )
    v7 = &v5->allgc;
  v9 = v5->currentwhite & 3;
  result->cl.c.tt = tt;
  result->h.marked = v9;
  result->gch.next = *v7;
  *v7 = result;
  return result;
}

//----- (00745490) --------------------------------------------------------
void __cdecl reallymarkobject(global_State *g, GCObject *o)
{
  int v2; // eax@1
  unsigned int *v3; // eax@2
  unsigned int v4; // eax@3
  unsigned int *v5; // eax@6
  Proto **v6; // eax@9
  unsigned int v7; // ecx@10
  int v8; // eax@10
  GCObject *v9; // ecx@13

  v2 = o->cl.c.tt;
  o->h.marked &= 0xFCu;
  switch ( v2 )
  {
    case 4:
    case 20:
      v3 = (unsigned int *)o->ts.tsv.len;
      o->h.marked |= 4u;
      g->GCmemtrav += (unsigned int)v3 + 17;
      break;
    case 7:
      v4 = o->ts.tsv.hash;
      if ( v4 && *(_BYTE *)(v4 + 5) & 3 )
        reallymarkobject(g, (GCObject *)o->ts.tsv.hash);
      v5 = (unsigned int *)o->ts.tsv.len;
      if ( v5 )
      {
        if ( *((_BYTE *)v5 + 5) & 3 )
          reallymarkobject(g, (GCObject *)o->ts.tsv.len);
      }
      v6 = (Proto **)o->u.uv.len;
      o->h.marked |= 4u;
      g->GCmemtrav += (unsigned int)(v6 + 6);
      break;
    case 10:
      v7 = o->ts.tsv.hash;
      v8 = *(_DWORD *)(v7 + 4);
      if ( (*(_DWORD *)(v7 + 4) & 0x7FFFFF00) != 2146936064 )
        LOBYTE(v8) = 3;
      if ( v8 & 0x40 )
      {
        v9 = *(GCObject **)v7;
        if ( v9->h.marked & 3 )
          reallymarkobject(g, v9);
      }
      if ( (CallInfo **)o->ts.tsv.hash == &o->th.ci )
      {
        o->h.marked |= 4u;
        g->GCmemtrav += 24;
      }
      break;
    case 6:
      o->ts.tsv.hash = (unsigned int)g->gray;
      g->gray = o;
      break;
    case 38:
      o->ts.tsv.hash = (unsigned int)g->gray;
      g->gray = o;
      break;
    case 5:
      o->h.gclist = g->gray;
      g->gray = o;
      break;
    case 8:
      o->p.sizelocvars = (int)g->gray;
      g->gray = o;
      break;
    case 9:
      o->p.gclist = g->gray;
      g->gray = o;
      break;
    default:
      return;
  }
}

//----- (007455F0) --------------------------------------------------------
void __usercall markmt(global_State *g@<edi>)
{
  int v1; // esi@2
  int v2; // eax@4
  int v3; // eax@5
  int v4; // eax@6
  int v5; // eax@9
  int v6; // eax@12
  int v7; // ecx@13
  int v8; // eax@13
  GCObject *v9; // ecx@16
  signed int v10; // [sp+8h] [bp-8h]@1
  char *v11; // [sp+Ch] [bp-4h]@1

  v11 = (char *)g->mt;
  v10 = 9;
  do
  {
    v1 = *(_DWORD *)v11;
    if ( *(_DWORD *)v11 && *(_BYTE *)(v1 + 5) & 3 )
    {
      v2 = *(_BYTE *)(v1 + 4);
      *(_BYTE *)(v1 + 5) &= 0xFCu;
      switch ( v2 )
      {
        case 4:
        case 20:
          v3 = *(_DWORD *)(v1 + 12);
          *(_BYTE *)(v1 + 5) |= 4u;
          g->GCmemtrav += v3 + 17;
          break;
        case 7:
          v4 = *(_DWORD *)(v1 + 8);
          if ( v4 && *(_BYTE *)(v4 + 5) & 3 )
            reallymarkobject(g, *(GCObject **)(v1 + 8));
          v5 = *(_DWORD *)(v1 + 12);
          if ( v5 )
          {
            if ( *(_BYTE *)(v5 + 5) & 3 )
              reallymarkobject(g, *(GCObject **)(v1 + 12));
          }
          v6 = *(_DWORD *)(v1 + 16);
          *(_BYTE *)(v1 + 5) |= 4u;
          g->GCmemtrav += v6 + 24;
          break;
        case 10:
          v7 = *(_DWORD *)(v1 + 8);
          v8 = *(_DWORD *)(v7 + 4);
          if ( (*(_DWORD *)(v7 + 4) & 0x7FFFFF00) != 2146936064 )
            LOBYTE(v8) = 3;
          if ( v8 & 0x40 )
          {
            v9 = *(GCObject **)v7;
            if ( v9->h.marked & 3 )
              reallymarkobject(g, v9);
          }
          if ( *(_DWORD *)(v1 + 8) == v1 + 16 )
          {
            *(_BYTE *)(v1 + 5) |= 4u;
            g->GCmemtrav += 24;
          }
          break;
        case 6:
          *(_DWORD *)(v1 + 8) = g->gray;
          goto LABEL_25;
        case 38:
          *(_DWORD *)(v1 + 8) = g->gray;
          goto LABEL_25;
        case 5:
          *(_DWORD *)(v1 + 24) = g->gray;
          goto LABEL_25;
        case 8:
          *(_DWORD *)(v1 + 60) = g->gray;
          goto LABEL_25;
        case 9:
          *(_DWORD *)(v1 + 72) = g->gray;
LABEL_25:
          g->gray = (GCObject *)v1;
          break;
        default:
          break;
      }
    }
    v11 += 4;
    --v10;
  }
  while ( v10 );
}

//----- (00745770) --------------------------------------------------------
void __usercall markbeingfnz(global_State *g@<edi>)
{
  GCObject *i; // esi@1
  int v2; // eax@2
  unsigned int *v3; // eax@3
  unsigned int v4; // eax@4
  unsigned int *v5; // eax@7
  Proto **v6; // eax@10
  unsigned int v7; // ecx@11
  int v8; // eax@11
  GCObject *v9; // ecx@14

  for ( i = g->tobefnz; i; i = i->gch.next )
  {
    v2 = i->cl.c.tt;
    i->h.marked &= 0xB8u;
    switch ( v2 )
    {
      case 4:
      case 20:
        v3 = (unsigned int *)i->ts.tsv.len;
        i->h.marked |= 4u;
        g->GCmemtrav += (unsigned int)v3 + 17;
        continue;
      case 7:
        v4 = i->ts.tsv.hash;
        if ( v4 && *(_BYTE *)(v4 + 5) & 3 )
          reallymarkobject(g, (GCObject *)i->ts.tsv.hash);
        v5 = (unsigned int *)i->ts.tsv.len;
        if ( v5 )
        {
          if ( *((_BYTE *)v5 + 5) & 3 )
            reallymarkobject(g, (GCObject *)i->ts.tsv.len);
        }
        v6 = (Proto **)i->u.uv.len;
        i->h.marked |= 4u;
        g->GCmemtrav += (unsigned int)(v6 + 6);
        continue;
      case 10:
        v7 = i->ts.tsv.hash;
        v8 = *(_DWORD *)(v7 + 4);
        if ( (*(_DWORD *)(v7 + 4) & 0x7FFFFF00) != 2146936064 )
          LOBYTE(v8) = 3;
        if ( v8 & 0x40 )
        {
          v9 = *(GCObject **)v7;
          if ( v9->h.marked & 3 )
            reallymarkobject(g, v9);
        }
        if ( (CallInfo **)i->ts.tsv.hash == &i->th.ci )
        {
          i->h.marked |= 4u;
          g->GCmemtrav += 24;
        }
        continue;
      case 6:
        i->ts.tsv.hash = (unsigned int)g->gray;
        goto LABEL_23;
      case 38:
        i->ts.tsv.hash = (unsigned int)g->gray;
        goto LABEL_23;
      case 5:
        i->h.gclist = g->gray;
        goto LABEL_23;
      case 8:
        i->p.sizelocvars = (int)g->gray;
        goto LABEL_23;
      case 9:
        i->p.gclist = g->gray;
LABEL_23:
        g->gray = i;
        break;
      default:
        continue;
    }
  }
}

//----- (007458D0) --------------------------------------------------------
void __usercall remarkupvals(global_State *g@<edi>)
{
  int i; // esi@1
  int v2; // ecx@3
  int v3; // eax@3
  GCObject *v4; // ecx@6

  for ( i = g->uvhead.u.value.u.i.tt__; (UpVal *)i != &g->uvhead; i = *(_DWORD *)(i + 20) )
  {
    if ( !(*(_BYTE *)(i + 5) & 7) )
    {
      v2 = *(_DWORD *)(i + 8);
      v3 = *(_DWORD *)(v2 + 4);
      if ( (*(_DWORD *)(v2 + 4) & 0x7FFFFF00) != 2146936064 )
        LOBYTE(v3) = 3;
      if ( v3 & 0x40 )
      {
        v4 = *(GCObject **)v2;
        if ( v4->h.marked & 3 )
          reallymarkobject(g, v4);
      }
    }
  }
}

//----- (00745930) --------------------------------------------------------
void __usercall restartcollection(global_State *g@<eax>)
{
  global_State *v1; // edi@1
  GCObject *v2; // eax@1
  int v3; // eax@4

  v1 = g;
  v2 = (GCObject *)&g->mainthread->next;
  v1->grayagain = 0;
  v1->gray = 0;
  v1->ephemeron = 0;
  v1->allweak = 0;
  v1->weak = 0;
  if ( v2 && v2->h.marked & 3 )
    reallymarkobject(v1, v2);
  v3 = v1->l_registry.u.i.tt__;
  if ( (v1->l_registry.u.i.tt__ & 0x7FFFFF00) != 2146936064 )
    LOBYTE(v3) = 3;
  if ( v3 & 0x40 && *(_BYTE *)(v1->l_registry.u.i.v__.b + 5) & 3 )
    reallymarkobject(v1, v1->l_registry.u.i.v__.gc);
  markmt(v1);
  markbeingfnz(v1);
}

//----- (007459A0) --------------------------------------------------------
void __usercall traversestrongtable(Table *h@<eax>, global_State *g)
{
  Table *v2; // esi@1
  int v3; // edi@1
  int v4; // ecx@2
  int v5; // eax@2
  GCObject *v6; // ecx@5
  Node *i; // esi@8
  int v8; // eax@9
  int v9; // ecx@9
  int v10; // eax@20
  Node *limit; // [sp+Ch] [bp-4h]@1

  v2 = h;
  v3 = 0;
  for ( limit = &h->node[1 << h->lsizenode]; v3 < v2->sizearray; ++v3 )
  {
    v4 = (int)&v2->array[v3];
    v5 = *(_DWORD *)(v4 + 4);
    if ( (*(_DWORD *)(v4 + 4) & 0x7FFFFF00) != 2146936064 )
      LOBYTE(v5) = 3;
    if ( v5 & 0x40 )
    {
      v6 = *(GCObject **)v4;
      if ( v6->h.marked & 3 )
        reallymarkobject(g, v6);
    }
  }
  for ( i = v2->node; i < limit; ++i )
  {
    v8 = i->i_key.nk.u.i.tt__;
    v9 = i->i_key.nk.u.i.tt__ & 0x7FFFFF00;
    if ( i->i_val.u.i.tt__ == 2146936064 )
    {
      if ( v9 != 2146936064 )
        LOBYTE(v8) = 3;
      if ( v8 & 0x40 )
      {
        if ( *(_BYTE *)(i->i_key.nk.u.i.v__.b + 5) & 3 )
          i->i_key.nk.u.i.tt__ = 2146936075;
      }
    }
    else
    {
      if ( v9 != 2146936064 )
        LOBYTE(v8) = 3;
      if ( v8 & 0x40 && *(_BYTE *)(i->i_key.nk.u.i.v__.b + 5) & 3 )
        reallymarkobject(g, i->i_key.nk.u.i.v__.gc);
      v10 = i->i_val.u.i.tt__;
      if ( (i->i_val.u.i.tt__ & 0x7FFFFF00) != 2146936064 )
        LOBYTE(v10) = 3;
      if ( v10 & 0x40 && *(_BYTE *)(i->i_val.u.i.v__.b + 5) & 3 )
        reallymarkobject(g, i->i_val.u.i.v__.gc);
    }
  }
}

//----- (00745AD0) --------------------------------------------------------
int __usercall traverseproto@<eax>(Proto *f@<esi>, global_State *g)
{
  Closure *v2; // eax@1
  GCObject *v3; // eax@4
  global_State *v4; // ebx@6
  int i; // edi@8
  lua_TValue *v6; // ecx@9
  int v7; // eax@9
  GCObject *v8; // ecx@12
  int j; // edi@15
  TString *v10; // eax@16
  int k; // edi@20
  Proto **v12; // ecx@21
  int v13; // ebx@25
  int v14; // edi@26
  LocVar *v15; // edx@27
  TString *v16; // eax@27

  v2 = f->cache;
  if ( v2 && v2->l.marked & 3 )
    f->cache = 0;
  v3 = (GCObject *)f->source;
  if ( v3 && v3->h.marked & 3 )
  {
    v4 = g;
    reallymarkobject(g, v3);
  }
  else
  {
    v4 = g;
  }
  for ( i = 0; i < f->sizek; ++i )
  {
    v6 = &f->k[i];
    v7 = v6->u.i.tt__;
    if ( (v6->u.i.tt__ & 0x7FFFFF00) != 2146936064 )
      LOBYTE(v7) = 3;
    if ( v7 & 0x40 )
    {
      v8 = (GCObject *)v6->u.i.v__.b;
      if ( v8->h.marked & 3 )
        reallymarkobject(v4, v8);
    }
  }
  for ( j = 0; j < f->sizeupvalues; ++j )
  {
    v10 = f->upvalues[j].name;
    if ( v10 && v10->tsv.marked & 3 )
      reallymarkobject(v4, (GCObject *)f->upvalues[j].name);
  }
  for ( k = 0; k < f->sizep; ++k )
  {
    v12 = f->p;
    if ( v12[k] && v12[k]->marked & 3 )
      reallymarkobject(v4, (GCObject *)&v12[k]->next);
  }
  v13 = 0;
  if ( f->sizelocvars > 0 )
  {
    v14 = 0;
    do
    {
      v15 = f->locvars;
      v16 = v15[v14].varname;
      if ( v16 && v16->tsv.marked & 3 )
        reallymarkobject(g, (GCObject *)v15[v14].varname);
      ++v13;
      ++v14;
    }
    while ( v13 < f->sizelocvars );
  }
  return 4 * (f->sizep + f->sizecode + f->sizelineinfo + 3 * f->sizelocvars + 2 * (f->sizeupvalues + f->sizek) + 20);
}

//----- (00745C00) --------------------------------------------------------
int __usercall traverseCclosure@<eax>(global_State *g@<edi>, CClosure *cl)
{
  CClosure *v2; // eax@1
  char *v3; // ebx@2
  int v4; // eax@3
  int v5; // esi@6
  int v6; // eax@7
  int v7; // eax@8
  int v8; // eax@9
  int v9; // eax@12
  int v10; // eax@15
  int v11; // ecx@16
  int v12; // eax@16
  GCObject *v13; // ecx@19
  int i; // [sp+0h] [bp-4h]@1

  v2 = cl;
  i = 0;
  if ( cl->nupvalues )
  {
    v3 = (char *)cl->upvalue;
    do
    {
      v4 = *((_DWORD *)v3 + 1);
      if ( (*((_DWORD *)v3 + 1) & 0x7FFFFF00) != 2146936064 )
        LOBYTE(v4) = 3;
      if ( v4 & 0x40 )
      {
        v5 = *(_DWORD *)v3;
        if ( *(_BYTE *)(*(_DWORD *)v3 + 5) & 3 )
        {
          v6 = *(_BYTE *)(v5 + 4);
          *(_BYTE *)(v5 + 5) &= 0xFCu;
          switch ( v6 )
          {
            case 4:
            case 20:
              v7 = *(_DWORD *)(v5 + 12);
              *(_BYTE *)(v5 + 5) |= 4u;
              g->GCmemtrav += v7 + 17;
              break;
            case 7:
              v8 = *(_DWORD *)(v5 + 8);
              if ( v8 && *(_BYTE *)(v8 + 5) & 3 )
                reallymarkobject(g, *(GCObject **)(v5 + 8));
              v9 = *(_DWORD *)(v5 + 12);
              if ( v9 && *(_BYTE *)(v9 + 5) & 3 )
                reallymarkobject(g, *(GCObject **)(v5 + 12));
              v10 = *(_DWORD *)(v5 + 16);
              *(_BYTE *)(v5 + 5) |= 4u;
              g->GCmemtrav += v10 + 24;
              break;
            case 10:
              v11 = *(_DWORD *)(v5 + 8);
              v12 = *(_DWORD *)(v11 + 4);
              if ( (*(_DWORD *)(v11 + 4) & 0x7FFFFF00) != 2146936064 )
                LOBYTE(v12) = 3;
              if ( v12 & 0x40 )
              {
                v13 = *(GCObject **)v11;
                if ( v13->h.marked & 3 )
                  reallymarkobject(g, v13);
              }
              if ( *(_DWORD *)(v5 + 8) == v5 + 16 )
              {
                *(_BYTE *)(v5 + 5) |= 4u;
                g->GCmemtrav += 24;
              }
              break;
            case 6:
              *(_DWORD *)(v5 + 8) = g->gray;
              goto LABEL_28;
            case 38:
              *(_DWORD *)(v5 + 8) = g->gray;
              goto LABEL_28;
            case 5:
              *(_DWORD *)(v5 + 24) = g->gray;
              goto LABEL_28;
            case 8:
              *(_DWORD *)(v5 + 60) = g->gray;
              goto LABEL_28;
            case 9:
              *(_DWORD *)(v5 + 72) = g->gray;
LABEL_28:
              g->gray = (GCObject *)v5;
              break;
            default:
              break;
          }
        }
      }
      v2 = cl;
      v3 += 8;
      ++i;
    }
    while ( i < cl->nupvalues );
  }
  return 8 * v2->nupvalues + 16;
}

//----- (00745DB0) --------------------------------------------------------
int __usercall traverseLclosure@<eax>(global_State *g@<edi>, LClosure *cl)
{
  LClosure *v2; // esi@1
  Proto *v3; // eax@1
  signed int v4; // ebx@4
  char *v5; // esi@5
  int v6; // esi@6
  int v7; // eax@8
  int v8; // eax@9
  int v9; // eax@10
  int v10; // eax@13
  int v11; // eax@16
  int v12; // ecx@17
  int v13; // eax@17
  GCObject *v14; // ecx@20
  char *v16; // [sp+8h] [bp-4h]@5

  v2 = cl;
  v3 = cl->p;
  if ( v3 && v3->marked & 3 )
    reallymarkobject(g, (GCObject *)&cl->p->next);
  v4 = 0;
  if ( cl->nupvalues )
  {
    v5 = (char *)cl->upvals;
    v16 = (char *)cl->upvals;
    do
    {
      v6 = *(_DWORD *)v5;
      if ( v6 && *(_BYTE *)(v6 + 5) & 3 )
      {
        v7 = *(_BYTE *)(v6 + 4);
        *(_BYTE *)(v6 + 5) &= 0xFCu;
        switch ( v7 )
        {
          case 4:
          case 20:
            v8 = *(_DWORD *)(v6 + 12);
            *(_BYTE *)(v6 + 5) |= 4u;
            g->GCmemtrav += v8 + 17;
            break;
          case 7:
            v9 = *(_DWORD *)(v6 + 8);
            if ( v9 && *(_BYTE *)(v9 + 5) & 3 )
              reallymarkobject(g, *(GCObject **)(v6 + 8));
            v10 = *(_DWORD *)(v6 + 12);
            if ( v10 && *(_BYTE *)(v10 + 5) & 3 )
              reallymarkobject(g, *(GCObject **)(v6 + 12));
            v11 = *(_DWORD *)(v6 + 16);
            *(_BYTE *)(v6 + 5) |= 4u;
            g->GCmemtrav += v11 + 24;
            break;
          case 10:
            v12 = *(_DWORD *)(v6 + 8);
            v13 = *(_DWORD *)(v12 + 4);
            if ( (*(_DWORD *)(v12 + 4) & 0x7FFFFF00) != 2146936064 )
              LOBYTE(v13) = 3;
            if ( v13 & 0x40 )
            {
              v14 = *(GCObject **)v12;
              if ( v14->h.marked & 3 )
                reallymarkobject(g, v14);
            }
            if ( *(_DWORD *)(v6 + 8) == v6 + 16 )
            {
              *(_BYTE *)(v6 + 5) |= 4u;
              g->GCmemtrav += 24;
            }
            break;
          case 6:
            *(_DWORD *)(v6 + 8) = g->gray;
            goto LABEL_29;
          case 38:
            *(_DWORD *)(v6 + 8) = g->gray;
            goto LABEL_29;
          case 5:
            *(_DWORD *)(v6 + 24) = g->gray;
            goto LABEL_29;
          case 8:
            *(_DWORD *)(v6 + 60) = g->gray;
            goto LABEL_29;
          case 9:
            *(_DWORD *)(v6 + 72) = g->gray;
LABEL_29:
            g->gray = (GCObject *)v6;
            break;
          default:
            break;
        }
      }
      ++v4;
      v5 = v16 + 4;
      v16 += 4;
    }
    while ( v4 < cl->nupvalues );
    v2 = cl;
  }
  return 4 * v2->nupvalues + 16;
}

//----- (00745F60) --------------------------------------------------------
int __usercall traversestack@<eax>(lua_State *th@<edi>, global_State *g)
{
  lua_TValue *v2; // esi@1
  int result; // eax@2
  int v4; // eax@4
  lua_TValue *i; // eax@11

  v2 = th->stack;
  if ( v2 )
  {
    for ( ; v2 < th->top; ++v2 )
    {
      v4 = v2->u.i.tt__;
      if ( (v2->u.i.tt__ & 0x7FFFFF00) != 2146936064 )
        LOBYTE(v4) = 3;
      if ( v4 & 0x40 && *(_BYTE *)(v2->u.i.v__.b + 5) & 3 )
        reallymarkobject(g, v2->u.i.v__.gc);
    }
    if ( g->gcstate == 1 )
    {
      for ( i = &th->stack[th->stacksize]; v2 < i; ++v2 )
        v2->u.i.tt__ = 2146936064;
    }
    result = 8 * th->stacksize + 112;
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (00746000) --------------------------------------------------------
void __usercall freeobj(lua_State *L@<ecx>, GCObject *o@<eax>)
{
  switch ( o->cl.c.tt )
  {
    case 9:
      luaF_freeproto(L, (Proto *)o);
      break;
    case 6:
      luaM_realloc_(L, o, 4 * *(&o->p.marked + 1) + 16, 0);
      break;
    case 0x26:
      luaM_realloc_(L, o, 8 * *(&o->p.marked + 1) + 16, 0);
      break;
    case 0xA:
      luaF_freeupval(L, (UpVal *)o);
      break;
    case 5:
      luaH_free(L, (Table *)o);
      break;
    case 8:
      luaE_freethread(L, (lua_State *)o);
      break;
    case 7:
      luaM_realloc_(L, o, (unsigned int)(o->p.p + 6), 0);
      break;
    case 4:
      --L->l_G->strt.nuse;
      goto LABEL_10;
    case 0x14:
LABEL_10:
      luaM_realloc_(L, o, (unsigned int)o->p.code + 17, 0);
      break;
    default:
      return;
  }
}

//----- (00746100) --------------------------------------------------------
GCObject **__cdecl sweeplist(lua_State *L, GCObject **p, unsigned int count)
{
  global_State *v3; // ecx@1
  int v4; // edx@1
  char v5; // al@2
  GCObject **v6; // edi@4
  unsigned int v8; // ecx@7
  lua_State *v9; // esi@8
  int v10; // ebx@8
  int ow; // [sp+0h] [bp-10h]@1
  char toset; // [sp+4h] [bp-Ch]@4
  char toclear; // [sp+8h] [bp-8h]@2
  int tostop; // [sp+Ch] [bp-4h]@2

  v3 = L->l_G;
  v4 = v3->currentwhite ^ 3;
  ow = v3->currentwhite ^ 3;
  if ( v3->gckind == 2 )
  {
    v5 = 64;
    toclear = -1;
    tostop = 64;
  }
  else
  {
    toclear = -72;
    v5 = v3->currentwhite & 3;
    tostop = 0;
  }
  v6 = p;
  toset = v5;
  if ( *p )
  {
    while ( 1 )
    {
      v8 = count--;
      if ( !v8 )
        break;
      v9 = (lua_State *)*v6;
      v10 = (*v6)->h.marked;
      if ( (v10 ^ 3) & v4 )
      {
        if ( v10 & tostop )
          return 0;
        if ( v9->tt == 8 && v9->stack )
        {
          sweeplist(L, &v9->openupval, 0xFFFFFFFD);
          luaE_freeCI(v9);
          if ( L->l_G->gckind != 1 )
            luaD_shrinkstack(v9);
        }
        v6 = (GCObject **)v9;
        v9->marked = toset | v10 & toclear;
      }
      else
      {
        *v6 = v9->next;
        freeobj(L, (GCObject *)&v9->next);
      }
      if ( !*v6 )
        return (GCObject **)(*v6 != 0 ? (unsigned int)v6 : 0);
      v4 = ow;
    }
  }
  return (GCObject **)(*v6 != 0 ? (unsigned int)v6 : 0);
}

//----- (00746200) --------------------------------------------------------
GCObject **__usercall sweeptolive@<eax>(GCObject **result@<eax>, lua_State *L, int *n)
{
  global_State *v3; // edx@2
  int v4; // ecx@2
  signed int v5; // ebx@2
  GCObject **v6; // edi@2
  char v7; // cl@3
  lua_State *v8; // esi@13
  int v9; // ebx@13
  GCObject *v10; // eax@14
  GCObject **old; // [sp+Ch] [bp-1Ch]@1
  int v12; // [sp+10h] [bp-18h]@2
  int v13; // [sp+14h] [bp-14h]@12
  char v14; // [sp+18h] [bp-10h]@5
  char v15; // [sp+1Ch] [bp-Ch]@3
  signed int v16; // [sp+20h] [bp-8h]@3
  int i; // [sp+24h] [bp-4h]@1

  old = result;
  i = 0;
  do
  {
    v3 = L->l_G;
    v4 = v3->currentwhite;
    v5 = 1;
    ++i;
    v6 = result;
    v12 = v4 ^ 3;
    if ( v3->gckind == 2 )
    {
      v7 = 64;
      v15 = -1;
      v16 = 64;
    }
    else
    {
      v15 = -72;
      v7 = v4 & 3;
      v16 = 0;
    }
    v14 = v7;
    if ( *result )
    {
      while ( 1 )
      {
        v13 = v5 - 1;
        if ( !v5 )
          break;
        v8 = (lua_State *)*v6;
        v9 = (*v6)->h.marked;
        if ( (v9 ^ 3) & v12 )
        {
          if ( v9 & v16 )
          {
            result = 0;
            goto LABEL_7;
          }
          if ( v8->tt == 8 )
          {
            if ( v8->stack )
            {
              sweeplist(L, &v8->openupval, 0xFFFFFFFD);
              luaE_freeCI(v8);
              if ( L->l_G->gckind != 1 )
                luaD_shrinkstack(v8);
            }
          }
          v6 = (GCObject **)v8;
          v8->marked = v14 | v9 & v15;
        }
        else
        {
          v10 = *v6;
          *v6 = v8->next;
          freeobj(L, v10);
        }
        if ( !*v6 )
          break;
        v5 = v13;
      }
    }
    result = (GCObject **)(*v6 != 0 ? (unsigned int)v6 : 0);
LABEL_7:
    ;
  }
  while ( result == old );
  if ( n )
    *n += i;
  return result;
}

//----- (00746310) --------------------------------------------------------
void __usercall checkSizes(lua_State *L@<edi>)
{
  global_State *v1; // esi@1

  v1 = L->l_G;
  if ( v1->gckind != 1 )
  {
    if ( v1->strt.nuse < v1->strt.size / 2 )
      luaS_resize(L, v1->strt.size / 2);
    v1->buff.buffer = (char *)luaM_realloc_(L, v1->buff.buffer, v1->buff.buffsize, 0);
    v1->buff.buffsize = 0;
  }
}

//----- (00746360) --------------------------------------------------------
void __cdecl dothecall(lua_State *L)
{
  luaD_call(L, L->top - 2, 0, 0);
}

//----- (00746380) --------------------------------------------------------
void __usercall GCTM(lua_State *L@<esi>, int propagateerrors)
{
  global_State *v2; // edi@1
  int v3; // eax@1
  GCObject *v4; // edx@1
  lua_TValue *v5; // eax@3
  int v6; // ecx@5
  char v7; // bl@5
  int v8; // edx@5
  lua_TValue *v9; // ecx@5
  int v10; // eax@5
  char v11; // cl@5
  lua_TValue *v12; // eax@8
  const char *v13; // eax@9
  lua_TValue v; // [sp+4h] [bp-Ch]@3
  int running; // [sp+Ch] [bp-4h]@5

  v2 = L->l_G;
  v3 = (int)v2->tobefnz;
  v4 = v2->allgc;
  v2->tobefnz = *(GCObject **)v3;
  *(_DWORD *)v3 = v4;
  v2->allgc = (GCObject *)v3;
  *(_BYTE *)(v3 + 5) &= 0xEFu;
  if ( v2->gcstate > 1u )
    *(_BYTE *)(v3 + 5) = *(_BYTE *)(v3 + 5) & 0xB8 | v2->currentwhite & 3;
  v.u.i.v__.b = v3;
  v.u.i.tt__ = *(_BYTE *)(v3 + 4) | 0x7FF7A540;
  v5 = luaT_gettmbyobj(L, &v, TM_GC);
  if ( v5 )
  {
    if ( (v5->u.i.tt__ | 0x70) == 2146936182 )
    {
      v6 = v2->gcrunning;
      v7 = L->allowhook;
      L->allowhook = 0;
      v2->gcrunning = 0;
      v8 = v5->u.i.v__.b;
      running = v6;
      v9 = L->top;
      v9->u.i.v__.b = v8;
      v9->u.i.tt__ = v5->u.i.tt__;
      L->top[1] = v;
      L->top += 2;
      v10 = luaD_pcall(
              L,
              (void (__cdecl *)(lua_State *, void *))dothecall,
              0,
              (char *)L->top - (char *)L->stack - 16,
              0);
      v11 = running;
      L->allowhook = v7;
      v2->gcrunning = v11;
      if ( v10 )
      {
        if ( propagateerrors )
        {
          if ( v10 == 2 )
          {
            v12 = L->top;
            if ( (v12[-1].u.i.tt__ | 0x70) == 2146936180 )
              v13 = (const char *)(v12[-1].u.i.v__.b + 16);
            else
              v13 = "no message";
            luaO_pushfstring(L, "error in __gc metamethod (%s)", v13);
            v10 = 5;
          }
          luaD_throw(L, v10);
        }
      }
    }
  }
}

//----- (007464A0) --------------------------------------------------------
void __cdecl luaC_checkfinalizer(lua_State *L, GCObject *o, Table *mt)
{
  global_State *v3; // edi@1
  GCObject **v4; // eax@5
  GCObject *v5; // eax@7
  _DWORD *i; // ecx@7
  char v7; // al@9

  v3 = L->l_G;
  if ( !(o->h.marked & 0x18) && mt && !(mt->flags & 4) && luaT_gettm(mt, TM_GC, v3->tmname[2]) )
  {
    v4 = v3->sweepgc;
    if ( (GCObject *)v4 == o )
      v3->sweepgc = sweeptolive(v4, L, 0);
    v5 = v3->allgc;
    for ( i = &v3->allgc; v5 != o; v5 = v5->gch.next )
      i = v5;
    *i = o->gch.next;
    o->gch.next = v3->finobj;
    v3->finobj = o;
    v7 = o->h.marked | 0x10;
    o->h.marked = v7;
    if ( v3->gcstate <= 1u )
      o->h.marked = v7 & 0xBF;
    else
      o->h.marked = v7 & 0xB8 | v3->currentwhite & 3;
  }
}

//----- (00746540) --------------------------------------------------------
int __usercall entersweep@<eax>(lua_State *L@<edi>)
{
  global_State *v1; // esi@1
  int n; // [sp+4h] [bp-4h]@1

  v1 = L->l_G;
  n = 0;
  v1->sweepstrgc = 0;
  v1->gcstate = 2;
  v1->sweepfin = sweeptolive(&v1->finobj, L, &n);
  v1->sweepgc = sweeptolive(&v1->allgc, L, &n);
  return n;
}

//----- (00746580) --------------------------------------------------------
void __usercall callallpendingfinalizers(lua_State *L@<esi>, int propagateerrors)
{
  global_State *v2; // ebx@1
  bool v3; // zf@1
  global_State *v4; // edi@2
  int v5; // eax@2
  GCObject *v6; // edx@2
  lua_TValue *v7; // eax@4
  int v8; // ecx@6
  char v9; // bl@6
  int v10; // edx@6
  lua_TValue *v11; // ecx@6
  int v12; // eax@6
  char v13; // cl@6
  lua_TValue *v14; // eax@12
  const char *v15; // eax@13
  lua_TValue o; // [sp+8h] [bp-10h]@4
  global_State *g; // [sp+10h] [bp-8h]@1
  int v18; // [sp+14h] [bp-4h]@6

  v2 = L->l_G;
  v3 = v2->tobefnz == 0;
  g = L->l_G;
  if ( !v3 )
  {
    do
    {
      v2->tobefnz->h.marked &= 0xBFu;
      v4 = L->l_G;
      v5 = (int)v4->tobefnz;
      v6 = v4->allgc;
      v4->tobefnz = *(GCObject **)v5;
      *(_DWORD *)v5 = v6;
      v4->allgc = (GCObject *)v5;
      *(_BYTE *)(v5 + 5) &= 0xEFu;
      if ( v4->gcstate > 1u )
        *(_BYTE *)(v5 + 5) = *(_BYTE *)(v5 + 5) & 0xB8 | v4->currentwhite & 3;
      o.u.i.v__.b = v5;
      o.u.i.tt__ = *(_BYTE *)(v5 + 4) | 0x7FF7A540;
      v7 = luaT_gettmbyobj(L, &o, TM_GC);
      if ( v7 && (v7->u.i.tt__ | 0x70) == 2146936182 )
      {
        v8 = v4->gcrunning;
        v9 = L->allowhook;
        L->allowhook = 0;
        v4->gcrunning = 0;
        v10 = v7->u.i.v__.b;
        v18 = v8;
        v11 = L->top;
        v11->u.i.v__.b = v10;
        v11->u.i.tt__ = v7->u.i.tt__;
        L->top[1] = o;
        L->top += 2;
        v12 = luaD_pcall(
                L,
                (void (__cdecl *)(lua_State *, void *))dothecall,
                0,
                (char *)L->top - (char *)L->stack - 16,
                0);
        v13 = v18;
        L->allowhook = v9;
        v4->gcrunning = v13;
        if ( v12 && propagateerrors )
        {
          if ( v12 == 2 )
          {
            v14 = L->top;
            if ( (v14[-1].u.i.tt__ | 0x70) == 2146936180 )
              v15 = (const char *)(v14[-1].u.i.v__.b + 16);
            else
              v15 = "no message";
            luaO_pushfstring(L, "error in __gc metamethod (%s)", v15);
            v12 = 5;
          }
          luaD_throw(L, v12);
        }
        v2 = g;
      }
    }
    while ( v2->tobefnz );
  }
}

//----- (007466C0) --------------------------------------------------------
void __cdecl luaC_freeallobjects(lua_State *L)
{
  global_State *v1; // edi@1
  GCObject **v2; // eax@1
  GCObject **i; // ecx@1
  GCObject *j; // eax@3
  GCObject *v5; // ebx@4
  int k; // ebx@5

  v1 = L->l_G;
  v2 = &v1->tobefnz->gch.next;
  for ( i = &v1->tobefnz; v2; v2 = (GCObject **)*v2 )
    i = v2;
  for ( j = v1->finobj; j; j = v1->finobj )
  {
    v5 = j->gch.next;
    j->h.marked |= 8u;
    v1->finobj = v5;
    j->gch.next = *i;
    *i = j;
    i = (GCObject **)j;
  }
  callallpendingfinalizers(L, 0);
  v1->currentwhite = 3;
  v1->gckind = 0;
  sweeplist(L, &v1->finobj, 0xFFFFFFFD);
  sweeplist(L, &v1->allgc, 0xFFFFFFFD);
  for ( k = 0; k < v1->strt.size; ++k )
    sweeplist(L, &v1->strt.hash[k], 0xFFFFFFFD);
}

//----- (00746750) --------------------------------------------------------
void __cdecl luaC_barrier_(lua_State *L, GCObject *o, GCObject *v)
{
  global_State *v3; // eax@1

  v3 = L->l_G;
  if ( v3->gcstate > 1u )
    o->h.marked = o->h.marked & 0xB8 | v3->currentwhite & 3;
  else
    reallymarkobject(v3, v);
}

//----- (00746790) --------------------------------------------------------
void __cdecl luaC_barrierproto_(lua_State *L, Proto *p, Closure *c)
{
  global_State *v3; // esi@1
  char v4; // al@3

  v3 = L->l_G;
  if ( p->cache )
  {
    p->marked &= 0xFBu;
    p->gclist = v3->grayagain;
    v3->grayagain = (GCObject *)p;
  }
  else if ( c->l.marked & 3 )
  {
    v4 = p->marked;
    if ( v4 & 4 )
    {
      if ( v3->gcstate > 1u )
        p->marked = v4 & 0xB8 | v3->currentwhite & 3;
      else
        reallymarkobject(v3, (GCObject *)&c->c.next);
    }
  }
}

//----- (007467F0) --------------------------------------------------------
void __cdecl luaC_checkupvalcolor(global_State *g, UpVal *uv)
{
  char v2; // al@1
  lua_TValue *v3; // ecx@5
  int v4; // eax@5
  GCObject *v5; // ecx@8

  v2 = uv->marked;
  if ( !(v2 & 7) )
  {
    if ( g->gckind == 2 || g->gcstate <= 1u )
    {
      uv->marked = v2 & 0xBF | 4;
      v3 = uv->v;
      v4 = v3->u.i.tt__;
      if ( (v3->u.i.tt__ & 0x7FFFFF00) != 2146936064 )
        LOBYTE(v4) = 3;
      if ( v4 & 0x40 )
      {
        v5 = (GCObject *)v3->u.i.v__.b;
        if ( v5->h.marked & 3 )
          reallymarkobject(g, v5);
      }
    }
    else
    {
      uv->marked = v2 & 0xB8 | g->currentwhite & 3;
    }
  }
}

//----- (00746860) --------------------------------------------------------
void __usercall traverseweakvalue(Table *h@<edi>, global_State *g)
{
  Node *v2; // esi@1
  unsigned int v3; // ebx@1
  int v4; // eax@2
  int v5; // eax@14
  char v6; // cl@15
  bool v7; // zf@18
  GCObject *v8; // eax@18
  int hasclears; // [sp+Ch] [bp-4h]@1

  v2 = h->node;
  v3 = (unsigned int)&v2[1 << h->lsizenode];
  for ( hasclears = h->sizearray > 0; (unsigned int)v2 < v3; ++v2 )
  {
    v4 = v2->i_key.nk.u.i.tt__;
    if ( v2->i_val.u.i.tt__ == 2146936064 )
    {
      if ( (v4 & 0x7FFFFF00) != 2146936064 )
        LOBYTE(v4) = 3;
      if ( v4 & 0x40 && *(_BYTE *)(v2->i_key.nk.u.i.v__.b + 5) & 3 )
        v2->i_key.nk.u.i.tt__ = 2146936075;
    }
    else
    {
      if ( (v4 & 0x7FFFFF00) != 2146936064 )
        LOBYTE(v4) = 3;
      if ( v4 & 0x40 && *(_BYTE *)(v2->i_key.nk.u.i.v__.b + 5) & 3 )
        reallymarkobject(g, v2->i_key.nk.u.i.v__.gc);
      if ( !hasclears )
      {
        v5 = v2->i_val.u.i.tt__;
        v6 = (v2->i_val.u.i.tt__ & 0x7FFFFF00) == 2146936064 ? (_BYTE)v5 : 3;
        if ( v6 & 0x40 )
        {
          v7 = (v5 | 0x70) == 2146936180;
          v8 = (GCObject *)v2->i_val.u.i.v__.b;
          if ( v7 )
          {
            if ( v8 && v8->h.marked & 3 )
              reallymarkobject(g, v2->i_val.u.i.v__.gc);
          }
          else if ( v8->h.marked & 3 )
          {
            hasclears = 1;
          }
        }
      }
    }
  }
  if ( hasclears )
  {
    h->gclist = g->weak;
    g->weak = (GCObject *)h;
  }
  else
  {
    h->gclist = g->grayagain;
    g->grayagain = (GCObject *)h;
  }
}

//----- (007469B0) --------------------------------------------------------
int __usercall traverseephemeron@<eax>(Table *h@<edi>, global_State *g)
{
  int v2; // esi@1
  signed int v3; // ebx@1
  lua_TValue *v4; // ecx@2
  int v5; // eax@2
  GCObject *v6; // ecx@5
  Node *v7; // esi@8
  int v8; // eax@9
  int v9; // edx@9
  int v10; // ecx@9
  char v11; // cl@16
  bool v12; // zf@19
  GCObject *v13; // eax@19
  int v14; // eax@23
  int hasclears; // [sp+Ch] [bp-Ch]@1
  int prop; // [sp+10h] [bp-8h]@1
  Node *limit; // [sp+14h] [bp-4h]@1

  v2 = 0;
  v3 = 0;
  hasclears = 0;
  prop = 0;
  for ( limit = &h->node[1 << h->lsizenode]; v2 < h->sizearray; ++v2 )
  {
    v4 = &h->array[v2];
    v5 = v4->u.i.tt__;
    if ( (v4->u.i.tt__ & 0x7FFFFF00) != 2146936064 )
      LOBYTE(v5) = 3;
    if ( v5 & 0x40 )
    {
      v6 = (GCObject *)v4->u.i.v__.b;
      if ( v6->h.marked & 3 )
      {
        v3 = 1;
        reallymarkobject(g, v6);
      }
    }
  }
  v7 = h->node;
  if ( v7 >= limit )
    goto LABEL_39;
  do
  {
    v8 = v7->i_key.nk.u.i.tt__;
    v9 = v7->i_val.u.i.tt__;
    v10 = v7->i_key.nk.u.i.tt__ & 0x7FFFFF00;
    if ( v9 == 2146936064 )
    {
      if ( v10 != 2146936064 )
        LOBYTE(v8) = 3;
      if ( v8 & 0x40 )
      {
        if ( *(_BYTE *)(v7->i_key.nk.u.i.v__.b + 5) & 3 )
          v7->i_key.nk.u.i.tt__ = 2146936075;
      }
      goto LABEL_34;
    }
    if ( v10 == 2146936064 )
      v11 = v8;
    else
      v11 = 3;
    if ( !(v11 & 0x40) )
      goto LABEL_23;
    v12 = (v8 | 0x70) == 2146936180;
    v13 = v7->i_key.nk.u.i.v__.gc;
    if ( v12 )
    {
      if ( v13 && v13->h.marked & 3 )
        reallymarkobject(g, v7->i_key.nk.u.i.v__.gc);
LABEL_23:
      v14 = v7->i_val.u.i.tt__;
      if ( (v7->i_val.u.i.tt__ & 0x7FFFFF00) != 2146936064 )
        LOBYTE(v14) = 3;
      if ( v14 & 0x40 && *(_BYTE *)(v7->i_val.u.i.v__.b + 5) & 3 )
      {
        v3 = 1;
        reallymarkobject(g, v7->i_val.u.i.v__.gc);
      }
      goto LABEL_34;
    }
    if ( !(v13->h.marked & 3) )
      goto LABEL_23;
    hasclears = 1;
    if ( (v9 & 0x7FFFFF00) != 2146936064 )
      LOBYTE(v9) = 3;
    if ( v9 & 0x40 && *(_BYTE *)(v7->i_val.u.i.v__.b + 5) & 3 )
      prop = 1;
LABEL_34:
    ++v7;
  }
  while ( v7 < limit );
  if ( prop )
  {
    h->gclist = g->ephemeron;
    g->ephemeron = (GCObject *)h;
    return v3;
  }
  if ( hasclears )
  {
    h->gclist = g->allweak;
    g->allweak = (GCObject *)h;
    return v3;
  }
LABEL_39:
  h->gclist = g->grayagain;
  g->grayagain = (GCObject *)h;
  return v3;
}

//----- (00746B90) --------------------------------------------------------
int __usercall traversetable@<eax>(Table *h@<eax>, global_State *g)
{
  GCObject *v2; // edi@1
  Table *v3; // eax@1
  lua_TValue *v4; // esi@2
  unsigned int v5; // eax@6
  int v6; // eax@11
  int v7; // ebx@11
  int v8; // eax@11

  v2 = (GCObject *)h;
  v3 = h->metatable;
  if ( v3 )
  {
    if ( v3->flags & 8 )
      v4 = 0;
    else
      v4 = luaT_gettm(v3, TM_MODE, g->tmname[3]);
  }
  else
  {
    v4 = 0;
  }
  v5 = v2->ts.tsv.hash;
  if ( v5 && *(_BYTE *)(v5 + 5) & 3 )
    reallymarkobject(g, (GCObject *)v2->ts.tsv.hash);
  if ( v4
    && (v4->u.i.tt__ | 0x70) == 2146936180
    && ((strchr((char *)(v4->u.i.v__.b + 16), 107), v7 = v6, strchr((char *)(v4->u.i.v__.b + 16), 118), v7) || v8) )
  {
    v2->h.marked &= 0xFBu;
    if ( v7 )
    {
      if ( v8 )
      {
        v2->h.gclist = g->allweak;
        g->allweak = v2;
      }
      else
      {
        traverseephemeron((Table *)v2, g);
      }
    }
    else
    {
      traverseweakvalue((Table *)v2, g);
    }
  }
  else
  {
    traversestrongtable((Table *)v2, g);
  }
  return 8 * (v2->h.sizearray + 3 * (1 << *(&v2->uv.marked + 2))) + 32;
}

//----- (00746C80) --------------------------------------------------------
void __usercall propagatemark(global_State *g@<ebx>)
{
  GCObject *v1; // eax@1
  int v2; // ecx@1
  GCObject *v3; // edx@5

  v1 = g->gray;
  v2 = v1->cl.c.tt;
  v1->h.marked |= 4u;
  switch ( v2 )
  {
    case 5:
      g->gray = v1->h.gclist;
      g->GCmemtrav += traversetable((Table *)v1, g);
      break;
    case 6:
      g->gray = (GCObject *)v1->ts.tsv.hash;
      g->GCmemtrav += traverseLclosure(g, (LClosure *)v1);
      break;
    case 38:
      g->gray = (GCObject *)v1->ts.tsv.hash;
      g->GCmemtrav += traverseCclosure(g, (CClosure *)v1);
      break;
    case 8:
      v3 = g->grayagain;
      g->gray = (GCObject *)v1->p.sizelocvars;
      v1->p.sizelocvars = (int)v3;
      g->grayagain = v1;
      v1->h.marked &= 0xFBu;
      g->GCmemtrav += traversestack((lua_State *)v1, g);
      break;
    case 9:
      g->gray = v1->p.gclist;
      g->GCmemtrav += traverseproto((Proto *)v1, g);
      break;
    default:
      return;
  }
}

//----- (00746D60) --------------------------------------------------------
void __usercall propagateall(global_State *g@<ebx>)
{
  GCObject *v1; // eax@2
  int v2; // ecx@2
  int v3; // eax@3
  GCObject *v4; // edx@6

  while ( g->gray )
  {
    v1 = g->gray;
    v2 = v1->cl.c.tt;
    v1->h.marked |= 4u;
    switch ( v2 )
    {
      case 5:
        g->gray = v1->h.gclist;
        v3 = traversetable((Table *)v1, g);
        goto LABEL_8;
      case 6:
        g->gray = (GCObject *)v1->ts.tsv.hash;
        v3 = traverseLclosure(g, (LClosure *)v1);
        goto LABEL_8;
      case 38:
        g->gray = (GCObject *)v1->ts.tsv.hash;
        v3 = traverseCclosure(g, (CClosure *)v1);
        goto LABEL_8;
      case 8:
        v4 = g->grayagain;
        g->gray = (GCObject *)v1->p.sizelocvars;
        v1->p.sizelocvars = (int)v4;
        g->grayagain = v1;
        v1->h.marked &= 0xFBu;
        v3 = traversestack((lua_State *)v1, g);
        goto LABEL_8;
      case 9:
        g->gray = v1->p.gclist;
        v3 = traverseproto((Proto *)v1, g);
LABEL_8:
        g->GCmemtrav += v3;
        break;
      default:
        break;
    }
  }
}

//----- (00746E40) --------------------------------------------------------
void __usercall convergeephemerons(global_State *g@<eax>)
{
  global_State *v1; // ebx@1
  GCObject *v2; // esi@2
  Table *v3; // edi@2
  int changed; // [sp+Ch] [bp-4h]@2

  v1 = g;
  do
  {
    v2 = v1->ephemeron;
    v1->ephemeron = 0;
    changed = 0;
    v3 = (Table *)v2;
    if ( !v2 )
      break;
    do
    {
      v2 = v2->h.gclist;
      if ( traverseephemeron(v3, v1) )
      {
        propagateall(v1);
        changed = 1;
      }
      v3 = (Table *)v2;
    }
    while ( v2 );
  }
  while ( changed );
}

//----- (00746E90) --------------------------------------------------------
void __usercall clearkeys(GCObject *l@<eax>, global_State *g, GCObject *f)
{
  GCObject *i; // ebx@1
  Proto **v4; // esi@2
  unsigned int j; // edi@2
  Proto *v6; // eax@4
  char v7; // cl@5
  bool v8; // zf@8
  Proto *v9; // eax@8
  Proto *v10; // eax@13
  int v11; // ecx@13

  for ( i = l; i != f; i = i->h.gclist )
  {
    v4 = (Proto **)i->u.uv.len;
    for ( j = (unsigned int)&v4[6 * (1 << *(&i->uv.marked + 2))]; (unsigned int)v4 < j; v4 += 6 )
    {
      if ( v4[1] != (Proto *)2146936064 )
      {
        v6 = v4[3];
        v7 = ((unsigned int)v4[3] & 0x7FFFFF00) == 2146936064 ? (_BYTE)v6 : 3;
        if ( v7 & 0x40 )
        {
          v8 = ((unsigned int)v6 | 0x70) == 2146936180;
          v9 = v4[2];
          if ( v8 )
          {
            if ( v9 )
            {
              if ( v9->marked & 3 )
                reallymarkobject(g, (GCObject *)&v4[2]->next);
            }
          }
          else if ( v9->marked & 3 )
          {
            v10 = v4[3];
            v11 = (unsigned int)v4[3] & 0x7FFFFF00;
            v4[1] = (Proto *)2146936064;
            if ( v11 != 2146936064 )
              LOBYTE(v10) = 3;
            if ( (unsigned __int8)v10 & 0x40 && v4[2]->marked & 3 )
              v4[3] = (Proto *)2146936075;
          }
        }
      }
    }
  }
}

//----- (00746F70) --------------------------------------------------------
void __usercall clearvalues(GCObject *l@<eax>, global_State *g, GCObject *f)
{
  GCObject *i; // edi@1
  int v4; // esi@2
  int v5; // ecx@3
  int v6; // eax@3
  char v7; // dl@4
  GCObject *v8; // ecx@8
  Proto **j; // esi@14
  Proto *v10; // eax@15
  char v11; // cl@17
  bool v12; // zf@20
  GCObject *v13; // eax@20
  Proto *v14; // eax@25
  int v15; // edx@25
  Node *limit; // [sp+8h] [bp-4h]@2

  for ( i = l; i != f; i = i->h.gclist )
  {
    v4 = 0;
    for ( limit = (Node *)&i->p.p[6 * (1 << *(&i->uv.marked + 2))]; v4 < i->h.sizearray; ++v4 )
    {
      v5 = (int)&i->p.code[2 * v4];
      v6 = *(_DWORD *)(v5 + 4);
      if ( (*(_DWORD *)(v5 + 4) & 0x7FFFFF00) == 2146936064 )
        v7 = v6;
      else
        v7 = 3;
      if ( v7 & 0x40 )
      {
        if ( (v6 | 0x70) == 2146936180 )
        {
          v8 = *(GCObject **)v5;
          if ( v8 && v8->h.marked & 3 )
            reallymarkobject(g, v8);
        }
        else if ( *(_BYTE *)(*(_DWORD *)v5 + 5) & 3 )
        {
          *(_DWORD *)(v5 + 4) = 2146936064;
        }
      }
    }
    for ( j = (Proto **)i->u.uv.len; j < (Proto **)limit; j += 6 )
    {
      v10 = j[1];
      if ( v10 != (Proto *)2146936064 )
      {
        v11 = ((unsigned int)v10 & 0x7FFFFF00) == 2146936064 ? (_BYTE)v10 : 3;
        if ( v11 & 0x40 )
        {
          v12 = ((unsigned int)v10 | 0x70) == 2146936180;
          v13 = (GCObject *)*j;
          if ( v12 )
          {
            if ( v13 )
            {
              if ( v13->h.marked & 3 )
                reallymarkobject(g, (GCObject *)&(*j)->next);
            }
          }
          else if ( v13->h.marked & 3 )
          {
            v14 = j[3];
            v15 = (unsigned int)j[3] & 0x7FFFFF00;
            j[1] = (Proto *)2146936064;
            if ( v15 != 2146936064 )
              LOBYTE(v14) = 3;
            if ( (unsigned __int8)v14 & 0x40 && j[2]->marked & 3 )
              j[3] = (Proto *)2146936075;
          }
        }
      }
    }
  }
}

//----- (007470D0) --------------------------------------------------------
unsigned int __cdecl atomic(lua_State *L)
{
  global_State *v1; // edi@1
  int v2; // esi@1
  int v3; // eax@3
  int v4; // esi@8
  GCObject *v5; // ST34_4@8
  GCObject *v6; // ST30_4@8
  GCObject *v7; // ST2C_4@8
  int v8; // esi@8
  global_State *v9; // ecx@8
  int v10; // esi@8
  GCObject **v11; // ebx@8
  GCObject **v12; // ecx@8
  GCObject *v13; // eax@8
  GCObject *i; // eax@10
  char v15; // dl@11
  int v16; // esi@15
  GCObject *origweak; // [sp+Ch] [bp-Ch]@8
  GCObject *origall; // [sp+10h] [bp-8h]@8

  v1 = L->l_G;
  v2 = -v1->GCmemtrav;
  if ( L->marked & 3 )
    reallymarkobject(v1, (GCObject *)&L->next);
  v3 = v1->l_registry.u.i.tt__;
  if ( (v1->l_registry.u.i.tt__ & 0x7FFFFF00) != 2146936064 )
    LOBYTE(v3) = 3;
  if ( v3 & 0x40 && *(_BYTE *)(v1->l_registry.u.i.v__.b + 5) & 3 )
    reallymarkobject(v1, v1->l_registry.u.i.v__.gc);
  markmt(v1);
  remarkupvals(v1);
  propagateall(v1);
  v4 = v1->GCmemtrav + v2;
  v5 = v1->grayagain;
  v6 = v1->weak;
  v7 = v1->ephemeron;
  v1->ephemeron = 0;
  v1->grayagain = 0;
  v1->weak = 0;
  propagateall(v1);
  v1->gray = v5;
  propagateall(v1);
  v1->gray = v6;
  propagateall(v1);
  v1->gray = v7;
  propagateall(v1);
  v8 = v4 - v1->GCmemtrav;
  convergeephemerons(v1);
  clearvalues(v1->weak, v1, 0);
  clearvalues(v1->allweak, v1, 0);
  v9 = L->l_G;
  v10 = v1->GCmemtrav + v8;
  v11 = &v9->finobj;
  v12 = &v9->tobefnz;
  origall = v1->allweak;
  v13 = *v12;
  for ( origweak = v1->weak; v13; v13 = v13->gch.next )
    v12 = (GCObject **)v13;
  for ( i = *v11; *v11; i = *v11 )
  {
    v15 = i->h.marked;
    if ( v15 & 3 )
    {
      i->h.marked = v15 | 8;
      *v11 = i->gch.next;
      i->gch.next = *v12;
      *v12 = i;
      v12 = (GCObject **)i;
    }
    else
    {
      v11 = (GCObject **)i;
    }
  }
  markbeingfnz(v1);
  propagateall(v1);
  v16 = v10 - v1->GCmemtrav;
  convergeephemerons(v1);
  clearkeys(v1->ephemeron, v1, 0);
  clearkeys(v1->allweak, v1, 0);
  clearvalues(v1->weak, v1, origweak);
  clearvalues(v1->allweak, v1, origall);
  v1->currentwhite ^= 3u;
  return v16 + v1->GCmemtrav;
}

//----- (00747250) --------------------------------------------------------
int __usercall singlestep@<eax>(lua_State *L@<eax>)
{
  lua_State *v1; // edi@1
  global_State *v2; // ebx@1
  int result; // eax@2
  unsigned int v4; // esi@4
  unsigned int v5; // ecx@5
  unsigned int v6; // eax@5
  unsigned int v7; // esi@5
  int v8; // eax@5
  signed int v9; // esi@6
  int v10; // eax@7
  GCObject **v11; // eax@12
  GCObject **v12; // eax@16
  GCObject *mt; // [sp+Ch] [bp-4h]@18

  v1 = L;
  v2 = L->l_G;
  switch ( v2->gcstate )
  {
    case 5:
      v2->GCmemtrav = 4 * v2->strt.size;
      restartcollection(v2);
      result = v2->GCmemtrav;
      v2->gcstate = 0;
      break;
    case 0:
      if ( v2->gray )
      {
        v4 = v2->GCmemtrav;
        propagatemark(v2);
        result = v2->GCmemtrav - v4;
      }
      else
      {
        v5 = v2->GCmemtrav;
        v2->gcstate = 1;
        v2->GCestimate = v5;
        v6 = atomic(L);
        v7 = v6;
        v2->GCestimate += v6;
        v8 = entersweep(v1);
        result = v8 + v7 + 4 * v8;
      }
      break;
    case 2:
      v9 = 0;
      do
      {
        v10 = v9 + v2->sweepstrgc;
        if ( v10 >= v2->strt.size )
          break;
        sweeplist(v1, &v2->strt.hash[v10], 0xFFFFFFFD);
        ++v9;
      }
      while ( v9 < 80 );
      v2->sweepstrgc += v9;
      if ( v2->sweepstrgc >= v2->strt.size )
        v2->gcstate = 3;
      result = 5 * v9;
      break;
    case 3:
      v11 = v2->sweepfin;
      if ( !v11 )
      {
        v2->gcstate = 4;
        goto LABEL_15;
      }
      v2->sweepfin = sweeplist(v1, v11, 0x50u);
      result = 400;
      break;
    default:
LABEL_15:
      result = 0;
      break;
    case 4:
      v12 = v2->sweepgc;
      if ( v12 )
      {
        v2->sweepgc = sweeplist(v1, v12, 0x50u);
        result = 400;
      }
      else
      {
        mt = (GCObject *)&v2->mainthread->next;
        sweeplist(v1, &mt, 1u);
        checkSizes(v1);
        v2->gcstate = 5;
        result = 5;
      }
      break;
  }
  return result;
}

//----- (007473B0) --------------------------------------------------------
void __cdecl luaC_runtilstate(lua_State *L, int statesmask)
{
  lua_State *v2; // edi@1
  global_State *v3; // ebx@2
  unsigned int v4; // ecx@6
  global_State *v5; // ebx@6
  signed int v6; // esi@7
  int v7; // eax@8
  GCObject **v8; // eax@12
  GCObject **v9; // eax@15
  global_State *g; // [sp+4h] [bp-4h]@1

  v2 = L;
  g = L->l_G;
  if ( !((1 << L->l_G->gcstate) & statesmask) )
  {
    do
    {
      v3 = v2->l_G;
      switch ( v3->gcstate )
      {
        case 5:
          v3->GCmemtrav = 4 * v3->strt.size;
          restartcollection(v3);
          v3->gcstate = 0;
          break;
        case 0:
          if ( v3->gray )
          {
            propagatemark(v3);
          }
          else
          {
            v4 = v3->GCmemtrav;
            v3->gcstate = 1;
            v3->GCestimate = v4;
            v3->GCestimate += atomic(v2);
            v5 = v2->l_G;
            L = 0;
            v5->gcstate = 2;
            v5->sweepstrgc = 0;
            v5->sweepfin = sweeptolive(&v5->finobj, v2, (int *)&L);
            v5->sweepgc = sweeptolive(&v5->allgc, v2, (int *)&L);
          }
          break;
        case 2:
          v6 = 0;
          do
          {
            v7 = v6 + v3->sweepstrgc;
            if ( v7 >= v3->strt.size )
              break;
            sweeplist(v2, &v3->strt.hash[v7], 0xFFFFFFFD);
            ++v6;
          }
          while ( v6 < 80 );
          v3->sweepstrgc += v6;
          if ( v3->sweepstrgc >= v3->strt.size )
            v3->gcstate = 3;
          break;
        case 3:
          v8 = v3->sweepfin;
          if ( v8 )
            v3->sweepfin = sweeplist(v2, v8, 0x50u);
          else
            v3->gcstate = 4;
          break;
        case 4:
          v9 = v3->sweepgc;
          if ( v9 )
          {
            v3->sweepgc = sweeplist(v2, v9, 0x50u);
          }
          else
          {
            L = v3->mainthread;
            sweeplist(v2, (GCObject **)&L, 1u);
            checkSizes(v2);
            v3->gcstate = 5;
          }
          break;
        default:
          break;
      }
    }
    while ( !((1 << g->gcstate) & statesmask) );
  }
}

//----- (00747520) --------------------------------------------------------
void __cdecl incstep(lua_State *L)
{
  global_State *v1; // esi@1
  signed int v2; // ebx@1
  int v3; // ecx@3
  signed int v4; // edi@4
  int v5; // ecx@9
  int v6; // edi@9

  v1 = L->l_G;
  v2 = v1->gcstepmul;
  if ( v2 < 40 )
    v2 = 40;
  v3 = v1->GCdebt / 200 + 1;
  if ( v3 >= 2147483644 / v2 )
    v4 = 2147483644;
  else
    v4 = v3 * v2;
  do
    v4 -= singlestep(L);
  while ( v4 > -1600 && v1->gcstate != 5 );
  if ( v1->gcstate == 5 )
  {
    v5 = (signed int)v1->GCestimate / 100;
    v6 = v1->gcpause;
    if ( v6 >= 2147483644 / v5 )
      luaE_setdebt(v1, v1->GCdebt + v1->totalbytes - 2147483644);
    else
      luaE_setdebt(v1, v1->GCdebt + v1->totalbytes - v5 * v6);
  }
  else
  {
    luaE_setdebt(v1, 200 * (v4 / v2));
  }
}

//----- (00747610) --------------------------------------------------------
void __cdecl luaC_fullgc(lua_State *L, int isemergency)
{
  lua_State *v2; // ebx@1
  global_State *v3; // edi@1
  lua_State *v4; // esi@3
  global_State *v5; // esi@6
  signed int v6; // esi@9
  int v7; // edx@9
  int v8; // edx@10
  int origkind; // [sp+Ch] [bp-4h]@1

  v2 = L;
  v3 = L->l_G;
  origkind = v3->gckind;
  if ( isemergency )
  {
    v3->gckind = 1;
  }
  else
  {
    v4 = L;
    v3->gckind = 0;
    callallpendingfinalizers(v4, 1);
  }
  if ( v3->gckind == 2 || v3->gcstate <= 1u )
  {
    v5 = v2->l_G;
    L = 0;
    v5->sweepstrgc = 0;
    v5->gcstate = 2;
    v5->sweepfin = sweeptolive(&v5->finobj, v2, (int *)&L);
    v5->sweepgc = sweeptolive(&v5->allgc, v2, (int *)&L);
  }
  luaC_runtilstate(v2, 32);
  luaC_runtilstate(v2, -33);
  luaC_runtilstate(v2, 32);
  if ( origkind == 2 )
    luaC_runtilstate(v2, 1);
  v6 = v3->totalbytes + v3->GCdebt;
  v3->gckind = origkind;
  v7 = v3->gcpause;
  if ( v7 >= 2147483644 / (v6 / 100) )
    v8 = 2147483644;
  else
    v8 = v6 / 100 * v7;
  luaE_setdebt(v3, v6 - v8);
  if ( !isemergency )
    callallpendingfinalizers(v2, 1);
}

//----- (00747710) --------------------------------------------------------
void __cdecl luaC_changemode(lua_State *L, int mode)
{
  lua_State *v2; // edi@1
  global_State *v3; // esi@1
  global_State *v4; // esi@4

  v2 = L;
  v3 = L->l_G;
  if ( mode != v3->gckind )
  {
    if ( mode == 2 )
    {
      luaC_runtilstate(L, 1);
      v3->GCestimate = v3->totalbytes + v3->GCdebt;
      v3->gckind = 2;
    }
    else
    {
      v3->gckind = 0;
      v4 = v2->l_G;
      L = 0;
      v4->sweepstrgc = 0;
      v4->gcstate = 2;
      v4->sweepfin = sweeptolive(&v4->finobj, v2, (int *)&L);
      v4->sweepgc = sweeptolive(&v4->allgc, v2, (int *)&L);
      luaC_runtilstate(v2, -29);
    }
  }
}

//----- (00747790) --------------------------------------------------------
void __usercall generationalcollection(lua_State *L@<eax>)
{
  global_State *v1; // esi@1
  unsigned int v2; // ebx@1
  signed int v3; // edi@2
  unsigned int v4; // ecx@3
  int v5; // ebx@4

  v1 = L->l_G;
  v2 = v1->GCestimate;
  if ( v2 )
  {
    luaC_runtilstate(L, 32);
    v3 = v1->totalbytes + v1->GCdebt;
    v4 = v1->gcmajorinc * (v2 / 0x64) >= v3 ? v2 : 0;
    v1->gcstate = 0;
    v1->GCestimate = v4;
  }
  else
  {
    luaC_fullgc(L, 0);
    v3 = v1->totalbytes + v1->GCdebt;
    v1->GCestimate = v3;
  }
  v5 = v1->gcpause;
  if ( v5 >= 2147483644 / (v3 / 100) )
    luaE_setdebt(v1, v3 - 2147483644);
  else
    luaE_setdebt(v1, v3 - v3 / 100 * v5);
}

//----- (00747830) --------------------------------------------------------
void __cdecl luaC_forcestep(lua_State *L)
{
  global_State *v1; // edi@1
  signed int i; // ebx@4

  v1 = L->l_G;
  if ( v1->gckind == 2 )
    generationalcollection(L);
  else
    incstep(L);
  for ( i = 0; v1->tobefnz; ++i )
  {
    if ( i >= 4 && v1->gcstate != 5 )
      break;
    GCTM(L, 1);
  }
}

//----- (00747890) --------------------------------------------------------
void __cdecl luaC_step(lua_State *L)
{
  global_State *v1; // eax@1

  v1 = L->l_G;
  if ( v1->gcrunning )
    luaC_forcestep(L);
  else
    luaE_setdebt(v1, -1600);
}

//----- (007478C0) --------------------------------------------------------
void __cdecl luaT_init(lua_State *L)
{
  signed int v1; // esi@1

  v1 = 42;
  do
  {
    *(void *(__cdecl **)(void *, void *, unsigned int, unsigned int))((char *)&L->l_G->frealloc + v1 * 4) = (void *(__cdecl *)(void *, void *, unsigned int, unsigned int))luaS_new(L, luaT_eventname[v1 - 42]);
    (*(_BYTE **)((char *)&L->l_G->frealloc + v1 * 4))[5] |= 0x20u;
    ++v1;
  }
  while ( v1 < 59 );
}

//----- (00747910) --------------------------------------------------------
lua_TValue *__cdecl luaT_gettm(Table *events, TMS event, TString *ename)
{
  lua_TValue *result; // eax@1

  result = luaH_getstr(events, ename);
  if ( result->u.i.tt__ == 2146936064 )
  {
    events->flags |= 1 << event;
    result = 0;
  }
  return result;
}

//----- (00747940) --------------------------------------------------------
lua_TValue *__cdecl luaT_gettmbyobj(lua_State *L, lua_TValue *o, TMS event)
{
  int v3; // edx@1
  char v4; // al@2
  int v5; // eax@4
  Table *v6; // ecx@7
  lua_TValue *result; // eax@12

  v3 = o->u.i.tt__ & 0x7FFFFF00;
  if ( v3 == 2146936064 )
    v4 = o->u.i.tt__;
  else
    v4 = 3;
  v5 = (v4 & 0xF) - 5;
  if ( v5 )
  {
    if ( v5 == 2 )
    {
      v6 = *(Table **)(o->u.i.v__.b + 8);
    }
    else if ( v3 == 2146936064 )
    {
      v6 = L->l_G->mt[o->u.i.tt__ & 0xF];
    }
    else
    {
      v6 = L->l_G->mt[3];
    }
  }
  else
  {
    v6 = *(Table **)(o->u.i.v__.b + 8);
  }
  if ( v6 )
    result = luaH_getstr(v6, L->l_G->tmname[event]);
  else
    result = &luaO_nilobject_;
  return result;
}

//----- (007479E0) --------------------------------------------------------
lua_TValue *__cdecl luaV_tonumber(lua_TValue *obj, lua_TValue *n)
{
  lua_TValue *result; // eax@1
  long double num; // [sp+0h] [bp-8h]@3

  result = obj;
  if ( (obj->u.i.tt__ & 0x7FFFFF00) == 2146936064 )
  {
    if ( (obj->u.i.tt__ | 0x70) == 2146936180
      && luaO_str2d((const char *)(obj->u.i.v__.b + 16), *(_DWORD *)(obj->u.i.v__.b + 12), &num) )
    {
      result = n;
      n->u.d__ = num;
    }
    else
    {
      result = 0;
    }
  }
  return result;
}

//----- (00747A40) --------------------------------------------------------
int __cdecl luaV_tostring(lua_State *L, lua_TValue *obj)
{
  int result; // eax@2
  unsigned int v3; // eax@3
  GCObject *v4; // eax@3
  char s[32]; // [sp+10h] [bp-24h]@3

  if ( (obj->u.i.tt__ & 0x7FFFFF00) == 2146936064 )
  {
    result = 0;
  }
  else
  {
    v3 = sprintf(s, "%.14g", obj->u.d__);
    v4 = luaS_newlstr(L, s, v3);
    obj->u.i.v__.b = (int)v4;
    obj->u.i.tt__ = v4->cl.c.tt | 0x7FF7A540;
    result = 1;
  }
  return result;
}

//----- (00747AC0) --------------------------------------------------------
void __usercall callTM(lua_State *L@<eax>, lua_TValue *p1@<edx>, lua_TValue *p2@<ecx>, lua_TValue *f, lua_TValue *p3, int hasres)
{
  lua_State *v6; // esi@1
  lua_TValue *v7; // eax@1
  char *v8; // edi@1
  lua_TValue *v9; // eax@1
  lua_TValue *v10; // eax@1
  lua_TValue *v11; // eax@2
  int v12; // eax@4
  lua_TValue *v13; // esi@4

  v6 = L;
  v7 = L->top;
  v6->top = v7 + 1;
  v8 = (char *)((char *)p3 - (char *)v6->stack);
  *v7 = *f;
  v9 = v6->top;
  v6->top = v9 + 1;
  *v9 = *p1;
  v10 = v6->top;
  v6->top = v10 + 1;
  *v10 = *p2;
  if ( !hasres )
  {
    v11 = v6->top;
    v6->top = v11 + 1;
    *v11 = *p3;
  }
  luaD_call(v6, &v6->top[hasres - 4], hasres, v6->ci->callstatus & 1);
  if ( hasres )
  {
    v12 = (int)&v6->top[-1];
    v6->top = (lua_TValue *)v12;
    v13 = v6->stack;
    *(int *)((char *)&v13->u.i.v__.b + (_DWORD)v8) = *(_DWORD *)v12;
    *(int *)((char *)&v13->u.i.tt__ + (_DWORD)v8) = *(_DWORD *)(v12 + 4);
  }
}

//----- (00747B70) --------------------------------------------------------
void __cdecl luaV_gettable(lua_State *L, lua_TValue *t, lua_TValue *key, lua_TValue *val)
{
  lua_TValue *v4; // ebx@1
  Table *v5; // edi@3
  Node *v6; // eax@3
  Table *v7; // edi@4
  lua_TValue *v8; // eax@6
  lua_TValue *v9; // ecx@14
  signed int v10; // edi@14
  lua_TValue *v11; // eax@14
  lua_TValue *v12; // eax@14
  lua_TValue *v13; // eax@14
  lua_TValue *v14; // esi@14
  lua_TValue *res; // [sp+Ch] [bp-8h]@3
  int loop; // [sp+10h] [bp-4h]@1

  v4 = t;
  loop = 0;
  while ( 1 )
  {
    if ( v4->u.i.tt__ == 2146936133 )
    {
      v5 = (Table *)v4->u.i.v__.b;
      v6 = luaH_get((Table *)v4->u.i.v__.gc, key);
      res = (lua_TValue *)v6;
      if ( v6->i_val.u.i.tt__ != 2146936064 )
        goto LABEL_8;
      v7 = v5->metatable;
      if ( !v7 || v7->flags & 1 )
        goto LABEL_8;
      v8 = luaT_gettm(v7, 0, L->l_G->tmname[0]);
      if ( !v8 )
      {
        v6 = (Node *)res;
LABEL_8:
        *val = v6->i_val;
        return;
      }
    }
    else
    {
      v8 = luaT_gettmbyobj(L, v4, 0);
      if ( v8->u.i.tt__ == 2146936064 )
        luaG_typeerror(L, v4, "index");
    }
    if ( (v8->u.i.tt__ | 0x70) == 2146936182 )
      break;
    v4 = v8;
    if ( ++loop >= 100 )
      luaG_runerror(L, "loop in gettable");
  }
  v9 = L->top;
  v10 = (char *)val - (char *)L->stack;
  L->top = v9 + 1;
  v9->u.i.v__.b = v8->u.i.v__.b;
  v9->u.i.tt__ = v8->u.i.tt__;
  v11 = L->top;
  L->top = v11 + 1;
  v11->u.i.v__.b = v4->u.i.v__.b;
  v11->u.i.tt__ = v4->u.i.tt__;
  v12 = L->top;
  L->top = v12 + 1;
  *v12 = *key;
  luaD_call(L, L->top - 3, 1, L->ci->callstatus & 1);
  v13 = L->top - 1;
  L->top = v13;
  v14 = L->stack;
  *(int *)((char *)&v14->u.i.v__.b + v10) = v13->u.i.v__.b;
  *(int *)((char *)&v14->u.i.tt__ + v10) = v13->u.i.tt__;
}

//----- (00747CC0) --------------------------------------------------------
void __cdecl luaV_settable(lua_State *L, lua_TValue *t, lua_TValue *key, lua_TValue *val)
{
  lua_TValue *v4; // edi@1
  Node *v5; // eax@3
  Table *v6; // edx@3
  lua_TValue *v7; // ebx@3
  Table *v8; // eax@4
  lua_TValue *v9; // eax@6
  Node *v10; // eax@9
  int v11; // ecx@10
  lua_TValue *v12; // ecx@22
  lua_TValue *v13; // eax@22
  lua_TValue *v14; // eax@22
  lua_TValue *v15; // eax@22
  int loop; // [sp+Ch] [bp-8h]@1
  Table *h; // [sp+10h] [bp-4h]@3

  v4 = t;
  loop = 0;
  while ( 1 )
  {
    if ( v4->u.i.tt__ != 2146936133 )
    {
      v9 = luaT_gettmbyobj(L, v4, TM_NEWINDEX);
      if ( v9->u.i.tt__ == 2146936064 )
        luaG_typeerror(L, v4, "index");
      goto LABEL_13;
    }
    h = (Table *)v4->u.i.v__.b;
    v5 = luaH_get((Table *)v4->u.i.v__.gc, key);
    v6 = h;
    v7 = (lua_TValue *)v5;
    if ( v5->i_val.u.i.tt__ != 2146936064 )
      goto LABEL_10;
    v8 = h->metatable;
    if ( !v8 || v8->flags & 2 )
      goto LABEL_8;
    v9 = luaT_gettm(v8, TM_NEWINDEX, L->l_G->tmname[1]);
    if ( !v9 )
      break;
LABEL_13:
    if ( (v9->u.i.tt__ | 0x70) == 2146936182 )
    {
      v12 = L->top;
      L->top = v12 + 1;
      v12->u.i.v__.b = v9->u.i.v__.b;
      v12->u.i.tt__ = v9->u.i.tt__;
      v13 = L->top;
      L->top = v13 + 1;
      v13->u.i.v__.b = v4->u.i.v__.b;
      v13->u.i.tt__ = v4->u.i.tt__;
      v14 = L->top;
      L->top = v14 + 1;
      *v14 = *key;
      v15 = L->top;
      L->top = v15 + 1;
      *v15 = *val;
      luaD_call(L, L->top - 4, 0, L->ci->callstatus & 1);
      return;
    }
    v4 = v9;
    if ( ++loop >= 100 )
      luaG_runerror(L, "loop in settable");
  }
  v6 = h;
LABEL_8:
  if ( v7 == &luaO_nilobject_ )
  {
    v10 = luaH_newkey(L, v6, key);
    v6 = h;
    v7 = (lua_TValue *)v10;
  }
LABEL_10:
  *v7 = *val;
  v6->flags = 0;
  v11 = val->u.i.tt__;
  if ( (v11 & 0x7FFFFF00) != 2146936064 )
    LOBYTE(v11) = 3;
  if ( v11 & 0x40 && *(_BYTE *)(val->u.i.v__.b + 5) & 3 )
  {
    if ( v6->marked & 4 )
      luaC_barrierback_(L, (GCObject *)&v6->next);
  }
}

//----- (00747E70) --------------------------------------------------------
int __usercall call_binTM@<eax>(lua_State *L@<ecx>, lua_TValue *p1@<ebx>, lua_TValue *res@<eax>, lua_TValue *p2, TMS event)
{
  lua_TValue *v5; // edi@1
  lua_State *v6; // esi@1
  lua_TValue *v7; // eax@1
  int result; // eax@3
  lua_TValue *v9; // ecx@4
  int v10; // edi@4
  lua_TValue *v11; // eax@4
  lua_TValue *v12; // eax@4
  int v13; // eax@4
  lua_TValue *v14; // esi@4

  v5 = res;
  v6 = L;
  v7 = luaT_gettmbyobj(L, p1, event);
  if ( v7->u.i.tt__ != 2146936064 || (v7 = luaT_gettmbyobj(v6, p2, event), v7->u.i.tt__ != 2146936064) )
  {
    v9 = v6->top;
    v10 = (char *)v5 - (char *)v6->stack;
    v6->top = v9 + 1;
    v9->u.i.v__.b = v7->u.i.v__.b;
    v9->u.i.tt__ = v7->u.i.tt__;
    v11 = v6->top;
    v6->top = v11 + 1;
    *v11 = *p1;
    v12 = v6->top;
    v6->top = v12 + 1;
    *v12 = *p2;
    luaD_call(v6, v6->top - 3, 1, v6->ci->callstatus & 1);
    v13 = (int)&v6->top[-1];
    v6->top = (lua_TValue *)v13;
    v14 = v6->stack;
    *(int *)((char *)&v14->u.i.v__.b + v10) = *(_DWORD *)v13;
    *(int *)((char *)&v14->u.i.tt__ + v10) = *(_DWORD *)(v13 + 4);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00747F30) --------------------------------------------------------
lua_TValue *__usercall get_equalTM@<eax>(Table *mt1@<edi>, TMS event@<esi>, lua_State *L, Table *mt2)
{
  lua_TValue *v4; // ebx@3
  lua_TValue *result; // eax@5
  lua_TValue *v6; // eax@8
  int v7; // edx@10
  signed int v8; // [sp+4h] [bp-4h]@2

  if ( mt1
    && (v8 = 1 << event, !((unsigned __int8)(1 << event) & mt1->flags))
    && (v4 = luaT_gettm(mt1, event, L->l_G->tmname[event])) != 0
    && (mt1 == mt2
     || mt2
     && !((unsigned __int8)v8 & mt2->flags)
     && (v6 = luaT_gettm(mt2, event, L->l_G->tmname[event])) != 0
     && ((v4->u.i.tt__ & 0x7FFFFF00) == 2146936064 ? (v7 = v4->u.i.tt__ == v6->u.i.tt__) : (v7 = (v6->u.i.tt__ & 0x7FFFFF00) != 2146936064),
         v7 && luaV_equalobj_(0, v4, v6))) )
  {
    result = v4;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00748000) --------------------------------------------------------
int __usercall l_strcmp@<eax>(TString *ls@<ecx>, TString *rs@<eax>)
{
  unsigned int v2; // ebx@1
  const char *v3; // edi@1
  const char *v4; // esi@1
  int result; // eax@1
  unsigned int v6; // eax@2
  int v7; // eax@4
  unsigned int ll; // [sp+Ch] [bp-4h]@1

  v2 = rs->tsv.len;
  v3 = (const char *)&rs[1];
  v4 = (const char *)&ls[1];
  ll = ls->tsv.len;
  result = strcoll((const char *)&ls[1], (const char *)&rs[1]);
  if ( !result )
  {
    while ( 1 )
    {
      v6 = strlen(v4);
      if ( v6 == v2 )
        return v6 != ll;
      if ( v6 == ll )
        break;
      v7 = v6 + 1;
      ll -= v7;
      v3 += v7;
      v4 += v7;
      v2 -= v7;
      result = strcoll(v4, v3);
      if ( result )
        return result;
    }
    result = -1;
  }
  return result;
}

//----- (00748080) --------------------------------------------------------
int __cdecl luaV_lessthan(lua_State *L, lua_TValue *l, lua_TValue *r)
{
  int result; // eax@3
  lua_TValue *v4; // edi@8
  int v5; // eax@8

  if ( (l->u.i.tt__ & 0x7FFFFF00) == 2146936064 || (r->u.i.tt__ & 0x7FFFFF00) == 2146936064 )
  {
    if ( (l->u.i.tt__ | 0x70) != 2146936180 || (r->u.i.tt__ | 0x70) != 2146936180 )
    {
      if ( !call_binTM(L, l, L->top, r, TM_LT) )
        luaG_ordererror(L, l, r);
      v4 = L->top;
      v5 = v4->u.i.tt__;
      result = v5 != 2146936064 && (v5 != 2146936065 || v4->u.i.v__.b);
    }
    else
    {
      result = l_strcmp((TString *)l->u.i.v__.gc, (TString *)r->u.i.v__.gc) < 0;
    }
  }
  else
  {
    result = r->u.d__ > l->u.d__;
  }
  return result;
}

//----- (00748150) --------------------------------------------------------
int __cdecl luaV_lessequal(lua_State *L, lua_TValue *l, lua_TValue *r)
{
  int result; // eax@3
  lua_TValue *v4; // esi@8
  int v5; // eax@8
  lua_TValue *v6; // esi@14
  int v7; // eax@14

  if ( (l->u.i.tt__ & 0x7FFFFF00) == 2146936064 || (r->u.i.tt__ & 0x7FFFFF00) == 2146936064 )
  {
    if ( (l->u.i.tt__ | 0x70) != 2146936180 || (r->u.i.tt__ | 0x70) != 2146936180 )
    {
      if ( call_binTM(L, l, L->top, r, TM_LE) )
      {
        v4 = L->top;
        v5 = v4->u.i.tt__;
        result = v5 != 2146936064 && (v5 != 2146936065 || v4->u.i.v__.b);
      }
      else
      {
        if ( !call_binTM(L, r, L->top, l, TM_LT) )
          luaG_ordererror(L, l, r);
        v6 = L->top;
        v7 = v6->u.i.tt__;
        result = v7 == 2146936064 || v7 == 2146936065 && !v6->u.i.v__.b;
      }
    }
    else
    {
      result = l_strcmp((TString *)l->u.i.v__.gc, (TString *)r->u.i.v__.gc) <= 0;
    }
  }
  else
  {
    result = r->u.d__ >= l->u.d__;
  }
  return result;
}

//----- (00748270) --------------------------------------------------------
int __cdecl luaV_equalobj_(lua_State *L, lua_TValue *t1, lua_TValue *t2)
{
  int v3; // ecx@1
  int result; // eax@4
  lua_TValue *v5; // eax@11
  lua_TValue *v6; // ebx@12
  int v7; // eax@12

  v3 = t1->u.i.tt__;
  if ( (t1->u.i.tt__ & 0x7FFFFF00) != 2146936064 )
    LOBYTE(v3) = 3;
  switch ( v3 & 0x3F )
  {
    case 0:
      goto $LN17_87;
    case 3:
      if ( t2->u.d__ != t1->u.d__ )
        goto LABEL_6;
      goto $LN17_87;
    case 1:
    case 2:
    case 4:
    case 0x16:
      return t1->u.i.v__.b == t2->u.i.v__.b;
    case 0x14:
      return luaS_eqlngstr((TString *)t1->u.i.v__.gc, (TString *)t2->u.i.v__.gc);
    case 5:
    case 7:
      if ( t1->u.i.v__.b == t2->u.i.v__.b )
        goto $LN17_87;
      if ( !L )
        goto LABEL_6;
      v5 = get_equalTM(*(Table **)(t1->u.i.v__.b + 8), TM_EQ, L, *(Table **)(t2->u.i.v__.b + 8));
      if ( !v5 )
        goto LABEL_6;
      callTM(L, t1, t2, v5, L->top, 1);
      v6 = L->top;
      v7 = v6->u.i.tt__;
      if ( v7 == 2146936064 )
        goto LABEL_6;
      if ( v7 == 2146936065 )
      {
        if ( v6->u.i.v__.b )
          result = 1;
        else
LABEL_6:
          result = 0;
      }
      else
      {
$LN17_87:
        result = 1;
      }
      break;
    default:
      result = t1->u.i.v__.b == t2->u.i.v__.b;
      break;
  }
  return result;
}

//----- (007483B0) --------------------------------------------------------
void __cdecl luaV_concat(lua_State *L, int total)
{
  lua_State *v2; // edi@1
  lua_TValue *v3; // esi@2
  unsigned int v4; // eax@6
  GCObject *v5; // eax@6
  unsigned int v6; // ecx@7
  int v7; // edx@7
  unsigned int v8; // eax@10
  GCObject *v9; // eax@10
  int v10; // ebx@16
  int v11; // edi@17
  unsigned int v12; // eax@20
  GCObject *v13; // eax@20
  unsigned int v14; // eax@21
  int v15; // edi@24
  unsigned int l; // ST28_4@25
  int v17; // esi@26
  GCObject *v18; // eax@26
  int v19; // [sp+18h] [bp-38h]@24
  char *buffer; // [sp+1Ch] [bp-34h]@24
  int n; // [sp+20h] [bp-30h]@2
  unsigned int tl; // [sp+28h] [bp-28h]@16
  unsigned int tla; // [sp+28h] [bp-28h]@24
  char string; // [sp+2Ch] [bp-24h]@6

  v2 = L;
  do
  {
    v3 = v2->top;
    n = 2;
    if ( (v3[-2].u.i.tt__ | 0x70) != 2146936180 && (v3[-2].u.i.tt__ & 0x7FFFFF00) == 2146936064 )
    {
LABEL_11:
      if ( !call_binTM(v2, v3 - 2, v3 - 2, v3 - 1, TM_CONCAT) )
        luaG_concaterror(v2, v3 - 2, v3 - 1);
      goto LABEL_27;
    }
    if ( (v3[-1].u.i.tt__ | 0x70) != 2146936180 )
    {
      if ( (v3[-1].u.i.tt__ & 0x7FFFFF00) == 2146936064 )
        goto LABEL_11;
      v4 = sprintf(&string, "%.14g", v3[-1].u.d__);
      v5 = luaS_newlstr(v2, &string, v4);
      v3[-1].u.i.v__.b = (int)v5;
      v3[-1].u.i.tt__ = v5->cl.c.tt | 0x7FF7A540;
    }
    v6 = *(_DWORD *)(v3[-1].u.i.v__.b + 12);
    v7 = v3[-2].u.i.tt__ | 0x70;
    if ( v6 )
    {
      if ( v7 != 2146936180 || *(_DWORD *)(v3[-2].u.i.v__.b + 12) )
      {
        v10 = 1;
        tl = *(_DWORD *)(v3[-1].u.i.v__.b + 12);
        if ( total > 1 )
        {
          v11 = (int)&v3[-2];
          do
          {
            if ( (*(_DWORD *)(v11 + 4) | 0x70) != 2146936180 )
            {
              if ( (*(_DWORD *)(v11 + 4) & 0x7FFFFF00) == 2146936064 )
                break;
              v12 = sprintf(&string, "%.14g", *(double *)v11);
              v13 = luaS_newlstr(L, &string, v12);
              v6 = tl;
              *(_DWORD *)v11 = v13;
              *(_DWORD *)(v11 + 4) = v13->cl.c.tt | 0x7FF7A540;
            }
            v14 = *(_DWORD *)(*(_DWORD *)v11 + 12);
            if ( v14 >= -3 - v6 )
              luaG_runerror(L, "string length overflow");
            v6 += v14;
            ++v10;
            v11 -= 8;
            tl = v6;
          }
          while ( v10 < total );
          v2 = L;
        }
        buffer = luaZ_openspace(v2, &v2->l_G->buff, v6);
        tla = 0;
        n = v10;
        v19 = 8 * v10;
        v15 = (int)&v3[-v10];
        do
        {
          l = *(_DWORD *)(*(_DWORD *)v15 + 12);
          memcpy(&buffer[tla], (char *)(*(_DWORD *)v15 + 16), l);
          tla += l;
          --v10;
          v15 += 8;
        }
        while ( v10 > 0 );
        v17 = (int)&v3[-v19 / 8u];
        v18 = luaS_newlstr(L, buffer, tla);
        v2 = L;
        *(_DWORD *)v17 = v18;
        *(_DWORD *)(v17 + 4) = v18->cl.c.tt | 0x7FF7A540;
      }
      else
      {
        v3[-2].u.i.v__.b = v3[-1].u.i.v__.b;
        v3[-2].u.i.tt__ = v3[-1].u.i.tt__;
      }
    }
    else if ( v7 != 2146936180 && (v3[-2].u.i.tt__ & 0x7FFFFF00) != 2146936064 )
    {
      v8 = sprintf(&string, "%.14g", v3[-2].u.d__);
      v9 = luaS_newlstr(v2, &string, v8);
      v3[-2].u.i.v__.b = (int)v9;
      v3[-2].u.i.tt__ = v9->cl.c.tt | 0x7FF7A540;
    }
LABEL_27:
    v2->top = (lua_TValue *)((char *)v2->top + 8 - 8 * n);
    total += 1 - n;
  }
  while ( total > 1 );
}

//----- (00748670) --------------------------------------------------------
void __cdecl luaV_objlen(lua_State *L, lua_TValue *ra, lua_TValue *rb)
{
  int v3; // eax@1
  int v4; // eax@3
  lua_State *v5; // esi@5
  lua_TValue *v6; // eax@5
  Table *v7; // edi@7
  Table *v8; // eax@7
  lua_TValue *v9; // ecx@10
  char *v10; // edi@10
  lua_TValue *v11; // eax@10
  lua_TValue *v12; // eax@10
  int v13; // eax@10
  lua_TValue *v14; // esi@10

  v3 = rb->u.i.tt__;
  if ( (rb->u.i.tt__ & 0x7FFFFF00) != 2146936064 )
    LOBYTE(v3) = 3;
  v4 = (v3 & 0xF) - 4;
  if ( v4 )
  {
    if ( v4 != 1 )
    {
      v5 = L;
      v6 = luaT_gettmbyobj(L, rb, TM_LEN);
      if ( v6->u.i.tt__ == 2146936064 )
        luaG_typeerror(L, rb, "get length of");
LABEL_10:
      v9 = v5->top;
      v10 = (char *)((char *)ra - (char *)v5->stack);
      v5->top = v9 + 1;
      v9->u.i.v__.b = v6->u.i.v__.b;
      v9->u.i.tt__ = v6->u.i.tt__;
      v11 = v5->top;
      v5->top = v11 + 1;
      *v11 = *rb;
      v12 = v5->top;
      v5->top = v12 + 1;
      *v12 = *rb;
      luaD_call(v5, v5->top - 3, 1, v5->ci->callstatus & 1);
      v13 = (int)&v5->top[-1];
      v5->top = (lua_TValue *)v13;
      v14 = v5->stack;
      *(_DWORD *)&v10[(_DWORD)v14] = *(_DWORD *)v13;
      *(_DWORD *)&v10[(_DWORD)v14 + 4] = *(_DWORD *)(v13 + 4);
      return;
    }
    v7 = (Table *)rb->u.i.v__.b;
    v8 = *(Table **)(rb->u.i.v__.b + 8);
    if ( v8 )
    {
      if ( !(v8->flags & 0x10) )
      {
        v5 = L;
        v6 = luaT_gettm(v8, TM_LEN, L->l_G->tmname[4]);
        if ( v6 )
          goto LABEL_10;
      }
    }
    ra->u.d__ = (double)(signed int)luaH_getn(v7);
  }
  else
  {
    ra->u.d__ = (double)*(unsigned int *)(rb->u.i.v__.b + 12);
  }
}

//----- (007487B0) --------------------------------------------------------
void __cdecl luaV_arith(lua_State *L, lua_TValue *ra, lua_TValue *rb, lua_TValue *rc, TMS op)
{
  lua_TValue *v5; // esi@1
  lua_TValue *v6; // edi@2
  lua_TValue tempc; // [sp+1Ch] [bp-10h]@8
  lua_TValue tempb; // [sp+24h] [bp-8h]@4

  v5 = rc;
  if ( (rb->u.i.tt__ & 0x7FFFFF00) == 2146936064 )
  {
    if ( (rb->u.i.tt__ | 0x70) != 2146936180
      || !luaO_str2d((const char *)(rb->u.i.v__.b + 16), *(_DWORD *)(rb->u.i.v__.b + 12), (long double *)&tempb) )
    {
      goto LABEL_12;
    }
    v6 = &tempb;
  }
  else
  {
    v6 = rb;
  }
  if ( (rc->u.i.tt__ & 0x7FFFFF00) != 2146936064 )
  {
LABEL_10:
    ra->u.d__ = luaO_arith(op - 6, v6->u.d__, v5->u.d__);
    return;
  }
  if ( (rc->u.i.tt__ | 0x70) == 2146936180
    && luaO_str2d((const char *)(rc->u.i.v__.b + 16), *(_DWORD *)(rc->u.i.v__.b + 12), (long double *)&tempc) )
  {
    v5 = &tempc;
    goto LABEL_10;
  }
LABEL_12:
  if ( !call_binTM(L, rb, ra, rc, op) )
    luaG_aritherror(L, rb, rc);
}

//----- (007488A0) --------------------------------------------------------
Closure *__cdecl getcached(UpVal **encup, lua_TValue *base)
{
  Proto *p; // ecx@0
  Closure *result; // eax@1
  int v4; // ebx@2
  Upvaldesc *v5; // ecx@2
  int v6; // edx@2
  char *v7; // edi@3
  char *v8; // ecx@3
  int v9; // eax@4
  lua_TValue *v10; // esi@5
  Closure *c; // [sp+Ch] [bp-4h]@1

  result = p->cache;
  c = result;
  if ( result )
  {
    v4 = p->sizeupvalues;
    v5 = p->upvalues;
    v6 = 0;
    if ( v4 > 0 )
    {
      v7 = (char *)result->l.upvals;
      v8 = &v5->idx;
      while ( 1 )
      {
        v9 = (unsigned __int8)*v8;
        v10 = *(v8 - 1) ? &base[v9] : encup[v9]->v;
        if ( *(lua_TValue **)(*(_DWORD *)v7 + 8) != v10 )
          break;
        ++v6;
        v7 += 4;
        v8 += 8;
        if ( v6 >= v4 )
          return c;
      }
      result = 0;
    }
  }
  return result;
}

//----- (00748910) --------------------------------------------------------
void __usercall pushclosure(lua_TValue *ra@<eax>, lua_State *L, Proto *p, UpVal **encup, lua_TValue *base)
{
  Proto *v5; // ebx@1
  int v6; // esi@1
  lua_TValue *v7; // edi@1
  GCObject *v8; // eax@1
  _DWORD *v9; // ebx@2
  char *v10; // edi@2
  Upvaldesc *uv; // [sp+Ch] [bp-8h]@1
  Closure *ncl; // [sp+10h] [bp-4h]@1

  v5 = p;
  v6 = p->sizeupvalues;
  v7 = ra;
  uv = p->upvalues;
  v8 = luaF_newLclosure(L, p->sizeupvalues);
  v8->p.code = (unsigned int *)p;
  ncl = (Closure *)v8;
  v7->u.i.v__.b = (int)v8;
  v7->u.i.tt__ = 2146936134;
  if ( v6 > 0 )
  {
    v9 = &v8->p.p;
    v10 = &uv->idx;
    do
    {
      if ( *(v10 - 1) )
      {
        *v9 = luaF_findupval(L, &base[(unsigned __int8)*v10]);
        v8 = (GCObject *)ncl;
      }
      else
      {
        *v9 = encup[(unsigned __int8)*v10];
      }
      ++v9;
      v10 += 8;
      --v6;
    }
    while ( v6 );
    v5 = p;
  }
  if ( v5->marked & 4 )
  {
    luaC_barrierproto_(L, v5, (Closure *)v8);
    v8 = (GCObject *)ncl;
  }
  v5->cache = (Closure *)v8;
}

//----- (007489B0) --------------------------------------------------------
void __cdecl luaV_finishOp(lua_State *L)
{
  lua_State *v1; // edi@1
  CallInfo *v2; // ebx@1
  unsigned int v3; // esi@1
  lua_TValue *v4; // ecx@1
  int v5; // eax@1
  lua_TValue *v6; // eax@2
  int v7; // esi@2
  lua_TValue *v8; // ecx@3
  int v9; // edx@3
  lua_TValue *v10; // eax@13
  signed int v11; // ecx@13
  lua_TValue *v12; // eax@15
  lua_TValue *v13; // ecx@15
  int v14; // esi@15
  lua_TValue *base; // [sp+Ch] [bp-4h]@1
  int res; // [sp+18h] [bp+8h]@6

  v1 = L;
  v2 = L->ci;
  v3 = *((_DWORD *)v2->u.l.savedpc - 1);
  v4 = v2->u.l.base;
  v5 = *((_DWORD *)v2->u.l.savedpc - 1) & 0x3F;
  base = v2->u.l.base;
  switch ( v5 )
  {
    case 6:
    case 7:
    case 12:
    case 13:
    case 14:
    case 15:
    case 16:
    case 17:
    case 18:
    case 19:
    case 21:
      v6 = L->top - 1;
      L->top = v6;
      v7 = (v3 >> 6) & 0xFF;
      v4[v7].u.i.v__.b = v6->u.i.v__.b;
      v4[v7].u.i.tt__ = v6->u.i.tt__;
      break;
    case 24:
    case 25:
    case 26:
      v8 = L->top;
      v9 = v8[-1].u.i.tt__;
      res = v9 != 2146936064 && (v9 != 2146936065 || v8[-1].u.i.v__.b);
      v1->top = v8 - 1;
      if ( v5 == 26 && luaT_gettmbyobj(v1, &base[v3 >> 23], TM_LE)->u.i.tt__ == 2146936064 )
        res = res == 0;
      if ( res != ((v3 >> 6) & 0xFF) )
        ++v2->u.l.savedpc;
      break;
    case 22:
      v10 = L->top;
      v11 = &v10[-(v3 >> 23) - 2] - base;
      v10[-3].u.i.v__.b = v10[-1].u.i.v__.b;
      v10[-3].u.i.tt__ = v10[-1].u.i.tt__;
      if ( v11 > 1 )
      {
        L->top = v10 - 2;
        luaV_concat(L, v11);
      }
      v12 = L->top;
      v13 = v2->u.l.base;
      v14 = (v3 >> 6) & 0xFF;
      v13[v14].u.i.v__.b = v12[-1].u.i.v__.b;
      v13[v14].u.i.tt__ = v12[-1].u.i.tt__;
      L->top = v2->top;
      break;
    case 34:
      L->top = v2->top;
      break;
    case 29:
      if ( ((((v3 >> 14) & 0x1FF) - 1) & 0x80000000) == 0 )
        L->top = v2->top;
      break;
    default:
      return;
  }
}

//----- (00748B50) --------------------------------------------------------
void __cdecl luaV_execute(lua_State *L)
{
  lua_TValue *v1; // ebx@2
  const unsigned int *v2; // eax@3
  unsigned int v3; // esi@3
  lua_State *v4; // edi@3
  char v5; // cl@3
  bool v6; // zf@4
  CallInfo *v7; // ebx@6
  int v8; // eax@8
  signed int v9; // edx@8
  char v10; // al@9
  int v11; // ecx@15
  int v12; // edi@15
  const unsigned int *v13; // edx@15
  int v14; // ecx@15
  int v15; // eax@15
  const unsigned int *v16; // eax@19
  int v17; // eax@21
  int v18; // edi@27
  unsigned int v19; // esi@28
  lua_TValue *v20; // eax@29
  unsigned int v21; // esi@29
  const unsigned int *v22; // eax@30
  lua_TValue *v23; // esi@30
  unsigned int v24; // ecx@30
  unsigned int v25; // esi@33
  _DWORD *v26; // eax@33
  unsigned int v27; // edx@34
  int v28; // eax@36
  unsigned int v29; // ecx@37
  unsigned int v30; // esi@37
  unsigned int v31; // ecx@37
  lua_TValue *v32; // eax@38
  unsigned int v33; // eax@42
  lua_TValue *v34; // eax@43
  unsigned int v35; // eax@46
  lua_TValue *v36; // ecx@47
  unsigned int v37; // esi@49
  lua_TValue *v38; // eax@50
  GCObject *v39; // esi@53
  unsigned int v40; // eax@53
  int v41; // eax@53
  GCObject *v42; // edi@56
  unsigned int v43; // eax@59
  lua_TValue *v44; // ecx@60
  unsigned int v45; // esi@62
  lua_TValue *v46; // eax@63
  int v47; // ebx@66
  GCObject *v48; // esi@66
  int v49; // ST10_4@68
  int v50; // eax@68
  lua_TValue *v51; // eax@72
  unsigned int v52; // esi@72
  unsigned int v53; // eax@75
  lua_TValue *v54; // ecx@76
  unsigned int v55; // esi@78
  lua_TValue *v56; // eax@79
  unsigned int v57; // eax@85
  lua_TValue *v58; // ecx@86
  unsigned int v59; // esi@88
  lua_TValue *v60; // eax@89
  unsigned int v61; // eax@95
  lua_TValue *v62; // ecx@96
  unsigned int v63; // esi@98
  lua_TValue *v64; // eax@99
  unsigned int v65; // eax@105
  lua_TValue *v66; // ecx@106
  unsigned int v67; // esi@108
  lua_TValue *v68; // eax@109
  unsigned int v69; // eax@115
  lua_TValue *v70; // ecx@116
  unsigned int v71; // esi@118
  lua_TValue *v72; // eax@119
  double v73; // st7@123
  unsigned int v74; // eax@125
  lua_TValue *v75; // ecx@126
  unsigned int v76; // esi@128
  lua_TValue *v77; // eax@129
  lua_TValue *v78; // eax@135
  unsigned int v79; // esi@138
  int v80; // eax@138
  unsigned int v81; // edi@144
  int v82; // esi@144
  lua_TValue *v83; // ecx@144
  unsigned int v84; // eax@144
  lua_TValue *v85; // edi@144
  CallInfo *v86; // eax@147
  unsigned int v87; // eax@152
  lua_TValue *v88; // edi@153
  unsigned int v89; // esi@155
  lua_TValue *v90; // eax@156
  int v91; // edx@159
  int v92; // eax@163
  CallInfo *v93; // esi@165
  unsigned int v94; // edi@167
  unsigned int v95; // eax@170
  lua_TValue *v96; // ecx@171
  unsigned int v97; // esi@173
  lua_TValue *v98; // eax@174
  lua_State *v99; // ebx@176
  int v100; // eax@176
  CallInfo *v101; // esi@177
  unsigned int v102; // edi@179
  unsigned int v103; // eax@182
  lua_TValue *v104; // ecx@183
  unsigned int v105; // esi@185
  lua_TValue *v106; // eax@187
  int v107; // eax@188
  CallInfo *v108; // ecx@192
  unsigned int v109; // esi@192
  int v110; // ecx@200
  int v111; // eax@200
  unsigned int v112; // eax@209
  int v113; // esi@209
  CallInfo *v114; // ecx@213
  unsigned int v115; // esi@214
  double v116; // st7@218
  double v117; // st6@218
  double v118; // st5@218
  double v119; // st7@218
  int v120; // eax@223
  int v121; // ecx@223
  int v122; // eax@234
  int v123; // eax@237
  CallInfo *v124; // ecx@237
  const unsigned int *v125; // eax@237
  int v126; // eax@240
  int v127; // esi@240
  unsigned int v128; // ecx@240
  const unsigned int *v129; // edx@243
  Table *v130; // edx@244
  int v131; // esi@244
  lua_TValue *v132; // edi@247
  int v133; // eax@248
  Proto *v134; // esi@256
  Closure *v135; // eax@256
  Proto *v136; // ST08_4@257
  lua_State *v137; // esi@257
  CallInfo *v138; // ecx@260
  int v139; // esi@261
  int v140; // eax@261
  int v141; // esi@261
  lua_State *v142; // ecx@262
  signed int v143; // edx@262
  int v144; // ecx@265
  int v145; // eax@266
  CallInfo *v146; // edi@272
  CallInfo *v147; // eax@273
  unsigned int v148; // edi@273
  int v149; // ecx@273
  lua_TValue *v150; // edx@273
  CallInfo *v151; // esi@273
  lua_TValue *v152; // ebx@273
  int v153; // eax@273
  int v154; // edx@273
  bool v155; // sf@273
  int v156; // ecx@276
  int v157; // eax@276
  int v158; // eax@277
  int v159; // ecx@278
  lua_TValue *v160; // ebx@278
  const unsigned int *v161; // ecx@278
  unsigned int v162; // esi@279
  int v163; // eax@283
  CallInfo *v164; // ecx@284
  int v165; // [sp+0h] [bp-50h]@0
  long double v166; // [sp+14h] [bp-3Ch]@233
  long double v167; // [sp+1Ch] [bp-34h]@229
  long double result; // [sp+24h] [bp-2Ch]@225
  lua_TValue nci; // [sp+2Ch] [bp-24h]@15
  lua_TValue v170; // [sp+34h] [bp-1Ch]@123
  int b; // [sp+38h] [bp-18h]@16
  int v172; // [sp+3Ch] [bp-14h]@2
  int n; // [sp+40h] [bp-10h]@8
  lua_TValue *k; // [sp+44h] [bp-Ch]@2
  CallInfo *ci; // [sp+48h] [bp-8h]@1
  char v176; // [sp+4Fh] [bp-1h]@3

  ci = L->ci;
newframe:
  v1 = ci->u.l.base;
  v172 = ci->func->u.i.v__.b;
  k = *(lua_TValue **)(*(_DWORD *)(v172 + 12) + 8);
  while ( 2 )
  {
    v2 = ci->u.l.savedpc;
    v3 = *v2;
    v4 = L;
    ci->u.l.savedpc = v2 + 1;
    v5 = L->hookmask;
    v176 = v5;
    if ( v5 & 0xC )
    {
      v6 = L->hookcount-- == 1;
      if ( v6 || v5 & 4 )
      {
        v7 = L->ci;
        if ( !(v5 & 8) || L->hookcount )
        {
          v9 = 0;
          n = 0;
        }
        else
        {
          v8 = L->basehookcount;
          v9 = 1;
          n = 1;
          L->hookcount = v8;
        }
        v10 = v7->callstatus;
        if ( v10 >= 0 )
        {
          if ( v9 )
          {
            luaD_hook(L, v165, -1);
            v5 = v176;
          }
          if ( v5 & 4 )
          {
            v11 = *(_DWORD *)(v7->func->u.i.v__.b + 12);
            v12 = *(_DWORD *)(v11 + 12);
            v13 = v7->u.l.savedpc;
            v14 = *(_DWORD *)(v11 + 20);
            v15 = (((signed int)v7->u.l.savedpc - v12) >> 2) - 1;
            nci.u.i.tt__ = v12;
            b = v14 ? *(_DWORD *)(v14 + 4 * v15) : 0;
            if ( (v4 = L, !v15)
              || (v16 = L->oldpc, v13 <= v16)
              || (!v14 ? (v17 = 0) : (v17 = *(_DWORD *)(v14 + 4 * (((signed int)v16 - nci.u.i.tt__) >> 2) - 4)), b != v17) )
            {
              luaD_hook(L, 2, b);
            }
          }
          v6 = v4->status == 1;
          v4->oldpc = v7->u.l.savedpc;
          if ( v6 )
          {
            if ( n )
              v4->hookcount = 1;
            --v7->u.l.savedpc;
            v7->callstatus |= 0x80u;
            v7->func = v4->top - 1;
            luaD_throw(v4, 1);
          }
        }
        else
        {
          v7->callstatus = v10 & 0x7F;
        }
        v1 = ci->u.l.base;
      }
    }
    n = (v3 >> 6) & 0xFF;
    v18 = (int)&v1[n];
    switch ( v3 & 0x3F )
    {
      case 0u:
        v19 = v3 >> 23;
        *(_DWORD *)v18 = v1[v19].u.i.v__.gc;
        *(_DWORD *)(v18 + 4) = v1[v19].u.i.tt__;
        continue;
      case 1u:
        v20 = k;
        v21 = v3 >> 14;
        *(_DWORD *)v18 = k[v21].u.i.v__.gc;
        *(_DWORD *)(v18 + 4) = v20[v21].u.i.tt__;
        continue;
      case 2u:
        v22 = ci->u.l.savedpc;
        v23 = k;
        v24 = *v22 >> 6;
        ci->u.l.savedpc = v22 + 1;
        *(_DWORD *)v18 = v23[v24].u.i.v__.gc;
        *(_DWORD *)(v18 + 4) = v23[v24].u.i.tt__;
        continue;
      case 3u:
        *(_DWORD *)v18 = v3 >> 23;
        *(_DWORD *)(v18 + 4) = 2146936065;
        if ( ((unsigned int)&loc_7FBFFC + 4) & v3 )
          ++ci->u.l.savedpc;
        continue;
      case 4u:
        v25 = v3 >> 23;
        v26 = (_DWORD *)(v18 + 4);
        do
        {
          v27 = v25;
          *v26 = 2146936064;
          v26 += 2;
          --v25;
        }
        while ( v27 );
        continue;
      case 5u:
        v28 = *(_DWORD *)(*(_DWORD *)(v172 + 4 * (v3 >> 23) + 16) + 8);
        *(_DWORD *)v18 = *(_DWORD *)v28;
        *(_DWORD *)(v18 + 4) = *(_DWORD *)(v28 + 4);
        continue;
      case 6u:
        v29 = v3;
        v30 = v3 >> 14;
        v31 = v29 >> 23;
        if ( v30 & 0x100 )
          v32 = &k[(unsigned __int8)v30];
        else
          v32 = &v1[v30 & 0x1FF];
        luaV_gettable(L, *(lua_TValue **)(*(_DWORD *)(v172 + 4 * v31 + 16) + 8), v32, (lua_TValue *)v18);
        goto LABEL_41;
      case 7u:
        v33 = v3 >> 14;
        if ( (v3 >> 14) & 0x100 )
          v34 = &k[(unsigned __int8)v33];
        else
          v34 = &v1[(v3 >> 14) & 0x1FF];
        luaV_gettable(L, &v1[v3 >> 23], v34, (lua_TValue *)v18);
        v1 = ci->u.l.base;
        continue;
      case 8u:
        v35 = v3 >> 14;
        if ( (v3 >> 14) & 0x100 )
          v36 = &k[(unsigned __int8)v35];
        else
          v36 = &v1[(v3 >> 14) & 0x1FF];
        v37 = v3 >> 23;
        if ( v37 & 0x100 )
          v38 = &k[(unsigned __int8)v37];
        else
          v38 = &v1[v37];
        luaV_settable(L, *(lua_TValue **)(*(_DWORD *)(v172 + 4 * n + 16) + 8), v38, v36);
        v1 = ci->u.l.base;
        continue;
      case 9u:
        v39 = *(GCObject **)(v172 + 4 * (v3 >> 23) + 16);
        v40 = v39->ts.tsv.hash;
        *(_DWORD *)v40 = *(_DWORD *)v18;
        *(_DWORD *)(v40 + 4) = *(_DWORD *)(v18 + 4);
        v41 = *(_DWORD *)(v18 + 4);
        if ( (*(_DWORD *)(v18 + 4) & 0x7FFFFF00) != 2146936064 )
          LOBYTE(v41) = 3;
        if ( v41 & 0x40 )
        {
          v42 = *(GCObject **)v18;
          if ( v42->h.marked & 3 )
          {
            if ( v39->h.marked & 4 )
              luaC_barrier_(L, v39, v42);
          }
        }
        continue;
      case 0xAu:
        v43 = v3 >> 14;
        if ( (v3 >> 14) & 0x100 )
          v44 = &k[(unsigned __int8)v43];
        else
          v44 = &v1[(v3 >> 14) & 0x1FF];
        v45 = v3 >> 23;
        if ( v45 & 0x100 )
          v46 = &k[(unsigned __int8)v45];
        else
          v46 = &v1[v45];
        luaV_settable(L, (lua_TValue *)v18, v46, v44);
        v1 = ci->u.l.base;
        continue;
      case 0xBu:
        v47 = v3 >> 23;
        b = (v3 >> 14) & 0x1FF;
        v48 = luaH_new(L);
        *(_DWORD *)v18 = v48;
        *(_DWORD *)(v18 + 4) = 2146936133;
        if ( v47 || b )
        {
          v49 = luaO_fb2int(b);
          v50 = luaO_fb2int(v47);
          luaH_resize(L, (Table *)v48, v50, v49);
        }
        if ( L->l_G->GCdebt > 0 )
        {
          L->top = (lua_TValue *)(v18 + 8);
          luaC_step(L);
          L->top = ci->top;
        }
        v1 = ci->u.l.base;
        continue;
      case 0xCu:
        v51 = &v1[v3 >> 23];
        *(_DWORD *)(v18 + 8) = v1[v3 >> 23].u.i.v__.gc;
        v52 = v3 >> 14;
        *(_DWORD *)(v18 + 12) = v51->u.i.tt__;
        if ( v52 & 0x100 )
          luaV_gettable(L, v51, &k[(unsigned __int8)v52], (lua_TValue *)v18);
        else
          luaV_gettable(L, v51, &v1[v52 & 0x1FF], (lua_TValue *)v18);
        goto LABEL_41;
      case 0xDu:
        v53 = v3 >> 23;
        if ( (v3 >> 23) & 0x100 )
          v54 = &k[(unsigned __int8)v53];
        else
          v54 = &v1[v53];
        v55 = v3 >> 14;
        if ( v55 & 0x100 )
          v56 = &k[(unsigned __int8)v55];
        else
          v56 = &v1[v55 & 0x1FF];
        if ( (v54->u.i.tt__ & 0x7FFFFF00) == 2146936064 || (v56->u.i.tt__ & 0x7FFFFF00) == 2146936064 )
        {
          luaV_arith(L, (lua_TValue *)v18, v54, v56, TM_ADD);
          v1 = ci->u.l.base;
        }
        else
        {
          *(double *)v18 = v56->u.d__ + v54->u.d__;
        }
        continue;
      case 0xEu:
        v57 = v3 >> 23;
        if ( (v3 >> 23) & 0x100 )
          v58 = &k[(unsigned __int8)v57];
        else
          v58 = &v1[v57];
        v59 = v3 >> 14;
        if ( v59 & 0x100 )
          v60 = &k[(unsigned __int8)v59];
        else
          v60 = &v1[v59 & 0x1FF];
        if ( (v58->u.i.tt__ & 0x7FFFFF00) == 2146936064 || (v60->u.i.tt__ & 0x7FFFFF00) == 2146936064 )
        {
          luaV_arith(L, (lua_TValue *)v18, v58, v60, TM_SUB);
          v1 = ci->u.l.base;
        }
        else
        {
          *(double *)v18 = v58->u.d__ - v60->u.d__;
        }
        continue;
      case 0xFu:
        v61 = v3 >> 23;
        if ( (v3 >> 23) & 0x100 )
          v62 = &k[(unsigned __int8)v61];
        else
          v62 = &v1[v61];
        v63 = v3 >> 14;
        if ( v63 & 0x100 )
          v64 = &k[(unsigned __int8)v63];
        else
          v64 = &v1[v63 & 0x1FF];
        if ( (v62->u.i.tt__ & 0x7FFFFF00) == 2146936064 || (v64->u.i.tt__ & 0x7FFFFF00) == 2146936064 )
        {
          luaV_arith(L, (lua_TValue *)v18, v62, v64, TM_MUL);
          v1 = ci->u.l.base;
        }
        else
        {
          *(double *)v18 = v64->u.d__ * v62->u.d__;
        }
        continue;
      case 0x10u:
        v65 = v3 >> 23;
        if ( (v3 >> 23) & 0x100 )
          v66 = &k[(unsigned __int8)v65];
        else
          v66 = &v1[v65];
        v67 = v3 >> 14;
        if ( v67 & 0x100 )
          v68 = &k[(unsigned __int8)v67];
        else
          v68 = &v1[v67 & 0x1FF];
        if ( (v66->u.i.tt__ & 0x7FFFFF00) == 2146936064 || (v68->u.i.tt__ & 0x7FFFFF00) == 2146936064 )
        {
          luaV_arith(L, (lua_TValue *)v18, v66, v68, TM_DIV);
          v1 = ci->u.l.base;
        }
        else
        {
          *(double *)v18 = v66->u.d__ / v68->u.d__;
        }
        continue;
      case 0x11u:
        v69 = v3 >> 23;
        if ( (v3 >> 23) & 0x100 )
          v70 = &k[(unsigned __int8)v69];
        else
          v70 = &v1[v69];
        v71 = v3 >> 14;
        if ( v71 & 0x100 )
          v72 = &k[(unsigned __int8)v71];
        else
          v72 = &v1[v71 & 0x1FF];
        if ( (v70->u.i.tt__ & 0x7FFFFF00) == 2146936064 || (v72->u.i.tt__ & 0x7FFFFF00) == 2146936064 )
        {
          luaV_arith(L, (lua_TValue *)v18, v70, v72, TM_MOD);
          v1 = ci->u.l.base;
        }
        else
        {
          v170 = *v70;
          nci = *v72;
          v73 = floor(v170.u.d__ / nci.u.d__);
          *(double *)v18 = v170.u.d__ - v73 * nci.u.d__;
        }
        continue;
      case 0x12u:
        v74 = v3 >> 23;
        if ( (v3 >> 23) & 0x100 )
          v75 = &k[(unsigned __int8)v74];
        else
          v75 = &v1[v74];
        v76 = v3 >> 14;
        if ( v76 & 0x100 )
          v77 = &k[(unsigned __int8)v76];
        else
          v77 = &v1[v76 & 0x1FF];
        if ( (v75->u.i.tt__ & 0x7FFFFF00) == 2146936064 || (v77->u.i.tt__ & 0x7FFFFF00) == 2146936064 )
        {
          luaV_arith(L, (lua_TValue *)v18, v75, v77, TM_POW);
          v1 = ci->u.l.base;
        }
        else
        {
          *(long double *)v18 = pow(v75->u.d__, v77->u.d__);
        }
        continue;
      case 0x13u:
        v78 = &v1[v3 >> 23];
        if ( (v78->u.i.tt__ & 0x7FFFFF00) == 2146936064 )
        {
          luaV_arith(L, (lua_TValue *)v18, v78, v78, TM_UNM);
          v1 = ci->u.l.base;
        }
        else
        {
          *(double *)v18 = -v78->u.d__;
        }
        continue;
      case 0x14u:
        v79 = v3 >> 23;
        v80 = v1[v79].u.i.tt__;
        if ( v80 != 2146936064 && (v80 != 2146936065 || v1[v79].u.i.v__.b) )
        {
          *(_DWORD *)v18 = 0;
          *(_DWORD *)(v18 + 4) = 2146936065;
        }
        else
        {
          *(_DWORD *)v18 = 1;
          *(_DWORD *)(v18 + 4) = 2146936065;
        }
        continue;
      case 0x15u:
        luaV_objlen(L, (lua_TValue *)v18, &v1[v3 >> 23]);
        v1 = ci->u.l.base;
        continue;
      case 0x16u:
        v81 = v3;
        v82 = (v3 >> 14) & 0x1FF;
        v81 >>= 23;
        L->top = &v1[v82 + 1];
        luaV_concat(L, v82 - v81 + 1);
        v83 = ci->u.l.base;
        v84 = (unsigned int)&v83[n];
        v85 = &v83[v81];
        *(_DWORD *)v84 = v85->u.i.v__.b;
        *(_DWORD *)(v84 + 4) = v85->u.i.tt__;
        if ( L->l_G->GCdebt <= 0 )
        {
          v1 = ci->u.l.base;
          L->top = ci->top;
        }
        else
        {
          if ( v84 >= (unsigned int)v85 )
            v85 = (lua_TValue *)(v84 + 8);
          L->top = v85;
          luaC_step(L);
          v86 = ci;
          L->top = ci->top;
          v1 = v86->u.l.base;
          L->top = v86->top;
        }
        continue;
      case 0x17u:
        if ( n > 0 )
          luaF_close(L, (lua_TValue *)(ci->u.c.ctx + 8 * n - 8));
        ci->u.l.savedpc += (v3 >> 14) - 0x1FFFF;
        continue;
      case 0x18u:
        v87 = v3 >> 23;
        if ( (v3 >> 23) & 0x100 )
          v88 = &k[(unsigned __int8)v87];
        else
          v88 = &v1[v87];
        v89 = v3 >> 14;
        if ( v89 & 0x100 )
          v90 = &k[(unsigned __int8)v89];
        else
          v90 = &v1[v89 & 0x1FF];
        if ( (v88->u.i.tt__ & 0x7FFFFF00) == 2146936064 )
          v91 = v88->u.i.tt__ == v90->u.i.tt__;
        else
          v91 = (v90->u.i.tt__ & 0x7FFFFF00) != 2146936064;
        v92 = v91 && luaV_equalobj_(L, v88, v90);
        v93 = ci;
        if ( v92 == n )
        {
          v94 = *ci->u.l.savedpc;
          if ( (signed int)((v94 >> 6) & 0xFF) > 0 )
            luaF_close(L, (lua_TValue *)(ci->u.c.ctx + 8 * ((v94 >> 6) & 0xFF) - 8));
          v1 = v93->u.l.base;
          v93->u.l.savedpc += (v94 >> 14) - 131070;
        }
        else
        {
          ++ci->u.l.savedpc;
          v1 = v93->u.l.base;
        }
        continue;
      case 0x19u:
        v95 = v3 >> 14;
        if ( (v3 >> 14) & 0x100 )
          v96 = &k[(unsigned __int8)v95];
        else
          v96 = &v1[(v3 >> 14) & 0x1FF];
        v97 = v3 >> 23;
        if ( v97 & 0x100 )
          v98 = &k[(unsigned __int8)v97];
        else
          v98 = &v1[v97];
        v99 = L;
        v100 = luaV_lessthan(L, v98, v96);
        goto LABEL_177;
      case 0x1Au:
        v103 = v3 >> 14;
        if ( (v3 >> 14) & 0x100 )
          v104 = &k[(unsigned __int8)v103];
        else
          v104 = &v1[(v3 >> 14) & 0x1FF];
        v105 = v3 >> 23;
        if ( v105 & 0x100 )
        {
          v99 = L;
          v100 = luaV_lessequal(L, &k[(unsigned __int8)v105], v104);
        }
        else
        {
          v106 = &v1[v105];
          v99 = L;
          v100 = luaV_lessequal(L, v106, v104);
        }
LABEL_177:
        v101 = ci;
        if ( v100 == n )
        {
          v102 = *ci->u.l.savedpc;
          if ( (signed int)((*ci->u.l.savedpc >> 6) & 0xFF) > 0 )
            luaF_close(v99, (lua_TValue *)(ci->u.c.ctx + 8 * ((*ci->u.l.savedpc >> 6) & 0xFF) - 8));
          v1 = v101->u.l.base;
          v101->u.l.savedpc += (v102 >> 14) - 131070;
        }
        else
        {
          ++ci->u.l.savedpc;
          v1 = v101->u.l.base;
        }
        continue;
      case 0x1Bu:
        v107 = *(_DWORD *)(v18 + 4);
        if ( ((unsigned int)&loc_7FBFFC + 4) & v3 )
        {
          if ( v107 != 2146936064 && (v107 != 2146936065 || *(_DWORD *)v18) )
            goto LABEL_192;
        }
        else if ( v107 == 2146936064 || v107 == 2146936065 && !*(_DWORD *)v18 )
        {
LABEL_192:
          v108 = ci;
          v109 = *ci->u.l.savedpc;
          goto LABEL_193;
        }
        ++ci->u.l.savedpc;
        continue;
      case 0x1Cu:
        v110 = v1[v3 >> 23].u.i.tt__;
        v111 = (int)&v1[v3 >> 23];
        if ( ((unsigned int)&loc_7FBFFC + 4) & v3 )
        {
          if ( v110 == 2146936064 || v110 == 2146936065 && !*(_DWORD *)v111 )
            goto LABEL_208;
        }
        else if ( v110 != 2146936064 && (v110 != 2146936065 || *(_DWORD *)v111) )
        {
LABEL_208:
          ++ci->u.l.savedpc;
          continue;
        }
        *(_DWORD *)v18 = *(_DWORD *)v111;
        v108 = ci;
        *(_DWORD *)(v18 + 4) = *(_DWORD *)(v111 + 4);
        v109 = *v108->u.l.savedpc;
LABEL_193:
        if ( (signed int)((v109 >> 6) & 0xFF) > 0 )
        {
          luaF_close(L, (lua_TValue *)(ci->u.c.ctx + 8 * ((v109 >> 6) & 0xFF) - 8));
          v108 = ci;
        }
        v108->u.l.savedpc += (v109 >> 14) - 131070;
        continue;
      case 0x1Du:
        v112 = v3 >> 23;
        v113 = ((v3 >> 14) & 0x1FF) - 1;
        if ( v112 )
          L->top = (lua_TValue *)(v18 + 8 * v112);
        if ( !luaD_precall(L, (lua_TValue *)v18, v113) )
        {
          v146 = L->ci;
          v146->callstatus |= 4u;
          ci = v146;
          goto newframe;
        }
        if ( v113 < 0 )
        {
LABEL_41:
          v1 = ci->u.l.base;
        }
        else
        {
          v114 = ci;
          L->top = ci->top;
          v1 = v114->u.l.base;
        }
        continue;
      case 0x1Eu:
        v115 = v3 >> 23;
        if ( v115 )
          L->top = (lua_TValue *)(v18 + 8 * v115);
        if ( luaD_precall(L, (lua_TValue *)v18, -1) )
        {
          v1 = ci->u.l.base;
          continue;
        }
        v147 = L->ci;
        v148 = (unsigned int)v147->func;
        v149 = *(_BYTE *)(*(_DWORD *)(v147->func->u.i.v__.b + 12) + 76);
        v150 = v147->u.l.base;
        v151 = v147->previous;
        v152 = v151->func;
        nci.u.i.tt__ = (int)L->ci;
        v153 = (int)&v150[v149];
        v154 = *(_DWORD *)(v172 + 12);
        v6 = *(_DWORD *)(v154 + 56) == 0;
        v155 = *(_DWORD *)(v154 + 56) < 0;
        n = v153;
        if ( !v155 && !v6 )
          luaF_close(L, v151->u.l.base);
        b = 0;
        if ( v148 < n )
        {
          v156 = v148;
          v157 = 0;
          do
          {
            v152[v157].u.i.v__.b = *(_DWORD *)v156;
            v152[v157].u.i.tt__ = *(_DWORD *)(v156 + 4);
            v158 = b + 1;
            b = v158;
            v157 = v158;
            v156 = v157 * 8 + v148;
          }
          while ( v157 * 8 + v148 < n );
        }
        v159 = nci.u.i.tt__;
        v151->u.c.ctx = (int)&v152[(signed int)(*(_DWORD *)(nci.u.i.tt__ + 24) - v148) >> 3];
        v160 = &v152[(signed int)((signed int)L->top - v148) >> 3];
        L->top = v160;
        v151->top = v160;
        v161 = *(const unsigned int **)(v159 + 28);
        v151->callstatus |= 0x40u;
        v151->u.l.savedpc = v161;
        L->ci = v151;
        ci = v151;
        goto newframe;
      case 0x20u:
        v116 = *(double *)(v18 + 16);
        v117 = *(double *)v18 + v116;
        v118 = v116;
        v119 = *(double *)(v18 + 8);
        if ( v118 <= 0.0 )
        {
          if ( v117 < v119 )
            continue;
        }
        else if ( v117 > v119 )
        {
          continue;
        }
        ci->u.l.savedpc += (v3 >> 14) - 0x1FFFF;
        *(double *)v18 = v117;
        *(double *)(v18 + 24) = v117;
        continue;
      case 0x21u:
        v120 = *(_DWORD *)(v18 + 4);
        v121 = *(_DWORD *)(v18 + 4) & 0x7FFFFF00;
        n = v18 + 16;
        if ( v121 == 2146936064 )
        {
          if ( (v120 | 0x70) != 2146936180
            || !luaO_str2d((const char *)(*(_DWORD *)v18 + 16), *(_DWORD *)(*(_DWORD *)v18 + 12), &result) )
          {
            luaG_runerror(L, "'for' initial value must be a number");
          }
          *(long double *)v18 = result;
        }
        if ( (*(_DWORD *)(v18 + 12) & 0x7FFFFF00) == 2146936064 )
        {
          if ( (*(_DWORD *)(v18 + 12) | 0x70) != 2146936180
            || !luaO_str2d((const char *)(*(_DWORD *)(v18 + 8) + 16), *(_DWORD *)(*(_DWORD *)(v18 + 8) + 12), &v167)
            || (*(long double *)(v18 + 8) = v167, v18 == -8) )
          {
            luaG_runerror(L, "'for' limit must be a number");
          }
        }
        if ( (*(_DWORD *)(n + 4) & 0x7FFFFF00) == 2146936064 )
        {
          if ( (*(_DWORD *)(n + 4) | 0x70) != 2146936180
            || !luaO_str2d((const char *)(*(_DWORD *)n + 16), *(_DWORD *)(*(_DWORD *)n + 12), &v166)
            || (v122 = n, *(long double *)n = v166, (n = v122) == 0) )
          {
            luaG_runerror(L, "'for' step must be a number");
          }
        }
        *(double *)v18 = *(double *)v18 - *(double *)n;
        goto LABEL_236;
      case 0x22u:
        *(_DWORD *)(v18 + 40) = *(_DWORD *)(v18 + 16);
        v123 = v18 + 24;
        *(_DWORD *)(v123 + 20) = *(_DWORD *)(v18 + 20);
        *(_DWORD *)(v123 + 8) = *(_DWORD *)(v18 + 8);
        *(_DWORD *)(v123 + 12) = *(_DWORD *)(v18 + 12);
        *(_DWORD *)v123 = *(_DWORD *)v18;
        *(_DWORD *)(v123 + 4) = *(_DWORD *)(v18 + 4);
        L->top = (lua_TValue *)(v18 + 48);
        luaD_call(L, (lua_TValue *)(v18 + 24), (v3 >> 14) & 0x1FF, 1);
        v1 = ci->u.l.base;
        v124 = ci;
        L->top = ci->top;
        v125 = v124->u.l.savedpc;
        v3 = *v125;
        v124->u.l.savedpc = v125 + 1;
        v18 = (int)&v1[(v3 >> 6) & 0xFF];
        goto l_tforloop;
      case 0x23u:
l_tforloop:
        if ( *(_DWORD *)(v18 + 12) != 2146936064 )
        {
          *(_DWORD *)v18 = *(_DWORD *)(v18 + 8);
          *(_DWORD *)(v18 + 4) = *(_DWORD *)(v18 + 12);
LABEL_236:
          ci->u.l.savedpc += (v3 >> 14) - 0x1FFFF;
        }
        continue;
      case 0x24u:
        v126 = v3 >> 23;
        v127 = (v3 >> 14) & 0x1FF;
        n = v126;
        v128 = v127;
        if ( !v126 )
        {
          v126 = (((signed int)L->top - v18) >> 3) - 1;
          n = (((signed int)L->top - v18) >> 3) - 1;
        }
        if ( !v127 )
        {
          v129 = ci->u.l.savedpc;
          v128 = *v129 >> 6;
          ci->u.l.savedpc = v129 + 1;
        }
        v130 = *(Table **)v18;
        v131 = 50 * v128 + v126 - 50;
        b = (int)v130;
        if ( v131 > v130->sizearray )
        {
          luaH_resizearray(L, v130, v131);
          v126 = n;
        }
        if ( v126 > 0 )
        {
          v132 = (lua_TValue *)(v18 + 8 * n);
          do
          {
            luaH_setint(L, (Table *)b, v131, v132);
            v133 = v132->u.i.tt__;
            --v131;
            if ( (v132->u.i.tt__ & 0x7FFFFF00) != 2146936064 )
              LOBYTE(v133) = 3;
            if ( v133 & 0x40 && *(_BYTE *)(v132->u.i.v__.b + 5) & 3 && *(_BYTE *)(b + 5) & 4 )
              luaC_barrierback_(L, (GCObject *)b);
            --v132;
            --n;
          }
          while ( n > 0 );
        }
        L->top = ci->top;
        continue;
      case 0x25u:
        v134 = *(Proto **)(*(_DWORD *)(*(_DWORD *)(v172 + 12) + 16) + 4 * (v3 >> 14));
        nci.u.i.tt__ = v172 + 16;
        v135 = getcached((UpVal **)(v172 + 16), v1);
        if ( v135 )
        {
          v137 = L;
          *(_DWORD *)v18 = v135;
          *(_DWORD *)(v18 + 4) = 2146936134;
        }
        else
        {
          v136 = v134;
          v137 = L;
          pushclosure((lua_TValue *)v18, L, v136, (UpVal **)nci.u.i.tt__, v1);
        }
        if ( v137->l_G->GCdebt <= 0 )
          goto LABEL_41;
        v137->top = (lua_TValue *)(v18 + 8);
        luaC_step(v137);
        v138 = ci;
        v137->top = ci->top;
        v1 = v138->u.l.base;
        continue;
      case 0x26u:
        v139 = (v3 >> 23) - 1;
        v140 = v139;
        b = v139;
        v141 = v1 - ci->func - *(_BYTE *)(*(_DWORD *)(v172 + 12) + 76) - 1;
        if ( v140 < 0 )
        {
          v142 = L;
          v140 = v1 - ci->func - *(_BYTE *)(*(_DWORD *)(v172 + 12) + 76) - 1;
          v143 = L->stack_last - L->top;
          b = v1 - ci->func - *(_BYTE *)(*(_DWORD *)(v172 + 12) + 76) - 1;
          if ( v143 <= v141 )
          {
            luaD_growstack(L, v141);
            v142 = L;
            v140 = v141;
          }
          v1 = ci->u.l.base;
          v18 = (int)&v1[n];
          v142->top = (lua_TValue *)(v18 + 8 * v141);
        }
        v144 = 0;
        if ( v140 > 0 )
        {
          v145 = (int)&v1[-v141];
          do
          {
            if ( v144 >= v141 )
            {
              *(_DWORD *)(v18 + 4) = 2146936064;
            }
            else
            {
              *(_DWORD *)v18 = *(_DWORD *)v145;
              *(_DWORD *)(v18 + 4) = *(_DWORD *)(v145 + 4);
            }
            ++v144;
            v145 += 8;
            v18 += 8;
          }
          while ( v144 < b );
        }
        continue;
      case 0x1Fu:
        v162 = v3 >> 23;
        if ( v162 )
          L->top = (lua_TValue *)(v18 + 8 * v162 - 8);
        if ( *(_DWORD *)(*(_DWORD *)(v172 + 12) + 56) > 0 )
          luaF_close(L, v1);
        v163 = luaD_poscall(L, (lua_TValue *)v18);
        if ( ci->callstatus & 4 )
        {
          v164 = L->ci;
          ci = L->ci;
          if ( v163 )
            L->top = v164->top;
          goto newframe;
        }
        return;
      default:
        continue;
    }
  }
}

//----- (00749D80) --------------------------------------------------------
Node *__usercall hashnum@<eax>(Table *t@<esi>, long double n)
{
  long double v2; // st7@1
  signed int v3; // eax@1
  int e; // [sp+10h] [bp-4h]@1

  v2 = frexp(n, &e);
  v3 = e + (signed int)(v2 * 2147482623.0);
  if ( v3 < 0 )
  {
    if ( v3 == -v3 )
      v3 = 0;
    v3 = -v3;
  }
  return &t->node[v3 % (((1 << t->lsizenode) - 1) | 1)];
}

//----- (00749DE0) --------------------------------------------------------
Node *__usercall mainposition@<eax>(Table *t@<eax>, lua_TValue *key@<edi>)
{
  Table *v2; // esi@1
  int v3; // eax@1
  Node *result; // eax@4
  int v5; // ebx@5

  v2 = t;
  v3 = key->u.i.tt__;
  if ( (key->u.i.tt__ & 0x7FFFFF00) != 2146936064 )
    LOBYTE(v3) = 3;
  switch ( v3 & 0x3F )
  {
    case 3:
      result = hashnum(v2, key->u.d__);
      break;
    case 0x14:
      v5 = key->u.i.v__.b;
      if ( !*(_BYTE *)(key->u.i.v__.b + 6) )
      {
        *(_DWORD *)(v5 + 8) = luaS_hash((const char *)(v5 + 16), *(_DWORD *)(v5 + 12), *(_DWORD *)(v5 + 8));
        *(_BYTE *)(v5 + 6) = 1;
      }
      goto LABEL_7;
    case 4:
LABEL_7:
      result = &v2->node[*(_DWORD *)(key->u.i.v__.b + 8) & ((1 << v2->lsizenode) - 1)];
      break;
    case 1:
      result = &v2->node[key->u.i.v__.b & ((1 << v2->lsizenode) - 1)];
      break;
    case 2:
      result = &v2->node[key->u.i.v__.b % (((1 << v2->lsizenode) - 1) | 1u)];
      break;
    case 0x16:
      result = &v2->node[key->u.i.v__.b % (((1 << v2->lsizenode) - 1) | 1u)];
      break;
    default:
      result = &v2->node[key->u.i.v__.b % (((1 << v2->lsizenode) - 1) | 1u)];
      break;
  }
  return result;
}

//----- (00749F20) --------------------------------------------------------
int __usercall findindex@<eax>(Table *t@<ebx>, lua_TValue *key@<eax>, lua_State *L)
{
  lua_TValue *v3; // edi@1
  int v4; // eax@1
  int result; // eax@2
  lua_TValue v6; // ST14_8@4
  Node *v7; // esi@8
  int v8; // eax@10
  int v9; // eax@15
  int v10; // [sp+Ch] [bp-4h]@4

  v3 = key;
  v4 = key->u.i.tt__;
  if ( v4 == 2146936064 )
  {
    result = -1;
  }
  else if ( (v4 & 0x7FFFFF00) == 2146936064
         || (v6 = *v3, v10 = (signed int)v6.u.d__, v6.u.d__ != (double)(signed int)v6.u.d__)
         || v10 <= 0
         || v10 > t->sizearray )
  {
    v7 = mainposition(t, v3);
    while ( 1 )
    {
      v8 = (v7->i_key.nk.u.i.tt__ & 0x7FFFFF00) == 2146936064 ? (unsigned __int8)(v7->i_key.nk.u.i.tt__ == v3->u.i.tt__) : (unsigned __int8)((v3->u.i.tt__ & 0x7FFFFF00) != 2146936064);
      if ( v8 && luaV_equalobj_(0, (lua_TValue *)&v7->i_key, v3) )
        break;
      if ( v7->i_key.nk.u.i.tt__ == 2146936075 )
      {
        v9 = v3->u.i.tt__;
        if ( (v3->u.i.tt__ & 0x7FFFFF00) != 2146936064 )
          LOBYTE(v9) = 3;
        if ( v9 & 0x40 && v7->i_key.nk.u.i.v__.b == v3->u.i.v__.b )
          break;
      }
      v7 = v7->i_key.nk.next;
      if ( !v7 )
        luaG_runerror(L, "invalid key to 'next'");
    }
    result = t->sizearray + v7 - t->node;
  }
  else
  {
    result = v10 - 1;
  }
  return result;
}

//----- (0074A040) --------------------------------------------------------
int __cdecl luaH_next(lua_State *L, Table *t, lua_TValue *key)
{
  int v3; // eax@1
  int v4; // ecx@1
  int v5; // eax@1
  char *v6; // edx@2
  int v7; // eax@5
  signed int v8; // edx@5
  Node *v9; // edi@6
  int *v10; // ecx@6
  int result; // eax@9
  lua_TValue *v12; // ebx@10
  int v13; // eax@11
  Node *v14; // ecx@11

  v3 = findindex(t, key, L);
  v4 = t->sizearray;
  v5 = v3 + 1;
  if ( v5 >= v4 )
  {
LABEL_5:
    v7 = v5 - v4;
    v8 = 1 << t->lsizenode;
    if ( v7 >= v8 )
    {
LABEL_9:
      result = 0;
    }
    else
    {
      v9 = t->node;
      v10 = &v9[v7].i_val.u.i.tt__;
      while ( *v10 == 2146936064 )
      {
        ++v7;
        v10 += 6;
        if ( v7 >= v8 )
          goto LABEL_9;
      }
      v13 = v7;
      *key = v9[v13].i_key.tvk;
      v14 = t->node;
      key[1].u.i.v__.b = v14[v13].i_val.u.i.v__.b;
      key[1].u.i.tt__ = v14[v13].i_val.u.i.tt__;
      result = 1;
    }
  }
  else
  {
    v6 = (char *)&t->array[v5].u.d__ + 4;
    while ( *(_DWORD *)v6 == 2146936064 )
    {
      ++v5;
      v6 += 8;
      if ( v5 >= v4 )
        goto LABEL_5;
    }
    key->u.d__ = (double)(v5 + 1);
    v12 = t->array;
    key[1].u.i.v__.b = v12[v5].u.i.v__.b;
    key[1].u.i.tt__ = v12[v5].u.i.tt__;
    result = 1;
  }
  return result;
}

//----- (0074A100) --------------------------------------------------------
int __cdecl computesizes(int *nums, int *narray)
{
  int v2; // esi@1
  int v3; // ebx@1
  int v4; // edi@1
  signed int v5; // ecx@1
  int result; // eax@8
  int *v7; // [sp+10h] [bp-4h]@2

  v2 = 0;
  v3 = 0;
  v4 = 0;
  v5 = 1;
  if ( *narray <= 0 )
  {
    *narray = 0;
    result = 0;
  }
  else
  {
    v7 = nums;
    while ( 1 )
    {
      if ( *v7 > 0 )
      {
        v2 += *v7;
        if ( v2 > v5 / 2 )
        {
          v4 = v5;
          v3 = v2;
        }
      }
      if ( v2 == *narray )
        break;
      ++v7;
      v5 *= 2;
      if ( v5 / 2 >= *narray )
      {
        *narray = v4;
        return v3;
      }
    }
    *narray = v4;
    result = v3;
  }
  return result;
}

//----- (0074A180) --------------------------------------------------------
int __cdecl numusearray(Table *t, int *nums)
{
  signed int v2; // edi@1
  signed int v3; // eax@1
  signed int v4; // edx@1
  int v5; // esi@2
  int v6; // ebx@2
  int v7; // ecx@2
  int v8; // ecx@6
  char *v9; // esi@6
  int ause; // [sp+Ch] [bp-4h]@1

  v2 = 0;
  v3 = 1;
  ause = 0;
  v4 = 1;
  do
  {
    v5 = t->sizearray;
    v6 = 0;
    v7 = v4;
    if ( v4 <= v5 )
    {
      if ( v3 > v4 )
        goto LABEL_10;
    }
    else
    {
      v7 = t->sizearray;
      if ( v3 > v5 )
        return ause;
    }
    v8 = v7 - v3 + 1;
    v9 = (char *)&t->array[v3] - 4;
    v3 += v8;
    do
    {
      if ( *(_DWORD *)v9 != 2146936064 )
        ++v6;
      v9 += 8;
      --v8;
    }
    while ( v8 );
LABEL_10:
    nums[v2] += v6;
    ause += v6;
    ++v2;
    v4 *= 2;
  }
  while ( v2 <= 30 );
  return ause;
}

//----- (0074A1F0) --------------------------------------------------------
int __usercall numusehash@<eax>(Table *t@<ebx>, int *nums, int *pnasize)
{
  signed int v3; // esi@1
  int v4; // edi@2
  Node *v5; // eax@3
  long double v6; // ST0C_8@5
  int v7; // eax@7
  signed int v8; // eax@7
  int result; // eax@11
  signed int x; // [sp+Ch] [bp-Ch]@5
  int totaluse; // [sp+10h] [bp-8h]@1
  int ause; // [sp+14h] [bp-4h]@1

  v3 = 1 << t->lsizenode;
  totaluse = 0;
  ause = 0;
  if ( v3 )
  {
    v4 = v3;
    do
    {
      v5 = t->node;
      --v4;
      --v3;
      if ( v5[v4].i_val.u.i.tt__ != 2146936064 )
      {
        if ( (v5[v4].i_key.nk.u.i.tt__ & 0x7FFFFF00) == 2146936064
          || (v6 = v5[v4].i_key.nk.u.d__, x = (signed int)v6, v6 != (double)(signed int)v6)
          || (unsigned int)(x - 1) > 0x3FFFFFFF )
        {
          v8 = 0;
        }
        else
        {
          v7 = luaO_ceillog2(x);
          ++nums[v7];
          v8 = 1;
        }
        ause += v8;
        ++totaluse;
      }
    }
    while ( v3 );
    *pnasize += ause;
    result = totaluse;
  }
  else
  {
    *pnasize = *pnasize;
    result = 0;
  }
  return result;
}

//----- (0074A2C0) --------------------------------------------------------
void __usercall setarrayvector(lua_State *L@<eax>, Table *t@<esi>, int size@<edi>)
{
  int i; // eax@3

  if ( (unsigned int)(size + 1) > 0x1FFFFFFF )
    luaM_toobig(L);
  t->array = (lua_TValue *)luaM_realloc_(L, t->array, 8 * t->sizearray, 8 * size);
  for ( i = t->sizearray; i < size; ++i )
    t->array[i].u.i.tt__ = 2146936064;
  t->sizearray = size;
}

//----- (0074A310) --------------------------------------------------------
void __usercall setnodevector(lua_State *L@<ecx>, Table *t@<edi>, int size@<eax>)
{
  int v3; // esi@1
  lua_State *v4; // ebx@1
  int v5; // eax@3
  int v6; // ecx@8
  int v7; // edx@8
  Node *v8; // eax@9
  Node *v9; // ecx@10
  char lsize; // [sp+8h] [bp-4h]@2

  v3 = size;
  v4 = L;
  if ( size )
  {
    v5 = luaO_ceillog2(size);
    lsize = v5;
    if ( v5 > 30 )
      luaG_runerror(v4, "table overflow");
    v3 = 1 << v5;
    if ( (unsigned int)((1 << v5) + 1) > 0xAAAAAAA )
      luaM_toobig(v4);
    t->node = (Node *)luaM_realloc_(v4, 0, 0, 24 * v3);
    if ( v3 > 0 )
    {
      v6 = 0;
      v7 = v3;
      do
      {
        v8 = t->node;
        v8[v6].i_key.nk.next = 0;
        v8[v6].i_key.nk.u.i.tt__ = 2146936064;
        v8[v6].i_val.u.i.tt__ = 2146936064;
        ++v6;
        --v7;
      }
      while ( v7 );
    }
  }
  else
  {
    t->node = &dummynode_;
    lsize = 0;
  }
  v9 = t->node;
  t->lsizenode = lsize;
  t->lastfree = &v9[v3];
}

//----- (0074A3D0) --------------------------------------------------------
GCObject *__cdecl luaH_new(lua_State *L)
{
  GCObject *result; // eax@1

  result = luaC_newobj(L, 5, 0x20u, 0, 0);
  result->ts.tsv.hash = 0;
  result->p.code = 0;
  result->h.sizearray = 0;
  result->p.p = (Proto **)&dummynode_;
  *(_WORD *)(&result->p.marked + 1) = 255;
  result->p.lineinfo = (int *)&dummynode_;
  return result;
}

//----- (0074A410) --------------------------------------------------------
void __cdecl luaH_free(lua_State *L, Table *t)
{
  Node *v2; // edx@1

  v2 = t->node;
  if ( v2 != &dummynode_ )
    luaM_realloc_(L, v2, 24 * (1 << t->lsizenode), 0);
  luaM_realloc_(L, t->array, 8 * t->sizearray, 0);
  luaM_realloc_(L, t, 0x20u, 0);
}

//----- (0074A470) --------------------------------------------------------
Node *__cdecl luaH_getint(Table *t, int key)
{
  Node *result; // eax@2
  Node *v3; // ecx@3
  double nk; // [sp+Ch] [bp-8h]@3

  if ( (unsigned int)(key - 1) >= t->sizearray )
  {
    nk = (double)key;
    v3 = hashnum(t, nk);
    while ( (v3->i_key.nk.u.i.tt__ & 0x7FFFFF00) == 2146936064 || nk != v3->i_key.nk.u.d__ )
    {
      v3 = v3->i_key.nk.next;
      if ( !v3 )
        return (Node *)&luaO_nilobject_;
    }
    result = v3;
  }
  else
  {
    result = (Node *)&t->array[key - 1];
  }
  return result;
}

//----- (0074A4F0) --------------------------------------------------------
lua_TValue *__cdecl luaH_getstr(Table *t, TString *key)
{
  lua_TValue *result; // eax@1

  result = &t->node[key->tsv.hash & ((1 << t->lsizenode) - 1)].i_val;
  while ( result[1].u.i.tt__ != 2146936132 || (TString *)result[1].u.i.v__.gc != key )
  {
    result = (lua_TValue *)result[2].u.i.v__.gc;
    if ( !result )
      return &luaO_nilobject_;
  }
  return result;
}

//----- (0074A530) --------------------------------------------------------
Node *__cdecl luaH_get(Table *t, lua_TValue *key)
{
  int v2; // eax@1
  int v3; // eax@3
  int v4; // eax@4
  Node *result; // eax@6
  Node *v6; // esi@9
  int v7; // eax@11
  double n; // [sp+4h] [bp-8h]@7

  v2 = key->u.i.tt__;
  if ( (key->u.i.tt__ & 0x7FFFFF00) != 2146936064 )
    LOBYTE(v2) = 3;
  v3 = v2 & 0x3F;
  if ( v3 )
  {
    v4 = v3 - 3;
    if ( v4 )
    {
      if ( v4 == 1 )
        return (Node *)luaH_getstr(t, (TString *)key->u.i.v__.gc);
    }
    else
    {
      n = key->u.d__;
      if ( n == (double)(signed int)n )
        return luaH_getint(t, (signed int)n);
    }
    v6 = mainposition(t, key);
    while ( 1 )
    {
      v7 = (v6->i_key.nk.u.i.tt__ & 0x7FFFFF00) == 2146936064 ? (unsigned __int8)(v6->i_key.nk.u.i.tt__ == key->u.i.tt__) : (unsigned __int8)((key->u.i.tt__ & 0x7FFFFF00) != 2146936064);
      if ( v7 && luaV_equalobj_(0, (lua_TValue *)&v6->i_key, key) )
        break;
      v6 = v6->i_key.nk.next;
      if ( !v6 )
        return (Node *)&luaO_nilobject_;
    }
    result = v6;
  }
  else
  {
    result = (Node *)&luaO_nilobject_;
  }
  return result;
}

//----- (0074A630) --------------------------------------------------------
Node *__cdecl luaH_set(lua_State *L, Table *t, lua_TValue *key)
{
  Node *result; // eax@1

  result = luaH_get(t, key);
  if ( (lua_TValue *)result == &luaO_nilobject_ )
    result = luaH_newkey(L, t, key);
  return result;
}

//----- (0074A660) --------------------------------------------------------
unsigned int __usercall unbound_search@<eax>(Table *t@<ebx>, unsigned int j)
{
  unsigned int v2; // edi@1
  Node *v3; // ecx@3
  long double v4; // ST1C_8@4
  signed int v5; // eax@4
  int k; // esi@15
  unsigned int v8; // esi@19
  double v9; // [sp+14h] [bp-1Ch]@4
  int expptr; // [sp+24h] [bp-Ch]@4
  int v11; // [sp+28h] [bp-8h]@4
  unsigned int i; // [sp+2Ch] [bp-4h]@1
  unsigned int ja; // [sp+38h] [bp+8h]@1

  i = j;
  v2 = j + 1;
  ja = j + 1;
  while ( 1 )
  {
    if ( v2 - 1 >= t->sizearray )
    {
      v9 = (double)(signed int)ja;
      v4 = frexp(v9, &expptr) * 2147482623.0;
      v5 = expptr + (signed int)v4;
      v11 = expptr + (signed int)v4;
      if ( expptr + (signed int)v4 < 0 )
      {
        if ( v5 == -v5 )
          v5 = 0;
        v5 = -v5;
        v11 = v5;
      }
      v3 = &t->node[v5 % (((1 << t->lsizenode) - 1) | 1)];
      while ( (v3->i_key.nk.u.i.tt__ & 0x7FFFFF00) == 2146936064 || v9 != v3->i_key.nk.u.d__ )
      {
        v3 = v3->i_key.nk.next;
        if ( !v3 )
        {
          v3 = (Node *)&luaO_nilobject_;
          break;
        }
      }
    }
    else
    {
      v3 = (Node *)&t->array[v2 - 1];
    }
    if ( v3->i_val.u.i.tt__ == 2146936064 )
      break;
    i = v2;
    v2 *= 2;
    ja = v2;
    if ( v2 > 0x7FFFFFFD )
    {
      for ( k = 1; luaH_getint(t, k)->i_val.u.i.tt__ != 2146936064; ++k )
        ;
      return k - 1;
    }
  }
  while ( v2 - i > 1 )
  {
    v8 = (i + v2) >> 1;
    if ( luaH_getint(t, v8)->i_val.u.i.tt__ == 2146936064 )
      v2 = v8;
    else
      i = v8;
  }
  return i;
}

//----- (0074A7B0) --------------------------------------------------------
unsigned int __cdecl luaH_getn(Table *t)
{
  unsigned int result; // eax@1
  lua_TValue *v2; // esi@2
  unsigned int v3; // edx@3

  result = t->sizearray;
  if ( result && (v2 = t->array, *((_DWORD *)&v2[result] - 1) == 2146936064) )
  {
    v3 = 0;
    if ( result > 1 )
    {
      do
      {
        if ( *((_DWORD *)&v2[(v3 + result) >> 1] - 1) == 2146936064 )
          result = (v3 + result) >> 1;
        else
          v3 = (v3 + result) >> 1;
      }
      while ( result - v3 > 1 );
    }
    result = v3;
  }
  else if ( t->node != &dummynode_ )
  {
    result = unbound_search(t, t->sizearray);
  }
  return result;
}

//----- (0074A810) --------------------------------------------------------
void __cdecl luaH_resize(lua_State *L, Table *t, int nasize, int nhsize)
{
  int v4; // ebx@1
  Table *v5; // esi@1
  int v6; // ecx@1
  Node *v7; // edx@1
  int v8; // edi@3
  int v9; // edi@4
  int v10; // ebx@5
  Node *v11; // eax@6
  signed int v12; // eax@13
  int v13; // edi@13
  lua_TValue *v14; // ebx@14
  Node *v15; // eax@16
  lua_TValue key; // [sp+Ch] [bp-1Ch]@7
  int oldhsize; // [sp+14h] [bp-14h]@1
  unsigned int nsize; // [sp+18h] [bp-10h]@4
  int v19; // [sp+1Ch] [bp-Ch]@4
  Node *nold; // [sp+20h] [bp-8h]@1
  int oldasize; // [sp+24h] [bp-4h]@1
  Table *ta; // [sp+34h] [bp+Ch]@4
  Table *tb; // [sp+34h] [bp+Ch]@13
  int nasizea; // [sp+38h] [bp+10h]@4

  v4 = nasize;
  v5 = t;
  v6 = t->lsizenode;
  v7 = t->node;
  oldasize = t->sizearray;
  oldhsize = v6;
  nold = v7;
  if ( nasize > oldasize )
    setarrayvector(L, t, nasize);
  setnodevector(L, t, nhsize);
  v8 = oldasize;
  if ( nasize < oldasize )
  {
    v19 = nasize + 1;
    ta = (Table *)(nasize + 1);
    v5->sizearray = nasize;
    nsize = 8 * nasize;
    nasizea = nasize;
    v9 = v8 - v4;
    do
    {
      v10 = (int)&v5->array[nasizea];
      if ( *(_DWORD *)(v10 + 4) != 2146936064 )
      {
        v11 = luaH_getint(v5, (int)ta);
        if ( (lua_TValue *)v11 == &luaO_nilobject_ )
        {
          key.u.d__ = (double)(signed int)ta;
          v11 = luaH_newkey(L, v5, &key);
        }
        v11->i_val.u.i.v__.b = *(_DWORD *)v10;
        v11->i_val.u.i.tt__ = *(_DWORD *)(v10 + 4);
      }
      ++nasizea;
      ta = (Table *)((char *)ta + 1);
      --v9;
    }
    while ( v9 );
    if ( (unsigned int)v19 > 0x1FFFFFFF )
      luaM_toobig(L);
    v5->array = (lua_TValue *)luaM_realloc_(L, v5->array, 8 * oldasize, nsize);
  }
  v12 = 1 << oldhsize;
  v13 = (1 << oldhsize) - 1;
  tb = (Table *)(1 << oldhsize);
  if ( v13 >= 0 )
  {
    v14 = (lua_TValue *)&nold[v13].i_key;
    do
    {
      if ( v14[-1].u.i.tt__ != 2146936064 )
      {
        v15 = luaH_get(v5, v14);
        if ( (lua_TValue *)v15 == &luaO_nilobject_ )
          v15 = luaH_newkey(L, v5, v14);
        v15->i_val.u.i.v__.b = v14[-1].u.i.v__.b;
        v15->i_val.u.i.tt__ = v14[-1].u.i.tt__;
        v12 = (signed int)tb;
      }
      v14 -= 3;
      --v13;
    }
    while ( v13 >= 0 );
  }
  if ( nold != &dummynode_ )
    luaM_realloc_(L, nold, 24 * v12, 0);
}

//----- (0074A980) --------------------------------------------------------
void __cdecl luaH_resizearray(lua_State *L, Table *t, int nasize)
{
  if ( t->node == &dummynode_ )
    luaH_resize(L, t, nasize, 0);
  else
    luaH_resize(L, t, nasize, 1 << t->lsizenode);
}

//----- (0074A9D0) --------------------------------------------------------
void __usercall rehash(Table *t@<ecx>, lua_TValue *ek@<edi>, lua_State *L)
{
  Table *v3; // ebx@1
  int v4; // esi@1
  int v5; // esi@1
  long double v6; // ST20_8@2
  int v7; // eax@5
  signed int v8; // eax@5
  int v9; // eax@7
  signed int x; // [sp+14h] [bp-88h]@2
  int nasize; // [sp+18h] [bp-84h]@1
  int nums[31]; // [sp+1Ch] [bp-80h]@1

  v3 = t;
  nums[0] = 0;
  nums[1] = 0;
  nums[2] = 0;
  nums[3] = 0;
  nums[4] = 0;
  nums[5] = 0;
  nums[6] = 0;
  nums[7] = 0;
  nums[8] = 0;
  nums[9] = 0;
  nums[10] = 0;
  nums[11] = 0;
  nums[12] = 0;
  nums[13] = 0;
  nums[14] = 0;
  nums[15] = 0;
  nums[16] = 0;
  nums[17] = 0;
  nums[18] = 0;
  nums[19] = 0;
  nums[20] = 0;
  nums[21] = 0;
  nums[22] = 0;
  nums[23] = 0;
  nums[24] = 0;
  nums[25] = 0;
  nums[26] = 0;
  nums[27] = 0;
  nums[28] = 0;
  nums[29] = 0;
  nums[30] = 0;
  nasize = numusearray(t, nums);
  v4 = nasize;
  v5 = numusehash(v3, nums, &nasize) + v4;
  if ( (ek->u.i.tt__ & 0x7FFFFF00) == 2146936064
    || (v6 = ek->u.d__, x = (signed int)v6, v6 != (double)(signed int)v6)
    || x <= 0
    || x > 0x40000000 )
  {
    v8 = 0;
  }
  else
  {
    v7 = luaO_ceillog2(x);
    ++nums[v7];
    v8 = 1;
  }
  nasize += v8;
  v9 = computesizes(nums, &nasize);
  luaH_resize(L, v3, nasize, v5 - v9 + 1);
}

//----- (0074AB20) --------------------------------------------------------
Node *__cdecl luaH_newkey(lua_State *L, Table *t, lua_TValue *key)
{
  lua_TValue *v3; // edi@1
  int v4; // eax@1
  long double v5; // st7@4
  Table *v6; // ebx@5
  Node *v7; // eax@5
  Node *v8; // esi@5
  Node *v9; // ebx@8
  Node *result; // eax@13
  Node *v11; // eax@15
  int v12; // eax@21

  v3 = key;
  v4 = key->u.i.tt__;
  if ( v4 == 2146936064 )
    luaG_runerror(L, "table index is nil");
  if ( (v4 & 0x7FFFFF00) != 2146936064 )
    v5 = key->u.d__;
  v6 = t;
  v7 = mainposition(t, key);
  v8 = v7;
  if ( v7->i_val.u.i.tt__ != 2146936064 || v7 == &dummynode_ )
  {
    if ( t->lastfree <= t->node )
      goto LABEL_13;
    while ( 1 )
    {
      --v6->lastfree;
      v9 = v6->lastfree;
      if ( v9->i_key.nk.u.i.tt__ == 2146936064 )
        break;
      v6 = t;
      if ( t->lastfree <= t->node )
        goto LABEL_13;
    }
    if ( !v9 )
    {
      v6 = t;
LABEL_13:
      rehash(v6, key, L);
      result = luaH_get(v6, key);
      if ( (lua_TValue *)result == &luaO_nilobject_ )
        result = (Node *)luaH_newkey(L, v6, key);
      return result;
    }
    v11 = mainposition(t, (lua_TValue *)&v7->i_key);
    if ( v11 == v8 )
    {
      v9->i_key.nk.next = v8->i_key.nk.next;
      v8->i_key.nk.next = v9;
      v8 = v9;
    }
    else
    {
      for ( ; v11->i_key.nk.next != v8; v11 = v11->i_key.nk.next )
        ;
      v11->i_key.nk.next = v9;
      v9->i_val.u.i.v__.b = v8->i_val.u.i.v__.b;
      v9->i_val.u.i.tt__ = v8->i_val.u.i.tt__;
      v9->i_key.nk.u.i.v__.b = v8->i_key.nk.u.i.v__.b;
      v9->i_key.nk.u.i.tt__ = v8->i_key.nk.u.i.tt__;
      v9->i_key.nk.next = v8->i_key.nk.next;
      *((_DWORD *)&v9->i_key.tvk + 3) = *((_DWORD *)&v8->i_key.tvk + 3);
      v8->i_key.nk.next = 0;
      v8->i_val.u.i.tt__ = 2146936064;
    }
    v6 = t;
    v3 = key;
  }
  v8->i_key.nk.u.i.v__.b = v3->u.i.v__.b;
  v8->i_key.nk.u.i.tt__ = v3->u.i.tt__;
  v12 = v3->u.i.tt__;
  if ( (v3->u.i.tt__ & 0x7FFFFF00) != 2146936064 )
    LOBYTE(v12) = 3;
  if ( v12 & 0x40 && *(_BYTE *)(v3->u.i.v__.b + 5) & 3 && v6->marked & 4 )
    luaC_barrierback_(L, (GCObject *)&v6->next);
  return v8;
}

//----- (0074ACB0) --------------------------------------------------------
void __cdecl luaH_setint(lua_State *L, Table *t, int key, lua_TValue *value)
{
  Node *v4; // eax@1
  lua_TValue k; // [sp+4h] [bp-8h]@2

  v4 = luaH_getint(t, key);
  if ( (lua_TValue *)v4 == &luaO_nilobject_ )
  {
    k.u.d__ = (double)key;
    v4 = luaH_newkey(L, t, &k);
  }
  v4->i_val = *value;
}

//----- (0074AD00) --------------------------------------------------------
int __thiscall currentline(CallInfo *ci)
{
  int result; // eax@2

  if ( *(_DWORD *)(*(_DWORD *)(ci->func->u.i.v__.b + 12) + 20) )
    result = *(_DWORD *)(*(_DWORD *)(*(_DWORD *)(ci->func->u.i.v__.b + 12) + 20)
                       + 4
                       * (((signed int)ci->u.l.savedpc - *(_DWORD *)(*(_DWORD *)(ci->func->u.i.v__.b + 12) + 12)) >> 2)
                       - 4);
  else
    result = 0;
  return result;
}

//----- (0074AD30) --------------------------------------------------------
int __cdecl lua_sethook(lua_State *L, void (__cdecl *func)(lua_State *, lua_Debug *), int mask, int count)
{
  void (__cdecl *v4)(lua_State *, lua_Debug *); // esi@1
  char v5; // dl@2
  CallInfo *v6; // ecx@4

  v4 = func;
  if ( !func || (v5 = mask, !mask) )
  {
    v5 = 0;
    v4 = 0;
  }
  v6 = L->ci;
  if ( v6->callstatus & 1 )
    L->oldpc = v6->u.l.savedpc;
  L->hook = v4;
  L->basehookcount = count;
  L->hookcount = count;
  L->hookmask = v5;
  return 1;
}

//----- (0074AD70) --------------------------------------------------------
void (__cdecl *__cdecl lua_gethook(lua_State *L))(lua_State *, lua_Debug *)
{
  return L->hook;
}

//----- (0074AD80) --------------------------------------------------------
int __cdecl lua_gethookmask(lua_State *L)
{
  return L->hookmask;
}

//----- (0074AD90) --------------------------------------------------------
int __cdecl lua_gethookcount(lua_State *L)
{
  return L->basehookcount;
}

//----- (0074ADA0) --------------------------------------------------------
int __cdecl lua_getstack(lua_State *L, int level, lua_Debug *ar)
{
  int v3; // eax@1
  int result; // eax@2
  lua_State *v5; // ecx@3
  bool v6; // zf@3

  v3 = level;
  if ( level >= 0 )
  {
    v5 = (lua_State *)L->ci;
    v6 = level == 0;
    if ( level > 0 )
    {
      do
      {
        if ( (CallInfo *)v5 == &L->base_ci )
          break;
        v5 = (lua_State *)v5->top;
        --v3;
      }
      while ( v3 > 0 );
      v6 = v3 == 0;
    }
    if ( v6 && (CallInfo *)v5 != &L->base_ci )
    {
      result = 1;
      ar->i_ci = (CallInfo *)v5;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0074ADF0) --------------------------------------------------------
const char *__usercall findlocal@<eax>(CallInfo *ci@<esi>, int n@<eax>, lua_State *L, lua_TValue **pos)
{
  int v4; // edi@1
  int v5; // ecx@3
  const char *result; // eax@4
  lua_TValue *v7; // ebx@5
  lua_TValue *v8; // eax@7

  v4 = n;
  if ( ci->callstatus & 1 )
  {
    if ( n < 0 )
    {
      v5 = *(_BYTE *)(*(_DWORD *)(ci->func->u.i.v__.b + 12) + 76);
      if ( -n < ((signed int)(ci->u.c.ctx - (unsigned int)ci->func) >> 3) - v5 )
      {
        *pos = &ci->func[v5 - n];
        return "(*vararg)";
      }
      return 0;
    }
    v7 = ci->u.l.base;
    result = (const char *)luaF_getlocalname(
                             *(Proto **)(ci->func->u.i.v__.b + 12),
                             n,
                             (((signed int)ci->u.l.savedpc - *(_DWORD *)(*(_DWORD *)(ci->func->u.i.v__.b + 12) + 12)) >> 2)
                           - 1);
    if ( result )
    {
LABEL_13:
      *pos = &v7[v4 - 1];
      return result;
    }
  }
  else
  {
    v7 = ci->func + 1;
  }
  if ( ci == L->ci )
    v8 = L->top;
  else
    v8 = ci->next->func;
  if ( v8 - v7 >= v4 && v4 > 0 )
  {
    result = "(*temporary)";
    goto LABEL_13;
  }
  return 0;
}

//----- (0074AE90) --------------------------------------------------------
const char *__cdecl lua_getlocal(lua_State *L, lua_Debug *ar, int n)
{
  lua_TValue *v3; // eax@2
  const char *result; // eax@3
  CallInfo *v5; // esi@5
  lua_Debug *v6; // edx@6
  lua_TValue *v7; // ecx@6

  if ( ar )
  {
    v5 = ar->i_ci;
    ar = 0;
    result = findlocal(v5, n, L, (lua_TValue **)&ar);
    if ( result )
    {
      v6 = ar;
      v7 = L->top;
      v7->u.i.v__.b = ar->event;
      v7->u.i.tt__ = (int)v6->name;
      ++L->top;
    }
  }
  else
  {
    v3 = L->top;
    if ( v3[-1].u.i.tt__ == 2146936134 )
      result = (const char *)luaF_getlocalname(*(Proto **)(v3[-1].u.i.v__.b + 12), n, 0);
    else
      result = 0;
  }
  return result;
}

//----- (0074AF00) --------------------------------------------------------
const char *__cdecl lua_setlocal(lua_State *L, lua_Debug *ar, int n)
{
  CallInfo *v3; // esi@1
  const char *result; // eax@1
  lua_TValue *v5; // ecx@2
  lua_TValue *v6; // edx@2
  lua_TValue *pos; // [sp+8h] [bp-4h]@1

  v3 = ar->i_ci;
  pos = 0;
  result = findlocal(v3, n, L, &pos);
  if ( result )
  {
    v5 = L->top;
    v6 = pos;
    pos->u.i.v__.b = v5[-1].u.i.v__.b;
    v6->u.i.tt__ = v5[-1].u.i.tt__;
  }
  --L->top;
  return result;
}

//----- (0074AF50) --------------------------------------------------------
void __usercall funcinfo(lua_Debug *ar@<eax>, Closure *cl@<ecx>)
{
  int (__cdecl *v2)(lua_State *); // ecx@3
  int v3; // edx@3
  const char *v4; // edx@4
  int v5; // edx@6
  const char *v6; // ecx@6
  const char *v7; // edx@8
  const char *v8; // edx@9

  if ( cl && cl->l.tt != 38 )
  {
    v2 = cl->c.f;
    v3 = *((_DWORD *)v2 + 9);
    if ( v3 )
      v4 = (const char *)(v3 + 16);
    else
      v4 = "=?";
    ar->source = v4;
    v5 = *((_DWORD *)v2 + 16);
    ar->linedefined = v5;
    ar->lastlinedefined = *((_DWORD *)v2 + 17);
    v6 = "main";
    if ( v5 )
      v6 = "Lua";
    v7 = ar->source;
    ar->what = v6;
    luaO_chunkid(ar->short_src, v7, 0x3Cu);
  }
  else
  {
    ar->source = "=[C]";
    v8 = ar->source;
    ar->linedefined = -1;
    ar->lastlinedefined = -1;
    ar->what = "C";
    luaO_chunkid(ar->short_src, v8, 0x3Cu);
  }
}

//----- (0074AFD0) --------------------------------------------------------
void __usercall collectvalidlines(lua_State *L@<esi>, Closure *f@<ebx>)
{
  Table *v2; // eax@3
  lua_TValue *v3; // ecx@3
  int (__cdecl *v4)(lua_State *); // edx@3
  int v5; // edi@3
  lua_TValue v; // [sp+0h] [bp-10h]@3
  int *lineinfo; // [sp+8h] [bp-8h]@3
  Table *t; // [sp+Ch] [bp-4h]@3

  if ( f && f->l.tt != 38 )
  {
    lineinfo = (int *)*((_DWORD *)f->c.f + 5);
    v2 = (Table *)luaH_new(L);
    v3 = L->top;
    v3->u.i.v__.b = (int)v2;
    v3->u.i.tt__ = 2146936133;
    ++L->top;
    v4 = f->c.f;
    v5 = 0;
    v = (lua_TValue)9221020185777930241i64;
    t = v2;
    if ( *((_DWORD *)v4 + 13) > 0 )
    {
      while ( 1 )
      {
        luaH_setint(L, v2, lineinfo[v5++], &v);
        if ( v5 >= *((_DWORD *)f->c.f + 13) )
          break;
        v2 = t;
      }
    }
  }
  else
  {
    L->top->u.i.tt__ = 2146936064;
    ++L->top;
  }
}

//----- (0074B060) --------------------------------------------------------
void __usercall kname(Proto *p@<ecx>, int c@<eax>, const char **name@<esi>, int pc)
{
  lua_TValue *v4; // ecx@2
  unsigned int v5; // eax@2
  int v6; // edx@2
  int v7; // eax@2
  const char *v8; // eax@4

  if ( c & 0x100 )
  {
    v4 = p->k;
    v5 = c & 0xFFFFFEFF;
    v6 = v4[v5].u.i.tt__;
    v7 = (int)&v4[v5];
    if ( (v6 | 0x70) == 2146936180 )
    {
      *name = (const char *)(*(_DWORD *)v7 + 16);
      return;
    }
    goto LABEL_6;
  }
  v8 = getobjname(p, pc, c, name);
  if ( !v8 || *v8 != 99 )
LABEL_6:
    *name = "?";
}

//----- (0074B0B0) --------------------------------------------------------
int __usercall findsetreg@<eax>(int reg@<eax>, Proto *p, int lastpc)
{
  int v3; // edi@1
  unsigned int v4; // ecx@3
  int v5; // esi@3
  int v6; // edx@3
  int v7; // ecx@10
  int v8; // edx@10
  int result; // eax@17
  unsigned int *v10; // [sp+4h] [bp-8h]@2
  int setreg; // [sp+8h] [bp-4h]@1

  v3 = 0;
  setreg = -1;
  if ( lastpc <= 0 )
  {
    result = -1;
  }
  else
  {
    v10 = p->code;
    do
    {
      v4 = v10[v3];
      v5 = v10[v3] & 0x3F;
      v6 = (v10[v3] >> 6) & 0xFF;
      switch ( v5 )
      {
        case 4:
          if ( v6 <= reg && reg <= (signed int)(v6 + (v4 >> 23)) )
            goto LABEL_15;
          break;
        case 34:
          v6 += 2;
          goto LABEL_8;
        case 29:
        case 30:
LABEL_8:
          if ( reg >= v6 )
            goto LABEL_15;
          break;
        case 23:
          v7 = (v4 >> 14) - 0x1FFFF;
          v8 = v7 + v3 + 1;
          if ( v3 < v8 && v8 <= lastpc )
            v3 += v7;
          break;
        default:
          if ( luaP_opmodes[v5] & 0x40 )
            goto LABEL_14;
          break;
        case 27:
LABEL_14:
          if ( reg == v6 )
LABEL_15:
            setreg = v3;
          break;
      }
      ++v3;
    }
    while ( v3 < lastpc );
    result = setreg;
  }
  return result;
}

//----- (0074B190) --------------------------------------------------------
const char *__cdecl getobjname(Proto *p, int lastpc, int reg, const char **name)
{
  int v4; // esi@1
  int v5; // edi@1
  TString *v6; // eax@1
  int v7; // eax@2
  unsigned int *v8; // edx@3
  unsigned int v9; // eax@3
  int v10; // ecx@3
  TString *v11; // eax@5
  const char *result; // eax@6
  int v13; // edx@7
  unsigned int v14; // eax@7
  TString *v15; // eax@8
  TString *v16; // eax@9
  bool v17; // zf@14
  TString *v18; // eax@16
  unsigned int v19; // eax@20
  lua_TValue *v20; // ecx@22
  int v21; // edx@22
  int v22; // eax@22
  int k; // [sp+Ch] [bp-4h]@7
  const char *rega; // [sp+20h] [bp+10h]@10

  v4 = reg;
  v5 = lastpc;
  v6 = luaF_getlocalname(p, reg + 1, lastpc);
  *name = (const char *)v6;
  if ( v6 )
  {
LABEL_6:
    result = "local";
  }
  else
  {
    while ( 2 )
    {
      v7 = findsetreg(v4, p, v5);
      v5 = v7;
      if ( v7 == -1 )
      {
LABEL_25:
        result = 0;
      }
      else
      {
        v8 = p->code;
        v9 = v8[v7];
        v10 = v8[v5] & 0x3F;
        switch ( v10 )
        {
          case 0:
            if ( (signed int)(v9 >> 23) >= (signed int)((v9 >> 6) & 0xFF) )
              goto LABEL_25;
            v4 = v9 >> 23;
            v11 = luaF_getlocalname(p, (v9 >> 23) + 1, v5);
            *name = (const char *)v11;
            if ( v11 )
              goto LABEL_6;
            continue;
          case 6:
          case 7:
            v13 = (v9 >> 14) & 0x1FF;
            v14 = v9 >> 23;
            k = v13;
            if ( v10 == 7 )
            {
              v15 = luaF_getlocalname(p, v14 + 1, v5);
            }
            else
            {
              v16 = p->upvalues[v14].name;
              if ( !v16 )
              {
                rega = "?";
                goto LABEL_13;
              }
              v15 = v16 + 1;
            }
            rega = (const char *)v15;
LABEL_13:
            kname(p, k, name, v5);
            if ( !rega || (v17 = strcmp(rega, "_ENV") == 0, result = "global", !v17) )
              result = "field";
            break;
          case 5:
            v18 = p->upvalues[v9 >> 23].name;
            if ( v18 )
            {
              *name = (const char *)&v18[1];
              result = "upvalue";
            }
            else
            {
              *name = "?";
              result = "upvalue";
            }
            return result;
          case 1:
          case 2:
            if ( v10 == 1 )
              v19 = v9 >> 14;
            else
              v19 = p->code[v5 + 1] >> 6;
            v20 = p->k;
            v21 = v20[v19].u.i.tt__;
            v22 = (int)&v20[v19];
            if ( (v21 | 0x70) != 2146936180 )
              goto LABEL_25;
            *name = (const char *)(*(_DWORD *)v22 + 16);
            return "constant";
          case 12:
            kname(p, (v9 >> 14) & 0x1FF, name, v5);
            return "method";
          default:
            goto LABEL_25;
        }
      }
      break;
    }
  }
  return result;
}

//----- (0074B390) --------------------------------------------------------
const char *__usercall getfuncname@<eax>(CallInfo *ci@<eax>, const char **name@<edi>, lua_State *L)
{
  Proto *v3; // edx@1
  int v4; // eax@1
  unsigned int v5; // ecx@1
  int v6; // eax@1
  const char *result; // eax@2
  signed int v8; // eax@4

  v3 = *(Proto **)(ci->func->u.i.v__.b + 12);
  v4 = ci->u.l.savedpc - v3->code;
  v5 = v3->code[v4 - 1];
  v6 = v4 - 1;
  switch ( v5 & 0x3F )
  {
    case 0x1Du:
    case 0x1Eu:
      return getobjname(v3, v6, (v5 >> 6) & 0xFF, name);
    case 0x22u:
      *name = "for iterator";
      return "for iterator";
    case 6u:
    case 7u:
    case 0xCu:
      v8 = 0;
      goto LABEL_18;
    case 8u:
    case 0xAu:
      v8 = 1;
      goto LABEL_18;
    case 0x18u:
      v8 = 5;
      goto LABEL_18;
    case 0xDu:
      v8 = 6;
      goto LABEL_18;
    case 0xEu:
      v8 = 7;
      goto LABEL_18;
    case 0xFu:
      v8 = 8;
      goto LABEL_18;
    case 0x10u:
      v8 = 9;
      goto LABEL_18;
    case 0x11u:
      v8 = 10;
      goto LABEL_18;
    case 0x12u:
      v8 = 11;
      goto LABEL_18;
    case 0x13u:
      v8 = 12;
      goto LABEL_18;
    case 0x15u:
      v8 = 4;
      goto LABEL_18;
    case 0x19u:
      v8 = 13;
      goto LABEL_18;
    case 0x1Au:
      v8 = 14;
      goto LABEL_18;
    case 0x16u:
      v8 = 15;
LABEL_18:
      *name = (const char *)&L->l_G->tmname[v8][1];
      result = "metamethod";
      break;
    default:
      result = 0;
      break;
  }
  return result;
}

//----- (0074B4E0) --------------------------------------------------------
const char *__usercall getupvalname@<eax>(CallInfo *ci@<eax>, lua_TValue *o@<edi>, const char **name)
{
  GCObject *v3; // esi@1
  int v4; // ecx@1
  int v5; // eax@1
  int v6; // edx@2
  const char *result; // eax@5
  int v8; // eax@6

  v3 = ci->func->u.i.v__.gc;
  v4 = *(&v3->p.marked + 1);
  v5 = 0;
  if ( v4 <= 0 )
  {
LABEL_5:
    result = 0;
  }
  else
  {
    v6 = (int)&v3->uv.u;
    while ( *(lua_TValue **)(*(_DWORD *)v6 + 8) != o )
    {
      ++v5;
      v6 += 4;
      if ( v5 >= v4 )
        goto LABEL_5;
    }
    v8 = *(_DWORD *)(v3->p.code[7] + 8 * v5);
    if ( v8 )
    {
      *name = (const char *)(v8 + 16);
      result = "upvalue";
    }
    else
    {
      *name = "?";
      result = "upvalue";
    }
  }
  return result;
}

//----- (0074B540) --------------------------------------------------------
void __usercall addinfo(lua_State *L@<edi>, const char *msg@<ebx>)
{
  CallInfo *v2; // eax@1
  int v3; // edx@2
  int v4; // esi@3
  int v5; // edx@5
  char buff[60]; // [sp+0h] [bp-40h]@6

  v2 = L->ci;
  if ( v2->callstatus & 1 )
  {
    v3 = *(_DWORD *)(v2->func->u.i.v__.b + 12);
    if ( *(_DWORD *)(v3 + 20) )
      v4 = *(_DWORD *)(*(_DWORD *)(*(_DWORD *)(v2->func->u.i.v__.b + 12) + 20)
                     + 4
                     * (((signed int)v2->u.l.savedpc - *(_DWORD *)(*(_DWORD *)(v2->func->u.i.v__.b + 12) + 12)) >> 2)
                     - 4);
    else
      v4 = 0;
    v5 = *(_DWORD *)(v3 + 36);
    if ( v5 )
      luaO_chunkid(buff, (const char *)(v5 + 16), 0x3Cu);
    else
      strcpy(buff, "?");
    luaO_pushfstring(L, "%s:%d: %s", buff, v4, msg);
  }
}

//----- (0074B5D0) --------------------------------------------------------
void __cdecl __noreturn luaG_errormsg(lua_State *L)
{
  int v1; // eax@1
  char *v2; // ecx@2
  lua_TValue *v3; // eax@4
  lua_TValue *v4; // eax@4

  v1 = L->errfunc;
  if ( v1 )
  {
    v2 = (char *)L->stack + v1;
    if ( (*((_DWORD *)v2 + 1) | 0x70) != 2146936182 )
      luaD_throw(L, 6);
    v3 = L->top;
    v3->u.i.v__.b = v3[-1].u.i.v__.b;
    v3->u.i.tt__ = v3[-1].u.i.tt__;
    v4 = L->top;
    v4[-1].u.i.v__.b = *(_DWORD *)v2;
    v4[-1].u.i.tt__ = *((_DWORD *)v2 + 1);
    ++L->top;
    luaD_call(L, L->top - 2, 1, 0);
  }
  luaD_throw(L, 2);
}

//----- (0074B640) --------------------------------------------------------
void __noreturn luaG_runerror(lua_State *L, const char *fmt, ...)
{
  const char *v2; // eax@1
  va_list va; // [sp+18h] [bp+10h]@1

  va_start(va, fmt);
  v2 = luaO_pushvfstring(L, fmt, va);
  addinfo(L, v2);
  luaG_errormsg(L);
}

//----- (0074B670) --------------------------------------------------------
int __usercall auxgetinfo@<eax>(lua_Debug *ar@<esi>, CallInfo *ci@<ebx>, lua_State *L, const char *what, Closure *f)
{
  char v5; // al@1
  char v6; // al@9
  CallInfo *v7; // eax@20
  const char *v8; // eax@26
  int result; // eax@27
  int status; // [sp+0h] [bp-4h]@1

  v5 = *what;
  status = 1;
  if ( *what )
  {
    do
    {
      switch ( v5 )
      {
        case 83:
          funcinfo(ar, f);
          break;
        case 108:
          if ( ci && ci->callstatus & 1 )
            ar->currentline = currentline(ci);
          else
            ar->currentline = -1;
          break;
        case 117:
          if ( f )
            v6 = f->l.nupvalues;
          else
            v6 = 0;
          ar->nups = v6;
          if ( f && f->l.tt != 38 )
          {
            ar->isvararg = *((_BYTE *)f->c.f + 77);
            ar->nparams = *((_BYTE *)f->c.f + 76);
          }
          else
          {
            *(_WORD *)&ar->nparams = 256;
          }
          break;
        case 116:
          if ( ci )
            ar->istailcall = ci->callstatus & 0x40;
          else
            ar->istailcall = 0;
          break;
        case 110:
          if ( ci && !(ci->callstatus & 0x40) && (v7 = ci->previous, v7->callstatus & 1) )
            ar->namewhat = getfuncname(v7, &ar->name, L);
          else
            ar->namewhat = 0;
          if ( !ar->namewhat )
          {
            ar->namewhat = (const char *)&unk_96F8EB;
            ar->name = 0;
          }
          break;
        default:
          status = 0;
          break;
        case 76:
        case 102:
          break;
      }
      v8 = what + 1;
      what = v8;
      v5 = *v8;
    }
    while ( v5 );
    result = status;
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (0074B7F0) --------------------------------------------------------
int __cdecl lua_getinfo(lua_State *L, const char *what, lua_Debug *ar)
{
  const char *v3; // esi@1
  lua_TValue *v4; // eax@2
  CallInfo *v5; // ebx@2
  int v6; // ecx@4
  int v7; // eax@7
  int v8; // ebx@9
  int v9; // eax@9
  lua_TValue *v10; // eax@10
  int v11; // eax@11
  int result; // eax@12
  int status; // [sp+Ch] [bp-Ch]@9
  Closure *f; // [sp+10h] [bp-8h]@7
  lua_TValue *func; // [sp+14h] [bp-4h]@2

  v3 = what;
  if ( *what == 62 )
  {
    v4 = L->top - 1;
    v5 = 0;
    v3 = what + 1;
    func = v4;
    ++what;
    L->top = v4;
  }
  else
  {
    v5 = ar->i_ci;
    func = v5->func;
    v4 = v5->func;
  }
  v6 = v4->u.i.tt__;
  if ( (v4->u.i.tt__ & 0x7FFFFF00) != 2146936064 )
    LOBYTE(v6) = 3;
  if ( (v6 & 0x1F) == 6 )
  {
    f = (Closure *)v4->u.i.v__.b;
    v7 = auxgetinfo(ar, v5, L, v3, (Closure *)v4->u.i.v__.gc);
  }
  else
  {
    f = 0;
    v7 = auxgetinfo(ar, v5, L, v3, 0);
  }
  v8 = v7;
  status = v7;
  strchr((char *)what, 102);
  if ( v9 )
  {
    v10 = L->top;
    v10->u.i.v__.b = func->u.i.v__.b;
    v10->u.i.tt__ = func->u.i.tt__;
    ++L->top;
  }
  strchr((char *)what, 76);
  if ( v11 )
  {
    collectvalidlines(L, f);
    result = status;
  }
  else
  {
    result = v8;
  }
  return result;
}

//----- (0074B8C0) --------------------------------------------------------
void __cdecl __noreturn luaG_typeerror(lua_State *L, lua_TValue *o, const char *op)
{
  CallInfo *v3; // esi@1
  int v4; // eax@1
  int v5; // ecx@1
  char *v6; // ebx@3
  const char *v7; // eax@4
  lua_TValue *v8; // ecx@5
  lua_TValue *v9; // eax@5
  const char *name; // [sp+Ch] [bp-4h]@1

  v3 = L->ci;
  v4 = o->u.i.tt__;
  v5 = o->u.i.tt__ & 0x7FFFFF00;
  name = 0;
  if ( v5 != 2146936064 )
    LOBYTE(v4) = 3;
  v6 = off_9D3290[v4 & 0xF];
  if ( v3->callstatus & 1 )
  {
    v7 = getupvalname(v3, o, &name);
    if ( v7 )
      goto LABEL_13;
    v8 = v3->top;
    v9 = v3->u.l.base;
    if ( v9 < v8 )
    {
      while ( o != v9 )
      {
        ++v9;
        if ( v9 >= v8 )
          goto LABEL_8;
      }
      v7 = getobjname(
             *(Proto **)(v3->func->u.i.v__.b + 12),
             (((signed int)v3->u.l.savedpc - *(_DWORD *)(*(_DWORD *)(v3->func->u.i.v__.b + 12) + 12)) >> 2) - 1,
             ((signed int)o - v3->u.c.ctx) >> 3,
             &name);
      if ( v7 )
LABEL_13:
        luaG_runerror(L, "attempt to %s %s '%s' (a %s value)", op, v7, name, v6);
    }
  }
LABEL_8:
  luaG_runerror(L, "attempt to %s a %s value", op, v6);
}
// 9D3290: using guessed type char *off_9D3290[11];

//----- (0074B990) --------------------------------------------------------
void __cdecl __noreturn luaG_concaterror(lua_State *L, lua_TValue *p1, lua_TValue *p2)
{
  lua_TValue *v3; // ecx@1

  v3 = p1;
  if ( (p1->u.i.tt__ | 0x70) == 2146936180 || (p1->u.i.tt__ & 0x7FFFFF00) != 2146936064 )
    v3 = p2;
  luaG_typeerror(L, v3, "concatenate");
}

//----- (0074B9D0) --------------------------------------------------------
void __cdecl __noreturn luaG_aritherror(lua_State *L, lua_TValue *p1, lua_TValue *p2)
{
  bool v3; // zf@1
  lua_TValue *v4; // eax@1
  lua_TValue temp; // [sp+4h] [bp-8h]@1

  v3 = luaV_tonumber(p1, &temp) == 0;
  v4 = p1;
  if ( !v3 )
    v4 = p2;
  luaG_typeerror(L, v4, "perform arithmetic on");
}

//----- (0074BA00) --------------------------------------------------------
void __cdecl __noreturn luaG_ordererror(lua_State *L, lua_TValue *p1, lua_TValue *p2)
{
  int v3; // eax@1
  int v4; // ecx@3
  char *v5; // eax@3
  char *v6; // ecx@5

  v3 = p1->u.i.tt__;
  if ( (p1->u.i.tt__ & 0x7FFFFF00) != 2146936064 )
    LOBYTE(v3) = 3;
  v4 = p2->u.i.tt__;
  v5 = off_9D3290[v3 & 0xF];
  if ( (p2->u.i.tt__ & 0x7FFFFF00) != 2146936064 )
    LOBYTE(v4) = 3;
  v6 = off_9D3290[v4 & 0xF];
  if ( v5 == v6 )
    luaG_runerror(L, "attempt to compare two %s values", v5);
  luaG_runerror(L, "attempt to compare %s with %s", v5, v6);
}
// 9D3290: using guessed type char *off_9D3290[11];

//----- (0074BA80) --------------------------------------------------------
int __cdecl luaS_eqlngstr(TString *a, TString *b)
{
  unsigned int v2; // eax@1
  TString *v3; // ecx@3
  TString *v4; // esi@3

  v2 = a->tsv.len;
  if ( a != b )
  {
    if ( v2 != b->tsv.len )
      return 0;
    v3 = b + 1;
    v4 = a + 1;
    if ( v2 >= 4 )
    {
      while ( v4->dummy.s == v3->dummy.s )
      {
        v2 -= 4;
        v3 = (TString *)((char *)v3 + 4);
        v4 = (TString *)((char *)v4 + 4);
        if ( v2 < 4 )
          goto LABEL_6;
      }
      return 0;
    }
LABEL_6:
    if ( v2 )
    {
      if ( LOBYTE(v3->dummy.s) != LOBYTE(v4->dummy.s)
        || v2 > 1 && (BYTE1(v3->dummy.u) != BYTE1(v4->dummy.u) || v2 > 2 && BYTE2(v3->tsv.next) != BYTE2(v4->tsv.next)) )
      {
        return 0;
      }
    }
  }
  return 1;
}

//----- (0074BAF0) --------------------------------------------------------
int __cdecl luaS_eqstr(TString *a, TString *b)
{
  char v2; // dl@1
  int v3; // eax@3
  int result; // eax@6

  v2 = a->tsv.tt;
  result = 0;
  if ( v2 == b->tsv.tt )
  {
    v3 = v2 == 4 ? (unsigned __int8)(a == b) : luaS_eqlngstr(a, b);
    if ( v3 )
      result = 1;
  }
  return result;
}

//----- (0074BB30) --------------------------------------------------------
unsigned int __cdecl luaS_hash(const char *str, unsigned int l, unsigned int seed)
{
  unsigned int v3; // edx@1
  unsigned int result; // eax@1
  unsigned int v5; // ecx@1
  unsigned int v6; // edi@2

  v3 = l;
  result = seed ^ l;
  v5 = (l >> 5) + 1;
  if ( l >= v5 )
  {
    do
    {
      v6 = (result >> 2) + 32 * result + str[v3 - 1];
      v3 -= v5;
      result ^= v6;
    }
    while ( v3 >= v5 );
  }
  return result;
}

//----- (0074BB70) --------------------------------------------------------
void __cdecl luaS_resize(lua_State *L, int newsize)
{
  lua_State *v2; // ebx@1
  global_State *v3; // esi@1
  int v4; // eax@1
  int v5; // edi@1
  int j; // eax@4
  int v7; // edx@6
  GCObject **v8; // ecx@7
  GCObject *v9; // eax@7
  int v10; // edi@8
  GCObject *v11; // edx@9
  int v12; // ecx@9
  int v13; // eax@12
  int i; // [sp+Ch] [bp-4h]@6

  v2 = L;
  v3 = L->l_G;
  luaC_runtilstate(L, -5);
  v4 = v3->strt.size;
  v5 = newsize;
  if ( newsize > v4 )
  {
    if ( (unsigned int)(newsize + 1) > 0x3FFFFFFF )
      luaM_toobig(L);
    v3->strt.hash = (GCObject **)luaM_realloc_(L, v3->strt.hash, 4 * v4, 4 * newsize);
    for ( j = v3->strt.size; j < newsize; ++j )
      v3->strt.hash[j] = 0;
  }
  v7 = 0;
  for ( i = 0; v7 < v3->strt.size; i = v7 )
  {
    v8 = &v3->strt.hash[v7];
    v9 = *v8;
    *v8 = 0;
    if ( v9 )
    {
      v10 = v5 - 1;
      do
      {
        v11 = v9->gch.next;
        v12 = v10 & v9->ts.tsv.hash;
        v9->gch.next = v3->strt.hash[v12];
        v3->strt.hash[v12] = v9;
        v9->h.marked &= 0xBFu;
        v9 = v11;
      }
      while ( v11 );
      v5 = newsize;
      v2 = L;
      v7 = i;
    }
    ++v7;
  }
  v13 = v3->strt.size;
  if ( v5 < v13 )
  {
    if ( (unsigned int)(v5 + 1) > 0x3FFFFFFF )
      luaM_toobig(v2);
    v3->strt.hash = (GCObject **)luaM_realloc_(v2, v3->strt.hash, 4 * v13, 4 * v5);
  }
  v3->strt.size = v5;
}

//----- (0074BC80) --------------------------------------------------------
GCObject *__usercall internshrstr@<eax>(unsigned int l@<edi>, lua_State *L, const char *str)
{
  global_State *v3; // ebx@1
  unsigned int v4; // eax@1
  unsigned int v5; // esi@1
  GCObject *result; // eax@1
  const char *v7; // edx@4
  unsigned int v8; // ecx@4
  TString *v9; // esi@4
  signed int v10; // eax@16
  GCObject *v11; // eax@19
  GCObject *v12; // esi@19
  char v13; // cl@22
  unsigned int h; // [sp+8h] [bp-8h]@1
  GCObject *o; // [sp+Ch] [bp-4h]@1

  v3 = L->l_G;
  v4 = luaS_hash(str, l, v3->seed);
  v5 = v4;
  result = v3->strt.hash[v4 & (v3->strt.size - 1)];
  h = v5;
  o = result;
  if ( !result )
  {
LABEL_16:
    v10 = v3->strt.size;
    if ( v3->strt.nuse >= v10 && v10 <= 1073741822 )
      luaS_resize(L, 2 * v10);
    v11 = luaC_newobj(L, 4, l + 17, &v3->strt.hash[v5 & (v3->strt.size - 1)], 0);
    v12 = v11;
    v11->p.code = (unsigned int *)l;
    v11->ts.tsv.hash = h;
    *(&v11->p.marked + 1) = 0;
    memcpy((char *)&v11->u.uv.len, (char *)str, l);
    *((_BYTE *)&v12->u.uv.len + l) = 0;
    ++v3->strt.nuse;
    return v12;
  }
  while ( 1 )
  {
    if ( v5 != result->ts.tsv.hash || (unsigned int *)l != result->p.code )
      goto LABEL_15;
    v7 = str;
    v8 = l;
    v9 = (TString *)&result->u.uv.len;
    if ( l < 4 )
      break;
    while ( *(void **)v7 == v9->dummy.s )
    {
      v8 -= 4;
      v9 = (TString *)((char *)v9 + 4);
      v7 += 4;
      if ( v8 < 4 )
      {
        result = o;
        goto LABEL_8;
      }
    }
LABEL_14:
    result = o;
LABEL_15:
    result = result->gch.next;
    v5 = h;
    o = result;
    if ( !result )
      goto LABEL_16;
  }
LABEL_8:
  if ( !v8 )
    goto LABEL_22;
  if ( LOBYTE(v9->dummy.s) != *v7 || v8 > 1 && (BYTE1(v9->dummy.u) != v7[1] || v8 > 2 && BYTE2(v9->tsv.next) != v7[2]) )
    goto LABEL_14;
  result = o;
LABEL_22:
  v13 = result->h.marked ^ 3;
  if ( !((unsigned __int8)(v3->currentwhite ^ 3) & (unsigned __int8)v13) )
    result->h.marked = v13;
  return result;
}

//----- (0074BDB0) --------------------------------------------------------
GCObject *__cdecl luaS_newlstr(lua_State *L, const char *str, unsigned int l)
{
  GCObject *result; // eax@2
  unsigned int v4; // ebx@5
  GCObject *v5; // eax@5
  GCObject *v6; // esi@5

  if ( l > 0x28 )
  {
    if ( l + 1 > 0xFFFFFFED )
      luaM_toobig(L);
    v4 = L->l_G->seed;
    v5 = luaC_newobj(L, 20, l + 17, 0, 0);
    v6 = v5;
    v5->p.code = (unsigned int *)l;
    v5->ts.tsv.hash = v4;
    *(&v5->p.marked + 1) = 0;
    memcpy((char *)&v5->u.uv.len, (char *)str, l);
    *((_BYTE *)&v6->u.uv.len + l) = 0;
    result = v6;
  }
  else
  {
    result = internshrstr(l, L, str);
  }
  return result;
}

//----- (0074BE30) --------------------------------------------------------
GCObject *__cdecl luaS_new(lua_State *L, const char *str)
{
  return luaS_newlstr(L, str, strlen(str));
}

//----- (0074BE60) --------------------------------------------------------
GCObject *__cdecl luaS_newudata(lua_State *L, unsigned int s, Table *e)
{
  GCObject *result; // eax@3

  if ( s > 0xFFFFFFE5 )
    luaM_toobig(L);
  result = luaC_newobj(L, 7, s + 24, 0, 0);
  result->p.p = (Proto **)s;
  result->ts.tsv.hash = 0;
  result->p.code = (unsigned int *)e;
  return result;
}

//----- (0074BEA0) --------------------------------------------------------
GCObject *__cdecl luaF_newCclosure(lua_State *L, int n)
{
  GCObject *result; // eax@1

  result = luaC_newobj(L, 38, 8 * n + 16, 0, 0);
  *(&result->p.marked + 1) = n;
  return result;
}

//----- (0074BED0) --------------------------------------------------------
GCObject *__cdecl luaF_newLclosure(lua_State *L, int n)
{
  int v2; // ebx@1
  GCObject *result; // eax@1
  char *v4; // ecx@2

  v2 = n;
  result = luaC_newobj(L, 6, 4 * n + 16, 0, 0);
  result->p.code = 0;
  *(&result->p.marked + 1) = n;
  if ( n )
  {
    v4 = (char *)(&result->u.uv.len + n);
    do
    {
      v4 -= 4;
      --v2;
      *(_DWORD *)v4 = 0;
    }
    while ( v2 );
  }
  return result;
}

//----- (0074BF20) --------------------------------------------------------
GCObject *__cdecl luaF_newupval(lua_State *L)
{
  GCObject *result; // eax@1

  result = luaC_newobj(L, 10, 0x18u, 0, 0);
  result->ts.tsv.hash = (unsigned int)&result->u.uv.len;
  result->p.lineinfo = (int *)2146936064;
  return result;
}

//----- (0074BF50) --------------------------------------------------------
GCObject *__cdecl luaF_findupval(lua_State *L, lua_TValue *level)
{
  global_State *v2; // esi@1
  GCObject **v3; // ecx@1
  GCObject *result; // eax@2
  lua_TValue *v5; // edx@2
  int v6; // ecx@5
  char v7; // cl@7

  v2 = L->l_G;
  v3 = &L->openupval;
  if ( L->openupval )
  {
    do
    {
      result = *v3;
      v5 = (lua_TValue *)(*v3)->ts.tsv.hash;
      if ( v5 < level )
        break;
      if ( v5 == level )
      {
        v7 = result->h.marked ^ 3;
        if ( !((unsigned __int8)(v2->currentwhite ^ 3) & (unsigned __int8)v7) )
          result->h.marked = v7;
        return result;
      }
      v3 = (GCObject **)*v3;
    }
    while ( result->gch.next );
  }
  result = luaC_newobj(L, 10, 0x18u, v3, 0);
  result->ts.tsv.hash = (unsigned int)level;
  result->p.p = (Proto **)&v2->uvhead;
  v6 = v2->uvhead.u.value.u.i.tt__;
  result->p.lineinfo = (int *)v6;
  *(_DWORD *)(v6 + 16) = result;
  v2->uvhead.u.value.u.i.tt__ = (int)result;
  return result;
}

//----- (0074BFC0) --------------------------------------------------------
void __cdecl luaF_freeupval(lua_State *L, UpVal *uv)
{
  char *v2; // ecx@1

  v2 = (char *)&uv->u;
  if ( ($2D1903F5EC066E1B5E3C04DB09C731F4 *)uv->v != &uv->u )
  {
    *(_DWORD *)(uv->u.value.u.i.tt__ + 16) = *(_DWORD *)v2;
    *(_DWORD *)(*(_DWORD *)v2 + 20) = uv->u.value.u.i.tt__;
  }
  luaM_realloc_(L, uv, 0x18u, 0);
}

//----- (0074C000) --------------------------------------------------------
void __cdecl luaF_close(lua_State *L, lua_TValue *level)
{
  global_State *v2; // edi@1
  GCObject *v3; // eax@2
  int v4; // ecx@3
  unsigned int v5; // edx@7

  v2 = L->l_G;
  while ( L->openupval )
  {
    v3 = L->openupval;
    if ( v3->ts.tsv.hash < (unsigned int)level )
      break;
    L->openupval = v3->gch.next;
    v4 = (int)&v3->uv.u;
    if ( (unsigned __int8)(v2->currentwhite ^ 3) & (unsigned __int8)(v3->h.marked ^ 3) )
    {
      v3->p.lineinfo[4] = *(_DWORD *)v4;
      *(_DWORD *)(*(_DWORD *)v4 + 20) = v3->p.lineinfo;
      v5 = v3->ts.tsv.hash;
      *(_DWORD *)v4 = *(_DWORD *)v5;
      v3->p.lineinfo = *(int **)(v5 + 4);
      v3->ts.tsv.hash = v4;
      v3->gch.next = v2->allgc;
      v2->allgc = v3;
      luaC_checkupvalcolor(v2, (UpVal *)v3);
    }
    else
    {
      if ( v3->ts.tsv.hash != v4 )
      {
        v3->p.lineinfo[4] = *(_DWORD *)v4;
        *(_DWORD *)(*(_DWORD *)v4 + 20) = v3->p.lineinfo;
      }
      luaM_realloc_(L, v3, 0x18u, 0);
    }
  }
}

//----- (0074C0A0) --------------------------------------------------------
GCObject *__cdecl luaF_newproto(lua_State *L)
{
  GCObject *result; // eax@1

  result = luaC_newobj(L, 9, 0x50u, 0, 0);
  result->ts.tsv.hash = 0;
  result->p.sizek = 0;
  result->p.p = 0;
  result->p.sizep = 0;
  result->p.code = 0;
  result->p.cache = 0;
  result->p.sizecode = 0;
  result->p.lineinfo = 0;
  result->p.sizelineinfo = 0;
  result->h.sizearray = 0;
  result->p.sizeupvalues = 0;
  LOWORD(result->th.base_ci.top) = 0;
  BYTE2(result->th.base_ci.top) = 0;
  result->h.gclist = 0;
  result->p.sizelocvars = 0;
  result->p.linedefined = 0;
  result->p.lastlinedefined = 0;
  result->p.source = 0;
  return result;
}

//----- (0074C100) --------------------------------------------------------
void __cdecl luaF_freeproto(lua_State *L, Proto *f)
{
  Proto *v2; // esi@1

  v2 = f;
  luaM_realloc_(L, f->code, 4 * f->sizecode, 0);
  luaM_realloc_(L, v2->p, 4 * v2->sizep, 0);
  luaM_realloc_(L, v2->k, 8 * v2->sizek, 0);
  luaM_realloc_(L, v2->lineinfo, 4 * v2->sizelineinfo, 0);
  luaM_realloc_(L, v2->locvars, 12 * v2->sizelocvars, 0);
  luaM_realloc_(L, v2->upvalues, 8 * v2->sizeupvalues, 0);
  luaM_realloc_(L, f, 0x50u, 0);
}

//----- (0074C1A0) --------------------------------------------------------
TString *__cdecl luaF_getlocalname(Proto *f, int local_number, int pc)
{
  int v3; // edx@1
  int v4; // eax@1
  LocVar *v5; // ebx@2
  int v6; // edi@2
  int *v7; // ecx@2

  v3 = f->sizelocvars;
  v4 = 0;
  if ( v3 > 0 )
  {
    v5 = f->locvars;
    v6 = local_number;
    v7 = &v5->endpc;
    while ( *(v7 - 1) <= pc )
    {
      if ( pc < *v7 && !--v6 )
        return v5[v4].varname + 1;
      ++v4;
      v7 += 3;
      if ( v4 >= v3 )
        return 0;
    }
  }
  return 0;
}

//----- (0074C1F0) --------------------------------------------------------
int __cdecl luaZ_fill(Zio *z)
{
  Zio *v1; // esi@1
  const char *v2; // eax@1
  char *v3; // ecx@3
  int result; // eax@3

  v1 = z;
  v2 = z->reader(z->L, z->data, (unsigned int *)&z);
  if ( v2 && z )
  {
    v3 = (char *)&z[-1].L + 3;
    v1->p = v2;
    v1->n = (unsigned int)v3;
    LOBYTE(v3) = *v2;
    v1->p = v2 + 1;
    result = (unsigned __int8)v3;
  }
  else
  {
    result = -1;
  }
  return result;
}

//----- (0074C230) --------------------------------------------------------
void __cdecl luaZ_init(lua_State *L, Zio *z, const char *(__cdecl *reader)(lua_State *, void *, unsigned int *), void *data)
{
  z->L = L;
  z->reader = reader;
  z->data = data;
  z->n = 0;
  z->p = 0;
}

//----- (0074C260) --------------------------------------------------------
unsigned int __cdecl luaZ_read(Zio *z, void *b, unsigned int n)
{
  unsigned int v3; // ebx@1
  const char *v4; // eax@3
  unsigned int v5; // ecx@5
  int v6; // edx@5
  const char *v7; // eax@5
  unsigned int v8; // edi@7

  v3 = n;
  if ( !n )
    return 0;
  while ( z->n )
  {
LABEL_7:
    v8 = z->n;
    if ( v3 <= z->n )
      v8 = v3;
    memcpy((char *)b, (char *)z->p, v8);
    z->n -= v8;
    z->p += v8;
    b = (char *)b + v8;
    v3 -= v8;
    if ( !v3 )
      return 0;
  }
  v4 = z->reader(z->L, z->data, &n);
  if ( v4 )
  {
    if ( n )
    {
      v5 = n - 1;
      z->p = v4;
      z->n = v5;
      v6 = *v4;
      v7 = v4 + 1;
      z->p = v7;
      if ( v6 != -1 )
      {
        z->n = v5 + 1;
        z->p = v7 - 1;
        goto LABEL_7;
      }
    }
  }
  return v3;
}

//----- (0074C2F0) --------------------------------------------------------
char *__cdecl luaZ_openspace(lua_State *L, Mbuffer *buff, unsigned int n)
{
  signed int v3; // esi@1
  unsigned int v4; // eax@1

  v3 = n;
  v4 = buff->buffsize;
  if ( n > v4 )
  {
    if ( n < 0x20 )
      v3 = 32;
    if ( (unsigned int)(v3 + 1) > 0xFFFFFFFD )
      luaM_toobig(L);
    buff->buffer = (char *)luaM_realloc_(L, buff->buffer, v4, v3);
    buff->buffsize = v3;
  }
  return buff->buffer;
}

//----- (0074C340) --------------------------------------------------------
void __usercall DumpString(TString *s@<eax>, DumpState *D@<esi>)
{
  TString *v2; // edi@1
  bool v3; // zf@4
  unsigned int size; // [sp+4h] [bp-4h]@2

  v2 = s;
  if ( s )
  {
    v3 = D->status == 0;
    size = s->tsv.len + 1;
    if ( v3 )
    {
      D->status = D->writer(D->L, &size, 4u, D->data);
      if ( !D->status )
        D->status = D->writer(D->L, &v2[1], size, D->data);
    }
  }
  else
  {
    size = 0;
    if ( !D->status )
      D->status = D->writer(D->L, &size, 4u, D->data);
  }
}

//----- (0074C3C0) --------------------------------------------------------
void __usercall DumpConstants(DumpState *D@<eax>, Proto *f)
{
  DumpState *v2; // esi@1
  bool v3; // zf@1
  int v4; // edi@1
  int v5; // ebx@3
  lua_TValue *v6; // edi@4
  int v7; // eax@4
  int v8; // eax@8
  int v9; // eax@10
  int v10; // eax@11
  int v11; // eax@15
  int v12; // ebx@20
  int i; // edi@22
  int n; // [sp+Ch] [bp-10h]@1
  long double v15; // [sp+10h] [bp-Ch]@1
  char v16; // [sp+1Bh] [bp-1h]@6

  v2 = D;
  v3 = D->status == 0;
  v4 = f->sizek;
  n = v4;
  HIDWORD(v15) = v4;
  if ( v3 )
    D->status = D->writer(D->L, (char *)&v15 + 4, 4u, D->data);
  v5 = 0;
  if ( v4 > 0 )
  {
    do
    {
      v6 = &f->k[v5];
      v7 = v6->u.i.tt__;
      if ( (v6->u.i.tt__ & 0x7FFFFF00) != 2146936064 )
        LOBYTE(v7) = 3;
      v3 = v2->status == 0;
      v16 = v7 & 0xF;
      if ( v3 )
        v2->status = v2->writer(v2->L, &v16, 1u, v2->data);
      v8 = v6->u.i.tt__;
      if ( (v6->u.i.tt__ & 0x7FFFFF00) != 2146936064 )
        LOBYTE(v8) = 3;
      v9 = (v8 & 0xF) - 1;
      if ( v9 )
      {
        v10 = v9 - 2;
        if ( v10 )
        {
          if ( v10 == 1 )
            DumpString((TString *)v6->u.i.v__.gc, v2);
          goto LABEL_19;
        }
        v3 = v2->status == 0;
        v15 = v6->u.d__;
        if ( v3 )
        {
          v11 = v2->writer(v2->L, &v15, 8u, v2->data);
LABEL_18:
          v2->status = v11;
          goto LABEL_19;
        }
      }
      else
      {
        v3 = v2->status == 0;
        v16 = LOBYTE(v6->u.d__);
        if ( v3 )
        {
          v11 = v2->writer(v2->L, &v16, 1u, v2->data);
          goto LABEL_18;
        }
      }
LABEL_19:
      ++v5;
    }
    while ( v5 < n );
  }
  v3 = v2->status == 0;
  v12 = f->sizep;
  n = f->sizep;
  if ( v3 )
    v2->status = v2->writer(v2->L, &n, 4u, v2->data);
  for ( i = 0; i < v12; ++i )
    DumpFunction(f->p[i], v2);
}

//----- (0074C520) --------------------------------------------------------
void __usercall DumpUpvalues(Proto *f@<ebx>, DumpState *D@<esi>)
{
  bool v2; // zf@1
  int i; // edi@3
  int v4; // [sp+0h] [bp-Ch]@1
  int n; // [sp+4h] [bp-8h]@1
  char v6; // [sp+Bh] [bp-1h]@4

  v2 = D->status == 0;
  n = f->sizeupvalues;
  v4 = n;
  if ( v2 )
    D->status = D->writer(D->L, &v4, 4u, D->data);
  for ( i = 0; i < n; ++i )
  {
    v2 = D->status == 0;
    v6 = f->upvalues[i].instack;
    if ( v2 )
      D->status = D->writer(D->L, &v6, 1u, D->data);
    v2 = D->status == 0;
    v6 = f->upvalues[i].idx;
    if ( v2 )
      D->status = D->writer(D->L, &v6, 1u, D->data);
  }
}

//----- (0074C5B0) --------------------------------------------------------
void __usercall DumpDebug(DumpState *D@<eax>, Proto *f)
{
  DumpState *v2; // esi@1
  TString *v3; // eax@2
  int v4; // edi@5
  bool v5; // zf@7
  int *v6; // ebx@7
  int v7; // eax@8
  int v8; // edi@11
  int v9; // ebx@16
  TString *v10; // edi@17
  int v11; // eax@21
  int v12; // eax@19
  int v13; // edi@30
  int v14; // ebx@34
  TString *v15; // edi@35
  int v16; // eax@39
  int v17; // eax@37
  int v18; // [sp+Ch] [bp-10h]@26
  int v19; // [sp+10h] [bp-Ch]@24
  int v20; // [sp+14h] [bp-8h]@7
  int n; // [sp+18h] [bp-4h]@18

  v2 = D;
  if ( D->strip )
    v3 = 0;
  else
    v3 = f->source;
  DumpString(v3, v2);
  if ( v2->strip )
    v4 = 0;
  else
    v4 = f->sizelineinfo;
  v5 = v2->status == 0;
  v6 = f->lineinfo;
  v20 = v4;
  if ( v5 )
  {
    v7 = v2->writer(v2->L, &v20, 4u, v2->data);
    v2->status = v7;
    if ( !v7 )
      v2->status = v2->writer(v2->L, v6, 4 * v4, v2->data);
  }
  if ( v2->strip )
    v8 = 0;
  else
    v8 = f->sizelocvars;
  v5 = v2->status == 0;
  v20 = v8;
  if ( v5 )
    v2->status = v2->writer(v2->L, &v20, 4u, v2->data);
  if ( v8 > 0 )
  {
    v9 = 0;
    v20 = v8;
    while ( 1 )
    {
      v10 = f->locvars[v9].varname;
      if ( v10 )
        break;
      n = 0;
      if ( !v2->status )
      {
        v12 = v2->writer(v2->L, &n, 4u, v2->data);
LABEL_23:
        v2->status = v12;
      }
LABEL_24:
      v5 = v2->status == 0;
      v19 = f->locvars[v9].startpc;
      if ( v5 )
        v2->status = v2->writer(v2->L, &v19, 4u, v2->data);
      v5 = v2->status == 0;
      v18 = f->locvars[v9].endpc;
      if ( v5 )
        v2->status = v2->writer(v2->L, &v18, 4u, v2->data);
      ++v9;
      if ( !--v20 )
        goto LABEL_29;
    }
    v5 = v2->status == 0;
    n = v10->tsv.len + 1;
    if ( !v5 )
      goto LABEL_24;
    v11 = v2->writer(v2->L, &n, 4u, v2->data);
    v2->status = v11;
    if ( v11 )
      goto LABEL_24;
    v12 = v2->writer(v2->L, &v10[1], n, v2->data);
    goto LABEL_23;
  }
LABEL_29:
  if ( v2->strip )
  {
    v13 = 0;
    n = 0;
  }
  else
  {
    n = f->sizeupvalues;
    v13 = n;
  }
  v5 = v2->status == 0;
  v18 = v13;
  if ( v5 )
    v2->status = v2->writer(v2->L, &v18, 4u, v2->data);
  v14 = 0;
  if ( v13 > 0 )
  {
    while ( 1 )
    {
      v15 = f->upvalues[v14].name;
      if ( v15 )
        break;
      v18 = 0;
      if ( !v2->status )
      {
        v17 = v2->writer(v2->L, &v18, 4u, v2->data);
LABEL_41:
        v2->status = v17;
      }
LABEL_42:
      if ( ++v14 >= n )
        return;
    }
    v5 = v2->status == 0;
    v20 = v15->tsv.len + 1;
    if ( !v5 )
      goto LABEL_42;
    v16 = v2->writer(v2->L, &v20, 4u, v2->data);
    v2->status = v16;
    if ( v16 )
      goto LABEL_42;
    v17 = v2->writer(v2->L, &v15[1], v20, v2->data);
    goto LABEL_41;
  }
}

//----- (0074C7E0) --------------------------------------------------------
void __cdecl DumpFunction(Proto *f, DumpState *D)
{
  Proto *v2; // ebx@1
  DumpState *v3; // esi@1
  bool v4; // zf@1
  Proto *v5; // edi@11
  int v6; // eax@12

  v2 = f;
  v3 = D;
  v4 = D->status == 0;
  f = (Proto *)f->linedefined;
  if ( v4 )
    v3->status = D->writer(D->L, &f, 4u, D->data);
  v4 = v3->status == 0;
  f = (Proto *)v2->lastlinedefined;
  if ( v4 )
    v3->status = v3->writer(v3->L, &f, 4u, v3->data);
  v4 = v3->status == 0;
  BYTE3(f) = v2->numparams;
  if ( v4 )
    v3->status = v3->writer(v3->L, (char *)&f + 3, 1u, v3->data);
  v4 = v3->status == 0;
  BYTE3(f) = v2->is_vararg;
  if ( v4 )
    v3->status = v3->writer(v3->L, (char *)&f + 3, 1u, v3->data);
  v4 = v3->status == 0;
  BYTE3(f) = v2->maxstacksize;
  if ( v4 )
    v3->status = v3->writer(v3->L, (char *)&f + 3, 1u, v3->data);
  v4 = v3->status == 0;
  v5 = (Proto *)v2->sizecode;
  D = (DumpState *)v2->code;
  f = v5;
  if ( v4 )
  {
    v6 = v3->writer(v3->L, &f, 4u, v3->data);
    v3->status = v6;
    if ( !v6 )
      v3->status = v3->writer(v3->L, D, 4 * (_DWORD)v5, v3->data);
  }
  DumpConstants(v3, v2);
  DumpUpvalues(v2, v3);
  DumpDebug(v3, v2);
}

//----- (0074C910) --------------------------------------------------------
int __cdecl luaU_dump(lua_State *L, Proto *f, int (__cdecl *w)(lua_State *, const void *, unsigned int, void *), void *data, int strip)
{
  DumpState D; // [sp+4h] [bp-2Ch]@1
  char h; // [sp+18h] [bp-18h]@1

  D.writer = w;
  D.L = L;
  D.data = data;
  D.strip = strip;
  D.status = 0;
  luaU_header(&h);
  D.status = D.writer(D.L, &h, 18u, D.data);
  DumpFunction(f, &D);
  return D.status;
}

//----- (0074C990) --------------------------------------------------------
int __cdecl db_getregistry(lua_State *L)
{
  lua_pushvalue(L, -1001000);
  return 1;
}

//----- (0074C9B0) --------------------------------------------------------
int __cdecl db_getmetatable(lua_State *L)
{
  luaL_checkany(L, 1);
  if ( !lua_getmetatable(L, 1) )
    lua_pushnil(L);
  return 1;
}

//----- (0074C9E0) --------------------------------------------------------
int __cdecl db_setmetatable(lua_State *L)
{
  int v1; // eax@1

  v1 = lua_type(L, 2);
  if ( v1 && v1 != 5 )
    luaL_argerror(L, 2, "nil or table expected");
  lua_settop(L, 2);
  lua_setmetatable(L, 1);
  return 1;
}

//----- (0074CA30) --------------------------------------------------------
int __cdecl db_getuservalue(lua_State *L)
{
  int result; // eax@2

  if ( lua_type(L, 1) == 7 )
  {
    lua_getuservalue(L, 1);
    result = 1;
  }
  else
  {
    lua_pushnil(L);
    result = 1;
  }
  return result;
}

//----- (0074CA70) --------------------------------------------------------
int __cdecl db_setuservalue(lua_State *L)
{
  if ( lua_type(L, 1) == 2 )
    luaL_argerror(L, 1, "full userdata expected, got light userdata");
  luaL_checktype(L, 1, 7);
  if ( lua_type(L, 2) > 0 )
    luaL_checktype(L, 2, 5);
  lua_settop(L, 2);
  lua_setuservalue(L, 1);
  return 1;
}

//----- (0074CAE0) --------------------------------------------------------
void __usercall treatstackoption(lua_State *L@<esi>, lua_State *L1@<eax>, const char *fname)
{
  if ( L == L1 )
  {
    lua_pushvalue(L, -2);
    lua_remove(L, -3);
    lua_setfield(L, -2, fname);
  }
  else
  {
    lua_xmove(L1, L, 1);
    lua_setfield(L, -2, fname);
  }
}

//----- (0074CB30) --------------------------------------------------------
int __cdecl db_getinfo(lua_State *L)
{
  signed int v1; // edi@2
  const char *v2; // eax@4
  int v3; // edi@4
  const char *v4; // ebx@4
  int v5; // eax@5
  lua_State *v6; // edi@5
  int v8; // eax@11
  int v9; // eax@13
  int v10; // eax@15
  int v11; // eax@17
  int v12; // eax@19
  int v13; // eax@21
  int v14; // eax@23
  int v15; // [sp+Ch] [bp-70h]@4
  lua_State *L1; // [sp+10h] [bp-6Ch]@2
  lua_Debug ar; // [sp+14h] [bp-68h]@5

  if ( lua_type(L, 1) == 8 )
  {
    v1 = 1;
    L1 = lua_tothread(L, 1);
  }
  else
  {
    v1 = 0;
    L1 = L;
  }
  v15 = v1 + 2;
  v2 = luaL_optlstring(L, v1 + 2, "flnStu", 0);
  v3 = v1 + 1;
  v4 = v2;
  if ( lua_isnumber(L, v3) )
  {
    v5 = lua_tointegerx(L, v3, 0);
    v6 = L1;
    if ( !lua_getstack(L1, v5, &ar) )
    {
      lua_pushnil(L);
      return 1;
    }
  }
  else
  {
    if ( lua_type(L, v3) != 6 )
      luaL_argerror(L, v3, "function or level expected");
    lua_pushfstring(L, ">%s", v4);
    v4 = lua_tolstring(L, -1, 0);
    lua_pushvalue(L, v3);
    lua_xmove(L, L1, 1);
    v6 = L1;
  }
  if ( !lua_getinfo(v6, v4, &ar) )
    luaL_argerror(L, v15, "invalid option");
  lua_createtable(L, 0, 2);
  strchr((char *)v4, 83);
  if ( v8 )
  {
    lua_pushstring(L, ar.source);
    lua_setfield(L, -2, "source");
    lua_pushstring(L, ar.short_src);
    lua_setfield(L, -2, "short_src");
    lua_pushinteger(L, ar.linedefined);
    lua_setfield(L, -2, "linedefined");
    lua_pushinteger(L, ar.lastlinedefined);
    lua_setfield(L, -2, "lastlinedefined");
    lua_pushstring(L, ar.what);
    lua_setfield(L, -2, "what");
  }
  strchr((char *)v4, 108);
  if ( v9 )
  {
    lua_pushinteger(L, ar.currentline);
    lua_setfield(L, -2, "currentline");
  }
  strchr((char *)v4, 117);
  if ( v10 )
  {
    lua_pushinteger(L, (unsigned __int8)ar.nups);
    lua_setfield(L, -2, "nups");
    lua_pushinteger(L, (unsigned __int8)ar.nparams);
    lua_setfield(L, -2, "nparams");
    lua_pushboolean(L, ar.isvararg);
    lua_setfield(L, -2, "isvararg");
  }
  strchr((char *)v4, 110);
  if ( v11 )
  {
    lua_pushstring(L, ar.name);
    lua_setfield(L, -2, "name");
    lua_pushstring(L, ar.namewhat);
    lua_setfield(L, -2, "namewhat");
  }
  strchr((char *)v4, 116);
  if ( v12 )
  {
    lua_pushboolean(L, ar.istailcall);
    lua_setfield(L, -2, "istailcall");
  }
  strchr((char *)v4, 76);
  if ( v13 )
    treatstackoption(L, v6, "activelines");
  strchr((char *)v4, 102);
  if ( v14 )
    treatstackoption(L, v6, "func");
  return 1;
}

//----- (0074CE30) --------------------------------------------------------
int __cdecl db_getlocal(lua_State *L)
{
  signed int v1; // edi@2
  lua_State *v2; // ebx@2
  int v3; // eax@4
  int v4; // edi@4
  const char *v5; // eax@5
  int v6; // eax@6
  const char *v7; // edi@8
  int nvar; // [sp+Ch] [bp-6Ch]@4
  lua_Debug ar; // [sp+10h] [bp-68h]@6

  if ( lua_type(L, 1) == 8 )
  {
    v1 = 1;
    v2 = lua_tothread(L, 1);
  }
  else
  {
    v1 = 0;
    v2 = L;
  }
  v3 = luaL_checkinteger(L, v1 + 2);
  v4 = v1 + 1;
  nvar = v3;
  if ( lua_type(L, v4) == 6 )
  {
    lua_pushvalue(L, v4);
    v5 = lua_getlocal(L, 0, nvar);
    lua_pushstring(L, v5);
  }
  else
  {
    v6 = luaL_checkinteger(L, v4);
    if ( !lua_getstack(v2, v6, &ar) )
      luaL_argerror(L, v4, "level out of range");
    v7 = lua_getlocal(v2, &ar, nvar);
    if ( v7 )
    {
      lua_xmove(v2, L, 1);
      lua_pushstring(L, v7);
      lua_pushvalue(L, -2);
      return 2;
    }
    lua_pushnil(L);
  }
  return 1;
}

//----- (0074CF50) --------------------------------------------------------
int __cdecl db_setlocal(lua_State *L)
{
  signed int v1; // edi@2
  lua_State *v2; // ebx@2
  int v3; // eax@4
  int v4; // eax@6
  const char *v5; // eax@6
  lua_Debug ar; // [sp+10h] [bp-68h]@4

  if ( lua_type(L, 1) == 8 )
  {
    v1 = 1;
    v2 = lua_tothread(L, 1);
  }
  else
  {
    v1 = 0;
    v2 = L;
  }
  v3 = luaL_checkinteger(L, v1 + 1);
  if ( !lua_getstack(v2, v3, &ar) )
    luaL_argerror(L, v1 + 1, "level out of range");
  luaL_checkany(L, v1 + 3);
  lua_settop(L, v1 + 3);
  lua_xmove(L, v2, 1);
  v4 = luaL_checkinteger(L, v1 + 2);
  v5 = lua_setlocal(v2, &ar, v4);
  lua_pushstring(L, v5);
  return 1;
}

//----- (0074D030) --------------------------------------------------------
NiUnsharedGeometryGroup *__cdecl db_getupvalue(lua_State *L)
{
  int v1; // edi@1
  NiUnsharedGeometryGroup *result; // eax@1

  v1 = luaL_checkinteger(L, 2);
  luaL_checktype(L, 1, 6);
  result = lua_getupvalue(L, 1, v1);
  if ( result )
  {
    lua_pushstring(L, (const char *)result);
    lua_insert(L, -2);
    result = (NiUnsharedGeometryGroup *)2;
  }
  return result;
}

//----- (0074D080) --------------------------------------------------------
NiUnsharedGeometryGroup *__cdecl db_setupvalue(lua_State *L)
{
  int v1; // edi@1
  NiUnsharedGeometryGroup *result; // eax@1

  luaL_checkany(L, 3);
  v1 = luaL_checkinteger(L, 2);
  luaL_checktype(L, 1, 6);
  result = lua_setupvalue(L, 1, v1);
  if ( result )
  {
    lua_pushstring(L, (const char *)result);
    lua_insert(L, -1);
    result = (NiUnsharedGeometryGroup *)1;
  }
  return result;
}

//----- (0074D0E0) --------------------------------------------------------
int __cdecl db_upvalueid(lua_State *L)
{
  int v1; // edi@1
  void *v2; // eax@4
  lua_Debug ar; // [sp+8h] [bp-68h]@1

  v1 = luaL_checkinteger(L, 2);
  luaL_checktype(L, 1, 6);
  lua_pushvalue(L, 1);
  lua_getinfo(L, ">u", &ar);
  if ( v1 < 1 || v1 > (unsigned __int8)ar.nups )
    luaL_argerror(L, 2, "invalid upvalue index");
  v2 = lua_upvalueid(L, 1, v1);
  lua_pushlightuserdata(L, v2);
  return 1;
}

//----- (0074D170) --------------------------------------------------------
int __cdecl db_upvaluejoin(lua_State *L)
{
  int v1; // ebx@1
  int v2; // edi@4
  lua_Debug ar; // [sp+Ch] [bp-68h]@1

  v1 = luaL_checkinteger(L, 2);
  luaL_checktype(L, 1, 6);
  lua_pushvalue(L, 1);
  lua_getinfo(L, ">u", &ar);
  if ( v1 < 1 || v1 > (unsigned __int8)ar.nups )
    luaL_argerror(L, 2, "invalid upvalue index");
  v2 = luaL_checkinteger(L, 4);
  luaL_checktype(L, 3, 6);
  lua_pushvalue(L, 3);
  lua_getinfo(L, ">u", &ar);
  if ( v2 < 1 || v2 > (unsigned __int8)ar.nups )
    luaL_argerror(L, 4, "invalid upvalue index");
  if ( lua_iscfunction(L, 1) )
    luaL_argerror(L, 1, "Lua function expected");
  if ( lua_iscfunction(L, 3) )
    luaL_argerror(L, 3, "Lua function expected");
  lua_upvaluejoin(L, 1, v1, 3, v2);
  return 0;
}

//----- (0074D280) --------------------------------------------------------
void __cdecl hookf(lua_State *L, lua_Debug *ar)
{
  int v2; // eax@2

  luaL_getsubtable(L, -1001000, "_HKEY");
  lua_pushthread(L);
  lua_rawget(L, -2);
  if ( lua_type(L, -1) == 6 )
  {
    lua_pushstring(L, hooknames[ar->event]);
    v2 = ar->currentline;
    if ( v2 < 0 )
    {
      lua_pushnil(L);
      lua_callk(L, 2, 0, 0, 0);
    }
    else
    {
      lua_pushinteger(L, v2);
      lua_callk(L, 2, 0, 0, 0);
    }
  }
}

//----- (0074D310) --------------------------------------------------------
int __cdecl db_sethook(lua_State *L)
{
  signed int v1; // edi@2
  int v2; // ebx@4
  signed int v3; // edi@6
  int v4; // eax@6
  int v5; // eax@8
  int v6; // eax@10
  void (__cdecl *func)(lua_State *, lua_Debug *); // [sp+Ch] [bp-10h]@5
  lua_State *L1; // [sp+10h] [bp-Ch]@2
  int count; // [sp+14h] [bp-8h]@5
  const char *smask; // [sp+18h] [bp-4h]@5
  char *smaska; // [sp+18h] [bp-4h]@6

  if ( lua_type(L, 1) == 8 )
  {
    v1 = 1;
    L1 = lua_tothread(L, 1);
  }
  else
  {
    v1 = 0;
    L1 = L;
  }
  v2 = v1 + 1;
  if ( lua_type(L, v1 + 1) > 0 )
  {
    smaska = (char *)luaL_checklstring(L, v1 + 2, 0);
    luaL_checktype(L, v1 + 1, 6);
    count = luaL_optinteger(L, v1 + 3, 0);
    func = hookf;
    v3 = 0;
    strchr(smaska, 99);
    if ( v4 )
      v3 = 1;
    strchr(smaska, 114);
    if ( v5 )
      v3 |= 2u;
    strchr(smaska, 108);
    if ( v6 )
      v3 |= 4u;
    if ( count > 0 )
      v3 |= 8u;
    smask = (const char *)v3;
  }
  else
  {
    lua_settop(L, v1 + 1);
    func = 0;
    smask = 0;
    count = 0;
  }
  if ( !luaL_getsubtable(L, -1001000, "_HKEY") )
  {
    lua_pushstring(L, "k");
    lua_setfield(L, -2, "__mode");
    lua_pushvalue(L, -1);
    lua_setmetatable(L, -2);
  }
  lua_pushthread(L1);
  lua_xmove(L1, L, 1);
  lua_pushvalue(L, v2);
  lua_rawset(L, -3);
  lua_sethook(L1, func, (int)smask, count);
  return 0;
}

//----- (0074D470) --------------------------------------------------------
int __cdecl db_gethook(lua_State *L)
{
  lua_State *v1; // edi@2
  char v2; // bl@4
  void (__cdecl *v3)(lua_State *, lua_Debug *); // eax@4
  signed int v4; // eax@8
  int v5; // eax@14
  char buff[5]; // [sp+8h] [bp-Ch]@9

  if ( lua_type(L, 1) == 8 )
    v1 = lua_tothread(L, 1);
  else
    v1 = L;
  v2 = lua_gethookmask(v1);
  v3 = lua_gethook(v1);
  if ( v3 && v3 != hookf )
  {
    lua_pushlstring(L, "external hook", 0xDu);
  }
  else
  {
    luaL_getsubtable(L, -1001000, "_HKEY");
    lua_pushthread(v1);
    lua_xmove(v1, L, 1);
    lua_rawget(L, -2);
    lua_remove(L, -2);
  }
  v4 = 0;
  if ( v2 & 1 )
  {
    buff[0] = 99;
    v4 = 1;
  }
  if ( v2 & 2 )
    buff[v4++] = 114;
  if ( v2 & 4 )
    buff[v4++] = 108;
  buff[v4] = 0;
  lua_pushstring(L, buff);
  v5 = lua_gethookcount(v1);
  lua_pushinteger(L, v5);
  return 3;
}

//----- (0074D570) --------------------------------------------------------
int __cdecl db_debug(lua_State *L)
{
  _iobuf *v1; // eax@1
  _iobuf *v2; // eax@1
  _iobuf *v3; // eax@1
  const char *v4; // ST18_4@5
  _iobuf *v5; // eax@5
  _iobuf *v6; // eax@5
  _iobuf *v7; // eax@6
  _iobuf *v8; // eax@6
  _iobuf *v9; // eax@6
  char buffer[250]; // [sp+4h] [bp-100h]@1

  v1 = __iob_func();
  fprintf(v1 + 2, "%s", "lua_debug> ");
  v2 = __iob_func();
  fflush(v2 + 2);
  v3 = __iob_func();
  if ( fgets(buffer, 250, v3) )
  {
    do
    {
      if ( !strcmp(buffer, "cont\n") )
        break;
      if ( luaL_loadbufferx(L, buffer, strlen(buffer), "=(debug command)", 0) || lua_pcallk(L, 0, 0, 0, 0, 0) )
      {
        v4 = lua_tolstring(L, -1, 0);
        v5 = __iob_func();
        fprintf(v5 + 2, "%s\n", v4);
        v6 = __iob_func();
        fflush(v6 + 2);
      }
      lua_settop(L, 0);
      v7 = __iob_func();
      fprintf(v7 + 2, "%s", "lua_debug> ");
      v8 = __iob_func();
      fflush(v8 + 2);
      v9 = __iob_func();
    }
    while ( fgets(buffer, 250, v9) );
  }
  return 0;
}

//----- (0074D6F0) --------------------------------------------------------
int __cdecl db_traceback(lua_State *L)
{
  signed int v1; // edi@2
  lua_State *v2; // ebx@2
  int result; // eax@6
  int v4; // eax@7
  const char *msg; // [sp+Ch] [bp-8h]@4
  int idx; // [sp+10h] [bp-4h]@4

  if ( lua_type(L, 1) == 8 )
  {
    v1 = 1;
    v2 = lua_tothread(L, 1);
  }
  else
  {
    v1 = 0;
    v2 = L;
  }
  idx = v1 + 1;
  msg = lua_tolstring(L, v1 + 1, 0);
  if ( msg || lua_type(L, idx) <= 0 )
  {
    v4 = luaL_optinteger(L, v1 + 2, L == v2);
    luaL_traceback(L, v2, msg, v4);
    result = 1;
  }
  else
  {
    lua_pushvalue(L, idx);
    result = 1;
  }
  return result;
}

//----- (0074D7A0) --------------------------------------------------------
int __cdecl luaopen_debug(lua_State *L)
{
  lua_createtable(L, 0, 16);
  luaL_setfuncs(L, dblib, 0);
  return 1;
}

//----- (0074D7D0) --------------------------------------------------------
int __cdecl math_abs(lua_State *L)
{
  double v1; // st7@1

  v1 = luaL_checknumber(L, 1);
  lua_pushnumber(L, fabs(v1));
  return 1;
}

//----- (0074D800) --------------------------------------------------------
int __cdecl math_sin(lua_State *L)
{
  long double v1; // st7@1

  v1 = sin(luaL_checknumber(L, 1));
  lua_pushnumber(L, v1);
  return 1;
}

//----- (0074D830) --------------------------------------------------------
int __cdecl math_sinh(lua_State *L)
{
  long double v1; // st7@1

  v1 = sinh(luaL_checknumber(L, 1));
  lua_pushnumber(L, v1);
  return 1;
}

//----- (0074D860) --------------------------------------------------------
int __cdecl math_cos(lua_State *L)
{
  long double v1; // st7@1

  v1 = cos(luaL_checknumber(L, 1));
  lua_pushnumber(L, v1);
  return 1;
}

//----- (0074D890) --------------------------------------------------------
int __cdecl math_cosh(lua_State *L)
{
  long double v1; // st7@1

  v1 = cosh(luaL_checknumber(L, 1));
  lua_pushnumber(L, v1);
  return 1;
}

//----- (0074D8C0) --------------------------------------------------------
int __cdecl math_tan(lua_State *L)
{
  long double v1; // st7@1

  v1 = tan(luaL_checknumber(L, 1));
  lua_pushnumber(L, v1);
  return 1;
}

//----- (0074D8F0) --------------------------------------------------------
int __cdecl math_tanh(lua_State *L)
{
  long double v1; // st7@1

  v1 = tanh(luaL_checknumber(L, 1));
  lua_pushnumber(L, v1);
  return 1;
}

//----- (0074D920) --------------------------------------------------------
int __cdecl math_asin(lua_State *L)
{
  long double v1; // st7@1

  v1 = asin(luaL_checknumber(L, 1));
  lua_pushnumber(L, v1);
  return 1;
}

//----- (0074D950) --------------------------------------------------------
int __cdecl math_acos(lua_State *L)
{
  long double v1; // st7@1

  v1 = acos(luaL_checknumber(L, 1));
  lua_pushnumber(L, v1);
  return 1;
}

//----- (0074D980) --------------------------------------------------------
int __cdecl math_atan(lua_State *L)
{
  long double v1; // st7@1

  v1 = atan(luaL_checknumber(L, 1));
  lua_pushnumber(L, v1);
  return 1;
}

//----- (0074D9B0) --------------------------------------------------------
int __cdecl math_atan2(lua_State *L)
{
  double v1; // ST14_8@1
  long double v2; // st7@1

  v1 = luaL_checknumber(L, 1);
  v2 = atan2(v1, luaL_checknumber(L, 2));
  lua_pushnumber(L, v2);
  return 1;
}

//----- (0074DA00) --------------------------------------------------------
int __cdecl math_ceil(lua_State *L)
{
  double v1; // st7@1
  double v2; // st7@1

  v1 = luaL_checknumber(L, 1);
  v2 = ceil(v1);
  lua_pushnumber(L, v2);
  return 1;
}

//----- (0074DA30) --------------------------------------------------------
int __cdecl math_floor(lua_State *L)
{
  double v1; // st7@1
  double v2; // st7@1

  v1 = luaL_checknumber(L, 1);
  v2 = floor(v1);
  lua_pushnumber(L, v2);
  return 1;
}

//----- (0074DA60) --------------------------------------------------------
int __cdecl math_fmod(lua_State *L)
{
  double v1; // ST14_8@1
  long double v2; // st7@1

  v1 = luaL_checknumber(L, 1);
  v2 = fmod(v1, luaL_checknumber(L, 2));
  lua_pushnumber(L, v2);
  return 1;
}

//----- (0074DAB0) --------------------------------------------------------
int __cdecl math_modf(lua_State *L)
{
  double v1; // st7@1
  double fp; // ST10_8@1
  double v4; // [sp+18h] [bp-8h]@1

  v1 = luaL_checknumber(L, 1);
  fp = modf(v1, &v4);
  lua_pushnumber(L, v4);
  lua_pushnumber(L, fp);
  return 2;
}

//----- (0074DB00) --------------------------------------------------------
int __cdecl math_sqrt(lua_State *L)
{
  long double v1; // st7@1

  v1 = sqrt(luaL_checknumber(L, 1));
  lua_pushnumber(L, v1);
  return 1;
}

//----- (0074DB30) --------------------------------------------------------
int __cdecl math_pow(lua_State *L)
{
  double x; // ST14_8@1
  long double v2; // st7@1

  x = luaL_checknumber(L, 1);
  v2 = pow(x, luaL_checknumber(L, 2));
  lua_pushnumber(L, v2);
  return 1;
}

//----- (0074DB80) --------------------------------------------------------
int __cdecl math_log(lua_State *L)
{
  long double v1; // st7@2
  long double base; // [sp+Ch] [bp-10h]@3
  long double x; // [sp+14h] [bp-8h]@1

  x = luaL_checknumber(L, 1);
  if ( lua_type(L, 2) > 0 )
  {
    base = luaL_checknumber(L, 2);
    if ( 10.0 == base )
      v1 = log10(x);
    else
      v1 = log(x) / log(base);
  }
  else
  {
    v1 = log(x);
  }
  lua_pushnumber(L, v1);
  return 1;
}

//----- (0074DC10) --------------------------------------------------------
int __cdecl math_exp(lua_State *L)
{
  long double v1; // st7@1

  v1 = exp(luaL_checknumber(L, 1));
  lua_pushnumber(L, v1);
  return 1;
}

//----- (0074DC40) --------------------------------------------------------
int __cdecl math_deg(lua_State *L)
{
  double v1; // st7@1

  v1 = luaL_checknumber(L, 1);
  lua_pushnumber(L, v1 / 0.0174532925199433);
  return 1;
}

//----- (0074DC70) --------------------------------------------------------
int __cdecl math_rad(lua_State *L)
{
  double v1; // st7@1

  v1 = luaL_checknumber(L, 1);
  lua_pushnumber(L, v1 * 0.0174532925199433);
  return 1;
}

//----- (0074DCA0) --------------------------------------------------------
int __cdecl math_frexp(lua_State *L)
{
  double v1; // st7@1
  long double v2; // st7@1
  int e; // [sp+10h] [bp-4h]@1

  v1 = luaL_checknumber(L, 1);
  v2 = frexp(v1, &e);
  lua_pushnumber(L, v2);
  lua_pushinteger(L, e);
  return 2;
}

//----- (0074DCE0) --------------------------------------------------------
int __cdecl math_ldexp(lua_State *L)
{
  double x; // ST14_8@1
  int v2; // eax@1
  long double v3; // st7@1

  x = luaL_checknumber(L, 1);
  v2 = luaL_checkinteger(L, 2);
  v3 = ldexp(x, v2);
  lua_pushnumber(L, v3);
  return 1;
}

//----- (0074DD30) --------------------------------------------------------
int __cdecl math_min(lua_State *L)
{
  int v1; // edi@1
  long double v2; // st7@1
  int i; // esi@1
  double dmin; // [sp+14h] [bp-8h]@1

  v1 = lua_gettop(L);
  v2 = luaL_checknumber(L, 1);
  dmin = v2;
  for ( i = 2; i <= v1; ++i )
  {
    v2 = luaL_checknumber(L, i);
    if ( dmin <= v2 )
      v2 = dmin;
    else
      dmin = v2;
  }
  lua_pushnumber(L, v2);
  return 1;
}

//----- (0074DDA0) --------------------------------------------------------
int __cdecl math_max(lua_State *L)
{
  int v1; // edi@1
  long double v2; // st7@1
  int i; // esi@1
  double dmax; // [sp+14h] [bp-8h]@1

  v1 = lua_gettop(L);
  v2 = luaL_checknumber(L, 1);
  dmax = v2;
  for ( i = 2; i <= v1; ++i )
  {
    v2 = luaL_checknumber(L, i);
    if ( dmax >= v2 )
      v2 = dmax;
    else
      dmax = v2;
  }
  lua_pushnumber(L, v2);
  return 1;
}

//----- (0074DE10) --------------------------------------------------------
int __cdecl math_random(lua_State *L)
{
  int v1; // eax@1
  int v2; // eax@2
  double v3; // st7@5
  long double v4; // st7@7
  double v5; // st7@8
  double r; // [sp+14h] [bp-10h]@1
  double l; // [sp+1Ch] [bp-8h]@5

  r = (double)(rand() % 0x7FFF) / 32767.0;
  v1 = lua_gettop(L);
  if ( v1 )
  {
    v2 = v1 - 1;
    if ( v2 )
    {
      if ( v2 != 1 )
        luaL_error(L, "wrong number of arguments");
      l = luaL_checknumber(L, 1);
      v3 = luaL_checknumber(L, 2);
      if ( v3 < l )
        luaL_argerror(L, 2, "interval is empty");
      v4 = floor((v3 - l + 1.0) * r) + l;
    }
    else
    {
      v5 = luaL_checknumber(L, 1);
      if ( v5 < 1.0 )
        luaL_argerror(L, 1, "interval is empty");
      v4 = floor(v5 * r) + 1.0;
    }
  }
  else
  {
    v4 = r;
  }
  lua_pushnumber(L, v4);
  return 1;
}

//----- (0074DF20) --------------------------------------------------------
int __cdecl math_randomseed(lua_State *L)
{
  unsigned int v1; // eax@1

  v1 = luaL_checkunsigned(L, 1);
  srand(v1);
  rand();
  return 0;
}

//----- (0074DF40) --------------------------------------------------------
int __cdecl luaopen_math(lua_State *L)
{
  lua_createtable(L, 0, 27);
  luaL_setfuncs(L, mathlib, 0);
  lua_pushnumber(L, 3.141592653589793);
  lua_setfield(L, -2, "pi");
  lua_pushnumber(L, _HUGE);
  lua_setfield(L, -2, "huge");
  return 1;
}

//----- (0074DFB0) --------------------------------------------------------
int __cdecl b_and(lua_State *L)
{
  int v1; // edi@1
  int v2; // esi@1
  unsigned int i; // ebx@1
  unsigned int v4; // eax@2

  v1 = lua_gettop(L);
  v2 = 1;
  for ( i = -1; v2 <= v1; i &= v4 )
    v4 = luaL_checkunsigned(L, v2++);
  lua_pushunsigned(L, i);
  return 1;
}

//----- (0074E000) --------------------------------------------------------
int __cdecl b_test(lua_State *L)
{
  int v1; // edi@1
  int v2; // esi@1
  signed int i; // ebx@1
  unsigned int v4; // eax@2

  v1 = lua_gettop(L);
  v2 = 1;
  for ( i = -1; v2 <= v1; i &= v4 )
    v4 = luaL_checkunsigned(L, v2++);
  lua_pushboolean(L, i != 0);
  return 1;
}

//----- (0074E060) --------------------------------------------------------
int __cdecl b_or(lua_State *L)
{
  unsigned int v1; // ebx@1
  int v2; // edi@1
  int i; // esi@1
  unsigned int v4; // eax@2

  v1 = 0;
  v2 = lua_gettop(L);
  for ( i = 1; i <= v2; v1 |= v4 )
    v4 = luaL_checkunsigned(L, i++);
  lua_pushunsigned(L, v1);
  return 1;
}

//----- (0074E0B0) --------------------------------------------------------
int __cdecl b_xor(lua_State *L)
{
  unsigned int v1; // ebx@1
  int v2; // edi@1
  int i; // esi@1
  unsigned int v4; // eax@2

  v1 = 0;
  v2 = lua_gettop(L);
  for ( i = 1; i <= v2; v1 ^= v4 )
    v4 = luaL_checkunsigned(L, i++);
  lua_pushunsigned(L, v1);
  return 1;
}

//----- (0074E100) --------------------------------------------------------
int __cdecl b_not(lua_State *L)
{
  unsigned int v1; // eax@1

  v1 = luaL_checkunsigned(L, 1);
  lua_pushunsigned(L, ~v1);
  return 1;
}

//----- (0074E130) --------------------------------------------------------
int __cdecl b_lshift(lua_State *L)
{
  int v1; // esi@1
  unsigned int v2; // eax@1
  int v3; // esi@2

  v1 = luaL_checkinteger(L, 2);
  v2 = luaL_checkunsigned(L, 1);
  if ( v1 < 0 )
  {
    v3 = -v1;
    if ( v3 < 32 )
    {
      lua_pushunsigned(L, v2 >> v3);
      return 1;
    }
    goto LABEL_5;
  }
  if ( v1 >= 32 )
  {
LABEL_5:
    lua_pushunsigned(L, 0);
    return 1;
  }
  lua_pushunsigned(L, v2 << v1);
  return 1;
}

//----- (0074E1A0) --------------------------------------------------------
int __cdecl b_rshift(lua_State *L)
{
  int v1; // esi@1
  unsigned int v2; // eax@1
  int v3; // esi@1
  int v4; // esi@2

  v1 = luaL_checkinteger(L, 2);
  v2 = luaL_checkunsigned(L, 1);
  v3 = -v1;
  if ( v3 < 0 )
  {
    v4 = -v3;
    if ( v4 < 32 )
    {
      lua_pushunsigned(L, v2 >> v4);
      return 1;
    }
    goto LABEL_5;
  }
  if ( v3 >= 32 )
  {
LABEL_5:
    lua_pushunsigned(L, 0);
    return 1;
  }
  lua_pushunsigned(L, v2 << v3);
  return 1;
}

//----- (0074E210) --------------------------------------------------------
int __cdecl b_arshift(lua_State *L)
{
  unsigned int v1; // esi@1
  int v2; // eax@1
  int result; // eax@4
  int v4; // ecx@6

  v1 = luaL_checkunsigned(L, 1);
  v2 = luaL_checkinteger(L, 2);
  if ( v2 < 0 || (v1 & 0x80000000) == 0 )
  {
    v4 = -v2;
    if ( -v2 >= 0 )
    {
      if ( v4 < 32 )
      {
        lua_pushunsigned(L, v1 << v4);
        return 1;
      }
    }
    else if ( v2 < 32 )
    {
      lua_pushunsigned(L, v1 >> v2);
      return 1;
    }
    lua_pushunsigned(L, 0);
    return 1;
  }
  if ( v2 < 32 )
  {
    lua_pushunsigned(L, ~(0xFFFFFFFF >> v2) | (v1 >> v2));
    result = 1;
  }
  else
  {
    lua_pushunsigned(L, 0xFFFFFFFF);
    result = 1;
  }
  return result;
}

//----- (0074E2C0) --------------------------------------------------------
int __cdecl b_lrot(lua_State *L)
{
  char v1; // si@1
  unsigned int v2; // eax@1

  v1 = luaL_checkinteger(L, 2) & 0x1F;
  v2 = __ROL4__(luaL_checkunsigned(L, 1), v1);
  lua_pushunsigned(L, v2);
  return 1;
}

//----- (0074E300) --------------------------------------------------------
int __cdecl b_rrot(lua_State *L)
{
  int v1; // esi@1
  unsigned int v2; // eax@1

  v1 = -luaL_checkinteger(L, 2) & 0x1F;
  v2 = __ROL4__(luaL_checkunsigned(L, 1), v1);
  lua_pushunsigned(L, v2);
  return 1;
}

//----- (0074E340) --------------------------------------------------------
int __usercall fieldargs@<eax>(lua_State *L@<esi>, int farg@<ebx>, int *width)
{
  int v3; // edi@1
  int v4; // eax@1
  lua_State *v6; // [sp+0h] [bp-14h]@0
  int v7; // [sp+4h] [bp-10h]@0

  v3 = luaL_checkinteger(v6, v7);
  v4 = luaL_optinteger(L, farg + 1, 1);
  if ( v3 < 0 )
    luaL_argerror(L, farg, "field cannot be negative");
  if ( v4 <= 0 )
    luaL_argerror(L, farg + 1, "width must be positive");
  if ( v4 + v3 > 32 )
    luaL_error(L, "trying to access non-existent bits");
  *width = v4;
  return v3;
}

//----- (0074E3D0) --------------------------------------------------------
int __cdecl b_extract(lua_State *L)
{
  unsigned int v1; // edi@1
  char v2; // al@1
  int w; // [sp+Ch] [bp-4h]@1

  v1 = luaL_checkunsigned(L, 1);
  v2 = fieldargs(L, 2, &w);
  lua_pushunsigned(L, (v1 >> v2) & ~(-2 << (w - 1)));
  return 1;
}

//----- (0074E420) --------------------------------------------------------
int __cdecl b_replace(lua_State *L)
{
  unsigned int v1; // edi@1
  unsigned int v; // ST28_4@1
  char v3; // al@1
  int w; // [sp+10h] [bp-4h]@1

  v1 = luaL_checkunsigned(L, 1);
  v = luaL_checkunsigned(L, 2);
  v3 = fieldargs(L, 3, &w);
  lua_pushunsigned(L, ((v & ~(-2 << (w - 1))) << v3) | v1 & ~(~(-2 << (w - 1)) << v3));
  return 1;
}

//----- (0074E490) --------------------------------------------------------
int __cdecl luaopen_bit32(lua_State *L)
{
  lua_createtable(L, 0, 12);
  luaL_setfuncs(L, bitlib, 0);
  return 1;
}

//----- (0074E4C0) --------------------------------------------------------
int __cdecl str_len(lua_State *L)
{
  unsigned int l; // [sp+4h] [bp-4h]@1

  luaL_checklstring(L, 1, &l);
  lua_pushinteger(L, l);
  return 1;
}

//----- (0074E4F0) --------------------------------------------------------
int __cdecl str_sub(lua_State *L)
{
  const char *v1; // eax@1
  unsigned int v2; // esi@1
  int v3; // eax@1
  unsigned int v4; // esi@2
  unsigned int v5; // ebx@6
  unsigned int v6; // eax@6
  int result; // eax@15
  const char *s; // [sp+8h] [bp-8h]@1
  unsigned int l; // [sp+Ch] [bp-4h]@1

  v1 = luaL_checklstring(L, 1, &l);
  v2 = l;
  s = v1;
  v3 = luaL_checkinteger(L, 2);
  if ( v3 < 0 )
  {
    if ( -v3 <= v2 )
      v4 = v3 + v2 + 1;
    else
      v4 = 0;
  }
  else
  {
    v4 = v3;
  }
  v5 = l;
  v6 = luaL_optinteger(L, 3, -1);
  if ( (v6 & 0x80000000) != 0 )
  {
    if ( -v6 <= v5 )
      v6 += v5 + 1;
    else
      v6 = 0;
  }
  if ( v4 < 1 )
    v4 = 1;
  if ( v6 > l )
    v6 = l;
  if ( v4 > v6 )
  {
    lua_pushlstring(L, (const char *)&unk_96F8EB, 0);
    result = 1;
  }
  else
  {
    lua_pushlstring(L, &s[v4 - 1], v6 - v4 + 1);
    result = 1;
  }
  return result;
}

//----- (0074E5B0) --------------------------------------------------------
int __cdecl str_reverse(lua_State *L)
{
  const char *v1; // edi@1
  char *v2; // eax@1
  unsigned int v3; // edx@1
  unsigned int v4; // ecx@1
  unsigned int l; // [sp+8h] [bp-218h]@1
  luaL_Buffer b; // [sp+Ch] [bp-214h]@1

  v1 = luaL_checklstring(L, 1, &l);
  v2 = luaL_buffinitsize(L, &b, l);
  v3 = l;
  v4 = 0;
  if ( l )
  {
    do
    {
      v2[v4] = v1[v3 - v4 - 1];
      v3 = l;
      ++v4;
    }
    while ( v4 < l );
  }
  luaL_pushresultsize(&b, v3);
  return 1;
}

//----- (0074E640) --------------------------------------------------------
int __cdecl str_lower(lua_State *L)
{
  const char *v1; // ebx@1
  char *v2; // eax@1
  unsigned int v3; // ecx@1
  unsigned int v4; // edi@1
  char *v5; // esi@2
  int v6; // ebx@2
  unsigned int l; // [sp+Ch] [bp-218h]@1
  luaL_Buffer b; // [sp+10h] [bp-214h]@1

  v1 = luaL_checklstring(L, 1, &l);
  v2 = luaL_buffinitsize(L, &b, l);
  v3 = l;
  v4 = 0;
  if ( l )
  {
    v5 = v2;
    v6 = v1 - v2;
    do
    {
      *v5 = tolower((unsigned __int8)v5[v6]);
      v3 = l;
      ++v4;
      ++v5;
    }
    while ( v4 < l );
  }
  luaL_pushresultsize(&b, v3);
  return 1;
}

//----- (0074E6E0) --------------------------------------------------------
int __cdecl str_upper(lua_State *L)
{
  const char *v1; // ebx@1
  char *v2; // eax@1
  unsigned int v3; // ecx@1
  unsigned int v4; // edi@1
  char *v5; // esi@2
  int v6; // ebx@2
  unsigned int l; // [sp+Ch] [bp-218h]@1
  luaL_Buffer b; // [sp+10h] [bp-214h]@1

  v1 = luaL_checklstring(L, 1, &l);
  v2 = luaL_buffinitsize(L, &b, l);
  v3 = l;
  v4 = 0;
  if ( l )
  {
    v5 = v2;
    v6 = v1 - v2;
    do
    {
      *v5 = toupper((unsigned __int8)v5[v6]);
      v3 = l;
      ++v4;
      ++v5;
    }
    while ( v4 < l );
  }
  luaL_pushresultsize(&b, v3);
  return 1;
}

//----- (0074E780) --------------------------------------------------------
int __cdecl str_rep(lua_State *L)
{
  signed int v1; // ebx@1
  int result; // eax@2
  unsigned int v3; // edi@5
  char *v4; // esi@5
  int v5; // ebx@6
  char *sep; // [sp+10h] [bp-224h]@1
  char *s; // [sp+14h] [bp-220h]@1
  unsigned int lsep; // [sp+18h] [bp-21Ch]@1
  unsigned int l; // [sp+1Ch] [bp-218h]@1
  luaL_Buffer b; // [sp+20h] [bp-214h]@5

  s = (char *)luaL_checklstring(L, 1, &l);
  v1 = luaL_checkinteger(L, 2);
  sep = (char *)luaL_optlstring(L, 3, (const char *)&unk_96F8EB, &lsep);
  if ( v1 > 0 )
  {
    if ( l + lsep < l || l + lsep >= 0x7FFFFFFFu / v1 )
      luaL_error(L, "resulting string too large");
    v3 = l * v1 + lsep * (v1 - 1);
    v4 = luaL_buffinitsize(L, &b, v3);
    if ( v1 > 1 )
    {
      v5 = v1 - 1;
      do
      {
        memcpy(v4, s, l);
        v4 += l;
        if ( lsep )
        {
          memcpy(v4, sep, lsep);
          v4 += lsep;
        }
        --v5;
      }
      while ( v5 );
    }
    memcpy(v4, s, l);
    luaL_pushresultsize(&b, v3);
    result = 1;
  }
  else
  {
    lua_pushlstring(L, (const char *)&unk_96F8EB, 0);
    result = 1;
  }
  return result;
}

//----- (0074E900) --------------------------------------------------------
int __cdecl str_byte(lua_State *L)
{
  const char *v1; // eax@1
  unsigned int v2; // esi@1
  int v3; // eax@1
  unsigned int v4; // ebx@2
  unsigned int v5; // esi@6
  unsigned int v6; // eax@6
  int result; // eax@15
  int v8; // esi@16
  int v9; // edi@18
  int v10; // ebx@19
  const char *s; // [sp+Ch] [bp-8h]@1
  unsigned int l; // [sp+10h] [bp-4h]@1

  v1 = luaL_checklstring(L, 1, &l);
  v2 = l;
  s = v1;
  v3 = luaL_optinteger(L, 2, 1);
  if ( v3 < 0 )
  {
    if ( -v3 <= v2 )
      v4 = v3 + v2 + 1;
    else
      v4 = 0;
  }
  else
  {
    v4 = v3;
  }
  v5 = l;
  v6 = luaL_optinteger(L, 3, v4);
  if ( (v6 & 0x80000000) != 0 )
  {
    if ( -v6 <= v5 )
      v6 += v5 + 1;
    else
      v6 = 0;
  }
  if ( v4 < 1 )
    v4 = 1;
  if ( v6 > l )
    v6 = l;
  if ( v4 <= v6 )
  {
    v8 = v6 - v4 + 1;
    if ( v8 + v4 <= v6 )
      luaL_error(L, "string slice too long");
    luaL_checkstack(L, v6 - v4 + 1, "string slice too long");
    v9 = 0;
    if ( v8 > 0 )
    {
      v10 = (int)&s[v4 - 1];
      do
        lua_pushinteger(L, *(_BYTE *)(v10 + v9++));
      while ( v9 < v8 );
    }
    result = v8;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (0074E9E0) --------------------------------------------------------
int __cdecl str_char(lua_State *L)
{
  signed int v1; // ebx@1
  int v2; // esi@1
  int v3; // eax@2
  char *p; // [sp+Ch] [bp-21Ch]@1
  luaL_Buffer b; // [sp+14h] [bp-214h]@1

  v1 = lua_gettop(L);
  v2 = 1;
  for ( p = luaL_buffinitsize(L, &b, v1); v2 <= v1; ++v2 )
  {
    v3 = luaL_checkinteger(L, v2);
    if ( (unsigned __int8)v3 != v3 )
      luaL_argerror(L, v2, "value out of range");
    p[v2 - 1] = v3;
  }
  luaL_pushresultsize(&b, v1);
  return 1;
}

//----- (0074EA90) --------------------------------------------------------
int __cdecl writer(lua_State *L, const void *b, unsigned int size, void *B)
{
  luaL_addlstring((luaL_Buffer *)B, (const char *)b, size);
  return 0;
}

//----- (0074EAB0) --------------------------------------------------------
int __cdecl str_dump(lua_State *L)
{
  luaL_Buffer b; // [sp+4h] [bp-214h]@1

  luaL_checktype(L, 1, 6);
  lua_settop(L, 1);
  luaL_buffinit(L, &b);
  if ( lua_dump(L, writer, &b) )
    luaL_error(L, "unable to dump given function");
  luaL_pushresult(&b);
  return 1;
}

//----- (0074EB40) --------------------------------------------------------
const char *__usercall classend@<eax>(MatchState *ms@<edi>, const char *p@<eax>)
{
  const char *v2; // esi@1
  int v3; // eax@1
  const char *v4; // esi@1
  const char *result; // eax@3
  char v6; // cl@8

  v2 = p;
  v3 = *p;
  v4 = v2 + 1;
  if ( v3 == 37 )
  {
    if ( v4 == ms->p_end )
      luaL_error(ms->L, "malformed pattern (ends with '%%')");
    result = v4 + 1;
  }
  else if ( v3 == 91 )
  {
    if ( *v4 == 94 )
      ++v4;
    do
    {
      if ( v4 == ms->p_end )
        luaL_error(ms->L, "malformed pattern (missing ']')");
      v6 = *v4++;
      if ( v6 == 37 && v4 < ms->p_end )
        ++v4;
    }
    while ( *v4 != 93 );
    result = v4 + 1;
  }
  else
  {
    result = v4;
  }
  return result;
}

//----- (0074EBB0) --------------------------------------------------------
int __usercall match_class@<eax>(int c@<eax>, int cl@<edi>)
{
  int v2; // esi@1
  int v3; // esi@2
  int result; // eax@14
  int v5; // [sp+0h] [bp-8h]@0

  v2 = c;
  switch ( tolower(v5) )
  {
    case 97:
      v3 = isalpha(v2);
      goto LABEL_13;
    case 99:
      v3 = iscntrl(v2);
      goto LABEL_13;
    case 100:
      v3 = isdigit(v2);
      goto LABEL_13;
    case 103:
      v3 = isgraph(v2);
      goto LABEL_13;
    case 108:
      v3 = islower(v2);
      goto LABEL_13;
    case 112:
      v3 = ispunct(v2);
      goto LABEL_13;
    case 115:
      v3 = isspace(v2);
      goto LABEL_13;
    case 117:
      v3 = isupper(v2);
      goto LABEL_13;
    case 119:
      v3 = isalnum(v2);
      goto LABEL_13;
    case 120:
      v3 = isxdigit(v2);
      goto LABEL_13;
    case 122:
      v3 = v2 == 0;
LABEL_13:
      if ( islower(cl) )
        result = v3;
      else
        result = v3 == 0;
      break;
    default:
      result = cl == v2;
      break;
  }
  return result;
}

//----- (0074ECD0) --------------------------------------------------------
int __usercall matchbracketclass@<eax>(int c@<ebx>, const char *p@<eax>, const char *ec)
{
  const char *v3; // edi@1
  const char *v4; // edx@3
  unsigned int v5; // edi@3
  unsigned int v6; // eax@4
  int v7; // esi@6
  int v8; // esi@7
  int v9; // ecx@25
  int v11; // [sp+8h] [bp-Ch]@6
  int v12; // [sp+Ch] [bp-8h]@6
  int sig; // [sp+10h] [bp-4h]@1

  v3 = p;
  sig = 1;
  if ( p[1] == 94 )
  {
    sig = 0;
    v3 = p + 1;
  }
  v4 = ec;
  v5 = (unsigned int)(v3 + 1);
  if ( v5 < (unsigned int)ec )
  {
    v6 = v5 + 2;
    do
    {
      if ( *(_BYTE *)v5 == 37 )
      {
        v7 = *(_BYTE *)(v5++ + 1);
        v11 = v6 + 1;
        v12 = v7;
        switch ( tolower(v7) )
        {
          case 97:
            v8 = isalpha(c);
            goto LABEL_18;
          case 99:
            v8 = iscntrl(c);
            goto LABEL_18;
          case 100:
            v8 = isdigit(c);
            goto LABEL_18;
          case 103:
            v8 = isgraph(c);
            goto LABEL_18;
          case 108:
            v8 = islower(c);
            goto LABEL_18;
          case 112:
            v8 = ispunct(c);
            goto LABEL_18;
          case 115:
            v8 = isspace(c);
            goto LABEL_18;
          case 117:
            v8 = isupper(c);
            goto LABEL_18;
          case 119:
            v8 = isalnum(c);
            goto LABEL_18;
          case 120:
            v8 = isxdigit(c);
            goto LABEL_18;
          case 122:
            v8 = c == 0;
LABEL_18:
            if ( !islower(v12) )
              v8 = v8 == 0;
            break;
          default:
            v8 = v7 == c;
            break;
        }
        if ( v8 )
          return sig;
        v6 = v11;
        v4 = ec;
      }
      else if ( *(_BYTE *)(v5 + 1) != 45 || v6 >= (unsigned int)v4 )
      {
        if ( *(_BYTE *)v5 == c )
          return sig;
      }
      else
      {
        v9 = *(_BYTE *)v5;
        v5 += 2;
        v6 += 2;
        if ( v9 <= c && c <= *(_BYTE *)v5 )
          return sig;
      }
      ++v5;
      ++v6;
    }
    while ( v5 < (unsigned int)v4 );
  }
  return sig == 0;
}

//----- (0074EE90) --------------------------------------------------------
const char *__usercall matchbalance@<eax>(MatchState *ms@<ebx>, const char *s@<ecx>, const char *p@<eax>)
{
  const char *v3; // esi@1
  const char *v4; // ecx@4
  const char *v5; // esi@4
  int v6; // edx@4
  signed int i; // edi@4
  int v8; // eax@5
  int b; // [sp+8h] [bp-4h]@4

  v3 = s;
  if ( p >= ms->p_end - 1 )
    luaL_error(ms->L, "malformed pattern (missing arguments to '%%b')");
  if ( *s == *p )
  {
    v4 = ms->src_end;
    v5 = v3 + 1;
    b = *p;
    v6 = p[1];
    for ( i = 1; v5 < v4; ++v5 )
    {
      v8 = *v5;
      if ( v8 == v6 )
      {
        if ( !--i )
          return v5 + 1;
      }
      else if ( v8 == b )
      {
        ++i;
      }
    }
  }
  return 0;
}

//----- (0074EF00) --------------------------------------------------------
const char *__cdecl max_expand(MatchState *ms, const char *s, const char *p, const char *ep)
{
  const char *v4; // esi@1
  char v5; // al@3
  int v6; // ebx@3
  int v7; // eax@6
  const char *result; // eax@12
  int i; // [sp+Ch] [bp-4h]@1

  v4 = s;
  i = 0;
  while ( v4 < ms->src_end )
  {
    v5 = *p;
    v6 = *v4;
    if ( *p == 37 )
    {
      v7 = match_class(*v4, p[1]);
    }
    else
    {
      if ( v5 == 46 )
        goto LABEL_10;
      if ( v5 == 91 )
        v7 = matchbracketclass(v6, p, ep - 1);
      else
        v7 = (unsigned __int8)v5 == v6;
    }
    if ( !v7 )
      break;
LABEL_10:
    ++i;
    ++v4;
  }
  if ( i < 0 )
  {
LABEL_14:
    result = 0;
  }
  else
  {
    while ( 1 )
    {
      result = match(ms, &s[i], ep + 1);
      if ( result )
        break;
      if ( --i < 0 )
        goto LABEL_14;
    }
  }
  return result;
}

//----- (0074EFA0) --------------------------------------------------------
const char *__usercall min_expand@<eax>(const char *s@<eax>, MatchState *ms, const char *p, const char *ep)
{
  const char *v4; // ebx@1
  MatchState *v5; // edi@1
  const char *v6; // esi@1
  const char *result; // eax@1
  char v8; // al@3
  int v9; // ecx@3
  int v10; // eax@6

  v4 = ep;
  v5 = ms;
  v6 = s;
  for ( result = match(ms, s, ep + 1); !result; result = match(v5, ++v6, v4 + 1) )
  {
    if ( v6 >= v5->src_end )
      return 0;
    v8 = *p;
    v9 = *v6;
    if ( *p == 37 )
    {
      v10 = match_class(*v6, p[1]);
    }
    else
    {
      if ( v8 == 46 )
        continue;
      if ( v8 == 91 )
      {
        v10 = matchbracketclass(v9, p, v4 - 1);
        v4 = ep;
      }
      else
      {
        v10 = (unsigned __int8)v8 == v9;
      }
    }
    if ( !v10 )
      return 0;
    v5 = ms;
  }
  return result;
}

//----- (0074F030) --------------------------------------------------------
const char *__usercall start_capture@<eax>(MatchState *ms@<esi>, const char *s@<ebx>, const char *p, int what)
{
  int v4; // edi@1
  const char *result; // eax@3

  v4 = ms->level;
  if ( v4 >= 32 )
    luaL_error(ms->L, "too many captures");
  ms->capture[v4].init = s;
  ms->capture[v4].len = what;
  ms->level = v4 + 1;
  result = match(ms, s, p);
  if ( !result )
    --ms->level;
  return result;
}

//----- (0074F080) --------------------------------------------------------
const char *__usercall end_capture@<eax>(MatchState *ms@<esi>, const char *s@<ebx>, const char *p)
{
  int v3; // eax@1
  char *v4; // ecx@2
  int v5; // edi@6
  const char *result; // eax@6

  v3 = ms->level - 1;
  if ( v3 < 0 )
LABEL_5:
    luaL_error(ms->L, "invalid pattern capture");
  v4 = (char *)&ms->capture[v3].len;
  while ( *(_DWORD *)v4 != -1 )
  {
    v4 -= 8;
    if ( --v3 < 0 )
      goto LABEL_5;
  }
  v5 = v3;
  ms->capture[v3].len = s - ms->capture[v3].init;
  result = match(ms, s, p);
  if ( !result )
    ms->capture[v5].len = -1;
  return result;
}

//----- (0074F0E0) --------------------------------------------------------
const char *__usercall match_capture@<eax>(MatchState *ms@<ecx>, const char *s@<ebx>, int l@<eax>)
{
  int v3; // eax@1
  unsigned int v4; // edi@5
  const char *v5; // esi@6
  unsigned int v6; // ecx@6
  const char *v7; // edx@6

  v3 = l - 49;
  if ( v3 < 0 || v3 >= ms->level || ms->capture[v3].len == -1 )
    luaL_error(ms->L, "invalid capture index %%%d", v3 + 1);
  v4 = ms->capture[v3].len;
  if ( (const char *)(ms->src_end - s) >= (const char *)v4 )
  {
    v5 = ms->capture[v3].init;
    v6 = ms->capture[v3].len;
    v7 = s;
    if ( v4 < 4 )
    {
LABEL_9:
      if ( !v6 || *v7 == *v5 && (v6 <= 1 || v7[1] == v5[1] && (v6 <= 2 || v7[2] == v5[2])) )
        return &s[v4];
    }
    else
    {
      while ( *(_DWORD *)v5 == *(_DWORD *)v7 )
      {
        v6 -= 4;
        v7 += 4;
        v5 += 4;
        if ( v6 < 4 )
          goto LABEL_9;
      }
    }
  }
  return 0;
}

//----- (0074F170) --------------------------------------------------------
const char *__cdecl match(MatchState *ms, const char *s, const char *p)
{
  MatchState *v3; // edi@1
  int v4; // eax@1
  const char *v5; // esi@3
  const char *v6; // eax@6
  const char *v7; // ecx@6
  MatchState *v8; // edi@6
  const char *v9; // ebx@6
  char v10; // al@7
  int v11; // edx@7
  int v12; // eax@10
  const char *v13; // esi@14
  const char *v14; // eax@16
  unsigned __int8 v15; // cl@17
  const char *v16; // edi@19
  char v17; // al@27
  const char *v18; // eax@33
  const char *result; // eax@38
  signed int v20; // ecx@44
  const char *v21; // [sp-Ch] [bp-14h]@40
  int v22; // [sp-8h] [bp-10h]@40
  const char *ep; // [sp+18h] [bp+10h]@6
  const char *epa; // [sp+18h] [bp+10h]@16

  v3 = ms;
  v4 = ms->matchdepth--;
  if ( !v4 )
    luaL_error(ms->L, "pattern too complex");
  v5 = p;
  if ( p == ms->p_end )
  {
LABEL_51:
    ++v3->matchdepth;
    return s;
  }
  while ( 2 )
  {
    switch ( *v5 )
    {
      case 36:
        if ( v5 + 1 != v3->p_end )
          goto dflt;
        v20 = s != v3->src_end ? 0 : (unsigned int)s;
        ++v3->matchdepth;
        return (const char *)v20;
      default:
dflt:
        v6 = classend(v3, v5);
        v7 = s;
        v8 = ms;
        v9 = v6;
        ep = v6;
        if ( s >= ms->src_end )
          goto LABEL_27;
        v10 = *v5;
        v11 = *s;
        if ( *v5 == 37 )
        {
          v12 = match_class(*s, v5[1]);
        }
        else
        {
          if ( v10 == 46 )
          {
LABEL_32:
            switch ( *v9 )
            {
              case 63:
                v18 = match(v8, v7 + 1, ++v9);
                if ( !v18 )
                  goto LABEL_36;
                goto LABEL_49;
              default:
                s = v7 + 1;
LABEL_36:
                v5 = v9;
                goto LABEL_37;
              case 43:
                ++v7;
                goto $LN63_19;
              case 42:
$LN63_19:
                result = max_expand(v8, v7, v5, v9);
                ++ms->matchdepth;
                return result;
              case 45:
                v18 = min_expand(v7, v8, v5, v9);
LABEL_49:
                s = v18;
                break;
            }
LABEL_50:
            v3 = ms;
            goto LABEL_51;
          }
          if ( v10 == 91 )
          {
            v12 = matchbracketclass(v11, v5, v9 - 1);
            v9 = ep;
          }
          else
          {
            v12 = (unsigned __int8)v10 == v11;
          }
        }
        v7 = s;
        if ( v12 )
        {
          v8 = ms;
          goto LABEL_32;
        }
LABEL_27:
        v17 = *v9;
        if ( *v9 == 42 || v17 == 63 || v17 == 45 )
        {
          v5 = v9 + 1;
          goto LABEL_37;
        }
LABEL_45:
        ++ms->matchdepth;
        return 0;
      case 37:
        switch ( v5[1] )
        {
          default:
            goto dflt;
          case 98:
            s = matchbalance(v3, s, v5 + 2);
            if ( !s )
              goto LABEL_50;
            v5 += 4;
            break;
          case 102:
            v13 = v5 + 2;
            if ( *v13 != 91 )
              luaL_error(v3->L, "missing '[' after '%%f' in pattern");
            v14 = classend(v3, v13);
            epa = v14;
            if ( s == ms->src_init )
              v15 = 0;
            else
              v15 = *(s - 1);
            v16 = v14 - 1;
            if ( matchbracketclass(v15, v13, v14 - 1) || !matchbracketclass(*s, v13, v16) )
              goto LABEL_45;
            v5 = epa;
            break;
          case 48:
          case 49:
          case 50:
          case 51:
          case 52:
          case 53:
          case 54:
          case 55:
          case 56:
          case 57:
            s = match_capture(ms, s, v5[1]);
            if ( !s )
              goto LABEL_50;
            v5 += 2;
            break;
        }
LABEL_37:
        v3 = ms;
        if ( v5 != ms->p_end )
          continue;
        ++ms->matchdepth;
        return s;
      case 40:
        if ( v5[1] == 41 )
        {
          v22 = -2;
          v21 = v5 + 2;
        }
        else
        {
          v22 = -1;
          v21 = v5 + 1;
        }
        result = start_capture(ms, s, v21, v22);
        ++ms->matchdepth;
        return result;
      case 41:
        result = end_capture(ms, s, v5 + 1);
        ++ms->matchdepth;
        return result;
    }
  }
}

//----- (0074F4A0) --------------------------------------------------------
const char *__usercall lmemfind@<eax>(unsigned int l2@<eax>, const char *s1, unsigned int l1, const char *s2)
{
  const char *result; // eax@2
  unsigned int v5; // ebx@5
  const char *v6; // edi@7
  const char *v7; // edx@7
  unsigned int v8; // ecx@7
  const char *v9; // esi@7
  bool v10; // zf@16
  unsigned int l1a; // [sp+10h] [bp+Ch]@5

  if ( l2 )
  {
    if ( l2 <= l1 )
    {
      v5 = l2 - 1;
      l1a = l1 - (l2 - 1);
      if ( l1a )
      {
        do
        {
          memchr((char *)s1, *s2, l1a);
          if ( !result )
            break;
          v6 = result + 1;
          v7 = s2 + 1;
          v8 = v5;
          v9 = result + 1;
          if ( v5 < 4 )
          {
LABEL_10:
            if ( !v8 || *v7 == *v9 && (v8 <= 1 || v7[1] == v9[1] && (v8 <= 2 || v7[2] == v9[2])) )
              return result;
          }
          else
          {
            while ( *(_DWORD *)v9 == *(_DWORD *)v7 )
            {
              v8 -= 4;
              v7 += 4;
              v9 += 4;
              if ( v8 < 4 )
                goto LABEL_10;
            }
          }
          v10 = s1 - v6 + l1a == 0;
          l1a += s1 - v6;
          s1 = result + 1;
        }
        while ( !v10 );
      }
      result = 0;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = s1;
  }
  return result;
}

//----- (0074F550) --------------------------------------------------------
void __usercall push_onecapture(MatchState *ms@<esi>, int i@<edi>, const char *s@<ecx>, const char *e@<eax>)
{
  int v4; // ebx@5

  if ( i < ms->level )
  {
    v4 = ms->capture[i].len;
    if ( v4 == -1 )
      luaL_error(ms->L, "unfinished capture");
    if ( v4 == -2 )
      lua_pushinteger(ms->L, ms->capture[i].init - ms->src_init + 1);
    else
      lua_pushlstring(ms->L, ms->capture[i].init, ms->capture[i].len);
  }
  else
  {
    if ( i )
      luaL_error(ms->L, "invalid capture index");
    lua_pushlstring(ms->L, s, e - s);
  }
}

//----- (0074F5D0) --------------------------------------------------------
int __usercall push_captures@<eax>(MatchState *ms@<esi>, const char *s, const char *e)
{
  signed int v3; // ebx@3
  int i; // edi@5
  int v5; // ebx@10
  signed int nlevels; // [sp+8h] [bp-4h]@3

  if ( ms->level || !s )
  {
    nlevels = ms->level;
    v3 = ms->level;
  }
  else
  {
    v3 = 1;
    nlevels = 1;
  }
  luaL_checkstack(ms->L, v3, "too many captures");
  for ( i = 0; i < v3; ++i )
  {
    if ( i < ms->level )
    {
      v5 = ms->capture[i].len;
      if ( v5 == -1 )
        luaL_error(ms->L, "unfinished capture");
      if ( v5 == -2 )
      {
        lua_pushinteger(ms->L, ms->capture[i].init - ms->src_init + 1);
        v3 = nlevels;
      }
      else
      {
        lua_pushlstring(ms->L, ms->capture[i].init, ms->capture[i].len);
        v3 = nlevels;
      }
    }
    else
    {
      if ( i )
        luaL_error(ms->L, "invalid capture index");
      lua_pushlstring(ms->L, s, e - s);
    }
  }
  return v3;
}

//----- (0074F6A0) --------------------------------------------------------
int __usercall nospecials@<eax>(unsigned int l@<ebx>, const char *p)
{
  unsigned int v2; // esi@1
  int v3; // eax@2

  v2 = 0;
  while ( 1 )
  {
    strpbrk((char *)&p[v2], "^$*+?.([%-");
    if ( v3 )
      break;
    v2 += strlen(&p[v2]) + 1;
    if ( v2 > l )
      return 1;
  }
  return 0;
}

//----- (0074F6F0) --------------------------------------------------------
int __cdecl str_find_aux(int find)
{
  lua_State *L; // ecx@0
  lua_State *v2; // esi@1
  const char *v3; // eax@1
  unsigned int v4; // ebx@1
  const char *v5; // edi@1
  int v6; // eax@1
  unsigned int v7; // ebx@2
  int v8; // eax@10
  const char *v9; // eax@11
  int v10; // edi@12
  int result; // eax@12
  const char *v12; // ebx@13
  const char *v13; // eax@16
  const char *v14; // edi@16
  const char *v15; // edx@17
  const char *p; // [sp+Ch] [bp-130h]@1
  unsigned int ls; // [sp+10h] [bp-12Ch]@1
  unsigned int lp; // [sp+14h] [bp-128h]@1
  const char *s; // [sp+18h] [bp-124h]@1
  int anchor; // [sp+1Ch] [bp-120h]@2
  MatchState ms; // [sp+20h] [bp-11Ch]@15

  v2 = L;
  s = luaL_checklstring(L, 1, &ls);
  v3 = luaL_checklstring(v2, 2, &lp);
  v4 = ls;
  v5 = v3;
  p = v3;
  v6 = luaL_optinteger(v2, 3, 1);
  if ( v6 < 0 )
  {
    if ( -v6 > v4 )
    {
LABEL_6:
      anchor = 1;
      v7 = 1;
      goto LABEL_8;
    }
    anchor = v6 + v4 + 1;
    v7 = v6 + v4 + 1;
  }
  else
  {
    v7 = v6;
    anchor = v6;
  }
  if ( v7 < 1 )
    goto LABEL_6;
  if ( v7 > ls + 1 )
  {
LABEL_23:
    lua_pushnil(v2);
    return 1;
  }
LABEL_8:
  if ( find )
  {
    if ( lua_toboolean(v2, 4) || (v8 = nospecials(lp, v5), v7 = anchor, v8) )
    {
      v9 = lmemfind(lp, &s[v7 - 1], ls - v7 + 1, v5);
      if ( v9 )
      {
        v10 = v9 - s;
        lua_pushinteger(v2, v9 - s + 1);
        lua_pushinteger(v2, lp + v10);
        return 2;
      }
      goto LABEL_23;
    }
  }
  v12 = &s[v7 - 1];
  anchor = *v5 == 94;
  if ( anchor )
  {
    ++v5;
    --lp;
    p = v5;
  }
  ms.src_init = s;
  ms.L = v2;
  ms.matchdepth = 200;
  ms.src_end = &s[ls];
  ms.p_end = &v5[lp];
  while ( 1 )
  {
    ms.level = 0;
    v13 = match(&ms, v12, v5);
    v14 = v13;
    if ( v13 )
      break;
    v15 = v12++;
    if ( v15 >= ms.src_end || anchor )
      goto LABEL_23;
    v5 = p;
  }
  if ( find )
  {
    lua_pushinteger(v2, v12 - s + 1);
    lua_pushinteger(v2, v14 - s);
    result = push_captures(&ms, 0, 0) + 2;
  }
  else
  {
    result = push_captures(&ms, v12, v13);
  }
  return result;
}

//----- (0074F950) --------------------------------------------------------
int __cdecl str_find()
{
  return str_find_aux(1);
}

//----- (0074F970) --------------------------------------------------------
int __cdecl str_match()
{
  return str_find_aux(0);
}

//----- (0074F990) --------------------------------------------------------
int __cdecl gmatch_aux(lua_State *L)
{
  const char *v1; // ebx@1
  const char *v2; // esi@1
  const char *v3; // eax@2
  int result; // eax@4
  int v5; // ecx@5
  unsigned int lp; // [sp+Ch] [bp-12Ch]@1
  unsigned int ls; // [sp+10h] [bp-128h]@1
  const char *e; // [sp+14h] [bp-124h]@2
  const char *p; // [sp+18h] [bp-120h]@1
  MatchState ms; // [sp+1Ch] [bp-11Ch]@1

  v1 = lua_tolstring(L, -1001001, &ls);
  p = lua_tolstring(L, -1001002, &lp);
  ms.L = L;
  ms.matchdepth = 200;
  ms.src_init = v1;
  ms.src_end = &v1[ls];
  ms.p_end = &p[lp];
  v2 = &v1[lua_tointegerx(L, -1001003, 0)];
  if ( v2 > ms.src_end )
  {
LABEL_4:
    result = 0;
  }
  else
  {
    while ( 1 )
    {
      ms.level = 0;
      v3 = match(&ms, v2, p);
      e = v3;
      if ( v3 )
        break;
      if ( ++v2 > ms.src_end )
        goto LABEL_4;
    }
    v5 = v3 - v1;
    if ( v3 == v2 )
      ++v5;
    lua_pushinteger(L, v5);
    lua_replace(L, -1001003);
    result = push_captures(&ms, v2, e);
  }
  return result;
}

//----- (0074FAB0) --------------------------------------------------------
int __cdecl gmatch(lua_State *L)
{
  luaL_checklstring(L, 1, 0);
  luaL_checklstring(L, 2, 0);
  lua_settop(L, 2);
  lua_pushinteger(L, 0);
  lua_pushcclosure(L, gmatch_aux, 3);
  return 1;
}

//----- (0074FB00) --------------------------------------------------------
void __usercall add_s(luaL_Buffer *b@<ebx>, MatchState *ms, const char *s, const char *e)
{
  unsigned int v4; // edi@1
  const char *v5; // esi@1
  int v6; // ecx@6
  char v7; // al@12
  const char *news; // [sp+Ch] [bp-8h]@1
  unsigned int l; // [sp+10h] [bp-4h]@1

  v4 = 0;
  v5 = lua_tolstring(ms->L, 3, &l);
  news = v5;
  if ( l )
  {
    do
    {
      if ( v5[v4] == 37 )
      {
        v6 = v5[v4++ + 1];
        if ( isdigit(v6) )
        {
          v7 = v5[v4];
          if ( v7 == 48 )
          {
            luaL_addlstring(b, s, e - s);
          }
          else
          {
            push_onecapture(ms, v7 - 49, s, e);
            luaL_addvalue(b);
            v5 = news;
          }
        }
        else
        {
          if ( v5[v4] != 37 )
            luaL_error(ms->L, "invalid use of '%c' in replacement string", 37);
          if ( b->n >= b->size )
            luaL_prepbuffsize(b, 1u);
          b->b[b->n++] = v5[v4];
        }
      }
      else
      {
        if ( b->n >= b->size )
          luaL_prepbuffsize(b, 1u);
        b->b[b->n++] = v5[v4];
      }
      ++v4;
    }
    while ( v4 < l );
  }
}

//----- (0074FC00) --------------------------------------------------------
void __usercall add_value(MatchState *ms@<edx>, const char *e@<ecx>, int tr@<eax>, luaL_Buffer *b, const char *s)
{
  int v5; // eax@1
  MatchState *v6; // esi@1
  lua_State *v7; // edi@1
  const char *v8; // ebx@1
  int v9; // eax@4
  int v10; // eax@7
  int v11; // eax@16
  char *v12; // eax@16

  v5 = tr - 5;
  v6 = ms;
  v7 = ms->L;
  v8 = e;
  if ( v5 )
  {
    if ( v5 != 1 )
    {
      add_s(b, ms, s, e);
      return;
    }
    lua_pushvalue(v7, 3);
    v9 = push_captures(v6, s, v8);
    lua_callk(v7, v9, 1, 0, 0);
  }
  else
  {
    if ( ms->level > 0 )
    {
      v10 = ms->capture[0].len;
      if ( v10 == -1 )
        luaL_error(v7, "unfinished capture");
      if ( v10 == -2 )
        lua_pushinteger(v7, ms->capture[0].init - ms->src_init + 1);
      else
        lua_pushlstring(ms->L, ms->capture[0].init, v10);
    }
    else
    {
      lua_pushlstring(v7, s, e - s);
    }
    lua_gettable(v7, 3);
  }
  if ( lua_toboolean(v7, -1) )
  {
    if ( !lua_isstring(v7, -1) )
    {
      v11 = lua_type(v7, -1);
      v12 = lua_typename(v7, v11);
      luaL_error(v7, "invalid replacement value (a %s)", v12);
    }
    luaL_addvalue(b);
  }
  else
  {
    lua_settop(v7, -2);
    lua_pushlstring(v7, s, v8 - s);
    luaL_addvalue(b);
  }
}

//----- (0074FD30) --------------------------------------------------------
int __cdecl str_gsub(lua_State *L)
{
  const char *v1; // esi@1
  const char *v2; // ebx@1
  bool v3; // zf@1
  const char *v4; // eax@8
  const char *v5; // ebx@11
  unsigned int srcl; // [sp+Ch] [bp-348h]@1
  int anchor; // [sp+10h] [bp-344h]@1
  const char *p; // [sp+14h] [bp-340h]@1
  unsigned int max_s; // [sp+18h] [bp-33Ch]@1
  int tr; // [sp+1Ch] [bp-338h]@1
  unsigned int lp; // [sp+20h] [bp-334h]@1
  unsigned int n; // [sp+24h] [bp-330h]@1
  luaL_Buffer b; // [sp+28h] [bp-32Ch]@6
  MatchState ms; // [sp+238h] [bp-11Ch]@8

  v1 = luaL_checklstring(L, 1, &srcl);
  v2 = luaL_checklstring(L, 2, &lp);
  p = v2;
  tr = lua_type(L, 3);
  max_s = luaL_optinteger(L, 4, srcl + 1);
  v3 = *v2 == 94;
  n = 0;
  anchor = v3;
  if ( tr != 3 && tr != 4 && tr != 6 && tr != 5 )
    luaL_argerror(L, 3, "string/function/table expected");
  luaL_buffinit(L, &b);
  if ( anchor )
  {
    ++v2;
    --lp;
    p = v2;
  }
  v4 = &v1[srcl];
  ms.L = L;
  ms.matchdepth = 200;
  ms.src_init = v1;
  ms.src_end = &v1[srcl];
  ms.p_end = &v2[lp];
  if ( max_s )
  {
    while ( 1 )
    {
      ms.level = 0;
      v5 = match(&ms, v1, v2);
      if ( v5 && (++n, add_value(&ms, v5, tr, &b, v1), v5 > v1) )
      {
        v1 = v5;
      }
      else
      {
        v4 = ms.src_end;
        if ( v1 >= ms.src_end )
          goto LABEL_21;
        if ( b.n >= b.size )
          luaL_prepbuffsize(&b, 1u);
        b.b[b.n++] = *v1++;
      }
      if ( anchor || n >= max_s )
        break;
      v2 = p;
    }
    v4 = ms.src_end;
  }
LABEL_21:
  luaL_addlstring(&b, v1, v4 - v1);
  luaL_pushresult(&b);
  lua_pushinteger(L, n);
  return 2;
}

//----- (0074FF40) --------------------------------------------------------
void __usercall addquoted(luaL_Buffer *b@<esi>, int arg@<ecx>, lua_State *L)
{
  const char *v3; // edi@1
  char v4; // al@4
  bool v5; // cf@9
  unsigned int v6; // edx@21
  unsigned int l; // [sp+8h] [bp-14h]@1
  char buff[10]; // [sp+Ch] [bp-10h]@11

  v3 = luaL_checklstring(L, arg, &l);
  if ( b->n >= b->size )
    luaL_prepbuffsize(b, 1u);
  b->b[b->n++] = 34;
  if ( l )
  {
    while ( 1 )
    {
      --l;
      v4 = *v3;
      if ( *v3 == 34 || v4 == 92 || v4 == 10 )
        break;
      if ( v4 && !iscntrl((unsigned __int8)v4) )
      {
        v5 = b->n < b->size;
LABEL_17:
        if ( !v5 )
          luaL_prepbuffsize(b, 1u);
        b->b[b->n++] = *v3;
        goto LABEL_20;
      }
      if ( isdigit(v3[1]) )
        sprintf(buff, "\\%03d", *v3);
      else
        sprintf(buff, "\\%d", *v3);
      luaL_addstring(b, buff);
LABEL_20:
      ++v3;
      if ( !l )
        goto LABEL_21;
    }
    if ( b->n >= b->size )
      luaL_prepbuffsize(b, 1u);
    b->b[b->n++] = 92;
    v5 = b->n < b->size;
    goto LABEL_17;
  }
LABEL_21:
  v6 = b->n;
  --l;
  if ( v6 >= b->size )
    luaL_prepbuffsize(b, 1u);
  b->b[b->n++] = 34;
}

//----- (00750080) --------------------------------------------------------
char *__usercall scanformat@<eax>(lua_State *L@<eax>, const char *strfrmt@<ebx>, char *form)
{
  lua_State *v3; // edi@1
  char *v4; // esi@1
  int v5; // eax@2
  int v6; // ecx@11
  char *forma; // [sp+10h] [bp+8h]@17

  v3 = L;
  v4 = (char *)strfrmt;
  if ( *strfrmt )
  {
    do
    {
      strchr("-+ #0", *v4);
      if ( !v5 )
        break;
      ++v4;
    }
    while ( *v4 );
  }
  if ( (unsigned int)(v4 - strfrmt) >= 6 )
    luaL_error(v3, "invalid format (repeated flags)");
  if ( isdigit((unsigned __int8)*v4) )
    ++v4;
  if ( isdigit((unsigned __int8)*v4) )
    ++v4;
  if ( *v4 == 46 )
  {
    v6 = (unsigned __int8)(v4++)[1];
    if ( isdigit(v6) )
      ++v4;
    if ( isdigit((unsigned __int8)*v4) )
      ++v4;
  }
  if ( isdigit((unsigned __int8)*v4) )
    luaL_error(v3, "invalid format (width or precision too long)");
  *form = 37;
  forma = form + 1;
  memcpy(forma, (char *)strfrmt, v4 - strfrmt + 1);
  forma[v4 - strfrmt + 1] = 0;
  return v4;
}

//----- (00750160) --------------------------------------------------------
void __cdecl addlenmod(char *form)
{
  const char *lenmod; // ecx@0
  unsigned int v2; // edi@1
  unsigned int v3; // eax@1
  char *v4; // edx@1
  char v5; // bl@1
  int v6; // esi@1
  char v7; // dl@2
  int v8; // eax@3

  v2 = strlen(form);
  v3 = strlen(lenmod);
  v4 = &form[v2 - 1];
  v5 = *v4;
  v6 = v4 - lenmod;
  do
  {
    v7 = *lenmod;
    lenmod[v6] = *lenmod;
    ++lenmod;
  }
  while ( v7 );
  v8 = v2 + v3;
  form[v8 - 1] = v5;
  form[v8] = 0;
}

//----- (007501B0) --------------------------------------------------------
int __cdecl str_format(lua_State *L)
{
  signed int v1; // esi@1
  const char *v2; // ebx@1
  const char *v3; // ebx@6
  char *v4; // eax@12
  int v5; // eax@13
  double v6; // st7@14
  double v7; // st7@14
  double v8; // st7@18
  double v9; // st7@18
  int v10; // ST14_4@21
  int v11; // eax@21
  double v12; // ST10_8@23
  int v13; // eax@25
  int result; // eax@31
  unsigned int l; // [sp+14h] [bp-248h]@25
  unsigned int sfl; // [sp+18h] [bp-244h]@1
  int top; // [sp+1Ch] [bp-240h]@1
  const char *strfrmt_end; // [sp+20h] [bp-23Ch]@1
  __int64 v19; // [sp+24h] [bp-238h]@10
  char *buff; // [sp+2Ch] [bp-230h]@10
  int ni; // [sp+30h] [bp-22Ch]@10
  luaL_Buffer b; // [sp+34h] [bp-228h]@1
  char form[18]; // [sp+244h] [bp-18h]@12

  top = lua_gettop(L);
  v1 = 1;
  v2 = luaL_checklstring(L, 1, &sfl);
  strfrmt_end = &v2[sfl];
  luaL_buffinit(L, &b);
  while ( v2 < strfrmt_end )
  {
    if ( *v2 == 37 )
    {
      v3 = v2 + 1;
      if ( *v3 == 37 )
      {
        if ( b.n >= b.size )
          luaL_prepbuffsize(&b, 1u);
        b.b[b.n++] = *v3;
        v2 = v3 + 1;
      }
      else
      {
        ++v1;
        buff = luaL_prepbuffsize(&b, 0x200u);
        ni = 0;
        HIDWORD(v19) = v1;
        if ( v1 > top )
          luaL_argerror(L, v1, "no value");
        v4 = scanformat(L, v3, form);
        v2 = v4 + 1;
        switch ( *v4 )
        {
          case 99:
            v5 = luaL_checkinteger(L, v1);
            ni = sprintf(buff, form, v5);
            break;
          case 100:
          case 105:
            v6 = luaL_checknumber(L, v1);
            ni = (signed int)v6;
            v7 = v6 - (double)(signed int)v6;
            if ( v7 <= -1.0 || v7 >= 1.0 )
              luaL_argerror(L, v1, "not a number in proper range");
            addlenmod(form);
            ni = sprintf(buff, form, ni);
            break;
          case 88:
          case 111:
          case 117:
          case 120:
            v8 = luaL_checknumber(L, v1);
            v19 = (signed __int64)v8;
            HIDWORD(v19) = (signed __int64)v8;
            ni = (signed __int64)v8;
            v9 = v8 - (double)(unsigned int)ni;
            if ( v9 <= -1.0 || v9 >= 1.0 )
              luaL_argerror(L, v1, "not a non-negative number in proper range");
            addlenmod(form);
            v11 = sprintf(buff, form, HIDWORD(v19), v10);
            goto LABEL_22;
          case 65:
          case 69:
          case 71:
          case 97:
          case 101:
          case 102:
          case 103:
            addlenmod(form);
            v12 = luaL_checknumber(L, v1);
            v11 = sprintf(buff, form, v12);
LABEL_22:
            ni = v11;
            break;
          case 113:
            addquoted(&b, v1, L);
            v1 = HIDWORD(v19);
            break;
          case 115:
            HIDWORD(v19) = luaL_tolstring(L, v1, &l);
            strchr(form, 46);
            if ( v13 || l < 0x64 )
            {
              ni = sprintf(buff, form, HIDWORD(v19));
              lua_settop(L, -2);
            }
            else
            {
              luaL_addvalue(&b);
            }
            break;
          default:
            luaL_error(L, "invalid option '%%%c' to 'format'", *v4);
            return result;
        }
        b.n += ni;
      }
    }
    else
    {
      if ( b.n >= b.size )
        luaL_prepbuffsize(&b, 1u);
      b.b[b.n++] = *v2++;
    }
  }
  luaL_pushresult(&b);
  return 1;
}

//----- (007505C0) --------------------------------------------------------
int __cdecl luaopen_string(lua_State *L)
{
  lua_createtable(L, 0, 14);
  luaL_setfuncs(L, strlib, 0);
  lua_createtable(L, 0, 1);
  lua_pushlstring(L, (const char *)&unk_96F8EB, 0);
  lua_pushvalue(L, -2);
  lua_setmetatable(L, -2);
  lua_settop(L, -2);
  lua_pushvalue(L, -2);
  lua_setfield(L, -2, "__index");
  lua_settop(L, -2);
  return 1;
}

//----- (00750640) --------------------------------------------------------
int __cdecl os_execute(lua_State *L)
{
  const char *v1; // esi@1
  int result; // eax@2
  int v3; // [sp-4h] [bp-Ch]@1

  v1 = luaL_optlstring(L, 1, 0, 0);
  v3 = system(v1);
  if ( v1 )
  {
    result = luaL_execresult(L, v3);
  }
  else
  {
    lua_pushboolean(L, v3);
    result = 1;
  }
  return result;
}

//----- (00750690) --------------------------------------------------------
int __cdecl os_remove(lua_State *L)
{
  const char *v1; // eax@1
  const char *v2; // ST08_4@1
  int v3; // eax@1

  v1 = luaL_checklstring(L, 1, 0);
  v2 = v1;
  v3 = remove(v1);
  return luaL_fileresult(L, v3 == 0, v2);
}

//----- (007506C0) --------------------------------------------------------
int __cdecl os_rename(lua_State *L)
{
  const char *v1; // edi@1
  const char *v2; // eax@1
  int v3; // eax@1

  v1 = luaL_checklstring(L, 1, 0);
  v2 = luaL_checklstring(L, 2, 0);
  v3 = rename(v1, v2);
  return luaL_fileresult(L, v3 == 0, 0);
}

//----- (00750700) --------------------------------------------------------
int __cdecl os_tmpname(lua_State *L)
{
  char buff[14]; // [sp+4h] [bp-14h]@1

  if ( !tmpnam(buff) )
    luaL_error(L, "unable to generate a unique filename");
  lua_pushstring(L, buff);
  return 1;
}

//----- (00750770) --------------------------------------------------------
int __cdecl os_getenv(lua_State *L)
{
  const char *v1; // eax@1
  const char *v2; // eax@1

  v1 = luaL_checklstring(L, 1, 0);
  v2 = getenv(v1);
  lua_pushstring(L, v2);
  return 1;
}

//----- (007507A0) --------------------------------------------------------
int __cdecl os_clock(lua_State *L)
{
  signed int v1; // ST0C_4@1

  v1 = clock();
  lua_pushnumber(L, (double)v1 / 1000.0);
  return 1;
}

//----- (007507D0) --------------------------------------------------------
const char *__usercall checkoption@<eax>(const char *conv@<esi>, char *buff@<ebx>, lua_State *L)
{
  unsigned int v3; // edi@1
  int v4; // eax@3
  char *v5; // eax@4
  char v6; // cl@5
  int v7; // eax@6
  const char *v8; // eax@8

  v3 = 0;
  while ( 1 )
  {
    if ( *conv )
    {
      strchr((char *)options[v3], *conv);
      if ( v4 )
      {
        buff[1] = *conv;
        v5 = *(char **)((char *)&off_9D3FEC + v3 * 4);
        if ( !*v5 )
        {
          buff[2] = 0;
          return conv + 1;
        }
        v6 = conv[1];
        if ( v6 )
        {
          strchr(v5, v6);
          if ( v7 )
            break;
        }
      }
    }
    v3 += 2;
    if ( v3 >= 2 )
    {
      v8 = lua_pushfstring(L, "invalid conversion specifier '%%%s'", conv);
      luaL_argerror(L, 1, v8);
    }
  }
  buff[2] = conv[1];
  buff[3] = 0;
  return conv + 2;
}
// 9D3FEC: using guessed type void *off_9D3FEC;

//----- (00750860) --------------------------------------------------------
int __cdecl os_date(lua_State *L)
{
  const char *v1; // ebx@1
  __int64 v2; // rax@2
  tm *v3; // esi@5
  int v4; // esi@10
  char i; // al@12
  unsigned int v6; // eax@17
  char cc[4]; // [sp+Ch] [bp-2ECh]@12
  __int64 t; // [sp+10h] [bp-2E8h]@4
  tm *stm; // [sp+18h] [bp-2E0h]@5
  luaL_Buffer b; // [sp+1Ch] [bp-2DCh]@12
  char buff[200]; // [sp+22Ch] [bp-CCh]@17

  v1 = luaL_optlstring(L, 1, "%c", 0);
  if ( lua_type(L, 2) > 0 )
    v2 = (unsigned __int64)luaL_checknumber(L, 2);
  else
    v2 = _time64(0);
  t = v2;
  if ( *v1 == 33 )
  {
    v3 = _gmtime64(&t);
    stm = v3;
    ++v1;
  }
  else
  {
    stm = _localtime64(&t);
    v3 = stm;
  }
  if ( v3 )
  {
    if ( !strcmp(v1, "*t") )
    {
      lua_createtable(L, 0, 9);
      lua_pushinteger(L, v3->tm_sec);
      lua_setfield(L, -2, "sec");
      lua_pushinteger(L, v3->tm_min);
      lua_setfield(L, -2, "min");
      lua_pushinteger(L, v3->tm_hour);
      lua_setfield(L, -2, "hour");
      lua_pushinteger(L, v3->tm_mday);
      lua_setfield(L, -2, "day");
      lua_pushinteger(L, v3->tm_mon + 1);
      lua_setfield(L, -2, "month");
      lua_pushinteger(L, v3->tm_year + 1900);
      lua_setfield(L, -2, "year");
      lua_pushinteger(L, v3->tm_wday + 1);
      lua_setfield(L, -2, "wday");
      lua_pushinteger(L, v3->tm_yday + 1);
      lua_setfield(L, -2, "yday");
      v4 = v3->tm_isdst;
      if ( v4 >= 0 )
      {
        lua_pushboolean(L, v4);
        lua_setfield(L, -2, "isdst");
      }
    }
    else
    {
      cc[0] = 37;
      luaL_buffinit(L, &b);
      for ( i = *v1; *v1; i = *v1 )
      {
        if ( i == 37 )
        {
          v1 = checkoption(v1 + 1, cc, L);
          v6 = strftime(buff, 0xC8u, cc, stm);
          luaL_addlstring(&b, buff, v6);
        }
        else
        {
          if ( b.n >= b.size )
            luaL_prepbuffsize(&b, 1u);
          b.b[b.n++] = *v1++;
        }
      }
      luaL_pushresult(&b);
    }
  }
  else
  {
    lua_pushnil(L);
  }
  return 1;
}

//----- (00750B10) --------------------------------------------------------
int __cdecl os_time(lua_State *L)
{
  __int64 v1; // rax@2
  int v2; // edi@3
  int v3; // edi@5
  int v4; // edi@7
  int v5; // edi@9
  int v6; // edi@11
  int v7; // edi@13
  int v8; // edi@16
  int result; // eax@20
  __int64 t; // [sp+Ch] [bp-30h]@3
  tm ts; // [sp+14h] [bp-28h]@5

  if ( lua_type(L, 1) > 0 )
  {
    luaL_checktype(L, 1, 5);
    lua_settop(L, 1);
    lua_getfield(L, -1, "sec");
    v2 = lua_tointegerx(L, -1, (int *)&t + 1);
    if ( !HIDWORD(t) )
      v2 = 0;
    lua_settop(L, -2);
    ts.tm_sec = v2;
    lua_getfield(L, -1, "min");
    v3 = lua_tointegerx(L, -1, (int *)&t + 1);
    if ( !HIDWORD(t) )
      v3 = 0;
    lua_settop(L, -2);
    ts.tm_min = v3;
    lua_getfield(L, -1, "hour");
    v4 = lua_tointegerx(L, -1, (int *)&t + 1);
    if ( !HIDWORD(t) )
      v4 = 12;
    lua_settop(L, -2);
    ts.tm_hour = v4;
    lua_getfield(L, -1, "day");
    v5 = lua_tointegerx(L, -1, (int *)&t + 1);
    if ( !HIDWORD(t) )
      luaL_error(L, "field '%s' missing in date table", "day");
    lua_settop(L, -2);
    ts.tm_mday = v5;
    lua_getfield(L, -1, "month");
    v6 = lua_tointegerx(L, -1, (int *)&t + 1);
    if ( !HIDWORD(t) )
      luaL_error(L, "field '%s' missing in date table", "month");
    lua_settop(L, -2);
    ts.tm_mon = v6 - 1;
    lua_getfield(L, -1, "year");
    v7 = lua_tointegerx(L, -1, (int *)&t + 1);
    if ( !HIDWORD(t) )
      luaL_error(L, "field '%s' missing in date table", "year");
    lua_settop(L, -2);
    ts.tm_year = v7 - 1900;
    lua_getfield(L, -1, "isdst");
    if ( lua_type(L, -1) )
      v8 = lua_toboolean(L, -1);
    else
      v8 = -1;
    lua_settop(L, -2);
    ts.tm_isdst = v8;
    v1 = _mktime64(&ts);
  }
  else
  {
    v1 = _time64(0);
  }
  t = v1;
  if ( (HIDWORD(v1) & (unsigned int)v1) == -1 )
  {
    lua_pushnil(L);
    result = 1;
  }
  else
  {
    lua_pushnumber(L, (double)t);
    result = 1;
  }
  return result;
}

//----- (00750D70) --------------------------------------------------------
int __cdecl os_difftime(lua_State *L)
{
  __int64 v1; // kr00_8@1
  __int64 v2; // rax@1
  long double v3; // st7@1

  v1 = (unsigned __int64)luaL_optnumber(L, 2, 0.0);
  v2 = (unsigned __int64)luaL_checknumber(L, 1);
  v3 = _difftime64(v2, v1);
  lua_pushnumber(L, v3);
  return 1;
}

//----- (00750DD0) --------------------------------------------------------
int __cdecl os_setlocale(lua_State *L)
{
  const char *v1; // edi@1
  int v2; // eax@1
  const char *v3; // eax@1

  v1 = luaL_optlstring(L, 1, 0, 0);
  v2 = luaL_checkoption(L, 2, "all", catnames);
  v3 = setlocale(cat[v2], v1);
  lua_pushstring(L, v3);
  return 1;
}

//----- (00750E20) --------------------------------------------------------
int __cdecl os_exit(lua_State *L)
{
  int v1; // esi@2

  if ( lua_type(L, 1) == 1 )
    v1 = lua_toboolean(L, 1) == 0;
  else
    v1 = luaL_optinteger(L, 1, 0);
  if ( lua_toboolean(L, 2) )
    lua_close(L);
  if ( L )
    exit(v1);
  return 0;
}

//----- (00750E90) --------------------------------------------------------
int __cdecl luaopen_os(lua_State *L)
{
  lua_createtable(L, 0, 11);
  luaL_setfuncs(L, syslib, 0);
  return 1;
}

//----- (00750EC0) --------------------------------------------------------
int __cdecl io_type(lua_State *L)
{
  _DWORD *v1; // eax@1
  int result; // eax@2

  luaL_checkany(L, 1);
  v1 = luaL_testudata(L, 1, "FILE*");
  if ( v1 )
  {
    if ( v1[1] )
    {
      lua_pushlstring(L, "file", 4u);
      result = 1;
    }
    else
    {
      lua_pushlstring(L, "closed file", 0xBu);
      result = 1;
    }
  }
  else
  {
    lua_pushnil(L);
    result = 1;
  }
  return result;
}

//----- (00750F30) --------------------------------------------------------
int __cdecl f_tostring(lua_State *L)
{
  _DWORD *v1; // eax@1
  int result; // eax@2

  v1 = luaL_checkudata(L, 1, "FILE*");
  if ( v1[1] )
  {
    lua_pushfstring(L, "file (%p)", *v1);
    result = 1;
  }
  else
  {
    lua_pushlstring(L, "file (closed)", 0xDu);
    result = 1;
  }
  return result;
}

//----- (00750F80) --------------------------------------------------------
int __cdecl io_close(lua_State *L)
{
  _DWORD *v1; // eax@5
  int (__cdecl *v2)(lua_State *); // ecx@5

  if ( lua_type(L, 1) == -1 )
    lua_getfield(L, -1001000, "_IO_output");
  if ( !*((_DWORD *)luaL_checkudata(L, 1, "FILE*") + 1) )
    luaL_error(L, "attempt to use a closed file");
  v1 = luaL_checkudata(L, 1, "FILE*");
  v2 = (int (__cdecl *)(lua_State *))v1[1];
  v1[1] = 0;
  return v2(L);
}

//----- (00750FF0) --------------------------------------------------------
int __cdecl f_gc(lua_State *L)
{
  _DWORD *v1; // eax@1
  _DWORD *v2; // eax@3
  void (__cdecl *v3)(lua_State *); // ecx@3

  v1 = luaL_checkudata(L, 1, "FILE*");
  if ( v1[1] && *v1 )
  {
    v2 = luaL_checkudata(L, 1, "FILE*");
    v3 = (void (__cdecl *)(lua_State *))v2[1];
    v2[1] = 0;
    v3(L);
  }
  return 0;
}

//----- (00751040) --------------------------------------------------------
int __cdecl io_fclose(lua_State *L)
{
  _iobuf **v1; // eax@1
  int v2; // eax@1

  v1 = (_iobuf **)luaL_checkudata(L, 1, "FILE*");
  v2 = fclose(*v1);
  return luaL_fileresult(L, v2 == 0, 0);
}

//----- (00751080) --------------------------------------------------------
void __usercall opencheck(lua_State *L@<edi>, const char *fname@<ebx>, const char *mode)
{
  int v3; // esi@1
  _iobuf *v4; // eax@1
  int *v5; // eax@2
  char *v6; // eax@2

  v3 = lua_newuserdata(L, 8u);
  *(_DWORD *)(v3 + 4) = 0;
  luaL_setmetatable(L, "FILE*");
  *(_DWORD *)v3 = 0;
  *(_DWORD *)(v3 + 4) = io_fclose;
  v4 = fopen(fname, mode);
  *(_DWORD *)v3 = v4;
  if ( !v4 )
  {
    v5 = _errno();
    v6 = strerror(*v5);
    luaL_error(L, "cannot open file '%s' (%s)", fname, v6);
  }
}

//----- (007510E0) --------------------------------------------------------
int __cdecl io_open(lua_State *L)
{
  const char *v1; // ebx@1
  int v2; // esi@1
  _BYTE *v3; // ecx@2
  int v4; // eax@2
  _iobuf *v5; // eax@9
  int result; // eax@10
  const char *filename; // [sp+Ch] [bp-4h]@1

  filename = luaL_checklstring(L, 1, 0);
  v1 = luaL_optlstring(L, 2, "r", 0);
  v2 = lua_newuserdata(L, 8u);
  *(_DWORD *)(v2 + 4) = 0;
  luaL_setmetatable(L, "FILE*");
  *(_DWORD *)v2 = 0;
  *(_DWORD *)(v2 + 4) = io_fclose;
  if ( !*v1
    || (strchr("rwa", *v1), v3 = v1 + 1, !v4)
    || *v3 == 43 && (v3 = v1 + 2, v1 == (const char *)-2)
    || *v3 == 98 && (++v3, !v3)
    || *v3 )
  {
    luaL_argerror(L, 2, "invalid mode");
  }
  v5 = fopen(filename, v1);
  *(_DWORD *)v2 = v5;
  if ( v5 )
    result = 1;
  else
    result = luaL_fileresult(L, 0, filename);
  return result;
}

//----- (007511B0) --------------------------------------------------------
int __cdecl io_pclose(lua_State *L)
{
  _iobuf **v1; // eax@1
  int v2; // eax@1

  v1 = (_iobuf **)luaL_checkudata(L, 1, "FILE*");
  v2 = _pclose(*v1);
  return luaL_execresult(L, v2);
}

//----- (007511E0) --------------------------------------------------------
int __cdecl io_popen(lua_State *L)
{
  const char *v1; // ebx@1
  const char *mode; // ST40_4@1
  int v3; // edi@1
  _iobuf *v4; // eax@1
  int result; // eax@2

  v1 = luaL_checklstring(L, 1, 0);
  mode = luaL_optlstring(L, 2, "r", 0);
  v3 = lua_newuserdata(L, 8u);
  *(_DWORD *)(v3 + 4) = 0;
  luaL_setmetatable(L, "FILE*");
  v4 = _popen(v1, mode);
  *(_DWORD *)v3 = v4;
  *(_DWORD *)(v3 + 4) = io_pclose;
  if ( v4 )
    result = 1;
  else
    result = luaL_fileresult(L, 0, v1);
  return result;
}

//----- (00751260) --------------------------------------------------------
int __cdecl io_tmpfile(lua_State *L)
{
  int v1; // esi@1
  _iobuf *v2; // eax@1
  int result; // eax@2

  v1 = lua_newuserdata(L, 8u);
  *(_DWORD *)(v1 + 4) = 0;
  luaL_setmetatable(L, "FILE*");
  *(_DWORD *)v1 = 0;
  *(_DWORD *)(v1 + 4) = io_fclose;
  v2 = tmpfile();
  *(_DWORD *)v1 = v2;
  if ( v2 )
    result = 1;
  else
    result = luaL_fileresult(L, 0, 0);
  return result;
}

//----- (007512C0) --------------------------------------------------------
int __usercall g_iofile@<eax>(lua_State *L@<eax>, const char *f@<esi>, const char *mode)
{
  lua_State *v3; // edi@1
  const char *v4; // eax@2

  v3 = L;
  if ( lua_type(L, 1) > 0 )
  {
    v4 = lua_tolstring(v3, 1, 0);
    if ( v4 )
    {
      opencheck(v3, v4, mode);
    }
    else
    {
      if ( !*((_DWORD *)luaL_checkudata(v3, 1, "FILE*") + 1) )
        luaL_error(v3, "attempt to use a closed file");
      lua_pushvalue(v3, 1);
    }
    lua_setfield(v3, -1001000, f);
  }
  lua_getfield(v3, -1001000, f);
  return 1;
}

//----- (00751350) --------------------------------------------------------
int __cdecl io_input(lua_State *L)
{
  return g_iofile(L, "_IO_input", "r");
}

//----- (00751370) --------------------------------------------------------
int __cdecl io_output(lua_State *L)
{
  return g_iofile(L, "_IO_output", "w");
}

//----- (00751390) --------------------------------------------------------
int __usercall read_number@<eax>(lua_State *L@<esi>, _iobuf *f@<ecx>)
{
  int result; // eax@2
  long double d; // [sp+8h] [bp-8h]@1

  if ( fscanf(f, "%lf", &d) == 1 )
  {
    lua_pushnumber(L, d);
    result = 1;
  }
  else
  {
    lua_pushnil(L);
    result = 0;
  }
  return result;
}

//----- (007513E0) --------------------------------------------------------
int __usercall read_line@<eax>(lua_State *L@<ebx>, _iobuf *f@<edi>, int chop)
{
  const char *v3; // esi@1
  unsigned int v4; // eax@2
  int result; // eax@5
  luaL_Buffer b; // [sp+4h] [bp-214h]@1

  luaL_buffinit(L, &b);
  v3 = luaL_prepbuffsize(&b, 0x200u);
  if ( fgets((char *)v3, 512, f) )
  {
    while ( 1 )
    {
      v4 = strlen(v3);
      if ( v4 )
      {
        if ( v3[v4 - 1] == 10 )
          break;
      }
      b.n += v4;
      v3 = luaL_prepbuffsize(&b, 0x200u);
      if ( !fgets((char *)v3, 512, f) )
        goto LABEL_5;
    }
    b.n += v4 - chop;
    luaL_pushresult(&b);
    result = 1;
  }
  else
  {
LABEL_5:
    luaL_pushresult(&b);
    result = lua_rawlen(L, -1) > 0;
  }
  return result;
}

//----- (007514D0) --------------------------------------------------------
void __usercall read_all(_iobuf *f@<edi>, lua_State *L)
{
  unsigned int v2; // esi@1
  char *v3; // eax@1
  unsigned int v4; // eax@1
  char *v5; // eax@4
  unsigned int v6; // eax@4
  luaL_Buffer b; // [sp+4h] [bp-214h]@1

  v2 = 512;
  luaL_buffinit(L, &b);
  v3 = luaL_prepbuffsize(&b, 0x200u);
  v4 = fread(v3, 1u, 0x200u, f);
  b.n += v4;
  if ( v4 >= 0x200 )
  {
    do
    {
      if ( v2 <= 0x3FFFFFFF )
        v2 *= 2;
      v5 = luaL_prepbuffsize(&b, v2);
      v6 = fread(v5, 1u, v2, f);
      b.n += v6;
    }
    while ( v6 >= v2 );
  }
  luaL_pushresult(&b);
}

//----- (00751570) --------------------------------------------------------
int __usercall g_read@<eax>(lua_State *L@<ecx>, _iobuf *f@<edx>, int first)
{
  lua_State *v3; // ebx@1
  _iobuf *v4; // edi@1
  int v5; // eax@1
  int v6; // esi@1
  int v7; // esi@2
  int result; // eax@4
  unsigned int v9; // esi@8
  int v10; // esi@9
  char *v11; // eax@10
  unsigned int v12; // esi@10
  const char *v13; // eax@11
  int nargs; // [sp+Ch] [bp-21Ch]@1
  int n; // [sp+10h] [bp-218h]@2
  luaL_Buffer B; // [sp+14h] [bp-214h]@10

  v3 = L;
  v4 = f;
  v5 = lua_gettop(L);
  v6 = v5 - 1;
  nargs = v5 - 1;
  clearerr(v4);
  if ( v6 )
  {
    luaL_checkstack(v3, v6 + 20, "too many arguments");
    v7 = 1;
    n = first;
    do
    {
      --nargs;
      if ( !v7 )
        break;
      if ( lua_type(v3, n++) == 3 )
      {
        v9 = lua_tointegerx(v3, n, 0);
        if ( v9 )
        {
          luaL_buffinit(v3, &B);
          v11 = luaL_prepbuffsize(&B, v9);
          v12 = fread(v11, 1u, v9, v4);
          B.n += v12;
          luaL_pushresult(&B);
          v7 = v12 > 0;
        }
        else
        {
          v10 = getc(v4);
          ungetc(v10, v4);
          lua_pushlstring(v3, 0, 0);
          v7 = v10 != -1;
        }
      }
      else
      {
        v13 = lua_tolstring(v3, n, 0);
        if ( !v13 || *v13 != 42 )
          luaL_argerror(v3, n, "invalid option");
        switch ( v13[1] )
        {
          case 110:
            v7 = read_number(v3, v4);
            break;
          case 108:
            v7 = read_line(v3, v4, 1);
            break;
          case 76:
            v7 = read_line(v3, v4, 0);
            break;
          case 97:
            read_all(v4, v3);
            v7 = 1;
            break;
          default:
            luaL_argerror(v3, n, "invalid format");
            return result;
        }
      }
    }
    while ( nargs );
  }
  else
  {
    v7 = read_line(v3, v4, 1);
    n = first + 1;
  }
  if ( ferror(v4) )
  {
    result = luaL_fileresult(v3, 0, 0);
  }
  else
  {
    if ( !v7 )
    {
      lua_settop(v3, -2);
      lua_pushnil(v3);
    }
    result = n - first;
  }
  return result;
}

//----- (007517D0) --------------------------------------------------------
int __cdecl io_read(lua_State *L)
{
  _iobuf **v1; // eax@1

  lua_getfield(L, -1001000, "_IO_input");
  v1 = (_iobuf **)lua_touserdata(L, -1);
  if ( !v1[1] )
    luaL_error(L, "standard %s file is closed", 10306372);
  return g_read(L, *v1, 1);
}

//----- (00751820) --------------------------------------------------------
int __cdecl f_read(lua_State *L)
{
  _iobuf **v1; // eax@1

  v1 = (_iobuf **)luaL_checkudata(L, 1, "FILE*");
  if ( !v1[1] )
    luaL_error(L, "attempt to use a closed file");
  return g_read(L, *v1, 2);
}

//----- (00751860) --------------------------------------------------------
int __cdecl io_readline(lua_State *L)
{
  luaL_Stream *v1; // edi@1
  int v2; // ebx@1
  int v3; // edi@4
  int v4; // edi@7
  int result; // eax@8
  const char *v6; // eax@10
  _DWORD *v7; // eax@12
  void (__cdecl *v8)(lua_State *); // ecx@12
  luaL_Stream *p; // [sp+Ch] [bp-4h]@1

  v1 = (luaL_Stream *)lua_touserdata(L, -1001001);
  p = v1;
  v2 = lua_tointegerx(L, -1001002, 0);
  if ( !v1->closef )
    luaL_error(L, "file is already closed");
  lua_settop(L, 1);
  if ( v2 >= 1 )
  {
    v3 = -1001004;
    do
    {
      lua_pushvalue(L, v3--);
      --v2;
    }
    while ( v2 );
    v1 = p;
  }
  v4 = g_read(L, v1->f, 2);
  if ( lua_type(L, -v4) )
  {
    result = v4;
  }
  else
  {
    if ( v4 > 1 )
    {
      v6 = lua_tolstring(L, 1 - v4, 0);
      luaL_error(L, "%s", v6);
    }
    if ( lua_toboolean(L, -1001003) )
    {
      lua_settop(L, 0);
      lua_pushvalue(L, -1001001);
      v7 = luaL_checkudata(L, 1, "FILE*");
      v8 = (void (__cdecl *)(lua_State *))v7[1];
      v7[1] = 0;
      v8(L);
    }
    result = 0;
  }
  return result;
}

//----- (00751970) --------------------------------------------------------
int __usercall g_write@<eax>(lua_State *L@<ebx>, int arg@<eax>, _iobuf *f)
{
  int v3; // esi@1
  int v4; // eax@1
  signed int v5; // edi@1
  double v6; // st7@6
  const char *v8; // eax@11
  unsigned int v9; // eax@12
  lua_State *v10; // [sp+4h] [bp-14h]@0
  int nargs; // [sp+10h] [bp-8h]@4
  unsigned int len; // [sp+14h] [bp-4h]@11

  v3 = arg;
  v4 = lua_gettop(v10) - arg;
  v5 = 1;
  if ( !v4 )
    return 1;
  while ( 1 )
  {
    nargs = v4 - 1;
    if ( lua_type(L, v3) == 3 )
    {
      if ( !v5 )
        goto LABEL_7;
      v6 = lua_tonumberx(L, v3, 0);
      if ( fprintf(f, "%.14g", LODWORD(v6), (_DWORD)(*(unsigned __int64 *)&v6 >> 32)) <= 0 )
        goto LABEL_7;
    }
    else
    {
      v8 = luaL_checklstring(L, v3, &len);
      if ( !v5 || (v9 = fwrite(v8, 1u, len, f), v9 != len) )
      {
LABEL_7:
        v5 = 0;
        goto LABEL_8;
      }
    }
    v5 = 1;
LABEL_8:
    ++v3;
    if ( !nargs )
      break;
    v4 = nargs;
  }
  if ( v5 )
    return 1;
  return luaL_fileresult(L, 0, 0);
}

//----- (00751A30) --------------------------------------------------------
int __cdecl io_write(lua_State *L)
{
  _iobuf **v1; // eax@1

  lua_getfield(L, -1001000, "_IO_output");
  v1 = (_iobuf **)lua_touserdata(L, -1);
  if ( !v1[1] )
    luaL_error(L, "standard %s file is closed", 10306284);
  return g_write(L, 1, *v1);
}

//----- (00751A90) --------------------------------------------------------
int __cdecl f_write(lua_State *L)
{
  _iobuf **v1; // eax@1
  _iobuf *v2; // esi@3

  v1 = (_iobuf **)luaL_checkudata(L, 1, "FILE*");
  if ( !v1[1] )
    luaL_error(L, "attempt to use a closed file");
  v2 = *v1;
  lua_pushvalue(L, 1);
  return g_write(L, 2, v2);
}

//----- (00751AE0) --------------------------------------------------------
int __cdecl f_seek(lua_State *L)
{
  _iobuf **v1; // eax@1
  _iobuf *v2; // edi@3
  int v3; // ebx@3
  long double v4; // st7@3
  int result; // eax@6
  __int64 offset; // ST1C_8@7

  v1 = (_iobuf **)luaL_checkudata(L, 1, "FILE*");
  if ( !v1[1] )
    luaL_error(L, "attempt to use a closed file");
  v2 = *v1;
  v3 = luaL_checkoption(L, 2, "cur", modenames);
  v4 = luaL_optnumber(L, 3, 0.0);
  if ( (double)(signed __int64)(unsigned __int64)v4 != v4 )
    luaL_argerror(L, 3, "not an integer in proper range");
  if ( _fseeki64(v2, (unsigned __int64)v4, mode[v3]) )
  {
    result = luaL_fileresult(L, 0, 0);
  }
  else
  {
    offset = _ftelli64(v2);
    lua_pushnumber(L, (double)offset);
    result = 1;
  }
  return result;
}

//----- (00751BC0) --------------------------------------------------------
int __cdecl f_setvbuf(lua_State *L)
{
  _iobuf **v1; // eax@1
  _iobuf *v2; // edi@3
  int v3; // ebx@3
  unsigned int v4; // eax@3
  int v5; // eax@3

  v1 = (_iobuf **)luaL_checkudata(L, 1, "FILE*");
  if ( !v1[1] )
    luaL_error(L, "attempt to use a closed file");
  v2 = *v1;
  v3 = luaL_checkoption(L, 2, 0, modenames_0);
  v4 = luaL_optinteger(L, 3, 512);
  v5 = setvbuf(v2, 0, mode_0[v3], v4);
  return luaL_fileresult(L, v5 == 0, 0);
}

//----- (00751C40) --------------------------------------------------------
int __cdecl io_flush(lua_State *L)
{
  _iobuf **v1; // eax@1
  int v2; // eax@3

  lua_getfield(L, -1001000, "_IO_output");
  v1 = (_iobuf **)lua_touserdata(L, -1);
  if ( !v1[1] )
    luaL_error(L, "standard %s file is closed", 10306284);
  v2 = fflush(*v1);
  return luaL_fileresult(L, v2 == 0, 0);
}

//----- (00751CA0) --------------------------------------------------------
int __cdecl f_flush(lua_State *L)
{
  _iobuf **v1; // eax@1
  int v2; // eax@3

  v1 = (_iobuf **)luaL_checkudata(L, 1, "FILE*");
  if ( !v1[1] )
    luaL_error(L, "attempt to use a closed file");
  v2 = fflush(*v1);
  return luaL_fileresult(L, v2 == 0, 0);
}

//----- (00751CF0) --------------------------------------------------------
int __cdecl io_noclose(lua_State *L)
{
  *((_DWORD *)luaL_checkudata(L, 1, "FILE*") + 1) = io_noclose;
  lua_pushnil(L);
  lua_pushlstring(L, "cannot close standard file", 0x1Au);
  return 2;
}

//----- (00751D30) --------------------------------------------------------
int __cdecl luaopen_io(lua_State *L)
{
  _iobuf *v1; // ebx@1
  int v2; // eax@1
  int v3; // edi@1
  _iobuf *v4; // edi@1
  int v5; // eax@1
  int v6; // ebx@1
  _iobuf *v7; // ebx@1
  int v8; // eax@1
  int v9; // edi@1

  lua_createtable(L, 0, 11);
  luaL_setfuncs(L, iolib, 0);
  luaL_newmetatable(L, "FILE*");
  lua_pushvalue(L, -1);
  lua_setfield(L, -2, "__index");
  luaL_setfuncs(L, flib, 0);
  lua_settop(L, -2);
  v1 = __iob_func();
  v2 = lua_newuserdata(L, 8u);
  v3 = v2;
  *(_DWORD *)(v2 + 4) = 0;
  luaL_setmetatable(L, "FILE*");
  *(_DWORD *)v3 = v1;
  *(_DWORD *)(v3 + 4) = io_noclose;
  lua_pushvalue(L, -1);
  lua_setfield(L, -1001000, "_IO_input");
  lua_setfield(L, -2, "stdin");
  v4 = __iob_func() + 1;
  v5 = lua_newuserdata(L, 8u);
  v6 = v5;
  *(_DWORD *)(v5 + 4) = 0;
  luaL_setmetatable(L, "FILE*");
  *(_DWORD *)v6 = v4;
  *(_DWORD *)(v6 + 4) = io_noclose;
  lua_pushvalue(L, -1);
  lua_setfield(L, -1001000, "_IO_output");
  lua_setfield(L, -2, "stdout");
  v7 = __iob_func() + 2;
  v8 = lua_newuserdata(L, 8u);
  v9 = v8;
  *(_DWORD *)(v8 + 4) = 0;
  luaL_setmetatable(L, "FILE*");
  *(_DWORD *)v9 = v7;
  *(_DWORD *)(v9 + 4) = io_noclose;
  lua_setfield(L, -2, "stderr");
  return 1;
}

//----- (00751E80) --------------------------------------------------------
void __usercall aux_lines(lua_State *L@<edi>, int toclose)
{
  int v2; // esi@1
  signed int v3; // eax@3
  int v4; // ebx@4
  lua_State *v5; // [sp+0h] [bp-8h]@0

  v2 = lua_gettop(v5) - 1;
  if ( v2 > 17 )
    luaL_argerror(L, 17, "too many options");
  lua_pushvalue(L, 1);
  lua_pushinteger(L, v2);
  lua_pushboolean(L, toclose);
  v3 = 1;
  if ( v2 >= 1 )
  {
    do
    {
      v4 = v3 + 1;
      lua_pushvalue(L, v3 + 1);
      v3 = v4;
    }
    while ( v4 <= v2 );
  }
  lua_pushcclosure(L, io_readline, v2 + 3);
}

//----- (00751F00) --------------------------------------------------------
int __cdecl f_lines(lua_State *L)
{
  if ( !*((_DWORD *)luaL_checkudata(L, 1, "FILE*") + 1) )
    luaL_error(L, "attempt to use a closed file");
  aux_lines(L, 0);
  return 1;
}

//----- (00751F40) --------------------------------------------------------
int __cdecl io_lines(lua_State *L)
{
  int result; // eax@6
  const char *v2; // eax@7

  if ( lua_type(L, 1) == -1 )
    lua_pushnil(L);
  if ( lua_type(L, 1) )
  {
    v2 = luaL_checklstring(L, 1, 0);
    opencheck(L, v2, "r");
    lua_replace(L, 1);
    aux_lines(L, 1);
    result = 1;
  }
  else
  {
    lua_getfield(L, -1001000, "_IO_input");
    lua_replace(L, 1);
    if ( !*((_DWORD *)luaL_checkudata(L, 1, "FILE*") + 1) )
      luaL_error(L, "attempt to use a closed file");
    aux_lines(L, 0);
    result = 1;
  }
  return result;
}

//----- (00752000) --------------------------------------------------------
int __cdecl tinsert(lua_State *L)
{
  int v1; // esi@1
  int v2; // eax@1
  int v3; // eax@4
  int v4; // ebx@4
  int pos; // [sp+Ch] [bp-4h]@4

  luaL_checktype(L, 1, 5);
  v1 = luaL_len(L, 1) + 1;
  v2 = lua_gettop(L) - 2;
  if ( v2 )
  {
    if ( v2 != 1 )
      luaL_error(L, "wrong number of arguments to 'insert'");
    v3 = luaL_checkinteger(L, 2);
    v4 = v3;
    pos = v3;
    if ( v3 < 1 || v1 < v3 )
      luaL_argerror(L, 2, "position out of bounds");
    if ( v1 > v3 )
    {
      do
      {
        lua_rawgeti(L, 1, v1 - 1);
        lua_rawseti(L, 1, v1--);
      }
      while ( v1 > pos );
      v4 = pos;
    }
  }
  else
  {
    v4 = v1;
  }
  lua_rawseti(L, 1, v4);
  return 0;
}

//----- (007520B0) --------------------------------------------------------
int __cdecl tremove(lua_State *L)
{
  int v1; // eax@1
  int v2; // ebx@1
  int v3; // eax@1
  int v4; // esi@1
  int size; // [sp+Ch] [bp-4h]@1

  luaL_checktype(L, 1, 5);
  v1 = luaL_len(L, 1);
  v2 = v1;
  size = v1;
  v3 = luaL_optinteger(L, 2, v1);
  v4 = v3;
  if ( v3 != v2 && (v3 < 1 || v3 > v2 + 1) )
    luaL_argerror(L, 1, "position out of bounds");
  lua_rawgeti(L, 1, v3);
  if ( v4 < v2 )
  {
    do
    {
      lua_rawgeti(L, 1, v4 + 1);
      lua_rawseti(L, 1, v4++);
    }
    while ( v4 < size );
  }
  lua_pushnil(L);
  lua_rawseti(L, 1, v4);
  return 1;
}

//----- (00752150) --------------------------------------------------------
int __cdecl tconcat(lua_State *L)
{
  int v1; // edi@1
  int v2; // eax@2
  int v3; // ebx@4
  bool i; // zf@4
  int v5; // eax@6
  char *v6; // eax@6
  int v7; // eax@10
  char *v8; // eax@10
  unsigned int lsep; // [sp+Ch] [bp-21Ch]@1
  const char *sep; // [sp+10h] [bp-218h]@1
  luaL_Buffer b; // [sp+14h] [bp-214h]@4

  sep = luaL_optlstring(L, 2, (const char *)&unk_96F8EB, &lsep);
  luaL_checktype(L, 1, 5);
  v1 = luaL_optinteger(L, 3, 1);
  if ( lua_type(L, 4) > 0 )
    v2 = luaL_checkinteger(L, 4);
  else
    v2 = luaL_len(L, 1);
  v3 = v2;
  luaL_buffinit(L, &b);
  for ( i = v1 == v3; v1 < v3; i = v1 == v3 )
  {
    lua_rawgeti(L, 1, v1);
    if ( !lua_isstring(L, -1) )
    {
      v5 = lua_type(L, -1);
      v6 = lua_typename(L, v5);
      luaL_error(L, "invalid value (%s) at index %d in table for 'concat'", v6, v1);
    }
    luaL_addvalue(&b);
    luaL_addlstring(&b, sep, lsep);
    ++v1;
  }
  if ( i )
  {
    lua_rawgeti(L, 1, v1);
    if ( !lua_isstring(L, -1) )
    {
      v7 = lua_type(L, -1);
      v8 = lua_typename(L, v7);
      luaL_error(L, "invalid value (%s) at index %d in table for 'concat'", v8, v1);
    }
    luaL_addvalue(&b);
  }
  luaL_pushresult(&b);
  return 1;
}

//----- (007522B0) --------------------------------------------------------
int __cdecl pack(lua_State *L)
{
  int v1; // edi@1

  v1 = lua_gettop(L);
  lua_createtable(L, v1, 1);
  lua_pushinteger(L, v1);
  lua_setfield(L, -2, "n");
  if ( v1 > 0 )
  {
    lua_pushvalue(L, 1);
    lua_rawseti(L, -2, 1);
    lua_replace(L, 1);
    for ( ; v1 >= 2; --v1 )
      lua_rawseti(L, 1, v1);
  }
  return 1;
}

//----- (00752330) --------------------------------------------------------
int __cdecl unpack(lua_State *L)
{
  int v1; // esi@1
  int v2; // eax@2
  int v3; // ebx@4
  int result; // eax@5
  int n; // [sp+Ch] [bp-4h]@6

  luaL_checktype(L, 1, 5);
  v1 = luaL_optinteger(L, 2, 1);
  if ( lua_type(L, 3) > 0 )
    v2 = luaL_checkinteger(L, 3);
  else
    v2 = luaL_len(L, 1);
  v3 = v2;
  if ( v1 <= v2 )
  {
    n = v2 - v1 + 1;
    if ( n <= 0 || !lua_checkstack(L, v2 - v1 + 1) )
      luaL_error(L, "too many results to unpack");
    lua_rawgeti(L, 1, v1);
    while ( v1 < v3 )
      lua_rawgeti(L, 1, ++v1);
    result = n;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007523E0) --------------------------------------------------------
void __cdecl auxsort(lua_State *L, int l, int u)
{
  int v3; // ebx@1
  int v4; // edi@1
  int v5; // edi@5
  int v6; // eax@5
  signed int v7; // kr00_4@11
  int v8; // edi@11
  int v9; // ebx@12
  int v10; // eax@12
  int v11; // ebx@17
  int v12; // eax@17
  int v13; // ebx@23
  int v14; // ebx@23
  int v15; // edi@23
  int v16; // edi@25
  int v17; // eax@25
  int v18; // edi@32
  int v19; // eax@32
  int v20; // edi@40
  int v21; // ebx@41
  int v22; // eax@41
  int v23; // edx@42
  int j; // [sp+8h] [bp-4h]@10
  int ja; // [sp+8h] [bp-4h]@23

  v3 = u;
  v4 = l;
  if ( l < u )
  {
    while ( 1 )
    {
      lua_rawgeti(L, 1, v4);
      lua_rawgeti(L, 1, v3);
      if ( lua_type(L, 2) )
      {
        lua_pushvalue(L, 2);
        lua_pushvalue(L, -2);
        lua_pushvalue(L, -4);
        lua_callk(L, 2, 1, 0, 0);
        v5 = lua_toboolean(L, -1);
        lua_settop(L, -2);
        v6 = v5;
        v4 = l;
      }
      else
      {
        v6 = lua_compare(L, -1, -2, 1);
      }
      if ( v6 )
      {
        lua_rawseti(L, 1, v4);
        lua_rawseti(L, 1, v3);
      }
      else
      {
        lua_settop(L, -3);
      }
      j = v3 - v4;
      if ( v3 - v4 == 1 )
        break;
      v7 = v4 + v3;
      v8 = (v4 + v3) / 2;
      lua_rawgeti(L, 1, v7 / 2);
      lua_rawgeti(L, 1, l);
      if ( lua_type(L, 2) )
      {
        lua_pushvalue(L, 2);
        lua_pushvalue(L, -3);
        lua_pushvalue(L, -3);
        lua_callk(L, 2, 1, 0, 0);
        v9 = lua_toboolean(L, -1);
        lua_settop(L, -2);
        v10 = v9;
        v3 = u;
      }
      else
      {
        v10 = lua_compare(L, -2, -1, 1);
      }
      if ( v10 )
      {
        lua_rawseti(L, 1, v8);
        lua_rawseti(L, 1, l);
      }
      else
      {
        lua_settop(L, -2);
        lua_rawgeti(L, 1, v3);
        if ( lua_type(L, 2) )
        {
          lua_pushvalue(L, 2);
          lua_pushvalue(L, -2);
          lua_pushvalue(L, -4);
          lua_callk(L, 2, 1, 0, 0);
          v11 = lua_toboolean(L, -1);
          lua_settop(L, -2);
          v12 = v11;
          v3 = u;
        }
        else
        {
          v12 = lua_compare(L, -1, -2, 1);
        }
        if ( v12 )
        {
          lua_rawseti(L, 1, v8);
          lua_rawseti(L, 1, v3);
        }
        else
        {
          lua_settop(L, -3);
        }
      }
      if ( j == 2 )
        break;
      lua_rawgeti(L, 1, v8);
      lua_pushvalue(L, -1);
      v13 = v3 - 1;
      lua_rawgeti(L, 1, v13);
      lua_rawseti(L, 1, v8);
      lua_rawseti(L, 1, v13);
      v14 = l;
      v15 = u - 1;
      ja = u - 1;
      while ( 1 )
      {
        while ( 1 )
        {
          lua_rawgeti(L, 1, ++v14);
          if ( lua_type(L, 2) )
          {
            lua_pushvalue(L, 2);
            lua_pushvalue(L, -2);
            lua_pushvalue(L, -4);
            lua_callk(L, 2, 1, 0, 0);
            v16 = lua_toboolean(L, -1);
            lua_settop(L, -2);
            v17 = v16;
            v15 = ja;
          }
          else
          {
            v17 = lua_compare(L, -1, -2, 1);
          }
          if ( !v17 )
            break;
          if ( v14 >= u )
            luaL_error(L, "invalid order function for sorting");
          lua_settop(L, -2);
        }
        while ( 1 )
        {
          ja = --v15;
          lua_rawgeti(L, 1, v15);
          if ( lua_type(L, 2) )
          {
            lua_pushvalue(L, 2);
            lua_pushvalue(L, -4);
            lua_pushvalue(L, -3);
            lua_callk(L, 2, 1, 0, 0);
            v18 = lua_toboolean(L, -1);
            lua_settop(L, -2);
            v19 = v18;
            v15 = ja;
          }
          else
          {
            v19 = lua_compare(L, -3, -1, 1);
          }
          if ( !v19 )
            break;
          if ( v15 <= l )
            luaL_error(L, "invalid order function for sorting");
          lua_settop(L, -2);
        }
        if ( v15 < v14 )
          break;
        lua_rawseti(L, 1, v14);
        lua_rawseti(L, 1, v15);
      }
      lua_settop(L, -4);
      lua_rawgeti(L, 1, u - 1);
      lua_rawgeti(L, 1, v14);
      lua_rawseti(L, 1, u - 1);
      lua_rawseti(L, 1, v14);
      v20 = l;
      if ( v14 - l >= u - v14 )
      {
        v22 = v14 + 1;
        v23 = v14 - 1;
        v21 = u;
        u = v23;
      }
      else
      {
        v21 = v14 - 1;
        v22 = l;
        l = v21 + 2;
        v20 = v21 + 2;
      }
      auxsort(L, v22, v21);
      if ( v20 >= u )
        break;
      v3 = u;
      v4 = l;
    }
  }
}

//----- (007527F0) --------------------------------------------------------
int __cdecl sort(lua_State *L)
{
  int v1; // edi@1

  luaL_checktype(L, 1, 5);
  v1 = luaL_len(L, 1);
  luaL_checkstack(L, 40, (const char *)&unk_96F8EB);
  if ( lua_type(L, 2) > 0 )
    luaL_checktype(L, 2, 6);
  lua_settop(L, 2);
  auxsort(L, 1, v1);
  return 0;
}

//----- (00752850) --------------------------------------------------------
int __cdecl luaopen_table(lua_State *L)
{
  lua_createtable(L, 0, 6);
  luaL_setfuncs(L, tab_funcs, 0);
  return 1;
}

//----- (00752880) --------------------------------------------------------
int __usercall auxresume@<eax>(lua_State *L@<edi>, lua_State *co@<esi>, int narg@<eax>)
{
  int v3; // ebx@1
  int result; // eax@2
  int v5; // eax@6
  int v6; // ebx@9

  v3 = narg;
  if ( lua_checkstack(co, narg) )
  {
    if ( lua_status(co) || lua_gettop(co) )
    {
      lua_xmove(L, co, v3);
      v5 = lua_resume(co, L, v3);
      if ( v5 && v5 != 1 )
      {
        lua_xmove(co, L, 1);
        result = -1;
      }
      else
      {
        v6 = lua_gettop(co);
        if ( lua_checkstack(L, v6 + 1) )
        {
          lua_xmove(co, L, v6);
          result = v6;
        }
        else
        {
          lua_settop(co, -1 - v6);
          lua_pushlstring(L, "too many results to resume", 0x1Au);
          result = -1;
        }
      }
    }
    else
    {
      lua_pushlstring(L, "cannot resume dead coroutine", 0x1Cu);
      result = -1;
    }
  }
  else
  {
    lua_pushlstring(L, "too many arguments to resume", 0x1Cu);
    result = -1;
  }
  return result;
}

//----- (00752950) --------------------------------------------------------
int __cdecl luaB_coresume(lua_State *L)
{
  lua_State *v1; // esi@1
  int v2; // eax@3
  int v3; // esi@3
  int result; // eax@4

  v1 = lua_tothread(L, 1);
  if ( !v1 )
    luaL_argerror(L, 1, "coroutine expected");
  v2 = lua_gettop(L);
  v3 = auxresume(L, v1, v2 - 1);
  if ( v3 >= 0 )
  {
    lua_pushboolean(L, 1);
    lua_insert(L, -1 - v3);
    result = v3 + 1;
  }
  else
  {
    lua_pushboolean(L, 0);
    lua_insert(L, -2);
    result = 2;
  }
  return result;
}

//----- (007529D0) --------------------------------------------------------
int __cdecl luaB_auxwrap(lua_State *L)
{
  lua_State *v1; // esi@1
  int v2; // eax@1
  int result; // eax@1

  v1 = lua_tothread(L, -1001001);
  v2 = lua_gettop(L);
  result = auxresume(L, v1, v2);
  if ( result < 0 )
  {
    if ( lua_isstring(L, -1) )
    {
      luaL_where(L, 1);
      lua_insert(L, -2);
      lua_concat(L, 2);
    }
    lua_error(L);
  }
  return result;
}

//----- (00752A30) --------------------------------------------------------
int __cdecl luaB_cocreate(lua_State *L)
{
  GCObject *v1; // edi@1

  luaL_checktype(L, 1, 6);
  v1 = lua_newthread(L);
  lua_pushvalue(L, 1);
  lua_xmove(L, (lua_State *)v1, 1);
  return 1;
}

//----- (00752A70) --------------------------------------------------------
int __cdecl luaB_cowrap(lua_State *L)
{
  GCObject *v1; // edi@1

  luaL_checktype(L, 1, 6);
  v1 = lua_newthread(L);
  lua_pushvalue(L, 1);
  lua_xmove(L, (lua_State *)v1, 1);
  lua_pushcclosure(L, luaB_auxwrap, 1);
  return 1;
}

//----- (00752AC0) --------------------------------------------------------
int __cdecl luaB_yield(lua_State *L)
{
  int v1; // eax@1

  v1 = lua_gettop(L);
  return lua_yieldk(L, v1, 0, 0);
}

//----- (00752AF0) --------------------------------------------------------
int __cdecl luaB_costatus(lua_State *L)
{
  lua_State *v1; // eax@1
  lua_State *v2; // edi@1
  int v3; // eax@5
  lua_Debug ar; // [sp+8h] [bp-68h]@8

  v1 = lua_tothread(L, 1);
  v2 = v1;
  if ( !v1 )
    luaL_argerror(L, 1, "coroutine expected");
  if ( L != v1 )
  {
    v3 = lua_status(v1);
    if ( v3 )
    {
      if ( v3 != 1 )
      {
LABEL_7:
        lua_pushlstring(L, "dead", 4u);
        return 1;
      }
    }
    else
    {
      if ( lua_getstack(v2, 0, &ar) > 0 )
      {
        lua_pushlstring(L, "normal", 6u);
        return 1;
      }
      if ( !lua_gettop(v2) )
        goto LABEL_7;
    }
    lua_pushlstring(L, "suspended", 9u);
    return 1;
  }
  lua_pushlstring(L, "running", 7u);
  return 1;
}

//----- (00752BA0) --------------------------------------------------------
int __cdecl luaB_corunning(lua_State *L)
{
  int v1; // eax@1

  v1 = lua_pushthread(L);
  lua_pushboolean(L, v1);
  return 2;
}

//----- (00752BC0) --------------------------------------------------------
int __cdecl luaopen_coroutine(lua_State *L)
{
  lua_createtable(L, 0, 6);
  luaL_setfuncs(L, co_funcs, 0);
  return 1;
}

//----- (00752BF0) --------------------------------------------------------
void __usercall setprogdir(lua_State *L@<esi>)
{
  DWORD v1; // eax@1
  _BYTE *v2; // eax@3
  const char *v3; // eax@4
  char buff[261]; // [sp+0h] [bp-10Ch]@1

  v1 = GetModuleFileNameA(0, buff, 0x105u);
  if ( !v1 || v1 == 261 || (strrchr(buff, 92), !v2) )
    luaL_error(L, "unable to get ModuleFileName");
  *v2 = 0;
  v3 = lua_tolstring(L, -1, 0);
  luaL_gsub(L, v3, "!", buff);
  lua_remove(L, -2);
}

//----- (00752C90) --------------------------------------------------------
void __usercall pusherror(lua_State *L@<edi>)
{
  DWORD v1; // esi@1
  char buffer[128]; // [sp+4h] [bp-84h]@1

  v1 = GetLastError();
  if ( FormatMessageA(0x1200u, 0, v1, 0, buffer, 0x80u, 0) )
    lua_pushstring(L, buffer);
  else
    lua_pushfstring(L, "system error %d\n", v1);
}

//----- (00752D10) --------------------------------------------------------
void __usercall ll_addtoclib(lua_State *L@<esi>, const char *path, void *plib)
{
  int v3; // eax@1

  lua_getfield(L, -1001000, "_CLIBS");
  lua_pushlightuserdata(L, plib);
  lua_pushvalue(L, -1);
  lua_setfield(L, -3, path);
  v3 = luaL_len(L, -2);
  lua_rawseti(L, -2, v3 + 1);
  lua_settop(L, -2);
}

//----- (00752D60) --------------------------------------------------------
int __cdecl gctm(lua_State *L)
{
  int i; // esi@1
  HMODULE v2; // eax@2

  for ( i = luaL_len(L, 1); i >= 1; --i )
  {
    lua_rawgeti(L, 1, i);
    v2 = (HMODULE)lua_touserdata(L, -1);
    FreeLibrary(v2);
    lua_settop(L, -2);
  }
  return 0;
}

//----- (00752DB0) --------------------------------------------------------
int __usercall ll_loadfunc@<eax>(lua_State *L@<eax>, const char *path, const char *sym)
{
  lua_State *v3; // edi@1
  HMODULE v4; // esi@1
  HMODULE v5; // ebx@1
  HMODULE v6; // esi@2
  int result; // eax@5
  int (__cdecl *v8)(lua_State *); // eax@9

  v3 = L;
  lua_getfield(L, -1001000, "_CLIBS");
  lua_getfield(v3, -1, path);
  v4 = (HMODULE)lua_touserdata(v3, -1);
  lua_settop(v3, -3);
  v5 = v4;
  if ( !v4 )
  {
    v6 = LoadLibraryExA(path, 0, 0);
    if ( !v6 )
      pusherror(v3);
    v5 = v6;
    if ( !v6 )
      return 1;
    ll_addtoclib(v3, path, v6);
  }
  if ( *sym == 42 )
  {
    lua_pushboolean(v3, 1);
    result = 0;
  }
  else
  {
    v8 = (int (__cdecl *)(lua_State *))GetProcAddress(v5, sym);
    if ( v8 )
    {
      lua_pushcclosure(v3, v8, 0);
      result = 0;
    }
    else
    {
      pusherror(v3);
      result = 2;
    }
  }
  return result;
}

//----- (00752E70) --------------------------------------------------------
int __cdecl ll_loadlib(lua_State *L)
{
  const char *v1; // edi@1
  const char *v2; // eax@1
  int v3; // edi@1
  int result; // eax@2
  const char *v5; // eax@3

  v1 = luaL_checklstring(L, 1, 0);
  v2 = luaL_checklstring(L, 2, 0);
  v3 = ll_loadfunc(L, v1, v2);
  if ( v3 )
  {
    lua_pushnil(L);
    lua_insert(L, -2);
    v5 = "open";
    if ( v3 != 1 )
      v5 = "init";
    lua_pushstring(L, v5);
    result = 3;
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (00752EE0) --------------------------------------------------------
const char *__usercall searchpath@<eax>(lua_State *L@<esi>, const char *path@<ecx>, const char *sep@<edx>, const char *name, const char *dirsep)
{
  const char *v5; // edi@1
  char *i; // edi@3
  unsigned int v7; // eax@6
  unsigned int v8; // ebx@6
  const char *v9; // eax@9
  const char *v10; // edi@9
  _iobuf *v11; // eax@9
  char *string; // [sp+8h] [bp-21Ch]@1
  char *s; // [sp+Ch] [bp-218h]@1
  luaL_Buffer msg; // [sp+10h] [bp-214h]@1

  v5 = sep;
  s = (char *)name;
  string = (char *)path;
  luaL_buffinit(L, &msg);
  if ( *v5 )
    s = (char *)luaL_gsub(L, name, v5, dirsep);
  while ( 1 )
  {
    for ( i = string; *i == 59; ++i )
      ;
    if ( !*i )
      break;
    strchr(i, 59);
    v8 = v7;
    if ( !v7 )
      v8 = (unsigned int)&i[strlen(i)];
    lua_pushlstring(L, i, v8 - (_DWORD)i);
    string = (char *)v8;
    if ( !v8 )
      break;
    v9 = lua_tolstring(L, -1, 0);
    v10 = luaL_gsub(L, v9, "?", s);
    lua_remove(L, -2);
    v11 = fopen(v10, "r");
    if ( v11 )
    {
      fclose(v11);
      return v10;
    }
    lua_pushfstring(L, "\n\tno file '%s'", v10);
    lua_remove(L, -2);
    luaL_addvalue(&msg);
  }
  luaL_pushresult(&msg);
  return 0;
}

//----- (00753040) --------------------------------------------------------
int __cdecl ll_searchpath(lua_State *L)
{
  const char *v1; // ST28_4@1
  const char *v2; // edi@1
  const char *v3; // ebx@1
  const char *v4; // eax@1
  int result; // eax@2

  v1 = luaL_optlstring(L, 4, "\\", 0);
  v2 = luaL_optlstring(L, 3, ".", 0);
  v3 = luaL_checklstring(L, 2, 0);
  v4 = luaL_checklstring(L, 1, 0);
  if ( searchpath(L, v3, v2, v4, v1) )
  {
    result = 1;
  }
  else
  {
    lua_pushnil(L);
    lua_insert(L, -2);
    result = 2;
  }
  return result;
}

//----- (007530C0) --------------------------------------------------------
int __cdecl searcher_Lua(lua_State *L)
{
  const char *v1; // ebx@1
  const char *v2; // eax@1
  const char *v3; // eax@3
  const char *v4; // edi@3
  int result; // eax@4
  const char *v6; // eax@8
  const char *v7; // [sp-4h] [bp-10h]@7

  v1 = luaL_checklstring(L, 1, 0);
  lua_getfield(L, -1001001, "path");
  v2 = lua_tolstring(L, -1, 0);
  if ( !v2 )
    luaL_error(L, "'package.%s' must be a string", "path");
  v3 = searchpath(L, v2, ".", v1, "\\");
  v4 = v3;
  if ( v3 )
  {
    if ( luaL_loadfilex(L, v3, 0) )
    {
      v7 = lua_tolstring(L, -1, 0);
      v6 = lua_tolstring(L, 1, 0);
      luaL_error(L, "error loading module '%s' from file '%s':\n\t%s", v6, v4, v7);
    }
    lua_pushstring(L, v4);
    result = 2;
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (00753190) --------------------------------------------------------
int __usercall loadfunc@<eax>(lua_State *L@<esi>, const char *modname@<eax>, const char *filename)
{
  char *v3; // eax@1
  const char *v4; // edi@1
  int v5; // eax@1
  int v6; // ebx@1
  const char *v7; // eax@2
  const char *v8; // eax@2
  int result; // eax@2
  const char *v10; // eax@4

  v3 = (char *)luaL_gsub(L, modname, ".", "_");
  v4 = v3;
  strchr(v3, 45);
  v6 = v5;
  if ( v5 )
  {
    v7 = lua_pushlstring(L, v4, v5 - (_DWORD)v4);
    v8 = lua_pushfstring(L, "luaopen_%s", v7);
    result = ll_loadfunc(L, filename, v8);
    if ( result != 2 )
      return result;
    v4 = (const char *)(v6 + 1);
  }
  v10 = lua_pushfstring(L, "luaopen_%s", v4);
  return ll_loadfunc(L, filename, v10);
}

//----- (00753210) --------------------------------------------------------
int __cdecl searcher_C(lua_State *L)
{
  const char *v1; // ebx@1
  const char *v2; // eax@1
  const char *v3; // eax@3
  const char *v4; // edi@3
  int result; // eax@4
  const char *v6; // eax@8
  const char *v7; // [sp-4h] [bp-10h]@7

  v1 = luaL_checklstring(L, 1, 0);
  lua_getfield(L, -1001001, "cpath");
  v2 = lua_tolstring(L, -1, 0);
  if ( !v2 )
    luaL_error(L, "'package.%s' must be a string", "cpath");
  v3 = searchpath(L, v2, ".", v1, "\\");
  v4 = v3;
  if ( v3 )
  {
    if ( loadfunc(L, v1, v3) )
    {
      v7 = lua_tolstring(L, -1, 0);
      v6 = lua_tolstring(L, 1, 0);
      luaL_error(L, "error loading module '%s' from file '%s':\n\t%s", v6, v4, v7);
    }
    lua_pushstring(L, v4);
    result = 2;
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (007532E0) --------------------------------------------------------
void __cdecl searcher_Croot(lua_State *L)
{
  char *v1; // eax@1
  const char *v2; // edi@1
  int v3; // eax@1
  const char *v4; // ebx@2
  const char *v5; // eax@4
  const char *v6; // ebx@4
  int v7; // eax@5
  const char *v8; // eax@8
  const char *v9; // [sp-8h] [bp-14h]@7
  char *name; // [sp+8h] [bp-4h]@2

  v1 = (char *)luaL_checklstring(L, 1, 0);
  v2 = v1;
  strchr(v1, 46);
  if ( v3 )
  {
    lua_pushlstring(L, v2, v3 - (_DWORD)v2);
    name = (char *)lua_tolstring(L, -1, 0);
    lua_getfield(L, -1001001, "cpath");
    v4 = lua_tolstring(L, -1, 0);
    if ( !v4 )
      luaL_error(L, "'package.%s' must be a string", "cpath");
    v5 = searchpath(L, v4, ".", name, "\\");
    v6 = v5;
    if ( v5 )
    {
      v7 = loadfunc(L, v2, v5);
      if ( v7 )
      {
        if ( v7 != 2 )
        {
          v9 = lua_tolstring(L, -1, 0);
          v8 = lua_tolstring(L, 1, 0);
          luaL_error(L, "error loading module '%s' from file '%s':\n\t%s", v8, v6, v9);
        }
        lua_pushfstring(L, "\n\tno module '%s' in file '%s'", v2, v6);
      }
      else
      {
        lua_pushstring(L, v6);
      }
    }
  }
}

//----- (007533F0) --------------------------------------------------------
int __cdecl searcher_preload(lua_State *L)
{
  const char *v1; // edi@1

  v1 = luaL_checklstring(L, 1, 0);
  lua_getfield(L, -1001000, "_PRELOAD");
  lua_getfield(L, -1, v1);
  if ( !lua_type(L, -1) )
    lua_pushfstring(L, "\n\tno field package.preload['%s']", v1);
  return 1;
}

//----- (00753450) --------------------------------------------------------
void __usercall findloader(lua_State *L@<esi>, const char *name@<edi>)
{
  int v2; // ebx@3
  const char *v3; // eax@6
  luaL_Buffer msg; // [sp+0h] [bp-214h]@1

  luaL_buffinit(L, &msg);
  lua_getfield(L, -1001001, "searchers");
  if ( lua_type(L, 3) != 5 )
    luaL_error(L, "'package.searchers' must be a table");
  v2 = 1;
  while ( 1 )
  {
    lua_rawgeti(L, 3, v2);
    if ( !lua_type(L, -1) )
    {
      lua_settop(L, -2);
      luaL_pushresult(&msg);
      v3 = lua_tolstring(L, -1, 0);
      luaL_error(L, "module '%s' not found:%s", name, v3);
    }
    lua_pushstring(L, name);
    lua_callk(L, 1, 2, 0, 0);
    if ( lua_type(L, -2) == 6 )
      break;
    if ( lua_isstring(L, -2) )
    {
      lua_settop(L, -2);
      luaL_addvalue(&msg);
      ++v2;
    }
    else
    {
      lua_settop(L, -3);
      ++v2;
    }
  }
}

//----- (00753560) --------------------------------------------------------
int __cdecl ll_require(lua_State *L)
{
  const char *v1; // edi@1

  v1 = luaL_checklstring(L, 1, 0);
  lua_settop(L, 1);
  lua_getfield(L, -1001000, "_LOADED");
  lua_getfield(L, 2, v1);
  if ( !lua_toboolean(L, -1) )
  {
    lua_settop(L, -2);
    findloader(L, v1);
    lua_pushstring(L, v1);
    lua_insert(L, -2);
    lua_callk(L, 2, 1, 0, 0);
    if ( lua_type(L, -1) )
      lua_setfield(L, 2, v1);
    lua_getfield(L, 2, v1);
    if ( !lua_type(L, -1) )
    {
      lua_pushboolean(L, 1);
      lua_pushvalue(L, -1);
      lua_setfield(L, 2, v1);
    }
  }
  return 1;
}

//----- (00753630) --------------------------------------------------------
void __usercall setpath(lua_State *L@<ecx>, const char *envname1@<eax>, const char *fieldname, const char *envname2, const char *def)
{
  lua_State *v5; // esi@1
  const char *v6; // edi@1
  int v7; // ebx@3
  const char *v8; // eax@4

  v5 = L;
  v6 = getenv(envname1);
  if ( (v6 || (v6 = getenv(envname2)) != 0)
    && (lua_getfield(v5, -1001000, "LUA_NOENV"), v7 = lua_toboolean(v5, -1), lua_settop(v5, -2), !v7) )
  {
    v8 = luaL_gsub(v5, v6, ";;", ";\x01;");
    luaL_gsub(v5, v8, &byte_9D479C, def);
    lua_remove(v5, -2);
  }
  else
  {
    lua_pushstring(v5, def);
  }
  setprogdir(v5);
  lua_setfield(v5, -2, fieldname);
}

//----- (007536E0) --------------------------------------------------------
void __usercall createsearcherstable(lua_State *L@<edi>)
{
  int v1; // esi@1
  int (__cdecl **v2)(lua_State *); // ebx@2

  lua_createtable(L, 4, 0);
  v1 = 0;
  if ( searchers[0] )
  {
    v2 = (int (__cdecl **)(lua_State *))searchers;
    do
    {
      lua_pushvalue(L, -2);
      lua_pushcclosure(L, *v2, 1);
      lua_rawseti(L, -2, ++v1);
      v2 = (int (__cdecl **)(lua_State *))(4 * v1 + 10307108);
    }
    while ( searchers[v1] );
  }
}

//----- (00753730) --------------------------------------------------------
int __cdecl luaopen_package(lua_State *L)
{
  luaL_getsubtable(L, -1001000, "_CLIBS");
  lua_createtable(L, 0, 1);
  lua_pushcclosure(L, gctm, 0);
  lua_setfield(L, -2, "__gc");
  lua_setmetatable(L, -2);
  lua_createtable(L, 0, 2);
  luaL_setfuncs(L, pk_funcs, 0);
  createsearcherstable(L);
  lua_setfield(L, -2, "searchers");
  setpath(L, "LUA_PATH_5_2", "path", "LUA_PATH", "!\\lua\\?.lua;!\\lua\\?\\init.lua;!\\?.lua;!\\?\\init.lua;.\\?.lua");
  setpath(L, "LUA_CPATH_5_2", "cpath", "LUA_CPATH", "!\\?.dll;!\\loadall.dll;.\\?.dll");
  lua_pushlstring(L, "\\\n;\n?\n!\n-\n", 0xAu);
  lua_setfield(L, -2, "config");
  luaL_getsubtable(L, -1001000, "_LOADED");
  lua_setfield(L, -2, "loaded");
  luaL_getsubtable(L, -1001000, "_PRELOAD");
  lua_setfield(L, -2, "preload");
  lua_rawgeti(L, -1001000, 2);
  lua_pushvalue(L, -2);
  luaL_setfuncs(L, ll_funcs, 1);
  lua_settop(L, -2);
  return 1;
}

//----- (00753870) --------------------------------------------------------
int __cdecl luaB_print(lua_State *L)
{
  int i; // edi@1
  const char *v2; // ebx@2
  _iobuf *v3; // eax@4
  _iobuf *v4; // eax@5
  _iobuf *v5; // eax@6
  _iobuf *v6; // eax@6
  int n; // [sp+Ch] [bp-8h]@1
  unsigned int l; // [sp+10h] [bp-4h]@2

  n = lua_gettop(L);
  lua_getglobal(L, "tostring");
  for ( i = 1; i <= n; ++i )
  {
    lua_pushvalue(L, -1);
    lua_pushvalue(L, i);
    lua_callk(L, 1, 1, 0, 0);
    v2 = lua_tolstring(L, -1, &l);
    if ( !v2 )
      luaL_error(L, "'tostring' must return a string to 'print'");
    if ( i > 1 )
    {
      v3 = __iob_func();
      fwrite("\t", 1u, 1u, v3 + 1);
    }
    v4 = __iob_func();
    fwrite(v2, 1u, l, v4 + 1);
    lua_settop(L, -2);
  }
  v5 = __iob_func();
  fwrite("\n", 1u, 1u, v5 + 1);
  v6 = __iob_func();
  fflush(v6 + 1);
  return 0;
}

//----- (00753960) --------------------------------------------------------
int __cdecl luaB_tonumber(lua_State *L)
{
  double v1; // st7@2
  const char *v3; // eax@5
  char *v4; // esi@5
  int v5; // eax@5
  int v6; // ebx@5
  int v7; // eax@8
  char *v8; // esi@8
  int v9; // eax@15
  int v10; // eax@18
  int v11; // eax@19
  double n; // [sp+14h] [bp-1Ch]@13
  const char *e; // [sp+1Ch] [bp-14h]@5
  int base; // [sp+20h] [bp-10h]@5
  unsigned int l; // [sp+24h] [bp-Ch]@5
  int neg; // [sp+28h] [bp-8h]@2
  int digit; // [sp+2Ch] [bp-4h]@17

  if ( lua_type(L, 2) > 0 )
  {
    v3 = luaL_checklstring(L, 1, &l);
    v4 = (char *)v3;
    e = &v3[l];
    v5 = luaL_checkinteger(L, 2);
    v6 = v5;
    base = v5;
    neg = 0;
    if ( v5 < 2 || v5 > 36 )
      luaL_argerror(L, 2, "base out of range");
    strspn(v4, " \f\n\r\t\v");
    v8 = &v4[v7];
    if ( *v8 == 45 )
    {
      neg = 1;
    }
    else if ( *v8 != 43 )
    {
      goto LABEL_12;
    }
    ++v8;
LABEL_12:
    if ( !isalnum((unsigned __int8)*v8) )
      goto LABEL_4;
    n = 0.0;
    do
    {
      if ( isdigit((unsigned __int8)*v8) )
        v9 = *v8 - 48;
      else
        v9 = toupper((unsigned __int8)*v8) - 55;
      digit = v9;
      if ( v9 >= v6 )
        break;
      v10 = (unsigned __int8)(v8++)[1];
      n = (double)base * n + (double)digit;
    }
    while ( isalnum(v10) );
    strspn(v8, " \f\n\r\t\v");
    if ( &v8[v11] != e )
      goto LABEL_4;
    v1 = n;
    if ( neg )
      v1 = -n;
    goto LABEL_22;
  }
  v1 = lua_tonumberx(L, 1, &neg);
  if ( !neg )
  {
    luaL_checkany(L, 1);
LABEL_4:
    lua_pushnil(L);
    return 1;
  }
LABEL_22:
  lua_pushnumber(L, v1);
  return 1;
}

//----- (00753AD0) --------------------------------------------------------
void __cdecl __noreturn luaB_error(lua_State *L)
{
  int v1; // edi@1

  v1 = luaL_optinteger(L, 2, 1);
  lua_settop(L, 1);
  if ( lua_isstring(L, 1) )
  {
    if ( v1 > 0 )
    {
      luaL_where(L, v1);
      lua_pushvalue(L, 1);
      lua_concat(L, 2);
    }
  }
  lua_error(L);
}

//----- (00753B30) --------------------------------------------------------
int __cdecl luaB_getmetatable(lua_State *L)
{
  int result; // eax@2

  luaL_checkany(L, 1);
  if ( lua_getmetatable(L, 1) )
  {
    luaL_getmetafield(L, 1, "__metatable");
    result = 1;
  }
  else
  {
    lua_pushnil(L);
    result = 1;
  }
  return result;
}

//----- (00753B80) --------------------------------------------------------
int __cdecl luaB_setmetatable(lua_State *L)
{
  int v1; // edi@1

  v1 = lua_type(L, 2);
  luaL_checktype(L, 1, 5);
  if ( v1 && v1 != 5 )
    luaL_argerror(L, 2, "nil or table expected");
  if ( luaL_getmetafield(L, 1, "__metatable") )
    luaL_error(L, "cannot change a protected metatable");
  lua_settop(L, 2);
  lua_setmetatable(L, 1);
  return 1;
}

//----- (00753C00) --------------------------------------------------------
int __cdecl luaB_rawequal(lua_State *L)
{
  int v1; // eax@1

  luaL_checkany(L, 1);
  luaL_checkany(L, 2);
  v1 = lua_rawequal(L, 1, 2);
  lua_pushboolean(L, v1);
  return 1;
}

//----- (00753C40) --------------------------------------------------------
int __cdecl luaB_rawlen(lua_State *L)
{
  int v1; // eax@1
  int v2; // eax@4

  v1 = lua_type(L, 1);
  if ( v1 != 5 && v1 != 4 )
    luaL_argerror(L, 1, "table or string expected");
  v2 = lua_rawlen(L, 1);
  lua_pushinteger(L, v2);
  return 1;
}

//----- (00753C90) --------------------------------------------------------
int __cdecl luaB_rawget(lua_State *L)
{
  luaL_checktype(L, 1, 5);
  luaL_checkany(L, 2);
  lua_settop(L, 2);
  lua_rawget(L, 1);
  return 1;
}

//----- (00753CD0) --------------------------------------------------------
int __cdecl luaB_rawset(lua_State *L)
{
  luaL_checktype(L, 1, 5);
  luaL_checkany(L, 2);
  luaL_checkany(L, 3);
  lua_settop(L, 3);
  lua_rawset(L, 1);
  return 1;
}

//----- (00753D10) --------------------------------------------------------
int __cdecl luaB_collectgarbage(lua_State *L)
{
  int v1; // edi@1
  int v2; // eax@1
  int v3; // eax@1
  int v4; // edi@1
  int v5; // edi@2
  int result; // eax@4
  int v7; // edi@6
  int res; // [sp+10h] [bp-8h]@1

  v1 = optsnum[luaL_checkoption(L, 1, "collect", opts)];
  v2 = luaL_optinteger(L, 2, 0);
  v3 = lua_gc(L, v1, v2);
  v4 = v1 - 3;
  res = v3;
  if ( v4 )
  {
    v5 = v4 - 2;
    if ( v5 && v5 != 4 )
    {
      lua_pushinteger(L, v3);
      result = 1;
    }
    else
    {
      lua_pushboolean(L, v3);
      result = 1;
    }
  }
  else
  {
    v7 = lua_gc(L, 4, 0);
    lua_pushnumber(L, (double)v7 * 0.0009765625 + (double)res);
    lua_pushinteger(L, v7);
    result = 2;
  }
  return result;
}

//----- (00753DD0) --------------------------------------------------------
int __cdecl luaB_type(lua_State *L)
{
  int v1; // eax@1
  char *v2; // eax@1

  luaL_checkany(L, 1);
  v1 = lua_type(L, 1);
  v2 = lua_typename(L, v1);
  lua_pushstring(L, v2);
  return 1;
}

//----- (00753E00) --------------------------------------------------------
int __cdecl luaB_next(lua_State *L)
{
  int result; // eax@2

  luaL_checktype(L, 1, 5);
  lua_settop(L, 2);
  if ( lua_next(L, 1) )
  {
    result = 2;
  }
  else
  {
    lua_pushnil(L);
    result = 1;
  }
  return result;
}

//----- (00753E50) --------------------------------------------------------
int __cdecl luaB_pairs(lua_State *L)
{
  int result; // eax@2

  if ( luaL_getmetafield(L, 1, "__pairs") )
  {
    lua_pushvalue(L, 1);
    lua_callk(L, 1, 3, 0, 0);
    result = 3;
  }
  else
  {
    luaL_checktype(L, 1, 5);
    lua_pushcclosure(L, luaB_next, 0);
    lua_pushvalue(L, 1);
    lua_pushnil(L);
    result = 3;
  }
  return result;
}

//----- (00753EC0) --------------------------------------------------------
int __cdecl ipairsaux(lua_State *L)
{
  int v1; // edi@1

  v1 = luaL_checkinteger(L, 2) + 1;
  luaL_checktype(L, 1, 5);
  lua_pushinteger(L, v1);
  lua_rawgeti(L, 1, v1);
  return (lua_type(L, -1) != 0) + 1;
}

//----- (00753F10) --------------------------------------------------------
int __cdecl luaB_ipairs(lua_State *L)
{
  int result; // eax@2

  if ( luaL_getmetafield(L, 1, "__ipairs") )
  {
    lua_pushvalue(L, 1);
    lua_callk(L, 1, 3, 0, 0);
    result = 3;
  }
  else
  {
    luaL_checktype(L, 1, 5);
    lua_pushcclosure(L, ipairsaux, 0);
    lua_pushvalue(L, 1);
    lua_pushinteger(L, 0);
    result = 3;
  }
  return result;
}

//----- (00753F80) --------------------------------------------------------
int __cdecl luaB_loadfile(lua_State *L)
{
  const char *v1; // ebx@1
  const char *mode; // ST40_4@1
  int v3; // esi@1
  int result; // eax@5

  v1 = luaL_optlstring(L, 1, 0, 0);
  mode = luaL_optlstring(L, 2, 0, 0);
  v3 = lua_type(L, 3) != -1 ? 3 : 0;
  if ( luaL_loadfilex(L, v1, mode) )
  {
    lua_pushnil(L);
    lua_insert(L, -2);
    result = 2;
  }
  else
  {
    if ( v3 )
    {
      lua_pushvalue(L, v3);
      if ( !lua_setupvalue(L, -2, 1) )
        lua_settop(L, -2);
    }
    result = 1;
  }
  return result;
}

//----- (00754020) --------------------------------------------------------
const char *__cdecl generic_reader(lua_State *L, void *ud, unsigned int *size)
{
  const char *result; // eax@2

  luaL_checkstack(L, 2, "too many nested functions");
  lua_pushvalue(L, 1);
  lua_callk(L, 0, 1, 0, 0);
  if ( lua_type(L, -1) )
  {
    if ( !lua_isstring(L, -1) )
      luaL_error(L, "reader function must return a string");
    lua_replace(L, 5);
    result = lua_tolstring(L, 5, size);
  }
  else
  {
    lua_settop(L, -2);
    *size = 0;
    result = 0;
  }
  return result;
}

//----- (007540B0) --------------------------------------------------------
int __cdecl luaB_load(lua_State *L)
{
  const char *v1; // ebx@1
  int v2; // edi@1
  const char *v3; // eax@2
  int v4; // eax@2
  const char *v5; // ebx@3
  int result; // eax@8
  unsigned int l; // [sp+Ch] [bp-8h]@1
  const char *mode; // [sp+10h] [bp-4h]@1

  v1 = lua_tolstring(L, 1, &l);
  mode = luaL_optlstring(L, 3, "bt", 0);
  v2 = lua_type(L, 4) != -1 ? 4 : 0;
  if ( v1 )
  {
    v3 = luaL_optlstring(L, 2, v1, 0);
    v4 = luaL_loadbufferx(L, v1, l, v3, mode);
  }
  else
  {
    v5 = luaL_optlstring(L, 2, "=(load)", 0);
    luaL_checktype(L, 1, 6);
    lua_settop(L, 5);
    v4 = lua_load(L, generic_reader, 0, v5, mode);
  }
  if ( v4 )
  {
    lua_pushnil(L);
    lua_insert(L, -2);
    result = 2;
  }
  else
  {
    if ( v2 )
    {
      lua_pushvalue(L, v2);
      if ( !lua_setupvalue(L, -2, 1) )
        lua_settop(L, -2);
    }
    result = 1;
  }
  return result;
}

//----- (007541A0) --------------------------------------------------------
int __cdecl dofilecont(lua_State *L)
{
  return lua_gettop(L) - 1;
}

//----- (007541C0) --------------------------------------------------------
int __cdecl luaB_dofile(lua_State *L)
{
  const char *v1; // edi@1

  v1 = luaL_optlstring(L, 1, 0, 0);
  lua_settop(L, 1);
  if ( luaL_loadfilex(L, v1, 0) )
    lua_error(L);
  lua_callk(L, 0, -1, 0, dofilecont);
  return lua_gettop(L) - 1;
}

//----- (00754220) --------------------------------------------------------
int __cdecl luaB_assert(lua_State *L)
{
  const char *v1; // eax@2

  if ( !lua_toboolean(L, 1) )
  {
    v1 = luaL_optlstring(L, 2, "assertion failed!", 0);
    luaL_error(L, "%s", v1);
  }
  return lua_gettop(L);
}

//----- (00754270) --------------------------------------------------------
int __cdecl luaB_select(lua_State *L)
{
  int v1; // ebx@1
  int result; // eax@3
  int v3; // eax@4
  int v4; // esi@4

  v1 = lua_gettop(L);
  if ( lua_type(L, 1) != 4 || *lua_tolstring(L, 1, 0) != 35 )
  {
    v3 = luaL_checkinteger(L, 1);
    v4 = v3;
    if ( v3 >= 0 )
    {
      if ( v3 > v1 )
        v4 = v1;
    }
    else
    {
      v4 = v1 + v3;
    }
    if ( v4 < 1 )
      luaL_argerror(L, 1, "index out of range");
    result = v1 - v4;
  }
  else
  {
    lua_pushinteger(L, v1 - 1);
    result = 1;
  }
  return result;
}

//----- (007542F0) --------------------------------------------------------
int __cdecl pcallcont(lua_State *L)
{
  int v1; // edi@1
  int result; // eax@2

  v1 = lua_getctx(L, 0);
  if ( lua_checkstack(L, 1) )
  {
    lua_pushboolean(L, v1 == 1);
    lua_replace(L, 1);
    result = lua_gettop(L);
  }
  else
  {
    lua_settop(L, 0);
    lua_pushboolean(L, 0);
    lua_pushstring(L, "stack overflow");
    result = 2;
  }
  return result;
}

//----- (00754360) --------------------------------------------------------
int __cdecl luaB_pcall(lua_State *L)
{
  int v1; // eax@1
  int v2; // edi@1
  int result; // eax@2

  luaL_checkany(L, 1);
  lua_pushnil(L);
  lua_insert(L, 1);
  v1 = lua_gettop(L);
  v2 = lua_pcallk(L, v1 - 2, -1, 0, 0, pcallcont);
  if ( lua_checkstack(L, 1) )
  {
    lua_pushboolean(L, v2 == 0);
    lua_replace(L, 1);
    result = lua_gettop(L);
  }
  else
  {
    lua_settop(L, 0);
    lua_pushboolean(L, 0);
    lua_pushstring(L, "stack overflow");
    result = 2;
  }
  return result;
}

//----- (00754400) --------------------------------------------------------
int __cdecl luaB_xpcall(lua_State *L)
{
  int v1; // edi@1
  int v2; // edi@3
  int result; // eax@4

  v1 = lua_gettop(L);
  if ( v1 < 2 )
    luaL_argerror(L, 2, "value expected");
  lua_pushvalue(L, 1);
  lua_copy(L, 2, 1);
  lua_replace(L, 2);
  v2 = lua_pcallk(L, v1 - 2, -1, 1, 0, pcallcont);
  if ( lua_checkstack(L, 1) )
  {
    lua_pushboolean(L, v2 == 0);
    lua_replace(L, 1);
    result = lua_gettop(L);
  }
  else
  {
    lua_settop(L, 0);
    lua_pushboolean(L, 0);
    lua_pushstring(L, "stack overflow");
    result = 2;
  }
  return result;
}

//----- (007544C0) --------------------------------------------------------
int __cdecl luaB_tostring(lua_State *L)
{
  luaL_checkany(L, 1);
  luaL_tolstring(L, 1, 0);
  return 1;
}

//----- (007544F0) --------------------------------------------------------
int __cdecl luaopen_base(lua_State *L)
{
  lua_rawgeti(L, -1001000, 2);
  lua_rawgeti(L, -1001000, 2);
  lua_setfield(L, -2, "_G");
  luaL_setfuncs(L, base_funcs, 0);
  lua_pushlstring(L, "Lua 5.2", 7u);
  lua_setfield(L, -2, "_VERSION");
  return 1;
}

//----- (00754550) --------------------------------------------------------
void __cdecl __noreturn luaM_toobig(lua_State *L)
{
  luaG_runerror(L, "memory allocation error: block too big");
}

//----- (00754570) --------------------------------------------------------
void *__cdecl luaM_realloc_(lua_State *L, void *block, unsigned int osize, unsigned int nsize)
{
  global_State *v4; // esi@1
  void *result; // eax@1

  v4 = L->l_G;
  result = (void *)v4->frealloc(v4->ud, block, osize, nsize);
  if ( !result )
  {
    if ( nsize )
    {
      if ( !v4->gcrunning || (luaC_fullgc(L, 1), (result = (void *)v4->frealloc(v4->ud, block, osize, nsize)) == 0) )
        luaD_throw(L, 4);
    }
  }
  v4->GCdebt += nsize - (block != 0 ? osize : 0);
  return result;
}

//----- (007545E0) --------------------------------------------------------
void *__cdecl luaM_growaux_(lua_State *L, void *block, int *size, unsigned int size_elems, int limit, const char *what)
{
  int v6; // esi@1
  int v7; // ecx@1
  void *result; // eax@8

  v6 = limit;
  v7 = *size;
  if ( *size < limit / 2 )
  {
    v6 = 2 * v7;
    if ( 2 * v7 < 4 )
      v6 = 4;
  }
  else if ( v7 >= limit )
  {
    luaG_runerror(L, "too many %s (limit is %d)", what, limit);
  }
  if ( v6 + 1 > 0xFFFFFFFD / size_elems )
    luaG_runerror(L, "memory allocation error: block too big");
  result = luaM_realloc_(L, block, size_elems * v7, size_elems * v6);
  *size = v6;
  return result;
}

//----- (00754660) --------------------------------------------------------
void __cdecl sub_754660(int c)
{
  LexState *ls; // ecx@0
  Mbuffer *v2; // esi@1
  unsigned int v3; // eax@1
  int v4; // edi@4
  char *v5; // eax@6

  v2 = ls->buff;
  v3 = v2->buffsize;
  if ( v2->n + 1 > v3 )
  {
    if ( v3 >= 0x7FFFFFFE )
      lexerror(ls, "lexical element too long", 0);
    v4 = 2 * v3;
    if ( 2 * v3 + 1 > 0xFFFFFFFD )
      luaM_toobig(ls->L);
    v5 = (char *)luaM_realloc_(ls->L, v2->buffer, v3, 2 * v3);
    v2->buffsize = v4;
    v2->buffer = v5;
  }
  v2->buffer[v2->n++] = c;
}

//----- (007546D0) --------------------------------------------------------
void __cdecl luaX_init(lua_State *L)
{
  signed int v1; // ebx@1
  GCObject *v2; // eax@2

  v1 = 0;
  do
  {
    v2 = luaS_new(L, luaX_tokens[v1]);
    v2->h.marked |= 0x20u;
    *(&v2->p.marked + 1) = ++v1;
  }
  while ( v1 < 22 );
}

//----- (00754710) --------------------------------------------------------
const char *__cdecl luaX_token2str(LexState *ls, int token)
{
  const char *result; // eax@3

  if ( token >= 257 )
  {
    result = *(const char **)&aPcall[4 * token];
    if ( token < 286 )
      result = luaO_pushfstring(ls->L, "'%s'", result);
  }
  else if ( byte_9D4E79[token] & 4 )
  {
    result = luaO_pushfstring(ls->L, "'%c'", token);
  }
  else
  {
    result = luaO_pushfstring(ls->L, "char(%d)", token);
  }
  return result;
}

//----- (00754780) --------------------------------------------------------
void __cdecl __noreturn lexerror(LexState *ls, const char *msg, int token)
{
  const char *v3; // ebx@1
  const char *v4; // eax@4
  char buff[60]; // [sp+Ch] [bp-3Ch]@1

  luaO_chunkid(buff, (const char *)&ls->source[1], 0x3Cu);
  v3 = luaO_pushfstring(ls->L, "%s:%d: %s", buff, ls->linenumber, msg);
  if ( token )
  {
    if ( token < 287 || token > 289 )
    {
      v4 = luaX_token2str(ls, token);
    }
    else
    {
      sub_754660(0);
      v4 = luaO_pushfstring(ls->L, "'%s'", ls->buff->buffer);
    }
    luaO_pushfstring(ls->L, "%s near %s", v3, v4);
  }
  luaD_throw(ls->L, 3);
}

//----- (00754820) --------------------------------------------------------
void __cdecl __noreturn luaX_syntaxerror(LexState *ls, const char *msg)
{
  lexerror(ls, msg, ls->t.token);
}

//----- (00754840) --------------------------------------------------------
GCObject *__cdecl luaX_newstring(LexState *ls, const char *str, unsigned int l)
{
  lua_State *v3; // esi@1
  GCObject *v4; // edi@1
  lua_TValue *v5; // eax@1
  Node *v6; // eax@1

  v3 = ls->L;
  v4 = luaS_newlstr(ls->L, str, l);
  v5 = v3->top;
  v3->top = v5 + 1;
  v5->u.i.v__.b = (int)v4;
  v5->u.i.tt__ = v4->cl.c.tt | 0x7FF7A540;
  v6 = luaH_set(v3, ls->fs->h, v3->top - 1);
  if ( v6->i_val.u.i.tt__ == 2146936064 )
  {
    v6->i_val.u.i.v__.b = 1;
    v6->i_val.u.i.tt__ = 2146936065;
    if ( v3->l_G->GCdebt > 0 )
      luaC_step(v3);
  }
  --v3->top;
  return v4;
}

//----- (007548C0) --------------------------------------------------------
void __usercall inclinenumber(LexState *ls@<esi>)
{
  Zio *v1; // eax@1
  unsigned int v2; // ecx@1
  int v3; // edi@1
  Zio *v4; // ecx@2
  const char *v5; // edx@2
  int v6; // eax@2
  Zio *v7; // eax@7
  unsigned int v8; // ecx@7
  Zio *v9; // ecx@8
  const char *v10; // edx@8
  int v11; // eax@8

  v1 = ls->z;
  v2 = v1->n;
  v3 = ls->current;
  --v1->n;
  if ( v2 )
  {
    v4 = ls->z;
    v5 = v4->p;
    v6 = *v5;
    v4->p = v5 + 1;
  }
  else
  {
    v6 = luaZ_fill(ls->z);
  }
  ls->current = v6;
  if ( (v6 == 10 || v6 == 13) && v6 != v3 )
  {
    v7 = ls->z;
    v8 = v7->n--;
    if ( v8 )
    {
      v9 = ls->z;
      v10 = v9->p;
      v11 = *v10;
      v9->p = v10 + 1;
    }
    else
    {
      v11 = luaZ_fill(ls->z);
    }
    ls->current = v11;
  }
  if ( ++ls->linenumber >= 2147483645 )
    lexerror(ls, "chunk has too many lines", ls->t.token);
}

//----- (00754950) --------------------------------------------------------
void __cdecl luaX_setinput(lua_State *L, LexState *ls, Zio *z, TString *source, int firstchar)
{
  GCObject *v5; // eax@1

  ls->current = firstchar;
  ls->linenumber = 1;
  ls->lastline = 1;
  ls->decpoint = 46;
  ls->L = L;
  ls->lookahead.token = 286;
  ls->z = z;
  ls->fs = 0;
  ls->source = source;
  v5 = luaS_new(L, "_ENV");
  ls->envn = (TString *)v5;
  v5->h.marked |= 0x20u;
  ls->buff->buffer = (char *)luaM_realloc_(ls->L, ls->buff->buffer, ls->buff->buffsize, 0x20u);
  ls->buff->buffsize = 32;
}

//----- (007549D0) --------------------------------------------------------
int __usercall check_next@<eax>(LexState *ls@<esi>, const char *set)
{
  int v2; // eax@2
  Zio *v3; // eax@3
  unsigned int v4; // ecx@3
  Zio *v5; // ecx@4
  const char *v6; // edx@4
  int v7; // eax@4
  int result; // eax@4

  if ( ls->current && (strchr((char *)set, ls->current), v2) )
  {
    sub_754660(ls->current);
    v3 = ls->z;
    v4 = v3->n--;
    if ( v4 )
    {
      v5 = ls->z;
      v6 = v5->p;
      v7 = *v6;
      v5->p = v6 + 1;
      ls->current = v7;
      result = 1;
    }
    else
    {
      ls->current = luaZ_fill(ls->z);
      result = 1;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00754A40) --------------------------------------------------------
void __usercall trydecpoint(LexState *ls@<esi>, SemInfo *seminfo)
{
  char v2; // bl@1
  char v3; // dl@1
  Mbuffer *v4; // ecx@1
  unsigned int v5; // eax@1
  char *v6; // ecx@1
  Mbuffer *v7; // ecx@6
  unsigned int v8; // eax@6
  char v9; // dl@6
  char *v10; // ecx@6

  v2 = ls->decpoint;
  v3 = *localeconv()->decimal_point;
  v4 = ls->buff;
  ls->decpoint = v3;
  v5 = v4->n;
  v6 = v4->buffer;
  while ( v5 )
  {
    if ( v6[--v5] == v2 )
      v6[v5] = v3;
  }
  if ( !luaO_str2d(ls->buff->buffer, ls->buff->n - 1, (long double *)&seminfo->ts) )
  {
    v7 = ls->buff;
    v8 = v7->n;
    v9 = ls->decpoint;
    v10 = v7->buffer;
    while ( v8 )
    {
      if ( v10[--v8] == v9 )
        v10[v8] = 46;
    }
    lexerror(ls, "malformed number", 287);
  }
}

//----- (00754AC0) --------------------------------------------------------
void __usercall read_numeral(LexState *ls@<eax>, SemInfo *seminfo)
{
  LexState *v2; // esi@1
  int v3; // edi@1
  unsigned int *v4; // eax@1
  unsigned int v5; // ecx@1
  Zio *v6; // ecx@2
  const char *v7; // edx@2
  int v8; // eax@2
  int v9; // eax@8
  Mbuffer *v10; // edi@9
  unsigned int v11; // eax@9
  lua_State *v12; // ecx@11
  int v13; // ebx@11
  unsigned int *v14; // eax@13
  unsigned int v15; // ecx@13
  Zio *v16; // ecx@14
  const char *v17; // edx@14
  int v18; // eax@14
  int v19; // eax@17
  unsigned int *v20; // eax@18
  unsigned int v21; // ecx@18
  Zio *v22; // ecx@19
  const char *v23; // edx@19
  int v24; // eax@19
  int v25; // ecx@22
  Mbuffer *v26; // edi@24
  unsigned int v27; // eax@24
  int v28; // ebx@26
  char *v29; // eax@27
  unsigned int *v30; // eax@28
  unsigned int v31; // ecx@28
  Zio *v32; // ecx@29
  const char *v33; // edx@29
  int v34; // eax@29
  Mbuffer *v35; // ecx@32
  unsigned int v36; // eax@32
  char v37; // dl@32
  char *v38; // ecx@32
  int v39; // [sp+8h] [bp-8h]@9
  int v40; // [sp+8h] [bp-8h]@22
  char *expo; // [sp+Ch] [bp-4h]@1

  v2 = ls;
  v3 = ls->current;
  expo = "Ee";
  sub_754660(ls->current);
  v4 = &v2->z->n;
  v5 = (*v4)--;
  if ( v5 )
  {
    v6 = v2->z;
    v7 = v6->p;
    v8 = *v7;
    v6->p = v7 + 1;
  }
  else
  {
    v8 = luaZ_fill(v2->z);
  }
  v2->current = v8;
  if ( v3 == 48 && check_next(v2, "Xx") )
    expo = "Pp";
  while ( 1 )
  {
    if ( v2->current )
    {
      strchr(expo, v2->current);
      if ( v9 )
      {
        v10 = v2->buff;
        v11 = v10->buffsize;
        v39 = v2->current;
        if ( v10->n + 1 > v11 )
        {
          if ( v11 >= 0x7FFFFFFE )
            goto LABEL_31;
          v12 = v2->L;
          v13 = 2 * v11;
          if ( 2 * v11 + 1 > 0xFFFFFFFD )
            goto LABEL_40;
          v10->buffer = (char *)luaM_realloc_(v12, v10->buffer, v11, 2 * v11);
          v10->buffsize = v13;
        }
        v10->buffer[v10->n++] = v39;
        v14 = &v2->z->n;
        v15 = (*v14)--;
        if ( v15 )
        {
          v16 = v2->z;
          v17 = v16->p;
          v18 = *v17;
          v16->p = v17 + 1;
        }
        else
        {
          v18 = luaZ_fill(v2->z);
        }
        v2->current = v18;
        if ( v18 )
        {
          strchr("+-", v18);
          if ( v19 )
          {
            sub_754660(v2->current);
            v20 = &v2->z->n;
            v21 = (*v20)--;
            if ( v21 )
            {
              v22 = v2->z;
              v23 = v22->p;
              v24 = *v23;
              v22->p = v23 + 1;
            }
            else
            {
              v24 = luaZ_fill(v2->z);
            }
            v2->current = v24;
          }
        }
      }
    }
    v25 = v2->current;
    v40 = v2->current;
    if ( !(byte_9D4E79[v2->current] & 0x10) && v25 != 46 )
      break;
    v26 = v2->buff;
    v27 = v26->buffsize;
    if ( v26->n + 1 > v27 )
    {
      if ( v27 >= 0x7FFFFFFE )
LABEL_31:
        lexerror(v2, "lexical element too long", 0);
      v28 = 2 * v27;
      if ( 2 * v27 + 1 > 0xFFFFFFFD )
      {
        v12 = v2->L;
LABEL_40:
        luaM_toobig(v12);
      }
      v29 = (char *)luaM_realloc_(v2->L, v26->buffer, v27, 2 * v27);
      LOBYTE(v25) = v40;
      v26->buffer = v29;
      v26->buffsize = v28;
    }
    v26->buffer[v26->n++] = v25;
    v30 = &v2->z->n;
    v31 = (*v30)--;
    if ( v31 )
    {
      v32 = v2->z;
      v33 = v32->p;
      v34 = *v33;
      v32->p = v33 + 1;
      v2->current = v34;
    }
    else
    {
      v2->current = luaZ_fill(v2->z);
    }
  }
  sub_754660(0);
  v35 = v2->buff;
  v36 = v35->n;
  v37 = v2->decpoint;
  v38 = v35->buffer;
  while ( v36 )
  {
    if ( v38[--v36] == 46 )
      v38[v36] = v37;
  }
  if ( !luaO_str2d(v2->buff->buffer, v2->buff->n - 1, (long double *)&seminfo->ts) )
    trydecpoint(v2, seminfo);
}

//----- (00754D20) --------------------------------------------------------
int __usercall skip_sep@<eax>(LexState *ls@<edi>)
{
  int v1; // esi@1
  Zio *v2; // eax@1
  unsigned int v3; // ecx@1
  Zio *v4; // ecx@2
  const char *v5; // edx@2
  int v6; // eax@2
  Mbuffer *v7; // esi@5
  unsigned int v8; // eax@5
  int v9; // ebx@7
  Zio *v10; // eax@9
  unsigned int v11; // ecx@9
  Zio *v12; // ecx@10
  const char *v13; // edx@10
  int v14; // eax@10
  int result; // eax@15
  int v16; // [sp+4h] [bp-Ch]@1
  int v17; // [sp+8h] [bp-8h]@5
  int count; // [sp+Ch] [bp-4h]@1

  v1 = ls->current;
  count = 0;
  v16 = ls->current;
  sub_754660(ls->current);
  v2 = ls->z;
  v3 = v2->n--;
  if ( v3 )
  {
    v4 = ls->z;
    v5 = v4->p;
    v6 = *v5;
    v4->p = v5 + 1;
  }
  else
  {
    v6 = luaZ_fill(ls->z);
  }
  ls->current = v6;
  if ( v6 == 61 )
  {
    do
    {
      v7 = ls->buff;
      v8 = v7->buffsize;
      v17 = ls->current;
      if ( v7->n + 1 > v8 )
      {
        if ( v8 >= 0x7FFFFFFE )
          lexerror(ls, "lexical element too long", 0);
        v9 = 2 * v8;
        if ( 2 * v8 + 1 > 0xFFFFFFFD )
          luaM_toobig(ls->L);
        v7->buffer = (char *)luaM_realloc_(ls->L, v7->buffer, v8, 2 * v8);
        v7->buffsize = v9;
      }
      v7->buffer[v7->n++] = v17;
      v10 = ls->z;
      v11 = v10->n--;
      if ( v11 )
      {
        v12 = ls->z;
        v13 = v12->p;
        v14 = *v13;
        v12->p = v13 + 1;
      }
      else
      {
        v14 = luaZ_fill(ls->z);
      }
      ++count;
      ls->current = v14;
    }
    while ( v14 == 61 );
    v1 = v16;
  }
  if ( ls->current == v1 )
    result = count;
  else
    result = -1 - count;
  return result;
}

//----- (00754E30) --------------------------------------------------------
void __usercall read_long_string(LexState *ls@<eax>, SemInfo *seminfo, int sep)
{
  LexState *v3; // esi@1
  unsigned int *v4; // eax@1
  unsigned int v5; // ecx@1
  Zio *v6; // ecx@2
  const char *v7; // edx@2
  int v8; // eax@2
  int v9; // ecx@7
  unsigned int *v10; // eax@9
  unsigned int v11; // ecx@9
  Zio *v12; // ecx@10
  const char *v13; // edx@10
  int v14; // eax@10
  Mbuffer *v15; // edi@11
  unsigned int v16; // eax@11
  int v17; // ebx@13
  Mbuffer *v18; // edi@18
  unsigned int v19; // eax@18
  int v20; // ebx@20
  char *v21; // eax@21
  unsigned int *v22; // eax@23
  unsigned int v23; // ecx@23
  Zio *v24; // ecx@24
  const char *v25; // edx@24
  int v26; // eax@24
  const char *v27; // eax@26
  int v28; // [sp+Ch] [bp-4h]@7

  v3 = ls;
  sub_754660(ls->current);
  v4 = &v3->z->n;
  v5 = (*v4)--;
  if ( v5 )
  {
    v6 = v3->z;
    v7 = v6->p;
    v8 = *v7;
    v6->p = v7 + 1;
  }
  else
  {
    v8 = luaZ_fill(v3->z);
  }
  v3->current = v8;
  if ( v8 == 10 || v8 == 13 )
    inclinenumber(v3);
  while ( 1 )
  {
    v9 = v3->current;
    v28 = v3->current;
    switch ( v3->current )
    {
      case 0x5D:
        if ( skip_sep(v3) != sep )
          continue;
        sub_754660(v3->current);
        v10 = &v3->z->n;
        v11 = (*v10)--;
        if ( v11 )
        {
          v12 = v3->z;
          v13 = v12->p;
          v14 = *v13;
          v12->p = v13 + 1;
        }
        else
        {
          v14 = luaZ_fill(v3->z);
        }
        v3->current = v14;
        if ( seminfo )
          seminfo->ts = (TString *)luaX_newstring(v3, &v3->buff->buffer[sep + 2], v3->buff->n - 2 * sep - 4);
        return;
      case 0xA:
      case 0xD:
        v15 = v3->buff;
        v16 = v15->buffsize;
        if ( v15->n + 1 <= v16 )
          goto LABEL_15;
        if ( v16 >= 0x7FFFFFFE )
          goto LABEL_33;
        v17 = 2 * v16;
        if ( 2 * v16 + 1 > 0xFFFFFFFD )
          luaM_toobig(v3->L);
        v15->buffer = (char *)luaM_realloc_(v3->L, v15->buffer, v16, 2 * v16);
        v15->buffsize = v17;
LABEL_15:
        v15->buffer[v15->n++] = 10;
        inclinenumber(v3);
        if ( !seminfo )
          v3->buff->n = 0;
        break;
      default:
        if ( seminfo )
        {
          v18 = v3->buff;
          v19 = v18->buffsize;
          if ( v18->n + 1 > v19 )
          {
            if ( v19 >= 0x7FFFFFFE )
LABEL_33:
              lexerror(v3, "lexical element too long", 0);
            v20 = 2 * v19;
            if ( 2 * v19 + 1 > 0xFFFFFFFD )
              luaM_toobig(v3->L);
            v21 = (char *)luaM_realloc_(v3->L, v18->buffer, v19, 2 * v19);
            LOBYTE(v9) = v28;
            v18->buffer = v21;
            v18->buffsize = v20;
          }
          v18->buffer[v18->n++] = v9;
        }
        v22 = &v3->z->n;
        v23 = (*v22)--;
        if ( v23 )
        {
          v24 = v3->z;
          v25 = v24->p;
          v26 = *v25;
          v24->p = v25 + 1;
          v3->current = v26;
        }
        else
        {
          v3->current = luaZ_fill(v3->z);
        }
        break;
      case 0xFFFFFFFF:
        v27 = "unfinished long string";
        if ( !seminfo )
          v27 = "unfinished long comment";
        lexerror(v3, v27, 286);
        return;
    }
  }
}

//----- (007550C0) --------------------------------------------------------
void __cdecl __noreturn escerror(LexState *ls, int *c, int n, const char *msg)
{
  LexState *v4; // edi@1
  int v5; // ebx@1
  int v6; // ecx@2
  Mbuffer *v7; // esi@3
  unsigned int v8; // eax@3
  int v9; // edi@5
  char *v10; // eax@6
  char v11; // [sp+Ch] [bp-4h]@2

  v4 = ls;
  v5 = 0;
  ls->buff->n = 0;
  sub_754660(92);
  if ( n > 0 )
  {
    do
    {
      v6 = c[v5];
      v11 = c[v5];
      if ( v6 == -1 )
        break;
      v7 = v4->buff;
      v8 = v7->buffsize;
      if ( v7->n + 1 > v8 )
      {
        if ( v8 >= 0x7FFFFFFE )
          lexerror(v4, "lexical element too long", 0);
        v9 = 2 * v8;
        if ( 2 * v8 + 1 > 0xFFFFFFFD )
          luaM_toobig(ls->L);
        v10 = (char *)luaM_realloc_(ls->L, v7->buffer, v8, 2 * v8);
        LOBYTE(v6) = v11;
        v7->buffsize = v9;
        v4 = ls;
        v7->buffer = v10;
      }
      v7->buffer[v7->n++] = v6;
      ++v5;
    }
    while ( v5 < n );
  }
  lexerror(v4, msg, 289);
}

//----- (00755170) --------------------------------------------------------
int __usercall readhexaesc@<eax>(LexState *ls@<esi>)
{
  int v1; // ebx@1
  signed int v2; // edi@1
  Zio *v3; // eax@2
  unsigned int v4; // ecx@2
  Zio *v5; // ecx@3
  const char *v6; // edx@3
  int v7; // eax@3
  bool v8; // zf@5
  int c[3]; // [sp+8h] [bp-10h]@1

  v1 = 0;
  c[0] = 120;
  v2 = 1;
  do
  {
    v3 = ls->z;
    v4 = v3->n--;
    if ( v4 )
    {
      v5 = ls->z;
      v6 = v5->p;
      v7 = *v6;
      v5->p = v6 + 1;
    }
    else
    {
      v7 = luaZ_fill(ls->z);
    }
    ls->current = v7;
    v8 = (byte_9D4E79[v7] & 0x10) == 0;
    c[v2] = v7;
    if ( v8 )
      escerror(ls, c, v2 + 1, "hexadecimal digit expected");
    ++v2;
    v1 = luaO_hexavalue(v7) + 16 * v1;
  }
  while ( v2 < 3 );
  return v1;
}

//----- (00755200) --------------------------------------------------------
int __usercall readdecesc@<eax>(LexState *ls@<esi>)
{
  int v1; // edi@1
  int v2; // ebx@1
  int v3; // eax@2
  Zio *v4; // eax@3
  unsigned int v5; // ecx@3
  Zio *v6; // ecx@4
  const char *v7; // edx@4
  int v8; // eax@4
  int c[3]; // [sp+8h] [bp-10h]@3

  v1 = 0;
  v2 = 0;
  do
  {
    v3 = ls->current;
    if ( !(byte_9D4E79[ls->current] & 2) )
      break;
    v1 = v3 + 10 * v1 - 48;
    c[v2] = v3;
    v4 = ls->z;
    v5 = v4->n--;
    if ( v5 )
    {
      v6 = ls->z;
      v7 = v6->p;
      v8 = *v7;
      v6->p = v7 + 1;
    }
    else
    {
      v8 = luaZ_fill(ls->z);
    }
    ++v2;
    ls->current = v8;
  }
  while ( v2 < 3 );
  if ( v1 > 255 )
    escerror(ls, c, v2, "decimal escape too large");
  return v1;
}

//----- (007552A0) --------------------------------------------------------
void __usercall read_string(LexState *ls@<eax>, int del, SemInfo *seminfo)
{
  LexState *v3; // esi@1
  unsigned int *v4; // eax@1
  unsigned int v5; // ecx@1
  Zio *v6; // ecx@2
  const char *v7; // edx@2
  int v8; // eax@2
  int v9; // ecx@5
  unsigned int *v10; // eax@6
  unsigned int v11; // ecx@6
  Zio *v12; // ecx@7
  const char *v13; // edx@7
  int v14; // eax@7
  unsigned int *v15; // eax@19
  unsigned int v16; // ecx@19
  Zio *v17; // ecx@20
  const char *v18; // edx@20
  int v19; // eax@20
  unsigned int *v20; // eax@23
  unsigned int v21; // ecx@23
  Zio *v22; // ecx@24
  const char *v23; // edx@24
  int v24; // eax@24
  unsigned int *v25; // eax@29
  unsigned int v26; // ecx@29
  Zio *v27; // ecx@30
  const char *v28; // edx@30
  int v29; // eax@30
  Mbuffer *v30; // edi@37
  unsigned int v31; // eax@37
  int v32; // ebx@39
  Mbuffer *v33; // edi@42
  unsigned int v34; // eax@42
  int v35; // ebx@44
  char *v36; // eax@45
  unsigned int *v37; // eax@46
  unsigned int v38; // ecx@46
  Zio *v39; // ecx@47
  const char *v40; // edx@47
  int v41; // eax@47
  unsigned int *v42; // eax@51
  unsigned int v43; // ecx@51
  Zio *v44; // ecx@52
  const char *v45; // edx@52
  int v46; // eax@52
  int c; // [sp+4h] [bp-4h]@5
  char ca; // [sp+4h] [bp-4h]@10

  v3 = ls;
  sub_754660(ls->current);
  v4 = &v3->z->n;
  v5 = (*v4)--;
  if ( v5 )
  {
    v6 = v3->z;
    v7 = v6->p;
    v8 = *v7;
    v6->p = v7 + 1;
  }
  else
  {
    v8 = luaZ_fill(v3->z);
  }
  v3->current = v8;
  while ( v3->current != del )
  {
    v9 = v3->current;
    c = v3->current;
    switch ( v3->current )
    {
      case 0x5C:
        v10 = &v3->z->n;
        v11 = (*v10)--;
        if ( v11 )
        {
          v12 = v3->z;
          v13 = v12->p;
          v14 = *v13;
          v12->p = v13 + 1;
        }
        else
        {
          v14 = luaZ_fill(v3->z);
        }
        v3->current = v14;
        switch ( v14 )
        {
          case 97:
            ca = 7;
            goto read_save;
          case 98:
            ca = 8;
            goto read_save;
          case 102:
            ca = 12;
            goto read_save;
          case 110:
            ca = 10;
            goto read_save;
          case 114:
            ca = 13;
            goto read_save;
          case 116:
            ca = 9;
            goto read_save;
          case 118:
            ca = 11;
            goto read_save;
          case 120:
            LOBYTE(v14) = readhexaesc(v3);
            goto LABEL_18;
          case 34:
          case 39:
          case 92:
LABEL_18:
            ca = v14;
read_save:
            v15 = &v3->z->n;
            v16 = (*v15)--;
            if ( v16 )
            {
              v17 = v3->z;
              v18 = v17->p;
              v19 = *v18;
              v17->p = v18 + 1;
              v3->current = v19;
            }
            else
            {
              v3->current = luaZ_fill(v3->z);
            }
            goto only_save;
          case 10:
          case 13:
            inclinenumber(v3);
            ca = 10;
            goto only_save;
          case 122:
            v20 = &v3->z->n;
            v21 = (*v20)--;
            if ( v21 )
            {
              v22 = v3->z;
              v23 = v22->p;
              v24 = *v23;
              v22->p = v23 + 1;
            }
            else
            {
              v24 = luaZ_fill(v3->z);
            }
            v3->current = v24;
            while ( byte_9D4E79[v3->current] & 8 )
            {
              if ( v3->current == 10 || v3->current == 13 )
              {
                inclinenumber(v3);
              }
              else
              {
                v25 = &v3->z->n;
                v26 = (*v25)--;
                if ( v26 )
                {
                  v27 = v3->z;
                  v28 = v27->p;
                  v29 = *v28;
                  v27->p = v28 + 1;
                  v3->current = v29;
                }
                else
                {
                  v3->current = luaZ_fill(v3->z);
                }
              }
            }
            continue;
          default:
            if ( !(byte_9D4E79[v14] & 2) )
              escerror(v3, &v3->current, 1, "invalid escape sequence");
            ca = readdecesc(v3);
only_save:
            v30 = v3->buff;
            v31 = v30->buffsize;
            if ( v30->n + 1 <= v31 )
              goto LABEL_41;
            if ( v31 >= 0x7FFFFFFE )
              goto $LN74_14;
            v32 = 2 * v31;
            if ( 2 * v31 + 1 > 0xFFFFFFFD )
              luaM_toobig(v3->L);
            v30->buffer = (char *)luaM_realloc_(v3->L, v30->buffer, v31, 2 * v31);
            v30->buffsize = v32;
LABEL_41:
            v30->buffer[v30->n++] = ca;
            break;
          case 4294967295:
            continue;
        }
        break;
      default:
        v33 = v3->buff;
        v34 = v33->buffsize;
        if ( v33->n + 1 > v34 )
        {
          if ( v34 >= 0x7FFFFFFE )
$LN74_14:
            lexerror(v3, "lexical element too long", 0);
          v35 = 2 * v34;
          if ( 2 * v34 + 1 > 0xFFFFFFFD )
            luaM_toobig(v3->L);
          v36 = (char *)luaM_realloc_(v3->L, v33->buffer, v34, 2 * v34);
          LOBYTE(v9) = c;
          v33->buffer = v36;
          v33->buffsize = v35;
        }
        v33->buffer[v33->n++] = v9;
        v37 = &v3->z->n;
        v38 = (*v37)--;
        if ( v38 )
        {
          v39 = v3->z;
          v40 = v39->p;
          v41 = *v40;
          v39->p = v40 + 1;
        }
        else
        {
          v41 = luaZ_fill(v3->z);
        }
        v3->current = v41;
        break;
      case 0xFFFFFFFF:
        lexerror(v3, "unfinished string", 286);
        return;
      case 0xA:
      case 0xD:
        lexerror(v3, "unfinished string", 289);
        return;
    }
  }
  sub_754660(v3->current);
  v42 = &v3->z->n;
  v43 = (*v42)--;
  if ( v43 )
  {
    v44 = v3->z;
    v45 = v44->p;
    v46 = *v45;
    v44->p = v45 + 1;
  }
  else
  {
    v46 = luaZ_fill(v3->z);
  }
  v3->current = v46;
  seminfo->ts = (TString *)luaX_newstring(v3, (const char *)v3->buff->buffer + 1, v3->buff->n - 2);
}

//----- (00755720) --------------------------------------------------------
int __usercall llex@<eax>(LexState *ls@<eax>, SemInfo *seminfo)
{
  LexState *v2; // esi@1
  unsigned int v3; // eax@1
  unsigned int *v4; // eax@4
  unsigned int v5; // ecx@4
  Zio *v6; // ecx@5
  const char *v7; // edx@5
  int v8; // eax@5
  unsigned int *v9; // eax@7
  unsigned int v10; // ecx@7
  Zio *v11; // ecx@8
  const char *v12; // edx@8
  int v13; // eax@8
  unsigned int *v14; // eax@11
  unsigned int v15; // ecx@11
  Zio *v16; // ecx@12
  const char *v17; // edx@12
  int v18; // eax@12
  int v19; // eax@15
  unsigned int *v20; // eax@20
  unsigned int v21; // ecx@20
  Zio *v22; // ecx@21
  const char *v23; // edx@21
  int v24; // eax@21
  int v25; // edi@25
  unsigned int *v26; // eax@26
  unsigned int v27; // ecx@26
  Zio *v28; // ecx@27
  const char *v29; // edx@27
  int v30; // eax@27
  int result; // eax@28
  int v32; // eax@29
  unsigned int *v33; // eax@34
  unsigned int v34; // ecx@34
  Zio *v35; // ecx@35
  const char *v36; // edx@35
  int v37; // eax@35
  unsigned int *v38; // eax@39
  unsigned int v39; // ecx@39
  Zio *v40; // ecx@40
  const char *v41; // edx@40
  int v42; // eax@40
  unsigned int *v43; // eax@42
  unsigned int v44; // ecx@42
  Zio *v45; // ecx@43
  const char *v46; // edx@43
  int v47; // eax@43
  unsigned int *v48; // eax@47
  unsigned int v49; // ecx@47
  Zio *v50; // ecx@48
  const char *v51; // edx@48
  int v52; // eax@48
  unsigned int *v53; // eax@50
  unsigned int v54; // ecx@50
  Zio *v55; // ecx@51
  const char *v56; // edx@51
  int v57; // eax@51
  unsigned int *v58; // eax@55
  unsigned int v59; // ecx@55
  Zio *v60; // ecx@56
  const char *v61; // edx@56
  int v62; // eax@56
  unsigned int *v63; // eax@58
  unsigned int v64; // ecx@58
  Zio *v65; // ecx@59
  const char *v66; // edx@59
  int v67; // eax@59
  unsigned int *v68; // eax@63
  unsigned int v69; // ecx@63
  Zio *v70; // ecx@64
  const char *v71; // edx@64
  int v72; // eax@64
  unsigned int *v73; // eax@66
  unsigned int v74; // ecx@66
  Zio *v75; // ecx@67
  const char *v76; // edx@67
  int v77; // eax@67
  unsigned int *v78; // eax@71
  unsigned int v79; // ecx@71
  Zio *v80; // ecx@72
  const char *v81; // edx@72
  int v82; // eax@72
  unsigned int *v83; // eax@75
  unsigned int v84; // ecx@75
  Zio *v85; // ecx@76
  const char *v86; // edx@76
  int v87; // eax@76
  GCObject *v88; // eax@86
  unsigned __int8 v89; // al@87
  unsigned int *v90; // eax@90
  unsigned int v91; // ecx@90
  Zio *v92; // ecx@91
  const char *v93; // edx@91
  int v94; // eax@91

  v2 = ls;
  ls->buff->n = 0;
  v3 = ls->current + 1;
  while ( 2 )
  {
    switch ( v3 )
    {
      case 0xBu:
      case 0xEu:
        inclinenumber(v2);
        goto LABEL_24;
      case 0xAu:
      case 0xCu:
      case 0xDu:
      case 0x21u:
        v4 = &v2->z->n;
        v5 = (*v4)--;
        if ( v5 )
        {
          v6 = v2->z;
          v7 = v6->p;
          v8 = *v7;
          v6->p = v7 + 1;
          v2->current = v8;
        }
        else
        {
          v2->current = luaZ_fill(v2->z);
        }
        goto LABEL_24;
      case 0x2Eu:
        v9 = &v2->z->n;
        v10 = (*v9)--;
        if ( v10 )
        {
          v11 = v2->z;
          v12 = v11->p;
          v13 = *v12;
          v11->p = v12 + 1;
        }
        else
        {
          v13 = luaZ_fill(v2->z);
        }
        v2->current = v13;
        if ( v13 != 45 )
          return 45;
        v14 = &v2->z->n;
        v15 = (*v14)--;
        if ( v15 )
        {
          v16 = v2->z;
          v17 = v16->p;
          v18 = *v17;
          v16->p = v17 + 1;
        }
        else
        {
          v18 = luaZ_fill(v2->z);
        }
        v2->current = v18;
        if ( v18 != 91 || (v19 = skip_sep(v2), v2->buff->n = 0, v19 < 0) )
        {
          if ( v2->current != 10 )
          {
            do
            {
              if ( v2->current == 13 || v2->current == -1 )
                break;
              v20 = &v2->z->n;
              v21 = (*v20)--;
              if ( v21 <= 0 )
              {
                v24 = luaZ_fill(v2->z);
              }
              else
              {
                v22 = v2->z;
                v23 = v22->p;
                v24 = *v23;
                v22->p = v23 + 1;
              }
              v2->current = v24;
            }
            while ( v24 != 10 );
          }
        }
        else
        {
          read_long_string(v2, 0, v19);
          v2->buff->n = 0;
        }
LABEL_24:
        v3 = v2->current + 1;
        if ( v3 <= 0x7F )
          continue;
LABEL_25:
        v25 = v2->current;
        if ( byte_9D4E79[v2->current] & 1 )
        {
          do
          {
            sub_754660(v2->current);
            v26 = &v2->z->n;
            v27 = (*v26)--;
            if ( v27 )
            {
              v28 = v2->z;
              v29 = v28->p;
              v30 = *v29;
              v28->p = v29 + 1;
            }
            else
            {
              v30 = luaZ_fill(v2->z);
            }
            v2->current = v30;
          }
          while ( byte_9D4E79[v30] & 3 );
          v88 = luaX_newstring(v2, v2->buff->buffer, v2->buff->n);
          seminfo->ts = (TString *)v88;
          if ( v88->cl.c.tt == 4 && (v89 = *(&v88->p.marked + 1)) != 0 )
            result = v89 + 256;
          else
            result = 288;
        }
        else
        {
          v90 = &v2->z->n;
          v91 = (*v90)--;
          if ( v91 )
          {
            v92 = v2->z;
            v93 = v92->p;
            v94 = *v93;
            v92->p = v93 + 1;
            v2->current = v94;
            result = v25;
          }
          else
          {
            v2->current = luaZ_fill(v2->z);
            result = v25;
          }
        }
        return result;
      default:
        goto LABEL_25;
      case 0x5Cu:
        v32 = skip_sep(v2);
        if ( v32 < 0 )
        {
          if ( v32 != -1 )
            lexerror(v2, "invalid long string delimiter", 289);
          result = 91;
        }
        else
        {
          read_long_string(v2, seminfo, v32);
          result = 289;
        }
        return result;
      case 0x3Eu:
        v33 = &v2->z->n;
        v34 = (*v33)--;
        if ( v34 )
        {
          v35 = v2->z;
          v36 = v35->p;
          v37 = *v36;
          v35->p = v36 + 1;
        }
        else
        {
          v37 = luaZ_fill(v2->z);
        }
        v2->current = v37;
        if ( v37 == 61 )
        {
          v38 = &v2->z->n;
          v39 = (*v38)--;
          if ( v39 )
          {
            v40 = v2->z;
            v41 = v40->p;
            v42 = *v41;
            v40->p = v41 + 1;
            v2->current = v42;
            result = 281;
          }
          else
          {
            v2->current = luaZ_fill(v2->z);
            result = 281;
          }
        }
        else
        {
          result = 61;
        }
        return result;
      case 0x3Du:
        v43 = &v2->z->n;
        v44 = (*v43)--;
        if ( v44 )
        {
          v45 = v2->z;
          v46 = v45->p;
          v47 = *v46;
          v45->p = v46 + 1;
        }
        else
        {
          v47 = luaZ_fill(v2->z);
        }
        v2->current = v47;
        if ( v47 == 61 )
        {
          v48 = &v2->z->n;
          v49 = (*v48)--;
          if ( v49 )
          {
            v50 = v2->z;
            v51 = v50->p;
            v52 = *v51;
            v50->p = v51 + 1;
            v2->current = v52;
            result = 283;
          }
          else
          {
            v2->current = luaZ_fill(v2->z);
            result = 283;
          }
        }
        else
        {
          result = 60;
        }
        return result;
      case 0x3Fu:
        v53 = &v2->z->n;
        v54 = (*v53)--;
        if ( v54 )
        {
          v55 = v2->z;
          v56 = v55->p;
          v57 = *v56;
          v55->p = v56 + 1;
        }
        else
        {
          v57 = luaZ_fill(v2->z);
        }
        v2->current = v57;
        if ( v57 == 61 )
        {
          v58 = &v2->z->n;
          v59 = (*v58)--;
          if ( v59 )
          {
            v60 = v2->z;
            v61 = v60->p;
            v62 = *v61;
            v60->p = v61 + 1;
            v2->current = v62;
            result = 282;
          }
          else
          {
            v2->current = luaZ_fill(v2->z);
            result = 282;
          }
        }
        else
        {
          result = 62;
        }
        return result;
      case 0x7Fu:
        v63 = &v2->z->n;
        v64 = (*v63)--;
        if ( v64 )
        {
          v65 = v2->z;
          v66 = v65->p;
          v67 = *v66;
          v65->p = v66 + 1;
        }
        else
        {
          v67 = luaZ_fill(v2->z);
        }
        v2->current = v67;
        if ( v67 == 61 )
        {
          v68 = &v2->z->n;
          v69 = (*v68)--;
          if ( v69 )
          {
            v70 = v2->z;
            v71 = v70->p;
            v72 = *v71;
            v70->p = v71 + 1;
            v2->current = v72;
            result = 284;
          }
          else
          {
            v2->current = luaZ_fill(v2->z);
            result = 284;
          }
        }
        else
        {
          result = 126;
        }
        return result;
      case 0x3Bu:
        v73 = &v2->z->n;
        v74 = (*v73)--;
        if ( v74 )
        {
          v75 = v2->z;
          v76 = v75->p;
          v77 = *v76;
          v75->p = v76 + 1;
        }
        else
        {
          v77 = luaZ_fill(v2->z);
        }
        v2->current = v77;
        if ( v77 == 58 )
        {
          v78 = &v2->z->n;
          v79 = (*v78)--;
          if ( v79 )
          {
            v80 = v2->z;
            v81 = v80->p;
            v82 = *v81;
            v80->p = v81 + 1;
            v2->current = v82;
            result = 285;
          }
          else
          {
            v2->current = luaZ_fill(v2->z);
            result = 285;
          }
        }
        else
        {
          result = 58;
        }
        return result;
      case 0x23u:
      case 0x28u:
        read_string(v2, v2->current, seminfo);
        return 289;
      case 0x2Fu:
        sub_754660(v2->current);
        v83 = &v2->z->n;
        v84 = (*v83)--;
        if ( v84 )
        {
          v85 = v2->z;
          v86 = v85->p;
          v87 = *v86;
          v85->p = v86 + 1;
        }
        else
        {
          v87 = luaZ_fill(v2->z);
        }
        v2->current = v87;
        if ( check_next(v2, ".") )
        {
          result = (check_next(v2, ".") != 0) + 279;
        }
        else if ( byte_9D4E79[v2->current] & 2 )
        {
LABEL_82:
          read_numeral(v2, seminfo);
          result = 287;
        }
        else
        {
          result = 46;
        }
        return result;
      case 0x31u:
      case 0x32u:
      case 0x33u:
      case 0x34u:
      case 0x35u:
      case 0x36u:
      case 0x37u:
      case 0x38u:
      case 0x39u:
      case 0x3Au:
        goto LABEL_82;
      case 0u:
        return 286;
    }
  }
}

//----- (00755D60) --------------------------------------------------------
void __cdecl luaX_next(LexState *ls)
{
  int v1; // edx@2
  TString *v2; // ecx@2
  int v3; // edx@2

  ls->lastline = ls->linenumber;
  if ( ls->lookahead.token == 286 )
  {
    ls->t.token = llex(ls, &ls->t.seminfo);
  }
  else
  {
    v1 = *(&ls->lookahead.token + 1);
    ls->t.token = ls->lookahead.token;
    v2 = ls->lookahead.seminfo.ts;
    *(&ls->t.token + 1) = v1;
    v3 = *((_DWORD *)&ls->lookahead.seminfo.ts + 1);
    ls->t.seminfo.ts = v2;
    *((_DWORD *)&ls->t.seminfo.ts + 1) = v3;
    ls->lookahead.token = 286;
  }
}

//----- (00755DB0) --------------------------------------------------------
int __cdecl luaX_lookahead(LexState *ls)
{
  int result; // eax@1

  result = llex(ls, &ls->lookahead.seminfo);
  ls->lookahead.token = result;
  return result;
}

//----- (00755DD0) --------------------------------------------------------
void __usercall __noreturn error_expected(LexState *ls@<esi>, int token@<eax>)
{
  const char *v2; // eax@1
  const char *v3; // eax@1

  v2 = luaX_token2str(ls, token);
  v3 = luaO_pushfstring(ls->L, "%s expected", v2);
  luaX_syntaxerror(ls, v3);
}

//----- (00755E00) --------------------------------------------------------
void __usercall __noreturn errorlimit(FuncState *fs@<esi>, int limit, const char *what)
{
  lua_State *v3; // edi@1
  const char *v4; // eax@2
  const char *v5; // eax@4

  v3 = fs->ls->L;
  if ( fs->f->linedefined )
    v4 = luaO_pushfstring(v3, "function at line %d", fs->f->linedefined);
  else
    v4 = "main function";
  v5 = luaO_pushfstring(v3, "too many %s (limit is %d) in %s", what, limit, v4);
  luaX_syntaxerror(fs->ls, v5);
}

//----- (00755E50) --------------------------------------------------------
int __usercall testnext@<eax>(LexState *ls@<eax>, int c)
{
  int result; // eax@2

  if ( ls->t.token == c )
  {
    luaX_next(ls);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00755E70) --------------------------------------------------------
TString *__usercall str_checkname@<eax>(LexState *ls@<eax>)
{
  TString *v1; // edi@3

  if ( ls->t.token != 288 )
    error_expected(ls, 288);
  v1 = ls->t.seminfo.ts;
  luaX_next(ls);
  return v1;
}

//----- (00755EA0) --------------------------------------------------------
void __usercall codestring(LexState *ls@<ecx>, expdesc *e@<esi>, TString *s@<eax>)
{
  int v3; // eax@1

  v3 = luaK_stringK(ls->fs, s);
  e->t = -1;
  e->f = -1;
  e->k = 4;
  e->u.info = v3;
}

//----- (00755EC0) --------------------------------------------------------
int __cdecl registerlocalvar(LexState *ls, TString *varname)
{
  FuncState *v2; // ecx@1
  GCObject *v3; // edi@1
  int v4; // esi@1
  int *v5; // ebx@1
  GCObject *v6; // eax@2
  int v7; // eax@4
  int result; // eax@9
  FuncState *v9; // [sp+Ch] [bp-4h]@1

  v2 = ls->fs;
  v3 = (GCObject *)&v2->f->next;
  v4 = v2->f->sizelocvars;
  v5 = &v2->f->sizelocvars;
  v9 = ls->fs;
  if ( v2->nlocvars + 1 > v4 )
  {
    v6 = (GCObject *)luaM_growaux_(ls->L, v3->h.gclist, v5, 0xCu, 0x7FFF, "local variables");
    v2 = v9;
    v3->h.gclist = v6;
  }
  if ( v4 < *v5 )
  {
    v7 = 12 * v4;
    do
    {
      *(GCObject **)((char *)&v3->h.gclist->gch.next + v7) = 0;
      ++v4;
      v7 += 12;
    }
    while ( v4 < *v5 );
  }
  *((_DWORD *)&v3->h.gclist->gch.next + 3 * v2->nlocvars) = varname;
  if ( varname->tsv.marked & 3 && v3->h.marked & 4 )
  {
    luaC_barrier_(ls->L, v3, (GCObject *)varname);
    v2 = v9;
  }
  LOWORD(result) = v2->nlocvars;
  v2->nlocvars = result + 1;
  return (signed __int16)result;
}

//----- (00755F70) --------------------------------------------------------
void __usercall new_localvar(LexState *ls@<ebx>, TString *name@<eax>)
{
  FuncState *v2; // esi@1
  Dyndata *v3; // edi@1
  __int16 reg; // [sp+8h] [bp-4h]@1

  v2 = ls->fs;
  v3 = ls->dyd;
  reg = registerlocalvar(ls, name);
  if ( v3->actvar.n - v2->firstlocal + 1 > 200 )
    errorlimit(v2, 200, "local variables");
  if ( v3->actvar.n + 2 > v3->actvar.size )
    v3->actvar.arr = (Vardesc *)luaM_growaux_(
                                  ls->L,
                                  v3->actvar.arr,
                                  &v3->actvar.size,
                                  2u,
                                  2147483645,
                                  "local variables");
  v3->actvar.arr[v3->actvar.n++].idx = reg;
}

//----- (00755FF0) --------------------------------------------------------
void __usercall adjustlocalvars(LexState *ls@<eax>, int nvars@<edx>)
{
  FuncState *v2; // eax@1
  int v3; // ecx@2

  v2 = ls->fs;
  for ( v2->nactvar += nvars; nvars; v2->f->locvars[v2->ls->dyd->actvar.arr[v2->firstlocal + v3].idx].startpc = v2->pc )
    v3 = v2->nactvar - nvars--;
}

//----- (00756030) --------------------------------------------------------
void __usercall removevars(FuncState *fs@<eax>, int tolevel@<edx>)
{
  LexState *v2; // esi@2
  int v3; // edi@2
  char v4; // cl@2

  for ( fs->ls->dyd->actvar.n += tolevel - fs->nactvar;
        fs->nactvar > tolevel;
        fs->f->locvars[v2->dyd->actvar.arr[fs->firstlocal + (unsigned __int8)v4].idx].endpc = v3 )
  {
    v2 = fs->ls;
    v3 = fs->pc;
    v4 = fs->nactvar - 1;
    fs->nactvar = v4;
  }
}

//----- (00756090) --------------------------------------------------------
int __usercall searchupvalue@<eax>(FuncState *fs@<edi>, TString *name)
{
  Upvaldesc *v2; // ebx@1
  int v3; // esi@1
  int result; // eax@4

  v2 = fs->f->upvalues;
  v3 = 0;
  if ( fs->nups )
  {
    while ( !luaS_eqstr(v2[v3].name, name) )
    {
      if ( ++v3 >= fs->nups )
        goto LABEL_4;
    }
    result = v3;
  }
  else
  {
LABEL_4:
    result = -1;
  }
  return result;
}

//----- (007560D0) --------------------------------------------------------
int __usercall newupvalue@<eax>(FuncState *fs@<eax>, TString *name, expdesc *v)
{
  FuncState *v3; // esi@1
  GCObject *v4; // edi@1
  int v5; // ebx@1
  int v6; // eax@1
  int result; // eax@10

  v3 = fs;
  v4 = (GCObject *)&fs->f->next;
  v5 = fs->f->sizeupvalues;
  v6 = fs->nups + 1;
  if ( v6 > 255 )
    errorlimit(v3, 255, "upvalues");
  if ( v6 > v5 )
    v4->h.sizearray = (int)luaM_growaux_(v3->ls->L, (void *)v4->h.sizearray, &v3->f->sizeupvalues, 8u, 255, "upvalues");
  for ( ; v5 < v4->p.sizeupvalues; ++v5 )
    *(_DWORD *)(v4->h.sizearray + 8 * v5) = 0;
  *(_BYTE *)(v4->h.sizearray + 8 * v3->nups + 4) = v->k == 7;
  *(_BYTE *)(v4->h.sizearray + 8 * v3->nups + 5) = LOBYTE(v->u.nval);
  *(_DWORD *)(v4->h.sizearray + 8 * v3->nups) = name;
  if ( name->tsv.marked & 3 && v4->h.marked & 4 )
    luaC_barrier_(v3->ls->L, v4, (GCObject *)name);
  LOBYTE(result) = v3->nups;
  v3->nups = result + 1;
  return (unsigned __int8)result;
}

//----- (007561A0) --------------------------------------------------------
int __usercall searchvar@<eax>(FuncState *fs@<esi>, TString *n@<ebx>)
{
  int v2; // edi@1
  int result; // eax@4

  v2 = fs->nactvar - 1;
  if ( v2 < 0 )
  {
LABEL_4:
    result = -1;
  }
  else
  {
    while ( !luaS_eqstr(n, fs->f->locvars[fs->ls->dyd->actvar.arr[v2 + fs->firstlocal].idx].varname) )
    {
      if ( --v2 < 0 )
        goto LABEL_4;
    }
    result = v2;
  }
  return result;
}

//----- (007561E0) --------------------------------------------------------
int __cdecl singlevaraux(FuncState *fs, TString *n, expdesc *var, int base)
{
  int result; // eax@2
  int v5; // eax@3
  BlockCnt *i; // edi@5
  int v7; // eax@9

  if ( !fs )
    return 0;
  v5 = searchvar(fs, n);
  if ( v5 < 0 )
  {
    v7 = searchupvalue(fs, n);
    if ( v7 < 0 )
    {
      result = singlevaraux(fs->prev, n, var, 0);
      if ( !result )
        return result;
      v7 = newupvalue(fs, n, var);
    }
    var->u.info = v7;
    var->t = -1;
    var->f = -1;
    var->k = 8;
    result = 8;
  }
  else
  {
    var->t = -1;
    var->f = -1;
    var->k = 7;
    var->u.info = v5;
    if ( !base )
    {
      for ( i = fs->bl; i->nactvar > v5; i = i->previous )
        ;
      i->upval = 1;
    }
    result = 7;
  }
  return result;
}

//----- (00756290) --------------------------------------------------------
void __usercall singlevar(LexState *ls@<ecx>, expdesc *var@<ebx>)
{
  LexState *v2; // esi@1
  FuncState *v3; // edi@3
  int v4; // eax@4
  TString *n; // [sp+8h] [bp-20h]@3
  expdesc key; // [sp+Ch] [bp-1Ch]@4

  v2 = ls;
  if ( ls->t.token != 288 )
    error_expected(ls, 288);
  n = ls->t.seminfo.ts;
  luaX_next(ls);
  v3 = v2->fs;
  if ( !singlevaraux(v2->fs, n, var, 1) )
  {
    singlevaraux(v3, v2->envn, var, 1);
    v4 = luaK_stringK(v2->fs, n);
    key.t = -1;
    key.f = -1;
    key.k = 4;
    key.u.info = v4;
    luaK_indexed(v3, var, &key);
  }
}

//----- (00756330) --------------------------------------------------------
void __usercall adjust_assign(LexState *ls@<eax>, int nvars@<edx>, expdesc *e@<ecx>, int nexps)
{
  FuncState *v4; // edi@1
  expkind v5; // eax@1
  int v6; // esi@1
  int v7; // ebx@6
  int v8; // esi@7

  v4 = ls->fs;
  v5 = e->k;
  v6 = nvars - nexps;
  if ( e->k == 12 || v5 == 13 )
  {
    v8 = v6 + 1;
    if ( v8 < 0 )
      v8 = 0;
    luaK_setreturns(v4, e, v8);
    if ( v8 > 1 )
      luaK_reserveregs(v4, v8 - 1);
  }
  else
  {
    if ( v5 )
      luaK_exp2nextreg(v4, e);
    if ( v6 > 0 )
    {
      v7 = v4->freereg;
      luaK_reserveregs(v4, v6);
      luaK_nil(v4, v7, v6);
    }
  }
}

//----- (007563A0) --------------------------------------------------------
void __usercall closegoto(LexState *ls@<eax>, Labeldesc *label@<ebx>, int g)
{
  LexState *v3; // edi@1
  Dyndata *v4; // esi@1
  FuncState *v5; // ecx@1
  int v6; // eax@1
  unsigned __int8 v7; // dl@1
  const char *v8; // eax@2
  int v9; // ecx@4
  int v10; // edx@5
  Labeldesc *v11; // eax@6
  TString *v12; // edi@6
  int v13; // eax@6

  v3 = ls;
  v4 = ls->dyd;
  v5 = ls->fs;
  v6 = (int)&v4->gt.arr[g];
  v7 = *(_BYTE *)(v6 + 12);
  if ( v7 < label->nactvar )
  {
    v8 = luaO_pushfstring(
           v3->L,
           "<goto %s> at line %d jumps into the scope of local '%s'",
           *(_DWORD *)v6 + 16,
           *(_DWORD *)(v6 + 8),
           &v5->f->locvars[v5->ls->dyd->actvar.arr[v7 + v5->firstlocal].idx].varname[1]);
    v3->t.token = 0;
    luaX_syntaxerror(v3, v8);
  }
  luaK_patchlist(v5, *(_DWORD *)(v6 + 4), label->pc);
  v9 = g;
  if ( g < v4->gt.n - 1 )
  {
    v10 = g;
    do
    {
      v11 = v4->gt.arr;
      v12 = v11[v10 + 1].name;
      v13 = (int)&v11[v10];
      *(_DWORD *)v13 = v12;
      *(_DWORD *)(v13 + 4) = *(_DWORD *)(v13 + 20);
      *(_DWORD *)(v13 + 8) = *(_DWORD *)(v13 + 24);
      *(_DWORD *)(v13 + 12) = *(_DWORD *)(v13 + 28);
      ++v9;
      ++v10;
    }
    while ( v9 < v4->gt.n - 1 );
  }
  --v4->gt.n;
}

//----- (00756470) --------------------------------------------------------
int __usercall findlabel@<eax>(LexState *ls@<ebx>, int g)
{
  Dyndata *v2; // esi@1
  TString **v3; // eax@1
  int v4; // ecx@1
  int v5; // ecx@2
  Labeldesc *v6; // edi@4
  TString *v7; // edx@4
  int v8; // edi@4
  int result; // eax@6
  unsigned __int8 v10; // al@7
  Dyndata *v11; // esi@11
  int v12; // eax@11
  FuncState *v13; // ecx@11
  unsigned __int8 v14; // dl@11
  const char *v15; // eax@12
  int v16; // ecx@14
  int v17; // edx@15
  Labeldesc *v18; // eax@16
  TString *v19; // edi@16
  int v20; // eax@16
  BlockCnt *v21; // [sp+8h] [bp-14h]@1
  Labeldesc *gt; // [sp+10h] [bp-Ch]@1
  int i; // [sp+14h] [bp-8h]@1
  int v24; // [sp+18h] [bp-4h]@2

  v2 = ls->dyd;
  v3 = &v2->gt.arr[g].name;
  v4 = ls->fs->bl->firstlabel;
  v21 = ls->fs->bl;
  gt = &v2->gt.arr[g];
  i = v4;
  if ( v4 >= v2->label.n )
  {
LABEL_6:
    result = 0;
  }
  else
  {
    v5 = 16 * v4;
    v24 = v5;
    while ( 1 )
    {
      v6 = v2->label.arr;
      v7 = *(TString **)((char *)&v6->name + v5);
      v8 = (int)v6 + v5;
      if ( luaS_eqstr(v7, *v3) )
        break;
      v24 += 16;
      if ( ++i >= v2->label.n )
        goto LABEL_6;
      v5 = v24;
      v3 = (TString **)gt;
    }
    v10 = *(_BYTE *)(v8 + 12);
    if ( gt->nactvar > v10 && (v21->upval || v2->label.n > v21->firstlabel) )
      luaK_patchclose(ls->fs, gt->pc, v10);
    v11 = ls->dyd;
    v12 = (int)&v11->gt.arr[g];
    v13 = ls->fs;
    v14 = *(_BYTE *)(v12 + 12);
    if ( v14 < *(_BYTE *)(v8 + 12) )
    {
      v15 = luaO_pushfstring(
              ls->L,
              "<goto %s> at line %d jumps into the scope of local '%s'",
              *(_DWORD *)v12 + 16,
              *(_DWORD *)(v12 + 8),
              &v13->f->locvars[v13->ls->dyd->actvar.arr[v14 + v13->firstlocal].idx].varname[1]);
      ls->t.token = 0;
      luaX_syntaxerror(ls, v15);
    }
    luaK_patchlist(v13, *(_DWORD *)(v12 + 4), *(_DWORD *)(v8 + 4));
    v16 = g;
    if ( g < v11->gt.n - 1 )
    {
      v17 = g;
      do
      {
        v18 = v11->gt.arr;
        v19 = v18[v17 + 1].name;
        v20 = (int)&v18[v17];
        *(_DWORD *)v20 = v19;
        *(_DWORD *)(v20 + 4) = *(_DWORD *)(v20 + 20);
        *(_DWORD *)(v20 + 8) = *(_DWORD *)(v20 + 24);
        *(_DWORD *)(v20 + 12) = *(_DWORD *)(v20 + 28);
        ++v16;
        ++v17;
      }
      while ( v16 < v11->gt.n - 1 );
    }
    --v11->gt.n;
    result = 1;
  }
  return result;
}

//----- (007565D0) --------------------------------------------------------
int __usercall newlabelentry@<eax>(LexState *ls@<ebx>, Labellist *l@<esi>, TString *name, int line, int pc)
{
  int v5; // edi@1
  int v6; // eax@3

  v5 = l->n;
  if ( v5 + 1 > l->size )
    l->arr = (Labeldesc *)luaM_growaux_(ls->L, l->arr, &l->size, 0x10u, 0x7FFF, "labels/gotos");
  v6 = v5;
  l->arr[4 * v6 / 0x10u].name = name;
  l->arr[4 * v6 / 0x10u].line = line;
  l->arr[4 * v6 / 0x10u].nactvar = ls->fs->nactvar;
  l->arr[4 * v6 / 0x10u].pc = pc;
  ++l->n;
  return v5;
}

//----- (00756640) --------------------------------------------------------
void __cdecl findgotos(LexState *ls, Labeldesc *lb)
{
  LexState *v2; // esi@1
  int v3; // edi@1
  char *v4; // eax@1
  int v5; // ebx@2
  FuncState *v6; // ecx@5
  Dyndata *v7; // esi@5
  int v8; // eax@5
  int v9; // ecx@6
  int v10; // edx@7
  Labeldesc *v11; // eax@8
  int v12; // ebx@8
  int v13; // eax@8
  const char *v14; // eax@13
  Labellist *gl; // [sp+8h] [bp-8h]@1
  int v16; // [sp+Ch] [bp-4h]@2

  v2 = ls;
  v3 = ls->fs->bl->firstgoto;
  v4 = (char *)&ls->dyd->gt;
  gl = &ls->dyd->gt;
  if ( v3 < ls->dyd->gt.n )
  {
    v5 = 16 * v3;
    v16 = 16 * v3;
    while ( 1 )
    {
      if ( luaS_eqstr(*(TString **)(*(_DWORD *)v4 + v5), lb->name) )
      {
        v6 = v2->fs;
        v7 = v2->dyd;
        v8 = (int)v7->gt.arr + v5;
        if ( *(_BYTE *)(v8 + 12) < (unsigned __int8)lb->nactvar )
        {
          v14 = luaO_pushfstring(
                  ls->L,
                  "<goto %s> at line %d jumps into the scope of local '%s'",
                  *(_DWORD *)v8 + 16,
                  *(_DWORD *)(v8 + 8),
                  &v6->f->locvars[v6->ls->dyd->actvar.arr[v6->firstlocal + *(_BYTE *)(v8 + 12)].idx].varname[1]);
          ls->t.token = 0;
          luaX_syntaxerror(ls, v14);
        }
        luaK_patchlist(v6, *(_DWORD *)(v8 + 4), lb->pc);
        v9 = v3;
        if ( v3 < v7->gt.n - 1 )
        {
          v10 = v16;
          do
          {
            v11 = v7->gt.arr;
            v12 = *(int *)((char *)&v11[1].name + v10);
            v13 = (int)v11 + v10;
            *(_DWORD *)v13 = v12;
            *(_DWORD *)(v13 + 4) = *(_DWORD *)(v13 + 20);
            *(_DWORD *)(v13 + 8) = *(_DWORD *)(v13 + 24);
            *(_DWORD *)(v13 + 12) = *(_DWORD *)(v13 + 28);
            ++v9;
            v10 += 16;
          }
          while ( v9 < v7->gt.n - 1 );
        }
        --v7->gt.n;
        v2 = ls;
        v5 = v16;
      }
      else
      {
        ++v3;
        v5 += 16;
        v16 = v5;
      }
      if ( v3 >= gl->n )
        break;
      v4 = (char *)gl;
    }
  }
}

//----- (00756760) --------------------------------------------------------
void __cdecl movegotosout(FuncState *fs, BlockCnt *bl)
{
  BlockCnt *v2; // edi@1
  int v3; // ebx@1
  char *v4; // edx@1
  int v5; // ebx@2
  int v6; // esi@4
  char v7; // al@4
  LexState *v8; // eax@8
  BlockCnt *v9; // ecx@8
  Dyndata *v10; // esi@8
  int v11; // edi@8
  TString **v12; // eax@8
  int v13; // ecx@9
  Labeldesc *v14; // ebx@11
  TString *v15; // edx@11
  TString *v16; // eax@11
  Labeldesc *v17; // ebx@11
  char v18; // al@17
  BlockCnt *v19; // [sp+8h] [bp-1Ch]@8
  LexState *ls; // [sp+Ch] [bp-18h]@8
  int v21; // [sp+10h] [bp-14h]@8
  int v22; // [sp+14h] [bp-10h]@2
  Labellist *gl; // [sp+18h] [bp-Ch]@1
  int v24; // [sp+1Ch] [bp-8h]@9
  int i; // [sp+20h] [bp-4h]@1

  v2 = bl;
  v3 = bl->firstgoto;
  v4 = (char *)&fs->ls->dyd->gt;
  i = v3;
  gl = &fs->ls->dyd->gt;
  if ( v3 < fs->ls->dyd->gt.n )
  {
    v5 = 16 * v3;
    v22 = v5;
    while ( 1 )
    {
      v6 = *(_DWORD *)v4;
      v7 = v2->nactvar;
      if ( *(_BYTE *)(*(_DWORD *)v4 + v5 + 12) > (unsigned __int8)v7 )
      {
        if ( v2->upval )
        {
          luaK_patchclose(fs, *(_DWORD *)(v6 + v5 + 4), (unsigned __int8)v7);
          v4 = (char *)gl;
          v2 = bl;
        }
        *(_BYTE *)(v6 + v5 + 12) = v2->nactvar;
      }
      v8 = fs->ls;
      v9 = v8->fs->bl;
      v10 = v8->dyd;
      v11 = v9->firstlabel;
      ls = fs->ls;
      v12 = (TString **)((char *)&v10->gt.arr->name + v5);
      v19 = v9;
      v21 = (int)v10->gt.arr + v5;
      if ( v11 >= v10->label.n )
      {
LABEL_14:
        ++i;
        v5 += 16;
        v22 = v5;
      }
      else
      {
        v13 = 16 * v11;
        v24 = 16 * v11;
        while ( 1 )
        {
          v14 = v10->label.arr;
          v15 = *v12;
          v16 = *(TString **)((char *)&v14->name + v13);
          v17 = (Labeldesc *)((char *)v14 + v13);
          if ( luaS_eqstr(v16, v15) )
            break;
          v24 += 16;
          if ( ++v11 >= v10->label.n )
          {
            v5 = v22;
            v4 = (char *)gl;
            goto LABEL_14;
          }
          v13 = v24;
          v12 = (TString **)v21;
        }
        v18 = v17->nactvar;
        if ( *(_BYTE *)(v21 + 12) > (unsigned __int8)v18 && (v19->upval || v10->label.n > v19->firstlabel) )
          luaK_patchclose(ls->fs, *(_DWORD *)(v21 + 4), (unsigned __int8)v18);
        closegoto(ls, v17, i);
        v5 = v22;
        v4 = (char *)gl;
      }
      if ( i >= *((_DWORD *)v4 + 1) )
        break;
      v2 = bl;
    }
  }
}

//----- (007568A0) --------------------------------------------------------
void __usercall breaklabel(LexState *ls@<edi>)
{
  GCObject *v1; // eax@1
  Dyndata *v2; // esi@1
  int v3; // ebx@1
  unsigned int v4; // ebx@3
  int v5; // [sp+8h] [bp-8h]@1
  TString *n; // [sp+Ch] [bp-4h]@1

  v1 = luaS_new(ls->L, "break");
  v2 = ls->dyd;
  v3 = v2->label.n;
  n = (TString *)v1;
  v5 = ls->fs->pc;
  if ( v3 + 1 > v2->label.size )
    v2->label.arr = (Labeldesc *)luaM_growaux_(ls->L, v2->label.arr, &v2->label.size, 0x10u, 0x7FFF, "labels/gotos");
  v4 = v3;
  v2->label.arr[v4].name = n;
  v2->label.arr[v4].line = 0;
  v2->label.arr[v4].nactvar = ls->fs->nactvar;
  v2->label.arr[v4].pc = v5;
  ++v2->label.n;
  findgotos(ls, &ls->dyd->label.arr[v4]);
}

//----- (00756940) --------------------------------------------------------
void __usercall __noreturn undefgoto(LexState *ls@<esi>, Labeldesc *gt@<edx>)
{
  TString *v2; // eax@1
  const char *v3; // ecx@2
  const char *v4; // eax@4

  v2 = gt->name;
  if ( gt->name->tsv.tt != 4 || (v3 = "<%s> at line %d not inside a loop", !v2->tsv.extra) )
    v3 = "no visible label '%s' for <goto> at line %d";
  v4 = luaO_pushfstring(ls->L, v3, &v2[1], gt->line);
  ls->t.token = 0;
  luaX_syntaxerror(ls, v4);
}

//----- (00756980) --------------------------------------------------------
void __usercall leaveblock(FuncState *fs@<eax>)
{
  FuncState *v1; // esi@1
  BlockCnt *v2; // ebx@1
  LexState *v3; // edi@1
  FuncState *j; // ST24_4@3
  int v5; // edx@9
  Dyndata *v6; // eax@9

  v1 = fs;
  v2 = fs->bl;
  v3 = fs->ls;
  if ( v2->previous && v2->upval )
  {
    j = luaK_jump(fs);
    luaK_patchclose(v1, (int)j, v2->nactvar);
    luaK_patchtohere(v1, (int)j);
  }
  if ( v2->isloop )
    breaklabel(v3);
  v1->bl = v2->previous;
  removevars(v1, v2->nactvar);
  v1->freereg = v1->nactvar;
  v3->dyd->label.n = v2->firstlabel;
  if ( v2->previous )
  {
    movegotosout(v1, v2);
  }
  else
  {
    v5 = v2->firstgoto;
    v6 = v3->dyd;
    if ( v5 < v6->gt.n )
      undefgoto(v3, &v6->gt.arr[v5]);
  }
}

//----- (00756A20) --------------------------------------------------------
GCObject *__usercall addprototype@<eax>(LexState *ls@<eax>)
{
  lua_State *v1; // edx@1
  FuncState *v2; // ebx@1
  int v3; // eax@1
  GCObject *v4; // esi@1
  int *v5; // ecx@1
  int v6; // edi@1
  Proto **v7; // eax@3
  GCObject *v8; // edi@6
  lua_State *L; // [sp+Ch] [bp-4h]@1

  v1 = ls->L;
  v2 = ls->fs;
  v3 = v2->np;
  v4 = (GCObject *)&v2->f->next;
  v5 = &v2->f->sizep;
  v6 = *v5;
  L = v1;
  if ( v3 >= *v5 )
  {
    if ( v3 + 1 > v6 )
    {
      v7 = (Proto **)luaM_growaux_(v1, (void *)v4->u.uv.len, v5, 4u, 0x3FFFF, "functions");
      v1 = L;
      v4->p.p = v7;
    }
    for ( ; v6 < v4->p.sizep; ++v6 )
      v4->p.p[v6] = 0;
  }
  v8 = luaF_newproto(v1);
  v4->p.p[v2->np++] = (Proto *)v8;
  if ( v8->h.marked & 3 && v4->h.marked & 4 )
    luaC_barrier_(L, v4, v8);
  return v8;
}

//----- (00756AC0) --------------------------------------------------------
void __usercall open_func(LexState *ls@<eax>, FuncState *fs@<esi>, BlockCnt *bl)
{
  lua_State *v3; // edi@1
  Proto *v4; // ecx@1
  GCObject *v5; // eax@1
  lua_TValue *v6; // ecx@1
  __int16 v7; // dx@3

  v3 = ls->L;
  fs->prev = ls->fs;
  fs->ls = ls;
  ls->fs = fs;
  fs->pc = 0;
  fs->lasttarget = 0;
  fs->jpc = -1;
  fs->nk = 0;
  fs->np = 0;
  *(_WORD *)&fs->nups = 0;
  fs->nactvar = 0;
  fs->nlocvars = 0;
  v4 = fs->f;
  fs->firstlocal = ls->dyd->actvar.n;
  fs->bl = 0;
  v4->source = ls->source;
  v4->maxstacksize = 2;
  v5 = luaH_new(v3);
  fs->h = (Table *)v5;
  v6 = v3->top;
  v6->u.i.v__.b = (int)v5;
  v6->u.i.tt__ = 2146936133;
  ++v3->top;
  if ( (signed int)(((char *)v3->stack_last - (char *)v3->top) & 0xFFFFFFF8) <= 0 )
    luaD_growstack(v3, 0);
  bl->isloop = 0;
  bl->nactvar = fs->nactvar;
  bl->firstlabel = fs->ls->dyd->label.n;
  v7 = fs->ls->dyd->gt.n;
  bl->upval = 0;
  bl->firstgoto = v7;
  bl->previous = fs->bl;
  fs->bl = bl;
}

//----- (00756B80) --------------------------------------------------------
void __cdecl close_func(LexState *ls)
{
  lua_State *v1; // ebx@1
  FuncState *v2; // edi@1
  Proto *v3; // esi@1
  int v4; // eax@1
  int v5; // eax@5
  int v6; // eax@7
  int v7; // eax@9
  int v8; // eax@11
  int v9; // ecx@13
  global_State *v10; // eax@16

  v1 = ls->L;
  v2 = ls->fs;
  v3 = v2->f;
  luaK_ret(ls->fs, 0, 0);
  leaveblock(v2);
  v4 = v2->pc;
  if ( (unsigned int)(v4 + 1) > 0x3FFFFFFF )
    luaM_toobig(v1);
  v3->code = (unsigned int *)luaM_realloc_(v1, v3->code, 4 * v3->sizecode, 4 * v4);
  v3->sizecode = v2->pc;
  if ( (unsigned int)(v2->pc + 1) > 0x3FFFFFFF )
    luaM_toobig(v1);
  v3->lineinfo = (int *)luaM_realloc_(v1, v3->lineinfo, 4 * v3->sizelineinfo, 4 * v2->pc);
  v3->sizelineinfo = v2->pc;
  v5 = v2->nk;
  if ( (unsigned int)(v5 + 1) > 0x1FFFFFFF )
    luaM_toobig(v1);
  v3->k = (lua_TValue *)luaM_realloc_(v1, v3->k, 8 * v3->sizek, 8 * v5);
  v3->sizek = v2->nk;
  v6 = v2->np;
  if ( (unsigned int)(v6 + 1) > 0x3FFFFFFF )
    luaM_toobig(v1);
  v3->p = (Proto **)luaM_realloc_(v1, v3->p, 4 * v3->sizep, 4 * v6);
  v3->sizep = v2->np;
  v7 = v2->nlocvars;
  if ( (unsigned int)(v7 + 1) > 0x15555555 )
    luaM_toobig(v1);
  v3->locvars = (LocVar *)luaM_realloc_(v1, v3->locvars, 12 * v3->sizelocvars, 12 * v7);
  v3->sizelocvars = v2->nlocvars;
  v8 = v2->nups;
  if ( (unsigned int)(v8 + 1) > 0x1FFFFFFF )
    luaM_toobig(v1);
  v3->upvalues = (Upvaldesc *)luaM_realloc_(v1, v3->upvalues, 8 * v3->sizeupvalues, 8 * v8);
  v3->sizeupvalues = v2->nups;
  ls->fs = v2->prev;
  v9 = ls->t.token;
  if ( v9 == 288 || v9 == 289 )
    luaX_newstring(ls, (const char *)&ls->t.seminfo.ts[1], ls->t.seminfo.ts->tsv.len);
  v10 = v1->l_G;
  --v1->top;
  if ( v10->GCdebt > 0 )
    luaC_step(v1);
}

//----- (00756D60) --------------------------------------------------------
int __usercall block_follow@<eax>(LexState *ls@<eax>, int withuntil)
{
  int result; // eax@2

  switch ( ls->t.token )
  {
    case 0x104:
    case 0x105:
    case 0x106:
    case 0x11E:
      result = 1;
      break;
    case 0x115:
      result = withuntil;
      break;
    default:
      result = 0;
      break;
  }
  return result;
}

//----- (00756DC0) --------------------------------------------------------
void __usercall fieldsel(LexState *ls@<ecx>, expdesc *v@<edi>)
{
  LexState *v2; // esi@1
  FuncState *v3; // ebx@1
  TString *s; // ST20_4@3
  expdesc *v5; // [sp+0h] [bp-2Ch]@0
  expdesc key; // [sp+10h] [bp-1Ch]@3

  v2 = ls;
  v3 = ls->fs;
  luaK_exp2anyregup(ls->fs, v5);
  luaX_next(v2);
  if ( v2->t.token != 288 )
    error_expected(v2, 288);
  s = v2->t.seminfo.ts;
  luaX_next(v2);
  key.u.info = luaK_stringK(v2->fs, s);
  key.t = -1;
  key.f = -1;
  key.k = 4;
  luaK_indexed(v3, v, &key);
}

//----- (00756E40) --------------------------------------------------------
void __usercall recfield(LexState *ls@<ecx>, ConsControl *cc@<ebx>)
{
  LexState *v2; // esi@1
  FuncState *v3; // edi@1
  TString *rkkey; // ST40_4@4
  int v5; // eax@4
  int v6; // ST40_4@10
  int v7; // eax@10
  char reg; // [sp+8h] [bp-3Ch]@1
  expdesc val; // [sp+10h] [bp-34h]@10
  expdesc key; // [sp+28h] [bp-1Ch]@4

  v2 = ls;
  v3 = ls->fs;
  reg = v3->freereg;
  if ( ls->t.token == 288 )
  {
    if ( cc->nh > 2147483645 )
      errorlimit(v3, 2147483645, "items in a constructor");
    rkkey = ls->t.seminfo.ts;
    luaX_next(ls);
    v5 = luaK_stringK(v2->fs, rkkey);
    key.t = -1;
    key.f = -1;
    key.k = 4;
    key.u.info = v5;
  }
  else
  {
    luaX_next(ls);
    subexpr(v2, &key, 0);
    luaK_exp2val(v2->fs, &key);
    if ( v2->t.token != 93 )
      error_expected(v2, 93);
    luaX_next(v2);
  }
  ++cc->nh;
  if ( v2->t.token != 61 )
    error_expected(v2, 61);
  luaX_next(v2);
  v6 = luaK_exp2RK(v3, &key);
  subexpr(v2, &val, 0);
  v7 = luaK_exp2RK(v3, &val);
  luaK_codeABC(v3, OP_SETTABLE, cc->t->u.info, v6, v7);
  v3->freereg = reg;
}

//----- (00756F60) --------------------------------------------------------
void __usercall lastlistfield(FuncState *fs@<edi>, ConsControl *cc@<esi>)
{
  expkind v2; // eax@2

  if ( cc->tostore )
  {
    v2 = cc->v.k;
    if ( cc->v.k == 12 || v2 == 13 )
    {
      luaK_setreturns(fs, &cc->v, -1);
      luaK_setlist(fs, cc->t->u.info, cc->na, -1);
      --cc->na;
    }
    else
    {
      if ( v2 )
        luaK_exp2nextreg(fs, &cc->v);
      luaK_setlist(fs, cc->t->u.info, cc->na, cc->tostore);
    }
  }
}

//----- (00756FC0) --------------------------------------------------------
void __fastcall constructor(LexState *ls, expdesc *t)
{
  LexState *v2; // esi@1
  FuncState *v3; // edi@1
  expdesc *v4; // ebx@1
  int v5; // eax@1
  FuncState *v6; // ST00_4@1
  int v7; // eax@7
  int v8; // eax@15
  unsigned int *v9; // esi@18
  unsigned int *v10; // esi@18
  const char *v11; // eax@23
  const char *v12; // eax@23
  ConsControl *v13; // [sp-8h] [bp-48h]@9
  const char *v14; // [sp-8h] [bp-48h]@22
  int line; // [sp+Ch] [bp-34h]@1
  int pc; // [sp+10h] [bp-30h]@1
  ConsControl cc; // [sp+14h] [bp-2Ch]@1

  v2 = ls;
  v3 = ls->fs;
  v4 = t;
  line = ls->linenumber;
  v5 = luaK_codeABC(ls->fs, OP_NEWTABLE, 0, 0, 0);
  v4->t = -1;
  v4->f = -1;
  v4->k = 11;
  v4->u.info = v5;
  cc.v.t = -1;
  cc.v.f = -1;
  v6 = v2->fs;
  pc = v5;
  cc.tostore = 0;
  cc.nh = 0;
  cc.na = 0;
  cc.t = v4;
  cc.v.k = 0;
  cc.v.u.info = 0;
  luaK_exp2nextreg(v6, v4);
  if ( v2->t.token != 123 )
    error_expected(v2, 123);
  while ( 1 )
  {
    luaX_next(v2);
    if ( v2->t.token == 125 )
      break;
    if ( cc.v.k )
    {
      luaK_exp2nextreg(v3, &cc.v);
      cc.v.k = 0;
      if ( cc.tostore == 50 )
      {
        luaK_setlist(v3, cc.t->u.info, cc.na, 50);
        cc.tostore = 0;
      }
    }
    v7 = v2->t.token;
    if ( v7 != 91 )
    {
      if ( v7 != 288 )
      {
        v13 = &cc;
LABEL_10:
        subexpr(v2, &v13->v, 0);
        if ( cc.na > 2147483645 )
          errorlimit(v2->fs, 2147483645, "items in a constructor");
        ++cc.na;
        ++cc.tostore;
        goto LABEL_15;
      }
      if ( luaX_lookahead(v2) != 61 )
      {
        v13 = &cc;
        goto LABEL_10;
      }
    }
    recfield(v2, &cc);
LABEL_15:
    v8 = v2->t.token;
    if ( v8 != 44 && v8 != 59 )
    {
      if ( v8 != 125 )
      {
        if ( line == v2->linenumber )
          error_expected(v2, 125);
        v14 = luaX_token2str(v2, 123);
        v11 = luaX_token2str(v2, 125);
        v12 = luaO_pushfstring(v2->L, "%s expected (to close %s at line %d)", v11, v14, line);
        luaX_syntaxerror(v2, v12);
      }
      break;
    }
  }
  luaX_next(v2);
  lastlistfield(v3, &cc);
  v9 = &v3->f->code[pc];
  *v9 = ((unsigned int)&loc_7FFFFE + 1) & *v9 | (luaO_int2fb(cc.na) << 23);
  v10 = &v3->f->code[pc];
  *v10 ^= ((unsigned int)&loc_7FBFFC + 4) & (*v10 ^ (luaO_int2fb(cc.nh) << 14));
}

//----- (007571B0) --------------------------------------------------------
void __usercall parlist(LexState *ls@<eax>)
{
  LexState *v1; // ebx@1
  FuncState *v2; // esi@1
  Proto *v3; // edi@1
  TString *v4; // esi@4
  FuncState *v5; // [sp+Ch] [bp-8h]@1
  int nparams; // [sp+10h] [bp-4h]@1

  v1 = ls;
  v2 = ls->fs;
  v3 = v2->f;
  v2->f->is_vararg = 0;
  v5 = v2;
  nparams = 0;
  if ( ls->t.token != 41 )
  {
    while ( 1 )
    {
      if ( v1->t.token == 280 )
      {
        luaX_next(v1);
        v3->is_vararg = 1;
        goto LABEL_10;
      }
      if ( v1->t.token != 288 )
        luaX_syntaxerror(v1, "<name> or '...' expected");
      v4 = v1->t.seminfo.ts;
      luaX_next(v1);
      new_localvar(v1, v4);
      ++nparams;
      if ( v3->is_vararg || v1->t.token != 44 )
        break;
      luaX_next(v1);
      v2 = v5;
    }
    v2 = v5;
  }
LABEL_10:
  adjustlocalvars(v1, nparams);
  v3->numparams = v2->nactvar;
  luaK_reserveregs(v2, v2->nactvar);
}

//----- (00757260) --------------------------------------------------------
void __usercall body(LexState *ls@<eax>, expdesc *e@<edi>, int ismethod, int line)
{
  LexState *v4; // ebx@1
  GCObject *v5; // eax@4
  FuncState *v6; // eax@4
  FuncState *v7; // esi@8
  int v8; // eax@8
  const char *v9; // eax@12
  const char *v10; // eax@12
  const char *v11; // [sp-8h] [bp-50h]@11
  FuncState new_fs; // [sp+8h] [bp-40h]@1
  BlockCnt v13; // [sp+3Ch] [bp-Ch]@1

  v4 = ls;
  new_fs.f = (Proto *)addprototype(ls);
  new_fs.f->linedefined = line;
  open_func(v4, &new_fs, &v13);
  if ( v4->t.token != 40 )
    error_expected(v4, 40);
  luaX_next(v4);
  if ( ismethod )
  {
    v5 = luaX_newstring(v4, "self", 4u);
    new_localvar(v4, (TString *)v5);
    v6 = v4->fs;
    v6->f->locvars[*(&v6->ls->dyd->actvar.arr[++v6->nactvar - 1].idx + v6->firstlocal)].startpc = v6->pc;
  }
  parlist(v4);
  if ( v4->t.token != 41 )
    error_expected(v4, 41);
  luaX_next(v4);
  statlist(v4);
  new_fs.f->lastlinedefined = v4->linenumber;
  if ( v4->t.token != 262 )
  {
    if ( line == v4->linenumber )
      error_expected(v4, 262);
    v11 = luaX_token2str(v4, 265);
    v9 = luaX_token2str(v4, 262);
    v10 = luaO_pushfstring(v4->L, "%s expected (to close %s at line %d)", v9, v11, line);
    luaX_syntaxerror(v4, v10);
  }
  luaX_next(v4);
  v7 = v4->fs->prev;
  v8 = luaK_codeABx(v7, OP_CLOSURE, 0, v7->np - 1);
  e->t = -1;
  e->f = -1;
  e->k = 11;
  e->u.info = v8;
  luaK_exp2nextreg(v7, e);
  close_func(v4);
}

//----- (007573C0) --------------------------------------------------------
int __usercall explist@<eax>(LexState *ls@<esi>, expdesc *v@<edi>)
{
  signed int v2; // ebx@1

  v2 = 1;
  subexpr(ls, v, 0);
  while ( ls->t.token == 44 )
  {
    luaX_next(ls);
    luaK_exp2nextreg(ls->fs, v);
    subexpr(ls, v, 0);
    ++v2;
  }
  return v2;
}

//----- (00757400) --------------------------------------------------------
void __cdecl funcargs(expdesc *f, int line)
{
  LexState *ls; // ecx@0
  LexState *v3; // esi@1
  FuncState *v4; // ebx@1
  int v5; // eax@1
  int v6; // eax@5
  int v7; // ebx@7
  FuncState *v8; // esi@9
  int v9; // eax@11
  const char *v10; // eax@20
  const char *v11; // eax@20
  int v12; // eax@22
  const char *v13; // [sp-8h] [bp-38h]@19
  FuncState *v14; // [sp+10h] [bp-20h]@1
  expdesc args; // [sp+14h] [bp-1Ch]@5

  v3 = ls;
  v4 = ls->fs;
  v5 = ls->t.token;
  v14 = ls->fs;
  if ( v5 == 40 )
  {
    luaX_next(ls);
    if ( v3->t.token == 41 )
    {
      args.k = 0;
    }
    else
    {
      explist(v3, &args);
      luaK_setreturns(v4, &args, -1);
    }
    if ( v3->t.token != 41 )
    {
      if ( line == v3->linenumber )
        error_expected(v3, 41);
      v13 = luaX_token2str(v3, 40);
      v10 = luaX_token2str(v3, 41);
      v11 = luaO_pushfstring(v3->L, "%s expected (to close %s at line %d)", v10, v13, line);
      luaX_syntaxerror(v3, v11);
    }
    luaX_next(v3);
  }
  else if ( v5 == 123 )
  {
    constructor(ls, &args);
  }
  else
  {
    if ( v5 != 289 )
      luaX_syntaxerror(ls, "function arguments expected");
    v6 = luaK_stringK(v4, ls->t.seminfo.ts);
    args.t = -1;
    args.f = -1;
    args.k = 4;
    args.u.info = v6;
    luaX_next(v3);
  }
  v7 = f->u.info;
  if ( args.k == 12 || args.k == 13 )
  {
    v8 = v14;
    v9 = -1;
  }
  else
  {
    v8 = v14;
    if ( args.k )
      luaK_exp2nextreg(v14, &args);
    v9 = v14->freereg - v7 - 1;
  }
  v12 = luaK_codeABC(v8, OP_CALL, v7, v9 + 1, 2);
  f->t = -1;
  f->f = -1;
  f->k = 12;
  f->u.info = v12;
  luaK_fixline(v8, line);
  v8->freereg = v7 + 1;
}

//----- (00757580) --------------------------------------------------------
void __usercall primaryexp(LexState *ls@<ecx>, expdesc *v@<eax>)
{
  LexState *v2; // esi@1
  expdesc *v3; // ebx@1
  int v4; // eax@1
  int v5; // edi@5
  const char *v6; // eax@10
  const char *v7; // eax@10
  const char *v8; // [sp-Ch] [bp-14h]@9

  v2 = ls;
  v3 = v;
  v4 = ls->t.token;
  if ( v4 == 40 )
  {
    v5 = ls->linenumber;
    luaX_next(ls);
    subexpr(v2, v3, 0);
    if ( v2->t.token != 41 )
    {
      if ( v5 == v2->linenumber )
        error_expected(v2, 41);
      v8 = luaX_token2str(v2, 40);
      v6 = luaX_token2str(v2, 41);
      v7 = luaO_pushfstring(v2->L, "%s expected (to close %s at line %d)", v6, v8, v5);
      luaX_syntaxerror(v2, v7);
    }
    luaX_next(v2);
    luaK_dischargevars(v2->fs, v3);
  }
  else
  {
    if ( v4 != 288 )
      luaX_syntaxerror(ls, "unexpected symbol");
    singlevar(ls, v3);
  }
}

//----- (00757620) --------------------------------------------------------
void __usercall suffixedexp(LexState *ls@<ecx>, expdesc *v@<edi>)
{
  LexState *v2; // esi@1
  FuncState *v3; // ebx@1
  unsigned int v4; // eax@1
  FuncState *v5; // ebx@3
  int v6; // eax@3
  TString *s; // ST28_4@4
  int v8; // eax@4
  TString *v9; // ebx@8
  int line; // [sp+Ch] [bp-24h]@1
  FuncState *v11; // [sp+10h] [bp-20h]@1
  expdesc key; // [sp+14h] [bp-1Ch]@4

  v2 = ls;
  v3 = ls->fs;
  line = ls->linenumber;
  v11 = ls->fs;
  primaryexp(ls, v);
  v4 = v2->t.token;
  while ( 1 )
  {
    switch ( v4 )
    {
      case 0x2Eu:
        v5 = v2->fs;
        luaK_exp2anyregup(v2->fs, v);
        luaX_next(v2);
        v6 = 288;
        if ( v2->t.token != 288 )
          goto LABEL_12;
        s = v2->t.seminfo.ts;
        luaX_next(v2);
        v8 = luaK_stringK(v2->fs, s);
        key.t = -1;
        key.f = -1;
        key.k = 4;
        key.u.info = v8;
        luaK_indexed(v5, v, &key);
        v3 = v11;
        goto LABEL_10;
      case 0x5Bu:
        luaK_exp2anyregup(v3, v);
        luaX_next(v2);
        subexpr(v2, &key, 0);
        luaK_exp2val(v2->fs, &key);
        v6 = 93;
        if ( v2->t.token != 93 )
          goto LABEL_12;
        luaX_next(v2);
        luaK_indexed(v3, v, &key);
        goto LABEL_10;
      case 0x3Au:
        luaX_next(v2);
        v6 = 288;
        if ( v2->t.token != 288 )
LABEL_12:
          error_expected(v2, v6);
        v9 = v2->t.seminfo.ts;
        luaX_next(v2);
        key.u.info = luaK_stringK(v2->fs, v9);
        key.t = -1;
        key.f = -1;
        key.k = 4;
        luaK_self(v11, v, &key);
        funcargs(v, line);
        v3 = v11;
        goto LABEL_10;
      case 0x28u:
      case 0x7Bu:
      case 0x121u:
        luaK_exp2nextreg(v3, v);
        funcargs(v, line);
LABEL_10:
        v4 = v2->t.token - 40;
        if ( v4 > 0xF9 )
          return;
        break;
      default:
        return;
    }
  }
}

//----- (007578D0) --------------------------------------------------------
void __usercall simpleexp(LexState *ls@<ebx>, expdesc *v@<eax>)
{
  expdesc *v2; // edi@1
  FuncState *v3; // eax@7
  int v4; // eax@9

  v2 = v;
  switch ( ls->t.token )
  {
    case 0x11F:
      v->u.info = 0;
      v->t = -1;
      v->f = -1;
      v->k = 5;
      v->u.nval = ls->t.seminfo.r;
      luaX_next(ls);
      return;
    case 0x121:
      codestring(ls, v, ls->t.seminfo.ts);
      luaX_next(ls);
      return;
    case 0x10E:
      v->k = 1;
      v->u.info = 0;
      goto LABEL_10;
    case 0x114:
      v->k = 2;
      v->u.info = 0;
      goto LABEL_10;
    case 0x107:
      v->k = 3;
      v->u.info = 0;
      goto LABEL_10;
    case 0x118:
      v3 = ls->fs;
      if ( !v3->f->is_vararg )
        luaX_syntaxerror(ls, "cannot use '...' outside a vararg function");
      v4 = luaK_codeABC(v3, OP_VARARG, 0, 1, 0);
      v2->k = 13;
      v2->u.info = v4;
LABEL_10:
      v2->f = -1;
      v2->t = -1;
      luaX_next(ls);
      break;
    case 0x7B:
      constructor(ls, v);
      break;
    case 0x109:
      luaX_next(ls);
      body(ls, v2, 0, ls->linenumber);
      break;
    default:
      suffixedexp(ls, v);
      break;
  }
}

//----- (00757AA0) --------------------------------------------------------
signed int __usercall getbinopr@<eax>(int op@<eax>)
{
  signed int result; // eax@2

  switch ( op )
  {
    case 43:
      result = 0;
      break;
    case 45:
      result = 1;
      break;
    case 42:
      result = 2;
      break;
    case 47:
      result = 3;
      break;
    case 37:
      result = 4;
      break;
    case 94:
      result = 5;
      break;
    case 279:
      result = 6;
      break;
    case 284:
      result = 10;
      break;
    case 281:
      result = 7;
      break;
    case 60:
      result = 8;
      break;
    case 283:
      result = 9;
      break;
    case 62:
      result = 11;
      break;
    case 282:
      result = 12;
      break;
    case 257:
      result = 13;
      break;
    case 272:
      result = 14;
      break;
    default:
      result = 15;
      break;
  }
  return result;
}

//----- (00757C50) --------------------------------------------------------
signed int __cdecl subexpr(LexState *ls, expdesc *v, int limit)
{
  lua_State *v3; // eax@1
  expdesc *v4; // edi@1
  int v5; // eax@3
  int v6; // esi@9
  signed int v7; // esi@11
  int v8; // ST40_4@15
  BinOpr v9; // edi@15
  int line; // [sp+10h] [bp-20h]@6
  expdesc v2; // [sp+14h] [bp-1Ch]@15

  v3 = ls->L;
  ++v3->nCcalls;
  v4 = v;
  if ( v3->nCcalls > 0xC8u )
    errorlimit(ls->fs, 200, "C levels");
  v5 = ls->t.token;
  if ( v5 == 35 )
  {
    line = 2;
    goto LABEL_9;
  }
  if ( v5 == 45 )
  {
    line = 0;
    goto LABEL_9;
  }
  if ( v5 == 271 )
  {
    line = 1;
LABEL_9:
    v6 = ls->linenumber;
    luaX_next(ls);
    subexpr(ls, v, 8);
    luaK_prefix(ls->fs, (UnOpr)line, v, v6);
    goto LABEL_11;
  }
  simpleexp(ls, v);
LABEL_11:
  v7 = getbinopr(ls->t.token);
  if ( v7 != 15 )
  {
    while ( priority[v7].left > limit )
    {
      v8 = ls->linenumber;
      luaX_next(ls);
      luaK_infix(ls->fs, (BinOpr)v7, v4);
      v9 = subexpr(ls, &v2, priority[v7].right);
      luaK_posfix(ls->fs, (BinOpr)v7, v, &v2, v8);
      v7 = v9;
      if ( v9 == 15 )
        break;
      v4 = v;
    }
  }
  --ls->L->nCcalls;
  return v7;
}

//----- (00757D80) --------------------------------------------------------
void __usercall block(LexState *ls@<eax>)
{
  FuncState *v1; // esi@1
  BlockCnt *v2; // [sp+4h] [bp-Ch]@1
  __int16 v3; // [sp+8h] [bp-8h]@1
  __int16 v4; // [sp+Ah] [bp-6h]@1
  char v5; // [sp+Ch] [bp-4h]@1
  char v6; // [sp+Dh] [bp-3h]@1
  char v7; // [sp+Eh] [bp-2h]@1

  v7 = 0;
  v1 = ls->fs;
  v5 = v1->nactvar;
  v3 = v1->ls->dyd->label.n;
  v4 = v1->ls->dyd->gt.n;
  v6 = 0;
  v2 = v1->bl;
  v1->bl = (BlockCnt *)&v2;
  statlist(ls);
  leaveblock(v1);
}

//----- (00757DE0) --------------------------------------------------------
void __usercall check_conflict(LexState *ls@<ecx>, LHS_assign *lh@<eax>, expdesc *v@<esi>)
{
  FuncState *v3; // edi@1
  int v4; // ecx@1
  signed int v5; // edx@1

  v3 = ls->fs;
  v4 = v3->freereg;
  v5 = 0;
  if ( lh )
  {
    do
    {
      if ( lh->v.k == 9 )
      {
        if ( lh->v.u.ind.vt == v->k && lh->v.u.ind.t == v->u.info )
        {
          v5 = 1;
          lh->v.u.ind.vt = 7;
          lh->v.u.ind.t = v4;
        }
        if ( v->k == 7 && lh->v.u.ind.idx == v->u.info )
        {
          v5 = 1;
          lh->v.u.ind.idx = v4;
        }
      }
      lh = lh->prev;
    }
    while ( lh );
    if ( v5 )
    {
      luaK_codeABC(v3, (OpCode)(v->k != 7 ? 5 : 0), v4, v->u.info, 0);
      luaK_reserveregs(v3, 1);
    }
  }
}

//----- (00757E60) --------------------------------------------------------
void __cdecl assignment(LexState *ls, LHS_assign *lh, int nvars)
{
  expkind v3; // eax@1
  int v4; // eax@3
  int v5; // eax@11
  FuncState *v6; // ebx@14
  expdesc *var; // [sp+Ch] [bp-44h]@1
  int nexps; // [sp+10h] [bp-40h]@11
  LHS_assign nv; // [sp+14h] [bp-3Ch]@4
  expdesc e; // [sp+34h] [bp-1Ch]@11

  var = &lh->v;
  v3 = lh->v.k;
  if ( (signed int)v3 < 7 || (signed int)v3 > 9 )
    luaX_syntaxerror(ls, "syntax error");
  v4 = ls->t.token;
  if ( v4 == 44 )
  {
    luaX_next(ls);
    nv.prev = lh;
    suffixedexp(ls, &nv.v);
    if ( nv.v.k != 9 )
      check_conflict(ls, lh, &nv.v);
    if ( nvars + ls->L->nCcalls > 200 )
      errorlimit(ls->fs, 200, "C levels");
    assignment(ls, &nv, nvars + 1);
LABEL_14:
    v6 = ls->fs;
    e.u.info = v6->freereg - 1;
    e.t = -1;
    e.f = -1;
    e.k = 6;
    luaK_storevar(v6, var, &e);
    return;
  }
  if ( v4 != 61 )
    error_expected(ls, 61);
  luaX_next(ls);
  v5 = explist(ls, &e);
  nexps = v5;
  if ( v5 != nvars )
  {
    adjust_assign(ls, nvars, &e, v5);
    if ( nexps > nvars )
      ls->fs->freereg += nvars - nexps;
    goto LABEL_14;
  }
  luaK_setoneret(ls->fs, &e);
  luaK_storevar(ls->fs, var, &e);
}

//----- (00757FD0) --------------------------------------------------------
void __usercall gotostat(LexState *ls@<eax>, int pc)
{
  LexState *v2; // ebx@1
  int v3; // edi@1
  GCObject *v4; // esi@4
  GCObject *v5; // eax@4
  int v6; // eax@6

  v2 = ls;
  v3 = ls->linenumber;
  if ( ls->t.token == 266 )
  {
    luaX_next(ls);
    if ( v2->t.token != 288 )
      error_expected(v2, 288);
    v4 = (GCObject *)v2->t.seminfo.ts;
    luaX_next(v2);
    v5 = v4;
  }
  else
  {
    luaX_next(ls);
    v5 = luaS_new(v2->L, "break");
  }
  v6 = newlabelentry(v2, &v2->dyd->gt, (TString *)v5, v3, pc);
  findlabel(v2, v6);
}

//----- (00758050) --------------------------------------------------------
void __usercall labelstat(LexState *ls@<eax>, TString *label, int line)
{
  LexState *v3; // ebx@1
  int v4; // esi@1
  Dyndata *v5; // edi@1
  int v6; // eax@2
  const char *v7; // eax@8
  LexState *v8; // ST08_4@9
  int v9; // esi@10
  int v10; // eax@11
  FuncState *v11; // [sp+Ch] [bp-8h]@1
  int i; // [sp+10h] [bp-4h]@2

  v3 = ls;
  v11 = ls->fs;
  v4 = v11->bl->firstlabel;
  v5 = ls->dyd;
  if ( v4 < v5->label.n )
  {
    v6 = 16 * v4;
    for ( i = 16 * v4; ; v6 = i )
    {
      if ( luaS_eqstr(label, *(TString **)((char *)&v5->label.arr->name + v6)) )
      {
        v7 = luaO_pushfstring(v11->ls->L, "label '%s' already defined on line %d", &label[1], v5->label.arr[v4].line);
        v8 = v11->ls;
        v8->t.token = 0;
        luaX_syntaxerror(v8, v7);
      }
      i += 16;
      if ( ++v4 >= v5->label.n )
        break;
    }
  }
  if ( v3->t.token != 285 )
    error_expected(v3, 285);
  luaX_next(v3);
  v9 = newlabelentry(v3, &v5->label, label, line, v11->pc);
  while ( 1 )
  {
    v10 = v3->t.token;
    if ( v10 != 59 && v10 != 285 )
      break;
    statement(v3);
  }
  switch ( v10 )
  {
    case 260:
    case 261:
    case 262:
    case 286:
      v5->label.arr[v9].nactvar = v11->bl->nactvar;
      break;
    default:
      break;
  }
  findgotos(v3, &v5->label.arr[v9]);
}

//----- (007581A0) --------------------------------------------------------
void __cdecl whilestat(int line)
{
  LexState *ls; // ecx@0
  LexState *v2; // esi@1
  FuncState *v3; // edi@1
  FuncState *v4; // ebx@5
  FuncState *v5; // eax@5
  const char *v6; // eax@10
  const char *v7; // eax@10
  const char *v8; // [sp-8h] [bp-4Ch]@9
  int whileinit; // [sp+Ch] [bp-38h]@1
  BlockCnt *v10; // [sp+10h] [bp-34h]@5
  __int16 v11; // [sp+14h] [bp-30h]@5
  __int16 v12; // [sp+16h] [bp-2Eh]@5
  char v13; // [sp+18h] [bp-2Ch]@5
  char v14; // [sp+19h] [bp-2Bh]@5
  char v15; // [sp+1Ah] [bp-2Ah]@5
  BlockCnt *v16; // [sp+1Ch] [bp-28h]@3
  __int16 v17; // [sp+20h] [bp-24h]@3
  __int16 v18; // [sp+22h] [bp-22h]@3
  char v19; // [sp+24h] [bp-20h]@3
  char v20; // [sp+25h] [bp-1Fh]@3
  char v21; // [sp+26h] [bp-1Eh]@3
  expdesc v; // [sp+28h] [bp-1Ch]@1

  v2 = ls;
  v3 = ls->fs;
  luaX_next(ls);
  whileinit = luaK_getlabel(v3);
  subexpr(v2, &v, 0);
  if ( v.k == 1 )
    v.k = 3;
  luaK_goiftrue(v2->fs, &v);
  v21 = 1;
  v19 = v3->nactvar;
  v17 = v3->ls->dyd->label.n;
  v18 = v3->ls->dyd->gt.n;
  v20 = 0;
  v16 = v3->bl;
  v3->bl = (BlockCnt *)&v16;
  if ( v2->t.token != 259 )
    error_expected(v2, 259);
  luaX_next(v2);
  v4 = v2->fs;
  v15 = 0;
  v13 = v4->nactvar;
  v11 = v4->ls->dyd->label.n;
  v12 = v4->ls->dyd->gt.n;
  v14 = 0;
  v10 = v4->bl;
  v4->bl = (BlockCnt *)&v10;
  statlist(v2);
  leaveblock(v4);
  v5 = luaK_jump(v3);
  luaK_patchlist(v3, (int)v5, whileinit);
  if ( v2->t.token != 262 )
  {
    if ( line == v2->linenumber )
      error_expected(v2, 262);
    v8 = luaX_token2str(v2, 278);
    v6 = luaX_token2str(v2, 262);
    v7 = luaO_pushfstring(v2->L, "%s expected (to close %s at line %d)", v6, v8, line);
    luaX_syntaxerror(v2, v7);
  }
  luaX_next(v2);
  leaveblock(v3);
  luaK_patchtohere(v3, v.f);
}

//----- (00758330) --------------------------------------------------------
void __cdecl repeatstat(int line)
{
  LexState *ls; // ecx@0
  LexState *v2; // esi@1
  FuncState *v3; // edi@1
  int v4; // eax@1
  int v5; // esi@4
  const char *v6; // eax@10
  const char *v7; // eax@10
  const char *v8; // [sp-8h] [bp-48h]@9
  int repeat_init; // [sp+8h] [bp-38h]@1
  BlockCnt bl1; // [sp+Ch] [bp-34h]@1
  BlockCnt bl2; // [sp+18h] [bp-28h]@1
  expdesc v; // [sp+24h] [bp-1Ch]@2

  v2 = ls;
  v3 = ls->fs;
  v4 = luaK_getlabel(ls->fs);
  bl1.isloop = 1;
  repeat_init = v4;
  bl1.nactvar = v3->nactvar;
  bl1.firstlabel = v3->ls->dyd->label.n;
  bl1.firstgoto = v3->ls->dyd->gt.n;
  bl1.upval = 0;
  bl1.previous = v3->bl;
  v3->bl = &bl1;
  bl2.isloop = 0;
  bl2.nactvar = v3->nactvar;
  bl2.firstlabel = v3->ls->dyd->label.n;
  bl2.firstgoto = v3->ls->dyd->gt.n;
  bl2.upval = 0;
  bl2.previous = v3->bl;
  v3->bl = &bl2;
  luaX_next(v2);
  statlist(v2);
  if ( v2->t.token != 277 )
  {
    if ( line == v2->linenumber )
      error_expected(v2, 277);
    v8 = luaX_token2str(v2, 273);
    v6 = luaX_token2str(v2, 277);
    v7 = luaO_pushfstring(v2->L, "%s expected (to close %s at line %d)", v6, v8, line);
    luaX_syntaxerror(v2, v7);
  }
  luaX_next(v2);
  subexpr(v2, &v, 0);
  if ( v.k == 1 )
    v.k = 3;
  luaK_goiftrue(v2->fs, &v);
  v5 = v.f;
  if ( bl2.upval )
    luaK_patchclose(v3, v.f, (unsigned __int8)bl2.nactvar);
  leaveblock(v3);
  luaK_patchlist(v3, v5, repeat_init);
  leaveblock(v3);
}

//----- (007584A0) --------------------------------------------------------
void __usercall forbody(LexState *ls@<eax>, int base, int line, int nvars, int isnum)
{
  LexState *v5; // ebx@1
  FuncState *v6; // edi@1
  signed int v7; // ecx@1
  int v8; // eax@2
  FuncState *v9; // eax@6
  LexState *v10; // edx@8
  FuncState *v11; // esi@8
  int v12; // ebx@8
  int v13; // eax@9
  BlockCnt *v14; // [sp+Ch] [bp-1Ch]@8
  __int16 v15; // [sp+10h] [bp-18h]@8
  __int16 v16; // [sp+12h] [bp-16h]@8
  char v17; // [sp+14h] [bp-14h]@8
  char v18; // [sp+15h] [bp-13h]@8
  char v19; // [sp+16h] [bp-12h]@8
  BlockCnt *v20; // [sp+18h] [bp-10h]@8
  __int16 v21; // [sp+1Ch] [bp-Ch]@8
  __int16 v22; // [sp+1Eh] [bp-Ah]@8
  char v23; // [sp+20h] [bp-8h]@8
  char v24; // [sp+21h] [bp-7h]@8
  char v25; // [sp+22h] [bp-6h]@8
  int prep; // [sp+24h] [bp-4h]@8

  v5 = ls;
  v6 = ls->fs;
  v7 = 3;
  v6->nactvar += 3;
  do
  {
    v8 = v6->nactvar - v7--;
    v6->f->locvars[v6->ls->dyd->actvar.arr[v6->firstlocal + v8].idx].startpc = v6->pc;
  }
  while ( v7 );
  if ( v5->t.token != 259 )
    error_expected(v5, 259);
  luaX_next(v5);
  if ( isnum )
    v9 = (FuncState *)luaK_codeABx(v6, OP_FORPREP, base, 0x1FFFEu);
  else
    v9 = luaK_jump(v6);
  v25 = 0;
  v23 = v6->nactvar;
  v10 = v6->ls;
  prep = (int)v9;
  v21 = v10->dyd->label.n;
  v22 = v6->ls->dyd->gt.n;
  v24 = 0;
  v20 = v6->bl;
  v6->bl = (BlockCnt *)&v20;
  adjustlocalvars(v5, nvars);
  luaK_reserveregs(v6, nvars);
  v11 = v5->fs;
  v19 = 0;
  v17 = v11->nactvar;
  v15 = v11->ls->dyd->label.n;
  v16 = v11->ls->dyd->gt.n;
  v18 = 0;
  v14 = v11->bl;
  v11->bl = (BlockCnt *)&v14;
  statlist(v5);
  leaveblock(v11);
  leaveblock(v6);
  v12 = prep;
  luaK_patchtohere(v6, prep);
  if ( isnum )
  {
    v13 = luaK_codeABx(v6, OP_FORLOOP, base, 0x1FFFEu);
  }
  else
  {
    luaK_codeABC(v6, OP_TFORCALL, base, 0, nvars);
    luaK_fixline(v6, line);
    v13 = luaK_codeABx(v6, OP_TFORLOOP, base + 2, 0x1FFFEu);
  }
  luaK_patchlist(v6, v13, v12 + 1);
  luaK_fixline(v6, line);
}

//----- (00758630) --------------------------------------------------------
void __usercall fornum(LexState *ls@<ecx>, TString *varname@<edx>, int line)
{
  LexState *v3; // ebx@1
  FuncState *v4; // esi@1
  TString *v5; // edi@1
  GCObject *v6; // eax@1
  GCObject *v7; // eax@1
  GCObject *v8; // eax@1
  int v9; // eax@7
  int base; // [sp+14h] [bp-20h]@1
  expdesc v; // [sp+18h] [bp-1Ch]@3

  v3 = ls;
  v4 = ls->fs;
  v5 = varname;
  base = v4->freereg;
  v6 = luaX_newstring(ls, "(for index)", 0xBu);
  new_localvar(v3, (TString *)v6);
  v7 = luaX_newstring(v3, "(for limit)", 0xBu);
  new_localvar(v3, (TString *)v7);
  v8 = luaX_newstring(v3, "(for step)", 0xAu);
  new_localvar(v3, (TString *)v8);
  new_localvar(v3, v5);
  if ( v3->t.token != 61 )
    error_expected(v3, 61);
  luaX_next(v3);
  subexpr(v3, &v, 0);
  luaK_exp2nextreg(v3->fs, &v);
  if ( v3->t.token != 44 )
    error_expected(v3, 44);
  luaX_next(v3);
  subexpr(v3, &v, 0);
  luaK_exp2nextreg(v3->fs, &v);
  if ( v3->t.token == 44 )
  {
    luaX_next(v3);
    subexpr(v3, &v, 0);
    luaK_exp2nextreg(v3->fs, &v);
  }
  else
  {
    v9 = luaK_numberK(v4, 1.0);
    luaK_codek(v4, v4->freereg, v9);
    luaK_reserveregs(v4, 1);
  }
  forbody(v3, base, line, 1, 1);
}

//----- (00758770) --------------------------------------------------------
void __fastcall forlist(LexState *ls, TString *indexname)
{
  LexState *v2; // esi@1
  TString *v3; // edi@1
  GCObject *v4; // eax@1
  GCObject *v5; // eax@1
  GCObject *v6; // eax@1
  int v7; // eax@3
  TString *v8; // ST40_4@4
  FuncState *v9; // edi@4
  Dyndata *v10; // ebx@4
  int v11; // eax@11
  FuncState *v12; // ebx@11
  int v13; // edi@11
  TString *v14; // ST40_4@16
  int v15; // edi@17
  int line; // [sp+Ch] [bp-30h]@11
  int base; // [sp+10h] [bp-2Ch]@1
  FuncState *v18; // [sp+14h] [bp-28h]@1
  int nvars; // [sp+18h] [bp-24h]@1
  __int16 varname; // [sp+1Ch] [bp-20h]@4
  expdesc e; // [sp+20h] [bp-1Ch]@11

  v2 = ls;
  v18 = ls->fs;
  v3 = indexname;
  nvars = 4;
  base = v18->freereg;
  v4 = luaX_newstring(ls, "(for generator)", 0xFu);
  new_localvar(v2, (TString *)v4);
  v5 = luaX_newstring(v2, "(for state)", 0xBu);
  new_localvar(v2, (TString *)v5);
  v6 = luaX_newstring(v2, "(for control)", 0xDu);
  new_localvar(v2, (TString *)v6);
  new_localvar(v2, v3);
  while ( v2->t.token == 44 )
  {
    luaX_next(v2);
    v7 = 288;
    if ( v2->t.token != 288 )
      goto LABEL_10;
    v8 = v2->t.seminfo.ts;
    luaX_next(v2);
    v9 = v2->fs;
    v10 = v2->dyd;
    varname = registerlocalvar(v2, v8);
    if ( v10->actvar.n - v9->firstlocal + 1 > 200 )
      errorlimit(v9, 200, "local variables");
    if ( v10->actvar.n + 2 > v10->actvar.size )
      v10->actvar.arr = (Vardesc *)luaM_growaux_(
                                     v2->L,
                                     v10->actvar.arr,
                                     &v10->actvar.size,
                                     2u,
                                     2147483645,
                                     "local variables");
    v10->actvar.arr[v10->actvar.n++].idx = varname;
    ++nvars;
  }
  v7 = 268;
  if ( v2->t.token != 268 )
LABEL_10:
    error_expected(v2, v7);
  luaX_next(v2);
  line = v2->linenumber;
  v11 = explist(v2, &e);
  v12 = v2->fs;
  v13 = 3 - v11;
  if ( e.k == 12 || e.k == 13 )
  {
    v15 = v13 + 1;
    if ( v15 < 0 )
      v15 = 0;
    luaK_setreturns(v12, &e, v15);
    if ( v15 > 1 )
      luaK_reserveregs(v12, v15 - 1);
  }
  else
  {
    if ( e.k )
      luaK_exp2nextreg(v12, &e);
    if ( v13 > 0 )
    {
      v14 = (TString *)v12->freereg;
      luaK_reserveregs(v12, v13);
      luaK_nil(v12, (int)v14, v13);
    }
  }
  luaK_checkstack(v18, 3);
  forbody(v2, base, line, nvars - 3, 0);
}

//----- (00758960) --------------------------------------------------------
void __usercall forstat(LexState *ls@<eax>, int line)
{
  LexState *v2; // esi@1
  FuncState *v3; // edi@1
  TString *v4; // ebx@3
  int v5; // eax@3
  const char *v6; // eax@14
  const char *v7; // eax@14
  const char *v8; // [sp-8h] [bp-1Ch]@13
  BlockCnt *v9; // [sp+8h] [bp-Ch]@1
  __int16 v10; // [sp+Ch] [bp-8h]@1
  __int16 v11; // [sp+Eh] [bp-6h]@1
  char v12; // [sp+10h] [bp-4h]@1
  char v13; // [sp+11h] [bp-3h]@1
  char v14; // [sp+12h] [bp-2h]@1

  v14 = 1;
  v2 = ls;
  v3 = ls->fs;
  v12 = v3->nactvar;
  v10 = v3->ls->dyd->label.n;
  v11 = v3->ls->dyd->gt.n;
  v13 = 0;
  v9 = v3->bl;
  v3->bl = (BlockCnt *)&v9;
  luaX_next(ls);
  if ( v2->t.token != 288 )
    error_expected(v2, 288);
  v4 = v2->t.seminfo.ts;
  luaX_next(v2);
  v5 = v2->t.token;
  if ( v5 != 44 )
  {
    if ( v5 == 61 )
    {
      fornum(v2, v4, line);
      goto LABEL_9;
    }
    if ( v5 != 268 )
      luaX_syntaxerror(v2, "'=' or 'in' expected");
  }
  forlist(v2, v4);
LABEL_9:
  if ( v2->t.token != 262 )
  {
    if ( line == v2->linenumber )
      error_expected(v2, 262);
    v8 = luaX_token2str(v2, 264);
    v6 = luaX_token2str(v2, 262);
    v7 = luaO_pushfstring(v2->L, "%s expected (to close %s at line %d)", v6, v8, line);
    luaX_syntaxerror(v2, v7);
  }
  luaX_next(v2);
  leaveblock(v3);
}

//----- (00758A70) --------------------------------------------------------
void __cdecl test_then_block(int *escapelist)
{
  LexState *ls; // ecx@0
  LexState *v2; // esi@1
  FuncState *v3; // edi@1
  int v4; // eax@3
  __int16 v5; // cx@5
  FuncState *v6; // ebx@5
  int v7; // eax@7
  int v8; // esi@13
  FuncState *v9; // eax@15
  BlockCnt *v10; // [sp+10h] [bp-28h]@5
  __int16 v11; // [sp+14h] [bp-24h]@5
  __int16 v12; // [sp+16h] [bp-22h]@5
  char v13; // [sp+18h] [bp-20h]@5
  char v14; // [sp+19h] [bp-1Fh]@5
  char v15; // [sp+1Ah] [bp-1Eh]@5
  expdesc v; // [sp+1Ch] [bp-1Ch]@1

  v2 = ls;
  v3 = ls->fs;
  luaX_next(ls);
  subexpr(v2, &v, 0);
  if ( v2->t.token != 275 )
    error_expected(v2, 275);
  luaX_next(v2);
  v4 = v2->t.token;
  if ( v4 == 266 || v4 == 258 )
  {
    luaK_goiffalse(v2->fs, &v);
    v15 = 0;
    v13 = v3->nactvar;
    v11 = v3->ls->dyd->label.n;
    v12 = v3->ls->dyd->gt.n;
    v14 = 0;
    v10 = v3->bl;
    v3->bl = (BlockCnt *)&v10;
    gotostat(v2, v.t);
    while ( 1 )
    {
      v7 = v2->t.token;
      if ( v7 != 59 && v7 != 285 )
        break;
      statement(v2);
    }
    switch ( v7 )
    {
      case 260:
      case 261:
      case 262:
      case 286:
        leaveblock(v3);
        break;
      default:
        v6 = luaK_jump(v3);
        goto LABEL_13;
    }
  }
  else
  {
    luaK_goiftrue(v2->fs, &v);
    v15 = 0;
    v13 = v3->nactvar;
    v11 = v3->ls->dyd->label.n;
    v5 = v3->ls->dyd->gt.n;
    v14 = 0;
    v12 = v5;
    v10 = v3->bl;
    v3->bl = (BlockCnt *)&v10;
    v6 = (FuncState *)v.f;
LABEL_13:
    statlist(v2);
    leaveblock(v3);
    v8 = v2->t.token;
    if ( v8 == 260 || v8 == 261 )
    {
      v9 = luaK_jump(v3);
      luaK_concat(v3, escapelist, (int)v9);
    }
    luaK_patchtohere(v3, (int)v6);
  }
}

//----- (00758C40) --------------------------------------------------------
void __usercall ifstat(LexState *ls@<eax>, int line@<ebx>)
{
  LexState *v2; // esi@1
  FuncState *v3; // edi@4
  __int16 v4; // cx@4
  const char *v5; // eax@10
  const char *v6; // eax@10
  const char *v7; // [sp-8h] [bp-24h]@9
  BlockCnt *v8; // [sp+8h] [bp-14h]@4
  __int16 v9; // [sp+Ch] [bp-10h]@4
  __int16 v10; // [sp+Eh] [bp-Eh]@4
  char v11; // [sp+10h] [bp-Ch]@4
  char v12; // [sp+11h] [bp-Bh]@4
  char v13; // [sp+12h] [bp-Ah]@4
  FuncState *v14; // [sp+14h] [bp-8h]@1
  int escapelist; // [sp+18h] [bp-4h]@1

  v2 = ls;
  v14 = ls->fs;
  escapelist = -1;
  test_then_block(&escapelist);
  while ( v2->t.token == 261 )
    test_then_block(&escapelist);
  if ( v2->t.token == 260 )
  {
    luaX_next(v2);
    v3 = v2->fs;
    v13 = 0;
    v11 = v3->nactvar;
    v9 = v3->ls->dyd->label.n;
    v4 = v3->ls->dyd->gt.n;
    v12 = 0;
    v10 = v4;
    v8 = v3->bl;
    v3->bl = (BlockCnt *)&v8;
    statlist(v2);
    leaveblock(v3);
  }
  if ( v2->t.token != 262 )
  {
    if ( line == v2->linenumber )
      error_expected(v2, 262);
    v7 = luaX_token2str(v2, 267);
    v5 = luaX_token2str(v2, 262);
    v6 = luaO_pushfstring(v2->L, "%s expected (to close %s at line %d)", v5, v7, line);
    luaX_syntaxerror(v2, v6);
  }
  luaX_next(v2);
  luaK_patchtohere(v14, escapelist);
}

//----- (00758D50) --------------------------------------------------------
void __thiscall localfunc(LexState *ls)
{
  LexState *v1; // ebx@1
  FuncState *v2; // esi@1
  TString *v3; // edi@3
  FuncState *v4; // eax@3
  expdesc b; // [sp+Ch] [bp-1Ch]@3

  v1 = ls;
  v2 = ls->fs;
  if ( ls->t.token != 288 )
    error_expected(ls, 288);
  v3 = ls->t.seminfo.ts;
  luaX_next(ls);
  new_localvar(v1, v3);
  v4 = v1->fs;
  v4->f->locvars[*(&v4->ls->dyd->actvar.arr[++v4->nactvar - 1].idx + v4->firstlocal)].startpc = v4->pc;
  body(v1, &b, 0, v1->linenumber);
  v2->f->locvars[v2->ls->dyd->actvar.arr[b.u.info + v2->firstlocal].idx].startpc = v2->pc;
}

//----- (00758E00) --------------------------------------------------------
void __thiscall localstat(LexState *ls)
{
  LexState *v1; // esi@1
  TString *v2; // ST28_4@3
  FuncState *v3; // ebx@3
  Dyndata *v4; // edi@3
  int v5; // eax@11
  int nvars; // [sp+8h] [bp-24h]@1
  __int16 varname; // [sp+Ch] [bp-20h]@3
  expdesc e; // [sp+10h] [bp-1Ch]@11

  v1 = ls;
  nvars = 0;
  while ( 1 )
  {
    if ( v1->t.token != 288 )
      error_expected(v1, 288);
    v2 = v1->t.seminfo.ts;
    luaX_next(v1);
    v3 = v1->fs;
    v4 = v1->dyd;
    varname = registerlocalvar(v1, v2);
    if ( v4->actvar.n - v3->firstlocal + 1 > 200 )
      errorlimit(v3, 200, "local variables");
    if ( v4->actvar.n + 2 > v4->actvar.size )
      v4->actvar.arr = (Vardesc *)luaM_growaux_(
                                    v1->L,
                                    v4->actvar.arr,
                                    &v4->actvar.size,
                                    2u,
                                    2147483645,
                                    "local variables");
    v4->actvar.arr[v4->actvar.n++].idx = varname;
    ++nvars;
    if ( v1->t.token != 44 )
      break;
    luaX_next(v1);
  }
  if ( v1->t.token == 61 )
  {
    luaX_next(v1);
    v5 = explist(v1, &e);
  }
  else
  {
    v5 = 0;
    e.k = 0;
  }
  adjust_assign(v1, nvars, &e, v5);
  adjustlocalvars(v1, nvars);
}

//----- (00758F20) --------------------------------------------------------
int __fastcall funcname(LexState *ls, expdesc *v)
{
  expdesc *v2; // ebx@1
  LexState *v3; // esi@1
  TString *v4; // edi@3
  int v5; // eax@3
  FuncState *v7; // [sp+Ch] [bp-24h]@2
  int ismethod; // [sp+10h] [bp-20h]@1
  expdesc k; // [sp+14h] [bp-1Ch]@3

  v2 = v;
  v3 = ls;
  ismethod = 0;
  singlevar(ls, v);
  while ( v3->t.token == 46 )
  {
    v7 = v3->fs;
    luaK_exp2anyregup(v7, v2);
    luaX_next(v3);
    if ( v3->t.token != 288 )
      error_expected(v3, 288);
    v4 = v3->t.seminfo.ts;
    luaX_next(v3);
    v5 = luaK_stringK(v3->fs, v4);
    k.t = -1;
    k.f = -1;
    k.k = 4;
    k.u.info = v5;
    luaK_indexed(v7, v2, &k);
  }
  if ( v3->t.token == 58 )
  {
    ismethod = 1;
    fieldsel(v3, v2);
  }
  return ismethod;
}

//----- (00758FE0) --------------------------------------------------------
void __usercall funcstat(LexState *ls@<esi>, int line@<ebx>)
{
  int v2; // eax@1
  LexState *v3; // [sp+0h] [bp-3Ch]@0
  expdesc v; // [sp+8h] [bp-34h]@1
  expdesc b; // [sp+20h] [bp-1Ch]@1

  luaX_next(v3);
  v2 = funcname(ls, &v);
  body(ls, &b, v2, line);
  luaK_storevar(ls->fs, &v, &b);
  luaK_fixline(ls->fs, line);
}

//----- (00759040) --------------------------------------------------------
void __usercall exprstat(LexState *ls@<esi>)
{
  FuncState *v1; // ebx@1
  int v2; // eax@1
  unsigned int *v3; // eax@5
  LHS_assign v; // [sp+8h] [bp-24h]@1

  v1 = ls->fs;
  suffixedexp(ls, &v.v);
  v2 = ls->t.token;
  if ( v2 == 61 || v2 == 44 )
  {
    v.prev = 0;
    assignment(ls, &v, 1);
  }
  else
  {
    if ( v.v.k != 12 )
      luaX_syntaxerror(ls, "syntax error");
    v3 = &v1->f->code[v.v.u.info];
    *v3 = *v3 & 0xFF807FFF | 0x4000;
  }
}

//----- (007590D0) --------------------------------------------------------
void __thiscall retstat(LexState *ls)
{
  LexState *v1; // esi@1
  int v2; // eax@1
  FuncState *v3; // ebx@1
  int v4; // edi@3
  int v5; // eax@6
  expdesc e; // [sp+Ch] [bp-1Ch]@3

  v1 = ls;
  v2 = ls->t.token;
  v3 = ls->fs;
  switch ( v2 )
  {
    default:
      if ( v2 == 59 )
        goto $LN25_64;
      v4 = explist(ls, &e);
      if ( e.k == 12 || e.k == 13 )
      {
        luaK_setreturns(v3, &e, -1);
        if ( e.k == 12 && v4 == 1 )
          v3->f->code[e.u.info] = v3->f->code[e.u.info] & 0xFFFFFFDE | 0x1E;
        v5 = v3->nactvar;
        v4 = -1;
      }
      else if ( v4 == 1 )
      {
        v5 = luaK_exp2anyreg(v3, &e);
      }
      else
      {
        luaK_exp2nextreg(v3, &e);
        v5 = v3->nactvar;
      }
      break;
    case 260:
    case 261:
    case 262:
    case 277:
    case 286:
$LN25_64:
      v4 = 0;
      v5 = 0;
      break;
  }
  luaK_ret(v3, v5, v4);
  if ( v1->t.token == 59 )
    luaX_next(v1);
}

//----- (007591E0) --------------------------------------------------------
void __cdecl statement(LexState *ls)
{
  lua_State *v1; // eax@1
  int v2; // ebx@1
  const char *v3; // eax@11
  const char *v4; // eax@11
  TString *v5; // eax@18
  FuncState *v6; // eax@20
  const char *v7; // [sp-8h] [bp-10h]@10

  v1 = ls->L;
  v2 = ls->linenumber;
  if ( ++v1->nCcalls > 0xC8u )
    errorlimit(ls->fs, 200, "C levels");
  switch ( ls->t.token )
  {
    case 0x3B:
      goto LABEL_4;
    case 0x10B:
      ifstat(ls, v2);
      break;
    case 0x116:
      whilestat(v2);
      break;
    case 0x103:
      luaX_next(ls);
      block(ls);
      if ( ls->t.token != 262 )
      {
        if ( v2 == ls->linenumber )
          error_expected(ls, 262);
        v7 = luaX_token2str(ls, 259);
        v3 = luaX_token2str(ls, 262);
        v4 = luaO_pushfstring(ls->L, "%s expected (to close %s at line %d)", v3, v7, v2);
        luaX_syntaxerror(ls, v4);
      }
LABEL_4:
      luaX_next(ls);
      break;
    case 0x108:
      forstat(ls, v2);
      break;
    case 0x111:
      repeatstat(v2);
      break;
    case 0x109:
      funcstat(ls, v2);
      break;
    case 0x10D:
      luaX_next(ls);
      if ( testnext(ls, 265) )
        localfunc(ls);
      else
        localstat(ls);
      break;
    case 0x11D:
      luaX_next(ls);
      v5 = str_checkname(ls);
      labelstat(ls, v5, v2);
      break;
    case 0x112:
      luaX_next(ls);
      retstat(ls);
      break;
    case 0x102:
    case 0x10A:
      v6 = luaK_jump(ls->fs);
      gotostat(ls, (int)v6);
      break;
    default:
      exprstat(ls);
      break;
  }
  ls->fs->freereg = ls->fs->nactvar;
  --ls->L->nCcalls;
}

//----- (00759480) --------------------------------------------------------
void __cdecl statlist(LexState *ls)
{
  if ( !block_follow(ls, 1) )
  {
    while ( ls->t.token != 274 )
    {
      statement(ls);
      if ( block_follow(ls, 1) )
        return;
    }
    statement(ls);
  }
}

//----- (007594D0) --------------------------------------------------------
void __usercall mainfunc(LexState *ls@<edi>, FuncState *fs@<eax>)
{
  FuncState *v2; // esi@1
  Proto *v3; // ecx@1
  TString *v4; // ST08_4@1
  expdesc v; // [sp+4h] [bp-24h]@1
  BlockCnt v6; // [sp+1Ch] [bp-Ch]@1

  v2 = fs;
  open_func(ls, fs, &v6);
  v3 = v2->f;
  v.t = -1;
  v.f = -1;
  v3->is_vararg = 1;
  v4 = ls->envn;
  v.k = 7;
  v.u.info = 0;
  newupvalue(v2, v4, &v);
  luaX_next(ls);
  statlist(ls);
  if ( ls->t.token != 286 )
    error_expected(ls, 286);
  close_func(ls);
}

//----- (00759540) --------------------------------------------------------
GCObject *__cdecl luaY_parser(lua_State *L, Zio *z, Mbuffer *buff, Dyndata *dyd, const char *name, int firstchar)
{
  lua_State *v6; // esi@1
  GCObject *v7; // ebx@1
  lua_TValue *v8; // eax@1
  GCObject *v9; // eax@3
  Proto *v10; // ecx@3
  LexState lexstate; // [sp+Ch] [bp-84h]@3
  FuncState funcstate; // [sp+5Ch] [bp-34h]@3

  v6 = L;
  v7 = luaF_newLclosure(L, 1);
  v8 = L->top;
  v8->u.i.v__.b = (int)v7;
  v8->u.i.tt__ = 2146936134;
  ++v6->top;
  if ( (signed int)(((char *)v6->stack_last - (char *)v6->top) & 0xFFFFFFF8) <= 0 )
    luaD_growstack(L, 0);
  v9 = luaF_newproto(L);
  v7->p.code = (unsigned int *)v9;
  funcstate.f = (Proto *)v9;
  v9->p.source = (TString *)luaS_new(L, name);
  v10 = funcstate.f;
  lexstate.dyd = dyd;
  dyd->label.n = 0;
  dyd->gt.n = 0;
  dyd->actvar.n = 0;
  lexstate.buff = buff;
  luaX_setinput(L, &lexstate, z, v10->source, firstchar);
  mainfunc(&lexstate, &funcstate);
  return v7;
}

//----- (007595F0) --------------------------------------------------------
void __usercall __noreturn error_0(LoadState *S@<esi>, const char *why@<eax>)
{
  luaO_pushfstring(S->L, "%s: %s precompiled chunk", S->name);
  luaD_throw(S->L, 3);
}

//----- (00759610) --------------------------------------------------------
TString *__usercall LoadString@<eax>(LoadState *S@<eax>)
{
  LoadState *v1; // esi@1
  TString *result; // eax@3
  char *v3; // edi@4
  unsigned int size; // [sp+4h] [bp-4h]@1

  v1 = S;
  if ( luaZ_read(S->Z, &size, 4u) )
    error_0(v1, "truncated");
  result = (TString *)size;
  if ( size )
  {
    v3 = luaZ_openspace(v1->L, v1->b, size);
    if ( luaZ_read(v1->Z, v3, size) )
      error_0(v1, "truncated");
    result = (TString *)luaS_newlstr(v1->L, v3, size - 1);
  }
  return result;
}

//----- (00759690) --------------------------------------------------------
void __usercall LoadCode(LoadState *S@<eax>, Proto *f)
{
  LoadState *v2; // esi@1
  int v3; // ebx@3
  unsigned int *v4; // eax@7
  int b; // [sp+4h] [bp-4h]@1

  v2 = S;
  if ( luaZ_read(S->Z, &b, 4u) )
    error_0(v2, "truncated");
  v3 = b;
  if ( b < 0 )
    error_0(v2, "corrupted");
  if ( (unsigned int)(b + 1) > 0x3FFFFFFF )
    luaM_toobig(v2->L);
  v4 = (unsigned int *)luaM_realloc_(v2->L, 0, 0, 4 * b);
  f->code = v4;
  f->sizecode = v3;
  if ( luaZ_read(v2->Z, v4, 4 * v3) )
    error_0(v2, "truncated");
}

//----- (00759720) --------------------------------------------------------
void __usercall LoadConstants(LoadState *S@<eax>, Proto *f@<edi>)
{
  LoadState *v2; // esi@1
  int v3; // ebx@3
  int v4; // eax@7
  lua_TValue *v5; // ebx@10
  TString *v6; // eax@17
  int v7; // ebx@21
  int v8; // eax@25
  int j; // ebx@27
  long double v10; // [sp+8h] [bp-14h]@15
  int b; // [sp+10h] [bp-Ch]@1
  int i; // [sp+14h] [bp-8h]@9
  char v13; // [sp+1Ah] [bp-2h]@13
  char v14; // [sp+1Bh] [bp-1h]@10

  v2 = S;
  if ( luaZ_read(S->Z, &b, 4u) )
    goto LABEL_2;
  v3 = b;
  if ( b < 0 )
    error_0(v2, "corrupted");
  if ( (unsigned int)(b + 1) > 0x1FFFFFFF )
    luaM_toobig(v2->L);
  f->k = (lua_TValue *)luaM_realloc_(v2->L, 0, 0, 8 * b);
  v4 = 0;
  for ( f->sizek = v3; v4 < v3; ++v4 )
    f->k[v4].u.i.tt__ = 2146936064;
  i = 0;
  if ( v3 > 0 )
  {
    while ( 1 )
    {
      v5 = &f->k[i];
      if ( luaZ_read(v2->Z, &v14, 1u) )
        break;
      switch ( v14 )
      {
        case 0:
          v5->u.i.tt__ = 2146936064;
          break;
        case 1:
          if ( luaZ_read(v2->Z, &v13, 1u) )
            goto LABEL_2;
          v5->u.i.v__.b = v13;
          v5->u.i.tt__ = 2146936065;
          break;
        case 3:
          if ( luaZ_read(v2->Z, &v10, 8u) )
            goto LABEL_2;
          v5->u.d__ = v10;
          break;
        case 4:
          v6 = LoadString(v2);
          v5->u.i.v__.b = (int)v6;
          v5->u.i.tt__ = v6->tsv.tt | 0x7FF7A540;
          break;
        default:
          break;
      }
      if ( ++i >= b )
        goto LABEL_19;
    }
LABEL_2:
    error_0(v2, "truncated");
  }
LABEL_19:
  if ( luaZ_read(v2->Z, &i, 4u) )
    error_0(v2, "truncated");
  v7 = i;
  if ( i < 0 )
    error_0(v2, "corrupted");
  if ( (unsigned int)(i + 1) > 0x3FFFFFFF )
    luaM_toobig(v2->L);
  f->p = (Proto **)luaM_realloc_(v2->L, 0, 0, 4 * i);
  v8 = 0;
  for ( f->sizep = v7; v8 < v7; ++v8 )
    f->p[v8] = 0;
  for ( j = 0; j < i; ++j )
  {
    f->p[j] = (Proto *)luaF_newproto(v2->L);
    LoadFunction(v2, f->p[j]);
  }
}

//----- (00759920) --------------------------------------------------------
void __usercall LoadUpvalues(Proto *f@<eax>, LoadState *S)
{
  Proto *v2; // esi@1
  int v3; // edi@3
  int v4; // eax@7
  int i; // ebx@9
  int b; // [sp+Ch] [bp-8h]@1
  char v7; // [sp+12h] [bp-2h]@11
  char v8; // [sp+13h] [bp-1h]@10

  v2 = f;
  if ( luaZ_read(S->Z, &b, 4u) )
    error_0(S, "truncated");
  v3 = b;
  if ( b < 0 )
    error_0(S, "corrupted");
  if ( (unsigned int)(b + 1) > 0x1FFFFFFF )
    luaM_toobig(S->L);
  v2->upvalues = (Upvaldesc *)luaM_realloc_(S->L, 0, 0, 8 * b);
  v4 = 0;
  for ( v2->sizeupvalues = v3; v4 < v3; ++v4 )
    v2->upvalues[v4].name = 0;
  for ( i = 0; i < v3; ++i )
  {
    if ( luaZ_read(S->Z, &v8, 1u) || (v2->upvalues[i].instack = v8, luaZ_read(S->Z, &v7, 1u)) )
      error_0(S, "truncated");
    v2->upvalues[i].idx = v7;
  }
}

//----- (00759A20) --------------------------------------------------------
void __usercall LoadDebug(LoadState *S@<eax>, Proto *f@<edi>)
{
  LoadState *v2; // esi@1
  unsigned int v3; // ebx@7
  int *v4; // eax@7
  int v5; // edx@7
  int v6; // ebx@11
  int v7; // eax@16
  int v8; // ecx@16
  int v9; // ebx@19
  GCObject *v10; // eax@21
  char *v11; // eax@22
  Zio *v12; // ST04_4@22
  int v13; // ebx@33
  GCObject *v14; // eax@35
  char *v15; // [sp+8h] [bp-18h]@26
  int v16; // [sp+Ch] [bp-14h]@24
  char *str; // [sp+10h] [bp-10h]@22
  int v18; // [sp+14h] [bp-Ch]@9
  int i; // [sp+18h] [bp-8h]@18
  int b; // [sp+1Ch] [bp-4h]@1

  v2 = S;
  f->source = LoadString(S);
  if ( luaZ_read(v2->Z, &b, 4u) )
    goto LABEL_2;
  if ( b < 0 )
LABEL_4:
    error_0(v2, "corrupted");
  if ( (unsigned int)(b + 1) > 0x3FFFFFFF )
    luaM_toobig(v2->L);
  v3 = 4 * b;
  v4 = (int *)luaM_realloc_(v2->L, 0, 0, 4 * b);
  v5 = b;
  f->lineinfo = v4;
  f->sizelineinfo = v5;
  if ( luaZ_read(v2->Z, v4, v3) )
    error_0(v2, "truncated");
  if ( luaZ_read(v2->Z, &v18, 4u) )
    error_0(v2, "truncated");
  v6 = v18;
  if ( v18 < 0 )
    error_0(v2, "corrupted");
  if ( (unsigned int)(v18 + 1) > 0x15555555 )
    luaM_toobig(v2->L);
  f->locvars = (LocVar *)luaM_realloc_(v2->L, 0, 0, 12 * v18);
  f->sizelocvars = v6;
  if ( v6 > 0 )
  {
    v7 = 0;
    v8 = v6;
    do
    {
      f->locvars[v7].varname = 0;
      ++v7;
      --v8;
    }
    while ( v8 );
  }
  i = 0;
  if ( v6 > 0 )
  {
    v9 = 0;
    while ( !luaZ_read(v2->Z, &b, 4u) )
    {
      v10 = (GCObject *)b;
      if ( b )
      {
        v11 = luaZ_openspace(v2->L, v2->b, b);
        v12 = v2->Z;
        str = v11;
        if ( luaZ_read(v12, v11, b) )
          break;
        v10 = luaS_newlstr(v2->L, str, b - 1);
      }
      f->locvars[v9].varname = (TString *)v10;
      if ( luaZ_read(v2->Z, &v16, 4u) )
        break;
      if ( v16 < 0 )
        goto LABEL_4;
      f->locvars[v9].startpc = v16;
      if ( luaZ_read(v2->Z, &v15, 4u) )
        break;
      if ( (signed int)v15 < 0 )
        goto LABEL_4;
      f->locvars[v9].endpc = (int)v15;
      ++v9;
      if ( ++i >= v18 )
        goto LABEL_29;
    }
LABEL_2:
    error_0(v2, "truncated");
  }
LABEL_29:
  if ( luaZ_read(v2->Z, &v18, 4u) )
    error_0(v2, "truncated");
  if ( v18 < 0 )
    error_0(v2, "corrupted");
  v13 = 0;
  if ( v18 > 0 )
  {
    while ( !luaZ_read(v2->Z, &b, 4u) )
    {
      v14 = (GCObject *)b;
      if ( b )
      {
        v15 = luaZ_openspace(v2->L, v2->b, b);
        if ( luaZ_read(v2->Z, v15, b) )
          goto LABEL_2;
        v14 = luaS_newlstr(v2->L, v15, b - 1);
      }
      f->upvalues[v13++].name = (TString *)v14;
      if ( v13 >= v18 )
        return;
    }
    goto LABEL_2;
  }
}

//----- (00759CC0) --------------------------------------------------------
void __cdecl LoadFunction(LoadState *S, Proto *f)
{
  LoadState *v2; // esi@1
  Proto *v3; // edi@5

  v2 = S;
  if ( luaZ_read(S->Z, &S, 4u) )
    error_0(v2, "truncated");
  if ( (signed int)S < 0 )
    error_0(v2, "corrupted");
  v3 = f;
  f->linedefined = (int)S;
  if ( luaZ_read(v2->Z, &S, 4u) )
    error_0(v2, "truncated");
  if ( (signed int)S < 0 )
    error_0(v2, "corrupted");
  v3->lastlinedefined = (int)S;
  if ( luaZ_read(v2->Z, (char *)&S + 3, 1u) )
    error_0(v2, "truncated");
  v3->numparams = BYTE3(S);
  if ( luaZ_read(v2->Z, (char *)&S + 3, 1u) )
    error_0(v2, "truncated");
  v3->is_vararg = BYTE3(S);
  if ( luaZ_read(v2->Z, (char *)&S + 3, 1u) )
    error_0(v2, "truncated");
  v3->maxstacksize = BYTE3(S);
  LoadCode(v2, v3);
  LoadConstants(v2, v3);
  LoadUpvalues(v3, v2);
  LoadDebug(v2, v3);
}

//----- (00759DD0) --------------------------------------------------------
void __cdecl luaU_header(char *h)
{
  *(_DWORD *)h = 1635077147;
  *((_WORD *)h + 2) = 82;
  *((_WORD *)h + 3) = 1025;
  *((_WORD *)h + 4) = 1028;
  *((_WORD *)h + 5) = 8;
  *((_DWORD *)h + 3) = 168661785;
  *((_WORD *)h + 8) = 2586;
}

//----- (00759E10) --------------------------------------------------------
void __thiscall LoadHeader(LoadState *S)
{
  LoadState *v1; // esi@1
  Zio *v2; // ST00_4@1
  unsigned int v3; // edx@3
  int *v4; // eax@3
  char *v5; // ecx@3
  unsigned int v6; // eax@11
  int v7; // ecx@11
  int b; // [sp+8h] [bp-2Ch]@1
  char v9; // [sp+Ch] [bp-28h]@9
  char v10; // [sp+Dh] [bp-27h]@10
  char h[18]; // [sp+1Ch] [bp-18h]@1

  v1 = S;
  *(_DWORD *)&h[12] = 168661785;
  v2 = S->Z;
  *(_DWORD *)h = 1635077147;
  *(_DWORD *)&h[4] = 67174482;
  *(_DWORD *)&h[8] = 525316;
  *(_WORD *)&h[16] = 2586;
  LOBYTE(b) = 27;
  if ( luaZ_read(v2, (char *)&b + 1, 0x11u) )
    error_0(v1, "truncated");
  v3 = 18;
  v4 = &b;
  v5 = h;
  do
  {
    if ( *(_DWORD *)v5 != *v4 )
      goto LABEL_8;
    v3 -= 4;
    ++v4;
    v5 += 4;
  }
  while ( v3 >= 4 );
  if ( *(_BYTE *)v4 != *v5 || *((_BYTE *)v4 + 1) != v5[1] )
  {
LABEL_8:
    if ( b == 1635077147 )
    {
      if ( v9 == 82 && !v10 )
      {
        v6 = 12;
        v7 = 0;
        while ( *(_DWORD *)&h[v7] == *(int *)((char *)&b + v7) )
        {
          v6 -= 4;
          v7 += 4;
          if ( v6 < 4 )
            error_0(v1, "corrupted");
        }
        error_0(v1, "incompatible");
      }
      error_0(v1, "version mismatch in");
    }
    error_0(v1, "not a");
  }
}

//----- (00759F10) --------------------------------------------------------
GCObject *__cdecl luaU_undump(lua_State *L, Zio *Z, Mbuffer *buff, const char *name)
{
  const char *v4; // ecx@1
  char v5; // al@1
  lua_State *v6; // esi@7
  GCObject *v7; // edi@7
  lua_TValue *v8; // eax@7
  GCObject *v9; // eax@9
  unsigned int *v10; // ebx@9
  GCObject *result; // eax@10
  lua_TValue *v12; // esi@10
  LoadState S; // [sp+0h] [bp-10h]@4

  v4 = name;
  v5 = *name;
  if ( *name == 64 || v5 == 61 )
  {
    v4 = name + 1;
  }
  else if ( v5 == 27 )
  {
    S.name = "binary string";
    goto LABEL_7;
  }
  S.name = v4;
LABEL_7:
  v6 = L;
  S.b = buff;
  S.L = L;
  S.Z = Z;
  LoadHeader(&S);
  v7 = luaF_newLclosure(L, 1);
  v8 = L->top;
  v8->u.i.v__.b = (int)v7;
  v8->u.i.tt__ = 2146936134;
  ++v6->top;
  if ( (signed int)(((char *)v6->stack_last - (char *)v6->top) & 0xFFFFFFF8) <= 0 )
    luaD_growstack(L, 0);
  v9 = luaF_newproto(L);
  v7->p.code = (unsigned int *)v9;
  LoadFunction(&S, (Proto *)v9);
  v10 = (unsigned int *)v7->ts.tsv.len;
  if ( v10[10] == 1 )
  {
    result = v7;
  }
  else
  {
    result = luaF_newLclosure(L, v10[10]);
    result->p.code = v10;
    v12 = L->top;
    v12[-1].u.i.v__.b = (int)result;
    v12[-1].u.i.tt__ = 2146936134;
  }
  return result;
}

//----- (00759FE0) --------------------------------------------------------
int __cdecl luaK_getlabel(FuncState *fs)
{
  int result; // eax@1

  result = fs->pc;
  fs->lasttarget = result;
  return result;
}

//----- (00759FF0) --------------------------------------------------------
int __usercall need_value@<eax>(FuncState *fs@<eax>, int list@<edx>)
{
  unsigned int *v2; // edi@2
  unsigned int *v3; // eax@3
  unsigned int *v4; // esi@4
  int v5; // eax@7
  int result; // eax@9

  if ( list == -1 )
  {
LABEL_9:
    result = 0;
  }
  else
  {
    v2 = fs->f->code;
    while ( 1 )
    {
      v3 = &v2[list];
      if ( list < 1 || (v4 = v3 - 1, !(luaP_opmodes[*(v3 - 1) & 0x3F] & 0x80)) )
        v4 = &v2[list];
      if ( (*(_BYTE *)v4 & 0x3F) != 28 )
        break;
      v5 = (*v3 >> 14) - 0x1FFFF;
      if ( v5 != -1 )
      {
        list += v5 + 1;
        if ( list != -1 )
          continue;
      }
      goto LABEL_9;
    }
    result = 1;
  }
  return result;
}

//----- (0075A050) --------------------------------------------------------
void __usercall removevalues(FuncState *fs@<edx>, int list@<eax>)
{
  int i; // esi@1
  unsigned int *v3; // eax@2
  unsigned int *v4; // ecx@3
  unsigned int v5; // eax@7

  for ( i = list; i != -1; i += v5 + 1 )
  {
    v3 = &fs->f->code[i];
    if ( i < 1 || (v4 = v3 - 1, !(luaP_opmodes[*(v3 - 1) & 0x3F] & 0x80)) )
      v4 = &fs->f->code[i];
    if ( (*(_BYTE *)v4 & 0x3F) == 28 )
      *v4 = ((unsigned int)&loc_7FBFFC + 4) & *v4 | ((*v4 & 0xFFB7FFFF | 0x360000) >> 17);
    v5 = (fs->f->code[i] >> 14) - 0x1FFFF;
    if ( v5 == -1 )
      break;
  }
}

//----- (0075A0D0) --------------------------------------------------------
void __usercall patchlistaux(int list@<eax>, FuncState *fs, int vtarget, int reg, int dtarget)
{
  int v5; // edi@1
  unsigned int *v6; // esi@2
  unsigned int v7; // eax@2
  unsigned int *v8; // esi@2
  int v9; // eax@2
  unsigned int *v10; // ecx@6
  unsigned int v11; // eax@8
  unsigned int v12; // esi@11
  int v13; // ecx@14
  int next; // [sp+4h] [bp-4h]@3

  v5 = list;
  if ( list != -1 )
  {
    do
    {
      v6 = fs->f->code;
      v7 = v6[v5];
      v8 = &v6[v5];
      v9 = (v7 >> 14) - 0x1FFFF;
      if ( v9 == -1 )
        next = -1;
      else
        next = v9 + v5 + 1;
      if ( v5 < 1 || (v10 = v8 - 1, !(luaP_opmodes[*(v8 - 1) & 0x3F] & 0x80)) )
        v10 = v8;
      v11 = *v10;
      if ( (*(_BYTE *)v10 & 0x3F) == 28 )
      {
        if ( reg == 255 || reg == v11 >> 23 )
          v12 = ((unsigned int)&loc_7FBFFC + 4) & v11 | ((v11 & 0xFFB7FFFF | 0x360000) >> 17);
        else
          v12 = v11 ^ ((unsigned __int16)v11 ^ (unsigned __int16)((_WORD)reg << 6)) & 0x3FC0;
        *v10 = v12;
        v8 = &fs->f->code[v5];
        if ( abs(vtarget - v5 - 1) > 0x1FFFF )
          luaX_syntaxerror(fs->ls, "control structure too long");
        v13 = *v8 & 0x3FFF ^ ((vtarget - v5 + 131070) << 14);
      }
      else
      {
        if ( abs(dtarget - v5 - 1) > 0x1FFFF )
          luaX_syntaxerror(fs->ls, "control structure too long");
        v13 = *v8 & 0x3FFF ^ ((dtarget - v5 + 131070) << 14);
      }
      v5 = next;
      *v8 = v13;
    }
    while ( next != -1 );
  }
}

//----- (0075A200) --------------------------------------------------------
void __cdecl luaK_patchclose(FuncState *fs, int list, int level)
{
  int v3; // ecx@1
  unsigned int v4; // eax@2
  int v5; // edx@3
  unsigned int *v6; // eax@5

  v3 = list;
  if ( list != -1 )
  {
    do
    {
      v4 = (fs->f->code[v3] >> 14) - 0x1FFFF;
      if ( v4 == -1 )
        v5 = -1;
      else
        v5 = v4 + v3 + 1;
      v6 = &fs->f->code[v3];
      *v6 = ((unsigned __int8)(level + 1) << 6) | *v6 & 0xFFFFC03F;
      v3 = v5;
    }
    while ( v5 != -1 );
  }
}

//----- (0075A260) --------------------------------------------------------
void __cdecl luaK_concat(FuncState *fs, int *l1, int l2)
{
  int v3; // ecx@2
  unsigned int *v4; // esi@4
  int v5; // eax@5
  int v6; // eax@6

  if ( l2 != -1 )
  {
    v3 = *l1;
    if ( *l1 == -1 )
    {
      *l1 = l2;
    }
    else
    {
      v4 = fs->f->code;
      while ( 1 )
      {
        v5 = (v4[v3] >> 14) - 0x1FFFF;
        if ( v5 == -1 )
          break;
        v6 = v5 + v3 + 1;
        if ( v6 == -1 )
          break;
        v3 = v6;
      }
      if ( abs(l2 - v3 - 1) > 0x1FFFF )
        luaX_syntaxerror(fs->ls, "control structure too long");
      v4[v3] = v4[v3] & 0x3FFF ^ ((l2 - v3 + 131070) << 14);
    }
  }
}

//----- (0075A2E0) --------------------------------------------------------
int __usercall luaK_code@<eax>(FuncState *fs@<esi>, unsigned int i)
{
  Proto *v2; // edi@1
  int v3; // ecx@1
  int result; // eax@5

  v2 = fs->f;
  patchlistaux(fs->jpc, fs, fs->pc, 255, fs->pc);
  v3 = fs->pc + 1;
  fs->jpc = -1;
  if ( v3 > v2->sizecode )
    v2->code = (unsigned int *)luaM_growaux_(fs->ls->L, v2->code, &v2->sizecode, 4u, 2147483645, "opcodes");
  v2->code[fs->pc] = i;
  if ( fs->pc + 1 > v2->sizelineinfo )
    v2->lineinfo = (int *)luaM_growaux_(fs->ls->L, v2->lineinfo, &v2->sizelineinfo, 4u, 2147483645, "opcodes");
  v2->lineinfo[fs->pc] = fs->ls->lastline;
  result = fs->pc;
  fs->pc = result + 1;
  return result;
}

//----- (0075A390) --------------------------------------------------------
int __cdecl luaK_codeABC(FuncState *fs, OpCode o, int a, int b, int c)
{
  return luaK_code(fs, o | ((a | ((c | (b << 9)) << 8)) << 6));
}

//----- (0075A3C0) --------------------------------------------------------
int __cdecl luaK_codeABx(FuncState *fs, OpCode o, int a, unsigned int bc)
{
  return luaK_code(fs, o | ((a | (bc << 8)) << 6));
}

//----- (0075A3F0) --------------------------------------------------------
int __cdecl luaK_codek(FuncState *fs, int reg, int k)
{
  int result; // eax@2
  int v4; // ebx@3

  if ( k > 0x3FFFF )
  {
    v4 = luaK_code(fs, (reg << 6) | 2);
    luaK_code(fs, (k << 6) | 0x27);
    result = v4;
  }
  else
  {
    result = luaK_code(fs, ((reg | (k << 8)) << 6) | 1);
  }
  return result;
}

//----- (0075A450) --------------------------------------------------------
void __cdecl luaK_checkstack(FuncState *fs, int n)
{
  int v2; // eax@1

  v2 = n + fs->freereg;
  if ( v2 > fs->f->maxstacksize )
  {
    if ( v2 >= 250 )
      luaX_syntaxerror(fs->ls, "function or expression too complex");
    fs->f->maxstacksize = v2;
  }
}

//----- (0075A490) --------------------------------------------------------
void __cdecl luaK_reserveregs(FuncState *fs, int n)
{
  int v2; // eax@1

  v2 = n + fs->freereg;
  if ( v2 > fs->f->maxstacksize )
  {
    if ( v2 >= 250 )
      luaX_syntaxerror(fs->ls, "function or expression too complex");
    fs->f->maxstacksize = v2;
  }
  fs->freereg += n;
}

//----- (0075A4D0) --------------------------------------------------------
void __usercall freeexp(FuncState *fs@<ecx>, expdesc *e@<eax>)
{
  int v2; // eax@2

  if ( e->k == 6 )
  {
    v2 = e->u.info;
    if ( !(v2 & 0x100) && v2 >= fs->nactvar )
      --fs->freereg;
  }
}

//----- (0075A4F0) --------------------------------------------------------
int __cdecl addk(FuncState *fs, lua_TValue *v)
{
  lua_TValue *key; // ecx@0
  Node *v3; // eax@1
  GCObject *v4; // esi@1
  lua_TValue *v5; // edi@2
  int v6; // ecx@3
  FuncState *v7; // edx@8
  int v8; // edi@8
  int *v9; // ebx@8
  void *v10; // eax@9
  int v11; // ecx@12
  lua_TValue *idx; // [sp+14h] [bp-Ch]@1
  lua_State *L; // [sp+18h] [bp-8h]@1
  signed int k; // [sp+1Ch] [bp-4h]@2

  L = fs->ls->L;
  v3 = luaH_set(L, fs->h, key);
  v4 = (GCObject *)&fs->f->next;
  idx = (lua_TValue *)v3;
  if ( (v3->i_val.u.i.tt__ & 0x7FFFFF00) != 2146936064 )
  {
    k = (signed int)v3->i_val.u.d__;
    v5 = (lua_TValue *)(v4->ts.tsv.hash + 8 * k);
    v6 = (v5->u.i.tt__ & 0x7FFFFF00) == 2146936064 ? (unsigned __int8)(v5->u.i.tt__ == v->u.i.tt__) : (unsigned __int8)((v->u.i.tt__ & 0x7FFFFF00) != 2146936064);
    if ( v6 )
    {
      if ( luaV_equalobj_(0, v5, v) )
        return k;
      v3 = (Node *)idx;
    }
  }
  v7 = fs;
  v8 = v4->p.sizek;
  v9 = &v4->p.sizek;
  k = fs->nk;
  v3->i_val.u.d__ = (double)k;
  if ( k + 1 > v4->p.sizek )
  {
    v10 = luaM_growaux_(L, (void *)v4->ts.tsv.hash, &v4->p.sizek, 8u, 0x3FFFFFF, "constants");
    v7 = fs;
    v4->ts.tsv.hash = (unsigned int)v10;
  }
  for ( ; v8 < *v9; ++v8 )
    *(_DWORD *)(v4->ts.tsv.hash + 8 * v8 + 4) = 2146936064;
  *(lua_TValue *)(v4->ts.tsv.hash + 8 * k) = *v;
  ++v7->nk;
  v11 = v->u.i.tt__;
  if ( (v11 & 0x7FFFFF00) != 2146936064 )
    LOBYTE(v11) = 3;
  if ( v11 & 0x40 && *(_BYTE *)(v->u.i.v__.b + 5) & 3 && v4->h.marked & 4 )
    luaC_barrier_(L, v4, v->u.i.v__.gc);
  return k;
}

//----- (0075A660) --------------------------------------------------------
int __cdecl luaK_stringK(FuncState *fs, TString *s)
{
  lua_TValue o; // [sp+0h] [bp-8h]@1

  o.u.i.v__.b = (int)s;
  o.u.i.tt__ = s->tsv.tt | 0x7FF7A540;
  return addk(fs, &o);
}

//----- (0075A690) --------------------------------------------------------
int __cdecl luaK_numberK(FuncState *fs, long double r)
{
  lua_State *v2; // esi@1
  int result; // eax@2
  lua_TValue *v4; // edi@3
  GCObject *v5; // eax@3
  lua_TValue *v6; // ecx@3
  lua_TValue o; // [sp+0h] [bp-8h]@1

  v2 = fs->ls->L;
  o.u.d__ = r;
  if ( 0.0 == r )
  {
    v4 = v2->top;
    v2->top = v4 + 1;
    v5 = luaS_newlstr(v2, (const char *)&r, 8u);
    v4->u.i.v__.b = (int)v5;
    v4->u.i.tt__ = v5->cl.c.tt | 0x7FF7A540;
    v6 = v2->top;
    result = addk(fs, &o);
    --v2->top;
  }
  else
  {
    result = addk(fs, &o);
  }
  return result;
}

//----- (0075A720) --------------------------------------------------------
void __cdecl luaK_setreturns(FuncState *fs, expdesc *e, int nresults)
{
  unsigned int *v3; // ecx@4
  int v4; // ecx@4

  if ( e->k == 12 )
  {
    fs->f->code[e->u.info] ^= ((unsigned int)&loc_7FBFFC + 4) & (fs->f->code[e->u.info] ^ ((nresults + 1) << 14));
  }
  else if ( e->k == 13 )
  {
    v3 = &fs->f->code[e->u.info];
    *v3 = ((unsigned int)&loc_7FFFFE + 1) & *v3 ^ ((nresults + 1) << 23);
    fs->f->code[e->u.info] = fs->f->code[e->u.info] & 0xFFFFC03F | (fs->freereg << 6);
    v4 = fs->freereg + 1;
    if ( v4 > fs->f->maxstacksize )
    {
      if ( v4 >= 250 )
        luaX_syntaxerror(fs->ls, "function or expression too complex");
      fs->f->maxstacksize = v4;
    }
    ++fs->freereg;
  }
}

//----- (0075A7D0) --------------------------------------------------------
void __cdecl luaK_setoneret(FuncState *fs, expdesc *e)
{
  int v2; // ecx@2
  unsigned int *v3; // ecx@4

  if ( e->k == 12 )
  {
    v2 = e->u.info;
    e->k = 6;
    e->u.info = (fs->f->code[v2] >> 6) & 0xFF;
  }
  else if ( e->k == 13 )
  {
    v3 = &fs->f->code[e->u.info];
    *v3 = ((unsigned int)&loc_7FFFFE + 1) & *v3 | 0x1000000;
    e->k = 11;
  }
}

//----- (0075A830) --------------------------------------------------------
void __cdecl luaK_dischargevars(FuncState *fs, expdesc *e)
{
  FuncState *v2; // esi@3
  int v3; // eax@3
  signed int v4; // eax@4
  signed int v5; // ecx@4
  signed int v6; // eax@8

  switch ( e->k )
  {
    case 7:
      e->k = 6;
      break;
    case 8:
      v2 = fs;
      v3 = (e->u.info << 23) | 5;
      goto LABEL_13;
    case 9:
      v4 = e->u.ind.idx;
      v2 = fs;
      v5 = 6;
      if ( !(v4 & 0x100) && v4 >= fs->nactvar )
        --fs->freereg;
      if ( e->u.ind.vt == 7 )
      {
        v6 = e->u.ind.t;
        if ( !(v6 & 0x100) && v6 >= fs->nactvar )
          --fs->freereg;
        v5 = 7;
      }
      v3 = v5 | ((e->u.ind.idx | (e->u.ind.t << 9)) << 14);
LABEL_13:
      e->u.info = luaK_code(v2, v3);
      e->k = 11;
      break;
    case 0xC:
    case 0xD:
      luaK_setoneret(fs, e);
      break;
    default:
      return;
  }
}

//----- (0075A900) --------------------------------------------------------
void __usercall invertjump(FuncState *fs@<ecx>, expdesc *e@<eax>)
{
  int v2; // eax@1
  unsigned int *v3; // ecx@1

  v2 = e->u.info;
  v3 = &fs->f->code[v2];
  if ( v2 >= 1 && luaP_opmodes[*(v3 - 1) & 0x3F] & 0x80 )
    --v3;
  *v3 ^= ((unsigned __int16)*v3 ^ (unsigned __int16)(((*v3 & 0x3FC0) == 0) << 6)) & 0x3FC0;
}

//----- (0075A950) --------------------------------------------------------
int __usercall constfolding@<eax>(OpCode op@<edx>, expdesc *e1@<esi>, expdesc *e2@<ecx>)
{
  int result; // eax@10

  if ( e1->k != 5
    || e1->t != -1
    || e1->f != -1
    || e2->k != 5
    || e2->t != -1
    || e2->f != -1
    || (op == 16 || op == 17) && 0.0 == e2->u.nval )
  {
    result = 0;
  }
  else
  {
    e1->u.nval = luaO_arith(op - 13, e1->u.nval, e2->u.nval);
    result = 1;
  }
  return result;
}

//----- (0075A9C0) --------------------------------------------------------
void __cdecl luaK_fixline(FuncState *fs, int line)
{
  fs->f->lineinfo[fs->pc - 1] = line;
}

//----- (0075A9E0) --------------------------------------------------------
void __cdecl luaK_setlist(FuncState *fs, int base, int nelems, int tostore)
{
  int v4; // edi@1
  int v5; // eax@1

  v4 = (nelems - 1) / 50 + 1;
  v5 = tostore != -1 ? tostore : 0;
  if ( v4 > 511 )
  {
    if ( v4 > 0x3FFFFFF )
      luaX_syntaxerror(fs->ls, "constructor too long");
    luaK_code(fs, ((base | (v5 << 17)) << 6) | 0x24);
    luaK_code(fs, (v4 << 6) | 0x27);
    fs->freereg = base + 1;
  }
  else
  {
    luaK_code(fs, ((base | ((v4 | (v5 << 9)) << 8)) << 6) | 0x24);
    fs->freereg = base + 1;
  }
}

//----- (0075AA90) --------------------------------------------------------
void __cdecl luaK_nil(FuncState *fs, int from, int n)
{
  int v3; // ebx@1
  int v4; // edx@1
  int v5; // eax@1
  unsigned int *v6; // edi@2
  unsigned int v7; // ecx@2
  int v8; // eax@3
  int v9; // ecx@3

  v3 = from;
  v4 = from + n - 1;
  v5 = fs->pc;
  if ( v5 <= fs->lasttarget )
    goto LABEL_12;
  v6 = &fs->f->code[v5 - 1];
  v7 = *v6;
  if ( (*v6 & 0x3F) != 4 )
    goto LABEL_12;
  v8 = (v7 >> 6) & 0xFF;
  v9 = v8 + (v7 >> 23);
  if ( from < v8 )
  {
LABEL_6:
    if ( v8 <= from + n )
      goto LABEL_7;
LABEL_12:
    luaK_code(fs, ((from | ((n - 1) << 17)) << 6) | 4);
    return;
  }
  if ( from > v9 + 1 )
  {
    if ( from > v8 )
      goto LABEL_12;
    goto LABEL_6;
  }
LABEL_7:
  if ( v8 < from )
    v3 = v8;
  if ( v9 > v4 )
    v4 = v9;
  *v6 = (unsigned int)&loc_7FC03F & *v6 | ((unsigned __int8)v3 << 6) | ((v4 - v3) << 23) & 0xFF800000;
}

//----- (0075AB40) --------------------------------------------------------
FuncState *__cdecl luaK_jump(FuncState *fs)
{
  FuncState *v1; // esi@1
  int v2; // edi@1

  v1 = fs;
  v2 = fs->jpc;
  fs->jpc = -1;
  fs = (FuncState *)luaK_code(v1, 0x7FFF8017u);
  luaK_concat(v1, (int *)&fs, v2);
  return fs;
}

//----- (0075AB80) --------------------------------------------------------
void __cdecl luaK_ret(FuncState *fs, int first, int nret)
{
  luaK_code(fs, (first << 6) | ((nret + 1) << 23) | 0x1F);
}

//----- (0075ABB0) --------------------------------------------------------
void __cdecl luaK_patchtohere(FuncState *fs, int list)
{
  fs->lasttarget = fs->pc;
  luaK_concat(fs, &fs->jpc, list);
}

//----- (0075ABD0) --------------------------------------------------------
void __usercall discharge2reg(FuncState *fs@<eax>, expdesc *e@<ebx>, int reg@<edi>)
{
  FuncState *v3; // esi@1
  int v4; // eax@5
  int v5; // eax@7
  expdesc *r_4; // [sp+4h] [bp-8h]@0

  v3 = fs;
  luaK_dischargevars(fs, r_4);
  switch ( e->k )
  {
    case 1:
      luaK_nil(v3, reg, 1);
      e->u.info = reg;
      e->k = 6;
      break;
    case 2:
    case 3:
      luaK_code(v3, ((reg | ((e->k == 2) << 17)) << 6) | 3);
      e->u.info = reg;
      e->k = 6;
      break;
    case 4:
      luaK_codek(v3, reg, e->u.info);
      e->u.info = reg;
      e->k = 6;
      break;
    case 5:
      v4 = luaK_numberK(v3, e->u.nval);
      luaK_codek(v3, reg, v4);
      e->u.info = reg;
      e->k = 6;
      break;
    case 0xB:
      v3->f->code[e->u.info] ^= (v3->f->code[e->u.info] ^ (reg << 6)) & 0x3FC0;
      e->u.info = reg;
      e->k = 6;
      break;
    case 6:
      v5 = e->u.info;
      if ( reg != v5 )
        luaK_code(v3, (reg | (v5 << 17)) << 6);
      e->u.info = reg;
      e->k = 6;
      break;
    default:
      return;
  }
}

//----- (0075ACF0) --------------------------------------------------------
void __usercall discharge2anyreg(FuncState *fs@<eax>, expdesc *e@<ecx>)
{
  expdesc *v2; // ebx@1
  int v3; // ecx@2

  v2 = e;
  if ( e->k != 6 )
  {
    v3 = fs->freereg + 1;
    if ( v3 > fs->f->maxstacksize )
    {
      if ( v3 >= 250 )
        luaX_syntaxerror(fs->ls, "function or expression too complex");
      fs->f->maxstacksize = v3;
    }
    discharge2reg(fs, v2, ++fs->freereg - 1);
  }
}

//----- (0075AD40) --------------------------------------------------------
void __usercall exp2reg(FuncState *fs@<ecx>, expdesc *e@<eax>, int reg)
{
  FuncState *v3; // esi@1
  expdesc *v4; // ebx@1
  int v5; // edx@3
  int v6; // edi@3
  int v7; // edi@8
  int v8; // ST14_4@9
  int v9; // edi@10
  int p_t; // [sp+Ch] [bp-Ch]@4
  int p_f; // [sp+10h] [bp-8h]@4
  int fj; // [sp+14h] [bp-4h]@7

  v3 = fs;
  v4 = e;
  discharge2reg(fs, e, reg);
  if ( v4->k == 10 )
    luaK_concat(v3, &v4->t, v4->u.info);
  v5 = v4->t;
  v6 = v4->f;
  if ( v5 != v6 )
  {
    p_f = -1;
    p_t = -1;
    if ( need_value(v3, v5) || need_value(v3, v6) )
    {
      if ( v4->k == 10 )
      {
        fj = -1;
      }
      else
      {
        v7 = v3->jpc;
        v3->jpc = -1;
        fj = luaK_code(v3, 0x7FFF8017u);
        luaK_concat(v3, &fj, v7);
      }
      v3->lasttarget = v3->pc;
      p_f = luaK_code(v3, (reg << 6) | 0x4003);
      v3->lasttarget = v3->pc;
      p_t = luaK_code(v3, ((unsigned int)&loc_800002 + 1) | (reg << 6));
      v8 = fj;
      v3->lasttarget = v3->pc;
      luaK_concat(v3, &v3->jpc, v8);
    }
    v9 = v3->pc;
    v3->lasttarget = v9;
    patchlistaux(v4->f, v3, v9, reg, p_f);
    patchlistaux(v4->t, v3, v9, reg, p_t);
  }
  v4->t = -1;
  v4->f = -1;
  v4->u.info = reg;
  v4->k = 6;
}

//----- (0075AE70) --------------------------------------------------------
void __cdecl luaK_exp2nextreg(FuncState *fs, expdesc *e)
{
  int v2; // eax@2
  int v3; // eax@5

  luaK_dischargevars(fs, e);
  if ( e->k == 6 )
  {
    v2 = e->u.info;
    if ( !(v2 & 0x100) && v2 >= fs->nactvar )
      --fs->freereg;
  }
  v3 = fs->freereg + 1;
  if ( v3 > fs->f->maxstacksize )
  {
    if ( v3 >= 250 )
      luaX_syntaxerror(fs->ls, "function or expression too complex");
    fs->f->maxstacksize = v3;
  }
  exp2reg(fs, e, ++fs->freereg - 1);
}

//----- (0075AEE0) --------------------------------------------------------
int __cdecl luaK_exp2anyreg(FuncState *fs, expdesc *e)
{
  int result; // eax@2

  luaK_dischargevars(fs, e);
  if ( e->k != 6 )
    goto LABEL_8;
  result = e->u.info;
  if ( e->t == e->f )
    return result;
  if ( result < fs->nactvar )
  {
LABEL_8:
    luaK_exp2nextreg(fs, e);
    result = e->u.info;
  }
  else
  {
    exp2reg(fs, e, e->u.info);
    result = e->u.info;
  }
  return result;
}

//----- (0075AF40) --------------------------------------------------------
void __cdecl luaK_exp2anyregup(FuncState *fs, expdesc *e)
{
  if ( e->k != 8 || e->t != e->f )
  {
    luaK_dischargevars(fs, e);
    if ( e->k != 6 )
      goto LABEL_10;
    if ( e->t == e->f )
      return;
    if ( e->u.info < fs->nactvar )
LABEL_10:
      luaK_exp2nextreg(fs, e);
    else
      exp2reg(fs, e, e->u.info);
  }
}

//----- (0075AFA0) --------------------------------------------------------
void __cdecl luaK_exp2val(FuncState *fs, expdesc *e)
{
  if ( e->t == e->f )
  {
    luaK_dischargevars(fs, e);
    return;
  }
  luaK_dischargevars(fs, e);
  if ( e->k != 6 )
    goto LABEL_11;
  if ( e->t == e->f )
    return;
  if ( e->u.info < fs->nactvar )
  {
LABEL_11:
    luaK_exp2nextreg(fs, e);
    return;
  }
  exp2reg(fs, e, e->u.info);
}

//----- (0075B010) --------------------------------------------------------
int __cdecl luaK_exp2RK(FuncState *fs, expdesc *e)
{
  expkind v2; // eax@1
  Table *v3; // eax@4
  signed int v4; // eax@4
  int result; // eax@7
  char v6; // [sp+10h] [bp-10h]@4
  int v7; // [sp+14h] [bp-Ch]@4
  lua_TValue key; // [sp+18h] [bp-8h]@4

  luaK_exp2val(fs, e);
  v2 = e->k;
  switch ( e->k )
  {
    case 1:
    case 2:
    case 3:
      if ( fs->nk > 255 )
        goto LABEL_10;
      if ( v2 == 1 )
      {
        v3 = fs->h;
        v7 = 2146936064;
        key = (lua_TValue)__PAIR__(2146936133, (unsigned int)v3);
        v4 = addk(fs, (lua_TValue *)&v6);
      }
      else
      {
        key.u.i.tt__ = 2146936065;
        key.u.i.v__.b = v2 == 2;
        v4 = addk(fs, &key);
      }
      e->u.info = v4;
      e->k = 4;
      return v4 | 0x100;
    case 5:
      e->u.info = luaK_numberK(fs, e->u.nval);
      e->k = 4;
      goto LABEL_9;
    case 4:
LABEL_9:
      v4 = e->u.info;
      if ( v4 > 255 )
        goto LABEL_10;
      return v4 | 0x100;
    default:
LABEL_10:
      luaK_dischargevars(fs, e);
      if ( e->k != 6 )
        goto LABEL_14;
      result = e->u.info;
      if ( e->t != e->f )
      {
        if ( result < fs->nactvar )
        {
LABEL_14:
          luaK_exp2nextreg(fs, e);
          result = e->u.info;
        }
        else
        {
          exp2reg(fs, e, e->u.info);
          result = e->u.info;
        }
      }
      return result;
  }
}

//----- (0075B120) --------------------------------------------------------
void __cdecl luaK_storevar(FuncState *fs, expdesc *var, expdesc *ex)
{
  int v3; // ebx@4
  int v4; // eax@4
  int v5; // eax@5
  int v6; // eax@7
  int v7; // edx@11

  if ( var->k == 7 )
  {
    if ( ex->k == 6 )
    {
      v7 = ex->u.info;
      if ( !(v7 & 0x100) && v7 >= fs->nactvar )
        --fs->freereg;
    }
    exp2reg(fs, ex, var->u.info);
  }
  else
  {
    if ( var->k == 8 )
    {
      v5 = luaK_exp2anyreg(fs, ex);
      luaK_code(fs, ((v5 | (var->u.info << 17)) << 6) | 9);
    }
    else if ( var->k == 9 )
    {
      v3 = 2 * (var->u.ind.vt == 7) + 8;
      v4 = luaK_exp2RK(fs, ex);
      luaK_code(fs, v3 | ((var->u.ind.t | ((v4 | (var->u.ind.idx << 9)) << 8)) << 6));
    }
    if ( ex->k == 6 )
    {
      v6 = ex->u.info;
      if ( !(v6 & 0x100) && v6 >= fs->nactvar )
        --fs->freereg;
    }
  }
}

//----- (0075B1F0) --------------------------------------------------------
void __cdecl luaK_self(FuncState *fs, expdesc *e, expdesc *key)
{
  int v3; // edi@6
  int v4; // eax@10
  int v5; // eax@14
  int v6; // eax@15

  luaK_dischargevars(fs, e);
  if ( e->k != 6 )
    goto LABEL_5;
  if ( e->t != e->f )
  {
    if ( e->u.info >= fs->nactvar )
    {
      exp2reg(fs, e, e->u.info);
      goto LABEL_6;
    }
LABEL_5:
    luaK_exp2nextreg(fs, e);
  }
LABEL_6:
  v3 = e->u.info;
  if ( e->k == 6 && !(v3 & 0x100) && v3 >= fs->nactvar )
    --fs->freereg;
  e->u.info = fs->freereg;
  e->k = 6;
  v4 = fs->freereg + 2;
  if ( v4 > fs->f->maxstacksize )
  {
    if ( v4 >= 250 )
      luaX_syntaxerror(fs->ls, "function or expression too complex");
    fs->f->maxstacksize = v4;
  }
  fs->freereg += 2;
  v5 = luaK_exp2RK(fs, key);
  luaK_code(fs, ((e->u.info | ((v5 | (v3 << 9)) << 8)) << 6) | 0xC);
  if ( key->k == 6 )
  {
    v6 = key->u.info;
    if ( !(v6 & 0x100) && v6 >= fs->nactvar )
      --fs->freereg;
  }
}

//----- (0075B2E0) --------------------------------------------------------
int __usercall jumponcond@<eax>(FuncState *fs@<ecx>, expdesc *e@<eax>, int cond)
{
  expdesc *v3; // ebx@1
  expkind v4; // edi@1
  FuncState *v5; // esi@1
  unsigned int *v6; // edx@2
  unsigned int v7; // eax@2
  int v8; // edi@3
  Proto *v9; // ecx@5
  int v10; // eax@5
  signed int v11; // eax@10
  int l1; // [sp+Ch] [bp-4h]@14

  v3 = e;
  v4 = e->k;
  v5 = fs;
  if ( e->k != 11 || (v6 = fs->f->code, v7 = v6[e->u.info], (v6[v3->u.info] & 0x3F) != 20) )
  {
    if ( v4 == 6 )
      goto LABEL_17;
    v9 = fs->f;
    v10 = v5->freereg + 1;
    if ( v10 > v5->f->maxstacksize )
    {
      if ( v10 >= 250 )
        luaX_syntaxerror(v5->ls, "function or expression too complex");
      v9->maxstacksize = v10;
    }
    discharge2reg(v5, v3, ++v5->freereg - 1);
    if ( v3->k == 6 )
    {
LABEL_17:
      v11 = v3->u.info;
      if ( !(v11 & 0x100) && v11 >= v5->nactvar )
        --v5->freereg;
    }
    luaK_code(v5, ((cond | (v3->u.info << 9)) << 14) | 0x3FDC);
    v8 = v5->jpc;
    v5->jpc = -1;
  }
  else
  {
    --fs->pc;
    luaK_code(fs, ((cond == 0) << 14) | ((v7 & 0xFFB7FFFF | 0x360000) >> 17));
    v8 = v5->jpc;
    v5->jpc = -1;
  }
  l1 = luaK_code(v5, 0x7FFF8017u);
  luaK_concat(v5, &l1, v8);
  return l1;
}

//----- (0075B3E0) --------------------------------------------------------
void __cdecl luaK_goiftrue(FuncState *fs, expdesc *e)
{
  int v2; // eax@2
  int v3; // ST08_4@5

  luaK_dischargevars(fs, e);
  switch ( e->k )
  {
    case 0xA:
      invertjump(fs, e);
      v2 = e->u.info;
      break;
    case 2:
    case 4:
    case 5:
      v2 = -1;
      break;
    default:
      v2 = jumponcond(fs, e, 0);
      break;
  }
  luaK_concat(fs, &e->f, v2);
  v3 = e->t;
  fs->lasttarget = fs->pc;
  luaK_concat(fs, &fs->jpc, v3);
  e->t = -1;
}

//----- (0075B480) --------------------------------------------------------
void __cdecl luaK_goiffalse(FuncState *fs, expdesc *e)
{
  int v2; // eax@4
  int v3; // ST08_4@7

  luaK_dischargevars(fs, e);
  if ( e->k == 1 || e->k == 3 )
  {
    v2 = -1;
  }
  else if ( e->k == 10 )
  {
    v2 = e->u.info;
  }
  else
  {
    v2 = jumponcond(fs, e, 1);
  }
  luaK_concat(fs, &e->t, v2);
  v3 = e->f;
  fs->lasttarget = fs->pc;
  luaK_concat(fs, &fs->jpc, v3);
  e->f = -1;
}

//----- (0075B4F0) --------------------------------------------------------
void __usercall codenot(FuncState *fs@<eax>, expdesc *e@<edi>)
{
  FuncState *v2; // esi@1
  int v3; // eax@6
  int v4; // edx@10
  FuncState *v5; // edx@10
  expdesc *v6; // [sp+0h] [bp-8h]@0

  v2 = fs;
  luaK_dischargevars(fs, v6);
  switch ( e->k )
  {
    case 1:
    case 3:
      e->k = 2;
      break;
    case 2:
    case 4:
    case 5:
      e->k = 3;
      break;
    case 0xA:
      invertjump(v2, e);
      break;
    case 6:
    case 0xB:
      discharge2anyreg(v2, e);
      if ( e->k == 6 )
      {
        v3 = e->u.info;
        if ( !(v3 & 0x100) && v3 >= v2->nactvar )
          --v2->freereg;
      }
      e->u.info = luaK_code(v2, (e->u.info << 23) | 0x14);
      e->k = 11;
      break;
    default:
      break;
  }
  v4 = e->t;
  e->t = e->f;
  e->f = v4;
  removevalues(v2, v4);
  removevalues(v5, e->t);
}

//----- (0075B5B0) --------------------------------------------------------
void __cdecl luaK_indexed(FuncState *fs, expdesc *t, expdesc *k)
{
  __int16 v3; // ax@1
  bool v4; // zf@1

  t->u.ind.t = t->u.info;
  v3 = luaK_exp2RK(fs, k);
  v4 = t->k == 8;
  t->u.ind.idx = v3;
  t->u.ind.vt = v4 + 7;
  t->k = 9;
}

//----- (0075B5F0) --------------------------------------------------------
void __usercall codearith(FuncState *fs@<edi>, expdesc *e1@<ebx>, OpCode op, expdesc *e2, int line)
{
  expdesc *v5; // esi@4
  int v6; // eax@6
  int v7; // ecx@8
  signed int v8; // ecx@12
  signed int v9; // ecx@16
  int v10; // ecx@20
  int o2; // [sp+4h] [bp-4h]@4

  if ( !constfolding(op, e1, e2) )
  {
    if ( op == 19 || op == 21 )
    {
      v5 = e2;
      o2 = 0;
    }
    else
    {
      v5 = e2;
      o2 = luaK_exp2RK(fs, e2);
    }
    v6 = luaK_exp2RK(fs, e1);
    if ( v6 <= o2 )
    {
      if ( v5->k == 6 )
      {
        v9 = v5->u.info;
        if ( !(v9 & 0x100) && v9 >= fs->nactvar )
          --fs->freereg;
      }
      if ( e1->k == 6 )
      {
        v10 = e1->u.info;
        if ( !(v10 & 0x100) && v10 >= fs->nactvar )
          --fs->freereg;
      }
    }
    else
    {
      if ( e1->k == 6 )
      {
        v7 = e1->u.info;
        if ( !(v7 & 0x100) && v7 >= fs->nactvar )
          --fs->freereg;
      }
      if ( v5->k == 6 )
      {
        v8 = v5->u.info;
        if ( !(v8 & 0x100) && v8 >= fs->nactvar )
          --fs->freereg;
      }
    }
    e1->u.info = luaK_code(fs, op | ((o2 | (v6 << 9)) << 14));
    e1->k = 11;
    fs->f->lineinfo[fs->pc - 1] = line;
  }
}

//----- (0075B6F0) --------------------------------------------------------
void __usercall codecomp(FuncState *fs@<ecx>, expdesc *e2@<eax>, OpCode op, int cond, expdesc *e1)
{
  expdesc *v5; // ebx@1
  FuncState *v6; // esi@1
  int v7; // edi@1
  int v8; // eax@1
  signed int v9; // ebx@2
  expdesc *v10; // ebx@5
  int v11; // ecx@6
  int v12; // ecx@11
  int v13; // edi@12

  v5 = e2;
  v6 = fs;
  v7 = luaK_exp2RK(fs, e1);
  v8 = luaK_exp2RK(v6, v5);
  if ( v5->k == 6 )
  {
    v9 = v5->u.info;
    if ( !(v9 & 0x100) && v9 >= v6->nactvar )
      --v6->freereg;
  }
  v10 = e1;
  if ( e1->k == 6 )
  {
    v11 = e1->u.info;
    if ( !(v11 & 0x100) && v11 >= v6->nactvar )
      --v6->freereg;
  }
  if ( !cond && op != 24 )
  {
    v12 = v7;
    v7 = v8;
    v8 = v12;
    cond = 1;
  }
  luaK_code(v6, op | ((cond | ((v8 | (v7 << 9)) << 8)) << 6));
  v13 = v6->jpc;
  v6->jpc = -1;
  cond = luaK_code(v6, 0x7FFF8017u);
  luaK_concat(v6, &cond, v13);
  v10->u.info = cond;
  v10->k = 10;
}

//----- (0075B7B0) --------------------------------------------------------
void __cdecl luaK_prefix(FuncState *fs, UnOpr op, expdesc *e, int line)
{
  expdesc e2; // [sp+0h] [bp-18h]@1

  e2.u.nval = 0.0;
  e2.f = -1;
  e2.t = -1;
  e2.k = 5;
  if ( op )
  {
    if ( op == 1 )
    {
      codenot(fs, e);
    }
    else if ( op == 2 )
    {
      luaK_exp2anyreg(fs, e);
      codearith(fs, e, OP_LEN, &e2, line);
    }
  }
  else if ( e->k != 5 || e->t != -1 || e->f != -1 )
  {
    luaK_exp2anyreg(fs, e);
    codearith(fs, e, OP_UNM, &e2, line);
  }
  else
  {
    e->u.nval = -e->u.nval;
  }
}

//----- (0075B860) --------------------------------------------------------
void __cdecl luaK_infix(FuncState *fs, BinOpr op, expdesc *v)
{
  switch ( op )
  {
    case 13:
      luaK_goiftrue(fs, v);
      break;
    case 14:
      luaK_goiffalse(fs, v);
      break;
    case 6:
      luaK_exp2nextreg(fs, v);
      break;
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      if ( v->k != 5 || v->t != -1 || v->f != -1 )
        luaK_exp2RK(fs, v);
      break;
    default:
      luaK_exp2RK(fs, v);
      break;
  }
}

//----- (0075B910) --------------------------------------------------------
void __cdecl luaK_posfix(FuncState *fs, BinOpr op, expdesc *e1, expdesc *e2, int line)
{
  unsigned int *v5; // eax@6

  switch ( op )
  {
    case 13:
      luaK_dischargevars(fs, e2);
      luaK_concat(fs, &e2->f, e1->f);
      e1->k = e2->k;
      *((_DWORD *)&e1->k + 1) = *((_DWORD *)&e2->k + 1);
      e1->u.nval = e2->u.nval;
      e1->t = e2->t;
      e1->f = e2->f;
      break;
    case 14:
      luaK_dischargevars(fs, e2);
      luaK_concat(fs, &e2->t, e1->t);
      e1->k = e2->k;
      *((_DWORD *)&e1->k + 1) = *((_DWORD *)&e2->k + 1);
      e1->u.nval = e2->u.nval;
      e1->t = e2->t;
      e1->f = e2->f;
      break;
    case 6:
      luaK_exp2val(fs, e2);
      if ( e2->k != 11 || (fs->f->code[e2->u.info] & 0x3F) != 22 )
      {
        luaK_exp2nextreg(fs, e2);
        codearith(fs, e1, OP_CONCAT, e2, line);
      }
      else
      {
        freeexp(fs, e1);
        v5 = &fs->f->code[e2->u.info];
        *v5 = ((unsigned int)&loc_7FFFFE + 1) & *v5 | (e1->u.info << 23);
        e1->k = 11;
        e1->u.info = e2->u.info;
      }
      break;
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      codearith(fs, e1, (OpCode)(op + 13), e2, line);
      break;
    case 7:
    case 8:
    case 9:
      codecomp(fs, e2, (OpCode)(op + 17), 1, e1);
      break;
    case 10:
    case 11:
    case 12:
      codecomp(fs, e2, (OpCode)(op + 14), 0, e1);
      break;
    default:
      return;
  }
}

//----- (0075BAC0) --------------------------------------------------------
void __cdecl luaK_patchlist(FuncState *fs, int list, int target)
{
  int v3; // ecx@1

  v3 = fs->pc;
  if ( target == v3 )
  {
    fs->lasttarget = v3;
    luaK_concat(fs, &fs->jpc, list);
  }
  else
  {
    patchlistaux(list, fs, target, 255, target);
  }
}

//----- (0075BB20) --------------------------------------------------------
int __stdcall ijlInit(int a1)
{
  struct _IJL_CONTEXT *v1; // eax@1
  int v2; // eax@3
  int v3; // eax@3
  int v4; // edx@3
  void *v5; // eax@3
  int v6; // edx@3
  int v7; // esi@5
  signed int v8; // eax@5
  int v9; // esi@5
  int v11; // [sp+0h] [bp-40h]@1
  struct _IJL_CONTEXT *v12; // [sp+4h] [bp-3Ch]@1
  int v13; // [sp+8h] [bp-38h]@1
  int v14; // [sp+Ch] [bp-34h]@3
  int v15; // [sp+10h] [bp-30h]@3
  int v16; // [sp+14h] [bp-2Ch]@3
  int v17; // [sp+18h] [bp-28h]@3
  CPPEH_RECORD ms_exc; // [sp+28h] [bp-18h]@1

  ms_exc.old_esp = (DWORD)&v11;
  v11 = 0;
  v12 = 0;
  ms_exc.registration.TryLevel = 0;
  v13 = a1 + 88;
  v1 = (struct _IJL_CONTEXT *)operator new(0x114u);
  v12 = v1;
  if ( v1 )
  {
    *((_DWORD *)v1 + 1) = 0;
    *((_DWORD *)v1 + 2) = 0;
    *((_DWORD *)v1 + 3) = 0;
    *((_DWORD *)v1 + 4) = 0;
    *((_DWORD *)v1 + 5) = 0;
    *(_DWORD *)(v13 + 14320) = v1;
    ownInitializeLibrary(v1);
    *(_DWORD *)a1 = 0;
    *(_DWORD *)(a1 + 4) = 0;
    *(_DWORD *)(a1 + 8) = 0;
    *(_DWORD *)(a1 + 12) = 0;
    *(_DWORD *)(a1 + 16) = 0;
    *(_DWORD *)(a1 + 20) = 3;
    *(_DWORD *)(a1 + 24) = 2;
    *(_DWORD *)(a1 + 28) = 0;
    *(_DWORD *)(a1 + 36) = 0;
    *(_DWORD *)(a1 + 32) = 0;
    *(_DWORD *)(a1 + 40) = 0;
    *(_DWORD *)(a1 + 44) = 0;
    *(_DWORD *)(a1 + 48) = 0;
    *(_DWORD *)(a1 + 52) = 3;
    *(_DWORD *)(a1 + 56) = 3;
    *(_DWORD *)(a1 + 60) = 1;
    *(_DWORD *)(a1 + 64) = 0;
    *(_DWORD *)(a1 + 68) = 0;
    *(_DWORD *)(a1 + 72) = 1;
    *(_DWORD *)(a1 + 76) = 1;
    *(_DWORD *)(a1 + 80) = 75;
    v2 = v13;
    *(_DWORD *)(v13 + 116) = 0;
    *(_DWORD *)(v2 + 24) = 0;
    *(_DWORD *)(v2 + 28) = 0;
    *(_DWORD *)v2 = -1;
    *(_DWORD *)(v2 + 4) = 0;
    *(_DWORD *)(v2 + 8) = 0;
    *(_DWORD *)(v2 + 12) = 0;
    *(_DWORD *)(v2 + 16) = 0;
    *(_DWORD *)(v2 + 20) = 1;
    *(_DWORD *)(v2 + 32) = *(_DWORD *)(a1 + 4);
    *(_DWORD *)(v2 + 36) = *(_DWORD *)(a1 + 8);
    *(_DWORD *)(v2 + 40) = *(_DWORD *)(a1 + 12);
    *(_DWORD *)(v2 + 44) = *(_DWORD *)(a1 + 16);
    *(_DWORD *)(v2 + 48) = *(_DWORD *)(a1 + 20);
    *(_DWORD *)(v2 + 52) = *(_DWORD *)(a1 + 24);
    *(_DWORD *)(v2 + 56) = *(_DWORD *)(a1 + 28);
    *(_DWORD *)(v2 + 60) = 0;
    *(_DWORD *)(v2 + 68) = *(_DWORD *)(a1 + 36);
    *(_DWORD *)(v2 + 64) = *(_DWORD *)(a1 + 32);
    *(_DWORD *)(v2 + 72) = *(_DWORD *)(a1 + 40);
    *(_DWORD *)(v2 + 76) = *(_DWORD *)(a1 + 44);
    *(_DWORD *)(v2 + 80) = *(_DWORD *)(a1 + 48);
    *(_DWORD *)(v2 + 84) = *(_DWORD *)(a1 + 52);
    *(_DWORD *)(v2 + 88) = *(_DWORD *)(a1 + 56);
    *(_DWORD *)(v2 + 92) = *(_DWORD *)(a1 + 60);
    *(_DWORD *)(v2 + 96) = *(_DWORD *)(a1 + 64);
    *(_DWORD *)(v2 + 100) = *(_DWORD *)(a1 + 68);
    *(_DWORD *)(v2 + 104) = *(_DWORD *)(a1 + 72);
    *(_DWORD *)(v2 + 108) = *(_DWORD *)(a1 + 76);
    *(_DWORD *)(v2 + 112) = *(_DWORD *)(a1 + 80);
    *(_DWORD *)(v2 + 120) = 0;
    *(_DWORD *)(v2 + 124) = 0;
    *(_DWORD *)(v2 + 14100) = 0;
    *(_DWORD *)(v2 + 14104) = 0;
    *(_DWORD *)(v2 + 14052) = 0;
    *(_DWORD *)(v2 + 14056) = 0;
    *(_DWORD *)(v2 + 14060) = 0;
    *(_DWORD *)(v2 + 14064) = 0;
    *(_DWORD *)(v2 + 14068) = 0;
    *(_DWORD *)(v2 + 14072) = 0;
    *(_DWORD *)(v2 + 14076) = 0;
    *(_DWORD *)(v2 + 14080) = 0;
    *(_DWORD *)(v2 + 14084) = 0;
    *(_DWORD *)(v2 + 14088) = 0;
    *(_DWORD *)(v2 + 14092) = 0;
    *(_DWORD *)(v2 + 14096) = 0;
    (*(void (__cdecl **)(int, signed int))&NULLSTR[5716])(v2 + 148, 180);
    (*(void (__cdecl **)(int, signed int))&NULLSTR[5716])(v13 + 328, 180);
    (*(void (__cdecl **)(int, _DWORD))&NULLSTR[5716])(v13 + 508, 180);
    (*(void (__cdecl **)(int, _DWORD))&NULLSTR[5716])(v13 + 688, 180);
    v3 = v13;
    v14 = v13 + 160;
    v15 = v13 + 340;
    v16 = v13 + 520;
    v17 = v13 + 700;
    *(_DWORD *)(v13 + 156) = (v13 + 167) & 0xFFFFFFF8;
    *(_DWORD *)(v3 + 336) = (v3 + 347) & 0xFFFFFFF8;
    *(_DWORD *)(v3 + 516) = (v3 + 527) & 0xFFFFFFF8;
    *(_DWORD *)(v3 + 696) = (v3 + 707) & 0xFFFFFFF8;
    (*(void (__cdecl **)(int, signed int))&NULLSTR[5716])(v3 + 7460, 1648);
    (*(void (__cdecl **)(int, signed int))&NULLSTR[5716])(v13 + 9108, 1648);
    (*(void (__cdecl **)(int, _DWORD))&NULLSTR[5716])(v13 + 10756, 1648);
    (*(void (__cdecl **)(int, _DWORD))&NULLSTR[5716])(v13 + 12404, 1648);
    (*(void (__cdecl **)(int, _DWORD))&NULLSTR[5716])(v13 + 868, 1648);
    (*(void (__cdecl **)(int, _DWORD))&NULLSTR[5716])(v13 + 2516, 1648);
    (*(void (__cdecl **)(int, _DWORD))&NULLSTR[5716])(v13 + 4164, 1648);
    (*(void (__cdecl **)(int, _DWORD))&NULLSTR[5716])(v13 + 5812, 1648);
    v4 = v13;
    *(_DWORD *)(v13 + 14300) = 1;
    *(_DWORD *)(v4 + 14244) = 0;
    *(_DWORD *)(v4 + 14248) = 0;
    *(_DWORD *)(v4 + 14252) = 0;
    *(_DWORD *)(v4 + 14256) = 0;
    *(_DWORD *)(v4 + 14260) = 0;
    *(_DWORD *)(v4 + 14264) = 0;
    *(_DWORD *)(v4 + 14268) = 0;
    *(_DWORD *)(v4 + 14272) = 4;
    *(_DWORD *)(v4 + 14276) = 0;
    *(_DWORD *)(v4 + 14280) = 0;
    v5 = operator new(0x40u);
    v6 = v13;
    *(_DWORD *)(v13 + 14284) = v5;
    if ( v5 )
    {
      (*(void (__cdecl **)(void *, int))&NULLSTR[5716])(v5, 16 * *(_DWORD *)(v6 + 14272));
      v7 = v13;
      *(_DWORD *)(v13 + 14288) = 0;
      *(_DWORD *)(v7 + 14292) = 0;
      *(_DWORD *)(v7 + 14296) = 0;
      *(_DWORD *)(v7 + 18472) = 0;
      *(_DWORD *)(v7 + 18476) = 0;
      *(_DWORD *)(v7 + 14304) = 0;
      *(_DWORD *)(v7 + 18480) = 0;
      *(_DWORD *)(v7 + 14108) = 0;
      *(_BYTE *)(v7 + 14112) = 0;
      *(_DWORD *)(v7 + 14116) = 0;
      *(_BYTE *)(v7 + 14120) = 0;
      *(_DWORD *)(v7 + 14124) = 0;
      *(_BYTE *)(v7 + 14128) = 0;
      *(_DWORD *)(v7 + 14132) = 0;
      *(_BYTE *)(v7 + 14136) = 0;
      *(_DWORD *)(v7 + 14140) = 0;
      *(_DWORD *)(v7 + 14144) = 0;
      *(_BYTE *)(v7 + 14148) = 0;
      *(_BYTE *)(v7 + 14149) = 0;
      *(_DWORD *)(v7 + 14152) = 0;
      *(_DWORD *)(v7 + 14156) = 0;
      *(_BYTE *)(v7 + 14160) = 0;
      *(_BYTE *)(v7 + 14161) = 0;
      *(_DWORD *)(v7 + 14164) = 0;
      *(_DWORD *)(v7 + 14168) = 0;
      *(_BYTE *)(v7 + 14172) = 0;
      *(_BYTE *)(v7 + 14173) = 0;
      *(_DWORD *)(v7 + 14176) = 0;
      *(_DWORD *)(v7 + 14180) = 0;
      *(_BYTE *)(v7 + 14184) = 0;
      *(_BYTE *)(v7 + 14185) = 0;
      *(_DWORD *)(v7 + 14188) = 0;
      *(_DWORD *)(v7 + 14192) = 0;
      *(_BYTE *)(v7 + 14196) = 0;
      *(_BYTE *)(v7 + 14197) = 0;
      *(_DWORD *)(v7 + 14200) = 0;
      *(_DWORD *)(v7 + 14204) = 0;
      *(_BYTE *)(v7 + 14208) = 0;
      *(_BYTE *)(v7 + 14209) = 0;
      *(_DWORD *)(v7 + 14212) = 0;
      *(_DWORD *)(v7 + 14216) = 0;
      *(_BYTE *)(v7 + 14220) = 0;
      *(_BYTE *)(v7 + 14221) = 0;
      *(_DWORD *)(v7 + 14224) = 0;
      *(_DWORD *)(v7 + 14228) = 0;
      *(_BYTE *)(v7 + 14232) = 0;
      *(_BYTE *)(v7 + 14233) = 0;
      *(_DWORD *)(v7 + 136) = 0;
      *(_DWORD *)(v7 + 140) = 0;
      *(_DWORD *)(v7 + 144) = 0;
      *(_DWORD *)(v7 + 132) = 0;
      *(_DWORD *)(v7 + 128) = 0;
      *(_BYTE *)(v7 + 14236) = 0;
      *(_BYTE *)(v7 + 14240) = 0;
      *(_BYTE *)(v7 + 14237) = 1;
      *(_BYTE *)(v7 + 14241) = 1;
      *(_BYTE *)(v7 + 14238) = 1;
      *(_BYTE *)(v7 + 14242) = 1;
      *(_BYTE *)(v7 + 14239) = 1;
      *(_BYTE *)(v7 + 14243) = 1;
      *(_DWORD *)(*(_DWORD *)(v7 + 14284) + 12) = 0;
      *(_DWORD *)(*(_DWORD *)(v7 + 14284) + 28) = 1;
      *(_DWORD *)(*(_DWORD *)(v7 + 14284) + 44) = 1;
      *(_DWORD *)(*(_DWORD *)(v7 + 14284) + 60) = 1;
      *(_DWORD *)(v7 + 14372) = 0;
      *(_DWORD *)(v7 + 14328) = 0;
      *(_DWORD *)(v7 + 14332) = 0;
      *(_DWORD *)(v7 + 14336) = 0;
      *(_DWORD *)(v7 + 14340) = 0;
      *(_DWORD *)(v7 + 14356) = 0;
      *(_DWORD *)(v7 + 14348) = 0;
      *(_DWORD *)(v7 + 14352) = 0;
      v8 = ownGetProcessorType(v12);
      v9 = v13;
      *(_DWORD *)(v13 + 14364) = v8;
      *(_DWORD *)(v9 + 14324) = 0;
      *(_DWORD *)(v9 + 14344) = 0;
      *(_DWORD *)(v9 + 14312) = 0;
      *(_DWORD *)(v9 + 14316) = 0;
      *(_BYTE *)(v9 + 14360) = 0;
      *(_DWORD *)(v9 + 14368) = 0;
      *(_DWORD *)(v9 + 18484) = 0;
      *(_DWORD *)(v9 + 19928) = v8;
      *(_DWORD *)(v9 + 19932) = 0;
      *(_DWORD *)(v9 + 19936) = 0;
      *(_DWORD *)(v9 + 19940) = 0;
      *(_DWORD *)(v9 + 19944) = 0;
      *(_DWORD *)(v9 + 19948) = 0;
      *(_WORD *)(v9 + 19952) = 100;
      *(_WORD *)(v9 + 19954) = 0;
      *(_WORD *)(v9 + 19956) = 0;
      *(_DWORD *)(v9 + 19960) = 0;
      *(_WORD *)(v9 + 19964) = 257;
      *(_BYTE *)(v9 + 19966) = 0;
      *(_WORD *)(v9 + 19968) = 1;
      *(_WORD *)(v9 + 19970) = 1;
      *(_DWORD *)(v9 + 19972) = 0;
      *(_WORD *)(v9 + 19976) = 0;
      ms_exc.registration.TryLevel = -1;
    }
    else
    {
      v11 = -5;
    }
  }
  else
  {
    v11 = -5;
  }
  if ( v11 < 0 )
  {
    if ( *(_DWORD *)(a1 + 14372) )
    {
      operator delete(*(void **)(a1 + 14372));
      *(_DWORD *)(a1 + 14372) = 0;
      *(_DWORD *)(a1 + 14360) = 0;
    }
    if ( *(_DWORD *)(a1 + 20028) )
    {
      operator delete(*(void **)(a1 + 20028));
      *(_DWORD *)(a1 + 20028) = 0;
    }
    if ( *(_DWORD *)(a1 + 18568) )
    {
      operator delete(*(void **)(a1 + 18568));
      *(_DWORD *)(a1 + 18568) = 0;
    }
    if ( *(_DWORD *)(a1 + 14392) )
    {
      if ( *(_DWORD *)(*(_DWORD *)(a1 + 14392) + 52) )
      {
        operator delete(*(void **)(*(_DWORD *)(a1 + 14392) + 52));
        *(_DWORD *)(*(_DWORD *)(a1 + 14392) + 52) = 0;
      }
      operator delete(*(void **)(a1 + 14392));
      *(_DWORD *)(a1 + 14392) = 0;
    }
  }
  return v11;
}
// B60724: using guessed type int (__cdecl *)(_DWORD, _DWORD);

//----- (0075C2B0) --------------------------------------------------------
int __stdcall ijlFree(int a1)
{
  int v1; // eax@1
  void *v2; // edx@1
  void *v3; // edx@7
  void *v4; // edx@9
  void *v5; // edx@12
  int v6; // edx@14
  void *v7; // eax@15
  int v8; // edx@16
  int v9; // edx@18
  int v11; // ecx@22
  int v12; // edx@23
  void *v13; // ebx@23
  signed int v14; // edx@25
  signed int v15; // edx@27
  int v16; // [sp+0h] [bp-38h]@1
  int v17; // [sp+4h] [bp-34h]@1
  int v18; // [sp+8h] [bp-30h]@5
  void *p; // [sp+Ch] [bp-2Ch]@19
  CPPEH_RECORD ms_exc; // [sp+20h] [bp-18h]@1

  ms_exc.old_esp = (DWORD)&v16;
  v16 = 0;
  ms_exc.registration.TryLevel = 0;
  v1 = a1 + 88;
  v17 = a1 + 88;
  v2 = *(void **)(a1 + 14460);
  if ( v2 )
  {
    if ( !ownCloseFile(v2) )
    {
      v16 = -9;
      goto LABEL_19;
    }
    v1 = v17;
    *(_DWORD *)(v17 + 14372) = 0;
  }
  *(_DWORD *)(v1 + 14052) = 0;
  *(_DWORD *)(v1 + 14056) = 0;
  *(_DWORD *)(v1 + 14060) = 0;
  *(_DWORD *)(v1 + 14064) = 0;
  v18 = 4;
  if ( *(_DWORD *)(v1 + 14272) <= 255 )
  {
    v3 = *(void **)(v1 + 14284);
    if ( v3 )
    {
      operator delete(v3);
      v1 = v17;
      *(_DWORD *)(v17 + 14284) = 0;
      *(_DWORD *)(v1 + 14272) = 0;
    }
    v4 = *(void **)(v1 + 19940);
    if ( v4 )
    {
      operator delete(v4);
      v1 = v17;
      *(_DWORD *)(v17 + 19940) = 0;
    }
    if ( *(_DWORD *)(v1 + 19944) == 1 )
    {
      v11 = *(_DWORD *)(v1 + 19948);
      if ( v11 )
      {
        v12 = *(_DWORD *)(v11 + 4);
        v13 = *(void **)v11;
        if ( *(_DWORD *)v11 > v12 )
        {
          *(_DWORD *)v11 = v12;
          v11 = *(_DWORD *)(v1 + 19948);
          v13 = *(void **)v11;
        }
        v14 = *(_DWORD *)(v11 + 8);
        if ( (signed int)v13 > v14 )
        {
          *(_DWORD *)v11 = v14;
          v11 = *(_DWORD *)(v1 + 19948);
          v13 = *(void **)v11;
        }
        v15 = *(_DWORD *)(v11 + 12);
        if ( (signed int)v13 > v15 )
        {
          *(_DWORD *)v11 = v15;
          v13 = **(void ***)(v1 + 19948);
        }
        operator delete(v13);
        operator delete(*(void **)(v17 + 19948));
        v1 = v17;
        *(_DWORD *)(v17 + 19948) = 0;
      }
    }
    v5 = *(void **)(v1 + 18480);
    if ( v5 )
    {
      operator delete(v5);
      v1 = v17;
      *(_DWORD *)(v17 + 18480) = 0;
    }
    v6 = *(_DWORD *)(v1 + 14304);
    if ( v6 )
    {
      v7 = *(void **)(v6 + 52);
      if ( v7 )
      {
        operator delete(v7);
        v8 = v17;
        *(_DWORD *)(*(_DWORD *)(v17 + 14304) + 52) = 0;
        v6 = *(_DWORD *)(v8 + 14304);
      }
      operator delete((void *)v6);
      v1 = v17;
      *(_DWORD *)(v17 + 14304) = 0;
    }
    (*(void (__cdecl **)(int, signed int))&NULLSTR[5716])(v1 + 14108, 32);
    (*(void (__cdecl **)(int, signed int))&NULLSTR[5716])(v17 + 14140, 96);
    v9 = v17;
    *(_DWORD *)(v17 + 128) = 0;
    *(_DWORD *)(v9 + 132) = 0;
    *(_DWORD *)(v9 + 144) = 0;
    *(_DWORD *)(v9 + 136) = 0;
    *(_DWORD *)(v9 + 140) = 0;
    *(_DWORD *)(v9 + 14100) = 0;
    *(_DWORD *)(v9 + 14104) = 0;
    ms_exc.registration.TryLevel = -1;
  }
  else
  {
    v16 = -8;
  }
LABEL_19:
  ownFreeLibrary(*(_DWORD *)(a1 + 14408));
  p = *(void **)(a1 + 14408);
  if ( p )
  {
    operator delete(p);
    *(_DWORD *)(a1 + 14408) = 0;
  }
  return v16;
}
// B60724: using guessed type int (__cdecl *)(_DWORD, _DWORD);

//----- (0075C560) --------------------------------------------------------
signed int __cdecl CheckParameters(struct _JPEG_CORE_PROPERTIES *a1)
{
  char v1; // cl@1
  char v2; // dl@1
  char v3; // al@1
  _IJLIOTYPE v4; // esi@2
  int v5; // ebx@59
  int v6; // eax@63
  int v7; // eax@65
  _IJL_COLOR v9; // ecx@80
  _IJL_COLOR v10; // eax@87
  _DCTTYPE v11; // eax@95
  _IJL_JPGSUBSAMPLING v12; // eax@102
  _IJL_JPGSUBSAMPLING v13; // eax@106
  _IJL_COLOR v14; // edx@119
  _IJL_COLOR v15; // edx@138
  _IJL_COLOR v16; // edx@148
  _IJL_COLOR v17; // edx@168
  _IJL_COLOR v18; // edx@175
  _IJL_COLOR v19; // edx@189
  _IJL_COLOR v20; // edx@199
  int v21; // ebx@207
  int v22; // ebx@209
  int v23; // ebx@214
  _IJL_JPGSUBSAMPLING v24; // ebx@216
  _IJL_COLOR v25; // ebx@221
  char v26; // [sp+8h] [bp-1Ch]@1
  char v27; // [sp+Ch] [bp-18h]@1

  v1 = 0;
  v2 = 0;
  v27 = 0;
  v3 = 0;
  v26 = 0;
  if ( a1->UseJPEGPROPERTIES )
    return 0;
  v4 = a1->jprops.iotype;
  if ( v4 == -1 )
    return -8;
  if ( v4
    && v4 != 1
    && v4 != 2
    && v4 != 3
    && v4 != 4
    && v4 != 5
    && v4 != 6
    && v4 != 7
    && v4 != 14
    && v4 != 15
    && v4 != 16
    && v4 != 17
    && v4 != 18
    && v4 != 19
    && v4 != 20
    && v4 != 21 )
  {
    if ( v4 != 8 && v4 != 9 && v4 != 10 && v4 != 11 && v4 != 12 && v4 != 13 )
      return -8;
    v27 = 1;
  }
  else
  {
    v1 = 1;
  }
  if ( v4 == IJL_JFILE_READPARAMS
    || v4 == 2
    || v4 == 4
    || v4 == 6
    || v4 == 14
    || v4 == 16
    || v4 == 18
    || v4 == 20
    || v4 == 8
    || v4 == 10
    || v4 == 12 )
  {
    v2 = 1;
  }
  if ( v4 != 2
    && v4 != 3
    && v4 != 6
    && v4 != 7
    && v4 != 8
    && v4 != 9
    && v4 != 12
    && v4 != 13
    && v4 != 18
    && v4 != 19
    && v4 != 16
    && v4 != 17
    && v4 != 15
    && v4 != 20
    && v4 != 21
    || (v3 = 1, a1->jprops.raw_coefs) )
  {
LABEL_54:
    if ( v2 )
    {
      if ( !a1->JPGFile )
        return -8;
    }
    else if ( !a1->JPGBytes || !a1->JPGSizeBytes )
    {
      return -8;
    }
    v5 = a1->JPGChannels;
    if ( v5 <= 0 || v5 > 256 )
      return -8;
    if ( v27 )
    {
      if ( v3 )
      {
        v6 = a1->JPGWidth;
        if ( v6 <= 0 )
          return -8;
        if ( v6 > 0xFFFF )
          return -8;
        v7 = a1->JPGHeight;
        if ( v7 <= 0 || v7 > 0xFFFF )
          return -8;
        if ( a1->DIBColor != 4 && a1->JPGColor != 3 && v5 > a1->DIBChannels )
          return -8;
      }
      if ( v5 == 1 && a1->JPGSubsampling )
        return -3;
      if ( v5 == 3 )
      {
        v13 = a1->JPGSubsampling;
        if ( v13 != 1 && v13 != 2 && v13 )
          return -3;
      }
      if ( v5 == 4 )
      {
        v12 = a1->JPGSubsampling;
        if ( v12 != 3 && v12 != 4 && v12 )
          return -3;
      }
      if ( v5 != 1 && v5 != 3 && v5 != 4 && a1->JPGSubsampling )
        return -3;
    }
    if ( v1 )
    {
      v9 = a1->JPGColor;
      if ( v9 == 4 && v5 == 1 )
      {
        if ( (v16 = a1->DIBColor, v16 == 4) && a1->DIBChannels == 1
          || v16 == 1 && a1->DIBChannels == 3
          || v16 == 2 && a1->DIBChannels == 3
          || v16 == 5 && a1->DIBChannels == 4 )
        {
          v26 = 1;
        }
      }
      if ( v9 == 1 && v5 == 3 )
      {
        if ( (v15 = a1->DIBColor, v15 == 1) && a1->DIBChannels == 3
          || v15 == 2 && a1->DIBChannels == 3
          || v15 == 5 && a1->DIBChannels == 4 )
        {
          v26 = 1;
        }
      }
      if ( v9 == 5 && v5 == 4 && a1->DIBColor == 5 && a1->DIBChannels == 4 )
        v26 = 1;
      if ( v9 == 3 && v5 == 3 )
      {
        v14 = a1->DIBColor;
        if ( v14 == 4 && a1->DIBChannels == 1
          || v14 == 1 && a1->DIBChannels == 3
          || v14 == 2 && a1->DIBChannels == 3
          || v14 == 5 && a1->DIBChannels == 4 )
        {
          v26 = 1;
        }
        if ( v14 == 3 )
          v26 = 1;
      }
      if ( v9 == 6 && v5 == 4 && a1->DIBColor == 5 && a1->DIBChannels == 4 )
        v26 = 1;
      if ( v9 != 255 || a1->DIBColor != 255 )
        goto LABEL_94;
    }
    else
    {
      v10 = a1->DIBColor;
      if ( v10 == 4 && a1->DIBChannels == 1 )
      {
        if ( (v20 = a1->JPGColor, v20 == 4) && v5 == 1 || v20 == 3 && v5 == 3 )
          v26 = 1;
      }
      if ( v10 == 1 && a1->DIBChannels == 3 )
      {
        if ( (v19 = a1->JPGColor, v19 == 4) && v5 == 1 || v19 == 1 && v5 == 3 || v19 == 3 && v5 == 3 )
          v26 = 1;
      }
      if ( v10 == 1 && a1->DIBChannels == 4 && a1->JPGColor == 3 && v5 == 3 )
        v26 = 1;
      if ( v10 == 2 && a1->DIBChannels == 3 )
      {
        if ( (v18 = a1->JPGColor, v18 == 4) && v5 == 1 || v18 == 1 && v5 == 3 || v18 == 3 && v5 == 3 )
          v26 = 1;
      }
      if ( v10 == 5 && a1->DIBChannels == 4 )
      {
        if ( (v17 = a1->JPGColor, v17 == 5) && v5 == 4 || v17 == 6 && v5 == 4 )
          v26 = 1;
      }
      if ( v10 == 3 && a1->DIBChannels == 3 && a1->JPGColor == 3 && v5 == 3 )
        v26 = 1;
      if ( v10 != 255 || v5 > a1->DIBChannels || a1->JPGColor != 255 )
      {
LABEL_94:
        if ( v26 )
          goto LABEL_95;
        return -8;
      }
    }
LABEL_95:
    v11 = a1->jprops.dcttype;
    if ( v11 && v11 != 1 )
      return -8;
    if ( a1->jprops.upsampling_type == 1 && a1->jprops.raw_coefs )
      return -8;
    return 0;
  }
  if ( !a1->DIBBytes )
    return -8;
  v21 = a1->DIBWidth;
  if ( v21 > 0xFFFF )
    return -8;
  if ( v21 <= 0 )
    return -8;
  v22 = a1->DIBHeight;
  if ( v22 > 0xFFFF || v22 < -65535 )
    return -8;
  if ( v4 != 20 && v4 != 21 || (v25 = a1->DIBColor, v25 == 1) || v25 == 2 )
  {
    if ( a1->DIBPadBytes < 0 )
      return -8;
    v23 = a1->DIBChannels;
    if ( v23 <= 0 || v23 > 255 )
      return -8;
    v24 = a1->DIBSubsampling;
    if ( v24 && (v24 != 2 || a1->DIBColor != 3) )
      return -3;
    goto LABEL_54;
  }
  return -27;
}

//----- (0075CCA0) --------------------------------------------------------
int __stdcall ijlRead(struct _JPEG_CORE_PROPERTIES *a1, int a2)
{
  _JPEG_PROPERTIES *v2; // eax@2
  _IJLIOTYPE v3; // edx@2
  struct _JPEG_CORE_PROPERTIES *v4; // edx@19
  _IJLIOTYPE v5; // eax@20
  char *v6; // eax@31
  struct _JPEG_PROPERTIES *v7; // ebx@31
  int v8; // ecx@31
  int v9; // esi@31
  char *v10; // esi@33
  struct _JPEG_PROPERTIES *v11; // ecx@33
  int v12; // ebx@33
  int v13; // edx@36
  struct _JPEG_PROPERTIES *v14; // edx@38
  signed int v15; // eax@38
  _JPEG_PROPERTIES *v16; // ecx@41
  _IJLIOTYPE v17; // eax@42
  int v18; // ebx@43
  signed int v19; // edx@47
  int v20; // edx@50
  signed int v21; // eax@70
  int v22; // ebx@70
  _IJLIOTYPE v23; // eax@74
  HANDLE v25; // eax@79
  struct _JPEG_PROPERTIES *v26; // edi@82
  int v27; // ecx@82
  _JPEG_PROPERTIES *v28; // eax@103
  int v29; // ecx@103
  int v30; // edx@103
  int v31; // ecx@105
  int v32; // edx@105
  signed int v33; // edx@108
  signed int v34; // edx@112
  void *v35; // eax@118
  _FRAME_COMPONENT *v36; // esi@122
  int v37; // ebx@122
  _FRAME_COMPONENT *v38; // esi@149
  int v39; // ebx@149
  _FRAME_COMPONENT *v40; // ebx@170
  int v41; // eax@181
  _JPEGQuantTable *v42; // ebx@182
  int v43; // ecx@182
  __int16 **v44; // edx@182
  int v45; // eax@182
  int v46; // eax@182
  int v47; // edx@182
  int v48; // ecx@185
  int v49; // eax@186
  int v50; // ecx@186
  int v51; // edx@186
  char *v52; // ebx@186
  char *v53; // eax@186
  int v54; // [sp+0h] [bp-78h]@1
  void (**v55)(void); // [sp+4h] [bp-74h]@1
  _JPEG_PROPERTIES *v56; // [sp+8h] [bp-70h]@1
  int v57; // [sp+Ch] [bp-6Ch]@179
  int v58; // [sp+10h] [bp-68h]@181
  int v59; // [sp+14h] [bp-64h]@186
  int v60; // [sp+18h] [bp-60h]@186
  char *v61; // [sp+1Ch] [bp-5Ch]@186
  char *v62; // [sp+20h] [bp-58h]@186
  HANDLE v63; // [sp+24h] [bp-54h]@79
  int v64; // [sp+28h] [bp-50h]@60
  int *v65; // [sp+38h] [bp-40h]@180
  _QUANT_TABLE *v66; // [sp+3Ch] [bp-3Ch]@180
  char *v67; // [sp+40h] [bp-38h]@180
  struct _JPEG_PROPERTIES *v68; // [sp+44h] [bp-34h]@2
  int v69; // [sp+48h] [bp-30h]@82
  __int16 **v70; // [sp+4Ch] [bp-2Ch]@180
  _JPEGQuantTable *v71; // [sp+50h] [bp-28h]@180
  int v72; // [sp+54h] [bp-24h]@181
  int v73; // [sp+58h] [bp-20h]@179
  CPPEH_RECORD ms_exc; // [sp+60h] [bp-18h]@1

  ms_exc.old_esp = (DWORD)&v54;
  v54 = 0;
  v55 = 0;
  ms_exc.registration.TryLevel = 0;
  v56 = &a1->jprops;
  v56->iotype = a2;
  v55 = (void (**)(void))a1->jprops.state.ctx;
  v54 = CheckParameters(a1);
  if ( !v54 )
  {
    v2 = v56;
    v68 = v56;
    v3 = v56->iotype;
    if ( v56->iotype == 4 || v3 == 5 || v3 == IJL_JFILE_READPARAMS || v3 == 1 || v3 == 20 || v3 == 21 )
      v56->needframe = 1;
    if ( v3 == 6
      || v3 == 7
      || v3 == 2
      || v3 == 3
      || v3 == 18
      || v3 == 19
      || v3 == 16
      || v3 == 17
      || v3 == 14
      || v3 == 15 )
    {
      if ( v2->use_external_qtables )
      {
        v73 = 0;
        v57 = 0;
        if ( v68->maxquantindex > 0 )
        {
          v65 = &v68->jFmtQuant[0].ident;
          v67 = &v68->rawquanttables[0].ident;
          v66 = v68->jFmtQuant;
          v70 = &v68->jFmtQuant[0].elements;
          v71 = v68->rawquanttables;
          do
          {
            v41 = 180 * v73;
            v72 = v41;
            v65[v41 / 4u] = (unsigned __int8)v67[8 * v73];
            v66[v41 / 0xB4u].precision = 0;
            v69 = 0;
            v58 = 0;
            do
            {
              v42 = v71;
              v43 = v69;
              v44 = v70;
              v45 = v72;
              (*(__int16 **)((char *)v70 + v72))[v69] = v71[v73].quantizer[v69];
              (*(__int16 **)((char *)v44 + v45))[v43 + 1] = v42[v73].quantizer[v43 + 1];
              (*(__int16 **)((char *)v44 + v45))[v43 + 2] = v42[v73].quantizer[v43 + 2];
              v46 = *(int *)((char *)v44 + v45);
              v47 = v69;
              *(_WORD *)(v46 + 2 * v69 + 6) = v42[v73].quantizer[v69 + 3];
              v69 = v47 + 4;
              v58 = v47 + 4;
            }
            while ( v47 + 4 < 64 );
            v57 = ++v73;
          }
          while ( v73 < v68->maxquantindex );
        }
      }
      if ( v68->use_external_htables )
      {
        v48 = 0;
        v57 = 0;
        if ( v68->maxhuffindex > 0 )
        {
          while ( 1 )
          {
            v49 = v48;
            v50 = v68->rawhufftables[v48].hclass;
            v59 = v50;
            v51 = v68->rawhufftables[v49].ident;
            v60 = v68->rawhufftables[v49].ident;
            v52 = v68->rawhufftables[v49].bits;
            v61 = v68->rawhufftables[v49].bits;
            v53 = v68->rawhufftables[v49].vals;
            v62 = v53;
            if ( v50 )
            {
              v54 = BuildDecoderHuffmanTable((int)v52, (int)v53, v50, v51, (int)&v68->jFmtAcHuffman[v51]);
              if ( v54 )
              {
                v54 = -6;
                goto LABEL_77;
              }
            }
            else
            {
              v54 = BuildDecoderHuffmanTable((int)v52, (int)v53, 0, v51, (int)&v68->jFmtDcHuffman[v51]);
              if ( v54 )
              {
                v54 = -6;
                goto LABEL_77;
              }
            }
            v48 = v57 + 1;
            v57 = v48;
            v68 = v56;
            if ( v48 >= v56->maxhuffindex )
            {
              v4 = a1;
              goto LABEL_20;
            }
          }
        }
        v4 = a1;
      }
      else
      {
        v4 = a1;
      }
    }
    else
    {
      v4 = a1;
      a1->jprops.nqtables = 0;
      a1->jprops.maxquantindex = 0;
      a1->jprops.maxhuffindex = 0;
      a1->jprops.nhuffActables = 0;
      a1->jprops.nhuffDctables = 0;
    }
LABEL_20:
    v5 = v68->iotype;
    if ( (v68->iotype == 2
       || v5 == 4
       || v5 == 6
       || v5 == IJL_JFILE_READPARAMS
       || v5 == 18
       || v5 == 16
       || v5 == 14
       || v5 == 20)
      && !v68->state.file )
    {
      v25 = ownOpenFile(v4->JPGFile, 0x80000000);
      v63 = v25;
      if ( !v25 )
      {
        v54 = -10;
        goto LABEL_77;
      }
      v68 = v56;
      v56->state.file = v25;
      v4 = a1;
    }
    if ( v4->UseJPEGPROPERTIES )
    {
      v6 = v68->DIBBytes;
    }
    else
    {
      v6 = v4->DIBBytes;
      v7 = v68;
      v68->DIBBytes = v6;
      v7->DIBWidth = v4->DIBWidth;
      v8 = v4->DIBHeight;
      v7->DIBHeight = v8;
      v7->DIBPadBytes = v4->DIBPadBytes;
      v7->DIBChannels = v4->DIBChannels;
      v7->DIBColor = v4->DIBColor;
      v7->DIBSubsampling = v4->DIBSubsampling;
      v9 = v4->DIBPadBytes + v4->DIBChannels * v4->DIBWidth;
      v7->DIBLineBytes = v9;
      if ( v8 < 0 )
        v7->DIBLineBytes = -v9;
      v10 = v4->JPGBytes;
      v11 = v7;
      v7->JPGBytes = v10;
      v7->JPGFile = v4->JPGFile;
      v12 = v4->JPGSizeBytes;
      v11->JPGSizeBytes = v12;
      v11->JPGColor = v4->JPGColor;
      v11->cconversion_reqd = v4->cconversion_reqd;
      v11->upsampling_reqd = v4->upsampling_reqd;
      v11->jquality = v4->jquality;
      if ( !v11->jscan )
      {
        v26 = v68;
        LODWORD(v68->state.bit_buffer_64) = 0;
        HIDWORD(v26->state.bit_buffer_64) = 0;
        v26->state.bitbuf_bits_valid = 0;
        v26->state.unread_marker = 0;
        v27 = v26->iotype;
        v69 = v27;
        if ( v27 != 2 && v27 != 4 && v27 && v27 != 6 && v27 != 18 && v27 != 16 && v27 != 14 && v27 != 20 )
        {
          v26->state.start_entropy_ptr = v10;
          v26->state.end_entropy_ptr = &v10[v12];
          v26->state.cur_entropy_ptr = v10;
          v26->state.entropy_bytes_left = v12;
          v26->state.entropy_buf_maxsize = v12;
        }
        if ( v69 == 2 || v69 == 4 || !v69 || v69 == 6 || v69 == 18 || v69 == 16 || v69 == 14 || v69 == 20 )
        {
          v26->state.start_entropy_ptr = v26->state.JPGBuffer;
          v26->state.end_entropy_ptr = (char *)&v26->SawAdobeMarker;
          v26->state.cur_entropy_ptr = v26->state.JPGBuffer;
          v26->state.entropy_bytes_left = 4096;
          v26->state.entropy_buf_maxsize = 4096;
        }
        if ( v69 == 20 )
        {
          v64 = ownSeekFile(v26->state.file, 0, 0);
          if ( !v64 )
            goto LABEL_77;
          v4 = a1;
          v68 = v56;
          v6 = v56->DIBBytes;
        }
      }
    }
    v13 = v4->DIBHeight;
    if ( v13 < 0 )
    {
      v6 += v68->DIBLineBytes * (v13 + 1);
      v68->DIBBytes = v6;
    }
    v14 = v68;
    v68->state.DIB_ptr = v6;
    v14->MCUBuf = (char *)((unsigned int)&v14->tMCUBuf[31] & 0xFFFFFFE0);
    v15 = IJL_Decode(v14);
    v54 = v15;
    if ( v15 )
    {
      if ( v15 == 1 )
      {
        v28 = v56;
        v29 = v56->jframe.max_hsampling * (8 * v56->roi.right + 8);
        v56->roi.right = v29;
        v30 = v28->JPGWidth;
        if ( v29 > v30 )
          v28->roi.right = v30;
        v31 = v28->jframe.max_vsampling * (8 * v28->roi.bottom + 8);
        v28->roi.bottom = v31;
        v32 = v28->JPGHeight;
        if ( v31 > v32 )
          v28->roi.bottom = v32;
      }
    }
    else
    {
      v16 = v56;
      if ( v56->SawAdobeMarker )
      {
        v17 = v56->iotype;
        if ( v56->iotype && v17 != 1 )
        {
          v19 = v56->DIBColor;
        }
        else
        {
          v18 = v56->JPGChannels;
          v56->DIBChannels = v18;
          if ( v18 == 1 )
            v16->JPGColor = 4;
          if ( v18 == 3 )
          {
            if ( v16->AdobeXform )
              v34 = 3;
            else
              v34 = 1;
            v16->JPGColor = v34;
          }
          if ( v18 == 4 )
          {
            if ( v16->AdobeXform )
              v33 = 6;
            else
              v33 = 5;
            v16->JPGColor = v33;
            v19 = 5;
            v16->DIBColor = 5;
          }
          else
          {
            v19 = v16->DIBColor;
          }
        }
      }
      else
      {
        v20 = v56->JPGChannels;
        if ( v20 == 1 )
          v56->JPGColor = 4;
        if ( v16->jfif_app0_detected )
        {
          if ( v20 == 3 )
          {
            v16->JPGColor = 3;
            v19 = v16->DIBColor;
            v17 = v16->iotype;
          }
          else
          {
            v19 = v16->DIBColor;
            v17 = v16->iotype;
          }
        }
        else
        {
          v19 = v16->DIBColor;
          v17 = v16->iotype;
        }
      }
      if ( v19 == 3 && v16->JPGColor == 3 )
        v16->DIBSubsampling = 2;
      if ( v17 == 4 || v17 == 6 || v17 == IJL_JFILE_READPARAMS || v17 == 18 || v17 == 16 || v17 == 14 || v17 == 20 )
      {
        v64 = ownSeekFile(v16->state.file, -((signed int)*v55 + v16->state.entropy_bytes_left), 1u);
        if ( !v64 )
        {
          v54 = -23;
          goto LABEL_77;
        }
        v16 = v56;
        v17 = v56->iotype;
      }
      if ( v17 == 1 || v17 == 21 )
        v16->state.start_entropy_ptr = v16->state.cur_entropy_ptr - (char *)*v55;
      a1->JPGWidth = v16->JPGWidth;
      a1->JPGHeight = v16->JPGHeight;
      a1->JPGChannels = v16->JPGChannels;
      a1->JPGThumbWidth = v16->JPGThumbWidth;
      a1->JPGThumbHeight = v16->JPGThumbHeight;
      a1->cconversion_reqd = v16->cconversion_reqd;
      a1->upsampling_reqd = v16->upsampling_reqd;
      v21 = 255;
      a1->JPGSubsampling = 255;
      v22 = v16->jframe.ncomps;
      switch ( v22 )
      {
        case 1:
          v21 = 0;
          a1->JPGSubsampling = 0;
          break;
        case 2:
          v40 = v16->jframe.comps;
          if ( v40->hsampling == 1 && v40->vsampling == 1 && v40[1].hsampling == 1 && v40[1].vsampling == 1 )
          {
            v21 = 0;
            a1->JPGSubsampling = 0;
          }
          break;
        case 3:
          v38 = v16->jframe.comps;
          v39 = v38->hsampling;
          if ( v39 != 1
            || v38->vsampling != 1
            || v38[1].hsampling != 1
            || v38[1].vsampling != 1
            || v38[2].hsampling != 1
            || v38[2].vsampling != 1 )
          {
            if ( v39 != 2
              || v38->vsampling != 2
              || v38[1].hsampling != 1
              || v38[1].vsampling != 1
              || v38[2].hsampling != 1
              || v38[2].vsampling != 1 )
            {
              if ( v39 == 2
                && v38->vsampling == 1
                && v38[1].hsampling == 1
                && v38[1].vsampling == 1
                && v38[2].hsampling == 1
                && v38[2].vsampling == 1 )
              {
                v21 = 2;
                a1->JPGSubsampling = 2;
              }
            }
            else
            {
              v21 = 1;
              a1->JPGSubsampling = 1;
            }
          }
          else
          {
            v21 = 0;
            a1->JPGSubsampling = 0;
          }
          break;
        case 4:
          v36 = v16->jframe.comps;
          v37 = v36->hsampling;
          if ( v37 != 1
            || v36->vsampling != 1
            || v36[1].hsampling != 1
            || v36[1].vsampling != 1
            || v36[2].hsampling != 1
            || v36[2].vsampling != 1
            || v36[3].hsampling != 1
            || v36[3].vsampling != 1 )
          {
            if ( v37 != 2
              || v36->vsampling != 2
              || v36[1].hsampling != 1
              || v36[1].vsampling != 1
              || v36[2].hsampling != 1
              || v36[2].vsampling != 1
              || v36[3].hsampling != 2
              || v36[3].vsampling != 2 )
            {
              if ( v37 == 2
                && v36->vsampling == 1
                && v36[1].hsampling == 1
                && v36[1].vsampling == 1
                && v36[2].hsampling == 1
                && v36[2].vsampling == 1
                && v36[3].hsampling == 2
                && v36[3].vsampling == 1 )
              {
                v21 = 4;
                a1->JPGSubsampling = 4;
              }
            }
            else
            {
              v21 = 3;
              a1->JPGSubsampling = 3;
            }
          }
          else
          {
            v21 = 0;
            a1->JPGSubsampling = 0;
          }
          break;
      }
      v16->JPGSubsampling = v21;
      a1->JPGColor = v16->JPGColor;
      a1->DIBColor = v16->DIBColor;
      a1->DIBChannels = v16->DIBChannels;
      v23 = v16->iotype;
      if ( v16->iotype == 2 || v23 == 4 || v23 == 6 )
      {
        v35 = v16->state.file;
        if ( v35 )
        {
          v64 = ownCloseFile(v35);
          if ( v64 )
            v56->state.file = 0;
          else
            v54 = -9;
        }
      }
    }
  }
LABEL_77:
  v55[6]();
  ms_exc.registration.TryLevel = -1;
  if ( v54 < 0 && a1->jprops.state.file )
  {
    ownCloseFile(a1->jprops.state.file);
    a1->jprops.state.file = 0;
  }
  return v54;
}

//----- (0075D7C0) --------------------------------------------------------
int __stdcall ijlWrite(struct _JPEG_CORE_PROPERTIES *a1, int a2)
{
  struct _JPEG_PROPERTIES *v2; // esi@2
  _IJLIOTYPE v3; // eax@2
  struct _JPEG_PROPERTIES *v5; // ecx@10
  _IJL_COLOR v6; // eax@10
  _IJL_COLOR v7; // eax@12
  int v8; // eax@16
  _IJL_JPGSUBSAMPLING v9; // eax@16
  struct _JPEG_CORE_PROPERTIES *v10; // eax@36
  int v11; // ebx@36
  _FRAME_COMPONENT *v12; // edx@37
  int v13; // eax@38
  int v14; // edi@38
  int v15; // edi@40
  signed int v16; // eax@46
  int v17; // esi@47
  int v18; // eax@47
  _IJLIOTYPE v19; // eax@48
  signed int v20; // eax@53
  void *v21; // eax@56
  int v22; // edx@61
  int v23; // eax@61
  int v24; // edx@63
  int v25; // eax@63
  int v26; // edx@67
  int v27; // eax@69
  int v28; // eax@70
  int v29; // eax@74
  _IJL_COLOR v30; // edi@77
  int v31; // ecx@77
  _IJL_COLOR v32; // eax@77
  _IJL_JPGSUBSAMPLING v33; // edx@77
  int v34; // eax@77
  int v35; // edi@77
  int v36; // edi@78
  int v37; // edx@95
  int v38; // eax@96
  signed int v39; // ebx@100
  HANDLE v40; // eax@105
  int v41; // [sp+0h] [bp-50h]@1
  HANDLE v42; // [sp+4h] [bp-4Ch]@1
  struct _JPEG_PROPERTIES *v43; // [sp+8h] [bp-48h]@1
  int v44; // [sp+Ch] [bp-44h]@1
  int i; // [sp+10h] [bp-40h]@36
  int v46; // [sp+14h] [bp-3Ch]@57
  _IJL_COLOR v47; // [sp+28h] [bp-28h]@36
  int v48; // [sp+2Ch] [bp-24h]@36
  struct _JPEG_CORE_PROPERTIES *v49; // [sp+30h] [bp-20h]@16
  int v50; // [sp+34h] [bp-1Ch]@16
  CPPEH_RECORD ms_exc; // [sp+38h] [bp-18h]@1

  ms_exc.old_esp = (DWORD)&v41;
  v41 = 0;
  v42 = 0;
  ms_exc.registration.TryLevel = 0;
  v43 = &a1->jprops;
  v44 = 0;
  v43->iotype = a2;
  v41 = CheckParameters(a1);
  if ( !v41 )
  {
    v2 = v43;
    v3 = v43->iotype;
    if ( (v43->iotype == 8 || v3 == 10 || v3 == 12) && !v43->state.file )
    {
      v40 = ownOpenFile(a1->JPGFile, 0xC0000000);
      v42 = v40;
      if ( !v40 )
      {
        v41 = -10;
        goto LABEL_8;
      }
      v2 = v43;
      v43->state.file = v40;
    }
    if ( !a1->UseJPEGPROPERTIES && !v2->jscan )
    {
      v2->JPGWidth = a1->JPGWidth;
      v2->JPGHeight = a1->JPGHeight;
      v2->JPGChannels = a1->JPGChannels;
      v30 = a1->JPGColor;
      v47 = v30;
      v2->JPGColor = v30;
      v2->JPGSubsampling = a1->JPGSubsampling;
      v2->JPGBytes = a1->JPGBytes;
      v2->JPGSizeBytes = a1->JPGSizeBytes;
      v2->JPGFile = a1->JPGFile;
      v2->DIBBytes = a1->DIBBytes;
      v2->DIBWidth = a1->DIBWidth;
      v31 = a1->DIBHeight;
      v2->DIBHeight = v31;
      v2->DIBPadBytes = a1->DIBPadBytes;
      v2->DIBChannels = a1->DIBChannels;
      v32 = a1->DIBColor;
      v48 = v32;
      v2->DIBColor = v32;
      v33 = a1->DIBSubsampling;
      v2->DIBSubsampling = v33;
      v34 = a1->DIBWidth;
      v35 = a1->DIBPadBytes;
      v49 = (struct _JPEG_CORE_PROPERTIES *)a1->DIBPadBytes;
      if ( v33 == 2 )
        v36 = v35 + 2 * v34;
      else
        v36 = (int)&v49->UseJPEGPROPERTIES + v34 * a1->DIBChannels;
      v2->DIBLineBytes = v36;
      if ( v31 < 0 )
        v2->DIBLineBytes = -v36;
      v2->cconversion_reqd = a1->cconversion_reqd;
      v2->upsampling_reqd = a1->upsampling_reqd;
      v2->jquality = a1->jquality;
      if ( v33 == 2 && v48 == 3 && v47 == 3 )
        v2->JPGSubsampling = 2;
    }
    v41 = SetDefaultTables((int)v2);
    if ( !v41 )
    {
      v5 = v43;
      v43->cconversion_reqd = 1;
      v6 = v5->JPGColor;
      if ( v6 == 1 || v6 == 5 || (v7 = v5->DIBColor, v7 == 4) || v7 == 255 || v7 == 3 )
        v5->cconversion_reqd = 0;
      v49 = a1;
      v8 = a1->JPGChannels;
      v50 = v8;
      v5->jframe.ncomps = v8;
      v9 = a1->JPGSubsampling;
      if ( v9 )
      {
        switch ( v9 )
        {
          case 1:
            v5->jframe.comps->ident = 0;
            v5->jframe.comps->hsampling = 2;
            v5->jframe.comps->vsampling = 2;
            v5->jframe.comps[1].ident = 1;
            v5->jframe.comps[1].hsampling = 1;
            v5->jframe.comps[1].vsampling = 1;
            v5->jframe.comps[2].ident = 2;
            v5->jframe.comps[2].hsampling = 1;
            v5->jframe.comps[2].vsampling = 1;
            if ( v5->use_external_qtables )
            {
              v50 = v5->jframe.ncomps;
            }
            else if ( v49->cconversion_reqd )
            {
              v5->jframe.comps->quant_sel = 0;
              v5->jframe.comps[1].quant_sel = 1;
              v5->jframe.comps[2].quant_sel = 1;
              v50 = v5->jframe.ncomps;
            }
            else
            {
              v5->jframe.comps->quant_sel = 0;
              v5->jframe.comps[1].quant_sel = 0;
              v5->jframe.comps[2].quant_sel = 0;
              v50 = v5->jframe.ncomps;
            }
            break;
          case 2:
            v5->jframe.comps->ident = 0;
            v5->jframe.comps->hsampling = 2;
            v5->jframe.comps->vsampling = 1;
            v5->jframe.comps[1].ident = 1;
            v5->jframe.comps[1].hsampling = 1;
            v5->jframe.comps[1].vsampling = 1;
            v5->jframe.comps[2].ident = 2;
            v5->jframe.comps[2].hsampling = 1;
            v5->jframe.comps[2].vsampling = 1;
            if ( v5->use_external_qtables )
            {
              v50 = v5->jframe.ncomps;
            }
            else if ( v49->cconversion_reqd )
            {
              v5->jframe.comps->quant_sel = 0;
              v5->jframe.comps[1].quant_sel = 1;
              v5->jframe.comps[2].quant_sel = 1;
              v50 = v5->jframe.ncomps;
            }
            else
            {
              v5->jframe.comps->quant_sel = 0;
              v5->jframe.comps[1].quant_sel = 0;
              v5->jframe.comps[2].quant_sel = 0;
              v50 = v5->jframe.ncomps;
            }
            break;
          case 3:
            v5->jframe.comps->ident = 0;
            v5->jframe.comps->hsampling = 2;
            v5->jframe.comps->vsampling = 2;
            v5->jframe.comps[1].ident = 1;
            v5->jframe.comps[1].hsampling = 1;
            v5->jframe.comps[1].vsampling = 1;
            v5->jframe.comps[2].ident = 2;
            v5->jframe.comps[2].hsampling = 1;
            v5->jframe.comps[2].vsampling = 1;
            v5->jframe.comps[3].ident = 3;
            v5->jframe.comps[3].hsampling = 2;
            v5->jframe.comps[3].vsampling = 2;
            if ( v5->use_external_qtables )
            {
              v50 = v5->jframe.ncomps;
            }
            else if ( v49->cconversion_reqd )
            {
              v5->jframe.comps->quant_sel = 0;
              v5->jframe.comps[1].quant_sel = 1;
              v5->jframe.comps[2].quant_sel = 1;
              v5->jframe.comps[3].quant_sel = 0;
              v50 = v5->jframe.ncomps;
            }
            else
            {
              v5->jframe.comps->quant_sel = 0;
              v5->jframe.comps[1].quant_sel = 0;
              v5->jframe.comps[2].quant_sel = 0;
              v5->jframe.comps[3].quant_sel = 0;
              v50 = v5->jframe.ncomps;
            }
            break;
          case 4:
            v5->jframe.comps->ident = 0;
            v5->jframe.comps->hsampling = 2;
            v5->jframe.comps->vsampling = 1;
            v5->jframe.comps[1].ident = 1;
            v5->jframe.comps[1].hsampling = 1;
            v5->jframe.comps[1].vsampling = 1;
            v5->jframe.comps[2].ident = 2;
            v5->jframe.comps[2].hsampling = 1;
            v5->jframe.comps[2].vsampling = 1;
            v5->jframe.comps[3].ident = 3;
            v5->jframe.comps[3].hsampling = 2;
            v5->jframe.comps[3].vsampling = 1;
            if ( v5->use_external_qtables )
            {
              v50 = v5->jframe.ncomps;
            }
            else if ( v49->cconversion_reqd )
            {
              v5->jframe.comps->quant_sel = 0;
              v5->jframe.comps[1].quant_sel = 1;
              v5->jframe.comps[2].quant_sel = 1;
              v5->jframe.comps[3].quant_sel = 0;
              v50 = v5->jframe.ncomps;
            }
            else
            {
              v5->jframe.comps->quant_sel = 0;
              v5->jframe.comps[1].quant_sel = 0;
              v5->jframe.comps[2].quant_sel = 0;
              v5->jframe.comps[3].quant_sel = 0;
              v50 = v5->jframe.ncomps;
            }
            break;
        }
      }
      else
      {
        v37 = 0;
        for ( i = 0; v37 < v50; v50 = v5->jframe.ncomps )
        {
          v38 = v37;
          v5->jframe.comps[v38].ident = v37;
          v5->jframe.comps[v38].hsampling = 1;
          v5->jframe.comps[v38].vsampling = 1;
          i = ++v37;
        }
        if ( !v5->use_external_qtables )
        {
          v5->jframe.comps->quant_sel = 0;
          if ( v5->cconversion_reqd )
          {
            v50 = v5->jframe.ncomps;
            if ( v50 >= 2 )
            {
              v39 = 1;
              for ( i = 1; v39 < v50; v50 = v5->jframe.ncomps )
              {
                v5->jframe.comps[v39++].quant_sel = 1;
                i = v39;
              }
            }
          }
          else
          {
            v50 = v5->jframe.ncomps;
          }
        }
      }
      v5->jframe.precision = 8;
      v10 = v49;
      v5->jframe.width = v49->JPGWidth;
      v5->jframe.height = v10->JPGHeight;
      v5->upsampling_reqd = 0;
      v48 = 0;
      v5->jframe.max_hsampling = 0;
      v47 = 0;
      v5->jframe.max_vsampling = 0;
      v11 = 0;
      i = 0;
      if ( v50 > 0 )
      {
        v12 = v5->jframe.comps;
        do
        {
          v13 = v11;
          v14 = v12[v11].hsampling;
          if ( v48 < v14 )
          {
            v48 = v12[v11].hsampling;
            v5->jframe.max_hsampling = v14;
          }
          v15 = v12[v13].vsampling;
          if ( v47 < v15 )
          {
            v47 = v12[v13].vsampling;
            v5->jframe.max_vsampling = v15;
          }
          if ( v12[v13].hsampling != 1 || v12[v13].vsampling != 1 )
            v5->upsampling_reqd = 1;
          i = ++v11;
        }
        while ( v11 < v50 );
      }
      if ( v5->jinterleaveType == 1 )
      {
        v16 = 8;
        v48 = 8;
        v5->jframe.MCUwidth = 8;
        v47 = 8;
        v5->jframe.MCUheight = 8;
      }
      else
      {
        v16 = 8 * v48;
        v48 = v16;
        v5->jframe.MCUwidth = v16;
        v47 *= 8;
        v5->jframe.MCUheight = v47;
      }
      v17 = (v16 + v5->JPGWidth - 1) / v16;
      v5->numxMCUs = v17;
      v18 = (v47 + v5->JPGHeight - 1) / v47;
      v5->numyMCUs = v18;
      v5->jframe.horMCU = v17;
      v5->jframe.totalMCU = v17 * v18;
      if ( v5->jscan )
      {
        v19 = v5->iotype;
      }
      else
      {
        v5->state.entropy_bytes_processed = 0;
        v27 = v49->DIBHeight;
        if ( v27 < 0 )
        {
          v28 = (int)&v5->DIBBytes[v5->DIBLineBytes * (v27 + 1)];
          v5->DIBBytes = (char *)v28;
        }
        else
        {
          v28 = (int)v5->DIBBytes;
        }
        v5->state.DIB_ptr = (char *)v28;
        v41 = Encode_Frame_Init(v5);
        if ( v41 )
          goto LABEL_8;
        v5 = v43;
        v19 = v43->iotype;
        if ( v43->iotype == 10 || v19 == 11 )
        {
          v29 = v43->state.entropy_bytes_processed;
          v43->JPGSizeBytes = v29;
          a1->JPGSizeBytes = v29;
          v19 = v5->iotype;
        }
      }
      if ( v19 == 8 || v19 == 9 || v19 == 12 || v19 == 13 )
      {
        v5->MCUBuf = (char *)((unsigned int)&v5->tMCUBuf[31] & 0xFFFFFFE0);
        if ( v5->progressive_found )
        {
          v20 = Encode_Frame_P(v5);
          v41 = v20;
        }
        else
        {
          v20 = Encode_Frame(v5);
          v41 = v20;
        }
        v5 = v43;
        v43->needframe = 1;
        v26 = v5->state.entropy_bytes_processed + v44;
        v44 = v26;
        v5->JPGSizeBytes = v26;
        a1->JPGSizeBytes = v26;
      }
      else
      {
        v20 = v41;
      }
      if ( v20 != 1 && v20 != 2 )
      {
        v21 = v5->state.file;
        if ( v21 )
        {
          v46 = ownCloseFile(v21);
          if ( !v46 )
          {
            v41 = -9;
            goto LABEL_8;
          }
          v43->state.file = 0;
        }
        ms_exc.registration.TryLevel = -1;
        goto LABEL_8;
      }
      v22 = v5->jframe.max_hsampling * (8 * v5->roi.right + 8);
      v5->roi.right = v22;
      v23 = v5->JPGWidth;
      if ( v22 > v23 )
        v5->roi.right = v23;
      v24 = v5->jframe.max_vsampling * (8 * v5->roi.bottom + 8);
      v5->roi.bottom = v24;
      v25 = v5->JPGHeight;
      if ( v24 > v25 )
        v5->roi.bottom = v25;
    }
  }
LABEL_8:
  if ( v41 < 0 && a1->jprops.state.file )
  {
    ownCloseFile(a1->jprops.state.file);
    a1->jprops.state.file = 0;
  }
  (*((void (**)(void))a1->jprops.state.ctx + 6))();
  return v41;
}

//----- (0075E1D0) --------------------------------------------------------
char *__stdcall ijlErrorStr(int a1)
{
  char *result; // eax@2

  if ( (unsigned int)(a1 + 99) > 0x65 )
    result = aUnknownErrorCo;
  else
    result = (char *)((int (__stdcall *)(int))*(&off_B671EC + a1))(a1);
  return result;
}
// B671EC: using guessed type void *off_B671EC;

//----- (0075E350) --------------------------------------------------------
HMODULE __cdecl sub_75E350(int a1)
{
  HMODULE result; // eax@1

  result = *(HMODULE *)(a1 + 4);
  if ( result || (result = LoadLibraryA(LibFileName), (*(_DWORD *)(a1 + 4) = result) != 0) )
  {
    result = (HMODULE)GetProcAddress(result, ProcName);
    *(_DWORD *)&NULLSTR[5732] = result;
    if ( result )
    {
      result = (HMODULE)GetProcAddress(*(HMODULE *)(a1 + 4), aPeekmessagea);
      *(_DWORD *)&NULLSTR[5728] = result;
      if ( result )
      {
        result = (HMODULE)GetProcAddress(*(HMODULE *)(a1 + 4), aPostquitmessag);
        *(_DWORD *)&NULLSTR[5724] = result;
        if ( result )
        {
          result = (HMODULE)GetProcAddress(*(HMODULE *)(a1 + 4), aWsprintfa);
          *(_DWORD *)&NULLSTR[5736] = result;
        }
      }
    }
  }
  return result;
}

//----- (0075E3D0) --------------------------------------------------------
int __cdecl sub_75E3D0(int a1)
{
  int result; // eax@4

  if ( a1 )
  {
    if ( *(_DWORD *)(a1 + 4) )
    {
      FreeLibrary(*(HMODULE *)(a1 + 4));
      *(_DWORD *)(a1 + 4) = 0;
    }
    result = 0;
    *(_DWORD *)&NULLSTR[5732] = 0;
    *(_DWORD *)&NULLSTR[5728] = 0;
    *(_DWORD *)&NULLSTR[5724] = 0;
    *(_DWORD *)&NULLSTR[5736] = 0;
  }
  return result;
}

//----- (0075E410) --------------------------------------------------------
HMODULE __cdecl sub_75E410(int a1)
{
  HMODULE result; // eax@1

  result = *(HMODULE *)(a1 + 8);
  if ( result || (result = LoadLibraryA(aAdvapi32), (*(_DWORD *)(a1 + 8) = result) != 0) )
  {
    result = (HMODULE)GetProcAddress(result, aRegopenkeyexa);
    *(_DWORD *)(a1 + 12) = result;
    if ( result )
    {
      result = (HMODULE)GetProcAddress(*(HMODULE *)(a1 + 8), aRegqueryvaluee);
      *(_DWORD *)(a1 + 16) = result;
      if ( result )
      {
        result = (HMODULE)GetProcAddress(*(HMODULE *)(a1 + 8), aRegclosekey);
        *(_DWORD *)(a1 + 20) = result;
      }
    }
  }
  return result;
}

//----- (0075E470) --------------------------------------------------------
int __cdecl sub_75E470(int a1)
{
  int result; // eax@4

  if ( a1 )
  {
    if ( *(_DWORD *)(a1 + 8) )
    {
      FreeLibrary(*(HMODULE *)(a1 + 8));
      *(_DWORD *)(a1 + 8) = 0;
    }
    result = 0;
    *(_DWORD *)(a1 + 12) = 0;
    *(_DWORD *)(a1 + 16) = 0;
    *(_DWORD *)(a1 + 20) = 0;
  }
  return result;
}

//----- (0075E4A0) --------------------------------------------------------
int (__cdecl *__cdecl sub_75E4A0(int a1))(int a1, int a2)
{
  int (__cdecl *result)(int, int); // eax@1

  *(_DWORD *)(a1 + 28) = fDCT8x8_AAN_M5;
  result = fQnt8x8_AAN_M5;
  *(_DWORD *)(a1 + 32) = fDCT8x8_IPP_M5;
  *(_DWORD *)(a1 + 252) = fQnt8x8_AAN_M5;
  *(_DWORD *)(a1 + 256) = fQnt8x8_IPP_M5;
  *(_DWORD *)(a1 + 260) = fQnt8x8_AAN_M5;
  *(_DWORD *)(a1 + 240) = EncodeHuffman8x8_M5;
  *(_DWORD *)(a1 + 244) = DecodeHuffman8x8_M5;
  *(_DWORD *)(a1 + 248) = Decode_Block_Skip_M5;
  *(_DWORD *)(a1 + 264) = iQnt8x8_AAN_PX;
  *(_DWORD *)(a1 + 268) = iQnt8x8_IPP_M5;
  *(_DWORD *)(a1 + 272) = iQnt8x8_AAN_PX;
  *(_DWORD *)(a1 + 36) = iDCT8x8_AAN_M5;
  *(_DWORD *)(a1 + 40) = iDCT4x4_AAN_PX;
  *(_DWORD *)(a1 + 44) = iDCT2x2_AAN_PX;
  *(_DWORD *)(a1 + 48) = iDCT1x1_AAN_PX;
  *(_DWORD *)(a1 + 52) = iDCT8x8_IPP_M5;
  *(_DWORD *)(a1 + 56) = iDCT4x4_IPP_PX;
  *(_DWORD *)(a1 + 60) = iDCT2x2_IPP_PX;
  *(_DWORD *)(a1 + 64) = iDCT1x1_IPP_PX;
  *(_DWORD *)(a1 + 68) = 0;
  *(_DWORD *)(a1 + 72) = 0;
  *(_DWORD *)(a1 + 76) = 0;
  *(_DWORD *)(a1 + 80) = 0;
  *(_DWORD *)(a1 + 84) = 0;
  *(_DWORD *)(a1 + 88) = EB_Init_M5;
  *(_DWORD *)(a1 + 92) = EB_Write_Bytes_M5;
  *(_DWORD *)(a1 + 96) = 0;
  *(_DWORD *)(a1 + 100) = Y_to_Y_111_Full_MCU_M5;
  *(_DWORD *)(a1 + 104) = RGB_to_YCbCr_111_Full_MCU_M5;
  *(_DWORD *)(a1 + 108) = RGB_to_YCbCr_422_Full_MCU_M5;
  *(_DWORD *)(a1 + 112) = RGB_to_YCbCr_411_Full_MCU_M5;
  *(_DWORD *)(a1 + 116) = BGR_to_YCbCr_111_Full_MCU_M5;
  *(_DWORD *)(a1 + 120) = BGR_to_YCbCr_422_Full_MCU_M5;
  *(_DWORD *)(a1 + 124) = BGR_to_YCbCr_411_Full_MCU_M5;
  *(_DWORD *)(a1 + 128) = OTHER_to_OTHER_111_Full_MCU;
  *(_DWORD *)(a1 + 132) = OTHER_to_OTHER_422_Full_MCU;
  *(_DWORD *)(a1 + 136) = OTHER_to_OTHER_411_Full_MCU;
  *(_DWORD *)(a1 + 140) = YCbYCr_to_YCbCr_422_Full_MCU_M5;
  *(_DWORD *)(a1 + 144) = RGBA_FPX_to_YCbCrA_FPX_1111_Full_MCU_M5;
  *(_DWORD *)(a1 + 148) = RGBA_FPX_to_YCbCrA_FPX_4224_Full_MCU_M5;
  *(_DWORD *)(a1 + 152) = RGBA_FPX_to_YCbCrA_FPX_4114_Full_MCU_M5;
  *(_DWORD *)(a1 + 156) = OTHER_to_OTHER_1111_Full_MCU;
  *(_DWORD *)(a1 + 160) = 0;
  *(_DWORD *)(a1 + 164) = Y_111_to_Y_Full_MCU_M5;
  *(_DWORD *)(a1 + 168) = YCbCr_111_to_RGB_Full_MCU_M5;
  *(_DWORD *)(a1 + 172) = YCbCr_422_to_RGB_Full_MCU_M5;
  *(_DWORD *)(a1 + 176) = YCbCr_411_to_RGB_Full_MCU_M5;
  *(_DWORD *)(a1 + 180) = YCbCr_111_to_BGR_Full_MCU_M5;
  *(_DWORD *)(a1 + 184) = YCbCr_422_to_BGR_Full_MCU_M5;
  *(_DWORD *)(a1 + 188) = YCbCr_411_to_BGR_Full_MCU_M5;
  *(_DWORD *)(a1 + 192) = YCbCr_111_to_RGBA_FPX_Full_MCU_M5;
  *(_DWORD *)(a1 + 196) = YCbCr_422_to_RGBA_FPX_Full_MCU_M5;
  *(_DWORD *)(a1 + 200) = YCbCr_411_to_RGBA_FPX_Full_MCU_M5;
  *(_DWORD *)(a1 + 204) = OTHER_111_to_OTHER_Full_MCU_PX;
  *(_DWORD *)(a1 + 208) = OTHER_422_to_OTHER_Full_MCU_PX;
  *(_DWORD *)(a1 + 212) = OTHER_411_to_OTHER_Full_MCU_PX;
  *(_DWORD *)(a1 + 216) = OTHER_111_to_OTHER4_Full_MCU_PX;
  *(_DWORD *)(a1 + 220) = YCbCr_422_to_YCbYCr_Full_MCU_M5;
  *(_DWORD *)(a1 + 224) = YCbCrA_FPX_1111_to_RGBA_FPX_Full_MCU_M5;
  *(_DWORD *)(a1 + 228) = YCbCrA_FPX_4224_to_RGBA_FPX_Full_MCU_M5;
  *(_DWORD *)(a1 + 232) = YCbCrA_FPX_4114_to_RGBA_FPX_Full_MCU_M5;
  *(_DWORD *)(a1 + 236) = OTHER_1111_to_OTHER_Full_MCU_PX;
  *(_DWORD *)(a1 + 24) = ownEMMSh;
  return result;
}

//----- (0075E6D0) --------------------------------------------------------
signed int (__cdecl *__cdecl sub_75E6D0(int a1))(int a1, int a2)
{
  signed int (__cdecl *result)(int, int); // eax@1

  *(_DWORD *)(a1 + 28) = fDCT8x8_AAN_PX;
  result = fQnt8x8_AAN_PX;
  *(_DWORD *)(a1 + 32) = fDCT8x8_IPP_PX;
  *(_DWORD *)(a1 + 252) = fQnt8x8_AAN_PX;
  *(_DWORD *)(a1 + 256) = fQnt8x8_IPP_PX;
  *(_DWORD *)(a1 + 260) = fQnt8x8_AAN_PX;
  *(_DWORD *)(a1 + 240) = EncodeHuffman8x8_PX;
  *(_DWORD *)(a1 + 244) = DecodeHuffman8x8_PX;
  *(_DWORD *)(a1 + 248) = Decode_Block_Thumb_PX;
  *(_DWORD *)(a1 + 264) = iQnt8x8_AAN_PX;
  *(_DWORD *)(a1 + 268) = iQnt8x8_IPP_PX;
  *(_DWORD *)(a1 + 272) = iQnt8x8_AAN_PX;
  *(_DWORD *)(a1 + 36) = iDCT8x8_AAN_PX;
  *(_DWORD *)(a1 + 40) = iDCT4x4_AAN_PX;
  *(_DWORD *)(a1 + 44) = iDCT2x2_AAN_PX;
  *(_DWORD *)(a1 + 48) = iDCT1x1_AAN_PX;
  *(_DWORD *)(a1 + 52) = iDCT8x8_IPP_PX;
  *(_DWORD *)(a1 + 56) = iDCT4x4_IPP_PX;
  *(_DWORD *)(a1 + 60) = iDCT2x2_IPP_PX;
  *(_DWORD *)(a1 + 64) = iDCT1x1_IPP_PX;
  *(_DWORD *)(a1 + 68) = 0;
  *(_DWORD *)(a1 + 72) = 0;
  *(_DWORD *)(a1 + 76) = 0;
  *(_DWORD *)(a1 + 80) = 0;
  *(_DWORD *)(a1 + 84) = 0;
  *(_DWORD *)(a1 + 88) = EB_Init_PX;
  *(_DWORD *)(a1 + 92) = EB_Write_Bytes_PX;
  *(_DWORD *)(a1 + 96) = 0;
  *(_DWORD *)(a1 + 100) = Y_to_Y_111_Full_MCU_PX;
  *(_DWORD *)(a1 + 104) = RGB_to_YCbCr_111_Full_MCU_PX;
  *(_DWORD *)(a1 + 108) = RGB_to_YCbCr_422_Full_MCU_PX;
  *(_DWORD *)(a1 + 112) = RGB_to_YCbCr_411_Full_MCU_PX;
  *(_DWORD *)(a1 + 116) = BGR_to_YCbCr_111_Full_MCU_PX;
  *(_DWORD *)(a1 + 120) = BGR_to_YCbCr_422_Full_MCU_PX;
  *(_DWORD *)(a1 + 124) = BGR_to_YCbCr_411_Full_MCU_PX;
  *(_DWORD *)(a1 + 128) = OTHER_to_OTHER_111_Full_MCU;
  *(_DWORD *)(a1 + 132) = OTHER_to_OTHER_422_Full_MCU;
  *(_DWORD *)(a1 + 136) = OTHER_to_OTHER_411_Full_MCU;
  *(_DWORD *)(a1 + 140) = YCbYCr_to_YCbCr_422_Full_MCU_PX;
  *(_DWORD *)(a1 + 144) = RGBA_FPX_to_YCbCrA_FPX_1111_Full_MCU_PX;
  *(_DWORD *)(a1 + 148) = RGBA_FPX_to_YCbCrA_FPX_4224_Full_MCU_PX;
  *(_DWORD *)(a1 + 152) = RGBA_FPX_to_YCbCrA_FPX_4114_Full_MCU_PX;
  *(_DWORD *)(a1 + 156) = OTHER_to_OTHER_1111_Full_MCU;
  *(_DWORD *)(a1 + 160) = 0;
  *(_DWORD *)(a1 + 164) = Y_111_to_Y_Full_MCU_PX;
  *(_DWORD *)(a1 + 168) = YCbCr_111_to_RGB_Full_MCU_PX;
  *(_DWORD *)(a1 + 172) = YCbCr_422_to_RGB_Full_MCU_PX;
  *(_DWORD *)(a1 + 176) = YCbCr_411_to_RGB_Full_MCU_PX;
  *(_DWORD *)(a1 + 180) = YCbCr_111_to_BGR_Full_MCU_PX;
  *(_DWORD *)(a1 + 184) = YCbCr_422_to_BGR_Full_MCU_PX;
  *(_DWORD *)(a1 + 188) = YCbCr_411_to_BGR_Full_MCU_PX;
  *(_DWORD *)(a1 + 192) = YCbCr_111_to_RGBA_FPX_Full_MCU_PX;
  *(_DWORD *)(a1 + 196) = YCbCr_422_to_RGBA_FPX_Full_MCU_PX;
  *(_DWORD *)(a1 + 200) = YCbCr_411_to_RGBA_FPX_Full_MCU_PX;
  *(_DWORD *)(a1 + 204) = OTHER_111_to_OTHER_Full_MCU_PX;
  *(_DWORD *)(a1 + 208) = OTHER_422_to_OTHER_Full_MCU_PX;
  *(_DWORD *)(a1 + 212) = OTHER_411_to_OTHER_Full_MCU_PX;
  *(_DWORD *)(a1 + 216) = OTHER_111_to_OTHER4_Full_MCU_PX;
  *(_DWORD *)(a1 + 220) = YCbCr_422_to_YCbYCr_Full_MCU_PX;
  *(_DWORD *)(a1 + 224) = YCbCrA_FPX_1111_to_RGBA_FPX_Full_MCU_PX;
  *(_DWORD *)(a1 + 228) = YCbCrA_FPX_4224_to_RGBA_FPX_Full_MCU_PX;
  *(_DWORD *)(a1 + 232) = YCbCrA_FPX_4114_to_RGBA_FPX_Full_MCU_PX;
  *(_DWORD *)(a1 + 236) = OTHER_1111_to_OTHER_Full_MCU_PX;
  *(_DWORD *)(a1 + 24) = ownEMMSs;
  return result;
}
// 75F130: using guessed type int ownEMMSs();

//----- (0075E900) --------------------------------------------------------
int (__cdecl *__cdecl sub_75E900(int a1))(int a1, int a2)
{
  int (__cdecl *result)(int, int); // eax@1

  *(_DWORD *)(a1 + 28) = fDCT8x8_AAN_M5;
  result = fQnt8x8_AAN_M5;
  *(_DWORD *)(a1 + 32) = fDCT8x8_IPP_M5;
  *(_DWORD *)(a1 + 252) = fQnt8x8_AAN_M5;
  *(_DWORD *)(a1 + 256) = fQnt8x8_IPP_M5;
  *(_DWORD *)(a1 + 260) = fQnt8x8_AAN_M5;
  *(_DWORD *)(a1 + 240) = EncodeHuffman8x8_M5;
  *(_DWORD *)(a1 + 244) = DecodeHuffman8x8_M6;
  *(_DWORD *)(a1 + 248) = Decode_Block_Skip_M5;
  *(_DWORD *)(a1 + 264) = iQnt8x8_AAN_PX;
  *(_DWORD *)(a1 + 268) = iQnt8x8_IPP_M5;
  *(_DWORD *)(a1 + 272) = iQnt8x8_AAN_PX;
  *(_DWORD *)(a1 + 36) = iDCT8x8_AAN_M5;
  *(_DWORD *)(a1 + 40) = iDCT4x4_AAN_PX;
  *(_DWORD *)(a1 + 44) = iDCT2x2_AAN_PX;
  *(_DWORD *)(a1 + 48) = iDCT1x1_AAN_PX;
  *(_DWORD *)(a1 + 52) = iDCT8x8_IPP_M5;
  *(_DWORD *)(a1 + 56) = iDCT4x4_IPP_PX;
  *(_DWORD *)(a1 + 60) = iDCT2x2_IPP_PX;
  *(_DWORD *)(a1 + 64) = iDCT1x1_IPP_PX;
  *(_DWORD *)(a1 + 68) = 0;
  *(_DWORD *)(a1 + 72) = 0;
  *(_DWORD *)(a1 + 76) = 0;
  *(_DWORD *)(a1 + 80) = 0;
  *(_DWORD *)(a1 + 84) = 0;
  *(_DWORD *)(a1 + 88) = EB_Init_M5;
  *(_DWORD *)(a1 + 92) = EB_Write_Bytes_M5;
  *(_DWORD *)(a1 + 96) = 0;
  *(_DWORD *)(a1 + 100) = Y_to_Y_111_Full_MCU_M5;
  *(_DWORD *)(a1 + 104) = RGB_to_YCbCr_111_Full_MCU_M5;
  *(_DWORD *)(a1 + 108) = RGB_to_YCbCr_422_Full_MCU_M5;
  *(_DWORD *)(a1 + 112) = RGB_to_YCbCr_411_Full_MCU_M5;
  *(_DWORD *)(a1 + 116) = BGR_to_YCbCr_111_Full_MCU_M5;
  *(_DWORD *)(a1 + 120) = BGR_to_YCbCr_422_Full_MCU_M5;
  *(_DWORD *)(a1 + 124) = BGR_to_YCbCr_411_Full_MCU_M5;
  *(_DWORD *)(a1 + 128) = OTHER_to_OTHER_111_Full_MCU;
  *(_DWORD *)(a1 + 132) = OTHER_to_OTHER_422_Full_MCU;
  *(_DWORD *)(a1 + 136) = OTHER_to_OTHER_411_Full_MCU;
  *(_DWORD *)(a1 + 140) = YCbYCr_to_YCbCr_422_Full_MCU_M5;
  *(_DWORD *)(a1 + 144) = RGBA_FPX_to_YCbCrA_FPX_1111_Full_MCU_M5;
  *(_DWORD *)(a1 + 148) = RGBA_FPX_to_YCbCrA_FPX_4224_Full_MCU_M5;
  *(_DWORD *)(a1 + 152) = RGBA_FPX_to_YCbCrA_FPX_4114_Full_MCU_M5;
  *(_DWORD *)(a1 + 156) = OTHER_to_OTHER_1111_Full_MCU;
  *(_DWORD *)(a1 + 160) = 0;
  *(_DWORD *)(a1 + 164) = Y_111_to_Y_Full_MCU_M5;
  *(_DWORD *)(a1 + 168) = YCbCr_111_to_RGB_Full_MCU_M5;
  *(_DWORD *)(a1 + 172) = YCbCr_422_to_RGB_Full_MCU_M5;
  *(_DWORD *)(a1 + 176) = YCbCr_411_to_RGB_Full_MCU_M5;
  *(_DWORD *)(a1 + 180) = YCbCr_111_to_BGR_Full_MCU_M5;
  *(_DWORD *)(a1 + 184) = YCbCr_422_to_BGR_Full_MCU_M5;
  *(_DWORD *)(a1 + 188) = YCbCr_411_to_BGR_Full_MCU_M5;
  *(_DWORD *)(a1 + 192) = YCbCr_111_to_RGBA_FPX_Full_MCU_M5;
  *(_DWORD *)(a1 + 196) = YCbCr_422_to_RGBA_FPX_Full_MCU_M5;
  *(_DWORD *)(a1 + 200) = YCbCr_411_to_RGBA_FPX_Full_MCU_M5;
  *(_DWORD *)(a1 + 204) = OTHER_111_to_OTHER_Full_MCU_PX;
  *(_DWORD *)(a1 + 208) = OTHER_422_to_OTHER_Full_MCU_PX;
  *(_DWORD *)(a1 + 212) = OTHER_411_to_OTHER_Full_MCU_PX;
  *(_DWORD *)(a1 + 216) = OTHER_111_to_OTHER4_Full_MCU_PX;
  *(_DWORD *)(a1 + 220) = YCbCr_422_to_YCbYCr_Full_MCU_M5;
  *(_DWORD *)(a1 + 224) = YCbCrA_FPX_1111_to_RGBA_FPX_Full_MCU_M5;
  *(_DWORD *)(a1 + 228) = YCbCrA_FPX_4224_to_RGBA_FPX_Full_MCU_M5;
  *(_DWORD *)(a1 + 232) = YCbCrA_FPX_4114_to_RGBA_FPX_Full_MCU_M5;
  *(_DWORD *)(a1 + 236) = OTHER_1111_to_OTHER_Full_MCU_PX;
  *(_DWORD *)(a1 + 24) = ownEMMSh;
  return result;
}

//----- (0075EB30) --------------------------------------------------------
int (__cdecl *__cdecl sub_75EB30(int a1))(int a1, int a2)
{
  int (__cdecl *result)(int, int); // eax@1

  *(_DWORD *)(a1 + 28) = fDCT8x8_AAN_M5;
  result = fQnt8x8_AAN_M5;
  *(_DWORD *)(a1 + 32) = fDCT8x8_IPP_A6;
  *(_DWORD *)(a1 + 252) = fQnt8x8_AAN_M5;
  *(_DWORD *)(a1 + 256) = fQnt8x8_IPP_A6;
  *(_DWORD *)(a1 + 260) = fQnt8x8_AAN_M5;
  *(_DWORD *)(a1 + 240) = EncodeHuffman8x8_A6;
  *(_DWORD *)(a1 + 244) = DecodeHuffman8x8_M6;
  *(_DWORD *)(a1 + 248) = Decode_Block_Skip_M5;
  *(_DWORD *)(a1 + 264) = iQnt8x8_AAN_PX;
  *(_DWORD *)(a1 + 268) = iQnt8x8_IPP_M5;
  *(_DWORD *)(a1 + 272) = iQnt8x8_AAN_PX;
  *(_DWORD *)(a1 + 36) = iDCT8x8_AAN_M5;
  *(_DWORD *)(a1 + 40) = iDCT4x4_AAN_PX;
  *(_DWORD *)(a1 + 44) = iDCT2x2_AAN_PX;
  *(_DWORD *)(a1 + 48) = iDCT1x1_AAN_PX;
  *(_DWORD *)(a1 + 52) = iDCT8x8_IPP_A6;
  *(_DWORD *)(a1 + 56) = iDCT4x4_IPP_PX;
  *(_DWORD *)(a1 + 60) = iDCT2x2_IPP_PX;
  *(_DWORD *)(a1 + 64) = iDCT1x1_IPP_PX;
  *(_DWORD *)(a1 + 68) = 0;
  *(_DWORD *)(a1 + 72) = 0;
  *(_DWORD *)(a1 + 76) = 0;
  *(_DWORD *)(a1 + 80) = 0;
  *(_DWORD *)(a1 + 84) = 0;
  *(_DWORD *)(a1 + 88) = EB_Init_M5;
  *(_DWORD *)(a1 + 92) = EB_Write_Bytes_M5;
  *(_DWORD *)(a1 + 96) = 0;
  *(_DWORD *)(a1 + 100) = Y_to_Y_111_Full_MCU_M5;
  *(_DWORD *)(a1 + 104) = RGB_to_YCbCr_111_Full_MCU_M5;
  *(_DWORD *)(a1 + 108) = RGB_to_YCbCr_422_Full_MCU_M5;
  *(_DWORD *)(a1 + 112) = RGB_to_YCbCr_411_Full_MCU_M5;
  *(_DWORD *)(a1 + 116) = BGR_to_YCbCr_111_Full_MCU_M5;
  *(_DWORD *)(a1 + 120) = BGR_to_YCbCr_422_Full_MCU_M5;
  *(_DWORD *)(a1 + 124) = BGR_to_YCbCr_411_Full_MCU_M5;
  *(_DWORD *)(a1 + 128) = OTHER_to_OTHER_111_Full_MCU;
  *(_DWORD *)(a1 + 132) = OTHER_to_OTHER_422_Full_MCU;
  *(_DWORD *)(a1 + 136) = OTHER_to_OTHER_411_Full_MCU;
  *(_DWORD *)(a1 + 140) = YCbYCr_to_YCbCr_422_Full_MCU_A6;
  *(_DWORD *)(a1 + 144) = RGBA_FPX_to_YCbCrA_FPX_1111_Full_MCU_M5;
  *(_DWORD *)(a1 + 148) = RGBA_FPX_to_YCbCrA_FPX_4224_Full_MCU_M5;
  *(_DWORD *)(a1 + 152) = RGBA_FPX_to_YCbCrA_FPX_4114_Full_MCU_M5;
  *(_DWORD *)(a1 + 156) = OTHER_to_OTHER_1111_Full_MCU;
  *(_DWORD *)(a1 + 160) = 0;
  *(_DWORD *)(a1 + 164) = Y_111_to_Y_Full_MCU_M5;
  *(_DWORD *)(a1 + 168) = YCbCr_111_to_RGB_Full_MCU_M5;
  *(_DWORD *)(a1 + 172) = YCbCr_422_to_RGB_Full_MCU_A6;
  *(_DWORD *)(a1 + 176) = YCbCr_411_to_RGB_Full_MCU_M5;
  *(_DWORD *)(a1 + 180) = YCbCr_111_to_BGR_Full_MCU_M5;
  *(_DWORD *)(a1 + 184) = YCbCr_422_to_BGR_Full_MCU_A6;
  *(_DWORD *)(a1 + 188) = YCbCr_411_to_BGR_Full_MCU_M5;
  *(_DWORD *)(a1 + 192) = YCbCr_111_to_RGBA_FPX_Full_MCU_M5;
  *(_DWORD *)(a1 + 196) = YCbCr_422_to_RGBA_FPX_Full_MCU_M5;
  *(_DWORD *)(a1 + 200) = YCbCr_411_to_RGBA_FPX_Full_MCU_M5;
  *(_DWORD *)(a1 + 204) = OTHER_111_to_OTHER_Full_MCU_PX;
  *(_DWORD *)(a1 + 208) = OTHER_422_to_OTHER_Full_MCU_PX;
  *(_DWORD *)(a1 + 212) = OTHER_411_to_OTHER_Full_MCU_PX;
  *(_DWORD *)(a1 + 216) = OTHER_111_to_OTHER4_Full_MCU_PX;
  *(_DWORD *)(a1 + 220) = YCbCr_422_to_YCbYCr_Full_MCU_M5;
  *(_DWORD *)(a1 + 224) = YCbCrA_FPX_1111_to_RGBA_FPX_Full_MCU_M5;
  *(_DWORD *)(a1 + 228) = YCbCrA_FPX_4224_to_RGBA_FPX_Full_MCU_M5;
  *(_DWORD *)(a1 + 232) = YCbCrA_FPX_4114_to_RGBA_FPX_Full_MCU_M5;
  *(_DWORD *)(a1 + 236) = OTHER_1111_to_OTHER_Full_MCU_PX;
  *(_DWORD *)(a1 + 24) = ownEMMSh;
  return result;
}

//----- (0075ED60) --------------------------------------------------------
int (__cdecl *__cdecl sub_75ED60(int a1))(int a1, int a2)
{
  int (__cdecl *result)(int, int); // eax@1

  *(_DWORD *)(a1 + 28) = fDCT8x8_AAN_M5;
  result = fQnt8x8_AAN_M5;
  *(_DWORD *)(a1 + 32) = fDCT8x8_IPP_W7;
  *(_DWORD *)(a1 + 252) = fQnt8x8_AAN_M5;
  *(_DWORD *)(a1 + 256) = fQnt8x8_IPP_W7;
  *(_DWORD *)(a1 + 260) = fQnt8x8_AAN_M5;
  *(_DWORD *)(a1 + 240) = EncodeHuffman8x8_M5;
  *(_DWORD *)(a1 + 244) = DecodeHuffman8x8_M6;
  *(_DWORD *)(a1 + 248) = Decode_Block_Skip_M5;
  *(_DWORD *)(a1 + 264) = iQnt8x8_AAN_PX;
  *(_DWORD *)(a1 + 268) = iQnt8x8_IPP_W7;
  *(_DWORD *)(a1 + 272) = iQnt8x8_AAN_PX;
  *(_DWORD *)(a1 + 36) = iDCT8x8_AAN_M5;
  *(_DWORD *)(a1 + 40) = iDCT4x4_AAN_PX;
  *(_DWORD *)(a1 + 44) = iDCT2x2_AAN_PX;
  *(_DWORD *)(a1 + 48) = iDCT1x1_AAN_PX;
  *(_DWORD *)(a1 + 52) = iDCT8x8_IPP_W7;
  *(_DWORD *)(a1 + 56) = iDCT4x4_IPP_PX;
  *(_DWORD *)(a1 + 60) = iDCT2x2_IPP_PX;
  *(_DWORD *)(a1 + 64) = iDCT1x1_IPP_PX;
  *(_DWORD *)(a1 + 68) = 0;
  *(_DWORD *)(a1 + 72) = 0;
  *(_DWORD *)(a1 + 76) = 0;
  *(_DWORD *)(a1 + 80) = 0;
  *(_DWORD *)(a1 + 84) = 0;
  *(_DWORD *)(a1 + 88) = EB_Init_M5;
  *(_DWORD *)(a1 + 92) = EB_Write_Bytes_M5;
  *(_DWORD *)(a1 + 96) = 0;
  *(_DWORD *)(a1 + 100) = Y_to_Y_111_Full_MCU_M5;
  *(_DWORD *)(a1 + 104) = RGB_to_YCbCr_111_Full_MCU_M5;
  *(_DWORD *)(a1 + 108) = RGB_to_YCbCr_422_Full_MCU_M5;
  *(_DWORD *)(a1 + 112) = RGB_to_YCbCr_411_Full_MCU_M5;
  *(_DWORD *)(a1 + 116) = BGR_to_YCbCr_111_Full_MCU_M5;
  *(_DWORD *)(a1 + 120) = BGR_to_YCbCr_422_Full_MCU_M5;
  *(_DWORD *)(a1 + 124) = BGR_to_YCbCr_411_Full_MCU_M5;
  *(_DWORD *)(a1 + 128) = OTHER_to_OTHER_111_Full_MCU;
  *(_DWORD *)(a1 + 132) = OTHER_to_OTHER_422_Full_MCU;
  *(_DWORD *)(a1 + 136) = OTHER_to_OTHER_411_Full_MCU;
  *(_DWORD *)(a1 + 140) = YCbYCr_to_YCbCr_422_Full_MCU_A6;
  *(_DWORD *)(a1 + 144) = RGBA_FPX_to_YCbCrA_FPX_1111_Full_MCU_M5;
  *(_DWORD *)(a1 + 148) = RGBA_FPX_to_YCbCrA_FPX_4224_Full_MCU_M5;
  *(_DWORD *)(a1 + 152) = RGBA_FPX_to_YCbCrA_FPX_4114_Full_MCU_M5;
  *(_DWORD *)(a1 + 156) = OTHER_to_OTHER_1111_Full_MCU;
  *(_DWORD *)(a1 + 160) = 0;
  *(_DWORD *)(a1 + 164) = Y_111_to_Y_Full_MCU_M5;
  *(_DWORD *)(a1 + 168) = YCbCr_111_to_RGB_Full_MCU_M5;
  *(_DWORD *)(a1 + 172) = YCbCr_422_to_RGB_Full_MCU_A6;
  *(_DWORD *)(a1 + 176) = YCbCr_411_to_RGB_Full_MCU_M5;
  *(_DWORD *)(a1 + 180) = YCbCr_111_to_BGR_Full_MCU_M5;
  *(_DWORD *)(a1 + 184) = YCbCr_422_to_BGR_Full_MCU_A6;
  *(_DWORD *)(a1 + 188) = YCbCr_411_to_BGR_Full_MCU_M5;
  *(_DWORD *)(a1 + 192) = YCbCr_111_to_RGBA_FPX_Full_MCU_M5;
  *(_DWORD *)(a1 + 196) = YCbCr_422_to_RGBA_FPX_Full_MCU_M5;
  *(_DWORD *)(a1 + 200) = YCbCr_411_to_RGBA_FPX_Full_MCU_M5;
  *(_DWORD *)(a1 + 204) = OTHER_111_to_OTHER_Full_MCU_PX;
  *(_DWORD *)(a1 + 208) = OTHER_422_to_OTHER_Full_MCU_PX;
  *(_DWORD *)(a1 + 212) = OTHER_411_to_OTHER_Full_MCU_PX;
  *(_DWORD *)(a1 + 216) = OTHER_111_to_OTHER4_Full_MCU_PX;
  *(_DWORD *)(a1 + 220) = YCbCr_422_to_YCbYCr_Full_MCU_M5;
  *(_DWORD *)(a1 + 224) = YCbCrA_FPX_1111_to_RGBA_FPX_Full_MCU_M5;
  *(_DWORD *)(a1 + 228) = YCbCrA_FPX_4224_to_RGBA_FPX_Full_MCU_M5;
  *(_DWORD *)(a1 + 232) = YCbCrA_FPX_4114_to_RGBA_FPX_Full_MCU_M5;
  *(_DWORD *)(a1 + 236) = OTHER_1111_to_OTHER_Full_MCU_PX;
  *(_DWORD *)(a1 + 24) = ownEMMSh;
  return result;
}

//----- (0075EF90) --------------------------------------------------------
signed int __cdecl ownQueryProcessorType(int a1)
{
  signed int v1; // ecx@1
  int (__stdcall *v2)(signed int, const char *const , _DWORD, signed int, int *); // eax@1
  int v4; // [sp+24h] [bp-1Ch]@4
  int v5; // [sp+28h] [bp-18h]@4
  int v6; // [sp+2Ch] [bp-14h]@4
  int v7; // [sp+30h] [bp-10h]@4

  v1 = -1;
  v2 = *(int (__stdcall **)(signed int, const char *const , _DWORD, signed int, int *))(a1 + 12);
  if ( v2 && *(_DWORD *)(a1 + 16) && *(_DWORD *)(a1 + 20) )
  {
    v4 = 4;
    v5 = 4;
    v6 = 0;
    v7 = -1;
    if ( !v2(-2147483646, ijlkey, 0, 1, &v6) )
      (*(void (__stdcall **)(int, char *, _DWORD, int *, int *, int *))(a1 + 16))(v6, usecpu, 0, &v4, &v7, &v5);
    if ( v6 )
    {
      (*(void (__stdcall **)(int))(a1 + 20))(v6);
      v1 = v7;
    }
    else
    {
      v1 = v7;
    }
  }
  return v1;
}
// A78F20: using guessed type const char *const ijlkey;
// A78F24: using guessed type char *usecpu;

//----- (0075F030) --------------------------------------------------------
int __cdecl ownInitializeLibrary(struct _IJL_CONTEXT *a1)
{
  signed int v1; // ebx@1
  struct IJL_PROCESSOR_INFO *v2; // eax@1
  int v3; // edx@1

  sub_75E350((int)a1);
  sub_75E410((int)a1);
  v1 = ownGetProcessorType(a1);
  v2 = ownGetProcessorInfo();
  *(_DWORD *)&NULLSTR[5720] = sub_75E320;
  v3 = *((_DWORD *)v2 + 5);
  *(_DWORD *)&NULLSTR[5716] = sub_75E340;
  if ( v3 & 0x10 )
    *(_DWORD *)&NULLSTR[5712] = ownRDTSCh;
  else
    *(_DWORD *)&NULLSTR[5712] = ownRDTSCs;
  switch ( v1 )
  {
    case 1:
      sub_75E6D0((int)a1);
      break;
    case 2:
      sub_75E6D0((int)a1);
      break;
    case 3:
      sub_75E4A0((int)a1);
      break;
    case 4:
      sub_75E900((int)a1);
      break;
    case 5:
      sub_75EB30((int)a1);
      break;
    case 6:
      sub_75ED60((int)a1);
      break;
    default:
      sub_75E6D0((int)a1);
      break;
  }
  return 1;
}
// 75E320: using guessed type int sub_75E320();
// 75E340: using guessed type int sub_75E340();
// B60724: using guessed type int (__cdecl *)(_DWORD, _DWORD);
// B60728: using guessed type int (__cdecl *)(_DWORD, _DWORD, _DWORD);

//----- (0075F100) --------------------------------------------------------
int __cdecl ownFreeLibrary(int a1)
{
  sub_75E3D0(a1);
  return sub_75E470(a1);
}

//----- (0075F120) --------------------------------------------------------
__int64 ownRDTSCs()
{
  return 0i64;
}

//----- (0075F140) --------------------------------------------------------
int sub_75F140()
{
  int v1; // [sp+0h] [bp-30h]@1
  CPPEH_RECORD ms_exc; // [sp+18h] [bp-18h]@1

  ms_exc.old_esp = (DWORD)&v1;
  ms_exc.registration.TryLevel = 0;
  NULLSTR[5768] = 32;
  NULLSTR[5769] = 32;
  NULLSTR[5770] = 32;
  NULLSTR[5771] = 32;
  NULLSTR[5772] = 32;
  NULLSTR[5773] = 32;
  NULLSTR[5774] = 32;
  NULLSTR[5775] = 32;
  NULLSTR[5776] = 32;
  NULLSTR[5777] = 32;
  NULLSTR[5778] = 32;
  NULLSTR[5779] = 32;
  v1 = 12;
  NULLSTR[5780] = 0;
  *(_DWORD *)&NULLSTR[5744] = 0;
  *(_DWORD *)&NULLSTR[5748] = 0;
  *(_DWORD *)&NULLSTR[5752] = 0;
  *(_DWORD *)&NULLSTR[5756] = 0;
  *(_DWORD *)&NULLSTR[5760] = 0;
  *(_DWORD *)&NULLSTR[5764] = 0;
  return own_detect_processor_ia32(11929408);
}

//----- (0075F2A0) --------------------------------------------------------
struct IJL_PROCESSOR_INFO *__cdecl ownGetProcessorInfo()
{
  return (struct IJL_PROCESSOR_INFO *)(NULLSTR + 5744);
}

//----- (0075F2B0) --------------------------------------------------------
signed int __cdecl ownGetProcessorType(struct _IJL_CONTEXT *a1)
{
  signed int result; // eax@1
  struct IJL_PROCESSOR_INFO *v2; // eax@8
  int v3; // edx@8
  int v4; // eax@10

  sub_75F140();
  result = ownQueryProcessorType((int)a1);
  if ( result && result != 1 && result != 2 && result != 3 && result != 4 && result != 5 && result != 6 )
  {
    v2 = ownGetProcessorInfo();
    v3 = *((_DWORD *)v2 + 2);
    switch ( v3 )
    {
      case 5:
        if ( (unsigned int)&loc_800000 & *((_DWORD *)v2 + 5) )
          result = 3;
        else
          result = 1;
        break;
      case 6:
        v4 = *((_DWORD *)v2 + 5);
        if ( !((unsigned int)&loc_800000 & v4) || v4 & 0x2000000 )
        {
          if ( (v4 & 0x2800000) == 41943040 )
            result = 5;
          else
            result = 2;
        }
        else
        {
          result = 4;
        }
        break;
      case 15:
        if ( *((_DWORD *)v2 + 5) & 0x4000000 )
          result = 6;
        else
          result = 0;
        break;
      default:
        result = 0;
        break;
    }
  }
  return result;
}

//----- (0075F3A0) --------------------------------------------------------
HANDLE __cdecl ownOpenFile(const char *lpFileName, DWORD dwDesiredAccess)
{
  DWORD v2; // eax@2
  HANDLE result; // eax@4

  if ( dwDesiredAccess & 0x40000000 )
    v2 = 2;
  else
    v2 = 3;
  result = CreateFileA(lpFileName, dwDesiredAccess, 1u, 0, v2, 0, 0);
  if ( result == (HANDLE)-1 )
    result = 0;
  return result;
}

//----- (0075F3E0) --------------------------------------------------------
BOOL __cdecl ownCloseFile(HANDLE hObject)
{
  return CloseHandle(hObject);
}

//----- (0075F3F0) --------------------------------------------------------
BOOL __cdecl ownReadFile(HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead, LPDWORD lpNumberOfBytesRead)
{
  return ReadFile(hFile, lpBuffer, nNumberOfBytesToRead, lpNumberOfBytesRead, 0);
}

//----- (0075F410) --------------------------------------------------------
BOOL __cdecl ownWriteFile(HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite, LPDWORD lpNumberOfBytesWritten)
{
  return WriteFile(hFile, lpBuffer, nNumberOfBytesToWrite, lpNumberOfBytesWritten, 0);
}

//----- (0075F430) --------------------------------------------------------
int __cdecl ownSeekFile(HANDLE hFile, LONG lDistanceToMove, DWORD dwMoveMethod)
{
  signed int v3; // esi@1

  v3 = 1;
  if ( SetFilePointer(hFile, lDistanceToMove, 0, dwMoveMethod) == -1 )
    v3 = 0;
  return v3;
}

//----- (0075F460) --------------------------------------------------------
int __cdecl Get_Scan(struct _STATE *a1, struct _SCAN *a2, struct _JPEG_PROPERTIES *a3)
{
  int result; // eax@2
  int v4; // edx@5
  _SCAN_COMPONENT *v5; // edi@6
  int v6; // ebx@6

  if ( a3->needframe )
  {
    result = -19;
  }
  else
  {
    result = DP_Parse_SOS(a3, a1, &a3->jframe, a2);
    if ( !result )
    {
      a1->Prog_EndOfBlock_Run = 0;
      v4 = 0;
      if ( a2->ncomps > 0 )
      {
        v5 = a2->comps;
        v6 = 0;
        while ( 1 )
        {
          if ( !v5[v6].dc_table || !v5[v6].ac_table )
            return -17;
          if ( !v5[v6].quant_table )
            break;
          ++v6;
          if ( ++v4 >= a2->ncomps )
            return result;
        }
        result = -18;
      }
    }
  }
  return result;
}

//----- (0075F510) --------------------------------------------------------
signed int __cdecl IJL_Decode(struct _JPEG_PROPERTIES *a1)
{
  struct _JPEG_PROPERTIES *v1; // esi@1
  char v2; // bl@1
  struct _STATE *v3; // ebp@1
  _DWORD *v4; // eax@1
  _SCAN *v5; // eax@1
  int v6; // edx@2
  _IJLIOTYPE v7; // eax@6
  _IJLIOTYPE v8; // eax@20
  signed int v9; // edi@22
  int v10; // eax@32
  void *v11; // ebp@33
  int v12; // edx@39
  int v13; // eax@39
  int v14; // edi@39
  _FRAME_COMPONENT *v15; // ecx@40
  int v16; // edi@43
  _SAMPLING_STATE *v17; // eax@44
  _SAMPLING_STATE *v18; // edx@45
  signed int v19; // eax@47
  _SCAN *v20; // edx@51
  int v21; // edx@56
  _IJLIOTYPE v22; // edx@73
  signed int v23; // eax@107
  int v24; // eax@110
  struct _SCAN *v26; // eax@135
  struct _STATE *v27; // ecx@136
  _IJLIOTYPE v28; // edx@137
  int v29; // ecx@143
  int v30; // edx@147
  int v31; // ecx@148
  int v32; // edi@148
  int v33; // ecx@158
  int v34; // edx@161
  int v35; // eax@161
  int v36; // edi@161
  _FRAME_COMPONENT *v37; // ecx@162
  __int16 *v38; // eax@165
  _IJLIOTYPE v39; // eax@185
  int v40; // eax@190
  void *v41; // edx@191
  int v42; // [sp+10h] [bp-24h]@1
  int v43; // [sp+14h] [bp-20h]@68
  struct _STATE *v44; // [sp+18h] [bp-1Ch]@33
  _DWORD *v45; // [sp+1Ch] [bp-18h]@1
  void *p; // [sp+20h] [bp-14h]@31

  v1 = a1;
  v2 = 0;
  v3 = &a1->state;
  v4 = a1->state.ctx;
  v42 = 0;
  v45 = v4;
  v5 = a1->jscan;
  if ( !v5 || (v6 = a1->jinterleaveType, v6 == 1) )
  {
    if ( v5 )
    {
      if ( v5->curxMCU )
      {
        v6 = a1->jinterleaveType;
      }
      else if ( v5->curyMCU )
      {
        v6 = a1->jinterleaveType;
      }
      else
      {
        DB_Begin(&a1->state);
        v5 = a1->jscan;
        v6 = a1->jinterleaveType;
      }
    }
    else
    {
      DB_Begin(&a1->state);
      v5 = a1->jscan;
      v6 = a1->jinterleaveType;
    }
  }
  if ( v6 == 1 && (!v5 || !v5->curxMCU && !v5->curyMCU) )
  {
    a1->state.bit_buffer_64 = 0i64;
    v39 = a1->iotype;
    if ( a1->iotype == 2 || v39 == 6 || v39 == 14 || v39 == 18 || v39 == 16 )
    {
      v41 = a1->state.file;
      a1->state.entropy_bytes_processed = 0;
      if ( !ownSeekFile(v41, 0, 0) )
        return -23;
      v9 = Buffer_Read_Bytes(v3);
      if ( v9 )
        return v9;
      v5 = a1->jscan;
    }
    else
    {
      v40 = a1->state.entropy_buf_maxsize;
      a1->state.cur_entropy_ptr = a1->JPGBytes;
      a1->state.entropy_bytes_processed = 0;
      a1->state.entropy_bytes_left = v40;
      v5 = a1->jscan;
    }
  }
  if ( v5 )
    v2 = 1;
  v7 = a1->iotype;
  if ( a1->iotype != 6
    && v7 != 7
    && v7 != 14
    && v7 != 15
    && v7 != 17
    && v7 != 16
    && v7 != 19
    && v7 != 18
    && !a1->roi.top
    && !a1->roi.bottom
    && !a1->roi.right
    && !a1->roi.left )
  {
    a1->state.entropy_bytes_processed = 0;
  }
  if ( a1->needframe || (v9 = Set_Decode_Fast_Path(a1)) == 0 )
  {
    v8 = a1->iotype;
    if ( a1->iotype == 1 || v8 == IJL_JFILE_READPARAMS || v8 == 5 || v8 == 4 || v8 == 21 || v8 == 20 )
    {
      v9 = DP_Get_Next_Marker(v3, (enum IJL_MARKER *)&v42);
      if ( v9 )
        return v9;
      if ( v42 != 216 )
        return -13;
    }
    if ( !a1->progressive_found )
    {
      a1->jframe.SeenAllACScans = 0;
      a1->jframe.SeenAllDCScans = 0;
    }
    p = a1->jscan;
    if ( !p || (v10 = a1->jinterleaveType, v10 == 1) && !*((_DWORD *)p + 7) && !*((_DWORD *)p + 8) )
    {
      while ( 1 )
      {
LABEL_114:
        v9 = DP_Get_Next_Marker(v3, (enum IJL_MARKER *)&v42);
        if ( v9 )
          return v9;
        v21 = v42;
        if ( v42 == 256 )
          return 0;
LABEL_59:
        switch ( v21 )
        {
          case 254:
            v9 = DP_Parse_COM(v1);
            if ( !v9 )
              continue;
            return v9;
          case 238:
            v9 = DP_Parse_APP14(v1);
            if ( !v9 )
            {
              if ( v1->needframe )
                continue;
              v9 = Set_Decode_Fast_Path(v1);
              if ( !v9 )
                continue;
            }
            return v9;
          case 224:
            if ( v1->iotype == 6 )
              continue;
            v9 = DP_Parse_APP0(v1);
            if ( !v9 )
              continue;
            return v9;
          case 221:
            v9 = DP_Parse_DRI(v3, &v43);
            if ( v9 )
              return v9;
            v1->jframe.restart_interv = v43;
            continue;
          case 219:
            v9 = DP_Parse_DQT(v1, v3, v1->dcttype);
            if ( !v9 )
              continue;
            return v9;
          case 218:
            v44 = v3;
            v11 = v1->jscan;
            goto LABEL_34;
          case 217:
            v22 = v1->iotype;
            if ( v1->iotype == 5 || v22 == 4 || v22 == 1 || v22 == IJL_JFILE_READPARAMS || v22 == 21 || v22 == 20 )
              return 0;
            if ( !v1->needframe )
            {
              if ( v1->jinterleaveType && v1->cconversion_reqd && !v1->progressive_found )
                CConvert_Image(v1);
              return v9;
            }
            v9 = DP_Get_Next_Marker(v3, (enum IJL_MARKER *)&v42);
            if ( v9 )
              return v9;
            v21 = v42;
            if ( v42 != 216 )
              return -22;
            goto LABEL_59;
          case 216:
            v1->jframe.restart_interv = 0;
            continue;
          case 207:
            return -29;
          case 206:
            return -29;
          case 205:
            return -29;
          case 203:
            return -29;
          case 202:
            return -29;
          case 201:
            return -29;
          case 200:
            return -29;
          case 199:
            return -29;
          case 198:
            return -29;
          case 197:
            return -29;
          case 196:
            v9 = DP_Parse_DHT(v1, v3);
            if ( !v9 )
              continue;
            return v9;
          case 195:
            return -29;
          case 194:
            if ( !v1->needframe )
              continue;
            goto LABEL_104;
          case 193:
            if ( v1->needframe )
              goto LABEL_104;
            continue;
          case 192:
LABEL_104:
            if ( v1->iotype == 5 || v1->iotype == 4 )
            {
              v1->state.entropy_bytes_processed -= 2;
              return 0;
            }
            v9 = DP_Parse_SOF(v3, v1);
            if ( v9 )
              return v9;
            v1->needframe = 0;
            v23 = v1->jframe.ncomps;
            if ( v23 <= 0 || v23 > 255 )
              return -14;
            v1->JPGChannels = v23;
            v24 = v1->jframe.height;
            v1->JPGWidth = v1->jframe.width;
            v1->JPGHeight = v24;
            v9 = Set_Decode_Fast_Path(v1);
            if ( v9 )
              return v9;
            break;
          default:
            v9 = DP_Skip(v3);
            if ( !v9 )
              continue;
            return v9;
          case 208:
          case 209:
          case 210:
          case 211:
          case 212:
          case 213:
          case 214:
          case 215:
            continue;
          case 256:
            return 0;
        }
      }
    }
    v44 = &a1->state;
    v11 = p;
LABEL_34:
    if ( v11 && v2 )
    {
      v2 = 0;
      goto LABEL_37;
    }
    v26 = (struct _SCAN *)operator new(0x38u);
    v11 = v26;
    if ( !v26 )
      return -5;
    v27 = v44;
    v26->curxMCU = 0;
    v26->curyMCU = 0;
    v26->dc_diff[0] = 0;
    v26->dc_diff[1] = 0;
    v26->dc_diff[2] = 0;
    v26->dc_diff[3] = 0;
    v9 = Get_Scan(v27, v26, v1);
    if ( v9 )
    {
      p = v11;
      operator delete(v11);
      return v9;
    }
    v28 = v1->iotype;
    if ( v1->iotype == 1 )
    {
      p = v11;
    }
    else if ( v28 )
    {
      switch ( v28 )
      {
        case 5u:
          p = v11;
          break;
        case 4u:
          p = v11;
          break;
        case 0x15u:
          p = v11;
          break;
        default:
          if ( v28 != 20 )
          {
            v29 = *(_DWORD *)v11;
            *((_DWORD *)v11 + 6) = v1->jframe.restart_interv;
            v1->jinterleaveType = v29 < v1->jframe.ncomps && !v1->progressive_found;
            Set_Decode_Fast_Path(v1);
            v30 = *((_DWORD *)v11 + 2);
            if ( v30 )
            {
              v31 = v1->progressive_found;
              v32 = *((_DWORD *)v11 + 5);
            }
            else if ( *((_DWORD *)v11 + 3) == 63 )
            {
              if ( *((_DWORD *)v11 + 4) )
              {
                v31 = v1->progressive_found;
                v32 = *((_DWORD *)v11 + 5);
              }
              else
              {
                v32 = *((_DWORD *)v11 + 5);
                if ( v32 )
                {
                  v31 = v1->progressive_found;
                }
                else
                {
                  v31 = v1->progressive_found;
                  if ( !v31 )
                    goto LABEL_37;
                }
              }
            }
            else
            {
              v31 = v1->progressive_found;
              v32 = *((_DWORD *)v11 + 5);
            }
            if ( v30 || *((_DWORD *)v11 + 3) )
            {
              if ( !v32 && *((_DWORD *)v11 + 3) == 63 )
                ++v1->jframe.SeenAllACScans;
            }
            else if ( !v32 )
            {
              v1->jframe.SeenAllDCScans += *(_DWORD *)v11;
            }
            v33 = v31 + 1;
            v1->progressive_found = v33;
            if ( v33 == 1 )
            {
              v34 = 0;
              v35 = 0;
              v36 = v1->jframe.ncomps;
              if ( v36 > 0 )
              {
                v37 = v1->jframe.comps;
                do
                {
                  ++v35;
                  v34 += v37->vsampling * v37->hsampling;
                  ++v37;
                }
                while ( v35 < v36 );
                v1 = a1;
              }
              v38 = (__int16 *)operator new(2 * v1->numyMCUs * v1->numxMCUs * (v34 << 6));
              v1->coef_buffer = v38;
              if ( !v38 )
              {
                p = v11;
                operator delete(*((void **)v11 + 13));
                *((_DWORD *)v11 + 13) = 0;
                operator delete(v11);
                v1->jscan = 0;
                return -5;
              }
            }
LABEL_37:
            if ( v1->jinterleaveType == 1 && !v1->progressive_found )
              v1->jframe.SeenAllACScans += *(_DWORD *)v11;
            v1->jscan = (_SCAN *)v11;
            if ( v1->upsampling_type == 1 )
            {
              v12 = 0;
              v13 = 0;
              v14 = v1->jframe.ncomps;
              if ( v14 > 0 )
              {
                v15 = v1->jframe.comps;
                do
                {
                  ++v13;
                  v12 += v15->vsampling * v15->hsampling;
                  ++v15;
                }
                while ( v13 < v14 );
                v1 = a1;
              }
              v16 = v1->numxMCUs * (v12 << 6) + (v12 << 7);
              if ( !v1->sampling_state_ptr )
              {
                v17 = (_SAMPLING_STATE *)operator new(0x14u);
                v1->sampling_state_ptr = v17;
                if ( !v17 )
                  return -5;
                v1->sampling_state_ptr->top_row = (__int16 *)operator new(8 * v16);
                v18 = v1->sampling_state_ptr;
                if ( !v18->top_row )
                {
                  operator delete(v1->sampling_state_ptr);
                  v1->sampling_state_ptr = 0;
                  return -5;
                }
                v18->cur_row = &v18->top_row[v16];
                v1->sampling_state_ptr->bottom_row = &v1->sampling_state_ptr->cur_row[v16];
                v1->sampling_state_ptr->last_row = &v1->sampling_state_ptr->bottom_row[v16];
                v1->sampling_state_ptr->cur_row_number = 0;
              }
            }
            v19 = Decode_Scan((enum IJL_MARKER *)&v42, v44, (struct _SCAN *)v11, v1);
            v9 = v19;
            if ( v19 == 1 )
            {
              p = v11;
            }
            else
            {
              if ( v19 != 2 )
              {
                if ( !v1->progressive_found )
                  v1->state.cur_scan_comp += *(_DWORD *)v11;
                v20 = v1->jscan;
                if ( v20 && !v19 )
                {
                  operator delete(v20->comps);
                  v1->jscan->comps = 0;
                  operator delete(v1->jscan);
                  v1->jscan = 0;
                }
                else if ( v19 < 0 )
                {
                  return v9;
                }
                v21 = v42;
                if ( v42 )
                {
                  v3 = v44;
                  goto LABEL_59;
                }
                v3 = v44;
                goto LABEL_114;
              }
              p = v11;
            }
            if ( !v1->progressive_found || v1->interrupt )
            {
              if ( v1->jinterleaveType != 1 || v19 != 2 )
              {
                v1->jscan = (_SCAN *)v11;
                v1->interrupt = 0;
              }
              else
              {
                if ( v1->cconversion_reqd )
                  CConvert_Image(v1);
                operator delete(*((void **)v11 + 13));
                *((_DWORD *)v11 + 13) = 0;
                operator delete(v11);
                v1->jscan = 0;
              }
            }
            else
            {
              ++v1->jframe.SeenAllACScans;
              v1->jscan = (_SCAN *)v11;
              v1->interrupt = 0;
            }
            return v9;
          }
          p = v11;
          break;
      }
    }
    else
    {
      p = v11;
    }
    v1->state.entropy_bytes_processed -= *v45;
    operator delete(v11);
    return 0;
  }
  return v9;
}

//----- (00760000) --------------------------------------------------------
int __cdecl SetDefaultTables(int a1)
{
  int v1; // edx@1
  int v2; // eax@1

  v1 = 0;
  v2 = 0;
  if ( *(_DWORD *)(a1 + 14108) )
    v1 = *(_DWORD *)(a1 + 14100);
  if ( *(_DWORD *)(a1 + 14116) )
    v1 = *(_DWORD *)(a1 + 14100);
  if ( *(_DWORD *)(a1 + 14124) )
    v1 = *(_DWORD *)(a1 + 14100);
  if ( *(_DWORD *)(a1 + 14132) )
    v1 = *(_DWORD *)(a1 + 14100);
  if ( *(_DWORD *)(a1 + 14140) && *(_DWORD *)(a1 + 14144) )
    v2 = *(_DWORD *)(a1 + 14104);
  if ( *(_DWORD *)(a1 + 14152) && *(_DWORD *)(a1 + 14156) )
    v2 = *(_DWORD *)(a1 + 14104);
  if ( *(_DWORD *)(a1 + 14164) && *(_DWORD *)(a1 + 14168) )
    v2 = *(_DWORD *)(a1 + 14104);
  if ( *(_DWORD *)(a1 + 14176) && *(_DWORD *)(a1 + 14180) )
    v2 = *(_DWORD *)(a1 + 14104);
  if ( *(_DWORD *)(a1 + 14188) && *(_DWORD *)(a1 + 14192) )
    v2 = *(_DWORD *)(a1 + 14104);
  if ( *(_DWORD *)(a1 + 14200) && *(_DWORD *)(a1 + 14204) )
    v2 = *(_DWORD *)(a1 + 14104);
  if ( *(_DWORD *)(a1 + 14212) && *(_DWORD *)(a1 + 14216) )
    v2 = *(_DWORD *)(a1 + 14104);
  if ( *(_DWORD *)(a1 + 14224) && *(_DWORD *)(a1 + 14228) )
    v2 = *(_DWORD *)(a1 + 14104);
  if ( !v1 )
  {
    *(_DWORD *)(a1 + 132) = 2;
    *(_DWORD *)(a1 + 128) = 2;
    *(_DWORD *)(a1 + 14108) = &unk_B67E40;
    *(_BYTE *)(a1 + 14112) = 0;
    *(_DWORD *)(a1 + 14116) = &unk_B67E00;
    *(_BYTE *)(a1 + 14120) = 1;
    *(_DWORD *)(a1 + 14124) = 0;
    *(_BYTE *)(a1 + 14128) = 0;
    *(_DWORD *)(a1 + 14132) = 0;
    *(_BYTE *)(a1 + 14136) = 0;
  }
  if ( !v2 )
  {
    *(_DWORD *)(a1 + 136) = 2;
    *(_DWORD *)(a1 + 140) = 2;
    *(_DWORD *)(a1 + 144) = 2;
    *(_DWORD *)(a1 + 14140) = &unk_B67EC8;
    *(_DWORD *)(a1 + 14144) = &unk_B67EBC;
    *(_BYTE *)(a1 + 14148) = 0;
    *(_BYTE *)(a1 + 14149) = 0;
    *(_DWORD *)(a1 + 14152) = &unk_B67EAC;
    *(_DWORD *)(a1 + 14156) = &unk_B67D40;
    *(_BYTE *)(a1 + 14160) = 1;
    *(_BYTE *)(a1 + 14161) = 0;
    *(_DWORD *)(a1 + 14164) = &unk_B67E9C;
    *(_DWORD *)(a1 + 14168) = &unk_B67E90;
    *(_BYTE *)(a1 + 14172) = 0;
    *(_BYTE *)(a1 + 14173) = 1;
    *(_DWORD *)(a1 + 14176) = &unk_B67E80;
    *(_DWORD *)(a1 + 14180) = &unk_B67C80;
    *(_BYTE *)(a1 + 14184) = 1;
    *(_BYTE *)(a1 + 14185) = 1;
    *(_DWORD *)(a1 + 14188) = 0;
    *(_DWORD *)(a1 + 14192) = 0;
    *(_BYTE *)(a1 + 14196) = 0;
    *(_BYTE *)(a1 + 14197) = 0;
    *(_DWORD *)(a1 + 14200) = 0;
    *(_DWORD *)(a1 + 14204) = 0;
    *(_BYTE *)(a1 + 14208) = 0;
    *(_BYTE *)(a1 + 14209) = 0;
    *(_DWORD *)(a1 + 14212) = 0;
    *(_DWORD *)(a1 + 14216) = 0;
    *(_BYTE *)(a1 + 14220) = 0;
    *(_BYTE *)(a1 + 14221) = 0;
    *(_DWORD *)(a1 + 14224) = 0;
    *(_DWORD *)(a1 + 14228) = 0;
    *(_BYTE *)(a1 + 14232) = 0;
    *(_BYTE *)(a1 + 14233) = 0;
    *(_BYTE *)(a1 + 14240) = 0;
    *(_BYTE *)(a1 + 14241) = 1;
    *(_BYTE *)(a1 + 14242) = 1;
    *(_BYTE *)(a1 + 14243) = 1;
    *(_BYTE *)(a1 + 14236) = 0;
    *(_BYTE *)(a1 + 14237) = 1;
    *(_BYTE *)(a1 + 14238) = 1;
    *(_BYTE *)(a1 + 14239) = 1;
  }
  return 0;
}

//----- (007602A0) --------------------------------------------------------
int __cdecl Scale_Char_Matrix(signed int a1, int a2, int a3)
{
  signed int v3; // ebx@1
  int v4; // ebx@3
  signed int v5; // ecx@7
  signed int v6; // edi@8
  int result; // eax@8
  int v8; // edx@8
  int v9; // edi@10

  v3 = a1;
  if ( a1 > 0 )
  {
    if ( a1 <= 100 )
    {
      if ( a1 < 50 )
        goto LABEL_3;
    }
    else
    {
      v3 = 100;
    }
    v4 = -2 * v3 + 200;
    goto LABEL_7;
  }
  v3 = 1;
LABEL_3:
  v4 = 5000 / v3;
LABEL_7:
  v5 = 0;
  do
  {
    v6 = v4 * *(_BYTE *)(v5 + a2) + 50;
    result = 1374389535 * v6;
    v8 = v6 / 100;
    if ( v6 / 100 > 0 )
    {
      v9 = 2 * v5;
      if ( v8 <= 255 )
        *(_WORD *)(a3 + v9) = v8;
      else
        *(_WORD *)(a3 + v9) = 255;
    }
    else
    {
      *(_WORD *)(a3 + 2 * v5) = 1;
    }
    ++v5;
  }
  while ( v5 < 64 );
  return result;
}

//----- (00760360) --------------------------------------------------------
int __cdecl BuildEncoderHuffmanTable(int a1, int a2, int a3)
{
  int result; // eax@1
  signed int v4; // edx@1
  signed int v5; // ebp@3
  int v6; // edx@3
  signed int v7; // ebx@4
  signed int v8; // edi@4
  signed int v9; // esi@8
  int v10; // edx@8
  int v11; // edi@8
  int v12; // ebx@9
  int v13; // edx@15
  signed int v14; // esi@18
  signed int v15; // esi@19
  signed int v16; // esi@20
  int v17; // edi@21
  int v18; // eax@21
  signed int v19; // esi@23
  int v20; // edi@24
  int v21; // [sp+0h] [bp-82Ch]@2
  int v22; // [sp+4h] [bp-828h]@2
  int v23[258]; // [sp+8h] [bp-824h]@21
  int v24; // [sp+410h] [bp-41Ch]@2
  int v25; // [sp+414h] [bp-418h]@2
  int v26[255]; // [sp+418h] [bp-414h]@21
  int v27; // [sp+814h] [bp-18h]@17

  result = 0;
  v4 = 0;
  do
  {
    *(&v21 + v4) = 0;
    *(&v24 + v4) = 0;
    *(_WORD *)(a3 + 2 * v4 + 1032) = 0;
    *(_DWORD *)(a3 + 4 * v4 + 8) = 0;
    *(&v22 + v4) = 0;
    *(&v25 + v4) = 0;
    *(_WORD *)(a3 + 2 * v4 + 1034) = 0;
    *(_DWORD *)(a3 + 4 * v4 + 12) = 0;
    v4 += 2;
  }
  while ( v4 < 256 );
  v5 = 0;
  v6 = 1;
  while ( 1 )
  {
    v7 = 1;
    v8 = *(_BYTE *)(a1 + v6 - 1);
    if ( v8 > 0 )
      break;
LABEL_7:
    if ( ++v6 >= 17 )
    {
      v9 = 0;
      v10 = 0;
      *(&v21 + v5) = 0;
      v11 = v21;
      while ( 1 )
      {
        *(&v24 + v9++) = v10;
        v12 = *(&v21 + v9);
        ++v10;
        for ( ; v12 == v11; ++v10 )
        {
          if ( v9 >= 257 )
            break;
          *(&v24 + v9++) = v10;
          v12 = *(&v21 + v9);
        }
        if ( !v12 )
          break;
        do
        {
          v10 *= 2;
          ++v11;
        }
        while ( v12 != v11 );
      }
      v13 = 0;
      if ( v5 > 0 )
      {
        if ( v5 < 4 )
          goto LABEL_23;
        v27 = 0;
        while ( 1 )
        {
          v14 = *(_BYTE *)(a2 + v13);
          if ( v14 > 257 )
            break;
          *(_WORD *)(a3 + 2 * v14 + 1032) = *(&v24 + v13);
          *(_DWORD *)(a3 + 4 * v14 + 8) = *(&v21 + v13);
          v15 = *(_BYTE *)(a2 + v13 + 1);
          if ( v15 > 257 )
            break;
          *(_WORD *)(a3 + 2 * v15 + 1032) = *(&v25 + v13);
          *(_DWORD *)(a3 + 4 * v15 + 8) = *(&v22 + v13);
          v16 = *(_BYTE *)(a2 + v13 + 2);
          if ( v16 > 257 )
            break;
          v17 = v26[v13];
          v18 = v23[v13];
          v13 += 3;
          *(_WORD *)(a3 + 2 * v16 + 1032) = v17;
          *(_DWORD *)(a3 + 4 * v16 + 8) = v18;
          if ( v13 > v5 - 4 )
          {
            result = v27;
LABEL_23:
            while ( 1 )
            {
              v19 = *(_BYTE *)(a2 + v13);
              if ( v19 > 257 )
                break;
              *(_WORD *)(a3 + 2 * v19 + 1032) = *(&v24 + v13);
              v20 = *(&v21 + v13++);
              *(_DWORD *)(a3 + 4 * v19 + 8) = v20;
              if ( v13 >= v5 )
                return result;
            }
            break;
          }
        }
        result = -6;
      }
      return result;
    }
  }
  while ( v5 <= 257 )
  {
    *(&v21 + v5++) = v6;
    if ( ++v7 > v8 )
      goto LABEL_7;
  }
  return -6;
}
// 760360: using guessed type int var_414[255];
// 760360: using guessed type int var_824[258];

//----- (00760550) --------------------------------------------------------
int __cdecl BuildDecoderHuffmanTable(int a1, int a2, int a3, int a4, int a5)
{
  signed int v5; // eax@1
  unsigned int v6; // edx@1
  unsigned int v7; // ebp@2
  unsigned int v8; // ebx@2
  char v9; // cl@4
  int v10; // ecx@14
  int v11; // edi@14
  int v12; // esi@14
  int v13; // edx@14
  int v14; // eax@15
  signed int v15; // eax@20
  unsigned int v16; // edx@20
  int v17; // ebp@21
  int v18; // esi@22
  unsigned int v19; // edi@22
  unsigned int v20; // ebp@22
  int v21; // ecx@38
  int v22; // esi@38
  signed int v23; // eax@40
  char v24; // dl@40
  int v25; // esi@40
  unsigned int v26; // ecx@41
  signed int v27; // ebx@41
  char v28; // cl@42
  int v29; // esi@42
  unsigned int v30; // ebp@42
  signed int v31; // eax@44
  int v32; // edx@44
  int v33; // ecx@46
  _BYTE *v34; // edi@48
  int v35; // ebp@49
  int v38; // [sp+0h] [bp-548h]@35
  int v39[257]; // [sp+4h] [bp-544h]@17
  unsigned __int8 v40; // [sp+408h] [bp-140h]@5
  char v41; // [sp+409h] [bp-13Fh]@6
  char v42; // [sp+40Ah] [bp-13Eh]@7
  char v43; // [sp+40Bh] [bp-13Dh]@8
  char v44[256]; // [sp+40Ch] [bp-13Ch]@9
  int v45; // [sp+50Ch] [bp-3Ch]@1
  _BYTE *v46; // [sp+510h] [bp-38h]@46
  int v47; // [sp+514h] [bp-34h]@42
  int v48; // [sp+518h] [bp-30h]@46
  unsigned int v49; // [sp+51Ch] [bp-2Ch]@41
  int v50; // [sp+520h] [bp-28h]@42
  char v51; // [sp+524h] [bp-24h]@46
  char v52; // [sp+528h] [bp-20h]@42
  int v53; // [sp+52Ch] [bp-1Ch]@42
  unsigned int v54; // [sp+530h] [bp-18h]@24

  v5 = 1;
  *(_DWORD *)a5 = a3;
  *(_DWORD *)(a5 + 4) = a4;
  v6 = 0;
  v45 = 0;
  do
  {
    v7 = *(_BYTE *)(v5 + a1 - 1);
    v8 = 1;
    if ( v7 >= 1 )
    {
      if ( v7 - 1 < 6 )
      {
        v9 = v5;
LABEL_11:
        while ( 1 )
        {
          *(&v40 + v6++) = v9;
          if ( v6 > 0x101 )
            break;
          if ( ++v8 > v7 )
            goto LABEL_13;
        }
      }
      else
      {
        v9 = v5;
        while ( 1 )
        {
          *(&v40 + v6) = v5;
          if ( v6 + 1 > 0x101 )
            break;
          *(&v41 + v6) = v5;
          if ( v6 + 2 > 0x101 )
            break;
          *(&v42 + v6) = v5;
          if ( v6 + 3 > 0x101 )
            break;
          *(&v43 + v6) = v5;
          if ( v6 + 4 > 0x101 )
            break;
          v44[v6] = v5;
          v6 += 5;
          if ( v6 > 0x101 )
            break;
          v8 += 5;
          if ( v8 > v7 - 6 )
            goto LABEL_11;
        }
      }
      return -6;
    }
LABEL_13:
    ++v5;
  }
  while ( v5 <= 16 );
  v10 = v45;
  *(&v40 + v6) = 0;
  v11 = 0;
  v12 = v40;
  v13 = 0;
  if ( v40 )
  {
    v14 = v40;
    do
    {
      for ( ; v14 == v12; v14 = *(&v40 + v13) )
      {
        v39[v13] = v11++;
        if ( (unsigned int)++v13 > 0x101 )
          return -6;
      }
      v11 *= 2;
      ++v12;
    }
    while ( v14 );
  }
  v15 = 1;
  *(_WORD *)(a5 + 1614) = 0;
  *(_WORD *)(a5 + 1544) = 0;
  *(_WORD *)(a5 + 1578) = 0;
  *(_WORD *)(a5 + 1616) = 0;
  *(_WORD *)(a5 + 1546) = 0;
  *(_WORD *)(a5 + 1580) = 0;
  *(_WORD *)(a5 + 1618) = 0;
  *(_WORD *)(a5 + 1548) = 0;
  *(_WORD *)(a5 + 1582) = 0;
  *(_WORD *)(a5 + 1620) = 0;
  *(_WORD *)(a5 + 1550) = 0;
  *(_WORD *)(a5 + 1584) = 0;
  *(_WORD *)(a5 + 1622) = 0;
  *(_WORD *)(a5 + 1552) = 0;
  *(_WORD *)(a5 + 1586) = 0;
  *(_WORD *)(a5 + 1624) = 0;
  *(_WORD *)(a5 + 1554) = 0;
  *(_WORD *)(a5 + 1588) = 0;
  *(_WORD *)(a5 + 1626) = 0;
  *(_WORD *)(a5 + 1556) = 0;
  *(_WORD *)(a5 + 1590) = 0;
  *(_WORD *)(a5 + 1628) = 0;
  *(_WORD *)(a5 + 1558) = 0;
  *(_WORD *)(a5 + 1592) = 0;
  *(_WORD *)(a5 + 1630) = 0;
  *(_WORD *)(a5 + 1560) = 0;
  *(_WORD *)(a5 + 1594) = 0;
  *(_WORD *)(a5 + 1632) = 0;
  *(_WORD *)(a5 + 1562) = 0;
  *(_WORD *)(a5 + 1596) = 0;
  *(_WORD *)(a5 + 1634) = 0;
  *(_WORD *)(a5 + 1564) = 0;
  *(_WORD *)(a5 + 1598) = 0;
  *(_WORD *)(a5 + 1636) = 0;
  *(_WORD *)(a5 + 1566) = 0;
  *(_WORD *)(a5 + 1600) = 0;
  *(_WORD *)(a5 + 1638) = 0;
  *(_WORD *)(a5 + 1568) = 0;
  *(_WORD *)(a5 + 1602) = 0;
  *(_WORD *)(a5 + 1640) = 0;
  *(_WORD *)(a5 + 1570) = 0;
  *(_WORD *)(a5 + 1604) = 0;
  *(_WORD *)(a5 + 1642) = 0;
  *(_WORD *)(a5 + 1572) = 0;
  *(_WORD *)(a5 + 1606) = 0;
  *(_WORD *)(a5 + 1644) = 0;
  *(_WORD *)(a5 + 1574) = 0;
  *(_WORD *)(a5 + 1608) = 0;
  *(_WORD *)(a5 + 1646) = 0;
  *(_WORD *)(a5 + 1576) = 0;
  *(_WORD *)(a5 + 1610) = 0;
  v16 = 0;
  v45 = v10;
  while ( 1 )
  {
    v17 = *(_BYTE *)(v15 + a1 - 1);
    if ( !*(_BYTE *)(v15 + a1 - 1) )
    {
      *(_WORD *)(a5 + 2 * v15 + 1578) = -1;
      goto LABEL_37;
    }
    v18 = 2 * v15;
    v19 = v16;
    *(_WORD *)(a5 + 2 * v15 + 1614) = v16;
    v20 = v16 + v17;
    *(_WORD *)(a5 + 2 * v15 + 1544) = v39[v16];
    if ( v16 < v20 )
      break;
LABEL_35:
    *(_WORD *)(a5 + v18 + 1578) = *(int *)((char *)&v38 + v19 * 4);
LABEL_37:
    if ( ++v15 > 16 )
    {
      v21 = v45;
      *(_WORD *)(a5 + 1612) = -1;
      v22 = a5;
      do
      {
        *(_DWORD *)(v22 + 8) = 0;
        *(_DWORD *)(v22 + 12) = 0;
        *(_DWORD *)(v22 + 16) = 0;
        *(_DWORD *)(v22 + 20) = 0;
        v22 += 16;
      }
      while ( a5 + 1024 > v22 );
      v23 = 1;
      v24 = -1;
      v45 = v21;
      v54 = 0;
      v25 = a1;
      while ( 1 )
      {
        v26 = *(_BYTE *)(v23 + v25 - 1);
        v27 = 1;
        v49 = *(_BYTE *)(v23 + v25 - 1);
        if ( v26 >= 1 )
          break;
LABEL_54:
        --v24;
        if ( ++v23 > 8 )
          return v45;
      }
      v28 = v24 + 8;
      v29 = a2;
      v53 = v23 << 16;
      v47 = 1 << (v24 + 8);
      v52 = v24;
      v30 = v54;
      v50 = v23;
      while ( v30 <= 0x101 )
      {
        v31 = v47;
        v32 = v39[v30] << v28;
        if ( v47 > 0 )
        {
          if ( v47 < 6 )
          {
            v34 = (_BYTE *)(v30 + v29);
          }
          else
          {
            v46 = (_BYTE *)(v30 + v29);
            v51 = v28;
            v33 = v53;
            v48 = v27;
            do
            {
              v31 -= 5;
              *(_DWORD *)(a5 + 4 * v32 + 8) = v33 | *(_BYTE *)(v29 + v30);
              *(_DWORD *)(a5 + 4 * v32 + 12) = v33 | *(_BYTE *)(v29 + v30);
              *(_DWORD *)(a5 + 4 * v32 + 16) = v33 | *(_BYTE *)(v29 + v30);
              *(_DWORD *)(a5 + 4 * v32 + 20) = v33 | *(_BYTE *)(v29 + v30);
              *(_DWORD *)(a5 + 4 * v32 + 24) = v33 | *(_BYTE *)(v29 + v30);
              v32 += 5;
            }
            while ( v31 >= 6 );
            v53 = v33;
            v34 = v46;
            v28 = v51;
            v27 = v48;
          }
          v48 = v27;
          v54 = v30;
          v35 = v53;
          do
          {
            --v31;
            *(_DWORD *)(a5 + 4 * v32++ + 8) = v35 | *v34;
          }
          while ( v31 > 0 );
          v27 = v48;
          v30 = v54;
          v29 = a2;
        }
        ++v30;
        if ( ++v27 > v49 )
        {
          v54 = v30;
          v24 = v52;
          v23 = v50;
          v25 = a1;
          goto LABEL_54;
        }
      }
      return -6;
    }
  }
  if ( v20 - v16 < 6 )
    goto LABEL_32;
  v54 = v15;
  while ( 1 )
  {
    *(_WORD *)(a5 + 2 * v16 + 1032) = *(_BYTE *)(a2 + v16);
    if ( v16 + 1 > 0x101 )
      return -6;
    *(_WORD *)(a5 + 2 * v16 + 1034) = *(_BYTE *)(a2 + v16 + 1);
    if ( v16 + 2 > 0x101 )
      return -6;
    *(_WORD *)(a5 + 2 * v16 + 1036) = *(_BYTE *)(a2 + v16 + 2);
    if ( v16 + 3 > 0x101 )
      return -6;
    *(_WORD *)(a5 + 2 * v16 + 1038) = *(_BYTE *)(a2 + v16 + 3);
    if ( v16 + 4 > 0x101 )
      return -6;
    *(_WORD *)(a5 + 2 * v16 + 1040) = *(_BYTE *)(a2 + v16 + 4);
    v16 += 5;
    if ( v16 > 0x101 )
      return -6;
    if ( v16 > v20 - 6 )
    {
      v15 = v54;
LABEL_32:
      while ( 1 )
      {
        *(_WORD *)(a5 + 2 * v16 + 1032) = *(_BYTE *)(a2 + v16);
        if ( ++v16 > 0x101 )
          return -6;
        if ( v16 >= v20 )
        {
          v19 = v16;
          goto LABEL_35;
        }
      }
    }
  }
}
// 760550: using guessed type char var_13C[256];
// 760550: using guessed type int var_544[257];

//----- (00760BC0) --------------------------------------------------------
int __cdecl ownEncoderWriteJPEGTables(struct _JPEG_PROPERTIES *a1)
{
  int v1; // esi@1
  int v2; // ebp@1
  __int16 *v3; // eax@3
  int result; // eax@3
  _DCTTYPE v5; // eax@4
  _HUFFMAN_TABLE *v6; // esi@14
  _HUFFMAN_TABLE *v7; // ebx@14
  int v8; // ebp@14
  struct _STATE *v9; // [sp+14h] [bp-18h]@1
  struct _STATE *v10; // [sp+14h] [bp-18h]@14
  int v11; // [sp+18h] [bp-14h]@1

  v1 = 0;
  v2 = 0;
  v11 = 0;
  v9 = &a1->state;
  while ( v2 < a1->maxquantindex )
  {
    v3 = a1->jFmtQuant[v1].elements;
    a1->jEncFmtQuant[v2] = v3;
    Scale_Char_Matrix(a1->jquality, (int)a1->rawquanttables[v2].quantizer, (int)v3);
    result = EP_Write_DQT(v9, 0, a1->rawquanttables[v2].ident, a1->jEncFmtQuant[v2]);
    v11 = result;
    if ( result )
      return result;
    v5 = a1->dcttype;
    if ( v5 )
    {
      if ( v5 != 1 )
        return -8;
      FillEncoderQuantTable_IPP((int)a1->jEncFmtQuant[v2]);
    }
    else
    {
      FillEncoderQuantTable_AAN((int)a1->jEncFmtQuant[v2]);
    }
    ++v1;
    ++v2;
  }
  result = v11;
  if ( !a1->progressive_found )
  {
    result = EP_Write_DHTs(v9, a1);
    if ( !result && 2 * a1->maxhuffindex > 0 )
    {
      v6 = a1->jFmtDcHuffman;
      v10 = 0;
      v7 = a1->jFmtAcHuffman;
      v8 = 0;
      do
      {
        a1->jEncFmtDcHuffman[a1->rawhufftables[v8].ident] = v6;
        a1->jEncFmtAcHuffman[a1->rawhufftables[v8 + 1].ident] = v7;
        result = BuildEncoderHuffmanTable(
                   (int)a1->rawhufftables[v8].bits,
                   (int)a1->rawhufftables[v8].vals,
                   (int)&a1->jEncFmtDcHuffman[a1->rawhufftables[v8].ident]->huff_class);
        if ( result )
          break;
        result = BuildEncoderHuffmanTable(
                   (int)a1->rawhufftables[v8 + 1].bits,
                   (int)a1->rawhufftables[v8 + 1].vals,
                   (int)&a1->jEncFmtAcHuffman[a1->rawhufftables[v8 + 1].ident]->huff_class);
        if ( result )
          break;
        v8 += 2;
        v7 += 2;
        v6 += 2;
        v10 = (struct _STATE *)((char *)v10 + 2);
      }
      while ( (signed int)v10 < 2 * a1->maxhuffindex );
    }
  }
  return result;
}

//----- (00760DC0) --------------------------------------------------------
int __cdecl Encode_Frame_Init(struct _JPEG_PROPERTIES *a1)
{
  struct _STATE *v1; // esi@1
  void (__cdecl **v2)(_STATE *, char *, int); // ebp@1
  int result; // eax@1
  _IJLIOTYPE v4; // edx@2
  _DCTTYPE v5; // edx@8
  void (__cdecl *v6)(_STATE *, char *, int); // ecx@9
  void (__cdecl *v7)(_STATE *, char *, int); // ecx@11
  void (__cdecl *v8)(_STATE *, char *, int); // ecx@12
  int v9; // edi@20
  int v10; // eax@20
  int i; // esi@20
  __int16 *v12; // eax@25
  _DCTTYPE v13; // eax@25
  _HUFFMAN_TABLE *v14; // edi@31
  _HUFFMAN_TABLE *v15; // ebp@31
  int v16; // esi@31
  _IJL_COLOR v17; // eax@36
  enum _IJLERR v18; // [sp+14h] [bp-20h]@20
  void (__cdecl **v19)(_STATE *, char *, int); // [sp+18h] [bp-1Ch]@20
  int v20; // [sp+20h] [bp-14h]@31

  v1 = &a1->state;
  v2 = (void (__cdecl **)(_STATE *, char *, int))a1->state.ctx;
  v2[22](&a1->state, a1->JPGBytes, a1->JPGSizeBytes);
  result = EP_Write_SOI(&a1->state);
  if ( result )
    return result;
  v4 = a1->iotype;
  if ( a1->iotype != 8 && v4 != 9 && v4 != 10 && v4 != 11 )
    goto LABEL_6;
  v17 = a1->JPGColor;
  if ( v17 == 1 || v17 == 5 )
  {
    result = EP_Write_APP14(0, a1);
    if ( result )
      return result;
  }
  else if ( v17 == 6 )
  {
    result = EP_Write_APP14(2, a1);
    if ( result )
      return result;
  }
  else
  {
    result = EP_Write_APP0(a1);
    if ( result )
      return result;
  }
  result = EP_Write_COM(a1);
  if ( !result )
  {
    result = ownEncoderWriteJPEGTables(a1);
    if ( !result )
    {
      v4 = a1->iotype;
LABEL_6:
      if ( v4 != 12 && v4 != 13 )
        goto LABEL_8;
      v9 = 0;
      v18 = result;
      v10 = a1->maxquantindex;
      v19 = v2;
      for ( i = 0; i < v10; ++i )
      {
        if ( !a1->jEncFmtQuant[i] && a1->rawquanttables[i].quantizer )
        {
          v12 = a1->jFmtQuant[v9].elements;
          a1->jEncFmtQuant[i] = v12;
          Scale_Char_Matrix(a1->jquality, (int)a1->rawquanttables[i].quantizer, (int)v12);
          v13 = a1->dcttype;
          if ( v13 )
          {
            if ( v13 != 1 )
              return -8;
            FillEncoderQuantTable_IPP((int)a1->jEncFmtQuant[i]);
            v10 = a1->maxquantindex;
          }
          else
          {
            FillEncoderQuantTable_AAN((int)a1->jEncFmtQuant[i]);
            v10 = a1->maxquantindex;
          }
        }
        ++v9;
      }
      result = v18;
      v1 = &a1->state;
      if ( 2 * a1->maxhuffindex <= 0 )
      {
LABEL_8:
        v5 = a1->dcttype;
        if ( v5 )
        {
          if ( v5 == 1 )
          {
            v7 = v2[64];
            v2[17] = v2[8];
            v2[65] = v7;
          }
          else
          {
            v8 = v2[63];
            v2[17] = v2[7];
            v2[65] = v8;
          }
        }
        else
        {
          v6 = v2[63];
          v2[17] = v2[7];
          v2[65] = v6;
        }
        if ( a1->iotype != 11 && a1->iotype != 10 || (result = EP_Write_EOI(v1)) == 0 )
        {
          if ( a1->state.file )
            result = Flush_Buffer_To_File((int)v1);
        }
      }
      else
      {
        v14 = a1->jFmtDcHuffman;
        v20 = 0;
        v15 = a1->jFmtAcHuffman;
        v16 = 0;
        while ( 1 )
        {
          a1->jEncFmtDcHuffman[a1->rawhufftables[v16].ident] = v14;
          a1->jEncFmtAcHuffman[a1->rawhufftables[v16 + 1].ident] = v15;
          result = BuildEncoderHuffmanTable(
                     (int)a1->rawhufftables[v16].bits,
                     (int)a1->rawhufftables[v16].vals,
                     (int)&a1->jEncFmtDcHuffman[a1->rawhufftables[v16].ident]->huff_class);
          if ( result )
            break;
          result = BuildEncoderHuffmanTable(
                     (int)a1->rawhufftables[v16 + 1].bits,
                     (int)a1->rawhufftables[v16 + 1].vals,
                     (int)&a1->jEncFmtAcHuffman[a1->rawhufftables[v16 + 1].ident]->huff_class);
          if ( result )
            break;
          v16 += 2;
          v15 += 2;
          v14 += 2;
          v20 += 2;
          if ( v20 >= 2 * a1->maxhuffindex )
          {
            v2 = v19;
            v1 = &a1->state;
            goto LABEL_8;
          }
        }
      }
      return result;
    }
  }
  return result;
}

//----- (00761110) --------------------------------------------------------
int __cdecl Encode_Frame(struct _JPEG_PROPERTIES *a1)
{
  struct _JPEG_PROPERTIES *v1; // ebx@1
  struct _STATE *v2; // ecx@1
  struct _SCAN *v3; // edx@1
  signed int v4; // eax@4
  void *v5; // edx@8
  void *v6; // eax@9
  _SCAN *v7; // ecx@11
  _SCAN_COMPONENT *v8; // eax@13
  void *v10; // eax@27
  int v11; // ebx@29
  char *v12; // eax@29
  _DWORD *v13; // esi@29
  int v14; // ebx@30
  int v15; // ecx@32
  struct _JPEG_PROPERTIES *v16; // ebx@35
  int v17; // edx@35
  void *p; // [sp+0h] [bp-38h]@1
  int v19; // [sp+4h] [bp-34h]@1
  struct _STATE *v20; // [sp+8h] [bp-30h]@1
  int v21; // [sp+Ch] [bp-2Ch]@30
  struct _JPEG_PROPERTIES *v22; // [sp+1Ch] [bp-1Ch]@31
  CPPEH_RECORD ms_exc; // [sp+20h] [bp-18h]@1

  ms_exc.old_esp = (DWORD)&p;
  ms_exc.registration.TryLevel = 0;
  v19 = 0;
  v1 = a1;
  v2 = &a1->state;
  v20 = &a1->state;
  p = 0;
  v3 = a1->jscan;
  if ( v3 )
  {
    p = a1->jscan;
    goto LABEL_3;
  }
  v10 = operator new(0x38u);
  p = v10;
  if ( !v10 )
  {
    v19 = -5;
    goto LABEL_18;
  }
  v11 = a1->JPGChannels;
  *(_DWORD *)v10 = v11;
  *((_DWORD *)v10 + 1) = 0;
  *((_DWORD *)v10 + 2) = 1;
  *((_DWORD *)v10 + 3) = 63;
  *((_DWORD *)v10 + 4) = 0;
  *((_DWORD *)v10 + 5) = 0;
  *((_DWORD *)v10 + 6) = 0;
  *((_DWORD *)v10 + 7) = 0;
  *((_DWORD *)v10 + 8) = 0;
  *((_DWORD *)v10 + 9) = 0;
  *((_DWORD *)v10 + 10) = 0;
  *((_DWORD *)v10 + 11) = 0;
  *((_DWORD *)v10 + 12) = 0;
  v12 = (char *)operator new(24 * v11);
  v13 = p;
  *((_DWORD *)p + 13) = v12;
  if ( !v12 )
  {
    v19 = -5;
    goto LABEL_18;
  }
  v14 = 0;
  v21 = 0;
  if ( *v13 <= 0 )
  {
    v22 = a1;
  }
  else
  {
    v22 = a1;
    while ( 1 )
    {
      v15 = 24 * v14;
      *(_DWORD *)&v12[v15] = v14;
      *(_DWORD *)(v15 + v13[13] + 4) = v22->jframe.comps[v14].hsampling;
      *(_DWORD *)(v15 + v13[13] + 8) = v22->jframe.comps[v14].vsampling;
      *(_DWORD *)(v15 + v13[13] + 12) = 0;
      *(_DWORD *)(v15 + v13[13] + 16) = 0;
      *(_DWORD *)(v15 + v13[13] + 20) = 0;
      v21 = ++v14;
      if ( v14 >= *v13 )
        break;
      v12 = (char *)v13[13];
    }
  }
  v19 = EP_Write_SOF(v20, &v22->jframe);
  if ( !v19 )
  {
    v16 = a1;
    v17 = a1->jframe.restart_interv;
    if ( v17 )
    {
      v19 = EP_Write_DRI(v17, v20);
      if ( v19 )
        goto LABEL_18;
      v16 = a1;
    }
    v19 = EP_Write_SOS(v20, v16->JPGChannels, v16->HuffIdentifierDC, v16->HuffIdentifierAC);
    if ( !v19 )
    {
      v19 = Flush_Buffer_To_File((int)v20);
      if ( !v19 )
      {
        v19 = Set_Encode_Fast_Path(a1);
        if ( !v19 )
        {
          v3 = (struct _SCAN *)p;
          v2 = v20;
          v1 = a1;
LABEL_3:
          if ( v1->jframe.restart_interv )
          {
            v4 = Encode_Scan_WRst(v1, v2, v3);
            v19 = v4;
          }
          else
          {
            v4 = Encode_Scan(v1, v2, v3);
            v19 = v4;
          }
          if ( v4 == 1 || v4 == 2 )
          {
            a1->interrupt = 0;
            a1->jscan = (_SCAN *)p;
          }
          else if ( !v4 )
          {
            v5 = p;
            if ( p )
            {
              v6 = (void *)*((_DWORD *)p + 13);
              if ( v6 )
              {
                operator delete(v6);
                v5 = p;
                *((_DWORD *)p + 13) = 0;
              }
              operator delete(v5);
              p = 0;
              v7 = 0;
              a1->jscan = 0;
            }
            else
            {
              v7 = a1->jscan;
            }
            if ( v7 )
            {
              v8 = v7->comps;
              if ( v8 )
              {
                operator delete(v8);
                a1->jscan->comps = 0;
                v7 = a1->jscan;
              }
              operator delete(v7);
              a1->jscan = 0;
            }
            v19 = EP_Write_EOI(v20);
            if ( !v19 )
            {
              v19 = Flush_Buffer_To_File((int)v20);
              ms_exc.registration.TryLevel = -1;
            }
          }
          goto LABEL_18;
        }
      }
    }
  }
LABEL_18:
  if ( v19 < 0 && p )
  {
    if ( *((_DWORD *)p + 13) )
    {
      operator delete(*((void **)p + 13));
      *((_DWORD *)p + 13) = 0;
    }
    operator delete(p);
    p = 0;
    a1->jscan = 0;
  }
  return v19;
}

//----- (007614E0) --------------------------------------------------------
int __cdecl sub_7614E0(int a1, int a2, int a3, int a4, int a5, int a6, int a7)
{
  _DWORD *v7; // eax@1
  int result; // eax@1

  v7 = *(_DWORD **)(a2 + 52);
  *(_DWORD *)a2 = 1;
  *v7 = a3;
  *(_DWORD *)(*(_DWORD *)(a2 + 52) + 4) = *(_DWORD *)(16 * a3 + *(_DWORD *)(a1 + 14284) + 4);
  *(_DWORD *)(*(_DWORD *)(a2 + 52) + 8) = *(_DWORD *)(16 * a3 + *(_DWORD *)(a1 + 14284) + 8);
  *(_DWORD *)(a2 + 8) = a4;
  *(_DWORD *)(a2 + 12) = a5;
  *(_DWORD *)(a2 + 16) = a6;
  result = a7;
  *(_DWORD *)(a2 + 20) = a7;
  return result;
}

//----- (00761540) --------------------------------------------------------
void __cdecl sub_761540(int a1, int a2, signed int a3, int a4, int a5)
{
  signed int v5; // ecx@1
  int v6; // eax@2
  int v7; // ebp@4
  int v8; // ebx@4
  int v9; // ebp@6
  int v10; // ebx@6
  int v11; // esi@7
  signed int v12; // [sp+8h] [bp-1Ch]@4
  signed int v13; // [sp+Ch] [bp-18h]@4

  v5 = a3;
  if ( a3 <= 4 )
  {
    v6 = 0;
    if ( a3 > 0 )
    {
      if ( a3 >= 4 )
      {
        v7 = 0;
        v8 = 0;
        v12 = 2;
        v13 = 1;
        do
        {
          *(_DWORD *)(v7 + *(_DWORD *)(a2 + 52)) = v6;
          *(_DWORD *)(v7 + *(_DWORD *)(a2 + 52) + 4) = *(_DWORD *)(v8 + *(_DWORD *)(a1 + 14284) + 4);
          v6 += 3;
          *(_DWORD *)(v7 + *(_DWORD *)(a2 + 52) + 8) = *(_DWORD *)(v8 + *(_DWORD *)(a1 + 14284) + 8);
          *(_DWORD *)(v7 + *(_DWORD *)(a2 + 52) + 24) = v13;
          *(_DWORD *)(v7 + *(_DWORD *)(a2 + 52) + 28) = *(_DWORD *)(v8 + *(_DWORD *)(a1 + 14284) + 20);
          *(_DWORD *)(v7 + *(_DWORD *)(a2 + 52) + 32) = *(_DWORD *)(v8 + *(_DWORD *)(a1 + 14284) + 24);
          *(_DWORD *)(v7 + *(_DWORD *)(a2 + 52) + 48) = v12;
          *(_DWORD *)(v7 + *(_DWORD *)(a2 + 52) + 52) = *(_DWORD *)(v8 + *(_DWORD *)(a1 + 14284) + 36);
          *(_DWORD *)(v7 + *(_DWORD *)(a2 + 52) + 56) = *(_DWORD *)(v8 + *(_DWORD *)(a1 + 14284) + 40);
          v7 += 72;
          v8 += 48;
          v13 += 3;
          v12 += 3;
        }
        while ( v6 <= a3 - 4 );
      }
      v9 = 24 * v6;
      v10 = 16 * v6;
      do
      {
        *(_DWORD *)(v9 + *(_DWORD *)(a2 + 52)) = v6;
        *(_DWORD *)(v9 + *(_DWORD *)(a2 + 52) + 4) = *(_DWORD *)(v10 + *(_DWORD *)(a1 + 14284) + 4);
        v11 = *(_DWORD *)(v10 + *(_DWORD *)(a1 + 14284) + 8);
        v10 += 16;
        ++v6;
        *(_DWORD *)(v9 + *(_DWORD *)(a2 + 52) + 8) = v11;
        v9 += 24;
      }
      while ( v6 < a3 );
      v5 = a3;
    }
    *(_DWORD *)a2 = v5;
    *(_DWORD *)(a2 + 8) = 0;
    *(_DWORD *)(a2 + 12) = 0;
    *(_DWORD *)(a2 + 16) = a4;
    *(_DWORD *)(a2 + 20) = a5;
  }
}

//----- (007616B0) --------------------------------------------------------
signed int __cdecl sub_7616B0(int a1, _DWORD *a2)
{
  signed int result; // eax@1
  int v3; // ecx@1
  int v4; // ecx@4
  int v5; // ecx@12

  result = 0;
  v3 = *(_DWORD *)(a1 + 84);
  switch ( v3 )
  {
    case 1:
      if ( *(_DWORD *)(a1 + 88) == 4 )
      {
        *a2 = 6;
      }
      else
      {
        *a2 = 0;
        result = -8;
      }
      break;
    case 2:
      if ( *(_DWORD *)(a1 + 88) == 255 )
      {
        *a2 = 5;
      }
      else
      {
        *a2 = 0;
        result = -8;
      }
      break;
    case 3:
      v4 = *(_DWORD *)(a1 + 88);
      switch ( v4 )
      {
        case 1:
          *a2 = 8;
          break;
        case 3:
          *a2 = 10;
          break;
        case 255:
          *a2 = 8;
          break;
        default:
          *a2 = 0;
          result = -8;
          break;
      }
      break;
    case 4:
      v5 = *(_DWORD *)(a1 + 88);
      switch ( v5 )
      {
        case 5:
          *a2 = 10;
          break;
        case 6:
          *a2 = 11;
          break;
        case 255:
          *a2 = 10;
          break;
        default:
          *a2 = 0;
          result = -8;
          break;
      }
      break;
    default:
      *a2 = 0;
      result = -8;
      break;
  }
  return result;
}

//----- (007617A0) --------------------------------------------------------
signed int __cdecl sub_7617A0(int a1, int a2)
{
  signed int v2; // edi@1
  void *v3; // eax@1
  int v4; // ebx@4
  int v5; // ebp@4

  v2 = 0;
  v3 = operator new(56 * a2);
  *(_DWORD *)(a1 + 14304) = v3;
  if ( v3 )
  {
    (*(void (__cdecl **)(void *, int))&NULLSTR[5716])(v3, 56 * a2);
    if ( a2 > 0 )
    {
      v4 = 0;
      v5 = 0;
      while ( 1 )
      {
        *(_DWORD *)(v4 + *(_DWORD *)(a1 + 14304) + 52) = operator new(0x60u);
        if ( !*(_DWORD *)(v4 + *(_DWORD *)(a1 + 14304) + 52) )
          break;
        v4 += 56;
        if ( ++v5 >= a2 )
          return 0;
      }
      v2 = -5;
    }
  }
  else
  {
    v2 = -5;
  }
  return v2;
}
// B60724: using guessed type int (__cdecl *)(_DWORD, _DWORD);

//----- (00761840) --------------------------------------------------------
signed int __cdecl sub_761840(int a1, int *a2)
{
  signed int v2; // esi@1
  int v3; // edx@3
  int v4; // ebx@13
  int v5; // ebp@13

  v2 = sub_7616B0(a1, a2);
  if ( !v2 )
  {
    v2 = sub_7617A0(a1, *a2);
    if ( !v2 )
    {
      v3 = *(_DWORD *)(a1 + 84);
      if ( v3 == 1 && *(_DWORD *)(a1 + 88) == 4 )
      {
        sub_761540(a1, *(_DWORD *)(a1 + 14304), 1, 0, 1);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 56, 0, 1, 5, 0, 2);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 112, 0, 6, 63, 0, 2);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 168, 0, 1, 63, 2, 1);
        sub_761540(a1, *(_DWORD *)(a1 + 14304) + 224, 1, 1, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 280, 0, 1, 63, 1, 0);
        return v2;
      }
      if ( v3 == 2 && *(_DWORD *)(a1 + 88) == 255 )
      {
        sub_761540(a1, *(_DWORD *)(a1 + 14304), 2, 0, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 56, 0, 1, 5, 0, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 112, 1, 1, 5, 0, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 168, 0, 6, 63, 0, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 224, 1, 6, 63, 0, 0);
        return v2;
      }
      if ( v3 == 3 && *(_DWORD *)(a1 + 88) == 3 )
      {
        sub_761540(a1, *(_DWORD *)(a1 + 14304), 3, 0, 1);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 56, 0, 1, 5, 0, 2);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 112, 2, 1, 63, 0, 1);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 168, 1, 1, 63, 0, 1);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 224, 0, 6, 63, 0, 2);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 280, 0, 1, 63, 2, 1);
        sub_761540(a1, *(_DWORD *)(a1 + 14304) + 336, 3, 1, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 392, 2, 1, 63, 1, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 448, 1, 1, 63, 1, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 504, 0, 1, 63, 1, 0);
        return v2;
      }
      if ( v3 == 3 && *(_DWORD *)(a1 + 88) == 1 )
      {
        sub_761540(a1, *(_DWORD *)(a1 + 14304), 3, 0, 1);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 56, 0, 1, 5, 0, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 112, 1, 1, 5, 0, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 168, 2, 1, 5, 0, 0);
        sub_761540(a1, *(_DWORD *)(a1 + 14304) + 224, 3, 1, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 280, 0, 6, 63, 0, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 336, 1, 6, 63, 0, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 392, 2, 6, 63, 0, 0);
        return v2;
      }
      if ( v3 == 3 && *(_DWORD *)(a1 + 88) == 255 )
      {
        sub_761540(a1, *(_DWORD *)(a1 + 14304), 3, 0, 1);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 56, 0, 1, 5, 0, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 112, 1, 1, 5, 0, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 168, 2, 1, 5, 0, 0);
        sub_761540(a1, *(_DWORD *)(a1 + 14304) + 224, 3, 1, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 280, 0, 6, 63, 0, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 336, 1, 6, 63, 0, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 392, 2, 6, 63, 0, 0);
        return v2;
      }
      if ( v3 == 4 && *(_DWORD *)(a1 + 88) == 5 )
      {
        sub_761540(a1, *(_DWORD *)(a1 + 14304), 4, 0, 1);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 56, 0, 1, 5, 0, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 112, 1, 1, 5, 0, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 168, 2, 1, 5, 0, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 224, 3, 1, 5, 0, 0);
        sub_761540(a1, *(_DWORD *)(a1 + 14304) + 280, 4, 1, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 336, 0, 6, 63, 0, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 392, 1, 6, 63, 0, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 448, 2, 6, 63, 0, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 504, 3, 6, 63, 0, 0);
        return v2;
      }
      if ( v3 == 4 && *(_DWORD *)(a1 + 88) == 6 )
      {
        sub_761540(a1, *(_DWORD *)(a1 + 14304), 4, 0, 1);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 56, 0, 1, 5, 0, 2);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 112, 2, 1, 63, 0, 1);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 168, 1, 1, 63, 0, 1);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 224, 3, 1, 63, 0, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 280, 0, 6, 63, 0, 2);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 336, 0, 1, 63, 2, 1);
        sub_761540(a1, *(_DWORD *)(a1 + 14304) + 392, 4, 1, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 448, 2, 1, 63, 1, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 504, 1, 1, 63, 1, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 560, 0, 1, 63, 1, 0);
        return v2;
      }
      if ( v3 == 4 && *(_DWORD *)(a1 + 88) == 255 )
      {
        sub_761540(a1, *(_DWORD *)(a1 + 14304), 4, 0, 1);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 56, 0, 1, 5, 0, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 112, 1, 1, 5, 0, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 168, 2, 1, 5, 0, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 224, 3, 1, 5, 0, 0);
        sub_761540(a1, *(_DWORD *)(a1 + 14304) + 280, 4, 1, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 336, 0, 6, 63, 0, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 392, 1, 6, 63, 0, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 448, 2, 6, 63, 0, 0);
        sub_7614E0(a1, *(_DWORD *)(a1 + 14304) + 504, 3, 6, 63, 0, 0);
        return v2;
      }
      v2 = -8;
    }
  }
  if ( *a2 > 0 )
  {
    v4 = 0;
    v5 = 0;
    do
    {
      operator delete(*(void **)(v4 + *(_DWORD *)(a1 + 14304) + 52));
      v4 += 56;
      ++v5;
    }
    while ( v5 < *a2 );
  }
  operator delete(*(void **)(a1 + 14304));
  *(_DWORD *)(a1 + 14304) = 0;
  return v2;
}

//----- (007627F0) --------------------------------------------------------
signed int __cdecl Encode_Frame_P(struct _JPEG_PROPERTIES *a1)
{
  int v1; // ecx@1
  int v2; // edx@1
  int v3; // eax@1
  _FRAME_COMPONENT *v4; // edi@2
  __int16 *v5; // eax@4
  int v6; // ecx@6
  struct _SCAN *v7; // eax@8
  struct _JPEG_PROPERTIES *v8; // esi@13
  int v9; // esi@27
  signed int result; // eax@35
  struct _JPEG_PROPERTIES *v11; // edx@39
  struct _JPEG_PROPERTIES *v12; // eax@42
  int v13; // edx@42
  _RAW_DATA_TYPES_STATE *v14; // eax@44
  int v15; // ebx@46
  int v16; // edx@46
  int v17; // eax@46
  _FRAME_COMPONENT *v18; // edi@47
  int v19; // ebx@53
  int v20; // ecx@53
  struct _JPEG_PROPERTIES *v21; // ebx@53
  int v22; // edi@55
  char *v23; // ebx@55
  int v24; // edx@55
  int v25; // esi@57
  int v26; // edi@58
  int v27; // esi@60
  _FRAME_COMPONENT *v28; // esi@61
  int v29[257]; // [sp+0h] [bp-9B0h]@1
  int v30; // [sp+404h] [bp-5ACh]@7
  int v31; // [sp+808h] [bp-1A8h]@1
  __int16 *v32; // [sp+80Ch] [bp-1A4h]@1
  struct _SCAN *v33; // [sp+810h] [bp-1A0h]@1
  struct _STATE *v34; // [sp+814h] [bp-19Ch]@1
  int v35; // [sp+818h] [bp-198h]@1
  int v36; // [sp+81Ch] [bp-194h]@1
  int v37; // [sp+820h] [bp-190h]@1
  int v38; // [sp+824h] [bp-18Ch]@4
  int v39; // [sp+828h] [bp-188h]@4
  int v40; // [sp+82Ch] [bp-184h]@4
  int v41; // [sp+830h] [bp-180h]@46
  int v42; // [sp+834h] [bp-17Ch]@46
  struct _JPEG_PROPERTIES *v43; // [sp+838h] [bp-178h]@53
  int v44; // [sp+83Ch] [bp-174h]@54
  int v45; // [sp+840h] [bp-170h]@55
  int v46; // [sp+844h] [bp-16Ch]@57
  int i; // [sp+848h] [bp-168h]@59
  int v48; // [sp+84Ch] [bp-164h]@60
  int v49; // [sp+850h] [bp-160h]@60
  char *v50; // [sp+854h] [bp-15Ch]@60
  int v51; // [sp+858h] [bp-158h]@6
  unsigned __int8 v52; // [sp+85Ch] [bp-154h]@7
  unsigned __int8 v53; // [sp+86Ch] [bp-144h]@7
  int v54; // [sp+96Ch] [bp-44h]@11
  struct _JPEG_PROPERTIES *v55; // [sp+97Ch] [bp-34h]@1
  int v56; // [sp+980h] [bp-30h]@54
  int v57; // [sp+984h] [bp-2Ch]@59
  int v58; // [sp+988h] [bp-28h]@57
  struct _JPEG_PROPERTIES *v59; // [sp+98Ch] [bp-24h]@44
  int *v60; // [sp+990h] [bp-20h]@56
  CPPEH_RECORD ms_exc; // [sp+998h] [bp-18h]@1

  ms_exc.old_esp = (DWORD)v29;
  v31 = 0;
  v32 = 0;
  v33 = 0;
  v55 = a1;
  v34 = &a1->state;
  v35 = 0;
  ms_exc.registration.TryLevel = 0;
  v1 = 0;
  v36 = 0;
  v2 = 0;
  v37 = 0;
  v3 = a1->jframe.ncomps;
  if ( v3 > 0 )
  {
    v4 = a1->jframe.comps;
    do
    {
      v2 += v4[v1].vsampling * v4[v1].hsampling;
      v37 = v2;
      v36 = ++v1;
    }
    while ( v1 < v3 );
  }
  v38 = v55->numyMCUs * v55->numxMCUs;
  v39 = v2 << 6;
  v40 = v38 * (v2 << 6);
  v5 = (__int16 *)operator new(2 * v38 * (v2 << 6));
  a1->coef_buffer = v5;
  if ( !v5 )
  {
    v35 = -5;
    goto LABEL_25;
  }
  if ( a1->jscan )
    goto LABEL_6;
  result = sub_761840((int)a1, &v31);
  v35 = result;
  if ( result )
    return result;
  v11 = a1;
  if ( a1->iotype != 9 && a1->iotype != 8 )
  {
    v35 = EP_Write_SOI(v34);
    if ( v35 )
      goto LABEL_25;
    v11 = a1;
  }
  v35 = EP_Write_SOF2(v34, &v11->jframe);
  if ( !v35 )
  {
    v12 = a1;
    v13 = a1->jframe.restart_interv;
    if ( v13 )
    {
      v35 = EP_Write_DRI(v13, v34);
      if ( v35 )
        goto LABEL_25;
      v12 = a1;
    }
    v35 = Set_Encode_Fast_Path(v12);
    if ( !v35 )
    {
      v59 = a1;
      v14 = a1->raw_coefs;
      if ( v14 && !v14->data_type )
      {
        v15 = 0;
        v41 = 0;
        v16 = 0;
        v42 = 0;
        v17 = v59->jframe.ncomps;
        if ( v17 > 0 )
        {
          v18 = v59->jframe.comps;
          do
          {
            v15 += v18[v16].hsampling * v18[v16].vsampling;
            v41 = v15;
            v42 = ++v16;
          }
          while ( v16 < v17 );
        }
        v19 = v15 << 6;
        v39 = v19;
        v20 = v59->numxMCUs;
        v41 = v20 * v19;
        v55 = 0;
        v43 = 0;
        v21 = (struct _JPEG_PROPERTIES *)v59->numyMCUs;
        if ( (signed int)v21 > 0 )
        {
          do
          {
            v56 = 0;
            v44 = 0;
            if ( v20 > 0 )
            {
              do
              {
                v22 = v39 * 2 * v56;
                v23 = (char *)v59->coef_buffer + v41 * 2 * (_DWORD)v55 + v22;
                v32 = (__int16 *)((char *)v59->coef_buffer + v41 * 2 * (_DWORD)v55 + v22);
                v24 = 0;
                v45 = 0;
                if ( v17 > 0 )
                {
                  v60 = &v59->jframe.comps->ident;
                  do
                  {
                    v58 = 0;
                    v46 = 0;
                    v25 = v60[4 * v24 + 2];
                    if ( v25 > 0 )
                    {
                      v26 = v60[4 * v24 + 1];
                      do
                      {
                        v57 = 0;
                        for ( i = 0; i < v26; v57 = i )
                        {
                          v60 = &v59->raw_coefs->data_type;
                          v27 = 16 * v57
                              + 16 * v56 * v26
                              + v26 * (v58 << 7) * v20
                              + v60[v24 + 1]
                              + v26 * v20 * ((_DWORD)v55 << 7) * v25;
                          v48 = v27;
                          v49 = 0;
                          v50 = v23;
                          do
                          {
                            (*(void (__cdecl **)(char *, int, signed int))&NULLSTR[5720])(v23, v27, 16);
                            ++v49;
                            v59 = a1;
                            v20 = a1->numxMCUs;
                            v28 = a1->jframe.comps;
                            v60 = (int *)v28;
                            v24 = v45;
                            v58 = 16 * v45;
                            v26 = v28[v45].hsampling;
                            v27 = v48 + v26 * 16 * v20;
                            v48 += v26 * 16 * v20;
                            v23 = (char *)(v32 + 8);
                            v32 += 8;
                          }
                          while ( v49 < 8 );
                          v55 = v43;
                          v56 = v44;
                          v25 = *(int *)((char *)v60 + v58 + 8);
                          v58 = v46;
                          ++i;
                        }
                        v46 = ++v58;
                      }
                      while ( v58 < v25 );
                      v17 = v59->jframe.ncomps;
                    }
                    v45 = ++v24;
                  }
                  while ( v24 < v17 );
                }
                v44 = ++v56;
              }
              while ( v56 < v20 );
              v21 = (struct _JPEG_PROPERTIES *)v59->numyMCUs;
            }
            v55 = (struct _JPEG_PROPERTIES *)((char *)v55 + 1);
            v43 = v55;
          }
          while ( (signed int)v55 < (signed int)v21 );
        }
LABEL_6:
        v6 = 0;
        v36 = 0;
        v51 = 0;
        if ( v31 <= 0 )
        {
LABEL_31:
          v35 = EP_Write_EOI(v34);
          if ( !v35 )
          {
            v35 = Flush_Buffer_To_File((int)v34);
            if ( !v35 )
              ms_exc.registration.TryLevel = -1;
          }
        }
        else
        {
          while ( 1 )
          {
            v33 = &a1->jscan[v6];
            (*(void (__cdecl **)(int *, signed int))&NULLSTR[5716])(v29, 1028);
            (*(void (__cdecl **)(int *, signed int))&NULLSTR[5716])(&v30, 1028);
            (*(void (__cdecl **)(unsigned __int8 *, signed int))&NULLSTR[5716])(&v52, 16);
            (*(void (__cdecl **)(unsigned __int8 *, signed int))&NULLSTR[5716])(&v53, 256);
            v35 = Gather_statistics(a1, v34, v33, (int (*const )[257])v29);
            if ( v35 )
              break;
            v7 = v33;
            if ( v33->start_spec || v33->end_spec )
            {
              if ( v33->comps->comp )
              {
                v54 = 1;
                Make_optimal_huff_table(&v30, &v52, &v53);
                v35 = BuildEncoderHuffmanTable((int)&v52, (int)&v53, (int)&a1->jFmtAcHuffman[1]);
                if ( v35 )
                  goto LABEL_25;
                a1->jEncFmtAcHuffman[1] = &a1->jFmtAcHuffman[1];
                v35 = EP_Write_DHT_Ex(v34, &v52, &v53, 1, 1);
                if ( v35 )
                  goto LABEL_25;
                v7 = v33;
                v8 = a1;
              }
              else
              {
                v54 = 0;
                Make_optimal_huff_table(v29, &v52, &v53);
                v35 = BuildEncoderHuffmanTable((int)&v52, (int)&v53, (int)a1->jFmtAcHuffman);
                if ( v35 )
                  goto LABEL_25;
                a1->jEncFmtAcHuffman[0] = a1->jFmtAcHuffman;
                v35 = EP_Write_DHT_Ex(v34, &v52, &v53, 1, 0);
                if ( v35 )
                  goto LABEL_25;
                v7 = v33;
                v8 = a1;
              }
            }
            else if ( v33->approx_high )
            {
              v8 = a1;
            }
            else
            {
              v33->dc_diff[0] = 0;
              v7->dc_diff[1] = 0;
              v7->dc_diff[2] = 0;
              v7->dc_diff[3] = 0;
              v54 = 0;
              Make_optimal_huff_table(v29, &v52, &v53);
              v35 = BuildEncoderHuffmanTable((int)&v52, (int)&v53, (int)a1->jFmtDcHuffman);
              if ( v35 )
                goto LABEL_25;
              a1->jEncFmtDcHuffman[0] = a1->jFmtDcHuffman;
              v35 = EP_Write_DHT_Ex(v34, &v52, &v53, 0, 0);
              if ( v35 )
                goto LABEL_25;
              v8 = a1;
              if ( a1->JPGChannels == 1 )
              {
                v7 = v33;
              }
              else
              {
                (*(void (__cdecl **)(unsigned __int8 *, signed int))&NULLSTR[5716])(&v52, 16);
                (*(void (__cdecl **)(_DWORD, signed int))&NULLSTR[5716])(&v53, 256);
                v54 = 1;
                Make_optimal_huff_table(&v30, &v52, &v53);
                v35 = BuildEncoderHuffmanTable((int)&v52, (int)&v53, (int)&a1->jFmtDcHuffman[1]);
                if ( v35 )
                  goto LABEL_25;
                a1->jEncFmtDcHuffman[1] = &a1->jFmtDcHuffman[1];
                v35 = EP_Write_DHT_Ex(v34, &v52, &v53, 0, 1);
                if ( v35 )
                  goto LABEL_25;
                v7 = v33;
                v8 = a1;
              }
            }
            v35 = EP_Write_SOS_Ex(
                    v34,
                    v7,
                    (unsigned __int8 *)v8->HuffIdentifierDC,
                    (unsigned __int8 *)v8->HuffIdentifierAC);
            if ( v35 )
              goto LABEL_25;
            v35 = Encode_Scan_P(a1, v34, v33);
            if ( v35 < 0 )
              goto LABEL_25;
            ++v51;
            v6 = v36 + 1;
            v36 = v6;
            if ( v6 >= v31 )
              goto LABEL_31;
          }
        }
        goto LABEL_25;
      }
      v35 = Fill_coeffs_buffer(v59);
      if ( !v35 )
        goto LABEL_6;
    }
  }
LABEL_25:
  if ( a1->jscan )
  {
    v36 = 0;
    if ( v31 > 0 )
    {
      do
      {
        operator delete(a1->jscan[v36].comps);
        v9 = v36 + 1;
        a1->jscan[v36].comps = 0;
        v36 = v9;
      }
      while ( v9 < v31 );
    }
    operator delete(a1->jscan);
    a1->jscan = 0;
  }
  return v35;
}
// B60724: using guessed type int (__cdecl *)(_DWORD, _DWORD);
// B60728: using guessed type int (__cdecl *)(_DWORD, _DWORD, _DWORD);

//----- (007631E0) --------------------------------------------------------
void *ownGetLibVersion()
{
  return &unk_A78F40;
}

//----- (007631F0) --------------------------------------------------------
signed int __cdecl FillEncoderQuantTable_AAN(int a1)
{
  signed int v1; // ecx@3
  signed int v2; // esi@4
  signed int result; // eax@5
  __int16 v4; // [sp+0h] [bp-8Ch]@4
  __int16 v5; // [sp+2h] [bp-8Ah]@4
  __int16 v6; // [sp+4h] [bp-88h]@6
  __int16 v7[67]; // [sp+6h] [bp-86h]@6

  if ( (signed int)*(_WORD *)(a1 + 126) < 2 )
    *(_WORD *)(a1 + 126) = 2;
  v1 = 0;
  do
  {
    v2 = *(_WORD *)(a1 + 2 * v1 + 2);
    *(&v4 + v1) = (dword_B68220[v1] + ((signed int)*(_WORD *)(a1 + 2 * v1) >> 1)) / *(_WORD *)(a1 + 2 * v1);
    *(&v5 + v1) = (dword_B68224[v1] + (v2 >> 1)) / v2;
    v1 += 2;
  }
  while ( v1 < 64 );
  result = 0;
  do
  {
    *(_WORD *)(a1 + 2 * izigzag_index[result]) = *(&v4 + result);
    *(_WORD *)(a1 + 2 * dword_B67EE4[result]) = *(&v5 + result);
    *(_WORD *)(a1 + 2 * dword_B67EE8[result]) = *(&v6 + result);
    *(_WORD *)(a1 + 2 * dword_B67EEC[result]) = v7[result];
    result += 4;
  }
  while ( result < 64 );
  return result;
}
// B67EE0: using guessed type int izigzag_index[];
// B67EE4: using guessed type int dword_B67EE4[];
// B67EE8: using guessed type int dword_B67EE8[];
// B67EEC: using guessed type int dword_B67EEC[];
// B68220: using guessed type int dword_B68220[];
// B68224: using guessed type int dword_B68224[];
// 7631F0: using guessed type __int16 var_86[67];

//----- (007632B0) --------------------------------------------------------
signed int __cdecl fQnt8x8_AAN_PX(int a1, int a2)
{
  signed int result; // eax@1
  int v3; // ebx@2
  int v4; // esi@2
  int v5; // ebx@2
  int v6; // esi@2
  int v7; // ebx@2

  result = 0;
  do
  {
    v3 = *(_WORD *)(a1 + 2 * result + 2);
    *(_WORD *)(a1 + 2 * result) = (*(_WORD *)(a1 + 2 * result) * (signed int)*(_WORD *)(a2 + 2 * result) + 0x4000) >> 15;
    v4 = (v3 * *(_WORD *)(a2 + 2 * result + 2) + 0x4000) >> 15;
    v5 = *(_WORD *)(a1 + 2 * result + 4);
    *(_WORD *)(a1 + 2 * result + 2) = v4;
    v6 = (v5 * *(_WORD *)(a2 + 2 * result + 4) + 0x4000) >> 15;
    v7 = *(_WORD *)(a1 + 2 * result + 6);
    *(_WORD *)(a1 + 2 * result + 4) = v6;
    *(_WORD *)(a1 + 2 * result + 6) = (v7 * *(_WORD *)(a2 + 2 * result + 6) + 0x4000) >> 15;
    result += 4;
  }
  while ( result < 64 );
  return result;
}

//----- (00763340) --------------------------------------------------------
int __cdecl fDCT8x8_AAN_PX(int a1)
{
  int *v1; // eax@1
  int v2; // ecx@2
  int v3; // ebp@2
  int v4; // esi@2
  int v5; // ecx@2
  int v6; // ebx@2
  int v7; // edx@2
  int v8; // edi@2
  int v9; // eax@2
  int v10; // edx@2
  int v11; // ebp@2
  int v12; // esi@2
  int v13; // ecx@2
  int v14; // ebx@2
  int v15; // edi@2
  int *v16; // eax@2
  int v17; // ebx@2
  int v18; // ebp@2
  int v19; // edx@2
  int v20; // ebx@2
  int v21; // esi@2
  int v22; // ebx@2
  int v23; // edx@2
  int v24; // ebp@2
  int v25; // ecx@2
  int v26; // edx@2
  int v27; // edx@3
  int v28; // ecx@3
  int v29; // ebp@4
  int v30; // ebx@4
  int v31; // eax@4
  int v32; // ebp@4
  int v33; // eax@4
  int v34; // edi@4
  int v35; // eax@4
  int v36; // ebp@4
  int v37; // eax@4
  int v38; // esi@4
  int v39; // eax@4
  int v40; // ebp@4
  int v41; // eax@4
  int v42; // edx@4
  int v43; // eax@4
  int v44; // ebx@4
  int v45; // edx@4
  int v46; // esi@4
  int v47; // eax@4
  int v48; // edx@4
  int v49; // edi@4
  int v50; // edx@4
  int v51; // ebp@4
  int result; // eax@4
  char v53; // [sp+1Fh] [bp-145h]@1
  int v54; // [sp+120h] [bp-44h]@1
  int v55; // [sp+124h] [bp-40h]@1
  unsigned int v56; // [sp+128h] [bp-3Ch]@1
  int v57; // [sp+12Ch] [bp-38h]@1
  int *v58; // [sp+130h] [bp-34h]@2
  int v59; // [sp+134h] [bp-30h]@2
  int v60; // [sp+138h] [bp-2Ch]@2
  int v61; // [sp+13Ch] [bp-28h]@2
  int v62; // [sp+140h] [bp-24h]@2
  int v63; // [sp+144h] [bp-20h]@2
  int v64; // [sp+148h] [bp-1Ch]@2
  int v65; // [sp+14Ch] [bp-18h]@2

  v1 = (int *)((unsigned int)&v53 & 0xFFFFFFE0);
  v54 = 7;
  v57 = a1;
  v56 = (unsigned int)&v53 & 0xFFFFFFE0;
  v55 = a1;
  do
  {
    v58 = v1;
    v59 = *(_WORD *)v57;
    v2 = *(_WORD *)(v57 + 14);
    v60 = *(_WORD *)(v57 + 14);
    v3 = *(_WORD *)(v57 + 2);
    v4 = *(_WORD *)(v57 + 12);
    v61 = v59 + v2;
    v5 = *(_WORD *)(v57 + 4);
    v62 = v3 + v4;
    v6 = *(_WORD *)(v57 + 10);
    v63 = v5 + v6;
    v7 = *(_WORD *)(v57 + 6);
    v8 = *(_WORD *)(v57 + 8);
    v9 = v7 + v8;
    v10 = v7 - v8;
    v64 = v5 - v6;
    v65 = v3 - v4;
    v11 = v61 + v9;
    v12 = v61 - v9;
    v59 -= v60;
    v13 = v62 + v5 + v6;
    v14 = v62 - v63;
    v15 = v61 + v9 + v62 + v63;
    v16 = v58;
    *v58 = v15;
    v16[4] = v11 - v13;
    v17 = (23170 * (v12 + v14) + 0x4000) >> 15;
    v16[2] = v12 + v17;
    v18 = v64;
    v19 = v64 + v10;
    v16[6] = v12 - v17;
    v20 = (12540 * (v19 - (v59 + v65)) + 0x4000) >> 15;
    v21 = v20 + ((17734 * v19 + 0x4000) >> 15);
    v22 = ((42813 * (v59 + v65) + 0x4000) >> 15) + v20;
    v23 = (23170 * (v65 + v18) + 0x4000) >> 15;
    v24 = v59 + v23;
    v25 = v59 - v23;
    v16[5] = v21 + v59 - v23;
    v16[3] = v25 - v21;
    v16[1] = v22 + v24;
    v26 = v54 - 1;
    v16[7] = v24 - v22;
    v1 = v16 + 8;
    v57 += 16;
    v54 = v26;
  }
  while ( v26 >= 0 );
  v27 = v56;
  v28 = v55;
  v54 = 7;
  do
  {
    v56 = v27;
    v29 = *(_DWORD *)(v27 + 224);
    v30 = *(_DWORD *)v27 + v29;
    v31 = *(_DWORD *)v27 - v29;
    v32 = *(_DWORD *)(v27 + 192);
    v65 = v31;
    v33 = *(_DWORD *)(v27 + 32);
    v34 = v33 + v32;
    v35 = v33 - v32;
    v36 = *(_DWORD *)(v27 + 160);
    v64 = v35;
    v37 = *(_DWORD *)(v27 + 64);
    v38 = v37 + v36;
    v39 = v37 - v36;
    v40 = *(_DWORD *)(v27 + 128);
    v63 = v39;
    v41 = *(_DWORD *)(v27 + 96);
    v42 = v41 + v40;
    v43 = v41 - v40;
    LOWORD(v40) = v30 + v42;
    v44 = v30 - v42;
    *(_WORD *)v28 = v40 + v34 + v38;
    *(_WORD *)(v28 + 64) = v40 - (v34 + v38);
    v45 = (23170 * (v44 + v34 - v38) + 0x4000) >> 15;
    *(_WORD *)(v28 + 32) = v44 + v45;
    v46 = v63;
    v47 = v63 + v43;
    *(_WORD *)(v28 + 96) = v44 - v45;
    v48 = (12540 * (v47 - (v65 + v64)) + 0x4000) >> 15;
    v49 = v48 + ((17734 * v47 + 0x4000) >> 15);
    v50 = ((42813 * (v65 + v64) + 0x4000) >> 15) + v48;
    v51 = (23170 * (v64 + v46) + 0x4000) >> 15;
    LOWORD(v47) = v65 + v51;
    LOWORD(v44) = v65 - v51;
    *(_WORD *)(v28 + 80) = v49 + v65 - v51;
    *(_WORD *)(v28 + 48) = v44 - v49;
    LOWORD(v44) = v50 + v47;
    LOWORD(v47) = v47 - v50;
    *(_WORD *)(v28 + 16) = v44;
    v27 = v56 + 4;
    *(_WORD *)(v28 + 112) = v47;
    v28 += 2;
    result = v54-- - 1;
  }
  while ( v54 >= 0 );
  return result;
}

//----- (00763650) --------------------------------------------------------
int __cdecl fQnt8x8_AAN_M5(int a1, int a2)
{
  return own_fqnt8x8_aan_m5(a1, a2);
}

//----- (00763670) --------------------------------------------------------
int __cdecl fDCT8x8_AAN_M5(int a1)
{
  return own_fdct8x8_aan_m5(a1);
}

//----- (00763690) --------------------------------------------------------
int __cdecl FillDecoderQuantTable_AAN(int a1)
{
  signed int v1; // eax@1
  double v2; // st7@1
  double v3; // st6@1
  double v4; // st5@1
  double v5; // kr00_8@2
  int v6; // ecx@2
  unsigned int v7; // esi@3
  double v8; // kr08_8@6
  int v9; // ecx@6
  unsigned int v10; // esi@7
  double v11; // kr10_8@10
  int v12; // ecx@10
  unsigned int v13; // esi@11
  double v14; // kr18_8@14
  int v15; // ecx@14
  unsigned int v16; // esi@15
  int v17; // ecx@18
  signed int v18; // eax@19
  int result; // eax@21
  __int16 v20; // [sp+0h] [bp-BCh]@6
  __int16 v21; // [sp+2h] [bp-BAh]@20
  __int16 v22; // [sp+4h] [bp-B8h]@20
  __int16 v23[61]; // [sp+6h] [bp-B6h]@20
  unsigned int v24; // [sp+80h] [bp-3Ch]@6
  double v25; // [sp+98h] [bp-24h]@2
  int v26; // [sp+A0h] [bp-1Ch]@2

  v1 = 0;
  v2 = dbl_B68550;
  v3 = dbl_B68548;
  v4 = dbl_B68540;
  do
  {
    v26 = *(_WORD *)(a1 + 2 * v1);
    v25 = (double)v26 * dbl_B68340[v1] * v3 * v4 + v2;
    v5 = v25;
    v6 = (HIDWORD(v5) >> 20) & 0x7FF;
    if ( v6 <= 1022 )
    {
      v7 = 0;
    }
    else
    {
      v7 = ((unsigned int)(*(_QWORD *)&v25 >> 21) | 0x80000000) >> (30 - v6);
      if ( SHIDWORD(v5) < 0 )
        v7 = -v7;
    }
    v24 = v7;
    *(&v20 + izigzag_index[v1]) = v7;
    v26 = *(_WORD *)(a1 + 2 * v1 + 2);
    v25 = (double)v26 * dbl_B68348[v1] * v3 * v4 + v2;
    v8 = v25;
    v9 = (HIDWORD(v8) >> 20) & 0x7FF;
    if ( v9 <= 1022 )
    {
      v10 = 0;
    }
    else
    {
      v10 = ((unsigned int)(*(_QWORD *)&v25 >> 21) | 0x80000000) >> (30 - v9);
      if ( SHIDWORD(v8) < 0 )
        v10 = -v10;
    }
    v24 = v10;
    *(&v20 + dword_B67EE4[v1]) = v10;
    v26 = *(_WORD *)(a1 + 2 * v1 + 4);
    v25 = (double)v26 * dbl_B68350[v1] * v3 * v4 + v2;
    v11 = v25;
    v12 = (HIDWORD(v11) >> 20) & 0x7FF;
    if ( v12 <= 1022 )
    {
      v13 = 0;
    }
    else
    {
      v13 = ((unsigned int)(*(_QWORD *)&v25 >> 21) | 0x80000000) >> (30 - v12);
      if ( SHIDWORD(v11) < 0 )
        v13 = -v13;
    }
    v24 = v13;
    *(&v20 + dword_B67EE8[v1]) = v13;
    v26 = *(_WORD *)(a1 + 2 * v1 + 6);
    v25 = (double)v26 * dbl_B68358[v1] * v3 * v4 + v2;
    v14 = v25;
    v15 = (HIDWORD(v14) >> 20) & 0x7FF;
    if ( v15 <= 1022 )
    {
      v16 = 0;
    }
    else
    {
      v16 = ((unsigned int)(*(_QWORD *)&v25 >> 21) | 0x80000000) >> (30 - v15);
      if ( SHIDWORD(v14) < 0 )
        v16 = -v16;
    }
    v24 = v16;
    v17 = dword_B67EEC[v1];
    v1 += 4;
    *(&v20 + v17) = v16;
  }
  while ( v1 < 64 );
  v18 = 0;
  do
  {
    *(_WORD *)(a1 + 2 * v18) = *(&v20 + v18);
    *(_WORD *)(a1 + 2 * v18 + 2) = *(&v21 + v18);
    *(_WORD *)(a1 + 2 * v18 + 4) = *(&v22 + v18);
    *(_WORD *)(a1 + 2 * v18 + 6) = v23[v18];
    v18 += 4;
  }
  while ( v18 < 64 );
  result = 0;
  *(_WORD *)(a1 + 128) = 0;
  *(_WORD *)(a1 + 130) = 0;
  *(_WORD *)(a1 + 132) = 0;
  *(_WORD *)(a1 + 134) = 0;
  *(_WORD *)(a1 + 136) = 0;
  *(_WORD *)(a1 + 138) = 0;
  *(_WORD *)(a1 + 140) = 0;
  *(_WORD *)(a1 + 142) = 0;
  *(_WORD *)(a1 + 144) = 0;
  *(_WORD *)(a1 + 146) = 0;
  *(_WORD *)(a1 + 148) = 0;
  *(_WORD *)(a1 + 150) = 0;
  *(_WORD *)(a1 + 152) = 0;
  *(_WORD *)(a1 + 154) = 0;
  *(_WORD *)(a1 + 156) = 0;
  *(_WORD *)(a1 + 158) = 0;
  return result;
}
// B67EE0: using guessed type int izigzag_index[];
// B67EE4: using guessed type int dword_B67EE4[];
// B67EE8: using guessed type int dword_B67EE8[];
// B67EEC: using guessed type int dword_B67EEC[];
// B68340: using guessed type double dbl_B68340[];
// B68348: using guessed type double dbl_B68348[];
// B68350: using guessed type double dbl_B68350[];
// B68358: using guessed type double dbl_B68358[];
// B68540: using guessed type double dbl_B68540;
// B68548: using guessed type double dbl_B68548;
// B68550: using guessed type double dbl_B68550;
// 763690: using guessed type __int16 var_B6[61];

//----- (00763990) --------------------------------------------------------
signed int __cdecl iQnt8x8_AAN_PX(int a1, int a2)
{
  signed int result; // eax@1
  int v3; // ebx@2
  int v4; // esi@2
  int v5; // ebx@2
  int v6; // esi@2
  int v7; // ebx@2

  result = 0;
  do
  {
    v3 = *(_WORD *)(a1 + 2 * result + 2);
    *(_WORD *)(a1 + 2 * result) = (*(_WORD *)(a1 + 2 * result) * (signed int)*(_WORD *)(a2 + 2 * result) + 64) >> 7;
    v4 = (v3 * *(_WORD *)(a2 + 2 * result + 2) + 64) >> 7;
    v5 = *(_WORD *)(a1 + 2 * result + 4);
    *(_WORD *)(a1 + 2 * result + 2) = v4;
    v6 = (v5 * *(_WORD *)(a2 + 2 * result + 4) + 64) >> 7;
    v7 = *(_WORD *)(a1 + 2 * result + 6);
    *(_WORD *)(a1 + 2 * result + 4) = v6;
    *(_WORD *)(a1 + 2 * result + 6) = (v7 * *(_WORD *)(a2 + 2 * result + 6) + 64) >> 7;
    result += 4;
  }
  while ( result < 64 );
  return result;
}

//----- (00763A10) --------------------------------------------------------
int __cdecl iDCT8x8_AAN_PX(int a1)
{
  int v1; // edx@1
  int v2; // eax@1
  int v3; // ST10_4@2
  int v4; // ebp@2
  int v5; // ecx@2
  int v6; // ebx@2
  int v7; // edi@2
  int v8; // esi@2
  int v9; // ebp@2
  int v10; // edi@2
  int v11; // esi@2
  int v12; // edi@2
  int v13; // esi@2
  __int16 v14; // ST0C_2@2
  int v15; // ST08_4@2
  int v16; // ST04_4@2
  __int16 v17; // ST1C_2@2
  int v18; // ecx@2
  int v19; // edx@2
  int v20; // edi@2
  int v21; // ecx@2
  int v22; // edx@2
  int v23; // ecx@3
  int result; // eax@3
  int v25; // eax@4
  int v26; // ebp@4
  int v27; // esi@4
  int v28; // ebx@4
  int v29; // eax@4
  int v30; // edx@4
  int v31; // ebx@4
  int v32; // eax@4
  int v33; // edi@4
  int v34; // ebx@4
  int v35; // esi@4
  int v36; // edi@4
  int v37; // edx@4
  int v38; // ebx@4
  int v39; // eax@4
  int v40; // edx@4
  int v41; // ebx@4
  int v42; // ebp@4
  int v43; // edi@4
  int v44; // eax@4
  int v45; // ebp@4
  int v46; // edx@4
  int v47; // ebx@4
  int v48; // edi@4
  int v49; // edi@7
  int v50; // edi@10
  int v51; // edi@13
  int v52; // esi@16
  int v53; // ebx@19
  int v54; // edx@22
  int v55; // ebp@25
  int v56; // [sp+4h] [bp-30h]@4
  int v57; // [sp+8h] [bp-2Ch]@4
  int v58; // [sp+Ch] [bp-28h]@4
  int v59; // [sp+10h] [bp-24h]@4
  signed int v60; // [sp+14h] [bp-20h]@1
  signed int v61; // [sp+14h] [bp-20h]@3
  int v62; // [sp+1Ch] [bp-18h]@4
  int v63; // [sp+20h] [bp-14h]@4

  v1 = a1;
  v2 = a1;
  v60 = 8;
  do
  {
    v3 = v1;
    v4 = *(_WORD *)(v1 + 48);
    v5 = *(_WORD *)(v1 + 80) - v4;
    v6 = v4 + *(_WORD *)(v1 + 80);
    v7 = *(_WORD *)(v1 + 16);
    v8 = *(_WORD *)(v1 + 112);
    v9 = v7 + v8;
    v10 = v7 - v8;
    v11 = (25080 * (v5 - v10) + 0x4000) >> 15;
    v12 = ((35468 * v10 + 0x4000) >> 15) - v11;
    v13 = v11 - ((85627 * v5 + 0x4000) >> 15);
    v14 = v9 + v6;
    v15 = v12 - (v9 + v6);
    v16 = ((46341 * (v9 - v6) + 0x4000) >> 15) - (v12 - (v9 + v6));
    LOWORD(v5) = *(_WORD *)(v1 + 64);
    v17 = v16 + v13;
    LOWORD(v9) = *(_WORD *)v1 + v5;
    LOWORD(v13) = *(_WORD *)v1 - v5;
    v18 = *(_WORD *)(v1 + 32);
    v19 = *(_WORD *)(v1 + 96);
    v20 = v18 - v19;
    v21 = v19 + v18;
    v22 = ((46341 * v20 + 0x4000) >> 15) - v21;
    LOWORD(v20) = v21 + v9;
    LOWORD(v9) = v9 - v21;
    LOWORD(v21) = v22 + v13;
    LOWORD(v13) = v13 - v22;
    *(_WORD *)v2 = v14 + v20;
    *(_WORD *)(v2 + 16) = v21 + v15;
    *(_WORD *)(v2 + 32) = v13 + v16;
    *(_WORD *)(v2 + 48) = v9 - v17;
    *(_WORD *)(v2 + 64) = v17 + v9;
    *(_WORD *)(v2 + 80) = v13 - v16;
    *(_WORD *)(v2 + 96) = v21 - v15;
    *(_WORD *)(v2 + 112) = v20 - v14;
    v1 = v3 + 2;
    v2 += 2;
    --v60;
  }
  while ( v60 > 0 );
  v23 = a1;
  result = a1;
  v61 = 8;
  do
  {
    v63 = result;
    v25 = *(_WORD *)(v23 + 6);
    v26 = *(_WORD *)(v23 + 10) - v25;
    v27 = v25 + *(_WORD *)(v23 + 10);
    v28 = *(_WORD *)(v23 + 2);
    v29 = *(_WORD *)(v23 + 14);
    v30 = v28 + v29;
    v31 = v28 - v29;
    v32 = (25080 * (v26 - v31) + 0x4000) >> 15;
    v33 = ((35468 * v31 + 0x4000) >> 15) - v32;
    v34 = v30 - v27;
    v35 = v30 + v27;
    v36 = v33 - v35;
    v58 = v35;
    v56 = v36;
    v37 = ((46341 * v34 + 0x4000) >> 15) - v36;
    v59 = v37;
    v38 = *(_WORD *)v23;
    v62 = v37 + v32 - ((85627 * v26 + 0x4000) >> 15);
    v39 = *(_WORD *)(v23 + 8);
    v40 = v38 + v39;
    v41 = v38 - v39;
    v42 = *(_WORD *)(v23 + 12);
    v43 = v42 + *(_WORD *)(v23 + 4);
    v44 = ((46341 * (*(_WORD *)(v23 + 4) - v42) + 0x4000) >> 15) - v43;
    v45 = v43 + v40;
    v57 = v40 - v43;
    v46 = v44 + v41;
    v47 = v41 - v44;
    v48 = ((v35 + v45 + 8) >> 4) + 128;
    if ( v48 < 0 )
    {
      LOWORD(v48) = 0;
    }
    else if ( v48 > 255 )
    {
      LOWORD(v48) = 255;
    }
    *(_WORD *)v63 = v48;
    v49 = ((v46 + v56 + 8) >> 4) + 128;
    if ( v49 < 0 )
    {
      LOWORD(v49) = 0;
    }
    else if ( v49 > 255 )
    {
      LOWORD(v49) = 255;
    }
    *(_WORD *)(v63 + 2) = v49;
    v50 = ((v47 + v59 + 8) >> 4) + 128;
    if ( v50 < 0 )
    {
      LOWORD(v50) = 0;
    }
    else if ( v50 > 255 )
    {
      LOWORD(v50) = 255;
    }
    *(_WORD *)(v63 + 4) = v50;
    v51 = ((v57 - v62 + 8) >> 4) + 128;
    if ( v51 < 0 )
    {
      LOWORD(v51) = 0;
    }
    else if ( v51 > 255 )
    {
      LOWORD(v51) = 255;
    }
    *(_WORD *)(v63 + 6) = v51;
    v52 = ((v57 + v62 + 8) >> 4) + 128;
    if ( v52 < 0 )
    {
      LOWORD(v52) = 0;
    }
    else if ( v52 > 255 )
    {
      LOWORD(v52) = 255;
    }
    *(_WORD *)(v63 + 8) = v52;
    v53 = ((v47 - v59 + 8) >> 4) + 128;
    if ( v53 < 0 )
    {
      LOWORD(v53) = 0;
    }
    else if ( v53 > 255 )
    {
      LOWORD(v53) = 255;
    }
    *(_WORD *)(v63 + 10) = v53;
    v54 = ((v46 - v56 + 8) >> 4) + 128;
    if ( v54 < 0 )
    {
      LOWORD(v54) = 0;
    }
    else if ( v54 > 255 )
    {
      LOWORD(v54) = 255;
    }
    *(_WORD *)(v63 + 12) = v54;
    v55 = ((v45 - v58 + 8) >> 4) + 128;
    if ( v55 < 0 )
    {
      LOWORD(v55) = 0;
    }
    else if ( v55 > 255 )
    {
      LOWORD(v55) = 255;
    }
    *(_WORD *)(v63 + 14) = v55;
    v23 += 16;
    result = v63 + 16;
    --v61;
  }
  while ( v61 > 0 );
  return result;
}

//----- (00763E00) --------------------------------------------------------
int __cdecl iDCT8x8_AAN_M5(int a1)
{
  return own_idct8x8_aan_m5(a1);
}

//----- (00763E20) --------------------------------------------------------
int __cdecl iDCT4x4_AAN_PX(int a1)
{
  int v1; // esi@1
  int v2; // ebp@2
  int v3; // ebx@2
  int v4; // eax@2
  signed int v5; // eax@2
  __int16 v6; // dx@2
  __int16 v7; // cx@2
  int v8; // eax@2
  int v9; // ebp@2
  __int16 v10; // dx@2
  int v11; // eax@2
  int result; // eax@6
  int v13; // edx@6
  int v14; // ecx@6
  int v15; // ebx@6
  int v16; // esi@6
  signed int v17; // esi@6
  int v18; // ebp@6
  int v19; // ebx@6
  int v20; // esi@6
  int v21; // ecx@6
  int v22; // edx@6
  int v23; // edx@9
  int v24; // ebx@12
  int v25; // ebp@15
  int v26; // edx@18
  int v27; // ecx@18
  int v28; // ebx@18
  int v29; // esi@18
  signed int v30; // esi@18
  int v31; // ebp@18
  int v32; // ebx@18
  int v33; // esi@18
  int v34; // ecx@18
  int v35; // edx@18
  int v36; // edx@21
  int v37; // ebx@24
  int v38; // ebp@27
  int v39; // edx@30
  int v40; // ecx@30
  int v41; // ebx@30
  int v42; // esi@30
  signed int v43; // esi@30
  int v44; // ebp@30
  int v45; // ebx@30
  int v46; // esi@30
  int v47; // ecx@30
  int v48; // edx@30
  int v49; // edx@33
  int v50; // ebx@36
  int v51; // ebp@39
  int v52; // edx@42
  int v53; // ecx@42
  int v54; // ebx@42
  int v55; // esi@42
  signed int v56; // esi@42
  int v57; // ebp@42
  int v58; // ebx@42
  int v59; // esi@42
  int v60; // ecx@42
  int v61; // edx@42
  int v62; // edx@45
  int v63; // ebx@48
  int v64; // ebp@51
  int v65; // [sp+4h] [bp-18h]@1

  v1 = a1;
  v65 = 0;
LABEL_2:
  v2 = *(_WORD *)(v1 + 80) - *(_WORD *)(v1 + 48);
  v3 = *(_WORD *)(v1 + 16) - *(_WORD *)(v1 + 112);
  v4 = (46341 * (*(_WORD *)(v1 + 32) - (signed int)*(_WORD *)(v1 + 96)) + 0x4000) >> 15;
  v5 = (signed int)(__CFADD__(v4, 2147483648) + v4 + 2147483648 + 2147483648) >> 1;
  v6 = *(_WORD *)v1 + v5;
  v7 = *(_WORD *)v1 - v5;
  v8 = (-25080 * v2 + 60548 * v3 + 0x8000) >> 16;
  v9 = (60547 * v2 + 25080 * v3 + 0x8000) >> 16;
  LOWORD(v3) = v6 + v8;
  v10 = v6 - v8;
  v11 = v65;
  *(_WORD *)v1 = v3;
  *(_WORD *)(v1 + 16) = v7 + v9;
  *(_WORD *)(v1 + 32) = v7 - v9;
  *(_WORD *)(v1 + 48) = v10;
  while ( 1 )
  {
    v1 += 2;
    if ( ++v11 >= 8 )
      break;
    if ( v11 != 4 )
    {
      v65 = v11;
      goto LABEL_2;
    }
  }
  result = a1;
  v13 = *(_WORD *)(a1 + 10) - *(_WORD *)(a1 + 6);
  v14 = *(_WORD *)(a1 + 2) - *(_WORD *)(a1 + 14);
  v15 = *(_WORD *)a1;
  v16 = (46341 * (*(_WORD *)(a1 + 4) - (signed int)*(_WORD *)(a1 + 12)) + 0x4000) >> 15;
  v17 = (signed int)(__CFADD__(v16, 2147483648) + v16 + 2147483648 + 2147483648) >> 1;
  v18 = v15 + v17;
  v19 = v15 - v17;
  v20 = (-25080 * v13 + 60548 * v14 + 0x8000) >> 16;
  v21 = (60547 * v13 + 25080 * v14 + 0x8000) >> 16;
  v22 = ((v18 + v20 + 8) >> 4) + 128;
  if ( v22 < 0 )
  {
    LOWORD(v22) = 0;
  }
  else if ( v22 > 255 )
  {
    LOWORD(v22) = 255;
  }
  *(_WORD *)a1 = v22;
  v23 = ((v19 + v21 + 8) >> 4) + 128;
  if ( v23 < 0 )
  {
    LOWORD(v23) = 0;
  }
  else if ( v23 > 255 )
  {
    LOWORD(v23) = 255;
  }
  *(_WORD *)(a1 + 2) = v23;
  v24 = ((v19 - v21 + 8) >> 4) + 128;
  if ( v24 < 0 )
  {
    LOWORD(v24) = 0;
  }
  else if ( v24 > 255 )
  {
    LOWORD(v24) = 255;
  }
  *(_WORD *)(a1 + 4) = v24;
  v25 = ((v18 - v20 + 8) >> 4) + 128;
  if ( v25 < 0 )
  {
    LOWORD(v25) = 0;
  }
  else if ( v25 > 255 )
  {
    LOWORD(v25) = 255;
  }
  *(_WORD *)(a1 + 6) = v25;
  v26 = *(_WORD *)(a1 + 26) - *(_WORD *)(a1 + 22);
  v27 = *(_WORD *)(a1 + 18) - *(_WORD *)(a1 + 30);
  v28 = *(_WORD *)(a1 + 16);
  v29 = (46341 * (*(_WORD *)(a1 + 20) - (signed int)*(_WORD *)(a1 + 28)) + 0x4000) >> 15;
  v30 = (signed int)(__CFADD__(v29, 2147483648) + v29 + 2147483648 + 2147483648) >> 1;
  v31 = v28 + v30;
  v32 = v28 - v30;
  v33 = (-25080 * v26 + 60548 * v27 + 0x8000) >> 16;
  v34 = (60547 * v26 + 25080 * v27 + 0x8000) >> 16;
  v35 = ((v31 + v33 + 8) >> 4) + 128;
  if ( v35 < 0 )
  {
    LOWORD(v35) = 0;
  }
  else if ( v35 > 255 )
  {
    LOWORD(v35) = 255;
  }
  *(_WORD *)(a1 + 16) = v35;
  v36 = ((v32 + v34 + 8) >> 4) + 128;
  if ( v36 < 0 )
  {
    LOWORD(v36) = 0;
  }
  else if ( v36 > 255 )
  {
    LOWORD(v36) = 255;
  }
  *(_WORD *)(a1 + 18) = v36;
  v37 = ((v32 - v34 + 8) >> 4) + 128;
  if ( v37 < 0 )
  {
    LOWORD(v37) = 0;
  }
  else if ( v37 > 255 )
  {
    LOWORD(v37) = 255;
  }
  *(_WORD *)(a1 + 20) = v37;
  v38 = ((v31 - v33 + 8) >> 4) + 128;
  if ( v38 < 0 )
  {
    LOWORD(v38) = 0;
  }
  else if ( v38 > 255 )
  {
    LOWORD(v38) = 255;
  }
  *(_WORD *)(a1 + 22) = v38;
  v39 = *(_WORD *)(a1 + 42) - *(_WORD *)(a1 + 38);
  v40 = *(_WORD *)(a1 + 34) - *(_WORD *)(a1 + 46);
  v41 = *(_WORD *)(a1 + 32);
  v42 = (46341 * (*(_WORD *)(a1 + 36) - (signed int)*(_WORD *)(a1 + 44)) + 0x4000) >> 15;
  v43 = (signed int)(__CFADD__(v42, 2147483648) + v42 + 2147483648 + 2147483648) >> 1;
  v44 = v41 + v43;
  v45 = v41 - v43;
  v46 = (-25080 * v39 + 60548 * v40 + 0x8000) >> 16;
  v47 = (60547 * v39 + 25080 * v40 + 0x8000) >> 16;
  v48 = ((v44 + v46 + 8) >> 4) + 128;
  if ( v48 < 0 )
  {
    LOWORD(v48) = 0;
  }
  else if ( v48 > 255 )
  {
    LOWORD(v48) = 255;
  }
  *(_WORD *)(a1 + 32) = v48;
  v49 = ((v45 + v47 + 8) >> 4) + 128;
  if ( v49 < 0 )
  {
    LOWORD(v49) = 0;
  }
  else if ( v49 > 255 )
  {
    LOWORD(v49) = 255;
  }
  *(_WORD *)(a1 + 34) = v49;
  v50 = ((v45 - v47 + 8) >> 4) + 128;
  if ( v50 < 0 )
  {
    LOWORD(v50) = 0;
  }
  else if ( v50 > 255 )
  {
    LOWORD(v50) = 255;
  }
  *(_WORD *)(a1 + 36) = v50;
  v51 = ((v44 - v46 + 8) >> 4) + 128;
  if ( v51 < 0 )
  {
    LOWORD(v51) = 0;
  }
  else if ( v51 > 255 )
  {
    LOWORD(v51) = 255;
  }
  *(_WORD *)(a1 + 38) = v51;
  v52 = *(_WORD *)(a1 + 58) - *(_WORD *)(a1 + 54);
  v53 = *(_WORD *)(a1 + 50) - *(_WORD *)(a1 + 62);
  v54 = *(_WORD *)(a1 + 48);
  v55 = (46341 * (*(_WORD *)(a1 + 52) - (signed int)*(_WORD *)(a1 + 60)) + 0x4000) >> 15;
  v56 = (signed int)(__CFADD__(v55, 2147483648) + v55 + 2147483648 + 2147483648) >> 1;
  v57 = v54 + v56;
  v58 = v54 - v56;
  v59 = (-25080 * v52 + 60548 * v53 + 0x8000) >> 16;
  v60 = (60547 * v52 + 25080 * v53 + 0x8000) >> 16;
  v61 = ((v57 + v59 + 8) >> 4) + 128;
  if ( v61 < 0 )
  {
    LOWORD(v61) = 0;
  }
  else if ( v61 > 255 )
  {
    LOWORD(v61) = 255;
  }
  *(_WORD *)(a1 + 48) = v61;
  v62 = ((v58 + v60 + 8) >> 4) + 128;
  if ( v62 < 0 )
  {
    LOWORD(v62) = 0;
  }
  else if ( v62 > 255 )
  {
    LOWORD(v62) = 255;
  }
  *(_WORD *)(a1 + 50) = v62;
  v63 = ((v58 - v60 + 8) >> 4) + 128;
  if ( v63 < 0 )
  {
    LOWORD(v63) = 0;
  }
  else if ( v63 > 255 )
  {
    LOWORD(v63) = 255;
  }
  *(_WORD *)(a1 + 52) = v63;
  v64 = ((v57 - v59 + 8) >> 4) + 128;
  if ( v64 < 0 )
  {
    LOWORD(v64) = 0;
  }
  else if ( v64 > 255 )
  {
    LOWORD(v64) = 255;
  }
  *(_WORD *)(a1 + 54) = v64;
  return result;
}

//----- (00764370) --------------------------------------------------------
int __cdecl iDCT2x2_AAN_PX(int a1)
{
  int v1; // ebp@1
  int v2; // ecx@1
  __int16 v3; // ax@1
  int v4; // ecx@1
  int v5; // edx@1
  int v6; // ebx@1
  int v7; // eax@1
  __int16 v8; // si@1
  int v9; // ebx@1
  int v10; // edi@1
  int v11; // ebx@1
  int v12; // ecx@1
  __int16 v13; // si@1
  int v14; // ST14_4@1
  int v15; // ebx@1
  int v16; // edi@1
  int v17; // esi@1
  int v18; // ebx@1
  int v19; // esi@1
  int v20; // ebx@1
  int v21; // ebx@1
  int v22; // esi@1
  int v23; // ecx@4
  int v24; // edx@7
  int v25; // ecx@7
  int result; // eax@10
  int v27; // [sp+4h] [bp-28h]@1
  int v28; // [sp+8h] [bp-24h]@1
  int v29; // [sp+Ch] [bp-20h]@1
  int v30; // [sp+10h] [bp-1Ch]@1
  int v31; // [sp+18h] [bp-14h]@1

  v1 = a1;
  v2 = (85627 * (*(_WORD *)(a1 + 16) - (signed int)*(_WORD *)(a1 + 112))
      + 35468 * (*(_WORD *)(a1 + 80) - (signed int)*(_WORD *)(a1 + 48))
      + 0x10000) >> 17;
  v29 = (signed __int16)(*(_WORD *)a1 + v2);
  v30 = (signed __int16)(*(_WORD *)a1 - v2);
  v3 = *(_WORD *)(a1 + 2);
  v4 = (85627 * (*(_WORD *)(a1 + 18) - (signed int)*(_WORD *)(a1 + 114))
      + 35468 * (*(_WORD *)(a1 + 82) - (signed int)*(_WORD *)(a1 + 50))
      + 0x10000) >> 17;
  v5 = (signed __int16)(v3 + v4);
  *(_WORD *)(a1 + 2) = v5;
  v28 = (signed __int16)(v3 - v4);
  LOWORD(v4) = *(_WORD *)(a1 + 6);
  v6 = (85627 * (*(_WORD *)(v1 + 22) - (signed int)*(_WORD *)(v1 + 118))
      + 35468 * (*(_WORD *)(v1 + 86) - (signed int)*(_WORD *)(v1 + 54))
      + 0x10000) >> 17;
  v7 = (signed __int16)(v4 + v6);
  *(_WORD *)(a1 + 6) = v7;
  v8 = *(_WORD *)(a1 + 10);
  v27 = (signed __int16)(v4 - v6);
  v9 = *(_WORD *)(a1 + 26);
  v10 = *(_WORD *)(a1 + 58);
  *(_WORD *)(a1 + 22) = v27;
  v11 = (85627 * (v9 - *(_WORD *)(v1 + 122)) + 35468 * (*(_WORD *)(v1 + 90) - v10) + 0x10000) >> 17;
  v12 = (signed __int16)(v8 + v11);
  v13 = v8 - v11;
  v14 = v12;
  v15 = *(_WORD *)(a1 + 126);
  v16 = *(_WORD *)(a1 + 94);
  *(_WORD *)(a1 + 10) = v12;
  v31 = v13;
  v17 = *(_WORD *)(a1 + 30) - v15;
  v18 = *(_WORD *)(a1 + 62);
  *(_WORD *)(a1 + 26) = v31;
  LOWORD(v12) = *(_WORD *)(a1 + 14);
  v19 = (85627 * v17 + 35468 * (v16 - v18) + 0x10000) >> 17;
  v20 = (signed __int16)(v12 + v19);
  *(_WORD *)(a1 + 14) = v20;
  *(_WORD *)(a1 + 30) = v12 - v19;
  v21 = (85627 * (v5 - v20) + 35468 * (v14 - v7) + 0x10000) >> 17;
  v22 = ((v29 + v21 + 8) >> 4) + 128;
  if ( v22 < 0 )
  {
    LOWORD(v22) = 0;
  }
  else if ( v22 > 255 )
  {
    LOWORD(v22) = 255;
  }
  *(_WORD *)a1 = v22;
  v23 = ((v29 - v21 + 8) >> 4) + 128;
  if ( v23 < 0 )
  {
    LOWORD(v23) = 0;
  }
  else if ( v23 > 255 )
  {
    LOWORD(v23) = 255;
  }
  *(_WORD *)(a1 + 2) = v23;
  v24 = (85627 * (v28 - *(_WORD *)(a1 + 30)) + 35468 * (v31 - v27) + 0x10000) >> 17;
  v25 = ((v30 + v24 + 8) >> 4) + 128;
  if ( v25 < 0 )
  {
    LOWORD(v25) = 0;
  }
  else if ( v25 > 255 )
  {
    LOWORD(v25) = 255;
  }
  *(_WORD *)(a1 + 16) = v25;
  result = ((v30 - v24 + 8) >> 4) + 128;
  if ( result < 0 )
  {
    result = 0;
  }
  else if ( result > 255 )
  {
    result = 255;
  }
  *(_WORD *)(a1 + 18) = result;
  return result;
}

//----- (007645D0) --------------------------------------------------------
_WORD *__cdecl iDCT1x1_AAN_PX(_WORD *a1)
{
  _WORD *result; // eax@1
  int v2; // edx@1

  result = a1;
  v2 = ((*a1 + 8) >> 4) + 128;
  if ( v2 < 0 )
  {
    LOWORD(v2) = 0;
  }
  else if ( v2 > 255 )
  {
    LOWORD(v2) = 255;
  }
  *a1 = v2;
  return result;
}

//----- (00764600) --------------------------------------------------------
signed int __cdecl FillEncoderQuantTable_IPP(int a1)
{
  signed int v1; // ecx@1
  signed int v2; // esi@2
  __int16 v3; // ax@2
  signed int v4; // esi@2
  __int16 v5; // ax@2
  signed int v6; // esi@2
  signed int result; // eax@3
  __int16 v8; // [sp+0h] [bp-8Ch]@2
  __int16 v9; // [sp+2h] [bp-8Ah]@2
  __int16 v10; // [sp+4h] [bp-88h]@2
  __int16 v11[67]; // [sp+6h] [bp-86h]@2

  v1 = 0;
  do
  {
    v2 = *(_WORD *)(a1 + 2 * v1 + 2);
    *(&v8 + v1) = 0x8000 / *(_WORD *)(a1 + 2 * v1);
    v3 = 0x8000 / v2;
    v4 = *(_WORD *)(a1 + 2 * v1 + 4);
    *(&v9 + v1) = v3;
    v5 = 0x8000 / v4;
    v6 = *(_WORD *)(a1 + 2 * v1 + 6);
    *(&v10 + v1) = v5;
    v11[v1] = 0x8000 / v6;
    v1 += 4;
  }
  while ( v1 < 64 );
  result = 0;
  do
  {
    *(_WORD *)(a1 + 2 * izigzag_index[result]) = *(&v8 + result);
    *(_WORD *)(a1 + 2 * dword_B67EE4[result]) = *(&v9 + result);
    *(_WORD *)(a1 + 2 * dword_B67EE8[result]) = *(&v10 + result);
    *(_WORD *)(a1 + 2 * dword_B67EEC[result]) = v11[result];
    result += 4;
  }
  while ( result < 64 );
  return result;
}
// B67EE0: using guessed type int izigzag_index[];
// B67EE4: using guessed type int dword_B67EE4[];
// B67EE8: using guessed type int dword_B67EE8[];
// B67EEC: using guessed type int dword_B67EEC[];
// 764600: using guessed type __int16 var_86[67];

//----- (007646C0) --------------------------------------------------------
signed int __cdecl fQnt8x8_IPP_PX(int a1, int a2)
{
  signed int result; // eax@1
  int v3; // ebx@2
  int v4; // esi@2
  int v5; // ebx@2
  int v6; // esi@2
  int v7; // ebx@2

  result = 0;
  do
  {
    v3 = *(_WORD *)(a1 + 2 * result + 2);
    *(_WORD *)(a1 + 2 * result) = (*(_WORD *)(a1 + 2 * result) * *(_WORD *)(a2 + 2 * result) + 0x4000) >> 15;
    v4 = (v3 * *(_WORD *)(a2 + 2 * result + 2) + 0x4000) >> 15;
    v5 = *(_WORD *)(a1 + 2 * result + 4);
    *(_WORD *)(a1 + 2 * result + 2) = v4;
    v6 = (v5 * *(_WORD *)(a2 + 2 * result + 4) + 0x4000) >> 15;
    v7 = *(_WORD *)(a1 + 2 * result + 6);
    *(_WORD *)(a1 + 2 * result + 4) = v6;
    *(_WORD *)(a1 + 2 * result + 6) = (v7 * *(_WORD *)(a2 + 2 * result + 6) + 0x4000) >> 15;
    result += 4;
  }
  while ( result < 64 );
  return result;
}

//----- (00764750) --------------------------------------------------------
void __usercall fQnt8x8_IPP_M5(__m64 a1@<mm6>, int a2, int a3)
{
  own_fqnt8x8_ipp_m5(a1, a2, a3);
}

//----- (00764770) --------------------------------------------------------
void __usercall fQnt8x8_IPP_A6(__m64 a1@<mm6>, int a2, int a3)
{
  own_fqnt8x8_ipp_a6(a1, a2, a3);
}

//----- (00764790) --------------------------------------------------------
void __usercall fQnt8x8_IPP_W7(__m128i a1@<xmm6>, int a2, int a3)
{
  own_fqnt8x8_ipp_w7(a1, a2, a3);
}

//----- (007647B0) --------------------------------------------------------
int __cdecl fDCT8x8_IPP_PX(int a1)
{
  int v1; // edx@1
  int v2; // ST10_4@2
  int v3; // ebp@2
  int v4; // ST14_4@2
  int v5; // esi@2
  int v6; // ebx@2
  int v7; // edi@2
  int v8; // ST1C_4@2
  int v9; // eax@2
  int v10; // ST20_4@2
  int v11; // ecx@2
  int v12; // eax@2
  int v13; // ST24_4@2
  int v14; // ST28_4@2
  int v15; // ebp@2
  int v16; // esi@2
  int v17; // edi@2
  int v18; // ebp@2
  int v19; // eax@2
  int v20; // ebx@2
  int v21; // ecx@2
  int v22; // esi@2
  int v23; // ecx@2
  int v24; // ebp@2
  int v25; // ebx@2
  int result; // eax@3
  int v27; // ST28_4@4
  int v28; // ebp@4
  int v29; // esi@4
  int v30; // ST24_4@4
  int v31; // ebx@4
  int v32; // ecx@4
  int v33; // ST1C_4@4
  int v34; // edi@4
  int v35; // ST18_4@4
  int v36; // edx@4
  int v37; // ebx@4
  int v38; // ST10_4@4
  int v39; // ebp@4
  int v40; // edi@4
  int v41; // esi@4
  int v42; // edx@4
  int v43; // esi@4
  int v44; // ecx@4
  int v45; // edi@4
  signed int v46; // [sp+4h] [bp-38h]@1
  signed int v47; // [sp+4h] [bp-38h]@3

  v1 = a1;
  v46 = 7;
  do
  {
    v2 = *(_WORD *)v1;
    v3 = *(_WORD *)(v1 + 2);
    v4 = *(_WORD *)(v1 + 14);
    v5 = *(_WORD *)(v1 + 12);
    v6 = *(_WORD *)(v1 + 10);
    v7 = *(_WORD *)(v1 + 8);
    v8 = v3 + v5;
    v9 = *(_WORD *)(v1 + 4);
    v10 = v9 + v6;
    v11 = *(_WORD *)(v1 + 6);
    v12 = v9 - v6;
    v13 = v11 - v7;
    v14 = v3 - v5;
    v15 = v2 + v4 - (v11 + v7);
    *(_WORD *)v1 = 8 * (v2 + v4 + v11 + v7 + v8 + v10);
    *(_WORD *)(v1 + 8) = 8 * (v2 + v4 + v11 + v7 - (v8 + v10));
    *(_WORD *)(v1 + 4) = (42813 * v15 + 17734 * (v8 - v10) + 2048) >> 12;
    v16 = v12 + v14;
    *(_WORD *)(v1 + 12) = (17734 * v15 + -42813 * (v8 - v10) + 2048) >> 12;
    v17 = 8 * v16;
    v18 = v14 - v12;
    v19 = 8 * v18;
    v20 = (46341 * v13 + 2048) >> 12;
    v21 = (46341 * (v2 - v4) + 2048) >> 12;
    v22 = v21 + 8 * v16;
    v23 = v21 - v17;
    v24 = v20 + 8 * v18;
    v25 = v20 - v19;
    *(_WORD *)(v1 + 2) = (4017 * v22 + 799 * v24 + 2048) >> 12;
    *(_WORD *)(v1 + 14) = (799 * v22 + -4017 * v24 + 2048) >> 12;
    *(_WORD *)(v1 + 10) = (2276 * v23 + 3406 * v25 + 2048) >> 12;
    *(_WORD *)(v1 + 6) = (3406 * v23 + -2276 * v25 + 2048) >> 12;
    v1 += 16;
    --v46;
  }
  while ( v46 >= 0 );
  result = a1;
  v47 = 7;
  do
  {
    v27 = *(_WORD *)result;
    v28 = *(_WORD *)(result + 16);
    v29 = *(_WORD *)(result + 96);
    v30 = *(_WORD *)(result + 112);
    v31 = *(_WORD *)(result + 32);
    v32 = *(_WORD *)(result + 80);
    v33 = v28 + v29;
    v34 = *(_WORD *)(result + 64);
    v35 = v31 + v32;
    v36 = *(_WORD *)(result + 48);
    v37 = v31 - v32;
    v38 = v28 - v29;
    v39 = v27 + v30 - (v36 + v34);
    *(_WORD *)result = (v27 + v30 + v36 + v34 + v33 + v35 + 32) >> 6;
    *(_WORD *)(result + 64) = (v27 + v30 + v36 + v34 - (v33 + v35) + 32) >> 6;
    *(_WORD *)(result + 32) = (42813 * v39 + 17734 * (v33 - v35) + 0x100000) >> 21;
    *(_WORD *)(result + 96) = (17734 * v39 + -42813 * (v33 - v35) + 0x100000) >> 21;
    v40 = (46341 * (v36 - v34) + 2048) >> 12;
    v41 = (46341 * (v27 - v30) + 2048) >> 12;
    v42 = v41 + 8 * (v37 + v38);
    v43 = v41 - 8 * (v37 + v38);
    v44 = v40 + 8 * (v38 - v37);
    v45 = v40 - 8 * (v38 - v37);
    *(_WORD *)(result + 16) = (4017 * v42 + 799 * v44 + 0x100000) >> 21;
    *(_WORD *)(result + 112) = (799 * v42 + -4017 * v44 + 0x100000) >> 21;
    *(_WORD *)(result + 80) = (2276 * v43 + 3406 * v45 + 0x100000) >> 21;
    *(_WORD *)(result + 48) = (3406 * v43 + -2276 * v45 + 0x100000) >> 21;
    result += 2;
    --v47;
  }
  while ( v47 >= 0 );
  return result;
}

//----- (00764B00) --------------------------------------------------------
void __cdecl fDCT8x8_IPP_M5(int a1)
{
  own_dct_2d_16s_8x8_frv_m5(a1);
}

//----- (00764B20) --------------------------------------------------------
void __cdecl fDCT8x8_IPP_A6(int a1)
{
  own_dct_2d_16s_8x8_frv_a6(a1);
}

//----- (00764B40) --------------------------------------------------------
void **__cdecl fDCT8x8_IPP_W7(int a1)
{
  return own_dct_2d_16s_8x8_frv_w7(a1);
}

//----- (00764B60) --------------------------------------------------------
signed int __cdecl sub_764B60(int a1)
{
  signed int v1; // ebp@1
  unsigned int NumberOfBytesWritten; // [sp+10h] [bp-Ch]@1

  v1 = 0;
  if ( ownWriteFile(
         *(HANDLE *)(a1 + 60),
         (LPCVOID)(a1 + 64),
         *(_DWORD *)(a1 + 16) - *(_DWORD *)(a1 + 20),
         &NumberOfBytesWritten)
    && NumberOfBytesWritten == 4096 )
  {
    *(_DWORD *)(a1 + 16) = *(_DWORD *)(a1 + 20);
  }
  else
  {
    v1 = -23;
  }
  return v1;
}

//----- (00764BC0) --------------------------------------------------------
signed int __cdecl sub_764BC0(int a1, signed int a2, signed int a3)
{
  signed int v3; // ecx@1
  signed int v4; // edx@1
  int v5; // ebx@2
  signed int v6; // edi@2
  int v7; // ebx@4
  _BYTE *v8; // edx@4
  _BYTE *v9; // edx@7
  int v11; // ebp@11
  int v12; // edx@13
  int v13; // eax@13
  int v14; // [sp+4h] [bp-18h]@1

  v3 = a3;
  v14 = 0;
  v4 = *(_DWORD *)(a1 + 12);
  if ( a3 <= v4 )
  {
    v5 = *(_DWORD *)a1;
    v11 = *(_DWORD *)(a1 + 4);
  }
  else
  {
    v5 = *(_DWORD *)a1;
    v6 = a3;
    while ( 1 )
    {
      ++*(_DWORD *)(a1 + 28);
      v6 -= v4;
      v7 = ((1 << v4) - 1) & (a2 >> v6) | v5;
      v8 = *(_BYTE **)(a1 + 16);
      if ( (unsigned int)v8 >= *(_DWORD *)(a1 + 24) )
        return -28;
      *(_DWORD *)(a1 + 16) = v8 + 1;
      *v8 = v7;
      if ( v7 == 255 )
      {
        v9 = *(_BYTE **)(a1 + 16);
        if ( (unsigned int)v9 >= *(_DWORD *)(a1 + 24) )
          return -28;
        *(_DWORD *)(a1 + 16) = v9 + 1;
        *v9 = 0;
        ++*(_DWORD *)(a1 + 28);
      }
      v5 = 0;
      v11 = 0;
      v4 = 8;
      if ( v6 <= 8 )
        break;
      *(_DWORD *)(a1 + 12) = 8;
      *(_DWORD *)a1 = 0;
      *(_DWORD *)(a1 + 4) = 0;
    }
    v3 = v6;
  }
  v12 = v4 - v3;
  *(_DWORD *)(a1 + 12) = v12;
  v13 = (((1 << v3) - 1) & a2) << v12;
  *(_DWORD *)a1 = v13 | v5;
  *(_DWORD *)(a1 + 4) = ((unsigned __int64)v13 >> 32) | v11;
  return v14;
}

//----- (00764CA0) --------------------------------------------------------
signed int __cdecl sub_764CA0(int a1, signed int a2, signed int a3)
{
  signed int v3; // eax@1
  signed int v4; // ecx@1
  signed int v5; // edi@1
  signed int v6; // edx@1
  signed int v7; // ebp@2
  signed int v8; // esi@2
  _BYTE *v9; // edi@4
  signed int v10; // eax@5
  int v11; // edx@7
  int v12; // ebp@9
  int v13; // esi@9
  int v14; // edx@10
  int v15; // eax@10
  _BYTE *v17; // edx@12
  signed int v18; // eax@13

  v3 = a2;
  v4 = a3;
  v5 = 0;
  v6 = *(_DWORD *)(a1 + 12);
  if ( a3 > v6 )
  {
    v7 = a3;
    v8 = 0;
    while ( 1 )
    {
      v9 = *(_BYTE **)(a1 + 16);
      if ( (unsigned int)v9 >= *(_DWORD *)(a1 + 24) )
      {
        v10 = sub_764B60(a1);
        v8 = v10;
        if ( v10 )
          return v10;
        v6 = *(_DWORD *)(a1 + 12);
        v9 = *(_BYTE **)(a1 + 16);
      }
      v7 -= v6;
      v11 = (unsigned __int8)(*(_BYTE *)a1 | ((1 << v6) - 1) & (a2 >> v7));
      *(_DWORD *)(a1 + 16) = v9 + 1;
      *v9 = v11;
      ++*(_DWORD *)(a1 + 28);
      if ( v11 == 255 )
      {
        v17 = *(_BYTE **)(a1 + 16);
        if ( (unsigned int)v17 >= *(_DWORD *)(a1 + 24) )
        {
          v18 = sub_764B60(a1);
          v8 = v18;
          if ( v18 )
            return v18;
          v17 = *(_BYTE **)(a1 + 16);
        }
        *(_DWORD *)(a1 + 16) = v17 + 1;
        *v17 = 0;
        ++*(_DWORD *)(a1 + 28);
      }
      v6 = 8;
      if ( v7 <= 8 )
      {
        v4 = v7;
        v5 = v8;
        v3 = a2;
        v12 = 0;
        v13 = 0;
        goto LABEL_10;
      }
      *(_DWORD *)(a1 + 12) = 8;
      *(_DWORD *)a1 = 0;
      *(_DWORD *)(a1 + 4) = 0;
    }
  }
  v12 = *(_DWORD *)a1;
  v13 = *(_DWORD *)(a1 + 4);
LABEL_10:
  v14 = v6 - v4;
  *(_DWORD *)(a1 + 12) = v14;
  v15 = (((1 << v4) - 1) & v3) << v14;
  *(_DWORD *)a1 = v15 | v12;
  *(_DWORD *)(a1 + 4) = ((unsigned __int64)v15 >> 32) | v13;
  return v5;
}

//----- (00764DB0) --------------------------------------------------------
void __cdecl Make_optimal_huff_table(int *const a1, unsigned __int8 *a2, unsigned __int8 *a3)
{
  signed int v3; // eax@1
  int v4; // ebx@4
  int v5; // eax@4
  signed int v6; // edx@4
  int v7; // ecx@5
  int v8; // ecx@8
  int v9; // ecx@11
  int v10; // esi@15
  int v11; // ecx@18
  int v12; // ecx@21
  signed int v13; // edx@21
  signed int v14; // eax@21
  signed int v15; // esi@22
  signed int v16; // esi@26
  signed int v17; // esi@31
  int v18; // edx@36
  int v19; // eax@36
  int v20; // ebx@38
  int v21; // eax@40
  signed int v22; // ecx@42
  int v23; // edx@43
  int v24; // edx@45
  int v25; // edx@47
  signed int v26; // edx@50
  int v27; // ecx@50
  int v28; // edx@52
  signed int v29; // ecx@54
  signed int i; // eax@54
  char v31; // dl@55
  signed int v32; // ebp@56
  char *v34; // edx@60
  char v35; // al@60
  signed int v36; // edi@62
  int v37; // eax@62
  signed int v38; // edx@63
  unsigned __int8 v39; // cl@63
  int v40; // [sp+10h] [bp-C5Ch]@1
  int v41; // [sp+14h] [bp-C58h]@8
  int v42[254]; // [sp+18h] [bp-C54h]@11
  int v43; // [sp+410h] [bp-85Ch]@3
  int v44; // [sp+420h] [bp-84Ch]@1
  int v45; // [sp+424h] [bp-848h]@45
  int v46[258]; // [sp+428h] [bp-844h]@47
  int v47; // [sp+830h] [bp-43Ch]@2
  int v48; // [sp+834h] [bp-438h]@2
  int v49; // [sp+838h] [bp-434h]@2
  int v50; // [sp+83Ch] [bp-430h]@2
  int v51; // [sp+840h] [bp-42Ch]@2
  int v52[251]; // [sp+844h] [bp-428h]@2
  char v53; // [sp+C33h] [bp-39h]@57
  _BYTE v54[56]; // [sp+C34h] [bp-38h]@1
  _BYTE _C43[56]; // [sp+C43h] [bp-29h]@60

  (*(void (__cdecl **)(int *, int *const , signed int))&NULLSTR[5720])(&v40, a1, 1028);
  (*(void (__cdecl **)(int *, signed int))&NULLSTR[5716])(&v44, 1028);
  (*(void (__cdecl **)(_BYTE *, signed int))&NULLSTR[5716])(v54, 33);
  v3 = 0;
  do
  {
    *(&v47 + v3) = -1;
    *(&v48 + v3) = -1;
    *(&v49 + v3) = -1;
    *(&v50 + v3) = -1;
    *(&v51 + v3) = -1;
    v52[v3] = -1;
    v3 += 6;
  }
  while ( v3 < 251 );
  *(&v47 + v3) = -1;
  *(&v48 + v3) = -1;
  *(&v49 + v3) = -1;
  *(&v50 + v3) = -1;
  *(&v51 + v3) = -1;
  v43 = 1;
  while ( 1 )
  {
    v4 = -1;
    v5 = 1000000000;
    v6 = 0;
    do
    {
      v7 = *(&v40 + v6);
      if ( v7 && v7 <= v5 )
      {
        v5 = *(&v40 + v6);
        v4 = v6;
      }
      v8 = *(&v41 + v6);
      if ( v8 && v8 <= v5 )
      {
        v5 = *(&v41 + v6);
        v4 = v6 + 1;
      }
      v9 = v42[v6];
      if ( v9 && v9 <= v5 )
      {
        v5 = v42[v6];
        v4 = v6 + 2;
      }
      v6 += 3;
    }
    while ( v6 <= 253 );
    v10 = *(&v40 + v6);
    if ( v10 && v10 <= v5 )
    {
      v5 = *(&v40 + v6);
      v4 = v6;
    }
    v11 = *(&v41 + v6);
    if ( v11 && v11 <= v5 )
      v4 = v6 + 1;
    v12 = -1;
    v13 = 1000000000;
    v14 = 0;
    do
    {
      v15 = *(&v40 + v14);
      if ( v15 && v15 <= v13 && v14 != v4 )
      {
        v13 = *(&v40 + v14);
        v12 = v14;
      }
      v16 = *(&v41 + v14);
      if ( v16 && v16 <= v13 && v14 + 1 != v4 )
      {
        v13 = *(&v41 + v14);
        v12 = v14 + 1;
      }
      v14 += 2;
    }
    while ( v14 <= 254 );
    v17 = *(&v40 + v14);
    if ( v17 && v17 <= v13 && v14 != v4 )
      v12 = v14;
    if ( v12 == -1 )
      break;
    v18 = 4 * v4;
    v19 = 4 * v12;
    *(&v40 + v4) += *(&v40 + v12);
    *(&v40 + v12) = 0;
    while ( 1 )
    {
      ++*(int *)((char *)&v44 + v18);
      v20 = *(int *)((char *)&v47 + v18);
      if ( v20 == -1 )
        break;
      v18 = 4 * v20;
    }
    *(int *)((char *)&v47 + v18) = v12;
    while ( 1 )
    {
      ++*(int *)((char *)&v44 + v19);
      v21 = *(int *)((char *)&v47 + v19);
      if ( v21 == -1 )
        break;
      v19 = 4 * v21;
    }
  }
  v22 = 0;
  do
  {
    v23 = *(&v44 + v22);
    if ( v23 )
      ++v54[v23];
    v24 = *(&v45 + v22);
    if ( v24 )
      ++v54[v24];
    v25 = v46[v22];
    if ( v25 )
      ++v54[v25];
    v22 += 3;
  }
  while ( v22 <= 253 );
  v26 = v22;
  v27 = *(&v44 + v22);
  if ( v27 )
    ++v54[v27];
  v28 = *(int *)((char *)&v45 + 1 * v26);
  if ( v28 )
    ++v54[v28];
  v29 = 32;
  for ( i = 31; ; --i )
  {
    while ( 1 )
    {
      v31 = v54[v29];
      if ( !v31 )
        break;
      v32 = i;
      while ( !*(&v53 + v32--) )
        ;
      v54[v29] = v31 - 2;
      ++v54[i];
      v54[v32 + 1] += 2;
      --v54[v32];
    }
    v29 = i;
    if ( i == 15 )
      break;
  }
  v34 = _C43;
  v35 = _C43[0];
  if ( !_C43[0] )
  {
    do
    {
      v34 = &v54[--v29];
      v35 = v54[v29];
    }
    while ( !v54[v29] );
  }
  *v34 = v35 - 1;
  (*(void (__cdecl **)(unsigned __int8 *, _BYTE *, signed int))&NULLSTR[5720])(a2, v54, 16);
  v36 = 1;
  v37 = 0;
  do
  {
    v38 = 0;
    v39 = 1;
    do
    {
      if ( v36 == *(&v44 + v38) )
        a3[v37++] = v38;
      if ( v36 == *(&v45 + v38) )
        a3[v37++] = v39;
      v39 += 2;
      v38 += 2;
    }
    while ( v38 <= 255 );
    ++v36;
  }
  while ( v36 <= 32 );
}
// B60724: using guessed type int (__cdecl *)(_DWORD, _DWORD);
// B60728: using guessed type int (__cdecl *)(_DWORD, _DWORD, _DWORD);
// 764DB0: using guessed type int var_428[251];
// 764DB0: using guessed type int var_C54[254];
// 764DB0: using guessed type int var_844[258];

//----- (00765190) --------------------------------------------------------
signed int __cdecl EncodeHuffman8x8_PX(int a1, int a2, int a3, _WORD *a4, _WORD *a5)
{
  int v5; // ebx@1
  int v6; // ecx@2
  int v7; // edi@2
  signed int v8; // esi@4
  signed int result; // eax@6
  signed int v10; // edx@9
  signed int v11; // esi@9
  int v12; // ecx@10
  signed int v13; // ebp@10
  int v14; // esi@13
  signed int v15; // ebx@13
  int v16; // ecx@35
  int v17; // edi@35
  signed int v18; // esi@37
  signed int v19; // edx@41
  signed int v20; // esi@41
  signed int v21; // ebp@42
  int v22; // esi@45
  signed int v23; // ebx@45
  signed int v24; // [sp+14h] [bp-18h]@19
  signed int v25; // [sp+14h] [bp-18h]@51
  signed int v26; // [sp+18h] [bp-14h]@13
  signed int v27; // [sp+18h] [bp-14h]@45

  v5 = a1;
  if ( *(_DWORD *)(a1 + 60) )
  {
    v6 = *a5;
    v7 = v6 - *a4;
    *a4 = v6;
    if ( v7 < 0 )
    {
      if ( v7 <= -256 )
        v8 = byte_B68560[-v7 >> 8] + 8;
      else
        v8 = byte_B68560[-v7];
      --v7;
    }
    else if ( v7 >= 256 )
    {
      v8 = byte_B68560[v7 >> 8] + 8;
    }
    else
    {
      v8 = byte_B68560[v7];
    }
    result = sub_764CA0(a1, *(_WORD *)(a2 + 2 * v8 + 1032), *(_DWORD *)(a2 + 4 * v8 + 8));
    if ( result )
      return result;
    result = sub_764CA0(a1, v7, v8);
    if ( result )
      return result;
    v10 = 0;
    v11 = 4;
    while ( 1 )
    {
      v12 = *(int *)((char *)izigzag_index + v11);
      v13 = a5[v12];
      v11 += 4;
      if ( a5[v12] )
      {
        if ( v10 > 15 )
        {
          v26 = v11;
          v14 = v5;
          v15 = v10;
          while ( 1 )
          {
            result = sub_764CA0(v14, *(_WORD *)(a3 + 1512), *(_DWORD *)(a3 + 968));
            if ( result )
              return result;
            v15 -= 16;
            if ( v15 <= 15 )
            {
              v10 = v15;
              v5 = v14;
              v11 = v26;
              break;
            }
          }
        }
        if ( v13 < 0 )
        {
          if ( v13 <= -256 )
            v24 = byte_B68560[-v13 >> 8] + 8;
          else
            v24 = byte_B68560[-v13];
          --v13;
        }
        else if ( v13 >= 256 )
        {
          v24 = byte_B68560[v13 >> 8] + 8;
        }
        else
        {
          v24 = byte_B68560[v13];
        }
        result = sub_764CA0(
                   v5,
                   *(_WORD *)(a3 + 2 * (v24 + 16 * v10) + 1032),
                   *(_DWORD *)(a3 + 4 * (v24 + 16 * v10) + 8));
        if ( result )
          return result;
        result = sub_764CA0(v5, v13, v24);
        if ( result )
          return result;
        v10 = 0;
      }
      else
      {
        ++v10;
      }
      if ( v11 >= 256 )
      {
        if ( v10 > 0 )
          result = sub_764CA0(v5, *(_WORD *)(a3 + 1032), *(_DWORD *)(a3 + 8));
        return result;
      }
    }
  }
  v16 = *a5;
  v17 = v16 - *a4;
  *a4 = v16;
  if ( v17 < 0 )
  {
    if ( v17 <= -256 )
      v18 = byte_B68560[-v17 >> 8] + 8;
    else
      v18 = byte_B68560[-v17];
    --v17;
  }
  else if ( v17 >= 256 )
  {
    v18 = byte_B68560[v17 >> 8] + 8;
  }
  else
  {
    v18 = byte_B68560[v17];
  }
  result = sub_764BC0(a1, *(_WORD *)(a2 + 2 * v18 + 1032), *(_DWORD *)(a2 + 4 * v18 + 8));
  if ( result )
    return result;
  result = sub_764BC0(a1, v17, v18);
  if ( result )
    return result;
  v19 = 0;
  v20 = 4;
  while ( 1 )
  {
    v21 = a5[*(int *)((char *)izigzag_index + v20)];
    v20 += 4;
    if ( v21 )
      break;
    ++v19;
LABEL_56:
    if ( v20 >= 256 )
    {
      if ( v19 > 0 )
        result = sub_764BC0(v5, *(_WORD *)(a3 + 1032), *(_DWORD *)(a3 + 8));
      return result;
    }
  }
  if ( v19 > 15 )
  {
    v27 = v20;
    v22 = v5;
    v23 = v19;
    do
    {
      result = sub_764BC0(v22, *(_WORD *)(a3 + 1512), *(_DWORD *)(a3 + 968));
      if ( result )
        return result;
      v23 -= 16;
    }
    while ( v23 > 15 );
    v19 = v23;
    v5 = v22;
    v20 = v27;
  }
  if ( v21 < 0 )
  {
    if ( v21 <= -256 )
      v25 = byte_B68560[-v21 >> 8] + 8;
    else
      v25 = byte_B68560[-v21];
    --v21;
  }
  else if ( v21 >= 256 )
  {
    v25 = byte_B68560[v21 >> 8] + 8;
  }
  else
  {
    v25 = byte_B68560[v21];
  }
  result = sub_764BC0(v5, *(_WORD *)(a3 + 2 * (v25 + 16 * v19) + 1032), *(_DWORD *)(a3 + 4 * (v25 + 16 * v19) + 8));
  if ( !result )
  {
    result = sub_764BC0(v5, v21, v25);
    if ( !result )
    {
      v19 = 0;
      goto LABEL_56;
    }
  }
  return result;
}
// B67EE0: using guessed type int izigzag_index[];

//----- (007655C0) --------------------------------------------------------
int __usercall EncodeHuffman8x8_M5@<eax>(__m64 a1@<mm1>, struct _STATE *a2, int a3, int a4, int a5, int a6)
{
  _WORD *v6; // esi@1
  __int16 v7; // dx@1
  int v8; // ecx@3
  int result; // eax@3
  signed int v10; // ebp@4
  int v11; // esi@9
  int v12; // ecx@12
  int v13; // ecx@20
  signed int v14; // ebp@21
  int v15; // edi@26
  int v16; // ecx@29
  char v17; // [sp+2Fh] [bp-3E5h]@1
  int v18; // [sp+3F8h] [bp-1Ch]@1
  int v19; // [sp+3FCh] [bp-18h]@1
  unsigned int v20; // [sp+400h] [bp-14h]@8

  v6 = (_WORD *)((unsigned int)&v17 & 0xFFFFFFE0);
  v18 = 0;
  v19 = 0;
  v7 = *(_WORD *)a6;
  *(_WORD *)a6 -= *(_WORD *)a5;
  *(_WORD *)a5 = v7;
  own_count_zeros_m5(a6, (unsigned int)&v17 & 0xFFFFFFE0, &v18, (unsigned int *)&v19);
  if ( a2->file )
  {
    if ( *(_WORD *)a6 )
    {
      v8 = *(_WORD *)(((unsigned int)&v17 & 0xFFFFFFE0) + 0x200);
      result = EB_Write_Bits_File_M5(
                 a1,
                 (*(_WORD *)(a3 + 2 * v8 + 1032) << v8) + (onlynbits[v8] & *v6),
                 v8 + *(_DWORD *)(a3 + 4 * v8 + 8),
                 a2);
      if ( result )
        return result;
      v10 = 1;
    }
    else
    {
      result = EB_Write_Bits_File_M5(a1, *(_WORD *)(a3 + 1032), *(_DWORD *)(a3 + 8), a2);
      if ( result )
        return result;
      --*(_DWORD *)(((unsigned int)&v17 & 0xFFFFFFE0) + 0x100);
      v10 = 0;
    }
    if ( !v19 )
      v18 = 63;
    if ( v10 >= v19 )
    {
LABEL_14:
      if ( v18 > 0 )
        result = EB_Write_Bits_File_M5(a1, *(_WORD *)(a4 + 1032), *(_DWORD *)(a4 + 8), a2);
    }
    else
    {
      v20 = (unsigned int)&v17 & 0xFFFFFFE0;
      while ( 1 )
      {
        v11 = 16 * *(_DWORD *)(v20 + 4 * v10 + 256);
        if ( v11 > 240 )
          break;
LABEL_12:
        v12 = *(_WORD *)(v20 + 2 * v10 + 512);
        result = EB_Write_Bits_File_M5(
                   a1,
                   (*(_WORD *)(a4 + 2 * (v12 + v11) + 1032) << v12) | onlynbits[v12] & *(_WORD *)(v20 + 2 * v10),
                   *(_DWORD *)(a4 + 4 * (v12 + v11) + 8) + v12,
                   a2);
        if ( result )
          return result;
        if ( ++v10 >= v19 )
          goto LABEL_14;
      }
      while ( 1 )
      {
        result = EB_Write_Bits_File_M5(a1, *(_WORD *)(a4 + 1512), *(_DWORD *)(a4 + 968), a2);
        if ( result )
          break;
        v11 -= 256;
        if ( v11 <= 240 )
          goto LABEL_12;
      }
    }
  }
  else
  {
    if ( *(_WORD *)a6 )
    {
      v13 = *(_WORD *)(((unsigned int)&v17 & 0xFFFFFFE0) + 0x200);
      result = EB_Write_Bits_M5(
                 a1,
                 (*(_WORD *)(a3 + 2 * v13 + 1032) << v13) + (onlynbits[v13] & *v6),
                 v13 + *(_DWORD *)(a3 + 4 * v13 + 8),
                 a2);
      if ( result )
        return result;
      v14 = 1;
    }
    else
    {
      result = EB_Write_Bits_M5(a1, *(_WORD *)(a3 + 1032), *(_DWORD *)(a3 + 8), a2);
      if ( result )
        return result;
      --*(_DWORD *)(((unsigned int)&v17 & 0xFFFFFFE0) + 0x100);
      v14 = 0;
    }
    if ( !v19 )
      v18 = 63;
    if ( v14 >= v19 )
    {
LABEL_31:
      if ( v18 > 0 )
        result = EB_Write_Bits_M5(a1, *(_WORD *)(a4 + 1032), *(_DWORD *)(a4 + 8), a2);
    }
    else
    {
      v20 = (unsigned int)&v17 & 0xFFFFFFE0;
      while ( 1 )
      {
        v15 = 16 * *(_DWORD *)(v20 + 4 * v14 + 256);
        if ( v15 > 240 )
          break;
LABEL_29:
        v16 = *(_WORD *)(v20 + 2 * v14 + 512);
        result = EB_Write_Bits_M5(
                   a1,
                   (*(_WORD *)(a4 + 2 * (v16 + v15) + 1032) << v16) | onlynbits[v16] & *(_WORD *)(v20 + 2 * v14),
                   *(_DWORD *)(a4 + 4 * (v16 + v15) + 8) + v16,
                   a2);
        if ( result )
          return result;
        if ( ++v14 >= v19 )
          goto LABEL_31;
      }
      while ( 1 )
      {
        result = EB_Write_Bits_M5(a1, *(_WORD *)(a4 + 1512), *(_DWORD *)(a4 + 968), a2);
        if ( result )
          break;
        v15 -= 256;
        if ( v15 <= 240 )
          goto LABEL_29;
      }
    }
  }
  return result;
}
// B68020: using guessed type int onlynbits[];

//----- (00765930) --------------------------------------------------------
signed int __cdecl EncodeHuffman8x8_A6(__m64 *a1, int a2, unsigned int a3, _WORD *a4, _WORD *a5)
{
  return own_encode_block_a6(a1, a2, a3, a4, a5);
}

//----- (00765970) --------------------------------------------------------
void __cdecl Gather_Prog_DC_SA(int *const a1, int *a2, __int16 *a3, int a4, int a5)
{
  int v5; // edi@2
  int v6; // ecx@2
  int v7; // eax@2

  if ( !a4 )
  {
    v5 = *a3 >> a5;
    v6 = v5 - *a2;
    *a2 = (signed __int16)v5;
    v7 = sub_765D30(v6);
    ++a1[v7];
  }
}

//----- (007659B0) --------------------------------------------------------
void __cdecl Encode_Prog_DC_SA(struct _STATE *a1, struct _HUFFMAN_TABLE *a2, int *a3, __int16 *a4, int a5, int a6)
{
  int v6; // edx@2
  int v7; // esi@2
  signed int v8; // ebp@4
  signed int v9; // edx@6
  signed int v10; // ecx@6
  signed int v11; // eax@7
  int v12; // edx@13

  if ( a5 )
  {
    v12 = *a4 >> a6;
    if ( a1->file )
      sub_764CA0((int)a1, v12, 1);
    else
      sub_764BC0((int)a1, v12, 1);
  }
  else
  {
    v6 = *a4 >> a6;
    v7 = v6 - *a3;
    *a3 = (signed __int16)v6;
    if ( v7 < 0 )
    {
      if ( v7 <= -256 )
        v8 = byte_B68560[-v7 >> 8] + 8;
      else
        v8 = byte_B68560[-v7];
      --v7;
    }
    else if ( v7 >= 256 )
    {
      v8 = byte_B68560[v7 >> 8] + 8;
    }
    else
    {
      v8 = byte_B68560[v7];
    }
    v9 = a2->huffval[v8];
    v10 = a2->huffelem[v8];
    if ( a1->file )
      v11 = sub_764CA0((int)a1, v9, v10);
    else
      v11 = sub_764BC0((int)a1, v9, v10);
    if ( !v11 )
    {
      if ( a1->file )
        sub_764CA0((int)a1, v7, v8);
      else
        sub_764BC0((int)a1, v7, v8);
    }
  }
}

//----- (00765AF0) --------------------------------------------------------
void __cdecl Gather_EOBRUN(struct _STATE *a1, int *const a2)
{
  int v2; // eax@1
  int v3; // eax@5

  v2 = a1->Prog_EndOfBlock_Run;
  if ( v2 )
  {
    if ( v2 == 1 )
    {
      ++*a2;
    }
    else
    {
      if ( v2 > 0x7FFF )
      {
        ++a2[224];
        v2 = a1->Prog_EndOfBlock_Run - 0x7FFF;
        a1->Prog_EndOfBlock_Run = v2;
      }
      v3 = sub_765D60(v2);
      ++a2[16 * v3];
    }
    a1->Prog_EndOfBlock_Run = 0;
  }
}

//----- (00765B50) --------------------------------------------------------
void __cdecl Encode_EOBRUN(struct _STATE *a1, struct _HUFFMAN_TABLE *a2)
{
  int v2; // eax@1
  signed int v3; // edx@4
  signed int v4; // ecx@4
  signed int v5; // eax@5
  int v6; // edx@8
  signed int v7; // eax@9
  int v8; // esi@13
  signed int v9; // edx@13
  signed int v10; // ecx@13
  signed int v11; // eax@14
  int v12; // ecx@17
  signed int v13; // eax@18
  signed int v14; // edx@23
  signed int v15; // ecx@23
  signed int v16; // eax@24

  v2 = a1->Prog_EndOfBlock_Run;
  if ( !v2 )
    return;
  if ( v2 == 1 )
  {
    v14 = a2->huffval[0];
    v15 = a2->huffelem[0];
    if ( a1->file )
      v16 = sub_764CA0((int)a1, v14, v15);
    else
      v16 = sub_764BC0((int)a1, v14, v15);
    if ( !v16 )
      goto LABEL_21;
  }
  else
  {
    if ( v2 > 0x7FFF )
    {
      v3 = a2->huffval[224];
      v4 = a2->huffelem[224];
      if ( a1->file )
        v5 = sub_764CA0((int)a1, v3, v4);
      else
        v5 = sub_764BC0((int)a1, v3, v4);
      if ( v5 )
        return;
      v6 = a1->Prog_EndOfBlock_Run;
      v7 = a1->file ? sub_764CA0((int)a1, v6, 14) : sub_764BC0((int)a1, v6, 14);
      if ( v7 )
        return;
      v2 = a1->Prog_EndOfBlock_Run - 0x7FFF;
      a1->Prog_EndOfBlock_Run = v2;
    }
    v8 = sub_765D60(v2);
    v9 = a2->huffval[16 * v8];
    v10 = a2->huffelem[16 * v8];
    if ( a1->file )
      v11 = sub_764CA0((int)a1, v9, v10);
    else
      v11 = sub_764BC0((int)a1, v9, v10);
    if ( !v11 )
    {
      v12 = a1->Prog_EndOfBlock_Run;
      v13 = a1->file ? sub_764CA0((int)a1, v12, v8) : sub_764BC0((int)a1, v12, v8);
      if ( !v13 )
      {
LABEL_21:
        a1->Prog_EndOfBlock_Run = 0;
        return;
      }
    }
  }
}

//----- (00765CD0) --------------------------------------------------------
void __cdecl Encode_ZRL(struct _STATE *a1, struct _HUFFMAN_TABLE *a2, int *a3)
{
  signed int v3; // eax@1
  signed int v4; // esi@1
  signed int v5; // eax@2

  v3 = a2->huffval[240];
  v4 = a2->huffelem[240];
  if ( a1->file )
    v5 = sub_764CA0((int)a1, v3, v4);
  else
    v5 = sub_764BC0((int)a1, v3, v4);
  if ( !v5 )
    *a3 -= 16;
}

//----- (00765D30) --------------------------------------------------------
int __cdecl sub_765D30(__int16 a1)
{
  signed int v1; // eax@1
  int result; // eax@2

  v1 = abs(a1);
  if ( v1 >= 256 )
    result = byte_B68560[v1 >> 8] + 8;
  else
    result = byte_B68560[v1];
  return result;
}

//----- (00765D60) --------------------------------------------------------
int __cdecl sub_765D60(signed int a1)
{
  int result; // eax@2

  if ( a1 >= 256 )
    result = byte_B68660[a1 >> 8] + 8;
  else
    result = byte_B68660[a1];
  return result;
}

//----- (00765D90) --------------------------------------------------------
void __cdecl Append_BE_bits(struct _STATE *a1, unsigned __int8 *a2, int *a3)
{
  unsigned __int8 *v3; // ebx@1
  signed int v4; // eax@4
  int v5; // ecx@7

  v3 = a2;
  if ( *a3 && *a3 > 0 )
  {
    do
    {
      if ( a1->file )
        v4 = sub_764CA0((int)a1, *v3, 1);
      else
        v4 = sub_764BC0((int)a1, *v3, 1);
      if ( v4 )
        break;
      ++v3;
      v5 = *a3 - 1;
      *a3 = v5;
    }
    while ( v5 > 0 );
  }
}

//----- (00765E00) --------------------------------------------------------
void __cdecl Gather_Prog_AC_first(struct _STATE *a1, __int16 *a2, int a3, int a4, int a5, int *const a6)
{
  signed int v6; // esi@1
  int v7; // ebx@2
  int v8; // eax@3
  signed int v9; // edi@3
  int v10; // edi@6
  int v11; // eax@11
  signed int v12; // eax@15
  signed int i; // edi@15
  int v14; // eax@20

  v6 = 0;
  if ( a3 <= a4 )
  {
    v7 = a3;
    do
    {
      v8 = izigzag_index[v7];
      v9 = a2[v8];
      ++v7;
      if ( a2[v8] )
      {
        if ( v9 < 0 )
          v10 = -v9 >> a5;
        else
          v10 = v9 >> a5;
        if ( v10 )
        {
          Gather_EOBRUN(a1, a6);
          if ( v6 > 15 )
          {
            if ( v6 - 15 < 96 )
            {
              v11 = a6[240];
            }
            else
            {
              v11 = a6[240];
              do
              {
                v11 += 5;
                v6 -= 80;
              }
              while ( v6 >= 111 );
            }
            do
            {
              ++v11;
              v6 -= 16;
            }
            while ( v6 > 15 );
            a6[240] = v11;
          }
          v12 = 1;
          for ( i = v10 >> 1; i; i >>= 1 )
            ++v12;
          ++*(&a6[16 * v6] + v12);
          v6 = 0;
        }
        else
        {
          ++v6;
        }
      }
      else
      {
        ++v6;
      }
    }
    while ( v7 <= a4 );
    if ( v6 > 0 )
    {
      v14 = a1->Prog_EndOfBlock_Run + 1;
      a1->Prog_EndOfBlock_Run = v14;
      if ( v14 == 0x7FFF )
        Gather_EOBRUN(a1, a6);
    }
  }
}
// B67EE0: using guessed type int izigzag_index[];

//----- (00765F40) --------------------------------------------------------
void __cdecl Gather_Prog_AC_refine(struct _STATE *a1, __int16 *a2, int a3, int a4, int a5, unsigned __int8 *a6, int *a7, int *const a8)
{
  int v8; // ecx@1
  int v9; // esi@1
  int v10; // eax@1
  signed int v11; // ebx@3
  int v12; // ebx@5
  signed int v13; // ebx@9
  int v14; // edx@9
  unsigned __int8 *v15; // eax@9
  int v16; // ebp@14
  int v17; // ecx@14
  int v18; // eax@17
  int v19; // ebx@28
  int v20[64]; // [sp+8h] [bp-124h]@5
  int v21; // [sp+108h] [bp-24h]@2
  int v22; // [sp+10Ch] [bp-20h]@10
  int v23; // [sp+110h] [bp-1Ch]@11
  int v24; // [sp+114h] [bp-18h]@10

  v8 = *a7;
  v9 = 0;
  v10 = a3;
  if ( a3 <= a4 )
  {
    v21 = *a7;
    do
    {
      v11 = a2[izigzag_index[v10]];
      if ( v11 < 0 )
        v11 = -v11;
      v12 = v11 >> a5;
      v20[v10] = v12;
      if ( v12 == 1 )
        v9 = v10;
      ++v10;
    }
    while ( v10 <= a4 );
    v8 = v21;
  }
  v13 = 0;
  v14 = 0;
  v15 = &a6[v8];
  if ( a3 <= a4 )
  {
    v24 = a3;
    v22 = v9;
    v21 = v8;
    do
    {
      v23 = v20[v24];
      if ( v23 )
      {
        if ( v13 > 15 )
        {
          v16 = v22;
          v17 = v21;
          while ( v24 <= v16 )
          {
            Gather_EOBRUN(a1, a8);
            v17 = 0;
            if ( v13 - 15 < 96 )
            {
              v18 = a8[240];
            }
            else
            {
              v18 = a8[240];
              do
              {
                v18 += 5;
                v13 -= 80;
              }
              while ( v13 >= 111 );
            }
            do
            {
              ++v18;
              v13 -= 16;
            }
            while ( v13 > 15 );
            a8[240] = v18;
            v15 = a6;
            v14 = 0;
            if ( v13 <= 15 )
            {
              v21 = 0;
              goto LABEL_23;
            }
          }
          v21 = v17;
        }
LABEL_23:
        if ( v23 <= 1 )
        {
          Gather_EOBRUN(a1, a8);
          v21 = 0;
          v15 = a6;
          ++a8[16 * v13 + 1];
          v14 = 0;
          v13 = 0;
        }
        else
        {
          v15[v14++] = v23 & 1;
        }
      }
      else
      {
        ++v13;
      }
      ++v24;
    }
    while ( v24 <= a4 );
    v8 = v21;
    if ( v13 > 0 || v14 > 0 )
    {
      v19 = a1->Prog_EndOfBlock_Run + 1;
      a1->Prog_EndOfBlock_Run = v19;
      v8 += v14;
      if ( v19 == 0x7FFF || v8 > dword_A78F60 - 63 )
      {
        Gather_EOBRUN(a1, a8);
        v8 = 0;
      }
    }
  }
  *a7 = v8;
}
// A78F60: using guessed type int dword_A78F60;
// B67EE0: using guessed type int izigzag_index[];
// 765F40: using guessed type int var_124[64];

//----- (007661B0) --------------------------------------------------------
void __cdecl Encode_Prog_AC_first(struct _STATE *a1, struct _HUFFMAN_TABLE *a2, __int16 *a3, int a4, int a5, int a6)
{
  struct _STATE *v6; // ebx@1
  struct _HUFFMAN_TABLE *v7; // ecx@1
  __int16 *v8; // edi@1
  int v9; // ebp@1
  int v10; // esi@1
  int v11; // eax@1
  int v12; // edx@1
  int v13; // edx@4
  signed int v14; // ebx@4
  int v15; // ebx@7
  int v16; // eax@10
  signed int v17; // edx@13
  signed int v18; // ebx@13
  int v19; // eax@16
  signed int v20; // edx@16
  signed int v21; // eax@16
  signed int v22; // eax@17
  signed int v23; // eax@21
  int v24; // eax@28
  int i; // [sp+10h] [bp-1Ch]@2
  int v26; // [sp+14h] [bp-18h]@13
  int v27; // [sp+18h] [bp-14h]@7

  v6 = a1;
  v7 = a2;
  v8 = a3;
  v9 = a4;
  v10 = a5;
  v11 = 0;
  v12 = 0;
  if ( a4 <= a5 )
  {
    for ( i = 0; ; i = v12 )
    {
      v13 = izigzag_index[v9];
      v14 = v8[v13];
      if ( v8[v13] )
      {
        if ( v14 < 0 )
        {
          v15 = -v14 >> a6;
          v27 = ~v15;
        }
        else
        {
          v15 = v14 >> a6;
          v27 = v15;
        }
        if ( v15 )
        {
          Encode_EOBRUN(a1, a2);
          v16 = i;
          if ( i > 15 )
          {
            do
            {
              Encode_ZRL(a1, a2, &i);
              v16 = i;
            }
            while ( i > 15 );
            v10 = a5;
            v8 = a3;
          }
          v17 = 1;
          v18 = v15 >> 1;
          v26 = 1;
          if ( v18 )
          {
            do
            {
              ++v17;
              v18 >>= 1;
            }
            while ( v18 );
            v26 = v17;
          }
          v19 = v26 + 16 * v16;
          v20 = a2->huffval[v19];
          v21 = a2->huffelem[v19];
          if ( a1->file )
            v22 = sub_764CA0((int)a1, v20, v21);
          else
            v22 = sub_764BC0((int)a1, v20, v21);
          if ( v22 )
            return;
          v23 = a1->file ? sub_764CA0((int)a1, v27, v26) : sub_764BC0((int)a1, v27, v26);
          if ( v23 )
            return;
          v11 = 0;
          v12 = 0;
        }
        else
        {
          v12 = ++v11;
        }
      }
      else
      {
        v12 = ++v11;
      }
      if ( ++v9 > v10 )
        break;
    }
    v7 = a2;
    v6 = a1;
  }
  if ( v11 > 0 )
  {
    v24 = v6->Prog_EndOfBlock_Run + 1;
    v6->Prog_EndOfBlock_Run = v24;
    if ( v24 == 0x7FFF )
    {
      i = v12;
      Encode_EOBRUN(v6, v7);
    }
  }
}
// B67EE0: using guessed type int izigzag_index[];

//----- (007663B0) --------------------------------------------------------
void __cdecl Encode_Prog_AC_refine(struct _STATE *a1, struct _HUFFMAN_TABLE *a2, __int16 *a3, int a4, int a5, int a6, unsigned __int8 *a7, int *a8)
{
  struct _STATE *v8; // ebp@1
  int v9; // ebx@1
  int *v10; // esi@1
  int v11; // edi@1
  int v12; // eax@1
  int v13; // edi@2
  signed int v14; // esi@3
  int v15; // esi@5
  int v16; // ecx@9
  int v17; // edx@9
  unsigned __int8 *v18; // esi@10
  int v19; // edi@10
  int v20; // eax@11
  signed int v21; // eax@20
  signed int v22; // edx@20
  signed int v23; // eax@21
  signed int v24; // eax@24
  signed int v25; // eax@25
  int v26; // eax@32
  int v27; // [sp+10h] [bp-134h]@1
  int v28[64]; // [sp+14h] [bp-130h]@5
  int v29; // [sp+114h] [bp-30h]@9
  int v30; // [sp+118h] [bp-2Ch]@13
  int v31; // [sp+11Ch] [bp-28h]@2
  int v32; // [sp+120h] [bp-24h]@15
  int v33; // [sp+124h] [bp-20h]@1
  int v34; // [sp+128h] [bp-1Ch]@9
  unsigned __int8 *v35; // [sp+12Ch] [bp-18h]@9

  v8 = a1;
  v9 = a4;
  v10 = a8;
  v11 = *a8;
  v27 = *a8;
  v33 = 0;
  v12 = a4;
  if ( a4 <= a5 )
  {
    v31 = v11;
    v13 = v33;
    do
    {
      v14 = a3[izigzag_index[v12]];
      if ( v14 < 0 )
        v14 = -v14;
      v15 = v14 >> a6;
      v28[v12] = v15;
      if ( v15 == 1 )
        v13 = v12;
      ++v12;
    }
    while ( v12 <= a5 );
    v33 = v13;
    v11 = v31;
    v10 = a8;
    v8 = a1;
  }
  v16 = 0;
  v17 = 0;
  v29 = 0;
  v34 = 0;
  v35 = &a7[v11];
  if ( a4 <= a5 )
  {
    v18 = v35;
    v19 = v34;
    while ( 1 )
    {
      v20 = v28[v9];
      if ( v20 )
      {
        v30 = v19;
        if ( v16 > 15 && v9 <= v33 )
        {
          v31 = v20;
          v32 = v9;
          do
          {
            Encode_EOBRUN(v8, a2);
            Append_BE_bits(v8, a7, &v27);
            v27 = 0;
            Encode_ZRL(v8, a2, &v29);
            Append_BE_bits(v8, v18, &v30);
            v18 = a7;
            v30 = 0;
          }
          while ( v29 > 15 );
          v20 = v31;
          v9 = v32;
          v17 = 0;
        }
        if ( v20 <= 1 )
        {
          Encode_EOBRUN(v8, a2);
          Append_BE_bits(v8, a7, &v27);
          v27 = 0;
          v21 = a2->huffval[16 * v29 + 1];
          v22 = a2->huffelem[16 * v29 + 1];
          if ( v8->file )
            v23 = sub_764CA0((int)v8, v21, v22);
          else
            v23 = sub_764BC0((int)v8, v21, v22);
          if ( v23 )
          {
            v10 = a8;
            v11 = v27;
            goto LABEL_37;
          }
          v24 = a3[izigzag_index[v9]] >= 0;
          if ( v8->file )
            v25 = sub_764CA0((int)v8, v24, 1);
          else
            v25 = sub_764BC0((int)v8, v24, 1);
          if ( v25 )
          {
            v10 = a8;
            v11 = v27;
            goto LABEL_37;
          }
          Append_BE_bits(v8, v18, &v30);
          v18 = a7;
          v17 = 0;
          v19 = 0;
          v16 = 0;
          v29 = 0;
        }
        else
        {
          v18[v17] = v20 & 1;
          v17 = v30 + 1;
          v19 = v30 + 1;
          v16 = v29;
        }
      }
      else
      {
        v29 = ++v16;
      }
      if ( ++v9 > a5 )
      {
        v34 = v19;
        v10 = a8;
        v11 = v27;
        break;
      }
    }
  }
  if ( v16 > 0 || v17 > 0 )
  {
    v26 = v8->Prog_EndOfBlock_Run + 1;
    v11 += v17;
    v8->Prog_EndOfBlock_Run = v26;
    if ( v26 == 0x7FFF )
    {
      v30 = v34;
      v27 = v11;
    }
    else
    {
      if ( v11 <= dword_A78F60 - 63 )
        goto LABEL_37;
      v30 = v34;
      v27 = v11;
    }
    Encode_EOBRUN(v8, a2);
    Append_BE_bits(v8, a7, &v27);
    v11 = 0;
  }
LABEL_37:
  *v10 = v11;
}
// A78F60: using guessed type int dword_A78F60;
// B67EE0: using guessed type int izigzag_index[];
// 7663B0: using guessed type int var_130[64];

//----- (00766790) --------------------------------------------------------
int __cdecl GET_BITS(struct _STATE *a1, int a2)
{
  unsigned __int64 v2; // rax@1
  int v3; // ecx@1

  v2 = a1->bit_buffer_64;
  v3 = a1->bitbuf_bits_valid - a2;
  a1->bitbuf_bits_valid = v3;
  return ((1 << a2) - 1) & (v2 >> v3);
}

//----- (007667C0) --------------------------------------------------------
int __cdecl PEEK_BITS(struct _STATE *a1, int a2)
{
  return ((1 << a2) - 1) & (a1->bit_buffer_64 >> ((unsigned __int8)a1->bitbuf_bits_valid - (unsigned __int8)a2));
}

//----- (007667F0) --------------------------------------------------------
signed int __cdecl Fill_Bit_Buffer(struct _STATE *a1, int a2)
{
  int v2; // edx@2
  int v3; // edi@4
  char *v4; // eax@5
  char *v5; // edx@5
  int v6; // edi@5
  signed int v7; // eax@5
  int v8; // ecx@5
  int v9; // ecx@5
  int v10; // edi@6
  signed int result; // eax@7
  int v12; // eax@9
  int v13; // edx@12
  int v14; // eax@12

  if ( a1->bitbuf_bits_valid >= 25 )
  {
LABEL_7:
    result = 0;
  }
  else
  {
    v2 = a1->bitbuf_bits_valid;
    while ( 1 )
    {
      if ( a1->unread_marker )
      {
        v14 = v2;
        v13 = a2;
        goto LABEL_13;
      }
      v3 = a1->entropy_bytes_left;
      if ( v3 <= 0 )
      {
        if ( !a1->file )
          return 0;
        result = Buffer_Read_Bytes(a1);
        if ( result )
          return result;
        v3 = a1->entropy_bytes_left;
      }
      v4 = a1->cur_entropy_ptr;
      v5 = v4 + 1;
      v6 = v3 - 1;
      a1->cur_entropy_ptr = v4 + 1;
      v7 = (unsigned __int8)*v4;
      v8 = a1->entropy_bytes_processed;
      a1->entropy_bytes_left = v6;
      v9 = v8 + 1;
      a1->entropy_bytes_processed = v9;
      if ( v7 == 255 )
        break;
LABEL_6:
      v10 = a1->bit_buffer_64 >> 24;
      LODWORD(a1->bit_buffer_64) = v7 | (LODWORD(a1->bit_buffer_64) << 8);
      v2 = a1->bitbuf_bits_valid + 8;
      HIDWORD(a1->bit_buffer_64) = v10;
      a1->bitbuf_bits_valid = v2;
      if ( v2 >= 25 )
        goto LABEL_7;
    }
    do
    {
      if ( v6 <= 0 )
      {
        if ( !a1->file )
          return -21;
        result = Buffer_Read_Bytes(a1);
        if ( result )
          return result;
        v6 = a1->entropy_bytes_left;
        v5 = a1->cur_entropy_ptr;
        v9 = a1->entropy_bytes_processed;
      }
      v12 = (unsigned __int8)*v5++;
      --v6;
      a1->cur_entropy_ptr = v5;
      ++v9;
      a1->entropy_bytes_left = v6;
      a1->entropy_bytes_processed = v9;
    }
    while ( v12 == 255 );
    if ( !v12 )
    {
      v7 = 255;
      goto LABEL_6;
    }
    v13 = a2;
    a1->unread_marker = v12;
    v14 = a1->bitbuf_bits_valid;
LABEL_13:
    if ( v14 >= v13 )
      goto LABEL_7;
    result = 100;
  }
  return result;
}

//----- (00766930) --------------------------------------------------------
int __cdecl sub_766930(struct _STATE *a1, int a2, int a3, int a4)
{
  int v4; // ebp@1
  int v5; // ebx@2
  int v6; // edx@3
  int v7; // ebx@7
  int result; // eax@9

  v4 = a4;
  if ( a4 <= a1->bitbuf_bits_valid || (result = Fill_Bit_Buffer(a1, a4)) == 0 )
  {
    v5 = GET_BITS(a1, a4);
    while ( 1 )
    {
      v6 = *(_WORD *)(a2 + 2 * v4 + 1578);
      if ( v6 & 0x8000 && v6 != -1 )
        v6 = (unsigned __int16)v6;
      if ( v5 <= v6 )
        break;
      v7 = 2 * v5;
      if ( a1->bitbuf_bits_valid <= 0 )
      {
        result = Fill_Bit_Buffer(a1, 1);
        if ( result )
          return result;
      }
      v5 = GET_BITS(a1, 1) | v7;
      ++v4;
    }
    if ( v4 <= 16 )
      *(_DWORD *)a3 = *(_WORD *)(a2 + 2 * (v5 + *(_WORD *)(a2 + 2 * v4 + 1614) - *(_WORD *)(a2 + 2 * v4 + 1544)) + 1032);
    else
      *(_DWORD *)a3 = 0;
    result = 0;
  }
  return result;
}

//----- (00766A20) --------------------------------------------------------
int __cdecl sub_766A20(struct _STATE *a1, int a2, int a3)
{
  int v3; // eax@2
  int v4; // eax@4
  int result; // eax@5

  if ( a1->bitbuf_bits_valid >= 8 )
    goto LABEL_2;
  result = Fill_Bit_Buffer(a1, 0);
  if ( !result )
  {
    if ( a1->bitbuf_bits_valid < 8 )
    {
      v4 = 1;
      goto LABEL_5;
    }
LABEL_2:
    v3 = PEEK_BITS(a1, 8);
    if ( *(_WORD *)(a3 + 4 * v3 + 10) )
    {
      a1->bitbuf_bits_valid -= *(_WORD *)(a3 + 4 * v3 + 10);
      *(_DWORD *)a2 = *(_WORD *)(a3 + 4 * v3 + 8);
      return 0;
    }
    v4 = 9;
LABEL_5:
    result = sub_766930(a1, a3, a2, v4);
    if ( result )
      return result;
    return 0;
  }
  return result;
}

//----- (00766AC0) --------------------------------------------------------
int __cdecl DecodeHuffman8x8_PX(struct _STATE *a1, int a2, int a3, int a4, int a5)
{
  int *v5; // ebp@1
  int result; // eax@1
  int v7; // eax@5
  bool v8; // zf@5
  bool v9; // sf@5
  unsigned __int8 v10; // of@5
  int v11; // eax@6
  __int16 v12; // ax@8
  int v13; // ebx@10
  int v14; // edx@12
  int v15; // eax@12
  int *v16; // edi@13
  int v17; // eax@14
  int v18; // [sp+10h] [bp-14h]@1

  (*(void (__cdecl **)(int, signed int))&NULLSTR[5716])(a5, 128);
  v5 = dword_B67EE4;
  result = sub_766A20(a1, (int)&v18, a2);
  if ( result )
  {
    if ( result >= 0 )
      result = 0;
    return result;
  }
  if ( v18 )
  {
    v7 = v18 & 0xF;
    v10 = __OFSUB__(v7, a1->bitbuf_bits_valid);
    v8 = v7 == a1->bitbuf_bits_valid;
    v9 = v7 - a1->bitbuf_bits_valid < 0;
    v18 &= 0xFu;
    if ( !((unsigned __int8)(v9 ^ v10) | v8) )
    {
      result = Fill_Bit_Buffer(a1, v7);
      if ( result )
      {
        if ( result >= 0 )
          result = 0;
        return result;
      }
      v7 = v18;
    }
    v11 = GET_BITS(a1, v7);
    if ( !(v11 & (1 << (v18 - 1))) )
      v11 += *(_DWORD *)&lowest_coef[2 * v18];
    v12 = *(_WORD *)a4 + v11;
    *(_WORD *)a4 = v12;
  }
  else
  {
    v12 = *(_WORD *)a4;
  }
  *(_WORD *)a5 = v12;
  v13 = 63;
  while ( 1 )
  {
    result = sub_766A20(a1, (int)&v18, a3);
    if ( result )
      break;
    v14 = (v18 >> 4) & 0xF;
    v15 = v18 & 0xF;
    if ( v18 & 0xF )
    {
      v18 &= 0xFu;
      v13 = v13 - v14 - 1;
      v16 = &v5[v14];
      if ( v15 > a1->bitbuf_bits_valid )
      {
        result = Fill_Bit_Buffer(a1, v15);
        if ( result )
        {
          if ( result >= 0 )
            result = 0;
          return result;
        }
        v15 = v18;
      }
      v17 = GET_BITS(a1, v15);
      if ( v17 & (1 << (v18 - 1)) )
      {
        v5 = v16 + 1;
        *(_WORD *)(a5 + 2 * *v16) = v17;
      }
      else
      {
        v5 = v16 + 1;
        *(_WORD *)(a5 + 2 * *v16) = v17 + lowest_coef[2 * v18];
      }
    }
    else
    {
      if ( v14 != 15 )
        return 0;
      v18 &= 0xFu;
      v13 -= 16;
      v5 += 16;
    }
    if ( v13 <= 0 )
      return 0;
  }
  if ( result >= 0 )
    result = 0;
  return result;
}
// B60724: using guessed type int (__cdecl *)(_DWORD, _DWORD);
// B67EE4: using guessed type int dword_B67EE4[];

//----- (00766CA0) --------------------------------------------------------
int __cdecl DecodeHuffman8x8_M5(__m64 *a1, unsigned int a2, unsigned int a3, _WORD *a4, int a5)
{
  return own_decodehuffman8x8_m5(a2, a1, a2, a3, a4, a5);
}

//----- (00766CE0) --------------------------------------------------------
int __cdecl DecodeHuffman8x8_M6(int a1, unsigned int a2, unsigned int a3, _WORD *a4, int a5)
{
  return own_decodehuffman8x8_m6(a2, a1, a2, a3, a4, a5);
}

//----- (00766D20) --------------------------------------------------------
int __cdecl Decode_Block_Skip_M5(struct _STATE *a1, struct _HUFFMAN_TABLE *a2, struct _HUFFMAN_TABLE *a3, __int16 *a4)
{
  return own_decode_block_skip_m5((int)a2, (int)a1, (unsigned int)a2, (unsigned int)a3, (signed int)a4);
}

//----- (00766D60) --------------------------------------------------------
signed int __cdecl Decode_Block_Thumb_PX(struct _STATE *a1, struct _HUFFMAN_TABLE *a2, struct _HUFFMAN_TABLE *a3, __int16 *a4, __int16 *a5)
{
  signed int result; // eax@1
  int v6; // eax@5
  bool v7; // zf@5
  bool v8; // sf@5
  unsigned __int8 v9; // of@5
  int v10; // eax@6
  __int16 v11; // ax@8
  int v12; // esi@10
  int v13; // edx@12
  int v14; // eax@12
  int v15; // [sp+10h] [bp-14h]@1

  result = sub_766A20(a1, (int)&v15, (int)a2);
  if ( result )
  {
    if ( result >= 0 )
      result = 0;
    return result;
  }
  if ( v15 )
  {
    v6 = v15 & 0xF;
    v9 = __OFSUB__(v6, a1->bitbuf_bits_valid);
    v7 = v6 == a1->bitbuf_bits_valid;
    v8 = v6 - a1->bitbuf_bits_valid < 0;
    v15 &= 0xFu;
    if ( !((unsigned __int8)(v8 ^ v9) | v7) )
    {
      result = Fill_Bit_Buffer(a1, v6);
      if ( result )
      {
        if ( result >= 0 )
          result = 0;
        return result;
      }
      v6 = v15;
    }
    v10 = GET_BITS(a1, v6);
    if ( !(v10 & (1 << (v15 - 1))) )
      v10 += *(_DWORD *)&lowest_coef[2 * v15];
    v11 = *a4 + v10;
    *a4 = v11;
  }
  else
  {
    v11 = *a4;
  }
  *a5 = v11;
  v12 = 63;
  while ( 1 )
  {
    result = sub_766A20(a1, (int)&v15, (int)a3);
    if ( result )
      break;
    v13 = (v15 >> 4) & 0xF;
    v14 = v15 & 0xF;
    if ( v15 & 0xF )
    {
      v15 &= 0xFu;
      v12 = v12 - v13 - 1;
      if ( v14 > a1->bitbuf_bits_valid )
      {
        result = Fill_Bit_Buffer(a1, v14);
        if ( result )
        {
          if ( result >= 0 )
            result = 0;
          return result;
        }
        v14 = v15;
      }
      GET_BITS(a1, v14);
    }
    else
    {
      if ( v13 != 15 )
        return 0;
      v15 &= 0xFu;
      v12 -= 16;
    }
    if ( v12 <= 0 )
      return 0;
  }
  if ( result >= 0 )
    result = 0;
  return result;
}

//----- (00766EF0) --------------------------------------------------------
signed int __cdecl Decode_Block_Prog_DC(struct _STATE *a1, struct _HUFFMAN_TABLE *a2, __int16 *a3, __int16 *a4, int a5)
{
  signed int result; // eax@1
  int v6; // eax@3
  bool v7; // zf@3
  bool v8; // sf@3
  unsigned __int8 v9; // of@3
  int v10; // eax@4
  __int16 v11; // dx@6
  int v12; // eax@6
  int v13; // [sp+10h] [bp-14h]@1

  v13 = 0;
  result = sub_766A20(a1, (int)&v13, (int)a2);
  if ( result )
  {
    if ( result >= 0 )
      result = 0;
  }
  else
  {
    if ( !v13 )
    {
      v12 = *a4;
LABEL_7:
      *a3 = v12 << a5;
      return 0;
    }
    v6 = v13 & 0xF;
    v9 = __OFSUB__(v6, a1->bitbuf_bits_valid);
    v7 = v6 == a1->bitbuf_bits_valid;
    v8 = v6 - a1->bitbuf_bits_valid < 0;
    v13 &= 0xFu;
    if ( (unsigned __int8)(v8 ^ v9) | v7 )
    {
LABEL_4:
      v10 = GET_BITS(a1, v6);
      if ( !(v10 & (1 << (v13 - 1))) )
        v10 += *(_DWORD *)&lowest_coef[2 * v13];
      v11 = v10 + *a4;
      v12 = v11;
      *a4 = v11;
      goto LABEL_7;
    }
    result = Fill_Bit_Buffer(a1, v6);
    if ( !result )
    {
      v6 = v13;
      goto LABEL_4;
    }
    if ( result >= 0 )
      result = 0;
  }
  return result;
}

//----- (00766FD0) --------------------------------------------------------
signed int __cdecl Decode_Block_Prog_DC_SA(struct _STATE *a1, __int16 *a2, int a3)
{
  signed int v3; // ebx@1
  signed int result; // eax@4

  v3 = 1 << a3;
  if ( a1->bitbuf_bits_valid <= 0 && (result = Fill_Bit_Buffer(a1, 1)) != 0 )
  {
    if ( result >= 0 )
      result = 0;
  }
  else
  {
    if ( GET_BITS(a1, 1) )
      *a2 |= v3;
    result = 0;
  }
  return result;
}

//----- (00767040) --------------------------------------------------------
signed int __cdecl Decode_Block_Prog_AC(struct _STATE *a1, __int16 *a2, struct _HUFFMAN_TABLE *a3, int a4, int a5, int a6)
{
  int v6; // ebx@1
  int v7; // ecx@1
  signed int result; // eax@3
  int v9; // edi@6
  int v10; // edx@6
  int v11; // ebx@7
  int v12; // eax@8
  int v13; // eax@15
  bool v14; // zf@16
  bool v15; // sf@16
  unsigned __int8 v16; // of@16
  int v17; // [sp+10h] [bp-14h]@5

  v6 = a4;
  v7 = a1->Prog_EndOfBlock_Run;
  if ( v7 > 0 )
  {
    a1->Prog_EndOfBlock_Run = v7 - 1;
    return 0;
  }
  if ( a4 > a5 )
    return 0;
  while ( 1 )
  {
    result = sub_766A20(a1, (int)&v17, (int)a3);
    if ( result )
      break;
    v9 = v17 >> 4;
    v10 = v17 & 0xF;
    if ( v17 & 0xF )
    {
      v17 &= 0xFu;
      v11 = v9 + v6;
      if ( v10 > a1->bitbuf_bits_valid )
      {
        result = Fill_Bit_Buffer(a1, v10);
        if ( result )
        {
          if ( result >= 0 )
            result = 0;
          return result;
        }
        v10 = v17;
      }
      v12 = GET_BITS(a1, v10);
      if ( v12 & (1 << (v17 - 1)) )
        a2[izigzag_index[v11]] = v12 << a6;
      else
        a2[izigzag_index[v11]] = (v12 + *(_DWORD *)&lowest_coef[2 * v17]) << a6;
    }
    else
    {
      if ( v9 != 15 )
      {
        v13 = 1 << v9;
        if ( v9 )
        {
          a1->Prog_EndOfBlock_Run = v13;
          v16 = __OFSUB__(v9, a1->bitbuf_bits_valid);
          v14 = v9 == a1->bitbuf_bits_valid;
          v15 = v9 - a1->bitbuf_bits_valid < 0;
          v17 = 0;
          if ( !((unsigned __int8)(v15 ^ v16) | v14) )
          {
            result = Fill_Bit_Buffer(a1, v9);
            if ( result )
            {
              if ( result >= 0 )
                result = 0;
              return result;
            }
          }
          v13 = a1->Prog_EndOfBlock_Run + GET_BITS(a1, v9);
        }
        a1->Prog_EndOfBlock_Run = v13 - 1;
        return 0;
      }
      v17 &= 0xFu;
      v11 = v6 + 15;
    }
    v6 = v11 + 1;
    if ( v6 > a5 )
      return 0;
  }
  if ( result >= 0 )
    result = 0;
  return result;
}
// B67EE0: using guessed type int izigzag_index[];

//----- (007671F0) --------------------------------------------------------
signed int __cdecl Decode_Block_Prog_AC_SA(struct _STATE *a1, __int16 *a2, struct _HUFFMAN_TABLE *a3, int a4, int a5, int a6)
{
  struct _STATE *v6; // edi@1
  int v7; // esi@1
  int v8; // ebx@1
  int v9; // eax@1
  signed int result; // eax@3
  int v11; // ebp@4
  int v12; // edi@13
  int v13; // edx@16
  int v14; // ebx@28
  int v15; // eax@31
  int v16; // [sp+10h] [bp-1Ch]@3
  int v17; // [sp+14h] [bp-18h]@1
  int v18; // [sp+18h] [bp-14h]@1

  v6 = a1;
  v7 = a4;
  v8 = a5;
  v17 = 1 << a6;
  v9 = a1->Prog_EndOfBlock_Run;
  v18 = -1 << a6;
  if ( v9 || a4 > a5 )
    goto LABEL_26;
  while ( 1 )
  {
    result = sub_766A20(v6, (int)&v16, (int)a3);
    if ( result )
    {
      if ( result >= 0 )
        result = 0;
      return result;
    }
    v11 = v16 >> 4;
    v16 &= 0xFu;
    if ( !v16 )
      break;
    if ( v6->bitbuf_bits_valid <= 0 )
    {
      result = Fill_Bit_Buffer(v6, 1);
      if ( result )
      {
        if ( result >= 0 )
          result = 0;
        return result;
      }
    }
    if ( GET_BITS(v6, 1) )
      v16 = v17;
    else
      v16 = v18;
    while ( 1 )
    {
LABEL_13:
      v12 = izigzag_index[v7];
      if ( a2[v12] )
      {
        if ( a1->bitbuf_bits_valid <= 0 )
        {
          result = Fill_Bit_Buffer(a1, 1);
          if ( result )
          {
            if ( result >= 0 )
              result = 0;
            return result;
          }
        }
        if ( GET_BITS(a1, 1) )
        {
          v13 = a2[v12];
          if ( !(v17 & v13) )
          {
            if ( v13 < 0 )
              a2[v12] = v18 + v13;
            else
              a2[v12] = v17 + v13;
          }
        }
        goto LABEL_20;
      }
      if ( --v11 < 0 )
        break;
LABEL_20:
      if ( ++v7 > a5 )
      {
        v6 = a1;
        goto LABEL_22;
      }
    }
    v6 = a1;
LABEL_22:
    if ( v16 )
      a2[izigzag_index[v7]] = v16;
    if ( ++v7 > a5 )
    {
      v8 = a5;
      v9 = v6->Prog_EndOfBlock_Run;
      goto LABEL_26;
    }
  }
  if ( v11 == 15 )
    goto LABEL_13;
  v8 = a5;
  v9 = 1 << v11;
  v6->Prog_EndOfBlock_Run = 1 << v11;
  if ( !v11 )
  {
LABEL_26:
    if ( v9 > 0 )
    {
      if ( v7 <= v8 )
      {
        while ( 1 )
        {
          v14 = izigzag_index[v7];
          if ( a2[v14] )
          {
            if ( v6->bitbuf_bits_valid <= 0 )
            {
              result = Fill_Bit_Buffer(v6, 1);
              if ( result )
              {
                if ( result >= 0 )
                  result = 0;
                return result;
              }
            }
            if ( GET_BITS(v6, 1) )
            {
              v15 = a2[v14];
              if ( !(v17 & v15) )
              {
                if ( v15 < 0 )
                  a2[v14] = v18 + v15;
                else
                  a2[v14] = v17 + v15;
              }
            }
          }
          if ( ++v7 > a5 )
          {
            v9 = v6->Prog_EndOfBlock_Run;
            break;
          }
        }
      }
      v6->Prog_EndOfBlock_Run = v9 - 1;
    }
    return 0;
  }
  if ( v11 <= v6->bitbuf_bits_valid || (result = Fill_Bit_Buffer(v6, v11)) == 0 )
  {
    v9 = v6->Prog_EndOfBlock_Run + GET_BITS(v6, v11);
    v6->Prog_EndOfBlock_Run = v9;
    goto LABEL_26;
  }
  if ( result >= 0 )
    result = 0;
  return result;
}
// B67EE0: using guessed type int izigzag_index[];

//----- (00767500) --------------------------------------------------------
int __cdecl FillDecoderQuantTable_IPP(int a1)
{
  signed int v1; // eax@1
  signed int v2; // eax@3
  int result; // eax@5
  __int16 v4; // [sp+0h] [bp-84h]@2
  __int16 v5; // [sp+2h] [bp-82h]@4
  __int16 v6; // [sp+4h] [bp-80h]@4
  __int16 v7[63]; // [sp+6h] [bp-7Eh]@4

  v1 = 0;
  do
  {
    *(&v4 + izigzag_index[v1]) = *(_WORD *)(a1 + 2 * v1);
    *(&v4 + dword_B67EE4[v1]) = *(_WORD *)(a1 + 2 * v1 + 2);
    *(&v4 + dword_B67EE8[v1]) = *(_WORD *)(a1 + 2 * v1 + 4);
    *(&v4 + dword_B67EEC[v1]) = *(_WORD *)(a1 + 2 * v1 + 6);
    v1 += 4;
  }
  while ( v1 < 64 );
  v2 = 0;
  do
  {
    *(_WORD *)(a1 + 2 * v2) = *(&v4 + v2);
    *(_WORD *)(a1 + 2 * v2 + 2) = *(&v5 + v2);
    *(_WORD *)(a1 + 2 * v2 + 4) = *(&v6 + v2);
    *(_WORD *)(a1 + 2 * v2 + 6) = v7[v2];
    v2 += 4;
  }
  while ( v2 < 64 );
  result = 0;
  *(_WORD *)(a1 + 128) = 0;
  *(_WORD *)(a1 + 130) = 0;
  *(_WORD *)(a1 + 132) = 0;
  *(_WORD *)(a1 + 134) = 0;
  *(_WORD *)(a1 + 136) = 0;
  *(_WORD *)(a1 + 138) = 0;
  *(_WORD *)(a1 + 140) = 0;
  *(_WORD *)(a1 + 142) = 0;
  *(_WORD *)(a1 + 144) = 0;
  *(_WORD *)(a1 + 146) = 0;
  *(_WORD *)(a1 + 148) = 0;
  *(_WORD *)(a1 + 150) = 0;
  *(_WORD *)(a1 + 152) = 0;
  *(_WORD *)(a1 + 154) = 0;
  *(_WORD *)(a1 + 156) = 0;
  *(_WORD *)(a1 + 158) = 0;
  return result;
}
// B67EE0: using guessed type int izigzag_index[];
// B67EE4: using guessed type int dword_B67EE4[];
// B67EE8: using guessed type int dword_B67EE8[];
// B67EEC: using guessed type int dword_B67EEC[];
// 767500: using guessed type __int16 var_7E[63];

//----- (00767610) --------------------------------------------------------
signed int __cdecl iQnt8x8_IPP_PX(int a1, int a2)
{
  signed int result; // eax@1
  __int16 v3; // bx@2

  result = 0;
  do
  {
    *(_WORD *)(a1 + 2 * result) *= *(_WORD *)(a2 + 2 * result);
    v3 = *(_WORD *)(a1 + 2 * result + 4);
    *(_WORD *)(a1 + 2 * result + 2) *= *(_WORD *)(a2 + 2 * result + 2);
    *(_WORD *)(a1 + 2 * result + 4) = v3 * *(_WORD *)(a2 + 2 * result + 4);
    *(_WORD *)(a1 + 2 * result + 6) *= *(_WORD *)(a2 + 2 * result + 6);
    result += 4;
  }
  while ( result < 64 );
  return result;
}

//----- (00767680) --------------------------------------------------------
void __cdecl iQnt8x8_IPP_M5(int a1, int a2)
{
  own_iqnt8x8_ipp_m5(a1, a2);
}

//----- (007676A0) --------------------------------------------------------
void __cdecl iQnt8x8_IPP_W7(int a1, int a2)
{
  own_iqnt8x8_ipp_w7(a1, a2);
}

//----- (007676C0) --------------------------------------------------------
signed __int16 *__cdecl iDCT8x8_IPP_PX(signed __int16 *a1)
{
  int v1; // ebx@1
  int *v2; // ecx@1
  int v3; // ebp@2
  int v4; // ecx@2
  int v5; // eax@2
  int v6; // ecx@2
  int v7; // edi@2
  int v8; // edx@2
  int v9; // ebp@2
  int v10; // esi@2
  int v11; // edi@2
  int v12; // edx@2
  int v13; // eax@2
  int v14; // ecx@2
  int v15; // esi@2
  int v16; // ecx@2
  int v17; // edi@2
  int v18; // edx@2
  int v19; // ecx@2
  int v20; // ebp@2
  int v21; // edx@2
  int v22; // ecx@2
  int v23; // ebx@2
  int v24; // ecx@2
  int v25; // esi@2
  int v26; // ebp@2
  int v27; // ebx@2
  int v28; // edx@2
  int *v29; // ecx@2
  int v30; // eax@2
  signed int v31; // ebx@2
  int v32; // eax@2
  signed int v33; // edx@2
  int v34; // ebx@2
  int v35; // eax@2
  signed int v36; // ebp@2
  bool v37; // sf@2
  unsigned __int8 v38; // of@2
  int v39; // edx@3
  signed __int16 *result; // eax@3
  int v41; // ecx@4
  int v42; // ebx@4
  int v43; // eax@4
  int v44; // ecx@4
  int v45; // ebx@4
  int v46; // ebp@4
  int v47; // edi@4
  int v48; // ebx@4
  int v49; // ebp@4
  int v50; // esi@4
  int v51; // eax@4
  int v52; // ecx@4
  int v53; // ebp@4
  int v54; // ecx@4
  int v55; // esi@4
  int v56; // ebx@4
  int v57; // ebp@4
  int v58; // ecx@4
  int v59; // edx@4
  int v60; // edi@4
  int v61; // esi@4
  int v62; // ebx@4
  int v63; // ecx@4
  int v64; // ebp@4
  int v65; // eax@4
  int v66; // edx@4
  signed __int16 *v67; // eax@4
  signed __int16 v68; // di@5
  int v69; // esi@7
  int v70; // esi@10
  int v71; // ecx@13
  int v72; // ecx@16
  int v73; // ebp@19
  int v74; // ecx@22
  int v75; // ebx@25
  char v76; // [sp+1Fh] [bp-135h]@1
  int v77; // [sp+120h] [bp-34h]@2
  int v78; // [sp+124h] [bp-30h]@2
  int v79; // [sp+128h] [bp-2Ch]@2
  int *v80; // [sp+12Ch] [bp-28h]@2
  int v81; // [sp+130h] [bp-24h]@2
  int v82; // [sp+134h] [bp-20h]@1
  signed __int16 *v83; // [sp+138h] [bp-1Ch]@1
  unsigned int v84; // [sp+13Ch] [bp-18h]@1

  v1 = (int)a1;
  v2 = (int *)((unsigned int)&v76 & 0xFFFFFFE0);
  v82 = 0;
  v84 = (unsigned int)&v76 & 0xFFFFFFE0;
  v83 = a1;
  do
  {
    v81 = v1;
    v3 = *(_WORD *)(v1 + 14);
    v80 = v2;
    v4 = *(_WORD *)(v1 + 2);
    v5 = 6393 * v3 + 32138 * v4;
    v6 = -32138 * v3 + 6393 * v4;
    v7 = *(_WORD *)(v1 + 10);
    v8 = *(_WORD *)(v1 + 6);
    v9 = 27246 * v8 + 18205 * v7;
    v10 = -18205 * v8 + 27246 * v7;
    v11 = v5 - v9;
    v12 = v6 - v10;
    v13 = 5793 * ((v5 + v9 + 2048) >> 12);
    v14 = 5793 * ((v6 + v10 + 2048) >> 12);
    v15 = *(_WORD *)(v1 + 12);
    v79 = v14;
    v16 = v11 + v12;
    v17 = v11 - v12;
    v78 = v16;
    v18 = *(_WORD *)v1;
    v19 = *(_WORD *)(v1 + 8);
    v77 = v17;
    v20 = (v18 + v19) << 15;
    v21 = (v18 - v19) << 15;
    v22 = *(_WORD *)(v1 + 4);
    v23 = 17734 * v15 + 42813 * v22;
    v24 = -42813 * v15 + 17734 * v22;
    v25 = v20 + v23;
    v26 = v20 - v23;
    v27 = v21 + v24;
    v28 = v21 - v24;
    v29 = v80;
    *v80 = (v13 + v25 + 2048) >> 12;
    v29[7] = (v25 - v13 + 2048) >> 12;
    v30 = (v78 + v27 + 2048) >> 12;
    v31 = v27 - v78 + 2048;
    v29[1] = v30;
    v29[6] = v31 >> 12;
    v32 = (v77 + v28 + 2048) >> 12;
    v33 = v28 - v77 + 2048;
    v29[2] = v32;
    v34 = v81;
    v29[5] = v33 >> 12;
    v35 = (v79 + v26 + 2048) >> 12;
    v36 = v26 - v79 + 2048;
    v29[3] = v35;
    v1 = v34 + 16;
    v29[4] = v36 >> 12;
    v2 = v29 + 8;
    v38 = __OFSUB__(v82 + 1, 8);
    v37 = v82++ - 7 < 0;
  }
  while ( v37 ^ v38 );
  v39 = v84;
  result = v83;
  v82 = 0;
  do
  {
    v84 = v39;
    v41 = *(_DWORD *)(v39 + 32);
    v42 = *(_DWORD *)(v39 + 224);
    v83 = result;
    v43 = 6393 * v42 + 32138 * v41;
    v44 = -32138 * v42 + 6393 * v41;
    v45 = *(_DWORD *)(v39 + 160);
    v46 = *(_DWORD *)(v39 + 96);
    v47 = 27246 * v46 + 18205 * v45;
    v48 = -18205 * v46 + 27246 * v45;
    v49 = v43 - v47;
    v50 = v44 - v48;
    v51 = 5793 * ((v43 + v47 + 2048) >> 12);
    v81 = v51;
    v80 = (int *)(5793 * ((v44 + v48 + 2048) >> 12));
    v52 = v49 + v44 - v48;
    v53 = v49 - v50;
    v79 = v52;
    v54 = *(_DWORD *)(v39 + 128);
    v55 = *(_DWORD *)(v39 + 64);
    v77 = v53;
    v56 = (*(_DWORD *)v39 + v54) << 15;
    v57 = (*(_DWORD *)v39 - v54) << 15;
    v58 = *(_DWORD *)(v39 + 192);
    v59 = 17734 * v58 + 42813 * v55;
    v60 = -42813 * v58 + 17734 * v55;
    v61 = v56 + v59;
    v62 = v56 - v59;
    v63 = v57 + v60;
    v64 = v57 - v60;
    v65 = ((v51 + v61 + 0x100000) >> 21) + 128;
    v37 = v65 < 0;
    v78 = v65;
    v66 = v84;
    v67 = v83;
    if ( v37 )
    {
      v68 = 0;
      v78 = 0;
    }
    else
    {
      v68 = v78;
      if ( v78 > 255 )
      {
        v68 = 255;
        v78 = 255;
      }
    }
    *v83 = v68;
    v69 = ((v61 - v81 + 0x100000) >> 21) + 128;
    if ( v69 < 0 )
    {
      LOWORD(v69) = 0;
    }
    else if ( v69 > 255 )
    {
      LOWORD(v69) = 255;
    }
    v67[56] = v69;
    v70 = ((v79 + v63 + 0x100000) >> 21) + 128;
    if ( v70 < 0 )
    {
      LOWORD(v70) = 0;
    }
    else if ( v70 > 255 )
    {
      LOWORD(v70) = 255;
    }
    v67[8] = v70;
    v71 = ((v63 - v79 + 0x100000) >> 21) + 128;
    if ( v71 < 0 )
    {
      LOWORD(v71) = 0;
    }
    else if ( v71 > 255 )
    {
      LOWORD(v71) = 255;
    }
    v67[48] = v71;
    v72 = ((v77 + v64 + 0x100000) >> 21) + 128;
    if ( v72 < 0 )
    {
      LOWORD(v72) = 0;
    }
    else if ( v72 > 255 )
    {
      LOWORD(v72) = 255;
    }
    v67[16] = v72;
    v73 = ((v64 - v77 + 0x100000) >> 21) + 128;
    if ( v73 < 0 )
    {
      LOWORD(v73) = 0;
    }
    else if ( v73 > 255 )
    {
      LOWORD(v73) = 255;
    }
    v67[40] = v73;
    v74 = (((signed int)v80 + v62 + 0x100000) >> 21) + 128;
    if ( v74 < 0 )
    {
      LOWORD(v74) = 0;
    }
    else if ( v74 > 255 )
    {
      LOWORD(v74) = 255;
    }
    v67[24] = v74;
    v75 = ((v62 - (signed int)v80 + 0x100000) >> 21) + 128;
    if ( v75 < 0 )
    {
      LOWORD(v75) = 0;
    }
    else if ( v75 > 255 )
    {
      LOWORD(v75) = 255;
    }
    v67[32] = v75;
    v39 = v66 + 4;
    result = v67 + 1;
    v38 = __OFSUB__(v82 + 1, 8);
    v37 = v82++ - 7 < 0;
  }
  while ( v37 ^ v38 );
  return result;
}

//----- (00767BB0) --------------------------------------------------------
void __cdecl iDCT8x8_IPP_M5(int a1)
{
  own_dct_2d_16s_8x8_inv_m5(a1);
}

//----- (00767BD0) --------------------------------------------------------
void __cdecl iDCT8x8_IPP_A6(int a1)
{
  own_dct_2d_16s_8x8_inv_a6(a1);
}

//----- (00767BF0) --------------------------------------------------------
void **__cdecl iDCT8x8_IPP_W7(int a1)
{
  return own_dct_2d_16s_8x8_inv_w7(a1);
}

//----- (00767C10) --------------------------------------------------------
char *__cdecl iDCT4x4_IPP_PX(int a1)
{
  int v1; // eax@1
  char *v2; // ecx@1
  int v3; // edx@2
  int v4; // esi@3
  int v5; // ebx@4
  int v6; // ebp@5
  int v7; // edx@6
  int v8; // edi@7
  int v9; // edx@8
  int v10; // ecx@14
  int v11; // eax@14
  int v12; // edx@14
  int v13; // eax@14
  int v14; // ebp@14
  _DWORD *v15; // ecx@14
  signed int v16; // ebx@14
  int v17; // eax@14
  int v18; // edx@15
  int v19; // edx@20
  char *result; // eax@20
  int v21; // ebp@22
  int v22; // ebx@23
  int v23; // esi@25
  int v24; // ecx@27
  _DWORD *v25; // edi@33
  _DWORD *v26; // ebx@34
  int v27; // ecx@36
  int v28; // edi@36
  int v29; // ebp@36
  int v30; // ecx@36
  int v31; // esi@36
  int v32; // ebx@36
  int v33; // ebp@39
  int v34; // ebx@42
  int v35; // ecx@45
  char v36; // [sp+0h] [bp-ACh]@1
  int v37; // [sp+80h] [bp-2Ch]@7
  int v38; // [sp+84h] [bp-28h]@2
  int v39; // [sp+88h] [bp-24h]@1
  int v40; // [sp+8Ch] [bp-20h]@1
  int v41; // [sp+90h] [bp-1Ch]@14
  _DWORD *v42; // [sp+94h] [bp-18h]@14
  int v43; // [sp+98h] [bp-14h]@14

  v1 = a1;
  v2 = &v36;
  v39 = 8;
  v40 = a1;
LABEL_2:
  v3 = *(_WORD *)(v1 + 16);
  v38 = *(_WORD *)(v1 + 16);
  if ( v3 )
  {
    v4 = *(_WORD *)(v1 + 32);
    v7 = *(_WORD *)(v1 + 96);
    v37 = *(_WORD *)(v1 + 112);
    v6 = *(_WORD *)(v1 + 80);
    v5 = *(_WORD *)(v1 + 48);
  }
  else
  {
    v4 = *(_WORD *)(v1 + 32);
    if ( *(_WORD *)(v1 + 32) )
    {
      v7 = *(_WORD *)(v1 + 96);
      v6 = *(_WORD *)(v1 + 80);
      v37 = *(_WORD *)(v1 + 112);
      v5 = *(_WORD *)(v1 + 48);
    }
    else
    {
      v5 = *(_WORD *)(v1 + 48);
      if ( *(_WORD *)(v1 + 48) )
      {
        v7 = *(_WORD *)(v1 + 96);
        v37 = *(_WORD *)(v1 + 112);
        v6 = *(_WORD *)(v1 + 80);
      }
      else
      {
        v6 = *(_WORD *)(v1 + 80);
        if ( *(_WORD *)(v1 + 80) )
        {
          v7 = *(_WORD *)(v1 + 96);
          v37 = *(_WORD *)(v1 + 112);
        }
        else
        {
          v7 = *(_WORD *)(v1 + 96);
          if ( *(_WORD *)(v1 + 96) )
          {
            v37 = *(_WORD *)(v1 + 112);
          }
          else
          {
            v8 = *(_WORD *)(v1 + 112);
            v37 = *(_WORD *)(v1 + 112);
            if ( !v8 )
            {
              v9 = 4 * *(_WORD *)v1;
              *(_DWORD *)v2 = v9;
              v1 += 2;
              *((_DWORD *)v2 + 8) = v9;
              *((_DWORD *)v2 + 16) = v9;
              *((_DWORD *)v2 + 24) = v9;
              v2 += 4;
              goto LABEL_15;
            }
          }
        }
      }
    }
  }
  v42 = v2;
  v10 = *(_WORD *)v1 << 14;
  v41 = v1;
  v11 = -6270 * v7 + 15137 * v4;
  v12 = v10 + v11;
  v43 = v10 - v11;
  v13 = 8697 * v38 + -1730 * v37 + -17799 * v5 + 11893 * v6;
  v14 = 20995 * v38 + -4176 * v37 + 7373 * v5 + -4926 * v6;
  v15 = v42;
  *v42 = (v14 + v12 + 2048) >> 12;
  v15[24] = (v12 - v14 + 2048) >> 12;
  v16 = v43 - v13 + 2048;
  v15[8] = (v13 + v43 + 2048) >> 12;
  v17 = v41;
  v15[16] = v16 >> 12;
  v1 = v17 + 2;
  v2 = (char *)(v15 + 1);
LABEL_15:
  v18 = v39;
  while ( --v18 > 0 )
  {
    if ( v18 != 4 )
    {
      v39 = v18;
      goto LABEL_2;
    }
    v1 += 2;
    v2 += 4;
  }
  v19 = v40;
  result = &v36;
  v39 = 0;
  do
  {
    v38 = *((_DWORD *)result + 1);
    ++v39;
    if ( v38 )
    {
      v21 = *((_DWORD *)result + 2);
      v23 = *((_DWORD *)result + 6);
      v37 = *((_DWORD *)result + 7);
      v42 = (_DWORD *)*((_DWORD *)result + 5);
      v22 = *((_DWORD *)result + 3);
    }
    else
    {
      v21 = *((_DWORD *)result + 2);
      if ( v21 )
      {
        v23 = *((_DWORD *)result + 6);
        v26 = (_DWORD *)*((_DWORD *)result + 5);
        v37 = *((_DWORD *)result + 7);
        v42 = v26;
        v22 = *((_DWORD *)result + 3);
      }
      else
      {
        v22 = *((_DWORD *)result + 3);
        if ( v22 )
        {
          v23 = *((_DWORD *)result + 6);
          v25 = (_DWORD *)*((_DWORD *)result + 5);
          v37 = *((_DWORD *)result + 7);
          v42 = v25;
        }
        else
        {
          v42 = (_DWORD *)*((_DWORD *)result + 5);
          if ( v42 )
          {
            v23 = *((_DWORD *)result + 6);
            v37 = *((_DWORD *)result + 7);
          }
          else
          {
            v23 = *((_DWORD *)result + 6);
            if ( v23 )
            {
              v37 = *((_DWORD *)result + 7);
            }
            else
            {
              v37 = *((_DWORD *)result + 7);
              if ( !v37 )
              {
                v24 = ((*(_DWORD *)result + 16) >> 5) + 128;
                if ( v24 < 0 )
                {
                  LOWORD(v24) = 0;
                }
                else if ( v24 > 255 )
                {
                  LOWORD(v24) = 255;
                }
                result += 32;
                *(_WORD *)v19 = v24;
                *(_WORD *)(v19 + 2) = v24;
                *(_WORD *)(v19 + 4) = v24;
                *(_WORD *)(v19 + 6) = v24;
                v19 += 16;
                continue;
              }
            }
          }
        }
      }
    }
    v27 = *(_DWORD *)result << 14;
    v28 = -6270 * v23 + 15137 * v21;
    v29 = v27 + v28;
    v30 = v27 - v28;
    v41 = 8697 * v38 + -1730 * v37 + -17799 * v22 + 11893 * (_DWORD)v42;
    v31 = 20995 * v38 + -4176 * v37 + 7373 * v22 + -4926 * (_DWORD)v42;
    v32 = ((v31 + v29 + 0x40000) >> 19) + 128;
    if ( v32 < 0 )
    {
      LOWORD(v32) = 0;
    }
    else if ( v32 > 255 )
    {
      LOWORD(v32) = 255;
    }
    *(_WORD *)v19 = v32;
    v33 = ((v29 - v31 + 0x40000) >> 19) + 128;
    if ( v33 < 0 )
    {
      LOWORD(v33) = 0;
    }
    else if ( v33 > 255 )
    {
      LOWORD(v33) = 255;
    }
    *(_WORD *)(v19 + 6) = v33;
    v34 = ((v41 + v30 + 0x40000) >> 19) + 128;
    if ( v34 < 0 )
    {
      LOWORD(v34) = 0;
    }
    else if ( v34 > 255 )
    {
      LOWORD(v34) = 255;
    }
    *(_WORD *)(v19 + 2) = v34;
    v35 = ((v30 - v41 + 0x40000) >> 19) + 128;
    if ( v35 < 0 )
    {
      LOWORD(v35) = 0;
    }
    else if ( v35 > 255 )
    {
      LOWORD(v35) = 255;
    }
    *(_WORD *)(v19 + 4) = v35;
    result += 32;
    v19 += 16;
  }
  while ( v39 < 4 );
  return result;
}

//----- (00768110) --------------------------------------------------------
int __cdecl iDCT2x2_IPP_PX(int a1)
{
  int v1; // edx@1
  int *v2; // eax@1
  int v3; // ebx@3
  int v4; // edi@4
  int v5; // ecx@5
  int v6; // ecx@6
  int v7; // esi@10
  int v8; // ecx@10
  int v9; // ecx@11
  int v10; // edx@19
  int v11; // eax@20
  int v12; // edi@21
  int v13; // eax@22
  int v14; // edi@25
  char *v15; // eax@25
  int v16; // esi@29
  int v17; // edi@29
  int v18; // eax@29
  int v19; // esi@32
  int v20; // esi@36
  int v21; // ebp@37
  int v22; // ecx@38
  int v23; // edx@39
  int result; // eax@40
  int v25; // eax@47
  int v26; // edx@47
  int v27; // ecx@47
  int v28; // [sp+0h] [bp-54h]@1
  int v29; // [sp+4h] [bp-50h]@18
  int v30; // [sp+Ch] [bp-48h]@19
  int v31; // [sp+14h] [bp-40h]@20
  int v32; // [sp+1Ch] [bp-38h]@21
  char v33; // [sp+20h] [bp-34h]@25
  int v34; // [sp+40h] [bp-14h]@1

  v1 = a1;
  v2 = &v28;
  v34 = 8;
LABEL_2:
  if ( *(_WORD *)(v1 + 16) )
  {
    v5 = *(_WORD *)(v1 + 112);
    v4 = *(_WORD *)(v1 + 80);
    v3 = *(_WORD *)(v1 + 48);
    goto LABEL_10;
  }
  v3 = *(_WORD *)(v1 + 48);
  if ( *(_WORD *)(v1 + 48) )
  {
    v5 = *(_WORD *)(v1 + 112);
    v4 = *(_WORD *)(v1 + 80);
    goto LABEL_10;
  }
  v4 = *(_WORD *)(v1 + 80);
  if ( *(_WORD *)(v1 + 80) )
  {
    v5 = *(_WORD *)(v1 + 112);
    goto LABEL_10;
  }
  v5 = *(_WORD *)(v1 + 112);
  if ( *(_WORD *)(v1 + 112) )
  {
LABEL_10:
    v7 = *(_WORD *)v1 << 15;
    v8 = -5906 * v5 + 6967 * v4 + -10426 * v3 + 29692 * *(_WORD *)(v1 + 16);
    *v2 = (v7 + v8 + 4096) >> 13;
    v2[8] = (v7 - v8 + 4096) >> 13;
    v1 += 2;
    ++v2;
    goto LABEL_11;
  }
  v6 = 4 * *(_WORD *)v1;
  *v2 = v6;
  v1 += 2;
  v2[8] = v6;
  ++v2;
LABEL_11:
  v9 = v34;
  while ( --v9 > 0 )
  {
    if ( v9 != 6 && v9 != 4 && v9 != 2 )
    {
      v34 = v9;
      goto LABEL_2;
    }
    v1 += 2;
    ++v2;
  }
  if ( v29 )
  {
    v12 = v32;
    v11 = v31;
    v10 = v30;
  }
  else
  {
    v10 = v30;
    if ( v30 )
    {
      v12 = v32;
      v11 = v31;
    }
    else
    {
      v11 = v31;
      if ( v31 )
      {
        v12 = v32;
      }
      else
      {
        v12 = v32;
        if ( !v32 )
        {
          v13 = ((v28 + 16) >> 5) + 128;
          if ( v13 < 0 )
          {
            LOWORD(v13) = 0;
          }
          else if ( v13 > 255 )
          {
            LOWORD(v13) = 255;
          }
          v14 = a1 + 16;
          *(_WORD *)a1 = v13;
          *(_WORD *)(a1 + 2) = v13;
          v15 = &v33;
          goto LABEL_36;
        }
      }
    }
  }
  v16 = v28 << 15;
  v17 = 29692 * v29 + -10426 * v10 + 6967 * v11 + -5906 * v12;
  v18 = (((v28 << 15) + v17 + 0x80000) >> 20) + 128;
  if ( v18 < 0 )
  {
    LOWORD(v18) = 0;
  }
  else if ( v18 > 255 )
  {
    LOWORD(v18) = 255;
  }
  *(_WORD *)a1 = v18;
  v19 = ((v16 - v17 + 0x80000) >> 20) + 128;
  if ( v19 < 0 )
  {
    LOWORD(v19) = 0;
  }
  else if ( v19 > 255 )
  {
    LOWORD(v19) = 255;
  }
  *(_WORD *)(a1 + 2) = v19;
  v15 = &v33;
  v14 = a1 + 16;
LABEL_36:
  v20 = *((_DWORD *)v15 + 1);
  if ( v20 )
  {
    v23 = *((_DWORD *)v15 + 7);
    v22 = *((_DWORD *)v15 + 5);
    v21 = *((_DWORD *)v15 + 3);
  }
  else
  {
    v21 = *((_DWORD *)v15 + 3);
    if ( v21 )
    {
      v23 = *((_DWORD *)v15 + 7);
      v22 = *((_DWORD *)v15 + 5);
    }
    else
    {
      v22 = *((_DWORD *)v15 + 5);
      if ( v22 )
      {
        v23 = *((_DWORD *)v15 + 7);
      }
      else
      {
        v23 = *((_DWORD *)v15 + 7);
        if ( !v23 )
        {
          result = ((*(_DWORD *)v15 + 16) >> 5) + 128;
          if ( result < 0 )
          {
            LOWORD(result) = 0;
          }
          else if ( result > 255 )
          {
            LOWORD(result) = 255;
          }
          result = (signed __int16)result;
          *(_WORD *)v14 = result;
          *(_WORD *)(v14 + 2) = result;
          return result;
        }
      }
    }
  }
  v25 = *(_DWORD *)v15 << 15;
  v26 = 29692 * v20 + -10426 * v21 + 6967 * v22 + -5906 * v23;
  v27 = ((v25 + v26 + 0x80000) >> 20) + 128;
  if ( v27 < 0 )
  {
    LOWORD(v27) = 0;
  }
  else if ( v27 > 255 )
  {
    LOWORD(v27) = 255;
  }
  *(_WORD *)v14 = v27;
  result = ((v25 - v26 + 0x80000) >> 20) + 128;
  if ( result < 0 )
  {
    result = 0;
  }
  else if ( result > 255 )
  {
    result = 255;
  }
  *(_WORD *)(v14 + 2) = result;
  return result;
}

//----- (00768400) --------------------------------------------------------
_WORD *__cdecl iDCT1x1_IPP_PX(_WORD *a1)
{
  _WORD *result; // eax@1
  int v2; // edx@1

  result = a1;
  v2 = ((*a1 + 4) >> 3) + 128;
  if ( v2 < 0 )
  {
    LOWORD(v2) = 0;
  }
  else if ( v2 > 255 )
  {
    LOWORD(v2) = 255;
  }
  *a1 = v2;
  return result;
}

//----- (00768430) --------------------------------------------------------
void __cdecl EB_Init_PX(struct _STATE *a1, unsigned __int8 *a2, unsigned __int32 a3)
{
  if ( a1->file )
  {
    a1->entropy_buf_maxsize = 4096;
    a1->start_entropy_ptr = a1->JPGBuffer;
    a1->end_entropy_ptr = (char *)&a1[1];
    a1->cur_entropy_ptr = a1->JPGBuffer;
    a1->entropy_bytes_left = 4096;
    a1->entropy_bytes_processed = 0;
  }
  else
  {
    a1->entropy_buf_maxsize = a3;
    a1->start_entropy_ptr = (char *)a2;
    a1->end_entropy_ptr = (char *)&a2[a3];
    a1->cur_entropy_ptr = (char *)a2;
    a1->entropy_bytes_left = a3;
    a1->entropy_bytes_processed = 0;
  }
  a1->bit_buffer_64 = 0i64;
  a1->bitbuf_bits_valid = 8;
}

//----- (007684A0) --------------------------------------------------------
void __cdecl EB_Init_M5(struct _STATE *a1, unsigned __int8 *a2, unsigned __int32 a3)
{
  if ( a1->file )
  {
    a1->entropy_buf_maxsize = 4096;
    a1->start_entropy_ptr = a1->JPGBuffer;
    a1->cur_entropy_ptr = a1->JPGBuffer;
    a1->end_entropy_ptr = (char *)&a1[1];
  }
  else
  {
    a1->entropy_buf_maxsize = a3;
    a1->start_entropy_ptr = (char *)a2;
    a1->cur_entropy_ptr = (char *)a2;
    a1->end_entropy_ptr = (char *)&a2[a3];
  }
  a1->bit_buffer_64 = 0i64;
  a1->bitbuf_bits_valid = 0;
}

//----- (007684F0) --------------------------------------------------------
int __cdecl EB_Write_Bytes_PX(int a1, unsigned int a2, int a3)
{
  signed int v3; // esi@1
  _BYTE *v4; // ecx@3
  char v5; // al@8
  _BYTE *v6; // edx@9
  unsigned int v7; // edi@16
  _BYTE *v8; // edx@18
  char v9; // al@22
  _BYTE *v11; // edx@26
  char v12; // al@29
  int v13; // edi@29
  _BYTE *v14; // ecx@30
  unsigned int v15; // ecx@32
  int v16; // edx@42
  unsigned int NumberOfBytesWritten; // [sp+10h] [bp-1Ch]@4
  int v18; // [sp+14h] [bp-18h]@17
  unsigned int v19; // [sp+18h] [bp-14h]@34

  v3 = 0;
  if ( *(_DWORD *)(a3 + 60) )
  {
    if ( *(_DWORD *)(a3 + 12) < 8 )
    {
      v4 = *(_BYTE **)(a3 + 16);
      if ( (unsigned int)v4 >= *(_DWORD *)(a3 + 24) )
      {
        if ( !ownWriteFile(*(HANDLE *)(a3 + 60), (LPCVOID)(a3 + 64), 0x1000u, &NumberOfBytesWritten)
          || NumberOfBytesWritten != 4096 )
        {
          return -23;
        }
        v4 = *(_BYTE **)(a3 + 20);
      }
      v5 = *(_BYTE *)a3;
      *(_DWORD *)(a3 + 16) = v4 + 1;
      *v4 = v5;
      ++*(_DWORD *)(a3 + 28);
      if ( *(_BYTE *)a3 == 255 )
      {
        v6 = *(_BYTE **)(a3 + 16);
        if ( (unsigned int)v6 >= *(_DWORD *)(a3 + 24) )
        {
          if ( !ownWriteFile(*(HANDLE *)(a3 + 60), (LPCVOID)(a3 + 64), 0x1000u, &NumberOfBytesWritten)
            || NumberOfBytesWritten != 4096 )
          {
            return -23;
          }
          v6 = *(_BYTE **)(a3 + 20);
        }
        *(_DWORD *)(a3 + 16) = v6 + 1;
        *v6 = 0;
        ++*(_DWORD *)(a3 + 28);
      }
      *(_DWORD *)a3 = 0;
      *(_DWORD *)(a3 + 4) = 0;
      *(_DWORD *)(a3 + 12) = 8;
    }
    v7 = 0;
    if ( a2 )
    {
      v18 = 0;
      while ( 1 )
      {
        v8 = *(_BYTE **)(a3 + 16);
        if ( (unsigned int)v8 >= *(_DWORD *)(a3 + 24) )
        {
          if ( !ownWriteFile(*(HANDLE *)(a3 + 60), (LPCVOID)(a3 + 64), 0x1000u, &NumberOfBytesWritten)
            || NumberOfBytesWritten != 4096 )
          {
            return -23;
          }
          v8 = *(_BYTE **)(a3 + 20);
          *(_DWORD *)(a3 + 16) = v8;
        }
        v9 = *(_BYTE *)(v7++ + a1);
        *(_DWORD *)(a3 + 16) = v8 + 1;
        *v8 = v9;
        ++*(_DWORD *)(a3 + 28);
        if ( v7 >= a2 )
          return v18;
      }
    }
  }
  else
  {
    v11 = *(_BYTE **)(a3 + 16);
    if ( (unsigned int)&v11[a2] < *(_DWORD *)(a3 + 24) )
    {
      if ( *(_DWORD *)(a3 + 12) < 8 )
      {
        v12 = *(_BYTE *)a3;
        *(_DWORD *)(a3 + 16) = v11 + 1;
        *v11 = v12;
        ++*(_DWORD *)(a3 + 28);
        v13 = *(_BYTE *)a3;
        --*(_DWORD *)(a3 + 36);
        if ( v13 == 255 )
        {
          v14 = *(_BYTE **)(a3 + 16);
          *(_DWORD *)(a3 + 16) = v14 + 1;
          *v14 = 0;
          ++*(_DWORD *)(a3 + 28);
          --*(_DWORD *)(a3 + 36);
        }
        *(_DWORD *)(a3 + 12) = 8;
        *(_DWORD *)a3 = 0;
        *(_DWORD *)(a3 + 4) = 0;
        v11 = *(_BYTE **)(a3 + 16);
      }
      v15 = 0;
      if ( a2 )
      {
        if ( a2 >= 6 )
        {
          v19 = a2 - 6;
          v18 = 0;
          while ( 1 )
          {
            v11[v15] = *(_BYTE *)(v15 + a1);
            *(_BYTE *)(*(_DWORD *)(a3 + 16) + v15 + 1) = *(_BYTE *)(v15 + a1 + 1);
            *(_BYTE *)(*(_DWORD *)(a3 + 16) + v15 + 2) = *(_BYTE *)(v15 + a1 + 2);
            *(_BYTE *)(*(_DWORD *)(a3 + 16) + v15 + 3) = *(_BYTE *)(v15 + a1 + 3);
            *(_BYTE *)(*(_DWORD *)(a3 + 16) + v15 + 4) = *(_BYTE *)(v15 + a1 + 4);
            v15 += 5;
            if ( v15 > v19 )
              break;
            v11 = *(_BYTE **)(a3 + 16);
          }
          v3 = v18;
          v11 = *(_BYTE **)(a3 + 16);
        }
        while ( 1 )
        {
          v11[v15] = *(_BYTE *)(v15 + a1);
          if ( ++v15 >= a2 )
            break;
          v11 = *(_BYTE **)(a3 + 16);
        }
        v11 = *(_BYTE **)(a3 + 16);
      }
      *(_DWORD *)(a3 + 16) = &v11[a2];
      v16 = *(_DWORD *)(a3 + 36) - a2;
      *(_DWORD *)(a3 + 28) += a2;
      *(_DWORD *)(a3 + 36) = v16;
    }
    else
    {
      v3 = -28;
    }
  }
  return v3;
}

//----- (00768760) --------------------------------------------------------
int __cdecl EB_Write_Bytes_M5(int a1, int a2, int a3)
{
  int v3; // edx@1
  int v4; // ebx@2
  DWORD v5; // ebx@3
  int result; // eax@5
  unsigned int NumberOfBytesWritten; // [sp+10h] [bp-14h]@3

  v3 = *(_DWORD *)(a3 + 60);
  if ( v3 )
  {
    v4 = *(_DWORD *)(a3 + 16);
    if ( a2 + v4 + 2 >= *(_DWORD *)(a3 + 24) )
    {
      v5 = v4 - *(_DWORD *)(a3 + 20);
      if ( !ownWriteFile(*(HANDLE *)(a3 + 60), (LPCVOID)(a3 + 64), v5, &NumberOfBytesWritten)
        || v5 != NumberOfBytesWritten )
      {
        return -23;
      }
      v3 = *(_DWORD *)(a3 + 60);
      *(_DWORD *)(a3 + 16) = *(_DWORD *)(a3 + 20);
    }
  }
  if ( v3 || (unsigned int)(a2 + *(_DWORD *)(a3 + 16)) < *(_DWORD *)(a3 + 24) )
  {
    result = own_eb_write_bytes_m5((__m64 *)a3, a1, a2);
    *(_DWORD *)(a3 + 28) += a2;
  }
  else
  {
    result = -28;
  }
  return result;
}

//----- (00768800) --------------------------------------------------------
signed int __usercall EB_Write_Bits_M5@<eax>(__m64 a1@<mm1>, unsigned __int32 a2, int a3, struct _STATE *a4)
{
  return own_eb_write_bits_m5(a1, a2, a3, (__m64 *)a4);
}

//----- (00768830) --------------------------------------------------------
signed int __usercall EB_Write_Bits_File_M5@<eax>(__m64 a1@<mm1>, unsigned __int32 a2, int a3, struct _STATE *a4)
{
  return own_eb_write_bits_file_m5(a1, a2, a3, (int)a4);
}

//----- (00768860) --------------------------------------------------------
int __cdecl Flush_Buffer_To_File(int a1)
{
  int v1; // ebx@1
  DWORD v2; // esi@3
  unsigned int NumberOfBytesWritten; // [sp+10h] [bp-14h]@3

  v1 = (*(int (__cdecl **)(_DWORD, _DWORD, int))(*(_DWORD *)(a1 + 8) + 92))(0, 0, a1);
  if ( !v1 && *(_DWORD *)(a1 + 60) )
  {
    v2 = *(_DWORD *)(a1 + 16) - *(_DWORD *)(a1 + 20);
    if ( ownWriteFile(*(HANDLE *)(a1 + 60), (LPCVOID)(a1 + 64), v2, &NumberOfBytesWritten) && v2 == NumberOfBytesWritten )
      *(_DWORD *)(a1 + 16) = *(_DWORD *)(a1 + 20);
    else
      v1 = -23;
  }
  return v1;
}

//----- (007688D0) --------------------------------------------------------
signed int __cdecl flush_mbuffer_to_file(int a1)
{
  DWORD v1; // ebx@1
  signed int result; // eax@3
  int v3; // edx@4
  unsigned int NumberOfBytesWritten; // [sp+10h] [bp-Ch]@1

  v1 = *(_DWORD *)(a1 + 16) - *(_DWORD *)(a1 + 20);
  if ( ownWriteFile(*(HANDLE *)(a1 + 60), (LPCVOID)(a1 + 64), v1, &NumberOfBytesWritten) && v1 == NumberOfBytesWritten )
  {
    v3 = *(_DWORD *)(a1 + 20);
    result = 0;
    *(_DWORD *)(a1 + 16) = v3;
    *(_DWORD *)(a1 + 24) = *(_DWORD *)(a1 + 32) + v3;
  }
  else
  {
    result = -23;
  }
  return result;
}

//----- (00768930) --------------------------------------------------------
signed int __cdecl Set_Encode_Fast_Path(struct _JPEG_PROPERTIES *a1)
{
  _DWORD *v1; // edx@1
  signed int result; // eax@1
  int v3; // ebx@2
  int v4; // ebx@4
  int v5; // ebx@12
  int v6; // ebx@17
  int v7; // ebx@24
  _FRAME_COMPONENT *v8; // ebp@37
  int v9; // ebx@37
  _IJL_COLOR v10; // ebp@55
  _FRAME_COMPONENT *v11; // ebp@59
  int v12; // ebx@59
  _FRAME_COMPONENT *v13; // ebp@74
  int v14; // ebx@74
  _FRAME_COMPONENT *v15; // ebp@89
  int v16; // ebx@89
  _FRAME_COMPONENT *v17; // ebp@105
  int v18; // ebx@105
  _IJL_COLOR v19; // ebx@131

  v1 = a1->state.ctx;
  result = 0;
  if ( a1->jinterleaveType )
  {
    a1->fast_processing = 0;
  }
  else
  {
    v3 = a1->upsampling_reqd;
    if ( v3 && a1->cconversion_reqd )
    {
      a1->fast_processing = 0;
      v4 = a1->jframe.ncomps;
      if ( v4 > 0 && v4 <= 255 )
      {
        if ( v4 == 3 )
        {
          v10 = a1->DIBColor;
          if ( v10 != 1 || a1->DIBChannels != 3 )
          {
            if ( v10 != 1 || a1->DIBChannels != 4 )
            {
              if ( v10 == 2 && a1->DIBChannels == 3 )
              {
                v11 = a1->jframe.comps;
                v12 = v11->hsampling;
                if ( v12 != 2
                  || v11->vsampling != 2
                  || v11[1].hsampling != 1
                  || v11[1].vsampling != 1
                  || v11[2].hsampling != 1
                  || v11[2].vsampling != 1 )
                {
                  if ( v12 == 2
                    && v11->vsampling == 1
                    && v11[1].hsampling == 1
                    && v11[1].vsampling == 1
                    && v11[2].hsampling == 1
                    && v11[2].vsampling == 1 )
                  {
                    a1->fast_processing = 6;
                    v1[24] = BGR_to_YCbCr_422_MCU;
                  }
                }
                else
                {
                  a1->fast_processing = 4;
                  v1[24] = BGR_to_YCbCr_411_MCU;
                }
              }
            }
            else
            {
              v13 = a1->jframe.comps;
              v14 = v13->hsampling;
              if ( v14 != 2
                || v13->vsampling != 2
                || v13[1].hsampling != 1
                || v13[1].vsampling != 1
                || v13[2].hsampling != 1
                || v13[2].vsampling != 1 )
              {
                if ( v14 == 2
                  && v13->vsampling == 1
                  && v13[1].hsampling == 1
                  && v13[1].vsampling == 1
                  && v13[2].hsampling == 1
                  && v13[2].vsampling == 1 )
                {
                  a1->fast_processing = 0;
                  v1[24] = CC_SS_RGB_to_YCbCr_General_MCU;
                }
              }
              else
              {
                a1->fast_processing = 0;
                v1[24] = CC_SS_RGB_to_YCbCr_General_MCU;
              }
            }
          }
          else
          {
            v15 = a1->jframe.comps;
            v16 = v15->hsampling;
            if ( v16 != 2
              || v15->vsampling != 2
              || v15[1].hsampling != 1
              || v15[1].vsampling != 1
              || v15[2].hsampling != 1
              || v15[2].vsampling != 1 )
            {
              if ( v16 == 2
                && v15->vsampling == 1
                && v15[1].hsampling == 1
                && v15[1].vsampling == 1
                && v15[2].hsampling == 1
                && v15[2].vsampling == 1 )
              {
                a1->fast_processing = 5;
                v1[24] = RGB_to_YCbCr_422_MCU;
              }
            }
            else
            {
              a1->fast_processing = 3;
              v1[24] = RGB_to_YCbCr_411_MCU;
            }
          }
        }
        else if ( v4 == 4 && a1->DIBColor == 5 && a1->DIBChannels == 4 )
        {
          v8 = a1->jframe.comps;
          v9 = v8->hsampling;
          if ( v9 != 2
            || v8->vsampling != 2
            || v8[1].hsampling != 1
            || v8[1].vsampling != 1
            || v8[2].hsampling != 1
            || v8[2].vsampling != 1
            || v8[3].hsampling != 2
            || v8[3].vsampling != 2 )
          {
            if ( v9 == 2
              && v8->vsampling == 1
              && v8[1].hsampling == 1
              && v8[1].vsampling == 1
              && v8[2].hsampling == 1
              && v8[2].vsampling == 1
              && v8[3].hsampling == 2
              && v8[3].vsampling == 1 )
            {
              a1->fast_processing = 12;
              v1[24] = RGBA_FPX_to_YCbCrA_FPX_4224_MCU;
            }
          }
          else
          {
            a1->fast_processing = 11;
            v1[24] = RGBA_FPX_to_YCbCrA_FPX_4114_MCU;
          }
        }
      }
      else
      {
        result = -14;
      }
    }
    else if ( !v3 || a1->cconversion_reqd )
    {
      if ( v3 || !a1->cconversion_reqd )
      {
        if ( v3 )
        {
          a1->fast_processing = 0;
        }
        else if ( a1->cconversion_reqd )
        {
          a1->fast_processing = 0;
        }
        else
        {
          v7 = a1->jframe.ncomps;
          if ( v7 != 1 || a1->DIBColor != 4 || a1->JPGColor != 4 )
          {
            if ( v7 != 3 || a1->DIBChannels != 1 || a1->JPGColor != 3 )
            {
              if ( v7 != 3 || a1->DIBChannels != 3 )
              {
                if ( v7 != 3 || a1->DIBChannels != 4 )
                {
                  if ( v7 == 4 )
                  {
                    a1->fast_processing = 14;
                    v1[24] = OTHER_to_OTHER_1111_MCU;
                  }
                  else
                  {
                    a1->fast_processing = 0;
                    if ( a1->JPGColor == 255 && a1->DIBColor == 255 )
                      v1[24] = Input_Interleave_General_MCU;
                  }
                }
                else
                {
                  a1->fast_processing = 0;
                  v1[24] = Input_Interleave_General_MCU;
                }
              }
              else if ( a1->DIBColor == 2 )
              {
                a1->fast_processing = 0;
                v1[24] = Input_Interleave_General_MCU;
              }
              else
              {
                a1->fast_processing = 15;
                v1[24] = OTHER_to_OTHER_111_MCU;
              }
            }
            else
            {
              a1->fast_processing = 0;
              v1[24] = Input_Interleave_General_MCU;
            }
          }
          else
          {
            a1->fast_processing = 20;
            v1[24] = Y_to_Y_111_MCU;
          }
        }
      }
      else
      {
        v6 = a1->jframe.ncomps;
        if ( v6 != 1 || a1->DIBChannels != 3 )
        {
          if ( v6 != 3 || a1->DIBChannels != 3 )
          {
            if ( v6 != 3 || a1->DIBChannels != 4 )
            {
              if ( v6 == 4 )
              {
                if ( a1->DIBChannels == 4 )
                {
                  if ( a1->DIBColor == 5 )
                  {
                    a1->fast_processing = 10;
                    v1[24] = RGBA_FPX_to_YCbCrA_FPX_1111_MCU;
                  }
                  else
                  {
                    a1->fast_processing = 0;
                  }
                }
                else
                {
                  a1->fast_processing = 0;
                }
              }
              else
              {
                a1->fast_processing = 0;
              }
            }
            else
            {
              a1->fast_processing = 0;
              v1[24] = CC_SS_RGB_to_YCbCr_General_MCU;
            }
          }
          else
          {
            v19 = a1->DIBColor;
            if ( v19 == 1 )
            {
              a1->fast_processing = 1;
              v1[24] = RGB_to_YCbCr_111_MCU;
            }
            else if ( v19 == 2 )
            {
              a1->fast_processing = 2;
              v1[24] = BGR_to_YCbCr_111_MCU;
            }
            else
            {
              a1->fast_processing = 0;
            }
          }
        }
        else
        {
          a1->fast_processing = 0;
          v1[24] = CC_RGB_to_YCbCr_General_MCU;
        }
      }
    }
    else
    {
      a1->fast_processing = 0;
      v5 = a1->jframe.ncomps;
      if ( v5 != 3 || a1->DIBChannels != 1 )
      {
        if ( v5 != 3 || a1->DIBChannels != 3 || a1->DIBColor == 2 )
        {
          v1[24] = SS_General_MCU;
        }
        else
        {
          v17 = a1->jframe.comps;
          v18 = v17->hsampling;
          if ( v18 == 2
            && v17->vsampling == 2
            && v17[1].hsampling == 1
            && v17[1].vsampling == 1
            && v17[2].hsampling == 1
            && v17[2].vsampling == 1 )
          {
            a1->fast_processing = 16;
            v1[24] = OTHER_to_OTHER_411_MCU;
            v17 = a1->jframe.comps;
            v18 = v17->hsampling;
          }
          if ( v18 == 2
            && v17->vsampling == 1
            && v17[1].hsampling == 1
            && v17[1].vsampling == 1
            && v17[2].hsampling == 1
            && v17[2].vsampling == 1 )
          {
            if ( a1->DIBSubsampling == 2 )
            {
              a1->fast_processing = 18;
              v1[24] = YCbYCr_to_YCbCr_422_MCU;
            }
            else
            {
              a1->fast_processing = 17;
              v1[24] = OTHER_to_OTHER_422_MCU;
            }
          }
        }
      }
      else
      {
        v1[24] = SS_General_MCU;
      }
    }
  }
  return result;
}

//----- (00768FF0) --------------------------------------------------------
unsigned int __cdecl sub_768FF0(int a1, int a2, int a3, signed int a4, int a5)
{
  unsigned int result; // eax@1
  signed int v6; // edx@1
  int v7; // ecx@2
  int v8; // ebx@2
  int v9; // ebp@2
  int v10; // eax@3
  int v11; // edi@4
  int v12; // esi@4
  int v13; // ebx@5
  int v14; // ebp@5
  int v15; // ecx@5
  unsigned int v16; // edx@5
  int v17; // esi@8
  int v18; // edx@8
  int v19; // ecx@14
  __int16 v20; // di@15
  __int16 v21; // si@15
  __int16 v22; // bp@15
  __int16 v23; // bx@15
  signed int v24; // edx@16
  char v25; // [sp+1Fh] [bp-1ADh]@1
  unsigned int v26; // [sp+1A0h] [bp-2Ch]@8
  int v27; // [sp+1A4h] [bp-28h]@4
  int v28; // [sp+1A8h] [bp-24h]@4
  int v29; // [sp+1ACh] [bp-20h]@4
  int v30; // [sp+1B0h] [bp-1Ch]@4
  int v31; // [sp+1B4h] [bp-18h]@4
  unsigned int v32; // [sp+1B8h] [bp-14h]@2

  result = (unsigned int)&v25 & 0xFFFFFFE0;
  v6 = 0;
  if ( a4 > 0 )
  {
    v7 = 0;
    v8 = 0;
    v9 = 0;
    v32 = (unsigned int)&v25 & 0xFFFFFFE0;
    do
    {
      v10 = 0;
      if ( a3 > 0 )
      {
        v11 = v7;
        v12 = v8;
        v30 = v7;
        v29 = v8;
        v31 = 0;
        v27 = v9;
        v28 = v6;
        do
        {
          v13 = *(_BYTE *)(v11 + a1);
          v14 = *(_BYTE *)(v11 + a1 + 1);
          v15 = *(_BYTE *)(v11 + a1 + 2);
          v11 += 3;
          *(_WORD *)(v32 + 2 * v12) = (150 * v14 + 77 * v13 + 29 * v15 - 32640) >> 8;
          v16 = v32;
          *(_WORD *)(v32 + 2 * v12 + 128) = (-85 * v14 + -43 * v13 + (v15 << 7) + 128) >> 8;
          *(_WORD *)(v16 + 2 * v12++ + 256) = (-107 * v14 + (v13 << 7) + -21 * v15 + 128) >> 8;
          v10 = v31++ + 1;
        }
        while ( v31 < a3 );
        v7 = v30;
        v8 = v29;
        v9 = v27;
        v6 = v28;
      }
      if ( v10 < 8 )
      {
        v26 = v32 + v9;
        v17 = v32 + 2 * (v10 + v8);
        v27 = v9;
        v28 = v6;
        v18 = v32 + v9;
        do
        {
          ++v10;
          *(_WORD *)v17 = *(_WORD *)(v18 + 2 * a3 - 2);
          *(_WORD *)(v17 + 128) = *(_WORD *)(v18 + 2 * a3 + 126);
          *(_WORD *)(v17 + 256) = *(_WORD *)(v18 + 2 * a3 + 254);
          v17 += 2;
        }
        while ( v10 < 8 );
        v9 = v27;
        v6 = v28;
      }
      v7 += a2;
      v8 += 8;
      v9 += 16;
      ++v6;
    }
    while ( v6 < a4 );
    result = v32;
  }
  if ( v6 < 8 )
  {
    v19 = result + 16 * v6;
    do
    {
      v20 = *(_WORD *)(v19 + 252);
      v21 = *(_WORD *)(v19 - 2);
      *(_WORD *)v19 = *(_WORD *)(v19 - 16);
      v22 = *(_WORD *)(v19 + 126);
      *(_WORD *)(v19 + 128) = *(_WORD *)(v19 + 112);
      ++v6;
      *(_WORD *)(v19 + 256) = *(_WORD *)(v19 + 240);
      *(_WORD *)(v19 + 2) = *(_WORD *)(v19 - 14);
      *(_WORD *)(v19 + 130) = *(_WORD *)(v19 + 114);
      *(_WORD *)(v19 + 258) = *(_WORD *)(v19 + 242);
      *(_WORD *)(v19 + 4) = *(_WORD *)(v19 - 12);
      *(_WORD *)(v19 + 132) = *(_WORD *)(v19 + 116);
      *(_WORD *)(v19 + 260) = *(_WORD *)(v19 + 244);
      *(_WORD *)(v19 + 6) = *(_WORD *)(v19 - 10);
      *(_WORD *)(v19 + 134) = *(_WORD *)(v19 + 118);
      *(_WORD *)(v19 + 262) = *(_WORD *)(v19 + 246);
      *(_WORD *)(v19 + 8) = *(_WORD *)(v19 - 8);
      *(_WORD *)(v19 + 136) = *(_WORD *)(v19 + 120);
      *(_WORD *)(v19 + 264) = *(_WORD *)(v19 + 248);
      *(_WORD *)(v19 + 10) = *(_WORD *)(v19 - 6);
      *(_WORD *)(v19 + 138) = *(_WORD *)(v19 + 122);
      *(_WORD *)(v19 + 266) = *(_WORD *)(v19 + 250);
      *(_WORD *)(v19 + 12) = *(_WORD *)(v19 - 4);
      *(_WORD *)(v19 + 140) = *(_WORD *)(v19 + 124);
      v23 = *(_WORD *)(v19 + 254);
      *(_WORD *)(v19 + 268) = v20;
      *(_WORD *)(v19 + 14) = v21;
      *(_WORD *)(v19 + 142) = v22;
      *(_WORD *)(v19 + 270) = v23;
      v19 += 16;
    }
    while ( v6 < 8 );
  }
  v24 = 0;
  do
  {
    *(_WORD *)(a5 + 2 * v24) = *(_WORD *)(result + 2 * v24);
    *(_WORD *)(a5 + 2 * v24 + 128) = *(_WORD *)(result + 2 * v24 + 128);
    *(_WORD *)(a5 + 2 * v24 + 256) = *(_WORD *)(result + 2 * v24 + 256);
    *(_WORD *)(a5 + 2 * v24 + 2) = *(_WORD *)(result + 2 * v24 + 2);
    *(_WORD *)(a5 + 2 * v24 + 130) = *(_WORD *)(result + 2 * v24 + 130);
    *(_WORD *)(a5 + 2 * v24 + 258) = *(_WORD *)(result + 2 * v24 + 258);
    *(_WORD *)(a5 + 2 * v24 + 4) = *(_WORD *)(result + 2 * v24 + 4);
    *(_WORD *)(a5 + 2 * v24 + 132) = *(_WORD *)(result + 2 * v24 + 132);
    *(_WORD *)(a5 + 2 * v24 + 260) = *(_WORD *)(result + 2 * v24 + 260);
    *(_WORD *)(a5 + 2 * v24 + 6) = *(_WORD *)(result + 2 * v24 + 6);
    *(_WORD *)(a5 + 2 * v24 + 134) = *(_WORD *)(result + 2 * v24 + 134);
    *(_WORD *)(a5 + 2 * v24 + 262) = *(_WORD *)(result + 2 * v24 + 262);
    *(_WORD *)(a5 + 2 * v24 + 8) = *(_WORD *)(result + 2 * v24 + 8);
    *(_WORD *)(a5 + 2 * v24 + 136) = *(_WORD *)(result + 2 * v24 + 136);
    *(_WORD *)(a5 + 2 * v24 + 264) = *(_WORD *)(result + 2 * v24 + 264);
    *(_WORD *)(a5 + 2 * v24 + 10) = *(_WORD *)(result + 2 * v24 + 10);
    *(_WORD *)(a5 + 2 * v24 + 138) = *(_WORD *)(result + 2 * v24 + 138);
    *(_WORD *)(a5 + 2 * v24 + 266) = *(_WORD *)(result + 2 * v24 + 266);
    *(_WORD *)(a5 + 2 * v24 + 12) = *(_WORD *)(result + 2 * v24 + 12);
    *(_WORD *)(a5 + 2 * v24 + 140) = *(_WORD *)(result + 2 * v24 + 140);
    *(_WORD *)(a5 + 2 * v24 + 268) = *(_WORD *)(result + 2 * v24 + 268);
    *(_WORD *)(a5 + 2 * v24 + 14) = *(_WORD *)(result + 2 * v24 + 14);
    *(_WORD *)(a5 + 2 * v24 + 142) = *(_WORD *)(result + 2 * v24 + 142);
    *(_WORD *)(a5 + 2 * v24 + 270) = *(_WORD *)(result + 2 * v24 + 270);
    v24 += 8;
  }
  while ( v24 < 64 );
  return result;
}

//----- (00769460) --------------------------------------------------------
signed int __cdecl RGB_to_YCbCr_111_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // esi@1
  int v6; // ebx@1
  int v7; // ecx@1
  int v8; // edx@1
  signed int result; // eax@1

  v5 = a1;
  v6 = a3;
  v7 = a4;
  v8 = a5;
  result = 0;
  do
  {
    *(_WORD *)v6 = (150 * *(_BYTE *)(v5 + 1) + 77 * *(_BYTE *)v5 + 29 * *(_BYTE *)(v5 + 2) - 32640) >> 8;
    ++result;
    *(_WORD *)(v6 + 2) = (150 * *(_BYTE *)(v5 + 4) + 77 * *(_BYTE *)(v5 + 3) + 29 * *(_BYTE *)(v5 + 5) - 32640) >> 8;
    *(_WORD *)(v6 + 4) = (150 * *(_BYTE *)(v5 + 7) + 77 * *(_BYTE *)(v5 + 6) + 29 * *(_BYTE *)(v5 + 8) - 32640) >> 8;
    *(_WORD *)(v6 + 6) = (150 * *(_BYTE *)(v5 + 10) + 77 * *(_BYTE *)(v5 + 9) + 29 * *(_BYTE *)(v5 + 11) - 32640) >> 8;
    *(_WORD *)(v6 + 8) = (150 * *(_BYTE *)(v5 + 13) + 77 * *(_BYTE *)(v5 + 12) + 29 * *(_BYTE *)(v5 + 14) - 32640) >> 8;
    *(_WORD *)(v6 + 10) = (150 * *(_BYTE *)(v5 + 16) + 77 * *(_BYTE *)(v5 + 15) + 29 * *(_BYTE *)(v5 + 17) - 32640) >> 8;
    *(_WORD *)(v6 + 12) = (150 * *(_BYTE *)(v5 + 19) + 77 * *(_BYTE *)(v5 + 18) + 29 * *(_BYTE *)(v5 + 20) - 32640) >> 8;
    *(_WORD *)(v6 + 14) = (150 * *(_BYTE *)(v5 + 22) + 77 * *(_BYTE *)(v5 + 21) + 29 * *(_BYTE *)(v5 + 23) - 32640) >> 8;
    v6 += 16;
    *(_WORD *)v7 = (-85 * *(_BYTE *)(v5 + 1) + -43 * *(_BYTE *)v5 + (*(_BYTE *)(v5 + 2) << 7) + 128) >> 8;
    *(_WORD *)(v7 + 2) = (-85 * *(_BYTE *)(v5 + 4) + -43 * *(_BYTE *)(v5 + 3) + (*(_BYTE *)(v5 + 5) << 7) + 128) >> 8;
    *(_WORD *)(v7 + 4) = (-85 * *(_BYTE *)(v5 + 7) + -43 * *(_BYTE *)(v5 + 6) + (*(_BYTE *)(v5 + 8) << 7) + 128) >> 8;
    *(_WORD *)(v7 + 6) = (-85 * *(_BYTE *)(v5 + 10) + -43 * *(_BYTE *)(v5 + 9) + (*(_BYTE *)(v5 + 11) << 7) + 128) >> 8;
    *(_WORD *)(v7 + 8) = (-85 * *(_BYTE *)(v5 + 13) + -43 * *(_BYTE *)(v5 + 12) + (*(_BYTE *)(v5 + 14) << 7) + 128) >> 8;
    *(_WORD *)(v7 + 10) = (-85 * *(_BYTE *)(v5 + 16) + -43 * *(_BYTE *)(v5 + 15) + (*(_BYTE *)(v5 + 17) << 7) + 128) >> 8;
    *(_WORD *)(v7 + 12) = (-85 * *(_BYTE *)(v5 + 19) + -43 * *(_BYTE *)(v5 + 18) + (*(_BYTE *)(v5 + 20) << 7) + 128) >> 8;
    *(_WORD *)(v7 + 14) = (-85 * *(_BYTE *)(v5 + 22) + -43 * *(_BYTE *)(v5 + 21) + (*(_BYTE *)(v5 + 23) << 7) + 128) >> 8;
    *(_WORD *)v8 = (-107 * *(_BYTE *)(v5 + 1) + (*(_BYTE *)v5 << 7) + -21 * *(_BYTE *)(v5 + 2) + 128) >> 8;
    v7 += 16;
    *(_WORD *)(v8 + 2) = (-107 * *(_BYTE *)(v5 + 4) + (*(_BYTE *)(v5 + 3) << 7) + -21 * *(_BYTE *)(v5 + 5) + 128) >> 8;
    *(_WORD *)(v8 + 4) = (-107 * *(_BYTE *)(v5 + 7) + (*(_BYTE *)(v5 + 6) << 7) + -21 * *(_BYTE *)(v5 + 8) + 128) >> 8;
    *(_WORD *)(v8 + 6) = (-107 * *(_BYTE *)(v5 + 10) + (*(_BYTE *)(v5 + 9) << 7) + -21 * *(_BYTE *)(v5 + 11) + 128) >> 8;
    *(_WORD *)(v8 + 8) = (-107 * *(_BYTE *)(v5 + 13) + (*(_BYTE *)(v5 + 12) << 7) + -21 * *(_BYTE *)(v5 + 14) + 128) >> 8;
    *(_WORD *)(v8 + 10) = (-107 * *(_BYTE *)(v5 + 16) + (*(_BYTE *)(v5 + 15) << 7) + -21 * *(_BYTE *)(v5 + 17) + 128) >> 8;
    *(_WORD *)(v8 + 12) = (-107 * *(_BYTE *)(v5 + 19) + (*(_BYTE *)(v5 + 18) << 7) + -21 * *(_BYTE *)(v5 + 20) + 128) >> 8;
    *(_WORD *)(v8 + 14) = (-107 * *(_BYTE *)(v5 + 22) + (*(_BYTE *)(v5 + 21) << 7) + -21 * *(_BYTE *)(v5 + 23) + 128) >> 8;
    v8 += 16;
    v5 += a2;
  }
  while ( result < 8 );
  return result;
}

//----- (00769830) --------------------------------------------------------
int __cdecl RGB_to_YCbCr_111_Full_MCU_M5(int a1, int a2, int a3, int a4, int a5)
{
  return own_rgb_to_ycbcr_111_full_mcu_m5(a1, a2, a3, a4, a5);
}

//----- (00769870) --------------------------------------------------------
void __cdecl RGB_to_YCbCr_111_MCU(struct _JPEG_PROPERTIES *a1, int a2, int a3)
{
  int v3; // edi@1
  signed int v4; // esi@1
  int v5; // ebp@1
  char *v6; // ebx@1
  char *v7; // ecx@1
  int v8; // eax@2
  __int64 v9; // rax@7
  int v10; // eax@7
  void (__cdecl **v11)(char *, int, char *, int, int); // [sp+1Ch] [bp-18h]@1

  v3 = 8;
  v4 = 8;
  v5 = a1->DIBLineBytes;
  v6 = a1->MCUBuf;
  v7 = a1->state.DIB_ptr;
  v11 = (void (__cdecl **)(char *, int, char *, int, int))a1->state.ctx;
  if ( a1->numxMCUs - 1 == a2 )
  {
    v8 = (((unsigned __int64)a1->DIBWidth >> 32) ^ abs(a1->DIBWidth) & 7) - ((unsigned __int64)a1->DIBWidth >> 32);
    if ( v8 )
      v3 = v8;
    a1->state.DIB_ptr = &a1->DIBBytes[v5 * (8 * a3 + 8)];
  }
  else
  {
    a1->state.DIB_ptr = v7 + 24;
  }
  if ( a3 == a1->numyMCUs - 1 )
  {
    v9 = abs(a1->DIBHeight);
    v10 = (HIDWORD(v9) ^ abs(v9) & 7) - HIDWORD(v9);
    if ( v10 )
      v4 = v10;
  }
  if ( v3 != 8 || v4 != 8 )
    sub_768FF0((int)v7, v5, v3, v4, (int)v6);
  else
    v11[26](v7, v5, v6, (int)(v6 + 128), (int)(v6 + 256));
}

//----- (00769980) --------------------------------------------------------
unsigned int __cdecl sub_769980(int a1, int a2, int a3, signed int a4, int a5)
{
  unsigned int result; // eax@1
  signed int v6; // edx@1
  int v7; // ecx@2
  int v8; // ebx@2
  int v9; // ebp@2
  int v10; // eax@3
  int v11; // edi@4
  int v12; // esi@4
  int v13; // ebx@5
  int v14; // ebp@5
  int v15; // ecx@5
  int v16; // esi@8
  int v17; // edx@8
  int v18; // ecx@14
  __int16 v19; // di@15
  __int16 v20; // si@15
  __int16 v21; // bp@15
  __int16 v22; // bx@15
  signed int v23; // edx@16
  char v24; // [sp+1Fh] [bp-1ADh]@1
  unsigned int v25; // [sp+1A0h] [bp-2Ch]@8
  int v26; // [sp+1A4h] [bp-28h]@4
  int v27; // [sp+1A8h] [bp-24h]@4
  int v28; // [sp+1ACh] [bp-20h]@4
  int v29; // [sp+1B0h] [bp-1Ch]@4
  int v30; // [sp+1B4h] [bp-18h]@4
  unsigned int v31; // [sp+1B8h] [bp-14h]@2

  result = (unsigned int)&v24 & 0xFFFFFFE0;
  v6 = 0;
  if ( a4 > 0 )
  {
    v7 = 0;
    v8 = 0;
    v9 = 0;
    v31 = (unsigned int)&v24 & 0xFFFFFFE0;
    do
    {
      v10 = 0;
      if ( a3 > 0 )
      {
        v11 = v7;
        v12 = v8;
        v29 = v7;
        v28 = v8;
        v30 = 0;
        v26 = v9;
        v27 = v6;
        do
        {
          v13 = *(_BYTE *)(v11 + a1);
          v14 = *(_BYTE *)(v11 + a1 + 1);
          v15 = *(_BYTE *)(v11 + a1 + 2);
          v11 += 3;
          *(_WORD *)(v31 + 2 * v12) = (150 * v14 + 29 * v13 + 77 * v15 - 32640) >> 8;
          *(_WORD *)(v31 + 2 * v12 + 128) = (-85 * v14 + (v13 << 7) + -43 * v15 + 128) >> 8;
          *(_WORD *)(v31 + 2 * v12++ + 256) = (-107 * v14 + -21 * v13 + (v15 << 7) + 128) >> 8;
          v10 = v30++ + 1;
        }
        while ( v30 < a3 );
        v7 = v29;
        v8 = v28;
        v9 = v26;
        v6 = v27;
      }
      if ( v10 < 8 )
      {
        v25 = v31 + v9;
        v16 = v31 + 2 * (v10 + v8);
        v26 = v9;
        v27 = v6;
        v17 = v31 + v9;
        do
        {
          ++v10;
          *(_WORD *)v16 = *(_WORD *)(v17 + 2 * a3 - 2);
          *(_WORD *)(v16 + 128) = *(_WORD *)(v17 + 2 * a3 + 126);
          *(_WORD *)(v16 + 256) = *(_WORD *)(v17 + 2 * a3 + 254);
          v16 += 2;
        }
        while ( v10 < 8 );
        v9 = v26;
        v6 = v27;
      }
      v7 += a2;
      v8 += 8;
      v9 += 16;
      ++v6;
    }
    while ( v6 < a4 );
    result = v31;
  }
  if ( v6 < 8 )
  {
    v18 = result + 16 * v6;
    do
    {
      v19 = *(_WORD *)(v18 + 252);
      v20 = *(_WORD *)(v18 - 2);
      *(_WORD *)v18 = *(_WORD *)(v18 - 16);
      v21 = *(_WORD *)(v18 + 126);
      *(_WORD *)(v18 + 128) = *(_WORD *)(v18 + 112);
      ++v6;
      *(_WORD *)(v18 + 256) = *(_WORD *)(v18 + 240);
      *(_WORD *)(v18 + 2) = *(_WORD *)(v18 - 14);
      *(_WORD *)(v18 + 130) = *(_WORD *)(v18 + 114);
      *(_WORD *)(v18 + 258) = *(_WORD *)(v18 + 242);
      *(_WORD *)(v18 + 4) = *(_WORD *)(v18 - 12);
      *(_WORD *)(v18 + 132) = *(_WORD *)(v18 + 116);
      *(_WORD *)(v18 + 260) = *(_WORD *)(v18 + 244);
      *(_WORD *)(v18 + 6) = *(_WORD *)(v18 - 10);
      *(_WORD *)(v18 + 134) = *(_WORD *)(v18 + 118);
      *(_WORD *)(v18 + 262) = *(_WORD *)(v18 + 246);
      *(_WORD *)(v18 + 8) = *(_WORD *)(v18 - 8);
      *(_WORD *)(v18 + 136) = *(_WORD *)(v18 + 120);
      *(_WORD *)(v18 + 264) = *(_WORD *)(v18 + 248);
      *(_WORD *)(v18 + 10) = *(_WORD *)(v18 - 6);
      *(_WORD *)(v18 + 138) = *(_WORD *)(v18 + 122);
      *(_WORD *)(v18 + 266) = *(_WORD *)(v18 + 250);
      *(_WORD *)(v18 + 12) = *(_WORD *)(v18 - 4);
      *(_WORD *)(v18 + 140) = *(_WORD *)(v18 + 124);
      v22 = *(_WORD *)(v18 + 254);
      *(_WORD *)(v18 + 268) = v19;
      *(_WORD *)(v18 + 14) = v20;
      *(_WORD *)(v18 + 142) = v21;
      *(_WORD *)(v18 + 270) = v22;
      v18 += 16;
    }
    while ( v6 < 8 );
  }
  v23 = 0;
  do
  {
    *(_WORD *)(a5 + 2 * v23) = *(_WORD *)(result + 2 * v23);
    *(_WORD *)(a5 + 2 * v23 + 128) = *(_WORD *)(result + 2 * v23 + 128);
    *(_WORD *)(a5 + 2 * v23 + 256) = *(_WORD *)(result + 2 * v23 + 256);
    *(_WORD *)(a5 + 2 * v23 + 2) = *(_WORD *)(result + 2 * v23 + 2);
    *(_WORD *)(a5 + 2 * v23 + 130) = *(_WORD *)(result + 2 * v23 + 130);
    *(_WORD *)(a5 + 2 * v23 + 258) = *(_WORD *)(result + 2 * v23 + 258);
    *(_WORD *)(a5 + 2 * v23 + 4) = *(_WORD *)(result + 2 * v23 + 4);
    *(_WORD *)(a5 + 2 * v23 + 132) = *(_WORD *)(result + 2 * v23 + 132);
    *(_WORD *)(a5 + 2 * v23 + 260) = *(_WORD *)(result + 2 * v23 + 260);
    *(_WORD *)(a5 + 2 * v23 + 6) = *(_WORD *)(result + 2 * v23 + 6);
    *(_WORD *)(a5 + 2 * v23 + 134) = *(_WORD *)(result + 2 * v23 + 134);
    *(_WORD *)(a5 + 2 * v23 + 262) = *(_WORD *)(result + 2 * v23 + 262);
    *(_WORD *)(a5 + 2 * v23 + 8) = *(_WORD *)(result + 2 * v23 + 8);
    *(_WORD *)(a5 + 2 * v23 + 136) = *(_WORD *)(result + 2 * v23 + 136);
    *(_WORD *)(a5 + 2 * v23 + 264) = *(_WORD *)(result + 2 * v23 + 264);
    *(_WORD *)(a5 + 2 * v23 + 10) = *(_WORD *)(result + 2 * v23 + 10);
    *(_WORD *)(a5 + 2 * v23 + 138) = *(_WORD *)(result + 2 * v23 + 138);
    *(_WORD *)(a5 + 2 * v23 + 266) = *(_WORD *)(result + 2 * v23 + 266);
    *(_WORD *)(a5 + 2 * v23 + 12) = *(_WORD *)(result + 2 * v23 + 12);
    *(_WORD *)(a5 + 2 * v23 + 140) = *(_WORD *)(result + 2 * v23 + 140);
    *(_WORD *)(a5 + 2 * v23 + 268) = *(_WORD *)(result + 2 * v23 + 268);
    *(_WORD *)(a5 + 2 * v23 + 14) = *(_WORD *)(result + 2 * v23 + 14);
    *(_WORD *)(a5 + 2 * v23 + 142) = *(_WORD *)(result + 2 * v23 + 142);
    *(_WORD *)(a5 + 2 * v23 + 270) = *(_WORD *)(result + 2 * v23 + 270);
    v23 += 8;
  }
  while ( v23 < 64 );
  return result;
}

//----- (00769E00) --------------------------------------------------------
signed int __cdecl BGR_to_YCbCr_111_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // esi@1
  int v6; // ebx@1
  int v7; // ecx@1
  int v8; // edx@1
  signed int result; // eax@1

  v5 = a1;
  v6 = a3;
  v7 = a4;
  v8 = a5;
  result = 0;
  do
  {
    *(_WORD *)v6 = (150 * *(_BYTE *)(v5 + 1) + 77 * *(_BYTE *)(v5 + 2) + 29 * *(_BYTE *)v5 - 32640) >> 8;
    ++result;
    *(_WORD *)(v6 + 2) = (150 * *(_BYTE *)(v5 + 4) + 77 * *(_BYTE *)(v5 + 5) + 29 * *(_BYTE *)(v5 + 3) - 32640) >> 8;
    *(_WORD *)(v6 + 4) = (150 * *(_BYTE *)(v5 + 7) + 77 * *(_BYTE *)(v5 + 8) + 29 * *(_BYTE *)(v5 + 6) - 32640) >> 8;
    *(_WORD *)(v6 + 6) = (150 * *(_BYTE *)(v5 + 10) + 77 * *(_BYTE *)(v5 + 11) + 29 * *(_BYTE *)(v5 + 9) - 32640) >> 8;
    *(_WORD *)(v6 + 8) = (150 * *(_BYTE *)(v5 + 13) + 77 * *(_BYTE *)(v5 + 14) + 29 * *(_BYTE *)(v5 + 12) - 32640) >> 8;
    *(_WORD *)(v6 + 10) = (150 * *(_BYTE *)(v5 + 16) + 77 * *(_BYTE *)(v5 + 17) + 29 * *(_BYTE *)(v5 + 15) - 32640) >> 8;
    *(_WORD *)(v6 + 12) = (150 * *(_BYTE *)(v5 + 19) + 77 * *(_BYTE *)(v5 + 20) + 29 * *(_BYTE *)(v5 + 18) - 32640) >> 8;
    *(_WORD *)(v6 + 14) = (150 * *(_BYTE *)(v5 + 22) + 77 * *(_BYTE *)(v5 + 23) + 29 * *(_BYTE *)(v5 + 21) - 32640) >> 8;
    v6 += 16;
    *(_WORD *)v7 = (-85 * *(_BYTE *)(v5 + 1) + -43 * *(_BYTE *)(v5 + 2) + (*(_BYTE *)v5 << 7) + 128) >> 8;
    *(_WORD *)(v7 + 2) = (-85 * *(_BYTE *)(v5 + 4) + -43 * *(_BYTE *)(v5 + 5) + (*(_BYTE *)(v5 + 3) << 7) + 128) >> 8;
    *(_WORD *)(v7 + 4) = (-85 * *(_BYTE *)(v5 + 7) + -43 * *(_BYTE *)(v5 + 8) + (*(_BYTE *)(v5 + 6) << 7) + 128) >> 8;
    *(_WORD *)(v7 + 6) = (-85 * *(_BYTE *)(v5 + 10) + -43 * *(_BYTE *)(v5 + 11) + (*(_BYTE *)(v5 + 9) << 7) + 128) >> 8;
    *(_WORD *)(v7 + 8) = (-85 * *(_BYTE *)(v5 + 13) + -43 * *(_BYTE *)(v5 + 14) + (*(_BYTE *)(v5 + 12) << 7) + 128) >> 8;
    *(_WORD *)(v7 + 10) = (-85 * *(_BYTE *)(v5 + 16) + -43 * *(_BYTE *)(v5 + 17) + (*(_BYTE *)(v5 + 15) << 7) + 128) >> 8;
    *(_WORD *)(v7 + 12) = (-85 * *(_BYTE *)(v5 + 19) + -43 * *(_BYTE *)(v5 + 20) + (*(_BYTE *)(v5 + 18) << 7) + 128) >> 8;
    *(_WORD *)(v7 + 14) = (-85 * *(_BYTE *)(v5 + 22) + -43 * *(_BYTE *)(v5 + 23) + (*(_BYTE *)(v5 + 21) << 7) + 128) >> 8;
    *(_WORD *)v8 = (-107 * *(_BYTE *)(v5 + 1) + (*(_BYTE *)(v5 + 2) << 7) + -21 * *(_BYTE *)v5 + 128) >> 8;
    v7 += 16;
    *(_WORD *)(v8 + 2) = (-107 * *(_BYTE *)(v5 + 4) + (*(_BYTE *)(v5 + 5) << 7) + -21 * *(_BYTE *)(v5 + 3) + 128) >> 8;
    *(_WORD *)(v8 + 4) = (-107 * *(_BYTE *)(v5 + 7) + (*(_BYTE *)(v5 + 8) << 7) + -21 * *(_BYTE *)(v5 + 6) + 128) >> 8;
    *(_WORD *)(v8 + 6) = (-107 * *(_BYTE *)(v5 + 10) + (*(_BYTE *)(v5 + 11) << 7) + -21 * *(_BYTE *)(v5 + 9) + 128) >> 8;
    *(_WORD *)(v8 + 8) = (-107 * *(_BYTE *)(v5 + 13) + (*(_BYTE *)(v5 + 14) << 7) + -21 * *(_BYTE *)(v5 + 12) + 128) >> 8;
    *(_WORD *)(v8 + 10) = (-107 * *(_BYTE *)(v5 + 16) + (*(_BYTE *)(v5 + 17) << 7) + -21 * *(_BYTE *)(v5 + 15) + 128) >> 8;
    *(_WORD *)(v8 + 12) = (-107 * *(_BYTE *)(v5 + 19) + (*(_BYTE *)(v5 + 20) << 7) + -21 * *(_BYTE *)(v5 + 18) + 128) >> 8;
    *(_WORD *)(v8 + 14) = (-107 * *(_BYTE *)(v5 + 22) + (*(_BYTE *)(v5 + 23) << 7) + -21 * *(_BYTE *)(v5 + 21) + 128) >> 8;
    v8 += 16;
    v5 += a2;
  }
  while ( result < 8 );
  return result;
}

//----- (0076A1D0) --------------------------------------------------------
int __cdecl BGR_to_YCbCr_111_Full_MCU_M5(int a1, int a2, int a3, int a4, int a5)
{
  return own_bgr_to_ycbcr_111_full_mcu_m5(a1, a2, a3, a4, a5);
}

//----- (0076A210) --------------------------------------------------------
void __cdecl BGR_to_YCbCr_111_MCU(struct _JPEG_PROPERTIES *a1, int a2, int a3)
{
  int v3; // edi@1
  signed int v4; // esi@1
  int v5; // ebp@1
  char *v6; // ebx@1
  char *v7; // ecx@1
  int v8; // eax@2
  __int64 v9; // rax@7
  int v10; // eax@7
  void (__cdecl **v11)(char *, int, char *, int, int); // [sp+1Ch] [bp-18h]@1

  v3 = 8;
  v4 = 8;
  v5 = a1->DIBLineBytes;
  v6 = a1->MCUBuf;
  v7 = a1->state.DIB_ptr;
  v11 = (void (__cdecl **)(char *, int, char *, int, int))a1->state.ctx;
  if ( a1->numxMCUs - 1 == a2 )
  {
    v8 = (((unsigned __int64)a1->DIBWidth >> 32) ^ abs(a1->DIBWidth) & 7) - ((unsigned __int64)a1->DIBWidth >> 32);
    if ( v8 )
      v3 = v8;
    a1->state.DIB_ptr = &a1->DIBBytes[v5 * (8 * a3 + 8)];
  }
  else
  {
    a1->state.DIB_ptr = v7 + 24;
  }
  if ( a3 == a1->numyMCUs - 1 )
  {
    v9 = abs(a1->DIBHeight);
    v10 = (HIDWORD(v9) ^ abs(v9) & 7) - HIDWORD(v9);
    if ( v10 )
      v4 = v10;
  }
  if ( v3 != 8 || v4 != 8 )
    sub_769980((int)v7, v5, v3, v4, (int)v6);
  else
    v11[29](v7, v5, v6, (int)(v6 + 128), (int)(v6 + 256));
}

//----- (0076A320) --------------------------------------------------------
int __cdecl sub_76A320(int a1, int a2, int a3, signed int a4, int a5)
{
  unsigned int v5; // eax@1
  signed int v6; // edx@1
  int v7; // ecx@2
  int v8; // ebx@2
  int v9; // ebp@2
  int v10; // eax@3
  int v11; // edi@4
  int v12; // esi@4
  int v13; // ebx@5
  int v14; // ebp@5
  int v15; // ecx@5
  unsigned int v16; // edx@5
  int v17; // esi@8
  int v18; // edx@8
  int v19; // ecx@14
  __int16 v20; // di@15
  __int16 v21; // si@15
  __int16 v22; // bp@15
  __int16 v23; // bx@15
  int v24; // edx@16
  int v25; // ecx@16
  int v26; // ebx@16
  int v27; // edi@17
  int v28; // esi@17
  int v29; // ebp@17
  int result; // eax@17
  __int16 v31; // cx@18
  char v32; // [sp+1Fh] [bp-62Dh]@1
  int v33; // [sp+620h] [bp-2Ch]@4
  int v34; // [sp+624h] [bp-28h]@8
  unsigned int v35; // [sp+628h] [bp-24h]@2
  int v36; // [sp+62Ch] [bp-20h]@4
  int v37; // [sp+630h] [bp-1Ch]@4
  int v38; // [sp+634h] [bp-18h]@4
  int v39; // [sp+638h] [bp-14h]@4

  v5 = (unsigned int)&v32 & 0xFFFFFFE0;
  v6 = 0;
  if ( a4 > 0 )
  {
    v7 = 0;
    v8 = 0;
    v9 = 0;
    v35 = (unsigned int)&v32 & 0xFFFFFFE0;
    do
    {
      v10 = 0;
      if ( a3 > 0 )
      {
        v11 = v7;
        v12 = v8;
        v38 = v7;
        v37 = v8;
        v39 = 0;
        v33 = v9;
        v36 = v6;
        do
        {
          v13 = *(_BYTE *)(v11 + a1);
          v14 = *(_BYTE *)(v11 + a1 + 1);
          v15 = *(_BYTE *)(v11 + a1 + 2);
          v11 += 3;
          *(_WORD *)(v35 + 2 * v12) = (150 * v14 + 77 * v13 + 29 * v15 - 32640) >> 8;
          v16 = v35;
          *(_WORD *)(v35 + 2 * v12 + 512) = (-85 * v14 + -43 * v13 + (v15 << 7) + 128) >> 8;
          *(_WORD *)(v16 + 2 * v12++ + 1024) = (-107 * v14 + (v13 << 7) + -21 * v15 + 128) >> 8;
          v10 = v39++ + 1;
        }
        while ( v39 < a3 );
        v7 = v38;
        v8 = v37;
        v9 = v33;
        v6 = v36;
      }
      if ( v10 < 16 )
      {
        v34 = v35 + v9;
        v17 = v35 + 2 * (v10 + v8);
        v33 = v9;
        v36 = v6;
        v18 = v35 + v9;
        do
        {
          ++v10;
          *(_WORD *)v17 = *(_WORD *)(v18 + 2 * a3 - 2);
          *(_WORD *)(v17 + 512) = *(_WORD *)(v18 + 2 * a3 + 510);
          *(_WORD *)(v17 + 1024) = *(_WORD *)(v18 + 2 * a3 + 1022);
          v17 += 2;
        }
        while ( v10 < 16 );
        v9 = v33;
        v6 = v36;
      }
      v7 += a2;
      v8 += 16;
      v9 += 32;
      ++v6;
    }
    while ( v6 < a4 );
    v5 = v35;
  }
  if ( v6 < 16 )
  {
    v19 = v5 + 32 * v6;
    do
    {
      v20 = *(_WORD *)(v19 + 1020);
      v21 = *(_WORD *)(v19 - 2);
      *(_WORD *)v19 = *(_WORD *)(v19 - 32);
      v22 = *(_WORD *)(v19 + 510);
      *(_WORD *)(v19 + 512) = *(_WORD *)(v19 + 480);
      ++v6;
      *(_WORD *)(v19 + 1024) = *(_WORD *)(v19 + 992);
      *(_WORD *)(v19 + 2) = *(_WORD *)(v19 - 30);
      *(_WORD *)(v19 + 514) = *(_WORD *)(v19 + 482);
      *(_WORD *)(v19 + 1026) = *(_WORD *)(v19 + 994);
      *(_WORD *)(v19 + 4) = *(_WORD *)(v19 - 28);
      *(_WORD *)(v19 + 516) = *(_WORD *)(v19 + 484);
      *(_WORD *)(v19 + 1028) = *(_WORD *)(v19 + 996);
      *(_WORD *)(v19 + 6) = *(_WORD *)(v19 - 26);
      *(_WORD *)(v19 + 518) = *(_WORD *)(v19 + 486);
      *(_WORD *)(v19 + 1030) = *(_WORD *)(v19 + 998);
      *(_WORD *)(v19 + 8) = *(_WORD *)(v19 - 24);
      *(_WORD *)(v19 + 520) = *(_WORD *)(v19 + 488);
      *(_WORD *)(v19 + 1032) = *(_WORD *)(v19 + 1000);
      *(_WORD *)(v19 + 10) = *(_WORD *)(v19 - 22);
      *(_WORD *)(v19 + 522) = *(_WORD *)(v19 + 490);
      *(_WORD *)(v19 + 1034) = *(_WORD *)(v19 + 1002);
      *(_WORD *)(v19 + 12) = *(_WORD *)(v19 - 20);
      *(_WORD *)(v19 + 524) = *(_WORD *)(v19 + 492);
      *(_WORD *)(v19 + 1036) = *(_WORD *)(v19 + 1004);
      *(_WORD *)(v19 + 14) = *(_WORD *)(v19 - 18);
      *(_WORD *)(v19 + 526) = *(_WORD *)(v19 + 494);
      *(_WORD *)(v19 + 1038) = *(_WORD *)(v19 + 1006);
      *(_WORD *)(v19 + 16) = *(_WORD *)(v19 - 16);
      *(_WORD *)(v19 + 528) = *(_WORD *)(v19 + 496);
      *(_WORD *)(v19 + 1040) = *(_WORD *)(v19 + 1008);
      *(_WORD *)(v19 + 18) = *(_WORD *)(v19 - 14);
      *(_WORD *)(v19 + 530) = *(_WORD *)(v19 + 498);
      *(_WORD *)(v19 + 1042) = *(_WORD *)(v19 + 1010);
      *(_WORD *)(v19 + 20) = *(_WORD *)(v19 - 12);
      *(_WORD *)(v19 + 532) = *(_WORD *)(v19 + 500);
      *(_WORD *)(v19 + 1044) = *(_WORD *)(v19 + 1012);
      *(_WORD *)(v19 + 22) = *(_WORD *)(v19 - 10);
      *(_WORD *)(v19 + 534) = *(_WORD *)(v19 + 502);
      *(_WORD *)(v19 + 1046) = *(_WORD *)(v19 + 1014);
      *(_WORD *)(v19 + 24) = *(_WORD *)(v19 - 8);
      *(_WORD *)(v19 + 536) = *(_WORD *)(v19 + 504);
      *(_WORD *)(v19 + 1048) = *(_WORD *)(v19 + 1016);
      *(_WORD *)(v19 + 26) = *(_WORD *)(v19 - 6);
      *(_WORD *)(v19 + 538) = *(_WORD *)(v19 + 506);
      *(_WORD *)(v19 + 1050) = *(_WORD *)(v19 + 1018);
      *(_WORD *)(v19 + 28) = *(_WORD *)(v19 - 4);
      *(_WORD *)(v19 + 540) = *(_WORD *)(v19 + 508);
      v23 = *(_WORD *)(v19 + 1022);
      *(_WORD *)(v19 + 1052) = v20;
      *(_WORD *)(v19 + 30) = v21;
      *(_WORD *)(v19 + 542) = v22;
      *(_WORD *)(v19 + 1054) = v23;
      v19 += 32;
    }
    while ( v6 < 16 );
  }
  v24 = 0;
  v25 = 0;
  v26 = 0;
  v35 = v5;
  do
  {
    v27 = a5 + 2 * v24;
    v28 = v35 + 2 * v25;
    v29 = v35 + 2 * v26;
    result = v29 + 32;
    v33 = v25;
    v34 = v26;
    do
    {
      *(_WORD *)v27 = *(_WORD *)v28;
      *(_WORD *)(v27 + 128) = *(_WORD *)(v28 + 16);
      *(_WORD *)(v27 + 256) = *(_WORD *)(v28 + 256);
      v31 = *(_WORD *)(v28 + 272);
      v28 += 2;
      *(_WORD *)(v27 + 384) = v31;
      *(_WORD *)(v27 + 512) = (*(_WORD *)(v29 + 544)
                             + *(_WORD *)(v29 + 514)
                             + (signed int)*(_WORD *)(v29 + 512)
                             + *(_WORD *)(v29 + 546)
                             + 2) >> 2;
      *(_WORD *)(v27 + 640) = (*(_WORD *)(v29 + 1056)
                             + *(_WORD *)(v29 + 1026)
                             + (signed int)*(_WORD *)(v29 + 1024)
                             + *(_WORD *)(v29 + 1058)
                             + 2) >> 2;
      v27 += 2;
      v29 += 4;
    }
    while ( result > v29 );
    v24 += 8;
    v25 = v33 + 16;
    v26 = v34 + 32;
  }
  while ( v34 + 32 < 256 );
  return result;
}

//----- (0076A870) --------------------------------------------------------
int __cdecl sub_76A870(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // edx@1
  int v6; // ecx@1
  int v7; // eax@2
  int v8; // ST60_4@2
  int v9; // ST5C_4@2
  int v10; // ST58_4@2
  int v11; // ST54_4@2
  int v12; // ST50_4@2
  int v13; // ST4C_4@2
  int v14; // ST48_4@2
  int v15; // ST44_4@2
  int v16; // ST40_4@2
  int v17; // ST3C_4@2
  int v18; // ST38_4@2
  int v19; // ST34_4@2
  int v20; // ST30_4@2
  int v21; // ST2C_4@2
  int v22; // ST24_4@2
  int v23; // ST20_4@2
  int v24; // ST1C_4@2
  int v25; // ST18_4@2
  int v26; // ST14_4@2
  int v27; // ST10_4@2
  int v28; // ST0C_4@2
  int v29; // ST08_4@2
  int v30; // ST04_4@2
  int v31; // edx@2
  int v32; // esi@2
  int v33; // ebp@2
  int v34; // ebx@2
  int v35; // esi@2
  int v36; // ebp@2
  int v37; // ebx@2
  int v38; // esi@2
  int v39; // ebp@2
  int v40; // ebx@2
  int v41; // esi@2
  int v42; // ebp@2
  int v43; // ebx@2
  int v44; // esi@2
  int v45; // ebp@2
  int v46; // ebx@2
  int v47; // esi@2
  int v48; // ebp@2
  int v49; // ebx@2
  int v50; // ebp@2
  int v51; // ebx@2
  int v52; // eax@2
  int v53; // esi@2
  int v54; // ebp@2
  int v55; // ebx@2
  int result; // eax@2
  bool v57; // sf@2
  unsigned __int8 v58; // of@2
  int v59; // [sp+28h] [bp-54h]@1
  int v60; // [sp+64h] [bp-18h]@1
  int v61; // [sp+68h] [bp-14h]@1

  v5 = a1;
  v6 = a3;
  v59 = 0;
  v60 = a5;
  v61 = a4;
  do
  {
    *(_WORD *)v6 = (150 * *(_BYTE *)(v5 + 1) + 77 * *(_BYTE *)v5 + 29 * *(_BYTE *)(v5 + 2) - 32640) >> 8;
    *(_WORD *)(v6 + 2) = (150 * *(_BYTE *)(v5 + 4) + 77 * *(_BYTE *)(v5 + 3) + 29 * *(_BYTE *)(v5 + 5) - 32640) >> 8;
    *(_WORD *)(v6 + 4) = (150 * *(_BYTE *)(v5 + 7) + 77 * *(_BYTE *)(v5 + 6) + 29 * *(_BYTE *)(v5 + 8) - 32640) >> 8;
    *(_WORD *)(v6 + 6) = (150 * *(_BYTE *)(v5 + 10) + 77 * *(_BYTE *)(v5 + 9) + 29 * *(_BYTE *)(v5 + 11) - 32640) >> 8;
    *(_WORD *)(v6 + 8) = (150 * *(_BYTE *)(v5 + 13) + 77 * *(_BYTE *)(v5 + 12) + 29 * *(_BYTE *)(v5 + 14) - 32640) >> 8;
    *(_WORD *)(v6 + 10) = (150 * *(_BYTE *)(v5 + 16) + 77 * *(_BYTE *)(v5 + 15) + 29 * *(_BYTE *)(v5 + 17) - 32640) >> 8;
    *(_WORD *)(v6 + 12) = (150 * *(_BYTE *)(v5 + 19) + 77 * *(_BYTE *)(v5 + 18) + 29 * *(_BYTE *)(v5 + 20) - 32640) >> 8;
    *(_WORD *)(v6 + 14) = (150 * *(_BYTE *)(v5 + 22) + 77 * *(_BYTE *)(v5 + 21) + 29 * *(_BYTE *)(v5 + 23) - 32640) >> 8;
    *(_WORD *)(v6 + 128) = (150 * *(_BYTE *)(v5 + 25) + 77 * *(_BYTE *)(v5 + 24) + 29 * *(_BYTE *)(v5 + 26) - 32640) >> 8;
    *(_WORD *)(v6 + 130) = (150 * *(_BYTE *)(v5 + 28) + 77 * *(_BYTE *)(v5 + 27) + 29 * *(_BYTE *)(v5 + 29) - 32640) >> 8;
    *(_WORD *)(v6 + 132) = (150 * *(_BYTE *)(v5 + 31) + 77 * *(_BYTE *)(v5 + 30) + 29 * *(_BYTE *)(v5 + 32) - 32640) >> 8;
    *(_WORD *)(v6 + 134) = (150 * *(_BYTE *)(v5 + 34) + 77 * *(_BYTE *)(v5 + 33) + 29 * *(_BYTE *)(v5 + 35) - 32640) >> 8;
    *(_WORD *)(v6 + 136) = (150 * *(_BYTE *)(v5 + 37) + 77 * *(_BYTE *)(v5 + 36) + 29 * *(_BYTE *)(v5 + 38) - 32640) >> 8;
    *(_WORD *)(v6 + 138) = (150 * *(_BYTE *)(v5 + 40) + 77 * *(_BYTE *)(v5 + 39) + 29 * *(_BYTE *)(v5 + 41) - 32640) >> 8;
    *(_WORD *)(v6 + 140) = (150 * *(_BYTE *)(v5 + 43) + 77 * *(_BYTE *)(v5 + 42) + 29 * *(_BYTE *)(v5 + 44) - 32640) >> 8;
    *(_WORD *)(v6 + 142) = (150 * *(_BYTE *)(v5 + 46) + 77 * *(_BYTE *)(v5 + 45) + 29 * *(_BYTE *)(v5 + 47) - 32640) >> 8;
    v7 = *(_BYTE *)(v5 + 3) + *(_BYTE *)v5;
    v8 = *(_BYTE *)(v5 + 4) + *(_BYTE *)(v5 + 1);
    v9 = *(_BYTE *)(v5 + 5) + *(_BYTE *)(v5 + 2);
    v10 = *(_BYTE *)(v5 + 9) + *(_BYTE *)(v5 + 6);
    v11 = *(_BYTE *)(v5 + 10) + *(_BYTE *)(v5 + 7);
    v12 = *(_BYTE *)(v5 + 11) + *(_BYTE *)(v5 + 8);
    v13 = *(_BYTE *)(v5 + 15) + *(_BYTE *)(v5 + 12);
    v14 = *(_BYTE *)(v5 + 16) + *(_BYTE *)(v5 + 13);
    v15 = *(_BYTE *)(v5 + 17) + *(_BYTE *)(v5 + 14);
    v16 = *(_BYTE *)(v5 + 21) + *(_BYTE *)(v5 + 18);
    v17 = *(_BYTE *)(v5 + 22) + *(_BYTE *)(v5 + 19);
    v18 = *(_BYTE *)(v5 + 23) + *(_BYTE *)(v5 + 20);
    v19 = *(_BYTE *)(v5 + 27) + *(_BYTE *)(v5 + 24);
    v20 = *(_BYTE *)(v5 + 28) + *(_BYTE *)(v5 + 25);
    v21 = *(_BYTE *)(v5 + 29) + *(_BYTE *)(v5 + 26);
    v22 = *(_BYTE *)(v5 + 33) + *(_BYTE *)(v5 + 30);
    v23 = *(_BYTE *)(v5 + 34) + *(_BYTE *)(v5 + 31);
    v24 = *(_BYTE *)(v5 + 35) + *(_BYTE *)(v5 + 32);
    v25 = *(_BYTE *)(v5 + 39) + *(_BYTE *)(v5 + 36);
    v26 = *(_BYTE *)(v5 + 40) + *(_BYTE *)(v5 + 37);
    v27 = *(_BYTE *)(v5 + 41) + *(_BYTE *)(v5 + 38);
    v28 = *(_BYTE *)(v5 + 45) + *(_BYTE *)(v5 + 42);
    v29 = *(_BYTE *)(v5 + 46) + *(_BYTE *)(v5 + 43);
    v30 = *(_BYTE *)(v5 + 47) + *(_BYTE *)(v5 + 44);
    v31 = a2 + v5;
    *(_WORD *)(v6 + 16) = (150 * *(_BYTE *)(v31 + 1) + 77 * *(_BYTE *)v31 + 29 * *(_BYTE *)(v31 + 2) - 32640) >> 8;
    *(_WORD *)(v6 + 18) = (150 * *(_BYTE *)(v31 + 4) + 77 * *(_BYTE *)(v31 + 3) + 29 * *(_BYTE *)(v31 + 5) - 32640) >> 8;
    *(_WORD *)(v6 + 20) = (150 * *(_BYTE *)(v31 + 7) + 77 * *(_BYTE *)(v31 + 6) + 29 * *(_BYTE *)(v31 + 8) - 32640) >> 8;
    *(_WORD *)(v6 + 22) = (150 * *(_BYTE *)(v31 + 10) + 77 * *(_BYTE *)(v31 + 9) + 29 * *(_BYTE *)(v31 + 11) - 32640) >> 8;
    *(_WORD *)(v6 + 24) = (150 * *(_BYTE *)(v31 + 13) + 77 * *(_BYTE *)(v31 + 12) + 29 * *(_BYTE *)(v31 + 14) - 32640) >> 8;
    *(_WORD *)(v6 + 26) = (150 * *(_BYTE *)(v31 + 16) + 77 * *(_BYTE *)(v31 + 15) + 29 * *(_BYTE *)(v31 + 17) - 32640) >> 8;
    *(_WORD *)(v6 + 28) = (150 * *(_BYTE *)(v31 + 19) + 77 * *(_BYTE *)(v31 + 18) + 29 * *(_BYTE *)(v31 + 20) - 32640) >> 8;
    *(_WORD *)(v6 + 30) = (150 * *(_BYTE *)(v31 + 22) + 77 * *(_BYTE *)(v31 + 21) + 29 * *(_BYTE *)(v31 + 23) - 32640) >> 8;
    *(_WORD *)(v6 + 144) = (150 * *(_BYTE *)(v31 + 25) + 77 * *(_BYTE *)(v31 + 24) + 29 * *(_BYTE *)(v31 + 26) - 32640) >> 8;
    *(_WORD *)(v6 + 146) = (150 * *(_BYTE *)(v31 + 28) + 77 * *(_BYTE *)(v31 + 27) + 29 * *(_BYTE *)(v31 + 29) - 32640) >> 8;
    *(_WORD *)(v6 + 148) = (150 * *(_BYTE *)(v31 + 31) + 77 * *(_BYTE *)(v31 + 30) + 29 * *(_BYTE *)(v31 + 32) - 32640) >> 8;
    *(_WORD *)(v6 + 150) = (150 * *(_BYTE *)(v31 + 34) + 77 * *(_BYTE *)(v31 + 33) + 29 * *(_BYTE *)(v31 + 35) - 32640) >> 8;
    *(_WORD *)(v6 + 152) = (150 * *(_BYTE *)(v31 + 37) + 77 * *(_BYTE *)(v31 + 36) + 29 * *(_BYTE *)(v31 + 38) - 32640) >> 8;
    *(_WORD *)(v6 + 154) = (150 * *(_BYTE *)(v31 + 40) + 77 * *(_BYTE *)(v31 + 39) + 29 * *(_BYTE *)(v31 + 41) - 32640) >> 8;
    *(_WORD *)(v6 + 156) = (150 * *(_BYTE *)(v31 + 43) + 77 * *(_BYTE *)(v31 + 42) + 29 * *(_BYTE *)(v31 + 44) - 32640) >> 8;
    *(_WORD *)(v6 + 158) = (150 * *(_BYTE *)(v31 + 46) + 77 * *(_BYTE *)(v31 + 45) + 29 * *(_BYTE *)(v31 + 47) - 32640) >> 8;
    v32 = v7 + *(_BYTE *)(v31 + 3) + *(_BYTE *)v31;
    v33 = v8 + *(_BYTE *)(v31 + 4) + *(_BYTE *)(v31 + 1);
    v34 = v9 + *(_BYTE *)(v31 + 5) + *(_BYTE *)(v31 + 2);
    *(_WORD *)v61 = (-85 * v33 + -43 * v32 + ((v9 + *(_BYTE *)(v31 + 5) + *(_BYTE *)(v31 + 2)) << 7) + 512) >> 10;
    v6 += 32;
    *(_WORD *)v60 = (-107 * v33 + (v32 << 7) + -21 * v34 + 512) >> 10;
    v35 = v10 + *(_BYTE *)(v31 + 9) + *(_BYTE *)(v31 + 6);
    v36 = v11 + *(_BYTE *)(v31 + 10) + *(_BYTE *)(v31 + 7);
    v37 = v12 + *(_BYTE *)(v31 + 11) + *(_BYTE *)(v31 + 8);
    *(_WORD *)(v61 + 2) = (-85 * v36 + -43 * v35 + ((v12 + *(_BYTE *)(v31 + 11) + *(_BYTE *)(v31 + 8)) << 7) + 512) >> 10;
    *(_WORD *)(v60 + 2) = (-107 * v36 + (v35 << 7) + -21 * v37 + 512) >> 10;
    v38 = v13 + *(_BYTE *)(v31 + 15) + *(_BYTE *)(v31 + 12);
    v39 = v14 + *(_BYTE *)(v31 + 16) + *(_BYTE *)(v31 + 13);
    v40 = v15 + *(_BYTE *)(v31 + 17) + *(_BYTE *)(v31 + 14);
    *(_WORD *)(v61 + 4) = (-85 * v39 + -43 * v38 + ((v15 + *(_BYTE *)(v31 + 17) + *(_BYTE *)(v31 + 14)) << 7) + 512) >> 10;
    *(_WORD *)(v60 + 4) = (-107 * v39 + (v38 << 7) + -21 * v40 + 512) >> 10;
    v41 = v16 + *(_BYTE *)(v31 + 21) + *(_BYTE *)(v31 + 18);
    v42 = v17 + *(_BYTE *)(v31 + 22) + *(_BYTE *)(v31 + 19);
    v43 = v18 + *(_BYTE *)(v31 + 23) + *(_BYTE *)(v31 + 20);
    *(_WORD *)(v61 + 6) = (-85 * v42 + -43 * v41 + ((v18 + *(_BYTE *)(v31 + 23) + *(_BYTE *)(v31 + 20)) << 7) + 512) >> 10;
    *(_WORD *)(v60 + 6) = (-107 * v42 + (v41 << 7) + -21 * v43 + 512) >> 10;
    v44 = v19 + *(_BYTE *)(v31 + 27) + *(_BYTE *)(v31 + 24);
    v45 = v20 + *(_BYTE *)(v31 + 28) + *(_BYTE *)(v31 + 25);
    v46 = v21 + *(_BYTE *)(v31 + 29) + *(_BYTE *)(v31 + 26);
    *(_WORD *)(v61 + 8) = (-85 * v45 + -43 * v44 + ((v21 + *(_BYTE *)(v31 + 29) + *(_BYTE *)(v31 + 26)) << 7) + 512) >> 10;
    *(_WORD *)(v60 + 8) = (-107 * v45 + (v44 << 7) + -21 * v46 + 512) >> 10;
    v47 = v22 + *(_BYTE *)(v31 + 33) + *(_BYTE *)(v31 + 30);
    v48 = v23 + *(_BYTE *)(v31 + 34) + *(_BYTE *)(v31 + 31);
    v49 = v24 + *(_BYTE *)(v31 + 35) + *(_BYTE *)(v31 + 32);
    *(_WORD *)(v61 + 10) = (-85 * v48 + -43 * v47 + ((v24 + *(_BYTE *)(v31 + 35) + *(_BYTE *)(v31 + 32)) << 7) + 512) >> 10;
    *(_WORD *)(v60 + 10) = (-107 * v48 + (v47 << 7) + -21 * v49 + 512) >> 10;
    v50 = v25 + *(_BYTE *)(v31 + 39) + *(_BYTE *)(v31 + 36);
    v51 = v26 + *(_BYTE *)(v31 + 40) + *(_BYTE *)(v31 + 37);
    v52 = v27 + *(_BYTE *)(v31 + 41) + *(_BYTE *)(v31 + 38);
    *(_WORD *)(v61 + 12) = (-85 * v51 + -43 * v50 + ((v27 + *(_BYTE *)(v31 + 41) + *(_BYTE *)(v31 + 38)) << 7) + 512) >> 10;
    *(_WORD *)(v60 + 12) = (-107 * v51 + (v50 << 7) + -21 * v52 + 512) >> 10;
    v53 = v28 + *(_BYTE *)(v31 + 45) + *(_BYTE *)(v31 + 42);
    v54 = v29 + *(_BYTE *)(v31 + 46) + *(_BYTE *)(v31 + 43);
    v55 = v30 + *(_BYTE *)(v31 + 47) + *(_BYTE *)(v31 + 44);
    *(_WORD *)(v61 + 14) = (-85 * v54 + -43 * v53 + ((v30 + *(_BYTE *)(v31 + 47) + *(_BYTE *)(v31 + 44)) << 7) + 512) >> 10;
    *(_WORD *)(v60 + 14) = (-107 * v54 + (v53 << 7) + -21 * v55 + 512) >> 10;
    result = v59 + 2;
    v61 += 16;
    v60 += 16;
    v5 = a2 + v31;
    v58 = __OFSUB__(v59 + 2, 8);
    v57 = v59 - 6 < 0;
    v59 += 2;
  }
  while ( v57 ^ v58 );
  return result;
}

//----- (0076B290) --------------------------------------------------------
int __cdecl RGB_to_YCbCr_411_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5)
{
  sub_76A870(a1, a2, a3, a4, a5);
  return sub_76A870(a1 + 8 * a2, a2, a3 + 256, a4 + 64, a5 + 64);
}

//----- (0076B300) --------------------------------------------------------
int __cdecl RGB_to_YCbCr_411_Full_MCU_M5(int a1, int a2, int a3, int a4)
{
  int v4; // edi@1
  int result; // eax@1

  own_rgb_to_ycbcr_411_one_quarter_mcu_m5((__m64 *)a1, a2, a3, (__m64 *)a4);
  own_rgb_to_ycbcr_411_one_quarter_mcu_m5((__m64 *)(a1 + 24), a2, a3 + 128, (__m64 *)(a4 + 8));
  v4 = a1 + 8 * a2;
  own_rgb_to_ycbcr_411_one_quarter_mcu_m5((__m64 *)v4, a2, a3 + 256, (__m64 *)(a4 + 64));
  result = a3 + 384;
  own_rgb_to_ycbcr_411_one_quarter_mcu_m5((__m64 *)(v4 + 24), a2, a3 + 384, (__m64 *)(a4 + 72));
  return result;
}

//----- (0076B3A0) --------------------------------------------------------
void __cdecl RGB_to_YCbCr_411_MCU(struct _JPEG_PROPERTIES *a1, int a2, int a3)
{
  int v3; // edi@1
  signed int v4; // esi@1
  int v5; // ebp@1
  char *v6; // ebx@1
  char *v7; // ecx@1
  int v8; // eax@2
  __int64 v9; // rax@7
  int v10; // eax@7
  void (__cdecl **v11)(char *, int, char *, int, int); // [sp+1Ch] [bp-18h]@1

  v3 = 16;
  v4 = 16;
  v5 = a1->DIBLineBytes;
  v6 = a1->MCUBuf;
  v7 = a1->state.DIB_ptr;
  v11 = (void (__cdecl **)(char *, int, char *, int, int))a1->state.ctx;
  if ( a1->numxMCUs - 1 == a2 )
  {
    v8 = (((unsigned __int64)a1->DIBWidth >> 32) ^ abs(a1->DIBWidth) & 0xF) - ((unsigned __int64)a1->DIBWidth >> 32);
    if ( v8 )
      v3 = v8;
    a1->state.DIB_ptr = &a1->DIBBytes[v5 * (16 * a3 + 16)];
  }
  else
  {
    a1->state.DIB_ptr = v7 + 48;
  }
  if ( a3 == a1->numyMCUs - 1 )
  {
    v9 = abs(a1->DIBHeight);
    v10 = (HIDWORD(v9) ^ abs(v9) & 0xF) - HIDWORD(v9);
    if ( v10 )
      v4 = v10;
  }
  if ( v3 != 16 || v4 != 16 )
    sub_76A320((int)v7, v5, v3, v4, (int)v6);
  else
    v11[28](v7, v5, v6, (int)(v6 + 512), (int)(v6 + 640));
}

//----- (0076B4A0) --------------------------------------------------------
int __cdecl sub_76B4A0(int a1, int a2, int a3, signed int a4, int a5)
{
  unsigned int v5; // eax@1
  signed int v6; // edx@1
  int v7; // ecx@2
  int v8; // ebx@2
  int v9; // ebp@2
  int v10; // eax@3
  int v11; // edi@4
  int v12; // esi@4
  int v13; // ebx@5
  int v14; // ebp@5
  int v15; // ecx@5
  int v16; // esi@8
  int v17; // edx@8
  int v18; // ecx@14
  __int16 v19; // di@15
  __int16 v20; // si@15
  __int16 v21; // bp@15
  __int16 v22; // bx@15
  int v23; // edx@16
  int v24; // ecx@16
  int v25; // ebx@16
  int v26; // edi@17
  int v27; // esi@17
  int v28; // ebp@17
  int result; // eax@17
  __int16 v30; // cx@18
  char v31; // [sp+1Fh] [bp-62Dh]@1
  int v32; // [sp+620h] [bp-2Ch]@4
  int v33; // [sp+624h] [bp-28h]@8
  unsigned int v34; // [sp+628h] [bp-24h]@2
  int v35; // [sp+62Ch] [bp-20h]@4
  int v36; // [sp+630h] [bp-1Ch]@4
  int v37; // [sp+634h] [bp-18h]@4
  int v38; // [sp+638h] [bp-14h]@4

  v5 = (unsigned int)&v31 & 0xFFFFFFE0;
  v6 = 0;
  if ( a4 > 0 )
  {
    v7 = 0;
    v8 = 0;
    v9 = 0;
    v34 = (unsigned int)&v31 & 0xFFFFFFE0;
    do
    {
      v10 = 0;
      if ( a3 > 0 )
      {
        v11 = v7;
        v12 = v8;
        v37 = v7;
        v36 = v8;
        v38 = 0;
        v32 = v9;
        v35 = v6;
        do
        {
          v13 = *(_BYTE *)(v11 + a1);
          v14 = *(_BYTE *)(v11 + a1 + 1);
          v15 = *(_BYTE *)(v11 + a1 + 2);
          v11 += 3;
          *(_WORD *)(v34 + 2 * v12) = (150 * v14 + 29 * v13 + 77 * v15 - 32640) >> 8;
          *(_WORD *)(v34 + 2 * v12 + 512) = (-85 * v14 + (v13 << 7) + -43 * v15 + 128) >> 8;
          *(_WORD *)(v34 + 2 * v12++ + 1024) = (-107 * v14 + -21 * v13 + (v15 << 7) + 128) >> 8;
          v10 = v38++ + 1;
        }
        while ( v38 < a3 );
        v7 = v37;
        v8 = v36;
        v9 = v32;
        v6 = v35;
      }
      if ( v10 < 16 )
      {
        v33 = v34 + v9;
        v16 = v34 + 2 * (v10 + v8);
        v32 = v9;
        v35 = v6;
        v17 = v34 + v9;
        do
        {
          ++v10;
          *(_WORD *)v16 = *(_WORD *)(v17 + 2 * a3 - 2);
          *(_WORD *)(v16 + 512) = *(_WORD *)(v17 + 2 * a3 + 510);
          *(_WORD *)(v16 + 1024) = *(_WORD *)(v17 + 2 * a3 + 1022);
          v16 += 2;
        }
        while ( v10 < 16 );
        v9 = v32;
        v6 = v35;
      }
      v7 += a2;
      v8 += 16;
      v9 += 32;
      ++v6;
    }
    while ( v6 < a4 );
    v5 = v34;
  }
  if ( v6 < 16 )
  {
    v18 = v5 + 32 * v6;
    do
    {
      v19 = *(_WORD *)(v18 + 1020);
      v20 = *(_WORD *)(v18 - 2);
      *(_WORD *)v18 = *(_WORD *)(v18 - 32);
      v21 = *(_WORD *)(v18 + 510);
      *(_WORD *)(v18 + 512) = *(_WORD *)(v18 + 480);
      ++v6;
      *(_WORD *)(v18 + 1024) = *(_WORD *)(v18 + 992);
      *(_WORD *)(v18 + 2) = *(_WORD *)(v18 - 30);
      *(_WORD *)(v18 + 514) = *(_WORD *)(v18 + 482);
      *(_WORD *)(v18 + 1026) = *(_WORD *)(v18 + 994);
      *(_WORD *)(v18 + 4) = *(_WORD *)(v18 - 28);
      *(_WORD *)(v18 + 516) = *(_WORD *)(v18 + 484);
      *(_WORD *)(v18 + 1028) = *(_WORD *)(v18 + 996);
      *(_WORD *)(v18 + 6) = *(_WORD *)(v18 - 26);
      *(_WORD *)(v18 + 518) = *(_WORD *)(v18 + 486);
      *(_WORD *)(v18 + 1030) = *(_WORD *)(v18 + 998);
      *(_WORD *)(v18 + 8) = *(_WORD *)(v18 - 24);
      *(_WORD *)(v18 + 520) = *(_WORD *)(v18 + 488);
      *(_WORD *)(v18 + 1032) = *(_WORD *)(v18 + 1000);
      *(_WORD *)(v18 + 10) = *(_WORD *)(v18 - 22);
      *(_WORD *)(v18 + 522) = *(_WORD *)(v18 + 490);
      *(_WORD *)(v18 + 1034) = *(_WORD *)(v18 + 1002);
      *(_WORD *)(v18 + 12) = *(_WORD *)(v18 - 20);
      *(_WORD *)(v18 + 524) = *(_WORD *)(v18 + 492);
      *(_WORD *)(v18 + 1036) = *(_WORD *)(v18 + 1004);
      *(_WORD *)(v18 + 14) = *(_WORD *)(v18 - 18);
      *(_WORD *)(v18 + 526) = *(_WORD *)(v18 + 494);
      *(_WORD *)(v18 + 1038) = *(_WORD *)(v18 + 1006);
      *(_WORD *)(v18 + 16) = *(_WORD *)(v18 - 16);
      *(_WORD *)(v18 + 528) = *(_WORD *)(v18 + 496);
      *(_WORD *)(v18 + 1040) = *(_WORD *)(v18 + 1008);
      *(_WORD *)(v18 + 18) = *(_WORD *)(v18 - 14);
      *(_WORD *)(v18 + 530) = *(_WORD *)(v18 + 498);
      *(_WORD *)(v18 + 1042) = *(_WORD *)(v18 + 1010);
      *(_WORD *)(v18 + 20) = *(_WORD *)(v18 - 12);
      *(_WORD *)(v18 + 532) = *(_WORD *)(v18 + 500);
      *(_WORD *)(v18 + 1044) = *(_WORD *)(v18 + 1012);
      *(_WORD *)(v18 + 22) = *(_WORD *)(v18 - 10);
      *(_WORD *)(v18 + 534) = *(_WORD *)(v18 + 502);
      *(_WORD *)(v18 + 1046) = *(_WORD *)(v18 + 1014);
      *(_WORD *)(v18 + 24) = *(_WORD *)(v18 - 8);
      *(_WORD *)(v18 + 536) = *(_WORD *)(v18 + 504);
      *(_WORD *)(v18 + 1048) = *(_WORD *)(v18 + 1016);
      *(_WORD *)(v18 + 26) = *(_WORD *)(v18 - 6);
      *(_WORD *)(v18 + 538) = *(_WORD *)(v18 + 506);
      *(_WORD *)(v18 + 1050) = *(_WORD *)(v18 + 1018);
      *(_WORD *)(v18 + 28) = *(_WORD *)(v18 - 4);
      *(_WORD *)(v18 + 540) = *(_WORD *)(v18 + 508);
      v22 = *(_WORD *)(v18 + 1022);
      *(_WORD *)(v18 + 1052) = v19;
      *(_WORD *)(v18 + 30) = v20;
      *(_WORD *)(v18 + 542) = v21;
      *(_WORD *)(v18 + 1054) = v22;
      v18 += 32;
    }
    while ( v6 < 16 );
  }
  v23 = 0;
  v24 = 0;
  v25 = 0;
  v34 = v5;
  do
  {
    v26 = a5 + 2 * v23;
    v27 = v34 + 2 * v24;
    v28 = v34 + 2 * v25;
    result = v28 + 32;
    v32 = v24;
    v33 = v25;
    do
    {
      *(_WORD *)v26 = *(_WORD *)v27;
      *(_WORD *)(v26 + 128) = *(_WORD *)(v27 + 16);
      *(_WORD *)(v26 + 256) = *(_WORD *)(v27 + 256);
      v30 = *(_WORD *)(v27 + 272);
      v27 += 2;
      *(_WORD *)(v26 + 384) = v30;
      *(_WORD *)(v26 + 512) = (*(_WORD *)(v28 + 544)
                             + *(_WORD *)(v28 + 514)
                             + (signed int)*(_WORD *)(v28 + 512)
                             + *(_WORD *)(v28 + 546)
                             + 2) >> 2;
      *(_WORD *)(v26 + 640) = (*(_WORD *)(v28 + 1056)
                             + *(_WORD *)(v28 + 1026)
                             + (signed int)*(_WORD *)(v28 + 1024)
                             + *(_WORD *)(v28 + 1058)
                             + 2) >> 2;
      v26 += 2;
      v28 += 4;
    }
    while ( result > v28 );
    v23 += 8;
    v24 = v32 + 16;
    v25 = v33 + 32;
  }
  while ( v33 + 32 < 256 );
  return result;
}

//----- (0076B9F0) --------------------------------------------------------
int __cdecl sub_76B9F0(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // edx@1
  int v6; // ecx@1
  int v7; // eax@2
  int v8; // ST60_4@2
  int v9; // ST5C_4@2
  int v10; // ST58_4@2
  int v11; // ST54_4@2
  int v12; // ST50_4@2
  int v13; // ST4C_4@2
  int v14; // ST48_4@2
  int v15; // ST44_4@2
  int v16; // ST40_4@2
  int v17; // ST3C_4@2
  int v18; // ST38_4@2
  int v19; // ST34_4@2
  int v20; // ST30_4@2
  int v21; // ST2C_4@2
  int v22; // ST24_4@2
  int v23; // ST20_4@2
  int v24; // ST1C_4@2
  int v25; // ST18_4@2
  int v26; // ST14_4@2
  int v27; // ST10_4@2
  int v28; // ST0C_4@2
  int v29; // ST08_4@2
  int v30; // ST04_4@2
  int v31; // edx@2
  int v32; // esi@2
  int v33; // ebp@2
  int v34; // ebx@2
  int v35; // esi@2
  int v36; // ebp@2
  int v37; // ebx@2
  int v38; // esi@2
  int v39; // ebp@2
  int v40; // ebx@2
  int v41; // esi@2
  int v42; // ebp@2
  int v43; // ebx@2
  int v44; // esi@2
  int v45; // ebp@2
  int v46; // ebx@2
  int v47; // esi@2
  int v48; // ebp@2
  int v49; // ebx@2
  int v50; // ebp@2
  int v51; // ebx@2
  int v52; // eax@2
  int v53; // esi@2
  int v54; // ebp@2
  int v55; // ebx@2
  int result; // eax@2
  bool v57; // sf@2
  unsigned __int8 v58; // of@2
  int v59; // [sp+28h] [bp-54h]@1
  int v60; // [sp+64h] [bp-18h]@1
  int v61; // [sp+68h] [bp-14h]@1

  v5 = a1;
  v6 = a3;
  v59 = 0;
  v60 = a5;
  v61 = a4;
  do
  {
    *(_WORD *)v6 = (150 * *(_BYTE *)(v5 + 1) + 77 * *(_BYTE *)(v5 + 2) + 29 * *(_BYTE *)v5 - 32640) >> 8;
    *(_WORD *)(v6 + 2) = (150 * *(_BYTE *)(v5 + 4) + 77 * *(_BYTE *)(v5 + 5) + 29 * *(_BYTE *)(v5 + 3) - 32640) >> 8;
    *(_WORD *)(v6 + 4) = (150 * *(_BYTE *)(v5 + 7) + 77 * *(_BYTE *)(v5 + 8) + 29 * *(_BYTE *)(v5 + 6) - 32640) >> 8;
    *(_WORD *)(v6 + 6) = (150 * *(_BYTE *)(v5 + 10) + 77 * *(_BYTE *)(v5 + 11) + 29 * *(_BYTE *)(v5 + 9) - 32640) >> 8;
    *(_WORD *)(v6 + 8) = (150 * *(_BYTE *)(v5 + 13) + 77 * *(_BYTE *)(v5 + 14) + 29 * *(_BYTE *)(v5 + 12) - 32640) >> 8;
    *(_WORD *)(v6 + 10) = (150 * *(_BYTE *)(v5 + 16) + 77 * *(_BYTE *)(v5 + 17) + 29 * *(_BYTE *)(v5 + 15) - 32640) >> 8;
    *(_WORD *)(v6 + 12) = (150 * *(_BYTE *)(v5 + 19) + 77 * *(_BYTE *)(v5 + 20) + 29 * *(_BYTE *)(v5 + 18) - 32640) >> 8;
    *(_WORD *)(v6 + 14) = (150 * *(_BYTE *)(v5 + 22) + 77 * *(_BYTE *)(v5 + 23) + 29 * *(_BYTE *)(v5 + 21) - 32640) >> 8;
    *(_WORD *)(v6 + 128) = (150 * *(_BYTE *)(v5 + 25) + 77 * *(_BYTE *)(v5 + 26) + 29 * *(_BYTE *)(v5 + 24) - 32640) >> 8;
    *(_WORD *)(v6 + 130) = (150 * *(_BYTE *)(v5 + 28) + 77 * *(_BYTE *)(v5 + 29) + 29 * *(_BYTE *)(v5 + 27) - 32640) >> 8;
    *(_WORD *)(v6 + 132) = (150 * *(_BYTE *)(v5 + 31) + 77 * *(_BYTE *)(v5 + 32) + 29 * *(_BYTE *)(v5 + 30) - 32640) >> 8;
    *(_WORD *)(v6 + 134) = (150 * *(_BYTE *)(v5 + 34) + 77 * *(_BYTE *)(v5 + 35) + 29 * *(_BYTE *)(v5 + 33) - 32640) >> 8;
    *(_WORD *)(v6 + 136) = (150 * *(_BYTE *)(v5 + 37) + 77 * *(_BYTE *)(v5 + 38) + 29 * *(_BYTE *)(v5 + 36) - 32640) >> 8;
    *(_WORD *)(v6 + 138) = (150 * *(_BYTE *)(v5 + 40) + 77 * *(_BYTE *)(v5 + 41) + 29 * *(_BYTE *)(v5 + 39) - 32640) >> 8;
    *(_WORD *)(v6 + 140) = (150 * *(_BYTE *)(v5 + 43) + 77 * *(_BYTE *)(v5 + 44) + 29 * *(_BYTE *)(v5 + 42) - 32640) >> 8;
    *(_WORD *)(v6 + 142) = (150 * *(_BYTE *)(v5 + 46) + 77 * *(_BYTE *)(v5 + 47) + 29 * *(_BYTE *)(v5 + 45) - 32640) >> 8;
    v7 = *(_BYTE *)(v5 + 3) + *(_BYTE *)v5;
    v8 = *(_BYTE *)(v5 + 4) + *(_BYTE *)(v5 + 1);
    v9 = *(_BYTE *)(v5 + 5) + *(_BYTE *)(v5 + 2);
    v10 = *(_BYTE *)(v5 + 9) + *(_BYTE *)(v5 + 6);
    v11 = *(_BYTE *)(v5 + 10) + *(_BYTE *)(v5 + 7);
    v12 = *(_BYTE *)(v5 + 11) + *(_BYTE *)(v5 + 8);
    v13 = *(_BYTE *)(v5 + 15) + *(_BYTE *)(v5 + 12);
    v14 = *(_BYTE *)(v5 + 16) + *(_BYTE *)(v5 + 13);
    v15 = *(_BYTE *)(v5 + 17) + *(_BYTE *)(v5 + 14);
    v16 = *(_BYTE *)(v5 + 21) + *(_BYTE *)(v5 + 18);
    v17 = *(_BYTE *)(v5 + 22) + *(_BYTE *)(v5 + 19);
    v18 = *(_BYTE *)(v5 + 23) + *(_BYTE *)(v5 + 20);
    v19 = *(_BYTE *)(v5 + 27) + *(_BYTE *)(v5 + 24);
    v20 = *(_BYTE *)(v5 + 28) + *(_BYTE *)(v5 + 25);
    v21 = *(_BYTE *)(v5 + 29) + *(_BYTE *)(v5 + 26);
    v22 = *(_BYTE *)(v5 + 33) + *(_BYTE *)(v5 + 30);
    v23 = *(_BYTE *)(v5 + 34) + *(_BYTE *)(v5 + 31);
    v24 = *(_BYTE *)(v5 + 35) + *(_BYTE *)(v5 + 32);
    v25 = *(_BYTE *)(v5 + 39) + *(_BYTE *)(v5 + 36);
    v26 = *(_BYTE *)(v5 + 40) + *(_BYTE *)(v5 + 37);
    v27 = *(_BYTE *)(v5 + 41) + *(_BYTE *)(v5 + 38);
    v28 = *(_BYTE *)(v5 + 45) + *(_BYTE *)(v5 + 42);
    v29 = *(_BYTE *)(v5 + 46) + *(_BYTE *)(v5 + 43);
    v30 = *(_BYTE *)(v5 + 47) + *(_BYTE *)(v5 + 44);
    v31 = a2 + v5;
    *(_WORD *)(v6 + 16) = (150 * *(_BYTE *)(v31 + 1) + 77 * *(_BYTE *)(v31 + 2) + 29 * *(_BYTE *)v31 - 32640) >> 8;
    *(_WORD *)(v6 + 18) = (150 * *(_BYTE *)(v31 + 4) + 77 * *(_BYTE *)(v31 + 5) + 29 * *(_BYTE *)(v31 + 3) - 32640) >> 8;
    *(_WORD *)(v6 + 20) = (150 * *(_BYTE *)(v31 + 7) + 77 * *(_BYTE *)(v31 + 8) + 29 * *(_BYTE *)(v31 + 6) - 32640) >> 8;
    *(_WORD *)(v6 + 22) = (150 * *(_BYTE *)(v31 + 10) + 77 * *(_BYTE *)(v31 + 11) + 29 * *(_BYTE *)(v31 + 9) - 32640) >> 8;
    *(_WORD *)(v6 + 24) = (150 * *(_BYTE *)(v31 + 13) + 77 * *(_BYTE *)(v31 + 14) + 29 * *(_BYTE *)(v31 + 12) - 32640) >> 8;
    *(_WORD *)(v6 + 26) = (150 * *(_BYTE *)(v31 + 16) + 77 * *(_BYTE *)(v31 + 17) + 29 * *(_BYTE *)(v31 + 15) - 32640) >> 8;
    *(_WORD *)(v6 + 28) = (150 * *(_BYTE *)(v31 + 19) + 77 * *(_BYTE *)(v31 + 20) + 29 * *(_BYTE *)(v31 + 18) - 32640) >> 8;
    *(_WORD *)(v6 + 30) = (150 * *(_BYTE *)(v31 + 22) + 77 * *(_BYTE *)(v31 + 23) + 29 * *(_BYTE *)(v31 + 21) - 32640) >> 8;
    *(_WORD *)(v6 + 144) = (150 * *(_BYTE *)(v31 + 25) + 77 * *(_BYTE *)(v31 + 26) + 29 * *(_BYTE *)(v31 + 24) - 32640) >> 8;
    *(_WORD *)(v6 + 146) = (150 * *(_BYTE *)(v31 + 28) + 77 * *(_BYTE *)(v31 + 29) + 29 * *(_BYTE *)(v31 + 27) - 32640) >> 8;
    *(_WORD *)(v6 + 148) = (150 * *(_BYTE *)(v31 + 31) + 77 * *(_BYTE *)(v31 + 32) + 29 * *(_BYTE *)(v31 + 30) - 32640) >> 8;
    *(_WORD *)(v6 + 150) = (150 * *(_BYTE *)(v31 + 34) + 77 * *(_BYTE *)(v31 + 35) + 29 * *(_BYTE *)(v31 + 33) - 32640) >> 8;
    *(_WORD *)(v6 + 152) = (150 * *(_BYTE *)(v31 + 37) + 77 * *(_BYTE *)(v31 + 38) + 29 * *(_BYTE *)(v31 + 36) - 32640) >> 8;
    *(_WORD *)(v6 + 154) = (150 * *(_BYTE *)(v31 + 40) + 77 * *(_BYTE *)(v31 + 41) + 29 * *(_BYTE *)(v31 + 39) - 32640) >> 8;
    *(_WORD *)(v6 + 156) = (150 * *(_BYTE *)(v31 + 43) + 77 * *(_BYTE *)(v31 + 44) + 29 * *(_BYTE *)(v31 + 42) - 32640) >> 8;
    *(_WORD *)(v6 + 158) = (150 * *(_BYTE *)(v31 + 46) + 77 * *(_BYTE *)(v31 + 47) + 29 * *(_BYTE *)(v31 + 45) - 32640) >> 8;
    v32 = v7 + *(_BYTE *)(v31 + 3) + *(_BYTE *)v31;
    v33 = v8 + *(_BYTE *)(v31 + 4) + *(_BYTE *)(v31 + 1);
    v34 = v9 + *(_BYTE *)(v31 + 5) + *(_BYTE *)(v31 + 2);
    *(_WORD *)v61 = (((v7 + *(_BYTE *)(v31 + 3) + *(_BYTE *)v31) << 7) + -43 * v34 + -85 * v33 + 512) >> 10;
    v6 += 32;
    *(_WORD *)v60 = (-21 * v32 + (v34 << 7) + -107 * v33 + 512) >> 10;
    v35 = v10 + *(_BYTE *)(v31 + 9) + *(_BYTE *)(v31 + 6);
    v36 = v11 + *(_BYTE *)(v31 + 10) + *(_BYTE *)(v31 + 7);
    v37 = v12 + *(_BYTE *)(v31 + 11) + *(_BYTE *)(v31 + 8);
    *(_WORD *)(v61 + 2) = (((v10 + *(_BYTE *)(v31 + 9) + *(_BYTE *)(v31 + 6)) << 7) + -43 * v37 + -85 * v36 + 512) >> 10;
    *(_WORD *)(v60 + 2) = (-21 * v35 + (v37 << 7) + -107 * v36 + 512) >> 10;
    v38 = v13 + *(_BYTE *)(v31 + 15) + *(_BYTE *)(v31 + 12);
    v39 = v14 + *(_BYTE *)(v31 + 16) + *(_BYTE *)(v31 + 13);
    v40 = v15 + *(_BYTE *)(v31 + 17) + *(_BYTE *)(v31 + 14);
    *(_WORD *)(v61 + 4) = (((v13 + *(_BYTE *)(v31 + 15) + *(_BYTE *)(v31 + 12)) << 7) + -43 * v40 + -85 * v39 + 512) >> 10;
    *(_WORD *)(v60 + 4) = (-21 * v38 + (v40 << 7) + -107 * v39 + 512) >> 10;
    v41 = v16 + *(_BYTE *)(v31 + 21) + *(_BYTE *)(v31 + 18);
    v42 = v17 + *(_BYTE *)(v31 + 22) + *(_BYTE *)(v31 + 19);
    v43 = v18 + *(_BYTE *)(v31 + 23) + *(_BYTE *)(v31 + 20);
    *(_WORD *)(v61 + 6) = (((v16 + *(_BYTE *)(v31 + 21) + *(_BYTE *)(v31 + 18)) << 7) + -43 * v43 + -85 * v42 + 512) >> 10;
    *(_WORD *)(v60 + 6) = (-21 * v41 + (v43 << 7) + -107 * v42 + 512) >> 10;
    v44 = v19 + *(_BYTE *)(v31 + 27) + *(_BYTE *)(v31 + 24);
    v45 = v20 + *(_BYTE *)(v31 + 28) + *(_BYTE *)(v31 + 25);
    v46 = v21 + *(_BYTE *)(v31 + 29) + *(_BYTE *)(v31 + 26);
    *(_WORD *)(v61 + 8) = (((v19 + *(_BYTE *)(v31 + 27) + *(_BYTE *)(v31 + 24)) << 7) + -43 * v46 + -85 * v45 + 512) >> 10;
    *(_WORD *)(v60 + 8) = (-21 * v44 + (v46 << 7) + -107 * v45 + 512) >> 10;
    v47 = v22 + *(_BYTE *)(v31 + 33) + *(_BYTE *)(v31 + 30);
    v48 = v23 + *(_BYTE *)(v31 + 34) + *(_BYTE *)(v31 + 31);
    v49 = v24 + *(_BYTE *)(v31 + 35) + *(_BYTE *)(v31 + 32);
    *(_WORD *)(v61 + 10) = (((v22 + *(_BYTE *)(v31 + 33) + *(_BYTE *)(v31 + 30)) << 7) + -43 * v49 + -85 * v48 + 512) >> 10;
    *(_WORD *)(v60 + 10) = (-21 * v47 + (v49 << 7) + -107 * v48 + 512) >> 10;
    v50 = v25 + *(_BYTE *)(v31 + 39) + *(_BYTE *)(v31 + 36);
    v51 = v26 + *(_BYTE *)(v31 + 40) + *(_BYTE *)(v31 + 37);
    v52 = v27 + *(_BYTE *)(v31 + 41) + *(_BYTE *)(v31 + 38);
    *(_WORD *)(v61 + 12) = (((v25 + *(_BYTE *)(v31 + 39) + *(_BYTE *)(v31 + 36)) << 7) + -43 * v52 + -85 * v51 + 512) >> 10;
    *(_WORD *)(v60 + 12) = (-21 * v50 + (v52 << 7) + -107 * v51 + 512) >> 10;
    v53 = v28 + *(_BYTE *)(v31 + 45) + *(_BYTE *)(v31 + 42);
    v54 = v29 + *(_BYTE *)(v31 + 46) + *(_BYTE *)(v31 + 43);
    v55 = v30 + *(_BYTE *)(v31 + 47) + *(_BYTE *)(v31 + 44);
    *(_WORD *)(v61 + 14) = (((v28 + *(_BYTE *)(v31 + 45) + *(_BYTE *)(v31 + 42)) << 7) + -43 * v55 + -85 * v54 + 512) >> 10;
    *(_WORD *)(v60 + 14) = (-21 * v53 + (v55 << 7) + -107 * v54 + 512) >> 10;
    result = v59 + 2;
    v61 += 16;
    v60 += 16;
    v5 = a2 + v31;
    v58 = __OFSUB__(v59 + 2, 8);
    v57 = v59 - 6 < 0;
    v59 += 2;
  }
  while ( v57 ^ v58 );
  return result;
}

//----- (0076C410) --------------------------------------------------------
int __cdecl BGR_to_YCbCr_411_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5)
{
  sub_76B9F0(a1, a2, a3, a4, a5);
  return sub_76B9F0(a1 + 8 * a2, a2, a3 + 256, a4 + 64, a5 + 64);
}

//----- (0076C480) --------------------------------------------------------
int __cdecl BGR_to_YCbCr_411_Full_MCU_M5(int a1, int a2, int a3, int a4)
{
  int v4; // edi@1
  int result; // eax@1

  own_bgr_to_ycbcr_411_one_quarter_mcu_m5((__m64 *)a1, a2, a3, (__m64 *)a4);
  own_bgr_to_ycbcr_411_one_quarter_mcu_m5((__m64 *)(a1 + 24), a2, a3 + 128, (__m64 *)(a4 + 8));
  v4 = a1 + 8 * a2;
  own_bgr_to_ycbcr_411_one_quarter_mcu_m5((__m64 *)v4, a2, a3 + 256, (__m64 *)(a4 + 64));
  result = a3 + 384;
  own_bgr_to_ycbcr_411_one_quarter_mcu_m5((__m64 *)(v4 + 24), a2, a3 + 384, (__m64 *)(a4 + 72));
  return result;
}

//----- (0076C520) --------------------------------------------------------
void __cdecl BGR_to_YCbCr_411_MCU(struct _JPEG_PROPERTIES *a1, int a2, int a3)
{
  int v3; // edi@1
  signed int v4; // esi@1
  int v5; // ebp@1
  char *v6; // ebx@1
  char *v7; // ecx@1
  int v8; // eax@2
  __int64 v9; // rax@7
  int v10; // eax@7
  void (__cdecl **v11)(char *, int, char *, int, int); // [sp+1Ch] [bp-18h]@1

  v3 = 16;
  v4 = 16;
  v5 = a1->DIBLineBytes;
  v6 = a1->MCUBuf;
  v7 = a1->state.DIB_ptr;
  v11 = (void (__cdecl **)(char *, int, char *, int, int))a1->state.ctx;
  if ( a1->numxMCUs - 1 == a2 )
  {
    v8 = (((unsigned __int64)a1->DIBWidth >> 32) ^ abs(a1->DIBWidth) & 0xF) - ((unsigned __int64)a1->DIBWidth >> 32);
    if ( v8 )
      v3 = v8;
    a1->state.DIB_ptr = &a1->DIBBytes[v5 * (16 * a3 + 16)];
  }
  else
  {
    a1->state.DIB_ptr = v7 + 48;
  }
  if ( a3 == a1->numyMCUs - 1 )
  {
    v9 = abs(a1->DIBHeight);
    v10 = (HIDWORD(v9) ^ abs(v9) & 0xF) - HIDWORD(v9);
    if ( v10 )
      v4 = v10;
  }
  if ( v3 != 16 || v4 != 16 )
    sub_76B4A0((int)v7, v5, v3, v4, (int)v6);
  else
    v11[31](v7, v5, v6, (int)(v6 + 512), (int)(v6 + 640));
}

//----- (0076C620) --------------------------------------------------------
unsigned int __cdecl sub_76C620(int a1, int a2, int a3, signed int a4, int a5)
{
  unsigned int result; // eax@1
  signed int v6; // edx@1
  int v7; // ecx@2
  int v8; // ebx@2
  int v9; // ebp@2
  int v10; // eax@3
  int v11; // edi@4
  int v12; // esi@4
  int v13; // ebx@5
  int v14; // ebp@5
  int v15; // ecx@5
  unsigned int v16; // edx@5
  int v17; // esi@8
  int v18; // edx@8
  int v19; // ecx@14
  __int16 v20; // di@15
  __int16 v21; // si@15
  __int16 v22; // bp@15
  __int16 v23; // bx@15
  int v24; // ecx@16
  int v25; // edx@16
  int v26; // edi@17
  int v27; // esi@17
  int v28; // ebp@17
  int v29; // ebx@17
  __int16 v30; // ax@18
  int v31; // eax@18
  char v32; // [sp+1Fh] [bp-32Dh]@1
  int v33; // [sp+320h] [bp-2Ch]@8
  unsigned int v34; // [sp+324h] [bp-28h]@2
  int v35; // [sp+328h] [bp-24h]@4
  int v36; // [sp+32Ch] [bp-20h]@4
  int v37; // [sp+330h] [bp-1Ch]@4
  int v38; // [sp+334h] [bp-18h]@4
  int v39; // [sp+338h] [bp-14h]@4

  result = (unsigned int)&v32 & 0xFFFFFFE0;
  v6 = 0;
  if ( a4 > 0 )
  {
    v7 = 0;
    v8 = 0;
    v9 = 0;
    v34 = (unsigned int)&v32 & 0xFFFFFFE0;
    do
    {
      v10 = 0;
      if ( a3 > 0 )
      {
        v11 = v7;
        v12 = v8;
        v38 = v7;
        v37 = v8;
        v39 = 0;
        v35 = v9;
        v36 = v6;
        do
        {
          v13 = *(_BYTE *)(v11 + a1);
          v14 = *(_BYTE *)(v11 + a1 + 1);
          v15 = *(_BYTE *)(v11 + a1 + 2);
          v11 += 3;
          *(_WORD *)(v34 + 2 * v12) = (150 * v14 + 77 * v13 + 29 * v15 - 32640) >> 8;
          v16 = v34;
          *(_WORD *)(v34 + 2 * v12 + 256) = (-85 * v14 + -43 * v13 + (v15 << 7) + 128) >> 8;
          *(_WORD *)(v16 + 2 * v12++ + 512) = (-107 * v14 + (v13 << 7) + -21 * v15 + 128) >> 8;
          v10 = v39++ + 1;
        }
        while ( v39 < a3 );
        v7 = v38;
        v8 = v37;
        v9 = v35;
        v6 = v36;
      }
      if ( v10 < 16 )
      {
        v33 = v34 + v9;
        v17 = v34 + 2 * (v10 + v8);
        v35 = v9;
        v36 = v6;
        v18 = v34 + v9;
        do
        {
          ++v10;
          *(_WORD *)v17 = *(_WORD *)(v18 + 2 * a3 - 2);
          *(_WORD *)(v17 + 256) = *(_WORD *)(v18 + 2 * a3 + 254);
          *(_WORD *)(v17 + 512) = *(_WORD *)(v18 + 2 * a3 + 510);
          v17 += 2;
        }
        while ( v10 < 16 );
        v9 = v35;
        v6 = v36;
      }
      v7 += a2;
      v8 += 16;
      v9 += 32;
      ++v6;
    }
    while ( v6 < a4 );
    result = v34;
  }
  if ( v6 < 8 )
  {
    v19 = result + 32 * v6;
    do
    {
      v20 = *(_WORD *)(v19 + 508);
      v21 = *(_WORD *)(v19 - 2);
      *(_WORD *)v19 = *(_WORD *)(v19 - 32);
      v22 = *(_WORD *)(v19 + 254);
      *(_WORD *)(v19 + 256) = *(_WORD *)(v19 + 224);
      ++v6;
      *(_WORD *)(v19 + 512) = *(_WORD *)(v19 + 480);
      *(_WORD *)(v19 + 2) = *(_WORD *)(v19 - 30);
      *(_WORD *)(v19 + 258) = *(_WORD *)(v19 + 226);
      *(_WORD *)(v19 + 514) = *(_WORD *)(v19 + 482);
      *(_WORD *)(v19 + 4) = *(_WORD *)(v19 - 28);
      *(_WORD *)(v19 + 260) = *(_WORD *)(v19 + 228);
      *(_WORD *)(v19 + 516) = *(_WORD *)(v19 + 484);
      *(_WORD *)(v19 + 6) = *(_WORD *)(v19 - 26);
      *(_WORD *)(v19 + 262) = *(_WORD *)(v19 + 230);
      *(_WORD *)(v19 + 518) = *(_WORD *)(v19 + 486);
      *(_WORD *)(v19 + 8) = *(_WORD *)(v19 - 24);
      *(_WORD *)(v19 + 264) = *(_WORD *)(v19 + 232);
      *(_WORD *)(v19 + 520) = *(_WORD *)(v19 + 488);
      *(_WORD *)(v19 + 10) = *(_WORD *)(v19 - 22);
      *(_WORD *)(v19 + 266) = *(_WORD *)(v19 + 234);
      *(_WORD *)(v19 + 522) = *(_WORD *)(v19 + 490);
      *(_WORD *)(v19 + 12) = *(_WORD *)(v19 - 20);
      *(_WORD *)(v19 + 268) = *(_WORD *)(v19 + 236);
      *(_WORD *)(v19 + 524) = *(_WORD *)(v19 + 492);
      *(_WORD *)(v19 + 14) = *(_WORD *)(v19 - 18);
      *(_WORD *)(v19 + 270) = *(_WORD *)(v19 + 238);
      *(_WORD *)(v19 + 526) = *(_WORD *)(v19 + 494);
      *(_WORD *)(v19 + 16) = *(_WORD *)(v19 - 16);
      *(_WORD *)(v19 + 272) = *(_WORD *)(v19 + 240);
      *(_WORD *)(v19 + 528) = *(_WORD *)(v19 + 496);
      *(_WORD *)(v19 + 18) = *(_WORD *)(v19 - 14);
      *(_WORD *)(v19 + 274) = *(_WORD *)(v19 + 242);
      *(_WORD *)(v19 + 530) = *(_WORD *)(v19 + 498);
      *(_WORD *)(v19 + 20) = *(_WORD *)(v19 - 12);
      *(_WORD *)(v19 + 276) = *(_WORD *)(v19 + 244);
      *(_WORD *)(v19 + 532) = *(_WORD *)(v19 + 500);
      *(_WORD *)(v19 + 22) = *(_WORD *)(v19 - 10);
      *(_WORD *)(v19 + 278) = *(_WORD *)(v19 + 246);
      *(_WORD *)(v19 + 534) = *(_WORD *)(v19 + 502);
      *(_WORD *)(v19 + 24) = *(_WORD *)(v19 - 8);
      *(_WORD *)(v19 + 280) = *(_WORD *)(v19 + 248);
      *(_WORD *)(v19 + 536) = *(_WORD *)(v19 + 504);
      *(_WORD *)(v19 + 26) = *(_WORD *)(v19 - 6);
      *(_WORD *)(v19 + 282) = *(_WORD *)(v19 + 250);
      *(_WORD *)(v19 + 538) = *(_WORD *)(v19 + 506);
      *(_WORD *)(v19 + 28) = *(_WORD *)(v19 - 4);
      *(_WORD *)(v19 + 284) = *(_WORD *)(v19 + 252);
      v23 = *(_WORD *)(v19 + 510);
      *(_WORD *)(v19 + 540) = v20;
      *(_WORD *)(v19 + 30) = v21;
      *(_WORD *)(v19 + 286) = v22;
      *(_WORD *)(v19 + 542) = v23;
      v19 += 32;
    }
    while ( v6 < 8 );
  }
  v24 = 0;
  v25 = 0;
  do
  {
    v26 = a5 + 2 * v24;
    v27 = result + 2 * v25;
    v28 = result + 2 * v25;
    v29 = result + 2 * v25 + 32;
    v33 = v25;
    v34 = result;
    do
    {
      *(_WORD *)v26 = *(_WORD *)v27;
      v30 = *(_WORD *)(v27 + 16);
      v27 += 2;
      *(_WORD *)(v26 + 128) = v30;
      *(_WORD *)(v26 + 256) = (*(_WORD *)(v28 + 256) + (signed int)*(_WORD *)(v28 + 258) + 1) >> 1;
      v31 = (*(_WORD *)(v28 + 512) + (signed int)*(_WORD *)(v28 + 514) + 1) >> 1;
      v28 += 4;
      *(_WORD *)(v26 + 384) = v31;
      v26 += 2;
    }
    while ( v29 > v28 );
    result = v34;
    v24 += 8;
    v25 = v33 + 16;
  }
  while ( v33 + 16 < 128 );
  return result;
}

//----- (0076CB10) --------------------------------------------------------
int __cdecl RGB_to_YCbCr_422_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // edx@1
  int result; // eax@1
  int v7; // esi@2
  int v8; // ebp@2
  int v9; // ebx@2
  int v10; // esi@2
  int v11; // ebp@2
  int v12; // ebx@2
  int v13; // esi@2
  int v14; // ebp@2
  int v15; // ebx@2
  int v16; // esi@2
  int v17; // ebp@2
  int v18; // ebx@2
  int v19; // esi@2
  int v20; // ebp@2
  int v21; // ebx@2
  int v22; // esi@2
  int v23; // ebp@2
  int v24; // ebx@2
  int v25; // ebp@2
  int v26; // ebx@2
  int v27; // ecx@2
  int v28; // esi@2
  int v29; // ebp@2
  int v30; // ebx@2
  signed int v31; // [sp+4h] [bp-20h]@1
  int v32; // [sp+8h] [bp-1Ch]@1
  int v33; // [sp+Ch] [bp-18h]@1

  v5 = a1;
  result = a3;
  v31 = 0;
  v32 = a5;
  v33 = a4;
  do
  {
    *(_WORD *)result = (150 * *(_BYTE *)(v5 + 1) + 77 * *(_BYTE *)v5 + 29 * *(_BYTE *)(v5 + 2) - 32640) >> 8;
    *(_WORD *)(result + 2) = (150 * *(_BYTE *)(v5 + 4) + 77 * *(_BYTE *)(v5 + 3) + 29 * *(_BYTE *)(v5 + 5) - 32640) >> 8;
    *(_WORD *)(result + 4) = (150 * *(_BYTE *)(v5 + 7) + 77 * *(_BYTE *)(v5 + 6) + 29 * *(_BYTE *)(v5 + 8) - 32640) >> 8;
    *(_WORD *)(result + 6) = (150 * *(_BYTE *)(v5 + 10) + 77 * *(_BYTE *)(v5 + 9) + 29 * *(_BYTE *)(v5 + 11) - 32640) >> 8;
    *(_WORD *)(result + 8) = (150 * *(_BYTE *)(v5 + 13) + 77 * *(_BYTE *)(v5 + 12) + 29 * *(_BYTE *)(v5 + 14) - 32640) >> 8;
    *(_WORD *)(result + 10) = (150 * *(_BYTE *)(v5 + 16) + 77 * *(_BYTE *)(v5 + 15) + 29 * *(_BYTE *)(v5 + 17) - 32640) >> 8;
    *(_WORD *)(result + 12) = (150 * *(_BYTE *)(v5 + 19) + 77 * *(_BYTE *)(v5 + 18) + 29 * *(_BYTE *)(v5 + 20) - 32640) >> 8;
    *(_WORD *)(result + 14) = (150 * *(_BYTE *)(v5 + 22) + 77 * *(_BYTE *)(v5 + 21) + 29 * *(_BYTE *)(v5 + 23) - 32640) >> 8;
    *(_WORD *)(result + 128) = (150 * *(_BYTE *)(v5 + 25) + 77 * *(_BYTE *)(v5 + 24) + 29 * *(_BYTE *)(v5 + 26) - 32640) >> 8;
    *(_WORD *)(result + 130) = (150 * *(_BYTE *)(v5 + 28) + 77 * *(_BYTE *)(v5 + 27) + 29 * *(_BYTE *)(v5 + 29) - 32640) >> 8;
    *(_WORD *)(result + 132) = (150 * *(_BYTE *)(v5 + 31) + 77 * *(_BYTE *)(v5 + 30) + 29 * *(_BYTE *)(v5 + 32) - 32640) >> 8;
    *(_WORD *)(result + 134) = (150 * *(_BYTE *)(v5 + 34) + 77 * *(_BYTE *)(v5 + 33) + 29 * *(_BYTE *)(v5 + 35) - 32640) >> 8;
    *(_WORD *)(result + 136) = (150 * *(_BYTE *)(v5 + 37) + 77 * *(_BYTE *)(v5 + 36) + 29 * *(_BYTE *)(v5 + 38) - 32640) >> 8;
    *(_WORD *)(result + 138) = (150 * *(_BYTE *)(v5 + 40) + 77 * *(_BYTE *)(v5 + 39) + 29 * *(_BYTE *)(v5 + 41) - 32640) >> 8;
    *(_WORD *)(result + 140) = (150 * *(_BYTE *)(v5 + 43) + 77 * *(_BYTE *)(v5 + 42) + 29 * *(_BYTE *)(v5 + 44) - 32640) >> 8;
    *(_WORD *)(result + 142) = (150 * *(_BYTE *)(v5 + 46) + 77 * *(_BYTE *)(v5 + 45) + 29 * *(_BYTE *)(v5 + 47) - 32640) >> 8;
    v7 = *(_BYTE *)(v5 + 3) + *(_BYTE *)v5;
    v8 = *(_BYTE *)(v5 + 4) + *(_BYTE *)(v5 + 1);
    v9 = *(_BYTE *)(v5 + 5) + *(_BYTE *)(v5 + 2);
    *(_WORD *)v33 = (-85 * v8 + -43 * v7 + (v9 << 7) + 256) >> 9;
    result += 16;
    *(_WORD *)v32 = (-107 * v8 + (v7 << 7) + -21 * v9 + 256) >> 9;
    v10 = *(_BYTE *)(v5 + 9) + *(_BYTE *)(v5 + 6);
    v11 = *(_BYTE *)(v5 + 10) + *(_BYTE *)(v5 + 7);
    v12 = *(_BYTE *)(v5 + 11) + *(_BYTE *)(v5 + 8);
    *(_WORD *)(v33 + 2) = (-85 * v11 + -43 * v10 + (v12 << 7) + 256) >> 9;
    *(_WORD *)(v32 + 2) = (-107 * v11 + (v10 << 7) + -21 * v12 + 256) >> 9;
    v13 = *(_BYTE *)(v5 + 15) + *(_BYTE *)(v5 + 12);
    v14 = *(_BYTE *)(v5 + 16) + *(_BYTE *)(v5 + 13);
    v15 = *(_BYTE *)(v5 + 17) + *(_BYTE *)(v5 + 14);
    *(_WORD *)(v33 + 4) = (-85 * v14 + -43 * v13 + (v15 << 7) + 256) >> 9;
    *(_WORD *)(v32 + 4) = (-107 * v14 + (v13 << 7) + -21 * v15 + 256) >> 9;
    v16 = *(_BYTE *)(v5 + 21) + *(_BYTE *)(v5 + 18);
    v17 = *(_BYTE *)(v5 + 22) + *(_BYTE *)(v5 + 19);
    v18 = *(_BYTE *)(v5 + 23) + *(_BYTE *)(v5 + 20);
    *(_WORD *)(v33 + 6) = (-85 * v17 + -43 * v16 + (v18 << 7) + 256) >> 9;
    *(_WORD *)(v32 + 6) = (-107 * v17 + (v16 << 7) + -21 * v18 + 256) >> 9;
    v19 = *(_BYTE *)(v5 + 27) + *(_BYTE *)(v5 + 24);
    v20 = *(_BYTE *)(v5 + 28) + *(_BYTE *)(v5 + 25);
    v21 = *(_BYTE *)(v5 + 29) + *(_BYTE *)(v5 + 26);
    *(_WORD *)(v33 + 8) = (-85 * v20 + -43 * v19 + (v21 << 7) + 256) >> 9;
    *(_WORD *)(v32 + 8) = (-107 * v20 + (v19 << 7) + -21 * v21 + 256) >> 9;
    v22 = *(_BYTE *)(v5 + 33) + *(_BYTE *)(v5 + 30);
    v23 = *(_BYTE *)(v5 + 34) + *(_BYTE *)(v5 + 31);
    v24 = *(_BYTE *)(v5 + 35) + *(_BYTE *)(v5 + 32);
    *(_WORD *)(v33 + 10) = (-85 * v23 + -43 * v22 + (v24 << 7) + 256) >> 9;
    *(_WORD *)(v32 + 10) = (-107 * v23 + (v22 << 7) + -21 * v24 + 256) >> 9;
    v25 = *(_BYTE *)(v5 + 39) + *(_BYTE *)(v5 + 36);
    v26 = *(_BYTE *)(v5 + 40) + *(_BYTE *)(v5 + 37);
    v27 = *(_BYTE *)(v5 + 41) + *(_BYTE *)(v5 + 38);
    *(_WORD *)(v33 + 12) = (-85 * v26 + -43 * v25 + (v27 << 7) + 256) >> 9;
    *(_WORD *)(v32 + 12) = (-107 * v26 + (v25 << 7) + -21 * v27 + 256) >> 9;
    v28 = *(_BYTE *)(v5 + 45) + *(_BYTE *)(v5 + 42);
    v29 = *(_BYTE *)(v5 + 46) + *(_BYTE *)(v5 + 43);
    v30 = *(_BYTE *)(v5 + 47) + *(_BYTE *)(v5 + 44);
    *(_WORD *)(v33 + 14) = (-85 * v29 + -43 * v28 + (v30 << 7) + 256) >> 9;
    *(_WORD *)(v32 + 14) = (-107 * v29 + (v28 << 7) + -21 * v30 + 256) >> 9;
    v33 += 16;
    v32 += 16;
    v5 += a2;
    ++v31;
  }
  while ( v31 < 8 );
  return result;
}

//----- (0076D0D0) --------------------------------------------------------
int __cdecl RGB_to_YCbCr_422_Full_MCU_M5(int a1, int a2, int a3, __m64 *a4, unsigned __int64 *a5)
{
  int result; // eax@1

  result = a1;
  own_rgb_to_ycbcr_422_full_mcu_m5(a1, a2, a3, a4, a5);
  return result;
}

//----- (0076D110) --------------------------------------------------------
void __cdecl RGB_to_YCbCr_422_MCU(struct _JPEG_PROPERTIES *a1, int a2, int a3)
{
  int v3; // edi@1
  signed int v4; // esi@1
  int v5; // ebp@1
  char *v6; // ebx@1
  char *v7; // ecx@1
  int v8; // eax@2
  __int64 v9; // rax@7
  int v10; // eax@7
  void (__cdecl **v11)(char *, int, char *, int, int); // [sp+1Ch] [bp-18h]@1

  v3 = 16;
  v4 = 8;
  v5 = a1->DIBLineBytes;
  v6 = a1->MCUBuf;
  v7 = a1->state.DIB_ptr;
  v11 = (void (__cdecl **)(char *, int, char *, int, int))a1->state.ctx;
  if ( a1->numxMCUs - 1 == a2 )
  {
    v8 = (((unsigned __int64)a1->DIBWidth >> 32) ^ abs(a1->DIBWidth) & 0xF) - ((unsigned __int64)a1->DIBWidth >> 32);
    if ( v8 )
      v3 = v8;
    a1->state.DIB_ptr = &a1->DIBBytes[v5 * (8 * a3 + 8)];
  }
  else
  {
    a1->state.DIB_ptr = v7 + 48;
  }
  if ( a3 == a1->numyMCUs - 1 )
  {
    v9 = abs(a1->DIBHeight);
    v10 = (HIDWORD(v9) ^ abs(v9) & 7) - HIDWORD(v9);
    if ( v10 )
      v4 = v10;
  }
  if ( v3 != 16 || v4 != 8 )
    sub_76C620((int)v7, v5, v3, v4, (int)v6);
  else
    v11[27](v7, v5, v6, (int)(v6 + 256), (int)(v6 + 384));
}

//----- (0076D220) --------------------------------------------------------
unsigned int __cdecl sub_76D220(int a1, int a2, int a3, signed int a4, int a5)
{
  unsigned int result; // eax@1
  signed int v6; // edx@1
  int v7; // ecx@2
  int v8; // ebx@2
  int v9; // ebp@2
  int v10; // eax@3
  int v11; // edi@4
  int v12; // esi@4
  int v13; // ebx@5
  int v14; // ebp@5
  int v15; // ecx@5
  int v16; // esi@8
  int v17; // edx@8
  int v18; // ecx@14
  __int16 v19; // di@15
  __int16 v20; // si@15
  __int16 v21; // bp@15
  __int16 v22; // bx@15
  int v23; // ecx@16
  int v24; // edx@16
  int v25; // edi@17
  int v26; // esi@17
  int v27; // ebp@17
  int v28; // ebx@17
  __int16 v29; // ax@18
  int v30; // eax@18
  char v31; // [sp+1Fh] [bp-32Dh]@1
  int v32; // [sp+320h] [bp-2Ch]@8
  unsigned int v33; // [sp+324h] [bp-28h]@2
  int v34; // [sp+328h] [bp-24h]@4
  int v35; // [sp+32Ch] [bp-20h]@4
  int v36; // [sp+330h] [bp-1Ch]@4
  int v37; // [sp+334h] [bp-18h]@4
  int v38; // [sp+338h] [bp-14h]@4

  result = (unsigned int)&v31 & 0xFFFFFFE0;
  v6 = 0;
  if ( a4 > 0 )
  {
    v7 = 0;
    v8 = 0;
    v9 = 0;
    v33 = (unsigned int)&v31 & 0xFFFFFFE0;
    do
    {
      v10 = 0;
      if ( a3 > 0 )
      {
        v11 = v7;
        v12 = v8;
        v37 = v7;
        v36 = v8;
        v38 = 0;
        v34 = v9;
        v35 = v6;
        do
        {
          v13 = *(_BYTE *)(v11 + a1);
          v14 = *(_BYTE *)(v11 + a1 + 1);
          v15 = *(_BYTE *)(v11 + a1 + 2);
          v11 += 3;
          *(_WORD *)(v33 + 2 * v12) = (150 * v14 + 29 * v13 + 77 * v15 - 32640) >> 8;
          *(_WORD *)(v33 + 2 * v12 + 256) = (-85 * v14 + (v13 << 7) + -43 * v15 + 128) >> 8;
          *(_WORD *)(v33 + 2 * v12++ + 512) = (-107 * v14 + -21 * v13 + (v15 << 7) + 128) >> 8;
          v10 = v38++ + 1;
        }
        while ( v38 < a3 );
        v7 = v37;
        v8 = v36;
        v9 = v34;
        v6 = v35;
      }
      if ( v10 < 16 )
      {
        v32 = v33 + v9;
        v16 = v33 + 2 * (v10 + v8);
        v34 = v9;
        v35 = v6;
        v17 = v33 + v9;
        do
        {
          ++v10;
          *(_WORD *)v16 = *(_WORD *)(v17 + 2 * a3 - 2);
          *(_WORD *)(v16 + 256) = *(_WORD *)(v17 + 2 * a3 + 254);
          *(_WORD *)(v16 + 512) = *(_WORD *)(v17 + 2 * a3 + 510);
          v16 += 2;
        }
        while ( v10 < 16 );
        v9 = v34;
        v6 = v35;
      }
      v7 += a2;
      v8 += 16;
      v9 += 32;
      ++v6;
    }
    while ( v6 < a4 );
    result = v33;
  }
  if ( v6 < 8 )
  {
    v18 = result + 32 * v6;
    do
    {
      v19 = *(_WORD *)(v18 + 508);
      v20 = *(_WORD *)(v18 - 2);
      *(_WORD *)v18 = *(_WORD *)(v18 - 32);
      v21 = *(_WORD *)(v18 + 254);
      *(_WORD *)(v18 + 256) = *(_WORD *)(v18 + 224);
      ++v6;
      *(_WORD *)(v18 + 512) = *(_WORD *)(v18 + 480);
      *(_WORD *)(v18 + 2) = *(_WORD *)(v18 - 30);
      *(_WORD *)(v18 + 258) = *(_WORD *)(v18 + 226);
      *(_WORD *)(v18 + 514) = *(_WORD *)(v18 + 482);
      *(_WORD *)(v18 + 4) = *(_WORD *)(v18 - 28);
      *(_WORD *)(v18 + 260) = *(_WORD *)(v18 + 228);
      *(_WORD *)(v18 + 516) = *(_WORD *)(v18 + 484);
      *(_WORD *)(v18 + 6) = *(_WORD *)(v18 - 26);
      *(_WORD *)(v18 + 262) = *(_WORD *)(v18 + 230);
      *(_WORD *)(v18 + 518) = *(_WORD *)(v18 + 486);
      *(_WORD *)(v18 + 8) = *(_WORD *)(v18 - 24);
      *(_WORD *)(v18 + 264) = *(_WORD *)(v18 + 232);
      *(_WORD *)(v18 + 520) = *(_WORD *)(v18 + 488);
      *(_WORD *)(v18 + 10) = *(_WORD *)(v18 - 22);
      *(_WORD *)(v18 + 266) = *(_WORD *)(v18 + 234);
      *(_WORD *)(v18 + 522) = *(_WORD *)(v18 + 490);
      *(_WORD *)(v18 + 12) = *(_WORD *)(v18 - 20);
      *(_WORD *)(v18 + 268) = *(_WORD *)(v18 + 236);
      *(_WORD *)(v18 + 524) = *(_WORD *)(v18 + 492);
      *(_WORD *)(v18 + 14) = *(_WORD *)(v18 - 18);
      *(_WORD *)(v18 + 270) = *(_WORD *)(v18 + 238);
      *(_WORD *)(v18 + 526) = *(_WORD *)(v18 + 494);
      *(_WORD *)(v18 + 16) = *(_WORD *)(v18 - 16);
      *(_WORD *)(v18 + 272) = *(_WORD *)(v18 + 240);
      *(_WORD *)(v18 + 528) = *(_WORD *)(v18 + 496);
      *(_WORD *)(v18 + 18) = *(_WORD *)(v18 - 14);
      *(_WORD *)(v18 + 274) = *(_WORD *)(v18 + 242);
      *(_WORD *)(v18 + 530) = *(_WORD *)(v18 + 498);
      *(_WORD *)(v18 + 20) = *(_WORD *)(v18 - 12);
      *(_WORD *)(v18 + 276) = *(_WORD *)(v18 + 244);
      *(_WORD *)(v18 + 532) = *(_WORD *)(v18 + 500);
      *(_WORD *)(v18 + 22) = *(_WORD *)(v18 - 10);
      *(_WORD *)(v18 + 278) = *(_WORD *)(v18 + 246);
      *(_WORD *)(v18 + 534) = *(_WORD *)(v18 + 502);
      *(_WORD *)(v18 + 24) = *(_WORD *)(v18 - 8);
      *(_WORD *)(v18 + 280) = *(_WORD *)(v18 + 248);
      *(_WORD *)(v18 + 536) = *(_WORD *)(v18 + 504);
      *(_WORD *)(v18 + 26) = *(_WORD *)(v18 - 6);
      *(_WORD *)(v18 + 282) = *(_WORD *)(v18 + 250);
      *(_WORD *)(v18 + 538) = *(_WORD *)(v18 + 506);
      *(_WORD *)(v18 + 28) = *(_WORD *)(v18 - 4);
      *(_WORD *)(v18 + 284) = *(_WORD *)(v18 + 252);
      v22 = *(_WORD *)(v18 + 510);
      *(_WORD *)(v18 + 540) = v19;
      *(_WORD *)(v18 + 30) = v20;
      *(_WORD *)(v18 + 286) = v21;
      *(_WORD *)(v18 + 542) = v22;
      v18 += 32;
    }
    while ( v6 < 8 );
  }
  v23 = 0;
  v24 = 0;
  do
  {
    v25 = a5 + 2 * v23;
    v26 = result + 2 * v24;
    v27 = result + 2 * v24;
    v28 = result + 2 * v24 + 32;
    v32 = v24;
    v33 = result;
    do
    {
      *(_WORD *)v25 = *(_WORD *)v26;
      v29 = *(_WORD *)(v26 + 16);
      v26 += 2;
      *(_WORD *)(v25 + 128) = v29;
      *(_WORD *)(v25 + 256) = (*(_WORD *)(v27 + 256) + (signed int)*(_WORD *)(v27 + 258) + 1) >> 1;
      v30 = (*(_WORD *)(v27 + 512) + (signed int)*(_WORD *)(v27 + 514) + 1) >> 1;
      v27 += 4;
      *(_WORD *)(v25 + 384) = v30;
      v25 += 2;
    }
    while ( v28 > v27 );
    result = v33;
    v23 += 8;
    v24 = v32 + 16;
  }
  while ( v32 + 16 < 128 );
  return result;
}

//----- (0076D710) --------------------------------------------------------
int __cdecl BGR_to_YCbCr_422_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // edx@1
  int result; // eax@1
  int v7; // ebp@2
  int v8; // ebx@2
  int v9; // esi@2
  int v10; // esi@2
  int v11; // ebp@2
  int v12; // ebx@2
  int v13; // esi@2
  int v14; // ebp@2
  int v15; // ebx@2
  int v16; // esi@2
  int v17; // ebp@2
  int v18; // ebx@2
  int v19; // esi@2
  int v20; // ebp@2
  int v21; // ebx@2
  int v22; // esi@2
  int v23; // ebp@2
  int v24; // ebx@2
  int v25; // ebp@2
  int v26; // ebx@2
  int v27; // ecx@2
  int v28; // esi@2
  int v29; // ebp@2
  int v30; // ebx@2
  signed int v31; // [sp+4h] [bp-20h]@1
  int v32; // [sp+8h] [bp-1Ch]@1
  int v33; // [sp+Ch] [bp-18h]@1

  v5 = a1;
  result = a3;
  v31 = 0;
  v32 = a5;
  v33 = a4;
  do
  {
    *(_WORD *)result = (150 * *(_BYTE *)(v5 + 1) + 77 * *(_BYTE *)(v5 + 2) + 29 * *(_BYTE *)v5 - 32640) >> 8;
    *(_WORD *)(result + 2) = (150 * *(_BYTE *)(v5 + 4) + 77 * *(_BYTE *)(v5 + 5) + 29 * *(_BYTE *)(v5 + 3) - 32640) >> 8;
    *(_WORD *)(result + 4) = (150 * *(_BYTE *)(v5 + 7) + 77 * *(_BYTE *)(v5 + 8) + 29 * *(_BYTE *)(v5 + 6) - 32640) >> 8;
    *(_WORD *)(result + 6) = (150 * *(_BYTE *)(v5 + 10) + 77 * *(_BYTE *)(v5 + 11) + 29 * *(_BYTE *)(v5 + 9) - 32640) >> 8;
    *(_WORD *)(result + 8) = (150 * *(_BYTE *)(v5 + 13) + 77 * *(_BYTE *)(v5 + 14) + 29 * *(_BYTE *)(v5 + 12) - 32640) >> 8;
    *(_WORD *)(result + 10) = (150 * *(_BYTE *)(v5 + 16) + 77 * *(_BYTE *)(v5 + 17) + 29 * *(_BYTE *)(v5 + 15) - 32640) >> 8;
    *(_WORD *)(result + 12) = (150 * *(_BYTE *)(v5 + 19) + 77 * *(_BYTE *)(v5 + 20) + 29 * *(_BYTE *)(v5 + 18) - 32640) >> 8;
    *(_WORD *)(result + 14) = (150 * *(_BYTE *)(v5 + 22) + 77 * *(_BYTE *)(v5 + 23) + 29 * *(_BYTE *)(v5 + 21) - 32640) >> 8;
    *(_WORD *)(result + 128) = (150 * *(_BYTE *)(v5 + 25) + 77 * *(_BYTE *)(v5 + 26) + 29 * *(_BYTE *)(v5 + 24) - 32640) >> 8;
    *(_WORD *)(result + 130) = (150 * *(_BYTE *)(v5 + 28) + 77 * *(_BYTE *)(v5 + 29) + 29 * *(_BYTE *)(v5 + 27) - 32640) >> 8;
    *(_WORD *)(result + 132) = (150 * *(_BYTE *)(v5 + 31) + 77 * *(_BYTE *)(v5 + 32) + 29 * *(_BYTE *)(v5 + 30) - 32640) >> 8;
    *(_WORD *)(result + 134) = (150 * *(_BYTE *)(v5 + 34) + 77 * *(_BYTE *)(v5 + 35) + 29 * *(_BYTE *)(v5 + 33) - 32640) >> 8;
    *(_WORD *)(result + 136) = (150 * *(_BYTE *)(v5 + 37) + 77 * *(_BYTE *)(v5 + 38) + 29 * *(_BYTE *)(v5 + 36) - 32640) >> 8;
    *(_WORD *)(result + 138) = (150 * *(_BYTE *)(v5 + 40) + 77 * *(_BYTE *)(v5 + 41) + 29 * *(_BYTE *)(v5 + 39) - 32640) >> 8;
    *(_WORD *)(result + 140) = (150 * *(_BYTE *)(v5 + 43) + 77 * *(_BYTE *)(v5 + 44) + 29 * *(_BYTE *)(v5 + 42) - 32640) >> 8;
    *(_WORD *)(result + 142) = (150 * *(_BYTE *)(v5 + 46) + 77 * *(_BYTE *)(v5 + 47) + 29 * *(_BYTE *)(v5 + 45) - 32640) >> 8;
    v7 = *(_BYTE *)(v5 + 4) + *(_BYTE *)(v5 + 1);
    v8 = *(_BYTE *)(v5 + 5) + *(_BYTE *)(v5 + 2);
    v9 = -21 * (*(_BYTE *)(v5 + 3) + *(_BYTE *)v5);
    *(_WORD *)v33 = (-85 * v7 + ((*(_BYTE *)(v5 + 3) + *(_BYTE *)v5) << 7) + -43 * v8 + 256) >> 9;
    result += 16;
    *(_WORD *)v32 = (-107 * v7 + v9 + (v8 << 7) + 256) >> 9;
    v10 = *(_BYTE *)(v5 + 9) + *(_BYTE *)(v5 + 6);
    v11 = *(_BYTE *)(v5 + 10) + *(_BYTE *)(v5 + 7);
    v12 = *(_BYTE *)(v5 + 11) + *(_BYTE *)(v5 + 8);
    *(_WORD *)(v33 + 2) = (-85 * v11 + (v10 << 7) + -43 * v12 + 256) >> 9;
    *(_WORD *)(v32 + 2) = (-107 * v11 + -21 * v10 + (v12 << 7) + 256) >> 9;
    v13 = *(_BYTE *)(v5 + 15) + *(_BYTE *)(v5 + 12);
    v14 = *(_BYTE *)(v5 + 16) + *(_BYTE *)(v5 + 13);
    v15 = *(_BYTE *)(v5 + 17) + *(_BYTE *)(v5 + 14);
    *(_WORD *)(v33 + 4) = (-85 * v14 + (v13 << 7) + -43 * v15 + 256) >> 9;
    *(_WORD *)(v32 + 4) = (-107 * v14 + -21 * v13 + (v15 << 7) + 256) >> 9;
    v16 = *(_BYTE *)(v5 + 21) + *(_BYTE *)(v5 + 18);
    v17 = *(_BYTE *)(v5 + 22) + *(_BYTE *)(v5 + 19);
    v18 = *(_BYTE *)(v5 + 23) + *(_BYTE *)(v5 + 20);
    *(_WORD *)(v33 + 6) = (-85 * v17 + (v16 << 7) + -43 * v18 + 256) >> 9;
    *(_WORD *)(v32 + 6) = (-107 * v17 + -21 * v16 + (v18 << 7) + 256) >> 9;
    v19 = *(_BYTE *)(v5 + 27) + *(_BYTE *)(v5 + 24);
    v20 = *(_BYTE *)(v5 + 28) + *(_BYTE *)(v5 + 25);
    v21 = *(_BYTE *)(v5 + 29) + *(_BYTE *)(v5 + 26);
    *(_WORD *)(v33 + 8) = (-85 * v20 + (v19 << 7) + -43 * v21 + 256) >> 9;
    *(_WORD *)(v32 + 8) = (-107 * v20 + -21 * v19 + (v21 << 7) + 256) >> 9;
    v22 = *(_BYTE *)(v5 + 33) + *(_BYTE *)(v5 + 30);
    v23 = *(_BYTE *)(v5 + 34) + *(_BYTE *)(v5 + 31);
    v24 = *(_BYTE *)(v5 + 35) + *(_BYTE *)(v5 + 32);
    *(_WORD *)(v33 + 10) = (-85 * v23 + (v22 << 7) + -43 * v24 + 256) >> 9;
    *(_WORD *)(v32 + 10) = (-107 * v23 + -21 * v22 + (v24 << 7) + 256) >> 9;
    v25 = *(_BYTE *)(v5 + 39) + *(_BYTE *)(v5 + 36);
    v26 = *(_BYTE *)(v5 + 40) + *(_BYTE *)(v5 + 37);
    v27 = *(_BYTE *)(v5 + 41) + *(_BYTE *)(v5 + 38);
    *(_WORD *)(v33 + 12) = (-85 * v26 + (v25 << 7) + -43 * v27 + 256) >> 9;
    *(_WORD *)(v32 + 12) = (-107 * v26 + -21 * v25 + (v27 << 7) + 256) >> 9;
    v28 = *(_BYTE *)(v5 + 45) + *(_BYTE *)(v5 + 42);
    v29 = *(_BYTE *)(v5 + 46) + *(_BYTE *)(v5 + 43);
    v30 = *(_BYTE *)(v5 + 47) + *(_BYTE *)(v5 + 44);
    *(_WORD *)(v33 + 14) = (-85 * v29 + (v28 << 7) + -43 * v30 + 256) >> 9;
    *(_WORD *)(v32 + 14) = (-107 * v29 + -21 * v28 + (v30 << 7) + 256) >> 9;
    v33 += 16;
    v32 += 16;
    v5 += a2;
    ++v31;
  }
  while ( v31 < 8 );
  return result;
}

//----- (0076DCD0) --------------------------------------------------------
int __cdecl BGR_to_YCbCr_422_Full_MCU_M5(int a1, int a2, int a3, __m64 *a4, unsigned __int64 *a5)
{
  int result; // eax@1

  result = a1;
  own_bgr_to_ycbcr_422_full_mcu_m5(a1, a2, a3, a4, a5);
  return result;
}

//----- (0076DD10) --------------------------------------------------------
void __cdecl BGR_to_YCbCr_422_MCU(struct _JPEG_PROPERTIES *a1, int a2, int a3)
{
  int v3; // edi@1
  signed int v4; // esi@1
  int v5; // ebp@1
  char *v6; // ebx@1
  char *v7; // ecx@1
  int v8; // eax@2
  __int64 v9; // rax@7
  int v10; // eax@7
  void (__cdecl **v11)(char *, int, char *, int, int); // [sp+1Ch] [bp-18h]@1

  v3 = 16;
  v4 = 8;
  v5 = a1->DIBLineBytes;
  v6 = a1->MCUBuf;
  v7 = a1->state.DIB_ptr;
  v11 = (void (__cdecl **)(char *, int, char *, int, int))a1->state.ctx;
  if ( a1->numxMCUs - 1 == a2 )
  {
    v8 = (((unsigned __int64)a1->DIBWidth >> 32) ^ abs(a1->DIBWidth) & 0xF) - ((unsigned __int64)a1->DIBWidth >> 32);
    if ( v8 )
      v3 = v8;
    a1->state.DIB_ptr = &a1->DIBBytes[v5 * (8 * a3 + 8)];
  }
  else
  {
    a1->state.DIB_ptr = v7 + 48;
  }
  if ( a3 == a1->numyMCUs - 1 )
  {
    v9 = abs(a1->DIBHeight);
    v10 = (HIDWORD(v9) ^ abs(v9) & 7) - HIDWORD(v9);
    if ( v10 )
      v4 = v10;
  }
  if ( v3 != 16 || v4 != 8 )
    sub_76D220((int)v7, v5, v3, v4, (int)v6);
  else
    v11[30](v7, v5, v6, (int)(v6 + 256), (int)(v6 + 384));
}

//----- (0076DE20) --------------------------------------------------------
unsigned int __cdecl sub_76DE20(int a1, int a2, int a3, signed int a4, int a5)
{
  unsigned int result; // eax@1
  signed int v6; // edx@1
  int v7; // ecx@2
  int v8; // esi@2
  int v9; // edi@2
  int v10; // eax@3
  int v11; // ebp@4
  int v12; // ebx@4
  int v13; // esi@4
  int v14; // eax@5
  int v15; // edx@5
  int v16; // ecx@5
  __int16 v17; // di@5
  unsigned int v18; // esi@5
  int v19; // ebp@5
  int v20; // eax@5
  int v21; // ebx@8
  int v22; // edx@8
  int v23; // ecx@14
  int v24; // ebx@14
  int v25; // edi@15
  int v26; // ebp@15
  __int16 v27; // ax@16
  signed int v28; // edx@18
  int v29; // ebx@19
  char v30; // [sp+1Fh] [bp-22Dh]@1
  unsigned int v31; // [sp+220h] [bp-2Ch]@2
  unsigned int v32; // [sp+224h] [bp-28h]@5
  int v33; // [sp+228h] [bp-24h]@4
  int v34; // [sp+22Ch] [bp-20h]@4
  int v35; // [sp+230h] [bp-1Ch]@4
  int v36; // [sp+234h] [bp-18h]@4
  int v37; // [sp+238h] [bp-14h]@4

  result = (unsigned int)&v30 & 0xFFFFFFE0;
  v6 = 0;
  if ( a4 > 0 )
  {
    v7 = 0;
    v8 = 0;
    v9 = 0;
    v31 = (unsigned int)&v30 & 0xFFFFFFE0;
    do
    {
      v10 = 0;
      if ( a3 > 0 )
      {
        v11 = v7;
        v12 = v8;
        v36 = v7;
        v35 = v8;
        v37 = 0;
        v13 = a1;
        v33 = v9;
        v34 = v6;
        do
        {
          v32 = v11;
          v14 = (signed __int16)(255 - *(_BYTE *)(v11 + v13));
          v15 = (signed __int16)(255 - *(_BYTE *)(v11 + v13 + 1));
          v16 = (signed __int16)(255 - *(_BYTE *)(v11 + v13 + 2));
          v17 = *(_BYTE *)(v11 + v13 + 3) - 128;
          *(_WORD *)(v31 + 2 * v12) = (150 * v15 + 77 * v14 + 29 * v16 - 32640) >> 8;
          v18 = v31;
          *(_WORD *)(v31 + 2 * v12 + 128) = (-85 * v15 + -43 * v14 + (v16 << 7) + 128) >> 8;
          v19 = v32;
          *(_WORD *)(v18 + 2 * v12 + 256) = (-107 * v15 + (v14 << 7) + -21 * v16 + 128) >> 8;
          v11 = v19 + 4;
          v20 = v37;
          *(_WORD *)(v18 + 2 * v12++ + 384) = v17;
          v10 = v20 + 1;
          v37 = v10;
          v13 = a1;
        }
        while ( v10 < a3 );
        v7 = v36;
        v8 = v35;
        v9 = v33;
        v6 = v34;
      }
      if ( v10 < 8 )
      {
        v32 = v31 + v9;
        v21 = v31 + 2 * (v10 + v8);
        v33 = v9;
        v34 = v6;
        v22 = v31 + v9;
        do
        {
          ++v10;
          *(_WORD *)v21 = *(_WORD *)(v22 + 2 * a3 - 2);
          *(_WORD *)(v21 + 128) = *(_WORD *)(v22 + 2 * a3 + 126);
          *(_WORD *)(v21 + 256) = *(_WORD *)(v22 + 2 * a3 + 254);
          *(_WORD *)(v21 + 384) = *(_WORD *)(v22 + 2 * a3 + 382);
          v21 += 2;
        }
        while ( v10 < 8 );
        v9 = v33;
        v6 = v34;
      }
      v7 += a2;
      v8 += 8;
      v9 += 16;
      ++v6;
    }
    while ( v6 < a4 );
    result = v31;
  }
  if ( v6 < 8 )
  {
    v23 = 8 * v6;
    v24 = result + 16 * v6;
    do
    {
      v25 = v24;
      v26 = result + 2 * v23;
      v31 = result;
      do
      {
        *(_WORD *)v26 = *(_WORD *)(v25 - 16);
        *(_WORD *)(v26 + 128) = *(_WORD *)(v25 + 112);
        *(_WORD *)(v26 + 256) = *(_WORD *)(v25 + 240);
        v27 = *(_WORD *)(v25 + 368);
        v25 += 2;
        *(_WORD *)(v26 + 384) = v27;
        v26 += 2;
      }
      while ( v24 + 16 > v25 );
      result = v31;
      v23 += 8;
      v24 += 16;
      ++v6;
    }
    while ( v6 < 8 );
  }
  v28 = 0;
  do
  {
    v29 = v28;
    do
    {
      *(_WORD *)(a5 + 2 * v29) = *(_WORD *)(result + 2 * v29);
      *(_WORD *)(a5 + 2 * v29 + 128) = *(_WORD *)(result + 2 * v29 + 128);
      *(_WORD *)(a5 + 2 * v29 + 256) = *(_WORD *)(result + 2 * v29 + 256);
      *(_WORD *)(a5 + 2 * v29 + 384) = *(_WORD *)(result + 2 * v29 + 384);
      ++v29;
    }
    while ( v28 + 8 > v29 );
    v28 += 8;
  }
  while ( v28 < 64 );
  return result;
}

//----- (0076E130) --------------------------------------------------------
int __cdecl RGBA_FPX_to_YCbCrA_FPX_1111_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int v6; // ebp@1
  int v7; // ebx@1
  int v8; // ecx@1
  int v9; // edx@1
  int result; // eax@1
  bool v11; // sf@2
  unsigned __int8 v12; // of@2
  int v13; // [sp+4h] [bp-18h]@1

  v6 = a1;
  v7 = a3;
  v8 = a4;
  v9 = a5;
  result = a6;
  v13 = 0;
  do
  {
    *(_WORD *)v7 = (-150 * *(_BYTE *)(v6 + 1) + -77 * *(_BYTE *)v6 + -29 * *(_BYTE *)(v6 + 2) + 32640) >> 8;
    *(_WORD *)(v7 + 2) = (-150 * *(_BYTE *)(v6 + 5) + -77 * *(_BYTE *)(v6 + 4) + -29 * *(_BYTE *)(v6 + 6) + 32640) >> 8;
    *(_WORD *)(v7 + 4) = (-150 * *(_BYTE *)(v6 + 9) + -77 * *(_BYTE *)(v6 + 8) + -29 * *(_BYTE *)(v6 + 10) + 32640) >> 8;
    *(_WORD *)(v7 + 6) = (-150 * *(_BYTE *)(v6 + 13) + -77 * *(_BYTE *)(v6 + 12) + -29 * *(_BYTE *)(v6 + 14) + 32640) >> 8;
    *(_WORD *)(v7 + 8) = (-150 * *(_BYTE *)(v6 + 17) + -77 * *(_BYTE *)(v6 + 16) + -29 * *(_BYTE *)(v6 + 18) + 32640) >> 8;
    *(_WORD *)(v7 + 10) = (-150 * *(_BYTE *)(v6 + 21) + -77 * *(_BYTE *)(v6 + 20) + -29 * *(_BYTE *)(v6 + 22) + 32640) >> 8;
    *(_WORD *)(v7 + 12) = (-150 * *(_BYTE *)(v6 + 25) + -77 * *(_BYTE *)(v6 + 24) + -29 * *(_BYTE *)(v6 + 26) + 32640) >> 8;
    *(_WORD *)(v7 + 14) = (-150 * *(_BYTE *)(v6 + 29) + -77 * *(_BYTE *)(v6 + 28) + -29 * *(_BYTE *)(v6 + 30) + 32640) >> 8;
    *(_WORD *)result = *(_BYTE *)(v6 + 3) - 128;
    *(_WORD *)(result + 2) = *(_BYTE *)(v6 + 7) - 128;
    *(_WORD *)(result + 4) = *(_BYTE *)(v6 + 11) - 128;
    *(_WORD *)(result + 6) = *(_BYTE *)(v6 + 15) - 128;
    *(_WORD *)(result + 8) = *(_BYTE *)(v6 + 19) - 128;
    *(_WORD *)(result + 10) = *(_BYTE *)(v6 + 23) - 128;
    *(_WORD *)(result + 12) = *(_BYTE *)(v6 + 27) - 128;
    *(_WORD *)(result + 14) = *(_BYTE *)(v6 + 31) - 128;
    v7 += 16;
    *(_WORD *)v8 = (85 * *(_BYTE *)(v6 + 1) + 43 * *(_BYTE *)v6 + ((255 - *(_BYTE *)(v6 + 2)) << 7) - 32512) >> 8;
    result += 16;
    *(_WORD *)(v8 + 2) = (85 * *(_BYTE *)(v6 + 5) + 43 * *(_BYTE *)(v6 + 4) + ((255 - *(_BYTE *)(v6 + 6)) << 7) - 32512) >> 8;
    *(_WORD *)(v8 + 4) = (85 * *(_BYTE *)(v6 + 9) + 43 * *(_BYTE *)(v6 + 8) + ((255 - *(_BYTE *)(v6 + 10)) << 7) - 32512) >> 8;
    *(_WORD *)(v8 + 6) = (85 * *(_BYTE *)(v6 + 13)
                        + 43 * *(_BYTE *)(v6 + 12)
                        + ((255 - *(_BYTE *)(v6 + 14)) << 7)
                        - 32512) >> 8;
    *(_WORD *)(v8 + 8) = (85 * *(_BYTE *)(v6 + 17)
                        + 43 * *(_BYTE *)(v6 + 16)
                        + ((255 - *(_BYTE *)(v6 + 18)) << 7)
                        - 32512) >> 8;
    *(_WORD *)(v8 + 10) = (85 * *(_BYTE *)(v6 + 21)
                         + 43 * *(_BYTE *)(v6 + 20)
                         + ((255 - *(_BYTE *)(v6 + 22)) << 7)
                         - 32512) >> 8;
    *(_WORD *)(v8 + 12) = (85 * *(_BYTE *)(v6 + 25)
                         + 43 * *(_BYTE *)(v6 + 24)
                         + ((255 - *(_BYTE *)(v6 + 26)) << 7)
                         - 32512) >> 8;
    *(_WORD *)(v8 + 14) = (85 * *(_BYTE *)(v6 + 29)
                         + 43 * *(_BYTE *)(v6 + 28)
                         + ((255 - *(_BYTE *)(v6 + 30)) << 7)
                         - 32512) >> 8;
    v8 += 16;
    *(_WORD *)v9 = (107 * *(_BYTE *)(v6 + 1) + ((255 - *(_BYTE *)v6) << 7) + 21 * *(_BYTE *)(v6 + 2) - 32512) >> 8;
    *(_WORD *)(v9 + 2) = (107 * *(_BYTE *)(v6 + 5) + ((255 - *(_BYTE *)(v6 + 4)) << 7) + 21 * *(_BYTE *)(v6 + 6) - 32512) >> 8;
    *(_WORD *)(v9 + 4) = (107 * *(_BYTE *)(v6 + 9) + ((255 - *(_BYTE *)(v6 + 8)) << 7) + 21 * *(_BYTE *)(v6 + 10) - 32512) >> 8;
    *(_WORD *)(v9 + 6) = (107 * *(_BYTE *)(v6 + 13)
                        + ((255 - *(_BYTE *)(v6 + 12)) << 7)
                        + 21 * *(_BYTE *)(v6 + 14)
                        - 32512) >> 8;
    *(_WORD *)(v9 + 8) = (107 * *(_BYTE *)(v6 + 17)
                        + ((255 - *(_BYTE *)(v6 + 16)) << 7)
                        + 21 * *(_BYTE *)(v6 + 18)
                        - 32512) >> 8;
    *(_WORD *)(v9 + 10) = (107 * *(_BYTE *)(v6 + 21)
                         + ((255 - *(_BYTE *)(v6 + 20)) << 7)
                         + 21 * *(_BYTE *)(v6 + 22)
                         - 32512) >> 8;
    *(_WORD *)(v9 + 12) = (107 * *(_BYTE *)(v6 + 25)
                         + ((255 - *(_BYTE *)(v6 + 24)) << 7)
                         + 21 * *(_BYTE *)(v6 + 26)
                         - 32512) >> 8;
    *(_WORD *)(v9 + 14) = (107 * *(_BYTE *)(v6 + 29)
                         + ((255 - *(_BYTE *)(v6 + 28)) << 7)
                         + 21 * *(_BYTE *)(v6 + 30)
                         - 32512) >> 8;
    v9 += 16;
    v6 += a2;
    v12 = __OFSUB__(v13 + 1, 8);
    v11 = v13++ - 7 < 0;
  }
  while ( v11 ^ v12 );
  return result;
}

//----- (0076E640) --------------------------------------------------------
int __cdecl RGBA_FPX_to_YCbCrA_FPX_1111_Full_MCU_M5(int a1, int a2, int a3, int a4, int a5)
{
  int result; // eax@1

  result = a1;
  own_rgba_fpx_to_ycbcra_fpx_1111_full_mcu_m5(a1, a2, a3, a4, a5);
  return result;
}

//----- (0076E690) --------------------------------------------------------
void __cdecl RGBA_FPX_to_YCbCrA_FPX_1111_MCU(struct _JPEG_PROPERTIES *a1, int a2, int a3)
{
  int v3; // edi@1
  signed int v4; // esi@1
  int v5; // ebp@1
  char *v6; // ebx@1
  char *v7; // ecx@1
  int v8; // eax@2
  __int64 v9; // rax@7
  int v10; // eax@7
  void (__cdecl **v11)(char *, int, char *, int, int, int); // [sp+1Ch] [bp-18h]@1

  v3 = 8;
  v4 = 8;
  v5 = a1->DIBLineBytes;
  v6 = a1->MCUBuf;
  v7 = a1->state.DIB_ptr;
  v11 = (void (__cdecl **)(char *, int, char *, int, int, int))a1->state.ctx;
  if ( a1->numxMCUs - 1 == a2 )
  {
    v8 = (((unsigned __int64)a1->DIBWidth >> 32) ^ abs(a1->DIBWidth) & 7) - ((unsigned __int64)a1->DIBWidth >> 32);
    if ( v8 )
      v3 = v8;
    a1->state.DIB_ptr = &a1->DIBBytes[v5 * (8 * a3 + 8)];
  }
  else
  {
    a1->state.DIB_ptr = v7 + 32;
  }
  if ( a3 == a1->numyMCUs - 1 )
  {
    v9 = abs(a1->DIBHeight);
    v10 = (HIDWORD(v9) ^ abs(v9) & 7) - HIDWORD(v9);
    if ( v10 )
      v4 = v10;
  }
  if ( v3 != 8 || v4 != 8 )
    sub_76DE20((int)v7, v5, v3, v4, (int)v6);
  else
    v11[36](v7, v5, v6, (int)(v6 + 128), (int)(v6 + 256), (int)(v6 + 384));
}

//----- (0076E7A0) --------------------------------------------------------
unsigned int __cdecl sub_76E7A0(int a1, int a2, int a3, signed int a4, int a5)
{
  unsigned int result; // eax@1
  signed int v6; // edx@1
  int v7; // ecx@2
  int v8; // esi@2
  int v9; // edi@2
  int v10; // eax@3
  int v11; // ebp@4
  int v12; // ebx@4
  int v13; // esi@4
  int v14; // eax@5
  int v15; // edx@5
  int v16; // ecx@5
  __int16 v17; // di@5
  unsigned int v18; // esi@5
  int v19; // ebp@5
  int v20; // eax@5
  int v21; // ebx@8
  int v22; // edx@8
  int v23; // ecx@14
  int v24; // ebx@14
  int v25; // edi@15
  int v26; // ebp@15
  __int16 v27; // ax@16
  int v28; // ecx@18
  int v29; // edx@18
  int v30; // edi@19
  int v31; // esi@19
  int v32; // ebp@19
  int v33; // ebx@19
  int v34; // eax@20
  char v35; // [sp+1Fh] [bp-82Dh]@1
  unsigned int v36; // [sp+820h] [bp-2Ch]@2
  unsigned int v37; // [sp+824h] [bp-28h]@5
  int v38; // [sp+828h] [bp-24h]@4
  int v39; // [sp+82Ch] [bp-20h]@4
  int v40; // [sp+830h] [bp-1Ch]@4
  int v41; // [sp+834h] [bp-18h]@4
  int v42; // [sp+838h] [bp-14h]@4

  result = (unsigned int)&v35 & 0xFFFFFFE0;
  v6 = 0;
  if ( a4 > 0 )
  {
    v7 = 0;
    v8 = 0;
    v9 = 0;
    v36 = (unsigned int)&v35 & 0xFFFFFFE0;
    do
    {
      v10 = 0;
      if ( a3 > 0 )
      {
        v11 = v7;
        v12 = v8;
        v41 = v7;
        v40 = v8;
        v42 = 0;
        v13 = a1;
        v38 = v9;
        v39 = v6;
        do
        {
          v37 = v11;
          v14 = (signed __int16)(255 - *(_BYTE *)(v11 + v13));
          v15 = (signed __int16)(255 - *(_BYTE *)(v11 + v13 + 1));
          v16 = (signed __int16)(255 - *(_BYTE *)(v11 + v13 + 2));
          v17 = *(_BYTE *)(v11 + v13 + 3) - 128;
          *(_WORD *)(v36 + 2 * v12) = (150 * v15 + 77 * v14 + 29 * v16 - 32640) >> 8;
          v18 = v36;
          *(_WORD *)(v36 + 2 * v12 + 256) = (-85 * v15 + -43 * v14 + (v16 << 7) + 128) >> 8;
          v19 = v37;
          *(_WORD *)(v18 + 2 * v12 + 512) = (-107 * v15 + (v14 << 7) + -21 * v16 + 128) >> 8;
          v11 = v19 + 4;
          v20 = v42;
          *(_WORD *)(v18 + 2 * v12++ + 768) = v17;
          v10 = v20 + 1;
          v42 = v10;
          v13 = a1;
        }
        while ( v10 < a3 );
        v7 = v41;
        v8 = v40;
        v9 = v38;
        v6 = v39;
      }
      if ( v10 < 16 )
      {
        v37 = v36 + v9;
        v21 = v36 + 2 * (v10 + v8);
        v38 = v9;
        v39 = v6;
        v22 = v36 + v9;
        do
        {
          ++v10;
          *(_WORD *)v21 = *(_WORD *)(v22 + 2 * a3 - 2);
          *(_WORD *)(v21 + 256) = *(_WORD *)(v22 + 2 * a3 + 254);
          *(_WORD *)(v21 + 512) = *(_WORD *)(v22 + 2 * a3 + 510);
          *(_WORD *)(v21 + 768) = *(_WORD *)(v22 + 2 * a3 + 766);
          v21 += 2;
        }
        while ( v10 < 16 );
        v9 = v38;
        v6 = v39;
      }
      v7 += a2;
      v8 += 16;
      v9 += 32;
      ++v6;
    }
    while ( v6 < a4 );
    result = v36;
  }
  if ( v6 < 8 )
  {
    v23 = 16 * v6;
    v24 = result + 32 * v6;
    do
    {
      v25 = v24;
      v26 = result + 2 * v23;
      v36 = result;
      do
      {
        *(_WORD *)v26 = *(_WORD *)(v25 - 32);
        *(_WORD *)(v26 + 256) = *(_WORD *)(v25 + 224);
        *(_WORD *)(v26 + 512) = *(_WORD *)(v25 + 480);
        v27 = *(_WORD *)(v25 + 736);
        v25 += 2;
        *(_WORD *)(v26 + 768) = v27;
        v26 += 2;
      }
      while ( v24 + 32 > v25 );
      result = v36;
      v23 += 16;
      v24 += 32;
      ++v6;
    }
    while ( v6 < 8 );
  }
  v28 = 0;
  v29 = 0;
  do
  {
    v30 = a5 + 2 * v28;
    v31 = result + 2 * v29;
    v32 = result + 2 * v29;
    v33 = result + 2 * v29 + 32;
    v37 = v29;
    v36 = result;
    do
    {
      *(_WORD *)v30 = *(_WORD *)v31;
      *(_WORD *)(v30 + 128) = *(_WORD *)(v31 + 16);
      *(_WORD *)(v30 + 256) = (*(_WORD *)(v32 + 256) + (signed int)*(_WORD *)(v32 + 258) + 1) >> 1;
      v34 = (*(_WORD *)(v32 + 512) + (signed int)*(_WORD *)(v32 + 514) + 1) >> 1;
      v32 += 4;
      *(_WORD *)(v30 + 384) = v34;
      *(_WORD *)(v30 + 512) = *(_WORD *)(v31 + 768);
      LOWORD(v34) = *(_WORD *)(v31 + 784);
      v31 += 2;
      *(_WORD *)(v30 + 640) = v34;
      v30 += 2;
    }
    while ( v33 > v32 );
    result = v36;
    v28 += 8;
    v29 = v37 + 16;
  }
  while ( (signed int)(v37 + 16) < 128 );
  return result;
}

//----- (0076EB10) --------------------------------------------------------
int __cdecl RGBA_FPX_to_YCbCrA_FPX_4224_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int v6; // edx@1
  int result; // eax@1
  int v8; // esi@2
  int v9; // ebp@2
  int v10; // ebx@2
  int v11; // esi@2
  int v12; // ebp@2
  int v13; // ebx@2
  int v14; // esi@2
  int v15; // ebp@2
  int v16; // ebx@2
  int v17; // ebp@2
  int v18; // ebx@2
  int v19; // ecx@2
  int v20; // ecx@2
  int v21; // ebx@2
  int v22; // ebp@2
  int v23; // esi@2
  int v24; // ebp@2
  int v25; // ebx@2
  int v26; // ebp@2
  int v27; // ebx@2
  int v28; // ecx@2
  int v29; // esi@2
  int v30; // ebp@2
  int v31; // ebx@2
  signed int v32; // [sp+4h] [bp-20h]@1
  int v33; // [sp+8h] [bp-1Ch]@1
  int v34; // [sp+Ch] [bp-18h]@1
  int v35; // [sp+10h] [bp-14h]@1

  v6 = a1;
  result = a3;
  v32 = 0;
  v33 = a6;
  v34 = a5;
  v35 = a4;
  do
  {
    *(_WORD *)result = (-150 * *(_BYTE *)(v6 + 1) + -77 * *(_BYTE *)v6 + -29 * *(_BYTE *)(v6 + 2) + 32640) >> 8;
    *(_WORD *)(result + 2) = (-150 * *(_BYTE *)(v6 + 5) + -77 * *(_BYTE *)(v6 + 4) + -29 * *(_BYTE *)(v6 + 6) + 32640) >> 8;
    *(_WORD *)(result + 4) = (-150 * *(_BYTE *)(v6 + 9) + -77 * *(_BYTE *)(v6 + 8) + -29 * *(_BYTE *)(v6 + 10) + 32640) >> 8;
    *(_WORD *)(result + 6) = (-150 * *(_BYTE *)(v6 + 13) + -77 * *(_BYTE *)(v6 + 12) + -29 * *(_BYTE *)(v6 + 14) + 32640) >> 8;
    *(_WORD *)(result + 8) = (-150 * *(_BYTE *)(v6 + 17) + -77 * *(_BYTE *)(v6 + 16) + -29 * *(_BYTE *)(v6 + 18) + 32640) >> 8;
    *(_WORD *)(result + 10) = (-150 * *(_BYTE *)(v6 + 21) + -77 * *(_BYTE *)(v6 + 20) + -29 * *(_BYTE *)(v6 + 22) + 32640) >> 8;
    *(_WORD *)(result + 12) = (-150 * *(_BYTE *)(v6 + 25) + -77 * *(_BYTE *)(v6 + 24) + -29 * *(_BYTE *)(v6 + 26) + 32640) >> 8;
    *(_WORD *)(result + 14) = (-150 * *(_BYTE *)(v6 + 29) + -77 * *(_BYTE *)(v6 + 28) + -29 * *(_BYTE *)(v6 + 30) + 32640) >> 8;
    *(_WORD *)(result + 128) = (-150 * *(_BYTE *)(v6 + 33)
                              + -77 * *(_BYTE *)(v6 + 32)
                              + -29 * *(_BYTE *)(v6 + 34)
                              + 32640) >> 8;
    *(_WORD *)(result + 130) = (-150 * *(_BYTE *)(v6 + 37)
                              + -77 * *(_BYTE *)(v6 + 36)
                              + -29 * *(_BYTE *)(v6 + 38)
                              + 32640) >> 8;
    *(_WORD *)(result + 132) = (-150 * *(_BYTE *)(v6 + 41)
                              + -77 * *(_BYTE *)(v6 + 40)
                              + -29 * *(_BYTE *)(v6 + 42)
                              + 32640) >> 8;
    *(_WORD *)(result + 134) = (-150 * *(_BYTE *)(v6 + 45)
                              + -77 * *(_BYTE *)(v6 + 44)
                              + -29 * *(_BYTE *)(v6 + 46)
                              + 32640) >> 8;
    *(_WORD *)(result + 136) = (-150 * *(_BYTE *)(v6 + 49)
                              + -77 * *(_BYTE *)(v6 + 48)
                              + -29 * *(_BYTE *)(v6 + 50)
                              + 32640) >> 8;
    *(_WORD *)(result + 138) = (-150 * *(_BYTE *)(v6 + 53)
                              + -77 * *(_BYTE *)(v6 + 52)
                              + -29 * *(_BYTE *)(v6 + 54)
                              + 32640) >> 8;
    *(_WORD *)(result + 140) = (-150 * *(_BYTE *)(v6 + 57)
                              + -77 * *(_BYTE *)(v6 + 56)
                              + -29 * *(_BYTE *)(v6 + 58)
                              + 32640) >> 8;
    *(_WORD *)(result + 142) = (-150 * *(_BYTE *)(v6 + 61)
                              + -77 * *(_BYTE *)(v6 + 60)
                              + -29 * *(_BYTE *)(v6 + 62)
                              + 32640) >> 8;
    *(_WORD *)v33 = *(_BYTE *)(v6 + 3) - 128;
    *(_WORD *)(v33 + 2) = *(_BYTE *)(v6 + 7) - 128;
    *(_WORD *)(v33 + 4) = *(_BYTE *)(v6 + 11) - 128;
    *(_WORD *)(v33 + 6) = *(_BYTE *)(v6 + 15) - 128;
    *(_WORD *)(v33 + 8) = *(_BYTE *)(v6 + 19) - 128;
    *(_WORD *)(v33 + 10) = *(_BYTE *)(v6 + 23) - 128;
    *(_WORD *)(v33 + 12) = *(_BYTE *)(v6 + 27) - 128;
    *(_WORD *)(v33 + 14) = *(_BYTE *)(v6 + 31) - 128;
    *(_WORD *)(v33 + 128) = *(_BYTE *)(v6 + 35) - 128;
    *(_WORD *)(v33 + 130) = *(_BYTE *)(v6 + 39) - 128;
    *(_WORD *)(v33 + 132) = *(_BYTE *)(v6 + 43) - 128;
    *(_WORD *)(v33 + 134) = *(_BYTE *)(v6 + 47) - 128;
    *(_WORD *)(v33 + 136) = *(_BYTE *)(v6 + 51) - 128;
    *(_WORD *)(v33 + 138) = *(_BYTE *)(v6 + 55) - 128;
    *(_WORD *)(v33 + 140) = *(_BYTE *)(v6 + 59) - 128;
    *(_WORD *)(v33 + 142) = *(_BYTE *)(v6 + 63) - 128;
    v8 = 510 - (*(_BYTE *)(v6 + 4) + *(_BYTE *)v6);
    v9 = 510 - (*(_BYTE *)(v6 + 5) + *(_BYTE *)(v6 + 1));
    v10 = 510 - (*(_BYTE *)(v6 + 6) + *(_BYTE *)(v6 + 2));
    *(_WORD *)v35 = (-85 * v9 + -43 * v8 + ((510 - (*(_BYTE *)(v6 + 6) + *(_BYTE *)(v6 + 2))) << 7) + 256) >> 9;
    *(_WORD *)v34 = (-107 * v9 + (v8 << 7) + -21 * v10 + 256) >> 9;
    v11 = 510 - (*(_BYTE *)(v6 + 12) + *(_BYTE *)(v6 + 8));
    v12 = 510 - (*(_BYTE *)(v6 + 13) + *(_BYTE *)(v6 + 9));
    v13 = 510 - (*(_BYTE *)(v6 + 14) + *(_BYTE *)(v6 + 10));
    *(_WORD *)(v35 + 2) = (-85 * v12 + -43 * v11 + ((510 - (*(_BYTE *)(v6 + 14) + *(_BYTE *)(v6 + 10))) << 7) + 256) >> 9;
    *(_WORD *)(v34 + 2) = (-107 * v12 + (v11 << 7) + -21 * v13 + 256) >> 9;
    v14 = 510 - (*(_BYTE *)(v6 + 20) + *(_BYTE *)(v6 + 16));
    v15 = 510 - (*(_BYTE *)(v6 + 21) + *(_BYTE *)(v6 + 17));
    v16 = 510 - (*(_BYTE *)(v6 + 22) + *(_BYTE *)(v6 + 18));
    *(_WORD *)(v35 + 4) = (-85 * v15 + -43 * v14 + ((510 - (*(_BYTE *)(v6 + 22) + *(_BYTE *)(v6 + 18))) << 7) + 256) >> 9;
    *(_WORD *)(v34 + 4) = (-107 * v15 + (v14 << 7) + -21 * v16 + 256) >> 9;
    v17 = 510 - (*(_BYTE *)(v6 + 28) + *(_BYTE *)(v6 + 24));
    v18 = 510 - (*(_BYTE *)(v6 + 29) + *(_BYTE *)(v6 + 25));
    v19 = 510 - (*(_BYTE *)(v6 + 30) + *(_BYTE *)(v6 + 26));
    *(_WORD *)(v35 + 6) = (-85 * v18 + -43 * v17 + ((510 - (*(_BYTE *)(v6 + 30) + *(_BYTE *)(v6 + 26))) << 7) + 256) >> 9;
    *(_WORD *)(v34 + 6) = (-107 * v18 + (v17 << 7) + -21 * v19 + 256) >> 9;
    v20 = 510 - (*(_BYTE *)(v6 + 36) + *(_BYTE *)(v6 + 32));
    v21 = 510 - (*(_BYTE *)(v6 + 37) + *(_BYTE *)(v6 + 33));
    v22 = 510 - (*(_BYTE *)(v6 + 38) + *(_BYTE *)(v6 + 34));
    *(_WORD *)(v35 + 8) = (-85 * v21 + -43 * v20 + ((510 - (*(_BYTE *)(v6 + 38) + *(_BYTE *)(v6 + 34))) << 7) + 256) >> 9;
    *(_WORD *)(v34 + 8) = (-107 * v21 + (v20 << 7) + -21 * v22 + 256) >> 9;
    v23 = 510 - (*(_BYTE *)(v6 + 44) + *(_BYTE *)(v6 + 40));
    v24 = 510 - (*(_BYTE *)(v6 + 45) + *(_BYTE *)(v6 + 41));
    v25 = 510 - (*(_BYTE *)(v6 + 46) + *(_BYTE *)(v6 + 42));
    *(_WORD *)(v35 + 10) = (-85 * v24 + -43 * v23 + ((510 - (*(_BYTE *)(v6 + 46) + *(_BYTE *)(v6 + 42))) << 7) + 256) >> 9;
    result += 16;
    *(_WORD *)(v34 + 10) = (-107 * v24 + (v23 << 7) + -21 * v25 + 256) >> 9;
    v26 = 510 - (*(_BYTE *)(v6 + 52) + *(_BYTE *)(v6 + 48));
    v27 = 510 - (*(_BYTE *)(v6 + 53) + *(_BYTE *)(v6 + 49));
    v28 = 510 - (*(_BYTE *)(v6 + 54) + *(_BYTE *)(v6 + 50));
    *(_WORD *)(v35 + 12) = (-85 * v27 + -43 * v26 + ((510 - (*(_BYTE *)(v6 + 54) + *(_BYTE *)(v6 + 50))) << 7) + 256) >> 9;
    *(_WORD *)(v34 + 12) = (-107 * v27 + (v26 << 7) + -21 * v28 + 256) >> 9;
    v29 = 510 - (*(_BYTE *)(v6 + 60) + *(_BYTE *)(v6 + 56));
    v30 = 510 - (*(_BYTE *)(v6 + 61) + *(_BYTE *)(v6 + 57));
    v31 = 510 - (*(_BYTE *)(v6 + 62) + *(_BYTE *)(v6 + 58));
    *(_WORD *)(v35 + 14) = (-85 * v30 + -43 * v29 + ((510 - (*(_BYTE *)(v6 + 62) + *(_BYTE *)(v6 + 58))) << 7) + 256) >> 9;
    *(_WORD *)(v34 + 14) = (-107 * v30 + (v29 << 7) + -21 * v31 + 256) >> 9;
    v35 += 16;
    v34 += 16;
    v33 += 16;
    v6 += a2;
    ++v32;
  }
  while ( v32 < 8 );
  return result;
}

//----- (0076F2A0) --------------------------------------------------------
int __cdecl RGBA_FPX_to_YCbCrA_FPX_4224_Full_MCU_M5(int a1, int a2, int a3, int a4, int a5, int a6)
{
  return own_rgba_fpx_to_ycbcra_fpx_4224_full_mcu_m5(a1, a2, a3, a4, a5, a6);
}

//----- (0076F2F0) --------------------------------------------------------
void __cdecl RGBA_FPX_to_YCbCrA_FPX_4224_MCU(struct _JPEG_PROPERTIES *a1, int a2, int a3)
{
  int v3; // edi@1
  signed int v4; // esi@1
  int v5; // ebp@1
  char *v6; // ebx@1
  char *v7; // ecx@1
  int v8; // eax@2
  __int64 v9; // rax@7
  int v10; // eax@7
  void (__cdecl **v11)(char *, int, char *, int, int, int); // [sp+1Ch] [bp-18h]@1

  v3 = 16;
  v4 = 8;
  v5 = a1->DIBLineBytes;
  v6 = a1->MCUBuf;
  v7 = a1->state.DIB_ptr;
  v11 = (void (__cdecl **)(char *, int, char *, int, int, int))a1->state.ctx;
  if ( a1->numxMCUs - 1 == a2 )
  {
    v8 = (((unsigned __int64)a1->DIBWidth >> 32) ^ abs(a1->DIBWidth) & 0xF) - ((unsigned __int64)a1->DIBWidth >> 32);
    if ( v8 )
      v3 = v8;
    a1->state.DIB_ptr = &a1->DIBBytes[v5 * (8 * a3 + 8)];
  }
  else
  {
    a1->state.DIB_ptr = v7 + 64;
  }
  if ( a3 == a1->numyMCUs - 1 )
  {
    v9 = abs(a1->DIBHeight);
    v10 = (HIDWORD(v9) ^ abs(v9) & 7) - HIDWORD(v9);
    if ( v10 )
      v4 = v10;
  }
  if ( v3 != 16 || v4 != 8 )
    sub_76E7A0((int)v7, v5, v3, v4, (int)v6);
  else
    v11[37](v7, v5, v6, (int)(v6 + 256), (int)(v6 + 384), (int)(v6 + 512));
}

//----- (0076F400) --------------------------------------------------------
int __cdecl sub_76F400(int a1, int a2, int a3, signed int a4, int a5)
{
  unsigned int v5; // eax@1
  signed int v6; // edx@1
  int v7; // ecx@2
  int v8; // esi@2
  int v9; // edi@2
  int v10; // eax@3
  int v11; // ebp@4
  int v12; // ebx@4
  int v13; // esi@4
  int v14; // eax@5
  int v15; // edx@5
  int v16; // ecx@5
  __int16 v17; // di@5
  unsigned int v18; // esi@5
  int v19; // ebp@5
  int v20; // eax@5
  int v21; // ebx@8
  int v22; // edx@8
  int v23; // ecx@14
  int v24; // ebx@14
  int v25; // edi@15
  int v26; // ebp@15
  __int16 v27; // ax@16
  int v28; // edx@18
  int v29; // ecx@18
  int v30; // ebx@18
  int v31; // edi@19
  int v32; // esi@19
  int v33; // ebp@19
  int result; // eax@19
  __int16 v35; // cx@20
  char v36; // [sp+1Fh] [bp-82Dh]@1
  unsigned int v37; // [sp+820h] [bp-2Ch]@2
  int v38; // [sp+824h] [bp-28h]@4
  unsigned int v39; // [sp+828h] [bp-24h]@5
  int v40; // [sp+82Ch] [bp-20h]@4
  int v41; // [sp+830h] [bp-1Ch]@4
  int v42; // [sp+834h] [bp-18h]@4
  int v43; // [sp+838h] [bp-14h]@4

  v5 = (unsigned int)&v36 & 0xFFFFFFE0;
  v6 = 0;
  if ( a4 > 0 )
  {
    v7 = 0;
    v8 = 0;
    v9 = 0;
    v37 = (unsigned int)&v36 & 0xFFFFFFE0;
    do
    {
      v10 = 0;
      if ( a3 > 0 )
      {
        v11 = v7;
        v12 = v8;
        v42 = v7;
        v41 = v8;
        v43 = 0;
        v13 = a1;
        v38 = v9;
        v40 = v6;
        do
        {
          v39 = v11;
          v14 = (signed __int16)(255 - *(_BYTE *)(v11 + v13));
          v15 = (signed __int16)(255 - *(_BYTE *)(v11 + v13 + 1));
          v16 = (signed __int16)(255 - *(_BYTE *)(v11 + v13 + 2));
          v17 = *(_BYTE *)(v11 + v13 + 3) - 128;
          *(_WORD *)(v37 + 2 * v12) = (150 * v15 + 77 * v14 + 29 * v16 - 32640) >> 8;
          v18 = v37;
          *(_WORD *)(v37 + 2 * v12 + 512) = (-85 * v15 + -43 * v14 + (v16 << 7) + 128) >> 8;
          v19 = v39;
          *(_WORD *)(v18 + 2 * v12 + 1024) = (-107 * v15 + (v14 << 7) + -21 * v16 + 128) >> 8;
          v11 = v19 + 4;
          v20 = v43;
          *(_WORD *)(v18 + 2 * v12++ + 1536) = v17;
          v10 = v20 + 1;
          v43 = v10;
          v13 = a1;
        }
        while ( v10 < a3 );
        v7 = v42;
        v8 = v41;
        v9 = v38;
        v6 = v40;
      }
      if ( v10 < 16 )
      {
        v39 = v37 + v9;
        v21 = v37 + 2 * (v10 + v8);
        v38 = v9;
        v40 = v6;
        v22 = v37 + v9;
        do
        {
          ++v10;
          *(_WORD *)v21 = *(_WORD *)(v22 + 2 * a3 - 2);
          *(_WORD *)(v21 + 512) = *(_WORD *)(v22 + 2 * a3 + 510);
          *(_WORD *)(v21 + 1024) = *(_WORD *)(v22 + 2 * a3 + 1022);
          *(_WORD *)(v21 + 1536) = *(_WORD *)(v22 + 2 * a3 + 1534);
          v21 += 2;
        }
        while ( v10 < 16 );
        v9 = v38;
        v6 = v40;
      }
      v7 += a2;
      v8 += 16;
      v9 += 32;
      ++v6;
    }
    while ( v6 < a4 );
    v5 = v37;
  }
  if ( v6 < 16 )
  {
    v23 = 16 * v6;
    v24 = v5 + 32 * v6;
    do
    {
      v25 = v24;
      v26 = v5 + 2 * v23;
      v37 = v5;
      do
      {
        *(_WORD *)v26 = *(_WORD *)(v25 - 32);
        *(_WORD *)(v26 + 512) = *(_WORD *)(v25 + 480);
        *(_WORD *)(v26 + 1024) = *(_WORD *)(v25 + 992);
        v27 = *(_WORD *)(v25 + 1504);
        v25 += 2;
        *(_WORD *)(v26 + 1536) = v27;
        v26 += 2;
      }
      while ( v24 + 32 > v25 );
      v5 = v37;
      v23 += 16;
      v24 += 32;
      ++v6;
    }
    while ( v6 < 16 );
  }
  v28 = 0;
  v29 = 0;
  v30 = 0;
  v37 = v5;
  do
  {
    v31 = a5 + 2 * v28;
    v32 = v37 + 2 * v29;
    v33 = v37 + 2 * v30;
    result = v33 + 32;
    v38 = v29;
    v39 = v30;
    do
    {
      *(_WORD *)v31 = *(_WORD *)v32;
      *(_WORD *)(v31 + 128) = *(_WORD *)(v32 + 16);
      *(_WORD *)(v31 + 256) = *(_WORD *)(v32 + 256);
      *(_WORD *)(v31 + 384) = *(_WORD *)(v32 + 272);
      *(_WORD *)(v31 + 512) = (*(_WORD *)(v33 + 544)
                             + *(_WORD *)(v33 + 514)
                             + (signed int)*(_WORD *)(v33 + 512)
                             + *(_WORD *)(v33 + 546)
                             + 2) >> 2;
      *(_WORD *)(v31 + 640) = (*(_WORD *)(v33 + 1056)
                             + *(_WORD *)(v33 + 1026)
                             + (signed int)*(_WORD *)(v33 + 1024)
                             + *(_WORD *)(v33 + 1058)
                             + 2) >> 2;
      v33 += 4;
      *(_WORD *)(v31 + 768) = *(_WORD *)(v32 + 1536);
      *(_WORD *)(v31 + 896) = *(_WORD *)(v32 + 1552);
      *(_WORD *)(v31 + 1024) = *(_WORD *)(v32 + 1792);
      v35 = *(_WORD *)(v32 + 1808);
      v32 += 2;
      *(_WORD *)(v31 + 1152) = v35;
      v31 += 2;
    }
    while ( result > v33 );
    v28 += 8;
    v29 = v38 + 16;
    v30 = v39 + 32;
  }
  while ( (signed int)(v39 + 32) < 256 );
  return result;
}

//----- (0076F7E0) --------------------------------------------------------
int __cdecl sub_76F7E0(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int result; // eax@1
  int v7; // edx@1
  int v8; // ST64_4@2
  int v9; // ST60_4@2
  int v10; // ST5C_4@2
  int v11; // ST58_4@2
  int v12; // ST54_4@2
  int v13; // ST50_4@2
  int v14; // ST4C_4@2
  int v15; // ST48_4@2
  int v16; // ST44_4@2
  int v17; // ST40_4@2
  int v18; // ST3C_4@2
  int v19; // ST38_4@2
  int v20; // ST34_4@2
  int v21; // ST30_4@2
  int v22; // ST2C_4@2
  int v23; // ST28_4@2
  int v24; // ST24_4@2
  int v25; // ST20_4@2
  int v26; // ST1C_4@2
  int v27; // ST18_4@2
  int v28; // ST14_4@2
  int v29; // ST10_4@2
  int v30; // ST0C_4@2
  int v31; // ST08_4@2
  int v32; // eax@2
  int v33; // esi@2
  int v34; // ebp@2
  int v35; // ebx@2
  int v36; // esi@2
  int v37; // ebp@2
  int v38; // ebx@2
  int v39; // esi@2
  int v40; // ebp@2
  int v41; // ebx@2
  int v42; // esi@2
  int v43; // ebp@2
  int v44; // ebx@2
  int v45; // esi@2
  int v46; // ebp@2
  int v47; // ebx@2
  int v48; // ebp@2
  int v49; // ebx@2
  int v50; // ecx@2
  int v51; // ecx@2
  int v52; // ebx@2
  int v53; // ebp@2
  int v54; // esi@2
  int v55; // ebp@2
  int v56; // ebx@2
  bool v57; // sf@2
  unsigned __int8 v58; // of@2
  int v59; // [sp+4h] [bp-80h]@1
  int v60; // [sp+68h] [bp-1Ch]@1
  int v61; // [sp+6Ch] [bp-18h]@1
  int v62; // [sp+70h] [bp-14h]@1

  result = a1;
  v7 = a3;
  v61 = a5;
  v62 = a4;
  v59 = 0;
  v60 = a6;
  do
  {
    *(_WORD *)v7 = (-150 * *(_BYTE *)(result + 1) + -77 * *(_BYTE *)result + -29 * *(_BYTE *)(result + 2) + 32640) >> 8;
    *(_WORD *)(v7 + 2) = (-150 * *(_BYTE *)(result + 5)
                        + -77 * *(_BYTE *)(result + 4)
                        + -29 * *(_BYTE *)(result + 6)
                        + 32640) >> 8;
    *(_WORD *)(v7 + 4) = (-150 * *(_BYTE *)(result + 9)
                        + -77 * *(_BYTE *)(result + 8)
                        + -29 * *(_BYTE *)(result + 10)
                        + 32640) >> 8;
    *(_WORD *)(v7 + 6) = (-150 * *(_BYTE *)(result + 13)
                        + -77 * *(_BYTE *)(result + 12)
                        + -29 * *(_BYTE *)(result + 14)
                        + 32640) >> 8;
    *(_WORD *)(v7 + 8) = (-150 * *(_BYTE *)(result + 17)
                        + -77 * *(_BYTE *)(result + 16)
                        + -29 * *(_BYTE *)(result + 18)
                        + 32640) >> 8;
    *(_WORD *)(v7 + 10) = (-150 * *(_BYTE *)(result + 21)
                         + -77 * *(_BYTE *)(result + 20)
                         + -29 * *(_BYTE *)(result + 22)
                         + 32640) >> 8;
    *(_WORD *)(v7 + 12) = (-150 * *(_BYTE *)(result + 25)
                         + -77 * *(_BYTE *)(result + 24)
                         + -29 * *(_BYTE *)(result + 26)
                         + 32640) >> 8;
    *(_WORD *)(v7 + 14) = (-150 * *(_BYTE *)(result + 29)
                         + -77 * *(_BYTE *)(result + 28)
                         + -29 * *(_BYTE *)(result + 30)
                         + 32640) >> 8;
    *(_WORD *)(v7 + 128) = (-150 * *(_BYTE *)(result + 33)
                          + -77 * *(_BYTE *)(result + 32)
                          + -29 * *(_BYTE *)(result + 34)
                          + 32640) >> 8;
    *(_WORD *)(v7 + 130) = (-150 * *(_BYTE *)(result + 37)
                          + -77 * *(_BYTE *)(result + 36)
                          + -29 * *(_BYTE *)(result + 38)
                          + 32640) >> 8;
    *(_WORD *)(v7 + 132) = (-150 * *(_BYTE *)(result + 41)
                          + -77 * *(_BYTE *)(result + 40)
                          + -29 * *(_BYTE *)(result + 42)
                          + 32640) >> 8;
    *(_WORD *)(v7 + 134) = (-150 * *(_BYTE *)(result + 45)
                          + -77 * *(_BYTE *)(result + 44)
                          + -29 * *(_BYTE *)(result + 46)
                          + 32640) >> 8;
    *(_WORD *)(v7 + 136) = (-150 * *(_BYTE *)(result + 49)
                          + -77 * *(_BYTE *)(result + 48)
                          + -29 * *(_BYTE *)(result + 50)
                          + 32640) >> 8;
    *(_WORD *)(v7 + 138) = (-150 * *(_BYTE *)(result + 53)
                          + -77 * *(_BYTE *)(result + 52)
                          + -29 * *(_BYTE *)(result + 54)
                          + 32640) >> 8;
    *(_WORD *)(v7 + 140) = (-150 * *(_BYTE *)(result + 57)
                          + -77 * *(_BYTE *)(result + 56)
                          + -29 * *(_BYTE *)(result + 58)
                          + 32640) >> 8;
    *(_WORD *)(v7 + 142) = (-150 * *(_BYTE *)(result + 61)
                          + -77 * *(_BYTE *)(result + 60)
                          + -29 * *(_BYTE *)(result + 62)
                          + 32640) >> 8;
    *(_WORD *)v60 = *(_BYTE *)(result + 3) - 128;
    *(_WORD *)(v60 + 2) = *(_BYTE *)(result + 7) - 128;
    *(_WORD *)(v60 + 4) = *(_BYTE *)(result + 11) - 128;
    *(_WORD *)(v60 + 6) = *(_BYTE *)(result + 15) - 128;
    *(_WORD *)(v60 + 8) = *(_BYTE *)(result + 19) - 128;
    *(_WORD *)(v60 + 10) = *(_BYTE *)(result + 23) - 128;
    *(_WORD *)(v60 + 12) = *(_BYTE *)(result + 27) - 128;
    *(_WORD *)(v60 + 14) = *(_BYTE *)(result + 31) - 128;
    *(_WORD *)(v60 + 128) = *(_BYTE *)(result + 35) - 128;
    *(_WORD *)(v60 + 130) = *(_BYTE *)(result + 39) - 128;
    *(_WORD *)(v60 + 132) = *(_BYTE *)(result + 43) - 128;
    *(_WORD *)(v60 + 134) = *(_BYTE *)(result + 47) - 128;
    *(_WORD *)(v60 + 136) = *(_BYTE *)(result + 51) - 128;
    *(_WORD *)(v60 + 138) = *(_BYTE *)(result + 55) - 128;
    *(_WORD *)(v60 + 140) = *(_BYTE *)(result + 59) - 128;
    *(_WORD *)(v60 + 142) = *(_BYTE *)(result + 63) - 128;
    v8 = *(_BYTE *)(result + 4) + *(_BYTE *)result;
    v9 = *(_BYTE *)(result + 5) + *(_BYTE *)(result + 1);
    v10 = *(_BYTE *)(result + 6) + *(_BYTE *)(result + 2);
    v11 = *(_BYTE *)(result + 12) + *(_BYTE *)(result + 8);
    v12 = *(_BYTE *)(result + 13) + *(_BYTE *)(result + 9);
    v13 = *(_BYTE *)(result + 14) + *(_BYTE *)(result + 10);
    v14 = *(_BYTE *)(result + 20) + *(_BYTE *)(result + 16);
    v15 = *(_BYTE *)(result + 21) + *(_BYTE *)(result + 17);
    v16 = *(_BYTE *)(result + 22) + *(_BYTE *)(result + 18);
    v17 = *(_BYTE *)(result + 28) + *(_BYTE *)(result + 24);
    v18 = *(_BYTE *)(result + 29) + *(_BYTE *)(result + 25);
    v19 = *(_BYTE *)(result + 30) + *(_BYTE *)(result + 26);
    v20 = *(_BYTE *)(result + 36) + *(_BYTE *)(result + 32);
    v21 = *(_BYTE *)(result + 37) + *(_BYTE *)(result + 33);
    v22 = *(_BYTE *)(result + 38) + *(_BYTE *)(result + 34);
    v23 = *(_BYTE *)(result + 44) + *(_BYTE *)(result + 40);
    v24 = *(_BYTE *)(result + 45) + *(_BYTE *)(result + 41);
    v25 = *(_BYTE *)(result + 46) + *(_BYTE *)(result + 42);
    v26 = *(_BYTE *)(result + 52) + *(_BYTE *)(result + 48);
    v27 = *(_BYTE *)(result + 53) + *(_BYTE *)(result + 49);
    v28 = *(_BYTE *)(result + 54) + *(_BYTE *)(result + 50);
    v29 = *(_BYTE *)(result + 60) + *(_BYTE *)(result + 56);
    v30 = *(_BYTE *)(result + 61) + *(_BYTE *)(result + 57);
    v31 = *(_BYTE *)(result + 62) + *(_BYTE *)(result + 58);
    v32 = a2 + result;
    *(_WORD *)(v7 + 16) = (-150 * *(_BYTE *)(v32 + 1) + -77 * *(_BYTE *)v32 + -29 * *(_BYTE *)(v32 + 2) + 32640) >> 8;
    *(_WORD *)(v7 + 18) = (-150 * *(_BYTE *)(v32 + 5) + -77 * *(_BYTE *)(v32 + 4) + -29 * *(_BYTE *)(v32 + 6) + 32640) >> 8;
    *(_WORD *)(v7 + 20) = (-150 * *(_BYTE *)(v32 + 9) + -77 * *(_BYTE *)(v32 + 8) + -29 * *(_BYTE *)(v32 + 10) + 32640) >> 8;
    *(_WORD *)(v7 + 22) = (-150 * *(_BYTE *)(v32 + 13) + -77 * *(_BYTE *)(v32 + 12) + -29 * *(_BYTE *)(v32 + 14) + 32640) >> 8;
    *(_WORD *)(v7 + 24) = (-150 * *(_BYTE *)(v32 + 17) + -77 * *(_BYTE *)(v32 + 16) + -29 * *(_BYTE *)(v32 + 18) + 32640) >> 8;
    *(_WORD *)(v7 + 26) = (-150 * *(_BYTE *)(v32 + 21) + -77 * *(_BYTE *)(v32 + 20) + -29 * *(_BYTE *)(v32 + 22) + 32640) >> 8;
    *(_WORD *)(v7 + 28) = (-150 * *(_BYTE *)(v32 + 25) + -77 * *(_BYTE *)(v32 + 24) + -29 * *(_BYTE *)(v32 + 26) + 32640) >> 8;
    *(_WORD *)(v7 + 30) = (-150 * *(_BYTE *)(v32 + 29) + -77 * *(_BYTE *)(v32 + 28) + -29 * *(_BYTE *)(v32 + 30) + 32640) >> 8;
    *(_WORD *)(v7 + 144) = (-150 * *(_BYTE *)(v32 + 33) + -77 * *(_BYTE *)(v32 + 32) + -29 * *(_BYTE *)(v32 + 34) + 32640) >> 8;
    *(_WORD *)(v7 + 146) = (-150 * *(_BYTE *)(v32 + 37) + -77 * *(_BYTE *)(v32 + 36) + -29 * *(_BYTE *)(v32 + 38) + 32640) >> 8;
    *(_WORD *)(v7 + 148) = (-150 * *(_BYTE *)(v32 + 41) + -77 * *(_BYTE *)(v32 + 40) + -29 * *(_BYTE *)(v32 + 42) + 32640) >> 8;
    *(_WORD *)(v7 + 150) = (-150 * *(_BYTE *)(v32 + 45) + -77 * *(_BYTE *)(v32 + 44) + -29 * *(_BYTE *)(v32 + 46) + 32640) >> 8;
    *(_WORD *)(v7 + 152) = (-150 * *(_BYTE *)(v32 + 49) + -77 * *(_BYTE *)(v32 + 48) + -29 * *(_BYTE *)(v32 + 50) + 32640) >> 8;
    *(_WORD *)(v7 + 154) = (-150 * *(_BYTE *)(v32 + 53) + -77 * *(_BYTE *)(v32 + 52) + -29 * *(_BYTE *)(v32 + 54) + 32640) >> 8;
    *(_WORD *)(v7 + 156) = (-150 * *(_BYTE *)(v32 + 57) + -77 * *(_BYTE *)(v32 + 56) + -29 * *(_BYTE *)(v32 + 58) + 32640) >> 8;
    *(_WORD *)(v7 + 158) = (-150 * *(_BYTE *)(v32 + 61) + -77 * *(_BYTE *)(v32 + 60) + -29 * *(_BYTE *)(v32 + 62) + 32640) >> 8;
    *(_WORD *)(v60 + 16) = *(_BYTE *)(v32 + 3) - 128;
    *(_WORD *)(v60 + 18) = *(_BYTE *)(v32 + 7) - 128;
    *(_WORD *)(v60 + 20) = *(_BYTE *)(v32 + 11) - 128;
    *(_WORD *)(v60 + 22) = *(_BYTE *)(v32 + 15) - 128;
    *(_WORD *)(v60 + 24) = *(_BYTE *)(v32 + 19) - 128;
    *(_WORD *)(v60 + 26) = *(_BYTE *)(v32 + 23) - 128;
    *(_WORD *)(v60 + 28) = *(_BYTE *)(v32 + 27) - 128;
    *(_WORD *)(v60 + 30) = *(_BYTE *)(v32 + 31) - 128;
    *(_WORD *)(v60 + 144) = *(_BYTE *)(v32 + 35) - 128;
    *(_WORD *)(v60 + 146) = *(_BYTE *)(v32 + 39) - 128;
    *(_WORD *)(v60 + 148) = *(_BYTE *)(v32 + 43) - 128;
    *(_WORD *)(v60 + 150) = *(_BYTE *)(v32 + 47) - 128;
    *(_WORD *)(v60 + 152) = *(_BYTE *)(v32 + 51) - 128;
    *(_WORD *)(v60 + 154) = *(_BYTE *)(v32 + 55) - 128;
    *(_WORD *)(v60 + 156) = *(_BYTE *)(v32 + 59) - 128;
    *(_WORD *)(v60 + 158) = *(_BYTE *)(v32 + 63) - 128;
    v33 = 1020 - (v8 + *(_BYTE *)(v32 + 4) + *(_BYTE *)v32);
    v34 = 1020 - (v9 + *(_BYTE *)(v32 + 5) + *(_BYTE *)(v32 + 1));
    v35 = 1020 - (v10 + *(_BYTE *)(v32 + 6) + *(_BYTE *)(v32 + 2));
    *(_WORD *)v62 = (-85 * v34 + -43 * v33 + ((1020 - (v10 + *(_BYTE *)(v32 + 6) + *(_BYTE *)(v32 + 2))) << 7) + 512) >> 10;
    *(_WORD *)v61 = (-107 * v34 + (v33 << 7) + -21 * v35 + 512) >> 10;
    v36 = 1020 - (v11 + *(_BYTE *)(v32 + 12) + *(_BYTE *)(v32 + 8));
    v37 = 1020 - (v12 + *(_BYTE *)(v32 + 13) + *(_BYTE *)(v32 + 9));
    v38 = 1020 - (v13 + *(_BYTE *)(v32 + 14) + *(_BYTE *)(v32 + 10));
    *(_WORD *)(v62 + 2) = (-85 * v37
                         + -43 * v36
                         + ((1020 - (v13 + *(_BYTE *)(v32 + 14) + *(_BYTE *)(v32 + 10))) << 7)
                         + 512) >> 10;
    *(_WORD *)(v61 + 2) = (-107 * v37 + (v36 << 7) + -21 * v38 + 512) >> 10;
    v39 = 1020 - (v14 + *(_BYTE *)(v32 + 20) + *(_BYTE *)(v32 + 16));
    v40 = 1020 - (v15 + *(_BYTE *)(v32 + 21) + *(_BYTE *)(v32 + 17));
    v41 = 1020 - (v16 + *(_BYTE *)(v32 + 22) + *(_BYTE *)(v32 + 18));
    *(_WORD *)(v62 + 4) = (-85 * v40
                         + -43 * v39
                         + ((1020 - (v16 + *(_BYTE *)(v32 + 22) + *(_BYTE *)(v32 + 18))) << 7)
                         + 512) >> 10;
    *(_WORD *)(v61 + 4) = (-107 * v40 + (v39 << 7) + -21 * v41 + 512) >> 10;
    v42 = 1020 - (v17 + *(_BYTE *)(v32 + 28) + *(_BYTE *)(v32 + 24));
    v43 = 1020 - (v18 + *(_BYTE *)(v32 + 29) + *(_BYTE *)(v32 + 25));
    v44 = 1020 - (v19 + *(_BYTE *)(v32 + 30) + *(_BYTE *)(v32 + 26));
    *(_WORD *)(v62 + 6) = (-85 * v43
                         + -43 * v42
                         + ((1020 - (v19 + *(_BYTE *)(v32 + 30) + *(_BYTE *)(v32 + 26))) << 7)
                         + 512) >> 10;
    *(_WORD *)(v61 + 6) = (-107 * v43 + (v42 << 7) + -21 * v44 + 512) >> 10;
    v45 = 1020 - (v20 + *(_BYTE *)(v32 + 36) + *(_BYTE *)(v32 + 32));
    v46 = 1020 - (v21 + *(_BYTE *)(v32 + 37) + *(_BYTE *)(v32 + 33));
    v47 = 1020 - (v22 + *(_BYTE *)(v32 + 38) + *(_BYTE *)(v32 + 34));
    *(_WORD *)(v62 + 8) = (-85 * v46
                         + -43 * v45
                         + ((1020 - (v22 + *(_BYTE *)(v32 + 38) + *(_BYTE *)(v32 + 34))) << 7)
                         + 512) >> 10;
    *(_WORD *)(v61 + 8) = (-107 * v46 + (v45 << 7) + -21 * v47 + 512) >> 10;
    v48 = 1020 - (v23 + *(_BYTE *)(v32 + 44) + *(_BYTE *)(v32 + 40));
    v49 = 1020 - (v24 + *(_BYTE *)(v32 + 45) + *(_BYTE *)(v32 + 41));
    v50 = 1020 - (v25 + *(_BYTE *)(v32 + 46) + *(_BYTE *)(v32 + 42));
    *(_WORD *)(v62 + 10) = (-85 * v49
                          + -43 * v48
                          + ((1020 - (v25 + *(_BYTE *)(v32 + 46) + *(_BYTE *)(v32 + 42))) << 7)
                          + 512) >> 10;
    *(_WORD *)(v61 + 10) = (-107 * v49 + (v48 << 7) + -21 * v50 + 512) >> 10;
    v51 = 1020 - (v26 + *(_BYTE *)(v32 + 52) + *(_BYTE *)(v32 + 48));
    v52 = 1020 - (v27 + *(_BYTE *)(v32 + 53) + *(_BYTE *)(v32 + 49));
    v53 = 1020 - (v28 + *(_BYTE *)(v32 + 54) + *(_BYTE *)(v32 + 50));
    *(_WORD *)(v62 + 12) = (-85 * v52
                          + -43 * v51
                          + ((1020 - (v28 + *(_BYTE *)(v32 + 54) + *(_BYTE *)(v32 + 50))) << 7)
                          + 512) >> 10;
    *(_WORD *)(v61 + 12) = (-107 * v52 + (v51 << 7) + -21 * v53 + 512) >> 10;
    v54 = 1020 - (v29 + *(_BYTE *)(v32 + 60) + *(_BYTE *)(v32 + 56));
    v55 = 1020 - (v30 + *(_BYTE *)(v32 + 61) + *(_BYTE *)(v32 + 57));
    v56 = 1020 - (v31 + *(_BYTE *)(v32 + 62) + *(_BYTE *)(v32 + 58));
    *(_WORD *)(v62 + 14) = (-85 * v55
                          + -43 * v54
                          + ((1020 - (v31 + *(_BYTE *)(v32 + 62) + *(_BYTE *)(v32 + 58))) << 7)
                          + 512) >> 10;
    v7 += 32;
    *(_WORD *)(v61 + 14) = (-107 * v55 + (v54 << 7) + -21 * v56 + 512) >> 10;
    v62 += 16;
    v61 += 16;
    result = a2 + v32;
    v60 += 32;
    v58 = __OFSUB__(v59 + 2, 8);
    v57 = v59 - 6 < 0;
    v59 += 2;
  }
  while ( v57 ^ v58 );
  return result;
}

//----- (007704F0) --------------------------------------------------------
int __cdecl RGBA_FPX_to_YCbCrA_FPX_4114_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5, int a6)
{
  sub_76F7E0(a1, a2, a3, a4, a5, a6);
  return sub_76F7E0(a1 + 8 * a2, a2, a3 + 256, a4 + 64, a5 + 64, a6 + 256);
}

//----- (00770570) --------------------------------------------------------
int __cdecl RGBA_FPX_to_YCbCrA_FPX_4114_Full_MCU_M5(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int result; // eax@1

  own_rgba_fpx_to_ycbcra_fpx_4114_one_half_mcu_m5(a1, a2, a3, a4, a5, a6);
  result = a3 + 256;
  own_rgba_fpx_to_ycbcra_fpx_4114_one_half_mcu_m5(a1 + 8 * a2, a2, a3 + 256, a4 + 64, a5 + 64, a6 + 256);
  return result;
}

//----- (007705F0) --------------------------------------------------------
void __cdecl RGBA_FPX_to_YCbCrA_FPX_4114_MCU(struct _JPEG_PROPERTIES *a1, int a2, int a3)
{
  int v3; // edi@1
  signed int v4; // esi@1
  int v5; // ebp@1
  char *v6; // ebx@1
  char *v7; // ecx@1
  int v8; // eax@2
  __int64 v9; // rax@7
  int v10; // eax@7
  void (__cdecl **v11)(char *, int, char *, int, int, int); // [sp+1Ch] [bp-18h]@1

  v3 = 16;
  v4 = 16;
  v5 = a1->DIBLineBytes;
  v6 = a1->MCUBuf;
  v7 = a1->state.DIB_ptr;
  v11 = (void (__cdecl **)(char *, int, char *, int, int, int))a1->state.ctx;
  if ( a1->numxMCUs - 1 == a2 )
  {
    v8 = (((unsigned __int64)a1->DIBWidth >> 32) ^ abs(a1->DIBWidth) & 0xF) - ((unsigned __int64)a1->DIBWidth >> 32);
    if ( v8 )
      v3 = v8;
    a1->state.DIB_ptr = &a1->DIBBytes[v5 * (16 * a3 + 16)];
  }
  else
  {
    a1->state.DIB_ptr = v7 + 64;
  }
  if ( a3 == a1->numyMCUs - 1 )
  {
    v9 = abs(a1->DIBHeight);
    v10 = (HIDWORD(v9) ^ abs(v9) & 0xF) - HIDWORD(v9);
    if ( v10 )
      v4 = v10;
  }
  if ( v3 != 16 || v4 != 16 )
    sub_76F400((int)v7, v5, v3, v4, (int)v6);
  else
    v11[38](v7, v5, v6, (int)(v6 + 512), (int)(v6 + 640), (int)(v6 + 768));
}

//----- (00770700) --------------------------------------------------------
int __cdecl sub_770700(int a1, int a2, signed int a3, int a4, int a5)
{
  int v5; // edx@1
  int result; // eax@1
  int v7; // edi@1
  int v8; // esi@1
  signed int v9; // ebp@1
  int v10; // ecx@2
  signed int v11; // eax@3
  int v12; // esi@4
  int v13; // esi@7

  v5 = a1;
  result = a2;
  v7 = a4;
  v8 = a5;
  v9 = 0;
  if ( a4 > 0 )
  {
    v10 = 0;
    do
    {
      v11 = 0;
      if ( a3 > 0 )
      {
        v12 = v10;
        do
        {
          *(_WORD *)(a5 + 2 * v12) = *(_BYTE *)(v5 + 4 * v11) - 128;
          *(_WORD *)(a5 + 2 * v12 + 128) = *(_BYTE *)(v5 + 4 * v11 + 1) - 128;
          *(_WORD *)(a5 + 2 * v12 + 256) = *(_BYTE *)(v5 + 4 * v11 + 2) - 128;
          *(_WORD *)(a5 + 2 * v12++ + 384) = *(_BYTE *)(v5 + 4 * v11++ + 3) - 128;
        }
        while ( v11 < a3 );
      }
      if ( v11 < 8 )
      {
        v13 = a5 + 2 * (v11 + v10);
        do
        {
          ++v11;
          *(_WORD *)v13 = *(_WORD *)(v13 - 2);
          *(_WORD *)(v13 + 128) = *(_WORD *)(v13 + 126);
          *(_WORD *)(v13 + 256) = *(_WORD *)(v13 + 254);
          *(_WORD *)(v13 + 384) = *(_WORD *)(v13 + 382);
          v13 += 2;
        }
        while ( v11 < 8 );
      }
      v5 += a2;
      v10 += 8;
      ++v9;
      result = a4;
    }
    while ( v9 < a4 );
    v8 = a5;
    v7 = a4;
  }
  if ( v9 < 8 )
  {
    result = v8 + 16 * v9;
    do
    {
      ++v9;
      *(_WORD *)result = *(_WORD *)(v8 + 16 * v7 - 16);
      *(_WORD *)(result + 128) = *(_WORD *)(v8 + 16 * v7 + 112);
      *(_WORD *)(result + 256) = *(_WORD *)(v8 + 16 * v7 + 240);
      *(_WORD *)(result + 384) = *(_WORD *)(v8 + 16 * v7 + 368);
      *(_WORD *)(result + 2) = *(_WORD *)(v8 + 16 * v7 - 14);
      *(_WORD *)(result + 130) = *(_WORD *)(v8 + 16 * v7 + 114);
      *(_WORD *)(result + 258) = *(_WORD *)(v8 + 16 * v7 + 242);
      *(_WORD *)(result + 386) = *(_WORD *)(v8 + 16 * v7 + 370);
      *(_WORD *)(result + 4) = *(_WORD *)(v8 + 16 * v7 - 12);
      *(_WORD *)(result + 132) = *(_WORD *)(v8 + 16 * v7 + 116);
      *(_WORD *)(result + 260) = *(_WORD *)(v8 + 16 * v7 + 244);
      *(_WORD *)(result + 388) = *(_WORD *)(v8 + 16 * v7 + 372);
      *(_WORD *)(result + 6) = *(_WORD *)(v8 + 16 * v7 - 10);
      *(_WORD *)(result + 134) = *(_WORD *)(v8 + 16 * v7 + 118);
      *(_WORD *)(result + 262) = *(_WORD *)(v8 + 16 * v7 + 246);
      *(_WORD *)(result + 390) = *(_WORD *)(v8 + 16 * v7 + 374);
      *(_WORD *)(result + 8) = *(_WORD *)(v8 + 16 * v7 - 8);
      *(_WORD *)(result + 136) = *(_WORD *)(v8 + 16 * v7 + 120);
      *(_WORD *)(result + 264) = *(_WORD *)(v8 + 16 * v7 + 248);
      *(_WORD *)(result + 392) = *(_WORD *)(v8 + 16 * v7 + 376);
      *(_WORD *)(result + 10) = *(_WORD *)(v8 + 16 * v7 - 6);
      *(_WORD *)(result + 138) = *(_WORD *)(v8 + 16 * v7 + 122);
      *(_WORD *)(result + 266) = *(_WORD *)(v8 + 16 * v7 + 250);
      *(_WORD *)(result + 394) = *(_WORD *)(v8 + 16 * v7 + 378);
      *(_WORD *)(result + 12) = *(_WORD *)(v8 + 16 * v7 - 4);
      *(_WORD *)(result + 140) = *(_WORD *)(v8 + 16 * v7 + 124);
      *(_WORD *)(result + 268) = *(_WORD *)(v8 + 16 * v7 + 252);
      *(_WORD *)(result + 396) = *(_WORD *)(v8 + 16 * v7 + 380);
      *(_WORD *)(result + 14) = *(_WORD *)(v8 + 16 * v7 - 2);
      *(_WORD *)(result + 142) = *(_WORD *)(v8 + 16 * v7 + 126);
      *(_WORD *)(result + 270) = *(_WORD *)(v8 + 16 * v7 + 254);
      *(_WORD *)(result + 398) = *(_WORD *)(v8 + 16 * v7 + 382);
      result += 16;
    }
    while ( v9 < 8 );
  }
  return result;
}

//----- (007709C0) --------------------------------------------------------
int __cdecl OTHER_to_OTHER_1111_Full_MCU(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int v6; // ebp@1
  int v7; // ebx@1
  int v8; // edx@2
  int result; // eax@2
  int v10; // [sp+8h] [bp-1Ch]@2

  v6 = a1;
  v7 = 0;
  do
  {
    v8 = v7;
    result = v6;
    v10 = v7;
    do
    {
      *(_WORD *)(a3 + 2 * v8) = *(_BYTE *)result - 128;
      *(_WORD *)(a4 + 2 * v8) = *(_BYTE *)(result + 1) - 128;
      *(_WORD *)(a5 + 2 * v8) = *(_BYTE *)(result + 2) - 128;
      *(_WORD *)(a6 + 2 * v8++) = *(_BYTE *)(result + 3) - 128;
      result += 4;
    }
    while ( v6 + 32 > result );
    v6 += a2;
    v7 += 8;
  }
  while ( v10 + 8 < 64 );
  return result;
}

//----- (00770A60) --------------------------------------------------------
void __cdecl OTHER_to_OTHER_1111_MCU(struct _JPEG_PROPERTIES *a1, int a2, int a3)
{
  signed int v3; // edi@1
  int v4; // esi@1
  int v5; // ebp@1
  char *v6; // ebx@1
  char *v7; // ecx@1
  signed int v8; // eax@2
  __int64 v9; // rax@7
  int v10; // eax@7
  void (__cdecl **v11)(char *, int, char *, int, int, int); // [sp+1Ch] [bp-18h]@1

  v3 = 8;
  v4 = 8;
  v5 = a1->DIBLineBytes;
  v6 = a1->MCUBuf;
  v7 = a1->state.DIB_ptr;
  v11 = (void (__cdecl **)(char *, int, char *, int, int, int))a1->state.ctx;
  if ( a1->numxMCUs - 1 == a2 )
  {
    v8 = (((unsigned __int64)a1->DIBWidth >> 32) ^ abs(a1->DIBWidth) & 7) - ((unsigned __int64)a1->DIBWidth >> 32);
    if ( v8 )
      v3 = v8;
    a1->state.DIB_ptr = &a1->DIBBytes[v5 * (8 * a3 + 8)];
  }
  else
  {
    a1->state.DIB_ptr = v7 + 32;
  }
  if ( a3 == a1->numyMCUs - 1 )
  {
    v9 = abs(a1->DIBHeight);
    v10 = (HIDWORD(v9) ^ abs(v9) & 7) - HIDWORD(v9);
    if ( v10 )
      v4 = v10;
  }
  if ( v3 != 8 || v4 != 8 )
    sub_770700((int)v7, v5, v3, v4, (int)v6);
  else
    v11[39](v7, v5, v6, (int)(v6 + 128), (int)(v6 + 256), (int)(v6 + 384));
}

//----- (00770B70) --------------------------------------------------------
signed int __cdecl sub_770B70(int a1, int a2, signed int a3, signed int a4, int a5)
{
  int v5; // ebp@1
  signed int result; // eax@1
  int v7; // edx@2
  int v8; // ecx@2
  signed int v9; // ebx@3
  int v10; // esi@4
  int v11; // ebp@4
  int v12; // esi@6
  int v13; // edi@6
  int v14; // edi@8
  int v15; // ebp@8
  int v16; // ebp@10
  int v17; // ecx@14
  int v18; // edx@14

  v5 = a1;
  result = 0;
  if ( a4 > 0 )
  {
    v7 = 0;
    v8 = 0;
    do
    {
      v9 = 0;
      if ( a3 > 0 )
      {
        v10 = v7;
        v11 = v8;
        do
        {
          ++v9;
          *(_WORD *)(a5 + 2 * v11) = *(_BYTE *)(v10 + a1) - 128;
          *(_WORD *)(a5 + 2 * v11 + 128) = *(_BYTE *)(v10 + a1 + 1) - 128;
          *(_WORD *)(a5 + 2 * v11 + 256) = *(_BYTE *)(v10 + a1 + 2) - 128;
          v10 += 3;
          ++v11;
        }
        while ( v9 < a3 );
      }
      v12 = v7 + 3 * v9;
      v13 = v7 + 3 * v9 - 3;
      if ( v9 < 8 )
      {
        if ( 8 - v9 < 4 )
        {
          v14 = a1 + v13;
        }
        else
        {
          v14 = a1 + v13;
          v15 = v9 + v8;
          do
          {
            v9 += 3;
            *(_WORD *)(a5 + 2 * v15) = *(_BYTE *)(v12 + a1 - 3) - 128;
            *(_WORD *)(a5 + 2 * v15 + 128) = *(_BYTE *)(v12 + a1 - 2) - 128;
            *(_WORD *)(a5 + 2 * v15 + 256) = *(_BYTE *)(v12 + a1 - 1) - 128;
            *(_WORD *)(a5 + 2 * v15 + 2) = *(_BYTE *)(v12 + a1 - 3) - 128;
            *(_WORD *)(a5 + 2 * v15 + 130) = *(_BYTE *)(v12 + a1 - 2) - 128;
            *(_WORD *)(a5 + 2 * v15 + 258) = *(_BYTE *)(v12 + a1 - 1) - 128;
            *(_WORD *)(a5 + 2 * v15 + 4) = *(_BYTE *)(v12 + a1 - 3) - 128;
            *(_WORD *)(a5 + 2 * v15 + 132) = *(_BYTE *)(v12 + a1 - 2) - 128;
            *(_WORD *)(a5 + 2 * v15 + 260) = *(_BYTE *)(v12 + a1 - 1) - 128;
            v15 += 3;
          }
          while ( v9 < 4 );
        }
        v16 = a5 + 2 * (v9 + v8);
        do
        {
          ++v9;
          *(_WORD *)v16 = *(_BYTE *)v14 - 128;
          *(_WORD *)(v16 + 128) = *(_BYTE *)(v14 + 1) - 128;
          *(_WORD *)(v16 + 256) = *(_BYTE *)(v14 + 2) - 128;
          v16 += 2;
        }
        while ( v9 < 8 );
      }
      v7 += a2;
      v8 += 8;
      ++result;
    }
    while ( result < a4 );
    v5 = a1;
  }
  v17 = 8 * result;
  v18 = 8 * result - 8;
  if ( result < 8 )
  {
    while ( 1 )
    {
      ++result;
      *(_WORD *)(a5 + 2 * v17) = *(_BYTE *)(v18 + v5) - 128;
      *(_WORD *)(a5 + 2 * v17 + 128) = *(_BYTE *)(v18 + v5 + 1) - 128;
      *(_WORD *)(a5 + 2 * v17 + 256) = *(_BYTE *)(v18 + v5 + 2) - 128;
      *(_WORD *)(a5 + 2 * v17 + 2) = *(_BYTE *)(v18 + v5 + 3) - 128;
      *(_WORD *)(a5 + 2 * v17 + 130) = *(_BYTE *)(v18 + v5 + 4) - 128;
      *(_WORD *)(a5 + 2 * v17 + 258) = *(_BYTE *)(v18 + v5 + 5) - 128;
      *(_WORD *)(a5 + 2 * v17 + 4) = *(_BYTE *)(v18 + v5 + 6) - 128;
      *(_WORD *)(a5 + 2 * v17 + 132) = *(_BYTE *)(v18 + v5 + 7) - 128;
      *(_WORD *)(a5 + 2 * v17 + 260) = *(_BYTE *)(v18 + v5 + 8) - 128;
      *(_WORD *)(a5 + 2 * v17 + 6) = *(_BYTE *)(v18 + v5 + 9) - 128;
      *(_WORD *)(a5 + 2 * v17 + 134) = *(_BYTE *)(v18 + v5 + 10) - 128;
      *(_WORD *)(a5 + 2 * v17 + 262) = *(_BYTE *)(v18 + v5 + 11) - 128;
      *(_WORD *)(a5 + 2 * v17 + 8) = *(_BYTE *)(v18 + v5 + 12) - 128;
      *(_WORD *)(a5 + 2 * v17 + 136) = *(_BYTE *)(v18 + v5 + 13) - 128;
      *(_WORD *)(a5 + 2 * v17 + 264) = *(_BYTE *)(v18 + v5 + 14) - 128;
      *(_WORD *)(a5 + 2 * v17 + 10) = *(_BYTE *)(v18 + v5 + 15) - 128;
      *(_WORD *)(a5 + 2 * v17 + 138) = *(_BYTE *)(v18 + v5 + 16) - 128;
      *(_WORD *)(a5 + 2 * v17 + 266) = *(_BYTE *)(v18 + v5 + 17) - 128;
      *(_WORD *)(a5 + 2 * v17 + 12) = *(_BYTE *)(v18 + v5 + 18) - 128;
      *(_WORD *)(a5 + 2 * v17 + 140) = *(_BYTE *)(v18 + v5 + 19) - 128;
      *(_WORD *)(a5 + 2 * v17 + 268) = *(_BYTE *)(v18 + v5 + 20) - 128;
      *(_WORD *)(a5 + 2 * v17 + 14) = *(_BYTE *)(v18 + v5 + 21) - 128;
      *(_WORD *)(a5 + 2 * v17 + 142) = *(_BYTE *)(v18 + v5 + 22) - 128;
      *(_WORD *)(a5 + 2 * v17 + 270) = *(_BYTE *)(v18 + v5 + 23) - 128;
      if ( result >= 8 )
        break;
      v17 = 8 * result;
    }
  }
  return result;
}

//----- (00770F00) --------------------------------------------------------
int __cdecl OTHER_to_OTHER_111_Full_MCU(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // edi@1
  int v6; // esi@1
  int v7; // ebx@1
  int v8; // ecx@1
  signed int v9; // edx@1
  int result; // eax@2

  v5 = a1;
  v6 = a3;
  v7 = a4;
  v8 = a5;
  v9 = 0;
  do
  {
    ++v9;
    *(_WORD *)v6 = *(_BYTE *)v5 - 128;
    *(_WORD *)v7 = *(_BYTE *)(v5 + 1) - 128;
    result = v8 + 2;
    *(_WORD *)v8 = *(_BYTE *)(v5 + 2) - 128;
    *(_WORD *)(v6 + 2) = *(_BYTE *)(v5 + 3) - 128;
    *(_WORD *)(v7 + 2) = *(_BYTE *)(v5 + 4) - 128;
    *(_WORD *)(v8 + 2) = *(_BYTE *)(v5 + 5) - 128;
    *(_WORD *)(v6 + 4) = *(_BYTE *)(v5 + 6) - 128;
    *(_WORD *)(v7 + 4) = *(_BYTE *)(v5 + 7) - 128;
    *(_WORD *)(v8 + 4) = *(_BYTE *)(v5 + 8) - 128;
    *(_WORD *)(v6 + 6) = *(_BYTE *)(v5 + 9) - 128;
    *(_WORD *)(v7 + 6) = *(_BYTE *)(v5 + 10) - 128;
    *(_WORD *)(v8 + 6) = *(_BYTE *)(v5 + 11) - 128;
    *(_WORD *)(v6 + 8) = *(_BYTE *)(v5 + 12) - 128;
    *(_WORD *)(v7 + 8) = *(_BYTE *)(v5 + 13) - 128;
    *(_WORD *)(v8 + 8) = *(_BYTE *)(v5 + 14) - 128;
    *(_WORD *)(v6 + 10) = *(_BYTE *)(v5 + 15) - 128;
    *(_WORD *)(v7 + 10) = *(_BYTE *)(v5 + 16) - 128;
    *(_WORD *)(v8 + 10) = *(_BYTE *)(v5 + 17) - 128;
    *(_WORD *)(v6 + 12) = *(_BYTE *)(v5 + 18) - 128;
    *(_WORD *)(v7 + 12) = *(_BYTE *)(v5 + 19) - 128;
    *(_WORD *)(v8 + 12) = *(_BYTE *)(v5 + 20) - 128;
    *(_WORD *)(v6 + 14) = *(_BYTE *)(v5 + 21) - 128;
    *(_WORD *)(v7 + 14) = *(_BYTE *)(v5 + 22) - 128;
    v8 += 16;
    v6 += 16;
    v7 += 16;
    *(_WORD *)(result + 12) = *(_BYTE *)(v5 + 23) - 128;
    v5 += a2;
  }
  while ( v9 < 8 );
  return result;
}

//----- (00771050) --------------------------------------------------------
void __cdecl OTHER_to_OTHER_111_MCU(struct _JPEG_PROPERTIES *a1, int a2, int a3)
{
  signed int v3; // edi@1
  signed int v4; // esi@1
  int v5; // ebp@1
  char *v6; // ebx@1
  char *v7; // ecx@1
  signed int v8; // eax@2
  __int64 v9; // rax@7
  int v10; // eax@7
  void (__cdecl **v11)(char *, int, char *, int, int); // [sp+1Ch] [bp-18h]@1

  v3 = 8;
  v4 = 8;
  v5 = a1->DIBLineBytes;
  v6 = a1->MCUBuf;
  v7 = a1->state.DIB_ptr;
  v11 = (void (__cdecl **)(char *, int, char *, int, int))a1->state.ctx;
  if ( a1->numxMCUs - 1 == a2 )
  {
    v8 = (((unsigned __int64)a1->DIBWidth >> 32) ^ abs(a1->DIBWidth) & 7) - ((unsigned __int64)a1->DIBWidth >> 32);
    if ( v8 )
      v3 = v8;
    a1->state.DIB_ptr = &a1->DIBBytes[v5 * (8 * a3 + 8)];
  }
  else
  {
    a1->state.DIB_ptr = v7 + 24;
  }
  if ( a3 == a1->numyMCUs - 1 )
  {
    v9 = abs(a1->DIBHeight);
    v10 = (HIDWORD(v9) ^ abs(v9) & 7) - HIDWORD(v9);
    if ( v10 )
      v4 = v10;
  }
  if ( v3 != 8 || v4 != 8 )
    sub_770B70((int)v7, v5, v3, v4, (int)v6);
  else
    v11[32](v7, v5, v6, (int)(v6 + 128), (int)(v6 + 256));
}

//----- (00771160) --------------------------------------------------------
int __cdecl sub_771160(int a1, int a2, signed int a3, signed int a4, int a5)
{
  unsigned int v5; // eax@1
  signed int v6; // edx@1
  int v7; // ecx@2
  int v8; // ebx@2
  int v9; // ebp@2
  signed int v10; // eax@3
  int v11; // edi@4
  int v12; // esi@4
  unsigned int v13; // edx@4
  __int16 v14; // bp@5
  int v15; // esi@8
  int v16; // edx@8
  int v17; // ecx@14
  __int16 v18; // di@15
  __int16 v19; // si@15
  __int16 v20; // bp@15
  __int16 v21; // bx@15
  int v22; // edx@16
  int v23; // ecx@16
  int v24; // ebx@16
  int v25; // edi@17
  int v26; // esi@17
  int v27; // ebp@17
  int result; // eax@17
  int v29; // ecx@18
  char v30; // [sp+1Fh] [bp-62Dh]@1
  int v31; // [sp+620h] [bp-2Ch]@4
  int v32; // [sp+624h] [bp-28h]@8
  unsigned int v33; // [sp+628h] [bp-24h]@2
  int v34; // [sp+62Ch] [bp-20h]@4
  int v35; // [sp+630h] [bp-1Ch]@4
  int v36; // [sp+634h] [bp-18h]@4

  v5 = (unsigned int)&v30 & 0xFFFFFFE0;
  v6 = 0;
  if ( a4 > 0 )
  {
    v7 = 0;
    v8 = 0;
    v9 = 0;
    v33 = (unsigned int)&v30 & 0xFFFFFFE0;
    do
    {
      v10 = 0;
      if ( a3 > 0 )
      {
        v11 = v7;
        v12 = v8;
        v36 = v7;
        v35 = v8;
        v31 = v9;
        v34 = v6;
        v13 = v33;
        do
        {
          ++v10;
          *(_WORD *)(v13 + 2 * v12) = *(_BYTE *)(v11 + a1);
          *(_WORD *)(v13 + 2 * v12 + 512) = *(_BYTE *)(v11 + a1 + 1);
          v14 = *(_BYTE *)(v11 + a1 + 2);
          v11 += 3;
          *(_WORD *)(v13 + 2 * v12++ + 1024) = v14;
        }
        while ( v10 < a3 );
        v7 = v36;
        v8 = v35;
        v9 = v31;
        v6 = v34;
      }
      if ( v10 < 16 )
      {
        v32 = v33 + v9;
        v15 = v33 + 2 * (v10 + v8);
        v31 = v9;
        v34 = v6;
        v16 = v33 + v9;
        do
        {
          ++v10;
          *(_WORD *)v15 = *(_WORD *)(v16 + 2 * a3 - 2);
          *(_WORD *)(v15 + 512) = *(_WORD *)(v16 + 2 * a3 + 510);
          *(_WORD *)(v15 + 1024) = *(_WORD *)(v16 + 2 * a3 + 1022);
          v15 += 2;
        }
        while ( v10 < 16 );
        v9 = v31;
        v6 = v34;
      }
      v7 += a2;
      v8 += 16;
      v9 += 32;
      ++v6;
    }
    while ( v6 < a4 );
    v5 = v33;
  }
  if ( v6 < 16 )
  {
    v17 = v5 + 32 * v6;
    do
    {
      v18 = *(_WORD *)(v17 + 1020);
      v19 = *(_WORD *)(v17 - 2);
      *(_WORD *)v17 = *(_WORD *)(v17 - 32);
      v20 = *(_WORD *)(v17 + 510);
      *(_WORD *)(v17 + 512) = *(_WORD *)(v17 + 480);
      ++v6;
      *(_WORD *)(v17 + 1024) = *(_WORD *)(v17 + 992);
      *(_WORD *)(v17 + 2) = *(_WORD *)(v17 - 30);
      *(_WORD *)(v17 + 514) = *(_WORD *)(v17 + 482);
      *(_WORD *)(v17 + 1026) = *(_WORD *)(v17 + 994);
      *(_WORD *)(v17 + 4) = *(_WORD *)(v17 - 28);
      *(_WORD *)(v17 + 516) = *(_WORD *)(v17 + 484);
      *(_WORD *)(v17 + 1028) = *(_WORD *)(v17 + 996);
      *(_WORD *)(v17 + 6) = *(_WORD *)(v17 - 26);
      *(_WORD *)(v17 + 518) = *(_WORD *)(v17 + 486);
      *(_WORD *)(v17 + 1030) = *(_WORD *)(v17 + 998);
      *(_WORD *)(v17 + 8) = *(_WORD *)(v17 - 24);
      *(_WORD *)(v17 + 520) = *(_WORD *)(v17 + 488);
      *(_WORD *)(v17 + 1032) = *(_WORD *)(v17 + 1000);
      *(_WORD *)(v17 + 10) = *(_WORD *)(v17 - 22);
      *(_WORD *)(v17 + 522) = *(_WORD *)(v17 + 490);
      *(_WORD *)(v17 + 1034) = *(_WORD *)(v17 + 1002);
      *(_WORD *)(v17 + 12) = *(_WORD *)(v17 - 20);
      *(_WORD *)(v17 + 524) = *(_WORD *)(v17 + 492);
      *(_WORD *)(v17 + 1036) = *(_WORD *)(v17 + 1004);
      *(_WORD *)(v17 + 14) = *(_WORD *)(v17 - 18);
      *(_WORD *)(v17 + 526) = *(_WORD *)(v17 + 494);
      *(_WORD *)(v17 + 1038) = *(_WORD *)(v17 + 1006);
      *(_WORD *)(v17 + 16) = *(_WORD *)(v17 - 16);
      *(_WORD *)(v17 + 528) = *(_WORD *)(v17 + 496);
      *(_WORD *)(v17 + 1040) = *(_WORD *)(v17 + 1008);
      *(_WORD *)(v17 + 18) = *(_WORD *)(v17 - 14);
      *(_WORD *)(v17 + 530) = *(_WORD *)(v17 + 498);
      *(_WORD *)(v17 + 1042) = *(_WORD *)(v17 + 1010);
      *(_WORD *)(v17 + 20) = *(_WORD *)(v17 - 12);
      *(_WORD *)(v17 + 532) = *(_WORD *)(v17 + 500);
      *(_WORD *)(v17 + 1044) = *(_WORD *)(v17 + 1012);
      *(_WORD *)(v17 + 22) = *(_WORD *)(v17 - 10);
      *(_WORD *)(v17 + 534) = *(_WORD *)(v17 + 502);
      *(_WORD *)(v17 + 1046) = *(_WORD *)(v17 + 1014);
      *(_WORD *)(v17 + 24) = *(_WORD *)(v17 - 8);
      *(_WORD *)(v17 + 536) = *(_WORD *)(v17 + 504);
      *(_WORD *)(v17 + 1048) = *(_WORD *)(v17 + 1016);
      *(_WORD *)(v17 + 26) = *(_WORD *)(v17 - 6);
      *(_WORD *)(v17 + 538) = *(_WORD *)(v17 + 506);
      *(_WORD *)(v17 + 1050) = *(_WORD *)(v17 + 1018);
      *(_WORD *)(v17 + 28) = *(_WORD *)(v17 - 4);
      *(_WORD *)(v17 + 540) = *(_WORD *)(v17 + 508);
      v21 = *(_WORD *)(v17 + 1022);
      *(_WORD *)(v17 + 1052) = v18;
      *(_WORD *)(v17 + 30) = v19;
      *(_WORD *)(v17 + 542) = v20;
      *(_WORD *)(v17 + 1054) = v21;
      v17 += 32;
    }
    while ( v6 < 16 );
  }
  v22 = 0;
  v23 = 0;
  v24 = 0;
  v33 = v5;
  do
  {
    v25 = a5 + 2 * v22;
    v26 = v33 + 2 * v23;
    v27 = v33 + 2 * v24;
    result = v27 + 32;
    v31 = v23;
    v32 = v24;
    do
    {
      *(_WORD *)v25 = *(_WORD *)v26 - 128;
      *(_WORD *)(v25 + 128) = *(_WORD *)(v26 + 16) - 128;
      *(_WORD *)(v25 + 256) = *(_WORD *)(v26 + 256) - 128;
      *(_WORD *)(v25 + 384) = *(_WORD *)(v26 + 272) - 128;
      v26 += 2;
      *(_WORD *)(v25 + 512) = ((*(_WORD *)(v27 + 544)
                              + *(_WORD *)(v27 + 514)
                              + (signed int)*(_WORD *)(v27 + 512)
                              + *(_WORD *)(v27 + 546)
                              + 2) >> 2)
                            - 128;
      v29 = ((*(_WORD *)(v27 + 1056)
            + *(_WORD *)(v27 + 1026)
            + (signed int)*(_WORD *)(v27 + 1024)
            + *(_WORD *)(v27 + 1058)
            + 2) >> 2)
          - 128;
      v27 += 4;
      *(_WORD *)(v25 + 640) = v29;
      v25 += 2;
    }
    while ( result > v27 );
    v22 += 8;
    v23 = v31 + 16;
    v24 = v32 + 32;
  }
  while ( v32 + 32 < 256 );
  return result;
}

//----- (00771650) --------------------------------------------------------
int __cdecl sub_771650(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // edi@1
  int v6; // ecx@1
  int v7; // esi@1
  int result; // eax@1
  int v9; // ST08_4@2
  int v10; // ST0C_4@2
  int v11; // eax@2
  int v12; // edx@2
  int v13; // ST10_4@2
  int v14; // ST14_4@2
  int v15; // ST18_4@2
  int v16; // ST1C_4@2
  int v17; // ST20_4@2
  int v18; // ST24_4@2
  int v19; // ST28_4@2
  int v20; // ST2C_4@2
  int v21; // ST30_4@2
  int v22; // ST34_4@2
  int v23; // ST38_4@2
  int v24; // ST3C_4@2
  int v25; // ST40_4@2
  int v26; // ST44_4@2
  int v27; // edi@2
  int v28; // ST4C_4@2
  int v29; // ST50_4@2
  int v30; // ST54_4@2
  int v31; // ST58_4@2
  int v32; // ST5C_4@2
  int v33; // ST60_4@2
  int v34; // ST64_4@2
  int v35; // ST68_4@2
  int v36; // ST6C_4@2
  int v37; // ST70_4@2
  int v38; // ST74_4@2
  int v39; // ST78_4@2
  int v40; // ST7C_4@2
  int v41; // ecx@2
  int v42; // ebx@2
  signed int v43; // [sp+4h] [bp-90h]@1

  v5 = a1;
  v6 = a3;
  v7 = a4;
  result = a5;
  v43 = 0;
  do
  {
    v9 = v6;
    v10 = result;
    *(_WORD *)v6 = *(_BYTE *)v5 - 128;
    *(_WORD *)(v6 + 2) = *(_BYTE *)(v5 + 3) - 128;
    *(_WORD *)(v6 + 4) = *(_BYTE *)(v5 + 6) - 128;
    *(_WORD *)(v6 + 6) = *(_BYTE *)(v5 + 9) - 128;
    *(_WORD *)(v6 + 8) = *(_BYTE *)(v5 + 12) - 128;
    *(_WORD *)(v6 + 10) = *(_BYTE *)(v5 + 15) - 128;
    *(_WORD *)(v6 + 12) = *(_BYTE *)(v5 + 18) - 128;
    *(_WORD *)(v6 + 14) = *(_BYTE *)(v5 + 21) - 128;
    *(_WORD *)(v6 + 128) = *(_BYTE *)(v5 + 24) - 128;
    *(_WORD *)(v6 + 130) = *(_BYTE *)(v5 + 27) - 128;
    *(_WORD *)(v6 + 132) = *(_BYTE *)(v5 + 30) - 128;
    *(_WORD *)(v6 + 134) = *(_BYTE *)(v5 + 33) - 128;
    *(_WORD *)(v6 + 136) = *(_BYTE *)(v5 + 36) - 128;
    *(_WORD *)(v6 + 138) = *(_BYTE *)(v5 + 39) - 128;
    *(_WORD *)(v6 + 140) = *(_BYTE *)(v5 + 42) - 128;
    *(_WORD *)(v6 + 142) = *(_BYTE *)(v5 + 45) - 128;
    v11 = *(_BYTE *)(v5 + 4) + *(_BYTE *)(v5 + 1);
    v12 = *(_BYTE *)(v5 + 10) + *(_BYTE *)(v5 + 7);
    v13 = *(_BYTE *)(v5 + 16) + *(_BYTE *)(v5 + 13);
    v14 = *(_BYTE *)(v5 + 22) + *(_BYTE *)(v5 + 19);
    v15 = *(_BYTE *)(v5 + 28) + *(_BYTE *)(v5 + 25);
    v16 = *(_BYTE *)(v5 + 34) + *(_BYTE *)(v5 + 31);
    v17 = *(_BYTE *)(v5 + 40) + *(_BYTE *)(v5 + 37);
    v18 = *(_BYTE *)(v5 + 46) + *(_BYTE *)(v5 + 43);
    v19 = *(_BYTE *)(v5 + 5) + *(_BYTE *)(v5 + 2);
    v20 = *(_BYTE *)(v5 + 11) + *(_BYTE *)(v5 + 8);
    v21 = *(_BYTE *)(v5 + 17) + *(_BYTE *)(v5 + 14);
    v22 = *(_BYTE *)(v5 + 23) + *(_BYTE *)(v5 + 20);
    v23 = *(_BYTE *)(v5 + 29) + *(_BYTE *)(v5 + 26);
    v24 = *(_BYTE *)(v5 + 35) + *(_BYTE *)(v5 + 32);
    v25 = *(_BYTE *)(v5 + 41) + *(_BYTE *)(v5 + 38);
    v26 = *(_BYTE *)(v5 + 47) + *(_BYTE *)(v5 + 44);
    v27 = a2 + v5;
    *(_WORD *)(v6 + 16) = *(_BYTE *)v27 - 128;
    *(_WORD *)(v6 + 18) = *(_BYTE *)(v27 + 3) - 128;
    *(_WORD *)(v6 + 20) = *(_BYTE *)(v27 + 6) - 128;
    *(_WORD *)(v6 + 22) = *(_BYTE *)(v27 + 9) - 128;
    *(_WORD *)(v6 + 24) = *(_BYTE *)(v27 + 12) - 128;
    *(_WORD *)(v6 + 26) = *(_BYTE *)(v27 + 15) - 128;
    *(_WORD *)(v6 + 28) = *(_BYTE *)(v27 + 18) - 128;
    *(_WORD *)(v6 + 30) = *(_BYTE *)(v27 + 21) - 128;
    *(_WORD *)(v6 + 144) = *(_BYTE *)(v27 + 24) - 128;
    *(_WORD *)(v6 + 146) = *(_BYTE *)(v27 + 27) - 128;
    *(_WORD *)(v6 + 148) = *(_BYTE *)(v27 + 30) - 128;
    *(_WORD *)(v6 + 150) = *(_BYTE *)(v27 + 33) - 128;
    *(_WORD *)(v6 + 152) = *(_BYTE *)(v27 + 36) - 128;
    *(_WORD *)(v6 + 154) = *(_BYTE *)(v27 + 39) - 128;
    *(_WORD *)(v6 + 156) = *(_BYTE *)(v27 + 42) - 128;
    *(_WORD *)(v6 + 158) = *(_BYTE *)(v27 + 45) - 128;
    v28 = *(_BYTE *)(v27 + 10) + *(_BYTE *)(v27 + 7);
    v29 = *(_BYTE *)(v27 + 16) + *(_BYTE *)(v27 + 13);
    v30 = *(_BYTE *)(v27 + 22) + *(_BYTE *)(v27 + 19);
    v31 = *(_BYTE *)(v27 + 28) + *(_BYTE *)(v27 + 25);
    v32 = *(_BYTE *)(v27 + 34) + *(_BYTE *)(v27 + 31);
    v33 = *(_BYTE *)(v27 + 40) + *(_BYTE *)(v27 + 37);
    v34 = *(_BYTE *)(v27 + 46) + *(_BYTE *)(v27 + 43);
    v35 = *(_BYTE *)(v27 + 5) + *(_BYTE *)(v27 + 2);
    v36 = *(_BYTE *)(v27 + 11) + *(_BYTE *)(v27 + 8);
    v37 = *(_BYTE *)(v27 + 17) + *(_BYTE *)(v27 + 14);
    v38 = *(_BYTE *)(v27 + 23) + *(_BYTE *)(v27 + 20);
    v39 = *(_BYTE *)(v27 + 29) + *(_BYTE *)(v27 + 26);
    v40 = *(_BYTE *)(v27 + 35) + *(_BYTE *)(v27 + 32);
    v41 = *(_BYTE *)(v27 + 41) + *(_BYTE *)(v27 + 38);
    v42 = *(_BYTE *)(v27 + 47) + *(_BYTE *)(v27 + 44);
    *(_WORD *)v7 = ((*(_BYTE *)(v27 + 4) + *(_BYTE *)(v27 + 1) + v11 + 2) >> 2) - 128;
    *(_WORD *)(v7 + 2) = ((v28 + v12 + 2) >> 2) - 128;
    *(_WORD *)(v7 + 4) = ((v29 + v13 + 2) >> 2) - 128;
    *(_WORD *)(v7 + 6) = ((v30 + v14 + 2) >> 2) - 128;
    *(_WORD *)(v7 + 8) = ((v31 + v15 + 2) >> 2) - 128;
    *(_WORD *)(v7 + 10) = ((v32 + v16 + 2) >> 2) - 128;
    *(_WORD *)(v7 + 12) = ((v33 + v17 + 2) >> 2) - 128;
    *(_WORD *)(v7 + 14) = ((v34 + v18 + 2) >> 2) - 128;
    *(_WORD *)v10 = ((v35 + v19 + 2) >> 2) - 128;
    *(_WORD *)(v10 + 2) = ((v36 + v20 + 2) >> 2) - 128;
    *(_WORD *)(v10 + 4) = ((v37 + v21 + 2) >> 2) - 128;
    *(_WORD *)(v10 + 6) = ((v38 + v22 + 2) >> 2) - 128;
    *(_WORD *)(v10 + 8) = ((v39 + v23 + 2) >> 2) - 128;
    v7 += 16;
    *(_WORD *)(v10 + 10) = ((v40 + v24 + 2) >> 2) - 128;
    *(_WORD *)(v10 + 12) = ((v41 + v25 + 2) >> 2) - 128;
    *(_WORD *)(v10 + 14) = ((v42 + v26 + 2) >> 2) - 128;
    result = v10 + 16;
    v6 = v9 + 32;
    v5 = a2 + v27;
    v43 += 2;
  }
  while ( v43 < 8 );
  return result;
}

//----- (00771B60) --------------------------------------------------------
int __cdecl OTHER_to_OTHER_411_Full_MCU(int a1, int a2, int a3, int a4, int a5)
{
  sub_771650(a1, a2, a3, a4, a5);
  return sub_771650(a1 + 8 * a2, a2, a3 + 256, a4 + 64, a5 + 64);
}

//----- (00771BD0) --------------------------------------------------------
void __cdecl OTHER_to_OTHER_411_MCU(struct _JPEG_PROPERTIES *a1, int a2, int a3)
{
  signed int v3; // edi@1
  signed int v4; // esi@1
  int v5; // ebp@1
  char *v6; // ebx@1
  char *v7; // ecx@1
  signed int v8; // eax@2
  __int64 v9; // rax@7
  int v10; // eax@7
  void (__cdecl **v11)(char *, int, char *, int, int); // [sp+1Ch] [bp-18h]@1

  v3 = 16;
  v4 = 16;
  v5 = a1->DIBLineBytes;
  v6 = a1->MCUBuf;
  v7 = a1->state.DIB_ptr;
  v11 = (void (__cdecl **)(char *, int, char *, int, int))a1->state.ctx;
  if ( a1->numxMCUs - 1 == a2 )
  {
    v8 = (((unsigned __int64)a1->DIBWidth >> 32) ^ abs(a1->DIBWidth) & 0xF) - ((unsigned __int64)a1->DIBWidth >> 32);
    if ( v8 )
      v3 = v8;
    a1->state.DIB_ptr = &a1->DIBBytes[v5 * (16 * a3 + 16)];
  }
  else
  {
    a1->state.DIB_ptr = v7 + 48;
  }
  if ( a3 == a1->numyMCUs - 1 )
  {
    v9 = abs(a1->DIBHeight);
    v10 = (HIDWORD(v9) ^ abs(v9) & 0xF) - HIDWORD(v9);
    if ( v10 )
      v4 = v10;
  }
  if ( v3 != 16 || v4 != 16 )
    sub_771160((int)v7, v5, v3, v4, (int)v6);
  else
    v11[34](v7, v5, v6, (int)(v6 + 512), (int)(v6 + 640));
}

//----- (00771CE0) --------------------------------------------------------
unsigned int __cdecl sub_771CE0(int a1, int a2, signed int a3, signed int a4, int a5)
{
  unsigned int result; // eax@1
  signed int v6; // edx@1
  int v7; // ecx@2
  int v8; // ebx@2
  int v9; // ebp@2
  signed int v10; // eax@3
  int v11; // edi@4
  int v12; // esi@4
  unsigned int v13; // edx@4
  __int16 v14; // bp@5
  int v15; // esi@8
  int v16; // edx@8
  int v17; // ecx@14
  __int16 v18; // di@15
  __int16 v19; // si@15
  __int16 v20; // bp@15
  __int16 v21; // bx@15
  int v22; // ecx@16
  int v23; // edx@16
  int v24; // edi@17
  int v25; // esi@17
  int v26; // ebp@17
  char v27; // [sp+1Fh] [bp-32Dh]@1
  int v28; // [sp+320h] [bp-2Ch]@8
  unsigned int v29; // [sp+324h] [bp-28h]@2
  int v30; // [sp+328h] [bp-24h]@4
  int v31; // [sp+32Ch] [bp-20h]@4
  int v32; // [sp+330h] [bp-1Ch]@4
  int v33; // [sp+334h] [bp-18h]@4

  result = (unsigned int)&v27 & 0xFFFFFFE0;
  v6 = 0;
  if ( a4 > 0 )
  {
    v7 = 0;
    v8 = 0;
    v9 = 0;
    v29 = (unsigned int)&v27 & 0xFFFFFFE0;
    do
    {
      v10 = 0;
      if ( a3 > 0 )
      {
        v11 = v7;
        v12 = v8;
        v33 = v7;
        v32 = v8;
        v30 = v9;
        v31 = v6;
        v13 = v29;
        do
        {
          ++v10;
          *(_WORD *)(v13 + 2 * v12) = *(_BYTE *)(v11 + a1);
          *(_WORD *)(v13 + 2 * v12 + 256) = *(_BYTE *)(v11 + a1 + 1);
          v14 = *(_BYTE *)(v11 + a1 + 2);
          v11 += 3;
          *(_WORD *)(v13 + 2 * v12++ + 512) = v14;
        }
        while ( v10 < a3 );
        v7 = v33;
        v8 = v32;
        v9 = v30;
        v6 = v31;
      }
      if ( v10 < 16 )
      {
        v28 = v29 + v9;
        v15 = v29 + 2 * (v10 + v8);
        v30 = v9;
        v31 = v6;
        v16 = v29 + v9;
        do
        {
          ++v10;
          *(_WORD *)v15 = *(_WORD *)(v16 + 2 * a3 - 2);
          *(_WORD *)(v15 + 256) = *(_WORD *)(v16 + 2 * a3 + 254);
          *(_WORD *)(v15 + 512) = *(_WORD *)(v16 + 2 * a3 + 510);
          v15 += 2;
        }
        while ( v10 < 16 );
        v9 = v30;
        v6 = v31;
      }
      v7 += a2;
      v8 += 16;
      v9 += 32;
      ++v6;
    }
    while ( v6 < a4 );
    result = v29;
  }
  if ( v6 < 8 )
  {
    v17 = result + 32 * v6;
    do
    {
      v18 = *(_WORD *)(v17 + 508);
      v19 = *(_WORD *)(v17 - 2);
      *(_WORD *)v17 = *(_WORD *)(v17 - 32);
      v20 = *(_WORD *)(v17 + 254);
      *(_WORD *)(v17 + 256) = *(_WORD *)(v17 + 224);
      ++v6;
      *(_WORD *)(v17 + 512) = *(_WORD *)(v17 + 480);
      *(_WORD *)(v17 + 2) = *(_WORD *)(v17 - 30);
      *(_WORD *)(v17 + 258) = *(_WORD *)(v17 + 226);
      *(_WORD *)(v17 + 514) = *(_WORD *)(v17 + 482);
      *(_WORD *)(v17 + 4) = *(_WORD *)(v17 - 28);
      *(_WORD *)(v17 + 260) = *(_WORD *)(v17 + 228);
      *(_WORD *)(v17 + 516) = *(_WORD *)(v17 + 484);
      *(_WORD *)(v17 + 6) = *(_WORD *)(v17 - 26);
      *(_WORD *)(v17 + 262) = *(_WORD *)(v17 + 230);
      *(_WORD *)(v17 + 518) = *(_WORD *)(v17 + 486);
      *(_WORD *)(v17 + 8) = *(_WORD *)(v17 - 24);
      *(_WORD *)(v17 + 264) = *(_WORD *)(v17 + 232);
      *(_WORD *)(v17 + 520) = *(_WORD *)(v17 + 488);
      *(_WORD *)(v17 + 10) = *(_WORD *)(v17 - 22);
      *(_WORD *)(v17 + 266) = *(_WORD *)(v17 + 234);
      *(_WORD *)(v17 + 522) = *(_WORD *)(v17 + 490);
      *(_WORD *)(v17 + 12) = *(_WORD *)(v17 - 20);
      *(_WORD *)(v17 + 268) = *(_WORD *)(v17 + 236);
      *(_WORD *)(v17 + 524) = *(_WORD *)(v17 + 492);
      *(_WORD *)(v17 + 14) = *(_WORD *)(v17 - 18);
      *(_WORD *)(v17 + 270) = *(_WORD *)(v17 + 238);
      *(_WORD *)(v17 + 526) = *(_WORD *)(v17 + 494);
      *(_WORD *)(v17 + 16) = *(_WORD *)(v17 - 16);
      *(_WORD *)(v17 + 272) = *(_WORD *)(v17 + 240);
      *(_WORD *)(v17 + 528) = *(_WORD *)(v17 + 496);
      *(_WORD *)(v17 + 18) = *(_WORD *)(v17 - 14);
      *(_WORD *)(v17 + 274) = *(_WORD *)(v17 + 242);
      *(_WORD *)(v17 + 530) = *(_WORD *)(v17 + 498);
      *(_WORD *)(v17 + 20) = *(_WORD *)(v17 - 12);
      *(_WORD *)(v17 + 276) = *(_WORD *)(v17 + 244);
      *(_WORD *)(v17 + 532) = *(_WORD *)(v17 + 500);
      *(_WORD *)(v17 + 22) = *(_WORD *)(v17 - 10);
      *(_WORD *)(v17 + 278) = *(_WORD *)(v17 + 246);
      *(_WORD *)(v17 + 534) = *(_WORD *)(v17 + 502);
      *(_WORD *)(v17 + 24) = *(_WORD *)(v17 - 8);
      *(_WORD *)(v17 + 280) = *(_WORD *)(v17 + 248);
      *(_WORD *)(v17 + 536) = *(_WORD *)(v17 + 504);
      *(_WORD *)(v17 + 26) = *(_WORD *)(v17 - 6);
      *(_WORD *)(v17 + 282) = *(_WORD *)(v17 + 250);
      *(_WORD *)(v17 + 538) = *(_WORD *)(v17 + 506);
      *(_WORD *)(v17 + 28) = *(_WORD *)(v17 - 4);
      *(_WORD *)(v17 + 284) = *(_WORD *)(v17 + 252);
      v21 = *(_WORD *)(v17 + 510);
      *(_WORD *)(v17 + 540) = v18;
      *(_WORD *)(v17 + 30) = v19;
      *(_WORD *)(v17 + 286) = v20;
      *(_WORD *)(v17 + 542) = v21;
      v17 += 32;
    }
    while ( v6 < 8 );
  }
  v22 = 0;
  v23 = 0;
  do
  {
    v24 = a5 + 2 * v22;
    v25 = result + 2 * v23;
    v26 = result + 2 * v23;
    v28 = v23;
    v29 = result;
    do
    {
      *(_WORD *)v24 = *(_WORD *)v25 - 128;
      *(_WORD *)(v24 + 128) = *(_WORD *)(v25 + 16) - 128;
      *(_WORD *)(v24 + 256) = ((*(_WORD *)(v26 + 256) + (signed int)*(_WORD *)(v26 + 258) + 1) >> 1) - 128;
      *(_WORD *)(v24 + 384) = ((*(_WORD *)(v26 + 512) + (signed int)*(_WORD *)(v26 + 514) + 1) >> 1) - 128;
      v24 += 2;
      v25 += 2;
      v26 += 4;
    }
    while ( (signed int)(result + 2 * v23 + 32) > v26 );
    result = v29;
    v22 += 8;
    v23 = v28 + 16;
  }
  while ( v28 + 16 < 128 );
  return result;
}

//----- (00772170) --------------------------------------------------------
signed int __cdecl OTHER_to_OTHER_422_Full_MCU(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // esi@1
  int v6; // ebx@1
  int v7; // ecx@1
  int v8; // edx@1
  signed int result; // eax@1

  v5 = a1;
  v6 = a3;
  v7 = a4;
  v8 = a5;
  result = 0;
  do
  {
    ++result;
    *(_WORD *)v6 = *(_BYTE *)v5 - 128;
    *(_WORD *)(v6 + 2) = *(_BYTE *)(v5 + 3) - 128;
    *(_WORD *)(v6 + 4) = *(_BYTE *)(v5 + 6) - 128;
    *(_WORD *)(v6 + 6) = *(_BYTE *)(v5 + 9) - 128;
    *(_WORD *)(v6 + 8) = *(_BYTE *)(v5 + 12) - 128;
    *(_WORD *)(v6 + 10) = *(_BYTE *)(v5 + 15) - 128;
    *(_WORD *)(v6 + 12) = *(_BYTE *)(v5 + 18) - 128;
    *(_WORD *)(v6 + 14) = *(_BYTE *)(v5 + 21) - 128;
    *(_WORD *)(v6 + 128) = *(_BYTE *)(v5 + 24) - 128;
    *(_WORD *)(v6 + 130) = *(_BYTE *)(v5 + 27) - 128;
    *(_WORD *)(v6 + 132) = *(_BYTE *)(v5 + 30) - 128;
    *(_WORD *)(v6 + 134) = *(_BYTE *)(v5 + 33) - 128;
    *(_WORD *)(v6 + 136) = *(_BYTE *)(v5 + 36) - 128;
    *(_WORD *)(v6 + 138) = *(_BYTE *)(v5 + 39) - 128;
    *(_WORD *)(v6 + 140) = *(_BYTE *)(v5 + 42) - 128;
    *(_WORD *)(v6 + 142) = *(_BYTE *)(v5 + 45) - 128;
    *(_WORD *)v7 = ((*(_BYTE *)(v5 + 1) + *(_BYTE *)(v5 + 4) + 1) >> 1) - 128;
    *(_WORD *)(v7 + 2) = ((*(_BYTE *)(v5 + 7) + *(_BYTE *)(v5 + 10) + 1) >> 1) - 128;
    *(_WORD *)(v7 + 4) = ((*(_BYTE *)(v5 + 13) + *(_BYTE *)(v5 + 16) + 1) >> 1) - 128;
    *(_WORD *)(v7 + 6) = ((*(_BYTE *)(v5 + 19) + *(_BYTE *)(v5 + 22) + 1) >> 1) - 128;
    *(_WORD *)(v7 + 8) = ((*(_BYTE *)(v5 + 25) + *(_BYTE *)(v5 + 28) + 1) >> 1) - 128;
    *(_WORD *)(v7 + 10) = ((*(_BYTE *)(v5 + 31) + *(_BYTE *)(v5 + 34) + 1) >> 1) - 128;
    *(_WORD *)(v7 + 12) = ((*(_BYTE *)(v5 + 37) + *(_BYTE *)(v5 + 40) + 1) >> 1) - 128;
    *(_WORD *)(v7 + 14) = ((*(_BYTE *)(v5 + 43) + *(_BYTE *)(v5 + 46) + 1) >> 1) - 128;
    *(_WORD *)v8 = ((*(_BYTE *)(v5 + 2) + *(_BYTE *)(v5 + 5) + 1) >> 1) - 128;
    *(_WORD *)(v8 + 2) = ((*(_BYTE *)(v5 + 8) + *(_BYTE *)(v5 + 11) + 1) >> 1) - 128;
    *(_WORD *)(v8 + 4) = ((*(_BYTE *)(v5 + 14) + *(_BYTE *)(v5 + 17) + 1) >> 1) - 128;
    *(_WORD *)(v8 + 6) = ((*(_BYTE *)(v5 + 20) + *(_BYTE *)(v5 + 23) + 1) >> 1) - 128;
    *(_WORD *)(v8 + 8) = ((*(_BYTE *)(v5 + 26) + *(_BYTE *)(v5 + 29) + 1) >> 1) - 128;
    *(_WORD *)(v8 + 10) = ((*(_BYTE *)(v5 + 32) + *(_BYTE *)(v5 + 35) + 1) >> 1) - 128;
    *(_WORD *)(v8 + 12) = ((*(_BYTE *)(v5 + 38) + *(_BYTE *)(v5 + 41) + 1) >> 1) - 128;
    *(_WORD *)(v8 + 14) = ((*(_BYTE *)(v5 + 44) + *(_BYTE *)(v5 + 47) + 1) >> 1) - 128;
    v6 += 16;
    v7 += 16;
    v8 += 16;
    v5 += a2;
  }
  while ( result < 8 );
  return result;
}

//----- (007723D0) --------------------------------------------------------
void __cdecl OTHER_to_OTHER_422_MCU(struct _JPEG_PROPERTIES *a1, int a2, int a3)
{
  signed int v3; // edi@1
  signed int v4; // esi@1
  int v5; // ebp@1
  char *v6; // ebx@1
  char *v7; // ecx@1
  signed int v8; // eax@2
  __int64 v9; // rax@7
  int v10; // eax@7
  void (__cdecl **v11)(char *, int, char *, int, int); // [sp+1Ch] [bp-18h]@1

  v3 = 16;
  v4 = 8;
  v5 = a1->DIBLineBytes;
  v6 = a1->MCUBuf;
  v7 = a1->state.DIB_ptr;
  v11 = (void (__cdecl **)(char *, int, char *, int, int))a1->state.ctx;
  if ( a1->numxMCUs - 1 == a2 )
  {
    v8 = (((unsigned __int64)a1->DIBWidth >> 32) ^ abs(a1->DIBWidth) & 0xF) - ((unsigned __int64)a1->DIBWidth >> 32);
    if ( v8 )
      v3 = v8;
    a1->state.DIB_ptr = &a1->DIBBytes[v5 * (8 * a3 + 8)];
  }
  else
  {
    a1->state.DIB_ptr = v7 + 48;
  }
  if ( a3 == a1->numyMCUs - 1 )
  {
    v9 = abs(a1->DIBHeight);
    v10 = (HIDWORD(v9) ^ abs(v9) & 7) - HIDWORD(v9);
    if ( v10 )
      v4 = v10;
  }
  if ( v3 != 16 || v4 != 8 )
    sub_771CE0((int)v7, v5, v3, v4, (int)v6);
  else
    v11[33](v7, v5, v6, (int)(v6 + 256), (int)(v6 + 384));
}

//----- (007724E0) --------------------------------------------------------
int __usercall sub_7724E0@<eax>(int a1@<ebp>, int a2, int a3, signed int a4, int a5, int a6)
{
  unsigned int v6; // ebp@1
  int v7; // ebx@1
  int v8; // eax@2
  int v9; // edx@2
  signed int v10; // ecx@2
  int v11; // ebp@2
  signed int v12; // esi@3
  int v13; // ebx@4
  __int16 v14; // di@5
  int v15; // ebx@10
  int v16; // ecx@10
  int v17; // eax@16
  __int16 v18; // di@17
  __int16 v19; // si@17
  __int16 v20; // cx@17
  __int16 v21; // dx@17
  int v22; // edx@18
  int result; // eax@18
  int v24; // edi@19
  int v25; // esi@19
  int v26; // ebx@19
  int v27; // [sp+320h] [bp+301h]@19
  unsigned int v28; // [sp+324h] [bp+305h]@2
  int v29; // [sp+32Ch] [bp+30Dh]@2
  signed int v30; // [sp+334h] [bp+315h]@10
  int v31; // [sp+338h] [bp+319h]@2
  int v32; // [sp+340h] [bp+321h]@2
  int v33; // [sp+348h] [bp+329h]@4

  v6 = a1 & 0xFFFFFFE0;
  v7 = 0;
  if ( a5 > 0 )
  {
    v29 = a4 - 1;
    v8 = 0;
    v9 = 0;
    v10 = a4;
    v32 = 0;
    v31 = 0;
    v28 = v6;
    v11 = 2 * a4;
    do
    {
      v12 = 0;
      if ( v29 > 0 )
      {
        v13 = v9;
        v33 = v8;
        do
        {
          v12 += 2;
          *(_WORD *)(v28 + 2 * v13) = *(_BYTE *)(v8 + a2);
          *(_WORD *)(v28 + 2 * v13 + 2) = *(_BYTE *)(a2 + 2 + v8);
          *(_WORD *)(v28 + 2 * v13 + 256) = *(_BYTE *)(a2 + 1 + v8);
          *(_WORD *)(v28 + 2 * v13 + 258) = *(_BYTE *)(a2 + 1 + v8);
          *(_WORD *)(v28 + 2 * v13 + 512) = *(_BYTE *)(a2 + 3 + v8);
          v14 = *(_BYTE *)(a2 + 3 + v8);
          v8 += 4;
          *(_WORD *)(v28 + 2 * v13 + 514) = v14;
          v13 += 2;
        }
        while ( v12 < v29 );
        v8 = v33;
      }
      if ( a4 & 1 )
      {
        *(_WORD *)(v28 + 2 * v10 - 2) = *(_BYTE *)(v11 - 2 + a2);
        *(_WORD *)(v28 + 2 * v10 + 254) = *(_BYTE *)(v11 - 1 + a2);
        *(_WORD *)(v28 + 2 * v10 + 510) = *(_BYTE *)(v11 - 3 + a2);
        v12 = a4;
      }
      if ( v12 < 16 )
      {
        v15 = v28 + 2 * (v12 + v9);
        v30 = v10;
        v16 = v28 + v32;
        do
        {
          ++v12;
          *(_WORD *)v15 = *(_WORD *)(v16 + 2 * a4 - 2);
          *(_WORD *)(v15 + 256) = *(_WORD *)(v16 + 2 * a4 + 254);
          *(_WORD *)(v15 + 512) = *(_WORD *)(v16 + 2 * a4 + 510);
          v15 += 2;
        }
        while ( v12 < 16 );
        v10 = v30;
      }
      v8 += a3;
      v9 += 16;
      v10 += 16;
      v11 += a3;
      v7 = v31 + 1;
      v32 += 32;
      ++v31;
    }
    while ( v31 < a5 );
    v6 = v28;
  }
  if ( v7 < 8 )
  {
    v17 = v6 + 32 * v7;
    do
    {
      v18 = *(_WORD *)(v17 + 508);
      v19 = *(_WORD *)(v17 - 2);
      *(_WORD *)v17 = *(_WORD *)(v17 - 32);
      v20 = *(_WORD *)(v17 + 254);
      *(_WORD *)(v17 + 256) = *(_WORD *)(v17 + 224);
      ++v7;
      *(_WORD *)(v17 + 512) = *(_WORD *)(v17 + 480);
      *(_WORD *)(v17 + 2) = *(_WORD *)(v17 - 30);
      *(_WORD *)(v17 + 258) = *(_WORD *)(v17 + 226);
      *(_WORD *)(v17 + 514) = *(_WORD *)(v17 + 482);
      *(_WORD *)(v17 + 4) = *(_WORD *)(v17 - 28);
      *(_WORD *)(v17 + 260) = *(_WORD *)(v17 + 228);
      *(_WORD *)(v17 + 516) = *(_WORD *)(v17 + 484);
      *(_WORD *)(v17 + 6) = *(_WORD *)(v17 - 26);
      *(_WORD *)(v17 + 262) = *(_WORD *)(v17 + 230);
      *(_WORD *)(v17 + 518) = *(_WORD *)(v17 + 486);
      *(_WORD *)(v17 + 8) = *(_WORD *)(v17 - 24);
      *(_WORD *)(v17 + 264) = *(_WORD *)(v17 + 232);
      *(_WORD *)(v17 + 520) = *(_WORD *)(v17 + 488);
      *(_WORD *)(v17 + 10) = *(_WORD *)(v17 - 22);
      *(_WORD *)(v17 + 266) = *(_WORD *)(v17 + 234);
      *(_WORD *)(v17 + 522) = *(_WORD *)(v17 + 490);
      *(_WORD *)(v17 + 12) = *(_WORD *)(v17 - 20);
      *(_WORD *)(v17 + 268) = *(_WORD *)(v17 + 236);
      *(_WORD *)(v17 + 524) = *(_WORD *)(v17 + 492);
      *(_WORD *)(v17 + 14) = *(_WORD *)(v17 - 18);
      *(_WORD *)(v17 + 270) = *(_WORD *)(v17 + 238);
      *(_WORD *)(v17 + 526) = *(_WORD *)(v17 + 494);
      *(_WORD *)(v17 + 16) = *(_WORD *)(v17 - 16);
      *(_WORD *)(v17 + 272) = *(_WORD *)(v17 + 240);
      *(_WORD *)(v17 + 528) = *(_WORD *)(v17 + 496);
      *(_WORD *)(v17 + 18) = *(_WORD *)(v17 - 14);
      *(_WORD *)(v17 + 274) = *(_WORD *)(v17 + 242);
      *(_WORD *)(v17 + 530) = *(_WORD *)(v17 + 498);
      *(_WORD *)(v17 + 20) = *(_WORD *)(v17 - 12);
      *(_WORD *)(v17 + 276) = *(_WORD *)(v17 + 244);
      *(_WORD *)(v17 + 532) = *(_WORD *)(v17 + 500);
      *(_WORD *)(v17 + 22) = *(_WORD *)(v17 - 10);
      *(_WORD *)(v17 + 278) = *(_WORD *)(v17 + 246);
      *(_WORD *)(v17 + 534) = *(_WORD *)(v17 + 502);
      *(_WORD *)(v17 + 24) = *(_WORD *)(v17 - 8);
      *(_WORD *)(v17 + 280) = *(_WORD *)(v17 + 248);
      *(_WORD *)(v17 + 536) = *(_WORD *)(v17 + 504);
      *(_WORD *)(v17 + 26) = *(_WORD *)(v17 - 6);
      *(_WORD *)(v17 + 282) = *(_WORD *)(v17 + 250);
      *(_WORD *)(v17 + 538) = *(_WORD *)(v17 + 506);
      *(_WORD *)(v17 + 28) = *(_WORD *)(v17 - 4);
      *(_WORD *)(v17 + 284) = *(_WORD *)(v17 + 252);
      v21 = *(_WORD *)(v17 + 510);
      *(_WORD *)(v17 + 540) = v18;
      *(_WORD *)(v17 + 30) = v19;
      *(_WORD *)(v17 + 286) = v20;
      *(_WORD *)(v17 + 542) = v21;
      v17 += 32;
    }
    while ( v7 < 8 );
  }
  v22 = 0;
  result = 0;
  do
  {
    v24 = a6 + 2 * v22;
    v25 = v6 + 2 * result;
    v26 = v6 + 2 * result;
    v27 = result;
    do
    {
      *(_WORD *)v24 = *(_WORD *)v25 - 128;
      *(_WORD *)(v24 + 128) = *(_WORD *)(v25 + 16) - 128;
      *(_WORD *)(v24 + 256) = ((*(_WORD *)(v26 + 256) + 1 + *(_WORD *)(v26 + 258)) >> 1) - 128;
      *(_WORD *)(v24 + 384) = ((*(_WORD *)(v26 + 514) + 1 + *(_WORD *)(v26 + 512)) >> 1) - 128;
      v24 += 2;
      v25 += 2;
      v26 += 4;
    }
    while ( (signed int)(v6 + 32 + 2 * result) > v26 );
    v22 += 8;
    result += 16;
  }
  while ( v27 + 16 < 128 );
  return result;
}

//----- (00772A80) --------------------------------------------------------
signed int __cdecl YCbYCr_to_YCbCr_422_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // edi@1
  int v6; // ebx@1
  int v7; // ecx@1
  int v8; // edx@1
  signed int result; // eax@1

  v5 = a1;
  v6 = a3;
  v7 = a4;
  v8 = a5;
  result = 0;
  do
  {
    ++result;
    *(_WORD *)v6 = *(_BYTE *)v5 - 128;
    *(_WORD *)(v6 + 2) = *(_BYTE *)(v5 + 2) - 128;
    *(_WORD *)(v6 + 4) = *(_BYTE *)(v5 + 4) - 128;
    *(_WORD *)(v6 + 6) = *(_BYTE *)(v5 + 6) - 128;
    *(_WORD *)(v6 + 8) = *(_BYTE *)(v5 + 8) - 128;
    *(_WORD *)(v6 + 10) = *(_BYTE *)(v5 + 10) - 128;
    *(_WORD *)(v6 + 12) = *(_BYTE *)(v5 + 12) - 128;
    *(_WORD *)(v6 + 14) = *(_BYTE *)(v5 + 14) - 128;
    *(_WORD *)(v6 + 128) = *(_BYTE *)(v5 + 16) - 128;
    *(_WORD *)(v6 + 130) = *(_BYTE *)(v5 + 18) - 128;
    *(_WORD *)(v6 + 132) = *(_BYTE *)(v5 + 20) - 128;
    *(_WORD *)(v6 + 134) = *(_BYTE *)(v5 + 22) - 128;
    *(_WORD *)(v6 + 136) = *(_BYTE *)(v5 + 24) - 128;
    *(_WORD *)(v6 + 138) = *(_BYTE *)(v5 + 26) - 128;
    *(_WORD *)(v6 + 140) = *(_BYTE *)(v5 + 28) - 128;
    *(_WORD *)(v6 + 142) = *(_BYTE *)(v5 + 30) - 128;
    *(_WORD *)v7 = *(_BYTE *)(v5 + 1) - 128;
    *(_WORD *)(v7 + 2) = *(_BYTE *)(v5 + 5) - 128;
    *(_WORD *)(v7 + 4) = *(_BYTE *)(v5 + 9) - 128;
    *(_WORD *)(v7 + 6) = *(_BYTE *)(v5 + 13) - 128;
    *(_WORD *)(v7 + 8) = *(_BYTE *)(v5 + 17) - 128;
    *(_WORD *)(v7 + 10) = *(_BYTE *)(v5 + 21) - 128;
    *(_WORD *)(v7 + 12) = *(_BYTE *)(v5 + 25) - 128;
    *(_WORD *)(v7 + 14) = *(_BYTE *)(v5 + 29) - 128;
    *(_WORD *)v8 = *(_BYTE *)(v5 + 3) - 128;
    *(_WORD *)(v8 + 2) = *(_BYTE *)(v5 + 7) - 128;
    *(_WORD *)(v8 + 4) = *(_BYTE *)(v5 + 11) - 128;
    *(_WORD *)(v8 + 6) = *(_BYTE *)(v5 + 15) - 128;
    *(_WORD *)(v8 + 8) = *(_BYTE *)(v5 + 19) - 128;
    *(_WORD *)(v8 + 10) = *(_BYTE *)(v5 + 23) - 128;
    *(_WORD *)(v8 + 12) = *(_BYTE *)(v5 + 27) - 128;
    *(_WORD *)(v8 + 14) = *(_BYTE *)(v5 + 31) - 128;
    v6 += 16;
    v7 += 16;
    v8 += 16;
    v5 += a2;
  }
  while ( result < 8 );
  return result;
}

//----- (00772C40) --------------------------------------------------------
int __cdecl YCbYCr_to_YCbCr_422_Full_MCU_M5(__m64 *a1, int a2, int a3, int a4, int a5)
{
  return own_ycbycr_to_ycbcr_422_full_mcu_m5(a1, a2, a3, a4, a5);
}

//----- (00772C80) --------------------------------------------------------
int __cdecl YCbYCr_to_YCbCr_422_Full_MCU_A6(__m64 *a1, int a2, int a3, int a4, int a5)
{
  return own_ycbycr_to_ycbcr_422_full_mcu_a6(a1, a2, a3, a4, a5);
}

//----- (00772CC0) --------------------------------------------------------
void __cdecl YCbYCr_to_YCbCr_422_MCU(struct _JPEG_PROPERTIES *a1, int a2, int a3)
{
  signed int v3; // edi@1
  int v4; // esi@1
  int v5; // ebp@1
  char *v6; // ebx@1
  char *v7; // ecx@1
  signed int v8; // eax@2
  __int64 v9; // rax@7
  int v10; // eax@7
  void (__cdecl **v11)(char *, int, char *, int, int); // [sp+1Ch] [bp-18h]@1

  v3 = 16;
  v4 = 8;
  v5 = a1->DIBLineBytes;
  v6 = a1->MCUBuf;
  v7 = a1->state.DIB_ptr;
  v11 = (void (__cdecl **)(char *, int, char *, int, int))a1->state.ctx;
  if ( a1->numxMCUs - 1 == a2 )
  {
    v8 = (((unsigned __int64)a1->DIBWidth >> 32) ^ abs(a1->DIBWidth) & 0xF) - ((unsigned __int64)a1->DIBWidth >> 32);
    if ( v8 )
      v3 = v8;
    a1->state.DIB_ptr = &a1->DIBBytes[v5 * (8 * a3 + 8)];
  }
  else
  {
    a1->state.DIB_ptr = v7 + 32;
  }
  if ( a3 == a1->numyMCUs - 1 )
  {
    v9 = abs(a1->DIBHeight);
    v10 = (HIDWORD(v9) ^ abs(v9) & 7) - HIDWORD(v9);
    if ( v10 )
      v4 = v10;
  }
  if ( v3 != 16 || v4 != 8 )
    sub_7724E0(v5, (int)v7, v5, v3, v4, (int)v6);
  else
    v11[35](v7, v5, v6, (int)(v6 + 256), (int)(v6 + 384));
}

//----- (00772DD0) --------------------------------------------------------
unsigned int __cdecl sub_772DD0(int a1, int a2, int a3, int a4, int a5)
{
  unsigned int result; // eax@1
  signed int v6; // esi@1
  int v7; // ebx@2
  int v8; // ecx@2
  int v9; // edx@2
  int v10; // eax@2
  signed int v11; // esi@3
  int v12; // ebp@5
  unsigned int v13; // ecx@5
  int v14; // edx@5
  __int16 v15; // di@6
  int v16; // ebp@8
  int v17; // edx@8
  unsigned int v18; // ecx@8
  __int16 v19; // ax@9
  int v20; // ecx@15
  int v21; // edx@15
  unsigned int v22; // ebx@15
  _WORD *v23; // ebp@18
  _WORD *v24; // ebx@18
  int v25; // ebp@21
  int v26; // edx@24
  __int16 v27; // di@25
  __int16 v28; // bp@25
  __int16 v29; // bx@25
  __int16 v30; // cx@25
  signed int v31; // edx@26
  char v32; // [sp+1Fh] [bp-D5h]@1
  int v33; // [sp+A0h] [bp-54h]@2
  int v34; // [sp+A4h] [bp-50h]@2
  int v35; // [sp+A8h] [bp-4Ch]@2
  int v36; // [sp+ACh] [bp-48h]@2
  int v37; // [sp+B0h] [bp-44h]@2
  int v38; // [sp+B4h] [bp-40h]@2
  int v39; // [sp+B8h] [bp-3Ch]@2
  int v40; // [sp+BCh] [bp-38h]@2
  _WORD *v41; // [sp+C0h] [bp-34h]@5
  int v42; // [sp+C4h] [bp-30h]@8
  unsigned int v43; // [sp+C8h] [bp-2Ch]@15
  int v44; // [sp+CCh] [bp-28h]@5
  unsigned int v45; // [sp+D0h] [bp-24h]@2
  int v46; // [sp+D4h] [bp-20h]@5
  int v47; // [sp+D8h] [bp-1Ch]@2
  unsigned int v48; // [sp+DCh] [bp-18h]@2

  result = (unsigned int)&v32 & 0xFFFFFFE0;
  v6 = 0;
  if ( a4 > 0 )
  {
    v40 = a3 & 1;
    v37 = 2 * a3 - 2;
    v36 = a3;
    v35 = a3 - 5;
    v38 = 0;
    v7 = a3;
    v33 = a2;
    v8 = 0;
    v39 = 0;
    v34 = a3;
    v48 = (unsigned int)&v32 & 0xFFFFFFE0;
    v47 = 0;
    v9 = a3;
    v45 = (unsigned int)&v32 & 0xFFFFFFE0;
    v10 = 0;
    do
    {
      v11 = 0;
      if ( a3 > 0 )
      {
        if ( v36 >= 5 )
        {
          v41 = (_WORD *)v10;
          v12 = v8;
          v38 = v10;
          v46 = v8;
          v13 = v45;
          v34 = v9;
          v14 = v35;
          v44 = v7;
          do
          {
            v11 += 4;
            *(_WORD *)(v13 + 2 * v12) = *(_BYTE *)(v10 + a1);
            *(_WORD *)(v13 + 2 * v12 + 2) = *(_BYTE *)(v10 + a1 + 1);
            *(_WORD *)(v13 + 2 * v12 + 4) = *(_BYTE *)(v10 + a1 + 2);
            v15 = *(_BYTE *)(v10 + a1 + 3);
            v10 += 4;
            *(_WORD *)(v13 + 2 * v12 + 6) = v15;
            v12 += 4;
          }
          while ( v11 <= v14 );
          v10 = v38;
          v8 = v46;
          v9 = v34;
          v7 = v44;
        }
        v42 = v11 + v10;
        v16 = v11 + v8;
        v38 = v10;
        v46 = v8;
        v34 = v9;
        v17 = v11 + v10;
        v18 = v45;
        v44 = v7;
        do
        {
          v19 = *(_BYTE *)(v17++ + a1);
          ++v11;
          *(_WORD *)(v18 + 2 * v16++) = v19;
        }
        while ( v11 < a3 );
        v10 = v38;
        v8 = v46;
        v9 = v34;
        v7 = v44;
      }
      if ( v40 )
      {
        *(_WORD *)(v45 + 2 * v9 - 2) = *(_BYTE *)(v7 + a1 - 1);
        v11 = a3;
      }
      if ( v11 < 8 )
      {
        if ( 8 - v11 < 5 )
        {
          v41 = (_WORD *)(v48 + v37);
        }
        else
        {
          v43 = v45 + v39;
          v41 = (_WORD *)(v45 + v39 + v37);
          v42 = v11 + v8;
          v46 = v8;
          v20 = v45 + v39;
          v34 = v9;
          v21 = v42;
          v44 = v7;
          v22 = v45;
          do
          {
            v11 += 4;
            *(_WORD *)(v22 + 2 * v21) = *(_WORD *)(v20 + 2 * a3 - 2);
            *(_WORD *)(v22 + 2 * v21 + 2) = *(_WORD *)(v20 + 2 * a3 - 2);
            *(_WORD *)(v22 + 2 * v21 + 4) = *(_WORD *)(v20 + 2 * a3 - 2);
            *(_WORD *)(v22 + 2 * v21 + 6) = *(_WORD *)(v20 + 2 * a3 - 2);
            v21 += 4;
          }
          while ( v11 < 3 );
          v8 = v46;
          v9 = v34;
          v7 = v44;
        }
        v23 = (_WORD *)(v45 + 2 * (v11 + v8));
        v44 = v7;
        v24 = v41;
        do
        {
          ++v11;
          *v23 = *v24;
          ++v23;
        }
        while ( v11 < 8 );
        v7 = v44;
      }
      v10 += a2;
      v8 += 8;
      v9 += 8;
      v7 += v33;
      v25 = v47 + 1;
      v48 += 16;
      v39 += 16;
      ++v47;
    }
    while ( v47 < a4 );
    v6 = v25;
    result = v45;
  }
  if ( v6 < 8 )
  {
    v26 = result + 16 * v6;
    do
    {
      v27 = *(_WORD *)(v26 - 8);
      v28 = *(_WORD *)(v26 - 6);
      *(_WORD *)v26 = *(_WORD *)(v26 - 16);
      v29 = *(_WORD *)(v26 - 4);
      *(_WORD *)(v26 + 2) = *(_WORD *)(v26 - 14);
      ++v6;
      *(_WORD *)(v26 + 4) = *(_WORD *)(v26 - 12);
      *(_WORD *)(v26 + 6) = *(_WORD *)(v26 - 10);
      v30 = *(_WORD *)(v26 - 2);
      *(_WORD *)(v26 + 8) = v27;
      *(_WORD *)(v26 + 10) = v28;
      *(_WORD *)(v26 + 12) = v29;
      *(_WORD *)(v26 + 14) = v30;
      v26 += 16;
    }
    while ( v6 < 8 );
  }
  v31 = 0;
  do
  {
    *(_WORD *)(a5 + 2 * v31) = *(_WORD *)(result + 2 * v31) - 128;
    *(_WORD *)(a5 + 2 * v31 + 2) = *(_WORD *)(result + 2 * v31 + 2) - 128;
    *(_WORD *)(a5 + 2 * v31 + 4) = *(_WORD *)(result + 2 * v31 + 4) - 128;
    *(_WORD *)(a5 + 2 * v31 + 6) = *(_WORD *)(result + 2 * v31 + 6) - 128;
    *(_WORD *)(a5 + 2 * v31 + 8) = *(_WORD *)(result + 2 * v31 + 8) - 128;
    *(_WORD *)(a5 + 2 * v31 + 10) = *(_WORD *)(result + 2 * v31 + 10) - 128;
    *(_WORD *)(a5 + 2 * v31 + 12) = *(_WORD *)(result + 2 * v31 + 12) - 128;
    *(_WORD *)(a5 + 2 * v31 + 14) = *(_WORD *)(result + 2 * v31 + 14) - 128;
    v31 += 8;
  }
  while ( v31 < 64 );
  return result;
}

//----- (00773230) --------------------------------------------------------
signed int __cdecl Y_to_Y_111_Full_MCU_PX(int a1, int a2, int a3)
{
  int v3; // ebx@1
  int v4; // edx@1
  signed int result; // eax@1

  v3 = a1;
  v4 = a3;
  result = 0;
  do
  {
    ++result;
    *(_WORD *)v4 = *(_BYTE *)v3 - 128;
    *(_WORD *)(v4 + 2) = *(_BYTE *)(v3 + 1) - 128;
    *(_WORD *)(v4 + 4) = *(_BYTE *)(v3 + 2) - 128;
    *(_WORD *)(v4 + 6) = *(_BYTE *)(v3 + 3) - 128;
    *(_WORD *)(v4 + 8) = *(_BYTE *)(v3 + 4) - 128;
    *(_WORD *)(v4 + 10) = *(_BYTE *)(v3 + 5) - 128;
    *(_WORD *)(v4 + 12) = *(_BYTE *)(v3 + 6) - 128;
    *(_WORD *)(v4 + 14) = *(_BYTE *)(v3 + 7) - 128;
    v3 += a2;
    v4 += 16;
  }
  while ( result < 8 );
  return result;
}

//----- (007732B0) --------------------------------------------------------
void __cdecl Y_to_Y_111_Full_MCU_M5(__m64 *a1, int a2, int a3)
{
  own_y_to_y_111_full_mcu_m5(a1, a2, a3);
}

//----- (007732E0) --------------------------------------------------------
void __cdecl Y_to_Y_111_MCU(struct _JPEG_PROPERTIES *a1, int a2, int a3)
{
  int v3; // edi@1
  int v4; // esi@1
  int v5; // ebp@1
  char *v6; // ebx@1
  char *v7; // ecx@1
  int v8; // eax@2
  __int64 v9; // rax@7
  int v10; // eax@7
  void (__cdecl **v11)(char *, int, char *); // [sp+1Ch] [bp-18h]@1

  v3 = 8;
  v4 = 8;
  v5 = a1->DIBLineBytes;
  v6 = a1->MCUBuf;
  v7 = a1->state.DIB_ptr;
  v11 = (void (__cdecl **)(char *, int, char *))a1->state.ctx;
  if ( a1->numxMCUs - 1 == a2 )
  {
    v8 = (((unsigned __int64)a1->DIBWidth >> 32) ^ abs(a1->DIBWidth) & 7) - ((unsigned __int64)a1->DIBWidth >> 32);
    if ( v8 )
      v3 = v8;
    a1->state.DIB_ptr = &a1->DIBBytes[v5 * (8 * a3 + 8)];
  }
  else
  {
    a1->state.DIB_ptr = v7 + 8;
  }
  if ( a3 == a1->numyMCUs - 1 )
  {
    v9 = abs(a1->DIBHeight);
    v10 = (HIDWORD(v9) ^ abs(v9) & 7) - HIDWORD(v9);
    if ( v10 )
      v4 = v10;
  }
  if ( v3 != 8 || v4 != 8 )
    sub_772DD0((int)v7, v5, v3, v4, (int)v6);
  else
    v11[25](v7, v5, v6);
}

//----- (007733D0) --------------------------------------------------------
void __cdecl CC_SS_RGB_to_YCbCr_General_MCU(struct _JPEG_PROPERTIES *a1, int a2, int a3)
{
  struct _JPEG_PROPERTIES *v3; // ebx@1
  char *v4; // edi@1
  char *v5; // ebp@1
  int v6; // ecx@1
  int v7; // eax@1
  int v8; // edx@1
  int v9; // ecx@1
  signed int v10; // esi@1
  int v11; // edx@7
  int v12; // edx@9
  int v13; // ebp@9
  int v14; // esi@11
  int v15; // edi@11
  int v16; // eax@12
  int v17; // ebx@12
  signed int v18; // ecx@12
  int v19; // ebp@12
  int v20; // edx@13
  int v21; // ebx@15
  signed int v22; // ecx@15
  signed int v23; // eax@15
  __int16 v24; // di@16
  __int16 v25; // di@16
  int v26; // edx@21
  int v27; // esi@22
  int v28; // eax@22
  int v29; // eax@27
  int v30; // esi@27
  int v31; // edi@28
  int v32; // ebp@28
  int v33; // edx@29
  int v34; // ecx@30
  int v35; // eax@30
  int v36; // ebp@37
  int v37; // eax@38
  int v38; // esi@38
  int v39; // ebx@38
  unsigned int v40; // edi@38
  int v41; // ecx@39
  int v42; // edx@40
  char *v43; // ebp@40
  int v44; // edi@41
  int v45; // eax@41
  signed int v46; // ebx@42
  int v47; // eax@44
  int v48; // edx@44
  int v49; // ecx@44
  _FRAME_COMPONENT *v50; // esi@51
  int v51; // ebp@51
  signed int v52; // edi@51
  int v53; // eax@51
  int v54; // edx@52
  int v55; // esi@52
  unsigned int v56; // eax@52
  int v57; // ecx@52
  int v58; // edi@52
  int v59; // ebx@53
  int v60; // ebp@54
  int v61; // edi@54
  int v62; // eax@55
  int v63; // ecx@56
  int v64; // edi@56
  int v65; // esi@56
  int v66; // ebp@57
  int v67; // eax@59
  int v68; // ecx@59
  int v69; // edx@60
  int v70; // esi@60
  int v71; // edi@60
  int v72; // ebp@60
  int v73; // eax@62
  int v74; // ebx@62
  int v75; // edx@62
  int v76; // ebp@62
  int v77; // ecx@62
  int v78; // ecx@67
  int v79; // ebx@67
  int v80; // eax@67
  int v81; // eax@69
  int v82; // ecx@69
  int v83; // esi@69
  int v84; // eax@76
  int v85; // ebp@77
  int v86; // eax@77
  signed int v87; // edi@77
  int v88; // edx@77
  int v89; // eax@78
  unsigned int v90; // ecx@78
  int v91; // esi@78
  int v92; // edi@78
  int v93; // ebx@79
  int v94; // ebp@80
  int v95; // edi@80
  int v96; // edx@81
  int v97; // ecx@82
  int v98; // edi@82
  int v99; // esi@82
  int v100; // ebp@83
  int v101; // eax@85
  int v102; // ecx@85
  int v103; // edx@86
  int v104; // esi@86
  int v105; // edi@86
  int v106; // ebp@86
  int v107; // eax@88
  int v108; // ebx@88
  int v109; // edx@88
  int v110; // ebp@88
  int v111; // ecx@88
  int v112; // ebx@93
  int v113; // ecx@93
  int v114; // eax@93
  int v115; // ecx@95
  int v116; // ebx@95
  int v117; // esi@95
  _FRAME_COMPONENT *v118; // ebp@104
  int v119; // ecx@104
  int v120; // eax@104
  int v121; // esi@104
  int v122; // ebp@104
  int v123; // edx@104
  int v124; // edi@105
  unsigned int v125; // eax@105
  int v126; // ebp@105
  int v127; // esi@105
  int v128; // ecx@106
  int v129; // ebx@107
  int v130; // edi@107
  int v131; // eax@108
  int v132; // edx@109
  int v133; // edi@109
  int v134; // ebx@109
  int v135; // ecx@110
  signed int v136; // ebp@111
  int v137; // eax@112
  int v138; // edi@112
  int v139; // esi@113
  int v140; // edx@113
  int v141; // eax@114
  int v142; // ecx@116
  int v143; // ebx@116
  int v144; // edi@119
  signed int v145; // eax@124
  char *v146; // edx@125
  char *v147; // edx@134
  char v148; // [sp+1Fh] [bp-A6Dh]@1
  int v149; // [sp+A20h] [bp-6Ch]@51
  int v150; // [sp+A24h] [bp-68h]@51
  int v151; // [sp+A28h] [bp-64h]@62
  int v152; // [sp+A2Ch] [bp-60h]@62
  int v153; // [sp+A30h] [bp-5Ch]@12
  int v154; // [sp+A34h] [bp-58h]@10
  int v155; // [sp+A38h] [bp-54h]@1
  int v156; // [sp+A3Ch] [bp-50h]@22
  int v157; // [sp+A40h] [bp-4Ch]@15
  int v158; // [sp+A44h] [bp-48h]@15
  int v159; // [sp+A48h] [bp-44h]@12
  int v160; // [sp+A4Ch] [bp-40h]@12
  int v161; // [sp+A50h] [bp-3Ch]@15
  int v162; // [sp+A54h] [bp-38h]@10
  int v163; // [sp+A58h] [bp-34h]@10
  unsigned int v164; // [sp+A5Ch] [bp-30h]@1
  int v165; // [sp+A60h] [bp-2Ch]@15
  char *v166; // [sp+A64h] [bp-28h]@1
  int v167; // [sp+A68h] [bp-24h]@1
  int v168; // [sp+A6Ch] [bp-20h]@1
  int v169; // [sp+A70h] [bp-1Ch]@10
  char *v170; // [sp+A74h] [bp-18h]@1

  v3 = a1;
  v4 = a1->MCUBuf;
  v164 = (unsigned int)&v148 & 0xFFFFFFE0;
  v5 = a1->state.DIB_ptr;
  v6 = a1->jframe.max_hsampling;
  v170 = v4;
  v166 = v5;
  v7 = 8 * v6;
  v8 = a1->numxMCUs;
  v168 = v6;
  v9 = a1->jframe.max_vsampling;
  v155 = v7;
  v167 = v7;
  v10 = 8 * v9;
  if ( v8 - 1 == a2 )
  {
    if ( a1->DIBWidth % v155 )
      v167 = a1->DIBWidth % v155;
    a1->state.DIB_ptr = &a1->DIBBytes[a1->DIBLineBytes * (v9 * 8 * a3 + 8 * v9)];
  }
  else
  {
    a1->state.DIB_ptr = &v166[v155 * a1->DIBChannels];
  }
  if ( a3 == a1->numyMCUs - 1 )
  {
    v11 = abs(a1->DIBHeight) % v10;
    if ( v11 )
      v10 = v11;
  }
  v12 = v164;
  v13 = 0;
  if ( a1->JPGChannels <= 0 )
  {
    v165 = v9 << 7;
  }
  else
  {
    v169 = 16 * v10;
    v162 = 2 * v167;
    v163 = v167 - 6;
    v154 = 32 * v10;
    do
    {
      v14 = (int)&v166[v13];
      v15 = 0;
      if ( v169 > 0 )
      {
        v16 = 0;
        v153 = v12 + v162;
        v17 = v155;
        v18 = v167;
        v159 = v12;
        v160 = v13;
        v19 = v168;
        do
        {
          v20 = 0;
          if ( v18 > 0 )
          {
            if ( v18 < 6 )
            {
              v21 = v159 + v16;
            }
            else
            {
              v21 = v159 + v16;
              v168 = 1;
              v165 = 2;
              v22 = 2;
              v161 = 3;
              v155 = 4;
              v157 = v16;
              v23 = 1;
              v158 = v15;
              do
              {
                *(_WORD *)(v21 + 2 * v20) = *(_BYTE *)(v20 * a1->DIBChannels + v14);
                v24 = *(_BYTE *)(v23 * a1->DIBChannels + v14);
                v23 += 5;
                *(_WORD *)(v21 + 2 * v20 + 2) = v24;
                v25 = *(_BYTE *)(v22 * a1->DIBChannels + v14);
                v22 += 5;
                *(_WORD *)(v21 + 2 * v20 + 4) = v25;
                *(_WORD *)(v21 + 2 * v20 + 6) = *(_BYTE *)(v161 * a1->DIBChannels + v14);
                *(_WORD *)(v21 + 2 * v20 + 8) = *(_BYTE *)(v155 * a1->DIBChannels + v14);
                v20 += 5;
                v161 += 5;
                v155 += 5;
              }
              while ( v20 <= v163 );
              v16 = v157;
              v15 = v158;
              v18 = v167;
            }
            v158 = v15;
            do
            {
              *(_WORD *)(v21 + 2 * v20) = *(_BYTE *)(v20 * a1->DIBChannels + v14);
              ++v20;
            }
            while ( v20 < v18 );
            v15 = v158;
            v19 = a1->jframe.max_hsampling;
            v17 = 8 * v19;
          }
          v26 = v18;
          if ( v18 < v17 )
          {
            v156 = v14;
            v27 = v153;
            v157 = v16;
            v28 = v159 + 2 * v15;
            v158 = v15;
            do
            {
              *(_WORD *)(v28 + 2 * v26++) = *(_WORD *)(v27 + 2 * v15 - 2);
              v19 = a1->jframe.max_hsampling;
              v17 = 8 * v19;
            }
            while ( v26 < 8 * v19 );
            v14 = v156;
            v16 = v157;
            v15 = v158;
            v18 = v167;
          }
          v16 += 32;
          v15 += 16;
          v14 += a1->DIBLineBytes;
        }
        while ( v15 < v169 );
        v155 = v17;
        v12 = v159;
        v3 = a1;
        v168 = v19;
        v13 = v160;
        v9 = a1->jframe.max_vsampling;
      }
      v29 = v169;
      v30 = v9 << 7;
      if ( v169 < v9 << 7 )
      {
        v161 = v12 + v154;
        v31 = 2 * v169;
        v159 = v12;
        v160 = v13;
        v32 = v155;
        do
        {
          v33 = 0;
          if ( v32 > 0 )
          {
            v34 = v159 + v31;
            v158 = v29;
            v35 = v161;
            do
            {
              *(_WORD *)(v34 + 2 * v33) = *(_WORD *)(v35 + 2 * v33 - 32);
              v32 = 8 * v3->jframe.max_hsampling;
              ++v33;
            }
            while ( v33 < v32 );
            v168 = v3->jframe.max_hsampling;
            v29 = v158;
            v9 = v3->jframe.max_vsampling;
            v30 = v3->jframe.max_vsampling << 7;
          }
          v31 += 32;
          v29 += 16;
        }
        while ( v29 < v30 );
        v155 = v32;
        v12 = v159;
        v13 = v160;
      }
      v12 += 1024;
      ++v13;
    }
    while ( v13 < v3->JPGChannels );
    v165 = v30;
  }
  v36 = 0;
  if ( v165 > 0 )
  {
    v37 = 0;
    v38 = v165;
    v39 = v155;
    v40 = v164;
    do
    {
      v41 = 0;
      if ( v39 > 0 )
      {
        v42 = v37 + v40;
        v161 = v37;
        v160 = v36;
        v165 = v38;
        v43 = v170;
        do
        {
          v44 = v42;
          v45 = v42 + 256;
          v163 = v42;
          v162 = v41;
          v155 = v39;
          do
          {
            v46 = 0;
            v166 = (char *)v45;
            do
            {
              if ( a1->DIBColor == 1 )
              {
                v47 = *(_WORD *)(v44 + 2 * v46);
                v48 = *(_WORD *)(v44 + 2 * v46 + 1024);
                v49 = *(_WORD *)(v44 + 2 * v46 + 2048);
              }
              else
              {
                v47 = (signed __int16)(255 - *(_WORD *)(v44 + 2 * v46));
                v48 = (signed __int16)(255 - *(_WORD *)(v44 + 2 * v46 + 1024));
                v49 = (signed __int16)(255 - *(_WORD *)(v44 + 2 * v46 + 2048));
              }
              *(_WORD *)v43 = (150 * v48 + 77 * v47 + 29 * v49 - 32640) >> 8;
              ++v46;
              v43 += 2;
            }
            while ( v46 < 8 );
            v45 = (int)v166;
            v44 += 32;
          }
          while ( (signed int)v166 > v44 );
          v39 = v155;
          v42 = v163 + 16;
          v41 = v162 + 8;
        }
        while ( v162 + 8 < v155 );
        v170 = v43;
        v37 = v161;
        v36 = v160;
        v38 = v165;
        v40 = v164;
      }
      v37 += 256;
      v36 += 128;
    }
    while ( v36 < v38 );
    v165 = v38;
    v155 = v39;
    v3 = a1;
    v9 = a1->jframe.max_vsampling;
    v168 = a1->jframe.max_hsampling;
  }
  v50 = v3->jframe.comps;
  v51 = v168 / v50[1].hsampling;
  v52 = v50[1].vsampling;
  v150 = v51;
  v53 = v9 / v52;
  v169 = v51 * (v9 / v52);
  v149 = 0;
  if ( v165 > 0 )
  {
    v54 = v53 << 7;
    v55 = v155;
    v166 = (char *)(16 * v53);
    v56 = v164;
    v163 = 8 * v51;
    v57 = v165;
    v162 = v169 >> 1;
    v58 = v149;
    do
    {
      v59 = 0;
      if ( v55 > 0 )
      {
        v60 = v56 + 2 * v58;
        v149 = v58;
        v165 = v57;
        v61 = v150;
        do
        {
          v62 = 0;
          if ( v54 > 0 )
          {
            v63 = v60 + 2 * v59;
            v64 = v163;
            v168 = v59;
            v167 = v60;
            v155 = v55;
            v65 = (int)v166;
            do
            {
              v66 = 0;
              if ( v64 > 0 )
              {
                v157 = v63 + 2 * v62;
                v156 = v62;
                v154 = v63;
                v153 = v54;
                do
                {
                  v67 = 0;
                  v160 = 0;
                  v68 = 0;
                  v159 = 0;
                  if ( (signed int)v166 > 0 )
                  {
                    v69 = v157 + 2 * v66;
                    v70 = 0;
                    v161 = 0;
                    v71 = v150;
                    v158 = v66;
                    v72 = (int)v166;
                    do
                    {
                      if ( v71 > 0 )
                      {
                        v73 = v69 + v70;
                        v74 = v69 + v70 + 2 * v71;
                        v152 = v69;
                        v75 = v160;
                        v76 = v159;
                        v151 = v68;
                        v77 = v161;
                        do
                        {
                          v77 += *(_WORD *)v73;
                          v75 += *(_WORD *)(v73 + 1024);
                          v76 += *(_WORD *)(v73 + 2048);
                          v73 += 2;
                        }
                        while ( v73 < v74 );
                        v161 = v77;
                        v68 = v151;
                        v71 = v150;
                        v160 = v75;
                        v69 = v152;
                        v159 = v76;
                        v72 = (int)v166;
                      }
                      v70 += 32;
                      v68 += 16;
                    }
                    while ( v68 < v72 );
                    v67 = v161;
                    v66 = v158;
                  }
                  v78 = (signed __int16)((v162 + v67) / v169);
                  v79 = (signed __int16)((v162 + v160) / v169);
                  v80 = (signed __int16)((v162 + v159) / v169);
                  if ( a1->DIBColor != 1 )
                  {
                    v78 = (signed __int16)(255 - v78);
                    v79 = (signed __int16)(255 - v79);
                    v80 = (signed __int16)(255 - v80);
                  }
                  v81 = (-85 * v79 + -43 * v78 + (v80 << 7) + 128) >> 8;
                  v82 = (int)v170;
                  v83 = v163;
                  *(_WORD *)v170 = v81;
                  v66 += v150;
                  v170 = (char *)(v82 + 2);
                }
                while ( v66 < v83 );
                v62 = v156;
                v63 = v154;
                v65 = (int)v166;
                v64 = v163;
                v54 = v153;
              }
              v62 += v65;
            }
            while ( v62 < v54 );
            v59 = v168;
            v60 = v167;
            v61 = v150;
            v55 = v155;
          }
          v59 += 8 * v61;
        }
        while ( v59 < v55 );
        v58 = v149;
        v57 = v165;
        v56 = v164;
      }
      v58 += v54;
    }
    while ( v58 < v57 );
    v165 = v57;
    v3 = a1;
    v84 = a1->jframe.max_hsampling;
    v155 = v55;
    v9 = a1->jframe.max_vsampling;
    v50 = a1->jframe.comps;
    v168 = v84;
  }
  v85 = v168 / v50[2].hsampling;
  v86 = v9 / v50[2].vsampling;
  v87 = v85 * v86;
  v88 = 0;
  if ( v165 > 0 )
  {
    v169 = v86 << 7;
    v167 = 16 * v86;
    v166 = (char *)(8 * v85);
    v89 = v86 << 7;
    v90 = v164;
    v152 = v87 >> 1;
    v91 = v155;
    v153 = v87;
    v92 = v165;
    v168 = v85;
    do
    {
      v93 = 0;
      if ( v91 > 0 )
      {
        v94 = v90 + 2 * v88;
        v151 = v88;
        v165 = v92;
        v95 = v168;
        do
        {
          v96 = 0;
          if ( v89 > 0 )
          {
            v97 = v94 + 2 * v93;
            v98 = (int)v166;
            v149 = v93;
            v150 = v94;
            v155 = v91;
            v99 = v167;
            do
            {
              v100 = 0;
              if ( v98 > 0 )
              {
                v159 = v97 + 2 * v96;
                v158 = v96;
                v157 = v97;
                do
                {
                  v101 = 0;
                  v162 = 0;
                  v102 = 0;
                  v161 = 0;
                  if ( v167 > 0 )
                  {
                    v103 = v159 + 2 * v100;
                    v104 = 0;
                    v163 = 0;
                    v105 = v168;
                    v160 = v100;
                    v106 = v167;
                    do
                    {
                      if ( v105 > 0 )
                      {
                        v107 = v103 + v104;
                        v108 = v103 + v104 + 2 * v105;
                        v156 = v103;
                        v109 = v162;
                        v110 = v161;
                        v154 = v102;
                        v111 = v163;
                        do
                        {
                          v111 += *(_WORD *)v107;
                          v109 += *(_WORD *)(v107 + 1024);
                          v110 += *(_WORD *)(v107 + 2048);
                          v107 += 2;
                        }
                        while ( v107 < v108 );
                        v163 = v111;
                        v102 = v154;
                        v105 = v168;
                        v162 = v109;
                        v103 = v156;
                        v161 = v110;
                        v106 = v167;
                      }
                      v104 += 32;
                      v102 += 16;
                    }
                    while ( v102 < v106 );
                    v101 = v163;
                    v100 = v160;
                  }
                  v112 = (signed __int16)((v152 + v101) / v153);
                  v113 = (signed __int16)((v152 + v162) / v153);
                  v114 = (signed __int16)((v152 + v161) / v153);
                  if ( a1->DIBColor != 1 )
                  {
                    v112 = (signed __int16)(255 - v112);
                    v113 = (signed __int16)(255 - v113);
                    v114 = (signed __int16)(255 - v114);
                  }
                  v115 = (-107 * v113 + (v112 << 7) + -21 * v114 + 128) >> 8;
                  v116 = (int)v170;
                  v117 = (int)v166;
                  *(_WORD *)v170 = v115;
                  v100 += v168;
                  v170 = (char *)(v116 + 2);
                }
                while ( v100 < v117 );
                v96 = v158;
                v97 = v157;
                v99 = v167;
                v98 = (int)v166;
                v89 = v169;
              }
              v96 += v99;
            }
            while ( v96 < v89 );
            v93 = v149;
            v94 = v150;
            v95 = v168;
            v91 = v155;
          }
          v93 += 8 * v95;
        }
        while ( v93 < v91 );
        v88 = v151;
        v92 = v165;
        v90 = v164;
      }
      v88 += v89;
    }
    while ( v88 < v92 );
    v165 = v92;
    v3 = a1;
    v155 = v91;
  }
  if ( v3->DIBColor != 1 )
  {
    v118 = v3->jframe.comps;
    v119 = v3->jframe.max_hsampling / v118[3].hsampling;
    v120 = v3->jframe.max_vsampling / v118[3].vsampling;
    v121 = v119 * v120;
    v122 = v119 * v120 >> 1;
    v123 = 0;
    if ( v165 > 0 )
    {
      v159 = v120 << 7;
      v163 = 8 * v119;
      v169 = v119 - 6;
      v149 = 16 * v120;
      v124 = v165;
      v125 = v164;
      v150 = v122;
      v126 = v159;
      v151 = v121;
      v127 = v155;
      v152 = v119;
      do
      {
        v128 = 0;
        if ( v127 > 0 )
        {
          v129 = v125 + 2 * v123;
          v166 = (char *)v123;
          v165 = v124;
          v130 = v152;
          do
          {
            v131 = 0;
            if ( v126 > 0 )
            {
              v132 = v129 + 2 * v128;
              v133 = v163;
              v153 = v128;
              v154 = v129;
              v155 = v127;
              v134 = v149;
              do
              {
                v135 = 0;
                if ( v133 > 0 )
                {
                  v136 = v152;
                  v162 = v132 + 2 * v131;
                  v161 = v131;
                  v160 = v132;
                  do
                  {
                    v137 = 0;
                    v138 = 0;
                    if ( v134 > 0 )
                    {
                      v139 = v162 + 2 * v135;
                      v140 = 0;
                      v157 = 0;
                      v158 = v135;
                      do
                      {
                        v141 = 0;
                        if ( v136 > 0 )
                        {
                          if ( v136 < 6 )
                          {
                            v142 = v139 + v140;
                          }
                          else
                          {
                            v142 = v139 + v140;
                            v143 = v157;
                            v156 = v138;
                            do
                            {
                              v143 += *(_WORD *)(v142 + 2 * v141 + 3080)
                                    + *(_WORD *)(v142 + 2 * v141 + 3078)
                                    + *(_WORD *)(v142 + 2 * v141 + 3076)
                                    + *(_WORD *)(v142 + 2 * v141 + 3074)
                                    + *(_WORD *)(v142 + 2 * v141 + 3072);
                              v141 += 5;
                            }
                            while ( v141 <= v169 );
                            v157 = v143;
                            v138 = v156;
                            v136 = v152;
                          }
                          v156 = v138;
                          v144 = v157;
                          do
                            v144 += *(_WORD *)(v142 + 2 * v141++ + 3072);
                          while ( v141 < v136 );
                          v157 = v144;
                          v138 = v156;
                          v134 = v149;
                        }
                        v140 += 32;
                        v138 += 16;
                      }
                      while ( v138 < v134 );
                      v137 = v157;
                      v135 = v158;
                    }
                    v145 = v150 + v137;
                    if ( a1->DIBColor == 1 )
                    {
                      v147 = v170;
                      v170 += 2;
                      *(_WORD *)v147 = v145 / v151;
                    }
                    else
                    {
                      v146 = v170;
                      v170 += 2;
                      *(_WORD *)v146 = (unsigned int)(v145 / v151) - 128;
                    }
                    v135 += v136;
                  }
                  while ( v135 < v163 );
                  v131 = v161;
                  v132 = v160;
                  v133 = v163;
                  v126 = v159;
                }
                v131 += v134;
              }
              while ( v131 < v126 );
              v128 = v153;
              v129 = v154;
              v130 = v152;
              v127 = v155;
            }
            v128 += 8 * v130;
          }
          while ( v128 < v127 );
          v123 = (int)v166;
          v124 = v165;
          v125 = v164;
        }
        v123 += v126;
      }
      while ( v123 < v124 );
    }
  }
}

//----- (00774350) --------------------------------------------------------
void __cdecl CC_RGB_to_YCbCr_General_MCU(struct _JPEG_PROPERTIES *a1, int a2, int a3)
{
  char *v3; // ebp@1
  char *v4; // esi@1
  signed int v5; // ecx@1
  signed int v6; // ebx@1
  signed int v7; // eax@2
  __int64 v8; // rax@7
  int v9; // eax@7
  int v10; // eax@10
  signed int v11; // ecx@12
  int v12; // edx@13
  signed int v13; // eax@13
  int v14; // esi@14
  signed int v15; // ebp@16
  signed int v16; // ebx@16
  int v17; // eax@16
  int v18; // edi@17
  int v19; // edi@17
  signed int v20; // ebp@20
  int v21; // ebx@22
  int v22; // edi@22
  int v23; // esi@22
  int v24; // edi@29
  int v25; // edx@29
  int v26; // edx@33
  signed int v27; // eax@34
  _IJL_COLOR v28; // edx@35
  int v29; // edi@36
  int v30; // edi@37
  int v31; // ecx@37
  int v32; // ebx@37
  int v33; // edx@37
  _IJL_COLOR v34; // eax@45
  signed int v35; // edx@47
  int v36; // eax@48
  signed int v37; // ebx@49
  int v38; // edx@51
  int v39; // eax@51
  int v40; // edx@52
  int v41; // eax@52
  int v42; // ebp@52
  int v43; // ecx@52
  int v44; // edi@52
  signed int v45; // ebp@55
  int v46; // ebx@57
  int v47; // edi@57
  int v48; // esi@57
  int v49; // eax@62
  int v50; // ebx@63
  int v51; // eax@63
  int v52; // edx@67
  int v53; // eax@67
  signed int v54; // [sp+4h] [bp-58h]@11
  signed int v55; // [sp+4h] [bp-58h]@50
  int v56; // [sp+8h] [bp-54h]@50
  signed int v57; // [sp+Ch] [bp-50h]@50
  signed int v58; // [sp+10h] [bp-4Ch]@13
  signed int v59; // [sp+10h] [bp-4Ch]@48
  int v60; // [sp+14h] [bp-48h]@16
  int v61; // [sp+14h] [bp-48h]@50
  char *v62; // [sp+18h] [bp-44h]@13
  char *v63; // [sp+18h] [bp-44h]@48
  char *v64; // [sp+1Ch] [bp-40h]@11
  char *v65; // [sp+1Ch] [bp-40h]@34
  char *v66; // [sp+1Ch] [bp-40h]@48
  int v67; // [sp+20h] [bp-3Ch]@13
  signed int v68; // [sp+24h] [bp-38h]@16
  int v69; // [sp+28h] [bp-34h]@13
  char *v70; // [sp+2Ch] [bp-30h]@13
  int v71; // [sp+30h] [bp-2Ch]@11
  int v72; // [sp+30h] [bp-2Ch]@48
  int v73; // [sp+34h] [bp-28h]@11
  int v74; // [sp+38h] [bp-24h]@11
  int v75; // [sp+3Ch] [bp-20h]@11
  int v76; // [sp+40h] [bp-1Ch]@11
  int v77; // [sp+40h] [bp-1Ch]@34
  int v78; // [sp+44h] [bp-18h]@11
  int v79; // [sp+44h] [bp-18h]@34
  int v80; // [sp+44h] [bp-18h]@48

  v3 = a1->MCUBuf;
  v4 = a1->state.DIB_ptr;
  v5 = 8;
  v6 = 8;
  if ( a1->numxMCUs - 1 == a2 )
  {
    v7 = (((unsigned __int64)a1->DIBWidth >> 32) ^ abs(a1->DIBWidth) & 7) - ((unsigned __int64)a1->DIBWidth >> 32);
    if ( v7 )
      v5 = v7;
    a1->state.DIB_ptr = &a1->DIBBytes[8 * a1->DIBLineBytes] + a1->DIBLineBytes * 8 * a3;
  }
  else
  {
    a1->state.DIB_ptr = &v4[8 * a1->DIBChannels];
  }
  if ( a3 == a1->numyMCUs - 1 )
  {
    v8 = abs(a1->DIBHeight);
    v9 = (HIDWORD(v8) ^ abs(v8) & 7) - HIDWORD(v8);
    if ( v9 )
      v6 = v9;
  }
  if ( a1->JPGColor != 4 || (v34 = a1->DIBColor, v34 != 1) && v34 != 2 )
  {
    v10 = 0;
    if ( a1->JPGChannels > 0 )
    {
      v74 = 2 * v6;
      v73 = 8 * v6;
      v75 = 16 * v6;
      v71 = 8 - v5;
      v78 = 2 * v5;
      v76 = v5 - 5;
      v54 = v5;
      v64 = v3;
      do
      {
        v11 = 0;
        if ( v6 > 0 )
        {
          v12 = 0;
          v58 = v6;
          v67 = (int)&v3[v78];
          v69 = v10;
          v70 = v3;
          v13 = v54;
          v62 = v4;
          do
          {
            v14 = 0;
            if ( v13 > 0 )
            {
              if ( v13 < 5 )
              {
                v60 = (int)&v70[v12];
              }
              else
              {
                v60 = (int)&v70[v12];
                v15 = 2;
                v16 = 3;
                v68 = 1;
                v17 = (int)&v70[v12];
                do
                {
                  *(_WORD *)(v17 + 2 * v14) = (unsigned __int8)*(&v62[v14 * a1->DIBChannels] + v11 * a1->DIBLineBytes);
                  *(_WORD *)(v17 + 2 * v14 + 2) = (unsigned __int8)*(&v62[v68 * a1->DIBChannels] + v11
                                                                                                 * a1->DIBLineBytes);
                  v18 = (int)&v62[v15 * a1->DIBChannels];
                  v15 += 4;
                  *(_WORD *)(v17 + 2 * v14 + 4) = *(_BYTE *)(v11 * a1->DIBLineBytes + v18);
                  v19 = (int)&v62[v16 * a1->DIBChannels];
                  v16 += 4;
                  *(_WORD *)(v17 + 2 * v14 + 6) = *(_BYTE *)(v11 * a1->DIBLineBytes + v19);
                  v14 += 4;
                  v68 += 4;
                }
                while ( v14 <= v76 );
                v13 = v54;
              }
              do
              {
                *(_WORD *)(v60 + 2 * v14) = (unsigned __int8)*(&v62[v14 * a1->DIBChannels] + a1->DIBLineBytes * v11);
                ++v14;
              }
              while ( v14 < v13 );
            }
            v20 = v13;
            if ( v13 < 8 )
            {
              if ( v71 < 6 )
              {
                v22 = (int)&v70[v12];
                v23 = v12 + v67;
              }
              else
              {
                v21 = 16 * v11;
                v22 = (int)&v70[16 * v11];
                v23 = 16 * v11 + v67;
                do
                {
                  *(_WORD *)(v22 + 2 * v20) = *(_WORD *)(v67 + v21 - 2);
                  *(_WORD *)(v22 + 2 * v20 + 2) = *(_WORD *)(v67 + v21 - 2);
                  *(_WORD *)(v22 + 2 * v20 + 4) = *(_WORD *)(v67 + v21 - 2);
                  *(_WORD *)(v22 + 2 * v20 + 6) = *(_WORD *)(v67 + v21 - 2);
                  *(_WORD *)(v22 + 2 * v20 + 8) = *(_WORD *)(v67 + v21 - 2);
                  v20 += 5;
                }
                while ( v20 < 2 );
                v13 = v54;
              }
              do
                *(_WORD *)(v22 + 2 * v20++) = *(_WORD *)(v23 - 2);
              while ( v20 < 8 );
            }
            v12 += 16;
            ++v11;
            v6 = v58;
          }
          while ( v11 < v58 );
          v10 = v69;
          v3 = v70;
          v4 = v62;
        }
        if ( v73 < 64 )
        {
          v24 = (int)&v3[v75];
          v25 = (int)&v3[8 * v74];
          do
          {
            *(_WORD *)v25 = *(_WORD *)(v24 - 16);
            *(_WORD *)(v25 + 2) = *(_WORD *)(v24 - 14);
            *(_WORD *)(v25 + 4) = *(_WORD *)(v24 - 12);
            *(_WORD *)(v25 + 6) = *(_WORD *)(v24 - 10);
            *(_WORD *)(v25 + 8) = *(_WORD *)(v24 - 8);
            *(_WORD *)(v25 + 10) = *(_WORD *)(v24 - 6);
            *(_WORD *)(v25 + 12) = *(_WORD *)(v24 - 4);
            *(_WORD *)(v25 + 14) = *(_WORD *)(v24 - 2);
            v25 += 16;
          }
          while ( (signed int)(v3 + 128) > v25 );
        }
        v3 += 128;
        ++v4;
        ++v10;
      }
      while ( v10 < a1->JPGChannels );
      v3 = v64;
    }
    v26 = (int)(v3 + 128);
    do
    {
      v27 = 0;
      v77 = 0;
      v79 = v26;
      v65 = v3;
      do
      {
        v28 = a1->DIBColor;
        if ( v28 == 2 )
        {
          v30 = (int)&v3[v77];
          v33 = *(_WORD *)&v3[2 * v27];
          v32 = *(_WORD *)&v3[2 * v27 + 128];
          v31 = *(_WORD *)&v3[2 * v27 + 256];
        }
        else
        {
          v29 = 2 * v27;
          if ( v28 == 1 )
          {
            v30 = (int)&v3[v29];
            v31 = *(_WORD *)v30;
            v32 = *(_WORD *)(v30 + 128);
            v33 = *(_WORD *)(v30 + 256);
          }
          else
          {
            v30 = (int)&v3[v29];
            v31 = (signed __int16)(255 - *(_WORD *)v30);
            v32 = (signed __int16)(255 - *(_WORD *)(v30 + 128));
            v33 = (signed __int16)(255 - *(_WORD *)(v30 + 256));
            *(_WORD *)(v30 + 384) -= 128;
          }
        }
        *(_WORD *)v30 = (150 * v32 + 77 * v31 + 29 * v33 - 32640) >> 8;
        *(_WORD *)(v30 + 128) = (-85 * v32 + -43 * v31 + (v33 << 7) + 128) >> 8;
        *(_WORD *)(v30 + 256) = (-107 * v32 + (v31 << 7) + -21 * v33 + 128) >> 8;
        ++v27;
        v77 += 2;
      }
      while ( v27 < 8 );
      v26 = v79;
      v3 += 16;
    }
    while ( v79 > (signed int)(v65 + 16) );
  }
  else
  {
    v35 = 0;
    if ( v6 > 0 )
    {
      v72 = 8 - v5;
      v80 = (int)&v3[2 * v5];
      v36 = 0;
      v59 = v6;
      v63 = v4;
      v66 = v3;
      do
      {
        v37 = 0;
        if ( v5 > 0 )
        {
          v56 = (int)&v66[v36];
          v61 = v36;
          v57 = v35;
          v55 = v5;
          do
          {
            v38 = a1->DIBChannels;
            v39 = a1->DIBLineBytes;
            if ( a1->DIBColor == 1 )
            {
              v52 = v37 * v38;
              v53 = (int)&v63[v57 * v39];
              v44 = *(_BYTE *)(v52 + v53);
              v43 = *(_BYTE *)(v52 + v53 + 1);
              v42 = *(_BYTE *)(v52 + v53 + 2);
            }
            else
            {
              v40 = v37 * v38;
              v41 = (int)&v63[v57 * v39];
              v42 = *(_BYTE *)(v40 + v41);
              v43 = *(_BYTE *)(v40 + v41 + 1);
              v44 = *(_BYTE *)(v40 + v41 + 2);
            }
            *(_WORD *)(v56 + 2 * v37++) = (150 * v43 + 77 * v44 + 29 * v42 - 32640) >> 8;
          }
          while ( v37 < v55 );
          v36 = v61;
          v35 = v57;
          v5 = v55;
        }
        v45 = v5;
        if ( v5 < 8 )
        {
          if ( v72 < 6 )
          {
            v47 = (int)&v66[v36];
            v48 = v36 + v80;
          }
          else
          {
            v46 = 16 * v35;
            v47 = (int)&v66[16 * v35];
            v48 = 16 * v35 + v80;
            do
            {
              *(_WORD *)(v47 + 2 * v45) = *(_WORD *)(v80 + v46 - 2);
              *(_WORD *)(v47 + 2 * v45 + 2) = *(_WORD *)(v80 + v46 - 2);
              *(_WORD *)(v47 + 2 * v45 + 4) = *(_WORD *)(v80 + v46 - 2);
              *(_WORD *)(v47 + 2 * v45 + 6) = *(_WORD *)(v80 + v46 - 2);
              *(_WORD *)(v47 + 2 * v45 + 8) = *(_WORD *)(v80 + v46 - 2);
              v45 += 5;
            }
            while ( v45 < 2 );
          }
          do
            *(_WORD *)(v47 + 2 * v45++) = *(_WORD *)(v48 - 2);
          while ( v45 < 8 );
        }
        v36 += 16;
        ++v35;
        v6 = v59;
      }
      while ( v35 < v59 );
      v3 = v66;
    }
    v49 = 2 * v6;
    if ( 8 * v6 < 64 )
    {
      v50 = 16 * v6;
      v51 = (int)&v3[8 * v49];
      do
      {
        *(_WORD *)v51 = *(_WORD *)&v3[v50 - 16];
        *(_WORD *)(v51 + 2) = *(_WORD *)&v3[v50 - 14];
        *(_WORD *)(v51 + 4) = *(_WORD *)&v3[v50 - 12];
        *(_WORD *)(v51 + 6) = *(_WORD *)&v3[v50 - 10];
        *(_WORD *)(v51 + 8) = *(_WORD *)&v3[v50 - 8];
        *(_WORD *)(v51 + 10) = *(_WORD *)&v3[v50 - 6];
        *(_WORD *)(v51 + 12) = *(_WORD *)&v3[v50 - 4];
        *(_WORD *)(v51 + 14) = *(_WORD *)&v3[v50 - 2];
        v51 += 16;
      }
      while ( (signed int)(v3 + 128) > v51 );
    }
  }
}

//----- (00774A70) --------------------------------------------------------
void __cdecl SS_General_MCU(struct _JPEG_PROPERTIES *a1, int a2, int a3)
{
  struct _JPEG_PROPERTIES *v3; // ebx@1
  char *v4; // ebp@1
  int v5; // ecx@1
  signed int v6; // esi@1
  int v7; // edi@1
  signed int v8; // ecx@1
  int v9; // edx@7
  int v10; // ebp@9
  int v11; // edx@9
  int v12; // eax@10
  int v13; // ecx@10
  _IJL_COLOR v14; // edx@10
  int v15; // edx@12
  int v16; // edi@14
  signed int v17; // edi@14
  int v18; // eax@14
  int v19; // esi@15
  int v20; // ebp@17
  int v21; // ecx@17
  int v22; // ebp@18
  int v23; // esi@18
  int v24; // edi@18
  char v25; // bl@18
  int v26; // ebp@18
  int v27; // ebx@18
  int v28; // ebp@19
  int v29; // ebx@20
  int v30; // ecx@20
  char v31; // al@21
  int v32; // esi@23
  int v33; // ecx@23
  int v34; // ebx@24
  int v35; // edx@29
  int v36; // edi@30
  int v37; // esi@31
  int v38; // ebp@32
  int v39; // ebx@32
  char v40; // al@33
  signed int v41; // ebx@37
  _FRAME_COMPONENT *v42; // edi@38
  int v43; // ebp@38
  int v44; // eax@38
  int v45; // edx@39
  int v46; // edi@39
  int v47; // esi@39
  struct _JPEG_PROPERTIES *v48; // ebp@39
  int v49; // eax@40
  int v50; // ecx@41
  int v51; // ebx@41
  int v52; // esi@42
  int v53; // edi@43
  _IJL_COLOR v54; // ebx@43
  int v55; // eax@43
  int v56; // ecx@44
  signed int v57; // ebp@45
  char *v58; // esi@45
  int v59; // eax@46
  int v60; // edx@48
  int v61; // eax@49
  int v62; // ebx@49
  int v63; // edi@50
  int v64; // esi@52
  int v65; // ecx@52
  int v66; // esi@55
  int v67; // eax@69
  char v68[15]; // [sp+0h] [bp-574h]@33
  char v69; // [sp+Fh] [bp-565h]@25
  char v70; // [sp+10h] [bp-564h]@18
  char v71; // [sp+11h] [bp-563h]@18
  char v72; // [sp+12h] [bp-562h]@18
  char v73; // [sp+13h] [bp-561h]@18
  char v74[1276]; // [sp+14h] [bp-560h]@18
  int v75; // [sp+510h] [bp-64h]@10
  int v76; // [sp+514h] [bp-60h]@1
  char *v77; // [sp+518h] [bp-5Ch]@1
  int v78; // [sp+51Ch] [bp-58h]@1
  char *v79; // [sp+520h] [bp-54h]@1
  _IJL_COLOR v80; // [sp+524h] [bp-50h]@10
  int v81; // [sp+528h] [bp-4Ch]@10
  int v82; // [sp+52Ch] [bp-48h]@17
  int v83; // [sp+530h] [bp-44h]@17
  int v84; // [sp+534h] [bp-40h]@10
  int v85; // [sp+538h] [bp-3Ch]@10
  int v86; // [sp+53Ch] [bp-38h]@14
  int v87; // [sp+540h] [bp-34h]@17
  int v88; // [sp+544h] [bp-30h]@17
  int v89; // [sp+548h] [bp-2Ch]@17
  int v90; // [sp+54Ch] [bp-28h]@17
  int v91; // [sp+550h] [bp-24h]@14
  int v92; // [sp+554h] [bp-20h]@14
  int v93; // [sp+558h] [bp-1Ch]@17
  int v94; // [sp+55Ch] [bp-18h]@17
  int v95; // [sp+560h] [bp-14h]@10

  v3 = a1;
  v4 = a1->state.DIB_ptr;
  v5 = a1->jframe.max_hsampling;
  v79 = a1->MCUBuf;
  v77 = v4;
  v6 = 8 * v5;
  v7 = 8 * v5;
  v78 = v5;
  v76 = a1->jframe.max_vsampling;
  v8 = 8 * v76;
  if ( a1->numxMCUs - 1 == a2 )
  {
    if ( a1->DIBWidth % v6 )
      v7 = a1->DIBWidth % v6;
    a1->state.DIB_ptr = &a1->DIBBytes[a1->DIBLineBytes * (v76 * 8 * a3 + 8 * v76)];
  }
  else
  {
    a1->state.DIB_ptr = &v77[v6 * a1->DIBChannels];
  }
  if ( a3 == a1->numyMCUs - 1 )
  {
    v9 = abs(a1->DIBHeight) % v8;
    if ( v9 )
      v8 = v9;
  }
  v10 = 0;
  v11 = a1->JPGChannels;
  if ( v11 > 0 )
  {
    v75 = v76 << 7;
    v80 = a1->DIBColor;
    v81 = v7 - 6;
    v12 = 16 * v8;
    v13 = v76 << 7;
    v84 = v6;
    v85 = v11;
    v95 = v7;
    v14 = v80;
LABEL_11:
    if ( v14 != 2 || v3->JPGColor != 1 )
      v15 = (int)&v77[v10];
    else
      v15 = (int)&v77[-v10 + 2];
    if ( v12 > 0 )
    {
      v16 = v3->DIBLineBytes;
      v75 = v13;
      v86 = v16;
      v17 = v95;
      v91 = v10;
      v92 = v12;
      v18 = 0;
      do
      {
        v19 = 0;
        if ( v17 > 0 )
        {
          if ( v17 < 6 )
          {
            v28 = a1->DIBChannels;
          }
          else
          {
            v20 = a1->DIBChannels;
            v94 = v18;
            v21 = 0;
            v93 = 5 * v20;
            v90 = 1;
            v89 = 2;
            v88 = 3;
            v80 = 4;
            v83 = v20;
            v87 = v18;
            v82 = 0;
            do
            {
              v22 = v90 * v83;
              v23 = v89 * v83;
              v24 = v88 * v83;
              *(&v70 + v18) = *(_BYTE *)(v21 + v15);
              v25 = *(_BYTE *)(v22 + v15);
              v26 = v81;
              *(&v71 + v18) = v25;
              *(&v72 + v18) = *(_BYTE *)(v23 + v15);
              *(&v73 + v18) = *(_BYTE *)(v24 + v15);
              v74[v18] = *(_BYTE *)(v80 * v83 + v15);
              v18 += 5;
              v21 += v93;
              v27 = v82 + 5;
              v90 += 5;
              v89 += 5;
              v88 += 5;
              v80 += 5;
              v82 = v27;
            }
            while ( v27 <= v26 );
            v28 = v83;
            v18 = v87;
            v19 = v27;
            v17 = v95;
          }
          v29 = v19 * v28;
          v30 = v19 + v18;
          v87 = v18;
          do
          {
            v31 = *(_BYTE *)(v29 + v15);
            v29 += v28;
            ++v19;
            *(&v70 + v30++) = v31;
          }
          while ( v19 < v17 );
          v18 = v87;
        }
        v32 = v17;
        v33 = v84;
        if ( v17 < v84 )
        {
          v34 = v17 + v18;
          do
          {
            ++v32;
            *(&v70 + v34++) = *(&v69 + v18 + v17);
          }
          while ( v32 < v33 );
          v17 = v95;
        }
        v15 += v86;
        v18 += 16;
      }
      while ( v18 < v92 );
      v13 = v75;
      v10 = v91;
      v12 = v92;
    }
    v35 = v12;
    if ( v12 < v13 )
    {
      v91 = v10;
      v36 = v84;
      do
      {
        v37 = 0;
        if ( v36 > 0 )
        {
          v38 = v12;
          v39 = v35;
          v92 = v12;
          do
          {
            v40 = v68[v38++];
            ++v37;
            *(&v70 + v39++) = v40;
          }
          while ( v37 < v36 );
          v12 = v92;
        }
        v35 += 16;
      }
      while ( v35 < v13 );
      v84 = v36;
      v10 = v91;
    }
    v91 = v10;
    v41 = v76;
    v92 = v12;
    while ( 1 )
    {
      v42 = a1->jframe.comps;
      v43 = v78 / v42[v91].hsampling;
      v44 = v41 / v42[v91].vsampling;
      v94 = v43 * v44;
      v93 = v43 * v44 >> 1;
      v86 = 0;
      if ( v13 > 0 )
      {
        v45 = v44 << 7;
        v82 = v43 - 5;
        v80 = 16 * v44;
        v46 = v84;
        v88 = 8 * v43;
        v47 = v86;
        v90 = v43;
        v48 = a1;
        do
        {
          v49 = 0;
          if ( v46 > 0 )
          {
            v86 = v47;
            v50 = v90;
            v51 = v78;
            do
            {
              v52 = 0;
              if ( v45 > 0 )
              {
                v53 = v86 + v49;
                v54 = v80;
                v87 = v49;
                v55 = v88;
                do
                {
                  v56 = 0;
                  if ( v55 > 0 )
                  {
                    v75 = v52 + v53;
                    v83 = v52;
                    v57 = v90;
                    v58 = v79;
                    v85 = v53;
                    v89 = v45;
                    do
                    {
                      v59 = 0;
                      if ( !v91 || (*(_WORD *)v58 = 0, a1->DIBColor != 4) || a1->JPGColor != 3 )
                      {
                        v60 = 0;
                        if ( (signed int)v54 > 0 )
                        {
                          v78 = 0;
                          v61 = v54;
                          v62 = v56 + v75;
                          v84 = v56;
                          v79 = v58;
                          do
                          {
                            v63 = 0;
                            if ( v57 > 0 )
                            {
                              if ( v57 < 5 )
                              {
                                v64 = v60 + v62;
                              }
                              else
                              {
                                v64 = v60 + v62;
                                v65 = v60 + v62;
                                v76 = v62;
                                v80 = v61;
                                LOWORD(v61) = v78;
                                do
                                {
                                  v61 = (signed __int16)(v61
                                                       + (unsigned __int8)*(&v70 + v65)
                                                       + (unsigned __int8)*(&v71 + v65)
                                                       + (unsigned __int8)*(&v72 + v65)
                                                       + (unsigned __int8)*(&v73 + v65));
                                  v65 += 4;
                                  v63 += 4;
                                }
                                while ( v63 <= v82 );
                                v78 = v61;
                                v62 = v76;
                                v61 = v80;
                                v57 = v90;
                              }
                              v66 = v63 + v64;
                              v80 = v61;
                              LOWORD(v61) = v78;
                              do
                              {
                                v61 = (signed __int16)(v61 + (unsigned __int8)*(&v70 + v66++));
                                ++v63;
                              }
                              while ( v63 < v57 );
                              v78 = v61;
                              v61 = v80;
                            }
                            v60 += 16;
                          }
                          while ( v60 < v61 );
                          v54 = v61;
                          v59 = v78;
                          v56 = v84;
                          v58 = v79;
                        }
                        *(_WORD *)v58 = (unsigned int)((v93 + v59) / v94) - 128;
                      }
                      v58 += 2;
                      v56 += v57;
                      v55 = v88;
                    }
                    while ( v56 < v88 );
                    v79 = v58;
                    v52 = v83;
                    v53 = v85;
                    v45 = v89;
                  }
                  v52 += v54;
                }
                while ( v52 < v45 );
                v80 = v54;
                v49 = v87;
                v50 = v90;
                v48 = a1;
                v51 = a1->jframe.max_hsampling;
                v46 = 8 * v51;
              }
              v49 += 8 * v50;
            }
            while ( v49 < v46 );
            v78 = v51;
            v47 = v86;
            v41 = v48->jframe.max_vsampling;
            v13 = v48->jframe.max_vsampling << 7;
          }
          v47 += v45;
        }
        while ( v47 < v13 );
        v84 = v46;
        v85 = a1->JPGChannels;
      }
      v67 = v91 + 1;
      v91 = v67;
      if ( v67 >= v85 )
        break;
      if ( !v67 )
      {
        v76 = v41;
        v10 = 0;
        v12 = v92;
        v3 = a1;
        v14 = a1->DIBColor;
        goto LABEL_11;
      }
      v14 = a1->DIBColor;
      if ( v14 != 4 )
      {
        v76 = v41;
        v10 = v91;
        v12 = v92;
        v3 = a1;
        goto LABEL_11;
      }
      if ( a1->JPGColor != 3 )
      {
        v76 = v41;
        v10 = v91;
        v12 = v92;
        v3 = a1;
        goto LABEL_11;
      }
    }
  }
}
// 774A70: using guessed type char var_560[1276];
// 774A70: using guessed type char var_574[15];

//----- (00775240) --------------------------------------------------------
void __cdecl Input_Interleave_General_MCU(struct _JPEG_PROPERTIES *a1, int a2, int a3)
{
  struct _JPEG_PROPERTIES *v3; // ebx@1
  char *v4; // edi@1
  signed int v5; // esi@1
  signed int v6; // ecx@1
  signed int v7; // eax@2
  __int64 v8; // rax@7
  int v9; // eax@7
  int v10; // ebp@9
  char *v11; // esi@10
  int v12; // eax@12
  signed int v13; // ecx@13
  int v14; // edx@14
  signed int v15; // esi@14
  signed int v16; // ebx@15
  int v17; // ebp@16
  signed int v18; // ebx@21
  int v19; // ebp@23
  int v20; // ecx@23
  int v21; // ecx@31
  int v22; // eax@31
  int v23; // [sp+4h] [bp-50h]@10
  int v24; // [sp+8h] [bp-4Ch]@10
  int v25; // [sp+Ch] [bp-48h]@10
  int v26; // [sp+10h] [bp-44h]@10
  char *v27; // [sp+14h] [bp-40h]@1
  char *v28; // [sp+14h] [bp-40h]@14
  signed int v29; // [sp+18h] [bp-3Ch]@10
  signed int v30; // [sp+20h] [bp-34h]@10
  int v31; // [sp+24h] [bp-30h]@14
  int v32; // [sp+28h] [bp-2Ch]@10
  signed int v33; // [sp+2Ch] [bp-28h]@23
  int v34; // [sp+34h] [bp-20h]@23
  int v35; // [sp+38h] [bp-1Ch]@23
  int v36; // [sp+3Ch] [bp-18h]@14

  v3 = a1;
  v4 = a1->state.DIB_ptr;
  v5 = 8;
  v27 = a1->MCUBuf;
  v6 = 8;
  if ( a1->numxMCUs - 1 == a2 )
  {
    v7 = (((unsigned __int64)a1->DIBWidth >> 32) ^ abs(a1->DIBWidth) & 7) - ((unsigned __int64)a1->DIBWidth >> 32);
    if ( v7 )
      v5 = v7;
    a1->state.DIB_ptr = &a1->DIBBytes[8 * a1->DIBLineBytes] + a1->DIBLineBytes * 8 * a3;
  }
  else
  {
    a1->state.DIB_ptr = &v4[8 * a1->DIBChannels];
  }
  if ( a3 == a1->numyMCUs - 1 )
  {
    v8 = abs(a1->DIBHeight);
    v9 = (HIDWORD(v8) ^ abs(v8) & 7) - HIDWORD(v8);
    if ( v9 )
      v6 = v9;
  }
  v10 = 0;
  if ( a1->JPGChannels > 0 )
  {
    v24 = 2 * v6;
    v25 = 8 * v6;
    v23 = 16 * v6;
    v26 = 2 * v5;
    v32 = 8 - v5;
    v30 = v6;
    v29 = v5;
    v11 = v27;
    do
    {
      if ( v3->DIBColor != 2 || v3->JPGColor != 1 )
        v12 = (int)&v4[v10];
      else
        v12 = (int)&v4[-v10 + 2];
      v13 = 0;
      if ( v30 > 0 )
      {
        v14 = 0;
        v36 = (int)&v11[v26];
        v31 = v10;
        v28 = v11;
        v15 = v29;
        do
        {
          v16 = 0;
          if ( v15 > 0 )
          {
            v17 = (int)&v28[v14];
            do
            {
              if ( v31 && a1->DIBColor == 4 && a1->JPGColor == 3 )
                *(_WORD *)(v17 + 2 * v16) = 0;
              else
                *(_WORD *)(v17 + 2 * v16) = *(_BYTE *)(v16 * a1->DIBChannels + v12) - 128;
              ++v16;
            }
            while ( v16 < v15 );
          }
          v18 = v15;
          if ( v15 < 8 )
          {
            if ( v32 < 6 )
            {
              v34 = (int)&v28[v14];
              v35 = v14 + v36;
            }
            else
            {
              v19 = 16 * v13;
              v34 = (int)&v28[16 * v13];
              v35 = 16 * v13 + v36;
              v33 = v13;
              v20 = (int)&v28[16 * v13];
              do
              {
                *(_WORD *)(v20 + 2 * v18) = *(_WORD *)(v36 + v19 - 2);
                *(_WORD *)(v20 + 2 * v18 + 2) = *(_WORD *)(v36 + v19 - 2);
                *(_WORD *)(v20 + 2 * v18 + 4) = *(_WORD *)(v36 + v19 - 2);
                *(_WORD *)(v20 + 2 * v18 + 6) = *(_WORD *)(v36 + v19 - 2);
                *(_WORD *)(v20 + 2 * v18 + 8) = *(_WORD *)(v36 + v19 - 2);
                v18 += 5;
              }
              while ( v18 < 2 );
              v13 = v33;
            }
            do
              *(_WORD *)(v34 + 2 * v18++) = *(_WORD *)(v35 - 2);
            while ( v18 < 8 );
            v15 = v29;
          }
          v14 += 16;
          ++v13;
          v12 += a1->DIBLineBytes;
        }
        while ( v13 < v30 );
        v10 = v31;
        v11 = v28;
        v3 = a1;
      }
      if ( v25 < 64 )
      {
        v21 = (int)&v11[v23];
        v22 = (int)&v11[8 * v24];
        do
        {
          *(_WORD *)v22 = *(_WORD *)(v21 - 16);
          *(_WORD *)(v22 + 2) = *(_WORD *)(v21 - 14);
          *(_WORD *)(v22 + 4) = *(_WORD *)(v21 - 12);
          *(_WORD *)(v22 + 6) = *(_WORD *)(v21 - 10);
          *(_WORD *)(v22 + 8) = *(_WORD *)(v21 - 8);
          *(_WORD *)(v22 + 10) = *(_WORD *)(v21 - 6);
          *(_WORD *)(v22 + 12) = *(_WORD *)(v21 - 4);
          *(_WORD *)(v22 + 14) = *(_WORD *)(v21 - 2);
          v22 += 16;
        }
        while ( (signed int)(v11 + 128) > v22 );
      }
      v11 += 128;
      ++v10;
    }
    while ( v10 < v3->JPGChannels );
  }
}

//----- (00775560) --------------------------------------------------------
signed int __cdecl sub_775560(int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9, int a10, _DWORD *a11, int a12)
{
  int v12; // ecx@1
  int v13; // ebx@1
  int v14; // edx@1
  int v15; // esi@2
  int v16; // ebp@5
  int v17; // eax@7
  int v18; // eax@11
  int v19; // esi@14
  int v20; // esi@15
  int v21; // ebx@15
  int v22; // edi@17
  int v23; // edx@18
  int v24; // eax@24
  int v25; // eax@26
  int v26; // esi@26
  int v27; // edx@27
  int v28; // ebp@29
  int v30; // [sp+8h] [bp-1Ch]@13

  v12 = a2;
  v13 = a3;
  v14 = *(_DWORD *)a1;
  if ( *(_DWORD *)a1 )
  {
    v15 = *(_DWORD *)(a1 + 8);
  }
  else
  {
    v15 = *(_DWORD *)(a1 + 8);
    if ( !v15 && !*(_DWORD *)(a1 + 4) && !*(_DWORD *)(a1 + 12) )
    {
      v16 = a3 * a5;
      *a11 = a8 + a3 * a5 * a7 + a2 * a4 * a6;
      *(_DWORD *)a12 = 0;
      if ( a2 >= a9 - a2 * a4 )
        v12 = a9 - a2 * a4;
      *(_DWORD *)(a12 + 8) = v12;
      *(_DWORD *)(a12 + 4) = 0;
      v17 = abs(a10);
      if ( a3 >= v17 - v16 )
        v13 = v17 - v16;
      *(_DWORD *)(a12 + 12) = v13;
      return 0;
    }
  }
  v18 = a2 * a4;
  if ( a2 * a4 < v15 && a2 + v18 >= v14 )
  {
    v30 = a3 * a5;
    if ( a3 * a5 < *(_DWORD *)(a1 + 12) )
    {
      v19 = *(_DWORD *)(a1 + 4);
      if ( a3 + v30 >= v19 )
      {
        *a11 = a8 + (v30 - v19) * a7 + (v18 - v14) * a6;
        v20 = *(_DWORD *)a1 - v18;
        v21 = a3;
        if ( v20 < 0 )
          v20 = 0;
        *(_DWORD *)a12 = v20;
        v22 = *(_DWORD *)(a1 + 8) - v18;
        if ( a2 >= v22 )
          v23 = *(_DWORD *)(a1 + 8) - v18;
        else
          v23 = a2;
        if ( v23 >= a9 + *(_DWORD *)a1 - v18 )
        {
          v12 = a9 + *(_DWORD *)a1 - v18;
        }
        else if ( a2 >= v22 )
        {
          v12 = *(_DWORD *)(a1 + 8) - v18;
        }
        *(_DWORD *)(a12 + 8) = v12;
        v24 = *(_DWORD *)(a1 + 4) - v30;
        if ( v24 < 0 )
          v24 = 0;
        *(_DWORD *)(a12 + 4) = v24;
        v25 = abs(a10);
        v26 = *(_DWORD *)(a1 + 12) - v30;
        if ( a3 >= v26 )
          v27 = *(_DWORD *)(a1 + 12) - v30;
        else
          v27 = a3;
        v28 = *(_DWORD *)(a1 + 4) - v30;
        if ( v27 >= v28 + v25 )
        {
          v21 = v28 + v25;
        }
        else if ( a3 >= v26 )
        {
          v21 = *(_DWORD *)(a1 + 12) - v30;
        }
        *(_DWORD *)(a12 + 12) = v21;
        return 0;
      }
    }
  }
  return -8;
}

//----- (00775730) --------------------------------------------------------
int __cdecl operator&(int a1, int a2, int a3)
{
  int v3; // ebx@1
  int v4; // ecx@2
  int v5; // edi@4
  int v6; // eax@6
  int v7; // eax@9
  int v8; // eax@12
  int v9; // eax@15
  int v10; // ST0C_4@17
  int result; // eax@17
  int v12; // ecx@18
  int v13; // ebx@18
  int v14; // edi@18
  int v15; // [sp+0h] [bp-34h]@8
  int v16; // [sp+4h] [bp-30h]@11
  int v17; // [sp+8h] [bp-2Ch]@14
  int v18; // [sp+10h] [bp-24h]@4
  int v19; // [sp+1Ch] [bp-18h]@3

  v3 = *(_DWORD *)(a3 + 8);
  if ( *(_DWORD *)a2 > v3
    || (v4 = *(_DWORD *)(a2 + 8), v4 < *(_DWORD *)a3)
    || (v19 = *(_DWORD *)(a2 + 4), v19 > *(_DWORD *)(a3 + 12))
    || (v18 = *(_DWORD *)(a2 + 12), v5 = *(_DWORD *)(a3 + 4), v18 < v5) )
  {
    v12 = dword_B688E0[1];
    *(_DWORD *)a1 = dword_B688E0[0];
    v13 = dword_B688E0[2];
    v14 = dword_B688E0[3];
    *(_DWORD *)(a1 + 4) = v12;
    result = a1;
    *(_DWORD *)(a1 + 8) = v13;
    *(_DWORD *)(a1 + 12) = v14;
  }
  else
  {
    if ( *(_DWORD *)a2 <= *(_DWORD *)a3 )
      v6 = *(_DWORD *)a3;
    else
      v6 = *(_DWORD *)a2;
    v15 = v6;
    if ( v19 <= v5 )
      v7 = *(_DWORD *)(a3 + 4);
    else
      v7 = *(_DWORD *)(a2 + 4);
    v16 = v7;
    if ( v4 >= v3 )
      v8 = *(_DWORD *)(a3 + 8);
    else
      v8 = *(_DWORD *)(a2 + 8);
    v17 = v8;
    if ( v18 >= *(_DWORD *)(a3 + 12) )
      v9 = *(_DWORD *)(a3 + 12);
    else
      v9 = *(_DWORD *)(a2 + 12);
    v10 = v9;
    *(_DWORD *)a1 = v15;
    *(_DWORD *)(a1 + 4) = v16;
    *(_DWORD *)(a1 + 8) = v17;
    result = a1;
    *(_DWORD *)(a1 + 12) = v10;
  }
  return result;
}

//----- (00775860) --------------------------------------------------------
BOOL __cdecl operator==(int a1, int a2)
{
  return *(_DWORD *)a1 == *(_DWORD *)a2
      && *(_DWORD *)(a1 + 8) == *(_DWORD *)(a2 + 8)
      && *(_DWORD *)(a1 + 4) == *(_DWORD *)(a2 + 4)
      && *(_DWORD *)(a1 + 12) == *(_DWORD *)(a2 + 12);
}

//----- (00775890) --------------------------------------------------------
BOOL __cdecl operator!=(int a1, int a2)
{
  return *(_DWORD *)a1 != *(_DWORD *)a2
      || *(_DWORD *)(a1 + 8) != *(_DWORD *)(a2 + 8)
      || *(_DWORD *)(a1 + 4) != *(_DWORD *)(a2 + 4)
      || *(_DWORD *)(a1 + 12) != *(_DWORD *)(a2 + 12);
}

//----- (007758C0) --------------------------------------------------------
int __cdecl operator-(int a1, int a2, int a3)
{
  int v3; // ecx@2
  int v4; // eax@2
  int v5; // ebp@2
  int result; // eax@2
  int v7; // ST10_4@3
  int v8; // ST14_4@3
  int v9; // edx@3

  if ( (unsigned __int8)operator==(a2, (int)dword_B688E0) )
  {
    v3 = dword_B688E0[1];
    *(_DWORD *)a1 = dword_B688E0[0];
    v4 = dword_B688E0[2];
    v5 = dword_B688E0[3];
    *(_DWORD *)(a1 + 4) = v3;
    *(_DWORD *)(a1 + 8) = v4;
    *(_DWORD *)(a1 + 12) = v5;
    result = a1;
  }
  else
  {
    result = a1;
    v7 = *(_DWORD *)(a2 + 8) - *(_DWORD *)a3;
    v8 = *(_DWORD *)(a2 + 12) - *(_DWORD *)(a3 + 4);
    v9 = *(_DWORD *)(a2 + 4) - *(_DWORD *)(a3 + 4);
    *(_DWORD *)a1 = *(_DWORD *)a2 - *(_DWORD *)a3;
    *(_DWORD *)(a1 + 4) = v9;
    *(_DWORD *)(a1 + 8) = v7;
    *(_DWORD *)(a1 + 12) = v8;
  }
  return result;
}

//----- (00775960) --------------------------------------------------------
signed int __cdecl sub_775960(int a1, signed int a2, int a3, int a4, int a5, signed int a6, char a7)
{
  if ( *(_DWORD *)(a3 + 8) || !*(_DWORD *)(a1 + 19936) )
    sub_7774F0(a1, a2, a3, a4, a5, a6, a7);
  else
    sub_775A10(a1, a2, a3, a4, a5, a6, 1, a7);
  return sub_7786A0(a1, a2, a4, a5, a6);
}

//----- (00775A10) --------------------------------------------------------
signed int __cdecl sub_775A10(int a1, signed int a2, int a3, int a4, int a5, signed int a6, int a7, char a8)
{
  int v8; // ebp@1
  bool v9; // zf@1
  int v10; // esi@2
  int v11; // ecx@2
  int v12; // eax@2
  int v13; // esi@5
  signed int result; // eax@5
  int v15; // edi@7
  int v16; // ebx@7
  char *v17; // ebp@8
  int v18; // eax@14
  signed int v19; // ebp@15
  signed int v20; // esi@15
  int v21; // edi@16
  int v22; // eax@16
  int v23; // ecx@18
  int v24; // edx@19
  int v25; // edi@19
  char *v26; // ebx@20
  int v27; // eax@20
  int v28; // edi@21
  int v29; // ebp@21
  int v30; // esi@21
  int v31; // ecx@22
  int v32; // edx@23
  signed int v33; // eax@23
  int v34; // edi@24
  int v35; // ebx@25
  int v36; // edx@26
  int v37; // ecx@28
  int v38; // edi@30
  int v39; // ebp@31
  int v40; // esi@31
  int v41; // ecx@31
  int v42; // eax@31
  int v43; // esi@31
  int v44; // ebx@32
  _BYTE *v45; // esi@32
  int v46; // edx@46
  int v47; // ebx@47
  int v48; // edi@47
  int v49; // ecx@47
  char *v50; // edi@48
  int v51; // eax@48
  signed int v52; // ebx@49
  int v53; // ebp@49
  int v54; // esi@49
  int v55; // ecx@50
  int v56; // edx@51
  int v57; // esi@51
  int v58; // eax@52
  int v59; // edx@54
  int v60; // ebp@55
  int v61; // esi@55
  int v62; // esi@57
  int v63; // ebp@57
  int v64; // ebx@71
  signed int v65; // eax@73
  signed int v66; // edx@73
  char *v67; // ebp@73
  int v68; // esi@75
  int v69; // edx@79
  signed int v70; // ebp@80
  signed int v71; // esi@80
  int v72; // edi@81
  int v73; // eax@81
  int v74; // edx@83
  int v75; // ebx@84
  int v76; // ecx@84
  char *v77; // edi@85
  int v78; // eax@85
  int v79; // ebx@86
  int v80; // ebp@86
  int v81; // esi@86
  int v82; // ecx@87
  int v83; // edx@88
  signed int v84; // eax@88
  int v85; // edi@89
  int v86; // esi@90
  int v87; // edx@91
  int v88; // ecx@93
  int v89; // edi@95
  int v90; // ebp@96
  int v91; // esi@96
  int v92; // ecx@96
  int v93; // esi@96
  _BYTE *v94; // esi@97
  int v95; // edx@111
  int v96; // ebx@112
  int v97; // edi@112
  int v98; // ecx@112
  char *v99; // edi@113
  int v100; // eax@113
  int v101; // ecx@114
  signed int v102; // ebp@114
  int v103; // esi@114
  int v104; // edx@115
  int v105; // ebx@116
  int v106; // eax@116
  int v107; // esi@117
  int v108; // edi@119
  int v109; // ebp@120
  int v110; // eax@120
  int v111; // edx@122
  int v112; // eax@141
  int v113; // ecx@141
  int v114; // edx@141
  int v115; // edi@141
  int v116; // esi@141
  int v117; // ebp@142
  int v118; // ebx@143
  signed int v119; // esi@143
  int v120; // edx@145
  int v121; // ecx@147
  int v122; // edi@147
  int v123; // ebp@148
  int v124; // edi@157
  int v125; // edx@157
  int v126; // ecx@157
  int v127; // eax@157
  bool v128; // sf@157
  unsigned __int8 v129; // of@157
  int v130; // ecx@157
  int v131; // eax@158
  int v132; // edx@158
  int v133; // ebp@158
  int v134; // edi@159
  int v135; // esi@159
  int v136; // edi@161
  int v137; // edx@161
  int v138; // ecx@161
  int v139; // ecx@168
  int v140; // edx@168
  int v141; // ebx@169
  int v142; // esi@169
  int v143; // eax@170
  int v144; // edx@171
  int v145; // ebp@171
  signed int v146; // esi@180
  int v147; // edi@180
  int v148; // ebx@182
  int v149; // eax@193
  int v150; // eax@202
  int v151; // ebp@202
  int v152; // edx@202
  int v153; // edi@202
  int v154; // esi@202
  int v155; // ebx@203
  int v156; // ecx@204
  signed int v157; // ebp@204
  int v158; // eax@206
  int v159; // edi@208
  int v160; // esi@208
  int v161; // ebp@209
  int v162; // edi@218
  int v163; // edx@218
  int v164; // esi@218
  int v165; // eax@218
  int v166; // edx@219
  int v167; // esi@219
  int v168; // ebp@219
  int v169; // ebx@220
  int v170; // edi@220
  int v171; // edx@222
  int v172; // edi@222
  int v173; // esi@222
  int v174; // eax@226
  int v175; // ecx@229
  int v176; // edx@229
  int v177; // ebx@230
  int v178; // esi@230
  int v179; // eax@231
  int v180; // edx@232
  int v181; // ebp@232
  signed int v182; // esi@241
  int v183; // ebx@246
  int v184; // edi@246
  int v185; // eax@256
  int v186; // edx@264
  int v187; // esi@264
  int v188; // ebx@265
  int v189; // edx@265
  int v190; // ecx@265
  signed int v191; // edx@270
  int v192; // ebx@272
  int v193; // ecx@272
  signed int v194; // ebx@272
  char v195[1280]; // [sp+30h] [bp-594h]@20
  int v196; // [sp+530h] [bp-94h]@5
  int v197; // [sp+534h] [bp-90h]@168
  int v198; // [sp+538h] [bp-8Ch]@169
  int v199; // [sp+53Ch] [bp-88h]@168
  int v200; // [sp+540h] [bp-84h]@8
  int v201; // [sp+544h] [bp-80h]@8
  int v202; // [sp+548h] [bp-7Ch]@8
  int v203; // [sp+54Ch] [bp-78h]@8
  int v204; // [sp+550h] [bp-74h]@19
  _BYTE *v205; // [sp+554h] [bp-70h]@19
  int v206; // [sp+558h] [bp-6Ch]@25
  int v207; // [sp+55Ch] [bp-68h]@25
  char *v208; // [sp+560h] [bp-64h]@27
  int v209; // [sp+564h] [bp-60h]@27
  int v210; // [sp+568h] [bp-5Ch]@30
  _BYTE *v211; // [sp+56Ch] [bp-58h]@30
  int v212; // [sp+570h] [bp-54h]@19
  int v213; // [sp+574h] [bp-50h]@19
  int v214; // [sp+578h] [bp-4Ch]@5
  int v215; // [sp+57Ch] [bp-48h]@4
  int v216; // [sp+580h] [bp-44h]@4
  int v217; // [sp+584h] [bp-40h]@30
  int v218; // [sp+588h] [bp-3Ch]@30
  int v219; // [sp+58Ch] [bp-38h]@27
  int v220; // [sp+590h] [bp-34h]@1
  int v221; // [sp+594h] [bp-30h]@21
  int v222; // [sp+598h] [bp-2Ch]@21
  int v223; // [sp+59Ch] [bp-28h]@21
  int v224; // [sp+5A0h] [bp-24h]@19
  int v225; // [sp+5A4h] [bp-20h]@23
  char *v226; // [sp+5A8h] [bp-1Ch]@16
  int v227; // [sp+5ACh] [bp-18h]@2

  v8 = a1;
  v9 = *(_DWORD *)a3 == 1;
  v220 = 0;
  if ( v9 )
  {
    if ( *(_DWORD *)(a1 + 52) == 3 )
      v191 = 3;
    else
      v191 = *(_DWORD *)(a1 + 48);
    result = a2;
    if ( v191 <= *(_DWORD *)(a2 + 56) )
      return result;
    v10 = *(_DWORD *)(a1 + 14264);
    v192 = *(_DWORD *)(a3 + 52);
    v193 = *(_DWORD *)(a1 + 14264) / *(_DWORD *)(v192 + 4);
    v194 = *(_DWORD *)(v192 + 8);
    v227 = *(_DWORD *)(a1 + 14268);
    v11 = a6 * v193;
    v12 = a6 * (v227 / v194);
  }
  else
  {
    v10 = *(_DWORD *)(a1 + 14264);
    v11 = a6 * *(_DWORD *)(a1 + 14264);
    v227 = *(_DWORD *)(a1 + 14268);
    v12 = a6 * v227;
  }
  if ( *(_DWORD *)(a1 + 19944) != 1 || v10 != 2 || v227 != 1 )
  {
    v216 = 0;
    v215 = 0;
  }
  else
  {
    if ( *(_DWORD *)(a1 + 116) )
    {
      v215 = 1;
    }
    else
    {
      v186 = *(_DWORD *)(a1 + 14272);
      v215 = 0;
      v187 = v186 - 1;
      if ( v186 )
      {
        v188 = *(_DWORD *)(a1 + 14284);
        v189 = 16 * v187;
        v200 = v11;
        v190 = v215;
        do
        {
          --v187;
          v190 += *(_DWORD *)(v189 + v188 + 8) * *(_DWORD *)(v189 + v188 + 4);
          v189 -= 16;
        }
        while ( v187 != -1 );
        v215 = v190;
        v11 = v200;
        v8 = a1;
      }
    }
    v216 = *(_DWORD *)(*(_DWORD *)(v8 + 19948) + 4) + (v215 << 6) * 2 * a4;
    v215 = v216 + (v215 << 8);
  }
  v13 = *(_DWORD *)(v8 + 48);
  v214 = *(_DWORD *)(v8 + 18484);
  result = sub_775560(
             v8 + 4,
             v11,
             v12,
             a4,
             a5,
             v13,
             *(_DWORD *)(v8 + 60),
             *(_DWORD *)(v8 + 32),
             *(_DWORD *)(v8 + 36),
             *(_DWORD *)(v8 + 40),
             (_DWORD *)(a2 + 44),
             (int)&v196);
  if ( !result )
  {
    if ( a7 )
    {
      v15 = *(_DWORD *)(a2 + 44);
      v16 = *(_DWORD *)(v8 + 52);
      if ( v16 == 2 && *(_DWORD *)(v8 + 88) == 1 )
      {
        v149 = *(_DWORD *)(a2 + 56);
        if ( v149 )
        {
          if ( v149 == 1 )
            ++v15;
        }
        else
        {
          v15 += 2;
        }
      }
      v17 = (char *)v220;
      v200 = 0;
      v201 = 32 * a6;
      v202 = 0;
      v203 = v15;
      while ( 1 )
      {
        if ( v16 == 3 )
        {
          result = 3;
        }
        else
        {
          result = *(_DWORD *)a3;
          if ( *(_DWORD *)a3 >= *(_DWORD *)(a1 + 48) )
            result = *(_DWORD *)(a1 + 48);
        }
        if ( v202 >= result )
          break;
        if ( *(_DWORD *)(a1 + 88) != 4 || v202 <= 0 )
        {
          v18 = *(_DWORD *)(a3 + 52);
          if ( *(_DWORD *)a3 == 1 )
          {
            v19 = *(_DWORD *)(v18 + 8);
            v20 = *(_DWORD *)(v18 + 4);
          }
          else
          {
            v19 = *(_DWORD *)(v200 + v18 + 8);
            v20 = *(_DWORD *)(v200 + v18 + 4);
          }
          v227 = *(_DWORD *)(a1 + 14264);
          v21 = v227 / v20;
          v226 = *(char **)(a1 + 14268);
          v22 = (signed int)v226 / v19;
          if ( a8 )
          {
            v46 = 0;
            if ( v19 > 0 )
            {
              v47 = v22 * v201;
              v48 = a6 * v21;
              v227 = v48 - 6;
              v49 = 0;
              v213 = v48;
              v212 = a6 * v22;
              do
              {
                v50 = &v195[v49];
                v51 = 0;
                if ( v20 > 0 )
                {
                  v219 = v49;
                  v222 = v47;
                  v223 = v46;
                  v52 = v213;
                  v221 = v19;
                  v53 = v212;
                  v220 = v20;
                  v54 = v214;
                  do
                  {
                    v55 = 0;
                    if ( v53 > 0 )
                    {
                      v226 = 0;
                      v56 = 0;
                      v217 = v51;
                      v218 = (int)v50;
                      v214 = v54;
                      v57 = 0;
                      do
                      {
                        v58 = 0;
                        if ( v52 > 0 )
                        {
                          if ( v52 < 6 )
                          {
                            v210 = v218 + v57;
                            v225 = v214 + v56;
                          }
                          else
                          {
                            v210 = v218 + v57;
                            v225 = v214 + v56;
                            v211 = (_BYTE *)v56;
                            v226 = (char *)v57;
                            v59 = v214 + v56;
                            v224 = v55;
                            do
                            {
                              v60 = v210;
                              v61 = v227;
                              *(_BYTE *)(v210 + v58) = *(_BYTE *)(v59 + 2 * v58);
                              *(_BYTE *)(v60 + v58 + 1) = *(_BYTE *)(v59 + 2 * v58 + 2);
                              *(_BYTE *)(v60 + v58 + 2) = *(_BYTE *)(v59 + 2 * v58 + 4);
                              *(_BYTE *)(v60 + v58 + 3) = *(_BYTE *)(v59 + 2 * v58 + 6);
                              *(_BYTE *)(v60 + v58 + 4) = *(_BYTE *)(v59 + 2 * v58 + 8);
                              v58 += 5;
                            }
                            while ( v58 <= v61 );
                            v56 = (int)v211;
                            v57 = (int)v226;
                            v55 = v224;
                            v52 = v213;
                          }
                          v226 = (char *)v57;
                          v62 = v225;
                          v63 = v210;
                          v224 = v55;
                          do
                          {
                            *(_BYTE *)(v63 + v58) = *(_BYTE *)(v62 + 2 * v58);
                            ++v58;
                          }
                          while ( v58 < v52 );
                          v57 = (int)v226;
                          v55 = v224;
                          v53 = v212;
                        }
                        v57 += 32;
                        v56 += 16;
                        ++v55;
                      }
                      while ( v55 < v53 );
                      v51 = v217;
                      v50 = (char *)v218;
                      v54 = v214;
                    }
                    v50 += v52;
                    v54 += 128;
                    ++v51;
                  }
                  while ( v51 < v220 );
                  v214 = v54;
                  v49 = v219;
                  v47 = v222;
                  v46 = v223;
                  v19 = v221;
                  v20 = v220;
                }
                v49 += v47;
                ++v46;
              }
              while ( v46 < v19 );
              v16 = *(_DWORD *)(a1 + 52);
            }
          }
          else if ( *(_DWORD *)(a1 + 19944) != 1 || v227 != 2 || v226 != (char *)1 || a6 == 1 )
          {
            v23 = 0;
            if ( v19 > 0 )
            {
              v24 = v22 * v201;
              v205 = (_BYTE *)(a6 * v21);
              v204 = v21 - 5;
              v224 = 0;
              v213 = v227 / v20;
              v212 = 32 * v22;
              v25 = 0;
              do
              {
                v26 = &v195[v25];
                v27 = 0;
                if ( v20 > 0 )
                {
                  v224 = v25;
                  v28 = v214;
                  v223 = v24;
                  v222 = v23;
                  v221 = v19;
                  v29 = v212;
                  v220 = v20;
                  v30 = a6;
                  do
                  {
                    v31 = 0;
                    if ( v30 > 0 )
                    {
                      v32 = 0;
                      v225 = v27;
                      v33 = v213;
                      v226 = v26;
                      v214 = v28;
                      do
                      {
                        v34 = 0;
                        if ( v30 > 0 )
                        {
                          v227 = (int)&v226[v32];
                          v35 = 0;
                          v206 = v32;
                          v207 = v31;
                          do
                          {
                            v36 = 0;
                            if ( v29 > 0 )
                            {
                              v209 = v227 + v35;
                              v208 = (char *)v35;
                              v219 = v34;
                              do
                              {
                                v37 = 0;
                                if ( v33 > 0 )
                                {
                                  if ( v33 < 5 )
                                  {
                                    v45 = (_BYTE *)(v214 + 16 * v207 + 2 * v219);
                                    v44 = v36 + v209;
                                  }
                                  else
                                  {
                                    v38 = v214 + 16 * v207;
                                    v218 = 0;
                                    v217 = v36 + v209;
                                    v211 = (_BYTE *)(v38 + 2 * v219);
                                    v210 = v36;
                                    do
                                    {
                                      v39 = v217;
                                      v40 = v218;
                                      v41 = v219;
                                      *(_BYTE *)(v217 + v218) = *(_BYTE *)(v38 + 2 * v219);
                                      *(_BYTE *)(v39 + v40 + 1) = *(_BYTE *)(v38 + 2 * v41);
                                      *(_BYTE *)(v39 + v40 + 2) = *(_BYTE *)(v38 + 2 * v41);
                                      v42 = v204;
                                      *(_BYTE *)(v39 + v40 + 3) = *(_BYTE *)(v38 + 2 * v41);
                                      v43 = v40 + 4;
                                      v218 = v43;
                                    }
                                    while ( v43 <= v42 );
                                    v33 = v213;
                                    v29 = v212;
                                    v37 = v43;
                                    v44 = v217;
                                    v45 = v211;
                                    v36 = v210;
                                  }
                                  v210 = v36;
                                  do
                                    *(_BYTE *)(v44 + v37++) = *v45;
                                  while ( v37 < v33 );
                                  v36 = v210;
                                }
                                v36 += 32;
                              }
                              while ( v36 < v29 );
                              v35 = (int)v208;
                              v34 = v219;
                              v30 = a6;
                            }
                            v35 += v33;
                            ++v34;
                          }
                          while ( v34 < v30 );
                          v32 = v206;
                          v31 = v207;
                        }
                        v32 += v29;
                        ++v31;
                      }
                      while ( v31 < v30 );
                      v27 = v225;
                      v26 = v226;
                      v28 = v214;
                    }
                    v26 = &v26[(_DWORD)v205];
                    v28 += 128;
                    ++v27;
                  }
                  while ( v27 < v220 );
                  v214 = v28;
                  v25 = v224;
                  v24 = v223;
                  v23 = v222;
                  v19 = v221;
                  v20 = v220;
                }
                v25 += v24;
                ++v23;
              }
              while ( v23 < v19 );
              v16 = *(_DWORD *)(a1 + 52);
            }
          }
          else
          {
            v227 = (int)v195;
            v226 = 0;
            if ( v20 > 0 )
            {
              v112 = (int)v226;
              v211 = (_BYTE *)(a6 - 1);
              v113 = v214;
              v210 = a6 - 6;
              v212 = a6 * v21;
              v217 = 8 * a6;
              v114 = v227;
              v213 = v21;
              v115 = v216;
              v220 = v20;
              v116 = v215;
              do
              {
                v117 = 0;
                if ( v217 > 0 )
                {
                  v225 = v115 + 2 * a6;
                  v224 = v113 + 2 * a6;
                  v118 = 0;
                  v226 = (char *)v112;
                  v227 = v114;
                  v214 = v113;
                  v215 = v116;
                  v216 = v115;
                  v119 = a6;
                  do
                  {
                    if ( v213 == 2 )
                    {
                      v209 = 4 * v117;
                      v223 = 2 * v117;
                      v124 = v214 + 2 * v117;
                      v218 = v124;
                      v125 = 3 * *(_WORD *)v124;
                      v126 = v227 + 4 * v117;
                      v127 = *(_WORD *)(v225 + 2 * v117 - 2);
                      v219 = v126;
                      *(_BYTE *)v126 = (v127 + v125 + 1) >> 2;
                      v129 = __OFSUB__(v211, 1);
                      v9 = v211 == (_BYTE *)1;
                      v128 = (signed int)(v211 - 1) < 0;
                      *(_BYTE *)(v126 + 1) = (*(_WORD *)(v124 + 2) + v125 + 1) >> 2;
                      v130 = v209;
                      if ( !((unsigned __int8)(v128 ^ v129) | v9) )
                      {
                        v131 = v124 + 2;
                        v132 = v124 + 2 * v119 - 2;
                        v222 = v118;
                        v221 = v117;
                        v133 = v227;
                        do
                        {
                          v130 += 2;
                          v134 = 3 * *(_WORD *)v131;
                          v135 = v133 + v130;
                          *(_BYTE *)v135 = (*(_WORD *)(v131 - 2) + v134 + 1) >> 2;
                          *(_BYTE *)(v135 + 1) = (*(_WORD *)(v131 + 2) + v134 + 2) >> 2;
                          v131 += 2;
                        }
                        while ( v131 < v132 );
                        v219 = v133 + v130;
                        v118 = v222;
                        v117 = v221;
                        v119 = a6;
                      }
                      v136 = v223;
                      v137 = 3 * *(_WORD *)(v224 + v223 - 2);
                      v138 = v219;
                      *(_BYTE *)(v219 + 2) = (*(_WORD *)(v224 + v223 - 4) + v137 + 2) >> 2;
                      *(_BYTE *)(v138 + 3) = (*(_WORD *)(v215 + v136) + v137 + 2) >> 2;
                    }
                    else
                    {
                      v120 = 0;
                      if ( v119 > 0 )
                      {
                        if ( v119 < 6 )
                        {
                          v121 = v214 + v118;
                          v122 = v227 + 4 * v117;
                        }
                        else
                        {
                          v121 = v214 + v118;
                          v122 = v227 + 4 * v117;
                          v222 = v118;
                          v221 = v117;
                          do
                          {
                            v123 = v210;
                            *(_BYTE *)(v122 + v120) = *(_BYTE *)(v121 + 2 * v120);
                            *(_BYTE *)(v122 + v120 + 1) = *(_BYTE *)(v121 + 2 * v120 + 2);
                            *(_BYTE *)(v122 + v120 + 2) = *(_BYTE *)(v121 + 2 * v120 + 4);
                            *(_BYTE *)(v122 + v120 + 3) = *(_BYTE *)(v121 + 2 * v120 + 6);
                            *(_BYTE *)(v122 + v120 + 4) = *(_BYTE *)(v121 + 2 * v120 + 8);
                            v120 += 5;
                          }
                          while ( v120 <= v123 );
                          v118 = v222;
                          v117 = v221;
                          v119 = a6;
                        }
                        v221 = v117;
                        do
                        {
                          *(_BYTE *)(v122 + v120) = *(_BYTE *)(v121 + 2 * v120);
                          ++v120;
                        }
                        while ( v120 < v119 );
                        v117 = v221;
                      }
                    }
                    v118 += 16;
                    v117 += 8;
                  }
                  while ( v117 < v217 );
                  v112 = (int)v226;
                  v114 = v227;
                  v113 = v214;
                  v116 = v215;
                  v115 = v216;
                }
                v114 += v212;
                v113 += 128;
                v116 += 128;
                v115 += 128;
                ++v112;
              }
              while ( v112 < v220 );
              v214 = v113;
              v16 = *(_DWORD *)(a1 + 52);
              v215 = v116;
              v216 = v115;
            }
          }
          v17 = v195;
          if ( v16 == 3 && v202 )
          {
            if ( v202 == 2 )
              ++v203;
            v139 = v197;
            v140 = v199;
            if ( v197 < v199 )
            {
              v141 = v198;
              v142 = 32 * v197;
              do
              {
                v143 = v196;
                if ( v196 < v141 )
                {
                  v144 = (int)&v17[v142];
                  v227 = v142;
                  v220 = (int)v17;
                  v145 = v203;
                  do
                  {
                    *(_BYTE *)(v145 + *(_DWORD *)(a1 + 60) * v139 + 2 * v143) = *(_BYTE *)(v144 + v143);
                    v143 += 2;
                    v141 = v198;
                  }
                  while ( v143 < v198 );
                  v142 = v227;
                  v17 = (char *)v220;
                  v140 = v199;
                }
                v142 += 32;
                ++v139;
              }
              while ( v139 < v140 );
              v16 = *(_DWORD *)(a1 + 52);
            }
          }
          else
          {
            sub_779000(a1, (int)&v196, v202, v203, (int)v195);
            v16 = *(_DWORD *)(a1 + 52);
          }
          if ( v16 != 2 || *(_DWORD *)(a1 + 88) != 1 )
            ++v203;
          else
            --v203;
        }
        v200 += 24;
        ++v202;
      }
      v220 = (int)v17;
      v146 = v202;
      v147 = v203;
      if ( v16 != 255 || (result = *(_DWORD *)(a1 + 88), result != 255) )
      {
        if ( v202 < *(_DWORD *)(a1 + 48) )
        {
          v148 = v220;
          do
          {
            sub_779000(a1, (int)&v196, v146, v147, v148);
            result = *(_DWORD *)(a1 + 52);
            if ( result != 2 || (result = *(_DWORD *)(a1 + 88), result != 1) )
              ++v147;
            else
              --v147;
            ++v146;
          }
          while ( v146 < *(_DWORD *)(a1 + 48) );
        }
      }
    }
    else
    {
      v64 = *(_DWORD *)(v8 + 52);
      if ( v64 != 2 || *(_DWORD *)(v8 + 88) != 1 )
      {
        v213 = *(_DWORD *)(a2 + 56) + *(_DWORD *)(a2 + 44);
      }
      else
      {
        v213 = *(_DWORD *)(a2 + 44);
        v185 = *(_DWORD *)(a2 + 56);
        if ( v185 )
        {
          if ( v185 == 1 )
            ++v213;
        }
        else
        {
          v213 += 2;
        }
      }
      v65 = *(_DWORD *)a3;
      v66 = *(_DWORD *)(v8 + 48);
      v67 = (char *)v220;
      v201 = 0;
      v211 = 0;
      v212 = 32 * a6;
      while ( 1 )
      {
        v68 = v65 >= v66 ? v66 : v65;
        if ( v201 >= v68 )
          break;
        if ( *(_DWORD *)(a1 + 88) != 4 || v201 <= 0 )
        {
          v69 = *(_DWORD *)(a3 + 52);
          if ( v65 == 1 )
          {
            v70 = *(_DWORD *)(v69 + 8);
            v71 = *(_DWORD *)(v69 + 4);
          }
          else
          {
            v70 = *(_DWORD *)&v211[v69 + 8];
            v71 = *(_DWORD *)&v211[v69 + 4];
          }
          v220 = *(_DWORD *)(a1 + 14264);
          v72 = v220 / v71;
          v221 = *(_DWORD *)(a1 + 14268);
          v73 = v221 / v70;
          if ( a8 )
          {
            v95 = 0;
            if ( v70 > 0 )
            {
              v96 = v73 * v212;
              v97 = a6 * v72;
              v202 = v97 - 6;
              v98 = 0;
              v209 = v97;
              v206 = a6 * v73;
              do
              {
                v99 = &v195[v98];
                v100 = 0;
                if ( v71 > 0 )
                {
                  v207 = v98;
                  v101 = v206;
                  v205 = (_BYTE *)v96;
                  v204 = v95;
                  v203 = v70;
                  v102 = v209;
                  v210 = v71;
                  v103 = v214;
                  do
                  {
                    v104 = 0;
                    if ( v101 > 0 )
                    {
                      v219 = 0;
                      v105 = 0;
                      v217 = v100;
                      v106 = 0;
                      v208 = v99;
                      v214 = v103;
                      do
                      {
                        v107 = 0;
                        if ( v102 > 0 )
                        {
                          if ( v102 < 6 )
                          {
                            v221 = (int)&v208[v106];
                            v108 = v214 + v105;
                          }
                          else
                          {
                            v221 = (int)&v208[v106];
                            v108 = v214 + v105;
                            v220 = v105;
                            v219 = v106;
                            v218 = v104;
                            do
                            {
                              v109 = v221;
                              *(_BYTE *)(v221 + v107) = *(_BYTE *)(v108 + 2 * v107);
                              *(_BYTE *)(v109 + v107 + 1) = *(_BYTE *)(v108 + 2 * v107 + 2);
                              v110 = v202;
                              *(_BYTE *)(v109 + v107 + 2) = *(_BYTE *)(v108 + 2 * v107 + 4);
                              *(_BYTE *)(v109 + v107 + 3) = *(_BYTE *)(v108 + 2 * v107 + 6);
                              *(_BYTE *)(v109 + v107 + 4) = *(_BYTE *)(v108 + 2 * v107 + 8);
                              v107 += 5;
                            }
                            while ( v107 <= v110 );
                            v105 = v220;
                            v106 = v219;
                            v104 = v218;
                            v102 = v209;
                          }
                          v219 = v106;
                          v218 = v104;
                          v111 = v221;
                          do
                          {
                            *(_BYTE *)(v111 + v107) = *(_BYTE *)(v108 + 2 * v107);
                            ++v107;
                          }
                          while ( v107 < v102 );
                          v106 = v219;
                          v104 = v218;
                          v101 = v206;
                        }
                        v106 += 32;
                        v105 += 16;
                        ++v104;
                      }
                      while ( v104 < v101 );
                      v100 = v217;
                      v99 = v208;
                      v103 = v214;
                    }
                    v99 += v102;
                    v103 += 128;
                    ++v100;
                  }
                  while ( v100 < v210 );
                  v214 = v103;
                  v98 = v207;
                  v96 = (int)v205;
                  v95 = v204;
                  v70 = v203;
                  v71 = v210;
                }
                v98 += v96;
                ++v95;
              }
              while ( v95 < v70 );
              v64 = *(_DWORD *)(a1 + 52);
            }
          }
          else if ( *(_DWORD *)(a1 + 19944) != 1 || v220 != 2 || v221 != 1 || a6 == 1 )
          {
            v74 = 0;
            if ( v70 > 0 )
            {
              v75 = v73 * v212;
              v220 = a6 * v72;
              v221 = v72 - 5;
              v76 = 0;
              v209 = v72;
              v206 = 32 * v73;
              do
              {
                v77 = &v195[v76];
                v78 = 0;
                if ( v71 > 0 )
                {
                  v224 = v76;
                  v223 = v75;
                  v222 = v74;
                  v79 = v206;
                  v203 = v70;
                  v80 = a6;
                  v210 = v71;
                  v81 = v214;
                  do
                  {
                    v82 = 0;
                    if ( v80 > 0 )
                    {
                      v83 = 0;
                      v225 = v78;
                      v84 = v209;
                      v226 = v77;
                      v214 = v81;
                      do
                      {
                        v85 = 0;
                        if ( v80 > 0 )
                        {
                          v227 = (int)&v226[v83];
                          v86 = 0;
                          v219 = v83;
                          v218 = v82;
                          do
                          {
                            v87 = 0;
                            if ( v79 > 0 )
                            {
                              v207 = v227 + v86;
                              v208 = (char *)v86;
                              v200 = v85;
                              do
                              {
                                v88 = 0;
                                if ( v84 > 0 )
                                {
                                  if ( v84 < 5 )
                                  {
                                    v94 = (_BYTE *)(v214 + 16 * v218 + 2 * v200);
                                    v90 = v87 + v207;
                                  }
                                  else
                                  {
                                    v89 = v214 + 16 * v218;
                                    v202 = 0;
                                    v204 = v87 + v207;
                                    v205 = (_BYTE *)(v89 + 2 * v200);
                                    v217 = v87;
                                    do
                                    {
                                      v90 = v204;
                                      v91 = v202;
                                      v92 = v200;
                                      *(_BYTE *)(v204 + v202) = *(_BYTE *)(v89 + 2 * v200);
                                      *(_BYTE *)(v90 + v91 + 1) = *(_BYTE *)(v89 + 2 * v92);
                                      *(_BYTE *)(v90 + v91 + 2) = *(_BYTE *)(v89 + 2 * v92);
                                      *(_BYTE *)(v90 + v91 + 3) = *(_BYTE *)(v89 + 2 * v92);
                                      v93 = v91 + 4;
                                      v202 = v93;
                                    }
                                    while ( v93 <= v221 );
                                    v84 = v209;
                                    v79 = v206;
                                    v88 = v93;
                                    v94 = v205;
                                    v87 = v217;
                                  }
                                  v217 = v87;
                                  do
                                    *(_BYTE *)(v90 + v88++) = *v94;
                                  while ( v88 < v84 );
                                  v87 = v217;
                                }
                                v87 += 32;
                              }
                              while ( v87 < v79 );
                              v86 = (int)v208;
                              v85 = v200;
                              v80 = a6;
                            }
                            v86 += v84;
                            ++v85;
                          }
                          while ( v85 < v80 );
                          v83 = v219;
                          v82 = v218;
                        }
                        v83 += v79;
                        ++v82;
                      }
                      while ( v82 < v80 );
                      v78 = v225;
                      v77 = v226;
                      v81 = v214;
                    }
                    v77 += v220;
                    v81 += 128;
                    ++v78;
                  }
                  while ( v78 < v210 );
                  v214 = v81;
                  v76 = v224;
                  v75 = v223;
                  v74 = v222;
                  v70 = v203;
                  v71 = v210;
                }
                v76 += v75;
                ++v74;
              }
              while ( v74 < v70 );
              v64 = *(_DWORD *)(a1 + 52);
            }
          }
          else
          {
            v207 = (int)v195;
            v206 = 0;
            if ( v71 > 0 )
            {
              v150 = v206;
              v204 = a6 - 1;
              v200 = a6 - 6;
              v205 = (_BYTE *)(a6 * v72);
              v151 = v214;
              v208 = (char *)(8 * a6);
              v152 = v207;
              v209 = v220 / v71;
              v153 = v216;
              v210 = v71;
              v154 = v215;
              do
              {
                v155 = 0;
                if ( (signed int)v208 > 0 )
                {
                  v221 = v153 + 2 * a6;
                  v220 = v151 + 2 * a6;
                  v156 = 0;
                  v206 = v150;
                  v207 = v152;
                  v214 = v151;
                  v157 = a6;
                  v215 = v154;
                  v216 = v153;
                  do
                  {
                    if ( v209 == 2 )
                    {
                      v227 = 4 * v155;
                      v219 = 2 * v155;
                      v162 = v214 + 2 * v155;
                      v217 = v162;
                      v163 = 3 * *(_WORD *)v162;
                      v164 = v207 + 4 * v155;
                      v218 = v164;
                      *(_BYTE *)v164 = (*(_WORD *)(v221 + 2 * v155 - 2) + v163 + 1) >> 2;
                      *(_BYTE *)(v164 + 1) = (*(_WORD *)(v162 + 2) + v163 + 2) >> 2;
                      v165 = v227;
                      if ( v204 > 1 )
                      {
                        v166 = v162 + 2;
                        v167 = v162 + 2 * v157 - 2;
                        v202 = v156;
                        v168 = v207;
                        v203 = v155;
                        do
                        {
                          v165 += 2;
                          v169 = 3 * *(_WORD *)v166;
                          v170 = v168 + v165;
                          *(_BYTE *)v170 = (*(_WORD *)(v166 - 2) + v169 + 1) >> 2;
                          *(_BYTE *)(v170 + 1) = (*(_WORD *)(v166 + 2) + v169 + 2) >> 2;
                          v166 += 2;
                        }
                        while ( v166 < v167 );
                        v218 = v168 + v165;
                        v156 = v202;
                        v155 = v203;
                        v157 = a6;
                      }
                      v171 = v219;
                      v172 = 3 * *(_WORD *)(v220 + v219 - 2);
                      v173 = v218;
                      *(_BYTE *)(v218 + 2) = (*(_WORD *)(v220 + v219 - 4) + v172 + 1) >> 2;
                      *(_BYTE *)(v173 + 3) = (*(_WORD *)(v215 + v171) + v172 + 2) >> 2;
                    }
                    else
                    {
                      v158 = 0;
                      if ( v157 > 0 )
                      {
                        if ( v157 < 6 )
                        {
                          v159 = v207 + 4 * v155;
                          v160 = v214 + v156;
                        }
                        else
                        {
                          v159 = v207 + 4 * v155;
                          v160 = v214 + v156;
                          v202 = v156;
                          v203 = v155;
                          do
                          {
                            v161 = v200;
                            *(_BYTE *)(v159 + v158) = *(_BYTE *)(v160 + 2 * v158);
                            *(_BYTE *)(v159 + v158 + 1) = *(_BYTE *)(v160 + 2 * v158 + 2);
                            *(_BYTE *)(v159 + v158 + 2) = *(_BYTE *)(v160 + 2 * v158 + 4);
                            *(_BYTE *)(v159 + v158 + 3) = *(_BYTE *)(v160 + 2 * v158 + 6);
                            *(_BYTE *)(v159 + v158 + 4) = *(_BYTE *)(v160 + 2 * v158 + 8);
                            v158 += 5;
                          }
                          while ( v158 <= v161 );
                          v156 = v202;
                          v155 = v203;
                          v157 = a6;
                        }
                        v203 = v155;
                        do
                        {
                          *(_BYTE *)(v159 + v158) = *(_BYTE *)(v160 + 2 * v158);
                          ++v158;
                        }
                        while ( v158 < v157 );
                        v155 = v203;
                      }
                    }
                    v156 += 16;
                    v155 += 8;
                  }
                  while ( v155 < (signed int)v208 );
                  v150 = v206;
                  v152 = v207;
                  v151 = v214;
                  v154 = v215;
                  v153 = v216;
                }
                v152 += (int)v205;
                v151 += 128;
                v154 += 128;
                v153 += 128;
                ++v150;
              }
              while ( v150 < v210 );
              v214 = v151;
              v64 = *(_DWORD *)(a1 + 52);
              v215 = v154;
              v216 = v153;
            }
          }
          v67 = v195;
          if ( v64 == 3 && (v174 = *(_DWORD *)(a2 + 56)) != 0 )
          {
            if ( v174 == 2 )
              ++v213;
            v175 = v197;
            v176 = v199;
            if ( v197 < v199 )
            {
              v177 = v198;
              v178 = 32 * v197;
              do
              {
                v179 = v196;
                if ( v196 < v177 )
                {
                  v180 = (int)&v67[v178];
                  v221 = v178;
                  v220 = (int)v67;
                  v181 = v213;
                  do
                  {
                    *(_BYTE *)(v181 + *(_DWORD *)(a1 + 60) * v175 + 2 * v179) = *(_BYTE *)(v180 + v179);
                    v179 += 2;
                    v177 = v198;
                  }
                  while ( v179 < v198 );
                  v178 = v221;
                  v67 = (char *)v220;
                  v176 = v199;
                }
                v178 += 32;
                ++v175;
              }
              while ( v175 < v176 );
              v64 = *(_DWORD *)(a1 + 52);
            }
          }
          else
          {
            sub_779000(a1, (int)&v196, v201, v213, (int)v195);
            v64 = *(_DWORD *)(a1 + 52);
          }
          if ( v64 != 2 || *(_DWORD *)(a1 + 88) != 1 )
          {
            ++v213;
            v65 = *(_DWORD *)a3;
            v66 = *(_DWORD *)(a1 + 48);
          }
          else
          {
            --v213;
            v65 = *(_DWORD *)a3;
            v66 = *(_DWORD *)(a1 + 48);
          }
        }
        v211 += 24;
        ++v201;
      }
      v220 = (int)v67;
      v182 = v201;
      result = *(_DWORD *)(a1 + 116);
      if ( result )
      {
        v182 = *(_DWORD *)(a1 + 84);
        result = v182 - 1;
        if ( v182 - 1 != *(_DWORD *)(a2 + 56) )
          v182 = v66;
      }
      if ( v64 != 255 || (result = *(_DWORD *)(a1 + 88), result != 255) )
      {
        if ( v182 < v66 )
        {
          v183 = v213;
          v184 = v220;
          do
          {
            sub_779000(a1, (int)&v196, v182, v183, v184);
            result = *(_DWORD *)(a1 + 52);
            if ( result != 2 || (result = *(_DWORD *)(a1 + 88), result != 1) )
              ++v183;
            else
              --v183;
            ++v182;
          }
          while ( v182 < *(_DWORD *)(a1 + 48) );
        }
      }
    }
  }
  return result;
}
// 775A10: using guessed type char var_594[1280];

//----- (007774F0) --------------------------------------------------------
signed int __cdecl sub_7774F0(int a1, signed int a2, int a3, int a4, int a5, signed int a6, char a7)
{
  int v7; // esi@1
  signed int v8; // edi@1
  char *v9; // ebx@1
  int v10; // edx@2
  int v11; // eax@2
  signed int result; // eax@4
  int v13; // ebp@5
  signed int v14; // eax@6
  signed int v15; // edx@8
  signed int v16; // ecx@10
  int v17; // edx@13
  int v18; // ecx@15
  signed int v19; // ebx@15
  int v20; // edi@15
  signed int v21; // ecx@15
  int v22; // eax@15
  int v23; // edx@18
  int v24; // esi@18
  int v25; // ebp@18
  int v26; // edi@18
  int v27; // eax@18
  char *v28; // ebx@19
  int v29; // edx@19
  int v30; // ecx@20
  int v31; // esi@20
  int v32; // edi@21
  int v33; // eax@22
  signed int v34; // ebp@22
  int v35; // ebx@22
  int v36; // ecx@23
  int v37; // edx@24
  int v38; // eax@25
  int v39; // edx@27
  int v40; // edi@29
  int v41; // ebp@30
  int v42; // esi@30
  int v43; // ecx@30
  int v44; // eax@30
  int v45; // ecx@31
  _BYTE *v46; // ebx@31
  int v47; // edx@46
  int v48; // edi@46
  int v49; // ebp@46
  char *v50; // esi@46
  int v51; // eax@46
  int v52; // edx@46
  int v53; // ebx@47
  signed int v54; // ecx@48
  int v55; // edi@48
  int v56; // ebp@48
  int v57; // esi@49
  int v58; // eax@50
  int v59; // edx@50
  int v60; // ebx@51
  int v61; // ebp@53
  int v62; // esi@54
  int v63; // edi@54
  int v64; // esi@56
  int v65; // eax@75
  int v66; // ecx@75
  int v67; // esi@75
  int v68; // edx@75
  int v69; // edi@75
  int v70; // ebp@76
  int v71; // ebx@77
  signed int v72; // esi@77
  int v73; // edx@79
  int v74; // edi@81
  int v75; // ecx@81
  int v76; // ebp@82
  int v77; // edi@91
  int v78; // edx@91
  int v79; // ecx@91
  int v80; // eax@91
  bool v81; // zf@91
  bool v82; // sf@91
  unsigned __int8 v83; // of@91
  int v84; // ecx@91
  int v85; // eax@92
  int v86; // edx@92
  char *v87; // ebp@92
  int v88; // edi@93
  int v89; // esi@93
  int v90; // edi@95
  int v91; // edx@95
  int v92; // ecx@95
  int v93; // edx@102
  int v94; // eax@102
  int v95; // ebp@103
  int v96; // edi@103
  int v97; // ecx@104
  int v98; // esi@105
  int v99; // ebp@118
  signed int v100; // ebx@118
  int v101; // edi@118
  int v102; // eax@130
  int v103; // ecx@137
  int v104; // ebp@137
  int v105; // esi@138
  int v106; // ecx@138
  char v107[1280]; // [sp+30h] [bp-58Ch]@19
  int v108; // [sp+530h] [bp-8Ch]@4
  int v109; // [sp+534h] [bp-88h]@102
  int v110; // [sp+538h] [bp-84h]@103
  int v111; // [sp+53Ch] [bp-80h]@102
  char *v112; // [sp+540h] [bp-7Ch]@18
  char *v113; // [sp+544h] [bp-78h]@26
  int v114; // [sp+548h] [bp-74h]@3
  int v115; // [sp+54Ch] [bp-70h]@4
  int v116; // [sp+550h] [bp-6Ch]@3
  int v117; // [sp+554h] [bp-68h]@18
  int v118; // [sp+558h] [bp-64h]@29
  int v119; // [sp+55Ch] [bp-60h]@15
  char *v120; // [sp+560h] [bp-5Ch]@15
  int v121; // [sp+564h] [bp-58h]@29
  int v122; // [sp+568h] [bp-54h]@26
  int v123; // [sp+56Ch] [bp-50h]@17
  char *v124; // [sp+570h] [bp-4Ch]@18
  int v125; // [sp+574h] [bp-48h]@15
  int v126; // [sp+578h] [bp-44h]@15
  int v127; // [sp+57Ch] [bp-40h]@15
  int v128; // [sp+580h] [bp-3Ch]@26
  char *v129; // [sp+584h] [bp-38h]@24
  int v130; // [sp+588h] [bp-34h]@24
  int v131; // [sp+58Ch] [bp-30h]@22
  char *v132; // [sp+590h] [bp-2Ch]@22
  char *v133; // [sp+594h] [bp-28h]@24
  int v134; // [sp+598h] [bp-24h]@5
  int v135; // [sp+59Ch] [bp-20h]@6
  int v136; // [sp+5A0h] [bp-1Ch]@6
  int v137; // [sp+5A4h] [bp-18h]@18

  v7 = a1;
  v8 = a6;
  v9 = 0;
  if ( *(_DWORD *)(a1 + 19944) != 1 )
  {
    v10 = *(_DWORD *)(a1 + 14264);
    v11 = *(_DWORD *)(a1 + 14268);
LABEL_3:
    v116 = 0;
    v114 = 0;
    goto LABEL_4;
  }
  v10 = *(_DWORD *)(a1 + 14264);
  if ( v10 != 2 )
  {
    v11 = *(_DWORD *)(a1 + 14268);
    goto LABEL_3;
  }
  v11 = *(_DWORD *)(a1 + 14268);
  if ( v11 != 1 )
    goto LABEL_3;
  v114 = 0;
  v103 = *(_DWORD *)(a1 + 14272);
  v104 = v103 - 1;
  if ( v103 )
  {
    v105 = v114;
    v116 = *(_DWORD *)(a1 + 14284);
    v106 = 16 * v104;
    v113 = (char *)2;
    v112 = 0;
    do
    {
      --v104;
      v105 += *(_DWORD *)(v106 + v116 + 8) * *(_DWORD *)(v106 + v116 + 4);
      v106 -= 16;
    }
    while ( v104 != -1 );
    v114 = v105;
    v10 = (int)v113;
    v9 = v112;
    v8 = a6;
    v7 = a1;
  }
  v137 = v114 << 6;
  v136 = *(_DWORD *)(v7 + 19948);
  v116 = *(_DWORD *)(v136 + 4) + (v114 << 6) * 2 * a4;
  v114 = v116 + (v114 << 8);
LABEL_4:
  v115 = *(_DWORD *)(v7 + 18484);
  result = sub_775560(
             v7 + 4,
             v8 * v10,
             v8 * v11,
             a4,
             a5,
             *(_DWORD *)(v7 + 48),
             *(_DWORD *)(v7 + 60),
             *(_DWORD *)(v7 + 32),
             *(_DWORD *)(v7 + 36),
             *(_DWORD *)(v7 + 40),
             (_DWORD *)(a2 + 44),
             (int)&v108);
  if ( !result )
  {
    v13 = *(_DWORD *)(v7 + 52);
    v134 = *(_DWORD *)(a2 + 44);
    if ( v13 == 2 && *(_DWORD *)(v7 + 88) == 1 )
    {
      v102 = *(_DWORD *)(a2 + 56);
      if ( v102 )
      {
        if ( v102 == 1 )
          ++v134;
      }
      else
      {
        v134 += 2;
      }
    }
    v14 = *(_DWORD *)(v7 + 14272);
    v136 = 0;
    v135 = 32 * v8;
    while ( 1 )
    {
      v15 = v13 == 3 ? 3 : *(_DWORD *)(v7 + 48);
      if ( v14 >= v15 )
        v16 = v13 == 3 ? 3 : *(_DWORD *)(v7 + 48);
      else
        v16 = v14;
      v17 = v136;
      if ( v136 >= v16 )
        break;
      if ( *(_DWORD *)(v7 + 88) != 4 || v136 <= 0 )
      {
        v125 = *(_DWORD *)(v7 + 14264);
        v127 = 16 * v136;
        v18 = *(_DWORD *)(v7 + 14284) + 16 * v136;
        v19 = *(_DWORD *)(v18 + 4);
        v119 = *(_DWORD *)(v7 + 14284) + 16 * v136;
        v120 = (char *)v19;
        v20 = v125 / v19;
        v21 = *(_DWORD *)(v18 + 8);
        v126 = *(_DWORD *)(v7 + 14268);
        v22 = v126 / v21;
        if ( a7 )
        {
          v123 = 0;
          if ( v21 > 0 )
          {
            v47 = v22 * v135;
            v48 = a6 * v20;
            v126 = v48 - 6;
            v49 = v123;
            v124 = (char *)(v123 * v22 * v135);
            v112 = (char *)v48;
            v50 = (char *)(v123 * v22 * v135);
            v117 = a6 * v22;
            v51 = (int)v120;
            v113 = (char *)v47;
            v52 = v119;
            do
            {
              v53 = 0;
              if ( v51 > 0 )
              {
                v125 = (int)&v50[(_DWORD)v107];
                v54 = (signed int)v112;
                v55 = v117;
                v124 = v50;
                v123 = v49;
                v56 = v115;
                do
                {
                  v57 = 0;
                  if ( v55 > 0 )
                  {
                    v58 = 0;
                    v59 = 0;
                    v122 = v53;
                    v115 = v56;
                    do
                    {
                      v60 = 0;
                      if ( v54 > 0 )
                      {
                        if ( v54 < 6 )
                        {
                          v118 = v125 + v58;
                          v61 = v115 + v59;
                        }
                        else
                        {
                          v118 = v125 + v58;
                          v61 = v115 + v59;
                          v119 = v59;
                          v120 = (char *)v58;
                          v121 = v57;
                          do
                          {
                            v62 = v118;
                            v63 = v126;
                            *(_BYTE *)(v118 + v60) = *(_BYTE *)(v61 + 2 * v60);
                            *(_BYTE *)(v62 + v60 + 1) = *(_BYTE *)(v61 + 2 * v60 + 2);
                            *(_BYTE *)(v62 + v60 + 2) = *(_BYTE *)(v61 + 2 * v60 + 4);
                            *(_BYTE *)(v62 + v60 + 3) = *(_BYTE *)(v61 + 2 * v60 + 6);
                            *(_BYTE *)(v62 + v60 + 4) = *(_BYTE *)(v61 + 2 * v60 + 8);
                            v60 += 5;
                          }
                          while ( v60 <= v63 );
                          v59 = v119;
                          v58 = (int)v120;
                          v57 = v121;
                          v54 = (signed int)v112;
                        }
                        v120 = (char *)v58;
                        v121 = v57;
                        v64 = v118;
                        do
                        {
                          *(_BYTE *)(v64 + v60) = *(_BYTE *)(v61 + 2 * v60);
                          ++v60;
                        }
                        while ( v60 < v54 );
                        v58 = (int)v120;
                        v57 = v121;
                        v55 = v117;
                      }
                      v58 += 32;
                      v59 += 16;
                      ++v57;
                    }
                    while ( v57 < v55 );
                    v53 = v122;
                    v56 = v115;
                    v52 = v127 + *(_DWORD *)(a1 + 14284);
                    v51 = *(_DWORD *)(v52 + 4);
                  }
                  v125 += v54;
                  v56 += 128;
                  ++v53;
                }
                while ( v53 < v51 );
                v115 = v56;
                v50 = v124;
                v49 = v123;
                v21 = *(_DWORD *)(v52 + 8);
              }
              v50 = &v50[(_DWORD)v113];
              ++v49;
            }
            while ( v49 < v21 );
            v7 = a1;
            v13 = *(_DWORD *)(a1 + 52);
          }
        }
        else if ( *(_DWORD *)(v7 + 19944) != 1 || v125 != 2 || v126 != 1 || a6 == 1 )
        {
          v123 = 0;
          if ( v21 > 0 )
          {
            v23 = v22 * v135;
            v24 = v119;
            v124 = (char *)(a6 * v20);
            v125 = v20 - 5;
            v126 = v123 * v22 * v135;
            v25 = v123 * v22 * v135;
            v112 = (char *)v20;
            v26 = v123;
            v117 = 32 * v22;
            v27 = (int)v120;
            v137 = v23;
            do
            {
              v28 = &v107[v25];
              v29 = 0;
              if ( v27 > 0 )
              {
                v126 = v25;
                v30 = v115;
                v123 = v26;
                v119 = v24;
                v31 = v117;
                do
                {
                  v32 = 0;
                  if ( a6 > 0 )
                  {
                    v33 = 0;
                    v34 = (signed int)v112;
                    v131 = v29;
                    v132 = v28;
                    v115 = v30;
                    v35 = a6;
                    do
                    {
                      v36 = 0;
                      if ( v35 > 0 )
                      {
                        v133 = &v132[v33];
                        v37 = 0;
                        v129 = (char *)v33;
                        v130 = v32;
                        do
                        {
                          v38 = 0;
                          if ( v31 > 0 )
                          {
                            v113 = &v133[v37];
                            v128 = v37;
                            v122 = v36;
                            do
                            {
                              v39 = 0;
                              if ( v34 > 0 )
                              {
                                if ( v34 < 5 )
                                {
                                  v46 = (_BYTE *)(v115 + 16 * v130 + 2 * v122);
                                  v45 = (int)&v113[v38];
                                }
                                else
                                {
                                  v40 = v115 + 16 * v130;
                                  v121 = 0;
                                  v120 = &v113[v38];
                                  v119 = v40 + 2 * v122;
                                  v118 = v38;
                                  do
                                  {
                                    v41 = (int)v120;
                                    v42 = v121;
                                    v43 = v122;
                                    v120[v121] = *(_BYTE *)(v40 + 2 * v122);
                                    *(_BYTE *)(v41 + v42 + 1) = *(_BYTE *)(v40 + 2 * v43);
                                    *(_BYTE *)(v41 + v42 + 2) = *(_BYTE *)(v40 + 2 * v43);
                                    v44 = v125;
                                    *(_BYTE *)(v41 + v42 + 3) = *(_BYTE *)(v40 + 2 * v43);
                                    v121 = v42 + 4;
                                  }
                                  while ( v42 + 4 <= v44 );
                                  v34 = (signed int)v112;
                                  v31 = v117;
                                  v39 = v121;
                                  v45 = (int)v120;
                                  v46 = (_BYTE *)v119;
                                  v38 = v118;
                                }
                                v118 = v38;
                                do
                                  *(_BYTE *)(v45 + v39++) = *v46;
                                while ( v39 < v34 );
                                v38 = v118;
                              }
                              v38 += 32;
                            }
                            while ( v38 < v31 );
                            v37 = v128;
                            v36 = v122;
                            v35 = a6;
                          }
                          v37 += v34;
                          ++v36;
                        }
                        while ( v36 < v35 );
                        v33 = (int)v129;
                        v32 = v130;
                      }
                      v33 += v31;
                      ++v32;
                    }
                    while ( v32 < v35 );
                    v29 = v131;
                    v28 = v132;
                    v30 = v115;
                    v27 = *(_DWORD *)(v127 + *(_DWORD *)(a1 + 14284) + 4);
                    v119 = v127 + *(_DWORD *)(a1 + 14284);
                  }
                  v28 = &v28[(_DWORD)v124];
                  v30 += 128;
                  ++v29;
                }
                while ( v29 < v27 );
                v115 = v30;
                v25 = v126;
                v26 = v123;
                v24 = v119;
                v21 = *(_DWORD *)(v119 + 8);
              }
              v25 += v137;
              ++v26;
            }
            while ( v26 < v21 );
            v7 = a1;
            v13 = *(_DWORD *)(a1 + 52);
          }
        }
        else
        {
          v124 = v107;
          v125 = 0;
          if ( (signed int)v120 > 0 )
          {
            v65 = (int)v120;
            v122 = a6 - 1;
            v66 = v115;
            v67 = v114;
            v121 = a6 - 6;
            v123 = a6 * v20;
            v126 = 8 * a6;
            v68 = v125;
            v112 = (char *)v20;
            v69 = v116;
            do
            {
              v70 = 0;
              if ( v126 > 0 )
              {
                v137 = v69 + 2 * a6;
                v71 = 0;
                v133 = (char *)(v66 + 2 * a6);
                v125 = v68;
                v115 = v66;
                v114 = v67;
                v116 = v69;
                v72 = a6;
                do
                {
                  if ( v112 == (char *)2 )
                  {
                    v120 = (char *)(4 * v70);
                    v132 = (char *)(2 * v70);
                    v77 = v115 + 2 * v70;
                    v128 = v77;
                    v78 = 3 * *(_WORD *)v77;
                    v79 = (int)&v124[4 * v70];
                    v80 = *(_WORD *)(v137 + 2 * v70 - 2);
                    v129 = (char *)v79;
                    *(_BYTE *)v79 = (v80 + v78 + 1) >> 2;
                    v83 = __OFSUB__(v122, 1);
                    v81 = v122 == 1;
                    v82 = v122 - 1 < 0;
                    *(_BYTE *)(v79 + 1) = (*(_WORD *)(v77 + 2) + v78 + 2) >> 2;
                    v84 = (int)v120;
                    if ( !((unsigned __int8)(v82 ^ v83) | v81) )
                    {
                      v85 = v77 + 2;
                      v86 = v77 + 2 * v72 - 2;
                      v131 = v71;
                      v130 = v70;
                      v87 = v124;
                      do
                      {
                        v84 += 2;
                        v88 = 3 * *(_WORD *)v85;
                        v89 = (int)&v87[v84];
                        *(_BYTE *)v89 = (*(_WORD *)(v85 - 2) + v88 + 1) >> 2;
                        *(_BYTE *)(v89 + 1) = (*(_WORD *)(v85 + 2) + v88 + 2) >> 2;
                        v85 += 2;
                      }
                      while ( v85 < v86 );
                      v129 = &v87[v84];
                      v71 = v131;
                      v70 = v130;
                      v72 = a6;
                    }
                    v90 = (int)v132;
                    v91 = 3 * *(_WORD *)&v132[(_DWORD)v133 - 2];
                    v92 = (int)v129;
                    v129[2] = (*(_WORD *)&v132[(_DWORD)v133 - 4] + v91 + 1) >> 2;
                    *(_BYTE *)(v92 + 3) = (*(_WORD *)(v114 + v90) + v91 + 2) >> 2;
                  }
                  else
                  {
                    v73 = 0;
                    if ( v72 > 0 )
                    {
                      if ( v72 < 6 )
                      {
                        v74 = (int)&v124[4 * v70];
                        v75 = v115 + v71;
                      }
                      else
                      {
                        v74 = (int)&v124[4 * v70];
                        v75 = v115 + v71;
                        v131 = v71;
                        v130 = v70;
                        do
                        {
                          v76 = v121;
                          *(_BYTE *)(v74 + v73) = *(_BYTE *)(v75 + 2 * v73);
                          *(_BYTE *)(v74 + v73 + 1) = *(_BYTE *)(v75 + 2 * v73 + 2);
                          *(_BYTE *)(v74 + v73 + 2) = *(_BYTE *)(v75 + 2 * v73 + 4);
                          *(_BYTE *)(v74 + v73 + 3) = *(_BYTE *)(v75 + 2 * v73 + 6);
                          *(_BYTE *)(v74 + v73 + 4) = *(_BYTE *)(v75 + 2 * v73 + 8);
                          v73 += 5;
                        }
                        while ( v73 <= v76 );
                        v71 = v131;
                        v70 = v130;
                        v72 = a6;
                      }
                      v130 = v70;
                      do
                      {
                        *(_BYTE *)(v74 + v73) = *(_BYTE *)(v75 + 2 * v73);
                        ++v73;
                      }
                      while ( v73 < v72 );
                      v70 = v130;
                    }
                  }
                  v71 += 16;
                  v70 += 8;
                }
                while ( v70 < v126 );
                v68 = v125;
                v66 = v115;
                v67 = v114;
                v69 = v116;
                v65 = *(_DWORD *)(v127 + *(_DWORD *)(a1 + 14284) + 4);
              }
              v66 += 128;
              v67 += 128;
              v69 += 128;
              ++v68;
              v124 += v123;
            }
            while ( v68 < v65 );
            v115 = v66;
            v114 = v67;
            v116 = v69;
            v7 = a1;
            v13 = *(_DWORD *)(a1 + 52);
          }
        }
        v9 = v107;
        if ( v13 == 3 && v136 )
        {
          if ( v136 == 2 )
            ++v134;
          v93 = v109;
          v94 = v111;
          if ( v109 < v111 )
          {
            v95 = v110;
            v96 = 32 * v109;
            do
            {
              v97 = v108;
              if ( v108 < v95 )
              {
                v98 = v134;
                v113 = (char *)v96;
                v112 = v9;
                do
                {
                  *(_BYTE *)(v98 + *(_DWORD *)(a1 + 60) * v93 + 2 * v97) = *(&v9[v96] + v97);
                  v97 += 2;
                  v95 = v110;
                }
                while ( v97 < v110 );
                v96 = (int)v113;
                v9 = v112;
                v94 = v111;
              }
              v96 += 32;
              ++v93;
            }
            while ( v93 < v94 );
            v7 = a1;
            v13 = *(_DWORD *)(a1 + 52);
          }
        }
        else
        {
          sub_779000(v7, (int)&v108, v136, v134, (int)v107);
          v13 = *(_DWORD *)(v7 + 52);
        }
        if ( v13 != 2 || *(_DWORD *)(v7 + 88) != 1 )
        {
          ++v134;
          v14 = *(_DWORD *)(v7 + 14272);
        }
        else
        {
          --v134;
          v14 = *(_DWORD *)(v7 + 14272);
        }
      }
      ++v136;
    }
    result = *(_DWORD *)(v7 + 116);
    if ( result )
    {
      v17 = *(_DWORD *)(v7 + 84);
      result = a2;
      if ( v17 - 1 != *(_DWORD *)(a2 + 56) )
        v17 = *(_DWORD *)(v7 + 48);
    }
    if ( v13 != 255 || (result = *(_DWORD *)(v7 + 88), result != 255) )
    {
      if ( v17 < *(_DWORD *)(v7 + 48) )
      {
        v99 = (int)v9;
        v100 = v17;
        v101 = v134;
        do
        {
          sub_779000(v7, (int)&v108, v100, v101, v99);
          result = *(_DWORD *)(v7 + 52);
          if ( result != 2 || (result = *(_DWORD *)(v7 + 88), result != 1) )
            ++v101;
          else
            --v101;
          ++v100;
        }
        while ( v100 < *(_DWORD *)(v7 + 48) );
      }
    }
  }
  return result;
}
// 7774F0: using guessed type char var_58C[1280];

//----- (00778330) --------------------------------------------------------
signed int __cdecl sub_778330(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // ebp@1
  signed int result; // eax@1
  int v7; // esi@2
  int v8; // edx@4
  int v9; // eax@7
  int v10; // edi@7
  int v11; // ebp@7
  int v12; // eax@8
  int v13; // esi@8
  int v14; // edx@8
  int v15; // ecx@9
  int v16; // ebp@10
  int v17; // esi@11
  int v18; // eax@12
  int v19; // edi@12
  int v20; // edx@12
  int v21; // ecx@13
  int v22; // ebp@14
  char v23; // al@16
  int v24; // edx@16
  int v25; // ecx@19
  int v26; // ebp@32
  int v27; // edi@32
  int v28; // edx@33
  int v29; // esi@34
  signed int v30; // ebp@35
  int v31; // eax@37
  int v32; // ecx@48
  int v33; // ebp@48
  int v34; // eax@49
  int v35; // esi@49
  int v36; // edi@49
  int v37; // edx@50
  int v38; // esi@53
  int v39; // [sp+30h] [bp-44h]@1
  int v40; // [sp+34h] [bp-40h]@11
  int v41; // [sp+38h] [bp-3Ch]@12
  int v42; // [sp+3Ch] [bp-38h]@10
  int v43; // [sp+40h] [bp-34h]@8
  int v44; // [sp+44h] [bp-30h]@8
  int v45; // [sp+48h] [bp-2Ch]@12
  int v46; // [sp+4Ch] [bp-28h]@14
  int v47; // [sp+50h] [bp-24h]@5
  int v48; // [sp+54h] [bp-20h]@7
  int v49; // [sp+58h] [bp-1Ch]@5
  int v50; // [sp+5Ch] [bp-18h]@5

  v5 = *(_DWORD *)(a1 + 18484);
  result = sub_775560(
             a1 + 4,
             a5,
             a5,
             a3,
             a4,
             *(_DWORD *)(a1 + 48),
             *(_DWORD *)(a1 + 60),
             *(_DWORD *)(a1 + 32),
             *(_DWORD *)(a1 + 36),
             *(_DWORD *)(a1 + 40),
             (_DWORD *)(a2 + 44),
             (int)&v39);
  if ( !result )
  {
    v7 = *(_DWORD *)(a1 + 52);
    if ( v7 != 2 || *(_DWORD *)(a1 + 88) != 1 )
      result = *(_DWORD *)(a2 + 44);
    else
      result = *(_DWORD *)(a2 + 44) + 2;
    v8 = 0;
    if ( *(_DWORD *)(a1 + 48) > 0 )
    {
      v50 = *(_DWORD *)(a1 + 48);
      v49 = result;
      v47 = v5;
LABEL_6:
      if ( v8 >= *(_DWORD *)(a1 + 14272) )
      {
        if ( v8 == 3 && v7 == 5 )
        {
          v32 = v40;
          v33 = v42;
          if ( v40 < v42 )
          {
            v34 = v41;
            v35 = v50;
            v36 = v49;
            v43 = 3;
            do
            {
              v37 = v39;
              if ( v39 < v34 )
              {
                while ( 1 )
                {
                  v38 = v37++ * v35;
                  *(_BYTE *)(v38 + v36 + *(_DWORD *)(a1 + 60) * v32) = -1;
                  v34 = v41;
                  if ( v37 >= v41 )
                    break;
                  v35 = *(_DWORD *)(a1 + 48);
                }
                v35 = *(_DWORD *)(a1 + 48);
                v33 = v42;
              }
              ++v32;
            }
            while ( v32 < v33 );
            v50 = v35;
            v8 = v43;
            v7 = *(_DWORD *)(a1 + 52);
            v49 = v36;
          }
          v47 += 128;
        }
      }
      else
      {
        v48 = 0;
        v9 = *(_DWORD *)(a1 + 14284);
        v10 = v9 + 16 * v8;
        v11 = *(_DWORD *)(v10 + 8);
        if ( v11 > 0 )
        {
          v12 = *(_DWORD *)(16 * v8 + v9 + 4);
          v13 = v48;
          v44 = 16 * v8;
          v43 = v8;
          v14 = v47;
          do
          {
            v15 = 0;
            if ( v12 > 0 )
            {
              v16 = v42;
              v48 = v13;
              do
              {
                v17 = v40;
                if ( v40 < v16 )
                {
                  v18 = v41;
                  v19 = 16 * v40;
                  v47 = v14;
                  v20 = v50;
                  v45 = v15;
                  do
                  {
                    v21 = v39;
                    if ( v39 < v18 )
                    {
                      v22 = v47 + v19;
                      v46 = v19;
                      while ( 1 )
                      {
                        v23 = *(_BYTE *)(v22 + 2 * v21);
                        v24 = v21++ * v20;
                        *(_BYTE *)(v24 + v49 + *(_DWORD *)(a1 + 60) * v17) = v23;
                        v18 = v41;
                        if ( v21 >= v41 )
                          break;
                        v20 = *(_DWORD *)(a1 + 48);
                      }
                      v19 = v46;
                      v20 = *(_DWORD *)(a1 + 48);
                      v16 = v42;
                    }
                    v19 += 16;
                    ++v17;
                  }
                  while ( v17 < v16 );
                  v50 = v20;
                  v14 = v47;
                  v15 = v45;
                  v10 = v44 + *(_DWORD *)(a1 + 14284);
                  v12 = *(_DWORD *)(v10 + 4);
                }
                v14 += 128;
                ++v15;
              }
              while ( v15 < v12 );
              v13 = v48;
              v11 = *(_DWORD *)(v10 + 8);
            }
            ++v13;
          }
          while ( v13 < v11 );
          v47 = v14;
          v8 = v43;
          v7 = *(_DWORD *)(a1 + 52);
        }
      }
      result = v50;
      v25 = v49;
      while ( 1 )
      {
        if ( v7 != 2 || *(_DWORD *)(a1 + 88) != 1 )
          ++v25;
        else
          --v25;
        if ( ++v8 >= result )
          break;
        if ( v8 <= 0 )
        {
          v50 = result;
          v49 = v25;
          goto LABEL_6;
        }
        if ( *(_DWORD *)(a1 + 88) != 4 )
        {
          v50 = result;
          v49 = v25;
          goto LABEL_6;
        }
        v26 = v40;
        v27 = v42;
        if ( v40 < v42 )
        {
          v43 = v8;
          v28 = v41;
          do
          {
            v29 = v39;
            if ( v39 < v28 )
            {
              v48 = v26;
              v30 = v43;
              while ( 1 )
              {
                v31 = v29 * result;
                *(_BYTE *)(v31 + v25 + *(_DWORD *)(a1 + 60) * v48) = v30 >= 3 ? -1 : *(_BYTE *)(v31
                                                                                              + v25
                                                                                              + *(_DWORD *)(a1 + 60)
                                                                                              * v48
                                                                                              - 1);
                ++v29;
                v28 = v41;
                if ( v29 >= v41 )
                  break;
                result = *(_DWORD *)(a1 + 48);
              }
              v26 = v48;
              result = *(_DWORD *)(a1 + 48);
              v27 = v42;
            }
            ++v26;
          }
          while ( v26 < v27 );
          v8 = v43;
          v7 = *(_DWORD *)(a1 + 52);
        }
      }
    }
  }
  return result;
}

//----- (007786A0) --------------------------------------------------------
signed int __cdecl sub_7786A0(int a1, int a2, int a3, int a4, signed int a5)
{
  signed int result; // eax@1
  int v6; // edx@1
  int v7; // edi@5
  int v8; // esi@6
  int v9; // edx@6
  int v10; // ecx@8
  int v11; // ebp@10
  int v12; // edx@10
  int v13; // esi@10
  int v14; // edi@10
  int v15; // eax@10
  int v16; // eax@14
  int v17; // edx@18
  char v18; // al@22
  int v19; // edx@22
  int v20; // esi@24
  int v21; // ebp@24
  int v22; // esi@29
  int v23; // ebp@29
  int v24; // esi@30
  int v25; // edx@30
  int v26; // ebp@32
  int v27; // esi@34
  int v28; // edx@34
  int v29; // ecx@34
  int v30; // edi@34
  int v31; // eax@34
  int v32; // eax@38
  int v33; // edx@42
  int v34; // edi@47
  int v35; // esi@47
  int v36; // edi@52
  int v37; // edx@52
  int v38; // [sp+30h] [bp-3Ch]@4
  int v39; // [sp+34h] [bp-38h]@6
  int v40; // [sp+38h] [bp-34h]@7
  int v41; // [sp+3Ch] [bp-30h]@6
  int v42; // [sp+44h] [bp-28h]@7
  int v43; // [sp+48h] [bp-24h]@14
  int v44; // [sp+4Ch] [bp-20h]@18
  int v45; // [sp+50h] [bp-1Ch]@9
  int v46; // [sp+54h] [bp-18h]@9
  int v47; // [sp+58h] [bp-14h]@9

  result = a5;
  v6 = *(_DWORD *)(a1 + 52);
  if ( v6 == 1 || v6 == 2 || v6 == 5 )
  {
    result = sub_775560(
               a1 + 4,
               a5 * *(_DWORD *)(a1 + 14264),
               *(_DWORD *)(a1 + 14268) * a5,
               a3,
               a4,
               *(_DWORD *)(a1 + 48),
               *(_DWORD *)(a1 + 60),
               *(_DWORD *)(a1 + 32),
               *(_DWORD *)(a1 + 36),
               *(_DWORD *)(a1 + 40),
               (_DWORD *)(a2 + 44),
               (int)&v38);
    if ( !result )
    {
      v7 = *(_DWORD *)(a1 + 48);
      if ( v7 == 3 )
      {
        v24 = v39;
        v25 = v41;
        if ( v39 < v41 )
        {
          result = 3 * v40;
          v42 = *(_DWORD *)(a2 + 44);
          do
          {
            v26 = 3 * v38;
            if ( 3 * v38 < result )
            {
              v43 = v24;
              do
              {
                v27 = v42 + *(_DWORD *)(a1 + 60) * v43;
                v28 = *(_BYTE *)(v27 + v26);
                v29 = *(_BYTE *)(v27 + v26 + 1);
                v30 = *(_BYTE *)(v27 + v26 + 2);
                v31 = v28 + ((359 * v30 - 45813) >> 8);
                if ( v31 <= 255 )
                {
                  if ( v31 < 0 )
                    LOWORD(v31) = 0;
                }
                else
                {
                  LOWORD(v31) = 255;
                }
                v44 = (signed __int16)v31;
                v32 = v28 + ((-88 * v29 + -183 * v30 + 34806) >> 8);
                if ( v32 <= 255 )
                {
                  if ( v32 < 0 )
                    LOBYTE(v32) = 0;
                }
                else
                {
                  LOBYTE(v32) = -1;
                }
                v33 = ((454 * v29 - 57937) >> 8) + v28;
                if ( v33 <= 255 )
                {
                  if ( v33 < 0 )
                    LOBYTE(v33) = 0;
                }
                else
                {
                  LOBYTE(v33) = -1;
                }
                if ( *(_DWORD *)(a1 + 52) == 2 )
                {
                  *(_BYTE *)(v27 + v26) = v33;
                  v36 = v43;
                  v37 = v42;
                  *(_BYTE *)(v26 + v42 + v43 * *(_DWORD *)(a1 + 60) + 1) = v32;
                  *(_BYTE *)(v26 + v37 + v36 * *(_DWORD *)(a1 + 60) + 2) = v44;
                }
                else
                {
                  v34 = v42;
                  *(_BYTE *)(v27 + v26) = v44;
                  v35 = v43;
                  *(_BYTE *)(v26 + v34 + v43 * *(_DWORD *)(a1 + 60) + 1) = v32;
                  *(_BYTE *)(v26 + v34 + v35 * *(_DWORD *)(a1 + 60) + 2) = v33;
                }
                v26 += 3;
                result = 3 * v40;
              }
              while ( v26 < 3 * v40 );
              v24 = v43;
              v25 = v41;
            }
            ++v24;
          }
          while ( v24 < v25 );
        }
      }
      else
      {
        v8 = v39;
        v9 = v41;
        if ( v39 < v41 )
        {
          result = v7 * v40;
          v42 = *(_DWORD *)(a2 + 44);
          do
          {
            v10 = v38 * v7;
            if ( v38 * v7 < result )
            {
              v45 = result;
              v47 = v8;
              v46 = v7;
              do
              {
                v11 = v42 + *(_DWORD *)(a1 + 60) * v47;
                v12 = *(_BYTE *)(v11 + v10);
                v13 = *(_BYTE *)(v11 + v10 + 1);
                v14 = *(_BYTE *)(v11 + v10 + 2);
                v15 = v12 + ((359 * v14 - 45813) >> 8);
                if ( v15 <= 255 )
                {
                  if ( v15 < 0 )
                    LOWORD(v15) = 0;
                }
                else
                {
                  LOWORD(v15) = 255;
                }
                v43 = (signed __int16)v15;
                v16 = v12 + ((-88 * v13 + -183 * v14 + 34806) >> 8);
                if ( v16 <= 255 )
                {
                  if ( v16 < 0 )
                    LOWORD(v16) = 0;
                }
                else
                {
                  LOWORD(v16) = 255;
                }
                v44 = (signed __int16)v16;
                v17 = ((454 * v13 - 57937) >> 8) + v12;
                if ( v17 <= 255 )
                {
                  if ( v17 < 0 )
                    LOBYTE(v17) = 0;
                }
                else
                {
                  LOBYTE(v17) = -1;
                }
                v18 = v17;
                v19 = *(_DWORD *)(a1 + 88);
                if ( v19 == 6 )
                {
                  v22 = v42;
                  *(_BYTE *)(v11 + v10) = -(char)v43 - 1;
                  v23 = v47;
                  *(_BYTE *)(v10 + v22 + v47 * *(_DWORD *)(a1 + 60) + 1) = -(char)v44 - 1;
                  *(_BYTE *)(v10 + v22 + v23 * *(_DWORD *)(a1 + 60) + 2) = -v18 - 1;
                  v46 = *(_DWORD *)(a1 + 48);
                  v45 = v40 * v46;
                }
                else if ( v19 == 3 )
                {
                  v20 = v42;
                  *(_BYTE *)(v11 + v10) = v43;
                  v21 = v47;
                  *(_BYTE *)(v10 + v20 + v47 * *(_DWORD *)(a1 + 60) + 1) = v44;
                  *(_BYTE *)(v10 + v20 + v21 * *(_DWORD *)(a1 + 60) + 2) = v18;
                  v46 = *(_DWORD *)(a1 + 48);
                  v45 = v40 * v46;
                }
                v10 += v46;
                result = v45;
              }
              while ( v10 < v45 );
              v8 = v47;
              v7 = v46;
              v9 = v41;
            }
            ++v8;
          }
          while ( v8 < v9 );
        }
      }
    }
  }
  return result;
}

//----- (00778A60) --------------------------------------------------------
void __cdecl US_And_CC_MCU_Scaled(struct _JPEG_PROPERTIES *a1, struct _STATE *a2, struct _SCAN *a3, int a4, int a5, int a6, bool a7)
{
  int v7; // eax@3

  if ( a1->jinterleaveType && !a1->progressive_found )
  {
    sub_775A10((int)a1, (signed int)a2, (int)a3, a4, a5, a6, 0, a7);
  }
  else
  {
    v7 = a1->upsampling_reqd;
    if ( v7 && a1->cconversion_reqd )
    {
      sub_775960((int)a1, (signed int)a2, (int)a3, a4, a5, a6, a7);
    }
    else if ( v7 || !a1->cconversion_reqd )
    {
      if ( !v7 || a1->cconversion_reqd )
      {
        if ( a1->DIBColor == 3 )
          sub_775960((int)a1, (signed int)a2, (int)a3, a4, a5, a6, a7);
        else
          sub_778330((int)a1, (int)a2, a4, a5, a6);
      }
      else if ( a3->start_spec || a1->progressive_found )
      {
        sub_7774F0((int)a1, (signed int)a2, (int)a3, a4, a5, a6, a7);
      }
      else
      {
        sub_775A10((int)a1, (signed int)a2, (int)a3, a4, a5, a6, 1, a7);
      }
    }
    else
    {
      sub_778330((int)a1, (int)a2, a4, a5, a6);
      sub_7786A0((int)a1, (int)a2, a4, a5, a6);
    }
  }
}

//----- (00778C40) --------------------------------------------------------
void __cdecl CConvert_Image(struct _JPEG_PROPERTIES *a1)
{
  _IJL_COLOR v1; // eax@1
  int v2; // eax@5
  int v3; // edi@7
  int v4; // edx@7
  int v5; // esi@10
  int v6; // eax@12
  int v7; // ebx@14
  int v8; // edx@14
  int v9; // ecx@14
  int v10; // ebp@14
  int v11; // ebx@14
  int v12; // ebx@18
  int v13; // edx@22
  _IJL_COLOR v14; // edx@26
  int v15; // esi@33
  int v16; // eax@35
  int v17; // ebx@37
  int v18; // edx@37
  int v19; // ebp@37
  int v20; // ebx@37
  int v21; // ebx@41
  int v22; // edx@45
  int v23; // [sp+8h] [bp-2Ch]@13
  int v24; // [sp+8h] [bp-2Ch]@36
  char v25; // [sp+Ch] [bp-28h]@26
  char *v26; // [sp+10h] [bp-24h]@11
  char *v27; // [sp+10h] [bp-24h]@34
  char v28; // [sp+14h] [bp-20h]@41
  char v29; // [sp+18h] [bp-1Ch]@18
  int v30; // [sp+1Ch] [bp-18h]@11
  int v31; // [sp+1Ch] [bp-18h]@37
  int v32; // [sp+20h] [bp-14h]@37
  int v33; // [sp+24h] [bp-10h]@14

  v1 = a1->DIBColor;
  if ( (v1 == 2 || v1 == 1 || v1 == 5) && a1->cconversion_reqd )
  {
    v2 = a1->roi.bottom - a1->roi.top;
    if ( a1->roi.bottom == a1->roi.top )
      v2 = abs(a1->DIBHeight);
    v3 = a1->DIBChannels;
    v4 = v3 * (a1->roi.right - a1->roi.left);
    if ( !v4 )
      v4 = v3 * a1->DIBWidth;
    if ( v3 == 3 )
    {
      v15 = v2 - 1;
      if ( v2 )
      {
        v27 = a1->DIBBytes;
        do
        {
          v16 = 0;
          if ( v4 > 0 )
          {
            v24 = v4;
            do
            {
              v17 = (int)&v27[a1->DIBLineBytes * v15];
              v31 = v17;
              v18 = *(_BYTE *)(v17 + v16);
              v32 = *(_BYTE *)(v17 + v16 + 1);
              v19 = *(_BYTE *)(v17 + v16 + 2);
              v20 = v18 + ((359 * v19 - 45813) >> 8);
              if ( v20 <= 255 )
              {
                if ( v20 < 0 )
                  LOBYTE(v20) = 0;
              }
              else
              {
                LOBYTE(v20) = -1;
              }
              v28 = v20;
              v21 = v18 + ((-88 * v32 + -183 * v19 + 34806) >> 8);
              if ( v21 <= 255 )
              {
                if ( v21 < 0 )
                  LOBYTE(v21) = 0;
              }
              else
              {
                LOBYTE(v21) = -1;
              }
              v22 = ((454 * v32 - 57937) >> 8) + v18;
              if ( v22 <= 255 )
              {
                if ( v22 < 0 )
                  LOBYTE(v22) = 0;
              }
              else
              {
                LOBYTE(v22) = -1;
              }
              if ( a1->DIBColor == 2 )
              {
                *(_BYTE *)(v31 + v16) = v22;
                *(&v27[v16 + 1] + v15 * a1->DIBLineBytes) = v21;
                *(&v27[v16 + 2] + v15 * a1->DIBLineBytes) = v28;
              }
              else
              {
                *(_BYTE *)(v31 + v16) = v28;
                *(&v27[v16 + 1] + v15 * a1->DIBLineBytes) = v21;
                *(&v27[v16 + 2] + v15 * a1->DIBLineBytes) = v22;
              }
              v16 += a1->DIBChannels;
              v4 = v24;
            }
            while ( v16 < v24 );
          }
          --v15;
        }
        while ( v15 != -1 );
      }
    }
    else
    {
      v5 = v2 - 1;
      if ( v2 )
      {
        v30 = a1->DIBChannels;
        v26 = a1->DIBBytes;
        do
        {
          v6 = 0;
          if ( v4 > 0 )
          {
            v23 = v4;
            do
            {
              v7 = (int)&v26[a1->DIBLineBytes * v5];
              v33 = v7;
              v8 = *(_BYTE *)(v7 + v6);
              v9 = *(_BYTE *)(v7 + v6 + 1);
              v10 = *(_BYTE *)(v7 + v6 + 2);
              v11 = v8 + ((359 * v10 - 45813) >> 8);
              if ( v11 <= 255 )
              {
                if ( v11 < 0 )
                  LOBYTE(v11) = 0;
              }
              else
              {
                LOBYTE(v11) = -1;
              }
              v29 = v11;
              v12 = v8 + ((-88 * v9 + -183 * v10 + 34806) >> 8);
              if ( v12 <= 255 )
              {
                if ( v12 < 0 )
                  LOBYTE(v12) = 0;
              }
              else
              {
                LOBYTE(v12) = -1;
              }
              v13 = ((454 * v9 - 57937) >> 8) + v8;
              if ( v13 <= 255 )
              {
                if ( v13 < 0 )
                  LOBYTE(v13) = 0;
              }
              else
              {
                LOBYTE(v13) = -1;
              }
              v25 = v13;
              v14 = a1->JPGColor;
              if ( v14 == 6 )
              {
                *(_BYTE *)(v33 + v6) = -v29 - 1;
                *(&v26[v6 + 1] + v5 * a1->DIBLineBytes) = -(char)v12 - 1;
                *(&v26[v6 + 2] + v5 * a1->DIBLineBytes) = -v25 - 1;
                v30 = a1->DIBChannels;
              }
              else if ( v14 == 3 )
              {
                *(_BYTE *)(v33 + v6) = v29;
                *(&v26[v6 + 1] + v5 * a1->DIBLineBytes) = v12;
                *(&v26[v6 + 2] + v5 * a1->DIBLineBytes) = v25;
                *(&v26[v6 + 3] + v5 * a1->DIBLineBytes) = -1;
                v30 = a1->DIBChannels;
              }
              v6 += v30;
              v4 = v23;
            }
            while ( v6 < v23 );
          }
          --v5;
        }
        while ( v5 != -1 );
      }
    }
  }
}

//----- (00779000) --------------------------------------------------------
int __cdecl sub_779000(int a1, int a2, signed int a3, int a4, int a5)
{
  int *v5; // edx@1
  int result; // eax@2
  int v7; // esi@8
  int v8; // ebx@8
  int v9; // ecx@9
  int v10; // edi@9
  int v11; // ebp@10
  int v12; // ebx@11
  char v13; // al@12
  int v14; // edi@12
  int v15; // ebx@17
  int v16; // esi@17
  int v17; // ecx@18
  int v18; // edi@18
  int v19; // ebp@19
  int v20; // esi@20
  int v21; // ebx@20
  char v22; // cl@21
  int v23; // esi@29
  int v24; // ebx@29
  int v25; // ecx@30
  int v26; // edi@30
  int v27; // ebp@31
  int v28; // esi@36
  int v29; // ebx@37
  int v30; // ecx@38
  int v31; // ebx@45
  int v32; // esi@45
  int v33; // ebp@45
  int v34; // edi@45
  int v35; // ecx@46
  int v36; // eax@47
  int v37; // [sp+4h] [bp-18h]@20
  int v38; // [sp+8h] [bp-14h]@11
  int v39; // [sp+8h] [bp-14h]@20

  v5 = (int *)a2;
  if ( a3 < *(_DWORD *)(a1 + 48) || (result = *(_DWORD *)(a1 + 52), result == 3) )
  {
    result = *(_DWORD *)(a1 + 88);
    if ( result != 4 || *(_DWORD *)(a1 + 52) != 5 )
    {
      if ( result != 3 && result != 1 || *(_DWORD *)(a1 + 52) != 5 )
      {
        if ( (result != 4 || *(_DWORD *)(a1 + 52) != 1) && (result != 4 || (result = *(_DWORD *)(a1 + 52), result != 2)) )
        {
          v7 = *(_DWORD *)(a2 + 4);
          v8 = *(_DWORD *)(a2 + 12);
          if ( v7 < v8 )
          {
            v9 = *(_DWORD *)(a2 + 8);
            result = 32 * v7;
            v10 = a5;
            do
            {
              v11 = *(_DWORD *)a2;
              if ( *(_DWORD *)a2 < v9 )
              {
                v12 = v10 + result;
                v38 = result;
                do
                {
                  v13 = *(_BYTE *)(v12 + v11);
                  v14 = v11++ * *(_DWORD *)(a1 + 48);
                  *(_BYTE *)(v14 + a4 + *(_DWORD *)(a1 + 60) * v7) = v13;
                  v9 = *(_DWORD *)(a2 + 8);
                }
                while ( v11 < v9 );
                result = v38;
                v10 = a5;
                v8 = *(_DWORD *)(a2 + 12);
              }
              result += 32;
              ++v7;
            }
            while ( v7 < v8 );
          }
        }
        else
        {
          v15 = *(_DWORD *)(a2 + 4);
          v16 = *(_DWORD *)(a2 + 12);
          if ( v15 < v16 )
          {
            result = *(_DWORD *)(a2 + 8);
            v17 = 32 * v15;
            v18 = a5;
            do
            {
              v19 = *v5;
              if ( *v5 < result )
              {
                v20 = 3 * v19;
                v39 = v17;
                v37 = v15;
                v21 = v18 + v17;
                do
                {
                  *(_BYTE *)(v20 + a4 + v37 * *(_DWORD *)(a1 + 60)) = *(_BYTE *)(v21 + v19);
                  *(_BYTE *)(v20 + a4 + v37 * *(_DWORD *)(a1 + 60) + 1) = *(_BYTE *)(v21 + v19);
                  v22 = *(_BYTE *)(v21 + v19++);
                  *(_BYTE *)(v20 + a4 + v37 * *(_DWORD *)(a1 + 60) + 2) = v22;
                  v20 += 3;
                  result = *(_DWORD *)(a2 + 8);
                }
                while ( v19 < result );
                v17 = v39;
                v15 = v37;
                v18 = a5;
                v5 = (int *)a2;
                v16 = *(_DWORD *)(a2 + 12);
              }
              v17 += 32;
              ++v15;
            }
            while ( v15 < v16 );
          }
        }
      }
      else if ( a3 >= 3 )
      {
        result = *(_DWORD *)(a2 + 4);
        v28 = *(_DWORD *)(a2 + 12);
        if ( result < v28 )
        {
          v29 = *(_DWORD *)(a2 + 8);
          do
          {
            v30 = *(_DWORD *)a2;
            if ( *(_DWORD *)a2 < v29 )
            {
              do
              {
                *(_BYTE *)(a4 + *(_DWORD *)(a1 + 60) * result + 4 * v30++) = -1;
                v29 = *(_DWORD *)(a2 + 8);
              }
              while ( v30 < v29 );
              v28 = *(_DWORD *)(a2 + 12);
            }
            ++result;
          }
          while ( result < v28 );
        }
      }
      else
      {
        v23 = *(_DWORD *)(a2 + 4);
        v24 = *(_DWORD *)(a2 + 12);
        if ( v23 < v24 )
        {
          v25 = *(_DWORD *)(a2 + 8);
          result = 32 * v23;
          v26 = a5;
          do
          {
            v27 = *(_DWORD *)a2;
            if ( *(_DWORD *)a2 < v25 )
            {
              do
              {
                *(_BYTE *)(a4 + *(_DWORD *)(a1 + 60) * v23 + 4 * v27) = *(_BYTE *)(v26 + result + v27);
                ++v27;
                v25 = *(_DWORD *)(a2 + 8);
              }
              while ( v27 < v25 );
              v26 = a5;
              v24 = *(_DWORD *)(a2 + 12);
            }
            result += 32;
            ++v23;
          }
          while ( v23 < v24 );
        }
      }
    }
    else
    {
      result = *(_DWORD *)(a2 + 4);
      if ( result < *(_DWORD *)(a2 + 12) )
      {
        v31 = *(_DWORD *)(a2 + 8);
        v32 = 32 * result;
        v33 = *(_DWORD *)(a2 + 4);
        result = *(_DWORD *)(a2 + 12);
        v34 = a5;
        do
        {
          v35 = *v5;
          if ( *v5 < v31 )
          {
            v36 = v34 + v32;
            do
            {
              *(_BYTE *)(a4 + v33 * *(_DWORD *)(a1 + 60) + 4 * v35) = *(_BYTE *)(v36 + v35);
              *(_BYTE *)(a4 + v33 * *(_DWORD *)(a1 + 60) + 4 * v35 + 1) = *(_BYTE *)(v36 + v35);
              *(_BYTE *)(a4 + v33 * *(_DWORD *)(a1 + 60) + 4 * v35 + 2) = *(_BYTE *)(v36 + v35);
              *(_BYTE *)(a4 + v33 * *(_DWORD *)(a1 + 60) + 4 * v35++ + 3) = -1;
              v31 = *(_DWORD *)(a2 + 8);
            }
            while ( v35 < v31 );
            v34 = a5;
            v5 = (int *)a2;
            result = *(_DWORD *)(a2 + 12);
          }
          v32 += 32;
          ++v33;
        }
        while ( v33 < result );
      }
    }
  }
  return result;
}

//----- (00779330) --------------------------------------------------------
signed int __cdecl US_General_P_MCU(int a1, int a2, int a3)
{
  int v3; // ebp@1
  char *v4; // ebx@1
  _WORD *v5; // esi@1
  int v6; // edx@2
  signed int v7; // ecx@2
  signed int result; // eax@3
  int v9; // ecx@4
  signed int v10; // edx@6
  signed int v11; // eax@6
  int v12; // ebp@8
  int v13; // ecx@12
  signed int v14; // eax@12
  signed int v15; // ecx@12
  int v16; // ebp@12
  signed int v17; // ebx@12
  int v18; // eax@12
  int v19; // edx@14
  int v20; // esi@15
  int v21; // eax@15
  int v22; // ebp@15
  char *v23; // esi@17
  int v24; // edi@17
  int v25; // edx@17
  int v26; // ebx@18
  int v27; // ecx@19
  int v28; // edi@19
  int v29; // edx@20
  _WORD *v30; // esi@21
  signed int v31; // ebp@21
  __int16 v32; // ax@22
  int v33; // ebx@22
  int v34; // edi@23
  int v35; // edx@24
  int v36; // esi@26
  int v37; // ecx@26
  int v38; // edi@47
  int v39; // edx@47
  int v40; // eax@47
  char *v41; // ebp@48
  int v42; // esi@48
  int v43; // ebx@49
  int v44; // ebx@52
  int v45; // edx@52
  int v46; // ebx@54
  int v47; // edx@54
  int v48; // ebx@56
  int v49; // ebp@56
  int v50; // esi@56
  _WORD *v51; // edx@56
  int v52; // ecx@57
  signed int v53; // esi@58
  int v54; // eax@59
  int v55; // edi@59
  signed int v56; // edx@61
  char v57; // al@63
  int v58; // ecx@63
  char *v59; // ebx@63
  char v60; // al@66
  int v61; // ecx@66
  int v62; // edx@83
  int v63; // eax@83
  int v64; // esi@84
  int v65; // edi@84
  int v66; // ebx@85
  int v67; // ecx@85
  int v68; // edi@90
  int v69; // ebp@90
  int v70; // eax@90
  int v71; // esi@90
  int v72; // ecx@90
  int v73; // ebx@90
  int v74; // ecx@90
  int v75; // ebx@90
  int v76; // edx@91
  int v77; // esi@91
  int v78; // ebp@92
  int v79; // ecx@93
  int v80; // ecx@95
  int v81; // ecx@96
  int v82; // esi@97
  int v83; // edx@97
  int v84; // ecx@97
  int v85; // ebp@97
  int v86; // esi@97
  int v87; // ecx@97
  int v88; // esi@97
  int v89; // edx@98
  int v90; // ebp@98
  int v91; // edi@98
  int v92; // ebx@99
  int v93; // edi@104
  int v94; // esi@104
  int v95; // ebp@104
  int v96; // ecx@104
  int v97; // ebx@104
  int v98; // ebp@104
  int v99; // ebp@105
  int v100; // ecx@105
  char *v101; // edi@107
  int v102; // esi@107
  int v103; // ebx@108
  int v104; // edx@108
  _WORD *v105; // ecx@108
  int v106; // esi@114
  int v107; // ebp@114
  int v108; // ebp@114
  int v109; // ebp@114
  int v110; // ebp@114
  int v111; // ebp@114
  int v112; // ebp@114
  int v113; // ebp@114
  signed int v114; // edi@117
  int v115; // esi@122
  int v116; // eax@132
  int v117; // esi@140
  int v118; // edi@140
  int v119; // eax@140
  int v120; // esi@141
  int v121; // eax@144
  int v122; // ebp@144
  int v123; // esi@144
  int v124; // edx@144
  int v125; // ecx@144
  int v126; // ebx@144
  int v127; // eax@144
  int v128; // esi@144
  int v129; // ebp@144
  int v130; // eax@144
  _WORD *v131; // eax@144
  int v132; // esi@146
  int v133; // eax@146
  int v134; // edi@146
  int v135; // eax@147
  int v136; // eax@150
  char v137[1280]; // [sp+30h] [bp-59Ch]@16
  char v138; // [sp+530h] [bp-9Ch]@3
  char *v139; // [sp+540h] [bp-8Ch]@47
  int v140; // [sp+544h] [bp-88h]@15
  int v141; // [sp+548h] [bp-84h]@47
  int v142; // [sp+54Ch] [bp-80h]@47
  char *v143; // [sp+550h] [bp-7Ch]@63
  int v144; // [sp+554h] [bp-78h]@23
  int v145; // [sp+558h] [bp-74h]@21
  int v146; // [sp+55Ch] [bp-70h]@17
  char *v147; // [sp+560h] [bp-6Ch]@12
  int v148; // [sp+564h] [bp-68h]@6
  int v149; // [sp+568h] [bp-64h]@1
  _WORD *v150; // [sp+56Ch] [bp-60h]@3
  char *v151; // [sp+570h] [bp-5Ch]@23
  char *v152; // [sp+574h] [bp-58h]@23
  int v153; // [sp+578h] [bp-54h]@16
  int v154; // [sp+57Ch] [bp-50h]@15
  int v155; // [sp+580h] [bp-4Ch]@15
  int v156; // [sp+584h] [bp-48h]@5
  _WORD *v157; // [sp+588h] [bp-44h]@6
  int v158; // [sp+58Ch] [bp-40h]@15
  char *v159; // [sp+590h] [bp-3Ch]@15
  int v160; // [sp+594h] [bp-38h]@15
  int v161; // [sp+598h] [bp-34h]@12
  char *v162; // [sp+59Ch] [bp-30h]@16
  char v163; // [sp+5A0h] [bp-2Ch]@1
  int v164; // [sp+5A4h] [bp-28h]@1
  int v165; // [sp+5A8h] [bp-24h]@1
  _WORD *v166; // [sp+5ACh] [bp-20h]@1
  int v167; // [sp+5B0h] [bp-1Ch]@1
  int v168; // [sp+5B4h] [bp-18h]@1
  int v169; // [sp+5B8h] [bp-14h]@1

  v3 = a1;
  v4 = 0;
  v5 = 0;
  v165 = 0;
  v149 = 0;
  v164 = 0;
  v169 = 0;
  v168 = 0;
  v167 = 0;
  v166 = 0;
  v163 = 0;
  if ( *(_DWORD *)(a1 + 19944) == 1 )
  {
    v6 = *(_DWORD *)(a1 + 14264);
    if ( v6 == 2 )
    {
      v7 = *(_DWORD *)(a1 + 14268);
      if ( v7 == 1 )
      {
        v132 = 0;
        v163 = 1;
        v133 = *(_DWORD *)(a1 + 14272);
        v134 = v133 - 1;
        if ( v133 )
        {
          v162 = *(char **)(a1 + 14284);
          v135 = 16 * v134;
          v140 = 2;
          v139 = 0;
          do
          {
            --v134;
            v132 += *(_DWORD *)&v162[v135 + 8] * *(_DWORD *)&v162[v135 + 4];
            v135 -= 16;
          }
          while ( v134 != -1 );
          v6 = v140;
          v4 = v139;
          v3 = a1;
        }
        v162 = *(char **)(v3 + 19948);
        v136 = *((_DWORD *)v162 + 1) + (v132 << 6) * 2 * a2;
        v5 = (_WORD *)(v136 + (v132 << 8));
        v165 = v136;
      }
    }
    else
    {
      v7 = *(_DWORD *)(a1 + 14268);
    }
    if ( v6 == 2 && v7 == 2 )
    {
      v117 = *(_DWORD *)(v3 + 14272);
      v118 = v117 - 1;
      v163 = 2;
      v119 = 0;
      if ( v117 )
      {
        v162 = *(char **)(v3 + 14284);
        v120 = 16 * v118;
        v140 = 2;
        v139 = v4;
        do
        {
          --v118;
          v119 += *(_DWORD *)&v162[v120 + 8] * *(_DWORD *)&v162[v120 + 4];
          v120 -= 16;
        }
        while ( v118 != -1 );
        v6 = v140;
        v4 = v139;
        v3 = a1;
      }
      v121 = v119 << 6;
      v139 = v4;
      v122 = *(_DWORD *)(v3 + 19948);
      v123 = *(_DWORD *)v122;
      v140 = v6;
      v161 = 2;
      v124 = v121 * a2 + v121;
      v125 = v121 * a2 + 2 * v121;
      v149 = v123 + 2 * v124;
      v126 = v121 * 2 * a2;
      v169 = v123 + v126;
      v127 = v123 + 2 * v125;
      v128 = *(_DWORD *)(v122 + 4);
      v129 = *(_DWORD *)(v122 + 8);
      v168 = v127;
      v130 = v126 + v128;
      v5 = (_WORD *)(v128 + 2 * v125);
      v165 = v130;
      v164 = v129 + 2 * v124;
      v131 = (_WORD *)(v129 + 2 * v125);
      v7 = 2;
      v167 = v129 + v126;
      v6 = v140;
      v4 = v139;
      v166 = v131;
      v3 = a1;
    }
  }
  else
  {
    v6 = *(_DWORD *)(a1 + 14264);
    v7 = *(_DWORD *)(a1 + 14268);
  }
  v150 = *(_WORD **)(v3 + 18484);
  result = sub_775560(
             v3 + 4,
             8 * v6,
             8 * v7,
             a2,
             a3,
             *(_DWORD *)(v3 + 48),
             *(_DWORD *)(v3 + 60),
             *(_DWORD *)(v3 + 32),
             *(_DWORD *)(v3 + 36),
             *(_DWORD *)(v3 + 40),
             (_DWORD *)(v3 + 14356),
             (int)&v138);
  if ( !result )
  {
    v9 = *(_DWORD *)(v3 + 52);
    if ( v9 != 2 || *(_DWORD *)(v3 + 88) != 1 )
    {
      v156 = *(_DWORD *)(v3 + 14368) + *(_DWORD *)(v3 + 14356);
    }
    else
    {
      v156 = *(_DWORD *)(v3 + 14356);
      v116 = *(_DWORD *)(v3 + 14368);
      if ( v116 )
      {
        if ( v116 == 1 )
          ++v156;
      }
      else
      {
        v156 += 2;
      }
    }
    v10 = *(_DWORD *)(v3 + 48);
    v11 = *(_DWORD *)(v3 + 14272);
    v148 = 0;
    v157 = v5;
    while ( 1 )
    {
      v12 = v11 >= v10 ? v10 : v11;
      if ( v148 >= v12 )
        break;
      if ( *(_DWORD *)(a1 + 88) != 4 || v148 <= 0 )
      {
        v161 = 16 * v148;
        v13 = *(_DWORD *)(a1 + 14284) + 16 * v148;
        v14 = *(_DWORD *)(a1 + 14264);
        v147 = (char *)v13;
        v15 = *(_DWORD *)(v13 + 4);
        v16 = v14 / v15;
        v17 = *((_DWORD *)v147 + 2);
        v18 = *(_DWORD *)(a1 + 14268) / v17;
        if ( v163 == 1 )
        {
          v101 = v137;
          v102 = 0;
          if ( v15 > 0 )
          {
            do
            {
              v103 = (int)v101;
              v104 = (int)v150;
              v160 = v102;
              v105 = v157;
              v159 = v101 + 256;
              v162 = v101;
              v140 = v16;
              do
              {
                if ( v140 == 2 )
                {
                  v106 = *(_WORD *)v104;
                  *(_BYTE *)v103 = (*(_WORD *)(v165 + 14) + 3 * v106 + 1) >> 2;
                  *(_BYTE *)(v103 + 1) = (*(_WORD *)(v104 + 2) + 3 * v106 + 2) >> 2;
                  v107 = 3 * *(_WORD *)(v104 + 2);
                  *(_BYTE *)(v103 + 2) = (v107 + *(_WORD *)v104 + 1) >> 2;
                  *(_BYTE *)(v103 + 3) = (v107 + *(_WORD *)(v104 + 4) + 2) >> 2;
                  v108 = 3 * *(_WORD *)(v104 + 4);
                  *(_BYTE *)(v103 + 4) = (v108 + *(_WORD *)(v104 + 2) + 1) >> 2;
                  *(_BYTE *)(v103 + 5) = (v108 + *(_WORD *)(v104 + 6) + 2) >> 2;
                  v109 = 3 * *(_WORD *)(v104 + 6);
                  *(_BYTE *)(v103 + 6) = (v109 + *(_WORD *)(v104 + 4) + 1) >> 2;
                  *(_BYTE *)(v103 + 7) = (v109 + *(_WORD *)(v104 + 8) + 2) >> 2;
                  v110 = 3 * *(_WORD *)(v104 + 8);
                  *(_BYTE *)(v103 + 8) = (v110 + *(_WORD *)(v104 + 6) + 1) >> 2;
                  *(_BYTE *)(v103 + 9) = (v110 + *(_WORD *)(v104 + 10) + 2) >> 2;
                  v111 = 3 * *(_WORD *)(v104 + 10);
                  *(_BYTE *)(v103 + 10) = (v111 + *(_WORD *)(v104 + 8) + 1) >> 2;
                  *(_BYTE *)(v103 + 11) = (v111 + *(_WORD *)(v104 + 12) + 2) >> 2;
                  v112 = 3 * *(_WORD *)(v104 + 12);
                  *(_BYTE *)(v103 + 12) = (v112 + *(_WORD *)(v104 + 10) + 1) >> 2;
                  *(_BYTE *)(v103 + 13) = (v112 + *(_WORD *)(v104 + 14) + 2) >> 2;
                  v113 = 3 * *(_WORD *)(v104 + 14);
                  *(_BYTE *)(v103 + 14) = (*(_WORD *)(v104 + 12) + v113 + 1) >> 2;
                  *(_BYTE *)(v103 + 15) = (*v105 + v113 + 2) >> 2;
                }
                else
                {
                  *(_BYTE *)v103 = *(_BYTE *)v104;
                  *(_BYTE *)(v103 + 1) = *(_BYTE *)(v104 + 2);
                  *(_BYTE *)(v103 + 2) = *(_BYTE *)(v104 + 4);
                  *(_BYTE *)(v103 + 3) = *(_BYTE *)(v104 + 6);
                  *(_BYTE *)(v103 + 4) = *(_BYTE *)(v104 + 8);
                  *(_BYTE *)(v103 + 5) = *(_BYTE *)(v104 + 10);
                  *(_BYTE *)(v103 + 6) = *(_BYTE *)(v104 + 12);
                  *(_BYTE *)(v103 + 7) = *(_BYTE *)(v104 + 14);
                }
                v104 += 16;
                v105 += 8;
                v103 += 32;
                v165 += 16;
              }
              while ( (signed int)v159 > v103 );
              v150 = (_WORD *)v104;
              v157 = v105;
              v16 = v140;
              v101 = &v162[8 * v140];
              v102 = v160 + 1;
            }
            while ( v160 + 1 < *(_DWORD *)(v161 + *(_DWORD *)(a1 + 14284) + 4) );
          }
        }
        else if ( v163 == 2 )
        {
          v154 = 0;
          if ( v17 > 0 )
          {
            v139 = (char *)(v18 << 8);
            v141 = 8 * v16;
            v142 = 32 * v18;
            v38 = v154;
            v162 = (char *)(v16 - 6);
            v39 = (int)v147;
            v155 = v18;
            v40 = v18 << 8;
            v140 = v16;
            do
            {
              v41 = &v137[v38 * v40];
              v42 = 0;
              if ( v15 > 0 )
              {
                v147 = (char *)v39;
                v43 = v140;
                do
                {
                  if ( v43 != 2 || v155 != 2 )
                  {
                    v38 = 0;
                    if ( *((_DWORD *)v147 + 2) > 0 )
                    {
                      v44 = *((_DWORD *)v147 + 2);
                      v45 = 0;
                      do
                      {
                        v41 = &v137[v45];
                        v42 = 0;
                        if ( v15 > 0 )
                        {
                          v153 = v45;
                          v46 = v149;
                          v47 = (int)v157;
                          v154 = v38;
                          do
                          {
                            v145 = 0;
                            if ( v40 > 0 )
                            {
                              v149 = v46;
                              v48 = v142;
                              v151 = v41;
                              v49 = v141;
                              v152 = (char *)v42;
                              v50 = 0;
                              v157 = (_WORD *)v47;
                              v51 = v150;
                              do
                              {
                                v52 = 0;
                                if ( v49 > 0 )
                                {
                                  v145 = v50;
                                  v53 = v140;
                                  do
                                  {
                                    v54 = *v51;
                                    v55 = 0;
                                    ++v51;
                                    if ( v48 > 0 )
                                    {
                                      v150 = v51;
                                      v147 = (char *)v52;
                                      v146 = v54;
                                      do
                                      {
                                        v56 = 0;
                                        if ( v53 > 0 )
                                        {
                                          if ( v53 < 6 )
                                          {
                                            v143 = &v147[(_DWORD)&v151[v145]] + v55;
                                            v144 = (unsigned __int8)v146;
                                          }
                                          else
                                          {
                                            v143 = &v147[(_DWORD)&v151[v145]] + v55;
                                            v57 = v146;
                                            v58 = (int)(&v147[(_DWORD)&v151[v145]] + v55);
                                            v144 = (unsigned __int8)v146;
                                            v59 = v162;
                                            do
                                            {
                                              *(_BYTE *)(v58 + v56) = v57;
                                              *(_BYTE *)(v58 + v56 + 1) = v57;
                                              *(_BYTE *)(v58 + v56 + 2) = v57;
                                              *(_BYTE *)(v58 + v56 + 3) = v57;
                                              *(_BYTE *)(v58 + v56 + 4) = v57;
                                              v56 += 5;
                                            }
                                            while ( v56 <= (signed int)v59 );
                                            v53 = v140;
                                          }
                                          v60 = v144;
                                          v61 = (int)v143;
                                          do
                                            *(_BYTE *)(v61 + v56++) = v60;
                                          while ( v56 < v53 );
                                        }
                                        v55 += 32;
                                      }
                                      while ( v55 < v142 );
                                      v51 = v150;
                                      v52 = (int)v147;
                                      v48 = v142;
                                      v49 = v141;
                                    }
                                    v52 += v53;
                                  }
                                  while ( v52 < v49 );
                                  v50 = v145;
                                  v40 = (int)v139;
                                }
                                v50 += v48;
                              }
                              while ( v50 < v40 );
                              v150 = v51;
                              v46 = v149;
                              v41 = v151;
                              v42 = (int)v152;
                              v47 = (int)v157;
                              v147 = (char *)(v161 + *(_DWORD *)(a1 + 14284));
                              v15 = *((_DWORD *)v147 + 1);
                            }
                            v41 += 8 * v140;
                            v46 += 128;
                            v165 += 128;
                            v47 += 128;
                            ++v42;
                            v164 += 128;
                            v169 += 128;
                            v168 += 128;
                            v167 += 128;
                            v166 += 64;
                          }
                          while ( v42 < v15 );
                          v149 = v46;
                          v38 = v154;
                          v157 = (_WORD *)v47;
                          v45 = v153;
                          v44 = *((_DWORD *)v147 + 2);
                        }
                        v45 += v40;
                        ++v38;
                      }
                      while ( v38 < v44 );
                      v43 = v140;
                    }
                  }
                  else
                  {
                    v62 = 0;
                    v63 = (int)v150;
                    v151 = v41;
                    v158 = 7;
                    v152 = (char *)v42;
                    v154 = v38;
                    do
                    {
                      v64 = 9 * *(_WORD *)v63;
                      v65 = 3 * *(_WORD *)(v165 + 14);
                      v143 = (char *)(3 * *(_WORD *)(v63 + 2));
                      if ( v62 )
                      {
                        v66 = 3 * *(_WORD *)(v63 - 16);
                        v67 = *(_WORD *)(v63 - 14);
                        v146 = *(_WORD *)(v165 - 2);
                        v144 = v67;
                      }
                      else
                      {
                        v66 = 3 * *(_WORD *)(v149 + 112);
                        v146 = *(_WORD *)(v169 + 126);
                        v144 = *(_WORD *)(v149 + 114);
                      }
                      if ( v158 )
                      {
                        v153 = 3 * *(_WORD *)(v63 + 16);
                        v147 = (char *)*(_WORD *)(v165 + 30);
                        v145 = *(_WORD *)(v63 + 18);
                      }
                      else
                      {
                        v153 = 3 * *(_WORD *)v164;
                        v147 = (char *)*(_WORD *)(v167 + 14);
                        v145 = *(_WORD *)(v164 + 2);
                      }
                      v68 = v64 + v65;
                      v69 = (int)v151;
                      v151[v62] = (v68 + v66 + v146 + 8) >> 4;
                      v70 = v63 + 2;
                      v71 = (int)&v143[v64];
                      v72 = (int)v147;
                      *(_BYTE *)(v62 + v69 + 1) = (v71 + v66 + v144 + 7) >> 4;
                      v73 = v71 + v153;
                      *(_BYTE *)(v62 + v69 + 32) = (v153 + v68 + v72 + 8) >> 4;
                      v74 = (v73 + v145 + 7) >> 4;
                      v75 = v69 + v62 + 2;
                      *(_BYTE *)(v62 + v69 + 33) = v74;
                      v149 += 2;
                      v164 += 2;
                      v153 = v69 + v62 + 14;
                      v159 = (char *)v62;
                      do
                      {
                        v76 = 9 * *(_WORD *)v70;
                        v77 = 3 * *(_WORD *)(v70 - 2);
                        v147 = (char *)(3 * *(_WORD *)(v70 + 2));
                        if ( v159 )
                        {
                          v78 = 3 * *(_WORD *)(v70 - 16);
                          v144 = *(_WORD *)(v70 - 18);
                          v145 = *(_WORD *)(v70 - 14);
                        }
                        else
                        {
                          v78 = 3 * *(_WORD *)(v149 + 112);
                          v79 = *(_WORD *)(v149 + 114);
                          v144 = *(_WORD *)(v149 + 110);
                          v145 = v79;
                        }
                        if ( v158 )
                        {
                          v80 = *(_WORD *)(v70 + 14);
                          v160 = 3 * *(_WORD *)(v70 + 16);
                          v143 = (char *)v80;
                          v146 = *(_WORD *)(v70 + 18);
                        }
                        else
                        {
                          v160 = 3 * *(_WORD *)v164;
                          v81 = *(_WORD *)(v164 + 2);
                          v143 = (char *)*(_WORD *)(v164 - 2);
                          v146 = v81;
                        }
                        v82 = v76 + v77;
                        v70 += 2;
                        *(_BYTE *)v75 = (v82 + v78 + v144 + 8) >> 4;
                        v83 = (int)&v147[v76];
                        v84 = (v83 + v78 + v145 + 7) >> 4;
                        v85 = v160;
                        v86 = v160 + v82;
                        *(_BYTE *)(v75 + 1) = v84;
                        v87 = (signed int)&v143[v86 + 8] >> 4;
                        v88 = v146;
                        *(_BYTE *)(v75 + 32) = v87;
                        *(_BYTE *)(v75 + 33) = (v83 + v85 + v88 + 7) >> 4;
                        v75 += 2;
                        v149 += 2;
                        v164 += 2;
                      }
                      while ( v153 > v75 );
                      v89 = (int)v159;
                      v90 = 9 * *(_WORD *)v70;
                      v91 = 3 * *(_WORD *)(v70 - 2);
                      v143 = (char *)(3 * *v157);
                      if ( v159 )
                      {
                        v92 = 3 * *(_WORD *)(v70 - 16);
                        v147 = (char *)*(_WORD *)(v70 - 18);
                        v144 = *(v157 - 8);
                      }
                      else
                      {
                        v92 = 3 * *(_WORD *)(v149 + 112);
                        v147 = (char *)*(_WORD *)(v149 + 110);
                        v144 = *(_WORD *)(v168 + 112);
                      }
                      v157 += 8;
                      if ( v158 )
                      {
                        v153 = 3 * *(_WORD *)(v70 + 16);
                        v146 = *(_WORD *)(v70 + 14);
                        v145 = *v157;
                      }
                      else
                      {
                        v153 = 3 * *(_WORD *)v164;
                        v146 = *(_WORD *)(v164 - 2);
                        v145 = *v166;
                      }
                      v93 = v90 + v91;
                      v94 = (int)v151;
                      v151[(_DWORD)v159 + 14] = (signed int)(&v147[v92 + 8] + v93) >> 4;
                      v63 = v70 + 2;
                      v95 = (int)&v143[v90];
                      v96 = v146;
                      *(_BYTE *)(v89 + v94 + 15) = (v95 + v92 + v144 + 7) >> 4;
                      v97 = v95 + v153;
                      *(_BYTE *)(v89 + v94 + 46) = (v153 + v93 + v96 + 8) >> 4;
                      v98 = v158 - 1;
                      *(_BYTE *)(v89 + v94 + 47) = (v97 + v145 + 7) >> 4;
                      v62 = v89 + 64;
                      v165 += 16;
                      v149 -= 14;
                      v164 -= 14;
                      v158 = v98;
                    }
                    while ( v98 != -1 );
                    v150 = (_WORD *)v63;
                    v99 = v94;
                    v42 = (int)v152;
                    v38 = v154;
                    v40 = (int)v139;
                    v43 = v140;
                    v41 = (char *)(v99 + 16);
                    v100 = *(_DWORD *)(a1 + 14284);
                    v149 += 128;
                    v164 += 128;
                    v169 += 128;
                    v168 += 128;
                    v167 += 128;
                    v166 += 64;
                    v147 = (char *)(v161 + v100);
                    v15 = *(_DWORD *)(v161 + v100 + 4);
                  }
                  ++v42;
                }
                while ( v42 < v15 );
                v39 = (int)v147;
                v17 = *((_DWORD *)v147 + 2);
              }
              ++v38;
            }
            while ( v38 < v17 );
          }
        }
        else
        {
          v19 = 0;
          if ( v17 > 0 )
          {
            v160 = v18 << 8;
            v159 = (char *)(8 * v16);
            v154 = v16 - 6;
            v20 = 0;
            v158 = 0;
            v155 = 32 * v18;
            v21 = v18 << 8;
            v140 = v16;
            v22 = (int)v147;
            do
            {
              v162 = &v137[v20];
              v153 = 0;
              if ( v15 > 0 )
              {
                v158 = v20;
                v23 = v162;
                v24 = v140;
                v146 = v19;
                v25 = v153;
                do
                {
                  v26 = 0;
                  if ( v21 > 0 )
                  {
                    v153 = v25;
                    v27 = v155;
                    v28 = (int)v159;
                    do
                    {
                      v29 = 0;
                      if ( v28 > 0 )
                      {
                        v147 = &v23[v26];
                        v162 = v23;
                        v30 = v150;
                        v31 = v140;
                        v145 = v26;
                        do
                        {
                          v32 = *v30;
                          v33 = 0;
                          ++v30;
                          if ( v27 > 0 )
                          {
                            v34 = (int)&v147[v29];
                            v152 = &v147[v29];
                            v151 = (char *)(unsigned __int8)v32;
                            v150 = v30;
                            v144 = v29;
                            do
                            {
                              v35 = 0;
                              if ( v31 > 0 )
                              {
                                if ( v31 < 6 )
                                {
                                  v36 = v33 + v34;
                                }
                                else
                                {
                                  v36 = v33 + v34;
                                  v37 = v154;
                                  do
                                  {
                                    *(_BYTE *)(v36 + v35) = v32;
                                    *(_BYTE *)(v36 + v35 + 1) = v32;
                                    *(_BYTE *)(v36 + v35 + 2) = v32;
                                    *(_BYTE *)(v36 + v35 + 3) = v32;
                                    *(_BYTE *)(v36 + v35 + 4) = v32;
                                    v35 += 5;
                                  }
                                  while ( v35 <= v37 );
                                  v31 = v140;
                                }
                                do
                                  *(_BYTE *)(v36 + v35++) = v32;
                                while ( v35 < v31 );
                                v27 = v155;
                              }
                              v33 += 32;
                            }
                            while ( v33 < v27 );
                            v30 = v150;
                            v29 = v144;
                          }
                          v29 += v31;
                        }
                        while ( v29 < (signed int)v159 );
                        v150 = v30;
                        v23 = v162;
                        v26 = v145;
                        v28 = (int)v159;
                        v21 = v160;
                      }
                      v26 += v27;
                    }
                    while ( v26 < v21 );
                    v25 = v153;
                    v24 = v140;
                    v22 = v161 + *(_DWORD *)(a1 + 14284);
                    v15 = *(_DWORD *)(v22 + 4);
                  }
                  v23 += 8 * v24;
                  ++v25;
                }
                while ( v25 < v15 );
                v20 = v158;
                v19 = v146;
                v17 = *(_DWORD *)(v22 + 8);
              }
              v20 += v21;
              ++v19;
            }
            while ( v19 < v17 );
          }
        }
        v4 = v137;
        sub_779000(a1, (int)&v138, v148, v156, (int)v137);
        v9 = *(_DWORD *)(a1 + 52);
        if ( v9 != 2 || *(_DWORD *)(a1 + 88) != 1 )
        {
          ++v156;
          v10 = *(_DWORD *)(a1 + 48);
          v11 = *(_DWORD *)(a1 + 14272);
        }
        else
        {
          --v156;
          v10 = *(_DWORD *)(a1 + 48);
          v11 = *(_DWORD *)(a1 + 14272);
        }
      }
      ++v148;
    }
    v114 = v148;
    result = *(_DWORD *)(a1 + 116);
    if ( result )
    {
      v114 = *(_DWORD *)(a1 + 84);
      result = v114 - 1;
      if ( v114 - 1 != *(_DWORD *)(a1 + 14368) )
        v114 = v10;
    }
    if ( v9 != 255 || (result = *(_DWORD *)(a1 + 88), result != 255) )
    {
      if ( v114 < v10 )
      {
        v115 = v156;
        do
        {
          sub_779000(a1, (int)&v138, v114, v115, (int)v4);
          result = *(_DWORD *)(a1 + 52);
          if ( result != 2 || (result = *(_DWORD *)(a1 + 88), result != 1) )
            ++v115;
          else
            --v115;
          ++v114;
        }
        while ( v114 < *(_DWORD *)(a1 + 48) );
      }
    }
  }
  return result;
}
// 779330: using guessed type char var_59C[1280];

//----- (0077A5B0) --------------------------------------------------------
signed int __cdecl sub_77A5B0(int a1, int a2, int a3, int a4)
{
  signed int result; // eax@1
  int v5; // ecx@1
  int v6; // edi@5
  int v7; // esi@6
  int v8; // edx@6
  int v9; // ecx@8
  int v10; // ebp@10
  int v11; // edx@10
  int v12; // esi@10
  int v13; // edi@10
  int v14; // eax@10
  int v15; // eax@14
  int v16; // edx@18
  char v17; // al@22
  int v18; // edx@22
  int v19; // esi@24
  int v20; // ebp@24
  int v21; // esi@29
  int v22; // ebp@29
  int v23; // esi@30
  int v24; // edx@30
  int v25; // ebp@32
  int v26; // esi@34
  int v27; // edx@34
  int v28; // ecx@34
  int v29; // edi@34
  int v30; // eax@34
  int v31; // eax@38
  int v32; // edx@42
  int v33; // edi@47
  int v34; // esi@47
  int v35; // edi@52
  int v36; // edx@52
  int v37; // [sp+30h] [bp-3Ch]@4
  int v38; // [sp+34h] [bp-38h]@6
  int v39; // [sp+38h] [bp-34h]@7
  int v40; // [sp+3Ch] [bp-30h]@6
  int v41; // [sp+44h] [bp-28h]@7
  int v42; // [sp+48h] [bp-24h]@14
  int v43; // [sp+4Ch] [bp-20h]@18
  int v44; // [sp+50h] [bp-1Ch]@9
  int v45; // [sp+54h] [bp-18h]@9
  int v46; // [sp+58h] [bp-14h]@9

  result = a3;
  v5 = *(_DWORD *)(a1 + 52);
  if ( v5 == 2 || v5 == 1 || v5 == 5 )
  {
    result = sub_775560(
               a1 + 4,
               8 * *(_DWORD *)(a1 + 14264),
               8 * *(_DWORD *)(a1 + 14268),
               a3,
               a4,
               *(_DWORD *)(a1 + 48),
               *(_DWORD *)(a1 + 60),
               *(_DWORD *)(a1 + 32),
               *(_DWORD *)(a1 + 36),
               *(_DWORD *)(a1 + 40),
               (_DWORD *)(a2 + 44),
               (int)&v37);
    if ( !result )
    {
      v6 = *(_DWORD *)(a1 + 48);
      if ( v6 == 3 )
      {
        v23 = v38;
        v24 = v40;
        if ( v38 < v40 )
        {
          result = 3 * v39;
          v41 = *(_DWORD *)(a2 + 44);
          do
          {
            v25 = 3 * v37;
            if ( 3 * v37 < result )
            {
              v42 = v23;
              do
              {
                v26 = v41 + *(_DWORD *)(a1 + 60) * v42;
                v27 = *(_BYTE *)(v26 + v25);
                v28 = *(_BYTE *)(v26 + v25 + 1);
                v29 = *(_BYTE *)(v26 + v25 + 2);
                v30 = v27 + ((359 * v29 - 45813) >> 8);
                if ( v30 <= 255 )
                {
                  if ( v30 < 0 )
                    LOWORD(v30) = 0;
                }
                else
                {
                  LOWORD(v30) = 255;
                }
                v43 = (signed __int16)v30;
                v31 = v27 + ((-88 * v28 + -183 * v29 + 34806) >> 8);
                if ( v31 <= 255 )
                {
                  if ( v31 < 0 )
                    LOBYTE(v31) = 0;
                }
                else
                {
                  LOBYTE(v31) = -1;
                }
                v32 = ((454 * v28 - 57937) >> 8) + v27;
                if ( v32 <= 255 )
                {
                  if ( v32 < 0 )
                    LOBYTE(v32) = 0;
                }
                else
                {
                  LOBYTE(v32) = -1;
                }
                if ( *(_DWORD *)(a1 + 52) == 2 )
                {
                  *(_BYTE *)(v26 + v25) = v32;
                  v35 = v42;
                  v36 = v41;
                  *(_BYTE *)(v25 + v41 + v42 * *(_DWORD *)(a1 + 60) + 1) = v31;
                  *(_BYTE *)(v25 + v36 + v35 * *(_DWORD *)(a1 + 60) + 2) = v43;
                }
                else
                {
                  v33 = v41;
                  *(_BYTE *)(v26 + v25) = v43;
                  v34 = v42;
                  *(_BYTE *)(v25 + v33 + v42 * *(_DWORD *)(a1 + 60) + 1) = v31;
                  *(_BYTE *)(v25 + v33 + v34 * *(_DWORD *)(a1 + 60) + 2) = v32;
                }
                v25 += 3;
                result = 3 * v39;
              }
              while ( v25 < 3 * v39 );
              v23 = v42;
              v24 = v40;
            }
            ++v23;
          }
          while ( v23 < v24 );
        }
      }
      else
      {
        v7 = v38;
        v8 = v40;
        if ( v38 < v40 )
        {
          result = v6 * v39;
          v41 = *(_DWORD *)(a2 + 44);
          do
          {
            v9 = v37 * v6;
            if ( v37 * v6 < result )
            {
              v44 = result;
              v46 = v7;
              v45 = v6;
              do
              {
                v10 = v41 + *(_DWORD *)(a1 + 60) * v46;
                v11 = *(_BYTE *)(v10 + v9);
                v12 = *(_BYTE *)(v10 + v9 + 1);
                v13 = *(_BYTE *)(v10 + v9 + 2);
                v14 = v11 + ((359 * v13 - 45813) >> 8);
                if ( v14 <= 255 )
                {
                  if ( v14 < 0 )
                    LOWORD(v14) = 0;
                }
                else
                {
                  LOWORD(v14) = 255;
                }
                v42 = (signed __int16)v14;
                v15 = v11 + ((-88 * v12 + -183 * v13 + 34806) >> 8);
                if ( v15 <= 255 )
                {
                  if ( v15 < 0 )
                    LOWORD(v15) = 0;
                }
                else
                {
                  LOWORD(v15) = 255;
                }
                v43 = (signed __int16)v15;
                v16 = ((454 * v12 - 57937) >> 8) + v11;
                if ( v16 <= 255 )
                {
                  if ( v16 < 0 )
                    LOBYTE(v16) = 0;
                }
                else
                {
                  LOBYTE(v16) = -1;
                }
                v17 = v16;
                v18 = *(_DWORD *)(a1 + 88);
                if ( v18 == 6 )
                {
                  v21 = v41;
                  *(_BYTE *)(v10 + v9) = -(char)v42 - 1;
                  v22 = v46;
                  *(_BYTE *)(v9 + v21 + v46 * *(_DWORD *)(a1 + 60) + 1) = -(char)v43 - 1;
                  *(_BYTE *)(v9 + v21 + v22 * *(_DWORD *)(a1 + 60) + 2) = -v17 - 1;
                  v45 = *(_DWORD *)(a1 + 48);
                  v44 = v39 * v45;
                }
                else if ( v18 == 3 )
                {
                  v19 = v41;
                  *(_BYTE *)(v10 + v9) = v42;
                  v20 = v46;
                  *(_BYTE *)(v9 + v19 + v46 * *(_DWORD *)(a1 + 60) + 1) = v43;
                  *(_BYTE *)(v9 + v19 + v20 * *(_DWORD *)(a1 + 60) + 2) = v17;
                  v45 = *(_DWORD *)(a1 + 48);
                  v44 = v39 * v45;
                }
                v9 += v45;
                result = v44;
              }
              while ( v9 < v44 );
              v7 = v46;
              v6 = v45;
              v8 = v40;
            }
            ++v7;
          }
          while ( v7 < v8 );
        }
      }
    }
  }
  return result;
}

//----- (0077A970) --------------------------------------------------------
int __cdecl sub_77A970(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int v6; // ecx@1
  int v7; // edx@1
  int v8; // ebx@1
  int result; // eax@1
  int v10; // ebp@2
  int v11; // edi@2
  int v12; // ebp@2
  int v13; // edi@2
  int v14; // ebp@2
  int v15; // edi@2
  int v16; // ebp@2
  int v17; // ebp@2
  int v18; // edi@2
  int v19; // ebp@3
  int *v20; // esi@3
  int v21; // ecx@3
  int v22; // edx@4
  int v23; // edi@5
  int v24; // eax@7
  int v25; // ecx@7
  char v26; // dl@8
  int v27; // ecx@11
  int v28; // ebp@11
  int v29; // esi@11
  int v30; // ebx@11
  int v31; // ebx@11
  char v32; // dl@12
  int v33; // eax@15
  __int16 v34; // [sp+0h] [bp-8Ch]@2
  __int16 v35; // [sp+2h] [bp-8Ah]@2
  __int16 v36; // [sp+4h] [bp-88h]@2
  __int16 v37[13]; // [sp+6h] [bp-86h]@2
  __int16 v38; // [sp+20h] [bp-6Ch]@2
  __int16 v39; // [sp+22h] [bp-6Ah]@2
  __int16 v40; // [sp+24h] [bp-68h]@2
  __int16 v41[13]; // [sp+26h] [bp-66h]@2
  __int16 v42; // [sp+40h] [bp-4Ch]@2
  __int16 v43; // [sp+42h] [bp-4Ah]@2
  __int16 v44; // [sp+44h] [bp-48h]@2
  __int16 v45[13]; // [sp+46h] [bp-46h]@2
  int v46; // [sp+60h] [bp-2Ch]@1
  int v47; // [sp+64h] [bp-28h]@6
  int v48; // [sp+68h] [bp-24h]@6
  int v49; // [sp+6Ch] [bp-20h]@6
  int v50; // [sp+70h] [bp-1Ch]@6
  int v51; // [sp+74h] [bp-18h]@7
  int v52; // [sp+78h] [bp-14h]@7

  v6 = a2;
  v7 = a3;
  v8 = a4 + a6 * *(_DWORD *)(a5 + 4);
  result = 0;
  v46 = *(_DWORD *)(a5 + 4);
  do
  {
    v10 = *(_WORD *)v7;
    v11 = *(_WORD *)v6;
    *(&v34 + 4 * result) = (359 * v10 - 45813) >> 8;
    *(&v38 + 4 * result) = (88 * v11 + 183 * v10 - 34806) >> 8;
    *(&v42 + 4 * result) = (454 * v11 - 57937) >> 8;
    v12 = *(_WORD *)(v7 + 2);
    v13 = *(_WORD *)(v6 + 2);
    *(&v35 + 4 * result) = (359 * v12 - 45813) >> 8;
    *(&v39 + 4 * result) = (88 * v13 + 183 * v12 - 34806) >> 8;
    v14 = (454 * v13 - 57937) >> 8;
    v15 = *(_WORD *)(v6 + 4);
    *(&v43 + 4 * result) = v14;
    v16 = *(_WORD *)(v7 + 4);
    *(&v36 + 4 * result) = (359 * v16 - 45813) >> 8;
    *(&v40 + 4 * result) = (88 * v15 + 183 * v16 - 34806) >> 8;
    *(&v44 + 4 * result) = (454 * v15 - 57937) >> 8;
    v17 = *(_WORD *)(v7 + 6);
    v18 = *(_WORD *)(v6 + 6);
    v37[4 * result] = (359 * v17 - 45813) >> 8;
    v6 += 16;
    v41[4 * result] = (88 * v18 + 183 * v17 - 34806) >> 8;
    v7 += 16;
    v45[4 * result++] = (454 * v18 - 57937) >> 8;
  }
  while ( result < 4 );
  v19 = v46;
  v20 = (int *)a5;
  v21 = *(_DWORD *)(a5 + 12);
  if ( v46 < v21 )
  {
    v22 = *(_DWORD *)(a5 + 8);
    result = 16 * v46;
    do
    {
      v23 = *v20;
      if ( *v20 < v22 )
      {
        v48 = (signed int)(__CFADD__(v19, 2147483648) + v19 + 2147483648 + 2147483648) >> 1;
        v49 = a1 + result;
        v47 = result;
        v50 = v8;
        v46 = v19;
        do
        {
          v24 = *(_WORD *)(v49 + 2 * v23);
          v52 = ((signed int)(__CFADD__(v23, 2147483648) + v23 + 2147483648 + 2147483648) >> 1) + 4 * v48;
          v25 = v24 + *(&v34 + v52);
          v51 = v25;
          if ( v25 <= 255 )
          {
            v26 = v25;
            if ( v25 < 0 )
            {
              v26 = 0;
              v51 = 0;
            }
          }
          else
          {
            v26 = -1;
            v51 = 255;
          }
          v27 = 3 * v23;
          v28 = v50;
          v29 = v52;
          v30 = *(&v38 + v52);
          *(_BYTE *)(3 * v23 + v50) = v26;
          v31 = v24 - v30;
          v51 = v31;
          if ( v31 <= 255 )
          {
            v32 = v31;
            if ( v31 < 0 )
            {
              v32 = 0;
              v51 = 0;
            }
          }
          else
          {
            v32 = -1;
            v51 = 255;
          }
          v8 = v28;
          *(_BYTE *)(v27 + v28 + 1) = v32;
          v33 = *(&v42 + v29) + v24;
          if ( v33 <= 255 )
          {
            if ( v33 < 0 )
              LOBYTE(v33) = 0;
          }
          else
          {
            LOBYTE(v33) = -1;
          }
          ++v23;
          *(_BYTE *)(v27 + v28 + 2) = v33;
          v22 = *(_DWORD *)(a5 + 8);
        }
        while ( v23 < v22 );
        result = v47;
        v19 = v46;
        v20 = (int *)a5;
        v21 = *(_DWORD *)(a5 + 12);
      }
      v8 += a6;
      result += 16;
      ++v19;
    }
    while ( v19 < v21 );
  }
  return result;
}
// 77A970: using guessed type __int16 var_86[13];
// 77A970: using guessed type __int16 var_66[13];
// 77A970: using guessed type __int16 var_46[13];

//----- (0077AC50) --------------------------------------------------------
int __cdecl sub_77AC50(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // edx@1
  int result; // eax@1
  int v7; // ebx@2
  int v8; // edi@2
  int v9; // ecx@2
  int v10; // edi@2
  int v11; // ebx@2
  int v12; // ecx@2
  int v13; // edi@2
  int v14; // ebx@2
  int v15; // ecx@2
  int v16; // ebx@2
  int v17; // ecx@2
  int v18; // ebx@2
  int v19; // ebx@6
  int v20; // ecx@10
  int v21; // ecx@14
  int v22; // ebx@14
  int v23; // ebx@18
  int v24; // ecx@22
  int v25; // ecx@26
  int v26; // ebx@26
  int v27; // ebx@30
  int v28; // ecx@34
  int v29; // ecx@38
  int v30; // ebx@38
  int v31; // ebx@42
  int v32; // ecx@46
  int v33; // ecx@50
  int v34; // ebx@50
  int v35; // ebx@54
  int v36; // ecx@58
  int v37; // ecx@62
  int v38; // ebx@62
  int v39; // ebx@66
  int v40; // ecx@70
  int v41; // ecx@74
  int v42; // ebx@74
  int v43; // ebx@78
  int v44; // ecx@82
  int v45; // ecx@86
  int v46; // ebx@86
  int v47; // ebx@90
  int v48; // ecx@94
  int v49; // ecx@98
  int v50; // ebx@98
  int v51; // eax@98
  int v52; // ebx@102
  int v53; // ecx@106
  int v54; // ecx@110
  int v55; // ebx@110
  int v56; // ebx@114
  int v57; // ecx@118
  int v58; // ecx@122
  int v59; // ebx@122
  int v60; // ebx@126
  int v61; // ecx@130
  int v62; // ecx@134
  int v63; // ebx@134
  int v64; // ebx@138
  int v65; // ecx@142
  int v66; // ecx@146
  int v67; // ebx@146
  int v68; // ebx@150
  int v69; // ecx@154
  int v70; // ecx@158
  int v71; // ebx@158
  int v72; // ebx@162
  int v73; // ecx@166
  int v74; // ecx@170
  int v75; // ebx@170
  int v76; // ebx@174
  int v77; // ecx@178
  int v78; // ecx@182
  int v79; // ebx@182
  int v80; // ebx@186
  int v81; // ecx@190
  signed int v82; // [sp+4h] [bp-48h]@1
  int v83; // [sp+8h] [bp-44h]@2
  int v84; // [sp+Ch] [bp-40h]@2
  int v85; // [sp+10h] [bp-3Ch]@2
  int v86; // [sp+14h] [bp-38h]@2
  int v87; // [sp+18h] [bp-34h]@1
  int v88; // [sp+1Ch] [bp-30h]@1
  int v89; // [sp+20h] [bp-2Ch]@2
  int v90; // [sp+24h] [bp-28h]@2
  int v91; // [sp+28h] [bp-24h]@2
  int v92; // [sp+2Ch] [bp-20h]@2
  int v93; // [sp+30h] [bp-1Ch]@2
  int v94; // [sp+34h] [bp-18h]@2
  int v95; // [sp+38h] [bp-14h]@2
  int v96; // [sp+3Ch] [bp-10h]@2

  v5 = a1;
  result = a4;
  v82 = 0;
  v87 = a3;
  v88 = a2;
  do
  {
    v7 = *(_WORD *)v87;
    v96 = (359 * v7 - 45813) >> 8;
    v8 = *(_WORD *)v88;
    v93 = (88 * v8 + 183 * v7 - 34806) >> 8;
    v9 = (454 * v8 - 57937) >> 8;
    v10 = *(_WORD *)(v88 + 2);
    v86 = v9;
    v11 = *(_WORD *)(v87 + 2);
    v95 = (359 * v11 - 45813) >> 8;
    v91 = (88 * v10 + 183 * v11 - 34806) >> 8;
    v12 = (454 * v10 - 57937) >> 8;
    v13 = *(_WORD *)(v88 + 4);
    v85 = v12;
    v14 = *(_WORD *)(v87 + 4);
    v94 = (359 * v14 - 45813) >> 8;
    v90 = (88 * v13 + 183 * v14 - 34806) >> 8;
    v84 = (454 * v13 - 57937) >> 8;
    v15 = *(_WORD *)(v87 + 6);
    v92 = (359 * v15 - 45813) >> 8;
    v16 = *(_WORD *)(v88 + 6);
    v89 = (88 * v16 + 183 * v15 - 34806) >> 8;
    v83 = (454 * v16 - 57937) >> 8;
    v17 = *(_WORD *)v5;
    v18 = v96 + v17;
    v88 += 16;
    v87 += 16;
    if ( v96 + v17 <= 255 )
    {
      if ( v18 < 0 )
        LOBYTE(v18) = 0;
    }
    else
    {
      LOBYTE(v18) = -1;
    }
    *(_BYTE *)result = v18;
    v19 = v17 - v93;
    if ( v17 - v93 <= 255 )
    {
      if ( v19 < 0 )
        LOBYTE(v19) = 0;
    }
    else
    {
      LOBYTE(v19) = -1;
    }
    *(_BYTE *)(result + 1) = v19;
    v20 = v86 + v17;
    if ( v20 <= 255 )
    {
      if ( v20 < 0 )
        LOBYTE(v20) = 0;
    }
    else
    {
      LOBYTE(v20) = -1;
    }
    *(_BYTE *)(result + 2) = v20;
    v21 = *(_WORD *)(v5 + 2);
    v22 = v96 + v21;
    if ( v96 + v21 <= 255 )
    {
      if ( v22 < 0 )
        LOBYTE(v22) = 0;
    }
    else
    {
      LOBYTE(v22) = -1;
    }
    *(_BYTE *)(result + 3) = v22;
    v23 = v21 - v93;
    if ( v21 - v93 <= 255 )
    {
      if ( v23 < 0 )
        LOBYTE(v23) = 0;
    }
    else
    {
      LOBYTE(v23) = -1;
    }
    *(_BYTE *)(result + 4) = v23;
    v24 = v86 + v21;
    if ( v24 <= 255 )
    {
      if ( v24 < 0 )
        LOBYTE(v24) = 0;
    }
    else
    {
      LOBYTE(v24) = -1;
    }
    *(_BYTE *)(result + 5) = v24;
    v25 = *(_WORD *)(v5 + 4);
    v26 = v25 + v95;
    if ( v25 + v95 <= 255 )
    {
      if ( v26 < 0 )
        LOBYTE(v26) = 0;
    }
    else
    {
      LOBYTE(v26) = -1;
    }
    *(_BYTE *)(result + 6) = v26;
    v27 = v25 - v91;
    if ( v25 - v91 <= 255 )
    {
      if ( v27 < 0 )
        LOBYTE(v27) = 0;
    }
    else
    {
      LOBYTE(v27) = -1;
    }
    *(_BYTE *)(result + 7) = v27;
    v28 = v85 + v25;
    if ( v28 <= 255 )
    {
      if ( v28 < 0 )
        LOBYTE(v28) = 0;
    }
    else
    {
      LOBYTE(v28) = -1;
    }
    *(_BYTE *)(result + 8) = v28;
    v29 = *(_WORD *)(v5 + 6);
    v30 = v29 + v95;
    if ( v29 + v95 <= 255 )
    {
      if ( v30 < 0 )
        LOBYTE(v30) = 0;
    }
    else
    {
      LOBYTE(v30) = -1;
    }
    *(_BYTE *)(result + 9) = v30;
    v31 = v29 - v91;
    if ( v29 - v91 <= 255 )
    {
      if ( v31 < 0 )
        LOBYTE(v31) = 0;
    }
    else
    {
      LOBYTE(v31) = -1;
    }
    *(_BYTE *)(result + 10) = v31;
    v32 = v85 + v29;
    if ( v32 <= 255 )
    {
      if ( v32 < 0 )
        LOBYTE(v32) = 0;
    }
    else
    {
      LOBYTE(v32) = -1;
    }
    *(_BYTE *)(result + 11) = v32;
    v33 = *(_WORD *)(v5 + 8);
    v34 = v33 + v94;
    if ( v33 + v94 <= 255 )
    {
      if ( v34 < 0 )
        LOBYTE(v34) = 0;
    }
    else
    {
      LOBYTE(v34) = -1;
    }
    *(_BYTE *)(result + 12) = v34;
    v35 = v33 - v90;
    if ( v33 - v90 <= 255 )
    {
      if ( v35 < 0 )
        LOBYTE(v35) = 0;
    }
    else
    {
      LOBYTE(v35) = -1;
    }
    *(_BYTE *)(result + 13) = v35;
    v36 = v84 + v33;
    if ( v36 <= 255 )
    {
      if ( v36 < 0 )
        LOBYTE(v36) = 0;
    }
    else
    {
      LOBYTE(v36) = -1;
    }
    *(_BYTE *)(result + 14) = v36;
    v37 = *(_WORD *)(v5 + 10);
    v38 = v37 + v94;
    if ( v37 + v94 <= 255 )
    {
      if ( v38 < 0 )
        LOBYTE(v38) = 0;
    }
    else
    {
      LOBYTE(v38) = -1;
    }
    *(_BYTE *)(result + 15) = v38;
    v39 = v37 - v90;
    if ( v37 - v90 <= 255 )
    {
      if ( v39 < 0 )
        LOBYTE(v39) = 0;
    }
    else
    {
      LOBYTE(v39) = -1;
    }
    *(_BYTE *)(result + 16) = v39;
    v40 = v84 + v37;
    if ( v40 <= 255 )
    {
      if ( v40 < 0 )
        LOBYTE(v40) = 0;
    }
    else
    {
      LOBYTE(v40) = -1;
    }
    *(_BYTE *)(result + 17) = v40;
    v41 = *(_WORD *)(v5 + 12);
    v42 = v41 + v92;
    if ( v41 + v92 <= 255 )
    {
      if ( v42 < 0 )
        LOBYTE(v42) = 0;
    }
    else
    {
      LOBYTE(v42) = -1;
    }
    *(_BYTE *)(result + 18) = v42;
    v43 = v41 - v89;
    if ( v41 - v89 <= 255 )
    {
      if ( v43 < 0 )
        LOBYTE(v43) = 0;
    }
    else
    {
      LOBYTE(v43) = -1;
    }
    *(_BYTE *)(result + 19) = v43;
    v44 = v83 + v41;
    if ( v44 <= 255 )
    {
      if ( v44 < 0 )
        LOBYTE(v44) = 0;
    }
    else
    {
      LOBYTE(v44) = -1;
    }
    *(_BYTE *)(result + 20) = v44;
    v45 = *(_WORD *)(v5 + 14);
    v46 = v45 + v92;
    if ( v45 + v92 <= 255 )
    {
      if ( v46 < 0 )
        LOBYTE(v46) = 0;
    }
    else
    {
      LOBYTE(v46) = -1;
    }
    *(_BYTE *)(result + 21) = v46;
    v47 = v45 - v89;
    if ( v45 - v89 <= 255 )
    {
      if ( v47 < 0 )
        LOBYTE(v47) = 0;
    }
    else
    {
      LOBYTE(v47) = -1;
    }
    *(_BYTE *)(result + 22) = v47;
    v48 = v83 + v45;
    if ( v48 <= 255 )
    {
      if ( v48 < 0 )
        LOBYTE(v48) = 0;
    }
    else
    {
      LOBYTE(v48) = -1;
    }
    *(_BYTE *)(result + 23) = v48;
    v49 = *(_WORD *)(v5 + 16);
    v50 = v96 + v49;
    v51 = a5 + result;
    if ( v96 + v49 <= 255 )
    {
      if ( v50 < 0 )
        LOBYTE(v50) = 0;
    }
    else
    {
      LOBYTE(v50) = -1;
    }
    *(_BYTE *)v51 = v50;
    v52 = v49 - v93;
    if ( v49 - v93 <= 255 )
    {
      if ( v52 < 0 )
        LOBYTE(v52) = 0;
    }
    else
    {
      LOBYTE(v52) = -1;
    }
    *(_BYTE *)(v51 + 1) = v52;
    v53 = v86 + v49;
    if ( v53 <= 255 )
    {
      if ( v53 < 0 )
        LOBYTE(v53) = 0;
    }
    else
    {
      LOBYTE(v53) = -1;
    }
    *(_BYTE *)(v51 + 2) = v53;
    v54 = *(_WORD *)(v5 + 18);
    v55 = v54 + v96;
    if ( v54 + v96 <= 255 )
    {
      if ( v55 < 0 )
        LOBYTE(v55) = 0;
    }
    else
    {
      LOBYTE(v55) = -1;
    }
    *(_BYTE *)(v51 + 3) = v55;
    v56 = v54 - v93;
    if ( v54 - v93 <= 255 )
    {
      if ( v56 < 0 )
        LOBYTE(v56) = 0;
    }
    else
    {
      LOBYTE(v56) = -1;
    }
    *(_BYTE *)(v51 + 4) = v56;
    v57 = v86 + v54;
    if ( v57 <= 255 )
    {
      if ( v57 < 0 )
        LOBYTE(v57) = 0;
    }
    else
    {
      LOBYTE(v57) = -1;
    }
    *(_BYTE *)(v51 + 5) = v57;
    v58 = *(_WORD *)(v5 + 20);
    v59 = v58 + v95;
    if ( v58 + v95 <= 255 )
    {
      if ( v59 < 0 )
        LOBYTE(v59) = 0;
    }
    else
    {
      LOBYTE(v59) = -1;
    }
    *(_BYTE *)(v51 + 6) = v59;
    v60 = v58 - v91;
    if ( v58 - v91 <= 255 )
    {
      if ( v60 < 0 )
        LOBYTE(v60) = 0;
    }
    else
    {
      LOBYTE(v60) = -1;
    }
    *(_BYTE *)(v51 + 7) = v60;
    v61 = v85 + v58;
    if ( v61 <= 255 )
    {
      if ( v61 < 0 )
        LOBYTE(v61) = 0;
    }
    else
    {
      LOBYTE(v61) = -1;
    }
    *(_BYTE *)(v51 + 8) = v61;
    v62 = *(_WORD *)(v5 + 22);
    v63 = v62 + v95;
    if ( v62 + v95 <= 255 )
    {
      if ( v63 < 0 )
        LOBYTE(v63) = 0;
    }
    else
    {
      LOBYTE(v63) = -1;
    }
    *(_BYTE *)(v51 + 9) = v63;
    v64 = v62 - v91;
    if ( v62 - v91 <= 255 )
    {
      if ( v64 < 0 )
        LOBYTE(v64) = 0;
    }
    else
    {
      LOBYTE(v64) = -1;
    }
    *(_BYTE *)(v51 + 10) = v64;
    v65 = v85 + v62;
    if ( v65 <= 255 )
    {
      if ( v65 < 0 )
        LOBYTE(v65) = 0;
    }
    else
    {
      LOBYTE(v65) = -1;
    }
    *(_BYTE *)(v51 + 11) = v65;
    v66 = *(_WORD *)(v5 + 24);
    v67 = v66 + v94;
    if ( v66 + v94 <= 255 )
    {
      if ( v67 < 0 )
        LOBYTE(v67) = 0;
    }
    else
    {
      LOBYTE(v67) = -1;
    }
    *(_BYTE *)(v51 + 12) = v67;
    v68 = v66 - v90;
    if ( v66 - v90 <= 255 )
    {
      if ( v68 < 0 )
        LOBYTE(v68) = 0;
    }
    else
    {
      LOBYTE(v68) = -1;
    }
    *(_BYTE *)(v51 + 13) = v68;
    v69 = v84 + v66;
    if ( v69 <= 255 )
    {
      if ( v69 < 0 )
        LOBYTE(v69) = 0;
    }
    else
    {
      LOBYTE(v69) = -1;
    }
    *(_BYTE *)(v51 + 14) = v69;
    v70 = *(_WORD *)(v5 + 26);
    v71 = v70 + v94;
    if ( v70 + v94 <= 255 )
    {
      if ( v71 < 0 )
        LOBYTE(v71) = 0;
    }
    else
    {
      LOBYTE(v71) = -1;
    }
    *(_BYTE *)(v51 + 15) = v71;
    v72 = v70 - v90;
    if ( v70 - v90 <= 255 )
    {
      if ( v72 < 0 )
        LOBYTE(v72) = 0;
    }
    else
    {
      LOBYTE(v72) = -1;
    }
    *(_BYTE *)(v51 + 16) = v72;
    v73 = v84 + v70;
    if ( v73 <= 255 )
    {
      if ( v73 < 0 )
        LOBYTE(v73) = 0;
    }
    else
    {
      LOBYTE(v73) = -1;
    }
    *(_BYTE *)(v51 + 17) = v73;
    v74 = *(_WORD *)(v5 + 28);
    v75 = v74 + v92;
    if ( v74 + v92 <= 255 )
    {
      if ( v75 < 0 )
        LOBYTE(v75) = 0;
    }
    else
    {
      LOBYTE(v75) = -1;
    }
    *(_BYTE *)(v51 + 18) = v75;
    v76 = v74 - v89;
    if ( v74 - v89 <= 255 )
    {
      if ( v76 < 0 )
        LOBYTE(v76) = 0;
    }
    else
    {
      LOBYTE(v76) = -1;
    }
    *(_BYTE *)(v51 + 19) = v76;
    v77 = v83 + v74;
    if ( v77 <= 255 )
    {
      if ( v77 < 0 )
        LOBYTE(v77) = 0;
    }
    else
    {
      LOBYTE(v77) = -1;
    }
    *(_BYTE *)(v51 + 20) = v77;
    v78 = *(_WORD *)(v5 + 30);
    v79 = v78 + v92;
    if ( v78 + v92 <= 255 )
    {
      if ( v79 < 0 )
        LOBYTE(v79) = 0;
    }
    else
    {
      LOBYTE(v79) = -1;
    }
    *(_BYTE *)(v51 + 21) = v79;
    v80 = v78 - v89;
    if ( v78 - v89 <= 255 )
    {
      if ( v80 < 0 )
        LOBYTE(v80) = 0;
    }
    else
    {
      LOBYTE(v80) = -1;
    }
    *(_BYTE *)(v51 + 22) = v80;
    v81 = v83 + v78;
    if ( v81 <= 255 )
    {
      if ( v81 < 0 )
        LOBYTE(v81) = 0;
    }
    else
    {
      LOBYTE(v81) = -1;
    }
    v5 += 32;
    *(_BYTE *)(v51 + 23) = v81;
    result = a5 + v51;
    v82 += 2;
  }
  while ( v82 < 8 );
  return result;
}

//----- (0077B510) --------------------------------------------------------
int __cdecl YCbCr_411_to_RGB_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // edi@1

  sub_77AC50(a1, a2, a3, a4, a5);
  sub_77AC50(a1 + 128, a2 + 8, a3 + 8, a4 + 24, a5);
  v5 = a4 + 8 * a5;
  sub_77AC50(a1 + 256, a2 + 64, a3 + 64, v5, a5);
  return sub_77AC50(a1 + 384, a2 + 72, a3 + 72, v5 + 24, a5);
}

//----- (0077B5D0) --------------------------------------------------------
int __cdecl YCbCr_411_to_RGB_Full_MCU_M5(int a1, int a2, int a3, int a4, int a5)
{
  int result; // eax@1

  own_ycbcr_411_to_rgb_one_half_mcu_m5(a1, a2, a3, a4, a5);
  result = a1;
  own_ycbcr_411_to_rgb_one_half_mcu_m5(a1 + 256, a2 + 64, a3 + 64, a4 + 8 * a5, a5);
  return result;
}

//----- (0077B640) --------------------------------------------------------
signed int __cdecl YCbCr_411_to_RGB_MCU(int a1, int a2, int a3)
{
  int v3; // esi@1
  int v4; // ebp@1
  int v5; // ebx@1
  signed int result; // eax@1
  int v7; // edi@2
  int v8; // [sp+30h] [bp-B4h]@1
  int v9; // [sp+34h] [bp-B0h]@1
  int v10; // [sp+38h] [bp-ACh]@1
  int v11; // [sp+3Ch] [bp-A8h]@1
  char v12; // [sp+40h] [bp-A4h]@1
  int v13; // [sp+50h] [bp-94h]@4
  int v14; // [sp+54h] [bp-90h]@4
  int v15; // [sp+58h] [bp-8Ch]@4
  int v16; // [sp+5Ch] [bp-88h]@4
  int v17; // [sp+60h] [bp-84h]@4
  int v18; // [sp+64h] [bp-80h]@4
  int v19; // [sp+68h] [bp-7Ch]@4
  int v20; // [sp+6Ch] [bp-78h]@4
  char v21; // [sp+70h] [bp-74h]@6
  int v22; // [sp+80h] [bp-64h]@6
  int v23; // [sp+84h] [bp-60h]@6
  int v24; // [sp+88h] [bp-5Ch]@6
  int v25; // [sp+8Ch] [bp-58h]@6
  char v26; // [sp+90h] [bp-54h]@8
  int v27; // [sp+A0h] [bp-44h]@8
  int v28; // [sp+A4h] [bp-40h]@8
  int v29; // [sp+A8h] [bp-3Ch]@8
  int v30; // [sp+ACh] [bp-38h]@8
  char v31; // [sp+B0h] [bp-34h]@10
  int v32; // [sp+C0h] [bp-24h]@10
  int v33; // [sp+C4h] [bp-20h]@10
  int v34; // [sp+C8h] [bp-1Ch]@10
  int v35; // [sp+CCh] [bp-18h]@10

  v3 = *(_DWORD *)(a1 + 18484);
  v4 = *(_DWORD *)(a1 + 60);
  v5 = *(_DWORD *)(a1 + 14320);
  v8 = dword_B68948;
  v9 = dword_B6894C;
  v10 = dword_B68950;
  v11 = dword_B68954;
  result = sub_775560(
             a1 + 4,
             16,
             16,
             a2,
             a3,
             *(_DWORD *)(a1 + 48),
             v4,
             *(_DWORD *)(a1 + 32),
             *(_DWORD *)(a1 + 36),
             *(_DWORD *)(a1 + 40),
             (_DWORD *)(a1 + 14356),
             (int)&v12);
  if ( !result )
  {
    v7 = *(_DWORD *)(a1 + 14356);
    if ( (unsigned __int8)operator==((int)&v12, (int)&v8) )
    {
      result = (*(int (__cdecl **)(int, int, int, int, int))(v5 + 176))(v3, v3 + 512, v3 + 640, v7, v4);
    }
    else
    {
      operator&((int)&v13, (int)&v12, (int)&unk_B68938);
      v17 = v13;
      v18 = v14;
      v19 = v15;
      v20 = v16;
      if ( (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0) )
        sub_77A970(v3, v3 + 512, v3 + 640, v7, (int)&v17, v4);
      operator&((int)&v21, (int)&v12, (int)&unk_B68928);
      operator-((int)&v22, (int)&v21, (int)&unk_B68920);
      v17 = v22;
      v18 = v23;
      v19 = v24;
      v20 = v25;
      if ( (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0) )
        sub_77A970(v3 + 128, v3 + 520, v3 + 648, v7 + 24, (int)&v17, v4);
      operator&((int)&v26, (int)&v12, (int)&unk_B68910);
      operator-((int)&v27, (int)&v26, (int)&unk_B68908);
      v17 = v27;
      v18 = v28;
      v19 = v29;
      v20 = v30;
      if ( (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0) )
        sub_77A970(v3 + 256, v3 + 576, v3 + 704, v7 + 8 * v4, (int)&v17, v4);
      operator&((int)&v31, (int)&v12, (int)&unk_B688F8);
      operator-((int)&v32, (int)&v31, (int)&unk_B688F0);
      v17 = v32;
      v18 = v33;
      v19 = v34;
      v20 = v35;
      result = (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0);
      if ( (_BYTE)result )
        result = sub_77A970(v3 + 384, v3 + 584, v3 + 712, v7 + 8 * v4 + 24, (int)&v17, v4);
    }
  }
  return result;
}
// B68948: using guessed type int dword_B68948;
// B6894C: using guessed type int dword_B6894C;
// B68950: using guessed type int dword_B68950;
// B68954: using guessed type int dword_B68954;

//----- (0077BA10) --------------------------------------------------------
int __cdecl sub_77BA10(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int v6; // ecx@1
  int v7; // edx@1
  int v8; // ebx@1
  int result; // eax@1
  int v10; // ebp@2
  int v11; // edi@2
  int v12; // ebp@2
  int v13; // edi@2
  int v14; // ebp@2
  int v15; // edi@2
  int v16; // ebp@2
  int v17; // ebp@2
  int v18; // edi@2
  int v19; // ebp@3
  int *v20; // esi@3
  int v21; // ecx@3
  int v22; // edx@4
  int v23; // edi@5
  int v24; // eax@7
  int v25; // ecx@7
  char v26; // dl@8
  int v27; // ecx@11
  int v28; // ebp@11
  int v29; // esi@11
  int v30; // ebx@11
  int v31; // ebx@11
  char v32; // dl@12
  int v33; // eax@15
  __int16 v34; // [sp+0h] [bp-8Ch]@2
  __int16 v35; // [sp+2h] [bp-8Ah]@2
  __int16 v36; // [sp+4h] [bp-88h]@2
  __int16 v37[13]; // [sp+6h] [bp-86h]@2
  __int16 v38; // [sp+20h] [bp-6Ch]@2
  __int16 v39; // [sp+22h] [bp-6Ah]@2
  __int16 v40; // [sp+24h] [bp-68h]@2
  __int16 v41[13]; // [sp+26h] [bp-66h]@2
  __int16 v42; // [sp+40h] [bp-4Ch]@2
  __int16 v43; // [sp+42h] [bp-4Ah]@2
  __int16 v44; // [sp+44h] [bp-48h]@2
  __int16 v45[13]; // [sp+46h] [bp-46h]@2
  int v46; // [sp+60h] [bp-2Ch]@1
  int v47; // [sp+64h] [bp-28h]@6
  int v48; // [sp+68h] [bp-24h]@6
  int v49; // [sp+6Ch] [bp-20h]@6
  int v50; // [sp+70h] [bp-1Ch]@6
  int v51; // [sp+74h] [bp-18h]@7
  int v52; // [sp+78h] [bp-14h]@7

  v6 = a2;
  v7 = a3;
  v8 = a4 + a6 * *(_DWORD *)(a5 + 4);
  result = 0;
  v46 = *(_DWORD *)(a5 + 4);
  do
  {
    v10 = *(_WORD *)v7;
    v11 = *(_WORD *)v6;
    *(&v34 + 4 * result) = (359 * v10 - 45813) >> 8;
    *(&v38 + 4 * result) = (88 * v11 + 183 * v10 - 34806) >> 8;
    *(&v42 + 4 * result) = (454 * v11 - 57937) >> 8;
    v12 = *(_WORD *)(v7 + 2);
    v13 = *(_WORD *)(v6 + 2);
    *(&v35 + 4 * result) = (359 * v12 - 45813) >> 8;
    *(&v39 + 4 * result) = (88 * v13 + 183 * v12 - 34806) >> 8;
    v14 = (454 * v13 - 57937) >> 8;
    v15 = *(_WORD *)(v6 + 4);
    *(&v43 + 4 * result) = v14;
    v16 = *(_WORD *)(v7 + 4);
    *(&v36 + 4 * result) = (359 * v16 - 45813) >> 8;
    *(&v40 + 4 * result) = (88 * v15 + 183 * v16 - 34806) >> 8;
    *(&v44 + 4 * result) = (454 * v15 - 57937) >> 8;
    v17 = *(_WORD *)(v7 + 6);
    v18 = *(_WORD *)(v6 + 6);
    v37[4 * result] = (359 * v17 - 45813) >> 8;
    v6 += 16;
    v41[4 * result] = (88 * v18 + 183 * v17 - 34806) >> 8;
    v7 += 16;
    v45[4 * result++] = (454 * v18 - 57937) >> 8;
  }
  while ( result < 4 );
  v19 = v46;
  v20 = (int *)a5;
  v21 = *(_DWORD *)(a5 + 12);
  if ( v46 < v21 )
  {
    v22 = *(_DWORD *)(a5 + 8);
    result = 16 * v46;
    do
    {
      v23 = *v20;
      if ( *v20 < v22 )
      {
        v48 = (signed int)(__CFADD__(v19, 2147483648) + v19 + 2147483648 + 2147483648) >> 1;
        v49 = a1 + result;
        v47 = result;
        v50 = v8;
        v46 = v19;
        do
        {
          v24 = *(_WORD *)(v49 + 2 * v23);
          v52 = ((signed int)(__CFADD__(v23, 2147483648) + v23 + 2147483648 + 2147483648) >> 1) + 4 * v48;
          v25 = v24 + *(&v42 + v52);
          v51 = v25;
          if ( v25 <= 255 )
          {
            v26 = v25;
            if ( v25 < 0 )
            {
              v26 = 0;
              v51 = 0;
            }
          }
          else
          {
            v26 = -1;
            v51 = 255;
          }
          v27 = 3 * v23;
          v28 = v50;
          v29 = v52;
          v30 = *(&v38 + v52);
          *(_BYTE *)(3 * v23 + v50) = v26;
          v31 = v24 - v30;
          v51 = v31;
          if ( v31 <= 255 )
          {
            v32 = v31;
            if ( v31 < 0 )
            {
              v32 = 0;
              v51 = 0;
            }
          }
          else
          {
            v32 = -1;
            v51 = 255;
          }
          v8 = v28;
          *(_BYTE *)(v27 + v28 + 1) = v32;
          v33 = *(&v34 + v29) + v24;
          if ( v33 <= 255 )
          {
            if ( v33 < 0 )
              LOBYTE(v33) = 0;
          }
          else
          {
            LOBYTE(v33) = -1;
          }
          ++v23;
          *(_BYTE *)(v27 + v28 + 2) = v33;
          v22 = *(_DWORD *)(a5 + 8);
        }
        while ( v23 < v22 );
        result = v47;
        v19 = v46;
        v20 = (int *)a5;
        v21 = *(_DWORD *)(a5 + 12);
      }
      v8 += a6;
      result += 16;
      ++v19;
    }
    while ( v19 < v21 );
  }
  return result;
}
// 77BA10: using guessed type __int16 var_86[13];
// 77BA10: using guessed type __int16 var_66[13];
// 77BA10: using guessed type __int16 var_46[13];

//----- (0077BCF0) --------------------------------------------------------
int __cdecl sub_77BCF0(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // edx@1
  int result; // eax@1
  int v7; // ebx@2
  int v8; // edi@2
  int v9; // ecx@2
  int v10; // edi@2
  int v11; // ebx@2
  int v12; // edi@2
  int v13; // ecx@2
  int v14; // edi@2
  int v15; // ebx@2
  int v16; // ecx@2
  int v17; // ebx@2
  int v18; // ebx@6
  int v19; // ecx@10
  int v20; // ecx@14
  int v21; // ebx@14
  int v22; // ebx@18
  int v23; // ecx@22
  int v24; // ecx@26
  int v25; // ebx@26
  int v26; // ebx@30
  int v27; // ecx@34
  int v28; // ecx@38
  int v29; // ebx@38
  int v30; // ebx@42
  int v31; // ecx@46
  int v32; // ecx@50
  int v33; // ebx@50
  int v34; // ebx@54
  int v35; // ecx@58
  int v36; // ecx@62
  int v37; // ebx@62
  int v38; // ebx@66
  int v39; // ecx@70
  int v40; // ecx@74
  int v41; // ebx@74
  int v42; // ebx@78
  int v43; // ecx@82
  int v44; // ecx@86
  int v45; // ebx@86
  int v46; // ebx@90
  int v47; // ecx@94
  int v48; // ecx@98
  int v49; // ebx@98
  int v50; // eax@98
  int v51; // ebx@102
  int v52; // ecx@106
  int v53; // ecx@110
  int v54; // ebx@110
  int v55; // ebx@114
  int v56; // ecx@118
  int v57; // ecx@122
  int v58; // ebx@122
  int v59; // ebx@126
  int v60; // ecx@130
  int v61; // ecx@134
  int v62; // ebx@134
  int v63; // ebx@138
  int v64; // ecx@142
  int v65; // ecx@146
  int v66; // ebx@146
  int v67; // ebx@150
  int v68; // ecx@154
  int v69; // ecx@158
  int v70; // ebx@158
  int v71; // ebx@162
  int v72; // ecx@166
  int v73; // ecx@170
  int v74; // ebx@170
  int v75; // ebx@174
  int v76; // ecx@178
  int v77; // ecx@182
  int v78; // ebx@182
  int v79; // ebx@186
  int v80; // ecx@190
  signed int v81; // [sp+4h] [bp-48h]@1
  int v82; // [sp+8h] [bp-44h]@2
  int v83; // [sp+Ch] [bp-40h]@2
  int v84; // [sp+10h] [bp-3Ch]@2
  int v85; // [sp+14h] [bp-38h]@2
  int v86; // [sp+18h] [bp-34h]@1
  int v87; // [sp+1Ch] [bp-30h]@1
  int v88; // [sp+20h] [bp-2Ch]@2
  int v89; // [sp+24h] [bp-28h]@2
  int v90; // [sp+28h] [bp-24h]@2
  int v91; // [sp+2Ch] [bp-20h]@2
  int v92; // [sp+30h] [bp-1Ch]@2
  int v93; // [sp+34h] [bp-18h]@2
  int v94; // [sp+38h] [bp-14h]@2
  int v95; // [sp+3Ch] [bp-10h]@2

  v5 = a1;
  result = a4;
  v81 = 0;
  v87 = a3;
  v86 = a2;
  do
  {
    v7 = *(_WORD *)v87;
    v85 = (359 * v7 - 45813) >> 8;
    v8 = *(_WORD *)v86;
    v92 = (88 * v8 + 183 * v7 - 34806) >> 8;
    v9 = (454 * v8 - 57937) >> 8;
    v10 = *(_WORD *)(v87 + 2);
    v95 = v9;
    v84 = (359 * v10 - 45813) >> 8;
    v11 = *(_WORD *)(v86 + 2);
    v90 = (88 * v11 + 183 * v10 - 34806) >> 8;
    v12 = *(_WORD *)(v87 + 4);
    v94 = (454 * v11 - 57937) >> 8;
    v83 = (359 * v12 - 45813) >> 8;
    v13 = *(_WORD *)(v86 + 4);
    v89 = (88 * v13 + 183 * v12 - 34806) >> 8;
    v14 = *(_WORD *)(v87 + 6);
    v93 = (454 * v13 - 57937) >> 8;
    v82 = (359 * v14 - 45813) >> 8;
    v15 = *(_WORD *)(v86 + 6);
    v88 = (88 * v15 + 183 * v14 - 34806) >> 8;
    v91 = (454 * v15 - 57937) >> 8;
    v16 = *(_WORD *)v5;
    v17 = v95 + v16;
    v86 += 16;
    v87 += 16;
    if ( v95 + v16 <= 255 )
    {
      if ( v17 < 0 )
        LOBYTE(v17) = 0;
    }
    else
    {
      LOBYTE(v17) = -1;
    }
    *(_BYTE *)result = v17;
    v18 = v16 - v92;
    if ( v16 - v92 <= 255 )
    {
      if ( v18 < 0 )
        LOBYTE(v18) = 0;
    }
    else
    {
      LOBYTE(v18) = -1;
    }
    *(_BYTE *)(result + 1) = v18;
    v19 = v85 + v16;
    if ( v19 <= 255 )
    {
      if ( v19 < 0 )
        LOBYTE(v19) = 0;
    }
    else
    {
      LOBYTE(v19) = -1;
    }
    *(_BYTE *)(result + 2) = v19;
    v20 = *(_WORD *)(v5 + 2);
    v21 = v95 + v20;
    if ( v95 + v20 <= 255 )
    {
      if ( v21 < 0 )
        LOBYTE(v21) = 0;
    }
    else
    {
      LOBYTE(v21) = -1;
    }
    *(_BYTE *)(result + 3) = v21;
    v22 = v20 - v92;
    if ( v20 - v92 <= 255 )
    {
      if ( v22 < 0 )
        LOBYTE(v22) = 0;
    }
    else
    {
      LOBYTE(v22) = -1;
    }
    *(_BYTE *)(result + 4) = v22;
    v23 = v85 + v20;
    if ( v23 <= 255 )
    {
      if ( v23 < 0 )
        LOBYTE(v23) = 0;
    }
    else
    {
      LOBYTE(v23) = -1;
    }
    *(_BYTE *)(result + 5) = v23;
    v24 = *(_WORD *)(v5 + 4);
    v25 = v24 + v94;
    if ( v24 + v94 <= 255 )
    {
      if ( v25 < 0 )
        LOBYTE(v25) = 0;
    }
    else
    {
      LOBYTE(v25) = -1;
    }
    *(_BYTE *)(result + 6) = v25;
    v26 = v24 - v90;
    if ( v24 - v90 <= 255 )
    {
      if ( v26 < 0 )
        LOBYTE(v26) = 0;
    }
    else
    {
      LOBYTE(v26) = -1;
    }
    *(_BYTE *)(result + 7) = v26;
    v27 = v84 + v24;
    if ( v27 <= 255 )
    {
      if ( v27 < 0 )
        LOBYTE(v27) = 0;
    }
    else
    {
      LOBYTE(v27) = -1;
    }
    *(_BYTE *)(result + 8) = v27;
    v28 = *(_WORD *)(v5 + 6);
    v29 = v28 + v94;
    if ( v28 + v94 <= 255 )
    {
      if ( v29 < 0 )
        LOBYTE(v29) = 0;
    }
    else
    {
      LOBYTE(v29) = -1;
    }
    *(_BYTE *)(result + 9) = v29;
    v30 = v28 - v90;
    if ( v28 - v90 <= 255 )
    {
      if ( v30 < 0 )
        LOBYTE(v30) = 0;
    }
    else
    {
      LOBYTE(v30) = -1;
    }
    *(_BYTE *)(result + 10) = v30;
    v31 = v84 + v28;
    if ( v31 <= 255 )
    {
      if ( v31 < 0 )
        LOBYTE(v31) = 0;
    }
    else
    {
      LOBYTE(v31) = -1;
    }
    *(_BYTE *)(result + 11) = v31;
    v32 = *(_WORD *)(v5 + 8);
    v33 = v32 + v93;
    if ( v32 + v93 <= 255 )
    {
      if ( v33 < 0 )
        LOBYTE(v33) = 0;
    }
    else
    {
      LOBYTE(v33) = -1;
    }
    *(_BYTE *)(result + 12) = v33;
    v34 = v32 - v89;
    if ( v32 - v89 <= 255 )
    {
      if ( v34 < 0 )
        LOBYTE(v34) = 0;
    }
    else
    {
      LOBYTE(v34) = -1;
    }
    *(_BYTE *)(result + 13) = v34;
    v35 = v83 + v32;
    if ( v35 <= 255 )
    {
      if ( v35 < 0 )
        LOBYTE(v35) = 0;
    }
    else
    {
      LOBYTE(v35) = -1;
    }
    *(_BYTE *)(result + 14) = v35;
    v36 = *(_WORD *)(v5 + 10);
    v37 = v36 + v93;
    if ( v36 + v93 <= 255 )
    {
      if ( v37 < 0 )
        LOBYTE(v37) = 0;
    }
    else
    {
      LOBYTE(v37) = -1;
    }
    *(_BYTE *)(result + 15) = v37;
    v38 = v36 - v89;
    if ( v36 - v89 <= 255 )
    {
      if ( v38 < 0 )
        LOBYTE(v38) = 0;
    }
    else
    {
      LOBYTE(v38) = -1;
    }
    *(_BYTE *)(result + 16) = v38;
    v39 = v83 + v36;
    if ( v39 <= 255 )
    {
      if ( v39 < 0 )
        LOBYTE(v39) = 0;
    }
    else
    {
      LOBYTE(v39) = -1;
    }
    *(_BYTE *)(result + 17) = v39;
    v40 = *(_WORD *)(v5 + 12);
    v41 = v40 + v91;
    if ( v40 + v91 <= 255 )
    {
      if ( v41 < 0 )
        LOBYTE(v41) = 0;
    }
    else
    {
      LOBYTE(v41) = -1;
    }
    *(_BYTE *)(result + 18) = v41;
    v42 = v40 - v88;
    if ( v40 - v88 <= 255 )
    {
      if ( v42 < 0 )
        LOBYTE(v42) = 0;
    }
    else
    {
      LOBYTE(v42) = -1;
    }
    *(_BYTE *)(result + 19) = v42;
    v43 = v82 + v40;
    if ( v43 <= 255 )
    {
      if ( v43 < 0 )
        LOBYTE(v43) = 0;
    }
    else
    {
      LOBYTE(v43) = -1;
    }
    *(_BYTE *)(result + 20) = v43;
    v44 = *(_WORD *)(v5 + 14);
    v45 = v44 + v91;
    if ( v44 + v91 <= 255 )
    {
      if ( v45 < 0 )
        LOBYTE(v45) = 0;
    }
    else
    {
      LOBYTE(v45) = -1;
    }
    *(_BYTE *)(result + 21) = v45;
    v46 = v44 - v88;
    if ( v44 - v88 <= 255 )
    {
      if ( v46 < 0 )
        LOBYTE(v46) = 0;
    }
    else
    {
      LOBYTE(v46) = -1;
    }
    *(_BYTE *)(result + 22) = v46;
    v47 = v82 + v44;
    if ( v47 <= 255 )
    {
      if ( v47 < 0 )
        LOBYTE(v47) = 0;
    }
    else
    {
      LOBYTE(v47) = -1;
    }
    *(_BYTE *)(result + 23) = v47;
    v48 = *(_WORD *)(v5 + 16);
    v49 = v95 + v48;
    v50 = a5 + result;
    if ( v95 + v48 <= 255 )
    {
      if ( v49 < 0 )
        LOBYTE(v49) = 0;
    }
    else
    {
      LOBYTE(v49) = -1;
    }
    *(_BYTE *)v50 = v49;
    v51 = v48 - v92;
    if ( v48 - v92 <= 255 )
    {
      if ( v51 < 0 )
        LOBYTE(v51) = 0;
    }
    else
    {
      LOBYTE(v51) = -1;
    }
    *(_BYTE *)(v50 + 1) = v51;
    v52 = v85 + v48;
    if ( v52 <= 255 )
    {
      if ( v52 < 0 )
        LOBYTE(v52) = 0;
    }
    else
    {
      LOBYTE(v52) = -1;
    }
    *(_BYTE *)(v50 + 2) = v52;
    v53 = *(_WORD *)(v5 + 18);
    v54 = v53 + v95;
    if ( v53 + v95 <= 255 )
    {
      if ( v54 < 0 )
        LOBYTE(v54) = 0;
    }
    else
    {
      LOBYTE(v54) = -1;
    }
    *(_BYTE *)(v50 + 3) = v54;
    v55 = v53 - v92;
    if ( v53 - v92 <= 255 )
    {
      if ( v55 < 0 )
        LOBYTE(v55) = 0;
    }
    else
    {
      LOBYTE(v55) = -1;
    }
    *(_BYTE *)(v50 + 4) = v55;
    v56 = v85 + v53;
    if ( v56 <= 255 )
    {
      if ( v56 < 0 )
        LOBYTE(v56) = 0;
    }
    else
    {
      LOBYTE(v56) = -1;
    }
    *(_BYTE *)(v50 + 5) = v56;
    v57 = *(_WORD *)(v5 + 20);
    v58 = v57 + v94;
    if ( v57 + v94 <= 255 )
    {
      if ( v58 < 0 )
        LOBYTE(v58) = 0;
    }
    else
    {
      LOBYTE(v58) = -1;
    }
    *(_BYTE *)(v50 + 6) = v58;
    v59 = v57 - v90;
    if ( v57 - v90 <= 255 )
    {
      if ( v59 < 0 )
        LOBYTE(v59) = 0;
    }
    else
    {
      LOBYTE(v59) = -1;
    }
    *(_BYTE *)(v50 + 7) = v59;
    v60 = v84 + v57;
    if ( v60 <= 255 )
    {
      if ( v60 < 0 )
        LOBYTE(v60) = 0;
    }
    else
    {
      LOBYTE(v60) = -1;
    }
    *(_BYTE *)(v50 + 8) = v60;
    v61 = *(_WORD *)(v5 + 22);
    v62 = v61 + v94;
    if ( v61 + v94 <= 255 )
    {
      if ( v62 < 0 )
        LOBYTE(v62) = 0;
    }
    else
    {
      LOBYTE(v62) = -1;
    }
    *(_BYTE *)(v50 + 9) = v62;
    v63 = v61 - v90;
    if ( v61 - v90 <= 255 )
    {
      if ( v63 < 0 )
        LOBYTE(v63) = 0;
    }
    else
    {
      LOBYTE(v63) = -1;
    }
    *(_BYTE *)(v50 + 10) = v63;
    v64 = v84 + v61;
    if ( v64 <= 255 )
    {
      if ( v64 < 0 )
        LOBYTE(v64) = 0;
    }
    else
    {
      LOBYTE(v64) = -1;
    }
    *(_BYTE *)(v50 + 11) = v64;
    v65 = *(_WORD *)(v5 + 24);
    v66 = v65 + v93;
    if ( v65 + v93 <= 255 )
    {
      if ( v66 < 0 )
        LOBYTE(v66) = 0;
    }
    else
    {
      LOBYTE(v66) = -1;
    }
    *(_BYTE *)(v50 + 12) = v66;
    v67 = v65 - v89;
    if ( v65 - v89 <= 255 )
    {
      if ( v67 < 0 )
        LOBYTE(v67) = 0;
    }
    else
    {
      LOBYTE(v67) = -1;
    }
    *(_BYTE *)(v50 + 13) = v67;
    v68 = v83 + v65;
    if ( v68 <= 255 )
    {
      if ( v68 < 0 )
        LOBYTE(v68) = 0;
    }
    else
    {
      LOBYTE(v68) = -1;
    }
    *(_BYTE *)(v50 + 14) = v68;
    v69 = *(_WORD *)(v5 + 26);
    v70 = v69 + v93;
    if ( v69 + v93 <= 255 )
    {
      if ( v70 < 0 )
        LOBYTE(v70) = 0;
    }
    else
    {
      LOBYTE(v70) = -1;
    }
    *(_BYTE *)(v50 + 15) = v70;
    v71 = v69 - v89;
    if ( v69 - v89 <= 255 )
    {
      if ( v71 < 0 )
        LOBYTE(v71) = 0;
    }
    else
    {
      LOBYTE(v71) = -1;
    }
    *(_BYTE *)(v50 + 16) = v71;
    v72 = v83 + v69;
    if ( v72 <= 255 )
    {
      if ( v72 < 0 )
        LOBYTE(v72) = 0;
    }
    else
    {
      LOBYTE(v72) = -1;
    }
    *(_BYTE *)(v50 + 17) = v72;
    v73 = *(_WORD *)(v5 + 28);
    v74 = v73 + v91;
    if ( v73 + v91 <= 255 )
    {
      if ( v74 < 0 )
        LOBYTE(v74) = 0;
    }
    else
    {
      LOBYTE(v74) = -1;
    }
    *(_BYTE *)(v50 + 18) = v74;
    v75 = v73 - v88;
    if ( v73 - v88 <= 255 )
    {
      if ( v75 < 0 )
        LOBYTE(v75) = 0;
    }
    else
    {
      LOBYTE(v75) = -1;
    }
    *(_BYTE *)(v50 + 19) = v75;
    v76 = v82 + v73;
    if ( v76 <= 255 )
    {
      if ( v76 < 0 )
        LOBYTE(v76) = 0;
    }
    else
    {
      LOBYTE(v76) = -1;
    }
    *(_BYTE *)(v50 + 20) = v76;
    v77 = *(_WORD *)(v5 + 30);
    v78 = v77 + v91;
    if ( v77 + v91 <= 255 )
    {
      if ( v78 < 0 )
        LOBYTE(v78) = 0;
    }
    else
    {
      LOBYTE(v78) = -1;
    }
    *(_BYTE *)(v50 + 21) = v78;
    v79 = v77 - v88;
    if ( v77 - v88 <= 255 )
    {
      if ( v79 < 0 )
        LOBYTE(v79) = 0;
    }
    else
    {
      LOBYTE(v79) = -1;
    }
    *(_BYTE *)(v50 + 22) = v79;
    v80 = v82 + v77;
    if ( v80 <= 255 )
    {
      if ( v80 < 0 )
        LOBYTE(v80) = 0;
    }
    else
    {
      LOBYTE(v80) = -1;
    }
    v5 += 32;
    *(_BYTE *)(v50 + 23) = v80;
    result = a5 + v50;
    v81 += 2;
  }
  while ( v81 < 8 );
  return result;
}

//----- (0077C5B0) --------------------------------------------------------
int __cdecl YCbCr_411_to_BGR_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // edi@1

  sub_77BCF0(a1, a2, a3, a4, a5);
  sub_77BCF0(a1 + 128, a2 + 8, a3 + 8, a4 + 24, a5);
  v5 = a4 + 8 * a5;
  sub_77BCF0(a1 + 256, a2 + 64, a3 + 64, v5, a5);
  return sub_77BCF0(a1 + 384, a2 + 72, a3 + 72, v5 + 24, a5);
}

//----- (0077C670) --------------------------------------------------------
int __cdecl YCbCr_411_to_BGR_Full_MCU_M5(int a1, int a2, int a3, int a4, int a5)
{
  int result; // eax@1

  own_ycbcr_411_to_bgr_one_half_mcu_m5(a1, a2, a3, a4, a5);
  result = a1;
  own_ycbcr_411_to_bgr_one_half_mcu_m5(a1 + 256, a2 + 64, a3 + 64, a4 + 8 * a5, a5);
  return result;
}

//----- (0077C6E0) --------------------------------------------------------
signed int __cdecl YCbCr_411_to_BGR_MCU(int a1, int a2, int a3)
{
  int v3; // esi@1
  int v4; // ebp@1
  int v5; // ebx@1
  signed int result; // eax@1
  int v7; // edi@2
  int v8; // [sp+30h] [bp-B4h]@1
  int v9; // [sp+34h] [bp-B0h]@1
  int v10; // [sp+38h] [bp-ACh]@1
  int v11; // [sp+3Ch] [bp-A8h]@1
  char v12; // [sp+40h] [bp-A4h]@1
  int v13; // [sp+50h] [bp-94h]@4
  int v14; // [sp+54h] [bp-90h]@4
  int v15; // [sp+58h] [bp-8Ch]@4
  int v16; // [sp+5Ch] [bp-88h]@4
  int v17; // [sp+60h] [bp-84h]@4
  int v18; // [sp+64h] [bp-80h]@4
  int v19; // [sp+68h] [bp-7Ch]@4
  int v20; // [sp+6Ch] [bp-78h]@4
  char v21; // [sp+70h] [bp-74h]@6
  int v22; // [sp+80h] [bp-64h]@6
  int v23; // [sp+84h] [bp-60h]@6
  int v24; // [sp+88h] [bp-5Ch]@6
  int v25; // [sp+8Ch] [bp-58h]@6
  char v26; // [sp+90h] [bp-54h]@8
  int v27; // [sp+A0h] [bp-44h]@8
  int v28; // [sp+A4h] [bp-40h]@8
  int v29; // [sp+A8h] [bp-3Ch]@8
  int v30; // [sp+ACh] [bp-38h]@8
  char v31; // [sp+B0h] [bp-34h]@10
  int v32; // [sp+C0h] [bp-24h]@10
  int v33; // [sp+C4h] [bp-20h]@10
  int v34; // [sp+C8h] [bp-1Ch]@10
  int v35; // [sp+CCh] [bp-18h]@10

  v3 = *(_DWORD *)(a1 + 60);
  v4 = *(_DWORD *)(a1 + 18484);
  v5 = *(_DWORD *)(a1 + 14320);
  v8 = dword_B68958;
  v9 = dword_B6895C;
  v10 = dword_B68960;
  v11 = dword_B68964;
  result = sub_775560(
             a1 + 4,
             16,
             16,
             a2,
             a3,
             *(_DWORD *)(a1 + 48),
             v3,
             *(_DWORD *)(a1 + 32),
             *(_DWORD *)(a1 + 36),
             *(_DWORD *)(a1 + 40),
             (_DWORD *)(a1 + 14356),
             (int)&v12);
  if ( !result )
  {
    v7 = *(_DWORD *)(a1 + 14356);
    if ( (unsigned __int8)operator==((int)&v12, (int)&v8) )
    {
      result = (*(int (__cdecl **)(int, int, int, int, int))(v5 + 188))(v4, v4 + 512, v4 + 640, v7, v3);
    }
    else
    {
      operator&((int)&v13, (int)&v12, (int)&unk_B68938);
      v17 = v13;
      v18 = v14;
      v19 = v15;
      v20 = v16;
      if ( (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0) )
        sub_77BA10(v4, v4 + 512, v4 + 640, v7, (int)&v17, v3);
      operator&((int)&v21, (int)&v12, (int)&unk_B68928);
      operator-((int)&v22, (int)&v21, (int)&unk_B68920);
      v17 = v22;
      v18 = v23;
      v19 = v24;
      v20 = v25;
      if ( (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0) )
        sub_77BA10(v4 + 128, v4 + 520, v4 + 648, v7 + 24, (int)&v17, v3);
      operator&((int)&v26, (int)&v12, (int)&unk_B68910);
      operator-((int)&v27, (int)&v26, (int)&unk_B68908);
      v17 = v27;
      v18 = v28;
      v19 = v29;
      v20 = v30;
      if ( (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0) )
        sub_77BA10(v4 + 256, v4 + 576, v4 + 704, v7 + 8 * v3, (int)&v17, v3);
      operator&((int)&v31, (int)&v12, (int)&unk_B688F8);
      operator-((int)&v32, (int)&v31, (int)&unk_B688F0);
      v17 = v32;
      v18 = v33;
      v19 = v34;
      v20 = v35;
      result = (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0);
      if ( (_BYTE)result )
        result = sub_77BA10(v4 + 384, v4 + 584, v4 + 712, v7 + 8 * v3 + 24, (int)&v17, v3);
    }
  }
  return result;
}
// B68958: using guessed type int dword_B68958;
// B6895C: using guessed type int dword_B6895C;
// B68960: using guessed type int dword_B68960;
// B68964: using guessed type int dword_B68964;

//----- (0077CAB0) --------------------------------------------------------
void __cdecl sub_77CAB0(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int *v6; // edi@1
  int v7; // esi@1
  int v8; // ebx@1
  int v9; // ebp@1
  int v10; // eax@2
  int v11; // edx@2
  int v12; // ecx@3
  int v13; // ebx@4
  int v14; // ebp@4
  int v15; // eax@5
  int v16; // ecx@5
  int v17; // edx@5
  int v18; // eax@5
  int v19; // edx@5
  int v20; // ecx@5
  int v21; // eax@9
  int v22; // edx@13
  int v23; // [sp+8h] [bp-24h]@4
  int v24; // [sp+Ch] [bp-20h]@4
  int v25; // [sp+10h] [bp-1Ch]@5
  int v26; // [sp+14h] [bp-18h]@4

  v6 = (int *)a5;
  v7 = *(_DWORD *)(a5 + 4);
  v8 = *(_DWORD *)(a5 + 12);
  v9 = a4 + a6 * *(_DWORD *)(a5 + 4);
  if ( v7 < v8 )
  {
    v10 = *(_DWORD *)(a5 + 8);
    v11 = 8 * v7;
    do
    {
      v12 = *v6;
      if ( *v6 < v10 )
      {
        v13 = v12 + v11;
        v23 = v11;
        v24 = *v6;
        v26 = v9;
        v14 = 3 * v12;
        do
        {
          v15 = *(_WORD *)(a3 + 2 * v13);
          v16 = (signed __int16)((359 * v15 - 45813) >> 8);
          v17 = *(_WORD *)(a2 + 2 * v13);
          v18 = (signed __int16)((88 * v17 + 183 * v15 - 34806) >> 8);
          v19 = (signed __int16)((454 * v17 - 57937) >> 8);
          v20 = *(_WORD *)(a1 + 2 * v13) + v16;
          v25 = *(_WORD *)(a1 + 2 * v13);
          if ( v20 <= 255 )
          {
            if ( v20 < 0 )
              LOBYTE(v20) = 0;
          }
          else
          {
            LOBYTE(v20) = -1;
          }
          *(_BYTE *)(v14 + v26) = v20;
          v21 = v25 - v18;
          if ( v21 <= 255 )
          {
            if ( v21 < 0 )
              LOBYTE(v21) = 0;
          }
          else
          {
            LOBYTE(v21) = -1;
          }
          *(_BYTE *)(v14 + v26 + 1) = v21;
          v22 = v25 + v19;
          if ( v22 <= 255 )
          {
            if ( v22 < 0 )
              LOBYTE(v22) = 0;
          }
          else
          {
            LOBYTE(v22) = -1;
          }
          ++v13;
          *(_BYTE *)(v14 + v26 + 2) = v22;
          v14 += 3;
          v10 = *(_DWORD *)(a5 + 8);
          ++v24;
        }
        while ( v24 < v10 );
        v11 = v23;
        v9 = v26;
        v6 = (int *)a5;
        v8 = *(_DWORD *)(a5 + 12);
      }
      v9 += a6;
      v11 += 8;
      ++v7;
    }
    while ( v7 < v8 );
  }
}

//----- (0077CC10) --------------------------------------------------------
int __cdecl YCbCr_111_to_RGB_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // ecx@1
  int result; // eax@1
  signed int v7; // ebp@2
  int v8; // ebx@2
  int v9; // edx@3
  int v10; // eax@3
  int v11; // ecx@3
  int v12; // edx@3
  int v13; // ecx@3
  int v14; // eax@3
  int v15; // edx@7
  int v16; // ecx@11
  int v17; // [sp+4h] [bp-20h]@2
  int v18; // [sp+8h] [bp-1Ch]@3
  int v19; // [sp+Ch] [bp-18h]@2

  v5 = a4;
  result = 0;
  do
  {
    v7 = 0;
    v8 = result;
    v17 = result;
    v19 = v5;
    do
    {
      v9 = *(_WORD *)(a3 + 2 * v8);
      v10 = (signed __int16)((359 * v9 - 45813) >> 8);
      v11 = *(_WORD *)(a2 + 2 * v8);
      v12 = (signed __int16)((88 * v11 + 183 * v9 - 34806) >> 8);
      v13 = (signed __int16)((454 * v11 - 57937) >> 8);
      v14 = *(_WORD *)(a1 + 2 * v8) + v10;
      v18 = *(_WORD *)(a1 + 2 * v8);
      if ( v14 <= 255 )
      {
        if ( v14 < 0 )
          LOBYTE(v14) = 0;
      }
      else
      {
        LOBYTE(v14) = -1;
      }
      *(_BYTE *)(v7 + v19) = v14;
      v15 = v18 - v12;
      if ( v15 <= 255 )
      {
        if ( v15 < 0 )
          LOBYTE(v15) = 0;
      }
      else
      {
        LOBYTE(v15) = -1;
      }
      *(_BYTE *)(v7 + v19 + 1) = v15;
      v16 = v18 + v13;
      if ( v16 <= 255 )
      {
        if ( v16 < 0 )
          LOBYTE(v16) = 0;
      }
      else
      {
        LOBYTE(v16) = -1;
      }
      ++v8;
      *(_BYTE *)(v7 + v19 + 2) = v16;
      v7 += 3;
    }
    while ( v7 < 24 );
    v5 = a5 + v19;
    result = v17 + 8;
  }
  while ( v17 + 8 < 64 );
  return result;
}

//----- (0077CD40) --------------------------------------------------------
void __cdecl YCbCr_111_to_RGB_MCU(int a1, int a2, int a3)
{
  int v3; // esi@1
  int v4; // ebp@1
  int v5; // ebx@1
  int v6; // edi@2
  int v7; // [sp+30h] [bp-54h]@1
  int v8; // [sp+34h] [bp-50h]@1
  int v9; // [sp+38h] [bp-4Ch]@1
  int v10; // [sp+3Ch] [bp-48h]@1
  char v11; // [sp+40h] [bp-44h]@1
  int v12; // [sp+50h] [bp-34h]@4
  int v13; // [sp+54h] [bp-30h]@4
  int v14; // [sp+58h] [bp-2Ch]@4
  int v15; // [sp+5Ch] [bp-28h]@4
  int v16; // [sp+60h] [bp-24h]@4
  int v17; // [sp+64h] [bp-20h]@4
  int v18; // [sp+68h] [bp-1Ch]@4
  int v19; // [sp+6Ch] [bp-18h]@4

  v3 = *(_DWORD *)(a1 + 60);
  v4 = *(_DWORD *)(a1 + 18484);
  v5 = *(_DWORD *)(a1 + 14320);
  v7 = dword_B68968;
  v8 = dword_B6896C;
  v9 = dword_B68970;
  v10 = dword_B68974;
  if ( !sub_775560(
          a1 + 4,
          8,
          8,
          a2,
          a3,
          *(_DWORD *)(a1 + 48),
          v3,
          *(_DWORD *)(a1 + 32),
          *(_DWORD *)(a1 + 36),
          *(_DWORD *)(a1 + 40),
          (_DWORD *)(a1 + 14356),
          (int)&v11) )
  {
    v6 = *(_DWORD *)(a1 + 14356);
    if ( (unsigned __int8)operator==((int)&v11, (int)&v7) )
    {
      (*(void (__cdecl **)(int, int, int, int, int))(v5 + 168))(v4, v4 + 128, v4 + 256, v6, v3);
    }
    else
    {
      operator&((int)&v12, (int)&v11, (int)&unk_B68938);
      v16 = v12;
      v17 = v13;
      v18 = v14;
      v19 = v15;
      if ( (unsigned __int8)operator!=((int)&v16, (int)dword_B688E0) )
        sub_77CAB0(v4, v4 + 128, v4 + 256, v6, (int)&v16, v3);
    }
  }
}
// B68968: using guessed type int dword_B68968;
// B6896C: using guessed type int dword_B6896C;
// B68970: using guessed type int dword_B68970;
// B68974: using guessed type int dword_B68974;

//----- (0077CED0) --------------------------------------------------------
void __cdecl sub_77CED0(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int *v6; // edi@1
  int v7; // esi@1
  int v8; // ebx@1
  int v9; // ebp@1
  int v10; // eax@2
  int v11; // edx@2
  int v12; // ecx@3
  int v13; // ebx@4
  int v14; // ebp@4
  int v15; // eax@5
  int v16; // edx@5
  int v17; // ecx@5
  int v18; // eax@5
  int v19; // ecx@5
  int v20; // eax@9
  int v21; // edx@13
  int v22; // [sp+8h] [bp-24h]@4
  int v23; // [sp+Ch] [bp-20h]@4
  int v24; // [sp+10h] [bp-1Ch]@5
  int v25; // [sp+14h] [bp-18h]@4

  v6 = (int *)a5;
  v7 = *(_DWORD *)(a5 + 4);
  v8 = *(_DWORD *)(a5 + 12);
  v9 = a4 + a6 * *(_DWORD *)(a5 + 4);
  if ( v7 < v8 )
  {
    v10 = *(_DWORD *)(a5 + 8);
    v11 = 8 * v7;
    do
    {
      v12 = *v6;
      if ( *v6 < v10 )
      {
        v13 = v12 + v11;
        v22 = v11;
        v23 = *v6;
        v25 = v9;
        v14 = 3 * v12;
        do
        {
          v15 = *(_WORD *)(a3 + 2 * v13);
          v16 = (signed __int16)((359 * v15 - 45813) >> 8);
          v17 = *(_WORD *)(a2 + 2 * v13);
          v18 = (signed __int16)((88 * v17 + 183 * v15 - 34806) >> 8);
          v19 = *(_WORD *)(a1 + 2 * v13) + (signed __int16)((454 * v17 - 57937) >> 8);
          v24 = *(_WORD *)(a1 + 2 * v13);
          if ( v19 <= 255 )
          {
            if ( v19 < 0 )
              LOBYTE(v19) = 0;
          }
          else
          {
            LOBYTE(v19) = -1;
          }
          *(_BYTE *)(v14 + v25) = v19;
          v20 = v24 - v18;
          if ( v20 <= 255 )
          {
            if ( v20 < 0 )
              LOBYTE(v20) = 0;
          }
          else
          {
            LOBYTE(v20) = -1;
          }
          *(_BYTE *)(v14 + v25 + 1) = v20;
          v21 = v24 + v16;
          if ( v21 <= 255 )
          {
            if ( v21 < 0 )
              LOBYTE(v21) = 0;
          }
          else
          {
            LOBYTE(v21) = -1;
          }
          ++v13;
          *(_BYTE *)(v14 + v25 + 2) = v21;
          v14 += 3;
          v10 = *(_DWORD *)(a5 + 8);
          ++v23;
        }
        while ( v23 < v10 );
        v11 = v22;
        v9 = v25;
        v6 = (int *)a5;
        v8 = *(_DWORD *)(a5 + 12);
      }
      v9 += a6;
      v11 += 8;
      ++v7;
    }
    while ( v7 < v8 );
  }
}

//----- (0077D030) --------------------------------------------------------
int __cdecl YCbCr_111_to_BGR_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // ecx@1
  int result; // eax@1
  signed int v7; // ebp@2
  int v8; // ebx@2
  int v9; // edx@3
  int v10; // ecx@3
  int v11; // eax@3
  int v12; // edx@3
  int v13; // eax@3
  int v14; // edx@7
  int v15; // ecx@11
  int v16; // [sp+4h] [bp-20h]@2
  int v17; // [sp+8h] [bp-1Ch]@3
  int v18; // [sp+Ch] [bp-18h]@2

  v5 = a4;
  result = 0;
  do
  {
    v7 = 0;
    v8 = result;
    v16 = result;
    v18 = v5;
    do
    {
      v9 = *(_WORD *)(a3 + 2 * v8);
      v10 = (signed __int16)((359 * v9 - 45813) >> 8);
      v11 = *(_WORD *)(a2 + 2 * v8);
      v12 = (signed __int16)((88 * v11 + 183 * v9 - 34806) >> 8);
      v13 = *(_WORD *)(a1 + 2 * v8) + (signed __int16)((454 * v11 - 57937) >> 8);
      v17 = *(_WORD *)(a1 + 2 * v8);
      if ( v13 <= 255 )
      {
        if ( v13 < 0 )
          LOBYTE(v13) = 0;
      }
      else
      {
        LOBYTE(v13) = -1;
      }
      *(_BYTE *)(v7 + v18) = v13;
      v14 = v17 - v12;
      if ( v14 <= 255 )
      {
        if ( v14 < 0 )
          LOBYTE(v14) = 0;
      }
      else
      {
        LOBYTE(v14) = -1;
      }
      *(_BYTE *)(v7 + v18 + 1) = v14;
      v15 = v17 + v10;
      if ( v15 <= 255 )
      {
        if ( v15 < 0 )
          LOBYTE(v15) = 0;
      }
      else
      {
        LOBYTE(v15) = -1;
      }
      ++v8;
      *(_BYTE *)(v7 + v18 + 2) = v15;
      v7 += 3;
    }
    while ( v7 < 24 );
    v5 = a5 + v18;
    result = v16 + 8;
  }
  while ( v16 + 8 < 64 );
  return result;
}

//----- (0077D160) --------------------------------------------------------
void __cdecl YCbCr_111_to_BGR_MCU(int a1, int a2, int a3)
{
  int v3; // esi@1
  int v4; // ebp@1
  int v5; // ebx@1
  int v6; // edi@2
  int v7; // [sp+30h] [bp-54h]@1
  int v8; // [sp+34h] [bp-50h]@1
  int v9; // [sp+38h] [bp-4Ch]@1
  int v10; // [sp+3Ch] [bp-48h]@1
  char v11; // [sp+40h] [bp-44h]@1
  int v12; // [sp+50h] [bp-34h]@4
  int v13; // [sp+54h] [bp-30h]@4
  int v14; // [sp+58h] [bp-2Ch]@4
  int v15; // [sp+5Ch] [bp-28h]@4
  int v16; // [sp+60h] [bp-24h]@4
  int v17; // [sp+64h] [bp-20h]@4
  int v18; // [sp+68h] [bp-1Ch]@4
  int v19; // [sp+6Ch] [bp-18h]@4

  v3 = *(_DWORD *)(a1 + 60);
  v4 = *(_DWORD *)(a1 + 18484);
  v5 = *(_DWORD *)(a1 + 14320);
  v7 = dword_B68978;
  v8 = dword_B6897C;
  v9 = dword_B68980;
  v10 = dword_B68984;
  if ( !sub_775560(
          a1 + 4,
          8,
          8,
          a2,
          a3,
          *(_DWORD *)(a1 + 48),
          v3,
          *(_DWORD *)(a1 + 32),
          *(_DWORD *)(a1 + 36),
          *(_DWORD *)(a1 + 40),
          (_DWORD *)(a1 + 14356),
          (int)&v11) )
  {
    v6 = *(_DWORD *)(a1 + 14356);
    if ( (unsigned __int8)operator==((int)&v11, (int)&v7) )
    {
      (*(void (__cdecl **)(int, int, int, int, int))(v5 + 180))(v4, v4 + 128, v4 + 256, v6, v3);
    }
    else
    {
      operator&((int)&v12, (int)&v11, (int)&unk_B68938);
      v16 = v12;
      v17 = v13;
      v18 = v14;
      v19 = v15;
      if ( (unsigned __int8)operator!=((int)&v16, (int)dword_B688E0) )
        sub_77CED0(v4, v4 + 128, v4 + 256, v6, (int)&v16, v3);
    }
  }
}
// B68978: using guessed type int dword_B68978;
// B6897C: using guessed type int dword_B6897C;
// B68980: using guessed type int dword_B68980;
// B68984: using guessed type int dword_B68984;

//----- (0077D2F0) --------------------------------------------------------
int __cdecl sub_77D2F0(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int v6; // ecx@1
  int v7; // edx@1
  int v8; // ebx@1
  int result; // eax@1
  int v10; // ebp@2
  int v11; // edi@2
  int v12; // ebp@2
  int v13; // edi@2
  int v14; // ebp@2
  int v15; // edi@2
  int v16; // ebp@2
  int v17; // ebp@2
  int v18; // edi@2
  int v19; // ebp@3
  int *v20; // esi@3
  int v21; // ecx@3
  int v22; // edx@4
  int v23; // edi@5
  int v24; // eax@7
  int v25; // ecx@7
  char v26; // dl@8
  int v27; // ecx@11
  int v28; // ebp@11
  int v29; // esi@11
  int v30; // ebx@11
  int v31; // ebx@11
  char v32; // dl@12
  int v33; // eax@15
  __int16 v34; // [sp+0h] [bp-ECh]@2
  __int16 v35; // [sp+2h] [bp-EAh]@2
  __int16 v36; // [sp+4h] [bp-E8h]@2
  __int16 v37[29]; // [sp+6h] [bp-E6h]@2
  __int16 v38; // [sp+40h] [bp-ACh]@2
  __int16 v39; // [sp+42h] [bp-AAh]@2
  __int16 v40; // [sp+44h] [bp-A8h]@2
  __int16 v41[29]; // [sp+46h] [bp-A6h]@2
  __int16 v42; // [sp+80h] [bp-6Ch]@2
  __int16 v43; // [sp+82h] [bp-6Ah]@2
  __int16 v44; // [sp+84h] [bp-68h]@2
  __int16 v45[29]; // [sp+86h] [bp-66h]@2
  int v46; // [sp+C0h] [bp-2Ch]@1
  int v47; // [sp+C4h] [bp-28h]@6
  int v48; // [sp+C8h] [bp-24h]@6
  int v49; // [sp+CCh] [bp-20h]@6
  int v50; // [sp+D0h] [bp-1Ch]@6
  int v51; // [sp+D4h] [bp-18h]@7
  int v52; // [sp+D8h] [bp-14h]@7

  v6 = a2;
  v7 = a3;
  v8 = a4 + a6 * *(_DWORD *)(a5 + 4);
  result = 0;
  v46 = *(_DWORD *)(a5 + 4);
  do
  {
    v10 = *(_WORD *)v7;
    v11 = *(_WORD *)v6;
    *(&v34 + 4 * result) = (359 * v10 - 45813) >> 8;
    *(&v38 + 4 * result) = (88 * v11 + 183 * v10 - 34806) >> 8;
    *(&v42 + 4 * result) = (454 * v11 - 57937) >> 8;
    v12 = *(_WORD *)(v7 + 2);
    v13 = *(_WORD *)(v6 + 2);
    *(&v35 + 4 * result) = (359 * v12 - 45813) >> 8;
    *(&v39 + 4 * result) = (88 * v13 + 183 * v12 - 34806) >> 8;
    v14 = (454 * v13 - 57937) >> 8;
    v15 = *(_WORD *)(v6 + 4);
    *(&v43 + 4 * result) = v14;
    v16 = *(_WORD *)(v7 + 4);
    *(&v36 + 4 * result) = (359 * v16 - 45813) >> 8;
    *(&v40 + 4 * result) = (88 * v15 + 183 * v16 - 34806) >> 8;
    *(&v44 + 4 * result) = (454 * v15 - 57937) >> 8;
    v17 = *(_WORD *)(v7 + 6);
    v18 = *(_WORD *)(v6 + 6);
    v37[4 * result] = (359 * v17 - 45813) >> 8;
    v6 += 16;
    v41[4 * result] = (88 * v18 + 183 * v17 - 34806) >> 8;
    v7 += 16;
    v45[4 * result++] = (454 * v18 - 57937) >> 8;
  }
  while ( result < 8 );
  v19 = v46;
  v20 = (int *)a5;
  v21 = *(_DWORD *)(a5 + 12);
  if ( v46 < v21 )
  {
    v22 = *(_DWORD *)(a5 + 8);
    result = 16 * v46;
    do
    {
      v23 = *v20;
      if ( *v20 < v22 )
      {
        v48 = 2 * v19;
        v49 = a1 + result;
        v47 = result;
        v50 = v8;
        v46 = v19;
        do
        {
          v24 = *(_WORD *)(v49 + 2 * v23);
          v52 = ((signed int)(__CFADD__(v23, 2147483648) + v23 + 2147483648 + 2147483648) >> 1) + 2 * v48;
          v25 = v24 + *(&v34 + v52);
          v51 = v25;
          if ( v25 <= 255 )
          {
            v26 = v25;
            if ( v25 < 0 )
            {
              v26 = 0;
              v51 = 0;
            }
          }
          else
          {
            v26 = -1;
            v51 = 255;
          }
          v27 = 3 * v23;
          v28 = v50;
          v29 = v52;
          v30 = *(&v38 + v52);
          *(_BYTE *)(3 * v23 + v50) = v26;
          v31 = v24 - v30;
          v51 = v31;
          if ( v31 <= 255 )
          {
            v32 = v31;
            if ( v31 < 0 )
            {
              v32 = 0;
              v51 = 0;
            }
          }
          else
          {
            v32 = -1;
            v51 = 255;
          }
          v8 = v28;
          *(_BYTE *)(v27 + v28 + 1) = v32;
          v33 = *(&v42 + v29) + v24;
          if ( v33 <= 255 )
          {
            if ( v33 < 0 )
              LOBYTE(v33) = 0;
          }
          else
          {
            LOBYTE(v33) = -1;
          }
          ++v23;
          *(_BYTE *)(v27 + v28 + 2) = v33;
          v22 = *(_DWORD *)(a5 + 8);
        }
        while ( v23 < v22 );
        result = v47;
        v19 = v46;
        v20 = (int *)a5;
        v21 = *(_DWORD *)(a5 + 12);
      }
      v8 += a6;
      result += 16;
      ++v19;
    }
    while ( v19 < v21 );
  }
  return result;
}
// 77D2F0: using guessed type __int16 var_E6[29];
// 77D2F0: using guessed type __int16 var_A6[29];
// 77D2F0: using guessed type __int16 var_66[29];

//----- (0077D600) --------------------------------------------------------
int __cdecl sub_77D600(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // edx@1
  int result; // eax@1
  int v7; // edi@2
  int v8; // ebx@2
  int v9; // ecx@2
  int v10; // ebx@2
  int v11; // edi@2
  int v12; // ebx@2
  int v13; // edi@2
  int v14; // ecx@2
  int v15; // ebx@2
  int v16; // ecx@2
  int v17; // ebx@2
  int v18; // ebx@6
  int v19; // ecx@10
  int v20; // ecx@14
  int v21; // ebx@14
  int v22; // ebx@18
  int v23; // ecx@22
  int v24; // ecx@26
  int v25; // ebx@26
  int v26; // ebx@30
  int v27; // ecx@34
  int v28; // ecx@38
  int v29; // ebx@38
  int v30; // ebx@42
  int v31; // ecx@46
  int v32; // ecx@50
  int v33; // ebx@50
  int v34; // ebx@54
  int v35; // ecx@58
  int v36; // ecx@62
  int v37; // ebx@62
  int v38; // ebx@66
  int v39; // ecx@70
  int v40; // ecx@74
  int v41; // ebx@74
  int v42; // ebx@78
  int v43; // ecx@82
  int v44; // ecx@86
  int v45; // ebx@86
  int v46; // ebx@90
  int v47; // ecx@94
  signed int v48; // [sp+4h] [bp-50h]@1
  int v49; // [sp+8h] [bp-4Ch]@2
  int v50; // [sp+Ch] [bp-48h]@2
  int v51; // [sp+10h] [bp-44h]@2
  int v52; // [sp+14h] [bp-40h]@2
  int v53; // [sp+18h] [bp-3Ch]@1
  int v54; // [sp+1Ch] [bp-38h]@1
  int v55; // [sp+20h] [bp-34h]@2
  int v56; // [sp+24h] [bp-30h]@2
  int v57; // [sp+28h] [bp-2Ch]@2
  int v58; // [sp+2Ch] [bp-28h]@2
  int v59; // [sp+30h] [bp-24h]@2
  int v60; // [sp+34h] [bp-20h]@2
  int v61; // [sp+3Ch] [bp-18h]@2
  int v62; // [sp+40h] [bp-14h]@2

  v5 = a1;
  result = a4;
  v48 = 0;
  v53 = a3;
  v54 = a2;
  do
  {
    v7 = *(_WORD *)v53;
    v62 = (359 * v7 - 45813) >> 8;
    v8 = *(_WORD *)v54;
    v61 = (88 * v8 + 183 * v7 - 34806) >> 8;
    v9 = (454 * v8 - 57937) >> 8;
    v10 = *(_WORD *)(v53 + 2);
    v52 = v9;
    v60 = (359 * v10 - 45813) >> 8;
    v11 = *(_WORD *)(v54 + 2);
    v59 = (88 * v11 + 183 * v10 - 34806) >> 8;
    v12 = *(_WORD *)(v53 + 4);
    v51 = (454 * v11 - 57937) >> 8;
    v58 = (359 * v12 - 45813) >> 8;
    v13 = *(_WORD *)(v54 + 4);
    v57 = (88 * v13 + 183 * v12 - 34806) >> 8;
    v50 = (454 * v13 - 57937) >> 8;
    v14 = *(_WORD *)(v53 + 6);
    v56 = (359 * v14 - 45813) >> 8;
    v15 = *(_WORD *)(v54 + 6);
    v55 = (88 * v15 + 183 * v14 - 34806) >> 8;
    v49 = (454 * v15 - 57937) >> 8;
    v16 = *(_WORD *)v5;
    v17 = v62 + v16;
    v54 += 16;
    v53 += 16;
    if ( v62 + v16 <= 255 )
    {
      if ( v17 < 0 )
        LOBYTE(v17) = 0;
    }
    else
    {
      LOBYTE(v17) = -1;
    }
    *(_BYTE *)result = v17;
    v18 = v16 - v61;
    if ( v16 - v61 <= 255 )
    {
      if ( v18 < 0 )
        LOBYTE(v18) = 0;
    }
    else
    {
      LOBYTE(v18) = -1;
    }
    *(_BYTE *)(result + 1) = v18;
    v19 = v52 + v16;
    if ( v19 <= 255 )
    {
      if ( v19 < 0 )
        LOBYTE(v19) = 0;
    }
    else
    {
      LOBYTE(v19) = -1;
    }
    *(_BYTE *)(result + 2) = v19;
    v20 = *(_WORD *)(v5 + 2);
    v21 = v20 + v62;
    if ( v20 + v62 <= 255 )
    {
      if ( v21 < 0 )
        LOBYTE(v21) = 0;
    }
    else
    {
      LOBYTE(v21) = -1;
    }
    *(_BYTE *)(result + 3) = v21;
    v22 = v20 - v61;
    if ( v20 - v61 <= 255 )
    {
      if ( v22 < 0 )
        LOBYTE(v22) = 0;
    }
    else
    {
      LOBYTE(v22) = -1;
    }
    *(_BYTE *)(result + 4) = v22;
    v23 = v52 + v20;
    if ( v23 <= 255 )
    {
      if ( v23 < 0 )
        LOBYTE(v23) = 0;
    }
    else
    {
      LOBYTE(v23) = -1;
    }
    *(_BYTE *)(result + 5) = v23;
    v24 = *(_WORD *)(v5 + 4);
    v25 = v24 + v60;
    if ( v24 + v60 <= 255 )
    {
      if ( v25 < 0 )
        LOBYTE(v25) = 0;
    }
    else
    {
      LOBYTE(v25) = -1;
    }
    *(_BYTE *)(result + 6) = v25;
    v26 = v24 - v59;
    if ( v24 - v59 <= 255 )
    {
      if ( v26 < 0 )
        LOBYTE(v26) = 0;
    }
    else
    {
      LOBYTE(v26) = -1;
    }
    *(_BYTE *)(result + 7) = v26;
    v27 = v51 + v24;
    if ( v27 <= 255 )
    {
      if ( v27 < 0 )
        LOBYTE(v27) = 0;
    }
    else
    {
      LOBYTE(v27) = -1;
    }
    *(_BYTE *)(result + 8) = v27;
    v28 = *(_WORD *)(v5 + 6);
    v29 = v28 + v60;
    if ( v28 + v60 <= 255 )
    {
      if ( v29 < 0 )
        LOBYTE(v29) = 0;
    }
    else
    {
      LOBYTE(v29) = -1;
    }
    *(_BYTE *)(result + 9) = v29;
    v30 = v28 - v59;
    if ( v28 - v59 <= 255 )
    {
      if ( v30 < 0 )
        LOBYTE(v30) = 0;
    }
    else
    {
      LOBYTE(v30) = -1;
    }
    *(_BYTE *)(result + 10) = v30;
    v31 = v51 + v28;
    if ( v31 <= 255 )
    {
      if ( v31 < 0 )
        LOBYTE(v31) = 0;
    }
    else
    {
      LOBYTE(v31) = -1;
    }
    *(_BYTE *)(result + 11) = v31;
    v32 = *(_WORD *)(v5 + 8);
    v33 = v32 + v58;
    if ( v32 + v58 <= 255 )
    {
      if ( v33 < 0 )
        LOBYTE(v33) = 0;
    }
    else
    {
      LOBYTE(v33) = -1;
    }
    *(_BYTE *)(result + 12) = v33;
    v34 = v32 - v57;
    if ( v32 - v57 <= 255 )
    {
      if ( v34 < 0 )
        LOBYTE(v34) = 0;
    }
    else
    {
      LOBYTE(v34) = -1;
    }
    *(_BYTE *)(result + 13) = v34;
    v35 = v50 + v32;
    if ( v35 <= 255 )
    {
      if ( v35 < 0 )
        LOBYTE(v35) = 0;
    }
    else
    {
      LOBYTE(v35) = -1;
    }
    *(_BYTE *)(result + 14) = v35;
    v36 = *(_WORD *)(v5 + 10);
    v37 = v36 + v58;
    if ( v36 + v58 <= 255 )
    {
      if ( v37 < 0 )
        LOBYTE(v37) = 0;
    }
    else
    {
      LOBYTE(v37) = -1;
    }
    *(_BYTE *)(result + 15) = v37;
    v38 = v36 - v57;
    if ( v36 - v57 <= 255 )
    {
      if ( v38 < 0 )
        LOBYTE(v38) = 0;
    }
    else
    {
      LOBYTE(v38) = -1;
    }
    *(_BYTE *)(result + 16) = v38;
    v39 = v50 + v36;
    if ( v39 <= 255 )
    {
      if ( v39 < 0 )
        LOBYTE(v39) = 0;
    }
    else
    {
      LOBYTE(v39) = -1;
    }
    *(_BYTE *)(result + 17) = v39;
    v40 = *(_WORD *)(v5 + 12);
    v41 = v40 + v56;
    if ( v40 + v56 <= 255 )
    {
      if ( v41 < 0 )
        LOBYTE(v41) = 0;
    }
    else
    {
      LOBYTE(v41) = -1;
    }
    *(_BYTE *)(result + 18) = v41;
    v42 = v40 - v55;
    if ( v40 - v55 <= 255 )
    {
      if ( v42 < 0 )
        LOBYTE(v42) = 0;
    }
    else
    {
      LOBYTE(v42) = -1;
    }
    *(_BYTE *)(result + 19) = v42;
    v43 = v49 + v40;
    if ( v43 <= 255 )
    {
      if ( v43 < 0 )
        LOBYTE(v43) = 0;
    }
    else
    {
      LOBYTE(v43) = -1;
    }
    *(_BYTE *)(result + 20) = v43;
    v44 = *(_WORD *)(v5 + 14);
    v45 = v44 + v56;
    if ( v44 + v56 <= 255 )
    {
      if ( v45 < 0 )
        LOBYTE(v45) = 0;
    }
    else
    {
      LOBYTE(v45) = -1;
    }
    *(_BYTE *)(result + 21) = v45;
    v46 = v44 - v55;
    if ( v44 - v55 <= 255 )
    {
      if ( v46 < 0 )
        LOBYTE(v46) = 0;
    }
    else
    {
      LOBYTE(v46) = -1;
    }
    *(_BYTE *)(result + 22) = v46;
    v47 = v49 + v44;
    if ( v47 <= 255 )
    {
      if ( v47 < 0 )
        LOBYTE(v47) = 0;
    }
    else
    {
      LOBYTE(v47) = -1;
    }
    v5 += 16;
    *(_BYTE *)(result + 23) = v47;
    result += a5;
    ++v48;
  }
  while ( v48 < 8 );
  return result;
}

//----- (0077DB60) --------------------------------------------------------
int __cdecl YCbCr_422_to_RGB_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5)
{
  sub_77D600(a1, a2, a3, a4, a5);
  return sub_77D600(a1 + 128, a2 + 8, a3 + 8, a4 + 24, a5);
}

//----- (0077DBD0) --------------------------------------------------------
signed int __cdecl YCbCr_422_to_RGB_MCU(int a1, int a2, int a3)
{
  int v3; // esi@1
  int v4; // ebp@1
  int v5; // ebx@1
  signed int result; // eax@1
  int v7; // edi@2
  int v8; // [sp+30h] [bp-74h]@1
  int v9; // [sp+34h] [bp-70h]@1
  int v10; // [sp+38h] [bp-6Ch]@1
  int v11; // [sp+3Ch] [bp-68h]@1
  char v12; // [sp+40h] [bp-64h]@1
  int v13; // [sp+50h] [bp-54h]@4
  int v14; // [sp+54h] [bp-50h]@4
  int v15; // [sp+58h] [bp-4Ch]@4
  int v16; // [sp+5Ch] [bp-48h]@4
  int v17; // [sp+60h] [bp-44h]@4
  int v18; // [sp+64h] [bp-40h]@4
  int v19; // [sp+68h] [bp-3Ch]@4
  int v20; // [sp+6Ch] [bp-38h]@4
  char v21; // [sp+70h] [bp-34h]@6
  int v22; // [sp+80h] [bp-24h]@6
  int v23; // [sp+84h] [bp-20h]@6
  int v24; // [sp+88h] [bp-1Ch]@6
  int v25; // [sp+8Ch] [bp-18h]@6

  v3 = *(_DWORD *)(a1 + 60);
  v4 = *(_DWORD *)(a1 + 18484);
  v5 = *(_DWORD *)(a1 + 14320);
  v8 = dword_B68988;
  v9 = dword_B6898C;
  v10 = dword_B68990;
  v11 = dword_B68994;
  result = sub_775560(
             a1 + 4,
             16,
             8,
             a2,
             a3,
             *(_DWORD *)(a1 + 48),
             v3,
             *(_DWORD *)(a1 + 32),
             *(_DWORD *)(a1 + 36),
             *(_DWORD *)(a1 + 40),
             (_DWORD *)(a1 + 14356),
             (int)&v12);
  if ( !result )
  {
    v7 = *(_DWORD *)(a1 + 14356);
    if ( (unsigned __int8)operator==((int)&v12, (int)&v8) )
    {
      result = (*(int (__cdecl **)(int, int, int, int, int))(v5 + 172))(v4, v4 + 256, v4 + 384, v7, v3);
    }
    else
    {
      operator&((int)&v13, (int)&v12, (int)&unk_B68938);
      v17 = v13;
      v18 = v14;
      v19 = v15;
      v20 = v16;
      if ( (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0) )
        sub_77D2F0(v4, v4 + 256, v4 + 384, v7, (int)&v17, v3);
      operator&((int)&v21, (int)&v12, (int)&unk_B68928);
      operator-((int)&v22, (int)&v21, (int)&unk_B68920);
      v17 = v22;
      v18 = v23;
      v19 = v24;
      v20 = v25;
      result = (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0);
      if ( (_BYTE)result )
        result = sub_77D2F0(v4 + 128, v4 + 264, v4 + 392, v7 + 24, (int)&v17, v3);
    }
  }
  return result;
}
// B68988: using guessed type int dword_B68988;
// B6898C: using guessed type int dword_B6898C;
// B68990: using guessed type int dword_B68990;
// B68994: using guessed type int dword_B68994;

//----- (0077DE20) --------------------------------------------------------
int __cdecl sub_77DE20(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int v6; // ecx@1
  int v7; // edx@1
  int v8; // ebx@1
  int result; // eax@1
  int v10; // ebp@2
  int v11; // edi@2
  int v12; // ebp@2
  int v13; // edi@2
  int v14; // ebp@2
  int v15; // edi@2
  int v16; // ebp@2
  int v17; // ebp@2
  int v18; // edi@2
  int v19; // ebp@3
  int *v20; // esi@3
  int v21; // ecx@3
  int v22; // edx@4
  int v23; // edi@5
  int v24; // eax@7
  int v25; // ecx@7
  char v26; // dl@8
  int v27; // ecx@11
  int v28; // ebp@11
  int v29; // esi@11
  int v30; // ebx@11
  int v31; // ebx@11
  char v32; // dl@12
  int v33; // eax@15
  __int16 v34; // [sp+0h] [bp-ECh]@2
  __int16 v35; // [sp+2h] [bp-EAh]@2
  __int16 v36; // [sp+4h] [bp-E8h]@2
  __int16 v37[29]; // [sp+6h] [bp-E6h]@2
  __int16 v38; // [sp+40h] [bp-ACh]@2
  __int16 v39; // [sp+42h] [bp-AAh]@2
  __int16 v40; // [sp+44h] [bp-A8h]@2
  __int16 v41[29]; // [sp+46h] [bp-A6h]@2
  __int16 v42; // [sp+80h] [bp-6Ch]@2
  __int16 v43; // [sp+82h] [bp-6Ah]@2
  __int16 v44; // [sp+84h] [bp-68h]@2
  __int16 v45[29]; // [sp+86h] [bp-66h]@2
  int v46; // [sp+C0h] [bp-2Ch]@1
  int v47; // [sp+C4h] [bp-28h]@6
  int v48; // [sp+C8h] [bp-24h]@6
  int v49; // [sp+CCh] [bp-20h]@6
  int v50; // [sp+D0h] [bp-1Ch]@6
  int v51; // [sp+D4h] [bp-18h]@7
  int v52; // [sp+D8h] [bp-14h]@7

  v6 = a2;
  v7 = a3;
  v8 = a4 + a6 * *(_DWORD *)(a5 + 4);
  result = 0;
  v46 = *(_DWORD *)(a5 + 4);
  do
  {
    v10 = *(_WORD *)v7;
    v11 = *(_WORD *)v6;
    *(&v34 + 4 * result) = (359 * v10 - 45813) >> 8;
    *(&v38 + 4 * result) = (88 * v11 + 183 * v10 - 34806) >> 8;
    *(&v42 + 4 * result) = (454 * v11 - 57937) >> 8;
    v12 = *(_WORD *)(v7 + 2);
    v13 = *(_WORD *)(v6 + 2);
    *(&v35 + 4 * result) = (359 * v12 - 45813) >> 8;
    *(&v39 + 4 * result) = (88 * v13 + 183 * v12 - 34806) >> 8;
    v14 = (454 * v13 - 57937) >> 8;
    v15 = *(_WORD *)(v6 + 4);
    *(&v43 + 4 * result) = v14;
    v16 = *(_WORD *)(v7 + 4);
    *(&v36 + 4 * result) = (359 * v16 - 45813) >> 8;
    *(&v40 + 4 * result) = (88 * v15 + 183 * v16 - 34806) >> 8;
    *(&v44 + 4 * result) = (454 * v15 - 57937) >> 8;
    v17 = *(_WORD *)(v7 + 6);
    v18 = *(_WORD *)(v6 + 6);
    v37[4 * result] = (359 * v17 - 45813) >> 8;
    v6 += 16;
    v41[4 * result] = (88 * v18 + 183 * v17 - 34806) >> 8;
    v7 += 16;
    v45[4 * result++] = (454 * v18 - 57937) >> 8;
  }
  while ( result < 8 );
  v19 = v46;
  v20 = (int *)a5;
  v21 = *(_DWORD *)(a5 + 12);
  if ( v46 < v21 )
  {
    v22 = *(_DWORD *)(a5 + 8);
    result = 16 * v46;
    do
    {
      v23 = *v20;
      if ( *v20 < v22 )
      {
        v48 = 2 * v19;
        v49 = a1 + result;
        v47 = result;
        v50 = v8;
        v46 = v19;
        do
        {
          v24 = *(_WORD *)(v49 + 2 * v23);
          v52 = ((signed int)(__CFADD__(v23, 2147483648) + v23 + 2147483648 + 2147483648) >> 1) + 2 * v48;
          v25 = v24 + *(&v42 + v52);
          v51 = v25;
          if ( v25 <= 255 )
          {
            v26 = v25;
            if ( v25 < 0 )
            {
              v26 = 0;
              v51 = 0;
            }
          }
          else
          {
            v26 = -1;
            v51 = 255;
          }
          v27 = 3 * v23;
          v28 = v50;
          v29 = v52;
          v30 = *(&v38 + v52);
          *(_BYTE *)(3 * v23 + v50) = v26;
          v31 = v24 - v30;
          v51 = v31;
          if ( v31 <= 255 )
          {
            v32 = v31;
            if ( v31 < 0 )
            {
              v32 = 0;
              v51 = 0;
            }
          }
          else
          {
            v32 = -1;
            v51 = 255;
          }
          v8 = v28;
          *(_BYTE *)(v27 + v28 + 1) = v32;
          v33 = *(&v34 + v29) + v24;
          if ( v33 <= 255 )
          {
            if ( v33 < 0 )
              LOBYTE(v33) = 0;
          }
          else
          {
            LOBYTE(v33) = -1;
          }
          ++v23;
          *(_BYTE *)(v27 + v28 + 2) = v33;
          v22 = *(_DWORD *)(a5 + 8);
        }
        while ( v23 < v22 );
        result = v47;
        v19 = v46;
        v20 = (int *)a5;
        v21 = *(_DWORD *)(a5 + 12);
      }
      v8 += a6;
      result += 16;
      ++v19;
    }
    while ( v19 < v21 );
  }
  return result;
}
// 77DE20: using guessed type __int16 var_E6[29];
// 77DE20: using guessed type __int16 var_A6[29];
// 77DE20: using guessed type __int16 var_66[29];

//----- (0077E140) --------------------------------------------------------
int __cdecl sub_77E140(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // edx@1
  int result; // eax@1
  int v7; // ebx@2
  int v8; // edi@2
  int v9; // ecx@2
  int v10; // edi@2
  int v11; // ebx@2
  int v12; // edi@2
  int v13; // ecx@2
  int v14; // edi@2
  int v15; // ebx@2
  int v16; // ecx@2
  int v17; // ebx@2
  int v18; // ebx@6
  int v19; // ecx@10
  int v20; // ecx@14
  int v21; // ebx@14
  int v22; // ebx@18
  int v23; // ecx@22
  int v24; // ecx@26
  int v25; // ebx@26
  int v26; // ebx@30
  int v27; // ecx@34
  int v28; // ecx@38
  int v29; // ebx@38
  int v30; // ebx@42
  int v31; // ecx@46
  int v32; // ecx@50
  int v33; // ebx@50
  int v34; // ebx@54
  int v35; // ecx@58
  int v36; // ecx@62
  int v37; // ebx@62
  int v38; // ebx@66
  int v39; // ecx@70
  int v40; // ecx@74
  int v41; // ebx@74
  int v42; // ebx@78
  int v43; // ecx@82
  int v44; // ecx@86
  int v45; // ebx@86
  int v46; // ebx@90
  int v47; // ecx@94
  signed int v48; // [sp+4h] [bp-50h]@1
  int v49; // [sp+8h] [bp-4Ch]@2
  int v50; // [sp+Ch] [bp-48h]@2
  int v51; // [sp+10h] [bp-44h]@2
  int v52; // [sp+14h] [bp-40h]@2
  int v53; // [sp+18h] [bp-3Ch]@1
  int v54; // [sp+1Ch] [bp-38h]@1
  int v55; // [sp+20h] [bp-34h]@2
  int v56; // [sp+24h] [bp-30h]@2
  int v57; // [sp+28h] [bp-2Ch]@2
  int v58; // [sp+2Ch] [bp-28h]@2
  int v59; // [sp+30h] [bp-24h]@2
  int v60; // [sp+34h] [bp-20h]@2
  int v61; // [sp+3Ch] [bp-18h]@2
  int v62; // [sp+40h] [bp-14h]@2

  v5 = a1;
  result = a4;
  v48 = 0;
  v54 = a3;
  v53 = a2;
  do
  {
    v7 = *(_WORD *)v54;
    v52 = (359 * v7 - 45813) >> 8;
    v8 = *(_WORD *)v53;
    v61 = (88 * v8 + 183 * v7 - 34806) >> 8;
    v9 = (454 * v8 - 57937) >> 8;
    v10 = *(_WORD *)(v54 + 2);
    v62 = v9;
    v51 = (359 * v10 - 45813) >> 8;
    v11 = *(_WORD *)(v53 + 2);
    v58 = (88 * v11 + 183 * v10 - 34806) >> 8;
    v12 = *(_WORD *)(v54 + 4);
    v60 = (454 * v11 - 57937) >> 8;
    v50 = (359 * v12 - 45813) >> 8;
    v13 = *(_WORD *)(v53 + 4);
    v56 = (88 * v13 + 183 * v12 - 34806) >> 8;
    v14 = *(_WORD *)(v54 + 6);
    v59 = (454 * v13 - 57937) >> 8;
    v49 = (359 * v14 - 45813) >> 8;
    v15 = *(_WORD *)(v53 + 6);
    v55 = (88 * v15 + 183 * v14 - 34806) >> 8;
    v57 = (454 * v15 - 57937) >> 8;
    v16 = *(_WORD *)v5;
    v17 = v62 + v16;
    v53 += 16;
    v54 += 16;
    if ( v62 + v16 <= 255 )
    {
      if ( v17 < 0 )
        LOBYTE(v17) = 0;
    }
    else
    {
      LOBYTE(v17) = -1;
    }
    *(_BYTE *)result = v17;
    v18 = v16 - v61;
    if ( v16 - v61 <= 255 )
    {
      if ( v18 < 0 )
        LOBYTE(v18) = 0;
    }
    else
    {
      LOBYTE(v18) = -1;
    }
    *(_BYTE *)(result + 1) = v18;
    v19 = v52 + v16;
    if ( v19 <= 255 )
    {
      if ( v19 < 0 )
        LOBYTE(v19) = 0;
    }
    else
    {
      LOBYTE(v19) = -1;
    }
    *(_BYTE *)(result + 2) = v19;
    v20 = *(_WORD *)(v5 + 2);
    v21 = v20 + v62;
    if ( v20 + v62 <= 255 )
    {
      if ( v21 < 0 )
        LOBYTE(v21) = 0;
    }
    else
    {
      LOBYTE(v21) = -1;
    }
    *(_BYTE *)(result + 3) = v21;
    v22 = v20 - v61;
    if ( v20 - v61 <= 255 )
    {
      if ( v22 < 0 )
        LOBYTE(v22) = 0;
    }
    else
    {
      LOBYTE(v22) = -1;
    }
    *(_BYTE *)(result + 4) = v22;
    v23 = v52 + v20;
    if ( v23 <= 255 )
    {
      if ( v23 < 0 )
        LOBYTE(v23) = 0;
    }
    else
    {
      LOBYTE(v23) = -1;
    }
    *(_BYTE *)(result + 5) = v23;
    v24 = *(_WORD *)(v5 + 4);
    v25 = v24 + v60;
    if ( v24 + v60 <= 255 )
    {
      if ( v25 < 0 )
        LOBYTE(v25) = 0;
    }
    else
    {
      LOBYTE(v25) = -1;
    }
    *(_BYTE *)(result + 6) = v25;
    v26 = v24 - v58;
    if ( v24 - v58 <= 255 )
    {
      if ( v26 < 0 )
        LOBYTE(v26) = 0;
    }
    else
    {
      LOBYTE(v26) = -1;
    }
    *(_BYTE *)(result + 7) = v26;
    v27 = v51 + v24;
    if ( v27 <= 255 )
    {
      if ( v27 < 0 )
        LOBYTE(v27) = 0;
    }
    else
    {
      LOBYTE(v27) = -1;
    }
    *(_BYTE *)(result + 8) = v27;
    v28 = *(_WORD *)(v5 + 6);
    v29 = v28 + v60;
    if ( v28 + v60 <= 255 )
    {
      if ( v29 < 0 )
        LOBYTE(v29) = 0;
    }
    else
    {
      LOBYTE(v29) = -1;
    }
    *(_BYTE *)(result + 9) = v29;
    v30 = v28 - v58;
    if ( v28 - v58 <= 255 )
    {
      if ( v30 < 0 )
        LOBYTE(v30) = 0;
    }
    else
    {
      LOBYTE(v30) = -1;
    }
    *(_BYTE *)(result + 10) = v30;
    v31 = v51 + v28;
    if ( v31 <= 255 )
    {
      if ( v31 < 0 )
        LOBYTE(v31) = 0;
    }
    else
    {
      LOBYTE(v31) = -1;
    }
    *(_BYTE *)(result + 11) = v31;
    v32 = *(_WORD *)(v5 + 8);
    v33 = v32 + v59;
    if ( v32 + v59 <= 255 )
    {
      if ( v33 < 0 )
        LOBYTE(v33) = 0;
    }
    else
    {
      LOBYTE(v33) = -1;
    }
    *(_BYTE *)(result + 12) = v33;
    v34 = v32 - v56;
    if ( v32 - v56 <= 255 )
    {
      if ( v34 < 0 )
        LOBYTE(v34) = 0;
    }
    else
    {
      LOBYTE(v34) = -1;
    }
    *(_BYTE *)(result + 13) = v34;
    v35 = v50 + v32;
    if ( v35 <= 255 )
    {
      if ( v35 < 0 )
        LOBYTE(v35) = 0;
    }
    else
    {
      LOBYTE(v35) = -1;
    }
    *(_BYTE *)(result + 14) = v35;
    v36 = *(_WORD *)(v5 + 10);
    v37 = v36 + v59;
    if ( v36 + v59 <= 255 )
    {
      if ( v37 < 0 )
        LOBYTE(v37) = 0;
    }
    else
    {
      LOBYTE(v37) = -1;
    }
    *(_BYTE *)(result + 15) = v37;
    v38 = v36 - v56;
    if ( v36 - v56 <= 255 )
    {
      if ( v38 < 0 )
        LOBYTE(v38) = 0;
    }
    else
    {
      LOBYTE(v38) = -1;
    }
    *(_BYTE *)(result + 16) = v38;
    v39 = v50 + v36;
    if ( v39 <= 255 )
    {
      if ( v39 < 0 )
        LOBYTE(v39) = 0;
    }
    else
    {
      LOBYTE(v39) = -1;
    }
    *(_BYTE *)(result + 17) = v39;
    v40 = *(_WORD *)(v5 + 12);
    v41 = v40 + v57;
    if ( v40 + v57 <= 255 )
    {
      if ( v41 < 0 )
        LOBYTE(v41) = 0;
    }
    else
    {
      LOBYTE(v41) = -1;
    }
    *(_BYTE *)(result + 18) = v41;
    v42 = v40 - v55;
    if ( v40 - v55 <= 255 )
    {
      if ( v42 < 0 )
        LOBYTE(v42) = 0;
    }
    else
    {
      LOBYTE(v42) = -1;
    }
    *(_BYTE *)(result + 19) = v42;
    v43 = v49 + v40;
    if ( v43 <= 255 )
    {
      if ( v43 < 0 )
        LOBYTE(v43) = 0;
    }
    else
    {
      LOBYTE(v43) = -1;
    }
    *(_BYTE *)(result + 20) = v43;
    v44 = *(_WORD *)(v5 + 14);
    v45 = v44 + v57;
    if ( v44 + v57 <= 255 )
    {
      if ( v45 < 0 )
        LOBYTE(v45) = 0;
    }
    else
    {
      LOBYTE(v45) = -1;
    }
    *(_BYTE *)(result + 21) = v45;
    v46 = v44 - v55;
    if ( v44 - v55 <= 255 )
    {
      if ( v46 < 0 )
        LOBYTE(v46) = 0;
    }
    else
    {
      LOBYTE(v46) = -1;
    }
    *(_BYTE *)(result + 22) = v46;
    v47 = v49 + v44;
    if ( v47 <= 255 )
    {
      if ( v47 < 0 )
        LOBYTE(v47) = 0;
    }
    else
    {
      LOBYTE(v47) = -1;
    }
    v5 += 16;
    *(_BYTE *)(result + 23) = v47;
    result += a5;
    ++v48;
  }
  while ( v48 < 8 );
  return result;
}

//----- (0077E6A0) --------------------------------------------------------
int __cdecl YCbCr_422_to_BGR_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5)
{
  sub_77E140(a1, a2, a3, a4, a5);
  return sub_77E140(a1 + 128, a2 + 8, a3 + 8, a4 + 24, a5);
}

//----- (0077E710) --------------------------------------------------------
signed int __cdecl YCbCr_422_to_BGR_MCU(int a1, int a2, int a3)
{
  int v3; // esi@1
  int v4; // ebp@1
  int v5; // ebx@1
  signed int result; // eax@1
  int v7; // edi@2
  int v8; // [sp+30h] [bp-74h]@1
  int v9; // [sp+34h] [bp-70h]@1
  int v10; // [sp+38h] [bp-6Ch]@1
  int v11; // [sp+3Ch] [bp-68h]@1
  char v12; // [sp+40h] [bp-64h]@1
  int v13; // [sp+50h] [bp-54h]@4
  int v14; // [sp+54h] [bp-50h]@4
  int v15; // [sp+58h] [bp-4Ch]@4
  int v16; // [sp+5Ch] [bp-48h]@4
  int v17; // [sp+60h] [bp-44h]@4
  int v18; // [sp+64h] [bp-40h]@4
  int v19; // [sp+68h] [bp-3Ch]@4
  int v20; // [sp+6Ch] [bp-38h]@4
  char v21; // [sp+70h] [bp-34h]@6
  int v22; // [sp+80h] [bp-24h]@6
  int v23; // [sp+84h] [bp-20h]@6
  int v24; // [sp+88h] [bp-1Ch]@6
  int v25; // [sp+8Ch] [bp-18h]@6

  v3 = *(_DWORD *)(a1 + 60);
  v4 = *(_DWORD *)(a1 + 18484);
  v5 = *(_DWORD *)(a1 + 14320);
  v8 = dword_B68998;
  v9 = dword_B6899C;
  v10 = dword_B689A0;
  v11 = dword_B689A4;
  result = sub_775560(
             a1 + 4,
             16,
             8,
             a2,
             a3,
             *(_DWORD *)(a1 + 48),
             v3,
             *(_DWORD *)(a1 + 32),
             *(_DWORD *)(a1 + 36),
             *(_DWORD *)(a1 + 40),
             (_DWORD *)(a1 + 14356),
             (int)&v12);
  if ( !result )
  {
    v7 = *(_DWORD *)(a1 + 14356);
    if ( (unsigned __int8)operator==((int)&v12, (int)&v8) )
    {
      result = (*(int (__cdecl **)(int, int, int, int, int))(v5 + 184))(v4, v4 + 256, v4 + 384, v7, v3);
    }
    else
    {
      operator&((int)&v13, (int)&v12, (int)&unk_B68938);
      v17 = v13;
      v18 = v14;
      v19 = v15;
      v20 = v16;
      if ( (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0) )
        sub_77DE20(v4, v4 + 256, v4 + 384, v7, (int)&v17, v3);
      operator&((int)&v21, (int)&v12, (int)&unk_B68928);
      operator-((int)&v22, (int)&v21, (int)&unk_B68920);
      v17 = v22;
      v18 = v23;
      v19 = v24;
      v20 = v25;
      result = (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0);
      if ( (_BYTE)result )
        result = sub_77DE20(v4 + 128, v4 + 264, v4 + 392, v7 + 24, (int)&v17, v3);
    }
  }
  return result;
}
// B68998: using guessed type int dword_B68998;
// B6899C: using guessed type int dword_B6899C;
// B689A0: using guessed type int dword_B689A0;
// B689A4: using guessed type int dword_B689A4;

//----- (0077E960) --------------------------------------------------------
void __cdecl sub_77E960(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int *v6; // edi@1
  int v7; // ebx@1
  int v8; // ebp@1
  int v9; // ecx@1
  int v10; // edx@2
  int v11; // eax@2
  int v12; // esi@3
  int v13; // ebp@4
  int v14; // eax@5
  int v15; // ebx@5
  int v16; // edi@5
  int v17; // ecx@5
  int v18; // edx@9
  int v19; // eax@13
  int v20; // [sp+4h] [bp-20h]@4
  int v21; // [sp+8h] [bp-1Ch]@4
  int v22; // [sp+10h] [bp-14h]@4

  v6 = (int *)a5;
  v7 = *(_DWORD *)(a5 + 4);
  v8 = *(_DWORD *)(a5 + 12);
  v9 = a4 + a6 * *(_DWORD *)(a5 + 4);
  if ( v7 < v8 )
  {
    v10 = *(_DWORD *)(a5 + 8);
    v11 = 8 * v7;
    do
    {
      v12 = *v6;
      if ( *v6 < v10 )
      {
        v13 = v12 + v11;
        v21 = v11;
        v22 = v9;
        v20 = v7;
        do
        {
          v14 = *(_WORD *)(a1 + 2 * v13);
          v15 = *(_WORD *)(a3 + 2 * v13);
          v16 = *(_WORD *)(a2 + 2 * v13);
          v17 = v14 + (signed __int16)((359 * v15 - 45813) >> 8);
          if ( v17 <= 255 )
          {
            if ( v17 < 0 )
              LOBYTE(v17) = 0;
          }
          else
          {
            LOBYTE(v17) = -1;
          }
          *(_BYTE *)(v22 + 4 * v12) = v17;
          v18 = v14 - (signed __int16)((88 * v16 + 183 * v15 - 34806) >> 8);
          if ( v18 <= 255 )
          {
            if ( v18 < 0 )
              LOBYTE(v18) = 0;
          }
          else
          {
            LOBYTE(v18) = -1;
          }
          *(_BYTE *)(v22 + 4 * v12 + 1) = v18;
          v19 = (signed __int16)((454 * v16 - 57937) >> 8) + v14;
          if ( v19 <= 255 )
          {
            if ( v19 < 0 )
              LOBYTE(v19) = 0;
          }
          else
          {
            LOBYTE(v19) = -1;
          }
          ++v13;
          *(_BYTE *)(v22 + 4 * v12 + 2) = v19;
          *(_BYTE *)(v22 + 4 * v12++ + 3) = -1;
          v10 = *(_DWORD *)(a5 + 8);
        }
        while ( v12 < v10 );
        v11 = v21;
        v9 = v22;
        v7 = v20;
        v6 = (int *)a5;
        v8 = *(_DWORD *)(a5 + 12);
      }
      v9 += a6;
      v11 += 8;
      ++v7;
    }
    while ( v7 < v8 );
  }
}

//----- (0077EAB0) --------------------------------------------------------
int __cdecl YCbCr_111_to_RGBA_FPX_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // edx@1
  int result; // eax@1
  int v7; // ebx@2
  int v8; // edi@2
  int v9; // ST28_4@2
  int v10; // ecx@2
  int v11; // ebx@2
  int v12; // ecx@2
  int v13; // edi@2
  int v14; // ecx@2
  int v15; // ebx@2
  int v16; // ecx@2
  int v17; // edi@2
  int v18; // ecx@2
  int v19; // ebx@2
  int v20; // ecx@2
  int v21; // edi@2
  int v22; // ecx@2
  int v23; // ebx@2
  int v24; // ecx@2
  int v25; // edi@2
  int v26; // ecx@2
  int v27; // ebx@2
  int v28; // ecx@2
  int v29; // edi@2
  int v30; // ecx@2
  int v31; // ebx@2
  int v32; // ecx@2
  int v33; // ebx@2
  int v34; // ecx@2
  int v35; // ecx@2
  int v36; // ebx@2
  int v37; // ebx@6
  int v38; // ecx@10
  int v39; // ecx@14
  int v40; // ebx@14
  int v41; // ebx@18
  int v42; // ecx@22
  int v43; // ecx@26
  int v44; // ebx@26
  int v45; // ebx@30
  int v46; // ecx@34
  int v47; // ecx@38
  int v48; // ebx@38
  int v49; // ebx@42
  int v50; // ecx@46
  int v51; // ecx@50
  int v52; // ebx@50
  int v53; // ebx@54
  int v54; // ecx@58
  int v55; // ecx@62
  int v56; // ebx@62
  int v57; // ebx@66
  int v58; // ecx@70
  int v59; // ecx@74
  int v60; // ebx@74
  int v61; // ebx@78
  int v62; // ecx@82
  int v63; // ecx@86
  int v64; // ebx@86
  int v65; // ebx@90
  int v66; // ecx@94
  signed int v67; // [sp+4h] [bp-78h]@1
  int v68; // [sp+8h] [bp-74h]@2
  int v69; // [sp+Ch] [bp-70h]@2
  int v70; // [sp+10h] [bp-6Ch]@2
  int v71; // [sp+14h] [bp-68h]@2
  int v72; // [sp+18h] [bp-64h]@2
  int v73; // [sp+20h] [bp-5Ch]@2
  int v74; // [sp+24h] [bp-58h]@2
  int v75; // [sp+2Ch] [bp-50h]@2
  int v76; // [sp+30h] [bp-4Ch]@2
  int v77; // [sp+34h] [bp-48h]@2
  int v78; // [sp+38h] [bp-44h]@2
  int v79; // [sp+3Ch] [bp-40h]@2
  int v80; // [sp+40h] [bp-3Ch]@2
  int v81; // [sp+44h] [bp-38h]@2
  int v82; // [sp+48h] [bp-34h]@2
  int v83; // [sp+4Ch] [bp-30h]@2
  int v84; // [sp+50h] [bp-2Ch]@2
  int v85; // [sp+54h] [bp-28h]@2
  int v86; // [sp+58h] [bp-24h]@2
  int v87; // [sp+5Ch] [bp-20h]@2
  int v88; // [sp+60h] [bp-1Ch]@2
  int v89; // [sp+64h] [bp-18h]@2
  int v90; // [sp+68h] [bp-14h]@1
  int v91; // [sp+6Ch] [bp-10h]@1

  v5 = a3;
  result = a4;
  v67 = 0;
  v91 = a2;
  v90 = a1;
  do
  {
    v7 = *(_WORD *)v5;
    v8 = *(_WORD *)v91;
    v9 = (359 * v7 - 45813) >> 8;
    v10 = (88 * v8 + 183 * v7 - 34806) >> 8;
    v11 = *(_WORD *)(v5 + 2);
    v89 = v10;
    v12 = (454 * v8 - 57937) >> 8;
    v13 = *(_WORD *)(v91 + 2);
    v68 = v12;
    v76 = (359 * v11 - 45813) >> 8;
    v14 = (88 * v13 + 183 * v11 - 34806) >> 8;
    v15 = *(_WORD *)(v5 + 4);
    v83 = v14;
    v16 = (454 * v13 - 57937) >> 8;
    v17 = *(_WORD *)(v91 + 4);
    v69 = v16;
    v77 = (359 * v15 - 45813) >> 8;
    v18 = (88 * v17 + 183 * v15 - 34806) >> 8;
    v19 = *(_WORD *)(v5 + 6);
    v86 = v18;
    v20 = (454 * v17 - 57937) >> 8;
    v21 = *(_WORD *)(v91 + 6);
    v70 = v20;
    v78 = (359 * v19 - 45813) >> 8;
    v22 = (88 * v21 + 183 * v19 - 34806) >> 8;
    v23 = *(_WORD *)(v5 + 8);
    v87 = v22;
    v24 = (454 * v21 - 57937) >> 8;
    v25 = *(_WORD *)(v91 + 8);
    v71 = v24;
    v79 = (359 * v23 - 45813) >> 8;
    v26 = (88 * v25 + 183 * v23 - 34806) >> 8;
    v27 = *(_WORD *)(v5 + 10);
    v88 = v26;
    v28 = (454 * v25 - 57937) >> 8;
    v29 = *(_WORD *)(v91 + 10);
    v72 = v28;
    v81 = (359 * v27 - 45813) >> 8;
    v85 = (88 * v29 + 183 * v27 - 34806) >> 8;
    v30 = *(_WORD *)(v5 + 12);
    v80 = (359 * v30 - 45813) >> 8;
    v31 = *(_WORD *)(v91 + 12);
    v84 = (88 * v31 + 183 * v30 - 34806) >> 8;
    v32 = (454 * v31 - 57937) >> 8;
    v33 = *(_WORD *)(v5 + 14);
    v73 = v32;
    v75 = (359 * v33 - 45813) >> 8;
    v34 = *(_WORD *)(v91 + 14);
    v82 = (88 * v34 + 183 * v33 - 34806) >> 8;
    v74 = (454 * v34 - 57937) >> 8;
    v35 = *(_WORD *)v90;
    v36 = v35 + v9;
    if ( v35 + v9 <= 255 )
    {
      if ( v36 < 0 )
        LOBYTE(v36) = 0;
    }
    else
    {
      LOBYTE(v36) = -1;
    }
    *(_BYTE *)result = v36;
    v37 = v35 - v89;
    if ( v35 - v89 <= 255 )
    {
      if ( v37 < 0 )
        LOBYTE(v37) = 0;
    }
    else
    {
      LOBYTE(v37) = -1;
    }
    *(_BYTE *)(result + 1) = v37;
    v38 = v68 + v35;
    if ( v38 <= 255 )
    {
      if ( v38 < 0 )
        LOBYTE(v38) = 0;
    }
    else
    {
      LOBYTE(v38) = -1;
    }
    *(_BYTE *)(result + 2) = v38;
    *(_BYTE *)(result + 3) = -1;
    v39 = *(_WORD *)(v90 + 2);
    v40 = v39 + v76;
    if ( v39 + v76 <= 255 )
    {
      if ( v40 < 0 )
        LOBYTE(v40) = 0;
    }
    else
    {
      LOBYTE(v40) = -1;
    }
    *(_BYTE *)(result + 4) = v40;
    v41 = v39 - v83;
    if ( v39 - v83 <= 255 )
    {
      if ( v41 < 0 )
        LOBYTE(v41) = 0;
    }
    else
    {
      LOBYTE(v41) = -1;
    }
    *(_BYTE *)(result + 5) = v41;
    v42 = v69 + v39;
    if ( v42 <= 255 )
    {
      if ( v42 < 0 )
        LOBYTE(v42) = 0;
    }
    else
    {
      LOBYTE(v42) = -1;
    }
    *(_BYTE *)(result + 6) = v42;
    *(_BYTE *)(result + 7) = -1;
    v43 = *(_WORD *)(v90 + 4);
    v44 = v43 + v77;
    if ( v43 + v77 <= 255 )
    {
      if ( v44 < 0 )
        LOBYTE(v44) = 0;
    }
    else
    {
      LOBYTE(v44) = -1;
    }
    *(_BYTE *)(result + 8) = v44;
    v45 = v43 - v86;
    if ( v43 - v86 <= 255 )
    {
      if ( v45 < 0 )
        LOBYTE(v45) = 0;
    }
    else
    {
      LOBYTE(v45) = -1;
    }
    *(_BYTE *)(result + 9) = v45;
    v46 = v70 + v43;
    if ( v46 <= 255 )
    {
      if ( v46 < 0 )
        LOBYTE(v46) = 0;
    }
    else
    {
      LOBYTE(v46) = -1;
    }
    *(_BYTE *)(result + 10) = v46;
    *(_BYTE *)(result + 11) = -1;
    v47 = *(_WORD *)(v90 + 6);
    v48 = v47 + v78;
    if ( v47 + v78 <= 255 )
    {
      if ( v48 < 0 )
        LOBYTE(v48) = 0;
    }
    else
    {
      LOBYTE(v48) = -1;
    }
    *(_BYTE *)(result + 12) = v48;
    v49 = v47 - v87;
    if ( v47 - v87 <= 255 )
    {
      if ( v49 < 0 )
        LOBYTE(v49) = 0;
    }
    else
    {
      LOBYTE(v49) = -1;
    }
    *(_BYTE *)(result + 13) = v49;
    v50 = v71 + v47;
    if ( v50 <= 255 )
    {
      if ( v50 < 0 )
        LOBYTE(v50) = 0;
    }
    else
    {
      LOBYTE(v50) = -1;
    }
    *(_BYTE *)(result + 14) = v50;
    *(_BYTE *)(result + 15) = -1;
    v51 = *(_WORD *)(v90 + 8);
    v52 = v51 + v79;
    if ( v51 + v79 <= 255 )
    {
      if ( v52 < 0 )
        LOBYTE(v52) = 0;
    }
    else
    {
      LOBYTE(v52) = -1;
    }
    *(_BYTE *)(result + 16) = v52;
    v53 = v51 - v88;
    if ( v51 - v88 <= 255 )
    {
      if ( v53 < 0 )
        LOBYTE(v53) = 0;
    }
    else
    {
      LOBYTE(v53) = -1;
    }
    *(_BYTE *)(result + 17) = v53;
    v54 = v72 + v51;
    if ( v54 <= 255 )
    {
      if ( v54 < 0 )
        LOBYTE(v54) = 0;
    }
    else
    {
      LOBYTE(v54) = -1;
    }
    *(_BYTE *)(result + 18) = v54;
    *(_BYTE *)(result + 19) = -1;
    v55 = *(_WORD *)(v90 + 10);
    v56 = v55 + v81;
    if ( v55 + v81 <= 255 )
    {
      if ( v56 < 0 )
        LOBYTE(v56) = 0;
    }
    else
    {
      LOBYTE(v56) = -1;
    }
    *(_BYTE *)(result + 20) = v56;
    v57 = v55 - v85;
    if ( v55 - v85 <= 255 )
    {
      if ( v57 < 0 )
        LOBYTE(v57) = 0;
    }
    else
    {
      LOBYTE(v57) = -1;
    }
    *(_BYTE *)(result + 21) = v57;
    v58 = ((454 * v29 - 57937) >> 8) + v55;
    if ( v58 <= 255 )
    {
      if ( v58 < 0 )
        LOBYTE(v58) = 0;
    }
    else
    {
      LOBYTE(v58) = -1;
    }
    *(_BYTE *)(result + 22) = v58;
    *(_BYTE *)(result + 23) = -1;
    v59 = *(_WORD *)(v90 + 12);
    v60 = v59 + v80;
    if ( v59 + v80 <= 255 )
    {
      if ( v60 < 0 )
        LOBYTE(v60) = 0;
    }
    else
    {
      LOBYTE(v60) = -1;
    }
    *(_BYTE *)(result + 24) = v60;
    v61 = v59 - v84;
    if ( v59 - v84 <= 255 )
    {
      if ( v61 < 0 )
        LOBYTE(v61) = 0;
    }
    else
    {
      LOBYTE(v61) = -1;
    }
    *(_BYTE *)(result + 25) = v61;
    v62 = v73 + v59;
    if ( v62 <= 255 )
    {
      if ( v62 < 0 )
        LOBYTE(v62) = 0;
    }
    else
    {
      LOBYTE(v62) = -1;
    }
    *(_BYTE *)(result + 26) = v62;
    *(_BYTE *)(result + 27) = -1;
    v63 = *(_WORD *)(v90 + 14);
    v64 = v63 + v75;
    if ( v63 + v75 <= 255 )
    {
      if ( v64 < 0 )
        LOBYTE(v64) = 0;
    }
    else
    {
      LOBYTE(v64) = -1;
    }
    *(_BYTE *)(result + 28) = v64;
    v65 = v63 - v82;
    if ( v63 - v82 <= 255 )
    {
      if ( v65 < 0 )
        LOBYTE(v65) = 0;
    }
    else
    {
      LOBYTE(v65) = -1;
    }
    *(_BYTE *)(result + 29) = v65;
    v66 = v74 + v63;
    if ( v66 <= 255 )
    {
      if ( v66 < 0 )
        LOBYTE(v66) = 0;
    }
    else
    {
      LOBYTE(v66) = -1;
    }
    v5 += 16;
    *(_BYTE *)(result + 30) = v66;
    *(_BYTE *)(result + 31) = -1;
    v90 += 16;
    v91 += 16;
    result += a5;
    ++v67;
  }
  while ( v67 < 8 );
  return result;
}

//----- (0077F160) --------------------------------------------------------
void __cdecl YCbCr_111_to_RGBA_FPX_MCU(int a1, int a2, int a3)
{
  int v3; // esi@1
  int v4; // ebp@1
  int v5; // ebx@1
  int v6; // edi@2
  int v7; // [sp+30h] [bp-54h]@1
  int v8; // [sp+34h] [bp-50h]@1
  int v9; // [sp+38h] [bp-4Ch]@1
  int v10; // [sp+3Ch] [bp-48h]@1
  char v11; // [sp+40h] [bp-44h]@1
  int v12; // [sp+50h] [bp-34h]@4
  int v13; // [sp+54h] [bp-30h]@4
  int v14; // [sp+58h] [bp-2Ch]@4
  int v15; // [sp+5Ch] [bp-28h]@4
  int v16; // [sp+60h] [bp-24h]@4
  int v17; // [sp+64h] [bp-20h]@4
  int v18; // [sp+68h] [bp-1Ch]@4
  int v19; // [sp+6Ch] [bp-18h]@4

  v3 = *(_DWORD *)(a1 + 60);
  v4 = *(_DWORD *)(a1 + 18484);
  v5 = *(_DWORD *)(a1 + 14320);
  v7 = dword_B689A8;
  v8 = dword_B689AC;
  v9 = dword_B689B0;
  v10 = dword_B689B4;
  if ( !sub_775560(
          a1 + 4,
          8,
          8,
          a2,
          a3,
          *(_DWORD *)(a1 + 48),
          v3,
          *(_DWORD *)(a1 + 32),
          *(_DWORD *)(a1 + 36),
          *(_DWORD *)(a1 + 40),
          (_DWORD *)(a1 + 14356),
          (int)&v11) )
  {
    v6 = *(_DWORD *)(a1 + 14356);
    if ( (unsigned __int8)operator==((int)&v11, (int)&v7) )
    {
      (*(void (__cdecl **)(int, int, int, int, int))(v5 + 192))(v4, v4 + 128, v4 + 256, v6, v3);
    }
    else
    {
      operator&((int)&v12, (int)&v11, (int)&unk_B68938);
      v16 = v12;
      v17 = v13;
      v18 = v14;
      v19 = v15;
      if ( (unsigned __int8)operator!=((int)&v16, (int)dword_B688E0) )
        sub_77E960(v4, v4 + 128, v4 + 256, v6, (int)&v16, v3);
    }
  }
}
// B689A8: using guessed type int dword_B689A8;
// B689AC: using guessed type int dword_B689AC;
// B689B0: using guessed type int dword_B689B0;
// B689B4: using guessed type int dword_B689B4;

//----- (0077F2F0) --------------------------------------------------------
int __cdecl sub_77F2F0(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int v6; // ecx@1
  int v7; // edx@1
  int v8; // ebx@1
  int result; // eax@1
  int v10; // ebp@2
  int v11; // edi@2
  int v12; // ebp@2
  int v13; // edi@2
  int v14; // ebp@2
  int v15; // edi@2
  int v16; // ebp@2
  int v17; // ebp@2
  int v18; // edi@2
  int v19; // ebp@3
  int *v20; // esi@3
  int v21; // ecx@3
  int v22; // edx@4
  int v23; // edi@5
  int v24; // eax@7
  int v25; // ecx@7
  int v26; // edx@7
  int v27; // edx@11
  int v28; // ecx@15
  int v29; // eax@15
  __int16 v30; // [sp+0h] [bp-E4h]@2
  __int16 v31; // [sp+2h] [bp-E2h]@2
  __int16 v32; // [sp+4h] [bp-E0h]@2
  __int16 v33[29]; // [sp+6h] [bp-DEh]@2
  __int16 v34; // [sp+40h] [bp-A4h]@2
  __int16 v35; // [sp+42h] [bp-A2h]@2
  __int16 v36; // [sp+44h] [bp-A0h]@2
  __int16 v37[29]; // [sp+46h] [bp-9Eh]@2
  __int16 v38; // [sp+80h] [bp-64h]@2
  __int16 v39; // [sp+82h] [bp-62h]@2
  __int16 v40; // [sp+84h] [bp-60h]@2
  __int16 v41[29]; // [sp+86h] [bp-5Eh]@2
  int v42; // [sp+C0h] [bp-24h]@1
  int v43; // [sp+C4h] [bp-20h]@6
  int v44; // [sp+C8h] [bp-1Ch]@6
  int v45; // [sp+CCh] [bp-18h]@6
  int v46; // [sp+D0h] [bp-14h]@6

  v6 = a2;
  v7 = a3;
  v8 = a4 + a6 * *(_DWORD *)(a5 + 4);
  result = 0;
  v42 = *(_DWORD *)(a5 + 4);
  do
  {
    v10 = *(_WORD *)v7;
    v11 = *(_WORD *)v6;
    *(&v30 + 4 * result) = (359 * v10 - 45813) >> 8;
    *(&v34 + 4 * result) = (88 * v11 + 183 * v10 - 34806) >> 8;
    *(&v38 + 4 * result) = (454 * v11 - 57937) >> 8;
    v12 = *(_WORD *)(v7 + 2);
    v13 = *(_WORD *)(v6 + 2);
    *(&v31 + 4 * result) = (359 * v12 - 45813) >> 8;
    *(&v35 + 4 * result) = (88 * v13 + 183 * v12 - 34806) >> 8;
    v14 = (454 * v13 - 57937) >> 8;
    v15 = *(_WORD *)(v6 + 4);
    *(&v39 + 4 * result) = v14;
    v16 = *(_WORD *)(v7 + 4);
    *(&v32 + 4 * result) = (359 * v16 - 45813) >> 8;
    *(&v36 + 4 * result) = (88 * v15 + 183 * v16 - 34806) >> 8;
    *(&v40 + 4 * result) = (454 * v15 - 57937) >> 8;
    v17 = *(_WORD *)(v7 + 6);
    v18 = *(_WORD *)(v6 + 6);
    v33[4 * result] = (359 * v17 - 45813) >> 8;
    v6 += 16;
    v37[4 * result] = (88 * v18 + 183 * v17 - 34806) >> 8;
    v7 += 16;
    v41[4 * result++] = (454 * v18 - 57937) >> 8;
  }
  while ( result < 8 );
  v19 = v42;
  v20 = (int *)a5;
  v21 = *(_DWORD *)(a5 + 12);
  if ( v42 < v21 )
  {
    v22 = *(_DWORD *)(a5 + 8);
    result = 16 * v42;
    do
    {
      v23 = *v20;
      if ( *v20 < v22 )
      {
        v44 = 2 * v19;
        v45 = a1 + result;
        v43 = result;
        v46 = v8;
        v42 = v19;
        do
        {
          v24 = *(_WORD *)(v45 + 2 * v23);
          v25 = ((signed int)(__CFADD__(v23, 2147483648) + v23 + 2147483648 + 2147483648) >> 1) + 2 * v44;
          v26 = v24 + *(&v30 + v25);
          if ( v26 <= 255 )
          {
            if ( v26 < 0 )
              LOBYTE(v26) = 0;
          }
          else
          {
            LOBYTE(v26) = -1;
          }
          v8 = v46;
          *(_BYTE *)(v46 + 4 * v23) = v26;
          v27 = v24 - *(&v34 + v25);
          if ( v27 <= 255 )
          {
            if ( v27 < 0 )
              LOBYTE(v27) = 0;
          }
          else
          {
            LOBYTE(v27) = -1;
          }
          v28 = *(&v38 + v25);
          *(_BYTE *)(v8 + 4 * v23 + 1) = v27;
          v29 = v28 + v24;
          if ( v29 <= 255 )
          {
            if ( v29 < 0 )
              LOBYTE(v29) = 0;
          }
          else
          {
            LOBYTE(v29) = -1;
          }
          *(_BYTE *)(v8 + 4 * v23 + 2) = v29;
          *(_BYTE *)(v8 + 4 * v23++ + 3) = -1;
          v22 = *(_DWORD *)(a5 + 8);
        }
        while ( v23 < v22 );
        result = v43;
        v19 = v42;
        v20 = (int *)a5;
        v21 = *(_DWORD *)(a5 + 12);
      }
      v8 += a6;
      result += 16;
      ++v19;
    }
    while ( v19 < v21 );
  }
  return result;
}
// 77F2F0: using guessed type __int16 var_DE[29];
// 77F2F0: using guessed type __int16 var_9E[29];
// 77F2F0: using guessed type __int16 var_5E[29];

//----- (0077F5D0) --------------------------------------------------------
int __cdecl sub_77F5D0(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // edx@1
  int result; // eax@1
  int v7; // edi@2
  int v8; // ebx@2
  int v9; // ecx@2
  int v10; // ebx@2
  int v11; // edi@2
  int v12; // ecx@2
  int v13; // ebx@2
  int v14; // ecx@2
  int v15; // ebx@2
  int v16; // ecx@2
  int v17; // ecx@2
  int v18; // ebx@2
  int v19; // ebx@6
  int v20; // ecx@10
  int v21; // ecx@14
  int v22; // ebx@14
  int v23; // ebx@18
  int v24; // ecx@22
  int v25; // ecx@26
  int v26; // ebx@26
  int v27; // ebx@30
  int v28; // ecx@34
  int v29; // ecx@38
  int v30; // ebx@38
  int v31; // ebx@42
  int v32; // ecx@46
  int v33; // ecx@50
  int v34; // ebx@50
  int v35; // ebx@54
  int v36; // ecx@58
  int v37; // ecx@62
  int v38; // ebx@62
  int v39; // ebx@66
  int v40; // ecx@70
  int v41; // ecx@74
  int v42; // ebx@74
  int v43; // ebx@78
  int v44; // ecx@82
  int v45; // ecx@86
  int v46; // ebx@86
  int v47; // ebx@90
  int v48; // ecx@94
  signed int v49; // [sp+4h] [bp-50h]@1
  int v50; // [sp+8h] [bp-4Ch]@2
  int v51; // [sp+Ch] [bp-48h]@2
  int v52; // [sp+10h] [bp-44h]@2
  int v53; // [sp+14h] [bp-40h]@2
  int v54; // [sp+18h] [bp-3Ch]@1
  int v55; // [sp+1Ch] [bp-38h]@1
  int v56; // [sp+20h] [bp-34h]@2
  int v57; // [sp+24h] [bp-30h]@2
  int v58; // [sp+28h] [bp-2Ch]@2
  int v59; // [sp+2Ch] [bp-28h]@2
  int v60; // [sp+30h] [bp-24h]@2
  int v61; // [sp+34h] [bp-20h]@2
  int v62; // [sp+3Ch] [bp-18h]@2
  int v63; // [sp+40h] [bp-14h]@2

  v5 = a1;
  result = a4;
  v49 = 0;
  v54 = a3;
  v55 = a2;
  do
  {
    v7 = *(_WORD *)v54;
    v63 = (359 * v7 - 45813) >> 8;
    v8 = *(_WORD *)v55;
    v62 = (88 * v8 + 183 * v7 - 34806) >> 8;
    v9 = (454 * v8 - 57937) >> 8;
    v10 = *(_WORD *)(v54 + 2);
    v53 = v9;
    v61 = (359 * v10 - 45813) >> 8;
    v11 = *(_WORD *)(v55 + 2);
    v60 = (88 * v11 + 183 * v10 - 34806) >> 8;
    v52 = (454 * v11 - 57937) >> 8;
    v12 = *(_WORD *)(v54 + 4);
    v59 = (359 * v12 - 45813) >> 8;
    v13 = *(_WORD *)(v55 + 4);
    v58 = (88 * v13 + 183 * v12 - 34806) >> 8;
    v14 = (454 * v13 - 57937) >> 8;
    v15 = *(_WORD *)(v54 + 6);
    v51 = v14;
    v57 = (359 * v15 - 45813) >> 8;
    v16 = *(_WORD *)(v55 + 6);
    v56 = (88 * v16 + 183 * v15 - 34806) >> 8;
    v50 = (454 * v16 - 57937) >> 8;
    v17 = *(_WORD *)v5;
    v18 = v63 + v17;
    if ( v63 + v17 <= 255 )
    {
      if ( v18 < 0 )
        LOBYTE(v18) = 0;
    }
    else
    {
      LOBYTE(v18) = -1;
    }
    *(_BYTE *)result = v18;
    v19 = v17 - v62;
    if ( v17 - v62 <= 255 )
    {
      if ( v19 < 0 )
        LOBYTE(v19) = 0;
    }
    else
    {
      LOBYTE(v19) = -1;
    }
    *(_BYTE *)(result + 1) = v19;
    v20 = v53 + v17;
    if ( v20 <= 255 )
    {
      if ( v20 < 0 )
        LOBYTE(v20) = 0;
    }
    else
    {
      LOBYTE(v20) = -1;
    }
    *(_BYTE *)(result + 2) = v20;
    *(_BYTE *)(result + 3) = -1;
    v21 = *(_WORD *)(v5 + 2);
    v22 = v21 + v63;
    if ( v21 + v63 <= 255 )
    {
      if ( v22 < 0 )
        LOBYTE(v22) = 0;
    }
    else
    {
      LOBYTE(v22) = -1;
    }
    *(_BYTE *)(result + 4) = v22;
    v23 = v21 - v62;
    if ( v21 - v62 <= 255 )
    {
      if ( v23 < 0 )
        LOBYTE(v23) = 0;
    }
    else
    {
      LOBYTE(v23) = -1;
    }
    *(_BYTE *)(result + 5) = v23;
    v24 = v53 + v21;
    if ( v24 <= 255 )
    {
      if ( v24 < 0 )
        LOBYTE(v24) = 0;
    }
    else
    {
      LOBYTE(v24) = -1;
    }
    *(_BYTE *)(result + 6) = v24;
    *(_BYTE *)(result + 7) = -1;
    v25 = *(_WORD *)(v5 + 4);
    v26 = v25 + v61;
    if ( v25 + v61 <= 255 )
    {
      if ( v26 < 0 )
        LOBYTE(v26) = 0;
    }
    else
    {
      LOBYTE(v26) = -1;
    }
    *(_BYTE *)(result + 8) = v26;
    v27 = v25 - v60;
    if ( v25 - v60 <= 255 )
    {
      if ( v27 < 0 )
        LOBYTE(v27) = 0;
    }
    else
    {
      LOBYTE(v27) = -1;
    }
    *(_BYTE *)(result + 9) = v27;
    v28 = v52 + v25;
    if ( v28 <= 255 )
    {
      if ( v28 < 0 )
        LOBYTE(v28) = 0;
    }
    else
    {
      LOBYTE(v28) = -1;
    }
    *(_BYTE *)(result + 10) = v28;
    *(_BYTE *)(result + 11) = -1;
    v29 = *(_WORD *)(v5 + 6);
    v30 = v29 + v61;
    if ( v29 + v61 <= 255 )
    {
      if ( v30 < 0 )
        LOBYTE(v30) = 0;
    }
    else
    {
      LOBYTE(v30) = -1;
    }
    *(_BYTE *)(result + 12) = v30;
    v31 = v29 - v60;
    if ( v29 - v60 <= 255 )
    {
      if ( v31 < 0 )
        LOBYTE(v31) = 0;
    }
    else
    {
      LOBYTE(v31) = -1;
    }
    *(_BYTE *)(result + 13) = v31;
    v32 = v52 + v29;
    if ( v32 <= 255 )
    {
      if ( v32 < 0 )
        LOBYTE(v32) = 0;
    }
    else
    {
      LOBYTE(v32) = -1;
    }
    *(_BYTE *)(result + 14) = v32;
    *(_BYTE *)(result + 15) = -1;
    v33 = *(_WORD *)(v5 + 8);
    v34 = v33 + v59;
    if ( v33 + v59 <= 255 )
    {
      if ( v34 < 0 )
        LOBYTE(v34) = 0;
    }
    else
    {
      LOBYTE(v34) = -1;
    }
    *(_BYTE *)(result + 16) = v34;
    v35 = v33 - v58;
    if ( v33 - v58 <= 255 )
    {
      if ( v35 < 0 )
        LOBYTE(v35) = 0;
    }
    else
    {
      LOBYTE(v35) = -1;
    }
    *(_BYTE *)(result + 17) = v35;
    v36 = v51 + v33;
    if ( v36 <= 255 )
    {
      if ( v36 < 0 )
        LOBYTE(v36) = 0;
    }
    else
    {
      LOBYTE(v36) = -1;
    }
    *(_BYTE *)(result + 18) = v36;
    *(_BYTE *)(result + 19) = -1;
    v37 = *(_WORD *)(v5 + 10);
    v38 = v37 + v59;
    if ( v37 + v59 <= 255 )
    {
      if ( v38 < 0 )
        LOBYTE(v38) = 0;
    }
    else
    {
      LOBYTE(v38) = -1;
    }
    *(_BYTE *)(result + 20) = v38;
    v39 = v37 - v58;
    if ( v37 - v58 <= 255 )
    {
      if ( v39 < 0 )
        LOBYTE(v39) = 0;
    }
    else
    {
      LOBYTE(v39) = -1;
    }
    *(_BYTE *)(result + 21) = v39;
    v40 = v51 + v37;
    if ( v40 <= 255 )
    {
      if ( v40 < 0 )
        LOBYTE(v40) = 0;
    }
    else
    {
      LOBYTE(v40) = -1;
    }
    *(_BYTE *)(result + 22) = v40;
    *(_BYTE *)(result + 23) = -1;
    v41 = *(_WORD *)(v5 + 12);
    v42 = v41 + v57;
    if ( v41 + v57 <= 255 )
    {
      if ( v42 < 0 )
        LOBYTE(v42) = 0;
    }
    else
    {
      LOBYTE(v42) = -1;
    }
    *(_BYTE *)(result + 24) = v42;
    v43 = v41 - v56;
    if ( v41 - v56 <= 255 )
    {
      if ( v43 < 0 )
        LOBYTE(v43) = 0;
    }
    else
    {
      LOBYTE(v43) = -1;
    }
    *(_BYTE *)(result + 25) = v43;
    v44 = v50 + v41;
    if ( v44 <= 255 )
    {
      if ( v44 < 0 )
        LOBYTE(v44) = 0;
    }
    else
    {
      LOBYTE(v44) = -1;
    }
    *(_BYTE *)(result + 26) = v44;
    *(_BYTE *)(result + 27) = -1;
    v45 = *(_WORD *)(v5 + 14);
    v46 = v45 + v57;
    if ( v45 + v57 <= 255 )
    {
      if ( v46 < 0 )
        LOBYTE(v46) = 0;
    }
    else
    {
      LOBYTE(v46) = -1;
    }
    *(_BYTE *)(result + 28) = v46;
    v47 = v45 - v56;
    if ( v45 - v56 <= 255 )
    {
      if ( v47 < 0 )
        LOBYTE(v47) = 0;
    }
    else
    {
      LOBYTE(v47) = -1;
    }
    *(_BYTE *)(result + 29) = v47;
    v48 = v50 + v45;
    if ( v48 <= 255 )
    {
      if ( v48 < 0 )
        LOBYTE(v48) = 0;
    }
    else
    {
      LOBYTE(v48) = -1;
    }
    v5 += 16;
    *(_BYTE *)(result + 30) = v48;
    *(_BYTE *)(result + 31) = -1;
    v55 += 16;
    v54 += 16;
    result += a5;
    ++v49;
  }
  while ( v49 < 8 );
  return result;
}

//----- (0077FB30) --------------------------------------------------------
int __cdecl YCbCr_422_to_RGBA_FPX_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5)
{
  sub_77F5D0(a1, a2, a3, a4, a5);
  return sub_77F5D0(a1 + 128, a2 + 8, a3 + 8, a4 + 32, a5);
}

//----- (0077FBA0) --------------------------------------------------------
signed int __cdecl YCbCr_422_to_RGBA_FPX_MCU(int a1, int a2, int a3)
{
  int v3; // esi@1
  int v4; // ebp@1
  int v5; // ebx@1
  signed int result; // eax@1
  int v7; // edi@2
  int v8; // [sp+30h] [bp-74h]@1
  int v9; // [sp+34h] [bp-70h]@1
  int v10; // [sp+38h] [bp-6Ch]@1
  int v11; // [sp+3Ch] [bp-68h]@1
  char v12; // [sp+40h] [bp-64h]@1
  int v13; // [sp+50h] [bp-54h]@4
  int v14; // [sp+54h] [bp-50h]@4
  int v15; // [sp+58h] [bp-4Ch]@4
  int v16; // [sp+5Ch] [bp-48h]@4
  int v17; // [sp+60h] [bp-44h]@4
  int v18; // [sp+64h] [bp-40h]@4
  int v19; // [sp+68h] [bp-3Ch]@4
  int v20; // [sp+6Ch] [bp-38h]@4
  char v21; // [sp+70h] [bp-34h]@6
  int v22; // [sp+80h] [bp-24h]@6
  int v23; // [sp+84h] [bp-20h]@6
  int v24; // [sp+88h] [bp-1Ch]@6
  int v25; // [sp+8Ch] [bp-18h]@6

  v3 = *(_DWORD *)(a1 + 60);
  v4 = *(_DWORD *)(a1 + 18484);
  v5 = *(_DWORD *)(a1 + 14320);
  v8 = dword_B689B8;
  v9 = dword_B689BC;
  v10 = dword_B689C0;
  v11 = dword_B689C4;
  result = sub_775560(
             a1 + 4,
             16,
             8,
             a2,
             a3,
             *(_DWORD *)(a1 + 48),
             v3,
             *(_DWORD *)(a1 + 32),
             *(_DWORD *)(a1 + 36),
             *(_DWORD *)(a1 + 40),
             (_DWORD *)(a1 + 14356),
             (int)&v12);
  if ( !result )
  {
    v7 = *(_DWORD *)(a1 + 14356);
    if ( (unsigned __int8)operator==((int)&v12, (int)&v8) )
    {
      result = (*(int (__cdecl **)(int, int, int, int, int))(v5 + 196))(v4, v4 + 256, v4 + 384, v7, v3);
    }
    else
    {
      operator&((int)&v13, (int)&v12, (int)&unk_B68938);
      v17 = v13;
      v18 = v14;
      v19 = v15;
      v20 = v16;
      if ( (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0) )
        sub_77F2F0(v4, v4 + 256, v4 + 384, v7, (int)&v17, v3);
      operator&((int)&v21, (int)&v12, (int)&unk_B68928);
      operator-((int)&v22, (int)&v21, (int)&unk_B68920);
      v17 = v22;
      v18 = v23;
      v19 = v24;
      v20 = v25;
      result = (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0);
      if ( (_BYTE)result )
        result = sub_77F2F0(v4 + 128, v4 + 264, v4 + 392, v7 + 32, (int)&v17, v3);
    }
  }
  return result;
}
// B689B8: using guessed type int dword_B689B8;
// B689BC: using guessed type int dword_B689BC;
// B689C0: using guessed type int dword_B689C0;
// B689C4: using guessed type int dword_B689C4;

//----- (0077FDF0) --------------------------------------------------------
int __cdecl sub_77FDF0(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int v6; // ecx@1
  int v7; // edx@1
  int v8; // ebx@1
  int result; // eax@1
  int v10; // ebp@2
  int v11; // edi@2
  int v12; // ebp@2
  int v13; // edi@2
  int v14; // ebp@2
  int v15; // edi@2
  int v16; // ebp@2
  int v17; // ebp@2
  int v18; // edi@2
  int v19; // ebp@3
  int *v20; // esi@3
  int v21; // ecx@3
  int v22; // edx@4
  int v23; // edi@5
  int v24; // eax@7
  int v25; // ecx@7
  int v26; // edx@7
  int v27; // edx@11
  int v28; // ecx@15
  int v29; // eax@15
  __int16 v30; // [sp+0h] [bp-84h]@2
  __int16 v31; // [sp+2h] [bp-82h]@2
  __int16 v32; // [sp+4h] [bp-80h]@2
  __int16 v33[13]; // [sp+6h] [bp-7Eh]@2
  __int16 v34; // [sp+20h] [bp-64h]@2
  __int16 v35; // [sp+22h] [bp-62h]@2
  __int16 v36; // [sp+24h] [bp-60h]@2
  __int16 v37[13]; // [sp+26h] [bp-5Eh]@2
  __int16 v38; // [sp+40h] [bp-44h]@2
  __int16 v39; // [sp+42h] [bp-42h]@2
  __int16 v40; // [sp+44h] [bp-40h]@2
  __int16 v41[13]; // [sp+46h] [bp-3Eh]@2
  int v42; // [sp+60h] [bp-24h]@1
  int v43; // [sp+64h] [bp-20h]@6
  int v44; // [sp+68h] [bp-1Ch]@6
  int v45; // [sp+6Ch] [bp-18h]@6
  int v46; // [sp+70h] [bp-14h]@6

  v6 = a2;
  v7 = a3;
  v8 = a4 + a6 * *(_DWORD *)(a5 + 4);
  result = 0;
  v42 = *(_DWORD *)(a5 + 4);
  do
  {
    v10 = *(_WORD *)v7;
    v11 = *(_WORD *)v6;
    *(&v30 + 4 * result) = (359 * v10 - 45813) >> 8;
    *(&v34 + 4 * result) = (88 * v11 + 183 * v10 - 34806) >> 8;
    *(&v38 + 4 * result) = (454 * v11 - 57937) >> 8;
    v12 = *(_WORD *)(v7 + 2);
    v13 = *(_WORD *)(v6 + 2);
    *(&v31 + 4 * result) = (359 * v12 - 45813) >> 8;
    *(&v35 + 4 * result) = (88 * v13 + 183 * v12 - 34806) >> 8;
    v14 = (454 * v13 - 57937) >> 8;
    v15 = *(_WORD *)(v6 + 4);
    *(&v39 + 4 * result) = v14;
    v16 = *(_WORD *)(v7 + 4);
    *(&v32 + 4 * result) = (359 * v16 - 45813) >> 8;
    *(&v36 + 4 * result) = (88 * v15 + 183 * v16 - 34806) >> 8;
    *(&v40 + 4 * result) = (454 * v15 - 57937) >> 8;
    v17 = *(_WORD *)(v7 + 6);
    v18 = *(_WORD *)(v6 + 6);
    v33[4 * result] = (359 * v17 - 45813) >> 8;
    v6 += 16;
    v37[4 * result] = (88 * v18 + 183 * v17 - 34806) >> 8;
    v7 += 16;
    v41[4 * result++] = (454 * v18 - 57937) >> 8;
  }
  while ( result < 4 );
  v19 = v42;
  v20 = (int *)a5;
  v21 = *(_DWORD *)(a5 + 12);
  if ( v42 < v21 )
  {
    v22 = *(_DWORD *)(a5 + 8);
    result = 16 * v42;
    do
    {
      v23 = *v20;
      if ( *v20 < v22 )
      {
        v44 = (signed int)(__CFADD__(v19, 2147483648) + v19 + 2147483648 + 2147483648) >> 1;
        v45 = a1 + result;
        v43 = result;
        v46 = v8;
        v42 = v19;
        do
        {
          v24 = *(_WORD *)(v45 + 2 * v23);
          v25 = ((signed int)(__CFADD__(v23, 2147483648) + v23 + 2147483648 + 2147483648) >> 1) + 4 * v44;
          v26 = v24 + *(&v30 + v25);
          if ( v26 <= 255 )
          {
            if ( v26 < 0 )
              LOBYTE(v26) = 0;
          }
          else
          {
            LOBYTE(v26) = -1;
          }
          v8 = v46;
          *(_BYTE *)(v46 + 4 * v23) = v26;
          v27 = v24 - *(&v34 + v25);
          if ( v27 <= 255 )
          {
            if ( v27 < 0 )
              LOBYTE(v27) = 0;
          }
          else
          {
            LOBYTE(v27) = -1;
          }
          v28 = *(&v38 + v25);
          *(_BYTE *)(v8 + 4 * v23 + 1) = v27;
          v29 = v28 + v24;
          if ( v29 <= 255 )
          {
            if ( v29 < 0 )
              LOBYTE(v29) = 0;
          }
          else
          {
            LOBYTE(v29) = -1;
          }
          *(_BYTE *)(v8 + 4 * v23 + 2) = v29;
          *(_BYTE *)(v8 + 4 * v23++ + 3) = -1;
          v22 = *(_DWORD *)(a5 + 8);
        }
        while ( v23 < v22 );
        result = v43;
        v19 = v42;
        v20 = (int *)a5;
        v21 = *(_DWORD *)(a5 + 12);
      }
      v8 += a6;
      result += 16;
      ++v19;
    }
    while ( v19 < v21 );
  }
  return result;
}
// 77FDF0: using guessed type __int16 var_7E[13];
// 77FDF0: using guessed type __int16 var_5E[13];
// 77FDF0: using guessed type __int16 var_3E[13];

//----- (007800B0) --------------------------------------------------------
int __cdecl sub_7800B0(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // edx@1
  int result; // eax@1
  int v7; // ebx@2
  int v8; // edi@2
  int v9; // ecx@2
  int v10; // edi@2
  int v11; // ebx@2
  int v12; // ecx@2
  int v13; // edi@2
  int v14; // ebx@2
  int v15; // ecx@2
  int v16; // ebx@2
  int v17; // ecx@2
  int v18; // ebx@2
  int v19; // ebx@6
  int v20; // ecx@10
  int v21; // ecx@14
  int v22; // ebx@14
  int v23; // ebx@18
  int v24; // ecx@22
  int v25; // ecx@26
  int v26; // ebx@26
  int v27; // ebx@30
  int v28; // ecx@34
  int v29; // ecx@38
  int v30; // ebx@38
  int v31; // ebx@42
  int v32; // ecx@46
  int v33; // ecx@50
  int v34; // ebx@50
  int v35; // ebx@54
  int v36; // ecx@58
  int v37; // ecx@62
  int v38; // ebx@62
  int v39; // ebx@66
  int v40; // ecx@70
  int v41; // ecx@74
  int v42; // ebx@74
  int v43; // ebx@78
  int v44; // ecx@82
  int v45; // ecx@86
  int v46; // ebx@86
  int v47; // ebx@90
  int v48; // ecx@94
  int v49; // eax@98
  int v50; // ecx@98
  int v51; // ebx@98
  int v52; // ebx@102
  int v53; // ecx@106
  int v54; // ecx@110
  int v55; // ebx@110
  int v56; // ebx@114
  int v57; // ecx@118
  int v58; // ecx@122
  int v59; // ebx@122
  int v60; // ebx@126
  int v61; // ecx@130
  int v62; // ecx@134
  int v63; // ebx@134
  int v64; // ebx@138
  int v65; // ecx@142
  int v66; // ecx@146
  int v67; // ebx@146
  int v68; // ebx@150
  int v69; // ecx@154
  int v70; // ecx@158
  int v71; // ebx@158
  int v72; // ebx@162
  int v73; // ecx@166
  int v74; // ecx@170
  int v75; // ebx@170
  int v76; // ebx@174
  int v77; // ecx@178
  int v78; // ecx@182
  int v79; // ebx@182
  int v80; // ebx@186
  int v81; // ecx@190
  signed int v82; // [sp+4h] [bp-48h]@1
  int v83; // [sp+8h] [bp-44h]@2
  int v84; // [sp+Ch] [bp-40h]@2
  int v85; // [sp+10h] [bp-3Ch]@2
  int v86; // [sp+14h] [bp-38h]@2
  int v87; // [sp+18h] [bp-34h]@1
  int v88; // [sp+1Ch] [bp-30h]@1
  int v89; // [sp+20h] [bp-2Ch]@2
  int v90; // [sp+24h] [bp-28h]@2
  int v91; // [sp+28h] [bp-24h]@2
  int v92; // [sp+2Ch] [bp-20h]@2
  int v93; // [sp+30h] [bp-1Ch]@2
  int v94; // [sp+34h] [bp-18h]@2
  int v95; // [sp+38h] [bp-14h]@2
  int v96; // [sp+3Ch] [bp-10h]@2

  v5 = a1;
  result = a4;
  v82 = 0;
  v87 = a3;
  v88 = a2;
  do
  {
    v7 = *(_WORD *)v87;
    v96 = (359 * v7 - 45813) >> 8;
    v8 = *(_WORD *)v88;
    v93 = (88 * v8 + 183 * v7 - 34806) >> 8;
    v9 = (454 * v8 - 57937) >> 8;
    v10 = *(_WORD *)(v88 + 2);
    v86 = v9;
    v11 = *(_WORD *)(v87 + 2);
    v95 = (359 * v11 - 45813) >> 8;
    v91 = (88 * v10 + 183 * v11 - 34806) >> 8;
    v12 = (454 * v10 - 57937) >> 8;
    v13 = *(_WORD *)(v88 + 4);
    v85 = v12;
    v14 = *(_WORD *)(v87 + 4);
    v94 = (359 * v14 - 45813) >> 8;
    v90 = (88 * v13 + 183 * v14 - 34806) >> 8;
    v84 = (454 * v13 - 57937) >> 8;
    v15 = *(_WORD *)(v87 + 6);
    v92 = (359 * v15 - 45813) >> 8;
    v16 = *(_WORD *)(v88 + 6);
    v89 = (88 * v16 + 183 * v15 - 34806) >> 8;
    v83 = (454 * v16 - 57937) >> 8;
    v17 = *(_WORD *)v5;
    v18 = v96 + v17;
    v88 += 16;
    v87 += 16;
    if ( v96 + v17 <= 255 )
    {
      if ( v18 < 0 )
        LOBYTE(v18) = 0;
    }
    else
    {
      LOBYTE(v18) = -1;
    }
    *(_BYTE *)result = v18;
    v19 = v17 - v93;
    if ( v17 - v93 <= 255 )
    {
      if ( v19 < 0 )
        LOBYTE(v19) = 0;
    }
    else
    {
      LOBYTE(v19) = -1;
    }
    *(_BYTE *)(result + 1) = v19;
    v20 = v86 + v17;
    if ( v20 <= 255 )
    {
      if ( v20 < 0 )
        LOBYTE(v20) = 0;
    }
    else
    {
      LOBYTE(v20) = -1;
    }
    *(_BYTE *)(result + 2) = v20;
    *(_BYTE *)(result + 3) = -1;
    v21 = *(_WORD *)(v5 + 2);
    v22 = v96 + v21;
    if ( v96 + v21 <= 255 )
    {
      if ( v22 < 0 )
        LOBYTE(v22) = 0;
    }
    else
    {
      LOBYTE(v22) = -1;
    }
    *(_BYTE *)(result + 4) = v22;
    v23 = v21 - v93;
    if ( v21 - v93 <= 255 )
    {
      if ( v23 < 0 )
        LOBYTE(v23) = 0;
    }
    else
    {
      LOBYTE(v23) = -1;
    }
    *(_BYTE *)(result + 5) = v23;
    v24 = v86 + v21;
    if ( v24 <= 255 )
    {
      if ( v24 < 0 )
        LOBYTE(v24) = 0;
    }
    else
    {
      LOBYTE(v24) = -1;
    }
    *(_BYTE *)(result + 6) = v24;
    *(_BYTE *)(result + 7) = -1;
    v25 = *(_WORD *)(v5 + 4);
    v26 = v25 + v95;
    if ( v25 + v95 <= 255 )
    {
      if ( v26 < 0 )
        LOBYTE(v26) = 0;
    }
    else
    {
      LOBYTE(v26) = -1;
    }
    *(_BYTE *)(result + 8) = v26;
    v27 = v25 - v91;
    if ( v25 - v91 <= 255 )
    {
      if ( v27 < 0 )
        LOBYTE(v27) = 0;
    }
    else
    {
      LOBYTE(v27) = -1;
    }
    *(_BYTE *)(result + 9) = v27;
    v28 = v85 + v25;
    if ( v28 <= 255 )
    {
      if ( v28 < 0 )
        LOBYTE(v28) = 0;
    }
    else
    {
      LOBYTE(v28) = -1;
    }
    *(_BYTE *)(result + 10) = v28;
    *(_BYTE *)(result + 11) = -1;
    v29 = *(_WORD *)(v5 + 6);
    v30 = v29 + v95;
    if ( v29 + v95 <= 255 )
    {
      if ( v30 < 0 )
        LOBYTE(v30) = 0;
    }
    else
    {
      LOBYTE(v30) = -1;
    }
    *(_BYTE *)(result + 12) = v30;
    v31 = v29 - v91;
    if ( v29 - v91 <= 255 )
    {
      if ( v31 < 0 )
        LOBYTE(v31) = 0;
    }
    else
    {
      LOBYTE(v31) = -1;
    }
    *(_BYTE *)(result + 13) = v31;
    v32 = v85 + v29;
    if ( v32 <= 255 )
    {
      if ( v32 < 0 )
        LOBYTE(v32) = 0;
    }
    else
    {
      LOBYTE(v32) = -1;
    }
    *(_BYTE *)(result + 14) = v32;
    *(_BYTE *)(result + 15) = -1;
    v33 = *(_WORD *)(v5 + 8);
    v34 = v33 + v94;
    if ( v33 + v94 <= 255 )
    {
      if ( v34 < 0 )
        LOBYTE(v34) = 0;
    }
    else
    {
      LOBYTE(v34) = -1;
    }
    *(_BYTE *)(result + 16) = v34;
    v35 = v33 - v90;
    if ( v33 - v90 <= 255 )
    {
      if ( v35 < 0 )
        LOBYTE(v35) = 0;
    }
    else
    {
      LOBYTE(v35) = -1;
    }
    *(_BYTE *)(result + 17) = v35;
    v36 = v84 + v33;
    if ( v36 <= 255 )
    {
      if ( v36 < 0 )
        LOBYTE(v36) = 0;
    }
    else
    {
      LOBYTE(v36) = -1;
    }
    *(_BYTE *)(result + 18) = v36;
    *(_BYTE *)(result + 19) = -1;
    v37 = *(_WORD *)(v5 + 10);
    v38 = v37 + v94;
    if ( v37 + v94 <= 255 )
    {
      if ( v38 < 0 )
        LOBYTE(v38) = 0;
    }
    else
    {
      LOBYTE(v38) = -1;
    }
    *(_BYTE *)(result + 20) = v38;
    v39 = v37 - v90;
    if ( v37 - v90 <= 255 )
    {
      if ( v39 < 0 )
        LOBYTE(v39) = 0;
    }
    else
    {
      LOBYTE(v39) = -1;
    }
    *(_BYTE *)(result + 21) = v39;
    v40 = v84 + v37;
    if ( v40 <= 255 )
    {
      if ( v40 < 0 )
        LOBYTE(v40) = 0;
    }
    else
    {
      LOBYTE(v40) = -1;
    }
    *(_BYTE *)(result + 22) = v40;
    *(_BYTE *)(result + 23) = -1;
    v41 = *(_WORD *)(v5 + 12);
    v42 = v41 + v92;
    if ( v41 + v92 <= 255 )
    {
      if ( v42 < 0 )
        LOBYTE(v42) = 0;
    }
    else
    {
      LOBYTE(v42) = -1;
    }
    *(_BYTE *)(result + 24) = v42;
    v43 = v41 - v89;
    if ( v41 - v89 <= 255 )
    {
      if ( v43 < 0 )
        LOBYTE(v43) = 0;
    }
    else
    {
      LOBYTE(v43) = -1;
    }
    *(_BYTE *)(result + 25) = v43;
    v44 = v83 + v41;
    if ( v44 <= 255 )
    {
      if ( v44 < 0 )
        LOBYTE(v44) = 0;
    }
    else
    {
      LOBYTE(v44) = -1;
    }
    *(_BYTE *)(result + 26) = v44;
    *(_BYTE *)(result + 27) = -1;
    v45 = *(_WORD *)(v5 + 14);
    v46 = v45 + v92;
    if ( v45 + v92 <= 255 )
    {
      if ( v46 < 0 )
        LOBYTE(v46) = 0;
    }
    else
    {
      LOBYTE(v46) = -1;
    }
    *(_BYTE *)(result + 28) = v46;
    v47 = v45 - v89;
    if ( v45 - v89 <= 255 )
    {
      if ( v47 < 0 )
        LOBYTE(v47) = 0;
    }
    else
    {
      LOBYTE(v47) = -1;
    }
    *(_BYTE *)(result + 29) = v47;
    v48 = v83 + v45;
    if ( v48 <= 255 )
    {
      if ( v48 < 0 )
        LOBYTE(v48) = 0;
    }
    else
    {
      LOBYTE(v48) = -1;
    }
    *(_BYTE *)(result + 30) = v48;
    *(_BYTE *)(result + 31) = -1;
    v49 = a5 + result;
    v50 = *(_WORD *)(v5 + 16);
    v51 = v96 + v50;
    if ( v96 + v50 <= 255 )
    {
      if ( v51 < 0 )
        LOBYTE(v51) = 0;
    }
    else
    {
      LOBYTE(v51) = -1;
    }
    *(_BYTE *)v49 = v51;
    v52 = v50 - v93;
    if ( v50 - v93 <= 255 )
    {
      if ( v52 < 0 )
        LOBYTE(v52) = 0;
    }
    else
    {
      LOBYTE(v52) = -1;
    }
    *(_BYTE *)(v49 + 1) = v52;
    v53 = v86 + v50;
    if ( v53 <= 255 )
    {
      if ( v53 < 0 )
        LOBYTE(v53) = 0;
    }
    else
    {
      LOBYTE(v53) = -1;
    }
    *(_BYTE *)(v49 + 2) = v53;
    *(_BYTE *)(v49 + 3) = -1;
    v54 = *(_WORD *)(v5 + 18);
    v55 = v54 + v96;
    if ( v54 + v96 <= 255 )
    {
      if ( v55 < 0 )
        LOBYTE(v55) = 0;
    }
    else
    {
      LOBYTE(v55) = -1;
    }
    *(_BYTE *)(v49 + 4) = v55;
    v56 = v54 - v93;
    if ( v54 - v93 <= 255 )
    {
      if ( v56 < 0 )
        LOBYTE(v56) = 0;
    }
    else
    {
      LOBYTE(v56) = -1;
    }
    *(_BYTE *)(v49 + 5) = v56;
    v57 = v86 + v54;
    if ( v57 <= 255 )
    {
      if ( v57 < 0 )
        LOBYTE(v57) = 0;
    }
    else
    {
      LOBYTE(v57) = -1;
    }
    *(_BYTE *)(v49 + 6) = v57;
    *(_BYTE *)(v49 + 7) = -1;
    v58 = *(_WORD *)(v5 + 20);
    v59 = v58 + v95;
    if ( v58 + v95 <= 255 )
    {
      if ( v59 < 0 )
        LOBYTE(v59) = 0;
    }
    else
    {
      LOBYTE(v59) = -1;
    }
    *(_BYTE *)(v49 + 8) = v59;
    v60 = v58 - v91;
    if ( v58 - v91 <= 255 )
    {
      if ( v60 < 0 )
        LOBYTE(v60) = 0;
    }
    else
    {
      LOBYTE(v60) = -1;
    }
    *(_BYTE *)(v49 + 9) = v60;
    v61 = v85 + v58;
    if ( v61 <= 255 )
    {
      if ( v61 < 0 )
        LOBYTE(v61) = 0;
    }
    else
    {
      LOBYTE(v61) = -1;
    }
    *(_BYTE *)(v49 + 10) = v61;
    *(_BYTE *)(v49 + 11) = -1;
    v62 = *(_WORD *)(v5 + 22);
    v63 = v62 + v95;
    if ( v62 + v95 <= 255 )
    {
      if ( v63 < 0 )
        LOBYTE(v63) = 0;
    }
    else
    {
      LOBYTE(v63) = -1;
    }
    *(_BYTE *)(v49 + 12) = v63;
    v64 = v62 - v91;
    if ( v62 - v91 <= 255 )
    {
      if ( v64 < 0 )
        LOBYTE(v64) = 0;
    }
    else
    {
      LOBYTE(v64) = -1;
    }
    *(_BYTE *)(v49 + 13) = v64;
    v65 = v85 + v62;
    if ( v65 <= 255 )
    {
      if ( v65 < 0 )
        LOBYTE(v65) = 0;
    }
    else
    {
      LOBYTE(v65) = -1;
    }
    *(_BYTE *)(v49 + 14) = v65;
    *(_BYTE *)(v49 + 15) = -1;
    v66 = *(_WORD *)(v5 + 24);
    v67 = v66 + v94;
    if ( v66 + v94 <= 255 )
    {
      if ( v67 < 0 )
        LOBYTE(v67) = 0;
    }
    else
    {
      LOBYTE(v67) = -1;
    }
    *(_BYTE *)(v49 + 16) = v67;
    v68 = v66 - v90;
    if ( v66 - v90 <= 255 )
    {
      if ( v68 < 0 )
        LOBYTE(v68) = 0;
    }
    else
    {
      LOBYTE(v68) = -1;
    }
    *(_BYTE *)(v49 + 17) = v68;
    v69 = v84 + v66;
    if ( v69 <= 255 )
    {
      if ( v69 < 0 )
        LOBYTE(v69) = 0;
    }
    else
    {
      LOBYTE(v69) = -1;
    }
    *(_BYTE *)(v49 + 18) = v69;
    *(_BYTE *)(v49 + 19) = -1;
    v70 = *(_WORD *)(v5 + 26);
    v71 = v70 + v94;
    if ( v70 + v94 <= 255 )
    {
      if ( v71 < 0 )
        LOBYTE(v71) = 0;
    }
    else
    {
      LOBYTE(v71) = -1;
    }
    *(_BYTE *)(v49 + 20) = v71;
    v72 = v70 - v90;
    if ( v70 - v90 <= 255 )
    {
      if ( v72 < 0 )
        LOBYTE(v72) = 0;
    }
    else
    {
      LOBYTE(v72) = -1;
    }
    *(_BYTE *)(v49 + 21) = v72;
    v73 = v84 + v70;
    if ( v73 <= 255 )
    {
      if ( v73 < 0 )
        LOBYTE(v73) = 0;
    }
    else
    {
      LOBYTE(v73) = -1;
    }
    *(_BYTE *)(v49 + 22) = v73;
    *(_BYTE *)(v49 + 23) = -1;
    v74 = *(_WORD *)(v5 + 28);
    v75 = v74 + v92;
    if ( v74 + v92 <= 255 )
    {
      if ( v75 < 0 )
        LOBYTE(v75) = 0;
    }
    else
    {
      LOBYTE(v75) = -1;
    }
    *(_BYTE *)(v49 + 24) = v75;
    v76 = v74 - v89;
    if ( v74 - v89 <= 255 )
    {
      if ( v76 < 0 )
        LOBYTE(v76) = 0;
    }
    else
    {
      LOBYTE(v76) = -1;
    }
    *(_BYTE *)(v49 + 25) = v76;
    v77 = v83 + v74;
    if ( v77 <= 255 )
    {
      if ( v77 < 0 )
        LOBYTE(v77) = 0;
    }
    else
    {
      LOBYTE(v77) = -1;
    }
    *(_BYTE *)(v49 + 26) = v77;
    *(_BYTE *)(v49 + 27) = -1;
    v78 = *(_WORD *)(v5 + 30);
    v79 = v78 + v92;
    if ( v78 + v92 <= 255 )
    {
      if ( v79 < 0 )
        LOBYTE(v79) = 0;
    }
    else
    {
      LOBYTE(v79) = -1;
    }
    *(_BYTE *)(v49 + 28) = v79;
    v80 = v78 - v89;
    if ( v78 - v89 <= 255 )
    {
      if ( v80 < 0 )
        LOBYTE(v80) = 0;
    }
    else
    {
      LOBYTE(v80) = -1;
    }
    *(_BYTE *)(v49 + 29) = v80;
    v81 = v83 + v78;
    if ( v81 <= 255 )
    {
      if ( v81 < 0 )
        LOBYTE(v81) = 0;
    }
    else
    {
      LOBYTE(v81) = -1;
    }
    v5 += 32;
    *(_BYTE *)(v49 + 30) = v81;
    *(_BYTE *)(v49 + 31) = -1;
    result = a5 + v49;
    v82 += 2;
  }
  while ( v82 < 8 );
  return result;
}

//----- (00780970) --------------------------------------------------------
int __cdecl YCbCr_411_to_RGBA_FPX_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // edi@1

  sub_7800B0(a1, a2, a3, a4, a5);
  sub_7800B0(a1 + 128, a2 + 8, a3 + 8, a4 + 32, a5);
  v5 = a4 + 8 * a5;
  sub_7800B0(a1 + 256, a2 + 64, a3 + 64, v5, a5);
  return sub_7800B0(a1 + 384, a2 + 72, a3 + 72, v5 + 32, a5);
}

//----- (00780A30) --------------------------------------------------------
signed int __cdecl YCbCr_411_to_RGBA_FPX_MCU(int a1, int a2, int a3)
{
  int v3; // esi@1
  int v4; // ebp@1
  int v5; // ebx@1
  signed int result; // eax@1
  int v7; // edi@2
  int v8; // [sp+30h] [bp-B4h]@1
  int v9; // [sp+34h] [bp-B0h]@1
  int v10; // [sp+38h] [bp-ACh]@1
  int v11; // [sp+3Ch] [bp-A8h]@1
  char v12; // [sp+40h] [bp-A4h]@1
  int v13; // [sp+50h] [bp-94h]@4
  int v14; // [sp+54h] [bp-90h]@4
  int v15; // [sp+58h] [bp-8Ch]@4
  int v16; // [sp+5Ch] [bp-88h]@4
  int v17; // [sp+60h] [bp-84h]@4
  int v18; // [sp+64h] [bp-80h]@4
  int v19; // [sp+68h] [bp-7Ch]@4
  int v20; // [sp+6Ch] [bp-78h]@4
  char v21; // [sp+70h] [bp-74h]@6
  int v22; // [sp+80h] [bp-64h]@6
  int v23; // [sp+84h] [bp-60h]@6
  int v24; // [sp+88h] [bp-5Ch]@6
  int v25; // [sp+8Ch] [bp-58h]@6
  char v26; // [sp+90h] [bp-54h]@8
  int v27; // [sp+A0h] [bp-44h]@8
  int v28; // [sp+A4h] [bp-40h]@8
  int v29; // [sp+A8h] [bp-3Ch]@8
  int v30; // [sp+ACh] [bp-38h]@8
  char v31; // [sp+B0h] [bp-34h]@10
  int v32; // [sp+C0h] [bp-24h]@10
  int v33; // [sp+C4h] [bp-20h]@10
  int v34; // [sp+C8h] [bp-1Ch]@10
  int v35; // [sp+CCh] [bp-18h]@10

  v3 = *(_DWORD *)(a1 + 60);
  v4 = *(_DWORD *)(a1 + 18484);
  v5 = *(_DWORD *)(a1 + 14320);
  v8 = dword_B689C8;
  v9 = dword_B689CC;
  v10 = dword_B689D0;
  v11 = dword_B689D4;
  result = sub_775560(
             a1 + 4,
             16,
             16,
             a2,
             a3,
             *(_DWORD *)(a1 + 48),
             v3,
             *(_DWORD *)(a1 + 32),
             *(_DWORD *)(a1 + 36),
             *(_DWORD *)(a1 + 40),
             (_DWORD *)(a1 + 14356),
             (int)&v12);
  if ( !result )
  {
    v7 = *(_DWORD *)(a1 + 14356);
    if ( (unsigned __int8)operator==((int)&v12, (int)&v8) )
    {
      result = (*(int (__cdecl **)(int, int, int, int, int))(v5 + 200))(v4, v4 + 512, v4 + 640, v7, v3);
    }
    else
    {
      operator&((int)&v13, (int)&v12, (int)&unk_B68938);
      v17 = v13;
      v18 = v14;
      v19 = v15;
      v20 = v16;
      if ( (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0) )
        sub_77FDF0(v4, v4 + 512, v4 + 640, v7, (int)&v17, v3);
      operator&((int)&v21, (int)&v12, (int)&unk_B68928);
      operator-((int)&v22, (int)&v21, (int)&unk_B68920);
      v17 = v22;
      v18 = v23;
      v19 = v24;
      v20 = v25;
      if ( (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0) )
        sub_77FDF0(v4 + 128, v4 + 520, v4 + 648, v7 + 32, (int)&v17, v3);
      operator&((int)&v26, (int)&v12, (int)&unk_B68910);
      operator-((int)&v27, (int)&v26, (int)&unk_B68908);
      v17 = v27;
      v18 = v28;
      v19 = v29;
      v20 = v30;
      if ( (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0) )
        sub_77FDF0(v4 + 256, v4 + 576, v4 + 704, v7 + 8 * v3, (int)&v17, v3);
      operator&((int)&v31, (int)&v12, (int)&unk_B688F8);
      operator-((int)&v32, (int)&v31, (int)&unk_B688F0);
      v17 = v32;
      v18 = v33;
      v19 = v34;
      v20 = v35;
      result = (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0);
      if ( (_BYTE)result )
        result = sub_77FDF0(v4 + 384, v4 + 584, v4 + 712, v7 + 8 * v3 + 32, (int)&v17, v3);
    }
  }
  return result;
}
// B689C8: using guessed type int dword_B689C8;
// B689CC: using guessed type int dword_B689CC;
// B689D0: using guessed type int dword_B689D0;
// B689D4: using guessed type int dword_B689D4;

//----- (00780E00) --------------------------------------------------------
void __cdecl sub_780E00(int a1, int a2, int a3, int a4, int a5, int a6, int a7)
{
  int v7; // edi@1
  int v8; // ebx@1
  int v9; // esi@1
  int v10; // ecx@2
  int v11; // edx@2
  int v12; // eax@2
  int v13; // ebp@3
  int v14; // ebx@5
  int v15; // ecx@5
  int v16; // edx@5
  int v17; // esi@5
  int v18; // ecx@5
  int v19; // edx@5
  int v20; // ecx@9
  int v21; // ebx@13
  int v22; // [sp+8h] [bp-2Ch]@4
  int v23; // [sp+10h] [bp-24h]@4
  int v24; // [sp+18h] [bp-1Ch]@4
  int v25; // [sp+1Ch] [bp-18h]@4

  v7 = *(_DWORD *)(a6 + 4);
  v8 = *(_DWORD *)(a6 + 12);
  v9 = a5 + a7 * *(_DWORD *)(a6 + 4);
  if ( v7 < v8 )
  {
    v10 = *(_DWORD *)(a6 + 8);
    v11 = 16 * v7;
    v12 = 8 * v7;
    do
    {
      v13 = *(_DWORD *)a6;
      if ( *(_DWORD *)a6 < v10 )
      {
        v25 = v13 + v12;
        v23 = a4 + v11;
        v22 = v11;
        v24 = v9;
        do
        {
          v14 = *(_WORD *)(a1 + 2 * v25);
          v15 = *(_WORD *)(a3 + 2 * v25);
          v16 = (signed __int16)((359 * v15 - 45813) >> 8);
          v17 = *(_WORD *)(a2 + 2 * v25);
          v18 = (signed __int16)((88 * v17 + 183 * v15 - 34806) >> 8);
          v19 = v14 + v16;
          if ( v19 <= 255 )
          {
            if ( v19 < 0 )
              LOBYTE(v19) = 0;
          }
          else
          {
            LOBYTE(v19) = -1;
          }
          *(_BYTE *)(v24 + 4 * v13) = -(char)v19 - 1;
          v20 = v14 - v18;
          if ( v20 <= 255 )
          {
            if ( v20 < 0 )
              LOBYTE(v20) = 0;
          }
          else
          {
            LOBYTE(v20) = -1;
          }
          *(_BYTE *)(v24 + 4 * v13 + 1) = -(char)v20 - 1;
          v21 = (signed __int16)((454 * v17 - 57937) >> 8) + v14;
          if ( v21 <= 255 )
          {
            if ( v21 < 0 )
              LOBYTE(v21) = 0;
          }
          else
          {
            LOBYTE(v21) = -1;
          }
          *(_BYTE *)(v24 + 4 * v13 + 2) = -(char)v21 - 1;
          *(_BYTE *)(v24 + 4 * v13 + 3) = *(_BYTE *)(v23 + 2 * v13);
          ++v13;
          v10 = *(_DWORD *)(a6 + 8);
          ++v25;
        }
        while ( v13 < v10 );
        v11 = v22;
        v9 = v24;
        v8 = *(_DWORD *)(a6 + 12);
      }
      v9 += a7;
      v11 += 16;
      v12 += 8;
      ++v7;
    }
    while ( v7 < v8 );
  }
}

//----- (00780FB0) --------------------------------------------------------
int __cdecl YCbCrA_FPX_1111_to_RGBA_FPX_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int v6; // edx@1
  int result; // eax@1
  int v8; // esi@2
  int v9; // ebx@2
  int v10; // ST70_4@2
  int v11; // edi@2
  int v12; // ecx@2
  int v13; // ebx@2
  int v14; // ecx@2
  int v15; // esi@2
  int v16; // ebx@2
  int v17; // ecx@2
  int v18; // esi@2
  int v19; // ecx@2
  int v20; // ebx@2
  int v21; // ecx@2
  int v22; // esi@2
  int v23; // ecx@2
  int v24; // ebx@2
  int v25; // ecx@2
  int v26; // esi@2
  int v27; // ebp@2
  int v28; // ecx@2
  int v29; // ebx@2
  int v30; // ecx@2
  int v31; // ebx@2
  int v32; // ecx@2
  int v33; // ebx@2
  int v34; // ecx@2
  int v35; // ebx@2
  int v36; // ebx@6
  int v37; // ecx@10
  int v38; // ecx@14
  int v39; // ebx@14
  int v40; // ebx@18
  int v41; // ecx@22
  int v42; // ecx@26
  int v43; // ebx@26
  int v44; // ebx@30
  int v45; // ecx@34
  int v46; // ecx@38
  int v47; // ebx@38
  int v48; // ebx@42
  int v49; // ecx@46
  int v50; // ecx@50
  int v51; // ebx@50
  int v52; // ebx@54
  int v53; // ecx@58
  int v54; // ecx@62
  int v55; // ebx@62
  int v56; // ebx@66
  int v57; // ecx@70
  int v58; // ecx@74
  int v59; // ebx@74
  int v60; // ebx@78
  int v61; // ecx@82
  int v62; // ecx@86
  int v63; // ebx@86
  int v64; // ebx@90
  int v65; // ecx@94
  signed int v66; // [sp+4h] [bp-80h]@1
  int v67; // [sp+14h] [bp-70h]@2
  int v68; // [sp+18h] [bp-6Ch]@2
  int v69; // [sp+1Ch] [bp-68h]@2
  int v70; // [sp+20h] [bp-64h]@2
  int v71; // [sp+24h] [bp-60h]@2
  int v72; // [sp+28h] [bp-5Ch]@2
  int v73; // [sp+2Ch] [bp-58h]@2
  int v74; // [sp+30h] [bp-54h]@2
  int v75; // [sp+34h] [bp-50h]@2
  int v76; // [sp+38h] [bp-4Ch]@2
  int v77; // [sp+3Ch] [bp-48h]@2
  int v78; // [sp+40h] [bp-44h]@1
  int v79; // [sp+44h] [bp-40h]@1
  int v80; // [sp+48h] [bp-3Ch]@2
  int v81; // [sp+4Ch] [bp-38h]@2
  int v82; // [sp+50h] [bp-34h]@2
  int v83; // [sp+54h] [bp-30h]@2
  int v84; // [sp+58h] [bp-2Ch]@2
  int v85; // [sp+5Ch] [bp-28h]@2
  int v86; // [sp+60h] [bp-24h]@1
  int v87; // [sp+64h] [bp-20h]@2
  int v88; // [sp+68h] [bp-1Ch]@2
  int v89; // [sp+6Ch] [bp-18h]@2

  v6 = a3;
  result = a5;
  v66 = 0;
  v86 = a4;
  v79 = a2;
  v78 = a1;
  do
  {
    v8 = *(_WORD *)v6;
    v9 = *(_WORD *)v79;
    v10 = (359 * v8 - 45813) >> 8;
    v11 = *(_WORD *)(v79 + 10);
    v89 = (88 * v9 + 183 * v8 - 34806) >> 8;
    v12 = (454 * v9 - 57937) >> 8;
    v13 = *(_WORD *)(v6 + 2);
    v71 = v12;
    v87 = (359 * v13 - 45813) >> 8;
    v14 = *(_WORD *)(v79 + 2);
    v88 = (88 * v14 + 183 * v13 - 34806) >> 8;
    v70 = (454 * v14 - 57937) >> 8;
    v15 = *(_WORD *)(v6 + 4);
    v16 = *(_WORD *)(v79 + 4);
    v84 = (359 * v15 - 45813) >> 8;
    v17 = (88 * v16 + 183 * v15 - 34806) >> 8;
    v18 = *(_WORD *)(v6 + 6);
    v85 = v17;
    v19 = (454 * v16 - 57937) >> 8;
    v20 = *(_WORD *)(v79 + 6);
    v69 = v19;
    v82 = (359 * v18 - 45813) >> 8;
    v21 = (88 * v20 + 183 * v18 - 34806) >> 8;
    v22 = *(_WORD *)(v6 + 8);
    v83 = v21;
    v23 = (454 * v20 - 57937) >> 8;
    v24 = *(_WORD *)(v79 + 8);
    v68 = v23;
    v80 = (359 * v22 - 45813) >> 8;
    v25 = (88 * v24 + 183 * v22 - 34806) >> 8;
    v26 = *(_WORD *)(v79 + 12);
    v27 = *(_WORD *)(v79 + 14);
    v81 = v25;
    v28 = (454 * v24 - 57937) >> 8;
    v29 = *(_WORD *)(v6 + 10);
    v67 = v28;
    v76 = (359 * v29 - 45813) >> 8;
    v30 = (88 * v11 + 183 * v29 - 34806) >> 8;
    v31 = *(_WORD *)(v6 + 12);
    v77 = v30;
    v74 = (359 * v31 - 45813) >> 8;
    v32 = (88 * v26 + 183 * v31 - 34806) >> 8;
    v33 = *(_WORD *)(v6 + 14);
    v75 = v32;
    v72 = (359 * v33 - 45813) >> 8;
    v73 = (88 * v27 + 183 * v33 - 34806) >> 8;
    v34 = *(_WORD *)v78;
    v35 = v34 + v10;
    if ( v34 + v10 <= 255 )
    {
      if ( v35 < 0 )
        LOBYTE(v35) = 0;
    }
    else
    {
      LOBYTE(v35) = -1;
    }
    *(_BYTE *)result = -(char)v35 - 1;
    v36 = v34 - v89;
    if ( v34 - v89 <= 255 )
    {
      if ( v36 < 0 )
        LOBYTE(v36) = 0;
    }
    else
    {
      LOBYTE(v36) = -1;
    }
    *(_BYTE *)(result + 1) = -(char)v36 - 1;
    v37 = v71 + v34;
    if ( v37 <= 255 )
    {
      if ( v37 < 0 )
        LOBYTE(v37) = 0;
    }
    else
    {
      LOBYTE(v37) = -1;
    }
    *(_BYTE *)(result + 2) = -(char)v37 - 1;
    *(_BYTE *)(result + 3) = *(_BYTE *)v86;
    v38 = *(_WORD *)(v78 + 2);
    v39 = v38 + v87;
    if ( v38 + v87 <= 255 )
    {
      if ( v39 < 0 )
        LOBYTE(v39) = 0;
    }
    else
    {
      LOBYTE(v39) = -1;
    }
    *(_BYTE *)(result + 4) = -(char)v39 - 1;
    v40 = v38 - v88;
    if ( v38 - v88 <= 255 )
    {
      if ( v40 < 0 )
        LOBYTE(v40) = 0;
    }
    else
    {
      LOBYTE(v40) = -1;
    }
    *(_BYTE *)(result + 5) = -(char)v40 - 1;
    v41 = v70 + v38;
    if ( v41 <= 255 )
    {
      if ( v41 < 0 )
        LOBYTE(v41) = 0;
    }
    else
    {
      LOBYTE(v41) = -1;
    }
    *(_BYTE *)(result + 6) = -(char)v41 - 1;
    *(_BYTE *)(result + 7) = *(_BYTE *)(v86 + 2);
    v42 = *(_WORD *)(v78 + 4);
    v43 = v42 + v84;
    if ( v42 + v84 <= 255 )
    {
      if ( v43 < 0 )
        LOBYTE(v43) = 0;
    }
    else
    {
      LOBYTE(v43) = -1;
    }
    *(_BYTE *)(result + 8) = -(char)v43 - 1;
    v44 = v42 - v85;
    if ( v42 - v85 <= 255 )
    {
      if ( v44 < 0 )
        LOBYTE(v44) = 0;
    }
    else
    {
      LOBYTE(v44) = -1;
    }
    *(_BYTE *)(result + 9) = -(char)v44 - 1;
    v45 = v69 + v42;
    if ( v45 <= 255 )
    {
      if ( v45 < 0 )
        LOBYTE(v45) = 0;
    }
    else
    {
      LOBYTE(v45) = -1;
    }
    *(_BYTE *)(result + 10) = -(char)v45 - 1;
    *(_BYTE *)(result + 11) = *(_BYTE *)(v86 + 4);
    v46 = *(_WORD *)(v78 + 6);
    v47 = v46 + v82;
    if ( v46 + v82 <= 255 )
    {
      if ( v47 < 0 )
        LOBYTE(v47) = 0;
    }
    else
    {
      LOBYTE(v47) = -1;
    }
    *(_BYTE *)(result + 12) = -(char)v47 - 1;
    v48 = v46 - v83;
    if ( v46 - v83 <= 255 )
    {
      if ( v48 < 0 )
        LOBYTE(v48) = 0;
    }
    else
    {
      LOBYTE(v48) = -1;
    }
    *(_BYTE *)(result + 13) = -(char)v48 - 1;
    v49 = v68 + v46;
    if ( v49 <= 255 )
    {
      if ( v49 < 0 )
        LOBYTE(v49) = 0;
    }
    else
    {
      LOBYTE(v49) = -1;
    }
    *(_BYTE *)(result + 14) = -(char)v49 - 1;
    *(_BYTE *)(result + 15) = *(_BYTE *)(v86 + 6);
    v50 = *(_WORD *)(v78 + 8);
    v51 = v50 + v80;
    if ( v50 + v80 <= 255 )
    {
      if ( v51 < 0 )
        LOBYTE(v51) = 0;
    }
    else
    {
      LOBYTE(v51) = -1;
    }
    *(_BYTE *)(result + 16) = -(char)v51 - 1;
    v52 = v50 - v81;
    if ( v50 - v81 <= 255 )
    {
      if ( v52 < 0 )
        LOBYTE(v52) = 0;
    }
    else
    {
      LOBYTE(v52) = -1;
    }
    *(_BYTE *)(result + 17) = -(char)v52 - 1;
    v53 = v67 + v50;
    if ( v53 <= 255 )
    {
      if ( v53 < 0 )
        LOBYTE(v53) = 0;
    }
    else
    {
      LOBYTE(v53) = -1;
    }
    *(_BYTE *)(result + 18) = -(char)v53 - 1;
    *(_BYTE *)(result + 19) = *(_BYTE *)(v86 + 8);
    v54 = *(_WORD *)(v78 + 10);
    v55 = v54 + v76;
    if ( v54 + v76 <= 255 )
    {
      if ( v55 < 0 )
        LOBYTE(v55) = 0;
    }
    else
    {
      LOBYTE(v55) = -1;
    }
    *(_BYTE *)(result + 20) = -(char)v55 - 1;
    v56 = v54 - v77;
    if ( v54 - v77 <= 255 )
    {
      if ( v56 < 0 )
        LOBYTE(v56) = 0;
    }
    else
    {
      LOBYTE(v56) = -1;
    }
    *(_BYTE *)(result + 21) = -(char)v56 - 1;
    v57 = ((454 * v11 - 57937) >> 8) + v54;
    if ( v57 <= 255 )
    {
      if ( v57 < 0 )
        LOBYTE(v57) = 0;
    }
    else
    {
      LOBYTE(v57) = -1;
    }
    *(_BYTE *)(result + 22) = -(char)v57 - 1;
    *(_BYTE *)(result + 23) = *(_BYTE *)(v86 + 10);
    v58 = *(_WORD *)(v78 + 12);
    v59 = v58 + v74;
    if ( v58 + v74 <= 255 )
    {
      if ( v59 < 0 )
        LOBYTE(v59) = 0;
    }
    else
    {
      LOBYTE(v59) = -1;
    }
    *(_BYTE *)(result + 24) = -(char)v59 - 1;
    v60 = v58 - v75;
    if ( v58 - v75 <= 255 )
    {
      if ( v60 < 0 )
        LOBYTE(v60) = 0;
    }
    else
    {
      LOBYTE(v60) = -1;
    }
    *(_BYTE *)(result + 25) = -(char)v60 - 1;
    v61 = ((454 * v26 - 57937) >> 8) + v58;
    if ( v61 <= 255 )
    {
      if ( v61 < 0 )
        LOBYTE(v61) = 0;
    }
    else
    {
      LOBYTE(v61) = -1;
    }
    *(_BYTE *)(result + 26) = -(char)v61 - 1;
    *(_BYTE *)(result + 27) = *(_BYTE *)(v86 + 12);
    v62 = *(_WORD *)(v78 + 14);
    v63 = v62 + v72;
    if ( v62 + v72 <= 255 )
    {
      if ( v63 < 0 )
        LOBYTE(v63) = 0;
    }
    else
    {
      LOBYTE(v63) = -1;
    }
    *(_BYTE *)(result + 28) = -(char)v63 - 1;
    v64 = v62 - v73;
    if ( v62 - v73 <= 255 )
    {
      if ( v64 < 0 )
        LOBYTE(v64) = 0;
    }
    else
    {
      LOBYTE(v64) = -1;
    }
    *(_BYTE *)(result + 29) = -(char)v64 - 1;
    v65 = ((454 * v27 - 57937) >> 8) + v62;
    if ( v65 <= 255 )
    {
      if ( v65 < 0 )
        LOBYTE(v65) = 0;
    }
    else
    {
      LOBYTE(v65) = -1;
    }
    v6 += 16;
    *(_BYTE *)(result + 30) = -(char)v65 - 1;
    *(_BYTE *)(result + 31) = *(_BYTE *)(v86 + 14);
    v78 += 16;
    v79 += 16;
    v86 += 16;
    result += a6;
    ++v66;
  }
  while ( v66 < 8 );
  return result;
}

//----- (007817E0) --------------------------------------------------------
void __cdecl YCbCrA_FPX_1111_to_RGBA_FPX_MCU(int a1, int a2, int a3)
{
  int v3; // esi@1
  int v4; // ebp@1
  int v5; // ebx@1
  int v6; // edi@2
  int v7; // [sp+30h] [bp-54h]@1
  int v8; // [sp+34h] [bp-50h]@1
  int v9; // [sp+38h] [bp-4Ch]@1
  int v10; // [sp+3Ch] [bp-48h]@1
  char v11; // [sp+40h] [bp-44h]@1
  int v12; // [sp+50h] [bp-34h]@4
  int v13; // [sp+54h] [bp-30h]@4
  int v14; // [sp+58h] [bp-2Ch]@4
  int v15; // [sp+5Ch] [bp-28h]@4
  int v16; // [sp+60h] [bp-24h]@4
  int v17; // [sp+64h] [bp-20h]@4
  int v18; // [sp+68h] [bp-1Ch]@4
  int v19; // [sp+6Ch] [bp-18h]@4

  v3 = *(_DWORD *)(a1 + 60);
  v4 = *(_DWORD *)(a1 + 18484);
  v5 = *(_DWORD *)(a1 + 14320);
  v7 = dword_B689D8;
  v8 = dword_B689DC;
  v9 = dword_B689E0;
  v10 = dword_B689E4;
  if ( !sub_775560(
          a1 + 4,
          8,
          8,
          a2,
          a3,
          *(_DWORD *)(a1 + 48),
          v3,
          *(_DWORD *)(a1 + 32),
          *(_DWORD *)(a1 + 36),
          *(_DWORD *)(a1 + 40),
          (_DWORD *)(a1 + 14356),
          (int)&v11) )
  {
    v6 = *(_DWORD *)(a1 + 14356);
    if ( (unsigned __int8)operator==((int)&v11, (int)&v7) )
    {
      (*(void (__cdecl **)(int, int, int, int, int, int))(v5 + 224))(v4, v4 + 128, v4 + 256, v4 + 384, v6, v3);
    }
    else
    {
      operator&((int)&v12, (int)&v11, (int)&unk_B68938);
      v16 = v12;
      v17 = v13;
      v18 = v14;
      v19 = v15;
      if ( (unsigned __int8)operator!=((int)&v16, (int)dword_B688E0) )
        sub_780E00(v4, v4 + 128, v4 + 256, v4 + 384, v6, (int)&v16, v3);
    }
  }
}
// B689D8: using guessed type int dword_B689D8;
// B689DC: using guessed type int dword_B689DC;
// B689E0: using guessed type int dword_B689E0;
// B689E4: using guessed type int dword_B689E4;

//----- (00781980) --------------------------------------------------------
int __cdecl sub_781980(int a1, int a2, int a3, int a4, int a5, int a6, int a7)
{
  int v7; // ecx@1
  int v8; // edx@1
  int v9; // ebx@1
  int result; // eax@1
  int v11; // ebp@2
  int v12; // edi@2
  int v13; // ebp@2
  int v14; // edi@2
  int v15; // ebp@2
  int v16; // edi@2
  int v17; // ebp@2
  int v18; // ebp@2
  int v19; // edi@2
  int v20; // ebp@3
  int v21; // ecx@3
  int v22; // edx@4
  int v23; // esi@5
  int v24; // eax@7
  int v25; // ecx@7
  int v26; // edx@7
  int v27; // edx@11
  int v28; // ecx@15
  int v29; // eax@15
  int v30; // ebp@19
  __int16 v31; // [sp+0h] [bp-ECh]@2
  __int16 v32; // [sp+2h] [bp-EAh]@2
  __int16 v33; // [sp+4h] [bp-E8h]@2
  __int16 v34[29]; // [sp+6h] [bp-E6h]@2
  __int16 v35; // [sp+40h] [bp-ACh]@2
  __int16 v36; // [sp+42h] [bp-AAh]@2
  __int16 v37; // [sp+44h] [bp-A8h]@2
  __int16 v38[29]; // [sp+46h] [bp-A6h]@2
  __int16 v39; // [sp+80h] [bp-6Ch]@2
  __int16 v40; // [sp+82h] [bp-6Ah]@2
  __int16 v41; // [sp+84h] [bp-68h]@2
  __int16 v42[29]; // [sp+86h] [bp-66h]@2
  int v43; // [sp+C0h] [bp-2Ch]@1
  int v44; // [sp+C4h] [bp-28h]@6
  int v45; // [sp+C8h] [bp-24h]@6
  int v46; // [sp+CCh] [bp-20h]@6
  int v47; // [sp+D0h] [bp-1Ch]@6
  int v48; // [sp+D4h] [bp-18h]@6

  v7 = a2;
  v8 = a3;
  v9 = a5 + a7 * *(_DWORD *)(a6 + 4);
  result = 0;
  v43 = *(_DWORD *)(a6 + 4);
  do
  {
    v11 = *(_WORD *)v8;
    v12 = *(_WORD *)v7;
    *(&v31 + 4 * result) = (359 * v11 - 45813) >> 8;
    *(&v35 + 4 * result) = (88 * v12 + 183 * v11 - 34806) >> 8;
    *(&v39 + 4 * result) = (454 * v12 - 57937) >> 8;
    v13 = *(_WORD *)(v8 + 2);
    v14 = *(_WORD *)(v7 + 2);
    *(&v32 + 4 * result) = (359 * v13 - 45813) >> 8;
    *(&v36 + 4 * result) = (88 * v14 + 183 * v13 - 34806) >> 8;
    v15 = (454 * v14 - 57937) >> 8;
    v16 = *(_WORD *)(v7 + 4);
    *(&v40 + 4 * result) = v15;
    v17 = *(_WORD *)(v8 + 4);
    *(&v33 + 4 * result) = (359 * v17 - 45813) >> 8;
    *(&v37 + 4 * result) = (88 * v16 + 183 * v17 - 34806) >> 8;
    *(&v41 + 4 * result) = (454 * v16 - 57937) >> 8;
    v18 = *(_WORD *)(v8 + 6);
    v19 = *(_WORD *)(v7 + 6);
    v34[4 * result] = (359 * v18 - 45813) >> 8;
    v7 += 16;
    v38[4 * result] = (88 * v19 + 183 * v18 - 34806) >> 8;
    v8 += 16;
    v42[4 * result++] = (454 * v19 - 57937) >> 8;
  }
  while ( result < 8 );
  v20 = v43;
  v21 = *(_DWORD *)(a6 + 12);
  if ( v43 < v21 )
  {
    v22 = *(_DWORD *)(a6 + 8);
    result = 16 * v43;
    do
    {
      v23 = *(_DWORD *)a6;
      if ( *(_DWORD *)a6 < v22 )
      {
        v45 = 2 * v20;
        v47 = a4 + result;
        v46 = result + a1;
        v44 = result;
        v48 = v9;
        v43 = v20;
        do
        {
          v24 = *(_WORD *)(v46 + 2 * v23);
          v25 = ((signed int)(__CFADD__(v23, 2147483648) + v23 + 2147483648 + 2147483648) >> 1) + 2 * v45;
          v26 = v24 + *(&v31 + v25);
          if ( v26 <= 255 )
          {
            if ( v26 < 0 )
              LOBYTE(v26) = 0;
          }
          else
          {
            LOBYTE(v26) = -1;
          }
          v9 = v48;
          *(_BYTE *)(v48 + 4 * v23) = -(char)v26 - 1;
          v27 = v24 - *(&v35 + v25);
          if ( v27 <= 255 )
          {
            if ( v27 < 0 )
              LOBYTE(v27) = 0;
          }
          else
          {
            LOBYTE(v27) = -1;
          }
          v28 = *(&v39 + v25);
          *(_BYTE *)(v9 + 4 * v23 + 1) = -(char)v27 - 1;
          v29 = v28 + v24;
          if ( v29 <= 255 )
          {
            if ( v29 < 0 )
              LOBYTE(v29) = 0;
          }
          else
          {
            LOBYTE(v29) = -1;
          }
          v30 = v47;
          *(_BYTE *)(v9 + 4 * v23 + 2) = -(char)v29 - 1;
          *(_BYTE *)(v9 + 4 * v23 + 3) = *(_BYTE *)(v30 + 2 * v23);
          ++v23;
          v22 = *(_DWORD *)(a6 + 8);
        }
        while ( v23 < v22 );
        result = v44;
        v20 = v43;
        v21 = *(_DWORD *)(a6 + 12);
      }
      v9 += a7;
      result += 16;
      ++v20;
    }
    while ( v20 < v21 );
  }
  return result;
}
// 781980: using guessed type __int16 var_E6[29];
// 781980: using guessed type __int16 var_A6[29];
// 781980: using guessed type __int16 var_66[29];

//----- (00781C90) --------------------------------------------------------
int __cdecl sub_781C90(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int v6; // edx@1
  int result; // eax@1
  int v8; // esi@2
  int v9; // ecx@2
  int v10; // ebp@2
  int v11; // esi@2
  int v12; // ebp@2
  int v13; // ebp@2
  int v14; // edi@2
  int v15; // esi@2
  int v16; // ebp@2
  int v17; // ebx@2
  int v18; // ebx@2
  int v19; // ebx@6
  int v20; // ebx@10
  int v21; // ebx@14
  int v22; // ecx@14
  int v23; // ecx@18
  int v24; // ebx@22
  int v25; // ecx@26
  int v26; // ebx@26
  int v27; // ebx@30
  int v28; // ecx@34
  int v29; // ecx@38
  int v30; // ebx@38
  int v31; // ebx@42
  int v32; // ecx@46
  int v33; // ecx@50
  int v34; // ebx@50
  int v35; // ebx@54
  int v36; // ecx@58
  int v37; // ecx@62
  int v38; // ebx@62
  int v39; // ebx@66
  int v40; // ecx@70
  int v41; // ecx@74
  int v42; // ebx@74
  int v43; // ebx@78
  int v44; // ecx@82
  int v45; // ecx@86
  int v46; // ebx@86
  int v47; // ebx@90
  int v48; // ecx@94
  bool v49; // sf@98
  unsigned __int8 v50; // of@98
  int v51; // [sp+4h] [bp-50h]@1
  int v52; // [sp+8h] [bp-4Ch]@2
  int v53; // [sp+Ch] [bp-48h]@2
  int v54; // [sp+10h] [bp-44h]@2
  int v55; // [sp+14h] [bp-40h]@2
  int v56; // [sp+18h] [bp-3Ch]@1
  int v57; // [sp+1Ch] [bp-38h]@1
  int v58; // [sp+20h] [bp-34h]@2
  int v59; // [sp+24h] [bp-30h]@2
  int v60; // [sp+28h] [bp-2Ch]@2
  int v61; // [sp+2Ch] [bp-28h]@2
  int v62; // [sp+30h] [bp-24h]@1
  int v63; // [sp+34h] [bp-20h]@2
  int v64; // [sp+38h] [bp-1Ch]@2
  int v65; // [sp+3Ch] [bp-18h]@2
  int v66; // [sp+40h] [bp-14h]@2

  v6 = a1;
  result = a5;
  v51 = 0;
  v62 = a4;
  v56 = a3;
  v57 = a2;
  do
  {
    v8 = *(_WORD *)v56;
    v9 = (359 * v8 - 45813) >> 8;
    v10 = *(_WORD *)v57;
    v65 = (88 * v10 + 183 * v8 - 34806) >> 8;
    v55 = (454 * v10 - 57937) >> 8;
    v11 = *(_WORD *)(v56 + 2);
    v64 = (359 * v11 - 45813) >> 8;
    v12 = *(_WORD *)(v57 + 2);
    v63 = (88 * v12 + 183 * v11 - 34806) >> 8;
    v54 = (454 * v12 - 57937) >> 8;
    v13 = *(_WORD *)(v56 + 4);
    v61 = (359 * v13 - 45813) >> 8;
    v14 = *(_WORD *)(v57 + 4);
    v60 = (88 * v14 + 183 * v13 - 34806) >> 8;
    v53 = (454 * v14 - 57937) >> 8;
    v15 = *(_WORD *)(v56 + 6);
    v59 = (359 * v15 - 45813) >> 8;
    v16 = *(_WORD *)(v57 + 6);
    v58 = (88 * v16 + 183 * v15 - 34806) >> 8;
    v52 = (454 * v16 - 57937) >> 8;
    v57 += 16;
    v17 = *(_WORD *)v6;
    v56 += 16;
    v66 = v17;
    v18 = v9 + v17;
    if ( v18 <= 255 )
    {
      if ( v18 < 0 )
        LOBYTE(v18) = 0;
    }
    else
    {
      LOBYTE(v18) = -1;
    }
    *(_BYTE *)result = -(char)v18 - 1;
    v19 = v66 - v65;
    if ( v66 - v65 <= 255 )
    {
      if ( v19 < 0 )
        LOBYTE(v19) = 0;
    }
    else
    {
      LOBYTE(v19) = -1;
    }
    *(_BYTE *)(result + 1) = -(char)v19 - 1;
    v20 = v55 + v66;
    if ( v55 + v66 <= 255 )
    {
      if ( v20 < 0 )
        LOBYTE(v20) = 0;
    }
    else
    {
      LOBYTE(v20) = -1;
    }
    *(_BYTE *)(result + 2) = -(char)v20 - 1;
    *(_BYTE *)(result + 3) = *(_BYTE *)v62;
    v21 = *(_WORD *)(v6 + 2);
    v22 = v21 + v9;
    if ( v22 <= 255 )
    {
      if ( v22 < 0 )
        LOBYTE(v22) = 0;
    }
    else
    {
      LOBYTE(v22) = -1;
    }
    *(_BYTE *)(result + 4) = -(char)v22 - 1;
    v23 = v21 - v65;
    if ( v21 - v65 <= 255 )
    {
      if ( v23 < 0 )
        LOBYTE(v23) = 0;
    }
    else
    {
      LOBYTE(v23) = -1;
    }
    *(_BYTE *)(result + 5) = -(char)v23 - 1;
    v24 = v55 + v21;
    if ( v24 <= 255 )
    {
      if ( v24 < 0 )
        LOBYTE(v24) = 0;
    }
    else
    {
      LOBYTE(v24) = -1;
    }
    *(_BYTE *)(result + 6) = -(char)v24 - 1;
    *(_BYTE *)(result + 7) = *(_BYTE *)(v62 + 2);
    v25 = *(_WORD *)(v6 + 4);
    v26 = v25 + v64;
    if ( v25 + v64 <= 255 )
    {
      if ( v26 < 0 )
        LOBYTE(v26) = 0;
    }
    else
    {
      LOBYTE(v26) = -1;
    }
    *(_BYTE *)(result + 8) = -(char)v26 - 1;
    v27 = v25 - v63;
    if ( v25 - v63 <= 255 )
    {
      if ( v27 < 0 )
        LOBYTE(v27) = 0;
    }
    else
    {
      LOBYTE(v27) = -1;
    }
    *(_BYTE *)(result + 9) = -(char)v27 - 1;
    v28 = v54 + v25;
    if ( v28 <= 255 )
    {
      if ( v28 < 0 )
        LOBYTE(v28) = 0;
    }
    else
    {
      LOBYTE(v28) = -1;
    }
    *(_BYTE *)(result + 10) = -(char)v28 - 1;
    *(_BYTE *)(result + 11) = *(_BYTE *)(v62 + 4);
    v29 = *(_WORD *)(v6 + 6);
    v30 = v29 + v64;
    if ( v29 + v64 <= 255 )
    {
      if ( v30 < 0 )
        LOBYTE(v30) = 0;
    }
    else
    {
      LOBYTE(v30) = -1;
    }
    *(_BYTE *)(result + 12) = -(char)v30 - 1;
    v31 = v29 - v63;
    if ( v29 - v63 <= 255 )
    {
      if ( v31 < 0 )
        LOBYTE(v31) = 0;
    }
    else
    {
      LOBYTE(v31) = -1;
    }
    *(_BYTE *)(result + 13) = -(char)v31 - 1;
    v32 = v54 + v29;
    if ( v32 <= 255 )
    {
      if ( v32 < 0 )
        LOBYTE(v32) = 0;
    }
    else
    {
      LOBYTE(v32) = -1;
    }
    *(_BYTE *)(result + 14) = -(char)v32 - 1;
    *(_BYTE *)(result + 15) = *(_BYTE *)(v62 + 6);
    v33 = *(_WORD *)(v6 + 8);
    v34 = v33 + v61;
    if ( v33 + v61 <= 255 )
    {
      if ( v34 < 0 )
        LOBYTE(v34) = 0;
    }
    else
    {
      LOBYTE(v34) = -1;
    }
    *(_BYTE *)(result + 16) = -(char)v34 - 1;
    v35 = v33 - v60;
    if ( v33 - v60 <= 255 )
    {
      if ( v35 < 0 )
        LOBYTE(v35) = 0;
    }
    else
    {
      LOBYTE(v35) = -1;
    }
    *(_BYTE *)(result + 17) = -(char)v35 - 1;
    v36 = v53 + v33;
    if ( v36 <= 255 )
    {
      if ( v36 < 0 )
        LOBYTE(v36) = 0;
    }
    else
    {
      LOBYTE(v36) = -1;
    }
    *(_BYTE *)(result + 18) = -(char)v36 - 1;
    *(_BYTE *)(result + 19) = *(_BYTE *)(v62 + 8);
    v37 = *(_WORD *)(v6 + 10);
    v38 = v37 + v61;
    if ( v37 + v61 <= 255 )
    {
      if ( v38 < 0 )
        LOBYTE(v38) = 0;
    }
    else
    {
      LOBYTE(v38) = -1;
    }
    *(_BYTE *)(result + 20) = -(char)v38 - 1;
    v39 = v37 - v60;
    if ( v37 - v60 <= 255 )
    {
      if ( v39 < 0 )
        LOBYTE(v39) = 0;
    }
    else
    {
      LOBYTE(v39) = -1;
    }
    *(_BYTE *)(result + 21) = -(char)v39 - 1;
    v40 = v53 + v37;
    if ( v40 <= 255 )
    {
      if ( v40 < 0 )
        LOBYTE(v40) = 0;
    }
    else
    {
      LOBYTE(v40) = -1;
    }
    *(_BYTE *)(result + 22) = -(char)v40 - 1;
    *(_BYTE *)(result + 23) = *(_BYTE *)(v62 + 10);
    v41 = *(_WORD *)(v6 + 12);
    v42 = v41 + v59;
    if ( v41 + v59 <= 255 )
    {
      if ( v42 < 0 )
        LOBYTE(v42) = 0;
    }
    else
    {
      LOBYTE(v42) = -1;
    }
    *(_BYTE *)(result + 24) = -(char)v42 - 1;
    v43 = v41 - v58;
    if ( v41 - v58 <= 255 )
    {
      if ( v43 < 0 )
        LOBYTE(v43) = 0;
    }
    else
    {
      LOBYTE(v43) = -1;
    }
    *(_BYTE *)(result + 25) = -(char)v43 - 1;
    v44 = v52 + v41;
    if ( v44 <= 255 )
    {
      if ( v44 < 0 )
        LOBYTE(v44) = 0;
    }
    else
    {
      LOBYTE(v44) = -1;
    }
    *(_BYTE *)(result + 26) = -(char)v44 - 1;
    *(_BYTE *)(result + 27) = *(_BYTE *)(v62 + 12);
    v45 = *(_WORD *)(v6 + 14);
    v46 = v45 + v59;
    if ( v45 + v59 <= 255 )
    {
      if ( v46 < 0 )
        LOBYTE(v46) = 0;
    }
    else
    {
      LOBYTE(v46) = -1;
    }
    *(_BYTE *)(result + 28) = -(char)v46 - 1;
    v47 = v45 - v58;
    if ( v45 - v58 <= 255 )
    {
      if ( v47 < 0 )
        LOBYTE(v47) = 0;
    }
    else
    {
      LOBYTE(v47) = -1;
    }
    *(_BYTE *)(result + 29) = -(char)v47 - 1;
    v48 = v52 + v45;
    if ( v48 <= 255 )
    {
      if ( v48 < 0 )
        LOBYTE(v48) = 0;
    }
    else
    {
      LOBYTE(v48) = -1;
    }
    v6 += 16;
    *(_BYTE *)(result + 30) = -(char)v48 - 1;
    *(_BYTE *)(result + 31) = *(_BYTE *)(v62 + 14);
    result += a6;
    v50 = __OFSUB__(v51 + 1, 8);
    v49 = v51 - 7 < 0;
    v62 += 16;
    ++v51;
  }
  while ( v49 ^ v50 );
  return result;
}

//----- (00782350) --------------------------------------------------------
int __cdecl YCbCrA_FPX_4224_to_RGBA_FPX_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5, int a6)
{
  sub_781C90(a1, a2, a3, a4, a5, a6);
  return sub_781C90(a1 + 128, a2 + 8, a3 + 8, a4 + 128, a5 + 32, a6);
}

//----- (007823D0) --------------------------------------------------------
signed int __cdecl YCbCrA_FPX_4224_to_RGBA_FPX_MCU(int a1, int a2, int a3)
{
  int v3; // esi@1
  int v4; // ebp@1
  int v5; // ebx@1
  signed int result; // eax@1
  int v7; // edi@2
  int v8; // [sp+30h] [bp-74h]@1
  int v9; // [sp+34h] [bp-70h]@1
  int v10; // [sp+38h] [bp-6Ch]@1
  int v11; // [sp+3Ch] [bp-68h]@1
  char v12; // [sp+40h] [bp-64h]@1
  int v13; // [sp+50h] [bp-54h]@4
  int v14; // [sp+54h] [bp-50h]@4
  int v15; // [sp+58h] [bp-4Ch]@4
  int v16; // [sp+5Ch] [bp-48h]@4
  int v17; // [sp+60h] [bp-44h]@4
  int v18; // [sp+64h] [bp-40h]@4
  int v19; // [sp+68h] [bp-3Ch]@4
  int v20; // [sp+6Ch] [bp-38h]@4
  char v21; // [sp+70h] [bp-34h]@6
  int v22; // [sp+80h] [bp-24h]@6
  int v23; // [sp+84h] [bp-20h]@6
  int v24; // [sp+88h] [bp-1Ch]@6
  int v25; // [sp+8Ch] [bp-18h]@6

  v3 = *(_DWORD *)(a1 + 60);
  v4 = *(_DWORD *)(a1 + 18484);
  v5 = *(_DWORD *)(a1 + 14320);
  v8 = dword_B689E8;
  v9 = dword_B689EC;
  v10 = dword_B689F0;
  v11 = dword_B689F4;
  result = sub_775560(
             a1 + 4,
             16,
             8,
             a2,
             a3,
             *(_DWORD *)(a1 + 48),
             v3,
             *(_DWORD *)(a1 + 32),
             *(_DWORD *)(a1 + 36),
             *(_DWORD *)(a1 + 40),
             (_DWORD *)(a1 + 14356),
             (int)&v12);
  if ( !result )
  {
    v7 = *(_DWORD *)(a1 + 14356);
    if ( (unsigned __int8)operator==((int)&v12, (int)&v8) )
    {
      result = (*(int (__cdecl **)(int, int, int, int, int, int))(v5 + 228))(v4, v4 + 256, v4 + 384, v4 + 512, v7, v3);
    }
    else
    {
      operator&((int)&v13, (int)&v12, (int)&unk_B68938);
      v17 = v13;
      v18 = v14;
      v19 = v15;
      v20 = v16;
      if ( (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0) )
        sub_781980(v4, v4 + 256, v4 + 384, v4 + 512, v7, (int)&v17, v3);
      operator&((int)&v21, (int)&v12, (int)&unk_B68928);
      operator-((int)&v22, (int)&v21, (int)&unk_B68920);
      v17 = v22;
      v18 = v23;
      v19 = v24;
      v20 = v25;
      result = (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0);
      if ( (_BYTE)result )
        result = sub_781980(v4 + 128, v4 + 264, v4 + 392, v4 + 640, v7 + 32, (int)&v17, v3);
    }
  }
  return result;
}
// B689E8: using guessed type int dword_B689E8;
// B689EC: using guessed type int dword_B689EC;
// B689F0: using guessed type int dword_B689F0;
// B689F4: using guessed type int dword_B689F4;

//----- (00782640) --------------------------------------------------------
int __cdecl sub_782640(int a1, int a2, int a3, int a4, int a5, int a6, int a7)
{
  int v7; // ecx@1
  int v8; // edx@1
  int v9; // ebx@1
  int result; // eax@1
  int v11; // ebp@2
  int v12; // edi@2
  int v13; // ebp@2
  int v14; // edi@2
  int v15; // ebp@2
  int v16; // edi@2
  int v17; // ebp@2
  int v18; // ebp@2
  int v19; // edi@2
  int v20; // ebp@3
  int v21; // ecx@3
  int v22; // edx@4
  int v23; // esi@5
  int v24; // eax@7
  int v25; // ecx@7
  int v26; // edx@7
  int v27; // edx@11
  int v28; // ecx@15
  int v29; // eax@15
  int v30; // ebp@19
  __int16 v31; // [sp+0h] [bp-8Ch]@2
  __int16 v32; // [sp+2h] [bp-8Ah]@2
  __int16 v33; // [sp+4h] [bp-88h]@2
  __int16 v34[13]; // [sp+6h] [bp-86h]@2
  __int16 v35; // [sp+20h] [bp-6Ch]@2
  __int16 v36; // [sp+22h] [bp-6Ah]@2
  __int16 v37; // [sp+24h] [bp-68h]@2
  __int16 v38[13]; // [sp+26h] [bp-66h]@2
  __int16 v39; // [sp+40h] [bp-4Ch]@2
  __int16 v40; // [sp+42h] [bp-4Ah]@2
  __int16 v41; // [sp+44h] [bp-48h]@2
  __int16 v42[13]; // [sp+46h] [bp-46h]@2
  int v43; // [sp+60h] [bp-2Ch]@1
  int v44; // [sp+64h] [bp-28h]@6
  int v45; // [sp+68h] [bp-24h]@6
  int v46; // [sp+6Ch] [bp-20h]@6
  int v47; // [sp+70h] [bp-1Ch]@6
  int v48; // [sp+74h] [bp-18h]@6

  v7 = a2;
  v8 = a3;
  v9 = a5 + a7 * *(_DWORD *)(a6 + 4);
  result = 0;
  v43 = *(_DWORD *)(a6 + 4);
  do
  {
    v11 = *(_WORD *)v8;
    v12 = *(_WORD *)v7;
    *(&v31 + 4 * result) = (359 * v11 - 45813) >> 8;
    *(&v35 + 4 * result) = (88 * v12 + 183 * v11 - 34806) >> 8;
    *(&v39 + 4 * result) = (454 * v12 - 57937) >> 8;
    v13 = *(_WORD *)(v8 + 2);
    v14 = *(_WORD *)(v7 + 2);
    *(&v32 + 4 * result) = (359 * v13 - 45813) >> 8;
    *(&v36 + 4 * result) = (88 * v14 + 183 * v13 - 34806) >> 8;
    v15 = (454 * v14 - 57937) >> 8;
    v16 = *(_WORD *)(v7 + 4);
    *(&v40 + 4 * result) = v15;
    v17 = *(_WORD *)(v8 + 4);
    *(&v33 + 4 * result) = (359 * v17 - 45813) >> 8;
    *(&v37 + 4 * result) = (88 * v16 + 183 * v17 - 34806) >> 8;
    *(&v41 + 4 * result) = (454 * v16 - 57937) >> 8;
    v18 = *(_WORD *)(v8 + 6);
    v19 = *(_WORD *)(v7 + 6);
    v34[4 * result] = (359 * v18 - 45813) >> 8;
    v7 += 16;
    v38[4 * result] = (88 * v19 + 183 * v18 - 34806) >> 8;
    v8 += 16;
    v42[4 * result++] = (454 * v19 - 57937) >> 8;
  }
  while ( result < 4 );
  v20 = v43;
  v21 = *(_DWORD *)(a6 + 12);
  if ( v43 < v21 )
  {
    v22 = *(_DWORD *)(a6 + 8);
    result = 16 * v43;
    do
    {
      v23 = *(_DWORD *)a6;
      if ( *(_DWORD *)a6 < v22 )
      {
        v45 = (signed int)(__CFADD__(v20, 2147483648) + v20 + 2147483648 + 2147483648) >> 1;
        v47 = a4 + result;
        v46 = result + a1;
        v44 = result;
        v48 = v9;
        v43 = v20;
        do
        {
          v24 = *(_WORD *)(v46 + 2 * v23);
          v25 = ((signed int)(__CFADD__(v23, 2147483648) + v23 + 2147483648 + 2147483648) >> 1) + 4 * v45;
          v26 = v24 + *(&v31 + v25);
          if ( v26 <= 255 )
          {
            if ( v26 < 0 )
              LOBYTE(v26) = 0;
          }
          else
          {
            LOBYTE(v26) = -1;
          }
          v9 = v48;
          *(_BYTE *)(v48 + 4 * v23) = -(char)v26 - 1;
          v27 = v24 - *(&v35 + v25);
          if ( v27 <= 255 )
          {
            if ( v27 < 0 )
              LOBYTE(v27) = 0;
          }
          else
          {
            LOBYTE(v27) = -1;
          }
          v28 = *(&v39 + v25);
          *(_BYTE *)(v9 + 4 * v23 + 1) = -(char)v27 - 1;
          v29 = v28 + v24;
          if ( v29 <= 255 )
          {
            if ( v29 < 0 )
              LOBYTE(v29) = 0;
          }
          else
          {
            LOBYTE(v29) = -1;
          }
          v30 = v47;
          *(_BYTE *)(v9 + 4 * v23 + 2) = -(char)v29 - 1;
          *(_BYTE *)(v9 + 4 * v23 + 3) = *(_BYTE *)(v30 + 2 * v23);
          ++v23;
          v22 = *(_DWORD *)(a6 + 8);
        }
        while ( v23 < v22 );
        result = v44;
        v20 = v43;
        v21 = *(_DWORD *)(a6 + 12);
      }
      v9 += a7;
      result += 16;
      ++v20;
    }
    while ( v20 < v21 );
  }
  return result;
}
// 782640: using guessed type __int16 var_86[13];
// 782640: using guessed type __int16 var_66[13];
// 782640: using guessed type __int16 var_46[13];

//----- (00782930) --------------------------------------------------------
char __cdecl sub_782930(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int v6; // edi@1
  int v7; // esi@1
  int v8; // ecx@2
  int v9; // edx@2
  int v10; // edx@2
  int v11; // eax@2
  int v12; // edx@2
  int v13; // eax@2
  int v14; // edx@2
  int v15; // eax@2
  int v16; // eax@2
  int v17; // edx@2
  int v18; // edx@6
  int v19; // eax@10
  int v20; // eax@14
  int v21; // edx@14
  int v22; // edx@18
  int v23; // eax@22
  int v24; // eax@26
  int v25; // edx@26
  int v26; // edx@30
  int v27; // eax@34
  int v28; // eax@38
  int v29; // edx@38
  int v30; // edx@42
  int v31; // eax@46
  int v32; // eax@50
  int v33; // edx@50
  int v34; // edx@54
  int v35; // eax@58
  int v36; // eax@62
  int v37; // edx@62
  int v38; // edx@66
  int v39; // eax@70
  int v40; // eax@74
  int v41; // edx@74
  int v42; // edx@78
  int v43; // eax@82
  int v44; // eax@86
  int v45; // edx@86
  int v46; // edx@90
  int v47; // eax@94
  int v48; // eax@98
  int v49; // edx@98
  int v50; // esi@98
  int v51; // edx@102
  int v52; // eax@106
  int v53; // eax@110
  char v54; // dl@111
  char v55; // dl@115
  int v56; // eax@118
  int v57; // eax@122
  int v58; // edx@122
  int v59; // edx@126
  int v60; // eax@130
  int v61; // eax@134
  char v62; // dl@135
  char v63; // dl@139
  int v64; // eax@142
  int v65; // eax@146
  int v66; // edx@146
  int v67; // edx@150
  int v68; // eax@154
  int v69; // eax@158
  char v70; // dl@159
  char v71; // dl@163
  int v72; // eax@166
  int v73; // eax@170
  int v74; // edx@170
  int v75; // edx@174
  int v76; // eax@178
  int v77; // eax@182
  char v78; // dl@183
  char v79; // dl@187
  int v80; // eax@190
  char result; // al@194
  char v82; // dl@194
  signed int v83; // [sp+4h] [bp-50h]@1
  int v84; // [sp+8h] [bp-4Ch]@2
  int v85; // [sp+Ch] [bp-48h]@2
  int v86; // [sp+10h] [bp-44h]@2
  int v87; // [sp+14h] [bp-40h]@2
  int v88; // [sp+18h] [bp-3Ch]@1
  int v89; // [sp+1Ch] [bp-38h]@1
  int v90; // [sp+20h] [bp-34h]@2
  int v91; // [sp+24h] [bp-30h]@2
  int v92; // [sp+28h] [bp-2Ch]@2
  int v93; // [sp+2Ch] [bp-28h]@2
  int v94; // [sp+30h] [bp-24h]@2
  int v95; // [sp+34h] [bp-20h]@2
  int v96; // [sp+38h] [bp-1Ch]@2
  int v97; // [sp+3Ch] [bp-18h]@2
  int v98; // [sp+40h] [bp-14h]@1

  v6 = a4;
  v7 = a5;
  v83 = 0;
  v88 = a3;
  v89 = a2;
  v98 = a1;
  do
  {
    v8 = *(_WORD *)v88;
    v97 = (359 * v8 - 45813) >> 8;
    v9 = *(_WORD *)v89;
    v95 = (88 * v9 + 183 * v8 - 34806) >> 8;
    v87 = (454 * v9 - 57937) >> 8;
    v10 = *(_WORD *)(v88 + 2);
    v96 = (359 * v10 - 45813) >> 8;
    v11 = *(_WORD *)(v89 + 2);
    v93 = (88 * v11 + 183 * v10 - 34806) >> 8;
    v86 = (454 * v11 - 57937) >> 8;
    v12 = *(_WORD *)(v88 + 4);
    v94 = (359 * v12 - 45813) >> 8;
    v13 = *(_WORD *)(v89 + 4);
    v91 = (88 * v13 + 183 * v12 - 34806) >> 8;
    v85 = (454 * v13 - 57937) >> 8;
    v14 = *(_WORD *)(v88 + 6);
    v92 = (359 * v14 - 45813) >> 8;
    v15 = *(_WORD *)(v89 + 6);
    v90 = (88 * v15 + 183 * v14 - 34806) >> 8;
    v84 = (454 * v15 - 57937) >> 8;
    v89 += 16;
    v16 = *(_WORD *)v98;
    v88 += 16;
    v17 = v97 + v16;
    if ( v97 + v16 <= 255 )
    {
      if ( v17 < 0 )
        LOBYTE(v17) = 0;
    }
    else
    {
      LOBYTE(v17) = -1;
    }
    *(_BYTE *)v7 = -(char)v17 - 1;
    v18 = v16 - v95;
    if ( v16 - v95 <= 255 )
    {
      if ( v18 < 0 )
        LOBYTE(v18) = 0;
    }
    else
    {
      LOBYTE(v18) = -1;
    }
    *(_BYTE *)(v7 + 1) = -(char)v18 - 1;
    v19 = v87 + v16;
    if ( v19 <= 255 )
    {
      if ( v19 < 0 )
        LOBYTE(v19) = 0;
    }
    else
    {
      LOBYTE(v19) = -1;
    }
    *(_BYTE *)(v7 + 2) = -(char)v19 - 1;
    *(_BYTE *)(v7 + 3) = *(_BYTE *)v6;
    v20 = *(_WORD *)(v98 + 2);
    v21 = v97 + v20;
    if ( v97 + v20 <= 255 )
    {
      if ( v21 < 0 )
        LOBYTE(v21) = 0;
    }
    else
    {
      LOBYTE(v21) = -1;
    }
    *(_BYTE *)(v7 + 4) = -(char)v21 - 1;
    v22 = v20 - v95;
    if ( v20 - v95 <= 255 )
    {
      if ( v22 < 0 )
        LOBYTE(v22) = 0;
    }
    else
    {
      LOBYTE(v22) = -1;
    }
    *(_BYTE *)(v7 + 5) = -(char)v22 - 1;
    v23 = v87 + v20;
    if ( v23 <= 255 )
    {
      if ( v23 < 0 )
        LOBYTE(v23) = 0;
    }
    else
    {
      LOBYTE(v23) = -1;
    }
    *(_BYTE *)(v7 + 6) = -(char)v23 - 1;
    *(_BYTE *)(v7 + 7) = *(_BYTE *)(v6 + 2);
    v24 = *(_WORD *)(v98 + 4);
    v25 = v24 + v96;
    if ( v24 + v96 <= 255 )
    {
      if ( v25 < 0 )
        LOBYTE(v25) = 0;
    }
    else
    {
      LOBYTE(v25) = -1;
    }
    *(_BYTE *)(v7 + 8) = -(char)v25 - 1;
    v26 = v24 - v93;
    if ( v24 - v93 <= 255 )
    {
      if ( v26 < 0 )
        LOBYTE(v26) = 0;
    }
    else
    {
      LOBYTE(v26) = -1;
    }
    *(_BYTE *)(v7 + 9) = -(char)v26 - 1;
    v27 = v86 + v24;
    if ( v27 <= 255 )
    {
      if ( v27 < 0 )
        LOBYTE(v27) = 0;
    }
    else
    {
      LOBYTE(v27) = -1;
    }
    *(_BYTE *)(v7 + 10) = -(char)v27 - 1;
    *(_BYTE *)(v7 + 11) = *(_BYTE *)(v6 + 4);
    v28 = *(_WORD *)(v98 + 6);
    v29 = v28 + v96;
    if ( v28 + v96 <= 255 )
    {
      if ( v29 < 0 )
        LOBYTE(v29) = 0;
    }
    else
    {
      LOBYTE(v29) = -1;
    }
    *(_BYTE *)(v7 + 12) = -(char)v29 - 1;
    v30 = v28 - v93;
    if ( v28 - v93 <= 255 )
    {
      if ( v30 < 0 )
        LOBYTE(v30) = 0;
    }
    else
    {
      LOBYTE(v30) = -1;
    }
    *(_BYTE *)(v7 + 13) = -(char)v30 - 1;
    v31 = v86 + v28;
    if ( v31 <= 255 )
    {
      if ( v31 < 0 )
        LOBYTE(v31) = 0;
    }
    else
    {
      LOBYTE(v31) = -1;
    }
    *(_BYTE *)(v7 + 14) = -(char)v31 - 1;
    *(_BYTE *)(v7 + 15) = *(_BYTE *)(v6 + 6);
    v32 = *(_WORD *)(v98 + 8);
    v33 = v32 + v94;
    if ( v32 + v94 <= 255 )
    {
      if ( v33 < 0 )
        LOBYTE(v33) = 0;
    }
    else
    {
      LOBYTE(v33) = -1;
    }
    *(_BYTE *)(v7 + 16) = -(char)v33 - 1;
    v34 = v32 - v91;
    if ( v32 - v91 <= 255 )
    {
      if ( v34 < 0 )
        LOBYTE(v34) = 0;
    }
    else
    {
      LOBYTE(v34) = -1;
    }
    *(_BYTE *)(v7 + 17) = -(char)v34 - 1;
    v35 = v85 + v32;
    if ( v35 <= 255 )
    {
      if ( v35 < 0 )
        LOBYTE(v35) = 0;
    }
    else
    {
      LOBYTE(v35) = -1;
    }
    *(_BYTE *)(v7 + 18) = -(char)v35 - 1;
    *(_BYTE *)(v7 + 19) = *(_BYTE *)(v6 + 8);
    v36 = *(_WORD *)(v98 + 10);
    v37 = v36 + v94;
    if ( v36 + v94 <= 255 )
    {
      if ( v37 < 0 )
        LOBYTE(v37) = 0;
    }
    else
    {
      LOBYTE(v37) = -1;
    }
    *(_BYTE *)(v7 + 20) = -(char)v37 - 1;
    v38 = v36 - v91;
    if ( v36 - v91 <= 255 )
    {
      if ( v38 < 0 )
        LOBYTE(v38) = 0;
    }
    else
    {
      LOBYTE(v38) = -1;
    }
    *(_BYTE *)(v7 + 21) = -(char)v38 - 1;
    v39 = v85 + v36;
    if ( v39 <= 255 )
    {
      if ( v39 < 0 )
        LOBYTE(v39) = 0;
    }
    else
    {
      LOBYTE(v39) = -1;
    }
    *(_BYTE *)(v7 + 22) = -(char)v39 - 1;
    *(_BYTE *)(v7 + 23) = *(_BYTE *)(v6 + 10);
    v40 = *(_WORD *)(v98 + 12);
    v41 = v40 + v92;
    if ( v40 + v92 <= 255 )
    {
      if ( v41 < 0 )
        LOBYTE(v41) = 0;
    }
    else
    {
      LOBYTE(v41) = -1;
    }
    *(_BYTE *)(v7 + 24) = -(char)v41 - 1;
    v42 = v40 - v90;
    if ( v40 - v90 <= 255 )
    {
      if ( v42 < 0 )
        LOBYTE(v42) = 0;
    }
    else
    {
      LOBYTE(v42) = -1;
    }
    *(_BYTE *)(v7 + 25) = -(char)v42 - 1;
    v43 = v84 + v40;
    if ( v43 <= 255 )
    {
      if ( v43 < 0 )
        LOBYTE(v43) = 0;
    }
    else
    {
      LOBYTE(v43) = -1;
    }
    *(_BYTE *)(v7 + 26) = -(char)v43 - 1;
    *(_BYTE *)(v7 + 27) = *(_BYTE *)(v6 + 12);
    v44 = *(_WORD *)(v98 + 14);
    v45 = v44 + v92;
    if ( v44 + v92 <= 255 )
    {
      if ( v45 < 0 )
        LOBYTE(v45) = 0;
    }
    else
    {
      LOBYTE(v45) = -1;
    }
    *(_BYTE *)(v7 + 28) = -(char)v45 - 1;
    v46 = v44 - v90;
    if ( v44 - v90 <= 255 )
    {
      if ( v46 < 0 )
        LOBYTE(v46) = 0;
    }
    else
    {
      LOBYTE(v46) = -1;
    }
    *(_BYTE *)(v7 + 29) = -(char)v46 - 1;
    v47 = v84 + v44;
    if ( v47 <= 255 )
    {
      if ( v47 < 0 )
        LOBYTE(v47) = 0;
    }
    else
    {
      LOBYTE(v47) = -1;
    }
    *(_BYTE *)(v7 + 30) = -(char)v47 - 1;
    *(_BYTE *)(v7 + 31) = *(_BYTE *)(v6 + 14);
    v48 = *(_WORD *)(v98 + 16);
    v49 = v97 + v48;
    v50 = a6 + v7;
    if ( v97 + v48 <= 255 )
    {
      if ( v49 < 0 )
        LOBYTE(v49) = 0;
    }
    else
    {
      LOBYTE(v49) = -1;
    }
    *(_BYTE *)v50 = -(char)v49 - 1;
    v51 = v48 - v95;
    if ( v48 - v95 <= 255 )
    {
      if ( v51 < 0 )
        LOBYTE(v51) = 0;
    }
    else
    {
      LOBYTE(v51) = -1;
    }
    *(_BYTE *)(v50 + 1) = -(char)v51 - 1;
    v52 = v87 + v48;
    if ( v52 <= 255 )
    {
      if ( v52 < 0 )
        LOBYTE(v52) = 0;
    }
    else
    {
      LOBYTE(v52) = -1;
    }
    *(_BYTE *)(v50 + 2) = -(char)v52 - 1;
    *(_BYTE *)(v50 + 3) = *(_BYTE *)(v6 + 16);
    v53 = *(_WORD *)(v98 + 18);
    if ( v53 + v97 <= 255 )
    {
      v54 = v53 + ((unsigned __int16)(359 * v8 + 19723) >> 8);
      if ( v53 + v97 < 0 )
        v54 = 0;
    }
    else
    {
      v54 = -1;
    }
    *(_BYTE *)(v50 + 4) = -v54 - 1;
    if ( v53 - v95 <= 255 )
    {
      v55 = v53 - v95;
      if ( v53 - v95 < 0 )
        v55 = 0;
    }
    else
    {
      v55 = -1;
    }
    *(_BYTE *)(v50 + 5) = -v55 - 1;
    v56 = v87 + v53;
    if ( v56 <= 255 )
    {
      if ( v56 < 0 )
        LOBYTE(v56) = 0;
    }
    else
    {
      LOBYTE(v56) = -1;
    }
    *(_BYTE *)(v50 + 6) = -(char)v56 - 1;
    *(_BYTE *)(v50 + 7) = *(_BYTE *)(v6 + 18);
    v57 = *(_WORD *)(v98 + 20);
    v58 = v57 + v96;
    if ( v57 + v96 <= 255 )
    {
      if ( v58 < 0 )
        LOBYTE(v58) = 0;
    }
    else
    {
      LOBYTE(v58) = -1;
    }
    *(_BYTE *)(v50 + 8) = -(char)v58 - 1;
    v59 = v57 - v93;
    if ( v57 - v93 <= 255 )
    {
      if ( v59 < 0 )
        LOBYTE(v59) = 0;
    }
    else
    {
      LOBYTE(v59) = -1;
    }
    *(_BYTE *)(v50 + 9) = -(char)v59 - 1;
    v60 = v86 + v57;
    if ( v60 <= 255 )
    {
      if ( v60 < 0 )
        LOBYTE(v60) = 0;
    }
    else
    {
      LOBYTE(v60) = -1;
    }
    *(_BYTE *)(v50 + 10) = -(char)v60 - 1;
    *(_BYTE *)(v50 + 11) = *(_BYTE *)(v6 + 20);
    v61 = *(_WORD *)(v98 + 22);
    if ( v61 + v96 <= 255 )
    {
      v62 = v61 + v96;
      if ( v61 + v96 < 0 )
        v62 = 0;
    }
    else
    {
      v62 = -1;
    }
    *(_BYTE *)(v50 + 12) = -v62 - 1;
    if ( v61 - v93 <= 255 )
    {
      v63 = v61 - v93;
      if ( v61 - v93 < 0 )
        v63 = 0;
    }
    else
    {
      v63 = -1;
    }
    *(_BYTE *)(v50 + 13) = -v63 - 1;
    v64 = v86 + v61;
    if ( v64 <= 255 )
    {
      if ( v64 < 0 )
        LOBYTE(v64) = 0;
    }
    else
    {
      LOBYTE(v64) = -1;
    }
    *(_BYTE *)(v50 + 14) = -(char)v64 - 1;
    *(_BYTE *)(v50 + 15) = *(_BYTE *)(v6 + 22);
    v65 = *(_WORD *)(v98 + 24);
    v66 = v65 + v94;
    if ( v65 + v94 <= 255 )
    {
      if ( v66 < 0 )
        LOBYTE(v66) = 0;
    }
    else
    {
      LOBYTE(v66) = -1;
    }
    *(_BYTE *)(v50 + 16) = -(char)v66 - 1;
    v67 = v65 - v91;
    if ( v65 - v91 <= 255 )
    {
      if ( v67 < 0 )
        LOBYTE(v67) = 0;
    }
    else
    {
      LOBYTE(v67) = -1;
    }
    *(_BYTE *)(v50 + 17) = -(char)v67 - 1;
    v68 = v85 + v65;
    if ( v68 <= 255 )
    {
      if ( v68 < 0 )
        LOBYTE(v68) = 0;
    }
    else
    {
      LOBYTE(v68) = -1;
    }
    *(_BYTE *)(v50 + 18) = -(char)v68 - 1;
    *(_BYTE *)(v50 + 19) = *(_BYTE *)(v6 + 24);
    v69 = *(_WORD *)(v98 + 26);
    if ( v69 + v94 <= 255 )
    {
      v70 = v69 + v94;
      if ( v69 + v94 < 0 )
        v70 = 0;
    }
    else
    {
      v70 = -1;
    }
    *(_BYTE *)(v50 + 20) = -v70 - 1;
    if ( v69 - v91 <= 255 )
    {
      v71 = v69 - v91;
      if ( v69 - v91 < 0 )
        v71 = 0;
    }
    else
    {
      v71 = -1;
    }
    *(_BYTE *)(v50 + 21) = -v71 - 1;
    v72 = v85 + v69;
    if ( v72 <= 255 )
    {
      if ( v72 < 0 )
        LOBYTE(v72) = 0;
    }
    else
    {
      LOBYTE(v72) = -1;
    }
    *(_BYTE *)(v50 + 22) = -(char)v72 - 1;
    *(_BYTE *)(v50 + 23) = *(_BYTE *)(v6 + 26);
    v73 = *(_WORD *)(v98 + 28);
    v74 = v73 + v92;
    if ( v73 + v92 <= 255 )
    {
      if ( v74 < 0 )
        LOBYTE(v74) = 0;
    }
    else
    {
      LOBYTE(v74) = -1;
    }
    *(_BYTE *)(v50 + 24) = -(char)v74 - 1;
    v75 = v73 - v90;
    if ( v73 - v90 <= 255 )
    {
      if ( v75 < 0 )
        LOBYTE(v75) = 0;
    }
    else
    {
      LOBYTE(v75) = -1;
    }
    *(_BYTE *)(v50 + 25) = -(char)v75 - 1;
    v76 = v84 + v73;
    if ( v76 <= 255 )
    {
      if ( v76 < 0 )
        LOBYTE(v76) = 0;
    }
    else
    {
      LOBYTE(v76) = -1;
    }
    *(_BYTE *)(v50 + 26) = -(char)v76 - 1;
    *(_BYTE *)(v50 + 27) = *(_BYTE *)(v6 + 28);
    v77 = *(_WORD *)(v98 + 30);
    if ( v77 + v92 <= 255 )
    {
      v78 = v77 + v92;
      if ( v77 + v92 < 0 )
        v78 = 0;
    }
    else
    {
      v78 = -1;
    }
    *(_BYTE *)(v50 + 28) = -v78 - 1;
    if ( v77 - v90 <= 255 )
    {
      v79 = v77 - v90;
      if ( v77 - v90 < 0 )
        v79 = 0;
    }
    else
    {
      v79 = -1;
    }
    *(_BYTE *)(v50 + 29) = -v79 - 1;
    v80 = v84 + v77;
    if ( v80 <= 255 )
    {
      if ( v80 < 0 )
        LOBYTE(v80) = 0;
    }
    else
    {
      LOBYTE(v80) = -1;
    }
    result = -(char)v80 - 1;
    *(_BYTE *)(v50 + 30) = result;
    v82 = *(_BYTE *)(v6 + 30);
    v6 += 32;
    *(_BYTE *)(v50 + 31) = v82;
    v7 = a6 + v50;
    v98 += 32;
    v83 += 2;
  }
  while ( v83 < 8 );
  return result;
}

//----- (00783460) --------------------------------------------------------
char __cdecl YCbCrA_FPX_4114_to_RGBA_FPX_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int v6; // edi@1

  sub_782930(a1, a2, a3, a4, a5, a6);
  sub_782930(a1 + 128, a2 + 8, a3 + 8, a4 + 128, a5 + 32, a6);
  v6 = a5 + 8 * a6;
  sub_782930(a1 + 256, a2 + 64, a3 + 64, a4 + 256, v6, a6);
  return sub_782930(a1 + 384, a2 + 72, a3 + 72, a4 + 384, v6 + 32, a6);
}

//----- (00783550) --------------------------------------------------------
signed int __cdecl YCbCrA_FPX_4114_to_RGBA_FPX_MCU(int a1, int a2, int a3)
{
  int v3; // esi@1
  int v4; // ebp@1
  int v5; // ebx@1
  signed int result; // eax@1
  int v7; // edi@2
  int v8; // [sp+30h] [bp-B4h]@1
  int v9; // [sp+34h] [bp-B0h]@1
  int v10; // [sp+38h] [bp-ACh]@1
  int v11; // [sp+3Ch] [bp-A8h]@1
  char v12; // [sp+40h] [bp-A4h]@1
  int v13; // [sp+50h] [bp-94h]@4
  int v14; // [sp+54h] [bp-90h]@4
  int v15; // [sp+58h] [bp-8Ch]@4
  int v16; // [sp+5Ch] [bp-88h]@4
  int v17; // [sp+60h] [bp-84h]@4
  int v18; // [sp+64h] [bp-80h]@4
  int v19; // [sp+68h] [bp-7Ch]@4
  int v20; // [sp+6Ch] [bp-78h]@4
  char v21; // [sp+70h] [bp-74h]@6
  int v22; // [sp+80h] [bp-64h]@6
  int v23; // [sp+84h] [bp-60h]@6
  int v24; // [sp+88h] [bp-5Ch]@6
  int v25; // [sp+8Ch] [bp-58h]@6
  char v26; // [sp+90h] [bp-54h]@8
  int v27; // [sp+A0h] [bp-44h]@8
  int v28; // [sp+A4h] [bp-40h]@8
  int v29; // [sp+A8h] [bp-3Ch]@8
  int v30; // [sp+ACh] [bp-38h]@8
  char v31; // [sp+B0h] [bp-34h]@10
  int v32; // [sp+C0h] [bp-24h]@10
  int v33; // [sp+C4h] [bp-20h]@10
  int v34; // [sp+C8h] [bp-1Ch]@10
  int v35; // [sp+CCh] [bp-18h]@10

  v3 = *(_DWORD *)(a1 + 60);
  v4 = *(_DWORD *)(a1 + 18484);
  v5 = *(_DWORD *)(a1 + 14320);
  v8 = dword_B689F8;
  v9 = dword_B689FC;
  v10 = dword_B68A00;
  v11 = dword_B68A04;
  result = sub_775560(
             a1 + 4,
             16,
             16,
             a2,
             a3,
             *(_DWORD *)(a1 + 48),
             v3,
             *(_DWORD *)(a1 + 32),
             *(_DWORD *)(a1 + 36),
             *(_DWORD *)(a1 + 40),
             (_DWORD *)(a1 + 14356),
             (int)&v12);
  if ( !result )
  {
    v7 = *(_DWORD *)(a1 + 14356);
    if ( (unsigned __int8)operator==((int)&v12, (int)&v8) )
    {
      result = (*(int (__cdecl **)(int, int, int, int, int, int))(v5 + 232))(v4, v4 + 512, v4 + 640, v4 + 768, v7, v3);
    }
    else
    {
      operator&((int)&v13, (int)&v12, (int)&unk_B68938);
      v17 = v13;
      v18 = v14;
      v19 = v15;
      v20 = v16;
      if ( (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0) )
        sub_782640(v4, v4 + 512, v4 + 640, v4 + 768, v7, (int)&v17, v3);
      operator&((int)&v21, (int)&v12, (int)&unk_B68928);
      operator-((int)&v22, (int)&v21, (int)&unk_B68920);
      v17 = v22;
      v18 = v23;
      v19 = v24;
      v20 = v25;
      if ( (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0) )
        sub_782640(v4 + 128, v4 + 520, v4 + 648, v4 + 896, v7 + 32, (int)&v17, v3);
      operator&((int)&v26, (int)&v12, (int)&unk_B68910);
      operator-((int)&v27, (int)&v26, (int)&unk_B68908);
      v17 = v27;
      v18 = v28;
      v19 = v29;
      v20 = v30;
      if ( (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0) )
        sub_782640(v4 + 256, v4 + 576, v4 + 704, v4 + 1024, v7 + 8 * v3, (int)&v17, v3);
      operator&((int)&v31, (int)&v12, (int)&unk_B688F8);
      operator-((int)&v32, (int)&v31, (int)&unk_B688F0);
      v17 = v32;
      v18 = v33;
      v19 = v34;
      v20 = v35;
      result = (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0);
      if ( (_BYTE)result )
        result = sub_782640(v4 + 384, v4 + 584, v4 + 712, v4 + 1152, v7 + 8 * v3 + 32, (int)&v17, v3);
    }
  }
  return result;
}
// B689F8: using guessed type int dword_B689F8;
// B689FC: using guessed type int dword_B689FC;
// B68A00: using guessed type int dword_B68A00;
// B68A04: using guessed type int dword_B68A04;

//----- (00783950) --------------------------------------------------------
void __cdecl sub_783950(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int *v6; // edi@1
  int v7; // esi@1
  int v8; // edx@1
  int v9; // ebp@1
  int v10; // eax@2
  int v11; // ebx@2
  int v12; // ecx@3
  int v13; // edx@4
  char v14; // al@5
  int v15; // [sp+Ch] [bp-18h]@4

  v6 = (int *)a5;
  v7 = *(_DWORD *)(a5 + 4);
  v8 = *(_DWORD *)(a5 + 12);
  v9 = a4 + a6 * *(_DWORD *)(a5 + 4);
  if ( v7 < v8 )
  {
    v10 = *(_DWORD *)(a5 + 8);
    v11 = 8 * v7;
    do
    {
      v12 = *v6;
      if ( *v6 < v10 )
      {
        v13 = v12 + v11;
        v15 = v9;
        do
        {
          v9 = v15;
          *(_BYTE *)(v15 + 4 * v12) = *(_BYTE *)(a1 + 2 * v13);
          *(_BYTE *)(v15 + 4 * v12 + 1) = *(_BYTE *)(a2 + 2 * v13);
          v14 = *(_BYTE *)(a3 + 2 * v13++);
          *(_BYTE *)(v15 + 4 * v12 + 2) = v14;
          *(_BYTE *)(v15 + 4 * v12++ + 3) = -1;
          v10 = *(_DWORD *)(a5 + 8);
        }
        while ( v12 < v10 );
        v6 = (int *)a5;
        v8 = *(_DWORD *)(a5 + 12);
      }
      v9 += a6;
      v11 += 8;
      ++v7;
    }
    while ( v7 < v8 );
  }
}

//----- (00783A00) --------------------------------------------------------
signed int __cdecl OTHER_111_to_OTHER4_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5)
{
  signed int result; // eax@1
  int v6; // [sp+4h] [bp-10h]@1

  result = 0;
  v6 = a4;
  do
  {
    *(_BYTE *)v6 = *(_BYTE *)(a1 + 2 * result);
    *(_BYTE *)(v6 + 1) = *(_BYTE *)(a2 + 2 * result);
    *(_BYTE *)(v6 + 2) = *(_BYTE *)(a3 + 2 * result);
    *(_BYTE *)(v6 + 3) = -1;
    *(_BYTE *)(v6 + 4) = *(_BYTE *)(a1 + 2 * result + 2);
    *(_BYTE *)(v6 + 5) = *(_BYTE *)(a2 + 2 * result + 2);
    *(_BYTE *)(v6 + 6) = *(_BYTE *)(a3 + 2 * result + 2);
    *(_BYTE *)(v6 + 7) = -1;
    *(_BYTE *)(v6 + 8) = *(_BYTE *)(a1 + 2 * result + 4);
    *(_BYTE *)(v6 + 9) = *(_BYTE *)(a2 + 2 * result + 4);
    *(_BYTE *)(v6 + 10) = *(_BYTE *)(a3 + 2 * result + 4);
    *(_BYTE *)(v6 + 11) = -1;
    *(_BYTE *)(v6 + 12) = *(_BYTE *)(a1 + 2 * result + 6);
    *(_BYTE *)(v6 + 13) = *(_BYTE *)(a2 + 2 * result + 6);
    *(_BYTE *)(v6 + 14) = *(_BYTE *)(a3 + 2 * result + 6);
    *(_BYTE *)(v6 + 15) = -1;
    *(_BYTE *)(v6 + 16) = *(_BYTE *)(a1 + 2 * result + 8);
    *(_BYTE *)(v6 + 17) = *(_BYTE *)(a2 + 2 * result + 8);
    *(_BYTE *)(v6 + 18) = *(_BYTE *)(a3 + 2 * result + 8);
    *(_BYTE *)(v6 + 19) = -1;
    *(_BYTE *)(v6 + 20) = *(_BYTE *)(a1 + 2 * result + 10);
    *(_BYTE *)(v6 + 21) = *(_BYTE *)(a2 + 2 * result + 10);
    *(_BYTE *)(v6 + 22) = *(_BYTE *)(a3 + 2 * result + 10);
    *(_BYTE *)(v6 + 23) = -1;
    *(_BYTE *)(v6 + 24) = *(_BYTE *)(a1 + 2 * result + 12);
    *(_BYTE *)(v6 + 25) = *(_BYTE *)(a2 + 2 * result + 12);
    *(_BYTE *)(v6 + 26) = *(_BYTE *)(a3 + 2 * result + 12);
    *(_BYTE *)(v6 + 27) = -1;
    *(_BYTE *)(v6 + 28) = *(_BYTE *)(a1 + 2 * result + 14);
    *(_BYTE *)(v6 + 29) = *(_BYTE *)(a2 + 2 * result + 14);
    *(_BYTE *)(v6 + 30) = *(_BYTE *)(a3 + 2 * result + 14);
    result += 8;
    *(_BYTE *)(v6 + 31) = -1;
    v6 += a5;
  }
  while ( result < 64 );
  return result;
}

//----- (00783B70) --------------------------------------------------------
void __cdecl OTHER_111_to_OTHER4_MCU(int a1, int a2, int a3)
{
  int v3; // esi@1
  int v4; // ebp@1
  int v5; // ebx@1
  int v6; // edi@2
  int v7; // [sp+30h] [bp-54h]@1
  int v8; // [sp+34h] [bp-50h]@1
  int v9; // [sp+38h] [bp-4Ch]@1
  int v10; // [sp+3Ch] [bp-48h]@1
  char v11; // [sp+40h] [bp-44h]@1
  int v12; // [sp+50h] [bp-34h]@4
  int v13; // [sp+54h] [bp-30h]@4
  int v14; // [sp+58h] [bp-2Ch]@4
  int v15; // [sp+5Ch] [bp-28h]@4
  int v16; // [sp+60h] [bp-24h]@4
  int v17; // [sp+64h] [bp-20h]@4
  int v18; // [sp+68h] [bp-1Ch]@4
  int v19; // [sp+6Ch] [bp-18h]@4

  v3 = *(_DWORD *)(a1 + 60);
  v4 = *(_DWORD *)(a1 + 18484);
  v5 = *(_DWORD *)(a1 + 14320);
  v7 = dword_B68A08;
  v8 = dword_B68A0C;
  v9 = dword_B68A10;
  v10 = dword_B68A14;
  if ( !sub_775560(
          a1 + 4,
          8,
          8,
          a2,
          a3,
          *(_DWORD *)(a1 + 48),
          v3,
          *(_DWORD *)(a1 + 32),
          *(_DWORD *)(a1 + 36),
          *(_DWORD *)(a1 + 40),
          (_DWORD *)(a1 + 14356),
          (int)&v11) )
  {
    v6 = *(_DWORD *)(a1 + 14356);
    if ( (unsigned __int8)operator==((int)&v11, (int)&v7) )
    {
      (*(void (__cdecl **)(int, int, int, int, int))(v5 + 216))(v4, v4 + 128, v4 + 256, v6, v3);
    }
    else
    {
      operator&((int)&v12, (int)&v11, (int)&unk_B68938);
      v16 = v12;
      v17 = v13;
      v18 = v14;
      v19 = v15;
      if ( (unsigned __int8)operator!=((int)&v16, (int)dword_B688E0) )
        sub_783950(v4, v4 + 128, v4 + 256, v6, (int)&v16, v3);
    }
  }
}
// B68A08: using guessed type int dword_B68A08;
// B68A0C: using guessed type int dword_B68A0C;
// B68A10: using guessed type int dword_B68A10;
// B68A14: using guessed type int dword_B68A14;

//----- (00783D00) --------------------------------------------------------
void __cdecl sub_783D00(int a1, int a2, int a3, int a4, int a5, int a6, int a7)
{
  int *v7; // ebp@1
  int v8; // ebx@1
  int v9; // esi@1
  int v10; // ecx@1
  int v11; // edx@2
  int v12; // eax@2
  int v13; // edi@3
  int v14; // esi@4

  v7 = (int *)a6;
  v8 = *(_DWORD *)(a6 + 4);
  v9 = *(_DWORD *)(a6 + 12);
  v10 = a5 + a7 * *(_DWORD *)(a6 + 4);
  if ( v8 < v9 )
  {
    v11 = *(_DWORD *)(a6 + 8);
    v12 = 8 * v8;
    do
    {
      v13 = *v7;
      if ( *v7 < v11 )
      {
        v14 = v13 + v12;
        do
        {
          *(_BYTE *)(v10 + 4 * v13) = *(_BYTE *)(a1 + 2 * v14);
          *(_BYTE *)(v10 + 4 * v13 + 1) = *(_BYTE *)(a2 + 2 * v14);
          *(_BYTE *)(v10 + 4 * v13 + 2) = *(_BYTE *)(a3 + 2 * v14);
          *(_BYTE *)(v10 + 4 * v13++ + 3) = *(_BYTE *)(a4 + 2 * v14++);
          v11 = *(_DWORD *)(a6 + 8);
        }
        while ( v13 < v11 );
        v7 = (int *)a6;
        v9 = *(_DWORD *)(a6 + 12);
      }
      v10 += a7;
      v12 += 8;
      ++v8;
    }
    while ( v8 < v9 );
  }
}

//----- (00783DC0) --------------------------------------------------------
signed int __cdecl OTHER_1111_to_OTHER_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5, int a6)
{
  signed int result; // eax@1
  char v7; // cl@2
  int v8; // [sp+4h] [bp-18h]@1

  result = 0;
  v8 = a5;
  do
  {
    *(_BYTE *)v8 = *(_BYTE *)(a1 + 2 * result);
    *(_BYTE *)(v8 + 1) = *(_BYTE *)(a2 + 2 * result);
    *(_BYTE *)(v8 + 2) = *(_BYTE *)(a3 + 2 * result);
    *(_BYTE *)(v8 + 3) = *(_BYTE *)(a4 + 2 * result);
    *(_BYTE *)(v8 + 4) = *(_BYTE *)(a1 + 2 * result + 2);
    *(_BYTE *)(v8 + 5) = *(_BYTE *)(a2 + 2 * result + 2);
    *(_BYTE *)(v8 + 6) = *(_BYTE *)(a3 + 2 * result + 2);
    *(_BYTE *)(v8 + 7) = *(_BYTE *)(a4 + 2 * result + 2);
    *(_BYTE *)(v8 + 8) = *(_BYTE *)(a1 + 2 * result + 4);
    *(_BYTE *)(v8 + 9) = *(_BYTE *)(a2 + 2 * result + 4);
    *(_BYTE *)(v8 + 10) = *(_BYTE *)(a3 + 2 * result + 4);
    *(_BYTE *)(v8 + 11) = *(_BYTE *)(a4 + 2 * result + 4);
    *(_BYTE *)(v8 + 12) = *(_BYTE *)(a1 + 2 * result + 6);
    *(_BYTE *)(v8 + 13) = *(_BYTE *)(a2 + 2 * result + 6);
    *(_BYTE *)(v8 + 14) = *(_BYTE *)(a3 + 2 * result + 6);
    *(_BYTE *)(v8 + 15) = *(_BYTE *)(a4 + 2 * result + 6);
    *(_BYTE *)(v8 + 16) = *(_BYTE *)(a1 + 2 * result + 8);
    *(_BYTE *)(v8 + 17) = *(_BYTE *)(a2 + 2 * result + 8);
    *(_BYTE *)(v8 + 18) = *(_BYTE *)(a3 + 2 * result + 8);
    *(_BYTE *)(v8 + 19) = *(_BYTE *)(a4 + 2 * result + 8);
    *(_BYTE *)(v8 + 20) = *(_BYTE *)(a1 + 2 * result + 10);
    *(_BYTE *)(v8 + 21) = *(_BYTE *)(a2 + 2 * result + 10);
    *(_BYTE *)(v8 + 22) = *(_BYTE *)(a3 + 2 * result + 10);
    *(_BYTE *)(v8 + 23) = *(_BYTE *)(a4 + 2 * result + 10);
    *(_BYTE *)(v8 + 24) = *(_BYTE *)(a1 + 2 * result + 12);
    *(_BYTE *)(v8 + 25) = *(_BYTE *)(a2 + 2 * result + 12);
    *(_BYTE *)(v8 + 26) = *(_BYTE *)(a3 + 2 * result + 12);
    *(_BYTE *)(v8 + 27) = *(_BYTE *)(a4 + 2 * result + 12);
    *(_BYTE *)(v8 + 28) = *(_BYTE *)(a1 + 2 * result + 14);
    *(_BYTE *)(v8 + 29) = *(_BYTE *)(a2 + 2 * result + 14);
    *(_BYTE *)(v8 + 30) = *(_BYTE *)(a3 + 2 * result + 14);
    v7 = *(_BYTE *)(a4 + 2 * result + 14);
    result += 8;
    *(_BYTE *)(v8 + 31) = v7;
    v8 += a6;
  }
  while ( result < 64 );
  return result;
}

//----- (00783F50) --------------------------------------------------------
void __cdecl OTHER_1111_to_OTHER_MCU(int a1, int a2, int a3)
{
  int v3; // esi@1
  int v4; // ebp@1
  int v5; // ebx@1
  int v6; // edi@2
  int v7; // [sp+30h] [bp-54h]@1
  int v8; // [sp+34h] [bp-50h]@1
  int v9; // [sp+38h] [bp-4Ch]@1
  int v10; // [sp+3Ch] [bp-48h]@1
  char v11; // [sp+40h] [bp-44h]@1
  int v12; // [sp+50h] [bp-34h]@4
  int v13; // [sp+54h] [bp-30h]@4
  int v14; // [sp+58h] [bp-2Ch]@4
  int v15; // [sp+5Ch] [bp-28h]@4
  int v16; // [sp+60h] [bp-24h]@4
  int v17; // [sp+64h] [bp-20h]@4
  int v18; // [sp+68h] [bp-1Ch]@4
  int v19; // [sp+6Ch] [bp-18h]@4

  v3 = *(_DWORD *)(a1 + 60);
  v4 = *(_DWORD *)(a1 + 18484);
  v5 = *(_DWORD *)(a1 + 14320);
  v7 = dword_B68A18;
  v8 = dword_B68A1C;
  v9 = dword_B68A20;
  v10 = dword_B68A24;
  if ( !sub_775560(
          a1 + 4,
          8,
          8,
          a2,
          a3,
          *(_DWORD *)(a1 + 48),
          v3,
          *(_DWORD *)(a1 + 32),
          *(_DWORD *)(a1 + 36),
          *(_DWORD *)(a1 + 40),
          (_DWORD *)(a1 + 14356),
          (int)&v11) )
  {
    v6 = *(_DWORD *)(a1 + 14356);
    if ( (unsigned __int8)operator==((int)&v11, (int)&v7) )
    {
      (*(void (__cdecl **)(int, int, int, int, int, int))(v5 + 236))(v4, v4 + 128, v4 + 256, v4 + 384, v6, v3);
    }
    else
    {
      operator&((int)&v12, (int)&v11, (int)&unk_B68938);
      v16 = v12;
      v17 = v13;
      v18 = v14;
      v19 = v15;
      if ( (unsigned __int8)operator!=((int)&v16, (int)dword_B688E0) )
        sub_783D00(v4, v4 + 128, v4 + 256, v4 + 384, v6, (int)&v16, v3);
    }
  }
}
// B68A18: using guessed type int dword_B68A18;
// B68A1C: using guessed type int dword_B68A1C;
// B68A20: using guessed type int dword_B68A20;
// B68A24: using guessed type int dword_B68A24;

//----- (007840F0) --------------------------------------------------------
int __cdecl sub_7840F0(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int result; // eax@1
  int v7; // ecx@1
  int v8; // esi@1
  int v9; // edx@1
  int v10; // edi@1
  int v11; // ebx@1
  int v12; // ebp@3
  int v13; // ebx@4
  char v14; // cl@5
  int v15; // [sp+4h] [bp-20h]@4
  int v16; // [sp+8h] [bp-1Ch]@2

  result = a5;
  v7 = *(_DWORD *)(a5 + 4);
  v8 = a1 + 16 * v7;
  v9 = a2 + 16 * v7;
  v10 = a4 + a6 * v7;
  v11 = *(_DWORD *)(a5 + 12);
  if ( v7 < v11 )
  {
    result = *(_DWORD *)(a5 + 8);
    v16 = a3 + 16 * v7;
    do
    {
      v12 = *(_DWORD *)a5;
      if ( *(_DWORD *)a5 < result )
      {
        v13 = 3 * v12;
        v15 = v7;
        do
        {
          *(_BYTE *)(v13 + v10) = *(_BYTE *)(v8 + 2 * v12);
          *(_BYTE *)(v13 + v10 + 1) = *(_BYTE *)(v9 + 2 * v12);
          v14 = *(_BYTE *)(v16 + 2 * v12++);
          *(_BYTE *)(v13 + v10 + 2) = v14;
          v13 += 3;
          result = *(_DWORD *)(a5 + 8);
        }
        while ( v12 < result );
        v7 = v15;
        v11 = *(_DWORD *)(a5 + 12);
      }
      v8 += 16;
      v9 += 16;
      ++v7;
      v16 += 16;
      v10 += a6;
    }
    while ( v7 < v11 );
  }
  return result;
}

//----- (007841B0) --------------------------------------------------------
int __cdecl OTHER_111_to_OTHER_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // edx@1
  int result; // eax@1
  char v7; // cl@2
  char v8; // cl@2
  bool v9; // sf@2
  unsigned __int8 v10; // of@2
  int v11; // [sp+4h] [bp-18h]@1
  int v12; // [sp+8h] [bp-14h]@1
  int v13; // [sp+Ch] [bp-10h]@1

  v5 = a1;
  result = a2;
  v12 = 0;
  v11 = a4;
  v13 = a3;
  do
  {
    *(_BYTE *)v11 = *(_BYTE *)v5;
    *(_BYTE *)(v11 + 1) = *(_BYTE *)result;
    *(_BYTE *)(v11 + 2) = *(_BYTE *)v13;
    *(_BYTE *)(v11 + 3) = *(_BYTE *)(v5 + 2);
    *(_BYTE *)(v11 + 4) = *(_BYTE *)(result + 2);
    *(_BYTE *)(v11 + 5) = *(_BYTE *)(v13 + 2);
    *(_BYTE *)(v11 + 6) = *(_BYTE *)(v5 + 4);
    *(_BYTE *)(v11 + 7) = *(_BYTE *)(result + 4);
    *(_BYTE *)(v11 + 8) = *(_BYTE *)(v13 + 4);
    *(_BYTE *)(v11 + 9) = *(_BYTE *)(v5 + 6);
    *(_BYTE *)(v11 + 10) = *(_BYTE *)(result + 6);
    *(_BYTE *)(v11 + 11) = *(_BYTE *)(v13 + 6);
    *(_BYTE *)(v11 + 12) = *(_BYTE *)(v5 + 8);
    *(_BYTE *)(v11 + 13) = *(_BYTE *)(result + 8);
    *(_BYTE *)(v11 + 14) = *(_BYTE *)(v13 + 8);
    *(_BYTE *)(v11 + 15) = *(_BYTE *)(v5 + 10);
    *(_BYTE *)(v11 + 16) = *(_BYTE *)(result + 10);
    *(_BYTE *)(v11 + 17) = *(_BYTE *)(v13 + 10);
    *(_BYTE *)(v11 + 18) = *(_BYTE *)(v5 + 12);
    *(_BYTE *)(v11 + 19) = *(_BYTE *)(result + 12);
    *(_BYTE *)(v11 + 20) = *(_BYTE *)(v13 + 12);
    v7 = *(_BYTE *)(v5 + 14);
    v5 += 16;
    *(_BYTE *)(v11 + 21) = v7;
    v8 = *(_BYTE *)(result + 14);
    result += 16;
    *(_BYTE *)(v11 + 22) = v8;
    *(_BYTE *)(v11 + 23) = *(_BYTE *)(v13 + 14);
    v13 += 16;
    v11 += a5;
    v10 = __OFSUB__(v12 + 1, 8);
    v9 = v12++ - 7 < 0;
  }
  while ( v9 ^ v10 );
  return result;
}

//----- (007842B0) --------------------------------------------------------
signed int __cdecl OTHER_111_to_OTHER_MCU(int a1, int a2, int a3)
{
  int v3; // esi@1
  int v4; // edi@1
  signed int result; // eax@1
  int v6; // ebx@2
  int v7; // [sp+30h] [bp-4Ch]@1
  int v8; // [sp+34h] [bp-48h]@1
  int v9; // [sp+38h] [bp-44h]@1
  int v10; // [sp+3Ch] [bp-40h]@1
  char v11; // [sp+40h] [bp-3Ch]@1
  int v12; // [sp+50h] [bp-2Ch]@4
  int v13; // [sp+54h] [bp-28h]@4
  int v14; // [sp+58h] [bp-24h]@4
  int v15; // [sp+5Ch] [bp-20h]@4
  int v16; // [sp+60h] [bp-1Ch]@4
  int v17; // [sp+64h] [bp-18h]@4
  int v18; // [sp+68h] [bp-14h]@4
  int v19; // [sp+6Ch] [bp-10h]@4

  v3 = *(_DWORD *)(a1 + 60);
  v7 = dword_B68A28;
  v4 = *(_DWORD *)(a1 + 18484);
  v8 = dword_B68A2C;
  v9 = dword_B68A30;
  v10 = dword_B68A34;
  result = sub_775560(
             a1 + 4,
             8,
             8,
             a2,
             a3,
             *(_DWORD *)(a1 + 48),
             v3,
             *(_DWORD *)(a1 + 32),
             *(_DWORD *)(a1 + 36),
             *(_DWORD *)(a1 + 40),
             (_DWORD *)(a1 + 14356),
             (int)&v11);
  if ( !result )
  {
    v6 = *(_DWORD *)(a1 + 14356);
    if ( (unsigned __int8)operator==((int)&v11, (int)&v7) )
    {
      result = OTHER_111_to_OTHER_Full_MCU_PX(v4, v4 + 128, v4 + 256, v6, v3);
    }
    else
    {
      operator&((int)&v12, (int)&v11, (int)&unk_B68938);
      v16 = v12;
      v17 = v13;
      v18 = v14;
      v19 = v15;
      result = (unsigned __int8)operator!=((int)&v16, (int)dword_B688E0);
      if ( (_BYTE)result )
        result = sub_7840F0(v4, v4 + 128, v4 + 256, v6, (int)&v16, v3);
    }
  }
  return result;
}
// B68A28: using guessed type int dword_B68A28;
// B68A2C: using guessed type int dword_B68A2C;
// B68A30: using guessed type int dword_B68A30;
// B68A34: using guessed type int dword_B68A34;

//----- (00784430) --------------------------------------------------------
int __cdecl sub_784430(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int v6; // ecx@1
  int v7; // edi@1
  int v8; // esi@1
  int result; // eax@1
  int v10; // edx@2
  int v11; // ebp@3
  int v12; // ebx@4
  char v13; // al@5
  signed int v14; // ecx@5
  int v15; // [sp+4h] [bp-20h]@4
  int v16; // [sp+8h] [bp-1Ch]@2
  int v17; // [sp+Ch] [bp-18h]@2

  v6 = *(_DWORD *)(a5 + 4);
  v7 = a4 + a6 * v6;
  v8 = a1 + 16 * *(_DWORD *)(a5 + 4);
  result = *(_DWORD *)(a5 + 12);
  if ( v6 < result )
  {
    v10 = *(_DWORD *)(a5 + 8);
    v16 = a3
        + 16
        * ((signed int)(__CFADD__(*(_DWORD *)(a5 + 4), 2147483648) + *(_DWORD *)(a5 + 4) + 2147483648 + 2147483648) >> 1);
    v17 = a2
        + 16
        * ((signed int)(__CFADD__(*(_DWORD *)(a5 + 4), 2147483648) + *(_DWORD *)(a5 + 4) + 2147483648 + 2147483648) >> 1);
    do
    {
      v11 = *(_DWORD *)a5;
      if ( *(_DWORD *)a5 < v10 )
      {
        v12 = 3 * v11;
        v15 = v6;
        do
        {
          v13 = *(_BYTE *)(v8 + 2 * v11);
          v14 = (signed int)(__CFADD__(v11, 2147483648) + v11 + 2147483648 + 2147483648) >> 1;
          ++v11;
          *(_BYTE *)(v12 + v7) = v13;
          *(_BYTE *)(v12 + v7 + 1) = *(_BYTE *)(v17 + 2 * v14);
          *(_BYTE *)(v12 + v7 + 2) = *(_BYTE *)(v16 + 2 * v14);
          v12 += 3;
          v10 = *(_DWORD *)(a5 + 8);
        }
        while ( v11 < v10 );
        v6 = v15;
        result = *(_DWORD *)(a5 + 12);
      }
      v8 += 16;
      v17 += 16 * (v6 & 1);
      v16 += 16 * (v6++ & 1);
      v7 += a6;
    }
    while ( v6 < result );
  }
  return result;
}

//----- (00784520) --------------------------------------------------------
int __cdecl sub_784520(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // edx@1
  int result; // eax@1
  int v7; // esi@2
  char v8; // cl@2
  char v9; // cl@2
  bool v10; // sf@2
  unsigned __int8 v11; // of@2
  int v12; // [sp+4h] [bp-18h]@1
  int v13; // [sp+8h] [bp-14h]@1
  int v14; // [sp+Ch] [bp-10h]@1

  v5 = a1;
  result = a2;
  v13 = 0;
  v12 = a4;
  v14 = a3;
  do
  {
    *(_BYTE *)v12 = *(_BYTE *)v5;
    *(_BYTE *)(v12 + 1) = *(_BYTE *)result;
    *(_BYTE *)(v12 + 2) = *(_BYTE *)v14;
    *(_BYTE *)(v12 + 3) = *(_BYTE *)(v5 + 2);
    *(_BYTE *)(v12 + 4) = *(_BYTE *)result;
    *(_BYTE *)(v12 + 5) = *(_BYTE *)v14;
    *(_BYTE *)(v12 + 6) = *(_BYTE *)(v5 + 4);
    *(_BYTE *)(v12 + 7) = *(_BYTE *)(result + 2);
    *(_BYTE *)(v12 + 8) = *(_BYTE *)(v14 + 2);
    *(_BYTE *)(v12 + 9) = *(_BYTE *)(v5 + 6);
    *(_BYTE *)(v12 + 10) = *(_BYTE *)(result + 2);
    *(_BYTE *)(v12 + 11) = *(_BYTE *)(v14 + 2);
    *(_BYTE *)(v12 + 12) = *(_BYTE *)(v5 + 8);
    *(_BYTE *)(v12 + 13) = *(_BYTE *)(result + 4);
    *(_BYTE *)(v12 + 14) = *(_BYTE *)(v14 + 4);
    *(_BYTE *)(v12 + 15) = *(_BYTE *)(v5 + 10);
    *(_BYTE *)(v12 + 16) = *(_BYTE *)(result + 4);
    *(_BYTE *)(v12 + 17) = *(_BYTE *)(v14 + 4);
    *(_BYTE *)(v12 + 18) = *(_BYTE *)(v5 + 12);
    *(_BYTE *)(v12 + 19) = *(_BYTE *)(result + 6);
    *(_BYTE *)(v12 + 20) = *(_BYTE *)(v14 + 6);
    *(_BYTE *)(v12 + 21) = *(_BYTE *)(v5 + 14);
    *(_BYTE *)(v12 + 22) = *(_BYTE *)(result + 6);
    *(_BYTE *)(v12 + 23) = *(_BYTE *)(v14 + 6);
    v7 = a5 + v12;
    *(_BYTE *)v7 = *(_BYTE *)(v5 + 16);
    *(_BYTE *)(v7 + 1) = *(_BYTE *)result;
    *(_BYTE *)(v7 + 2) = *(_BYTE *)v14;
    *(_BYTE *)(v7 + 3) = *(_BYTE *)(v5 + 18);
    *(_BYTE *)(v7 + 4) = *(_BYTE *)result;
    *(_BYTE *)(v7 + 5) = *(_BYTE *)v14;
    *(_BYTE *)(v7 + 6) = *(_BYTE *)(v5 + 20);
    *(_BYTE *)(v7 + 7) = *(_BYTE *)(result + 2);
    *(_BYTE *)(v7 + 8) = *(_BYTE *)(v14 + 2);
    *(_BYTE *)(v7 + 9) = *(_BYTE *)(v5 + 22);
    *(_BYTE *)(v7 + 10) = *(_BYTE *)(result + 2);
    *(_BYTE *)(v7 + 11) = *(_BYTE *)(v14 + 2);
    *(_BYTE *)(v7 + 12) = *(_BYTE *)(v5 + 24);
    *(_BYTE *)(v7 + 13) = *(_BYTE *)(result + 4);
    *(_BYTE *)(v7 + 14) = *(_BYTE *)(v14 + 4);
    *(_BYTE *)(v7 + 15) = *(_BYTE *)(v5 + 26);
    *(_BYTE *)(v7 + 16) = *(_BYTE *)(result + 4);
    *(_BYTE *)(v7 + 17) = *(_BYTE *)(v14 + 4);
    *(_BYTE *)(v7 + 18) = *(_BYTE *)(v5 + 28);
    *(_BYTE *)(v7 + 19) = *(_BYTE *)(result + 6);
    *(_BYTE *)(v7 + 20) = *(_BYTE *)(v14 + 6);
    v8 = *(_BYTE *)(v5 + 30);
    v5 += 32;
    *(_BYTE *)(v7 + 21) = v8;
    v9 = *(_BYTE *)(result + 6);
    result += 16;
    *(_BYTE *)(v7 + 22) = v9;
    *(_BYTE *)(v7 + 23) = *(_BYTE *)(v14 + 6);
    v14 += 16;
    v12 += a5 + a5;
    v11 = __OFSUB__(v13 + 1, 4);
    v10 = v13++ - 3 < 0;
  }
  while ( v10 ^ v11 );
  return result;
}

//----- (007846C0) --------------------------------------------------------
int __cdecl OTHER_411_to_OTHER_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // edi@1

  sub_784520(a1, a2, a3, a4, a5);
  sub_784520(a1 + 128, a2 + 8, a3 + 8, a4 + 24, a5);
  v5 = a4 + 8 * a5;
  sub_784520(a1 + 256, a2 + 64, a3 + 64, v5, a5);
  return sub_784520(a1 + 384, a2 + 72, a3 + 72, v5 + 24, a5);
}

//----- (00784780) --------------------------------------------------------
signed int __cdecl OTHER_411_to_OTHER_MCU(int a1, int a2, int a3)
{
  int v3; // esi@1
  int v4; // ebp@1
  int v5; // ebx@1
  signed int result; // eax@1
  int v7; // edi@2
  int v8; // [sp+30h] [bp-B4h]@1
  int v9; // [sp+34h] [bp-B0h]@1
  int v10; // [sp+38h] [bp-ACh]@1
  int v11; // [sp+3Ch] [bp-A8h]@1
  char v12; // [sp+40h] [bp-A4h]@1
  int v13; // [sp+50h] [bp-94h]@4
  int v14; // [sp+54h] [bp-90h]@4
  int v15; // [sp+58h] [bp-8Ch]@4
  int v16; // [sp+5Ch] [bp-88h]@4
  int v17; // [sp+60h] [bp-84h]@4
  int v18; // [sp+64h] [bp-80h]@4
  int v19; // [sp+68h] [bp-7Ch]@4
  int v20; // [sp+6Ch] [bp-78h]@4
  char v21; // [sp+70h] [bp-74h]@6
  int v22; // [sp+80h] [bp-64h]@6
  int v23; // [sp+84h] [bp-60h]@6
  int v24; // [sp+88h] [bp-5Ch]@6
  int v25; // [sp+8Ch] [bp-58h]@6
  char v26; // [sp+90h] [bp-54h]@8
  int v27; // [sp+A0h] [bp-44h]@8
  int v28; // [sp+A4h] [bp-40h]@8
  int v29; // [sp+A8h] [bp-3Ch]@8
  int v30; // [sp+ACh] [bp-38h]@8
  char v31; // [sp+B0h] [bp-34h]@10
  int v32; // [sp+C0h] [bp-24h]@10
  int v33; // [sp+C4h] [bp-20h]@10
  int v34; // [sp+C8h] [bp-1Ch]@10
  int v35; // [sp+CCh] [bp-18h]@10

  v3 = *(_DWORD *)(a1 + 60);
  v4 = *(_DWORD *)(a1 + 18484);
  v5 = *(_DWORD *)(a1 + 14320);
  v8 = dword_B68A38;
  v9 = dword_B68A3C;
  v10 = dword_B68A40;
  v11 = dword_B68A44;
  result = sub_775560(
             a1 + 4,
             16,
             16,
             a2,
             a3,
             *(_DWORD *)(a1 + 48),
             v3,
             *(_DWORD *)(a1 + 32),
             *(_DWORD *)(a1 + 36),
             *(_DWORD *)(a1 + 40),
             (_DWORD *)(a1 + 14356),
             (int)&v12);
  if ( !result )
  {
    v7 = *(_DWORD *)(a1 + 14356);
    if ( (unsigned __int8)operator==((int)&v12, (int)&v8) )
    {
      result = (*(int (__cdecl **)(int, int, int, int, int))(v5 + 212))(v4, v4 + 512, v4 + 640, v7, v3);
    }
    else
    {
      operator&((int)&v13, (int)&v12, (int)&unk_B68938);
      v17 = v13;
      v18 = v14;
      v19 = v15;
      v20 = v16;
      if ( (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0) )
        sub_784430(v4, v4 + 512, v4 + 640, v7, (int)&v17, v3);
      operator&((int)&v21, (int)&v12, (int)&unk_B68928);
      operator-((int)&v22, (int)&v21, (int)&unk_B68920);
      v17 = v22;
      v18 = v23;
      v19 = v24;
      v20 = v25;
      if ( (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0) )
        sub_784430(v4 + 128, v4 + 520, v4 + 648, v7 + 24, (int)&v17, v3);
      operator&((int)&v26, (int)&v12, (int)&unk_B68910);
      operator-((int)&v27, (int)&v26, (int)&unk_B68908);
      v17 = v27;
      v18 = v28;
      v19 = v29;
      v20 = v30;
      if ( (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0) )
        sub_784430(v4 + 256, v4 + 576, v4 + 704, v7 + 8 * v3, (int)&v17, v3);
      operator&((int)&v31, (int)&v12, (int)&unk_B688F8);
      operator-((int)&v32, (int)&v31, (int)&unk_B688F0);
      v17 = v32;
      v18 = v33;
      v19 = v34;
      v20 = v35;
      result = (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0);
      if ( (_BYTE)result )
        result = sub_784430(v4 + 384, v4 + 584, v4 + 712, v7 + 8 * v3 + 24, (int)&v17, v3);
    }
  }
  return result;
}
// B68A38: using guessed type int dword_B68A38;
// B68A3C: using guessed type int dword_B68A3C;
// B68A40: using guessed type int dword_B68A40;
// B68A44: using guessed type int dword_B68A44;

//----- (00784B50) --------------------------------------------------------
int __cdecl sub_784B50(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int result; // eax@1
  int v7; // ecx@1
  int v8; // esi@1
  int v9; // edx@1
  int v10; // edi@1
  int v11; // ebx@1
  int v12; // ebp@3
  int v13; // ebx@4
  char v14; // al@5
  signed int v15; // ecx@5
  int v16; // [sp+4h] [bp-20h]@4
  int v17; // [sp+8h] [bp-1Ch]@2

  result = a5;
  v7 = *(_DWORD *)(a5 + 4);
  v8 = a1 + 16 * v7;
  v9 = a2 + 16 * v7;
  v10 = a4 + a6 * v7;
  v11 = *(_DWORD *)(a5 + 12);
  if ( v7 < v11 )
  {
    result = *(_DWORD *)(a5 + 8);
    v17 = a3 + 16 * v7;
    do
    {
      v12 = *(_DWORD *)a5;
      if ( *(_DWORD *)a5 < result )
      {
        v13 = 3 * v12;
        v16 = v7;
        do
        {
          v14 = *(_BYTE *)(v8 + 2 * v12);
          v15 = (signed int)(__CFADD__(v12, 2147483648) + v12 + 2147483648 + 2147483648) >> 1;
          ++v12;
          *(_BYTE *)(v13 + v10) = v14;
          *(_BYTE *)(v13 + v10 + 1) = *(_BYTE *)(v9 + 2 * v15);
          *(_BYTE *)(v13 + v10 + 2) = *(_BYTE *)(v17 + 2 * v15);
          v13 += 3;
          result = *(_DWORD *)(a5 + 8);
        }
        while ( v12 < result );
        v7 = v16;
        v11 = *(_DWORD *)(a5 + 12);
      }
      v8 += 16;
      v9 += 16;
      ++v7;
      v17 += 16;
      v10 += a6;
    }
    while ( v7 < v11 );
  }
  return result;
}

//----- (00784C20) --------------------------------------------------------
int __cdecl sub_784C20(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // edx@1
  int result; // eax@1
  char v7; // cl@2
  char v8; // cl@2
  bool v9; // sf@2
  unsigned __int8 v10; // of@2
  int v11; // [sp+4h] [bp-18h]@1
  int v12; // [sp+8h] [bp-14h]@1
  int v13; // [sp+Ch] [bp-10h]@1

  v5 = a1;
  result = a2;
  v12 = 0;
  v11 = a4;
  v13 = a3;
  do
  {
    *(_BYTE *)v11 = *(_BYTE *)v5;
    *(_BYTE *)(v11 + 1) = *(_BYTE *)result;
    *(_BYTE *)(v11 + 2) = *(_BYTE *)v13;
    *(_BYTE *)(v11 + 3) = *(_BYTE *)(v5 + 2);
    *(_BYTE *)(v11 + 4) = *(_BYTE *)result;
    *(_BYTE *)(v11 + 5) = *(_BYTE *)v13;
    *(_BYTE *)(v11 + 6) = *(_BYTE *)(v5 + 4);
    *(_BYTE *)(v11 + 7) = *(_BYTE *)(result + 2);
    *(_BYTE *)(v11 + 8) = *(_BYTE *)(v13 + 2);
    *(_BYTE *)(v11 + 9) = *(_BYTE *)(v5 + 6);
    *(_BYTE *)(v11 + 10) = *(_BYTE *)(result + 2);
    *(_BYTE *)(v11 + 11) = *(_BYTE *)(v13 + 2);
    *(_BYTE *)(v11 + 12) = *(_BYTE *)(v5 + 8);
    *(_BYTE *)(v11 + 13) = *(_BYTE *)(result + 4);
    *(_BYTE *)(v11 + 14) = *(_BYTE *)(v13 + 4);
    *(_BYTE *)(v11 + 15) = *(_BYTE *)(v5 + 10);
    *(_BYTE *)(v11 + 16) = *(_BYTE *)(result + 4);
    *(_BYTE *)(v11 + 17) = *(_BYTE *)(v13 + 4);
    *(_BYTE *)(v11 + 18) = *(_BYTE *)(v5 + 12);
    *(_BYTE *)(v11 + 19) = *(_BYTE *)(result + 6);
    *(_BYTE *)(v11 + 20) = *(_BYTE *)(v13 + 6);
    v7 = *(_BYTE *)(v5 + 14);
    v5 += 16;
    *(_BYTE *)(v11 + 21) = v7;
    v8 = *(_BYTE *)(result + 6);
    result += 16;
    *(_BYTE *)(v11 + 22) = v8;
    *(_BYTE *)(v11 + 23) = *(_BYTE *)(v13 + 6);
    v13 += 16;
    v11 += a5;
    v10 = __OFSUB__(v12 + 1, 8);
    v9 = v12++ - 7 < 0;
  }
  while ( v9 ^ v10 );
  return result;
}

//----- (00784D20) --------------------------------------------------------
int __cdecl OTHER_422_to_OTHER_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5)
{
  sub_784C20(a1, a2, a3, a4, a5);
  return sub_784C20(a1 + 128, a2 + 8, a3 + 8, a4 + 24, a5);
}

//----- (00784D90) --------------------------------------------------------
signed int __cdecl OTHER_422_to_OTHER_MCU(int a1, int a2, int a3)
{
  int v3; // esi@1
  int v4; // ebp@1
  int v5; // ebx@1
  signed int result; // eax@1
  int v7; // edi@2
  int v8; // [sp+30h] [bp-74h]@1
  int v9; // [sp+34h] [bp-70h]@1
  int v10; // [sp+38h] [bp-6Ch]@1
  int v11; // [sp+3Ch] [bp-68h]@1
  char v12; // [sp+40h] [bp-64h]@1
  int v13; // [sp+50h] [bp-54h]@4
  int v14; // [sp+54h] [bp-50h]@4
  int v15; // [sp+58h] [bp-4Ch]@4
  int v16; // [sp+5Ch] [bp-48h]@4
  int v17; // [sp+60h] [bp-44h]@4
  int v18; // [sp+64h] [bp-40h]@4
  int v19; // [sp+68h] [bp-3Ch]@4
  int v20; // [sp+6Ch] [bp-38h]@4
  char v21; // [sp+70h] [bp-34h]@6
  int v22; // [sp+80h] [bp-24h]@6
  int v23; // [sp+84h] [bp-20h]@6
  int v24; // [sp+88h] [bp-1Ch]@6
  int v25; // [sp+8Ch] [bp-18h]@6

  v3 = *(_DWORD *)(a1 + 60);
  v4 = *(_DWORD *)(a1 + 18484);
  v5 = *(_DWORD *)(a1 + 14320);
  v8 = dword_B68A48;
  v9 = dword_B68A4C;
  v10 = dword_B68A50;
  v11 = dword_B68A54;
  result = sub_775560(
             a1 + 4,
             16,
             8,
             a2,
             a3,
             *(_DWORD *)(a1 + 48),
             v3,
             *(_DWORD *)(a1 + 32),
             *(_DWORD *)(a1 + 36),
             *(_DWORD *)(a1 + 40),
             (_DWORD *)(a1 + 14356),
             (int)&v12);
  if ( !result )
  {
    v7 = *(_DWORD *)(a1 + 14356);
    if ( (unsigned __int8)operator==((int)&v12, (int)&v8) )
    {
      result = (*(int (__cdecl **)(int, int, int, int, int))(v5 + 208))(v4, v4 + 256, v4 + 384, v7, v3);
    }
    else
    {
      operator&((int)&v13, (int)&v12, (int)&unk_B68938);
      v17 = v13;
      v18 = v14;
      v19 = v15;
      v20 = v16;
      if ( (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0) )
        sub_784B50(v4, v4 + 256, v4 + 384, v7, (int)&v17, v3);
      operator&((int)&v21, (int)&v12, (int)&unk_B68928);
      operator-((int)&v22, (int)&v21, (int)&unk_B68920);
      v17 = v22;
      v18 = v23;
      v19 = v24;
      v20 = v25;
      result = (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0);
      if ( (_BYTE)result )
        result = sub_784B50(v4 + 128, v4 + 264, v4 + 392, v7 + 24, (int)&v17, v3);
    }
  }
  return result;
}
// B68A48: using guessed type int dword_B68A48;
// B68A4C: using guessed type int dword_B68A4C;
// B68A50: using guessed type int dword_B68A50;
// B68A54: using guessed type int dword_B68A54;

//----- (00784FE0) --------------------------------------------------------
int __cdecl sub_784FE0(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int result; // eax@1
  int v7; // ebp@1
  int v8; // ecx@1
  int v9; // edx@1
  int v10; // ebx@1
  int v11; // edi@1
  int v12; // edx@4
  signed int v13; // esi@5
  char v14; // al@6
  int v15; // [sp+Ch] [bp-18h]@2
  int v16; // [sp+10h] [bp-14h]@4

  result = a5;
  v7 = *(_DWORD *)(a5 + 4);
  v8 = a1 + 16 * v7;
  v9 = a2 + 16 * v7;
  v10 = a4 + a6 * v7;
  v11 = *(_DWORD *)(a5 + 12);
  if ( v7 < v11 )
  {
    result = *(_DWORD *)(a5 + 8);
    v15 = a3 + 16 * v7;
    do
    {
      if ( *(_DWORD *)a5 < result )
      {
        v16 = v9;
        v12 = *(_DWORD *)a5;
        do
        {
          v13 = (signed int)(__CFADD__(v12, 2147483648) + v12 + 2147483648 + 2147483648) >> 1;
          *(_BYTE *)(v10 + 2 * v12) = *(_BYTE *)(v8 + 2 * v12);
          if ( v12 & 1 )
            v14 = *(_WORD *)(v15 + 2 * v13);
          else
            v14 = *(_WORD *)(v16 + 2 * v13);
          *(_BYTE *)(v10 + 2 * v12++ + 1) = v14;
          result = *(_DWORD *)(a5 + 8);
        }
        while ( v12 < result );
        v9 = v16;
        v11 = *(_DWORD *)(a5 + 12);
      }
      v8 += 16;
      v9 += 16;
      ++v7;
      v15 += 16;
      v10 += a6;
    }
    while ( v7 < v11 );
  }
  return result;
}

//----- (007850C0) --------------------------------------------------------
int __cdecl YCbCr_422_to_YCbYCr_Full_MCU_PX(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // edx@1
  int result; // eax@1
  char v7; // cl@2
  char v8; // cl@2
  bool v9; // sf@2
  unsigned __int8 v10; // of@2
  int v11; // [sp+4h] [bp-18h]@1
  int v12; // [sp+8h] [bp-14h]@1
  int v13; // [sp+Ch] [bp-10h]@1

  v5 = a1;
  result = a2;
  v12 = 0;
  v11 = a4;
  v13 = a3;
  do
  {
    *(_BYTE *)v11 = *(_BYTE *)v5;
    *(_BYTE *)(v11 + 1) = *(_BYTE *)result;
    *(_BYTE *)(v11 + 2) = *(_BYTE *)(v5 + 2);
    *(_BYTE *)(v11 + 3) = *(_BYTE *)v13;
    *(_BYTE *)(v11 + 4) = *(_BYTE *)(v5 + 4);
    *(_BYTE *)(v11 + 5) = *(_BYTE *)(result + 2);
    *(_BYTE *)(v11 + 6) = *(_BYTE *)(v5 + 6);
    *(_BYTE *)(v11 + 7) = *(_BYTE *)(v13 + 2);
    *(_BYTE *)(v11 + 8) = *(_BYTE *)(v5 + 8);
    *(_BYTE *)(v11 + 9) = *(_BYTE *)(result + 4);
    *(_BYTE *)(v11 + 10) = *(_BYTE *)(v5 + 10);
    *(_BYTE *)(v11 + 11) = *(_BYTE *)(v13 + 4);
    *(_BYTE *)(v11 + 12) = *(_BYTE *)(v5 + 12);
    *(_BYTE *)(v11 + 13) = *(_BYTE *)(result + 6);
    *(_BYTE *)(v11 + 14) = *(_BYTE *)(v5 + 14);
    *(_BYTE *)(v11 + 15) = *(_BYTE *)(v13 + 6);
    *(_BYTE *)(v11 + 16) = *(_BYTE *)(v5 + 128);
    *(_BYTE *)(v11 + 17) = *(_BYTE *)(result + 8);
    *(_BYTE *)(v11 + 18) = *(_BYTE *)(v5 + 130);
    *(_BYTE *)(v11 + 19) = *(_BYTE *)(v13 + 8);
    *(_BYTE *)(v11 + 20) = *(_BYTE *)(v5 + 132);
    *(_BYTE *)(v11 + 21) = *(_BYTE *)(result + 10);
    *(_BYTE *)(v11 + 22) = *(_BYTE *)(v5 + 134);
    *(_BYTE *)(v11 + 23) = *(_BYTE *)(v13 + 10);
    *(_BYTE *)(v11 + 24) = *(_BYTE *)(v5 + 136);
    *(_BYTE *)(v11 + 25) = *(_BYTE *)(result + 12);
    *(_BYTE *)(v11 + 26) = *(_BYTE *)(v5 + 138);
    *(_BYTE *)(v11 + 27) = *(_BYTE *)(v13 + 12);
    *(_BYTE *)(v11 + 28) = *(_BYTE *)(v5 + 140);
    v7 = *(_BYTE *)(result + 14);
    result += 16;
    *(_BYTE *)(v11 + 29) = v7;
    v8 = *(_BYTE *)(v5 + 142);
    v5 += 16;
    *(_BYTE *)(v11 + 30) = v8;
    *(_BYTE *)(v11 + 31) = *(_BYTE *)(v13 + 14);
    v13 += 16;
    v11 += a5;
    v10 = __OFSUB__(v12 + 1, 8);
    v9 = v12++ - 7 < 0;
  }
  while ( v9 ^ v10 );
  return result;
}

//----- (00785210) --------------------------------------------------------
signed int __cdecl YCbCr_422_to_YCbYCr_MCU(int a1, int a2, int a3)
{
  int v3; // esi@1
  int v4; // ebp@1
  int v5; // ebx@1
  signed int result; // eax@1
  int v7; // edi@2
  int v8; // [sp+30h] [bp-74h]@1
  int v9; // [sp+34h] [bp-70h]@1
  int v10; // [sp+38h] [bp-6Ch]@1
  int v11; // [sp+3Ch] [bp-68h]@1
  char v12; // [sp+40h] [bp-64h]@1
  int v13; // [sp+50h] [bp-54h]@4
  int v14; // [sp+54h] [bp-50h]@4
  int v15; // [sp+58h] [bp-4Ch]@4
  int v16; // [sp+5Ch] [bp-48h]@4
  int v17; // [sp+60h] [bp-44h]@4
  int v18; // [sp+64h] [bp-40h]@4
  int v19; // [sp+68h] [bp-3Ch]@4
  int v20; // [sp+6Ch] [bp-38h]@4
  char v21; // [sp+70h] [bp-34h]@6
  int v22; // [sp+80h] [bp-24h]@6
  int v23; // [sp+84h] [bp-20h]@6
  int v24; // [sp+88h] [bp-1Ch]@6
  int v25; // [sp+8Ch] [bp-18h]@6

  v3 = *(_DWORD *)(a1 + 60);
  v4 = *(_DWORD *)(a1 + 18484);
  v5 = *(_DWORD *)(a1 + 14320);
  v8 = dword_B68A58;
  v9 = dword_B68A5C;
  v10 = dword_B68A60;
  v11 = dword_B68A64;
  result = sub_775560(
             a1 + 4,
             16,
             8,
             a2,
             a3,
             *(_DWORD *)(a1 + 48),
             v3,
             *(_DWORD *)(a1 + 32),
             *(_DWORD *)(a1 + 36),
             *(_DWORD *)(a1 + 40),
             (_DWORD *)(a1 + 14356),
             (int)&v12);
  if ( !result )
  {
    v7 = *(_DWORD *)(a1 + 14356);
    if ( (unsigned __int8)operator==((int)&v12, (int)&v8) )
    {
      result = (*(int (__cdecl **)(int, int, int, int, int))(v5 + 220))(v4, v4 + 256, v4 + 384, v7, v3);
    }
    else
    {
      operator&((int)&v13, (int)&v12, (int)&unk_B68938);
      v17 = v13;
      v18 = v14;
      v19 = v15;
      v20 = v16;
      if ( (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0) )
        sub_784FE0(v4, v4 + 256, v4 + 384, v7, (int)&v17, v3);
      operator&((int)&v21, (int)&v12, (int)&unk_B68928);
      operator-((int)&v22, (int)&v21, (int)&unk_B68920);
      v17 = v22;
      v18 = v23;
      v19 = v24;
      v20 = v25;
      result = (unsigned __int8)operator!=((int)&v17, (int)dword_B688E0);
      if ( (_BYTE)result )
        result = sub_784FE0(v4 + 128, v4 + 264, v4 + 392, v7 + 16, (int)&v17, v3);
    }
  }
  return result;
}
// B68A58: using guessed type int dword_B68A58;
// B68A5C: using guessed type int dword_B68A5C;
// B68A60: using guessed type int dword_B68A60;
// B68A64: using guessed type int dword_B68A64;

//----- (00785460) --------------------------------------------------------
void __cdecl sub_785460(int a1, int a2, int a3, int a4)
{
  int v4; // edi@1
  int v5; // ecx@1
  int v6; // ebp@1
  int v7; // eax@2
  int v8; // edx@2
  int v9; // ebx@3
  signed int v10; // eax@4

  v4 = *(_DWORD *)(a3 + 4);
  v5 = *(_DWORD *)(a3 + 12);
  v6 = a2 + a4 * *(_DWORD *)(a3 + 4);
  if ( v4 < v5 )
  {
    v7 = *(_DWORD *)(a3 + 8);
    v8 = 16 * v4;
    do
    {
      v9 = *(_DWORD *)a3;
      if ( *(_DWORD *)a3 < v7 )
      {
        do
        {
          v10 = *(_WORD *)(a1 + v8 + 2 * v9);
          if ( v10 <= 255 )
          {
            if ( v10 < 0 )
              LOBYTE(v10) = 0;
          }
          else
          {
            LOBYTE(v10) = -1;
          }
          *(_BYTE *)(v9++ + v6) = v10;
          v7 = *(_DWORD *)(a3 + 8);
        }
        while ( v9 < v7 );
        v5 = *(_DWORD *)(a3 + 12);
      }
      v6 += a4;
      v8 += 16;
      ++v4;
    }
    while ( v4 < v5 );
  }
}

//----- (007854F0) --------------------------------------------------------
signed int __cdecl Y_111_to_Y_Full_MCU_PX(int a1, int a2, int a3)
{
  int v3; // ecx@1
  int v4; // edx@1
  signed int result; // eax@1
  signed int v6; // ebx@2
  signed int v7; // ebx@6
  signed int v8; // ebx@10
  signed int v9; // ebx@14
  signed int v10; // ebx@18
  signed int v11; // ebx@22
  signed int v12; // ebx@26
  signed int v13; // ebx@30

  v3 = a1;
  v4 = a2;
  result = 0;
  do
  {
    v6 = *(_WORD *)v3;
    if ( v6 <= 255 )
    {
      if ( v6 < 0 )
        LOBYTE(v6) = 0;
    }
    else
    {
      LOBYTE(v6) = -1;
    }
    *(_BYTE *)v4 = v6;
    v7 = *(_WORD *)(v3 + 2);
    if ( v7 <= 255 )
    {
      if ( v7 < 0 )
        LOBYTE(v7) = 0;
    }
    else
    {
      LOBYTE(v7) = -1;
    }
    *(_BYTE *)(v4 + 1) = v7;
    v8 = *(_WORD *)(v3 + 4);
    if ( v8 <= 255 )
    {
      if ( v8 < 0 )
        LOBYTE(v8) = 0;
    }
    else
    {
      LOBYTE(v8) = -1;
    }
    *(_BYTE *)(v4 + 2) = v8;
    v9 = *(_WORD *)(v3 + 6);
    if ( v9 <= 255 )
    {
      if ( v9 < 0 )
        LOBYTE(v9) = 0;
    }
    else
    {
      LOBYTE(v9) = -1;
    }
    *(_BYTE *)(v4 + 3) = v9;
    v10 = *(_WORD *)(v3 + 8);
    if ( v10 <= 255 )
    {
      if ( v10 < 0 )
        LOBYTE(v10) = 0;
    }
    else
    {
      LOBYTE(v10) = -1;
    }
    *(_BYTE *)(v4 + 4) = v10;
    v11 = *(_WORD *)(v3 + 10);
    if ( v11 <= 255 )
    {
      if ( v11 < 0 )
        LOBYTE(v11) = 0;
    }
    else
    {
      LOBYTE(v11) = -1;
    }
    *(_BYTE *)(v4 + 5) = v11;
    v12 = *(_WORD *)(v3 + 12);
    if ( v12 <= 255 )
    {
      if ( v12 < 0 )
        LOBYTE(v12) = 0;
    }
    else
    {
      LOBYTE(v12) = -1;
    }
    *(_BYTE *)(v4 + 6) = v12;
    v13 = *(_WORD *)(v3 + 14);
    if ( v13 <= 255 )
    {
      if ( v13 < 0 )
        LOBYTE(v13) = 0;
    }
    else
    {
      LOBYTE(v13) = -1;
    }
    v3 += 16;
    ++result;
    *(_BYTE *)(v4 + 7) = v13;
    v4 += a3;
  }
  while ( result < 8 );
  return result;
}

//----- (00785620) --------------------------------------------------------
void __cdecl Y_111_to_Y_MCU(int a1, int a2, int a3)
{
  int v3; // esi@1
  int v4; // ebp@1
  int v5; // ebx@1
  int v6; // edi@2
  int v7; // [sp+30h] [bp-54h]@1
  int v8; // [sp+34h] [bp-50h]@1
  int v9; // [sp+38h] [bp-4Ch]@1
  int v10; // [sp+3Ch] [bp-48h]@1
  char v11; // [sp+40h] [bp-44h]@1
  int v12; // [sp+50h] [bp-34h]@4
  int v13; // [sp+54h] [bp-30h]@4
  int v14; // [sp+58h] [bp-2Ch]@4
  int v15; // [sp+5Ch] [bp-28h]@4
  int v16; // [sp+60h] [bp-24h]@4
  int v17; // [sp+64h] [bp-20h]@4
  int v18; // [sp+68h] [bp-1Ch]@4
  int v19; // [sp+6Ch] [bp-18h]@4

  v3 = *(_DWORD *)(a1 + 60);
  v4 = *(_DWORD *)(a1 + 18484);
  v5 = *(_DWORD *)(a1 + 14320);
  v7 = dword_B68A68;
  v8 = dword_B68A6C;
  v9 = dword_B68A70;
  v10 = dword_B68A74;
  if ( !sub_775560(
          a1 + 4,
          8,
          8,
          a2,
          a3,
          *(_DWORD *)(a1 + 48),
          v3,
          *(_DWORD *)(a1 + 32),
          *(_DWORD *)(a1 + 36),
          *(_DWORD *)(a1 + 40),
          (_DWORD *)(a1 + 14356),
          (int)&v11) )
  {
    v6 = *(_DWORD *)(a1 + 14356);
    if ( (unsigned __int8)operator==((int)&v11, (int)&v7) )
    {
      (*(void (__cdecl **)(int, int, int))(v5 + 164))(v4, v6, v3);
    }
    else
    {
      operator&((int)&v12, (int)&v11, (int)&unk_B68938);
      v16 = v12;
      v17 = v13;
      v18 = v14;
      v19 = v15;
      if ( (unsigned __int8)operator!=((int)&v16, (int)dword_B688E0) )
        sub_785460(v4, v6, (int)&v16, v3);
    }
  }
}
// B68A68: using guessed type int dword_B68A68;
// B68A6C: using guessed type int dword_B68A6C;
// B68A70: using guessed type int dword_B68A70;
// B68A74: using guessed type int dword_B68A74;

//----- (00785790) --------------------------------------------------------
signed int __cdecl Output_Interleave_General_MCU(int a1, int a2, int a3)
{
  signed int result; // eax@1
  int v4; // ecx@2
  int v5; // esi@3
  int v6; // edx@4
  int v7; // esi@7
  int v8; // edi@7
  int v9; // ebx@7
  int v10; // eax@8
  int v11; // esi@8
  int v12; // edx@8
  int v13; // ecx@9
  int v14; // ebx@10
  int v15; // esi@11
  int v16; // eax@12
  int v17; // edi@12
  int v18; // edx@12
  int v19; // ecx@13
  int v20; // ebx@14
  char v21; // al@16
  int v22; // edx@16
  int v23; // ecx@19
  int v24; // ebx@19
  int v25; // esi@32
  int v26; // edi@32
  int v27; // eax@33
  int v28; // edx@34
  signed int v29; // esi@35
  int v30; // ecx@37
  int v31; // ecx@48
  int v32; // ebx@48
  int v33; // eax@49
  int v34; // esi@49
  int v35; // edi@49
  int v36; // edx@50
  int v37; // esi@53
  int v38; // [sp+30h] [bp-44h]@1
  int v39; // [sp+34h] [bp-40h]@11
  int v40; // [sp+38h] [bp-3Ch]@12
  int v41; // [sp+3Ch] [bp-38h]@10
  int v42; // [sp+40h] [bp-34h]@8
  int v43; // [sp+44h] [bp-30h]@8
  int v44; // [sp+48h] [bp-2Ch]@12
  int v45; // [sp+4Ch] [bp-28h]@14
  int v46; // [sp+50h] [bp-24h]@5
  int v47; // [sp+54h] [bp-20h]@7
  int v48; // [sp+58h] [bp-1Ch]@5
  int v49; // [sp+5Ch] [bp-18h]@5

  result = sub_775560(
             a1 + 4,
             8,
             8,
             a2,
             a3,
             *(_DWORD *)(a1 + 48),
             *(_DWORD *)(a1 + 60),
             *(_DWORD *)(a1 + 32),
             *(_DWORD *)(a1 + 36),
             *(_DWORD *)(a1 + 40),
             (_DWORD *)(a1 + 14356),
             (int)&v38);
  if ( !result )
  {
    v4 = *(_DWORD *)(a1 + 18484);
    result = *(_DWORD *)(a1 + 52);
    if ( result != 2 || *(_DWORD *)(a1 + 88) != 1 )
      v5 = *(_DWORD *)(a1 + 14356);
    else
      v5 = *(_DWORD *)(a1 + 14356) + 2;
    v6 = 0;
    if ( *(_DWORD *)(a1 + 48) > 0 )
    {
      v49 = *(_DWORD *)(a1 + 48);
      v48 = v5;
      v46 = v4;
LABEL_6:
      if ( v6 >= *(_DWORD *)(a1 + 14272) )
      {
        if ( v6 == 3 && result == 5 )
        {
          v31 = v39;
          v32 = v41;
          if ( v39 < v41 )
          {
            v33 = v40;
            v34 = v49;
            v35 = v48;
            v42 = 3;
            do
            {
              v36 = v38;
              if ( v38 < v33 )
              {
                while ( 1 )
                {
                  v37 = v36++ * v34;
                  *(_BYTE *)(v37 + v35 + *(_DWORD *)(a1 + 60) * v31) = -1;
                  v33 = v40;
                  if ( v36 >= v40 )
                    break;
                  v34 = *(_DWORD *)(a1 + 48);
                }
                v34 = *(_DWORD *)(a1 + 48);
                v32 = v41;
              }
              ++v31;
            }
            while ( v31 < v32 );
            v49 = v34;
            v6 = v42;
            result = *(_DWORD *)(a1 + 52);
            v48 = v35;
          }
          v46 += 128;
        }
      }
      else
      {
        v7 = *(_DWORD *)(a1 + 14284);
        v47 = 0;
        v8 = v7 + 16 * v6;
        v9 = *(_DWORD *)(v8 + 8);
        if ( v9 > 0 )
        {
          v10 = *(_DWORD *)(16 * v6 + v7 + 4);
          v11 = v47;
          v43 = 16 * v6;
          v42 = v6;
          v12 = v46;
          do
          {
            v13 = 0;
            if ( v10 > 0 )
            {
              v14 = v41;
              v47 = v11;
              do
              {
                v15 = v39;
                if ( v39 < v14 )
                {
                  v16 = v40;
                  v17 = 16 * v39;
                  v46 = v12;
                  v18 = v49;
                  v44 = v13;
                  do
                  {
                    v19 = v38;
                    if ( v38 < v16 )
                    {
                      v20 = v46 + v17;
                      v45 = v17;
                      while ( 1 )
                      {
                        v21 = *(_BYTE *)(v20 + 2 * v19);
                        v22 = v19++ * v18;
                        *(_BYTE *)(v22 + v48 + *(_DWORD *)(a1 + 60) * v15) = v21;
                        v16 = v40;
                        if ( v19 >= v40 )
                          break;
                        v18 = *(_DWORD *)(a1 + 48);
                      }
                      v17 = v45;
                      v18 = *(_DWORD *)(a1 + 48);
                      v14 = v41;
                    }
                    v17 += 16;
                    ++v15;
                  }
                  while ( v15 < v14 );
                  v49 = v18;
                  v12 = v46;
                  v13 = v44;
                  v8 = v43 + *(_DWORD *)(a1 + 14284);
                  v10 = *(_DWORD *)(v8 + 4);
                }
                v12 += 128;
                ++v13;
              }
              while ( v13 < v10 );
              v11 = v47;
              v9 = *(_DWORD *)(v8 + 8);
            }
            ++v11;
          }
          while ( v11 < v9 );
          v46 = v12;
          v6 = v42;
          result = *(_DWORD *)(a1 + 52);
        }
      }
      v23 = v49;
      v24 = v48;
      while ( 1 )
      {
        if ( result != 2 || *(_DWORD *)(a1 + 88) != 1 )
          ++v24;
        else
          --v24;
        if ( ++v6 >= v23 )
          break;
        if ( v6 <= 0 )
        {
          v49 = v23;
          v48 = v24;
          goto LABEL_6;
        }
        if ( *(_DWORD *)(a1 + 88) != 4 )
        {
          v49 = v23;
          v48 = v24;
          goto LABEL_6;
        }
        v25 = v39;
        v26 = v41;
        if ( v39 < v41 )
        {
          v27 = v40;
          v42 = v6;
          do
          {
            v28 = v38;
            if ( v38 < v27 )
            {
              v47 = v25;
              v29 = v42;
              while ( 1 )
              {
                v30 = v28 * v23;
                *(_BYTE *)(v30 + v24 + *(_DWORD *)(a1 + 60) * v47) = v29 >= 3 ? -1 : *(_BYTE *)(v30
                                                                                              + v24
                                                                                              + *(_DWORD *)(a1 + 60)
                                                                                              * v47
                                                                                              - 1);
                ++v28;
                v27 = v40;
                if ( v28 >= v40 )
                  break;
                v23 = *(_DWORD *)(a1 + 48);
              }
              v25 = v47;
              v23 = *(_DWORD *)(a1 + 48);
              v26 = v41;
            }
            ++v25;
          }
          while ( v25 < v26 );
          v6 = v42;
          result = *(_DWORD *)(a1 + 52);
        }
      }
    }
  }
  return result;
}

//----- (00785B00) --------------------------------------------------------
signed int __cdecl US_General_MCU(int a1, int a2, int a3)
{
  int v3; // ebp@1
  char *v4; // ebx@1
  signed int result; // eax@1
  int v6; // esi@2
  int v7; // ecx@2
  int v8; // eax@2
  int v9; // esi@3
  int v10; // edx@5
  int v11; // ecx@7
  signed int v12; // esi@7
  int v13; // ecx@8
  int v14; // edx@12
  signed int v15; // edi@12
  signed int v16; // ebx@12
  int v17; // ecx@13
  int v18; // eax@13
  int v19; // edx@15
  int v20; // ebx@16
  int v21; // ebp@16
  int v22; // esi@16
  int v23; // edi@16
  char *v24; // ecx@17
  int v25; // eax@17
  int v26; // edx@18
  int v27; // esi@19
  int v28; // edx@20
  int v29; // ebp@20
  int v30; // eax@21
  signed int v31; // ebp@22
  _WORD *v32; // esi@22
  __int16 v33; // cx@23
  int v34; // ebx@23
  int v35; // edi@24
  char v36; // al@24
  int v37; // ecx@25
  int v38; // esi@27
  int v39; // edx@27
  int v40; // edx@48
  int v41; // eax@49
  int v42; // esi@49
  int v43; // ecx@49
  char *v44; // ebx@50
  int i; // ebp@50
  int v46; // edi@53
  int v47; // esi@55
  int v48; // edi@55
  int v49; // edx@55
  int v50; // eax@56
  int v51; // esi@57
  int v52; // ebp@57
  _WORD *v53; // edx@57
  int v54; // ebx@58
  signed int v55; // edi@59
  int v56; // eax@60
  int v57; // ecx@60
  int v58; // edx@62
  int v59; // ebp@64
  char v60; // al@64
  int v61; // ebx@64
  char v62; // al@67
  int v63; // ebx@67
  int v64; // eax@82
  int v65; // edx@82
  int v66; // esi@83
  int v67; // edi@83
  int v68; // ebx@84
  int v69; // ecx@84
  int v70; // edi@89
  int v71; // ebp@89
  int v72; // eax@89
  int v73; // esi@89
  int v74; // ecx@89
  int v75; // ebx@89
  int v76; // ecx@89
  int v77; // ebx@89
  int v78; // edx@90
  int v79; // esi@90
  int v80; // ebp@91
  int v81; // ecx@92
  int v82; // ecx@94
  int v83; // ecx@95
  int v84; // esi@96
  int v85; // edx@96
  int v86; // ecx@96
  int v87; // ebp@96
  int v88; // esi@96
  int v89; // ecx@96
  int v90; // esi@96
  int v91; // edx@97
  int v92; // ebp@97
  int v93; // edi@97
  int v94; // ebx@98
  int v95; // edi@103
  int v96; // esi@103
  int v97; // ebp@103
  int v98; // ecx@103
  int v99; // ebx@103
  int v100; // ebp@103
  int v101; // ebx@104
  char *v102; // edi@106
  int v103; // edx@106
  int v104; // ebx@108
  int v105; // edx@108
  _WORD *v106; // ecx@108
  int v107; // esi@114
  int v108; // ebp@114
  int v109; // ebp@114
  int v110; // ebp@114
  int v111; // ebp@114
  int v112; // ebp@114
  int v113; // ebp@114
  int v114; // ebp@114
  int v115; // edx@116
  int v116; // edi@116
  int v117; // edi@122
  int v118; // eax@132
  int v119; // esi@139
  signed int v120; // edx@140
  int v121; // esi@141
  int v122; // edi@142
  int v123; // esi@142
  int v124; // ecx@142
  signed int v125; // edx@145
  int v126; // ebp@145
  int v127; // esi@145
  int v128; // ebx@145
  int v129; // eax@145
  int v130; // edi@145
  int v131; // edx@145
  int v132; // edx@145
  int v133; // esi@147
  int v134; // edx@149
  int v135; // esi@149
  int v136; // edx@150
  int v137; // ecx@150
  int v138; // edx@154
  bool v139; // zf@154
  bool v140; // sf@154
  unsigned __int8 v141; // of@154
  int v142; // edi@155
  signed int v143; // eax@155
  signed int v144; // esi@155
  int v145; // ecx@155
  signed int v146; // esi@155
  char v147[1280]; // [sp+30h] [bp-5ACh]@17
  char v148; // [sp+530h] [bp-ACh]@4
  char *v149; // [sp+540h] [bp-9Ch]@64
  int v150; // [sp+544h] [bp-98h]@16
  int v151; // [sp+548h] [bp-94h]@2
  int v152; // [sp+54Ch] [bp-90h]@2
  int v153; // [sp+550h] [bp-8Ch]@2
  int v154; // [sp+554h] [bp-88h]@3
  char v155; // [sp+558h] [bp-84h]@3
  _WORD *v156; // [sp+55Ch] [bp-80h]@3
  int v157; // [sp+560h] [bp-7Ch]@3
  int v158; // [sp+564h] [bp-78h]@3
  int v159; // [sp+568h] [bp-74h]@3
  int v160; // [sp+56Ch] [bp-70h]@3
  int v161; // [sp+570h] [bp-6Ch]@3
  int v162; // [sp+574h] [bp-68h]@3
  _WORD *v163; // [sp+578h] [bp-64h]@3
  int v164; // [sp+57Ch] [bp-60h]@64
  int v165; // [sp+580h] [bp-5Ch]@61
  int v166; // [sp+584h] [bp-58h]@61
  char *v167; // [sp+588h] [bp-54h]@24
  int v168; // [sp+58Ch] [bp-50h]@24
  int v169; // [sp+590h] [bp-4Ch]@18
  int v170; // [sp+594h] [bp-48h]@16
  char *v171; // [sp+598h] [bp-44h]@16
  int v172; // [sp+59Ch] [bp-40h]@16
  int v173; // [sp+5A0h] [bp-3Ch]@12
  int v174; // [sp+5A4h] [bp-38h]@22
  char *v175; // [sp+5A8h] [bp-34h]@22
  int v176; // [sp+5ACh] [bp-30h]@12
  char *v177; // [sp+5B0h] [bp-2Ch]@22
  char *v178; // [sp+5B4h] [bp-28h]@24
  int v179; // [sp+5B8h] [bp-24h]@20
  char *v180; // [sp+5BCh] [bp-20h]@16
  int v181; // [sp+5C0h] [bp-1Ch]@7
  int v182; // [sp+5C4h] [bp-18h]@7

  v3 = a1;
  v4 = 0;
  result = *(_DWORD *)(a1 + 14304);
  if ( *(_DWORD *)result == 1 )
  {
    v138 = *(_DWORD *)(a1 + 48);
    v141 = __OFSUB__(v138, *(_DWORD *)(a1 + 14368));
    v139 = v138 == *(_DWORD *)(a1 + 14368);
    v140 = v138 - *(_DWORD *)(a1 + 14368) < 0;
    v151 = *(_DWORD *)(a1 + 48);
    if ( (unsigned __int8)(v140 ^ v141) | v139 )
      return result;
    v142 = *(_DWORD *)(result + 52);
    v143 = *(_DWORD *)(a1 + 14264);
    v144 = *(_DWORD *)(v142 + 4);
    v154 = v142;
    v152 = v143;
    v145 = v143 / v144;
    v146 = *(_DWORD *)(v142 + 8);
    v153 = *(_DWORD *)(a1 + 14268);
    v7 = 8 * v145;
    v8 = 8 * (v153 / v146);
  }
  else
  {
    v6 = *(_DWORD *)(a1 + 14268);
    v152 = *(_DWORD *)(a1 + 14264);
    v7 = 8 * v152;
    v153 = v6;
    v8 = 8 * v6;
    v151 = *(_DWORD *)(a1 + 48);
  }
  v9 = *(_DWORD *)(a1 + 19944);
  v156 = *(_WORD **)(a1 + 18484);
  v154 = 0;
  v162 = 0;
  v160 = 0;
  v157 = 0;
  v161 = 0;
  v158 = 0;
  v159 = 0;
  v163 = 0;
  v155 = 0;
  if ( v9 == 1 )
  {
    if ( v152 == 2 && v153 == 1 )
    {
      v133 = *(_DWORD *)(a1 + 116);
      v155 = 1;
      if ( v133 )
      {
        v162 = 1;
      }
      else
      {
        v134 = *(_DWORD *)(a1 + 14272);
        v162 = 0;
        v135 = v134 - 1;
        if ( v134 )
        {
          v154 = *(_DWORD *)(a1 + 14284);
          v136 = 16 * v135;
          v150 = v7;
          v137 = v162;
          v149 = 0;
          do
          {
            --v135;
            v137 += *(_DWORD *)(v136 + v154 + 8) * *(_DWORD *)(v136 + v154 + 4);
            v136 -= 16;
          }
          while ( v135 != -1 );
          v162 = v137;
          v7 = v150;
          v4 = v149;
          v3 = a1;
        }
      }
      v181 = v162 << 6;
      v180 = *(char **)(v3 + 19948);
      v154 = *((_DWORD *)v180 + 1) + (v162 << 6) * 2 * a2;
      v162 = v154 + (v162 << 8);
    }
    if ( v152 == 2 && v153 == 2 )
    {
      v119 = *(_DWORD *)(v3 + 116);
      v155 = 2;
      if ( v119 )
      {
        v120 = 1;
      }
      else
      {
        v121 = *(_DWORD *)(v3 + 14272);
        v120 = 0;
        v154 = v121 - 1;
        if ( v121 )
        {
          v122 = *(_DWORD *)(v3 + 14284);
          v153 = *(_DWORD *)(v3 + 14284);
          v123 = 16 * v154;
          v150 = v7;
          v124 = v154;
          v149 = v4;
          do
          {
            --v124;
            v120 += *(_DWORD *)(v123 + v122 + 8) * *(_DWORD *)(v123 + v122 + 4);
            v123 -= 16;
          }
          while ( v124 != -1 );
          v7 = v150;
          v4 = v149;
          v3 = a1;
        }
      }
      v125 = v120 << 6;
      v126 = *(_DWORD *)(v3 + 19948);
      v149 = v4;
      v127 = *(_DWORD *)v126;
      v150 = v7;
      v182 = v8;
      v128 = 2 * v125 * (a2 + 1);
      v129 = v125 * 2 * a2;
      v157 = v128;
      v160 = v127 + v128;
      v130 = (a2 + 2) * 2 * v125;
      v161 = v127 + v129;
      v131 = *(_DWORD *)(v126 + 4);
      v158 = v130 + v127;
      v4 = v149;
      v154 = v131 + v129;
      v162 = v130 + v131;
      v132 = *(_DWORD *)(v126 + 8);
      v157 += v132;
      v3 = a1;
      v159 = v132 + v129;
      v8 = v182;
      v163 = (_WORD *)(v130 + v132);
    }
  }
  result = sub_775560(
             v3 + 4,
             v7,
             v8,
             a2,
             a3,
             v151,
             *(_DWORD *)(v3 + 60),
             *(_DWORD *)(v3 + 32),
             *(_DWORD *)(v3 + 36),
             *(_DWORD *)(v3 + 40),
             (_DWORD *)(v3 + 14356),
             (int)&v148);
  if ( !result )
  {
    v10 = *(_DWORD *)(v3 + 52);
    if ( v10 != 2 || *(_DWORD *)(v3 + 88) != 1 )
    {
      v153 = *(_DWORD *)(v3 + 14368) + *(_DWORD *)(v3 + 14356);
    }
    else
    {
      v153 = *(_DWORD *)(v3 + 14356);
      v118 = *(_DWORD *)(v3 + 14368);
      if ( v118 )
      {
        if ( v118 == 1 )
          ++v153;
      }
      else
      {
        v153 += 2;
      }
    }
    v11 = **(_DWORD **)(v3 + 14304);
    v12 = 0;
    v182 = 0;
    v181 = v11;
    while ( 1 )
    {
      result = *(_DWORD *)(v3 + 48);
      v13 = v181;
      if ( v181 >= result )
        v13 = *(_DWORD *)(v3 + 48);
      if ( v12 >= v13 )
        break;
      if ( v181 != 1 || *(_DWORD *)(v3 + 19936) )
      {
        v14 = *(_DWORD *)(*(_DWORD *)(v3 + 14304) + 52);
        v15 = *(_DWORD *)(v182 + v14 + 8);
        v16 = *(_DWORD *)(v182 + v14 + 4);
        v173 = *(_DWORD *)(v182 + v14 + 8);
        v176 = v16;
      }
      else
      {
        v115 = *(_DWORD *)(v3 + 14304);
        v173 = 1;
        v116 = *(_DWORD *)(v115 + 52);
        v176 = 1;
        v16 = *(_DWORD *)(v182 + v116 + 4);
        v15 = *(_DWORD *)(v182 + v116 + 8);
      }
      v17 = *(_DWORD *)(v3 + 14264) / v16;
      v18 = *(_DWORD *)(v3 + 14268) / v15;
      if ( v155 == 1 )
      {
        v102 = v147;
        v103 = 0;
        if ( v176 > 0 )
        {
          v152 = v12;
          do
          {
            v104 = (int)v102;
            v179 = v103;
            v105 = (int)v156;
            v178 = v102 + 256;
            v180 = v102;
            v150 = v17;
            v106 = (_WORD *)v162;
            do
            {
              if ( v150 == 2 )
              {
                v107 = *(_WORD *)v105;
                *(_BYTE *)v104 = (*(_WORD *)(v154 + 14) + 3 * v107 + 1) >> 2;
                *(_BYTE *)(v104 + 1) = (*(_WORD *)(v105 + 2) + 3 * v107 + 2) >> 2;
                v108 = 3 * *(_WORD *)(v105 + 2);
                *(_BYTE *)(v104 + 2) = (v108 + *(_WORD *)v105 + 1) >> 2;
                *(_BYTE *)(v104 + 3) = (v108 + *(_WORD *)(v105 + 4) + 2) >> 2;
                v109 = 3 * *(_WORD *)(v105 + 4);
                *(_BYTE *)(v104 + 4) = (v109 + *(_WORD *)(v105 + 2) + 1) >> 2;
                *(_BYTE *)(v104 + 5) = (v109 + *(_WORD *)(v105 + 6) + 2) >> 2;
                v110 = 3 * *(_WORD *)(v105 + 6);
                *(_BYTE *)(v104 + 6) = (v110 + *(_WORD *)(v105 + 4) + 1) >> 2;
                *(_BYTE *)(v104 + 7) = (v110 + *(_WORD *)(v105 + 8) + 2) >> 2;
                v111 = 3 * *(_WORD *)(v105 + 8);
                *(_BYTE *)(v104 + 8) = (v111 + *(_WORD *)(v105 + 6) + 1) >> 2;
                *(_BYTE *)(v104 + 9) = (v111 + *(_WORD *)(v105 + 10) + 2) >> 2;
                v112 = 3 * *(_WORD *)(v105 + 10);
                *(_BYTE *)(v104 + 10) = (v112 + *(_WORD *)(v105 + 8) + 1) >> 2;
                *(_BYTE *)(v104 + 11) = (v112 + *(_WORD *)(v105 + 12) + 2) >> 2;
                v113 = 3 * *(_WORD *)(v105 + 12);
                *(_BYTE *)(v104 + 12) = (v113 + *(_WORD *)(v105 + 10) + 1) >> 2;
                *(_BYTE *)(v104 + 13) = (v113 + *(_WORD *)(v105 + 14) + 2) >> 2;
                v114 = 3 * *(_WORD *)(v105 + 14);
                *(_BYTE *)(v104 + 14) = (*(_WORD *)(v105 + 12) + v114 + 1) >> 2;
                *(_BYTE *)(v104 + 15) = (*v106 + v114 + 2) >> 2;
              }
              else
              {
                *(_BYTE *)v104 = *(_BYTE *)v105;
                *(_BYTE *)(v104 + 1) = *(_BYTE *)(v105 + 2);
                *(_BYTE *)(v104 + 2) = *(_BYTE *)(v105 + 4);
                *(_BYTE *)(v104 + 3) = *(_BYTE *)(v105 + 6);
                *(_BYTE *)(v104 + 4) = *(_BYTE *)(v105 + 8);
                *(_BYTE *)(v104 + 5) = *(_BYTE *)(v105 + 10);
                *(_BYTE *)(v104 + 6) = *(_BYTE *)(v105 + 12);
                *(_BYTE *)(v104 + 7) = *(_BYTE *)(v105 + 14);
              }
              v105 += 16;
              v106 += 8;
              v104 += 32;
              v154 += 16;
            }
            while ( (signed int)v178 > v104 );
            v156 = (_WORD *)v105;
            v162 = (int)v106;
            v17 = v150;
            v102 = &v180[8 * v150];
            v103 = v179 + 1;
          }
          while ( v179 + 1 < v176 );
          v12 = v152;
          v3 = a1;
        }
      }
      else if ( v155 == 2 )
      {
        v40 = 0;
        if ( v173 > 0 )
        {
          v169 = v18 << 8;
          v168 = 8 * v17;
          v167 = (char *)(32 * v18);
          v180 = (char *)(v17 - 6);
          v152 = v12;
          v151 = v18;
          v41 = v176;
          v42 = v173;
          v150 = v17;
          v43 = v169;
          do
          {
            v44 = &v147[v40 * v43];
            for ( i = 0; i < v41; ++i )
            {
              if ( v150 != 2 || v151 != 2 )
              {
                v40 = 0;
                if ( v42 > 0 )
                {
                  v46 = 0;
                  do
                  {
                    v44 = &v147[v46];
                    i = 0;
                    if ( v41 > 0 )
                    {
                      v175 = (char *)v46;
                      v47 = v160;
                      v48 = v162;
                      v174 = v40;
                      v49 = v154;
                      do
                      {
                        v50 = 0;
                        if ( v43 > 0 )
                        {
                          v160 = v47;
                          v51 = v168;
                          v171 = v44;
                          v172 = i;
                          v162 = v48;
                          v52 = (int)v167;
                          v154 = v49;
                          v53 = v156;
                          do
                          {
                            v54 = 0;
                            if ( v51 > 0 )
                            {
                              v170 = v50;
                              v55 = v150;
                              do
                              {
                                v56 = *v53;
                                v57 = 0;
                                ++v53;
                                if ( v52 > 0 )
                                {
                                  v156 = v53;
                                  v166 = v54;
                                  v165 = v56;
                                  do
                                  {
                                    v58 = 0;
                                    if ( v55 > 0 )
                                    {
                                      if ( v55 < 6 )
                                      {
                                        v149 = &v171[v166] + v170 + v57;
                                        v164 = (unsigned __int8)v165;
                                      }
                                      else
                                      {
                                        v59 = (int)(&v171[v166] + v170 + v57);
                                        v149 = &v171[v166] + v170 + v57;
                                        v60 = v165;
                                        v164 = (unsigned __int8)v165;
                                        v61 = (int)v180;
                                        do
                                        {
                                          *(_BYTE *)(v59 + v58) = v60;
                                          *(_BYTE *)(v59 + v58 + 1) = v60;
                                          *(_BYTE *)(v59 + v58 + 2) = v60;
                                          *(_BYTE *)(v59 + v58 + 3) = v60;
                                          *(_BYTE *)(v59 + v58 + 4) = v60;
                                          v58 += 5;
                                        }
                                        while ( v58 <= v61 );
                                        v55 = v150;
                                      }
                                      v62 = v164;
                                      v63 = (int)v149;
                                      do
                                        *(_BYTE *)(v63 + v58++) = v62;
                                      while ( v58 < v55 );
                                    }
                                    v57 += 32;
                                  }
                                  while ( v57 < (signed int)v167 );
                                  v53 = v156;
                                  v54 = v166;
                                  v52 = (int)v167;
                                  v51 = v168;
                                }
                                v54 += v55;
                              }
                              while ( v54 < v51 );
                              v50 = v170;
                              v43 = v169;
                            }
                            v50 += v52;
                          }
                          while ( v50 < v43 );
                          v156 = v53;
                          v47 = v160;
                          v44 = v171;
                          i = v172;
                          v48 = v162;
                          v49 = v154;
                        }
                        v44 += 8 * v150;
                        v47 += 128;
                        v49 += 128;
                        v48 += 128;
                        ++i;
                        v157 += 128;
                        v41 = v176;
                        v161 += 128;
                        v158 += 128;
                        v159 += 128;
                        v163 += 64;
                      }
                      while ( i < v176 );
                      v160 = v47;
                      v42 = v173;
                      v162 = v48;
                      v46 = (int)v175;
                      v154 = v49;
                      v40 = v174;
                    }
                    v46 += v43;
                    ++v40;
                  }
                  while ( v40 < v42 );
                }
              }
              else
              {
                v64 = (int)v156;
                v175 = 0;
                v171 = v44;
                v178 = (char *)7;
                v172 = i;
                v174 = v40;
                v65 = 0;
                do
                {
                  v66 = 9 * *(_WORD *)v64;
                  v67 = 3 * *(_WORD *)(v154 + 14);
                  v177 = (char *)(3 * *(_WORD *)(v64 + 2));
                  if ( v65 )
                  {
                    v68 = 3 * *(_WORD *)(v64 - 16);
                    v69 = *(_WORD *)(v64 - 14);
                    v165 = *(_WORD *)(v154 - 2);
                    v149 = (char *)v69;
                  }
                  else
                  {
                    v68 = 3 * *(_WORD *)(v160 + 112);
                    v165 = *(_WORD *)(v161 + 126);
                    v149 = (char *)*(_WORD *)(v160 + 114);
                  }
                  if ( v178 )
                  {
                    v170 = 3 * *(_WORD *)(v64 + 16);
                    v166 = *(_WORD *)(v154 + 30);
                    v164 = *(_WORD *)(v64 + 18);
                  }
                  else
                  {
                    v170 = 3 * *(_WORD *)v157;
                    v166 = *(_WORD *)(v159 + 14);
                    v164 = *(_WORD *)(v157 + 2);
                  }
                  v70 = v66 + v67;
                  v71 = (int)v171;
                  v171[v65] = (v70 + v68 + v165 + 8) >> 4;
                  v72 = v64 + 2;
                  v73 = (int)&v177[v66];
                  v74 = v166;
                  *(_BYTE *)(v65 + v71 + 1) = (signed int)(&v149[v68 + 7] + v73) >> 4;
                  v75 = v73 + v170;
                  *(_BYTE *)(v65 + v71 + 32) = (v170 + v70 + v74 + 8) >> 4;
                  v76 = (v75 + v164 + 7) >> 4;
                  v77 = v71 + v65 + 2;
                  *(_BYTE *)(v65 + v71 + 33) = v76;
                  v160 += 2;
                  v157 += 2;
                  v177 = (char *)(v71 + v65 + 14);
                  v175 = (char *)v65;
                  do
                  {
                    v78 = 9 * *(_WORD *)v72;
                    v79 = 3 * *(_WORD *)(v72 - 2);
                    v170 = 3 * *(_WORD *)(v72 + 2);
                    if ( v175 )
                    {
                      v80 = 3 * *(_WORD *)(v72 - 16);
                      v164 = *(_WORD *)(v72 - 18);
                      v165 = *(_WORD *)(v72 - 14);
                    }
                    else
                    {
                      v80 = 3 * *(_WORD *)(v160 + 112);
                      v81 = *(_WORD *)(v160 + 114);
                      v164 = *(_WORD *)(v160 + 110);
                      v165 = v81;
                    }
                    if ( v178 )
                    {
                      v82 = *(_WORD *)(v72 + 14);
                      v179 = 3 * *(_WORD *)(v72 + 16);
                      v149 = (char *)v82;
                      v166 = *(_WORD *)(v72 + 18);
                    }
                    else
                    {
                      v179 = 3 * *(_WORD *)v157;
                      v83 = *(_WORD *)(v157 + 2);
                      v149 = (char *)*(_WORD *)(v157 - 2);
                      v166 = v83;
                    }
                    v84 = v78 + v79;
                    v72 += 2;
                    *(_BYTE *)v77 = (v84 + v80 + v164 + 8) >> 4;
                    v85 = v170 + v78;
                    v86 = (v85 + v80 + v165 + 7) >> 4;
                    v87 = v179;
                    v88 = v179 + v84;
                    *(_BYTE *)(v77 + 1) = v86;
                    v89 = (signed int)&v149[v88 + 8] >> 4;
                    v90 = v166;
                    *(_BYTE *)(v77 + 32) = v89;
                    *(_BYTE *)(v77 + 33) = (v85 + v87 + v90 + 7) >> 4;
                    v77 += 2;
                    v160 += 2;
                    v157 += 2;
                  }
                  while ( (signed int)v177 > v77 );
                  v91 = (int)v175;
                  v92 = 9 * *(_WORD *)v72;
                  v93 = 3 * *(_WORD *)(v72 - 2);
                  v177 = (char *)(3 * *(_WORD *)v162);
                  if ( v175 )
                  {
                    v94 = 3 * *(_WORD *)(v72 - 16);
                    v166 = *(_WORD *)(v72 - 18);
                    v149 = (char *)*(_WORD *)(v162 - 16);
                  }
                  else
                  {
                    v94 = 3 * *(_WORD *)(v160 + 112);
                    v166 = *(_WORD *)(v160 + 110);
                    v149 = (char *)*(_WORD *)(v158 + 112);
                  }
                  v162 += 16;
                  if ( v178 )
                  {
                    v170 = 3 * *(_WORD *)(v72 + 16);
                    v165 = *(_WORD *)(v72 + 14);
                    v164 = *(_WORD *)v162;
                  }
                  else
                  {
                    v170 = 3 * *(_WORD *)v157;
                    v165 = *(_WORD *)(v157 - 2);
                    v164 = *v163;
                  }
                  v95 = v92 + v93;
                  v96 = (int)v171;
                  v171[(_DWORD)v175 + 14] = (v95 + v94 + v166 + 8) >> 4;
                  v64 = v72 + 2;
                  v97 = (int)&v177[v92];
                  v98 = v165;
                  *(_BYTE *)(v91 + v96 + 15) = (signed int)(&v149[v94 + 7] + v97) >> 4;
                  v99 = v97 + v170;
                  *(_BYTE *)(v91 + v96 + 46) = (v170 + v95 + v98 + 8) >> 4;
                  v100 = (int)(v178 - 1);
                  *(_BYTE *)(v91 + v96 + 47) = (v99 + v164 + 7) >> 4;
                  v65 = v91 + 64;
                  v154 += 16;
                  v160 -= 14;
                  v157 -= 14;
                  v178 = (char *)v100;
                }
                while ( v100 != -1 );
                v156 = (_WORD *)v64;
                v101 = v96;
                i = v172;
                v40 = v174;
                v43 = v169;
                v41 = v176;
                v42 = v173;
                v44 = (char *)(v101 + 16);
                v160 += 128;
                v157 += 128;
                v161 += 128;
                v158 += 128;
                v159 += 128;
                v163 += 64;
              }
            }
            ++v40;
          }
          while ( v40 < v42 );
          v12 = v152;
          v3 = a1;
        }
      }
      else
      {
        v19 = 0;
        if ( v173 > 0 )
        {
          v20 = v18 << 8;
          v170 = v18 << 8;
          v171 = (char *)(8 * v17);
          v180 = (char *)(v17 - 6);
          v172 = 0;
          v21 = v176;
          v152 = v12;
          v22 = 0;
          v23 = v173;
          v151 = 32 * v18;
          v150 = v17;
          do
          {
            v24 = &v147[v22];
            v25 = 0;
            if ( v21 > 0 )
            {
              v172 = v22;
              v169 = v19;
              v26 = v150;
              do
              {
                v27 = 0;
                if ( v20 > 0 )
                {
                  v179 = v25;
                  v28 = v151;
                  v29 = (int)v171;
                  do
                  {
                    v30 = 0;
                    if ( v29 > 0 )
                    {
                      v31 = v150;
                      v177 = &v24[v27];
                      v175 = v24;
                      v174 = v27;
                      v32 = v156;
                      do
                      {
                        v33 = *v32;
                        v34 = 0;
                        ++v32;
                        if ( v28 > 0 )
                        {
                          v35 = (int)&v177[v30];
                          v167 = &v177[v30];
                          v168 = (unsigned __int8)v33;
                          v156 = v32;
                          v178 = (char *)v30;
                          v36 = v33;
                          do
                          {
                            v37 = 0;
                            if ( v31 > 0 )
                            {
                              if ( v31 < 6 )
                              {
                                v38 = v34 + v35;
                              }
                              else
                              {
                                v38 = v34 + v35;
                                v39 = (int)v180;
                                do
                                {
                                  *(_BYTE *)(v38 + v37) = v36;
                                  *(_BYTE *)(v38 + v37 + 1) = v36;
                                  *(_BYTE *)(v38 + v37 + 2) = v36;
                                  *(_BYTE *)(v38 + v37 + 3) = v36;
                                  *(_BYTE *)(v38 + v37 + 4) = v36;
                                  v37 += 5;
                                }
                                while ( v37 <= v39 );
                                v31 = v150;
                              }
                              do
                                *(_BYTE *)(v38 + v37++) = v36;
                              while ( v37 < v31 );
                              v28 = v151;
                            }
                            v34 += 32;
                          }
                          while ( v34 < v28 );
                          v32 = v156;
                          v30 = (int)v178;
                        }
                        v30 += v31;
                      }
                      while ( v30 < (signed int)v171 );
                      v156 = v32;
                      v24 = v175;
                      v27 = v174;
                      v29 = (int)v171;
                      v20 = v170;
                    }
                    v27 += v28;
                  }
                  while ( v27 < v20 );
                  v25 = v179;
                  v26 = v150;
                  v21 = v176;
                }
                v24 += 8 * v26;
                ++v25;
              }
              while ( v25 < v21 );
              v22 = v172;
              v19 = v169;
              v23 = v173;
            }
            v22 += v20;
            ++v19;
          }
          while ( v19 < v23 );
          v12 = v152;
          v3 = a1;
        }
      }
      v4 = v147;
      sub_779000(v3, (int)&v148, v12, v153, (int)v147);
      v10 = *(_DWORD *)(v3 + 52);
      if ( v10 != 2 || *(_DWORD *)(v3 + 88) != 1 )
        ++v153;
      else
        --v153;
      v182 += 24;
      ++v12;
    }
    if ( *(_DWORD *)(v3 + 116) )
    {
      v12 = *(_DWORD *)(v3 + 84);
      if ( v12 - 1 != *(_DWORD *)(v3 + 14368) )
        v12 = *(_DWORD *)(v3 + 48);
    }
    if ( (v10 != 255 || *(_DWORD *)(v3 + 88) != 255) && v12 < result )
    {
      v117 = v153;
      do
      {
        sub_779000(v3, (int)&v148, v12, v117, (int)v4);
        result = *(_DWORD *)(v3 + 52);
        if ( result != 2 || (result = *(_DWORD *)(v3 + 88), result != 1) )
          ++v117;
        else
          --v117;
        ++v12;
      }
      while ( v12 < *(_DWORD *)(v3 + 48) );
    }
  }
  return result;
}
// 785B00: using guessed type char var_5AC[1280];

//----- (00786E40) --------------------------------------------------------
signed int __cdecl US_CC_General_YCbCr_MCU(int a1, int a2, int a3)
{
  if ( *(_DWORD *)(a1 + 19936) )
    US_General_P_MCU(a1, a2, a3);
  else
    US_General_MCU(a1, a2, a3);
  return sub_77A5B0(a1, a1 + 14312, a2, a3);
}

//----- (00786EA0) --------------------------------------------------------
signed int __cdecl YCbCr_422_to_YCbYCr_NI_MCU(int a1, int a2, int a3)
{
  int v3; // esi@1
  signed int v4; // ecx@1
  char v5; // bl@2
  char v6; // dl@2
  signed int result; // eax@4
  int v8; // ecx@6
  int v9; // edx@7
  signed int v10; // esi@8
  int v11; // esi@13
  int v12; // edx@14
  signed int v13; // ecx@15
  int v14; // ecx@21
  int v15; // edx@22
  int v16; // esi@23
  int v17; // ecx@24
  char v18; // dl@25
  char v19; // [sp+30h] [bp-64h]@2
  char v20; // [sp+31h] [bp-63h]@2
  char v21; // [sp+32h] [bp-62h]@2
  char v22; // [sp+33h] [bp-61h]@2
  char v23; // [sp+34h] [bp-60h]@2
  char v24; // [sp+35h] [bp-5Fh]@2
  char v25; // [sp+36h] [bp-5Eh]@2
  char v26[57]; // [sp+37h] [bp-5Dh]@2
  int v27; // [sp+70h] [bp-24h]@4
  int v28; // [sp+74h] [bp-20h]@6
  int v29; // [sp+78h] [bp-1Ch]@7
  int v30; // [sp+7Ch] [bp-18h]@6

  v3 = *(_DWORD *)(a1 + 18484);
  v4 = 0;
  do
  {
    v5 = *(_BYTE *)(v3 + 12);
    *(&v19 + 8 * v4) = *(_BYTE *)v3;
    *(&v20 + 8 * v4) = *(_BYTE *)(v3 + 2);
    *(&v21 + 8 * v4) = *(_BYTE *)(v3 + 4);
    *(&v22 + 8 * v4) = *(_BYTE *)(v3 + 6);
    *(&v23 + 8 * v4) = *(_BYTE *)(v3 + 8);
    *(&v24 + 8 * v4) = *(_BYTE *)(v3 + 10);
    v6 = *(_BYTE *)(v3 + 14);
    v3 += 16;
    *(&v25 + 8 * v4) = v5;
    v26[8 * v4++] = v6;
  }
  while ( v4 < 8 );
  if ( *(_DWORD *)(a1 + 14368) )
  {
    result = sub_775560(
               a1 + 4,
               16,
               8,
               a2,
               a3,
               2,
               *(_DWORD *)(a1 + 60),
               *(_DWORD *)(a1 + 32),
               *(_DWORD *)(a1 + 36),
               *(_DWORD *)(a1 + 40),
               (_DWORD *)(a1 + 14356),
               (int)&v27);
    if ( !result )
    {
      if ( *(_DWORD *)(a1 + 14368) == 2 )
      {
        result = v28;
        v11 = v30;
        if ( v28 < v30 )
        {
          v12 = v29;
          do
          {
            v13 = v27;
            if ( v27 < v12 )
            {
              do
              {
                *(_BYTE *)(*(_DWORD *)(a1 + 14356) + *(_DWORD *)(a1 + 60) * result + 2 * v13 + 3) = *(&v19 + 8 * result + (v13 >> 1));
                v13 += 2;
                v12 = v29;
              }
              while ( v13 < v29 );
              v11 = v30;
            }
            ++result;
          }
          while ( result < v11 );
        }
      }
      else
      {
        result = v28;
        v8 = v30;
        if ( v28 < v30 )
        {
          v9 = v29;
          do
          {
            v10 = v27;
            if ( v27 < v9 )
            {
              do
              {
                *(_BYTE *)(*(_DWORD *)(a1 + 14356) + *(_DWORD *)(a1 + 60) * result + 2 * v10 + 1) = *(&v19 + 8 * result + (v10 >> 1));
                v10 += 2;
                v9 = v29;
              }
              while ( v10 < v29 );
              v8 = v30;
            }
            ++result;
          }
          while ( result < v8 );
        }
      }
    }
  }
  else
  {
    result = sub_775560(
               a1 + 4,
               8,
               8,
               a2,
               a3,
               *(_DWORD *)(a1 + 48),
               *(_DWORD *)(a1 + 60),
               *(_DWORD *)(a1 + 32),
               *(_DWORD *)(a1 + 36),
               *(_DWORD *)(a1 + 40),
               (_DWORD *)(a1 + 14356),
               (int)&v27);
    if ( !result )
    {
      result = v28;
      v14 = v30;
      if ( v28 < v30 )
      {
        v15 = v29;
        do
        {
          v16 = v27;
          if ( v27 < v15 )
          {
            v17 = v27 + 8 * result;
            do
            {
              v18 = *(&v19 + v17++);
              *(_BYTE *)(*(_DWORD *)(a1 + 14356) + *(_DWORD *)(a1 + 60) * result + 2 * v16++) = v18;
              v15 = v29;
            }
            while ( v16 < v29 );
            v14 = v30;
          }
          ++result;
        }
        while ( result < v14 );
      }
    }
  }
  return result;
}
// 786EA0: using guessed type char var_5D[57];

//----- (00787100) --------------------------------------------------------
void __cdecl Y_111_to_Y_Full_MCU_M5(int a1, __m64 *a2, int a3)
{
  own_y_111_to_y_full_mcu_m5(a1, a2, a3);
}

//----- (00787130) --------------------------------------------------------
int __cdecl YCbCr_422_to_YCbYCr_Full_MCU_M5(int a1, __m64 *a2, __m64 *a3, int a4, int a5)
{
  return own_ycbcr_422_to_ycbycr_full_mcu_m5(a1, a2, a3, a4, a5);
}

//----- (00787170) --------------------------------------------------------
int __cdecl YCbCrA_FPX_4114_to_RGBA_FPX_Full_MCU_M5(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int result; // eax@1

  result = a1;
  own_ycbcra_fpx_4114_to_rgba_fpx_full_mcu_m5(a1, a2, a3, a4, a5, a6);
  return result;
}

//----- (007871C0) --------------------------------------------------------
int __cdecl YCbCrA_FPX_4224_to_RGBA_FPX_Full_MCU_M5(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int result; // eax@1

  result = a1;
  own_ycbcra_fpx_4224_to_rgba_fpx_full_mcu_m5(a1, a2, a3, a4, a5, a6);
  return result;
}

//----- (00787210) --------------------------------------------------------
int __cdecl YCbCrA_FPX_1111_to_RGBA_FPX_Full_MCU_M5(__m64 *a1, int a2, int a3, int a4, int a5, int a6)
{
  return own_ycbcra_fpx_1111_to_rgba_fpx_full_mcu_m5(a1, a2, a3, a4, a5, a6);
}

//----- (00787260) --------------------------------------------------------
int __cdecl YCbCr_411_to_RGBA_FPX_Full_MCU_M5(int a1, int a2, int a3, int a4, int a5)
{
  int result; // eax@1

  result = a1;
  own_ycbcr_411_to_rgba_fpx_full_mcu_m5(a1, a2, a3, a4, a5);
  return result;
}

//----- (007872A0) --------------------------------------------------------
int __cdecl YCbCr_422_to_RGBA_FPX_Full_MCU_M5(int a1, int a2, int a3, int a4, int a5)
{
  int result; // eax@1

  result = a1;
  own_ycbcr_422_to_rgba_fpx_full_mcu_m5(a1, a2, a3, a4, a5);
  return result;
}

//----- (007872E0) --------------------------------------------------------
int __cdecl YCbCr_111_to_RGBA_FPX_Full_MCU_M5(__m64 *a1, int a2, int a3, int a4, int a5)
{
  return own_ycbcr_111_to_rgba_fpx_full_mcu_m5(a1, a2, a3, a4, a5);
}

//----- (00787320) --------------------------------------------------------
int __cdecl YCbCr_422_to_BGR_Full_MCU_A6(int a1, int a2, int a3, int a4, int a5)
{
  int result; // eax@1

  result = a1;
  own_ycbcr_422_to_bgr_full_mcu_a6(a1, a2, a3, a4, a5);
  return result;
}

//----- (00787360) --------------------------------------------------------
int __cdecl YCbCr_422_to_BGR_Full_MCU_M5(int a1, int a2, int a3, int a4, int a5)
{
  int result; // eax@1

  result = a1;
  own_ycbcr_422_to_bgr_full_mcu_m5(a1, a2, a3, a4, a5);
  return result;
}

//----- (007873A0) --------------------------------------------------------
int __cdecl YCbCr_422_to_RGB_Full_MCU_A6(int a1, int a2, int a3, int a4, int a5)
{
  int result; // eax@1

  result = a1;
  own_ycbcr_422_to_rgb_full_mcu_a6(a1, a2, a3, a4, a5);
  return result;
}

//----- (007873E0) --------------------------------------------------------
int __cdecl YCbCr_422_to_RGB_Full_MCU_M5(int a1, int a2, int a3, int a4, int a5)
{
  int result; // eax@1

  result = a1;
  own_ycbcr_422_to_rgb_full_mcu_m5(a1, a2, a3, a4, a5);
  return result;
}

//----- (00787420) --------------------------------------------------------
__m64 *__cdecl YCbCr_111_to_BGR_Full_MCU_M5(__m64 *a1, int a2, int a3, int a4, int a5)
{
  __m64 *result; // eax@1

  result = a1;
  own_ycbcr_111_to_bgr_full_mcu_m5(a1, a2, a3, a4, a5);
  return result;
}

//----- (00787460) --------------------------------------------------------
__m64 *__cdecl YCbCr_111_to_RGB_Full_MCU_M5(__m64 *a1, int a2, int a3, int a4, int a5)
{
  __m64 *result; // eax@1

  result = a1;
  own_ycbcr_111_to_rgb_full_mcu_m5(a1, a2, a3, a4, a5);
  return result;
}

//----- (007874A0) --------------------------------------------------------
int __cdecl __spoils<ecx> own_detect_processor_ia32(int a1)
{
  unsigned int v11; // eax@2
  int v13; // [sp+4h] [bp-4h]@0

  _EAX = 0;
  __asm { cpuid }
  *(_DWORD *)(a1 + 24) = _EBX;
  *(_DWORD *)(a1 + 28) = _EDX;
  *(_DWORD *)(a1 + 32) = _ECX;
  if ( _EAX )
  {
    _EAX = 1;
    __asm { cpuid }
    v11 = _EAX & 0x3FFF;
    *(_DWORD *)a1 = (unsigned __int8)_EBX;
    *(_DWORD *)(a1 + 4) = (v11 >> 12) & 3;
    *(_DWORD *)(a1 + 8) = (v11 >> 8) & 0xF;
    *(_DWORD *)(a1 + 12) = (unsigned __int8)v11 >> 4;
    *(_DWORD *)(a1 + 16) = v11 & 0xF;
    *(_DWORD *)(a1 + 20) = _EDX;
  }
  return v13;
}

//----- (00787510) --------------------------------------------------------
unsigned __int64 ownRDTSCh()
{
  return __rdtsc();
}

//----- (00787520) --------------------------------------------------------
void ownEMMSh()
{
  _m_femms();
}

//----- (00787530) --------------------------------------------------------
int __cdecl CONVERT_TO_MARKER(unsigned __int8 a1)
{
  return a1;
}

//----- (00787540) --------------------------------------------------------
signed int __cdecl Get_Marker_Data_Into_Contiguous_Buffer(struct _STATE *a1, unsigned __int32 size, unsigned __int8 **a3, unsigned __int8 **a4, int *a5)
{
  unsigned __int8 *v5; // ebx@3
  int v6; // ecx@3
  int v7; // edx@5
  unsigned __int32 v8; // eax@5
  struct _STATE *v9; // ebx@5
  signed int v10; // eax@11
  signed int v11; // edx@14
  bool v12; // zf@16
  int v14; // [sp+0h] [bp-38h]@1
  int v15; // [sp+4h] [bp-34h]@1
  int v16; // [sp+8h] [bp-30h]@5
  unsigned __int32 v17; // [sp+Ch] [bp-2Ch]@6
  unsigned __int8 *v18; // [sp+10h] [bp-28h]@10
  CPPEH_RECORD ms_exc; // [sp+20h] [bp-18h]@1
  unsigned __int32 sizea; // [sp+44h] [bp+Ch]@5

  ms_exc.old_esp = (DWORD)&v14;
  ms_exc.registration.TryLevel = 0;
  v14 = 0;
  v15 = 0;
  *a3 = 0;
  if ( size <= a1->entropy_bytes_left )
  {
    v14 = DB_Get_Data(a1, size, a4);
    if ( v14 )
      return v14;
  }
  else
  {
    *a3 = (unsigned __int8 *)operator new(size);
    if ( !*a3 )
      return -5;
    *a4 = *a3;
    v5 = *a3;
    v15 = (int)*a3;
    *a5 = 1;
    v6 = size;
    if ( size >= a1->entropy_bytes_left )
      v6 = a1->entropy_bytes_left;
    v16 = v6;
    (*(void (__cdecl **)(unsigned __int8 *, char *, int))&NULLSTR[5720])(v5, a1->cur_entropy_ptr, v6);
    v7 = v16;
    v15 += v16;
    sizea = size - v16;
    v8 = sizea;
    v9 = a1;
    v9->cur_entropy_ptr += v16;
    v9->entropy_bytes_processed += v7;
    a1->entropy_bytes_left -= v16;
    if ( sizea )
    {
      v17 = sizea;
      while ( v8 <= 0xFFFF )
      {
        if ( v8 >= 0x1000 )
          v8 = 4096;
        v14 = DB_Get_Data(a1, v8, &v18);
        if ( v14 )
        {
          v14 = -21;
          operator delete(*a3);
          *a3 = 0;
          return v14;
        }
        v10 = sizea;
        if ( sizea >= 0x1000 )
          v10 = 4096;
        (*(void (__cdecl **)(int, unsigned __int8 *, signed int))&NULLSTR[5720])(v15, v18, v10);
        if ( sizea >= 0x1000 )
          v11 = 4096;
        else
          v11 = sizea;
        v15 += v11;
        v12 = sizea == 4096;
        v8 = sizea - 4096;
        sizea -= 4096;
        if ( v12 )
          break;
      }
    }
  }
  ms_exc.registration.TryLevel = -1;
  return v14;
}
// B60728: using guessed type int (__cdecl *)(_DWORD, _DWORD, _DWORD);

//----- (00787720) --------------------------------------------------------
int __cdecl sub_787720(struct _STATE *a1, int a2)
{
  signed int v2; // ebp@1
  int v4; // [sp+18h] [bp-14h]@1
  unsigned __int8 *v5; // [sp+1Ch] [bp-10h]@1
  unsigned __int8 *v6; // [sp+20h] [bp-Ch]@1

  v4 = 0;
  v2 = Get_Marker_Data_Into_Contiguous_Buffer(a1, 2u, &v6, &v5, &v4);
  if ( !v2 )
    *(_DWORD *)a2 = v5[1] + (*v5 << 8);
  if ( v4 && v6 )
    operator delete(v6);
  return v2;
}

//----- (007877A0) --------------------------------------------------------
signed int __cdecl DP_Get_Next_Marker(struct _STATE *a1, enum IJL_MARKER *a2)
{
  unsigned __int8 v2; // al@1
  signed int result; // eax@2
  unsigned __int8 *v4; // [sp+10h] [bp-Ch]@5

  v2 = a1->unread_marker;
  if ( a1->unread_marker )
  {
    a1->unread_marker = 0;
    *(_DWORD *)a2 = CONVERT_TO_MARKER(v2);
    result = 0;
  }
  else
  {
    result = DB_Skip_To_Next_Marker(a1);
    if ( !result )
    {
      if ( DB_Get_Data(a1, 1u, &v4) )
      {
        *(_DWORD *)a2 = 256;
        result = 0;
      }
      else
      {
        *(_DWORD *)a2 = CONVERT_TO_MARKER(*v4);
        result = 0;
      }
    }
  }
  return result;
}

//----- (00787820) --------------------------------------------------------
signed int __cdecl DP_Skip(struct _STATE *a1)
{
  signed int result; // eax@1
  int v2; // edx@4
  int v3; // ebx@4
  int v4; // [sp+10h] [bp-14h]@1
  unsigned __int8 *v5; // [sp+14h] [bp-10h]@9

  result = sub_787720(a1, (int)&v4);
  if ( !result )
  {
    if ( v4 < 2 )
      return -21;
    v2 = v4 - 2;
    v3 = a1->entropy_bytes_left;
    if ( v4 - 2 >= v3 )
    {
      v4 -= 2;
      result = DB_Get_Data(a1, v3, &v5);
      if ( result )
        return -21;
      v2 = v4 - v3;
    }
    if ( v2 > 0 )
    {
      while ( v2 <= 0xFFFF )
      {
        v4 = v2;
        if ( v2 >= 4096 )
          v2 = 4096;
        result = DB_Get_Data(a1, v2, &v5);
        if ( result )
          return -21;
        v2 = v4 - 4096;
        if ( v4 - 4096 <= 0 )
          return result;
      }
    }
  }
  return result;
}

//----- (007878F0) --------------------------------------------------------
signed int __cdecl DP_Parse_DRI(struct _STATE *a1, int *a2)
{
  signed int v2; // ebp@1
  unsigned __int8 *v4; // [sp+18h] [bp-1Ch]@1
  unsigned __int8 *v5; // [sp+1Ch] [bp-18h]@1
  int v6; // [sp+20h] [bp-14h]@1
  int v7; // [sp+24h] [bp-10h]@1

  v4 = 0;
  v5 = 0;
  v6 = 0;
  *a2 = 0;
  v2 = sub_787720(a1, (int)&v7);
  if ( !v2 )
  {
    if ( v7 >= 2 )
    {
      v7 -= 2;
      v2 = Get_Marker_Data_Into_Contiguous_Buffer(a1, v7, &v5, &v4, &v6);
      if ( !v2 )
        *a2 = v4[1] + (*v4 << 8);
    }
    else
    {
      v2 = -21;
    }
  }
  if ( v6 && v5 )
    operator delete(v5);
  return v2;
}

//----- (007879A0) --------------------------------------------------------
signed int __cdecl DP_Parse_SOF(struct _STATE *a1, struct _JPEG_PROPERTIES *a2)
{
  signed int v2; // ebx@1
  unsigned __int8 *v4; // eax@9
  int v5; // edx@9
  int v6; // esi@9
  int v7; // ecx@9
  int v8; // edi@9
  int v9; // esi@9
  int v10; // edi@9
  int v11; // eax@9
  int v12; // edx@13
  _FRAME_COMPONENT *v13; // ebp@14
  unsigned int v14; // eax@14
  int v15; // ecx@14
  unsigned __int8 *v16; // edx@15
  _FRAME_COMPONENT *v17; // edi@15
  int v18; // esi@15
  _FRAME_COMPONENT *v19; // ebp@15
  int v20; // ebp@21
  int v21; // edx@21
  int v22; // edi@21
  unsigned __int8 *v23; // [sp+18h] [bp-34h]@1
  unsigned __int8 *v24; // [sp+1Ch] [bp-30h]@1
  int v25; // [sp+20h] [bp-2Ch]@1
  int v26; // [sp+24h] [bp-28h]@1
  int v27; // [sp+28h] [bp-24h]@14
  int v28; // [sp+2Ch] [bp-20h]@14
  unsigned int v29; // [sp+30h] [bp-1Ch]@13
  int v30; // [sp+34h] [bp-18h]@13

  v23 = 0;
  v24 = 0;
  v25 = 0;
  v2 = sub_787720(a1, (int)&v26);
  if ( !v2 )
  {
    if ( v26 >= 2 )
    {
      v26 -= 2;
      v2 = Get_Marker_Data_Into_Contiguous_Buffer(a1, v26, &v24, &v23, &v25);
      if ( !v2 )
      {
        (*(void (__cdecl **)(_FRAME_COMPONENT *, signed int))&NULLSTR[5716])(a2->jframe.comps, 64);
        v4 = v23++;
        v5 = *v4;
        a2->jframe.precision = v5;
        v23 = v4 + 2;
        v6 = v4[1] << 8;
        a2->jframe.height = v6;
        v23 = v4 + 3;
        v7 = v6 + v4[2];
        a2->jframe.height = v7;
        v23 = v4 + 4;
        v8 = v4[3] << 8;
        a2->jframe.width = v8;
        v23 = v4 + 5;
        v9 = v8 + v4[4];
        v10 = (int)(v4 + 6);
        a2->jframe.width = v9;
        v23 = v4 + 6;
        v11 = v4[5];
        a2->jframe.ncomps = v11;
        if ( v5 == 8 )
        {
          if ( v7 )
          {
            v12 = 0;
            v30 = 0;
            v29 = 0;
            if ( v11 > 0 )
            {
              v13 = a2->jframe.comps;
              v14 = v29;
              v15 = v29;
              v27 = 0;
              v28 = 0;
              do
              {
                v23 = (unsigned __int8 *)(v10 + 1);
                v13[v14].ident = *(_BYTE *)v10;
                v16 = v23;
                a2->jframe.comps[v14].hsampling = (signed int)*v23 >> 4;
                v17 = a2->jframe.comps;
                v18 = v27;
                v23 = v16 + 1;
                v17[v14].vsampling = *v16 & 0xF;
                v10 = (int)(v16 + 2);
                v19 = a2->jframe.comps;
                v23 = v16 + 2;
                v19[v14].quant_sel = v16[1];
                v13 = a2->jframe.comps;
                if ( v18 < v13[v14].hsampling )
                  v27 = v13[v14].hsampling;
                if ( v30 < v13[v14].vsampling )
                  v30 = v13[v14].vsampling;
                ++v14;
                ++v15;
              }
              while ( v15 < a2->jframe.ncomps );
              v12 = v27;
              v2 = v28;
              v7 = a2->jframe.height;
              v9 = a2->jframe.width;
            }
            v20 = (v9 + 8 * v12 - 1) / (8 * v12);
            v21 = v30;
            v22 = 2 * v30;
            a2->jframe.horMCU = v20;
            a2->jframe.totalMCU = v20 * ((v7 + 8 * v21 - 1) / (4 * v22));
          }
          else
          {
            v2 = -16;
          }
        }
        else
        {
          v2 = -29;
        }
      }
    }
    else
    {
      v2 = -21;
    }
  }
  if ( v25 && v24 )
    operator delete(v24);
  return v2;
}
// B60724: using guessed type int (__cdecl *)(_DWORD, _DWORD);

//----- (00787C00) --------------------------------------------------------
signed int __cdecl DP_Parse_APP14(struct _JPEG_PROPERTIES *a1)
{
  signed int v1; // ebp@1
  int v2; // edx@4
  unsigned __int8 *v4; // edx@10
  unsigned __int8 *v5; // [sp+18h] [bp-1Ch]@1
  unsigned __int8 *v6; // [sp+1Ch] [bp-18h]@1
  int v7; // [sp+20h] [bp-14h]@1
  int v8; // [sp+24h] [bp-10h]@1

  v5 = 0;
  v6 = 0;
  v7 = 0;
  v1 = sub_787720(&a1->state, (int)&v8);
  if ( !v1 )
  {
    if ( v8 >= 2 )
    {
      v2 = v8 - 2;
      v8 = v2;
      if ( v2 >= 12 )
      {
        v1 = Get_Marker_Data_Into_Contiguous_Buffer(&a1->state, v2, &v6, &v5, &v7);
        if ( !v1 )
        {
          v4 = v5++;
          if ( *v4 == 65 )
          {
            v5 = v4 + 2;
            if ( v4[1] == 100 )
            {
              v5 = v4 + 3;
              if ( v4[2] == 111 )
              {
                v5 = v4 + 4;
                if ( v4[3] == 98 )
                {
                  v5 = v4 + 5;
                  if ( v4[4] == 101 )
                  {
                    v5 = v4 + 7;
                    a1->AdobeVersion = v4[6] + (v4[5] << 8);
                    v5 = v4 + 9;
                    a1->AdobeFlags0 = v4[8] + (v4[7] << 8);
                    v5 = v4 + 11;
                    a1->AdobeFlags1 = v4[10] + (v4[9] << 8);
                    v5 = v4 + 12;
                    a1->AdobeXform = v4[11];
                    a1->SawAdobeMarker = 1;
                  }
                }
              }
            }
          }
        }
      }
    }
    else
    {
      v1 = -21;
    }
  }
  if ( v7 && v6 )
    operator delete(v6);
  return v1;
}

//----- (00787D70) --------------------------------------------------------
signed int __cdecl DP_Parse_APP0(struct _JPEG_PROPERTIES *a1)
{
  int v1; // eax@3
  unsigned __int8 *v3; // ecx@15
  int v4; // edx@21
  int v5; // esi@21
  signed int v6; // ecx@21
  int v7; // edi@22
  unsigned __int8 *v8; // eax@22
  int v9; // edx@22
  int v10; // ebx@27
  _IJL_COLOR v11; // ecx@29
  int i; // esi@30
  int v13; // edi@31
  int v14; // edi@37
  int v15; // esi@38
  unsigned __int8 v16; // al@45
  int v17; // esi@49
  int v18; // ebx@49
  _BYTE *v19; // eax@52
  int v20; // ecx@53
  unsigned __int8 *v21; // ebx@54
  unsigned __int8 *v22; // ebx@54
  unsigned __int8 *v23; // edi@54
  unsigned __int8 *v24; // ebp@54
  int v25; // ebx@55
  int v26; // edx@55
  int v27; // edi@56
  int v28; // esi@57
  unsigned __int8 *v29; // ecx@58
  int v30; // edi@59
  char v31; // bl@59
  int v32; // ecx@60
  int v33; // edi@65
  unsigned __int8 *v34; // [sp+18h] [bp-34h]@1
  unsigned __int8 *v35; // [sp+1Ch] [bp-30h]@1
  int v36; // [sp+20h] [bp-2Ch]@1
  int v37; // [sp+24h] [bp-28h]@1
  int v38; // [sp+28h] [bp-24h]@32
  int v39; // [sp+2Ch] [bp-20h]@53
  int v40; // [sp+30h] [bp-1Ch]@58
  char v41; // [sp+34h] [bp-18h]@59
  char v42; // [sp+38h] [bp-14h]@59

  v34 = 0;
  v35 = 0;
  v36 = 0;
  if ( sub_787720(&a1->state, (int)&v37) )
    goto LABEL_5;
  if ( v37 < 2 )
    goto LABEL_5;
  v1 = v37 - 2;
  v37 = v1;
  if ( v1 < 14 || v1 > 196622 )
    goto LABEL_5;
  if ( !Get_Marker_Data_Into_Contiguous_Buffer(&a1->state, v1, &v35, &v34, &v36) )
  {
    if ( a1->needframe )
    {
      v3 = v34;
      if ( *v34 != 74 || v34[1] != 70 || v34[2] != 88 || v34[3] != 88 || v34[4] )
      {
        if ( *v34 == 74 && v34[1] == 70 && v34[2] == 73 && v34[3] == 70 && !v34[4] )
        {
          a1->jfif_app0_detected = 1;
          v34 = v3 + 7;
          a1->jfif_app0_version = _byteswap_ushort(*(_WORD *)(v3 + 5));
          v34 = v3 + 8;
          a1->jfif_app0_units = v3[7];
          v34 = v3 + 10;
          v4 = (int)(v3 + 12);
          a1->jfif_app0_Xdensity = _byteswap_ushort(*((_WORD *)v3 + 4));
          v34 = v3 + 12;
          v5 = v3[11] | (v3[10] << 8);
          v6 = 14;
          a1->jfif_app0_Ydensity = v5;
LABEL_22:
          v34 = (unsigned __int8 *)(v4 + 1);
          v7 = *(_BYTE *)v4;
          v8 = (unsigned __int8 *)(v4 + 2);
          v34 = (unsigned __int8 *)(v4 + 2);
          v9 = *(_BYTE *)(v4 + 1);
          if ( v7 && v9 )
          {
            if ( a1->iotype == 20 || a1->iotype == 21 )
            {
              v10 = 3 * v7;
              if ( 3 * v7 * v9 + v6 <= v37 )
              {
                a1->JPGThumbHeight = v9;
                v11 = a1->DIBColor;
                a1->JPGThumbWidth = v7;
                if ( v11 == 1 )
                {
                  v14 = 0;
                  if ( v9 > 0 )
                  {
                    v15 = v9;
                    do
                    {
                      (*(void (__cdecl **)(char *, unsigned __int8 *, int))&NULLSTR[5720])(
                        &a1->DIBBytes[a1->DIBLineBytes * v14],
                        v8,
                        v10);
                      v8 = &v34[v10];
                      ++v14;
                      v34 += v10;
                    }
                    while ( v14 < v15 );
                  }
                }
                else
                {
                  for ( i = 0; i < v9; ++i )
                  {
                    v13 = 0;
                    if ( v10 > 0 )
                    {
                      v38 = v9;
                      do
                      {
                        *(&a1->DIBBytes[v13] + i * a1->DIBLineBytes) = v8[2];
                        *(&a1->DIBBytes[i * a1->DIBLineBytes + 1] + v13) = v34[1];
                        *(&a1->DIBBytes[i * a1->DIBLineBytes + 2] + v13) = *v34;
                        v8 = v34 + 3;
                        v34 += 3;
                        v13 += 3;
                      }
                      while ( v13 < v10 );
                      v9 = v38;
                    }
                  }
                }
              }
              else
              {
                a1->JPGThumbWidth = v7;
                a1->JPGThumbHeight = v9;
              }
            }
            else
            {
              a1->JPGThumbWidth = v7;
              a1->JPGThumbHeight = v9;
            }
          }
          goto LABEL_5;
        }
      }
      else
      {
        v34 += 5;
        v16 = v3[5];
        if ( v16 != 16 )
        {
          if ( v16 == 17 )
          {
            v34 = v3 + 7;
            v17 = v3[6];
            v34 = v3 + 8;
            v18 = v3[7];
            if ( (a1->iotype == 20 || a1->iotype == 21) && v18 * v17 + 776 <= v37 )
            {
              a1->JPGThumbHeight = v18;
              a1->JPGThumbWidth = v17;
              v19 = operator new(0x300u);
              if ( v19 )
              {
                v20 = (int)v19;
                v38 = v18;
                v39 = v17;
                do
                {
                  v21 = v34++;
                  *(_BYTE *)v20 = *v21;
                  v22 = v34++;
                  *(_BYTE *)(v20 + 1) = *v22;
                  v23 = v34++;
                  *(_BYTE *)(v20 + 2) = *v23;
                  v24 = v34++;
                  *(_BYTE *)(v20 + 3) = *v24;
                  v20 += 4;
                }
                while ( (signed int)(v19 + 768) > v20 );
                v25 = v38;
                v26 = 0;
                if ( v38 > 0 )
                {
                  v27 = 3 * v39;
                  do
                  {
                    v28 = 0;
                    if ( v27 > 0 )
                    {
                      v29 = v34;
                      v40 = v26;
                      v39 = v27;
                      v38 = v25;
                      do
                      {
                        v30 = 3 * *v29;
                        v41 = v19[v30];
                        v31 = v19[v30 + 2];
                        v42 = v19[v30 + 1];
                        if ( a1->DIBColor == 1 )
                        {
                          v33 = v40;
                          *(&a1->DIBBytes[v40 * a1->DIBLineBytes] + v28) = v41;
                          *(&a1->DIBBytes[v28 + 1] + v33 * a1->DIBLineBytes) = v42;
                          *(&a1->DIBBytes[v28 + 2] + v33 * a1->DIBLineBytes) = v31;
                        }
                        else
                        {
                          v32 = v40;
                          *(&a1->DIBBytes[v40 * a1->DIBLineBytes] + v28) = v31;
                          *(&a1->DIBBytes[v28 + 1] + v32 * a1->DIBLineBytes) = v42;
                          *(&a1->DIBBytes[v28 + 2] + v32 * a1->DIBLineBytes) = v41;
                        }
                        v28 += 3;
                        v29 = v34++ + 1;
                      }
                      while ( v28 < v39 );
                      v26 = v40;
                      v27 = v39;
                      v25 = v38;
                    }
                    ++v26;
                  }
                  while ( v26 < v25 );
                }
                operator delete(v19);
              }
            }
            goto LABEL_5;
          }
          if ( v16 == 19 )
          {
            v4 = (int)(v3 + 6);
            v6 = 8;
            goto LABEL_22;
          }
        }
      }
    }
LABEL_5:
    if ( v36 )
    {
      if ( v35 )
        operator delete(v35);
    }
    return 0;
  }
  if ( v36 && v35 )
    operator delete(v35);
  return -21;
}
// B60728: using guessed type int (__cdecl *)(_DWORD, _DWORD, _DWORD);

//----- (00788210) --------------------------------------------------------
int __cdecl DP_Parse_COM(struct _JPEG_PROPERTIES *a1)
{
  char *v2; // edx@12
  unsigned __int16 v3; // si@13
  int v4; // ebx@13
  signed int v5; // eax@14
  unsigned __int8 *v6; // edi@15
  int v7; // eax@17
  unsigned __int8 *v8; // edi@18
  int v9; // [sp+0h] [bp-40h]@1
  int v10; // [sp+4h] [bp-3Ch]@1
  unsigned __int8 *v11; // [sp+8h] [bp-38h]@1
  void *p; // [sp+Ch] [bp-34h]@1
  int v13; // [sp+10h] [bp-30h]@1
  int v14; // [sp+14h] [bp-2Ch]@14
  CPPEH_RECORD ms_exc; // [sp+28h] [bp-18h]@1

  ms_exc.old_esp = (DWORD)&v9;
  v9 = 0;
  v10 = 0;
  v11 = 0;
  p = 0;
  v13 = 0;
  ms_exc.registration.TryLevel = 0;
  v10 = sub_787720(&a1->state, (int)&v9);
  if ( !v10 )
  {
    if ( v9 >= 2 )
    {
      v9 -= 2;
      v10 = Get_Marker_Data_Into_Contiguous_Buffer(&a1->state, v9, (unsigned __int8 **)&p, &v11, &v13);
      if ( v10 )
      {
        v10 = -21;
      }
      else if ( a1->needframe )
      {
        v2 = a1->jpeg_comment;
        if ( v2 )
        {
          v3 = v9;
          v4 = a1->jpeg_comment_size;
          if ( v9 <= v4 )
          {
            v7 = 0;
            v14 = 0;
            if ( v9 > 0 )
            {
              while ( 1 )
              {
                v8 = v11++;
                v2[v7++] = *v8;
                v14 = v7;
                v3 = v9;
                if ( v7 >= v9 )
                  break;
                v2 = a1->jpeg_comment;
              }
            }
            a1->jpeg_comment_size = v3;
          }
          else
          {
            v5 = 0;
            v14 = 0;
            if ( v4 > 0 )
            {
              while ( 1 )
              {
                v6 = v11++;
                v2[v5++] = *v6;
                v14 = v5;
                if ( v5 >= a1->jpeg_comment_size )
                  break;
                v2 = a1->jpeg_comment;
              }
              v3 = v9;
            }
            a1->jpeg_comment_size = v3;
            v10 = -30;
          }
          ms_exc.registration.TryLevel = -1;
        }
      }
    }
    else
    {
      v10 = -21;
    }
  }
  if ( v13 && p )
  {
    operator delete(p);
    p = 0;
  }
  return v10;
}

//----- (007883D0) --------------------------------------------------------
signed int __cdecl DP_Parse_DQT(struct _JPEG_PROPERTIES *a1, struct _STATE *a2, enum _DCTTYPE a3)
{
  signed int v3; // edi@1
  int v4; // eax@4
  int v6; // ebp@11
  signed int v7; // eax@13
  int v8; // esi@14
  signed int v9; // edi@14
  unsigned __int8 *v10; // edx@14
  int *v11; // ecx@17
  signed int v12; // ebp@17
  signed int v13; // ebp@21
  int v14; // esi@20
  char *v15; // edx@25
  int v16; // esi@27
  int v17; // ebp@29
  int v18; // eax@29
  int v19; // esi@31
  int v20; // ebp@33
  int v21; // eax@33
  int v22; // eax@36
  int v23; // eax@39
  int v24; // eax@41
  unsigned __int8 *v25; // [sp+18h] [bp-3Ch]@1
  unsigned __int8 *v26; // [sp+1Ch] [bp-38h]@1
  int v27; // [sp+20h] [bp-34h]@1
  int v28; // [sp+24h] [bp-30h]@1
  int v29; // [sp+28h] [bp-2Ch]@27
  int v30; // [sp+2Ch] [bp-28h]@17
  int *v31; // [sp+30h] [bp-24h]@27
  int v32; // [sp+34h] [bp-20h]@17
  unsigned __int8 *v33; // [sp+38h] [bp-1Ch]@16
  int v34; // [sp+3Ch] [bp-18h]@17
  int v35; // [sp+40h] [bp-14h]@11

  v25 = 0;
  v26 = 0;
  v27 = 0;
  v3 = sub_787720(a2, (int)&v28);
  if ( !v3 )
  {
    if ( v28 >= 2 )
    {
      v4 = v28 - 2;
      v28 = v4;
      if ( v4 <= 516 )
      {
        v3 = Get_Marker_Data_Into_Contiguous_Buffer(a2, v4, &v26, &v25, &v27);
        if ( !v3 )
        {
          v6 = 0;
          v35 = 0;
          while ( v6 < v28 )
          {
            v7 = *v25 & 0xF;
            if ( v7 > 4 )
            {
              v3 = -7;
              goto LABEL_6;
            }
            v8 = (signed int)*v25 >> 4;
            v9 = v7;
            a1->jFmtQuant[v7].precision = v8;
            v10 = v25++ + 1;
            if ( a1->maxquantindex <= v7 )
              a1->maxquantindex = v7 + 1;
            v33 = v10;
            if ( v8 )
            {
              v34 = 0;
              v11 = (int *)&a1->jFmtQuant[v9].elements;
              v30 = v8;
              v32 = v6;
              v12 = 0;
              while ( 1 )
              {
                a1->jFmtQuant[v9].elements[v12] = (*(_WORD *)&v10[2 * v12] << 8) | ((*(_WORD *)&v10[2 * v12] & 0xFF00) >> 8);
                a1->jFmtQuant[v9].elements[v12 + 1] = (*(_WORD *)&v25[2 * v12 + 2] << 8) | ((*(_WORD *)&v25[2 * v12 + 2] & 0xFF00) >> 8);
                v12 += 2;
                if ( v12 >= 64 )
                  break;
                v10 = v25;
              }
              v14 = v30;
              v6 = v32 + 129;
              v25 += 128;
            }
            else
            {
              v34 = 0;
              v11 = (int *)&a1->jFmtQuant[v9].elements;
              v30 = 0;
              v32 = v6;
              v13 = 0;
              while ( 1 )
              {
                a1->jFmtQuant[v9].elements[v13] = v10[v13];
                a1->jFmtQuant[v9].elements[v13 + 1] = v25[v13 + 1];
                a1->jFmtQuant[v9].elements[v13 + 2] = v25[v13 + 2];
                a1->jFmtQuant[v9].elements[v13 + 3] = v25[v13 + 3];
                v13 += 4;
                if ( v13 >= 64 )
                  break;
                v10 = v25;
              }
              v14 = v30;
              v6 = v32 + 65;
              v25 += 64;
            }
            v15 = a1->rawquanttables[v7].quantizer;
            if ( v15 )
            {
              a1->rawquanttables[v7].ident = v7;
              if ( v14 )
              {
                v34 = 0;
                v31 = v11;
                v16 = (int)v33;
                v29 = v7;
                v32 = v6;
                while ( 1 )
                {
                  v17 = v34;
                  v15[v34] = *(_BYTE *)(v16 + v34);
                  v18 = v29;
                  a1->rawquanttables[v29].quantizer[v17 + 1] = *(_BYTE *)(v16 + v17 + 1);
                  a1->rawquanttables[v18].quantizer[v17 + 2] = *(_BYTE *)(v16 + v17 + 2);
                  a1->rawquanttables[v18].quantizer[v17 + 3] = *(_BYTE *)(v16 + v17 + 3);
                  v34 = v17 + 4;
                  if ( (unsigned int)(v17 + 4) >= 0x80 )
                    break;
                  v15 = a1->rawquanttables[v29].quantizer;
                }
                v11 = v31;
                v6 = v32;
              }
              else
              {
                v30 = 0;
                v31 = v11;
                v19 = (int)v33;
                v29 = v7;
                v32 = v6;
                while ( 1 )
                {
                  v20 = v30;
                  v15[v30] = *(_BYTE *)(v19 + v30);
                  v21 = v29;
                  a1->rawquanttables[v29].quantizer[v20 + 1] = *(_BYTE *)(v19 + v20 + 1);
                  a1->rawquanttables[v21].quantizer[v20 + 2] = *(_BYTE *)(v19 + v20 + 2);
                  a1->rawquanttables[v21].quantizer[v20 + 3] = *(_BYTE *)(v19 + v20 + 3);
                  v30 = v20 + 4;
                  if ( v20 + 4 >= 64 )
                    break;
                  v15 = a1->rawquanttables[v21].quantizer;
                }
                v11 = v31;
                v6 = v32;
              }
            }
            if ( a3 )
            {
              if ( a3 == 1 )
              {
                FillDecoderQuantTable_IPP(*v11);
                v23 = a1->nqtables;
                if ( v23 < 4 )
                  a1->nqtables = v23 + 1;
              }
              else
              {
                FillDecoderQuantTable_AAN(*v11);
                v24 = a1->nqtables;
                if ( v24 < 4 )
                  a1->nqtables = v24 + 1;
              }
            }
            else
            {
              FillDecoderQuantTable_AAN(*v11);
              v22 = a1->nqtables;
              if ( v22 < 4 )
                a1->nqtables = v22 + 1;
            }
          }
          v3 = v35;
        }
      }
      else
      {
        v3 = -21;
      }
    }
    else
    {
      v3 = -21;
    }
  }
LABEL_6:
  if ( v27 && v26 )
    operator delete(v26);
  return v3;
}

//----- (00788800) --------------------------------------------------------
signed int __cdecl DP_Parse_DHT(struct _JPEG_PROPERTIES *a1, struct _STATE *a2)
{
  signed int v2; // ebp@1
  int v3; // eax@4
  unsigned __int8 *v5; // ecx@12
  signed int v6; // edx@13
  signed int v7; // eax@13
  unsigned int v8; // ebx@20
  char *v9; // ebp@20
  char *v10; // ebx@20
  int v11; // ecx@20
  int v12; // ebx@20
  int v13; // esi@20
  int v14; // ebx@20
  int v15; // esi@20
  int v16; // ebx@20
  int v17; // esi@20
  int v18; // ebx@20
  int v19; // esi@20
  int v20; // ebx@20
  int v21; // esi@20
  int v22; // ebx@20
  int v23; // edi@20
  int v24; // esi@20
  int v25; // ebx@20
  int v26; // ebp@20
  int v27; // eax@22
  int v28; // edx@22
  int v29; // ebx@26
  char **v30; // ebp@26
  int v31; // esi@26
  int v32; // edx@32
  int v33; // edx@35
  unsigned __int8 *v34; // ecx@37
  unsigned __int8 *v35; // ebx@37
  int v36; // esi@37
  int v37; // edx@37
  int v38; // ebx@37
  int v39; // esi@37
  int v40; // ebx@37
  int v41; // esi@37
  int v42; // ebx@37
  int v43; // esi@37
  int v44; // ebx@37
  int v45; // esi@37
  int v46; // ebx@37
  int v47; // esi@37
  int v48; // ebx@37
  int v49; // esi@37
  int v50; // ebx@37
  int v51; // edx@37
  unsigned __int8 *v52; // [sp+18h] [bp-3Ch]@1
  unsigned __int8 *v53; // [sp+1Ch] [bp-38h]@1
  int v54; // [sp+20h] [bp-34h]@1
  int v55; // [sp+24h] [bp-30h]@1
  int v56; // [sp+28h] [bp-2Ch]@20
  int v57; // [sp+2Ch] [bp-28h]@20
  int v58; // [sp+30h] [bp-24h]@22
  int v59; // [sp+34h] [bp-20h]@22
  int v60; // [sp+38h] [bp-1Ch]@20
  char **v61; // [sp+3Ch] [bp-18h]@22
  int v62; // [sp+44h] [bp-10h]@22

  v52 = 0;
  v53 = 0;
  v54 = 0;
  v2 = sub_787720(a2, (int)&v55);
  if ( !v2 )
  {
    if ( v55 >= 2 )
    {
      v3 = v55 - 2;
      v55 = v3;
      if ( v3 <= 1091 )
      {
        v2 = Get_Marker_Data_Into_Contiguous_Buffer(a2, v3, &v53, &v52, &v54);
        if ( !v2 && v55 > 0 )
        {
          v5 = v52;
          do
          {
            v6 = (*v5 & 0xF0) >> 4;
            v7 = *v5 & 0xF;
            if ( v6 < 0 || v6 > 1 )
            {
              v2 = -6;
              break;
            }
            if ( v7 > 3 )
            {
              v2 = -6;
              break;
            }
            if ( v7 >= a1->maxhuffindex )
              a1->maxhuffindex = v7 + 1;
            if ( a1->rawhufftables[v7].bits )
            {
              if ( a1->rawhufftables[v7].vals )
              {
                v8 = 12 * (v6 + 2 * v7);
                v56 = v8;
                v9 = (char *)a1 + v8;
                v9[14148] = v6;
                v10 = a1->rawhufftables[v8 / 0xC].bits;
                v9[14149] = v7;
                *v10 = v52[1];
                v11 = v52[1];
                *(_BYTE *)(*((_DWORD *)v9 + 3535) + 1) = v52[2];
                v12 = v11 + v52[2];
                *(_BYTE *)(*((_DWORD *)v9 + 3535) + 2) = v52[3];
                v13 = v12 + v52[3];
                *(_BYTE *)(*((_DWORD *)v9 + 3535) + 3) = v52[4];
                v14 = v13 + v52[4];
                *(_BYTE *)(*((_DWORD *)v9 + 3535) + 4) = v52[5];
                v15 = v14 + v52[5];
                *(_BYTE *)(*((_DWORD *)v9 + 3535) + 5) = v52[6];
                v16 = v15 + v52[6];
                *(_BYTE *)(*((_DWORD *)v9 + 3535) + 6) = v52[7];
                v17 = v16 + v52[7];
                *(_BYTE *)(*((_DWORD *)v9 + 3535) + 7) = v52[8];
                v18 = v17 + v52[8];
                *(_BYTE *)(*((_DWORD *)v9 + 3535) + 8) = v52[9];
                v19 = v18 + v52[9];
                *(_BYTE *)(*((_DWORD *)v9 + 3535) + 9) = v52[10];
                v20 = v19 + v52[10];
                *(_BYTE *)(*((_DWORD *)v9 + 3535) + 10) = v52[11];
                v21 = v20 + v52[11];
                *(_BYTE *)(*((_DWORD *)v9 + 3535) + 11) = v52[12];
                v22 = v21 + v52[12];
                *(_BYTE *)(*((_DWORD *)v9 + 3535) + 12) = v52[13];
                v23 = v22 + v52[13];
                *(_BYTE *)(*((_DWORD *)v9 + 3535) + 13) = v52[14];
                v24 = v23 + v52[14];
                *(_BYTE *)(*((_DWORD *)v9 + 3535) + 14) = v52[15];
                v25 = v24 + v52[15];
                *(_BYTE *)(*((_DWORD *)v9 + 3535) + 15) = v52[16];
                v5 = v52;
                v26 = v52[16];
                v60 = v26 + v25;
                v57 = 0;
                if ( v26 + v25 > 0 )
                {
                  if ( v26 + v25 < 6 )
                  {
                    v61 = (char **)((char *)&a1->rawhufftables[0].vals + v56);
                  }
                  else
                  {
                    v61 = (char **)((char *)&a1->rawhufftables[0].vals + v56);
                    v62 = v26 + v25 - 6;
                    v59 = v7;
                    v27 = v57;
                    v58 = v6;
                    v28 = v56;
                    while ( 1 )
                    {
                      (*(char **)((char *)&a1->rawhufftables[0].vals + v28))[v27] = v5[v27 + 17];
                      (*(char **)((char *)&a1->rawhufftables[0].vals + v28))[v27 + 1] = v52[v27 + 18];
                      (*(char **)((char *)&a1->rawhufftables[0].vals + v28))[v27 + 2] = v52[v27 + 19];
                      (*(char **)((char *)&a1->rawhufftables[0].vals + v28))[v27 + 3] = v52[v27 + 20];
                      (*(char **)((char *)&a1->rawhufftables[0].vals + v28))[v27 + 4] = v52[v27 + 21];
                      v27 += 5;
                      if ( v27 > v62 )
                        break;
                      v5 = v52;
                    }
                    v57 = v27;
                    v7 = v59;
                    v6 = v58;
                    v5 = v52;
                  }
                  v29 = v57;
                  v30 = v61;
                  v31 = v60;
                  while ( 1 )
                  {
                    (*v30)[v29] = v5[v29 + 17];
                    if ( ++v29 >= v31 )
                      break;
                    v5 = v52;
                  }
                  v5 = v52;
                }
              }
            }
            if ( v6 )
            {
              v2 = BuildDecoderHuffmanTable((int)(v5 + 1), (int)(v5 + 17), v6, v7, (int)&a1->jFmtAcHuffman[v7]);
              if ( v2 )
              {
                v2 = -6;
                break;
              }
              v32 = a1->nhuffActables;
              if ( v32 < 4 )
                a1->nhuffActables = v32 + 1;
            }
            else
            {
              v2 = BuildDecoderHuffmanTable((int)(v5 + 1), (int)(v5 + 17), 0, v7, (int)&a1->jFmtDcHuffman[v7]);
              if ( v2 )
              {
                v2 = -6;
                break;
              }
              v33 = a1->nhuffDctables;
              if ( v33 < 4 )
                a1->nhuffDctables = v33 + 1;
            }
            v34 = v52;
            v35 = v52 + 3;
            v52 += 2;
            v36 = v34[1];
            v52 = v35;
            v37 = v36 + v34[2];
            v52 = v34 + 4;
            v38 = v37 + v34[3];
            v52 = v34 + 5;
            v39 = v38 + v34[4];
            v52 = v34 + 6;
            v40 = v39 + v34[5];
            v52 = v34 + 7;
            v41 = v40 + v34[6];
            v52 = v34 + 8;
            v42 = v41 + v34[7];
            v52 = v34 + 9;
            v43 = v42 + v34[8];
            v52 = v34 + 10;
            v44 = v43 + v34[9];
            v52 = v34 + 11;
            v45 = v44 + v34[10];
            v52 = v34 + 12;
            v46 = v45 + v34[11];
            v52 = v34 + 13;
            v47 = v46 + v34[12];
            v52 = v34 + 14;
            v48 = v47 + v34[13];
            v52 = v34 + 15;
            v49 = v48 + v34[14];
            v52 = v34 + 16;
            v50 = v49 + v34[15];
            v52 = v34 + 17;
            v51 = v50 + v34[16];
            v5 = &v34[v51 + 17];
            v52 = v5;
            v55 = v55 - v51 - 17;
          }
          while ( v55 > 0 );
        }
      }
      else
      {
        v2 = -21;
      }
    }
    else
    {
      v2 = -21;
    }
  }
  if ( v54 && v53 )
    operator delete(v53);
  return v2;
}

//----- (00788DB0) --------------------------------------------------------
int __cdecl DP_Parse_SOS(struct _JPEG_PROPERTIES *a1, struct _STATE *a2, struct _FRAME *a3, struct _SCAN *a4)
{
  unsigned __int8 *v5; // edx@9
  _SCAN_COMPONENT *v6; // edx@9
  unsigned __int8 *v7; // edi@12
  int v8; // ebx@12
  signed int v9; // eax@12
  int v10; // ecx@12
  int v11; // ecx@15
  int v12; // eax@15
  _FRAME_COMPONENT *v13; // edi@16
  int v14; // eax@20
  signed int v15; // ebx@20
  struct _FRAME *v16; // edi@22
  char v17; // cl@22
  struct _JPEG_PROPERTIES *v18; // esi@22
  int v19; // ebx@22
  unsigned __int8 *v20; // eax@23
  unsigned __int8 *v21; // [sp+0h] [bp-70h]@1
  void *p; // [sp+4h] [bp-6Ch]@1
  int v23; // [sp+8h] [bp-68h]@1
  int v24; // [sp+Ch] [bp-64h]@1
  int *v25; // [sp+10h] [bp-60h]@1
  _DWORD *v26; // [sp+14h] [bp-5Ch]@1
  int v27; // [sp+18h] [bp-58h]@1
  int v28; // [sp+1Ch] [bp-54h]@10
  _SCAN_COMPONENT *v29; // [sp+20h] [bp-50h]@11
  int v30; // [sp+24h] [bp-4Ch]@12
  int v31; // [sp+28h] [bp-48h]@12
  int v32; // [sp+2Ch] [bp-44h]@12
  int v33; // [sp+30h] [bp-40h]@15
  int v34; // [sp+40h] [bp-30h]@10
  struct _SCAN *v35; // [sp+44h] [bp-2Ch]@9
  struct _JPEG_PROPERTIES *v36; // [sp+48h] [bp-28h]@11
  int v37; // [sp+4Ch] [bp-24h]@12
  int v38; // [sp+50h] [bp-20h]@12
  struct _FRAME *v39; // [sp+54h] [bp-1Ch]@11
  CPPEH_RECORD ms_exc; // [sp+58h] [bp-18h]@1

  ms_exc.old_esp = (DWORD)&v21;
  v21 = 0;
  p = 0;
  v23 = 0;
  v24 = 0;
  v25 = 0;
  v26 = a2->ctx;
  ms_exc.registration.TryLevel = 0;
  v24 = sub_787720(a2, (int)&v27);
  if ( !v24 )
  {
    if ( v27 >= 2 )
    {
      *v26 = v27 + 2;
      v27 -= 2;
      v24 = Get_Marker_Data_Into_Contiguous_Buffer(a2, v27, (unsigned __int8 **)&p, &v21, &v23);
      if ( !v24 )
      {
        v5 = v21++;
        a4->ncomps = *v5;
        a4->comps = (_SCAN_COMPONENT *)operator new(24 * a4->ncomps);
        v35 = a4;
        v6 = a4->comps;
        if ( v6 )
        {
          v25 = &a4->comps->comp;
          v34 = 0;
          v28 = 0;
          if ( v35->ncomps <= 0 )
          {
LABEL_23:
            v20 = v21++;
            v35->start_spec = *v20;
            v21 = v20 + 2;
            a4->end_spec = v20[1];
            a4->approx_high = (signed int)v20[2] >> 4;
            v21 = v20 + 3;
            a4->approx_low = v20[2] & 0xF;
            ms_exc.registration.TryLevel = -1;
          }
          else
          {
            v29 = v6;
            v39 = a3;
            v36 = a1;
            while ( 1 )
            {
              v7 = v21++;
              v8 = *v7;
              v30 = *v7;
              v9 = (signed int)v7[1] >> 4;
              v38 = v9;
              v31 = v9;
              v21 = v7 + 2;
              v10 = v7[1] & 0xF;
              v37 = v10;
              v32 = v10;
              if ( v9 < 0 || v9 > 4 || v10 > 4 )
                break;
              v11 = 0;
              v33 = 0;
              v12 = v39->ncomps;
              if ( v12 > 0 )
              {
                v13 = v39->comps;
                do
                {
                  if ( v8 == v13[v11].ident )
                    break;
                  v33 = ++v11;
                }
                while ( v11 < v12 );
              }
              if ( v11 >= v12 || (v14 = v11, v15 = v39->comps[v11].quant_sel, v15 < 0) || v15 > 4 )
              {
                v24 = -21;
                operator delete(v35->comps);
                a4->comps = 0;
                goto LABEL_4;
              }
              v6->comp = v11;
              v16 = v39;
              v6->hsampling = v39->comps[v14].hsampling;
              v6->vsampling = v16->comps[v14].vsampling;
              v17 = v38;
              v18 = v36;
              v6->dc_table = &v36->jFmtDcHuffman[v38];
              v6->ac_table = &v18->jFmtAcHuffman[v37];
              v6->quant_table = &v18->jFmtQuant[v16->comps[v14].quant_sel];
              v19 = v34;
              v18->HuffIdentifierDC[v34] = v17;
              v18->HuffIdentifierAC[v19] = v37;
              v34 = v19 + 1;
              v28 = v19 + 1;
              ++v6;
              v25 = (int *)v6;
              v35 = a4;
              if ( v19 + 1 >= a4->ncomps )
                goto LABEL_23;
            }
            v24 = -21;
            operator delete(v35->comps);
            a4->comps = 0;
          }
        }
        else
        {
          v24 = -5;
        }
      }
    }
    else
    {
      v24 = -21;
    }
  }
LABEL_4:
  if ( v23 && p )
  {
    operator delete(p);
    p = 0;
  }
  return v24;
}

//----- (00789110) --------------------------------------------------------
int __cdecl sub_789110(struct _JPEG_PROPERTIES *a1, struct _STATE *a2, struct _SCAN *a3, int a4, int a5, int a6, int a7, int a8, int a9, int a10, bool a11)
{
  int v11; // ecx@1
  int v12; // edx@1
  int v13; // ebp@1
  int v14; // ebx@4
  int v15; // eax@15
  int v16; // ebp@15
  int v17; // esi@15
  struct _JPEG_PROPERTIES *v18; // edi@15
  int v19; // eax@18
  int v20; // ebx@20
  int v21; // edx@22
  int v22; // esi@26
  int v23; // ebx@27
  int v24; // eax@33
  int v25; // esi@33
  struct _JPEG_PROPERTIES *v26; // edi@33
  int v27; // ebx@33
  int v28; // eax@36
  int v29; // ebp@38
  int v30; // edx@40
  int v31; // edi@44
  int v32; // esi@45
  int v33; // esi@50
  int v34; // eax@50
  struct _JPEG_PROPERTIES *v35; // edi@50
  int v36; // ebx@50
  int v37; // eax@53
  int v38; // ebp@55
  int v39; // edx@57
  int v40; // esi@61
  int v41; // ebx@62
  int v42; // edi@66
  _FRAME_COMPONENT *v43; // eax@67
  int v44; // ecx@67
  int v45; // ebp@68
  int v46; // esi@68
  int v47; // ebx@68
  int v48; // edx@69
  int v49; // edi@69
  int v50; // ecx@70
  char *v51; // ebp@73
  signed int v52; // ebx@73
  int v53; // edi@73
  int v55; // edx@81
  int v56; // edx@82
  int v57; // edx@83
  int v58; // edi@88
  int v59; // esi@89
  int v60; // edi@93
  _SAMPLING_STATE *v61; // edi@97
  int v62; // eax@105
  _FRAME_COMPONENT *v63; // eax@107
  char *v64; // edx@107
  int v65; // ecx@107
  int v66; // ebx@107
  int v67; // esi@108
  int v68; // edi@108
  int v69; // edx@117
  bool v70; // zf@117
  bool v71; // sf@117
  int v72; // eax@118
  int v73; // ebp@118
  char *v74; // eax@118
  int v75; // edx@118
  int v76; // ecx@118
  _FRAME_COMPONENT *v77; // ebx@118
  int v78; // edi@119
  int v79; // esi@119
  int v80; // eax@122
  char *v81; // esi@122
  int v82; // eax@122
  char *v83; // ebp@123
  __int16 v84; // bx@124
  __int16 *v85; // esi@127
  int v86; // eax@127
  char *v87; // ebx@128
  signed int v88; // ecx@129
  __int16 v89; // bp@130
  char *v90; // esi@134
  int v91; // eax@134
  char *v92; // ebx@135
  signed int v93; // ebp@136
  __int16 v94; // cx@137
  char *v95; // esi@141
  int v96; // eax@141
  char *v97; // ecx@142
  signed int v98; // ebx@143
  __int16 v99; // bp@144
  __int16 *v100; // esi@148
  int v101; // eax@148
  char *v102; // ebp@149
  __int16 v103; // bx@150
  char *v104; // eax@153
  char *v105; // esi@153
  int v106; // ebx@154
  __int16 v107; // bp@155
  char *v108; // esi@158
  int v109; // eax@158
  char *v110; // ebx@159
  signed int v111; // ebp@160
  __int16 v112; // cx@161
  __int16 *v113; // eax@165
  int v114; // esi@166
  char *v115; // ebp@166
  __int16 v116; // bx@167
  char *v117; // esi@170
  char *v118; // eax@170
  int v119; // ebx@171
  __int16 v120; // bp@172
  int v121; // esi@176
  char *v122; // ebx@177
  char *v123; // eax@177
  __int16 v124; // bp@178
  signed int v125; // esi@181
  char *v126; // eax@181
  signed int v127; // ebp@182
  __int16 v128; // dx@184
  signed int v129; // esi@188
  char *v130; // ecx@188
  int v131; // edx@189
  __int16 v132; // bp@191
  signed int v133; // ebp@195
  char *v134; // ebx@195
  signed int v135; // eax@196
  __int16 v136; // si@198
  int v137; // ebp@208
  _FRAME_COMPONENT *v138; // edi@208
  int v139; // edx@208
  char *v140; // ecx@208
  int v141; // ebx@208
  int v142; // eax@209
  char *v143; // eax@216
  int v144; // esi@216
  char *v145; // ebp@217
  __int16 v146; // bx@218
  __int16 *v147; // esi@221
  int v148; // eax@221
  char *v149; // ebx@222
  signed int v150; // ebp@223
  __int16 v151; // cx@224
  int v152; // esi@228
  char *v153; // ebx@229
  char *v154; // eax@229
  __int16 v155; // bp@230
  signed int v156; // edx@233
  char *v157; // eax@233
  signed int v158; // ecx@234
  __int16 v159; // si@236
  signed int v160; // esi@240
  char *v161; // ebx@240
  signed int v162; // ebp@241
  __int16 v163; // dx@243
  int v164; // [sp+24h] [bp-50h]@69
  char *v165; // [sp+24h] [bp-50h]@105
  char *v166; // [sp+24h] [bp-50h]@181
  char *v167; // [sp+24h] [bp-50h]@195
  int v168; // [sp+24h] [bp-50h]@206
  int v169; // [sp+28h] [bp-4Ch]@118
  int v170; // [sp+2Ch] [bp-48h]@71
  int v171; // [sp+2Ch] [bp-48h]@122
  char *v172; // [sp+2Ch] [bp-48h]@206
  char *v173; // [sp+2Ch] [bp-48h]@233
  int v174; // [sp+30h] [bp-44h]@67
  int v175; // [sp+30h] [bp-44h]@107
  int v176; // [sp+30h] [bp-44h]@117
  int v177; // [sp+30h] [bp-44h]@188
  int v178; // [sp+30h] [bp-44h]@208
  int v179; // [sp+30h] [bp-44h]@240
  int v180; // [sp+34h] [bp-40h]@67
  int v181; // [sp+34h] [bp-40h]@107
  int v182; // [sp+34h] [bp-40h]@118
  int v183; // [sp+34h] [bp-40h]@135
  int v184; // [sp+34h] [bp-40h]@142
  int v185; // [sp+34h] [bp-40h]@159
  int v186; // [sp+34h] [bp-40h]@188
  int v187; // [sp+34h] [bp-40h]@208
  int v188; // [sp+38h] [bp-3Ch]@15
  int v189; // [sp+38h] [bp-3Ch]@27
  int v190; // [sp+38h] [bp-3Ch]@33
  int v191; // [sp+38h] [bp-3Ch]@50
  int v192; // [sp+38h] [bp-3Ch]@62
  int v193; // [sp+38h] [bp-3Ch]@73
  int v194; // [sp+38h] [bp-3Ch]@107
  int v195; // [sp+38h] [bp-3Ch]@118
  int v196; // [sp+38h] [bp-3Ch]@123
  int v197; // [sp+38h] [bp-3Ch]@128
  int v198; // [sp+38h] [bp-3Ch]@135
  int v199; // [sp+38h] [bp-3Ch]@142
  int v200; // [sp+38h] [bp-3Ch]@149
  int v201; // [sp+38h] [bp-3Ch]@154
  int v202; // [sp+38h] [bp-3Ch]@159
  int v203; // [sp+38h] [bp-3Ch]@166
  int v204; // [sp+38h] [bp-3Ch]@171
  int v205; // [sp+38h] [bp-3Ch]@177
  int v206; // [sp+38h] [bp-3Ch]@208
  int v207; // [sp+38h] [bp-3Ch]@217
  int v208; // [sp+38h] [bp-3Ch]@222
  int v209; // [sp+38h] [bp-3Ch]@229
  int v210; // [sp+38h] [bp-3Ch]@240
  int v211; // [sp+3Ch] [bp-38h]@73
  unsigned int v212; // [sp+3Ch] [bp-38h]@122
  int v213; // [sp+3Ch] [bp-38h]@203
  int v214; // [sp+40h] [bp-34h]@105
  __int16 *v215; // [sp+44h] [bp-30h]@98
  int v216; // [sp+48h] [bp-2Ch]@8
  int v217; // [sp+48h] [bp-2Ch]@106
  int v218; // [sp+4Ch] [bp-28h]@1
  signed int v219; // [sp+4Ch] [bp-28h]@118
  void (__fastcall **v220)(int, int); // [sp+50h] [bp-24h]@1
  int v221; // [sp+54h] [bp-20h]@5
  int v222; // [sp+58h] [bp-1Ch]@97
  int v223; // [sp+5Ch] [bp-18h]@97
  int v224; // [sp+60h] [bp-14h]@103

  v11 = a4;
  v12 = a5;
  v218 = a7;
  v13 = a10;
  v220 = (void (__fastcall **)(int, int))a2->ctx;
  switch ( a10 )
  {
    case 1:
      v14 = 8;
      break;
    case 2:
      v14 = 4;
      break;
    case 4:
      v14 = 2;
      break;
    default:
      v14 = 1;
      break;
  }
  v221 = a6 << 6;
  if ( a4 == a8 || a5 == a9 )
    goto LABEL_252;
  v216 = a1->progressive_found ? a1->jframe.ncomps : a3->ncomps;
  switch ( a10 )
  {
    case 1:
      v58 = 0;
      if ( a6 > 0 )
      {
        v59 = a7;
        do
        {
          v220[18](v11, v12);
          v59 += 128;
          ++v58;
        }
        while ( v58 < a6 );
        v12 = a5;
        v11 = a4;
        v13 = 1;
      }
      break;
    case 2:
      if ( a11 )
      {
        if ( v216 > 0 )
        {
          v33 = 0;
          v34 = a1->progressive_found;
          v35 = a1;
          v191 = v14;
          v36 = 0;
          while ( 1 )
          {
            v37 = v34 ? v35->jframe.comps[v33].vsampling * v35->jframe.comps[v33].hsampling : a3->comps[v33].vsampling
                                                                                            * a3->comps[v33].hsampling;
            v38 = v37;
            if ( v37 == 1 )
            {
              v57 = v36++;
              ((void (__cdecl *)(int))v220[18])(a7 + (v57 << 7));
            }
            else
            {
              v38 = v37 - 1;
              if ( v37 )
              {
                do
                {
                  v39 = v36++;
                  ((void (__cdecl *)(int))v220[19])(a7 + (v39 << 7));
                  --v38;
                }
                while ( v38 != -1 );
                v35 = a1;
              }
            }
            if ( ++v33 >= v216 )
              break;
            v34 = v35->progressive_found;
          }
          v221 = v38;
          v12 = a5;
          v11 = a4;
          v14 = v191;
          v13 = 2;
        }
      }
      else
      {
        v40 = 0;
        if ( a6 > 0 )
        {
          v192 = v14;
          v41 = a7;
          do
          {
            v220[19](v11, v12);
            v41 += 128;
            ++v40;
          }
          while ( v40 < a6 );
          v12 = a5;
          v11 = a4;
          v14 = v192;
          v13 = 2;
        }
      }
      break;
    case 4:
      if ( a11 )
      {
        if ( v216 > 0 )
        {
          v15 = a1->progressive_found;
          v16 = 0;
          v17 = 0;
          v18 = a1;
          v188 = v14;
          while ( 1 )
          {
            v19 = v15 ? v18->jframe.comps[v17].vsampling * v18->jframe.comps[v17].hsampling : a3->comps[v17].vsampling
                                                                                            * a3->comps[v17].hsampling;
            v20 = v19;
            if ( v19 == 1 )
            {
              v56 = v16++;
              ((void (__cdecl *)(int))v220[19])(a7 + (v56 << 7));
            }
            else
            {
              v20 = v19 - 1;
              if ( v19 )
              {
                do
                {
                  v21 = v16++;
                  ((void (__cdecl *)(int))v220[20])(a7 + (v21 << 7));
                  --v20;
                }
                while ( v20 != -1 );
                v18 = a1;
              }
            }
            if ( ++v17 >= v216 )
              break;
            v15 = v18->progressive_found;
          }
          v221 = v20;
          v12 = a5;
          v11 = a4;
          v14 = v188;
          v13 = 4;
        }
      }
      else
      {
        v22 = 0;
        if ( a6 > 0 )
        {
          v189 = v14;
          v23 = a7;
          do
          {
            v220[20](v11, v12);
            v23 += 128;
            ++v22;
          }
          while ( v22 < a6 );
          v12 = a5;
          v11 = a4;
          v14 = v189;
          v13 = 4;
        }
      }
      break;
    case 8:
      if ( a11 )
      {
        if ( v216 > 0 )
        {
          v24 = a1->progressive_found;
          v25 = 0;
          v26 = a1;
          v190 = v14;
          v27 = 0;
          while ( 1 )
          {
            v28 = v24 ? v26->jframe.comps[v25].vsampling * v26->jframe.comps[v25].hsampling : a3->comps[v25].vsampling
                                                                                            * a3->comps[v25].hsampling;
            v29 = v28;
            if ( v28 == 1 )
            {
              v55 = v27++;
              ((void (__cdecl *)(int))v220[20])(a7 + (v55 << 7));
            }
            else
            {
              v29 = v28 - 1;
              if ( v28 )
              {
                do
                {
                  v30 = v27++;
                  ((void (__cdecl *)(int))v220[21])(a7 + (v30 << 7));
                  --v29;
                }
                while ( v29 != -1 );
                v26 = a1;
              }
            }
            if ( ++v25 >= v216 )
              break;
            v24 = v26->progressive_found;
          }
          v221 = v29;
          v12 = a5;
          v11 = a4;
          v14 = v190;
          v13 = 8;
        }
      }
      else
      {
        v31 = 0;
        if ( a6 > 0 )
        {
          v32 = a7;
          do
          {
            v220[21](v11, v12);
            v32 += 128;
            ++v31;
          }
          while ( v31 < a6 );
          v12 = a5;
          v11 = a4;
          v13 = 8;
        }
      }
      break;
  }
  if ( !a1->raw_coefs )
  {
LABEL_252:
    if ( a1->upsampling_type == 1 )
    {
      v60 = a1->jframe.max_hsampling;
      if ( v60 == 2 && a1->jframe.max_vsampling == 1 )
      {
        v213 = a1->roi.left / (2 * v14);
        if ( v11 != a8 )
        {
          if ( v11 == a8 - 1 )
          {
            if ( a1->JPGWidth & 0xF )
            {
              v168 = ((a1->JPGWidth & 0xF) + 2 * v13 - 1) / (2 * v13);
              v172 = a1->MCUBuf;
              if ( a1->jinterleaveType )
              {
                if ( a3->comps->hsampling == 1 )
                {
                  v160 = 0;
                  v179 = v12;
                  v210 = v14;
                  v161 = a1->MCUBuf;
                  do
                  {
                    v162 = v168;
                    if ( v168 < 8 )
                    {
                      if ( 8 - v168 >= 6 )
                      {
                        do
                        {
                          v163 = *(_WORD *)&v161[2 * v162 - 2];
                          *(_WORD *)&v161[2 * v162] = v163;
                          *(_WORD *)&v161[2 * v162 + 2] = v163;
                          *(_WORD *)&v161[2 * v162 + 4] = v163;
                          *(_WORD *)&v161[2 * v162 + 6] = v163;
                          *(_WORD *)&v161[2 * v162 + 8] = v163;
                          v162 += 5;
                        }
                        while ( v162 < 2 );
                      }
                      do
                      {
                        *(_WORD *)&v161[2 * v162] = *(_WORD *)&v161[2 * v162 - 2];
                        ++v162;
                      }
                      while ( v162 < 8 );
                    }
                    v161 += 16;
                    ++v160;
                  }
                  while ( v160 < 8 );
                  v12 = v179;
                  v14 = v210;
                  v13 = a10;
                  v172 = a1->MCUBuf;
                }
              }
              else if ( a1->JPGChannels > 0 )
              {
                v137 = 0;
                v178 = v12;
                v138 = a1->jframe.comps;
                v139 = a1->JPGChannels;
                v187 = v11;
                v140 = a1->MCUBuf;
                v206 = v14;
                v141 = 0;
                do
                {
                  v142 = v138[v141].hsampling;
                  if ( v142 == 1 )
                  {
                    v156 = 0;
                    v157 = v140;
                    v173 = v140;
                    do
                    {
                      v158 = v168;
                      if ( v168 < 8 )
                      {
                        if ( 8 - v168 >= 6 )
                        {
                          do
                          {
                            v159 = *(_WORD *)&v157[2 * v158 - 2];
                            *(_WORD *)&v157[2 * v158] = v159;
                            *(_WORD *)&v157[2 * v158 + 2] = v159;
                            *(_WORD *)&v157[2 * v158 + 4] = v159;
                            *(_WORD *)&v157[2 * v158 + 6] = v159;
                            *(_WORD *)&v157[2 * v158 + 8] = v159;
                            v158 += 5;
                          }
                          while ( v158 < 2 );
                        }
                        do
                        {
                          *(_WORD *)&v157[2 * v158] = *(_WORD *)&v157[2 * v158 - 2];
                          ++v158;
                        }
                        while ( v158 < 8 );
                      }
                      v157 += 16;
                      ++v156;
                    }
                    while ( v156 < 8 );
                    v140 = v173;
                    v139 = a1->JPGChannels;
                    v138 = a1->jframe.comps;
                    v142 = v138[v141].hsampling;
                  }
                  v140 += 128 * v142;
                  ++v141;
                  ++v137;
                }
                while ( v137 < v139 );
                v12 = v178;
                v11 = v187;
                v14 = v206;
                v13 = a10;
                v172 = a1->MCUBuf;
              }
            }
            else
            {
              v172 = a1->MCUBuf;
            }
          }
          else
          {
            v172 = a1->MCUBuf;
          }
          v143 = (char *)&a1->sampling_state_ptr->cur_row[v221] + v221 * 2 * v11;
          v144 = v221 - 1;
          if ( v221 )
          {
            v207 = v14;
            v145 = v172;
            do
            {
              v146 = *(_WORD *)v145;
              --v144;
              v145 += 2;
              *(_WORD *)v143 = v146;
              v143 += 2;
            }
            while ( v144 != -1 );
            v14 = v207;
            v13 = a10;
          }
          if ( !v11 )
          {
            v147 = &a1->sampling_state_ptr->cur_row[v14 - 1];
            v148 = a6 - 1;
            if ( a6 )
            {
              v208 = v14;
              v149 = a1->MCUBuf;
              do
              {
                v150 = 7;
                do
                {
                  v151 = *(_WORD *)v149;
                  v149 += 16;
                  --v150;
                  *v147 = v151;
                  v147 += 8;
                }
                while ( v150 != -1 );
                --v148;
              }
              while ( v148 != -1 );
              v11 = 0;
              v14 = v208;
              v13 = a10;
            }
          }
        }
        if ( v11 <= v213 )
          return 0;
        v152 = v221 - 1;
        if ( v221 )
        {
          v209 = v14;
          v153 = (char *)a1->sampling_state_ptr->cur_row + v221 * 2 * v11;
          v154 = a1->MCUBuf;
          do
          {
            v155 = *(_WORD *)v153;
            --v152;
            v153 += 2;
            *(_WORD *)v154 = v155;
            v154 += 2;
          }
          while ( v152 != -1 );
          v14 = v209;
          v13 = a10;
        }
        --v11;
        v60 = a1->jframe.max_hsampling;
      }
      if ( v60 == 2 && a1->jframe.max_vsampling == 2 )
      {
        if ( v13 != 1 )
          goto LABEL_79;
        v222 = a1->roi.left >> 4;
        v223 = a1->roi.top >> 4;
        v61 = a1->sampling_state_ptr;
        if ( v12 != v61->cur_row_number )
        {
          v215 = v61->top_row;
          v61->top_row = v61->cur_row;
          a1->sampling_state_ptr->cur_row = a1->sampling_state_ptr->bottom_row;
          if ( v12 == a9 )
          {
            a1->sampling_state_ptr->bottom_row = a1->sampling_state_ptr->last_row;
            a1->sampling_state_ptr->last_row = v215;
            v61 = a1->sampling_state_ptr;
          }
          else
          {
            a1->sampling_state_ptr->bottom_row = v215;
            v61 = a1->sampling_state_ptr;
          }
        }
        v61->cur_row_number = v12;
        if ( v11 != a8 && v12 != a9 )
        {
          v224 = a8 - 1;
          if ( v11 == a8 - 1 )
          {
            if ( a1->JPGWidth & 0xF )
            {
              v62 = a1->JPGWidth & 0xF;
              v214 = (v62 + 1) / 2;
              v165 = a1->MCUBuf;
              if ( a1->jinterleaveType )
              {
                if ( a3->comps->hsampling == 1 )
                {
                  v129 = 0;
                  v177 = v12;
                  v186 = v11;
                  v130 = a1->MCUBuf;
                  do
                  {
                    v131 = (v62 + 1) / 2;
                    if ( v214 < 8 )
                    {
                      if ( 8 - v214 >= 6 )
                      {
                        do
                        {
                          v132 = *(_WORD *)&v130[2 * v131 - 2];
                          *(_WORD *)&v130[2 * v131] = v132;
                          *(_WORD *)&v130[2 * v131 + 2] = v132;
                          *(_WORD *)&v130[2 * v131 + 4] = v132;
                          *(_WORD *)&v130[2 * v131 + 6] = v132;
                          *(_WORD *)&v130[2 * v131 + 8] = v132;
                          v131 += 5;
                        }
                        while ( v131 < 2 );
                      }
                      do
                      {
                        *(_WORD *)&v130[2 * v131] = *(_WORD *)&v130[2 * v131 - 2];
                        ++v131;
                      }
                      while ( v131 < 8 );
                    }
                    v130 += 16;
                    ++v129;
                  }
                  while ( v129 < 8 );
                  v12 = v177;
                  v11 = v186;
                  v13 = a10;
                  v165 = a1->MCUBuf;
                }
              }
              else
              {
                v217 = a1->JPGChannels;
                if ( a1->JPGChannels > 0 )
                {
                  v63 = a1->jframe.comps;
                  v175 = v12;
                  v181 = v11;
                  v64 = a1->MCUBuf;
                  v65 = 0;
                  v194 = v14;
                  v66 = 0;
                  do
                  {
                    v67 = (int)&v63[v65].ident;
                    v68 = v63[v65].hsampling;
                    if ( v68 == 1 )
                    {
                      v125 = 0;
                      v126 = v64;
                      v166 = v64;
                      do
                      {
                        v127 = v214;
                        if ( v214 < 8 )
                        {
                          if ( 8 - v214 >= 6 )
                          {
                            do
                            {
                              v128 = *(_WORD *)&v126[2 * v127 - 2];
                              *(_WORD *)&v126[2 * v127] = v128;
                              *(_WORD *)&v126[2 * v127 + 2] = v128;
                              *(_WORD *)&v126[2 * v127 + 4] = v128;
                              *(_WORD *)&v126[2 * v127 + 6] = v128;
                              *(_WORD *)&v126[2 * v127 + 8] = v128;
                              v127 += 5;
                            }
                            while ( v127 < 2 );
                          }
                          do
                          {
                            *(_WORD *)&v126[2 * v127] = *(_WORD *)&v126[2 * v127 - 2];
                            ++v127;
                          }
                          while ( v127 < 8 );
                        }
                        v126 += 16;
                        ++v125;
                      }
                      while ( v125 < 8 );
                      v64 = v166;
                      v217 = a1->JPGChannels;
                      v63 = a1->jframe.comps;
                      v67 = (int)&v63[v65].ident;
                      v68 = v63[v65].hsampling;
                    }
                    ++v65;
                    ++v66;
                    v64 += *(_DWORD *)(v67 + 8) * (v68 << 7);
                  }
                  while ( v66 < v217 );
                  v12 = v175;
                  v11 = v181;
                  v14 = v194;
                  v13 = a10;
                  v165 = a1->MCUBuf;
                }
              }
            }
            else
            {
              v165 = a1->MCUBuf;
            }
          }
          else
          {
            v165 = a1->MCUBuf;
          }
          if ( v12 == a9 - 1 )
          {
            if ( a1->JPGHeight & 0xF )
            {
              v176 = v12;
              v69 = a1->JPGChannels;
              v70 = v69 == 0;
              v71 = v69 < 0;
              v12 = v176;
              if ( !v71 && !v70 )
              {
                v72 = 8 * (((a1->JPGHeight & 0xF) + 2 * v13 - 1) / (2 * v13));
                v169 = 64 - v72;
                v73 = a1->JPGChannels;
                v219 = v72;
                v74 = v165;
                v75 = 0;
                v182 = v11;
                v76 = 0;
                v195 = v14;
                v77 = a1->jframe.comps;
                do
                {
                  v78 = (int)&v77[v76].ident;
                  v79 = v77[v76].vsampling;
                  if ( v79 == 1 )
                  {
                    v133 = 0;
                    v134 = v74;
                    v167 = v74;
                    do
                    {
                      v135 = v219;
                      if ( v219 < 64 )
                      {
                        if ( v169 >= 48 )
                        {
                          do
                          {
                            v136 = *(_WORD *)&v134[2 * v135 - 16];
                            *(_WORD *)&v134[2 * v135] = v136;
                            *(_WORD *)&v134[2 * v135 + 16] = v136;
                            *(_WORD *)&v134[2 * v135 + 32] = v136;
                            *(_WORD *)&v134[2 * v135 + 48] = v136;
                            *(_WORD *)&v134[2 * v135 + 64] = v136;
                            v135 += 40;
                          }
                          while ( v135 < 16 );
                        }
                        do
                        {
                          *(_WORD *)&v134[2 * v135] = *(_WORD *)&v134[2 * v135 - 16];
                          v135 += 8;
                        }
                        while ( v135 < 64 );
                      }
                      v134 += 2;
                      ++v133;
                    }
                    while ( v133 < 8 );
                    v74 = v167;
                    v73 = a1->JPGChannels;
                    v77 = a1->jframe.comps;
                    v78 = (int)&v77[v76].ident;
                    v79 = v77[v76].vsampling;
                  }
                  v74 += (*(_DWORD *)(v78 + 4) << 7) * v79;
                  ++v76;
                  ++v75;
                }
                while ( v75 < v73 );
                v12 = v176;
                v11 = v182;
                v14 = v195;
                v13 = a10;
                v165 = a1->MCUBuf;
              }
            }
          }
          v80 = v11 * 2 * v221;
          v171 = v80;
          v212 = 2 * v221;
          v81 = (char *)&a1->sampling_state_ptr->bottom_row[v221] + v80;
          v82 = v221 - 1;
          if ( v221 )
          {
            v196 = v14;
            v83 = v165;
            do
            {
              v84 = *(_WORD *)v83;
              --v82;
              v83 += 2;
              *(_WORD *)v81 = v84;
              v81 += 2;
            }
            while ( v82 != -1 );
            v14 = v196;
            v13 = a10;
          }
          if ( !v11 )
          {
            v85 = a1->sampling_state_ptr->bottom_row + 7;
            v86 = a6 - 1;
            if ( a6 )
            {
              v197 = v14;
              v87 = a1->MCUBuf;
              do
              {
                v88 = 7;
                do
                {
                  v89 = *(_WORD *)v87;
                  v87 += 16;
                  --v88;
                  *v85 = v89;
                  v85 += 8;
                }
                while ( v88 != -1 );
                --v86;
              }
              while ( v86 != -1 );
              v11 = 0;
              v14 = v197;
              v13 = a10;
            }
          }
          if ( v11 == v224 )
          {
            v90 = a1->MCUBuf + 14;
            v91 = a6 - 1;
            if ( a6 )
            {
              v183 = v11;
              v198 = v14;
              v92 = (char *)a1->sampling_state_ptr->bottom_row + v221 * 2 * a8 + v212;
              do
              {
                v93 = 7;
                do
                {
                  v94 = *(_WORD *)v90;
                  v90 += 16;
                  --v93;
                  *(_WORD *)v92 = v94;
                  v92 += 16;
                }
                while ( v93 != -1 );
                --v91;
              }
              while ( v91 != -1 );
              v11 = v183;
              v14 = v198;
              v13 = a10;
            }
          }
          if ( !v12 )
          {
            v95 = (char *)&a1->sampling_state_ptr->cur_row[v212 / 2] + v171;
            v96 = a6 - 1;
            if ( a6 )
            {
              v184 = v11;
              v97 = a1->MCUBuf;
              v199 = v14;
              do
              {
                v95 += 112;
                v98 = 7;
                do
                {
                  v99 = *(_WORD *)v97;
                  v97 += 2;
                  --v98;
                  *(_WORD *)v95 = v99;
                  v95 += 2;
                }
                while ( v98 != -1 );
                v97 += 112;
                --v96;
              }
              while ( v96 != -1 );
              v11 = v184;
              v14 = v199;
              v13 = a10;
            }
            if ( !v11 )
            {
              v100 = a1->sampling_state_ptr->cur_row + 63;
              v101 = a6 - 1;
              if ( a6 )
              {
                v200 = v14;
                v102 = a1->MCUBuf;
                do
                {
                  v103 = *(_WORD *)v102;
                  v102 += 128;
                  --v101;
                  *v100 = v103;
                  v100 += 64;
                }
                while ( v101 != -1 );
                v14 = v200;
                v13 = a10;
              }
            }
            if ( v11 == v224 )
            {
              v104 = a1->MCUBuf + 14;
              v105 = (char *)a1->sampling_state_ptr->cur_row + v221 * 2 * a8 + v212 + 112;
              if ( a6 )
              {
                v201 = v14;
                v106 = a6 - 1;
                do
                {
                  v107 = *(_WORD *)v104;
                  v104 += 128;
                  --v106;
                  *(_WORD *)v105 = v107;
                  v105 += 128;
                }
                while ( v106 != -1 );
                v14 = v201;
                v13 = a10;
              }
            }
          }
          if ( v12 == a9 - 1 )
          {
            v108 = (char *)&a1->sampling_state_ptr->last_row[v212 / 2] + v171;
            v109 = a6 - 1;
            if ( a6 )
            {
              v185 = v11;
              v202 = v14;
              v110 = a1->MCUBuf;
              do
              {
                v110 += 112;
                v111 = 7;
                do
                {
                  v112 = *(_WORD *)v110;
                  v110 += 2;
                  --v111;
                  *(_WORD *)v108 = v112;
                  v108 += 2;
                }
                while ( v111 != -1 );
                v108 += 112;
                --v109;
              }
              while ( v109 != -1 );
              v11 = v185;
              v14 = v202;
              v13 = a10;
            }
            if ( !v11 )
            {
              v113 = a1->sampling_state_ptr->last_row + 7;
              if ( a6 )
              {
                v203 = v14;
                v114 = a6 - 1;
                v115 = a1->MCUBuf + 112;
                do
                {
                  v116 = *(_WORD *)v115;
                  v115 += 128;
                  --v114;
                  *v113 = v116;
                  v113 += 64;
                }
                while ( v114 != -1 );
                v14 = v203;
                v13 = a10;
              }
            }
            if ( v11 == v224 )
            {
              v117 = a1->MCUBuf + 126;
              v118 = (char *)a1->sampling_state_ptr->last_row + v221 * 2 * a8 + v212;
              if ( a6 )
              {
                v204 = v14;
                v119 = a6 - 1;
                do
                {
                  v120 = *(_WORD *)v117;
                  v117 += 128;
                  --v119;
                  *(_WORD *)v118 = v120;
                  v118 += 128;
                }
                while ( v119 != -1 );
                v14 = v204;
                v13 = a10;
              }
            }
          }
        }
        if ( v11 <= v222 || v12 <= v223 )
          return 0;
        v121 = v221 - 1;
        if ( v221 )
        {
          v205 = v14;
          v122 = (char *)a1->sampling_state_ptr->cur_row + v11 * 2 * v221;
          v123 = a1->MCUBuf;
          do
          {
            v124 = *(_WORD *)v122;
            --v121;
            v122 += 2;
            *(_WORD *)v123 = v124;
            v123 += 2;
          }
          while ( v121 != -1 );
          v14 = v205;
          v13 = a10;
        }
        --v11;
        --v12;
      }
    }
    if ( v13 == 1 )
    {
      ((void (__cdecl *)(struct _JPEG_PROPERTIES *, int, int))v220[40])(a1, v11, v12);
      return 0;
    }
LABEL_79:
    US_And_CC_MCU_Scaled(a1, a2, a3, v11, v12, v14, a11);
    return 0;
  }
  v42 = a1->jframe.ncomps;
  if ( v42 > 0 )
  {
    v43 = a1->jframe.comps;
    v174 = v12;
    v180 = 16 * v11;
    v44 = 0;
    do
    {
      v45 = 0;
      v46 = v44;
      v47 = v43[v44].vsampling;
      if ( v47 > 0 )
      {
        v48 = v43[v46].hsampling;
        v49 = 2 * v44;
        v164 = v44;
        do
        {
          v50 = 0;
          if ( v48 > 0 )
          {
            v170 = v45;
            while ( 1 )
            {
              v51 = (char *)&(*(unsigned __int16 **)((char *)a1->raw_coefs->raw_ptrs + 2 * v49))[8 * v50]
                  + v180 * v48
                  + (a8 << 7) * v48 * (v170 + v174 * v47);
              v52 = 0;
              v193 = v50;
              v211 = v49;
              v53 = v218;
              do
              {
                (*(void (__cdecl **)(char *, int, signed int))&NULLSTR[5720])(v51, v53, 16);
                v43 = a1->jframe.comps;
                v48 = v43[v46].hsampling;
                v51 += v48 * 16 * a8;
                v53 += 16;
                ++v52;
              }
              while ( v52 < 8 );
              v218 = v53;
              v49 = v211;
              v50 = v193 + 1;
              if ( v193 + 1 >= v48 )
                break;
              v47 = v43[v46].vsampling;
            }
            v45 = v170;
            v47 = v43[v46].vsampling;
          }
          ++v45;
        }
        while ( v45 < v47 );
        v44 = v164;
        v42 = a1->jframe.ncomps;
      }
      ++v44;
    }
    while ( v44 < v42 );
  }
  return 0;
}
// B60728: using guessed type int (__cdecl *)(_DWORD, _DWORD, _DWORD);

//----- (0078A5A0) --------------------------------------------------------
int __cdecl sub_78A5A0(int a1, struct _STATE *a2, int a3, int a4)
{
  int v4; // ecx@1
  int v5; // eax@1
  int v6; // edx@1
  int v7; // eax@1
  int v8; // eax@1
  char *v9; // edx@6
  int v10; // ecx@6
  int v11; // edx@6
  int result; // eax@7
  LONG v13; // ecx@8
  void *v14; // edx@8

  v4 = 40 * a1;
  v5 = *(_DWORD *)(a4 + 18480);
  v6 = *(_DWORD *)(v5 + 40 * a1 + 24);
  v7 = *(_DWORD *)(v5 + 40 * a1 + 28);
  LODWORD(a2->bit_buffer_64) = v6;
  HIDWORD(a2->bit_buffer_64) = v7;
  a2->bitbuf_bits_valid = *(_DWORD *)(*(_DWORD *)(a4 + 18480) + 40 * a1 + 32);
  a2->unread_marker = *(_BYTE *)(*(_DWORD *)(a4 + 18480) + 40 * a1 + 36);
  *(_DWORD *)(a3 + 36) = *(_DWORD *)(*(_DWORD *)(a4 + 18480) + 40 * a1 + 4);
  *(_DWORD *)(a3 + 40) = *(_DWORD *)(*(_DWORD *)(a4 + 18480) + 40 * a1 + 8);
  *(_DWORD *)(a3 + 44) = *(_DWORD *)(*(_DWORD *)(a4 + 18480) + 40 * a1 + 12);
  *(_DWORD *)(a3 + 48) = *(_DWORD *)(*(_DWORD *)(a4 + 18480) + 40 * a1 + 16);
  v8 = *(_DWORD *)a4;
  if ( *(_DWORD *)a4 != 2 && v8 != 6 && v8 != 14 && v8 != 18 && v8 != 16 )
  {
    v9 = *(char **)(*(_DWORD *)(a4 + 18480) + v4);
    v10 = a2->entropy_buf_maxsize;
    a2->cur_entropy_ptr = v9;
    v11 = (int)&v9[-*(_DWORD *)(a4 + 68)];
    a2->entropy_bytes_processed = v11;
    a2->entropy_bytes_left = v10 - v11;
    return 0;
  }
  v13 = *(_DWORD *)(*(_DWORD *)(a4 + 18480) + v4);
  v14 = a2->file;
  a2->entropy_bytes_processed = v13;
  if ( ownSeekFile(v14, v13, 0) )
  {
    if ( !Buffer_Read_Bytes(a2) )
      return 0;
    result = -23;
  }
  else
  {
    result = -23;
  }
  return result;
}

//----- (0078A6B0) --------------------------------------------------------
int __cdecl sub_78A6B0(int a1, int a2, int a3, int a4)
{
  int v4; // edx@1
  int v5; // ecx@1
  int v6; // edi@1
  int v7; // eax@1
  int result; // eax@6

  v4 = 40 * a1;
  *(_DWORD *)(*(_DWORD *)(a4 + 18480) + v4 + 4) = *(_DWORD *)(a3 + 36);
  *(_DWORD *)(*(_DWORD *)(a4 + 18480) + v4 + 8) = *(_DWORD *)(a3 + 40);
  *(_DWORD *)(*(_DWORD *)(a4 + 18480) + v4 + 12) = *(_DWORD *)(a3 + 44);
  *(_DWORD *)(*(_DWORD *)(a4 + 18480) + v4 + 16) = *(_DWORD *)(a3 + 48);
  v5 = *(_DWORD *)(a2 + 4);
  v6 = *(_DWORD *)(a4 + 18480);
  *(_DWORD *)(v6 + v4 + 24) = *(_DWORD *)a2;
  *(_DWORD *)(v6 + v4 + 28) = v5;
  *(_DWORD *)(v6 + v4 + 32) = *(_DWORD *)(a2 + 12);
  *(_BYTE *)(*(_DWORD *)(a4 + 18480) + v4 + 36) = *(_BYTE *)(a2 + 48);
  v7 = *(_DWORD *)a4;
  if ( *(_DWORD *)a4 == 2 || v7 == 14 || v7 == 16 || v7 == 6 || v7 == 18 )
  {
    result = *(_DWORD *)(a2 + 28);
    *(_DWORD *)(*(_DWORD *)(a4 + 18480) + v4) = result;
  }
  else
  {
    result = *(_DWORD *)(a2 + 16);
    *(_DWORD *)(*(_DWORD *)(a4 + 18480) + v4) = result;
  }
  return result;
}

//----- (0078A770) --------------------------------------------------------
int __cdecl sub_78A770(struct _STATE *a1, int a2, int a3, int a4, int a5, int a6)
{
  unsigned int v6; // edi@1
  char v7; // al@4
  int result; // eax@6
  char v9; // [sp+8h] [bp-14h]@7

  v6 = *(_DWORD *)(a2 + 24);
  if ( !v6 || (a5 + a3 * a6 + 1) % v6 || a5 + a3 * a6 + 1 >= a3 * a4 )
    return 0;
  *(_DWORD *)(a2 + 36) = 0;
  *(_DWORD *)(a2 + 40) = 0;
  *(_DWORD *)(a2 + 44) = 0;
  *(_DWORD *)(a2 + 48) = 0;
  v7 = a1->unread_marker;
  a1->bitbuf_bits_valid = 0;
  if ( v7 )
  {
    a1->unread_marker = 0;
    return 0;
  }
  result = DP_Get_Next_Marker(a1, (enum IJL_MARKER *)&v9);
  if ( !result )
    return 0;
  return result;
}

//----- (0078A7F0) --------------------------------------------------------
int __cdecl sub_78A7F0(struct _STATE *a1, struct _SCAN *a2, struct _JPEG_PROPERTIES *a3, int a4)
{
  struct _SCAN *v4; // edi@1
  struct _JPEG_PROPERTIES *v5; // ebx@1
  int v6; // ebp@1
  int v7; // ecx@1
  _SCAN_COMPONENT *v8; // edx@2
  int v9; // eax@2
  int v10; // ebp@4
  int v11; // ecx@4
  int v12; // eax@5
  int v13; // edi@5
  int v14; // eax@8
  int v15; // ebp@9
  int v16; // edx@10
  bool v17; // al@10
  _FRAME_COMPONENT *v18; // esi@12
  int v19; // edi@12
  _SCAN_COMPONENT *v20; // esi@25
  int v21; // ecx@25
  signed int v22; // esi@25
  int v23; // eax@25
  int v24; // ebp@25
  int v25; // esi@25
  int v26; // eax@25
  _SCAN_COMPONENT *v27; // ebp@26
  int v28; // edx@26
  int v29; // edi@29
  int v30; // esi@29
  int v31; // eax@29
  int v32; // ecx@31
  int v33; // edx@31
  int v34; // eax@32
  int v35; // ebp@33
  int v36; // esi@33
  int v37; // edx@34
  int v38; // edi@37
  __int16 *v39; // ebp@37
  int v40; // esi@38
  _SCAN_COMPONENT *v41; // eax@43
  int v42; // edx@49
  int *v43; // eax@51
  int v44; // ebp@53
  int v45; // ecx@53
  int v46; // edi@54
  int v47; // eax@54
  int v48; // ecx@54
  int v49; // edx@56
  int v50; // ebp@56
  int v51; // esi@56
  int v52; // edi@57
  int v53; // ecx@63
  int v54; // edi@63
  _FRAME_COMPONENT *v55; // eax@64
  int v56; // esi@65
  int v57; // ebx@65
  int v58; // edx@66
  _RAW_DATA_TYPES_STATE *v59; // ebp@66
  int v60; // edi@67
  int v61; // esi@68
  int v62; // ecx@68
  int v63; // ebx@70
  signed int v64; // ebp@70
  int v65; // esi@70
  int v66; // ebp@77
  int v67; // eax@77
  int v68; // esi@79
  int v69; // ecx@79
  int v70; // eax@81
  __int16 *v71; // ebp@81
  int v72; // ecx@82
  int v73; // edx@86
  int v74; // ebx@87
  int v75; // esi@88
  int v76; // eax@93
  int v77; // edx@93
  int v78; // ebx@95
  int v79; // eax@102
  int *v80; // ebp@104
  int v81; // edx@104
  int v82; // edi@107
  int v83; // ecx@107
  _FRAME_COMPONENT *v84; // edx@107
  int v85; // eax@108
  int v86; // ebp@108
  int v87; // esi@108
  int v88; // ecx@109
  int v89; // edi@110
  int v90; // eax@111
  signed int v91; // ebx@113
  char *v92; // ebp@113
  int v93; // esi@113
  int v94; // eax@117
  int v95; // edx@117
  int v96; // ecx@119
  int v97; // ebp@119
  int v98; // esi@119
  int v99; // edi@120
  int v100; // edx@134
  int v101; // edx@137
  int v102; // esi@138
  int result; // eax@146
  int *v104; // eax@160
  int v105; // ebp@162
  int v106; // edx@162
  int i; // eax@163
  int v108; // eax@167
  int v109; // edx@169
  int v110; // ebp@180
  int v111; // edx@181
  int v112; // eax@183
  int v113; // esi@185
  int v114; // ebp@185
  struct _SCAN *v115; // edi@187
  int v116; // edx@188
  int v117; // eax@190
  int v118; // edx@192
  int v119; // ebp@192
  int v120; // ebp@201
  int v121; // edx@202
  int v122; // edx@203
  int v123; // esi@207
  int v124; // ebp@207
  struct _HUFFMAN_TABLE *v125; // [sp+30h] [bp-94h]@3
  struct _HUFFMAN_TABLE *v126; // [sp+40h] [bp-84h]@3
  int v127[4]; // [sp+50h] [bp-74h]@3
  __int16 v128; // [sp+60h] [bp-64h]@89
  int v129; // [sp+64h] [bp-60h]@66
  int v130; // [sp+68h] [bp-5Ch]@34
  int v131; // [sp+6Ch] [bp-58h]@34
  int v132; // [sp+70h] [bp-54h]@32
  int v133; // [sp+74h] [bp-50h]@29
  int v134; // [sp+78h] [bp-4Ch]@32
  int v135; // [sp+7Ch] [bp-48h]@26
  int v136; // [sp+80h] [bp-44h]@20
  int v137; // [sp+84h] [bp-40h]@29
  int v138; // [sp+88h] [bp-3Ch]@26
  int v139; // [sp+8Ch] [bp-38h]@34
  int v140; // [sp+90h] [bp-34h]@34
  int v141; // [sp+94h] [bp-30h]@25
  int v142; // [sp+98h] [bp-2Ch]@25
  int v143; // [sp+9Ch] [bp-28h]@25
  int v144; // [sp+A0h] [bp-24h]@10
  void (__cdecl **v145)(int, _DWORD); // [sp+A4h] [bp-20h]@1
  bool v146; // [sp+A8h] [bp-1Ch]@9
  int v147; // [sp+ACh] [bp-18h]@1
  int v148; // [sp+B0h] [bp-14h]@22

  v4 = a2;
  v5 = a3;
  v145 = (void (__cdecl **)(int, _DWORD))a1->ctx;
  v6 = 0;
  v147 = 0;
  v7 = a2->ncomps;
  if ( a2->ncomps > 0 )
  {
    v8 = a2->comps;
    v9 = 0;
    do
    {
      *(&v125 + v6) = v8[v9].ac_table;
      *(&v126 + v6) = v8[v9].dc_table;
      v127[v6] = v8[v9].vsampling * v8[v9].hsampling;
      ++v9;
      ++v6;
    }
    while ( v6 < v7 );
  }
  v10 = 0;
  v11 = a3->jframe.ncomps;
  if ( v11 > 0 )
  {
    v12 = 0;
    v13 = v147;
    do
    {
      ++v10;
      v13 += a3->jframe.comps[v12].vsampling * a3->jframe.comps[v12].hsampling;
      ++v12;
    }
    while ( v10 < v11 );
    v147 = v13;
    v4 = a2;
  }
  v14 = a3->jframe.max_hsampling;
  if ( v14 != 1 || a3->jframe.max_vsampling != 1 )
  {
    v15 = 0;
    v146 = 1;
    if ( v11 > 0 )
    {
      v16 = 0;
      v144 = v14;
      v17 = v146;
      while ( v17 )
      {
        v18 = a3->jframe.comps;
        v19 = v18[v16].hsampling;
        if ( v19 != v18[v16].vsampling )
          v17 = 0;
        if ( v19 != 1 && v19 != 2 )
          v17 = 0;
        ++v16;
        if ( ++v15 >= v11 )
        {
          v146 = v17;
          v14 = v144;
          v4 = a2;
          goto LABEL_19;
        }
      }
      v146 = 0;
      v14 = v144;
      v4 = a2;
    }
  }
  else
  {
    v146 = 0;
  }
LABEL_19:
  v136 = v14 == 2 && a3->jframe.max_vsampling <= 2 && a3->upsampling_type == 1;
  v148 = v14 == 2 && a3->jframe.max_vsampling == 2 && a3->upsampling_type == 1;
  if ( v4->start_spec && v4->end_spec )
  {
    v20 = v4->comps;
    v142 = (int)v20;
    v21 = 8 * v14 / v20->hsampling;
    v22 = v20->vsampling;
    v23 = a3->jframe.max_vsampling;
    v144 = v22;
    v24 = 8 * v23 / v22;
    v141 = (v21 + a3->JPGWidth - 1) / v21;
    v25 = v4->curyMCU;
    v26 = (v24 + a3->JPGHeight - 1) / v24;
    v143 = a3->numyMCUs;
    if ( v25 < v143 )
    {
      v27 = (_SCAN_COMPONENT *)v142;
      v135 = v147 << 7;
      v28 = v144;
      v136 = v147 << 7;
      v138 = v26;
      while ( v28 <= 0 )
      {
LABEL_49:
        v42 = v5->jframe.ncomps;
        if ( v42 <= v5->jframe.SeenAllDCScans && v42 <= v5->jframe.SeenAllACScans )
        {
          v43 = &v5->raw_coefs->data_type;
          if ( v43 && !*v43 )
          {
            v44 = 0;
            v45 = v5->numxMCUs;
            if ( v45 > 0 )
            {
              v144 = (int)&v5->raw_coefs->data_type;
              v140 = v45;
              v134 = v25 << 7;
              v137 = v25;
              do
              {
                v53 = 0;
                v54 = (int)v5->coef_buffer + v136 * (v44 + v137 * v140);
                if ( v42 > 0 )
                {
                  v55 = v5->jframe.comps;
                  v133 = 16 * v44;
                  v142 = v54;
                  v139 = v44;
                  do
                  {
                    v56 = 0;
                    v57 = v55[v53].vsampling;
                    if ( v57 > 0 )
                    {
                      v58 = v55[v53].hsampling;
                      v143 = 2 * v53;
                      v129 = 16 * v53;
                      v132 = v53;
                      v59 = (_RAW_DATA_TYPES_STATE *)v144;
                      do
                      {
                        v60 = 0;
                        if ( v58 > 0 )
                        {
                          v130 = v56;
                          v61 = v143;
                          v62 = v140;
                          while ( 1 )
                          {
                            v63 = (int)&(*(unsigned __int16 **)((char *)v59->raw_ptrs + 2 * v61))[8 * v60]
                                + v58 * v62 * v134 * v57
                                + v58 * v133
                                + v130 * (v62 << 7) * v58;
                            v64 = 0;
                            v131 = v60;
                            v65 = v142;
                            do
                            {
                              (*(void (__cdecl **)(int, int, signed int))&NULLSTR[5720])(v63, v65, 16);
                              v55 = a3->jframe.comps;
                              v62 = a3->numxMCUs;
                              v58 = *(int *)((char *)&v55->hsampling + v129);
                              v63 += v58 * 16 * a3->numxMCUs;
                              v65 += 16;
                              ++v64;
                            }
                            while ( v64 < 8 );
                            v142 = v65;
                            v61 = v143;
                            v60 = v131 + 1;
                            if ( v131 + 1 >= v58 )
                              break;
                            v59 = a3->raw_coefs;
                            v57 = *(int *)((char *)&v55->vsampling + v129);
                          }
                          v140 = v62;
                          v56 = v130;
                          v59 = a3->raw_coefs;
                          v57 = *(int *)((char *)&v55->vsampling + v129);
                        }
                        ++v56;
                      }
                      while ( v56 < v57 );
                      v144 = (int)v59;
                      v53 = v132;
                      v42 = a3->jframe.ncomps;
                    }
                    ++v53;
                  }
                  while ( v53 < v42 );
                  v44 = v139;
                  v5 = a3;
                }
                ++v44;
              }
              while ( v44 < v140 );
              v43 = (int *)v144;
              v45 = v140;
              v25 = v137;
            }
          }
          else
          {
            v44 = 0;
            v45 = v5->numxMCUs;
            if ( v45 > 0 )
            {
              do
              {
                v46 = (int)v5->MCUBuf;
                (*(void (__cdecl **)(char *, char *, int))&NULLSTR[5720])(
                  v5->MCUBuf,
                  (char *)v5->coef_buffer + v136 * (v44 + v25 * v45),
                  v135);
                v47 = 0;
                v48 = v5->jframe.ncomps;
                if ( v48 > 0 )
                {
                  v139 = v44;
                  v140 = v46;
                  v142 = v46;
                  v137 = v25;
                  do
                  {
                    v49 = (int)&v5->jframe.comps[v47].ident;
                    v50 = 0;
                    v51 = *(_DWORD *)(v49 + 8) * *(_DWORD *)(v49 + 4);
                    if ( v51 > 0 )
                    {
                      v144 = 16 * v47;
                      v52 = v140;
                      v143 = v47;
                      while ( 1 )
                      {
                        ((void (__cdecl **)(int, __int16 *))v145)[68](
                          v52,
                          v5->jFmtQuant[*(_DWORD *)(v49 + 12)].elements);
                        v52 += 128;
                        if ( ++v50 >= v51 )
                          break;
                        v49 = (int)&v5->jframe.comps->ident + v144;
                      }
                      v140 = v52;
                      v47 = v143;
                      v48 = v5->jframe.ncomps;
                    }
                    ++v47;
                  }
                  while ( v47 < v48 );
                  v44 = v139;
                  v46 = v142;
                  v25 = v137;
                }
                sub_789110(v5, a1, a2, v44++, v25, v147, v46, v5->numxMCUs, v5->numyMCUs, a4, v146);
                v45 = v5->numxMCUs;
              }
              while ( v44 < v45 );
              v43 = &v5->raw_coefs->data_type;
            }
          }
          if ( !v43 || *v43 )
            sub_789110(v5, a1, a2, v44, v25, v147, (int)v5->MCUBuf, v45, v5->numyMCUs, a4, v146);
        }
        if ( v5->interrupt )
        {
          v108 = v148;
          a2->curyMCU = v25 + 1;
          a2->curxMCU = 0;
          if ( v25 + 1 == v5->numyMCUs + v108 )
          {
            a2->curyMCU = 0;
            result = 0;
          }
          else
          {
            v109 = v5->numxMCUs - 1;
            result = 1;
            v5->roi.right = v109;
            v5->roi.bottom = v25;
            v5->roi.left = v109;
            v5->roi.top = v25;
          }
          return result;
        }
        if ( ++v25 >= v5->numyMCUs )
        {
          v143 = v5->numyMCUs;
          goto LABEL_160;
        }
        v27 = a2->comps;
        v28 = v27->vsampling;
      }
      v29 = 0;
      v133 = 8 * v25;
      v137 = v25;
      v30 = 0;
      v31 = v28;
      while ( 1 )
      {
        if ( v29 + v133 * v31 >= v5->JPGHeight )
        {
          v25 = v137;
          goto LABEL_49;
        }
        v32 = a2->curxMCU;
        v33 = v5->numxMCUs;
        if ( v32 < v33 )
          break;
LABEL_47:
        v29 += 8;
        if ( ++v30 >= v31 )
        {
          v25 = v137;
          goto LABEL_49;
        }
      }
      v34 = v27->hsampling;
      v142 = (int)v27;
      v132 = v29;
      v134 = v30;
      while ( 1 )
      {
        v35 = 0;
        v36 = (int)v5->coef_buffer + v136 * (v32 + v137 * v33);
        v144 = *(_DWORD *)v142;
        if ( v144 > 0 )
        {
          v140 = (int)&v5->jframe.comps->ident;
          v143 = 0;
          v130 = v34;
          v131 = v33;
          v37 = 0;
          v139 = v32;
          do
          {
            ++v35;
            v36 += *(_DWORD *)(v37 + v140 + 8) * (*(_DWORD *)(v37 + v140 + 4) << 7);
            v37 += 16;
          }
          while ( v35 < v144 );
          v34 = v130;
          v33 = v131;
          v32 = v139;
          v5 = a3;
        }
        v38 = 0;
        v39 = (__int16 *)(v36 + v134 * (v34 << 7));
        if ( v34 > 0 )
          break;
LABEL_45:
        if ( ++v32 >= v33 )
        {
          v27 = (_SCAN_COMPONENT *)v142;
          v29 = v132;
          v30 = v134;
          v31 = *(_DWORD *)(v142 + 8);
          goto LABEL_47;
        }
      }
      v40 = 0;
      v139 = v32;
      while ( 1 )
      {
        if ( v40 + v139 * 8 * v34 >= a3->JPGWidth )
        {
          v32 = v139;
          v5 = a3;
          v33 = a3->numxMCUs;
          goto LABEL_45;
        }
        if ( a2->approx_high )
        {
          Decode_Block_Prog_AC_SA(a1, v39, v125, a2->start_spec, a2->end_spec, a2->approx_low);
          v39 += 64;
        }
        else
        {
          Decode_Block_Prog_AC(a1, v39, v125, a2->start_spec, a2->end_spec, a2->approx_low);
          v39 += 64;
        }
        if ( sub_78A770(a1, (int)a2, v141, v138, v38 + a2->comps->hsampling * v139, v134 + a2->comps->vsampling * v137) )
          return -25;
        v40 += 8;
        ++v38;
        v41 = a2->comps;
        v142 = (int)v41;
        v34 = v41->hsampling;
        if ( v38 >= v34 )
        {
          v32 = v139;
          v5 = a3;
          v33 = a3->numxMCUs;
          goto LABEL_45;
        }
      }
    }
LABEL_160:
    v104 = &v5->raw_coefs->data_type;
    if ( !v104 || *v104 )
    {
      v105 = 0;
      v106 = v5->numxMCUs;
      if ( v106 + 1 > 0 )
      {
        for ( i = v143; ; i = v5->numyMCUs )
        {
          sub_789110(v5, a1, a2, v105++, v25, v147, (int)v5->MCUBuf, v106, i, a4, v146);
          v106 = v5->numxMCUs;
          if ( v105 >= v106 + 1 )
            break;
        }
      }
    }
    return 0;
  }
  v66 = v4->curyMCU;
  v67 = a3->numyMCUs;
  if ( v66 >= v67 )
    goto LABEL_136;
  v133 = v147 << 7;
  v134 = v147 << 7;
  v135 = v66;
LABEL_79:
  v68 = v4->curxMCU;
  v69 = v5->numxMCUs;
  if ( v68 >= v69 )
    goto LABEL_133;
  v131 = v135 << 7;
  while ( 1 )
  {
    v70 = 0;
    v71 = (__int16 *)((char *)v5->coef_buffer + v134 * (v68 + v135 * v69));
    v138 = v4->comps->comp;
    if ( v138 > 0 )
    {
      v130 = (int)&v5->jframe.comps->ident;
      v137 = 0;
      v129 = v69;
      v132 = v68;
      v72 = 0;
      do
      {
        ++v70;
        v71 = (__int16 *)((char *)v71 + *(_DWORD *)(v72 + v130 + 8) * (*(_DWORD *)(v72 + v130 + 4) << 7));
        v72 += 16;
      }
      while ( v70 < v138 );
      v69 = v129;
      v68 = v132;
      v5 = a3;
      v4 = a2;
    }
    if ( v4->approx_high )
    {
      v76 = 0;
      v77 = v4->ncomps;
      if ( v4->ncomps > 0 )
      {
        v132 = v68;
        do
        {
          v78 = 0;
          if ( v127[v76] > 0 )
          {
            v138 = v76;
            do
            {
              Decode_Block_Prog_DC_SA(a1, v71, v4->approx_low);
              v71 += 64;
              ++v78;
              v76 = v138;
            }
            while ( v78 < v127[v138] );
            v77 = v4->ncomps;
          }
          ++v76;
        }
        while ( v76 < v77 );
        v68 = v132;
        v5 = a3;
        v69 = a3->numxMCUs;
      }
    }
    else
    {
      v73 = v4->ncomps;
      if ( v4->ncomps > 0 )
      {
        v132 = v68;
        v74 = 0;
        do
        {
          v75 = 0;
          if ( v127[v74] > 0 )
          {
            do
            {
              (*(void (__cdecl **)(__int16 *, signed int))&NULLSTR[5716])(v71, 128);
              v128 = v4->dc_diff[v74];
              Decode_Block_Prog_DC(a1, *(&v126 + v74), v71, &v128, v4->approx_low);
              v71 += 64;
              ++v75;
              v4->dc_diff[v74] = v128;
            }
            while ( v75 < v127[v74] );
            v73 = v4->ncomps;
          }
          ++v74;
        }
        while ( v74 < v73 );
        v68 = v132;
        v5 = a3;
        v69 = a3->numxMCUs;
      }
    }
    if ( sub_78A770(a1, (int)v4, v69, v5->numyMCUs, v68, v135) )
      return -25;
    v79 = v5->jframe.ncomps;
    if ( v79 > v5->jframe.SeenAllDCScans )
    {
      v69 = v5->numxMCUs;
    }
    else if ( v79 > v5->jframe.SeenAllACScans )
    {
      v69 = v5->numxMCUs;
    }
    else
    {
      v69 = v5->numxMCUs;
      v80 = &v5->raw_coefs->data_type;
      v81 = (int)v5->coef_buffer + v134 * (v68 + v135 * v5->numxMCUs);
      if ( v80 && *v80 )
      {
        v138 = 0;
        if ( v79 > 0 )
        {
          v82 = v138;
          v130 = (int)&v5->jframe.comps->ident;
          v137 = 16 * v68;
          v143 = v81;
          v129 = v69;
          v83 = v79;
          v84 = (_FRAME_COMPONENT *)v130;
          v132 = v68;
          do
          {
            v85 = 0;
            v86 = 16 * v82;
            v87 = v84[v82].vsampling;
            if ( v87 > 0 )
            {
              v144 = 2 * v82;
              v88 = *(int *)((char *)&v84->hsampling + v86);
              v138 = v82;
              do
              {
                v89 = 0;
                if ( v88 > 0 )
                {
                  v140 = v85 << 7;
                  v139 = v85;
                  v142 = v86;
                  v90 = v129;
                  while ( 1 )
                  {
                    v91 = 0;
                    v92 = (char *)&(*(unsigned __int16 **)((char *)a3->raw_coefs->raw_ptrs + 2 * v144))[8 * v89]
                        + v88 * v90 * v131 * v87
                        + v140 * v88 * v90
                        + v137 * v88;
                    v93 = v143;
                    v141 = v89;
                    do
                    {
                      (*(void (__cdecl **)(char *, int, signed int))&NULLSTR[5720])(v92, v93, 16);
                      v84 = a3->jframe.comps;
                      v90 = a3->numxMCUs;
                      v88 = *(int *)((char *)&v84->hsampling + v142);
                      v92 += v88 * 16 * a3->numxMCUs;
                      v93 += 16;
                      ++v91;
                    }
                    while ( v91 < 8 );
                    v143 = v93;
                    v89 = v141 + 1;
                    if ( v141 + 1 >= v88 )
                      break;
                    v87 = *(int *)((char *)&v84->vsampling + v142);
                  }
                  v129 = v90;
                  v85 = v139;
                  v86 = v142;
                  v87 = *(int *)((char *)&v84->vsampling + v142);
                }
                ++v85;
              }
              while ( v85 < v87 );
              v82 = v138;
              v5 = a3;
              v83 = a3->jframe.ncomps;
            }
            ++v82;
          }
          while ( v82 < v83 );
          v69 = v129;
          v68 = v132;
          v4 = a2;
        }
      }
      else
      {
        v130 = (int)v5->MCUBuf;
        (*(void (__cdecl **)(int, int, int))&NULLSTR[5720])(v130, v81, v133);
        v94 = 0;
        v95 = v5->jframe.ncomps;
        if ( v95 > 0 )
        {
          v129 = v130;
          v132 = v68;
          do
          {
            v96 = (int)&v5->jframe.comps[v94].ident;
            v97 = 0;
            v98 = *(_DWORD *)(v96 + 8) * *(_DWORD *)(v96 + 4);
            if ( v98 > 0 )
            {
              v138 = 16 * v94;
              v99 = v129;
              v137 = v94;
              while ( 1 )
              {
                ((void (__cdecl **)(int, __int16 *))v145)[68](v99, v5->jFmtQuant[*(_DWORD *)(v96 + 12)].elements);
                v99 += 128;
                if ( ++v97 >= v98 )
                  break;
                v96 = (int)&v5->jframe.comps->ident + v138;
              }
              v129 = v99;
              v94 = v137;
              v95 = v5->jframe.ncomps;
            }
            ++v94;
          }
          while ( v94 < v95 );
          v68 = v132;
          v4 = a2;
        }
        sub_789110(v5, a1, v4, v68, v135, v147, v130, v5->numxMCUs, v5->numyMCUs, a4, v146);
        v69 = v5->numxMCUs;
      }
    }
    if ( v5->interrupt && (!v136 || v68) )
      break;
LABEL_131:
    if ( ++v68 >= v69 )
    {
      v67 = v5->numyMCUs;
LABEL_133:
      if ( v136 )
      {
        sub_789110(v5, a1, v4, v68, v135, v147, (int)v5->MCUBuf, v69, v67, a4, v146);
        if ( v5->interrupt )
        {
          if ( !v68 )
          {
            v67 = v5->numyMCUs;
            goto LABEL_134;
          }
          if ( v148 )
          {
            if ( !v135 )
            {
              v67 = v5->numyMCUs;
              goto LABEL_134;
            }
            v120 = v135;
          }
          else
          {
            v120 = v135;
          }
          v121 = (v68 + 1) % (v5->numxMCUs + v136);
          v4->curxMCU = v121;
          if ( v121 )
          {
            v122 = v120;
            v4->curyMCU = v120;
          }
          else
          {
            v122 = v120 + 1;
            v4->curyMCU = v120 + 1;
          }
          if ( v122 == v5->numyMCUs + v148 )
          {
            v4->curyMCU = 0;
            result = 0;
          }
          else
          {
            v123 = v68 - v136;
            result = 1;
            v5->roi.right = v123;
            v124 = v120 - v148;
            v5->roi.bottom = v124;
            v5->roi.left = v123;
            v5->roi.top = v124;
          }
          return result;
        }
        v67 = v5->numyMCUs;
      }
LABEL_134:
      v100 = v135++ + 1;
      if ( v135 >= v67 )
      {
        v66 = v100;
LABEL_136:
        if ( v148 )
        {
          v101 = v5->numxMCUs;
          v144 = v4->curxMCU;
          if ( v144 <= v101 )
          {
            v102 = v144;
            while ( 1 )
            {
              sub_789110(v5, a1, a2, v102, v66, v147, (int)v5->MCUBuf, v101, v67, a4, v146);
              if ( v5->interrupt && (!v136 || v102) )
              {
                if ( !v148 )
                {
                  v144 = v102;
                  v115 = a2;
LABEL_188:
                  v116 = (v102 + 1) % (v5->numxMCUs + v136);
                  v115->curxMCU = v116;
                  if ( v116 )
                  {
                    v115->curyMCU = v66;
                    goto LABEL_192;
                  }
                  v117 = v148;
                  v115->curyMCU = v66 + 1;
                  if ( v66 + 1 == v5->numyMCUs + v117 )
                  {
                    v115->curyMCU = 0;
                    result = 0;
                  }
                  else
                  {
LABEL_192:
                    result = 1;
                    v118 = v102 - v136;
                    v5->roi.right = v102 - v136;
                    v119 = v66 - v148;
                    v5->roi.bottom = v119;
                    v5->roi.left = v118;
                    v5->roi.top = v119;
                  }
                  return result;
                }
                if ( v66 )
                {
                  v144 = v102;
                  v115 = a2;
                  goto LABEL_188;
                }
              }
              ++v102;
              v101 = v5->numxMCUs;
              if ( v102 > v101 )
                return 0;
              v67 = v5->numyMCUs;
            }
          }
        }
        return 0;
      }
      goto LABEL_79;
    }
  }
  if ( v148 )
  {
    if ( v135 )
    {
      v110 = v135;
      goto LABEL_181;
    }
    goto LABEL_131;
  }
  v110 = v135;
LABEL_181:
  v111 = (v68 + 1) % (v136 + v69);
  v4->curxMCU = v111;
  if ( v111 )
  {
    v4->curyMCU = v110;
  }
  else
  {
    v112 = v148;
    v4->curyMCU = v110 + 1;
    if ( v110 + 1 == v5->numyMCUs + v112 )
    {
      v4->curyMCU = 0;
      return 0;
    }
  }
  v113 = v68 - v136;
  result = 1;
  v5->roi.right = v113;
  v114 = v110 - v148;
  v5->roi.bottom = v114;
  v5->roi.left = v113;
  v5->roi.top = v114;
  return result;
}
// B60724: using guessed type int (__cdecl *)(_DWORD, _DWORD);
// B60728: using guessed type int (__cdecl *)(_DWORD, _DWORD, _DWORD);
// 78A7F0: using guessed type int var_74[4];

//----- (0078BBA0) --------------------------------------------------------
int __cdecl sub_78BBA0(struct _STATE *a1, struct _SCAN *a2, struct _JPEG_PROPERTIES *a3, int a4)
{
  struct _SCAN *v4; // ebx@1
  struct _JPEG_PROPERTIES *v5; // esi@1
  int v6; // edx@1
  int v7; // ecx@1
  int v8; // eax@2
  _SCAN_COMPONENT *v9; // ebp@5
  int v10; // edi@5
  bool v11; // al@10
  int v12; // ecx@10
  int v13; // edi@10
  int v14; // edx@11
  _FRAME_COMPONENT *v15; // ebp@13
  int v16; // ebx@13
  signed int v17; // ecx@20
  signed int v18; // ecx@20
  _UPSAMPLING_TYPE v19; // edx@20
  signed int v20; // ecx@28
  int v21; // ebp@32
  _FRAME_COMPONENT *v22; // edx@33
  int v23; // eax@33
  int v24; // ebx@33
  _SCAN_COMPONENT *v25; // ebp@38
  int v26; // eax@38
  int v27; // ebp@38
  _SCAN_COMPONENT *v28; // ecx@42
  int v29; // edx@42
  int v30; // ebx@43
  int v31; // edi@43
  int v32; // eax@45
  int v33; // ebp@45
  int v34; // edx@46
  int v35; // ecx@47
  int v36; // edi@47
  int v37; // edx@48
  __int16 *v38; // ebx@51
  int v39; // edi@51
  int v40; // ebp@52
  int *v41; // eax@67
  int v42; // eax@69
  int v43; // ecx@71
  int v44; // ebx@71
  int v45; // edi@72
  int v46; // eax@72
  int v47; // ecx@72
  int v48; // edi@73
  int v49; // edx@74
  int v50; // ebx@74
  int v51; // ebp@74
  int v52; // edi@75
  int v53; // ebx@79
  char *v54; // edx@81
  int v55; // eax@81
  _FRAME_COMPONENT *v56; // ecx@82
  int v57; // ebx@83
  int v58; // ebp@83
  int v59; // esi@83
  int v60; // edx@84
  int v61; // eax@85
  int v62; // ebx@86
  int v63; // edi@86
  signed int v64; // ebp@88
  char *v65; // esi@88
  int v66; // ebx@88
  int v67; // ebp@95
  int v68; // eax@96
  int v69; // edi@97
  int v70; // eax@99
  __int16 *v71; // ebp@99
  int v72; // ecx@100
  int v73; // edx@104
  int v74; // esi@105
  int v75; // edi@106
  int v76; // eax@111
  int v77; // edx@111
  int v78; // esi@113
  int v79; // edx@124
  int *v80; // eax@126
  int v81; // ebp@128
  _FRAME_COMPONENT *v82; // eax@129
  int v83; // ecx@130
  int v84; // edi@130
  int v85; // ebx@130
  int v86; // edx@131
  int v87; // esi@132
  int v88; // edi@133
  int v89; // ecx@133
  char *v90; // ebp@135
  signed int v91; // ebx@135
  int v92; // esi@135
  int v93; // ebp@139
  int v94; // eax@139
  int v95; // ecx@139
  int v96; // edx@141
  int v97; // ebx@141
  int v98; // ebp@141
  int v99; // edi@142
  int result; // eax@159
  int *v101; // eax@176
  int v102; // eax@180
  int v103; // ebp@180
  int v104; // eax@189
  int v105; // edx@191
  int v106; // ebp@191
  int v107; // ebp@199
  int v108; // edx@199
  int v109; // edi@203
  int v110; // ebp@203
  struct _HUFFMAN_TABLE *v111; // [sp+30h] [bp-ACh]@5
  struct _HUFFMAN_TABLE *v112; // [sp+40h] [bp-9Ch]@5
  int v113[4]; // [sp+50h] [bp-8Ch]@5
  __int16 v114; // [sp+60h] [bp-7Ch]@107
  int v115; // [sp+64h] [bp-78h]@48
  int v116; // [sp+68h] [bp-74h]@46
  int v117; // [sp+6Ch] [bp-70h]@48
  int v118; // [sp+70h] [bp-6Ch]@46
  int v119; // [sp+74h] [bp-68h]@43
  int v120; // [sp+78h] [bp-64h]@46
  int v121; // [sp+7Ch] [bp-60h]@30
  int v122; // [sp+80h] [bp-5Ch]@39
  int v123; // [sp+84h] [bp-58h]@39
  int *v124; // [sp+88h] [bp-54h]@43
  int v125; // [sp+8Ch] [bp-50h]@33
  int v126; // [sp+90h] [bp-4Ch]@1
  int v127; // [sp+94h] [bp-48h]@23
  int v128; // [sp+98h] [bp-44h]@20
  int v129; // [sp+9Ch] [bp-40h]@20
  bool v130; // [sp+A0h] [bp-3Ch]@10
  int *v131; // [sp+A4h] [bp-38h]@48
  char *v132; // [sp+A8h] [bp-34h]@9
  int i; // [sp+ACh] [bp-30h]@38
  int v134; // [sp+B0h] [bp-2Ch]@8
  int v135; // [sp+B4h] [bp-28h]@20
  void (__cdecl **v136)(int, _DWORD); // [sp+B8h] [bp-24h]@1
  int v137; // [sp+BCh] [bp-20h]@20
  int v138; // [sp+C0h] [bp-1Ch]@20
  int v139; // [sp+C4h] [bp-18h]@21

  v4 = a2;
  v5 = a3;
  v136 = (void (__cdecl **)(int, _DWORD))a1->ctx;
  v6 = 0;
  v126 = 0;
  v7 = a2->ncomps;
  if ( a2->ncomps > 0 )
  {
    v8 = 0;
    do
    {
      if ( !a3->jscan )
      {
        a2->dc_diff[v6] = 0;
        v7 = a2->ncomps;
      }
      v9 = a2->comps;
      *(&v111 + v6) = v9[v8].ac_table;
      *(&v112 + v6) = v9[v8].dc_table;
      v10 = v9[v8].vsampling * v9[v8].hsampling;
      ++v8;
      v113[v6++] = v10;
    }
    while ( v6 < v7 );
  }
  if ( v7 == 1 )
    v113[0] = 1;
  v134 = a3->jframe.max_hsampling;
  if ( v134 == 1 )
  {
    v132 = (char *)a3->jframe.max_vsampling;
    if ( v132 == (char *)1 )
    {
      v13 = a3->jframe.ncomps;
      v130 = 0;
      goto LABEL_20;
    }
  }
  else
  {
    v132 = (char *)a3->jframe.max_vsampling;
  }
  v11 = 1;
  v12 = 0;
  v13 = a3->jframe.ncomps;
  v130 = 1;
  if ( v13 > 0 )
  {
    v14 = 0;
    while ( v11 )
    {
      v15 = a3->jframe.comps;
      v16 = v15[v14].hsampling;
      if ( v16 != v15[v14].vsampling )
        v11 = 0;
      if ( v16 != 1 && v16 != 2 )
        v11 = 0;
      ++v14;
      if ( ++v12 >= v13 )
      {
        v130 = v11;
        v4 = a2;
        goto LABEL_20;
      }
    }
    v130 = 0;
    v4 = a2;
  }
LABEL_20:
  v135 = 8 / a4;
  v17 = 8 / a4 * v134;
  v129 = a3->roi.left / v17;
  v128 = (a3->roi.right + v17 - 1) / v17;
  v18 = 8 / a4 * (_DWORD)v132;
  v137 = a3->roi.top / v18;
  v19 = a3->upsampling_type;
  v138 = (a3->roi.bottom + v18 - 1) / v18;
  v139 = v19 == 1 && v134 == 2;
  v127 = v19 == 1 && v132 == (char *)2;
  if ( v129 )
    v129 -= v139;
  if ( v137 )
    v137 -= v127;
  v20 = a3->numxMCUs;
  if ( v128 < v20 )
    v128 += v139;
  v121 = a3->numyMCUs;
  if ( v138 < v121 )
    v138 += v127;
  v21 = 0;
  if ( v13 > 0 )
  {
    v22 = a3->jframe.comps;
    v23 = 0;
    v125 = v20;
    v24 = v126;
    do
    {
      ++v21;
      v24 += v22[v23].vsampling * v22[v23].hsampling;
      ++v23;
    }
    while ( v21 < v13 );
    v126 = v24;
    v20 = v125;
    v5 = a3;
    v4 = a2;
  }
  if ( v4->start_spec && v4->end_spec )
  {
    v25 = v4->comps;
    i = 8 * v134 / v25->hsampling;
    v132 = (char *)(8 * (signed int)v132 / v25->vsampling);
    v134 = (i + v5->JPGWidth - 1) / i;
    v26 = (signed int)&v132[abs(v5->JPGHeight) - 1] / (signed int)v132;
    v27 = v4->curyMCU;
    if ( v27 < v121 )
    {
      v122 = v126 << 7;
      v123 = v126 << 7;
      v125 = v26;
      while ( 1 )
      {
        if ( v13 >= v5->jframe.SeenAllACScans )
        {
          v28 = a2->comps;
          v29 = v28->vsampling;
          if ( v29 > 0 )
            break;
        }
LABEL_63:
        if ( v13 <= v5->jframe.SeenAllDCScans && v13 <= v5->jframe.SeenAllACScans && v27 >= v137 && v27 < v138 )
        {
          v41 = &v5->raw_coefs->data_type;
          if ( v41 && !*v41 )
          {
            v53 = v129;
            if ( v129 < v128 )
            {
              v120 = v5->numxMCUs;
              v124 = (int *)v27;
              do
              {
                v54 = (char *)a3->coef_buffer + v123 * (v53 + (_DWORD)v124 * v120);
                v55 = 0;
                if ( v13 > 0 )
                {
                  v56 = a3->jframe.comps;
                  v117 = 16 * v53;
                  v118 = (_DWORD)v124 << 7;
                  v119 = (int)v54;
                  v121 = v53;
                  do
                  {
                    v57 = 0;
                    v58 = 16 * v55;
                    v59 = v56[v55].vsampling;
                    if ( v59 > 0 )
                    {
                      v60 = *(int *)((char *)&v56->hsampling + v58);
                      v115 = 2 * v55;
                      v116 = v55;
                      do
                      {
                        v61 = 0;
                        if ( v60 > 0 )
                        {
                          v132 = (char *)v57;
                          v62 = v115;
                          v63 = v120;
                          for ( i = v58; ; v59 = *(int *)((char *)&v56->vsampling + i) )
                          {
                            v64 = 0;
                            v65 = (char *)&(*(unsigned __int16 **)((char *)a3->raw_coefs->raw_ptrs + 2 * v62))[8 * v61]
                                + v60 * v63 * v118 * v59
                                + v60 * v117
                                + (_DWORD)v132 * (v63 << 7) * v60;
                            v66 = v119;
                            v131 = (int *)v61;
                            do
                            {
                              (*(void (__cdecl **)(char *, int, signed int))&NULLSTR[5720])(v65, v66, 16);
                              v56 = a3->jframe.comps;
                              v63 = a3->numxMCUs;
                              v60 = *(int *)((char *)&v56->hsampling + i);
                              v65 += v60 * 16 * a3->numxMCUs;
                              v66 += 16;
                              ++v64;
                            }
                            while ( v64 < 8 );
                            v119 = v66;
                            v62 = v115;
                            v61 = (int)v131 + 1;
                            if ( (signed int)v131 + 1 >= v60 )
                              break;
                          }
                          v120 = v63;
                          v57 = (int)v132;
                          v58 = i;
                          v59 = *(int *)((char *)&v56->vsampling + i);
                        }
                        ++v57;
                      }
                      while ( v57 < v59 );
                      v55 = v116;
                      v13 = a3->jframe.ncomps;
                    }
                    ++v55;
                  }
                  while ( v55 < v13 );
                  v53 = v121;
                }
                ++v53;
              }
              while ( v53 < v128 );
              v27 = (int)v124;
              v5 = a3;
            }
          }
          else
          {
            v42 = a2->curxMCU - v129;
            if ( v42 <= 0 )
              v42 = 0;
            v43 = v128;
            v44 = v129;
            a1->DIB_ptr = &v5->DIBBytes[v135
                                      * (v5->jframe.max_hsampling * v5->DIBChannels * v42
                                       + v5->DIBLineBytes * v5->jframe.max_vsampling * (v27 - v137))];
            if ( v44 < v43 )
            {
              do
              {
                v45 = (int)v5->MCUBuf;
                (*(void (__cdecl **)(char *, char *, int))&NULLSTR[5720])(
                  v5->MCUBuf,
                  (char *)v5->coef_buffer + v123 * (v44 + v5->numxMCUs * v27),
                  v122);
                v46 = 0;
                v47 = v5->jframe.ncomps;
                if ( v47 > 0 )
                {
                  i = v45;
                  v132 = (char *)v45;
                  v131 = (int *)v44;
                  v48 = v47;
                  v124 = (int *)v27;
                  do
                  {
                    v49 = (int)&v5->jframe.comps[v46].ident;
                    v50 = 0;
                    v51 = *(_DWORD *)(v49 + 8) * *(_DWORD *)(v49 + 4);
                    if ( v51 > 0 )
                    {
                      v120 = 16 * v46;
                      v52 = i;
                      v121 = v46;
                      while ( 1 )
                      {
                        ((void (__cdecl **)(int, __int16 *))v136)[68](
                          v52,
                          v5->jFmtQuant[*(_DWORD *)(v49 + 12)].elements);
                        v52 += 128;
                        if ( ++v50 >= v51 )
                          break;
                        v49 = (int)&v5->jframe.comps->ident + v120;
                      }
                      i = v52;
                      v46 = v121;
                      v48 = v5->jframe.ncomps;
                    }
                    ++v46;
                  }
                  while ( v46 < v48 );
                  v45 = (int)v132;
                  v44 = (int)v131;
                  v27 = (int)v124;
                }
                sub_789110(v5, a1, a2, v44++, v27, v126, v45, v5->numxMCUs, v5->numyMCUs, a4, v130);
              }
              while ( v44 < v128 );
            }
            if ( v139 && v44 == v128 )
              sub_789110(v5, a1, a2, v44, v27, v126, (int)v5->MCUBuf, v5->numxMCUs, v5->numyMCUs, a4, v130);
          }
        }
        if ( v5->interrupt )
        {
          v104 = v127;
          a2->curyMCU = v27 + 1;
          a2->curxMCU = 0;
          if ( v27 + 1 == v5->numyMCUs + v104 )
          {
            a2->curyMCU = 0;
            result = 0;
          }
          else
          {
            v105 = v5->numxMCUs - 1;
            result = 1;
            v5->roi.right = v105;
            v106 = v27 - v127;
            v5->roi.bottom = v106;
            v5->roi.left = v105;
            v5->roi.top = v106;
          }
          return result;
        }
        if ( ++v27 >= v5->numyMCUs )
        {
          v121 = v5->numyMCUs;
          v4 = a2;
          goto LABEL_176;
        }
        v13 = v5->jframe.ncomps;
      }
      v30 = 0;
      v119 = 8 * v27;
      v31 = 0;
      v124 = (int *)v27;
      while ( 1 )
      {
        if ( v30 + v119 * v29 >= v5->JPGHeight )
        {
          v27 = (int)v124;
          v13 = v5->jframe.ncomps;
          goto LABEL_63;
        }
        v32 = a2->curxMCU;
        v33 = v5->numxMCUs;
        if ( v32 < v33 )
          break;
LABEL_61:
        v30 += 8;
        if ( ++v31 >= v29 )
        {
          v27 = (int)v124;
          v13 = v5->jframe.ncomps;
          goto LABEL_63;
        }
      }
      v34 = v28->hsampling;
      v116 = (int)v28;
      v118 = v30;
      v120 = v31;
      while ( 1 )
      {
        v35 = 0;
        v36 = (int)v5->coef_buffer + v123 * (v32 + (_DWORD)v124 * v33);
        i = *(_DWORD *)v116;
        if ( i > 0 )
        {
          v131 = &v5->jframe.comps->ident;
          v132 = 0;
          v115 = v34;
          v37 = 0;
          v117 = v33;
          v121 = v32;
          do
          {
            ++v35;
            v36 += v131[v37 + 2] * (v131[v37 + 1] << 7);
            v37 += 4;
          }
          while ( v35 < i );
          v34 = v115;
          v33 = v117;
          v32 = v121;
          v5 = a3;
        }
        v38 = (__int16 *)(v36 + v120 * (v34 << 7));
        v39 = 0;
        if ( v34 > 0 )
          break;
LABEL_59:
        if ( ++v32 >= v33 )
        {
          v28 = (_SCAN_COMPONENT *)v116;
          v30 = v118;
          v31 = v120;
          v29 = *(_DWORD *)(v116 + 8);
          goto LABEL_61;
        }
      }
      v40 = 0;
      v121 = v32;
      while ( 1 )
      {
        if ( v40 + v121 * 8 * v34 >= a3->JPGWidth )
        {
          v32 = v121;
          v5 = a3;
          v33 = a3->numxMCUs;
          goto LABEL_59;
        }
        if ( a2->approx_high )
        {
          Decode_Block_Prog_AC_SA(a1, v38, v111, a2->start_spec, a2->end_spec, a2->approx_low);
          v38 += 64;
        }
        else
        {
          Decode_Block_Prog_AC(a1, v38, v111, a2->start_spec, a2->end_spec, a2->approx_low);
          v38 += 64;
        }
        if ( sub_78A770(
               a1,
               (int)a2,
               v134,
               v125,
               v39 + a2->comps->hsampling * v121,
               v120 + a2->comps->vsampling * (_DWORD)v124) )
        {
          return -25;
        }
        v40 += 8;
        ++v39;
        v116 = (int)&a2->comps->comp;
        v34 = *(_DWORD *)(v116 + 4);
        if ( v39 >= v34 )
        {
          v32 = v121;
          v5 = a3;
          v33 = a3->numxMCUs;
          goto LABEL_59;
        }
      }
    }
LABEL_176:
    v101 = &v5->raw_coefs->data_type;
    if ( v101 && !*v101 )
    {
      v13 = v5->jframe.ncomps;
    }
    else if ( v127 )
    {
      if ( v129 <= v128 )
      {
        v102 = v121;
        v103 = v129;
        while ( 1 )
        {
          sub_789110(v5, a1, v4, v103++, v102, v126, (int)v5->MCUBuf, v5->numxMCUs, v102, a4, v130);
          if ( v103 > v128 )
            break;
          v102 = v5->numyMCUs;
        }
      }
      if ( v5->interrupt )
      {
        result = 0;
        v4->curxMCU = 0;
        v4->curyMCU = 0;
        return result;
      }
      v13 = v5->jframe.ncomps;
    }
    else
    {
      v13 = v5->jframe.ncomps;
    }
LABEL_157:
    if ( v13 > v5->jframe.SeenAllDCScans || v13 > v5->jframe.SeenAllACScans )
      result = 0;
    else
      result = 2;
    return result;
  }
  v67 = v4->curyMCU;
  if ( v67 >= v121 )
    goto LABEL_157;
  v116 = v126 << 7;
  v68 = v121;
  v117 = v126 << 7;
  while ( 1 )
  {
    v69 = v4->curxMCU;
    if ( v69 < v20 )
      break;
LABEL_155:
    if ( ++v67 >= v68 )
    {
      v13 = v5->jframe.ncomps;
      goto LABEL_157;
    }
  }
  v115 = v67 << 7;
  v118 = v67;
  while ( 1 )
  {
    v70 = 0;
    v71 = (__int16 *)((char *)v5->coef_buffer + v117 * (v69 + v118 * v20));
    i = v4->comps->comp;
    if ( i > 0 )
    {
      v124 = &v5->jframe.comps->ident;
      v132 = 0;
      v125 = v20;
      v72 = 0;
      v131 = (int *)v69;
      do
      {
        ++v70;
        v71 = (__int16 *)((char *)v71 + v124[v72 + 2] * (v124[v72 + 1] << 7));
        v72 += 4;
      }
      while ( v70 < i );
      v20 = v125;
      v69 = (int)v131;
      v5 = a3;
      v4 = a2;
    }
    if ( v4->approx_high )
    {
      v76 = 0;
      v77 = v4->ncomps;
      if ( v4->ncomps > 0 )
      {
        v131 = (int *)v69;
        do
        {
          v78 = 0;
          if ( v113[v76] > 0 )
          {
            i = v76;
            do
            {
              Decode_Block_Prog_DC_SA(a1, v71, v4->approx_low);
              v71 += 64;
              ++v78;
              v76 = i;
            }
            while ( v78 < v113[i] );
            v77 = v4->ncomps;
          }
          ++v76;
        }
        while ( v76 < v77 );
        v69 = (int)v131;
        v5 = a3;
        v20 = a3->numxMCUs;
      }
    }
    else
    {
      v73 = v4->ncomps;
      if ( v4->ncomps > 0 )
      {
        v131 = (int *)v69;
        v74 = 0;
        do
        {
          v75 = 0;
          if ( v113[v74] > 0 )
          {
            do
            {
              (*(void (__cdecl **)(__int16 *, signed int))&NULLSTR[5716])(v71, 128);
              v114 = v4->dc_diff[v74];
              Decode_Block_Prog_DC(a1, *(&v112 + v74), v71, &v114, v4->approx_low);
              v71 += 64;
              ++v75;
              v4->dc_diff[v74] = v114;
            }
            while ( v75 < v113[v74] );
            v73 = v4->ncomps;
          }
          ++v74;
        }
        while ( v74 < v73 );
        v69 = (int)v131;
        v5 = a3;
        v20 = a3->numxMCUs;
      }
    }
    if ( sub_78A770(a1, (int)v4, v20, v5->numyMCUs, v69, v118) )
      return -25;
    if ( v69 < v129 )
    {
      v20 = v5->numxMCUs;
    }
    else if ( v69 >= v128 )
    {
      v20 = v5->numxMCUs;
    }
    else if ( v118 < v137 )
    {
      v20 = v5->numxMCUs;
    }
    else if ( v118 >= v138 )
    {
      v20 = v5->numxMCUs;
    }
    else
    {
      v79 = v5->jframe.ncomps;
      if ( v79 > v5->jframe.SeenAllDCScans )
      {
        v20 = v5->numxMCUs;
      }
      else if ( v79 > v5->jframe.SeenAllACScans )
      {
        v20 = v5->numxMCUs;
      }
      else
      {
        v20 = v5->numxMCUs;
        v119 = (int)v5->coef_buffer + v117 * (v69 + v118 * v5->numxMCUs);
        v80 = &v5->raw_coefs->data_type;
        if ( !v80 || *v80 )
        {
          v93 = (int)v5->MCUBuf;
          (*(void (__cdecl **)(char *, int, int))&NULLSTR[5720])(v5->MCUBuf, v119, v116);
          v94 = 0;
          v95 = v5->jframe.ncomps;
          if ( v95 > 0 )
          {
            v132 = v5->MCUBuf;
            i = v93;
            v131 = (int *)v69;
            do
            {
              v96 = (int)&v5->jframe.comps[v94].ident;
              v97 = 0;
              v98 = *(_DWORD *)(v96 + 8) * *(_DWORD *)(v96 + 4);
              if ( v98 > 0 )
              {
                v135 = 16 * v94;
                v99 = (int)v132;
                v134 = v94;
                while ( 1 )
                {
                  ((void (__cdecl **)(int, __int16 *))v136)[68](v99, v5->jFmtQuant[*(_DWORD *)(v96 + 12)].elements);
                  v99 += 128;
                  if ( ++v97 >= v98 )
                    break;
                  v96 = (int)&v5->jframe.comps->ident + v135;
                }
                v132 = (char *)v99;
                v94 = v134;
                v95 = v5->jframe.ncomps;
              }
              ++v94;
            }
            while ( v94 < v95 );
            v93 = i;
            v69 = (int)v131;
            v4 = a2;
          }
          sub_789110(v5, a1, v4, v69, v118, v126, v93, v5->numxMCUs, v5->numyMCUs, a4, v130);
          v20 = v5->numxMCUs;
        }
        else
        {
          v81 = 0;
          if ( v79 > 0 )
          {
            v82 = v5->jframe.comps;
            v125 = v20;
            v131 = (int *)v69;
            do
            {
              v83 = 0;
              v84 = 16 * v81;
              v85 = v82[v81].vsampling;
              if ( v85 > 0 )
              {
                v132 = (char *)(2 * v81);
                v86 = *(int *)((char *)&v82->hsampling + v84);
                i = 16 * (_DWORD)v131;
                v124 = (int *)v81;
                do
                {
                  v87 = 0;
                  if ( v86 > 0 )
                  {
                    v122 = v83 << 7;
                    v123 = v83;
                    v120 = v84;
                    v88 = (int)v132;
                    v89 = v125;
                    while ( 1 )
                    {
                      v90 = (char *)&(*(unsigned __int16 **)((char *)a3->raw_coefs->raw_ptrs + 2 * v88))[8 * v87]
                          + v86 * v89 * v115 * v85
                          + v122 * v86 * v89
                          + i * v86;
                      v91 = 0;
                      v121 = v87;
                      v92 = v119;
                      do
                      {
                        (*(void (__cdecl **)(_DWORD, int, signed int))&NULLSTR[5720])(v90, v92, 16);
                        v82 = a3->jframe.comps;
                        v89 = a3->numxMCUs;
                        v86 = *(int *)((char *)&v82->hsampling + v120);
                        v90 += v86 * 16 * a3->numxMCUs;
                        v92 += 16;
                        ++v91;
                      }
                      while ( v91 < 8 );
                      v119 = v92;
                      v88 = (int)v132;
                      v87 = v121 + 1;
                      if ( v121 + 1 >= v86 )
                        break;
                      v85 = *(int *)((char *)&v82->vsampling + v120);
                    }
                    v125 = v89;
                    v83 = v123;
                    v84 = v120;
                    v85 = *(int *)((char *)&v82->vsampling + v120);
                  }
                  ++v83;
                }
                while ( v83 < v85 );
                v81 = (int)v124;
                v79 = a3->jframe.ncomps;
              }
              ++v81;
            }
            while ( v81 < v79 );
            v20 = v125;
            v69 = (int)v131;
            v5 = a3;
            v4 = a2;
          }
        }
      }
    }
    if ( v5->interrupt )
      break;
    if ( ++v69 >= v20 )
    {
      v67 = v118;
      v68 = v5->numyMCUs;
      goto LABEL_155;
    }
  }
  v107 = v118;
  v108 = (v69 + 1) % v20;
  v4->curxMCU = v108;
  if ( v108 )
  {
    v4->curyMCU = v107;
  }
  else
  {
    v4->curyMCU = v107 + 1;
    if ( v107 + 1 == v5->numyMCUs )
    {
      v4->curyMCU = 0;
      return 0;
    }
  }
  v109 = v69 - v139;
  result = 1;
  v5->roi.right = v109;
  v110 = v107 - v127;
  v5->roi.bottom = v110;
  v5->roi.left = v109;
  v5->roi.top = v110;
  return result;
}
// B60724: using guessed type int (__cdecl *)(_DWORD, _DWORD);
// B60728: using guessed type int (__cdecl *)(_DWORD, _DWORD, _DWORD);
// 78BBA0: using guessed type int var_8C[4];

//----- (0078CF00) --------------------------------------------------------
int __cdecl sub_78CF00(struct _STATE *a1, struct _SCAN *a2, struct _JPEG_PROPERTIES *a3, int a4)
{
  struct _SCAN *v4; // edi@1
  int v5; // ecx@1
  int v6; // ebp@1
  _SCAN_COMPONENT *v7; // edx@2
  int v8; // eax@2
  int v9; // ebx@2
  int v10; // esi@3
  int v11; // ecx@5
  int v12; // ebx@6
  int v13; // esi@8
  int v14; // ebp@8
  int v15; // edx@9
  bool v16; // al@9
  _FRAME_COMPONENT *v17; // edi@11
  int v18; // ebx@11
  int v19; // esi@22
  struct _JPEG_PROPERTIES *v20; // ebx@23
  int v21; // ebp@24
  int v22; // esi@25
  int v23; // edx@25
  struct _JPEG_PROPERTIES *v24; // eax@26
  int *v25; // ecx@27
  _SCAN_COMPONENT *v26; // ebp@29
  int v27; // ebx@29
  int v28; // ecx@29
  int v29; // ebp@30
  int v30; // eax@30
  int v31; // edx@30
  int result; // eax@33
  int v33; // esi@34
  signed int v34; // ebx@34
  char *v35; // ebp@34
  int v36; // ebp@40
  int v37; // edi@41
  int v38; // ecx@42
  int *v39; // edx@48
  int *v40; // edx@58
  int v41; // edx@60
  int v42; // ebp@64
  int v43; // esi@74
  int v44; // ebx@74
  int v45; // edx@75
  int v46; // ebp@80
  int v47; // esi@80
  int v48; // esi@83
  int v49; // edx@83
  int v50; // ebp@88
  int v51; // esi@88
  int v52; // esi@89
  struct _SCAN *v53; // edi@89
  int v54; // edx@90
  int v55; // ecx@95
  int v56; // esi@95
  int v57; // ebp@97
  int v58; // ecx@98
  int v59; // edx@98
  int v60; // ecx@103
  int v61; // esi@103
  _SCAN_COMPONENT *v62; // ebx@113
  int v63; // esi@113
  int v64[4]; // [sp+30h] [bp-ACh]@3
  int v65[4]; // [sp+40h] [bp-9Ch]@3
  int v66[4]; // [sp+50h] [bp-8Ch]@3
  int v67[4]; // [sp+60h] [bp-7Ch]@3
  __int16 v68; // [sp+70h] [bp-6Ch]@42
  __int16 v69; // [sp+74h] [bp-68h]@33
  int v70; // [sp+78h] [bp-64h]@9
  int v71; // [sp+7Ch] [bp-60h]@9
  int v72; // [sp+80h] [bp-5Ch]@25
  int v73; // [sp+84h] [bp-58h]@1
  bool v74; // [sp+88h] [bp-54h]@8
  int (__cdecl **v75)(struct _STATE *, int, int, __int16 *, int); // [sp+8Ch] [bp-50h]@1
  int *v76; // [sp+90h] [bp-4Ch]@36
  int v77; // [sp+94h] [bp-48h]@30
  int v78; // [sp+98h] [bp-44h]@30
  int v79; // [sp+9Ch] [bp-40h]@32
  int v80; // [sp+A0h] [bp-3Ch]@32
  int v81; // [sp+A4h] [bp-38h]@29
  int v82; // [sp+A8h] [bp-34h]@32
  int v83; // [sp+ACh] [bp-30h]@26
  int v84; // [sp+B0h] [bp-2Ch]@26
  int v85; // [sp+B4h] [bp-28h]@21
  int v86; // [sp+B8h] [bp-24h]@23
  int v87; // [sp+BCh] [bp-20h]@23
  int v88; // [sp+C0h] [bp-1Ch]@19
  int v89; // [sp+C4h] [bp-18h]@6

  v4 = a2;
  v75 = (int (__cdecl **)(struct _STATE *, int, int, __int16 *, int))a1->ctx;
  v5 = 0;
  v6 = a2->ncomps;
  v73 = 0;
  if ( v6 > 0 )
  {
    v7 = a2->comps;
    v8 = 0;
    v9 = v73;
    do
    {
      v64[v5] = (int)&v7[v8].ac_table->huff_class;
      v65[v5] = (int)&v7[v8].dc_table->huff_class;
      v66[v5] = (int)v7[v8].quant_table->elements;
      v10 = v7[v8].vsampling * v7[v8].hsampling;
      v9 += v10;
      ++v8;
      v67[v5++] = v10;
    }
    while ( v5 < v6 );
    v73 = v9;
  }
  v11 = a3->jframe.max_hsampling;
  if ( v6 == 1 )
  {
    v62 = a2->comps;
    v63 = 8 * a3->jframe.max_vsampling / v62->vsampling;
    v12 = (a3->JPGWidth + 8 * v11 / v62->hsampling - 1) / (8 * v11 / v62->hsampling);
    v89 = (abs(a3->JPGHeight) + v63 - 1) / v63;
    v73 = 1;
    v67[0] = 1;
  }
  else
  {
    v12 = a3->numxMCUs;
    v89 = a3->numyMCUs;
  }
  if ( v11 != 1 || a3->jframe.max_vsampling != 1 )
  {
    v13 = 0;
    v74 = 1;
    v14 = a3->jframe.ncomps;
    if ( v14 > 0 )
    {
      v15 = 0;
      v16 = v74;
      v70 = v12;
      v71 = v11;
      while ( v16 )
      {
        v17 = a3->jframe.comps;
        v18 = v17[v15].hsampling;
        if ( v18 != v17[v15].vsampling )
          v16 = 0;
        if ( v18 != 1 && v18 != 2 )
          v16 = 0;
        ++v15;
        if ( ++v13 >= v14 )
        {
          v74 = v16;
          v12 = v70;
          v11 = v71;
          v4 = a2;
          goto LABEL_18;
        }
      }
      v74 = 0;
      v12 = v70;
      v11 = v71;
      v4 = a2;
    }
  }
  else
  {
    v74 = 0;
  }
LABEL_18:
  v88 = v11 == 2 && a3->jframe.max_vsampling <= 2 && a3->upsampling_type == 1;
  v85 = v11 == 2 && a3->jframe.max_vsampling == 2 && a3->upsampling_type == 1;
  v19 = v4->curyMCU;
  if ( v19 >= v89 )
  {
LABEL_62:
    if ( !v85 )
      return 0;
    v72 = v4->curxMCU;
    if ( v72 < v12 )
    {
      v71 = v19;
      v42 = v72;
      while ( 1 )
      {
        sub_789110(a3, a1, a2, v42, v71, v73, (int)a3->MCUBuf, v12, v89, a4, v74);
        if ( a3->interrupt && (!v88 || v42) )
        {
          if ( !v85 )
          {
            v72 = v42;
            v52 = v71;
            v53 = a2;
LABEL_90:
            v54 = (v42 + 1) % (v88 + v12);
            v53->curxMCU = v54;
            if ( v54 )
            {
              v53->curyMCU = v52;
              goto LABEL_95;
            }
            if ( v52 + 1 == v85 + v89 )
            {
              v53->curyMCU = 0;
              result = 0;
            }
            else
            {
              v53->curyMCU = v52 + 1;
LABEL_95:
              result = 1;
              v55 = v42 - v88;
              a3->roi.right = v42 - v88;
              v56 = v52 - v85;
              a3->roi.bottom = v56;
              a3->roi.left = v55;
              a3->roi.top = v56;
            }
            return result;
          }
          if ( v71 )
          {
            v72 = v42;
            v52 = v71;
            v53 = a2;
            goto LABEL_90;
          }
        }
        if ( ++v42 >= v12 )
        {
          v72 = v42;
          v19 = v71;
          v4 = a2;
          break;
        }
      }
    }
    if ( !v88 )
      return 0;
    v57 = v89;
    sub_789110(a3, a1, v4, v72, v19, v73, (int)a3->MCUBuf, v12, v89, a4, v74);
    if ( !a3->interrupt )
      return 0;
    v58 = v72;
    v59 = (v72 + 1) % (v88 + v12);
    v4->curxMCU = v59;
    if ( v59 )
    {
      v4->curyMCU = v19;
    }
    else
    {
      if ( v19 + 1 == v85 + v57 )
      {
        v4->curyMCU = 0;
        return 0;
      }
      v4->curyMCU = v19 + 1;
    }
    result = 1;
    v60 = v58 - v88;
    a3->roi.right = v60;
    v61 = v19 - v85;
    a3->roi.bottom = v61;
    a3->roi.left = v60;
    a3->roi.top = v61;
  }
  else
  {
    v87 = 16 * v12;
    v86 = v12 << 7;
    v71 = v19;
    v70 = v12;
    v20 = a3;
    while ( 1 )
    {
      v21 = v4->curxMCU;
      if ( v21 < v70 )
      {
        do
        {
          v22 = 0;
          v72 = (int)v20->MCUBuf;
          v23 = v4->ncomps;
          if ( v4->ncomps > 0 )
          {
            v24 = v20;
            v84 = 16 * v21;
            v83 = v21;
            do
            {
              v25 = &v24->raw_coefs->data_type;
              if ( !v25 || *v25 )
              {
                v36 = 0;
                if ( v67[v22] > 0 )
                {
                  v37 = v72;
                  do
                  {
                    v38 = v64[v22];
                    v68 = a2->dc_diff[v22];
                    result = v75[61](a1, v65[v22], v38, &v68, v37);
                    a2->dc_diff[v22] = v68;
                    if ( result < 0 )
                      return result;
                    ((void (__cdecl *)(int, int))v75[68])(v37, v66[v22]);
                    v37 += 128;
                    ++v36;
                  }
                  while ( v36 < v67[v22] );
                  v72 = v37;
                  v24 = a3;
                  v4 = a2;
                  v23 = a2->ncomps;
                }
              }
              else
              {
                v81 = 0;
                v26 = v4->comps;
                v27 = 24 * v22;
                v28 = v26[v22].vsampling;
                if ( v28 > 0 )
                {
                  v29 = *(int *)((char *)&v26->hsampling + v27);
                  v30 = v81;
                  v78 = 2 * v22;
                  v31 = v29;
                  v77 = v22;
                  do
                  {
                    if ( v31 > 0 )
                    {
                      v81 = v30;
                      v80 = 0;
                      v79 = 0;
                      v82 = v27;
                      do
                      {
                        v69 = v4->dc_diff[2 * v78 / 4u];
                        result = v75[61](a1, v65[v77], v64[v77], &v69, v72);
                        v4->dc_diff[2 * v78 / 4u] = v69;
                        if ( result < 0 )
                          return result;
                        v33 = v72;
                        v34 = 0;
                        v35 = (char *)a3->raw_coefs->raw_ptrs[2 * v78 / 4u]
                            + v84 * *(int *)((char *)&v4->comps->hsampling + v82)
                            + v86
                            * *(int *)((char *)&v4->comps->hsampling + v82)
                            * (v81 + *(int *)((char *)&v4->comps->vsampling + v82) * v71)
                            + v80;
                        do
                        {
                          (*(void (__cdecl **)(char *, int, signed int))&NULLSTR[5720])(v35, v33, 16);
                          v31 = *(int *)((char *)&v4->comps->hsampling + v82);
                          v35 += v31 * v87;
                          v33 += 16;
                          ++v34;
                        }
                        while ( v34 < 8 );
                        v76 = &v4->comps->comp;
                        v72 = v33;
                        v80 += 16;
                        ++v79;
                      }
                      while ( v79 < v31 );
                      v30 = v81;
                      v27 = v82;
                      v28 = *(int *)((char *)v76 + v82 + 8);
                    }
                    ++v30;
                  }
                  while ( v30 < v28 );
                  v22 = v77;
                  v24 = a3;
                  v23 = v4->ncomps;
                }
              }
              ++v22;
            }
            while ( v22 < v23 );
            v20 = v24;
            v21 = v83;
          }
          result = sub_78A770(a1, (int)v4, v70, v89, v21, v71);
          if ( result )
            return result;
          v39 = &v20->raw_coefs->data_type;
          if ( !v39 || *v39 )
            sub_789110(v20, a1, v4, v21, v71, v73, (int)v20->MCUBuf, v70, v89, a4, v74);
          if ( v20->interrupt && (!v88 || v21) )
          {
            if ( !v85 )
            {
              v43 = v71;
              v44 = v70;
              goto LABEL_75;
            }
            if ( v71 )
            {
              v43 = v71;
              v44 = v70;
LABEL_75:
              v45 = (v21 + 1) % (v88 + v44);
              v4->curxMCU = v45;
              if ( v45 )
              {
                v4->curyMCU = v43;
              }
              else
              {
                if ( v43 + 1 == v85 + v89 )
                {
                  v4->curyMCU = 0;
                  return 0;
                }
                v4->curyMCU = v43 + 1;
              }
              v46 = v21 - v88;
              result = 1;
              a3->roi.right = v46;
              v47 = v43 - v85;
              a3->roi.bottom = v47;
              a3->roi.left = v46;
              a3->roi.top = v47;
              return result;
            }
          }
        }
        while ( ++v21 < v70 );
      }
      if ( v88 )
      {
        v40 = &v20->raw_coefs->data_type;
        if ( !v40 || *v40 )
        {
          sub_789110(v20, a1, v4, v21, v71, v73, (int)v20->MCUBuf, v70, v89, a4, v74);
          if ( v20->interrupt )
            break;
        }
      }
      v41 = v71 + 1;
      v71 = v41;
      if ( v41 >= v89 )
      {
        v19 = v41;
        v12 = v70;
        goto LABEL_62;
      }
    }
    v48 = v71;
    v49 = (v21 + 1) % (v88 + v70);
    v4->curxMCU = v49;
    if ( v49 )
    {
      v4->curyMCU = v48;
    }
    else
    {
      if ( v48 + 1 == v85 + v89 )
      {
        v4->curyMCU = 0;
        return 0;
      }
      v4->curyMCU = v48 + 1;
    }
    v50 = v21 - v88;
    result = 1;
    a3->roi.right = v50;
    v51 = v48 - v85;
    a3->roi.bottom = v51;
    a3->roi.left = v50;
    a3->roi.top = v51;
  }
  return result;
}
// B60728: using guessed type int (__cdecl *)(_DWORD, _DWORD, _DWORD);
// 78CF00: using guessed type int var_AC[4];
// 78CF00: using guessed type int var_9C[4];
// 78CF00: using guessed type int var_8C[4];
// 78CF00: using guessed type int var_7C[4];

//----- (0078DA00) --------------------------------------------------------
int __cdecl sub_78DA00(struct _STATE *a1, struct _SCAN *a2, struct _JPEG_PROPERTIES *a3, int a4)
{
  struct _JPEG_PROPERTIES *v4; // ebx@1
  int v5; // ecx@1
  int v6; // edx@1
  int v7; // eax@2
  int v8; // esi@2
  int v9; // ebp@4
  _SCAN_COMPONENT *v10; // ebx@5
  int v11; // edi@5
  int v12; // ebp@7
  int v13; // edx@7
  int v14; // eax@7
  signed int v15; // ecx@8
  int v16; // ebp@8
  int v17; // edi@8
  int v18; // esi@8
  int v19; // edx@8
  int v20; // edi@10
  int v21; // esi@10
  int v22; // edx@11
  bool v23; // al@11
  _FRAME_COMPONENT *v24; // ebp@13
  int v25; // ecx@13
  int v26; // ecx@20
  int v27; // esi@20
  int v28; // ebp@20
  int v29; // edi@20
  _UPSAMPLING_TYPE v30; // ecx@20
  int v31; // eax@20
  int v32; // ebp@32
  unsigned int v33; // edx@36
  int v34; // eax@38
  int v35; // ecx@38
  int result; // eax@41
  struct _SCAN *v37; // ebp@43
  struct _STATE *v38; // edi@43
  int v39; // esi@43
  int v40; // ebx@45
  int v41; // edx@46
  int v42; // ebx@47
  char *v43; // edi@47
  int v44; // esi@48
  int v45; // edx@49
  int v46; // eax@50
  struct _SCAN *v47; // ebp@62
  int v48; // edi@63
  int v49; // esi@64
  struct _STATE *v50; // ebx@64
  int v51; // edx@65
  int v52; // ebx@66
  char *v53; // edi@66
  int v54; // esi@67
  int v55; // edx@68
  int v56; // eax@69
  int v57; // esi@81
  int v58; // eax@81
  int *v59; // edx@83
  _SCAN_COMPONENT *v60; // edi@85
  int v61; // ecx@85
  int v62; // edx@85
  int v63; // edi@86
  int v64; // ebx@86
  int v65; // eax@86
  int v66; // eax@89
  int v67; // edi@90
  signed int v68; // ebx@90
  char *v69; // esi@90
  int v70; // edi@96
  int v71; // ebp@97
  int v72; // ebx@98
  int *v73; // eax@104
  int v74; // ecx@111
  int v75; // esi@120
  int v76; // edi@123
  struct _STATE *v77; // ebx@124
  int v78; // esi@124
  int v79; // edx@125
  int v80; // ebx@126
  int v81; // edi@126
  int v82; // esi@127
  int v83; // edx@128
  int v84; // eax@129
  int v85; // ebp@142
  int v86; // esi@142
  int v87; // edi@153
  struct _STATE *v88; // ebx@154
  int v89; // esi@154
  int v90; // edx@155
  int v91; // ebx@156
  char *v92; // edi@156
  int v93; // esi@157
  int v94; // edx@158
  int v95; // eax@159
  int v96; // edi@171
  int v97; // ecx@176
  int v98; // eax@177
  int v99; // ebx@177
  struct _SCAN *v100; // edi@177
  struct _STATE *v101; // ebp@177
  int v102; // esi@178
  int v103; // edx@180
  int v104; // esi@181
  int v105; // ebx@181
  int v106; // ebp@182
  int v107; // edx@183
  int v108; // eax@184
  int v109; // esi@201
  int v110; // ebp@211
  int v111; // edi@211
  int v112; // ebp@211
  int v113[4]; // [sp+30h] [bp-DCh]@5
  int v114[4]; // [sp+40h] [bp-CCh]@5
  int v115[4]; // [sp+50h] [bp-BCh]@5
  int v116[4]; // [sp+60h] [bp-ACh]@5
  __int16 v117; // [sp+70h] [bp-9Ch]@50
  __int16 v118; // [sp+74h] [bp-98h]@184
  __int16 v119; // [sp+78h] [bp-94h]@69
  __int16 v120; // [sp+7Ch] [bp-90h]@98
  __int16 v121; // [sp+80h] [bp-8Ch]@89
  __int16 v122; // [sp+84h] [bp-88h]@129
  __int16 v123; // [sp+88h] [bp-84h]@159
  char *v124; // [sp+8Ch] [bp-80h]@11
  int v125; // [sp+90h] [bp-7Ch]@11
  int v126; // [sp+94h] [bp-78h]@43
  int v127; // [sp+98h] [bp-74h]@43
  int v128; // [sp+9Ch] [bp-70h]@43
  int v129; // [sp+A0h] [bp-6Ch]@8
  int v130; // [sp+A4h] [bp-68h]@62
  char *v131; // [sp+A8h] [bp-64h]@86
  int *v132; // [sp+ACh] [bp-60h]@92
  int v133; // [sp+B0h] [bp-5Ch]@36
  int v134; // [sp+B4h] [bp-58h]@21
  int v135; // [sp+B8h] [bp-54h]@7
  int *v136; // [sp+BCh] [bp-50h]@20
  int v137; // [sp+C0h] [bp-4Ch]@7
  bool v138; // [sp+C4h] [bp-48h]@10
  int v139; // [sp+C8h] [bp-44h]@86
  int v140; // [sp+CCh] [bp-40h]@88
  int v141; // [sp+D0h] [bp-3Ch]@88
  int v142; // [sp+D4h] [bp-38h]@85
  int v143; // [sp+D8h] [bp-34h]@88
  char *v144; // [sp+DCh] [bp-30h]@43
  int v145; // [sp+E0h] [bp-2Ch]@2
  int v146; // [sp+E4h] [bp-28h]@20
  int v147; // [sp+E8h] [bp-24h]@20
  int v148; // [sp+ECh] [bp-20h]@8
  int v149; // [sp+F0h] [bp-1Ch]@7
  int v150; // [sp+F4h] [bp-18h]@1
  int (__cdecl **v151)(struct _STATE *, int, int, __int16 *, int); // [sp+F8h] [bp-14h]@1

  v4 = a3;
  v151 = (int (__cdecl **)(struct _STATE *, int, int, __int16 *, int))a1->ctx;
  v5 = a2->ncomps;
  v150 = 0;
  v6 = 0;
  if ( v5 <= 0 )
  {
    v145 = a3->jinterleaveType;
  }
  else
  {
    v145 = a3->jinterleaveType;
    v7 = 0;
    v8 = v150;
    do
    {
      if ( a3->jscan )
      {
        v9 = v6;
      }
      else
      {
        v9 = v6;
        if ( v145 != 1 )
        {
          a2->dc_diff[v6] = 0;
          v5 = a2->ncomps;
          v145 = a3->jinterleaveType;
        }
      }
      v10 = a2->comps;
      v113[v9] = (int)&v10[v7].ac_table->huff_class;
      ++v6;
      v114[v9] = (int)&v10[v7].dc_table->huff_class;
      v115[v9] = (int)v10[v7].quant_table->elements;
      v11 = v10[v7].vsampling * v10[v7].hsampling;
      v8 += v11;
      ++v7;
      v116[v9] = v11;
    }
    while ( v6 < v5 );
    v150 = v8;
    v4 = a3;
  }
  v12 = v4->jframe.max_hsampling;
  v13 = v4->jframe.max_vsampling;
  v14 = v4->DIBLineBytes;
  v135 = v4->jframe.max_hsampling;
  v137 = v13;
  v149 = v14;
  if ( v5 == 1 )
  {
    v136 = &a2->comps->comp;
    v15 = 8 * v12 / v136[1];
    v16 = 8 * v137 / v136[2];
    v109 = v4->JPGWidth;
    v149 *= v16;
    v129 = (v109 + v15 - 1) / v15;
    v148 = (abs(v4->JPGHeight) + v16 - 1) / v16;
    v150 = 1;
    v116[0] = 1;
  }
  else
  {
    v15 = 8 * v12;
    v16 = 8 * v13;
    v17 = 8 * v13 * v149;
    v18 = v4->numxMCUs;
    v19 = v4->numyMCUs;
    v149 = v17;
    v129 = v18;
    v148 = v19;
  }
  if ( v135 != 1 || v137 != 1 )
  {
    v20 = 0;
    v21 = v4->jframe.ncomps;
    v138 = 1;
    if ( v21 > 0 )
    {
      v22 = 0;
      v23 = v138;
      v124 = (char *)v16;
      v125 = v15;
      while ( v23 )
      {
        v24 = v4->jframe.comps;
        v25 = v24[v22].hsampling;
        if ( v25 != v24[v22].vsampling )
          v23 = 0;
        if ( v25 != 1 && v25 != 2 )
          v23 = 0;
        ++v22;
        if ( ++v20 >= v21 )
        {
          v138 = v23;
          v16 = (int)v124;
          v15 = v125;
          goto LABEL_20;
        }
      }
      v138 = 0;
      v16 = (int)v124;
      v15 = v125;
    }
  }
  else
  {
    v138 = 0;
  }
LABEL_20:
  v147 = v15 / a4;
  v26 = v15 / a4;
  v146 = v4->roi.left / v26;
  v27 = (v26 + v4->roi.right - 1) / v26;
  v28 = v16 / a4;
  v29 = v4->roi.top / v28;
  v30 = v4->upsampling_type;
  v31 = (v28 + v4->roi.bottom - 1) / v28;
  v136 = (int *)((v28 + v4->roi.bottom - 1) / v28);
  v134 = v30 == 1 && v135 == 2;
  v137 = v30 == 1 && v137 == 2;
  if ( v146 )
    v146 -= v134;
  if ( v29 )
    v29 -= v137;
  if ( v27 < v129 )
    v27 += v134;
  if ( v31 < v148 )
    v136 = (int *)(v137 + v31);
  v32 = a2->curyMCU;
  if ( v32 <= v29 )
    v32 = v29;
  if ( v145 == 1 && a1->cur_scan_comp )
  {
    if ( !a2->curxMCU )
    {
      v97 = 0;
      if ( v32 > 0 )
      {
        v124 = v4->MCUBuf;
        v98 = v32;
        v99 = v129;
        v127 = v29;
        v100 = a2;
        v101 = a1;
        v128 = v27;
        do
        {
          v102 = 0;
          if ( v99 > 0 )
          {
            v125 = v97;
            v126 = v98;
            do
            {
              v103 = v100->ncomps;
              if ( v100->ncomps > 0 )
              {
                v130 = v102;
                v104 = (int)v124;
                v129 = v99;
                v105 = 0;
                do
                {
                  v106 = 0;
                  if ( v116[v105] > 0 )
                  {
                    v107 = v100->dc_diff[v105];
                    do
                    {
                      v118 = v107;
                      v108 = v151[62](a1, v114[v105], v113[v105], &v118, v104);
                      LOWORD(v107) = v118;
                      a2->dc_diff[v105] = v118;
                      if ( v108 < 0 )
                        return -21;
                      ++v106;
                    }
                    while ( v106 < v116[v105] );
                    v100 = a2;
                    v103 = a2->ncomps;
                  }
                  ++v105;
                }
                while ( v105 < v103 );
                v102 = v130;
                v99 = v129;
                v101 = a1;
              }
              if ( sub_78A770(v101, (int)v100, v99, v148, v102, v125) )
                return -25;
              ++v102;
            }
            while ( v102 < v99 );
            v97 = v125;
            v98 = v126;
          }
          ++v97;
        }
        while ( v97 < v98 );
        v129 = v99;
        v32 = v98;
        v29 = v127;
        v27 = v128;
        v4 = a3;
      }
    }
  }
  else if ( !a2->curxMCU )
  {
    v33 = v4->rowoffsets[v32].offset;
    v133 = (int)v4->rowoffsets;
    if ( v33 == -1 )
    {
      v135 = v32;
      v34 = 40 * v32;
      v35 = v32;
      do
      {
        v34 -= 40;
        --v35;
      }
      while ( *(_DWORD *)(v133 + v34) == -1 );
      v135 = v35;
      v4 = a3;
      result = sub_78A5A0(v135, a1, (int)a2, (int)a3);
      if ( result )
        return result;
      if ( v135 < v32 )
      {
        v144 = a3->MCUBuf;
        v126 = v32;
        v127 = v29;
        v37 = a2;
        v38 = a1;
        v128 = v27;
        v39 = v129;
        do
        {
          if ( v39 > 0 )
          {
            v40 = 0;
            do
            {
              v41 = v37->ncomps;
              if ( v37->ncomps > 0 )
              {
                v145 = v40;
                v42 = 0;
                v43 = v144;
                v129 = v39;
                do
                {
                  v44 = 0;
                  if ( v116[v42] > 0 )
                  {
                    v45 = v37->dc_diff[v42];
                    do
                    {
                      v117 = v45;
                      v46 = v151[62](a1, v114[v42], v113[v42], &v117, (int)v43);
                      LOWORD(v45) = v117;
                      a2->dc_diff[v42] = v117;
                      if ( v46 < 0 )
                        return -21;
                      ++v44;
                    }
                    while ( v44 < v116[v42] );
                    v37 = a2;
                    v41 = a2->ncomps;
                  }
                  ++v42;
                }
                while ( v42 < v41 );
                v40 = v145;
                v39 = v129;
                v38 = a1;
              }
              if ( sub_78A770(v38, (int)v37, v39, v148, v40, v135) )
                return -25;
              ++v40;
            }
            while ( v40 < v39 );
            v4 = a3;
          }
          sub_78A6B0(++v135, (int)v38, (int)v37, (int)v4);
        }
        while ( v135 < v126 );
        v129 = v39;
        v32 = v126;
        v29 = v127;
        v27 = v128;
      }
    }
    else
    {
      result = sub_78A5A0(v32, a1, (int)a2, (int)v4);
      if ( result )
        return result;
    }
  }
  if ( v32 >= (signed int)v136 )
    goto LABEL_140;
  v135 = v134 + v27;
  v130 = 16 * v129;
  v125 = v129 << 7;
  v124 = (char *)(v134 + v27 - 1);
  v126 = v32;
  v127 = v29;
  v47 = a2;
  v128 = v27;
  while ( 1 )
  {
    v48 = v47->curxMCU;
    if ( v48 < v146 )
    {
      v144 = v4->MCUBuf;
      v49 = v129;
      v50 = a1;
      do
      {
        v51 = v47->ncomps;
        if ( v47->ncomps > 0 )
        {
          v145 = v48;
          v52 = 0;
          v53 = v144;
          do
          {
            v54 = 0;
            if ( v116[v52] > 0 )
            {
              v55 = v47->dc_diff[v52];
              do
              {
                v119 = v55;
                v56 = v151[62](a1, v114[v52], v113[v52], &v119, (int)v53);
                LOWORD(v55) = v119;
                a2->dc_diff[v52] = v119;
                if ( v56 < 0 )
                  return -21;
                ++v54;
              }
              while ( v54 < v116[v52] );
              v47 = a2;
              v51 = a2->ncomps;
            }
            ++v52;
          }
          while ( v52 < v51 );
          v48 = v145;
          v49 = v129;
          v50 = a1;
        }
        if ( sub_78A770(v50, (int)v47, v49, v148, v48, v126) )
          return -25;
        ++v48;
      }
      while ( v48 < v146 );
      v4 = a3;
      v48 = v47->curxMCU;
    }
    if ( !v4->raw_coefs )
    {
      v96 = v48 - v146;
      if ( v96 <= 0 )
        v96 = 0;
      a1->DIB_ptr = &v4->DIBBytes[v149 / a4 * (v126 - v127)] + v147 * v4->DIBChannels * v96;
      v48 = v47->curxMCU;
    }
    if ( v48 <= v146 )
      v48 = v146;
    if ( v48 < v128 )
      break;
LABEL_119:
    if ( v134 )
    {
      sub_789110(v4, a1, v47, v48, v126, v150, (int)v4->MCUBuf, v148, v148, a4, v138);
      if ( v4->interrupt )
      {
        if ( v4->jinterleaveType != 1 )
        {
          v47->curxMCU = 0;
          v47->curyMCU = 0;
        }
      }
    }
    v75 = v126 + 1;
    if ( v148 > v126 + 1 )
    {
      if ( v4->jinterleaveType == 1 && a1->cur_scan_comp )
      {
        v87 = v128;
        if ( v128 < v129 )
        {
          v144 = v4->MCUBuf;
          v88 = a1;
          v132 = (int *)(v126 + 1);
          v89 = v129;
          while ( 1 )
          {
            v90 = v47->ncomps;
            if ( v47->ncomps > 0 )
              break;
LABEL_164:
            if ( sub_78A770(v88, (int)v47, v89, v148, v87, v126) )
              return -25;
            if ( ++v87 >= v89 )
            {
              v129 = v89;
              v75 = (int)v132;
              v4 = a3;
              goto LABEL_138;
            }
          }
          v145 = v87;
          v91 = 0;
          v92 = v144;
          v129 = v89;
          while ( 1 )
          {
            v93 = 0;
            if ( v116[v91] > 0 )
              break;
LABEL_162:
            if ( ++v91 >= v90 )
            {
              v87 = v145;
              v89 = v129;
              v88 = a1;
              goto LABEL_164;
            }
          }
          v94 = v47->dc_diff[v91];
          while ( 1 )
          {
            v123 = v94;
            v95 = v151[62](a1, v114[v91], v113[v91], &v123, (int)v92);
            LOWORD(v94) = v123;
            a2->dc_diff[v91] = v123;
            if ( v95 < 0 )
              return -21;
            if ( ++v93 >= v116[v91] )
            {
              v47 = a2;
              v90 = a2->ncomps;
              goto LABEL_162;
            }
          }
        }
      }
      else if ( v4->rowoffsets[v126 + 1].offset == -1 )
      {
        v76 = v128;
        if ( v128 < v129 )
        {
          v131 = v4->MCUBuf;
          v77 = a1;
          v132 = (int *)(v126 + 1);
          v78 = v129;
          while ( 1 )
          {
            v79 = v47->ncomps;
            if ( v47->ncomps > 0 )
              break;
LABEL_134:
            if ( sub_78A770(v77, (int)v47, v78, v148, v76, v126) )
              return -25;
            if ( ++v76 >= v78 )
            {
              v75 = (int)v132;
              v4 = a3;
              goto LABEL_137;
            }
          }
          v133 = v76;
          v80 = 0;
          v81 = (int)v131;
          while ( 1 )
          {
            v82 = 0;
            if ( v116[v80] > 0 )
              break;
LABEL_132:
            if ( ++v80 >= v79 )
            {
              v76 = v133;
              v78 = v129;
              v77 = a1;
              goto LABEL_134;
            }
          }
          v83 = v47->dc_diff[v80];
          while ( 1 )
          {
            v122 = v83;
            v84 = v151[62](a1, v114[v80], v113[v80], &v122, v81);
            LOWORD(v83) = v122;
            a2->dc_diff[v80] = v122;
            if ( v84 < 0 )
              return -21;
            if ( ++v82 >= v116[v80] )
            {
              v47 = a2;
              v79 = a2->ncomps;
              goto LABEL_132;
            }
          }
        }
LABEL_137:
        sub_78A6B0(v75, (int)a1, (int)v47, (int)v4);
      }
      else
      {
        result = sub_78A5A0(v126 + 1, a1, (int)v47, (int)v4);
        if ( result )
          return result;
      }
    }
LABEL_138:
    v126 = v75;
    if ( v75 >= (signed int)v136 )
    {
      v32 = v75;
      v27 = v128;
LABEL_140:
      if ( v137 )
      {
        v134 += v27;
        if ( v146 < v134 )
        {
          v126 = v32;
          v85 = v146;
          v86 = v129;
          do
            sub_789110(v4, a1, a2, v85++, v126, v150, (int)v4->MCUBuf, v86, v148, a4, v138);
          while ( v85 < v134 );
        }
      }
      ((void (*)(void))v151[6])();
      if ( v4->jframe.SeenAllACScans < v4->jframe.ncomps && v4->jinterleaveType == 1 )
        result = 0;
      else
        result = 2;
      return result;
    }
  }
  while ( 1 )
  {
    v57 = 0;
    v133 = (int)v4->MCUBuf;
    v58 = v47->ncomps;
    if ( v47->ncomps > 0 )
      break;
LABEL_103:
    if ( sub_78A770(a1, (int)v47, v129, v148, v48, v126) )
      return -25;
    v73 = &v4->raw_coefs->data_type;
    if ( !v73 || *v73 )
      sub_789110(v4, a1, v47, v48, v126, v150, (int)v4->MCUBuf, v129, v148, a4, v138);
    if ( v4->interrupt )
    {
      if ( v4->jinterleaveType == 1 )
      {
        v74 = v48 + 1;
      }
      else if ( v134 && v48 == v146 )
      {
        v74 = v48 + 1;
      }
      else if ( v137 && v126 == v127 )
      {
        v74 = v48 + 1;
      }
      else
      {
        v74 = v48 + 1;
        if ( (char *)v48 != v124 )
        {
          v110 = v126;
          result = 1;
          a2->curxMCU = (v48 + 1) % v135;
          a2->curyMCU = v110;
          v111 = v48 - v134;
          v4->roi.right = v111;
          v112 = v110 - v137;
          v4->roi.bottom = v112;
          v4->roi.left = v111;
          v4->roi.top = v112;
          return result;
        }
        v47->curxMCU = 0;
        v47->curyMCU = 0;
      }
    }
    else
    {
      v74 = v48 + 1;
    }
    v48 = v74;
    if ( v74 >= v128 )
      goto LABEL_119;
  }
  v145 = v48;
  v144 = (char *)(16 * v48);
  while ( 1 )
  {
    v59 = &v4->raw_coefs->data_type;
    if ( !v59 || *v59 )
      break;
    v142 = 0;
    v60 = v47->comps;
    v61 = 24 * v57;
    v62 = v60[v57].vsampling;
    if ( v62 > 0 )
    {
      v63 = *(int *)((char *)&v60->hsampling + v61);
      v64 = v142;
      v139 = 2 * v57;
      v65 = v63;
      v131 = (char *)v57;
      while ( v65 <= 0 )
      {
LABEL_94:
        if ( ++v64 >= v62 )
        {
          v57 = (int)v131;
          v4 = a3;
          v58 = v47->ncomps;
          goto LABEL_101;
        }
      }
      v142 = v64;
      v141 = 0;
      v140 = 0;
      v143 = v61;
      while ( 1 )
      {
        v121 = v47->dc_diff[2 * v139 / 4u];
        v66 = v151[61](a1, v114[(signed int)v131], v113[(signed int)v131], &v121, v133);
        v47->dc_diff[2 * v139 / 4u] = v121;
        if ( v66 < 0 )
          return -21;
        v67 = v133;
        v68 = 0;
        v69 = (char *)a3->raw_coefs->raw_ptrs[2 * v139 / 4u]
            + (_DWORD)v144 * *(int *)((char *)&v47->comps->hsampling + v143)
            + v125
            * *(int *)((char *)&v47->comps->hsampling + v143)
            * (v142 + *(int *)((char *)&v47->comps->vsampling + v143) * v126)
            + v141;
        do
        {
          (*(void (__cdecl **)(char *, int, signed int))&NULLSTR[5720])(v69, v67, 16);
          v65 = *(int *)((char *)&v47->comps->hsampling + v143);
          v69 += v65 * v130;
          v67 += 16;
          ++v68;
        }
        while ( v68 < 8 );
        v132 = &v47->comps->comp;
        v133 = v67;
        v141 += 16;
        if ( ++v140 >= v65 )
        {
          v64 = v142;
          v61 = v143;
          v62 = *(int *)((char *)v132 + v143 + 8);
          goto LABEL_94;
        }
      }
    }
LABEL_101:
    if ( ++v57 >= v58 )
    {
      v48 = v145;
      goto LABEL_103;
    }
  }
  v70 = 0;
  if ( v116[v57] <= 0 )
    goto LABEL_101;
  v143 = 2 * v57;
  v71 = v133;
  while ( 1 )
  {
    v120 = *(int *)((char *)a2->dc_diff + 2 * v143);
    v72 = v151[61](a1, v114[v57], v113[v57], &v120, v71);
    *(int *)((char *)a2->dc_diff + 2 * v143) = v120;
    ((void (__cdecl *)(int, int))v151[68])(v71, v115[v57]);
    if ( v72 < 0 )
      return -21;
    v71 += 128;
    if ( ++v70 >= v116[v57] )
    {
      v133 = v71;
      v4 = a3;
      v47 = a2;
      v58 = a2->ncomps;
      goto LABEL_101;
    }
  }
}
// B60728: using guessed type int (__cdecl *)(_DWORD, _DWORD, _DWORD);
// 78DA00: using guessed type int var_DC[4];
// 78DA00: using guessed type int var_CC[4];
// 78DA00: using guessed type int var_BC[4];
// 78DA00: using guessed type int var_AC[4];

//----- (0078EEA0) --------------------------------------------------------
signed int __cdecl Decode_Scan(enum IJL_MARKER *a1, struct _STATE *a2, struct _SCAN *a3, struct _JPEG_PROPERTIES *a4)
{
  _DCTTYPE v4; // eax@1
  int v5; // ecx@2
  int v6; // esi@2
  int v7; // edi@2
  int v8; // edx@2
  int v9; // ecx@4
  int v10; // esi@4
  int v11; // edi@4
  int v12; // edx@4
  int v13; // ecx@5
  int v14; // esi@5
  int v15; // edi@5
  int v16; // edx@5
  int v17; // edi@6
  int v18; // esi@6
  int v19; // ecx@8
  int v20; // edx@8
  int v21; // eax@8
  int v22; // eax@9
  _IJLIOTYPE v23; // eax@23
  int v24; // ebx@30
  _ENTROPYSTRUCT *v26; // eax@44
  _IJLIOTYPE v27; // edx@45
  _ENTROPYSTRUCT *v28; // eax@51
  signed int v29; // edx@51
  signed int v30; // eax@51
  _IJLIOTYPE v31; // eax@56
  _DWORD *v32; // [sp+14h] [bp-18h]@1
  int v33; // [sp+18h] [bp-14h]@8

  v32 = a2->ctx;
  *(_DWORD *)a1 = 0;
  v4 = a4->dcttype;
  if ( v4 )
  {
    if ( v4 == 1 )
    {
      v9 = v32[14];
      v32[18] = v32[13];
      v10 = v32[15];
      v11 = v32[16];
      v32[19] = v9;
      v12 = v32[67];
      v32[20] = v10;
      v32[21] = v11;
      v32[68] = v12;
    }
    else
    {
      v13 = v32[10];
      v32[18] = v32[9];
      v14 = v32[11];
      v15 = v32[12];
      v32[19] = v13;
      v16 = v32[66];
      v32[20] = v14;
      v32[21] = v15;
      v32[68] = v16;
    }
  }
  else
  {
    v5 = v32[10];
    v32[18] = v32[9];
    v6 = v32[11];
    v7 = v32[12];
    v32[19] = v5;
    v8 = v32[66];
    v32[20] = v6;
    v32[21] = v7;
    v32[68] = v8;
  }
  v17 = a4->roi.right;
  v18 = a4->JPGWidth;
  if ( v17 < v18 && v17 )
  {
    v19 = a4->JPGHeight;
    v20 = a4->roi.top;
    v33 = a4->roi.bottom;
    v21 = a4->roi.left;
  }
  else
  {
    v22 = a4->roi.bottom;
    v19 = a4->JPGHeight;
    v33 = a4->roi.bottom;
    if ( v22 < v19 && v22 )
    {
      v20 = a4->roi.top;
      v21 = a4->roi.left;
    }
    else
    {
      v20 = a4->roi.top;
      if ( v20 <= 0 )
      {
        v21 = a4->roi.left;
        if ( v21 <= 0 )
        {
          v31 = a4->iotype;
          if ( a4->iotype == 18 || v31 == 19 )
          {
            if ( a4->progressive_found )
              v24 = sub_78A7F0(a2, a3, a4, 8);
            else
              v24 = sub_78CF00(a2, a3, a4, 8);
          }
          else if ( v31 == 16 || v31 == 17 )
          {
            if ( a4->progressive_found )
              v24 = sub_78A7F0(a2, a3, a4, 4);
            else
              v24 = sub_78CF00(a2, a3, a4, 4);
          }
          else if ( v31 != 14 && v31 != 15 )
          {
            if ( a4->progressive_found )
              v24 = sub_78A7F0(a2, a3, a4, 1);
            else
              v24 = sub_78CF00(a2, a3, a4, 1);
          }
          else if ( a4->progressive_found )
          {
            v24 = sub_78A7F0(a2, a3, a4, 2);
          }
          else
          {
            v24 = sub_78CF00(a2, a3, a4, 2);
          }
          goto LABEL_35;
        }
      }
      else
      {
        v21 = a4->roi.left;
      }
    }
  }
  if ( v18 >= v17 )
    v18 = a4->roi.right;
  a4->roi.right = v18;
  if ( v19 >= v33 )
    v19 = v33;
  a4->roi.bottom = v19;
  if ( v21 < 0 )
    v21 = 0;
  a4->roi.left = v21;
  if ( v20 < 0 )
    v20 = 0;
  a4->roi.top = v20;
  if ( !a4->rowoffsets )
  {
    v26 = (_ENTROPYSTRUCT *)operator new(0x50000u);
    a4->rowoffsets = v26;
    if ( !v26 )
      return -5;
    v27 = a4->iotype;
    if ( a4->iotype == 2 || v27 == 6 || v27 == 14 || v27 == 16 || v27 == 18 )
      v26->offset = a2->entropy_bytes_processed;
    else
      v26->offset = (unsigned int)a2->cur_entropy_ptr;
    a4->rowoffsets->dcval1 = 0;
    a4->rowoffsets->dcval2 = 0;
    a4->rowoffsets->dcval3 = 0;
    a4->rowoffsets->dcval4 = 0;
    v28 = a4->rowoffsets;
    LODWORD(v28->bit_buffer_64) = 0;
    HIDWORD(v28->bit_buffer_64) = 0;
    a4->rowoffsets->bitbuf_bits_valid = 0;
    a4->rowoffsets->unread_marker = a2->unread_marker;
    v29 = 1;
    v30 = 1;
    do
    {
      v29 += 5;
      a4->rowoffsets[v30].offset = -1;
      a4->rowoffsets[v30 + 1].offset = -1;
      a4->rowoffsets[v30 + 2].offset = -1;
      a4->rowoffsets[v30 + 3].offset = -1;
      a4->rowoffsets[v30 + 4].offset = -1;
      v30 += 5;
    }
    while ( v29 < 8187 );
    a4->rowoffsets[v29].offset = -1;
  }
  v23 = a4->iotype;
  if ( a4->iotype == 18 || v23 == 19 )
  {
    if ( a4->progressive_found )
      v24 = sub_78BBA0(a2, a3, a4, 8);
    else
      v24 = sub_78DA00(a2, a3, a4, 8);
  }
  else if ( v23 == 16 || v23 == 17 )
  {
    if ( a4->progressive_found )
      v24 = sub_78BBA0(a2, a3, a4, 4);
    else
      v24 = sub_78DA00(a2, a3, a4, 4);
  }
  else if ( v23 != 14 && v23 != 15 )
  {
    if ( a4->progressive_found )
      v24 = sub_78BBA0(a2, a3, a4, 1);
    else
      v24 = sub_78DA00(a2, a3, a4, 1);
  }
  else if ( a4->progressive_found )
  {
    v24 = sub_78BBA0(a2, a3, a4, 2);
  }
  else
  {
    v24 = sub_78DA00(a2, a3, a4, 2);
  }
LABEL_35:
  if ( !v24 )
    DB_Align_Byte(a2);
  ((void (*)(void))v32[6])();
  return v24;
}

//----- (0078F3E0) --------------------------------------------------------
void __cdecl DB_Begin(struct _STATE *a1)
{
  char *v1; // edx@4
  int v2; // ecx@4

  if ( a1->file )
  {
    a1->cur_entropy_ptr = (char *)&a1[1];
    a1->end_entropy_ptr = (char *)&a1[1];
    a1->entropy_bytes_left = 0;
  }
  else
  {
    v1 = a1->start_entropy_ptr;
    v2 = a1->entropy_buf_maxsize;
    a1->cur_entropy_ptr = v1;
    a1->end_entropy_ptr = &v1[v2];
    a1->entropy_bytes_left = v2;
  }
  a1->bitbuf_bits_valid = 0;
  a1->unread_marker = 0;
  a1->bit_buffer_64 = 0i64;
  a1->cur_scan_comp = 0;
}

//----- (0078F430) --------------------------------------------------------
signed int __cdecl Buffer_Read_Bytes(struct _STATE *a1)
{
  int v1; // ebp@1
  int v2; // eax@2
  unsigned int NumberOfBytesRead; // [sp+10h] [bp-14h]@1

  v1 = 0;
  if ( !ownReadFile(a1->file, a1->JPGBuffer, 0x1000u, &NumberOfBytesRead) )
  {
    v2 = NumberOfBytesRead;
    goto LABEL_5;
  }
  v2 = NumberOfBytesRead;
  if ( NumberOfBytesRead )
  {
LABEL_5:
    a1->entropy_bytes_left = v2;
    a1->cur_entropy_ptr = a1->JPGBuffer;
    a1->end_entropy_ptr = &a1->JPGBuffer[v2];
    return v1;
  }
  return -23;
}

//----- (0078F490) --------------------------------------------------------
signed int __cdecl DB_Get_Data(struct _STATE *a1, unsigned __int32 a2, unsigned __int8 **a3)
{
  unsigned int v3; // ecx@2
  unsigned __int8 *v4; // edx@3
  signed int result; // eax@4

  *a3 = 0;
  if ( a1->file )
  {
    v3 = a1->entropy_bytes_left;
    if ( a2 > v3 )
    {
      result = Buffer_Read_Bytes(a1);
      if ( result )
        return result;
      v3 = a1->entropy_bytes_left;
      if ( a2 > v3 )
        return -24;
    }
  }
  else
  {
    v3 = a1->entropy_bytes_left;
  }
  v4 = (unsigned __int8 *)a1->cur_entropy_ptr;
  if ( a2 <= v3 )
  {
    a1->cur_entropy_ptr = (char *)&v4[a2];
    result = 0;
    a1->entropy_bytes_processed += a2;
    a1->entropy_bytes_left = v3 - a2;
    *a3 = v4;
  }
  else
  {
    result = -5;
  }
  return result;
}

//----- (0078F510) --------------------------------------------------------
void __cdecl DB_Align_Byte(struct _STATE *a1)
{
  a1->bitbuf_bits_valid = 0;
}

//----- (0078F520) --------------------------------------------------------
signed int __cdecl DB_Skip_To_Next_Marker(struct _STATE *a1)
{
  signed int result; // eax@1
  char *i; // edx@1
  char v3; // bl@5
  int v4; // edx@5
  char *v5; // esi@6
  int v6; // ecx@6
  char *v7; // edi@7

  result = 0;
  for ( i = a1->cur_entropy_ptr; ; i = a1->cur_entropy_ptr )
  {
    while ( 1 )
    {
      if ( i >= a1->end_entropy_ptr )
      {
        if ( !a1->file )
          return -5;
        result = Buffer_Read_Bytes(a1);
        if ( result )
          return result;
      }
      v3 = 0;
      v4 = a1->entropy_bytes_left;
      if ( v4 > 0 )
      {
        v5 = a1->cur_entropy_ptr;
        v6 = a1->entropy_bytes_processed;
        do
        {
          --v4;
          ++v6;
          v7 = v5;
          a1->entropy_bytes_left = v4;
          ++v5;
          a1->entropy_bytes_processed = v6;
          a1->cur_entropy_ptr = v5;
          if ( (unsigned __int8)*v7 == 255 )
            v3 = 1;
        }
        while ( v4 > 0 && !v3 );
      }
      if ( v4 <= 0 )
        break;
LABEL_12:
      i = a1->cur_entropy_ptr;
      if ( (unsigned __int8)*i != 255 )
      {
        if ( *i )
          return result;
        ++a1->entropy_bytes_processed;
        a1->cur_entropy_ptr = ++i;
        --a1->entropy_bytes_left;
      }
    }
    if ( !a1->file )
      break;
    result = Buffer_Read_Bytes(a1);
    if ( result )
      return result;
    if ( v3 )
      goto LABEL_12;
  }
  return -5;
}

//----- (0078F5F0) --------------------------------------------------------
signed int __cdecl Set_Decode_Fast_Path(struct _JPEG_PROPERTIES *a1)
{
  _IJL_COLOR v1; // ecx@1
  _IJL_COLOR v2; // eax@5
  int v3; // ebp@8
  int v4; // ebx@8
  int v5; // ecx@8
  _FRAME_COMPONENT *v6; // edi@9
  int v7; // edx@9
  int v8; // ecx@9
  int v9; // ebx@10
  int v10; // ebx@12
  int v11; // edi@19
  int v12; // ebx@20
  int v13; // ebp@20
  int v14; // ebx@21
  signed int v15; // eax@21
  int v16; // eax@21
  signed int result; // eax@60
  _FRAME_COMPONENT *v18; // edx@64
  int v19; // eax@64
  _UPSAMPLING_TYPE v20; // eax@74
  _UPSAMPLING_TYPE v21; // eax@85
  _FRAME_COMPONENT *v22; // edx@91
  int v23; // eax@91
  _UPSAMPLING_TYPE v24; // eax@99
  _UPSAMPLING_TYPE v25; // eax@108
  _IJL_COLOR v26; // eax@113
  _FRAME_COMPONENT *v27; // edx@115
  int v28; // eax@115
  _UPSAMPLING_TYPE v29; // eax@123
  _UPSAMPLING_TYPE v30; // eax@132
  _FRAME_COMPONENT *v31; // edx@136
  int v32; // eax@136
  _UPSAMPLING_TYPE v33; // eax@144
  _UPSAMPLING_TYPE v34; // eax@153
  _FRAME_COMPONENT *v35; // edx@171
  int v36; // eax@171
  _UPSAMPLING_TYPE v37; // eax@181
  _UPSAMPLING_TYPE v38; // eax@192
  _IJL_COLOR v39; // eax@212
  _FRAME_COMPONENT *v40; // edx@229
  _FRAME_COMPONENT *v41; // eax@246
  int v42; // [sp+4h] [bp-28h]@9
  int v43; // [sp+8h] [bp-24h]@9
  _DWORD *v44; // [sp+Ch] [bp-20h]@1
  char v45; // [sp+10h] [bp-1Ch]@8
  char v46; // [sp+14h] [bp-18h]@1
  _IJL_COLOR v47; // [sp+18h] [bp-14h]@1

  v1 = a1->JPGColor;
  v44 = a1->state.ctx;
  v46 = 1;
  v47 = a1->JPGColor;
  if ( v1 == 4 || v1 == 1 || v1 == 5 || v1 == 255 || (v2 = a1->DIBColor, v2 == 4) || v2 == 3 )
  {
    v46 = 0;
    a1->cconversion_reqd = 0;
  }
  else
  {
    a1->cconversion_reqd = 1;
  }
  v3 = 0;
  v45 = 0;
  v4 = 0;
  v5 = a1->jframe.ncomps;
  a1->upsampling_reqd = 0;
  a1->jframe.max_hsampling = 0;
  a1->jframe.max_vsampling = 0;
  if ( v5 > 0 )
  {
    v6 = a1->jframe.comps;
    v7 = 0;
    v42 = 0;
    v43 = v5;
    v8 = 0;
    do
    {
      v9 = v6[v7].hsampling;
      if ( v42 < v9 )
      {
        v42 = v6[v7].hsampling;
        a1->jframe.max_hsampling = v9;
      }
      v10 = v6[v7].vsampling;
      if ( v3 < v10 )
      {
        v3 = v6[v7].vsampling;
        a1->jframe.max_vsampling = v10;
      }
      if ( v6[v7].hsampling != 1 || v6[v7].vsampling != 1 )
      {
        if ( a1->DIBColor == 3 )
        {
          v45 = 0;
          a1->upsampling_reqd = 0;
        }
        else
        {
          v45 = 1;
          a1->upsampling_reqd = 1;
        }
      }
      ++v7;
      ++v8;
    }
    while ( v8 < v43 );
    v4 = v42;
    v5 = v43;
  }
  v11 = a1->jinterleaveType;
  if ( v11 == 1 )
  {
    a1->jframe.MCUheight = 8;
    v12 = 8 * v4;
    a1->jframe.MCUwidth = 8;
    v13 = 8 * v3;
  }
  else
  {
    v12 = 8 * v4;
    a1->jframe.MCUwidth = v12;
    v13 = 8 * v3;
    a1->jframe.MCUheight = v13;
  }
  v14 = (a1->JPGWidth + v12 - 1) / v12;
  v15 = a1->JPGHeight + v13 - 1;
  a1->numxMCUs = v14;
  v16 = v15 / v13;
  a1->numyMCUs = v16;
  a1->jframe.horMCU = v14;
  a1->jframe.totalMCU = v14 * v16;
  a1->fast_processing = 0;
  if ( v5 == 3
    && v47 == 3
    && a1->DIBColor == 3
    && ((v41 = a1->jframe.comps, v41->hsampling != 2)
     || v41->vsampling != 1
     || v41[1].hsampling != 1
     || v41[1].vsampling != 1
     || v41[2].hsampling != 1
     || v41[2].vsampling != 1) )
  {
    result = -8;
  }
  else if ( v5 <= 0 || v5 > 255 )
  {
    result = -14;
  }
  else
  {
    if ( v11 && !a1->progressive_found )
    {
      if ( a1->DIBColor == 3 )
        v44[40] = YCbCr_422_to_YCbYCr_NI_MCU;
      else
        v44[40] = US_General_MCU;
    }
    else if ( v45 && v46 )
    {
      if ( v5 != 3 || a1->DIBChannels != 3 )
      {
        if ( v5 != 3 || a1->DIBChannels != 4 )
        {
          if ( v5 == 4 && a1->DIBChannels == 4 && a1->DIBColor == 5 )
          {
            v18 = a1->jframe.comps;
            v19 = v18->hsampling;
            if ( v19 != 2
              || v18->vsampling != 1
              || v18[1].hsampling != 1
              || v18[1].vsampling != 1
              || v18[2].hsampling != 1
              || v18[2].vsampling != 1
              || v18[3].hsampling != 2
              || v18[3].vsampling != 1 )
            {
              if ( v19 != 2
                || v18->vsampling != 2
                || v18[1].hsampling != 1
                || v18[1].vsampling != 1
                || v18[2].hsampling != 1
                || v18[2].vsampling != 1
                || v18[3].hsampling != 2
                || v18[3].vsampling != 2 )
              {
                v44[40] = US_CC_General_YCbCr_MCU;
              }
              else
              {
                v20 = a1->upsampling_type;
                if ( v20 )
                {
                  if ( v20 == 1 )
                    v44[40] = US_CC_General_YCbCr_MCU;
                }
                else
                {
                  a1->fast_processing = 11;
                  v44[40] = YCbCrA_FPX_4114_to_RGBA_FPX_MCU;
                }
              }
            }
            else
            {
              v21 = a1->upsampling_type;
              if ( v21 )
              {
                if ( v21 == 1 )
                  v44[40] = US_CC_General_YCbCr_MCU;
              }
              else
              {
                a1->fast_processing = 12;
                v44[40] = YCbCrA_FPX_4224_to_RGBA_FPX_MCU;
              }
            }
          }
        }
        else if ( a1->DIBColor == 5 )
        {
          v22 = a1->jframe.comps;
          v23 = v22->hsampling;
          if ( v23 != 2
            || v22->vsampling != 2
            || v22[1].hsampling != 1
            || v22[1].vsampling != 1
            || v22[2].hsampling != 1
            || v22[2].vsampling != 1 )
          {
            if ( v23 != 2
              || v22->vsampling != 1
              || v22[1].hsampling != 1
              || v22[1].vsampling != 1
              || v22[2].hsampling != 1
              || v22[2].vsampling != 1 )
            {
              v44[40] = US_CC_General_YCbCr_MCU;
            }
            else
            {
              v24 = a1->upsampling_type;
              if ( v24 )
              {
                if ( v24 == 1 )
                  v44[40] = US_CC_General_YCbCr_MCU;
              }
              else
              {
                a1->fast_processing = 9;
                v44[40] = YCbCr_422_to_RGBA_FPX_MCU;
              }
            }
          }
          else
          {
            v25 = a1->upsampling_type;
            if ( v25 )
            {
              if ( v25 == 1 )
                v44[40] = US_CC_General_YCbCr_MCU;
            }
            else
            {
              a1->fast_processing = 8;
              v44[40] = YCbCr_411_to_RGBA_FPX_MCU;
            }
          }
        }
      }
      else
      {
        v26 = a1->DIBColor;
        if ( v26 == 1 )
        {
          v31 = a1->jframe.comps;
          v32 = v31->hsampling;
          if ( v32 != 2
            || v31->vsampling != 2
            || v31[1].hsampling != 1
            || v31[1].vsampling != 1
            || v31[2].hsampling != 1
            || v31[2].vsampling != 1 )
          {
            if ( v32 != 2
              || v31->vsampling != 1
              || v31[1].hsampling != 1
              || v31[1].vsampling != 1
              || v31[2].hsampling != 1
              || v31[2].vsampling != 1 )
            {
              v44[40] = US_CC_General_YCbCr_MCU;
            }
            else
            {
              v33 = a1->upsampling_type;
              if ( v33 )
              {
                if ( v33 == 1 )
                  v44[40] = US_CC_General_YCbCr_MCU;
              }
              else
              {
                a1->fast_processing = 5;
                v44[40] = YCbCr_422_to_RGB_MCU;
              }
            }
          }
          else
          {
            v34 = a1->upsampling_type;
            if ( v34 )
            {
              if ( v34 == 1 )
                v44[40] = US_CC_General_YCbCr_MCU;
            }
            else
            {
              a1->fast_processing = 3;
              v44[40] = YCbCr_411_to_RGB_MCU;
            }
          }
        }
        else if ( v26 == 2 )
        {
          v27 = a1->jframe.comps;
          v28 = v27->hsampling;
          if ( v28 != 2
            || v27->vsampling != 2
            || v27[1].hsampling != 1
            || v27[1].vsampling != 1
            || v27[2].hsampling != 1
            || v27[2].vsampling != 1 )
          {
            if ( v28 != 2
              || v27->vsampling != 1
              || v27[1].hsampling != 1
              || v27[1].vsampling != 1
              || v27[2].hsampling != 1
              || v27[2].vsampling != 1 )
            {
              v44[40] = US_CC_General_YCbCr_MCU;
            }
            else
            {
              v29 = a1->upsampling_type;
              if ( v29 )
              {
                if ( v29 == 1 )
                  v44[40] = US_CC_General_YCbCr_MCU;
              }
              else
              {
                a1->fast_processing = 6;
                v44[40] = YCbCr_422_to_BGR_MCU;
              }
            }
          }
          else
          {
            v30 = a1->upsampling_type;
            if ( v30 )
            {
              if ( v30 == 1 )
                v44[40] = US_CC_General_YCbCr_MCU;
            }
            else
            {
              a1->fast_processing = 4;
              v44[40] = YCbCr_411_to_BGR_MCU;
            }
          }
        }
      }
    }
    else if ( !v45 || v46 )
    {
      if ( v45 || !v46 )
      {
        if ( !v45 && !v46 )
        {
          if ( v5 == 1 && a1->DIBChannels == 1 )
          {
            v44[40] = Y_111_to_Y_MCU;
            v5 = a1->jframe.ncomps;
          }
          if ( v5 != 1 || a1->DIBChannels == 1 )
          {
            if ( v5 == 2 )
            {
              v44[40] = Output_Interleave_General_MCU;
            }
            else if ( v5 != 3 || a1->DIBChannels != 1 )
            {
              if ( v5 != 3 || a1->DIBChannels != 2 )
              {
                if ( v5 != 3 || a1->DIBChannels != 3 )
                {
                  if ( v5 != 3 || a1->DIBChannels != 4 )
                  {
                    if ( v5 != 4 || a1->DIBChannels != 3 )
                    {
                      if ( v5 == 4 && a1->DIBChannels == 4 )
                      {
                        a1->fast_processing = 14;
                        v44[40] = OTHER_1111_to_OTHER_MCU;
                      }
                    }
                    else
                    {
                      a1->fast_processing = 0;
                      v44[40] = Output_Interleave_General_MCU;
                    }
                  }
                  else if ( a1->DIBColor == 5 )
                  {
                    a1->fast_processing = 13;
                    v44[40] = OTHER_111_to_OTHER4_MCU;
                  }
                  else
                  {
                    v44[40] = Output_Interleave_General_MCU;
                  }
                }
                else if ( a1->DIBColor == 2 )
                {
                  a1->fast_processing = 0;
                  v44[40] = Output_Interleave_General_MCU;
                }
                else
                {
                  a1->fast_processing = 15;
                  v44[40] = OTHER_111_to_OTHER_MCU;
                }
              }
              else
              {
                v40 = a1->jframe.comps;
                if ( v40->hsampling == 2
                  && v40->vsampling == 1
                  && v40[1].hsampling == 1
                  && v40[1].vsampling == 1
                  && v40[2].hsampling == 1
                  && v40[2].vsampling == 1 )
                {
                  a1->fast_processing = 19;
                  v44[40] = YCbCr_422_to_YCbYCr_MCU;
                }
              }
            }
            else
            {
              v44[40] = Output_Interleave_General_MCU;
            }
          }
          else
          {
            v44[40] = Output_Interleave_General_MCU;
          }
        }
      }
      else if ( v5 != 3 || a1->DIBChannels != 3 )
      {
        if ( v5 != 3 || a1->DIBChannels != 4 )
        {
          if ( v5 == 4 && a1->DIBChannels == 4 && a1->DIBColor == 5 )
          {
            a1->fast_processing = 10;
            v44[40] = YCbCrA_FPX_1111_to_RGBA_FPX_MCU;
          }
        }
        else if ( a1->DIBColor == 5 )
        {
          a1->fast_processing = 7;
          v44[40] = YCbCr_111_to_RGBA_FPX_MCU;
        }
      }
      else
      {
        v39 = a1->DIBColor;
        if ( v39 == 1 )
        {
          a1->fast_processing = 1;
          v44[40] = YCbCr_111_to_RGB_MCU;
        }
        else if ( v39 == 2 )
        {
          a1->fast_processing = 2;
          v44[40] = YCbCr_111_to_BGR_MCU;
        }
      }
    }
    else if ( v5 != 3 || a1->DIBChannels != 1 )
    {
      if ( v5 != 3 || a1->DIBChannels != 3 )
      {
        if ( v5 != 3 || a1->DIBChannels != 4 )
        {
          if ( v5 != 4 || a1->DIBChannels != 3 )
          {
            if ( v5 == 4 && a1->DIBChannels == 4 )
            {
              if ( a1->progressive_found )
                v44[40] = US_General_P_MCU;
              else
                v44[40] = US_General_MCU;
            }
          }
          else if ( a1->progressive_found )
          {
            v44[40] = US_General_P_MCU;
          }
          else
          {
            v44[40] = US_General_MCU;
          }
        }
        else if ( a1->progressive_found )
        {
          v44[40] = US_General_P_MCU;
        }
        else
        {
          v44[40] = US_General_MCU;
        }
      }
      else if ( a1->DIBColor == 2 )
      {
        if ( a1->progressive_found )
          v44[40] = US_General_P_MCU;
        else
          v44[40] = US_General_MCU;
      }
      else
      {
        v35 = a1->jframe.comps;
        v36 = v35->hsampling;
        if ( v36 != 2
          || v35->vsampling != 2
          || v35[1].hsampling != 1
          || v35[1].vsampling != 1
          || v35[2].hsampling != 1
          || v35[2].vsampling != 1 )
        {
          if ( v36 != 2
            || v35->vsampling != 1
            || v35[1].hsampling != 1
            || v35[1].vsampling != 1
            || v35[2].hsampling != 1
            || v35[2].vsampling != 1 )
          {
            if ( a1->progressive_found )
              v44[40] = US_General_P_MCU;
            else
              v44[40] = US_General_MCU;
          }
          else
          {
            a1->fast_processing = 17;
            v37 = a1->upsampling_type;
            if ( v37 )
            {
              if ( v37 == 1 )
              {
                if ( a1->progressive_found )
                  v44[40] = US_General_P_MCU;
                else
                  v44[40] = US_General_MCU;
              }
            }
            else
            {
              v44[40] = OTHER_422_to_OTHER_MCU;
            }
          }
        }
        else
        {
          a1->fast_processing = 16;
          v38 = a1->upsampling_type;
          if ( v38 )
          {
            if ( v38 == 1 )
            {
              if ( a1->progressive_found )
                v44[40] = US_General_P_MCU;
              else
                v44[40] = US_General_MCU;
            }
          }
          else
          {
            v44[40] = OTHER_411_to_OTHER_MCU;
          }
        }
      }
    }
    else if ( a1->progressive_found )
    {
      v44[40] = US_General_P_MCU;
    }
    else
    {
      v44[40] = US_General_MCU;
    }
    result = 0;
  }
  return result;
}

//----- (00790380) --------------------------------------------------------
_BYTE *__cdecl sub_790380(char a1, _DWORD *a2)
{
  _BYTE *v2; // eax@1
  _BYTE *result; // eax@1

  v2 = (_BYTE *)(*a2)++;
  *v2 = -1;
  result = (_BYTE *)(*a2)++;
  *result = a1;
  return result;
}

//----- (007903A0) --------------------------------------------------------
_DWORD *__cdecl sub_7903A0(__int16 a1, _DWORD *a2)
{
  _DWORD *result; // eax@1
  _BYTE *v3; // edi@1
  _BYTE *v4; // esi@1

  result = a2;
  v3 = (_BYTE *)(*a2)++;
  *v3 = HIBYTE(a1);
  v4 = (_BYTE *)(*a2)++;
  *v4 = a1;
  return result;
}

//----- (007903D0) --------------------------------------------------------
int __cdecl EP_Write_APP0(struct _JPEG_PROPERTIES *a1)
{
  int (__cdecl **v1)(char *, signed int, _STATE *); // esi@1
  char *v2; // ecx@1
  char *v3; // edx@1
  char *v4; // ecx@1
  char *v5; // ecx@1
  char *v6; // edx@1
  char v7; // al@1
  char *v8; // ecx@1
  char *v9; // ecx@1
  char *v10; // ecx@1
  char *v12; // [sp+10h] [bp-24h]@1
  char v13; // [sp+14h] [bp-20h]@1

  v1 = (int (__cdecl **)(char *, signed int, _STATE *))a1->state.ctx;
  v12 = &v13;
  sub_790380(-32, &v12);
  sub_7903A0(16, &v12);
  v2 = v12++;
  *v2 = 74;
  v3 = v12++;
  *v3 = 70;
  v4 = v12++;
  *v4 = 73;
  v5 = v12++;
  *v5 = 70;
  v6 = v12++;
  *v6 = 0;
  sub_7903A0(a1->jfif_app0_version, &v12);
  v7 = a1->jfif_app0_units;
  v8 = v12++;
  *v8 = v7;
  sub_7903A0(a1->jfif_app0_Xdensity, &v12);
  sub_7903A0(a1->jfif_app0_Ydensity, &v12);
  v9 = v12++;
  *v9 = 0;
  v10 = v12++;
  *v10 = 0;
  return v1[23](&v13, 18, &a1->state);
}

//----- (007904F0) --------------------------------------------------------
signed int __cdecl EP_Write_COM(struct _JPEG_PROPERTIES *a1)
{
  signed int v1; // edx@2
  void *v2; // eax@5
  signed int v3; // eax@7
  int (__cdecl **v5)(void *, _DWORD, _STATE *, int *); // [sp+0h] [bp-A0h]@1
  void *p; // [sp+4h] [bp-9Ch]@1
  int v7; // [sp+8h] [bp-98h]@1
  int v8; // [sp+Ch] [bp-94h]@5
  _BYTE *v9; // [sp+10h] [bp-90h]@7
  int i; // [sp+14h] [bp-8Ch]@7
  LPCSTR lpString; // [sp+18h] [bp-88h]@14
  int v12; // [sp+1Ch] [bp-84h]@14
  _DWORD *v13; // [sp+6Ch] [bp-34h]@14
  int v14; // [sp+70h] [bp-30h]@14
  int v15; // [sp+74h] [bp-2Ch]@14
  CPPEH_RECORD ms_exc; // [sp+88h] [bp-18h]@1

  ms_exc.old_esp = (DWORD)&v5;
  v5 = (int (__cdecl **)(void *, _DWORD, _STATE *, int *))a1->state.ctx;
  ms_exc.registration.TryLevel = 0;
  p = 0;
  v7 = 0;
  if ( a1->jpeg_comment )
  {
    v1 = a1->jpeg_comment_size;
    if ( !a1->jpeg_comment_size )
    {
LABEL_10:
      ms_exc.registration.TryLevel = -1;
      return v7;
    }
    if ( v1 > 65531 )
    {
      a1->jpeg_comment_size = -5;
      v1 = 65531;
    }
    v8 = v1 + 4;
    v2 = operator new(v1 + 4);
    p = v2;
    if ( !v2 )
      return -5;
    v9 = v2;
    (*(void (__cdecl **)(void *, int))&NULLSTR[5716])(v2, v8);
    sub_790380(-2, &v9);
    sub_7903A0(v8 - 2, &v9);
    v3 = 0;
    for ( i = 0; v3 < a1->jpeg_comment_size; i = v3 )
    {
      v9[v3] = a1->jpeg_comment[v3];
      ++v3;
    }
    v7 = v5[23](p, v8, &a1->state, (int *)&v5);
    if ( !v7 )
    {
      operator delete(p);
      goto LABEL_10;
    }
  }
  else
  {
    lpString = aIntelRJpegLibr;
    p = &v12;
    (*(void (__cdecl **)(int *, signed int))&NULLSTR[5716])(&v12, 80);
    v13 = ownGetLibVersion();
    v14 = lstrlenA(lpString);
    v15 = (*(int (__cdecl **)(char *, LPCSTR, _DWORD, int (__cdecl ***)(void *, _DWORD, _STATE *, int *)))&NULLSTR[5736])(
            (char *)p + 4,
            lpString,
            v13[5],
            &v5);
    v8 = v15 + 5;
    sub_790380(-2, &p);
    sub_7903A0(v8 - 2, &p);
    if ( v15 <= v14 )
      goto LABEL_10;
    v7 = v5[23](&v12, v8, &a1->state, (int *)&v5);
    if ( !v7 )
      goto LABEL_10;
  }
  return v7;
}
// B60724: using guessed type int (__cdecl *)(_DWORD, _DWORD);
// B60738: using guessed type int (__cdecl *)(_DWORD, _DWORD, _DWORD, _DWORD);

//----- (00790790) --------------------------------------------------------
int __cdecl EP_Write_SOI(struct _STATE *a1)
{
  int (__cdecl **v1)(char *, signed int, struct _STATE *); // ebp@1
  char *v3; // [sp+10h] [bp-14h]@1
  char v4; // [sp+14h] [bp-10h]@1

  v1 = (int (__cdecl **)(char *, signed int, struct _STATE *))a1->ctx;
  v3 = &v4;
  sub_790380(-40, &v3);
  return v1[23](&v4, 2, a1);
}

//----- (007907E0) --------------------------------------------------------
int __cdecl EP_Write_EOI(struct _STATE *a1)
{
  int (__cdecl **v1)(char *, signed int, struct _STATE *); // ebp@1
  char *v3; // [sp+10h] [bp-14h]@1
  char v4; // [sp+14h] [bp-10h]@1

  v1 = (int (__cdecl **)(char *, signed int, struct _STATE *))a1->ctx;
  v3 = &v4;
  sub_790380(-39, &v3);
  return v1[23](&v4, 2, a1);
}

//----- (00790830) --------------------------------------------------------
int __cdecl EP_Write_SOF(struct _STATE *a1, struct _FRAME *a2)
{
  int (__cdecl **v2)(char *, int, struct _STATE *); // esi@1
  int v3; // ebp@1
  char *v4; // ecx@1
  char v5; // al@1
  char *v6; // ecx@1
  char *v7; // eax@2
  int v8; // eax@2
  char *v9; // edx@2
  char *v10; // edi@2
  int v11; // eax@2
  signed int v12; // edi@3
  char *v13; // edx@4
  int v14; // edx@4
  char *v15; // esi@4
  char v16; // cl@4
  char *v17; // esi@4
  char *v19; // eax@7
  char *v20; // edi@7
  char v21; // bl@7
  char *v22; // eax@7
  char v23; // [sp+10h] [bp-324h]@1
  char *v24; // [sp+31Ch] [bp-18h]@1
  int (__cdecl **v25)(char *, int, struct _STATE *); // [sp+320h] [bp-14h]@3

  v2 = (int (__cdecl **)(char *, int, struct _STATE *))a1->ctx;
  v24 = &v23;
  v3 = 3 * a2->ncomps + 8;
  sub_790380(-64, &v24);
  sub_7903A0(v3, &v24);
  v4 = v24++;
  *v4 = 8;
  sub_7903A0(a2->height, &v24);
  sub_7903A0(a2->width, &v24);
  v5 = a2->ncomps;
  v6 = v24++;
  *v6 = v5;
  if ( a2->ncomps == 1 )
  {
    v19 = v24++;
    *v19 = 0;
    v20 = v24++;
    *v20 = 17;
    v21 = a2->comps->quant_sel;
    v22 = v24++;
    *v22 = v21;
  }
  else
  {
    v7 = v24++;
    *v7 = 1;
    v8 = a2->comps->vsampling + 16 * a2->comps->hsampling;
    v9 = v24++;
    *v9 = v8;
    LOBYTE(v9) = a2->comps->quant_sel;
    v10 = v24++;
    *v10 = (char)v9;
    v11 = 2;
    if ( a2->ncomps >= 2 )
    {
      v12 = 2;
      v25 = v2;
      do
      {
        v13 = v24++;
        *v13 = v11;
        v14 = *((_DWORD *)&a2->comps[v12] - 2) + 16 * *((_DWORD *)&a2->comps[v12] - 3);
        v15 = v24++;
        ++v11;
        *v15 = v14;
        v16 = *((_BYTE *)&a2->comps[v12] - 4);
        v17 = v24;
        ++v12;
        ++v24;
        *v17 = v16;
      }
      while ( v11 <= a2->ncomps );
      v2 = v25;
    }
  }
  return v2[23](&v23, v3 + 2, a1);
}

//----- (00790A20) --------------------------------------------------------
int __cdecl EP_Write_SOF2(struct _STATE *a1, struct _FRAME *a2)
{
  int (__cdecl **v2)(char *, int, struct _STATE *); // esi@1
  int v3; // ebp@1
  char *v4; // ecx@1
  char v5; // al@1
  char *v6; // edx@1
  int v7; // edx@1
  int v8; // eax@2
  int v9; // edi@3
  char *v10; // edx@4
  int v11; // edx@4
  char *v12; // esi@4
  char v13; // cl@4
  char *v14; // esi@4
  char *v16; // eax@7
  char *v17; // edi@7
  char v18; // bl@7
  char *v19; // eax@7
  char v20; // [sp+10h] [bp-324h]@1
  char *v21; // [sp+31Ch] [bp-18h]@1
  int (__cdecl **v22)(char *, int, struct _STATE *); // [sp+320h] [bp-14h]@3

  v2 = (int (__cdecl **)(char *, int, struct _STATE *))a1->ctx;
  v21 = &v20;
  v3 = 3 * a2->ncomps + 8;
  sub_790380(-62, &v21);
  sub_7903A0(v3, &v21);
  v4 = v21++;
  *v4 = 8;
  sub_7903A0(a2->height, &v21);
  sub_7903A0(a2->width, &v21);
  v5 = a2->ncomps;
  v6 = v21++;
  *v6 = v5;
  v7 = a2->ncomps;
  if ( v7 == 1 )
  {
    v16 = v21++;
    *v16 = 0;
    v17 = v21++;
    *v17 = 17;
    v18 = a2->comps->quant_sel;
    v19 = v21++;
    *v19 = v18;
  }
  else
  {
    v8 = 0;
    if ( v7 > 0 )
    {
      v9 = 0;
      v22 = v2;
      do
      {
        v10 = v21++;
        *v10 = v8;
        v11 = a2->comps[v9].vsampling + 16 * a2->comps[v9].hsampling;
        v12 = v21++;
        ++v8;
        *v12 = v11;
        v13 = a2->comps[v9].quant_sel;
        v14 = v21;
        ++v9;
        ++v21;
        *v14 = v13;
      }
      while ( v8 < a2->ncomps );
      v2 = v22;
    }
  }
  return v2[23](&v20, v3 + 2, a1);
}

//----- (00790BC0) --------------------------------------------------------
int __cdecl EP_Write_DQT(struct _STATE *a1, int a2, int a3, __int16 *const a4)
{
  __int16 *v4; // ebx@1
  void *v5; // edi@1
  signed int v6; // ebp@2
  char *v7; // ecx@4
  __int16 v8; // ax@6
  int v9; // edx@6
  char *v10; // ecx@6
  char *v11; // edx@6
  int v12; // eax@6
  char *v13; // edx@6
  char *v14; // edi@6
  int v15; // edi@7
  signed int v16; // eax@8
  char *v18; // [sp+10h] [bp-A4h]@4
  char v19; // [sp+14h] [bp-A0h]@4
  int v20; // [sp+9Ch] [bp-18h]@5

  v4 = a4;
  v5 = a1->ctx;
  if ( a2 )
    v6 = 131;
  else
    v6 = 67;
  v18 = &v19;
  sub_790380(-37, &v18);
  sub_7903A0(v6, &v18);
  v7 = v18++;
  *v7 = a3 + 16 * a2;
  if ( a2 )
  {
    v20 = (int)v5;
    do
    {
      v8 = *v4;
      v9 = (*v4 & 0xFF00) >> 8;
      v10 = v18++;
      *v10 = v9;
      v11 = v18++;
      *v11 = v8;
      LOWORD(v10) = v4[1];
      v12 = (v4[1] & 0xFF00) >> 8;
      v13 = v18++;
      v4 += 2;
      *v13 = v12;
      v14 = v18++;
      *v14 = (char)v10;
    }
    while ( (signed int)(a4 + 64) > (signed int)v4 );
    v15 = v20;
  }
  else
  {
    v16 = 0;
    v20 = (int)v5;
    do
    {
      v18[v16] = a4[v16];
      v18[v16 + 1] = a4[v16 + 1];
      v18[v16 + 2] = a4[v16 + 2];
      v18[v16 + 3] = a4[v16 + 3];
      v16 += 4;
    }
    while ( v16 < 64 );
    v15 = v20;
  }
  return (*(int (__cdecl **)(char *, int, struct _STATE *))(v15 + 92))(&v19, v6 + 2, a1);
}

//----- (00790D30) --------------------------------------------------------
int __cdecl EP_Write_DHT_Ex(struct _STATE *a1, unsigned __int8 *a2, unsigned __int8 *a3, int a4, int a5)
{
  int v5; // esi@1
  int v6; // ebx@1
  int result; // eax@2
  char *v8; // eax@3
  char *v9; // edx@3
  char *v10; // eax@3
  char *v11; // edx@3
  char *v12; // edx@3
  char *v13; // edx@3
  char *v14; // edx@3
  char *v15; // edx@3
  char *v16; // edx@3
  char *v17; // edx@3
  char *v18; // edx@3
  char *v19; // edx@3
  char *v20; // edx@3
  char *v21; // edx@3
  char *v22; // edx@3
  char *v23; // edx@3
  int v24; // ecx@3
  char *v25; // edi@3
  bool v26; // zf@3
  bool v27; // sf@3
  int v28; // edx@5
  unsigned __int8 v29; // bl@6
  unsigned __int8 *v30; // esi@6
  unsigned __int8 v31; // bl@6
  unsigned __int8 *v32; // ebp@6
  unsigned __int8 v33; // bl@6
  unsigned __int8 *v34; // esi@6
  unsigned __int8 v35; // bl@6
  unsigned __int8 *v36; // esi@6
  unsigned __int8 v37; // bl@6
  unsigned __int8 *v38; // esi@6
  int v39; // edi@8
  unsigned __int8 v40; // al@9
  unsigned __int8 *v41; // ebp@9
  char *v42; // [sp+10h] [bp-16Ch]@1
  char v43; // [sp+14h] [bp-168h]@1
  int v44; // [sp+158h] [bp-24h]@1
  int (__cdecl **v45)(char *, int, struct _STATE *); // [sp+15Ch] [bp-20h]@1
  int v46; // [sp+160h] [bp-1Ch]@1
  int v47; // [sp+164h] [bp-18h]@5

  v45 = (int (__cdecl **)(char *, int, struct _STATE *))a1->ctx;
  v42 = &v43;
  sub_790380(-60, &v42);
  v5 = a2[15];
  v44 = *a2
      + a2[1]
      + a2[2]
      + a2[3]
      + a2[4]
      + a2[5]
      + a2[6]
      + a2[7]
      + a2[8]
      + a2[9]
      + a2[10]
      + a2[11]
      + a2[12]
      + a2[13]
      + a2[14];
  v6 = v5 + v44 + 19;
  v46 = v5 + v44;
  sub_7903A0(v5 + v44 + 19, &v42);
  if ( v6 <= 324 )
  {
    v8 = v42++;
    *v8 = a5 + 16 * a4;
    LOBYTE(v8) = *a2;
    v9 = v42++;
    *v9 = (char)v8;
    LOBYTE(v9) = a2[1];
    v10 = v42++;
    *v10 = (char)v9;
    LOBYTE(v10) = a2[2];
    v11 = v42++;
    *v11 = (char)v10;
    LOBYTE(v10) = a2[3];
    v12 = v42++;
    *v12 = (char)v10;
    LOBYTE(v10) = a2[4];
    v13 = v42++;
    *v13 = (char)v10;
    LOBYTE(v10) = a2[5];
    v14 = v42++;
    *v14 = (char)v10;
    LOBYTE(v10) = a2[6];
    v15 = v42++;
    *v15 = (char)v10;
    LOBYTE(v10) = a2[7];
    v16 = v42++;
    *v16 = (char)v10;
    LOBYTE(v10) = a2[8];
    v17 = v42++;
    *v17 = (char)v10;
    LOBYTE(v10) = a2[9];
    v18 = v42++;
    *v18 = (char)v10;
    LOBYTE(v10) = a2[10];
    v19 = v42++;
    *v19 = (char)v10;
    LOBYTE(v10) = a2[11];
    v20 = v42++;
    *v20 = (char)v10;
    LOBYTE(v10) = a2[12];
    v21 = v42++;
    *v21 = (char)v10;
    LOBYTE(v10) = a2[13];
    v22 = v42++;
    *v22 = (char)v10;
    LOBYTE(v10) = a2[14];
    v23 = v42++;
    v24 = 0;
    *v23 = (char)v10;
    LOBYTE(v10) = a2[15];
    v25 = v42;
    v26 = v46 == 0;
    v27 = v46 < 0;
    ++v42;
    *v25 = (char)v10;
    if ( !v27 && !v26 )
    {
      if ( v5 + v44 >= 6 )
      {
        v28 = v5 + v44 - 6;
        v47 = v6;
        do
        {
          v29 = a3[v24];
          v30 = (unsigned __int8 *)v42++;
          *v30 = v29;
          v31 = a3[v24 + 1];
          v32 = (unsigned __int8 *)v42++;
          *v32 = v31;
          v33 = a3[v24 + 2];
          v34 = (unsigned __int8 *)v42++;
          *v34 = v33;
          v35 = a3[v24 + 3];
          v36 = (unsigned __int8 *)v42++;
          *v36 = v35;
          v37 = a3[v24 + 4];
          v38 = (unsigned __int8 *)v42++;
          v24 += 5;
          *v38 = v37;
        }
        while ( v24 <= v28 );
        v6 = v47;
      }
      v39 = v46;
      do
      {
        v40 = a3[v24];
        v41 = (unsigned __int8 *)v42++;
        ++v24;
        *v41 = v40;
      }
      while ( v24 < v39 );
    }
    result = v45[23](&v43, v6 + 2, a1);
  }
  else
  {
    result = -6;
  }
  return result;
}

//----- (00791020) --------------------------------------------------------
int __cdecl EP_Write_DHTs(struct _STATE *a1, struct _JPEG_PROPERTIES *a2)
{
  struct _JPEG_PROPERTIES *v2; // ebp@1
  int (__cdecl **v3)(char *, signed int, struct _STATE *); // esi@1
  int v4; // ecx@1
  int v5; // ebx@1
  int v6; // edi@1
  int v7; // eax@2
  char *v8; // esi@3
  int result; // eax@5
  int v10; // ebx@7
  char *v11; // edx@8
  int v12; // eax@8
  int v13; // esi@8
  char v14; // dl@9
  char v15; // cl@9
  char v16; // dl@9
  char v17; // dl@9
  char v18; // dl@9
  char v19; // dl@9
  char v20; // dl@9
  char v21; // dl@9
  char v22; // dl@9
  char v23; // dl@9
  char v24; // dl@9
  char v25; // dl@9
  char v26; // dl@9
  char v27; // dl@9
  char v28; // dl@9
  char v29; // dl@9
  char v30; // dl@9
  int v31; // edx@9
  char v32; // al@12
  char *v33; // ecx@12
  char v34; // al@12
  char *v35; // esi@12
  char v36; // al@12
  char *v37; // esi@12
  char *v38; // esi@12
  char v39; // al@12
  char *v40; // esi@12
  char **v41; // esi@13
  int v42; // ecx@14
  char v43; // al@15
  char *v44; // ebp@15
  int v45; // edx@18
  char *v46; // [sp+10h] [bp-174h]@5
  char v47; // [sp+14h] [bp-170h]@5
  char v48; // [sp+15h] [bp-16Fh]@9
  char v49; // [sp+16h] [bp-16Eh]@9
  char v50; // [sp+17h] [bp-16Dh]@9
  char v51; // [sp+18h] [bp-16Ch]@9
  char v52; // [sp+1Ch] [bp-168h]@9
  char v53; // [sp+20h] [bp-164h]@9
  char v54; // [sp+24h] [bp-160h]@9
  int v55; // [sp+158h] [bp-2Ch]@2
  int (__cdecl **v56)(char *, signed int, struct _STATE *); // [sp+15Ch] [bp-28h]@2
  int v57; // [sp+160h] [bp-24h]@7
  struct _JPEG_PROPERTIES *v58; // [sp+164h] [bp-20h]@7
  int v59; // [sp+168h] [bp-1Ch]@8
  int v60; // [sp+16Ch] [bp-18h]@8
  char **v61; // [sp+170h] [bp-14h]@11

  v2 = a2;
  v3 = (int (__cdecl **)(char *, signed int, struct _STATE *))a1->ctx;
  v4 = 0;
  v5 = 0;
  v6 = a2->maxhuffindex;
  if ( 2 * v6 > 0 )
  {
    v7 = 0;
    v55 = a2->maxhuffindex;
    v56 = v3;
    do
    {
      v8 = a2->rawhufftables[v7].bits;
      v5 += (unsigned __int8)v8[15]
          + (unsigned __int8)v8[14]
          + (unsigned __int8)v8[13]
          + (unsigned __int8)v8[12]
          + (unsigned __int8)v8[11]
          + (unsigned __int8)v8[10]
          + (unsigned __int8)v8[9]
          + (unsigned __int8)v8[8]
          + (unsigned __int8)v8[7]
          + (unsigned __int8)v8[6]
          + (unsigned __int8)v8[5]
          + (unsigned __int8)v8[4]
          + (unsigned __int8)v8[3]
          + (unsigned __int8)v8[2]
          + (unsigned __int8)v8[1]
          + (unsigned __int8)*v8;
      ++v7;
      ++v4;
    }
    while ( v4 < 2 * v6 );
    LOWORD(v6) = v55;
    v3 = v56;
  }
  v46 = &v47;
  sub_790380(-60, &v46);
  sub_7903A0(34 * v6 + v5 + 2, &v46);
  result = v3[23](&v47, 4, a1);
  if ( !result && 2 * a2->maxhuffindex > 0 )
  {
    v10 = 0;
    v58 = a2;
    v57 = 0;
    v56 = v3;
    while ( 1 )
    {
      v11 = v2->rawhufftables[v10].bits;
      v12 = (unsigned __int8)v11[14]
          + (unsigned __int8)v11[13]
          + (unsigned __int8)v11[12]
          + (unsigned __int8)v11[11]
          + (unsigned __int8)v11[10]
          + (unsigned __int8)v11[9]
          + (unsigned __int8)v11[8]
          + (unsigned __int8)v11[7]
          + (unsigned __int8)v11[6]
          + (unsigned __int8)v11[5]
          + (unsigned __int8)v11[4]
          + (unsigned __int8)v11[3]
          + (unsigned __int8)v11[2]
          + (unsigned __int8)v11[1]
          + (unsigned __int8)*v11;
      v13 = (unsigned __int8)v11[15];
      v55 = (unsigned __int8)v11[15];
      v59 = v12 + v13;
      v60 = v12 + v13 + 17;
      if ( v60 > 324 )
        break;
      v46 = &v47;
      v14 = v2->rawhufftables[v10].ident + 16 * v2->rawhufftables[v10].hclass;
      v46 = &v48;
      v47 = v14;
      v15 = *v2->rawhufftables[v10].bits;
      v46 = &v49;
      v48 = v15;
      v16 = v2->rawhufftables[v10].bits[1];
      v46 = &v50;
      v49 = v16;
      v17 = v2->rawhufftables[v10].bits[2];
      v46 = &v51;
      v50 = v17;
      v18 = v2->rawhufftables[v10].bits[3];
      v46 = &v51 + 1;
      v51 = v18;
      v19 = v2->rawhufftables[v10].bits[4];
      v46 = &v51 + 2;
      *(&v51 + 1) = v19;
      v20 = v2->rawhufftables[v10].bits[5];
      v46 = &v51 + 3;
      *(&v51 + 2) = v20;
      v21 = v2->rawhufftables[v10].bits[6];
      v46 = &v52;
      *(&v51 + 3) = v21;
      v22 = v2->rawhufftables[v10].bits[7];
      v46 = &v52 + 1;
      v52 = v22;
      v23 = v2->rawhufftables[v10].bits[8];
      v46 = &v52 + 2;
      *(&v52 + 1) = v23;
      v24 = v2->rawhufftables[v10].bits[9];
      v46 = &v52 + 3;
      *(&v52 + 2) = v24;
      v25 = v2->rawhufftables[v10].bits[10];
      v46 = &v53;
      *(&v52 + 3) = v25;
      v26 = v2->rawhufftables[v10].bits[11];
      v46 = &v53 + 1;
      v53 = v26;
      v27 = v2->rawhufftables[v10].bits[12];
      v46 = &v53 + 2;
      *(&v53 + 1) = v27;
      v28 = v2->rawhufftables[v10].bits[13];
      v46 = &v53 + 3;
      *(&v53 + 2) = v28;
      v29 = v2->rawhufftables[v10].bits[14];
      v46 = &v54;
      *(&v53 + 3) = v29;
      v30 = v2->rawhufftables[v10].bits[15];
      v46 = &v54 + 1;
      v54 = v30;
      v31 = 0;
      if ( v12 + v13 > 0 )
      {
        if ( v12 + v55 < 6 )
        {
          v41 = &v58->rawhufftables[0].vals;
        }
        else
        {
          v55 = v12 + v55 - 6;
          v61 = &v58->rawhufftables[0].vals;
          do
          {
            v32 = v2->rawhufftables[v10].vals[v31];
            v33 = v46++;
            *v33 = v32;
            v34 = v2->rawhufftables[v10].vals[v31 + 1];
            v35 = v46++;
            *v35 = v34;
            v36 = v2->rawhufftables[v10].vals[v31 + 2];
            v37 = v46++;
            *v37 = v36;
            LOBYTE(v33) = v2->rawhufftables[v10].vals[v31 + 3];
            v38 = v46++;
            *v38 = (char)v33;
            v39 = v2->rawhufftables[v10].vals[v31 + 4];
            v40 = v46;
            v31 += 5;
            ++v46;
            *v40 = v39;
          }
          while ( v31 <= v55 );
          v41 = v61;
        }
        v42 = v59;
        do
        {
          v43 = (*v41)[v31];
          v44 = v46;
          ++v31;
          ++v46;
          *v44 = v43;
        }
        while ( v31 < v42 );
        v2 = a2;
      }
      result = v56[23](&v47, v60, a1);
      if ( !result )
      {
        ++v10;
        v58 = (struct _JPEG_PROPERTIES *)((char *)v58 + 12);
        v45 = 2 * v2->maxhuffindex;
        if ( ++v57 < v45 )
          continue;
      }
      return result;
    }
    result = -6;
  }
  return result;
}

//----- (00791540) --------------------------------------------------------
int __cdecl EP_Write_SOS(struct _STATE *a1, int a2, char *a3, char *a4)
{
  int v4; // ebx@1
  int v5; // ebp@1
  char *v6; // edx@1
  char *v7; // ecx@2
  char v8; // al@2
  char *v9; // ecx@2
  signed int v10; // eax@2
  char *v11; // esi@5
  char v12; // bl@5
  char *v13; // esi@5
  char *v14; // esi@5
  char v15; // bl@5
  char *v16; // esi@5
  char *v17; // esi@5
  char v18; // bl@5
  char *v19; // esi@5
  char *v20; // edx@8
  int v21; // edx@8
  char *v22; // esi@8
  char *v23; // ecx@10
  char *v24; // esi@10
  char *v25; // edx@10
  char *v27; // ecx@11
  char *v28; // esi@11
  char *v29; // [sp+10h] [bp-4Ch]@1
  char v30; // [sp+14h] [bp-48h]@1
  int v31; // [sp+34h] [bp-28h]@4
  int v32; // [sp+38h] [bp-24h]@4
  int v33; // [sp+3Ch] [bp-20h]@4
  int (__cdecl **v34)(char *, int, struct _STATE *); // [sp+40h] [bp-1Ch]@1
  int v35; // [sp+44h] [bp-18h]@4

  v4 = a2;
  v5 = 2 * a2 + 6;
  v34 = (int (__cdecl **)(char *, int, struct _STATE *))a1->ctx;
  v29 = &v30;
  sub_790380(-38, &v29);
  sub_7903A0(v5, &v29);
  v6 = v29++;
  *v6 = a2;
  if ( a2 == 1 )
  {
    v27 = v29++;
    *v27 = 0;
    v28 = v29++;
    *v28 = 0;
  }
  else
  {
    v7 = v29++;
    *v7 = 1;
    v8 = *a4 + 16 * *a3;
    v9 = v29++;
    *v9 = v8;
    v10 = 2;
    if ( a2 >= 2 )
    {
      if ( a2 - 2 >= 4 )
      {
        v33 = 3;
        v32 = 4;
        v35 = a2 - 4;
        v31 = 2 * a2 + 6;
        do
        {
          v11 = v29++;
          *v11 = v10;
          v12 = a4[v10 - 1] + 16 * a3[v10 - 1];
          v13 = v29++;
          *v13 = v12;
          v14 = v29++;
          *v14 = v33;
          v15 = a4[v10] + 16 * a3[v10];
          v16 = v29++;
          *v16 = v15;
          v17 = v29++;
          *v17 = v32;
          v18 = a4[v10 + 1] + 16 * a3[v10 + 1];
          v19 = v29++;
          v10 += 3;
          *v19 = v18;
          v33 += 3;
          v32 += 3;
        }
        while ( v10 <= v35 );
        v5 = v31;
        v4 = a2;
      }
      v31 = v5;
      do
      {
        v20 = v29++;
        *v20 = v10;
        v21 = (unsigned __int8)a4[v10 - 1] + 16 * (unsigned __int8)a3[v10 - 1];
        v22 = v29++;
        ++v10;
        *v22 = v21;
      }
      while ( v10 <= v4 );
      v5 = v31;
    }
  }
  v23 = v29++;
  *v23 = 0;
  v24 = v29++;
  *v24 = 63;
  v25 = v29++;
  *v25 = 0;
  return v34[23](&v30, v5 + 2, a1);
}

//----- (00791760) --------------------------------------------------------
int __cdecl EP_Write_SOS_Ex(struct _STATE *a1, struct _SCAN *a2, unsigned __int8 *a3, unsigned __int8 *a4)
{
  int (__cdecl **v4)(char *, int, struct _STATE *); // esi@1
  int v5; // ebp@1
  char v6; // al@1
  char *v7; // edx@1
  int v8; // eax@2
  char *v9; // edi@4
  int v10; // edx@4
  char *v11; // edi@4
  char v12; // al@6
  char *v13; // edx@6
  char *v14; // eax@6
  int v15; // ecx@6
  char *v16; // edi@6
  char v18; // al@7
  char *v19; // edx@7
  int v20; // ecx@7
  unsigned __int8 v21; // al@7
  char *v22; // ecx@7
  char *v23; // [sp+10h] [bp-2Ch]@1
  char v24; // [sp+14h] [bp-28h]@1
  int (__cdecl **v25)(char *, int, struct _STATE *); // [sp+24h] [bp-18h]@3
  int v26; // [sp+28h] [bp-14h]@3

  v4 = (int (__cdecl **)(char *, int, struct _STATE *))a1->ctx;
  v5 = 2 * a2->ncomps + 6;
  v23 = &v24;
  sub_790380(-38, &v23);
  sub_7903A0(v5, &v23);
  v6 = a2->ncomps;
  v7 = v23++;
  *v7 = v6;
  if ( a2->ncomps == 1 )
  {
    v18 = a2->comps->comp;
    v19 = v23++;
    *v19 = v18;
    v20 = a2->comps->comp;
    LOBYTE(v19) = 16 * a3[v20];
    v21 = a4[v20];
    v22 = v23++;
    *v22 = v21 + (_BYTE)v19;
  }
  else
  {
    v8 = 0;
    if ( a2->ncomps > 0 )
    {
      v26 = v5;
      v25 = v4;
      do
      {
        v9 = v23++;
        *v9 = v8;
        v10 = a4[v8] + 16 * a3[v8];
        v11 = v23++;
        ++v8;
        *v11 = v10;
      }
      while ( v8 < a2->ncomps );
      v5 = v26;
      v4 = v25;
    }
  }
  v12 = a2->start_spec;
  v13 = v23++;
  *v13 = v12;
  LOBYTE(v13) = a2->end_spec;
  v14 = v23++;
  *v14 = (char)v13;
  v15 = a2->approx_low + 16 * a2->approx_high;
  v16 = v23++;
  *v16 = v15;
  return v4[23](&v24, v5 + 2, a1);
}

//----- (007918B0) --------------------------------------------------------
int __cdecl EP_Write_DRI(int a1, struct _STATE *a2)
{
  int (__cdecl **v2)(char *, signed int, struct _STATE *); // ebx@1
  char *v4; // [sp+10h] [bp-1Ch]@1
  char v5; // [sp+14h] [bp-18h]@1

  v2 = (int (__cdecl **)(char *, signed int, struct _STATE *))a2->ctx;
  v4 = &v5;
  sub_790380(-35, &v4);
  sub_7903A0(4, &v4);
  sub_7903A0(a1, &v4);
  return v2[23](&v5, 6, a2);
}

//----- (00791920) --------------------------------------------------------
int __cdecl EP_Write_RST(int a1, struct _STATE *a2)
{
  int (__cdecl **v2)(char *, signed int, struct _STATE *); // ebp@1
  char v3; // dl@2
  int result; // eax@10
  char *v5; // [sp+10h] [bp-14h]@10
  char v6; // [sp+14h] [bp-10h]@10

  v2 = (int (__cdecl **)(char *, signed int, struct _STATE *))a2->ctx;
  switch ( a1 )
  {
    case 7:
      v3 = -41;
      goto LABEL_10;
    case 6:
      v3 = -42;
      goto LABEL_10;
    case 5:
      v3 = -43;
      goto LABEL_10;
    case 4:
      v3 = -44;
      goto LABEL_10;
    case 3:
      v3 = -45;
      goto LABEL_10;
    case 2:
      v3 = -46;
      goto LABEL_10;
    case 1:
      v3 = -47;
      goto LABEL_10;
    case 0:
      v3 = -48;
LABEL_10:
      v5 = &v6;
      sub_790380(v3, &v5);
      result = v2[23](&v6, 2, a2);
      break;
    default:
      result = -25;
      break;
  }
  return result;
}

//----- (007919C0) --------------------------------------------------------
int __cdecl EP_Write_APP14(char a1, struct _JPEG_PROPERTIES *a2)
{
  int (__cdecl **v2)(char *, signed int, _STATE *); // ebp@1
  char *v3; // edx@1
  char *v4; // eax@1
  char *v5; // edx@1
  char *v6; // edx@1
  char *v7; // edx@1
  char *v8; // edx@1
  char *v10; // [sp+10h] [bp-24h]@1
  char v11; // [sp+14h] [bp-20h]@1

  v2 = (int (__cdecl **)(char *, signed int, _STATE *))a2->state.ctx;
  v10 = &v11;
  sub_790380(-18, &v10);
  sub_7903A0(14, &v10);
  v3 = v10++;
  *v3 = 65;
  v4 = v10++;
  *v4 = 100;
  v5 = v10++;
  *v5 = 111;
  v6 = v10++;
  *v6 = 98;
  v7 = v10++;
  *v7 = 101;
  sub_7903A0(a2->AdobeVersion, &v10);
  sub_7903A0(a2->AdobeFlags0, &v10);
  sub_7903A0(a2->AdobeFlags1, &v10);
  v8 = v10++;
  *v8 = a1;
  return v2[23](&v11, 16, &a2->state);
}

//----- (00791AC0) --------------------------------------------------------
signed int __cdecl Encode_Scan(struct _JPEG_PROPERTIES *a1, struct _STATE *a2, struct _SCAN *a3)
{
  struct _JPEG_PROPERTIES *v3; // edi@1
  struct _SCAN *v4; // ebx@1
  signed int v5; // ebp@1
  void (**v6)(void); // ecx@1
  int v7; // eax@1
  int v8; // edx@1
  int v9; // esi@2
  int v10; // edx@2
  int v11; // ebx@2
  int v12; // ecx@5
  int v13; // ebp@5
  _HUFFMAN_TABLE *v14; // ecx@5
  _HUFFMAN_TABLE *v15; // ebp@5
  __int16 *v16; // ecx@7
  int v17; // ecx@8
  int v18; // esi@10
  int v19; // eax@11
  int v20; // ecx@11
  int v21; // eax@12
  int v22; // eax@13
  char *v23; // ebp@14
  int *v24; // ecx@14
  int v25; // edx@15
  _SCAN_COMPONENT *v26; // ecx@16
  int v27; // ebp@17
  int v28; // ebx@17
  _RAW_DATA_TYPES_STATE *v29; // edi@18
  int v30; // edx@18
  int v31; // esi@19
  int v32; // eax@20
  int v33; // ebp@22
  signed int v34; // ebx@22
  int v35; // esi@22
  int v36; // edx@31
  char *v37; // esi@37
  int v38; // ebx@37
  int v39; // ebp@37
  int v40; // edi@37
  int v41; // esi@40
  int v42; // edx@41
  int v43; // edi@42
  int v44; // ebx@43
  _RAW_DATA_TYPES_STATE *v45; // eax@44
  int v46; // eax@47
  int v47; // edx@53
  int v49; // eax@58
  int v50; // esi@58
  signed int v51; // ebp@58
  int v52; // et2@58
  int v53[4]; // [sp+18h] [bp-A4h]@5
  int v54[4]; // [sp+28h] [bp-94h]@5
  int v55[4]; // [sp+38h] [bp-84h]@5
  int v56[4]; // [sp+48h] [bp-74h]@7
  int v57; // [sp+58h] [bp-64h]@2
  void (**v58)(void); // [sp+5Ch] [bp-60h]@2
  char *v59; // [sp+60h] [bp-5Ch]@16
  _SCAN_COMPONENT *v60; // [sp+64h] [bp-58h]@10
  int v61; // [sp+68h] [bp-54h]@1
  int v62; // [sp+6Ch] [bp-50h]@18
  _RAW_DATA_TYPES_STATE *v63; // [sp+70h] [bp-4Ch]@16
  int v64; // [sp+74h] [bp-48h]@13
  int v65; // [sp+78h] [bp-44h]@13
  int v66; // [sp+7Ch] [bp-40h]@13
  int v67; // [sp+80h] [bp-3Ch]@13
  int v68; // [sp+84h] [bp-38h]@13
  int v69; // [sp+88h] [bp-34h]@16
  int v70; // [sp+8Ch] [bp-30h]@18
  int v71; // [sp+90h] [bp-2Ch]@18
  unsigned int v72; // [sp+94h] [bp-28h]@18
  int v73; // [sp+98h] [bp-24h]@20
  int v74; // [sp+9Ch] [bp-20h]@20
  int v75; // [sp+A0h] [bp-1Ch]@11
  unsigned int v76; // [sp+A4h] [bp-18h]@18
  int v77; // [sp+A8h] [bp-14h]@11

  v3 = a1;
  v4 = a3;
  v5 = 0;
  v6 = (void (**)(void))a2->ctx;
  v7 = 0;
  v61 = 0;
  v8 = a3->ncomps;
  if ( a3->ncomps <= 0 )
  {
LABEL_10:
    v18 = v4->curyMCU;
    v60 = (_SCAN_COMPONENT *)a1->numyMCUs;
    if ( v18 < (signed int)v60 )
    {
      v19 = a1->numxMCUs;
      v57 = v5;
      v77 = v19;
      v75 = v8;
      v58 = v6;
      v20 = (int)v60;
      while ( 1 )
      {
        v21 = v4->curxMCU;
        if ( v21 < v77 )
          break;
LABEL_55:
        if ( ++v18 >= v20 )
        {
          v5 = v57;
          v6 = v58;
          goto LABEL_57;
        }
      }
      v68 = v18 << 7;
      v67 = (v61 << 6) - 1;
      v66 = v61 << 6;
      v65 = v21;
      v64 = v18;
      v22 = v75;
      while ( 1 )
      {
        v23 = v3->MCUBuf;
        v24 = &v3->raw_coefs->data_type;
        if ( v24 )
        {
          v25 = 0;
          if ( v22 > 0 )
          {
            v60 = v4->comps;
            v59 = v23;
            v63 = (_RAW_DATA_TYPES_STATE *)v24;
            v69 = 16 * v65;
            v26 = v60;
            do
            {
              v27 = 0;
              v28 = v26[v25].vsampling;
              if ( v28 > 0 )
              {
                v62 = v26[v25].hsampling;
                v72 = 16 * v25;
                v71 = 2 * v25;
                v29 = v63;
                v76 = 24 * v25;
                v70 = v25;
                v30 = v62;
                do
                {
                  v31 = 0;
                  if ( v30 > 0 )
                  {
                    v32 = v77;
                    v74 = v27 << 7;
                    v73 = v27;
                    while ( 1 )
                    {
                      v33 = (int)&v29->raw_ptrs[2 * v71 / 4u][8 * v31]
                          + v69 * a1->jframe.comps[v72 / 0x10].hsampling
                          + v30 * v68 * v32 * v28
                          + v74 * v32 * v30;
                      v34 = 0;
                      v75 = v31;
                      v35 = (int)v59;
                      do
                      {
                        (*(void (__cdecl **)(int, int, signed int))&NULLSTR[5720])(v35, v33, 16);
                        v32 = a1->numxMCUs;
                        v26 = a3->comps;
                        v30 = v26[v76 / 0x18].hsampling;
                        v33 += v30 * 16 * a1->numxMCUs;
                        v35 += 16;
                        ++v34;
                      }
                      while ( v34 < 8 );
                      v59 = (char *)v35;
                      v31 = v75 + 1;
                      if ( v75 + 1 >= v30 )
                        break;
                      v29 = a1->raw_coefs;
                      v28 = v26[v76 / 0x18].vsampling;
                    }
                    v77 = v32;
                    v27 = v73;
                    v29 = a1->raw_coefs;
                    v28 = v26[v76 / 0x18].vsampling;
                  }
                  ++v27;
                }
                while ( v27 < v28 );
                v63 = v29;
                v25 = v70;
                v22 = a3->ncomps;
              }
              ++v25;
            }
            while ( v25 < v22 );
            v24 = (int *)v63;
            v4 = a3;
            v3 = a1;
            v23 = a1->MCUBuf;
          }
          if ( *v24 )
          {
            v36 = v67;
            if ( v66 )
            {
              do
              {
                *(_WORD *)v23 -= 128;
                v23 += 2;
                --v36;
              }
              while ( v36 != -1 );
              v23 = v3->MCUBuf;
              v24 = &v3->raw_coefs->data_type;
            }
          }
        }
        else
        {
          ((void (__cdecl *)(struct _JPEG_PROPERTIES *, int, int))v58[24])(v3, v65, v64);
          v24 = &v3->raw_coefs->data_type;
        }
        if ( (!v24 || *v24) && v61 > 0 )
        {
          v37 = v23;
          v59 = v23;
          v38 = 0;
          v39 = v61;
          v40 = (int)v58;
          do
          {
            (*(void (__cdecl **)(char *))(v40 + 68))(v37);
            v37 += 128;
            ++v38;
          }
          while ( v38 < v39 );
          v58 = (void (**)(void))v40;
          v23 = v59;
          v4 = a3;
          v3 = a1;
        }
        v41 = 0;
        v22 = v4->ncomps;
        if ( v4->ncomps > 0 )
          break;
LABEL_52:
        if ( v3->interrupt )
        {
          v49 = v65;
          v50 = v64;
          v6 = v58;
          v3->roi.right = v65;
          v51 = v3->numxMCUs;
          v3->roi.bottom = v50;
          v52 = (v49 + 1) % v51;
          v4->curxMCU = v52;
          if ( v52 )
            v4->curyMCU = v50;
          else
            v4->curyMCU = v50 + 1;
          v5 = 1;
          goto LABEL_57;
        }
        v47 = v3->numxMCUs;
        ++v65;
        v77 = v47;
        if ( v65 >= v47 )
        {
          v75 = v22;
          v18 = v64;
          v20 = v3->numyMCUs;
          goto LABEL_55;
        }
      }
      v42 = (int)v4;
      while ( 1 )
      {
        v43 = 0;
        if ( v53[v41] > 0 )
          break;
LABEL_50:
        v42 += 4;
        if ( ++v41 >= v22 )
        {
          v3 = a1;
          goto LABEL_52;
        }
      }
      v44 = (int)v58;
      v60 = (_SCAN_COMPONENT *)(v42 + 36);
      v62 = v42;
      while ( 1 )
      {
        v45 = a1->raw_coefs;
        if ( !v45 || v45->data_type )
          (*(void (__cdecl **)(char *, int))(v44 + 260))(v23, v56[v41]);
        v46 = (*(int (__cdecl **)(struct _STATE *, int, int, int, char *))(v44 + 240))(
                a2,
                v54[v41],
                v55[v41],
                (int)v60,
                v23);
        if ( v46 )
          break;
        v23 += 128;
        if ( ++v43 >= v53[v41] )
        {
          v57 = 0;
          v42 = v62;
          v58 = (void (**)(void))v44;
          v4 = a3;
          v22 = a3->ncomps;
          goto LABEL_50;
        }
      }
      v5 = v46;
      v6 = (void (**)(void))v44;
    }
  }
  else
  {
    v9 = 0;
    v10 = 0;
    v11 = v61;
    v57 = 0;
    v58 = v6;
    while ( 1 )
    {
      if ( !a1->jscan )
        a3->dc_diff[v7] = 0;
      v12 = a3->comps[v10].hsampling * a3->comps[v10].vsampling;
      v11 += v12;
      v13 = a1->HuffIdentifierAC[v7];
      v53[v7] = v12;
      v14 = a1->jEncFmtDcHuffman[a1->HuffIdentifierDC[v7]];
      v54[v7] = (int)v14;
      v15 = a1->jEncFmtAcHuffman[v13];
      v55[v7] = (int)v15;
      if ( !v14 )
        break;
      if ( !v15 )
      {
        v6 = v58;
        goto LABEL_66;
      }
      v16 = a1->jEncFmtQuant[a1->jframe.comps[v9].quant_sel];
      v56[v7] = (int)v16;
      if ( !v16 )
      {
        v6 = v58;
        v5 = -18;
        goto LABEL_57;
      }
      ++v9;
      ++v10;
      ++v7;
      v17 = a3->ncomps;
      if ( v7 >= a3->ncomps )
      {
        v61 = v11;
        v8 = v17;
        v5 = v57;
        v6 = v58;
        v4 = a3;
        goto LABEL_10;
      }
    }
    v6 = v58;
LABEL_66:
    v5 = -17;
  }
LABEL_57:
  v6[6]();
  return v5;
}
// B60728: using guessed type int (__cdecl *)(_DWORD, _DWORD, _DWORD);
// 791AC0: using guessed type int var_A4[4];
// 791AC0: using guessed type int var_94[4];
// 791AC0: using guessed type int var_84[4];
// 791AC0: using guessed type int var_74[4];

//----- (00792060) --------------------------------------------------------
enum _IJLERR __cdecl Fill_coeffs_buffer(struct _JPEG_PROPERTIES *a1)
{
  struct _JPEG_PROPERTIES *v1; // esi@1
  __int16 *v2; // ecx@1
  int v3; // ebx@1
  int v4; // eax@1
  int v5; // ecx@1
  _FRAME_COMPONENT *v6; // edx@2
  int v7; // edi@3
  int v8; // ebp@3
  int v9; // ebx@4
  int v10; // ebp@4
  int v11; // edx@5
  char *v12; // ebx@8
  int *v13; // ecx@8
  int v14; // ebp@9
  int v15; // eax@9
  _FRAME_COMPONENT *v16; // edx@10
  int v17; // ecx@11
  int v18; // ebx@11
  int v19; // eax@12
  _RAW_DATA_TYPES_STATE *v20; // ebp@12
  int v21; // edi@13
  int v22; // ecx@14
  int v23; // esi@14
  int v24; // ebx@16
  signed int v25; // ebp@16
  int v26; // esi@16
  int v27; // eax@25
  int v28; // edi@28
  char *v29; // ebp@29
  int v30; // ebx@29
  int v31; // esi@29
  int v32; // ebp@32
  int v33; // eax@32
  struct _JPEG_PROPERTIES *v34; // edx@33
  void (__fastcall **v35)(int, struct _JPEG_PROPERTIES *); // esi@33
  int v36; // edi@34
  int v37; // ecx@34
  int v38; // ST04_4@35
  bool v39; // sf@39
  unsigned __int8 v40; // of@39
  int v42[4]; // [sp+10h] [bp-7Ch]@3
  int v43[4]; // [sp+20h] [bp-6Ch]@3
  unsigned int v44; // [sp+30h] [bp-5Ch]@11
  int v45; // [sp+34h] [bp-58h]@12
  char *v46; // [sp+38h] [bp-54h]@10
  int v47; // [sp+3Ch] [bp-50h]@10
  _RAW_DATA_TYPES_STATE *v48; // [sp+40h] [bp-4Ch]@10
  int v49; // [sp+44h] [bp-48h]@7
  int v50; // [sp+48h] [bp-44h]@10
  int v51; // [sp+4Ch] [bp-40h]@7
  int v52; // [sp+50h] [bp-3Ch]@5
  int v53; // [sp+54h] [bp-38h]@5
  int v54; // [sp+58h] [bp-34h]@12
  int v55; // [sp+5Ch] [bp-30h]@16
  int v56; // [sp+60h] [bp-2Ch]@14
  _FRAME_COMPONENT *v57; // [sp+64h] [bp-28h]@10
  int v58; // [sp+68h] [bp-24h]@5
  int v59; // [sp+6Ch] [bp-20h]@5
  void (__cdecl **v60)(struct _JPEG_PROPERTIES *, int, int); // [sp+70h] [bp-1Ch]@1
  int v61; // [sp+74h] [bp-18h]@1

  v1 = a1;
  v2 = a1->coef_buffer;
  v3 = 0;
  v60 = (void (__cdecl **)(struct _JPEG_PROPERTIES *, int, int))a1->state.ctx;
  v4 = 0;
  v61 = (int)v2;
  v5 = a1->jframe.ncomps;
  if ( v5 > 0 )
  {
    v6 = a1->jframe.comps;
    do
    {
      v7 = v6->quant_sel;
      v8 = v6->hsampling * v6->vsampling;
      v4 += v8;
      ++v6;
      v42[v3] = v8;
      v43[v3++] = (int)a1->jEncFmtQuant[v7];
    }
    while ( v3 < v5 );
  }
  v9 = 0;
  v10 = a1->numyMCUs;
  if ( v10 > 0 )
  {
    v11 = a1->numxMCUs;
    v59 = v4 << 6;
    v58 = (v4 << 6) - 1;
    v52 = v4 << 7;
    v53 = v4;
    do
    {
      if ( v11 > 0 )
      {
        v49 = v9;
        v51 = 0;
        do
        {
          v12 = v1->MCUBuf;
          v13 = &v1->raw_coefs->data_type;
          if ( v13 )
          {
            v14 = 0;
            v15 = v1->jframe.ncomps;
            if ( v15 > 0 )
            {
              v57 = v1->jframe.comps;
              v46 = v12;
              v47 = v11;
              v48 = (_RAW_DATA_TYPES_STATE *)v13;
              v16 = v57;
              v50 = 16 * v51;
              do
              {
                v17 = 0;
                v44 = 16 * v14;
                v18 = v16[v14].vsampling;
                if ( v18 > 0 )
                {
                  v19 = v16[v44 / 0x10].hsampling;
                  v45 = 2 * v14;
                  v54 = v14;
                  v20 = v48;
                  do
                  {
                    v21 = 0;
                    if ( v19 > 0 )
                    {
                      v56 = v17;
                      v22 = v47;
                      v23 = v45;
                      while ( 1 )
                      {
                        v24 = (int)&(*(unsigned __int16 **)((char *)v20->raw_ptrs + 2 * v23))[8 * v21]
                            + v19 * v49 * (v22 << 7) * v18
                            + v19 * v50
                            + v56 * (v22 << 7) * v19;
                        v25 = 0;
                        v55 = v21;
                        v26 = (int)v46;
                        do
                        {
                          (*(void (__cdecl **)(int, int, signed int))&NULLSTR[5720])(v26, v24, 16);
                          v22 = a1->numxMCUs;
                          v16 = a1->jframe.comps;
                          v19 = v16[v44 / 0x10].hsampling;
                          v24 += v19 * 16 * a1->numxMCUs;
                          v26 += 16;
                          ++v25;
                        }
                        while ( v25 < 8 );
                        v46 = (char *)v26;
                        v23 = v45;
                        v21 = v55 + 1;
                        if ( v55 + 1 >= v19 )
                          break;
                        v20 = a1->raw_coefs;
                        v18 = v16[v44 / 0x10].vsampling;
                      }
                      v47 = v22;
                      v17 = v56;
                      v1 = a1;
                      v20 = a1->raw_coefs;
                      v18 = v16[v44 / 0x10].vsampling;
                    }
                    ++v17;
                  }
                  while ( v17 < v18 );
                  v48 = v20;
                  v14 = v54;
                  v15 = v1->jframe.ncomps;
                }
                ++v14;
              }
              while ( v14 < v15 );
              v13 = (int *)v48;
              v12 = v1->MCUBuf;
            }
            if ( *v13 )
            {
              v27 = v58;
              if ( v59 )
              {
                do
                {
                  *(_WORD *)v12 -= 128;
                  v12 += 2;
                  --v27;
                }
                while ( v27 != -1 );
                v12 = v1->MCUBuf;
              }
            }
          }
          else
          {
            v60[24](v1, v51, v49);
          }
          v28 = 0;
          if ( v53 > 0 )
          {
            v29 = v12;
            v46 = v12;
            v30 = v53;
            v31 = (int)v60;
            do
            {
              (*(void (__cdecl **)(char *))(v31 + 68))(v29);
              v29 += 128;
              ++v28;
            }
            while ( v28 < v30 );
            v12 = v46;
            v1 = a1;
          }
          v32 = 0;
          v33 = v1->jframe.ncomps;
          if ( v33 > 0 )
          {
            v34 = v1;
            v35 = (void (__fastcall **)(int, struct _JPEG_PROPERTIES *))v60;
            do
            {
              v36 = 0;
              v37 = v42[v32];
              if ( v37 > 0 )
              {
                do
                {
                  v38 = v43[v32];
                  v35[65](v37, v34);
                  v12 += 128;
                  ++v36;
                }
                while ( v36 < v42[v32] );
                v34 = a1;
                v33 = a1->jframe.ncomps;
              }
              ++v32;
            }
            while ( v32 < v33 );
            v1 = v34;
          }
          (*(void (__cdecl **)(int, char *, int))&NULLSTR[5720])(v61, v1->MCUBuf, v52);
          v11 = v1->numxMCUs;
          v40 = __OFSUB__(v51 + 1, v11);
          v39 = v51 + 1 - v11 < 0;
          v61 += v52;
          ++v51;
        }
        while ( v39 ^ v40 );
        v9 = v49;
        v10 = v1->numyMCUs;
      }
      ++v9;
    }
    while ( v9 < v10 );
  }
  return 0;
}
// B60728: using guessed type int (__cdecl *)(_DWORD, _DWORD, _DWORD);
// 792060: using guessed type int var_7C[4];
// 792060: using guessed type int var_6C[4];

//----- (007923C0) --------------------------------------------------------
enum _IJLERR __cdecl Gather_statistics(struct _JPEG_PROPERTIES *a1, struct _STATE *a2, struct _SCAN *a3, int (*const a4)[257])
{
  struct _JPEG_PROPERTIES *v4; // eax@1
  int v5; // esi@1
  int v6; // ebp@1
  int v7; // ebx@1
  _FRAME_COMPONENT *v8; // ecx@2
  int v9; // edx@2
  int v10; // edi@3
  int v11; // ebp@4
  int v12; // ecx@4
  int v13; // edx@4
  int *v14; // ebx@6
  int v15; // edi@6
  int v16; // esi@8
  int v17; // ebp@9
  int v18; // ebx@10
  struct _SCAN *v19; // ecx@11
  int v20; // ebp@12
  __int16 *v21; // edi@13
  _SCAN_COMPONENT *v22; // esi@22
  signed int v23; // esi@22
  int v24; // ebx@22
  int v25; // eax@24
  int v26; // edi@27
  int v27; // ebx@30
  int v28; // edx@31
  __int16 *v29; // esi@31
  int v30; // edi@31
  int v31; // ecx@32
  int *v32; // ebp@33
  int v33; // ebx@33
  int v34; // edx@36
  int v35; // ecx@36
  __int16 *v36; // esi@37
  int v37; // ebp@37
  int v38; // ebx@38
  int *v39; // esi@50
  unsigned __int8 v41; // [sp+20h] [bp-44Ch]@42
  int v42; // [sp+408h] [bp-64h]@1
  int v43; // [sp+40Ch] [bp-60h]@3
  int v44; // [sp+410h] [bp-5Ch]@25
  int v45; // [sp+414h] [bp-58h]@25
  int v46; // [sp+418h] [bp-54h]@25
  void (__fastcall **v47)(int, int); // [sp+41Ch] [bp-50h]@1
  int *v48; // [sp+420h] [bp-4Ch]@13
  struct _JPEG_PROPERTIES *v49; // [sp+424h] [bp-48h]@13
  int v50; // [sp+428h] [bp-44h]@7
  int v51; // [sp+42Ch] [bp-40h]@7
  struct _SCAN *v52; // [sp+430h] [bp-3Ch]@13
  int v53; // [sp+434h] [bp-38h]@11
  int v54; // [sp+438h] [bp-34h]@9
  int *v55; // [sp+43Ch] [bp-30h]@9
  int v56; // [sp+440h] [bp-2Ch]@11
  __int16 *v57; // [sp+444h] [bp-28h]@11
  int *v58; // [sp+448h] [bp-24h]@31
  int v59; // [sp+44Ch] [bp-20h]@33
  int v60; // [sp+450h] [bp-1Ch]@36
  int v61; // [sp+454h] [bp-18h]@36

  v4 = a1;
  v5 = 0;
  v47 = (void (__fastcall **)(int, int))a2->ctx;
  v6 = 0;
  v7 = a1->jframe.ncomps;
  v42 = 0;
  if ( v7 > 0 )
  {
    v8 = a1->jframe.comps;
    v9 = 0;
    do
    {
      v10 = v8[v9].hsampling * v8[v9].vsampling;
      *(&v43 + v5) = v10;
      v6 += v10;
      ++v9;
      ++v5;
    }
    while ( v5 < v7 );
  }
  v11 = v6 << 6;
  v12 = a1->numxMCUs;
  v13 = v12 * v11;
  if ( a3->start_spec || a3->end_spec )
  {
    v22 = a3->comps;
    v55 = (int *)v22;
    v23 = v22->comp;
    v56 = a1->HuffIdentifierAC[v23];
    v24 = 0;
    v54 = 0;
    if ( v23 > 0 )
    {
      if ( v23 >= 6 )
      {
        v25 = v54;
        v57 = (__int16 *)(v23 - 6);
        do
        {
          v25 += (int)(&v47)[v24] + *(&v46 + v24) + *(&v45 + v24) + *(&v44 + v24) + *(&v43 + v24);
          v24 += 5;
        }
        while ( v24 <= v23 - 6 );
        v54 = v25;
        v4 = a1;
      }
      v26 = v54;
      do
        v26 += *(&v43 + v24++);
      while ( v24 < v23 );
      v54 = v26;
    }
    v57 = 0;
    v27 = v4->numyMCUs;
    if ( v27 <= 0 )
    {
      v39 = &(*a4)[257 * v56];
    }
    else
    {
      v28 = 2 * v13;
      v53 = v55[2];
      v54 <<= 7;
      v58 = &(*a4)[257 * v56];
      v29 = v57;
      v30 = v53;
      v52 = (struct _SCAN *)v12;
      v50 = 2 * v11;
      do
      {
        v31 = 0;
        if ( v30 > 0 )
        {
          v32 = 0;
          v59 = (_DWORD)v29 * v28;
          v33 = (int)v52;
          v57 = v29;
          v51 = v28;
          while ( (signed int)v32 + (signed int)v57 * 8 * v30 < v4->JPGHeight )
          {
            if ( v33 > 0 )
            {
              v56 = v55[1];
              v34 = 0;
              v61 = 0;
              v48 = v32;
              v60 = v31;
              v35 = v56;
              do
              {
                v36 = (__int16 *)((char *)v4->coef_buffer + v59 + v34 + v54 + v60 * (v30 << 7));
                v37 = 0;
                if ( v35 > 0 )
                {
                  v38 = 0;
                  v49 = (struct _JPEG_PROPERTIES *)v34;
                  while ( v38 + v61 * 8 * v35 < a1->JPGWidth )
                  {
                    if ( a3->approx_high )
                      Gather_Prog_AC_refine(a2, v36, a3->start_spec, a3->end_spec, a3->approx_low, &v41, &v42, v58);
                    else
                      Gather_Prog_AC_first(a2, v36, a3->start_spec, a3->end_spec, a3->approx_low, v58);
                    v36 += 64;
                    v38 += 8;
                    ++v37;
                    v35 = a3->comps->hsampling;
                    v55 = &a3->comps->comp;
                    if ( v37 >= v35 )
                    {
                      v34 = (int)v49;
                      v4 = a1;
                      v33 = a1->numxMCUs;
                      v30 = v55[2];
                      goto LABEL_45;
                    }
                  }
                  v34 = (int)v49;
                  v4 = a1;
                  v33 = a1->numxMCUs;
                  v30 = v55[2];
                }
LABEL_45:
                v34 += v50;
                ++v61;
              }
              while ( v61 < v33 );
              v32 = v48;
              v31 = v60;
            }
            v32 += 2;
            if ( ++v31 >= v30 )
            {
              v52 = (struct _SCAN *)v33;
              v29 = v57;
              v28 = v51;
              v27 = v4->numyMCUs;
              goto LABEL_49;
            }
          }
          v52 = (struct _SCAN *)v33;
          v29 = v57;
          v28 = v51;
          v27 = v4->numyMCUs;
        }
LABEL_49:
        v29 = (__int16 *)((char *)v29 + 1);
      }
      while ( (signed int)v29 < v27 );
      v39 = v58;
    }
    Gather_EOBRUN(a2, v39);
    v42 = 0;
  }
  else
  {
    v14 = 0;
    v15 = a1->numyMCUs;
    if ( v15 > 0 )
    {
      v13 *= 2;
      v50 = 2 * v11;
      v51 = v13;
      do
      {
        v16 = 0;
        if ( v12 > 0 )
        {
          v13 = a3->ncomps;
          v17 = 0;
          v54 = (_DWORD)v14 * v51;
          v55 = v14;
          do
          {
            v18 = 0;
            if ( v13 > 0 )
            {
              v19 = a3;
              v57 = (__int16 *)((char *)v4->coef_buffer + v54 + v17);
              v53 = v17;
              v56 = v16;
              do
              {
                v20 = 0;
                if ( *(&v43 + v18) > 0 )
                {
                  v49 = (struct _JPEG_PROPERTIES *)((char *)v4 + v18);
                  v21 = v57;
                  v48 = v19->dc_diff;
                  v52 = v19;
                  do
                  {
                    Gather_Prog_DC_SA(&(*a4)[257 * v49->HuffIdentifierDC[0]], v48, v21, a3->approx_high, a3->approx_low);
                    v21 += 64;
                    ++v20;
                  }
                  while ( v20 < *(&v43 + v18) );
                  v57 = v21;
                  v19 = v52;
                  v4 = a1;
                  v13 = a3->ncomps;
                }
                v19 = (struct _SCAN *)((char *)v19 + 4);
                ++v18;
              }
              while ( v18 < v13 );
              v17 = v53;
              v16 = v56;
              v12 = v4->numxMCUs;
            }
            v17 += v50;
            ++v16;
          }
          while ( v16 < v12 );
          v14 = v55;
          v15 = v4->numyMCUs;
        }
        v14 = (int *)((char *)v14 + 1);
      }
      while ( (signed int)v14 < v15 );
    }
  }
  v47[6](v12, v13);
  return 0;
}

//----- (007929A0) --------------------------------------------------------
int __cdecl Encode_Scan_P(struct _JPEG_PROPERTIES *a1, struct _STATE *a2, struct _SCAN *a3)
{
  struct _JPEG_PROPERTIES *v3; // ecx@1
  struct _STATE *v4; // ebx@1
  int v5; // ebp@1
  int v6; // esi@1
  int v7; // edx@1
  int v8; // eax@2
  int *v9; // ebx@2
  int v10; // ecx@3
  int v11; // esi@5
  int v12; // edx@5
  int v13; // ebp@5
  int v14; // eax@6
  int v15; // ebx@7
  int v16; // eax@9
  int v17; // edx@12
  int v18; // eax@12
  int *v19; // ebp@12
  int v20; // edi@13
  int v21; // eax@14
  int v22; // esi@14
  int v23; // ebx@15
  __int16 *v24; // ebp@15
  struct _SCAN *v25; // edx@16
  int v26; // esi@17
  _SCAN_COMPONENT *v27; // eax@27
  signed int v28; // eax@27
  int v29; // edx@27
  int v30; // ecx@29
  int v31; // ecx@32
  int *v32; // edx@32
  int v33; // eax@35
  int v34; // ebp@36
  int *v35; // ebx@36
  int v36; // edx@36
  int v37; // esi@37
  int *v38; // eax@38
  _SCAN_COMPONENT *v39; // edi@38
  int v40; // ebx@40
  int v41; // eax@41
  __int16 *v42; // esi@42
  int v43; // ebp@43
  bool v44; // sf@50
  unsigned __int8 v45; // of@50
  char *v46; // edx@58
  int v47; // eax@65
  char *v48; // eax@66
  signed int v49; // eax@67
  unsigned __int8 v51; // [sp+20h] [bp-44Ch]@47
  int v52; // [sp+408h] [bp-64h]@1
  int v53; // [sp+40Ch] [bp-60h]@3
  int v54; // [sp+410h] [bp-5Ch]@30
  int v55; // [sp+414h] [bp-58h]@30
  int v56; // [sp+418h] [bp-54h]@30
  unsigned int NumberOfBytesWritten; // [sp+41Ch] [bp-50h]@30
  int v58; // [sp+420h] [bp-4Ch]@6
  int v59; // [sp+424h] [bp-48h]@6
  int *v60; // [sp+428h] [bp-44h]@2
  int v61; // [sp+42Ch] [bp-40h]@11
  int v62; // [sp+430h] [bp-3Ch]@29
  _SCAN_COMPONENT *v63; // [sp+434h] [bp-38h]@27
  int v64; // [sp+438h] [bp-34h]@40
  struct _SCAN *v65; // [sp+43Ch] [bp-30h]@18
  int v66; // [sp+440h] [bp-2Ch]@18
  int *v67; // [sp+444h] [bp-28h]@18
  int v68; // [sp+448h] [bp-24h]@16
  int v69; // [sp+44Ch] [bp-20h]@14
  int v70; // [sp+450h] [bp-1Ch]@16
  void (**v71)(void); // [sp+454h] [bp-18h]@1
  int v72; // [sp+458h] [bp-14h]@1

  v3 = a1;
  v4 = a2;
  v72 = 0;
  v5 = 0;
  v71 = (void (**)(void))a2->ctx;
  v6 = 0;
  v7 = a1->jframe.ncomps;
  v52 = 0;
  if ( v7 > 0 )
  {
    v60 = &a1->jframe.comps->ident;
    v8 = 0;
    v9 = v60;
    do
    {
      v10 = v9[v8 + 1] * v9[v8 + 2];
      *(&v53 + v5) = v10;
      v6 += v10;
      v8 += 4;
      ++v5;
    }
    while ( v5 < v7 );
    v4 = a2;
    v3 = a1;
  }
  v11 = v6 << 6;
  v12 = 0;
  v13 = v3->numxMCUs * v11;
  if ( a3->ncomps > 0 )
  {
    v14 = 0;
    v58 = v11;
    v59 = v13;
    do
    {
      v15 = a3->comps[v14].comp;
      a3->dc_diff[v12++] = 0;
      a3->comps[v14].dc_table = v3->jEncFmtDcHuffman[v3->HuffIdentifierDC[v15]];
      a3->comps[v14].ac_table = v3->jEncFmtAcHuffman[v3->HuffIdentifierAC[v15]];
      ++v14;
    }
    while ( v12 < a3->ncomps );
    v11 = v58;
    v13 = v59;
    v4 = a2;
  }
  v16 = 8;
  v4->bitbuf_bits_valid = 8;
  if ( a3->start_spec || a3->end_spec )
  {
    v27 = a3->comps;
    v63 = v27;
    v28 = v27->comp;
    v60 = 0;
    v29 = 0;
    v61 = 0;
    if ( v28 > 0 )
    {
      if ( v28 >= 6 )
      {
        v30 = (int)v60;
        v62 = v28 - 6;
        v29 = v61;
        do
        {
          v29 += *(&NumberOfBytesWritten + v30) + *(&v56 + v30) + *(&v55 + v30) + *(&v54 + v30) + *(&v53 + v30);
          v30 += 5;
        }
        while ( v30 <= v28 - 6 );
        v61 = v29;
        v4 = a2;
        v60 = (int *)v30;
      }
      v31 = v29;
      v32 = v60;
      do
      {
        v31 += *(&v53 + (_DWORD)v32);
        v32 = (int *)((char *)v32 + 1);
      }
      while ( (signed int)v32 < v28 );
      v61 = v31;
      v3 = a1;
    }
    v60 = 0;
    v33 = v3->numyMCUs;
    if ( v33 > 0 )
    {
      v34 = 2 * v13;
      v62 = v63->vsampling;
      v35 = v60;
      v61 <<= 7;
      v36 = v62;
      v58 = 2 * v11;
      do
      {
        v37 = 0;
        if ( v36 > 0 )
        {
          v38 = 0;
          v68 = (_DWORD)v35 * v34;
          v39 = v63;
          v60 = v35;
          v59 = v34;
          while ( (signed int)v38 + (signed int)v60 * 8 * v36 < v3->JPGHeight )
          {
            v64 = 0;
            v40 = v3->numxMCUs;
            if ( v40 > 0 )
            {
              v66 = v39->hsampling;
              v65 = (struct _SCAN *)(v64 * v58);
              v67 = v38;
              v41 = v66;
              v69 = v37;
              do
              {
                v42 = (__int16 *)((char *)v65 + (unsigned int)v3->coef_buffer + v68 + v61 + v69 * (v36 << 7));
                v70 = 0;
                if ( v41 > 0 )
                {
                  v43 = 0;
                  while ( v43 + v64 * 8 * v41 < a1->JPGWidth )
                  {
                    if ( a3->approx_high )
                      Encode_Prog_AC_refine(
                        a2,
                        v39->ac_table,
                        v42,
                        a3->start_spec,
                        a3->end_spec,
                        a3->approx_low,
                        &v51,
                        &v52);
                    else
                      Encode_Prog_AC_first(a2, v39->ac_table, v42, a3->start_spec, a3->end_spec, a3->approx_low);
                    v42 += 64;
                    v43 += 8;
                    v39 = a3->comps;
                    v41 = v39->hsampling;
                    if ( ++v70 >= v41 )
                    {
                      v3 = a1;
                      v40 = a1->numxMCUs;
                      v36 = v39->vsampling;
                      goto LABEL_50;
                    }
                  }
                  v3 = a1;
                  v40 = a1->numxMCUs;
                  v36 = v39->vsampling;
                }
LABEL_50:
                v45 = __OFSUB__(v64 + 1, v40);
                v44 = v64 + 1 - v40 < 0;
                v65 = (struct _SCAN *)((char *)v65 + v58);
                ++v64;
              }
              while ( v44 ^ v45 );
              v38 = v67;
              v37 = v69;
            }
            v38 += 2;
            if ( ++v37 >= v36 )
            {
              v63 = v39;
              v35 = v60;
              v34 = v59;
              v33 = v3->numyMCUs;
              goto LABEL_54;
            }
          }
          v63 = v39;
          v35 = v60;
          v34 = v59;
          v33 = v3->numyMCUs;
        }
LABEL_54:
        v35 = (int *)((char *)v35 + 1);
      }
      while ( (signed int)v35 < v33 );
      v4 = a2;
    }
    Encode_EOBRUN(v4, v63->ac_table);
    Append_BE_bits(v4, &v51, &v52);
    v52 = 0;
    v16 = v4->bitbuf_bits_valid;
  }
  else
  {
    v60 = 0;
    v61 = v3->numyMCUs;
    if ( v61 > 0 )
    {
      v17 = v3->numxMCUs;
      v58 = 2 * v11;
      v18 = v61;
      v59 = 2 * v13;
      v19 = v60;
      do
      {
        v20 = 0;
        if ( v17 > 0 )
        {
          v21 = a3->ncomps;
          v22 = 0;
          v69 = (_DWORD)v19 * v59;
          v60 = v19;
          do
          {
            v23 = 0;
            v24 = (__int16 *)((char *)v3->coef_buffer + v69 + v22);
            if ( v21 > 0 )
            {
              v25 = a3;
              v68 = v22;
              v70 = v20;
              do
              {
                v26 = 0;
                if ( *(&v53 + v23) > 0 )
                {
                  v66 = 24 * v23;
                  v67 = v25->dc_diff;
                  v65 = v25;
                  do
                  {
                    Encode_Prog_DC_SA(
                      a2,
                      *(_HUFFMAN_TABLE **)((char *)&a3->comps->dc_table + v66),
                      v67,
                      v24,
                      a3->approx_high,
                      a3->approx_low);
                    v24 += 64;
                    ++v26;
                  }
                  while ( v26 < *(&v53 + v23) );
                  v25 = v65;
                  v21 = a3->ncomps;
                }
                v25 = (struct _SCAN *)((char *)v25 + 4);
                ++v23;
              }
              while ( v23 < v21 );
              v22 = v68;
              v20 = v70;
              v3 = a1;
              v17 = a1->numxMCUs;
            }
            v22 += v58;
            ++v20;
          }
          while ( v20 < v17 );
          v19 = v60;
          v18 = v3->numyMCUs;
        }
        v19 = (int *)((char *)v19 + 1);
      }
      while ( (signed int)v19 < v18 );
      v4 = a2;
      v16 = a2->bitbuf_bits_valid;
    }
  }
  if ( v16 < 8 )
  {
    v46 = v4->cur_entropy_ptr;
    if ( v46 >= v4->end_entropy_ptr )
    {
      if ( !v4->file )
      {
        v72 = -28;
        goto LABEL_70;
      }
      if ( !ownWriteFile(v4->file, v4->JPGBuffer, 0x1000u, &NumberOfBytesWritten) || NumberOfBytesWritten != 4096 )
      {
        v72 = -23;
        goto LABEL_70;
      }
      v46 = v4->start_entropy_ptr;
    }
    v47 = LOBYTE(v4->bit_buffer_64);
    v4->cur_entropy_ptr = v46 + 1;
    *v46 = v47;
    ++v4->entropy_bytes_processed;
    if ( v47 == 255 )
    {
      v48 = v4->cur_entropy_ptr;
      v4->cur_entropy_ptr = v48 + 1;
      *v48 = 0;
      ++v4->entropy_bytes_processed;
    }
    v49 = v4->processor_type;
    LODWORD(v4->bit_buffer_64) = 0;
    HIDWORD(v4->bit_buffer_64) = 0;
    if ( v49 <= 2 )
      v4->bitbuf_bits_valid = 8;
    else
      v4->bitbuf_bits_valid = 0;
  }
LABEL_70:
  v71[6]();
  return v72;
}

//----- (007930F0) --------------------------------------------------------
signed int __cdecl Encode_Scan_WRst(struct _JPEG_PROPERTIES *a1, struct _STATE *a2, struct _SCAN *a3)
{
  struct _JPEG_PROPERTIES *v3; // ebx@1
  struct _SCAN *v4; // ebp@1
  signed int v5; // esi@1
  void (**v6)(void); // ecx@1
  int v7; // eax@1
  int v8; // edi@2
  int v9; // edx@2
  int v10; // ecx@2
  int v11; // ebp@5
  __int16 *v12; // ebp@5
  int v13; // edi@7
  int v14; // edx@7
  int v15; // eax@8
  int v16; // eax@8
  int i; // ecx@10
  char *v18; // esi@11
  _RAW_DATA_TYPES_STATE *v19; // eax@11
  int v20; // edx@12
  _SCAN_COMPONENT *v21; // edi@13
  int v22; // eax@14
  int v23; // ebx@14
  _RAW_DATA_TYPES_STATE *v24; // esi@15
  int v25; // edx@15
  int v26; // ecx@16
  int v27; // eax@17
  int v28; // ebp@19
  signed int v29; // ebx@19
  int v30; // esi@19
  int v31; // edx@28
  char *v32; // edi@34
  int v33; // ebx@34
  int v34; // esi@34
  int v35; // ebp@34
  int v36; // edi@37
  int v37; // eax@38
  int v38; // ebx@39
  int v39; // ebp@40
  _RAW_DATA_TYPES_STATE *v40; // eax@41
  int v41; // eax@44
  unsigned int v42; // edi@49
  unsigned int v43; // esi@49
  int v44; // eax@52
  int v45; // eax@53
  int v46; // edx@56
  int v48; // eax@64
  int v49; // edi@64
  int v50; // et2@64
  int v51[4]; // [sp+18h] [bp-A4h]@5
  int v52[4]; // [sp+28h] [bp-94h]@5
  int v53[4]; // [sp+38h] [bp-84h]@5
  int v54[4]; // [sp+48h] [bp-74h]@5
  int v55; // [sp+58h] [bp-64h]@9
  int v56; // [sp+5Ch] [bp-60h]@8
  int v57; // [sp+60h] [bp-5Ch]@2
  void (**v58)(void); // [sp+64h] [bp-58h]@2
  unsigned int v59; // [sp+68h] [bp-54h]@15
  char *v60; // [sp+6Ch] [bp-50h]@13
  unsigned int v61; // [sp+70h] [bp-4Ch]@15
  int v62; // [sp+74h] [bp-48h]@15
  int v63; // [sp+78h] [bp-44h]@15
  int v64; // [sp+7Ch] [bp-40h]@13
  int v65; // [sp+80h] [bp-3Ch]@1
  int v66; // [sp+84h] [bp-38h]@17
  int v67; // [sp+88h] [bp-34h]@17
  int v68; // [sp+8Ch] [bp-30h]@1
  _RAW_DATA_TYPES_STATE *v69; // [sp+90h] [bp-2Ch]@13
  int v70; // [sp+94h] [bp-28h]@15
  _SCAN_COMPONENT *v71; // [sp+98h] [bp-24h]@13
  int v72; // [sp+9Ch] [bp-20h]@10
  int v73; // [sp+A0h] [bp-1Ch]@10
  int v74; // [sp+A4h] [bp-18h]@10
  int v75; // [sp+A8h] [bp-14h]@10

  v3 = a1;
  v4 = a3;
  v65 = 0;
  v5 = 0;
  v6 = (void (**)(void))a2->ctx;
  v7 = 0;
  v68 = a3->ncomps;
  if ( v68 > 0 )
  {
    v8 = 0;
    v9 = 0;
    v57 = 0;
    v58 = v6;
    v10 = v65;
    do
    {
      if ( !a1->jscan )
      {
        a3->dc_diff[v7] = 0;
        v68 = a3->ncomps;
      }
      v11 = a3->comps[v8].hsampling * a3->comps[v8].vsampling;
      v10 += v11;
      ++v8;
      v51[v7] = v11;
      v52[v7] = (int)&a1->jEncFmtDcHuffman[a1->HuffIdentifierDC[v7]]->huff_class;
      v53[v7] = (int)&a1->jEncFmtAcHuffman[a1->HuffIdentifierAC[v7]]->huff_class;
      v12 = a1->jEncFmtQuant[a1->jframe.comps[v9].quant_sel];
      ++v9;
      v54[v7++] = (int)v12;
    }
    while ( v7 < v68 );
    v65 = v10;
    v5 = v57;
    v6 = v58;
    v4 = a3;
  }
  v13 = v4->curyMCU;
  v14 = a1->numyMCUs;
  if ( v13 < v14 )
  {
    v15 = a1->numxMCUs;
    v57 = v5;
    v56 = v15;
    v16 = v65;
    v58 = v6;
    while ( 1 )
    {
      v55 = v4->curxMCU;
      if ( v55 < v56 )
        break;
LABEL_58:
      if ( ++v13 >= v14 )
      {
        v5 = v57;
        v6 = v58;
        goto LABEL_60;
      }
    }
    v75 = v13 << 7;
    v74 = (v16 << 6) - 1;
    v73 = v16 << 6;
    i = v68;
    v72 = v13;
    while ( 1 )
    {
      v18 = v3->MCUBuf;
      v19 = v3->raw_coefs;
      if ( v19 )
      {
        v20 = 0;
        if ( i > 0 )
        {
          v71 = v4->comps;
          v60 = v18;
          v69 = v19;
          v64 = 16 * v55;
          v21 = v71;
          do
          {
            v22 = 0;
            v23 = v21[v20].vsampling;
            if ( v23 > 0 )
            {
              v70 = v21[v20].hsampling;
              v61 = 16 * v20;
              v24 = v69;
              v62 = 2 * v20;
              v59 = 24 * v20;
              v63 = v20;
              v25 = v70;
              do
              {
                v26 = 0;
                if ( v25 > 0 )
                {
                  v67 = v22 << 7;
                  v66 = v22;
                  v27 = v56;
                  while ( 1 )
                  {
                    v28 = (int)&v24->raw_ptrs[2 * v62 / 4u][8 * v26]
                        + v64 * a1->jframe.comps[v61 / 0x10].hsampling
                        + v25 * v75 * v27 * v23
                        + v67 * v27 * v25;
                    v29 = 0;
                    v30 = (int)v60;
                    v68 = v26;
                    do
                    {
                      (*(void (__cdecl **)(int, int, signed int))&NULLSTR[5720])(v30, v28, 16);
                      v27 = a1->numxMCUs;
                      v21 = a3->comps;
                      v25 = v21[v59 / 0x18].hsampling;
                      v28 += v25 * 16 * a1->numxMCUs;
                      v30 += 16;
                      ++v29;
                    }
                    while ( v29 < 8 );
                    v60 = (char *)v30;
                    v26 = v68 + 1;
                    if ( v68 + 1 >= v25 )
                      break;
                    v24 = a1->raw_coefs;
                    v23 = v21[v59 / 0x18].vsampling;
                  }
                  v56 = v27;
                  v22 = v66;
                  v24 = a1->raw_coefs;
                  v23 = v21[v59 / 0x18].vsampling;
                }
                ++v22;
              }
              while ( v22 < v23 );
              v69 = v24;
              v20 = v63;
              i = a3->ncomps;
            }
            ++v20;
          }
          while ( v20 < i );
          v19 = v69;
          v4 = a3;
          v3 = a1;
          v18 = a1->MCUBuf;
        }
        if ( v19->data_type )
        {
          v31 = v74;
          if ( v73 )
          {
            do
            {
              *(_WORD *)v18 -= 128;
              v18 += 2;
              --v31;
            }
            while ( v31 != -1 );
            v18 = v3->MCUBuf;
            v19 = v3->raw_coefs;
          }
        }
      }
      else
      {
        ((void (__cdecl *)(struct _JPEG_PROPERTIES *, int, int))v58[24])(v3, v55, v72);
        v19 = v3->raw_coefs;
      }
      if ( (!v19 || v19->data_type) && v65 > 0 )
      {
        v32 = v18;
        v60 = v18;
        v33 = 0;
        v34 = v65;
        v35 = (int)v58;
        do
        {
          (*(void (__cdecl **)(char *))(v35 + 68))(v32);
          v32 += 128;
          ++v33;
        }
        while ( v33 < v34 );
        v58 = (void (**)(void))v35;
        v18 = v60;
        v4 = a3;
        v3 = a1;
      }
      v36 = 0;
      i = v4->ncomps;
      if ( v4->ncomps > 0 )
        break;
LABEL_49:
      v42 = v4->restart_interv + 1;
      v4->restart_interv = v42;
      v43 = v3->jframe.restart_interv;
      if ( !(v42 % v43) )
      {
        if ( (((unsigned __int8)(v42 / v43) - 1) & 7) == 7 )
          v4->restart_interv = 0;
        v44 = EP_Write_RST(((unsigned __int8)(v42 / v43) - 1) & 7, a2);
        v57 = v44;
        if ( v44 )
        {
          v5 = v44;
          v6 = v58;
          goto LABEL_60;
        }
        v45 = 0;
        for ( i = v4->ncomps; v45 < v4->ncomps; ++v45 )
        {
          v4->dc_diff[v45] = 0;
          i = v4->ncomps;
        }
      }
      if ( v3->interrupt )
      {
        v48 = v55;
        v49 = v72;
        v6 = v58;
        v3->roi.right = v55;
        v3->roi.bottom = v49;
        v50 = (v48 + 1) % v3->numxMCUs;
        v4->curxMCU = v50;
        if ( v50 )
          v4->curyMCU = v49;
        else
          v4->curyMCU = v49 + 1;
        v5 = 1;
        goto LABEL_60;
      }
      v46 = v3->numxMCUs;
      ++v55;
      v56 = v46;
      if ( v55 >= v46 )
      {
        v68 = i;
        v13 = v72;
        v16 = v65;
        v14 = v3->numyMCUs;
        goto LABEL_58;
      }
    }
    v37 = (int)v4;
    while ( 1 )
    {
      v38 = 0;
      if ( v51[v36] > 0 )
        break;
LABEL_47:
      v37 += 4;
      if ( ++v36 >= i )
      {
        v3 = a1;
        goto LABEL_49;
      }
    }
    v39 = (int)v58;
    v69 = (_RAW_DATA_TYPES_STATE *)(v37 + 36);
    v70 = v37;
    while ( 1 )
    {
      v40 = a1->raw_coefs;
      if ( !v40 || v40->data_type )
        (*(void (__cdecl **)(char *, int))(v39 + 260))(v18, v54[v36]);
      v41 = (*(int (__cdecl **)(struct _STATE *, int, int, int, char *))(v39 + 240))(
              a2,
              v52[v36],
              v53[v36],
              (int)v69,
              v18);
      if ( v41 )
        break;
      v18 += 128;
      if ( ++v38 >= v51[v36] )
      {
        v57 = 0;
        v37 = v70;
        v58 = (void (**)(void))v39;
        v4 = a3;
        i = a3->ncomps;
        goto LABEL_47;
      }
    }
    v5 = v41;
    v6 = (void (**)(void))v39;
  }
LABEL_60:
  v6[6]();
  return v5;
}
// B60728: using guessed type int (__cdecl *)(_DWORD, _DWORD, _DWORD);
// 7930F0: using guessed type int var_A4[4];
// 7930F0: using guessed type int var_94[4];
// 7930F0: using guessed type int var_84[4];
// 7930F0: using guessed type int var_74[4];

//----- (007936F0) --------------------------------------------------------
int __cdecl own_fqnt8x8_aan_m5(int a1, int a2)
{
  __m64 v2; // mm4@1
  __m64 v3; // mm5@1
  __m64 v4; // mm6@1
  __m64 v5; // mm7@1
  __int64 v6; // rt1@1
  __m64 v7; // mm1@1
  __m64 v8; // mm3@1
  __m64 v9; // mm2@1
  __m64 v10; // mm0@1
  __int64 v11; // rt1@1
  __m64 v12; // mm1@1
  __m64 v13; // mm2@1
  __m64 v14; // mm3@1
  __m64 v15; // mm0@1
  __int64 v16; // rt1@1
  __m64 v17; // mm1@1
  __m64 v18; // mm2@1
  __m64 v19; // mm3@1
  __m64 v20; // mm0@1
  __m64 v21; // rt1@1
  __m64 v22; // mm1@1
  __m64 v23; // mm2@1
  __m64 v24; // mm3@1
  __m64 v25; // mm0@1
  __m64 v26; // mm1@1
  __m64 v27; // mm2@1
  __m64 v28; // mm3@1
  __m64 v29; // mm0@1
  __m64 v30; // mm1@1
  __m64 v31; // mm2@1
  __m64 v32; // mm3@1
  __m64 v33; // mm0@1
  __m64 v34; // mm1@1
  __m64 v35; // mm2@1
  __m64 v36; // mm3@1
  __m64 v37; // mm2@1
  int v39; // [sp+4h] [bp-4h]@0

  v2.m64_u64 = qword_A78FA0;
  v3.m64_u64 = qword_A78FA8;
  v4.m64_u64 = qword_A78FB0;
  v5.m64_u64 = qword_A78FB8;
  v6 = *(_QWORD *)(a1 + 96);
  v7 = *(__m64 *)(a2 + 104);
  v8 = *(__m64 *)(a2 + 96);
  v9 = _m_psraw(
         _m_paddw(
           _m_pmulhw(
             _m_psllw(
               _m_paddw(
                 _m_psubusw(
                   _m_paddusw(_m_paddw(*(__m64 *)(a1 + 112), (__m64)qword_A78FA0), (__m64)qword_A78FA8),
                   (__m64)qword_A78FB0),
                 (__m64)qword_A78FB8),
               2u),
             *(__m64 *)(a2 + 112)),
           (__m64)qword_A78FC0),
         1u);
  *(__m64 *)(a1 + 120) = _m_psraw(
                           _m_paddw(
                             _m_pmulhw(
                               _m_psllw(
                                 _m_paddw(
                                   _m_psubusw(
                                     _m_paddusw(
                                       _m_paddw(*(__m64 *)(a1 + 120), (__m64)qword_A78FA0),
                                       (__m64)qword_A78FA8),
                                     (__m64)qword_A78FB0),
                                   (__m64)qword_A78FB8),
                                 2u),
                               *(__m64 *)(a2 + 120)),
                             (__m64)qword_A78FC0),
                           1u);
  *(__m64 *)(a1 + 112) = v9;
  v10 = _m_pmulhw(_m_psllw(_m_paddw(_m_psubusw(_m_paddusw(_m_paddw(*(__m64 *)(a1 + 104), v2), v3), v4), v5), 2u), v7);
  v11 = *(_QWORD *)(a1 + 64);
  v12 = *(__m64 *)(a2 + 88);
  v13 = _m_paddw(
          _m_pmulhw(_m_psllw(_m_paddw(_m_psubusw(_m_paddusw(_m_paddw(*(__m64 *)(a1 + 96), v2), v3), v4), v5), 2u), v8),
          (__m64)qword_A78FC0);
  v14 = *(__m64 *)(a2 + 80);
  *(__m64 *)(a1 + 104) = _m_psraw(_m_paddw(v10, (__m64)qword_A78FC0), 1u);
  *(__m64 *)(a1 + 96) = _m_psraw(v13, 1u);
  v15 = _m_pmulhw(_m_psllw(_m_paddw(_m_psubusw(_m_paddusw(_m_paddw(*(__m64 *)(a1 + 88), v2), v3), v4), v5), 2u), v12);
  v16 = *(_QWORD *)(a1 + 32);
  v17 = *(__m64 *)(a2 + 72);
  v18 = _m_paddw(
          _m_pmulhw(_m_psllw(_m_paddw(_m_psubusw(_m_paddusw(_m_paddw(*(__m64 *)(a1 + 80), v2), v3), v4), v5), 2u), v14),
          (__m64)qword_A78FC0);
  v19 = *(__m64 *)(a2 + 64);
  *(__m64 *)(a1 + 88) = _m_psraw(_m_paddw(v15, (__m64)qword_A78FC0), 1u);
  *(__m64 *)(a1 + 80) = _m_psraw(v18, 1u);
  v20 = _m_pmulhw(_m_psllw(_m_paddw(_m_psubusw(_m_paddusw(_m_paddw(*(__m64 *)(a1 + 72), v2), v3), v4), v5), 2u), v17);
  v21 = *(__m64 *)a1;
  v22 = *(__m64 *)(a2 + 56);
  v23 = _m_paddw(
          _m_pmulhw(_m_psllw(_m_paddw(_m_psubusw(_m_paddusw(_m_paddw(*(__m64 *)(a1 + 64), v2), v3), v4), v5), 2u), v19),
          (__m64)qword_A78FC0);
  v24 = *(__m64 *)(a2 + 48);
  *(__m64 *)(a1 + 72) = _m_psraw(_m_paddw(v20, (__m64)qword_A78FC0), 1u);
  *(__m64 *)(a1 + 64) = _m_psraw(v23, 1u);
  v25 = _m_pmulhw(_m_psllw(_m_paddw(_m_psubusw(_m_paddusw(_m_paddw(*(__m64 *)(a1 + 56), v2), v3), v4), v5), 2u), v22);
  v26 = *(__m64 *)(a2 + 40);
  v27 = _m_paddw(
          _m_pmulhw(_m_psllw(_m_paddw(_m_psubusw(_m_paddusw(_m_paddw(*(__m64 *)(a1 + 48), v2), v3), v4), v5), 2u), v24),
          (__m64)qword_A78FC0);
  v28 = *(__m64 *)(a2 + 32);
  *(__m64 *)(a1 + 56) = _m_psraw(_m_paddw(v25, (__m64)qword_A78FC0), 1u);
  *(__m64 *)(a1 + 48) = _m_psraw(v27, 1u);
  v29 = _m_pmulhw(_m_psllw(_m_paddw(_m_psubusw(_m_paddusw(_m_paddw(*(__m64 *)(a1 + 40), v2), v3), v4), v5), 2u), v26);
  v30 = *(__m64 *)(a2 + 24);
  v31 = _m_paddw(
          _m_pmulhw(_m_psllw(_m_paddw(_m_psubusw(_m_paddusw(_m_paddw(*(__m64 *)(a1 + 32), v2), v3), v4), v5), 2u), v28),
          (__m64)qword_A78FC0);
  v32 = *(__m64 *)(a2 + 16);
  *(__m64 *)(a1 + 40) = _m_psraw(_m_paddw(v29, (__m64)qword_A78FC0), 1u);
  *(__m64 *)(a1 + 32) = _m_psraw(v31, 1u);
  v33 = _m_pmulhw(_m_psllw(_m_paddw(_m_psubusw(_m_paddusw(_m_paddw(*(__m64 *)(a1 + 24), v2), v3), v4), v5), 2u), v30);
  v34 = *(__m64 *)(a2 + 8);
  v35 = _m_paddw(
          _m_pmulhw(_m_psllw(_m_paddw(_m_psubusw(_m_paddusw(_m_paddw(*(__m64 *)(a1 + 16), v2), v3), v4), v5), 2u), v32),
          (__m64)qword_A78FC0);
  v36 = *(__m64 *)a2;
  *(__m64 *)(a1 + 24) = _m_psraw(_m_paddw(v33, (__m64)qword_A78FC0), 1u);
  *(__m64 *)(a1 + 16) = _m_psraw(v35, 1u);
  v37 = _m_psraw(
          _m_paddw(
            _m_pmulhw(_m_psllw(_m_paddw(_m_psubusw(_m_paddusw(_m_paddw(*(__m64 *)a1, v2), v3), v4), v5), 2u), v36),
            (__m64)qword_A78FC0),
          1u);
  *(__m64 *)(a1 + 8) = _m_psraw(
                         _m_paddw(
                           _m_pmulhw(
                             _m_psllw(
                               _m_paddw(_m_psubusw(_m_paddusw(_m_paddw(*(__m64 *)(a1 + 8), v2), v3), v4), v5),
                               2u),
                             v34),
                           (__m64)qword_A78FC0),
                         1u);
  *(__m64 *)a1 = v37;
  return v39;
}
// A78FA0: using guessed type __int64 qword_A78FA0;
// A78FA8: using guessed type __int64 qword_A78FA8;
// A78FB0: using guessed type __int64 qword_A78FB0;
// A78FB8: using guessed type __int64 qword_A78FB8;
// A78FC0: using guessed type __int64 qword_A78FC0;

//----- (007939D0) --------------------------------------------------------
int __cdecl own_fdct8x8_aan_m5(int a1)
{
  int v1; // edi@1
  __m64 v2; // mm5@1
  __m64 v3; // mm6@1
  __m64 v4; // mm4@1
  __m64 v5; // mm3@1
  __m64 v6; // mm5@1
  __m64 v7; // mm1@1
  __m64 v8; // mm4@1
  __m64 v9; // mm7@1
  __m64 v10; // mm3@1
  __m64 v11; // mm2@1
  __m64 v12; // mm7@1
  __m64 v13; // mm5@1
  __m64 v14; // mm3@1
  __m64 v15; // mm5@1
  __m64 v16; // mm0@1
  __m64 v17; // mm6@1
  __m64 v18; // mm2@1
  __m64 v19; // mm0@1
  __m64 v20; // mm7@1
  __m64 v21; // mm6@1
  __m64 v22; // mm3@1
  __m64 v23; // mm7@1
  __m64 v24; // mm5@1
  __m64 v25; // mm4@1
  __m64 v26; // mm2@1
  __m64 v27; // mm1@1
  __m64 v28; // mm6@1
  __m64 v29; // mm7@1
  __m64 v30; // mm5@1
  __m64 v31; // mm0@1
  __m64 v32; // mm4@1
  __m64 v33; // mm7@1
  __m64 v34; // mm3@1
  __m64 v35; // mm5@1
  __m64 v36; // mm6@1
  __m64 v37; // mm1@1
  __m64 v38; // mm5@1
  __m64 v39; // mm2@1
  __m64 v40; // mm3@1
  __m64 v41; // mm0@1
  __m64 v42; // mm2@1
  __m64 v43; // mm4@1
  __m64 v44; // mm6@1
  __m64 v45; // mm1@1
  __m64 v46; // mm0@1
  __m64 v47; // mm3@1
  __m64 v48; // mm5@1
  __m64 v49; // mm6@1
  __m64 v50; // mm3@1
  __m64 v51; // mm3@1
  __m64 v52; // mm0@1
  __m64 v53; // mm7@1
  __m64 v54; // mm5@1
  __m64 v55; // mm6@1
  __m64 v56; // mm1@1
  __m64 v57; // mm3@1
  __m64 v58; // mm0@1
  __m64 v59; // mm6@1
  __m64 v60; // mm4@1
  __m64 v61; // mm3@1
  __m64 v62; // mm7@1
  __m64 v63; // mm2@1
  __m64 v64; // mm4@1
  __m64 v65; // mm5@1
  __m64 v66; // mm1@1
  __m64 v67; // mm0@1
  __m64 v68; // mm7@1
  __m64 v69; // mm2@1
  __m64 v70; // mm1@1
  __m64 v71; // mm5@1
  __m64 v72; // mm7@1
  __m64 v73; // mm1@1
  __m64 v74; // mm6@1
  __m64 v75; // mm0@1
  __m64 v76; // mm7@1
  __m64 v77; // mm2@1
  __m64 v78; // mm1@1
  __m64 v79; // mm3@1
  __m64 v80; // mm5@1
  __m64 v81; // mm6@1
  __m64 v82; // mm3@1
  __m64 v83; // mm7@1
  __m64 v84; // mm4@1
  __m64 v85; // mm0@1
  __m64 v86; // mm4@1
  __m64 v87; // mm3@1
  __m64 v88; // mm5@1
  __m64 v89; // mm7@1
  __m64 v90; // mm1@1
  __m64 v91; // mm6@1
  __m64 v92; // mm3@1
  __m64 v93; // mm6@1
  __m64 v94; // mm1@1
  __m64 v95; // mm5@1
  __m64 v96; // mm4@1
  __m64 v97; // mm1@1
  __m64 v98; // mm0@1
  __m64 v99; // mm7@1
  __m64 v100; // mm4@1
  __m64 v101; // mm3@1
  __m64 v102; // mm2@1
  __m64 v103; // mm6@1
  __m64 v104; // mm5@1
  __m64 v105; // mm7@1
  __m64 v106; // mm0@1
  __m64 v107; // mm3@1
  __m64 v108; // mm2@1
  __m64 v109; // mm7@1
  __m64 v110; // mm6@1
  __m64 v111; // mm5@1
  __m64 v112; // mm7@1
  __m64 v113; // mm1@1
  __m64 v114; // mm5@1
  __m64 v115; // mm1@1
  __m64 v116; // mm7@1
  __m64 v117; // mm3@1
  __m64 v118; // mm4@1
  __m64 v119; // mm2@1
  __m64 v120; // mm6@1
  __m64 v121; // mm5@1
  __m64 v122; // mm4@1
  __m64 v123; // mm0@1
  __m64 v124; // mm7@1
  __m64 v125; // mm3@1
  __m64 v126; // mm0@1
  __m64 v127; // mm5@1
  __m64 v128; // mm3@1
  __m64 v129; // mm5@1
  __m64 v130; // mm2@1
  __m64 v131; // mm4@1
  __m64 v132; // mm3@1
  __m64 v133; // mm0@1
  __m64 v134; // mm7@1
  __m64 v135; // mm3@1
  __m64 v136; // mm5@1
  __m64 v137; // mm2@1
  __m64 v138; // mm5@1
  __m64 v139; // mm4@1
  __m64 v140; // mm7@1
  __m64 v141; // mm6@1
  __m64 v142; // mm4@1
  __m64 v143; // mm1@1
  __m64 v144; // mm0@1
  __m64 v145; // mm3@1
  __m64 v146; // mm2@1
  __m64 v147; // mm4@1
  __m64 v148; // mm5@1
  __m64 v149; // mm2@1
  __m64 v150; // mm4@1
  __m64 v151; // mm7@1
  __m64 v152; // mm1@1
  __m64 v153; // mm7@1
  __m64 v154; // mm5@1
  __m64 v155; // mm3@1
  __m64 v156; // mm5@1
  __m64 v157; // mm0@1
  __m64 v158; // mm4@1
  __m64 v159; // mm6@1
  __m64 v160; // mm1@1
  __m64 v161; // mm4@1
  __m64 v162; // mm3@1
  __m64 v163; // mm7@1
  __m64 v164; // mm1@1
  __m64 v165; // mm2@1
  __m64 v166; // mm0@1
  __m64 v167; // mm3@1
  __m64 v168; // mm2@1
  __m64 v169; // mm5@1
  __m64 v170; // mm3@1
  __m64 v171; // mm5@1
  __m64 v172; // mm1@1
  __m64 v173; // mm0@1
  __m64 v174; // mm6@1
  __m64 v175; // mm1@1
  __m64 v176; // mm0@1
  __m64 v177; // mm3@1
  __m64 v178; // mm2@1
  __m64 v179; // mm7@1
  __m64 v180; // mm1@1
  __m64 v181; // mm3@1
  __m64 v182; // mm0@1
  __m64 v183; // mm2@1
  __m64 v184; // mm6@1
  __m64 v185; // mm7@1
  __m64 v186; // mm5@1
  __m64 v187; // mm1@1
  __m64 v188; // mm3@1
  __m64 v189; // mm6@1
  __m64 v190; // mm0@1
  __m64 v191; // mm2@1
  __m64 v192; // mm1@1
  __m64 v193; // mm4@1
  __m64 v194; // mm6@1
  __m64 v195; // mm5@1
  __m64 v196; // mm3@1
  __m64 v197; // mm2@1
  __m64 v198; // mm1@1
  __m64 v199; // mm3@1
  __m64 v200; // mm7@1
  __m64 v201; // mm5@1
  __m64 v202; // mm1@1
  __m64 v203; // mm2@1
  __m64 v204; // mm7@1
  __m64 v205; // mm0@1
  __m64 v206; // mm1@1
  __m64 v207; // mm3@1
  __m64 v208; // mm7@1
  __m64 v209; // mm1@1
  __m64 v210; // mm4@1
  __m64 v211; // mm6@1
  __m64 v212; // mm0@1
  __m64 v213; // mm3@1
  __m64 v214; // mm2@1
  __m64 v215; // mm7@1
  __m64 v216; // mm3@1
  __m64 v217; // mm1@1
  __m64 v218; // mm6@1
  __m64 v219; // mm2@1
  __m64 v220; // mm6@1
  __m64 v221; // mm4@1
  __m64 v222; // mm5@1
  __m64 v223; // mm7@1
  __m64 v224; // mm4@1
  __m64 v225; // mm2@1
  __m64 v226; // mm6@1
  __m64 v227; // mm1@1
  __m64 v228; // mm7@1
  __m64 v229; // mm6@1
  __m64 v230; // mm5@1
  __m64 v231; // mm1@1
  __m64 v232; // mm5@1
  __m64 v233; // mm2@1
  __m64 v234; // mm7@1
  __m64 v235; // mm0@1
  __m64 v236; // mm7@1
  __m64 v237; // mm6@1
  __m64 v238; // mm1@1
  int v240; // [sp+4h] [bp-4h]@0

  v1 = a1;
  v2 = *(__m64 *)(a1 + 72);
  v3 = *(__m64 *)(a1 + 88);
  v4 = v2;
  v5 = *(__m64 *)(a1 + 104);
  v6 = _m_punpcklwd(v2, v3);
  v7 = *(__m64 *)(a1 + 120);
  v8 = _m_punpckhwd(v4, v3);
  v9 = v5;
  v10 = _m_punpcklwd(v5, v7);
  v11 = *(__m64 *)(a1 + 64);
  v12 = _m_punpckhwd(v9, v7);
  *(__m64 *)(a1 + 88) = _m_punpckhdq(v6, v10);
  v13 = _m_punpckldq(v6, v10);
  v14 = *(__m64 *)(a1 + 80);
  *(__m64 *)(a1 + 72) = v13;
  v15 = *(__m64 *)(a1 + 112);
  *(__m64 *)(a1 + 120) = _m_punpckhdq(v8, v12);
  v16 = v11;
  v17 = *(__m64 *)(a1 + 96);
  v18 = _m_punpcklwd(v11, v14);
  *(__m64 *)(a1 + 104) = _m_punpckldq(v8, v12);
  v19 = _m_punpckhwd(v16, v14);
  v20 = v17;
  v21 = _m_punpcklwd(v17, v15);
  v22 = *(__m64 *)(a1 + 8);
  v23 = _m_punpckhwd(v20, v15);
  v24 = *(__m64 *)(a1 + 40);
  *(__m64 *)(a1 + 8) = _m_punpckldq(v18, v21);
  v25 = *(__m64 *)(a1 + 24);
  *(__m64 *)(a1 + 24) = _m_punpckhdq(v18, v21);
  *(__m64 *)(a1 + 40) = _m_punpckldq(v19, v23);
  v26 = *(__m64 *)(a1 + 56);
  *(__m64 *)(a1 + 56) = _m_punpckhdq(v19, v23);
  v27 = _m_punpckhwd(v22, v25);
  v28 = *(__m64 *)a1;
  v29 = v24;
  v30 = _m_punpcklwd(v24, v26);
  v31 = _m_punpcklwd(v22, v25);
  v32 = *(__m64 *)(a1 + 16);
  v33 = _m_punpckhwd(v29, v26);
  *(__m64 *)(a1 + 64) = _m_punpckldq(v31, v30);
  v34 = *(__m64 *)(a1 + 32);
  *(__m64 *)(a1 + 80) = _m_punpckhdq(v31, v30);
  *(__m64 *)(a1 + 112) = _m_punpckhdq(v27, v33);
  v35 = v28;
  *(__m64 *)(a1 + 96) = _m_punpckldq(v27, v33);
  v36 = _m_punpcklwd(v28, v32);
  v37 = *(__m64 *)(a1 + 48);
  v38 = _m_punpckhwd(v35, v32);
  v39 = v34;
  v40 = _m_punpcklwd(v34, v37);
  v41 = v36;
  v42 = _m_punpckhwd(v39, v37);
  v43 = *(__m64 *)(a1 + 112);
  v44 = _m_punpckldq(v36, v40);
  v45 = *(__m64 *)(a1 + 64);
  v46 = _m_punpckhdq(v41, v40);
  *(__m64 *)a1 = v44;
  v47 = v38;
  *(__m64 *)(a1 + 16) = v46;
  v48 = _m_punpckldq(v38, v42);
  v49 = _m_paddw(v44, v43);
  v50 = _m_punpckhdq(v47, v42);
  *(__m64 *)(a1 + 32) = v48;
  *(__m64 *)(a1 + 48) = v50;
  v51 = _m_paddw(v50, v45);
  v52 = _m_paddw(v46, *(__m64 *)(a1 + 96));
  v53 = _m_psubw(v49, v51);
  v54 = _m_paddw(v48, *(__m64 *)(a1 + 80));
  v55 = _m_paddw(v49, v51);
  v56 = _m_paddw(v52, v54);
  v57 = v55;
  v58 = _m_pmulhw(_m_psllw(_m_paddw(_m_psubw(v52, v54), v53), 1u), (__m64)qword_A78F90);
  v59 = _m_paddw(v55, v56);
  v60 = v53;
  v61 = _m_psubw(v57, v56);
  v62 = _m_paddw(v53, v58);
  v63 = _m_psubw(*(__m64 *)(v1 + 32), *(__m64 *)(v1 + 80));
  v64 = _m_psubw(v60, v58);
  v65 = _m_paddw(_m_psubw(*(__m64 *)(v1 + 48), *(__m64 *)(v1 + 64)), v63);
  v66 = _m_psubw(*(__m64 *)(v1 + 16), *(__m64 *)(v1 + 96));
  v67 = _m_psubw(*(__m64 *)v1, *(__m64 *)(v1 + 112));
  *(__m64 *)a1 = v59;
  *(__m64 *)(a1 + 32) = v62;
  v68 = v65;
  v69 = _m_pmulhw(_m_psllw(_m_paddw(v63, v66), 1u), (__m64)qword_A78F90);
  v70 = _m_paddw(v66, v67);
  *(__m64 *)(a1 + 64) = v61;
  v71 = _m_pmulhw(_m_psubw(v65, v70), (__m64)qword_A78F80);
  v72 = _m_pmulhw(_m_psllw(v68, 1u), (__m64)qword_A78F88);
  v73 = _m_pmulhw(_m_psllw(v70, 2u), (__m64)qword_A78F98);
  v74 = _m_psubw(v67, v69);
  *(__m64 *)(a1 + 96) = v64;
  v75 = _m_paddw(v67, v69);
  v76 = _m_paddw(v72, v71);
  v77 = _m_paddw(*(__m64 *)(v1 + 56), *(__m64 *)(v1 + 72));
  v78 = _m_paddw(v73, v71);
  v79 = v74;
  v80 = _m_paddw(*(__m64 *)(v1 + 8), *(__m64 *)(v1 + 120));
  v81 = _m_paddw(v74, v76);
  v82 = _m_psubw(v79, v76);
  v83 = v80;
  *(__m64 *)(a1 + 80) = v81;
  v84 = v75;
  *(__m64 *)(a1 + 48) = v82;
  v85 = _m_paddw(v75, v78);
  v86 = _m_psubw(v84, v78);
  v87 = _m_paddw(*(__m64 *)(v1 + 24), *(__m64 *)(v1 + 104));
  v88 = _m_paddw(v80, v77);
  v89 = _m_psubw(v83, v77);
  v90 = _m_paddw(*(__m64 *)(v1 + 40), *(__m64 *)(v1 + 88));
  v91 = v87;
  v92 = _m_paddw(v87, v90);
  *(__m64 *)(a1 + 16) = v85;
  *(__m64 *)(a1 + 112) = v86;
  v93 = _m_pmulhw(_m_psllw(_m_paddw(_m_psubw(v91, v90), v89), 1u), (__m64)qword_A78F90);
  v94 = v88;
  v95 = _m_paddw(v88, v92);
  v96 = v89;
  v97 = _m_psubw(v94, v92);
  v98 = _m_psubw(*(__m64 *)(v1 + 40), *(__m64 *)(v1 + 88));
  v99 = _m_paddw(v89, v93);
  v100 = _m_psubw(v96, v93);
  v101 = _m_psubw(*(__m64 *)(v1 + 24), *(__m64 *)(v1 + 104));
  v102 = _m_paddw(_m_psubw(*(__m64 *)(v1 + 56), *(__m64 *)(v1 + 72)), v98);
  v103 = _m_psubw(*(__m64 *)(v1 + 8), *(__m64 *)(v1 + 120));
  *(__m64 *)(a1 + 8) = v95;
  v104 = v103;
  *(__m64 *)(a1 + 40) = v99;
  v105 = v102;
  v106 = _m_pmulhw(_m_psllw(_m_paddw(v98, v101), 1u), (__m64)qword_A78F90);
  v107 = _m_paddw(v101, v103);
  *(__m64 *)(a1 + 72) = v97;
  v108 = _m_pmulhw(_m_psubw(v102, v107), (__m64)qword_A78F80);
  v109 = _m_pmulhw(_m_psllw(v105, 1u), (__m64)qword_A78F88);
  v110 = _m_paddw(v103, v106);
  *(__m64 *)(a1 + 104) = v100;
  v111 = _m_psubw(v104, v106);
  v112 = _m_paddw(v109, v108);
  v113 = v111;
  v114 = _m_paddw(v111, v112);
  v115 = _m_psubw(v113, v112);
  v116 = *(__m64 *)(a1 + 64);
  v117 = _m_paddw(_m_pmulhw(_m_psllw(v107, 2u), (__m64)qword_A78F98), v108);
  *(__m64 *)(a1 + 88) = v114;
  v118 = v110;
  v119 = *(__m64 *)(a1 + 112);
  v120 = _m_paddw(v110, v117);
  v121 = *(__m64 *)(a1 + 80);
  v122 = _m_psubw(v118, v117);
  v123 = v116;
  v124 = _m_punpcklwd(v116, v121);
  v125 = *(__m64 *)(a1 + 96);
  v126 = _m_punpckhwd(v123, v121);
  v127 = v125;
  v128 = _m_punpcklwd(v125, v119);
  *(__m64 *)(a1 + 120) = v122;
  v129 = _m_punpckhwd(v127, v119);
  v130 = *(__m64 *)(a1 + 8);
  v131 = _m_punpckhdq(v124, v128);
  *(__m64 *)(a1 + 8) = _m_punpckldq(v124, v128);
  v132 = v126;
  *(__m64 *)(a1 + 24) = v131;
  v133 = _m_punpckldq(v126, v129);
  v134 = *(__m64 *)(a1 + 40);
  v135 = _m_punpckhdq(v132, v129);
  v136 = v130;
  v137 = _m_punpcklwd(v130, v120);
  *(__m64 *)(a1 + 40) = v133;
  v138 = _m_punpckhwd(v136, v120);
  v139 = v134;
  v140 = _m_punpckhwd(v134, v115);
  *(__m64 *)(a1 + 56) = v135;
  v141 = *(__m64 *)(a1 + 88);
  v142 = _m_punpcklwd(v139, v115);
  v143 = *(__m64 *)(a1 + 72);
  v144 = _m_punpckldq(v137, v142);
  v145 = *(__m64 *)(a1 + 104);
  v146 = _m_punpckhdq(v137, v142);
  *(__m64 *)(a1 + 64) = v144;
  v147 = v138;
  *(__m64 *)(a1 + 80) = v146;
  v148 = _m_punpckldq(v138, v140);
  v149 = *(__m64 *)(a1 + 120);
  v150 = _m_punpckhdq(v147, v140);
  v151 = v143;
  v152 = _m_punpcklwd(v143, v141);
  *(__m64 *)(a1 + 96) = v148;
  v153 = _m_punpckhwd(v151, v141);
  v154 = v145;
  v155 = _m_punpcklwd(v145, v149);
  *(__m64 *)(a1 + 112) = v150;
  v156 = _m_punpckhwd(v154, v149);
  v157 = *(__m64 *)a1;
  v158 = v152;
  v159 = *(__m64 *)(a1 + 16);
  v160 = _m_punpckldq(v152, v155);
  v161 = _m_punpckhdq(v158, v155);
  v162 = v153;
  *(__m64 *)(a1 + 72) = v160;
  v163 = _m_punpckldq(v153, v156);
  *(__m64 *)(a1 + 88) = v161;
  v164 = *(__m64 *)(a1 + 48);
  v165 = v157;
  *(__m64 *)(a1 + 120) = _m_punpckhdq(v162, v156);
  v166 = _m_punpcklwd(v157, v159);
  v167 = *(__m64 *)(a1 + 32);
  v168 = _m_punpckhwd(v165, v159);
  v169 = v167;
  v170 = _m_punpcklwd(v167, v164);
  *(__m64 *)(a1 + 104) = v163;
  v171 = _m_punpckhwd(v169, v164);
  v172 = v166;
  v173 = _m_punpckldq(v166, v170);
  v174 = *(__m64 *)(a1 + 64);
  v175 = _m_punpckhdq(v172, v170);
  *(__m64 *)a1 = v173;
  v176 = _m_paddw(v173, *(__m64 *)(a1 + 112));
  v177 = _m_punpckhdq(v168, v171);
  *(__m64 *)(a1 + 16) = v175;
  v178 = _m_punpckldq(v168, v171);
  *(__m64 *)(a1 + 48) = v177;
  v179 = v176;
  v180 = _m_paddw(v175, *(__m64 *)(a1 + 96));
  v181 = _m_paddw(v177, v174);
  *(__m64 *)(a1 + 32) = v178;
  v182 = _m_paddw(v176, v181);
  v183 = _m_paddw(v178, *(__m64 *)(a1 + 80));
  v184 = v180;
  v185 = _m_psubw(v179, v181);
  v186 = *(__m64 *)(a1 + 32);
  v187 = _m_paddw(v180, v183);
  v188 = _m_psubw(v182, v187);
  v189 = _m_psubw(v184, v183);
  v190 = _m_paddw(v182, v187);
  v191 = _m_psubw(*(__m64 *)(v1 + 48), *(__m64 *)(v1 + 64));
  *(__m64 *)(a1 + 64) = v188;
  v192 = *(__m64 *)(a1 + 16);
  v193 = v185;
  v194 = _m_pmulhw(_m_psllw(_m_paddw(v189, v185), 1u), (__m64)qword_A78F90);
  v195 = _m_psubw(v186, *(__m64 *)(a1 + 80));
  v196 = *(__m64 *)a1;
  v197 = _m_paddw(v191, v195);
  *(__m64 *)a1 = v190;
  v198 = _m_psubw(v192, *(__m64 *)(a1 + 96));
  *(__m64 *)(a1 + 32) = _m_paddw(v185, v194);
  v199 = _m_psubw(v196, *(__m64 *)(a1 + 112));
  v200 = v197;
  v201 = _m_pmulhw(_m_psllw(_m_paddw(v195, v198), 1u), (__m64)qword_A78F90);
  v202 = _m_paddw(v198, v199);
  v203 = _m_pmulhw(_m_psubw(v197, v202), (__m64)qword_A78F80);
  v204 = _m_pmulhw(_m_psllw(v200, 1u), (__m64)qword_A78F88);
  v205 = _m_psubw(v199, v201);
  v206 = _m_pmulhw(_m_psllw(v202, 2u), (__m64)qword_A78F98);
  *(__m64 *)(a1 + 96) = _m_psubw(v193, v194);
  v207 = _m_paddw(v199, v201);
  v208 = _m_paddw(v204, v203);
  v209 = _m_paddw(v206, v203);
  *(__m64 *)(a1 + 48) = _m_psubw(v205, v208);
  v210 = _m_psubw(v207, v209);
  v211 = _m_paddw(*(__m64 *)(v1 + 24), *(__m64 *)(v1 + 104));
  *(__m64 *)(a1 + 80) = _m_paddw(v205, v208);
  v212 = _m_paddw(*(__m64 *)(v1 + 8), *(__m64 *)(v1 + 120));
  *(__m64 *)(a1 + 16) = _m_paddw(v207, v209);
  v213 = _m_paddw(*(__m64 *)(v1 + 56), *(__m64 *)(v1 + 72));
  v214 = _m_paddw(*(__m64 *)(v1 + 40), *(__m64 *)(v1 + 88));
  v215 = _m_psubw(v212, v213);
  v216 = _m_paddw(v212, v213);
  v217 = _m_paddw(v211, v214);
  *(__m64 *)(a1 + 112) = v210;
  v218 = _m_paddw(_m_psubw(v211, v214), v215);
  v219 = _m_psubw(*(__m64 *)(v1 + 56), *(__m64 *)(v1 + 72));
  v220 = _m_pmulhw(_m_psllw(v218, 1u), (__m64)qword_A78F90);
  v221 = v215;
  v222 = _m_psubw(*(__m64 *)(v1 + 40), *(__m64 *)(v1 + 88));
  *(__m64 *)(a1 + 72) = _m_psubw(v216, v217);
  v223 = _m_paddw(v215, v220);
  v224 = _m_psubw(v221, v220);
  v225 = _m_paddw(v219, v222);
  v226 = *(__m64 *)(a1 + 8);
  *(__m64 *)(a1 + 8) = _m_paddw(v216, v217);
  v227 = _m_psubw(*(__m64 *)(v1 + 24), *(__m64 *)(v1 + 104));
  *(__m64 *)(a1 + 40) = v223;
  v228 = v225;
  v229 = _m_psubw(v226, *(__m64 *)(a1 + 120));
  v230 = _m_paddw(v222, v227);
  v231 = _m_paddw(v227, v229);
  v232 = _m_pmulhw(_m_psllw(v230, 1u), (__m64)qword_A78F90);
  v233 = _m_pmulhw(_m_psubw(v225, v231), (__m64)qword_A78F80);
  v234 = _m_pmulhw(_m_psllw(v228, 1u), (__m64)qword_A78F88);
  *(__m64 *)(a1 + 104) = v224;
  v235 = _m_psubw(v229, v232);
  v236 = _m_paddw(v234, v233);
  v237 = _m_paddw(v229, v232);
  v238 = _m_paddw(_m_pmulhw(_m_psllw(v231, 2u), (__m64)qword_A78F98), v233);
  *(__m64 *)(a1 + 88) = _m_paddw(v235, v236);
  *(__m64 *)(a1 + 56) = _m_psubw(v235, v236);
  *(__m64 *)(a1 + 24) = _m_paddw(v237, v238);
  *(__m64 *)(a1 + 120) = _m_psubw(v237, v238);
  return v240;
}
// A78F80: using guessed type __int64 qword_A78F80;
// A78F88: using guessed type __int64 qword_A78F88;
// A78F90: using guessed type __int64 qword_A78F90;
// A78F98: using guessed type __int64 qword_A78F98;

//----- (00793F80) --------------------------------------------------------
int __cdecl own_idct8x8_aan_m5(int a1)
{
  __m64 v1; // mm0@1
  __m64 v2; // mm5@1
  __m64 v3; // mm2@1
  __m64 v4; // mm3@1
  __m64 v5; // mm1@1
  __m64 v6; // mm4@1
  __m64 v7; // mm6@1
  __m64 v8; // mm7@1
  __m64 v9; // mm0@1
  __m64 v10; // mm3@1
  __m64 v11; // mm5@1
  __m64 v12; // mm7@1
  __m64 v13; // mm4@1
  __m64 v14; // mm3@1
  __m64 v15; // mm0@1
  __m64 v16; // mm5@1
  __m64 v17; // mm0@1
  __m64 v18; // mm4@1
  __m64 v19; // mm5@1
  __m64 v20; // mm1@1
  __m64 v21; // mm2@1
  __m64 v22; // mm0@1
  __m64 v23; // mm1@1
  __m64 v24; // mm7@1
  __m64 v25; // mm1@1
  __m64 v26; // mm4@1
  __m64 v27; // mm0@1
  __m64 v28; // mm6@1
  __m64 v29; // mm1@1
  __m64 v30; // mm7@1
  __m64 v31; // mm3@1
  __m64 v32; // mm2@1
  __m64 v33; // mm5@1
  __m64 v34; // mm0@1
  __m64 v35; // mm4@1
  __m64 v36; // mm3@1
  __m64 v37; // mm4@1
  __m64 v38; // mm1@1
  __m64 v39; // mm6@1
  __m64 v40; // mm7@1
  __m64 v41; // mm3@1
  __m64 v42; // mm0@1
  __m64 v43; // mm4@1
  __m64 v44; // mm3@1
  __m64 v45; // mm5@1
  __m64 v46; // mm6@1
  __m64 v47; // mm5@1
  __m64 v48; // mm6@1
  __m64 v49; // mm1@1
  __m64 v50; // mm4@1
  __m64 v51; // mm5@1
  __m64 v52; // mm3@1
  __m64 v53; // mm6@1
  __m64 v54; // mm3@1
  __m64 v55; // mm4@1
  __m64 v56; // mm6@1
  __m64 v57; // mm2@1
  __m64 v58; // mm1@1
  __m64 v59; // mm5@1
  __m64 v60; // mm0@1
  __m64 v61; // mm7@1
  __m64 v62; // mm5@1
  __m64 v63; // mm6@1
  __m64 v64; // mm3@1
  __m64 v65; // mm6@1
  __m64 v66; // mm0@1
  __m64 v67; // mm5@1
  __m64 v68; // mm0@1
  __m64 v69; // mm6@1
  __m64 v70; // mm2@1
  __m64 v71; // mm7@1
  __m64 v72; // mm3@1
  __m64 v73; // mm2@1
  __m64 v74; // mm5@1
  __m64 v75; // mm6@1
  __m64 v76; // mm5@1
  __m64 v77; // mm7@1
  __m64 v78; // mm4@1
  __m64 v79; // mm3@1
  __m64 v80; // mm7@1
  __m64 v81; // mm3@1
  __m64 v82; // mm0@1
  __m64 v83; // mm1@1
  __m64 v84; // mm2@1
  __m64 v85; // mm3@1
  __m64 v86; // mm0@1
  __m64 v87; // mm2@1
  __m64 v88; // mm1@1
  __m64 v89; // mm4@1
  __m64 v90; // mm3@1
  __m64 v91; // mm4@1
  __m64 v92; // mm1@1
  __m64 v93; // mm5@1
  __m64 v94; // mm0@1
  __m64 v95; // mm1@1
  __m64 v96; // mm3@1
  __m64 v97; // mm2@1
  __m64 v98; // mm5@1
  __m64 v99; // mm4@1
  __m64 v100; // mm1@1
  __m64 v101; // mm0@1
  __m64 v102; // mm3@1
  __m64 v103; // mm1@1
  __m64 v104; // mm4@1
  __m64 v105; // mm2@1
  __m64 v106; // mm0@1
  __m64 v107; // mm2@1
  __m64 v108; // mm0@1
  __m64 v109; // mm5@1
  __m64 v110; // mm2@1
  __m64 v111; // mm3@1
  __m64 v112; // mm4@1
  __m64 v113; // mm1@1
  __m64 v114; // mm6@1
  __m64 v115; // mm7@1
  __m64 v116; // mm0@1
  __m64 v117; // mm3@1
  __m64 v118; // mm5@1
  __m64 v119; // mm7@1
  __m64 v120; // mm4@1
  __m64 v121; // mm3@1
  __m64 v122; // mm0@1
  __m64 v123; // mm5@1
  __m64 v124; // mm0@1
  __m64 v125; // mm4@1
  __m64 v126; // mm1@1
  __m64 v127; // mm5@1
  __m64 v128; // mm0@1
  __m64 v129; // mm2@1
  __m64 v130; // mm1@1
  __m64 v131; // mm7@1
  __m64 v132; // mm4@1
  __m64 v133; // mm0@1
  __m64 v134; // mm6@1
  __m64 v135; // mm1@1
  __m64 v136; // mm7@1
  __m64 v137; // mm3@1
  __m64 v138; // mm5@1
  __m64 v139; // mm2@1
  __m64 v140; // mm4@1
  __m64 v141; // mm3@1
  __m64 v142; // mm4@1
  __m64 v143; // mm1@1
  __m64 v144; // mm7@1
  __m64 v145; // mm0@1
  __m64 v146; // mm6@1
  __m64 v147; // mm3@1
  __m64 v148; // mm4@1
  __m64 v149; // mm0@1
  __m64 v150; // mm5@1
  __m64 v151; // mm3@1
  __m64 v152; // mm1@1
  __m64 v153; // mm6@1
  __m64 v154; // mm5@1
  __m64 v155; // mm6@1
  __m64 v156; // mm4@1
  __m64 v157; // mm5@1
  __m64 v158; // mm4@1
  __m64 v159; // mm0@1
  __m64 v160; // mm3@1
  __m64 v161; // mm6@1
  __m64 v162; // mm3@1
  __m64 v163; // mm4@1
  __m64 v164; // mm2@1
  __m64 v165; // mm6@1
  __m64 v166; // mm1@1
  __m64 v167; // mm5@1
  __m64 v168; // mm7@1
  __m64 v169; // mm5@1
  __m64 v170; // mm6@1
  __m64 v171; // mm0@1
  __m64 v172; // mm3@1
  __m64 v173; // mm2@1
  __m64 v174; // mm6@1
  __m64 v175; // mm0@1
  __m64 v176; // mm5@1
  __m64 v177; // mm0@1
  __m64 v178; // mm2@1
  __m64 v179; // mm6@1
  __m64 v180; // mm3@1
  __m64 v181; // mm7@1
  __m64 v182; // mm2@1
  __m64 v183; // mm1@1
  __m64 v184; // mm4@1
  __m64 v185; // mm5@1
  __m64 v186; // mm3@1
  __m64 v187; // mm5@1
  __m64 v188; // mm4@1
  __m64 v189; // mm0@1
  __m64 v190; // mm3@1
  __m64 v191; // mm6@1
  __m64 v192; // mm2@1
  __m64 v193; // mm5@1
  __m64 v194; // mm4@1
  __m64 v195; // mm7@1
  __m64 v196; // mm3@1
  __m64 v197; // mm7@1
  __m64 v198; // mm3@1
  __m64 v199; // mm6@1
  __m64 v200; // mm2@1
  __m64 v201; // mm7@1
  __m64 v202; // mm1@1
  __m64 v203; // mm2@1
  __m64 v204; // mm5@1
  __m64 v205; // mm1@1
  __m64 v206; // mm0@1
  __m64 v207; // mm2@1
  __m64 v208; // mm1@1
  __m64 v209; // mm3@1
  __m64 v210; // mm0@1
  __m64 v211; // mm2@1
  __m64 v212; // mm4@1
  __m64 v213; // mm1@1
  __m64 v214; // mm3@1
  __m64 v215; // mm4@1
  __m64 v216; // mm1@1
  __m64 v217; // mm0@1
  __m64 v218; // mm1@1
  __m64 v219; // mm3@1
  __m64 v220; // mm0@1
  __m64 v221; // mm5@1
  __m64 v222; // mm2@1
  __m64 v223; // mm4@1
  __m64 v224; // mm2@1
  __m64 v225; // mm0@1
  __m64 v226; // mm1@1
  __m64 v227; // mm1@1
  __m64 v228; // mm3@1
  __m64 v229; // mm1@1
  __m64 v230; // mm4@1
  __m64 v231; // mm2@1
  __m64 v232; // mm5@1
  __m64 v233; // mm0@1
  __m64 v234; // mm2@1
  __m64 v235; // mm4@1
  __m64 v236; // mm5@1
  __m64 v237; // mm3@1
  __m64 v238; // mm4@1
  __m64 v239; // mm1@1
  __m64 v240; // mm5@1
  int v242; // [sp+4h] [bp-4h]@0

  v1 = *(__m64 *)(a1 + 96);
  v2 = *(__m64 *)(a1 + 64);
  v3 = _m_paddw(*(__m64 *)(a1 + 32), v1);
  v4 = _m_paddw(*(__m64 *)a1, v2);
  v5 = _m_psubw(_m_pmulhw(_m_psllw(_m_psubw(*(__m64 *)(a1 + 32), v1), 2u), (__m64)qword_A78FD0), v3);
  v6 = _m_psubw(*(__m64 *)a1, v2);
  *(__m64 *)(a1 + 32) = _m_paddw(v4, v3);
  *(__m64 *)(a1 + 96) = _m_paddw(v5, v6);
  v7 = _m_psubw(v4, v3);
  *(__m64 *)a1 = _m_psubw(v6, v5);
  v8 = *(__m64 *)(a1 + 80);
  v9 = *(__m64 *)(a1 + 48);
  v10 = v8;
  v11 = *(__m64 *)(a1 + 16);
  v12 = _m_psubw(v8, v9);
  v13 = *(__m64 *)(a1 + 112);
  v14 = _m_paddw(v10, v9);
  v15 = v11;
  v16 = _m_paddw(v11, v13);
  v17 = _m_psubw(v15, v13);
  v18 = v16;
  v19 = _m_paddw(v16, v14);
  v20 = _m_pmulhw((__m64)qword_A78FE8, _m_psllw(_m_paddw(v12, v17), 2u));
  v21 = *(__m64 *)(a1 + 96);
  v22 = _m_psubw(_m_pmulhw(_m_psllw(v17, 2u), (__m64)qword_A78FE0), v20);
  v23 = _m_paddw(v20, _m_pmulhw(_m_psllw(v12, 3u), (__m64)qword_A78FD8));
  v24 = *(__m64 *)(a1 + 32);
  v25 = _m_psubw(v23, v19);
  v26 = _m_psubw(_m_pmulhw(_m_psllw(_m_psubw(v18, v14), 2u), (__m64)qword_A78FD0), v25);
  v27 = _m_paddw(v22, v26);
  *(__m64 *)(a1 + 64) = _m_paddw(v7, v27);
  *(__m64 *)(a1 + 48) = _m_psubw(v7, v27);
  v28 = *(__m64 *)a1;
  *(__m64 *)a1 = _m_paddw(v24, v19);
  *(__m64 *)(a1 + 112) = _m_psubw(v24, v19);
  *(__m64 *)(a1 + 16) = _m_paddw(v21, v25);
  *(__m64 *)(a1 + 96) = _m_psubw(v21, v25);
  v29 = *(__m64 *)(a1 + 40);
  *(__m64 *)(a1 + 32) = _m_paddw(v28, v26);
  v30 = *(__m64 *)(a1 + 104);
  *(__m64 *)(a1 + 80) = _m_psubw(v28, v26);
  v31 = *(__m64 *)(a1 + 8);
  v32 = _m_paddw(v29, v30);
  v33 = *(__m64 *)(a1 + 72);
  v34 = *(__m64 *)(a1 + 88);
  v35 = v31;
  v36 = _m_paddw(v31, v33);
  v37 = _m_psubw(v35, v33);
  v38 = _m_psubw(_m_pmulhw(_m_psllw(_m_psubw(v29, v30), 2u), (__m64)qword_A78FD0), v32);
  v39 = *(__m64 *)(a1 + 56);
  *(__m64 *)(a1 + 40) = _m_paddw(v36, v32);
  v40 = _m_psubw(v36, v32);
  *(__m64 *)(a1 + 104) = _m_paddw(v37, v38);
  v41 = v34;
  *(__m64 *)(a1 + 72) = _m_psubw(v37, v38);
  v42 = _m_paddw(v34, v39);
  v43 = *(__m64 *)(a1 + 120);
  v44 = _m_psubw(v41, v39);
  v45 = *(__m64 *)(a1 + 24);
  v46 = v45;
  v47 = _m_paddw(v45, v43);
  v48 = _m_psubw(v46, v43);
  v49 = _m_pmulhw(_m_psllw(v44, 3u), (__m64)qword_A78FD8);
  v50 = v47;
  v51 = _m_paddw(v47, v42);
  v52 = _m_pmulhw(_m_psllw(_m_paddw(v44, v48), 2u), (__m64)qword_A78FE8);
  v53 = _m_psubw(_m_pmulhw(_m_psllw(v48, 2u), (__m64)qword_A78FE0), v52);
  v54 = _m_psubw(_m_paddw(v52, v49), v51);
  v55 = _m_psubw(_m_pmulhw(_m_psllw(_m_psubw(v50, v42), 2u), (__m64)qword_A78FD0), v54);
  v56 = _m_paddw(v53, v55);
  v57 = *(__m64 *)(a1 + 104);
  v58 = _m_psubw(*(__m64 *)(a1 + 40), v51);
  *(__m64 *)(a1 + 8) = _m_paddw(*(__m64 *)(a1 + 40), v51);
  v59 = v40;
  v60 = *(__m64 *)(a1 + 72);
  v61 = _m_psubw(v40, v56);
  v62 = _m_paddw(v59, v56);
  v63 = v54;
  *(__m64 *)(a1 + 56) = v61;
  v64 = _m_psubw(v57, v54);
  *(__m64 *)(a1 + 24) = _m_paddw(v57, v63);
  v65 = _m_psubw(v60, v55);
  *(__m64 *)(a1 + 40) = _m_paddw(v60, v55);
  v66 = v62;
  v67 = _m_punpcklwd(v62, v65);
  v68 = _m_punpckhwd(v66, v65);
  v69 = *(__m64 *)a1;
  v70 = v64;
  v71 = *(__m64 *)(a1 + 16);
  v72 = _m_punpcklwd(v64, v58);
  v73 = _m_punpckhwd(v70, v58);
  *(__m64 *)(a1 + 72) = _m_punpckldq(v67, v72);
  *(__m64 *)(a1 + 88) = _m_punpckhdq(v67, v72);
  v74 = v69;
  *(__m64 *)(a1 + 104) = _m_punpckldq(v68, v73);
  v75 = _m_punpcklwd(v69, v71);
  *(__m64 *)(a1 + 120) = _m_punpckhdq(v68, v73);
  v76 = _m_punpckhwd(v74, v71);
  v77 = *(__m64 *)(a1 + 32);
  v78 = *(__m64 *)(a1 + 48);
  v79 = v77;
  v80 = _m_punpcklwd(v77, v78);
  v81 = _m_punpckhwd(v79, v78);
  *(__m64 *)a1 = _m_punpckldq(v75, v80);
  *(__m64 *)(a1 + 16) = _m_punpckhdq(v75, v80);
  *(__m64 *)(a1 + 32) = _m_punpckldq(v76, v81);
  *(__m64 *)(a1 + 48) = _m_punpckhdq(v76, v81);
  v82 = *(__m64 *)(a1 + 8);
  v83 = *(__m64 *)(a1 + 24);
  v84 = v82;
  v85 = *(__m64 *)(a1 + 40);
  v86 = _m_punpcklwd(v82, v83);
  v87 = _m_punpckhwd(v84, v83);
  v88 = *(__m64 *)(a1 + 56);
  v89 = v85;
  v90 = _m_punpcklwd(v85, v88);
  v91 = _m_punpckhwd(v89, v88);
  v92 = v86;
  v93 = v87;
  v94 = _m_punpckldq(v86, v90);
  v95 = _m_punpckhdq(v92, v90);
  v96 = *(__m64 *)(a1 + 64);
  v97 = _m_punpckldq(v87, v91);
  *(__m64 *)(a1 + 64) = v94;
  v98 = _m_punpckhdq(v93, v91);
  v99 = *(__m64 *)(a1 + 80);
  *(__m64 *)(a1 + 80) = v95;
  v100 = v96;
  v101 = *(__m64 *)(a1 + 96);
  v102 = _m_punpcklwd(v96, v99);
  v103 = _m_punpckhwd(v100, v99);
  v104 = *(__m64 *)(a1 + 112);
  *(__m64 *)(a1 + 96) = v97;
  v105 = v101;
  *(__m64 *)(a1 + 112) = v98;
  v106 = _m_punpcklwd(v101, v104);
  v107 = _m_punpckhwd(v105, v104);
  *(__m64 *)(a1 + 8) = _m_punpckldq(v102, v106);
  *(__m64 *)(a1 + 24) = _m_punpckhdq(v102, v106);
  *(__m64 *)(a1 + 40) = _m_punpckldq(v103, v107);
  *(__m64 *)(a1 + 56) = _m_punpckhdq(v103, v107);
  v108 = *(__m64 *)(a1 + 96);
  v109 = *(__m64 *)(a1 + 64);
  v110 = _m_paddw(*(__m64 *)(a1 + 32), v108);
  v111 = _m_paddw(*(__m64 *)a1, v109);
  v112 = _m_psubw(*(__m64 *)a1, v109);
  v113 = _m_psubw(_m_pmulhw(_m_psllw(_m_psubw(*(__m64 *)(a1 + 32), v108), 2u), (__m64)qword_A78FD0), v110);
  *(__m64 *)(a1 + 32) = _m_paddw(v111, v110);
  *(__m64 *)(a1 + 96) = _m_paddw(v113, v112);
  v114 = _m_psubw(v111, v110);
  *(__m64 *)a1 = _m_psubw(v112, v113);
  v115 = *(__m64 *)(a1 + 80);
  v116 = *(__m64 *)(a1 + 48);
  v117 = v115;
  v118 = *(__m64 *)(a1 + 16);
  v119 = _m_psubw(v115, v116);
  v120 = *(__m64 *)(a1 + 112);
  v121 = _m_paddw(v117, v116);
  v122 = v118;
  v123 = _m_paddw(v118, v120);
  v124 = _m_psubw(v122, v120);
  v125 = v123;
  v126 = _m_pmulhw(_m_psllw(_m_paddw(v119, v124), 2u), (__m64)qword_A78FE8);
  v127 = _m_paddw(v123, v121);
  v128 = _m_psubw(_m_pmulhw(_m_psllw(v124, 2u), (__m64)qword_A78FE0), v126);
  v129 = *(__m64 *)(a1 + 96);
  v130 = _m_psubw(_m_paddw(v126, _m_pmulhw(_m_psllw(v119, 3u), (__m64)qword_A78FD8)), v127);
  v131 = *(__m64 *)(a1 + 32);
  v132 = _m_psubw(_m_pmulhw(_m_psllw(_m_psubw(v125, v121), 2u), (__m64)qword_A78FD0), v130);
  v133 = _m_paddw(v128, v132);
  *(__m64 *)(a1 + 64) = _m_paddw(v114, v133);
  *(__m64 *)(a1 + 48) = _m_psubw(v114, v133);
  v134 = *(__m64 *)a1;
  *(__m64 *)a1 = _m_paddw(v131, v127);
  *(__m64 *)(a1 + 112) = _m_psubw(v131, v127);
  *(__m64 *)(a1 + 16) = _m_paddw(v129, v130);
  *(__m64 *)(a1 + 96) = _m_psubw(v129, v130);
  v135 = *(__m64 *)(a1 + 40);
  *(__m64 *)(a1 + 32) = _m_paddw(v134, v132);
  *(__m64 *)(a1 + 80) = _m_psubw(v134, v132);
  v136 = *(__m64 *)(a1 + 104);
  v137 = *(__m64 *)(a1 + 8);
  v138 = *(__m64 *)(a1 + 72);
  v139 = _m_paddw(v135, v136);
  v140 = v137;
  v141 = _m_paddw(v137, v138);
  v142 = _m_psubw(v140, v138);
  v143 = _m_psubw(_m_pmulhw(_m_psllw(_m_psubw(v135, v136), 2u), (__m64)qword_A78FD0), v139);
  *(__m64 *)(a1 + 40) = _m_paddw(v141, v139);
  *(__m64 *)(a1 + 104) = _m_paddw(v142, v143);
  v144 = _m_psubw(v141, v139);
  *(__m64 *)(a1 + 72) = _m_psubw(v142, v143);
  v145 = *(__m64 *)(a1 + 88);
  v146 = *(__m64 *)(a1 + 56);
  v147 = v145;
  v148 = *(__m64 *)(a1 + 120);
  v149 = _m_paddw(v145, v146);
  v150 = *(__m64 *)(a1 + 24);
  v151 = _m_psubw(v147, v146);
  v152 = _m_pmulhw(_m_psllw(v151, 3u), (__m64)qword_A78FD8);
  v153 = v150;
  v154 = _m_paddw(v150, v148);
  v155 = _m_psubw(v153, v148);
  v156 = v154;
  v157 = _m_paddw(v154, v149);
  v158 = _m_pmulhw(_m_psllw(_m_psubw(v156, v149), 2u), (__m64)qword_A78FD0);
  v159 = *(__m64 *)(a1 + 40);
  v160 = _m_pmulhw(_m_psllw(_m_paddw(v151, v155), 2u), (__m64)qword_A78FE8);
  v161 = _m_psubw(_m_pmulhw(_m_psllw(v155, 2u), (__m64)qword_A78FE0), v160);
  v162 = _m_psubw(_m_paddw(v160, v152), v157);
  v163 = _m_psubw(v158, v162);
  v164 = *(__m64 *)(a1 + 104);
  v165 = _m_paddw(v161, v163);
  *(__m64 *)(a1 + 8) = _m_paddw(v159, v157);
  v166 = _m_psubw(v159, v157);
  v167 = v144;
  v168 = _m_psubw(v144, v165);
  v169 = _m_paddw(v167, v165);
  v170 = v162;
  v171 = *(__m64 *)(a1 + 72);
  *(__m64 *)(a1 + 56) = v168;
  v172 = _m_psubw(v164, v162);
  v173 = _m_paddw(v164, v170);
  v174 = _m_psubw(v171, v163);
  *(__m64 *)(a1 + 24) = v173;
  *(__m64 *)(a1 + 40) = _m_paddw(v171, v163);
  v175 = v169;
  v176 = _m_punpcklwd(v169, v174);
  v177 = _m_punpckhwd(v175, v174);
  v178 = v172;
  v179 = *(__m64 *)a1;
  v180 = _m_punpcklwd(v172, v166);
  v181 = *(__m64 *)(a1 + 16);
  v182 = _m_punpckhwd(v178, v166);
  v183.m64_u64 = qword_A79010;
  v184 = _m_punpckhdq(v176, v180);
  v185 = _m_paddsw(_m_psraw(_m_punpckldq(v176, v180), 4u), (__m64)qword_A79010);
  v186 = v177;
  *(__m64 *)(a1 + 72) = _m_punpcklbw(_m_packuswb(v185, v185), 0i64);
  v187 = v179;
  v188 = _m_paddsw(_m_psraw(v184, 4u), v183);
  *(__m64 *)(a1 + 88) = _m_punpcklbw(_m_packuswb(v188, v188), 0i64);
  v189 = _m_paddsw(_m_psraw(_m_punpckldq(v177, v182), 4u), v183);
  *(__m64 *)(a1 + 104) = _m_punpcklbw(_m_packuswb(v189, v189), 0i64);
  v190 = _m_paddsw(_m_psraw(_m_punpckhdq(v186, v182), 4u), v183);
  v191 = _m_punpcklwd(v179, v181);
  v192 = v191;
  v193 = _m_punpckhwd(v187, v181);
  *(__m64 *)(a1 + 120) = _m_punpcklbw(_m_packuswb(v190, v190), 0i64);
  v194 = *(__m64 *)(a1 + 48);
  v195 = *(__m64 *)(a1 + 32);
  v196 = v195;
  v197 = _m_punpcklwd(v195, v194);
  v198 = _m_punpckhwd(v196, v194);
  v199 = _m_paddsw(_m_psraw(_m_punpckldq(v191, v197), 4u), v183);
  v200 = _m_punpckhdq(v192, v197);
  v201 = v183;
  v202 = v193;
  *(__m64 *)a1 = _m_punpcklbw(_m_packuswb(v199, v199), 0i64);
  v203 = _m_paddsw(_m_psraw(v200, 4u), v201);
  *(__m64 *)(a1 + 16) = _m_punpcklbw(_m_packuswb(v203, v203), 0i64);
  v204 = _m_paddsw(_m_psraw(_m_punpckldq(v193, v198), 4u), v201);
  *(__m64 *)(a1 + 32) = _m_punpcklbw(_m_packuswb(v204, v204), 0i64);
  v205 = _m_paddsw(_m_psraw(_m_punpckhdq(v202, v198), 4u), v201);
  v206 = *(__m64 *)(a1 + 8);
  v207 = v206;
  *(__m64 *)(a1 + 48) = _m_punpcklbw(_m_packuswb(v205, v205), 0i64);
  v208 = *(__m64 *)(a1 + 24);
  v209 = *(__m64 *)(a1 + 40);
  v210 = _m_punpcklwd(v206, v208);
  v211 = _m_punpckhwd(v207, v208);
  v212 = v209;
  v213 = *(__m64 *)(a1 + 56);
  v214 = _m_punpcklwd(v209, v213);
  v215 = _m_punpckhwd(v212, v213);
  v216 = v210;
  v217 = _m_punpckldq(v210, v214);
  v218 = _m_punpckhdq(v216, v214);
  v219 = *(__m64 *)(a1 + 64);
  v220 = _m_paddsw(_m_psraw(v217, 4u), v201);
  v221 = _m_punpckhdq(v211, v215);
  *(__m64 *)(a1 + 64) = _m_punpcklbw(_m_packuswb(v220, v220), 0i64);
  v222 = _m_psraw(_m_punpckldq(v211, v215), 4u);
  v223 = *(__m64 *)(a1 + 80);
  v224 = _m_paddsw(v222, v201);
  v225 = *(__m64 *)(a1 + 96);
  v226 = _m_paddsw(_m_psraw(v218, 4u), v201);
  *(__m64 *)(a1 + 80) = _m_punpcklbw(_m_packuswb(v226, v226), 0i64);
  v227 = v219;
  v228 = _m_punpcklwd(v219, v223);
  v229 = _m_punpckhwd(v227, v223);
  v230 = *(__m64 *)(a1 + 112);
  *(__m64 *)(a1 + 96) = _m_punpcklbw(_m_packuswb(v224, v224), 0i64);
  v231 = v225;
  v232 = _m_paddsw(_m_psraw(v221, 4u), v201);
  v233 = _m_punpcklwd(v225, v230);
  v234 = _m_punpckhwd(v231, v230);
  v235 = v228;
  *(__m64 *)(a1 + 112) = _m_punpcklbw(_m_packuswb(v232, v232), 0i64);
  v236 = v229;
  v237 = _m_paddsw(_m_psraw(_m_punpckldq(v228, v233), 4u), v201);
  *(__m64 *)(a1 + 8) = _m_punpcklbw(_m_packuswb(v237, v237), 0i64);
  v238 = _m_paddsw(_m_psraw(_m_punpckhdq(v235, v233), 4u), v201);
  *(__m64 *)(a1 + 24) = _m_punpcklbw(_m_packuswb(v238, v238), 0i64);
  v239 = _m_paddsw(_m_psraw(_m_punpckldq(v229, v234), 4u), v201);
  *(__m64 *)(a1 + 40) = _m_punpcklbw(_m_packuswb(v239, v239), 0i64);
  v240 = _m_paddsw(_m_psraw(_m_punpckhdq(v236, v234), 4u), v201);
  *(__m64 *)(a1 + 56) = _m_punpcklbw(_m_packuswb(v240, v240), 0i64);
  return v242;
}
// A78FD0: using guessed type __int64 qword_A78FD0;
// A78FD8: using guessed type __int64 qword_A78FD8;
// A78FE0: using guessed type __int64 qword_A78FE0;
// A78FE8: using guessed type __int64 qword_A78FE8;
// A79010: using guessed type __int64 qword_A79010;

//----- (007946E0) --------------------------------------------------------
void __usercall own_fqnt8x8_ipp_m5(__m64 a1@<mm6>, int a2, int a3)
{
  __m64 v3; // mm7@1
  __m64 v4; // mm2@1
  __m64 v5; // mm2@1
  __m64 v6; // mm2@1
  __m64 v7; // mm2@1
  __m64 v8; // mm2@1
  __m64 v9; // mm2@1
  __m64 v10; // mm2@1
  __m64 v11; // mm2@1

  v3 = _m_psubw(0i64, _m_pcmpeqw(a1, a1));
  v4 = _m_psraw(_m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 8), 3u), _m_psrlw(*(__m64 *)(a3 + 8), 1u)), v3), 1u);
  *(__m64 *)a2 = _m_psraw(_m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)a2, 3u), _m_psrlw(*(__m64 *)a3, 1u)), v3), 1u);
  *(__m64 *)(a2 + 8) = v4;
  v5 = _m_psraw(_m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 24), 3u), _m_psrlw(*(__m64 *)(a3 + 24), 1u)), v3), 1u);
  *(__m64 *)(a2 + 16) = _m_psraw(
                          _m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 16), 3u), _m_psrlw(*(__m64 *)(a3 + 16), 1u)), v3),
                          1u);
  *(__m64 *)(a2 + 24) = v5;
  v6 = _m_psraw(_m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 40), 3u), _m_psrlw(*(__m64 *)(a3 + 40), 1u)), v3), 1u);
  *(__m64 *)(a2 + 32) = _m_psraw(
                          _m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 32), 3u), _m_psrlw(*(__m64 *)(a3 + 32), 1u)), v3),
                          1u);
  *(__m64 *)(a2 + 40) = v6;
  v7 = _m_psraw(_m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 56), 3u), _m_psrlw(*(__m64 *)(a3 + 56), 1u)), v3), 1u);
  *(__m64 *)(a2 + 48) = _m_psraw(
                          _m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 48), 3u), _m_psrlw(*(__m64 *)(a3 + 48), 1u)), v3),
                          1u);
  *(__m64 *)(a2 + 56) = v7;
  v8 = _m_psraw(_m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 72), 3u), _m_psrlw(*(__m64 *)(a3 + 72), 1u)), v3), 1u);
  *(__m64 *)(a2 + 64) = _m_psraw(
                          _m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 64), 3u), _m_psrlw(*(__m64 *)(a3 + 64), 1u)), v3),
                          1u);
  *(__m64 *)(a2 + 72) = v8;
  v9 = _m_psraw(_m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 88), 3u), _m_psrlw(*(__m64 *)(a3 + 88), 1u)), v3), 1u);
  *(__m64 *)(a2 + 80) = _m_psraw(
                          _m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 80), 3u), _m_psrlw(*(__m64 *)(a3 + 80), 1u)), v3),
                          1u);
  *(__m64 *)(a2 + 88) = v9;
  v10 = _m_psraw(_m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 104), 3u), _m_psrlw(*(__m64 *)(a3 + 104), 1u)), v3), 1u);
  *(__m64 *)(a2 + 96) = _m_psraw(
                          _m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 96), 3u), _m_psrlw(*(__m64 *)(a3 + 96), 1u)), v3),
                          1u);
  *(__m64 *)(a2 + 104) = v10;
  v11 = _m_psraw(_m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 120), 3u), _m_psrlw(*(__m64 *)(a3 + 120), 1u)), v3), 1u);
  *(__m64 *)(a2 + 112) = _m_psraw(
                           _m_paddw(
                             _m_pmulhw(_m_psllw(*(__m64 *)(a2 + 112), 3u), _m_psrlw(*(__m64 *)(a3 + 112), 1u)),
                             v3),
                           1u);
  *(__m64 *)(a2 + 120) = v11;
}

//----- (007948E0) --------------------------------------------------------
void __usercall own_fqnt8x8_ipp_a6(__m64 a1@<mm6>, int a2, int a3)
{
  __m64 v3; // mm7@1
  __m64 v4; // mm2@1
  __m64 v5; // mm2@1
  __m64 v6; // mm2@1
  __m64 v7; // mm2@1
  __m64 v8; // mm2@1
  __m64 v9; // mm2@1
  __m64 v10; // mm2@1
  __m64 v11; // mm2@1

  v3 = _m_psubw(0i64, _m_pcmpeqw(a1, a1));
  v4 = _m_psraw(_m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 8), 3u), _m_psrlw(*(__m64 *)(a3 + 8), 1u)), v3), 1u);
  *(__m64 *)a2 = _m_psraw(_m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)a2, 3u), _m_psrlw(*(__m64 *)a3, 1u)), v3), 1u);
  *(__m64 *)(a2 + 8) = v4;
  v5 = _m_psraw(_m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 24), 3u), _m_psrlw(*(__m64 *)(a3 + 24), 1u)), v3), 1u);
  *(__m64 *)(a2 + 16) = _m_psraw(
                          _m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 16), 3u), _m_psrlw(*(__m64 *)(a3 + 16), 1u)), v3),
                          1u);
  *(__m64 *)(a2 + 24) = v5;
  v6 = _m_psraw(_m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 40), 3u), _m_psrlw(*(__m64 *)(a3 + 40), 1u)), v3), 1u);
  *(__m64 *)(a2 + 32) = _m_psraw(
                          _m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 32), 3u), _m_psrlw(*(__m64 *)(a3 + 32), 1u)), v3),
                          1u);
  *(__m64 *)(a2 + 40) = v6;
  v7 = _m_psraw(_m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 56), 3u), _m_psrlw(*(__m64 *)(a3 + 56), 1u)), v3), 1u);
  *(__m64 *)(a2 + 48) = _m_psraw(
                          _m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 48), 3u), _m_psrlw(*(__m64 *)(a3 + 48), 1u)), v3),
                          1u);
  *(__m64 *)(a2 + 56) = v7;
  v8 = _m_psraw(_m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 72), 3u), _m_psrlw(*(__m64 *)(a3 + 72), 1u)), v3), 1u);
  *(__m64 *)(a2 + 64) = _m_psraw(
                          _m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 64), 3u), _m_psrlw(*(__m64 *)(a3 + 64), 1u)), v3),
                          1u);
  *(__m64 *)(a2 + 72) = v8;
  v9 = _m_psraw(_m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 88), 3u), _m_psrlw(*(__m64 *)(a3 + 88), 1u)), v3), 1u);
  *(__m64 *)(a2 + 80) = _m_psraw(
                          _m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 80), 3u), _m_psrlw(*(__m64 *)(a3 + 80), 1u)), v3),
                          1u);
  *(__m64 *)(a2 + 88) = v9;
  v10 = _m_psraw(_m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 104), 3u), _m_psrlw(*(__m64 *)(a3 + 104), 1u)), v3), 1u);
  *(__m64 *)(a2 + 96) = _m_psraw(
                          _m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 96), 3u), _m_psrlw(*(__m64 *)(a3 + 96), 1u)), v3),
                          1u);
  *(__m64 *)(a2 + 104) = v10;
  v11 = _m_psraw(_m_paddw(_m_pmulhw(_m_psllw(*(__m64 *)(a2 + 120), 3u), _m_psrlw(*(__m64 *)(a3 + 120), 1u)), v3), 1u);
  *(__m64 *)(a2 + 112) = _m_psraw(
                           _m_paddw(
                             _m_pmulhw(_m_psllw(*(__m64 *)(a2 + 112), 3u), _m_psrlw(*(__m64 *)(a3 + 112), 1u)),
                             v3),
                           1u);
  *(__m64 *)(a2 + 120) = v11;
}

//----- (00794AE0) --------------------------------------------------------
void __usercall own_fqnt8x8_ipp_w7(__m128i a1@<xmm6>, int a2, int a3)
{
  __m128i v3; // xmm7@1
  __m128i v4; // xmm2@3
  __m128i v5; // xmm2@3
  __m128i v6; // xmm2@3
  __m128i v7; // xmm2@3
  __m128i v8; // xmm2@4
  __m128i v9; // xmm2@4
  __m128i v10; // xmm2@4
  __m128i v11; // xmm2@4
  __m128i v12; // xmm2@6
  __m128i v13; // xmm2@6
  __m128i v14; // xmm2@6
  __m128i v15; // xmm2@6
  __m128i v16; // xmm2@7
  __m128i v17; // xmm2@7
  __m128i v18; // xmm2@7
  __m128i v19; // xmm2@7

  v3 = _mm_sub_epi16(0i64, _mm_cmpeq_epi16(a1, a1));
  if ( a2 & 0xF )
  {
    if ( a3 & 0xF )
    {
      v4 = _mm_sra_epi16(
             _mm_add_epi16(
               _mm_mulhi_epi16(
                 _mm_sll_epi16(_mm_loadu_si128((const __m128i *)(a2 + 16)), 3u),
                 _mm_srl_epi16(_mm_loadu_si128((const __m128i *)(a3 + 16)), 1u)),
               v3),
             1u);
      _mm_storeu_si128(
        (__m128i *)a2,
        _mm_sra_epi16(
          _mm_add_epi16(
            _mm_mulhi_epi16(
              _mm_sll_epi16(_mm_loadu_si128((const __m128i *)a2), 3u),
              _mm_srl_epi16(_mm_loadu_si128((const __m128i *)a3), 1u)),
            v3),
          1u));
      _mm_storeu_si128((__m128i *)(a2 + 16), v4);
      v5 = _mm_sra_epi16(
             _mm_add_epi16(
               _mm_mulhi_epi16(
                 _mm_sll_epi16(_mm_loadu_si128((const __m128i *)(a2 + 48)), 3u),
                 _mm_srl_epi16(_mm_loadu_si128((const __m128i *)(a3 + 48)), 1u)),
               v3),
             1u);
      _mm_storeu_si128(
        (__m128i *)(a2 + 32),
        _mm_sra_epi16(
          _mm_add_epi16(
            _mm_mulhi_epi16(
              _mm_sll_epi16(_mm_loadu_si128((const __m128i *)(a2 + 32)), 3u),
              _mm_srl_epi16(_mm_loadu_si128((const __m128i *)(a3 + 32)), 1u)),
            v3),
          1u));
      _mm_storeu_si128((__m128i *)(a2 + 48), v5);
      v6 = _mm_sra_epi16(
             _mm_add_epi16(
               _mm_mulhi_epi16(
                 _mm_sll_epi16(_mm_loadu_si128((const __m128i *)(a2 + 80)), 3u),
                 _mm_srl_epi16(_mm_loadu_si128((const __m128i *)(a3 + 80)), 1u)),
               v3),
             1u);
      _mm_storeu_si128(
        (__m128i *)(a2 + 64),
        _mm_sra_epi16(
          _mm_add_epi16(
            _mm_mulhi_epi16(
              _mm_sll_epi16(_mm_loadu_si128((const __m128i *)(a2 + 64)), 3u),
              _mm_srl_epi16(_mm_loadu_si128((const __m128i *)(a3 + 64)), 1u)),
            v3),
          1u));
      _mm_storeu_si128((__m128i *)(a2 + 80), v6);
      v7 = _mm_sra_epi16(
             _mm_add_epi16(
               _mm_mulhi_epi16(
                 _mm_sll_epi16(_mm_loadu_si128((const __m128i *)(a2 + 112)), 3u),
                 _mm_srl_epi16(_mm_loadu_si128((const __m128i *)(a3 + 112)), 1u)),
               v3),
             1u);
      _mm_storeu_si128(
        (__m128i *)(a2 + 96),
        _mm_sra_epi16(
          _mm_add_epi16(
            _mm_mulhi_epi16(
              _mm_sll_epi16(_mm_loadu_si128((const __m128i *)(a2 + 96)), 3u),
              _mm_srl_epi16(_mm_loadu_si128((const __m128i *)(a3 + 96)), 1u)),
            v3),
          1u));
      _mm_storeu_si128((__m128i *)(a2 + 112), v7);
    }
    else
    {
      v8 = _mm_sra_epi16(
             _mm_add_epi16(
               _mm_mulhi_epi16(
                 _mm_sll_epi16(_mm_loadu_si128((const __m128i *)(a2 + 16)), 3u),
                 _mm_srl_epi16(_mm_load_si128((const __m128i *)(a3 + 16)), 1u)),
               v3),
             1u);
      _mm_storeu_si128(
        (__m128i *)a2,
        _mm_sra_epi16(
          _mm_add_epi16(
            _mm_mulhi_epi16(
              _mm_sll_epi16(_mm_loadu_si128((const __m128i *)a2), 3u),
              _mm_srl_epi16(_mm_load_si128((const __m128i *)a3), 1u)),
            v3),
          1u));
      _mm_storeu_si128((__m128i *)(a2 + 16), v8);
      v9 = _mm_sra_epi16(
             _mm_add_epi16(
               _mm_mulhi_epi16(
                 _mm_sll_epi16(_mm_loadu_si128((const __m128i *)(a2 + 48)), 3u),
                 _mm_srl_epi16(_mm_load_si128((const __m128i *)(a3 + 48)), 1u)),
               v3),
             1u);
      _mm_storeu_si128(
        (__m128i *)(a2 + 32),
        _mm_sra_epi16(
          _mm_add_epi16(
            _mm_mulhi_epi16(
              _mm_sll_epi16(_mm_loadu_si128((const __m128i *)(a2 + 32)), 3u),
              _mm_srl_epi16(_mm_load_si128((const __m128i *)(a3 + 32)), 1u)),
            v3),
          1u));
      _mm_storeu_si128((__m128i *)(a2 + 48), v9);
      v10 = _mm_sra_epi16(
              _mm_add_epi16(
                _mm_mulhi_epi16(
                  _mm_sll_epi16(_mm_loadu_si128((const __m128i *)(a2 + 80)), 3u),
                  _mm_srl_epi16(_mm_load_si128((const __m128i *)(a3 + 80)), 1u)),
                v3),
              1u);
      _mm_storeu_si128(
        (__m128i *)(a2 + 64),
        _mm_sra_epi16(
          _mm_add_epi16(
            _mm_mulhi_epi16(
              _mm_sll_epi16(_mm_loadu_si128((const __m128i *)(a2 + 64)), 3u),
              _mm_srl_epi16(_mm_load_si128((const __m128i *)(a3 + 64)), 1u)),
            v3),
          1u));
      _mm_storeu_si128((__m128i *)(a2 + 80), v10);
      v11 = _mm_sra_epi16(
              _mm_add_epi16(
                _mm_mulhi_epi16(
                  _mm_sll_epi16(_mm_loadu_si128((const __m128i *)(a2 + 112)), 3u),
                  _mm_srl_epi16(_mm_load_si128((const __m128i *)(a3 + 112)), 1u)),
                v3),
              1u);
      _mm_storeu_si128(
        (__m128i *)(a2 + 96),
        _mm_sra_epi16(
          _mm_add_epi16(
            _mm_mulhi_epi16(
              _mm_sll_epi16(_mm_loadu_si128((const __m128i *)(a2 + 96)), 3u),
              _mm_srl_epi16(_mm_load_si128((const __m128i *)(a3 + 96)), 1u)),
            v3),
          1u));
      _mm_storeu_si128((__m128i *)(a2 + 112), v11);
    }
  }
  else if ( a3 & 0xF )
  {
    v12 = _mm_sra_epi16(
            _mm_add_epi16(
              _mm_mulhi_epi16(
                _mm_sll_epi16(_mm_load_si128((const __m128i *)(a2 + 16)), 3u),
                _mm_srl_epi16(_mm_loadu_si128((const __m128i *)(a3 + 16)), 1u)),
              v3),
            1u);
    _mm_store_si128(
      (__m128i *)a2,
      _mm_sra_epi16(
        _mm_add_epi16(
          _mm_mulhi_epi16(
            _mm_sll_epi16(_mm_load_si128((const __m128i *)a2), 3u),
            _mm_srl_epi16(_mm_loadu_si128((const __m128i *)a3), 1u)),
          v3),
        1u));
    _mm_store_si128((__m128i *)(a2 + 16), v12);
    v13 = _mm_sra_epi16(
            _mm_add_epi16(
              _mm_mulhi_epi16(
                _mm_sll_epi16(_mm_load_si128((const __m128i *)(a2 + 48)), 3u),
                _mm_srl_epi16(_mm_loadu_si128((const __m128i *)(a3 + 48)), 1u)),
              v3),
            1u);
    _mm_store_si128(
      (__m128i *)(a2 + 32),
      _mm_sra_epi16(
        _mm_add_epi16(
          _mm_mulhi_epi16(
            _mm_sll_epi16(_mm_load_si128((const __m128i *)(a2 + 32)), 3u),
            _mm_srl_epi16(_mm_loadu_si128((const __m128i *)(a3 + 32)), 1u)),
          v3),
        1u));
    _mm_store_si128((__m128i *)(a2 + 48), v13);
    v14 = _mm_sra_epi16(
            _mm_add_epi16(
              _mm_mulhi_epi16(
                _mm_sll_epi16(_mm_load_si128((const __m128i *)(a2 + 80)), 3u),
                _mm_srl_epi16(_mm_loadu_si128((const __m128i *)(a3 + 80)), 1u)),
              v3),
            1u);
    _mm_store_si128(
      (__m128i *)(a2 + 64),
      _mm_sra_epi16(
        _mm_add_epi16(
          _mm_mulhi_epi16(
            _mm_sll_epi16(_mm_load_si128((const __m128i *)(a2 + 64)), 3u),
            _mm_srl_epi16(_mm_loadu_si128((const __m128i *)(a3 + 64)), 1u)),
          v3),
        1u));
    _mm_store_si128((__m128i *)(a2 + 80), v14);
    v15 = _mm_sra_epi16(
            _mm_add_epi16(
              _mm_mulhi_epi16(
                _mm_sll_epi16(_mm_load_si128((const __m128i *)(a2 + 112)), 3u),
                _mm_srl_epi16(_mm_loadu_si128((const __m128i *)(a3 + 112)), 1u)),
              v3),
            1u);
    _mm_store_si128(
      (__m128i *)(a2 + 96),
      _mm_sra_epi16(
        _mm_add_epi16(
          _mm_mulhi_epi16(
            _mm_sll_epi16(_mm_load_si128((const __m128i *)(a2 + 96)), 3u),
            _mm_srl_epi16(_mm_loadu_si128((const __m128i *)(a3 + 96)), 1u)),
          v3),
        1u));
    _mm_store_si128((__m128i *)(a2 + 112), v15);
  }
  else
  {
    v16 = _mm_sra_epi16(
            _mm_add_epi16(
              _mm_mulhi_epi16(
                _mm_sll_epi16(_mm_load_si128((const __m128i *)(a2 + 16)), 3u),
                _mm_srl_epi16(_mm_load_si128((const __m128i *)(a3 + 16)), 1u)),
              v3),
            1u);
    _mm_store_si128(
      (__m128i *)a2,
      _mm_sra_epi16(
        _mm_add_epi16(
          _mm_mulhi_epi16(
            _mm_sll_epi16(_mm_load_si128((const __m128i *)a2), 3u),
            _mm_srl_epi16(_mm_load_si128((const __m128i *)a3), 1u)),
          v3),
        1u));
    _mm_store_si128((__m128i *)(a2 + 16), v16);
    v17 = _mm_sra_epi16(
            _mm_add_epi16(
              _mm_mulhi_epi16(
                _mm_sll_epi16(_mm_load_si128((const __m128i *)(a2 + 48)), 3u),
                _mm_srl_epi16(_mm_load_si128((const __m128i *)(a3 + 48)), 1u)),
              v3),
            1u);
    _mm_store_si128(
      (__m128i *)(a2 + 32),
      _mm_sra_epi16(
        _mm_add_epi16(
          _mm_mulhi_epi16(
            _mm_sll_epi16(_mm_load_si128((const __m128i *)(a2 + 32)), 3u),
            _mm_srl_epi16(_mm_load_si128((const __m128i *)(a3 + 32)), 1u)),
          v3),
        1u));
    _mm_store_si128((__m128i *)(a2 + 48), v17);
    v18 = _mm_sra_epi16(
            _mm_add_epi16(
              _mm_mulhi_epi16(
                _mm_sll_epi16(_mm_load_si128((const __m128i *)(a2 + 80)), 3u),
                _mm_srl_epi16(_mm_load_si128((const __m128i *)(a3 + 80)), 1u)),
              v3),
            1u);
    _mm_store_si128(
      (__m128i *)(a2 + 64),
      _mm_sra_epi16(
        _mm_add_epi16(
          _mm_mulhi_epi16(
            _mm_sll_epi16(_mm_load_si128((const __m128i *)(a2 + 64)), 3u),
            _mm_srl_epi16(_mm_load_si128((const __m128i *)(a3 + 64)), 1u)),
          v3),
        1u));
    _mm_store_si128((__m128i *)(a2 + 80), v18);
    v19 = _mm_sra_epi16(
            _mm_add_epi16(
              _mm_mulhi_epi16(
                _mm_sll_epi16(_mm_load_si128((const __m128i *)(a2 + 112)), 3u),
                _mm_srl_epi16(_mm_load_si128((const __m128i *)(a3 + 112)), 1u)),
              v3),
            1u);
    _mm_store_si128(
      (__m128i *)(a2 + 96),
      _mm_sra_epi16(
        _mm_add_epi16(
          _mm_mulhi_epi16(
            _mm_sll_epi16(_mm_load_si128((const __m128i *)(a2 + 96)), 3u),
            _mm_srl_epi16(_mm_load_si128((const __m128i *)(a3 + 96)), 1u)),
          v3),
        1u));
    _mm_store_si128((__m128i *)(a2 + 112), v19);
  }
}

//----- (00794FF0) --------------------------------------------------------
void __cdecl own_dct_2d_16s_8x8_frv_m5(int a1)
{
  int v1; // ecx@1
  __m64 v2; // mm0@1
  __m64 v3; // mm1@1
  __m64 v4; // mm2@1
  __m64 v5; // mm3@1
  __m64 v6; // mm0@1
  __m64 v7; // mm4@1
  __m64 v8; // mm6@1
  __m64 v9; // mm2@1
  __m64 v10; // mm0@1
  __m64 v11; // mm5@1
  __m64 v12; // mm6@1
  __m64 v13; // mm7@1
  __m64 v14; // mm4@1
  __m64 v15; // mm5@1
  __m64 v16; // mm4@1
  __m64 v17; // mm1@1
  __m64 v18; // mm2@1
  __m64 v19; // mm5@1
  __m64 v20; // mm3@1
  __m64 v21; // mm7@1
  __m64 v22; // mm3@1
  __m64 v23; // mm1@1
  __m64 v24; // mm6@1
  __m64 v25; // mm5@1
  __m64 v26; // mm1@1
  __m64 v27; // mm2@1
  __m64 v28; // mm4@1
  __m64 v29; // mm1@1
  __m64 v30; // mm4@1
  __m64 v31; // mm3@1
  __m64 v32; // mm6@1
  __m64 v33; // mm0@1
  __m64 v34; // mm7@1
  __m64 v35; // mm3@1
  __m64 v36; // mm0@1
  __m64 v37; // mm3@1
  __m64 v38; // mm5@1
  __m64 v39; // mm0@1
  __m64 v40; // mm1@1
  __m64 v41; // mm2@1
  __m64 v42; // mm3@1
  __m64 v43; // mm0@1
  __m64 v44; // mm4@1
  __m64 v45; // mm6@1
  __m64 v46; // mm2@1
  __m64 v47; // mm0@1
  __m64 v48; // mm5@1
  __m64 v49; // mm6@1
  __m64 v50; // mm7@1
  __m64 v51; // mm4@1
  __m64 v52; // mm5@1
  __m64 v53; // mm4@1
  __m64 v54; // mm1@1
  __m64 v55; // mm2@1
  __m64 v56; // mm5@1
  __m64 v57; // mm3@1
  __m64 v58; // mm7@1
  __m64 v59; // mm3@1
  __m64 v60; // mm1@1
  __m64 v61; // mm6@1
  __m64 v62; // mm5@1
  __m64 v63; // mm1@1
  __m64 v64; // mm2@1
  __m64 v65; // mm4@1
  __m64 v66; // mm1@1
  __m64 v67; // mm4@1
  __m64 v68; // mm3@1
  __m64 v69; // mm6@1
  __m64 v70; // mm0@1
  __m64 v71; // mm7@1
  __m64 v72; // mm3@1
  __m64 v73; // mm0@1
  __m64 v74; // mm3@1
  __m64 v75; // mm5@1
  __m64 v76; // mm7@1
  __m64 v77; // mm1@1
  __m64 v78; // mm1@1
  __m64 v79; // mm0@1
  __m64 v80; // mm2@1
  __m64 v81; // mm3@1
  __m64 v82; // mm0@1
  __m64 v83; // mm3@1
  __m64 v84; // mm4@1
  __m64 v85; // mm6@1
  __m64 v86; // mm2@1
  __m64 v87; // mm0@1
  __m64 v88; // mm2@1
  __m64 v89; // mm0@1
  __m64 v90; // mm2@1
  __m64 v91; // mm1@1
  __m64 v92; // mm1@1
  __m64 v93; // mm0@1
  __m64 v94; // mm2@1
  __m64 v95; // mm3@1
  __m64 v96; // mm0@1
  __m64 v97; // mm3@1
  __m64 v98; // mm2@1
  __m64 v99; // mm4@1
  __m64 v100; // mm5@1
  __m64 v101; // mm6@1
  __m64 v102; // mm0@1
  __m64 v103; // mm2@1
  __m64 v104; // mm0@1
  __m64 v105; // mm2@1
  __m64 v106; // mm1@1
  __m64 v107; // mm1@1
  __m64 v108; // mm0@1
  __m64 v109; // mm2@1
  __m64 v110; // mm3@1
  __m64 v111; // mm0@1
  __m64 v112; // mm3@1
  __m64 v113; // mm2@1
  __m64 v114; // mm4@1
  __m64 v115; // mm5@1
  __m64 v116; // mm6@1
  __m64 v117; // mm0@1
  __m64 v118; // mm2@1
  __m64 v119; // mm0@1
  __m64 v120; // mm2@1
  __m64 v121; // mm1@1
  __m64 v122; // mm1@1
  __m64 v123; // mm0@1
  __m64 v124; // mm2@1
  __m64 v125; // mm3@1
  __m64 v126; // mm0@1
  __m64 v127; // mm3@1
  __m64 v128; // mm2@1
  __m64 v129; // mm4@1
  __m64 v130; // mm5@1
  __m64 v131; // mm6@1
  __m64 v132; // mm0@1
  __m64 v133; // mm2@1
  __m64 v134; // mm0@1
  __m64 v135; // mm2@1
  __m64 v136; // mm1@1
  __m64 v137; // mm1@1
  __m64 v138; // mm0@1
  __m64 v139; // mm2@1
  __m64 v140; // mm3@1
  __m64 v141; // mm0@1
  __m64 v142; // mm3@1
  __m64 v143; // mm2@1
  __m64 v144; // mm4@1
  __m64 v145; // mm5@1
  __m64 v146; // mm6@1
  __m64 v147; // mm0@1
  __m64 v148; // mm2@1
  __m64 v149; // mm0@1
  __m64 v150; // mm2@1
  __m64 v151; // mm1@1
  __m64 v152; // mm1@1
  __m64 v153; // mm0@1
  __m64 v154; // mm2@1
  __m64 v155; // mm3@1
  __m64 v156; // mm0@1
  __m64 v157; // mm3@1
  __m64 v158; // mm2@1
  __m64 v159; // mm4@1
  __m64 v160; // mm5@1
  __m64 v161; // mm6@1
  __m64 v162; // mm0@1
  __m64 v163; // mm2@1
  __m64 v164; // mm0@1
  __m64 v165; // mm2@1
  __m64 v166; // mm1@1
  __m64 v167; // mm1@1
  __m64 v168; // mm0@1
  __m64 v169; // mm2@1
  __m64 v170; // mm3@1
  __m64 v171; // mm0@1
  __m64 v172; // mm3@1
  __m64 v173; // mm2@1
  __m64 v174; // mm4@1
  __m64 v175; // mm5@1
  __m64 v176; // mm6@1
  __m64 v177; // mm0@1
  __m64 v178; // mm2@1
  __m64 v179; // mm0@1
  __m64 v180; // mm2@1
  __m64 v181; // mm1@1
  __m64 v182; // mm1@1
  __m64 v183; // mm0@1
  __m64 v184; // mm2@1
  __m64 v185; // mm3@1
  __m64 v186; // mm0@1
  __m64 v187; // mm3@1
  __m64 v188; // mm2@1
  __m64 v189; // mm4@1
  __m64 v190; // mm5@1
  __m64 v191; // mm6@1
  __m64 v192; // mm0@1

  v1 = a1;
  v2 = *(__m64 *)(a1 + 16);
  v3 = *(__m64 *)(a1 + 96);
  v4 = v2;
  v5 = *(__m64 *)(a1 + 32);
  v6 = _m_psllw(_m_paddsw(v2, v3), 3u);
  v7 = _m_psllw(_m_paddsw(*(__m64 *)(a1 + 80), v5), 3u);
  v8 = v6;
  v9 = _m_psubsw(v4, v3);
  v10 = _m_psubsw(v6, v7);
  v11 = _m_psllw(_m_paddsw(*(__m64 *)a1, *(__m64 *)(a1 + 112)), 3u);
  v12 = _m_paddsw(v8, v7);
  v13 = _m_psllw(_m_paddsw(*(__m64 *)(a1 + 48), *(__m64 *)(a1 + 64)), 3u);
  v14 = v11;
  v15 = _m_psubsw(v11, v13);
  v16 = _m_paddsw(v14, v13);
  v17 = _m_por(_m_paddsw(_m_pmulhw(*(__m64 *)&xmmword_A79060, v10), v15), *(__m64 *)&xmmword_A79030);
  v18 = _m_psllw(v9, 4u);
  v19 = _m_pmulhw(v15, *(__m64 *)&xmmword_A79060);
  v20 = _m_psubsw(v5, *(__m64 *)(a1 + 80));
  *(__m64 *)(a1 + 32) = v17;
  v21 = _m_paddsw(v16, v12);
  v22 = _m_psllw(v20, 4u);
  v23 = _m_psubsw(*(__m64 *)(v1 + 48), *(__m64 *)(v1 + 64));
  *(__m64 *)(a1 + 64) = _m_psubsw(v16, v12);
  v24 = _m_pmulhw(_m_psubsw(v18, v22), *(__m64 *)&xmmword_A79090);
  v25 = _m_por(_m_psubsw(v19, v10), *(__m64 *)&xmmword_A79030);
  v26 = _m_psllw(v23, 3u);
  v27 = _m_por(_m_pmulhw(_m_paddsw(v18, v22), *(__m64 *)&xmmword_A79090), *(__m64 *)&xmmword_A79030);
  v28 = v26;
  v29 = _m_paddsw(v26, v24);
  v30 = _m_psubsw(v28, v24);
  v31 = _m_psllw(_m_psubsw(*(__m64 *)v1, *(__m64 *)(v1 + 112)), 3u);
  v32.m64_u64 = xmmword_A79070;
  v33 = _m_pmulhw(*(__m64 *)&xmmword_A79050, v29);
  *(__m64 *)a1 = v21;
  *(__m64 *)(a1 + 96) = v25;
  v34 = _m_psubsw(v31, v27);
  v35 = _m_paddsw(v31, v27);
  v36 = _m_paddsw(v33, v35);
  v37 = _m_pmulhw(v35, *(__m64 *)&xmmword_A79050);
  v38 = _m_paddsw(_m_pmulhw(*(__m64 *)&xmmword_A79070, v34), v34);
  *(__m64 *)(a1 + 16) = _m_por(v36, *(__m64 *)&xmmword_A79030);
  *(__m64 *)(a1 + 48) = _m_psubsw(v34, _m_paddsw(_m_pmulhw(v32, v30), v30));
  *(__m64 *)(a1 + 80) = _m_paddsw(v38, v30);
  *(__m64 *)(a1 + 112) = _m_psubsw(v37, v29);
  v39 = *(__m64 *)(a1 + 24);
  v40 = *(__m64 *)(a1 + 104);
  v41 = v39;
  v42 = *(__m64 *)(a1 + 40);
  v43 = _m_psllw(_m_paddsw(v39, v40), 3u);
  v44 = _m_psllw(_m_paddsw(*(__m64 *)(a1 + 88), v42), 3u);
  v45 = v43;
  v46 = _m_psubsw(v41, v40);
  v47 = _m_psubsw(v43, v44);
  v48 = _m_psllw(_m_paddsw(*(__m64 *)(v1 + 8), *(__m64 *)(v1 + 120)), 3u);
  v49 = _m_paddsw(v45, v44);
  v50 = _m_psllw(_m_paddsw(*(__m64 *)(v1 + 56), *(__m64 *)(v1 + 72)), 3u);
  v51 = v48;
  v52 = _m_psubsw(v48, v50);
  v53 = _m_paddsw(v51, v50);
  v54 = _m_por(_m_paddsw(_m_pmulhw(*(__m64 *)&xmmword_A79060, v47), v52), *(__m64 *)&xmmword_A79030);
  v55 = _m_psllw(v46, 4u);
  v56 = _m_pmulhw(v52, *(__m64 *)&xmmword_A79060);
  v57 = _m_psubsw(v42, *(__m64 *)(a1 + 88));
  *(__m64 *)(a1 + 40) = v54;
  v58 = _m_paddsw(v53, v49);
  v59 = _m_psllw(v57, 4u);
  v60 = _m_psubsw(*(__m64 *)(v1 + 56), *(__m64 *)(v1 + 72));
  *(__m64 *)(a1 + 72) = _m_psubsw(v53, v49);
  v61 = _m_pmulhw(_m_psubsw(v55, v59), *(__m64 *)&xmmword_A79090);
  v62 = _m_por(_m_psubsw(v56, v47), *(__m64 *)&xmmword_A79030);
  v63 = _m_psllw(v60, 3u);
  v64 = _m_por(_m_pmulhw(_m_paddsw(v55, v59), *(__m64 *)&xmmword_A79090), *(__m64 *)&xmmword_A79030);
  v65 = v63;
  v66 = _m_paddsw(v63, v61);
  v67 = _m_psubsw(v65, v61);
  v68 = _m_psllw(_m_psubsw(*(__m64 *)(v1 + 8), *(__m64 *)(v1 + 120)), 3u);
  v69.m64_u64 = xmmword_A79070;
  v70 = _m_pmulhw(*(__m64 *)&xmmword_A79050, v66);
  *(__m64 *)(a1 + 8) = v58;
  *(__m64 *)(a1 + 104) = v62;
  v71 = _m_psubsw(v68, v64);
  v72 = _m_paddsw(v68, v64);
  v73 = _m_paddsw(v70, v72);
  v74 = _m_pmulhw(v72, *(__m64 *)&xmmword_A79050);
  v75 = _m_paddsw(_m_pmulhw(*(__m64 *)&xmmword_A79070, v71), v71);
  *(__m64 *)(a1 + 24) = _m_por(v73, *(__m64 *)&xmmword_A79030);
  *(__m64 *)(a1 + 56) = _m_psubsw(v71, _m_paddsw(_m_pmulhw(v69, v67), v67));
  *(__m64 *)(a1 + 88) = _m_paddsw(v75, v67);
  *(__m64 *)(a1 + 120) = _m_psubsw(v74, v66);
  v76.m64_u64 = xmmword_A79040;
  v77 = _m_punpcklwd(_m_psrlq(*(__m64 *)(a1 + 8), 0x20u), *(__m64 *)(a1 + 8));
  v78 = _m_punpcklwd(_m_psrlq(v77, 0x20u), v77);
  v79 = _m_paddsw(*(__m64 *)a1, v78);
  v80 = _m_psubsw(*(__m64 *)a1, v78);
  v81 = v79;
  v82 = _m_punpckldq(v79, v80);
  v83 = _m_punpckhdq(v81, v80);
  v84 = _m_psrad(
          _m_paddd(
            _m_paddd(_m_pmaddwd((__m64)qword_A790A0, v82), *(__m64 *)&xmmword_A79040),
            _m_pmaddwd((__m64)qword_A790A8, v83)),
          0x14u);
  v85 = _m_psrad(
          _m_paddd(
            _m_paddd(_m_pmaddwd((__m64)qword_A790B0, v82), *(__m64 *)&xmmword_A79040),
            _m_pmaddwd((__m64)qword_A790B8, v83)),
          0x14u);
  v86 = _m_psrad(
          _m_paddd(
            _m_paddd(_m_pmaddwd((__m64)qword_A790C0, v82), *(__m64 *)&xmmword_A79040),
            _m_pmaddwd((__m64)qword_A790C8, v83)),
          0x14u);
  v87 = _m_psrad(
          _m_paddd(
            _m_paddd(_m_pmaddwd(v82, (__m64)qword_A790D0), *(__m64 *)&xmmword_A79040),
            _m_pmaddwd(v83, (__m64)qword_A790D8)),
          0x14u);
  *(__m64 *)a1 = _m_packssdw(v84, v85);
  v88 = _m_packssdw(v86, v87);
  v89 = *(__m64 *)(a1 + 16);
  *(__m64 *)(a1 + 8) = v88;
  v90 = v89;
  v91 = _m_punpcklwd(_m_psrlq(*(__m64 *)(a1 + 24), 0x20u), *(__m64 *)(a1 + 24));
  v92 = _m_punpcklwd(_m_psrlq(v91, 0x20u), v91);
  v93 = _m_paddsw(v89, v92);
  v94 = _m_psubsw(v90, v92);
  v95 = v93;
  v96 = _m_punpckldq(v93, v94);
  v97 = _m_punpckhdq(v95, v94);
  v98 = _m_pmaddwd((__m64)qword_A79100, v96);
  v99 = _m_psrad(
          _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A790E0, v96), v76), _m_pmaddwd((__m64)qword_A790E8, v97)),
          0x14u);
  v100 = _m_pmaddwd((__m64)qword_A79108, v97);
  v101 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A790F0, v96), v76), _m_pmaddwd((__m64)qword_A790F8, v97)),
           0x14u);
  v102 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd(v96, (__m64)qword_A79110), v76), _m_pmaddwd(v97, (__m64)qword_A79118)),
           0x14u);
  *(__m64 *)(a1 + 16) = _m_packssdw(v99, v101);
  v103 = _m_packssdw(_m_psrad(_m_paddd(_m_paddd(v98, v76), v100), 0x14u), v102);
  v104 = *(__m64 *)(a1 + 32);
  *(__m64 *)(a1 + 24) = v103;
  v105 = v104;
  v106 = _m_punpcklwd(_m_psrlq(*(__m64 *)(a1 + 40), 0x20u), *(__m64 *)(a1 + 40));
  v107 = _m_punpcklwd(_m_psrlq(v106, 0x20u), v106);
  v108 = _m_paddsw(v104, v107);
  v109 = _m_psubsw(v105, v107);
  v110 = v108;
  v111 = _m_punpckldq(v108, v109);
  v112 = _m_punpckhdq(v110, v109);
  v113 = _m_pmaddwd((__m64)qword_A79140, v111);
  v114 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A79120, v111), v76), _m_pmaddwd((__m64)qword_A79128, v112)),
           0x14u);
  v115 = _m_pmaddwd((__m64)qword_A79148, v112);
  v116 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A79130, v111), v76), _m_pmaddwd((__m64)qword_A79138, v112)),
           0x14u);
  v117 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd(v111, (__m64)qword_A79150), v76), _m_pmaddwd(v112, (__m64)qword_A79158)),
           0x14u);
  *(__m64 *)(a1 + 32) = _m_packssdw(v114, v116);
  v118 = _m_packssdw(_m_psrad(_m_paddd(_m_paddd(v113, v76), v115), 0x14u), v117);
  v119 = *(__m64 *)(a1 + 48);
  *(__m64 *)(a1 + 40) = v118;
  v120 = v119;
  v121 = _m_punpcklwd(_m_psrlq(*(__m64 *)(a1 + 56), 0x20u), *(__m64 *)(a1 + 56));
  v122 = _m_punpcklwd(_m_psrlq(v121, 0x20u), v121);
  v123 = _m_paddsw(v119, v122);
  v124 = _m_psubsw(v120, v122);
  v125 = v123;
  v126 = _m_punpckldq(v123, v124);
  v127 = _m_punpckhdq(v125, v124);
  v128 = _m_pmaddwd((__m64)qword_A79180, v126);
  v129 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A79160, v126), v76), _m_pmaddwd((__m64)qword_A79168, v127)),
           0x14u);
  v130 = _m_pmaddwd((__m64)qword_A79188, v127);
  v131 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A79170, v126), v76), _m_pmaddwd((__m64)qword_A79178, v127)),
           0x14u);
  v132 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd(v126, (__m64)qword_A79190), v76), _m_pmaddwd(v127, (__m64)qword_A79198)),
           0x14u);
  *(__m64 *)(a1 + 48) = _m_packssdw(v129, v131);
  v133 = _m_packssdw(_m_psrad(_m_paddd(_m_paddd(v128, v76), v130), 0x14u), v132);
  v134 = *(__m64 *)(a1 + 64);
  *(__m64 *)(a1 + 56) = v133;
  v135 = v134;
  v136 = _m_punpcklwd(_m_psrlq(*(__m64 *)(a1 + 72), 0x20u), *(__m64 *)(a1 + 72));
  v137 = _m_punpcklwd(_m_psrlq(v136, 0x20u), v136);
  v138 = _m_paddsw(v134, v137);
  v139 = _m_psubsw(v135, v137);
  v140 = v138;
  v141 = _m_punpckldq(v138, v139);
  v142 = _m_punpckhdq(v140, v139);
  v143 = _m_pmaddwd((__m64)qword_A790C0, v141);
  v144 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A790A0, v141), v76), _m_pmaddwd((__m64)qword_A790A8, v142)),
           0x14u);
  v145 = _m_pmaddwd((__m64)qword_A790C8, v142);
  v146 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A790B0, v141), v76), _m_pmaddwd((__m64)qword_A790B8, v142)),
           0x14u);
  v147 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd(v141, (__m64)qword_A790D0), v76), _m_pmaddwd(v142, (__m64)qword_A790D8)),
           0x14u);
  *(__m64 *)(a1 + 64) = _m_packssdw(v144, v146);
  v148 = _m_packssdw(_m_psrad(_m_paddd(_m_paddd(v143, v76), v145), 0x14u), v147);
  v149 = *(__m64 *)(a1 + 80);
  *(__m64 *)(a1 + 72) = v148;
  v150 = v149;
  v151 = _m_punpcklwd(_m_psrlq(*(__m64 *)(a1 + 88), 0x20u), *(__m64 *)(a1 + 88));
  v152 = _m_punpcklwd(_m_psrlq(v151, 0x20u), v151);
  v153 = _m_paddsw(v149, v152);
  v154 = _m_psubsw(v150, v152);
  v155 = v153;
  v156 = _m_punpckldq(v153, v154);
  v157 = _m_punpckhdq(v155, v154);
  v158 = _m_pmaddwd((__m64)qword_A79180, v156);
  v159 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A79160, v156), v76), _m_pmaddwd((__m64)qword_A79168, v157)),
           0x14u);
  v160 = _m_pmaddwd((__m64)qword_A79188, v157);
  v161 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A79170, v156), v76), _m_pmaddwd((__m64)qword_A79178, v157)),
           0x14u);
  v162 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd(v156, (__m64)qword_A79190), v76), _m_pmaddwd(v157, (__m64)qword_A79198)),
           0x14u);
  *(__m64 *)(a1 + 80) = _m_packssdw(v159, v161);
  v163 = _m_packssdw(_m_psrad(_m_paddd(_m_paddd(v158, v76), v160), 0x14u), v162);
  v164 = *(__m64 *)(a1 + 96);
  *(__m64 *)(a1 + 88) = v163;
  v165 = v164;
  v166 = _m_punpcklwd(_m_psrlq(*(__m64 *)(a1 + 104), 0x20u), *(__m64 *)(a1 + 104));
  v167 = _m_punpcklwd(_m_psrlq(v166, 0x20u), v166);
  v168 = _m_paddsw(v164, v167);
  v169 = _m_psubsw(v165, v167);
  v170 = v168;
  v171 = _m_punpckldq(v168, v169);
  v172 = _m_punpckhdq(v170, v169);
  v173 = _m_pmaddwd((__m64)qword_A79140, v171);
  v174 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A79120, v171), v76), _m_pmaddwd((__m64)qword_A79128, v172)),
           0x14u);
  v175 = _m_pmaddwd((__m64)qword_A79148, v172);
  v176 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A79130, v171), v76), _m_pmaddwd((__m64)qword_A79138, v172)),
           0x14u);
  v177 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd(v171, (__m64)qword_A79150), v76), _m_pmaddwd(v172, (__m64)qword_A79158)),
           0x14u);
  *(__m64 *)(a1 + 96) = _m_packssdw(v174, v176);
  v178 = _m_packssdw(_m_psrad(_m_paddd(_m_paddd(v173, v76), v175), 0x14u), v177);
  v179 = *(__m64 *)(a1 + 112);
  *(__m64 *)(a1 + 104) = v178;
  v180 = v179;
  v181 = _m_punpcklwd(_m_psrlq(*(__m64 *)(a1 + 120), 0x20u), *(__m64 *)(a1 + 120));
  v182 = _m_punpcklwd(_m_psrlq(v181, 0x20u), v181);
  v183 = _m_paddsw(v179, v182);
  v184 = _m_psubsw(v180, v182);
  v185 = v183;
  v186 = _m_punpckldq(v183, v184);
  v187 = _m_punpckhdq(v185, v184);
  v188 = _m_pmaddwd((__m64)qword_A79100, v186);
  v189 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A790E0, v186), v76), _m_pmaddwd((__m64)qword_A790E8, v187)),
           0x14u);
  v190 = _m_pmaddwd((__m64)qword_A79108, v187);
  v191 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A790F0, v186), v76), _m_pmaddwd((__m64)qword_A790F8, v187)),
           0x14u);
  v192 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd(v186, (__m64)qword_A79110), v76), _m_pmaddwd(v187, (__m64)qword_A79118)),
           0x14u);
  *(__m64 *)(a1 + 112) = _m_packssdw(v189, v191);
  *(__m64 *)(a1 + 120) = _m_packssdw(_m_psrad(_m_paddd(_m_paddd(v188, v76), v190), 0x14u), v192);
}
// A79030: using guessed type __int128 xmmword_A79030;
// A79040: using guessed type __int128 xmmword_A79040;
// A79050: using guessed type __int128 xmmword_A79050;
// A79060: using guessed type __int128 xmmword_A79060;
// A79070: using guessed type __int128 xmmword_A79070;
// A79090: using guessed type __int128 xmmword_A79090;
// A790A0: using guessed type __int64 qword_A790A0;
// A790A8: using guessed type __int64 qword_A790A8;
// A790B0: using guessed type __int64 qword_A790B0;
// A790B8: using guessed type __int64 qword_A790B8;
// A790C0: using guessed type __int64 qword_A790C0;
// A790C8: using guessed type __int64 qword_A790C8;
// A790D0: using guessed type __int64 qword_A790D0;
// A790D8: using guessed type __int64 qword_A790D8;
// A790E0: using guessed type __int64 qword_A790E0;
// A790E8: using guessed type __int64 qword_A790E8;
// A790F0: using guessed type __int64 qword_A790F0;
// A790F8: using guessed type __int64 qword_A790F8;
// A79100: using guessed type __int64 qword_A79100;
// A79108: using guessed type __int64 qword_A79108;
// A79110: using guessed type __int64 qword_A79110;
// A79118: using guessed type __int64 qword_A79118;
// A79120: using guessed type __int64 qword_A79120;
// A79128: using guessed type __int64 qword_A79128;
// A79130: using guessed type __int64 qword_A79130;
// A79138: using guessed type __int64 qword_A79138;
// A79140: using guessed type __int64 qword_A79140;
// A79148: using guessed type __int64 qword_A79148;
// A79150: using guessed type __int64 qword_A79150;
// A79158: using guessed type __int64 qword_A79158;
// A79160: using guessed type __int64 qword_A79160;
// A79168: using guessed type __int64 qword_A79168;
// A79170: using guessed type __int64 qword_A79170;
// A79178: using guessed type __int64 qword_A79178;
// A79180: using guessed type __int64 qword_A79180;
// A79188: using guessed type __int64 qword_A79188;
// A79190: using guessed type __int64 qword_A79190;
// A79198: using guessed type __int64 qword_A79198;

//----- (007957D0) --------------------------------------------------------
void __cdecl own_dct_2d_16s_8x8_frv_a6(int a1)
{
  int v1; // ecx@1
  __m64 v2; // mm0@1
  __m64 v3; // mm1@1
  __m64 v4; // mm2@1
  __m64 v5; // mm3@1
  __m64 v6; // mm0@1
  __m64 v7; // mm4@1
  __m64 v8; // mm6@1
  __m64 v9; // mm2@1
  __m64 v10; // mm0@1
  __m64 v11; // mm5@1
  __m64 v12; // mm6@1
  __m64 v13; // mm7@1
  __m64 v14; // mm4@1
  __m64 v15; // mm5@1
  __m64 v16; // mm4@1
  __m64 v17; // mm1@1
  __m64 v18; // mm2@1
  __m64 v19; // mm5@1
  __m64 v20; // mm3@1
  __m64 v21; // mm7@1
  __m64 v22; // mm3@1
  __m64 v23; // mm1@1
  __m64 v24; // mm6@1
  __m64 v25; // mm5@1
  __m64 v26; // mm1@1
  __m64 v27; // mm2@1
  __m64 v28; // mm4@1
  __m64 v29; // mm1@1
  __m64 v30; // mm4@1
  __m64 v31; // mm3@1
  __m64 v32; // mm6@1
  __m64 v33; // mm0@1
  __m64 v34; // mm7@1
  __m64 v35; // mm3@1
  __m64 v36; // mm0@1
  __m64 v37; // mm3@1
  __m64 v38; // mm5@1
  __m64 v39; // mm0@1
  __m64 v40; // mm1@1
  __m64 v41; // mm2@1
  __m64 v42; // mm3@1
  __m64 v43; // mm0@1
  __m64 v44; // mm4@1
  __m64 v45; // mm6@1
  __m64 v46; // mm2@1
  __m64 v47; // mm0@1
  __m64 v48; // mm5@1
  __m64 v49; // mm6@1
  __m64 v50; // mm7@1
  __m64 v51; // mm4@1
  __m64 v52; // mm5@1
  __m64 v53; // mm4@1
  __m64 v54; // mm1@1
  __m64 v55; // mm2@1
  __m64 v56; // mm5@1
  __m64 v57; // mm3@1
  __m64 v58; // mm7@1
  __m64 v59; // mm3@1
  __m64 v60; // mm1@1
  __m64 v61; // mm6@1
  __m64 v62; // mm5@1
  __m64 v63; // mm1@1
  __m64 v64; // mm2@1
  __m64 v65; // mm4@1
  __m64 v66; // mm1@1
  __m64 v67; // mm4@1
  __m64 v68; // mm3@1
  __m64 v69; // mm6@1
  __m64 v70; // mm0@1
  __m64 v71; // mm7@1
  __m64 v72; // mm3@1
  __m64 v73; // mm0@1
  __m64 v74; // mm3@1
  __m64 v75; // mm5@1
  __m64 v76; // mm7@1
  __m64 v77; // mm1@1
  __m64 v78; // mm0@1
  __m64 v79; // mm2@1
  __m64 v80; // mm1@1
  __m64 v81; // mm0@1
  __m64 v82; // mm1@1
  __m64 v83; // mm3@1
  __m64 v84; // mm5@1
  __m64 v85; // mm2@1
  __m64 v86; // mm0@1
  __m64 v87; // mm2@1
  __m64 v88; // mm0@1
  __m64 v89; // mm2@1
  __m64 v90; // mm1@1
  __m64 v91; // mm0@1
  __m64 v92; // mm2@1
  __m64 v93; // mm1@1
  __m64 v94; // mm0@1
  __m64 v95; // mm1@1
  __m64 v96; // mm2@1
  __m64 v97; // mm3@1
  __m64 v98; // mm4@1
  __m64 v99; // mm5@1
  __m64 v100; // mm0@1
  __m64 v101; // mm2@1
  __m64 v102; // mm0@1
  __m64 v103; // mm2@1
  __m64 v104; // mm1@1
  __m64 v105; // mm0@1
  __m64 v106; // mm2@1
  __m64 v107; // mm1@1
  __m64 v108; // mm0@1
  __m64 v109; // mm1@1
  __m64 v110; // mm2@1
  __m64 v111; // mm3@1
  __m64 v112; // mm4@1
  __m64 v113; // mm5@1
  __m64 v114; // mm0@1
  __m64 v115; // mm2@1
  __m64 v116; // mm0@1
  __m64 v117; // mm2@1
  __m64 v118; // mm1@1
  __m64 v119; // mm0@1
  __m64 v120; // mm2@1
  __m64 v121; // mm1@1
  __m64 v122; // mm0@1
  __m64 v123; // mm1@1
  __m64 v124; // mm2@1
  __m64 v125; // mm3@1
  __m64 v126; // mm4@1
  __m64 v127; // mm5@1
  __m64 v128; // mm0@1
  __m64 v129; // mm2@1
  __m64 v130; // mm0@1
  __m64 v131; // mm2@1
  __m64 v132; // mm1@1
  __m64 v133; // mm0@1
  __m64 v134; // mm2@1
  __m64 v135; // mm1@1
  __m64 v136; // mm0@1
  __m64 v137; // mm1@1
  __m64 v138; // mm2@1
  __m64 v139; // mm3@1
  __m64 v140; // mm4@1
  __m64 v141; // mm5@1
  __m64 v142; // mm0@1
  __m64 v143; // mm2@1
  __m64 v144; // mm0@1
  __m64 v145; // mm2@1
  __m64 v146; // mm1@1
  __m64 v147; // mm0@1
  __m64 v148; // mm2@1
  __m64 v149; // mm1@1
  __m64 v150; // mm0@1
  __m64 v151; // mm1@1
  __m64 v152; // mm2@1
  __m64 v153; // mm3@1
  __m64 v154; // mm4@1
  __m64 v155; // mm5@1
  __m64 v156; // mm0@1
  __m64 v157; // mm2@1
  __m64 v158; // mm0@1
  __m64 v159; // mm2@1
  __m64 v160; // mm1@1
  __m64 v161; // mm0@1
  __m64 v162; // mm2@1
  __m64 v163; // mm1@1
  __m64 v164; // mm0@1
  __m64 v165; // mm1@1
  __m64 v166; // mm2@1
  __m64 v167; // mm3@1
  __m64 v168; // mm4@1
  __m64 v169; // mm5@1
  __m64 v170; // mm0@1
  __m64 v171; // mm2@1
  __m64 v172; // mm0@1
  __m64 v173; // mm2@1
  __m64 v174; // mm1@1
  __m64 v175; // mm0@1
  __m64 v176; // mm2@1
  __m64 v177; // mm1@1
  __m64 v178; // mm0@1
  __m64 v179; // mm1@1
  __m64 v180; // mm2@1
  __m64 v181; // mm3@1
  __m64 v182; // mm4@1
  __m64 v183; // mm5@1
  __m64 v184; // mm0@1

  v1 = a1;
  v2 = *(__m64 *)(a1 + 16);
  v3 = *(__m64 *)(a1 + 96);
  v4 = v2;
  v5 = *(__m64 *)(a1 + 32);
  v6 = _m_psllw(_m_paddsw(v2, v3), 3u);
  v7 = _m_psllw(_m_paddsw(*(__m64 *)(a1 + 80), v5), 3u);
  v8 = v6;
  v9 = _m_psubsw(v4, v3);
  v10 = _m_psubsw(v6, v7);
  v11 = _m_psllw(_m_paddsw(*(__m64 *)a1, *(__m64 *)(a1 + 112)), 3u);
  v12 = _m_paddsw(v8, v7);
  v13 = _m_psllw(_m_paddsw(*(__m64 *)(a1 + 48), *(__m64 *)(a1 + 64)), 3u);
  v14 = v11;
  v15 = _m_psubsw(v11, v13);
  v16 = _m_paddsw(v14, v13);
  v17 = _m_por(_m_paddsw(_m_pmulhw(*(__m64 *)&xmmword_A79060, v10), v15), *(__m64 *)&xmmword_A79030);
  v18 = _m_psllw(v9, 4u);
  v19 = _m_pmulhw(v15, *(__m64 *)&xmmword_A79060);
  v20 = _m_psubsw(v5, *(__m64 *)(a1 + 80));
  *(__m64 *)(a1 + 32) = v17;
  v21 = _m_paddsw(v16, v12);
  v22 = _m_psllw(v20, 4u);
  v23 = _m_psubsw(*(__m64 *)(v1 + 48), *(__m64 *)(v1 + 64));
  *(__m64 *)(a1 + 64) = _m_psubsw(v16, v12);
  v24 = _m_pmulhw(_m_psubsw(v18, v22), *(__m64 *)&xmmword_A79090);
  v25 = _m_por(_m_psubsw(v19, v10), *(__m64 *)&xmmword_A79030);
  v26 = _m_psllw(v23, 3u);
  v27 = _m_por(_m_pmulhw(_m_paddsw(v18, v22), *(__m64 *)&xmmword_A79090), *(__m64 *)&xmmword_A79030);
  v28 = v26;
  v29 = _m_paddsw(v26, v24);
  v30 = _m_psubsw(v28, v24);
  v31 = _m_psllw(_m_psubsw(*(__m64 *)v1, *(__m64 *)(v1 + 112)), 3u);
  v32.m64_u64 = xmmword_A79070;
  v33 = _m_pmulhw(*(__m64 *)&xmmword_A79050, v29);
  *(__m64 *)a1 = v21;
  *(__m64 *)(a1 + 96) = v25;
  v34 = _m_psubsw(v31, v27);
  v35 = _m_paddsw(v31, v27);
  v36 = _m_paddsw(v33, v35);
  v37 = _m_pmulhw(v35, *(__m64 *)&xmmword_A79050);
  v38 = _m_paddsw(_m_pmulhw(*(__m64 *)&xmmword_A79070, v34), v34);
  *(__m64 *)(a1 + 16) = _m_por(v36, *(__m64 *)&xmmword_A79030);
  *(__m64 *)(a1 + 48) = _m_psubsw(v34, _m_paddsw(_m_pmulhw(v32, v30), v30));
  *(__m64 *)(a1 + 80) = _m_paddsw(v38, v30);
  *(__m64 *)(a1 + 112) = _m_psubsw(v37, v29);
  v39 = *(__m64 *)(a1 + 24);
  v40 = *(__m64 *)(a1 + 104);
  v41 = v39;
  v42 = *(__m64 *)(a1 + 40);
  v43 = _m_psllw(_m_paddsw(v39, v40), 3u);
  v44 = _m_psllw(_m_paddsw(*(__m64 *)(a1 + 88), v42), 3u);
  v45 = v43;
  v46 = _m_psubsw(v41, v40);
  v47 = _m_psubsw(v43, v44);
  v48 = _m_psllw(_m_paddsw(*(__m64 *)(v1 + 8), *(__m64 *)(v1 + 120)), 3u);
  v49 = _m_paddsw(v45, v44);
  v50 = _m_psllw(_m_paddsw(*(__m64 *)(v1 + 56), *(__m64 *)(v1 + 72)), 3u);
  v51 = v48;
  v52 = _m_psubsw(v48, v50);
  v53 = _m_paddsw(v51, v50);
  v54 = _m_por(_m_paddsw(_m_pmulhw(*(__m64 *)&xmmword_A79060, v47), v52), *(__m64 *)&xmmword_A79030);
  v55 = _m_psllw(v46, 4u);
  v56 = _m_pmulhw(v52, *(__m64 *)&xmmword_A79060);
  v57 = _m_psubsw(v42, *(__m64 *)(a1 + 88));
  *(__m64 *)(a1 + 40) = v54;
  v58 = _m_paddsw(v53, v49);
  v59 = _m_psllw(v57, 4u);
  v60 = _m_psubsw(*(__m64 *)(v1 + 56), *(__m64 *)(v1 + 72));
  *(__m64 *)(a1 + 72) = _m_psubsw(v53, v49);
  v61 = _m_pmulhw(_m_psubsw(v55, v59), *(__m64 *)&xmmword_A79090);
  v62 = _m_por(_m_psubsw(v56, v47), *(__m64 *)&xmmword_A79030);
  v63 = _m_psllw(v60, 3u);
  v64 = _m_por(_m_pmulhw(_m_paddsw(v55, v59), *(__m64 *)&xmmword_A79090), *(__m64 *)&xmmword_A79030);
  v65 = v63;
  v66 = _m_paddsw(v63, v61);
  v67 = _m_psubsw(v65, v61);
  v68 = _m_psllw(_m_psubsw(*(__m64 *)(v1 + 8), *(__m64 *)(v1 + 120)), 3u);
  v69.m64_u64 = xmmword_A79070;
  v70 = _m_pmulhw(*(__m64 *)&xmmword_A79050, v66);
  *(__m64 *)(a1 + 8) = v58;
  *(__m64 *)(a1 + 104) = v62;
  v71 = _m_psubsw(v68, v64);
  v72 = _m_paddsw(v68, v64);
  v73 = _m_paddsw(v70, v72);
  v74 = _m_pmulhw(v72, *(__m64 *)&xmmword_A79050);
  v75 = _m_paddsw(_m_pmulhw(*(__m64 *)&xmmword_A79070, v71), v71);
  *(__m64 *)(a1 + 24) = _m_por(v73, *(__m64 *)&xmmword_A79030);
  *(__m64 *)(a1 + 56) = _m_psubsw(v71, _m_paddsw(_m_pmulhw(v69, v67), v67));
  *(__m64 *)(a1 + 88) = _m_paddsw(v75, v67);
  *(__m64 *)(a1 + 120) = _m_psubsw(v74, v66);
  v76.m64_u64 = xmmword_A79040;
  v77 = _m_pshufw(*(__m64 *)(a1 + 8), 27);
  v78 = _m_paddsw(*(__m64 *)a1, v77);
  v79 = _m_psubsw(*(__m64 *)a1, v77);
  v80 = v78;
  v81 = _m_punpckldq(v78, v79);
  v82 = _m_punpckhdq(v80, v79);
  v83 = _m_psrad(
          _m_paddd(
            _m_paddd(_m_pmaddwd((__m64)qword_A790A0, v81), *(__m64 *)&xmmword_A79040),
            _m_pmaddwd((__m64)qword_A790A8, v82)),
          0x14u);
  v84 = _m_psrad(
          _m_paddd(
            _m_paddd(_m_pmaddwd((__m64)qword_A790B0, v81), *(__m64 *)&xmmword_A79040),
            _m_pmaddwd((__m64)qword_A790B8, v82)),
          0x14u);
  v85 = _m_psrad(
          _m_paddd(
            _m_paddd(_m_pmaddwd((__m64)qword_A790C0, v81), *(__m64 *)&xmmword_A79040),
            _m_pmaddwd((__m64)qword_A790C8, v82)),
          0x14u);
  v86 = _m_psrad(
          _m_paddd(
            _m_paddd(_m_pmaddwd(v81, (__m64)qword_A790D0), *(__m64 *)&xmmword_A79040),
            _m_pmaddwd(v82, (__m64)qword_A790D8)),
          0x14u);
  *(__m64 *)a1 = _m_packssdw(v83, v84);
  v87 = _m_packssdw(v85, v86);
  v88 = *(__m64 *)(a1 + 16);
  *(__m64 *)(a1 + 8) = v87;
  v89 = v88;
  v90 = _m_pshufw(*(__m64 *)(a1 + 24), 27);
  v91 = _m_paddsw(v88, v90);
  v92 = _m_psubsw(v89, v90);
  v93 = v91;
  v94 = _m_punpckldq(v91, v92);
  v95 = _m_punpckhdq(v93, v92);
  v96 = _m_pmaddwd((__m64)qword_A79100, v94);
  v97 = _m_psrad(
          _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A790E0, v94), v76), _m_pmaddwd((__m64)qword_A790E8, v95)),
          0x14u);
  v98 = _m_pmaddwd((__m64)qword_A79108, v95);
  v99 = _m_psrad(
          _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A790F0, v94), v76), _m_pmaddwd((__m64)qword_A790F8, v95)),
          0x14u);
  v100 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd(v94, (__m64)qword_A79110), v76), _m_pmaddwd(v95, (__m64)qword_A79118)),
           0x14u);
  *(__m64 *)(a1 + 16) = _m_packssdw(v97, v99);
  v101 = _m_packssdw(_m_psrad(_m_paddd(_m_paddd(v96, v76), v98), 0x14u), v100);
  v102 = *(__m64 *)(a1 + 32);
  *(__m64 *)(a1 + 24) = v101;
  v103 = v102;
  v104 = _m_pshufw(*(__m64 *)(a1 + 40), 27);
  v105 = _m_paddsw(v102, v104);
  v106 = _m_psubsw(v103, v104);
  v107 = v105;
  v108 = _m_punpckldq(v105, v106);
  v109 = _m_punpckhdq(v107, v106);
  v110 = _m_pmaddwd((__m64)qword_A79140, v108);
  v111 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A79120, v108), v76), _m_pmaddwd((__m64)qword_A79128, v109)),
           0x14u);
  v112 = _m_pmaddwd((__m64)qword_A79148, v109);
  v113 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A79130, v108), v76), _m_pmaddwd((__m64)qword_A79138, v109)),
           0x14u);
  v114 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd(v108, (__m64)qword_A79150), v76), _m_pmaddwd(v109, (__m64)qword_A79158)),
           0x14u);
  *(__m64 *)(a1 + 32) = _m_packssdw(v111, v113);
  v115 = _m_packssdw(_m_psrad(_m_paddd(_m_paddd(v110, v76), v112), 0x14u), v114);
  v116 = *(__m64 *)(a1 + 48);
  *(__m64 *)(a1 + 40) = v115;
  v117 = v116;
  v118 = _m_pshufw(*(__m64 *)(a1 + 56), 27);
  v119 = _m_paddsw(v116, v118);
  v120 = _m_psubsw(v117, v118);
  v121 = v119;
  v122 = _m_punpckldq(v119, v120);
  v123 = _m_punpckhdq(v121, v120);
  v124 = _m_pmaddwd((__m64)qword_A79180, v122);
  v125 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A79160, v122), v76), _m_pmaddwd((__m64)qword_A79168, v123)),
           0x14u);
  v126 = _m_pmaddwd((__m64)qword_A79188, v123);
  v127 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A79170, v122), v76), _m_pmaddwd((__m64)qword_A79178, v123)),
           0x14u);
  v128 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd(v122, (__m64)qword_A79190), v76), _m_pmaddwd(v123, (__m64)qword_A79198)),
           0x14u);
  *(__m64 *)(a1 + 48) = _m_packssdw(v125, v127);
  v129 = _m_packssdw(_m_psrad(_m_paddd(_m_paddd(v124, v76), v126), 0x14u), v128);
  v130 = *(__m64 *)(a1 + 64);
  *(__m64 *)(a1 + 56) = v129;
  v131 = v130;
  v132 = _m_pshufw(*(__m64 *)(a1 + 72), 27);
  v133 = _m_paddsw(v130, v132);
  v134 = _m_psubsw(v131, v132);
  v135 = v133;
  v136 = _m_punpckldq(v133, v134);
  v137 = _m_punpckhdq(v135, v134);
  v138 = _m_pmaddwd((__m64)qword_A790C0, v136);
  v139 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A790A0, v136), v76), _m_pmaddwd((__m64)qword_A790A8, v137)),
           0x14u);
  v140 = _m_pmaddwd((__m64)qword_A790C8, v137);
  v141 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A790B0, v136), v76), _m_pmaddwd((__m64)qword_A790B8, v137)),
           0x14u);
  v142 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd(v136, (__m64)qword_A790D0), v76), _m_pmaddwd(v137, (__m64)qword_A790D8)),
           0x14u);
  *(__m64 *)(a1 + 64) = _m_packssdw(v139, v141);
  v143 = _m_packssdw(_m_psrad(_m_paddd(_m_paddd(v138, v76), v140), 0x14u), v142);
  v144 = *(__m64 *)(a1 + 80);
  *(__m64 *)(a1 + 72) = v143;
  v145 = v144;
  v146 = _m_pshufw(*(__m64 *)(a1 + 88), 27);
  v147 = _m_paddsw(v144, v146);
  v148 = _m_psubsw(v145, v146);
  v149 = v147;
  v150 = _m_punpckldq(v147, v148);
  v151 = _m_punpckhdq(v149, v148);
  v152 = _m_pmaddwd((__m64)qword_A79180, v150);
  v153 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A79160, v150), v76), _m_pmaddwd((__m64)qword_A79168, v151)),
           0x14u);
  v154 = _m_pmaddwd((__m64)qword_A79188, v151);
  v155 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A79170, v150), v76), _m_pmaddwd((__m64)qword_A79178, v151)),
           0x14u);
  v156 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd(v150, (__m64)qword_A79190), v76), _m_pmaddwd(v151, (__m64)qword_A79198)),
           0x14u);
  *(__m64 *)(a1 + 80) = _m_packssdw(v153, v155);
  v157 = _m_packssdw(_m_psrad(_m_paddd(_m_paddd(v152, v76), v154), 0x14u), v156);
  v158 = *(__m64 *)(a1 + 96);
  *(__m64 *)(a1 + 88) = v157;
  v159 = v158;
  v160 = _m_pshufw(*(__m64 *)(a1 + 104), 27);
  v161 = _m_paddsw(v158, v160);
  v162 = _m_psubsw(v159, v160);
  v163 = v161;
  v164 = _m_punpckldq(v161, v162);
  v165 = _m_punpckhdq(v163, v162);
  v166 = _m_pmaddwd((__m64)qword_A79140, v164);
  v167 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A79120, v164), v76), _m_pmaddwd((__m64)qword_A79128, v165)),
           0x14u);
  v168 = _m_pmaddwd((__m64)qword_A79148, v165);
  v169 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A79130, v164), v76), _m_pmaddwd((__m64)qword_A79138, v165)),
           0x14u);
  v170 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd(v164, (__m64)qword_A79150), v76), _m_pmaddwd(v165, (__m64)qword_A79158)),
           0x14u);
  *(__m64 *)(a1 + 96) = _m_packssdw(v167, v169);
  v171 = _m_packssdw(_m_psrad(_m_paddd(_m_paddd(v166, v76), v168), 0x14u), v170);
  v172 = *(__m64 *)(a1 + 112);
  *(__m64 *)(a1 + 104) = v171;
  v173 = v172;
  v174 = _m_pshufw(*(__m64 *)(a1 + 120), 27);
  v175 = _m_paddsw(v172, v174);
  v176 = _m_psubsw(v173, v174);
  v177 = v175;
  v178 = _m_punpckldq(v175, v176);
  v179 = _m_punpckhdq(v177, v176);
  v180 = _m_pmaddwd((__m64)qword_A79100, v178);
  v181 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A790E0, v178), v76), _m_pmaddwd((__m64)qword_A790E8, v179)),
           0x14u);
  v182 = _m_pmaddwd((__m64)qword_A79108, v179);
  v183 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd((__m64)qword_A790F0, v178), v76), _m_pmaddwd((__m64)qword_A790F8, v179)),
           0x14u);
  v184 = _m_psrad(
           _m_paddd(_m_paddd(_m_pmaddwd(v178, (__m64)qword_A79110), v76), _m_pmaddwd(v179, (__m64)qword_A79118)),
           0x14u);
  *(__m64 *)(a1 + 112) = _m_packssdw(v181, v183);
  *(__m64 *)(a1 + 120) = _m_packssdw(_m_psrad(_m_paddd(_m_paddd(v180, v76), v182), 0x14u), v184);
}
// A79030: using guessed type __int128 xmmword_A79030;
// A79040: using guessed type __int128 xmmword_A79040;
// A79050: using guessed type __int128 xmmword_A79050;
// A79060: using guessed type __int128 xmmword_A79060;
// A79070: using guessed type __int128 xmmword_A79070;
// A79090: using guessed type __int128 xmmword_A79090;
// A790A0: using guessed type __int64 qword_A790A0;
// A790A8: using guessed type __int64 qword_A790A8;
// A790B0: using guessed type __int64 qword_A790B0;
// A790B8: using guessed type __int64 qword_A790B8;
// A790C0: using guessed type __int64 qword_A790C0;
// A790C8: using guessed type __int64 qword_A790C8;
// A790D0: using guessed type __int64 qword_A790D0;
// A790D8: using guessed type __int64 qword_A790D8;
// A790E0: using guessed type __int64 qword_A790E0;
// A790E8: using guessed type __int64 qword_A790E8;
// A790F0: using guessed type __int64 qword_A790F0;
// A790F8: using guessed type __int64 qword_A790F8;
// A79100: using guessed type __int64 qword_A79100;
// A79108: using guessed type __int64 qword_A79108;
// A79110: using guessed type __int64 qword_A79110;
// A79118: using guessed type __int64 qword_A79118;
// A79120: using guessed type __int64 qword_A79120;
// A79128: using guessed type __int64 qword_A79128;
// A79130: using guessed type __int64 qword_A79130;
// A79138: using guessed type __int64 qword_A79138;
// A79140: using guessed type __int64 qword_A79140;
// A79148: using guessed type __int64 qword_A79148;
// A79150: using guessed type __int64 qword_A79150;
// A79158: using guessed type __int64 qword_A79158;
// A79160: using guessed type __int64 qword_A79160;
// A79168: using guessed type __int64 qword_A79168;
// A79170: using guessed type __int64 qword_A79170;
// A79178: using guessed type __int64 qword_A79178;
// A79180: using guessed type __int64 qword_A79180;
// A79188: using guessed type __int64 qword_A79188;
// A79190: using guessed type __int64 qword_A79190;
// A79198: using guessed type __int64 qword_A79198;

//----- (00795F30) --------------------------------------------------------
void **__cdecl own_dct_2d_16s_8x8_frv_w7(int a1)
{
  __int128 *v1; // edx@1
  void **result; // eax@2
  __m128i v3; // xmm0@4
  __m128i v4; // xmm1@4
  __m128i v5; // xmm2@4
  __m128i v6; // xmm3@4
  __m128i v7; // xmm0@4
  __m128i v8; // xmm5@4
  __m128i v9; // xmm2@4
  __m128i v10; // xmm4@4
  __m128i v11; // xmm6@4
  __m128i v12; // xmm0@4
  __m128i v13; // xmm6@4
  __m128i v14; // xmm7@4
  __m128i v15; // xmm4@4
  __m128i v16; // xmm5@4
  __m128i v17; // xmm4@4
  __m128i v18; // xmm1@4
  __m128i v19; // xmm2@4
  __m128i v20; // xmm5@4
  __m128i v21; // xmm3@4
  __m128i v22; // xmm7@4
  __m128i v23; // xmm3@4
  __m128i v24; // xmm1@4
  __m128i v25; // xmm6@4
  __m128i v26; // xmm5@4
  __m128i v27; // xmm1@4
  __m128i v28; // xmm2@4
  __m128i v29; // xmm4@4
  __m128i v30; // xmm1@4
  __m128i v31; // xmm4@4
  __m128i v32; // xmm3@4
  __m128i v33; // xmm6@4
  __m128i v34; // xmm0@4
  __m128i v35; // xmm7@4
  __m128i v36; // xmm3@4
  __m128i v37; // xmm0@4
  __m128i v38; // xmm3@4
  __m128i v39; // xmm5@4
  __m128 v40; // xmm0@5
  __m128 v41; // xmm1@5
  __m128i v42; // xmm2@5
  __m128i v43; // xmm0@5
  __m128i v44; // xmm1@5
  __m128i v45; // xmm0@5
  __m128i v46; // xmm1@5
  __m128i v47; // xmm4@5
  __m128i v48; // xmm0@5
  __m128i v49; // xmm4@5
  __m128i v50; // xmm2@5
  __m128i v51; // xmm6@5
  __m128i v52; // xmm5@5
  __m128 v53; // xmm0@5
  __m128 v54; // xmm1@5
  __m128i v55; // xmm2@5
  __m128i v56; // xmm0@5
  __m128i v57; // xmm1@5
  __m128i v58; // xmm0@5
  __m128i v59; // xmm1@5
  __m128i v60; // xmm4@5
  __m128i v61; // xmm0@5
  __m128i v62; // xmm4@5
  __m128i v63; // xmm2@5
  __m128i v64; // xmm6@5
  __m128i v65; // xmm5@5
  __m128 v66; // xmm0@5
  __m128 v67; // xmm1@5
  __m128i v68; // xmm2@5
  __m128i v69; // xmm0@5
  __m128i v70; // xmm1@5
  __m128i v71; // xmm0@5
  __m128i v72; // xmm1@5
  __m128i v73; // xmm4@5
  __m128i v74; // xmm0@5
  __m128i v75; // xmm4@5
  __m128i v76; // xmm2@5
  __m128i v77; // xmm6@5
  __m128i v78; // xmm5@5
  __m128 v79; // xmm0@5
  __m128 v80; // xmm1@5
  __m128i v81; // xmm2@5
  __m128i v82; // xmm0@5
  __m128i v83; // xmm1@5
  __m128i v84; // xmm0@5
  __m128i v85; // xmm1@5
  __m128i v86; // xmm4@5
  __m128i v87; // xmm0@5
  __m128i v88; // xmm4@5
  __m128i v89; // xmm2@5
  __m128i v90; // xmm6@5
  __m128i v91; // xmm5@5
  __m128i v92; // xmm0@6
  __m128i v93; // xmm1@6
  __m128i v94; // xmm2@6
  __m128i v95; // xmm3@6
  __m128i v96; // xmm0@6
  __m128i v97; // xmm5@6
  __m128i v98; // xmm2@6
  __m128i v99; // xmm4@6
  __m128i v100; // xmm6@6
  __m128i v101; // xmm0@6
  __m128i v102; // xmm6@6
  __m128i v103; // xmm7@6
  __m128i v104; // xmm4@6
  __m128i v105; // xmm5@6
  __m128i v106; // xmm4@6
  __m128i v107; // xmm1@6
  __m128i v108; // xmm2@6
  __m128i v109; // xmm5@6
  __m128i v110; // xmm7@6
  __m128i v111; // xmm3@6
  __m128i v112; // xmm1@6
  __m128i v113; // xmm6@6
  __m128i v114; // xmm5@6
  __m128i v115; // xmm1@6
  __m128i v116; // xmm2@6
  __m128i v117; // xmm4@6
  __m128i v118; // xmm1@6
  __m128i v119; // xmm4@6
  __m128i v120; // xmm3@6
  __m128i v121; // xmm6@6
  __m128i v122; // xmm0@6
  __m128i v123; // xmm7@6
  __m128i v124; // xmm3@6
  __m128i v125; // xmm0@6
  __m128i v126; // xmm3@6
  __m128i v127; // xmm5@6
  __m128 v128; // xmm0@7
  __m128 v129; // xmm1@7
  __m128i v130; // xmm2@7
  __m128i v131; // xmm0@7
  __m128i v132; // xmm1@7
  __m128i v133; // xmm0@7
  __m128i v134; // xmm1@7
  __m128i v135; // xmm4@7
  __m128i v136; // xmm0@7
  __m128i v137; // xmm4@7
  __m128i v138; // xmm2@7
  __m128i v139; // xmm6@7
  __m128 v140; // xmm1@7
  __m128 v141; // xmm5@7
  __m128 v142; // xmm0@7
  __m128 v143; // xmm1@7
  __m128i v144; // xmm2@7
  __m128i v145; // xmm0@7
  __m128i v146; // xmm1@7
  __m128i v147; // xmm0@7
  __m128i v148; // xmm1@7
  __m128i v149; // xmm4@7
  __m128i v150; // xmm0@7
  __m128i v151; // xmm4@7
  __m128i v152; // xmm2@7
  __m128i v153; // xmm6@7
  __m128 v154; // xmm1@7
  __m128 v155; // xmm5@7
  __m128 v156; // xmm0@7
  __m128 v157; // xmm1@7
  __m128i v158; // xmm2@7
  __m128i v159; // xmm0@7
  __m128i v160; // xmm1@7
  __m128i v161; // xmm0@7
  __m128i v162; // xmm1@7
  __m128i v163; // xmm4@7
  __m128i v164; // xmm0@7
  __m128i v165; // xmm4@7
  __m128i v166; // xmm2@7
  __m128i v167; // xmm6@7
  __m128 v168; // xmm1@7
  __m128 v169; // xmm5@7
  __m128 v170; // xmm0@7
  __m128 v171; // xmm1@7
  __m128i v172; // xmm2@7
  __m128i v173; // xmm0@7
  __m128i v174; // xmm1@7
  __m128i v175; // xmm0@7
  __m128i v176; // xmm1@7
  __m128i v177; // xmm4@7
  __m128i v178; // xmm0@7
  __m128i v179; // xmm4@7
  __m128i v180; // xmm2@7
  __m128i v181; // xmm6@7
  __m128 v182; // xmm1@7
  __m128 v183; // xmm5@7
  __int128 v184; // [sp+0h] [bp-80h]@2
  __int128 v185; // [sp+10h] [bp-70h]@7
  __int128 v186; // [sp+20h] [bp-60h]@7
  __int128 v187; // [sp+30h] [bp-50h]@7
  __int128 v188; // [sp+40h] [bp-40h]@7
  __int128 v189; // [sp+50h] [bp-30h]@7
  __int128 v190; // [sp+60h] [bp-20h]@7
  __int128 v191; // [sp+70h] [bp-10h]@7
  void *retaddr; // [sp+80h] [bp+0h]@2

  v1 = (__int128 *)a1;
  if ( a1 & 0xF )
  {
    result = &retaddr;
    v1 = &v184;
  }
  if ( a1 & 0xF )
  {
    v92 = _mm_loadu_si128((const __m128i *)(a1 + 16));
    v93 = _mm_loadu_si128((const __m128i *)(a1 + 96));
    v94 = v92;
    v95 = _mm_loadu_si128((const __m128i *)(a1 + 32));
    v96 = _mm_sll_epi16(_mm_adds_epi16(v92, v93), 3u);
    v97 = _mm_adds_epi16(_mm_loadu_si128((const __m128i *)a1), _mm_loadu_si128((const __m128i *)(a1 + 112)));
    v98 = _mm_subs_epi16(v94, v93);
    v99 = _mm_sll_epi16(_mm_adds_epi16(_mm_loadu_si128((const __m128i *)(a1 + 80)), v95), 3u);
    v100 = v96;
    v101 = _mm_subs_epi16(v96, v99);
    v102 = _mm_adds_epi16(v100, v99);
    v103 = _mm_adds_epi16(_mm_loadu_si128((const __m128i *)(a1 + 48)), _mm_loadu_si128((const __m128i *)(a1 + 64)));
    v104 = v97;
    v105 = _mm_sll_epi16(_mm_subs_epi16(v97, v103), 3u);
    v106 = _mm_sll_epi16(_mm_adds_epi16(v104, v103), 3u);
    v107 = _mm_or_si128(
             _mm_adds_epi16(_mm_mulhi_epi16(_mm_load_si128((const __m128i *)&xmmword_A79060), v101), v105),
             (__m128i)xmmword_A79030);
    v108 = _mm_sll_epi16(v98, 4u);
    v109 = _mm_mulhi_epi16(v105, (__m128i)xmmword_A79060);
    _mm_store_si128((__m128i *)v1 + 2, _mm_shufflehi_epi16(v107, 27));
    v110 = _mm_adds_epi16(v106, v102);
    v111 = _mm_sll_epi16(_mm_subs_epi16(v95, _mm_loadu_si128((const __m128i *)(a1 + 80))), 4u);
    v112 = _mm_subs_epi16(_mm_loadu_si128((const __m128i *)(a1 + 48)), _mm_loadu_si128((const __m128i *)(a1 + 64)));
    _mm_store_si128((__m128i *)v1 + 4, _mm_shufflehi_epi16(_mm_subs_epi16(v106, v102), 27));
    v113 = _mm_mulhi_epi16(_mm_subs_epi16(v108, v111), (__m128i)xmmword_A79090);
    v114 = _mm_or_si128(_mm_subs_epi16(v109, v101), (__m128i)xmmword_A79030);
    v115 = _mm_sll_epi16(v112, 3u);
    v116 = _mm_or_si128(_mm_mulhi_epi16(_mm_adds_epi16(v108, v111), (__m128i)xmmword_A79090), (__m128i)xmmword_A79030);
    v117 = v115;
    v118 = _mm_adds_epi16(v115, v113);
    v119 = _mm_subs_epi16(v117, v113);
    v120 = _mm_sll_epi16(
             _mm_subs_epi16(_mm_loadu_si128((const __m128i *)a1), _mm_loadu_si128((const __m128i *)(a1 + 112))),
             3u);
    v121 = _mm_load_si128((const __m128i *)&xmmword_A79070);
    v122 = _mm_mulhi_epi16(_mm_load_si128((const __m128i *)&xmmword_A79050), v118);
    _mm_store_si128((__m128i *)v1, _mm_shufflehi_epi16(v110, 27));
    _mm_store_si128((__m128i *)v1 + 6, _mm_shufflehi_epi16(v114, 27));
    v123 = _mm_subs_epi16(v120, v116);
    v124 = _mm_adds_epi16(v120, v116);
    v125 = _mm_adds_epi16(v122, v124);
    v126 = _mm_mulhi_epi16(v124, (__m128i)xmmword_A79050);
    v127 = _mm_adds_epi16(_mm_mulhi_epi16(_mm_load_si128((const __m128i *)&xmmword_A79070), v123), v123);
    _mm_store_si128((__m128i *)v1 + 1, _mm_shufflehi_epi16(_mm_or_si128(v125, (__m128i)xmmword_A79030), 27));
    _mm_store_si128(
      (__m128i *)v1 + 3,
      _mm_shufflehi_epi16(_mm_subs_epi16(v123, _mm_adds_epi16(_mm_mulhi_epi16(v121, v119), v119)), 27));
    _mm_store_si128((__m128i *)v1 + 5, _mm_shufflehi_epi16(_mm_adds_epi16(v127, v119), 27));
    _mm_store_si128((__m128i *)v1 + 7, _mm_shufflehi_epi16(_mm_subs_epi16(v126, v118), 27));
    if ( v1 != &v184 )
      goto LABEL_5;
  }
  else
  {
    v3 = _mm_load_si128((const __m128i *)(a1 + 16));
    v4 = _mm_load_si128((const __m128i *)(a1 + 96));
    v5 = v3;
    v6 = _mm_load_si128((const __m128i *)(a1 + 32));
    v7 = _mm_sll_epi16(_mm_adds_epi16(v3, v4), 3u);
    v8 = _mm_adds_epi16(_mm_load_si128((const __m128i *)a1), *(__m128i *)(a1 + 112));
    v9 = _mm_subs_epi16(v5, v4);
    v10 = _mm_sll_epi16(_mm_adds_epi16(_mm_load_si128((const __m128i *)(a1 + 80)), v6), 3u);
    v11 = v7;
    v12 = _mm_subs_epi16(v7, v10);
    v13 = _mm_adds_epi16(v11, v10);
    v14 = _mm_adds_epi16(_mm_load_si128((const __m128i *)(a1 + 48)), *(__m128i *)(a1 + 64));
    v15 = v8;
    v16 = _mm_sll_epi16(_mm_subs_epi16(v8, v14), 3u);
    v17 = _mm_sll_epi16(_mm_adds_epi16(v15, v14), 3u);
    v18 = _mm_or_si128(
            _mm_adds_epi16(_mm_mulhi_epi16(_mm_load_si128((const __m128i *)&xmmword_A79060), v12), v16),
            (__m128i)xmmword_A79030);
    v19 = _mm_sll_epi16(v9, 4u);
    v20 = _mm_mulhi_epi16(v16, (__m128i)xmmword_A79060);
    v21 = _mm_subs_epi16(v6, *(__m128i *)(a1 + 80));
    _mm_store_si128((__m128i *)v1 + 2, _mm_shufflehi_epi16(v18, 27));
    v22 = _mm_adds_epi16(v17, v13);
    v23 = _mm_sll_epi16(v21, 4u);
    v24 = _mm_subs_epi16(_mm_load_si128((const __m128i *)(a1 + 48)), *(__m128i *)(a1 + 64));
    _mm_store_si128((__m128i *)v1 + 4, _mm_shufflehi_epi16(_mm_subs_epi16(v17, v13), 27));
    v25 = _mm_mulhi_epi16(_mm_subs_epi16(v19, v23), (__m128i)xmmword_A79090);
    v26 = _mm_or_si128(_mm_subs_epi16(v20, v12), (__m128i)xmmword_A79030);
    v27 = _mm_sll_epi16(v24, 3u);
    v28 = _mm_or_si128(_mm_mulhi_epi16(_mm_adds_epi16(v19, v23), (__m128i)xmmword_A79090), (__m128i)xmmword_A79030);
    v29 = v27;
    v30 = _mm_adds_epi16(v27, v25);
    v31 = _mm_subs_epi16(v29, v25);
    v32 = _mm_sll_epi16(_mm_subs_epi16(_mm_load_si128((const __m128i *)a1), *(__m128i *)(a1 + 112)), 3u);
    v33 = _mm_load_si128((const __m128i *)&xmmword_A79070);
    v34 = _mm_mulhi_epi16(_mm_load_si128((const __m128i *)&xmmword_A79050), v30);
    _mm_store_si128((__m128i *)v1, _mm_shufflehi_epi16(v22, 27));
    _mm_store_si128((__m128i *)v1 + 6, _mm_shufflehi_epi16(v26, 27));
    v35 = _mm_subs_epi16(v32, v28);
    v36 = _mm_adds_epi16(v32, v28);
    v37 = _mm_adds_epi16(v34, v36);
    v38 = _mm_mulhi_epi16(v36, (__m128i)xmmword_A79050);
    v39 = _mm_adds_epi16(_mm_mulhi_epi16(_mm_load_si128((const __m128i *)&xmmword_A79070), v35), v35);
    _mm_store_si128((__m128i *)v1 + 1, _mm_shufflehi_epi16(_mm_or_si128(v37, (__m128i)xmmword_A79030), 27));
    _mm_store_si128(
      (__m128i *)v1 + 3,
      _mm_shufflehi_epi16(_mm_subs_epi16(v35, _mm_adds_epi16(_mm_mulhi_epi16(v33, v31), v31)), 27));
    _mm_store_si128((__m128i *)v1 + 5, _mm_shufflehi_epi16(_mm_adds_epi16(v39, v31), 27));
    _mm_store_si128((__m128i *)v1 + 7, _mm_shufflehi_epi16(_mm_subs_epi16(v38, v30), 27));
    if ( v1 != &v184 )
    {
LABEL_5:
      v40 = (__m128)_mm_load_si128((const __m128i *)v1);
      v41 = (__m128)_mm_load_si128((const __m128i *)v1 + 4);
      v42 = (__m128i)_mm_movehl_ps(v41, v40);
      v43 = (__m128i)_mm_movelh_ps(v40, v41);
      v44 = v43;
      v45 = _mm_adds_epi16(v43, v42);
      v46 = _mm_subs_epi16(v44, v42);
      v47 = v45;
      v48 = _mm_unpacklo_epi32(v45, v46);
      v49 = _mm_unpackhi_epi32(v47, v46);
      v50 = _mm_shuffle_epi32(v48, 78);
      v51 = _mm_shuffle_epi32(v49, 78);
      v52 = _mm_packs_epi32(
              _mm_sra_epi32(
                _mm_add_epi32(
                  _mm_add_epi32(
                    _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A791A0), v49),
                    (__m128i)xmmword_A79040),
                  _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A791B0), v51)),
                0x14u),
              _mm_sra_epi32(
                _mm_add_epi32(
                  _mm_add_epi32(_mm_madd_epi16(v49, (__m128i)xmmword_A791C0), (__m128i)xmmword_A79040),
                  _mm_madd_epi16(v51, (__m128i)xmmword_A791D0)),
                0x14u));
      _mm_store_si128(
        (__m128i *)v1,
        _mm_packs_epi32(
          _mm_sra_epi32(
            _mm_add_epi32(
              _mm_add_epi32(
                _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A791A0), v48),
                (__m128i)xmmword_A79040),
              _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A791B0), v50)),
            0x14u),
          _mm_sra_epi32(
            _mm_add_epi32(
              _mm_add_epi32(_mm_madd_epi16(v48, (__m128i)xmmword_A791C0), (__m128i)xmmword_A79040),
              _mm_madd_epi16(v50, (__m128i)xmmword_A791D0)),
            0x14u)));
      _mm_store_si128((__m128i *)v1 + 4, v52);
      v53 = (__m128)_mm_load_si128((const __m128i *)v1 + 1);
      v54 = (__m128)_mm_load_si128((const __m128i *)v1 + 7);
      v55 = (__m128i)_mm_movehl_ps(v54, v53);
      v56 = (__m128i)_mm_movelh_ps(v53, v54);
      v57 = v56;
      v58 = _mm_adds_epi16(v56, v55);
      v59 = _mm_subs_epi16(v57, v55);
      v60 = v58;
      v61 = _mm_unpacklo_epi32(v58, v59);
      v62 = _mm_unpackhi_epi32(v60, v59);
      v63 = _mm_shuffle_epi32(v61, 78);
      v64 = _mm_shuffle_epi32(v62, 78);
      v65 = _mm_packs_epi32(
              _mm_sra_epi32(
                _mm_add_epi32(
                  _mm_add_epi32(
                    _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A791E0), v62),
                    (__m128i)xmmword_A79040),
                  _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A791F0), v64)),
                0x14u),
              _mm_sra_epi32(
                _mm_add_epi32(
                  _mm_add_epi32(_mm_madd_epi16(v62, (__m128i)xmmword_A79200), (__m128i)xmmword_A79040),
                  _mm_madd_epi16(v64, (__m128i)xmmword_A79210)),
                0x14u));
      _mm_store_si128(
        (__m128i *)v1 + 1,
        _mm_packs_epi32(
          _mm_sra_epi32(
            _mm_add_epi32(
              _mm_add_epi32(
                _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A791E0), v61),
                (__m128i)xmmword_A79040),
              _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A791F0), v63)),
            0x14u),
          _mm_sra_epi32(
            _mm_add_epi32(
              _mm_add_epi32(_mm_madd_epi16(v61, (__m128i)xmmword_A79200), (__m128i)xmmword_A79040),
              _mm_madd_epi16(v63, (__m128i)xmmword_A79210)),
            0x14u)));
      _mm_store_si128((__m128i *)v1 + 7, v65);
      v66 = (__m128)_mm_load_si128((const __m128i *)v1 + 2);
      v67 = (__m128)_mm_load_si128((const __m128i *)v1 + 6);
      v68 = (__m128i)_mm_movehl_ps(v67, v66);
      v69 = (__m128i)_mm_movelh_ps(v66, v67);
      v70 = v69;
      v71 = _mm_adds_epi16(v69, v68);
      v72 = _mm_subs_epi16(v70, v68);
      v73 = v71;
      v74 = _mm_unpacklo_epi32(v71, v72);
      v75 = _mm_unpackhi_epi32(v73, v72);
      v76 = _mm_shuffle_epi32(v74, 78);
      v77 = _mm_shuffle_epi32(v75, 78);
      v78 = _mm_packs_epi32(
              _mm_sra_epi32(
                _mm_add_epi32(
                  _mm_add_epi32(
                    _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79220), v75),
                    (__m128i)xmmword_A79040),
                  _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79230), v77)),
                0x14u),
              _mm_sra_epi32(
                _mm_add_epi32(
                  _mm_add_epi32(_mm_madd_epi16(v75, (__m128i)xmmword_A79240), (__m128i)xmmword_A79040),
                  _mm_madd_epi16(v77, (__m128i)xmmword_A79250)),
                0x14u));
      _mm_store_si128(
        (__m128i *)v1 + 2,
        _mm_packs_epi32(
          _mm_sra_epi32(
            _mm_add_epi32(
              _mm_add_epi32(
                _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79220), v74),
                (__m128i)xmmword_A79040),
              _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79230), v76)),
            0x14u),
          _mm_sra_epi32(
            _mm_add_epi32(
              _mm_add_epi32(_mm_madd_epi16(v74, (__m128i)xmmword_A79240), (__m128i)xmmword_A79040),
              _mm_madd_epi16(v76, (__m128i)xmmword_A79250)),
            0x14u)));
      _mm_store_si128((__m128i *)v1 + 6, v78);
      v79 = (__m128)_mm_load_si128((const __m128i *)v1 + 3);
      v80 = (__m128)_mm_load_si128((const __m128i *)v1 + 5);
      v81 = (__m128i)_mm_movehl_ps(v80, v79);
      v82 = (__m128i)_mm_movelh_ps(v79, v80);
      v83 = v82;
      v84 = _mm_adds_epi16(v82, v81);
      v85 = _mm_subs_epi16(v83, v81);
      v86 = v84;
      v87 = _mm_unpacklo_epi32(v84, v85);
      v88 = _mm_unpackhi_epi32(v86, v85);
      v89 = _mm_shuffle_epi32(v87, 78);
      v90 = _mm_shuffle_epi32(v88, 78);
      v91 = _mm_packs_epi32(
              _mm_sra_epi32(
                _mm_add_epi32(
                  _mm_add_epi32(
                    _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79260), v88),
                    (__m128i)xmmword_A79040),
                  _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79270), v90)),
                0x14u),
              _mm_sra_epi32(
                _mm_add_epi32(
                  _mm_add_epi32(_mm_madd_epi16(v88, (__m128i)xmmword_A79280), (__m128i)xmmword_A79040),
                  _mm_madd_epi16(v90, (__m128i)xmmword_A79290)),
                0x14u));
      _mm_store_si128(
        (__m128i *)v1 + 3,
        _mm_packs_epi32(
          _mm_sra_epi32(
            _mm_add_epi32(
              _mm_add_epi32(
                _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79260), v87),
                (__m128i)xmmword_A79040),
              _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79270), v89)),
            0x14u),
          _mm_sra_epi32(
            _mm_add_epi32(
              _mm_add_epi32(_mm_madd_epi16(v87, (__m128i)xmmword_A79280), (__m128i)xmmword_A79040),
              _mm_madd_epi16(v89, (__m128i)xmmword_A79290)),
            0x14u)));
      _mm_store_si128((__m128i *)v1 + 5, v91);
      return result;
    }
  }
  v128 = (__m128)_mm_load_si128((const __m128i *)&v184);
  v129 = (__m128)_mm_load_si128((const __m128i *)&v188);
  v130 = (__m128i)_mm_movehl_ps(v129, v128);
  v131 = (__m128i)_mm_movelh_ps(v128, v129);
  v132 = v131;
  v133 = _mm_adds_epi16(v131, v130);
  v134 = _mm_subs_epi16(v132, v130);
  v135 = v133;
  v136 = _mm_unpacklo_epi32(v133, v134);
  v137 = _mm_unpackhi_epi32(v135, v134);
  v138 = _mm_shuffle_epi32(v136, 78);
  v139 = _mm_shuffle_epi32(v137, 78);
  v140 = (__m128)_mm_packs_epi32(
                   _mm_sra_epi32(
                     _mm_add_epi32(
                       _mm_add_epi32(
                         _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A791A0), v136),
                         (__m128i)xmmword_A79040),
                       _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A791B0), v138)),
                     0x14u),
                   _mm_sra_epi32(
                     _mm_add_epi32(
                       _mm_add_epi32(_mm_madd_epi16(v136, (__m128i)xmmword_A791C0), (__m128i)xmmword_A79040),
                       _mm_madd_epi16(v138, (__m128i)xmmword_A791D0)),
                     0x14u));
  v141 = (__m128)_mm_packs_epi32(
                   _mm_sra_epi32(
                     _mm_add_epi32(
                       _mm_add_epi32(
                         _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A791A0), v137),
                         (__m128i)xmmword_A79040),
                       _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A791B0), v139)),
                     0x14u),
                   _mm_sra_epi32(
                     _mm_add_epi32(
                       _mm_add_epi32(_mm_madd_epi16(v137, (__m128i)xmmword_A791C0), (__m128i)xmmword_A79040),
                       _mm_madd_epi16(v139, (__m128i)xmmword_A791D0)),
                     0x14u));
  _mm_storel_ps((double *)a1, v140);
  _mm_storeh_ps((double *)(a1 + 8), v140);
  _mm_storel_ps((double *)(a1 + 64), v141);
  _mm_storeh_ps((double *)(a1 + 72), v141);
  v142 = (__m128)_mm_load_si128((const __m128i *)&v185);
  v143 = (__m128)_mm_load_si128((const __m128i *)&v191);
  v144 = (__m128i)_mm_movehl_ps(v143, v142);
  v145 = (__m128i)_mm_movelh_ps(v142, v143);
  v146 = v145;
  v147 = _mm_adds_epi16(v145, v144);
  v148 = _mm_subs_epi16(v146, v144);
  v149 = v147;
  v150 = _mm_unpacklo_epi32(v147, v148);
  v151 = _mm_unpackhi_epi32(v149, v148);
  v152 = _mm_shuffle_epi32(v150, 78);
  v153 = _mm_shuffle_epi32(v151, 78);
  v154 = (__m128)_mm_packs_epi32(
                   _mm_sra_epi32(
                     _mm_add_epi32(
                       _mm_add_epi32(
                         _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A791E0), v150),
                         (__m128i)xmmword_A79040),
                       _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A791F0), v152)),
                     0x14u),
                   _mm_sra_epi32(
                     _mm_add_epi32(
                       _mm_add_epi32(_mm_madd_epi16(v150, (__m128i)xmmword_A79200), (__m128i)xmmword_A79040),
                       _mm_madd_epi16(v152, (__m128i)xmmword_A79210)),
                     0x14u));
  v155 = (__m128)_mm_packs_epi32(
                   _mm_sra_epi32(
                     _mm_add_epi32(
                       _mm_add_epi32(
                         _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A791E0), v151),
                         (__m128i)xmmword_A79040),
                       _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A791F0), v153)),
                     0x14u),
                   _mm_sra_epi32(
                     _mm_add_epi32(
                       _mm_add_epi32(_mm_madd_epi16(v151, (__m128i)xmmword_A79200), (__m128i)xmmword_A79040),
                       _mm_madd_epi16(v153, (__m128i)xmmword_A79210)),
                     0x14u));
  _mm_storel_ps((double *)(a1 + 16), v154);
  _mm_storeh_ps((double *)(a1 + 24), v154);
  _mm_storel_ps((double *)(a1 + 112), v155);
  _mm_storeh_ps((double *)(a1 + 120), v155);
  v156 = (__m128)_mm_load_si128((const __m128i *)&v186);
  v157 = (__m128)_mm_load_si128((const __m128i *)&v190);
  v158 = (__m128i)_mm_movehl_ps(v157, v156);
  v159 = (__m128i)_mm_movelh_ps(v156, v157);
  v160 = v159;
  v161 = _mm_adds_epi16(v159, v158);
  v162 = _mm_subs_epi16(v160, v158);
  v163 = v161;
  v164 = _mm_unpacklo_epi32(v161, v162);
  v165 = _mm_unpackhi_epi32(v163, v162);
  v166 = _mm_shuffle_epi32(v164, 78);
  v167 = _mm_shuffle_epi32(v165, 78);
  v168 = (__m128)_mm_packs_epi32(
                   _mm_sra_epi32(
                     _mm_add_epi32(
                       _mm_add_epi32(
                         _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79220), v164),
                         (__m128i)xmmword_A79040),
                       _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79230), v166)),
                     0x14u),
                   _mm_sra_epi32(
                     _mm_add_epi32(
                       _mm_add_epi32(_mm_madd_epi16(v164, (__m128i)xmmword_A79240), (__m128i)xmmword_A79040),
                       _mm_madd_epi16(v166, (__m128i)xmmword_A79250)),
                     0x14u));
  v169 = (__m128)_mm_packs_epi32(
                   _mm_sra_epi32(
                     _mm_add_epi32(
                       _mm_add_epi32(
                         _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79220), v165),
                         (__m128i)xmmword_A79040),
                       _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79230), v167)),
                     0x14u),
                   _mm_sra_epi32(
                     _mm_add_epi32(
                       _mm_add_epi32(_mm_madd_epi16(v165, (__m128i)xmmword_A79240), (__m128i)xmmword_A79040),
                       _mm_madd_epi16(v167, (__m128i)xmmword_A79250)),
                     0x14u));
  _mm_storel_ps((double *)(a1 + 32), v168);
  _mm_storeh_ps((double *)(a1 + 40), v168);
  _mm_storel_ps((double *)(a1 + 96), v169);
  _mm_storeh_ps((double *)(a1 + 104), v169);
  v170 = (__m128)_mm_load_si128((const __m128i *)&v187);
  v171 = (__m128)_mm_load_si128((const __m128i *)&v189);
  v172 = (__m128i)_mm_movehl_ps(v171, v170);
  v173 = (__m128i)_mm_movelh_ps(v170, v171);
  v174 = v173;
  v175 = _mm_adds_epi16(v173, v172);
  v176 = _mm_subs_epi16(v174, v172);
  v177 = v175;
  v178 = _mm_unpacklo_epi32(v175, v176);
  v179 = _mm_unpackhi_epi32(v177, v176);
  v180 = _mm_shuffle_epi32(v178, 78);
  v181 = _mm_shuffle_epi32(v179, 78);
  v182 = (__m128)_mm_packs_epi32(
                   _mm_sra_epi32(
                     _mm_add_epi32(
                       _mm_add_epi32(
                         _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79260), v178),
                         (__m128i)xmmword_A79040),
                       _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79270), v180)),
                     0x14u),
                   _mm_sra_epi32(
                     _mm_add_epi32(
                       _mm_add_epi32(_mm_madd_epi16(v178, (__m128i)xmmword_A79280), (__m128i)xmmword_A79040),
                       _mm_madd_epi16(v180, (__m128i)xmmword_A79290)),
                     0x14u));
  v183 = (__m128)_mm_packs_epi32(
                   _mm_sra_epi32(
                     _mm_add_epi32(
                       _mm_add_epi32(
                         _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79260), v179),
                         (__m128i)xmmword_A79040),
                       _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79270), v181)),
                     0x14u),
                   _mm_sra_epi32(
                     _mm_add_epi32(
                       _mm_add_epi32(_mm_madd_epi16(v179, (__m128i)xmmword_A79280), (__m128i)xmmword_A79040),
                       _mm_madd_epi16(v181, (__m128i)xmmword_A79290)),
                     0x14u));
  _mm_storel_ps((double *)(a1 + 48), v182);
  _mm_storeh_ps((double *)(a1 + 56), v182);
  _mm_storel_ps((double *)(a1 + 80), v183);
  _mm_storeh_ps((double *)(a1 + 88), v183);
  return result;
}
// A79030: using guessed type __int128 xmmword_A79030;
// A79040: using guessed type __int128 xmmword_A79040;
// A79050: using guessed type __int128 xmmword_A79050;
// A79060: using guessed type __int128 xmmword_A79060;
// A79070: using guessed type __int128 xmmword_A79070;
// A79090: using guessed type __int128 xmmword_A79090;
// A791A0: using guessed type __int128 xmmword_A791A0;
// A791B0: using guessed type __int128 xmmword_A791B0;
// A791C0: using guessed type __int128 xmmword_A791C0;
// A791D0: using guessed type __int128 xmmword_A791D0;
// A791E0: using guessed type __int128 xmmword_A791E0;
// A791F0: using guessed type __int128 xmmword_A791F0;
// A79200: using guessed type __int128 xmmword_A79200;
// A79210: using guessed type __int128 xmmword_A79210;
// A79220: using guessed type __int128 xmmword_A79220;
// A79230: using guessed type __int128 xmmword_A79230;
// A79240: using guessed type __int128 xmmword_A79240;
// A79250: using guessed type __int128 xmmword_A79250;
// A79260: using guessed type __int128 xmmword_A79260;
// A79270: using guessed type __int128 xmmword_A79270;
// A79280: using guessed type __int128 xmmword_A79280;
// A79290: using guessed type __int128 xmmword_A79290;

//----- (007969C0) --------------------------------------------------------
signed int __cdecl own_buffer_to_file_p5(int a1)
{
  signed int result; // eax@3
  int v2; // [sp-1Ch] [bp-24h]@1
  int v3; // [sp-18h] [bp-20h]@1
  unsigned int NumberOfBytesWritten; // [sp+4h] [bp-4h]@1

  if ( ownWriteFile(
         *(HANDLE *)(a1 + 60),
         *(LPCVOID *)(a1 + 20),
         *(_DWORD *)(a1 + 16) - *(_DWORD *)(a1 + 20),
         &NumberOfBytesWritten)
    && v3 == NumberOfBytesWritten )
  {
    *(_DWORD *)(a1 + 16) = v2;
    result = 0;
  }
  else
  {
    result = -23;
  }
  return result;
}

//----- (00796A10) --------------------------------------------------------
signed int __usercall __spoils<ecx> own_write_bits_a6@<eax>(int a1@<esi>, __m64 a2@<mm7>, int a3, int a4)
{
  int v4; // ecx@1
  signed int result; // eax@2
  _DWORD *v6; // edi@3
  __m64 v7; // mm1@4
  __m64 v8; // mm6@4
  int v9; // eax@4
  int v10; // edx@5

  while ( 1 )
  {
    v4 = *(_DWORD *)(a1 + 12);
    if ( v4 + a4 <= 64 )
    {
      result = 0;
      *(_DWORD *)(a1 + 12) = v4 + a4;
      return result;
    }
    v6 = *(_DWORD **)(a1 + 16);
    if ( *(_DWORD *)(a1 + 24) - (signed int)(v6 + 1) >= 4 )
    {
      v7 = _m_psrlw(a2, 8u);
      v8 = _m_pshufw(_m_por(_m_psllw(a2, 8u), v7), 27);
      v9 = _mm_cvtsi64_si32(_m_pcmpeqb(v8, _m_pcmpeqb(v7, v7)));
      if ( v9 )
      {
        switch ( v9 )
        {
          case -16777216:
            *v6 = _mm_cvtsi64_si32(v8);
            v10 = v4 - 24;
            *(_DWORD *)(a1 + 28) += 4;
            *(_DWORD *)(a1 + 16) += 4;
            *(_DWORD *)(a1 + 12) = v4 - 24;
            break;
          case 16711680:
            *v6 = _mm_cvtsi64_si32(_m_pand(v8, (__m64)qword_A797D8));
            v10 = v4 - 24;
            *(_DWORD *)(a1 + 28) += 4;
            *(_DWORD *)(a1 + 16) += 4;
            *(_DWORD *)(a1 + 12) = v4 - 24;
            break;
          case 65280:
            *v6 = _mm_cvtsi64_si32(_m_por(_m_pand(v8, (__m64)qword_A797E0), _m_psllq(_m_pand(v8, (__m64)qword_A797E8), 8u)));
            v10 = v4 - 24;
            *(_DWORD *)(a1 + 28) += 4;
            *(_DWORD *)(a1 + 16) += 4;
            *(_DWORD *)(a1 + 12) = v4 - 24;
            break;
          case 255:
          case -16776961:
            *v6 = _mm_cvtsi64_si32(_m_por(_m_psllq(_m_pand(v8, (__m64)qword_A797C0), 8u), (__m64)qword_A797A0));
            v10 = v4 - 24;
            *(_DWORD *)(a1 + 28) += 4;
            *(_DWORD *)(a1 + 16) += 4;
            *(_DWORD *)(a1 + 12) = v4 - 24;
            break;
          case -16711936:
            *v6 = _mm_cvtsi64_si32(_m_por(_m_punpcklwd(v8, 0i64), _m_psllq(_m_pand(v8, (__m64)qword_A797E8), 8u)));
            v10 = v4 - 24;
            *(_DWORD *)(a1 + 28) += 4;
            *(_DWORD *)(a1 + 16) += 4;
            *(_DWORD *)(a1 + 12) = v4 - 24;
            break;
          case 16711935:
            *v6 = _mm_cvtsi64_si32(_m_por(_m_psllq(_m_pand(v8, (__m64)qword_A797C0), 8u), (__m64)qword_A797A0));
            v10 = v4 - 16;
            *(_DWORD *)(a1 + 28) += 4;
            *(_DWORD *)(a1 + 16) += 4;
            *(_DWORD *)(a1 + 12) = v4 - 16;
            break;
          case 16776960:
            *v6 = _mm_cvtsi64_si32(_m_por(_m_pand(v8, (__m64)qword_A797E0), (__m64)qword_A797F0));
            v10 = v4 - 16;
            *(_DWORD *)(a1 + 28) += 4;
            *(_DWORD *)(a1 + 16) += 4;
            *(_DWORD *)(a1 + 12) = v4 - 16;
            break;
          case -65536:
            *v6 = _mm_cvtsi64_si32(_m_pand(v8, (__m64)qword_A797D8));
            v10 = v4 - 24;
            *(_DWORD *)(a1 + 28) += 4;
            *(_DWORD *)(a1 + 16) += 4;
            *(_DWORD *)(a1 + 12) = v4 - 24;
            break;
          case 65535:
          case -16711681:
            *v6 = _mm_cvtsi64_si32((__m64)qword_A797B0);
            v10 = v4 - 16;
            *(_DWORD *)(a1 + 28) += 4;
            *(_DWORD *)(a1 + 16) += 4;
            *(_DWORD *)(a1 + 12) = v4 - 16;
            break;
          default:
            if ( v9 != -65281 )
              return -24;
            *v6 = _mm_cvtsi64_si32(_m_por(_m_psllq(_m_pand(v8, (__m64)qword_A797C0), 8u), (__m64)qword_A797A0));
            v10 = v4 - 16;
            *(_DWORD *)(a1 + 28) += 4;
            *(_DWORD *)(a1 + 16) += 4;
            *(_DWORD *)(a1 + 12) = v4 - 16;
            break;
        }
      }
      else
      {
        *v6 = _mm_cvtsi64_si32(v8);
        v10 = v4 - 32;
        *(_DWORD *)(a1 + 16) = v6 + 1;
        *(_DWORD *)(a1 + 28) += 4;
      }
      *(_DWORD *)(a1 + 12) = a4 + v10;
      return 0;
    }
    if ( !*(_DWORD *)(a1 + 60) )
      break;
    result = own_buffer_to_file_p5(a1);
    if ( result )
      return result;
  }
  return -28;
}
// A797A0: using guessed type __int64 qword_A797A0;
// A797B0: using guessed type __int64 qword_A797B0;
// A797C0: using guessed type __int64 qword_A797C0;
// A797D8: using guessed type __int64 qword_A797D8;
// A797E0: using guessed type __int64 qword_A797E0;
// A797E8: using guessed type __int64 qword_A797E8;
// A797F0: using guessed type __int64 qword_A797F0;

//----- (00796D70) --------------------------------------------------------
signed int __cdecl own_encode_block_a6(__m64 *a1, int a2, unsigned int a3, _WORD *a4, _WORD *a5)
{
  int v5; // eax@1
  int v6; // ebx@1
  unsigned __int8 v7; // of@1
  int v8; // eax@1
  signed int v9; // ecx@1
  int v10; // edx@1
  int v11; // ecx@3
  signed int v12; // ebx@3
  int v13; // ecx@5
  __m64 v14; // mm7@7
  signed int result; // eax@7
  int v16; // ecx@7
  unsigned int v17; // edi@9
  int v18; // ecx@10
  int v19; // eax@10
  int v20; // ebx@13
  signed int v21; // ecx@15
  int v22; // edx@15
  int v23; // ecx@17
  signed int v24; // ebx@17
  __m64 v25; // mm3@19
  int v26; // ecx@19
  int v27; // ecx@21
  signed int v28; // [sp+4h] [bp-14h]@9
  signed int v29; // [sp+8h] [bp-10h]@9

  v5 = *a5;
  v6 = *a4;
  *a4 = v5;
  v7 = __OFSUB__(v5, v6);
  v8 = v5 - v6;
  v9 = v8;
  v10 = v8;
  if ( (v8 < 0) ^ v7 )
  {
    v8 = -v8;
    v9 = -v9;
    --v10;
  }
  v11 = v9 >> 8;
  v12 = v8;
  if ( v8 >= 256 )
    v8 = v11;
  v13 = dword_A793A0[v8];
  if ( v12 >= 256 )
    v13 += 8;
  v14 = (__m64)a1->m64_u64;
  result = own_write_bits_a6(
             (int)a1,
             (__m64)a1->m64_u64,
             *(_WORD *)(a2 + 2 * v13 + 1032),
             *(_DWORD *)(a2 + 4 * v13 + 8));
  if ( !result )
  {
    result = own_write_bits_a6((int)a1, v14, v10, v16);
    if ( !result )
    {
      v29 = 0;
      v28 = 1;
      v17 = a3;
      do
      {
        v18 = dword_A792A0[v28];
        v19 = a5[v18];
        if ( a5[v18] )
        {
          while ( v29 > 15 )
          {
            v20 = v19;
            result = own_write_bits_a6((int)a1, v14, *(_WORD *)(v17 + 1512), *(_DWORD *)(v17 + 968));
            if ( result )
              goto LABEL_28;
            v29 -= 16;
            v19 = v20;
          }
          v21 = v19;
          v22 = v19;
          if ( v19 < 0 )
          {
            v19 = -v19;
            v21 = -v21;
            --v22;
          }
          v23 = v21 >> 8;
          v24 = v19;
          if ( v19 >= 256 )
            v19 = v23;
          v25 = _mm_cvtsi32_si64(v17);
          v26 = dword_A793A0[v19];
          if ( v24 >= 256 )
            v26 += 8;
          v17 = _mm_cvtsi64_si32(v25);
          result = own_write_bits_a6(
                     (int)a1,
                     v14,
                     *(_WORD *)(v17 + 2 * (v26 + 16 * v29) + 1032),
                     *(_DWORD *)(v17 + 4 * (v26 + 16 * v29) + 8));
          if ( result )
            goto LABEL_28;
          result = own_write_bits_a6((int)a1, v14, v22, v27);
          if ( result )
            goto LABEL_28;
          v29 = 0;
        }
        else
        {
          ++v29;
        }
        ++v28;
      }
      while ( v28 < 64 );
      if ( !v29 || (result = own_write_bits_a6((int)a1, v14, *(_WORD *)(v17 + 1032), *(_DWORD *)(v17 + 8))) == 0 )
        result = 0;
    }
  }
LABEL_28:
  a1->m64_u64 = (unsigned __int64)v14;
  return result;
}
// A792A0: using guessed type int dword_A792A0[];
// A793A0: using guessed type int dword_A793A0[];

//----- (00796F00) --------------------------------------------------------
void __cdecl own_count_zeros_m5(int a1, int a2, _DWORD *a3, unsigned int *a4)
{
  __int64 v4; // rcx@2
  __m64 v5; // mm1@3
  __m64 v6; // mm3@3
  __m64 v7; // mm2@3
  int v8; // eax@4
  int v9; // edx@4
  int v10; // eax@6
  int v11; // edx@6
  unsigned int v12; // eax@8
  int v13; // eax@8
  int v14; // esi@8
  int v15; // edi@8
  __m64 v16; // mm0@9
  __m64 v17; // mm1@9
  __m64 v18; // mm0@9
  __m64 v19; // mm3@9
  __m64 v20; // mm1@9
  __m64 v21; // mm2@9
  __m64 v22; // mm3@9
  __m64 v23; // mm1@9
  __m64 v24; // mm0@9
  __m64 v25; // mm2@9
  __m64 v26; // mm5@9
  __m64 v27; // mm0@9
  __m64 v28; // mm5@9
  __m64 v29; // mm4@9
  __m64 v30; // mm0@9
  __m64 v31; // mm2@9
  __m64 v32; // mm3@9
  __m64 v33; // mm0@9
  __m64 v34; // mm2@9
  __m64 v35; // mm4@9
  __m64 v36; // mm0@9
  __m64 v37; // mm6@9
  __m64 v38; // mm3@9
  __m64 v39; // mm0@9
  __m64 v40; // mm6@9
  int *v41; // [sp-1Ch] [bp-28h]@1
  signed int v42; // [sp+0h] [bp-Ch]@1
  int v43; // [sp+4h] [bp-8h]@1
  int v44; // [sp+8h] [bp-4h]@1

  v44 = a2;
  v41 = dword_A792A0;
  v42 = 16;
  v43 = 0;
  do
  {
    LODWORD(v4) = (*(_DWORD *)(a1 + 2 * v41[3]) << 16) | *(_DWORD *)(a1 + 2 * v41[2]) & 0xFFFF;
    HIDWORD(v4) = (*(_DWORD *)(a1 + 2 * v41[1]) << 16) | *(_DWORD *)(a1 + 2 * *v41) & 0xFFFF;
    if ( v4 )
    {
      v5 = _m_pcmpeqw(
             _mm_cvtsi32_si64((*(_DWORD *)(a1 + 2 * v41[3]) << 16) | *(_DWORD *)(a1 + 2 * v41[2]) & 0xFFFFu),
             0i64);
      v6 = _m_pcmpeqw(
             _mm_cvtsi32_si64((*(_DWORD *)(a1 + 2 * v41[1]) << 16) | *(_DWORD *)(a1 + 2 * *v41) & 0xFFFFu),
             0i64);
      v7 = _m_pcmpeqw(0i64, 0i64);
      if ( _mm_cvtsi64_si32(_m_por(v6, v5)) )
      {
        v8 = _mm_cvtsi64_si32(v6);
        v9 = _mm_cvtsi64_si32(_m_pandn(v5, v7));
        JUMPOUT(__CS__, 8 * ((v9 & 4 | ~(_WORD)v8 & 1 | ((v9 & 0x80004 | ~v8 & 0x20001u) >> 16)) - 1) + 7958464);
      }
      v10 = v44;
      v11 = v43;
      v43 = 0;
      v41 += 4;
      *(_DWORD *)(v44 + 260) = 0;
      *(_DWORD *)v44 = HIDWORD(v4);
      *(_DWORD *)(v44 + 4) = HIDWORD(v4) >> 16;
      *(_DWORD *)(v44 + 264) = 0;
      *(_DWORD *)(v44 + 256) = v11;
      *(_DWORD *)(v44 + 8) = v4;
      v44 += 16;
      *(_DWORD *)(v10 + 268) = 0;
      *(_DWORD *)(v10 + 12) = (unsigned int)v4 >> 16;
    }
    else
    {
      v41 += 4;
      v43 += 4;
    }
    --v42;
  }
  while ( v42 );
  v12 = (unsigned int)(v44 - a2) >> 2;
  *a4 = v12;
  v13 = ((_BYTE)v12 + 4) & 0xFC;
  v14 = a2;
  v15 = a2;
  do
  {
    v16 = _m_packssdw(
            _m_psrad(_m_pslld(*(__m64 *)v14, 0x10u), 0x10u),
            _m_psrad(_m_pslld(*(__m64 *)(v14 + 8), 0x10u), 0x10u));
    v17 = v16;
    v18 = _m_pcmpgtw(v16, 0i64);
    v19 = v17;
    v20 = _m_pand(v17, v18);
    v21 = _m_por(_m_pandn(v18, _m_psubw(v19, (__m64)qword_A797F8)), v20);
    v22 = _m_por(_m_pandn(v18, _m_psubw(0i64, v19)), v20);
    v23 = _m_pcmpgtw(v22, (__m64)qword_A79828);
    *(__m64 *)v15 = v21;
    v24 = _m_pand(_m_psrlw(v22, 8u), v23);
    v25 = _m_pandn(v23, v22);
    v26 = v24;
    v27 = _m_por(v24, v25);
    v28 = _m_pcmpgtw(_m_por(v26, v25), (__m64)qword_A79820);
    v29 = v27;
    v30 = _m_pand(_m_psrlw(v27, 4u), v28);
    v31 = v30;
    v32 = _m_pandn(v28, v29);
    v33 = _m_por(v30, v32);
    v34 = _m_pcmpgtw(_m_por(v31, v32), (__m64)qword_A79808);
    v35 = v33;
    v36 = _m_pand(_m_psrlw(v33, 2u), v34);
    v37 = v36;
    v38 = _m_pandn(v34, v35);
    v39 = _m_por(v36, v38);
    v40 = _m_pcmpgtw(_m_por(v37, v38), (__m64)qword_A797F8);
    v15 += 8;
    v14 += 16;
    *(__m64 *)(v15 + 504) = _m_paddw(
                              _m_por(_m_pand(_m_psrlw(v39, 1u), v40), _m_pandn(v40, v39)),
                              _m_por(
                                _m_por(_m_pand(v23, (__m64)qword_A79818), _m_pand(v28, (__m64)qword_A79810)),
                                _m_por(_m_pand(v40, (__m64)qword_A797F8), _m_pand(v34, (__m64)qword_A79800))));
    v13 -= 4;
  }
  while ( v13 );
  *a3 = v43;
}
// A792A0: using guessed type int dword_A792A0[];
// A797F8: using guessed type __int64 qword_A797F8;
// A79800: using guessed type __int64 qword_A79800;
// A79808: using guessed type __int64 qword_A79808;
// A79810: using guessed type __int64 qword_A79810;
// A79818: using guessed type __int64 qword_A79818;
// A79820: using guessed type __int64 qword_A79820;
// A79828: using guessed type __int64 qword_A79828;

//----- (00797460) --------------------------------------------------------
signed int __cdecl load_from_file(int a1)
{
  signed int result; // eax@3
  unsigned int NumberOfBytesRead; // [sp+10h] [bp-10h]@1
  int v3; // [sp+14h] [bp-Ch]@1
  int v4; // [sp+18h] [bp-8h]@1

  v4 = ownReadFile(*(HANDLE *)(a1 + 60), (LPVOID)(a1 + 64), 0x1000u, &NumberOfBytesRead);
  v3 = v4;
  *(_DWORD *)(a1 + 36) = NumberOfBytesRead;
  if ( !v3 || *(_DWORD *)(a1 + 36) )
  {
    *(_DWORD *)(a1 + 16) = a1 + 64;
    result = 0;
  }
  else
  {
    result = -11;
  }
  return result;
}

//----- (007974D0) --------------------------------------------------------
int __usercall own_decode_block_skip_m5@<eax>(int a1@<edx>, int a2, unsigned int a3, unsigned int a4, signed int a5)
{
  int v5; // ebp@0
  __m64 v6; // mm1@1
  signed int v7; // edi@1
  unsigned int *v8; // esi@1
  __m64 v9; // mm4@1
  signed int v10; // eax@2
  __m64 v11; // mm2@5
  int v12; // ecx@5
  int v13; // edx@7
  signed int v14; // eax@7
  int v15; // ebx@7
  __m64 v16; // mm3@7
  int v17; // ecx@10
  unsigned int v18; // ebx@10
  unsigned int v19; // ebx@10
  __m64 v20; // mm2@10
  int v21; // ecx@12
  __m64 v22; // mm2@12
  int v23; // edx@13
  signed int v25; // ebx@20
  signed int v26; // ebx@21
  int v27; // ebx@29
  signed int v28; // ebx@33
  int v29; // [sp+0h] [bp-28h]@1
  int v30; // [sp+4h] [bp-24h]@1
  char v31; // [sp+8h] [bp-20h]@1

  v29 = *(_DWORD *)(a2 + 28);
  v30 = *(_DWORD *)(a2 + 36);
  v31 = *(_BYTE *)(a2 + 48);
  v6 = *(__m64 *)a2;
  v7 = *(_DWORD *)(a2 + 12);
  v8 = *(unsigned int **)(a2 + 16);
  v9 = _mm_cvtsi32_si64(0x40u);
  if ( v7 < 8 )
  {
    if ( !sub_797755(a3, a1, v5, v7, v8, v6, v9) )
      goto LABEL_36;
    if ( v7 < 8 )
    {
      v25 = 1;
      goto LABEL_24;
    }
  }
  v10 = *(_DWORD *)(a3 + 8 + 4 * _mm_cvtsi64_si32(_m_psrlq(v6, 0x38u)));
  if ( v10 <= 0xFFFF )
  {
    v25 = 9;
LABEL_24:
    v10 = sub_7978B3(a3, a1, v25, v5, v7, v8, v6, v9);
    if ( v10 < 0 )
      goto LABEL_36;
    goto LABEL_4;
  }
  v7 -= (unsigned int)v10 >> 16;
  v6 = _m_psllqi(v6, (unsigned int)v10 >> 16);
  v10 = (unsigned __int16)v10;
LABEL_4:
  if ( v7 >= v10 )
    goto LABEL_5;
  v26 = v10;
  if ( sub_797755(v10, a1, v5, v7, v8, v6, v9) )
  {
    v10 = v26;
LABEL_5:
    v7 -= v10;
    v11 = _mm_cvtsi32_si64(v10);
    v12 = _mm_cvtsi64_si32(_m_psrlq(v6, _m_psubd(v9, v11)));
    v6 = _m_psllq(v6, v11);
    if ( v12 < twoexpnminusone[v10] )
      v12 += lowest_coef[v10];
    v13 = 1;
    v14 = a5;
    v15 = a4 + 8;
    *(_WORD *)v14 += v12;
    v16 = v6;
    while ( 2 )
    {
      v6 = _m_psrlq(v6, 0x38u);
      while ( v7 < 8 )
      {
        v6 = v16;
        v14 = sub_797755(v14, v13, v5, v7, v8, v16, v9);
        v15 = a4 + 8;
        if ( !v14 )
          goto LABEL_36;
        v6 = _m_psrlq(v16, 0x38u);
        if ( v7 < 8 )
        {
          v28 = 1;
          goto LABEL_35;
        }
      }
      v17 = _mm_cvtsi64_si32(v6);
      v6 = v16;
      v18 = *(_DWORD *)(v15 + 4 * v17);
      LOWORD(v14) = v18;
      v19 = v18 >> 16;
      v14 = (unsigned __int16)v14;
      v20 = _mm_cvtsi32_si64(v19);
      if ( v19 )
      {
        v7 -= v19;
        v6 = _m_psllq(v16, v20);
      }
      else
      {
        v28 = 9;
LABEL_35:
        v14 = sub_7978B3(a4, v13, v28, v5, v7, v8, v6, v9);
        if ( v14 < 0 )
          break;
      }
      v21 = v14 & 0xF;
      v22 = _mm_cvtsi32_si64(v21);
      if ( v14 & 0xF )
      {
        v14 = (unsigned int)v14 >> 4;
        v23 = v14 + v13;
        if ( v7 < v21 )
        {
          v27 = v21;
          v14 = sub_797755(v14, v23, v5, v7, v8, v6, v9);
          v21 = v27;
          if ( !v14 )
            break;
        }
        v7 -= v21;
        v6 = _m_psllq(v6, v22);
        v13 = v23 + 1;
        if ( v13 < 64 )
        {
          v15 = a4 + 8;
LABEL_16:
          v16 = v6;
          continue;
        }
      }
      else if ( v14 >= 240 )
      {
        v13 += 16;
        v15 = a4 + 8;
        if ( v13 < 64 )
          goto LABEL_16;
      }
      break;
    }
    *(__m64 *)a2 = v6;
    *(_DWORD *)(a2 + 12) = v7;
    *(_DWORD *)(a2 + 16) = v8;
    *(_DWORD *)(a2 + 36) = v30;
    *(_BYTE *)(a2 + 48) = v31;
    *(_DWORD *)(a2 + 28) = v29;
    return 0;
  }
LABEL_36:
  *(__m64 *)a2 = v6;
  *(_DWORD *)(a2 + 12) = v7;
  *(_DWORD *)(a2 + 16) = v8;
  *(_DWORD *)(a2 + 36) = v30;
  *(_BYTE *)(a2 + 48) = v31;
  *(_DWORD *)(a2 + 28) = v29;
  return 0;
}
// B680C0: using guessed type int lowest_coef[];
// B68100: using guessed type int twoexpnminusone[];

//----- (00797755) --------------------------------------------------------
signed int __usercall sub_797755@<eax>(unsigned int a1@<eax>, int a2@<edx>, int a3@<ebp>, signed int a4@<edi>, unsigned int *a5@<esi>, __m64 a6@<mm1>, __m64 a7@<mm4>)
{
  __m64 v7; // mm0@1
  signed int i; // ecx@1
  __m64 v9; // mm7@1
  __m64 v10; // mm0@1
  __m64 v11; // mm1@1
  signed int result; // eax@4
  unsigned __int8 v13; // of@6
  unsigned int v14; // ST04_4@17
  int v15; // ST08_4@17
  bool v16; // zf@17
  unsigned int v17; // ST04_4@20
  int v18; // ST08_4@20
  int v19; // [sp-18h] [bp-18h]@17
  int v20; // [sp-18h] [bp-18h]@20

  v7 = _mm_cvtsi32_si64(a4);
  i = *(_DWORD *)(a3 - 36);
  v9 = _m_psubd(a7, v7);
  v10 = _m_pcmpeqb(v7, v7);
  v11 = _m_psrlq(a6, v9);
  if ( *(_BYTE *)(a3 - 32) )
  {
LABEL_9:
    *(_DWORD *)(a3 - 36) = i;
    result = 255;
  }
  else if ( i < 4 || (a1 = _mm_cvtsi64_si32(_m_pcmpeqb(v10, _mm_cvtsi32_si64(_byteswap_ulong(*a5))))) != 0 )
  {
    for ( i = *(_DWORD *)(a3 - 36); ; i = *(_DWORD *)(v19 + 36) )
    {
      while ( 1 )
      {
        v13 = __OFSUB__(i--, 1);
        if ( (i < 0) ^ v13 )
          break;
        ++*(_DWORD *)(a3 - 40);
        a1 = *(_BYTE *)a5;
        a5 = (unsigned int *)((char *)a5 + 1);
        if ( a1 == 255 )
        {
          do
          {
            while ( 1 )
            {
              v13 = __OFSUB__(i--, 1);
              if ( !((i < 0) ^ v13) )
                break;
              if ( !*(_DWORD *)(*(_DWORD *)(a3 + 8) + 60) )
                goto LABEL_15;
              v20 = *(_DWORD *)(a3 + 8);
              v18 = a2;
              v17 = a1;
              v16 = load_from_file(*(_DWORD *)(a3 + 8)) == 0;
              a1 = v17;
              a2 = v18;
              if ( !v16 )
                goto LABEL_15;
              a5 = *(unsigned int **)(v20 + 16);
              i = *(_DWORD *)(v20 + 36);
            }
            ++*(_DWORD *)(a3 - 40);
            a1 = *(_BYTE *)a5;
            a5 = (unsigned int *)((char *)a5 + 1);
          }
          while ( a1 == 255 );
          if ( a1 )
          {
            *(_BYTE *)(a3 - 32) = a1;
            goto LABEL_9;
          }
          a1 = 255;
        }
        a4 += 8;
        v11 = _m_por(_m_psllq(v11, 8u), _mm_cvtsi32_si64(a1));
        if ( a4 > 56 )
          goto LABEL_9;
      }
      if ( !*(_DWORD *)(*(_DWORD *)(a3 + 8) + 60) )
        break;
      v19 = *(_DWORD *)(a3 + 8);
      v15 = a2;
      v14 = a1;
      v16 = load_from_file(*(_DWORD *)(a3 + 8)) == 0;
      a1 = v14;
      a2 = v15;
      if ( !v16 )
        break;
      a5 = *(unsigned int **)(v19 + 16);
    }
LABEL_15:
    result = 0;
  }
  else
  {
    *(_DWORD *)(a3 - 40) += 4;
    *(_DWORD *)(a3 - 36) = i - 4;
    result = 255;
  }
  return result;
}
// 797755: could not find valid save-restore pair for ebx

//----- (007978B3) --------------------------------------------------------
signed int __usercall sub_7978B3@<eax>(unsigned int a1@<eax>, int a2@<edx>, signed int a3@<ebx>, int a4@<ebp>, signed int a5@<edi>, unsigned int *a6@<esi>, __m64 a7@<mm1>, __m64 a8@<mm4>)
{
  signed int v8; // edi@2
  __m64 v9; // mm7@2
  __m64 v10; // mm2@2
  __m64 v11; // mm1@2
  signed int i; // ecx@2
  signed int v13; // eax@3
  int v14; // edx@3
  signed int v15; // ebx@3
  __m64 v16; // mm3@7
  signed int v17; // ebx@10
  signed int v18; // eax@10
  signed int result; // eax@13
  int v20; // ebx@14

  *(_DWORD *)(a4 - 16) = a3;
  if ( a5 < a3 )
  {
    if ( !sub_797755(a1, a2, a4, a5, a6, a7, a8) )
      return 1;
    a3 = *(_DWORD *)(a4 - 16);
  }
  v8 = a5 - a3;
  v9 = _mm_cvtsi32_si64(a3);
  v10 = a7;
  v11 = _m_psllq(a7, v9);
  for ( i = _mm_cvtsi64_si32(_m_psrlq(v10, _m_psubd(a8, v9)));
        ;
        i = _mm_cvtsi64_si32(_m_por(_m_psllq(_mm_cvtsi32_si64(i), 1u), v16)) )
  {
    v13 = *(_DWORD *)(a4 - 16);
    v14 = *(_DWORD *)(a4 - 20);
    v15 = *(_WORD *)(v14 + 2 * v13 + 1578);
    if ( v15 != -1 )
      v15 = *(_WORD *)(v14 + 2 * v13 + 1578);
    if ( v15 >= i )
      break;
    if ( v8 < 1 )
    {
      v17 = i;
      v18 = sub_797755(v13, v14, a4, v8, a6, v11, a8);
      i = v17;
      if ( !v18 )
        return 1;
    }
    --v8;
    v16 = _m_psrlq(v11, 0x3Fu);
    v11 = _m_psllq(v11, 1u);
    ++*(_DWORD *)(a4 - 16);
  }
  if ( v13 <= 16 )
  {
    v20 = *(_DWORD *)(a4 - 20);
    LOWORD(i) = *(_WORD *)(v20 + 2 * *(_DWORD *)(a4 - 16) + 1614)
              + i
              - *(_WORD *)(v20 + 2 * *(_DWORD *)(a4 - 16) + 1544);
    result = *(_WORD *)(v20 + 2 * i + 1032);
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007979A0) --------------------------------------------------------
int __usercall own_decodehuffman8x8_m6@<eax>(int a1@<edx>, int a2, unsigned int a3, unsigned int a4, _WORD *a5, int a6)
{
  int v6; // ebp@0
  __m64 v7; // mm1@1
  signed int v8; // edi@1
  unsigned int *v9; // esi@1
  __m64 v10; // mm4@1
  unsigned int v11; // eax@1
  int v12; // eax@2
  unsigned int v13; // ebx@2
  signed int v14; // eax@2
  __m64 v15; // mm2@5
  int v16; // ecx@5
  __int16 v17; // dx@5
  bool v18; // sf@5
  unsigned __int8 v19; // of@5
  int v20; // eax@5
  unsigned int v21; // ecx@7
  int v22; // edx@7
  signed int v23; // eax@7
  __m64 v24; // mm3@7
  int v25; // ebx@7
  int v26; // ecx@10
  unsigned int v27; // ebx@10
  __m64 v28; // mm2@10
  int v29; // ecx@12
  __m64 v30; // mm2@12
  __m64 v31; // mm3@12
  unsigned int v32; // eax@13
  int v33; // edx@13
  __int16 v34; // ax@14
  int v35; // ebx@14
  __m64 v36; // mm0@14
  int v37; // ecx@14
  __int16 v38; // bx@16
  __m64 v40; // mm0@19
  __m64 v41; // mm7@19
  __m64 v42; // mm0@19
  __m64 v43; // mm7@21
  signed int v44; // ebx@24
  signed int v45; // ebx@28
  __m64 v46; // mm0@28
  __m64 v47; // mm7@28
  __m64 v48; // mm0@28
  __m64 v49; // mm7@30
  int v50; // ebx@41
  __m64 v51; // mm0@41
  __m64 v52; // mm7@41
  __m64 v53; // mm0@41
  __m64 v54; // mm7@43
  signed int v55; // eax@46
  __m64 v56; // mm0@48
  __m64 v57; // mm7@48
  __m64 v58; // mm0@48
  __m64 v59; // mm7@50
  signed int v60; // ebx@53
  int v61; // [sp+0h] [bp-28h]@1
  int v62; // [sp+4h] [bp-24h]@1
  signed int v63; // [sp+8h] [bp-20h]@1
  int v64; // [sp+10h] [bp-18h]@1

  v7 = *(__m64 *)a2;
  v8 = *(_DWORD *)(a2 + 12);
  v9 = *(unsigned int **)(a2 + 16);
  v61 = *(_DWORD *)(a2 + 28);
  v63 = *(_DWORD *)(a2 + 36);
  v62 = *(_BYTE *)(a2 + 48);
  v10 = _mm_cvtsi32_si64(0x40u);
  *(_QWORD *)a6 = 0i64;
  *(_QWORD *)(a6 + 8) = 0i64;
  *(_QWORD *)(a6 + 16) = 0i64;
  *(_QWORD *)(a6 + 24) = 0i64;
  *(_QWORD *)(a6 + 32) = 0i64;
  *(_QWORD *)(a6 + 40) = 0i64;
  *(_QWORD *)(a6 + 48) = 0i64;
  *(_QWORD *)(a6 + 56) = 0i64;
  *(_QWORD *)(a6 + 64) = 0i64;
  *(_QWORD *)(a6 + 72) = 0i64;
  *(_QWORD *)(a6 + 80) = 0i64;
  *(_QWORD *)(a6 + 88) = 0i64;
  *(_QWORD *)(a6 + 96) = 0i64;
  *(_QWORD *)(a6 + 104) = 0i64;
  *(_QWORD *)(a6 + 112) = 0i64;
  *(_QWORD *)(a6 + 120) = 0i64;
  v11 = a3;
  v64 = a3 + 8;
  if ( v8 >= 8 )
    goto LABEL_2;
  v40 = _mm_cvtsi32_si64(v8);
  v41 = _m_psubd(v10, v40);
  v42 = _m_pcmpeqb(v40, v40);
  v7 = _m_psrlq(v7, v41);
  if ( v62 )
  {
LABEL_23:
    v7 = _m_psllq(v7, _m_psubd(v10, _mm_cvtsi32_si64(v8)));
    if ( v8 < 8 )
    {
      v44 = 1;
      goto LABEL_36;
    }
    goto LABEL_2;
  }
  if ( v63 >= 4 )
  {
    v43 = _mm_cvtsi32_si64(_byteswap_ulong(*v9));
    v11 = _mm_cvtsi64_si32(_m_pcmpeqb(v42, v43));
    if ( !v11 )
    {
      ++v9;
      v8 += 32;
      v7 = _m_por(_m_psllq(v7, 0x20u), v43);
      v61 += 4;
      v63 -= 4;
      goto LABEL_23;
    }
  }
  if ( !sub_797E48(v11, a1, v6, v8, v9, v7) )
    goto LABEL_59;
  if ( v8 < 8 )
  {
    v44 = 1;
    goto LABEL_36;
  }
LABEL_2:
  v12 = _mm_cvtsi64_si32(_m_psrlq(v7, 0x38u));
  v13 = *(_WORD *)(v64 + 4 * v12 + 2);
  v14 = *(_WORD *)(v64 + 4 * v12);
  if ( v13 )
  {
    v8 -= v13;
    v7 = _m_psllqi(v7, v13);
    goto LABEL_4;
  }
  v44 = 9;
LABEL_36:
  v14 = sub_797F45(a3, a1, v44, v6, v8, v9, v7, v10);
  if ( v14 < 0 )
    goto LABEL_59;
LABEL_4:
  if ( v8 < v14 )
  {
    v45 = v14;
    v46 = _mm_cvtsi32_si64(v8);
    v47 = _m_psubd(v10, v46);
    v48 = _m_pcmpeqb(v46, v46);
    v7 = _m_psrlq(v7, v47);
    if ( !v62 )
    {
      if ( v63 < 4
        || (v49 = _mm_cvtsi32_si64(_byteswap_ulong(*v9)), (v14 = _mm_cvtsi64_si32(_m_pcmpeqb(v48, v49))) != 0) )
      {
        if ( !sub_797E48(v14, a1, v6, v8, v9, v7) )
          goto LABEL_59;
        v14 = v45;
        goto LABEL_5;
      }
      ++v9;
      v8 += 32;
      v7 = _m_por(_m_psllq(v7, 0x20u), v49);
      v61 += 4;
      v63 -= 4;
    }
    v7 = _m_psllq(v7, _m_psubd(v10, _mm_cvtsi32_si64(v8)));
    v14 = v45;
  }
LABEL_5:
  v8 -= v14;
  v15 = _mm_cvtsi32_si64(v14);
  v16 = _mm_cvtsi64_si32(_m_psrlq(v7, _m_psubd(v10, v15)));
  v7 = _m_psllq(v7, v15);
  v17 = 0;
  v19 = __OFSUB__(v16, twoexpnminusone[v14]);
  v18 = v16 - twoexpnminusone[v14] < 0;
  v20 = *(_DWORD *)&lowest_coef[2 * v14];
  if ( v18 ^ v19 )
    v17 = v20;
  LOWORD(v21) = v17 + v16;
  v22 = 1;
  v21 = (unsigned __int16)v21;
  v23 = (signed int)a5;
  LOWORD(v21) = *a5 + v21;
  *a5 = v21;
  v24 = v7;
  v25 = a4 + 8;
  *(_DWORD *)a6 = _mm_cvtsi64_si32(_mm_cvtsi32_si64(v21));
  while ( 2 )
  {
    v7 = _m_psrlq(v7, 0x38u);
    while ( v8 < 8 )
    {
      v56 = _mm_cvtsi32_si64(v8);
      v57 = _m_psubd(v10, v56);
      v58 = _m_pcmpeqb(v56, v56);
      v7 = _m_psrlq(v24, v57);
      if ( v62 )
      {
LABEL_52:
        v25 = a4 + 8;
        v24 = _m_psllq(v7, _m_psubd(v10, _mm_cvtsi32_si64(v8)));
        v7 = _m_psrlq(v24, 0x38u);
        if ( v8 < 8 )
        {
          v60 = 1;
          goto LABEL_58;
        }
      }
      else
      {
        if ( v63 >= 4 )
        {
          v59 = _mm_cvtsi32_si64(_byteswap_ulong(*v9));
          v23 = _mm_cvtsi64_si32(_m_pcmpeqb(v58, v59));
          if ( !v23 )
          {
            ++v9;
            v8 += 32;
            v7 = _m_por(_m_psllq(v7, 0x20u), v59);
            v61 += 4;
            v63 -= 4;
            goto LABEL_52;
          }
        }
        v23 = sub_797E48(v23, v22, v6, v8, v9, v7);
        if ( !v23 )
          goto LABEL_59;
        v25 = a4 + 8;
        v24 = v7;
        v7 = _m_psrlq(v7, 0x38u);
        if ( v8 < 8 )
        {
          v60 = 1;
          goto LABEL_58;
        }
      }
    }
    v26 = _mm_cvtsi64_si32(v7);
    v7 = v24;
    v23 = *(_WORD *)(v25 + 4 * v26);
    v27 = *(_WORD *)(v25 + 4 * v26 + 2);
    v28 = _mm_cvtsi32_si64(v27);
    if ( v27 )
    {
      v8 -= v27;
      v7 = _m_psllq(v24, v28);
      goto LABEL_12;
    }
    v60 = 9;
LABEL_58:
    v23 = sub_797F45(a4, v22, v60, v6, v8, v9, v7, v10);
    if ( v23 >= 0 )
    {
LABEL_12:
      v29 = v23 & 0xF;
      v30 = _mm_cvtsi32_si64(v29);
      v31 = _m_psubd(v10, v30);
      if ( !(v23 & 0xF) )
      {
        if ( v23 >= 240 )
        {
          v22 += 16;
          v25 = a4 + 8;
          if ( v22 < 64 )
          {
LABEL_17:
            v24 = v7;
            continue;
          }
        }
LABEL_18:
        *(__m64 *)a2 = v7;
        *(_DWORD *)(a2 + 12) = v8;
        *(_DWORD *)(a2 + 16) = v9;
        *(_BYTE *)(a2 + 48) = v62;
        *(_DWORD *)(a2 + 36) = v63;
        *(_DWORD *)(a2 + 28) = v61;
        return 0;
      }
      v32 = (unsigned int)v23 >> 4;
      v33 = v32 + v22;
      if ( v8 >= v29 )
      {
LABEL_14:
        v8 -= v29;
        v34 = 0;
        v35 = _mm_cvtsi64_si32(_m_psrlq(v7, v31));
        v36 = _m_psllq(v7, v30);
        v19 = __OFSUB__(v35, twoexpnminusone[v29]);
        v18 = v35 - twoexpnminusone[v29] < 0;
        v37 = *(_DWORD *)&lowest_coef[2 * v29];
        if ( v18 ^ v19 )
          v34 = v37;
        v38 = v34 + v35;
        v23 = izigzag_index[v33];
        v7 = v36;
        v22 = v33 + 1;
        *(_WORD *)(a6 + 2 * v23) = v38;
        v25 = a4 + 8;
        if ( v22 < 64 )
          goto LABEL_17;
        goto LABEL_18;
      }
      v50 = v29;
      v51 = _mm_cvtsi32_si64(v8);
      v52 = _m_psubd(v10, v51);
      v53 = _m_pcmpeqb(v51, v51);
      v7 = _m_psrlq(v7, v52);
      if ( !v62 )
      {
        if ( v63 < 4
          || (v54 = _mm_cvtsi32_si64(_byteswap_ulong(*v9)), (v32 = _mm_cvtsi64_si32(_m_pcmpeqb(v53, v54))) != 0) )
        {
          v55 = sub_797E48(v32, v33, v6, v8, v9, v7);
          v29 = v50;
          if ( !v55 )
            break;
          goto LABEL_14;
        }
        ++v9;
        v8 += 32;
        v7 = _m_por(_m_psllq(v7, 0x20u), v54);
        v61 += 4;
        v63 -= 4;
      }
      v7 = _m_psllq(v7, _m_psubd(v10, _mm_cvtsi32_si64(v8)));
      goto LABEL_14;
    }
    break;
  }
LABEL_59:
  *(__m64 *)a2 = v7;
  *(_DWORD *)(a2 + 12) = v8;
  *(_DWORD *)(a2 + 16) = v9;
  *(_DWORD *)(a2 + 36) = v63;
  *(_BYTE *)(a2 + 48) = v62;
  *(_DWORD *)(a2 + 28) = v61;
  return 0;
}
// B67EE0: using guessed type int izigzag_index[];
// B68100: using guessed type int twoexpnminusone[];

//----- (00797E48) --------------------------------------------------------
signed int __usercall sub_797E48@<eax>(unsigned int a1@<eax>, int a2@<edx>, int a3@<ebp>, signed int a4@<edi>, _BYTE *a5@<esi>, __m64 a6@<mm1>)
{
  int i; // ecx@1
  unsigned __int8 v7; // of@2
  unsigned int v9; // ST04_4@13
  int v10; // ST08_4@13
  bool v11; // zf@13
  unsigned int v12; // ST04_4@16
  int v13; // ST08_4@16
  int v14; // [sp-18h] [bp-18h]@13
  int v15; // [sp-18h] [bp-18h]@16

  for ( i = *(_DWORD *)(a3 - 32); ; i = *(_DWORD *)(v14 + 36) )
  {
    while ( 1 )
    {
      v7 = __OFSUB__(i--, 1);
      if ( (i < 0) ^ v7 )
        break;
      ++*(_DWORD *)(a3 - 40);
      a1 = *a5++;
      if ( a1 == 255 )
      {
        do
        {
          while ( 1 )
          {
            v7 = __OFSUB__(i--, 1);
            if ( !((i < 0) ^ v7) )
              break;
            if ( !*(_DWORD *)(*(_DWORD *)(a3 + 8) + 60) )
              return 0;
            v15 = *(_DWORD *)(a3 + 8);
            v13 = a2;
            v12 = a1;
            v11 = load_from_file(*(_DWORD *)(a3 + 8)) == 0;
            a1 = v12;
            a2 = v13;
            if ( !v11 )
              return 0;
            a5 = *(_BYTE **)(v15 + 16);
            i = *(_DWORD *)(v15 + 36);
          }
          ++*(_DWORD *)(a3 - 40);
          a1 = *a5++;
        }
        while ( a1 == 255 );
        if ( a1 )
        {
          *(_DWORD *)(a3 - 36) = a1;
LABEL_5:
          *(_DWORD *)(a3 - 32) = i;
          return 255;
        }
        a1 = 255;
      }
      a4 += 8;
      a6 = _m_por(_m_psllq(a6, 8u), _mm_cvtsi32_si64(a1));
      if ( a4 > 56 )
        goto LABEL_5;
    }
    if ( !*(_DWORD *)(*(_DWORD *)(a3 + 8) + 60) )
      break;
    v14 = *(_DWORD *)(a3 + 8);
    v10 = a2;
    v9 = a1;
    v11 = load_from_file(*(_DWORD *)(a3 + 8)) == 0;
    a1 = v9;
    a2 = v10;
    if ( !v11 )
      break;
    a5 = *(_BYTE **)(v14 + 16);
  }
  return 0;
}
// 797E48: could not find valid save-restore pair for ebx

//----- (00797F45) --------------------------------------------------------
signed int __usercall sub_797F45@<eax>(unsigned int a1@<eax>, int a2@<edx>, signed int a3@<ebx>, int a4@<ebp>, signed int a5@<edi>, _BYTE *a6@<esi>, __m64 a7@<mm1>, __m64 a8@<mm4>)
{
  int v8; // edi@2
  __m64 v9; // mm7@2
  __m64 v10; // mm2@2
  __m64 v11; // mm1@2
  signed int i; // ecx@2
  signed int v13; // eax@3
  int v14; // edx@3
  signed int v15; // ebx@3
  __m64 v16; // mm3@7
  __m64 v17; // mm0@8
  signed int v18; // ecx@8
  __m64 v19; // mm7@8
  __m64 v20; // mm0@8
  __m64 v21; // mm7@10
  signed int v22; // ebx@15
  __m64 v23; // mm0@15
  signed int v24; // ecx@15
  __m64 v25; // mm7@15
  __m64 v26; // mm0@15
  __m64 v27; // mm7@17
  signed int v28; // eax@20
  signed int result; // eax@23
  int v30; // ebx@24

  *(_DWORD *)(a4 - 16) = a3;
  if ( a5 < a3 )
  {
    v17 = _mm_cvtsi32_si64(a5);
    v18 = *(_DWORD *)(a4 - 32);
    v19 = _m_psubd(a8, v17);
    v20 = _m_pcmpeqb(v17, v17);
    a7 = _m_psrlq(a7, v19);
    if ( !*(_DWORD *)(a4 - 36) )
    {
      if ( v18 < 4
        || (v21 = _mm_cvtsi32_si64(_byteswap_ulong(*(_DWORD *)a6)), (a1 = _mm_cvtsi64_si32(_m_pcmpeqb(v20, v21))) != 0) )
      {
        if ( !sub_797E48(a1, a2, a4, a5, a6, a7) )
          return 1;
        a3 = *(_DWORD *)(a4 - 16);
        goto LABEL_2;
      }
      a6 += 4;
      a5 += 32;
      a7 = _m_por(_m_psllq(a7, 0x20u), v21);
      *(_DWORD *)(a4 - 40) += 4;
      *(_DWORD *)(a4 - 32) = v18 - 4;
    }
    a7 = _m_psllq(a7, _m_psubd(a8, _mm_cvtsi32_si64(a5)));
    a3 = *(_DWORD *)(a4 - 16);
  }
LABEL_2:
  v8 = a5 - a3;
  v9 = _mm_cvtsi32_si64(a3);
  v10 = a7;
  v11 = _m_psllq(a7, v9);
  for ( i = _mm_cvtsi64_si32(_m_psrlq(v10, _m_psubd(a8, v9)));
        ;
        i = _mm_cvtsi64_si32(_m_por(_m_psllq(_mm_cvtsi32_si64(i), 1u), v16)) )
  {
    v13 = *(_DWORD *)(a4 - 16);
    v14 = *(_DWORD *)(a4 - 20);
    v15 = *(_WORD *)(v14 + 2 * v13 + 1578);
    if ( v15 != -1 )
      v15 = *(_WORD *)(v14 + 2 * v13 + 1578);
    if ( v15 >= i )
      break;
    if ( v8 >= 1 )
      goto LABEL_7;
    v22 = i;
    v23 = _mm_cvtsi32_si64(v8);
    v24 = *(_DWORD *)(a4 - 32);
    v25 = _m_psubd(a8, v23);
    v26 = _m_pcmpeqb(v23, v23);
    v11 = _m_psrlq(v11, v25);
    if ( *(_DWORD *)(a4 - 36) )
      goto LABEL_19;
    if ( v24 >= 4 )
    {
      v27 = _mm_cvtsi32_si64(_byteswap_ulong(*(_DWORD *)a6));
      v13 = _mm_cvtsi64_si32(_m_pcmpeqb(v26, v27));
      if ( !v13 )
      {
        a6 += 4;
        v8 += 32;
        v11 = _m_por(_m_psllq(v11, 0x20u), v27);
        *(_DWORD *)(a4 - 40) += 4;
        *(_DWORD *)(a4 - 32) = v24 - 4;
LABEL_19:
        v11 = _m_psllq(v11, _m_psubd(a8, _mm_cvtsi32_si64(v8)));
        i = v22;
        goto LABEL_7;
      }
    }
    v28 = sub_797E48(v13, v14, a4, v8, a6, v11);
    i = v22;
    if ( !v28 )
      return 1;
LABEL_7:
    --v8;
    v16 = _m_psrlq(v11, 0x3Fu);
    v11 = _m_psllq(v11, 1u);
    ++*(_DWORD *)(a4 - 16);
  }
  if ( v13 <= 16 )
  {
    v30 = *(_DWORD *)(a4 - 20);
    LOWORD(i) = *(_WORD *)(v30 + 2 * *(_DWORD *)(a4 - 16) + 1614)
              + i
              - *(_WORD *)(v30 + 2 * *(_DWORD *)(a4 - 16) + 1544);
    result = *(_WORD *)(v30 + 2 * i + 1032);
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00798100) --------------------------------------------------------
int __usercall own_decodehuffman8x8_m5@<eax>(int a1@<edx>, __m64 *a2, unsigned int a3, unsigned int a4, _WORD *a5, int a6)
{
  int v6; // ebp@0
  __m64 v7; // mm1@1
  signed int v8; // edi@1
  _BYTE *v9; // esi@1
  __m64 v10; // mm4@1
  signed int v11; // eax@2
  __m64 v12; // mm2@5
  int v13; // ecx@5
  int v14; // edx@7
  signed int v15; // eax@7
  __int16 v16; // cx@7
  int v17; // ebx@7
  __m64 v18; // mm3@7
  int v19; // ecx@10
  unsigned int v20; // ebx@10
  unsigned int v21; // ebx@10
  __m64 v22; // mm2@10
  int v23; // ecx@12
  __m64 v24; // mm2@12
  __m64 v25; // mm3@12
  unsigned int v26; // eax@13
  int v27; // edx@13
  int v28; // ebx@14
  __m64 v29; // mm0@14
  signed int v31; // ebx@21
  signed int v32; // ebx@22
  int v33; // ebx@30
  signed int v34; // eax@30
  signed int v35; // ebx@34
  int v36; // [sp+0h] [bp-28h]@1
  int v37; // [sp+4h] [bp-24h]@1
  char v38; // [sp+8h] [bp-20h]@1

  v36 = a2[3].m64_i32[1];
  v37 = a2[4].m64_i32[1];
  v38 = a2[6].m64_i8[0];
  v7 = (__m64)a2->m64_u64;
  v8 = a2[1].m64_i32[1];
  v9 = (_BYTE *)a2[2].m64_i32[0];
  v10 = _mm_cvtsi32_si64(0x40u);
  *(_QWORD *)a6 = 0i64;
  *(_QWORD *)(a6 + 8) = 0i64;
  *(_QWORD *)(a6 + 16) = 0i64;
  *(_QWORD *)(a6 + 24) = 0i64;
  *(_QWORD *)(a6 + 32) = 0i64;
  *(_QWORD *)(a6 + 40) = 0i64;
  *(_QWORD *)(a6 + 48) = 0i64;
  *(_QWORD *)(a6 + 56) = 0i64;
  *(_QWORD *)(a6 + 64) = 0i64;
  *(_QWORD *)(a6 + 72) = 0i64;
  *(_QWORD *)(a6 + 80) = 0i64;
  *(_QWORD *)(a6 + 88) = 0i64;
  *(_QWORD *)(a6 + 96) = 0i64;
  *(_QWORD *)(a6 + 104) = 0i64;
  *(_QWORD *)(a6 + 112) = 0i64;
  *(_QWORD *)(a6 + 120) = 0i64;
  if ( v8 < 8 )
  {
    if ( !sub_79840E(a3, a1, v6, v8, v9, v7, v10) )
      goto LABEL_37;
    if ( v8 < 8 )
    {
      v31 = 1;
      goto LABEL_25;
    }
  }
  v11 = *(_DWORD *)(a3 + 8 + 4 * _mm_cvtsi64_si32(_m_psrlq(v7, 0x38u)));
  if ( v11 <= 0xFFFF )
  {
    v31 = 9;
LABEL_25:
    v11 = sub_798516(a3, a1, v31, v6, v8, v9, v7, v10);
    if ( v11 < 0 )
      goto LABEL_37;
    goto LABEL_4;
  }
  v8 -= (unsigned int)v11 >> 16;
  v7 = _m_psllqi(v7, (unsigned int)v11 >> 16);
  v11 = (unsigned __int16)v11;
LABEL_4:
  if ( v8 >= v11 )
    goto LABEL_5;
  v32 = v11;
  if ( sub_79840E(v11, a1, v6, v8, v9, v7, v10) )
  {
    v11 = v32;
LABEL_5:
    v8 -= v11;
    v12 = _mm_cvtsi32_si64(v11);
    v13 = _mm_cvtsi64_si32(_m_psrlq(v7, _m_psubd(v10, v12)));
    v7 = _m_psllq(v7, v12);
    if ( v13 < twoexpnminusone[v11] )
      v13 += lowest_coef[v11];
    v14 = 1;
    v15 = (signed int)a5;
    v16 = *a5 + v13;
    *a5 = v16;
    *(_WORD *)a6 = v16;
    v17 = a4 + 8;
    v18 = v7;
    while ( 2 )
    {
      v7 = _m_psrlq(v7, 0x38u);
      while ( v8 < 8 )
      {
        v7 = v18;
        v15 = sub_79840E(v15, v14, v6, v8, v9, v18, v10);
        v17 = a4 + 8;
        if ( !v15 )
          goto LABEL_37;
        v7 = _m_psrlq(v18, 0x38u);
        if ( v8 < 8 )
        {
          v35 = 1;
          goto LABEL_36;
        }
      }
      v19 = _mm_cvtsi64_si32(v7);
      v7 = v18;
      v20 = *(_DWORD *)(v17 + 4 * v19);
      LOWORD(v15) = v20;
      v21 = v20 >> 16;
      v15 = (unsigned __int16)v15;
      v22 = _mm_cvtsi32_si64(v21);
      if ( v21 )
      {
        v8 -= v21;
        v7 = _m_psllq(v18, v22);
      }
      else
      {
        v35 = 9;
LABEL_36:
        v15 = sub_798516(a4, v14, v35, v6, v8, v9, v7, v10);
        if ( v15 < 0 )
          break;
      }
      v23 = v15 & 0xF;
      v24 = _mm_cvtsi32_si64(v23);
      v25 = _m_psubd(v10, v24);
      if ( v15 & 0xF )
      {
        v26 = (unsigned int)v15 >> 4;
        v27 = v26 + v14;
        if ( v8 < v23 )
        {
          v33 = v23;
          v34 = sub_79840E(v26, v27, v6, v8, v9, v7, v10);
          v23 = v33;
          if ( !v34 )
            break;
        }
        v8 -= v23;
        v28 = _mm_cvtsi64_si32(_m_psrlq(v7, v25));
        v29 = _m_psllq(v7, v24);
        if ( v28 < twoexpnminusone[v23] )
          v28 += lowest_coef[v23];
        v15 = izigzag_index[v27];
        v7 = v29;
        v14 = v27 + 1;
        *(_WORD *)(a6 + 2 * v15) = v28;
        v17 = a4 + 8;
        if ( v14 < 64 )
        {
LABEL_17:
          v18 = v7;
          continue;
        }
      }
      else if ( v15 >= 240 )
      {
        v14 += 16;
        v17 = a4 + 8;
        if ( v14 < 64 )
          goto LABEL_17;
      }
      break;
    }
    a2->m64_u64 = (unsigned __int64)v7;
    a2[1].m64_i32[1] = v8;
    a2[2].m64_i32[0] = (int)v9;
    a2[4].m64_i32[1] = v37;
    a2[6].m64_i8[0] = v38;
    a2[3].m64_i32[1] = v36;
    return 0;
  }
LABEL_37:
  a2->m64_u64 = (unsigned __int64)v7;
  a2[1].m64_i32[1] = v8;
  a2[2].m64_i32[0] = (int)v9;
  a2[4].m64_i32[1] = v37;
  a2[6].m64_i8[0] = v38;
  a2[3].m64_i32[1] = v36;
  return 0;
}
// B67EE0: using guessed type int izigzag_index[];
// B680C0: using guessed type int lowest_coef[];
// B68100: using guessed type int twoexpnminusone[];

//----- (0079840E) --------------------------------------------------------
signed int __usercall sub_79840E@<eax>(unsigned int a1@<eax>, int a2@<edx>, int a3@<ebp>, signed int a4@<edi>, _BYTE *a5@<esi>, __m64 a6@<mm1>, __m64 a7@<mm4>)
{
  int v7; // ecx@1
  __m64 v8; // mm1@1
  unsigned __int8 v9; // of@2
  signed int result; // eax@5
  unsigned int v11; // ST04_4@13
  int v12; // ST08_4@13
  bool v13; // zf@13
  unsigned int v14; // ST04_4@16
  int v15; // ST08_4@16
  int v16; // [sp-18h] [bp-18h]@13
  int v17; // [sp-18h] [bp-18h]@16

  v7 = *(_DWORD *)(a3 - 36);
  v8 = _m_psrlq(a6, _m_psubd(a7, _mm_cvtsi32_si64(a4)));
  if ( *(_BYTE *)(a3 - 32) )
  {
LABEL_5:
    *(_DWORD *)(a3 - 36) = v7;
    result = 255;
  }
  else
  {
    while ( 1 )
    {
      while ( 1 )
      {
        v9 = __OFSUB__(v7--, 1);
        if ( (v7 < 0) ^ v9 )
          break;
        ++*(_DWORD *)(a3 - 40);
        a1 = *a5++;
        if ( a1 == 255 )
        {
          do
          {
            while ( 1 )
            {
              v9 = __OFSUB__(v7--, 1);
              if ( !((v7 < 0) ^ v9) )
                break;
              if ( !*(_DWORD *)(*(_DWORD *)(a3 + 8) + 60) )
                goto LABEL_11;
              v17 = *(_DWORD *)(a3 + 8);
              v15 = a2;
              v14 = a1;
              v13 = load_from_file(*(_DWORD *)(a3 + 8)) == 0;
              a1 = v14;
              a2 = v15;
              if ( !v13 )
                goto LABEL_11;
              a5 = *(_BYTE **)(v17 + 16);
              v7 = *(_DWORD *)(v17 + 36);
            }
            ++*(_DWORD *)(a3 - 40);
            a1 = *a5++;
          }
          while ( a1 == 255 );
          if ( a1 )
          {
            *(_BYTE *)(a3 - 32) = a1;
            goto LABEL_5;
          }
          a1 = 255;
        }
        a4 += 8;
        v8 = _m_por(_m_psllq(v8, 8u), _mm_cvtsi32_si64(a1));
        if ( a4 > 56 )
          goto LABEL_5;
      }
      if ( !*(_DWORD *)(*(_DWORD *)(a3 + 8) + 60) )
        break;
      v16 = *(_DWORD *)(a3 + 8);
      v12 = a2;
      v11 = a1;
      v13 = load_from_file(*(_DWORD *)(a3 + 8)) == 0;
      a1 = v11;
      a2 = v12;
      if ( !v13 )
        break;
      a5 = *(_BYTE **)(v16 + 16);
      v7 = *(_DWORD *)(v16 + 36);
    }
LABEL_11:
    result = 0;
  }
  return result;
}
// 79840E: could not find valid save-restore pair for ebx

//----- (00798516) --------------------------------------------------------
signed int __usercall sub_798516@<eax>(unsigned int a1@<eax>, int a2@<edx>, signed int a3@<ebx>, int a4@<ebp>, signed int a5@<edi>, _BYTE *a6@<esi>, __m64 a7@<mm1>, __m64 a8@<mm4>)
{
  signed int v8; // edi@2
  __m64 v9; // mm7@2
  __m64 v10; // mm2@2
  __m64 v11; // mm1@2
  signed int i; // ecx@2
  signed int v13; // eax@3
  int v14; // edx@3
  signed int v15; // ebx@3
  __m64 v16; // mm3@7
  signed int v17; // ebx@10
  signed int v18; // eax@10
  signed int result; // eax@13
  int v20; // ebx@14

  *(_DWORD *)(a4 - 16) = a3;
  if ( a5 < a3 )
  {
    if ( !sub_79840E(a1, a2, a4, a5, a6, a7, a8) )
      return 1;
    a3 = *(_DWORD *)(a4 - 16);
  }
  v8 = a5 - a3;
  v9 = _mm_cvtsi32_si64(a3);
  v10 = a7;
  v11 = _m_psllq(a7, v9);
  for ( i = _mm_cvtsi64_si32(_m_psrlq(v10, _m_psubd(a8, v9)));
        ;
        i = _mm_cvtsi64_si32(_m_por(_m_psllq(_mm_cvtsi32_si64(i), 1u), v16)) )
  {
    v13 = *(_DWORD *)(a4 - 16);
    v14 = *(_DWORD *)(a4 - 20);
    v15 = *(_WORD *)(v14 + 2 * v13 + 1578);
    if ( v15 != -1 )
      v15 = *(_WORD *)(v14 + 2 * v13 + 1578);
    if ( v15 >= i )
      break;
    if ( v8 < 1 )
    {
      v17 = i;
      v18 = sub_79840E(v13, v14, a4, v8, a6, v11, a8);
      i = v17;
      if ( !v18 )
        return 1;
    }
    --v8;
    v16 = _m_psrlq(v11, 0x3Fu);
    v11 = _m_psllq(v11, 1u);
    ++*(_DWORD *)(a4 - 16);
  }
  if ( v13 <= 16 )
  {
    v20 = *(_DWORD *)(a4 - 20);
    LOWORD(i) = *(_WORD *)(v20 + 2 * *(_DWORD *)(a4 - 16) + 1614)
              + i
              - *(_WORD *)(v20 + 2 * *(_DWORD *)(a4 - 16) + 1544);
    result = *(_WORD *)(v20 + 2 * i + 1032);
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (00798600) --------------------------------------------------------
void __cdecl own_iqnt8x8_ipp_m5(int a1, int a2)
{
  __m64 v2; // mm2@1
  __m64 v3; // mm2@1
  __m64 v4; // mm2@1
  __m64 v5; // mm2@1
  __m64 v6; // mm2@1
  __m64 v7; // mm2@1
  __m64 v8; // mm2@1
  __m64 v9; // mm2@1

  v2 = _m_pmullw(*(__m64 *)(a1 + 8), *(__m64 *)(a2 + 8));
  *(__m64 *)a1 = _m_pmullw(*(__m64 *)a1, *(__m64 *)a2);
  *(__m64 *)(a1 + 8) = v2;
  v3 = _m_pmullw(*(__m64 *)(a1 + 24), *(__m64 *)(a2 + 24));
  *(__m64 *)(a1 + 16) = _m_pmullw(*(__m64 *)(a1 + 16), *(__m64 *)(a2 + 16));
  *(__m64 *)(a1 + 24) = v3;
  v4 = _m_pmullw(*(__m64 *)(a1 + 40), *(__m64 *)(a2 + 40));
  *(__m64 *)(a1 + 32) = _m_pmullw(*(__m64 *)(a1 + 32), *(__m64 *)(a2 + 32));
  *(__m64 *)(a1 + 40) = v4;
  v5 = _m_pmullw(*(__m64 *)(a1 + 56), *(__m64 *)(a2 + 56));
  *(__m64 *)(a1 + 48) = _m_pmullw(*(__m64 *)(a1 + 48), *(__m64 *)(a2 + 48));
  *(__m64 *)(a1 + 56) = v5;
  v6 = _m_pmullw(*(__m64 *)(a1 + 72), *(__m64 *)(a2 + 72));
  *(__m64 *)(a1 + 64) = _m_pmullw(*(__m64 *)(a1 + 64), *(__m64 *)(a2 + 64));
  *(__m64 *)(a1 + 72) = v6;
  v7 = _m_pmullw(*(__m64 *)(a1 + 88), *(__m64 *)(a2 + 88));
  *(__m64 *)(a1 + 80) = _m_pmullw(*(__m64 *)(a1 + 80), *(__m64 *)(a2 + 80));
  *(__m64 *)(a1 + 88) = v7;
  v8 = _m_pmullw(*(__m64 *)(a1 + 104), *(__m64 *)(a2 + 104));
  *(__m64 *)(a1 + 96) = _m_pmullw(*(__m64 *)(a1 + 96), *(__m64 *)(a2 + 96));
  *(__m64 *)(a1 + 104) = v8;
  v9 = _m_pmullw(*(__m64 *)(a1 + 120), *(__m64 *)(a2 + 120));
  *(__m64 *)(a1 + 112) = _m_pmullw(*(__m64 *)(a1 + 112), *(__m64 *)(a2 + 112));
  *(__m64 *)(a1 + 120) = v9;
}

//----- (00798700) --------------------------------------------------------
void __cdecl own_iqnt8x8_ipp_w7(int a1, int a2)
{
  __m128i v2; // xmm2@3
  __m128i v3; // xmm2@3
  __m128i v4; // xmm2@3
  __m128i v5; // xmm2@3
  __m128i v6; // xmm2@4
  __m128i v7; // xmm2@4
  __m128i v8; // xmm2@4
  __m128i v9; // xmm2@4
  __m128i v10; // xmm2@6
  __m128i v11; // xmm2@6
  __m128i v12; // xmm2@6
  __m128i v13; // xmm2@6
  __m128i v14; // xmm2@7
  __m128i v15; // xmm2@7
  __m128i v16; // xmm2@7
  __m128i v17; // xmm2@7

  if ( a1 & 0xF )
  {
    if ( a2 & 0xF )
    {
      v2 = _mm_mullo_epi16(_mm_loadu_si128((const __m128i *)(a1 + 16)), _mm_loadu_si128((const __m128i *)(a2 + 16)));
      _mm_storeu_si128(
        (__m128i *)a1,
        _mm_mullo_epi16(_mm_loadu_si128((const __m128i *)a1), _mm_loadu_si128((const __m128i *)a2)));
      _mm_storeu_si128((__m128i *)(a1 + 16), v2);
      v3 = _mm_mullo_epi16(_mm_loadu_si128((const __m128i *)(a1 + 48)), _mm_loadu_si128((const __m128i *)(a2 + 48)));
      _mm_storeu_si128(
        (__m128i *)(a1 + 32),
        _mm_mullo_epi16(_mm_loadu_si128((const __m128i *)(a1 + 32)), _mm_loadu_si128((const __m128i *)(a2 + 32))));
      _mm_storeu_si128((__m128i *)(a1 + 48), v3);
      v4 = _mm_mullo_epi16(_mm_loadu_si128((const __m128i *)(a1 + 80)), _mm_loadu_si128((const __m128i *)(a2 + 80)));
      _mm_storeu_si128(
        (__m128i *)(a1 + 64),
        _mm_mullo_epi16(_mm_loadu_si128((const __m128i *)(a1 + 64)), _mm_loadu_si128((const __m128i *)(a2 + 64))));
      _mm_storeu_si128((__m128i *)(a1 + 80), v4);
      v5 = _mm_mullo_epi16(_mm_loadu_si128((const __m128i *)(a1 + 112)), _mm_loadu_si128((const __m128i *)(a2 + 112)));
      _mm_storeu_si128(
        (__m128i *)(a1 + 96),
        _mm_mullo_epi16(_mm_loadu_si128((const __m128i *)(a1 + 96)), _mm_loadu_si128((const __m128i *)(a2 + 96))));
      _mm_storeu_si128((__m128i *)(a1 + 112), v5);
    }
    else
    {
      v6 = _mm_mullo_epi16(_mm_loadu_si128((const __m128i *)(a1 + 16)), _mm_load_si128((const __m128i *)(a2 + 16)));
      _mm_storeu_si128(
        (__m128i *)a1,
        _mm_mullo_epi16(_mm_loadu_si128((const __m128i *)a1), _mm_load_si128((const __m128i *)a2)));
      _mm_storeu_si128((__m128i *)(a1 + 16), v6);
      v7 = _mm_mullo_epi16(_mm_loadu_si128((const __m128i *)(a1 + 48)), _mm_load_si128((const __m128i *)(a2 + 48)));
      _mm_storeu_si128(
        (__m128i *)(a1 + 32),
        _mm_mullo_epi16(_mm_loadu_si128((const __m128i *)(a1 + 32)), _mm_load_si128((const __m128i *)(a2 + 32))));
      _mm_storeu_si128((__m128i *)(a1 + 48), v7);
      v8 = _mm_mullo_epi16(_mm_loadu_si128((const __m128i *)(a1 + 80)), _mm_load_si128((const __m128i *)(a2 + 80)));
      _mm_storeu_si128(
        (__m128i *)(a1 + 64),
        _mm_mullo_epi16(_mm_loadu_si128((const __m128i *)(a1 + 64)), _mm_load_si128((const __m128i *)(a2 + 64))));
      _mm_storeu_si128((__m128i *)(a1 + 80), v8);
      v9 = _mm_mullo_epi16(_mm_loadu_si128((const __m128i *)(a1 + 112)), _mm_load_si128((const __m128i *)(a2 + 112)));
      _mm_storeu_si128(
        (__m128i *)(a1 + 96),
        _mm_mullo_epi16(_mm_loadu_si128((const __m128i *)(a1 + 96)), _mm_load_si128((const __m128i *)(a2 + 96))));
      _mm_storeu_si128((__m128i *)(a1 + 112), v9);
    }
  }
  else if ( a2 & 0xF )
  {
    v10 = _mm_mullo_epi16(_mm_load_si128((const __m128i *)(a1 + 16)), _mm_loadu_si128((const __m128i *)(a2 + 16)));
    _mm_store_si128(
      (__m128i *)a1,
      _mm_mullo_epi16(_mm_load_si128((const __m128i *)a1), _mm_loadu_si128((const __m128i *)a2)));
    _mm_store_si128((__m128i *)(a1 + 16), v10);
    v11 = _mm_mullo_epi16(_mm_load_si128((const __m128i *)(a1 + 48)), _mm_loadu_si128((const __m128i *)(a2 + 48)));
    _mm_store_si128(
      (__m128i *)(a1 + 32),
      _mm_mullo_epi16(_mm_load_si128((const __m128i *)(a1 + 32)), _mm_loadu_si128((const __m128i *)(a2 + 32))));
    _mm_store_si128((__m128i *)(a1 + 48), v11);
    v12 = _mm_mullo_epi16(_mm_load_si128((const __m128i *)(a1 + 80)), _mm_loadu_si128((const __m128i *)(a2 + 80)));
    _mm_store_si128(
      (__m128i *)(a1 + 64),
      _mm_mullo_epi16(_mm_load_si128((const __m128i *)(a1 + 64)), _mm_loadu_si128((const __m128i *)(a2 + 64))));
    _mm_store_si128((__m128i *)(a1 + 80), v12);
    v13 = _mm_mullo_epi16(_mm_load_si128((const __m128i *)(a1 + 112)), _mm_loadu_si128((const __m128i *)(a2 + 112)));
    _mm_store_si128(
      (__m128i *)(a1 + 96),
      _mm_mullo_epi16(_mm_load_si128((const __m128i *)(a1 + 96)), _mm_loadu_si128((const __m128i *)(a2 + 96))));
    _mm_store_si128((__m128i *)(a1 + 112), v13);
  }
  else
  {
    v14 = _mm_mullo_epi16(_mm_load_si128((const __m128i *)(a1 + 16)), _mm_load_si128((const __m128i *)(a2 + 16)));
    _mm_store_si128(
      (__m128i *)a1,
      _mm_mullo_epi16(_mm_load_si128((const __m128i *)a1), _mm_load_si128((const __m128i *)a2)));
    _mm_store_si128((__m128i *)(a1 + 16), v14);
    v15 = _mm_mullo_epi16(_mm_load_si128((const __m128i *)(a1 + 48)), _mm_load_si128((const __m128i *)(a2 + 48)));
    _mm_store_si128(
      (__m128i *)(a1 + 32),
      _mm_mullo_epi16(_mm_load_si128((const __m128i *)(a1 + 32)), _mm_load_si128((const __m128i *)(a2 + 32))));
    _mm_store_si128((__m128i *)(a1 + 48), v15);
    v16 = _mm_mullo_epi16(_mm_load_si128((const __m128i *)(a1 + 80)), _mm_load_si128((const __m128i *)(a2 + 80)));
    _mm_store_si128(
      (__m128i *)(a1 + 64),
      _mm_mullo_epi16(_mm_load_si128((const __m128i *)(a1 + 64)), _mm_load_si128((const __m128i *)(a2 + 64))));
    _mm_store_si128((__m128i *)(a1 + 80), v16);
    v17 = _mm_mullo_epi16(_mm_load_si128((const __m128i *)(a1 + 112)), _mm_load_si128((const __m128i *)(a2 + 112)));
    _mm_store_si128(
      (__m128i *)(a1 + 96),
      _mm_mullo_epi16(_mm_load_si128((const __m128i *)(a1 + 96)), _mm_load_si128((const __m128i *)(a2 + 96))));
    _mm_store_si128((__m128i *)(a1 + 112), v17);
  }
}

//----- (007989A0) --------------------------------------------------------
void __cdecl own_dct_2d_16s_8x8_inv_m5(int a1)
{
  int v1; // edx@1
  __m64 v2; // mm1@1
  __m64 v3; // mm0@1
  __m64 v4; // mm5@1
  __m64 v5; // mm0@1
  __m64 v6; // mm2@1
  __m64 v7; // mm6@1
  __m64 v8; // mm2@1
  __m64 v9; // mm5@1
  __m64 v10; // mm6@1
  __m64 v11; // mm3@1
  __m64 v12; // mm4@1
  __m64 v13; // mm1@1
  __m64 v14; // mm3@1
  __m64 v15; // mm0@1
  __m64 v16; // mm1@1
  __m64 v17; // mm5@1
  __m64 v18; // mm4@1
  __m64 v19; // mm0@1
  __m64 v20; // mm1@1
  __m64 v21; // mm2@1
  __m64 v22; // mm0@1
  __m64 v23; // mm5@1
  __m64 v24; // mm0@1
  __m64 v25; // mm2@1
  __m64 v26; // mm6@1
  __m64 v27; // mm2@1
  __m64 v28; // mm5@1
  __m64 v29; // mm6@1
  __m64 v30; // mm3@1
  __m64 v31; // mm4@1
  __m64 v32; // mm1@1
  __m64 v33; // mm3@1
  __m64 v34; // mm0@1
  __m64 v35; // mm1@1
  __m64 v36; // mm5@1
  __m64 v37; // mm4@1
  __m64 v38; // mm0@1
  __m64 v39; // mm1@1
  __m64 v40; // mm2@1
  __m64 v41; // mm0@1
  __m64 v42; // mm5@1
  __m64 v43; // mm0@1
  __m64 v44; // mm2@1
  __m64 v45; // mm6@1
  __m64 v46; // mm2@1
  __m64 v47; // mm5@1
  __m64 v48; // mm6@1
  __m64 v49; // mm3@1
  __m64 v50; // mm4@1
  __m64 v51; // mm1@1
  __m64 v52; // mm3@1
  __m64 v53; // mm0@1
  __m64 v54; // mm1@1
  __m64 v55; // mm5@1
  __m64 v56; // mm4@1
  __m64 v57; // mm0@1
  __m64 v58; // mm1@1
  __m64 v59; // mm2@1
  __m64 v60; // mm0@1
  __m64 v61; // mm5@1
  __m64 v62; // mm0@1
  __m64 v63; // mm2@1
  __m64 v64; // mm6@1
  __m64 v65; // mm2@1
  __m64 v66; // mm5@1
  __m64 v67; // mm6@1
  __m64 v68; // mm3@1
  __m64 v69; // mm4@1
  __m64 v70; // mm1@1
  __m64 v71; // mm3@1
  __m64 v72; // mm0@1
  __m64 v73; // mm1@1
  __m64 v74; // mm5@1
  __m64 v75; // mm4@1
  __m64 v76; // mm0@1
  __m64 v77; // mm1@1
  __m64 v78; // mm2@1
  __m64 v79; // mm0@1
  __m64 v80; // mm5@1
  __m64 v81; // mm0@1
  __m64 v82; // mm2@1
  __m64 v83; // mm6@1
  __m64 v84; // mm2@1
  __m64 v85; // mm5@1
  __m64 v86; // mm6@1
  __m64 v87; // mm3@1
  __m64 v88; // mm4@1
  __m64 v89; // mm1@1
  __m64 v90; // mm3@1
  __m64 v91; // mm0@1
  __m64 v92; // mm1@1
  __m64 v93; // mm5@1
  __m64 v94; // mm4@1
  __m64 v95; // mm0@1
  __m64 v96; // mm1@1
  __m64 v97; // mm2@1
  __m64 v98; // mm0@1
  __m64 v99; // mm5@1
  __m64 v100; // mm0@1
  __m64 v101; // mm2@1
  __m64 v102; // mm6@1
  __m64 v103; // mm2@1
  __m64 v104; // mm5@1
  __m64 v105; // mm6@1
  __m64 v106; // mm3@1
  __m64 v107; // mm4@1
  __m64 v108; // mm1@1
  __m64 v109; // mm3@1
  __m64 v110; // mm0@1
  __m64 v111; // mm1@1
  __m64 v112; // mm5@1
  __m64 v113; // mm4@1
  __m64 v114; // mm0@1
  __m64 v115; // mm1@1
  __m64 v116; // mm2@1
  __m64 v117; // mm0@1
  __m64 v118; // mm5@1
  __m64 v119; // mm0@1
  __m64 v120; // mm2@1
  __m64 v121; // mm6@1
  __m64 v122; // mm2@1
  __m64 v123; // mm5@1
  __m64 v124; // mm6@1
  __m64 v125; // mm3@1
  __m64 v126; // mm4@1
  __m64 v127; // mm1@1
  __m64 v128; // mm3@1
  __m64 v129; // mm0@1
  __m64 v130; // mm1@1
  __m64 v131; // mm5@1
  __m64 v132; // mm4@1
  __m64 v133; // mm0@1
  __m64 v134; // mm1@1
  __m64 v135; // mm2@1
  __m64 v136; // mm0@1
  __m64 v137; // mm5@1
  __m64 v138; // mm0@1
  __m64 v139; // mm2@1
  __m64 v140; // mm6@1
  __m64 v141; // mm2@1
  __m64 v142; // mm5@1
  __m64 v143; // mm6@1
  __m64 v144; // mm3@1
  __m64 v145; // mm4@1
  __m64 v146; // mm1@1
  __m64 v147; // mm3@1
  __m64 v148; // mm0@1
  __m64 v149; // mm1@1
  __m64 v150; // mm5@1
  __m64 v151; // mm4@1
  __m64 v152; // mm0@1
  __m64 v153; // mm2@1
  __m64 v154; // mm3@1
  __m64 v155; // mm4@1
  __m64 v156; // mm0@1
  __m64 v157; // mm2@1
  __m64 v158; // mm1@1
  __m64 v159; // mm5@1
  __m64 v160; // mm4@1
  __m64 v161; // mm0@1
  __m64 v162; // mm4@1
  __m64 v163; // mm7@1
  __m64 v164; // mm6@1
  __m64 v165; // mm3@1
  __m64 v166; // mm5@1
  __m64 v167; // mm6@1
  __m64 v168; // mm1@1
  __m64 v169; // mm4@1
  __m64 v170; // mm0@1
  __m64 v171; // mm2@1
  __m64 v172; // mm1@1
  __m64 v173; // mm4@1
  __m64 v174; // mm5@1
  __m64 v175; // mm6@1
  __m64 v176; // mm0@1
  __m64 v177; // mm2@1
  __m64 v178; // mm1@1
  __m64 v179; // mm5@1
  __m64 v180; // mm6@1
  __m64 v181; // mm1@1
  __m64 v182; // mm2@1
  __m64 v183; // mm3@1
  __m64 v184; // mm1@1
  __m64 v185; // mm7@1
  __m64 v186; // mm7@1
  __m64 v187; // mm6@1
  __m64 v188; // mm6@1
  __m64 v189; // mm2@1
  __m64 v190; // mm1@1
  __m64 v191; // mm5@1
  __m64 v192; // mm6@1
  __m64 v193; // mm2@1
  __m64 v194; // mm7@1
  __m64 v195; // mm3@1
  __m64 v196; // mm5@1
  __m64 v197; // mm0@1
  __m64 v198; // mm2@1
  __m64 v199; // mm3@1
  __m64 v200; // mm4@1
  __m64 v201; // mm0@1
  __m64 v202; // mm2@1
  __m64 v203; // mm1@1
  __m64 v204; // mm5@1
  __m64 v205; // mm4@1
  __m64 v206; // mm0@1
  __m64 v207; // mm4@1
  __m64 v208; // mm7@1
  __m64 v209; // mm6@1
  __m64 v210; // mm3@1
  __m64 v211; // mm5@1
  __m64 v212; // mm6@1
  __m64 v213; // mm1@1
  __m64 v214; // mm4@1
  __m64 v215; // mm0@1
  __m64 v216; // mm2@1
  __m64 v217; // mm1@1
  __m64 v218; // mm6@1
  __m64 v219; // mm4@1
  __m64 v220; // mm5@1
  __m64 v221; // mm6@1
  __m64 v222; // mm0@1
  __m64 v223; // mm2@1
  __m64 v224; // mm1@1
  __m64 v225; // mm5@1
  __m64 v226; // mm6@1
  __m64 v227; // mm1@1
  __m64 v228; // mm2@1
  __m64 v229; // mm3@1
  __m64 v230; // mm1@1
  __m64 v231; // mm7@1
  __m64 v232; // mm7@1
  __m64 v233; // mm6@1
  __m64 v234; // mm6@1
  __m64 v235; // mm2@1
  __m64 v236; // mm1@1
  __m64 v237; // mm5@1
  __m64 v238; // mm6@1
  __m64 v239; // mm2@1
  __m64 v240; // mm7@1
  __m64 v241; // mm3@1
  __m64 v242; // mm5@1

  v1 = a1;
  v2 = *(__m64 *)(a1 + 8);
  v3 = _m_punpcklwd(*(__m64 *)a1, v2);
  v4 = v3;
  v5 = _m_punpckldq(v3, v3);
  v6 = _m_punpckhwd(*(__m64 *)a1, v2);
  v7 = v6;
  v8 = _m_punpckldq(v6, v6);
  v9 = _m_punpckhdq(v4, v4);
  v10 = _m_punpckhdq(v7, v7);
  v11 = _m_paddd(
          _m_paddd(_m_pmaddwd((__m64)qword_A798F0, v5), *(__m64 *)&xmmword_A79850),
          _m_pmaddwd((__m64)qword_A798F8, v8));
  v12 = v11;
  v13 = _m_paddd(_m_pmaddwd((__m64)qword_A79910, v9), _m_pmaddwd((__m64)qword_A79918, v10));
  v14 = _m_psrad(_m_psubd(v11, v13), 0xCu);
  v15 = _m_paddd(
          _m_paddd(_m_pmaddwd(v5, (__m64)qword_A79900), *(__m64 *)&xmmword_A79850),
          _m_pmaddwd(v8, (__m64)qword_A79908));
  v16 = _m_psrad(_m_paddd(v13, v12), 0xCu);
  v17 = _m_paddd(_m_pmaddwd(v9, (__m64)qword_A79920), _m_pmaddwd(v10, (__m64)qword_A79928));
  v18 = _m_packssdw(_m_psrad(_m_psubd(v15, v17), 0xCu), v14);
  *(__m64 *)a1 = _m_packssdw(v16, _m_psrad(_m_paddd(v15, v17), 0xCu));
  v19 = *(__m64 *)(a1 + 16);
  v20 = *(__m64 *)(a1 + 24);
  *(__m64 *)(a1 + 8) = _m_por(_m_pslld(v18, 0x10u), _m_psrld(v18, 0x10u));
  v21 = v19;
  v22 = _m_punpcklwd(v19, v20);
  v23 = v22;
  v24 = _m_punpckldq(v22, v22);
  v25 = _m_punpckhwd(v21, v20);
  v26 = v25;
  v27 = _m_punpckldq(v25, v25);
  v28 = _m_punpckhdq(v23, v23);
  v29 = _m_punpckhdq(v26, v26);
  v30 = _m_paddd(
          _m_paddd(_m_pmaddwd((__m64)qword_A79930, v24), *(__m64 *)&xmmword_A79850),
          _m_pmaddwd((__m64)qword_A79938, v27));
  v31 = v30;
  v32 = _m_paddd(_m_pmaddwd((__m64)qword_A79950, v28), _m_pmaddwd((__m64)qword_A79958, v29));
  v33 = _m_psrad(_m_psubd(v30, v32), 0xCu);
  v34 = _m_paddd(
          _m_paddd(_m_pmaddwd(v24, (__m64)qword_A79940), *(__m64 *)&xmmword_A79850),
          _m_pmaddwd(v27, (__m64)qword_A79948));
  v35 = _m_psrad(_m_paddd(v32, v31), 0xCu);
  v36 = _m_paddd(_m_pmaddwd(v28, (__m64)qword_A79960), _m_pmaddwd(v29, (__m64)qword_A79968));
  v37 = _m_packssdw(_m_psrad(_m_psubd(v34, v36), 0xCu), v33);
  *(__m64 *)(a1 + 16) = _m_packssdw(v35, _m_psrad(_m_paddd(v34, v36), 0xCu));
  v38 = *(__m64 *)(a1 + 32);
  v39 = *(__m64 *)(a1 + 40);
  *(__m64 *)(a1 + 24) = _m_por(_m_pslld(v37, 0x10u), _m_psrld(v37, 0x10u));
  v40 = v38;
  v41 = _m_punpcklwd(v38, v39);
  v42 = v41;
  v43 = _m_punpckldq(v41, v41);
  v44 = _m_punpckhwd(v40, v39);
  v45 = v44;
  v46 = _m_punpckldq(v44, v44);
  v47 = _m_punpckhdq(v42, v42);
  v48 = _m_punpckhdq(v45, v45);
  v49 = _m_paddd(
          _m_paddd(_m_pmaddwd((__m64)qword_A79970, v43), *(__m64 *)&xmmword_A79850),
          _m_pmaddwd((__m64)qword_A79978, v46));
  v50 = v49;
  v51 = _m_paddd(_m_pmaddwd((__m64)qword_A79990, v47), _m_pmaddwd((__m64)qword_A79998, v48));
  v52 = _m_psrad(_m_psubd(v49, v51), 0xCu);
  v53 = _m_paddd(
          _m_paddd(_m_pmaddwd(v43, (__m64)qword_A79980), *(__m64 *)&xmmword_A79850),
          _m_pmaddwd(v46, (__m64)qword_A79988));
  v54 = _m_psrad(_m_paddd(v51, v50), 0xCu);
  v55 = _m_paddd(_m_pmaddwd(v47, (__m64)qword_A799A0), _m_pmaddwd(v48, (__m64)qword_A799A8));
  v56 = _m_packssdw(_m_psrad(_m_psubd(v53, v55), 0xCu), v52);
  *(__m64 *)(a1 + 32) = _m_packssdw(v54, _m_psrad(_m_paddd(v53, v55), 0xCu));
  v57 = *(__m64 *)(a1 + 48);
  v58 = *(__m64 *)(a1 + 56);
  *(__m64 *)(a1 + 40) = _m_por(_m_pslld(v56, 0x10u), _m_psrld(v56, 0x10u));
  v59 = v57;
  v60 = _m_punpcklwd(v57, v58);
  v61 = v60;
  v62 = _m_punpckldq(v60, v60);
  v63 = _m_punpckhwd(v59, v58);
  v64 = v63;
  v65 = _m_punpckldq(v63, v63);
  v66 = _m_punpckhdq(v61, v61);
  v67 = _m_punpckhdq(v64, v64);
  v68 = _m_paddd(
          _m_paddd(_m_pmaddwd((__m64)qword_A799B0, v62), *(__m64 *)&xmmword_A79850),
          _m_pmaddwd((__m64)qword_A799B8, v65));
  v69 = v68;
  v70 = _m_paddd(_m_pmaddwd((__m64)qword_A799D0, v66), _m_pmaddwd((__m64)qword_A799D8, v67));
  v71 = _m_psrad(_m_psubd(v68, v70), 0xCu);
  v72 = _m_paddd(
          _m_paddd(_m_pmaddwd(v62, (__m64)qword_A799C0), *(__m64 *)&xmmword_A79850),
          _m_pmaddwd(v65, (__m64)qword_A799C8));
  v73 = _m_psrad(_m_paddd(v70, v69), 0xCu);
  v74 = _m_paddd(_m_pmaddwd(v66, (__m64)qword_A799E0), _m_pmaddwd(v67, (__m64)qword_A799E8));
  v75 = _m_packssdw(_m_psrad(_m_psubd(v72, v74), 0xCu), v71);
  *(__m64 *)(a1 + 48) = _m_packssdw(v73, _m_psrad(_m_paddd(v72, v74), 0xCu));
  v76 = *(__m64 *)(a1 + 64);
  v77 = *(__m64 *)(a1 + 72);
  *(__m64 *)(a1 + 56) = _m_por(_m_pslld(v75, 0x10u), _m_psrld(v75, 0x10u));
  v78 = v76;
  v79 = _m_punpcklwd(v76, v77);
  v80 = v79;
  v81 = _m_punpckldq(v79, v79);
  v82 = _m_punpckhwd(v78, v77);
  v83 = v82;
  v84 = _m_punpckldq(v82, v82);
  v85 = _m_punpckhdq(v80, v80);
  v86 = _m_punpckhdq(v83, v83);
  v87 = _m_paddd(
          _m_paddd(_m_pmaddwd((__m64)qword_A798F0, v81), *(__m64 *)&xmmword_A79850),
          _m_pmaddwd((__m64)qword_A798F8, v84));
  v88 = v87;
  v89 = _m_paddd(_m_pmaddwd((__m64)qword_A79910, v85), _m_pmaddwd((__m64)qword_A79918, v86));
  v90 = _m_psrad(_m_psubd(v87, v89), 0xCu);
  v91 = _m_paddd(
          _m_paddd(_m_pmaddwd(v81, (__m64)qword_A79900), *(__m64 *)&xmmword_A79850),
          _m_pmaddwd(v84, (__m64)qword_A79908));
  v92 = _m_psrad(_m_paddd(v89, v88), 0xCu);
  v93 = _m_paddd(_m_pmaddwd(v85, (__m64)qword_A79920), _m_pmaddwd(v86, (__m64)qword_A79928));
  v94 = _m_packssdw(_m_psrad(_m_psubd(v91, v93), 0xCu), v90);
  *(__m64 *)(a1 + 64) = _m_packssdw(v92, _m_psrad(_m_paddd(v91, v93), 0xCu));
  v95 = *(__m64 *)(a1 + 80);
  v96 = *(__m64 *)(a1 + 88);
  *(__m64 *)(a1 + 72) = _m_por(_m_pslld(v94, 0x10u), _m_psrld(v94, 0x10u));
  v97 = v95;
  v98 = _m_punpcklwd(v95, v96);
  v99 = v98;
  v100 = _m_punpckldq(v98, v98);
  v101 = _m_punpckhwd(v97, v96);
  v102 = v101;
  v103 = _m_punpckldq(v101, v101);
  v104 = _m_punpckhdq(v99, v99);
  v105 = _m_punpckhdq(v102, v102);
  v106 = _m_paddd(
           _m_paddd(_m_pmaddwd((__m64)qword_A799B0, v100), *(__m64 *)&xmmword_A79850),
           _m_pmaddwd((__m64)qword_A799B8, v103));
  v107 = v106;
  v108 = _m_paddd(_m_pmaddwd((__m64)qword_A799D0, v104), _m_pmaddwd((__m64)qword_A799D8, v105));
  v109 = _m_psrad(_m_psubd(v106, v108), 0xCu);
  v110 = _m_paddd(
           _m_paddd(_m_pmaddwd(v100, (__m64)qword_A799C0), *(__m64 *)&xmmword_A79850),
           _m_pmaddwd(v103, (__m64)qword_A799C8));
  v111 = _m_psrad(_m_paddd(v108, v107), 0xCu);
  v112 = _m_paddd(_m_pmaddwd(v104, (__m64)qword_A799E0), _m_pmaddwd(v105, (__m64)qword_A799E8));
  v113 = _m_packssdw(_m_psrad(_m_psubd(v110, v112), 0xCu), v109);
  *(__m64 *)(a1 + 80) = _m_packssdw(v111, _m_psrad(_m_paddd(v110, v112), 0xCu));
  v114 = *(__m64 *)(a1 + 96);
  v115 = *(__m64 *)(a1 + 104);
  *(__m64 *)(a1 + 88) = _m_por(_m_pslld(v113, 0x10u), _m_psrld(v113, 0x10u));
  v116 = v114;
  v117 = _m_punpcklwd(v114, v115);
  v118 = v117;
  v119 = _m_punpckldq(v117, v117);
  v120 = _m_punpckhwd(v116, v115);
  v121 = v120;
  v122 = _m_punpckldq(v120, v120);
  v123 = _m_punpckhdq(v118, v118);
  v124 = _m_punpckhdq(v121, v121);
  v125 = _m_paddd(
           _m_paddd(_m_pmaddwd((__m64)qword_A79970, v119), *(__m64 *)&xmmword_A79850),
           _m_pmaddwd((__m64)qword_A79978, v122));
  v126 = v125;
  v127 = _m_paddd(_m_pmaddwd((__m64)qword_A79990, v123), _m_pmaddwd((__m64)qword_A79998, v124));
  v128 = _m_psrad(_m_psubd(v125, v127), 0xCu);
  v129 = _m_paddd(
           _m_paddd(_m_pmaddwd(v119, (__m64)qword_A79980), *(__m64 *)&xmmword_A79850),
           _m_pmaddwd(v122, (__m64)qword_A79988));
  v130 = _m_psrad(_m_paddd(v127, v126), 0xCu);
  v131 = _m_paddd(_m_pmaddwd(v123, (__m64)qword_A799A0), _m_pmaddwd(v124, (__m64)qword_A799A8));
  v132 = _m_packssdw(_m_psrad(_m_psubd(v129, v131), 0xCu), v128);
  *(__m64 *)(a1 + 96) = _m_packssdw(v130, _m_psrad(_m_paddd(v129, v131), 0xCu));
  v133 = *(__m64 *)(a1 + 112);
  v134 = *(__m64 *)(a1 + 120);
  *(__m64 *)(a1 + 104) = _m_por(_m_pslld(v132, 0x10u), _m_psrld(v132, 0x10u));
  v135 = v133;
  v136 = _m_punpcklwd(v133, v134);
  v137 = v136;
  v138 = _m_punpckldq(v136, v136);
  v139 = _m_punpckhwd(v135, v134);
  v140 = v139;
  v141 = _m_punpckldq(v139, v139);
  v142 = _m_punpckhdq(v137, v137);
  v143 = _m_punpckhdq(v140, v140);
  v144 = _m_paddd(
           _m_paddd(_m_pmaddwd((__m64)qword_A79930, v138), *(__m64 *)&xmmword_A79850),
           _m_pmaddwd((__m64)qword_A79938, v141));
  v145 = v144;
  v146 = _m_paddd(_m_pmaddwd((__m64)qword_A79950, v142), _m_pmaddwd((__m64)qword_A79958, v143));
  v147 = _m_psrad(_m_psubd(v144, v146), 0xCu);
  v148 = _m_paddd(
           _m_paddd(_m_pmaddwd(v138, (__m64)qword_A79940), *(__m64 *)&xmmword_A79850),
           _m_pmaddwd(v141, (__m64)qword_A79948));
  v149 = _m_psrad(_m_paddd(v146, v145), 0xCu);
  v150 = _m_paddd(_m_pmaddwd(v142, (__m64)qword_A79960), _m_pmaddwd(v143, (__m64)qword_A79968));
  v151 = _m_packssdw(_m_psrad(_m_psubd(v148, v150), 0xCu), v147);
  *(__m64 *)(a1 + 112) = _m_packssdw(v149, _m_psrad(_m_paddd(v148, v150), 0xCu));
  v152 = *(__m64 *)(a1 + 80);
  *(__m64 *)(a1 + 120) = _m_por(_m_pslld(v151, 0x10u), _m_psrld(v151, 0x10u));
  v153 = v152;
  v154 = *(__m64 *)(a1 + 48);
  v155 = *(__m64 *)(a1 + 112);
  v156 = _m_paddsw(_m_paddsw(_m_pmulhw(v152, *(__m64 *)&xmmword_A798C0), v152), v154);
  v157 = _m_psubsw(v153, _m_paddsw(_m_pmulhw(*(__m64 *)&xmmword_A798C0, v154), v154));
  v158 = v156;
  v159 = _m_psubsw(_m_pmulhw(*(__m64 *)&xmmword_A798A0, *(__m64 *)(a1 + 16)), v155);
  v160 = _m_paddsw(_m_pmulhw(v155, *(__m64 *)&xmmword_A798A0), *(__m64 *)(a1 + 16));
  v161 = _m_paddsw(_m_paddsw(v156, v160), *(__m64 *)&xmmword_A79840);
  v162 = _m_psubsw(v160, v158);
  v163 = _m_paddsw(_m_pmulhw(*(__m64 *)(a1 + 96), *(__m64 *)&xmmword_A798B0), *(__m64 *)(a1 + 32));
  v164 = v159;
  v165 = _m_psubsw(_m_pmulhw(*(__m64 *)&xmmword_A798B0, *(__m64 *)(a1 + 32)), *(__m64 *)(a1 + 96));
  v166 = _m_paddsw(_m_psubsw(v159, v157), *(__m64 *)&xmmword_A79840);
  v167 = _m_paddsw(v164, v157);
  *(__m64 *)(a1 + 112) = v161;
  v168 = v162;
  v169 = _m_paddsw(v162, v166);
  v170.m64_u64 = xmmword_A798D0;
  v171 = _m_pmulhw(*(__m64 *)&xmmword_A798D0, v169);
  *(__m64 *)(a1 + 48) = v167;
  v172 = _m_psubsw(v168, v166);
  v173 = _m_por(_m_paddsw(v169, v171), *(__m64 *)&xmmword_A79840);
  v174 = _m_paddsw(*(__m64 *)(v1 + 64), *(__m64 *)v1);
  v175 = _m_psubsw(*(__m64 *)v1, *(__m64 *)(v1 + 64));
  v176 = _m_por(_m_paddsw(_m_pmulhw(v170, v172), v172), *(__m64 *)&xmmword_A79840);
  v177 = v174;
  v178 = v175;
  v179 = _m_paddsw(_m_paddsw(v174, v163), *(__m64 *)&xmmword_A79860);
  v180 = _m_paddsw(_m_paddsw(v175, v165), *(__m64 *)&xmmword_A79860);
  v181 = _m_psubsw(v178, v165);
  v182 = _m_paddsw(_m_psubsw(v177, v163), *(__m64 *)&xmmword_A79870);
  v183 = v180;
  v184 = _m_paddsw(v181, *(__m64 *)&xmmword_A79870);
  v185 = _m_paddsw(_m_psraw(_m_paddsw(*(__m64 *)(a1 + 112), v179), 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)a1 = _m_punpcklbw(_m_packuswb(v185, v185), (__m64)(unsigned int)xmmword_A79890);
  v186 = v184;
  v187 = _m_paddsw(_m_psraw(_m_paddsw(v180, v173), 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 16) = _m_punpcklbw(_m_packuswb(v187, v187), (__m64)(unsigned int)xmmword_A79890);
  v188 = _m_paddsw(*(__m64 *)(a1 + 48), v182);
  v189 = _m_psubsw(v182, *(__m64 *)(a1 + 48));
  v190 = _m_paddsw(_m_psraw(_m_paddsw(v184, v176), 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 32) = _m_punpcklbw(_m_packuswb(v190, v190), (__m64)(unsigned int)xmmword_A79890);
  v191 = _m_psubsw(v179, *(__m64 *)(a1 + 112));
  v192 = _m_paddsw(_m_psraw(v188, 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 48) = _m_punpcklbw(_m_packuswb(v192, v192), (__m64)(unsigned int)xmmword_A79890);
  v193 = _m_paddsw(_m_psraw(v189, 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 64) = _m_punpcklbw(_m_packuswb(v193, v193), (__m64)(unsigned int)xmmword_A79890);
  v194 = _m_paddsw(_m_psraw(_m_psubsw(v186, v176), 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 80) = _m_punpcklbw(_m_packuswb(v194, v194), (__m64)(unsigned int)xmmword_A79890);
  v195 = _m_paddsw(_m_psraw(_m_psubsw(v183, v173), 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 96) = _m_punpcklbw(_m_packuswb(v195, v195), (__m64)(unsigned int)xmmword_A79890);
  v196 = _m_paddsw(_m_psraw(v191, 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 112) = _m_punpcklbw(_m_packuswb(v196, v196), (__m64)(unsigned int)xmmword_A79890);
  v197 = *(__m64 *)(a1 + 88);
  v198 = v197;
  v199 = *(__m64 *)(a1 + 56);
  v200 = *(__m64 *)(a1 + 120);
  v201 = _m_paddsw(_m_paddsw(_m_pmulhw(v197, *(__m64 *)&xmmword_A798C0), v197), v199);
  v202 = _m_psubsw(v198, _m_paddsw(_m_pmulhw(*(__m64 *)&xmmword_A798C0, v199), v199));
  v203 = v201;
  v204 = _m_psubsw(_m_pmulhw(*(__m64 *)&xmmword_A798A0, *(__m64 *)(a1 + 24)), v200);
  v205 = _m_paddsw(_m_pmulhw(v200, *(__m64 *)&xmmword_A798A0), *(__m64 *)(a1 + 24));
  v206 = _m_paddsw(_m_paddsw(v201, v205), *(__m64 *)&xmmword_A79840);
  v207 = _m_psubsw(v205, v203);
  v208 = _m_paddsw(_m_pmulhw(*(__m64 *)(a1 + 104), *(__m64 *)&xmmword_A798B0), *(__m64 *)(a1 + 40));
  v209 = v204;
  v210 = _m_psubsw(_m_pmulhw(*(__m64 *)&xmmword_A798B0, *(__m64 *)(a1 + 40)), *(__m64 *)(a1 + 104));
  v211 = _m_paddsw(_m_psubsw(v204, v202), *(__m64 *)&xmmword_A79840);
  v212 = _m_paddsw(v209, v202);
  *(__m64 *)(a1 + 120) = v206;
  v213 = v207;
  v214 = _m_paddsw(v207, v211);
  v215.m64_u64 = xmmword_A798D0;
  v216 = _m_pmulhw(*(__m64 *)&xmmword_A798D0, v214);
  *(__m64 *)(a1 + 56) = v212;
  v217 = _m_psubsw(v213, v211);
  v218 = *(__m64 *)(a1 + 8);
  v219 = _m_por(_m_paddsw(v214, v216), *(__m64 *)&xmmword_A79840);
  v220 = _m_paddsw(*(__m64 *)(a1 + 72), v218);
  v221 = _m_psubsw(v218, *(__m64 *)(a1 + 72));
  v222 = _m_por(_m_paddsw(_m_pmulhw(v215, v217), v217), *(__m64 *)&xmmword_A79840);
  v223 = v220;
  v224 = v221;
  v225 = _m_paddsw(_m_paddsw(v220, v208), *(__m64 *)&xmmword_A79860);
  v226 = _m_paddsw(_m_paddsw(v221, v210), *(__m64 *)&xmmword_A79860);
  v227 = _m_psubsw(v224, v210);
  v228 = _m_paddsw(_m_psubsw(v223, v208), *(__m64 *)&xmmword_A79870);
  v229 = v226;
  v230 = _m_paddsw(v227, *(__m64 *)&xmmword_A79870);
  v231 = _m_paddsw(_m_psraw(_m_paddsw(*(__m64 *)(a1 + 120), v225), 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 8) = _m_punpcklbw(_m_packuswb(v231, v231), (__m64)(unsigned int)xmmword_A79890);
  v232 = v230;
  v233 = _m_paddsw(_m_psraw(_m_paddsw(v226, v219), 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 24) = _m_punpcklbw(_m_packuswb(v233, v233), (__m64)(unsigned int)xmmword_A79890);
  v234 = _m_paddsw(*(__m64 *)(a1 + 56), v228);
  v235 = _m_psubsw(v228, *(__m64 *)(a1 + 56));
  v236 = _m_paddsw(_m_psraw(_m_paddsw(v230, v222), 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 40) = _m_punpcklbw(_m_packuswb(v236, v236), (__m64)(unsigned int)xmmword_A79890);
  v237 = _m_psubsw(v225, *(__m64 *)(a1 + 120));
  v238 = _m_paddsw(_m_psraw(v234, 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 56) = _m_punpcklbw(_m_packuswb(v238, v238), (__m64)(unsigned int)xmmword_A79890);
  v239 = _m_paddsw(_m_psraw(v235, 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 72) = _m_punpcklbw(_m_packuswb(v239, v239), (__m64)(unsigned int)xmmword_A79890);
  v240 = _m_paddsw(_m_psraw(_m_psubsw(v232, v222), 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 88) = _m_punpcklbw(_m_packuswb(v240, v240), (__m64)(unsigned int)xmmword_A79890);
  v241 = _m_paddsw(_m_psraw(_m_psubsw(v229, v219), 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 104) = _m_punpcklbw(_m_packuswb(v241, v241), (__m64)(unsigned int)xmmword_A79890);
  v242 = _m_paddsw(_m_psraw(v237, 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 120) = _m_punpcklbw(_m_packuswb(v242, v242), (__m64)(unsigned int)xmmword_A79890);
}
// A79840: using guessed type __int128 xmmword_A79840;
// A79850: using guessed type __int128 xmmword_A79850;
// A79860: using guessed type __int128 xmmword_A79860;
// A79870: using guessed type __int128 xmmword_A79870;
// A79880: using guessed type __int128 xmmword_A79880;
// A79890: using guessed type __int128 xmmword_A79890;
// A798A0: using guessed type __int128 xmmword_A798A0;
// A798B0: using guessed type __int128 xmmword_A798B0;
// A798C0: using guessed type __int128 xmmword_A798C0;
// A798D0: using guessed type __int128 xmmword_A798D0;
// A798F0: using guessed type __int64 qword_A798F0;
// A798F8: using guessed type __int64 qword_A798F8;
// A79900: using guessed type __int64 qword_A79900;
// A79908: using guessed type __int64 qword_A79908;
// A79910: using guessed type __int64 qword_A79910;
// A79918: using guessed type __int64 qword_A79918;
// A79920: using guessed type __int64 qword_A79920;
// A79928: using guessed type __int64 qword_A79928;
// A79930: using guessed type __int64 qword_A79930;
// A79938: using guessed type __int64 qword_A79938;
// A79940: using guessed type __int64 qword_A79940;
// A79948: using guessed type __int64 qword_A79948;
// A79950: using guessed type __int64 qword_A79950;
// A79958: using guessed type __int64 qword_A79958;
// A79960: using guessed type __int64 qword_A79960;
// A79968: using guessed type __int64 qword_A79968;
// A79970: using guessed type __int64 qword_A79970;
// A79978: using guessed type __int64 qword_A79978;
// A79980: using guessed type __int64 qword_A79980;
// A79988: using guessed type __int64 qword_A79988;
// A79990: using guessed type __int64 qword_A79990;
// A79998: using guessed type __int64 qword_A79998;
// A799A0: using guessed type __int64 qword_A799A0;
// A799A8: using guessed type __int64 qword_A799A8;
// A799B0: using guessed type __int64 qword_A799B0;
// A799B8: using guessed type __int64 qword_A799B8;
// A799C0: using guessed type __int64 qword_A799C0;
// A799C8: using guessed type __int64 qword_A799C8;
// A799D0: using guessed type __int64 qword_A799D0;
// A799D8: using guessed type __int64 qword_A799D8;
// A799E0: using guessed type __int64 qword_A799E0;
// A799E8: using guessed type __int64 qword_A799E8;

//----- (00799360) --------------------------------------------------------
void __cdecl own_dct_2d_16s_8x8_inv_a6(int a1)
{
  int v1; // edx@1
  __m64 v2; // mm1@1
  __m64 v3; // mm0@1
  __m64 v4; // mm5@1
  __m64 v5; // mm1@1
  __m64 v6; // mm2@1
  __m64 v7; // mm5@1
  __m64 v8; // mm3@1
  __m64 v9; // mm6@1
  __m64 v10; // mm0@1
  __m64 v11; // mm2@1
  __m64 v12; // mm7@1
  __m64 v13; // mm0@1
  __m64 v14; // mm1@1
  __m64 v15; // mm2@1
  __m64 v16; // mm0@1
  __m64 v17; // mm5@1
  __m64 v18; // mm1@1
  __m64 v19; // mm2@1
  __m64 v20; // mm5@1
  __m64 v21; // mm3@1
  __m64 v22; // mm6@1
  __m64 v23; // mm0@1
  __m64 v24; // mm2@1
  __m64 v25; // mm7@1
  __m64 v26; // mm0@1
  __m64 v27; // mm1@1
  __m64 v28; // mm2@1
  __m64 v29; // mm0@1
  __m64 v30; // mm5@1
  __m64 v31; // mm1@1
  __m64 v32; // mm2@1
  __m64 v33; // mm5@1
  __m64 v34; // mm3@1
  __m64 v35; // mm6@1
  __m64 v36; // mm0@1
  __m64 v37; // mm2@1
  __m64 v38; // mm7@1
  __m64 v39; // mm0@1
  __m64 v40; // mm1@1
  __m64 v41; // mm2@1
  __m64 v42; // mm0@1
  __m64 v43; // mm5@1
  __m64 v44; // mm1@1
  __m64 v45; // mm2@1
  __m64 v46; // mm5@1
  __m64 v47; // mm3@1
  __m64 v48; // mm6@1
  __m64 v49; // mm0@1
  __m64 v50; // mm2@1
  __m64 v51; // mm7@1
  __m64 v52; // mm0@1
  __m64 v53; // mm1@1
  __m64 v54; // mm2@1
  __m64 v55; // mm0@1
  __m64 v56; // mm5@1
  __m64 v57; // mm1@1
  __m64 v58; // mm2@1
  __m64 v59; // mm5@1
  __m64 v60; // mm3@1
  __m64 v61; // mm6@1
  __m64 v62; // mm0@1
  __m64 v63; // mm2@1
  __m64 v64; // mm7@1
  __m64 v65; // mm0@1
  __m64 v66; // mm1@1
  __m64 v67; // mm2@1
  __m64 v68; // mm0@1
  __m64 v69; // mm5@1
  __m64 v70; // mm1@1
  __m64 v71; // mm2@1
  __m64 v72; // mm5@1
  __m64 v73; // mm3@1
  __m64 v74; // mm6@1
  __m64 v75; // mm0@1
  __m64 v76; // mm2@1
  __m64 v77; // mm7@1
  __m64 v78; // mm0@1
  __m64 v79; // mm1@1
  __m64 v80; // mm2@1
  __m64 v81; // mm0@1
  __m64 v82; // mm5@1
  __m64 v83; // mm1@1
  __m64 v84; // mm2@1
  __m64 v85; // mm5@1
  __m64 v86; // mm3@1
  __m64 v87; // mm6@1
  __m64 v88; // mm0@1
  __m64 v89; // mm2@1
  __m64 v90; // mm7@1
  __m64 v91; // mm0@1
  __m64 v92; // mm1@1
  __m64 v93; // mm2@1
  __m64 v94; // mm0@1
  __m64 v95; // mm5@1
  __m64 v96; // mm1@1
  __m64 v97; // mm2@1
  __m64 v98; // mm5@1
  __m64 v99; // mm3@1
  __m64 v100; // mm6@1
  __m64 v101; // mm0@1
  __m64 v102; // mm2@1
  __m64 v103; // mm7@1
  __m64 v104; // mm0@1
  __m64 v105; // mm2@1
  __m64 v106; // mm3@1
  __m64 v107; // mm4@1
  __m64 v108; // mm0@1
  __m64 v109; // mm2@1
  __m64 v110; // mm1@1
  __m64 v111; // mm5@1
  __m64 v112; // mm4@1
  __m64 v113; // mm0@1
  __m64 v114; // mm4@1
  __m64 v115; // mm7@1
  __m64 v116; // mm6@1
  __m64 v117; // mm3@1
  __m64 v118; // mm5@1
  __m64 v119; // mm6@1
  __m64 v120; // mm1@1
  __m64 v121; // mm4@1
  __m64 v122; // mm0@1
  __m64 v123; // mm2@1
  __m64 v124; // mm1@1
  __m64 v125; // mm4@1
  __m64 v126; // mm5@1
  __m64 v127; // mm6@1
  __m64 v128; // mm0@1
  __m64 v129; // mm2@1
  __m64 v130; // mm1@1
  __m64 v131; // mm5@1
  __m64 v132; // mm6@1
  __m64 v133; // mm1@1
  __m64 v134; // mm2@1
  __m64 v135; // mm3@1
  __m64 v136; // mm1@1
  __m64 v137; // mm7@1
  __m64 v138; // mm7@1
  __m64 v139; // mm6@1
  __m64 v140; // mm6@1
  __m64 v141; // mm2@1
  __m64 v142; // mm1@1
  __m64 v143; // mm5@1
  __m64 v144; // mm6@1
  __m64 v145; // mm2@1
  __m64 v146; // mm7@1
  __m64 v147; // mm3@1
  __m64 v148; // mm5@1
  __m64 v149; // mm0@1
  __m64 v150; // mm2@1
  __m64 v151; // mm3@1
  __m64 v152; // mm4@1
  __m64 v153; // mm0@1
  __m64 v154; // mm2@1
  __m64 v155; // mm1@1
  __m64 v156; // mm5@1
  __m64 v157; // mm4@1
  __m64 v158; // mm0@1
  __m64 v159; // mm4@1
  __m64 v160; // mm7@1
  __m64 v161; // mm6@1
  __m64 v162; // mm3@1
  __m64 v163; // mm5@1
  __m64 v164; // mm6@1
  __m64 v165; // mm1@1
  __m64 v166; // mm4@1
  __m64 v167; // mm0@1
  __m64 v168; // mm2@1
  __m64 v169; // mm1@1
  __m64 v170; // mm6@1
  __m64 v171; // mm4@1
  __m64 v172; // mm5@1
  __m64 v173; // mm6@1
  __m64 v174; // mm0@1
  __m64 v175; // mm2@1
  __m64 v176; // mm1@1
  __m64 v177; // mm5@1
  __m64 v178; // mm6@1
  __m64 v179; // mm1@1
  __m64 v180; // mm2@1
  __m64 v181; // mm3@1
  __m64 v182; // mm1@1
  __m64 v183; // mm7@1
  __m64 v184; // mm7@1
  __m64 v185; // mm6@1
  __m64 v186; // mm6@1
  __m64 v187; // mm2@1
  __m64 v188; // mm1@1
  __m64 v189; // mm5@1
  __m64 v190; // mm6@1
  __m64 v191; // mm2@1
  __m64 v192; // mm7@1
  __m64 v193; // mm3@1
  __m64 v194; // mm5@1

  v1 = a1;
  v2 = *(__m64 *)(a1 + 8);
  v3 = _m_pshufw(*(__m64 *)a1, -120);
  v4 = v2;
  v5 = _m_pshufw(v2, -120);
  v6 = _m_pshufw(*(__m64 *)a1, -35);
  v7 = _m_pshufw(v4, -35);
  v8 = _m_paddd(
         _m_paddd(_m_pmaddwd((__m64)qword_A799F0, v3), *(__m64 *)&xmmword_A79850),
         _m_pmaddwd((__m64)qword_A799F8, v5));
  v9 = _m_paddd(_m_pmaddwd((__m64)qword_A79A10, v6), _m_pmaddwd((__m64)qword_A79A18, v7));
  v10 = _m_paddd(
          _m_paddd(_m_pmaddwd(v3, (__m64)qword_A79A00), *(__m64 *)&xmmword_A79850),
          _m_pmaddwd(v5, (__m64)qword_A79A08));
  v11 = _m_paddd(_m_pmaddwd(v6, (__m64)qword_A79A20), _m_pmaddwd(v7, (__m64)qword_A79A28));
  *(__m64 *)a1 = _m_packssdw(_m_psrad(_m_paddd(v8, v9), 0xCu), _m_psrad(_m_paddd(v10, v11), 0xCu));
  v12 = _m_pshufw(_m_packssdw(_m_psrad(_m_psubd(v10, v11), 0xCu), _m_psrad(_m_psubd(v8, v9), 0xCu)), -79);
  v13 = *(__m64 *)(a1 + 16);
  v14 = *(__m64 *)(a1 + 24);
  *(__m64 *)(a1 + 8) = v12;
  v15 = v13;
  v16 = _m_pshufw(v13, -120);
  v17 = v14;
  v18 = _m_pshufw(v14, -120);
  v19 = _m_pshufw(v15, -35);
  v20 = _m_pshufw(v17, -35);
  v21 = _m_paddd(
          _m_paddd(_m_pmaddwd((__m64)qword_A79A30, v16), *(__m64 *)&xmmword_A79850),
          _m_pmaddwd((__m64)qword_A79A38, v18));
  v22 = _m_paddd(_m_pmaddwd((__m64)qword_A79A50, v19), _m_pmaddwd((__m64)qword_A79A58, v20));
  v23 = _m_paddd(
          _m_paddd(_m_pmaddwd(v16, (__m64)qword_A79A40), *(__m64 *)&xmmword_A79850),
          _m_pmaddwd(v18, (__m64)qword_A79A48));
  v24 = _m_paddd(_m_pmaddwd(v19, (__m64)qword_A79A60), _m_pmaddwd(v20, (__m64)qword_A79A68));
  *(__m64 *)(a1 + 16) = _m_packssdw(_m_psrad(_m_paddd(v21, v22), 0xCu), _m_psrad(_m_paddd(v23, v24), 0xCu));
  v25 = _m_pshufw(_m_packssdw(_m_psrad(_m_psubd(v23, v24), 0xCu), _m_psrad(_m_psubd(v21, v22), 0xCu)), -79);
  v26 = *(__m64 *)(a1 + 32);
  v27 = *(__m64 *)(a1 + 40);
  *(__m64 *)(a1 + 24) = v25;
  v28 = v26;
  v29 = _m_pshufw(v26, -120);
  v30 = v27;
  v31 = _m_pshufw(v27, -120);
  v32 = _m_pshufw(v28, -35);
  v33 = _m_pshufw(v30, -35);
  v34 = _m_paddd(
          _m_paddd(_m_pmaddwd((__m64)qword_A79A70, v29), *(__m64 *)&xmmword_A79850),
          _m_pmaddwd((__m64)qword_A79A78, v31));
  v35 = _m_paddd(_m_pmaddwd((__m64)qword_A79A90, v32), _m_pmaddwd((__m64)qword_A79A98, v33));
  v36 = _m_paddd(
          _m_paddd(_m_pmaddwd(v29, (__m64)qword_A79A80), *(__m64 *)&xmmword_A79850),
          _m_pmaddwd(v31, (__m64)qword_A79A88));
  v37 = _m_paddd(_m_pmaddwd(v32, (__m64)qword_A79AA0), _m_pmaddwd(v33, (__m64)qword_A79AA8));
  *(__m64 *)(a1 + 32) = _m_packssdw(_m_psrad(_m_paddd(v34, v35), 0xCu), _m_psrad(_m_paddd(v36, v37), 0xCu));
  v38 = _m_pshufw(_m_packssdw(_m_psrad(_m_psubd(v36, v37), 0xCu), _m_psrad(_m_psubd(v34, v35), 0xCu)), -79);
  v39 = *(__m64 *)(a1 + 48);
  v40 = *(__m64 *)(a1 + 56);
  *(__m64 *)(a1 + 40) = v38;
  v41 = v39;
  v42 = _m_pshufw(v39, -120);
  v43 = v40;
  v44 = _m_pshufw(v40, -120);
  v45 = _m_pshufw(v41, -35);
  v46 = _m_pshufw(v43, -35);
  v47 = _m_paddd(
          _m_paddd(_m_pmaddwd((__m64)qword_A79AB0, v42), *(__m64 *)&xmmword_A79850),
          _m_pmaddwd((__m64)qword_A79AB8, v44));
  v48 = _m_paddd(_m_pmaddwd((__m64)qword_A79AD0, v45), _m_pmaddwd((__m64)qword_A79AD8, v46));
  v49 = _m_paddd(
          _m_paddd(_m_pmaddwd(v42, (__m64)qword_A79AC0), *(__m64 *)&xmmword_A79850),
          _m_pmaddwd(v44, (__m64)qword_A79AC8));
  v50 = _m_paddd(_m_pmaddwd(v45, (__m64)qword_A79AE0), _m_pmaddwd(v46, (__m64)qword_A79AE8));
  *(__m64 *)(a1 + 48) = _m_packssdw(_m_psrad(_m_paddd(v47, v48), 0xCu), _m_psrad(_m_paddd(v49, v50), 0xCu));
  v51 = _m_pshufw(_m_packssdw(_m_psrad(_m_psubd(v49, v50), 0xCu), _m_psrad(_m_psubd(v47, v48), 0xCu)), -79);
  v52 = *(__m64 *)(a1 + 64);
  v53 = *(__m64 *)(a1 + 72);
  *(__m64 *)(a1 + 56) = v51;
  v54 = v52;
  v55 = _m_pshufw(v52, -120);
  v56 = v53;
  v57 = _m_pshufw(v53, -120);
  v58 = _m_pshufw(v54, -35);
  v59 = _m_pshufw(v56, -35);
  v60 = _m_paddd(
          _m_paddd(_m_pmaddwd((__m64)qword_A799F0, v55), *(__m64 *)&xmmword_A79850),
          _m_pmaddwd((__m64)qword_A799F8, v57));
  v61 = _m_paddd(_m_pmaddwd((__m64)qword_A79A10, v58), _m_pmaddwd((__m64)qword_A79A18, v59));
  v62 = _m_paddd(
          _m_paddd(_m_pmaddwd(v55, (__m64)qword_A79A00), *(__m64 *)&xmmword_A79850),
          _m_pmaddwd(v57, (__m64)qword_A79A08));
  v63 = _m_paddd(_m_pmaddwd(v58, (__m64)qword_A79A20), _m_pmaddwd(v59, (__m64)qword_A79A28));
  *(__m64 *)(a1 + 64) = _m_packssdw(_m_psrad(_m_paddd(v60, v61), 0xCu), _m_psrad(_m_paddd(v62, v63), 0xCu));
  v64 = _m_pshufw(_m_packssdw(_m_psrad(_m_psubd(v62, v63), 0xCu), _m_psrad(_m_psubd(v60, v61), 0xCu)), -79);
  v65 = *(__m64 *)(a1 + 80);
  v66 = *(__m64 *)(a1 + 88);
  *(__m64 *)(a1 + 72) = v64;
  v67 = v65;
  v68 = _m_pshufw(v65, -120);
  v69 = v66;
  v70 = _m_pshufw(v66, -120);
  v71 = _m_pshufw(v67, -35);
  v72 = _m_pshufw(v69, -35);
  v73 = _m_paddd(
          _m_paddd(_m_pmaddwd((__m64)qword_A79AB0, v68), *(__m64 *)&xmmword_A79850),
          _m_pmaddwd((__m64)qword_A79AB8, v70));
  v74 = _m_paddd(_m_pmaddwd((__m64)qword_A79AD0, v71), _m_pmaddwd((__m64)qword_A79AD8, v72));
  v75 = _m_paddd(
          _m_paddd(_m_pmaddwd(v68, (__m64)qword_A79AC0), *(__m64 *)&xmmword_A79850),
          _m_pmaddwd(v70, (__m64)qword_A79AC8));
  v76 = _m_paddd(_m_pmaddwd(v71, (__m64)qword_A79AE0), _m_pmaddwd(v72, (__m64)qword_A79AE8));
  *(__m64 *)(a1 + 80) = _m_packssdw(_m_psrad(_m_paddd(v73, v74), 0xCu), _m_psrad(_m_paddd(v75, v76), 0xCu));
  v77 = _m_pshufw(_m_packssdw(_m_psrad(_m_psubd(v75, v76), 0xCu), _m_psrad(_m_psubd(v73, v74), 0xCu)), -79);
  v78 = *(__m64 *)(a1 + 96);
  v79 = *(__m64 *)(a1 + 104);
  *(__m64 *)(a1 + 88) = v77;
  v80 = v78;
  v81 = _m_pshufw(v78, -120);
  v82 = v79;
  v83 = _m_pshufw(v79, -120);
  v84 = _m_pshufw(v80, -35);
  v85 = _m_pshufw(v82, -35);
  v86 = _m_paddd(
          _m_paddd(_m_pmaddwd((__m64)qword_A79A70, v81), *(__m64 *)&xmmword_A79850),
          _m_pmaddwd((__m64)qword_A79A78, v83));
  v87 = _m_paddd(_m_pmaddwd((__m64)qword_A79A90, v84), _m_pmaddwd((__m64)qword_A79A98, v85));
  v88 = _m_paddd(
          _m_paddd(_m_pmaddwd(v81, (__m64)qword_A79A80), *(__m64 *)&xmmword_A79850),
          _m_pmaddwd(v83, (__m64)qword_A79A88));
  v89 = _m_paddd(_m_pmaddwd(v84, (__m64)qword_A79AA0), _m_pmaddwd(v85, (__m64)qword_A79AA8));
  *(__m64 *)(a1 + 96) = _m_packssdw(_m_psrad(_m_paddd(v86, v87), 0xCu), _m_psrad(_m_paddd(v88, v89), 0xCu));
  v90 = _m_pshufw(_m_packssdw(_m_psrad(_m_psubd(v88, v89), 0xCu), _m_psrad(_m_psubd(v86, v87), 0xCu)), -79);
  v91 = *(__m64 *)(a1 + 112);
  v92 = *(__m64 *)(a1 + 120);
  *(__m64 *)(a1 + 104) = v90;
  v93 = v91;
  v94 = _m_pshufw(v91, -120);
  v95 = v92;
  v96 = _m_pshufw(v92, -120);
  v97 = _m_pshufw(v93, -35);
  v98 = _m_pshufw(v95, -35);
  v99 = _m_paddd(
          _m_paddd(_m_pmaddwd((__m64)qword_A79A30, v94), *(__m64 *)&xmmword_A79850),
          _m_pmaddwd((__m64)qword_A79A38, v96));
  v100 = _m_paddd(_m_pmaddwd((__m64)qword_A79A50, v97), _m_pmaddwd((__m64)qword_A79A58, v98));
  v101 = _m_paddd(
           _m_paddd(_m_pmaddwd(v94, (__m64)qword_A79A40), *(__m64 *)&xmmword_A79850),
           _m_pmaddwd(v96, (__m64)qword_A79A48));
  v102 = _m_paddd(_m_pmaddwd(v97, (__m64)qword_A79A60), _m_pmaddwd(v98, (__m64)qword_A79A68));
  *(__m64 *)(a1 + 112) = _m_packssdw(_m_psrad(_m_paddd(v99, v100), 0xCu), _m_psrad(_m_paddd(v101, v102), 0xCu));
  v103 = _m_pshufw(_m_packssdw(_m_psrad(_m_psubd(v101, v102), 0xCu), _m_psrad(_m_psubd(v99, v100), 0xCu)), -79);
  v104 = *(__m64 *)(a1 + 80);
  *(__m64 *)(a1 + 120) = v103;
  v105 = v104;
  v106 = *(__m64 *)(a1 + 48);
  v107 = *(__m64 *)(a1 + 112);
  v108 = _m_paddsw(_m_paddsw(_m_pmulhw(v104, *(__m64 *)&xmmword_A798C0), v104), v106);
  v109 = _m_psubsw(v105, _m_paddsw(_m_pmulhw(*(__m64 *)&xmmword_A798C0, v106), v106));
  v110 = v108;
  v111 = _m_psubsw(_m_pmulhw(*(__m64 *)&xmmword_A798A0, *(__m64 *)(a1 + 16)), v107);
  v112 = _m_paddsw(_m_pmulhw(v107, *(__m64 *)&xmmword_A798A0), *(__m64 *)(a1 + 16));
  v113 = _m_paddsw(_m_paddsw(v108, v112), *(__m64 *)&xmmword_A79840);
  v114 = _m_psubsw(v112, v110);
  v115 = _m_paddsw(_m_pmulhw(*(__m64 *)(a1 + 96), *(__m64 *)&xmmword_A798B0), *(__m64 *)(a1 + 32));
  v116 = v111;
  v117 = _m_psubsw(_m_pmulhw(*(__m64 *)&xmmword_A798B0, *(__m64 *)(a1 + 32)), *(__m64 *)(a1 + 96));
  v118 = _m_paddsw(_m_psubsw(v111, v109), *(__m64 *)&xmmword_A79840);
  v119 = _m_paddsw(v116, v109);
  *(__m64 *)(a1 + 112) = v113;
  v120 = v114;
  v121 = _m_paddsw(v114, v118);
  v122.m64_u64 = xmmword_A798D0;
  v123 = _m_pmulhw(*(__m64 *)&xmmword_A798D0, v121);
  *(__m64 *)(a1 + 48) = v119;
  v124 = _m_psubsw(v120, v118);
  v125 = _m_por(_m_paddsw(v121, v123), *(__m64 *)&xmmword_A79840);
  v126 = _m_paddsw(*(__m64 *)(v1 + 64), *(__m64 *)v1);
  v127 = _m_psubsw(*(__m64 *)v1, *(__m64 *)(v1 + 64));
  v128 = _m_por(_m_paddsw(_m_pmulhw(v122, v124), v124), *(__m64 *)&xmmword_A79840);
  v129 = v126;
  v130 = v127;
  v131 = _m_paddsw(_m_paddsw(v126, v115), *(__m64 *)&xmmword_A79860);
  v132 = _m_paddsw(_m_paddsw(v127, v117), *(__m64 *)&xmmword_A79860);
  v133 = _m_psubsw(v130, v117);
  v134 = _m_paddsw(_m_psubsw(v129, v115), *(__m64 *)&xmmword_A79870);
  v135 = v132;
  v136 = _m_paddsw(v133, *(__m64 *)&xmmword_A79870);
  v137 = _m_paddsw(_m_psraw(_m_paddsw(*(__m64 *)(a1 + 112), v131), 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)a1 = _m_punpcklbw(_m_packuswb(v137, v137), (__m64)(unsigned int)xmmword_A79890);
  v138 = v136;
  v139 = _m_paddsw(_m_psraw(_m_paddsw(v132, v125), 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 16) = _m_punpcklbw(_m_packuswb(v139, v139), (__m64)(unsigned int)xmmword_A79890);
  v140 = _m_paddsw(*(__m64 *)(a1 + 48), v134);
  v141 = _m_psubsw(v134, *(__m64 *)(a1 + 48));
  v142 = _m_paddsw(_m_psraw(_m_paddsw(v136, v128), 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 32) = _m_punpcklbw(_m_packuswb(v142, v142), (__m64)(unsigned int)xmmword_A79890);
  v143 = _m_psubsw(v131, *(__m64 *)(a1 + 112));
  v144 = _m_paddsw(_m_psraw(v140, 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 48) = _m_punpcklbw(_m_packuswb(v144, v144), (__m64)(unsigned int)xmmword_A79890);
  v145 = _m_paddsw(_m_psraw(v141, 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 64) = _m_punpcklbw(_m_packuswb(v145, v145), (__m64)(unsigned int)xmmword_A79890);
  v146 = _m_paddsw(_m_psraw(_m_psubsw(v138, v128), 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 80) = _m_punpcklbw(_m_packuswb(v146, v146), (__m64)(unsigned int)xmmword_A79890);
  v147 = _m_paddsw(_m_psraw(_m_psubsw(v135, v125), 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 96) = _m_punpcklbw(_m_packuswb(v147, v147), (__m64)(unsigned int)xmmword_A79890);
  v148 = _m_paddsw(_m_psraw(v143, 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 112) = _m_punpcklbw(_m_packuswb(v148, v148), (__m64)(unsigned int)xmmword_A79890);
  v149 = *(__m64 *)(a1 + 88);
  v150 = v149;
  v151 = *(__m64 *)(a1 + 56);
  v152 = *(__m64 *)(a1 + 120);
  v153 = _m_paddsw(_m_paddsw(_m_pmulhw(v149, *(__m64 *)&xmmword_A798C0), v149), v151);
  v154 = _m_psubsw(v150, _m_paddsw(_m_pmulhw(*(__m64 *)&xmmword_A798C0, v151), v151));
  v155 = v153;
  v156 = _m_psubsw(_m_pmulhw(*(__m64 *)&xmmword_A798A0, *(__m64 *)(a1 + 24)), v152);
  v157 = _m_paddsw(_m_pmulhw(v152, *(__m64 *)&xmmword_A798A0), *(__m64 *)(a1 + 24));
  v158 = _m_paddsw(_m_paddsw(v153, v157), *(__m64 *)&xmmword_A79840);
  v159 = _m_psubsw(v157, v155);
  v160 = _m_paddsw(_m_pmulhw(*(__m64 *)(a1 + 104), *(__m64 *)&xmmword_A798B0), *(__m64 *)(a1 + 40));
  v161 = v156;
  v162 = _m_psubsw(_m_pmulhw(*(__m64 *)&xmmword_A798B0, *(__m64 *)(a1 + 40)), *(__m64 *)(a1 + 104));
  v163 = _m_paddsw(_m_psubsw(v156, v154), *(__m64 *)&xmmword_A79840);
  v164 = _m_paddsw(v161, v154);
  *(__m64 *)(a1 + 120) = v158;
  v165 = v159;
  v166 = _m_paddsw(v159, v163);
  v167.m64_u64 = xmmword_A798D0;
  v168 = _m_pmulhw(*(__m64 *)&xmmword_A798D0, v166);
  *(__m64 *)(a1 + 56) = v164;
  v169 = _m_psubsw(v165, v163);
  v170 = *(__m64 *)(a1 + 8);
  v171 = _m_por(_m_paddsw(v166, v168), *(__m64 *)&xmmword_A79840);
  v172 = _m_paddsw(*(__m64 *)(a1 + 72), v170);
  v173 = _m_psubsw(v170, *(__m64 *)(a1 + 72));
  v174 = _m_por(_m_paddsw(_m_pmulhw(v167, v169), v169), *(__m64 *)&xmmword_A79840);
  v175 = v172;
  v176 = v173;
  v177 = _m_paddsw(_m_paddsw(v172, v160), *(__m64 *)&xmmword_A79860);
  v178 = _m_paddsw(_m_paddsw(v173, v162), *(__m64 *)&xmmword_A79860);
  v179 = _m_psubsw(v176, v162);
  v180 = _m_paddsw(_m_psubsw(v175, v160), *(__m64 *)&xmmword_A79870);
  v181 = v178;
  v182 = _m_paddsw(v179, *(__m64 *)&xmmword_A79870);
  v183 = _m_paddsw(_m_psraw(_m_paddsw(*(__m64 *)(a1 + 120), v177), 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 8) = _m_punpcklbw(_m_packuswb(v183, v183), (__m64)(unsigned int)xmmword_A79890);
  v184 = v182;
  v185 = _m_paddsw(_m_psraw(_m_paddsw(v178, v171), 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 24) = _m_punpcklbw(_m_packuswb(v185, v185), (__m64)(unsigned int)xmmword_A79890);
  v186 = _m_paddsw(*(__m64 *)(a1 + 56), v180);
  v187 = _m_psubsw(v180, *(__m64 *)(a1 + 56));
  v188 = _m_paddsw(_m_psraw(_m_paddsw(v182, v174), 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 40) = _m_punpcklbw(_m_packuswb(v188, v188), (__m64)(unsigned int)xmmword_A79890);
  v189 = _m_psubsw(v177, *(__m64 *)(a1 + 120));
  v190 = _m_paddsw(_m_psraw(v186, 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 56) = _m_punpcklbw(_m_packuswb(v190, v190), (__m64)(unsigned int)xmmword_A79890);
  v191 = _m_paddsw(_m_psraw(v187, 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 72) = _m_punpcklbw(_m_packuswb(v191, v191), (__m64)(unsigned int)xmmword_A79890);
  v192 = _m_paddsw(_m_psraw(_m_psubsw(v184, v174), 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 88) = _m_punpcklbw(_m_packuswb(v192, v192), (__m64)(unsigned int)xmmword_A79890);
  v193 = _m_paddsw(_m_psraw(_m_psubsw(v181, v171), 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 104) = _m_punpcklbw(_m_packuswb(v193, v193), (__m64)(unsigned int)xmmword_A79890);
  v194 = _m_paddsw(_m_psraw(v189, 5u), *(__m64 *)&xmmword_A79880);
  *(__m64 *)(a1 + 120) = _m_punpcklbw(_m_packuswb(v194, v194), (__m64)(unsigned int)xmmword_A79890);
}
// A79840: using guessed type __int128 xmmword_A79840;
// A79850: using guessed type __int128 xmmword_A79850;
// A79860: using guessed type __int128 xmmword_A79860;
// A79870: using guessed type __int128 xmmword_A79870;
// A79880: using guessed type __int128 xmmword_A79880;
// A79890: using guessed type __int128 xmmword_A79890;
// A798A0: using guessed type __int128 xmmword_A798A0;
// A798B0: using guessed type __int128 xmmword_A798B0;
// A798C0: using guessed type __int128 xmmword_A798C0;
// A798D0: using guessed type __int128 xmmword_A798D0;
// A799F0: using guessed type __int64 qword_A799F0;
// A799F8: using guessed type __int64 qword_A799F8;
// A79A00: using guessed type __int64 qword_A79A00;
// A79A08: using guessed type __int64 qword_A79A08;
// A79A10: using guessed type __int64 qword_A79A10;
// A79A18: using guessed type __int64 qword_A79A18;
// A79A20: using guessed type __int64 qword_A79A20;
// A79A28: using guessed type __int64 qword_A79A28;
// A79A30: using guessed type __int64 qword_A79A30;
// A79A38: using guessed type __int64 qword_A79A38;
// A79A40: using guessed type __int64 qword_A79A40;
// A79A48: using guessed type __int64 qword_A79A48;
// A79A50: using guessed type __int64 qword_A79A50;
// A79A58: using guessed type __int64 qword_A79A58;
// A79A60: using guessed type __int64 qword_A79A60;
// A79A68: using guessed type __int64 qword_A79A68;
// A79A70: using guessed type __int64 qword_A79A70;
// A79A78: using guessed type __int64 qword_A79A78;
// A79A80: using guessed type __int64 qword_A79A80;
// A79A88: using guessed type __int64 qword_A79A88;
// A79A90: using guessed type __int64 qword_A79A90;
// A79A98: using guessed type __int64 qword_A79A98;
// A79AA0: using guessed type __int64 qword_A79AA0;
// A79AA8: using guessed type __int64 qword_A79AA8;
// A79AB0: using guessed type __int64 qword_A79AB0;
// A79AB8: using guessed type __int64 qword_A79AB8;
// A79AC0: using guessed type __int64 qword_A79AC0;
// A79AC8: using guessed type __int64 qword_A79AC8;
// A79AD0: using guessed type __int64 qword_A79AD0;
// A79AD8: using guessed type __int64 qword_A79AD8;
// A79AE0: using guessed type __int64 qword_A79AE0;
// A79AE8: using guessed type __int64 qword_A79AE8;

//----- (00799CB0) --------------------------------------------------------
void **__cdecl own_dct_2d_16s_8x8_inv_w7(int a1)
{
  __int128 *v1; // edx@1
  void **result; // eax@2
  __m128i v3; // xmm0@4
  __m128i v4; // xmm4@4
  __m128i v5; // xmm1@4
  __m128i v6; // xmm0@4
  __m128i v7; // xmm5@4
  __m128i v8; // xmm4@4
  __m128i v9; // xmm3@4
  __m128i v10; // xmm1@4
  __m128i v11; // xmm7@4
  __m128i v12; // xmm5@4
  __m128i v13; // xmm0@4
  __m128i v14; // xmm4@4
  __m128i v15; // xmm1@4
  __m128i v16; // xmm0@4
  __m128i v17; // xmm5@4
  __m128i v18; // xmm4@4
  __m128i v19; // xmm3@4
  __m128i v20; // xmm1@4
  __m128i v21; // xmm7@4
  __m128i v22; // xmm5@4
  __m128i v23; // xmm0@4
  __m128i v24; // xmm4@4
  __m128i v25; // xmm1@4
  __m128i v26; // xmm0@4
  __m128i v27; // xmm5@4
  __m128i v28; // xmm4@4
  __m128i v29; // xmm3@4
  __m128i v30; // xmm1@4
  __m128i v31; // xmm7@4
  __m128i v32; // xmm5@4
  __m128i v33; // xmm0@4
  __m128i v34; // xmm4@4
  __m128i v35; // xmm1@4
  __m128i v36; // xmm0@4
  __m128i v37; // xmm5@4
  __m128i v38; // xmm4@4
  __m128i v39; // xmm3@4
  __m128i v40; // xmm1@4
  __m128i v41; // xmm7@4
  __m128i v42; // xmm5@4
  __m128i v43; // xmm0@5
  __m128i v44; // xmm1@5
  __m128i v45; // xmm2@5
  __m128i v46; // xmm3@5
  __m128i v47; // xmm0@5
  __m128i v48; // xmm4@5
  __m128i v49; // xmm5@5
  __m128i v50; // xmm6@5
  __m128i v51; // xmm4@5
  __m128i v52; // xmm1@5
  __m128i v53; // xmm0@5
  __m128i v54; // xmm3@5
  __m128i v55; // xmm2@5
  __m128i v56; // xmm1@5
  __m128i v57; // xmm5@5
  __m128i v58; // xmm4@5
  __m128i v59; // xmm0@5
  __m128i v60; // xmm4@5
  __m128i v61; // xmm7@5
  __m128i v62; // xmm6@5
  __m128i v63; // xmm3@5
  __m128i v64; // xmm5@5
  __m128i v65; // xmm1@5
  __m128i v66; // xmm4@5
  __m128i v67; // xmm0@5
  __m128i v68; // xmm1@5
  __m128i v69; // xmm6@5
  __m128i v70; // xmm5@5
  __m128i v71; // xmm6@5
  __m128i v72; // xmm4@5
  __m128i v73; // xmm0@5
  __m128i v74; // xmm2@5
  __m128i v75; // xmm5@5
  __m128i v76; // xmm1@5
  __m128i v77; // xmm6@5
  __m128i v78; // xmm3@5
  __m128i v79; // xmm1@5
  __m128i v80; // xmm2@5
  __m128i v81; // xmm7@5
  __m128i v82; // xmm7@5
  __m128i v83; // xmm6@5
  __m128i v84; // xmm6@5
  __m128i v85; // xmm2@5
  __m128i v86; // xmm1@5
  __m128i v87; // xmm5@5
  __m128i v88; // xmm6@5
  __m128i v89; // xmm2@5
  __m128i v90; // xmm7@5
  __m128i v91; // xmm3@5
  __m128i v92; // xmm5@5
  __m128i v93; // xmm0@6
  __m128i v94; // xmm4@6
  __m128i v95; // xmm1@6
  __m128i v96; // xmm0@6
  __m128i v97; // xmm5@6
  __m128i v98; // xmm4@6
  __m128i v99; // xmm3@6
  __m128i v100; // xmm1@6
  __m128i v101; // xmm7@6
  __m128i v102; // xmm5@6
  __m128i v103; // xmm0@6
  __m128i v104; // xmm4@6
  __m128i v105; // xmm1@6
  __m128i v106; // xmm0@6
  __m128i v107; // xmm5@6
  __m128i v108; // xmm4@6
  __m128i v109; // xmm3@6
  __m128i v110; // xmm1@6
  __m128i v111; // xmm7@6
  __m128i v112; // xmm5@6
  __m128i v113; // xmm0@6
  __m128i v114; // xmm4@6
  __m128i v115; // xmm1@6
  __m128i v116; // xmm0@6
  __m128i v117; // xmm5@6
  __m128i v118; // xmm4@6
  __m128i v119; // xmm3@6
  __m128i v120; // xmm1@6
  __m128i v121; // xmm7@6
  __m128i v122; // xmm5@6
  __m128i v123; // xmm0@6
  __m128i v124; // xmm4@6
  __m128i v125; // xmm1@6
  __m128i v126; // xmm0@6
  __m128i v127; // xmm5@6
  __m128i v128; // xmm4@6
  __m128i v129; // xmm3@6
  __m128i v130; // xmm1@6
  __m128i v131; // xmm7@6
  __m128i v132; // xmm5@6
  __m128i v133; // xmm0@7
  __m128i v134; // xmm1@7
  __m128i v135; // xmm2@7
  __m128i v136; // xmm3@7
  __m128i v137; // xmm0@7
  __m128i v138; // xmm4@7
  __m128i v139; // xmm5@7
  __m128i v140; // xmm6@7
  __m128i v141; // xmm4@7
  __m128i v142; // xmm1@7
  __m128i v143; // xmm0@7
  __m128i v144; // xmm3@7
  __m128i v145; // xmm2@7
  __m128i v146; // xmm1@7
  __m128i v147; // xmm5@7
  __m128i v148; // xmm4@7
  __m128i v149; // xmm0@7
  __m128i v150; // xmm4@7
  __m128i v151; // xmm7@7
  __m128i v152; // xmm6@7
  __m128i v153; // xmm3@7
  __m128i v154; // xmm5@7
  __m128i v155; // xmm1@7
  __m128i v156; // xmm4@7
  __m128i v157; // xmm0@7
  __m128i v158; // xmm1@7
  __m128i v159; // xmm6@7
  __m128i v160; // xmm5@7
  __m128i v161; // xmm6@7
  __m128i v162; // xmm4@7
  __m128i v163; // xmm0@7
  __m128i v164; // xmm2@7
  __m128i v165; // xmm5@7
  __m128i v166; // xmm1@7
  __m128i v167; // xmm6@7
  __m128i v168; // xmm3@7
  __m128i v169; // xmm1@7
  __m128i v170; // xmm2@7
  __m128i v171; // xmm7@7
  __m128i v172; // xmm7@7
  __m128i v173; // xmm6@7
  __m128i v174; // xmm6@7
  __m128i v175; // xmm2@7
  __m128i v176; // xmm1@7
  __m128i v177; // xmm5@7
  __m128i v178; // xmm6@7
  __m128i v179; // xmm2@7
  __m128i v180; // xmm7@7
  __m128i v181; // xmm3@7
  __m128i v182; // xmm5@7
  __int128 v183; // [sp+0h] [bp-80h]@2
  __m128i v184; // [sp+10h] [bp-70h]@7
  __m128i v185; // [sp+20h] [bp-60h]@7
  __m128i v186; // [sp+30h] [bp-50h]@7
  __m128i v187; // [sp+40h] [bp-40h]@7
  __int128 v188; // [sp+50h] [bp-30h]@7
  __m128i v189; // [sp+60h] [bp-20h]@7
  __m128i v190; // [sp+70h] [bp-10h]@7
  void *retaddr; // [sp+80h] [bp+0h]@2

  v1 = (__int128 *)a1;
  if ( a1 & 0xF )
  {
    result = &retaddr;
    v1 = &v183;
  }
  if ( a1 & 0xF )
  {
    v93 = (__m128i)_mm_movelh_ps((__m128)*(_QWORD *)a1, (__m128)*(_QWORD *)(a1 + 8));
    v94 = (__m128i)_mm_movelh_ps((__m128)*(_QWORD *)(a1 + 64), (__m128)*(_QWORD *)(a1 + 72));
    v95 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v93, -120), -120);
    v96 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v93, -35), -35);
    v97 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v94, -120), -120);
    v98 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v94, -35), -35);
    v99 = _mm_add_epi32(
            _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79B10), v96),
            _mm_shuffle_epi32(_mm_madd_epi16(v96, (__m128i)xmmword_A79B20), 78));
    v100 = _mm_add_epi32(
             _mm_shuffle_epi32(_mm_madd_epi16(v95, (__m128i)xmmword_A79B00), 78),
             _mm_add_epi32(
               _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79AF0), v95),
               (__m128i)xmmword_A79850));
    v101 = _mm_add_epi32(
             _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79B10), v98),
             _mm_shuffle_epi32(_mm_madd_epi16(v98, (__m128i)xmmword_A79B20), 78));
    v102 = _mm_add_epi32(
             _mm_shuffle_epi32(_mm_madd_epi16(v97, (__m128i)xmmword_A79B00), 78),
             _mm_add_epi32(
               _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79AF0), v97),
               (__m128i)xmmword_A79850));
    _mm_store_si128(
      (__m128i *)v1,
      _mm_packs_epi32(_mm_sra_epi32(_mm_add_epi32(v100, v99), 0xCu), _mm_sra_epi32(_mm_sub_epi32(v100, v99), 0xCu)));
    _mm_store_si128(
      (__m128i *)v1 + 4,
      _mm_packs_epi32(_mm_sra_epi32(_mm_add_epi32(v102, v101), 0xCu), _mm_sra_epi32(_mm_sub_epi32(v102, v101), 0xCu)));
    v103 = (__m128i)_mm_movelh_ps((__m128)*(_QWORD *)(a1 + 16), (__m128)*(_QWORD *)(a1 + 24));
    v104 = (__m128i)_mm_movelh_ps((__m128)*(_QWORD *)(a1 + 112), (__m128)*(_QWORD *)(a1 + 120));
    v105 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v103, -120), -120);
    v106 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v103, -35), -35);
    v107 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v104, -120), -120);
    v108 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v104, -35), -35);
    v109 = _mm_add_epi32(
             _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79B50), v106),
             _mm_shuffle_epi32(_mm_madd_epi16(v106, (__m128i)xmmword_A79B60), 78));
    v110 = _mm_add_epi32(
             _mm_shuffle_epi32(_mm_madd_epi16(v105, (__m128i)xmmword_A79B40), 78),
             _mm_add_epi32(
               _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79B30), v105),
               (__m128i)xmmword_A79850));
    v111 = _mm_add_epi32(
             _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79B50), v108),
             _mm_shuffle_epi32(_mm_madd_epi16(v108, (__m128i)xmmword_A79B60), 78));
    v112 = _mm_add_epi32(
             _mm_shuffle_epi32(_mm_madd_epi16(v107, (__m128i)xmmword_A79B40), 78),
             _mm_add_epi32(
               _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79B30), v107),
               (__m128i)xmmword_A79850));
    _mm_store_si128(
      (__m128i *)v1 + 1,
      _mm_packs_epi32(_mm_sra_epi32(_mm_add_epi32(v110, v109), 0xCu), _mm_sra_epi32(_mm_sub_epi32(v110, v109), 0xCu)));
    _mm_store_si128(
      (__m128i *)v1 + 7,
      _mm_packs_epi32(_mm_sra_epi32(_mm_add_epi32(v112, v111), 0xCu), _mm_sra_epi32(_mm_sub_epi32(v112, v111), 0xCu)));
    v113 = (__m128i)_mm_movelh_ps((__m128)*(_QWORD *)(a1 + 48), (__m128)*(_QWORD *)(a1 + 56));
    v114 = (__m128i)_mm_movelh_ps((__m128)*(_QWORD *)(a1 + 80), (__m128)*(_QWORD *)(a1 + 88));
    v115 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v113, -120), -120);
    v116 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v113, -35), -35);
    v117 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v114, -120), -120);
    v118 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v114, -35), -35);
    v119 = _mm_add_epi32(
             _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79BD0), v116),
             _mm_shuffle_epi32(_mm_madd_epi16(v116, (__m128i)xmmword_A79BE0), 78));
    v120 = _mm_add_epi32(
             _mm_shuffle_epi32(_mm_madd_epi16(v115, (__m128i)xmmword_A79BC0), 78),
             _mm_add_epi32(
               _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79BB0), v115),
               (__m128i)xmmword_A79850));
    v121 = _mm_add_epi32(
             _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79BD0), v118),
             _mm_shuffle_epi32(_mm_madd_epi16(v118, (__m128i)xmmword_A79BE0), 78));
    v122 = _mm_add_epi32(
             _mm_shuffle_epi32(_mm_madd_epi16(v117, (__m128i)xmmword_A79BC0), 78),
             _mm_add_epi32(
               _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79BB0), v117),
               (__m128i)xmmword_A79850));
    _mm_store_si128(
      (__m128i *)v1 + 3,
      _mm_packs_epi32(_mm_sra_epi32(_mm_add_epi32(v120, v119), 0xCu), _mm_sra_epi32(_mm_sub_epi32(v120, v119), 0xCu)));
    _mm_store_si128(
      (__m128i *)v1 + 5,
      _mm_packs_epi32(_mm_sra_epi32(_mm_add_epi32(v122, v121), 0xCu), _mm_sra_epi32(_mm_sub_epi32(v122, v121), 0xCu)));
    v123 = (__m128i)_mm_movelh_ps((__m128)*(_QWORD *)(a1 + 32), (__m128)*(_QWORD *)(a1 + 40));
    v124 = (__m128i)_mm_movelh_ps((__m128)*(_QWORD *)(a1 + 96), (__m128)*(_QWORD *)(a1 + 104));
    v125 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v123, -120), -120);
    v126 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v123, -35), -35);
    v127 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v124, -120), -120);
    v128 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v124, -35), -35);
    v129 = _mm_add_epi32(
             _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79B90), v126),
             _mm_shuffle_epi32(_mm_madd_epi16(v126, (__m128i)xmmword_A79BA0), 78));
    v130 = _mm_add_epi32(
             _mm_shuffle_epi32(_mm_madd_epi16(v125, (__m128i)xmmword_A79B80), 78),
             _mm_add_epi32(
               _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79B70), v125),
               (__m128i)xmmword_A79850));
    v131 = _mm_add_epi32(
             _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79B90), v128),
             _mm_shuffle_epi32(_mm_madd_epi16(v128, (__m128i)xmmword_A79BA0), 78));
    v132 = _mm_add_epi32(
             _mm_shuffle_epi32(_mm_madd_epi16(v127, (__m128i)xmmword_A79B80), 78),
             _mm_add_epi32(
               _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79B70), v127),
               (__m128i)xmmword_A79850));
    _mm_store_si128(
      (__m128i *)v1 + 2,
      _mm_packs_epi32(_mm_sra_epi32(_mm_add_epi32(v130, v129), 0xCu), _mm_sra_epi32(_mm_sub_epi32(v130, v129), 0xCu)));
    _mm_store_si128(
      (__m128i *)v1 + 6,
      _mm_packs_epi32(_mm_sra_epi32(_mm_add_epi32(v132, v131), 0xCu), _mm_sra_epi32(_mm_sub_epi32(v132, v131), 0xCu)));
    if ( v1 != &v183 )
      goto LABEL_5;
  }
  else
  {
    v3 = _mm_load_si128((const __m128i *)a1);
    v4 = _mm_load_si128((const __m128i *)(a1 + 64));
    v5 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v3, -120), -120);
    v6 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v3, -35), -35);
    v7 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v4, -120), -120);
    v8 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v4, -35), -35);
    v9 = _mm_add_epi32(
           _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79B10), v6),
           _mm_shuffle_epi32(_mm_madd_epi16(v6, (__m128i)xmmword_A79B20), 78));
    v10 = _mm_add_epi32(
            _mm_shuffle_epi32(_mm_madd_epi16(v5, (__m128i)xmmword_A79B00), 78),
            _mm_add_epi32(_mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79AF0), v5), (__m128i)xmmword_A79850));
    v11 = _mm_add_epi32(
            _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79B10), v8),
            _mm_shuffle_epi32(_mm_madd_epi16(v8, (__m128i)xmmword_A79B20), 78));
    v12 = _mm_add_epi32(
            _mm_shuffle_epi32(_mm_madd_epi16(v7, (__m128i)xmmword_A79B00), 78),
            _mm_add_epi32(_mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79AF0), v7), (__m128i)xmmword_A79850));
    _mm_store_si128(
      (__m128i *)v1,
      _mm_packs_epi32(_mm_sra_epi32(_mm_add_epi32(v10, v9), 0xCu), _mm_sra_epi32(_mm_sub_epi32(v10, v9), 0xCu)));
    _mm_store_si128(
      (__m128i *)v1 + 4,
      _mm_packs_epi32(_mm_sra_epi32(_mm_add_epi32(v12, v11), 0xCu), _mm_sra_epi32(_mm_sub_epi32(v12, v11), 0xCu)));
    v13 = _mm_load_si128((const __m128i *)(a1 + 16));
    v14 = _mm_load_si128((const __m128i *)(a1 + 112));
    v15 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v13, -120), -120);
    v16 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v13, -35), -35);
    v17 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v14, -120), -120);
    v18 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v14, -35), -35);
    v19 = _mm_add_epi32(
            _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79B50), v16),
            _mm_shuffle_epi32(_mm_madd_epi16(v16, (__m128i)xmmword_A79B60), 78));
    v20 = _mm_add_epi32(
            _mm_shuffle_epi32(_mm_madd_epi16(v15, (__m128i)xmmword_A79B40), 78),
            _mm_add_epi32(
              _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79B30), v15),
              (__m128i)xmmword_A79850));
    v21 = _mm_add_epi32(
            _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79B50), v18),
            _mm_shuffle_epi32(_mm_madd_epi16(v18, (__m128i)xmmword_A79B60), 78));
    v22 = _mm_add_epi32(
            _mm_shuffle_epi32(_mm_madd_epi16(v17, (__m128i)xmmword_A79B40), 78),
            _mm_add_epi32(
              _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79B30), v17),
              (__m128i)xmmword_A79850));
    _mm_store_si128(
      (__m128i *)v1 + 1,
      _mm_packs_epi32(_mm_sra_epi32(_mm_add_epi32(v20, v19), 0xCu), _mm_sra_epi32(_mm_sub_epi32(v20, v19), 0xCu)));
    _mm_store_si128(
      (__m128i *)v1 + 7,
      _mm_packs_epi32(_mm_sra_epi32(_mm_add_epi32(v22, v21), 0xCu), _mm_sra_epi32(_mm_sub_epi32(v22, v21), 0xCu)));
    v23 = _mm_load_si128((const __m128i *)(a1 + 48));
    v24 = _mm_load_si128((const __m128i *)(a1 + 80));
    v25 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v23, -120), -120);
    v26 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v23, -35), -35);
    v27 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v24, -120), -120);
    v28 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v24, -35), -35);
    v29 = _mm_add_epi32(
            _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79BD0), v26),
            _mm_shuffle_epi32(_mm_madd_epi16(v26, (__m128i)xmmword_A79BE0), 78));
    v30 = _mm_add_epi32(
            _mm_shuffle_epi32(_mm_madd_epi16(v25, (__m128i)xmmword_A79BC0), 78),
            _mm_add_epi32(
              _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79BB0), v25),
              (__m128i)xmmword_A79850));
    v31 = _mm_add_epi32(
            _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79BD0), v28),
            _mm_shuffle_epi32(_mm_madd_epi16(v28, (__m128i)xmmword_A79BE0), 78));
    v32 = _mm_add_epi32(
            _mm_shuffle_epi32(_mm_madd_epi16(v27, (__m128i)xmmword_A79BC0), 78),
            _mm_add_epi32(
              _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79BB0), v27),
              (__m128i)xmmword_A79850));
    _mm_store_si128(
      (__m128i *)v1 + 3,
      _mm_packs_epi32(_mm_sra_epi32(_mm_add_epi32(v30, v29), 0xCu), _mm_sra_epi32(_mm_sub_epi32(v30, v29), 0xCu)));
    _mm_store_si128(
      (__m128i *)v1 + 5,
      _mm_packs_epi32(_mm_sra_epi32(_mm_add_epi32(v32, v31), 0xCu), _mm_sra_epi32(_mm_sub_epi32(v32, v31), 0xCu)));
    v33 = _mm_load_si128((const __m128i *)(a1 + 32));
    v34 = _mm_load_si128((const __m128i *)(a1 + 96));
    v35 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v33, -120), -120);
    v36 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v33, -35), -35);
    v37 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v34, -120), -120);
    v38 = _mm_shufflehi_epi16(_mm_shufflelo_epi16(v34, -35), -35);
    v39 = _mm_add_epi32(
            _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79B90), v36),
            _mm_shuffle_epi32(_mm_madd_epi16(v36, (__m128i)xmmword_A79BA0), 78));
    v40 = _mm_add_epi32(
            _mm_shuffle_epi32(_mm_madd_epi16(v35, (__m128i)xmmword_A79B80), 78),
            _mm_add_epi32(
              _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79B70), v35),
              (__m128i)xmmword_A79850));
    v41 = _mm_add_epi32(
            _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79B90), v38),
            _mm_shuffle_epi32(_mm_madd_epi16(v38, (__m128i)xmmword_A79BA0), 78));
    v42 = _mm_add_epi32(
            _mm_shuffle_epi32(_mm_madd_epi16(v37, (__m128i)xmmword_A79B80), 78),
            _mm_add_epi32(
              _mm_madd_epi16(_mm_load_si128((const __m128i *)&xmmword_A79B70), v37),
              (__m128i)xmmword_A79850));
    _mm_store_si128(
      (__m128i *)v1 + 2,
      _mm_packs_epi32(_mm_sra_epi32(_mm_add_epi32(v40, v39), 0xCu), _mm_sra_epi32(_mm_sub_epi32(v40, v39), 0xCu)));
    _mm_store_si128(
      (__m128i *)v1 + 6,
      _mm_packs_epi32(_mm_sra_epi32(_mm_add_epi32(v42, v41), 0xCu), _mm_sra_epi32(_mm_sub_epi32(v42, v41), 0xCu)));
    if ( v1 != &v183 )
    {
LABEL_5:
      v43 = _mm_load_si128((const __m128i *)v1 + 5);
      v44 = _mm_load_si128((const __m128i *)&xmmword_A798C0);
      v45 = v43;
      v46 = _mm_load_si128((const __m128i *)v1 + 3);
      v47 = _mm_mulhi_epi16(v43, v44);
      v48 = _mm_load_si128((const __m128i *)v1 + 7);
      v49 = _mm_load_si128((const __m128i *)&xmmword_A798A0);
      v50 = v48;
      v51 = _mm_mulhi_epi16(v48, v49);
      v52 = _mm_adds_epi16(_mm_mulhi_epi16(v44, v46), v46);
      v53 = _mm_adds_epi16(_mm_adds_epi16(v47, v45), v46);
      v54 = _mm_load_si128((const __m128i *)&xmmword_A798B0);
      v55 = _mm_subs_epi16(v45, v52);
      v56 = v53;
      v57 = _mm_subs_epi16(_mm_mulhi_epi16(v49, (__m128i)v1[1]), v50);
      v58 = _mm_adds_epi16(v51, (__m128i)v1[1]);
      v59 = _mm_adds_epi16(_mm_adds_epi16(v53, v58), (__m128i)xmmword_A79840);
      v60 = _mm_subs_epi16(v58, v56);
      v61 = _mm_adds_epi16(_mm_mulhi_epi16(_mm_load_si128((const __m128i *)v1 + 6), v54), (__m128i)v1[2]);
      v62 = v57;
      v63 = _mm_subs_epi16(_mm_mulhi_epi16(v54, (__m128i)v1[2]), (__m128i)v1[6]);
      v64 = _mm_adds_epi16(_mm_subs_epi16(v57, v55), (__m128i)xmmword_A79840);
      _mm_store_si128((__m128i *)v1 + 7, _mm_shufflehi_epi16(v59, 27));
      v65 = v60;
      v66 = _mm_adds_epi16(v60, v64);
      v67 = _mm_load_si128((const __m128i *)&xmmword_A798D0);
      _mm_store_si128((__m128i *)v1 + 3, _mm_shufflehi_epi16(_mm_adds_epi16(v62, v55), 27));
      v68 = _mm_subs_epi16(v65, v64);
      v69 = _mm_load_si128((const __m128i *)v1);
      v70 = _mm_adds_epi16(_mm_load_si128((const __m128i *)v1 + 4), v69);
      v71 = _mm_subs_epi16(v69, (__m128i)v1[4]);
      v72 = _mm_shufflehi_epi16(
              _mm_or_si128(_mm_adds_epi16(v66, _mm_mulhi_epi16(v67, v66)), (__m128i)xmmword_A79840),
              27);
      v73 = _mm_or_si128(_mm_adds_epi16(_mm_mulhi_epi16(v67, v68), v68), (__m128i)xmmword_A79840);
      v74 = v70;
      v75 = _mm_shufflehi_epi16(_mm_adds_epi16(_mm_adds_epi16(v70, v61), (__m128i)xmmword_A79860), 27);
      v76 = _mm_subs_epi16(v71, v63);
      v77 = _mm_shufflehi_epi16(_mm_adds_epi16(_mm_adds_epi16(v71, v63), (__m128i)xmmword_A79860), 27);
      v78 = v77;
      v79 = _mm_adds_epi16(v76, (__m128i)xmmword_A79870);
      v80 = _mm_shufflehi_epi16(_mm_adds_epi16(_mm_subs_epi16(v74, v61), (__m128i)xmmword_A79870), 27);
      v81 = _mm_adds_epi16(
              _mm_sra_epi16(_mm_adds_epi16(_mm_load_si128((const __m128i *)v1 + 7), v75), 5u),
              (__m128i)xmmword_A79880);
      _mm_store_si128((__m128i *)v1, _mm_unpacklo_epi8(_mm_packus_epi16(v81, v81), (__m128i)xmmword_A79890));
      v82 = v79;
      v83 = _mm_adds_epi16(_mm_sra_epi16(_mm_adds_epi16(v77, v72), 5u), (__m128i)xmmword_A79880);
      _mm_store_si128((__m128i *)v1 + 1, _mm_unpacklo_epi8(_mm_packus_epi16(v83, v83), (__m128i)xmmword_A79890));
      v84 = _mm_adds_epi16(_mm_load_si128((const __m128i *)v1 + 3), v80);
      v85 = _mm_subs_epi16(v80, (__m128i)v1[3]);
      v86 = _mm_adds_epi16(
              _mm_shufflehi_epi16(_mm_sra_epi16(_mm_adds_epi16(v79, v73), 5u), 27),
              (__m128i)xmmword_A79880);
      _mm_store_si128((__m128i *)v1 + 2, _mm_unpacklo_epi8(_mm_packus_epi16(v86, v86), (__m128i)xmmword_A79890));
      v87 = _mm_subs_epi16(v75, (__m128i)v1[7]);
      v88 = _mm_adds_epi16(_mm_sra_epi16(v84, 5u), (__m128i)xmmword_A79880);
      _mm_store_si128((__m128i *)v1 + 3, _mm_unpacklo_epi8(_mm_packus_epi16(v88, v88), (__m128i)xmmword_A79890));
      v89 = _mm_adds_epi16(_mm_sra_epi16(v85, 5u), (__m128i)xmmword_A79880);
      _mm_store_si128((__m128i *)v1 + 4, _mm_unpacklo_epi8(_mm_packus_epi16(v89, v89), (__m128i)xmmword_A79890));
      v90 = _mm_adds_epi16(
              _mm_shufflehi_epi16(_mm_sra_epi16(_mm_subs_epi16(v82, v73), 5u), 27),
              (__m128i)xmmword_A79880);
      _mm_store_si128((__m128i *)v1 + 5, _mm_unpacklo_epi8(_mm_packus_epi16(v90, v90), (__m128i)xmmword_A79890));
      v91 = _mm_adds_epi16(_mm_sra_epi16(_mm_subs_epi16(v78, v72), 5u), (__m128i)xmmword_A79880);
      _mm_store_si128((__m128i *)v1 + 6, _mm_unpacklo_epi8(_mm_packus_epi16(v91, v91), (__m128i)xmmword_A79890));
      v92 = _mm_adds_epi16(_mm_sra_epi16(v87, 5u), (__m128i)xmmword_A79880);
      _mm_store_si128((__m128i *)v1 + 7, _mm_unpacklo_epi8(_mm_packus_epi16(v92, v92), (__m128i)xmmword_A79890));
      return result;
    }
  }
  v133 = _mm_load_si128((const __m128i *)&v188);
  v134 = _mm_load_si128((const __m128i *)&xmmword_A798C0);
  v135 = v133;
  v136 = _mm_load_si128(&v186);
  v137 = _mm_mulhi_epi16(v133, v134);
  v138 = _mm_load_si128(&v190);
  v139 = _mm_load_si128((const __m128i *)&xmmword_A798A0);
  v140 = v138;
  v141 = _mm_mulhi_epi16(v138, v139);
  v142 = _mm_adds_epi16(_mm_mulhi_epi16(v134, v136), v136);
  v143 = _mm_adds_epi16(_mm_adds_epi16(v137, v135), v136);
  v144 = _mm_load_si128((const __m128i *)&xmmword_A798B0);
  v145 = _mm_subs_epi16(v135, v142);
  v146 = v143;
  v147 = _mm_subs_epi16(_mm_mulhi_epi16(v139, v184), v140);
  v148 = _mm_adds_epi16(v141, v184);
  v149 = _mm_adds_epi16(_mm_adds_epi16(v143, v148), (__m128i)xmmword_A79840);
  v150 = _mm_subs_epi16(v148, v146);
  v151 = _mm_adds_epi16(_mm_mulhi_epi16(_mm_load_si128(&v189), v144), v185);
  v152 = v147;
  v153 = _mm_subs_epi16(_mm_mulhi_epi16(v144, v185), v189);
  v154 = _mm_adds_epi16(_mm_subs_epi16(v147, v145), (__m128i)xmmword_A79840);
  _mm_store_si128(&v190, _mm_shufflehi_epi16(v149, 27));
  v155 = v150;
  v156 = _mm_adds_epi16(v150, v154);
  v157 = _mm_load_si128((const __m128i *)&xmmword_A798D0);
  _mm_store_si128(&v186, _mm_shufflehi_epi16(_mm_adds_epi16(v152, v145), 27));
  v158 = _mm_subs_epi16(v155, v154);
  v159 = _mm_load_si128((const __m128i *)&v183);
  v160 = _mm_adds_epi16(_mm_load_si128(&v187), v159);
  v161 = _mm_subs_epi16(v159, v187);
  v162 = _mm_shufflehi_epi16(
           _mm_or_si128(_mm_adds_epi16(v156, _mm_mulhi_epi16(v157, v156)), (__m128i)xmmword_A79840),
           27);
  v163 = _mm_or_si128(_mm_adds_epi16(_mm_mulhi_epi16(v157, v158), v158), (__m128i)xmmword_A79840);
  v164 = v160;
  v165 = _mm_shufflehi_epi16(_mm_adds_epi16(_mm_adds_epi16(v160, v151), (__m128i)xmmword_A79860), 27);
  v166 = _mm_subs_epi16(v161, v153);
  v167 = _mm_shufflehi_epi16(_mm_adds_epi16(_mm_adds_epi16(v161, v153), (__m128i)xmmword_A79860), 27);
  v168 = v167;
  v169 = _mm_adds_epi16(v166, (__m128i)xmmword_A79870);
  v170 = _mm_shufflehi_epi16(_mm_adds_epi16(_mm_subs_epi16(v164, v151), (__m128i)xmmword_A79870), 27);
  v171 = _mm_adds_epi16(_mm_sra_epi16(_mm_adds_epi16(_mm_load_si128(&v190), v165), 5u), (__m128i)xmmword_A79880);
  _mm_storeu_si128((__m128i *)a1, _mm_unpacklo_epi8(_mm_packus_epi16(v171, v171), (__m128i)xmmword_A79890));
  v172 = v169;
  v173 = _mm_adds_epi16(_mm_sra_epi16(_mm_adds_epi16(v167, v162), 5u), (__m128i)xmmword_A79880);
  _mm_storeu_si128((__m128i *)(a1 + 16), _mm_unpacklo_epi8(_mm_packus_epi16(v173, v173), (__m128i)xmmword_A79890));
  v174 = _mm_adds_epi16(_mm_load_si128(&v186), v170);
  v175 = _mm_subs_epi16(v170, v186);
  v176 = _mm_adds_epi16(_mm_shufflehi_epi16(_mm_sra_epi16(_mm_adds_epi16(v169, v163), 5u), 27), (__m128i)xmmword_A79880);
  _mm_storeu_si128((__m128i *)(a1 + 32), _mm_unpacklo_epi8(_mm_packus_epi16(v176, v176), (__m128i)xmmword_A79890));
  v177 = _mm_subs_epi16(v165, v190);
  v178 = _mm_adds_epi16(_mm_sra_epi16(v174, 5u), (__m128i)xmmword_A79880);
  _mm_storeu_si128((__m128i *)(a1 + 48), _mm_unpacklo_epi8(_mm_packus_epi16(v178, v178), (__m128i)xmmword_A79890));
  v179 = _mm_adds_epi16(_mm_sra_epi16(v175, 5u), (__m128i)xmmword_A79880);
  _mm_storeu_si128((__m128i *)(a1 + 64), _mm_unpacklo_epi8(_mm_packus_epi16(v179, v179), (__m128i)xmmword_A79890));
  v180 = _mm_adds_epi16(_mm_shufflehi_epi16(_mm_sra_epi16(_mm_subs_epi16(v172, v163), 5u), 27), (__m128i)xmmword_A79880);
  _mm_storeu_si128((__m128i *)(a1 + 80), _mm_unpacklo_epi8(_mm_packus_epi16(v180, v180), (__m128i)xmmword_A79890));
  v181 = _mm_adds_epi16(_mm_sra_epi16(_mm_subs_epi16(v168, v162), 5u), (__m128i)xmmword_A79880);
  _mm_storeu_si128((__m128i *)(a1 + 96), _mm_unpacklo_epi8(_mm_packus_epi16(v181, v181), (__m128i)xmmword_A79890));
  v182 = _mm_adds_epi16(_mm_sra_epi16(v177, 5u), (__m128i)xmmword_A79880);
  _mm_storeu_si128((__m128i *)(a1 + 112), _mm_unpacklo_epi8(_mm_packus_epi16(v182, v182), (__m128i)xmmword_A79890));
  return result;
}
// A79840: using guessed type __int128 xmmword_A79840;
// A79850: using guessed type __int128 xmmword_A79850;
// A79860: using guessed type __int128 xmmword_A79860;
// A79870: using guessed type __int128 xmmword_A79870;
// A79880: using guessed type __int128 xmmword_A79880;
// A79890: using guessed type __int128 xmmword_A79890;
// A798A0: using guessed type __int128 xmmword_A798A0;
// A798B0: using guessed type __int128 xmmword_A798B0;
// A798C0: using guessed type __int128 xmmword_A798C0;
// A798D0: using guessed type __int128 xmmword_A798D0;
// A79AF0: using guessed type __int128 xmmword_A79AF0;
// A79B00: using guessed type __int128 xmmword_A79B00;
// A79B10: using guessed type __int128 xmmword_A79B10;
// A79B20: using guessed type __int128 xmmword_A79B20;
// A79B30: using guessed type __int128 xmmword_A79B30;
// A79B40: using guessed type __int128 xmmword_A79B40;
// A79B50: using guessed type __int128 xmmword_A79B50;
// A79B60: using guessed type __int128 xmmword_A79B60;
// A79B70: using guessed type __int128 xmmword_A79B70;
// A79B80: using guessed type __int128 xmmword_A79B80;
// A79B90: using guessed type __int128 xmmword_A79B90;
// A79BA0: using guessed type __int128 xmmword_A79BA0;
// A79BB0: using guessed type __int128 xmmword_A79BB0;
// A79BC0: using guessed type __int128 xmmword_A79BC0;
// A79BD0: using guessed type __int128 xmmword_A79BD0;
// A79BE0: using guessed type __int128 xmmword_A79BE0;

//----- (0079A9D0) --------------------------------------------------------
int __cdecl own_eb_write_bytes_m5(__m64 *a1, int a2, int a3)
{
  float v3; // ebx@1
  _BYTE *v4; // eax@1
  __m64 v5; // mm0@2
  int v6; // ecx@3
  unsigned __int8 v7; // of@5
  int v8; // ecx@7
  char v9; // bl@9

  v3 = a1[1].m64_f32[1];
  v4 = (_BYTE *)a1[2].m64_i32[0];
  if ( v3 != 0.0 )
  {
    v5 = (__m64)a1->m64_u64;
    do
    {
      v6 = _mm_cvtsi64_si32(_m_psrlq(v5, 0x38u));
      *v4++ = v6;
      if ( v6 == 255 )
      {
        *v4 = 0;
        ++a1[3].m64_i32[1];
        ++v4;
      }
      ++a1[3].m64_i32[1];
      v5 = _m_psllq(v5, 8u);
      v7 = __OFSUB__(LODWORD(v3), 8);
      LODWORD(v3) -= 8;
    }
    while ( !((unsigned __int8)((SLODWORD(v3) < 0) ^ v7) | (LODWORD(v3) == 0)) );
    a1[1].m64_i32[1] = 0;
    a1->m64_u64 = 0i64;
    _m_femms();
  }
  v8 = 0;
  if ( a2 )
  {
    do
    {
      v9 = *(_BYTE *)(v8++ + a2);
      *v4++ = v9;
    }
    while ( v8 != a3 );
  }
  else
  {
    a1[2].m64_i32[0] = (int)v4;
  }
  a1[2].m64_i32[0] = (int)v4;
  return 0;
}

//----- (0079AA50) --------------------------------------------------------
signed int __usercall own_eb_write_bits_m5@<eax>(__m64 a1@<mm1>, unsigned int a2, int a3, __m64 *a4)
{
  int v4; // esi@1
  __m64 v5; // mm7@1
  __m64 v6; // mm1@1
  signed int result; // eax@1
  __m64 v8; // mm7@1
  __m64 v9; // mm0@1
  int v10; // edx@2
  __m64 v11; // mm0@3
  __m64 v12; // mm1@3
  __m64 v13; // mm2@3
  __m64 v14; // mm0@3
  unsigned int v15; // eax@3
  int v16; // ebx@4
  __m64 v17; // mm0@4
  __m64 v18; // mm0@4
  signed int v19; // eax@5
  __m64 v20; // mm4@14
  __m64 v21; // mm7@14
  __m64 v22; // mm5@14
  __m64 v23; // mm4@16
  __m64 v24; // mm4@16
  __m64 v25; // mm4@18
  __m64 v26; // mm4@20
  __m64 v27; // mm4@22
  __m64 v28; // mm4@24
  __m64 v29; // mm4@24
  __m64 v30; // mm4@24

  v4 = a4[1].m64_i32[1] + a3;
  v5 = (__m64)a4->m64_u64;
  v6 = _m_pcmpeqb(a1, a1);
  a4[1].m64_i32[1] = v4;
  result = 0;
  v8 = _m_por(v5, _m_psllqi(_mm_cvtsi32_si64(a2), 64 - v4));
  v9 = v8;
  if ( v4 > 32 )
  {
    v10 = a4[2].m64_i32[0];
    result = -28;
    if ( (unsigned int)(a4[3].m64_i32[0] - v10) >= 4 )
    {
      while ( 1 )
      {
        a4[3].m64_i32[1] += 4;
        v11 = _m_psrlq(v9, 0x20u);
        v12 = _m_pcmpeqb(v6, v11);
        v13 = v11;
        v14 = _m_psrlq(v11, 8u);
        v10 += 4;
        v15 = _mm_cvtsi64_si32(v12);
        if ( !v15 )
          break;
        v19 = v15 >> 8;
        if ( v19 >= 16711680 )
        {
          if ( v19 == 16711680 )
          {
            v20 = v8;
            v21 = _m_psrlq(v8, 0x28u);
            v4 -= 24;
            v6 = _m_pcmpeqb(v12, v12);
            v22 = _m_por(_m_psllq(_m_punpcklbw(_m_psrlq(v21, 8u), v21), 0x10u), (__m64)qword_A79BF0);
            v8 = _m_psllq(v20, 0x18u);
            v9 = v8;
            *(_DWORD *)(v10 - 4) = _mm_cvtsi64_si32(v22);
            if ( v4 < 32 )
              goto LABEL_27;
          }
          else if ( v19 == 16776960 )
          {
            v8 = _m_psllq(v8, 0x10u);
            v9 = v8;
            v4 -= 16;
            *(_DWORD *)(v10 - 4) = _mm_cvtsi64_si32((__m64)qword_A79C00);
            v6 = _m_pcmpeqb(v12, v12);
            if ( v4 < 32 )
              goto LABEL_27;
          }
          else
          {
            v26 = v8;
            v4 -= 16;
            v8 = _m_psrlq(_m_psllq(v8, 0x18u), 8u);
            v9 = v8;
            *(_DWORD *)(v10 - 4) = _mm_cvtsi64_si32(_m_por(_m_psllq(_m_psrlq(v26, 0x30u), 0x10u), (__m64)qword_A79BF0));
            v6 = _m_pcmpeqb(v12, v12);
            if ( v4 < 32 )
              goto LABEL_27;
          }
        }
        else if ( v19 >= 65280 )
        {
          if ( v19 == 0xFFFF )
          {
            v27 = v8;
            v8 = _m_psrlq(_m_psllq(v8, 0x18u), 8u);
            v9 = v8;
            v4 -= 16;
            *(_DWORD *)(v10 - 4) = _mm_cvtsi64_si32(_m_por(_m_psrlq(v27, 0x38u), (__m64)qword_A79C08));
            v6 = _m_pcmpeqb(v12, v12);
            if ( v4 < 32 )
              goto LABEL_27;
          }
          else
          {
            v23 = v8;
            v8 = _m_psllq(v8, 0x18u);
            v24 = _m_psrlq(v23, 0x28u);
            v9 = v8;
            v4 -= 24;
            *(_DWORD *)(v10 - 4) = _mm_cvtsi64_si32(_m_por(_m_psrlq(v24, 0x10u), _m_por(_m_pslld(v24, 0x18u), (__m64)qword_A79BF8)));
            v6 = _m_pcmpeqb(v12, v12);
            if ( v4 < 32 )
              goto LABEL_27;
          }
        }
        else if ( v19 )
        {
          v25 = _m_psrlq(v8, 0x28u);
          v4 -= 24;
          v8 = _m_psllq(v8, 0x18u);
          v6 = _m_pcmpeqb(v12, v12);
          *(_DWORD *)(v10 - 4) = _mm_cvtsi64_si32(_m_por(_m_psrlq(_m_por(_m_psllq((__m64)qword_A79BF8, 0x18u), v25), 0x10u), _m_pand(v25, (__m64)qword_A79BF8)));
          v9 = v8;
          if ( v4 < 32 )
            goto LABEL_27;
        }
        else
        {
          v28 = _m_psrlq(v8, 0x20u);
          v6 = _m_pcmpeqb(v12, v12);
          v4 -= 24;
          v29 = _m_psrad(_m_pslld(_m_punpcklbw(_m_psrlq(v28, 8u), v28), 0x10u), 0x10u);
          v30 = _m_packssdw(v29, v29);
          v8 = _m_psrlq(_m_psllq(v8, 0x20u), 8u);
          *(_DWORD *)(v10 - 4) = _mm_cvtsi64_si32(_m_punpcklwd(_m_psrlq(v30, 0x10u), v30));
          v9 = v8;
          if ( v4 < 32 )
            goto LABEL_27;
        }
      }
      v16 = *(_DWORD *)(v10 + 36);
      v4 -= 32;
      v17 = _m_psrad(_m_pslld(_m_punpcklbw(v14, v13), 0x10u), 0x10u);
      v18 = _m_packssdw(v17, v17);
      v8 = _m_psllq(v8, 0x20u);
      *(_DWORD *)(v10 - 4) = _mm_cvtsi64_si32(_m_punpcklwd(_m_psrlq(v18, 0x10u), v18));
LABEL_27:
      result = 0;
      a4[2].m64_i32[0] = v10;
      a4[1].m64_i32[1] = v4;
    }
  }
  a4->m64_u64 = (unsigned __int64)v8;
  return result;
}
// A79BF0: using guessed type __int64 qword_A79BF0;
// A79BF8: using guessed type __int64 qword_A79BF8;
// A79C00: using guessed type __int64 qword_A79C00;
// A79C08: using guessed type __int64 qword_A79C08;

//----- (0079ACD0) --------------------------------------------------------
signed int __usercall own_eb_write_bits_file_m5@<eax>(__m64 a1@<mm1>, unsigned int a2, int a3, int a4)
{
  int v4; // esi@1
  __m64 v5; // mm7@1
  __m64 v6; // mm1@1
  __m64 v7; // mm7@1
  __m64 v8; // mm0@1
  int v9; // edx@2
  signed int result; // eax@3
  __m64 v11; // mm0@5
  __m64 v12; // mm1@5
  __m64 v13; // mm2@5
  __m64 v14; // mm0@5
  unsigned int v15; // eax@5
  int v16; // ebx@6
  __m64 v17; // mm0@6
  __m64 v18; // mm0@6
  signed int v19; // eax@7
  __m64 v20; // mm4@16
  __m64 v21; // mm7@16
  __m64 v22; // mm5@16
  __m64 v23; // mm4@18
  __m64 v24; // mm4@18
  __m64 v25; // mm4@20
  __m64 v26; // mm4@22
  __m64 v27; // mm4@24
  __m64 v28; // mm4@26
  __m64 v29; // mm4@26
  __m64 v30; // mm4@26

  v4 = *(_DWORD *)(a4 + 12) + a3;
  v5 = *(__m64 *)a4;
  v6 = _m_pcmpeqb(a1, a1);
  *(_DWORD *)(a4 + 12) = v4;
  v7 = _m_por(v5, _m_psllqi(_mm_cvtsi32_si64(a2), 64 - v4));
  v8 = v7;
  if ( v4 <= 32 )
  {
LABEL_30:
    result = 0;
    goto LABEL_31;
  }
  v9 = *(_DWORD *)(a4 + 16);
  if ( *(_DWORD *)(a4 + 24) - v9 > 22 )
    goto LABEL_5;
  result = flush_mbuffer_to_file(a4);
  if ( !result )
  {
    v9 = a4 + 64;
    *(_DWORD *)(a4 + 24) = a4 + 4160;
LABEL_5:
    while ( 1 )
    {
      *(_DWORD *)(a4 + 28) += 4;
      v11 = _m_psrlq(v8, 0x20u);
      v12 = _m_pcmpeqb(v6, v11);
      v13 = v11;
      v14 = _m_psrlq(v11, 8u);
      v9 += 4;
      v15 = _mm_cvtsi64_si32(v12);
      if ( !v15 )
        break;
      v19 = v15 >> 8;
      if ( v19 >= 16711680 )
      {
        if ( v19 == 16711680 )
        {
          v20 = v7;
          v21 = _m_psrlq(v7, 0x28u);
          v4 -= 24;
          v6 = _m_pcmpeqb(v12, v12);
          v22 = _m_por(_m_psllq(_m_punpcklbw(_m_psrlq(v21, 8u), v21), 0x10u), (__m64)qword_A79BF0);
          v7 = _m_psllq(v20, 0x18u);
          v8 = v7;
          *(_DWORD *)(v9 - 4) = _mm_cvtsi64_si32(v22);
          if ( v4 < 32 )
            goto LABEL_29;
        }
        else if ( v19 == 16776960 )
        {
          v7 = _m_psllq(v7, 0x10u);
          v8 = v7;
          v4 -= 16;
          *(_DWORD *)(v9 - 4) = _mm_cvtsi64_si32((__m64)qword_A79C00);
          v6 = _m_pcmpeqb(v12, v12);
          if ( v4 < 32 )
            goto LABEL_29;
        }
        else
        {
          v26 = v7;
          v4 -= 16;
          v7 = _m_psrlq(_m_psllq(v7, 0x18u), 8u);
          v8 = v7;
          *(_DWORD *)(v9 - 4) = _mm_cvtsi64_si32(_m_por(_m_psllq(_m_psrlq(v26, 0x30u), 0x10u), (__m64)qword_A79BF0));
          v6 = _m_pcmpeqb(v12, v12);
          if ( v4 < 32 )
            goto LABEL_29;
        }
      }
      else if ( v19 >= 65280 )
      {
        if ( v19 == 0xFFFF )
        {
          v27 = v7;
          v7 = _m_psrlq(_m_psllq(v7, 0x18u), 8u);
          v8 = v7;
          v4 -= 16;
          *(_DWORD *)(v9 - 4) = _mm_cvtsi64_si32(_m_por(_m_psrlq(v27, 0x38u), (__m64)qword_A79C08));
          v6 = _m_pcmpeqb(v12, v12);
          if ( v4 < 32 )
            goto LABEL_29;
        }
        else
        {
          v23 = v7;
          v7 = _m_psllq(v7, 0x18u);
          v24 = _m_psrlq(v23, 0x28u);
          v8 = v7;
          v4 -= 24;
          *(_DWORD *)(v9 - 4) = _mm_cvtsi64_si32(_m_por(_m_psrlq(v24, 0x10u), _m_por(_m_pslld(v24, 0x18u), (__m64)qword_A79BF8)));
          v6 = _m_pcmpeqb(v12, v12);
          if ( v4 < 32 )
            goto LABEL_29;
        }
      }
      else if ( v19 )
      {
        v25 = _m_psrlq(v7, 0x28u);
        v4 -= 24;
        v7 = _m_psllq(v7, 0x18u);
        v6 = _m_pcmpeqb(v12, v12);
        *(_DWORD *)(v9 - 4) = _mm_cvtsi64_si32(_m_por(_m_psrlq(_m_por(_m_psllq((__m64)qword_A79BF8, 0x18u), v25), 0x10u), _m_pand(v25, (__m64)qword_A79BF8)));
        v8 = v7;
        if ( v4 < 32 )
          goto LABEL_29;
      }
      else
      {
        v28 = _m_psrlq(v7, 0x20u);
        v6 = _m_pcmpeqb(v12, v12);
        v4 -= 24;
        v29 = _m_psrad(_m_pslld(_m_punpcklbw(_m_psrlq(v28, 8u), v28), 0x10u), 0x10u);
        v30 = _m_packssdw(v29, v29);
        v7 = _m_psrlq(_m_psllq(v7, 0x20u), 8u);
        *(_DWORD *)(v9 - 4) = _mm_cvtsi64_si32(_m_punpcklwd(_m_psrlq(v30, 0x10u), v30));
        v8 = v7;
        if ( v4 < 32 )
          goto LABEL_29;
      }
    }
    v16 = *(_DWORD *)(v9 + 36);
    v4 -= 32;
    v17 = _m_psrad(_m_pslld(_m_punpcklbw(v14, v13), 0x10u), 0x10u);
    v18 = _m_packssdw(v17, v17);
    v7 = _m_psllq(v7, 0x20u);
    *(_DWORD *)(v9 - 4) = _mm_cvtsi64_si32(_m_punpcklwd(_m_psrlq(v18, 0x10u), v18));
LABEL_29:
    *(_DWORD *)(a4 + 16) = v9;
    *(_DWORD *)(a4 + 12) = v4;
    goto LABEL_30;
  }
LABEL_31:
  *(__m64 *)a4 = v7;
  return result;
}
// A79BF0: using guessed type __int64 qword_A79BF0;
// A79BF8: using guessed type __int64 qword_A79BF8;
// A79C00: using guessed type __int64 qword_A79C00;
// A79C08: using guessed type __int64 qword_A79C08;

//----- (0079AF60) --------------------------------------------------------
int __cdecl __spoils<ecx> own_rgb_to_ycbcr_111_full_mcu_m5(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // esi@1
  int v6; // edi@1
  int v7; // eax@1
  int v8; // ebx@1
  signed int v9; // ecx@1
  __m64 v10; // mm0@2
  __m64 v11; // mm1@2
  __m64 v12; // mm3@2
  __m64 v13; // mm4@2
  __m64 v14; // mm0@2
  __m64 v15; // mm5@2
  __m64 v16; // mm1@2
  __m64 v17; // mm6@2
  __m64 v18; // mm3@2
  __m64 v19; // mm4@2
  __m64 v20; // mm5@2
  __m64 v21; // mm6@2
  __m64 v22; // mm0@2
  __m64 v23; // mm1@2
  __m64 v24; // mm2@2
  __m64 v25; // mm1@2
  __m64 v26; // mm3@2
  __m64 v27; // mm4@2
  __m64 v28; // mm5@2
  __m64 v29; // mm6@2
  __m64 v30; // mm7@2
  __m64 v31; // mm5@2
  __m64 v32; // mm6@2
  __m64 v33; // mm3@2
  __m64 v34; // mm4@2
  __m64 v35; // mm5@2
  __m64 v36; // mm6@2
  __m64 v37; // mm7@2
  __m64 v38; // mm3@2
  __m64 v39; // mm4@2
  __m64 v40; // mm3@2
  __m64 v41; // mm0@2
  __m64 v42; // mm2@2
  __m64 v43; // mm3@2
  __m64 v44; // mm4@2
  __m64 v45; // mm0@2
  __m64 v46; // mm5@2
  __m64 v47; // mm2@2
  __m64 v48; // mm6@2
  __m64 v49; // mm3@2
  __m64 v50; // mm4@2
  __m64 v51; // mm5@2
  __m64 v52; // mm6@2
  __m64 v53; // mm0@2
  __m64 v54; // mm2@2
  __m64 v55; // mm1@2
  __m64 v56; // mm2@2
  __m64 v57; // mm3@2
  __m64 v58; // mm4@2
  __m64 v59; // mm5@2
  __m64 v60; // mm6@2
  __m64 v61; // mm7@2
  __m64 v62; // mm5@2
  __m64 v63; // mm6@2
  __m64 v64; // mm3@2
  __m64 v65; // mm4@2
  __m64 v66; // mm5@2
  __m64 v67; // mm6@2
  __m64 v68; // mm7@2
  __m64 v69; // mm3@2
  __m64 v70; // mm4@2
  __m64 v71; // mm3@2
  int v73; // [sp+4h] [bp-4h]@0

  v5 = a1;
  v6 = a3;
  v7 = a4;
  v8 = a5;
  v9 = 8;
  do
  {
    v10 = _m_punpcklbw(*(__m64 *)v5, 0i64);
    v11 = _m_punpcklbw(_m_psrlq(*(__m64 *)v5, 0x18u), 0i64);
    v12 = v10;
    v13 = v11;
    v14 = _m_pmaddwd(v10, (__m64)qword_A79C10);
    v15 = v12;
    v16 = _m_pmaddwd(v11, (__m64)qword_A79C10);
    v17 = v13;
    v18 = _m_pmaddwd(v12, (__m64)qword_A79C18);
    v19 = _m_pmaddwd(v13, (__m64)qword_A79C18);
    v20 = _m_pmaddwd(v15, (__m64)qword_A79C20);
    v21 = _m_pmaddwd(v17, (__m64)qword_A79C20);
    v22 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v14, v16), _m_punpckhdq(v14, v16)), (__m64)qword_A79C40), 8u);
    v23 = _m_psrad(_m_paddd(_m_paddd(_m_punpckhdq(v18, v20), _m_punpckldq(v18, v20)), (__m64)qword_A79C48), 8u);
    v24 = _m_psrad(_m_paddd(_m_paddd(_m_punpckhdq(v19, v21), _m_punpckldq(v19, v21)), (__m64)qword_A79C48), 8u);
    v25 = _m_punpcklwd(_m_packssdw(v23, v23), _m_packssdw(v24, v24));
    v26 = _m_punpcklbw(*(__m64 *)(v5 + 6), 0i64);
    v27 = _m_punpcklbw(_m_psrlq(*(__m64 *)(v5 + 6), 0x18u), 0i64);
    v28 = _m_pmaddwd(v26, (__m64)qword_A79C10);
    v29 = _m_pmaddwd(v27, (__m64)qword_A79C10);
    v30 = v27;
    v31 = _m_paddd(_m_punpckhdq(v28, v29), _m_punpckldq(v28, v29));
    v32 = v26;
    v33 = _m_pmaddwd(v26, (__m64)qword_A79C18);
    v34 = _m_pmaddwd(v27, (__m64)qword_A79C18);
    v35 = _m_psrad(_m_psubd(v31, (__m64)qword_A79C40), 8u);
    v36 = _m_pmaddwd(v32, (__m64)qword_A79C20);
    v37 = _m_pmaddwd(v30, (__m64)qword_A79C20);
    *(__m64 *)v6 = _m_punpckldq(_m_packssdw(v22, v22), _m_packssdw(v35, v35));
    v38 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v33, v36), _m_punpckhdq(v33, v36)), (__m64)qword_A79C48), 8u);
    v39 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v34, v37), _m_punpckhdq(v34, v37)), (__m64)qword_A79C48), 8u);
    v40 = _m_punpcklwd(_m_packssdw(v38, v38), _m_packssdw(v39, v39));
    *(__m64 *)v7 = _m_punpckldq(v25, v40);
    *(__m64 *)v8 = _m_punpckhdq(v25, v40);
    v41 = _m_punpcklbw(*(__m64 *)(v5 + 12), 0i64);
    v42 = _m_punpcklbw(_m_psrlq(*(__m64 *)(v5 + 12), 0x18u), 0i64);
    v43 = v41;
    v44 = v42;
    v45 = _m_pmaddwd(v41, (__m64)qword_A79C10);
    v46 = v43;
    v47 = _m_pmaddwd(v42, (__m64)qword_A79C10);
    v48 = v44;
    v49 = _m_pmaddwd(v43, (__m64)qword_A79C18);
    v50 = _m_pmaddwd(v44, (__m64)qword_A79C18);
    v51 = _m_pmaddwd(v46, (__m64)qword_A79C20);
    v52 = _m_pmaddwd(v48, (__m64)qword_A79C20);
    v53 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v45, v47), _m_punpckhdq(v45, v47)), (__m64)qword_A79C40), 8u);
    v54 = _m_psrad(_m_paddd(_m_paddd(_m_punpckhdq(v49, v51), _m_punpckldq(v49, v51)), (__m64)qword_A79C48), 8u);
    v55 = _m_psrad(_m_paddd(_m_paddd(_m_punpckhdq(v50, v52), _m_punpckldq(v50, v52)), (__m64)qword_A79C48), 8u);
    v56 = _m_punpcklwd(_m_packssdw(v54, v54), _m_packssdw(v55, v55));
    v57 = _m_punpcklbw(*(__m64 *)(v5 + 18), 0i64);
    v58 = _m_punpcklbw(_m_psrlq(*(__m64 *)(v5 + 18), 0x18u), 0i64);
    v59 = _m_pmaddwd(v57, (__m64)qword_A79C10);
    v60 = _m_pmaddwd(v58, (__m64)qword_A79C10);
    v61 = v58;
    v62 = _m_paddd(_m_punpckhdq(v59, v60), _m_punpckldq(v59, v60));
    v63 = v57;
    v64 = _m_pmaddwd(v57, (__m64)qword_A79C18);
    v65 = _m_pmaddwd(v58, (__m64)qword_A79C18);
    v66 = _m_psrad(_m_psubd(v62, (__m64)qword_A79C40), 8u);
    v67 = _m_pmaddwd(v63, (__m64)qword_A79C20);
    v68 = _m_pmaddwd(v61, (__m64)qword_A79C20);
    *(__m64 *)(v6 + 8) = _m_punpckldq(_m_packssdw(v53, v53), _m_packssdw(v66, v66));
    v69 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v64, v67), _m_punpckhdq(v64, v67)), (__m64)qword_A79C48), 8u);
    v70 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v65, v68), _m_punpckhdq(v65, v68)), (__m64)qword_A79C48), 8u);
    v71 = _m_punpcklwd(_m_packssdw(v69, v69), _m_packssdw(v70, v70));
    v6 += 16;
    *(__m64 *)(v7 + 8) = _m_punpckldq(v56, v71);
    *(__m64 *)(v8 + 8) = _m_punpckhdq(v56, v71);
    v7 += 16;
    v8 += 16;
    v5 += a2;
    --v9;
  }
  while ( v9 );
  return v73;
}
// A79C10: using guessed type __int64 qword_A79C10;
// A79C18: using guessed type __int64 qword_A79C18;
// A79C20: using guessed type __int64 qword_A79C20;
// A79C40: using guessed type __int64 qword_A79C40;
// A79C48: using guessed type __int64 qword_A79C48;

//----- (0079B230) --------------------------------------------------------
int __cdecl __spoils<ecx> own_bgr_to_ycbcr_111_full_mcu_m5(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // esi@1
  int v6; // edi@1
  int v7; // eax@1
  int v8; // ebx@1
  signed int v9; // ecx@1
  __m64 v10; // mm0@2
  __m64 v11; // mm1@2
  __m64 v12; // mm3@2
  __m64 v13; // mm4@2
  __m64 v14; // mm0@2
  __m64 v15; // mm5@2
  __m64 v16; // mm1@2
  __m64 v17; // mm6@2
  __m64 v18; // mm3@2
  __m64 v19; // mm4@2
  __m64 v20; // mm5@2
  __m64 v21; // mm6@2
  __m64 v22; // mm0@2
  __m64 v23; // mm1@2
  __m64 v24; // mm2@2
  __m64 v25; // mm1@2
  __m64 v26; // mm3@2
  __m64 v27; // mm4@2
  __m64 v28; // mm5@2
  __m64 v29; // mm6@2
  __m64 v30; // mm7@2
  __m64 v31; // mm5@2
  __m64 v32; // mm6@2
  __m64 v33; // mm3@2
  __m64 v34; // mm4@2
  __m64 v35; // mm5@2
  __m64 v36; // mm6@2
  __m64 v37; // mm7@2
  __m64 v38; // mm3@2
  __m64 v39; // mm4@2
  __m64 v40; // mm3@2
  __m64 v41; // mm0@2
  __m64 v42; // mm2@2
  __m64 v43; // mm3@2
  __m64 v44; // mm4@2
  __m64 v45; // mm0@2
  __m64 v46; // mm5@2
  __m64 v47; // mm2@2
  __m64 v48; // mm6@2
  __m64 v49; // mm3@2
  __m64 v50; // mm4@2
  __m64 v51; // mm5@2
  __m64 v52; // mm6@2
  __m64 v53; // mm0@2
  __m64 v54; // mm2@2
  __m64 v55; // mm1@2
  __m64 v56; // mm2@2
  __m64 v57; // mm3@2
  __m64 v58; // mm4@2
  __m64 v59; // mm5@2
  __m64 v60; // mm6@2
  __m64 v61; // mm7@2
  __m64 v62; // mm5@2
  __m64 v63; // mm6@2
  __m64 v64; // mm3@2
  __m64 v65; // mm4@2
  __m64 v66; // mm5@2
  __m64 v67; // mm6@2
  __m64 v68; // mm7@2
  __m64 v69; // mm3@2
  __m64 v70; // mm4@2
  __m64 v71; // mm3@2
  int v73; // [sp+4h] [bp-4h]@0

  v5 = a1;
  v6 = a3;
  v7 = a4;
  v8 = a5;
  v9 = 8;
  do
  {
    v10 = _m_punpcklbw(*(__m64 *)v5, 0i64);
    v11 = _m_punpcklbw(_m_psrlq(*(__m64 *)v5, 0x18u), 0i64);
    v12 = v10;
    v13 = v11;
    v14 = _m_pmaddwd(v10, (__m64)qword_A79C28);
    v15 = v12;
    v16 = _m_pmaddwd(v11, (__m64)qword_A79C28);
    v17 = v13;
    v18 = _m_pmaddwd(v12, (__m64)qword_A79C30);
    v19 = _m_pmaddwd(v13, (__m64)qword_A79C30);
    v20 = _m_pmaddwd(v15, (__m64)qword_A79C38);
    v21 = _m_pmaddwd(v17, (__m64)qword_A79C38);
    v22 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v14, v16), _m_punpckhdq(v14, v16)), (__m64)qword_A79C40), 8u);
    v23 = _m_psrad(_m_paddd(_m_paddd(_m_punpckhdq(v18, v20), _m_punpckldq(v18, v20)), (__m64)qword_A79C48), 8u);
    v24 = _m_psrad(_m_paddd(_m_paddd(_m_punpckhdq(v19, v21), _m_punpckldq(v19, v21)), (__m64)qword_A79C48), 8u);
    v25 = _m_punpcklwd(_m_packssdw(v23, v23), _m_packssdw(v24, v24));
    v26 = _m_punpcklbw(*(__m64 *)(v5 + 6), 0i64);
    v27 = _m_punpcklbw(_m_psrlq(*(__m64 *)(v5 + 6), 0x18u), 0i64);
    v28 = _m_pmaddwd(v26, (__m64)qword_A79C28);
    v29 = _m_pmaddwd(v27, (__m64)qword_A79C28);
    v30 = v27;
    v31 = _m_paddd(_m_punpckhdq(v28, v29), _m_punpckldq(v28, v29));
    v32 = v26;
    v33 = _m_pmaddwd(v26, (__m64)qword_A79C30);
    v34 = _m_pmaddwd(v27, (__m64)qword_A79C30);
    v35 = _m_psrad(_m_psubd(v31, (__m64)qword_A79C40), 8u);
    v36 = _m_pmaddwd(v32, (__m64)qword_A79C38);
    v37 = _m_pmaddwd(v30, (__m64)qword_A79C38);
    *(__m64 *)v6 = _m_punpckldq(_m_packssdw(v22, v22), _m_packssdw(v35, v35));
    v38 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v33, v36), _m_punpckhdq(v33, v36)), (__m64)qword_A79C48), 8u);
    v39 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v34, v37), _m_punpckhdq(v34, v37)), (__m64)qword_A79C48), 8u);
    v40 = _m_punpcklwd(_m_packssdw(v38, v38), _m_packssdw(v39, v39));
    *(__m64 *)v7 = _m_punpckldq(v25, v40);
    *(__m64 *)v8 = _m_punpckhdq(v25, v40);
    v41 = _m_punpcklbw(*(__m64 *)(v5 + 12), 0i64);
    v42 = _m_punpcklbw(_m_psrlq(*(__m64 *)(v5 + 12), 0x18u), 0i64);
    v43 = v41;
    v44 = v42;
    v45 = _m_pmaddwd(v41, (__m64)qword_A79C28);
    v46 = v43;
    v47 = _m_pmaddwd(v42, (__m64)qword_A79C28);
    v48 = v44;
    v49 = _m_pmaddwd(v43, (__m64)qword_A79C30);
    v50 = _m_pmaddwd(v44, (__m64)qword_A79C30);
    v51 = _m_pmaddwd(v46, (__m64)qword_A79C38);
    v52 = _m_pmaddwd(v48, (__m64)qword_A79C38);
    v53 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v45, v47), _m_punpckhdq(v45, v47)), (__m64)qword_A79C40), 8u);
    v54 = _m_psrad(_m_paddd(_m_paddd(_m_punpckhdq(v49, v51), _m_punpckldq(v49, v51)), (__m64)qword_A79C48), 8u);
    v55 = _m_psrad(_m_paddd(_m_paddd(_m_punpckhdq(v50, v52), _m_punpckldq(v50, v52)), (__m64)qword_A79C48), 8u);
    v56 = _m_punpcklwd(_m_packssdw(v54, v54), _m_packssdw(v55, v55));
    v57 = _m_punpcklbw(*(__m64 *)(v5 + 18), 0i64);
    v58 = _m_punpcklbw(_m_psrlq(*(__m64 *)(v5 + 18), 0x18u), 0i64);
    v59 = _m_pmaddwd(v57, (__m64)qword_A79C28);
    v60 = _m_pmaddwd(v58, (__m64)qword_A79C28);
    v61 = v58;
    v62 = _m_paddd(_m_punpckhdq(v59, v60), _m_punpckldq(v59, v60));
    v63 = v57;
    v64 = _m_pmaddwd(v57, (__m64)qword_A79C30);
    v65 = _m_pmaddwd(v58, (__m64)qword_A79C30);
    v66 = _m_psrad(_m_psubd(v62, (__m64)qword_A79C40), 8u);
    v67 = _m_pmaddwd(v63, (__m64)qword_A79C38);
    v68 = _m_pmaddwd(v61, (__m64)qword_A79C38);
    *(__m64 *)(v6 + 8) = _m_punpckldq(_m_packssdw(v53, v53), _m_packssdw(v66, v66));
    v69 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v64, v67), _m_punpckhdq(v64, v67)), (__m64)qword_A79C48), 8u);
    v70 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v65, v68), _m_punpckhdq(v65, v68)), (__m64)qword_A79C48), 8u);
    v71 = _m_punpcklwd(_m_packssdw(v69, v69), _m_packssdw(v70, v70));
    v6 += 16;
    *(__m64 *)(v7 + 8) = _m_punpckldq(v56, v71);
    *(__m64 *)(v8 + 8) = _m_punpckhdq(v56, v71);
    v7 += 16;
    v8 += 16;
    v5 += a2;
    --v9;
  }
  while ( v9 );
  return v73;
}
// A79C28: using guessed type __int64 qword_A79C28;
// A79C30: using guessed type __int64 qword_A79C30;
// A79C38: using guessed type __int64 qword_A79C38;
// A79C40: using guessed type __int64 qword_A79C40;
// A79C48: using guessed type __int64 qword_A79C48;

//----- (0079B500) --------------------------------------------------------
void __cdecl __spoils<ecx> own_rgba_fpx_to_ycbcra_fpx_1111_full_mcu_m5(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // esi@1
  int v6; // edi@1
  int v7; // eax@1
  int v8; // ebx@1
  signed int v9; // ecx@1
  __m64 *v10; // edx@1
  __m64 v11; // mm1@2
  __m64 v12; // mm3@2
  __m64 v13; // mm2@2
  __m64 v14; // mm4@2
  __m64 v15; // mm7@2
  __m64 v16; // mm0@2
  __m64 v17; // mm7@2
  __m64 v18; // mm0@2
  __m64 v19; // mm2@2
  __m64 v20; // mm4@2
  __m64 v21; // mm7@2
  __m64 v22; // mm2@2
  __m64 v23; // mm0@2
  __m64 v24; // mm4@2
  __m64 v25; // mm5@2
  __m64 v26; // mm1@2
  __m64 v27; // mm3@2
  __m64 v28; // mm7@2
  __m64 v29; // mm2@2
  __m64 v30; // mm0@2
  __m64 v31; // mm4@2
  __m64 v32; // mm7@2
  __m64 v33; // mm0@2
  __m64 v34; // mm5@2
  __m64 v35; // mm6@2
  __m64 v36; // mm2@2
  __m64 v37; // mm4@2
  __m64 v38; // mm1@2
  __m64 v39; // mm3@2
  __m64 v40; // mm5@2
  __m64 v41; // mm6@2
  __m64 v42; // mm1@2
  __m64 v43; // mm3@2
  __m64 v44; // mm6@2
  __m64 v45; // mm1@2
  __m64 v46; // mm7@2
  __m64 v47; // mm5@2
  __m64 v48; // mm6@2
  __m64 v49; // mm0@2
  __m64 v50; // mm7@2
  __m64 v51; // mm5@2
  __m64 v52; // mm6@2
  __m64 v53; // mm5@2
  __m64 v54; // mm1@2
  __m64 v55; // mm3@2
  __m64 v56; // mm2@2
  __m64 v57; // mm4@2
  __m64 v58; // mm7@2
  __m64 v59; // mm0@2
  __m64 v60; // mm7@2
  __m64 v61; // mm0@2
  __m64 v62; // mm2@2
  __m64 v63; // mm4@2
  __m64 v64; // mm7@2
  __m64 v65; // mm0@2
  __m64 v66; // mm2@2
  __m64 v67; // mm4@2
  __m64 v68; // mm5@2
  __m64 v69; // mm1@2
  __m64 v70; // mm3@2
  __m64 v71; // mm7@2
  __m64 v72; // mm2@2
  __m64 v73; // mm0@2
  __m64 v74; // mm4@2
  __m64 v75; // mm7@2
  __m64 v76; // mm0@2
  __m64 v77; // mm5@2
  __m64 v78; // mm6@2
  __m64 v79; // mm2@2
  __m64 v80; // mm4@2
  __m64 v81; // mm1@2
  __m64 v82; // mm3@2
  __m64 v83; // mm5@2
  __m64 v84; // mm6@2
  __m64 v85; // mm1@2
  __m64 v86; // mm3@2
  __m64 v87; // mm5@2
  __m64 v88; // mm6@2
  __m64 v89; // mm1@2
  __m64 v90; // mm0@2
  __m64 v91; // mm7@2
  __m64 v92; // mm5@2
  __m64 v93; // mm6@2
  __m64 v94; // mm0@2
  __m64 v95; // mm7@2
  __m64 v96; // mm5@2
  __m64 v97; // mm6@2
  __m64 v98; // mm5@2
  char v99; // [sp+20h] [bp-20h]@1

  v5 = a1;
  v6 = a3;
  v7 = a4;
  v8 = a5;
  v9 = 8;
  v10 = (__m64 *)((unsigned int)&v99 & 0xFFFFFFE0);
  do
  {
    v11 = *(__m64 *)v5;
    v12 = *(__m64 *)(v5 + 8);
    v13 = _m_psubd(_m_psrlq(_m_pand(*(__m64 *)v5, (__m64)qword_A79C70), 0x18u), (__m64)qword_A79C48);
    v14 = _m_psubd(_m_psrlq(_m_pand(*(__m64 *)(v5 + 8), (__m64)qword_A79C70), 0x18u), (__m64)qword_A79C48);
    v15.m64_u64 = qword_A79C68;
    *(__m64 *)(v6 + 384) = _m_punpckldq(_m_packssdw(v13, v13), _m_packssdw(v14, v14));
    v16 = v15;
    v17 = _m_psubusb(v15, v11);
    v18 = _m_psubusb(v16, v12);
    v19 = _m_psrlq(v17, 0x20u);
    v20 = _m_psrlq(v18, 0x20u);
    v21 = _m_punpcklbw(v17, 0i64);
    v22 = _m_punpcklbw(v19, 0i64);
    v23 = _m_punpcklbw(v18, 0i64);
    v24 = _m_punpcklbw(v20, 0i64);
    v25.m64_u64 = qword_A79C10;
    v26 = v21;
    v27 = v22;
    v10->m64_u64 = (unsigned __int64)v23;
    *(__m64 *)(((unsigned int)&v99 & 0xFFFFFFE0) + 8) = v24;
    v28 = _m_pmaddwd(v21, v25);
    v29 = _m_pmaddwd(v22, v25);
    v30 = _m_pmaddwd(v23, v25);
    v31 = _m_pmaddwd(v24, v25);
    v32 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v28, v29), _m_punpckhdq(v28, v29)), (__m64)qword_A79C40), 8u);
    v33 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v30, v31), _m_punpckhdq(v30, v31)), (__m64)qword_A79C40), 8u);
    v34 = v26;
    v35 = v27;
    v36.m64_u64 = qword_A79C18;
    v37.m64_u64 = qword_A79C20;
    *(__m64 *)v6 = _m_punpckldq(_m_packssdw(v32, v32), _m_packssdw(v33, v33));
    v38 = _m_pmaddwd(v26, v36);
    v39 = _m_pmaddwd(v27, v36);
    v40 = _m_pmaddwd(v34, v37);
    v41 = _m_pmaddwd(v35, v37);
    v42 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v38, v40), _m_punpckhdq(v38, v40)), (__m64)qword_A79C48), 8u);
    v43 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v39, v41), _m_punpckhdq(v39, v41)), (__m64)qword_A79C48), 8u);
    v44 = *(__m64 *)(((unsigned int)&v99 & 0xFFFFFFE0) + 8);
    v45 = _m_punpcklwd(_m_packssdw(v42, v42), _m_packssdw(v43, v43));
    v46 = v44;
    v47 = _m_pmaddwd((__m64)v10->m64_u64, v36);
    v48 = _m_pmaddwd(v44, v36);
    v49 = _m_pmaddwd((__m64)v10->m64_u64, v37);
    v50 = _m_pmaddwd(v46, v37);
    v51 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v47, v49), _m_punpckhdq(v47, v49)), (__m64)qword_A79C48), 8u);
    v52 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v48, v50), _m_punpckhdq(v48, v50)), (__m64)qword_A79C48), 8u);
    v53 = _m_punpcklwd(_m_packssdw(v51, v51), _m_packssdw(v52, v52));
    *(__m64 *)v7 = _m_punpckldq(v45, v53);
    *(__m64 *)v8 = _m_punpckhdq(v45, v53);
    v54 = *(__m64 *)(v5 + 16);
    v55 = *(__m64 *)(v5 + 24);
    v56 = _m_psubd(_m_psrlq(_m_pand(*(__m64 *)(v5 + 16), (__m64)qword_A79C70), 0x18u), (__m64)qword_A79C48);
    v57 = _m_psubd(_m_psrlq(_m_pand(*(__m64 *)(v5 + 24), (__m64)qword_A79C70), 0x18u), (__m64)qword_A79C48);
    v58.m64_u64 = qword_A79C68;
    *(__m64 *)(v6 + 392) = _m_punpckldq(_m_packssdw(v56, v56), _m_packssdw(v57, v57));
    v59 = v58;
    v60 = _m_psubusb(v58, v54);
    v61 = _m_psubusb(v59, v55);
    v62 = _m_psrlq(v60, 0x20u);
    v63 = _m_psrlq(v61, 0x20u);
    v64 = _m_punpcklbw(v60, 0i64);
    v65 = _m_punpcklbw(v61, 0i64);
    v66 = _m_punpcklbw(v62, 0i64);
    v67 = _m_punpcklbw(v63, 0i64);
    v68.m64_u64 = qword_A79C10;
    v69 = v64;
    v70 = v66;
    *(__m64 *)(((unsigned int)&v99 & 0xFFFFFFE0) + 0x10) = v65;
    *(__m64 *)(((unsigned int)&v99 & 0xFFFFFFE0) + 0x18) = v67;
    v71 = _m_pmaddwd(v64, v68);
    v72 = _m_pmaddwd(v66, v68);
    v73 = _m_pmaddwd(v65, v68);
    v74 = _m_pmaddwd(v67, v68);
    v75 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v71, v72), _m_punpckhdq(v71, v72)), (__m64)qword_A79C40), 8u);
    v76 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v73, v74), _m_punpckhdq(v73, v74)), (__m64)qword_A79C40), 8u);
    v77 = v69;
    v78 = v70;
    v79.m64_u64 = qword_A79C18;
    v80.m64_u64 = qword_A79C20;
    *(__m64 *)(v6 + 8) = _m_punpckldq(_m_packssdw(v75, v75), _m_packssdw(v76, v76));
    v81 = _m_pmaddwd(v69, v79);
    v82 = _m_pmaddwd(v70, v79);
    v83 = _m_pmaddwd(v77, v80);
    v84 = _m_pmaddwd(v78, v80);
    v85 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v81, v83), _m_punpckhdq(v81, v83)), (__m64)qword_A79C48), 8u);
    v86 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v82, v84), _m_punpckhdq(v82, v84)), (__m64)qword_A79C48), 8u);
    v87 = *(__m64 *)(((unsigned int)&v99 & 0xFFFFFFE0) + 0x10);
    v88 = *(__m64 *)(((unsigned int)&v99 & 0xFFFFFFE0) + 0x18);
    v89 = _m_punpcklwd(_m_packssdw(v85, v85), _m_packssdw(v86, v86));
    v90 = v87;
    v91 = v88;
    v92 = _m_pmaddwd(v87, v79);
    v93 = _m_pmaddwd(v88, v79);
    v94 = _m_pmaddwd(v90, v80);
    v95 = _m_pmaddwd(v91, v80);
    v96 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v92, v94), _m_punpckhdq(v92, v94)), (__m64)qword_A79C48), 8u);
    v97 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v93, v95), _m_punpckhdq(v93, v95)), (__m64)qword_A79C48), 8u);
    v98 = _m_punpcklwd(_m_packssdw(v96, v96), _m_packssdw(v97, v97));
    v6 += 16;
    v5 += a2;
    *(__m64 *)(v7 + 8) = _m_punpckldq(v89, v98);
    *(__m64 *)(v8 + 8) = _m_punpckhdq(v89, v98);
    v7 += 16;
    v8 += 16;
    --v9;
  }
  while ( v9 );
}
// A79C10: using guessed type __int64 qword_A79C10;
// A79C18: using guessed type __int64 qword_A79C18;
// A79C20: using guessed type __int64 qword_A79C20;
// A79C40: using guessed type __int64 qword_A79C40;
// A79C48: using guessed type __int64 qword_A79C48;
// A79C68: using guessed type __int64 qword_A79C68;
// A79C70: using guessed type __int64 qword_A79C70;

//----- (0079B840) --------------------------------------------------------
void __cdecl __spoils<ecx> own_rgb_to_ycbcr_422_full_mcu_m5(int a1, int a2, int a3, __m64 *a4, unsigned __int64 *a5)
{
  int v5; // esi@1
  int v6; // edi@1
  __m64 *v7; // eax@1
  unsigned __int64 *v8; // ebx@1
  __m64 *v9; // edx@1
  signed int v10; // ecx@1
  __m64 v11; // mm0@2
  __m64 v12; // mm2@2
  __m64 v13; // mm1@2
  __m64 v14; // mm3@2
  __m64 v15; // mm4@2
  __m64 v16; // mm0@2
  __m64 v17; // mm5@2
  __m64 v18; // mm2@2
  __m64 v19; // mm4@2
  __m64 v20; // mm1@2
  __m64 v21; // mm5@2
  __m64 v22; // mm3@2
  __m64 v23; // mm0@2
  __m64 v24; // mm2@2
  __m64 v25; // mm1@2
  __m64 v26; // mm3@2
  __m64 v27; // mm0@2
  __m64 v28; // mm2@2
  __m64 v29; // mm4@2
  __m64 v30; // mm5@2
  __m64 v31; // mm1@2
  __m64 v32; // mm3@2
  __m64 v33; // mm2@2
  __m64 v34; // mm0@2
  __m64 v35; // mm4@2
  __m64 v36; // mm5@2
  __m64 v37; // mm2@2
  __m64 v38; // mm0@2
  __m64 v39; // mm7@2
  __m64 v40; // mm1@2
  __m64 v41; // mm3@2
  __m64 v42; // mm4@2
  __m64 v43; // mm5@2
  __m64 v44; // mm1@2
  __m64 v45; // mm3@2
  __m64 v46; // mm0@2
  __m64 v47; // mm2@2
  __m64 v48; // mm4@2
  __m64 v49; // mm1@2
  __m64 v50; // mm5@2
  __m64 v51; // mm3@2
  __m64 v52; // mm6@2
  __m64 v53; // mm7@2
  __m64 v54; // mm0@2
  __m64 v55; // mm6@2
  __m64 v56; // mm2@2
  __m64 v57; // mm7@2
  __m64 v58; // mm1@2
  __m64 v59; // mm3@2
  __m64 v60; // mm0@2
  __m64 v61; // mm2@2
  __m64 v62; // mm4@2
  __m64 v63; // mm5@2
  __m64 v64; // mm1@2
  __m64 v65; // mm3@2
  __m64 v66; // mm4@2
  __m64 v67; // mm5@2
  __m64 v68; // mm4@2
  __m64 v69; // mm7@2
  __m64 v70; // mm0@2
  __m64 v71; // mm2@2
  __m64 v72; // mm1@2
  __m64 v73; // mm3@2
  __m64 v74; // mm4@2
  __m64 v75; // mm0@2
  __m64 v76; // mm5@2
  __m64 v77; // mm2@2
  __m64 v78; // mm4@2
  __m64 v79; // mm1@2
  __m64 v80; // mm5@2
  __m64 v81; // mm3@2
  __m64 v82; // mm6@2
  __m64 v83; // mm7@2
  __m64 v84; // mm0@2
  __m64 v85; // mm6@2
  __m64 v86; // mm2@2
  __m64 v87; // mm7@2
  __m64 v88; // mm1@2
  __m64 v89; // mm3@2
  __m64 v90; // mm0@2
  __m64 v91; // mm2@2
  __m64 v92; // mm4@2
  __m64 v93; // mm5@2
  __m64 v94; // mm1@2
  __m64 v95; // mm3@2
  __m64 v96; // mm0@2
  __m64 v97; // mm2@2
  __m64 v98; // mm4@2
  __m64 v99; // mm5@2
  __m64 v100; // mm0@2
  __m64 v101; // mm2@2
  __m64 v102; // mm7@2
  __m64 v103; // mm1@2
  __m64 v104; // mm3@2
  __m64 v105; // mm4@2
  __m64 v106; // mm5@2
  __m64 v107; // mm1@2
  __m64 v108; // mm3@2
  __m64 v109; // mm0@2
  __m64 v110; // mm2@2
  __m64 v111; // mm4@2
  __m64 v112; // mm1@2
  __m64 v113; // mm5@2
  __m64 v114; // mm3@2
  __m64 v115; // mm6@2
  __m64 v116; // mm7@2
  __m64 v117; // mm0@2
  __m64 v118; // mm6@2
  __m64 v119; // mm2@2
  __m64 v120; // mm7@2
  __m64 v121; // mm1@2
  __m64 v122; // mm3@2
  __m64 v123; // mm0@2
  __m64 v124; // mm2@2
  __m64 v125; // mm4@2
  __m64 v126; // mm5@2
  __m64 v127; // mm1@2
  __m64 v128; // mm3@2
  __m64 v129; // mm4@2
  __m64 v130; // mm5@2
  __m64 v131; // mm4@2
  __m64 v132; // mm7@2
  char v133; // [sp+20h] [bp-8h]@1

  v5 = a1;
  v6 = a3;
  v7 = a4;
  v8 = a5;
  v9 = (__m64 *)((unsigned int)&v133 & 0xFFFFFFE0);
  v10 = 8;
  do
  {
    v11 = _m_punpcklbw(*(__m64 *)v5, 0i64);
    v12 = _m_punpcklbw(*(__m64 *)(v5 + 6), 0i64);
    v13 = _m_punpcklbw(_m_psrlq(*(__m64 *)v5, 0x18u), 0i64);
    v14 = _m_punpcklbw(_m_psrlq(*(__m64 *)(v5 + 6), 0x18u), 0i64);
    v15 = v11;
    v16 = _m_pmaddwd(v11, (__m64)qword_A79C10);
    v17 = v12;
    v18 = _m_pmaddwd(v12, (__m64)qword_A79C10);
    v19 = _m_paddw(v15, v13);
    v20 = _m_pmaddwd(v13, (__m64)qword_A79C10);
    v21 = _m_paddw(v17, v14);
    v22 = _m_pmaddwd(v14, (__m64)qword_A79C10);
    v23 = _m_paddd(_m_punpckldq(v16, v20), _m_punpckhdq(v16, v20));
    v24 = _m_paddd(_m_punpckldq(v18, v22), _m_punpckhdq(v18, v22));
    v25 = v19;
    v26 = v21;
    v27 = _m_psrad(_m_psubd(v23, (__m64)qword_A79C40), 8u);
    v28 = _m_psrad(_m_psubd(v24, (__m64)qword_A79C40), 8u);
    v29 = _m_pmaddwd(v19, (__m64)qword_A79C18);
    v30 = _m_pmaddwd(v21, (__m64)qword_A79C18);
    v31 = _m_pmaddwd(v25, (__m64)qword_A79C20);
    v32 = _m_pmaddwd(v26, (__m64)qword_A79C20);
    *(__m64 *)v6 = _m_punpckldq(_m_packssdw(v27, v27), _m_packssdw(v28, v28));
    v33 = _m_paddd(_m_paddd(_m_punpckhdq(v30, v32), _m_punpckldq(v30, v32)), (__m64)qword_A79C50);
    v34 = _m_paddd(_m_paddd(_m_punpckhdq(v29, v31), _m_punpckldq(v29, v31)), (__m64)qword_A79C50);
    v35 = *(__m64 *)(v5 + 12);
    v36 = *(__m64 *)(v5 + 18);
    v37 = _m_psrad(v33, 9u);
    v38 = _m_psrad(v34, 9u);
    v39.m64_u64 = qword_A79C10;
    v40 = _m_psrlq(*(__m64 *)(v5 + 12), 0x18u);
    v41 = _m_psrlq(*(__m64 *)(v5 + 18), 0x18u);
    v9->m64_u64 = (unsigned __int64)_m_punpcklwd(_m_packssdw(v38, v38), _m_packssdw(v37, v37));
    v42 = _m_punpcklbw(v35, 0i64);
    v43 = _m_punpcklbw(v36, 0i64);
    v44 = _m_punpcklbw(v40, 0i64);
    v45 = _m_punpcklbw(v41, 0i64);
    v46 = _m_pmaddwd(v42, v39);
    v47 = _m_pmaddwd(v43, v39);
    v48 = _m_paddw(v42, v44);
    v49 = _m_pmaddwd(v44, v39);
    v50 = _m_paddw(v43, v45);
    v51 = _m_pmaddwd(v45, v39);
    v52 = v46;
    v53 = v47;
    v54 = _m_punpckldq(v46, v49);
    v55 = _m_punpckhdq(v52, v49);
    v56 = _m_punpckldq(v47, v51);
    v57 = _m_punpckhdq(v53, v51);
    v58 = v48;
    v59 = v50;
    v60 = _m_psrad(_m_psubd(_m_paddd(v54, v55), (__m64)qword_A79C40), 8u);
    v61 = _m_psrad(_m_psubd(_m_paddd(v56, v57), (__m64)qword_A79C40), 8u);
    v62 = _m_pmaddwd(v48, (__m64)qword_A79C18);
    v63 = _m_pmaddwd(v50, (__m64)qword_A79C18);
    v64 = _m_pmaddwd(v58, (__m64)qword_A79C20);
    v65 = _m_pmaddwd(v59, (__m64)qword_A79C20);
    *(__m64 *)(v6 + 8) = _m_punpckldq(_m_packssdw(v60, v60), _m_packssdw(v61, v61));
    v66 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v62, v64), _m_punpckhdq(v62, v64)), (__m64)qword_A79C50), 9u);
    v67 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v63, v65), _m_punpckhdq(v63, v65)), (__m64)qword_A79C50), 9u);
    v68 = _m_punpcklwd(_m_packssdw(v66, v66), _m_packssdw(v67, v67));
    v69 = _m_punpckhdq((__m64)v9->m64_u64, v68);
    v7->m64_u64 = (unsigned __int64)_m_punpckldq((__m64)v9->m64_u64, v68);
    *v8 = v69.m64_u64;
    v70 = _m_punpcklbw(*(__m64 *)(v5 + 24), 0i64);
    v71 = _m_punpcklbw(*(__m64 *)(v5 + 30), 0i64);
    v72 = _m_punpcklbw(_m_psrlq(*(__m64 *)(v5 + 24), 0x18u), 0i64);
    v73 = _m_punpcklbw(_m_psrlq(*(__m64 *)(v5 + 30), 0x18u), 0i64);
    v74 = v70;
    v75 = _m_pmaddwd(v70, (__m64)qword_A79C10);
    v76 = v71;
    v77 = _m_pmaddwd(v71, (__m64)qword_A79C10);
    v78 = _m_paddw(v74, v72);
    v79 = _m_pmaddwd(v72, (__m64)qword_A79C10);
    v80 = _m_paddw(v76, v73);
    v81 = _m_pmaddwd(v73, (__m64)qword_A79C10);
    v82 = v75;
    v83 = v77;
    v84 = _m_punpckldq(v75, v79);
    v85 = _m_punpckhdq(v82, v79);
    v86 = _m_punpckldq(v77, v81);
    v87 = _m_punpckhdq(v83, v81);
    v88 = v78;
    v89 = v80;
    v90 = _m_psrad(_m_psubd(_m_paddd(v84, v85), (__m64)qword_A79C40), 8u);
    v91 = _m_psrad(_m_psubd(_m_paddd(v86, v87), (__m64)qword_A79C40), 8u);
    v92 = _m_pmaddwd(v78, (__m64)qword_A79C18);
    v93 = _m_pmaddwd(v80, (__m64)qword_A79C18);
    v94 = _m_pmaddwd(v88, (__m64)qword_A79C20);
    v95 = _m_pmaddwd(v89, (__m64)qword_A79C20);
    *(__m64 *)(v6 + 128) = _m_punpckldq(_m_packssdw(v90, v90), _m_packssdw(v91, v91));
    v96 = _m_paddd(_m_paddd(_m_punpckhdq(v92, v94), _m_punpckldq(v92, v94)), (__m64)qword_A79C50);
    v97 = _m_paddd(_m_paddd(_m_punpckhdq(v93, v95), _m_punpckldq(v93, v95)), (__m64)qword_A79C50);
    v98 = *(__m64 *)(v5 + 36);
    v99 = *(__m64 *)(v5 + 42);
    v100 = _m_psrad(v96, 9u);
    v101 = _m_psrad(v97, 9u);
    v102.m64_u64 = qword_A79C10;
    v103 = _m_psrlq(*(__m64 *)(v5 + 36), 0x18u);
    v104 = _m_psrlq(*(__m64 *)(v5 + 42), 0x18u);
    v9->m64_u64 = (unsigned __int64)_m_punpcklwd(_m_packssdw(v100, v100), _m_packssdw(v101, v101));
    v105 = _m_punpcklbw(v98, 0i64);
    v106 = _m_punpcklbw(v99, 0i64);
    v107 = _m_punpcklbw(v103, 0i64);
    v108 = _m_punpcklbw(v104, 0i64);
    v109 = _m_pmaddwd(v105, v102);
    v110 = _m_pmaddwd(v106, v102);
    v111 = _m_paddw(v105, v107);
    v112 = _m_pmaddwd(v107, v102);
    v113 = _m_paddw(v106, v108);
    v114 = _m_pmaddwd(v108, v102);
    v115 = v109;
    v116 = v110;
    v117 = _m_punpckldq(v109, v112);
    v118 = _m_punpckhdq(v115, v112);
    v119 = _m_punpckldq(v110, v114);
    v120 = _m_punpckhdq(v116, v114);
    v121 = v111;
    v122 = v113;
    v123 = _m_psrad(_m_psubd(_m_paddd(v117, v118), (__m64)qword_A79C40), 8u);
    v124 = _m_psrad(_m_psubd(_m_paddd(v119, v120), (__m64)qword_A79C40), 8u);
    v125 = _m_pmaddwd(v111, (__m64)qword_A79C18);
    v126 = _m_pmaddwd(v113, (__m64)qword_A79C18);
    v127 = _m_pmaddwd(v121, (__m64)qword_A79C20);
    v128 = _m_pmaddwd(v122, (__m64)qword_A79C20);
    v5 += a2;
    *(__m64 *)(v6 + 136) = _m_punpckldq(_m_packssdw(v123, v123), _m_packssdw(v124, v124));
    v129 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v125, v127), _m_punpckhdq(v125, v127)), (__m64)qword_A79C50), 9u);
    v130 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v126, v128), _m_punpckhdq(v126, v128)), (__m64)qword_A79C50), 9u);
    v131 = _m_punpcklwd(_m_packssdw(v129, v129), _m_packssdw(v130, v130));
    v6 += 16;
    v7 += 2;
    v132 = _m_punpckhdq((__m64)v9->m64_u64, v131);
    v8 += 2;
    v7[-1].m64_u64 = (unsigned __int64)_m_punpckldq((__m64)v9->m64_u64, v131);
    *(v8 - 1) = v132.m64_u64;
    --v10;
  }
  while ( v10 );
}
// A79C10: using guessed type __int64 qword_A79C10;
// A79C18: using guessed type __int64 qword_A79C18;
// A79C20: using guessed type __int64 qword_A79C20;
// A79C40: using guessed type __int64 qword_A79C40;
// A79C50: using guessed type __int64 qword_A79C50;

//----- (0079BC10) --------------------------------------------------------
void __cdecl __spoils<ecx> own_bgr_to_ycbcr_422_full_mcu_m5(int a1, int a2, int a3, __m64 *a4, unsigned __int64 *a5)
{
  int v5; // esi@1
  int v6; // edi@1
  __m64 *v7; // eax@1
  unsigned __int64 *v8; // ebx@1
  __m64 *v9; // edx@1
  signed int v10; // ecx@1
  __m64 v11; // mm0@2
  __m64 v12; // mm2@2
  __m64 v13; // mm1@2
  __m64 v14; // mm3@2
  __m64 v15; // mm4@2
  __m64 v16; // mm0@2
  __m64 v17; // mm5@2
  __m64 v18; // mm2@2
  __m64 v19; // mm4@2
  __m64 v20; // mm1@2
  __m64 v21; // mm5@2
  __m64 v22; // mm3@2
  __m64 v23; // mm0@2
  __m64 v24; // mm2@2
  __m64 v25; // mm1@2
  __m64 v26; // mm3@2
  __m64 v27; // mm0@2
  __m64 v28; // mm2@2
  __m64 v29; // mm4@2
  __m64 v30; // mm5@2
  __m64 v31; // mm1@2
  __m64 v32; // mm3@2
  __m64 v33; // mm2@2
  __m64 v34; // mm0@2
  __m64 v35; // mm4@2
  __m64 v36; // mm5@2
  __m64 v37; // mm2@2
  __m64 v38; // mm0@2
  __m64 v39; // mm7@2
  __m64 v40; // mm1@2
  __m64 v41; // mm3@2
  __m64 v42; // mm4@2
  __m64 v43; // mm5@2
  __m64 v44; // mm1@2
  __m64 v45; // mm3@2
  __m64 v46; // mm0@2
  __m64 v47; // mm2@2
  __m64 v48; // mm4@2
  __m64 v49; // mm1@2
  __m64 v50; // mm5@2
  __m64 v51; // mm3@2
  __m64 v52; // mm6@2
  __m64 v53; // mm7@2
  __m64 v54; // mm0@2
  __m64 v55; // mm6@2
  __m64 v56; // mm2@2
  __m64 v57; // mm7@2
  __m64 v58; // mm1@2
  __m64 v59; // mm3@2
  __m64 v60; // mm0@2
  __m64 v61; // mm2@2
  __m64 v62; // mm4@2
  __m64 v63; // mm5@2
  __m64 v64; // mm1@2
  __m64 v65; // mm3@2
  __m64 v66; // mm4@2
  __m64 v67; // mm5@2
  __m64 v68; // mm4@2
  __m64 v69; // mm7@2
  __m64 v70; // mm0@2
  __m64 v71; // mm2@2
  __m64 v72; // mm1@2
  __m64 v73; // mm3@2
  __m64 v74; // mm4@2
  __m64 v75; // mm0@2
  __m64 v76; // mm5@2
  __m64 v77; // mm2@2
  __m64 v78; // mm4@2
  __m64 v79; // mm1@2
  __m64 v80; // mm5@2
  __m64 v81; // mm3@2
  __m64 v82; // mm0@2
  __m64 v83; // mm2@2
  __m64 v84; // mm1@2
  __m64 v85; // mm3@2
  __m64 v86; // mm0@2
  __m64 v87; // mm2@2
  __m64 v88; // mm4@2
  __m64 v89; // mm5@2
  __m64 v90; // mm1@2
  __m64 v91; // mm3@2
  __m64 v92; // mm2@2
  __m64 v93; // mm0@2
  __m64 v94; // mm4@2
  __m64 v95; // mm5@2
  __m64 v96; // mm2@2
  __m64 v97; // mm0@2
  __m64 v98; // mm7@2
  __m64 v99; // mm1@2
  __m64 v100; // mm3@2
  __m64 v101; // mm4@2
  __m64 v102; // mm5@2
  __m64 v103; // mm1@2
  __m64 v104; // mm3@2
  __m64 v105; // mm0@2
  __m64 v106; // mm2@2
  __m64 v107; // mm4@2
  __m64 v108; // mm1@2
  __m64 v109; // mm5@2
  __m64 v110; // mm3@2
  __m64 v111; // mm6@2
  __m64 v112; // mm7@2
  __m64 v113; // mm0@2
  __m64 v114; // mm6@2
  __m64 v115; // mm2@2
  __m64 v116; // mm7@2
  __m64 v117; // mm1@2
  __m64 v118; // mm3@2
  __m64 v119; // mm0@2
  __m64 v120; // mm2@2
  __m64 v121; // mm4@2
  __m64 v122; // mm5@2
  __m64 v123; // mm1@2
  __m64 v124; // mm3@2
  __m64 v125; // mm4@2
  __m64 v126; // mm5@2
  __m64 v127; // mm4@2
  __m64 v128; // mm7@2
  char v129; // [sp+20h] [bp-8h]@1

  v5 = a1;
  v6 = a3;
  v7 = a4;
  v8 = a5;
  v9 = (__m64 *)((unsigned int)&v129 & 0xFFFFFFE0);
  v10 = 8;
  do
  {
    v11 = _m_punpcklbw(*(__m64 *)v5, 0i64);
    v12 = _m_punpcklbw(*(__m64 *)(v5 + 6), 0i64);
    v13 = _m_punpcklbw(_m_psrlq(*(__m64 *)v5, 0x18u), 0i64);
    v14 = _m_punpcklbw(_m_psrlq(*(__m64 *)(v5 + 6), 0x18u), 0i64);
    v15 = v11;
    v16 = _m_pmaddwd(v11, (__m64)qword_A79C28);
    v17 = v12;
    v18 = _m_pmaddwd(v12, (__m64)qword_A79C28);
    v19 = _m_paddw(v15, v13);
    v20 = _m_pmaddwd(v13, (__m64)qword_A79C28);
    v21 = _m_paddw(v17, v14);
    v22 = _m_pmaddwd(v14, (__m64)qword_A79C28);
    v23 = _m_paddd(_m_punpckldq(v16, v20), _m_punpckhdq(v16, v20));
    v24 = _m_paddd(_m_punpckldq(v18, v22), _m_punpckhdq(v18, v22));
    v25 = v19;
    v26 = v21;
    v27 = _m_psrad(_m_psubd(v23, (__m64)qword_A79C40), 8u);
    v28 = _m_psrad(_m_psubd(v24, (__m64)qword_A79C40), 8u);
    v29 = _m_pmaddwd(v19, (__m64)qword_A79C30);
    v30 = _m_pmaddwd(v21, (__m64)qword_A79C30);
    v31 = _m_pmaddwd(v25, (__m64)qword_A79C38);
    v32 = _m_pmaddwd(v26, (__m64)qword_A79C38);
    *(__m64 *)v6 = _m_punpckldq(_m_packssdw(v27, v27), _m_packssdw(v28, v28));
    v33 = _m_paddd(_m_paddd(_m_punpckhdq(v30, v32), _m_punpckldq(v30, v32)), (__m64)qword_A79C50);
    v34 = _m_paddd(_m_paddd(_m_punpckhdq(v29, v31), _m_punpckldq(v29, v31)), (__m64)qword_A79C50);
    v35 = *(__m64 *)(v5 + 12);
    v36 = *(__m64 *)(v5 + 18);
    v37 = _m_psrad(v33, 9u);
    v38 = _m_psrad(v34, 9u);
    v39.m64_u64 = qword_A79C28;
    v40 = _m_psrlq(*(__m64 *)(v5 + 12), 0x18u);
    v41 = _m_psrlq(*(__m64 *)(v5 + 18), 0x18u);
    v9->m64_u64 = (unsigned __int64)_m_punpcklwd(_m_packssdw(v38, v38), _m_packssdw(v37, v37));
    v42 = _m_punpcklbw(v35, 0i64);
    v43 = _m_punpcklbw(v36, 0i64);
    v44 = _m_punpcklbw(v40, 0i64);
    v45 = _m_punpcklbw(v41, 0i64);
    v46 = _m_pmaddwd(v42, v39);
    v47 = _m_pmaddwd(v43, v39);
    v48 = _m_paddw(v42, v44);
    v49 = _m_pmaddwd(v44, v39);
    v50 = _m_paddw(v43, v45);
    v51 = _m_pmaddwd(v45, v39);
    v52 = v46;
    v53 = v47;
    v54 = _m_punpckldq(v46, v49);
    v55 = _m_punpckhdq(v52, v49);
    v56 = _m_punpckldq(v47, v51);
    v57 = _m_punpckhdq(v53, v51);
    v58 = v48;
    v59 = v50;
    v60 = _m_psrad(_m_psubd(_m_paddd(v54, v55), (__m64)qword_A79C40), 8u);
    v61 = _m_psrad(_m_psubd(_m_paddd(v56, v57), (__m64)qword_A79C40), 8u);
    v62 = _m_pmaddwd(v48, (__m64)qword_A79C30);
    v63 = _m_pmaddwd(v50, (__m64)qword_A79C30);
    v64 = _m_pmaddwd(v58, (__m64)qword_A79C38);
    v65 = _m_pmaddwd(v59, (__m64)qword_A79C38);
    *(__m64 *)(v6 + 8) = _m_punpckldq(_m_packssdw(v60, v60), _m_packssdw(v61, v61));
    v66 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v62, v64), _m_punpckhdq(v62, v64)), (__m64)qword_A79C50), 9u);
    v67 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v63, v65), _m_punpckhdq(v63, v65)), (__m64)qword_A79C50), 9u);
    v68 = _m_punpcklwd(_m_packssdw(v66, v66), _m_packssdw(v67, v67));
    v69 = _m_punpckhdq((__m64)v9->m64_u64, v68);
    v7->m64_u64 = (unsigned __int64)_m_punpckldq((__m64)v9->m64_u64, v68);
    *v8 = v69.m64_u64;
    v70 = _m_punpcklbw(*(__m64 *)(v5 + 24), 0i64);
    v71 = _m_punpcklbw(*(__m64 *)(v5 + 30), 0i64);
    v72 = _m_punpcklbw(_m_psrlq(*(__m64 *)(v5 + 24), 0x18u), 0i64);
    v73 = _m_punpcklbw(_m_psrlq(*(__m64 *)(v5 + 30), 0x18u), 0i64);
    v74 = v70;
    v75 = _m_pmaddwd(v70, (__m64)qword_A79C28);
    v76 = v71;
    v77 = _m_pmaddwd(v71, (__m64)qword_A79C28);
    v78 = _m_paddw(v74, v72);
    v79 = _m_pmaddwd(v72, (__m64)qword_A79C28);
    v80 = _m_paddw(v76, v73);
    v81 = _m_pmaddwd(v73, (__m64)qword_A79C28);
    v82 = _m_paddd(_m_punpckldq(v75, v79), _m_punpckhdq(v75, v79));
    v83 = _m_paddd(_m_punpckldq(v77, v81), _m_punpckhdq(v77, v81));
    v84 = v78;
    v85 = v80;
    v86 = _m_psrad(_m_psubd(v82, (__m64)qword_A79C40), 8u);
    v87 = _m_psrad(_m_psubd(v83, (__m64)qword_A79C40), 8u);
    v88 = _m_pmaddwd(v78, (__m64)qword_A79C30);
    v89 = _m_pmaddwd(v80, (__m64)qword_A79C30);
    v90 = _m_pmaddwd(v84, (__m64)qword_A79C38);
    v91 = _m_pmaddwd(v85, (__m64)qword_A79C38);
    *(__m64 *)(v6 + 128) = _m_punpckldq(_m_packssdw(v86, v86), _m_packssdw(v87, v87));
    v92 = _m_paddd(_m_paddd(_m_punpckhdq(v89, v91), _m_punpckldq(v89, v91)), (__m64)qword_A79C50);
    v93 = _m_paddd(_m_paddd(_m_punpckhdq(v88, v90), _m_punpckldq(v88, v90)), (__m64)qword_A79C50);
    v94 = *(__m64 *)(v5 + 36);
    v95 = *(__m64 *)(v5 + 42);
    v96 = _m_psrad(v92, 9u);
    v97 = _m_psrad(v93, 9u);
    v98.m64_u64 = qword_A79C28;
    v99 = _m_psrlq(*(__m64 *)(v5 + 36), 0x18u);
    v100 = _m_psrlq(*(__m64 *)(v5 + 42), 0x18u);
    v9->m64_u64 = (unsigned __int64)_m_punpcklwd(_m_packssdw(v97, v97), _m_packssdw(v96, v96));
    v101 = _m_punpcklbw(v94, 0i64);
    v102 = _m_punpcklbw(v95, 0i64);
    v103 = _m_punpcklbw(v99, 0i64);
    v104 = _m_punpcklbw(v100, 0i64);
    v105 = _m_pmaddwd(v101, v98);
    v106 = _m_pmaddwd(v102, v98);
    v107 = _m_paddw(v101, v103);
    v108 = _m_pmaddwd(v103, v98);
    v109 = _m_paddw(v102, v104);
    v110 = _m_pmaddwd(v104, v98);
    v111 = v105;
    v112 = v106;
    v113 = _m_punpckldq(v105, v108);
    v114 = _m_punpckhdq(v111, v108);
    v115 = _m_punpckldq(v106, v110);
    v116 = _m_punpckhdq(v112, v110);
    v117 = v107;
    v118 = v109;
    v119 = _m_psrad(_m_psubd(_m_paddd(v113, v114), (__m64)qword_A79C40), 8u);
    v120 = _m_psrad(_m_psubd(_m_paddd(v115, v116), (__m64)qword_A79C40), 8u);
    v121 = _m_pmaddwd(v107, (__m64)qword_A79C30);
    v122 = _m_pmaddwd(v109, (__m64)qword_A79C30);
    v123 = _m_pmaddwd(v117, (__m64)qword_A79C38);
    v124 = _m_pmaddwd(v118, (__m64)qword_A79C38);
    v5 += a2;
    *(__m64 *)(v6 + 136) = _m_punpckldq(_m_packssdw(v119, v119), _m_packssdw(v120, v120));
    v125 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v121, v123), _m_punpckhdq(v121, v123)), (__m64)qword_A79C50), 9u);
    v126 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v122, v124), _m_punpckhdq(v122, v124)), (__m64)qword_A79C50), 9u);
    v127 = _m_punpcklwd(_m_packssdw(v125, v125), _m_packssdw(v126, v126));
    v6 += 16;
    v7 += 2;
    v128 = _m_punpckhdq((__m64)v9->m64_u64, v127);
    v8 += 2;
    v7[-1].m64_u64 = (unsigned __int64)_m_punpckldq((__m64)v9->m64_u64, v127);
    *(v8 - 1) = v128.m64_u64;
    --v10;
  }
  while ( v10 );
}
// A79C28: using guessed type __int64 qword_A79C28;
// A79C30: using guessed type __int64 qword_A79C30;
// A79C38: using guessed type __int64 qword_A79C38;
// A79C40: using guessed type __int64 qword_A79C40;
// A79C50: using guessed type __int64 qword_A79C50;

//----- (0079BFE0) --------------------------------------------------------
int __cdecl __spoils<ecx> own_rgba_fpx_to_ycbcra_fpx_4224_full_mcu_m5(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int v6; // esi@1
  int v7; // edi@1
  int v8; // eax@1
  int v9; // ebx@1
  int v10; // edx@1
  signed int v11; // ecx@1
  __m64 v12; // mm3@2
  __m64 v13; // mm2@2
  __m64 v14; // mm4@2
  __m64 v15; // mm0@2
  __m64 v16; // mm7@2
  __m64 v17; // mm0@2
  __m64 v18; // mm2@2
  __m64 v19; // mm4@2
  __m64 v20; // mm7@2
  __m64 v21; // mm0@2
  __m64 v22; // mm2@2
  __m64 v23; // mm4@2
  __m64 v24; // mm1@2
  __m64 v25; // mm3@2
  __m64 v26; // mm7@2
  __m64 v27; // mm0@2
  __m64 v28; // mm5@2
  __m64 v29; // mm6@2
  __m64 v30; // mm2@2
  __m64 v31; // mm4@2
  __m64 v32; // mm1@2
  __m64 v33; // mm3@2
  __m64 v34; // mm0@2
  __m64 v35; // mm7@2
  __m64 v36; // mm5@2
  __m64 v37; // mm1@2
  __m64 v38; // mm6@2
  __m64 v39; // mm3@2
  __m64 v40; // mm1@2
  __m64 v41; // mm5@2
  __m64 v42; // mm3@2
  __m64 v43; // mm6@2
  __m64 v44; // mm2@2
  __m64 v45; // mm4@2
  __m64 v46; // mm1@2
  __m64 v47; // mm3@2
  __m64 v48; // mm3@2
  __m64 v49; // mm7@2
  __m64 v50; // mm0@2
  __m64 v51; // mm1@2
  __m64 v52; // mm0@2
  __m64 v53; // mm7@2
  __m64 v54; // mm3@2
  __m64 v55; // mm1@2
  __m64 v56; // mm0@2
  __m64 v57; // mm7@2
  __m64 v58; // mm3@2
  __m64 v59; // mm2@2
  __m64 v60; // mm4@2
  __m64 v61; // mm1@2
  __m64 v62; // mm7@2
  __m64 v63; // mm0@2
  __m64 v64; // mm3@2
  __m64 v65; // mm1@2
  __m64 v66; // mm0@2
  __m64 v67; // mm5@2
  __m64 v68; // mm6@2
  __m64 v69; // mm7@2
  __m64 v70; // mm3@2
  __m64 v71; // mm2@2
  __m64 v72; // mm4@2
  __m64 v73; // mm5@2
  __m64 v74; // mm6@2
  __m64 v75; // mm2@2
  __m64 v76; // mm4@2
  __m64 v77; // mm5@2
  __m64 v78; // mm6@2
  __m64 v79; // mm2@2
  __m64 v80; // mm1@2
  __m64 v81; // mm3@2
  __m64 v82; // mm2@2
  __m64 v83; // mm4@2
  __m64 v84; // mm7@2
  __m64 v85; // mm0@2
  __m64 v86; // mm7@2
  __m64 v87; // mm0@2
  __m64 v88; // mm2@2
  __m64 v89; // mm4@2
  __m64 v90; // mm7@2
  __m64 v91; // mm0@2
  __m64 v92; // mm2@2
  __m64 v93; // mm4@2
  __m64 v94; // mm1@2
  __m64 v95; // mm3@2
  __m64 v96; // mm7@2
  __m64 v97; // mm2@2
  __m64 v98; // mm0@2
  __m64 v99; // mm4@2
  __m64 v100; // mm7@2
  __m64 v101; // mm0@2
  __m64 v102; // mm5@2
  __m64 v103; // mm6@2
  __m64 v104; // mm2@2
  __m64 v105; // mm4@2
  __m64 v106; // mm1@2
  __m64 v107; // mm3@2
  __m64 v108; // mm5@2
  __m64 v109; // mm6@2
  __m64 v110; // mm1@2
  __m64 v111; // mm3@2
  __m64 v112; // mm5@2
  __m64 v113; // mm6@2
  __m64 v114; // mm1@2
  __m64 v115; // mm2@2
  __m64 v116; // mm4@2
  __m64 v117; // mm3@2
  __m64 v118; // mm1@2
  __m64 v119; // mm0@2
  __m64 v120; // mm7@2
  __m64 v121; // mm0@2
  __m64 v122; // mm1@2
  __m64 v123; // mm3@2
  __m64 v124; // mm7@2
  __m64 v125; // mm0@2
  __m64 v126; // mm1@2
  __m64 v127; // mm3@2
  __m64 v128; // mm2@2
  __m64 v129; // mm4@2
  __m64 v130; // mm7@2
  __m64 v131; // mm1@2
  __m64 v132; // mm0@2
  __m64 v133; // mm3@2
  __m64 v134; // mm7@2
  __m64 v135; // mm0@2
  __m64 v136; // mm5@2
  __m64 v137; // mm6@2
  __m64 v138; // mm1@2
  __m64 v139; // mm3@2
  __m64 v140; // mm2@2
  __m64 v141; // mm4@2
  __m64 v142; // mm5@2
  __m64 v143; // mm6@2
  __m64 v144; // mm2@2
  __m64 v145; // mm4@2
  __m64 v146; // mm2@2
  int v148; // [sp+4h] [bp-4h]@0

  v6 = a1;
  v7 = a3;
  v8 = a4;
  v9 = a5;
  v10 = a6;
  v11 = 8;
  do
  {
    v12 = *(__m64 *)(v6 + 8);
    v13 = _m_psubd(_m_psrlq(_m_pand(*(__m64 *)v6, (__m64)qword_A79C70), 0x18u), (__m64)qword_A79C48);
    v14 = _m_psubd(_m_psrlq(_m_pand(*(__m64 *)(v6 + 8), (__m64)qword_A79C70), 0x18u), (__m64)qword_A79C48);
    v15.m64_u64 = qword_A79C68;
    v16 = _m_psubusb((__m64)qword_A79C68, *(__m64 *)v6);
    *(__m64 *)v10 = _m_punpckldq(_m_packssdw(v13, v13), _m_packssdw(v14, v14));
    v17 = _m_psubusb(v15, v12);
    v18 = _m_psrlq(v16, 0x20u);
    v19 = _m_psrlq(v17, 0x20u);
    v20 = _m_punpcklbw(v16, 0i64);
    v21 = _m_punpcklbw(v17, 0i64);
    v22 = _m_punpcklbw(v18, 0i64);
    v23 = _m_punpcklbw(v19, 0i64);
    v24 = v20;
    v25 = v21;
    v26 = _m_pmaddwd(v20, (__m64)qword_A79C10);
    v27 = _m_pmaddwd(v21, (__m64)qword_A79C10);
    v28 = v22;
    v29 = v23;
    v30 = _m_pmaddwd(v22, (__m64)qword_A79C10);
    v31 = _m_pmaddwd(v23, (__m64)qword_A79C10);
    v32 = _m_paddw(v24, v28);
    v33 = _m_paddw(v25, v29);
    v34 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v27, v31), _m_punpckhdq(v27, v31)), (__m64)qword_A79C40), 8u);
    v35 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v26, v30), _m_punpckhdq(v26, v30)), (__m64)qword_A79C40), 8u);
    v36 = _m_pmaddwd(v32, (__m64)qword_A79C20);
    v37 = _m_pmaddwd(v32, (__m64)qword_A79C18);
    v38 = _m_pmaddwd(v33, (__m64)qword_A79C20);
    v39 = _m_pmaddwd(v33, (__m64)qword_A79C18);
    *(__m64 *)v7 = _m_punpckldq(_m_packssdw(v35, v35), _m_packssdw(v34, v34));
    v40 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v37, v36), _m_punpckhdq(v37, v36)), (__m64)qword_A79C50), 9u);
    v41.m64_u64 = qword_A79C70;
    v42 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v39, v38), _m_punpckhdq(v39, v38)), (__m64)qword_A79C50), 9u);
    v43.m64_u64 = qword_A79C48;
    v44 = *(__m64 *)(v6 + 16);
    v45 = *(__m64 *)(v6 + 24);
    v46 = _m_punpcklwd(_m_packssdw(v40, v40), _m_packssdw(v42, v42));
    v47 = *(__m64 *)(v6 + 24);
    *(_DWORD *)v8 = _mm_cvtsi64_si32(v46);
    *(_DWORD *)v9 = _mm_cvtsi64_si32(_m_psrlq(v46, 0x20u));
    v48 = _m_psubd(_m_psrlq(_m_pand(v47, v41), 0x18u), v43);
    v49 = _m_psubd(_m_psrlq(_m_pand(v44, v41), 0x18u), v43);
    v50.m64_u64 = qword_A79C68;
    *(__m64 *)(v10 + 8) = _m_punpckldq(_m_packssdw(v49, v49), _m_packssdw(v48, v48));
    v51 = _m_psubusb(v50, v44);
    v52 = _m_psubusb(v50, v45);
    v53 = _m_psrlq(v51, 0x20u);
    v54 = _m_psrlq(v52, 0x20u);
    v55 = _m_punpcklbw(v51, 0i64);
    v56 = _m_punpcklbw(v52, 0i64);
    v57 = _m_punpcklbw(v53, 0i64);
    v58 = _m_punpcklbw(v54, 0i64);
    v59 = _m_paddw(v55, v57);
    v60 = _m_paddw(v56, v58);
    v61 = _m_pmaddwd(v55, (__m64)qword_A79C10);
    v62 = _m_pmaddwd(v57, (__m64)qword_A79C10);
    v63 = _m_pmaddwd(v56, (__m64)qword_A79C10);
    v64 = _m_pmaddwd(v58, (__m64)qword_A79C10);
    v65 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v61, v62), _m_punpckhdq(v61, v62)), (__m64)qword_A79C40), 8u);
    v66 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v63, v64), _m_punpckhdq(v63, v64)), (__m64)qword_A79C40), 8u);
    v67 = v59;
    v68 = v60;
    v69.m64_u64 = qword_A79C18;
    v70.m64_u64 = qword_A79C20;
    *(__m64 *)(v7 + 8) = _m_punpckldq(_m_packssdw(v65, v65), _m_packssdw(v66, v66));
    v71 = _m_pmaddwd(v59, v69);
    v72 = _m_pmaddwd(v60, v69);
    v73 = _m_pmaddwd(v67, v70);
    v74 = _m_pmaddwd(v68, v70);
    v75 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v71, v73), _m_punpckhdq(v71, v73)), (__m64)qword_A79C50), 9u);
    v76 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v72, v74), _m_punpckhdq(v72, v74)), (__m64)qword_A79C50), 9u);
    v77.m64_u64 = qword_A79C70;
    v78.m64_u64 = qword_A79C48;
    v79 = _m_punpcklwd(_m_packssdw(v75, v75), _m_packssdw(v76, v76));
    *(_DWORD *)(v8 + 4) = _mm_cvtsi64_si32(v79);
    *(_DWORD *)(v9 + 4) = _mm_cvtsi64_si32(_m_psrlq(v79, 0x20u));
    v80 = *(__m64 *)(v6 + 32);
    v81 = *(__m64 *)(v6 + 40);
    v82 = _m_psubd(_m_psrlq(_m_pand(*(__m64 *)(v6 + 32), v77), 0x18u), v78);
    v83 = _m_psubd(_m_psrlq(_m_pand(*(__m64 *)(v6 + 40), v77), 0x18u), v78);
    v84.m64_u64 = qword_A79C68;
    *(__m64 *)(v10 + 128) = _m_punpckldq(_m_packssdw(v82, v82), _m_packssdw(v83, v83));
    v85 = v84;
    v86 = _m_psubusb(v84, v80);
    v87 = _m_psubusb(v85, v81);
    v88 = _m_psrlq(v86, 0x20u);
    v89 = _m_psrlq(v87, 0x20u);
    v90 = _m_punpcklbw(v86, 0i64);
    v91 = _m_punpcklbw(v87, 0i64);
    v92 = _m_punpcklbw(v88, 0i64);
    v93 = _m_punpcklbw(v89, 0i64);
    v94 = _m_paddw(v90, v92);
    v95 = _m_paddw(v91, v93);
    v96 = _m_pmaddwd(v90, (__m64)qword_A79C10);
    v97 = _m_pmaddwd(v92, (__m64)qword_A79C10);
    v98 = _m_pmaddwd(v91, (__m64)qword_A79C10);
    v99 = _m_pmaddwd(v93, (__m64)qword_A79C10);
    v100 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v96, v97), _m_punpckhdq(v96, v97)), (__m64)qword_A79C40), 8u);
    v101 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v98, v99), _m_punpckhdq(v98, v99)), (__m64)qword_A79C40), 8u);
    v102 = v94;
    v103 = v95;
    v104.m64_u64 = qword_A79C18;
    v105.m64_u64 = qword_A79C20;
    *(__m64 *)(v7 + 128) = _m_punpckldq(_m_packssdw(v100, v100), _m_packssdw(v101, v101));
    v106 = _m_pmaddwd(v94, v104);
    v107 = _m_pmaddwd(v95, v104);
    v108 = _m_pmaddwd(v102, v105);
    v109 = _m_pmaddwd(v103, v105);
    v110 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v106, v108), _m_punpckhdq(v106, v108)), (__m64)qword_A79C50), 9u);
    v111 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v107, v109), _m_punpckhdq(v107, v109)), (__m64)qword_A79C50), 9u);
    v112.m64_u64 = qword_A79C70;
    v113.m64_u64 = qword_A79C48;
    v114 = _m_punpcklwd(_m_packssdw(v110, v110), _m_packssdw(v111, v111));
    v115 = *(__m64 *)(v6 + 48);
    v116 = *(__m64 *)(v6 + 56);
    *(_DWORD *)(v8 + 8) = _mm_cvtsi64_si32(v114);
    *(_DWORD *)(v9 + 8) = _mm_cvtsi64_si32(_m_psrlq(v114, 0x20u));
    v117 = _m_psubd(_m_psrlq(_m_pand(v116, v112), 0x18u), v113);
    v118 = _m_psubd(_m_psrlq(_m_pand(v115, v112), 0x18u), v113);
    v119.m64_u64 = qword_A79C68;
    *(__m64 *)(v10 + 136) = _m_punpckldq(_m_packssdw(v118, v118), _m_packssdw(v117, v117));
    v120 = _m_psubusb(v119, v115);
    v121 = _m_psubusb(v119, v116);
    v122 = _m_psrlq(v120, 0x20u);
    v123 = _m_psrlq(v121, 0x20u);
    v124 = _m_punpcklbw(v120, 0i64);
    v125 = _m_punpcklbw(v121, 0i64);
    v126 = _m_punpcklbw(v122, 0i64);
    v127 = _m_punpcklbw(v123, 0i64);
    v128 = _m_paddw(v124, v126);
    v129 = _m_paddw(v125, v127);
    v130 = _m_pmaddwd(v124, (__m64)qword_A79C10);
    v131 = _m_pmaddwd(v126, (__m64)qword_A79C10);
    v132 = _m_pmaddwd(v125, (__m64)qword_A79C10);
    v133 = _m_pmaddwd(v127, (__m64)qword_A79C10);
    v134 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v130, v131), _m_punpckhdq(v130, v131)), (__m64)qword_A79C40), 8u);
    v135 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v132, v133), _m_punpckhdq(v132, v133)), (__m64)qword_A79C40), 8u);
    v136 = v128;
    v137 = v129;
    v138.m64_u64 = qword_A79C18;
    v139.m64_u64 = qword_A79C20;
    *(__m64 *)(v7 + 136) = _m_punpckldq(_m_packssdw(v134, v134), _m_packssdw(v135, v135));
    v140 = _m_pmaddwd(v128, v138);
    v141 = _m_pmaddwd(v129, v138);
    v142 = _m_pmaddwd(v136, v139);
    v143 = _m_pmaddwd(v137, v139);
    v144 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v140, v142), _m_punpckhdq(v140, v142)), (__m64)qword_A79C50), 9u);
    v145 = _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v141, v143), _m_punpckhdq(v141, v143)), (__m64)qword_A79C50), 9u);
    v7 += 16;
    v8 += 16;
    v146 = _m_punpcklwd(_m_packssdw(v144, v144), _m_packssdw(v145, v145));
    v9 += 16;
    *(_DWORD *)(v8 - 4) = _mm_cvtsi64_si32(v146);
    v10 += 16;
    v6 += a2;
    *(_DWORD *)(v9 - 4) = _mm_cvtsi64_si32(_m_psrlq(v146, 0x20u));
    --v11;
  }
  while ( v11 );
  return v148;
}
// A79C10: using guessed type __int64 qword_A79C10;
// A79C18: using guessed type __int64 qword_A79C18;
// A79C20: using guessed type __int64 qword_A79C20;
// A79C40: using guessed type __int64 qword_A79C40;
// A79C48: using guessed type __int64 qword_A79C48;
// A79C50: using guessed type __int64 qword_A79C50;
// A79C68: using guessed type __int64 qword_A79C68;
// A79C70: using guessed type __int64 qword_A79C70;

//----- (0079C4E0) --------------------------------------------------------
void __cdecl __spoils<ecx> own_rgb_to_ycbcr_411_one_quarter_mcu_m5(__m64 *a1, int a2, int a3, __m64 *a4)
{
  __m64 *v4; // esi@1
  int v5; // edi@1
  __m64 *v6; // ebx@1
  signed int v7; // ecx@1
  signed int v8; // edx@1
  __m64 v9; // mm7@1
  __m64 v10; // mm0@1
  __m64 v11; // mm1@1
  __m64 v12; // mm4@2
  __m64 v13; // mm0@2
  __m64 v14; // mm5@2
  __m64 v15; // mm1@2
  __m64 v16; // mm4@2
  __m64 v17; // mm5@2
  __m64 v18; // mm0@2
  __m64 v19; // mm3@2
  __m64 v20; // mm2@2
  __m64 v21; // mm3@2
  __m64 v22; // mm4@2
  __m64 v23; // mm5@2
  __m64 v24; // mm1@2
  __m64 v25; // mm3@2
  __m64 v26; // mm4@2
  __m64 v27; // mm0@2
  __m64 v28; // mm3@2
  __m64 v29; // mm1@2
  __m64 v30; // mm3@2
  __m64 v31; // mm4@2
  __m64 v32; // mm5@2
  __m64 v33; // mm0@2
  __m64 v34; // mm3@2
  __m64 v35; // mm5@2
  __m64 v36; // mm1@2
  __m64 v37; // mm0@2
  __m64 v38; // mm3@2
  __m64 v39; // mm0@3
  __m64 v40; // mm1@3
  __m64 v41; // mm3@3
  __m64 v42; // mm7@3
  __m64 v43; // mm4@3
  __m64 v44; // mm2@3
  __m64 v45; // mm0@3
  __m64 v46; // mm1@3
  __m64 v47; // mm3@3
  __m64 v48; // mm5@3
  __m64 v49; // mm1@3
  __m64 v50; // mm3@3
  __m64 v51; // mm4@3
  __m64 v52; // mm2@3
  __m64 v53; // mm4@4
  __m64 v54; // mm0@4
  __m64 v55; // mm5@4
  __m64 v56; // mm1@4
  __m64 v57; // ST30_8@4
  __m64 v58; // mm4@4
  __m64 v59; // mm5@4
  __m64 v60; // mm0@4
  __m64 v61; // mm3@4
  __m64 v62; // mm2@4
  __m64 v63; // mm3@4
  __m64 v64; // mm4@4
  __m64 v65; // mm5@4
  __m64 v66; // mm1@4
  __m64 v67; // mm3@4
  __m64 v68; // ST20_8@4
  __m64 v69; // mm4@4
  __m64 v70; // mm0@4
  __m64 v71; // mm3@4
  __m64 v72; // mm1@4
  __m64 v73; // mm7@4
  __m64 v74; // mm3@4
  __m64 v75; // mm4@4
  __m64 v76; // mm5@4
  __m64 v77; // mm0@4
  __m64 v78; // mm3@4
  __m64 v79; // mm5@4
  __m64 v80; // mm1@4
  __m64 v81; // mm0@4
  __m64 v82; // ST18_8@4
  int v83; // esi@4
  __m64 v84; // mm3@4
  __m64 v85; // mm0@4
  __m64 v86; // mm1@4
  int v87; // edi@4
  __m64 v88; // mm4@4
  __m64 v89; // mm0@4
  __m64 v90; // mm5@4
  __m64 v91; // mm1@4
  __m64 v92; // ST30_8@4
  __m64 v93; // mm4@4
  __m64 v94; // mm5@4
  __m64 v95; // mm0@4
  __m64 v96; // mm3@4
  __m64 v97; // mm2@4
  __m64 v98; // mm3@4
  __m64 v99; // mm4@4
  __m64 v100; // mm5@4
  __m64 v101; // mm1@4
  __m64 v102; // mm3@4
  __m64 v103; // ST20_8@4
  __m64 v104; // mm4@4
  __m64 v105; // mm0@4
  __m64 v106; // mm3@4
  __m64 v107; // mm1@4
  __m64 v108; // mm3@4
  __m64 v109; // mm4@4
  __m64 v110; // mm5@4
  __m64 v111; // mm0@4
  __m64 v112; // mm3@4
  __m64 v113; // mm5@4
  __m64 v114; // mm0@4
  __m64 v115; // mm3@4
  __m64 v116; // mm0@4
  __m64 v117; // mm1@4
  __m64 v118; // mm3@4
  __m64 v119; // mm7@4
  __m64 v120; // mm4@4
  __m64 v121; // mm2@4
  __m64 v122; // mm0@4
  __m64 v123; // mm1@4
  __m64 v124; // mm3@4
  __m64 v125; // mm1@4
  __m64 v126; // [sp+0h] [bp-20h]@1
  __m64 v127; // [sp+8h] [bp-18h]@1
  __m64 v128; // [sp+10h] [bp-10h]@1
  __m64 v129; // [sp+18h] [bp-8h]@1

  v4 = a1;
  v5 = a3;
  v6 = a4;
  v7 = 3;
  v8 = 1;
  v9.m64_u64 = qword_A79C10;
  v129.m64_u64 = 0i64;
  v128.m64_u64 = 0i64;
  v127.m64_u64 = 0i64;
  v10 = _m_punpcklbw((__m64)a1->m64_u64, 0i64);
  v126.m64_u64 = 0i64;
  v11 = _m_punpcklbw(_m_psrlq((__m64)a1->m64_u64, 0x18u), 0i64);
  do
  {
    do
    {
      v12 = _m_paddw(_m_paddw(v10, v129), v11);
      v13 = _m_pmaddwd(v10, v9);
      v14 = v4[1];
      v15 = _m_pmaddwd(v11, v9);
      v129 = v12;
      v16 = v14;
      v17 = _m_punpcklbw(_m_psrlq(v14, 8u), 0i64);
      v18 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v13, v15), _m_punpckhdq(v13, v15)), (__m64)qword_A79C40), 8u);
      v19 = _m_punpcklbw(_m_por(_m_psrlq((__m64)v4->m64_u64, 0x30u), _m_psllq(v16, 0x10u)), 0i64);
      v20 = _m_paddw(_m_paddw(v128, v17), v19);
      v21 = _m_pmaddwd(v19, v9);
      v128 = v20;
      v22 = _m_punpcklbw(_m_psrlq(v4[1], 0x20u), 0i64);
      v23 = _m_pmaddwd(v17, v9);
      v24 = _m_punpcklbw(_m_por(_m_psllq(v4[2], 8u), _m_psrlq(v4[1], 0x38u)), (__m64)(unsigned int)dword_A79CA0);
      v25 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v21, v23), _m_punpckhdq(v21, v23)), (__m64)qword_A79C40), 8u);
      v127 = _m_paddw(_m_paddw(v127, v22), v24);
      v26 = _m_pmaddwd(v22, (__m64)qword_A79C10);
      v27 = _m_punpckldq(_m_packssdw(v18, v18), _m_packssdw(v25, v25));
      v28 = v4[2];
      v29 = _m_pmaddwd(v24, (__m64)qword_A79C10);
      *(__m64 *)v5 = v27;
      v9.m64_u64 = qword_A79C10;
      v30 = _m_punpcklbw(_m_psrlq(v28, 0x10u), 0i64);
      v31 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v26, v29), _m_punpckhdq(v26, v29)), (__m64)qword_A79C40), 8u);
      v32 = _m_paddw(v126, v30);
      v33 = _m_punpcklbw(_m_psrlq(v4[2], 0x28u), 0i64);
      v34 = _m_pmaddwd(v30, (__m64)qword_A79C10);
      v35 = _m_paddw(v32, v33);
      v36 = *(__m64 *)((char *)v4 + a2);
      v37 = _m_pmaddwd(v33, (__m64)qword_A79C10);
      v126 = v35;
      v4 = (__m64 *)((char *)v4 + a2);
      v38 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v34, v37), _m_punpckhdq(v34, v37)), (__m64)qword_A79C40), 8u);
      v10 = _m_punpcklbw(v36, 0i64);
      *(__m64 *)(v5 + 8) = _m_punpckldq(_m_packssdw(v31, v31), _m_packssdw(v38, v38));
      v11 = _m_punpcklbw(_m_psrlq(v36, 0x18u), 0i64);
      v5 += 16;
      v8 ^= 1u;
    }
    while ( !v8 );
    v39 = _m_pmaddwd(v129, (__m64)qword_A79C18);
    v40 = _m_pmaddwd(v129, (__m64)qword_A79C20);
    v41 = _m_pmaddwd(v20, (__m64)qword_A79C18);
    v42 = _m_pmaddwd(v127, (__m64)qword_A79C18);
    v43 = _m_pmaddwd(v20, (__m64)qword_A79C20);
    v44 = _m_pmaddwd(v127, (__m64)qword_A79C20);
    v45 = _m_por(
            _m_pand(
              _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v39, v40), _m_punpckhdq(v39, v40)), (__m64)qword_A79C58), 0xAu),
              (__m64)qword_A79C80),
            _m_psllq(
              _m_pand(
                _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v41, v43), _m_punpckhdq(v41, v43)), (__m64)qword_A79C58), 0xAu),
                (__m64)qword_A79C80),
              0x10u));
    v46 = _m_pmaddwd(v35, (__m64)qword_A79C18);
    v47 = _m_pmaddwd(v35, (__m64)qword_A79C20);
    v48 = _m_pand(
            _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v42, v44), _m_punpckhdq(v42, v44)), (__m64)qword_A79C58), 0xAu),
            (__m64)qword_A79C80);
    v9.m64_u64 = qword_A79C10;
    v129.m64_u64 = 0i64;
    v128.m64_u64 = 0i64;
    v127.m64_u64 = 0i64;
    v126.m64_u64 = 0i64;
    v49 = _m_por(
            _m_psllq(
              _m_pand(
                _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v46, v47), _m_punpckhdq(v46, v47)), (__m64)qword_A79C58), 0xAu),
                (__m64)qword_A79C80),
              0x10u),
            v48);
    v50 = _m_psrlq((__m64)v4->m64_u64, 0x18u);
    v51 = _m_punpckhdq(v45, v49);
    v52 = _m_punpcklbw((__m64)v4->m64_u64, 0i64);
    v6->m64_u64 = (unsigned __int64)_m_punpckldq(v45, v49);
    v11 = _m_punpcklbw(v50, 0i64);
    v6[16].m64_u64 = (unsigned __int64)v51;
    v10 = v52;
    v6 += 2;
    --v7;
  }
  while ( v7 );
  v53 = _m_paddw(_m_paddw(v52, 0i64), v11);
  v54 = _m_pmaddwd(v52, v9);
  v55 = v4[1];
  v56 = _m_pmaddwd(v11, v9);
  v57 = v53;
  v58 = v55;
  v59 = _m_punpcklbw(_m_psrlq(v55, 8u), 0i64);
  v60 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v54, v56), _m_punpckhdq(v54, v56)), (__m64)qword_A79C40), 8u);
  v61 = _m_punpcklbw(_m_por(_m_psrlq((__m64)v4->m64_u64, 0x30u), _m_psllq(v58, 0x10u)), 0i64);
  v62 = _m_paddw(_m_paddw(0i64, v59), v61);
  v63 = _m_pmaddwd(v61, v9);
  v64 = _m_punpcklbw(_m_psrlq(v4[1], 0x20u), 0i64);
  v65 = _m_pmaddwd(v59, v9);
  v66 = _m_punpcklbw(_m_por(_m_psllq(v4[2], 8u), _m_psrlq(v4[1], 0x38u)), (__m64)(unsigned int)dword_A79CA0);
  v67 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v63, v65), _m_punpckhdq(v63, v65)), (__m64)qword_A79C40), 8u);
  v68 = _m_paddw(_m_paddw(0i64, v64), v66);
  v69 = _m_pmaddwd(v64, (__m64)qword_A79C10);
  v70 = _m_punpckldq(_m_packssdw(v60, v60), _m_packssdw(v67, v67));
  v71 = v4[2];
  v72 = _m_pmaddwd(v66, (__m64)qword_A79C10);
  *(__m64 *)v5 = v70;
  v73.m64_u64 = qword_A79C10;
  v74 = _m_punpcklbw(_m_psrlq(v71, 0x10u), 0i64);
  v75 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v69, v72), _m_punpckhdq(v69, v72)), (__m64)qword_A79C40), 8u);
  v76 = _m_paddw(0i64, v74);
  v77 = _m_punpcklbw(_m_psrlq(v4[2], 0x28u), 0i64);
  v78 = _m_pmaddwd(v74, (__m64)qword_A79C10);
  v79 = _m_paddw(v76, v77);
  v80 = *(__m64 *)((char *)v4 + a2);
  v81 = _m_pmaddwd(v77, (__m64)qword_A79C10);
  v82 = v79;
  v83 = (int)v4 + a2;
  v84 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v78, v81), _m_punpckhdq(v78, v81)), (__m64)qword_A79C40), 8u);
  v85 = _m_punpcklbw(v80, 0i64);
  *(__m64 *)(v5 + 8) = _m_punpckldq(_m_packssdw(v75, v75), _m_packssdw(v84, v84));
  v86 = _m_punpcklbw(_m_psrlq(v80, 0x18u), 0i64);
  v87 = v5 + 16;
  v88 = _m_paddw(_m_paddw(v85, v57), v86);
  v89 = _m_pmaddwd(v85, v73);
  v90 = *(__m64 *)(v83 + 8);
  v91 = _m_pmaddwd(v86, v73);
  v92 = v88;
  v93 = v90;
  v94 = _m_punpcklbw(_m_psrlq(v90, 8u), 0i64);
  v95 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v89, v91), _m_punpckhdq(v89, v91)), (__m64)qword_A79C40), 8u);
  v96 = _m_punpcklbw(_m_por(_m_psrlq(*(__m64 *)v83, 0x30u), _m_psllq(v93, 0x10u)), 0i64);
  v97 = _m_paddw(_m_paddw(v62, v94), v96);
  v98 = _m_pmaddwd(v96, v73);
  v99 = _m_punpcklbw(_m_psrlq(*(__m64 *)(v83 + 8), 0x20u), 0i64);
  v100 = _m_pmaddwd(v94, v73);
  v101 = _m_punpcklbw(
           _m_por(_m_psllq(*(__m64 *)(v83 + 16), 8u), _m_psrlq(*(__m64 *)(v83 + 8), 0x38u)),
           (__m64)(unsigned int)dword_A79CA0);
  v102 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v98, v100), _m_punpckhdq(v98, v100)), (__m64)qword_A79C40), 8u);
  v103 = _m_paddw(_m_paddw(v68, v99), v101);
  v104 = _m_pmaddwd(v99, (__m64)qword_A79C10);
  v105 = _m_punpckldq(_m_packssdw(v95, v95), _m_packssdw(v102, v102));
  v106 = *(__m64 *)(v83 + 16);
  v107 = _m_pmaddwd(v101, (__m64)qword_A79C10);
  *(__m64 *)v87 = v105;
  v108 = _m_punpcklbw(_m_psrlq(v106, 0x10u), 0i64);
  v109 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v104, v107), _m_punpckhdq(v104, v107)), (__m64)qword_A79C40), 8u);
  v110 = _m_paddw(v82, v108);
  v111 = _m_punpcklbw(_m_psrlq(*(__m64 *)(v83 + 16), 0x28u), 0i64);
  v112 = _m_pmaddwd(v108, (__m64)qword_A79C10);
  v113 = _m_paddw(v110, v111);
  v114 = _m_pmaddwd(v111, (__m64)qword_A79C10);
  v115 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v112, v114), _m_punpckhdq(v112, v114)), (__m64)qword_A79C40), 8u);
  *(__m64 *)(v87 + 8) = _m_punpckldq(_m_packssdw(v109, v109), _m_packssdw(v115, v115));
  v116 = _m_pmaddwd(v92, (__m64)qword_A79C18);
  v117 = _m_pmaddwd(v92, (__m64)qword_A79C20);
  v118 = _m_pmaddwd(v97, (__m64)qword_A79C18);
  v119 = _m_pmaddwd(v103, (__m64)qword_A79C18);
  v120 = _m_pmaddwd(v97, (__m64)qword_A79C20);
  v121 = _m_pmaddwd(v103, (__m64)qword_A79C20);
  v122 = _m_por(
           _m_pand(
             _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v116, v117), _m_punpckhdq(v116, v117)), (__m64)qword_A79C58), 0xAu),
             (__m64)qword_A79C80),
           _m_psllq(
             _m_pand(
               _m_psrad(
                 _m_paddd(_m_paddd(_m_punpckldq(v118, v120), _m_punpckhdq(v118, v120)), (__m64)qword_A79C58),
                 0xAu),
               (__m64)qword_A79C80),
             0x10u));
  v123 = _m_pmaddwd(v113, (__m64)qword_A79C18);
  v124 = _m_pmaddwd(v113, (__m64)qword_A79C20);
  v125 = _m_por(
           _m_psllq(
             _m_pand(
               _m_psrad(
                 _m_paddd(_m_paddd(_m_punpckldq(v123, v124), _m_punpckhdq(v123, v124)), (__m64)qword_A79C58),
                 0xAu),
               (__m64)qword_A79C80),
             0x10u),
           _m_pand(
             _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v119, v121), _m_punpckhdq(v119, v121)), (__m64)qword_A79C58), 0xAu),
             (__m64)qword_A79C80));
  v6->m64_u64 = (unsigned __int64)_m_punpckldq(v122, v125);
  v6[16].m64_u64 = (unsigned __int64)_m_punpckhdq(v122, v125);
}
// A79C10: using guessed type __int64 qword_A79C10;
// A79C18: using guessed type __int64 qword_A79C18;
// A79C20: using guessed type __int64 qword_A79C20;
// A79C40: using guessed type __int64 qword_A79C40;
// A79C58: using guessed type __int64 qword_A79C58;
// A79C80: using guessed type __int64 qword_A79C80;
// A79CA0: using guessed type int dword_A79CA0;

//----- (0079CB00) --------------------------------------------------------
void __cdecl __spoils<ecx> own_bgr_to_ycbcr_411_one_quarter_mcu_m5(__m64 *a1, int a2, int a3, __m64 *a4)
{
  __m64 *v4; // esi@1
  int v5; // edi@1
  __m64 *v6; // ebx@1
  signed int v7; // ecx@1
  signed int v8; // edx@1
  __m64 v9; // mm7@1
  __m64 v10; // mm0@1
  __m64 v11; // mm1@1
  __m64 v12; // mm4@2
  __m64 v13; // mm0@2
  __m64 v14; // mm5@2
  __m64 v15; // mm1@2
  __m64 v16; // mm4@2
  __m64 v17; // mm5@2
  __m64 v18; // mm0@2
  __m64 v19; // mm3@2
  __m64 v20; // mm2@2
  __m64 v21; // mm3@2
  __m64 v22; // mm4@2
  __m64 v23; // mm5@2
  __m64 v24; // mm1@2
  __m64 v25; // mm3@2
  __m64 v26; // mm4@2
  __m64 v27; // mm0@2
  __m64 v28; // mm3@2
  __m64 v29; // mm1@2
  __m64 v30; // mm3@2
  __m64 v31; // mm4@2
  __m64 v32; // mm5@2
  __m64 v33; // mm0@2
  __m64 v34; // mm3@2
  __m64 v35; // mm5@2
  __m64 v36; // mm1@2
  __m64 v37; // mm0@2
  __m64 v38; // mm2@2
  __m64 v39; // mm3@2
  __m64 v40; // mm2@2
  __m64 v41; // mm0@2
  __m64 v42; // mm1@2
  __m64 v43; // mm3@2
  __m64 v44; // mm0@4
  __m64 v45; // mm1@4
  __m64 v46; // mm3@4
  __m64 v47; // mm7@4
  __m64 v48; // mm4@4
  __m64 v49; // mm2@4
  __m64 v50; // mm0@4
  __m64 v51; // mm1@4
  __m64 v52; // mm3@4
  __m64 v53; // mm5@4
  __m64 v54; // mm1@4
  __m64 v55; // mm3@4
  __m64 v56; // mm4@4
  __m64 v57; // mm2@4
  __m64 v58; // mm4@5
  __m64 v59; // mm0@5
  __m64 v60; // mm5@5
  __m64 v61; // mm1@5
  __m64 v62; // ST30_8@5
  __m64 v63; // mm4@5
  __m64 v64; // mm5@5
  __m64 v65; // mm0@5
  __m64 v66; // mm3@5
  __m64 v67; // mm2@5
  __m64 v68; // mm3@5
  __m64 v69; // mm4@5
  __m64 v70; // mm5@5
  __m64 v71; // mm1@5
  __m64 v72; // mm3@5
  __m64 v73; // ST20_8@5
  __m64 v74; // mm4@5
  __m64 v75; // mm0@5
  __m64 v76; // mm3@5
  __m64 v77; // mm1@5
  __m64 v78; // mm7@5
  __m64 v79; // mm3@5
  __m64 v80; // mm4@5
  __m64 v81; // mm5@5
  __m64 v82; // mm0@5
  __m64 v83; // mm3@5
  __m64 v84; // mm5@5
  __m64 v85; // mm1@5
  __m64 v86; // mm0@5
  __m64 v87; // ST18_8@5
  int v88; // esi@5
  __m64 v89; // mm3@5
  __m64 v90; // mm0@5
  __m64 v91; // mm1@5
  __m64 v92; // mm4@5
  __m64 v93; // mm0@5
  __m64 v94; // mm5@5
  __m64 v95; // mm1@5
  __m64 v96; // ST30_8@5
  __m64 v97; // mm4@5
  __m64 v98; // mm5@5
  __m64 v99; // mm0@5
  __m64 v100; // mm3@5
  __m64 v101; // mm2@5
  __m64 v102; // mm3@5
  __m64 v103; // mm4@5
  __m64 v104; // mm5@5
  __m64 v105; // mm1@5
  __m64 v106; // mm3@5
  __m64 v107; // ST20_8@5
  __m64 v108; // mm4@5
  __m64 v109; // mm0@5
  __m64 v110; // mm3@5
  __m64 v111; // mm1@5
  __m64 v112; // mm3@5
  __m64 v113; // mm4@5
  __m64 v114; // mm5@5
  __m64 v115; // mm0@5
  __m64 v116; // mm3@5
  __m64 v117; // mm5@5
  __m64 v118; // mm0@5
  __m64 v119; // mm3@5
  __m64 v120; // mm0@5
  __m64 v121; // mm1@5
  __m64 v122; // mm3@5
  __m64 v123; // mm7@5
  __m64 v124; // mm4@5
  __m64 v125; // mm2@5
  __m64 v126; // mm0@5
  __m64 v127; // mm1@5
  __m64 v128; // mm3@5
  __m64 v129; // mm1@5
  __m64 v130; // [sp+0h] [bp-20h]@1
  __m64 v131; // [sp+8h] [bp-18h]@1
  __m64 v132; // [sp+10h] [bp-10h]@1
  __m64 v133; // [sp+18h] [bp-8h]@1

  v4 = a1;
  v5 = a3;
  v6 = a4;
  v7 = 3;
  v8 = 1;
  v9.m64_u64 = qword_A79C28;
  v133.m64_u64 = 0i64;
  v132.m64_u64 = 0i64;
  v131.m64_u64 = 0i64;
  v10 = _m_punpcklbw((__m64)a1->m64_u64, 0i64);
  v130.m64_u64 = 0i64;
  v11 = _m_punpcklbw(_m_psrlq((__m64)a1->m64_u64, 0x18u), 0i64);
  do
  {
    while ( 1 )
    {
      v12 = _m_paddw(_m_paddw(v10, v133), v11);
      v13 = _m_pmaddwd(v10, v9);
      v14 = v4[1];
      v15 = _m_pmaddwd(v11, v9);
      v133 = v12;
      v16 = v14;
      v17 = _m_punpcklbw(_m_psrlq(v14, 8u), 0i64);
      v18 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v13, v15), _m_punpckhdq(v13, v15)), (__m64)qword_A79C40), 8u);
      v19 = _m_punpcklbw(_m_por(_m_psrlq((__m64)v4->m64_u64, 0x30u), _m_psllq(v16, 0x10u)), 0i64);
      v20 = _m_paddw(_m_paddw(v132, v17), v19);
      v21 = _m_pmaddwd(v19, v9);
      v132 = v20;
      v22 = _m_punpcklbw(_m_psrlq(v4[1], 0x20u), 0i64);
      v23 = _m_pmaddwd(v17, v9);
      v24 = _m_punpcklbw(_m_por(_m_psllq(v4[2], 8u), _m_psrlq(v4[1], 0x38u)), (__m64)(unsigned int)dword_A79CA0);
      v25 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v21, v23), _m_punpckhdq(v21, v23)), (__m64)qword_A79C40), 8u);
      v131 = _m_paddw(_m_paddw(v131, v22), v24);
      v26 = _m_pmaddwd(v22, (__m64)qword_A79C28);
      v27 = _m_punpckldq(_m_packssdw(v18, v18), _m_packssdw(v25, v25));
      v28 = v4[2];
      v29 = _m_pmaddwd(v24, (__m64)qword_A79C28);
      *(__m64 *)v5 = v27;
      v9.m64_u64 = qword_A79C28;
      v30 = _m_punpcklbw(_m_psrlq(v28, 0x10u), 0i64);
      v31 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v26, v29), _m_punpckhdq(v26, v29)), (__m64)qword_A79C40), 8u);
      v32 = _m_paddw(v130, v30);
      v33 = _m_punpcklbw(_m_psrlq(v4[2], 0x28u), 0i64);
      v34 = _m_pmaddwd(v30, (__m64)qword_A79C28);
      v35 = _m_paddw(v32, v33);
      v36 = *(__m64 *)((char *)v4 + a2);
      v37 = _m_pmaddwd(v33, (__m64)qword_A79C28);
      v130 = v35;
      v38 = v34;
      v4 = (__m64 *)((char *)v4 + a2);
      v39 = _m_punpckldq(v34, v37);
      v5 += 16;
      v40 = _m_punpckhdq(v38, v37);
      v41 = v36;
      v42 = _m_psrlq(v36, 0x18u);
      v43 = _m_psrad(_m_psubd(_m_paddd(v39, v40), (__m64)qword_A79C40), 8u);
      v8 ^= 1u;
      v10 = _m_punpcklbw(v41, 0i64);
      *(__m64 *)(v5 - 8) = _m_punpckldq(_m_packssdw(v31, v31), _m_packssdw(v43, v43));
      if ( v8 )
        break;
      v11 = _m_punpcklbw(v42, 0i64);
    }
    v44 = _m_pmaddwd(v133, (__m64)qword_A79C30);
    v45 = _m_pmaddwd(v133, (__m64)qword_A79C38);
    v46 = _m_pmaddwd(v132, (__m64)qword_A79C30);
    v47 = _m_pmaddwd(v131, (__m64)qword_A79C30);
    v48 = _m_pmaddwd(v132, (__m64)qword_A79C38);
    v49 = _m_pmaddwd(v131, (__m64)qword_A79C38);
    v50 = _m_por(
            _m_pand(
              _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v44, v45), _m_punpckhdq(v44, v45)), (__m64)qword_A79C58), 0xAu),
              (__m64)qword_A79C80),
            _m_psllq(
              _m_pand(
                _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v46, v48), _m_punpckhdq(v46, v48)), (__m64)qword_A79C58), 0xAu),
                (__m64)qword_A79C80),
              0x10u));
    v51 = _m_pmaddwd(v35, (__m64)qword_A79C30);
    v52 = _m_pmaddwd(v35, (__m64)qword_A79C38);
    v53 = _m_pand(
            _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v47, v49), _m_punpckhdq(v47, v49)), (__m64)qword_A79C58), 0xAu),
            (__m64)qword_A79C80);
    v9.m64_u64 = qword_A79C28;
    v133.m64_u64 = 0i64;
    v132.m64_u64 = 0i64;
    v131.m64_u64 = 0i64;
    v130.m64_u64 = 0i64;
    v54 = _m_por(
            _m_psllq(
              _m_pand(
                _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v51, v52), _m_punpckhdq(v51, v52)), (__m64)qword_A79C58), 0xAu),
                (__m64)qword_A79C80),
              0x10u),
            v53);
    v55 = _m_psrlq((__m64)v4->m64_u64, 0x18u);
    v56 = _m_punpckhdq(v50, v54);
    v57 = _m_punpcklbw((__m64)v4->m64_u64, 0i64);
    v6->m64_u64 = (unsigned __int64)_m_punpckldq(v50, v54);
    v11 = _m_punpcklbw(v55, 0i64);
    v6[16].m64_u64 = (unsigned __int64)v56;
    v10 = v57;
    v6 += 2;
    --v7;
  }
  while ( v7 );
  v58 = _m_paddw(_m_paddw(v57, 0i64), v11);
  v59 = _m_pmaddwd(v57, v9);
  v60 = v4[1];
  v61 = _m_pmaddwd(v11, v9);
  v62 = v58;
  v63 = v60;
  v64 = _m_punpcklbw(_m_psrlq(v60, 8u), 0i64);
  v65 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v59, v61), _m_punpckhdq(v59, v61)), (__m64)qword_A79C40), 8u);
  v66 = _m_punpcklbw(_m_por(_m_psrlq((__m64)v4->m64_u64, 0x30u), _m_psllq(v63, 0x10u)), 0i64);
  v67 = _m_paddw(_m_paddw(0i64, v64), v66);
  v68 = _m_pmaddwd(v66, v9);
  v69 = _m_punpcklbw(_m_psrlq(v4[1], 0x20u), 0i64);
  v70 = _m_pmaddwd(v64, v9);
  v71 = _m_punpcklbw(_m_por(_m_psllq(v4[2], 8u), _m_psrlq(v4[1], 0x38u)), (__m64)(unsigned int)dword_A79CA0);
  v72 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v68, v70), _m_punpckhdq(v68, v70)), (__m64)qword_A79C40), 8u);
  v73 = _m_paddw(_m_paddw(0i64, v69), v71);
  v74 = _m_pmaddwd(v69, (__m64)qword_A79C28);
  v75 = _m_punpckldq(_m_packssdw(v65, v65), _m_packssdw(v72, v72));
  v76 = v4[2];
  v77 = _m_pmaddwd(v71, (__m64)qword_A79C28);
  *(__m64 *)v5 = v75;
  v78.m64_u64 = qword_A79C28;
  v79 = _m_punpcklbw(_m_psrlq(v76, 0x10u), 0i64);
  v80 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v74, v77), _m_punpckhdq(v74, v77)), (__m64)qword_A79C40), 8u);
  v81 = _m_paddw(0i64, v79);
  v82 = _m_punpcklbw(_m_psrlq(v4[2], 0x28u), 0i64);
  v83 = _m_pmaddwd(v79, (__m64)qword_A79C28);
  v84 = _m_paddw(v81, v82);
  v85 = *(__m64 *)((char *)v4 + a2);
  v86 = _m_pmaddwd(v82, (__m64)qword_A79C28);
  v87 = v84;
  v88 = (int)v4 + a2;
  v89 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v83, v86), _m_punpckhdq(v83, v86)), (__m64)qword_A79C40), 8u);
  v90 = _m_punpcklbw(v85, 0i64);
  *(__m64 *)(v5 + 8) = _m_punpckldq(_m_packssdw(v80, v80), _m_packssdw(v89, v89));
  v91 = _m_punpcklbw(_m_psrlq(v85, 0x18u), 0i64);
  v92 = _m_paddw(_m_paddw(v90, v62), v91);
  v93 = _m_pmaddwd(v90, v78);
  v94 = *(__m64 *)(v88 + 8);
  v95 = _m_pmaddwd(v91, v78);
  v96 = v92;
  v97 = v94;
  v98 = _m_punpcklbw(_m_psrlq(v94, 8u), 0i64);
  v99 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v93, v95), _m_punpckhdq(v93, v95)), (__m64)qword_A79C40), 8u);
  v100 = _m_punpcklbw(_m_por(_m_psrlq(*(__m64 *)v88, 0x30u), _m_psllq(v97, 0x10u)), 0i64);
  v101 = _m_paddw(_m_paddw(v67, v98), v100);
  v102 = _m_pmaddwd(v100, v78);
  v103 = _m_punpcklbw(_m_psrlq(*(__m64 *)(v88 + 8), 0x20u), 0i64);
  v104 = _m_pmaddwd(v98, v78);
  v105 = _m_punpcklbw(
           _m_por(_m_psllq(*(__m64 *)(v88 + 16), 8u), _m_psrlq(*(__m64 *)(v88 + 8), 0x38u)),
           (__m64)(unsigned int)dword_A79CA0);
  v106 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v102, v104), _m_punpckhdq(v102, v104)), (__m64)qword_A79C40), 8u);
  v107 = _m_paddw(_m_paddw(v73, v103), v105);
  v108 = _m_pmaddwd(v103, (__m64)qword_A79C28);
  v109 = _m_punpckldq(_m_packssdw(v99, v99), _m_packssdw(v106, v106));
  v110 = *(__m64 *)(v88 + 16);
  v111 = _m_pmaddwd(v105, (__m64)qword_A79C28);
  *(__m64 *)(v5 + 16) = v109;
  v112 = _m_punpcklbw(_m_psrlq(v110, 0x10u), 0i64);
  v113 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v108, v111), _m_punpckhdq(v108, v111)), (__m64)qword_A79C40), 8u);
  v114 = _m_paddw(v87, v112);
  v115 = _m_punpcklbw(_m_psrlq(*(__m64 *)(v88 + 16), 0x28u), 0i64);
  v116 = _m_pmaddwd(v112, (__m64)qword_A79C28);
  v117 = _m_paddw(v114, v115);
  v118 = _m_pmaddwd(v115, (__m64)qword_A79C28);
  v119 = _m_psrad(_m_psubd(_m_paddd(_m_punpckldq(v116, v118), _m_punpckhdq(v116, v118)), (__m64)qword_A79C40), 8u);
  *(__m64 *)(v5 + 24) = _m_punpckldq(_m_packssdw(v113, v113), _m_packssdw(v119, v119));
  v120 = _m_pmaddwd(v96, (__m64)qword_A79C30);
  v121 = _m_pmaddwd(v96, (__m64)qword_A79C38);
  v122 = _m_pmaddwd(v101, (__m64)qword_A79C30);
  v123 = _m_pmaddwd(v107, (__m64)qword_A79C30);
  v124 = _m_pmaddwd(v101, (__m64)qword_A79C38);
  v125 = _m_pmaddwd(v107, (__m64)qword_A79C38);
  v126 = _m_por(
           _m_pand(
             _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v120, v121), _m_punpckhdq(v120, v121)), (__m64)qword_A79C58), 0xAu),
             (__m64)qword_A79C80),
           _m_psllq(
             _m_pand(
               _m_psrad(
                 _m_paddd(_m_paddd(_m_punpckldq(v122, v124), _m_punpckhdq(v122, v124)), (__m64)qword_A79C58),
                 0xAu),
               (__m64)qword_A79C80),
             0x10u));
  v127 = _m_pmaddwd(v117, (__m64)qword_A79C30);
  v128 = _m_pmaddwd(v117, (__m64)qword_A79C38);
  v129 = _m_por(
           _m_psllq(
             _m_pand(
               _m_psrad(
                 _m_paddd(_m_paddd(_m_punpckldq(v127, v128), _m_punpckhdq(v127, v128)), (__m64)qword_A79C58),
                 0xAu),
               (__m64)qword_A79C80),
             0x10u),
           _m_pand(
             _m_psrad(_m_paddd(_m_paddd(_m_punpckldq(v123, v125), _m_punpckhdq(v123, v125)), (__m64)qword_A79C58), 0xAu),
             (__m64)qword_A79C80));
  v6->m64_u64 = (unsigned __int64)_m_punpckldq(v126, v129);
  v6[16].m64_u64 = (unsigned __int64)_m_punpckhdq(v126, v129);
}
// A79C28: using guessed type __int64 qword_A79C28;
// A79C30: using guessed type __int64 qword_A79C30;
// A79C38: using guessed type __int64 qword_A79C38;
// A79C40: using guessed type __int64 qword_A79C40;
// A79C58: using guessed type __int64 qword_A79C58;
// A79C80: using guessed type __int64 qword_A79C80;
// A79CA0: using guessed type int dword_A79CA0;

//----- (0079D120) --------------------------------------------------------
void __cdecl __spoils<ecx> own_rgba_fpx_to_ycbcra_fpx_4114_one_half_mcu_m5(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int v6; // ebx@1
  signed int v7; // ecx@1
  int v8; // edx@1
  int v9; // esi@1
  signed int v10; // edi@1
  char *v11; // eax@1
  __m64 v12; // mm4@2
  __m64 v13; // mm6@2
  __m64 v14; // mm1@2
  __m64 v15; // mm3@2
  __m64 v16; // mm6@2
  __m64 v17; // mm2@2
  __m64 v18; // mm5@2
  __m64 v19; // mm3@2
  __m64 v20; // mm2@2
  __m64 v21; // mm3@2
  __m64 v22; // mm2@2
  int v23; // ebx@4
  int v24; // edx@4
  signed int v25; // ecx@4
  int v26; // esi@4
  __m64 v27; // mm4@5
  __m64 v28; // mm6@5
  __m64 v29; // mm1@5
  __m64 v30; // mm3@5
  __m64 v31; // mm6@5
  __m64 v32; // mm2@5
  __m64 v33; // mm5@5
  __m64 v34; // mm3@5
  __m64 v35; // mm2@5
  __m64 v36; // mm3@5
  __m64 v37; // mm2@5
  __m64 v38; // mm7@7
  __int64 v39; // mm1@7
  __int64 v40; // mm2@7
  __int64 v41; // mm3@7
  __int64 v42; // mm1@7
  __int64 v43; // mm2@7
  __int64 v44; // mm3@7
  __int64 v45; // mm1@7
  __int64 v46; // mm2@7
  __int64 v47; // mm3@7
  __int64 v48; // mm1@7
  __int64 v49; // mm2@7
  __int64 v50; // mm3@7
  char v51; // [sp+20h] [bp-100h]@1

  v6 = 0;
  v7 = 8;
  v8 = 0;
  v9 = a1;
  v10 = 4;
  v11 = (char *)((unsigned int)&v51 & 0xFFFFFFE0);
  while ( 1 )
  {
    while ( 1 )
    {
      v12 = _m_psubd(_m_psrlq(_m_pand(*(__m64 *)(v6 + v9), (__m64)qword_A79CB0), 0x18u), (__m64)qword_A79CC0);
      v13 = _m_psubusb((__m64)qword_A79CA8, *(__m64 *)(v6 + v9));
      *(_DWORD *)&v11[v8 + 192] = _mm_cvtsi64_si32(_m_packssdw(v12, v12));
      v14 = _m_punpcklbw(v13, 0i64);
      v15 = _m_pmaddwd((__m64)qword_A79CD0, v14);
      v16 = _m_punpckhbw(v13, 0i64);
      v17 = _m_pmaddwd((__m64)qword_A79CD0, v16);
      v18 = _m_psrad(
              _m_psubd(
                _m_por(
                  _m_psrlq(_m_psllq(_m_paddd(_m_psrlq(v15, 0x20u), v15), 0x20u), 0x20u),
                  _m_psllq(_m_paddd(_m_psrlq(v17, 0x20u), v17), 0x20u)),
                (__m64)qword_A79CB8),
              8u);
      *(_DWORD *)&v11[v8] = _mm_cvtsi64_si32(_m_packssdw(v18, v18));
      v19 = _m_pmaddwd((__m64)qword_A79CD8, v14);
      v20 = _m_pmaddwd((__m64)qword_A79CD8, v16);
      *(_DWORD *)&v11[v8 + 64] = _mm_cvtsi64_si32(_m_paddd(_m_paddd(_m_psrlq(v19, 0x20u), v19), _m_paddd(_m_psrlq(v20, 0x20u), v20)));
      v21 = _m_pmaddwd((__m64)qword_A79CE0, v14);
      v22 = _m_pmaddwd((__m64)qword_A79CE0, v16);
      *(_DWORD *)&v11[v8 + 128] = _mm_cvtsi64_si32(_m_paddd(_m_paddd(_m_psrlq(v21, 0x20u), v21), _m_paddd(_m_psrlq(v22, 0x20u), v22)));
      if ( !--v7 )
        break;
      v6 += 8;
      v8 += 4;
    }
    v23 = 0;
    v24 = v8 + 4;
    v25 = 8;
    v26 = a2 + v9;
    while ( 1 )
    {
      v27 = _m_psubd(_m_psrlq(_m_pand(*(__m64 *)(v23 + v26), (__m64)qword_A79CB0), 0x18u), (__m64)qword_A79CC0);
      v28 = _m_psubusb((__m64)qword_A79CA8, *(__m64 *)(v23 + v26));
      *(_DWORD *)&v11[v24 + 192] = _mm_cvtsi64_si32(_m_packssdw(v27, v27));
      v29 = _m_punpcklbw(v28, 0i64);
      v30 = _m_pmaddwd((__m64)qword_A79CD0, v29);
      v31 = _m_punpckhbw(v28, 0i64);
      v32 = _m_pmaddwd((__m64)qword_A79CD0, v31);
      v33 = _m_psrad(
              _m_psubd(
                _m_por(
                  _m_psrlq(_m_psllq(_m_paddd(_m_psrlq(v30, 0x20u), v30), 0x20u), 0x20u),
                  _m_psllq(_m_paddd(_m_psrlq(v32, 0x20u), v32), 0x20u)),
                (__m64)qword_A79CB8),
              8u);
      *(_DWORD *)&v11[v24] = _mm_cvtsi64_si32(_m_packssdw(v33, v33));
      v34 = _m_pmaddwd((__m64)qword_A79CD8, v29);
      v35 = _m_pmaddwd((__m64)qword_A79CD8, v31);
      *(_DWORD *)&v11[v24 + 64] = _mm_cvtsi64_si32(_m_paddd(_m_paddd(_m_psrlq(v34, 0x20u), v34), _m_paddd(_m_psrlq(v35, 0x20u), v35)));
      v36 = _m_pmaddwd((__m64)qword_A79CE0, v29);
      v37 = _m_pmaddwd((__m64)qword_A79CE0, v31);
      *(_DWORD *)&v11[v24 + 128] = _mm_cvtsi64_si32(_m_paddd(_m_paddd(_m_psrlq(v36, 0x20u), v36), _m_paddd(_m_psrlq(v37, 0x20u), v37)));
      if ( !--v25 )
        break;
      v23 += 8;
      v24 += 4;
    }
    v38.m64_u64 = qword_A79CC8;
    v39 = *(_QWORD *)(((unsigned int)&v51 & 0xFFFFFFE0) + 8);
    v40 = *(_QWORD *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0x10);
    v41 = *(_QWORD *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0x18);
    *(_QWORD *)a3 = *(_QWORD *)v11;
    *(_QWORD *)(a3 + 8) = v39;
    *(_QWORD *)(a3 + 128) = v40;
    *(_QWORD *)(a3 + 136) = v41;
    v42 = *(_QWORD *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0x28);
    v43 = *(_QWORD *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0x30);
    v44 = *(_QWORD *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0x38);
    *(_QWORD *)(a3 + 16) = *(_QWORD *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0x20);
    *(_QWORD *)(a3 + 24) = v42;
    *(_QWORD *)(a3 + 144) = v43;
    *(_QWORD *)(a3 + 152) = v44;
    *(__m64 *)a4 = _m_packssdw(
                     _m_psrad(
                       _m_paddd(
                         _m_paddd(
                           *(__m64 *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0x60),
                           *(__m64 *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0x40)),
                         v38),
                       0xAu),
                     _m_psrad(
                       _m_paddd(
                         _m_paddd(
                           *(__m64 *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0x48),
                           *(__m64 *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0x68)),
                         v38),
                       0xAu));
    *(__m64 *)(a4 + 8) = _m_packssdw(
                           _m_psrad(
                             _m_paddd(
                               _m_paddd(
                                 *(__m64 *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0x70),
                                 *(__m64 *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0x50)),
                               v38),
                             0xAu),
                           _m_psrad(
                             _m_paddd(
                               _m_paddd(
                                 *(__m64 *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0x58),
                                 *(__m64 *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0x78)),
                               v38),
                             0xAu));
    *(__m64 *)(a4 + 128) = _m_packssdw(
                             _m_psrad(
                               _m_paddd(
                                 _m_paddd(
                                   *(__m64 *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0xA0),
                                   *(__m64 *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0x80)),
                                 v38),
                               0xAu),
                             _m_psrad(
                               _m_paddd(
                                 _m_paddd(
                                   *(__m64 *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0x88),
                                   *(__m64 *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0xA8)),
                                 v38),
                               0xAu));
    *(__m64 *)(a4 + 136) = _m_packssdw(
                             _m_psrad(
                               _m_paddd(
                                 _m_paddd(
                                   *(__m64 *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0xB0),
                                   *(__m64 *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0x90)),
                                 v38),
                               0xAu),
                             _m_psrad(
                               _m_paddd(
                                 _m_paddd(
                                   *(__m64 *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0x98),
                                   *(__m64 *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0xB8)),
                                 v38),
                               0xAu));
    v45 = *(_QWORD *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0xC8);
    v46 = *(_QWORD *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0xD0);
    v47 = *(_QWORD *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0xD8);
    *(_QWORD *)a6 = *(_QWORD *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0xC0);
    *(_QWORD *)(a6 + 8) = v45;
    *(_QWORD *)(a6 + 128) = v46;
    *(_QWORD *)(a6 + 136) = v47;
    v48 = *(_QWORD *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0xE8);
    v49 = *(_QWORD *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0xF0);
    v50 = *(_QWORD *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0xF8);
    *(_QWORD *)(a6 + 16) = *(_QWORD *)(((unsigned int)&v51 & 0xFFFFFFE0) + 0xE0);
    *(_QWORD *)(a6 + 24) = v48;
    *(_QWORD *)(a6 + 144) = v49;
    *(_QWORD *)(a6 + 152) = v50;
    if ( !--v10 )
      break;
    v6 = 0;
    v8 = 0;
    v7 = 8;
    v9 = a2 + v26;
    a3 += 32;
    a4 += 16;
    a6 += 32;
  }
}
// A79CA8: using guessed type __int64 qword_A79CA8;
// A79CB0: using guessed type __int64 qword_A79CB0;
// A79CB8: using guessed type __int64 qword_A79CB8;
// A79CC0: using guessed type __int64 qword_A79CC0;
// A79CC8: using guessed type __int64 qword_A79CC8;
// A79CD0: using guessed type __int64 qword_A79CD0;
// A79CD8: using guessed type __int64 qword_A79CD8;
// A79CE0: using guessed type __int64 qword_A79CE0;

//----- (0079D4F0) --------------------------------------------------------
int __cdecl own_ycbycr_to_ycbcr_422_full_mcu_m5(__m64 *a1, int a2, int a3, int a4, int a5)
{
  __m64 *v5; // esi@1
  int v6; // edi@1
  int v7; // eax@1
  int v8; // ebx@1
  signed int v9; // ecx@1
  __m64 v10; // mm6@1
  __m64 v11; // mm4@2
  __m64 v12; // mm5@2
  __m64 v13; // mm0@2
  __m64 v14; // mm1@2
  __m64 v15; // mm4@2
  __m64 v16; // mm5@2
  __m64 v17; // mm0@2
  __m64 v18; // mm1@2
  __m64 v19; // mm2@2
  __m64 v20; // mm0@2
  __m64 v21; // mm2@2
  __m64 v22; // mm4@2
  __m64 v23; // mm5@2
  __m64 v24; // mm3@2
  __m64 v25; // mm1@2
  __m64 v26; // mm2@2
  __m64 v27; // mm3@2
  __m64 v28; // mm0@2
  __m64 v29; // mm4@2
  __m64 v30; // mm1@2
  __m64 v31; // mm5@2
  __m64 v32; // mm0@2
  __m64 v33; // mm1@2
  __m64 v34; // mm4@2
  __m64 v35; // mm5@2
  __m64 v36; // mm0@2
  __m64 v37; // mm1@2
  __m64 v38; // mm2@2
  __m64 v39; // mm0@2
  __m64 v40; // mm2@2
  __m64 v41; // mm4@2
  __m64 v42; // mm5@2
  __m64 v43; // mm3@2
  __m64 v44; // mm1@2
  __m64 v45; // mm2@2
  __m64 v46; // mm3@2
  int v48; // [sp+4h] [bp-4h]@0

  v5 = a1;
  v6 = a3;
  v7 = a4;
  v8 = a5;
  v9 = 8;
  v10.m64_u64 = qword_A79C60;
  do
  {
    v11 = v5[1];
    v12 = v11;
    v13 = _m_punpcklbw((__m64)v5->m64_u64, 0i64);
    v14 = _m_punpckhbw((__m64)v5->m64_u64, 0i64);
    v15 = _m_punpcklbw(v11, 0i64);
    v16 = _m_punpckhbw(v12, 0i64);
    v17 = _m_punpcklwd(v13, _m_psrlq(v13, 0x20u));
    v18 = _m_punpcklwd(v14, _m_psrlq(v14, 0x20u));
    v19 = v17;
    v20 = _m_punpckldq(v17, v18);
    v21 = _m_punpckhdq(v19, v18);
    v22 = _m_punpcklwd(v15, _m_psrlq(v15, 0x20u));
    v23 = _m_punpcklwd(v16, _m_psrlq(v16, 0x20u));
    v24 = v21;
    v25 = _m_punpckhdq(v22, v23);
    *(__m64 *)v6 = _m_psubw(v20, v10);
    *(__m64 *)(v6 + 8) = _m_psubw(_m_punpckldq(v22, v23), v10);
    v26 = _m_punpcklwd(v21, v25);
    v27 = _m_punpckhwd(v24, v25);
    *(__m64 *)v7 = _m_psubw(_m_punpcklwd(v26, v27), v10);
    *(__m64 *)v8 = _m_psubw(_m_punpckhwd(v26, v27), v10);
    v28 = v5[2];
    v29 = v5[3];
    v30 = v28;
    v31 = v29;
    v32 = _m_punpcklbw(v28, 0i64);
    v33 = _m_punpckhbw(v30, 0i64);
    v34 = _m_punpcklbw(v29, 0i64);
    v35 = _m_punpckhbw(v31, 0i64);
    v36 = _m_punpcklwd(v32, _m_psrlq(v32, 0x20u));
    v37 = _m_punpcklwd(v33, _m_psrlq(v33, 0x20u));
    v38 = v36;
    v39 = _m_punpckldq(v36, v37);
    v40 = _m_punpckhdq(v38, v37);
    v41 = _m_punpcklwd(v34, _m_psrlq(v34, 0x20u));
    v42 = _m_punpcklwd(v35, _m_psrlq(v35, 0x20u));
    v43 = v40;
    v44 = _m_punpckhdq(v41, v42);
    *(__m64 *)(v6 + 128) = _m_psubw(v39, v10);
    *(__m64 *)(v6 + 136) = _m_psubw(_m_punpckldq(v41, v42), v10);
    v45 = _m_punpcklwd(v40, v44);
    v46 = _m_punpckhwd(v43, v44);
    *(__m64 *)(v7 + 8) = _m_psubw(_m_punpcklwd(v45, v46), v10);
    *(__m64 *)(v8 + 8) = _m_psubw(_m_punpckhwd(v45, v46), v10);
    v6 += 16;
    v7 += 16;
    v8 += 16;
    v5 = (__m64 *)((char *)v5 + a2);
    --v9;
  }
  while ( v9 );
  return v48;
}
// A79C60: using guessed type __int64 qword_A79C60;

//----- (0079D640) --------------------------------------------------------
int __cdecl own_ycbycr_to_ycbcr_422_full_mcu_a6(__m64 *a1, int a2, int a3, int a4, int a5)
{
  __m64 *v5; // esi@1
  int v6; // edi@1
  int v7; // eax@1
  int v8; // ebx@1
  signed int v9; // ecx@1
  __m64 v10; // mm6@1
  __m64 v11; // mm1@2
  __m64 v12; // mm3@2
  __m64 v13; // mm0@2
  __m64 v14; // mm2@2
  __m64 v15; // mm1@2
  __m64 v16; // mm3@2
  __m64 v17; // mm4@2
  __m64 v18; // mm5@2
  __m64 v19; // mm0@2
  __m64 v20; // mm1@2
  __m64 v21; // mm2@2
  __m64 v22; // mm3@2
  __m64 v23; // mm0@2
  __m64 v24; // mm2@2
  __m64 v25; // mm1@2
  __m64 v26; // mm3@2
  __m64 v27; // mm4@2
  __m64 v28; // mm5@2
  int v30; // [sp+4h] [bp-4h]@0

  v5 = a1;
  v6 = a3;
  v7 = a4;
  v8 = a5;
  v9 = 8;
  v10.m64_u64 = qword_A79C60;
  do
  {
    v11 = v5[1];
    v12 = v11;
    v13 = _m_pshufw(_m_punpcklbw((__m64)v5->m64_u64, 0i64), -40);
    v14 = _m_pshufw(_m_punpckhbw((__m64)v5->m64_u64, 0i64), -40);
    v15 = _m_pshufw(_m_punpcklbw(v11, 0i64), -40);
    v16 = _m_pshufw(_m_punpckhbw(v12, 0i64), -40);
    *(__m64 *)v6 = _m_psubw(_m_punpckldq(v13, v14), v10);
    *(__m64 *)(v6 + 8) = _m_psubw(_m_punpckldq(v15, v16), v10);
    v17 = _m_pshufw(_m_punpckhdq(v13, v14), -40);
    v18 = _m_pshufw(_m_punpckhdq(v15, v16), -40);
    *(__m64 *)v7 = _m_psubw(_m_punpckldq(v17, v18), v10);
    *(__m64 *)v8 = _m_psubw(_m_punpckhdq(v17, v18), v10);
    v19 = v5[2];
    v20 = v5[3];
    v21 = v19;
    v22 = v20;
    v23 = _m_pshufw(_m_punpcklbw(v19, 0i64), -40);
    v24 = _m_pshufw(_m_punpckhbw(v21, 0i64), -40);
    v25 = _m_pshufw(_m_punpcklbw(v20, 0i64), -40);
    v26 = _m_pshufw(_m_punpckhbw(v22, 0i64), -40);
    *(__m64 *)(v6 + 128) = _m_psubw(_m_punpckldq(v23, v24), v10);
    *(__m64 *)(v6 + 136) = _m_psubw(_m_punpckldq(v25, v26), v10);
    v27 = _m_pshufw(_m_punpckhdq(v23, v24), -40);
    v28 = _m_pshufw(_m_punpckhdq(v25, v26), -40);
    *(__m64 *)(v7 + 8) = _m_psubw(_m_punpckldq(v27, v28), v10);
    *(__m64 *)(v8 + 8) = _m_psubw(_m_punpckhdq(v27, v28), v10);
    v6 += 16;
    v7 += 16;
    v8 += 16;
    v5 = (__m64 *)((char *)v5 + a2);
    --v9;
  }
  while ( v9 );
  return v30;
}
// A79C60: using guessed type __int64 qword_A79C60;

//----- (0079D760) --------------------------------------------------------
void __cdecl own_y_to_y_111_full_mcu_m5(__m64 *a1, int a2, int a3)
{
  __m64 *v3; // esi@1
  int v4; // edi@1
  signed int v5; // ecx@1
  __m64 v6; // mm6@1
  __m64 v7; // mm4@2
  __m64 v8; // mm1@2

  v3 = a1;
  v4 = a3;
  v5 = 4;
  v6.m64_u64 = qword_A79C60;
  do
  {
    v7 = *(__m64 *)((char *)v3 + a2);
    v8 = _m_psubw(_m_punpckhbw((__m64)v3->m64_u64, 0i64), v6);
    *(__m64 *)v4 = _m_psubw(_m_punpcklbw((__m64)v3->m64_u64, 0i64), v6);
    *(__m64 *)(v4 + 8) = v8;
    *(__m64 *)(v4 + 16) = _m_psubw(_m_punpcklbw(v7, 0i64), v6);
    *(__m64 *)(v4 + 24) = _m_psubw(_m_punpckhbw(v7, 0i64), v6);
    v4 += 32;
    v3 = (__m64 *)((char *)v3 + a2 + a2);
    --v5;
  }
  while ( v5 );
}
// A79C60: using guessed type __int64 qword_A79C60;

//----- (0079D7D0) --------------------------------------------------------
void __cdecl own_y_111_to_y_full_mcu_m5(int a1, __m64 *a2, int a3)
{
  int v3; // esi@1
  __m64 *v4; // edi@1
  signed int v5; // ecx@1
  __m64 v6; // mm2@2

  v3 = a1;
  v4 = a2;
  v5 = 4;
  do
  {
    v6 = _m_packuswb(*(__m64 *)(v3 + 16), *(__m64 *)(v3 + 24));
    v4->m64_u64 = (unsigned __int64)_m_packuswb(*(__m64 *)v3, *(__m64 *)(v3 + 8));
    *(__m64 *)((char *)v4 + a3) = v6;
    v3 += 32;
    v4 = (__m64 *)((char *)v4 + a3 + a3);
    --v5;
  }
  while ( v5 );
}

//----- (0079D820) --------------------------------------------------------
void __cdecl __spoils<ecx> own_ycbcr_111_to_rgb_full_mcu_m5(__m64 *a1, int a2, int a3, int a4, int a5)
{
  __m64 *v5; // esi@1
  int v6; // ebx@1
  int v7; // eax@1
  int v8; // edi@1
  signed int v9; // ecx@1
  __m64 v10; // mm1@2
  __m64 v11; // mm2@2
  __m64 v12; // mm3@2
  __m64 v13; // mm4@2
  __m64 v14; // mm0@2
  __m64 v15; // mm7@2
  __m64 v16; // mm3@2
  __m64 v17; // mm1@2
  __m64 v18; // mm6@2
  __m64 v19; // mm3@2
  __m64 v20; // mm5@2
  __m64 v21; // mm3@2
  __m64 v22; // mm1@2
  __m64 v23; // mm3@2
  __m64 v24; // mm4@2
  __m64 v25; // mm6@2
  __m64 v26; // mm0@2
  __m64 v27; // mm2@2
  __m64 v28; // mm3@2
  __m64 v29; // mm1@2
  __m64 v30; // mm0@2
  __m64 v31; // mm1@2
  __m64 v32; // mm0@2
  __m64 v33; // mm4@2
  __m64 v34; // mm5@2
  __m64 v35; // mm0@2
  unsigned __int8 v36; // of@2
  char v37; // [sp+20h] [bp-30h]@2

  v5 = a1;
  v6 = a2;
  v7 = a3;
  v8 = a4;
  v9 = 7;
  do
  {
    v10 = _m_psllw(*(__m64 *)v7, 4u);
    v11 = _m_psllw(*(__m64 *)(v7 + 8), 4u);
    v12 = _m_psllw(*(__m64 *)v6, 4u);
    v13 = _m_psllw(*(__m64 *)(v6 + 8), 4u);
    v14 = v10;
    v15 = v12;
    v16 = _m_pmulhw(v12, (__m64)qword_A79CF8);
    v17 = _m_psubw(_m_pmulhw(v10, (__m64)qword_A79CF0), (__m64)qword_A79D20);
    v18 = _m_pmulhw((__m64)qword_A79CF8, v13);
    *(__m64 *)(((unsigned int)&v37 & 0xFFFFFFE0) + 0x18) = _m_psubw(
                                                             _m_pmulhw((__m64)qword_A79CF0, v11),
                                                             (__m64)qword_A79D20);
    v19 = _m_psubw(v16, (__m64)qword_A79D18);
    *(__m64 *)(((unsigned int)&v37 & 0xFFFFFFE0) + 0x28) = _m_psubw(v18, (__m64)qword_A79D18);
    v20 = _m_packssdw(
            _m_psrad(_m_psubd(_m_pmaddwd(_m_punpcklwd(v14, v15), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu),
            _m_psrad(_m_psubd(_m_pmaddwd(_m_punpckhwd(v14, v15), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu));
    v7 += 16;
    *(__m64 *)(((unsigned int)&v37 & 0xFFFFFFE0) + 0x20) = _m_packssdw(
                                                             _m_psrad(
                                                               _m_psubd(
                                                                 _m_pmaddwd(_m_punpcklwd(v11, v13), (__m64)qword_A79D00),
                                                                 (__m64)qword_A79D28),
                                                               0xCu),
                                                             _m_psrad(
                                                               _m_psubd(
                                                                 _m_pmaddwd(_m_punpckhwd(v11, v13), (__m64)qword_A79D00),
                                                                 (__m64)qword_A79D28),
                                                               0xCu));
    v21 = _m_paddw(v19, (__m64)v5->m64_u64);
    v22 = _m_packuswb(_m_paddw(v17, (__m64)v5->m64_u64), _m_psubw((__m64)v5->m64_u64, v20));
    v6 += 16;
    v23 = _m_punpcklbw(_m_packuswb(v21, v21), 0i64);
    v24 = _m_por(_m_punpcklbw(v22, 0i64), _m_psllq(_m_punpckhbw(v22, 0i64), 8u));
    v25 = _m_por(_m_pandn((__m64)qword_A79D50, v23), _m_psllq(_m_pand(v23, (__m64)qword_A79D50), 8u));
    v26 = v5[1];
    v27 = _m_psrlq(_m_pand(v24, (__m64)qword_A79D30), 0x28u);
    *(__m64 *)v8 = _m_por(
                     _m_por(
                       _m_psllq(_m_pand(v24, (__m64)qword_A79D40), 8u),
                       _m_por(_m_psllq(_m_pand(v24, (__m64)qword_A79D38), 0x10u), _m_pand(v24, (__m64)qword_A79D48))),
                     _m_psrlq(_m_psllq(v25, 0x20u), 0x10u));
    v28 = _m_paddw(*(__m64 *)(((unsigned int)&v37 & 0xFFFFFFE0) + 0x28), v26);
    v29 = _m_packuswb(
            _m_paddw(*(__m64 *)(((unsigned int)&v37 & 0xFFFFFFE0) + 0x18), v26),
            _m_psubw(v26, *(__m64 *)(((unsigned int)&v37 & 0xFFFFFFE0) + 0x20)));
    v30 = v29;
    v31 = _m_punpcklbw(v29, 0i64);
    v5 += 2;
    v32 = _m_por(_m_punpckhbw(v30, 0i64), _m_psllq(_m_punpcklbw(_m_packuswb(v28, v28), 0i64), 8u));
    v33 = _m_por(_m_pandn((__m64)qword_A79D50, v31), _m_psllq(_m_pand(v31, (__m64)qword_A79D50), 8u));
    v34 = _m_por(_m_psllq(_m_pand(v32, (__m64)qword_A79D48), 0x28u), _m_psllq(v33, 0x20u));
    v35 = _m_por(
            _m_por(
              _m_por(_m_pand(v32, (__m64)qword_A79D30), _m_psrlq(_m_pand(v32, (__m64)qword_A79D38), 8u)),
              _m_psllq(_m_psrlq(v33, 0x20u), 0x10u)),
            _m_psrld(_m_pand(v32, (__m64)qword_A79D40), 0x10u));
    *(__m64 *)(v8 + 8) = _m_por(_m_por(v27, _m_psrlq(v25, 0x20u)), v34);
    *(__m64 *)(v8 + 16) = v35;
    v8 += a5;
    v36 = __OFSUB__(v9--, 1);
  }
  while ( !((v9 < 0) ^ v36) );
}
// A79CF0: using guessed type __int64 qword_A79CF0;
// A79CF8: using guessed type __int64 qword_A79CF8;
// A79D00: using guessed type __int64 qword_A79D00;
// A79D18: using guessed type __int64 qword_A79D18;
// A79D20: using guessed type __int64 qword_A79D20;
// A79D28: using guessed type __int64 qword_A79D28;
// A79D30: using guessed type __int64 qword_A79D30;
// A79D38: using guessed type __int64 qword_A79D38;
// A79D40: using guessed type __int64 qword_A79D40;
// A79D48: using guessed type __int64 qword_A79D48;
// A79D50: using guessed type __int64 qword_A79D50;

//----- (0079DA50) --------------------------------------------------------
void __cdecl __spoils<ecx> own_ycbcr_111_to_bgr_full_mcu_m5(__m64 *a1, int a2, int a3, int a4, int a5)
{
  __m64 *v5; // esi@1
  int v6; // eax@1
  int v7; // ebx@1
  int v8; // edi@1
  signed int v9; // ecx@1
  __m64 v10; // mm1@2
  __m64 v11; // mm2@2
  __m64 v12; // mm3@2
  __m64 v13; // mm4@2
  __m64 v14; // mm0@2
  __m64 v15; // mm7@2
  __m64 v16; // mm3@2
  __m64 v17; // mm1@2
  __m64 v18; // mm6@2
  __m64 v19; // mm5@2
  __m64 v20; // mm3@2
  __m64 v21; // mm1@2
  __m64 v22; // mm3@2
  __m64 v23; // mm4@2
  __m64 v24; // mm6@2
  __m64 v25; // mm0@2
  __m64 v26; // mm2@2
  __m64 v27; // mm3@2
  __m64 v28; // mm1@2
  __m64 v29; // mm0@2
  __m64 v30; // mm1@2
  __m64 v31; // mm0@2
  __m64 v32; // mm4@2
  __m64 v33; // mm5@2
  __m64 v34; // mm0@2
  unsigned __int8 v35; // of@2
  char v36; // [sp+20h] [bp-30h]@2

  v5 = a1;
  v6 = a2;
  v7 = a3;
  v8 = a4;
  v9 = 7;
  do
  {
    v10 = _m_psllw(*(__m64 *)v6, 4u);
    v11 = _m_psllw(*(__m64 *)(v6 + 8), 4u);
    v12 = _m_psllw(*(__m64 *)v7, 4u);
    v13 = _m_psllw(*(__m64 *)(v7 + 8), 4u);
    v14 = v10;
    v15 = v12;
    v16 = _m_psubw(_m_pmulhw(v12, (__m64)qword_A79CF0), (__m64)qword_A79D20);
    v17 = _m_psubw(_m_pmulhw(v10, (__m64)qword_A79CF8), (__m64)qword_A79D18);
    v18 = _m_psubw(_m_pmulhw((__m64)qword_A79CF0, v13), (__m64)qword_A79D20);
    *(__m64 *)(((unsigned int)&v36 & 0xFFFFFFE0) + 0x18) = _m_psubw(
                                                             _m_pmulhw((__m64)qword_A79CF8, v11),
                                                             (__m64)qword_A79D18);
    *(__m64 *)(((unsigned int)&v36 & 0xFFFFFFE0) + 0x28) = v18;
    v19 = _m_packssdw(
            _m_psrad(_m_psubd(_m_pmaddwd(_m_punpcklwd(v15, v14), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu),
            _m_psrad(_m_psubd(_m_pmaddwd(_m_punpckhwd(v15, v14), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu));
    *(__m64 *)(((unsigned int)&v36 & 0xFFFFFFE0) + 0x20) = _m_packssdw(
                                                             _m_psrad(
                                                               _m_psubd(
                                                                 _m_pmaddwd(_m_punpcklwd(v13, v11), (__m64)qword_A79D00),
                                                                 (__m64)qword_A79D28),
                                                               0xCu),
                                                             _m_psrad(
                                                               _m_psubd(
                                                                 _m_pmaddwd(_m_punpckhwd(v13, v11), (__m64)qword_A79D00),
                                                                 (__m64)qword_A79D28),
                                                               0xCu));
    v20 = _m_paddw(v16, (__m64)v5->m64_u64);
    v21 = _m_packuswb(_m_paddw(v17, (__m64)v5->m64_u64), _m_psubw((__m64)v5->m64_u64, v19));
    v22 = _m_punpcklbw(_m_packuswb(v20, v20), 0i64);
    v23 = _m_por(_m_punpcklbw(v21, 0i64), _m_psllq(_m_punpckhbw(v21, 0i64), 8u));
    v24 = _m_por(_m_pandn((__m64)qword_A79D50, v22), _m_psllq(_m_pand(v22, (__m64)qword_A79D50), 8u));
    v25 = v5[1];
    v26 = _m_psrlq(_m_pand(v23, (__m64)qword_A79D30), 0x28u);
    *(__m64 *)v8 = _m_por(
                     _m_por(
                       _m_psllq(_m_pand(v23, (__m64)qword_A79D40), 8u),
                       _m_por(_m_psllq(_m_pand(v23, (__m64)qword_A79D38), 0x10u), _m_pand(v23, (__m64)qword_A79D48))),
                     _m_psrlq(_m_psllq(v24, 0x20u), 0x10u));
    v27 = _m_paddw(*(__m64 *)(((unsigned int)&v36 & 0xFFFFFFE0) + 0x28), v25);
    v28 = _m_packuswb(
            _m_paddw(*(__m64 *)(((unsigned int)&v36 & 0xFFFFFFE0) + 0x18), v25),
            _m_psubw(v25, *(__m64 *)(((unsigned int)&v36 & 0xFFFFFFE0) + 0x20)));
    v29 = v28;
    v30 = _m_punpcklbw(v28, 0i64);
    v31 = _m_por(_m_punpckhbw(v29, 0i64), _m_psllq(_m_punpcklbw(_m_packuswb(v27, v27), 0i64), 8u));
    v32 = _m_por(_m_pandn((__m64)qword_A79D50, v30), _m_psllq(_m_pand(v30, (__m64)qword_A79D50), 8u));
    v33 = _m_por(_m_psllq(_m_pand(v31, (__m64)qword_A79D48), 0x28u), _m_psllq(v32, 0x20u));
    v34 = _m_por(
            _m_por(
              _m_por(_m_pand(v31, (__m64)qword_A79D30), _m_psrlq(_m_pand(v31, (__m64)qword_A79D38), 8u)),
              _m_psllq(_m_psrlq(v32, 0x20u), 0x10u)),
            _m_psrld(_m_pand(v31, (__m64)qword_A79D40), 0x10u));
    *(__m64 *)(v8 + 8) = _m_por(_m_por(v26, _m_psrlq(v24, 0x20u)), v33);
    *(__m64 *)(v8 + 16) = v34;
    v8 += a5;
    v5 += 2;
    v6 += 16;
    v7 += 16;
    v35 = __OFSUB__(v9--, 1);
  }
  while ( !((v9 < 0) ^ v35) );
}
// A79CF0: using guessed type __int64 qword_A79CF0;
// A79CF8: using guessed type __int64 qword_A79CF8;
// A79D00: using guessed type __int64 qword_A79D00;
// A79D18: using guessed type __int64 qword_A79D18;
// A79D20: using guessed type __int64 qword_A79D20;
// A79D28: using guessed type __int64 qword_A79D28;
// A79D30: using guessed type __int64 qword_A79D30;
// A79D38: using guessed type __int64 qword_A79D38;
// A79D40: using guessed type __int64 qword_A79D40;
// A79D48: using guessed type __int64 qword_A79D48;
// A79D50: using guessed type __int64 qword_A79D50;

//----- (0079DC80) --------------------------------------------------------
int __cdecl __spoils<ecx> own_ycbcr_111_to_rgba_fpx_full_mcu_m5(__m64 *a1, int a2, int a3, int a4, int a5)
{
  __m64 *v5; // esi@1
  int v6; // eax@1
  int v7; // ebx@1
  int v8; // edi@1
  signed int v9; // ecx@1
  __m64 v10; // mm1@2
  __m64 v11; // mm3@2
  __m64 v12; // mm0@2
  __m64 v13; // mm2@2
  __m64 v14; // mm6@2
  __m64 v15; // mm3@2
  __m64 v16; // mm0@2
  __m64 v17; // mm4@2
  __m64 v18; // mm5@2
  __m64 v19; // mm0@2
  __m64 v20; // mm6@2
  __m64 v21; // mm2@2
  __m64 v22; // mm0@2
  __m64 v23; // mm3@2
  __m64 v24; // mm6@2
  int v26; // [sp+4h] [bp-4h]@0

  v5 = a1;
  v6 = a2;
  v7 = a3;
  v8 = a4;
  v9 = 8;
  do
  {
    v10 = _m_psllw(*(__m64 *)v7, 4u);
    v11 = _m_psllw(*(__m64 *)v6, 4u);
    v12 = _m_punpcklbw(
            _m_packuswb(
              _m_paddsw(_m_psubw(_m_pmulhw((__m64)qword_A79D68, v10), (__m64)qword_A79D90), (__m64)v5->m64_u64),
              0i64),
            0i64);
    v13 = _m_punpcklbw(
            _m_packuswb(
              _m_paddsw(_m_psubw(_m_pmulhw((__m64)qword_A79D70, v11), (__m64)qword_A79D88), (__m64)v5->m64_u64),
              0i64),
            0i64);
    v14 = _m_punpcklbw(
            _m_packuswb(
              _m_psubsw(
                (__m64)v5->m64_u64,
                _m_psraw(
                  _m_psubw(
                    _m_paddw(
                      _m_pmullw((__m64)qword_A79D80, _m_psrlw(v10, 4u)),
                      _m_pmullw((__m64)qword_A79D78, _m_psrlw(v11, 4u))),
                    (__m64)qword_A79D98),
                  8u)),
              0i64),
            0i64);
    v15 = _m_punpcklwd(v12, 0i64);
    v16 = _m_por(
            _m_por(
              _m_por(_m_punpckhwd(v12, 0i64), _m_pslld(_m_punpckhwd(v13, 0i64), 0x10u)),
              _m_pslld(_m_punpckhwd(v14, 0i64), 8u)),
            (__m64)qword_A79DA0);
    *(__m64 *)v8 = _m_por(
                     _m_por(
                       _m_por(v15, _m_pslld(_m_punpcklwd(v13, 0i64), 0x10u)),
                       _m_pslld(_m_punpcklwd(v14, 0i64), 8u)),
                     (__m64)qword_A79DA0);
    *(__m64 *)(v8 + 8) = v16;
    v17 = _m_psllw(*(__m64 *)(v7 + 8), 4u);
    v18 = _m_psllw(*(__m64 *)(v6 + 8), 4u);
    v19 = v5[1];
    v20 = _m_punpcklbw(
            _m_packuswb(_m_paddsw(_m_psubw(_m_pmulhw((__m64)qword_A79D68, v17), (__m64)qword_A79D90), v19), 0i64),
            0i64);
    v21 = _m_punpcklbw(
            _m_packuswb(_m_paddsw(_m_psubw(_m_pmulhw((__m64)qword_A79D70, v18), (__m64)qword_A79D88), v19), 0i64),
            0i64);
    v22 = _m_punpcklbw(
            _m_packuswb(
              _m_psubsw(
                v19,
                _m_psraw(
                  _m_psubw(
                    _m_paddw(
                      _m_pmullw((__m64)qword_A79D78, _m_psrlw(v18, 4u)),
                      _m_pmullw((__m64)qword_A79D80, _m_psrlw(v17, 4u))),
                    (__m64)qword_A79D98),
                  8u)),
              0i64),
            0i64);
    v23 = _m_punpcklwd(v20, 0i64);
    v24 = _m_por(
            _m_por(
              _m_por(_m_punpckhwd(v20, 0i64), _m_pslld(_m_punpckhwd(v21, 0i64), 0x10u)),
              _m_pslld(_m_punpckhwd(v22, 0i64), 8u)),
            (__m64)qword_A79DA0);
    v5 += 2;
    v6 += 16;
    v7 += 16;
    *(__m64 *)(v8 + 16) = _m_por(
                            _m_por(
                              _m_por(v23, _m_pslld(_m_punpcklwd(v21, 0i64), 0x10u)),
                              _m_pslld(_m_punpcklwd(v22, 0i64), 8u)),
                            (__m64)qword_A79DA0);
    *(__m64 *)(v8 + 24) = v24;
    v8 += a5;
    --v9;
  }
  while ( v9 );
  return v26;
}
// A79D68: using guessed type __int64 qword_A79D68;
// A79D70: using guessed type __int64 qword_A79D70;
// A79D78: using guessed type __int64 qword_A79D78;
// A79D80: using guessed type __int64 qword_A79D80;
// A79D88: using guessed type __int64 qword_A79D88;
// A79D90: using guessed type __int64 qword_A79D90;
// A79D98: using guessed type __int64 qword_A79D98;
// A79DA0: using guessed type __int64 qword_A79DA0;

//----- (0079DE50) --------------------------------------------------------
int __cdecl __spoils<ecx> own_ycbcra_fpx_1111_to_rgba_fpx_full_mcu_m5(__m64 *a1, int a2, int a3, int a4, int a5, int a6)
{
  __m64 *v6; // esi@1
  int v7; // eax@1
  int v8; // ebx@1
  int v9; // edi@1
  signed int v10; // ecx@1
  __m64 v11; // mm1@2
  __m64 v12; // mm3@2
  __m64 v13; // mm6@2
  __m64 v14; // mm4@2
  __m64 v15; // mm1@2
  __m64 v16; // mm3@2
  __m64 v17; // mm5@2
  __m64 v18; // mm1@2
  __m64 v19; // mm3@2
  __m64 v20; // mm6@2
  __m64 v21; // mm0@2
  __m64 v22; // mm2@2
  __m64 v23; // mm6@2
  __m64 v24; // mm4@2
  __m64 v25; // mm1@2
  __m64 v26; // mm3@2
  __m64 v27; // mm5@2
  int v29; // [sp+4h] [bp-4h]@0

  v6 = a1;
  v7 = a2;
  v8 = a3;
  v9 = a5;
  v10 = 8;
  do
  {
    v11 = _m_psllw(*(__m64 *)v8, 4u);
    v12 = _m_psllw(*(__m64 *)v7, 4u);
    v13 = _m_punpcklbw(
            _m_packuswb(
              _m_psubsw(
                (__m64)v6->m64_u64,
                _m_psraw(
                  _m_psubw(
                    _m_paddw(
                      _m_pmullw((__m64)qword_A79D80, _m_psrlw(v11, 4u)),
                      _m_pmullw((__m64)qword_A79D78, _m_psrlw(v12, 4u))),
                    (__m64)qword_A79D98),
                  8u)),
              0i64),
            0i64);
    v14 = v6[48];
    v15 = _m_psubw(
            (__m64)qword_A79DA8,
            _m_punpcklbw(
              _m_packuswb(
                _m_paddsw(_m_psubw(_m_pmulhw((__m64)qword_A79D68, v11), (__m64)qword_A79D90), (__m64)v6->m64_u64),
                0i64),
              0i64));
    v16 = _m_psubw(
            (__m64)qword_A79DA8,
            _m_punpcklbw(
              _m_packuswb(
                _m_paddsw(_m_psubw(_m_pmulhw((__m64)qword_A79D70, v12), (__m64)qword_A79D88), (__m64)v6->m64_u64),
                0i64),
              0i64));
    v17 = _m_psubw((__m64)qword_A79DA8, v13);
    *(__m64 *)v9 = _m_por(
                     _m_por(
                       _m_por(_m_punpcklwd(v15, 0i64), _m_pslld(_m_punpcklwd(v16, 0i64), 0x10u)),
                       _m_pslld(_m_punpcklwd(v17, 0i64), 8u)),
                     _m_pslld(_m_punpcklwd(0i64, v14), 8u));
    *(__m64 *)(v9 + 8) = _m_por(
                           _m_por(
                             _m_por(_m_punpckhwd(v15, 0i64), _m_pslld(_m_punpckhwd(v16, 0i64), 0x10u)),
                             _m_pslld(_m_punpckhwd(v17, 0i64), 8u)),
                           _m_pslld(_m_punpckhwd(0i64, v14), 8u));
    v18 = _m_psllw(*(__m64 *)(v8 + 8), 4u);
    v19 = _m_psllw(*(__m64 *)(v7 + 8), 4u);
    v20 = v6[1];
    v21 = _m_paddsw(_m_psubw(_m_pmulhw((__m64)qword_A79D68, v18), (__m64)qword_A79D90), v20);
    v22 = _m_paddsw(_m_psubw(_m_pmulhw((__m64)qword_A79D70, v19), (__m64)qword_A79D88), v20);
    v23 = _m_punpcklbw(
            _m_packuswb(
              _m_psubsw(
                v20,
                _m_psraw(
                  _m_psubw(
                    _m_paddw(
                      _m_pmullw((__m64)qword_A79D80, _m_psrlw(v18, 4u)),
                      _m_pmullw((__m64)qword_A79D78, _m_psrlw(v19, 4u))),
                    (__m64)qword_A79D98),
                  8u)),
              0i64),
            0i64);
    v24 = v6[49];
    v25 = _m_psubw((__m64)qword_A79DA8, _m_punpcklbw(_m_packuswb(v21, 0i64), 0i64));
    v26 = _m_psubw((__m64)qword_A79DA8, _m_punpcklbw(_m_packuswb(v22, 0i64), 0i64));
    v27 = _m_psubw((__m64)qword_A79DA8, v23);
    v6 += 2;
    v7 += 16;
    v8 += 16;
    *(__m64 *)(v9 + 16) = _m_por(
                            _m_por(
                              _m_por(_m_punpcklwd(v25, 0i64), _m_pslld(_m_punpcklwd(v26, 0i64), 0x10u)),
                              _m_pslld(_m_punpcklwd(v27, 0i64), 8u)),
                            _m_pslld(_m_punpcklwd(0i64, v24), 8u));
    *(__m64 *)(v9 + 24) = _m_por(
                            _m_por(
                              _m_por(_m_punpckhwd(v25, 0i64), _m_pslld(_m_punpckhwd(v26, 0i64), 0x10u)),
                              _m_pslld(_m_punpckhwd(v27, 0i64), 8u)),
                            _m_pslld(_m_punpckhwd(0i64, v24), 8u));
    v9 += a6;
    --v10;
  }
  while ( v10 );
  return v29;
}
// A79D68: using guessed type __int64 qword_A79D68;
// A79D70: using guessed type __int64 qword_A79D70;
// A79D78: using guessed type __int64 qword_A79D78;
// A79D80: using guessed type __int64 qword_A79D80;
// A79D88: using guessed type __int64 qword_A79D88;
// A79D90: using guessed type __int64 qword_A79D90;
// A79D98: using guessed type __int64 qword_A79D98;
// A79DA8: using guessed type __int64 qword_A79DA8;

//----- (0079E070) --------------------------------------------------------
void __cdecl __spoils<ecx> own_ycbcr_422_to_rgb_full_mcu_m5(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // esi@1
  int v6; // eax@1
  int v7; // ebx@1
  int v8; // edi@1
  __m64 *v9; // edx@1
  signed int v10; // ecx@1
  __m64 v11; // mm2@2
  __m64 v12; // mm1@2
  __m64 v13; // mm4@2
  __m64 v14; // mm3@2
  __m64 v15; // mm5@2
  __m64 v16; // mm2@2
  __m64 v17; // mm5@2
  __m64 v18; // mm2@2
  __m64 v19; // mm0@2
  __m64 v20; // mm7@2
  __m64 v21; // mm6@2
  __m64 v22; // mm0@2
  __m64 v23; // mm2@2
  __m64 v24; // mm6@2
  __m64 v25; // mm7@2
  __m64 v26; // mm5@2
  __m64 v27; // mm2@2
  __m64 v28; // mm0@2
  __m64 v29; // mm2@2
  __m64 v30; // mm1@2
  __m64 v31; // mm0@2
  __m64 v32; // mm6@2
  __m64 v33; // mm0@2
  __m64 v34; // mm2@2
  __m64 v35; // mm0@2
  __m64 v36; // mm2@2
  __m64 v37; // mm1@2
  __m64 v38; // mm4@2
  __m64 v39; // mm3@2
  __m64 v40; // mm5@2
  __m64 v41; // mm2@2
  __m64 v42; // mm5@2
  __m64 v43; // mm2@2
  __m64 v44; // mm0@2
  __m64 v45; // mm7@2
  __m64 v46; // mm6@2
  __m64 v47; // mm0@2
  __m64 v48; // mm2@2
  __m64 v49; // mm6@2
  __m64 v50; // mm7@2
  __m64 v51; // mm5@2
  __m64 v52; // mm2@2
  __m64 v53; // mm0@2
  __m64 v54; // mm1@2
  __m64 v55; // mm2@2
  __m64 v56; // mm0@2
  __m64 v57; // mm4@2
  __m64 v58; // mm0@2
  __m64 v59; // mm2@2
  __m64 v60; // mm0@2
  char v61; // [sp+20h] [bp-18h]@1

  v5 = a1;
  v6 = a2;
  v7 = a3;
  v8 = a4;
  v9 = (__m64 *)((unsigned int)&v61 & 0xFFFFFFE0);
  v10 = 8;
  do
  {
    v11 = _m_psllw(*(__m64 *)v7, 4u);
    v12 = _m_psllw(*(__m64 *)v6, 4u);
    v13 = _m_psubw(_m_pmulhw((__m64)qword_A79CF8, v12), (__m64)qword_A79D18);
    v14 = _m_psubw(_m_pmulhw((__m64)qword_A79CF0, v11), (__m64)qword_A79D20);
    v15 = _m_psrad(_m_psubd(_m_pmaddwd(_m_punpcklwd(v11, v12), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu);
    v16 = _m_psrad(_m_psubd(_m_pmaddwd(_m_punpckhwd(v11, v12), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu);
    *(__m64 *)(((unsigned int)&v61 & 0xFFFFFFE0) + 0x10) = _m_punpckhwd(v13, v13);
    v9->m64_u64 = (unsigned __int64)_m_punpckhwd(v14, v14);
    v17 = _m_packssdw(v15, v15);
    v18 = _m_packssdw(v16, v16);
    v19 = *(__m64 *)v5;
    *(__m64 *)(((unsigned int)&v61 & 0xFFFFFFE0) + 8) = _m_punpcklwd(v18, v18);
    v20 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v14, v14), v19), 0i64), 0i64);
    v21 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v13, v13), v19), 0i64), 0i64);
    v22 = _m_punpcklbw(_m_packuswb(_m_psubsw(v19, _m_punpcklwd(v17, v17)), 0i64), 0i64);
    v23 = _m_psllq(v21, 8u);
    v24 = _m_por(v21, _m_psrlq(v20, 8u));
    v25 = _m_pand(_m_por(v20, _m_psllq(v22, 8u)), (__m64)qword_A79D58);
    v26 = _m_por(_m_pand(_m_por(v22, v23), (__m64)qword_A79D50), _m_pand(v24, (__m64)qword_A79D58));
    v27 = *(__m64 *)(((unsigned int)&v61 & 0xFFFFFFE0) + 0x10);
    *(__m64 *)v8 = _m_por(
                     _m_pand(_m_por(_m_psllq(v25, 0x10u), v25), (__m64)qword_A79D60),
                     _m_psrlq(_m_psllq(v26, 0x20u), 0x10u));
    v28 = *(__m64 *)(v5 + 8);
    v29 = _m_punpcklbw(_m_packuswb(_m_paddsw(v27, v28), 0i64), 0i64);
    v30 = _m_punpcklbw(_m_packuswb(_m_paddsw((__m64)v9->m64_u64, v28), 0i64), 0i64);
    v31 = _m_punpcklbw(_m_packuswb(_m_psubsw(v28, *(__m64 *)(((unsigned int)&v61 & 0xFFFFFFE0) + 8)), 0i64), 0i64);
    v32 = _m_psllq(v31, 8u);
    v33 = _m_pand(_m_por(v31, _m_psllq(v29, 8u)), (__m64)qword_A79D50);
    v34 = _m_por(
            _m_psllq(_m_pand(_m_por(v29, _m_psrlq(v30, 8u)), (__m64)qword_A79D58), 0x10u),
            _m_pand(_m_por(v30, v32), (__m64)qword_A79D58));
    v35 = _m_pand(_m_por(v33, _m_psrlq(v33, 0x10u)), (__m64)qword_A79D60);
    *(__m64 *)(v8 + 8) = _m_por(_m_psrlq(v26, 0x20u), _m_psllq(v34, 0x20u));
    *(__m64 *)(v8 + 16) = _m_por(_m_psllq(_m_psrlq(v34, 0x20u), 0x10u), v35);
    v36 = _m_psllw(*(__m64 *)(v7 + 8), 4u);
    v37 = _m_psllw(*(__m64 *)(v6 + 8), 4u);
    v38 = _m_psubw(_m_pmulhw((__m64)qword_A79CF8, v37), (__m64)qword_A79D18);
    v39 = _m_psubw(_m_pmulhw((__m64)qword_A79CF0, v36), (__m64)qword_A79D20);
    v40 = _m_psrad(_m_psubd(_m_pmaddwd(_m_punpcklwd(v36, v37), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu);
    v41 = _m_psrad(_m_psubd(_m_pmaddwd(_m_punpckhwd(v36, v37), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu);
    *(__m64 *)(((unsigned int)&v61 & 0xFFFFFFE0) + 0x10) = _m_punpckhwd(v38, v38);
    v9->m64_u64 = (unsigned __int64)_m_punpckhwd(v39, v39);
    v42 = _m_packssdw(v40, v40);
    v6 += 16;
    v43 = _m_packssdw(v41, v41);
    v7 += 16;
    v44 = *(__m64 *)(v5 + 128);
    *(__m64 *)(((unsigned int)&v61 & 0xFFFFFFE0) + 8) = _m_punpcklwd(v43, v43);
    v45 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v39, v39), v44), 0i64), 0i64);
    v46 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v38, v38), v44), 0i64), 0i64);
    v47 = _m_punpcklbw(_m_packuswb(_m_psubsw(v44, _m_punpcklwd(v42, v42)), 0i64), 0i64);
    v48 = _m_psllq(v46, 8u);
    v49 = _m_por(v46, _m_psrlq(v45, 8u));
    v50 = _m_pand(_m_por(v45, _m_psllq(v47, 8u)), (__m64)qword_A79D58);
    v51 = _m_por(_m_pand(_m_por(v47, v48), (__m64)qword_A79D50), _m_pand(v49, (__m64)qword_A79D58));
    v52 = *(__m64 *)(((unsigned int)&v61 & 0xFFFFFFE0) + 0x10);
    *(__m64 *)(v8 + 24) = _m_por(
                            _m_pand(_m_por(_m_psllq(v50, 0x10u), v50), (__m64)qword_A79D60),
                            _m_psrlq(_m_psllq(v51, 0x20u), 0x10u));
    v53 = *(__m64 *)(v5 + 136);
    v54 = _m_punpcklbw(_m_packuswb(_m_paddsw((__m64)v9->m64_u64, v53), 0i64), 0i64);
    v55 = _m_punpcklbw(_m_packuswb(_m_paddsw(v52, v53), 0i64), 0i64);
    v56 = _m_punpcklbw(_m_packuswb(_m_psubsw(v53, *(__m64 *)(((unsigned int)&v61 & 0xFFFFFFE0) + 8)), 0i64), 0i64);
    v57 = _m_psllq(v56, 8u);
    v58 = _m_pand(_m_por(v56, _m_psllq(v55, 8u)), (__m64)qword_A79D50);
    v59 = _m_por(
            _m_psllq(_m_pand(_m_por(v55, _m_psrlq(v54, 8u)), (__m64)qword_A79D58), 0x10u),
            _m_pand(_m_por(v54, v57), (__m64)qword_A79D58));
    v60 = _m_pand(_m_por(v58, _m_psrlq(v58, 0x10u)), (__m64)qword_A79D60);
    *(__m64 *)(v8 + 32) = _m_por(_m_psrlq(v51, 0x20u), _m_psllq(v59, 0x20u));
    *(__m64 *)(v8 + 40) = _m_por(_m_psllq(_m_psrlq(v59, 0x20u), 0x10u), v60);
    v8 += a5;
    v5 += 16;
    --v10;
  }
  while ( v10 );
}
// A79CF0: using guessed type __int64 qword_A79CF0;
// A79CF8: using guessed type __int64 qword_A79CF8;
// A79D00: using guessed type __int64 qword_A79D00;
// A79D18: using guessed type __int64 qword_A79D18;
// A79D20: using guessed type __int64 qword_A79D20;
// A79D28: using guessed type __int64 qword_A79D28;
// A79D50: using guessed type __int64 qword_A79D50;
// A79D58: using guessed type __int64 qword_A79D58;
// A79D60: using guessed type __int64 qword_A79D60;

//----- (0079E3F0) --------------------------------------------------------
void __cdecl __spoils<ecx> own_ycbcr_422_to_bgr_full_mcu_m5(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // esi@1
  int v6; // eax@1
  int v7; // ebx@1
  int v8; // edi@1
  __m64 *v9; // edx@1
  signed int v10; // ecx@1
  __m64 v11; // mm2@2
  __m64 v12; // mm1@2
  __m64 v13; // mm4@2
  __m64 v14; // mm3@2
  __m64 v15; // mm5@2
  __m64 v16; // mm2@2
  __m64 v17; // mm5@2
  __m64 v18; // mm2@2
  __m64 v19; // mm0@2
  __m64 v20; // mm7@2
  __m64 v21; // mm6@2
  __m64 v22; // mm0@2
  __m64 v23; // mm2@2
  __m64 v24; // mm6@2
  __m64 v25; // mm7@2
  __m64 v26; // mm5@2
  __m64 v27; // mm2@2
  __m64 v28; // mm0@2
  __m64 v29; // mm2@2
  __m64 v30; // mm1@2
  __m64 v31; // mm0@2
  __m64 v32; // mm7@2
  __m64 v33; // mm2@2
  __m64 v34; // mm1@2
  __m64 v35; // mm0@2
  __m64 v36; // mm2@2
  __m64 v37; // mm0@2
  __m64 v38; // mm2@2
  __m64 v39; // mm1@2
  __m64 v40; // mm4@2
  __m64 v41; // mm3@2
  __m64 v42; // mm5@2
  __m64 v43; // mm2@2
  __m64 v44; // mm5@2
  __m64 v45; // mm2@2
  __m64 v46; // mm0@2
  __m64 v47; // mm7@2
  __m64 v48; // mm6@2
  __m64 v49; // mm0@2
  __m64 v50; // mm2@2
  __m64 v51; // mm6@2
  __m64 v52; // mm7@2
  __m64 v53; // mm5@2
  __m64 v54; // mm2@2
  __m64 v55; // mm0@2
  __m64 v56; // mm2@2
  __m64 v57; // mm1@2
  __m64 v58; // mm0@2
  __m64 v59; // mm7@2
  __m64 v60; // mm2@2
  __m64 v61; // mm1@2
  __m64 v62; // mm0@2
  __m64 v63; // mm2@2
  __m64 v64; // mm0@2
  char v65; // [sp+20h] [bp-18h]@1

  v5 = a1;
  v6 = a2;
  v7 = a3;
  v8 = a4;
  v9 = (__m64 *)((unsigned int)&v65 & 0xFFFFFFE0);
  v10 = 8;
  do
  {
    v11 = _m_psllw(*(__m64 *)v7, 4u);
    v12 = _m_psllw(*(__m64 *)v6, 4u);
    v13 = _m_psubw(_m_pmulhw((__m64)qword_A79CF8, v12), (__m64)qword_A79D18);
    v14 = _m_psubw(_m_pmulhw((__m64)qword_A79CF0, v11), (__m64)qword_A79D20);
    v15 = _m_psrad(_m_psubd(_m_pmaddwd(_m_punpcklwd(v11, v12), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu);
    v16 = _m_psrad(_m_psubd(_m_pmaddwd(_m_punpckhwd(v11, v12), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu);
    v9->m64_u64 = (unsigned __int64)_m_punpckhwd(v13, v13);
    *(__m64 *)(((unsigned int)&v65 & 0xFFFFFFE0) + 0x10) = _m_punpckhwd(v14, v14);
    v17 = _m_packssdw(v15, v15);
    v18 = _m_packssdw(v16, v16);
    v19 = *(__m64 *)v5;
    *(__m64 *)(((unsigned int)&v65 & 0xFFFFFFE0) + 8) = _m_punpcklwd(v18, v18);
    v20 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v13, v13), v19), 0i64), 0i64);
    v21 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v14, v14), v19), 0i64), 0i64);
    v22 = _m_punpcklbw(_m_packuswb(_m_psubsw(v19, _m_punpcklwd(v17, v17)), 0i64), 0i64);
    v23 = _m_psllq(v21, 8u);
    v24 = _m_por(v21, _m_psrlq(v20, 8u));
    v25 = _m_pand(_m_por(v20, _m_psllq(v22, 8u)), (__m64)qword_A79D58);
    v26 = _m_por(_m_pand(_m_por(v22, v23), (__m64)qword_A79D50), _m_pand(v24, (__m64)qword_A79D58));
    v27 = *(__m64 *)(((unsigned int)&v65 & 0xFFFFFFE0) + 0x10);
    *(__m64 *)v8 = _m_por(
                     _m_pand(_m_por(_m_psllq(v25, 0x10u), v25), (__m64)qword_A79D60),
                     _m_psrlq(_m_psllq(v26, 0x20u), 0x10u));
    v28 = *(__m64 *)(v5 + 8);
    v29 = _m_punpcklbw(_m_packuswb(_m_paddw(v27, v28), 0i64), 0i64);
    v30 = _m_punpcklbw(_m_packuswb(_m_paddw((__m64)v9->m64_u64, v28), 0i64), 0i64);
    v31 = _m_punpcklbw(_m_packuswb(_m_psubw(v28, *(__m64 *)(((unsigned int)&v65 & 0xFFFFFFE0) + 8)), 0i64), 0i64);
    v32 = _m_psllq(v29, 8u);
    v33 = _m_por(v29, _m_psrlq(v30, 8u));
    v34 = _m_por(v30, _m_psllq(v31, 8u));
    v35 = _m_pand(_m_por(v31, v32), (__m64)qword_A79D50);
    v36 = _m_por(_m_psllq(_m_pand(v33, (__m64)qword_A79D58), 0x10u), _m_pand(v34, (__m64)qword_A79D58));
    v37 = _m_pand(_m_por(v35, _m_psrlq(v35, 0x10u)), (__m64)qword_A79D60);
    *(__m64 *)(v8 + 8) = _m_por(_m_psrlq(v26, 0x20u), _m_psllq(v36, 0x20u));
    *(__m64 *)(v8 + 16) = _m_por(_m_psllq(_m_psrlq(v36, 0x20u), 0x10u), v37);
    v38 = _m_psllw(*(__m64 *)(v7 + 8), 4u);
    v39 = _m_psllw(*(__m64 *)(v6 + 8), 4u);
    v40 = _m_psubw(_m_pmulhw((__m64)qword_A79CF8, v39), (__m64)qword_A79D18);
    v41 = _m_psubw(_m_pmulhw((__m64)qword_A79CF0, v38), (__m64)qword_A79D20);
    v42 = _m_psrad(_m_psubd(_m_pmaddwd(_m_punpcklwd(v38, v39), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu);
    v43 = _m_psrad(_m_psubd(_m_pmaddwd(_m_punpckhwd(v38, v39), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu);
    v9->m64_u64 = (unsigned __int64)_m_punpckhwd(v40, v40);
    *(__m64 *)(((unsigned int)&v65 & 0xFFFFFFE0) + 0x10) = _m_punpckhwd(v41, v41);
    v44 = _m_packssdw(v42, v42);
    v6 += 16;
    v45 = _m_packssdw(v43, v43);
    v7 += 16;
    v46 = *(__m64 *)(v5 + 128);
    *(__m64 *)(((unsigned int)&v65 & 0xFFFFFFE0) + 8) = _m_punpcklwd(v45, v45);
    v47 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v40, v40), v46), 0i64), 0i64);
    v48 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v41, v41), v46), 0i64), 0i64);
    v49 = _m_punpcklbw(_m_packuswb(_m_psubsw(v46, _m_punpcklwd(v44, v44)), 0i64), 0i64);
    v50 = _m_psllq(v48, 8u);
    v51 = _m_por(v48, _m_psrlq(v47, 8u));
    v52 = _m_pand(_m_por(v47, _m_psllq(v49, 8u)), (__m64)qword_A79D58);
    v53 = _m_por(_m_pand(_m_por(v49, v50), (__m64)qword_A79D50), _m_pand(v51, (__m64)qword_A79D58));
    v54 = *(__m64 *)(((unsigned int)&v65 & 0xFFFFFFE0) + 0x10);
    *(__m64 *)(v8 + 24) = _m_por(
                            _m_pand(_m_por(_m_psllq(v52, 0x10u), v52), (__m64)qword_A79D60),
                            _m_psrlq(_m_psllq(v53, 0x20u), 0x10u));
    v55 = *(__m64 *)(v5 + 136);
    v56 = _m_punpcklbw(_m_packuswb(_m_paddw(v54, v55), 0i64), 0i64);
    v57 = _m_punpcklbw(_m_packuswb(_m_paddw((__m64)v9->m64_u64, v55), 0i64), 0i64);
    v58 = _m_punpcklbw(_m_packuswb(_m_psubw(v55, *(__m64 *)(((unsigned int)&v65 & 0xFFFFFFE0) + 8)), 0i64), 0i64);
    v59 = _m_psllq(v56, 8u);
    v60 = _m_por(v56, _m_psrlq(v57, 8u));
    v61 = _m_por(v57, _m_psllq(v58, 8u));
    v62 = _m_pand(_m_por(v58, v59), (__m64)qword_A79D50);
    v63 = _m_por(_m_psllq(_m_pand(v60, (__m64)qword_A79D58), 0x10u), _m_pand(v61, (__m64)qword_A79D58));
    v64 = _m_pand(_m_por(v62, _m_psrlq(v62, 0x10u)), (__m64)qword_A79D60);
    *(__m64 *)(v8 + 32) = _m_por(_m_psrlq(v53, 0x20u), _m_psllq(v63, 0x20u));
    *(__m64 *)(v8 + 40) = _m_por(_m_psllq(_m_psrlq(v63, 0x20u), 0x10u), v64);
    v8 += a5;
    v5 += 16;
    --v10;
  }
  while ( v10 );
}
// A79CF0: using guessed type __int64 qword_A79CF0;
// A79CF8: using guessed type __int64 qword_A79CF8;
// A79D00: using guessed type __int64 qword_A79D00;
// A79D18: using guessed type __int64 qword_A79D18;
// A79D20: using guessed type __int64 qword_A79D20;
// A79D28: using guessed type __int64 qword_A79D28;
// A79D50: using guessed type __int64 qword_A79D50;
// A79D58: using guessed type __int64 qword_A79D58;
// A79D60: using guessed type __int64 qword_A79D60;

//----- (0079E770) --------------------------------------------------------
void __cdecl __spoils<ecx> own_ycbcr_422_to_rgb_full_mcu_a6(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // esi@1
  int v6; // eax@1
  int v7; // ebx@1
  int v8; // edi@1
  __m64 *v9; // edx@1
  signed int v10; // ecx@1
  __m64 v11; // mm2@2
  __m64 v12; // mm1@2
  __m64 v13; // mm4@2
  __m64 v14; // mm3@2
  __m64 v15; // mm5@2
  __m64 v16; // mm2@2
  __m64 v17; // mm5@2
  __m64 v18; // mm2@2
  __m64 v19; // mm0@2
  __m64 v20; // mm7@2
  __m64 v21; // mm6@2
  __m64 v22; // mm0@2
  __m64 v23; // mm5@2
  __m64 v24; // mm2@2
  __m64 v25; // mm0@2
  __m64 v26; // mm2@2
  __m64 v27; // mm1@2
  __m64 v28; // mm0@2
  __m64 v29; // mm6@2
  __m64 v30; // mm0@2
  __m64 v31; // mm2@2
  __m64 v32; // mm0@2
  __m64 v33; // mm2@2
  __m64 v34; // mm1@2
  __m64 v35; // mm4@2
  __m64 v36; // mm3@2
  __m64 v37; // mm5@2
  __m64 v38; // mm2@2
  __m64 v39; // mm5@2
  __m64 v40; // mm2@2
  __m64 v41; // mm0@2
  __m64 v42; // mm7@2
  __m64 v43; // mm6@2
  __m64 v44; // mm0@2
  __m64 v45; // mm5@2
  __m64 v46; // mm2@2
  __m64 v47; // mm0@2
  __m64 v48; // mm1@2
  __m64 v49; // mm2@2
  __m64 v50; // mm0@2
  __m64 v51; // mm4@2
  __m64 v52; // mm0@2
  __m64 v53; // mm2@2
  __m64 v54; // mm0@2
  char v55; // [sp+20h] [bp-18h]@1

  v5 = a1;
  v6 = a2;
  v7 = a3;
  v8 = a4;
  v9 = (__m64 *)((unsigned int)&v55 & 0xFFFFFFE0);
  v10 = 8;
  do
  {
    v11 = _m_psllw(*(__m64 *)v7, 4u);
    v12 = _m_psllw(*(__m64 *)v6, 4u);
    v13 = _m_psubw(_m_pmulhw((__m64)qword_A79CF8, v12), (__m64)qword_A79D18);
    v14 = _m_psubw(_m_pmulhw((__m64)qword_A79CF0, v11), (__m64)qword_A79D20);
    v15 = _m_psrad(_m_psubd(_m_pmaddwd(_m_punpcklwd(v11, v12), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu);
    v16 = _m_psrad(_m_psubd(_m_pmaddwd(_m_punpckhwd(v11, v12), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu);
    *(__m64 *)(((unsigned int)&v55 & 0xFFFFFFE0) + 0x10) = _m_punpckhwd(v13, v13);
    v9->m64_u64 = (unsigned __int64)_m_punpckhwd(v14, v14);
    v17 = _m_packssdw(v15, v15);
    v18 = _m_packssdw(v16, v16);
    v19 = *(__m64 *)v5;
    *(__m64 *)(((unsigned int)&v55 & 0xFFFFFFE0) + 8) = _m_punpcklwd(v18, v18);
    v20 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v14, v14), v19), 0i64), 0i64);
    v21 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v13, v13), v19), 0i64), 0i64);
    v22 = _m_punpcklbw(_m_packuswb(_m_psubsw(v19, _m_punpcklwd(v17, v17)), 0i64), 0i64);
    v23 = _m_por(
            _m_pand(_m_por(v22, _m_psllq(v21, 8u)), (__m64)qword_A79D50),
            _m_pand(_m_por(v21, _m_psrlq(v20, 8u)), (__m64)qword_A79D58));
    v24 = *(__m64 *)(((unsigned int)&v55 & 0xFFFFFFE0) + 0x10);
    *(__m64 *)v8 = _m_por(
                     _m_pshufw(_m_pand(_m_por(v20, _m_psllq(v22, 8u)), (__m64)qword_A79D58), -108),
                     _m_psrlq(_m_psllq(v23, 0x20u), 0x10u));
    v25 = *(__m64 *)(v5 + 8);
    v26 = _m_punpcklbw(_m_packuswb(_m_paddsw(v24, v25), 0i64), 0i64);
    v27 = _m_punpcklbw(_m_packuswb(_m_paddsw((__m64)v9->m64_u64, v25), 0i64), 0i64);
    v28 = _m_punpcklbw(_m_packuswb(_m_psubsw(v25, *(__m64 *)(((unsigned int)&v55 & 0xFFFFFFE0) + 8)), 0i64), 0i64);
    v29 = _m_psllq(v28, 8u);
    v30 = _m_pand(_m_por(v28, _m_psllq(v26, 8u)), (__m64)qword_A79D50);
    v31 = _m_por(
            _m_psllq(_m_pand(_m_por(v26, _m_psrlq(v27, 8u)), (__m64)qword_A79D58), 0x10u),
            _m_pand(_m_por(v27, v29), (__m64)qword_A79D58));
    v32 = _m_pand(_m_por(v30, _m_psrlq(v30, 0x10u)), (__m64)qword_A79D60);
    *(__m64 *)(v8 + 8) = _m_por(_m_psrlq(v23, 0x20u), _m_psllq(v31, 0x20u));
    *(__m64 *)(v8 + 16) = _m_por(_m_psllq(_m_psrlq(v31, 0x20u), 0x10u), v32);
    v33 = _m_psllw(*(__m64 *)(v7 + 8), 4u);
    v34 = _m_psllw(*(__m64 *)(v6 + 8), 4u);
    v35 = _m_psubw(_m_pmulhw((__m64)qword_A79CF8, v34), (__m64)qword_A79D18);
    v36 = _m_psubw(_m_pmulhw((__m64)qword_A79CF0, v33), (__m64)qword_A79D20);
    v37 = _m_psrad(_m_psubd(_m_pmaddwd(_m_punpcklwd(v33, v34), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu);
    v38 = _m_psrad(_m_psubd(_m_pmaddwd(_m_punpckhwd(v33, v34), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu);
    *(__m64 *)(((unsigned int)&v55 & 0xFFFFFFE0) + 0x10) = _m_punpckhwd(v35, v35);
    v9->m64_u64 = (unsigned __int64)_m_punpckhwd(v36, v36);
    v39 = _m_packssdw(v37, v37);
    v6 += 16;
    v40 = _m_packssdw(v38, v38);
    v7 += 16;
    v41 = *(__m64 *)(v5 + 128);
    *(__m64 *)(((unsigned int)&v55 & 0xFFFFFFE0) + 8) = _m_punpcklwd(v40, v40);
    v42 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v36, v36), v41), 0i64), 0i64);
    v43 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v35, v35), v41), 0i64), 0i64);
    v44 = _m_punpcklbw(_m_packuswb(_m_psubsw(v41, _m_punpcklwd(v39, v39)), 0i64), 0i64);
    v45 = _m_por(
            _m_pand(_m_por(v44, _m_psllq(v43, 8u)), (__m64)qword_A79D50),
            _m_pand(_m_por(v43, _m_psrlq(v42, 8u)), (__m64)qword_A79D58));
    v46 = *(__m64 *)(((unsigned int)&v55 & 0xFFFFFFE0) + 0x10);
    *(__m64 *)(v8 + 24) = _m_por(
                            _m_pshufw(_m_pand(_m_por(v42, _m_psllq(v44, 8u)), (__m64)qword_A79D58), -108),
                            _m_psrlq(_m_psllq(v45, 0x20u), 0x10u));
    v47 = *(__m64 *)(v5 + 136);
    v48 = _m_punpcklbw(_m_packuswb(_m_paddsw((__m64)v9->m64_u64, v47), 0i64), 0i64);
    v49 = _m_punpcklbw(_m_packuswb(_m_paddsw(v46, v47), 0i64), 0i64);
    v50 = _m_punpcklbw(_m_packuswb(_m_psubsw(v47, *(__m64 *)(((unsigned int)&v55 & 0xFFFFFFE0) + 8)), 0i64), 0i64);
    v51 = _m_psllq(v50, 8u);
    v52 = _m_pand(_m_por(v50, _m_psllq(v49, 8u)), (__m64)qword_A79D50);
    v53 = _m_por(
            _m_psllq(_m_pand(_m_por(v49, _m_psrlq(v48, 8u)), (__m64)qword_A79D58), 0x10u),
            _m_pand(_m_por(v48, v51), (__m64)qword_A79D58));
    v54 = _m_pand(_m_por(v52, _m_psrlq(v52, 0x10u)), (__m64)qword_A79D60);
    *(__m64 *)(v8 + 32) = _m_por(_m_psrlq(v45, 0x20u), _m_psllq(v53, 0x20u));
    *(__m64 *)(v8 + 40) = _m_por(_m_psllq(_m_psrlq(v53, 0x20u), 0x10u), v54);
    v8 += a5;
    v5 += 16;
    --v10;
  }
  while ( v10 );
}
// A79CF0: using guessed type __int64 qword_A79CF0;
// A79CF8: using guessed type __int64 qword_A79CF8;
// A79D00: using guessed type __int64 qword_A79D00;
// A79D18: using guessed type __int64 qword_A79D18;
// A79D20: using guessed type __int64 qword_A79D20;
// A79D28: using guessed type __int64 qword_A79D28;
// A79D50: using guessed type __int64 qword_A79D50;
// A79D58: using guessed type __int64 qword_A79D58;
// A79D60: using guessed type __int64 qword_A79D60;

//----- (0079EAD0) --------------------------------------------------------
void __cdecl __spoils<ecx> own_ycbcr_422_to_bgr_full_mcu_a6(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // esi@1
  int v6; // eax@1
  int v7; // ebx@1
  int v8; // edi@1
  __m64 *v9; // edx@1
  signed int v10; // ecx@1
  __m64 v11; // mm2@2
  __m64 v12; // mm1@2
  __m64 v13; // mm4@2
  __m64 v14; // mm3@2
  __m64 v15; // mm5@2
  __m64 v16; // mm2@2
  __m64 v17; // mm5@2
  __m64 v18; // mm2@2
  __m64 v19; // mm0@2
  __m64 v20; // mm7@2
  __m64 v21; // mm6@2
  __m64 v22; // mm0@2
  __m64 v23; // mm5@2
  __m64 v24; // mm2@2
  __m64 v25; // mm0@2
  __m64 v26; // mm2@2
  __m64 v27; // mm1@2
  __m64 v28; // mm0@2
  __m64 v29; // mm7@2
  __m64 v30; // mm2@2
  __m64 v31; // mm1@2
  __m64 v32; // mm0@2
  __m64 v33; // mm2@2
  __m64 v34; // mm0@2
  __m64 v35; // mm2@2
  __m64 v36; // mm1@2
  __m64 v37; // mm4@2
  __m64 v38; // mm3@2
  __m64 v39; // mm5@2
  __m64 v40; // mm2@2
  __m64 v41; // mm5@2
  __m64 v42; // mm2@2
  __m64 v43; // mm0@2
  __m64 v44; // mm7@2
  __m64 v45; // mm6@2
  __m64 v46; // mm0@2
  __m64 v47; // mm5@2
  __m64 v48; // mm2@2
  __m64 v49; // mm0@2
  __m64 v50; // mm2@2
  __m64 v51; // mm1@2
  __m64 v52; // mm0@2
  __m64 v53; // mm7@2
  __m64 v54; // mm2@2
  __m64 v55; // mm1@2
  __m64 v56; // mm0@2
  __m64 v57; // mm2@2
  __m64 v58; // mm0@2
  char v59; // [sp+20h] [bp-18h]@1

  v5 = a1;
  v6 = a2;
  v7 = a3;
  v8 = a4;
  v9 = (__m64 *)((unsigned int)&v59 & 0xFFFFFFE0);
  v10 = 8;
  do
  {
    v11 = _m_psllw(*(__m64 *)v7, 4u);
    v12 = _m_psllw(*(__m64 *)v6, 4u);
    v13 = _m_psubw(_m_pmulhw((__m64)qword_A79CF8, v12), (__m64)qword_A79D18);
    v14 = _m_psubw(_m_pmulhw((__m64)qword_A79CF0, v11), (__m64)qword_A79D20);
    v15 = _m_psrad(_m_psubd(_m_pmaddwd(_m_punpcklwd(v11, v12), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu);
    v16 = _m_psrad(_m_psubd(_m_pmaddwd(_m_punpckhwd(v11, v12), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu);
    v9->m64_u64 = (unsigned __int64)_m_punpckhwd(v13, v13);
    *(__m64 *)(((unsigned int)&v59 & 0xFFFFFFE0) + 0x10) = _m_punpckhwd(v14, v14);
    v17 = _m_packssdw(v15, v15);
    v18 = _m_packssdw(v16, v16);
    v19 = *(__m64 *)v5;
    *(__m64 *)(((unsigned int)&v59 & 0xFFFFFFE0) + 8) = _m_punpcklwd(v18, v18);
    v20 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v13, v13), v19), 0i64), 0i64);
    v21 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v14, v14), v19), 0i64), 0i64);
    v22 = _m_punpcklbw(_m_packuswb(_m_psubsw(v19, _m_punpcklwd(v17, v17)), 0i64), 0i64);
    v23 = _m_por(
            _m_pand(_m_por(v22, _m_psllq(v21, 8u)), (__m64)qword_A79D50),
            _m_pand(_m_por(v21, _m_psrlq(v20, 8u)), (__m64)qword_A79D58));
    v24 = *(__m64 *)(((unsigned int)&v59 & 0xFFFFFFE0) + 0x10);
    *(__m64 *)v8 = _m_por(
                     _m_pshufw(_m_pand(_m_por(v20, _m_psllq(v22, 8u)), (__m64)qword_A79D58), -108),
                     _m_psrlq(_m_psllq(v23, 0x20u), 0x10u));
    v25 = *(__m64 *)(v5 + 8);
    v26 = _m_punpcklbw(_m_packuswb(_m_paddw(v24, v25), 0i64), 0i64);
    v27 = _m_punpcklbw(_m_packuswb(_m_paddw((__m64)v9->m64_u64, v25), 0i64), 0i64);
    v28 = _m_punpcklbw(_m_packuswb(_m_psubw(v25, *(__m64 *)(((unsigned int)&v59 & 0xFFFFFFE0) + 8)), 0i64), 0i64);
    v29 = _m_psllq(v26, 8u);
    v30 = _m_por(v26, _m_psrlq(v27, 8u));
    v31 = _m_por(v27, _m_psllq(v28, 8u));
    v32 = _m_pand(_m_por(v28, v29), (__m64)qword_A79D50);
    v33 = _m_por(_m_psllq(_m_pand(v30, (__m64)qword_A79D58), 0x10u), _m_pand(v31, (__m64)qword_A79D58));
    v34 = _m_pand(_m_por(v32, _m_psrlq(v32, 0x10u)), (__m64)qword_A79D60);
    *(__m64 *)(v8 + 8) = _m_por(_m_psrlq(v23, 0x20u), _m_psllq(v33, 0x20u));
    *(__m64 *)(v8 + 16) = _m_por(_m_psllq(_m_psrlq(v33, 0x20u), 0x10u), v34);
    v35 = _m_psllw(*(__m64 *)(v7 + 8), 4u);
    v36 = _m_psllw(*(__m64 *)(v6 + 8), 4u);
    v37 = _m_psubw(_m_pmulhw((__m64)qword_A79CF8, v36), (__m64)qword_A79D18);
    v38 = _m_psubw(_m_pmulhw((__m64)qword_A79CF0, v35), (__m64)qword_A79D20);
    v39 = _m_psrad(_m_psubd(_m_pmaddwd(_m_punpcklwd(v35, v36), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu);
    v40 = _m_psrad(_m_psubd(_m_pmaddwd(_m_punpckhwd(v35, v36), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu);
    v9->m64_u64 = (unsigned __int64)_m_punpckhwd(v37, v37);
    *(__m64 *)(((unsigned int)&v59 & 0xFFFFFFE0) + 0x10) = _m_punpckhwd(v38, v38);
    v41 = _m_packssdw(v39, v39);
    v6 += 16;
    v42 = _m_packssdw(v40, v40);
    v7 += 16;
    v43 = *(__m64 *)(v5 + 128);
    *(__m64 *)(((unsigned int)&v59 & 0xFFFFFFE0) + 8) = _m_punpcklwd(v42, v42);
    v44 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v37, v37), v43), 0i64), 0i64);
    v45 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v38, v38), v43), 0i64), 0i64);
    v46 = _m_punpcklbw(_m_packuswb(_m_psubsw(v43, _m_punpcklwd(v41, v41)), 0i64), 0i64);
    v47 = _m_por(
            _m_pand(_m_por(v46, _m_psllq(v45, 8u)), (__m64)qword_A79D50),
            _m_pand(_m_por(v45, _m_psrlq(v44, 8u)), (__m64)qword_A79D58));
    v48 = *(__m64 *)(((unsigned int)&v59 & 0xFFFFFFE0) + 0x10);
    *(__m64 *)(v8 + 24) = _m_por(
                            _m_pshufw(_m_pand(_m_por(v44, _m_psllq(v46, 8u)), (__m64)qword_A79D58), -108),
                            _m_psrlq(_m_psllq(v47, 0x20u), 0x10u));
    v49 = *(__m64 *)(v5 + 136);
    v50 = _m_punpcklbw(_m_packuswb(_m_paddw(v48, v49), 0i64), 0i64);
    v51 = _m_punpcklbw(_m_packuswb(_m_paddw((__m64)v9->m64_u64, v49), 0i64), 0i64);
    v52 = _m_punpcklbw(_m_packuswb(_m_psubw(v49, *(__m64 *)(((unsigned int)&v59 & 0xFFFFFFE0) + 8)), 0i64), 0i64);
    v53 = _m_psllq(v50, 8u);
    v54 = _m_por(v50, _m_psrlq(v51, 8u));
    v55 = _m_por(v51, _m_psllq(v52, 8u));
    v56 = _m_pand(_m_por(v52, v53), (__m64)qword_A79D50);
    v57 = _m_por(_m_psllq(_m_pand(v54, (__m64)qword_A79D58), 0x10u), _m_pand(v55, (__m64)qword_A79D58));
    v58 = _m_pand(_m_por(v56, _m_psrlq(v56, 0x10u)), (__m64)qword_A79D60);
    *(__m64 *)(v8 + 32) = _m_por(_m_psrlq(v47, 0x20u), _m_psllq(v57, 0x20u));
    *(__m64 *)(v8 + 40) = _m_por(_m_psllq(_m_psrlq(v57, 0x20u), 0x10u), v58);
    v8 += a5;
    v5 += 16;
    --v10;
  }
  while ( v10 );
}
// A79CF0: using guessed type __int64 qword_A79CF0;
// A79CF8: using guessed type __int64 qword_A79CF8;
// A79D00: using guessed type __int64 qword_A79D00;
// A79D18: using guessed type __int64 qword_A79D18;
// A79D20: using guessed type __int64 qword_A79D20;
// A79D28: using guessed type __int64 qword_A79D28;
// A79D50: using guessed type __int64 qword_A79D50;
// A79D58: using guessed type __int64 qword_A79D58;
// A79D60: using guessed type __int64 qword_A79D60;

//----- (0079EE30) --------------------------------------------------------
void __cdecl __spoils<ecx> own_ycbcr_422_to_rgba_fpx_full_mcu_m5(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // esi@1
  int v6; // eax@1
  int v7; // ebx@1
  int v8; // edi@1
  signed int v9; // ecx@1
  unsigned int *v10; // edx@1
  __m64 v11; // mm0@2
  __m64 v12; // mm1@2
  __m64 v13; // mm3@2
  __m64 v14; // mm6@2
  __m64 v15; // mm2@2
  __m64 v16; // mm1@2
  __m64 v17; // mm0@2
  __m64 v18; // mm2@2
  __m64 v19; // mm4@2
  __m64 v20; // mm0@2
  __m64 v21; // mm2@2
  __m64 v22; // mm6@2
  __m64 v23; // mm6@2
  __m64 v24; // mm0@2
  __m64 v25; // mm2@2
  __m64 v26; // mm4@2
  __m64 v27; // mm0@2
  __m64 v28; // mm2@2
  __m64 v29; // mm6@2
  __m64 v30; // mm0@2
  __m64 v31; // mm1@2
  __m64 v32; // mm3@2
  __m64 v33; // mm6@2
  __m64 v34; // mm2@2
  __m64 v35; // mm1@2
  __m64 v36; // mm0@2
  __m64 v37; // mm2@2
  __m64 v38; // mm4@2
  __m64 v39; // mm0@2
  __m64 v40; // mm2@2
  __m64 v41; // mm6@2
  __m64 v42; // mm6@2
  __m64 v43; // mm0@2
  __m64 v44; // mm2@2
  __m64 v45; // mm4@2
  __m64 v46; // mm0@2
  __m64 v47; // mm2@2
  __m64 v48; // mm6@2
  char v49; // [sp+20h] [bp-18h]@1

  v5 = a1;
  v6 = a2;
  v7 = a3;
  v8 = a4;
  v9 = 8;
  v10 = (unsigned int *)((unsigned int)&v49 & 0xFFFFFFE0);
  do
  {
    v11 = _m_psllw(*(__m64 *)v7, 4u);
    v12 = _m_psllw(*(__m64 *)v6, 4u);
    v13 = _m_psubw(_m_pmulhw((__m64)qword_A79D70, v12), (__m64)qword_A79D88);
    *(__m64 *)v10 = _m_psubw(_m_pmulhw((__m64)qword_A79D68, v11), (__m64)qword_A79D90);
    *(__m64 *)(((unsigned int)&v49 & 0xFFFFFFE0) + 8) = v13;
    v14 = *(__m64 *)v5;
    v15 = _m_psraw(
            _m_psubw(
              _m_paddw(
                _m_pmullw((__m64)qword_A79D80, _m_psrlw(v11, 4u)),
                _m_pmullw((__m64)qword_A79D78, _m_psrlw(v12, 4u))),
              (__m64)qword_A79D98),
            8u);
    v16.m64_u64 = qword_A79DA0;
    *(__m64 *)(((unsigned int)&v49 & 0xFFFFFFE0) + 0x10) = v15;
    v17 = _mm_cvtsi32_si64(*v10);
    v18 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v49 & 0xFFFFFFE0) + 8));
    v19 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v49 & 0xFFFFFFE0) + 0x10));
    v20 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v17, v17), v14), 0i64), 0i64);
    v21 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v18, v18), v14), 0i64), 0i64);
    v22 = _m_punpcklbw(_m_packuswb(_m_psubsw(v14, _m_punpcklwd(v19, v19)), 0i64), 0i64);
    *(__m64 *)v8 = _m_por(
                     _m_por(
                       _m_por(_m_punpcklwd(v20, 0i64), _m_pslld(_m_punpcklwd(v21, 0i64), 0x10u)),
                       _m_pslld(_m_punpcklwd(v22, 0i64), 8u)),
                     v16);
    *(__m64 *)(v8 + 8) = _m_por(
                           _m_por(
                             _m_por(_m_punpckhwd(v20, 0i64), _m_pslld(_m_punpckhwd(v21, 0i64), 0x10u)),
                             _m_pslld(_m_punpckhwd(v22, 0i64), 8u)),
                           v16);
    v23 = *(__m64 *)(v5 + 8);
    v24 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v49 & 0xFFFFFFE0) + 4));
    v25 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v49 & 0xFFFFFFE0) + 0xC));
    v26 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v49 & 0xFFFFFFE0) + 0x14));
    v27 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v24, v24), v23), 0i64), 0i64);
    v28 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v25, v25), v23), 0i64), 0i64);
    v29 = _m_punpcklbw(_m_packuswb(_m_psubsw(v23, _m_punpcklwd(v26, v26)), 0i64), 0i64);
    *(__m64 *)(v8 + 16) = _m_por(
                            _m_por(
                              _m_por(_m_punpcklwd(v27, 0i64), _m_pslld(_m_punpcklwd(v28, 0i64), 0x10u)),
                              _m_pslld(_m_punpcklwd(v29, 0i64), 8u)),
                            v16);
    *(__m64 *)(v8 + 24) = _m_por(
                            _m_por(
                              _m_por(_m_punpckhwd(v27, 0i64), _m_pslld(_m_punpckhwd(v28, 0i64), 0x10u)),
                              _m_pslld(_m_punpckhwd(v29, 0i64), 8u)),
                            v16);
    v30 = _m_psllw(*(__m64 *)(v7 + 8), 4u);
    v31 = _m_psllw(*(__m64 *)(v6 + 8), 4u);
    v32 = _m_psubw(_m_pmulhw((__m64)qword_A79D70, v31), (__m64)qword_A79D88);
    *(__m64 *)v10 = _m_psubw(_m_pmulhw((__m64)qword_A79D68, v30), (__m64)qword_A79D90);
    *(__m64 *)(((unsigned int)&v49 & 0xFFFFFFE0) + 8) = v32;
    v33 = *(__m64 *)(v5 + 128);
    v34 = _m_psraw(
            _m_psubw(
              _m_paddw(
                _m_pmullw((__m64)qword_A79D80, _m_psrlw(v30, 4u)),
                _m_pmullw((__m64)qword_A79D78, _m_psrlw(v31, 4u))),
              (__m64)qword_A79D98),
            8u);
    v35.m64_u64 = qword_A79DA0;
    *(__m64 *)(((unsigned int)&v49 & 0xFFFFFFE0) + 0x10) = v34;
    v36 = _mm_cvtsi32_si64(*v10);
    v37 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v49 & 0xFFFFFFE0) + 8));
    v38 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v49 & 0xFFFFFFE0) + 0x10));
    v39 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v36, v36), v33), 0i64), 0i64);
    v40 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v37, v37), v33), 0i64), 0i64);
    v41 = _m_punpcklbw(_m_packuswb(_m_psubsw(v33, _m_punpcklwd(v38, v38)), 0i64), 0i64);
    *(__m64 *)(v8 + 32) = _m_por(
                            _m_por(
                              _m_por(_m_punpcklwd(v39, 0i64), _m_pslld(_m_punpcklwd(v40, 0i64), 0x10u)),
                              _m_pslld(_m_punpcklwd(v41, 0i64), 8u)),
                            v35);
    *(__m64 *)(v8 + 40) = _m_por(
                            _m_por(
                              _m_por(_m_punpckhwd(v39, 0i64), _m_pslld(_m_punpckhwd(v40, 0i64), 0x10u)),
                              _m_pslld(_m_punpckhwd(v41, 0i64), 8u)),
                            v35);
    v42 = *(__m64 *)(v5 + 136);
    v43 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v49 & 0xFFFFFFE0) + 4));
    v44 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v49 & 0xFFFFFFE0) + 0xC));
    v45 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v49 & 0xFFFFFFE0) + 0x14));
    v46 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v43, v43), v42), 0i64), 0i64);
    v47 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v44, v44), v42), 0i64), 0i64);
    v48 = _m_punpcklbw(_m_packuswb(_m_psubsw(v42, _m_punpcklwd(v45, v45)), 0i64), 0i64);
    *(__m64 *)(v8 + 48) = _m_por(
                            _m_por(
                              _m_por(_m_punpcklwd(v46, 0i64), _m_pslld(_m_punpcklwd(v47, 0i64), 0x10u)),
                              _m_pslld(_m_punpcklwd(v48, 0i64), 8u)),
                            v35);
    *(__m64 *)(v8 + 56) = _m_por(
                            _m_por(
                              _m_por(_m_punpckhwd(v46, 0i64), _m_pslld(_m_punpckhwd(v47, 0i64), 0x10u)),
                              _m_pslld(_m_punpckhwd(v48, 0i64), 8u)),
                            v35);
    v5 += 16;
    v6 += 16;
    v7 += 16;
    v8 += a5;
    --v9;
  }
  while ( v9 );
}
// A79D68: using guessed type __int64 qword_A79D68;
// A79D70: using guessed type __int64 qword_A79D70;
// A79D78: using guessed type __int64 qword_A79D78;
// A79D80: using guessed type __int64 qword_A79D80;
// A79D88: using guessed type __int64 qword_A79D88;
// A79D90: using guessed type __int64 qword_A79D90;
// A79D98: using guessed type __int64 qword_A79D98;
// A79DA0: using guessed type __int64 qword_A79DA0;

//----- (0079F150) --------------------------------------------------------
void __cdecl __spoils<ecx> own_ycbcra_fpx_4224_to_rgba_fpx_full_mcu_m5(int a1, int a2, int a3, int a4, int a5, int a6)
{
  int v6; // esi@1
  int v7; // eax@1
  int v8; // ebx@1
  int v9; // edi@1
  signed int v10; // ecx@1
  unsigned int *v11; // edx@1
  __m64 v12; // mm0@2
  __m64 v13; // mm1@2
  __m64 v14; // mm3@2
  __m64 v15; // mm6@2
  __m64 v16; // mm2@2
  __m64 v17; // mm1@2
  __m64 v18; // mm0@2
  __m64 v19; // mm2@2
  __m64 v20; // mm4@2
  __m64 v21; // mm0@2
  __m64 v22; // mm2@2
  __m64 v23; // mm6@2
  __m64 v24; // mm3@2
  __m64 v25; // mm5@2
  __m64 v26; // mm4@2
  __m64 v27; // mm1@2
  __m64 v28; // mm3@2
  __m64 v29; // mm5@2
  __m64 v30; // mm6@2
  __m64 v31; // mm0@2
  __m64 v32; // mm2@2
  __m64 v33; // mm4@2
  __m64 v34; // mm0@2
  __m64 v35; // mm2@2
  __m64 v36; // mm6@2
  __m64 v37; // mm4@2
  __m64 v38; // mm1@2
  __m64 v39; // mm3@2
  __m64 v40; // mm5@2
  __m64 v41; // mm0@2
  __m64 v42; // mm1@2
  __m64 v43; // mm3@2
  __m64 v44; // mm6@2
  __m64 v45; // mm2@2
  __m64 v46; // mm1@2
  __m64 v47; // mm0@2
  __m64 v48; // mm2@2
  __m64 v49; // mm4@2
  __m64 v50; // mm0@2
  __m64 v51; // mm2@2
  __m64 v52; // mm6@2
  __m64 v53; // mm3@2
  __m64 v54; // mm5@2
  __m64 v55; // mm4@2
  __m64 v56; // mm1@2
  __m64 v57; // mm3@2
  __m64 v58; // mm5@2
  __m64 v59; // mm6@2
  __m64 v60; // mm0@2
  __m64 v61; // mm2@2
  __m64 v62; // mm4@2
  __m64 v63; // mm0@2
  __m64 v64; // mm2@2
  __m64 v65; // mm6@2
  __m64 v66; // mm4@2
  __m64 v67; // mm1@2
  __m64 v68; // mm3@2
  __m64 v69; // mm5@2
  char v70; // [sp+20h] [bp-18h]@1

  v6 = a1;
  v7 = a2;
  v8 = a3;
  v9 = a5;
  v10 = 8;
  v11 = (unsigned int *)((unsigned int)&v70 & 0xFFFFFFE0);
  do
  {
    v12 = _m_psllw(*(__m64 *)v8, 4u);
    v13 = _m_psllw(*(__m64 *)v7, 4u);
    v14 = _m_psubw(_m_pmulhw((__m64)qword_A79D70, v13), (__m64)qword_A79D88);
    *(__m64 *)v11 = _m_psubw(_m_pmulhw((__m64)qword_A79D68, v12), (__m64)qword_A79D90);
    *(__m64 *)(((unsigned int)&v70 & 0xFFFFFFE0) + 8) = v14;
    v15 = *(__m64 *)v6;
    v16 = _m_psraw(
            _m_psubw(
              _m_paddw(
                _m_pmullw((__m64)qword_A79D80, _m_psrlw(v12, 4u)),
                _m_pmullw((__m64)qword_A79D78, _m_psrlw(v13, 4u))),
              (__m64)qword_A79D98),
            8u);
    v17.m64_u64 = qword_A79DA8;
    *(__m64 *)(((unsigned int)&v70 & 0xFFFFFFE0) + 0x10) = v16;
    v18 = _mm_cvtsi32_si64(*v11);
    v19 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v70 & 0xFFFFFFE0) + 8));
    v20 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v70 & 0xFFFFFFE0) + 0x10));
    v21 = _m_paddsw(_m_punpcklwd(v18, v18), v15);
    v22 = _m_paddsw(_m_punpcklwd(v19, v19), v15);
    v23 = _m_punpcklbw(_m_packuswb(_m_psubsw(v15, _m_punpcklwd(v20, v20)), 0i64), 0i64);
    v24 = v17;
    v25 = v17;
    v26 = *(__m64 *)(v6 + 512);
    v27 = _m_psubw(v17, _m_punpcklbw(_m_packuswb(v21, 0i64), 0i64));
    v28 = _m_psubw(v24, _m_punpcklbw(_m_packuswb(v22, 0i64), 0i64));
    v29 = _m_psubw(v25, v23);
    *(__m64 *)v9 = _m_por(
                     _m_por(
                       _m_por(_m_punpcklwd(v27, 0i64), _m_pslld(_m_punpcklwd(v28, 0i64), 0x10u)),
                       _m_pslld(_m_punpcklwd(v29, 0i64), 8u)),
                     _m_pslld(_m_punpcklwd(0i64, v26), 8u));
    *(__m64 *)(v9 + 8) = _m_por(
                           _m_por(
                             _m_por(_m_punpckhwd(v27, 0i64), _m_pslld(_m_punpckhwd(v28, 0i64), 0x10u)),
                             _m_pslld(_m_punpckhwd(v29, 0i64), 8u)),
                           _m_pslld(_m_punpckhwd(0i64, v26), 8u));
    v30 = *(__m64 *)(v6 + 8);
    v31 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v70 & 0xFFFFFFE0) + 4));
    v32 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v70 & 0xFFFFFFE0) + 0xC));
    v33 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v70 & 0xFFFFFFE0) + 0x14));
    v34 = _m_paddsw(_m_punpcklwd(v31, v31), v30);
    v35 = _m_paddsw(_m_punpcklwd(v32, v32), v30);
    v36 = _m_punpcklbw(_m_packuswb(_m_psubsw(v30, _m_punpcklwd(v33, v33)), 0i64), 0i64);
    v37 = *(__m64 *)(v6 + 520);
    v38 = _m_psubw((__m64)qword_A79DA8, _m_punpcklbw(_m_packuswb(v34, 0i64), 0i64));
    v39 = _m_psubw((__m64)qword_A79DA8, _m_punpcklbw(_m_packuswb(v35, 0i64), 0i64));
    v40 = _m_psubw((__m64)qword_A79DA8, v36);
    *(__m64 *)(v9 + 16) = _m_por(
                            _m_por(
                              _m_por(_m_punpcklwd(v38, 0i64), _m_pslld(_m_punpcklwd(v39, 0i64), 0x10u)),
                              _m_pslld(_m_punpcklwd(v40, 0i64), 8u)),
                            _m_pslld(_m_punpcklwd(0i64, v37), 8u));
    *(__m64 *)(v9 + 24) = _m_por(
                            _m_por(
                              _m_por(_m_punpckhwd(v38, 0i64), _m_pslld(_m_punpckhwd(v39, 0i64), 0x10u)),
                              _m_pslld(_m_punpckhwd(v40, 0i64), 8u)),
                            _m_pslld(_m_punpckhwd(0i64, v37), 8u));
    v41 = _m_psllw(*(__m64 *)(v8 + 8), 4u);
    v42 = _m_psllw(*(__m64 *)(v7 + 8), 4u);
    v43 = _m_psubw(_m_pmulhw((__m64)qword_A79D70, v42), (__m64)qword_A79D88);
    *(__m64 *)v11 = _m_psubw(_m_pmulhw((__m64)qword_A79D68, v41), (__m64)qword_A79D90);
    *(__m64 *)(((unsigned int)&v70 & 0xFFFFFFE0) + 8) = v43;
    v44 = *(__m64 *)(v6 + 128);
    v45 = _m_psraw(
            _m_psubw(
              _m_paddw(
                _m_pmullw((__m64)qword_A79D80, _m_psrlw(v41, 4u)),
                _m_pmullw((__m64)qword_A79D78, _m_psrlw(v42, 4u))),
              (__m64)qword_A79D98),
            8u);
    v46.m64_u64 = qword_A79DA8;
    *(__m64 *)(((unsigned int)&v70 & 0xFFFFFFE0) + 0x10) = v45;
    v47 = _mm_cvtsi32_si64(*v11);
    v48 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v70 & 0xFFFFFFE0) + 8));
    v49 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v70 & 0xFFFFFFE0) + 0x10));
    v50 = _m_paddsw(_m_punpcklwd(v47, v47), v44);
    v51 = _m_paddsw(_m_punpcklwd(v48, v48), v44);
    v52 = _m_punpcklbw(_m_packuswb(_m_psubsw(v44, _m_punpcklwd(v49, v49)), 0i64), 0i64);
    v53 = v46;
    v54 = v46;
    v55 = *(__m64 *)(v6 + 640);
    v56 = _m_psubw(v46, _m_punpcklbw(_m_packuswb(v50, 0i64), 0i64));
    v57 = _m_psubw(v53, _m_punpcklbw(_m_packuswb(v51, 0i64), 0i64));
    v58 = _m_psubw(v54, v52);
    *(__m64 *)(v9 + 32) = _m_por(
                            _m_por(
                              _m_por(_m_punpcklwd(v56, 0i64), _m_pslld(_m_punpcklwd(v57, 0i64), 0x10u)),
                              _m_pslld(_m_punpcklwd(v58, 0i64), 8u)),
                            _m_pslld(_m_punpcklwd(0i64, v55), 8u));
    *(__m64 *)(v9 + 40) = _m_por(
                            _m_por(
                              _m_por(_m_punpckhwd(v56, 0i64), _m_pslld(_m_punpckhwd(v57, 0i64), 0x10u)),
                              _m_pslld(_m_punpckhwd(v58, 0i64), 8u)),
                            _m_pslld(_m_punpckhwd(0i64, v55), 8u));
    v59 = *(__m64 *)(v6 + 136);
    v60 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v70 & 0xFFFFFFE0) + 4));
    v61 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v70 & 0xFFFFFFE0) + 0xC));
    v62 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v70 & 0xFFFFFFE0) + 0x14));
    v63 = _m_paddsw(_m_punpcklwd(v60, v60), v59);
    v64 = _m_paddsw(_m_punpcklwd(v61, v61), v59);
    v65 = _m_punpcklbw(_m_packuswb(_m_psubsw(v59, _m_punpcklwd(v62, v62)), 0i64), 0i64);
    v66 = *(__m64 *)(v6 + 648);
    v67 = _m_psubw((__m64)qword_A79DA8, _m_punpcklbw(_m_packuswb(v63, 0i64), 0i64));
    v68 = _m_psubw((__m64)qword_A79DA8, _m_punpcklbw(_m_packuswb(v64, 0i64), 0i64));
    v69 = _m_psubw((__m64)qword_A79DA8, v65);
    v6 += 16;
    v7 += 16;
    v8 += 16;
    *(__m64 *)(v9 + 48) = _m_por(
                            _m_por(
                              _m_por(_m_punpcklwd(v67, 0i64), _m_pslld(_m_punpcklwd(v68, 0i64), 0x10u)),
                              _m_pslld(_m_punpcklwd(v69, 0i64), 8u)),
                            _m_pslld(_m_punpcklwd(0i64, v66), 8u));
    *(__m64 *)(v9 + 56) = _m_por(
                            _m_por(
                              _m_por(_m_punpckhwd(v67, 0i64), _m_pslld(_m_punpckhwd(v68, 0i64), 0x10u)),
                              _m_pslld(_m_punpckhwd(v69, 0i64), 8u)),
                            _m_pslld(_m_punpckhwd(0i64, v66), 8u));
    v9 += a6;
    --v10;
  }
  while ( v10 );
}
// A79D68: using guessed type __int64 qword_A79D68;
// A79D70: using guessed type __int64 qword_A79D70;
// A79D78: using guessed type __int64 qword_A79D78;
// A79D80: using guessed type __int64 qword_A79D80;
// A79D88: using guessed type __int64 qword_A79D88;
// A79D90: using guessed type __int64 qword_A79D90;
// A79D98: using guessed type __int64 qword_A79D98;
// A79DA8: using guessed type __int64 qword_A79DA8;

//----- (0079F510) --------------------------------------------------------
void __cdecl __spoils<ecx> own_ycbcr_411_to_rgb_one_half_mcu_m5(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // esi@1
  int v6; // eax@1
  int v7; // ebx@1
  int v8; // edi@1
  __m64 *v9; // edx@1
  signed int v10; // ecx@1
  __m64 v11; // mm2@2
  __m64 v12; // mm1@2
  __m64 v13; // mm4@2
  __m64 v14; // mm3@2
  __m64 v15; // mm6@2
  __m64 v16; // mm7@2
  __m64 v17; // mm5@2
  __m64 v18; // mm2@2
  __m64 v19; // mm5@2
  __m64 v20; // mm2@2
  __m64 v21; // mm5@2
  __m64 v22; // mm0@2
  __m64 v23; // mm7@2
  __m64 v24; // mm6@2
  __m64 v25; // mm0@2
  __m64 v26; // mm2@2
  __m64 v27; // mm6@2
  __m64 v28; // mm7@2
  __m64 v29; // mm5@2
  __m64 v30; // mm2@2
  __m64 v31; // mm3@2
  __m64 v32; // mm0@2
  __m64 v33; // mm2@2
  __m64 v34; // mm1@2
  __m64 v35; // mm0@2
  __m64 v36; // mm6@2
  __m64 v37; // mm0@2
  __m64 v38; // mm2@2
  __m64 v39; // mm0@2
  int v40; // edi@2
  __m64 v41; // mm0@2
  __m64 v42; // mm7@2
  __m64 v43; // mm6@2
  __m64 v44; // mm0@2
  __m64 v45; // mm2@2
  __m64 v46; // mm6@2
  __m64 v47; // mm7@2
  __m64 v48; // mm5@2
  __m64 v49; // mm2@2
  __m64 v50; // mm3@2
  __m64 v51; // mm0@2
  __m64 v52; // mm2@2
  __m64 v53; // mm1@2
  __m64 v54; // mm0@2
  __m64 v55; // mm6@2
  __m64 v56; // mm0@2
  __m64 v57; // mm2@2
  __m64 v58; // mm0@2
  int v59; // edi@2
  __m64 v60; // mm2@2
  __m64 v61; // mm1@2
  __m64 v62; // mm4@2
  __m64 v63; // mm3@2
  __m64 v64; // mm6@2
  __m64 v65; // mm7@2
  __m64 v66; // mm5@2
  __m64 v67; // mm2@2
  __m64 v68; // mm5@2
  __m64 v69; // mm2@2
  __m64 v70; // mm5@2
  __m64 v71; // mm0@2
  __m64 v72; // mm7@2
  __m64 v73; // mm6@2
  __m64 v74; // mm0@2
  __m64 v75; // mm2@2
  __m64 v76; // mm6@2
  __m64 v77; // mm7@2
  __m64 v78; // mm5@2
  __m64 v79; // mm2@2
  __m64 v80; // mm3@2
  __m64 v81; // mm0@2
  __m64 v82; // mm2@2
  __m64 v83; // mm1@2
  __m64 v84; // mm0@2
  __m64 v85; // mm6@2
  __m64 v86; // mm0@2
  __m64 v87; // mm2@2
  __m64 v88; // mm0@2
  int v89; // edi@2
  __m64 v90; // mm0@2
  __m64 v91; // mm7@2
  __m64 v92; // mm6@2
  __m64 v93; // mm0@2
  __m64 v94; // mm2@2
  __m64 v95; // mm6@2
  __m64 v96; // mm7@2
  __m64 v97; // mm5@2
  __m64 v98; // mm2@2
  __m64 v99; // mm3@2
  __m64 v100; // mm0@2
  __m64 v101; // mm2@2
  __m64 v102; // mm1@2
  __m64 v103; // mm0@2
  __m64 v104; // mm6@2
  __m64 v105; // mm0@2
  __m64 v106; // mm2@2
  __m64 v107; // mm0@2
  char v108; // [sp+20h] [bp-30h]@1

  v5 = a1;
  v6 = a2;
  v7 = a3;
  v8 = a4;
  v9 = (__m64 *)((unsigned int)&v108 & 0xFFFFFFE0);
  v10 = 4;
  do
  {
    v11 = _m_psllw(*(__m64 *)v7, 4u);
    v12 = _m_psllw(*(__m64 *)v6, 4u);
    v13 = _m_psubw(_m_pmulhw((__m64)qword_A79CF8, v12), (__m64)qword_A79D18);
    v14 = _m_psubw(_m_pmulhw((__m64)qword_A79CF0, v11), (__m64)qword_A79D20);
    v15 = _m_punpcklwd(v13, v13);
    v16 = _m_punpcklwd(v14, v14);
    v17 = _m_psrad(_m_psubd(_m_pmaddwd(_m_punpcklwd(v11, v12), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu);
    v18 = _m_psrad(_m_psubd(_m_pmaddwd(_m_punpckhwd(v11, v12), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu);
    *(__m64 *)(((unsigned int)&v108 & 0xFFFFFFE0) + 0x10) = v15;
    v9->m64_u64 = (unsigned __int64)v16;
    v19 = _m_packssdw(v17, v17);
    v20 = _m_packssdw(v18, v18);
    *(__m64 *)(((unsigned int)&v108 & 0xFFFFFFE0) + 0x28) = _m_punpckhwd(v13, v13);
    *(__m64 *)(((unsigned int)&v108 & 0xFFFFFFE0) + 0x18) = _m_punpckhwd(v14, v14);
    v21 = _m_punpcklwd(v19, v19);
    v22 = *(__m64 *)v5;
    *(__m64 *)(((unsigned int)&v108 & 0xFFFFFFE0) + 8) = v21;
    *(__m64 *)(((unsigned int)&v108 & 0xFFFFFFE0) + 0x20) = _m_punpcklwd(v20, v20);
    v23 = _m_punpcklbw(_m_packuswb(_m_paddsw(v16, v22), 0i64), 0i64);
    v24 = _m_punpcklbw(_m_packuswb(_m_paddsw(v15, v22), 0i64), 0i64);
    v25 = _m_punpcklbw(_m_packuswb(_m_psubsw(v22, v21), 0i64), 0i64);
    v26 = _m_psllq(v24, 8u);
    v27 = _m_por(v24, _m_psrlq(v23, 8u));
    v28 = _m_pand(_m_por(v23, _m_psllq(v25, 8u)), (__m64)qword_A79D58);
    v29 = _m_por(_m_pand(_m_por(v25, v26), (__m64)qword_A79D50), _m_pand(v27, (__m64)qword_A79D58));
    v30 = *(__m64 *)(((unsigned int)&v108 & 0xFFFFFFE0) + 0x28);
    v31 = *(__m64 *)(((unsigned int)&v108 & 0xFFFFFFE0) + 0x20);
    *(__m64 *)v8 = _m_por(
                     _m_pand(_m_por(_m_psllq(v28, 0x10u), v28), (__m64)qword_A79D60),
                     _m_psrlq(_m_psllq(v29, 0x20u), 0x10u));
    v32 = *(__m64 *)(v5 + 8);
    v33 = _m_punpcklbw(_m_packuswb(_m_paddsw(v30, v32), 0i64), 0i64);
    v34 = _m_punpcklbw(_m_packuswb(_m_paddsw(*(__m64 *)(((unsigned int)&v108 & 0xFFFFFFE0) + 0x18), v32), 0i64), 0i64);
    v35 = _m_punpcklbw(_m_packuswb(_m_psubsw(v32, v31), 0i64), 0i64);
    v36 = _m_psllq(v35, 8u);
    v37 = _m_pand(_m_por(v35, _m_psllq(v33, 8u)), (__m64)qword_A79D50);
    v38 = _m_por(
            _m_psllq(_m_pand(_m_por(v33, _m_psrlq(v34, 8u)), (__m64)qword_A79D58), 0x10u),
            _m_pand(_m_por(v34, v36), (__m64)qword_A79D58));
    v39 = _m_pand(_m_por(v37, _m_psrlq(v37, 0x10u)), (__m64)qword_A79D60);
    *(__m64 *)(v8 + 8) = _m_por(_m_psrlq(v29, 0x20u), _m_psllq(v38, 0x20u));
    *(__m64 *)(v8 + 16) = _m_por(_m_psllq(_m_psrlq(v38, 0x20u), 0x10u), v39);
    v40 = a5 + v8;
    v41 = *(__m64 *)(v5 + 16);
    v42 = _m_punpcklbw(_m_packuswb(_m_paddsw((__m64)v9->m64_u64, v41), 0i64), 0i64);
    v43 = _m_punpcklbw(_m_packuswb(_m_paddsw(*(__m64 *)(((unsigned int)&v108 & 0xFFFFFFE0) + 0x10), v41), 0i64), 0i64);
    v44 = _m_punpcklbw(_m_packuswb(_m_psubsw(v41, *(__m64 *)(((unsigned int)&v108 & 0xFFFFFFE0) + 8)), 0i64), 0i64);
    v45 = _m_psllq(v43, 8u);
    v46 = _m_por(v43, _m_psrlq(v42, 8u));
    v47 = _m_pand(_m_por(v42, _m_psllq(v44, 8u)), (__m64)qword_A79D58);
    v48 = _m_por(_m_pand(_m_por(v44, v45), (__m64)qword_A79D50), _m_pand(v46, (__m64)qword_A79D58));
    v49 = *(__m64 *)(((unsigned int)&v108 & 0xFFFFFFE0) + 0x28);
    v50 = *(__m64 *)(((unsigned int)&v108 & 0xFFFFFFE0) + 0x20);
    *(__m64 *)v40 = _m_por(
                      _m_pand(_m_por(_m_psllq(v47, 0x10u), v47), (__m64)qword_A79D60),
                      _m_psrlq(_m_psllq(v48, 0x20u), 0x10u));
    v51 = *(__m64 *)(v5 + 24);
    v52 = _m_punpcklbw(_m_packuswb(_m_paddsw(v49, v51), 0i64), 0i64);
    v53 = _m_punpcklbw(_m_packuswb(_m_paddsw(*(__m64 *)(((unsigned int)&v108 & 0xFFFFFFE0) + 0x18), v51), 0i64), 0i64);
    v54 = _m_punpcklbw(_m_packuswb(_m_psubsw(v51, v50), 0i64), 0i64);
    v55 = _m_psllq(v54, 8u);
    v56 = _m_pand(_m_por(v54, _m_psllq(v52, 8u)), (__m64)qword_A79D50);
    v57 = _m_por(
            _m_psllq(_m_pand(_m_por(v52, _m_psrlq(v53, 8u)), (__m64)qword_A79D58), 0x10u),
            _m_pand(_m_por(v53, v55), (__m64)qword_A79D58));
    v58 = _m_pand(_m_por(v56, _m_psrlq(v56, 0x10u)), (__m64)qword_A79D60);
    *(__m64 *)(v40 + 8) = _m_por(_m_psrlq(v48, 0x20u), _m_psllq(v57, 0x20u));
    *(__m64 *)(v40 + 16) = _m_por(_m_psllq(_m_psrlq(v57, 0x20u), 0x10u), v58);
    v59 = v40 - a5;
    v60 = _m_psllw(*(__m64 *)(v7 + 8), 4u);
    v61 = _m_psllw(*(__m64 *)(v6 + 8), 4u);
    v62 = _m_psubw(_m_pmulhw((__m64)qword_A79CF8, v61), (__m64)qword_A79D18);
    v63 = _m_psubw(_m_pmulhw((__m64)qword_A79CF0, v60), (__m64)qword_A79D20);
    v64 = _m_punpcklwd(v62, v62);
    v65 = _m_punpcklwd(v63, v63);
    v66 = _m_psrad(_m_psubd(_m_pmaddwd(_m_punpcklwd(v60, v61), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu);
    v67 = _m_psrad(_m_psubd(_m_pmaddwd(_m_punpckhwd(v60, v61), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu);
    *(__m64 *)(((unsigned int)&v108 & 0xFFFFFFE0) + 0x10) = v64;
    v9->m64_u64 = (unsigned __int64)v65;
    v68 = _m_packssdw(v66, v66);
    v69 = _m_packssdw(v67, v67);
    *(__m64 *)(((unsigned int)&v108 & 0xFFFFFFE0) + 0x28) = _m_punpckhwd(v62, v62);
    *(__m64 *)(((unsigned int)&v108 & 0xFFFFFFE0) + 0x18) = _m_punpckhwd(v63, v63);
    v70 = _m_punpcklwd(v68, v68);
    v71 = *(__m64 *)(v5 + 128);
    *(__m64 *)(((unsigned int)&v108 & 0xFFFFFFE0) + 8) = v70;
    *(__m64 *)(((unsigned int)&v108 & 0xFFFFFFE0) + 0x20) = _m_punpcklwd(v69, v69);
    v72 = _m_punpcklbw(_m_packuswb(_m_paddsw(v65, v71), 0i64), 0i64);
    v73 = _m_punpcklbw(_m_packuswb(_m_paddsw(v64, v71), 0i64), 0i64);
    v74 = _m_punpcklbw(_m_packuswb(_m_psubsw(v71, v70), 0i64), 0i64);
    v75 = _m_psllq(v73, 8u);
    v76 = _m_por(v73, _m_psrlq(v72, 8u));
    v77 = _m_pand(_m_por(v72, _m_psllq(v74, 8u)), (__m64)qword_A79D58);
    v78 = _m_por(_m_pand(_m_por(v74, v75), (__m64)qword_A79D50), _m_pand(v76, (__m64)qword_A79D58));
    v79 = *(__m64 *)(((unsigned int)&v108 & 0xFFFFFFE0) + 0x28);
    v80 = *(__m64 *)(((unsigned int)&v108 & 0xFFFFFFE0) + 0x20);
    *(__m64 *)(v59 + 24) = _m_por(
                             _m_pand(_m_por(_m_psllq(v77, 0x10u), v77), (__m64)qword_A79D60),
                             _m_psrlq(_m_psllq(v78, 0x20u), 0x10u));
    v81 = *(__m64 *)(v5 + 136);
    v82 = _m_punpcklbw(_m_packuswb(_m_paddsw(v79, v81), 0i64), 0i64);
    v83 = _m_punpcklbw(_m_packuswb(_m_paddsw(*(__m64 *)(((unsigned int)&v108 & 0xFFFFFFE0) + 0x18), v81), 0i64), 0i64);
    v84 = _m_punpcklbw(_m_packuswb(_m_psubsw(v81, v80), 0i64), 0i64);
    v85 = _m_psllq(v84, 8u);
    v86 = _m_pand(_m_por(v84, _m_psllq(v82, 8u)), (__m64)qword_A79D50);
    v87 = _m_por(
            _m_psllq(_m_pand(_m_por(v82, _m_psrlq(v83, 8u)), (__m64)qword_A79D58), 0x10u),
            _m_pand(_m_por(v83, v85), (__m64)qword_A79D58));
    v88 = _m_pand(_m_por(v86, _m_psrlq(v86, 0x10u)), (__m64)qword_A79D60);
    *(__m64 *)(v59 + 32) = _m_por(_m_psrlq(v78, 0x20u), _m_psllq(v87, 0x20u));
    *(__m64 *)(v59 + 40) = _m_por(_m_psllq(_m_psrlq(v87, 0x20u), 0x10u), v88);
    v6 += 16;
    v7 += 16;
    v89 = a5 + v59;
    v90 = *(__m64 *)(v5 + 144);
    v91 = _m_punpcklbw(_m_packuswb(_m_paddsw((__m64)v9->m64_u64, v90), 0i64), 0i64);
    v92 = _m_punpcklbw(_m_packuswb(_m_paddsw(*(__m64 *)(((unsigned int)&v108 & 0xFFFFFFE0) + 0x10), v90), 0i64), 0i64);
    v93 = _m_punpcklbw(_m_packuswb(_m_psubsw(v90, *(__m64 *)(((unsigned int)&v108 & 0xFFFFFFE0) + 8)), 0i64), 0i64);
    v94 = _m_psllq(v92, 8u);
    v95 = _m_por(v92, _m_psrlq(v91, 8u));
    v96 = _m_pand(_m_por(v91, _m_psllq(v93, 8u)), (__m64)qword_A79D58);
    v97 = _m_por(_m_pand(_m_por(v93, v94), (__m64)qword_A79D50), _m_pand(v95, (__m64)qword_A79D58));
    v98 = *(__m64 *)(((unsigned int)&v108 & 0xFFFFFFE0) + 0x28);
    v99 = *(__m64 *)(((unsigned int)&v108 & 0xFFFFFFE0) + 0x20);
    *(__m64 *)(v89 + 24) = _m_por(
                             _m_pand(_m_por(_m_psllq(v96, 0x10u), v96), (__m64)qword_A79D60),
                             _m_psrlq(_m_psllq(v97, 0x20u), 0x10u));
    v100 = *(__m64 *)(v5 + 152);
    v101 = _m_punpcklbw(_m_packuswb(_m_paddsw(v98, v100), 0i64), 0i64);
    v102 = _m_punpcklbw(_m_packuswb(_m_paddsw(*(__m64 *)(((unsigned int)&v108 & 0xFFFFFFE0) + 0x18), v100), 0i64), 0i64);
    v103 = _m_punpcklbw(_m_packuswb(_m_psubsw(v100, v99), 0i64), 0i64);
    v104 = _m_psllq(v103, 8u);
    v105 = _m_pand(_m_por(v103, _m_psllq(v101, 8u)), (__m64)qword_A79D50);
    v106 = _m_por(
             _m_psllq(_m_pand(_m_por(v101, _m_psrlq(v102, 8u)), (__m64)qword_A79D58), 0x10u),
             _m_pand(_m_por(v102, v104), (__m64)qword_A79D58));
    v107 = _m_pand(_m_por(v105, _m_psrlq(v105, 0x10u)), (__m64)qword_A79D60);
    *(__m64 *)(v89 + 32) = _m_por(_m_psrlq(v97, 0x20u), _m_psllq(v106, 0x20u));
    *(__m64 *)(v89 + 40) = _m_por(_m_psllq(_m_psrlq(v106, 0x20u), 0x10u), v107);
    v5 += 32;
    v8 = a5 + v89;
    --v10;
  }
  while ( v10 );
}
// A79CF0: using guessed type __int64 qword_A79CF0;
// A79CF8: using guessed type __int64 qword_A79CF8;
// A79D00: using guessed type __int64 qword_A79D00;
// A79D18: using guessed type __int64 qword_A79D18;
// A79D20: using guessed type __int64 qword_A79D20;
// A79D28: using guessed type __int64 qword_A79D28;
// A79D50: using guessed type __int64 qword_A79D50;
// A79D58: using guessed type __int64 qword_A79D58;
// A79D60: using guessed type __int64 qword_A79D60;

//----- (0079FAF0) --------------------------------------------------------
void __cdecl __spoils<ecx> own_ycbcr_411_to_bgr_one_half_mcu_m5(int a1, int a2, int a3, int a4, int a5)
{
  int v5; // esi@1
  int v6; // eax@1
  int v7; // ebx@1
  int v8; // edi@1
  __m64 *v9; // edx@1
  signed int v10; // ecx@1
  __m64 v11; // mm2@2
  __m64 v12; // mm1@2
  __m64 v13; // mm4@2
  __m64 v14; // mm3@2
  __m64 v15; // mm7@2
  __m64 v16; // mm6@2
  __m64 v17; // mm5@2
  __m64 v18; // mm2@2
  __m64 v19; // mm5@2
  __m64 v20; // mm2@2
  __m64 v21; // mm5@2
  __m64 v22; // mm0@2
  __m64 v23; // mm7@2
  __m64 v24; // mm6@2
  __m64 v25; // mm0@2
  __m64 v26; // mm2@2
  __m64 v27; // mm6@2
  __m64 v28; // mm7@2
  __m64 v29; // mm5@2
  __m64 v30; // mm2@2
  __m64 v31; // mm0@2
  __m64 v32; // mm2@2
  __m64 v33; // mm1@2
  __m64 v34; // mm0@2
  __m64 v35; // mm7@2
  __m64 v36; // mm2@2
  __m64 v37; // mm1@2
  __m64 v38; // mm0@2
  __m64 v39; // mm2@2
  __m64 v40; // mm0@2
  int v41; // edi@2
  __m64 v42; // mm0@2
  __m64 v43; // mm7@2
  __m64 v44; // mm6@2
  __m64 v45; // mm0@2
  __m64 v46; // mm2@2
  __m64 v47; // mm6@2
  __m64 v48; // mm7@2
  __m64 v49; // mm5@2
  __m64 v50; // mm2@2
  __m64 v51; // mm0@2
  __m64 v52; // mm2@2
  __m64 v53; // mm1@2
  __m64 v54; // mm0@2
  __m64 v55; // mm7@2
  __m64 v56; // mm2@2
  __m64 v57; // mm1@2
  __m64 v58; // mm0@2
  __m64 v59; // mm2@2
  __m64 v60; // mm0@2
  int v61; // edi@2
  __m64 v62; // mm2@2
  __m64 v63; // mm1@2
  __m64 v64; // mm4@2
  __m64 v65; // mm3@2
  __m64 v66; // mm7@2
  __m64 v67; // mm6@2
  __m64 v68; // mm5@2
  __m64 v69; // mm2@2
  __m64 v70; // mm5@2
  __m64 v71; // mm2@2
  __m64 v72; // mm5@2
  __m64 v73; // mm0@2
  __m64 v74; // mm7@2
  __m64 v75; // mm6@2
  __m64 v76; // mm0@2
  __m64 v77; // mm2@2
  __m64 v78; // mm6@2
  __m64 v79; // mm7@2
  __m64 v80; // mm5@2
  __m64 v81; // mm2@2
  __m64 v82; // mm0@2
  __m64 v83; // mm2@2
  __m64 v84; // mm1@2
  __m64 v85; // mm0@2
  __m64 v86; // mm7@2
  __m64 v87; // mm2@2
  __m64 v88; // mm1@2
  __m64 v89; // mm0@2
  __m64 v90; // mm2@2
  __m64 v91; // mm0@2
  __m64 v92; // mm0@2
  int v93; // edi@2
  __m64 v94; // mm7@2
  __m64 v95; // mm6@2
  __m64 v96; // mm0@2
  __m64 v97; // mm2@2
  __m64 v98; // mm6@2
  __m64 v99; // mm7@2
  __m64 v100; // mm5@2
  __m64 v101; // mm2@2
  __m64 v102; // mm0@2
  __m64 v103; // mm2@2
  __m64 v104; // mm1@2
  __m64 v105; // mm0@2
  __m64 v106; // mm7@2
  __m64 v107; // mm2@2
  __m64 v108; // mm1@2
  __m64 v109; // mm0@2
  __m64 v110; // mm2@2
  __m64 v111; // mm0@2
  char v112; // [sp+20h] [bp-30h]@1

  v5 = a1;
  v6 = a2;
  v7 = a3;
  v8 = a4;
  v9 = (__m64 *)((unsigned int)&v112 & 0xFFFFFFE0);
  v10 = 4;
  do
  {
    v11 = _m_psllw(*(__m64 *)v7, 4u);
    v12 = _m_psllw(*(__m64 *)v6, 4u);
    v13 = _m_psubw(_m_pmulhw((__m64)qword_A79CF8, v12), (__m64)qword_A79D18);
    v14 = _m_psubw(_m_pmulhw((__m64)qword_A79CF0, v11), (__m64)qword_A79D20);
    v15 = _m_punpcklwd(v13, v13);
    v16 = _m_punpcklwd(v14, v14);
    v17 = _m_psrad(_m_psubd(_m_pmaddwd(_m_punpcklwd(v11, v12), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu);
    v18 = _m_psrad(_m_psubd(_m_pmaddwd(_m_punpckhwd(v11, v12), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu);
    v19 = _m_packssdw(v17, v17);
    *(__m64 *)(((unsigned int)&v112 & 0xFFFFFFE0) + 0x10) = v15;
    v20 = _m_packssdw(v18, v18);
    v9->m64_u64 = (unsigned __int64)v16;
    v21 = _m_punpcklwd(v19, v19);
    *(__m64 *)(((unsigned int)&v112 & 0xFFFFFFE0) + 0x28) = _m_punpckhwd(v13, v13);
    *(__m64 *)(((unsigned int)&v112 & 0xFFFFFFE0) + 0x18) = _m_punpckhwd(v14, v14);
    *(__m64 *)(((unsigned int)&v112 & 0xFFFFFFE0) + 8) = v21;
    v22 = *(__m64 *)v5;
    *(__m64 *)(((unsigned int)&v112 & 0xFFFFFFE0) + 0x20) = _m_punpcklwd(v20, v20);
    v23 = _m_punpcklbw(_m_packuswb(_m_paddsw(v15, v22), 0i64), 0i64);
    v24 = _m_punpcklbw(_m_packuswb(_m_paddsw(v16, v22), 0i64), 0i64);
    v25 = _m_punpcklbw(_m_packuswb(_m_psubsw(v22, v21), 0i64), 0i64);
    v26 = _m_psllq(v24, 8u);
    v27 = _m_por(v24, _m_psrlq(v23, 8u));
    v28 = _m_pand(_m_por(v23, _m_psllq(v25, 8u)), (__m64)qword_A79D58);
    v29 = _m_por(_m_pand(_m_por(v25, v26), (__m64)qword_A79D50), _m_pand(v27, (__m64)qword_A79D58));
    v30 = *(__m64 *)(((unsigned int)&v112 & 0xFFFFFFE0) + 0x18);
    *(__m64 *)v8 = _m_por(
                     _m_pand(_m_por(_m_psllq(v28, 0x10u), v28), (__m64)qword_A79D60),
                     _m_psrlq(_m_psllq(v29, 0x20u), 0x10u));
    v31 = *(__m64 *)(v5 + 8);
    v32 = _m_punpcklbw(_m_packuswb(_m_paddw(v30, v31), 0i64), 0i64);
    v33 = _m_punpcklbw(_m_packuswb(_m_paddw(*(__m64 *)(((unsigned int)&v112 & 0xFFFFFFE0) + 0x28), v31), 0i64), 0i64);
    v34 = _m_punpcklbw(_m_packuswb(_m_psubw(v31, *(__m64 *)(((unsigned int)&v112 & 0xFFFFFFE0) + 0x20)), 0i64), 0i64);
    v35 = _m_psllq(v32, 8u);
    v36 = _m_por(v32, _m_psrlq(v33, 8u));
    v37 = _m_por(v33, _m_psllq(v34, 8u));
    v38 = _m_pand(_m_por(v34, v35), (__m64)qword_A79D50);
    v39 = _m_por(_m_psllq(_m_pand(v36, (__m64)qword_A79D58), 0x10u), _m_pand(v37, (__m64)qword_A79D58));
    v40 = _m_pand(_m_por(v38, _m_psrlq(v38, 0x10u)), (__m64)qword_A79D60);
    *(__m64 *)(v8 + 8) = _m_por(_m_psrlq(v29, 0x20u), _m_psllq(v39, 0x20u));
    *(__m64 *)(v8 + 16) = _m_por(_m_psllq(_m_psrlq(v39, 0x20u), 0x10u), v40);
    v41 = a5 + v8;
    v42 = *(__m64 *)(v5 + 16);
    v43 = _m_punpcklbw(_m_packuswb(_m_paddsw(*(__m64 *)(((unsigned int)&v112 & 0xFFFFFFE0) + 0x10), v42), 0i64), 0i64);
    v44 = _m_punpcklbw(_m_packuswb(_m_paddsw((__m64)v9->m64_u64, v42), 0i64), 0i64);
    v45 = _m_punpcklbw(_m_packuswb(_m_psubsw(v42, *(__m64 *)(((unsigned int)&v112 & 0xFFFFFFE0) + 8)), 0i64), 0i64);
    v46 = _m_psllq(v44, 8u);
    v47 = _m_por(v44, _m_psrlq(v43, 8u));
    v48 = _m_pand(_m_por(v43, _m_psllq(v45, 8u)), (__m64)qword_A79D58);
    v49 = _m_por(_m_pand(_m_por(v45, v46), (__m64)qword_A79D50), _m_pand(v47, (__m64)qword_A79D58));
    v50 = *(__m64 *)(((unsigned int)&v112 & 0xFFFFFFE0) + 0x18);
    *(__m64 *)v41 = _m_por(
                      _m_pand(_m_por(_m_psllq(v48, 0x10u), v48), (__m64)qword_A79D60),
                      _m_psrlq(_m_psllq(v49, 0x20u), 0x10u));
    v51 = *(__m64 *)(v5 + 24);
    v52 = _m_punpcklbw(_m_packuswb(_m_paddw(v50, v51), 0i64), 0i64);
    v53 = _m_punpcklbw(_m_packuswb(_m_paddw(*(__m64 *)(((unsigned int)&v112 & 0xFFFFFFE0) + 0x28), v51), 0i64), 0i64);
    v54 = _m_punpcklbw(_m_packuswb(_m_psubw(v51, *(__m64 *)(((unsigned int)&v112 & 0xFFFFFFE0) + 0x20)), 0i64), 0i64);
    v55 = _m_psllq(v52, 8u);
    v56 = _m_por(v52, _m_psrlq(v53, 8u));
    v57 = _m_por(v53, _m_psllq(v54, 8u));
    v58 = _m_pand(_m_por(v54, v55), (__m64)qword_A79D50);
    v59 = _m_por(_m_psllq(_m_pand(v56, (__m64)qword_A79D58), 0x10u), _m_pand(v57, (__m64)qword_A79D58));
    v60 = _m_pand(_m_por(v58, _m_psrlq(v58, 0x10u)), (__m64)qword_A79D60);
    *(__m64 *)(v41 + 8) = _m_por(_m_psrlq(v49, 0x20u), _m_psllq(v59, 0x20u));
    *(__m64 *)(v41 + 16) = _m_por(_m_psllq(_m_psrlq(v59, 0x20u), 0x10u), v60);
    v61 = v41 - a5;
    v62 = _m_psllw(*(__m64 *)(v7 + 8), 4u);
    v63 = _m_psllw(*(__m64 *)(v6 + 8), 4u);
    v64 = _m_psubw(_m_pmulhw((__m64)qword_A79CF8, v63), (__m64)qword_A79D18);
    v65 = _m_psubw(_m_pmulhw((__m64)qword_A79CF0, v62), (__m64)qword_A79D20);
    v66 = _m_punpcklwd(v64, v64);
    v67 = _m_punpcklwd(v65, v65);
    v68 = _m_psrad(_m_psubd(_m_pmaddwd(_m_punpcklwd(v62, v63), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu);
    v69 = _m_psrad(_m_psubd(_m_pmaddwd(_m_punpckhwd(v62, v63), (__m64)qword_A79D00), (__m64)qword_A79D28), 0xCu);
    v70 = _m_packssdw(v68, v68);
    *(__m64 *)(((unsigned int)&v112 & 0xFFFFFFE0) + 0x10) = v66;
    v71 = _m_packssdw(v69, v69);
    v9->m64_u64 = (unsigned __int64)v67;
    v72 = _m_punpcklwd(v70, v70);
    *(__m64 *)(((unsigned int)&v112 & 0xFFFFFFE0) + 0x28) = _m_punpckhwd(v64, v64);
    *(__m64 *)(((unsigned int)&v112 & 0xFFFFFFE0) + 0x18) = _m_punpckhwd(v65, v65);
    *(__m64 *)(((unsigned int)&v112 & 0xFFFFFFE0) + 8) = v72;
    v73 = *(__m64 *)(v5 + 128);
    *(__m64 *)(((unsigned int)&v112 & 0xFFFFFFE0) + 0x20) = _m_punpcklwd(v71, v71);
    v74 = _m_punpcklbw(_m_packuswb(_m_paddsw(v66, v73), 0i64), 0i64);
    v75 = _m_punpcklbw(_m_packuswb(_m_paddsw(v67, v73), 0i64), 0i64);
    v76 = _m_punpcklbw(_m_packuswb(_m_psubsw(v73, v72), 0i64), 0i64);
    v77 = _m_psllq(v75, 8u);
    v78 = _m_por(v75, _m_psrlq(v74, 8u));
    v79 = _m_pand(_m_por(v74, _m_psllq(v76, 8u)), (__m64)qword_A79D58);
    v80 = _m_por(_m_pand(_m_por(v76, v77), (__m64)qword_A79D50), _m_pand(v78, (__m64)qword_A79D58));
    v81 = *(__m64 *)(((unsigned int)&v112 & 0xFFFFFFE0) + 0x18);
    *(__m64 *)(v61 + 24) = _m_por(
                             _m_pand(_m_por(_m_psllq(v79, 0x10u), v79), (__m64)qword_A79D60),
                             _m_psrlq(_m_psllq(v80, 0x20u), 0x10u));
    v82 = *(__m64 *)(v5 + 136);
    v83 = _m_punpcklbw(_m_packuswb(_m_paddw(v81, v82), 0i64), 0i64);
    v84 = _m_punpcklbw(_m_packuswb(_m_paddw(*(__m64 *)(((unsigned int)&v112 & 0xFFFFFFE0) + 0x28), v82), 0i64), 0i64);
    v85 = _m_punpcklbw(_m_packuswb(_m_psubw(v82, *(__m64 *)(((unsigned int)&v112 & 0xFFFFFFE0) + 0x20)), 0i64), 0i64);
    v86 = _m_psllq(v83, 8u);
    v87 = _m_por(v83, _m_psrlq(v84, 8u));
    v88 = _m_por(v84, _m_psllq(v85, 8u));
    v89 = _m_pand(_m_por(v85, v86), (__m64)qword_A79D50);
    v90 = _m_por(_m_psllq(_m_pand(v87, (__m64)qword_A79D58), 0x10u), _m_pand(v88, (__m64)qword_A79D58));
    v91 = _m_pand(_m_por(v89, _m_psrlq(v89, 0x10u)), (__m64)qword_A79D60);
    *(__m64 *)(v61 + 32) = _m_por(_m_psrlq(v80, 0x20u), _m_psllq(v90, 0x20u));
    v6 += 16;
    v7 += 16;
    *(__m64 *)(v61 + 40) = _m_por(_m_psllq(_m_psrlq(v90, 0x20u), 0x10u), v91);
    v92 = *(__m64 *)(v5 + 144);
    v93 = a5 + v61;
    v94 = _m_punpcklbw(_m_packuswb(_m_paddsw(*(__m64 *)(((unsigned int)&v112 & 0xFFFFFFE0) + 0x10), v92), 0i64), 0i64);
    v95 = _m_punpcklbw(_m_packuswb(_m_paddsw((__m64)v9->m64_u64, v92), 0i64), 0i64);
    v96 = _m_punpcklbw(_m_packuswb(_m_psubsw(v92, *(__m64 *)(((unsigned int)&v112 & 0xFFFFFFE0) + 8)), 0i64), 0i64);
    v97 = _m_psllq(v95, 8u);
    v98 = _m_por(v95, _m_psrlq(v94, 8u));
    v99 = _m_pand(_m_por(v94, _m_psllq(v96, 8u)), (__m64)qword_A79D58);
    v100 = _m_por(_m_pand(_m_por(v96, v97), (__m64)qword_A79D50), _m_pand(v98, (__m64)qword_A79D58));
    v101 = *(__m64 *)(((unsigned int)&v112 & 0xFFFFFFE0) + 0x18);
    *(__m64 *)(v93 + 24) = _m_por(
                             _m_pand(_m_por(_m_psllq(v99, 0x10u), v99), (__m64)qword_A79D60),
                             _m_psrlq(_m_psllq(v100, 0x20u), 0x10u));
    v102 = *(__m64 *)(v5 + 152);
    v103 = _m_punpcklbw(_m_packuswb(_m_paddw(v101, v102), 0i64), 0i64);
    v104 = _m_punpcklbw(_m_packuswb(_m_paddw(*(__m64 *)(((unsigned int)&v112 & 0xFFFFFFE0) + 0x28), v102), 0i64), 0i64);
    v105 = _m_punpcklbw(_m_packuswb(_m_psubw(v102, *(__m64 *)(((unsigned int)&v112 & 0xFFFFFFE0) + 0x20)), 0i64), 0i64);
    v106 = _m_psllq(v103, 8u);
    v107 = _m_por(v103, _m_psrlq(v104, 8u));
    v108 = _m_por(v104, _m_psllq(v105, 8u));
    v109 = _m_pand(_m_por(v105, v106), (__m64)qword_A79D50);
    v110 = _m_por(_m_psllq(_m_pand(v107, (__m64)qword_A79D58), 0x10u), _m_pand(v108, (__m64)qword_A79D58));
    v111 = _m_pand(_m_por(v109, _m_psrlq(v109, 0x10u)), (__m64)qword_A79D60);
    *(__m64 *)(v93 + 32) = _m_por(_m_psrlq(v100, 0x20u), _m_psllq(v110, 0x20u));
    v5 += 32;
    *(__m64 *)(v93 + 40) = _m_por(_m_psllq(_m_psrlq(v110, 0x20u), 0x10u), v111);
    v8 = a5 + v93;
    --v10;
  }
  while ( v10 );
}
// A79CF0: using guessed type __int64 qword_A79CF0;
// A79CF8: using guessed type __int64 qword_A79CF8;
// A79D00: using guessed type __int64 qword_A79D00;
// A79D18: using guessed type __int64 qword_A79D18;
// A79D20: using guessed type __int64 qword_A79D20;
// A79D28: using guessed type __int64 qword_A79D28;
// A79D50: using guessed type __int64 qword_A79D50;
// A79D58: using guessed type __int64 qword_A79D58;
// A79D60: using guessed type __int64 qword_A79D60;

//----- (007A00D0) --------------------------------------------------------
void __cdecl __spoils<ecx> own_ycbcr_411_to_rgba_fpx_full_mcu_m5(int a1, int a2, int a3, int a4, int a5)
{
  signed int v5; // ecx@1
  int v6; // esi@1
  int v7; // ebx@1
  int v8; // edx@1
  int v9; // edi@1
  unsigned int *v10; // eax@1
  __m64 v11; // mm1@2
  __m64 v12; // mm0@2
  __m64 v13; // rt1@2
  __m64 v14; // mm3@2
  __m64 v15; // mm1@2
  __m64 v16; // mm0@2
  __m64 v17; // mm6@2
  __m64 v18; // mm3@2
  __m64 v19; // mm0@2
  __m64 v20; // mm2@2
  __m64 v21; // mm4@2
  __m64 v22; // mm0@2
  __m64 v23; // mm2@2
  __m64 v24; // mm6@2
  __m64 v25; // mm6@2
  __m64 v26; // mm0@2
  __m64 v27; // mm2@2
  __m64 v28; // mm4@2
  __m64 v29; // mm0@2
  __m64 v30; // mm2@2
  __m64 v31; // mm6@2
  __m64 v32; // mm6@2
  __m64 v33; // mm0@2
  __m64 v34; // mm2@2
  __m64 v35; // mm4@2
  __m64 v36; // mm0@2
  __m64 v37; // mm2@2
  __m64 v38; // mm6@2
  __m64 v39; // mm6@2
  __m64 v40; // mm0@2
  __m64 v41; // mm2@2
  __m64 v42; // mm4@2
  __m64 v43; // mm0@2
  __m64 v44; // mm2@2
  __m64 v45; // mm6@2
  int v46; // edi@2
  __m64 *v47; // esi@2
  __m64 v48; // mm0@2
  __m64 v49; // mm2@2
  __m64 v50; // mm4@2
  __m64 v51; // mm0@2
  __m64 v52; // mm2@2
  __m64 v53; // mm6@2
  __m64 v54; // mm6@2
  __m64 v55; // mm0@2
  __m64 v56; // mm2@2
  __m64 v57; // mm4@2
  __m64 v58; // mm0@2
  __m64 v59; // mm2@2
  __m64 v60; // mm6@2
  __m64 v61; // mm6@2
  __m64 v62; // mm0@2
  __m64 v63; // mm2@2
  __m64 v64; // mm4@2
  __m64 v65; // mm0@2
  __m64 v66; // mm2@2
  __m64 v67; // mm6@2
  __m64 v68; // mm6@2
  __m64 v69; // mm0@2
  __m64 v70; // mm2@2
  __m64 v71; // mm4@2
  __m64 v72; // mm0@2
  __m64 v73; // mm2@2
  __m64 v74; // mm6@2
  char v75; // [sp+20h] [bp-30h]@1

  v5 = 8;
  v6 = a1;
  v7 = a2;
  v8 = a3;
  v9 = a4;
  v10 = (unsigned int *)((unsigned int)&v75 & 0xFFFFFFE0);
  while ( 1 )
  {
    v11 = _m_psllw(*(__m64 *)v7, 4u);
    v12 = _m_psllw(*(__m64 *)v8, 4u);
    v13 = *(__m64 *)v6;
    v14 = _m_psubw(_m_pmulhw((__m64)qword_A79CF8, v11), (__m64)qword_A79D18);
    *(__m64 *)v10 = _m_psubw(_m_pmulhw((__m64)qword_A79CF0, v12), (__m64)qword_A79D20);
    *(__m64 *)(((unsigned int)&v75 & 0xFFFFFFE0) + 8) = v14;
    *(__m64 *)(((unsigned int)&v75 & 0xFFFFFFE0) + 0x10) = _m_psraw(
                                                             _m_psubw(
                                                               _m_paddw(
                                                                 _m_pmullw((__m64)qword_A79D10, _m_psrlw(v12, 4u)),
                                                                 _m_pmullw((__m64)qword_A79D08, _m_psrlw(v11, 4u))),
                                                               (__m64)qword_A79D98),
                                                             8u);
    v15 = _m_psllw(*(__m64 *)(v7 + 8), 4u);
    v16 = _m_psllw(*(__m64 *)(v8 + 8), 4u);
    v17 = *(__m64 *)v6;
    v18 = _m_psubw(_m_pmulhw((__m64)qword_A79CF8, v15), (__m64)qword_A79D18);
    *(__m64 *)(((unsigned int)&v75 & 0xFFFFFFE0) + 0x18) = _m_psubw(
                                                             _m_pmulhw((__m64)qword_A79CF0, v16),
                                                             (__m64)qword_A79D20);
    *(__m64 *)(((unsigned int)&v75 & 0xFFFFFFE0) + 0x20) = v18;
    *(__m64 *)(((unsigned int)&v75 & 0xFFFFFFE0) + 0x28) = _m_psraw(
                                                             _m_psubw(
                                                               _m_paddw(
                                                                 _m_pmullw((__m64)qword_A79D10, _m_psrlw(v16, 4u)),
                                                                 _m_pmullw((__m64)qword_A79D08, _m_psrlw(v15, 4u))),
                                                               (__m64)qword_A79D98),
                                                             8u);
    v19 = _mm_cvtsi32_si64(*v10);
    v20 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v75 & 0xFFFFFFE0) + 8));
    v21 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v75 & 0xFFFFFFE0) + 0x10));
    v22 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v19, v19), v17), 0i64), 0i64);
    v23 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v20, v20), v17), 0i64), 0i64);
    v24 = _m_punpcklbw(_m_packuswb(_m_psubsw(v17, _m_punpcklwd(v21, v21)), 0i64), 0i64);
    *(__m64 *)v9 = _m_por(
                     _m_por(
                       _m_por(_m_punpcklwd(v22, 0i64), _m_pslld(_m_punpcklwd(v23, 0i64), 0x10u)),
                       _m_psllw(_m_punpcklwd(v24, 0i64), 8u)),
                     (__m64)qword_A79DA0);
    *(__m64 *)(v9 + 8) = _m_por(
                           _m_por(
                             _m_por(_m_punpckhwd(v22, 0i64), _m_pslld(_m_punpckhwd(v23, 0i64), 0x10u)),
                             _m_psllw(_m_punpckhwd(v24, 0i64), 8u)),
                           (__m64)qword_A79DA0);
    v25 = *(__m64 *)(v6 + 8);
    v26 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v75 & 0xFFFFFFE0) + 4));
    v27 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v75 & 0xFFFFFFE0) + 0xC));
    v28 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v75 & 0xFFFFFFE0) + 0x14));
    v29 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v26, v26), v25), 0i64), 0i64);
    v30 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v27, v27), v25), 0i64), 0i64);
    v31 = _m_punpcklbw(_m_packuswb(_m_psubsw(v25, _m_punpcklwd(v28, v28)), 0i64), 0i64);
    *(__m64 *)(v9 + 16) = _m_por(
                            _m_por(
                              _m_por(_m_punpcklwd(v29, 0i64), _m_pslld(_m_punpcklwd(v30, 0i64), 0x10u)),
                              _m_psllw(_m_punpcklwd(v31, 0i64), 8u)),
                            (__m64)qword_A79DA0);
    *(__m64 *)(v9 + 24) = _m_por(
                            _m_por(
                              _m_por(_m_punpckhwd(v29, 0i64), _m_pslld(_m_punpckhwd(v30, 0i64), 0x10u)),
                              _m_psllw(_m_punpckhwd(v31, 0i64), 8u)),
                            (__m64)qword_A79DA0);
    v32 = *(__m64 *)(v6 + 128);
    v33 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v75 & 0xFFFFFFE0) + 0x18));
    v34 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v75 & 0xFFFFFFE0) + 0x20));
    v35 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v75 & 0xFFFFFFE0) + 0x28));
    v36 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v33, v33), v32), 0i64), 0i64);
    v37 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v34, v34), v32), 0i64), 0i64);
    v38 = _m_punpcklbw(_m_packuswb(_m_psubsw(v32, _m_punpcklwd(v35, v35)), 0i64), 0i64);
    *(__m64 *)(v9 + 32) = _m_por(
                            _m_por(
                              _m_por(_m_punpcklwd(v36, 0i64), _m_pslld(_m_punpcklwd(v37, 0i64), 0x10u)),
                              _m_psllw(_m_punpcklwd(v38, 0i64), 8u)),
                            (__m64)qword_A79DA0);
    *(__m64 *)(v9 + 40) = _m_por(
                            _m_por(
                              _m_por(_m_punpckhwd(v36, 0i64), _m_pslld(_m_punpckhwd(v37, 0i64), 0x10u)),
                              _m_psllw(_m_punpckhwd(v38, 0i64), 8u)),
                            (__m64)qword_A79DA0);
    v39 = *(__m64 *)(v6 + 136);
    v40 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v75 & 0xFFFFFFE0) + 0x1C));
    v41 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v75 & 0xFFFFFFE0) + 0x24));
    v42 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v75 & 0xFFFFFFE0) + 0x2C));
    v43 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v40, v40), v39), 0i64), 0i64);
    v44 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v41, v41), v39), 0i64), 0i64);
    v45 = _m_punpcklbw(_m_packuswb(_m_psubsw(v39, _m_punpcklwd(v42, v42)), 0i64), 0i64);
    *(__m64 *)(v9 + 48) = _m_por(
                            _m_por(
                              _m_por(_m_punpcklwd(v43, 0i64), _m_pslld(_m_punpcklwd(v44, 0i64), 0x10u)),
                              _m_psllw(_m_punpcklwd(v45, 0i64), 8u)),
                            (__m64)qword_A79DA0);
    *(__m64 *)(v9 + 56) = _m_por(
                            _m_por(
                              _m_por(_m_punpckhwd(v43, 0i64), _m_pslld(_m_punpckhwd(v44, 0i64), 0x10u)),
                              _m_psllw(_m_punpckhwd(v45, 0i64), 8u)),
                            (__m64)qword_A79DA0);
    v46 = a5 + v9;
    v47 = (__m64 *)(v6 + 16);
    v48 = _mm_cvtsi32_si64(*v10);
    v49 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v75 & 0xFFFFFFE0) + 8));
    v50 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v75 & 0xFFFFFFE0) + 0x10));
    v51 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v48, v48), (__m64)v47->m64_u64), 0i64), 0i64);
    v52 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v49, v49), (__m64)v47->m64_u64), 0i64), 0i64);
    v53 = _m_punpcklbw(_m_packuswb(_m_psubsw((__m64)v47->m64_u64, _m_punpcklwd(v50, v50)), 0i64), 0i64);
    *(__m64 *)v46 = _m_por(
                      _m_por(
                        _m_por(_m_punpcklwd(v51, 0i64), _m_pslld(_m_punpcklwd(v52, 0i64), 0x10u)),
                        _m_psllw(_m_punpcklwd(v53, 0i64), 8u)),
                      (__m64)qword_A79DA0);
    *(__m64 *)(v46 + 8) = _m_por(
                            _m_por(
                              _m_por(_m_punpckhwd(v51, 0i64), _m_pslld(_m_punpckhwd(v52, 0i64), 0x10u)),
                              _m_psllw(_m_punpckhwd(v53, 0i64), 8u)),
                            (__m64)qword_A79DA0);
    v54 = v47[1];
    v55 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v75 & 0xFFFFFFE0) + 4));
    v56 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v75 & 0xFFFFFFE0) + 0xC));
    v57 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v75 & 0xFFFFFFE0) + 0x14));
    v58 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v55, v55), v54), 0i64), 0i64);
    v59 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v56, v56), v54), 0i64), 0i64);
    v60 = _m_punpcklbw(_m_packuswb(_m_psubsw(v54, _m_punpcklwd(v57, v57)), 0i64), 0i64);
    *(__m64 *)(v46 + 16) = _m_por(
                             _m_por(
                               _m_por(_m_punpcklwd(v58, 0i64), _m_pslld(_m_punpcklwd(v59, 0i64), 0x10u)),
                               _m_psllw(_m_punpcklwd(v60, 0i64), 8u)),
                             (__m64)qword_A79DA0);
    *(__m64 *)(v46 + 24) = _m_por(
                             _m_por(
                               _m_por(_m_punpckhwd(v58, 0i64), _m_pslld(_m_punpckhwd(v59, 0i64), 0x10u)),
                               _m_psllw(_m_punpckhwd(v60, 0i64), 8u)),
                             (__m64)qword_A79DA0);
    v61 = v47[16];
    v62 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v75 & 0xFFFFFFE0) + 0x18));
    v63 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v75 & 0xFFFFFFE0) + 0x20));
    v64 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v75 & 0xFFFFFFE0) + 0x28));
    v65 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v62, v62), v61), 0i64), 0i64);
    v66 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v63, v63), v61), 0i64), 0i64);
    v67 = _m_punpcklbw(_m_packuswb(_m_psubsw(v61, _m_punpcklwd(v64, v64)), 0i64), 0i64);
    *(__m64 *)(v46 + 32) = _m_por(
                             _m_por(
                               _m_por(_m_punpcklwd(v65, 0i64), _m_pslld(_m_punpcklwd(v66, 0i64), 0x10u)),
                               _m_psllw(_m_punpcklwd(v67, 0i64), 8u)),
                             (__m64)qword_A79DA0);
    *(__m64 *)(v46 + 40) = _m_por(
                             _m_por(
                               _m_por(_m_punpckhwd(v65, 0i64), _m_pslld(_m_punpckhwd(v66, 0i64), 0x10u)),
                               _m_psllw(_m_punpckhwd(v67, 0i64), 8u)),
                             (__m64)qword_A79DA0);
    v68 = v47[17];
    v69 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v75 & 0xFFFFFFE0) + 0x1C));
    v70 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v75 & 0xFFFFFFE0) + 0x24));
    v71 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v75 & 0xFFFFFFE0) + 0x2C));
    v72 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v69, v69), v68), 0i64), 0i64);
    v73 = _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v70, v70), v68), 0i64), 0i64);
    v74 = _m_punpcklbw(_m_packuswb(_m_psubsw(v68, _m_punpcklwd(v71, v71)), 0i64), 0i64);
    *(__m64 *)(v46 + 48) = _m_por(
                             _m_por(
                               _m_por(_m_punpcklwd(v72, 0i64), _m_pslld(_m_punpcklwd(v73, 0i64), 0x10u)),
                               _m_psllw(_m_punpcklwd(v74, 0i64), 8u)),
                             (__m64)qword_A79DA0);
    *(__m64 *)(v46 + 56) = _m_por(
                             _m_por(
                               _m_por(_m_punpckhwd(v72, 0i64), _m_pslld(_m_punpckhwd(v73, 0i64), 0x10u)),
                               _m_psllw(_m_punpckhwd(v74, 0i64), 8u)),
                             (__m64)qword_A79DA0);
    if ( !--v5 )
      break;
    if ( v5 == 4 )
      v47 += 16;
    v6 = (int)&v47[2];
    v7 += 16;
    v8 += 16;
    v9 = a5 + v46;
  }
}
// A79CF0: using guessed type __int64 qword_A79CF0;
// A79CF8: using guessed type __int64 qword_A79CF8;
// A79D08: using guessed type __int64 qword_A79D08;
// A79D10: using guessed type __int64 qword_A79D10;
// A79D18: using guessed type __int64 qword_A79D18;
// A79D20: using guessed type __int64 qword_A79D20;
// A79D98: using guessed type __int64 qword_A79D98;
// A79DA0: using guessed type __int64 qword_A79DA0;

//----- (007A0670) --------------------------------------------------------
void __cdecl __spoils<ecx> own_ycbcra_fpx_4114_to_rgba_fpx_full_mcu_m5(int a1, int a2, int a3, int a4, int a5, int a6)
{
  signed int v6; // ecx@1
  int v7; // esi@1
  int v8; // ebx@1
  int v9; // edx@1
  int v10; // edi@1
  unsigned int *v11; // eax@1
  __m64 v12; // mm1@2
  __m64 v13; // mm0@2
  __m64 v14; // rt1@2
  __m64 v15; // mm3@2
  __m64 v16; // mm1@2
  __m64 v17; // mm0@2
  __m64 v18; // mm6@2
  __m64 v19; // mm3@2
  __m64 v20; // mm0@2
  __m64 v21; // mm2@2
  __m64 v22; // mm4@2
  __m64 v23; // mm1@2
  __m64 v24; // mm3@2
  __m64 v25; // mm5@2
  __m64 v26; // mm4@2
  __m64 v27; // mm6@2
  __m64 v28; // mm0@2
  __m64 v29; // mm2@2
  __m64 v30; // mm4@2
  __m64 v31; // mm1@2
  __m64 v32; // mm3@2
  __m64 v33; // mm5@2
  __m64 v34; // mm4@2
  __m64 v35; // mm6@2
  __m64 v36; // mm0@2
  __m64 v37; // mm2@2
  __m64 v38; // mm4@2
  __m64 v39; // mm1@2
  __m64 v40; // mm3@2
  __m64 v41; // mm5@2
  __m64 v42; // mm4@2
  __m64 v43; // mm6@2
  __m64 v44; // mm0@2
  __m64 v45; // mm2@2
  __m64 v46; // mm4@2
  __m64 v47; // mm1@2
  __m64 v48; // mm3@2
  __m64 v49; // mm5@2
  __m64 v50; // mm4@2
  int v51; // edi@2
  __m64 *v52; // esi@2
  __m64 v53; // mm0@2
  __m64 v54; // mm2@2
  __m64 v55; // mm4@2
  __m64 v56; // mm1@2
  __m64 v57; // mm3@2
  __m64 v58; // mm5@2
  __m64 v59; // mm4@2
  __m64 v60; // mm6@2
  __m64 v61; // mm0@2
  __m64 v62; // mm2@2
  __m64 v63; // mm4@2
  __m64 v64; // mm1@2
  __m64 v65; // mm3@2
  __m64 v66; // mm5@2
  __m64 v67; // mm4@2
  __m64 v68; // mm6@2
  __m64 v69; // mm0@2
  __m64 v70; // mm2@2
  __m64 v71; // mm4@2
  __m64 v72; // mm1@2
  __m64 v73; // mm3@2
  __m64 v74; // mm5@2
  __m64 v75; // mm4@2
  __m64 v76; // mm6@2
  __m64 v77; // mm0@2
  __m64 v78; // mm2@2
  __m64 v79; // mm4@2
  __m64 v80; // mm1@2
  __m64 v81; // mm3@2
  __m64 v82; // mm5@2
  __m64 v83; // mm4@2
  char v84; // [sp+20h] [bp-30h]@1

  v6 = 8;
  v7 = a1;
  v8 = a2;
  v9 = a3;
  v10 = a5;
  v11 = (unsigned int *)((unsigned int)&v84 & 0xFFFFFFE0);
  while ( 1 )
  {
    v12 = _m_psllw(*(__m64 *)v8, 4u);
    v13 = _m_psllw(*(__m64 *)v9, 4u);
    v14 = *(__m64 *)v7;
    v15 = _m_psubw(_m_pmulhw((__m64)qword_A79CF8, v12), (__m64)qword_A79D18);
    *(__m64 *)v11 = _m_psubw(_m_pmulhw((__m64)qword_A79CF0, v13), (__m64)qword_A79D20);
    *(__m64 *)(((unsigned int)&v84 & 0xFFFFFFE0) + 8) = v15;
    *(__m64 *)(((unsigned int)&v84 & 0xFFFFFFE0) + 0x10) = _m_psraw(
                                                             _m_psubw(
                                                               _m_paddw(
                                                                 _m_pmullw((__m64)qword_A79D10, _m_psrlw(v13, 4u)),
                                                                 _m_pmullw((__m64)qword_A79D08, _m_psrlw(v12, 4u))),
                                                               (__m64)qword_A79D98),
                                                             8u);
    v16 = _m_psllw(*(__m64 *)(v8 + 8), 4u);
    v17 = _m_psllw(*(__m64 *)(v9 + 8), 4u);
    v18 = *(__m64 *)v7;
    v19 = _m_psubw(_m_pmulhw((__m64)qword_A79CF8, v16), (__m64)qword_A79D18);
    *(__m64 *)(((unsigned int)&v84 & 0xFFFFFFE0) + 0x18) = _m_psubw(
                                                             _m_pmulhw((__m64)qword_A79CF0, v17),
                                                             (__m64)qword_A79D20);
    *(__m64 *)(((unsigned int)&v84 & 0xFFFFFFE0) + 0x20) = v19;
    *(__m64 *)(((unsigned int)&v84 & 0xFFFFFFE0) + 0x28) = _m_psraw(
                                                             _m_psubw(
                                                               _m_paddw(
                                                                 _m_pmullw((__m64)qword_A79D10, _m_psrlw(v17, 4u)),
                                                                 _m_pmullw((__m64)qword_A79D08, _m_psrlw(v16, 4u))),
                                                               (__m64)qword_A79D98),
                                                             8u);
    v20 = _mm_cvtsi32_si64(*v11);
    v21 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v84 & 0xFFFFFFE0) + 8));
    v22 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v84 & 0xFFFFFFE0) + 0x10));
    v23 = _m_psubw((__m64)qword_A79DA8, _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v20, v20), v18), 0i64), 0i64));
    v24 = _m_psubw((__m64)qword_A79DA8, _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v21, v21), v18), 0i64), 0i64));
    v25 = _m_psubw((__m64)qword_A79DA8, _m_punpcklbw(_m_packuswb(_m_psubsw(v18, _m_punpcklwd(v22, v22)), 0i64), 0i64));
    v26 = *(__m64 *)(v7 + 768);
    *(__m64 *)v10 = _m_por(
                      _m_por(
                        _m_por(_m_punpcklwd(v23, 0i64), _m_pslld(_m_punpcklwd(v24, 0i64), 0x10u)),
                        _m_psllw(_m_punpcklwd(v25, 0i64), 8u)),
                      _m_pslld(_m_punpcklwd(0i64, v26), 8u));
    *(__m64 *)(v10 + 8) = _m_por(
                            _m_por(
                              _m_por(_m_punpckhwd(v23, 0i64), _m_pslld(_m_punpckhwd(v24, 0i64), 0x10u)),
                              _m_psllw(_m_punpckhwd(v25, 0i64), 8u)),
                            _m_psllw(_m_punpckhwd(0i64, v26), 8u));
    v27 = *(__m64 *)(v7 + 8);
    v28 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v84 & 0xFFFFFFE0) + 4));
    v29 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v84 & 0xFFFFFFE0) + 0xC));
    v30 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v84 & 0xFFFFFFE0) + 0x14));
    v31 = _m_psubw((__m64)qword_A79DA8, _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v28, v28), v27), 0i64), 0i64));
    v32 = _m_psubw((__m64)qword_A79DA8, _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v29, v29), v27), 0i64), 0i64));
    v33 = _m_psubw((__m64)qword_A79DA8, _m_punpcklbw(_m_packuswb(_m_psubsw(v27, _m_punpcklwd(v30, v30)), 0i64), 0i64));
    v34 = *(__m64 *)(v7 + 776);
    *(__m64 *)(v10 + 16) = _m_por(
                             _m_por(
                               _m_por(_m_punpcklwd(v31, 0i64), _m_pslld(_m_punpcklwd(v32, 0i64), 0x10u)),
                               _m_psllw(_m_punpcklwd(v33, 0i64), 8u)),
                             _m_pslld(_m_punpcklwd(0i64, v34), 8u));
    *(__m64 *)(v10 + 24) = _m_por(
                             _m_por(
                               _m_por(_m_punpckhwd(v31, 0i64), _m_pslld(_m_punpckhwd(v32, 0i64), 0x10u)),
                               _m_psllw(_m_punpckhwd(v33, 0i64), 8u)),
                             _m_pslld(_m_punpckhwd(0i64, v34), 8u));
    v35 = *(__m64 *)(v7 + 128);
    v36 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v84 & 0xFFFFFFE0) + 0x18));
    v37 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v84 & 0xFFFFFFE0) + 0x20));
    v38 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v84 & 0xFFFFFFE0) + 0x28));
    v39 = _m_psubw((__m64)qword_A79DA8, _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v36, v36), v35), 0i64), 0i64));
    v40 = _m_psubw((__m64)qword_A79DA8, _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v37, v37), v35), 0i64), 0i64));
    v41 = _m_psubw((__m64)qword_A79DA8, _m_punpcklbw(_m_packuswb(_m_psubsw(v35, _m_punpcklwd(v38, v38)), 0i64), 0i64));
    v42 = *(__m64 *)(v7 + 896);
    *(__m64 *)(v10 + 32) = _m_por(
                             _m_por(
                               _m_por(_m_punpcklwd(v39, 0i64), _m_pslld(_m_punpcklwd(v40, 0i64), 0x10u)),
                               _m_psllw(_m_punpcklwd(v41, 0i64), 8u)),
                             _m_pslld(_m_punpcklwd(0i64, v42), 8u));
    *(__m64 *)(v10 + 40) = _m_por(
                             _m_por(
                               _m_por(_m_punpckhwd(v39, 0i64), _m_pslld(_m_punpckhwd(v40, 0i64), 0x10u)),
                               _m_psllw(_m_punpckhwd(v41, 0i64), 8u)),
                             _m_psllw(_m_punpckhwd(0i64, v42), 8u));
    v43 = *(__m64 *)(v7 + 136);
    v44 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v84 & 0xFFFFFFE0) + 0x1C));
    v45 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v84 & 0xFFFFFFE0) + 0x24));
    v46 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v84 & 0xFFFFFFE0) + 0x2C));
    v47 = _m_psubw((__m64)qword_A79DA8, _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v44, v44), v43), 0i64), 0i64));
    v48 = _m_psubw((__m64)qword_A79DA8, _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v45, v45), v43), 0i64), 0i64));
    v49 = _m_psubw((__m64)qword_A79DA8, _m_punpcklbw(_m_packuswb(_m_psubsw(v43, _m_punpcklwd(v46, v46)), 0i64), 0i64));
    v50 = *(__m64 *)(v7 + 904);
    *(__m64 *)(v10 + 48) = _m_por(
                             _m_por(
                               _m_por(_m_punpcklwd(v47, 0i64), _m_pslld(_m_punpcklwd(v48, 0i64), 0x10u)),
                               _m_psllw(_m_punpcklwd(v49, 0i64), 8u)),
                             _m_pslld(_m_punpcklwd(0i64, v50), 8u));
    *(__m64 *)(v10 + 56) = _m_por(
                             _m_por(
                               _m_por(_m_punpckhwd(v47, 0i64), _m_pslld(_m_punpckhwd(v48, 0i64), 0x10u)),
                               _m_psllw(_m_punpckhwd(v49, 0i64), 8u)),
                             _m_psllw(_m_punpckhwd(0i64, v50), 8u));
    v51 = a6 + v10;
    v52 = (__m64 *)(v7 + 16);
    v53 = _mm_cvtsi32_si64(*v11);
    v54 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v84 & 0xFFFFFFE0) + 8));
    v55 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v84 & 0xFFFFFFE0) + 0x10));
    v56 = _m_psubw(
            (__m64)qword_A79DA8,
            _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v53, v53), (__m64)v52->m64_u64), 0i64), 0i64));
    v57 = _m_psubw(
            (__m64)qword_A79DA8,
            _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v54, v54), (__m64)v52->m64_u64), 0i64), 0i64));
    v58 = _m_psubw(
            (__m64)qword_A79DA8,
            _m_punpcklbw(_m_packuswb(_m_psubsw((__m64)v52->m64_u64, _m_punpcklwd(v55, v55)), 0i64), 0i64));
    v59 = v52[96];
    *(__m64 *)v51 = _m_por(
                      _m_por(
                        _m_por(_m_punpcklwd(v56, 0i64), _m_pslld(_m_punpcklwd(v57, 0i64), 0x10u)),
                        _m_psllw(_m_punpcklwd(v58, 0i64), 8u)),
                      _m_pslld(_m_punpcklwd(0i64, v59), 8u));
    *(__m64 *)(v51 + 8) = _m_por(
                            _m_por(
                              _m_por(_m_punpckhwd(v56, 0i64), _m_pslld(_m_punpckhwd(v57, 0i64), 0x10u)),
                              _m_psllw(_m_punpckhwd(v58, 0i64), 8u)),
                            _m_psllw(_m_punpckhwd(0i64, v59), 8u));
    v60 = v52[1];
    v61 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v84 & 0xFFFFFFE0) + 4));
    v62 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v84 & 0xFFFFFFE0) + 0xC));
    v63 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v84 & 0xFFFFFFE0) + 0x14));
    v64 = _m_psubw((__m64)qword_A79DA8, _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v61, v61), v60), 0i64), 0i64));
    v65 = _m_psubw((__m64)qword_A79DA8, _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v62, v62), v60), 0i64), 0i64));
    v66 = _m_psubw((__m64)qword_A79DA8, _m_punpcklbw(_m_packuswb(_m_psubsw(v60, _m_punpcklwd(v63, v63)), 0i64), 0i64));
    v67 = v52[97];
    *(__m64 *)(v51 + 16) = _m_por(
                             _m_por(
                               _m_por(_m_punpcklwd(v64, 0i64), _m_pslld(_m_punpcklwd(v65, 0i64), 0x10u)),
                               _m_psllw(_m_punpcklwd(v66, 0i64), 8u)),
                             _m_pslld(_m_punpcklwd(0i64, v67), 8u));
    *(__m64 *)(v51 + 24) = _m_por(
                             _m_por(
                               _m_por(_m_punpckhwd(v64, 0i64), _m_pslld(_m_punpckhwd(v65, 0i64), 0x10u)),
                               _m_psllw(_m_punpckhwd(v66, 0i64), 8u)),
                             _m_psllw(_m_punpckhwd(0i64, v67), 8u));
    v68 = v52[16];
    v69 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v84 & 0xFFFFFFE0) + 0x18));
    v70 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v84 & 0xFFFFFFE0) + 0x20));
    v71 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v84 & 0xFFFFFFE0) + 0x28));
    v72 = _m_psubw((__m64)qword_A79DA8, _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v69, v69), v68), 0i64), 0i64));
    v73 = _m_psubw((__m64)qword_A79DA8, _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v70, v70), v68), 0i64), 0i64));
    v74 = _m_psubw((__m64)qword_A79DA8, _m_punpcklbw(_m_packuswb(_m_psubsw(v68, _m_punpcklwd(v71, v71)), 0i64), 0i64));
    v75 = v52[112];
    *(__m64 *)(v51 + 32) = _m_por(
                             _m_por(
                               _m_por(_m_punpcklwd(v72, 0i64), _m_pslld(_m_punpcklwd(v73, 0i64), 0x10u)),
                               _m_psllw(_m_punpcklwd(v74, 0i64), 8u)),
                             _m_pslld(_m_punpcklwd(0i64, v75), 8u));
    *(__m64 *)(v51 + 40) = _m_por(
                             _m_por(
                               _m_por(_m_punpckhwd(v72, 0i64), _m_pslld(_m_punpckhwd(v73, 0i64), 0x10u)),
                               _m_psllw(_m_punpckhwd(v74, 0i64), 8u)),
                             _m_psllw(_m_punpckhwd(0i64, v75), 8u));
    v76 = v52[17];
    v77 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v84 & 0xFFFFFFE0) + 0x1C));
    v78 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v84 & 0xFFFFFFE0) + 0x24));
    v79 = _mm_cvtsi32_si64(*(_DWORD *)(((unsigned int)&v84 & 0xFFFFFFE0) + 0x2C));
    v80 = _m_psubw((__m64)qword_A79DA8, _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v77, v77), v76), 0i64), 0i64));
    v81 = _m_psubw((__m64)qword_A79DA8, _m_punpcklbw(_m_packuswb(_m_paddsw(_m_punpcklwd(v78, v78), v76), 0i64), 0i64));
    v82 = _m_psubw((__m64)qword_A79DA8, _m_punpcklbw(_m_packuswb(_m_psubsw(v76, _m_punpcklwd(v79, v79)), 0i64), 0i64));
    v83 = v52[113];
    *(__m64 *)(v51 + 48) = _m_por(
                             _m_por(
                               _m_por(_m_punpcklwd(v80, 0i64), _m_pslld(_m_punpcklwd(v81, 0i64), 0x10u)),
                               _m_psllw(_m_punpcklwd(v82, 0i64), 8u)),
                             _m_pslld(_m_punpcklwd(0i64, v83), 8u));
    *(__m64 *)(v51 + 56) = _m_por(
                             _m_por(
                               _m_por(_m_punpckhwd(v80, 0i64), _m_pslld(_m_punpckhwd(v81, 0i64), 0x10u)),
                               _m_psllw(_m_punpckhwd(v82, 0i64), 8u)),
                             _m_psllw(_m_punpckhwd(0i64, v83), 8u));
    if ( !--v6 )
      break;
    if ( v6 == 4 )
      v52 += 16;
    v7 = (int)&v52[2];
    v8 += 16;
    v9 += 16;
    v10 = a6 + v51;
  }
}
// A79CF0: using guessed type __int64 qword_A79CF0;
// A79CF8: using guessed type __int64 qword_A79CF8;
// A79D08: using guessed type __int64 qword_A79D08;
// A79D10: using guessed type __int64 qword_A79D10;
// A79D18: using guessed type __int64 qword_A79D18;
// A79D20: using guessed type __int64 qword_A79D20;
// A79D98: using guessed type __int64 qword_A79D98;
// A79DA8: using guessed type __int64 qword_A79DA8;

//----- (007A0D00) --------------------------------------------------------
int __cdecl __spoils<ecx> own_ycbcr_422_to_ycbycr_full_mcu_m5(int a1, __m64 *a2, __m64 *a3, int a4, int a5)
{
  int v5; // esi@1
  __m64 *v6; // eax@1
  __m64 *v7; // ebx@1
  int v8; // edi@1
  signed int v9; // ecx@1
  __m64 v10; // mm2@2
  __m64 v11; // mm4@2
  __m64 v12; // mm1@2
  __m64 v13; // mm2@2
  __m64 v14; // mm3@2
  __m64 v15; // mm4@2
  __m64 v16; // mm2@2
  __m64 v17; // mm4@2
  __m64 v18; // mm1@2
  int v20; // [sp+4h] [bp-4h]@0

  v5 = a1;
  v6 = a2;
  v7 = a3;
  v8 = a4;
  v9 = 8;
  do
  {
    v10 = _m_punpcklwd((__m64)v6->m64_u64, (__m64)v7->m64_u64);
    v11 = _m_punpckhwd((__m64)v6->m64_u64, (__m64)v7->m64_u64);
    v12 = _m_packuswb(_m_punpcklwd(*(__m64 *)(v5 + 8), v11), _m_punpckhwd(*(__m64 *)(v5 + 8), v11));
    *(__m64 *)v8 = _m_packuswb(_m_punpcklwd(*(__m64 *)v5, v10), _m_punpckhwd(*(__m64 *)v5, v10));
    *(__m64 *)(v8 + 8) = v12;
    v13 = v6[1];
    v14 = v7[1];
    v15 = v13;
    v16 = _m_punpcklwd(v13, v14);
    v17 = _m_punpckhwd(v15, v14);
    v18 = _m_packuswb(_m_punpcklwd(*(__m64 *)(v5 + 136), v17), _m_punpckhwd(*(__m64 *)(v5 + 136), v17));
    *(__m64 *)(v8 + 16) = _m_packuswb(_m_punpcklwd(*(__m64 *)(v5 + 128), v16), _m_punpckhwd(*(__m64 *)(v5 + 128), v16));
    *(__m64 *)(v8 + 24) = v18;
    v5 += 16;
    v6 += 2;
    v7 += 2;
    v8 += a5;
    --v9;
  }
  while ( v9 );
  return v20;
}

//----- (007A0E4A) --------------------------------------------------------
void __thiscall std::out_of_range::out_of_range(std::out_of_range *this, std::out_of_range *__that)
{
  std::out_of_range *v2; // esi@1

  v2 = this;
  std::exception::exception((std::exception *)&this->vfptr, (std::exception *)&__that->vfptr);
  v2->vfptr = (std::exceptionVtbl *)&std::out_of_range::`vftable';
}
// 9D561C: using guessed type int (__thiscall *std::out_of_range::`vftable')(void *p, char);

//----- (007A1125) --------------------------------------------------------
std::locale::_Locimp *__cdecl std::locale::_Getgloballocale()
{
  return global_locale;
}

//----- (007A11B5) --------------------------------------------------------
void std::_Fac_tidy_reg_t::~_Fac_tidy_reg_t()
{
  std::_Fac_node *v1; // esi@2
  std::_Fac_node *v2; // ecx@2
  std::_Lockit v3; // [sp+Ch] [bp-10h]@1
  int v4; // [sp+18h] [bp-4h]@1

  std::_Lockit::_Lockit(&v3, 0);
  v4 = 0;
  while ( Fac_head )
  {
    v1 = Fac_head;
    v2 = Fac_head;
    Fac_head = Fac_head->_Next;
    std::_Fac_node::~_Fac_node(v2);
    operator delete(v1);
  }
  v4 = -1;
  std::_Lockit::~_Lockit(&v3);
}

//----- (007A146A) --------------------------------------------------------
const char *__thiscall std::_Generic_error_category::name(std::_Iostream_error_category *this)
{
  return this->_Mystr;
}

//----- (007A146E) --------------------------------------------------------
std::_Iostream_error_category *__cdecl std::iostream_category()
{
  return &Iostream_object;
}

//----- (007A1474) --------------------------------------------------------
std::_System_error_category *__thiscall std::_System_error_category::`scalar deleting destructor'(std::_System_error_category *this, unsigned int a2)
{
  std::_System_error_category *v2; // esi@1

  v2 = this;
  this->vfptr = (std::error_categoryVtbl *)&std::error_category::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9D5634: using guessed type int (__thiscall *std::error_category::`vftable')(void *p, char);

//----- (007A16E7) --------------------------------------------------------
_iobuf *__cdecl std::_Xfsopen(const wchar_t *filename, int mode, int prot)
{
  return _wfsopen(filename, mods[mode], prot);
}

//----- (007A1706) --------------------------------------------------------
_iobuf *__cdecl std::_Xfiopen<wchar_t>(const wchar_t *filename, int mode, int prot)
{
  int v3; // ecx@1
  int v4; // eax@1
  unsigned int v5; // ecx@5
  int v6; // esi@5
  _iobuf *v8; // eax@12
  _iobuf *v9; // eax@15
  _iobuf *v10; // esi@15

  v3 = mode;
  v4 = 1;
  if ( mode & 0x40 )
    v3 = mode | 1;
  if ( v3 & 8 )
    v3 |= 2u;
  v5 = v3 & 0xFFFFFF3B;
  v6 = 0;
  do
  {
    if ( v4 == v5 )
      break;
    v4 = dword_9D5778[v6++];
  }
  while ( v4 );
  if ( !`std::_Xfiopen<wchar_t>'::`2'::valid[v6] )
    return 0;
  if ( mode & 0x80 )
  {
    if ( v5 & 0xA )
    {
      v8 = std::_Xfsopen(filename, 0, prot);
      if ( v8 )
      {
        fclose(v8);
        return 0;
      }
    }
  }
  v9 = std::_Xfsopen(filename, v6, prot);
  v10 = v9;
  if ( !v9 )
    return 0;
  if ( mode & 4 && fseek(v9, 0, 2) )
  {
    fclose(v10);
    return 0;
  }
  return v10;
}
// 9D5778: using guessed type int dword_9D5778[];

//----- (007A17AE) --------------------------------------------------------
_iobuf *__cdecl std::_Fiopen(const wchar_t *filename, int mode, int prot)
{
  return std::_Xfiopen<wchar_t>(filename, mode, prot);
}

//----- (007A17D4) --------------------------------------------------------
void __cdecl _Mtxinit(_RTL_CRITICAL_SECTION *_Mtx)
{
  InitializeCriticalSection(_Mtx);
}

//----- (007A17E4) --------------------------------------------------------
void __cdecl _Mtxdst(_RTL_CRITICAL_SECTION *_Mtx)
{
  DeleteCriticalSection(_Mtx);
}

//----- (007A17F4) --------------------------------------------------------
void __cdecl _Mtxlock(_RTL_CRITICAL_SECTION *_Mtx)
{
  EnterCriticalSection(_Mtx);
}

//----- (007A1804) --------------------------------------------------------
void __cdecl _Mtxunlock(_RTL_CRITICAL_SECTION *_Mtx)
{
  LeaveCriticalSection(_Mtx);
}

//----- (007A18E1) --------------------------------------------------------
const char *__thiscall std::exception::what(std::exception *this)
{
  const char *result; // eax@1

  result = this->_Mywhat;
  if ( !result )
    result = "Unknown exception";
  return result;
}

//----- (007A19C6) --------------------------------------------------------
void __thiscall std::exception::~exception(std::bad_cast *this)
{
  this->vfptr = (std::exceptionVtbl *)&std::exception::`vftable';
  std::exception::_Tidy((std::exception *)&this->vfptr);
}
// 9D5854: using guessed type int (__thiscall *std::exception::`vftable')(void *p, char);

//----- (007A227F) --------------------------------------------------------
#error "7A2280: positive sp value has been found (funcsize=0)"

//----- (007A2E25) --------------------------------------------------------
void __cdecl _splitpath(const char *path, char *drive, char *dir, char *fname, char *ext)
{
  splitpath_helper(
    path,
    drive,
    drive != 0 ? 3 : 0,
    dir,
    dir != 0 ? 0x100 : 0,
    fname,
    fname != 0 ? 0x100 : 0,
    ext,
    ext != 0 ? 0x100 : 0);
}

//----- (007A3070) --------------------------------------------------------
void __cdecl operator delete[](void *p)
{
  operator delete(p);
}

//----- (007A3534) --------------------------------------------------------
int __cdecl ldiv(int numer, int denom)
{
  return numer / denom;
}

//----- (007A3F0B) --------------------------------------------------------
int __cdecl _putenv(const char *option)
{
  int retval; // ST18_4@1

  _lock(7);
  retval = putenv_helper(option, 0);
  _unlock(7);
  return retval;
}

//----- (007A47D8) --------------------------------------------------------
int __cdecl _mktime32(tm *tb)
{
  return make__time32_t(tb, 1);
}

//----- (007A666C) --------------------------------------------------------
int __cdecl _mkdir(const char *path)
{
  unsigned int v1; // eax@2
  int result; // eax@5

  if ( CreateDirectoryA(path, 0) )
    v1 = 0;
  else
    v1 = GetLastError();
  if ( v1 )
  {
    _dosmaperr(v1);
    result = -1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007A6BFD) --------------------------------------------------------
_iobuf *__cdecl __iob_func()
{
  return _iob;
}

//----- (007A72CB) --------------------------------------------------------
int __cdecl _flushall()
{
  return flsall(1);
}

//----- (007A7B91) --------------------------------------------------------
char *__cdecl _itoa(int val, char *buf, int radix)
{
  if ( radix != 10 || val >= 0 )
    xtoa(val, buf, radix, 0);
  else
    xtoa(val, buf, 0xAu, 1);
  return buf;
}

//----- (007A7FC9) --------------------------------------------------------
__int64 __cdecl _mktime64(tm *tb)
{
  return make__time64_t(tb, 1);
}

//----- (007A9DE6) --------------------------------------------------------
int __cdecl _access_s(const char *path, int amode)
{
  DWORD v3; // eax@4
  unsigned int v4; // eax@5

  if ( !path || amode & 0xFFFFFFF9 )
  {
    *__doserrno() = 0;
    *_errno() = 22;
    _invalid_parameter_noinfo();
    return 22;
  }
  v3 = GetFileAttributesA(path);
  if ( v3 == -1 )
  {
    v4 = GetLastError();
    _dosmaperr(v4);
    return *_errno();
  }
  if ( !(v3 & 0x10) && v3 & 1 && amode & 2 )
  {
    *__doserrno() = 5;
    *_errno() = 13;
    return *_errno();
  }
  return 0;
}
// 7AF2CB: using guessed type int _invalid_parameter_noinfo(void);

//----- (007AAF8F) --------------------------------------------------------
int __cdecl remove(const char *path)
{
  unsigned int v1; // eax@2
  int result; // eax@5

  if ( DeleteFileA(path) )
    v1 = 0;
  else
    v1 = GetLastError();
  if ( v1 )
  {
    _dosmaperr(v1);
    result = -1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007AAFBF) --------------------------------------------------------
int __cdecl rename(const char *oldname, const char *newname)
{
  unsigned int v2; // eax@2
  int result; // eax@5

  if ( MoveFileA(oldname, newname) )
    v2 = 0;
  else
    v2 = GetLastError();
  if ( v2 )
  {
    _dosmaperr(v2);
    result = -1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007AB5F6) --------------------------------------------------------
int __cdecl __init_collate()
{
  return 0;
}

//----- (007AE63C) --------------------------------------------------------
int __cdecl _itoa_s(int val, char *buf, unsigned int sizeInTChars, int radix)
{
  int result; // eax@3

  if ( radix != 10 || val >= 0 )
    result = xtoa_s(val, buf, sizeInTChars, radix, 0);
  else
    result = xtoa_s(val, buf, sizeInTChars, 0xAu, 1);
  return result;
}

//----- (007AE666) --------------------------------------------------------
int __cdecl _ultoa_s(unsigned int val, char *buf, unsigned int sizeInTChars, int radix)
{
  return xtoa_s(val, buf, sizeInTChars, radix, 0);
}

//----- (007AE9C2) --------------------------------------------------------
PVOID _encoded_null()
{
  return EncodePointer(0);
}

//----- (007AE9CB) --------------------------------------------------------
unsigned int __stdcall __crtTlsAlloc(void (__stdcall *lpCallBack)(void *))
{
  return TlsAlloc();
}

//----- (007B5071) --------------------------------------------------------
int *__cdecl __daylight()
{
  return &_daylight;
}

//----- (007B5077) --------------------------------------------------------
__int32 *__cdecl __dstbias()
{
  return &_dstbias;
}

//----- (007B507D) --------------------------------------------------------
__int32 *__cdecl __timezone()
{
  return &_timezone;
}

//----- (007B5083) --------------------------------------------------------
char **__cdecl __tzname()
{
  return _tzname;
}

//----- (007B6D6D) --------------------------------------------------------
unsigned int __cdecl strtol(const char *nptr, char **endptr, int ibase)
{
  unsigned int result; // eax@2

  if ( __locale_changed )
    result = strtoxl(0, nptr, (const char **)endptr, ibase, 0);
  else
    result = strtoxl((localeinfo_struct *)&__initiallocalestructinfo, nptr, (const char **)endptr, ibase, 0);
  return result;
}
// A7ADDC: using guessed type void *__initiallocalestructinfo;
// B60A40: using guessed type int __locale_changed;

//----- (007B6D98) --------------------------------------------------------
unsigned int __cdecl strtoul(const char *nptr, char **endptr, int ibase)
{
  unsigned int result; // eax@2

  if ( __locale_changed )
    result = strtoxl(0, nptr, (const char **)endptr, ibase, 1);
  else
    result = strtoxl((localeinfo_struct *)&__initiallocalestructinfo, nptr, (const char **)endptr, ibase, 1);
  return result;
}
// A7ADDC: using guessed type void *__initiallocalestructinfo;
// B60A40: using guessed type int __locale_changed;

//----- (007B7061) --------------------------------------------------------
unsigned __int64 __cdecl _strtoi64(const char *nptr, char **endptr, int ibase)
{
  unsigned __int64 result; // rax@2

  if ( __locale_changed )
    result = strtoxq(0, nptr, (const char **)endptr, ibase, 0);
  else
    result = strtoxq((localeinfo_struct *)&__initiallocalestructinfo, nptr, (const char **)endptr, ibase, 0);
  return result;
}
// A7ADDC: using guessed type void *__initiallocalestructinfo;
// B60A40: using guessed type int __locale_changed;

//----- (007B70E1) --------------------------------------------------------
void (__cdecl *__cdecl __get_sigabrt())(int)
{
  return (void (__cdecl *)(int))DecodePointer(abort_action);
}

//----- (007B7291) --------------------------------------------------------
void __cdecl _initp_misc_rand_s(void *enull)
{
  g_pfnRtlGenRandom = (int (__stdcall *)(void *, unsigned int))enull;
}

//----- (007B745B) --------------------------------------------------------
int (*_RTC_Initialize())(void)
{
  int (*result)(void); // eax@1
  int (**v1)(void); // edi@1

  result = (int (*)(void))&__rtc_izz;
  v1 = (int (**)(void))&__rtc_izz;
  if ( &__rtc_izz < &__rtc_izz )
  {
    do
    {
      result = *v1;
      if ( *v1 )
        result = (int (*)(void))result();
      ++v1;
    }
    while ( v1 < (int (**)(void))&__rtc_izz );
  }
  return result;
}

//----- (007B7481) --------------------------------------------------------
void __cdecl _RTC_Terminate()
{
  void (**v0)(void); // edi@1

  v0 = (void (**)(void))&__rtc_tzz;
  if ( &__rtc_tzz < &__rtc_tzz )
  {
    do
    {
      if ( *v0 )
        (*v0)();
      ++v0;
    }
    while ( v0 < (void (**)(void))&__rtc_tzz );
  }
}

//----- (007BBAFC) --------------------------------------------------------
int *__cdecl __sys_nerr()
{
  return &_sys_nerr;
}

//----- (007BBB02) --------------------------------------------------------
char **__cdecl __sys_errlist()
{
  return _sys_errlist;
}

//----- (007C2085) --------------------------------------------------------
int charNode::length()
{
  return 1;
}

//----- (007C2089) --------------------------------------------------------
char __thiscall charNode::getLastChar(charNode *this)
{
  return this->me;
}

//----- (007C25A0) --------------------------------------------------------
int __thiscall DNameStatusNode::length(pcharNode *this)
{
  return this->myLen;
}

//----- (007C2D07) --------------------------------------------------------
DName *__cdecl operator+(DName *result, char c, DName *rd)
{
  DName *v3; // eax@1
  DName v5; // [sp+0h] [bp-8h]@1

  v3 = DName::operator=(&v5, c);
  DName::operator+(v3, result, rd);
  return result;
}

//----- (007C8DE7) --------------------------------------------------------
signed int __cdecl _ld12tod(_LDBL12 *pld12, _CRT_DOUBLE *d)
{
  __int16 v2; // bx@1
  int v3; // ebx@1
  int v4; // eax@1
  int v5; // ebx@2
  int v6; // eax@2
  signed int result; // eax@5
  signed int v8; // edi@7
  int v9; // edx@7
  int *v10; // esi@7
  int v11; // eax@8
  bool i; // zf@8
  int v13; // eax@13
  unsigned int v14; // edx@13
  int *v15; // ecx@13
  bool v16; // cf@14
  int v17; // eax@28
  int v18; // edx@28
  int *v19; // ebx@29
  int v20; // ST1C_4@29
  signed int v21; // edx@30
  int *v22; // ecx@30
  signed int v23; // esi@35
  int v24; // eax@35
  int *v25; // ebx@35
  bool j; // zf@36
  int v27; // eax@41
  unsigned int v28; // edx@41
  int *v29; // ecx@41
  unsigned int v30; // edi@41
  signed int k; // ecx@44
  int *v32; // ecx@46
  unsigned int v33; // esi@46
  signed int v34; // edi@46
  int v35; // eax@53
  int v36; // edx@53
  int *v37; // ebx@54
  int v38; // ST1C_4@54
  signed int v39; // edx@55
  int *v40; // ecx@55
  int v41; // eax@62
  int v42; // edx@62
  int *v43; // ebx@63
  int v44; // ST1C_4@63
  signed int v45; // edx@64
  int *v46; // ecx@64
  int v47; // eax@70
  int v48; // edx@70
  int v49; // ST1C_4@71
  signed int v50; // edx@72
  int *v51; // ecx@72
  int v52; // ebx@78
  int v53; // edx@79
  int v54; // [sp+8h] [bp-38h]@1
  char v55; // [sp+10h] [bp-30h]@7
  int v56; // [sp+10h] [bp-30h]@35
  int v57; // [sp+14h] [bp-2Ch]@7
  char v58; // [sp+14h] [bp-2Ch]@35
  int v59; // [sp+18h] [bp-28h]@7
  int v60; // [sp+18h] [bp-28h]@28
  signed int v61; // [sp+18h] [bp-28h]@41
  int v62; // [sp+18h] [bp-28h]@53
  int v63; // [sp+18h] [bp-28h]@62
  int v64; // [sp+18h] [bp-28h]@70
  signed int v65; // [sp+1Ch] [bp-24h]@7
  unsigned int v66; // [sp+20h] [bp-20h]@13
  signed int v67; // [sp+20h] [bp-20h]@28
  signed int v68; // [sp+20h] [bp-20h]@53
  signed int v69; // [sp+20h] [bp-20h]@62
  signed int v70; // [sp+20h] [bp-20h]@70
  unsigned int v71; // [sp+24h] [bp-1Ch]@7
  int v72; // [sp+28h] [bp-18h]@7
  int v73; // [sp+2Ch] [bp-14h]@7
  unsigned int v74; // [sp+30h] [bp-10h]@1
  int v75; // [sp+34h] [bp-Ch]@1
  int v76; // [sp+38h] [bp-8h]@1

  v2 = *(_WORD *)&pld12->ld12[10];
  v54 = *(_WORD *)&pld12->ld12[10] & 0x8000;
  v74 = *(_DWORD *)&pld12->ld12[6];
  v3 = (v2 & 0x7FFF) - 0x3FFF;
  v4 = *(_WORD *)&pld12->ld12[0] << 16;
  v75 = *(_DWORD *)&pld12->ld12[2];
  v76 = v4;
  if ( v3 != -16383 )
  {
    v65 = 0;
    v71 = v74;
    v72 = v75;
    v73 = v76;
    v8 = DoubleFormat.precision - 1;
    v57 = v3;
    v59 = DoubleFormat.precision / 32;
    v9 = DoubleFormat.precision % 32;
    v10 = (int *)(&v74 + DoubleFormat.precision / 32);
    v55 = 31 - DoubleFormat.precision % 32;
    if ( (1 << (31 - DoubleFormat.precision % 32)) & *v10 )
    {
      v11 = DoubleFormat.precision / 32;
      for ( i = (~(-1 << (31 - v9)) & *(&v74 + v59)) == 0; i; i = *(&v74 + v11) == 0 )
      {
        if ( ++v11 >= 3 )
          goto LABEL_21;
      }
      v13 = v8 / 32;
      v65 = 0;
      v14 = 1 << (31 - v8 % 32);
      v15 = (int *)(&v74 + v8 / 32);
      v66 = v14 + *v15;
      if ( v66 >= *v15 )
      {
        v16 = v66 < v14;
        goto LABEL_18;
      }
LABEL_19:
      v65 = 1;
      while ( 1 )
      {
        --v13;
        *v15 = v66;
        if ( v13 < 0 || !v65 )
          break;
        v65 = 0;
        v15 = (int *)(&v74 + v13);
        v66 = *v15 + 1;
        if ( v66 >= *v15 )
        {
          v16 = (unsigned int)*v15 >= 0xFFFFFFFF;
LABEL_18:
          if ( !v16 )
            continue;
        }
        goto LABEL_19;
      }
    }
LABEL_21:
    *v10 &= -1 << v55;
    if ( v59 + 1 < 3 )
      memset(&v74 + v59 + 1, 0, 4 * (3 - (v59 + 1)));
    if ( v65 )
      ++v3;
    if ( v3 >= DoubleFormat.min_exp - DoubleFormat.precision )
    {
      if ( v3 > DoubleFormat.min_exp )
      {
        if ( v3 < DoubleFormat.max_exp )
        {
          v5 = DoubleFormat.bias + v3;
          v74 &= 0x7FFFFFFFu;
          v47 = DoubleFormat.exp_width / 32;
          v48 = DoubleFormat.exp_width % 32;
          v64 = 0;
          v70 = 0;
          do
          {
            v49 = ~(-1 << v48) & *(&v74 + v70);
            *(&v74 + v70) = v64 | (*(&v74 + v70) >> v48);
            ++v70;
            v64 = v49 << (32 - v48);
          }
          while ( v70 < 3 );
          v50 = 2;
          v51 = &v76 - v47;
          do
          {
            if ( v50 < v47 )
              *(&v74 + v50) = 0;
            else
              *(&v74 + v50) = *v51;
            --v51;
            --v50;
          }
          while ( v50 >= 0 );
          result = 0;
        }
        else
        {
          v75 = 0;
          v76 = 0;
          v74 = 2147483648;
          v41 = DoubleFormat.exp_width / 32;
          v42 = DoubleFormat.exp_width % 32;
          v63 = 0;
          v69 = 0;
          do
          {
            v43 = (int *)(&v74 + v69);
            v44 = ~(-1 << v42) & *v43;
            *v43 = v63 | ((unsigned int)*v43 >> v42);
            ++v69;
            v63 = v44 << (32 - v42);
          }
          while ( v69 < 3 );
          v45 = 2;
          v46 = &v76 - v41;
          do
          {
            if ( v45 < v41 )
              *(&v74 + v45) = 0;
            else
              *(&v74 + v45) = *v46;
            --v46;
            --v45;
          }
          while ( v45 >= 0 );
          v5 = DoubleFormat.max_exp + DoubleFormat.bias;
          result = 1;
        }
        goto LABEL_78;
      }
      v74 = v71;
      v75 = v72;
      v17 = (DoubleFormat.min_exp - v57) / 32;
      v76 = v73;
      v18 = (DoubleFormat.min_exp - v57) % 32;
      v60 = 0;
      v67 = 0;
      do
      {
        v19 = (int *)(&v74 + v67);
        v20 = ~(-1 << v18) & *v19;
        *v19 = v60 | ((unsigned int)*v19 >> v18);
        ++v67;
        v60 = v20 << (32 - v18);
      }
      while ( v67 < 3 );
      v21 = 2;
      v22 = &v76 - v17;
      do
      {
        if ( v21 < v17 )
          *(&v74 + v21) = 0;
        else
          *(&v74 + v21) = *v22;
        --v22;
        --v21;
      }
      while ( v21 >= 0 );
      v23 = DoubleFormat.precision - 1;
      v24 = DoubleFormat.precision / 32;
      v56 = DoubleFormat.precision / 32;
      v25 = (int *)(&v74 + DoubleFormat.precision / 32);
      v58 = 31 - DoubleFormat.precision % 32;
      if ( (1 << (31 - DoubleFormat.precision % 32)) & *v25 )
      {
        for ( j = (~(-1 << (31 - DoubleFormat.precision % 32)) & *(&v74 + v24)) == 0; j; j = *(&v74 + v24) == 0 )
        {
          if ( ++v24 >= 3 )
            goto LABEL_51;
        }
        v27 = v23 / 32;
        v61 = 0;
        v28 = 1 << (31 - v23 % 32);
        v29 = (int *)(&v74 + v23 / 32);
        v30 = *v29 + v28;
        if ( v30 < *v29 || v30 < v28 )
          v61 = 1;
        *v29 = v30;
        for ( k = v61; --v27 >= 0 && k; k = v34 )
        {
          v32 = (int *)(&v74 + v27);
          v33 = *v32 + 1;
          v34 = 0;
          if ( v33 < *v32 || v33 < 1 )
            v34 = 1;
          *v32 = v33;
        }
      }
LABEL_51:
      *v25 &= -1 << v58;
      if ( v56 + 1 < 3 )
        memset(&v74 + v56 + 1, 0, 4 * (3 - (v56 + 1)));
      v35 = (DoubleFormat.exp_width + 1) / 32;
      v36 = (DoubleFormat.exp_width + 1) % 32;
      v62 = 0;
      v68 = 0;
      do
      {
        v37 = (int *)(&v74 + v68);
        v38 = ~(-1 << v36) & *v37;
        *v37 = v62 | ((unsigned int)*v37 >> v36);
        ++v68;
        v62 = v38 << (32 - v36);
      }
      while ( v68 < 3 );
      v39 = 2;
      v40 = &v76 - v35;
      do
      {
        if ( v39 < v35 )
          *(&v74 + v39) = 0;
        else
          *(&v74 + v39) = *v40;
        --v40;
        --v39;
      }
      while ( v39 >= 0 );
    }
    else
    {
      v74 = 0;
      v75 = 0;
      v76 = 0;
    }
    v5 = 0;
    result = 2;
    goto LABEL_78;
  }
  v5 = 0;
  v6 = 0;
  while ( !*(&v74 + v6) )
  {
    if ( ++v6 >= 3 )
    {
      result = 0;
      goto LABEL_78;
    }
  }
  v74 = 0;
  v75 = 0;
  v76 = 0;
  result = 2;
LABEL_78:
  v52 = v74 | (v54 != 0 ? 0x80000000 : 0) | (v5 << (31 - LOBYTE(DoubleFormat.exp_width)));
  if ( DoubleFormat.format_width == 64 )
  {
    v53 = v75;
    HIDWORD(d->x) = v52;
    LODWORD(d->x) = v53;
  }
  else if ( DoubleFormat.format_width == 32 )
  {
    LODWORD(d->x) = v52;
  }
  return result;
}

//----- (007C9338) --------------------------------------------------------
signed int __cdecl _ld12tof(_LDBL12 *pld12, _CRT_FLOAT *f)
{
  __int16 v2; // bx@1
  int v3; // ebx@1
  int v4; // eax@1
  int v5; // ebx@2
  int v6; // eax@2
  signed int result; // eax@5
  signed int v8; // edi@7
  int v9; // edx@7
  int *v10; // esi@7
  int v11; // eax@8
  bool i; // zf@8
  int v13; // eax@13
  unsigned int v14; // edx@13
  int *v15; // ecx@13
  bool v16; // cf@14
  int v17; // eax@28
  int v18; // edx@28
  int *v19; // ebx@29
  int v20; // ST1C_4@29
  signed int v21; // edx@30
  int *v22; // ecx@30
  signed int v23; // esi@35
  int v24; // eax@35
  int *v25; // ebx@35
  bool j; // zf@36
  int v27; // eax@41
  unsigned int v28; // edx@41
  int *v29; // ecx@41
  unsigned int v30; // edi@41
  signed int k; // ecx@44
  int *v32; // ecx@46
  unsigned int v33; // esi@46
  signed int v34; // edi@46
  int v35; // eax@53
  int v36; // edx@53
  int *v37; // ebx@54
  int v38; // ST1C_4@54
  signed int v39; // edx@55
  int *v40; // ecx@55
  int v41; // eax@62
  int v42; // edx@62
  int *v43; // ebx@63
  int v44; // ST1C_4@63
  signed int v45; // edx@64
  int *v46; // ecx@64
  int v47; // eax@70
  int v48; // edx@70
  int v49; // ST1C_4@71
  signed int v50; // edx@72
  int *v51; // ecx@72
  int v52; // ebx@78
  float v53; // edx@79
  int v54; // [sp+8h] [bp-38h]@1
  char v55; // [sp+10h] [bp-30h]@7
  int v56; // [sp+10h] [bp-30h]@35
  int v57; // [sp+14h] [bp-2Ch]@7
  char v58; // [sp+14h] [bp-2Ch]@35
  int v59; // [sp+18h] [bp-28h]@7
  int v60; // [sp+18h] [bp-28h]@28
  signed int v61; // [sp+18h] [bp-28h]@41
  int v62; // [sp+18h] [bp-28h]@53
  int v63; // [sp+18h] [bp-28h]@62
  int v64; // [sp+18h] [bp-28h]@70
  signed int v65; // [sp+1Ch] [bp-24h]@7
  unsigned int v66; // [sp+20h] [bp-20h]@13
  signed int v67; // [sp+20h] [bp-20h]@28
  signed int v68; // [sp+20h] [bp-20h]@53
  signed int v69; // [sp+20h] [bp-20h]@62
  signed int v70; // [sp+20h] [bp-20h]@70
  unsigned int v71; // [sp+24h] [bp-1Ch]@7
  int v72; // [sp+28h] [bp-18h]@7
  int v73; // [sp+2Ch] [bp-14h]@7
  unsigned int v74; // [sp+30h] [bp-10h]@1
  float v75; // [sp+34h] [bp-Ch]@1
  int v76; // [sp+38h] [bp-8h]@1

  v2 = *(_WORD *)&pld12->ld12[10];
  v54 = *(_WORD *)&pld12->ld12[10] & 0x8000;
  v74 = *(_DWORD *)&pld12->ld12[6];
  v3 = (v2 & 0x7FFF) - 0x3FFF;
  v4 = *(_WORD *)&pld12->ld12[0] << 16;
  v75 = *(float *)&pld12->ld12[2];
  v76 = v4;
  if ( v3 != -16383 )
  {
    v65 = 0;
    v71 = v74;
    v72 = LODWORD(v75);
    v73 = v76;
    v8 = FloatFormat.precision - 1;
    v57 = v3;
    v59 = FloatFormat.precision / 32;
    v9 = FloatFormat.precision % 32;
    v10 = (int *)(&v74 + FloatFormat.precision / 32);
    v55 = 31 - FloatFormat.precision % 32;
    if ( (1 << (31 - FloatFormat.precision % 32)) & *v10 )
    {
      v11 = FloatFormat.precision / 32;
      for ( i = (~(-1 << (31 - v9)) & *(&v74 + v59)) == 0; i; i = *(&v74 + v11) == 0 )
      {
        if ( ++v11 >= 3 )
          goto LABEL_21;
      }
      v13 = v8 / 32;
      v65 = 0;
      v14 = 1 << (31 - v8 % 32);
      v15 = (int *)(&v74 + v8 / 32);
      v66 = v14 + *v15;
      if ( v66 >= *v15 )
      {
        v16 = v66 < v14;
        goto LABEL_18;
      }
LABEL_19:
      v65 = 1;
      while ( 1 )
      {
        --v13;
        *v15 = v66;
        if ( v13 < 0 || !v65 )
          break;
        v65 = 0;
        v15 = (int *)(&v74 + v13);
        v66 = *v15 + 1;
        if ( v66 >= *v15 )
        {
          v16 = (unsigned int)*v15 >= 0xFFFFFFFF;
LABEL_18:
          if ( !v16 )
            continue;
        }
        goto LABEL_19;
      }
    }
LABEL_21:
    *v10 &= -1 << v55;
    if ( v59 + 1 < 3 )
      memset(&v74 + v59 + 1, 0, 4 * (3 - (v59 + 1)));
    if ( v65 )
      ++v3;
    if ( v3 >= FloatFormat.min_exp - FloatFormat.precision )
    {
      if ( v3 > FloatFormat.min_exp )
      {
        if ( v3 < FloatFormat.max_exp )
        {
          v5 = FloatFormat.bias + v3;
          v74 &= 0x7FFFFFFFu;
          v47 = FloatFormat.exp_width / 32;
          v48 = FloatFormat.exp_width % 32;
          v64 = 0;
          v70 = 0;
          do
          {
            v49 = ~(-1 << v48) & *(&v74 + v70);
            *(&v74 + v70) = v64 | (*(&v74 + v70) >> v48);
            ++v70;
            v64 = v49 << (32 - v48);
          }
          while ( v70 < 3 );
          v50 = 2;
          v51 = &v76 - v47;
          do
          {
            if ( v50 < v47 )
              *(&v74 + v50) = 0;
            else
              *(&v74 + v50) = *v51;
            --v51;
            --v50;
          }
          while ( v50 >= 0 );
          result = 0;
        }
        else
        {
          v75 = 0.0;
          v76 = 0;
          v74 = 2147483648;
          v41 = FloatFormat.exp_width / 32;
          v42 = FloatFormat.exp_width % 32;
          v63 = 0;
          v69 = 0;
          do
          {
            v43 = (int *)(&v74 + v69);
            v44 = ~(-1 << v42) & *v43;
            *v43 = v63 | ((unsigned int)*v43 >> v42);
            ++v69;
            v63 = v44 << (32 - v42);
          }
          while ( v69 < 3 );
          v45 = 2;
          v46 = &v76 - v41;
          do
          {
            if ( v45 < v41 )
              *(&v74 + v45) = 0;
            else
              *(&v74 + v45) = *v46;
            --v46;
            --v45;
          }
          while ( v45 >= 0 );
          v5 = FloatFormat.max_exp + FloatFormat.bias;
          result = 1;
        }
        goto LABEL_78;
      }
      v74 = v71;
      v75 = *(float *)&v72;
      v17 = (FloatFormat.min_exp - v57) / 32;
      v76 = v73;
      v18 = (FloatFormat.min_exp - v57) % 32;
      v60 = 0;
      v67 = 0;
      do
      {
        v19 = (int *)(&v74 + v67);
        v20 = ~(-1 << v18) & *v19;
        *v19 = v60 | ((unsigned int)*v19 >> v18);
        ++v67;
        v60 = v20 << (32 - v18);
      }
      while ( v67 < 3 );
      v21 = 2;
      v22 = &v76 - v17;
      do
      {
        if ( v21 < v17 )
          *(&v74 + v21) = 0;
        else
          *(&v74 + v21) = *v22;
        --v22;
        --v21;
      }
      while ( v21 >= 0 );
      v23 = FloatFormat.precision - 1;
      v24 = FloatFormat.precision / 32;
      v56 = FloatFormat.precision / 32;
      v25 = (int *)(&v74 + FloatFormat.precision / 32);
      v58 = 31 - FloatFormat.precision % 32;
      if ( (1 << (31 - FloatFormat.precision % 32)) & *v25 )
      {
        for ( j = (~(-1 << (31 - FloatFormat.precision % 32)) & *(&v74 + v24)) == 0; j; j = *(&v74 + v24) == 0 )
        {
          if ( ++v24 >= 3 )
            goto LABEL_51;
        }
        v27 = v23 / 32;
        v61 = 0;
        v28 = 1 << (31 - v23 % 32);
        v29 = (int *)(&v74 + v23 / 32);
        v30 = *v29 + v28;
        if ( v30 < *v29 || v30 < v28 )
          v61 = 1;
        *v29 = v30;
        for ( k = v61; --v27 >= 0 && k; k = v34 )
        {
          v32 = (int *)(&v74 + v27);
          v33 = *v32 + 1;
          v34 = 0;
          if ( v33 < *v32 || v33 < 1 )
            v34 = 1;
          *v32 = v33;
        }
      }
LABEL_51:
      *v25 &= -1 << v58;
      if ( v56 + 1 < 3 )
        memset(&v74 + v56 + 1, 0, 4 * (3 - (v56 + 1)));
      v35 = (FloatFormat.exp_width + 1) / 32;
      v36 = (FloatFormat.exp_width + 1) % 32;
      v62 = 0;
      v68 = 0;
      do
      {
        v37 = (int *)(&v74 + v68);
        v38 = ~(-1 << v36) & *v37;
        *v37 = v62 | ((unsigned int)*v37 >> v36);
        ++v68;
        v62 = v38 << (32 - v36);
      }
      while ( v68 < 3 );
      v39 = 2;
      v40 = &v76 - v35;
      do
      {
        if ( v39 < v35 )
          *(&v74 + v39) = 0;
        else
          *(&v74 + v39) = *v40;
        --v40;
        --v39;
      }
      while ( v39 >= 0 );
    }
    else
    {
      v74 = 0;
      v75 = 0.0;
      v76 = 0;
    }
    v5 = 0;
    result = 2;
    goto LABEL_78;
  }
  v5 = 0;
  v6 = 0;
  while ( !*(&v74 + v6) )
  {
    if ( ++v6 >= 3 )
    {
      result = 0;
      goto LABEL_78;
    }
  }
  v74 = 0;
  v75 = 0.0;
  v76 = 0;
  result = 2;
LABEL_78:
  v52 = v74 | (v54 != 0 ? 0x80000000 : 0) | (v5 << (31 - LOBYTE(FloatFormat.exp_width)));
  if ( FloatFormat.format_width == 64 )
  {
    v53 = v75;
    LODWORD(f[1].f) = v52;
    f->f = v53;
  }
  else if ( FloatFormat.format_width == 32 )
  {
    LODWORD(f->f) = v52;
  }
  return result;
}

//----- (007C9A6D) --------------------------------------------------------
int __cdecl __crtMessageBoxW(const wchar_t *lpText, const wchar_t *lpCaption, unsigned int uType)
{
  HMODULE v3; // eax@2
  HMODULE v4; // ebx@2
  FARPROC v5; // eax@3
  FARPROC v6; // eax@4
  FARPROC v7; // eax@4
  FARPROC v8; // eax@4
  FARPROC v9; // eax@5
  int (*v10)(void); // edi@8
  int (__stdcall *v11)(int, signed int, tagUSEROBJECTFLAGS *, signed int, unsigned int *); // eax@8
  int (__stdcall *v12)(int, signed int, tagUSEROBJECTFLAGS *, signed int, unsigned int *); // ebx@8
  int v13; // eax@10
  int (*v14)(void); // eax@15
  int (__stdcall *v15)(HWND__ *); // eax@18
  int (__stdcall *v16)(HWND__ *, const wchar_t *, const wchar_t *, unsigned int); // eax@20
  unsigned int nDummy; // [sp+Ch] [bp-24h]@11
  const wchar_t *v19; // [sp+10h] [bp-20h]@1
  const wchar_t *v20; // [sp+14h] [bp-1Ch]@1
  void *enull; // [sp+18h] [bp-18h]@1
  HWND__ *hWndParent; // [sp+1Ch] [bp-14h]@1
  tagUSEROBJECTFLAGS uof; // [sp+20h] [bp-10h]@11

  v19 = lpText;
  v20 = lpCaption;
  hWndParent = 0;
  enull = _encoded_null();
  if ( !pfnMessageBox )
  {
    v3 = LoadLibraryW(L"USER32.DLL");
    v4 = v3;
    if ( !v3 )
      return 0;
    v5 = GetProcAddress(v3, "MessageBoxW");
    if ( !v5 )
      return 0;
    pfnMessageBox = EncodePointer(v5);
    v6 = GetProcAddress(v4, "GetActiveWindow");
    pfnGetActiveWindow = EncodePointer(v6);
    v7 = GetProcAddress(v4, "GetLastActivePopup");
    pfnGetLastActivePopup = EncodePointer(v7);
    v8 = GetProcAddress(v4, "GetUserObjectInformationW");
    pfnGetUserObjectInformation = EncodePointer(v8);
    if ( pfnGetUserObjectInformation )
    {
      v9 = GetProcAddress(v4, "GetProcessWindowStation");
      pfnGetProcessWindowStation = EncodePointer(v9);
    }
  }
  if ( pfnGetProcessWindowStation == enull
    || pfnGetUserObjectInformation == enull
    || (v10 = (int (*)(void))DecodePointer(pfnGetProcessWindowStation),
        v11 = (int (__stdcall *)(int, signed int, tagUSEROBJECTFLAGS *, signed int, unsigned int *))DecodePointer(pfnGetUserObjectInformation),
        v12 = v11,
        !v10)
    || !v11
    || (v13 = v10()) != 0 && v12(v13, 1, &uof, 12, &nDummy) && uof.dwFlags & 1 )
  {
    if ( pfnGetActiveWindow != enull )
    {
      v14 = (int (*)(void))DecodePointer(pfnGetActiveWindow);
      if ( v14 )
      {
        hWndParent = (HWND__ *)v14();
        if ( hWndParent )
        {
          if ( pfnGetLastActivePopup != enull )
          {
            v15 = (int (__stdcall *)(HWND__ *))DecodePointer(pfnGetLastActivePopup);
            if ( v15 )
              hWndParent = (HWND__ *)v15(hWndParent);
          }
        }
      }
    }
  }
  else
  {
    uType |= 0x200000u;
  }
  v16 = (int (__stdcall *)(HWND__ *, const wchar_t *, const wchar_t *, unsigned int))DecodePointer(pfnMessageBox);
  if ( v16 )
    return v16(hWndParent, v19, v20, uType);
  return 0;
}

//----- (007CC490) --------------------------------------------------------
double __cdecl ceilf(float _X)
{
  return (float)ceil(_X);
}

//----- (007CC4B0) --------------------------------------------------------
int NiSprintf(char *pcDest, unsigned int uiDestSize, const char *pcFormat, ...)
{
  int result; // eax@2
  va_list va; // [sp+18h] [bp+14h]@1

  va_start(va, pcFormat);
  if ( uiDestSize )
  {
    result = vsprintf_s(pcDest, uiDestSize, pcFormat, va);
    pcDest[uiDestSize - 1] = 0;
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (007CC4E0) --------------------------------------------------------
double __thiscall NiTPointerListBase<NiTPointerAllocator<unsigned int>,float>::RemoveHead(NiTPointerListBase<NiTPointerAllocator<unsigned int>,float> *this)
{
  NiTPointerListBase<NiTPointerAllocator<unsigned int>,float> *v1; // esi@1
  NiTListItem<float> *v2; // ecx@1
  NiTListItem<float> *v3; // eax@1
  float element; // ST08_4@4
  double result; // st7@4

  v1 = this;
  v2 = this->m_pkHead;
  v3 = v2->m_pkNext;
  v1->m_pkHead = v2->m_pkNext;
  if ( v3 )
    v3->m_pkPrev = 0;
  else
    v1->m_pkTail = 0;
  element = v2->m_element;
  v1->vfptr->DeleteItem((NiTListBase<NiTPointerAllocator<unsigned int>,float> *)v1, v2);
  result = element;
  --v1->m_kAllocator.m_uiCount;
  return result;
}

//----- (007CC520) --------------------------------------------------------
unsigned int __thiscall NiTSet<unsigned int>::Find(NiTSet<unsigned int> *this, const unsigned int *element)
{
  unsigned int v2; // edx@1
  unsigned int result; // eax@1
  unsigned int *v4; // ecx@2

  v2 = this->m_uiUsed;
  result = 0;
  if ( v2 )
  {
    v4 = this->m_pBase;
    while ( *v4 != *element )
    {
      ++result;
      ++v4;
      if ( result >= v2 )
        goto LABEL_5;
    }
  }
  else
  {
LABEL_5:
    result = -1;
  }
  return result;
}

//----- (007CC550) --------------------------------------------------------
void __thiscall NiSequence::SetName(NiSequence *this, const char *pcName)
{
  NiSequence *v2; // edi@1
  unsigned int v3; // kr00_4@2
  char *v4; // eax@2

  v2 = this;
  operator delete(this->m_pcName);
  v2->m_pcName = 0;
  if ( pcName )
  {
    v3 = strlen(pcName);
    v4 = (char *)operator new(v3 + 1);
    v2->m_pcName = v4;
    strcpy_s(v4, v3 + 1, pcName);
  }
}

//----- (007CC5A0) --------------------------------------------------------
char __stdcall NiControllerManager::BlendFromSequence(NiControllerSequence *pkSourceSequence, NiControllerSequence *pkDestSequence, float fDuration, const char *pcDestTextKey, int iPriority, float fSourceWeight, float fDestWeight, NiControllerSequence *pkTimeSyncSeq)
{
  return NiControllerSequence::StartBlend(
           pkSourceSequence,
           pkDestSequence,
           fDuration,
           pcDestTextKey,
           iPriority,
           fSourceWeight,
           fDestWeight,
           pkTimeSyncSeq);
}

//----- (007CC5E0) --------------------------------------------------------
void __stdcall NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,bool>::SetValue(NiTMapItem<NiObject *,bool> *pkItem, NiObject *key, bool val)
{
  pkItem->m_key = key;
  pkItem->m_val = val;
}

//----- (007CC600) --------------------------------------------------------
unsigned int __thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *>::KeyToHashIndex(NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *this, unsigned int key)
{
  return key % this->m_uiHashSize;
}

//----- (007CC620) --------------------------------------------------------
void __thiscall NiTObjectList<NiActorManager::TimelineData>::~NiTObjectList<NiActorManager::TimelineData>(NiTObjectList<NiActorManager::TimelineData> *this)
{
  NiTObjectList<NiActorManager::TimelineData> *v1; // edi@1
  NiTListItem<NiActorManager::TimelineData> *v2; // esi@1
  NiTListItem<NiActorManager::TimelineData> *v3; // ST00_4@2

  v1 = this;
  v2 = this->m_pkHead;
  this->vfptr = (NiTListBase<NiTObjectAllocator<NiActorManager::TimelineData>,NiActorManager::TimelineData>Vtbl *)&NiTObjectList<NiActorManager::TimelineData>::`vftable';
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->vfptr->DeleteItem(
      (NiTListBase<NiTObjectAllocator<NiActorManager::TimelineData>,NiActorManager::TimelineData> *)v1,
      v3);
  }
  v1->m_kAllocator.m_uiCount = 0;
  v1->m_pkHead = 0;
  v1->m_pkTail = 0;
  v1->vfptr = (NiTListBase<NiTObjectAllocator<NiActorManager::TimelineData>,NiActorManager::TimelineData>Vtbl *)&NiTListBase<NiTObjectAllocator<NiActorManager::TimelineData>,NiActorManager::TimelineData>::`vftable';
}
// 9E4EC4: using guessed type int (__thiscall *NiTListBase<NiTObjectAllocator<NiActorManager::TimelineData>,NiActorManager::TimelineData>::`vftable')(void *p, char);
// 9E4F5C: using guessed type int (__thiscall *NiTObjectList<NiActorManager::TimelineData>::`vftable')(void *p, char);

//----- (007CC660) --------------------------------------------------------
NiTListBase<NiTObjectAllocator<NiActorManager::TimelineData>,NiActorManager::TimelineData> *__thiscall NiTListBase<NiTObjectAllocator<NiActorManager::TimelineData>,NiActorManager::TimelineData>::`scalar deleting destructor'(NiTListBase<NiTObjectAllocator<NiActorManager::TimelineData>,NiActorManager::TimelineData> *this, unsigned int a2)
{
  NiTListBase<NiTObjectAllocator<NiActorManager::TimelineData>,NiActorManager::TimelineData> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTListBase<NiTObjectAllocator<NiActorManager::TimelineData>,NiActorManager::TimelineData>Vtbl *)&NiTListBase<NiTObjectAllocator<NiActorManager::TimelineData>,NiActorManager::TimelineData>::`vftable';
  if ( a2 & 1 )
    operator delete(this);
  return v2;
}
// 9E4EC4: using guessed type int (__thiscall *NiTListBase<NiTObjectAllocator<NiActorManager::TimelineData>,NiActorManager::TimelineData>::`vftable')(void *p, char);

//----- (007CC690) --------------------------------------------------------
NiTObjectList<NiActorManager::TimelineData> *__thiscall NiTObjectList<NiActorManager::TimelineData>::`vector deleting destructor'(NiTObjectList<NiActorManager::TimelineData> *this, unsigned int a2)
{
  NiTObjectList<NiActorManager::TimelineData> *v2; // esi@1

  v2 = this;
  NiTObjectList<NiActorManager::TimelineData>::~NiTObjectList<NiActorManager::TimelineData>(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007CC6C0) --------------------------------------------------------
signed int __thiscall NiActorManager::FindSequenceID(NiActorManager *this, const char *pcName)
{
  char *v2; // ebx@1
  unsigned int v3; // ecx@1
  unsigned int v4; // eax@1
  _DWORD *v5; // edx@2
  int v6; // eax@5
  int v7; // esi@6
  int v8; // edi@7
  int v9; // eax@10
  unsigned int v10; // edx@10
  unsigned int v11; // eax@10
  int *v12; // ecx@11
  const char *v13; // ecx@15
  signed int result; // eax@18
  signed int v15; // [sp+Ch] [bp-4h]@7

  v2 = (char *)&this->m_kSequenceMap;
  v3 = this->m_kSequenceMap.m_uiHashSize;
  v4 = 0;
  if ( v3 )
  {
    v5 = (_DWORD *)*((_DWORD *)v2 + 2);
    while ( !*v5 )
    {
      ++v4;
      ++v5;
      if ( v4 >= v3 )
        goto LABEL_5;
    }
    v6 = *(_DWORD *)(*((_DWORD *)v2 + 2) + 4 * v4);
  }
  else
  {
LABEL_5:
    v6 = 0;
  }
  v7 = v6;
  if ( v6 )
  {
    while ( 1 )
    {
      v8 = *(_DWORD *)(v7 + 8);
      v15 = *(_DWORD *)(v7 + 4);
      if ( *(_DWORD *)v7 )
      {
        v7 = *(_DWORD *)v7;
      }
      else
      {
        v9 = (*(int (__thiscall **)(char *, _DWORD))(*(_DWORD *)v2 + 4))(v2, *(_DWORD *)(v7 + 4));
        v10 = *((_DWORD *)v2 + 1);
        v11 = v9 + 1;
        if ( v11 >= v10 )
        {
LABEL_14:
          v7 = 0;
        }
        else
        {
          v12 = (int *)(*((_DWORD *)v2 + 2) + 4 * v11);
          while ( 1 )
          {
            v7 = *v12;
            if ( *v12 )
              break;
            ++v11;
            ++v12;
            if ( v11 >= v10 )
              goto LABEL_14;
          }
        }
      }
      v13 = *(const char **)(v8 + 8);
      if ( v13 )
      {
        if ( !strcmp(pcName, v13) )
          break;
      }
      if ( !v7 )
        goto LABEL_18;
    }
    result = v15;
  }
  else
  {
LABEL_18:
    result = -2;
  }
  return result;
}

//----- (007CC790) --------------------------------------------------------
void __thiscall NiActorManager::ProcessCallbacks(NiActorManager *this)
{
  NiActorManager *v1; // esi@1
  char v2; // cl@3
  NiTListItem<NiActorManager::TimelineData> *v3; // edx@4
  int v4; // edx@5
  void (__thiscall *v5)(NiActorManager::CallbackObject *, NiActorManager *, unsigned int, float, float); // eax@9
  NiTListItem<NiActorManager::TimelineData> **v6; // ecx@14
  NiTListItem<NiActorManager::TimelineData> *v7; // eax@14

  v1 = this;
  if ( this->m_pkCallbackObject && this->m_kTimeline.m_kAllocator.m_uiCount )
  {
    v2 = 0;
    while ( 1 )
    {
      v3 = v1->m_kTimeline.m_pkHead;
      v4 = (int)(v3 ? &v3->m_element : 0);
      if ( *(float *)v4 >= (double)v1->m_fTime )
        break;
      switch ( *(_DWORD *)(v4 + 4) )
      {
        case 0:
          v5 = v1->m_pkCallbackObject->vfptr->AnimActivated;
          goto LABEL_13;
        case 1:
          v5 = v1->m_pkCallbackObject->vfptr->AnimDeactivated;
          goto LABEL_13;
        case 2:
          ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))v1->m_pkCallbackObject->vfptr->TextKeyEvent)(
            v1,
            *(_DWORD *)(v4 + 8),
            *(_DWORD *)(v4 + 16),
            *(_DWORD *)(v4 + 12),
            v1->m_fTime,
            *(float *)v4);
          break;
        case 3:
          v5 = v1->m_pkCallbackObject->vfptr->EndOfSequence;
LABEL_13:
          ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v5)(v1, *(_DWORD *)(v4 + 8), v1->m_fTime, *(float *)v4);
          break;
        default:
          break;
      }
      v6 = &v1->m_kTimeline.m_pkHead->m_pkNext;
      v7 = *v6;
      v1->m_kTimeline.m_pkHead = *v6;
      if ( v7 )
        v7->m_pkPrev = 0;
      else
        v1->m_kTimeline.m_pkTail = 0;
      v1->m_kTimeline.vfptr->DeleteItem(
        (NiTListBase<NiTObjectAllocator<NiActorManager::TimelineData>,NiActorManager::TimelineData> *)&v1->m_kTimeline,
        (NiTListItem<NiActorManager::TimelineData> *)v6);
      --v1->m_kTimeline.m_kAllocator.m_uiCount;
      v2 = 1;
      if ( !v1->m_kTimeline.m_kAllocator.m_uiCount )
      {
        v1->m_bBuildTimeline = 1;
        return;
      }
    }
    if ( v2 )
      v1->m_bBuildTimeline = 1;
  }
}

//----- (007CC8B0) --------------------------------------------------------
void __thiscall NiActorManager::RaiseAnimActivatedEvents(NiActorManager *this)
{
  unsigned int v1; // eax@1
  NiActorManager *v2; // edi@1
  NiActorManager::CallbackData *v3; // eax@2
  unsigned int v4; // eax@4
  unsigned int v5; // edx@5
  unsigned int v6; // eax@5
  NiTMapItem<unsigned int,NiControllerSequence *> **v7; // ecx@6
  NiTMapItem<unsigned int,NiControllerSequence *> *v8; // eax@9
  NiTMapItem<unsigned int,NiControllerSequence *> *v9; // esi@10
  unsigned int v10; // eax@11
  int v11; // eax@12
  unsigned int v12; // edx@12
  unsigned int v13; // eax@12
  NiTMapItem<unsigned int,NiControllerSequence *> **v14; // ecx@13
  unsigned int ui; // [sp+18h] [bp-8h]@1
  unsigned int v16; // [sp+1Ch] [bp-4h]@11

  v1 = 0;
  v2 = this;
  ui = 0;
  if ( this->m_kCallbacks.m_uiSize )
  {
    do
    {
      v3 = v2->m_kCallbacks.m_pBase[v1].m_pObject;
      if ( v3 && v3->m_eEventType == ANIM_ACTIVATED )
      {
        v4 = v3->m_eSequenceID;
        if ( v4 == -1 )
        {
          v5 = v2->m_kSequenceMap.m_uiHashSize;
          v6 = 0;
          if ( v5 )
          {
            v7 = v2->m_kSequenceMap.m_ppkHashTable;
            while ( !*v7 )
            {
              ++v6;
              ++v7;
              if ( v6 >= v5 )
                goto LABEL_9;
            }
            v8 = v2->m_kSequenceMap.m_ppkHashTable[v6];
          }
          else
          {
LABEL_9:
            v8 = 0;
          }
          v9 = v8;
          while ( v9 )
          {
            v10 = v9->m_key;
            v9 = v9->m_pkNext;
            v16 = v10;
            if ( !v9 )
            {
              v11 = v2->m_kSequenceMap.vfptr->KeyToHashIndex(
                      (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *> *)&v2->m_kSequenceMap,
                      v10);
              v12 = v2->m_kSequenceMap.m_uiHashSize;
              v13 = v11 + 1;
              if ( v13 >= v12 )
              {
LABEL_16:
                v9 = 0;
              }
              else
              {
                v14 = &v2->m_kSequenceMap.m_ppkHashTable[v13];
                while ( 1 )
                {
                  v9 = *v14;
                  if ( *v14 )
                    break;
                  ++v13;
                  ++v14;
                  if ( v13 >= v12 )
                    goto LABEL_16;
                }
              }
              v10 = v16;
            }
            if ( v10 == v2->m_eCurID )
              ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v2->m_pkCallbackObject->vfptr->AnimActivated)(
                v2,
                v10,
                v2->m_fTime,
                v2->m_fTime);
          }
        }
        else if ( v4 == v2->m_eCurID )
        {
          ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v2->m_pkCallbackObject->vfptr->AnimActivated)(
            v2,
            v4,
            v2->m_fTime,
            v2->m_fTime);
        }
      }
      v1 = ui + 1;
      ui = v1;
    }
    while ( v1 < v2->m_kCallbacks.m_uiSize );
  }
}

//----- (007CC9D0) --------------------------------------------------------
void __thiscall NiActorManager::RaiseAnimDeactivatedEvents(NiActorManager *this)
{
  unsigned int v1; // eax@1
  NiActorManager *v2; // edi@1
  NiActorManager::CallbackData *v3; // eax@2
  unsigned int v4; // eax@4
  unsigned int v5; // edx@5
  unsigned int v6; // eax@5
  NiTMapItem<unsigned int,NiControllerSequence *> **v7; // ecx@6
  NiTMapItem<unsigned int,NiControllerSequence *> *v8; // eax@9
  NiTMapItem<unsigned int,NiControllerSequence *> *v9; // esi@10
  unsigned int v10; // eax@11
  int v11; // eax@12
  unsigned int v12; // edx@12
  unsigned int v13; // eax@12
  NiTMapItem<unsigned int,NiControllerSequence *> **v14; // ecx@13
  unsigned int ui; // [sp+18h] [bp-8h]@1
  unsigned int v16; // [sp+1Ch] [bp-4h]@11

  v1 = 0;
  v2 = this;
  ui = 0;
  if ( this->m_kCallbacks.m_uiSize )
  {
    do
    {
      v3 = v2->m_kCallbacks.m_pBase[v1].m_pObject;
      if ( v3 && v3->m_eEventType == 1 )
      {
        v4 = v3->m_eSequenceID;
        if ( v4 == -1 )
        {
          v5 = v2->m_kSequenceMap.m_uiHashSize;
          v6 = 0;
          if ( v5 )
          {
            v7 = v2->m_kSequenceMap.m_ppkHashTable;
            while ( !*v7 )
            {
              ++v6;
              ++v7;
              if ( v6 >= v5 )
                goto LABEL_9;
            }
            v8 = v2->m_kSequenceMap.m_ppkHashTable[v6];
          }
          else
          {
LABEL_9:
            v8 = 0;
          }
          v9 = v8;
          while ( v9 )
          {
            v10 = v9->m_key;
            v9 = v9->m_pkNext;
            v16 = v10;
            if ( !v9 )
            {
              v11 = v2->m_kSequenceMap.vfptr->KeyToHashIndex(
                      (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *> *)&v2->m_kSequenceMap,
                      v10);
              v12 = v2->m_kSequenceMap.m_uiHashSize;
              v13 = v11 + 1;
              if ( v13 >= v12 )
              {
LABEL_16:
                v9 = 0;
              }
              else
              {
                v14 = &v2->m_kSequenceMap.m_ppkHashTable[v13];
                while ( 1 )
                {
                  v9 = *v14;
                  if ( *v14 )
                    break;
                  ++v13;
                  ++v14;
                  if ( v13 >= v12 )
                    goto LABEL_16;
                }
              }
              v10 = v16;
            }
            if ( v10 == v2->m_eCurID )
              ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v2->m_pkCallbackObject->vfptr->AnimDeactivated)(
                v2,
                v10,
                v2->m_fTime,
                v2->m_fTime);
          }
        }
        else if ( v4 == v2->m_eCurID )
        {
          ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v2->m_pkCallbackObject->vfptr->AnimDeactivated)(
            v2,
            v4,
            v2->m_fTime,
            v2->m_fTime);
        }
      }
      v1 = ui + 1;
      ui = v1;
    }
    while ( v1 < v2->m_kCallbacks.m_uiSize );
  }
}

//----- (007CCAF0) --------------------------------------------------------
void __thiscall NiActorManager::TimelineData::SetValues(NiActorManager::TimelineData *this, float fEventTime, NiActorManager::EventType eEventType, unsigned int eSequenceID, NiTextKeyMatch *pkMatchObject, const char *pcTextKeyMatched)
{
  NiActorManager::TimelineData *v6; // esi@1
  NiTextKeyMatch *v7; // edi@1

  v6 = this;
  this->m_fEventTime = fEventTime;
  this->m_eEventType = eEventType;
  this->m_eSequenceID = eSequenceID;
  v7 = this->m_spMatchObject.m_pObject;
  if ( v7 == pkMatchObject )
  {
    this->m_pcTextKeyMatched = pcTextKeyMatched;
  }
  else
  {
    if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v6->m_spMatchObject.m_pObject = pkMatchObject;
    if ( pkMatchObject )
    {
      InterlockedIncrement((volatile LONG *)&pkMatchObject->m_uiRefCount);
      v6->m_pcTextKeyMatched = pcTextKeyMatched;
    }
    else
    {
      v6->m_pcTextKeyMatched = pcTextKeyMatched;
    }
  }
}

//----- (007CCB70) --------------------------------------------------------
NiActorManager::ChainCompletionInfo *__thiscall NiActorManager::ChainCompletionInfo::`vector deleting destructor'(NiActorManager::ChainCompletionInfo *this, unsigned int a2)
{
  NiActorManager::ChainCompletionInfo *v2; // esi@1
  char *v3; // ST04_4@1

  v2 = this;
  v3 = this->m_pcName;
  this->vfptr = (NiRefObjectVtbl *)&NiActorManager::ChainCompletionInfo::`vftable';
  operator delete(v3);
  operator delete(v2->m_pcNextName);
  v2->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9E4ED4: using guessed type int (__thiscall *NiActorManager::ChainCompletionInfo::`vftable')(void *p, char);

//----- (007CCBC0) --------------------------------------------------------
void __stdcall NiTObjectList<NiActorManager::TimelineData>::DeleteItem(NiTListItem<NiActorManager::TimelineData> *pkItem)
{
  pkItem->m_pkNext = (NiTListItem<NiActorManager::TimelineData> *)NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkFreeMem;
  NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkFreeMem = (int)pkItem;
}
// B61848: using guessed type int NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkFreeMem;

//----- (007CCBE0) --------------------------------------------------------
NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *> *this, unsigned int a2)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll((NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this);
  operator delete(v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E4EDC: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *>::`vftable')(void *p, char);

//----- (007CCC20) --------------------------------------------------------
NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,bool> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,bool>::`vector deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,bool> *this, unsigned int a2)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,bool> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,bool>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,bool>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll((NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this);
  operator delete(v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E4EFC: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,bool>::`vftable')(void *p, char);

//----- (007CCC60) --------------------------------------------------------
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *> *this, unsigned int a2)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll((NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this);
  operator delete(v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E4F1C: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *>::`vftable')(void *p, char);

//----- (007CCCA0) --------------------------------------------------------
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::SequenceGroup *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::SequenceGroup *>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::SequenceGroup *> *this, unsigned int a2)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::SequenceGroup *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::SequenceGroup *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::SequenceGroup *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll((NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this);
  operator delete(v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E4F3C: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::SequenceGroup *>::`vftable')(void *p, char);

//----- (007CCCE0) --------------------------------------------------------
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *>::`vector deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *> *this, unsigned int a2)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll((NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this);
  operator delete(v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E4EA4: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *>::`vftable')(void *p, char);

//----- (007CCD20) --------------------------------------------------------
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<unsigned int,NiControllerSequence *>::`vector deleting destructor'(NiTPointerMap<unsigned int,NiControllerSequence *> *this, unsigned int a2)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v2; // esi@1

  v2 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *>Vtbl *)&NiTPointerMap<unsigned int,NiControllerSequence *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll((NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this);
  v2->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll(v2);
  operator delete(v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E4EA4: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *>::`vftable')(void *p, char);
// 9E4FAC: using guessed type int (__thiscall *NiTPointerMap<unsigned int,NiControllerSequence *>::`vftable')(void *p, char);

//----- (007CCD60) --------------------------------------------------------
NiControllerManager *__thiscall NiActorManager::FindControllerManager(NiActorManager *this, NiAVObject *pkObject)
{
  NiActorManager *v2; // ebx@1
  NiControllerManager *result; // eax@1
  NiShader *v4; // eax@2
  NiShader *v5; // edi@2
  unsigned int v6; // eax@3
  int v7; // esi@3

  v2 = this;
  result = (NiControllerManager *)NiObjectNET::GetController(
                                    (NiObjectNET *)&pkObject->vfptr,
                                    &NiControllerManager::m_RTTI);
  if ( !result )
  {
    v4 = CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, (NiShader *)pkObject);
    v5 = v4;
    if ( v4 && (v6 = v4[11].m_uiImplementation, v7 = 0, v6) )
    {
      if ( v6 <= 0 )
        goto LABEL_7;
      while ( 1 )
      {
        if ( *(_DWORD *)(v5[11].m_uiRefCount + 4 * v7) )
        {
          result = NiActorManager::FindControllerManager(v2, *(NiAVObject **)(v5[11].m_uiRefCount + 4 * v7));
          if ( result )
            break;
        }
LABEL_7:
        if ( v5[11].m_uiImplementation <= ++v7 )
          goto LABEL_8;
      }
    }
    else
    {
LABEL_8:
      result = 0;
    }
  }
  return result;
}

//----- (007CCDD0) --------------------------------------------------------
NiBoneLODController *__thiscall NiActorManager::FindBoneLODController(NiActorManager *this, NiAVObject *pkObject)
{
  NiActorManager *v2; // ebx@1
  NiBoneLODController *result; // eax@1
  NiShader *v4; // eax@2
  NiShader *v5; // edi@2
  unsigned int v6; // eax@3
  int v7; // esi@3

  v2 = this;
  result = (NiBoneLODController *)NiObjectNET::GetController(
                                    (NiObjectNET *)&pkObject->vfptr,
                                    &NiBoneLODController::m_RTTI);
  if ( !result )
  {
    v4 = CPostProcessEffect::DynamicCast(&NiNode::m_RTTI, (NiShader *)pkObject);
    v5 = v4;
    if ( v4 && (v6 = v4[11].m_uiImplementation, v7 = 0, v6) )
    {
      if ( v6 <= 0 )
        goto LABEL_7;
      while ( 1 )
      {
        if ( *(_DWORD *)(v5[11].m_uiRefCount + 4 * v7) )
        {
          result = NiActorManager::FindBoneLODController(v2, *(NiAVObject **)(v5[11].m_uiRefCount + 4 * v7));
          if ( result )
            break;
        }
LABEL_7:
        if ( v5[11].m_uiImplementation <= ++v7 )
          goto LABEL_8;
      }
    }
    else
    {
LABEL_8:
      result = 0;
    }
  }
  return result;
}

//----- (007CCE40) --------------------------------------------------------
void __thiscall NiActorManager::UnregisterCallback(NiActorManager *this, NiActorManager::EventType eEventType, unsigned int eSequenceID, NiTextKeyMatch *pkMatchObject)
{
  unsigned int v4; // edi@1
  NiTextKeyMatch *v5; // esi@4
  NiActorManager::CallbackData *v6; // eax@5
  char v7; // bl@11
  void (__thiscall ***v8)(_DWORD, _DWORD); // esi@20
  NiActorManager *v9; // [sp+4h] [bp-8h]@1
  int v10; // [sp+8h] [bp-4h]@1

  v4 = 0;
  v9 = this;
  v10 = 0;
  if ( eEventType != 2 )
    pkMatchObject = 0;
  if ( this->m_kCallbacks.m_uiSize > 0 )
  {
    v5 = (NiTextKeyMatch *)eEventType;
    while ( 1 )
    {
      v6 = this->m_kCallbacks.m_pBase[v4].m_pObject;
      if ( !v6 || v6->m_eEventType != eEventType || v6->m_eSequenceID != eSequenceID )
        goto LABEL_26;
      v5 = v6->m_spMatchObject.m_pObject;
      v10 |= 1u;
      if ( v5 )
        InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
      if ( v5 == pkMatchObject )
        v7 = 1;
      else
LABEL_26:
        v7 = 0;
      if ( v10 & 1 )
      {
        v10 &= 0xFFFFFFFE;
        if ( v5 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
            v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
        }
      }
      if ( v7 )
        break;
      this = v9;
      if ( ++v4 >= v9->m_kCallbacks.m_uiSize )
        return;
    }
    NiTArray<NiPointer<NiControllerSequence>>::RemoveAt(
      (NiTArray<NiPointer<NiAVObject> > *)&v9->m_kCallbacks,
      (NiPointer<NiAVObject> *)&eEventType,
      v4);
    v8 = (void (__thiscall ***)(_DWORD, _DWORD))eEventType;
    if ( eEventType )
    {
      if ( !InterlockedDecrement((volatile LONG *)(eEventType + 4)) )
        (**v8)(v8, 1);
    }
    v9->m_bBuildTimeline = 1;
  }
}

//----- (007CCF30) --------------------------------------------------------
void __thiscall NiActorManager::AddTimelineDataObjectAtSameTime(NiActorManager *this, NiActorManager::EventType eEventType, unsigned int eSequenceID, NiTextKeyMatch *pkMatchObject, float fEventTime, const char *pcTextKeyMatched)
{
  int v6; // eax@4
  unsigned int v7; // ebx@5
  NiTextKey *v8; // eax@5
  unsigned int v9; // edi@5
  const char **v10; // esi@6
  double v11; // st7@11
  unsigned int v12; // edi@11
  NiTextKeyMatch *v13; // ebx@12
  double v14; // st7@12
  double v15; // st7@15
  NiTListItem<NiActorManager::TimelineData> *v16; // esi@15
  int v17; // eax@18
  _DWORD *v18; // ecx@18
  int *v19; // ecx@20
  int v20; // esi@25
  NiTextKeyMatch *v21; // edi@25
  unsigned int uiNumKeys; // [sp+0h] [bp-10h]@5
  NiActorManager *v23; // [sp+4h] [bp-Ch]@1
  unsigned int uiIndex; // [sp+8h] [bp-8h]@1
  NiTextKey *pkKeys; // [sp+Ch] [bp-4h]@5
  float fTime; // [sp+20h] [bp+10h]@13
  char *fTimea; // [sp+20h] [bp+10h]@15
  float fMatchedTime; // [sp+28h] [bp+18h]@11

  v23 = this;
  if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
         (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_kSequenceMap,
         eSequenceID,
         (NiVBSet **)&uiIndex) )
  {
    if ( uiIndex )
    {
      if ( pcTextKeyMatched )
      {
        v6 = *(_DWORD *)(uiIndex + 32);
        if ( v6 )
        {
          v7 = *(_DWORD *)(v6 + 12);
          v8 = *(NiTextKey **)(v6 + 16);
          v9 = 0;
          uiNumKeys = v7;
          pkKeys = v8;
          if ( v7 )
          {
            v10 = (const char **)&v8->m_pText;
            while ( !*v10 || strcmp(*v10, pcTextKeyMatched) )
            {
              ++v9;
              v10 += 2;
              if ( v9 >= v7 )
                return;
            }
            v11 = pkKeys[v9].m_fTime;
            v12 = v9 + 1;
            fMatchedTime = v11;
            uiIndex = v12;
            if ( v12 < v7 )
            {
              v13 = pkMatchObject;
              v14 = fMatchedTime;
              do
              {
                fTime = pkKeys[v12].m_fTime;
                if ( fTime > v14 )
                  break;
                if ( v14 == fTime )
                {
                  v15 = fTime;
                  v16 = v23->m_kTimeline.m_pkHead;
                  fTimea = pkKeys[v12].m_pText;
                  if ( v16 )
                  {
                    while ( v16->m_element.m_fEventTime <= v15 )
                    {
                      v16 = v16->m_pkNext;
                      if ( !v16 )
                        goto LABEL_18;
                    }
                    v17 = (int)v23->m_kTimeline.vfptr->NewItem((NiTListBase<NiTObjectAllocator<NiActorManager::TimelineData>,NiActorManager::TimelineData> *)&v23->m_kTimeline);
                    *(_DWORD *)v17 = v16;
                    *(_DWORD *)(v17 + 4) = v16->m_pkPrev;
                    v19 = (int *)v16->m_pkPrev;
                    if ( v19 )
                    {
                      *v19 = v17;
                      v16->m_pkPrev = (NiTListItem<NiActorManager::TimelineData> *)v17;
                    }
                    else
                    {
                      v23->m_kTimeline.m_pkHead = (NiTListItem<NiActorManager::TimelineData> *)v17;
                      v16->m_pkPrev = (NiTListItem<NiActorManager::TimelineData> *)v17;
                    }
                  }
                  else
                  {
LABEL_18:
                    v17 = (int)v23->m_kTimeline.vfptr->NewItem((NiTListBase<NiTObjectAllocator<NiActorManager::TimelineData>,NiActorManager::TimelineData> *)&v23->m_kTimeline);
                    *(_DWORD *)v17 = 0;
                    *(_DWORD *)(v17 + 4) = v23->m_kTimeline.m_pkTail;
                    v18 = &v23->m_kTimeline.m_pkTail->m_pkNext;
                    if ( v18 )
                      *v18 = v17;
                    else
                      v23->m_kTimeline.m_pkHead = (NiTListItem<NiActorManager::TimelineData> *)v17;
                    v23->m_kTimeline.m_pkTail = (NiTListItem<NiActorManager::TimelineData> *)v17;
                  }
                  ++v23->m_kTimeline.m_kAllocator.m_uiCount;
                  *(float *)(v17 + 8) = fEventTime;
                  v20 = v17 + 8;
                  *(_DWORD *)(v20 + 4) = eEventType;
                  *(_DWORD *)(v20 + 8) = eSequenceID;
                  v21 = *(NiTextKeyMatch **)(v17 + 20);
                  if ( v21 != v13 )
                  {
                    if ( v21 && !InterlockedDecrement((volatile LONG *)&v21->m_uiRefCount) && v21 )
                      v21->vfptr->__vecDelDtor((NiRefObject *)v21, 1u);
                    *(_DWORD *)(v20 + 12) = v13;
                    if ( v13 )
                      InterlockedIncrement((volatile LONG *)&v13->m_uiRefCount);
                  }
                  v14 = fMatchedTime;
                  v12 = uiIndex;
                  *(_DWORD *)(v20 + 16) = fTimea;
                }
                uiIndex = ++v12;
              }
              while ( v12 < uiNumKeys );
            }
          }
        }
      }
    }
  }
}

//----- (007CD140) --------------------------------------------------------
char __thiscall NiActorManager::ActivateSequence(NiActorManager *this, unsigned int eSequenceID, int iPriority, bool bStartOver, float fWeight, float fEaseInTime, unsigned int eTimeSyncSeqID)
{
  NiActorManager *v7; // edi@1
  NiVBSet *v8; // ebx@2
  char result; // al@3
  NiControllerSequence *v10; // eax@4
  char v11; // bl@7
  unsigned int v12; // eax@8
  unsigned int v13; // eax@10
  NiVBSet *val; // [sp+1Ch] [bp-4h]@1

  v7 = this;
  if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
         (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_kSequenceMap,
         eSequenceID,
         &val)
    && (v8 = val) != 0
    && ((v10 = 0, eTimeSyncSeqID == NiKFMTool::SYNC_SEQUENCE_ID_NONE)
     || NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
          (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v7->m_kSequenceMap,
          eTimeSyncSeqID,
          (NiVBSet **)&eTimeSyncSeqID)
     && (v10 = (NiControllerSequence *)eTimeSyncSeqID) != 0) )
  {
    v11 = NiControllerSequence::Activate(
            (NiControllerSequence *)v8,
            iPriority,
            bStartOver,
            fWeight,
            fEaseInTime,
            v10,
            0);
    if ( v11 )
    {
      v12 = v7->m_kExtraSequences.m_uiAlloced;
      if ( v7->m_kExtraSequences.m_uiUsed == v12 )
      {
        if ( v12 )
          v13 = 2 * v12;
        else
          v13 = 1;
        NiTSet<NiScreenGeometryData::ScreenElement *>::Realloc(
          (NiTSet<NiD3DTextureStageGroup *> *)&v7->m_kExtraSequences,
          v13);
      }
      v7->m_kExtraSequences.m_pBase[v7->m_kExtraSequences.m_uiUsed++] = eSequenceID;
      v7->m_bBuildTimeline = 1;
    }
    result = v11;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007CD210) --------------------------------------------------------
char __thiscall NiActorManager::DeactivateSequence(NiActorManager *this, unsigned int eSequenceID, float fEaseOutTime)
{
  NiActorManager *v3; // edi@1
  unsigned int v4; // eax@3
  char v5; // bl@5
  unsigned int v6; // eax@6
  char result; // al@9
  NiVBSet *val; // [sp+10h] [bp-4h]@1

  v3 = this;
  if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
         (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_kSequenceMap,
         eSequenceID,
         &val)
    && val
    && (v4 = val[1].m_uiFlags, v4 != 3)
    && v4 != 2 )
  {
    v5 = NiControllerSequence::Deactivate((NiControllerSequence *)val, fEaseOutTime, 0);
    if ( v5 )
    {
      v6 = NiTSet<unsigned int>::Find(&v3->m_kExtraSequences, &eSequenceID);
      if ( v6 != -1 )
        v3->m_kExtraSequences.m_pBase[v6] = v3->m_kExtraSequences.m_pBase[--v3->m_kExtraSequences.m_uiUsed];
      v3->m_bBuildTimeline = 1;
    }
    result = v5;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007CD2A0) --------------------------------------------------------
void __thiscall NiActorManager::UnloadSequence(NiActorManager *this, unsigned int eSequenceID)
{
  unsigned int v2; // edi@1
  NiActorManager *v3; // esi@1
  NiControllerSequence *v4; // ebx@2
  unsigned int v5; // ecx@3
  signed int v6; // eax@3
  unsigned int *v7; // edx@4
  void (__thiscall ***v8)(_DWORD, _DWORD); // esi@13
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v9; // [sp+8h] [bp-4h]@1

  v2 = eSequenceID;
  v3 = this;
  v9 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_kSequenceMap;
  if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
         (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_kSequenceMap,
         eSequenceID,
         (NiVBSet **)&eSequenceID) )
  {
    v4 = (NiControllerSequence *)eSequenceID;
    if ( eSequenceID )
    {
      v5 = v3->m_kExtraSequences.m_uiUsed;
      v6 = 0;
      if ( v5 )
      {
        v7 = v3->m_kExtraSequences.m_pBase;
        while ( *v7 != v2 )
        {
          ++v6;
          ++v7;
          if ( v6 >= v5 )
            goto LABEL_7;
        }
      }
      else
      {
LABEL_7:
        v6 = -1;
      }
      if ( v2 == v3->m_eCurID || v2 == v3->m_eNextID || v2 == v3->m_eTargetID || v6 > -1 )
        NiActorManager::Reset(v3);
      NiControllerManager::RemoveSequence(
        v3->m_spManager.m_pObject,
        (NiPointer<NiControllerSequence> *)&eSequenceID,
        v4);
      v8 = (void (__thiscall ***)(_DWORD, _DWORD))eSequenceID;
      if ( eSequenceID && !InterlockedDecrement((volatile LONG *)(eSequenceID + 4)) )
      {
        if ( v8 )
          (**v8)(v8, 1);
      }
      NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::RemoveAt(v9, v2);
    }
  }
}

//----- (007CD350) --------------------------------------------------------
NiKFMTool::Transition::BlendPair *__thiscall NiActorManager::GetNextBlendPair(NiActorManager *this, unsigned int uiTransSrcID, unsigned int uiTransDesID, NiKFMTool::Transition *pkTransition, float fFrameTime, float *fActualUnboundedFrame)
{
  NiKFMTool::Transition *v6; // edi@1
  int v7; // ebx@1
  char v8; // al@4
  unsigned int v9; // esi@4
  double v10; // st7@4
  double v11; // st6@4
  NiKFMTool::Transition::BlendPair *result; // eax@6
  const char **v13; // edi@11
  double v14; // st7@11
  float fBPFrameTime; // ST20_4@11
  double v16; // st7@11
  float v17; // ST20_4@12
  NiKFMTool::Transition::BlendPair *pkSmallestBP; // [sp+18h] [bp-Ch]@8
  float fSmallestBPFrameTime; // [sp+1Ch] [bp-8h]@8

  v6 = pkTransition;
  v7 = 0;
  if ( pkTransition->m_eType == TYPE_BLEND
    && pkTransition->m_aBlendPairs.m_uiUsed
    && **(_DWORD **)pkTransition->m_aBlendPairs.m_pBase )
  {
    v8 = NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
           (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_kSequenceMap,
           uiTransSrcID,
           (NiVBSet **)&uiTransSrcID);
    v9 = v8 != 0 ? uiTransSrcID : 0;
    uiTransSrcID = *(unsigned int *)(v8 != 0 ? uiTransSrcID + 0x30 : 48);
    v10 = *(float *)&uiTransSrcID;
    *(float *)&uiTransSrcID = *(float *)&uiTransSrcID - *(float *)(v9 + 44);
    v11 = fFrameTime;
    *fActualUnboundedFrame = fFrameTime;
    if ( v11 > v10 )
    {
      if ( *(_DWORD *)(v9 + 36) == 2 )
        return 0;
      fFrameTime = v11 / *(float *)&uiTransSrcID;
      fFrameTime = floor(fFrameTime);
      fFrameTime = fFrameTime * *(float *)&uiTransSrcID;
      fFrameTime = v11 - fFrameTime;
    }
    pkSmallestBP = 0;
    fSmallestBPFrameTime = 3.4028235e38;
    if ( v6->m_aBlendPairs.m_uiUsed > 0 )
    {
      while ( 1 )
      {
        v13 = (const char **)&v6->m_aBlendPairs.m_pBase[v7]->m_pcStartKey;
        v14 = NiControllerSequence::GetKeyTimeAt((NiControllerSequence *)v9, *v13);
        fBPFrameTime = v14 - fFrameTime;
        v16 = fBPFrameTime;
        if ( fBPFrameTime < 0.0 )
        {
          v17 = v16 + *(float *)&uiTransSrcID;
          v16 = v17;
        }
        if ( fSmallestBPFrameTime > v16 )
        {
          fSmallestBPFrameTime = v16;
          pkSmallestBP = (NiKFMTool::Transition::BlendPair *)v13;
        }
        if ( ++v7 >= pkTransition->m_aBlendPairs.m_uiUsed )
          break;
        v6 = pkTransition;
      }
    }
    *fActualUnboundedFrame = *fActualUnboundedFrame + fSmallestBPFrameTime;
    result = pkSmallestBP;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007CD490) --------------------------------------------------------
void __thiscall NiTArray<NiPointer<NiInterpController>>::NiTArray<NiPointer<NiInterpController>>(NiTArray<NiPointer<NiInterpController> > *this, unsigned int uiMaxSize, unsigned int uiGrowBy)
{
  NiTArray<NiPointer<NiInterpController> > *v3; // ebx@1
  unsigned int v4; // ecx@2
  unsigned int *v5; // eax@2
  void *v6; // edx@3

  v3 = this;
  this->vfptr = (NiTArray<NiPointer<NiInterpController> >Vtbl *)&NiTArray<NiPointer<NiInterpController>>::`vftable';
  this->m_uiMaxSize = uiMaxSize;
  this->m_uiGrowBy = uiGrowBy;
  this->m_uiSize = 0;
  this->m_uiESize = 0;
  if ( uiMaxSize )
  {
    v4 = 4 * uiMaxSize | -((unsigned __int64)uiMaxSize >> 30 != 0);
    v5 = (unsigned int *)operator new((v4 + 4) | -__CFADD__(v4, 4));
    if ( v5 )
    {
      *v5 = uiMaxSize;
      v6 = v5 + 1;
      if ( ((uiMaxSize - 1) & 0x80000000) == 0 )
      {
        memset(v6, 0, 4 * uiMaxSize);
        v3->m_pBase = (NiPointer<NiInterpController> *)v6;
        return;
      }
    }
    else
    {
      v6 = 0;
    }
    v3->m_pBase = (NiPointer<NiInterpController> *)v6;
  }
  else
  {
    this->m_pBase = 0;
  }
}
// 9E4FD4: using guessed type int (__thiscall *NiTArray<NiPointer<NiInterpController>>::`vftable')(void *p, char);

//----- (007CD520) --------------------------------------------------------
void __thiscall NiTArray<NiPointer<NiInterpController>>::~NiTArray<NiPointer<NiInterpController>>(NiTArray<NiPointer<NiInterpController> > *this)
{
  NiPointer<NiInterpController> *v1; // eax@1
  NiInterpController *v2; // ebx@2
  NiPointer<NiInterpController> *v3; // ecx@2
  int v4; // edi@2
  int v5; // ebx@2
  int v6; // esi@3
  int v7; // [sp+0h] [bp-4h]@2

  v1 = this->m_pBase;
  this->vfptr = (NiTArray<NiPointer<NiInterpController> >Vtbl *)&NiTArray<NiPointer<NiInterpController>>::`vftable';
  if ( v1 )
  {
    v2 = v1[-1].m_pObject;
    v3 = v1 - 1;
    v4 = (int)&v1[(_DWORD)v2];
    v5 = (int)(&v2[-1].m_bForceUpdate + 3);
    v7 = (int)&v1[-1];
    if ( v5 >= 0 )
    {
      do
      {
        v6 = *(_DWORD *)(v4 - 4);
        v4 -= 4;
        if ( v6 && !InterlockedDecrement((volatile LONG *)(v6 + 4)) )
        {
          if ( v6 )
            (**(void (__thiscall ***)(_DWORD, _DWORD))v6)(v6, 1);
        }
        --v5;
      }
      while ( v5 >= 0 );
      v3 = (NiPointer<NiInterpController> *)v7;
    }
    operator delete(v3);
  }
}
// 9E4FD4: using guessed type int (__thiscall *NiTArray<NiPointer<NiInterpController>>::`vftable')(void *p, char);

//----- (007CD580) --------------------------------------------------------
void __thiscall NiTSet<NiPointer<NiActorManager::ChainCompletionInfo>>::~NiTSet<NiPointer<NiActorManager::ChainCompletionInfo>>(NiTSet<NiPointer<NiControllerSequence> > *this)
{
  NiPointer<NiControllerSequence> *v1; // eax@1
  NiControllerSequence *v2; // ebx@2
  NiPointer<NiControllerSequence> *v3; // ecx@2
  int v4; // edi@2
  int v5; // ebx@2
  int v6; // esi@3
  int v7; // [sp+0h] [bp-4h]@2

  v1 = this->m_pBase;
  if ( this->m_pBase )
  {
    v2 = v1[-1].m_pObject;
    v3 = v1 - 1;
    v4 = (int)&v1[(_DWORD)v2];
    v5 = (int)&v2[-1].m_spStringPalette.m_pObject + 3;
    v7 = (int)&v1[-1];
    if ( v5 >= 0 )
    {
      do
      {
        v6 = *(_DWORD *)(v4 - 4);
        v4 -= 4;
        if ( v6 && !InterlockedDecrement((volatile LONG *)(v6 + 4)) )
        {
          if ( v6 )
            (**(void (__thiscall ***)(_DWORD, _DWORD))v6)(v6, 1);
        }
        --v5;
      }
      while ( v5 >= 0 );
      v3 = (NiPointer<NiControllerSequence> *)v7;
    }
    operator delete(v3);
  }
}

//----- (007CD5E0) --------------------------------------------------------
void __thiscall NiTSet<NiPointer<NiActorManager::ChainCompletionInfo>>::Add(NiTSet<NiPointer<NiActorManager::ChainCompletionInfo> > *this, NiPointer<NiActorManager::ChainCompletionInfo> *element)
{
  NiTSet<NiPointer<NiActorManager::ChainCompletionInfo> > *v2; // esi@1
  unsigned int v3; // eax@1
  unsigned int v4; // eax@3
  unsigned int v5; // eax@6
  NiActorManager::ChainCompletionInfo **v6; // edi@6
  NiActorManager::ChainCompletionInfo *v7; // esi@6
  NiActorManager::ChainCompletionInfo *v8; // eax@11

  v2 = this;
  v3 = this->m_uiAlloced;
  if ( this->m_uiUsed == v3 )
  {
    if ( v3 )
      v4 = 2 * v3;
    else
      v4 = 1;
    NiTSet<NiPointer<NiActorManager::ChainCompletionInfo>>::Realloc(
      (NiTSet<NiPointer<NiControllerSequence> > *)this,
      v4);
  }
  v5 = v2->m_uiUsed;
  v6 = &v2->m_pBase[v5].m_pObject;
  v2->m_uiUsed = v5 + 1;
  v7 = *v6;
  if ( *v6 != element->m_pObject )
  {
    if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v8 = element->m_pObject;
    *v6 = element->m_pObject;
    if ( v8 )
      InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  }
}

//----- (007CD660) --------------------------------------------------------
NiTArray<NiPointer<NiInterpController> > *__thiscall NiTArray<NiPointer<NiInterpController>>::`scalar deleting destructor'(NiTArray<NiPointer<NiInterpController> > *this, unsigned int a2)
{
  NiTArray<NiPointer<NiInterpController> > *v2; // esi@1

  v2 = this;
  NiTArray<NiPointer<NiInterpController>>::~NiTArray<NiPointer<NiInterpController>>(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007CD690) --------------------------------------------------------
signed int __thiscall NiKFMTool::IsTransitionAllowed(NiKFMTool *this, unsigned int uiSrcID, unsigned int uiDesID, bool *bAllowed)
{
  signed int result; // eax@3

  if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
         (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_mapSequences,
         uiSrcID,
         (NiVBSet **)&uiSrcID)
    && uiSrcID )
  {
    if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
           (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)(uiSrcID + 12),
           uiDesID,
           (NiVBSet **)&uiSrcID)
      && uiSrcID )
    {
      *bAllowed = 1;
      result = 0;
    }
    else
    {
      *bAllowed = 0;
      result = 0;
    }
  }
  else
  {
    result = 2;
  }
  return result;
}

//----- (007CD6F0) --------------------------------------------------------
void __thiscall NiActorManager::CallbackData::CallbackData(NiActorManager::CallbackData *this, NiActorManager::EventType eEventType, unsigned int eSequenceID, NiTextKeyMatch *pkMatchObject)
{
  NiActorManager::CallbackData *v4; // esi@1

  v4 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v4->vfptr = (NiRefObjectVtbl *)&NiActorManager::CallbackData::`vftable';
  v4->m_eEventType = eEventType;
  v4->m_eSequenceID = eSequenceID;
  v4->m_spMatchObject.m_pObject = 0;
  if ( 0 != pkMatchObject )
  {
    v4->m_spMatchObject.m_pObject = pkMatchObject;
    if ( pkMatchObject )
      InterlockedIncrement((volatile LONG *)&pkMatchObject->m_uiRefCount);
  }
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9E4FDC: using guessed type int (__thiscall *NiActorManager::CallbackData::`vftable')(void *p, char);

//----- (007CD770) --------------------------------------------------------
void __thiscall NiActorManager::CallbackData::~CallbackData(NiActorManager::CallbackData *this)
{
  NiActorManager::CallbackData *v1; // edi@1
  NiTextKeyMatch *v2; // esi@1
  NiTextKeyMatch *v3; // esi@6

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiActorManager::CallbackData::`vftable';
  v2 = this->m_spMatchObject.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spMatchObject.m_pObject = 0;
  }
  v3 = v1->m_spMatchObject.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v1->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9E4FDC: using guessed type int (__thiscall *NiActorManager::CallbackData::`vftable')(void *p, char);

//----- (007CD7E0) --------------------------------------------------------
NiActorManager::CallbackData *__thiscall NiActorManager::CallbackData::`vector deleting destructor'(NiActorManager::CallbackData *this, unsigned int a2)
{
  NiActorManager::CallbackData *v2; // esi@1

  v2 = this;
  NiActorManager::CallbackData::~CallbackData(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007CD810) --------------------------------------------------------
void __stdcall NiTPointerMap<NiObject *,bool>::DeleteItem(NiTMapItem<NiObject *,bool> *pkItem)
{
  bool v2; // zf@1

  pkItem->m_val = 0;
  EnterCriticalSection(&NiTAbstractPoolAllocator<unsigned int>::ms_kCriticalSection);
  dword_B62428 = GetCurrentThreadId();
  ++dword_B6242C;
  pkItem->m_key = 0;
  pkItem->m_pkNext = (NiTMapItem<NiObject *,bool> *)NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem;
  v2 = dword_B6242C-- == 1;
  NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem = (int)pkItem;
  if ( v2 )
    dword_B62428 = 0;
  LeaveCriticalSection(&NiTAbstractPoolAllocator<unsigned int>::ms_kCriticalSection);
}
// B6240C: using guessed type int NiTAbstractPoolAllocator<unsigned int>::ms_pkFreeMem;
// B62428: using guessed type int dword_B62428;
// B6242C: using guessed type int dword_B6242C;

//----- (007CD880) --------------------------------------------------------
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<NiObject *,NiObject *>::`vector deleting destructor'(NiTPointerMap<NiObject *,NiObject *> *this, unsigned int a2)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v2; // esi@1

  v2 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *>Vtbl *)&NiTPointerMap<NiObject *,NiObject *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll((NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this);
  v2->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll(v2);
  operator delete(v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E4EDC: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *>::`vftable')(void *p, char);
// 9E4FE4: using guessed type int (__thiscall *NiTPointerMap<NiObject *,NiObject *>::`vftable')(void *p, char);

//----- (007CD8C0) --------------------------------------------------------
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<NiObject *,bool>::`vector deleting destructor'(NiTPointerMap<NiObject *,bool> *this, unsigned int a2)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v2; // esi@1

  v2 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,bool>Vtbl *)&NiTPointerMap<NiObject *,bool>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll((NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this);
  v2->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,bool>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll(v2);
  operator delete(v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E4EFC: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,bool>::`vftable')(void *p, char);
// 9E5004: using guessed type int (__thiscall *NiTPointerMap<NiObject *,bool>::`vftable')(void *p, char);

//----- (007CD900) --------------------------------------------------------
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<unsigned int,NiKFMTool::Sequence *>::`scalar deleting destructor'(NiTPointerMap<unsigned int,NiKFMTool::Sequence *> *this, unsigned int a2)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v2; // esi@1

  v2 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *>Vtbl *)&NiTPointerMap<unsigned int,NiKFMTool::Sequence *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll((NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this);
  v2->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll(v2);
  operator delete(v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E4F1C: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *>::`vftable')(void *p, char);
// 9E4F6C: using guessed type int (__thiscall *NiTPointerMap<unsigned int,NiKFMTool::Sequence *>::`vftable')(void *p, char);

//----- (007CD940) --------------------------------------------------------
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<unsigned int,NiKFMTool::SequenceGroup *>::`scalar deleting destructor'(NiTPointerMap<unsigned int,NiKFMTool::SequenceGroup *> *this, unsigned int a2)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v2; // esi@1

  v2 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::SequenceGroup *>Vtbl *)&NiTPointerMap<unsigned int,NiKFMTool::SequenceGroup *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll((NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this);
  v2->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::SequenceGroup *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll(v2);
  operator delete(v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E4F3C: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::SequenceGroup *>::`vftable')(void *p, char);
// 9E4F8C: using guessed type int (__thiscall *NiTPointerMap<unsigned int,NiKFMTool::SequenceGroup *>::`vftable')(void *p, char);

//----- (007CD980) --------------------------------------------------------
void __thiscall NiTArray<NiPointer<NiActorManager::CallbackData>>::~NiTArray<NiPointer<NiActorManager::CallbackData>>(NiTArray<NiPointer<NiActorManager::CallbackData> > *this)
{
  NiPointer<NiActorManager::CallbackData> *v1; // eax@1
  NiActorManager::CallbackData *v2; // ebx@2
  NiPointer<NiActorManager::CallbackData> *v3; // ecx@2
  int v4; // edi@2
  int v5; // ebx@2
  int v6; // esi@3
  int v7; // [sp+0h] [bp-4h]@2

  v1 = this->m_pBase;
  this->vfptr = (NiTArray<NiPointer<NiActorManager::CallbackData> >Vtbl *)&NiTArray<NiPointer<NiActorManager::CallbackData>>::`vftable';
  if ( v1 )
  {
    v2 = v1[-1].m_pObject;
    v3 = v1 - 1;
    v4 = (int)&v1[(_DWORD)v2];
    v5 = (int)&v2[-1].m_spMatchObject.m_pObject + 3;
    v7 = (int)&v1[-1];
    if ( v5 >= 0 )
    {
      do
      {
        v6 = *(_DWORD *)(v4 - 4);
        v4 -= 4;
        if ( v6 && !InterlockedDecrement((volatile LONG *)(v6 + 4)) )
        {
          if ( v6 )
            (**(void (__thiscall ***)(_DWORD, _DWORD))v6)(v6, 1);
        }
        --v5;
      }
      while ( v5 >= 0 );
      v3 = (NiPointer<NiActorManager::CallbackData> *)v7;
    }
    operator delete(v3);
  }
}
// 9E4FCC: using guessed type int (__thiscall *NiTArray<NiPointer<NiActorManager::CallbackData>>::`vftable')(void *p, char);

//----- (007CD9E0) --------------------------------------------------------
NiTArray<NiPointer<NiActorManager::CallbackData> > *__thiscall NiTArray<NiPointer<NiActorManager::CallbackData>>::`scalar deleting destructor'(NiTArray<NiPointer<NiActorManager::CallbackData> > *this, unsigned int a2)
{
  NiTArray<NiPointer<NiActorManager::CallbackData> > *v2; // esi@1

  v2 = this;
  NiTArray<NiPointer<NiActorManager::CallbackData>>::~NiTArray<NiPointer<NiActorManager::CallbackData>>(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007CDA10) --------------------------------------------------------
int NiTAbstractPoolAllocator<NiActorManager::TimelineData>::CreateFreeMem()
{
  int v0; // esi@1
  int v1; // ecx@1
  int *v2; // eax@1
  int v3; // ecx@2
  int v4; // edx@2
  _DWORD *v5; // eax@3
  int v6; // ecx@5
  signed int v7; // ecx@7
  signed int v8; // eax@7
  unsigned int v9; // esi@8
  int result; // eax@10

  v0 = NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_uiBlockSize;
  v1 = 28 * NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_uiBlockSize | -(28
                                                                                     * (unsigned __int64)(unsigned int)NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_uiBlockSize >> 32 != 0);
  v2 = (int *)operator new((v1 + 4) | -__CFADD__(v1, 4));
  if ( v2 )
  {
    v3 = v0 - 1;
    *v2 = v0;
    v4 = (int)(v2 + 1);
    if ( v0 - 1 >= 0 )
    {
      v5 = v2 + 6;
      do
      {
        *v5 = 0;
        v5 += 7;
        --v3;
      }
      while ( v3 >= 0 );
    }
    v6 = v4;
  }
  else
  {
    v6 = 0;
  }
  NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkFreeMem = v6;
  *(_DWORD *)(v6 + 28 * NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_uiBlockSize - 28) = 0;
  v7 = 1;
  v8 = 28;
  do
  {
    *(_DWORD *)(v8 + NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkFreeMem) = v8
                                                                                           + NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkFreeMem
                                                                                           + 28;
    v9 = v7++;
    v8 += 28;
  }
  while ( v9 < NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_uiBlockSize - 2 );
  if ( NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkBlockHeader )
  {
    *(_DWORD *)NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkFreeMem = NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkBlockHeader;
    NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkBlockHeader = NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkFreeMem;
    result = NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkFreeMem + 28;
    NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkFreeMem += 28;
  }
  else
  {
    result = NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkFreeMem;
    NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkBlockHeader = NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkFreeMem;
    *(_DWORD *)NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkFreeMem = 0;
    NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkFreeMem += 28;
  }
  return result;
}
// A7B568: using guessed type int NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_uiBlockSize;
// B61844: using guessed type int NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkBlockHeader;
// B61848: using guessed type int NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkFreeMem;

//----- (007CDAF0) --------------------------------------------------------
void __thiscall NiActorManager::NiActorManager(NiActorManager *this, NiKFMTool *pkKFMTool, bool bCumulativeAnimations)
{
  NiActorManager *v3; // esi@1
  char *v4; // eax@3
  unsigned int v5; // ST08_4@3

  v3 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v3->vfptr = (NiRefObjectVtbl *)&NiActorManager::`vftable';
  v3->m_spKFMTool.m_pObject = pkKFMTool;
  if ( pkKFMTool )
    InterlockedIncrement((volatile LONG *)&pkKFMTool->m_uiRefCount);
  v3->m_spNIFRoot.m_pObject = 0;
  v3->m_spManager.m_pObject = 0;
  v3->m_spBoneLOD.m_pObject = 0;
  v3->m_pkCallbackObject = 0;
  v3->m_kChainIDs.m_kAllocator.m_uiCount = 0;
  v3->m_kChainIDs.m_pkHead = 0;
  v3->m_kChainIDs.m_pkTail = 0;
  v3->m_kChainIDs.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,unsigned int>Vtbl *)&NiTPointerList<unsigned int>::`vftable';
  v3->m_kChainDurations.m_kAllocator.m_uiCount = 0;
  v3->m_kChainDurations.m_pkHead = 0;
  v3->m_kChainDurations.m_pkTail = 0;
  v3->m_kChainDurations.vfptr = (NiTListBase<NiTPointerAllocator<unsigned int>,float>Vtbl *)&NiTPointerList<float>::`vftable';
  v3->m_bCumulativeAnimations = bCumulativeAnimations;
  v3->m_kSequenceMap.m_uiHashSize = 37;
  v3->m_kSequenceMap.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *>::`vftable';
  v3->m_kSequenceMap.m_kAllocator.m_uiCount = 0;
  v4 = (char *)operator new(0x94u);
  v5 = 4 * v3->m_kSequenceMap.m_uiHashSize;
  v3->m_kSequenceMap.m_ppkHashTable = (NiTMapItem<unsigned int,NiControllerSequence *> **)v4;
  memset(v4, 0, v5);
  v3->m_kSequenceMap.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *>Vtbl *)&NiTPointerMap<unsigned int,NiControllerSequence *>::`vftable';
  v3->m_kCallbacks.vfptr = (NiTArray<NiPointer<NiActorManager::CallbackData> >Vtbl *)&NiTArray<NiPointer<NiActorManager::CallbackData>>::`vftable';
  v3->m_kCallbacks.m_uiMaxSize = 0;
  v3->m_kCallbacks.m_uiGrowBy = 1;
  v3->m_kCallbacks.m_uiSize = 0;
  v3->m_kCallbacks.m_uiESize = 0;
  v3->m_kCallbacks.m_pBase = 0;
  v3->m_kTimeline.m_kAllocator.m_uiCount = 0;
  v3->m_kTimeline.m_pkHead = 0;
  v3->m_kTimeline.m_pkTail = 0;
  v3->m_kTimeline.vfptr = (NiTListBase<NiTObjectAllocator<NiActorManager::TimelineData>,NiActorManager::TimelineData>Vtbl *)&NiTObjectList<NiActorManager::TimelineData>::`vftable';
  v3->m_kExtraSequences.m_pBase = 0;
  v3->m_kExtraSequences.m_uiAlloced = 0;
  v3->m_kExtraSequences.m_uiUsed = 0;
  NiActorManager::Reset(v3);
  NiTArray<NiPointer<NiScreenElements>>::SetSize(
    (NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *)&v3->m_kCallbacks,
    3u);
  v3->m_kCallbacks.m_uiGrowBy = 3;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 981D0C: using guessed type int (__thiscall *NiTPointerList<unsigned int>::`vftable')(void *p, char);
// 98C154: using guessed type int (__thiscall *NiTPointerList<float>::`vftable')(void *p, char);
// 9E4EA4: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *>::`vftable')(void *p, char);
// 9E4F5C: using guessed type int (__thiscall *NiTObjectList<NiActorManager::TimelineData>::`vftable')(void *p, char);
// 9E4FAC: using guessed type int (__thiscall *NiTPointerMap<unsigned int,NiControllerSequence *>::`vftable')(void *p, char);
// 9E4FCC: using guessed type int (__thiscall *NiTArray<NiPointer<NiActorManager::CallbackData>>::`vftable')(void *p, char);
// 9E5024: using guessed type int (__thiscall *NiActorManager::`vftable')(void *p, char);

//----- (007CDC30) --------------------------------------------------------
void __thiscall NiActorManager::~NiActorManager(NiActorManager *this)
{
  NiActorManager *v1; // esi@1
  unsigned int *v2; // ST00_4@1
  NiBoneLODController *v3; // edi@1
  NiControllerManager *v4; // edi@5
  NiAVObject *v5; // edi@9
  NiKFMTool *v6; // edi@13

  v1 = this;
  v2 = this->m_kExtraSequences.m_pBase;
  this->vfptr = (NiRefObjectVtbl *)&NiActorManager::`vftable';
  operator delete(v2);
  NiTObjectList<NiActorManager::TimelineData>::~NiTObjectList<NiActorManager::TimelineData>(&v1->m_kTimeline);
  NiTArray<NiPointer<NiActorManager::CallbackData>>::~NiTArray<NiPointer<NiActorManager::CallbackData>>(&v1->m_kCallbacks);
  v1->m_kSequenceMap.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *>Vtbl *)&NiTPointerMap<unsigned int,NiControllerSequence *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll((NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v1->m_kSequenceMap);
  v1->m_kSequenceMap.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll((NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v1->m_kSequenceMap);
  operator delete(v1->m_kSequenceMap.m_ppkHashTable);
  NiTPointerList<float>::~NiTPointerList<float>(&v1->m_kChainDurations);
  NiTPointerList<unsigned int>::~NiTPointerList<unsigned int>(&v1->m_kChainIDs);
  v3 = v1->m_spBoneLOD.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  v4 = v1->m_spManager.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v5 = v1->m_spNIFRoot.m_pObject;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  v6 = v1->m_spKFMTool.m_pObject;
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  v1->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9E4EA4: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *>::`vftable')(void *p, char);
// 9E4FAC: using guessed type int (__thiscall *NiTPointerMap<unsigned int,NiControllerSequence *>::`vftable')(void *p, char);
// 9E5024: using guessed type int (__thiscall *NiActorManager::`vftable')(void *p, char);

//----- (007CDD30) --------------------------------------------------------
char __thiscall NiActorManager::ChangeSequence(NiActorManager *this, unsigned int eSequenceID, NiControllerSequence *pkSequence)
{
  NiActorManager *v3; // esi@1
  char v4; // bl@1

  v3 = this;
  NiActorManager::UnloadSequence(this, eSequenceID);
  v4 = NiControllerManager::AddSequence(v3->m_spManager.m_pObject, pkSequence, 0, 1);
  if ( v4 )
    NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::SetAt(
      (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v3->m_kSequenceMap,
      eSequenceID,
      (NiVBSet *)pkSequence);
  return v4;
}

//----- (007CDD70) --------------------------------------------------------
NiActorManager::ChainCompletionInfo *__thiscall NiActorManager::FillChainComplete(NiActorManager *this, unsigned int uiSrcID, unsigned int uiDesID, float fFrameDuration, float *fSrcBeginFrame, float *fTotalTime)
{
  NiActorManager *v6; // esi@1
  char v7; // al@1
  unsigned int v8; // edi@1
  char v9; // al@1
  NiKFMTool::Transition *v10; // ebx@3
  char v11; // al@4
  float *v12; // ecx@6
  double v13; // st7@7
  float fBeginFrame; // ST10_4@10
  NiActorManager::CompletionInfo *v15; // eax@10
  void (__thiscall ***v16)(_DWORD, _DWORD); // esi@13
  float *v17; // eax@16
  float *v18; // esi@16
  const char *v19; // edi@19
  unsigned int v20; // kr00_4@20
  char *v21; // eax@20
  float *v22; // eax@21
  float *v23; // ecx@21
  NiActorManager::CompletionInfo *v24; // edx@21
  double v25; // st7@21
  double v26; // st7@21
  void *v27; // eax@21
  const char *v28; // edi@21
  unsigned int v29; // kr04_4@22
  char *v30; // eax@22
  NiActorManager::CompletionInfo *v31; // edi@23
  volatile LONG *v32; // edx@23
  NiControllerSequence *pkDesSeq; // [sp+14h] [bp-Ch]@1
  NiPointer<NiActorManager::CompletionInfo> spCI; // [sp+1Ch] [bp-4h]@1

  v6 = this;
  v7 = NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
         (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_kSequenceMap,
         uiSrcID,
         (NiVBSet **)&spCI);
  v8 = v7 != 0 ? (unsigned int)spCI.m_pObject : 0;
  v9 = NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
         (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v6->m_kSequenceMap,
         uiDesID,
         (NiVBSet **)&spCI);
  pkDesSeq = (NiControllerSequence *)(v9 != 0 ? (unsigned int)spCI.m_pObject : 0);
  if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
         (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v6->m_spKFMTool.m_pObject->m_mapSequences,
         uiSrcID,
         (NiVBSet **)&spCI)
    && spCI.m_pObject )
  {
    v11 = NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
            (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&spCI.m_pObject->m_fTimeToCompleteTransition,
            uiDesID,
            (NiVBSet **)&spCI);
    v10 = (NiKFMTool::Transition *)(v11 != 0 ? (unsigned int)spCI.m_pObject : 0);
  }
  else
  {
    v10 = 0;
  }
  if ( -1.0 == fFrameDuration )
  {
    v12 = fSrcBeginFrame;
    fFrameDuration = *(float *)(v8 + 48);
    if ( *fSrcBeginFrame <= (double)fFrameDuration )
      goto LABEL_10;
    v13 = *fSrcBeginFrame;
  }
  else
  {
    v13 = fFrameDuration + *fSrcBeginFrame;
    v12 = fSrcBeginFrame;
  }
  fFrameDuration = v13;
LABEL_10:
  fBeginFrame = *v12;
  spCI.m_pObject = 0;
  v15 = NiActorManager::FindTimeForAnimationToCompleteTransition(
          v6,
          (NiPointer<NiActorManager::CompletionInfo> *)&fFrameDuration,
          uiSrcID,
          uiDesID,
          v10,
          fBeginFrame,
          fFrameDuration)->m_pObject;
  if ( v15 )
  {
    spCI.m_pObject = v15;
    InterlockedIncrement((volatile LONG *)&v15->m_uiRefCount);
  }
  if ( fFrameDuration != 0.0 )
  {
    v16 = (void (__thiscall ***)(_DWORD, _DWORD))LODWORD(fFrameDuration);
    if ( !InterlockedDecrement((volatile LONG *)(LODWORD(fFrameDuration) + 4)) )
    {
      if ( v16 )
        (**v16)(v16, 1);
    }
  }
  v17 = (float *)operator new(0x2Cu);
  v18 = v17;
  if ( v17 )
  {
    *(_DWORD *)v17 = &NiRefObject::`vftable';
    *((_DWORD *)v17 + 1) = 0;
    InterlockedIncrement(&NiRefObject::ms_uiObjects);
    *(_DWORD *)v18 = &NiActorManager::ChainCompletionInfo::`vftable';
    *((_DWORD *)v18 + 6) = 0;
    *((_DWORD *)v18 + 7) = 0;
  }
  else
  {
    v18 = 0;
  }
  v19 = *(const char **)(v8 + 8);
  operator delete(*((void **)v18 + 6));
  *((_DWORD *)v18 + 6) = 0;
  if ( v19 )
  {
    v20 = strlen(v19);
    v21 = (char *)operator new(v20 + 1);
    *((_DWORD *)v18 + 6) = v21;
    strcpy_s(v21, v20 + 1, v19);
  }
  v22 = fTotalTime;
  v23 = fSrcBeginFrame;
  v24 = spCI.m_pObject;
  v18[2] = *fTotalTime;
  v18[5] = *v23;
  *(float *)&fTotalTime = v24->m_fTimeToCompleteTransition + *v22;
  v25 = *(float *)&fTotalTime;
  *v22 = *(float *)&fTotalTime;
  v18[3] = v25 - v10->m_fDuration;
  v26 = *v22;
  *((_DWORD *)v18 + 9) = uiSrcID;
  v18[4] = v26;
  v27 = (void *)*((_DWORD *)v18 + 7);
  *((_DWORD *)v18 + 8) = v10;
  *((_DWORD *)v18 + 10) = uiDesID;
  v28 = pkDesSeq->m_pcName;
  operator delete(v27);
  *((_DWORD *)v18 + 7) = 0;
  if ( v28 )
  {
    v29 = strlen(v28);
    v30 = (char *)operator new(v29 + 1);
    *((_DWORD *)v18 + 7) = v30;
    strcpy_s(v30, v29 + 1, v28);
  }
  v31 = spCI.m_pObject;
  v32 = (volatile LONG *)&spCI.m_pObject->m_uiRefCount;
  *fSrcBeginFrame = spCI.m_pObject->m_fFrameInDestWhenTransitionCompletes;
  if ( !InterlockedDecrement(v32) )
    v31->vfptr->__vecDelDtor((NiRefObject *)v31, 1u);
  return (NiActorManager::ChainCompletionInfo *)v18;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9E4ED4: using guessed type int (__thiscall *NiActorManager::ChainCompletionInfo::`vftable')(void *p, char);

//----- (007CDFC0) --------------------------------------------------------
void __thiscall NiCloningProcess::NiCloningProcess(NiCloningProcess *this)
{
  NiCloningProcess *v1; // edi@1
  NiTPointerMap<NiObject *,NiObject *> *v2; // eax@1
  NiTPointerMap<NiObject *,NiObject *> *v3; // esi@1
  char *v4; // eax@2
  unsigned int v5; // ST08_4@2
  NiTPointerMap<NiObject *,bool> *v6; // eax@4
  NiTPointerMap<NiObject *,bool> *v7; // esi@4
  char *v8; // eax@5
  unsigned int v9; // ST08_4@5

  v1 = this;
  v2 = (NiTPointerMap<NiObject *,NiObject *> *)operator new(0x10u);
  v3 = v2;
  if ( v2 )
  {
    v2->m_uiHashSize = 37;
    v2->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *>::`vftable';
    v2->m_kAllocator.m_uiCount = 0;
    v4 = (char *)operator new(0x94u);
    v5 = 4 * v3->m_uiHashSize;
    v3->m_ppkHashTable = (NiTMapItem<NiObject *,NiObject *> **)v4;
    memset(v4, 0, v5);
    v3->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *>Vtbl *)&NiTPointerMap<NiObject *,NiObject *>::`vftable';
  }
  else
  {
    v3 = 0;
  }
  v1->m_pkCloneMap = v3;
  v6 = (NiTPointerMap<NiObject *,bool> *)operator new(0x10u);
  v7 = v6;
  if ( v6 )
  {
    v6->m_uiHashSize = 37;
    v6->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,bool>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,bool>::`vftable';
    v6->m_kAllocator.m_uiCount = 0;
    v8 = (char *)operator new(0x94u);
    v9 = 4 * v7->m_uiHashSize;
    v7->m_ppkHashTable = (NiTMapItem<NiObject *,bool> **)v8;
    memset(v8, 0, v9);
    v7->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,bool>Vtbl *)&NiTPointerMap<NiObject *,bool>::`vftable';
  }
  else
  {
    v7 = 0;
  }
  v1->m_pkProcessMap = v7;
  v1->m_eCopyType = NiObjectNET::ms_eCopyType;
  v1->m_cAppendChar = NiObjectNET::ms_cAppendCharacter;
}
// 9E4EDC: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *>::`vftable')(void *p, char);
// 9E4EFC: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,bool>::`vftable')(void *p, char);
// 9E4FE4: using guessed type int (__thiscall *NiTPointerMap<NiObject *,NiObject *>::`vftable')(void *p, char);
// 9E5004: using guessed type int (__thiscall *NiTPointerMap<NiObject *,bool>::`vftable')(void *p, char);
// A7CF26: using guessed type char NiObjectNET::ms_cAppendCharacter;
// B6227C: using guessed type enum NiObjectNET::CopyType NiObjectNET::ms_eCopyType;

//----- (007CE0A0) --------------------------------------------------------
void __thiscall NiKFMTool::NiKFMTool(NiKFMTool *this, const char *pcBaseKFMPath)
{
  NiKFMTool *v2; // esi@1
  char *v3; // eax@1
  unsigned int v4; // ST1C_4@1
  char *v5; // eax@1
  unsigned int v6; // ST0C_4@1
  unsigned int v7; // kr00_4@2
  char *v8; // eax@2
  float *v9; // eax@3
  float *v10; // eax@6

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  this->m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  v2->vfptr = (NiRefObjectVtbl *)&NiKFMTool::`vftable';
  v2->m_pcBaseKFMPath = 0;
  v2->m_pcFullPathBuffer = 0;
  v2->m_pcModelPath = 0;
  v2->m_pcModelRoot = 0;
  v2->m_mapSequences.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *>::`vftable';
  v2->m_mapSequences.m_uiHashSize = 37;
  v2->m_mapSequences.m_kAllocator.m_uiCount = 0;
  v3 = (char *)operator new(0x94u);
  v4 = 4 * v2->m_mapSequences.m_uiHashSize;
  v2->m_mapSequences.m_ppkHashTable = (NiTMapItem<unsigned int,NiKFMTool::Sequence *> **)v3;
  memset(v3, 0, v4);
  v2->m_mapSequences.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *>Vtbl *)&NiTPointerMap<unsigned int,NiKFMTool::Sequence *>::`vftable';
  v2->m_mapSequenceGroups.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::SequenceGroup *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::SequenceGroup *>::`vftable';
  v2->m_mapSequenceGroups.m_uiHashSize = 37;
  v2->m_mapSequenceGroups.m_kAllocator.m_uiCount = 0;
  v5 = (char *)operator new(0x94u);
  v6 = 4 * v2->m_mapSequenceGroups.m_uiHashSize;
  v2->m_mapSequenceGroups.m_ppkHashTable = (NiTMapItem<unsigned int,NiKFMTool::SequenceGroup *> **)v5;
  memset(v5, 0, v6);
  v2->m_mapSequenceGroups.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::SequenceGroup *>Vtbl *)&NiTPointerMap<unsigned int,NiKFMTool::SequenceGroup *>::`vftable';
  operator delete(v2->m_pcBaseKFMPath);
  v2->m_pcBaseKFMPath = 0;
  if ( pcBaseKFMPath )
  {
    v7 = strlen(pcBaseKFMPath);
    v8 = (char *)operator new(v7 + 1);
    v2->m_pcBaseKFMPath = v8;
    strcpy_s(v8, v7 + 1, pcBaseKFMPath);
  }
  v9 = (float *)operator new(0x24u);
  if ( v9 )
  {
    *(_DWORD *)v9 = 1;
    v9[1] = 0.25;
    *((_DWORD *)v9 + 2) = 0;
    *((_DWORD *)v9 + 3) = 0;
    *((_DWORD *)v9 + 4) = 0;
    *((_DWORD *)v9 + 5) = 0;
    *((_DWORD *)v9 + 6) = 0;
    *((_DWORD *)v9 + 7) = 0;
    *((_DWORD *)v9 + 8) = 6;
  }
  else
  {
    v9 = 0;
  }
  v2->m_pkDefaultSyncTrans = (NiKFMTool::Transition *)v9;
  *((_DWORD *)v9 + 8) = 4;
  v10 = (float *)operator new(0x24u);
  if ( v10 )
  {
    *(_DWORD *)v10 = 2;
    v10[1] = 0.25;
    *((_DWORD *)v10 + 2) = 0;
    *((_DWORD *)v10 + 3) = 0;
    *((_DWORD *)v10 + 4) = 0;
    *((_DWORD *)v10 + 5) = 0;
    *((_DWORD *)v10 + 6) = 0;
    *((_DWORD *)v10 + 7) = 0;
    *((_DWORD *)v10 + 8) = 6;
    v2->m_pkDefaultNonSyncTrans = (NiKFMTool::Transition *)v10;
    *((_DWORD *)v10 + 8) = 5;
  }
  else
  {
    v2->m_pkDefaultNonSyncTrans = 0;
    v20 = 5;
  }
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9E4F1C: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *>::`vftable')(void *p, char);
// 9E4F3C: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::SequenceGroup *>::`vftable')(void *p, char);
// 9E4F6C: using guessed type int (__thiscall *NiTPointerMap<unsigned int,NiKFMTool::Sequence *>::`vftable')(void *p, char);
// 9E4F8C: using guessed type int (__thiscall *NiTPointerMap<unsigned int,NiKFMTool::SequenceGroup *>::`vftable')(void *p, char);
// 9E5034: using guessed type int (__thiscall *NiKFMTool::`vftable')(void *p, char);

//----- (007CE240) --------------------------------------------------------
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Transition *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Transition *>::`vector deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Transition *> *this, unsigned int a2)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Transition *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Transition *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Transition *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll((NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this);
  operator delete(v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E503C: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Transition *>::`vftable')(void *p, char);

//----- (007CE280) --------------------------------------------------------
void __thiscall NiKFMTool::Transition::ClearBlendPairs(NiKFMTool::Transition *this)
{
  NiKFMTool::Transition *v1; // esi@1
  unsigned int v2; // ebx@1
  NiKFMTool::Transition::BlendPair *v3; // edi@2

  v1 = this;
  v2 = 0;
  if ( this->m_aBlendPairs.m_uiUsed )
  {
    do
    {
      v3 = v1->m_aBlendPairs.m_pBase[v2];
      if ( v3 )
      {
        operator delete(v3->m_pcStartKey);
        operator delete(v3->m_pcTargetKey);
        operator delete(v3);
      }
      ++v2;
    }
    while ( v2 < v1->m_aBlendPairs.m_uiUsed );
    v1->m_aBlendPairs.m_uiUsed = 0;
  }
  else
  {
    this->m_aBlendPairs.m_uiUsed = 0;
  }
}

//----- (007CE2D0) --------------------------------------------------------
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<unsigned int,NiKFMTool::Transition *>::`scalar deleting destructor'(NiTPointerMap<unsigned int,NiKFMTool::Transition *> *this, unsigned int a2)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v2; // esi@1

  v2 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Transition *>Vtbl *)&NiTPointerMap<unsigned int,NiKFMTool::Transition *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll((NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this);
  v2->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Transition *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll(v2);
  operator delete(v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E503C: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Transition *>::`vftable')(void *p, char);
// 9E505C: using guessed type int (__thiscall *NiTPointerMap<unsigned int,NiKFMTool::Transition *>::`vftable')(void *p, char);

//----- (007CE310) --------------------------------------------------------
NiActorManager *__thiscall NiActorManager::`scalar deleting destructor'(NiActorManager *this, unsigned int a2)
{
  NiActorManager *v2; // esi@1

  v2 = this;
  NiActorManager::~NiActorManager(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007CE340) --------------------------------------------------------
NiActorManager *__thiscall NiActorManager::Clone(NiActorManager *this)
{
  NiActorManager *v1; // edi@1
  NiObject *v2; // ecx@1
  NiAVObject *v3; // ebx@1
  NiActorManager *v4; // eax@1
  NiActorManager *v5; // eax@2
  NiAVObject *v6; // esi@4
  NiControllerManager *v7; // esi@11
  NiControllerManager *v8; // ebx@11
  NiBoneLODController *v9; // ebx@18
  NiBoneLODController *v10; // esi@18
  unsigned int v11; // ecx@25
  unsigned int v12; // eax@25
  NiTMapItem<unsigned int,NiControllerSequence *> **v13; // edx@26
  NiTMapItem<unsigned int,NiControllerSequence *> *v14; // eax@29
  unsigned int v15; // ecx@34
  NiControllerSequence *v16; // ebx@34
  NiTMapItem<unsigned int,NiControllerSequence *> *v17; // eax@34
  int v18; // eax@36
  unsigned int v19; // edx@36
  unsigned int v20; // eax@36
  void **v21; // ecx@37
  NiControllerManager *v22; // esi@41
  const char *v23; // ebx@41
  unsigned int (__thiscall *v24)(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int> *, const char *); // edx@41
  NiTMapItem<char const *,unsigned int> *v25; // edi@41
  NiVBSet *v26; // eax@44
  unsigned int v27; // eax@46
  NiActorManager::CallbackData *v28; // esi@47
  NiCloningProcess kCloning; // [sp+Ch] [bp-24h]@1
  unsigned int key; // [sp+1Ch] [bp-14h]@34
  NiControllerManager *v32; // [sp+20h] [bp-10h]@41
  unsigned int ui; // [sp+24h] [bp-Ch]@1
  void *kIter; // [sp+28h] [bp-8h]@1
  NiActorManager *pkActorManager; // [sp+2Ch] [bp-4h]@2

  v1 = this;
  ui = (unsigned int)this;
  NiCloningProcess::NiCloningProcess(&kCloning);
  v2 = (NiObject *)&v1->m_spNIFRoot.m_pObject->vfptr;
  kCloning.m_eCopyType = 1;
  v3 = (NiAVObject *)NiObject::Clone(v2, &kCloning);
  kIter = NiActorManager::FindControllerManager(v1, v3);
  v4 = (NiActorManager *)operator new(0xBCu);
  if ( v4 )
  {
    NiActorManager::NiActorManager(v4, v1->m_spKFMTool.m_pObject, v1->m_bCumulativeAnimations);
    pkActorManager = v5;
  }
  else
  {
    pkActorManager = 0;
  }
  v6 = pkActorManager->m_spNIFRoot.m_pObject;
  if ( v6 != v3 )
  {
    if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    pkActorManager->m_spNIFRoot.m_pObject = v3;
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
  }
  v7 = pkActorManager->m_spManager.m_pObject;
  v8 = (NiControllerManager *)kIter;
  if ( v7 != kIter )
  {
    if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    pkActorManager->m_spManager.m_pObject = v8;
    if ( v8 )
      InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  }
  v9 = NiActorManager::FindBoneLODController(v1, pkActorManager->m_spNIFRoot.m_pObject);
  v10 = pkActorManager->m_spBoneLOD.m_pObject;
  if ( v10 != v9 )
  {
    if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    pkActorManager->m_spBoneLOD.m_pObject = v9;
    if ( v9 )
      InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  }
  pkActorManager->m_pkCallbackObject = v1->m_pkCallbackObject;
  v11 = v1->m_kSequenceMap.m_uiHashSize;
  v12 = 0;
  if ( v11 )
  {
    v13 = v1->m_kSequenceMap.m_ppkHashTable;
    while ( !*v13 )
    {
      ++v12;
      ++v13;
      if ( v12 >= v11 )
        goto LABEL_29;
    }
    v14 = v1->m_kSequenceMap.m_ppkHashTable[v12];
  }
  else
  {
LABEL_29:
    v14 = 0;
  }
  if ( v14 )
  {
    while ( 1 )
    {
      v15 = v14->m_key;
      v16 = v14->m_val;
      v17 = v14->m_pkNext;
      key = v15;
      if ( v17 )
      {
        kIter = v17;
      }
      else
      {
        v18 = v1->m_kSequenceMap.vfptr->KeyToHashIndex(
                (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *> *)&v1->m_kSequenceMap,
                v15);
        v19 = v1->m_kSequenceMap.m_uiHashSize;
        v20 = v18 + 1;
        if ( v20 >= v19 )
        {
LABEL_40:
          kIter = 0;
        }
        else
        {
          v21 = (void **)&v1->m_kSequenceMap.m_ppkHashTable[v20];
          while ( !*v21 )
          {
            ++v20;
            ++v21;
            if ( v20 >= v19 )
              goto LABEL_40;
          }
          kIter = *v21;
        }
      }
      v22 = pkActorManager->m_spManager.m_pObject;
      v23 = v16->m_pcName;
      v24 = v22->m_kIndexMap.vfptr->KeyToHashIndex;
      v32 = pkActorManager->m_spManager.m_pObject;
      v25 = v22->m_kIndexMap.m_ppkHashTable[v24(
                                              (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int> *)&v22->m_kIndexMap.vfptr,
                                              v23)];
      if ( v25 )
      {
        while ( !v22->m_kIndexMap.vfptr->IsKeysEqual(
                   (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int> *)&v22->m_kIndexMap,
                   v23,
                   v25->m_key) )
        {
          v25 = v25->m_pkNext;
          if ( !v25 )
            goto LABEL_44;
        }
        v26 = (NiVBSet *)v32->m_kSequenceArray.m_pBase[v25->m_val].m_pObject;
      }
      else
      {
LABEL_44:
        v26 = 0;
      }
      NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::SetAt(
        (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&pkActorManager->m_kSequenceMap,
        key,
        v26);
      v1 = (NiActorManager *)ui;
      if ( !kIter )
        break;
      v14 = (NiTMapItem<unsigned int,NiControllerSequence *> *)kIter;
    }
  }
  v27 = 0;
  ui = 0;
  if ( v1->m_kCallbacks.m_uiSize )
  {
    do
    {
      v28 = v1->m_kCallbacks.m_pBase[v27].m_pObject;
      if ( v28 )
      {
        key = (unsigned int)v1->m_kCallbacks.m_pBase[v27].m_pObject;
        InterlockedIncrement((volatile LONG *)&v28->m_uiRefCount);
        NiTArray<NiPointer<NiControllerSequence>>::AddFirstEmpty(
          (NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *)&pkActorManager->m_kCallbacks,
          (NiPointer<NiD3DShaderConstantMapEntry> *)&key);
        if ( !InterlockedDecrement((volatile LONG *)&v28->m_uiRefCount) )
          v28->vfptr->__vecDelDtor((NiRefObject *)v28, 1u);
      }
      v27 = ui + 1;
      ui = v27;
    }
    while ( v27 < v1->m_kCallbacks.m_uiSize );
  }
  if ( kCloning.m_pkCloneMap )
    ((void (__stdcall *)(signed int))kCloning.m_pkCloneMap->vfptr->__vecDelDtor)(1);
  if ( kCloning.m_pkProcessMap )
    ((void (__stdcall *)(signed int))kCloning.m_pkProcessMap->vfptr->__vecDelDtor)(1);
  return pkActorManager;
}

//----- (007CE610) --------------------------------------------------------
char __thiscall NiActorManager::RegisterCallback(NiActorManager *this, NiActorManager::EventType eEventType, unsigned int eSequenceID, NiTextKeyMatch *pkMatchObject)
{
  NiActorManager::EventType v4; // ebx@1
  NiTextKeyMatch *v5; // esi@2
  unsigned int v7; // edi@5
  NiActorManager::CallbackData *v8; // eax@5
  NiActorManager::EventType v9; // eax@6
  NiActorManager::EventType v10; // esi@6
  NiActorManager *v11; // [sp+8h] [bp-4h]@1

  v4 = eEventType;
  v11 = this;
  if ( eEventType == 2 )
  {
    v5 = pkMatchObject;
    if ( !pkMatchObject )
      return 0;
  }
  else
  {
    v5 = 0;
  }
  v7 = eSequenceID;
  NiActorManager::UnregisterCallback(this, eEventType, eSequenceID, v5);
  v8 = (NiActorManager::CallbackData *)operator new(0x14u);
  if ( v8 )
  {
    NiActorManager::CallbackData::CallbackData(v8, v4, v7, v5);
    v10 = v9;
  }
  else
  {
    v10 = 0;
  }
  eEventType = v10;
  if ( v10 )
    InterlockedIncrement((volatile LONG *)(v10 + 4));
  NiTArray<NiPointer<NiControllerSequence>>::AddFirstEmpty(
    (NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *)&v11->m_kCallbacks,
    (NiPointer<NiD3DShaderConstantMapEntry> *)&eEventType);
  if ( v10 )
  {
    if ( !InterlockedDecrement((volatile LONG *)(v10 + 4)) )
      (**(void (__thiscall ***)(_DWORD, _DWORD))v10)(v10, 1);
  }
  v11->m_bBuildTimeline = 1;
  return 1;
}

//----- (007CE6B0) --------------------------------------------------------
char __userpurge NiActorManager::ChangeNIFRoot@<al>(NiActorManager *this@<ecx>, int a2@<ebx>, NiAVObject *pkNIFRoot)
{
  NiAVObject *v3; // esi@1
  NiActorManager *v4; // edi@1
  char v5; // al@2
  char *v6; // eax@3
  NiAVObject *v7; // ebx@4
  NiControllerManager *v8; // eax@6
  NiControllerManager *v9; // eax@7
  NiControllerManager *v10; // eax@9
  unsigned int v11; // ecx@10
  NiControllerSequence *v12; // ebx@11
  unsigned int v13; // esi@12
  NiD3DShaderConstantMapEntry *v14; // esi@16
  unsigned int v15; // edi@18
  NiControllerSequence *v16; // edi@26
  unsigned int v17; // eax@30
  NiInterpController *v18; // edi@32
  NiControllerSequence::InterpArrayItem *v19; // edx@32
  NiInterpController *v20; // esi@32
  NiInterpController **v21; // ebx@32
  NiAVObject *v22; // ebx@46
  NiControllerManager *v23; // esi@52
  NiControllerManager *v24; // ebx@52
  NiBoneLODController *v25; // eax@59
  NiBoneLODController *v26; // esi@59
  NiBoneLODController *v27; // ebx@59
  NiTArray<NiPointer<NiInterpController> > kCtlrs; // [sp+8h] [bp-3Ch]@10
  NiPointer<NiControllerSequence> result; // [sp+20h] [bp-24h]@25
  NiPointer<NiD3DShaderConstantMapEntry> element; // [sp+24h] [bp-20h]@16
  unsigned int ui; // [sp+28h] [bp-1Ch]@10
  NiPointer<NiControllerSequence> spSequence; // [sp+2Ch] [bp-18h]@11
  unsigned int uiCtlrCount; // [sp+30h] [bp-14h]@12
  unsigned int uiCtlr; // [sp+34h] [bp-10h]@15
  NiControllerManager *pkManager; // [sp+38h] [bp-Ch]@7
  unsigned int v36; // [sp+3Ch] [bp-8h]@15
  NiActorManager *v37; // [sp+40h] [bp-4h]@1

  v3 = pkNIFRoot;
  v4 = this;
  v37 = this;
  if ( pkNIFRoot && (v6 = this->m_spKFMTool.m_pObject->m_pcModelRoot) != 0 )
  {
    v7 = (NiAVObject *)((int (__thiscall *)(NiAVObject *, char *, int))pkNIFRoot->vfptr[18].__vecDelDtor)(
                         pkNIFRoot,
                         v6,
                         a2);
    if ( v7 )
    {
      NiActorManager::Reset(v4);
      v8 = (NiControllerManager *)operator new(0x7Cu);
      if ( v8 )
      {
        NiControllerManager::NiControllerManager(v8, v7, v4->m_bCumulativeAnimations);
        pkManager = v9;
      }
      else
      {
        pkManager = 0;
      }
      v10 = v4->m_spManager.m_pObject;
      if ( v10 )
      {
        v11 = 0;
        kCtlrs.vfptr = (NiTArray<NiPointer<NiInterpController> >Vtbl *)&NiTArray<NiPointer<NiInterpController>>::`vftable';
        kCtlrs.m_uiMaxSize = 0;
        kCtlrs.m_uiGrowBy = 1;
        kCtlrs.m_uiSize = 0;
        kCtlrs.m_uiESize = 0;
        kCtlrs.m_pBase = 0;
        for ( ui = 0; v11 < v10->m_kSequenceArray.m_uiSize; ui = v11 )
        {
          v12 = v10->m_kSequenceArray.m_pBase[v11].m_pObject;
          spSequence.m_pObject = v12;
          if ( v12 )
          {
            InterlockedIncrement((volatile LONG *)&v12->m_uiRefCount);
            uiCtlrCount = v12->m_uiArraySize;
            v13 = uiCtlrCount;
            NiTArray<NiPointer<NiD3DXEffectTechnique>>::RemoveAll((NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *)&kCtlrs);
            if ( v13 > kCtlrs.m_uiMaxSize )
              NiTArray<NiPointer<NiScreenElements>>::SetSize(
                (NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *)&kCtlrs,
                v13);
            if ( v13 )
            {
              v36 = 0;
              uiCtlr = v13;
              do
              {
                v14 = (NiD3DShaderConstantMapEntry *)v12->m_pkInterpArray[v36 / 0x10].m_spInterpCtlr.m_pObject;
                element.m_pObject = v14;
                if ( v14 )
                  InterlockedIncrement((volatile LONG *)&v14->m_uiRefCount);
                v15 = kCtlrs.m_uiSize;
                if ( kCtlrs.m_uiSize >= kCtlrs.m_uiMaxSize )
                  NiTArray<NiPointer<NiScreenElements>>::SetSize(
                    (NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *)&kCtlrs,
                    kCtlrs.m_uiGrowBy + kCtlrs.m_uiSize);
                NiTArray<NiPointer<NiActorManager::CallbackData>>::SetAt(
                  (NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *)&kCtlrs,
                  v15,
                  &element);
                if ( v14 && !InterlockedDecrement((volatile LONG *)&v14->m_uiRefCount) )
                  v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
                v36 += 16;
                --uiCtlr;
              }
              while ( uiCtlr );
              v13 = uiCtlrCount;
              v4 = v37;
            }
            NiControllerManager::RemoveSequence(v4->m_spManager.m_pObject, &result, v12);
            if ( result.m_pObject )
            {
              v16 = result.m_pObject;
              if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) && v16 )
                v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
              v4 = v37;
            }
            v17 = 0;
            uiCtlr = 0;
            if ( v13 )
            {
              v36 = 0;
              do
              {
                v18 = kCtlrs.m_pBase[v17].m_pObject;
                v19 = v12->m_pkInterpArray;
                v20 = v19[v36 / 0x10].m_spInterpCtlr.m_pObject;
                v21 = &v19[v36 / 0x10].m_spInterpCtlr.m_pObject;
                if ( v20 != v18 )
                {
                  if ( v20 && !InterlockedDecrement((volatile LONG *)&v20->m_uiRefCount) && v20 )
                    v20->vfptr->__vecDelDtor((NiRefObject *)v20, 1u);
                  *v21 = v18;
                  if ( v18 )
                    InterlockedIncrement((volatile LONG *)&v18->m_uiRefCount);
                }
                v36 += 16;
                v12 = spSequence.m_pObject;
                v17 = uiCtlr + 1;
                uiCtlr = v17;
              }
              while ( v17 < uiCtlrCount );
              v4 = v37;
            }
            NiControllerManager::AddSequence(pkManager, v12, 0, 1);
            if ( !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) )
              v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
            v3 = pkNIFRoot;
          }
          v10 = v4->m_spManager.m_pObject;
          v11 = ui + 1;
        }
        NiTArray<NiPointer<NiInterpController>>::~NiTArray<NiPointer<NiInterpController>>(&kCtlrs);
      }
      v22 = v4->m_spNIFRoot.m_pObject;
      if ( v22 != v3 )
      {
        if ( v22 && !InterlockedDecrement((volatile LONG *)&v22->m_uiRefCount) && v22 )
          v22->vfptr->__vecDelDtor((NiRefObject *)v22, 1u);
        v4->m_spNIFRoot.m_pObject = v3;
        InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
      }
      v23 = v4->m_spManager.m_pObject;
      v24 = pkManager;
      if ( v23 != pkManager )
      {
        if ( v23 && !InterlockedDecrement((volatile LONG *)&v23->m_uiRefCount) && v23 )
          v23->vfptr->__vecDelDtor((NiRefObject *)v23, 1u);
        v4->m_spManager.m_pObject = v24;
        if ( v24 )
          InterlockedIncrement((volatile LONG *)&v24->m_uiRefCount);
      }
      v25 = NiActorManager::FindBoneLODController(v4, v4->m_spNIFRoot.m_pObject);
      v26 = v4->m_spBoneLOD.m_pObject;
      v27 = v25;
      if ( v26 != v25 )
      {
        if ( v26 && !InterlockedDecrement((volatile LONG *)&v26->m_uiRefCount) && v26 )
          v26->vfptr->__vecDelDtor((NiRefObject *)v26, 1u);
        v4->m_spBoneLOD.m_pObject = v27;
        if ( v27 )
          InterlockedIncrement((volatile LONG *)&v27->m_uiRefCount);
      }
      v5 = 1;
    }
    else
    {
      v5 = 0;
    }
  }
  else
  {
    v5 = 0;
  }
  return v5;
}
// 9E4FD4: using guessed type int (__thiscall *NiTArray<NiPointer<NiInterpController>>::`vftable')(void *p, char);

//----- (007CE9C0) --------------------------------------------------------
NiPointer<NiActorManager::CompletionInfo> *__thiscall NiActorManager::FindTimeForAnimationToCompleteTransition(NiActorManager *this, NiPointer<NiActorManager::CompletionInfo> *result, unsigned int uiTransSrcID, unsigned int uiTransDesID, NiKFMTool::Transition *pkTransition, float fBeginFrame, float fDesiredTransitionFrame)
{
  NiActorManager *v7; // edi@1
  NiActorManager::CompletionInfo *v8; // eax@1
  NiActorManager::CompletionInfo *v9; // ebx@1
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v10; // edi@6
  char v11; // al@6
  NiControllerSequence *v12; // esi@6
  int v13; // edi@6
  NiKFMTool::Transition *v14; // eax@6
  NiControllerSequence *v15; // edi@6
  unsigned int v16; // edx@7
  char *v17; // ecx@10
  NiKFMTool::Transition::BlendPair *v18; // eax@13
  const char *v19; // eax@15
  const char *v20; // eax@17
  double v21; // st7@20
  double v22; // st6@21
  double v23; // st6@23
  double v24; // ST20_8@24
  double v25; // st7@26
  double v26; // st7@26
  double v27; // ST20_8@29
  unsigned int v28; // ecx@31
  NiKFMTool::Transition::ChainInfo *v29; // eax@34
  unsigned int v30; // ebx@34
  char v31; // al@34
  unsigned int v32; // esi@34
  NiActorManager::ChainCompletionInfo *v33; // edi@34
  double v34; // st7@40
  NiActorManager::ChainCompletionInfo *v35; // eax@44
  NiActorManager::ChainCompletionInfo *v36; // esi@44
  char v37; // al@49
  int v38; // eax@49
  double v39; // st7@49
  NiActorManager::CompletionInfo *v40; // esi@54
  NiControllerSequence *pkDesSequence; // [sp+20h] [bp-28h]@6
  unsigned int uiChainInfoSize; // [sp+24h] [bp-24h]@31
  NiKFMTool::Transition::ChainInfo *pkChainInfo; // [sp+28h] [bp-20h]@34
  NiVBSet *val; // [sp+2Ch] [bp-1Ch]@34
  NiPointer<NiActorManager::CompletionInfo> spCompletionInfo; // [sp+30h] [bp-18h]@4
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v47; // [sp+34h] [bp-14h]@6
  NiActorManager *v48; // [sp+38h] [bp-10h]@1
  float fSrcBeginFrame; // [sp+3Ch] [bp-Ch]@6
  NiActorManager::CompletionInfo *v50; // [sp+40h] [bp-8h]@2
  float fTotalTime; // [sp+44h] [bp-4h]@31
  float uiSrcID; // [sp+54h] [bp+Ch]@20
  float fPartialDestSeqFrameLength; // [sp+58h] [bp+10h]@20
  NiKFMTool::Transition *pkTransitiona; // [sp+5Ch] [bp+14h]@24
  NiKFMTool::Transition *pkTransitionb; // [sp+5Ch] [bp+14h]@24
  NiKFMTool::Transition *pkTransitionc; // [sp+5Ch] [bp+14h]@24

  v7 = this;
  v48 = this;
  v8 = (NiActorManager::CompletionInfo *)operator new(0x28u);
  v9 = v8;
  if ( v8 )
  {
    v8->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
    v8->m_uiRefCount = 0;
    InterlockedIncrement(&NiRefObject::ms_uiObjects);
    v9->vfptr = (NiRefObjectVtbl *)&NiActorManager::CompletionInfo::`vftable';
    v9->m_kChainCompletionInfoSet.m_pBase = 0;
    v9->m_kChainCompletionInfoSet.m_uiAlloced = 0;
    v9->m_kChainCompletionInfoSet.m_uiUsed = 0;
    v50 = v9;
  }
  else
  {
    v50 = 0;
    v9 = 0;
  }
  spCompletionInfo.m_pObject = v9;
  if ( v9 )
    InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  v10 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v7->m_kSequenceMap;
  v47 = v10;
  v11 = NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
          v10,
          uiTransSrcID,
          (NiVBSet **)&fSrcBeginFrame);
  v12 = (NiControllerSequence *)(v11 != 0 ? LODWORD(fSrcBeginFrame) : 0);
  v13 = (unsigned __int8)NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
                           v10,
                           uiTransDesID,
                           (NiVBSet **)&fSrcBeginFrame);
  v14 = pkTransition;
  v15 = (NiControllerSequence *)(v13 != 0 ? LODWORD(fSrcBeginFrame) : 0);
  pkDesSequence = v15;
  switch ( pkTransition->m_eType )
  {
    case 0:
      v16 = pkTransition->m_aBlendPairs.m_uiUsed;
      if ( v16 && (v16 != 1 || **(_DWORD **)pkTransition->m_aBlendPairs.m_pBase) )
      {
        fSrcBeginFrame = 0.0;
        v18 = NiActorManager::GetNextBlendPair(
                v48,
                uiTransSrcID,
                uiTransDesID,
                pkTransition,
                fDesiredTransitionFrame,
                &fSrcBeginFrame);
        fDesiredTransitionFrame = *(float *)&v18;
        v9->m_pkBlendPair = v18;
        if ( v18 )
        {
          v19 = v18->m_pcStartKey;
          if ( !v19 )
            v19 = "start";
          v9->m_fFrameTransitionOccursInSrc = NiControllerSequence::GetKeyTimeAt(v12, v19);
          v20 = *(const char **)(LODWORD(fDesiredTransitionFrame) + 4);
          if ( !v20 )
            v20 = "start";
          v9->m_fFrameInDestWhenTransitionCompletes = NiControllerSequence::GetKeyTimeAt(v15, v20);
          fBeginFrame = fSrcBeginFrame - fBeginFrame;
          fBeginFrame = fBeginFrame / v12->m_fFrequency;
          v9->m_fTimeToCompleteTransition = fBeginFrame + pkTransition->m_fDuration;
        }
        else
        {
          v9->m_fFrameTransitionOccursInSrc = v12->m_fEndKeyTime;
          v9->m_fFrameInDestWhenTransitionCompletes = v15->m_fBeginKeyTime;
          fBeginFrame = fSrcBeginFrame - fBeginFrame;
          fBeginFrame = fBeginFrame / v12->m_fFrequency;
          v9->m_fTimeToCompleteTransition = fBeginFrame + pkTransition->m_fDuration;
        }
      }
      else
      {
        v17 = "start";
        fBeginFrame = fDesiredTransitionFrame - fBeginFrame;
        if ( v16 == 1 )
          v17 = (*pkTransition->m_aBlendPairs.m_pBase)->m_pcTargetKey;
        v9->m_fFrameInDestWhenTransitionCompletes = NiControllerSequence::GetKeyTimeAt(v15, v17);
        fBeginFrame = fBeginFrame / v12->m_fFrequency;
        v9->m_fTimeToCompleteTransition = fBeginFrame + pkTransition->m_fDuration;
        v9->m_fFrameTransitionOccursInSrc = fDesiredTransitionFrame;
      }
      break;
    case 1:
      v21 = fDesiredTransitionFrame;
      v9->m_fFrameTransitionOccursInSrc = fDesiredTransitionFrame;
      fDesiredTransitionFrame = v21 - fBeginFrame;
      fDesiredTransitionFrame = fDesiredTransitionFrame / v12->m_fFrequency;
      v9->m_fTimeToCompleteTransition = fDesiredTransitionFrame + pkTransition->m_fDuration;
      fDesiredTransitionFrame = v21 / v12->m_fFrequency;
      uiSrcID = NiControllerSequence::FindCorrespondingMorphFrame(v15, v12, fDesiredTransitionFrame);
      fPartialDestSeqFrameLength = v15->m_fEndKeyTime - uiSrcID;
      fDesiredTransitionFrame = pkTransition->m_fDuration;
      if ( -1.0 == fDesiredTransitionFrame )
        v22 = v15->m_fEndKeyTime - v15->m_fBeginKeyTime - fBeginFrame;
      else
        v22 = fDesiredTransitionFrame * v15->m_fFrequency;
      fBeginFrame = v22;
      v23 = fBeginFrame;
      if ( fPartialDestSeqFrameLength >= (double)fBeginFrame )
      {
        v9->m_fFrameInDestWhenTransitionCompletes = uiSrcID + v23;
      }
      else
      {
        fDesiredTransitionFrame = v15->m_fEndKeyTime - v15->m_fBeginKeyTime;
        v24 = fDesiredTransitionFrame;
        *(float *)&pkTransitiona = v23 - fPartialDestSeqFrameLength;
        *(float *)&pkTransitionb = *(float *)&pkTransitiona / fDesiredTransitionFrame;
        *(float *)&pkTransitionc = ceil(*(float *)&pkTransitionb);
        fDesiredTransitionFrame = *(float *)&pkTransitionc * fDesiredTransitionFrame;
        fDesiredTransitionFrame = v24 - uiSrcID + fDesiredTransitionFrame;
        v9->m_fFrameInDestWhenTransitionCompletes = v24 - (fDesiredTransitionFrame - fBeginFrame);
      }
      break;
    case 2:
      v25 = fDesiredTransitionFrame;
      v9->m_fFrameTransitionOccursInSrc = fDesiredTransitionFrame;
      fDesiredTransitionFrame = pkTransition->m_fDuration;
      fBeginFrame = v25 - fBeginFrame;
      fBeginFrame = fBeginFrame / v12->m_fFrequency;
      v26 = fDesiredTransitionFrame;
      v9->m_fTimeToCompleteTransition = fBeginFrame + fDesiredTransitionFrame;
      fDesiredTransitionFrame = v15->m_fEndKeyTime - v15->m_fBeginKeyTime;
      fBeginFrame = v26 * v15->m_fFrequency;
      if ( fDesiredTransitionFrame >= (double)fBeginFrame )
      {
        v9->m_fFrameInDestWhenTransitionCompletes = fBeginFrame;
      }
      else if ( v15->m_eCycleType == 2 )
      {
        v9->m_fFrameInDestWhenTransitionCompletes = fDesiredTransitionFrame;
      }
      else
      {
        v27 = fDesiredTransitionFrame;
        fDesiredTransitionFrame = fBeginFrame / fDesiredTransitionFrame;
        fDesiredTransitionFrame = ceilf(fDesiredTransitionFrame) * v27;
        v9->m_fFrameInDestWhenTransitionCompletes = v27 - (fDesiredTransitionFrame - fBeginFrame);
      }
      break;
    case 3:
      v28 = pkTransition->m_aChainInfo.m_uiUsed;
      fTotalTime = 0.0;
      uiChainInfoSize = v28;
      fSrcBeginFrame = v12->m_fBeginKeyTime;
      fBeginFrame = fDesiredTransitionFrame;
      fDesiredTransitionFrame = 0.0;
      if ( v28 )
      {
        while ( 1 )
        {
          v29 = v14->m_aChainInfo.m_pBase;
          v30 = v29[LODWORD(fDesiredTransitionFrame)].m_uiSequenceID;
          pkChainInfo = &v29[LODWORD(fDesiredTransitionFrame)];
          v31 = NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
                  v47,
                  v30,
                  &val);
          v32 = v31 != 0 ? (unsigned int)val : 0;
          v33 = NiActorManager::FillChainComplete(v48, uiTransSrcID, v30, fBeginFrame, &fSrcBeginFrame, &fTotalTime);
          fBeginFrame = *(float *)&v33;
          if ( v33 )
            InterlockedIncrement((volatile LONG *)&v33->m_uiRefCount);
          NiTSet<NiPointer<NiActorManager::ChainCompletionInfo>>::Add(
            &v50->m_kChainCompletionInfoSet,
            (NiPointer<NiActorManager::ChainCompletionInfo> *)&fBeginFrame);
          if ( v33 && !InterlockedDecrement((volatile LONG *)&v33->m_uiRefCount) )
            v33->vfptr->__vecDelDtor((NiRefObject *)v33, 1u);
          uiTransSrcID = v30;
          fBeginFrame = pkChainInfo->m_fDuration;
          v34 = -1.0 == fBeginFrame ? *(float *)(v32 + 48) - *(float *)(v32 + 44) - fSrcBeginFrame : fBeginFrame * *(float *)(v32 + 40);
          fBeginFrame = v34;
          if ( ++LODWORD(fDesiredTransitionFrame) >= uiChainInfoSize )
            break;
          v14 = pkTransition;
        }
        v9 = v50;
        v15 = pkDesSequence;
      }
      v35 = NiActorManager::FillChainComplete(
              v48,
              uiTransSrcID,
              uiTransDesID,
              fBeginFrame,
              &fSrcBeginFrame,
              &fTotalTime);
      v36 = v35;
      fBeginFrame = *(float *)&v35;
      if ( v35 )
        InterlockedIncrement((volatile LONG *)&v35->m_uiRefCount);
      NiTSet<NiPointer<NiActorManager::ChainCompletionInfo>>::Add(
        &v9->m_kChainCompletionInfoSet,
        (NiPointer<NiActorManager::ChainCompletionInfo> *)&fBeginFrame);
      if ( v36 && !InterlockedDecrement((volatile LONG *)&v36->m_uiRefCount) )
        v36->vfptr->__vecDelDtor((NiRefObject *)v36, 1u);
      v37 = NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
              v47,
              uiTransSrcID,
              (NiVBSet **)&fBeginFrame);
      v38 = v37 != 0 ? LODWORD(fBeginFrame) : 0;
      fBeginFrame = v15->m_fEndKeyTime / v15->m_fFrequency;
      v39 = fBeginFrame;
      fBeginFrame = fSrcBeginFrame / *(float *)(v38 + 40);
      fTotalTime = v39 - fBeginFrame + fTotalTime;
      v9->m_fTimeForChainToComplete = fTotalTime;
      break;
    default:
      if ( v9 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
          v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
        spCompletionInfo.m_pObject = 0;
      }
      break;
  }
  v40 = spCompletionInfo.m_pObject;
  result->m_pObject = spCompletionInfo.m_pObject;
  if ( v40 )
  {
    InterlockedIncrement((volatile LONG *)&v40->m_uiRefCount);
    if ( !InterlockedDecrement((volatile LONG *)&v40->m_uiRefCount) )
      v40->vfptr->__vecDelDtor((NiRefObject *)v40, 1u);
  }
  return result;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9E502C: using guessed type int (__thiscall *NiActorManager::CompletionInfo::`vftable')(void *p, char);

//----- (007CEF00) --------------------------------------------------------
NiActorManager::CompletionInfo *__thiscall NiActorManager::CompletionInfo::`vector deleting destructor'(NiActorManager::CompletionInfo *this, unsigned int a2)
{
  NiActorManager::CompletionInfo *v2; // esi@1

  v2 = this;
  NiTSet<NiPointer<NiActorManager::ChainCompletionInfo>>::~NiTSet<NiPointer<NiActorManager::ChainCompletionInfo>>((NiTSet<NiPointer<NiControllerSequence> > *)&this->m_kChainCompletionInfoSet);
  v2->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);

//----- (007CEF40) --------------------------------------------------------
double __thiscall NiActorManager::GetNextAnimActivatedTime(NiActorManager *this, unsigned int eSequenceID)
{
  NiActorManager *v2; // esi@1
  unsigned int v3; // ecx@1
  unsigned int v4; // eax@1
  unsigned int *v5; // edx@2
  unsigned int v6; // ebx@3
  unsigned int v8; // edi@10
  NiTListItem<unsigned int> **v9; // eax@13
  _DWORD *v10; // ecx@14
  NiTListItem<unsigned int> **v11; // edx@14
  unsigned int v12; // eax@18
  NiKFMTool *v13; // ecx@18
  NiKFMTool::Transition *v14; // eax@18
  double v15; // st7@18
  float fDesiredTransitionFrame; // ST14_4@20
  float fBeginFrame; // ST10_4@20
  bool v18; // zf@20
  unsigned int v19; // edi@20
  void *v20; // ecx@20
  float v21; // edx@20
  double v22; // st7@20
  NiControllerSequence *v23; // eax@21
  double v24; // st6@22
  unsigned int v25; // ebx@34
  float v26; // edx@34
  char v27; // al@34
  unsigned int v28; // edi@34
  NiKFMTool::Transition *v29; // eax@36
  char v30; // al@37
  NiActorManager::CompletionInfo *v31; // eax@41
  double v32; // st7@47
  double v33; // st7@48
  double v34; // st6@48
  NiPointer<NiActorManager::CompletionInfo> result; // [sp+14h] [bp-30h]@38
  NiVBSet *v36; // [sp+18h] [bp-2Ch]@37
  NiVBSet *v37; // [sp+1Ch] [bp-28h]@34
  NiVBSet *val; // [sp+20h] [bp-24h]@34
  float fAnimActivatedTime; // [sp+24h] [bp-20h]@18
  float fTransitionFrame; // [sp+28h] [bp-1Ch]@20
  unsigned int eSrcID; // [sp+2Ch] [bp-18h]@20
  float fTransStartFrameTime; // [sp+30h] [bp-14h]@18
  float fStartFrame; // [sp+34h] [bp-10h]@20
  float fDuration; // [sp+38h] [bp-Ch]@21
  void *posID; // [sp+3Ch] [bp-8h]@25
  NiPointer<NiActorManager::CompletionInfo> spInfo; // [sp+40h] [bp-4h]@20

  v2 = this;
  v3 = this->m_kExtraSequences.m_uiUsed;
  v4 = 0;
  if ( v3 )
  {
    v5 = v2->m_kExtraSequences.m_pBase;
    while ( 1 )
    {
      v6 = eSequenceID;
      if ( *v5 == eSequenceID )
        break;
      ++v4;
      ++v5;
      if ( v4 >= v3 )
        goto LABEL_9;
    }
    if ( v4 != -1 )
      return -3.4028235e38;
  }
  else
  {
    v6 = eSequenceID;
  }
LABEL_9:
  if ( v6 == v2->m_eCurID )
    return -3.4028235e38;
  v8 = v2->m_eNextID;
  if ( v6 == v8 )
    return v2->m_fTransEndTime;
  if ( v8 != -2 )
  {
    v9 = &v2->m_kChainIDs.m_pkHead->m_pkNext;
    if ( v9 )
    {
      while ( 1 )
      {
        v10 = v9 + 2;
        v11 = v9;
        v9 = (NiTListItem<unsigned int> **)*v9;
        if ( v6 == *v10 )
          break;
        if ( !v9 )
          return -3.4028235e38;
      }
      if ( v11 )
      {
        v12 = v2->m_eCurID;
        v13 = v2->m_spKFMTool.m_pObject;
        fAnimActivatedTime = v2->m_fTransEndTime;
        v14 = NiKFMTool::GetTransition(v13, v12, v8);
        fTransStartFrameTime = v2->m_fTransStartFrameTime;
        v15 = fTransStartFrameTime;
        if ( -3.402823466385289e38 == fTransStartFrameTime )
        {
          fTransStartFrameTime = 0.0;
          v15 = (float)0.0;
        }
        fDesiredTransitionFrame = v15;
        fBeginFrame = v15;
        NiActorManager::FindTimeForAnimationToCompleteTransition(
          v2,
          &spInfo,
          v2->m_eCurID,
          v2->m_eNextID,
          v14,
          fBeginFrame,
          fDesiredTransitionFrame);
        v18 = v2->m_kChainDurations.m_kAllocator.m_uiCount == 0;
        v19 = v2->m_eNextID;
        v20 = v2->m_kChainIDs.m_pkHead;
        fStartFrame = spInfo.m_pObject->m_fFrameInDestWhenTransitionCompletes;
        v21 = *(float *)&v2->m_kChainDurations.m_pkHead;
        fTransitionFrame = 0.0;
        eSrcID = v19;
        v22 = fStartFrame;
        if ( !v18 )
        {
          fDuration = *(float *)(LODWORD(v21) + 8);
          v23 = v2->m_pkNextSequence;
          if ( -1.0 == fDuration )
            v24 = v23->m_fEndKeyTime - v23->m_fBeginKeyTime - v22;
          else
            v24 = fDuration * v23->m_fFrequency;
          fDuration = v24;
          fTransitionFrame = v22 + fDuration;
          if ( v20 )
            posID = *(void **)v20;
          else
            posID = 0;
          v20 = posID;
          if ( v21 == 0.0 )
            v21 = 0.0;
          else
            v21 = *(float *)LODWORD(v21);
        }
        if ( v6 == v19 )
        {
LABEL_51:
          NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spInfo);
          return fAnimActivatedTime;
        }
        while ( v20 )
        {
          v25 = *((_DWORD *)v20 + 2);
          fTransStartFrameTime = *(float *)(LODWORD(v21) + 8);
          v26 = *(float *)LODWORD(v21);
          posID = *(void **)v20;
          fDuration = v26;
          v27 = NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
                  (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v2->m_kSequenceMap,
                  v25,
                  &val);
          v28 = v27 != 0 ? (unsigned int)val : 0;
          if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
                 (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v2->m_spKFMTool.m_pObject->m_mapSequences,
                 eSrcID,
                 &v37)
            && v37 )
          {
            v30 = NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
                    (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v37->m_uiBlockSize,
                    v25,
                    &v36);
            v29 = (NiKFMTool::Transition *)(v30 != 0 ? (unsigned int)v36 : 0);
          }
          else
          {
            v29 = 0;
          }
          fTransitionFrame = COERCE_FLOAT(NiActorManager::FindTimeForAnimationToCompleteTransition(v2, &result, eSrcID, v25, v29, fStartFrame, fTransitionFrame));
          if ( spInfo.m_pObject != *(NiActorManager::CompletionInfo **)LODWORD(fTransitionFrame) )
          {
            if ( !InterlockedDecrement((volatile LONG *)&spInfo.m_pObject->m_uiRefCount) )
              ((void (__stdcall *)(signed int))spInfo.m_pObject->vfptr->__vecDelDtor)(1);
            v31 = *(NiActorManager::CompletionInfo **)LODWORD(fTransitionFrame);
            spInfo.m_pObject = v31;
            if ( v31 )
              InterlockedIncrement((volatile LONG *)&v31->m_uiRefCount);
          }
          if ( *(float *)&result.m_pObject != 0.0 )
          {
            fTransitionFrame = *(float *)&result.m_pObject;
            if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) && fTransitionFrame != 0.0 )
              (**(void (__stdcall ***)(_DWORD))LODWORD(fTransitionFrame))(1);
          }
          v32 = spInfo.m_pObject->m_fTimeToCompleteTransition;
          eSrcID = v25;
          fAnimActivatedTime = v32 + fAnimActivatedTime;
          fStartFrame = spInfo.m_pObject->m_fFrameInDestWhenTransitionCompletes;
          if ( -1.0 == fTransStartFrameTime )
          {
            v33 = fStartFrame;
            v34 = *(float *)(v28 + 48) - *(float *)(v28 + 44) - fStartFrame;
          }
          else
          {
            v34 = fTransStartFrameTime * *(float *)(v28 + 40);
            v33 = fStartFrame;
          }
          fTransStartFrameTime = v34;
          fTransitionFrame = v33 + fTransStartFrameTime;
          if ( eSequenceID == v25 )
            goto LABEL_51;
          v21 = fDuration;
          v20 = posID;
        }
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spInfo);
      }
    }
  }
  return -3.4028235e38;
}

//----- (007CF230) --------------------------------------------------------
double __thiscall NiActorManager::GetNextAnimDeactivatedTime(NiActorManager *this, unsigned int eSequenceID)
{
  NiActorManager *v2; // edi@1
  unsigned int v3; // ecx@1
  unsigned int v4; // eax@1
  unsigned int *v5; // edx@2
  unsigned int v6; // esi@3
  double v7; // st7@7
  unsigned int v8; // ebx@13
  NiTListItem<unsigned int> **v9; // eax@16
  _DWORD *v10; // ecx@17
  NiTListItem<unsigned int> **v11; // edx@17
  unsigned int v12; // eax@21
  NiKFMTool *v13; // ecx@21
  NiKFMTool::Transition *v14; // eax@21
  NiKFMTool::Transition *v15; // esi@21
  double v16; // st7@21
  float fDesiredTransitionFrame; // ST14_4@23
  float fBeginFrame; // ST10_4@23
  unsigned int v19; // eax@23
  void *v20; // ecx@23
  float v21; // edx@23
  double v22; // st7@23
  NiControllerSequence *v23; // eax@24
  double v24; // st6@25
  unsigned int v25; // ebx@36
  float v26; // edx@36
  char v27; // al@36
  unsigned int v28; // esi@36
  char v29; // al@39
  NiActorManager::CompletionInfo *v30; // eax@43
  double v31; // st7@50
  double v32; // st7@51
  double v33; // st6@51
  NiPointer<NiActorManager::CompletionInfo> result; // [sp+14h] [bp-38h]@40
  NiVBSet *v35; // [sp+18h] [bp-34h]@39
  NiVBSet *v36; // [sp+1Ch] [bp-30h]@36
  NiVBSet *val; // [sp+20h] [bp-2Ch]@36
  float fTransitionDuration; // [sp+24h] [bp-28h]@23
  float fAnimDeactivatedTime; // [sp+28h] [bp-24h]@21
  NiKFMTool::Transition *pkTransition; // [sp+2Ch] [bp-20h]@38
  float fTransitionFrame; // [sp+30h] [bp-1Ch]@23
  float fTransStartFrameTime; // [sp+34h] [bp-18h]@21
  unsigned int eSrcID; // [sp+38h] [bp-14h]@23
  float fStartFrame; // [sp+3Ch] [bp-10h]@23
  float fDuration; // [sp+40h] [bp-Ch]@24
  void *posID; // [sp+44h] [bp-8h]@28
  NiPointer<NiActorManager::CompletionInfo> spInfo; // [sp+48h] [bp-4h]@23

  v2 = this;
  v3 = this->m_kExtraSequences.m_uiUsed;
  v4 = 0;
  if ( v3 )
  {
    v5 = v2->m_kExtraSequences.m_pBase;
    while ( 1 )
    {
      v6 = eSequenceID;
      if ( *v5 == eSequenceID )
        break;
      ++v4;
      ++v5;
      if ( v4 >= v3 )
        goto LABEL_9;
    }
    if ( v4 != -1 )
      return -3.4028235e38;
  }
  else
  {
    v6 = eSequenceID;
  }
LABEL_9:
  if ( v6 == v2->m_eCurID )
  {
    if ( v2->m_eNextID == -2 || v2->m_fTransStartTime < (double)v2->m_fTime )
      return -3.4028235e38;
    v7 = v2->m_fTransStartTime;
  }
  else
  {
    v8 = v2->m_eNextID;
    if ( v8 == -2 || v6 == v8 && !v2->m_kChainIDs.m_kAllocator.m_uiCount )
      goto LABEL_19;
    v9 = &v2->m_kChainIDs.m_pkHead->m_pkNext;
    if ( !v9 )
      goto LABEL_19;
    while ( 1 )
    {
      v10 = v9 + 2;
      v11 = v9;
      v9 = (NiTListItem<unsigned int> **)*v9;
      if ( v6 == *v10 )
        break;
      if ( !v9 )
        goto LABEL_19;
    }
    if ( v11 )
    {
      v12 = v2->m_eCurID;
      v13 = v2->m_spKFMTool.m_pObject;
      fAnimDeactivatedTime = v2->m_fTransStartTime;
      v14 = NiKFMTool::GetTransition(v13, v12, v8);
      fTransStartFrameTime = v2->m_fTransStartFrameTime;
      v15 = v14;
      v16 = fTransStartFrameTime;
      if ( -3.402823466385289e38 == fTransStartFrameTime )
      {
        fTransStartFrameTime = 0.0;
        v16 = (float)0.0;
      }
      fDesiredTransitionFrame = v16;
      fBeginFrame = v16;
      NiActorManager::FindTimeForAnimationToCompleteTransition(
        v2,
        &spInfo,
        v2->m_eCurID,
        v2->m_eNextID,
        v14,
        fBeginFrame,
        fDesiredTransitionFrame);
      v19 = v2->m_eNextID;
      v20 = v2->m_kChainIDs.m_pkHead;
      fStartFrame = spInfo.m_pObject->m_fFrameInDestWhenTransitionCompletes;
      v21 = *(float *)&v2->m_kChainDurations.m_pkHead;
      fTransitionFrame = 0.0;
      eSrcID = v19;
      fTransitionDuration = v15->m_fDuration;
      v22 = fStartFrame;
      if ( v2->m_kChainDurations.m_kAllocator.m_uiCount )
      {
        fDuration = *(float *)(LODWORD(v21) + 8);
        v23 = v2->m_pkNextSequence;
        if ( -1.0 == fDuration )
          v24 = v23->m_fEndKeyTime - v23->m_fBeginKeyTime - v22;
        else
          v24 = fDuration * v23->m_fFrequency;
        fDuration = v24;
        fTransitionFrame = v22 + fDuration;
        if ( v20 )
          posID = *(void **)v20;
        else
          posID = 0;
        v20 = posID;
        if ( v21 == 0.0 )
          v21 = 0.0;
        else
          v21 = *(float *)LODWORD(v21);
      }
      if ( v20 )
      {
        while ( 1 )
        {
          v25 = *((_DWORD *)v20 + 2);
          fTransStartFrameTime = *(float *)(LODWORD(v21) + 8);
          v26 = *(float *)LODWORD(v21);
          posID = *(void **)v20;
          fDuration = v26;
          v27 = NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
                  (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v2->m_kSequenceMap,
                  v25,
                  &val);
          v28 = v27 != 0 ? (unsigned int)val : 0;
          if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
                 (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v2->m_spKFMTool.m_pObject->m_mapSequences,
                 eSrcID,
                 &v36)
            && v36 )
          {
            v29 = NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
                    (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v36->m_uiBlockSize,
                    v25,
                    &v35);
            pkTransition = (NiKFMTool::Transition *)(v29 != 0 ? (unsigned int)v35 : 0);
          }
          else
          {
            pkTransition = 0;
          }
          fTransitionFrame = COERCE_FLOAT(NiActorManager::FindTimeForAnimationToCompleteTransition(v2, &result, eSrcID, v25, pkTransition, fStartFrame, fTransitionFrame));
          if ( spInfo.m_pObject != *(NiActorManager::CompletionInfo **)LODWORD(fTransitionFrame) )
          {
            if ( !InterlockedDecrement((volatile LONG *)&spInfo.m_pObject->m_uiRefCount) )
              ((void (__stdcall *)(signed int))spInfo.m_pObject->vfptr->__vecDelDtor)(1);
            v30 = *(NiActorManager::CompletionInfo **)LODWORD(fTransitionFrame);
            spInfo.m_pObject = v30;
            if ( v30 )
              InterlockedIncrement((volatile LONG *)&v30->m_uiRefCount);
          }
          if ( *(float *)&result.m_pObject != 0.0 )
          {
            fTransitionFrame = *(float *)&result.m_pObject;
            if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) && fTransitionFrame != 0.0 )
              (**(void (__stdcall ***)(_DWORD))LODWORD(fTransitionFrame))(1);
          }
          fAnimDeactivatedTime = spInfo.m_pObject->m_fFrameTransitionOccursInSrc
                               - fStartFrame
                               + fTransitionDuration
                               + fAnimDeactivatedTime;
          if ( eSequenceID == eSrcID )
            break;
          v31 = spInfo.m_pObject->m_fFrameInDestWhenTransitionCompletes;
          eSrcID = v25;
          fStartFrame = v31;
          if ( -1.0 == fTransStartFrameTime )
          {
            v32 = fStartFrame;
            v33 = *(float *)(v28 + 48) - *(float *)(v28 + 44) - fStartFrame;
          }
          else
          {
            v33 = fTransStartFrameTime * *(float *)(v28 + 40);
            v32 = fStartFrame;
          }
          fTransStartFrameTime = v33;
          fTransitionFrame = v32 + fTransStartFrameTime;
          fTransitionDuration = pkTransition->m_fDuration;
          if ( !posID )
            goto LABEL_54;
          v21 = fDuration;
          v20 = posID;
        }
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spInfo);
        v7 = fAnimDeactivatedTime;
      }
      else
      {
LABEL_54:
        NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spInfo);
        v7 = -3.4028235e38;
      }
    }
    else
    {
LABEL_19:
      v7 = -3.4028235e38;
    }
  }
  return v7;
}

//----- (007CF550) --------------------------------------------------------
double __thiscall NiActorManager::GetNextTextKeyEventTime(NiActorManager *this, unsigned int eSequenceID, NiTextKeyMatch *pkMatchObject)
{
  NiActorManager *v3; // esi@1
  unsigned int v4; // ecx@1
  unsigned int v5; // eax@1
  unsigned int *v6; // edx@2
  unsigned int v7; // edi@3
  char v8; // al@7
  double v9; // st7@7
  NiTextKeyMatch *v10; // edi@12
  NiControllerSequence *v11; // ecx@15
  double v12; // st7@15
  unsigned int v13; // ebx@20
  NiTListItem<unsigned int> **v14; // eax@24
  _DWORD *v15; // ecx@25
  NiTListItem<unsigned int> **v16; // edx@25
  unsigned int v17; // eax@29
  NiKFMTool *v18; // ecx@29
  NiKFMTool::Transition *v19; // eax@29
  double v20; // st7@29
  float fDesiredTransitionFrame; // ST14_4@31
  float fBeginFrame; // ST10_4@31
  bool v23; // zf@31
  unsigned int v24; // edx@31
  unsigned int v25; // edi@31
  void *v26; // ebx@31
  float v27; // ecx@31
  double v28; // st7@31
  double v29; // st6@33
  void *v30; // edx@45
  unsigned int v31; // ebx@45
  float v32; // ecx@45
  char v33; // al@45
  NiKFMTool::Transition *v34; // eax@47
  char v35; // al@48
  NiActorManager::CompletionInfo *v36; // eax@52
  double v37; // st7@58
  double v38; // st7@59
  double v39; // st6@59
  NiPointer<NiActorManager::CompletionInfo> result; // [sp+14h] [bp-30h]@49
  NiVBSet *v41; // [sp+18h] [bp-2Ch]@48
  NiVBSet *v42; // [sp+1Ch] [bp-28h]@45
  NiVBSet *val; // [sp+20h] [bp-24h]@45
  unsigned int eSrcID; // [sp+24h] [bp-20h]@31
  float fTransStartFrameTime; // [sp+28h] [bp-1Ch]@29
  float v46; // [sp+2Ch] [bp-18h]@45
  float fStartFrame; // [sp+30h] [bp-14h]@31
  float fDuration; // [sp+34h] [bp-10h]@32
  void *posID; // [sp+38h] [bp-Ch]@36
  float fTextKeyTime; // [sp+3Ch] [bp-8h]@7
  NiPointer<NiActorManager::CompletionInfo> spInfo; // [sp+40h] [bp-4h]@31

  v3 = this;
  v4 = this->m_kExtraSequences.m_uiUsed;
  v5 = 0;
  if ( v4 )
  {
    v6 = v3->m_kExtraSequences.m_pBase;
    while ( 1 )
    {
      v7 = eSequenceID;
      if ( *v6 == eSequenceID )
        break;
      ++v5;
      ++v6;
      if ( v5 >= v4 )
        goto LABEL_11;
    }
    if ( v5 != -1 )
    {
      v8 = NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
             (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v3->m_kSequenceMap,
             eSequenceID,
             (NiVBSet **)&eSequenceID);
      fTextKeyTime = NiControllerSequence::GetTimeAt(
                       (NiControllerSequence *)(v8 != 0 ? eSequenceID : 0),
                       pkMatchObject,
                       v3->m_fTime);
      v9 = fTextKeyTime;
      if ( -3.4028235e38 != fTextKeyTime && v3->m_fTime <= v9 )
        return v9;
      return -3.4028235e38;
    }
  }
  else
  {
    v7 = eSequenceID;
  }
LABEL_11:
  if ( v7 == v3->m_eCurID )
  {
    v10 = pkMatchObject;
    fTextKeyTime = NiControllerSequence::GetTimeAt(v3->m_pkCurSequence, pkMatchObject, v3->m_fTime);
    v9 = fTextKeyTime;
    if ( -3.4028235e38 == fTextKeyTime || v3->m_fTime > v9 )
      return -3.4028235e38;
    if ( v3->m_fTime == v9 )
    {
      v11 = v3->m_pkCurSequence;
      eSequenceID = LODWORD(v11->m_fBeginKeyTime);
      v12 = NiControllerSequence::GetKeyTimeAt(v11, v10);
      if ( *(float *)&eSequenceID != v12 )
        return -3.4028235e38;
      v9 = fTextKeyTime;
    }
    if ( v3->m_eNextID == -2 || v3->m_fTransStartTime >= v9 )
      return v9;
    return -3.4028235e38;
  }
  v13 = v3->m_eNextID;
  if ( v13 != -2 )
  {
    if ( v7 == v13 )
      goto LABEL_70;
    if ( v3->m_kChainIDs.m_kAllocator.m_uiCount )
    {
      if ( v7 == v13 )
        goto LABEL_70;
      v14 = &v3->m_kChainIDs.m_pkHead->m_pkNext;
      if ( v14 )
      {
        while ( 1 )
        {
          v15 = v14 + 2;
          v16 = v14;
          v14 = (NiTListItem<unsigned int> **)*v14;
          if ( v7 == *v15 )
            break;
          if ( !v14 )
            return -3.4028235e38;
        }
        if ( v16 )
        {
LABEL_70:
          v17 = v3->m_eCurID;
          v18 = v3->m_spKFMTool.m_pObject;
          fTextKeyTime = v3->m_fTransEndTime;
          v19 = NiKFMTool::GetTransition(v18, v17, v13);
          fTransStartFrameTime = v3->m_fTransStartFrameTime;
          v20 = fTransStartFrameTime;
          if ( -3.402823466385289e38 == fTransStartFrameTime )
          {
            fTransStartFrameTime = 0.0;
            v20 = (float)0.0;
          }
          fDesiredTransitionFrame = v20;
          fBeginFrame = v20;
          NiActorManager::FindTimeForAnimationToCompleteTransition(
            v3,
            &spInfo,
            v3->m_eCurID,
            v3->m_eNextID,
            v19,
            fBeginFrame,
            fDesiredTransitionFrame);
          v23 = v3->m_kChainDurations.m_kAllocator.m_uiCount == 0;
          v24 = v3->m_eNextID;
          v25 = (unsigned int)v3->m_pkNextSequence;
          fStartFrame = spInfo.m_pObject->m_fFrameInDestWhenTransitionCompletes;
          v26 = v3->m_kChainIDs.m_pkHead;
          v27 = *(float *)&v3->m_kChainDurations.m_pkHead;
          fTransStartFrameTime = 0.0;
          v28 = fStartFrame;
          eSrcID = v24;
          if ( !v23 )
          {
            fDuration = *(float *)(LODWORD(v27) + 8);
            if ( -1.0 == fDuration )
              v29 = *(float *)(v25 + 48) - *(float *)(v25 + 44) - v28;
            else
              v29 = fDuration * *(float *)(v25 + 40);
            fDuration = v29;
            fTransStartFrameTime = v28 + fDuration;
            if ( v26 )
              posID = *(void **)v26;
            else
              posID = 0;
            v26 = posID;
            if ( v27 == 0.0 )
              v27 = 0.0;
            else
              v27 = *(float *)LODWORD(v27);
          }
          if ( eSequenceID == v24 )
          {
LABEL_62:
            *(float *)&eSequenceID = NiControllerSequence::GetKeyTimeAt((NiControllerSequence *)v25, pkMatchObject);
            if ( -3.4028235e38 != *(float *)&eSequenceID
              && (!v26 || fTransStartFrameTime >= (double)*(float *)&eSequenceID) )
            {
              pkMatchObject = *(NiTextKeyMatch **)(v25 + 40);
              NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spInfo);
              *(float *)&eSequenceID = *(float *)&eSequenceID - fStartFrame;
              *(float *)&eSequenceID = *(float *)&eSequenceID / *(float *)&pkMatchObject;
              *(float *)&eSequenceID = *(float *)&eSequenceID + fTextKeyTime;
              return *(float *)&eSequenceID;
            }
          }
          else
          {
            while ( v26 )
            {
              v30 = *(void **)v26;
              v31 = *((_DWORD *)v26 + 2);
              v46 = *(float *)(LODWORD(v27) + 8);
              v32 = *(float *)LODWORD(v27);
              posID = v30;
              fDuration = v32;
              v33 = NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
                      (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v3->m_kSequenceMap,
                      v31,
                      &val);
              v25 = v33 != 0 ? (unsigned int)val : 0;
              if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
                     (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v3->m_spKFMTool.m_pObject->m_mapSequences,
                     eSrcID,
                     &v42)
                && v42 )
              {
                v35 = NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
                        (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v42->m_uiBlockSize,
                        v31,
                        &v41);
                v34 = (NiKFMTool::Transition *)(v35 != 0 ? (unsigned int)v41 : 0);
              }
              else
              {
                v34 = 0;
              }
              eSrcID = (unsigned int)NiActorManager::FindTimeForAnimationToCompleteTransition(
                                       v3,
                                       &result,
                                       eSrcID,
                                       v31,
                                       v34,
                                       fStartFrame,
                                       fTransStartFrameTime);
              if ( spInfo.m_pObject != *(NiActorManager::CompletionInfo **)eSrcID )
              {
                if ( !InterlockedDecrement((volatile LONG *)&spInfo.m_pObject->m_uiRefCount) )
                  ((void (__stdcall *)(signed int))spInfo.m_pObject->vfptr->__vecDelDtor)(1);
                v36 = *(NiActorManager::CompletionInfo **)eSrcID;
                spInfo.m_pObject = v36;
                if ( v36 )
                  InterlockedIncrement((volatile LONG *)&v36->m_uiRefCount);
              }
              if ( result.m_pObject )
              {
                eSrcID = (unsigned int)result.m_pObject;
                if ( !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) )
                {
                  if ( eSrcID )
                    (**(void (__stdcall ***)(_DWORD))eSrcID)(1);
                }
              }
              v37 = spInfo.m_pObject->m_fTimeToCompleteTransition;
              eSrcID = v31;
              fTextKeyTime = v37 + fTextKeyTime;
              fStartFrame = spInfo.m_pObject->m_fFrameInDestWhenTransitionCompletes;
              if ( -1.0 == v46 )
              {
                v38 = fStartFrame;
                v39 = *(float *)(v25 + 48) - *(float *)(v25 + 44) - fStartFrame;
              }
              else
              {
                v39 = v46 * *(float *)(v25 + 40);
                v38 = fStartFrame;
              }
              v23 = eSequenceID == v31;
              v46 = v39;
              v26 = posID;
              fTransStartFrameTime = v38 + v46;
              if ( v23 )
                goto LABEL_62;
              v27 = fDuration;
            }
          }
          NiPointer<FlexDlgBtn>::~NiPointer<FlexDlgBtn>((NiPointer<HazeAccumulator> *)&spInfo);
        }
      }
    }
  }
  return -3.4028235e38;
}

//----- (007CF980) --------------------------------------------------------
void __thiscall NiKFMTool::Sequence::~Sequence(NiKFMTool::Sequence *this)
{
  NiKFMTool::Sequence *v1; // esi@1
  unsigned int v2; // ecx@1
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v3; // edi@1
  unsigned int v4; // eax@1
  NiTMapItem<unsigned int,NiKFMTool::Transition *> **v5; // edx@2
  NiTMapItem<unsigned int,NiKFMTool::Transition *> *v6; // eax@5
  NiTMapItem<unsigned int,NiVBSet *> *v7; // esi@6
  NiVBSet *v8; // ebx@7
  int v9; // eax@10
  unsigned int v10; // edx@10
  unsigned int v11; // eax@10
  NiTMapItem<unsigned int,NiVBSet *> **v12; // ecx@11
  NiVBBlock **v13; // eax@15
  unsigned int v14; // ecx@15

  v1 = this;
  operator delete(this->m_pcFilename);
  v2 = v1->m_mapTransitions.m_uiHashSize;
  v3 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v1->m_mapTransitions;
  v4 = 0;
  if ( v2 )
  {
    v5 = v1->m_mapTransitions.m_ppkHashTable;
    while ( !*v5 )
    {
      ++v4;
      ++v5;
      if ( v4 >= v2 )
        goto LABEL_5;
    }
    v6 = v1->m_mapTransitions.m_ppkHashTable[v4];
  }
  else
  {
LABEL_5:
    v6 = 0;
  }
  v7 = (NiTMapItem<unsigned int,NiVBSet *> *)v6;
  if ( v6 )
  {
    do
    {
      v8 = v7->m_val;
      if ( v7->m_pkNext )
      {
        v7 = v7->m_pkNext;
      }
      else
      {
        v9 = v3->vfptr->KeyToHashIndex(v3, v7->m_key);
        v10 = v3->m_uiHashSize;
        v11 = v9 + 1;
        if ( v11 >= v10 )
        {
LABEL_14:
          v7 = 0;
        }
        else
        {
          v12 = &v3->m_ppkHashTable[v11];
          while ( 1 )
          {
            v7 = *v12;
            if ( *v12 )
              break;
            ++v11;
            ++v12;
            if ( v11 >= v10 )
              goto LABEL_14;
          }
        }
      }
      v13 = v8->m_apkBlocks.m_pBase;
      v14 = (unsigned int)v13;
      if ( v13 == (NiVBBlock **)6 )
        v14 = v8->m_uiIndex;
      if ( v14 != 4 )
      {
        if ( v13 == (NiVBBlock **)6 )
          v13 = (NiVBBlock **)v8->m_uiIndex;
        if ( v13 != (NiVBBlock **)5 )
        {
          NiKFMTool::Transition::ClearBlendPairs((NiKFMTool::Transition *)v8);
          operator delete((void *)v8->m_uiUsage);
          operator delete((void *)v8->m_uiFlags);
          operator delete(v8);
        }
      }
    }
    while ( v7 );
  }
  v3->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *>Vtbl *)&NiTPointerMap<unsigned int,NiKFMTool::Transition *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll(v3);
  v3->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Transition *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll(v3);
  operator delete(v3->m_ppkHashTable);
}
// 9E503C: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Transition *>::`vftable')(void *p, char);
// 9E505C: using guessed type int (__thiscall *NiTPointerMap<unsigned int,NiKFMTool::Transition *>::`vftable')(void *p, char);

//----- (007CFA80) --------------------------------------------------------
double __thiscall NiActorManager::GetNextEndOfSequenceTime(NiActorManager *this, unsigned int eSequenceID)
{
  NiActorManager *v2; // esi@1
  NiTextKeyMatch kKeyMatch; // [sp+4h] [bp-10h]@1
  unsigned int eSequenceIDa; // [sp+1Ch] [bp+8h]@1

  v2 = this;
  kKeyMatch.m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  kKeyMatch.vfptr = (NiRefObjectVtbl *)&NiTextKeyMatch::`vftable';
  kKeyMatch.m_pcLastKeyMatched = 0;
  kKeyMatch.m_pcMatchKey = "end";
  *(float *)&eSequenceIDa = NiActorManager::GetNextTextKeyEventTime(v2, eSequenceID, &kKeyMatch);
  kKeyMatch.m_pcLastKeyMatched = 0;
  kKeyMatch.vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
  return *(float *)&eSequenceIDa;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9B89E8: using guessed type int (__thiscall *NiTextKeyMatch::`vftable')(void *p, char);

//----- (007CFAF0) --------------------------------------------------------
NiTListItem<NiActorManager::TimelineData> *NiTObjectList<NiActorManager::TimelineData>::NewItem()
{
  NiTListItem<NiActorManager::TimelineData> *result; // eax@1

  result = (NiTListItem<NiActorManager::TimelineData> *)NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkFreeMem;
  if ( !NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkFreeMem )
  {
    NiTAbstractPoolAllocator<NiActorManager::TimelineData>::CreateFreeMem();
    result = (NiTListItem<NiActorManager::TimelineData> *)NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkFreeMem;
  }
  NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkFreeMem = (int)result->m_pkNext;
  result->m_pkNext = 0;
  result->m_pkPrev = 0;
  return result;
}
// B61848: using guessed type int NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkFreeMem;

//----- (007CFB20) --------------------------------------------------------
void __thiscall NiActorManager::LoadSequences(NiActorManager *this, NiStream *kStream)
{
  NiActorManager *v2; // esi@1
  NiKFMTool *v3; // ecx@1
  unsigned int v4; // ebx@4
  char *v5; // esi@4
  NiKFMTool *v6; // esi@7
  NiTMapItem<unsigned int,NiKFMTool::Sequence *> *v7; // edi@7
  NiKFMTool::Sequence *v8; // edi@11
  char *v9; // eax@12
  NiStream *v10; // esi@12
  NiVBSet *v11; // esi@14
  NiActorManager *v12; // edi@15
  NiControllerSequence *v13; // esi@17
  NiPointer<NiControllerSequence> result; // [sp+4h] [bp-124h]@14
  unsigned int uiNumIDs; // [sp+8h] [bp-120h]@1
  unsigned int *pSequenceIDs; // [sp+Ch] [bp-11Ch]@1
  NiStream *v17; // [sp+10h] [bp-118h]@1
  unsigned int ui; // [sp+14h] [bp-114h]@1
  NiActorManager *v19; // [sp+18h] [bp-110h]@1
  bool bLoadKFFile; // [sp+1Fh] [bp-109h]@4
  char acLastKFFilename[260]; // [sp+20h] [bp-108h]@1

  v2 = this;
  v3 = this->m_spKFMTool.m_pObject;
  v19 = v2;
  v17 = kStream;
  NiKFMTool::GetSequenceIDs(v3, &pSequenceIDs, &uiNumIDs);
  acLastKFFilename[0] = 0;
  ui = 0;
  if ( uiNumIDs )
  {
    while ( 1 )
    {
      v4 = pSequenceIDs[ui];
      v5 = NiKFMTool::GetFullKFFilename(v2->m_spKFMTool.m_pObject, pSequenceIDs[ui]);
      bLoadKFFile = 0;
      if ( strcmp(acLastKFFilename, v5) )
      {
        bLoadKFFile = 1;
        strcpy_s(acLastKFFilename, 0x104u, v5);
      }
      if ( v19->m_spManager.m_pObject )
      {
        v6 = v19->m_spKFMTool.m_pObject;
        v7 = v6->m_mapSequences.m_ppkHashTable[v6->m_mapSequences.vfptr->KeyToHashIndex(
                                                 (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *> *)&v6->m_mapSequences,
                                                 v4)];
        if ( v7 )
        {
          while ( !v6->m_mapSequences.vfptr->IsKeysEqual(
                     (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *> *)&v6->m_mapSequences,
                     v4,
                     v7->m_key) )
          {
            v7 = v7->m_pkNext;
            if ( !v7 )
              goto LABEL_21;
          }
          v8 = v7->m_val;
          if ( v8 )
          {
            v9 = NiKFMTool::GetFullKFFilename(v19->m_spKFMTool.m_pObject, v4);
            v10 = v17;
            if ( !bLoadKFFile || v17->vfptr->Load(v17, v9) )
            {
              NiControllerSequence::CreateSequenceFromFile(&result, v10, v8->m_iAnimIndex);
              v11 = (NiVBSet *)result.m_pObject;
              if ( result.m_pObject )
              {
                v12 = v19;
                NiActorManager::UnloadSequence(v19, v4);
                if ( NiControllerManager::AddSequence(v12->m_spManager.m_pObject, (NiControllerSequence *)v11, 0, 1) )
                  NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::SetAt(
                    (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v12->m_kSequenceMap,
                    v4,
                    v11);
                v13 = result.m_pObject;
                if ( result.m_pObject && !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) && v13 )
                  v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
              }
            }
          }
        }
      }
LABEL_21:
      if ( ++ui >= uiNumIDs )
        break;
      v2 = v19;
    }
  }
  operator delete(pSequenceIDs);
}

//----- (007CFD20) --------------------------------------------------------
char __userpurge NiActorManager::Initialize@<al>(NiActorManager *this@<ecx>, int a2@<ebx>, NiStream *kStream)
{
  NiActorManager *v3; // edi@1
  NiKFMTool *v4; // ecx@1
  char *v5; // eax@2
  NiAVObject *v6; // eax@3
  char result; // al@5

  v3 = this;
  v4 = this->m_spKFMTool.m_pObject;
  if ( v4->m_pcModelPath
    && (v5 = NiKFMTool::GetFullModelPath(v4), kStream->vfptr->Load(kStream, v5))
    && (v6 = (NiAVObject *)CPostProcessEffect::DynamicCast(
                             &NiAVObject::m_RTTI,
                             (NiShader *)kStream->m_kTopObjects.m_pBase->m_pObject)) != 0
    && NiActorManager::ChangeNIFRoot(v3, a2, v6) )
  {
    NiActorManager::LoadSequences(v3, kStream);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007CFD90) --------------------------------------------------------
void __thiscall NiActorManager::AddTimelineDataObject(NiActorManager *this, NiActorManager::EventType eEventType, unsigned int eSequenceID, NiTextKeyMatch *pkMatchObject)
{
  NiActorManager *v4; // ebx@1
  double v5; // st7@2
  NiTListItem<NiActorManager::TimelineData> *v6; // esi@8
  int v7; // eax@11
  _DWORD *v8; // ecx@11
  int *v9; // ecx@13
  NiActorManager::TimelineData *v10; // eax@18
  const char *v11; // esi@18
  float fEventTime; // [sp+20h] [bp-4h]@7

  v4 = this;
  switch ( eEventType )
  {
    case 0:
      v5 = NiActorManager::GetNextAnimActivatedTime(this, eSequenceID);
      break;
    case 1:
      v5 = NiActorManager::GetNextAnimDeactivatedTime(this, eSequenceID);
      break;
    case 2:
      v5 = NiActorManager::GetNextTextKeyEventTime(this, eSequenceID, pkMatchObject);
      break;
    case 3:
      v5 = NiActorManager::GetNextEndOfSequenceTime(this, eSequenceID);
      break;
    default:
      v5 = -3.4028235e38;
      break;
  }
  fEventTime = v5;
  if ( -3.402823466385289e38 != fEventTime )
  {
    v6 = v4->m_kTimeline.m_pkHead;
    if ( v6 )
    {
      while ( v6->m_element.m_fEventTime <= (double)fEventTime )
      {
        v6 = v6->m_pkNext;
        if ( !v6 )
          goto LABEL_11;
      }
      v7 = (int)v4->m_kTimeline.vfptr->NewItem((NiTListBase<NiTObjectAllocator<NiActorManager::TimelineData>,NiActorManager::TimelineData> *)&v4->m_kTimeline);
      *(_DWORD *)v7 = v6;
      *(_DWORD *)(v7 + 4) = v6->m_pkPrev;
      v9 = (int *)v6->m_pkPrev;
      if ( v9 )
      {
        *v9 = v7;
        v6->m_pkPrev = (NiTListItem<NiActorManager::TimelineData> *)v7;
      }
      else
      {
        v4->m_kTimeline.m_pkHead = (NiTListItem<NiActorManager::TimelineData> *)v7;
        v6->m_pkPrev = (NiTListItem<NiActorManager::TimelineData> *)v7;
      }
    }
    else
    {
LABEL_11:
      v7 = (int)v4->m_kTimeline.vfptr->NewItem((NiTListBase<NiTObjectAllocator<NiActorManager::TimelineData>,NiActorManager::TimelineData> *)&v4->m_kTimeline);
      *(_DWORD *)v7 = 0;
      *(_DWORD *)(v7 + 4) = v4->m_kTimeline.m_pkTail;
      v8 = &v4->m_kTimeline.m_pkTail->m_pkNext;
      if ( v8 )
        *v8 = v7;
      else
        v4->m_kTimeline.m_pkHead = (NiTListItem<NiActorManager::TimelineData> *)v7;
      v4->m_kTimeline.m_pkTail = (NiTListItem<NiActorManager::TimelineData> *)v7;
    }
    ++v4->m_kTimeline.m_kAllocator.m_uiCount;
    v10 = (NiActorManager::TimelineData *)(v7 + 8);
    v11 = 0;
    if ( pkMatchObject )
      v11 = pkMatchObject->m_pcLastKeyMatched;
    NiActorManager::TimelineData::SetValues(v10, fEventTime, eEventType, eSequenceID, pkMatchObject, v11);
    NiActorManager::AddTimelineDataObjectAtSameTime(v4, eEventType, eSequenceID, pkMatchObject, fEventTime, v11);
  }
}

//----- (007CFEF0) --------------------------------------------------------
void __thiscall NiKFMTool::~NiKFMTool(NiKFMTool *this)
{
  NiKFMTool *v1; // ebx@1
  char *v2; // ST0C_4@1
  unsigned int v3; // ecx@1
  unsigned int v4; // eax@1
  NiTMapItem<unsigned int,NiKFMTool::Sequence *> **v5; // edx@2
  NiTMapItem<unsigned int,NiKFMTool::Sequence *> *v6; // eax@5
  NiTMapItem<unsigned int,NiKFMTool::Sequence *> *v7; // esi@6
  NiKFMTool::Sequence *v8; // edi@7
  int v9; // eax@10
  unsigned int v10; // edx@10
  unsigned int v11; // eax@10
  NiTMapItem<unsigned int,NiKFMTool::Sequence *> **v12; // ecx@11
  unsigned int v13; // edx@19
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v14; // edi@19
  unsigned int v15; // eax@19
  NiTMapItem<unsigned int,NiKFMTool::SequenceGroup *> **v16; // ecx@20
  NiTMapItem<unsigned int,NiKFMTool::SequenceGroup *> *v17; // eax@23
  NiTMapItem<unsigned int,NiVBSet *> *v18; // esi@24
  NiVBSet *v19; // ebx@25
  int v20; // eax@28
  unsigned int v21; // edx@28
  unsigned int v22; // eax@28
  NiTMapItem<unsigned int,NiVBSet *> **v23; // ecx@29
  NiKFMTool::Transition *v24; // esi@37
  NiKFMTool::Transition *v25; // esi@39
  NiKFMTool *v26; // [sp+Ch] [bp-8h]@1
  NiKFMTool::Sequence *pkSequence; // [sp+10h] [bp-4h]@7

  v1 = this;
  v2 = this->m_pcBaseKFMPath;
  v26 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiKFMTool::`vftable';
  operator delete(v2);
  operator delete(v1->m_pcFullPathBuffer);
  operator delete(v1->m_pcModelPath);
  operator delete(v1->m_pcModelRoot);
  v3 = v1->m_mapSequences.m_uiHashSize;
  v4 = 0;
  if ( v3 )
  {
    v5 = v1->m_mapSequences.m_ppkHashTable;
    while ( !*v5 )
    {
      ++v4;
      ++v5;
      if ( v4 >= v3 )
        goto LABEL_5;
    }
    v6 = v1->m_mapSequences.m_ppkHashTable[v4];
  }
  else
  {
LABEL_5:
    v6 = 0;
  }
  v7 = v6;
  while ( v7 )
  {
    v8 = v7->m_val;
    pkSequence = v7->m_val;
    if ( v7->m_pkNext )
    {
      v7 = v7->m_pkNext;
    }
    else
    {
      v9 = v1->m_mapSequences.vfptr->KeyToHashIndex(
             (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *> *)&v1->m_mapSequences,
             v7->m_key);
      v10 = v1->m_mapSequences.m_uiHashSize;
      v11 = v9 + 1;
      if ( v11 >= v10 )
      {
LABEL_14:
        v7 = 0;
      }
      else
      {
        v12 = &v1->m_mapSequences.m_ppkHashTable[v11];
        while ( 1 )
        {
          v7 = *v12;
          if ( *v12 )
            break;
          ++v11;
          ++v12;
          if ( v11 >= v10 )
            goto LABEL_14;
        }
      }
      v8 = pkSequence;
    }
    if ( v8 )
    {
      NiKFMTool::Sequence::~Sequence(v8);
      operator delete(v8);
    }
  }
  v13 = v1->m_mapSequenceGroups.m_uiHashSize;
  v14 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v1->m_mapSequenceGroups;
  v15 = 0;
  if ( v13 )
  {
    v16 = v1->m_mapSequenceGroups.m_ppkHashTable;
    while ( !*v16 )
    {
      ++v15;
      ++v16;
      if ( v15 >= v13 )
        goto LABEL_23;
    }
    v17 = v1->m_mapSequenceGroups.m_ppkHashTable[v15];
  }
  else
  {
LABEL_23:
    v17 = 0;
  }
  v18 = (NiTMapItem<unsigned int,NiVBSet *> *)v17;
  if ( v17 )
  {
    do
    {
      v19 = v18->m_val;
      if ( v18->m_pkNext )
      {
        v18 = v18->m_pkNext;
      }
      else
      {
        v20 = v14->vfptr->KeyToHashIndex(v14, v18->m_key);
        v21 = v14->m_uiHashSize;
        v22 = v20 + 1;
        if ( v22 >= v21 )
        {
LABEL_32:
          v18 = 0;
        }
        else
        {
          v23 = &v14->m_ppkHashTable[v22];
          while ( 1 )
          {
            v18 = *v23;
            if ( *v23 )
              break;
            ++v22;
            ++v23;
            if ( v22 >= v21 )
              goto LABEL_32;
          }
        }
      }
      if ( v19 )
      {
        operator delete((void *)v19->m_uiFVF);
        operator delete((void *)v19->m_uiFlags);
        operator delete(v19);
      }
    }
    while ( v18 );
    v1 = v26;
  }
  v24 = v1->m_pkDefaultSyncTrans;
  if ( v24 )
  {
    NiKFMTool::Transition::ClearBlendPairs(v1->m_pkDefaultSyncTrans);
    operator delete(v24->m_aChainInfo.m_pBase);
    operator delete(v24->m_aBlendPairs.m_pBase);
    operator delete(v24);
  }
  v25 = v1->m_pkDefaultNonSyncTrans;
  if ( v25 )
  {
    NiKFMTool::Transition::ClearBlendPairs(v1->m_pkDefaultNonSyncTrans);
    operator delete(v25->m_aChainInfo.m_pBase);
    operator delete(v25->m_aBlendPairs.m_pBase);
    operator delete(v25);
  }
  v14->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *>Vtbl *)&NiTPointerMap<unsigned int,NiKFMTool::SequenceGroup *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll(v14);
  v14->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::SequenceGroup *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll(v14);
  operator delete(v14->m_ppkHashTable);
  v1->m_mapSequences.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *>Vtbl *)&NiTPointerMap<unsigned int,NiKFMTool::Sequence *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll((NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v1->m_mapSequences);
  v1->m_mapSequences.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll((NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v1->m_mapSequences);
  operator delete(v1->m_mapSequences.m_ppkHashTable);
  v1->vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9E4F1C: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Sequence *>::`vftable')(void *p, char);
// 9E4F3C: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::SequenceGroup *>::`vftable')(void *p, char);
// 9E4F6C: using guessed type int (__thiscall *NiTPointerMap<unsigned int,NiKFMTool::Sequence *>::`vftable')(void *p, char);
// 9E4F8C: using guessed type int (__thiscall *NiTPointerMap<unsigned int,NiKFMTool::SequenceGroup *>::`vftable')(void *p, char);
// 9E5034: using guessed type int (__thiscall *NiKFMTool::`vftable')(void *p, char);

//----- (007D0100) --------------------------------------------------------
NiActorManager *__cdecl NiActorManager::Create(NiKFMTool *pkKFMTool, const char *pcKFMFilePath, bool bCumulativeAnimations, bool bLoadFilesFromDisk, NiStream *pkStream)
{
  NiStream *v5; // ebx@1
  unsigned int v6; // kr00_4@1
  char *v7; // eax@1
  NiActorManager *v8; // eax@1
  NiActorManager *v9; // eax@2
  NiActorManager *v10; // esi@2
  NiStream *v11; // eax@6
  NiStream *v12; // eax@7
  bool bDeleteStream; // [sp+Fh] [bp-50Dh]@5
  NiFilename kFilename; // [sp+10h] [bp-50Ch]@1
  char acKFMPath[260]; // [sp+414h] [bp-108h]@1

  v5 = pkStream;
  NiFilename::NiFilename(&kFilename, pcKFMFilePath);
  NiSprintf(acKFMPath, 0x104u, "%s%s", kFilename.m_acDrive, &kFilename);
  operator delete(pkKFMTool->m_pcBaseKFMPath);
  pkKFMTool->m_pcBaseKFMPath = 0;
  v6 = strlen(acKFMPath);
  v7 = (char *)operator new(v6 + 1);
  pkKFMTool->m_pcBaseKFMPath = v7;
  strcpy_s(v7, v6 + 1, acKFMPath);
  v8 = (NiActorManager *)operator new(0xBCu);
  if ( v8 )
  {
    NiActorManager::NiActorManager(v8, pkKFMTool, bCumulativeAnimations);
    v10 = v9;
  }
  else
  {
    v10 = 0;
  }
  if ( !bLoadFilesFromDisk )
    return v10;
  bDeleteStream = 0;
  if ( !pkStream )
  {
    v11 = (NiStream *)operator new(0x3D8u);
    if ( v11 )
    {
      NiStream::NiStream(v11);
      v5 = v12;
    }
    else
    {
      v5 = 0;
    }
    bDeleteStream = 1;
  }
  if ( NiActorManager::Initialize(v10, (int)v5, v5) )
  {
    if ( bDeleteStream && v5 )
      v5->vfptr->__vecDelDtor(v5, 1u);
    return v10;
  }
  if ( v10 )
    v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
  return 0;
}

//----- (007D0250) --------------------------------------------------------
void __thiscall NiActorManager::BuildTimeline(NiActorManager *this)
{
  NiActorManager *v1; // ebx@1
  NiTListItem<NiActorManager::TimelineData> *v2; // esi@1
  NiTListItem<NiActorManager::TimelineData> *v3; // ST08_4@2
  unsigned int v4; // eax@3
  NiActorManager::CallbackData *v5; // ebx@4
  unsigned int v6; // edi@5
  unsigned int v7; // edx@6
  unsigned int v8; // eax@6
  NiTMapItem<unsigned int,NiControllerSequence *> **v9; // ecx@7
  NiTMapItem<unsigned int,NiControllerSequence *> *v10; // eax@10
  NiTMapItem<unsigned int,NiControllerSequence *> *v11; // edi@11
  unsigned int v12; // ebx@12
  int v13; // eax@13
  unsigned int v14; // edx@13
  unsigned int v15; // eax@13
  NiTMapItem<unsigned int,NiControllerSequence *> **v16; // ecx@14
  NiTextKeyMatch *v17; // esi@18
  NiTextKeyMatch *v18; // esi@27
  NiTListItem<NiActorManager::TimelineData> *v19; // eax@34
  unsigned int ui; // [sp+Ch] [bp-Ch]@3
  NiActorManager::CallbackData *pkCallbackData; // [sp+10h] [bp-8h]@4
  NiActorManager *v22; // [sp+14h] [bp-4h]@1

  v1 = this;
  v2 = this->m_kTimeline.m_pkHead;
  v22 = this;
  while ( v2 )
  {
    v3 = v2;
    v2 = v2->m_pkNext;
    v1->m_kTimeline.vfptr->DeleteItem(
      (NiTListBase<NiTObjectAllocator<NiActorManager::TimelineData>,NiActorManager::TimelineData> *)&v1->m_kTimeline,
      v3);
  }
  v4 = 0;
  v1->m_kTimeline.m_kAllocator.m_uiCount = 0;
  v1->m_kTimeline.m_pkHead = 0;
  v1->m_kTimeline.m_pkTail = 0;
  ui = 0;
  if ( v1->m_kCallbacks.m_uiSize )
  {
    do
    {
      v5 = v1->m_kCallbacks.m_pBase[v4].m_pObject;
      pkCallbackData = v5;
      if ( v5 )
      {
        v6 = v5->m_eSequenceID;
        if ( v6 == -1 )
        {
          v7 = v22->m_kSequenceMap.m_uiHashSize;
          v8 = 0;
          if ( v7 )
          {
            v9 = v22->m_kSequenceMap.m_ppkHashTable;
            while ( !*v9 )
            {
              ++v8;
              ++v9;
              if ( v8 >= v7 )
                goto LABEL_10;
            }
            v10 = v22->m_kSequenceMap.m_ppkHashTable[v8];
          }
          else
          {
LABEL_10:
            v10 = 0;
          }
          v11 = v10;
          while ( v11 )
          {
            v12 = v11->m_key;
            v11 = v11->m_pkNext;
            if ( !v11 )
            {
              v13 = v22->m_kSequenceMap.vfptr->KeyToHashIndex(
                      (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiControllerSequence *> *)&v22->m_kSequenceMap,
                      v12);
              v14 = v22->m_kSequenceMap.m_uiHashSize;
              v15 = v13 + 1;
              if ( v15 >= v14 )
              {
LABEL_17:
                v11 = 0;
              }
              else
              {
                v16 = &v22->m_kSequenceMap.m_ppkHashTable[v15];
                while ( !*v16 )
                {
                  ++v15;
                  ++v16;
                  if ( v15 >= v14 )
                    goto LABEL_17;
                }
                v11 = *v16;
              }
            }
            v17 = pkCallbackData->m_spMatchObject.m_pObject;
            if ( v17 )
              InterlockedIncrement((volatile LONG *)&v17->m_uiRefCount);
            NiActorManager::AddTimelineDataObject(v22, pkCallbackData->m_eEventType, v12, v17);
            if ( v17 && !InterlockedDecrement((volatile LONG *)&v17->m_uiRefCount) )
              v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
          }
        }
        else
        {
          v18 = v5->m_spMatchObject.m_pObject;
          if ( v18 )
            InterlockedIncrement((volatile LONG *)&v18->m_uiRefCount);
          NiActorManager::AddTimelineDataObject(v22, v5->m_eEventType, v6, v18);
          if ( v18 && !InterlockedDecrement((volatile LONG *)&v18->m_uiRefCount) )
            v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
        }
      }
      v4 = ui + 1;
      ui = v4;
      v1 = v22;
    }
    while ( v4 < v22->m_kCallbacks.m_uiSize );
  }
  if ( v1->m_kTimeline.m_pkTail )
  {
    v19 = v1->m_kTimeline.m_pkTail;
    if ( v19 )
      v1->m_fTimelineRefreshTime = v19->m_element.m_fEventTime;
    else
      v1->m_fTimelineRefreshTime = *(float *)&v0;
  }
  else
  {
    v1->m_fTimelineRefreshTime = 3.4028235e38;
  }
}

//----- (007D0430) --------------------------------------------------------
NiKFMTool *__thiscall NiKFMTool::`scalar deleting destructor'(NiKFMTool *this, unsigned int a2)
{
  NiKFMTool *v2; // esi@1

  v2 = this;
  NiKFMTool::~NiKFMTool(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007D0460) --------------------------------------------------------
NiActorManager *__cdecl NiActorManager::Create(const char *pcKFMFilename, bool bCumulativeAnimations, bool bLoadFilesFromDisk, NiStream *pkStream)
{
  NiKFMTool *v4; // eax@1
  NiKFMTool *v5; // eax@2
  NiKFMTool *v6; // esi@2
  NiActorManager *result; // eax@8
  NiActorManager *v8; // edi@10

  v4 = (NiKFMTool *)operator new(0x40u);
  if ( v4 )
  {
    NiKFMTool::NiKFMTool(v4, 0);
    v6 = v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  }
  else
  {
    v6 = 0;
  }
  if ( NiKFMTool::LoadFile(v6, (int)pcKFMFilename, pcKFMFilename) )
  {
    if ( v6 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    }
    result = 0;
  }
  else
  {
    v8 = NiActorManager::Create(v6, pcKFMFilename, bCumulativeAnimations, bLoadFilesFromDisk, pkStream);
    if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    result = v8;
  }
  return result;
}

//----- (007D0500) --------------------------------------------------------
void __thiscall NiActorManager::Update(NiActorManager *this, float fTime)
{
  NiActorManager *v2; // esi@1
  NiActorManager::TransitionState v3; // ecx@1
  const char *v4; // eax@5
  double v5; // st7@5
  unsigned int v6; // edx@8
  NiControllerSequence *v7; // eax@8
  AttackSequence *v8; // edi@13
  NiControllerSequence *v9; // eax@15
  unsigned int v10; // edx@20
  unsigned int v11; // eax@23
  NiControllerSequence *v12; // ecx@27
  NiControllerSequence *v13; // ebx@30
  NiControllerSequence *v14; // ebx@32
  NiKFMTool::Transition *v15; // edi@32
  unsigned int v16; // ebx@33
  NiKFMTool::Transition::ChainInfo *v17; // eax@34
  float v18; // ecx@34
  unsigned int v19; // edi@35
  char v20; // al@35
  double v21; // st7@36
  bool v22; // zf@38
  double v23; // st7@39
  NiKFMTool::Transition::BlendPair *v24; // ecx@39
  const char *v25; // eax@39
  float fDestWeight; // ST1C_4@40
  double v27; // st7@40
  NiKFMTool::Transition::BlendPair *v28; // edx@43
  NiControllerSequence *v29; // ecx@48
  NiControllerSequence *v30; // eax@55
  NiControllerManager *v31; // ecx@55
  NiControllerSequence *v32; // eax@56
  NiControllerManager *v33; // ecx@56
  NiControllerSequence *v34; // ecx@57
  NiControllerSequence *v35; // ST00_4@58
  NiControllerManager *v36; // ecx@58
  double v37; // st7@59
  int v38; // [sp+18h] [bp-18h]@0
  int v39; // [sp+1Ch] [bp-14h]@0
  int v40; // [sp+20h] [bp-10h]@0
  float fTempTime; // [sp+24h] [bp-Ch]@33
  float fTempTimea; // [sp+24h] [bp-Ch]@40
  NiKFMTool::Transition::BlendPair *pkPair; // [sp+28h] [bp-8h]@34
  unsigned int eDesiredID; // [sp+2Ch] [bp-4h]@5

  v2 = this;
  this->m_fTime = fTime;
  NiActorManager::ProcessCallbacks(this);
  v3 = v2->m_eTransitionState;
  if ( v3 )
  {
    if ( v2->m_bStartTransition && v2->m_fTransStartTime <= (double)v2->m_fTime )
    {
      if ( v3 == 1 )
      {
        v4 = v2->m_pcTargetKey;
        fTime = v2->m_fTransEndTime - v2->m_fTransStartTime;
        NiControllerSequence::StartBlend(v2->m_pkCurSequence, v2->m_pkNextSequence, fTime, v4, 0, 1.0, 1.0, 0);
        eDesiredID = LODWORD(v2->m_fTime);
        v5 = *(float *)&eDesiredID;
        v2->m_fTransStartTime = *(float *)&eDesiredID;
        v2->m_fTransEndTime = v5 + fTime;
      }
      v2->m_bStartTransition = 0;
    }
    if ( v2->m_fTransEndTime < (double)v2->m_fTime )
    {
      v6 = v2->m_eNextID;
      v7 = v2->m_pkNextSequence;
      v2->m_eTransitionState = 0;
      v2->m_pkNextSequence = 0;
      v2->m_eCurID = v6;
      v2->m_pkCurSequence = v7;
      v2->m_eNextID = -2;
      v2->m_bBuildTimeline = 1;
    }
    return;
  }
  if ( v2->m_fTimelineRefreshTime < (double)v2->m_fTime )
  {
    v2->m_bBuildTimeline = 0;
    NiActorManager::BuildTimeline(v2);
  }
  if ( !v2->m_bChainActive )
  {
    eDesiredID = v2->m_eTargetID;
LABEL_22:
    v8 = (AttackSequence *)eDesiredID;
    goto LABEL_23;
  }
  if ( -3.402823466385289e38 != v2->m_fNextChainTime )
  {
    if ( v2->m_fNextChainTime >= (double)v2->m_fTime )
      return;
    v10 = v2->m_kChainIDs.m_pkHead->m_element;
    v2->m_fNextChainTime = -3.4028235e38;
    eDesiredID = v10;
    goto LABEL_22;
  }
  *(float *)&v8 = COERCE_FLOAT(NiTPointerListBase<NiTPointerAllocator<unsigned int>,unsigned int>::RemoveHead((NiTPointerListBase<DFALL<AttackSequence *>,AttackSequence *> *)&v2->m_kChainIDs));
  eDesiredID = (unsigned int)v8;
  fTime = NiTPointerListBase<NiTPointerAllocator<unsigned int>,float>::RemoveHead((NiTPointerListBase<NiTPointerAllocator<unsigned int>,float> *)&v2->m_kChainDurations.vfptr);
  if ( v2->m_kChainIDs.m_kAllocator.m_uiCount )
  {
    if ( -1.0 != fTime
      || (v9 = NiActorManager::GetSequence(v2, (unsigned int)v8),
          fTime = NiControllerSequence::GetTimeAt(v9, "end", v2->m_fTime) - v2->m_fTime,
          fTime = fTime - 0.0333000011742115,
          fTime >= 0.0) )
    {
      v2->m_fNextChainTime = fTime + v2->m_fTime;
    }
    else
    {
      v2->m_fNextChainTime = (float)0.0 + v2->m_fTime;
    }
    return;
  }
  v2->m_bChainActive = 0;
  v2->m_fNextChainTime = -3.4028235e38;
LABEL_23:
  v11 = v2->m_eCurID;
  if ( v8 == (AttackSequence *)v11 )
  {
    if ( v2->m_bBuildTimeline )
    {
      v2->m_bBuildTimeline = 0;
      NiActorManager::BuildTimeline(v2);
    }
    return;
  }
  if ( *(float *)&v8 == -6.8056465e38/*NaN*/ )
  {
    NiActorManager::RaiseAnimDeactivatedEvents(v2);
    v12 = v2->m_pkCurSequence;
    v2->m_eCurID = -2;
    if ( v12 )
    {
      NiControllerSequence::Deactivate(v12, 0.0, 0);
      v2->m_pkCurSequence = 0;
    }
    return;
  }
  if ( v11 == -2 )
  {
    v13 = NiActorManager::GetSequence(v2, (unsigned int)v8);
    NiControllerSequence::Activate(v13, 0, 1, 1.0, 0.0, 0, 0);
    v2->m_eCurID = (unsigned int)v8;
    v2->m_pkCurSequence = v13;
    NiActorManager::RaiseAnimActivatedEvents(v2);
    ((void (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v2->m_spManager.m_pObject->vfptr[17].__vecDelDtor)(
      v2->m_fTime,
      v38,
      v39,
      v40);
    v2->m_bBuildTimeline = 0;
    NiActorManager::BuildTimeline(v2);
    NiActorManager::ProcessCallbacks(v2);
    return;
  }
  NiKFMTool::IsTransitionAllowed(v2->m_spKFMTool.m_pObject, v11, (unsigned int)v8, (bool *)&fTime + 3);
  if ( BYTE3(fTime) )
  {
    v14 = NiActorManager::GetSequence(v2, (unsigned int)v8);
    v15 = NiKFMTool::GetTransition(v2->m_spKFMTool.m_pObject, v2->m_eCurID, (unsigned int)v8);
    if ( v15->m_eType == 3 )
    {
      NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *>::RemoveAll((NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *> *)&v2->m_kChainIDs);
      NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *>::RemoveAll((NiTListBase<NiTPointerAllocator<unsigned int>,NSFParsedShader *> *)&v2->m_kChainDurations);
      v16 = 0;
      fTempTime = *(float *)&v15->m_aChainInfo.m_uiUsed;
      if ( fTempTime != 0.0 )
      {
        do
        {
          v17 = v15->m_aChainInfo.m_pBase;
          v18 = *(float *)&v17[v16].m_uiSequenceID;
          pkPair = (NiKFMTool::Transition::BlendPair *)LODWORD(v17[v16].m_fDuration);
          fTime = v18;
          NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
            (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v2->m_kChainIDs,
            (NiD3DXEffectParameter *const *)&fTime);
          NiTPointerListBase<NiTPointerAllocator<unsigned int>,float>::AddTail(
            (NiTPointerListBase<NiTPointerAllocator<unsigned int>,float> *)&v2->m_kChainDurations.vfptr,
            (const float *)&pkPair);
          ++v16;
        }
        while ( v16 < LODWORD(fTempTime) );
      }
      NiTPointerListBase<DFALL<AutoSizingDialogWin::VirtualRect *>,AutoSizingDialogWin::VirtualRect *>::AddTail(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,NiD3DXEffectParameter *> *)&v2->m_kChainIDs,
        (NiD3DXEffectParameter *const *)&eDesiredID);
      NiTPointerListBase<NiTPointerAllocator<unsigned int>,float>::AddTail(
        (NiTPointerListBase<NiTPointerAllocator<unsigned int>,float> *)&v2->m_kChainDurations.vfptr,
        &NiKFMTool::MAX_DURATION);
      v19 = v2->m_kChainIDs.m_pkHead->m_element;
      eDesiredID = v19;
      v20 = NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
              (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v2->m_kSequenceMap,
              v19,
              (NiVBSet **)&fTime);
      v14 = (NiControllerSequence *)(v20 != 0 ? LODWORD(fTime) : 0);
      v15 = NiKFMTool::GetTransition(v2->m_spKFMTool.m_pObject, v2->m_eCurID, v19);
      v2->m_bChainActive = 1;
      v2->m_fNextChainTime = -3.4028235e38;
    }
    v21 = v2->m_fTime;
    v2->m_pcTargetKey = 0;
    v2->m_fTransStartTime = v21;
    if ( v15->m_eType == TYPE_BLEND )
    {
      if ( v15->m_aBlendPairs.m_uiUsed )
      {
        NiControllerSequence::Update(v2->m_pkCurSequence, v2->m_fTime, 0);
        v2->m_fTransStartTime = 3.4028235e38;
        v22 = v15->m_aBlendPairs.m_uiUsed == 0;
        fTime = 0.0;
        if ( !v22 )
        {
          while ( 1 )
          {
            v23 = v2->m_fTime;
            v24 = v15->m_aBlendPairs.m_pBase[LODWORD(fTime)];
            v25 = v24->m_pcStartKey;
            pkPair = v15->m_aBlendPairs.m_pBase[LODWORD(fTime)];
            if ( !v25 )
              break;
            fDestWeight = v23;
            fTempTimea = NiControllerSequence::GetTimeAt(v2->m_pkCurSequence, v25, fDestWeight);
            v27 = fTempTimea;
            if ( -3.4028235e38 != fTempTimea && v2->m_fTime <= v27 && v2->m_fTransStartTime > v27 )
            {
              v28 = pkPair;
              v2->m_fTransStartTime = fTempTimea;
              v2->m_pcTargetKey = v28->m_pcTargetKey;
            }
            if ( ++LODWORD(fTime) >= v15->m_aBlendPairs.m_uiUsed )
              goto LABEL_47;
          }
          v2->m_fTransStartTime = v23;
          v2->m_pcTargetKey = v24->m_pcTargetKey;
        }
      }
    }
LABEL_47:
    if ( !v14 )
    {
      NiActorManager::RaiseAnimDeactivatedEvents(v2);
      v29 = v2->m_pkCurSequence;
      v2->m_eCurID = -2;
      if ( v29 )
      {
        NiControllerSequence::Deactivate(v29, 0.0, 0);
        v2->m_pkCurSequence = 0;
      }
      if ( v2->m_bChainActive )
        v2->m_bChainActive = 0;
      return;
    }
    v2->m_fTransEndTime = v15->m_fDuration + v2->m_fTransStartTime;
    NiControllerSequence::Update(v14, v2->m_fTime, 0);
    if ( v15->m_eType )
    {
      if ( v15->m_eType == 1 )
      {
        v32 = v2->m_pkCurSequence;
        v2->m_fTransStartFrameTime = v32->m_fLastScaledTime;
        v33 = v2->m_spManager.m_pObject;
        NiControllerManager::Morph(v32, v14, v15->m_fDuration, 0, 1.0, 1.0);
        v2->m_eTransitionState = 2;
      }
      else if ( v15->m_eType == 2 )
      {
        v30 = v2->m_pkCurSequence;
        v2->m_fTransStartFrameTime = v30->m_fLastScaledTime;
        v31 = v2->m_spManager.m_pObject;
        NiControllerManager::CrossFade(v30, v14, v15->m_fDuration, 0, 1, 1.0, 0);
        v2->m_eTransitionState = 3;
      }
    }
    else
    {
      v34 = v2->m_pkCurSequence;
      v2->m_fTransStartFrameTime = v34->m_fLastScaledTime;
      if ( v2->m_fTime == v2->m_fTransStartTime )
      {
        v35 = v34;
        v36 = v2->m_spManager.m_pObject;
        NiControllerManager::BlendFromSequence(v35, v14, v15->m_fDuration, v2->m_pcTargetKey, 0, 1.0, 1.0, 0);
      }
      else
      {
        fTime = v2->m_fTransStartTime - v2->m_fTime;
        v37 = NiControllerSequence::ComputeScaledTime(v34, fTime, 0) + v2->m_fTransStartFrameTime;
        v2->m_bStartTransition = 1;
        v2->m_fTransStartFrameTime = v37;
      }
      v2->m_eTransitionState = 1;
    }
    v2->m_eNextID = eDesiredID;
    v2->m_pkNextSequence = v14;
    v2->m_bBuildTimeline = 1;
  }
  if ( v2->m_bBuildTimeline )
  {
    v2->m_bBuildTimeline = 0;
    NiActorManager::BuildTimeline(v2);
  }
}

//----- (007D0A70) --------------------------------------------------------
BOOL __cdecl NiFloatKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1)
{
  BOOL result; // eax@1

  result = NiAnimationKey::Equal(key0, key1);
  if ( (_BYTE)result )
    result = key1[1].m_fTime == key0[1].m_fTime;
  return result;
}

//----- (007D0AB0) --------------------------------------------------------
double __cdecl NiFloatKey::GenInterp(float fTime, NiFloatKey *pkKeys, NiAnimationKey::KeyType eType, unsigned int uiNumKeys, unsigned int *uiLastIdx, char ucSize)
{
  double result; // st7@2
  unsigned int *v7; // edx@3
  NiFloatKey *v8; // ebx@3
  int v9; // edi@3
  unsigned int v10; // esi@3
  double v11; // st7@3
  unsigned int v12; // ecx@5
  int v13; // esi@7
  unsigned int *v14; // ebx@7
  unsigned int *v15; // edi@7
  double v16; // st6@8
  int v17; // eax@10
  int v18; // edi@15
  unsigned int *v19; // esi@15
  int v20; // esi@22
  int v21; // ecx@22
  unsigned int uiNumKeysM1; // [sp+20h] [bp-10h]@3
  unsigned int *v23; // [sp+24h] [bp-Ch]@7
  unsigned int *v24; // [sp+28h] [bp-8h]@7
  float fLastTime; // [sp+2Ch] [bp-4h]@3

  if ( uiNumKeys == 1 )
  {
    result = pkKeys->m_fValue;
  }
  else
  {
    v7 = uiLastIdx;
    v8 = pkKeys;
    v9 = (unsigned __int8)ucSize;
    v10 = uiNumKeys - 1;
    uiNumKeysM1 = uiNumKeys - 1;
    fLastTime = *(float *)((char *)&pkKeys->m_fTime + (unsigned __int8)ucSize * *uiLastIdx);
    v11 = fTime;
    if ( fLastTime > (double)fTime )
    {
      *uiLastIdx = 0;
      fLastTime = pkKeys->m_fTime;
    }
    v12 = *v7 + 1;
    if ( v12 > v10 )
    {
      v16 = *(float *)&uiNumKeys;
    }
    else if ( (signed int)(v10 - v12 + 1) < 4 )
    {
      v16 = *(float *)&uiNumKeys;
LABEL_14:
      if ( v12 <= v10 )
      {
        v18 = (unsigned __int8)ucSize;
        v19 = (unsigned int *)((char *)v8 + v12 * (unsigned __int8)ucSize);
        do
        {
          uiNumKeys = *v19;
          v16 = *(float *)&uiNumKeys;
          if ( *(float *)&uiNumKeys >= v11 )
            break;
          ++*v7;
          fLastTime = v16;
          ++v12;
          v19 = (unsigned int *)((char *)v19 + v18);
        }
        while ( v12 <= uiNumKeysM1 );
      }
    }
    else
    {
      v24 = (unsigned int *)((char *)pkKeys + v12 * v9);
      v13 = 4 * v9;
      v23 = (unsigned int *)((char *)pkKeys + v9 * (*v7 + 4));
      v14 = (unsigned int *)((char *)pkKeys + v9 * (*v7 + 3));
      v15 = (unsigned int *)((char *)pkKeys + (unsigned __int8)ucSize * (*v7 + 2));
      while ( 1 )
      {
        uiNumKeys = *v24;
        v16 = *(float *)&uiNumKeys;
        if ( *(float *)&uiNumKeys >= v11 )
          break;
        ++*v7;
        fLastTime = v16;
        uiNumKeys = *v15;
        v16 = *(float *)&uiNumKeys;
        if ( *(float *)&uiNumKeys >= v11 )
        {
          ++v12;
          break;
        }
        fLastTime = *(float *)&uiNumKeys;
        v17 = *v7 + 1;
        *v7 = v17;
        uiNumKeys = *v14;
        v16 = *(float *)&uiNumKeys;
        if ( *(float *)&uiNumKeys >= v11 )
        {
          v12 += 2;
          break;
        }
        fLastTime = *(float *)&uiNumKeys;
        *v7 = v17 + 1;
        uiNumKeys = *v23;
        v16 = *(float *)&uiNumKeys;
        if ( *(float *)&uiNumKeys >= v11 )
        {
          v12 += 3;
          break;
        }
        fLastTime = *(float *)&uiNumKeys;
        v24 = (unsigned int *)((char *)v24 + v13);
        v23 = (unsigned int *)((char *)v23 + v13);
        *v7 = v17 + 2;
        v12 += 4;
        v15 = (unsigned int *)((char *)v15 + v13);
        v14 = (unsigned int *)((char *)v14 + v13);
        if ( v12 > uiNumKeysM1 - 3 )
        {
          v8 = pkKeys;
          v10 = uiNumKeysM1;
          goto LABEL_14;
        }
      }
      v8 = pkKeys;
    }
    v20 = v12 * (unsigned __int8)ucSize;
    v21 = (unsigned __int8)ucSize * *v7;
    *(float *)&uiNumKeys = (v11 - fLastTime) / (v16 - fLastTime);
    ((void (__cdecl *)(unsigned int, char *, char *, unsigned int *))(&NiAnimationKey::ms_interps)[eType])(
      uiNumKeys,
      (char *)v8 + v21,
      (char *)v8 + v20,
      &uiNumKeys);
    result = *(float *)&uiNumKeys;
  }
  return result;
}
// B61E38: using guessed type void (__cdecl static **NiAnimationKey::ms_interps)(float, const struct NiAnimationKey *, const struct NiAnimationKey *, void *);

//----- (007D0C80) --------------------------------------------------------
double __cdecl NiFloatKey::GenInterpDefault(float fTime, NiFloatKey *pkKeys, NiAnimationKey::KeyType eType, unsigned int uiNumKeys, char ucSize)
{
  double result; // st7@3
  unsigned int v6; // ST0C_4@6

  if ( uiNumKeys )
  {
    if ( pkKeys->m_fTime <= (double)fTime )
    {
      if ( *(float *)((char *)&pkKeys->m_fTime + (unsigned __int8)ucSize * (uiNumKeys - 1)) >= (double)fTime )
      {
        v6 = uiNumKeys;
        uiNumKeys = 0;
        result = NiFloatKey::GenInterp(fTime, pkKeys, eType, v6, &uiNumKeys, ucSize);
      }
      else
      {
        result = *(float *)((char *)&pkKeys->m_fValue + (unsigned __int8)ucSize * (uiNumKeys - 1));
      }
    }
    else
    {
      result = pkKeys->m_fValue;
    }
  }
  else
  {
    result = NiFloatKey::ms_fDefault;
  }
  return result;
}
// B6186C: using guessed type float NiFloatKey::ms_fDefault;

//----- (007D0D00) --------------------------------------------------------
int __cdecl NiFloatKey::RegisterLoader()
{
  int result; // eax@1

  result = 0;
  if ( !bRegistered )
  {
    NiAnimationKey::ms_curves = 0;
    NiAnimationKey::ms_interpd1s = 0;
    NiAnimationKey::ms_interpd2s = 0;
    NiAnimationKey::ms_inserts = 0;
    bRegistered = 1;
    NiAnimationKey::ms_loaders = (struct NiAnimationKey *(__cdecl static **)(struct NiStream *, unsigned int))Item::GetCurUpGradeLevel;
    NiAnimationKey::ms_saves = (void (__cdecl static **)(struct NiStream *, struct NiAnimationKey *, unsigned int))ITableBase<TextDataType3,TextData3>::BeforeTerminate;
    NiAnimationKey::ms_copies = (void (__cdecl static **)(struct NiAnimationKey *, const struct NiAnimationKey *))ITableBase<TextDataType3,TextData3>::BeforeTerminate;
    NiAnimationKey::ms_arrays = (struct NiAnimationKey *(__cdecl static **)(unsigned int))Item::GetCurUpGradeLevel;
    NiAnimationKey::ms_deletes = (void (__cdecl static **)(struct NiAnimationKey *))ITableBase<TextDataType3,TextData3>::BeforeTerminate;
    LOBYTE(NiAnimationKey::ms_keysizes) = 8;
    NiAnimationKey::ms_interps = (void (__cdecl static **)(float, const struct NiAnimationKey *, const struct NiAnimationKey *, void *))ITableBase<TextDataType3,TextData3>::BeforeTerminate;
    NiAnimationKey::ms_equals = (bool (__cdecl static **)(const struct NiAnimationKey *, const struct NiAnimationKey *))NiFloatKey::Equal;
    NiAnimationKey::ms_fillderived = (void (__cdecl static **)(struct NiAnimationKey *, unsigned int, unsigned __int8))ITableBase<TextDataType3,TextData3>::BeforeTerminate;
    result = 1;
  }
  return result;
}
// B61900: using guessed type unsigned __int8 *NiAnimationKey::ms_keysizes;
// B61928: using guessed type void (__cdecl static **NiAnimationKey::ms_fillderived)(struct NiAnimationKey *, unsigned int, unsigned __int8);
// B619B8: using guessed type bool (__cdecl static **NiAnimationKey::ms_inserts)(float, struct NiAnimationKey **, unsigned int *);
// B61A48: using guessed type void (__cdecl static **NiAnimationKey::ms_deletes)(struct NiAnimationKey *);
// B61AD8: using guessed type struct NiAnimationKey *(__cdecl static **NiAnimationKey::ms_arrays)(unsigned int);
// B61B68: using guessed type void (__cdecl static **NiAnimationKey::ms_copies)(struct NiAnimationKey *, const struct NiAnimationKey *);
// B61BF8: using guessed type void (__cdecl static **NiAnimationKey::ms_saves)(struct NiStream *, struct NiAnimationKey *, unsigned int);
// B61C88: using guessed type bool (__cdecl static **NiAnimationKey::ms_equals)(const struct NiAnimationKey *, const struct NiAnimationKey *);
// B61D18: using guessed type void (__cdecl static **NiAnimationKey::ms_interpd2s)(float, const struct NiAnimationKey *, const struct NiAnimationKey *, void *);
// B61DA8: using guessed type void (__cdecl static **NiAnimationKey::ms_interpd1s)(float, const struct NiAnimationKey *, const struct NiAnimationKey *, void *);
// B61E38: using guessed type void (__cdecl static **NiAnimationKey::ms_interps)(float, const struct NiAnimationKey *, const struct NiAnimationKey *, void *);
// B61EC8: using guessed type float (__cdecl static **NiAnimationKey::ms_curves)(struct NiAnimationKey *, unsigned int);
// B61F58: using guessed type struct NiAnimationKey *(__cdecl static **NiAnimationKey::ms_loaders)(struct NiStream *, unsigned int);

//----- (007D0D90) --------------------------------------------------------
void __thiscall NiFloatKey::LoadBinary(NiFloatKey *this, NiStream *stream)
{
  NiStream *v2; // edi@1
  NiFloatKey *v3; // esi@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@1
  NiBinaryStream *v5; // ST00_4@1

  v2 = stream;
  v3 = this;
  NiAnimationKey::LoadBinary((NiAnimationKey *)&this->m_fTime, stream);
  v4 = v2->m_pkIstr->m_pfnRead;
  v5 = v2->m_pkIstr;
  stream = (NiStream *)4;
  v4(v5, &v3->m_fValue, 4u, (unsigned int *)&stream, 1u);
}

//----- (007D0DD0) --------------------------------------------------------
void __cdecl NiFloatKey::SaveBinary(NiStream *stream, NiAnimationKey *pkKey)
{
  NiAnimationKey *v2; // esi@1
  unsigned int (__cdecl *v3)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@1
  NiBinaryStream *v4; // ST00_4@1

  v2 = pkKey;
  NiAnimationKey::SaveBinary(stream, (const int *)pkKey);
  v3 = stream->m_pkOstr->m_pfnWrite;
  v4 = stream->m_pkOstr;
  pkKey = (NiAnimationKey *)4;
  v3(v4, &v2[1], 4u, (unsigned int *)&pkKey, 1u);
}

//----- (007D0E10) --------------------------------------------------------
BOOL __cdecl NiBezFloatKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1)
{
  BOOL result; // eax@1

  result = NiFloatKey::Equal(key0, key1);
  if ( (_BYTE)result )
    result = key1[2].m_fTime == key0[2].m_fTime && key1[3].m_fTime == key0[3].m_fTime;
  return result;
}

//----- (007D0E60) --------------------------------------------------------
void __cdecl NiBezFloatKey::Copy(NiAnimationKey *pkNewKey, NiAnimationKey *pkOrigKey)
{
  COERCE_NIANIMATIONKEY(pkNewKey->m_fTime) = COERCE_NIANIMATIONKEY(pkOrigKey->m_fTime);
  COERCE_NIANIMATIONKEY(pkNewKey[1].m_fTime) = pkOrigKey[1];
  COERCE_NIANIMATIONKEY(pkNewKey[2].m_fTime) = pkOrigKey[2];
  COERCE_NIANIMATIONKEY(pkNewKey[3].m_fTime) = pkOrigKey[3];
}

//----- (007D0E90) --------------------------------------------------------
int __cdecl NiMemcpy(void *pvDest, const void *pvSrc, unsigned int uiCount)
{
  return memcpy_s(pvDest, uiCount, pvSrc, uiCount);
}

//----- (007D0EB0) --------------------------------------------------------
void __cdecl NiBezFloatKey::Interpolate(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult)
{
  *(float *)pResult = NiInterpScalar::TCB(fTime, pKey0[1].m_fTime, pKey0[3].m_fTime, pKey1[1].m_fTime, pKey1[2].m_fTime);
}

//----- (007D0F10) --------------------------------------------------------
NiAnimationKey *__cdecl NiStepPosKey::CreateArray(unsigned int uiNumKeys)
{
  unsigned int v1; // ecx@1
  void *v2; // eax@1
  NiAnimationKey *result; // eax@2

  v1 = 16 * uiNumKeys | -((unsigned __int64)uiNumKeys >> 28 != 0);
  v2 = operator new((v1 + 4) | -__CFADD__(v1, 4));
  if ( v2 )
  {
    *(_DWORD *)v2 = uiNumKeys;
    result = (NiAnimationKey *)((char *)v2 + 4);
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007D0F50) --------------------------------------------------------
char __cdecl NiBezFloatKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys)
{
  unsigned int v3; // edx@1
  unsigned int v4; // esi@2
  int v5; // ecx@2
  void *v6; // eax@2
  NiBezFloatKey *v7; // edi@3
  unsigned int v8; // esi@7
  double v9; // st6@7
  double v10; // st5@9
  unsigned int v11; // edi@9
  float fNewValue; // ST1C_4@9
  NiBezFloatKey *v13; // eax@10
  char result; // al@12
  float fLastValue; // [sp+34h] [bp-24h]@9
  float fCurrentOut; // [sp+38h] [bp-20h]@9
  float fNextValue; // [sp+3Ch] [bp-1Ch]@9
  float fNextTime; // [sp+40h] [bp-18h]@9
  NiBezFloatKey *pkBezFloatKeys; // [sp+44h] [bp-14h]@1
  float fNextIn; // [sp+48h] [bp-10h]@7
  float fLastOut; // [sp+4Ch] [bp-Ch]@9
  NiBezFloatKey *pkNewKeys; // [sp+50h] [bp-8h]@3
  unsigned int uiInsertAt; // [sp+54h] [bp-4h]@1

  v3 = *uiNumKeys;
  pkBezFloatKeys = (NiBezFloatKey *)*pkKeys;
  if ( NiAnimationKey::OkayToInsert(fTime, (NiAnimationKey *)&pkBezFloatKeys->m_fTime, v3, &uiInsertAt, 16) )
  {
    v4 = *uiNumKeys + 1;
    v5 = (unsigned __int64)v4 >> 28 != 0;
    v6 = operator new(((16 * v4 | -v5) + 4) | -__CFADD__(16 * v4 | -v5, 4));
    if ( v6 )
    {
      v7 = (NiBezFloatKey *)((char *)v6 + 4);
      *(_DWORD *)v6 = v4;
      pkNewKeys = (NiBezFloatKey *)((char *)v6 + 4);
    }
    else
    {
      pkNewKeys = 0;
      v7 = 0;
    }
    memcpy_s(v7, 16 * (*uiNumKeys + 1), pkBezFloatKeys, 16 * uiInsertAt);
    if ( *uiNumKeys > uiInsertAt )
      memcpy_s(
        &v7[uiInsertAt + 1],
        16 * (*uiNumKeys - uiInsertAt),
        &pkBezFloatKeys[uiInsertAt],
        16 * (*uiNumKeys - uiInsertAt));
    fNextIn = NiFloatKey::GenInterpDefault(fTime, (NiFloatKey *)&pkBezFloatKeys->m_fTime, BEZKEY, *uiNumKeys, 16);
    v8 = (unsigned int)&v7[uiInsertAt];
    *(float *)v8 = fTime;
    v9 = fNextIn;
    *(float *)(v8 + 4) = fNextIn;
    *(float *)(v8 + 8) = 0.0;
    *(float *)(v8 + 12) = 0.0;
    if ( uiInsertAt && uiInsertAt != *uiNumKeys )
    {
      v10 = *((float *)&v7[uiInsertAt] - 3);
      v11 = (unsigned int)&v7[uiInsertAt];
      fLastValue = v10;
      fCurrentOut = *(float *)(v11 - 16);
      fLastOut = *(float *)(v11 - 4);
      fNextValue = *(float *)(v11 + 20);
      fNextTime = *(float *)(v11 + 16);
      fNextIn = *(float *)(v11 + 24);
      fNewValue = v9;
      NiInterpScalar::AdjustBezier(
        fLastValue,
        fCurrentOut,
        &fLastOut,
        fNextValue,
        fNextTime,
        &fNextIn,
        fTime,
        fNewValue,
        &fLastValue,
        &fCurrentOut);
      *(float *)(v11 - 4) = fLastOut;
      *(float *)(v8 + 8) = fLastValue;
      *(float *)(v8 + 12) = fCurrentOut;
      *(float *)(v11 + 24) = fNextIn;
      v7 = pkNewKeys;
    }
    v13 = pkBezFloatKeys;
    ++*uiNumKeys;
    if ( v13 )
      operator delete(&v13[-1].m_fOutTan);
    *pkKeys = (NiAnimationKey *)v7;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007D1110) --------------------------------------------------------
NiBezFloatKey *__cdecl NiBezFloatKey::CreateFromStream(NiStream *stream, unsigned int uiNumKeys)
{
  unsigned int v2; // ebx@1
  unsigned int v3; // ecx@1
  void *v4; // eax@1
  NiBezFloatKey *result; // eax@2
  NiAnimationKey *v6; // esi@5
  NiBinaryStream *v7; // eax@6
  NiBinaryStream *v8; // ST14_4@6
  unsigned int (__cdecl *v9)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@6
  unsigned int (__cdecl *v10)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@6
  NiBinaryStream *v11; // ST00_4@6
  int v12; // [sp+4h] [bp-4h]@6
  NiBezFloatKey *pkBezFloatKeys; // [sp+14h] [bp+Ch]@2

  v2 = uiNumKeys;
  v3 = 16 * uiNumKeys | -((unsigned __int64)uiNumKeys >> 28 != 0);
  v4 = operator new((v3 + 4) | -__CFADD__(v3, 4));
  if ( v4 )
  {
    *(_DWORD *)v4 = uiNumKeys;
    result = (NiBezFloatKey *)((char *)v4 + 4);
    pkBezFloatKeys = result;
  }
  else
  {
    pkBezFloatKeys = 0;
    result = 0;
  }
  if ( v2 )
  {
    v6 = (NiAnimationKey *)&result->m_fOutTan;
    do
    {
      NiFloatKey::LoadBinary((NiFloatKey *)&v6[-3], stream);
      v7 = stream->m_pkIstr;
      v8 = v7;
      v9 = v7->m_pfnRead;
      v12 = 4;
      v9(v8, &v6[-1], 4u, (unsigned int *)&v12, 1u);
      v10 = stream->m_pkIstr->m_pfnRead;
      v11 = stream->m_pkIstr;
      v12 = 4;
      v10(v11, v6, 4u, (unsigned int *)&v12, 1u);
      v6 += 4;
      --v2;
    }
    while ( v2 );
    result = pkBezFloatKeys;
  }
  return result;
}

//----- (007D11C0) --------------------------------------------------------
void __cdecl NiBezFloatKey::SaveToStream(NiStream *stream, NiAnimationKey *pkKeys, unsigned int uiNumKeys)
{
  unsigned int v3; // ebx@1
  NiAnimationKey *v4; // esi@2
  NiBinaryStream *v5; // eax@3
  NiBinaryStream *v6; // ST14_4@3
  unsigned int (__cdecl *v7)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@3
  unsigned int (__cdecl *v8)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@3
  NiBinaryStream *v9; // ST00_4@3

  v3 = uiNumKeys;
  if ( uiNumKeys )
  {
    v4 = pkKeys + 3;
    do
    {
      NiFloatKey::SaveBinary(stream, v4 - 3);
      v5 = stream->m_pkOstr;
      v6 = v5;
      v7 = v5->m_pfnWrite;
      uiNumKeys = 4;
      v7(v6, &v4[-1], 4u, &uiNumKeys, 1u);
      v8 = stream->m_pkOstr->m_pfnWrite;
      v9 = stream->m_pkOstr;
      uiNumKeys = 4;
      v8(v9, v4, 4u, &uiNumKeys, 1u);
      v4 += 4;
      --v3;
    }
    while ( v3 );
  }
}

//----- (007D1230) --------------------------------------------------------
int __cdecl NiBezFloatKey::RegisterLoader()
{
  int result; // eax@1

  result = 0;
  if ( !bRegistered_0 )
  {
    dword_B61ED0 = 0;
    dword_B61DB0 = 0;
    dword_B61D20 = 0;
    bRegistered_0 = 1;
    dword_B61F60 = (int)NiBezFloatKey::CreateFromStream;
    dword_B61C00 = (int)NiBezFloatKey::SaveToStream;
    dword_B61B70 = (int)NiBezFloatKey::Copy;
    dword_B61AE0 = (int)NiStepPosKey::CreateArray;
    dword_B61A50 = (int)NiLinRotKey::DeleteArray;
    byte_B61902 = 16;
    dword_B61E40 = (int)NiBezFloatKey::Interpolate;
    dword_B61C90 = (int)NiBezFloatKey::Equal;
    dword_B61930 = (int)ITableBase<TextDataType3,TextData3>::BeforeTerminate;
    dword_B619C0 = (int)NiBezFloatKey::Insert;
    result = 1;
  }
  return result;
}
// B61902: using guessed type char byte_B61902;
// B61930: using guessed type int dword_B61930;
// B619C0: using guessed type int dword_B619C0;
// B61A50: using guessed type int dword_B61A50;
// B61AE0: using guessed type int dword_B61AE0;
// B61B70: using guessed type int dword_B61B70;
// B61C00: using guessed type int dword_B61C00;
// B61C90: using guessed type int dword_B61C90;
// B61D20: using guessed type int dword_B61D20;
// B61DB0: using guessed type int dword_B61DB0;
// B61E40: using guessed type int dword_B61E40;
// B61ED0: using guessed type int dword_B61ED0;
// B61F60: using guessed type int dword_B61F60;

//----- (007D12C0) --------------------------------------------------------
void __thiscall NiPosKey::LoadBinary(NiPosKey *this, NiStream *stream)
{
  NiPosKey *v2; // esi@1

  v2 = this;
  NiAnimationKey::LoadBinary((NiAnimationKey *)&this->m_fTime, stream);
  NiPoint3::LoadBinary(&v2->m_Pos, stream);
}

//----- (007D12E0) --------------------------------------------------------
void __cdecl NiPosKey::SaveBinary(NiStream *stream, NiAnimationKey *pkKey)
{
  NiAnimationKey::SaveBinary(stream, (const int *)pkKey);
  NiColor::SaveBinary((NiPoint3 *)&pkKey[1], stream);
}

//----- (007D1310) --------------------------------------------------------
void __cdecl NiPosKey::Interpolate(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult)
{
  *(NiPoint3 *)pResult = NiPoint3::ZERO;
}

//----- (007D1340) --------------------------------------------------------
NiPoint3 *__cdecl NiPosKey::GenInterp(NiPoint3 *result, float fTime, NiPosKey *pkKeys, NiAnimationKey::KeyType eType, unsigned int uiNumKeys, unsigned int *uiLastIdx, char ucSize)
{
  NiPoint3 *v7; // eax@2
  float v8; // ecx@2
  NiPosKey *v9; // ebx@3
  unsigned int v10; // esi@3
  unsigned int v11; // eax@3
  double v12; // st7@3
  unsigned int v13; // ecx@5
  int v14; // esi@7
  float *v15; // ebx@7
  float *v16; // edi@7
  double v17; // st6@8
  unsigned int v18; // eax@10
  int v19; // eax@11
  float *v20; // esi@15
  float v21; // edx@22
  float v22; // ecx@22
  NiPoint3 kResult; // [sp+1Ch] [bp-20h]@22
  unsigned int v24; // [sp+28h] [bp-14h]@10
  unsigned int uiNumKeysM1; // [sp+2Ch] [bp-10h]@3
  NiPosKey *v26; // [sp+30h] [bp-Ch]@7
  NiPosKey *v27; // [sp+34h] [bp-8h]@7
  float fLastTime; // [sp+38h] [bp-4h]@3
  float fNextTime; // [sp+54h] [bp+18h]@9
  float fNextTimea; // [sp+54h] [bp+18h]@10
  float fNextTimeb; // [sp+54h] [bp+18h]@11
  float fNextTimec; // [sp+54h] [bp+18h]@22

  if ( uiNumKeys == 1 )
  {
    v7 = result;
    result->x = pkKeys->m_Pos.x;
    v8 = pkKeys->m_Pos.z;
    result->y = pkKeys->m_Pos.y;
    result->z = v8;
  }
  else
  {
    v9 = pkKeys;
    v10 = uiNumKeys - 1;
    v11 = *uiLastIdx;
    uiNumKeysM1 = uiNumKeys - 1;
    fLastTime = *(float *)((char *)&pkKeys->m_fTime + (unsigned __int8)ucSize * v11);
    v12 = fTime;
    if ( fLastTime > (double)fTime )
    {
      *uiLastIdx = 0;
      fLastTime = pkKeys->m_fTime;
    }
    v13 = *uiLastIdx + 1;
    if ( v13 > v10 )
    {
      v17 = *(float *)&uiNumKeys;
    }
    else if ( (signed int)(v10 - v13 + 1) < 4 )
    {
      v17 = *(float *)&uiNumKeys;
LABEL_14:
      if ( v13 <= v10 )
      {
        v20 = (float *)((char *)&v9->m_fTime + v13 * (unsigned __int8)ucSize);
        do
        {
          v17 = *v20;
          if ( v17 >= v12 )
            break;
          ++*uiLastIdx;
          fLastTime = v17;
          ++v13;
          v20 = (float *)((char *)v20 + (unsigned __int8)ucSize);
        }
        while ( v13 <= uiNumKeysM1 );
      }
    }
    else
    {
      v27 = (NiPosKey *)((char *)pkKeys + v13 * (unsigned __int8)ucSize);
      v14 = 4 * (unsigned __int8)ucSize;
      v26 = (NiPosKey *)((char *)pkKeys + (unsigned __int8)ucSize * (v13 + 3));
      v15 = (float *)((char *)&pkKeys->m_fTime + (unsigned __int8)ucSize * (v13 + 2));
      v16 = (float *)((char *)&pkKeys->m_fTime + (unsigned __int8)ucSize * (v13 + 1));
      while ( 1 )
      {
        v17 = v27->m_fTime;
        if ( v17 >= v12 )
          break;
        ++*uiLastIdx;
        fLastTime = v17;
        fNextTime = *v16;
        v17 = fNextTime;
        if ( fNextTime >= v12 )
        {
          ++v13;
          break;
        }
        v18 = *uiLastIdx;
        fLastTime = fNextTime;
        *uiLastIdx = ++v18;
        fNextTimea = *v15;
        v24 = v18;
        v17 = fNextTimea;
        if ( fNextTimea >= v12 )
        {
          v13 += 2;
          break;
        }
        fLastTime = fNextTimea;
        v19 = v24 + 1;
        *uiLastIdx = v24 + 1;
        v24 = v19;
        fNextTimeb = v26->m_fTime;
        v17 = fNextTimeb;
        if ( fNextTimeb >= v12 )
        {
          v13 += 3;
          break;
        }
        fLastTime = fNextTimeb;
        v27 = (NiPosKey *)((char *)v27 + v14);
        v26 = (NiPosKey *)((char *)v26 + v14);
        *uiLastIdx = v24 + 1;
        v13 += 4;
        v16 = (float *)((char *)v16 + v14);
        v15 = (float *)((char *)v15 + v14);
        if ( v13 > uiNumKeysM1 - 3 )
        {
          v9 = pkKeys;
          v10 = uiNumKeysM1;
          goto LABEL_14;
        }
      }
      v9 = pkKeys;
    }
    fNextTimec = (v12 - fLastTime) / (v17 - fLastTime);
    ((void (__cdecl *)(_DWORD, char *, char *, NiPoint3 *))dword_B61E50[eType])(
      LODWORD(fNextTimec),
      (char *)v9 + (unsigned __int8)ucSize * *uiLastIdx,
      (char *)v9 + v13 * (unsigned __int8)ucSize,
      &kResult);
    v7 = result;
    v21 = kResult.y;
    result->x = kResult.x;
    v22 = kResult.z;
    result->y = v21;
    result->z = v22;
  }
  return v7;
}
// B61E50: using guessed type int dword_B61E50[];

//----- (007D1530) --------------------------------------------------------
NiPoint3 *__cdecl NiPosKey::GenInterpDefault(NiPoint3 *result, float fTime, NiPosKey *pkKeys, NiAnimationKey::KeyType eType, unsigned int uiNumKeys, char ucSize)
{
  NiPoint3 *v6; // eax@3
  char *v7; // ecx@5
  unsigned int v8; // ST10_4@6

  if ( uiNumKeys )
  {
    if ( pkKeys->m_fTime <= (double)fTime )
    {
      if ( *(float *)((char *)&pkKeys->m_fTime + (unsigned __int8)ucSize * (uiNumKeys - 1)) >= (double)fTime )
      {
        v8 = uiNumKeys;
        uiNumKeys = 0;
        NiPosKey::GenInterp(result, fTime, pkKeys, eType, v8, &uiNumKeys, ucSize);
        v6 = result;
      }
      else
      {
        v6 = result;
        v7 = (char *)&pkKeys->m_Pos + (unsigned __int8)ucSize * (uiNumKeys - 1);
        result->x = *(float *)v7;
        result->y = *((float *)v7 + 1);
        result->z = *((float *)v7 + 2);
      }
    }
    else
    {
      v6 = result;
      result->x = pkKeys->m_Pos.x;
      result->y = pkKeys->m_Pos.y;
      result->z = pkKeys->m_Pos.z;
    }
  }
  else
  {
    v6 = result;
    *result = NiPosKey::ms_kDefault;
  }
  return v6;
}
// B61878: using guessed type struct NiPoint3 NiPosKey::ms_kDefault;

//----- (007D15F0) --------------------------------------------------------
BOOL __cdecl NiPosKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1)
{
  BOOL result; // eax@1

  result = NiAnimationKey::Equal(key0, key1);
  if ( (_BYTE)result )
    result = key1[1].m_fTime == key0[1].m_fTime
          && key1[2].m_fTime == key0[2].m_fTime
          && key1[3].m_fTime == key0[3].m_fTime;
  return result;
}

//----- (007D1650) --------------------------------------------------------
void __cdecl NiPosKey::CoordinateFrame(float fTime, NiPosKey *pKey0, NiPosKey *pKey1, NiAnimationKey::KeyType eType, NiPoint3 *tangent, NiPoint3 *normal, NiPoint3 *binormal, float *curvature)
{
  void (__cdecl *v8)(_DWORD, NiPosKey *, NiPosKey *, NiPoint3 *); // esi@1
  NiPoint3 *v9; // esi@1
  double v10; // st7@1
  float cross; // ST1C_4@1
  double v12; // st5@1
  float cross_4; // ST20_4@1
  double v14; // st4@1
  double v15; // rt2@1
  float cross_8; // ST24_4@1
  double v17; // st4@1
  float v18; // ST1C_4@1
  float v19; // ST20_4@1
  float v20; // ST24_4@1
  NiPoint3 *v21; // edi@2
  float v22; // ST1C_4@2
  float v23; // ST20_4@2
  float v24; // ST24_4@2
  double v25; // st7@4
  float v26; // ST1C_4@8
  float v27; // ST20_4@8
  double v28; // st7@8
  double v29; // st6@8
  float v30; // ST24_4@8
  NiPoint3 d2; // [sp+28h] [bp-1Ch]@1
  NiPoint3 d1; // [sp+34h] [bp-10h]@1
  float fLengthSqr; // [sp+40h] [bp-4h]@1
  float fInvLength; // [sp+58h] [bp+14h]@1
  float fInvLengtha; // [sp+58h] [bp+14h]@1
  float fInvLengthb; // [sp+58h] [bp+14h]@1
  float fInvLengthc; // [sp+58h] [bp+14h]@1
  float fInvLengthd; // [sp+58h] [bp+14h]@2
  float fInvLengthe; // [sp+58h] [bp+14h]@3
  float fInvLengthf; // [sp+58h] [bp+14h]@4
  NiPoint3 *tangenta; // [sp+5Ch] [bp+18h]@1
  NiPoint3 *tangentb; // [sp+5Ch] [bp+18h]@1

  v8 = (void (__cdecl *)(_DWORD, NiPosKey *, NiPosKey *, NiPoint3 *))dword_B61D30[eType];
  ((void (__stdcall *)(_DWORD, NiPosKey *, NiPosKey *))dword_B61DC0[eType])(LODWORD(fTime), pKey0, pKey1);
  v8(LODWORD(fTime), pKey0, pKey1, &d2);
  fLengthSqr = d1.y * d1.y + d1.x * d1.x + d1.z * d1.z;
  fInvLength = sqrt(fLengthSqr);
  v9 = tangent;
  fInvLengtha = 1.0 / fInvLength;
  v10 = d1.x;
  cross = d1.x * fInvLengtha;
  v12 = d1.y;
  tangent->x = cross;
  cross_4 = v12 * fInvLengtha;
  v14 = d1.z;
  tangent->y = cross_4;
  v15 = v14;
  cross_8 = fInvLengtha * v14;
  v17 = d2.z;
  tangent->z = cross_8;
  v18 = v17 * v12 - d2.y * v15;
  v19 = v15 * d2.x - v17 * v10;
  v20 = v10 * d2.y - d2.x * v12;
  *(float *)&tangenta = v19 * v19 + v18 * v18 + v20 * v20;
  *(float *)&tangentb = sqrt(*(float *)&tangenta);
  fInvLengthb = *(float *)&tangentb * fInvLengtha * fInvLengtha;
  *curvature = fInvLengthb;
  fInvLengthc = fabs(fInvLengthb);
  if ( fInvLengthc <= 0.000001 )
  {
    *curvature = 0.0;
    fInvLengthe = fabs(v9->x);
    if ( fInvLengthe > 0.000001 )
    {
      v25 = 0.0;
    }
    else
    {
      fInvLengthf = fabs(v9->y);
      v25 = 0.0;
      if ( fInvLengthf <= 0.000001 )
      {
        v21 = normal;
        normal->z = v9->y;
        normal->y = -v9->z;
        normal->x = 0.0;
        goto LABEL_8;
      }
    }
    v21 = normal;
    normal->x = v9->y;
    normal->y = -v9->x;
    normal->z = v25;
    goto LABEL_8;
  }
  v21 = normal;
  fInvLengthd = d2.z * d1.z + d2.x * d1.x + d2.y * d1.y;
  d1.x = d1.x * fInvLengthd;
  d1.y = d1.y * fInvLengthd;
  d1.z = fInvLengthd * d1.z;
  v22 = d2.x * fLengthSqr;
  v23 = d2.y * fLengthSqr;
  v24 = fLengthSqr * d2.z;
  d2.x = v22 - d1.x;
  *normal = d2;
  d2.y = v23 - d1.y;
  d2.z = v24 - d1.z;
LABEL_8:
  NiPoint3::Unitize(v21);
  v26 = v21->z * v9->y - v9->z * v21->y;
  v27 = v21->x * v9->z - v21->z * v9->x;
  v28 = v9->x * v21->y;
  v29 = v21->x * v9->y;
  binormal->x = v26;
  binormal->y = v27;
  v30 = v28 - v29;
  binormal->z = v30;
}
// 7D1650: could not find valid save-restore pair for ebx
// 7D1650: could not find valid save-restore pair for edi
// 7D1650: could not find valid save-restore pair for esi
// B61D30: using guessed type int dword_B61D30[];
// B61DC0: using guessed type int dword_B61DC0[];

//----- (007D18D0) --------------------------------------------------------
int __cdecl NiPosKey::RegisterLoader()
{
  int result; // eax@2

  if ( bRegistered_1 )
  {
    result = 0;
  }
  else
  {
    result = 1;
    bRegistered_1 = 1;
    dword_B61F70[0] = (int)Item::GetCurUpGradeLevel;
    dword_B61C10[0] = (int)ITableBase<TextDataType3,TextData3>::BeforeTerminate;
    dword_B61B80 = (int)ITableBase<TextDataType3,TextData3>::BeforeTerminate;
    dword_B61AF0 = (int)Item::GetCurUpGradeLevel;
    dword_B61A60[0] = (int)ITableBase<TextDataType3,TextData3>::BeforeTerminate;
    byte_B61906[0] = 16;
    dword_B61EE0[0] = (int)NiBoolKey::ComputeMaxCurvature;
    dword_B61E50[0] = (int)NiPosKey::Interpolate;
    dword_B61DC0[0] = (int)NiPosKey::Interpolate;
    dword_B61D30[0] = (int)NiPosKey::Interpolate;
    dword_B61CA0[0] = (int)NiPosKey::Equal;
    dword_B61940[0] = (int)ITableBase<TextDataType3,TextData3>::BeforeTerminate;
    dword_B619D0 = 0;
  }
  return result;
}
// B61940: using guessed type int dword_B61940[];
// B619D0: using guessed type int dword_B619D0;
// B61A60: using guessed type int dword_B61A60[];
// B61AF0: using guessed type int dword_B61AF0;
// B61B80: using guessed type int dword_B61B80;
// B61C10: using guessed type int dword_B61C10[];
// B61CA0: using guessed type int dword_B61CA0[];
// B61D30: using guessed type int dword_B61D30[];
// B61DC0: using guessed type int dword_B61DC0[];
// B61E50: using guessed type int dword_B61E50[];
// B61EE0: using guessed type int dword_B61EE0[];
// B61F70: using guessed type int dword_B61F70[];

//----- (007D1970) --------------------------------------------------------
void __cdecl NiBezPosKey::Copy(NiAnimationKey *pkNewKey, NiAnimationKey *pkOrigKey)
{
  COERCE_NIANIMATIONKEY(pkNewKey->m_fTime) = COERCE_NIANIMATIONKEY(pkOrigKey->m_fTime);
  COERCE_NIANIMATIONKEY(pkNewKey[1].m_fTime) = pkOrigKey[1];
  COERCE_NIANIMATIONKEY(pkNewKey[2].m_fTime) = pkOrigKey[2];
  COERCE_NIANIMATIONKEY(pkNewKey[3].m_fTime) = pkOrigKey[3];
  COERCE_NIANIMATIONKEY(pkNewKey[4].m_fTime) = pkOrigKey[4];
  COERCE_NIANIMATIONKEY(pkNewKey[5].m_fTime) = pkOrigKey[5];
  COERCE_NIANIMATIONKEY(pkNewKey[6].m_fTime) = pkOrigKey[6];
  COERCE_NIANIMATIONKEY(pkNewKey[7].m_fTime) = pkOrigKey[7];
  COERCE_NIANIMATIONKEY(pkNewKey[8].m_fTime) = pkOrigKey[8];
  COERCE_NIANIMATIONKEY(pkNewKey[9].m_fTime) = pkOrigKey[9];
  COERCE_NIANIMATIONKEY(pkNewKey[10].m_fTime) = pkOrigKey[10];
  COERCE_NIANIMATIONKEY(pkNewKey[11].m_fTime) = pkOrigKey[11];
  COERCE_NIANIMATIONKEY(pkNewKey[12].m_fTime) = pkOrigKey[12];
  COERCE_NIANIMATIONKEY(pkNewKey[13].m_fTime) = pkOrigKey[13];
  COERCE_NIANIMATIONKEY(pkNewKey[14].m_fTime) = pkOrigKey[14];
  COERCE_NIANIMATIONKEY(pkNewKey[15].m_fTime) = pkOrigKey[15];
}

//----- (007D19E0) --------------------------------------------------------
BOOL __cdecl NiBezPosKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1)
{
  BOOL result; // eax@1

  result = NiPosKey::Equal(key0, key1);
  if ( (_BYTE)result )
    result = key1[4].m_fTime == key0[4].m_fTime
          && key1[5].m_fTime == key0[5].m_fTime
          && key1[6].m_fTime == key0[6].m_fTime
          && key1[7].m_fTime == key0[7].m_fTime
          && key1[8].m_fTime == key0[8].m_fTime
          && key1[9].m_fTime == key0[9].m_fTime;
  return result;
}

//----- (007D1A70) --------------------------------------------------------
NiAnimationKey *__cdecl NiBezPosKey::CreateArray(unsigned int uiNumKeys)
{
  unsigned int v1; // ecx@1
  void *v2; // eax@1
  NiAnimationKey *result; // eax@2

  v1 = (uiNumKeys << 6) | -((unsigned __int64)uiNumKeys >> 26 != 0);
  v2 = operator new((v1 + 4) | -__CFADD__(v1, 4));
  if ( v2 )
  {
    *(_DWORD *)v2 = uiNumKeys;
    result = (NiAnimationKey *)((char *)v2 + 4);
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007D1AB0) --------------------------------------------------------
void __cdecl NiBezPosKey::Interpolate(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult)
{
  float v4; // ST0C_4@1
  float v5; // ST10_4@1
  float v6; // ST14_4@1
  float v7; // ST00_4@1
  float v8; // ST04_4@1
  float v9; // ST08_4@1
  float v10; // ST0C_4@1
  float v11; // ST10_4@1
  float v12; // ST14_4@1
  float v13; // ST00_4@1
  float v14; // ST04_4@1
  float v15; // ST08_4@1
  float v16; // ST0C_4@1
  float v17; // ST10_4@1
  float v18; // ST14_4@1
  float v19; // ST00_4@1
  float v20; // ST04_4@1
  double v21; // st7@1
  float v22; // ST08_4@1

  v4 = pKey0[13].m_fTime * fTime;
  v5 = pKey0[14].m_fTime * fTime;
  v6 = pKey0[15].m_fTime * fTime;
  v7 = pKey0[10].m_fTime + v4;
  v8 = pKey0[11].m_fTime + v5;
  v9 = pKey0[12].m_fTime + v6;
  v10 = v7 * fTime;
  v11 = v8 * fTime;
  v12 = v9 * fTime;
  v13 = pKey0[7].m_fTime + v10;
  v14 = pKey0[8].m_fTime + v11;
  v15 = pKey0[9].m_fTime + v12;
  v16 = v13 * fTime;
  v17 = v14 * fTime;
  v18 = fTime * v15;
  v19 = pKey0[1].m_fTime + v16;
  v20 = pKey0[2].m_fTime + v17;
  v21 = pKey0[3].m_fTime + v18;
  *(float *)pResult = v19;
  *((float *)pResult + 1) = v20;
  v22 = v21;
  *((float *)pResult + 2) = v22;
}

//----- (007D1B70) --------------------------------------------------------
void __cdecl NiBezPosKey::InterpolateD1(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult)
{
  double v4; // st7@1
  float v5; // ST0C_4@1
  float v6; // ST10_4@1
  float v7; // ST14_4@1
  float v8; // ST18_4@1
  float v9; // ST1C_4@1
  float v10; // ST20_4@1
  float v11; // ST00_4@1
  float v12; // ST04_4@1
  float v13; // ST08_4@1
  float v14; // ST0C_4@1
  float v15; // ST10_4@1
  float v16; // ST14_4@1
  float v17; // ST00_4@1
  float v18; // ST04_4@1
  double v19; // st7@1
  float v20; // ST08_4@1
  float fTimea; // [sp+2Ch] [bp+8h]@1

  v4 = fTime;
  fTimea = 3.0 * fTime;
  v5 = pKey0[13].m_fTime * fTimea;
  v6 = pKey0[14].m_fTime * fTimea;
  v7 = fTimea * pKey0[15].m_fTime;
  v8 = pKey0[10].m_fTime * 2.0;
  v9 = pKey0[11].m_fTime * 2.0;
  v10 = 2.0 * pKey0[12].m_fTime;
  v11 = v8 + v5;
  v12 = v9 + v6;
  v13 = v10 + v7;
  v14 = v11 * v4;
  v15 = v12 * v4;
  v16 = v4 * v13;
  v17 = pKey0[7].m_fTime + v14;
  v18 = pKey0[8].m_fTime + v15;
  v19 = pKey0[9].m_fTime + v16;
  *(float *)pResult = v17;
  *((float *)pResult + 1) = v18;
  v20 = v19;
  *((float *)pResult + 2) = v20;
}

//----- (007D1C30) --------------------------------------------------------
void __cdecl NiBezPosKey::InterpolateD2(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult)
{
  float v4; // ST0C_4@1
  float v5; // ST10_4@1
  float v6; // ST14_4@1
  float v7; // ST18_4@1
  float v8; // ST1C_4@1
  float v9; // ST20_4@1
  float v10; // ST00_4@1
  float v11; // ST04_4@1
  float v12; // ST08_4@1
  float fTimea; // [sp+2Ch] [bp+8h]@1

  fTimea = fTime * 6.0;
  v4 = pKey0[13].m_fTime * fTimea;
  v5 = pKey0[14].m_fTime * fTimea;
  v6 = fTimea * pKey0[15].m_fTime;
  v7 = pKey0[10].m_fTime * 2.0;
  v8 = pKey0[11].m_fTime * 2.0;
  v9 = 2.0 * pKey0[12].m_fTime;
  v10 = v7 + v4;
  *(float *)pResult = v10;
  v11 = v5 + v8;
  *((float *)pResult + 1) = v11;
  v12 = v9 + v6;
  *((float *)pResult + 2) = v12;
}

//----- (007D1CC0) --------------------------------------------------------
void __cdecl NiBezPosKey::FillDerivedVals(NiAnimationKey *pkKeys, unsigned int uiNumKeys)
{
  unsigned int v2; // ecx@1
  NiAnimationKey *v3; // eax@2
  float v4; // ST60_4@3
  float v5; // ST64_4@3
  float v6; // ST68_4@3
  float v7; // ST3C_4@3
  float v8; // ST40_4@3
  float v9; // ST44_4@3
  float v10; // ST54_4@3
  float v11; // ST58_4@3
  float v12; // ST5C_4@3
  float v13; // ST48_4@3
  float v14; // ST4C_4@3
  float v15; // ST50_4@3
  float v16; // ST30_4@3
  float v17; // ST34_4@3
  float v18; // ST38_4@3
  float v19; // ST24_4@3
  float v20; // ST28_4@3
  float v21; // ST2C_4@3
  float v22; // ST0C_4@3
  float v23; // ST10_4@3
  float v24; // ST14_4@3
  float v25; // ST18_4@3
  float v26; // ST1C_4@3
  float v27; // ST20_4@3
  float v28; // ST00_4@3
  float v29; // ST04_4@3
  float v30; // ST08_4@3

  v2 = uiNumKeys - 1;
  if ( uiNumKeys != 1 )
  {
    v3 = pkKeys + 19;
    do
    {
      v4 = v3[-12].m_fTime * 2.0;
      v5 = v3[-11].m_fTime * 2.0;
      v6 = v3[-10].m_fTime * 2.0;
      v7 = v3[1].m_fTime + v4;
      v8 = v3[2].m_fTime + v5;
      v9 = v3[3].m_fTime + v6;
      v10 = v3[-2].m_fTime - v3[-18].m_fTime;
      v11 = v3[-1].m_fTime - v3[-17].m_fTime;
      v12 = v3->m_fTime - v3[-16].m_fTime;
      v13 = v10 * 3.0;
      v14 = v11 * 3.0;
      v15 = v12 * 3.0;
      v16 = v13 - v7;
      v3[-9].m_fTime = v16;
      v17 = v14 - v8;
      v3[-8].m_fTime = v17;
      v18 = v15 - v9;
      v3[-7].m_fTime = v18;
      v19 = v3[-2].m_fTime - v3[-18].m_fTime;
      v20 = v3[-1].m_fTime - v3[-17].m_fTime;
      v21 = v3->m_fTime - v3[-16].m_fTime;
      v22 = v19 * 2.0;
      v23 = v20 * 2.0;
      v24 = v21 * 2.0;
      v25 = v3[1].m_fTime + v3[-12].m_fTime;
      v26 = v3[2].m_fTime + v3[-11].m_fTime;
      v27 = v3[3].m_fTime + v3[-10].m_fTime;
      v28 = v25 - v22;
      v3[-6].m_fTime = v28;
      v3 += 16;
      --v2;
      v29 = v26 - v23;
      v3[-21].m_fTime = v29;
      v30 = v27 - v24;
      v3[-20].m_fTime = v30;
    }
    while ( v2 );
  }
}

//----- (007D1E00) --------------------------------------------------------
double __cdecl NiBezPosKey::ComputeMaxCurvature(NiAnimationKey *pkKeys, unsigned int uiNumKeys)
{
  unsigned int v2; // ebx@2
  int v3; // eax@2
  NiAnimationKey *v4; // esi@2
  int v5; // edi@3
  double v6; // st7@4
  NiPoint3 d1; // [sp+1Ch] [bp-58h]@4
  float v9; // [sp+28h] [bp-4Ch]@4
  float v10; // [sp+2Ch] [bp-48h]@4
  float v11; // [sp+30h] [bp-44h]@4
  float v12; // [sp+34h] [bp-40h]@4
  float v13; // [sp+38h] [bp-3Ch]@4
  float v14; // [sp+3Ch] [bp-38h]@4
  float v15; // [sp+40h] [bp-34h]@4
  float v16; // [sp+44h] [bp-30h]@4
  float v17; // [sp+48h] [bp-2Ch]@4
  float v18; // [sp+4Ch] [bp-28h]@4
  float v19; // [sp+50h] [bp-24h]@4
  float v20; // [sp+54h] [bp-20h]@4
  double v21; // [sp+58h] [bp-1Ch]@4
  double v22; // [sp+60h] [bp-14h]@4
  double v23; // [sp+68h] [bp-Ch]@4
  float fMaxCurvature; // [sp+70h] [bp-4h]@1
  float fCurvature; // [sp+80h] [bp+Ch]@3
  float fCurvatureb; // [sp+80h] [bp+Ch]@4
  float fCurvaturec; // [sp+80h] [bp+Ch]@4
  float fCurvatured; // [sp+80h] [bp+Ch]@4
  float fCurvaturee; // [sp+80h] [bp+Ch]@4
  float fCurvaturef; // [sp+80h] [bp+Ch]@4
  float fCurvaturea; // [sp+80h] [bp+Ch]@4

  fMaxCurvature = 0.0;
  if ( uiNumKeys != 1 )
  {
    v2 = uiNumKeys - 1;
    v3 = NiPosKey::ms_iSampleSize;
    v4 = pkKeys + 15;
    do
    {
      v5 = 0;
      fCurvature = 0.0;
      if ( v3 >= 0 )
      {
        do
        {
          fCurvatureb = (double)SLODWORD(fCurvature) * NiPosKey::ms_fSampleDelta;
          NiBezPosKey::InterpolateD1(fCurvatureb, v4 - 15, v4 + 1, &d1);
          fCurvaturec = fCurvatureb * 6.0;
          v15 = v4[-2].m_fTime * fCurvaturec;
          v16 = v4[-1].m_fTime * fCurvaturec;
          v17 = fCurvaturec * v4->m_fTime;
          v18 = v4[-5].m_fTime * 2.0;
          v19 = v4[-4].m_fTime * 2.0;
          v20 = 2.0 * v4[-3].m_fTime;
          v12 = v18 + v15;
          v13 = v19 + v16;
          v14 = v20 + v17;
          v9 = d1.y * v14 - d1.z * v13;
          v10 = d1.z * v12 - v14 * d1.x;
          v11 = v13 * d1.x - v12 * d1.y;
          v22 = d1.y;
          v23 = d1.x;
          v21 = d1.z;
          fCurvatured = v11 * v11 + v9 * v9 + v10 * v10;
          fCurvaturee = sqrt(fCurvatured);
          v6 = fCurvaturee;
          fCurvaturef = v23 * v23 + v22 * v22 + v21 * v21;
          fCurvaturea = v6 / fCurvaturef;
          if ( fMaxCurvature < (double)fCurvaturea )
            fMaxCurvature = fCurvaturea;
          v3 = NiPosKey::ms_iSampleSize;
          ++v5;
          fCurvature = *(float *)&v5;
        }
        while ( v5 <= NiPosKey::ms_iSampleSize );
      }
      v4 += 16;
      --v2;
    }
    while ( v2 );
  }
  return fMaxCurvature;
}
// A7BA9C: using guessed type int NiPosKey::ms_iSampleSize;
// B61874: using guessed type float NiPosKey::ms_fSampleDelta;

//----- (007D1FA0) --------------------------------------------------------
NiBezPosKey *__cdecl NiBezPosKey::CreateFromStream(NiStream *stream, unsigned int uiNumKeys)
{
  unsigned int v2; // edi@1
  unsigned int v3; // ecx@1
  void *v4; // eax@1
  NiBezPosKey *result; // eax@2
  unsigned int v6; // ebx@5
  NiPoint3 *v7; // esi@5
  NiBezPosKey *pkBezPosKeys; // [sp+10h] [bp+Ch]@2

  v2 = uiNumKeys;
  v3 = (uiNumKeys << 6) | -((unsigned __int64)uiNumKeys >> 26 != 0);
  v4 = operator new((v3 + 4) | -__CFADD__(v3, 4));
  if ( v4 )
  {
    *(_DWORD *)v4 = uiNumKeys;
    result = (NiBezPosKey *)((char *)v4 + 4);
    pkBezPosKeys = result;
  }
  else
  {
    pkBezPosKeys = 0;
    result = 0;
  }
  if ( v2 )
  {
    v6 = v2;
    v7 = &result->m_OutTan;
    do
    {
      NiPosKey::LoadBinary((NiPosKey *)&v7[-3].z, stream);
      NiPoint3::LoadBinary(v7 - 1, stream);
      NiPoint3::LoadBinary(v7, stream);
      v7 = (NiPoint3 *)((char *)v7 + 64);
      --v6;
    }
    while ( v6 );
    result = pkBezPosKeys;
  }
  return result;
}

//----- (007D2020) --------------------------------------------------------
void __cdecl NiBezPosKey::SaveToStream(NiStream *stream, NiAnimationKey *pkKeys, unsigned int uiNumKeys)
{
  unsigned int v3; // ebx@1
  NiPoint3 *v4; // esi@2

  v3 = uiNumKeys;
  if ( uiNumKeys )
  {
    v4 = (NiPoint3 *)&pkKeys[7];
    do
    {
      NiPosKey::SaveBinary(stream, (NiAnimationKey *)&v4[-3].z);
      NiColor::SaveBinary(v4 - 1, stream);
      NiColor::SaveBinary(v4, stream);
      v4 = (NiPoint3 *)((char *)v4 + 64);
      --v3;
    }
    while ( v3 );
  }
}

//----- (007D2060) --------------------------------------------------------
void __cdecl NiLinRotKey::DeleteArray(NiAnimationKey *pkKeyArray)
{
  if ( pkKeyArray )
    operator delete(&pkKeyArray[-1]);
}

//----- (007D2080) --------------------------------------------------------
char __cdecl NiBezPosKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys)
{
  unsigned int v3; // edx@1
  unsigned int v4; // esi@2
  int v5; // ecx@2
  void *v6; // eax@2
  NiBezPosKey *v7; // edi@3
  unsigned int v8; // esi@7
  float v9; // ecx@9
  float v10; // edx@9
  unsigned int v11; // edi@9
  float v12; // eax@9
  float v13; // ecx@9
  float v14; // edx@9
  double v15; // st6@9
  float v16; // eax@9
  float v17; // ecx@9
  float v18; // edx@9
  float fNewValue; // ST1C_4@9
  float v20; // ecx@9
  float v21; // edx@9
  float v22; // eax@9
  float v23; // ecx@9
  float v24; // edx@9
  float v25; // eax@9
  NiBezPosKey *v26; // eax@10
  char result; // al@12
  NiPoint3 kPt; // [sp+34h] [bp-74h]@7
  NiPoint3 kCurrentOut; // [sp+40h] [bp-68h]@9
  NiPoint3 kCurrentIn; // [sp+4Ch] [bp-5Ch]@9
  NiPoint3 kLastValue; // [sp+58h] [bp-50h]@9
  NiPoint3 kNextValue; // [sp+64h] [bp-44h]@9
  NiPoint3 kCurrentValue; // [sp+70h] [bp-38h]@9
  NiPoint3 kNextIn; // [sp+7Ch] [bp-2Ch]@9
  NiPoint3 kLastOut; // [sp+88h] [bp-20h]@9
  NiBezPosKey *pkBezPosKeys; // [sp+94h] [bp-14h]@1
  NiBezPosKey *pkNewKeys; // [sp+98h] [bp-10h]@3
  float fLastTime; // [sp+9Ch] [bp-Ch]@9
  float fNextTime; // [sp+A0h] [bp-8h]@9
  unsigned int uiInsertAt; // [sp+A4h] [bp-4h]@1

  v3 = *uiNumKeys;
  pkBezPosKeys = (NiBezPosKey *)*pkKeys;
  if ( NiAnimationKey::OkayToInsert(fTime, (NiAnimationKey *)&pkBezPosKeys->m_fTime, v3, &uiInsertAt, 64) )
  {
    v4 = *uiNumKeys + 1;
    v5 = (unsigned __int64)v4 >> 26 != 0;
    v6 = operator new((((v4 << 6) | -v5) + 4) | -__CFADD__((v4 << 6) | -v5, 4));
    if ( v6 )
    {
      v7 = (NiBezPosKey *)((char *)v6 + 4);
      *(_DWORD *)v6 = v4;
      pkNewKeys = (NiBezPosKey *)((char *)v6 + 4);
    }
    else
    {
      pkNewKeys = 0;
      v7 = 0;
    }
    memcpy_s(v7, (*uiNumKeys + 1) << 6, pkBezPosKeys, uiInsertAt << 6);
    if ( *uiNumKeys > uiInsertAt )
      memcpy_s(
        &v7[uiInsertAt + 1],
        (*uiNumKeys - uiInsertAt) << 6,
        &pkBezPosKeys[uiInsertAt],
        (*uiNumKeys - uiInsertAt) << 6);
    NiPosKey::GenInterpDefault(&kPt, fTime, (NiPosKey *)&pkBezPosKeys->m_fTime, BEZKEY, *uiNumKeys, 64);
    v8 = (unsigned int)&v7[uiInsertAt];
    *(float *)v8 = fTime;
    *(NiPoint3 *)(v8 + 4) = kPt;
    *(NiPoint3 *)(v8 + 16) = NiPoint3::ZERO;
    *(NiPoint3 *)(v8 + 28) = NiPoint3::ZERO;
    if ( uiInsertAt && uiInsertAt != *uiNumKeys )
    {
      v9 = *((float *)&v7[uiInsertAt] - 14);
      v10 = *((float *)&v7[uiInsertAt] - 13);
      fLastTime = v7[uiInsertAt - 1].m_fTime;
      v11 = (unsigned int)&v7[uiInsertAt];
      kLastValue.x = *(float *)(v11 - 60);
      kLastOut.x = *(float *)(v11 - 36);
      v12 = *(float *)(v8 + 4);
      kLastValue.y = v9;
      kLastOut.y = *(float *)(v11 - 32);
      v13 = *(float *)(v8 + 8);
      kLastValue.z = v10;
      kLastOut.z = *(float *)(v11 - 28);
      v14 = *(float *)(v8 + 12);
      fNextTime = *(float *)(v11 + 64);
      kCurrentValue.x = v12;
      v15 = v12;
      kNextValue.x = *(float *)(v11 + 68);
      v16 = *(float *)(v11 + 80);
      kCurrentValue.y = v13;
      v17 = *(float *)(v11 + 72);
      kCurrentValue.z = v14;
      v18 = *(float *)(v11 + 76);
      kNextIn.x = v16;
      kNextValue.y = v17;
      kNextIn.y = *(float *)(v11 + 84);
      fNewValue = v15;
      kNextValue.z = v18;
      kNextIn.z = *(float *)(v11 + 88);
      NiInterpScalar::AdjustBezier(
        kLastValue.x,
        fLastTime,
        &kLastOut.x,
        kNextValue.x,
        fNextTime,
        &kNextIn.x,
        fTime,
        fNewValue,
        &kCurrentIn.x,
        &kCurrentOut.x);
      NiInterpScalar::AdjustBezier(
        kLastValue.y,
        fLastTime,
        &kLastOut.y,
        kNextValue.y,
        fNextTime,
        &kNextIn.y,
        fTime,
        kCurrentValue.y,
        &kCurrentIn.y,
        &kCurrentOut.y);
      NiInterpScalar::AdjustBezier(
        kLastValue.z,
        fLastTime,
        &kLastOut.z,
        kNextValue.z,
        fNextTime,
        &kNextIn.z,
        fTime,
        kCurrentValue.z,
        &kCurrentIn.z,
        &kCurrentOut.z);
      *(float *)(v11 - 36) = kLastOut.x;
      *(float *)(v11 - 32) = kLastOut.y;
      *(float *)(v11 - 28) = kLastOut.z;
      v20 = kCurrentIn.y;
      v21 = kCurrentIn.z;
      *(float *)(v8 + 16) = kCurrentIn.x;
      v22 = kCurrentOut.x;
      *(float *)(v8 + 20) = v20;
      v23 = kCurrentOut.y;
      *(float *)(v8 + 24) = v21;
      v24 = kCurrentOut.z;
      *(float *)(v8 + 28) = v22;
      v25 = kNextIn.x;
      *(float *)(v8 + 32) = v23;
      *(float *)(v8 + 36) = v24;
      *(float *)(v11 + 80) = v25;
      *(float *)(v11 + 84) = kNextIn.y;
      *(float *)(v11 + 88) = kNextIn.z;
      v7 = pkNewKeys;
    }
    v26 = pkBezPosKeys;
    ++*uiNumKeys;
    if ( v26 )
      operator delete(&v26[-1].m_B.z);
    *pkKeys = (NiAnimationKey *)v7;
    NiBezPosKey::FillDerivedVals((NiAnimationKey *)&v7->m_fTime, *uiNumKeys);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007D2390) --------------------------------------------------------
int __cdecl NiBezPosKey::RegisterLoader()
{
  int result; // eax@2

  if ( bRegistered_2 )
  {
    result = 0;
  }
  else
  {
    result = 1;
    bRegistered_2 = 1;
    dword_B61F78 = (int)NiBezPosKey::CreateFromStream;
    dword_B61C18 = (int)NiBezPosKey::SaveToStream;
    dword_B61B88 = (int)NiBezPosKey::Copy;
    dword_B61AF8 = (int)NiBezPosKey::CreateArray;
    dword_B61A68 = (int)NiLinRotKey::DeleteArray;
    byte_B61908 = 64;
    dword_B61EE8 = (int)NiBezPosKey::ComputeMaxCurvature;
    dword_B61E58 = (int)NiBezPosKey::Interpolate;
    dword_B61DC8 = (int)NiBezPosKey::InterpolateD1;
    dword_B61D38 = (int)NiBezPosKey::InterpolateD2;
    dword_B61CA8 = (int)NiBezPosKey::Equal;
    dword_B61948 = (int)NiBezPosKey::FillDerivedVals;
    dword_B619D8 = (int)NiBezPosKey::Insert;
  }
  return result;
}
// B61908: using guessed type char byte_B61908;
// B61948: using guessed type int dword_B61948;
// B619D8: using guessed type int dword_B619D8;
// B61A68: using guessed type int dword_B61A68;
// B61AF8: using guessed type int dword_B61AF8;
// B61B88: using guessed type int dword_B61B88;
// B61C18: using guessed type int dword_B61C18;
// B61CA8: using guessed type int dword_B61CA8;
// B61D38: using guessed type int dword_B61D38;
// B61DC8: using guessed type int dword_B61DC8;
// B61E58: using guessed type int dword_B61E58;
// B61EE8: using guessed type int dword_B61EE8;
// B61F78: using guessed type int dword_B61F78;

//----- (007D2430) --------------------------------------------------------
void __cdecl NiRotKey::Interpolate(float __formal, NiAnimationKey *a2, NiAnimationKey *a3, void *pResult)
{
  int v4; // eax@1
  NiQuaternion v5; // [sp+10h] [bp-10h]@1

  NiQuaternion::NiQuaternion(&v5, 1.0, 0.0, 0.0, 0.0);
  *(_DWORD *)pResult = *(_DWORD *)v4;
  *((_DWORD *)pResult + 1) = *(_DWORD *)(v4 + 4);
  *((_DWORD *)pResult + 2) = *(_DWORD *)(v4 + 8);
  *((_DWORD *)pResult + 3) = *(_DWORD *)(v4 + 12);
}

//----- (007D2480) --------------------------------------------------------
void __cdecl NiRotKey::SaveBinary(NiStream *stream, NiAnimationKey *pkKey)
{
  NiAnimationKey::SaveBinary(stream, (const int *)pkKey);
  NiQuaternion::SaveBinary((NiQuaternion *)&pkKey[1], stream);
}

//----- (007D24B0) --------------------------------------------------------
NiQuaternion *__cdecl NiRotKey::GenInterp(NiQuaternion *result, float fTime, NiRotKey *pkKeys, NiAnimationKey::KeyType eType, unsigned int uiNumKeys, unsigned int *uiLastIdx, char ucSize)
{
  NiQuaternion *v7; // eax@3
  float v8; // ecx@3
  float v9; // edx@5
  float v10; // ecx@5
  float v11; // edx@5
  NiRotKey *v12; // ebx@6
  unsigned int v13; // esi@6
  unsigned int v14; // eax@6
  double v15; // st7@6
  unsigned int v16; // ecx@8
  int v17; // esi@10
  float *v18; // ebx@10
  float *v19; // edi@10
  double v20; // st6@11
  unsigned int v21; // eax@13
  int v22; // eax@14
  float *v23; // esi@18
  float v24; // edx@25
  float v25; // ecx@25
  float v26; // edx@25
  NiQuaternion kQuat; // [sp+1Ch] [bp-34h]@25
  float v28; // [sp+2Ch] [bp-24h]@5
  float v29; // [sp+30h] [bp-20h]@5
  float v30; // [sp+34h] [bp-1Ch]@5
  float v31; // [sp+38h] [bp-18h]@5
  unsigned int v32; // [sp+3Ch] [bp-14h]@13
  unsigned int uiNumKeysM1; // [sp+40h] [bp-10h]@6
  NiRotKey *v34; // [sp+44h] [bp-Ch]@10
  NiRotKey *v35; // [sp+48h] [bp-8h]@10
  float fLastTime; // [sp+4Ch] [bp-4h]@6
  float fNextTime; // [sp+68h] [bp+18h]@12
  float fNextTimea; // [sp+68h] [bp+18h]@13
  float fNextTimeb; // [sp+68h] [bp+18h]@14
  float fNextTimec; // [sp+68h] [bp+18h]@25

  if ( uiNumKeys == 1 )
  {
    if ( eType != 4 )
    {
      v7 = result;
      result->m_fW = pkKeys->m_quat.m_fW;
      result->m_fX = pkKeys->m_quat.m_fX;
      v8 = pkKeys->m_quat.m_fZ;
      result->m_fY = pkKeys->m_quat.m_fY;
      result->m_fZ = v8;
      return v7;
    }
    goto LABEL_5;
  }
  if ( eType == 4 )
  {
LABEL_5:
    ((void (__cdecl *)(_DWORD, NiRotKey *, _DWORD, float *))dword_B61E68[eType])(LODWORD(fTime), pkKeys, 0, &v28);
    v7 = result;
    v9 = v29;
    result->m_fW = v28;
    v10 = v30;
    result->m_fX = v9;
    v11 = v31;
    result->m_fY = v10;
    result->m_fZ = v11;
    return v7;
  }
  v12 = pkKeys;
  v13 = uiNumKeys - 1;
  v14 = *uiLastIdx;
  uiNumKeysM1 = uiNumKeys - 1;
  fLastTime = *(float *)((char *)&pkKeys->m_fTime + (unsigned __int8)ucSize * v14);
  v15 = fTime;
  if ( fLastTime > (double)fTime )
  {
    *uiLastIdx = 0;
    fLastTime = pkKeys->m_fTime;
  }
  v16 = *uiLastIdx + 1;
  if ( v16 > v13 )
  {
    v20 = *(float *)&uiNumKeys;
  }
  else if ( (signed int)(v13 - v16 + 1) < 4 )
  {
    v20 = *(float *)&uiNumKeys;
LABEL_17:
    if ( v16 <= v13 )
    {
      v23 = (float *)((char *)&v12->m_fTime + v16 * (unsigned __int8)ucSize);
      do
      {
        v20 = *v23;
        if ( v20 >= v15 )
          break;
        ++*uiLastIdx;
        fLastTime = v20;
        ++v16;
        v23 = (float *)((char *)v23 + (unsigned __int8)ucSize);
      }
      while ( v16 <= uiNumKeysM1 );
    }
  }
  else
  {
    v35 = (NiRotKey *)((char *)pkKeys + v16 * (unsigned __int8)ucSize);
    v17 = 4 * (unsigned __int8)ucSize;
    v34 = (NiRotKey *)((char *)pkKeys + (unsigned __int8)ucSize * (v16 + 3));
    v18 = (float *)((char *)&pkKeys->m_fTime + (unsigned __int8)ucSize * (v16 + 2));
    v19 = (float *)((char *)&pkKeys->m_fTime + (unsigned __int8)ucSize * (v16 + 1));
    while ( 1 )
    {
      v20 = v35->m_fTime;
      if ( v20 >= v15 )
        break;
      ++*uiLastIdx;
      fLastTime = v20;
      fNextTime = *v19;
      v20 = fNextTime;
      if ( fNextTime >= v15 )
      {
        ++v16;
        break;
      }
      v21 = *uiLastIdx;
      fLastTime = fNextTime;
      *uiLastIdx = ++v21;
      fNextTimea = *v18;
      v32 = v21;
      v20 = fNextTimea;
      if ( fNextTimea >= v15 )
      {
        v16 += 2;
        break;
      }
      fLastTime = fNextTimea;
      v22 = v32 + 1;
      *uiLastIdx = v32 + 1;
      v32 = v22;
      fNextTimeb = v34->m_fTime;
      v20 = fNextTimeb;
      if ( fNextTimeb >= v15 )
      {
        v16 += 3;
        break;
      }
      fLastTime = fNextTimeb;
      v35 = (NiRotKey *)((char *)v35 + v17);
      v34 = (NiRotKey *)((char *)v34 + v17);
      *uiLastIdx = v32 + 1;
      v16 += 4;
      v19 = (float *)((char *)v19 + v17);
      v18 = (float *)((char *)v18 + v17);
      if ( v16 > uiNumKeysM1 - 3 )
      {
        v12 = pkKeys;
        v13 = uiNumKeysM1;
        goto LABEL_17;
      }
    }
    v12 = pkKeys;
  }
  fNextTimec = (v15 - fLastTime) / (v20 - fLastTime);
  ((void (__cdecl *)(_DWORD, char *, char *, NiQuaternion *))dword_B61E68[eType])(
    LODWORD(fNextTimec),
    (char *)v12 + (unsigned __int8)ucSize * *uiLastIdx,
    (char *)v12 + v16 * (unsigned __int8)ucSize,
    &kQuat);
  v7 = result;
  v24 = kQuat.m_fX;
  result->m_fW = kQuat.m_fW;
  v25 = kQuat.m_fY;
  result->m_fX = v24;
  v26 = kQuat.m_fZ;
  result->m_fY = v25;
  result->m_fZ = v26;
  return v7;
}
// B61E68: using guessed type int dword_B61E68[];

//----- (007D2700) --------------------------------------------------------
NiQuaternion *__cdecl NiRotKey::GenInterpDefault(NiQuaternion *result, float fTime, NiRotKey *pkKeys, NiAnimationKey::KeyType eType, unsigned int uiNumKeys, char ucSize)
{
  NiQuaternion *v6; // eax@3
  char *v7; // ecx@5
  unsigned int v8; // ST10_4@6

  if ( uiNumKeys )
  {
    if ( pkKeys->m_fTime <= (double)fTime )
    {
      if ( *(float *)((char *)&pkKeys->m_fTime + (unsigned __int8)ucSize * (uiNumKeys - 1)) >= (double)fTime )
      {
        v8 = uiNumKeys;
        uiNumKeys = 0;
        NiRotKey::GenInterp(result, fTime, pkKeys, eType, v8, &uiNumKeys, ucSize);
        v6 = result;
      }
      else
      {
        v6 = result;
        v7 = (char *)&pkKeys->m_quat + (unsigned __int8)ucSize * (uiNumKeys - 1);
        result->m_fW = *(float *)v7;
        result->m_fX = *((float *)v7 + 1);
        result->m_fY = *((float *)v7 + 2);
        result->m_fZ = *((float *)v7 + 3);
      }
    }
    else
    {
      v6 = result;
      result->m_fW = pkKeys->m_quat.m_fW;
      result->m_fX = pkKeys->m_quat.m_fX;
      result->m_fY = pkKeys->m_quat.m_fY;
      result->m_fZ = pkKeys->m_quat.m_fZ;
    }
  }
  else
  {
    v6 = result;
    *result = NiRotKey::ms_kDefault;
  }
  return v6;
}
// B61888: using guessed type struct NiQuaternion NiRotKey::ms_kDefault;

//----- (007D27D0) --------------------------------------------------------
void __cdecl NiRotKey::FillDerivedVals(NiAnimationKey *pkKeys, unsigned int uiNumKeys, char ucSize)
{
  unsigned int v3; // ecx@1
  float v4; // edx@2
  NiQuaternion *v5; // esi@2
  NiAnimationKey *v6; // ebx@2
  NiQuaternion *v7; // eax@4
  double v8; // st7@6
  unsigned int v9; // eax@6
  double v10; // st6@6
  unsigned int v11; // ecx@7
  int v12; // edx@7
  float *v13; // ebx@7
  NiAnimationKey *v14; // esi@7
  double v15; // rt0@9
  double v16; // st6@9
  double v17; // st7@9
  double v18; // rt1@12
  double v19; // rt0@25
  float *v20; // edi@28
  int v21; // ecx@28
  double v22; // rt1@29
  double v23; // rt2@31
  double v24; // st6@31
  double v25; // st7@31
  double v26; // rtt@34
  NiQuaternion result; // [sp+Ch] [bp-20h]@4
  unsigned int i; // [sp+1Ch] [bp-10h]@7
  NiAnimationKey *v29; // [sp+20h] [bp-Ch]@2
  float *v30; // [sp+24h] [bp-8h]@3
  float fW; // [sp+28h] [bp-4h]@2

  v3 = uiNumKeys;
  if ( uiNumKeys != 1 )
  {
    LODWORD(v4) = (unsigned __int8)ucSize;
    LODWORD(fW) = (unsigned __int8)ucSize;
    v5 = (NiQuaternion *)((char *)&pkKeys[1] + (unsigned __int8)ucSize);
    v6 = pkKeys + 3;
    v29 = (NiAnimationKey *)(uiNumKeys - 1);
    do
    {
      *(float *)&v30 = v5->m_fX * v6[-1].m_fTime
                     + v6[-2].m_fTime * v5->m_fW
                     + v6->m_fTime * v5->m_fY
                     + v5->m_fZ * v6[1].m_fTime;
      if ( *(float *)&v30 < 0.0 )
      {
        v7 = NiQuaternion::operator-(v5, &result);
        v5->m_fW = v7->m_fW;
        v5->m_fX = v7->m_fX;
        v5->m_fY = v7->m_fY;
        v3 = uiNumKeys;
        v5->m_fZ = v7->m_fZ;
        v4 = fW;
      }
      v5 = (NiQuaternion *)((char *)v5 + LODWORD(v4));
      v6 = (NiAnimationKey *)((char *)v6 + LODWORD(v4));
      v29 = (NiAnimationKey *)((char *)v29 - 1);
    }
    while ( v29 );
  }
  v8 = -1.0;
  v9 = 0;
  v10 = 1.0;
  if ( (signed int)v3 >= 4 )
  {
    v29 = (NiAnimationKey *)((char *)pkKeys + 2 * (unsigned __int8)ucSize + (unsigned __int8)ucSize + 4);
    v30 = (float *)((char *)&pkKeys[1].m_fTime + 2 * (unsigned __int8)ucSize);
    v11 = ((v3 - 4) >> 2) + 1;
    v12 = 4 * (unsigned __int8)ucSize;
    v13 = (float *)((char *)&pkKeys[1].m_fTime + (unsigned __int8)ucSize);
    v14 = pkKeys + 1;
    i = 4 * v11;
    do
    {
      fW = v14->m_fTime;
      if ( fW >= v8 )
      {
        if ( fW > v10 )
          v14->m_fTime = v10;
        v18 = v10;
        v16 = v8;
        v17 = v18;
      }
      else
      {
        v15 = v10;
        v16 = v8;
        v17 = v15;
        v14->m_fTime = v16;
      }
      fW = *v13;
      if ( fW >= v16 )
      {
        if ( fW > v17 )
          *v13 = v17;
      }
      else
      {
        *v13 = v16;
      }
      fW = *v30;
      if ( fW >= v16 )
      {
        if ( fW > v17 )
          *v30 = v17;
      }
      else
      {
        *v30 = v16;
      }
      fW = v29->m_fTime;
      if ( fW >= v16 )
      {
        if ( fW > v17 )
          v29->m_fTime = v17;
      }
      else
      {
        v29->m_fTime = v16;
      }
      v30 = (float *)((char *)v30 + v12);
      v19 = v16;
      v10 = v17;
      v8 = v19;
      v29 = (NiAnimationKey *)((char *)v29 + v12);
      v14 = (NiAnimationKey *)((char *)v14 + v12);
      v13 = (float *)((char *)v13 + v12);
      --v11;
    }
    while ( v11 );
    v3 = uiNumKeys;
    v9 = i;
  }
  if ( v9 < v3 )
  {
    v20 = (float *)((char *)&pkKeys[1].m_fTime + v9 * (unsigned __int8)ucSize);
    v21 = v3 - v9;
    while ( 1 )
    {
      fW = *v20;
      if ( fW >= v8 )
      {
        if ( fW > v10 )
          *v20 = v10;
        v26 = v10;
        v24 = v8;
        v25 = v26;
      }
      else
      {
        v23 = v10;
        v24 = v8;
        v25 = v23;
        *v20 = v24;
      }
      v20 = (float *)((char *)v20 + (unsigned __int8)ucSize);
      if ( !--v21 )
        break;
      v22 = v24;
      v10 = v25;
      v8 = v22;
    }
  }
}

//----- (007D29C0) --------------------------------------------------------
int __cdecl NiRotKey::RegisterLoader()
{
  int result; // eax@1

  result = 0;
  if ( !bRegistered_3 )
  {
    dword_B61EF8 = 0;
    dword_B61DD8 = 0;
    dword_B61D48 = 0;
    dword_B619E8 = 0;
    bRegistered_3 = 1;
    dword_B61F88[0] = (int)Item::GetCurUpGradeLevel;
    dword_B61C28[0] = (int)ITableBase<TextDataType3,TextData3>::BeforeTerminate;
    dword_B61B98 = (int)ITableBase<TextDataType3,TextData3>::BeforeTerminate;
    dword_B61B08 = (int)Item::GetCurUpGradeLevel;
    dword_B61A78[0] = (int)ITableBase<TextDataType3,TextData3>::BeforeTerminate;
    byte_B6190C[0] = 20;
    dword_B61E68[0] = (int)NiRotKey::Interpolate;
    dword_B61CB8[0] = (int)NiColorKey::Equal;
    dword_B61958[0] = (int)NiRotKey::FillDerivedVals;
    result = 1;
  }
  return result;
}
// B61958: using guessed type int dword_B61958[];
// B619E8: using guessed type int dword_B619E8;
// B61A78: using guessed type int dword_B61A78[];
// B61B08: using guessed type int dword_B61B08;
// B61B98: using guessed type int dword_B61B98;
// B61C28: using guessed type int dword_B61C28[];
// B61CB8: using guessed type int dword_B61CB8[];
// B61D48: using guessed type int dword_B61D48;
// B61DD8: using guessed type int dword_B61DD8;
// B61E68: using guessed type int dword_B61E68[];
// B61EF8: using guessed type int dword_B61EF8;
// B61F88: using guessed type int dword_B61F88[];

//----- (007D2A50) --------------------------------------------------------
void __cdecl NiBezRotKey::Copy(NiAnimationKey *pkNewKey, NiAnimationKey *pkOrigKey)
{
  COERCE_NIANIMATIONKEY(pkNewKey->m_fTime) = COERCE_NIANIMATIONKEY(pkOrigKey->m_fTime);
  COERCE_NIANIMATIONKEY(pkNewKey[1].m_fTime) = pkOrigKey[1];
  COERCE_NIANIMATIONKEY(pkNewKey[2].m_fTime) = pkOrigKey[2];
  COERCE_NIANIMATIONKEY(pkNewKey[3].m_fTime) = pkOrigKey[3];
  COERCE_NIANIMATIONKEY(pkNewKey[4].m_fTime) = pkOrigKey[4];
  COERCE_NIANIMATIONKEY(pkNewKey[5].m_fTime) = pkOrigKey[5];
  COERCE_NIANIMATIONKEY(pkNewKey[6].m_fTime) = pkOrigKey[6];
  COERCE_NIANIMATIONKEY(pkNewKey[7].m_fTime) = pkOrigKey[7];
  COERCE_NIANIMATIONKEY(pkNewKey[8].m_fTime) = pkOrigKey[8];
}

//----- (007D2A90) --------------------------------------------------------
void __cdecl NiBezRotKey::Interpolate(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult)
{
  NiQuaternion *v4; // eax@1
  NiQuaternion result; // [sp+14h] [bp-10h]@1

  v4 = NiQuaternion::Squad(
         &result,
         fTime,
         (NiQuaternion *)&pKey0[1],
         (NiQuaternion *)&pKey0[5],
         (NiQuaternion *)&pKey1[5],
         (NiQuaternion *)&pKey1[1]);
  *(float *)pResult = v4->m_fW;
  *((_DWORD *)pResult + 1) = LODWORD(v4->m_fX);
  *((_DWORD *)pResult + 2) = LODWORD(v4->m_fY);
  *((_DWORD *)pResult + 3) = LODWORD(v4->m_fZ);
}

//----- (007D2AE0) --------------------------------------------------------
void __cdecl NiBezRotKey::FillDerivedVals(NiAnimationKey *pkKeys, unsigned int uiNumKeys, char ucSize)
{
  unsigned int v3; // ebx@1
  NiAnimationKey *v4; // esi@2
  NiQuaternion *v5; // eax@2
  NiQuaternion *v6; // eax@4
  float v7; // edx@4
  bool v8; // zf@4
  NiAnimationKey *v9; // esi@6
  NiQuaternion *v10; // eax@6
  NiQuaternion result; // [sp+4h] [bp-14h]@2
  unsigned int v12; // [sp+14h] [bp-4h]@3

  v3 = uiNumKeys;
  if ( uiNumKeys >= 2 )
  {
    NiRotKey::FillDerivedVals(pkKeys, uiNumKeys, ucSize);
    v4 = pkKeys + 10;
    v5 = NiQuaternion::Intermediate(
           &result,
           (NiQuaternion *)&pkKeys[1],
           (NiQuaternion *)&pkKeys[1],
           (NiQuaternion *)&pkKeys[10]);
    COERCE_NIANIMATIONKEY(pkKeys[5].m_fTime) = LODWORD(v5->m_fW);
    COERCE_NIANIMATIONKEY(pkKeys[6].m_fTime) = LODWORD(v5->m_fX);
    COERCE_NIANIMATIONKEY(pkKeys[7].m_fTime) = LODWORD(v5->m_fY);
    COERCE_NIANIMATIONKEY(pkKeys[8].m_fTime) = LODWORD(v5->m_fZ);
    if ( uiNumKeys - 1 > 1 )
    {
      v12 = uiNumKeys - 2;
      do
      {
        v6 = NiQuaternion::Intermediate(&result, (NiQuaternion *)&v4[-9], (NiQuaternion *)v4, (NiQuaternion *)&v4[9]);
        COERCE_NIANIMATIONKEY(v4[4].m_fTime) = LODWORD(v6->m_fW);
        COERCE_NIANIMATIONKEY(v4[5].m_fTime) = LODWORD(v6->m_fX);
        COERCE_NIANIMATIONKEY(v4[6].m_fTime) = LODWORD(v6->m_fY);
        v7 = v6->m_fZ;
        v8 = v12-- == 1;
        v4[7].m_fTime = v7;
        v4 += 9;
      }
      while ( !v8 );
      v3 = uiNumKeys;
    }
    v9 = &pkKeys[9 * v3 - 9];
    v10 = NiQuaternion::Intermediate(
            &result,
            (NiQuaternion *)&pkKeys[9 * v3 - 17],
            (NiQuaternion *)&v9[1],
            (NiQuaternion *)&v9[1]);
    COERCE_NIANIMATIONKEY(v9[5].m_fTime) = LODWORD(v10->m_fW);
    COERCE_NIANIMATIONKEY(v9[6].m_fTime) = LODWORD(v10->m_fX);
    COERCE_NIANIMATIONKEY(v9[7].m_fTime) = LODWORD(v10->m_fY);
    COERCE_NIANIMATIONKEY(v9[8].m_fTime) = LODWORD(v10->m_fZ);
  }
}

//----- (007D2BC0) --------------------------------------------------------
BOOL __cdecl NiBezRotKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1)
{
  BOOL result; // eax@1

  result = NiColorKey::Equal(key0, key1);
  if ( (_BYTE)result )
    result = key1[5].m_fTime == key0[5].m_fTime
          && key1[6].m_fTime == key0[6].m_fTime
          && key1[7].m_fTime == key0[7].m_fTime
          && key1[8].m_fTime == key0[8].m_fTime;
  return result;
}

//----- (007D2C30) --------------------------------------------------------
void __cdecl NiBezRotKey::SaveToStream(NiStream *stream, NiAnimationKey *pkKeys, unsigned int uiNumKeys)
{
  unsigned int v3; // edi@1
  NiAnimationKey *v4; // esi@2

  v3 = uiNumKeys;
  if ( uiNumKeys )
  {
    v4 = pkKeys;
    do
    {
      NiRotKey::SaveBinary(stream, v4);
      v4 += 9;
      --v3;
    }
    while ( v3 );
  }
}

//----- (007D2C60) --------------------------------------------------------
NiAnimationKey *__cdecl NiBezRotKey::CreateArray(unsigned int uiNumKeys)
{
  unsigned int v1; // ecx@1
  unsigned int *v2; // eax@1
  signed int v3; // edi@2
  NiAnimationKey *v4; // ebx@2
  NiQuaternion *v5; // esi@3
  NiAnimationKey *result; // eax@5

  v1 = 36 * uiNumKeys | -(36 * (unsigned __int64)uiNumKeys >> 32 != 0);
  v2 = (unsigned int *)operator new((v1 + 4) | -__CFADD__(v1, 4));
  if ( v2 )
  {
    v3 = uiNumKeys - 1;
    *v2 = uiNumKeys;
    v4 = (NiAnimationKey *)(v2 + 1);
    if ( ((uiNumKeys - 1) & 0x80000000) == 0 )
    {
      v5 = (NiQuaternion *)(v2 + 2);
      do
      {
        NiQuaternion::NiQuaternion(v5, 0.0, 0.0, 0.0, 0.0);
        v5 = (NiQuaternion *)((char *)v5 + 36);
        --v3;
      }
      while ( v3 >= 0 );
    }
    result = v4;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007D2CD0) --------------------------------------------------------
char __cdecl NiBezRotKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys)
{
  NiAnimationKey *v3; // ebx@1
  unsigned int v4; // edi@2
  int v5; // ecx@2
  unsigned int *v6; // eax@2
  int v7; // eax@3
  NiQuaternion *v8; // edi@4
  void *v9; // edi@7
  unsigned int v10; // eax@11
  char result; // al@13
  NiQuaternion kQ; // [sp+20h] [bp-1Ch]@11
  int v13; // [sp+30h] [bp-Ch]@3
  int v14; // [sp+34h] [bp-8h]@3
  unsigned int uiInsertAt; // [sp+38h] [bp-4h]@1

  v3 = *pkKeys;
  if ( NiAnimationKey::OkayToInsert(fTime, *pkKeys, *uiNumKeys, &uiInsertAt, 36) )
  {
    v4 = *uiNumKeys + 1;
    v5 = 36 * v4 | -(36 * (unsigned __int64)v4 >> 32 != 0);
    v6 = (unsigned int *)operator new((v5 + 4) | -__CFADD__(v5, 4));
    if ( v6 )
    {
      *v6 = v4;
      v7 = (int)(v6 + 1);
      v13 = v7;
      v14 = v4 - 1;
      if ( ((v4 - 1) & 0x80000000) == 0 )
      {
        v8 = (NiQuaternion *)(v7 + 4);
        do
        {
          NiQuaternion::NiQuaternion(v8, 0.0, 0.0, 0.0, 0.0);
          v8 = (NiQuaternion *)((char *)v8 + 36);
          --v14;
        }
        while ( v14 >= 0 );
        v7 = v13;
      }
      v9 = (void *)v7;
    }
    else
    {
      v9 = 0;
    }
    memcpy_s(v9, 4 * (9 * *uiNumKeys + 9), v3, 36 * uiInsertAt);
    if ( *uiNumKeys > uiInsertAt )
      memcpy_s(
        (char *)v9 + 36 * uiInsertAt + 36,
        36 * (*uiNumKeys - uiInsertAt),
        &v3[9 * uiInsertAt],
        36 * (*uiNumKeys - uiInsertAt));
    NiRotKey::GenInterpDefault(&kQ, fTime, (NiRotKey *)v3, BEZKEY, *uiNumKeys, 36);
    v10 = (unsigned int)v9 + 36 * uiInsertAt;
    *(float *)v10 = fTime;
    *(NiQuaternion *)(v10 + 4) = kQ;
    ++*uiNumKeys;
    if ( v3 )
      operator delete(&v3[-1]);
    *pkKeys = (NiAnimationKey *)v9;
    NiBezRotKey::FillDerivedVals((NiAnimationKey *)v9, *uiNumKeys, 36);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007D2E30) --------------------------------------------------------
NiBezRotKey *__cdecl NiBezRotKey::CreateFromStream(NiStream *stream, unsigned int uiNumKeys)
{
  unsigned int v2; // ebx@1
  unsigned int v3; // ecx@1
  void *v4; // eax@1
  NiBezRotKey *result; // eax@2
  signed int v6; // edi@2
  NiQuaternion *v7; // esi@3
  NiRotKey *v8; // esi@9
  NiBezRotKey *pkBezRotKeys; // [sp+28h] [bp+Ch]@2
  NiBezRotKey *pkBezRotKeysa; // [sp+28h] [bp+Ch]@6

  v2 = uiNumKeys;
  v3 = 36 * uiNumKeys | -(36 * (unsigned __int64)uiNumKeys >> 32 != 0);
  v4 = operator new((v3 + 4) | -__CFADD__(v3, 4));
  if ( v4 )
  {
    *(_DWORD *)v4 = uiNumKeys;
    result = (NiBezRotKey *)((char *)v4 + 4);
    v6 = uiNumKeys - 1;
    pkBezRotKeys = result;
    if ( ((v2 - 1) & 0x80000000) == 0 )
    {
      v7 = &result->m_quat;
      do
      {
        NiQuaternion::NiQuaternion(v7, 0.0, 0.0, 0.0, 0.0);
        v7 = (NiQuaternion *)((char *)v7 + 36);
        --v6;
      }
      while ( v6 >= 0 );
      result = pkBezRotKeys;
    }
    pkBezRotKeysa = result;
  }
  else
  {
    pkBezRotKeysa = 0;
    result = 0;
  }
  if ( v2 )
  {
    v8 = (NiRotKey *)result;
    do
    {
      NiColorKey::LoadBinary(v8, stream);
      v8 = (NiRotKey *)((char *)v8 + 36);
      --v2;
    }
    while ( v2 );
    result = pkBezRotKeysa;
  }
  return result;
}

//----- (007D2ED0) --------------------------------------------------------
int __cdecl NiBezRotKey::RegisterLoader()
{
  int result; // eax@1

  result = 0;
  if ( !bRegistered_4 )
  {
    dword_B61F00 = 0;
    dword_B61DE0 = 0;
    dword_B61D50 = 0;
    bRegistered_4 = 1;
    dword_B61F90 = (int)NiBezRotKey::CreateFromStream;
    dword_B61C30 = (int)NiBezRotKey::SaveToStream;
    dword_B61BA0 = (int)NiBezRotKey::Copy;
    dword_B61B10 = (int)NiBezRotKey::CreateArray;
    dword_B61A80 = (int)NiLinRotKey::DeleteArray;
    byte_B6190E = 36;
    dword_B61E70 = (int)NiBezRotKey::Interpolate;
    dword_B61CC0 = (int)NiBezRotKey::Equal;
    dword_B61960 = (int)NiBezRotKey::FillDerivedVals;
    dword_B619F0 = (int)NiBezRotKey::Insert;
    result = 1;
  }
  return result;
}
// B6190E: using guessed type char byte_B6190E;
// B61960: using guessed type int dword_B61960;
// B619F0: using guessed type int dword_B619F0;
// B61A80: using guessed type int dword_B61A80;
// B61B10: using guessed type int dword_B61B10;
// B61BA0: using guessed type int dword_B61BA0;
// B61C30: using guessed type int dword_B61C30;
// B61CC0: using guessed type int dword_B61CC0;
// B61D50: using guessed type int dword_B61D50;
// B61DE0: using guessed type int dword_B61DE0;
// B61E70: using guessed type int dword_B61E70;
// B61F00: using guessed type int dword_B61F00;
// B61F90: using guessed type int dword_B61F90;

//----- (007D2F60) --------------------------------------------------------
bool __cdecl NiBoolKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1)
{
  bool result; // al@1

  result = NiAnimationKey::Equal(key0, key1);
  if ( result )
    result = LOBYTE(key0[1].m_fTime) == LOBYTE(key1[1].m_fTime);
  return result;
}

//----- (007D2F90) --------------------------------------------------------
void __cdecl NiBoolKey::InterpolateD2(float __formal, NiAnimationKey *a2, NiAnimationKey *a3, void *pResult)
{
  *(_BYTE *)pResult = NiBoolKey::ms_bDefault;
}
// B61899: using guessed type bool NiBoolKey::ms_bDefault;

//----- (007D2FA0) --------------------------------------------------------
bool __cdecl NiBoolKey::GenInterp(float fTime, NiBoolKey *pkKeys, NiAnimationKey::KeyType eType, unsigned int uiNumKeys, unsigned int *uiLastIdx, char ucSize)
{
  bool result; // al@2
  unsigned int *v7; // edx@3
  NiBoolKey *v8; // ebx@3
  int v9; // edi@3
  unsigned int v10; // esi@3
  double v11; // st7@3
  unsigned int v12; // ecx@5
  int v13; // esi@7
  unsigned int *v14; // ebx@7
  unsigned int *v15; // edi@7
  double v16; // st6@8
  int v17; // eax@10
  int v18; // edi@15
  unsigned int *v19; // esi@15
  int v20; // esi@22
  int v21; // ecx@22
  unsigned int uiNumKeysM1; // [sp+20h] [bp-10h]@3
  unsigned int *v23; // [sp+24h] [bp-Ch]@7
  unsigned int *v24; // [sp+28h] [bp-8h]@7
  float fLastTime; // [sp+2Ch] [bp-4h]@3

  if ( uiNumKeys == 1 )
  {
    result = pkKeys->m_bBool;
  }
  else
  {
    v7 = uiLastIdx;
    v8 = pkKeys;
    v9 = (unsigned __int8)ucSize;
    v10 = uiNumKeys - 1;
    uiNumKeysM1 = uiNumKeys - 1;
    fLastTime = *(float *)((char *)&pkKeys->m_fTime + (unsigned __int8)ucSize * *uiLastIdx);
    v11 = fTime;
    if ( fLastTime > (double)fTime )
    {
      *uiLastIdx = 0;
      fLastTime = pkKeys->m_fTime;
    }
    v12 = *v7 + 1;
    if ( v12 > v10 )
    {
      v16 = *(float *)&uiNumKeys;
    }
    else if ( (signed int)(v10 - v12 + 1) < 4 )
    {
      v16 = *(float *)&uiNumKeys;
LABEL_14:
      if ( v12 <= v10 )
      {
        v18 = (unsigned __int8)ucSize;
        v19 = (unsigned int *)((char *)v8 + v12 * (unsigned __int8)ucSize);
        do
        {
          uiNumKeys = *v19;
          v16 = *(float *)&uiNumKeys;
          if ( *(float *)&uiNumKeys >= v11 )
            break;
          ++*v7;
          fLastTime = v16;
          ++v12;
          v19 = (unsigned int *)((char *)v19 + v18);
        }
        while ( v12 <= uiNumKeysM1 );
      }
    }
    else
    {
      v24 = (unsigned int *)((char *)pkKeys + v12 * v9);
      v13 = 4 * v9;
      v23 = (unsigned int *)((char *)pkKeys + v9 * (*v7 + 4));
      v14 = (unsigned int *)((char *)pkKeys + v9 * (*v7 + 3));
      v15 = (unsigned int *)((char *)pkKeys + (unsigned __int8)ucSize * (*v7 + 2));
      while ( 1 )
      {
        uiNumKeys = *v24;
        v16 = *(float *)&uiNumKeys;
        if ( *(float *)&uiNumKeys >= v11 )
          break;
        ++*v7;
        fLastTime = v16;
        uiNumKeys = *v15;
        v16 = *(float *)&uiNumKeys;
        if ( *(float *)&uiNumKeys >= v11 )
        {
          ++v12;
          break;
        }
        fLastTime = *(float *)&uiNumKeys;
        v17 = *v7 + 1;
        *v7 = v17;
        uiNumKeys = *v14;
        v16 = *(float *)&uiNumKeys;
        if ( *(float *)&uiNumKeys >= v11 )
        {
          v12 += 2;
          break;
        }
        fLastTime = *(float *)&uiNumKeys;
        *v7 = v17 + 1;
        uiNumKeys = *v23;
        v16 = *(float *)&uiNumKeys;
        if ( *(float *)&uiNumKeys >= v11 )
        {
          v12 += 3;
          break;
        }
        fLastTime = *(float *)&uiNumKeys;
        v24 = (unsigned int *)((char *)v24 + v13);
        v23 = (unsigned int *)((char *)v23 + v13);
        *v7 = v17 + 2;
        v12 += 4;
        v15 = (unsigned int *)((char *)v15 + v13);
        v14 = (unsigned int *)((char *)v14 + v13);
        if ( v12 > uiNumKeysM1 - 3 )
        {
          v8 = pkKeys;
          v10 = uiNumKeysM1;
          goto LABEL_14;
        }
      }
      v8 = pkKeys;
    }
    v20 = v12 * (unsigned __int8)ucSize;
    v21 = (unsigned __int8)ucSize * *v7;
    *(float *)&uiNumKeys = (v11 - fLastTime) / (v16 - fLastTime);
    ((void (__cdecl *)(unsigned int, char *, char *, char *))dword_B61EB0[eType])(
      uiNumKeys,
      (char *)v8 + v21,
      (char *)v8 + v20,
      (char *)&uiNumKeys + 3);
    result = BYTE3(uiNumKeys);
  }
  return result;
}
// B61EB0: using guessed type int dword_B61EB0[];

//----- (007D3170) --------------------------------------------------------
bool __cdecl NiBoolKey::GenInterpDefault(float fTime, NiBoolKey *pkKeys, NiAnimationKey::KeyType eType, unsigned int uiNumKeys, char ucSize)
{
  bool result; // al@3
  unsigned int v6; // ST0C_4@6

  if ( uiNumKeys )
  {
    if ( pkKeys->m_fTime <= (double)fTime )
    {
      if ( *(float *)((char *)&pkKeys->m_fTime + (unsigned __int8)ucSize * (uiNumKeys - 1)) >= (double)fTime )
      {
        v6 = uiNumKeys;
        uiNumKeys = 0;
        result = NiBoolKey::GenInterp(fTime, pkKeys, eType, v6, &uiNumKeys, ucSize);
      }
      else
      {
        result = *(&pkKeys->m_bBool + (unsigned __int8)ucSize * (uiNumKeys - 1));
      }
    }
    else
    {
      result = pkKeys->m_bBool;
    }
  }
  else
  {
    result = NiBoolKey::ms_bDefault;
  }
  return result;
}
// B61899: using guessed type bool NiBoolKey::ms_bDefault;

//----- (007D31F0) --------------------------------------------------------
int __cdecl NiBoolKey::RegisterLoader()
{
  int result; // eax@2

  if ( bRegistered_5 )
  {
    result = 0;
  }
  else
  {
    result = 1;
    bRegistered_5 = 1;
    dword_B61FD0[0] = (int)Item::GetCurUpGradeLevel;
    dword_B61C70[0] = (int)ITableBase<TextDataType3,TextData3>::BeforeTerminate;
    dword_B61BE0 = (int)ITableBase<TextDataType3,TextData3>::BeforeTerminate;
    dword_B61B50 = (int)Item::GetCurUpGradeLevel;
    dword_B61AC0[0] = (int)ITableBase<TextDataType3,TextData3>::BeforeTerminate;
    byte_B6191E[0] = 8;
    dword_B61F40 = (int)NiBoolKey::ComputeMaxCurvature;
    dword_B61EB0[0] = (int)NiBoolKey::InterpolateD2;
    dword_B61E20 = (int)NiBoolKey::InterpolateD2;
    dword_B61D90 = (int)NiBoolKey::InterpolateD2;
    dword_B61D00[0] = (int)NiBoolKey::Equal;
    dword_B619A0[0] = (int)ITableBase<TextDataType3,TextData3>::BeforeTerminate;
    dword_B61A30 = 0;
  }
  return result;
}
// B619A0: using guessed type int dword_B619A0[];
// B61A30: using guessed type int dword_B61A30;
// B61AC0: using guessed type int dword_B61AC0[];
// B61B50: using guessed type int dword_B61B50;
// B61BE0: using guessed type int dword_B61BE0;
// B61C70: using guessed type int dword_B61C70[];
// B61D00: using guessed type int dword_B61D00[];
// B61D90: using guessed type int dword_B61D90;
// B61E20: using guessed type int dword_B61E20;
// B61EB0: using guessed type int dword_B61EB0[];
// B61F40: using guessed type int dword_B61F40;
// B61FD0: using guessed type int dword_B61FD0[];

//----- (007D3290) --------------------------------------------------------
void __cdecl NiStreamLoadBinary<bool>(NiStream *kStream, bool *value)
{
  NiBinaryStream *v2; // eax@1
  NiBinaryStream *v3; // ST00_4@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1

  v2 = kStream->m_pkIstr;
  v3 = v2;
  v4 = v2->m_pfnRead;
  kStream = (NiStream *)1;
  v4(v3, value, 1u, (unsigned int *)&kStream, 1u);
}

//----- (007D32C0) --------------------------------------------------------
void __cdecl NiStreamSaveBinary<bool>(NiStream *kStream, const bool *value)
{
  NiBinaryStream *v2; // eax@1
  NiBinaryStream *v3; // ST00_4@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1

  v2 = kStream->m_pkOstr;
  v3 = v2;
  v4 = v2->m_pfnWrite;
  kStream = (NiStream *)1;
  v4(v3, value, 1u, (unsigned int *)&kStream, 1u);
}

//----- (007D32F0) --------------------------------------------------------
void __thiscall NiBoolKey::LoadBinary(NiBoolKey *this, NiStream *stream)
{
  NiStream *v2; // edi@1
  unsigned int (__cdecl *v3)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@1
  NiBoolKey *v4; // esi@1
  NiBinaryStream *v5; // ST14_4@1
  NiBinaryStream *v6; // eax@1
  NiBinaryStream *v7; // ST00_4@1
  unsigned int (__cdecl *v8)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  int v9; // [sp+8h] [bp-4h]@1

  v2 = stream;
  v3 = stream->m_pkIstr->m_pfnRead;
  v4 = this;
  v5 = stream->m_pkIstr;
  v9 = 4;
  v3(v5, this, 4u, (unsigned int *)&v9, 1u);
  v6 = v2->m_pkIstr;
  v7 = v6;
  v8 = v6->m_pfnRead;
  v9 = 1;
  v8(v7, (char *)&stream + 3, 1u, (unsigned int *)&v9, 1u);
  v4->m_bBool = BYTE3(stream) != 0;
}

//----- (007D3350) --------------------------------------------------------
void __cdecl NiBoolKey::SaveBinary(NiStream *stream, NiAnimationKey *pkKey)
{
  NiAnimationKey *v2; // esi@1
  NiStream *v3; // edi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST00_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1

  v2 = pkKey;
  v3 = stream;
  NiAnimationKey::SaveBinary(stream, (const int *)pkKey);
  BYTE3(pkKey) = LOBYTE(v2[1].m_fTime) != 0;
  v4 = v3->m_pkOstr;
  v5 = v4;
  v6 = v4->m_pfnWrite;
  stream = (NiStream *)1;
  v6(v5, (char *)&pkKey + 3, 1u, (unsigned int *)&stream, 1u);
}

//----- (007D33A0) --------------------------------------------------------
void __thiscall NiColorKey::LoadBinary(NiRotKey *this, NiStream *stream)
{
  NiRotKey *v2; // esi@1

  v2 = this;
  NiAnimationKey::LoadBinary((NiAnimationKey *)&this->m_fTime, stream);
  NiColorA::LoadBinary(&v2->m_quat, stream);
}

//----- (007D33C0) --------------------------------------------------------
void __cdecl NiColorKey::SaveBinary(NiStream *stream, NiAnimationKey *pkKey)
{
  NiAnimationKey::SaveBinary(stream, (const int *)pkKey);
  NiColorA::SaveBinary((NiColorA *)&pkKey[1], stream);
}

//----- (007D33F0) --------------------------------------------------------
void __cdecl NiColorKey::Interpolate(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult)
{
  *(struct NiColorA *)pResult = NiColorA::BLACK;
}
// A7D128: using guessed type const struct NiColorA NiColorA::BLACK;

//----- (007D3420) --------------------------------------------------------
NiColorA *__cdecl NiColorKey::GenInterp(NiColorA *result, float fTime, NiColorKey *pkKeys, NiAnimationKey::KeyType eType, unsigned int uiNumKeys, unsigned int *uiLastIdx, char ucSize)
{
  NiColorA *v7; // eax@2
  float v8; // ecx@2
  NiColorKey *v9; // ebx@3
  unsigned int v10; // esi@3
  unsigned int v11; // eax@3
  double v12; // st7@3
  unsigned int v13; // ecx@5
  int v14; // esi@7
  float *v15; // ebx@7
  float *v16; // edi@7
  double v17; // st6@8
  unsigned int v18; // eax@10
  int v19; // eax@11
  float *v20; // esi@15
  float v21; // edx@22
  float v22; // ecx@22
  float v23; // edx@22
  NiColorA kResult; // [sp+1Ch] [bp-24h]@22
  unsigned int v25; // [sp+2Ch] [bp-14h]@10
  unsigned int uiNumKeysM1; // [sp+30h] [bp-10h]@3
  NiColorKey *v27; // [sp+34h] [bp-Ch]@7
  NiColorKey *v28; // [sp+38h] [bp-8h]@7
  float fLastTime; // [sp+3Ch] [bp-4h]@3
  float fNextTime; // [sp+58h] [bp+18h]@9
  float fNextTimea; // [sp+58h] [bp+18h]@10
  float fNextTimeb; // [sp+58h] [bp+18h]@11
  float fNextTimec; // [sp+58h] [bp+18h]@22

  if ( uiNumKeys == 1 )
  {
    v7 = result;
    result->r = pkKeys->m_Color.r;
    result->g = pkKeys->m_Color.g;
    v8 = pkKeys->m_Color.a;
    result->b = pkKeys->m_Color.b;
    result->a = v8;
  }
  else
  {
    v9 = pkKeys;
    v10 = uiNumKeys - 1;
    v11 = *uiLastIdx;
    uiNumKeysM1 = uiNumKeys - 1;
    fLastTime = *(float *)((char *)&pkKeys->m_fTime + (unsigned __int8)ucSize * v11);
    v12 = fTime;
    if ( fLastTime > (double)fTime )
    {
      *uiLastIdx = 0;
      fLastTime = pkKeys->m_fTime;
    }
    v13 = *uiLastIdx + 1;
    if ( v13 > v10 )
    {
      v17 = *(float *)&uiNumKeys;
    }
    else if ( (signed int)(v10 - v13 + 1) < 4 )
    {
      v17 = *(float *)&uiNumKeys;
LABEL_14:
      if ( v13 <= v10 )
      {
        v20 = (float *)((char *)&v9->m_fTime + v13 * (unsigned __int8)ucSize);
        do
        {
          v17 = *v20;
          if ( v17 >= v12 )
            break;
          ++*uiLastIdx;
          fLastTime = v17;
          ++v13;
          v20 = (float *)((char *)v20 + (unsigned __int8)ucSize);
        }
        while ( v13 <= uiNumKeysM1 );
      }
    }
    else
    {
      v28 = (NiColorKey *)((char *)pkKeys + v13 * (unsigned __int8)ucSize);
      v14 = 4 * (unsigned __int8)ucSize;
      v27 = (NiColorKey *)((char *)pkKeys + (unsigned __int8)ucSize * (v13 + 3));
      v15 = (float *)((char *)&pkKeys->m_fTime + (unsigned __int8)ucSize * (v13 + 2));
      v16 = (float *)((char *)&pkKeys->m_fTime + (unsigned __int8)ucSize * (v13 + 1));
      while ( 1 )
      {
        v17 = v28->m_fTime;
        if ( v17 >= v12 )
          break;
        ++*uiLastIdx;
        fLastTime = v17;
        fNextTime = *v16;
        v17 = fNextTime;
        if ( fNextTime >= v12 )
        {
          ++v13;
          break;
        }
        v18 = *uiLastIdx;
        fLastTime = fNextTime;
        *uiLastIdx = ++v18;
        fNextTimea = *v15;
        v25 = v18;
        v17 = fNextTimea;
        if ( fNextTimea >= v12 )
        {
          v13 += 2;
          break;
        }
        fLastTime = fNextTimea;
        v19 = v25 + 1;
        *uiLastIdx = v25 + 1;
        v25 = v19;
        fNextTimeb = v27->m_fTime;
        v17 = fNextTimeb;
        if ( fNextTimeb >= v12 )
        {
          v13 += 3;
          break;
        }
        fLastTime = fNextTimeb;
        v28 = (NiColorKey *)((char *)v28 + v14);
        v27 = (NiColorKey *)((char *)v27 + v14);
        *uiLastIdx = v25 + 1;
        v13 += 4;
        v16 = (float *)((char *)v16 + v14);
        v15 = (float *)((char *)v15 + v14);
        if ( v13 > uiNumKeysM1 - 3 )
        {
          v9 = pkKeys;
          v10 = uiNumKeysM1;
          goto LABEL_14;
        }
      }
      v9 = pkKeys;
    }
    kResult.r = 0.0;
    kResult.g = 0.0;
    kResult.b = 0.0;
    kResult.a = 0.0;
    fNextTimec = (v12 - fLastTime) / (v17 - fLastTime);
    ((void (__cdecl *)(_DWORD, char *, char *, NiColorA *))dword_B61E80[eType])(
      LODWORD(fNextTimec),
      (char *)v9 + (unsigned __int8)ucSize * *uiLastIdx,
      (char *)v9 + v13 * (unsigned __int8)ucSize,
      &kResult);
    v7 = result;
    v21 = kResult.g;
    result->r = kResult.r;
    v22 = kResult.b;
    result->g = v21;
    v23 = kResult.a;
    result->b = v22;
    result->a = v23;
  }
  return v7;
}
// B61E80: using guessed type int dword_B61E80[];

//----- (007D3630) --------------------------------------------------------
NiColorA *__cdecl NiColorKey::GenInterpDefault(NiColorA *result, float fTime, NiColorKey *pkKeys, NiAnimationKey::KeyType eType, unsigned int uiNumKeys, char ucSize)
{
  NiColorA *v6; // eax@3
  char *v7; // ecx@5
  unsigned int v8; // ST10_4@6

  if ( uiNumKeys )
  {
    if ( pkKeys->m_fTime <= (double)fTime )
    {
      if ( *(float *)((char *)&pkKeys->m_fTime + (unsigned __int8)ucSize * (uiNumKeys - 1)) >= (double)fTime )
      {
        v8 = uiNumKeys;
        uiNumKeys = 0;
        NiColorKey::GenInterp(result, fTime, pkKeys, eType, v8, &uiNumKeys, ucSize);
        v6 = result;
      }
      else
      {
        v6 = result;
        v7 = (char *)&pkKeys->m_Color + (unsigned __int8)ucSize * (uiNumKeys - 1);
        result->r = *(float *)v7;
        result->g = *((float *)v7 + 1);
        result->b = *((float *)v7 + 2);
        result->a = *((float *)v7 + 3);
      }
    }
    else
    {
      v6 = result;
      result->r = pkKeys->m_Color.r;
      result->g = pkKeys->m_Color.g;
      result->b = pkKeys->m_Color.b;
      result->a = pkKeys->m_Color.a;
    }
  }
  else
  {
    v6 = result;
    *result = NiColorKey::ms_kDefault;
  }
  return v6;
}
// B6189C: using guessed type struct NiColorA NiColorKey::ms_kDefault;

//----- (007D3700) --------------------------------------------------------
BOOL __cdecl NiColorKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1)
{
  BOOL result; // eax@1

  result = NiAnimationKey::Equal(key0, key1);
  if ( (_BYTE)result )
    result = key1[1].m_fTime == key0[1].m_fTime
          && key1[2].m_fTime == key0[2].m_fTime
          && key1[3].m_fTime == key0[3].m_fTime
          && key1[4].m_fTime == key0[4].m_fTime;
  return result;
}

//----- (007D3770) --------------------------------------------------------
int __cdecl NiColorKey::RegisterLoader()
{
  int result; // eax@1

  result = 0;
  if ( !bRegistered_6 )
  {
    dword_B61F10 = 0;
    dword_B61DF0 = 0;
    dword_B61D60 = 0;
    dword_B61970 = 0;
    dword_B61A00 = 0;
    bRegistered_6 = 1;
    dword_B61FA0[0] = (int)Item::GetCurUpGradeLevel;
    dword_B61C40[0] = (int)ITableBase<TextDataType3,TextData3>::BeforeTerminate;
    dword_B61BB0 = (int)ITableBase<TextDataType3,TextData3>::BeforeTerminate;
    dword_B61B20 = (int)Item::GetCurUpGradeLevel;
    dword_B61A90[0] = (int)ITableBase<TextDataType3,TextData3>::BeforeTerminate;
    byte_B61912[0] = 20;
    dword_B61E80[0] = (int)NiColorKey::Interpolate;
    dword_B61CD0[0] = (int)NiColorKey::Equal;
    result = 1;
  }
  return result;
}
// B61970: using guessed type int dword_B61970;
// B61A00: using guessed type int dword_B61A00;
// B61A90: using guessed type int dword_B61A90[];
// B61B20: using guessed type int dword_B61B20;
// B61BB0: using guessed type int dword_B61BB0;
// B61C40: using guessed type int dword_B61C40[];
// B61CD0: using guessed type int dword_B61CD0[];
// B61D60: using guessed type int dword_B61D60;
// B61DF0: using guessed type int dword_B61DF0;
// B61E80: using guessed type int dword_B61E80[];
// B61F10: using guessed type int dword_B61F10;
// B61FA0: using guessed type int dword_B61FA0[];

//----- (007D37F0) --------------------------------------------------------
void __thiscall NiEulerRotKey::CleanUp(NiEulerRotKey *this)
{
  char *v1; // esi@1
  signed int v2; // ebx@1

  v1 = (char *)this->m_apkKeys;
  v2 = 3;
  do
  {
    if ( *(_DWORD *)v1 )
      ((void (__cdecl *)(_DWORD))(&NiAnimationKey::ms_deletes)[*((_DWORD *)v1 - 4)])(*(_DWORD *)v1);
    *(_DWORD *)v1 = 0;
    *((_DWORD *)v1 - 7) = 0;
    *((_DWORD *)v1 - 4) = 0;
    v1 += 4;
    --v2;
  }
  while ( v2 );
}
// B61A48: using guessed type void (__cdecl static **NiAnimationKey::ms_deletes)(struct NiAnimationKey *);

//----- (007D3830) --------------------------------------------------------
void __cdecl NiEulerRotKey::Interpolate(float fTime, NiAnimationKey *pkKey0, NiAnimationKey *pkKey1, void *pkResult)
{
  float *v4; // ecx@1
  unsigned int v5; // edi@1
  NiAnimationKey *v6; // esi@1
  double v7; // st7@3
  float v8; // ST3C_4@6
  float v9; // ST28_4@6
  float v10; // ST38_4@6
  float v11; // ST34_4@6
  float v12; // ST30_4@6
  float v13; // ST3C_4@6
  float v14; // ST24_4@6
  float v15; // ST2C_4@6
  float v16; // ST34_4@6
  double v17; // st6@6
  double v18; // st4@6
  double v19; // st7@6
  double v20; // st5@6
  float angles[3]; // [sp+40h] [bp-10h]@5

  v4 = (float *)pkResult;
  v5 = 0;
  v6 = pkKey0 + 5;
  do
  {
    if ( LODWORD(v6->m_fTime) )
    {
      v7 = NiFloatKey::GenInterp(
             fTime,
             (NiFloatKey *)LODWORD(v6[7].m_fTime),
             (NiAnimationKey::KeyType)LODWORD(v6[3].m_fTime),
             LODWORD(v6->m_fTime),
             (unsigned int *)&v6[10],
             *((_BYTE *)&pkKey0[11].m_fTime + v5));
      v4 = (float *)pkResult;
    }
    else
    {
      v7 = 0.0;
    }
    angles[v5++] = v7;
    ++v6;
  }
  while ( v5 < 3 );
  v8 = angles[0] * 0.5;
  v9 = cos(v8);
  v10 = sin(v8);
  v11 = angles[1] * 0.5;
  v12 = cos(v11);
  v13 = sin(v11);
  v14 = angles[2] * 0.5;
  v15 = cos(v14);
  v16 = sin(v14);
  v17 = v16 * v13;
  v18 = v15 * v12;
  *v4 = v9 * v18 + v10 * v17;
  v4[1] = v18 * v10 - v17 * v9;
  v19 = v16 * v12;
  v20 = v13 * v15;
  v4[2] = v9 * v20 + v10 * v19;
  v4[3] = v19 * v9 - v10 * v20;
}

//----- (007D3940) --------------------------------------------------------
char __cdecl NiEulerRotKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1)
{
  NiAnimationKey *v2; // esi@1
  unsigned int v3; // ecx@1
  signed int v4; // eax@1
  NiAnimationKey *v5; // edi@1
  char *v6; // ebx@5
  float v7; // edx@6
  int v8; // esi@7
  bool (__cdecl *equal)(NiAnimationKey *, NiAnimationKey *); // [sp+Ch] [bp-10h]@7
  unsigned int uiI; // [sp+10h] [bp-Ch]@1
  NiAnimationKey *v12; // [sp+18h] [bp-4h]@1

  v2 = key0;
  v3 = 0;
  v4 = (char *)key1 - (char *)key0;
  uiI = 0;
  v12 = key1 + 12;
  v5 = key0 + 8;
  while ( LODWORD(v5[-3].m_fTime) == *(_DWORD *)((char *)&v5[-3].m_fTime + v4) )
  {
    if ( LODWORD(v5->m_fTime) != *(_DWORD *)((char *)&v5->m_fTime + v4) )
      break;
    v6 = (char *)&v2[11] + v3;
    if ( *v6 != *((_BYTE *)&key1[11].m_fTime + v3) )
      break;
    v7 = v5[-3].m_fTime;
    if ( v7 != 0.0 )
    {
      equal = (bool (__cdecl *)(NiAnimationKey *, NiAnimationKey *))(&NiAnimationKey::ms_equals)[LODWORD(v5->m_fTime)];
      v8 = 0;
      if ( v7 != 0.0 )
      {
        while ( equal(
                  (NiAnimationKey *)(LODWORD(v5[4].m_fTime) + v8 * (unsigned __int8)*v6),
                  (NiAnimationKey *)(LODWORD(v12->m_fTime) + v8 * (unsigned __int8)v6[v4])) )
        {
          v4 = (char *)key1 - (char *)key0;
          if ( (unsigned int)++v8 >= LODWORD(v5[-3].m_fTime) )
          {
            v3 = uiI;
            goto LABEL_11;
          }
        }
        return 0;
      }
    }
LABEL_11:
    ++v12;
    ++v3;
    ++v5;
    uiI = v3;
    if ( v3 >= 3 )
      return 1;
    v2 = key0;
  }
  return 0;
}
// B61C88: using guessed type bool (__cdecl static **NiAnimationKey::ms_equals)(const struct NiAnimationKey *, const struct NiAnimationKey *);

//----- (007D39F0) --------------------------------------------------------
void __cdecl NiEulerRotKey::Copy(NiAnimationKey *pkNewKey, NiAnimationKey *pkOrigKey)
{
  NiAnimationKey *v2; // eax@1
  int v3; // ecx@1
  NiAnimationKey *v4; // edi@1
  char *v5; // edx@1
  float v6; // ebx@2
  unsigned int v7; // esi@3
  void (__cdecl *copy)(NiAnimationKey *, NiAnimationKey *); // [sp+Ch] [bp-10h]@3
  char *v9; // [sp+10h] [bp-Ch]@1
  signed int v10; // [sp+14h] [bp-8h]@1
  NiAnimationKey *v11; // [sp+18h] [bp-4h]@1
  NiAnimationKey *pkNewKeya; // [sp+24h] [bp+8h]@1
  NiAnimationKey *pkOrigKeya; // [sp+28h] [bp+Ch]@1

  v2 = pkNewKey;
  v11 = pkNewKey + 11;
  pkNewKeya = pkNewKey + 12;
  v3 = (char *)v2 - (char *)pkOrigKey;
  v4 = pkOrigKey + 8;
  v5 = (char *)((char *)pkOrigKey - (char *)v2);
  pkOrigKeya = (NiAnimationKey *)((char *)v2 - (char *)pkOrigKey);
  v9 = v5;
  v10 = 3;
  do
  {
    *(NiAnimationKey *)((char *)v4 + v3 - 12) = v4[-3];
    *(NiAnimationKey *)((char *)v4 + v3) = COERCE_NIANIMATIONKEY(v4->m_fTime);
    v6 = v4[-3].m_fTime;
    if ( v6 != 0.0 )
    {
      LODWORD(pkNewKeya->m_fTime) = ((int (__cdecl *)(_DWORD))(&NiAnimationKey::ms_arrays)[LODWORD(v4->m_fTime)])(LODWORD(v4[-3].m_fTime));
      v7 = 0;
      copy = (void (__cdecl *)(NiAnimationKey *, NiAnimationKey *))(&NiAnimationKey::ms_copies)[LODWORD(v4->m_fTime)];
      if ( v6 != 0.0 )
      {
        do
        {
          copy(
            (NiAnimationKey *)(LODWORD(pkNewKeya->m_fTime) + v7 * LOBYTE(v11->m_fTime)),
            (NiAnimationKey *)(LODWORD(v4[4].m_fTime) + v7 * *((_BYTE *)&v11->m_fTime + (_DWORD)v9)));
          ++v7;
        }
        while ( v7 < LODWORD(v6) );
      }
      v3 = (int)pkOrigKeya;
    }
    ++pkNewKeya;
    v11 = (NiAnimationKey *)((char *)v11 + 1);
    ++v4;
    --v10;
  }
  while ( v10 );
}
// B61AD8: using guessed type struct NiAnimationKey *(__cdecl static **NiAnimationKey::ms_arrays)(unsigned int);
// B61B68: using guessed type void (__cdecl static **NiAnimationKey::ms_copies)(struct NiAnimationKey *, const struct NiAnimationKey *);

//----- (007D3AB0) --------------------------------------------------------
NiAnimationKey *__cdecl NiEulerRotKey::CreateArray(unsigned int uiNumKeys)
{
  unsigned int v1; // ecx@1
  void *v2; // eax@1
  NiAnimationKey *result; // eax@2
  signed int v4; // edi@2
  NiAnimationKey *v5; // esi@3
  NiAnimationKey *uiNumKeysa; // [sp+24h] [bp+8h]@2

  v1 = 72 * uiNumKeys | -(72 * (unsigned __int64)uiNumKeys >> 32 != 0);
  v2 = operator new((v1 + 4) | -__CFADD__(v1, 4));
  if ( v2 )
  {
    *(_DWORD *)v2 = uiNumKeys;
    result = (NiAnimationKey *)((char *)v2 + 4);
    v4 = uiNumKeys - 1;
    uiNumKeysa = result;
    if ( v4 >= 0 )
    {
      v5 = result + 5;
      do
      {
        NiQuaternion::NiQuaternion((NiQuaternion *)&v5[-4], 0.0, 0.0, 0.0, 0.0);
        LODWORD(v5->m_fTime) = 0;
        LODWORD(v5[1].m_fTime) = 0;
        LODWORD(v5[2].m_fTime) = 0;
        LODWORD(v5[7].m_fTime) = 0;
        LODWORD(v5[8].m_fTime) = 0;
        LODWORD(v5[9].m_fTime) = 0;
        LODWORD(v5[3].m_fTime) = 0;
        LODWORD(v5[4].m_fTime) = 0;
        LODWORD(v5[5].m_fTime) = 0;
        LODWORD(v5[10].m_fTime) = 0;
        LODWORD(v5[11].m_fTime) = 0;
        LODWORD(v5[12].m_fTime) = 0;
        LOWORD(v5[6].m_fTime) = 0;
        BYTE2(v5[6].m_fTime) = 0;
        v5 += 18;
        --v4;
      }
      while ( v4 >= 0 );
      result = uiNumKeysa;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007D3B50) --------------------------------------------------------
void __cdecl NiEulerRotKey::FillDerivedVals(NiAnimationKey *pkKeys)
{
  unsigned int v1; // edi@1
  NiAnimationKey *v2; // esi@1

  v1 = 0;
  v2 = pkKeys + 12;
  do
  {
    if ( LODWORD(v2->m_fTime) )
      ((void (__cdecl *)(_DWORD, _DWORD, _DWORD))(&NiAnimationKey::ms_fillderived)[LODWORD(v2[-4].m_fTime)])(
        LODWORD(v2->m_fTime),
        LODWORD(v2[-7].m_fTime),
        *((_BYTE *)&pkKeys[11].m_fTime + v1));
    ++v1;
    ++v2;
  }
  while ( v1 < 3 );
}
// B61928: using guessed type void (__cdecl static **NiAnimationKey::ms_fillderived)(struct NiAnimationKey *, unsigned int, unsigned __int8);

//----- (007D3B90) --------------------------------------------------------
bool __cdecl NiEulerRotKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys)
{
  NiAnimationKey **v3; // edi@1
  void *v4; // eax@2
  int v5; // esi@3
  unsigned int *v6; // ecx@5
  NiAnimationKey *v7; // edi@6
  unsigned int v8; // ecx@6
  int v9; // esi@7
  NiAnimationKey **v10; // eax@7
  NiAnimationKey **v11; // eax@10
  unsigned int i; // [sp+1Ch] [bp-8h]@6
  NiFloatKey *pkFloatKeys; // [sp+20h] [bp-4h]@7

  v3 = pkKeys;
  if ( !*uiNumKeys )
  {
    v4 = operator new(0x4Cu);
    if ( v4 )
    {
      v5 = (int)v4 + 4;
      *(_DWORD *)v4 = 1;
      NiQuaternion::NiQuaternion((NiQuaternion *)((char *)v4 + 8), 0.0, 0.0, 0.0, 0.0);
      *(_DWORD *)(v5 + 20) = 0;
      *(_DWORD *)(v5 + 24) = 0;
      *(_DWORD *)(v5 + 28) = 0;
      *(_DWORD *)(v5 + 48) = 0;
      *(_DWORD *)(v5 + 52) = 0;
      *(_DWORD *)(v5 + 56) = 0;
      *(_DWORD *)(v5 + 32) = 0;
      *(_DWORD *)(v5 + 36) = 0;
      *(_DWORD *)(v5 + 40) = 0;
      *(_DWORD *)(v5 + 60) = 0;
      *(_DWORD *)(v5 + 64) = 0;
      *(_DWORD *)(v5 + 68) = 0;
      *(_WORD *)(v5 + 44) = 0;
      *(_BYTE *)(v5 + 46) = 0;
    }
    else
    {
      v5 = 0;
    }
    v6 = uiNumKeys;
    *v3 = (NiAnimationKey *)v5;
    *v6 = 1;
  }
  v7 = *v3;
  v8 = 0;
  BYTE3(uiNumKeys) = 0;
  i = 0;
  do
  {
    v9 = (unsigned __int8)v8;
    v10 = (NiAnimationKey **)LODWORD(v7[(unsigned __int8)v8 + 5].m_fTime);
    pkFloatKeys = (NiFloatKey *)LODWORD(v7[(unsigned __int8)v8 + 12].m_fTime);
    pkKeys = v10;
    if ( v10 )
    {
      if ( (unsigned __int8)((int (__cdecl *)(_DWORD, NiFloatKey **, NiAnimationKey ***))(&NiAnimationKey::ms_inserts)[LODWORD(v7[(unsigned __int8)v8 + 8].m_fTime)])(
                              LODWORD(fTime),
                              &pkFloatKeys,
                              &pkKeys) )
        BYTE3(uiNumKeys) = 1;
      v11 = pkKeys;
      LODWORD(v7[v9 + 12].m_fTime) = pkFloatKeys;
      v8 = i;
      LODWORD(v7[v9 + 5].m_fTime) = v11;
      LODWORD(v7[v9 + 15].m_fTime) = 0;
    }
    i = ++v8;
  }
  while ( v8 < 3 );
  return BYTE3(uiNumKeys) != 0;
}
// B619B8: using guessed type bool (__cdecl static **NiAnimationKey::ms_inserts)(float, struct NiAnimationKey **, unsigned int *);

//----- (007D3C90) --------------------------------------------------------
void __thiscall NiEulerRotKey::LoadBinary(NiEulerRotKey *this, NiStream *stream)
{
  NiStream *v2; // edi@1
  NiEulerRotKey *v3; // esi@1
  NiBinaryStream *v4; // eax@2
  NiBinaryStream *v5; // ST08_4@2
  unsigned int (__cdecl *v6)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@2
  unsigned int v7; // ebx@3
  int v8; // esi@3
  unsigned int (__cdecl *v9)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@4
  NiBinaryStream *v10; // ST08_4@4
  NiBinaryStream *v11; // eax@5
  NiBinaryStream *v12; // ST08_4@5
  unsigned int (__cdecl *v13)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@5
  int v14; // eax@5
  NiEulerRotKey *v15; // [sp+Ch] [bp-8h]@1
  int v16; // [sp+10h] [bp-4h]@2

  v2 = stream;
  v3 = this;
  v15 = this;
  if ( stream->m_uiNifFileVersion < 0xA010068 )
  {
    v4 = stream->m_pkIstr;
    v5 = v4;
    v6 = v4->m_pfnRead;
    stream = (NiStream *)4;
    v6(v5, &v16, 4u, (unsigned int *)&stream, 1u);
  }
  v7 = 0;
  v8 = (int)v3->m_uiNumKeys;
  do
  {
    v9 = v2->m_pkIstr->m_pfnRead;
    v10 = v2->m_pkIstr;
    stream = (NiStream *)4;
    v9(v10, (void *)v8, 4u, (unsigned int *)&stream, 1u);
    if ( *(_DWORD *)v8 )
    {
      v11 = v2->m_pkIstr;
      v12 = v11;
      v13 = v11->m_pfnRead;
      stream = (NiStream *)4;
      v13(v12, &v16, 4u, (unsigned int *)&stream, 1u);
      v14 = v16;
      *(_DWORD *)(v8 + 12) = v16;
      v15->m_ucSizes[v7] = (char)(&NiAnimationKey::ms_keysizes)[v14];
      *(_DWORD *)(v8 + 28) = ((int (__cdecl *)(NiStream *, _DWORD))(&NiAnimationKey::ms_loaders)[v14])(
                               v2,
                               *(_DWORD *)v8);
    }
    ++v7;
    v8 += 4;
  }
  while ( v7 < 3 );
}
// B61900: using guessed type unsigned __int8 *NiAnimationKey::ms_keysizes;
// B61F58: using guessed type struct NiAnimationKey *(__cdecl static **NiAnimationKey::ms_loaders)(struct NiStream *, unsigned int);

//----- (007D3D50) --------------------------------------------------------
NiEulerRotKey *__cdecl NiEulerRotKey::CreateFromStream(NiStream *stream, unsigned int uiNumKeys)
{
  unsigned int v2; // esi@1
  unsigned int v3; // ecx@1
  void *v4; // eax@1
  NiEulerRotKey *result; // eax@2
  signed int v6; // edi@2
  NiAnimationKey *v7; // esi@3
  unsigned int v8; // ebx@9
  NiEulerRotKey *v9; // esi@9
  NiEulerRotKey *pkEulerRotKeys; // [sp+1Ch] [bp-4h]@2
  NiEulerRotKey *pkEulerRotKeysa; // [sp+1Ch] [bp-4h]@6

  v2 = uiNumKeys;
  v3 = 72 * uiNumKeys | -(72 * (unsigned __int64)uiNumKeys >> 32 != 0);
  v4 = operator new((v3 + 4) | -__CFADD__(v3, 4));
  if ( v4 )
  {
    *(_DWORD *)v4 = uiNumKeys;
    result = (NiEulerRotKey *)((char *)v4 + 4);
    v6 = uiNumKeys - 1;
    pkEulerRotKeys = result;
    if ( ((uiNumKeys - 1) & 0x80000000) == 0 )
    {
      v7 = (NiAnimationKey *)result->m_uiNumKeys;
      do
      {
        NiQuaternion::NiQuaternion((NiQuaternion *)&v7[-4], 0.0, 0.0, 0.0, 0.0);
        LODWORD(v7->m_fTime) = 0;
        LODWORD(v7[1].m_fTime) = 0;
        LODWORD(v7[2].m_fTime) = 0;
        LODWORD(v7[7].m_fTime) = 0;
        LODWORD(v7[8].m_fTime) = 0;
        LODWORD(v7[9].m_fTime) = 0;
        LODWORD(v7[3].m_fTime) = 0;
        LODWORD(v7[4].m_fTime) = 0;
        LODWORD(v7[5].m_fTime) = 0;
        LODWORD(v7[10].m_fTime) = 0;
        LODWORD(v7[11].m_fTime) = 0;
        LODWORD(v7[12].m_fTime) = 0;
        LOWORD(v7[6].m_fTime) = 0;
        BYTE2(v7[6].m_fTime) = 0;
        v7 += 18;
        --v6;
      }
      while ( v6 >= 0 );
      v2 = uiNumKeys;
      result = pkEulerRotKeys;
    }
    pkEulerRotKeysa = result;
  }
  else
  {
    pkEulerRotKeysa = 0;
    result = 0;
  }
  if ( v2 > 0 )
  {
    v8 = uiNumKeys;
    v9 = result;
    do
    {
      NiEulerRotKey::LoadBinary(v9, stream);
      ++v9;
      --v8;
    }
    while ( v8 );
    result = pkEulerRotKeysa;
  }
  return result;
}

//----- (007D3E20) --------------------------------------------------------
void __cdecl NiEulerRotKey::SaveToStream(NiStream *stream, NiAnimationKey *pkKeys, unsigned int uiNumKeys)
{
  NiAnimationKey *v3; // esi@2
  unsigned int (__cdecl *v4)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@4
  NiBinaryStream *v5; // ST0C_4@4
  NiBinaryStream *v6; // eax@5
  unsigned int (__cdecl *v7)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@5
  bool v8; // zf@7
  int v9; // [sp+0h] [bp-8h]@4
  unsigned int v10; // [sp+4h] [bp-4h]@2
  NiAnimationKey *pkKeysa; // [sp+14h] [bp+Ch]@2
  unsigned int uiNumKeysa; // [sp+18h] [bp+10h]@3

  if ( uiNumKeys )
  {
    v3 = pkKeys + 5;
    pkKeysa = pkKeys + 5;
    v10 = uiNumKeys;
    do
    {
      uiNumKeysa = 3;
      do
      {
        v4 = stream->m_pkOstr->m_pfnWrite;
        v5 = stream->m_pkOstr;
        v9 = 4;
        v4(v5, v3, 4u, (unsigned int *)&v9, 1u);
        if ( LODWORD(v3->m_fTime) )
        {
          v6 = stream->m_pkOstr;
          v7 = v6->m_pfnWrite;
          v9 = 4;
          v7(v6, &v3[3], 4u, (unsigned int *)&v9, 1u);
          ((void (__cdecl *)(NiStream *, _DWORD, _DWORD))(&NiAnimationKey::ms_saves)[LODWORD(v3[3].m_fTime)])(
            stream,
            LODWORD(v3[7].m_fTime),
            LODWORD(v3->m_fTime));
        }
        ++v3;
        --uiNumKeysa;
      }
      while ( uiNumKeysa );
      v3 = pkKeysa + 18;
      v8 = v10-- == 1;
      pkKeysa += 18;
    }
    while ( !v8 );
  }
}
// B61BF8: using guessed type void (__cdecl static **NiAnimationKey::ms_saves)(struct NiStream *, struct NiAnimationKey *, unsigned int);

//----- (007D3EE0) --------------------------------------------------------
int __cdecl NiEulerRotKey::RegisterLoader()
{
  int result; // eax@1

  result = 0;
  if ( !bRegistered_7 )
  {
    dword_B61F08 = 0;
    dword_B61DE8 = 0;
    dword_B61D58 = 0;
    bRegistered_7 = 1;
    dword_B61F98 = (int)NiEulerRotKey::CreateFromStream;
    dword_B61C38 = (int)NiEulerRotKey::SaveToStream;
    dword_B61BA8 = (int)NiEulerRotKey::Copy;
    dword_B61B18 = (int)NiEulerRotKey::CreateArray;
    dword_B61A88 = (int)NiLinRotKey::DeleteArray;
    byte_B61910 = 72;
    dword_B61E78 = (int)NiEulerRotKey::Interpolate;
    dword_B61CC8 = (int)NiEulerRotKey::Equal;
    dword_B61968 = (int)NiEulerRotKey::FillDerivedVals;
    dword_B619F8 = (int)NiEulerRotKey::Insert;
    result = 1;
  }
  return result;
}
// B61910: using guessed type char byte_B61910;
// B61968: using guessed type int dword_B61968;
// B619F8: using guessed type int dword_B619F8;
// B61A88: using guessed type int dword_B61A88;
// B61B18: using guessed type int dword_B61B18;
// B61BA8: using guessed type int dword_B61BA8;
// B61C38: using guessed type int dword_B61C38;
// B61CC8: using guessed type int dword_B61CC8;
// B61D58: using guessed type int dword_B61D58;
// B61DE8: using guessed type int dword_B61DE8;
// B61E78: using guessed type int dword_B61E78;
// B61F08: using guessed type int dword_B61F08;
// B61F98: using guessed type int dword_B61F98;

//----- (007D3F70) --------------------------------------------------------
NiColorA *__cdecl operator*(NiColorA *result, float fScalar, NiColorA *c)
{
  NiColorA *v3; // eax@1
  float v4; // ecx@1

  v3 = result;
  result->r = c->r;
  result->g = c->g;
  v4 = c->a;
  result->b = c->b;
  result->a = v4;
  v3->r = v3->r * fScalar;
  v3->g = fScalar * v3->g;
  result->b = result->b * fScalar;
  result->a = fScalar * result->a;
  return v3;
}

//----- (007D3FC0) --------------------------------------------------------
NiAnimationKey *__cdecl NiLinColorKey::CreateArray(unsigned int uiNumKeys)
{
  unsigned int v1; // ecx@1
  void *v2; // eax@1
  signed int v3; // edx@2
  NiAnimationKey *result; // eax@2
  NiAnimationKey *v5; // ecx@3

  v1 = 20 * uiNumKeys | -(20 * (unsigned __int64)uiNumKeys >> 32 != 0);
  v2 = operator new((v1 + 4) | -__CFADD__(v1, 4));
  if ( v2 )
  {
    *(_DWORD *)v2 = uiNumKeys;
    v3 = uiNumKeys - 1;
    result = (NiAnimationKey *)((char *)v2 + 4);
    if ( ((uiNumKeys - 1) & 0x80000000) == 0 )
    {
      v5 = result + 3;
      do
      {
        v5[-2].m_fTime = 0.0;
        v5 += 5;
        --v3;
        v5[-6].m_fTime = 0.0;
        v5[-5].m_fTime = 0.0;
        v5[-4].m_fTime = 0.0;
      }
      while ( v3 >= 0 );
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007D4020) --------------------------------------------------------
void __cdecl NiLinColorKey::Interpolate(float fTime, NiAnimationKey *pkKey0, NiAnimationKey *pkKey1, void *pvResult)
{
  double v4; // st7@1
  float v5; // ST10_4@1
  float v6; // ST14_4@1
  float v7; // ST18_4@1
  float v8; // ST1C_4@1
  float v9; // ST20_4@1
  float v10; // ST24_4@1
  float v11; // ST28_4@1
  float v12; // ST2C_4@1
  float v13; // ST00_4@1
  float v14; // ST04_4@1
  float v15; // ST08_4@1
  float v16; // ST0C_4@1
  float fTimea; // [sp+38h] [bp+8h]@1

  v4 = fTime;
  fTimea = 1.0 - fTime;
  v5 = pkKey0[1].m_fTime * fTimea;
  v6 = pkKey0[2].m_fTime * fTimea;
  v7 = pkKey0[3].m_fTime * fTimea;
  v8 = fTimea * pkKey0[4].m_fTime;
  v9 = pkKey1[1].m_fTime * v4;
  v10 = pkKey1[2].m_fTime * v4;
  v11 = pkKey1[3].m_fTime * v4;
  v12 = v4 * pkKey1[4].m_fTime;
  v13 = v9 + v5;
  *(float *)pvResult = v13;
  v14 = v10 + v6;
  *((float *)pvResult + 1) = v14;
  v15 = v11 + v7;
  *((float *)pvResult + 2) = v15;
  v16 = v12 + v8;
  *((float *)pvResult + 3) = v16;
}

//----- (007D4110) --------------------------------------------------------
NiRotKey *__cdecl NiStepColorKey::CreateFromStream(NiStream *kStream, unsigned int uiNumKeys)
{
  unsigned int v2; // edi@1
  unsigned int v3; // ecx@1
  unsigned int *v4; // eax@1
  signed int v5; // ecx@2
  NiAnimationKey *v6; // edx@2
  int v7; // eax@3
  NiRotKey *result; // eax@5
  NiRotKey *v9; // esi@8
  NiStepColorKey *pkStepColorKeys; // [sp+10h] [bp+Ch]@5

  v2 = uiNumKeys;
  v3 = 20 * uiNumKeys | -(20 * (unsigned __int64)uiNumKeys >> 32 != 0);
  v4 = (unsigned int *)operator new((v3 + 4) | -__CFADD__(v3, 4));
  if ( v4 )
  {
    v5 = uiNumKeys - 1;
    *v4 = uiNumKeys;
    v6 = (NiAnimationKey *)(v4 + 1);
    if ( ((uiNumKeys - 1) & 0x80000000) == 0 )
    {
      v7 = (int)(v4 + 4);
      do
      {
        *(float *)(v7 - 8) = 0.0;
        v7 += 20;
        --v5;
        *(float *)(v7 - 24) = 0.0;
        *(float *)(v7 - 20) = 0.0;
        *(float *)(v7 - 16) = 0.0;
      }
      while ( v5 >= 0 );
    }
    result = (NiRotKey *)v6;
    pkStepColorKeys = (NiStepColorKey *)v6;
  }
  else
  {
    pkStepColorKeys = 0;
    result = 0;
  }
  if ( v2 )
  {
    v9 = result;
    do
    {
      NiColorKey::LoadBinary(v9, kStream);
      ++v9;
      --v2;
    }
    while ( v2 );
    result = (NiRotKey *)pkStepColorKeys;
  }
  return result;
}

//----- (007D41A0) --------------------------------------------------------
void __cdecl NiLinColorKey::SaveToStream(NiStream *stream, NiAnimationKey *pkKeys, unsigned int uiNumKeys)
{
  unsigned int v3; // edi@1
  NiAnimationKey *v4; // esi@2

  v3 = uiNumKeys;
  if ( uiNumKeys )
  {
    v4 = pkKeys;
    do
    {
      NiColorKey::SaveBinary(stream, v4);
      v4 += 5;
      --v3;
    }
    while ( v3 );
  }
}

//----- (007D41D0) --------------------------------------------------------
char __cdecl NiLinColorKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys)
{
  NiAnimationKey *v3; // ebx@1
  unsigned int v4; // edi@2
  int v5; // ecx@2
  unsigned int *v6; // eax@2
  int v7; // edi@3
  int v8; // ecx@3
  int v9; // eax@4
  void *v10; // edi@6
  unsigned int v11; // eax@10
  char result; // al@12
  NiColorA kColor; // [sp+20h] [bp-14h]@10
  unsigned int uiInsertAt; // [sp+30h] [bp-4h]@1

  v3 = *pkKeys;
  if ( NiAnimationKey::OkayToInsert(fTime, *pkKeys, *uiNumKeys, &uiInsertAt, 20) )
  {
    v4 = *uiNumKeys + 1;
    v5 = 20 * v4 | -(20 * (unsigned __int64)v4 >> 32 != 0);
    v6 = (unsigned int *)operator new((v5 + 4) | -__CFADD__(v5, 4));
    if ( v6 )
    {
      *v6 = v4;
      v7 = v4 - 1;
      v8 = (int)(v6 + 1);
      if ( v7 >= 0 )
      {
        v9 = (int)(v6 + 4);
        do
        {
          *(float *)(v9 - 8) = 0.0;
          v9 += 20;
          --v7;
          *(float *)(v9 - 24) = 0.0;
          *(float *)(v9 - 20) = 0.0;
          *(float *)(v9 - 16) = 0.0;
        }
        while ( v7 >= 0 );
      }
      v10 = (void *)v8;
    }
    else
    {
      v10 = 0;
    }
    memcpy_s(v10, 4 * (5 * *uiNumKeys + 5), v3, 20 * uiInsertAt);
    if ( *uiNumKeys > uiInsertAt )
      memcpy_s(
        (char *)v10 + 20 * uiInsertAt + 20,
        20 * (*uiNumKeys - uiInsertAt),
        &v3[5 * uiInsertAt],
        20 * (*uiNumKeys - uiInsertAt));
    NiColorKey::GenInterpDefault(&kColor, fTime, (NiColorKey *)v3, LINKEY, *uiNumKeys, 20);
    v11 = (unsigned int)v10 + 20 * uiInsertAt;
    *(float *)v11 = fTime;
    *(NiColorA *)(v11 + 4) = kColor;
    ++*uiNumKeys;
    if ( v3 )
      operator delete(&v3[-1]);
    *pkKeys = (NiAnimationKey *)v10;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007D4310) --------------------------------------------------------
int __cdecl NiLinColorKey::RegisterLoader()
{
  int result; // eax@1

  result = 0;
  if ( !bRegistered_8 )
  {
    dword_B61F14 = 0;
    dword_B61DF4 = 0;
    dword_B61D64 = 0;
    dword_B61974 = 0;
    bRegistered_8 = 1;
    dword_B61FA4 = (int)NiStepColorKey::CreateFromStream;
    dword_B61C44 = (int)NiLinColorKey::SaveToStream;
    dword_B61BB4 = (int)NiStepColorKey::Copy;
    dword_B61B24 = (int)NiLinColorKey::CreateArray;
    dword_B61A94 = (int)NiLinRotKey::DeleteArray;
    byte_B61913 = 20;
    dword_B61E84 = (int)NiLinColorKey::Interpolate;
    dword_B61CD4 = (int)NiStepRotKey::Equal;
    dword_B61A04 = (int)NiLinColorKey::Insert;
    result = 1;
  }
  return result;
}
// B61913: using guessed type char byte_B61913;
// B61974: using guessed type int dword_B61974;
// B61A04: using guessed type int dword_B61A04;
// B61A94: using guessed type int dword_B61A94;
// B61B24: using guessed type int dword_B61B24;
// B61BB4: using guessed type int dword_B61BB4;
// B61C44: using guessed type int dword_B61C44;
// B61CD4: using guessed type int dword_B61CD4;
// B61D64: using guessed type int dword_B61D64;
// B61DF4: using guessed type int dword_B61DF4;
// B61E84: using guessed type int dword_B61E84;
// B61F14: using guessed type int dword_B61F14;
// B61FA4: using guessed type int dword_B61FA4;

//----- (007D43A0) --------------------------------------------------------
void __cdecl NiLinFloatKey::Interpolate(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult)
{
  *(float *)pResult = NiInterpScalar::Linear(fTime, pKey0[1].m_fTime, pKey1[1].m_fTime);
}

//----- (007D43E0) --------------------------------------------------------
NiStepFloatKey *__cdecl NiLinFloatKey::CreateFromStream(NiStream *stream, unsigned int uiNumKeys)
{
  unsigned int v2; // edi@1
  unsigned int v3; // ecx@1
  void *v4; // eax@1
  NiStepFloatKey *result; // eax@2
  NiFloatKey *v6; // esi@5
  NiStepFloatKey *pkStepFloatKeys; // [sp+10h] [bp+Ch]@2

  v2 = uiNumKeys;
  v3 = 8 * uiNumKeys | -((unsigned __int64)uiNumKeys >> 29 != 0);
  v4 = operator new((v3 + 4) | -__CFADD__(v3, 4));
  if ( v4 )
  {
    *(_DWORD *)v4 = uiNumKeys;
    result = (NiStepFloatKey *)((char *)v4 + 4);
    pkStepFloatKeys = result;
  }
  else
  {
    pkStepFloatKeys = 0;
    result = 0;
  }
  if ( v2 )
  {
    v6 = (NiFloatKey *)result;
    do
    {
      NiFloatKey::LoadBinary(v6, stream);
      ++v6;
      --v2;
    }
    while ( v2 );
    result = pkStepFloatKeys;
  }
  return result;
}

//----- (007D4450) --------------------------------------------------------
void __cdecl NiStepFloatKey::SaveToStream(NiStream *stream, NiAnimationKey *pkKeys, unsigned int uiNumKeys)
{
  unsigned int v3; // edi@1
  NiAnimationKey *v4; // esi@2

  v3 = uiNumKeys;
  if ( uiNumKeys )
  {
    v4 = pkKeys;
    do
    {
      NiFloatKey::SaveBinary(stream, v4);
      v4 += 2;
      --v3;
    }
    while ( v3 );
  }
}

//----- (007D4480) --------------------------------------------------------
char __cdecl NiLinFloatKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys)
{
  NiAnimationKey *v3; // edi@1
  unsigned int v4; // ebx@2
  int v5; // ecx@2
  unsigned int *v6; // eax@2
  void *v7; // ebx@3
  float f; // ST20_4@7
  unsigned int v9; // eax@7
  char result; // al@9
  unsigned int uiInsertAt; // [sp+24h] [bp-4h]@1

  v3 = *pkKeys;
  if ( NiAnimationKey::OkayToInsert(fTime, *pkKeys, *uiNumKeys, &uiInsertAt, 8) )
  {
    v4 = *uiNumKeys + 1;
    v5 = 8 * v4 | -((unsigned __int64)v4 >> 29 != 0);
    v6 = (unsigned int *)operator new((v5 + 4) | -__CFADD__(v5, 4));
    if ( v6 )
    {
      *v6 = v4;
      v7 = v6 + 1;
    }
    else
    {
      v7 = 0;
    }
    memcpy_s(v7, 8 * *uiNumKeys + 8, v3, 8 * uiInsertAt);
    if ( *uiNumKeys > uiInsertAt )
      memcpy_s(
        (char *)v7 + 8 * uiInsertAt + 8,
        8 * (*uiNumKeys - uiInsertAt),
        &v3[2 * uiInsertAt],
        8 * (*uiNumKeys - uiInsertAt));
    f = NiFloatKey::GenInterpDefault(fTime, (NiFloatKey *)v3, LINKEY, *uiNumKeys, 8);
    v9 = (unsigned int)v7 + 8 * uiInsertAt;
    *(float *)v9 = fTime;
    *(float *)(v9 + 4) = f;
    ++*uiNumKeys;
    if ( v3 )
      operator delete(&v3[-1]);
    *pkKeys = (NiAnimationKey *)v7;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007D4580) --------------------------------------------------------
int __cdecl NiLinFloatKey::RegisterLoader()
{
  int result; // eax@1

  result = 0;
  if ( !bRegistered_9 )
  {
    dword_B61ECC = 0;
    dword_B61DAC = 0;
    dword_B61D1C = 0;
    bRegistered_9 = 1;
    dword_B61F5C = (int)NiLinFloatKey::CreateFromStream;
    dword_B61BFC = (int)NiStepFloatKey::SaveToStream;
    dword_B61B6C = (int)NiLinFloatKey::Copy;
    dword_B61ADC = (int)NiStepFloatKey::CreateArray;
    dword_B61A4C = (int)NiLinRotKey::DeleteArray;
    byte_B61901 = 8;
    dword_B61E3C = (int)NiLinFloatKey::Interpolate;
    dword_B61C8C = (int)NiLinFloatKey::Equal;
    dword_B6192C = (int)ITableBase<TextDataType3,TextData3>::BeforeTerminate;
    dword_B619BC = (int)NiLinFloatKey::Insert;
    result = 1;
  }
  return result;
}
// B61901: using guessed type char byte_B61901;
// B6192C: using guessed type int dword_B6192C;
// B619BC: using guessed type int dword_B619BC;
// B61A4C: using guessed type int dword_B61A4C;
// B61ADC: using guessed type int dword_B61ADC;
// B61B6C: using guessed type int dword_B61B6C;
// B61BFC: using guessed type int dword_B61BFC;
// B61C8C: using guessed type int dword_B61C8C;
// B61D1C: using guessed type int dword_B61D1C;
// B61DAC: using guessed type int dword_B61DAC;
// B61E3C: using guessed type int dword_B61E3C;
// B61ECC: using guessed type int dword_B61ECC;
// B61F5C: using guessed type int dword_B61F5C;

//----- (007D4610) --------------------------------------------------------
void __cdecl NiLinPosKey::Copy(NiAnimationKey *pkNewKey, NiAnimationKey *pkOrigKey)
{
  COERCE_NIANIMATIONKEY(pkNewKey->m_fTime) = COERCE_NIANIMATIONKEY(pkOrigKey->m_fTime);
  COERCE_NIANIMATIONKEY(pkNewKey[1].m_fTime) = pkOrigKey[1];
  COERCE_NIANIMATIONKEY(pkNewKey[2].m_fTime) = pkOrigKey[2];
  COERCE_NIANIMATIONKEY(pkNewKey[3].m_fTime) = pkOrigKey[3];
}

//----- (007D4640) --------------------------------------------------------
void __cdecl NiLinPosKey::Interpolate(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult)
{
  NiAnimationKey *v4; // eax@1
  float v5; // ST0C_4@1
  float v6; // ST10_4@1
  float v7; // ST14_4@1
  float v8; // ST18_4@1
  float v9; // ST1C_4@1
  float v10; // ST20_4@1
  float v11; // ST00_4@1
  float v12; // ST04_4@1
  float v13; // ST08_4@1
  NiAnimationKey *pKey0a; // [sp+30h] [bp+Ch]@1

  v4 = pKey0;
  *(float *)&pKey0a = 1.0 - fTime;
  v5 = v4[1].m_fTime * *(float *)&pKey0a;
  v6 = v4[2].m_fTime * *(float *)&pKey0a;
  v7 = *(float *)&pKey0a * v4[3].m_fTime;
  v8 = pKey1[1].m_fTime * fTime;
  v9 = pKey1[2].m_fTime * fTime;
  v10 = fTime * pKey1[3].m_fTime;
  v11 = v8 + v5;
  *(float *)pResult = v11;
  v12 = v6 + v9;
  *((float *)pResult + 1) = v12;
  v13 = v10 + v7;
  *((float *)pResult + 2) = v13;
}

//----- (007D46C0) --------------------------------------------------------
void __cdecl NiLinPosKey::InterpolateD1(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult)
{
  float v4; // ST00_4@1
  float v5; // ST04_4@1
  double v6; // st7@1
  float v7; // ST08_4@1

  v4 = pKey1[1].m_fTime - pKey0[1].m_fTime;
  v5 = pKey1[2].m_fTime - pKey0[2].m_fTime;
  v6 = pKey1[3].m_fTime - pKey0[3].m_fTime;
  *(float *)pResult = v4;
  *((float *)pResult + 1) = v5;
  v7 = v6;
  *((float *)pResult + 2) = v7;
}

//----- (007D4700) --------------------------------------------------------
char __cdecl NiLinPosKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys)
{
  NiAnimationKey *v3; // edi@1
  unsigned int v4; // ebx@2
  int v5; // ecx@2
  unsigned int *v6; // eax@2
  void *v7; // ebx@3
  unsigned int v8; // eax@7
  char result; // al@9
  NiPoint3 kPt; // [sp+20h] [bp-10h]@7
  unsigned int uiInsertAt; // [sp+2Ch] [bp-4h]@1

  v3 = *pkKeys;
  if ( NiAnimationKey::OkayToInsert(fTime, *pkKeys, *uiNumKeys, &uiInsertAt, 16) )
  {
    v4 = *uiNumKeys + 1;
    v5 = 16 * v4 | -((unsigned __int64)v4 >> 28 != 0);
    v6 = (unsigned int *)operator new((v5 + 4) | -__CFADD__(v5, 4));
    if ( v6 )
    {
      *v6 = v4;
      v7 = v6 + 1;
    }
    else
    {
      v7 = 0;
    }
    memcpy_s(v7, 16 * (*uiNumKeys + 1), v3, 16 * uiInsertAt);
    if ( *uiNumKeys > uiInsertAt )
      memcpy_s(
        (char *)v7 + 16 * uiInsertAt + 16,
        16 * (*uiNumKeys - uiInsertAt),
        &v3[4 * uiInsertAt],
        16 * (*uiNumKeys - uiInsertAt));
    NiPosKey::GenInterpDefault(&kPt, fTime, (NiPosKey *)v3, LINKEY, *uiNumKeys, 16);
    v8 = (unsigned int)v7 + 16 * uiInsertAt;
    *(float *)v8 = fTime;
    *(NiPoint3 *)(v8 + 4) = kPt;
    ++*uiNumKeys;
    if ( v3 )
      operator delete(&v3[-1]);
    *pkKeys = (NiAnimationKey *)v7;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007D4810) --------------------------------------------------------
int __cdecl NiLinPosKey::RegisterLoader()
{
  int result; // eax@2

  if ( bRegistered_10 )
  {
    result = 0;
  }
  else
  {
    result = 1;
    bRegistered_10 = 1;
    dword_B61F74 = (int)NiStepPosKey::CreateFromStream;
    dword_B61C14 = (int)NiLinPosKey::SaveToStream;
    dword_B61B84 = (int)NiLinPosKey::Copy;
    dword_B61AF4 = (int)NiStepPosKey::CreateArray;
    dword_B61A64 = (int)NiLinRotKey::DeleteArray;
    byte_B61907 = 16;
    dword_B61EE4 = (int)NiBoolKey::ComputeMaxCurvature;
    dword_B61E54 = (int)NiLinPosKey::Interpolate;
    dword_B61DC4 = (int)NiLinPosKey::InterpolateD1;
    dword_B61D34 = (int)NiPosKey::Interpolate;
    dword_B61CA4 = (int)NiStepPosKey::Equal;
    dword_B61944 = (int)ITableBase<TextDataType3,TextData3>::BeforeTerminate;
    dword_B619D4 = (int)NiLinPosKey::Insert;
  }
  return result;
}
// B61907: using guessed type char byte_B61907;
// B61944: using guessed type int dword_B61944;
// B619D4: using guessed type int dword_B619D4;
// B61A64: using guessed type int dword_B61A64;
// B61AF4: using guessed type int dword_B61AF4;
// B61B84: using guessed type int dword_B61B84;
// B61C14: using guessed type int dword_B61C14;
// B61CA4: using guessed type int dword_B61CA4;
// B61D34: using guessed type int dword_B61D34;
// B61DC4: using guessed type int dword_B61DC4;
// B61E54: using guessed type int dword_B61E54;
// B61EE4: using guessed type int dword_B61EE4;
// B61F74: using guessed type int dword_B61F74;

//----- (007D48B0) --------------------------------------------------------
void __cdecl NiLinRotKey::Interpolate(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult)
{
  NiQuaternion *v4; // eax@1
  NiQuaternion result; // [sp+Ch] [bp-10h]@1

  v4 = NiQuaternion::Slerp(&result, fTime, (NiQuaternion *)&pKey0[1], (NiQuaternion *)&pKey1[1]);
  *(float *)pResult = v4->m_fW;
  *((_DWORD *)pResult + 1) = LODWORD(v4->m_fX);
  *((_DWORD *)pResult + 2) = LODWORD(v4->m_fY);
  *((_DWORD *)pResult + 3) = LODWORD(v4->m_fZ);
}

//----- (007D4900) --------------------------------------------------------
char __cdecl NiLinRotKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys)
{
  NiAnimationKey *v3; // ebx@1
  unsigned int v4; // edi@2
  int v5; // ecx@2
  unsigned int *v6; // eax@2
  int v7; // eax@3
  NiQuaternion *v8; // edi@4
  void *v9; // edi@7
  unsigned int v10; // eax@11
  char result; // al@13
  NiQuaternion kQ; // [sp+20h] [bp-1Ch]@11
  int v13; // [sp+30h] [bp-Ch]@3
  int v14; // [sp+34h] [bp-8h]@3
  unsigned int uiInsertAt; // [sp+38h] [bp-4h]@1

  v3 = *pkKeys;
  if ( NiAnimationKey::OkayToInsert(fTime, *pkKeys, *uiNumKeys, &uiInsertAt, 20) )
  {
    v4 = *uiNumKeys + 1;
    v5 = 20 * v4 | -(20 * (unsigned __int64)v4 >> 32 != 0);
    v6 = (unsigned int *)operator new((v5 + 4) | -__CFADD__(v5, 4));
    if ( v6 )
    {
      *v6 = v4;
      v7 = (int)(v6 + 1);
      v13 = v7;
      v14 = v4 - 1;
      if ( ((v4 - 1) & 0x80000000) == 0 )
      {
        v8 = (NiQuaternion *)(v7 + 4);
        do
        {
          NiQuaternion::NiQuaternion(v8, 0.0, 0.0, 0.0, 0.0);
          v8 = (NiQuaternion *)((char *)v8 + 20);
          --v14;
        }
        while ( v14 >= 0 );
        v7 = v13;
      }
      v9 = (void *)v7;
    }
    else
    {
      v9 = 0;
    }
    memcpy_s(v9, 4 * (5 * *uiNumKeys + 5), v3, 20 * uiInsertAt);
    if ( *uiNumKeys > uiInsertAt )
      memcpy_s(
        (char *)v9 + 20 * uiInsertAt + 20,
        20 * (*uiNumKeys - uiInsertAt),
        &v3[5 * uiInsertAt],
        20 * (*uiNumKeys - uiInsertAt));
    NiRotKey::GenInterpDefault(&kQ, fTime, (NiRotKey *)v3, LINKEY, *uiNumKeys, 20);
    v10 = (unsigned int)v9 + 20 * uiInsertAt;
    *(float *)v10 = fTime;
    *(NiQuaternion *)(v10 + 4) = kQ;
    ++*uiNumKeys;
    if ( v3 )
      operator delete(&v3[-1]);
    *pkKeys = (NiAnimationKey *)v9;
    NiRotKey::FillDerivedVals((NiAnimationKey *)v9, *uiNumKeys, 20);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007D4A60) --------------------------------------------------------
int __cdecl NiLinRotKey::RegisterLoader()
{
  int result; // eax@1

  result = 0;
  if ( !bRegistered_11 )
  {
    dword_B61EFC = 0;
    dword_B61DDC = 0;
    dword_B61D4C = 0;
    bRegistered_11 = 1;
    dword_B61F8C = (int)NiLinRotKey::CreateFromStream;
    dword_B61C2C = (int)NiLinRotKey::SaveToStream;
    dword_B61B9C = (int)NiStepColorKey::Copy;
    dword_B61B0C = (int)NiLinRotKey::CreateArray;
    dword_B61A7C = (int)NiLinRotKey::DeleteArray;
    byte_B6190D = 20;
    dword_B61E6C = (int)NiLinRotKey::Interpolate;
    dword_B61CBC = (int)NiStepRotKey::Equal;
    dword_B6195C = (int)NiStepRotKey::FillDerivedVals;
    dword_B619EC = (int)NiLinRotKey::Insert;
    result = 1;
  }
  return result;
}
// B6190D: using guessed type char byte_B6190D;
// B6195C: using guessed type int dword_B6195C;
// B619EC: using guessed type int dword_B619EC;
// B61A7C: using guessed type int dword_B61A7C;
// B61B0C: using guessed type int dword_B61B0C;
// B61B9C: using guessed type int dword_B61B9C;
// B61C2C: using guessed type int dword_B61C2C;
// B61CBC: using guessed type int dword_B61CBC;
// B61D4C: using guessed type int dword_B61D4C;
// B61DDC: using guessed type int dword_B61DDC;
// B61E6C: using guessed type int dword_B61E6C;
// B61EFC: using guessed type int dword_B61EFC;
// B61F8C: using guessed type int dword_B61F8C;

//----- (007D4AF0) --------------------------------------------------------
void __cdecl NiTCBPosKey::Copy(NiAnimationKey *pkNewKey, NiAnimationKey *pkOrigKey)
{
  COERCE_NIANIMATIONKEY(pkNewKey->m_fTime) = COERCE_NIANIMATIONKEY(pkOrigKey->m_fTime);
  COERCE_NIANIMATIONKEY(pkNewKey[1].m_fTime) = pkOrigKey[1];
  COERCE_NIANIMATIONKEY(pkNewKey[2].m_fTime) = pkOrigKey[2];
  COERCE_NIANIMATIONKEY(pkNewKey[3].m_fTime) = pkOrigKey[3];
  COERCE_NIANIMATIONKEY(pkNewKey[4].m_fTime) = pkOrigKey[4];
  COERCE_NIANIMATIONKEY(pkNewKey[5].m_fTime) = pkOrigKey[5];
  COERCE_NIANIMATIONKEY(pkNewKey[6].m_fTime) = pkOrigKey[6];
  COERCE_NIANIMATIONKEY(pkNewKey[7].m_fTime) = pkOrigKey[7];
  COERCE_NIANIMATIONKEY(pkNewKey[8].m_fTime) = pkOrigKey[8];
  COERCE_NIANIMATIONKEY(pkNewKey[9].m_fTime) = pkOrigKey[9];
  COERCE_NIANIMATIONKEY(pkNewKey[10].m_fTime) = pkOrigKey[10];
  COERCE_NIANIMATIONKEY(pkNewKey[11].m_fTime) = pkOrigKey[11];
  COERCE_NIANIMATIONKEY(pkNewKey[12].m_fTime) = pkOrigKey[12];
  COERCE_NIANIMATIONKEY(pkNewKey[13].m_fTime) = pkOrigKey[13];
  COERCE_NIANIMATIONKEY(pkNewKey[14].m_fTime) = pkOrigKey[14];
  COERCE_NIANIMATIONKEY(pkNewKey[15].m_fTime) = pkOrigKey[15];
  COERCE_NIANIMATIONKEY(pkNewKey[16].m_fTime) = pkOrigKey[16];
  COERCE_NIANIMATIONKEY(pkNewKey[17].m_fTime) = pkOrigKey[17];
  COERCE_NIANIMATIONKEY(pkNewKey[18].m_fTime) = pkOrigKey[18];
}

//----- (007D4B70) --------------------------------------------------------
BOOL __cdecl NiTCBPosKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1)
{
  BOOL result; // eax@1

  result = NiPosKey::Equal(key0, key1);
  if ( (_BYTE)result )
    result = key1[4].m_fTime == key0[4].m_fTime
          && key1[5].m_fTime == key0[5].m_fTime
          && key1[6].m_fTime == key0[6].m_fTime
          && (unsigned __int8)NiPoint3::operator==((NiPoint3 *)&key0[7], (NiPoint3 *)&key1[7])
          && (unsigned __int8)NiPoint3::operator==((NiPoint3 *)&key0[10], (NiPoint3 *)&key1[10])
          && (unsigned __int8)NiPoint3::operator==((NiPoint3 *)&key0[13], (NiPoint3 *)&key1[13])
          && (unsigned __int8)NiPoint3::operator==((NiPoint3 *)&key0[16], (NiPoint3 *)&key1[16]);
  return result;
}

//----- (007D4C10) --------------------------------------------------------
NiAnimationKey *__cdecl NiTCBPosKey::CreateArray(unsigned int uiNumKeys)
{
  unsigned int v1; // ecx@1
  void *v2; // eax@1
  NiAnimationKey *result; // eax@2

  v1 = 76 * uiNumKeys | -(76 * (unsigned __int64)uiNumKeys >> 32 != 0);
  v2 = operator new((v1 + 4) | -__CFADD__(v1, 4));
  if ( v2 )
  {
    *(_DWORD *)v2 = uiNumKeys;
    result = (NiAnimationKey *)((char *)v2 + 4);
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007D4C50) --------------------------------------------------------
void __cdecl NiTCBPosKey::Interpolate(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult)
{
  float v4; // ST0C_4@1
  float v5; // ST10_4@1
  float v6; // ST14_4@1
  float v7; // ST00_4@1
  float v8; // ST04_4@1
  float v9; // ST08_4@1
  float v10; // ST0C_4@1
  float v11; // ST10_4@1
  float v12; // ST14_4@1
  float v13; // ST00_4@1
  float v14; // ST04_4@1
  float v15; // ST08_4@1
  float v16; // ST0C_4@1
  float v17; // ST10_4@1
  float v18; // ST14_4@1
  float v19; // ST00_4@1
  float v20; // ST04_4@1
  double v21; // st7@1
  float v22; // ST08_4@1

  v4 = pKey0[16].m_fTime * fTime;
  v5 = pKey0[17].m_fTime * fTime;
  v6 = pKey0[18].m_fTime * fTime;
  v7 = pKey0[13].m_fTime + v4;
  v8 = pKey0[14].m_fTime + v5;
  v9 = pKey0[15].m_fTime + v6;
  v10 = v7 * fTime;
  v11 = v8 * fTime;
  v12 = v9 * fTime;
  v13 = pKey0[10].m_fTime + v10;
  v14 = pKey0[11].m_fTime + v11;
  v15 = pKey0[12].m_fTime + v12;
  v16 = v13 * fTime;
  v17 = v14 * fTime;
  v18 = fTime * v15;
  v19 = pKey0[1].m_fTime + v16;
  v20 = pKey0[2].m_fTime + v17;
  v21 = pKey0[3].m_fTime + v18;
  *(float *)pResult = v19;
  *((float *)pResult + 1) = v20;
  v22 = v21;
  *((float *)pResult + 2) = v22;
}

//----- (007D4D10) --------------------------------------------------------
void __cdecl NiTCBPosKey::InterpolateD1(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult)
{
  double v4; // st7@1
  float v5; // ST0C_4@1
  float v6; // ST10_4@1
  float v7; // ST14_4@1
  float v8; // ST18_4@1
  float v9; // ST1C_4@1
  float v10; // ST20_4@1
  float v11; // ST00_4@1
  float v12; // ST04_4@1
  float v13; // ST08_4@1
  float v14; // ST0C_4@1
  float v15; // ST10_4@1
  float v16; // ST14_4@1
  float v17; // ST00_4@1
  float v18; // ST04_4@1
  double v19; // st7@1
  float v20; // ST08_4@1
  float fTimea; // [sp+2Ch] [bp+8h]@1

  v4 = fTime;
  fTimea = 3.0 * fTime;
  v5 = pKey0[16].m_fTime * fTimea;
  v6 = pKey0[17].m_fTime * fTimea;
  v7 = fTimea * pKey0[18].m_fTime;
  v8 = pKey0[13].m_fTime * 2.0;
  v9 = pKey0[14].m_fTime * 2.0;
  v10 = 2.0 * pKey0[15].m_fTime;
  v11 = v8 + v5;
  v12 = v9 + v6;
  v13 = v10 + v7;
  v14 = v11 * v4;
  v15 = v12 * v4;
  v16 = v4 * v13;
  v17 = pKey0[10].m_fTime + v14;
  v18 = pKey0[11].m_fTime + v15;
  v19 = pKey0[12].m_fTime + v16;
  *(float *)pResult = v17;
  *((float *)pResult + 1) = v18;
  v20 = v19;
  *((float *)pResult + 2) = v20;
}

//----- (007D4DD0) --------------------------------------------------------
void __cdecl NiTCBPosKey::InterpolateD2(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult)
{
  float v4; // ST0C_4@1
  float v5; // ST10_4@1
  float v6; // ST14_4@1
  float v7; // ST18_4@1
  float v8; // ST1C_4@1
  float v9; // ST20_4@1
  float v10; // ST00_4@1
  float v11; // ST04_4@1
  float v12; // ST08_4@1
  float fTimea; // [sp+2Ch] [bp+8h]@1

  fTimea = fTime * 6.0;
  v4 = pKey0[16].m_fTime * fTimea;
  v5 = pKey0[17].m_fTime * fTimea;
  v6 = fTimea * pKey0[18].m_fTime;
  v7 = pKey0[13].m_fTime * 2.0;
  v8 = pKey0[14].m_fTime * 2.0;
  v9 = 2.0 * pKey0[15].m_fTime;
  v10 = v7 + v4;
  *(float *)pResult = v10;
  v11 = v5 + v8;
  *((float *)pResult + 1) = v11;
  v12 = v9 + v6;
  *((float *)pResult + 2) = v12;
}

//----- (007D4E60) --------------------------------------------------------
void __thiscall NiTCBPosKey::CalculateDVals(NiTCBPosKey *this, NiPoint3 *ptSub1, NiPoint3 *ptPlus1, float fPreLen, float fNextLen)
{
  float diff1; // ST24_4@1
  float diff1_4; // ST28_4@1
  float diff1_8; // ST2C_4@1
  float diff2; // ST18_4@1
  float diff2_4; // ST1C_4@1
  float diff2_8; // ST20_4@1
  float omb; // ST30_4@1
  float homtopc; // ST34_4@1
  double v13; // st6@1
  float v14; // ST34_4@1
  double v15; // st6@1
  float v16; // ST30_4@1
  double v17; // st5@1
  float v18; // ST0C_4@1
  double v19; // st3@1
  float v20; // ST10_4@1
  double v21; // st4@1
  float v22; // ST14_4@1
  float v23; // ST30_4@1
  float v24; // ST18_4@1
  float v25; // ST1C_4@1
  float v26; // ST20_4@1
  float v27; // ST00_4@1
  float v28; // ST04_4@1
  float v29; // ST08_4@1
  float v30; // ST0C_4@1
  float v31; // ST10_4@1
  float v32; // ST14_4@1
  float v33; // ST00_4@1
  float v34; // ST04_4@1
  float v35; // ST08_4@1
  float v36; // ST18_4@1
  float v37; // ST1C_4@1
  float v38; // ST20_4@1
  double v39; // st7@1
  float fInv; // [sp+40h] [bp+8h]@1
  float fInva; // [sp+40h] [bp+8h]@1
  float fInvb; // [sp+40h] [bp+8h]@1
  float fInvc; // [sp+40h] [bp+8h]@1
  float fInvd; // [sp+40h] [bp+8h]@1
  float fInve; // [sp+40h] [bp+8h]@1
  float fInvf; // [sp+40h] [bp+8h]@1
  float fInvg; // [sp+40h] [bp+8h]@1
  float opb; // [sp+44h] [bp+Ch]@1

  diff1 = this->m_Pos.x - ptSub1->x;
  diff1_4 = this->m_Pos.y - ptSub1->y;
  diff1_8 = this->m_Pos.z - ptSub1->z;
  diff2 = ptPlus1->x - this->m_Pos.x;
  diff2_4 = ptPlus1->y - this->m_Pos.y;
  diff2_8 = ptPlus1->z - this->m_Pos.z;
  opb = this->m_fBias + 1.0;
  omb = 1.0 - this->m_fBias;
  homtopc = (1.0 - this->m_fTension) * 0.5;
  fInv = this->m_fContinuity + 1.0;
  v13 = homtopc;
  v14 = fInv * homtopc;
  fInva = 1.0 - this->m_fContinuity;
  fInvb = v13 * fInva;
  v15 = omb;
  v16 = v14 * omb;
  v17 = diff2;
  v18 = diff2 * v16;
  v19 = diff2_4;
  v20 = diff2_4 * v16;
  v21 = diff2_8;
  v22 = v16 * diff2_8;
  v23 = fInvb * opb;
  v24 = v23 * diff1;
  v25 = diff1_4 * v23;
  v26 = v23 * diff1_8;
  v27 = v24 + v18;
  this->m_DS.x = v27;
  v28 = v25 + v20;
  this->m_DS.y = v28;
  v29 = v26 + v22;
  this->m_DS.z = v29;
  fInvc = v15 * fInvb;
  v30 = v17 * fInvc;
  v31 = v19 * fInvc;
  v32 = fInvc * v21;
  fInvd = v14 * opb;
  v33 = diff1 * fInvd;
  v34 = diff1_4 * fInvd;
  v35 = diff1_8 * fInvd;
  v36 = v33 + v30;
  this->m_DD.x = v36;
  v37 = v34 + v31;
  this->m_DD.y = v37;
  v38 = v35 + v32;
  this->m_DD.z = v38;
  fInve = 2.0 / (fPreLen + fNextLen);
  v39 = fInve;
  fInvf = fPreLen * fInve;
  this->m_DS.x = this->m_DS.x * fInvf;
  this->m_DS.y = fInvf * this->m_DS.y;
  this->m_DS.z = fInvf * this->m_DS.z;
  fInvg = v39 * fNextLen;
  this->m_DD.x = fInvg * this->m_DD.x;
  this->m_DD.y = fInvg * this->m_DD.y;
  this->m_DD.z = fInvg * this->m_DD.z;
}

//----- (007D5050) --------------------------------------------------------
void __cdecl NiTCBPosKey::FillDerivedVals(NiAnimationKey *pkKeys, unsigned int uiNumKeys)
{
  double v2; // st7@1
  NiAnimationKey *v3; // edi@1
  unsigned int v4; // ebx@1
  NiAnimationKey *v5; // esi@2
  float fNextLen; // ST0C_4@4
  NiTCBPosKey *v7; // ecx@5
  unsigned int v8; // eax@5
  double v9; // st7@5
  NiPoint3 *v10; // eax@5
  int v11; // eax@7
  double v12; // st5@8
  double v13; // st5@8
  double v14; // st5@8
  double v15; // st5@8
  NiPoint3 ptSub1; // [sp+14h] [bp-70h]@2
  float v17; // [sp+20h] [bp-64h]@8
  float v18; // [sp+24h] [bp-60h]@8
  float v19; // [sp+28h] [bp-5Ch]@8
  float v20; // [sp+2Ch] [bp-58h]@8
  float v21; // [sp+30h] [bp-54h]@8
  float v22; // [sp+34h] [bp-50h]@8
  float v23; // [sp+38h] [bp-4Ch]@8
  float v24; // [sp+3Ch] [bp-48h]@8
  float v25; // [sp+40h] [bp-44h]@8
  float v26; // [sp+44h] [bp-40h]@8
  float v27; // [sp+48h] [bp-3Ch]@8
  float v28; // [sp+4Ch] [bp-38h]@8
  float v29; // [sp+50h] [bp-34h]@8
  float v30; // [sp+54h] [bp-30h]@8
  float v31; // [sp+58h] [bp-2Ch]@8
  float v32; // [sp+5Ch] [bp-28h]@8
  float v33; // [sp+60h] [bp-24h]@8
  float v34; // [sp+64h] [bp-20h]@8
  float v35; // [sp+68h] [bp-1Ch]@8
  float v36; // [sp+6Ch] [bp-18h]@8
  float v37; // [sp+70h] [bp-14h]@8
  float v38; // [sp+74h] [bp-10h]@2
  float v39; // [sp+78h] [bp-Ch]@2
  float v40; // [sp+7Ch] [bp-8h]@2
  float v41; // [sp+80h] [bp-4h]@4
  NiAnimationKey *pkKeysa; // [sp+8Ch] [bp+8h]@3

  v2 = 2.0;
  v3 = pkKeys;
  v4 = uiNumKeys - 1;
  if ( uiNumKeys >= 2 )
  {
    v5 = pkKeys + 1;
    v38 = pkKeys[1].m_fTime * 2.0;
    v39 = pkKeys[2].m_fTime * 2.0;
    v40 = 2.0 * pkKeys[3].m_fTime;
    ptSub1.x = v38 - pkKeys[20].m_fTime;
    ptSub1.y = v39 - pkKeys[21].m_fTime;
    ptSub1.z = v40 - pkKeys[22].m_fTime;
    NiTCBPosKey::CalculateDVals((NiTCBPosKey *)pkKeys, &ptSub1, (NiPoint3 *)&pkKeys[20], 1.0, 1.0);
    if ( v4 > 1 )
    {
      pkKeysa = (NiAnimationKey *)(uiNumKeys - 2);
      do
      {
        v41 = v5[37].m_fTime - v5[18].m_fTime;
        fNextLen = v41;
        v41 = v5[18].m_fTime - v5[-1].m_fTime;
        NiTCBPosKey::CalculateDVals((NiTCBPosKey *)&v5[18], (NiPoint3 *)v5, (NiPoint3 *)&v5[38], v41, fNextLen);
        v5 += 19;
        pkKeysa = (NiAnimationKey *)((char *)pkKeysa - 1);
      }
      while ( pkKeysa );
    }
    v38 = v3[19 * v4 + 1].m_fTime * 2.0;
    v7 = (NiTCBPosKey *)&v3[19 * v4];
    v8 = 19 * (uiNumKeys - 2);
    v39 = v3[19 * v4 + 2].m_fTime * 2.0;
    v40 = 2.0 * v7->m_Pos.z;
    v9 = v38 - v3[v8 + 1].m_fTime;
    v10 = (NiPoint3 *)&v3[v8 + 1];
    ptSub1.x = v9;
    ptSub1.y = v39 - v10->y;
    ptSub1.z = v40 - v10->z;
    NiTCBPosKey::CalculateDVals(v7, v10, &ptSub1, 1.0, 1.0);
    v2 = 2.0;
  }
  if ( uiNumKeys != 1 )
  {
    v11 = (int)&v3[22];
    do
    {
      v38 = *(float *)(v11 - 48) * v2;
      v39 = *(float *)(v11 - 44) * v2;
      v40 = *(float *)(v11 - 40) * v2;
      v29 = *(float *)(v11 + 16) + v38;
      v30 = *(float *)(v11 + 20) + v39;
      v31 = *(float *)(v11 + 24) + v40;
      v35 = *(float *)(v11 - 8) - *(float *)(v11 - 84);
      v36 = *(float *)(v11 - 4) - *(float *)(v11 - 80);
      v37 = *(float *)v11 - *(float *)(v11 - 76);
      v32 = v35 * 3.0;
      v33 = v36 * 3.0;
      v34 = v37 * 3.0;
      v26 = v32 - v29;
      v12 = v33;
      *(float *)(v11 - 36) = v26;
      v27 = v12 - v30;
      v13 = v34;
      *(float *)(v11 - 32) = v27;
      v28 = v13 - v31;
      *(float *)(v11 - 28) = v28;
      v23 = *(float *)(v11 - 8) - *(float *)(v11 - 84);
      v24 = *(float *)(v11 - 4) - *(float *)(v11 - 80);
      v25 = *(float *)v11 - *(float *)(v11 - 76);
      v17 = v23 * v2;
      v18 = v24 * v2;
      v19 = v25 * v2;
      v20 = *(float *)(v11 + 16) + *(float *)(v11 - 48);
      v21 = *(float *)(v11 + 20) + *(float *)(v11 - 44);
      v22 = *(float *)(v11 + 24) + *(float *)(v11 - 40);
      ptSub1.x = v20 - v17;
      v14 = v21 - v18;
      *(float *)(v11 - 24) = ptSub1.x;
      v11 += 76;
      --v4;
      ptSub1.y = v14;
      v15 = v22;
      *(float *)(v11 - 96) = ptSub1.y;
      ptSub1.z = v15 - v19;
      *(float *)(v11 - 92) = ptSub1.z;
    }
    while ( v4 );
  }
}

//----- (007D52B0) --------------------------------------------------------
double __cdecl NiTCBPosKey::ComputeMaxCurvature(NiAnimationKey *pkKeys, unsigned int uiNumKeys)
{
  unsigned int v2; // ebx@2
  int v3; // eax@2
  NiAnimationKey *v4; // esi@2
  int v5; // edi@3
  double v6; // st7@4
  NiPoint3 d1; // [sp+1Ch] [bp-58h]@4
  float v9; // [sp+28h] [bp-4Ch]@4
  float v10; // [sp+2Ch] [bp-48h]@4
  float v11; // [sp+30h] [bp-44h]@4
  float v12; // [sp+34h] [bp-40h]@4
  float v13; // [sp+38h] [bp-3Ch]@4
  float v14; // [sp+3Ch] [bp-38h]@4
  float v15; // [sp+40h] [bp-34h]@4
  float v16; // [sp+44h] [bp-30h]@4
  float v17; // [sp+48h] [bp-2Ch]@4
  float v18; // [sp+4Ch] [bp-28h]@4
  float v19; // [sp+50h] [bp-24h]@4
  float v20; // [sp+54h] [bp-20h]@4
  double v21; // [sp+58h] [bp-1Ch]@4
  double v22; // [sp+60h] [bp-14h]@4
  double v23; // [sp+68h] [bp-Ch]@4
  float fMaxCurvature; // [sp+70h] [bp-4h]@1
  float fCurvature; // [sp+80h] [bp+Ch]@3
  float fCurvatureb; // [sp+80h] [bp+Ch]@4
  float fCurvaturec; // [sp+80h] [bp+Ch]@4
  float fCurvatured; // [sp+80h] [bp+Ch]@4
  float fCurvaturee; // [sp+80h] [bp+Ch]@4
  float fCurvaturef; // [sp+80h] [bp+Ch]@4
  float fCurvaturea; // [sp+80h] [bp+Ch]@4

  fMaxCurvature = 0.0;
  if ( uiNumKeys != 1 )
  {
    v2 = uiNumKeys - 1;
    v3 = NiPosKey::ms_iSampleSize;
    v4 = pkKeys + 18;
    do
    {
      v5 = 0;
      fCurvature = 0.0;
      if ( v3 >= 0 )
      {
        do
        {
          fCurvatureb = (double)SLODWORD(fCurvature) * NiPosKey::ms_fSampleDelta;
          NiTCBPosKey::InterpolateD1(fCurvatureb, v4 - 18, v4 + 1, &d1);
          fCurvaturec = fCurvatureb * 6.0;
          v15 = v4[-2].m_fTime * fCurvaturec;
          v16 = v4[-1].m_fTime * fCurvaturec;
          v17 = fCurvaturec * v4->m_fTime;
          v18 = v4[-5].m_fTime * 2.0;
          v19 = v4[-4].m_fTime * 2.0;
          v20 = 2.0 * v4[-3].m_fTime;
          v12 = v18 + v15;
          v13 = v19 + v16;
          v14 = v20 + v17;
          v9 = d1.y * v14 - d1.z * v13;
          v10 = d1.z * v12 - v14 * d1.x;
          v11 = v13 * d1.x - v12 * d1.y;
          v22 = d1.y;
          v23 = d1.x;
          v21 = d1.z;
          fCurvatured = v11 * v11 + v9 * v9 + v10 * v10;
          fCurvaturee = sqrt(fCurvatured);
          v6 = fCurvaturee;
          fCurvaturef = v23 * v23 + v22 * v22 + v21 * v21;
          fCurvaturea = v6 / fCurvaturef;
          if ( fMaxCurvature < (double)fCurvaturea )
            fMaxCurvature = fCurvaturea;
          v3 = NiPosKey::ms_iSampleSize;
          ++v5;
          fCurvature = *(float *)&v5;
        }
        while ( v5 <= NiPosKey::ms_iSampleSize );
      }
      v4 += 19;
      --v2;
    }
    while ( v2 );
  }
  return fMaxCurvature;
}
// A7BA9C: using guessed type int NiPosKey::ms_iSampleSize;
// B61874: using guessed type float NiPosKey::ms_fSampleDelta;

//----- (007D5450) --------------------------------------------------------
char __cdecl NiTCBPosKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys)
{
  NiAnimationKey *v3; // ebx@1
  unsigned int v4; // edi@2
  int v5; // ecx@2
  unsigned int *v6; // eax@2
  void *v7; // edi@3
  unsigned int v8; // eax@7
  int v9; // eax@7
  char result; // al@9
  NiPoint3 kPt; // [sp+20h] [bp-10h]@7
  unsigned int uiInsertAt; // [sp+2Ch] [bp-4h]@1

  v3 = *pkKeys;
  if ( NiAnimationKey::OkayToInsert(fTime, *pkKeys, *uiNumKeys, &uiInsertAt, 76) )
  {
    v4 = *uiNumKeys + 1;
    v5 = 76 * v4 | -(76 * (unsigned __int64)v4 >> 32 != 0);
    v6 = (unsigned int *)operator new((v5 + 4) | -__CFADD__(v5, 4));
    if ( v6 )
    {
      *v6 = v4;
      v7 = v6 + 1;
    }
    else
    {
      v7 = 0;
    }
    memcpy_s(v7, 76 * (*uiNumKeys + 1), v3, 76 * uiInsertAt);
    if ( *uiNumKeys > uiInsertAt )
      memcpy_s(
        (char *)v7 + 76 * uiInsertAt + 76,
        76 * (*uiNumKeys - uiInsertAt),
        &v3[19 * uiInsertAt],
        76 * (*uiNumKeys - uiInsertAt));
    NiPosKey::GenInterpDefault(&kPt, fTime, (NiPosKey *)v3, TCBKEY, *uiNumKeys, 76);
    v8 = 76 * uiInsertAt;
    *(float *)((char *)v7 + v8) = fTime;
    v9 = (int)v7 + v8;
    *(NiPoint3 *)(v9 + 4) = kPt;
    *(float *)(v9 + 16) = 0.0;
    *(float *)(v9 + 20) = 0.0;
    *(float *)(v9 + 24) = 0.0;
    ++*uiNumKeys;
    if ( v3 )
      operator delete(&v3[-1]);
    *pkKeys = (NiAnimationKey *)v7;
    NiTCBPosKey::FillDerivedVals((NiAnimationKey *)v7, *uiNumKeys);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007D5580) --------------------------------------------------------
NiTCBPosKey *__cdecl NiTCBPosKey::CreateFromStream(NiStream *stream, unsigned int uiNumKeys)
{
  unsigned int v2; // ebx@1
  unsigned int v3; // ecx@1
  void *v4; // eax@1
  NiTCBPosKey *result; // eax@2
  NiAnimationKey *v6; // esi@5
  NiBinaryStream *v7; // eax@6
  NiBinaryStream *v8; // ST28_4@6
  unsigned int (__cdecl *v9)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@6
  unsigned int (__cdecl *v10)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@6
  NiBinaryStream *v11; // ST14_4@6
  NiBinaryStream *v12; // eax@6
  NiBinaryStream *v13; // ST00_4@6
  unsigned int (__cdecl *v14)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@6
  int v15; // [sp+4h] [bp-4h]@6
  NiTCBPosKey *pkTCBPosKeys; // [sp+14h] [bp+Ch]@2

  v2 = uiNumKeys;
  v3 = 76 * uiNumKeys | -(76 * (unsigned __int64)uiNumKeys >> 32 != 0);
  v4 = operator new((v3 + 4) | -__CFADD__(v3, 4));
  if ( v4 )
  {
    *(_DWORD *)v4 = uiNumKeys;
    result = (NiTCBPosKey *)((char *)v4 + 4);
    pkTCBPosKeys = result;
  }
  else
  {
    pkTCBPosKeys = 0;
    result = 0;
  }
  if ( v2 )
  {
    v6 = (NiAnimationKey *)&result->m_fContinuity;
    do
    {
      NiPosKey::LoadBinary((NiPosKey *)&v6[-5], stream);
      v7 = stream->m_pkIstr;
      v8 = v7;
      v9 = v7->m_pfnRead;
      v15 = 4;
      v9(v8, &v6[-1], 4u, (unsigned int *)&v15, 1u);
      v10 = stream->m_pkIstr->m_pfnRead;
      v11 = stream->m_pkIstr;
      v15 = 4;
      v10(v11, v6, 4u, (unsigned int *)&v15, 1u);
      v12 = stream->m_pkIstr;
      v13 = v12;
      v14 = v12->m_pfnRead;
      v15 = 4;
      v14(v13, &v6[1], 4u, (unsigned int *)&v15, 1u);
      v6 += 19;
      --v2;
    }
    while ( v2 );
    result = pkTCBPosKeys;
  }
  return result;
}

//----- (007D5650) --------------------------------------------------------
void __cdecl NiTCBPosKey::SaveToStream(NiStream *stream, NiAnimationKey *pkKeys, unsigned int uiNumKeys)
{
  NiAnimationKey *v3; // esi@2
  NiBinaryStream *v4; // eax@3
  NiBinaryStream *v5; // ST28_4@3
  unsigned int (__cdecl *v6)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@3
  unsigned int (__cdecl *v7)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@3
  NiBinaryStream *v8; // ST14_4@3
  NiBinaryStream *v9; // eax@3
  NiBinaryStream *v10; // ST00_4@3
  unsigned int (__cdecl *v11)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@3

  if ( uiNumKeys )
  {
    v3 = pkKeys + 5;
    do
    {
      NiPosKey::SaveBinary(stream, v3 - 5);
      v4 = stream->m_pkOstr;
      v5 = v4;
      v6 = v4->m_pfnWrite;
      pkKeys = (NiAnimationKey *)4;
      v6(v5, &v3[-1], 4u, (unsigned int *)&pkKeys, 1u);
      v7 = stream->m_pkOstr->m_pfnWrite;
      v8 = stream->m_pkOstr;
      pkKeys = (NiAnimationKey *)4;
      v7(v8, v3, 4u, (unsigned int *)&pkKeys, 1u);
      v9 = stream->m_pkOstr;
      v10 = v9;
      v11 = v9->m_pfnWrite;
      pkKeys = (NiAnimationKey *)4;
      v11(v10, &v3[1], 4u, (unsigned int *)&pkKeys, 1u);
      v3 += 19;
      --uiNumKeys;
    }
    while ( uiNumKeys );
  }
}

//----- (007D56E0) --------------------------------------------------------
int __cdecl NiTCBPosKey::RegisterLoader()
{
  int result; // eax@2

  if ( bRegistered_12 )
  {
    result = 0;
  }
  else
  {
    result = 1;
    bRegistered_12 = 1;
    dword_B61F7C = (int)NiTCBPosKey::CreateFromStream;
    dword_B61C1C = (int)NiTCBPosKey::SaveToStream;
    dword_B61B8C = (int)NiTCBPosKey::Copy;
    dword_B61AFC = (int)NiTCBPosKey::CreateArray;
    dword_B61A6C = (int)NiLinRotKey::DeleteArray;
    byte_B61909 = 76;
    dword_B61EEC = (int)NiTCBPosKey::ComputeMaxCurvature;
    dword_B61E5C = (int)NiTCBPosKey::Interpolate;
    dword_B61DCC = (int)NiTCBPosKey::InterpolateD1;
    dword_B61D3C = (int)NiTCBPosKey::InterpolateD2;
    dword_B61CAC = (int)NiTCBPosKey::Equal;
    dword_B6194C = (int)NiTCBPosKey::FillDerivedVals;
    dword_B619DC = (int)NiTCBPosKey::Insert;
  }
  return result;
}
// B61909: using guessed type char byte_B61909;
// B6194C: using guessed type int dword_B6194C;
// B619DC: using guessed type int dword_B619DC;
// B61A6C: using guessed type int dword_B61A6C;
// B61AFC: using guessed type int dword_B61AFC;
// B61B8C: using guessed type int dword_B61B8C;
// B61C1C: using guessed type int dword_B61C1C;
// B61CAC: using guessed type int dword_B61CAC;
// B61D3C: using guessed type int dword_B61D3C;
// B61DCC: using guessed type int dword_B61DCC;
// B61E5C: using guessed type int dword_B61E5C;
// B61EEC: using guessed type int dword_B61EEC;
// B61F7C: using guessed type int dword_B61F7C;

//----- (007D5780) --------------------------------------------------------
void __cdecl NiTCBRotKey::Copy(NiAnimationKey *pkNewKey, NiAnimationKey *pkOrigKey)
{
  COERCE_NIANIMATIONKEY(pkNewKey->m_fTime) = COERCE_NIANIMATIONKEY(pkOrigKey->m_fTime);
  COERCE_NIANIMATIONKEY(pkNewKey[1].m_fTime) = pkOrigKey[1];
  COERCE_NIANIMATIONKEY(pkNewKey[2].m_fTime) = pkOrigKey[2];
  COERCE_NIANIMATIONKEY(pkNewKey[3].m_fTime) = pkOrigKey[3];
  COERCE_NIANIMATIONKEY(pkNewKey[4].m_fTime) = pkOrigKey[4];
  COERCE_NIANIMATIONKEY(pkNewKey[5].m_fTime) = pkOrigKey[5];
  COERCE_NIANIMATIONKEY(pkNewKey[6].m_fTime) = pkOrigKey[6];
  COERCE_NIANIMATIONKEY(pkNewKey[7].m_fTime) = pkOrigKey[7];
  COERCE_NIANIMATIONKEY(pkNewKey[8].m_fTime) = pkOrigKey[8];
  COERCE_NIANIMATIONKEY(pkNewKey[9].m_fTime) = pkOrigKey[9];
  COERCE_NIANIMATIONKEY(pkNewKey[10].m_fTime) = pkOrigKey[10];
  COERCE_NIANIMATIONKEY(pkNewKey[11].m_fTime) = pkOrigKey[11];
  COERCE_NIANIMATIONKEY(pkNewKey[12].m_fTime) = pkOrigKey[12];
  COERCE_NIANIMATIONKEY(pkNewKey[13].m_fTime) = pkOrigKey[13];
  COERCE_NIANIMATIONKEY(pkNewKey[14].m_fTime) = pkOrigKey[14];
  COERCE_NIANIMATIONKEY(pkNewKey[15].m_fTime) = pkOrigKey[15];
}

//----- (007D57F0) --------------------------------------------------------
void __cdecl NiTCBRotKey::Interpolate(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult)
{
  NiQuaternion *v4; // eax@1
  NiQuaternion result; // [sp+14h] [bp-10h]@1

  v4 = NiQuaternion::Squad(
         &result,
         fTime,
         (NiQuaternion *)&pKey0[1],
         (NiQuaternion *)&pKey0[8],
         (NiQuaternion *)&pKey1[12],
         (NiQuaternion *)&pKey1[1]);
  *(float *)pResult = v4->m_fW;
  *((_DWORD *)pResult + 1) = LODWORD(v4->m_fX);
  *((_DWORD *)pResult + 2) = LODWORD(v4->m_fY);
  *((_DWORD *)pResult + 3) = LODWORD(v4->m_fZ);
}

//----- (007D5840) --------------------------------------------------------
void __thiscall NiTCBRotKey::CalculateDVals(NiTCBRotKey *this, NiTCBRotKey *pPrev, NiTCBRotKey *pNext)
{
  NiTCBRotKey *v3; // esi@1
  NiQuaternion *v4; // edi@1
  NiQuaternion *v5; // ST10_4@1
  NiQuaternion *v6; // eax@1
  NiQuaternion *v7; // eax@1
  NiQuaternion *v8; // eax@1
  NiQuaternion *v9; // eax@1
  NiQuaternion *v10; // ST10_4@1
  NiQuaternion *v11; // eax@1
  NiQuaternion *v12; // eax@1
  NiQuaternion *v13; // eax@1
  NiQuaternion *v14; // eax@1
  NiQuaternion *v15; // eax@1
  NiQuaternion *v16; // ST10_4@1
  NiQuaternion *v17; // eax@1
  NiQuaternion *v18; // eax@1
  NiQuaternion *v19; // eax@1
  NiQuaternion *v20; // eax@1
  NiQuaternion *v21; // eax@1
  NiQuaternion Tout; // [sp+1Ch] [bp-98h]@1
  NiQuaternion Tin; // [sp+2Ch] [bp-88h]@1
  NiQuaternion v24; // [sp+3Ch] [bp-78h]@1
  NiQuaternion v25; // [sp+4Ch] [bp-68h]@1
  NiQuaternion logPrev; // [sp+5Ch] [bp-58h]@1
  NiQuaternion logNext; // [sp+6Ch] [bp-48h]@1
  NiQuaternion result; // [sp+7Ch] [bp-38h]@1
  NiQuaternion v29; // [sp+8Ch] [bp-28h]@1
  float mb; // [sp+9Ch] [bp-18h]@1
  float fInv; // [sp+A0h] [bp-14h]@1
  float pc; // [sp+A4h] [bp-10h]@1
  float mt; // [sp+A8h] [bp-Ch]@1
  float pb; // [sp+ACh] [bp-8h]@1
  float mc; // [sp+B0h] [bp-4h]@1
  float adjVal; // [sp+BCh] [bp+8h]@1
  float adjVala; // [sp+BCh] [bp+8h]@1
  float adjValb; // [sp+BCh] [bp+8h]@1
  float adjValc; // [sp+BCh] [bp+8h]@1
  NiTCBRotKey *pNexta; // [sp+C0h] [bp+Ch]@1
  NiTCBRotKey *pNextb; // [sp+C0h] [bp+Ch]@1

  v3 = this;
  v4 = &this->m_quat;
  v5 = &this->m_quat;
  v6 = NiQuaternion::UnitInverse(&result, &pPrev->m_quat);
  v7 = NiQuaternion::operator*(v6, &v29, v5);
  NiQuaternion::Log(&logPrev, v7);
  v8 = NiQuaternion::UnitInverse(&v29, v4);
  v9 = NiQuaternion::operator*(v8, &result, &pNext->m_quat);
  NiQuaternion::Log(&logNext, v9);
  fInv = 1.0 / (pNext->m_fTime - pPrev->m_fTime);
  mt = 1.0 - v3->m_fTension;
  mc = 1.0 - v3->m_fContinuity;
  pc = v3->m_fContinuity + 1.0;
  mb = 1.0 - v3->m_fBias;
  pb = v3->m_fBias + 1.0;
  adjVal = (v3->m_fTime - pPrev->m_fTime) * fInv;
  *(double *)&v29.m_fY = adjVal * mt;
  adjVala = *(double *)&v29.m_fY * pc * pb;
  v10 = operator*(&result, adjVala, &logPrev);
  adjValb = mc * *(double *)&v29.m_fY * mb;
  v11 = operator*(&v25, adjValb, &logNext);
  NiQuaternion::operator+(v11, &Tout, v10);
  v12 = NiQuaternion::operator-(&Tout, &v25, &logNext);
  v13 = operator*(&result, 0.5, v12);
  v14 = NiQuaternion::Exp(&v29, v13);
  v15 = NiQuaternion::operator*(v4, &v24, v14);
  v3->m_A.m_fW = v15->m_fW;
  v3->m_A.m_fX = v15->m_fX;
  v3->m_A.m_fY = v15->m_fY;
  v3->m_A.m_fZ = v15->m_fZ;
  adjValc = (pNext->m_fTime - v3->m_fTime) * fInv;
  *(double *)&v29.m_fY = adjValc * mt;
  *(float *)&pNexta = *(double *)&v29.m_fY * mc * pb;
  v16 = operator*(&v24, *(float *)&pNexta, &logPrev);
  *(float *)&pNextb = pc * *(double *)&v29.m_fY * mb;
  v17 = operator*(&v25, *(float *)&pNextb, &logNext);
  NiQuaternion::operator+(v17, &Tin, v16);
  v18 = NiQuaternion::operator-(&logPrev, &v24, &Tin);
  v19 = operator*(&v25, 0.5, v18);
  v20 = NiQuaternion::Exp(&result, v19);
  v21 = NiQuaternion::operator*(v4, &v29, v20);
  v3->m_B.m_fW = v21->m_fW;
  v3->m_B.m_fX = v21->m_fX;
  v3->m_B.m_fY = v21->m_fY;
  v3->m_B.m_fZ = v21->m_fZ;
}

//----- (007D5A70) --------------------------------------------------------
void __cdecl NiTCBRotKey::FillDerivedVals(NiAnimationKey *pkKeys, unsigned int uiNumKeys, char ucSize)
{
  unsigned int v3; // edi@1
  NiAnimationKey *v4; // esi@2
  unsigned int v5; // eax@2
  NiAnimationKey *v6; // esi@3
  NiQuaternion *v7; // eax@4
  NiQuaternion *v8; // eax@4
  NiQuaternion *v9; // eax@4
  NiQuaternion *v10; // eax@4
  NiQuaternion *v11; // ST10_4@4
  NiQuaternion *v12; // eax@4
  NiQuaternion *v13; // eax@4
  NiQuaternion *v14; // eax@4
  NiQuaternion *v15; // eax@4
  NiQuaternion *v16; // eax@4
  NiQuaternion *v17; // ST10_4@4
  NiQuaternion *v18; // eax@4
  NiQuaternion *v19; // eax@4
  NiQuaternion *v20; // eax@4
  NiQuaternion *v21; // eax@4
  NiQuaternion *v22; // eax@4
  NiQuaternion v23; // [sp+1Ch] [bp-16Ch]@4
  NiQuaternion v24; // [sp+2Ch] [bp-15Ch]@4
  NiQuaternion v25; // [sp+3Ch] [bp-14Ch]@4
  NiQuaternion v26; // [sp+4Ch] [bp-13Ch]@4
  NiQuaternion v27; // [sp+5Ch] [bp-12Ch]@4
  NiQuaternion v28; // [sp+6Ch] [bp-11Ch]@4
  NiQuaternion v29; // [sp+7Ch] [bp-10Ch]@4
  NiQuaternion v30; // [sp+8Ch] [bp-FCh]@4
  NiQuaternion v31; // [sp+9Ch] [bp-ECh]@4
  NiQuaternion v32; // [sp+ACh] [bp-DCh]@4
  NiQuaternion v33; // [sp+BCh] [bp-CCh]@4
  NiQuaternion v34; // [sp+CCh] [bp-BCh]@4
  NiQuaternion v35; // [sp+DCh] [bp-ACh]@4
  NiQuaternion result; // [sp+ECh] [bp-9Ch]@4
  NiQuaternion v37; // [sp+FCh] [bp-8Ch]@4
  NiQuaternion v38; // [sp+10Ch] [bp-7Ch]@4
  NiQuaternion v39; // [sp+11Ch] [bp-6Ch]@4
  NiQuaternion v40; // [sp+12Ch] [bp-5Ch]@4
  NiQuaternion v41; // [sp+13Ch] [bp-4Ch]@4
  NiQuaternion q; // [sp+14Ch] [bp-3Ch]@4
  double v43; // [sp+15Ch] [bp-2Ch]@4
  unsigned int uiNumKeysM1; // [sp+164h] [bp-24h]@2
  float v45; // [sp+168h] [bp-20h]@4
  float v46; // [sp+16Ch] [bp-1Ch]@4
  float v47; // [sp+170h] [bp-18h]@4
  float v48; // [sp+174h] [bp-14h]@4
  unsigned int v49; // [sp+178h] [bp-10h]@3
  float v50; // [sp+17Ch] [bp-Ch]@4
  float v51; // [sp+180h] [bp-8h]@4
  float v52; // [sp+184h] [bp-4h]@4

  v3 = uiNumKeys;
  if ( uiNumKeys >= 2 )
  {
    v4 = pkKeys;
    NiRotKey::FillDerivedVals(pkKeys, uiNumKeys, ucSize);
    NiTCBRotKey::CalculateDVals((NiTCBRotKey *)v4, (NiTCBRotKey *)v4, (NiTCBRotKey *)&v4[16]);
    v5 = uiNumKeys - 1;
    uiNumKeysM1 = uiNumKeys - 1;
    if ( uiNumKeys - 1 > 1 )
    {
      v6 = pkKeys + 32;
      v49 = uiNumKeys - 2;
      do
      {
        v7 = NiQuaternion::UnitInverse(&result, (NiQuaternion *)&v6[-31]);
        v8 = NiQuaternion::operator*(v7, &v38, (NiQuaternion *)&v6[-15]);
        NiQuaternion::Log(&q, v8);
        v9 = NiQuaternion::UnitInverse(&v34, (NiQuaternion *)&v6[-15]);
        v10 = NiQuaternion::operator*(v9, &v26, (NiQuaternion *)&v6[1]);
        NiQuaternion::Log(&v41, v10);
        v47 = 1.0 / (v6->m_fTime - v6[-32].m_fTime);
        v45 = 1.0 - v6[-11].m_fTime;
        v46 = 1.0 - v6[-10].m_fTime;
        v48 = v6[-10].m_fTime + 1.0;
        v51 = 1.0 - v6[-9].m_fTime;
        v50 = v6[-9].m_fTime + 1.0;
        v52 = (v6[-16].m_fTime - v6[-32].m_fTime) * v47;
        v43 = v52 * v45;
        v52 = v43 * v48 * v50;
        v11 = operator*(&v28, v52, &q);
        v52 = v46 * v43 * v51;
        v12 = operator*(&v32, v52, &v41);
        NiQuaternion::operator+(v12, &v40, v11);
        v13 = NiQuaternion::operator-(&v40, &v24, &v41);
        v14 = operator*(&v30, 0.5, v13);
        v15 = NiQuaternion::Exp(&v37, v14);
        v16 = NiQuaternion::operator*((NiQuaternion *)&v6[-15], &v35, v15);
        COERCE_NIANIMATIONKEY(v6[-8].m_fTime) = LODWORD(v16->m_fW);
        COERCE_NIANIMATIONKEY(v6[-7].m_fTime) = LODWORD(v16->m_fX);
        COERCE_NIANIMATIONKEY(v6[-6].m_fTime) = LODWORD(v16->m_fY);
        COERCE_NIANIMATIONKEY(v6[-5].m_fTime) = LODWORD(v16->m_fZ);
        v52 = (v6->m_fTime - v6[-16].m_fTime) * v47;
        v43 = v52 * v45;
        v50 = v43 * v46 * v50;
        v17 = operator*(&v33, v50, &q);
        v51 = v48 * v43 * v51;
        v18 = operator*(&v31, v51, &v41);
        NiQuaternion::operator+(v18, &v39, v17);
        v19 = NiQuaternion::operator-(&q, &v29, &v39);
        v20 = operator*(&v27, 0.5, v19);
        v21 = NiQuaternion::Exp(&v25, v20);
        v22 = NiQuaternion::operator*((NiQuaternion *)&v6[-15], &v23, v21);
        COERCE_NIANIMATIONKEY(v6[-4].m_fTime) = LODWORD(v22->m_fW);
        COERCE_NIANIMATIONKEY(v6[-3].m_fTime) = LODWORD(v22->m_fX);
        COERCE_NIANIMATIONKEY(v6[-2].m_fTime) = LODWORD(v22->m_fY);
        COERCE_NIANIMATIONKEY(v6[-1].m_fTime) = LODWORD(v22->m_fZ);
        v6 += 16;
        --v49;
      }
      while ( v49 );
      v3 = uiNumKeys;
      v5 = uiNumKeysM1;
      v4 = pkKeys;
    }
    NiTCBRotKey::CalculateDVals(
      (NiTCBRotKey *)&v4[16 * v5],
      (NiTCBRotKey *)&v4[16 * (v3 - 2)],
      (NiTCBRotKey *)&v4[16 * v5]);
  }
}

//----- (007D5D20) --------------------------------------------------------
BOOL __cdecl NiTCBRotKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1)
{
  BOOL result; // eax@1

  result = NiColorKey::Equal(key0, key1);
  if ( (_BYTE)result )
    result = key1[5].m_fTime == key0[5].m_fTime
          && key1[6].m_fTime == key0[6].m_fTime
          && key1[7].m_fTime == key0[7].m_fTime
          && (unsigned __int8)NiSphere::operator==((NiSphere *)&key0[8], (NiSphere *)&key1[8])
          && (unsigned __int8)NiSphere::operator==((NiSphere *)&key0[12], (NiSphere *)&key1[12]);
  return result;
}

//----- (007D5DA0) --------------------------------------------------------
NiAnimationKey *__cdecl NiTCBRotKey::CreateArray(unsigned int uiNumKeys)
{
  unsigned int v1; // ecx@1
  unsigned int *v2; // eax@1
  signed int v3; // edi@2
  NiAnimationKey *v4; // ebx@2
  NiQuaternion *v5; // esi@3
  NiAnimationKey *result; // eax@5

  v1 = (uiNumKeys << 6) | -((unsigned __int64)uiNumKeys >> 26 != 0);
  v2 = (unsigned int *)operator new((v1 + 4) | -__CFADD__(v1, 4));
  if ( v2 )
  {
    v3 = uiNumKeys - 1;
    *v2 = uiNumKeys;
    v4 = (NiAnimationKey *)(v2 + 1);
    if ( ((uiNumKeys - 1) & 0x80000000) == 0 )
    {
      v5 = (NiQuaternion *)(v2 + 2);
      do
      {
        NiQuaternion::NiQuaternion(v5, 0.0, 0.0, 0.0, 0.0);
        v5 += 4;
        --v3;
      }
      while ( v3 >= 0 );
    }
    result = v4;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007D5E10) --------------------------------------------------------
char __cdecl NiTCBRotKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys)
{
  NiAnimationKey *v3; // ebx@1
  unsigned int v4; // edi@2
  int v5; // ecx@2
  unsigned int *v6; // eax@2
  double v7; // st7@2
  void *v8; // eax@3
  NiQuaternion *v9; // edi@4
  float z; // ST14_4@6
  float y; // ST10_4@6
  float x; // ST0C_4@6
  float w; // ST08_4@6
  void *v14; // edi@7
  unsigned int v15; // eax@12
  float v16; // edx@12
  char result; // al@14
  NiQuaternion kQ; // [sp+20h] [bp-1Ch]@12
  void *dst; // [sp+30h] [bp-Ch]@3
  unsigned int v20; // [sp+34h] [bp-8h]@3
  unsigned int uiInsertAt; // [sp+38h] [bp-4h]@1

  v3 = *pkKeys;
  if ( NiAnimationKey::OkayToInsert(fTime, *pkKeys, *uiNumKeys, &uiInsertAt, 64) )
  {
    v4 = *uiNumKeys + 1;
    v5 = (v4 << 6) | -((unsigned __int64)v4 >> 26 != 0);
    v6 = (unsigned int *)operator new((v5 + 4) | -__CFADD__(v5, 4));
    v7 = 0.0;
    if ( v6 )
    {
      *v6 = v4;
      v8 = v6 + 1;
      dst = v8;
      v20 = v4 - 1;
      if ( ((v4 - 1) & 0x80000000) != 0 )
      {
        v14 = v8;
      }
      else
      {
        v9 = (NiQuaternion *)((char *)v8 + 4);
        while ( 1 )
        {
          z = v7;
          y = v7;
          x = v7;
          w = v7;
          NiQuaternion::NiQuaternion(v9, w, x, y, z);
          v9 += 4;
          if ( (--v20 & 0x80000000) != 0 )
            break;
          v7 = 0.0;
        }
        v14 = dst;
      }
    }
    else
    {
      v14 = 0;
    }
    memcpy_s(v14, (*uiNumKeys + 1) << 6, v3, uiInsertAt << 6);
    if ( *uiNumKeys > uiInsertAt )
      memcpy_s(
        (char *)v14 + 64 * uiInsertAt + 64,
        (*uiNumKeys - uiInsertAt) << 6,
        &v3[16 * uiInsertAt],
        (*uiNumKeys - uiInsertAt) << 6);
    NiRotKey::GenInterpDefault(&kQ, fTime, (NiRotKey *)v3, TCBKEY, *uiNumKeys, 64);
    v15 = (unsigned int)v14 + 64 * uiInsertAt;
    *(float *)v15 = fTime;
    *(float *)(v15 + 4) = kQ.m_fW;
    *(float *)(v15 + 8) = kQ.m_fX;
    *(float *)(v15 + 12) = kQ.m_fY;
    v16 = kQ.m_fZ;
    *(float *)(v15 + 20) = 0.0;
    *(float *)(v15 + 24) = 0.0;
    *(float *)(v15 + 16) = v16;
    *(float *)(v15 + 28) = 0.0;
    ++*uiNumKeys;
    if ( v3 )
      operator delete(&v3[-1]);
    *pkKeys = (NiAnimationKey *)v14;
    NiTCBRotKey::FillDerivedVals((NiAnimationKey *)v14, *uiNumKeys, 64);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007D5F80) --------------------------------------------------------
NiTCBRotKey *__cdecl NiTCBRotKey::CreateFromStream(NiStream *stream, unsigned int uiNumKeys)
{
  unsigned int v2; // ebx@1
  unsigned int v3; // ecx@1
  void *v4; // eax@1
  NiTCBRotKey *result; // eax@2
  signed int v6; // edi@2
  NiQuaternion *v7; // esi@3
  NiAnimationKey *v8; // esi@9
  NiBinaryStream *v9; // eax@10
  NiBinaryStream *v10; // ST28_4@10
  unsigned int (__cdecl *v11)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@10
  unsigned int (__cdecl *v12)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@10
  NiBinaryStream *v13; // ST14_4@10
  NiBinaryStream *v14; // eax@10
  NiBinaryStream *v15; // ST00_4@10
  unsigned int (__cdecl *v16)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@10
  int v17; // [sp+1Ch] [bp-4h]@10
  NiTCBRotKey *pkTCBRotKeys; // [sp+2Ch] [bp+Ch]@2
  NiTCBRotKey *pkTCBRotKeysa; // [sp+2Ch] [bp+Ch]@6

  v2 = uiNumKeys;
  v3 = (uiNumKeys << 6) | -((unsigned __int64)uiNumKeys >> 26 != 0);
  v4 = operator new((v3 + 4) | -__CFADD__(v3, 4));
  if ( v4 )
  {
    *(_DWORD *)v4 = uiNumKeys;
    result = (NiTCBRotKey *)((char *)v4 + 4);
    v6 = uiNumKeys - 1;
    pkTCBRotKeys = result;
    if ( ((v2 - 1) & 0x80000000) == 0 )
    {
      v7 = &result->m_quat;
      do
      {
        NiQuaternion::NiQuaternion(v7, 0.0, 0.0, 0.0, 0.0);
        v7 += 4;
        --v6;
      }
      while ( v6 >= 0 );
      result = pkTCBRotKeys;
    }
    pkTCBRotKeysa = result;
  }
  else
  {
    pkTCBRotKeysa = 0;
    result = 0;
  }
  if ( v2 )
  {
    v8 = (NiAnimationKey *)&result->m_fContinuity;
    do
    {
      NiColorKey::LoadBinary((NiRotKey *)&v8[-6], stream);
      v9 = stream->m_pkIstr;
      v10 = v9;
      v11 = v9->m_pfnRead;
      v17 = 4;
      v11(v10, &v8[-1], 4u, (unsigned int *)&v17, 1u);
      v12 = stream->m_pkIstr->m_pfnRead;
      v13 = stream->m_pkIstr;
      v17 = 4;
      v12(v13, v8, 4u, (unsigned int *)&v17, 1u);
      v14 = stream->m_pkIstr;
      v15 = v14;
      v16 = v14->m_pfnRead;
      v17 = 4;
      v16(v15, &v8[1], 4u, (unsigned int *)&v17, 1u);
      v8 += 16;
      --v2;
    }
    while ( v2 );
    result = pkTCBRotKeysa;
  }
  return result;
}

//----- (007D6080) --------------------------------------------------------
void __cdecl NiTCBRotKey::SaveToStream(NiStream *stream, NiAnimationKey *pkKeys, unsigned int uiNumKeys)
{
  NiAnimationKey *v3; // esi@2
  NiBinaryStream *v4; // eax@3
  NiBinaryStream *v5; // ST28_4@3
  unsigned int (__cdecl *v6)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@3
  unsigned int (__cdecl *v7)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@3
  NiBinaryStream *v8; // ST14_4@3
  NiBinaryStream *v9; // eax@3
  NiBinaryStream *v10; // ST00_4@3
  unsigned int (__cdecl *v11)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@3

  if ( uiNumKeys )
  {
    v3 = pkKeys + 6;
    do
    {
      NiRotKey::SaveBinary(stream, v3 - 6);
      v4 = stream->m_pkOstr;
      v5 = v4;
      v6 = v4->m_pfnWrite;
      pkKeys = (NiAnimationKey *)4;
      v6(v5, &v3[-1], 4u, (unsigned int *)&pkKeys, 1u);
      v7 = stream->m_pkOstr->m_pfnWrite;
      v8 = stream->m_pkOstr;
      pkKeys = (NiAnimationKey *)4;
      v7(v8, v3, 4u, (unsigned int *)&pkKeys, 1u);
      v9 = stream->m_pkOstr;
      v10 = v9;
      v11 = v9->m_pfnWrite;
      pkKeys = (NiAnimationKey *)4;
      v11(v10, &v3[1], 4u, (unsigned int *)&pkKeys, 1u);
      v3 += 16;
      --uiNumKeys;
    }
    while ( uiNumKeys );
  }
}

//----- (007D6110) --------------------------------------------------------
int __cdecl NiTCBRotKey::RegisterLoader()
{
  int result; // eax@1

  result = 0;
  if ( !bRegistered_13 )
  {
    dword_B61F04 = 0;
    dword_B61DE4 = 0;
    dword_B61D54 = 0;
    bRegistered_13 = 1;
    dword_B61F94 = (int)NiTCBRotKey::CreateFromStream;
    dword_B61C34 = (int)NiTCBRotKey::SaveToStream;
    dword_B61BA4 = (int)NiTCBRotKey::Copy;
    dword_B61B14 = (int)NiTCBRotKey::CreateArray;
    dword_B61A84 = (int)NiLinRotKey::DeleteArray;
    byte_B6190F = 64;
    dword_B61E74 = (int)NiTCBRotKey::Interpolate;
    dword_B61CC4 = (int)NiTCBRotKey::Equal;
    dword_B61964 = (int)NiTCBRotKey::FillDerivedVals;
    dword_B619F4 = (int)NiTCBRotKey::Insert;
    result = 1;
  }
  return result;
}
// B6190F: using guessed type char byte_B6190F;
// B61964: using guessed type int dword_B61964;
// B619F4: using guessed type int dword_B619F4;
// B61A84: using guessed type int dword_B61A84;
// B61B14: using guessed type int dword_B61B14;
// B61BA4: using guessed type int dword_B61BA4;
// B61C34: using guessed type int dword_B61C34;
// B61CC4: using guessed type int dword_B61CC4;
// B61D54: using guessed type int dword_B61D54;
// B61DE4: using guessed type int dword_B61DE4;
// B61E74: using guessed type int dword_B61E74;
// B61F04: using guessed type int dword_B61F04;
// B61F94: using guessed type int dword_B61F94;

//----- (007D61A0) --------------------------------------------------------
BOOL __cdecl NiTCBFloatKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1)
{
  BOOL result; // eax@1

  result = NiFloatKey::Equal(key0, key1);
  if ( (_BYTE)result )
    result = key1[2].m_fTime == key0[2].m_fTime
          && key1[3].m_fTime == key0[3].m_fTime
          && key1[4].m_fTime == key0[4].m_fTime
          && key1[5].m_fTime == key0[5].m_fTime
          && key1[6].m_fTime == key0[6].m_fTime;
  return result;
}

//----- (007D6220) --------------------------------------------------------
void __cdecl NiTCBFloatKey::Copy(NiAnimationKey *pkNewKey, NiAnimationKey *pkOrigKey)
{
  COERCE_NIANIMATIONKEY(pkNewKey->m_fTime) = COERCE_NIANIMATIONKEY(pkOrigKey->m_fTime);
  COERCE_NIANIMATIONKEY(pkNewKey[1].m_fTime) = pkOrigKey[1];
  COERCE_NIANIMATIONKEY(pkNewKey[2].m_fTime) = pkOrigKey[2];
  COERCE_NIANIMATIONKEY(pkNewKey[3].m_fTime) = pkOrigKey[3];
  COERCE_NIANIMATIONKEY(pkNewKey[4].m_fTime) = pkOrigKey[4];
  COERCE_NIANIMATIONKEY(pkNewKey[5].m_fTime) = pkOrigKey[5];
  COERCE_NIANIMATIONKEY(pkNewKey[6].m_fTime) = pkOrigKey[6];
}

//----- (007D6260) --------------------------------------------------------
void __cdecl NiTCBFloatKey::Interpolate(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult)
{
  *(float *)pResult = NiInterpScalar::TCB(fTime, pKey0[1].m_fTime, pKey0[6].m_fTime, pKey1[1].m_fTime, pKey1[5].m_fTime);
}

//----- (007D62B0) --------------------------------------------------------
NiAnimationKey *__cdecl NiTCBFloatKey::CreateArray(unsigned int uiNumKeys)
{
  unsigned int v1; // ecx@1
  void *v2; // eax@1
  NiAnimationKey *result; // eax@2

  v1 = 28 * uiNumKeys | -(28 * (unsigned __int64)uiNumKeys >> 32 != 0);
  v2 = operator new((v1 + 4) | -__CFADD__(v1, 4));
  if ( v2 )
  {
    *(_DWORD *)v2 = uiNumKeys;
    result = (NiAnimationKey *)((char *)v2 + 4);
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007D62F0) --------------------------------------------------------
void __cdecl NiTCBFloatKey::CalculateDVals(NiTCBFloatKey *result, float fValSub1, float fValPlus1, float fPreLen, float fNextLen)
{
  NiTCBFloatKey *v5; // eax@1
  float diff1; // ST08_4@1
  float diff2; // ST00_4@1
  float omb; // ST04_4@1
  double v9; // st6@1
  double v10; // st7@1
  double v11; // st5@1
  float homtomc; // [sp+14h] [bp+8h]@1
  float homtomca; // [sp+14h] [bp+8h]@1
  float homtomcb; // [sp+14h] [bp+8h]@1
  float homtomcc; // [sp+14h] [bp+8h]@1
  float opb; // [sp+18h] [bp+Ch]@1
  float homtopc; // [sp+1Ch] [bp+10h]@1
  float homtopca; // [sp+1Ch] [bp+10h]@1
  float homtopcb; // [sp+1Ch] [bp+10h]@1
  float fInv; // [sp+20h] [bp+14h]@1

  v5 = result;
  diff1 = result->m_fValue - fValSub1;
  diff2 = fValPlus1 - result->m_fValue;
  opb = result->m_fBias + 1.0;
  omb = 1.0 - result->m_fBias;
  homtopc = (1.0 - result->m_fTension) * 0.5;
  homtomc = result->m_fContinuity + 1.0;
  v9 = homtopc;
  homtopca = homtomc * homtopc;
  homtomca = 1.0 - v5->m_fContinuity;
  homtomcb = v9 * homtomca;
  v10 = fPreLen;
  fInv = 2.0 / (fPreLen + fNextLen);
  v11 = homtopca;
  homtopcb = homtopca * omb * diff2 + homtomcb * opb * diff1;
  v5->m_fDS = v10 * fInv * homtopcb;
  homtomcc = v11 * opb * diff1 + diff2 * (omb * homtomcb);
  v5->m_fDD = homtomcc * (fNextLen * fInv);
}

//----- (007D63D0) --------------------------------------------------------
void __cdecl NiTCBFloatKey::FillDerivedVals(NiAnimationKey *pkKeys, unsigned int uiNumKeys)
{
  unsigned int v2; // ebx@1
  int v3; // edx@2
  int v4; // esi@2
  int v5; // eax@3
  int v6; // edi@3
  float fPreLen; // ST10_4@4
  int v8; // ecx@4
  double v9; // st7@5
  float *v10; // eax@5
  float uiNumKeysa; // [sp+28h] [bp+Ch]@2
  unsigned int uiNumKeysb; // [sp+28h] [bp+Ch]@4
  float uiNumKeysc; // [sp+28h] [bp+Ch]@4
  float uiNumKeysd; // [sp+28h] [bp+Ch]@5

  v2 = uiNumKeys;
  if ( uiNumKeys >= 2 )
  {
    uiNumKeysa = pkKeys[1].m_fTime + pkKeys[1].m_fTime - pkKeys[8].m_fTime;
    NiTCBFloatKey::CalculateDVals((NiTCBFloatKey *)pkKeys, uiNumKeysa, pkKeys[8].m_fTime, 1.0, 1.0);
    v4 = v2 - 1;
    if ( v2 - 1 > 1 )
    {
      v5 = v3;
      v6 = v2 - 2;
      do
      {
        *(float *)&uiNumKeysb = *(float *)(v5 + 56) - *(float *)(v5 + 28);
        fPreLen = *(float *)&uiNumKeysb;
        uiNumKeysc = *(float *)(v5 + 28) - *(float *)v5;
        NiTCBFloatKey::CalculateDVals(
          (NiTCBFloatKey *)(v5 + 28),
          *(float *)(v5 + 4),
          *(float *)(v5 + 60),
          uiNumKeysc,
          fPreLen);
        --v6;
        v5 = v8;
      }
      while ( v6 );
    }
    v9 = *(float *)(v3 + 28 * v4 + 4);
    v10 = (float *)(v3 + 28 * (v2 - 2) + 4);
    uiNumKeysd = v9 + v9 - *v10;
    NiTCBFloatKey::CalculateDVals((NiTCBFloatKey *)(v3 + 28 * v4), *v10, uiNumKeysd, 1.0, 1.0);
  }
}

//----- (007D64B0) --------------------------------------------------------
char __cdecl NiTCBFloatKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys)
{
  NiAnimationKey *v3; // ebx@1
  unsigned int v4; // edi@2
  int v5; // ecx@2
  unsigned int *v6; // eax@2
  void *v7; // edi@3
  float f; // ST20_4@7
  unsigned int v9; // eax@7
  char result; // al@9
  unsigned int uiInsertAt; // [sp+24h] [bp-4h]@1

  v3 = *pkKeys;
  if ( NiAnimationKey::OkayToInsert(fTime, *pkKeys, *uiNumKeys, &uiInsertAt, 28) )
  {
    v4 = *uiNumKeys + 1;
    v5 = 28 * v4 | -(28 * (unsigned __int64)v4 >> 32 != 0);
    v6 = (unsigned int *)operator new((v5 + 4) | -__CFADD__(v5, 4));
    if ( v6 )
    {
      *v6 = v4;
      v7 = v6 + 1;
    }
    else
    {
      v7 = 0;
    }
    memcpy_s(v7, 28 * (*uiNumKeys + 1), v3, 28 * uiInsertAt);
    if ( *uiNumKeys > uiInsertAt )
      memcpy_s(
        (char *)v7 + 28 * uiInsertAt + 28,
        28 * (*uiNumKeys - uiInsertAt),
        &v3[7 * uiInsertAt],
        28 * (*uiNumKeys - uiInsertAt));
    f = NiFloatKey::GenInterpDefault(fTime, (NiFloatKey *)v3, TCBKEY, *uiNumKeys, 28);
    v9 = (unsigned int)v7 + 28 * uiInsertAt;
    *(float *)v9 = fTime;
    *(float *)(v9 + 4) = f;
    *(float *)(v9 + 8) = 0.0;
    *(float *)(v9 + 12) = 0.0;
    *(float *)(v9 + 16) = 0.0;
    ++*uiNumKeys;
    if ( v3 )
      operator delete(&v3[-1]);
    *pkKeys = (NiAnimationKey *)v7;
    NiTCBFloatKey::FillDerivedVals((NiAnimationKey *)v7, *uiNumKeys);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007D6600) --------------------------------------------------------
NiTCBFloatKey *__cdecl NiTCBFloatKey::CreateFromStream(NiStream *stream, unsigned int uiNumKeys)
{
  unsigned int v2; // ebx@1
  unsigned int v3; // ecx@1
  void *v4; // eax@1
  NiTCBFloatKey *result; // eax@2
  NiAnimationKey *v6; // esi@5
  NiBinaryStream *v7; // eax@6
  NiBinaryStream *v8; // ST28_4@6
  unsigned int (__cdecl *v9)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@6
  unsigned int (__cdecl *v10)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@6
  NiBinaryStream *v11; // ST14_4@6
  NiBinaryStream *v12; // eax@6
  NiBinaryStream *v13; // ST00_4@6
  unsigned int (__cdecl *v14)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@6
  int v15; // [sp+4h] [bp-4h]@6
  NiTCBFloatKey *pkTCBFloatKeys; // [sp+14h] [bp+Ch]@2

  v2 = uiNumKeys;
  v3 = 28 * uiNumKeys | -(28 * (unsigned __int64)uiNumKeys >> 32 != 0);
  v4 = operator new((v3 + 4) | -__CFADD__(v3, 4));
  if ( v4 )
  {
    *(_DWORD *)v4 = uiNumKeys;
    result = (NiTCBFloatKey *)((char *)v4 + 4);
    pkTCBFloatKeys = result;
  }
  else
  {
    pkTCBFloatKeys = 0;
    result = 0;
  }
  if ( v2 )
  {
    v6 = (NiAnimationKey *)&result->m_fContinuity;
    do
    {
      NiFloatKey::LoadBinary((NiFloatKey *)&v6[-3], stream);
      v7 = stream->m_pkIstr;
      v8 = v7;
      v9 = v7->m_pfnRead;
      v15 = 4;
      v9(v8, &v6[-1], 4u, (unsigned int *)&v15, 1u);
      v10 = stream->m_pkIstr->m_pfnRead;
      v11 = stream->m_pkIstr;
      v15 = 4;
      v10(v11, v6, 4u, (unsigned int *)&v15, 1u);
      v12 = stream->m_pkIstr;
      v13 = v12;
      v14 = v12->m_pfnRead;
      v15 = 4;
      v14(v13, &v6[1], 4u, (unsigned int *)&v15, 1u);
      v6 += 7;
      --v2;
    }
    while ( v2 );
    result = pkTCBFloatKeys;
  }
  return result;
}

//----- (007D66D0) --------------------------------------------------------
void __cdecl NiTCBFloatKey::SaveToStream(NiStream *stream, NiAnimationKey *pkKeys, unsigned int uiNumKeys)
{
  NiAnimationKey *v3; // esi@2
  NiBinaryStream *v4; // eax@3
  NiBinaryStream *v5; // ST28_4@3
  unsigned int (__cdecl *v6)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@3
  unsigned int (__cdecl *v7)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@3
  NiBinaryStream *v8; // ST14_4@3
  NiBinaryStream *v9; // eax@3
  NiBinaryStream *v10; // ST00_4@3
  unsigned int (__cdecl *v11)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@3

  if ( uiNumKeys )
  {
    v3 = pkKeys + 3;
    do
    {
      NiFloatKey::SaveBinary(stream, v3 - 3);
      v4 = stream->m_pkOstr;
      v5 = v4;
      v6 = v4->m_pfnWrite;
      pkKeys = (NiAnimationKey *)4;
      v6(v5, &v3[-1], 4u, (unsigned int *)&pkKeys, 1u);
      v7 = stream->m_pkOstr->m_pfnWrite;
      v8 = stream->m_pkOstr;
      pkKeys = (NiAnimationKey *)4;
      v7(v8, v3, 4u, (unsigned int *)&pkKeys, 1u);
      v9 = stream->m_pkOstr;
      v10 = v9;
      v11 = v9->m_pfnWrite;
      pkKeys = (NiAnimationKey *)4;
      v11(v10, &v3[1], 4u, (unsigned int *)&pkKeys, 1u);
      v3 += 7;
      --uiNumKeys;
    }
    while ( uiNumKeys );
  }
}

//----- (007D6760) --------------------------------------------------------
int __cdecl NiTCBFloatKey::RegisterLoader()
{
  int result; // eax@1

  result = 0;
  if ( !bRegistered_14 )
  {
    dword_B61ED4 = 0;
    dword_B61DB4 = 0;
    dword_B61D24 = 0;
    bRegistered_14 = 1;
    dword_B61F64 = (int)NiTCBFloatKey::CreateFromStream;
    dword_B61C04 = (int)NiTCBFloatKey::SaveToStream;
    dword_B61B74 = (int)NiTCBFloatKey::Copy;
    dword_B61AE4 = (int)NiTCBFloatKey::CreateArray;
    dword_B61A54 = (int)NiLinRotKey::DeleteArray;
    byte_B61903 = 28;
    dword_B61E44 = (int)NiTCBFloatKey::Interpolate;
    dword_B61C94 = (int)NiTCBFloatKey::Equal;
    dword_B61934 = (int)NiTCBFloatKey::FillDerivedVals;
    dword_B619C4 = (int)NiTCBFloatKey::Insert;
    result = 1;
  }
  return result;
}
// B61903: using guessed type char byte_B61903;
// B61934: using guessed type int dword_B61934;
// B619C4: using guessed type int dword_B619C4;
// B61A54: using guessed type int dword_B61A54;
// B61AE4: using guessed type int dword_B61AE4;
// B61B74: using guessed type int dword_B61B74;
// B61C04: using guessed type int dword_B61C04;
// B61C94: using guessed type int dword_B61C94;
// B61D24: using guessed type int dword_B61D24;
// B61DB4: using guessed type int dword_B61DB4;
// B61E44: using guessed type int dword_B61E44;
// B61ED4: using guessed type int dword_B61ED4;
// B61F64: using guessed type int dword_B61F64;

//----- (007D67F0) --------------------------------------------------------
void __cdecl NiStepBoolKey::Copy(NiAnimationKey *pkNewKey, NiAnimationKey *pkOrigKey)
{
  COERCE_NIANIMATIONKEY(pkNewKey->m_fTime) = COERCE_NIANIMATIONKEY(pkOrigKey->m_fTime);
  LOBYTE(pkNewKey[1].m_fTime) = LOBYTE(pkOrigKey[1].m_fTime);
}

//----- (007D6810) --------------------------------------------------------
bool __cdecl NiStepBoolKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1)
{
  return NiBoolKey::Equal(key0, key1);
}

//----- (007D6820) --------------------------------------------------------
void __cdecl NiStepBoolKey::Interpolate(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult)
{
  NiAnimationKey *v4; // eax@1

  v4 = pKey0;
  if ( fTime >= 1.0 )
    v4 = pKey1;
  *(_BYTE *)pResult = LOBYTE(v4[1].m_fTime);
}

//----- (007D6840) --------------------------------------------------------
void __cdecl NiStepBoolKey::SaveToStream(NiStream *stream, NiAnimationKey *pkKeys, unsigned int uiNumKeys)
{
  unsigned int v3; // edi@1
  NiAnimationKey *v4; // esi@2

  v3 = uiNumKeys;
  if ( uiNumKeys )
  {
    v4 = pkKeys;
    do
    {
      NiBoolKey::SaveBinary(stream, v4);
      v4 += 2;
      --v3;
    }
    while ( v3 );
  }
}

//----- (007D6870) --------------------------------------------------------
char __cdecl NiStepBoolKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys)
{
  unsigned int v3; // ecx@0
  NiAnimationKey *v4; // edi@1
  unsigned int v5; // ebx@2
  int v6; // ecx@2
  unsigned int *v7; // eax@2
  void *v8; // ebx@3
  bool v9; // al@7
  unsigned int v10; // ecx@7
  char result; // al@9
  unsigned int uiInsertAt; // [sp+20h] [bp-4h]@1

  uiInsertAt = v3;
  v4 = *pkKeys;
  if ( NiAnimationKey::OkayToInsert(fTime, *pkKeys, *uiNumKeys, &uiInsertAt, 8) )
  {
    v5 = *uiNumKeys + 1;
    v6 = 8 * v5 | -((unsigned __int64)v5 >> 29 != 0);
    v7 = (unsigned int *)operator new((v6 + 4) | -__CFADD__(v6, 4));
    if ( v7 )
    {
      *v7 = v5;
      v8 = v7 + 1;
    }
    else
    {
      v8 = 0;
    }
    memcpy_s(v8, 8 * *uiNumKeys + 8, v4, 8 * uiInsertAt);
    if ( *uiNumKeys > uiInsertAt )
      memcpy_s(
        (char *)v8 + 8 * uiInsertAt + 8,
        8 * (*uiNumKeys - uiInsertAt),
        &v4[2 * uiInsertAt],
        8 * (*uiNumKeys - uiInsertAt));
    v9 = NiBoolKey::GenInterpDefault(fTime, (NiBoolKey *)v4, STEPKEY, *uiNumKeys, 8);
    v10 = (unsigned int)v8 + 8 * uiInsertAt;
    *(float *)v10 = fTime;
    *(_BYTE *)(v10 + 4) = v9;
    ++*uiNumKeys;
    if ( v4 )
      operator delete(&v4[-1]);
    *pkKeys = (NiAnimationKey *)v8;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007D6970) --------------------------------------------------------
NiStepBoolKey *__cdecl NiStepBoolKey::CreateFromStream(NiStream *stream, unsigned int uiNumKeys)
{
  unsigned int v2; // edi@1
  unsigned int v3; // ecx@1
  void *v4; // eax@1
  NiStepBoolKey *result; // eax@2
  NiBoolKey *v6; // esi@5
  NiStepBoolKey *pkStepBoolKeys; // [sp+10h] [bp+Ch]@2

  v2 = uiNumKeys;
  v3 = 8 * uiNumKeys | -((unsigned __int64)uiNumKeys >> 29 != 0);
  v4 = operator new((v3 + 4) | -__CFADD__(v3, 4));
  if ( v4 )
  {
    *(_DWORD *)v4 = uiNumKeys;
    result = (NiStepBoolKey *)((char *)v4 + 4);
    pkStepBoolKeys = result;
  }
  else
  {
    pkStepBoolKeys = 0;
    result = 0;
  }
  if ( v2 )
  {
    v6 = (NiBoolKey *)result;
    do
    {
      NiBoolKey::LoadBinary(v6, stream);
      ++v6;
      --v2;
    }
    while ( v2 );
    result = pkStepBoolKeys;
  }
  return result;
}

//----- (007D69E0) --------------------------------------------------------
int __cdecl NiStepBoolKey::RegisterLoader()
{
  int result; // eax@1

  result = 0;
  if ( !bRegistered_15 )
  {
    dword_B61F54 = 0;
    dword_B61E34 = 0;
    dword_B61DA4 = 0;
    bRegistered_15 = 1;
    dword_B61FE4 = (int)NiStepBoolKey::CreateFromStream;
    dword_B61C84 = (int)NiStepBoolKey::SaveToStream;
    dword_B61BF4 = (int)NiStepBoolKey::Copy;
    dword_B61B64 = (int)NiStepFloatKey::CreateArray;
    dword_B61AD4 = (int)NiLinRotKey::DeleteArray;
    byte_B61923 = 8;
    dword_B61EC4 = (int)NiStepBoolKey::Interpolate;
    dword_B61D14 = (int)NiStepBoolKey::Equal;
    dword_B619B4 = (int)ITableBase<TextDataType3,TextData3>::BeforeTerminate;
    dword_B61A44 = (int)NiStepBoolKey::Insert;
    result = 1;
  }
  return result;
}
// B61923: using guessed type char byte_B61923;
// B619B4: using guessed type int dword_B619B4;
// B61A44: using guessed type int dword_B61A44;
// B61AD4: using guessed type int dword_B61AD4;
// B61B64: using guessed type int dword_B61B64;
// B61BF4: using guessed type int dword_B61BF4;
// B61C84: using guessed type int dword_B61C84;
// B61D14: using guessed type int dword_B61D14;
// B61DA4: using guessed type int dword_B61DA4;
// B61E34: using guessed type int dword_B61E34;
// B61EC4: using guessed type int dword_B61EC4;
// B61F54: using guessed type int dword_B61F54;
// B61FE4: using guessed type int dword_B61FE4;

//----- (007D6A70) --------------------------------------------------------
void __cdecl NiStepColorKey::Copy(NiAnimationKey *pkNewKey, NiAnimationKey *pkOrigKey)
{
  COERCE_NIANIMATIONKEY(pkNewKey->m_fTime) = COERCE_NIANIMATIONKEY(pkOrigKey->m_fTime);
  COERCE_NIANIMATIONKEY(pkNewKey[1].m_fTime) = pkOrigKey[1];
  COERCE_NIANIMATIONKEY(pkNewKey[2].m_fTime) = pkOrigKey[2];
  COERCE_NIANIMATIONKEY(pkNewKey[3].m_fTime) = pkOrigKey[3];
  COERCE_NIANIMATIONKEY(pkNewKey[4].m_fTime) = pkOrigKey[4];
}

//----- (007D6AA0) --------------------------------------------------------
BOOL __cdecl NiStepRotKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1)
{
  return NiColorKey::Equal(key0, key1);
}

//----- (007D6AB0) --------------------------------------------------------
void __cdecl NiStepRotKey::Interpolate(float fTime, NiAnimationKey *pkKey0, NiAnimationKey *pkKey1, void *pvResult)
{
  NiAnimationKey *v4; // eax@1

  v4 = pkKey0;
  if ( fTime >= 1.0 )
    v4 = pkKey1;
  *(NiAnimationKey *)pvResult = v4[1];
  *((NiAnimationKey *)pvResult + 1) = v4[2];
  *((NiAnimationKey *)pvResult + 2) = v4[3];
  *((NiAnimationKey *)pvResult + 3) = v4[4];
}

//----- (007D6AF0) --------------------------------------------------------
char __cdecl NiStepColorKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys)
{
  NiAnimationKey *v3; // ebx@1
  unsigned int v4; // edi@2
  int v5; // ecx@2
  unsigned int *v6; // eax@2
  int v7; // edi@3
  int v8; // ecx@3
  int v9; // eax@4
  void *v10; // edi@6
  unsigned int v11; // eax@10
  char result; // al@12
  NiColorA kColor; // [sp+20h] [bp-14h]@10
  unsigned int uiInsertAt; // [sp+30h] [bp-4h]@1

  v3 = *pkKeys;
  if ( NiAnimationKey::OkayToInsert(fTime, *pkKeys, *uiNumKeys, &uiInsertAt, 20) )
  {
    v4 = *uiNumKeys + 1;
    v5 = 20 * v4 | -(20 * (unsigned __int64)v4 >> 32 != 0);
    v6 = (unsigned int *)operator new((v5 + 4) | -__CFADD__(v5, 4));
    if ( v6 )
    {
      *v6 = v4;
      v7 = v4 - 1;
      v8 = (int)(v6 + 1);
      if ( v7 >= 0 )
      {
        v9 = (int)(v6 + 4);
        do
        {
          *(float *)(v9 - 8) = 0.0;
          v9 += 20;
          --v7;
          *(float *)(v9 - 24) = 0.0;
          *(float *)(v9 - 20) = 0.0;
          *(float *)(v9 - 16) = 0.0;
        }
        while ( v7 >= 0 );
      }
      v10 = (void *)v8;
    }
    else
    {
      v10 = 0;
    }
    memcpy_s(v10, 4 * (5 * *uiNumKeys + 5), v3, 20 * uiInsertAt);
    if ( *uiNumKeys > uiInsertAt )
      memcpy_s(
        (char *)v10 + 20 * uiInsertAt + 20,
        20 * (*uiNumKeys - uiInsertAt),
        &v3[5 * uiInsertAt],
        20 * (*uiNumKeys - uiInsertAt));
    NiColorKey::GenInterpDefault(&kColor, fTime, (NiColorKey *)v3, STEPKEY, *uiNumKeys, 20);
    v11 = (unsigned int)v10 + 20 * uiInsertAt;
    *(float *)v11 = fTime;
    *(NiColorA *)(v11 + 4) = kColor;
    ++*uiNumKeys;
    if ( v3 )
      operator delete(&v3[-1]);
    *pkKeys = (NiAnimationKey *)v10;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007D6C30) --------------------------------------------------------
int __cdecl NiStepColorKey::RegisterLoader()
{
  int result; // eax@1

  result = 0;
  if ( !bRegistered_16 )
  {
    dword_B61F24 = 0;
    dword_B61E04 = 0;
    dword_B61D74 = 0;
    dword_B61984 = 0;
    bRegistered_16 = 1;
    dword_B61FB4 = (int)NiStepColorKey::CreateFromStream;
    dword_B61C54 = (int)NiLinColorKey::SaveToStream;
    dword_B61BC4 = (int)NiStepColorKey::Copy;
    dword_B61B34 = (int)NiLinColorKey::CreateArray;
    dword_B61AA4 = (int)NiLinRotKey::DeleteArray;
    byte_B61917 = 20;
    dword_B61E94 = (int)NiStepRotKey::Interpolate;
    dword_B61CE4 = (int)NiStepRotKey::Equal;
    dword_B61A14 = (int)NiStepColorKey::Insert;
    result = 1;
  }
  return result;
}
// B61917: using guessed type char byte_B61917;
// B61984: using guessed type int dword_B61984;
// B61A14: using guessed type int dword_B61A14;
// B61AA4: using guessed type int dword_B61AA4;
// B61B34: using guessed type int dword_B61B34;
// B61BC4: using guessed type int dword_B61BC4;
// B61C54: using guessed type int dword_B61C54;
// B61CE4: using guessed type int dword_B61CE4;
// B61D74: using guessed type int dword_B61D74;
// B61E04: using guessed type int dword_B61E04;
// B61E94: using guessed type int dword_B61E94;
// B61F24: using guessed type int dword_B61F24;
// B61FB4: using guessed type int dword_B61FB4;

//----- (007D6CC0) --------------------------------------------------------
BOOL __cdecl NiLinFloatKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1)
{
  return NiFloatKey::Equal(key0, key1);
}

//----- (007D6CD0) --------------------------------------------------------
void __cdecl NiLinFloatKey::Copy(NiAnimationKey *pkNewKey, NiAnimationKey *pkOrigKey)
{
  COERCE_NIANIMATIONKEY(pkNewKey->m_fTime) = COERCE_NIANIMATIONKEY(pkOrigKey->m_fTime);
  COERCE_NIANIMATIONKEY(pkNewKey[1].m_fTime) = pkOrigKey[1];
}

//----- (007D6CF0) --------------------------------------------------------
void __cdecl NiStepFloatKey::Interpolate(float fTime, NiAnimationKey *pkKey0, NiAnimationKey *pkKey1, void *pvResult)
{
  if ( fTime >= 1.0 )
    *(float *)pvResult = pkKey1[1].m_fTime;
  else
    *(float *)pvResult = pkKey0[1].m_fTime;
}

//----- (007D6D20) --------------------------------------------------------
NiAnimationKey *__cdecl NiStepFloatKey::CreateArray(unsigned int uiNumKeys)
{
  unsigned int v1; // ecx@1
  void *v2; // eax@1
  NiAnimationKey *result; // eax@2

  v1 = 8 * uiNumKeys | -((unsigned __int64)uiNumKeys >> 29 != 0);
  v2 = operator new((v1 + 4) | -__CFADD__(v1, 4));
  if ( v2 )
  {
    *(_DWORD *)v2 = uiNumKeys;
    result = (NiAnimationKey *)((char *)v2 + 4);
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007D6D60) --------------------------------------------------------
char __cdecl NiStepFloatKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys)
{
  NiAnimationKey *v3; // edi@1
  unsigned int v4; // ebx@2
  int v5; // ecx@2
  unsigned int *v6; // eax@2
  void *v7; // ebx@3
  float f; // ST20_4@7
  unsigned int v9; // eax@7
  char result; // al@9
  unsigned int uiInsertAt; // [sp+24h] [bp-4h]@1

  v3 = *pkKeys;
  if ( NiAnimationKey::OkayToInsert(fTime, *pkKeys, *uiNumKeys, &uiInsertAt, 8) )
  {
    v4 = *uiNumKeys + 1;
    v5 = 8 * v4 | -((unsigned __int64)v4 >> 29 != 0);
    v6 = (unsigned int *)operator new((v5 + 4) | -__CFADD__(v5, 4));
    if ( v6 )
    {
      *v6 = v4;
      v7 = v6 + 1;
    }
    else
    {
      v7 = 0;
    }
    memcpy_s(v7, 8 * *uiNumKeys + 8, v3, 8 * uiInsertAt);
    if ( *uiNumKeys > uiInsertAt )
      memcpy_s(
        (char *)v7 + 8 * uiInsertAt + 8,
        8 * (*uiNumKeys - uiInsertAt),
        &v3[2 * uiInsertAt],
        8 * (*uiNumKeys - uiInsertAt));
    f = NiFloatKey::GenInterpDefault(fTime, (NiFloatKey *)v3, STEPKEY, *uiNumKeys, 8);
    v9 = (unsigned int)v7 + 8 * uiInsertAt;
    *(float *)v9 = fTime;
    *(float *)(v9 + 4) = f;
    ++*uiNumKeys;
    if ( v3 )
      operator delete(&v3[-1]);
    *pkKeys = (NiAnimationKey *)v7;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007D6E60) --------------------------------------------------------
int __cdecl NiStepFloatKey::RegisterLoader()
{
  int result; // eax@1

  result = 0;
  if ( !bRegistered_17 )
  {
    dword_B61EDC = 0;
    dword_B61DBC = 0;
    dword_B61D2C = 0;
    bRegistered_17 = 1;
    dword_B61F6C = (int)NiLinFloatKey::CreateFromStream;
    dword_B61C0C = (int)NiStepFloatKey::SaveToStream;
    dword_B61B7C = (int)NiLinFloatKey::Copy;
    dword_B61AEC = (int)NiStepFloatKey::CreateArray;
    dword_B61A5C = (int)NiLinRotKey::DeleteArray;
    byte_B61905 = 8;
    dword_B61E4C = (int)NiStepFloatKey::Interpolate;
    dword_B61C9C = (int)NiLinFloatKey::Equal;
    dword_B6193C = (int)ITableBase<TextDataType3,TextData3>::BeforeTerminate;
    dword_B619CC = (int)NiStepFloatKey::Insert;
    result = 1;
  }
  return result;
}
// B61905: using guessed type char byte_B61905;
// B6193C: using guessed type int dword_B6193C;
// B619CC: using guessed type int dword_B619CC;
// B61A5C: using guessed type int dword_B61A5C;
// B61AEC: using guessed type int dword_B61AEC;
// B61B7C: using guessed type int dword_B61B7C;
// B61C0C: using guessed type int dword_B61C0C;
// B61C9C: using guessed type int dword_B61C9C;
// B61D2C: using guessed type int dword_B61D2C;
// B61DBC: using guessed type int dword_B61DBC;
// B61E4C: using guessed type int dword_B61E4C;
// B61EDC: using guessed type int dword_B61EDC;
// B61F6C: using guessed type int dword_B61F6C;

//----- (007D6EF0) --------------------------------------------------------
double __cdecl NiBoolKey::ComputeMaxCurvature()
{
  return 0.0;
}

//----- (007D6F00) --------------------------------------------------------
BOOL __cdecl NiStepPosKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1)
{
  return NiPosKey::Equal(key0, key1);
}

//----- (007D6F10) --------------------------------------------------------
void __cdecl NiStepPosKey::Interpolate(float fTime, NiAnimationKey *pkKey0, NiAnimationKey *pkKey1, void *pvResult)
{
  NiAnimationKey *v4; // eax@1

  v4 = pkKey0;
  if ( fTime >= 1.0 )
    v4 = pkKey1;
  *(NiAnimationKey *)pvResult = v4[1];
  *((NiAnimationKey *)pvResult + 1) = v4[2];
  *((NiAnimationKey *)pvResult + 2) = v4[3];
}

//----- (007D6F40) --------------------------------------------------------
void __cdecl NiStepPosKey::InterpolateD1(float fTime, NiAnimationKey *pKey0, NiAnimationKey *pKey1, void *pResult)
{
  float v4; // ST00_4@1
  float v5; // ST04_4@1
  double v6; // st7@1
  float v7; // ST08_4@1

  v4 = pKey0[1].m_fTime - pKey1[1].m_fTime;
  v5 = pKey0[2].m_fTime - pKey1[2].m_fTime;
  v6 = pKey0[3].m_fTime - pKey1[3].m_fTime;
  *(float *)pResult = v4;
  *((float *)pResult + 1) = v5;
  v7 = v6;
  *((float *)pResult + 2) = v7;
}

//----- (007D6F80) --------------------------------------------------------
NiStepPosKey *__cdecl NiStepPosKey::CreateFromStream(NiStream *stream, unsigned int uiNumKeys)
{
  unsigned int v2; // edi@1
  unsigned int v3; // ecx@1
  void *v4; // eax@1
  NiStepPosKey *result; // eax@2
  NiPosKey *v6; // esi@5
  NiStepPosKey *pkStepPosKeys; // [sp+10h] [bp+Ch]@2

  v2 = uiNumKeys;
  v3 = 16 * uiNumKeys | -((unsigned __int64)uiNumKeys >> 28 != 0);
  v4 = operator new((v3 + 4) | -__CFADD__(v3, 4));
  if ( v4 )
  {
    *(_DWORD *)v4 = uiNumKeys;
    result = (NiStepPosKey *)((char *)v4 + 4);
    pkStepPosKeys = result;
  }
  else
  {
    pkStepPosKeys = 0;
    result = 0;
  }
  if ( v2 )
  {
    v6 = (NiPosKey *)result;
    do
    {
      NiPosKey::LoadBinary(v6, stream);
      ++v6;
      --v2;
    }
    while ( v2 );
    result = pkStepPosKeys;
  }
  return result;
}

//----- (007D6FF0) --------------------------------------------------------
void __cdecl NiLinPosKey::SaveToStream(NiStream *stream, NiAnimationKey *pkKeys, unsigned int uiNumKeys)
{
  unsigned int v3; // edi@1
  NiAnimationKey *v4; // esi@2

  v3 = uiNumKeys;
  if ( uiNumKeys )
  {
    v4 = pkKeys;
    do
    {
      NiPosKey::SaveBinary(stream, v4);
      v4 += 4;
      --v3;
    }
    while ( v3 );
  }
}

//----- (007D7020) --------------------------------------------------------
char __cdecl NiStepPosKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys)
{
  NiAnimationKey *v3; // edi@1
  unsigned int v4; // ebx@2
  int v5; // ecx@2
  unsigned int *v6; // eax@2
  void *v7; // ebx@3
  unsigned int v8; // eax@7
  char result; // al@9
  NiPoint3 kPt; // [sp+20h] [bp-10h]@7
  unsigned int uiInsertAt; // [sp+2Ch] [bp-4h]@1

  v3 = *pkKeys;
  if ( NiAnimationKey::OkayToInsert(fTime, *pkKeys, *uiNumKeys, &uiInsertAt, 16) )
  {
    v4 = *uiNumKeys + 1;
    v5 = 16 * v4 | -((unsigned __int64)v4 >> 28 != 0);
    v6 = (unsigned int *)operator new((v5 + 4) | -__CFADD__(v5, 4));
    if ( v6 )
    {
      *v6 = v4;
      v7 = v6 + 1;
    }
    else
    {
      v7 = 0;
    }
    memcpy_s(v7, 16 * (*uiNumKeys + 1), v3, 16 * uiInsertAt);
    if ( *uiNumKeys > uiInsertAt )
      memcpy_s(
        (char *)v7 + 16 * uiInsertAt + 16,
        16 * (*uiNumKeys - uiInsertAt),
        &v3[4 * uiInsertAt],
        16 * (*uiNumKeys - uiInsertAt));
    NiPosKey::GenInterpDefault(&kPt, fTime, (NiPosKey *)v3, STEPKEY, *uiNumKeys, 16);
    v8 = (unsigned int)v7 + 16 * uiInsertAt;
    *(float *)v8 = fTime;
    *(NiPoint3 *)(v8 + 4) = kPt;
    ++*uiNumKeys;
    if ( v3 )
      operator delete(&v3[-1]);
    *pkKeys = (NiAnimationKey *)v7;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007D7130) --------------------------------------------------------
int __cdecl NiStepPosKey::RegisterLoader()
{
  int result; // eax@2

  if ( bRegistered_18 )
  {
    result = 0;
  }
  else
  {
    result = 1;
    bRegistered_18 = 1;
    dword_B61F84 = (int)NiStepPosKey::CreateFromStream;
    dword_B61C24 = (int)NiLinPosKey::SaveToStream;
    dword_B61B94 = (int)NiLinPosKey::Copy;
    dword_B61B04 = (int)NiStepPosKey::CreateArray;
    dword_B61A74 = (int)NiLinRotKey::DeleteArray;
    byte_B6190B = 16;
    dword_B61EF4 = (int)NiBoolKey::ComputeMaxCurvature;
    dword_B61E64 = (int)NiStepPosKey::Interpolate;
    dword_B61DD4 = (int)NiStepPosKey::InterpolateD1;
    dword_B61D44 = (int)NiPosKey::Interpolate;
    dword_B61CB4 = (int)NiStepPosKey::Equal;
    dword_B61954 = (int)ITableBase<TextDataType3,TextData3>::BeforeTerminate;
    dword_B619E4 = (int)NiStepPosKey::Insert;
  }
  return result;
}
// B6190B: using guessed type char byte_B6190B;
// B61954: using guessed type int dword_B61954;
// B619E4: using guessed type int dword_B619E4;
// B61A74: using guessed type int dword_B61A74;
// B61B04: using guessed type int dword_B61B04;
// B61B94: using guessed type int dword_B61B94;
// B61C24: using guessed type int dword_B61C24;
// B61CB4: using guessed type int dword_B61CB4;
// B61D44: using guessed type int dword_B61D44;
// B61DD4: using guessed type int dword_B61DD4;
// B61E64: using guessed type int dword_B61E64;
// B61EF4: using guessed type int dword_B61EF4;
// B61F84: using guessed type int dword_B61F84;

//----- (007D71D0) --------------------------------------------------------
void __cdecl NiStepRotKey::FillDerivedVals(NiAnimationKey *pkKeys, unsigned int uiNumKeys, char ucSize)
{
  NiRotKey::FillDerivedVals(pkKeys, uiNumKeys, ucSize);
}

//----- (007D71E0) --------------------------------------------------------
NiAnimationKey *__cdecl NiLinRotKey::CreateArray(unsigned int uiNumKeys)
{
  unsigned int v1; // ecx@1
  unsigned int *v2; // eax@1
  signed int v3; // edi@2
  NiAnimationKey *v4; // ebx@2
  NiQuaternion *v5; // esi@3
  NiAnimationKey *result; // eax@5

  v1 = 20 * uiNumKeys | -(20 * (unsigned __int64)uiNumKeys >> 32 != 0);
  v2 = (unsigned int *)operator new((v1 + 4) | -__CFADD__(v1, 4));
  if ( v2 )
  {
    v3 = uiNumKeys - 1;
    *v2 = uiNumKeys;
    v4 = (NiAnimationKey *)(v2 + 1);
    if ( ((uiNumKeys - 1) & 0x80000000) == 0 )
    {
      v5 = (NiQuaternion *)(v2 + 2);
      do
      {
        NiQuaternion::NiQuaternion(v5, 0.0, 0.0, 0.0, 0.0);
        v5 = (NiQuaternion *)((char *)v5 + 20);
        --v3;
      }
      while ( v3 >= 0 );
    }
    result = v4;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007D7250) --------------------------------------------------------
NiStepRotKey *__cdecl NiLinRotKey::CreateFromStream(NiStream *stream, unsigned int uiNumKeys)
{
  unsigned int v2; // ebx@1
  unsigned int v3; // ecx@1
  void *v4; // eax@1
  NiStepRotKey *result; // eax@2
  signed int v6; // edi@2
  NiQuaternion *v7; // esi@3
  NiRotKey *v8; // esi@9
  NiStepRotKey *pkStepRotKeys; // [sp+28h] [bp+Ch]@2
  NiStepRotKey *pkStepRotKeysa; // [sp+28h] [bp+Ch]@6

  v2 = uiNumKeys;
  v3 = 20 * uiNumKeys | -(20 * (unsigned __int64)uiNumKeys >> 32 != 0);
  v4 = operator new((v3 + 4) | -__CFADD__(v3, 4));
  if ( v4 )
  {
    *(_DWORD *)v4 = uiNumKeys;
    result = (NiStepRotKey *)((char *)v4 + 4);
    v6 = uiNumKeys - 1;
    pkStepRotKeys = result;
    if ( ((v2 - 1) & 0x80000000) == 0 )
    {
      v7 = &result->m_quat;
      do
      {
        NiQuaternion::NiQuaternion(v7, 0.0, 0.0, 0.0, 0.0);
        v7 = (NiQuaternion *)((char *)v7 + 20);
        --v6;
      }
      while ( v6 >= 0 );
      result = pkStepRotKeys;
    }
    pkStepRotKeysa = result;
  }
  else
  {
    pkStepRotKeysa = 0;
    result = 0;
  }
  if ( v2 )
  {
    v8 = (NiRotKey *)result;
    do
    {
      NiColorKey::LoadBinary(v8, stream);
      ++v8;
      --v2;
    }
    while ( v2 );
    result = pkStepRotKeysa;
  }
  return result;
}

//----- (007D72F0) --------------------------------------------------------
void __cdecl NiLinRotKey::SaveToStream(NiStream *stream, NiAnimationKey *pkKeys, unsigned int uiNumKeys)
{
  unsigned int v3; // edi@1
  NiAnimationKey *v4; // esi@2

  v3 = uiNumKeys;
  if ( uiNumKeys )
  {
    v4 = pkKeys;
    do
    {
      NiRotKey::SaveBinary(stream, v4);
      v4 += 5;
      --v3;
    }
    while ( v3 );
  }
}

//----- (007D7320) --------------------------------------------------------
char __cdecl NiStepRotKey::Insert(float fTime, NiAnimationKey **pkKeys, unsigned int *uiNumKeys)
{
  NiAnimationKey *v3; // ebx@1
  unsigned int v4; // edi@2
  int v5; // ecx@2
  unsigned int *v6; // eax@2
  int v7; // eax@3
  NiQuaternion *v8; // edi@4
  void *v9; // edi@7
  unsigned int v10; // eax@11
  char result; // al@13
  NiQuaternion kQ; // [sp+20h] [bp-1Ch]@11
  int v13; // [sp+30h] [bp-Ch]@3
  int v14; // [sp+34h] [bp-8h]@3
  unsigned int uiInsertAt; // [sp+38h] [bp-4h]@1

  v3 = *pkKeys;
  if ( NiAnimationKey::OkayToInsert(fTime, *pkKeys, *uiNumKeys, &uiInsertAt, 20) )
  {
    v4 = *uiNumKeys + 1;
    v5 = 20 * v4 | -(20 * (unsigned __int64)v4 >> 32 != 0);
    v6 = (unsigned int *)operator new((v5 + 4) | -__CFADD__(v5, 4));
    if ( v6 )
    {
      *v6 = v4;
      v7 = (int)(v6 + 1);
      v13 = v7;
      v14 = v4 - 1;
      if ( ((v4 - 1) & 0x80000000) == 0 )
      {
        v8 = (NiQuaternion *)(v7 + 4);
        do
        {
          NiQuaternion::NiQuaternion(v8, 0.0, 0.0, 0.0, 0.0);
          v8 = (NiQuaternion *)((char *)v8 + 20);
          --v14;
        }
        while ( v14 >= 0 );
        v7 = v13;
      }
      v9 = (void *)v7;
    }
    else
    {
      v9 = 0;
    }
    memcpy_s(v9, 4 * (5 * *uiNumKeys + 5), v3, 20 * uiInsertAt);
    if ( *uiNumKeys > uiInsertAt )
      memcpy_s(
        (char *)v9 + 20 * uiInsertAt + 20,
        20 * (*uiNumKeys - uiInsertAt),
        &v3[5 * uiInsertAt],
        20 * (*uiNumKeys - uiInsertAt));
    NiRotKey::GenInterpDefault(&kQ, fTime, (NiRotKey *)v3, STEPKEY, *uiNumKeys, 20);
    v10 = (unsigned int)v9 + 20 * uiInsertAt;
    *(float *)v10 = fTime;
    *(NiQuaternion *)(v10 + 4) = kQ;
    ++*uiNumKeys;
    if ( v3 )
      operator delete(&v3[-1]);
    *pkKeys = (NiAnimationKey *)v9;
    NiRotKey::FillDerivedVals((NiAnimationKey *)v9, *uiNumKeys, 20);
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007D7480) --------------------------------------------------------
int __cdecl NiStepRotKey::RegisterLoader()
{
  int result; // eax@1

  result = 0;
  if ( !bRegistered_19 )
  {
    dword_B61F0C = 0;
    dword_B61DEC = 0;
    dword_B61D5C = 0;
    bRegistered_19 = 1;
    dword_B61F9C = (int)NiLinRotKey::CreateFromStream;
    dword_B61C3C = (int)NiLinRotKey::SaveToStream;
    dword_B61BAC = (int)NiStepColorKey::Copy;
    dword_B61B1C = (int)NiLinRotKey::CreateArray;
    dword_B61A8C = (int)NiLinRotKey::DeleteArray;
    byte_B61911 = 20;
    dword_B61E7C = (int)NiStepRotKey::Interpolate;
    dword_B61CCC = (int)NiStepRotKey::Equal;
    dword_B6196C = (int)NiStepRotKey::FillDerivedVals;
    dword_B619FC = (int)NiStepRotKey::Insert;
    result = 1;
  }
  return result;
}
// B61911: using guessed type char byte_B61911;
// B6196C: using guessed type int dword_B6196C;
// B619FC: using guessed type int dword_B619FC;
// B61A8C: using guessed type int dword_B61A8C;
// B61B1C: using guessed type int dword_B61B1C;
// B61BAC: using guessed type int dword_B61BAC;
// B61C3C: using guessed type int dword_B61C3C;
// B61CCC: using guessed type int dword_B61CCC;
// B61D5C: using guessed type int dword_B61D5C;
// B61DEC: using guessed type int dword_B61DEC;
// B61E7C: using guessed type int dword_B61E7C;
// B61F0C: using guessed type int dword_B61F0C;
// B61F9C: using guessed type int dword_B61F9C;

//----- (007D7510) --------------------------------------------------------
void __cdecl NiAnimationSDM::Init()
{
  if ( !NiAnimationSDM::ms_bInitialized )
  {
    NiAnimationSDM::ms_bInitialized = 1;
    NiStream::RegisterLoader("NiAlphaController", NiAlphaController::CreateObject);
    NiStream::RegisterLoader(
      "NiBlendAccumTransformInterpolator",
      (NiObject *(__cdecl *)())NiBlendAccumTransformInterpolator::CreateObject);
    NiStream::RegisterLoader("NiBlendBoolInterpolator", (NiObject *(__cdecl *)())NiBlendBoolInterpolator::CreateObject);
    NiStream::RegisterLoader(
      "NiBlendColorInterpolator",
      (NiObject *(__cdecl *)())NiBlendColorInterpolator::CreateObject);
    NiStream::RegisterLoader(
      "NiBlendFloatInterpolator",
      (NiObject *(__cdecl *)())NiBlendFloatInterpolator::CreateObject);
    NiStream::RegisterLoader(
      "NiBlendPoint3Interpolator",
      (NiObject *(__cdecl *)())NiBlendPoint3Interpolator::CreateObject);
    NiStream::RegisterLoader(
      "NiBlendQuaternionInterpolator",
      (NiObject *(__cdecl *)())NiBlendQuaternionInterpolator::CreateObject);
    NiStream::RegisterLoader("NiBlendTransformInterpolator", NiBlendTransformInterpolator::CreateObject);
    NiStream::RegisterLoader("NiBoneLODController", (NiObject *(__cdecl *)())NiBoneLODController::CreateObject);
    NiStream::RegisterLoader("NiBoolData", NiBoolData::CreateObject);
    NiStream::RegisterLoader("NiBoolInterpolator", (NiObject *(__cdecl *)())NiBoolInterpolator::CreateObject);
    NiStream::RegisterLoader(
      "NiBoolTimelineInterpolator",
      (NiObject *(__cdecl *)())NiBoolTimelineInterpolator::CreateObject);
    NiStream::RegisterLoader("NiBSplineBasisData", NiBSplineBasisData::CreateObject);
    NiStream::RegisterLoader("NiBSplineData", NiBSplineData::CreateObject);
    NiStream::RegisterLoader(
      "NiBSplineColorInterpolator",
      (NiObject *(__cdecl *)())NiBSplineColorInterpolator::CreateObject);
    NiStream::RegisterLoader(
      "NiBSplineCompColorInterpolator",
      (NiObject *(__cdecl *)())NiBSplineCompColorInterpolator::CreateObject);
    NiStream::RegisterLoader(
      "NiBSplineCompFloatInterpolator",
      (NiObject *(__cdecl *)())NiBSplineCompFloatInterpolator::CreateObject);
    NiStream::RegisterLoader(
      "NiBSplineCompPoint3Interpolator",
      (NiObject *(__cdecl *)())NiBSplineCompPoint3Interpolator::CreateObject);
    NiStream::RegisterLoader(
      "NiBSplineCompTransformInterpolator",
      (NiObject *(__cdecl *)())NiBSplineCompTransformInterpolator::CreateObject);
    NiStream::RegisterLoader("NiBSplineFloatInterpolator", NiBSplineFloatInterpolator::CreateObject);
    NiStream::RegisterLoader("NiBSplinePoint3Interpolator", NiBSplinePoint3Interpolator::CreateObject);
    NiStream::RegisterLoader(
      "NiBSplineTransformInterpolator",
      (NiObject *(__cdecl *)())NiBSplineTransformInterpolator::CreateObject);
    NiStream::RegisterLoader("NiColorData", NiColorData::CreateObject);
    NiStream::RegisterLoader("NiColorExtraDataController", NiColorExtraDataController::CreateObject);
    NiStream::RegisterLoader("NiColorInterpolator", (NiObject *(__cdecl *)())NiColorInterpolator::CreateObject);
    NiStream::RegisterLoader("NiControllerManager", (NiObject *(__cdecl *)())NiControllerManager::CreateObject);
    NiStream::RegisterLoader("NiControllerSequence", (NiObject *(__cdecl *)())NiControllerSequence::CreateObject);
    NiStream::RegisterLoader("NiFlipController", (NiObject *(__cdecl *)())NiFlipController::CreateObject);
    NiStream::RegisterLoader("NiFloatData", NiFloatData::CreateObject);
    NiStream::RegisterLoader("NiFloatExtraDataController", NiFloatExtraDataController::CreateObject);
    NiStream::RegisterLoader("NiFloatInterpolator", (NiObject *(__cdecl *)())NiFloatInterpolator::CreateObject);
    NiStream::RegisterLoader("NiFloatsExtraDataController", NiFloatsExtraDataController::CreateObject);
    NiStream::RegisterLoader("NiFloatsExtraDataPoint3Controller", NiFloatsExtraDataPoint3Controller::CreateObject);
    NiStream::RegisterLoader("NiGeomMorpherController", (NiObject *(__cdecl *)())NiGeomMorpherController::CreateObject);
    NiStream::RegisterLoader("NiKeyframeController", NiTransformController::CreateObject);
    NiStream::RegisterLoader("NiKeyframeData", NiTransformData::CreateObject);
    NiStream::RegisterLoader("NiKeyframeManager", (NiObject *(__cdecl *)())NiKeyframeManager::CreateObject);
    NiStream::RegisterLoader("NiLightColorController", (NiObject *(__cdecl *)())NiLightColorController::CreateObject);
    NiStream::RegisterLoader("NiLightDimmerController", NiLightDimmerController::CreateObject);
    NiStream::RegisterLoader("NiLookAtController", (NiObject *(__cdecl *)())NiLookAtController::CreateObject);
    NiStream::RegisterLoader("NiLookAtInterpolator", (NiObject *(__cdecl *)())NiLookAtInterpolator::CreateObject);
    NiStream::RegisterLoader(
      "NiMaterialColorController",
      (NiObject *(__cdecl *)())NiMaterialColorController::CreateObject);
    NiStream::RegisterLoader("NiMorphData", NiMorphData::CreateObject);
    NiStream::RegisterLoader(
      "NiMultiTargetTransformController",
      (NiObject *(__cdecl *)())NiMultiTargetTransformController::CreateObject);
    NiStream::RegisterLoader("NiPathController", (NiObject *(__cdecl *)())NiPathController::CreateObject);
    NiStream::RegisterLoader("NiPathInterpolator", (NiObject *(__cdecl *)())NiPathInterpolator::CreateObject);
    NiStream::RegisterLoader("NiPoint3Interpolator", (NiObject *(__cdecl *)())NiPoint3Interpolator::CreateObject);
    NiStream::RegisterLoader("NiPosData", NiPosData::CreateObject);
    NiStream::RegisterLoader(
      "NiQuaternionInterpolator",
      (NiObject *(__cdecl *)())NiQuaternionInterpolator::CreateObject);
    NiStream::RegisterLoader("NiRollController", NiRollController::CreateObject);
    NiStream::RegisterLoader("NiRotData", NiRotData::CreateObject);
    NiStream::RegisterLoader("NiSequence", (NiObject *(__cdecl *)())NiSequence::CreateObject);
    NiStream::RegisterLoader("NiSequenceStreamHelper", NiSequenceStreamHelper::CreateObject);
    NiStream::RegisterLoader("NiStringPalette", NiStringPalette::CreateObject);
    NiStream::RegisterLoader("NiTextKeyExtraData", NiTextKeyExtraData::CreateObject);
    NiStream::RegisterLoader(
      "NiTextureTransformController",
      (NiObject *(__cdecl *)())NiTextureTransformController::CreateObject);
    NiStream::RegisterLoader("NiTransformController", NiTransformController::CreateObject);
    NiStream::RegisterLoader("NiTransformData", NiTransformData::CreateObject);
    NiStream::RegisterLoader("NiTransformInterpolator", (NiObject *(__cdecl *)())NiTransformInterpolator::CreateObject);
    NiStream::RegisterLoader("NiUVController", (NiObject *(__cdecl *)())NiUVController::CreateObject);
    NiStream::RegisterLoader("NiUVData", NiUVData::CreateObject);
    NiStream::RegisterLoader("NiVisController", NiVisController::CreateObject);
    NiStream::RegisterLoader("NiVisData", NiBoolData::CreateObject);
    NiStream::RegisterPostProcessFunction(NiOldAnimationConverter::Convert);
  }
}
// B618B9: using guessed type bool NiAnimationSDM::ms_bInitialized;

//----- (007D7900) --------------------------------------------------------
NiTAbstractPoolAllocator<NiActorManager::TimelineData>::AllocNode **NiTAbstractPoolAllocator<NiActorManager::TimelineData>::_SDMShutdown()
{
  NiTAbstractPoolAllocator<NiActorManager::TimelineData>::AllocNode **result; // eax@1
  int v1; // ebx@2
  NiTAbstractPoolAllocator<NiActorManager::TimelineData>::AllocNode *v2; // esi@2
  NiTAbstractPoolAllocator<NiActorManager::TimelineData>::AllocNode **v3; // ecx@2
  int v4; // edx@2
  int v5; // ebx@2
  int v6; // eax@2
  int *v7; // edi@3
  int v8; // esi@4
  int v9; // esi@9
  int v10; // [sp+4h] [bp-8h]@2
  NiTAbstractPoolAllocator<NiActorManager::TimelineData>::AllocNode *pkNext; // [sp+8h] [bp-4h]@2

  result = (NiTAbstractPoolAllocator<NiActorManager::TimelineData>::AllocNode **)NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkBlockHeader;
  if ( NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkBlockHeader )
  {
    do
    {
      v1 = (int)*(result - 1);
      v2 = *result;
      v3 = result - 1;
      v4 = 7 * v1;
      v5 = v1 - 1;
      pkNext = *result;
      v10 = (int)(result - 1);
      v6 = (int)&result[v4];
      if ( v5 >= 0 )
      {
        v7 = (int *)(v6 + 20);
        do
        {
          v8 = *(v7 - 7);
          v7 -= 7;
          if ( v8 )
          {
            if ( !InterlockedDecrement((volatile LONG *)(v8 + 4)) && v8 )
              (**(void (__thiscall ***)(_DWORD, _DWORD))v8)(v8, 1);
            *v7 = 0;
          }
          v9 = *v7;
          if ( *v7 && !InterlockedDecrement((volatile LONG *)(v9 + 4)) && v9 )
            (**(void (__thiscall ***)(_DWORD, _DWORD))v9)(v9, 1);
          --v5;
        }
        while ( v5 >= 0 );
        v2 = pkNext;
        v3 = (NiTAbstractPoolAllocator<NiActorManager::TimelineData>::AllocNode **)v10;
      }
      operator delete(v3);
      result = (NiTAbstractPoolAllocator<NiActorManager::TimelineData>::AllocNode **)v2;
    }
    while ( v2 );
  }
  NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkFreeMem = 0;
  NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkBlockHeader = 0;
  return result;
}
// B61844: using guessed type int NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkBlockHeader;
// B61848: using guessed type int NiTAbstractPoolAllocator<NiActorManager::TimelineData>::ms_pkFreeMem;

//----- (007D79C0) --------------------------------------------------------
void __cdecl NiAnimationSDM::Shutdown()
{
  if ( NiAnimationSDM::ms_bInitialized )
  {
    NiAnimationSDM::ms_bInitialized = 0;
    NiStream::UnregisterLoader("NiAlphaController");
    NiStream::UnregisterLoader("NiBlendAccumTransformInterpolator");
    NiStream::UnregisterLoader("NiBlendBoolInterpolator");
    NiStream::UnregisterLoader("NiBlendColorInterpolator");
    NiStream::UnregisterLoader("NiBlendFloatInterpolator");
    NiStream::UnregisterLoader("NiBlendPoint3Interpolator");
    NiStream::UnregisterLoader("NiBlendQuaternionInterpolator");
    NiStream::UnregisterLoader("NiBlendTransformInterpolator");
    NiStream::UnregisterLoader("NiBoneLODController");
    NiStream::UnregisterLoader("NiBoolData");
    NiStream::UnregisterLoader("NiBoolInterpolator");
    NiStream::UnregisterLoader("NiBoolTimelineInterpolator");
    NiStream::UnregisterLoader("NiBSplineBasisData");
    NiStream::UnregisterLoader("NiBSplineData");
    NiStream::UnregisterLoader("NiBSplineColorInterpolator");
    NiStream::UnregisterLoader("NiBSplineCompColorInterpolator");
    NiStream::UnregisterLoader("NiBSplineCompFloatInterpolator");
    NiStream::UnregisterLoader("NiBSplineCompPoint3Interpolator");
    NiStream::UnregisterLoader("NiBSplineCompTransformInterpolator");
    NiStream::UnregisterLoader("NiBSplineFloatInterpolator");
    NiStream::UnregisterLoader("NiBSplinePoint3Interpolator");
    NiStream::UnregisterLoader("NiBSplineTransformInterpolator");
    NiStream::UnregisterLoader("NiColorData");
    NiStream::UnregisterLoader("NiColorExtraDataController");
    NiStream::UnregisterLoader("NiColorInterpolator");
    NiStream::UnregisterLoader("NiControllerManager");
    NiStream::UnregisterLoader("NiControllerSequence");
    NiStream::UnregisterLoader("NiFlipController");
    NiStream::UnregisterLoader("NiFloatData");
    NiStream::UnregisterLoader("NiFloatExtraDataController");
    NiStream::UnregisterLoader("NiFloatInterpolator");
    NiStream::UnregisterLoader("NiFloatsExtraDataController");
    NiStream::UnregisterLoader("NiFloatsExtraDataPoint3Controller");
    NiStream::UnregisterLoader("NiGeomMorpherController");
    NiStream::UnregisterLoader("NiKeyframeController");
    NiStream::UnregisterLoader("NiKeyframeData");
    NiStream::UnregisterLoader("NiKeyframeManager");
    NiStream::UnregisterLoader("NiLightColorController");
    NiStream::UnregisterLoader("NiLightDimmerController");
    NiStream::UnregisterLoader("NiLookAtController");
    NiStream::UnregisterLoader("NiLookAtInterpolator");
    NiStream::UnregisterLoader("NiMaterialColorController");
    NiStream::UnregisterLoader("NiMorphData");
    NiStream::UnregisterLoader("NiMultiTargetTransformController");
    NiStream::UnregisterLoader("NiPathController");
    NiStream::UnregisterLoader("NiPathInterpolator");
    NiStream::UnregisterLoader("NiPoint3Interpolator");
    NiStream::UnregisterLoader("NiPosData");
    NiStream::UnregisterLoader("NiQuaternionInterpolator");
    NiStream::UnregisterLoader("NiRollController");
    NiStream::UnregisterLoader("NiRotData");
    NiStream::UnregisterLoader("NiSequence");
    NiStream::UnregisterLoader("NiSequenceStreamHelper");
    NiStream::UnregisterLoader("NiStringPalette");
    NiStream::UnregisterLoader("NiTextKeyExtraData");
    NiStream::UnregisterLoader("NiTextureTransformController");
    NiStream::UnregisterLoader("NiTransformController");
    NiStream::UnregisterLoader("NiTransformData");
    NiStream::UnregisterLoader("NiTransformInterpolator");
    NiStream::UnregisterLoader("NiUVController");
    NiStream::UnregisterLoader("NiUVData");
    NiStream::UnregisterLoader("NiVisController");
    NiStream::UnregisterLoader("NiVisData");
    NiStream::UnregisterPostProcessFunction(NiOldAnimationConverter::Convert);
    NiTAbstractPoolAllocator<NiActorManager::TimelineData>::_SDMShutdown();
  }
}
// B618B9: using guessed type bool NiAnimationSDM::ms_bInitialized;

//----- (007D7C70) --------------------------------------------------------
void NiAnimationSDM::NiAnimationSDM()
{
  int v1; // ecx@1

  v1 = siCounter++;
  if ( !v1 )
    NiStaticDataManager::AddLibrary(NiAnimationSDM::Init, NiAnimationSDM::Shutdown);
}

//----- (007D7CA0) --------------------------------------------------------
int __thiscall NiTextKey::operator!=(NiTextKey *this, NiTextKey *key)
{
  int result; // eax@2

  if ( key->m_fTime != this->m_fTime || (result = strcmp(this->m_pText, key->m_pText)) != 0 )
    result = 1;
  return result;
}

//----- (007D7D00) --------------------------------------------------------
NiRTTI *NiTextKeyExtraData::GetRTTI()
{
  return &NiTextKeyExtraData::m_RTTI;
}

//----- (007D7D10) --------------------------------------------------------
NiObject *__cdecl NiTextKeyExtraData::CreateObject()
{
  NiExtraData *v0; // eax@1
  NiObject *v1; // esi@1
  NiObject *result; // eax@2

  v0 = (NiExtraData *)operator new(0x14u);
  v1 = (NiObject *)v0;
  if ( v0 )
  {
    NiExtraData::NiExtraData(v0);
    v1->vfptr = (NiRefObjectVtbl *)&NiTextKeyExtraData::`vftable';
    v1[1].m_uiRefCount = 0;
    v1[2].vfptr = 0;
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E5654: using guessed type int (__stdcall *NiTextKeyExtraData::`vftable')(char);

//----- (007D7D50) --------------------------------------------------------
char __thiscall NiTextKeyExtraData::IsEqual(NiTextKeyExtraData *this, NiObject *pObject)
{
  NiTextKeyExtraData *v2; // esi@1
  unsigned int v4; // ebx@4
  unsigned int v5; // edi@5
  NiTextKey *v6; // esi@6
  char *v7; // eax@6
  NiObject *pObjecta; // [sp+10h] [bp+8h]@6

  v2 = this;
  if ( !pObject || !NiObject::IsEqual((NiObject *)&this->vfptr, pObject) )
    return 0;
  v4 = v2->m_uiNumKeys;
  if ( v4 == pObject[1].m_uiRefCount )
  {
    v5 = 0;
    if ( !v4 )
      return 1;
    v6 = v2->m_pKeys;
    v7 = (char *)((char *)pObject[2].vfptr - (char *)v6);
    pObjecta = (NiObject *)((char *)pObject[2].vfptr - (char *)v6);
    while ( !(unsigned __int8)NiTextKey::operator!=(v6, (NiTextKey *)&v7[(_DWORD)v6]) )
    {
      ++v5;
      ++v6;
      if ( v5 >= v4 )
        return 1;
      v7 = (char *)pObjecta;
    }
  }
  return 0;
}

//----- (007D7DC0) --------------------------------------------------------
void __thiscall NiTextKeyExtraData::CopyMembers(NiTextKeyExtraData *this, NiTextKeyExtraData *pDest, NiCloningProcess *kCloning)
{
  NiTextKeyExtraData *v3; // esi@1
  unsigned int v4; // edi@3
  int v5; // ecx@3
  unsigned int *v6; // eax@3
  int v7; // ecx@4
  int v8; // edx@4
  _DWORD *v9; // eax@5
  NiTextKey *v10; // eax@7
  unsigned int v11; // edi@9

  v3 = this;
  NiExtraData::CopyMembers((NiExtraData *)&this->vfptr, (NiExtraData *)&pDest->vfptr, kCloning);
  pDest->m_uiNumKeys = v3->m_uiNumKeys;
  if ( v3->m_uiNumKeys
    && ((int (__thiscall *)(NiTextKeyExtraData *))v3->vfptr[1].__vecDelDtor)(v3) == (_DWORD)&NiTextKeyExtraData::m_RTTI )
  {
    v4 = v3->m_uiNumKeys;
    v5 = 8 * v3->m_uiNumKeys | -((unsigned __int64)v3->m_uiNumKeys >> 29 != 0);
    v6 = (unsigned int *)operator new((v5 + 4) | -__CFADD__(v5, 4));
    if ( v6 )
    {
      v7 = v4 - 1;
      *v6 = v4;
      v8 = (int)(v6 + 1);
      if ( ((v4 - 1) & 0x80000000) == 0 )
      {
        v9 = v6 + 2;
        do
        {
          *v9 = 0;
          v9 += 2;
          --v7;
        }
        while ( v7 >= 0 );
      }
      v10 = (NiTextKey *)v8;
    }
    else
    {
      v10 = 0;
    }
    v11 = 0;
    pDest->m_pKeys = v10;
    if ( v3->m_uiNumKeys )
    {
      do
      {
        pDest->m_pKeys[v11].m_fTime = v3->m_pKeys[v11].m_fTime;
        NiTextKey::SetText(&pDest->m_pKeys[v11], v3->m_pKeys[v11].m_pText);
        ++v11;
      }
      while ( v11 < v3->m_uiNumKeys );
    }
  }
  else
  {
    pDest->m_pKeys = 0;
  }
}

//----- (007D7EA0) --------------------------------------------------------
void __thiscall NiTextKeyExtraData::SaveBinary(NiTextKeyExtraData *this, NiStream *stream)
{
  NiTextKeyExtraData *v2; // edi@1
  unsigned int (__cdecl *v3)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@1
  NiBinaryStream *v4; // ST00_4@1
  unsigned int v5; // esi@1
  int v6; // [sp+Ch] [bp-4h]@1

  v2 = this;
  NiExtraData::SaveBinary((NiExtraData *)&this->vfptr, stream);
  v3 = stream->m_pkOstr->m_pfnWrite;
  v4 = stream->m_pkOstr;
  v6 = 4;
  v3(v4, &v2->m_uiNumKeys, 4u, (unsigned int *)&v6, 1u);
  v5 = 0;
  if ( v2->m_uiNumKeys )
  {
    do
      NiTextKey::SaveBinary(&v2->m_pKeys[v5++], stream);
    while ( v5 < v2->m_uiNumKeys );
  }
}

//----- (007D7F00) --------------------------------------------------------
NiTextKeyExtraData *__thiscall NiTextKeyExtraData::CreateClone(NiTextKeyExtraData *this, NiCloningProcess *kCloning)
{
  NiTextKeyExtraData *v2; // ebx@1
  NiExtraData *v3; // eax@1
  NiTextKeyExtraData *v4; // esi@1
  NiTextKeyExtraData *result; // eax@2

  v2 = this;
  v3 = (NiExtraData *)operator new(0x14u);
  v4 = (NiTextKeyExtraData *)v3;
  if ( v3 )
  {
    NiExtraData::NiExtraData(v3);
    v4->vfptr = (NiRefObjectVtbl *)&NiTextKeyExtraData::`vftable';
    v4->m_uiNumKeys = 0;
    v4->m_pKeys = 0;
    NiTextKeyExtraData::CopyMembers(v2, v4, kCloning);
    result = v4;
  }
  else
  {
    NiTextKeyExtraData::CopyMembers(v2, 0, kCloning);
    result = 0;
  }
  return result;
}
// 9E5654: using guessed type int (__stdcall *NiTextKeyExtraData::`vftable')(char);

//----- (007D7F60) --------------------------------------------------------
void __thiscall NiTextKeyExtraData::LoadBinary(NiTextKeyExtraData *this, NiStream *stream)
{
  NiStream *v2; // ebx@1
  NiBinaryStream *v3; // eax@1
  NiBinaryStream *v4; // ST00_4@1
  unsigned int (__cdecl *v5)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiStream *v6; // esi@2
  int v7; // ecx@2
  NiStream **v8; // eax@2
  int v9; // ecx@3
  NiTextKey *v10; // edx@3
  _DWORD *v11; // eax@4
  NiStream *v12; // eax@8
  unsigned int v13; // esi@8
  NiTextKey *v14; // edi@9
  NiTextKey *v15; // edx@11
  NiTextKeyExtraData *v16; // [sp+4h] [bp-8h]@1
  NiTextKey *pTextKeys; // [sp+8h] [bp-4h]@1

  v2 = stream;
  v16 = this;
  NiExtraData::LoadBinary((NiExtraData *)&this->vfptr, stream);
  v3 = v2->m_pkIstr;
  v4 = v3;
  v5 = v3->m_pfnRead;
  pTextKeys = (NiTextKey *)4;
  v5(v4, &stream, 4u, (unsigned int *)&pTextKeys, 1u);
  if ( stream )
  {
    v6 = stream;
    v7 = 8 * (_DWORD)stream | -((unsigned __int64)(unsigned int)stream >> 29 != 0);
    v8 = (NiStream **)operator new((v7 + 4) | -__CFADD__(v7, 4));
    if ( v8 )
    {
      v9 = (int)&v6[-1].m_acLastErrorMessage[259];
      *v8 = v6;
      v10 = (NiTextKey *)(v8 + 1);
      if ( (signed int)&v6[-1].m_acLastErrorMessage[259] >= 0 )
      {
        v11 = v8 + 2;
        do
        {
          *v11 = 0;
          v11 += 2;
          --v9;
        }
        while ( v9 >= 0 );
      }
      pTextKeys = v10;
    }
    else
    {
      pTextKeys = 0;
    }
    v12 = stream;
    v13 = 0;
    if ( stream )
    {
      v14 = pTextKeys;
      do
      {
        NiTextKey::LoadBinary(v14, v2);
        v12 = stream;
        ++v13;
        ++v14;
      }
      while ( v13 < (unsigned int)stream );
    }
    v15 = pTextKeys;
    v16->m_uiNumKeys = (unsigned int)v12;
    v16->m_pKeys = v15;
  }
}

//----- (007D8030) --------------------------------------------------------
void __thiscall NiTextKeyExtraData::GetViewerStrings(NiTextKeyExtraData *this, NiTArray<char *> *pStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiTextKeyExtraData *v3; // edi@1
  NiTArray<char *> *v4; // eax@1
  unsigned int v5; // ebx@1
  NiTArray<char *> *v6; // eax@3
  unsigned int v7; // ebx@3
  unsigned int v8; // ebx@5
  NiTArray<char *> *v9; // eax@8
  NiTextKey *v10; // ecx@8
  const char *v11; // edi@8
  unsigned int v12; // edi@8
  char *v13; // ebx@8
  char *v14; // eax@8
  unsigned int v15; // edi@8
  char *v16; // [sp+10h] [bp-10h]@8
  NiTextKeyExtraData *v17; // [sp+14h] [bp-Ch]@1
  char *pcText; // [sp+18h] [bp-8h]@8
  unsigned int uiLoop; // [sp+1Ch] [bp-4h]@5

  v2 = (NiTArray<NiVBBlock *> *)pStrings;
  v3 = this;
  v17 = this;
  NiExtraData::GetViewerStrings((NiExtraData *)&this->vfptr, pStrings);
  v4 = (NiTArray<char *> *)NiGetViewerString(NiTextKeyExtraData::m_RTTI.m_pcName);
  v5 = v2->m_uiSize;
  pStrings = v4;
  if ( v5 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v5 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v5, (NiVBChip *const *)&pStrings);
  v6 = (NiTArray<char *> *)NiGetViewerString("m_uiNumKeys", v3->m_uiNumKeys);
  v7 = v2->m_uiSize;
  pStrings = v6;
  if ( v7 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v7 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v7, (NiVBChip *const *)&pStrings);
  v8 = 0;
  uiLoop = 0;
  if ( v3->m_uiNumKeys )
  {
    while ( 1 )
    {
      pStrings = (NiTArray<char *> *)LODWORD(v3->m_pKeys[v8].m_fTime);
      v9 = (NiTArray<char *> *)NiGetViewerString("Time", *(float *)&pStrings);
      v10 = v3->m_pKeys;
      pStrings = v9;
      v11 = NiGetViewerString("Text", v10[v8].m_pText);
      pcText = (char *)v11;
      v12 = strlen(v11) + strlen((const char *)pStrings) + 4;
      v13 = (char *)operator new(v12);
      NiSprintf(v13, v12, "%s : %s", pStrings, pcText);
      v14 = NiGetViewerString("TextKey", v13);
      v15 = v2->m_uiSize;
      v16 = v14;
      if ( v15 < v2->m_uiMaxSize
        || (NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v15 + v2->m_uiGrowBy),
            v14 = v16,
            v15 < v2->m_uiMaxSize) )
      {
        if ( v15 < v2->m_uiSize )
        {
          if ( v14 )
          {
            if ( !v2->m_pBase[v15] )
              ++v2->m_uiESize;
          }
          else if ( v2->m_pBase[v15] )
          {
            --v2->m_uiESize;
          }
        }
        else
        {
          v2->m_uiSize = v15 + 1;
          if ( v14 )
            ++v2->m_uiESize;
        }
        v2->m_pBase[v15] = (NiVBBlock *)v14;
      }
      operator delete(pStrings);
      operator delete(pcText);
      operator delete(v13);
      if ( ++uiLoop >= v17->m_uiNumKeys )
        break;
      v8 = uiLoop;
      v3 = v17;
    }
  }
}

//----- (007D81E0) --------------------------------------------------------
NiTextKeyExtraData *__thiscall NiTextKeyExtraData::`scalar deleting destructor'(NiTextKeyExtraData *this, unsigned int a2)
{
  NiTextKey *v2; // eax@1
  char *v3; // esi@2
  char **v4; // ebx@2
  NiTextKey *v5; // edi@2
  int i; // esi@2
  NiTextKeyExtraData *result; // eax@6
  NiTextKeyExtraData *v8; // [sp+4h] [bp-4h]@1

  v2 = this->m_pKeys;
  v8 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiTextKeyExtraData::`vftable';
  if ( v2 )
  {
    v3 = v2[-1].m_pText;
    v4 = &v2[-1].m_pText;
    v5 = &v2[(_DWORD)v3];
    for ( i = (int)(v3 - 1); i >= 0; --i )
    {
      --v5;
      NiTextKey::~NiTextKey(v5);
    }
    operator delete(v4);
    this = v8;
  }
  NiExtraData::~NiExtraData((NiExtraData *)&this->vfptr);
  if ( a2 & 1 )
  {
    operator delete(v8);
    result = v8;
  }
  else
  {
    result = v8;
  }
  return result;
}
// 9E5654: using guessed type int (__stdcall *NiTextKeyExtraData::`vftable')(char);

//----- (007D8250) --------------------------------------------------------
char __thiscall NiControllerSequence::VerifyDependencies(NiControllerSequence *this, NiControllerSequence *pkSequence)
{
  NiControllerSequence *v2; // eax@1
  char result; // al@4

  v2 = pkSequence->m_pkPartnerSequence;
  if ( v2 )
  {
    while ( v2 != this )
    {
      v2 = v2->m_pkPartnerSequence;
      if ( !v2 )
        goto LABEL_4;
    }
    result = 0;
  }
  else
  {
LABEL_4:
    result = 1;
  }
  return result;
}

//----- (007D8280) --------------------------------------------------------
void __thiscall NiStringPalette::NiStringPalette(NiStringPalette *this, unsigned int uiAllocatedSize)
{
  NiStringPalette *v2; // esi@1
  char *v3; // eax@2
  unsigned int v4; // ST08_4@2

  v2 = this;
  NiObject::NiObject((NiObject *)&this->vfptr);
  v2->vfptr = (NiRefObjectVtbl *)&NiStringPalette::`vftable';
  v2->m_pcBuffer = 0;
  v2->m_uiAllocatedSize = uiAllocatedSize;
  v2->m_uiEndOfBuffer = 0;
  if ( uiAllocatedSize )
  {
    v3 = (char *)operator new(uiAllocatedSize);
    v4 = v2->m_uiAllocatedSize;
    v2->m_pcBuffer = v3;
    memset(v3, 0, v4);
  }
}
// 9E56DC: using guessed type int (__thiscall *NiStringPalette::`vftable')(void *p, char);

//----- (007D82D0) --------------------------------------------------------
NiRTTI *NiStringPalette::GetRTTI()
{
  return &NiStringPalette::m_RTTI;
}

//----- (007D82E0) --------------------------------------------------------
char __thiscall NiStringPalette::FindString(NiStringPalette *this, const char *pcString, unsigned int *uiOffset)
{
  NiStringPalette *v3; // eax@1
  bool v4; // zf@1
  char *v5; // ecx@1
  char *v6; // eax@3
  char v7; // dl@4
  int v8; // eax@5
  char result; // al@6
  NiStringPalette *v10; // [sp+Ch] [bp-4h]@1

  v3 = this;
  *uiOffset = 0;
  v4 = this->m_uiEndOfBuffer == 0;
  v5 = this->m_pcBuffer;
  v10 = v3;
  if ( v4 )
  {
LABEL_6:
    result = 0;
  }
  else
  {
    while ( strcmp(v5, pcString) )
    {
      v6 = v5;
      do
        v7 = *v6++;
      while ( v7 );
      v8 = v6 - (v5 + 1) + 1;
      *uiOffset += v8;
      v5 += v8;
      if ( *uiOffset >= v10->m_uiEndOfBuffer )
        goto LABEL_6;
    }
    result = 1;
  }
  return result;
}

//----- (007D8370) --------------------------------------------------------
void __thiscall NiControllerSequence::SetName(NiControllerSequence *this, const char *pcName)
{
  NiControllerSequence *v2; // edi@1
  unsigned int v3; // kr00_4@1
  char *v4; // eax@1

  v2 = this;
  operator delete(this->m_pcName);
  v3 = strlen(pcName);
  v4 = (char *)operator new(v3 + 1);
  v2->m_pcName = v4;
  strcpy_s(v4, v3 + 1, pcName);
}

//----- (007D83C0) --------------------------------------------------------
void __thiscall NiControllerSequence::SetAccumRootName(NiControllerSequence *this, const char *pcAccumRoot)
{
  NiControllerSequence *v2; // edi@1
  unsigned int v3; // kr00_4@2
  char *v4; // eax@2

  v2 = this;
  operator delete(this->m_pcAccumRoot);
  v2->m_pcAccumRoot = 0;
  if ( pcAccumRoot )
  {
    v3 = strlen(pcAccumRoot);
    v4 = (char *)operator new(v3 + 1);
    v2->m_pcAccumRoot = v4;
    strcpy_s(v4, v3 + 1, pcAccumRoot);
  }
}

//----- (007D8420) --------------------------------------------------------
NiRTTI *NiMultiTargetTransformController::GetRTTI()
{
  return &NiMultiTargetTransformController::m_RTTI;
}

//----- (007D8430) --------------------------------------------------------
NiMultiTargetTransformController *__thiscall NiMultiTargetTransformController::`vector deleting destructor'(NiMultiTargetTransformController *this, unsigned int a2)
{
  NiMultiTargetTransformController *v2; // esi@1

  v2 = this;
  NiMultiTargetTransformController::~NiMultiTargetTransformController(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007D8460) --------------------------------------------------------
NiTArray<char *> *__thiscall NiTArray<char *>::`scalar deleting destructor'(NiTArray<char *> *this, unsigned int a2)
{
  NiTArray<char *> *v2; // esi@1
  char **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pBase;
  this->vfptr = (NiTArray<char *>Vtbl *)&NiTArray<char *>::`vftable';
  operator delete(v3);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E56D0: using guessed type int (__thiscall *NiTArray<char *>::`vftable')(void *p, char);

//----- (007D8490) --------------------------------------------------------
void __thiscall NiControllerSequence::NiControllerSequence(NiControllerSequence *this)
{
  NiControllerSequence *v1; // esi@1

  v1 = this;
  NiObject::NiObject((NiObject *)&this->vfptr);
  v1->m_fSeqWeight = 1.0;
  v1->m_pcName = 0;
  v1->m_uiArraySize = 0;
  v1->m_uiArrayGrowBy = 0;
  v1->m_pkInterpArray = 0;
  v1->m_pkIDTagArray = 0;
  v1->vfptr = (NiRefObjectVtbl *)&NiControllerSequence::`vftable';
  v1->m_spTextKeys.m_pObject = 0;
  v1->m_fFrequency = 1.0;
  v1->m_eCycleType = 0;
  v1->m_fBeginKeyTime = 3.4028235e38;
  v1->m_fEndKeyTime = -3.4028235e38;
  v1->m_fLastTime = -3.4028235e38;
  v1->m_fWeightedLastTime = -3.4028235e38;
  v1->m_pkOwner = 0;
  v1->m_eState = 0;
  v1->m_fLastScaledTime = -3.4028235e38;
  v1->m_fOffset = -3.4028235e38;
  v1->m_fStartTime = -3.4028235e38;
  v1->m_fEndTime = -3.4028235e38;
  v1->m_pkPartnerSequence = 0;
  v1->m_pcAccumRoot = 0;
  v1->m_pkAccumRoot = 0;
  v1->m_fDestFrame = -3.4028235e38;
  v1->m_spStringPalette.m_pObject = 0;
}
// 9E57B4: using guessed type int (__thiscall *NiControllerSequence::`vftable')(void *p, char);

//----- (007D8540) --------------------------------------------------------
NiRTTI *NiControllerSequence::GetRTTI()
{
  return &NiControllerSequence::m_RTTI;
}

//----- (007D8550) --------------------------------------------------------
double __thiscall NiControllerSequence::GetKeyTimeAt(NiControllerSequence *this, NiTextKeyMatch *pkMatchObject)
{
  NiTextKeyMatch *v2; // edx@1
  NiTextKeyExtraData *v3; // eax@2
  unsigned int v4; // ebx@3
  NiTextKey *v5; // eax@3
  unsigned int v6; // esi@3
  unsigned int *v7; // edi@4
  double result; // st7@8
  NiTextKey *pkKeys; // [sp+0h] [bp-8h]@3

  v2 = pkMatchObject;
  if ( pkMatchObject && (v3 = this->m_spTextKeys.m_pObject) != 0 )
  {
    v4 = v3->m_uiNumKeys;
    v5 = v3->m_pKeys;
    v6 = 0;
    pkKeys = v5;
    if ( v4 )
    {
      v7 = (unsigned int *)&v5->m_pText;
      while ( !(unsigned __int8)v2->vfptr[1].__vecDelDtor((NiRefObject *)v2, *v7) )
      {
        ++v6;
        v7 += 2;
        if ( v6 >= v4 )
          goto LABEL_8;
        v2 = pkMatchObject;
      }
      result = pkKeys[v6].m_fTime;
    }
    else
    {
LABEL_8:
      result = -3.4028235e38;
    }
  }
  else
  {
    result = -3.4028235e38;
  }
  return result;
}

//----- (007D85D0) --------------------------------------------------------
NiControllerSequence::IDTag *__thiscall NiControllerSequence::IDTag::operator=(NiControllerSequence::IDTag *this, NiControllerSequence::IDTag *__that)
{
  NiControllerSequence::IDTag *v2; // esi@1
  NiStringPalette *v3; // ebx@1
  NiStringPalette *v4; // eax@6

  v2 = this;
  v3 = this->m_spStringPalette.m_pObject;
  if ( this->m_spStringPalette.m_pObject != __that->m_spStringPalette.m_pObject )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v4 = __that->m_spStringPalette.m_pObject;
    v2->m_spStringPalette.m_pObject = __that->m_spStringPalette.m_pObject;
    if ( v4 )
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  }
  v2->m_uiAVObjectName = __that->m_uiAVObjectName;
  v2->m_uiPropertyType = __that->m_uiPropertyType;
  v2->m_uiCtlrType = __that->m_uiCtlrType;
  v2->m_uiCtlrID = __that->m_uiCtlrID;
  v2->m_uiInterpolatorID = __that->m_uiInterpolatorID;
  return v2;
}

//----- (007D8640) --------------------------------------------------------
NiControllerSequence::InterpArrayItem *__thiscall NiControllerSequence::InterpArrayItem::operator=(NiControllerSequence::InterpArrayItem *this, NiControllerSequence::InterpArrayItem *__that)
{
  NiControllerSequence::InterpArrayItem *v2; // edi@1
  NiInterpolator *v3; // esi@1
  NiInterpolator *v4; // eax@6
  NiInterpController *v5; // esi@8
  NiInterpController *v6; // eax@13

  v2 = this;
  v3 = this->m_spInterpolator.m_pObject;
  if ( this->m_spInterpolator.m_pObject != __that->m_spInterpolator.m_pObject )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v4 = __that->m_spInterpolator.m_pObject;
    v2->m_spInterpolator.m_pObject = __that->m_spInterpolator.m_pObject;
    if ( v4 )
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  }
  v5 = v2->m_spInterpCtlr.m_pObject;
  if ( v5 != __that->m_spInterpCtlr.m_pObject )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v6 = __that->m_spInterpCtlr.m_pObject;
    v2->m_spInterpCtlr.m_pObject = v6;
    if ( v6 )
      InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  }
  v2->m_pkBlendInterp = __that->m_pkBlendInterp;
  v2->m_ucBlendIdx = __that->m_ucBlendIdx;
  return v2;
}

//----- (007D86E0) --------------------------------------------------------
void __thiscall NiControllerSequence::ClearTargets(NiControllerSequence *this)
{
  NiControllerSequence *v1; // edi@1
  int v2; // ebx@2
  NiControllerSequence::InterpArrayItem *v3; // eax@3
  NiInterpController *v4; // esi@3
  NiInterpController **v5; // [sp+4h] [bp-8h]@3
  unsigned int ui; // [sp+8h] [bp-4h]@1

  v1 = this;
  ui = 0;
  if ( this->m_uiArraySize )
  {
    v2 = 0;
    do
    {
      v3 = v1->m_pkInterpArray;
      v4 = v3[v2].m_spInterpCtlr.m_pObject;
      v5 = &v3[v2].m_spInterpCtlr.m_pObject;
      if ( v4 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
        {
          if ( v4 )
            v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
        }
        *v5 = 0;
      }
      v1->m_pkInterpArray[v2].m_pkBlendInterp = 0;
      ++v2;
      ++ui;
    }
    while ( ui < v1->m_uiArraySize );
  }
}

//----- (007D8760) --------------------------------------------------------
void __thiscall NiControllerSequence::AttachInterpolators(NiControllerSequence *this, int cPriority)
{
  int v2; // ebx@1
  NiControllerSequence *v3; // edi@1
  NiControllerSequence::InterpArrayItem *v4; // esi@2
  NiInterpolator *v5; // eax@2
  NiBlendInterpolator *v6; // ecx@3
  unsigned int ui; // [sp+18h] [bp-4h]@1

  v2 = 0;
  v3 = this;
  ui = 0;
  if ( this->m_uiArraySize )
  {
    do
    {
      v4 = v3->m_pkInterpArray;
      v5 = v4[v2].m_spInterpolator.m_pObject;
      if ( v5 )
      {
        v6 = v4[v2].m_pkBlendInterp;
        if ( v6 )
          v4[v2].m_ucBlendIdx = ((int (__stdcall *)(NiInterpolator *, _DWORD, int, _DWORD))v6->vfptr[34].__vecDelDtor)(
                                  v5,
                                  0.0,
                                  cPriority,
                                  1.0);
      }
      ++v2;
      ++ui;
    }
    while ( ui < v3->m_uiArraySize );
  }
}

//----- (007D87C0) --------------------------------------------------------
void __thiscall NiControllerSequence::DetachInterpolators(NiControllerSequence *this)
{
  int v1; // ebx@1
  NiControllerSequence *v2; // edi@1
  NiControllerSequence::InterpArrayItem *v3; // eax@2
  void (__thiscall ***v4)(_DWORD, _DWORD); // esi@4
  int v5; // [sp+8h] [bp-8h]@3
  unsigned int ui; // [sp+Ch] [bp-4h]@1

  v1 = 0;
  v2 = this;
  ui = 0;
  if ( this->m_uiArraySize )
  {
    do
    {
      v3 = v2->m_pkInterpArray;
      if ( v3[v1].m_pkBlendInterp )
      {
        ((void (__stdcall *)(int *, _DWORD))v3[v1].m_pkBlendInterp->vfptr[35].__vecDelDtor)(&v5, v3[v1].m_ucBlendIdx);
        if ( v5 )
        {
          v4 = (void (__thiscall ***)(_DWORD, _DWORD))v5;
          if ( !InterlockedDecrement((volatile LONG *)(v5 + 4)) )
          {
            if ( v4 )
              (**v4)(v4, 1);
          }
        }
      }
      ++v1;
      ++ui;
    }
    while ( ui < v2->m_uiArraySize );
  }
}

//----- (007D8840) --------------------------------------------------------
double __thiscall NiControllerSequence::ComputeScaledTime(NiControllerSequence *this, float fTime, bool bStoreLastTime)
{
  double v3; // st6@2
  float v4; // ST0C_4@4
  double v5; // st6@4
  long double v6; // st7@5
  float v7; // ST0C_4@7
  float v8; // ST0C_4@7
  double v9; // rt1@9
  long double v10; // st6@9
  double v11; // st7@9
  double v12; // st7@11
  double v13; // st7@13
  double v14; // st6@13
  double v15; // rtt@19
  double v16; // rt0@21
  double v17; // st6@21
  double result; // st7@21
  float fSpan; // [sp+4h] [bp-Ch]@5
  float fWeightedLastTime; // [sp+8h] [bp-8h]@1
  float fWeightedLastTimea; // [sp+8h] [bp-8h]@4
  float fScaledTime; // [sp+Ch] [bp-4h]@4

  fWeightedLastTime = this->m_fWeightedLastTime;
  if ( -3.4028235e38 == this->m_fLastTime )
  {
    fWeightedLastTime = 0.0;
    v3 = fTime;
  }
  else
  {
    v3 = fTime - this->m_fLastTime;
  }
  v4 = v3;
  fWeightedLastTimea = this->m_fFrequency * v4 + fWeightedLastTime;
  v5 = fWeightedLastTimea;
  fScaledTime = fWeightedLastTimea;
  if ( this->m_eCycleType )
  {
    v11 = fWeightedLastTimea;
    goto LABEL_11;
  }
  fSpan = this->m_fEndKeyTime - this->m_fBeginKeyTime;
  v6 = fSpan;
  if ( fSpan == 0.0 )
  {
    v11 = fWeightedLastTimea;
    v10 = this->m_fBeginKeyTime;
    goto LABEL_10;
  }
  if ( this->m_fEndKeyTime != v5 )
  {
    v7 = v5 - this->m_fBeginKeyTime;
    v8 = fmod(v7, v6);
    fScaledTime = v8 + this->m_fBeginKeyTime;
    v6 = fSpan;
    v5 = fWeightedLastTimea;
  }
  if ( this->m_fBeginKeyTime > (double)fScaledTime )
  {
    v9 = v5;
    v10 = v6 + fScaledTime;
    v11 = v9;
LABEL_10:
    fScaledTime = v10;
LABEL_11:
    v5 = v11;
    v12 = fScaledTime;
    goto LABEL_12;
  }
  v12 = fScaledTime;
LABEL_12:
  if ( this->m_fEndKeyTime >= v12 )
  {
    if ( this->m_fBeginKeyTime <= v12 )
    {
      v15 = v5;
      v14 = v12;
      v13 = v15;
    }
    else
    {
      v13 = v5;
      v14 = this->m_fBeginKeyTime;
    }
  }
  else
  {
    v13 = v5;
    v14 = this->m_fEndKeyTime;
  }
  if ( bStoreLastTime )
  {
    v16 = v14;
    v17 = v13;
    result = v16;
    this->m_fWeightedLastTime = v17;
    this->m_fLastTime = fTime;
    this->m_fLastScaledTime = v16;
  }
  else
  {
    result = v14;
  }
  return result;
}

//----- (007D8960) --------------------------------------------------------
char __thiscall NiControllerSequence::VerifyMatchingMorphKeys(NiControllerSequence *this, NiControllerSequence *pkTimeSyncSeq)
{
  NiTextKeyExtraData *v2; // eax@1
  NiTextKeyExtraData *v3; // ecx@2
  unsigned int v4; // ebx@3
  unsigned int v5; // esi@3
  NiTextKey *v6; // ecx@3
  NiTextKey *v7; // edi@3
  unsigned int v8; // esi@6
  const char **v9; // edi@7
  char result; // al@10
  const char **v11; // edi@15
  const char *v12; // ebx@16
  const char **v13; // esi@17
  unsigned int v14; // edi@17
  unsigned int uiNumKeys2; // [sp+0h] [bp-1Ch]@3
  int v16; // [sp+4h] [bp-18h]@4
  NiTextKey *pkKeys2; // [sp+8h] [bp-14h]@3
  const char *pcText1; // [sp+Ch] [bp-10h]@5
  unsigned int uiNumKeys1; // [sp+10h] [bp-Ch]@3
  const char **v20; // [sp+14h] [bp-8h]@4
  const char **v21; // [sp+14h] [bp-8h]@15
  unsigned int ui; // [sp+18h] [bp-4h]@3
  unsigned int uia; // [sp+18h] [bp-4h]@14
  char bMorphKeysExist2_3; // [sp+27h] [bp+Bh]@3
  char bMorphKeysExist2_3a; // [sp+27h] [bp+Bh]@14

  v2 = this->m_spTextKeys.m_pObject;
  if ( v2 && (v3 = pkTimeSyncSeq->m_spTextKeys.m_pObject) != 0 )
  {
    v4 = v2->m_uiNumKeys;
    v5 = v3->m_uiNumKeys;
    v6 = v3->m_pKeys;
    v7 = v2->m_pKeys;
    uiNumKeys1 = v5;
    uiNumKeys2 = v2->m_uiNumKeys;
    pkKeys2 = v2->m_pKeys;
    bMorphKeysExist2_3 = 0;
    ui = 0;
    if ( !v5 )
      goto LABEL_23;
    v16 = (int)&v6->m_pText;
    v20 = (const char **)&v6->m_pText;
    do
    {
      pcText1 = *v20;
      if ( !strncmp(*v20, "morph:", 6u) )
      {
        v8 = 0;
        bMorphKeysExist2_3 = 1;
        if ( !v4 )
          goto LABEL_23;
        v9 = (const char **)&v7->m_pText;
        while ( strcmp(pcText1, *v9) )
        {
          ++v8;
          v9 += 2;
          if ( v8 >= v4 )
            return 0;
        }
        v5 = uiNumKeys1;
        v7 = pkKeys2;
      }
      v20 += 2;
      ++ui;
    }
    while ( ui < v5 );
    if ( !bMorphKeysExist2_3 )
      goto LABEL_23;
    bMorphKeysExist2_3a = 0;
    uia = 0;
    if ( !v4 )
      goto LABEL_23;
    v11 = (const char **)&v7->m_pText;
    v21 = v11;
    do
    {
      v12 = *v11;
      if ( !strncmp(*v11, "morph:", 6u) )
      {
        v13 = (const char **)v16;
        bMorphKeysExist2_3a = 1;
        v14 = 0;
        while ( strcmp(v12, *v13) )
        {
          ++v14;
          v13 += 2;
          if ( v14 >= uiNumKeys1 )
            return 0;
        }
      }
      v11 = v21 + 2;
      ++uia;
      v21 += 2;
    }
    while ( uia < uiNumKeys2 );
    if ( bMorphKeysExist2_3a )
      result = 1;
    else
LABEL_23:
      result = 0;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007D8B00) --------------------------------------------------------
void __thiscall NiControllerSequence::ProcessClone(NiControllerSequence *this, NiCloningProcess *kCloning)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> **v2; // edi@1
  NiControllerSequence *v3; // ebx@1
  unsigned int v4; // esi@1
  int v5; // eax@2
  NiInterpController *v6; // ecx@4
  unsigned int v7; // eax@6
  NiControllerSequence::InterpArrayItem *v8; // ebx@9
  NiObject *v9; // edi@9
  NiObject *v10; // eax@9
  NiControllerSequence::InterpArrayItem *v11; // edi@17
  NiControllerSequence::InterpArrayItem *v12; // ebx@17
  NiInterpolator *v13; // eax@17
  NiInterpolator *v14; // edi@22
  NiControllerSequence::InterpArrayItem *v15; // edx@26
  NiObject *v16; // edi@26
  NiObject *v17; // eax@26
  NiControllerSequence::InterpArrayItem *v18; // edx@33
  NiInterpController *v19; // edi@33
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v20; // esi@45
  NiTMapItem<unsigned int,NiVBSet *> *v21; // edi@45
  NiTPointerMap<NiObject *,NiObject *> *v22; // esi@49
  NiTMapItem<NiObject *,NiObject *> *v23; // edi@49
  NiTPointerMap<NiObject *,NiObject *> *v24; // esi@53
  NiTMapItem<NiObject *,NiObject *> *v25; // edi@53
  NiInterpController **v26; // [sp+Ch] [bp-18h]@33
  NiControllerManager *v27; // [sp+Ch] [bp-18h]@45
  NiControllerSequence *v28; // [sp+Ch] [bp-18h]@49
  NiAVObject *v29; // [sp+Ch] [bp-18h]@53
  NiInterpolator *v30; // [sp+10h] [bp-14h]@17
  _DWORD *v31; // [sp+10h] [bp-14h]@26
  NiObject **v32; // [sp+10h] [bp-14h]@33
  unsigned int ui; // [sp+14h] [bp-10h]@1
  NiControllerSequence *v34; // [sp+18h] [bp-Ch]@1
  NiObject *pkClone; // [sp+1Ch] [bp-8h]@1
  NiControllerSequence *pkDest; // [sp+20h] [bp-4h]@1

  v2 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> **)kCloning;
  v3 = this;
  v34 = this;
  NiObject::ProcessClone((NiObject *)&this->vfptr, kCloning);
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)kCloning->m_pkCloneMap,
    (unsigned int)v3,
    (NiVBSet **)&pkClone);
  v4 = 0;
  pkDest = (NiControllerSequence *)pkClone;
  ui = 0;
  if ( v3->m_uiArraySize )
  {
    do
    {
      v5 = (int)&v3->m_pkInterpArray[v4];
      if ( *(_DWORD *)v5 )
      {
        if ( v3->m_pkOwner )
        {
          v7 = *(_DWORD *)v5;
          if ( v3->m_eState )
          {
            if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
                   *v2,
                   v7,
                   (NiVBSet **)&pkClone) )
            {
              v8 = pkDest->m_pkInterpArray;
              v9 = (NiObject *)&v8[v4].m_spInterpolator.m_pObject->vfptr;
              v10 = pkClone;
              if ( v9 != pkClone )
              {
                if ( v9 )
                {
                  if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
                    v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
                  v10 = pkClone;
                }
                v8[v4].m_spInterpolator.m_pObject = (NiInterpolator *)v10;
                if ( v10 )
                  InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
              }
            }
            else
            {
              v11 = v3->m_pkInterpArray;
              v12 = pkDest->m_pkInterpArray;
              v13 = v12[v4].m_spInterpolator.m_pObject;
              v30 = v13;
              if ( v13 != v11[v4].m_spInterpolator.m_pObject )
              {
                if ( v13 && !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) && v30 )
                  ((void (__stdcall *)(signed int))v30->vfptr->__vecDelDtor)(1);
                v14 = v11[v4].m_spInterpolator.m_pObject;
                v12[v4].m_spInterpolator.m_pObject = v14;
                if ( v14 )
                  InterlockedIncrement((volatile LONG *)&v14->m_uiRefCount);
              }
            }
            v3 = v34;
          }
          else
          {
            (*(void (__thiscall **)(unsigned int, NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> **))(*(_DWORD *)v7 + 40))(
              v7,
              v2);
          }
          if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
                 (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)kCloning->m_pkCloneMap,
                 (unsigned int)v3->m_pkInterpArray[v4].m_spInterpCtlr.m_pObject,
                 (NiVBSet **)&pkClone) )
          {
            v15 = pkDest->m_pkInterpArray;
            v16 = (NiObject *)&v15[v4].m_spInterpCtlr.m_pObject->vfptr;
            v31 = &v15[v4].m_spInterpCtlr.m_pObject;
            v17 = pkClone;
            if ( v16 != pkClone )
            {
              if ( v16 )
              {
                if ( !InterlockedDecrement((volatile LONG *)&v16->m_uiRefCount) && v16 )
                  v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
                v17 = pkClone;
              }
              *v31 = v17;
              goto LABEL_39;
            }
          }
          else
          {
            v18 = pkDest->m_pkInterpArray;
            v19 = v18[v4].m_spInterpCtlr.m_pObject;
            v32 = (NiObject **)&v3->m_pkInterpArray[v4].m_spInterpCtlr;
            v26 = &v18[v4].m_spInterpCtlr.m_pObject;
            if ( (NiObject *)v19 != *v32 )
            {
              if ( v19 && !InterlockedDecrement((volatile LONG *)&v19->m_uiRefCount) && v19 )
                v19->vfptr->__vecDelDtor((NiRefObject *)v19, 1u);
              v17 = *v32;
              *v26 = (NiInterpController *)*v32;
LABEL_39:
              if ( v17 )
                InterlockedIncrement((volatile LONG *)&v17->m_uiRefCount);
            }
          }
          if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
                 (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)kCloning->m_pkCloneMap,
                 (unsigned int)v3->m_pkInterpArray[v4].m_pkBlendInterp,
                 (NiVBSet **)&pkClone) )
          {
            pkDest->m_pkInterpArray[v4].m_pkBlendInterp = (NiBlendInterpolator *)pkClone;
          }
          else
          {
            pkDest->m_pkInterpArray[v4].m_pkBlendInterp = v3->m_pkInterpArray[v4].m_pkBlendInterp;
          }
          goto LABEL_44;
        }
        (*(void (__stdcall **)(NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> **))(**(_DWORD **)v5 + 40))(v2);
        v6 = v3->m_pkInterpArray[v4].m_spInterpCtlr.m_pObject;
        if ( v6 )
          ((void (__stdcall *)(NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> **))v6->vfptr[10].__vecDelDtor)(v2);
      }
LABEL_44:
      v2 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> **)kCloning;
      ++v4;
      ++ui;
    }
    while ( ui < v3->m_uiArraySize );
  }
  v20 = *v2;
  v27 = v3->m_pkOwner;
  v21 = v20->m_ppkHashTable[(*v2)->vfptr->KeyToHashIndex(*v2, (unsigned int)v3->m_pkOwner)];
  if ( v21 )
  {
    while ( !v20->vfptr->IsKeysEqual(v20, (unsigned int)v27, v21->m_key) )
    {
      v21 = v21->m_pkNext;
      if ( !v21 )
        goto LABEL_48;
    }
    pkDest->m_pkOwner = (NiControllerManager *)v21->m_val;
  }
  else
  {
LABEL_48:
    pkDest->m_pkOwner = v3->m_pkOwner;
  }
  v22 = kCloning->m_pkCloneMap;
  v28 = v3->m_pkPartnerSequence;
  v23 = v22->m_ppkHashTable[kCloning->m_pkCloneMap->vfptr->KeyToHashIndex(
                              (NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *> *)kCloning->m_pkCloneMap,
                              (NiObject *)v3->m_pkPartnerSequence)];
  if ( v23 )
  {
    while ( !v22->vfptr->IsKeysEqual(
               (NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *> *)v22,
               (NiObject *)v28,
               v23->m_key) )
    {
      v23 = v23->m_pkNext;
      if ( !v23 )
        goto LABEL_52;
    }
    pkDest->m_pkPartnerSequence = (NiControllerSequence *)v23->m_val;
  }
  else
  {
LABEL_52:
    pkDest->m_pkPartnerSequence = v3->m_pkPartnerSequence;
  }
  v24 = kCloning->m_pkCloneMap;
  v29 = v3->m_pkAccumRoot;
  v25 = v24->m_ppkHashTable[kCloning->m_pkCloneMap->vfptr->KeyToHashIndex(
                              (NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *> *)kCloning->m_pkCloneMap,
                              (NiObject *)v3->m_pkAccumRoot)];
  if ( v25 )
  {
    while ( !v24->vfptr->IsKeysEqual(
               (NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *> *)v24,
               (NiObject *)v29,
               v25->m_key) )
    {
      v25 = v25->m_pkNext;
      if ( !v25 )
        goto LABEL_56;
    }
    pkDest->m_pkAccumRoot = (NiAVObject *)v25->m_val;
  }
  else
  {
LABEL_56:
    pkDest->m_pkAccumRoot = v3->m_pkAccumRoot;
  }
}

//----- (007D8E40) --------------------------------------------------------
char __thiscall NiControllerSequence::InterpArrayItem::IsEqual(NiControllerSequence::InterpArrayItem *this, NiControllerSequence::InterpArrayItem *kDest)
{
  NiInterpolator *v2; // eax@1
  NiControllerSequence::InterpArrayItem *v3; // edi@1
  NiInterpolator *v4; // ecx@1
  NiInterpController *v6; // ecx@9

  v2 = kDest->m_spInterpolator.m_pObject;
  v3 = this;
  v4 = this->m_spInterpolator.m_pObject;
  if ( v4 )
  {
    if ( !v2
      || v2
      && !(unsigned __int8)((int (__stdcall *)(_DWORD))v4->vfptr[7].__vecDelDtor)(kDest->m_spInterpolator.m_pObject) )
    {
      return 0;
    }
  }
  else if ( v2 )
  {
    return 0;
  }
  v6 = v3->m_spInterpCtlr.m_pObject;
  if ( v6 )
  {
    if ( !kDest->m_spInterpCtlr.m_pObject )
      return 0;
    if ( v6 )
      goto LABEL_19;
  }
  if ( kDest->m_spInterpCtlr.m_pObject )
    return 0;
  if ( v6 )
  {
LABEL_19:
    if ( !kDest->m_spInterpCtlr.m_pObject
      || (unsigned __int8)((int (__stdcall *)(_DWORD))v6->vfptr[7].__vecDelDtor)(kDest->m_spInterpCtlr.m_pObject) )
    {
      return 1;
    }
    return 0;
  }
  return 1;
}

//----- (007D8EB0) --------------------------------------------------------
bool __thiscall NiControllerSequence::IDTag::IsEqual(NiControllerSequence::IDTag *this, NiControllerSequence::IDTag *kDest)
{
  NiControllerSequence::IDTag *v2; // esi@1

  v2 = this;
  return (unsigned __int8)((int (__stdcall *)(NiStringPalette *))this->m_spStringPalette.m_pObject->vfptr[7].__vecDelDtor)(kDest->m_spStringPalette.m_pObject)
      && v2->m_uiAVObjectName == kDest->m_uiAVObjectName
      && v2->m_uiPropertyType == kDest->m_uiPropertyType
      && v2->m_uiCtlrType == kDest->m_uiCtlrType
      && v2->m_uiCtlrID == kDest->m_uiCtlrID
      && v2->m_uiInterpolatorID == kDest->m_uiInterpolatorID;
}

//----- (007D8F10) --------------------------------------------------------
char __thiscall NiControllerSequence::RegisterStreamables(NiControllerSequence *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiControllerSequence *v3; // esi@1
  char result; // al@1
  int v5; // ebx@2
  int v6; // edi@4
  int v7; // edi@6
  NiTextKeyExtraData *v8; // ecx@10
  NiStringPalette *v9; // esi@12
  unsigned int ui; // [sp+8h] [bp-8h]@2
  int v11; // [sp+Ch] [bp-4h]@3

  v2 = kStream;
  v3 = this;
  result = NiObject::RegisterStreamables((NiObject *)&this->vfptr, kStream);
  if ( result )
  {
    v5 = 0;
    ui = 0;
    if ( v3->m_uiArraySize )
    {
      v11 = 0;
      do
      {
        v6 = (int)&v3->m_pkInterpArray[v11];
        if ( *(_DWORD *)v6 )
          (*(void (__stdcall **)(NiStream *))(**(_DWORD **)v6 + 20))(kStream);
        v7 = *(_DWORD *)(v6 + 4);
        if ( v7 )
          (*(void (__thiscall **)(int, NiStream *))(*(_DWORD *)v7 + 20))(v7, kStream);
        ((void (__stdcall *)(NiStream *))v3->m_pkIDTagArray[v5].m_spStringPalette.m_pObject->vfptr[5].__vecDelDtor)(kStream);
        ++v11;
        ++v5;
        ++ui;
      }
      while ( ui < v3->m_uiArraySize );
      v2 = kStream;
    }
    v8 = v3->m_spTextKeys.m_pObject;
    if ( v8 )
      ((void (__stdcall *)(NiStream *))v8->vfptr[5].__vecDelDtor)(v2);
    v9 = v3->m_spStringPalette.m_pObject;
    if ( v9 )
      v9->vfptr[5].__vecDelDtor((NiRefObject *)v9, (unsigned int)v2);
    result = 1;
  }
  return result;
}

//----- (007D8FC0) --------------------------------------------------------
void __cdecl NiControllerSequence::CreateObject()
{
  NiControllerSequence *v0; // eax@1

  v0 = (NiControllerSequence *)operator new(0x68u);
  if ( v0 )
    NiControllerSequence::NiControllerSequence(v0);
}

//----- (007D8FE0) --------------------------------------------------------
void __thiscall NiControllerSequence::LinkObject(NiControllerSequence *this, NiStream *kStream)
{
  NiControllerSequence *v2; // edi@1
  NiObject *v3; // eax@2
  NiTextKeyExtraData *v4; // esi@2
  NiTextKeyExtraData *v5; // ebx@2
  NiObject *v6; // eax@11
  NiControllerSequence::InterpArrayItem *v7; // ecx@11
  NiObject *v8; // esi@11
  NiObject *v9; // ebx@11
  NiObject *v10; // eax@20
  NiTextKeyExtraData *v11; // esi@20
  NiTextKeyExtraData *v12; // ebx@20
  NiTextKeyExtraData *v13; // edi@27
  unsigned int v14; // ebx@27
  NiTextKey *v15; // edi@27
  unsigned int v16; // esi@27
  _DWORD *v17; // [sp+Ch] [bp-Ch]@11
  unsigned int ui; // [sp+10h] [bp-8h]@9
  int v19; // [sp+14h] [bp-4h]@10
  NiStream *kStreama; // [sp+20h] [bp+8h]@28

  v2 = this;
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue(
    (NiVBDynamicSet *)this,
    (IDirect3DVertexBuffer9 *)kStream);
  if ( kStream->m_uiNifFileVersion >= 0xA010068 )
  {
    v10 = NiStream::GetObjectFromLinkID(kStream);
    v11 = v2->m_spTextKeys.m_pObject;
    v12 = (NiTextKeyExtraData *)v10;
    if ( (NiObject *)v11 != v10 )
    {
      if ( v11 && !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
        v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
      v2->m_spTextKeys.m_pObject = v12;
      if ( v12 )
        InterlockedIncrement((volatile LONG *)&v12->m_uiRefCount);
    }
    v2->m_pkOwner = (NiControllerManager *)NiStream::GetObjectFromLinkID(kStream);
    v13 = v2->m_spTextKeys.m_pObject;
    v14 = v13->m_uiNumKeys;
    v15 = v13->m_pKeys;
    v16 = 0;
    if ( v14 )
    {
      do
      {
        kStreama = (NiStream *)(signed int)(v15[v16++].m_fTime * 10000.0);
        v15[v16 - 1].m_fTime = (double)(signed int)kStreama / 10000.0;
      }
      while ( v16 < v14 );
    }
  }
  else
  {
    v3 = NiStream::GetObjectFromLinkID(kStream);
    v4 = v2->m_spTextKeys.m_pObject;
    v5 = (NiTextKeyExtraData *)v3;
    if ( (NiObject *)v4 != v3 )
    {
      if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      v2->m_spTextKeys.m_pObject = v5;
      if ( v5 )
        InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
    }
    ui = 0;
    if ( v2->m_uiArraySize )
    {
      v19 = 0;
      do
      {
        v6 = NiStream::GetObjectFromLinkID(kStream);
        v7 = v2->m_pkInterpArray;
        v8 = (NiObject *)&v7[v19].m_spInterpCtlr.m_pObject->vfptr;
        v9 = v6;
        v17 = &v7[v19].m_spInterpCtlr.m_pObject;
        if ( v8 != v6 )
        {
          if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
            v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
          *v17 = v9;
          if ( v9 )
            InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
        }
        ++v19;
        ++ui;
      }
      while ( ui < v2->m_uiArraySize );
    }
  }
}

//----- (007D9150) --------------------------------------------------------
bool __thiscall NiControllerSequence::IsEqual(NiControllerSequence *this, NiObject *pkObject)
{
  NiObject *v2; // esi@1
  NiControllerSequence *v3; // edi@1
  const char *v5; // eax@3
  NiRefObjectVtbl *v6; // ecx@8
  unsigned int v7; // eax@10
  unsigned int v8; // ebx@12
  unsigned int v9; // edi@13
  int v10; // esi@13
  NiTextKeyExtraData *v11; // ecx@19
  NiControllerManager *v12; // eax@30
  const char *v13; // eax@37
  const char *v14; // ecx@42
  NiControllerSequence *v15; // [sp+8h] [bp-4h]@1

  v2 = pkObject;
  v3 = this;
  v15 = this;
  if ( !NiObject::IsEqual((NiObject *)&this->vfptr, pkObject) )
    return 0;
  v5 = v3->m_pcName;
  if ( !v5 )
    goto LABEL_48;
  if ( !pkObject[1].vfptr )
    return 0;
  if ( !v5 )
  {
LABEL_48:
    if ( !pkObject[1].vfptr )
    {
      if ( !v5 )
        goto LABEL_10;
      goto LABEL_8;
    }
    return 0;
  }
LABEL_8:
  v6 = pkObject[1].vfptr;
  if ( v6 && strcmp(v5, (const char *)v6) )
    return 0;
LABEL_10:
  v7 = v3->m_uiArraySize;
  if ( v7 != pkObject[1].m_uiRefCount || (NiRefObjectVtbl *)v3->m_uiArrayGrowBy != pkObject[2].vfptr )
    return 0;
  v8 = 0;
  if ( v7 )
  {
    v9 = 0;
    v10 = 0;
    while ( NiControllerSequence::InterpArrayItem::IsEqual(
              &v15->m_pkInterpArray[v10],
              (NiControllerSequence::InterpArrayItem *)(v10 * 16 + pkObject[2].m_uiRefCount))
         && NiControllerSequence::IDTag::IsEqual(
              &v15->m_pkIDTagArray[v9 / 6],
              (NiControllerSequence::IDTag *)&pkObject[3].vfptr[v9]) )
    {
      ++v8;
      ++v10;
      v9 += 6;
      if ( v8 >= v15->m_uiArraySize )
      {
        v2 = pkObject;
        v3 = v15;
        goto LABEL_18;
      }
    }
    return 0;
  }
LABEL_18:
  if ( *(float *)&v2[3].m_uiRefCount == v3->m_fSeqWeight )
  {
    v11 = v3->m_spTextKeys.m_pObject;
    if ( v11 )
    {
      if ( !v2[4].vfptr )
        return 0;
      if ( v11 )
        goto LABEL_49;
    }
    if ( v2[4].vfptr )
      return 0;
    if ( v11 )
    {
LABEL_49:
      if ( v2[4].vfptr
        && !(unsigned __int8)((int (__stdcall *)(NiRefObjectVtbl *))v11->vfptr[7].__vecDelDtor)(v2[4].vfptr) )
      {
        return 0;
      }
    }
    if ( v3->m_eCycleType != v2[4].m_uiRefCount
      || *(float *)&v2[5].vfptr != v3->m_fFrequency
      || *(float *)&v2[5].m_uiRefCount != v3->m_fBeginKeyTime
      || *(float *)&v2[6].vfptr != v3->m_fEndKeyTime )
    {
      return 0;
    }
    v12 = v3->m_pkOwner;
    if ( v12 )
    {
      if ( !v2[8].vfptr )
        return 0;
      if ( v12 )
        goto LABEL_50;
    }
    if ( v2[8].vfptr )
      return 0;
    if ( v12 )
    {
LABEL_50:
      if ( v2[8].vfptr
        && !(unsigned __int8)((int (__stdcall *)(NiRefObjectVtbl *))v3->m_pkOwner->vfptr[7].__vecDelDtor)(v2[8].vfptr) )
      {
        return 0;
      }
    }
    v13 = v3->m_pcAccumRoot;
    if ( !v13 )
      goto LABEL_51;
    if ( !v2[11].m_uiRefCount )
      return 0;
    if ( !v13 )
    {
LABEL_51:
      if ( v2[11].m_uiRefCount )
        return 0;
      if ( !v13 )
        return (unsigned __int8)((int (__stdcall *)(unsigned int))v3->m_spStringPalette.m_pObject->vfptr[7].__vecDelDtor)(v2[12].m_uiRefCount) != 0;
    }
    v14 = (const char *)v2[11].m_uiRefCount;
    if ( !v14 || !strcmp(v13, v14) )
      return (unsigned __int8)((int (__stdcall *)(unsigned int))v3->m_spStringPalette.m_pObject->vfptr[7].__vecDelDtor)(v2[12].m_uiRefCount) != 0;
  }
  return 0;
}

//----- (007D9370) --------------------------------------------------------
void __cdecl NiStreamLoadBinary<unsigned short>(NiStream *kStream, unsigned __int16 *value)
{
  NiBinaryStream *v2; // eax@1
  NiBinaryStream *v3; // ST00_4@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1

  v2 = kStream->m_pkIstr;
  v3 = v2;
  v4 = v2->m_pfnRead;
  kStream = (NiStream *)2;
  v4(v3, value, 2u, (unsigned int *)&kStream, 1u);
}

//----- (007D93A0) --------------------------------------------------------
void __thiscall NiTimeController::SetNext(NiTimeController *this, NiTimeController *pkNext)
{
  NiTimeController *v2; // ebx@1
  NiTimeController *v3; // esi@1

  v2 = this;
  v3 = this->m_spNext.m_pObject;
  if ( v3 != pkNext )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spNext.m_pObject = pkNext;
    if ( pkNext )
      InterlockedIncrement((volatile LONG *)&pkNext->m_uiRefCount);
  }
}

//----- (007D93F0) --------------------------------------------------------
NiStringPalette *__thiscall NiStringPalette::`scalar deleting destructor'(NiStringPalette *this, unsigned int a2)
{
  NiStringPalette *v2; // esi@1
  char *v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pcBuffer;
  this->vfptr = (NiRefObjectVtbl *)&NiStringPalette::`vftable';
  operator delete(v3);
  NiRefObject::~NiRefObject((CPostProcessEffect *)v2);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E56DC: using guessed type int (__thiscall *NiStringPalette::`vftable')(void *p, char);

//----- (007D9430) --------------------------------------------------------
unsigned int __thiscall NiStringPalette::AddString(NiStringPalette *this, const char *pcString)
{
  const char *v2; // ebx@1
  NiStringPalette *v3; // esi@1
  unsigned int result; // eax@2
  unsigned int v5; // kr00_4@3
  unsigned int v6; // edi@3
  unsigned int v7; // eax@3
  unsigned int v8; // ecx@3
  unsigned int v9; // ebx@4
  char *v10; // edi@4
  char *v11; // edx@5
  const char *v12; // ecx@5
  int v13; // edx@5
  char v14; // bl@6
  unsigned int uiStringLength; // [sp+8h] [bp-4h]@1

  v2 = pcString;
  v3 = this;
  if ( NiStringPalette::FindString(this, pcString, &uiStringLength) )
  {
    result = uiStringLength;
  }
  else
  {
    v5 = strlen(pcString);
    v6 = v5 + 1;
    v7 = v3->m_uiAllocatedSize;
    v8 = v5 + 1 + v3->m_uiEndOfBuffer;
    uiStringLength = v5 + 1;
    if ( v8 > v7 )
    {
      v9 = 2 * v7;
      v10 = (char *)operator new(2 * v7);
      memset(v10, 0, v9);
      memcpy_s(v10, v9, v3->m_pcBuffer, v3->m_uiAllocatedSize);
      operator delete(v3->m_pcBuffer);
      v3->m_pcBuffer = v10;
      v6 = uiStringLength;
      v3->m_uiAllocatedSize = v9;
      v2 = pcString;
    }
    result = v3->m_uiEndOfBuffer;
    v11 = &v3->m_pcBuffer[result];
    *v11 = 0;
    v12 = v2;
    v13 = v11 - v2;
    do
    {
      v14 = *v12;
      v12[v13] = *v12;
      ++v12;
    }
    while ( v14 );
    v3->m_uiEndOfBuffer += v6;
  }
  return result;
}

//----- (007D94E0) --------------------------------------------------------
char *__thiscall NiControllerSequence::IDTag::GetPropertyType(NiControllerSequence::IDTag *this)
{
  unsigned int v1; // edx@1
  char *result; // eax@2

  v1 = this->m_uiPropertyType;
  if ( v1 == -1 )
    result = 0;
  else
    result = &this->m_spStringPalette.m_pObject->m_pcBuffer[v1];
  return result;
}

//----- (007D9500) --------------------------------------------------------
char *__thiscall NiControllerSequence::IDTag::GetCtlrType(NiControllerSequence::IDTag *this)
{
  unsigned int v1; // edx@1
  char *result; // eax@2

  v1 = this->m_uiCtlrType;
  if ( v1 == -1 )
    result = 0;
  else
    result = &this->m_spStringPalette.m_pObject->m_pcBuffer[v1];
  return result;
}

//----- (007D9520) --------------------------------------------------------
char *__thiscall NiControllerSequence::IDTag::GetCtlrID(NiControllerSequence::IDTag *this)
{
  unsigned int v1; // edx@1
  char *result; // eax@2

  v1 = this->m_uiCtlrID;
  if ( v1 == -1 )
    result = 0;
  else
    result = &this->m_spStringPalette.m_pObject->m_pcBuffer[v1];
  return result;
}

//----- (007D9540) --------------------------------------------------------
void __thiscall NiControllerSequence::NiControllerSequence(NiControllerSequence *this, const char *pcName, unsigned int uiArraySize, unsigned int uiArrayGrowBy, NiStringPalette *pkStringPalette)
{
  NiControllerSequence *v5; // esi@1
  NiStringPalette *v6; // ebx@1
  unsigned int v7; // kr00_4@3
  char *v8; // eax@3
  NiStringPalette *v9; // eax@5
  NiStringPalette *v10; // eax@6
  NiStringPalette *v11; // edi@7
  unsigned int v12; // edi@14
  int v13; // ecx@14
  unsigned int *v14; // eax@14
  int v15; // eax@15
  int v16; // ecx@15
  unsigned int v17; // edi@19
  int v18; // ecx@19
  unsigned int *v19; // eax@19
  int v20; // eax@20
  int v21; // edx@20
  char *v22; // ebx@26
  NiStringPalette *v23; // eax@26
  int v24; // edi@26
  const char *pcNamea; // [sp+14h] [bp+8h]@15
  const char *pcNameb; // [sp+14h] [bp+8h]@20
  const char *pcNamec; // [sp+14h] [bp+8h]@25
  unsigned int uiArraySizea; // [sp+18h] [bp+Ch]@26
  unsigned int ui; // [sp+1Ch] [bp+10h]@24

  v5 = this;
  NiObject::NiObject((NiObject *)&this->vfptr);
  v5->m_fSeqWeight = 1.0;
  v6 = 0;
  v5->m_uiArraySize = uiArraySize;
  v5->vfptr = (NiRefObjectVtbl *)&NiControllerSequence::`vftable';
  v5->m_pcName = 0;
  v5->m_uiArrayGrowBy = uiArrayGrowBy;
  v5->m_pkInterpArray = 0;
  v5->m_pkIDTagArray = 0;
  v5->m_spTextKeys.m_pObject = 0;
  v5->m_fFrequency = 1.0;
  v5->m_eCycleType = 0;
  v5->m_fBeginKeyTime = 3.4028235e38;
  v5->m_fEndKeyTime = -3.4028235e38;
  v5->m_fLastTime = -3.4028235e38;
  v5->m_fWeightedLastTime = -3.4028235e38;
  v5->m_pkOwner = 0;
  v5->m_eState = 0;
  v5->m_fLastScaledTime = -3.4028235e38;
  v5->m_fOffset = -3.4028235e38;
  v5->m_fStartTime = -3.4028235e38;
  v5->m_fEndTime = -3.4028235e38;
  v5->m_pkPartnerSequence = 0;
  v5->m_pcAccumRoot = 0;
  v5->m_fDestFrame = -3.4028235e38;
  v5->m_pkAccumRoot = 0;
  v5->m_spStringPalette.m_pObject = pkStringPalette;
  if ( pkStringPalette )
    InterlockedIncrement((volatile LONG *)&pkStringPalette->m_uiRefCount);
  operator delete(v5->m_pcName);
  v7 = strlen(pcName);
  v8 = (char *)operator new(v7 + 1);
  v5->m_pcName = v8;
  strcpy_s(v8, v7 + 1, pcName);
  if ( v5->m_uiArraySize > 0 )
  {
    if ( !v5->m_spStringPalette.m_pObject )
    {
      v9 = (NiStringPalette *)operator new(0x14u);
      if ( v9 )
      {
        NiStringPalette::NiStringPalette(v9, 320 * v5->m_uiArraySize);
        v6 = v10;
      }
      v11 = v5->m_spStringPalette.m_pObject;
      if ( v11 != v6 )
      {
        if ( v11 && !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
          v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
        v5->m_spStringPalette.m_pObject = v6;
        if ( v6 )
          InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
      }
    }
    v12 = v5->m_uiArraySize;
    v13 = 16 * v5->m_uiArraySize | -((unsigned __int64)v5->m_uiArraySize >> 28 != 0);
    v14 = (unsigned int *)operator new((v13 + 4) | -__CFADD__(v13, 4));
    if ( v14 )
    {
      *v14 = v12;
      v15 = (int)(v14 + 1);
      v16 = v12 - 1;
      pcNamea = (const char *)v15;
      if ( ((v12 - 1) & 0x80000000) == 0 )
      {
        do
        {
          *(_DWORD *)v15 = 0;
          *(_DWORD *)(v15 + 4) = 0;
          *(_DWORD *)(v15 + 8) = 0;
          *(_BYTE *)(v15 + 12) = NiBlendInterpolator::INVALID_INDEX;
          v15 += 16;
          --v16;
        }
        while ( v16 >= 0 );
        v15 = (int)pcNamea;
      }
    }
    else
    {
      v15 = 0;
    }
    v17 = v5->m_uiArraySize;
    v5->m_pkInterpArray = (NiControllerSequence::InterpArrayItem *)v15;
    v18 = 24 * v17 | -(24 * (unsigned __int64)v17 >> 32 != 0);
    v19 = (unsigned int *)operator new((v18 + 4) | -__CFADD__(v18, 4));
    if ( v19 )
    {
      *v19 = v17;
      v20 = (int)(v19 + 1);
      v21 = v17 - 1;
      pcNameb = (const char *)v20;
      if ( ((v17 - 1) & 0x80000000) == 0 )
      {
        do
        {
          *(_DWORD *)v20 = 0;
          *(_DWORD *)(v20 + 4) = -1;
          *(_DWORD *)(v20 + 8) = -1;
          *(_DWORD *)(v20 + 12) = -1;
          *(_DWORD *)(v20 + 16) = -1;
          *(_DWORD *)(v20 + 20) = -1;
          v20 += 24;
          --v21;
        }
        while ( v21 >= 0 );
        v20 = (int)pcNameb;
      }
    }
    else
    {
      v20 = 0;
    }
    v5->m_pkIDTagArray = (NiControllerSequence::IDTag *)v20;
    ui = 0;
    if ( v5->m_uiArraySize > 0 )
    {
      pcNamec = 0;
      do
      {
        v22 = (char *)&pcNamec[(unsigned int)v5->m_pkIDTagArray];
        v23 = v5->m_spStringPalette.m_pObject;
        v24 = *(_DWORD *)v22;
        uiArraySizea = (unsigned int)v23;
        if ( *(NiStringPalette **)v22 != v23 )
        {
          if ( v24 )
          {
            if ( !InterlockedDecrement((volatile LONG *)(v24 + 4)) && v24 )
              (**(void (__thiscall ***)(_DWORD, _DWORD))v24)(v24, 1);
            v23 = (NiStringPalette *)uiArraySizea;
          }
          *(_DWORD *)v22 = v23;
          if ( v23 )
            InterlockedIncrement((volatile LONG *)&v23->m_uiRefCount);
        }
        pcNamec += 24;
        ++ui;
      }
      while ( ui < v5->m_uiArraySize );
    }
  }
}
// 9E57B4: using guessed type int (__thiscall *NiControllerSequence::`vftable')(void *p, char);
// 9E7DD0: using guessed type const unsigned __int8 NiBlendInterpolator::INVALID_INDEX;

//----- (007D97D0) --------------------------------------------------------
void *__thiscall NiControllerSequence::InterpArrayItem::`vector deleting destructor'(NiControllerSequence::InterpArrayItem *this, unsigned int a2)
{
  NiControllerSequence::InterpArrayItem *v2; // ebx@1
  int v3; // eax@2
  char *v4; // ecx@2
  NiInterpolator **v5; // edi@2
  int v6; // esi@3
  NiInterpolator *v7; // esi@7
  void *result; // eax@15
  NiInterpController *v9; // esi@16
  NiInterpolator *v10; // esi@20
  int v11; // [sp+10h] [bp-4h]@2

  v2 = this;
  if ( a2 & 2 )
  {
    v3 = *(_DWORD *)&this[-1].m_ucBlendIdx;
    v4 = &this[-1].m_ucBlendIdx;
    v5 = &v2[*(_DWORD *)&v2[-1].m_ucBlendIdx].m_spInterpolator.m_pObject;
    v11 = v3 - 1;
    if ( v3 - 1 >= 0 )
    {
      do
      {
        v6 = (int)*(v5 - 3);
        v5 -= 4;
        if ( v6 && !InterlockedDecrement((volatile LONG *)(v6 + 4)) && v6 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v6)(v6, 1);
        v7 = *v5;
        if ( *v5 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
        --v11;
      }
      while ( v11 >= 0 );
      v4 = &v2[-1].m_ucBlendIdx;
    }
    if ( a2 & 1 )
      operator delete(v4);
    result = &v2[-1].m_ucBlendIdx;
  }
  else
  {
    v9 = this->m_spInterpCtlr.m_pObject;
    if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    v10 = v2->m_spInterpolator.m_pObject;
    if ( v2->m_spInterpolator.m_pObject && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    if ( a2 & 1 )
      operator delete(v2);
    result = v2;
  }
  return result;
}

//----- (007D98D0) --------------------------------------------------------
void __thiscall NiControllerSequence::~NiControllerSequence(NiControllerSequence *this)
{
  NiControllerSequence *v1; // esi@1
  char *v2; // ST04_4@1
  NiControllerSequence::InterpArrayItem *v3; // ecx@1
  NiControllerSequence::IDTag *v4; // eax@3
  unsigned int v5; // edi@4
  unsigned int *v6; // ecx@4
  int v7; // edx@4
  int v8; // edi@4
  int v9; // ebx@4
  int v10; // esi@5
  NiStringPalette *v11; // esi@12
  NiRefObjectVtbl *v12; // esi@16
  int v13; // [sp+8h] [bp-8h]@4
  CPostProcessEffect *v14; // [sp+Ch] [bp-4h]@1

  v1 = this;
  v2 = this->m_pcName;
  v14 = (CPostProcessEffect *)this;
  this->vfptr = (NiRefObjectVtbl *)&NiControllerSequence::`vftable';
  operator delete(v2);
  v3 = v1->m_pkInterpArray;
  if ( v3 )
    NiControllerSequence::InterpArrayItem::`vector deleting destructor'(v3, 3u);
  v4 = v1->m_pkIDTagArray;
  if ( v4 )
  {
    v5 = v4[-1].m_uiInterpolatorID;
    v6 = &v4[-1].m_uiInterpolatorID;
    v7 = 3 * v5;
    v8 = v5 - 1;
    v13 = (int)&v4[-1].m_uiInterpolatorID;
    v9 = (int)&v4[8 * v7 / 0x18u];
    if ( v8 >= 0 )
    {
      do
      {
        v10 = *(_DWORD *)(v9 - 24);
        v9 -= 24;
        if ( v10 && !InterlockedDecrement((volatile LONG *)(v10 + 4)) && v10 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v10)(v10, 1);
        --v8;
      }
      while ( v8 >= 0 );
      v1 = (NiControllerSequence *)v14;
      v6 = (unsigned int *)v13;
    }
    operator delete(v6);
  }
  operator delete(v1->m_pcAccumRoot);
  v11 = v1->m_spStringPalette.m_pObject;
  if ( v11 && !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
    v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
  v12 = v14[2].vfptr;
  if ( v12 && !InterlockedDecrement((volatile LONG *)&v12[1]) && v12 )
    (*(void (__thiscall **)(NiRefObjectVtbl *, signed int))v12->__vecDelDtor)(v12, 1);
  NiRefObject::~NiRefObject(v14);
}
// 9E57B4: using guessed type int (__thiscall *NiControllerSequence::`vftable')(void *p, char);

//----- (007D99C0) --------------------------------------------------------
double __thiscall NiControllerSequence::GetTimeAt(NiControllerSequence *this, NiTextKeyMatch *pkMatchObject, float fCurrentTime)
{
  NiControllerSequence *v3; // edi@1
  float v4; // ST1C_4@1
  NiTextKeyExtraData *v5; // eax@1
  NiTextKey *v6; // ebx@2
  unsigned int v7; // esi@2
  double v8; // st7@4
  double result; // st7@9
  unsigned int uiNumKeys; // [sp+14h] [bp-14h]@2
  float fTime; // [sp+18h] [bp-10h]@4
  float fCurrentFrame; // [sp+1Ch] [bp-Ch]@1
  float fMatchFrame; // [sp+20h] [bp-8h]@1
  bool bFoundMatch; // [sp+26h] [bp-2h]@1
  bool bFirstMatch; // [sp+27h] [bp-1h]@1
  float fCurrentTimea; // [sp+34h] [bp+Ch]@13

  v3 = this;
  fMatchFrame = this->m_fBeginKeyTime;
  v4 = this->m_fOffset + fCurrentTime;
  fCurrentFrame = NiControllerSequence::ComputeScaledTime(this, v4, 0);
  v5 = v3->m_spTextKeys.m_pObject;
  bFirstMatch = v3->m_eCycleType == 0;
  bFoundMatch = 0;
  if ( v5 && (v6 = v5->m_pKeys, v7 = 0, (uiNumKeys = v5->m_uiNumKeys) != 0) )
  {
    do
    {
      if ( (unsigned __int8)((int (__stdcall *)(char *))pkMatchObject->vfptr[1].__vecDelDtor)(v6[v7].m_pText) )
      {
        bFoundMatch = 1;
        fTime = v6[v7].m_fTime;
        v8 = fTime;
        if ( fCurrentFrame <= (double)fTime )
          goto LABEL_12;
        if ( bFirstMatch )
        {
          fMatchFrame = fTime;
          bFirstMatch = 0;
        }
      }
      ++v7;
    }
    while ( v7 < uiNumKeys );
    if ( !bFoundMatch )
      goto LABEL_9;
    if ( v3->m_eCycleType == LOOP )
    {
      v8 = v3->m_fEndKeyTime - v3->m_fBeginKeyTime + fMatchFrame;
LABEL_12:
      fMatchFrame = v8;
    }
    fCurrentTimea = (fMatchFrame - fCurrentFrame) / v3->m_fFrequency + fCurrentTime;
    result = fCurrentTimea;
  }
  else
  {
LABEL_9:
    result = -3.4028235e38;
  }
  return result;
}

//----- (007D9AA0) --------------------------------------------------------
double __thiscall NiControllerSequence::GetKeyTimeAt(NiControllerSequence *this, const char *pcTextKey)
{
  NiControllerSequence *v2; // esi@1
  double result; // st7@2
  NiTextKeyMatch kMatchObject; // [sp+8h] [bp-10h]@3
  const char *pcTextKeya; // [sp+20h] [bp+8h]@3

  v2 = this;
  if ( pcTextKey )
  {
    kMatchObject.m_uiRefCount = 0;
    InterlockedIncrement(&NiRefObject::ms_uiObjects);
    kMatchObject.vfptr = (NiRefObjectVtbl *)&NiTextKeyMatch::`vftable';
    kMatchObject.m_pcLastKeyMatched = 0;
    kMatchObject.m_pcMatchKey = pcTextKey;
    *(float *)&pcTextKeya = NiControllerSequence::GetKeyTimeAt(v2, &kMatchObject);
    kMatchObject.m_pcLastKeyMatched = 0;
    kMatchObject.vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
    InterlockedDecrement(&NiRefObject::ms_uiObjects);
    result = *(float *)&pcTextKeya;
  }
  else
  {
    result = -3.4028235e38;
  }
  return result;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9B89E8: using guessed type int (__thiscall *NiTextKeyMatch::`vftable')(void *p, char);

//----- (007D9B20) --------------------------------------------------------
void __thiscall NiControllerSequence::SortByBlendInterpolator(NiControllerSequence *this)
{
  NiControllerSequence *v1; // esi@1
  unsigned int v2; // ebx@1
  int v3; // edi@3
  NiInterpolator *v4; // eax@3
  NiInterpController *v5; // eax@5
  NiBlendInterpolator *v6; // eax@7
  char v7; // cl@7
  int v8; // edi@7
  NiBlendInterpolator *v9; // eax@7
  int v10; // edi@10
  int v11; // ecx@10
  NiControllerSequence::InterpArrayItem *v12; // eax@11
  NiControllerSequence::IDTag *v13; // esi@12
  NiBlendInterpolator *v14; // eax@12
  NiStringPalette *v15; // eax@17
  NiControllerSequence *v16; // esi@19
  NiControllerSequence::IDTag *v17; // esi@19
  NiBlendInterpolator *v18; // eax@19
  NiBlendInterpolator *v19; // ecx@19
  int v20; // esi@19
  NiControllerSequence *v21; // esi@27
  NiControllerSequence::InterpArrayItem *v22; // ST00_4@27
  int v23; // esi@27
  int v24; // eax@33
  int v25; // ecx@33
  int v26; // edx@33
  bool v27; // zf@34
  NiInterpController *v28; // edi@39
  NiInterpolator *v29; // edi@42
  NiBlendInterpolator *kTempIDTag; // [sp+8h] [bp-40h]@7
  int kTempIDTag_4; // [sp+Ch] [bp-3Ch]@9
  int kTempIDTag_8; // [sp+10h] [bp-38h]@9
  int kTempIDTag_12; // [sp+14h] [bp-34h]@9
  int kTempIDTag_16; // [sp+18h] [bp-30h]@9
  int kTempIDTag_20; // [sp+1Ch] [bp-2Ch]@9
  NiControllerSequence::InterpArrayItem kTempItem; // [sp+20h] [bp-28h]@3
  unsigned int v37; // [sp+30h] [bp-18h]@10
  NiBlendInterpolator *pkCurInterp; // [sp+34h] [bp-14h]@3
  unsigned int uiIndex; // [sp+38h] [bp-10h]@1
  int v40; // [sp+3Ch] [bp-Ch]@10
  NiControllerSequence *v41; // [sp+40h] [bp-8h]@1
  unsigned int v42; // [sp+44h] [bp-4h]@2

  v1 = this;
  v2 = 0;
  v41 = this;
  uiIndex = 0;
  if ( this->m_uiArraySize )
  {
    v42 = 0;
    do
    {
      v3 = (int)&v1->m_pkInterpArray[v42 / 0x10];
      v4 = *(NiInterpolator **)v3;
      pkCurInterp = *(NiBlendInterpolator **)(v3 + 8);
      kTempItem.m_spInterpolator.m_pObject = v4;
      if ( v4 )
        InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
      v5 = *(NiInterpController **)(v3 + 4);
      kTempItem.m_spInterpCtlr.m_pObject = v5;
      if ( v5 )
        InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
      v6 = *(NiBlendInterpolator **)(v3 + 8);
      v7 = *(_BYTE *)(v3 + 12);
      v8 = (int)&v1->m_pkIDTagArray[v2];
      kTempItem.m_pkBlendInterp = v6;
      v9 = *(NiBlendInterpolator **)v8;
      kTempItem.m_ucBlendIdx = v7;
      kTempIDTag = v9;
      if ( v9 )
      {
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
        v9 = kTempIDTag;
      }
      kTempIDTag_4 = *(_DWORD *)(v8 + 4);
      kTempIDTag_12 = *(_DWORD *)(v8 + 12);
      kTempIDTag_20 = *(_DWORD *)(v8 + 20);
      kTempIDTag_8 = *(_DWORD *)(v8 + 8);
      kTempIDTag_16 = *(_DWORD *)(v8 + 16);
      if ( uiIndex )
      {
        v10 = 0;
        v11 = 0;
        v40 = 0;
        v37 = uiIndex;
        do
        {
          v12 = v1->m_pkInterpArray;
          if ( *(NiBlendInterpolator **)((char *)&v12->m_pkBlendInterp + v11) > pkCurInterp )
          {
            NiControllerSequence::InterpArrayItem::operator=(
              &v12[v42 / 0x10],
              (NiControllerSequence::InterpArrayItem *)((char *)v12 + v11));
            v13 = v1->m_pkIDTagArray;
            v14 = (NiBlendInterpolator *)v13[v2].m_spStringPalette.m_pObject;
            pkCurInterp = v14;
            if ( v14 != (NiBlendInterpolator *)v13[v10].m_spStringPalette.m_pObject )
            {
              if ( v14 && !InterlockedDecrement((volatile LONG *)&v14->m_uiRefCount) && pkCurInterp )
                ((void (__stdcall *)(signed int))pkCurInterp->vfptr->__vecDelDtor)(1);
              v15 = v13[v10].m_spStringPalette.m_pObject;
              v13[v2].m_spStringPalette.m_pObject = v15;
              if ( v15 )
                InterlockedIncrement((volatile LONG *)&v15->m_uiRefCount);
            }
            v13[v2].m_uiAVObjectName = v13[v10].m_uiAVObjectName;
            v13[v2].m_uiPropertyType = v13[v10].m_uiPropertyType;
            v13[v2].m_uiCtlrType = v13[v10].m_uiCtlrType;
            v13[v2].m_uiCtlrID = v13[v10].m_uiCtlrID;
            v13[v2].m_uiInterpolatorID = v13[v10].m_uiInterpolatorID;
            v16 = v41;
            NiControllerSequence::InterpArrayItem::operator=(
              (NiControllerSequence::InterpArrayItem *)((char *)v41->m_pkInterpArray + v40),
              &kTempItem);
            v17 = v16->m_pkIDTagArray;
            v18 = (NiBlendInterpolator *)v17[v10].m_spStringPalette.m_pObject;
            v19 = kTempIDTag;
            v20 = (int)&v17[v10];
            pkCurInterp = v18;
            if ( v18 != kTempIDTag )
            {
              if ( v18 )
              {
                if ( !InterlockedDecrement((volatile LONG *)&v18->m_uiRefCount) && pkCurInterp )
                  ((void (__stdcall *)(signed int))pkCurInterp->vfptr->__vecDelDtor)(1);
                v19 = kTempIDTag;
              }
              *(_DWORD *)v20 = v19;
              if ( v19 )
                InterlockedIncrement((volatile LONG *)&v19->m_uiRefCount);
            }
            *(_DWORD *)(v20 + 4) = kTempIDTag_4;
            *(_DWORD *)(v20 + 8) = kTempIDTag_8;
            *(_DWORD *)(v20 + 12) = kTempIDTag_12;
            *(_DWORD *)(v20 + 16) = kTempIDTag_16;
            *(_DWORD *)(v20 + 20) = kTempIDTag_20;
            v21 = v41;
            v22 = &v41->m_pkInterpArray[v42 / 0x10];
            pkCurInterp = v41->m_pkInterpArray[v42 / 0x10].m_pkBlendInterp;
            NiControllerSequence::InterpArrayItem::operator=(&kTempItem, v22);
            v23 = (int)&v21->m_pkIDTagArray[v2];
            if ( kTempIDTag != *(NiBlendInterpolator **)v23 )
            {
              if ( kTempIDTag && !InterlockedDecrement((volatile LONG *)&kTempIDTag->m_uiRefCount) )
                ((void (__stdcall *)(signed int))kTempIDTag->vfptr->__vecDelDtor)(1);
              kTempIDTag = *(NiBlendInterpolator **)v23;
              if ( *(_DWORD *)v23 )
                InterlockedIncrement((volatile LONG *)(*(_DWORD *)v23 + 4));
            }
            v24 = *(_DWORD *)(v23 + 12);
            kTempIDTag_4 = *(_DWORD *)(v23 + 4);
            v25 = *(_DWORD *)(v23 + 16);
            kTempIDTag_8 = *(_DWORD *)(v23 + 8);
            v26 = *(_DWORD *)(v23 + 20);
            v1 = v41;
            kTempIDTag_16 = v25;
            v11 = v40;
            kTempIDTag_12 = v24;
            kTempIDTag_20 = v26;
          }
          v11 += 16;
          ++v10;
          v27 = v37-- == 1;
          v40 = v11;
        }
        while ( !v27 );
        v9 = kTempIDTag;
      }
      if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
        ((void (__stdcall *)(signed int))kTempIDTag->vfptr->__vecDelDtor)(1);
      v28 = kTempItem.m_spInterpCtlr.m_pObject;
      if ( kTempItem.m_spInterpCtlr.m_pObject
        && !InterlockedDecrement((volatile LONG *)&kTempItem.m_spInterpCtlr.m_pObject->m_uiRefCount) )
      {
        v28->vfptr->__vecDelDtor((NiRefObject *)v28, 1u);
      }
      v29 = kTempItem.m_spInterpolator.m_pObject;
      if ( kTempItem.m_spInterpolator.m_pObject )
      {
        if ( !InterlockedDecrement((volatile LONG *)&kTempItem.m_spInterpolator.m_pObject->m_uiRefCount) )
          v29->vfptr->__vecDelDtor((NiRefObject *)v29, 1u);
      }
      v42 += 16;
      ++v2;
      ++uiIndex;
    }
    while ( uiIndex < v1->m_uiArraySize );
  }
}

//----- (007D9DE0) --------------------------------------------------------
bool __thiscall NiControllerSequence::ResolveTransformInterpolators(NiControllerSequence *this, NiAVObject *pkRoot, NiAVObjectPalette *pkObjectPalette)
{
  NiControllerSequence *v3; // esi@1
  NiTimeController *v4; // edi@1
  unsigned int v5; // ebx@1
  int v6; // esi@4
  NiControllerSequence::IDTag *v7; // eax@5
  unsigned int v8; // ecx@5
  int v9; // eax@5
  const char *v10; // eax@6
  NiInterpController *v12; // eax@12
  NiMultiTargetTransformController *v13; // esi@12
  NiTimeController *v14; // ebx@15
  NiTimeController *v15; // esi@15
  NiControllerManager *v16; // ebx@22
  NiTimeController *v17; // esi@22
  int v18; // eax@33
  int v19; // esi@33
  int v20; // eax@33
  int v21; // ebx@34
  const char *v22; // eax@34
  int v23; // esi@36
  signed int v24; // eax@37
  NiObjectNET *v25; // esi@39
  NiTimeController *v26; // eax@42
  unsigned __int16 v27; // dx@42
  unsigned __int16 v28; // cx@42
  unsigned int v29; // eax@43
  unsigned __int16 v30; // bx@47
  unsigned __int16 v31; // cx@48
  unsigned int v32; // edx@49
  NiInterpController *v33; // esi@56
  int v34; // eax@62
  NiTransformController *pkTransCtlr; // [sp+Ch] [bp-18h]@42
  unsigned int ui; // [sp+10h] [bp-14h]@30
  int v37; // [sp+14h] [bp-10h]@31
  unsigned __int16 usTransformInterpCount; // [sp+18h] [bp-Ch]@3
  int usTransformInterpCounta; // [sp+18h] [bp-Ch]@31
  NiControllerSequence *v40; // [sp+1Ch] [bp-8h]@1
  bool bAddedController; // [sp+23h] [bp-1h]@1
  NiControllerSequence::InterpArrayItem *pkItem; // [sp+2Ch] [bp+8h]@33

  v3 = this;
  v40 = this;
  bAddedController = 0;
  v4 = NiObjectNET::GetController((NiObjectNET *)&pkRoot->vfptr, &NiMultiTargetTransformController::m_RTTI);
  v5 = 0;
  if ( v4 )
  {
    InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  }
  else
  {
    usTransformInterpCount = 0;
    if ( v3->m_uiArraySize <= 0 )
      return 0;
    v6 = 0;
    do
    {
      v7 = v40->m_pkIDTagArray;
      v8 = v7[v6].m_uiCtlrType;
      v9 = (int)&v7[v6];
      if ( v8 != -1 )
      {
        v10 = (const char *)(v8 + *(_DWORD *)(*(_DWORD *)v9 + 8));
        if ( v10 )
        {
          if ( !NiStricmp(v10, "NiTransformController") )
            ++usTransformInterpCount;
        }
      }
      ++v5;
      ++v6;
    }
    while ( v5 < v40->m_uiArraySize );
    if ( !usTransformInterpCount )
      return 0;
    v12 = (NiInterpController *)operator new(0x48u);
    v13 = (NiMultiTargetTransformController *)v12;
    if ( v12 )
    {
      NiInterpController::NiInterpController(v12);
      v13->vfptr = (NiRefObjectVtbl *)&NiMultiTargetTransformController::`vftable';
      v13->m_pkBlendInterps = 0;
      v13->m_ppkTargets = 0;
      v13->m_usNumInterps = 0;
      NiMultiTargetTransformController::AllocateStorage(v13, usTransformInterpCount);
      v4 = (NiTimeController *)v13;
      InterlockedIncrement((volatile LONG *)&v13->m_uiRefCount);
    }
    v4->vfptr[18].__vecDelDtor((NiRefObject *)v4, (unsigned int)pkRoot);
    v4->m_uFlags |= 0x20u;
    bAddedController = 1;
    if ( pkRoot == (NiAVObject *)v40->m_pkOwner->m_pTarget )
    {
      NiObjectNET::RemoveController((NiObjectNET *)&pkRoot->vfptr, v4);
      v14 = v40->m_pkOwner->m_spNext.m_pObject;
      v15 = v4->m_spNext.m_pObject;
      if ( v15 != v14 )
      {
        if ( v15 && !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) && v15 )
          v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
        v4->m_spNext.m_pObject = v14;
        if ( v14 )
          InterlockedIncrement((volatile LONG *)&v14->m_uiRefCount);
      }
      v16 = v40->m_pkOwner;
      v17 = v16->m_spNext.m_pObject;
      if ( v17 == v4 )
      {
        v3 = v40;
      }
      else
      {
        if ( v17 && !InterlockedDecrement((volatile LONG *)&v17->m_uiRefCount) && v17 )
          v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
        v16->m_spNext.m_pObject = v4;
        InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
        v3 = v40;
      }
    }
    else
    {
      v3 = v40;
    }
  }
  ui = 0;
  if ( v3->m_uiArraySize )
  {
    v37 = 0;
    usTransformInterpCounta = 0;
    while ( 1 )
    {
      v18 = (int)&v3->m_pkInterpArray[usTransformInterpCounta];
      v19 = (int)&v3->m_pkIDTagArray[v37];
      pkItem = (NiControllerSequence::InterpArrayItem *)v18;
      v20 = *(_DWORD *)(v19 + 12);
      if ( v20 == -1 )
        goto LABEL_63;
      v21 = *(_DWORD *)(*(_DWORD *)v19 + 8);
      v22 = (const char *)(v21 + v20);
      if ( !v22 || strcmp(v22, "NiTransformController") )
        goto LABEL_63;
      v23 = *(_DWORD *)(v19 + 4);
      v24 = v23 == -1 ? 0 : v23 + v21;
      v25 = (NiObjectNET *)((int (__stdcall *)(signed int))pkObjectPalette->vfptr[15].__vecDelDtor)(v24);
      if ( !v25 || (NiObjectNET *)v40->m_pkAccumRoot == v25 && v40->m_pkOwner->m_bCumulative )
        goto LABEL_63;
      v26 = NiObjectNET::GetController(v25, &NiTransformController::m_RTTI);
      v27 = v4[1].m_uFlags;
      pkTransCtlr = (NiTransformController *)v26;
      v28 = 0;
      if ( v27 > 0u )
      {
        v29 = v4[1].m_uiRefCount;
        while ( *(NiObjectNET **)(v29 + 4 * v28) != v25 )
        {
          if ( ++v28 >= v4[1].m_uFlags )
            goto LABEL_48;
        }
        v30 = v28;
        if ( v28 != NiInterpController::INVALID_INDEX )
          break;
      }
LABEL_48:
      v31 = 0;
      if ( v27 > 0u )
      {
        v32 = v4[1].m_uiRefCount;
        while ( *(_DWORD *)(v32 + 4 * v31) )
        {
          if ( ++v31 >= v4[1].m_uFlags )
            goto LABEL_63;
        }
        *(_DWORD *)(v32 + 4 * v31) = v25;
        v30 = v31;
        if ( v31 != NiInterpController::INVALID_INDEX )
          goto LABEL_56;
      }
LABEL_63:
      ++usTransformInterpCounta;
      ++v37;
      if ( ++ui >= v40->m_uiArraySize )
        goto LABEL_64;
      v3 = v40;
    }
    *(_DWORD *)(v29 + 4 * v28) = v25;
LABEL_56:
    NiObjectNET::RemoveController(v25, (NiTimeController *)&pkTransCtlr->vfptr);
    v33 = pkItem->m_spInterpCtlr.m_pObject;
    if ( (NiTimeController *)v33 != v4 )
    {
      if ( v33 && !InterlockedDecrement((volatile LONG *)&v33->m_uiRefCount) && v33 )
        v33->vfptr->__vecDelDtor((NiRefObject *)v33, 1u);
      pkItem->m_spInterpCtlr.m_pObject = (NiInterpController *)v4;
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
    }
    v34 = (int)&v4[1].vfptr[12 * v30];
    pkItem->m_pkBlendInterp = (NiBlendInterpolator *)v34;
    *(_BYTE *)(v34 + 12) |= 1u;
    goto LABEL_63;
  }
LABEL_64:
  if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  return bAddedController;
}
// 9E571C: using guessed type int (__thiscall *NiMultiTargetTransformController::`vftable')(void *p, char);
// 9E7D04: using guessed type const unsigned __int16 NiInterpController::INVALID_INDEX;

//----- (007DA120) --------------------------------------------------------
char __thiscall NiControllerSequence::Activate(NiControllerSequence *this, int cPriority, bool bStartOver, float fWeight, float fEaseInTime, NiControllerSequence *pkTimeSyncSeq, bool bTransition)
{
  NiControllerSequence *v7; // esi@1
  NiControllerSequence *v9; // eax@4

  v7 = this;
  if ( this->m_eState )
    return 0;
  this->m_pkPartnerSequence = 0;
  if ( pkTimeSyncSeq )
  {
    v9 = pkTimeSyncSeq->m_pkPartnerSequence;
    if ( v9 && (v9 == this || !NiControllerSequence::VerifyDependencies(this, pkTimeSyncSeq->m_pkPartnerSequence))
      || !NiControllerSequence::VerifyMatchingMorphKeys(v7, pkTimeSyncSeq) )
    {
      return 0;
    }
    v7->m_pkPartnerSequence = pkTimeSyncSeq;
  }
  NiControllerSequence::AttachInterpolators(v7, cPriority);
  v7->m_fSeqWeight = fWeight;
  if ( fEaseInTime <= 0.0 )
  {
    v7->m_eState = 1;
  }
  else
  {
    v7->m_eState = bTransition != 0 ? 5 : 2;
    v7->m_fStartTime = -3.4028235e38;
    v7->m_fEndTime = fEaseInTime;
  }
  if ( bStartOver )
    v7->m_fOffset = -3.4028235e38;
  return 1;
}

//----- (007DA1E0) --------------------------------------------------------
char __thiscall NiControllerSequence::Deactivate(NiControllerSequence *this, float fEaseOutTime, bool bTransition)
{
  char result; // al@2

  if ( this->m_eState )
  {
    if ( fEaseOutTime <= 0.0 )
    {
      if ( -3.4028235e38 != this->m_fLastTime )
        this->m_fOffset = this->m_fWeightedLastTime / this->m_fFrequency - this->m_fLastTime + this->m_fOffset;
      this->m_eState = 0;
      this->m_pkPartnerSequence = 0;
      this->m_fDestFrame = -3.4028235e38;
      if ( this->m_fEndKeyTime != this->m_fLastScaledTime )
      {
        this->m_fLastScaledTime = -3.4028235e38;
        this->m_fLastTime = -3.4028235e38;
      }
      NiControllerSequence::DetachInterpolators(this);
      result = 1;
    }
    else
    {
      this->m_eState = (bTransition != 0) + 3;
      result = 1;
      this->m_fStartTime = -3.4028235e38;
      this->m_fEndTime = fEaseOutTime;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007DA290) --------------------------------------------------------
char __thiscall NiControllerSequence::StartBlend(NiControllerSequence *this, NiControllerSequence *pkDestSequence, float fDuration, float fDestFrame, int iPriority, float fSourceWeight, float fDestWeight, NiControllerSequence *pkTimeSyncSeq)
{
  NiControllerSequence *v8; // edi@1
  NiControllerSequence *v9; // eax@6
  char result; // al@14

  v8 = this;
  NiControllerSequence::Deactivate(this, 0.0, 1);
  if ( fDuration <= 0.0 )
    fDuration = 0.000099999997;
  if ( v8->m_eState )
    return 0;
  v8->m_pkPartnerSequence = 0;
  NiControllerSequence::AttachInterpolators(v8, iPriority);
  v8->m_fSeqWeight = fSourceWeight;
  v8->m_eState = 1;
  if ( pkDestSequence->m_eState )
    return 0;
  pkDestSequence->m_pkPartnerSequence = 0;
  if ( pkTimeSyncSeq )
  {
    v9 = pkTimeSyncSeq->m_pkPartnerSequence;
    if ( (!v9
       || v9 != pkDestSequence
       && NiControllerSequence::VerifyDependencies(pkDestSequence, pkTimeSyncSeq->m_pkPartnerSequence))
      && NiControllerSequence::VerifyMatchingMorphKeys(pkDestSequence, pkTimeSyncSeq) )
    {
      pkDestSequence->m_pkPartnerSequence = pkTimeSyncSeq;
      goto LABEL_11;
    }
    return 0;
  }
LABEL_11:
  NiControllerSequence::AttachInterpolators(pkDestSequence, iPriority);
  pkDestSequence->m_fSeqWeight = fDestWeight;
  if ( fDuration <= 0.0 )
  {
    pkDestSequence->m_eState = 1;
  }
  else
  {
    pkDestSequence->m_eState = 5;
    pkDestSequence->m_fStartTime = -3.4028235e38;
    pkDestSequence->m_fEndTime = fDuration;
  }
  NiControllerSequence::Deactivate(v8, fDuration, 1);
  result = 1;
  v8->m_fDestFrame = v8->m_fLastScaledTime / v8->m_fFrequency;
  pkDestSequence->m_fDestFrame = fDestFrame / pkDestSequence->m_fFrequency;
  return result;
}

//----- (007DA390) --------------------------------------------------------
char __thiscall NiControllerSequence::StartMorph(NiControllerSequence *this, NiControllerSequence *pkDestSequence, float fDuration, int iPriority, float fSourceWeight, float fDestWeight)
{
  NiControllerSequence *v6; // esi@1
  NiControllerSequence *v7; // eax@3
  char result; // al@15

  v6 = this;
  NiControllerSequence::Deactivate(this, 0.0, 1);
  if ( v6->m_eState )
    return 0;
  v6->m_pkPartnerSequence = 0;
  if ( pkDestSequence )
  {
    v7 = pkDestSequence->m_pkPartnerSequence;
    if ( v7 && (v7 == v6 || !NiControllerSequence::VerifyDependencies(v6, pkDestSequence->m_pkPartnerSequence))
      || !NiControllerSequence::VerifyMatchingMorphKeys(v6, pkDestSequence) )
    {
      return 0;
    }
    v6->m_pkPartnerSequence = pkDestSequence;
  }
  NiControllerSequence::AttachInterpolators(v6, iPriority);
  v6->m_fSeqWeight = fSourceWeight;
  if ( fDuration <= 0.0 )
  {
    v6->m_eState = 1;
  }
  else
  {
    v6->m_eState = 5;
    v6->m_fStartTime = -3.4028235e38;
    v6->m_fEndTime = fDuration;
  }
  if ( pkDestSequence->m_eState )
    return 0;
  pkDestSequence->m_pkPartnerSequence = 0;
  NiControllerSequence::AttachInterpolators(pkDestSequence, iPriority);
  pkDestSequence->m_fSeqWeight = fDestWeight;
  if ( fDuration <= 0.0 )
  {
    pkDestSequence->m_eState = 1;
  }
  else
  {
    pkDestSequence->m_eState = 5;
    pkDestSequence->m_fStartTime = -3.4028235e38;
    pkDestSequence->m_fEndTime = fDuration;
  }
  result = 1;
  pkDestSequence->m_fOffset = -3.4028235e38;
  v6->m_eState = 6;
  return result;
}

//----- (007DA4A0) --------------------------------------------------------
double __thiscall NiControllerSequence::FindCorrespondingMorphFrame(NiControllerSequence *this, NiControllerSequence *pkSourceSequence, float fSourceSequenceTime)
{
  NiControllerSequence *v3; // edi@1
  NiTextKeyExtraData *v4; // eax@1
  double v5; // st7@1
  float v6; // ecx@1
  NiTextKey *v7; // eax@1
  float *v8; // edx@1
  float *v9; // esi@1
  float *v10; // ebx@1
  NiTextKey *v11; // esi@2
  const char *v12; // eax@3
  float *v13; // eax@12
  double v14; // st6@16
  double v15; // st6@17
  double v16; // st7@17
  double v17; // st6@17
  NiTextKeyExtraData *v18; // eax@20
  unsigned int v19; // esi@20
  NiTextKey *v20; // eax@20
  float *v21; // edx@20
  float *v22; // ecx@20
  unsigned int v23; // ebx@20
  NiTextKey *v24; // ST18_4@42
  NiTextKey *v25; // edi@21
  NiControllerSequence *v26; // ecx@33
  double result; // st7@42
  double v28; // st6@42
  bool v29; // c0@42
  bool v30; // c3@42
  double v31; // st6@42
  NiTextKey *pkLastKey; // [sp+14h] [bp-1Ch]@1
  NiTextKey *pkTargetPrevKey; // [sp+18h] [bp-18h]@20
  NiTextKey *pkTargetNextKey; // [sp+1Ch] [bp-14h]@20
  NiTextKey *pkPrevKey; // [sp+20h] [bp-10h]@1
  NiControllerSequence *v36; // [sp+24h] [bp-Ch]@1
  NiTextKey *pkNextKey; // [sp+28h] [bp-8h]@1
  bool bCreateNext; // [sp+2Fh] [bp-1h]@14
  float fTargetLo; // [sp+38h] [bp+8h]@2
  float fTargetLoa; // [sp+38h] [bp+8h]@31
  bool fTargetLo_3; // [sp+3Bh] [bp+Bh]@20
  float fStartTime; // [sp+3Ch] [bp+Ch]@1
  float fStartTimeb; // [sp+3Ch] [bp+Ch]@17
  float fStartTimec; // [sp+3Ch] [bp+Ch]@19
  float fStartTimea; // [sp+3Ch] [bp+Ch]@31
  float fStartTimed; // [sp+3Ch] [bp+Ch]@42
  float fStartTimee; // [sp+3Ch] [bp+Ch]@43
  float fStartTimef; // [sp+3Ch] [bp+Ch]@45
  bool fStartTime_3; // [sp+3Fh] [bp+Fh]@20

  v3 = pkSourceSequence;
  v36 = this;
  fStartTime = NiControllerSequence::ComputeScaledTime(pkSourceSequence, fSourceSequenceTime, 0);
  v4 = pkSourceSequence->m_spTextKeys.m_pObject;
  v5 = fStartTime;
  v6 = *(float *)&v4->m_uiNumKeys;
  v7 = v4->m_pKeys;
  v8 = 0;
  v9 = 0;
  v10 = 0;
  pkPrevKey = 0;
  pkNextKey = 0;
  pkLastKey = 0;
  if ( v6 == 0.0 )
  {
    v13 = 0;
  }
  else
  {
    v11 = v7;
    fTargetLo = v6;
    do
    {
      v12 = v11->m_pText;
      if ( v12 && !strncmp(v12, "morph:", 6u) )
      {
        pkLastKey = v11;
        if ( !v10 )
          v10 = (float *)v11;
        if ( fStartTime <= (double)v11->m_fTime )
        {
          if ( !pkNextKey )
            pkNextKey = v11;
        }
        else
        {
          pkPrevKey = v11;
        }
      }
      ++v11;
      --LODWORD(fTargetLo);
    }
    while ( fTargetLo != 0.0 );
    v5 = fStartTime;
    v9 = (float *)pkLastKey;
    v13 = (float *)pkNextKey;
    v8 = (float *)pkPrevKey;
  }
  bCreateNext = 0;
  if ( v13 )
  {
    if ( v8 )
    {
      v14 = *v8;
    }
    else
    {
      pkPrevKey = (NiTextKey *)v9;
      v14 = v3->m_fBeginKeyTime - v3->m_fEndKeyTime + *v9;
    }
    fStartTimec = v14;
    v16 = v5 - fStartTimec;
    v17 = *v13 - fStartTimec;
  }
  else
  {
    pkNextKey = (NiTextKey *)v10;
    bCreateNext = 1;
    v15 = *v8;
    v16 = v5 - v15;
    fStartTimeb = v3->m_fEndKeyTime - v3->m_fBeginKeyTime + *v10;
    v17 = fStartTimeb - v15;
  }
  v18 = v36->m_spTextKeys.m_pObject;
  v19 = v18->m_uiNumKeys;
  v20 = v18->m_pKeys;
  fTargetLo_3 = pkPrevKey == 0;
  fStartTime_3 = pkNextKey == 0;
  v21 = 0;
  v22 = 0;
  v23 = 0;
  pkTargetPrevKey = 0;
  pkTargetNextKey = 0;
  if ( v19 )
  {
    v25 = v20;
    do
    {
      if ( fTargetLo_3 )
      {
        if ( fStartTime_3 )
          break;
      }
      else
      {
        if ( !strcmp(v25->m_pText, pkPrevKey->m_pText) )
        {
          pkTargetPrevKey = v25;
          fTargetLo_3 = 1;
        }
        if ( fStartTime_3 )
          goto LABEL_30;
      }
      if ( !strcmp(v25->m_pText, pkNextKey->m_pText) )
      {
        pkTargetNextKey = v25;
        fStartTime_3 = 1;
      }
LABEL_30:
      v22 = (float *)pkTargetNextKey;
      v21 = (float *)pkTargetPrevKey;
      ++v23;
      ++v25;
    }
    while ( v23 < v19 );
  }
  fStartTimea = 0.0;
  fTargetLoa = 0.0;
  if ( v21 == v22 )
  {
    fTargetLoa = *v21;
    fStartTimea = *v22;
    if ( bCreateNext )
    {
      v26 = v36;
      fStartTimea = v36->m_fEndKeyTime - v36->m_fBeginKeyTime + fStartTimea;
    }
    else
    {
      v26 = v36;
      fTargetLoa = fTargetLoa - (v36->m_fEndKeyTime - v36->m_fBeginKeyTime);
    }
  }
  else
  {
    if ( v22 )
      fStartTimea = *v22;
    if ( v21 )
      fTargetLoa = *v21;
    if ( fStartTimea >= (double)fTargetLoa )
    {
      v26 = v36;
    }
    else
    {
      v26 = v36;
      fStartTimea = fStartTimea + v36->m_fEndKeyTime - v36->m_fBeginKeyTime;
    }
  }
  *(float *)&v24 = v16 / v17;
  fStartTimed = (fStartTimea - fTargetLoa) * *(float *)&v24 + fTargetLoa;
  result = fStartTimed;
  v28 = v26->m_fBeginKeyTime;
  v29 = v28 < fStartTimed;
  v30 = v28 == fStartTimed;
  v31 = v26->m_fEndKeyTime;
  if ( v29 || v30 )
  {
    if ( v31 < result )
    {
      fStartTimef = result - (v26->m_fEndKeyTime - v26->m_fBeginKeyTime);
      result = fStartTimef;
    }
  }
  else
  {
    fStartTimee = result + v31 - v26->m_fBeginKeyTime;
    result = fStartTimee;
  }
  return result;
}

//----- (007DA740) --------------------------------------------------------
void __thiscall NiControllerSequence::SetInterpsWeightAndTime(NiControllerSequence *this, float fWeight, float fEaseSpinner, float fTime)
{
  int v4; // ebx@1
  double v5; // st7@2
  double v6; // st5@2
  NiControllerSequence::InterpArrayItem *v7; // esi@3
  NiBlendInterpolator *v8; // edx@3
  int v9; // esi@3
  unsigned __int8 v10; // al@4
  float *v11; // edi@6
  int v12; // edx@8
  unsigned __int8 v13; // al@8
  float *v14; // edi@10
  unsigned __int8 v15; // al@12
  int v16; // esi@12
  double v17; // rt2@14
  double v18; // st5@14
  double v19; // st7@14
  double v20; // rtt@15
  double v21; // rt0@16
  unsigned int ui; // [sp+4h] [bp-4h]@1

  v4 = 0;
  ui = 0;
  if ( this->m_uiArraySize )
  {
    v5 = fTime;
    v6 = fWeight;
    do
    {
      v7 = this->m_pkInterpArray;
      v8 = v7[v4].m_pkBlendInterp;
      v9 = (int)&v7[v4];
      if ( v8 )
      {
        v10 = *(_BYTE *)(v9 + 12);
        if ( v8->m_ucInterpCount != 1 || v10 != v8->m_ucSingleIdx )
        {
          v11 = &v8->m_pkInterpArray[v10].m_fWeight;
          if ( v6 != *v11 )
          {
            *v11 = v6;
            v8->m_fHighSumOfWeights = -3.4028235e38;
            v8->m_fNextHighSumOfWeights = -3.4028235e38;
            v8->m_uFlags |= 4u;
            v8->m_fHighEaseSpinner = -3.4028235e38;
          }
        }
        v12 = *(_DWORD *)(v9 + 8);
        v13 = *(_BYTE *)(v9 + 12);
        if ( *(_BYTE *)(v12 + 14) != 1 || v13 != *(_BYTE *)(v12 + 15) )
        {
          v14 = (float *)(*(_DWORD *)(v12 + 20) + 24 * v13 + 16);
          if ( fEaseSpinner != *v14 )
          {
            *v14 = fEaseSpinner;
            *(float *)(v12 + 36) = -3.4028235e38;
            *(float *)(v12 + 40) = -3.4028235e38;
            *(_BYTE *)(v12 + 12) |= 4u;
            *(float *)(v12 + 44) = -3.4028235e38;
          }
        }
        v15 = *(_BYTE *)(v9 + 12);
        v16 = *(_DWORD *)(v9 + 8);
        if ( *(_BYTE *)(v16 + 14) != 1 || v15 != *(_BYTE *)(v16 + 15) )
        {
          v20 = v6;
          v18 = v5;
          v19 = v20;
          *(float *)(*(_DWORD *)(v16 + 20) + 24 * v15 + 20) = v18;
        }
        else
        {
          v17 = v6;
          v18 = v5;
          v19 = v17;
          *(float *)(v16 + 32) = v18;
        }
        v21 = v18;
        v6 = v19;
        v5 = v21;
      }
      ++v4;
      ++ui;
    }
    while ( ui < this->m_uiArraySize );
  }
}

//----- (007DA860) --------------------------------------------------------
char __thiscall NiControllerSequence::ReallocateArrays(NiControllerSequence *this)
{
  unsigned int v1; // eax@1
  char result; // al@2
  unsigned int v3; // ebx@3
  signed __int64 v4; // rax@3
  unsigned int *v5; // eax@3
  int v6; // esi@4
  int v7; // edi@4
  int i; // eax@4
  int v9; // ecx@8
  unsigned int *v10; // eax@8
  int v11; // edx@9
  int v12; // esi@9
  int j; // eax@9
  int v14; // eax@14
  NiControllerSequence::IDTag *v15; // edi@14
  NiControllerSequence *v16; // esi@16
  NiStringPalette *v17; // eax@18
  NiStringPalette *v18; // esi@18
  NiControllerSequence::InterpArrayItem *v19; // ecx@30
  NiControllerSequence::IDTag *v20; // eax@32
  unsigned int v21; // edi@33
  unsigned int *v22; // ecx@33
  int v23; // edx@33
  int v24; // edi@33
  int v25; // eax@33
  int v26; // esi@36
  NiStringPalette *v27; // [sp+0h] [bp-1Ch]@18
  int v28; // [sp+0h] [bp-1Ch]@36
  NiControllerSequence::IDTag *pkNewIDTagArray; // [sp+4h] [bp-18h]@11
  NiControllerSequence::InterpArrayItem *pkNewInterpArray; // [sp+8h] [bp-14h]@6
  int v31; // [sp+Ch] [bp-10h]@14
  int v32; // [sp+Ch] [bp-10h]@33
  int k; // [sp+10h] [bp-Ch]@14
  unsigned int ui; // [sp+14h] [bp-8h]@13
  NiControllerSequence *v35; // [sp+18h] [bp-4h]@1

  v1 = this->m_uiArrayGrowBy;
  v35 = this;
  if ( v1 )
  {
    v3 = v1 + this->m_uiArraySize;
    v4 = 16i64 * (v1 + this->m_uiArraySize);
    v5 = (unsigned int *)operator new(((v4 | -(HIDWORD(v4) != 0)) + 4) | -__CFADD__(v4 | -(HIDWORD(v4) != 0), 4));
    if ( v5 )
    {
      v6 = v3 - 1;
      v7 = (int)(v5 + 1);
      *v5 = v3;
      for ( i = (int)(v5 + 1); v6 >= 0; --v6 )
      {
        *(_DWORD *)i = 0;
        *(_DWORD *)(i + 4) = 0;
        *(_DWORD *)(i + 8) = 0;
        *(_BYTE *)(i + 12) = NiBlendInterpolator::INVALID_INDEX;
        i += 16;
      }
      pkNewInterpArray = (NiControllerSequence::InterpArrayItem *)v7;
    }
    else
    {
      pkNewInterpArray = 0;
    }
    v9 = 24 * v3 | -(24 * (unsigned __int64)v3 >> 32 != 0);
    v10 = (unsigned int *)operator new((v9 + 4) | -__CFADD__(v9, 4));
    if ( v10 )
    {
      v11 = v3 - 1;
      v12 = (int)(v10 + 1);
      *v10 = v3;
      for ( j = (int)(v10 + 1); v11 >= 0; --v11 )
      {
        *(_DWORD *)j = 0;
        *(_DWORD *)(j + 4) = -1;
        *(_DWORD *)(j + 8) = -1;
        *(_DWORD *)(j + 12) = -1;
        *(_DWORD *)(j + 16) = -1;
        *(_DWORD *)(j + 20) = -1;
        j += 24;
      }
      pkNewIDTagArray = (NiControllerSequence::IDTag *)v12;
    }
    else
    {
      pkNewIDTagArray = 0;
    }
    ui = 0;
    if ( v3 <= 0 )
    {
      v16 = v35;
    }
    else
    {
      v14 = 0;
      v31 = 0;
      v15 = pkNewIDTagArray;
      for ( k = 0; ; v14 = k )
      {
        v16 = v35;
        if ( ui >= v35->m_uiArraySize )
        {
          v17 = v35->m_spStringPalette.m_pObject;
          v18 = v15->m_spStringPalette.m_pObject;
          v27 = v17;
          if ( v15->m_spStringPalette.m_pObject != v17 )
          {
            if ( v18 )
            {
              if ( !InterlockedDecrement((volatile LONG *)&v18->m_uiRefCount) && v18 )
                v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
              v17 = v27;
            }
            v15->m_spStringPalette.m_pObject = v17;
            if ( v17 )
              InterlockedIncrement((volatile LONG *)&v17->m_uiRefCount);
          }
          v16 = v35;
        }
        else
        {
          NiControllerSequence::InterpArrayItem::operator=(
            (NiControllerSequence::InterpArrayItem *)((char *)pkNewInterpArray + v14),
            (NiControllerSequence::InterpArrayItem *)((char *)v35->m_pkInterpArray + v14));
          NiControllerSequence::IDTag::operator=(v15, &v35->m_pkIDTagArray[v31]);
        }
        k += 16;
        ++v31;
        ++v15;
        if ( ++ui >= v3 )
          break;
      }
    }
    v19 = v16->m_pkInterpArray;
    if ( v19 )
      NiControllerSequence::InterpArrayItem::`vector deleting destructor'(v19, 3u);
    v20 = v16->m_pkIDTagArray;
    if ( v20 )
    {
      v21 = v20[-1].m_uiInterpolatorID;
      v22 = &v20[-1].m_uiInterpolatorID;
      v23 = 3 * v21;
      v24 = v21 - 1;
      v32 = (int)&v20[-1].m_uiInterpolatorID;
      v25 = (int)&v20[8 * v23 / 0x18u];
      if ( v24 >= 0 )
      {
        while ( 1 )
        {
          v26 = *(_DWORD *)(v25 - 24);
          v28 = v25 - 24;
          if ( v26 && !InterlockedDecrement((volatile LONG *)(v26 + 4)) )
          {
            if ( v26 )
              (**(void (__thiscall ***)(_DWORD, _DWORD))v26)(v26, 1);
          }
          if ( --v24 < 0 )
            break;
          v25 = v28;
        }
        v16 = v35;
        v22 = (unsigned int *)v32;
      }
      operator delete(v22);
    }
    v16->m_uiArraySize = v3;
    v16->m_pkInterpArray = pkNewInterpArray;
    v16->m_pkIDTagArray = pkNewIDTagArray;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E7DD0: using guessed type const unsigned __int8 NiBlendInterpolator::INVALID_INDEX;

//----- (007DAA70) --------------------------------------------------------
void __thiscall NiControllerSequence::CopyMembers(NiControllerSequence *this, NiControllerSequence *pkDest, NiCloningProcess *kCloning)
{
  NiControllerSequence *v3; // ebx@1
  NiControllerSequence *v4; // esi@1
  const char *v5; // edi@1
  unsigned int v6; // kr00_4@1
  char *v7; // eax@1
  unsigned int v8; // esi@1
  int v9; // ecx@1
  unsigned int *v10; // eax@1
  int v11; // esi@2
  int v12; // edi@2
  int i; // eax@2
  NiControllerSequence::InterpArrayItem *v14; // eax@4
  unsigned int v15; // esi@6
  int v16; // ecx@6
  unsigned int *v17; // eax@6
  int v18; // edx@7
  int v19; // edi@7
  int j; // eax@7
  NiControllerSequence::IDTag *v21; // eax@9
  NiControllerSequence *v22; // esi@11
  NiControllerSequence::InterpArrayItem *v23; // ecx@13
  NiCloningProcess *v24; // eax@15
  NiCloningProcess **v25; // esi@15
  NiCloningProcess *v26; // edi@15
  int v27; // eax@23
  int v28; // eax@24
  NiControllerSequence::InterpArrayItem *v29; // ecx@24
  int v30; // esi@24
  int v31; // edi@24
  NiCloningProcess *v32; // eax@31
  NiCloningProcess **v33; // esi@31
  NiCloningProcess *v34; // edi@31
  int v35; // edi@41
  int v36; // esi@41
  void (__stdcall ***v37)(_DWORD); // eax@41
  int v38; // eax@46
  NiTextKeyExtraData *v39; // edi@49
  NiTextKeyExtraData *v40; // eax@54
  char *v41; // edx@56
  const char *v42; // edi@56
  unsigned int v43; // kr04_4@57
  char *v44; // eax@57
  NiStringPalette *v45; // edi@58
  NiStringPalette *v46; // esi@63
  unsigned int ui; // [sp+Ch] [bp-10h]@11
  NiCloningProcess *v48; // [sp+10h] [bp-Ch]@15
  unsigned int *v49; // [sp+10h] [bp-Ch]@24
  NiCloningProcess *v50; // [sp+10h] [bp-Ch]@31
  void (__stdcall ***v51)(_DWORD); // [sp+10h] [bp-Ch]@41
  int v52; // [sp+14h] [bp-8h]@12
  NiControllerSequence *v53; // [sp+18h] [bp-4h]@1
  NiControllerSequence *pkDestb; // [sp+24h] [bp+8h]@1
  NiControllerSequence *pkDesta; // [sp+24h] [bp+8h]@12
  NiCloningProcess *kCloninga; // [sp+28h] [bp+Ch]@56

  v3 = pkDest;
  v4 = this;
  v53 = this;
  NiObject::CopyMembers((NiObject *)&this->vfptr, (NiObject *)&pkDest->vfptr, kCloning);
  v5 = v4->m_pcName;
  pkDestb = (NiControllerSequence *)v4->m_pcName;
  operator delete(v3->m_pcName);
  v6 = strlen(v5);
  v7 = (char *)operator new(v6 + 1);
  v3->m_pcName = v7;
  strcpy_s(v7, v6 + 1, (const char *)pkDestb);
  v3->m_uiArraySize = v4->m_uiArraySize;
  v3->m_uiArrayGrowBy = v4->m_uiArrayGrowBy;
  v8 = v4->m_uiArraySize;
  v9 = 16 * v8 | -((unsigned __int64)v8 >> 28 != 0);
  v10 = (unsigned int *)operator new((v9 + 4) | -__CFADD__(v9, 4));
  if ( v10 )
  {
    *v10 = v8;
    v11 = v8 - 1;
    v12 = (int)(v10 + 1);
    for ( i = (int)(v10 + 1); v11 >= 0; --v11 )
    {
      *(_DWORD *)i = 0;
      *(_DWORD *)(i + 4) = 0;
      *(_DWORD *)(i + 8) = 0;
      *(_BYTE *)(i + 12) = NiBlendInterpolator::INVALID_INDEX;
      i += 16;
    }
    v14 = (NiControllerSequence::InterpArrayItem *)v12;
  }
  else
  {
    v14 = 0;
  }
  v3->m_pkInterpArray = v14;
  v15 = v53->m_uiArraySize;
  v16 = 24 * v53->m_uiArraySize | -(24 * (unsigned __int64)v53->m_uiArraySize >> 32 != 0);
  v17 = (unsigned int *)operator new((v16 + 4) | -__CFADD__(v16, 4));
  if ( v17 )
  {
    v18 = v15 - 1;
    v19 = (int)(v17 + 1);
    *v17 = v15;
    for ( j = (int)(v17 + 1); v18 >= 0; --v18 )
    {
      *(_DWORD *)j = 0;
      *(_DWORD *)(j + 4) = -1;
      *(_DWORD *)(j + 8) = -1;
      *(_DWORD *)(j + 12) = -1;
      *(_DWORD *)(j + 16) = -1;
      *(_DWORD *)(j + 20) = -1;
      j += 24;
    }
    v21 = (NiControllerSequence::IDTag *)v19;
  }
  else
  {
    v21 = 0;
  }
  v22 = v53;
  v3->m_pkIDTagArray = v21;
  ui = 0;
  if ( v53->m_uiArraySize )
  {
    v52 = 0;
    pkDesta = 0;
    do
    {
      v23 = v22->m_pkInterpArray;
      if ( *(NiInterpolator **)((char *)&v23->m_spInterpolator.m_pObject + (_DWORD)pkDesta) )
      {
        if ( v22->m_pkOwner )
        {
          v32 = NiObject::CreateSharedClone(
                  *(NiObject **)((char *)&v23->m_spInterpolator.m_pObject + (_DWORD)pkDesta),
                  kCloning);
          v33 = (NiCloningProcess **)((char *)pkDesta + (unsigned int)v3->m_pkInterpArray);
          v50 = v32;
          v34 = *v33;
          if ( *v33 != v32 )
          {
            if ( v34 )
            {
              if ( !InterlockedDecrement((volatile LONG *)&v34->m_pkProcessMap) && v34 )
                ((void (__thiscall *)(NiCloningProcess *, signed int))v34->m_pkCloneMap->vfptr)(v34, 1);
              v32 = v50;
            }
            *v33 = v32;
            if ( v32 )
              InterlockedIncrement((volatile LONG *)&v32->m_pkProcessMap);
          }
          *(&v3->m_pkInterpArray->m_ucBlendIdx + (unsigned int)pkDesta) = *((_BYTE *)&pkDesta->m_uiArraySize
                                                                          + (unsigned int)v53->m_pkInterpArray);
        }
        else
        {
          v24 = NiObject::CreateSharedClone(
                  *(NiObject **)((char *)&v23->m_spInterpolator.m_pObject + (_DWORD)pkDesta),
                  kCloning);
          v25 = (NiCloningProcess **)((char *)pkDesta + (unsigned int)v3->m_pkInterpArray);
          v48 = v24;
          v26 = *v25;
          if ( *v25 != v24 )
          {
            if ( v26 )
            {
              if ( !InterlockedDecrement((volatile LONG *)&v26->m_pkProcessMap) && v26 )
                ((void (__thiscall *)(NiCloningProcess *, signed int))v26->m_pkCloneMap->vfptr)(v26, 1);
              v24 = v48;
            }
            *v25 = v24;
            if ( v24 )
              InterlockedIncrement((volatile LONG *)&v24->m_pkProcessMap);
          }
          v27 = (int)&pkDesta->m_uiRefCount + (unsigned int)v53->m_pkInterpArray;
          if ( *(_DWORD *)v27 )
          {
            v28 = (*(int (__stdcall **)(NiCloningProcess *))(**(_DWORD **)v27 + 8))(kCloning);
            v29 = v3->m_pkInterpArray;
            v30 = *(unsigned int *)((char *)&pkDesta->m_uiRefCount + (_DWORD)v29);
            v31 = v28;
            v49 = (unsigned int *)((char *)&pkDesta->m_uiRefCount + (_DWORD)v29);
            if ( v30 != v28 )
            {
              if ( v30 && !InterlockedDecrement((volatile LONG *)(v30 + 4)) && v30 )
                (**(void (__thiscall ***)(_DWORD, _DWORD))v30)(v30, 1);
              *v49 = v31;
              if ( v31 )
                InterlockedIncrement((volatile LONG *)(v31 + 4));
            }
          }
        }
        v22 = v53;
      }
      v35 = (int)&v3->m_pkIDTagArray[v52];
      v36 = (int)&v22->m_pkIDTagArray[v52];
      v37 = *(void (__stdcall ****)(_DWORD))v35;
      v51 = *(void (__stdcall ****)(_DWORD))v35;
      if ( *(_DWORD *)v35 != *(_DWORD *)v36 )
      {
        if ( v37 && !InterlockedDecrement((volatile LONG *)v37 + 1) && v51 )
          (**v51)(1);
        v38 = *(_DWORD *)v36;
        *(_DWORD *)v35 = *(_DWORD *)v36;
        if ( v38 )
          InterlockedIncrement((volatile LONG *)(v38 + 4));
      }
      pkDesta = (NiControllerSequence *)((char *)pkDesta + 16);
      ++v52;
      *(_DWORD *)(v35 + 4) = *(_DWORD *)(v36 + 4);
      *(_DWORD *)(v35 + 8) = *(_DWORD *)(v36 + 8);
      *(_DWORD *)(v35 + 12) = *(_DWORD *)(v36 + 12);
      *(_DWORD *)(v35 + 16) = *(_DWORD *)(v36 + 16);
      *(_DWORD *)(v35 + 20) = *(_DWORD *)(v36 + 20);
      ++ui;
      v22 = v53;
    }
    while ( ui < v53->m_uiArraySize );
  }
  v3->m_fSeqWeight = v22->m_fSeqWeight;
  v39 = v3->m_spTextKeys.m_pObject;
  if ( v39 != v22->m_spTextKeys.m_pObject )
  {
    if ( v39 && !InterlockedDecrement((volatile LONG *)&v39->m_uiRefCount) && v39 )
      v39->vfptr->__vecDelDtor((NiRefObject *)v39, 1u);
    v40 = v22->m_spTextKeys.m_pObject;
    v3->m_spTextKeys.m_pObject = v40;
    if ( v40 )
      InterlockedIncrement((volatile LONG *)&v40->m_uiRefCount);
  }
  v41 = v3->m_pcAccumRoot;
  v3->m_eCycleType = v22->m_eCycleType;
  v3->m_fFrequency = v22->m_fFrequency;
  v3->m_fBeginKeyTime = v22->m_fBeginKeyTime;
  v3->m_fEndKeyTime = v22->m_fEndKeyTime;
  v42 = v22->m_pcAccumRoot;
  kCloninga = (NiCloningProcess *)v22->m_pcAccumRoot;
  operator delete(v41);
  v3->m_pcAccumRoot = 0;
  if ( v42 )
  {
    v43 = strlen(v42);
    v44 = (char *)operator new(v43 + 1);
    v3->m_pcAccumRoot = v44;
    strcpy_s(v44, v43 + 1, (const char *)kCloninga);
  }
  v45 = v3->m_spStringPalette.m_pObject;
  if ( v45 != v22->m_spStringPalette.m_pObject )
  {
    if ( v45 && !InterlockedDecrement((volatile LONG *)&v45->m_uiRefCount) && v45 )
      v45->vfptr->__vecDelDtor((NiRefObject *)v45, 1u);
    v46 = v22->m_spStringPalette.m_pObject;
    v3->m_spStringPalette.m_pObject = v46;
    if ( v46 )
      InterlockedIncrement((volatile LONG *)&v46->m_uiRefCount);
  }
}
// 9E7DD0: using guessed type const unsigned __int8 NiBlendInterpolator::INVALID_INDEX;

//----- (007DAE60) --------------------------------------------------------
void __thiscall NiControllerSequence::InterpArrayItem::LoadBinary(NiControllerSequence::InterpArrayItem *this, NiStream *kStream)
{
  NiControllerSequence::InterpArrayItem *v2; // ebx@1
  NiObject *v3; // eax@1
  NiInterpolator *v4; // esi@1
  NiInterpolator *v5; // edi@1
  NiObject *v6; // eax@8
  NiInterpController *v7; // esi@8
  NiInterpController *v8; // edi@8
  NiStream *v9; // esi@15
  NiBinaryStream *v10; // eax@16
  NiBinaryStream *v11; // ST00_4@16
  unsigned int (__cdecl *v12)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@16
  int v13; // [sp+Ch] [bp-4h]@16

  v2 = this;
  v3 = NiStream::ResolveLinkID(kStream);
  v4 = v2->m_spInterpolator.m_pObject;
  v5 = (NiInterpolator *)v3;
  if ( (NiObject *)v2->m_spInterpolator.m_pObject != v3 )
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v2->m_spInterpolator.m_pObject = v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  }
  v6 = NiStream::ResolveLinkID(kStream);
  v7 = v2->m_spInterpCtlr.m_pObject;
  v8 = (NiInterpController *)v6;
  if ( (NiObject *)v7 != v6 )
  {
    if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v2->m_spInterpCtlr.m_pObject = v8;
    if ( v8 )
      InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
  }
  v9 = kStream;
  if ( kStream->m_uiNifFileVersion < 0xA01006F )
  {
    NiStream::ResolveLinkID(kStream);
    v10 = v9->m_pkIstr;
    v11 = v10;
    v12 = v10->m_pfnRead;
    v13 = 2;
    v12(v11, &kStream, 2u, (unsigned int *)&v13, 1u);
  }
}

//----- (007DAF30) --------------------------------------------------------
void __thiscall NiControllerSequence::IDTag::SaveBinary(NiControllerSequence::IDTag *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiControllerSequence::IDTag *v3; // esi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST3C_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v7; // eax@1
  NiBinaryStream *v8; // ST28_4@1
  unsigned int (__cdecl *v9)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v10; // eax@1
  NiBinaryStream *v11; // ST14_4@1
  unsigned int (__cdecl *v12)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v13; // eax@1
  NiBinaryStream *v14; // ST00_4@1
  unsigned int (__cdecl *v15)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v16; // edi@1
  unsigned int (__cdecl *v17)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@1

  v2 = kStream;
  v3 = this;
  kStream->vfptr->SaveLinkID(kStream, (NiObject *)this->m_spStringPalette.m_pObject);
  v4 = v2->m_pkOstr;
  v5 = v4;
  v6 = v4->m_pfnWrite;
  kStream = (NiStream *)4;
  v6(v5, &v3->m_uiAVObjectName, 4u, (unsigned int *)&kStream, 1u);
  v7 = v2->m_pkOstr;
  v8 = v7;
  v9 = v7->m_pfnWrite;
  kStream = (NiStream *)4;
  v9(v8, &v3->m_uiPropertyType, 4u, (unsigned int *)&kStream, 1u);
  v10 = v2->m_pkOstr;
  v11 = v10;
  v12 = v10->m_pfnWrite;
  kStream = (NiStream *)4;
  v12(v11, &v3->m_uiCtlrType, 4u, (unsigned int *)&kStream, 1u);
  v13 = v2->m_pkOstr;
  v14 = v13;
  v15 = v13->m_pfnWrite;
  kStream = (NiStream *)4;
  v15(v14, &v3->m_uiCtlrID, 4u, (unsigned int *)&kStream, 1u);
  v16 = v2->m_pkOstr;
  v17 = v16->m_pfnWrite;
  kStream = (NiStream *)4;
  v17(v16, &v3->m_uiInterpolatorID, 4u, (unsigned int *)&kStream, 1u);
}

//----- (007DAFE0) --------------------------------------------------------
void __thiscall NiControllerSequence::IDTag::LoadBinary(NiControllerSequence::IDTag *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiControllerSequence::IDTag *v3; // esi@1
  NiStream *v4; // ecx@1
  NiStream *v5; // eax@2
  NiStream *v6; // eax@5
  NiStream *v7; // eax@8
  NiStream *v8; // eax@11
  NiStream *v9; // eax@17
  NiStringPalette *v10; // ebx@17
  NiBinaryStream *v11; // eax@25
  NiBinaryStream *v12; // ST3C_4@25
  unsigned int (__cdecl *v13)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@25
  NiBinaryStream *v14; // eax@25
  NiBinaryStream *v15; // ST28_4@25
  unsigned int (__cdecl *v16)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@25
  NiBinaryStream *v17; // eax@25
  NiBinaryStream *v18; // ST14_4@25
  unsigned int (__cdecl *v19)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@25
  NiBinaryStream *v20; // eax@25
  NiBinaryStream *v21; // ST00_4@25
  unsigned int (__cdecl *v22)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@25
  NiBinaryStream *v23; // edi@25
  unsigned int (__cdecl *v24)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@25

  v2 = kStream;
  v3 = this;
  v4 = kStream;
  if ( kStream->m_uiNifFileVersion >= 0xA010071 )
  {
    v9 = (NiStream *)NiStream::ResolveLinkID(kStream);
    v10 = v3->m_spStringPalette.m_pObject;
    kStream = v9;
    if ( (NiStream *)v10 != v9 )
    {
      if ( v10 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
          v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
        v9 = kStream;
      }
      v3->m_spStringPalette.m_pObject = (NiStringPalette *)v9;
      if ( v9 )
        InterlockedIncrement((volatile LONG *)&v9->m_kGroups);
    }
    v11 = v2->m_pkIstr;
    v12 = v11;
    v13 = v11->m_pfnRead;
    kStream = (NiStream *)4;
    v13(v12, &v3->m_uiAVObjectName, 4u, (unsigned int *)&kStream, 1u);
    v14 = v2->m_pkIstr;
    v15 = v14;
    v16 = v14->m_pfnRead;
    kStream = (NiStream *)4;
    v16(v15, &v3->m_uiPropertyType, 4u, (unsigned int *)&kStream, 1u);
    v17 = v2->m_pkIstr;
    v18 = v17;
    v19 = v17->m_pfnRead;
    kStream = (NiStream *)4;
    v19(v18, &v3->m_uiCtlrType, 4u, (unsigned int *)&kStream, 1u);
    v20 = v2->m_pkIstr;
    v21 = v20;
    v22 = v20->m_pfnRead;
    kStream = (NiStream *)4;
    v22(v21, &v3->m_uiCtlrID, 4u, (unsigned int *)&kStream, 1u);
    v23 = v2->m_pkIstr;
    v24 = v23->m_pfnRead;
    kStream = (NiStream *)4;
    v24(v23, &v3->m_uiInterpolatorID, 4u, (unsigned int *)&kStream, 1u);
  }
  else
  {
    kStream = 0;
    NiStream::LoadCString(v4, (char **)&kStream);
    v5 = kStream;
    if ( kStream )
    {
      v3->m_uiAVObjectName = NiStringPalette::AddString(v3->m_spStringPalette.m_pObject, (const char *)kStream);
      v5 = kStream;
    }
    else
    {
      v3->m_uiAVObjectName = -1;
    }
    operator delete(v5);
    kStream = 0;
    NiStream::LoadCString(v2, (char **)&kStream);
    v6 = kStream;
    if ( kStream )
    {
      v3->m_uiPropertyType = NiStringPalette::AddString(v3->m_spStringPalette.m_pObject, (const char *)kStream);
      v6 = kStream;
    }
    else
    {
      v3->m_uiPropertyType = -1;
    }
    operator delete(v6);
    kStream = 0;
    NiStream::LoadCString(v2, (char **)&kStream);
    v7 = kStream;
    if ( kStream )
    {
      v3->m_uiCtlrType = NiStringPalette::AddString(v3->m_spStringPalette.m_pObject, (const char *)kStream);
      v7 = kStream;
    }
    else
    {
      v3->m_uiCtlrType = -1;
    }
    operator delete(v7);
    kStream = 0;
    NiStream::LoadCString(v2, (char **)&kStream);
    v8 = kStream;
    if ( kStream )
    {
      v3->m_uiCtlrID = NiStringPalette::AddString(v3->m_spStringPalette.m_pObject, (const char *)kStream);
      v8 = kStream;
    }
    else
    {
      v3->m_uiCtlrID = -1;
    }
    operator delete(v8);
    kStream = 0;
    NiStream::LoadCString(v2, (char **)&kStream);
    if ( kStream )
    {
      v3->m_uiInterpolatorID = NiStringPalette::AddString(v3->m_spStringPalette.m_pObject, (const char *)kStream);
      operator delete(kStream);
    }
    else
    {
      v3->m_uiInterpolatorID = -1;
      operator delete(0);
    }
  }
}

//----- (007DB1F0) --------------------------------------------------------
void __thiscall NiControllerSequence::SaveBinary(NiControllerSequence *this, NiStream *kStream)
{
  NiStream *v2; // esi@1
  NiControllerSequence *v3; // edi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST3C_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v7; // eax@1
  NiBinaryStream *v8; // ST28_4@1
  unsigned int (__cdecl *v9)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  char *v10; // ebx@3
  NiBinaryStream *v11; // eax@4
  NiBinaryStream *v12; // ST3C_4@4
  unsigned int (__cdecl *v13)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@4
  NiBinaryStream *v14; // eax@4
  NiBinaryStream *v15; // ST3C_4@4
  unsigned int (__cdecl *v16)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@4
  NiBinaryStream *v17; // eax@4
  NiBinaryStream *v18; // ST28_4@4
  unsigned int (__cdecl *v19)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@4
  NiBinaryStream *v20; // eax@4
  NiBinaryStream *v21; // ST14_4@4
  unsigned int (__cdecl *v22)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@4
  NiBinaryStream *v23; // eax@4
  NiBinaryStream *v24; // ST00_4@4
  unsigned int (__cdecl *v25)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@4
  int v26; // [sp+Ch] [bp-8h]@2
  unsigned int ui; // [sp+10h] [bp-4h]@1

  v2 = kStream;
  v3 = this;
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue(
    (NiVBDynamicSet *)this,
    (IDirect3DVertexBuffer9 *)kStream);
  NiStream::SaveCString(v2, v3->m_pcName);
  v4 = v2->m_pkOstr;
  v5 = v4;
  v6 = v4->m_pfnWrite;
  kStream = (NiStream *)4;
  v6(v5, &v3->m_uiArraySize, 4u, (unsigned int *)&kStream, 1u);
  v7 = v2->m_pkOstr;
  v8 = v7;
  v9 = v7->m_pfnWrite;
  kStream = (NiStream *)4;
  v9(v8, &v3->m_uiArrayGrowBy, 4u, (unsigned int *)&kStream, 1u);
  ui = 0;
  if ( v3->m_uiArraySize )
  {
    v26 = 0;
    kStream = 0;
    do
    {
      v10 = (char *)kStream + (unsigned int)v3->m_pkInterpArray;
      v2->vfptr->SaveLinkID(v2, *(NiObject **)v10);
      v2->vfptr->SaveLinkID(v2, (NiObject *)*((_DWORD *)v10 + 1));
      NiControllerSequence::IDTag::SaveBinary(&v3->m_pkIDTagArray[v26], v2);
      kStream = (NiStream *)((char *)kStream + 16);
      ++ui;
      ++v26;
    }
    while ( ui < v3->m_uiArraySize );
  }
  v11 = v2->m_pkOstr;
  v12 = v11;
  v13 = v11->m_pfnWrite;
  kStream = (NiStream *)4;
  v13(v12, &v3->m_fSeqWeight, 4u, (unsigned int *)&kStream, 1u);
  v2->vfptr->SaveLinkID(v2, (NiObject *)v3->m_spTextKeys.m_pObject);
  v14 = v2->m_pkOstr;
  v15 = v14;
  v16 = v14->m_pfnWrite;
  kStream = (NiStream *)4;
  v16(v15, &v3->m_eCycleType, 4u, (unsigned int *)&kStream, 1u);
  v17 = v2->m_pkOstr;
  v18 = v17;
  v19 = v17->m_pfnWrite;
  kStream = (NiStream *)4;
  v19(v18, &v3->m_fFrequency, 4u, (unsigned int *)&kStream, 1u);
  v20 = v2->m_pkOstr;
  v21 = v20;
  v22 = v20->m_pfnWrite;
  kStream = (NiStream *)4;
  v22(v21, &v3->m_fBeginKeyTime, 4u, (unsigned int *)&kStream, 1u);
  v23 = v2->m_pkOstr;
  v24 = v23;
  v25 = v23->m_pfnWrite;
  kStream = (NiStream *)4;
  v25(v24, &v3->m_fEndKeyTime, 4u, (unsigned int *)&kStream, 1u);
  v2->vfptr->SaveLinkID(v2, (NiObject *)v3->m_pkOwner);
  NiStream::SaveCString(v2, v3->m_pcAccumRoot);
  v2->vfptr->SaveLinkID(v2, (NiObject *)v3->m_spStringPalette.m_pObject);
}

//----- (007DB370) --------------------------------------------------------
void __thiscall NiControllerSequence::LoadBinary(NiControllerSequence *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiControllerSequence *v3; // esi@1
  NiBinaryStream *v4; // eax@2
  NiBinaryStream *v5; // ST18_4@2
  unsigned int (__cdecl *v6)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@2
  unsigned int v7; // ebx@2
  int v8; // ecx@2
  unsigned int *v9; // eax@2
  int v10; // ebx@3
  int v11; // ecx@3
  int k; // eax@3
  NiControllerSequence::InterpArrayItem *v13; // eax@5
  unsigned int v14; // ebx@7
  int v15; // ecx@7
  unsigned int *v16; // eax@7
  int v17; // ebx@8
  int v18; // edx@8
  int l; // eax@8
  NiControllerSequence::IDTag *v20; // eax@10
  NiStringPalette *v21; // eax@12
  NiStream *v22; // eax@13
  NiStringPalette *v23; // ebx@15
  char *v24; // eax@25
  int v25; // ecx@25
  int v26; // ebx@25
  char *v27; // ebx@33
  unsigned int (__cdecl *v28)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@38
  NiBinaryStream *v29; // ST18_4@38
  NiBinaryStream *v30; // eax@38
  NiBinaryStream *v31; // ST04_4@38
  unsigned int (__cdecl *v32)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@38
  unsigned int v33; // ebx@38
  int v34; // ecx@38
  unsigned int *v35; // eax@38
  int v36; // ebx@39
  int v37; // ecx@39
  int i; // eax@39
  NiControllerSequence::InterpArrayItem *v39; // eax@41
  unsigned int v40; // ebx@43
  int v41; // ecx@43
  unsigned int *v42; // eax@43
  int v43; // ebx@44
  int v44; // edx@44
  int j; // eax@44
  NiControllerSequence::IDTag *v46; // eax@46
  NiStringPalette *v47; // eax@49
  NiStream *v48; // eax@50
  NiStringPalette *v49; // ebx@52
  char *v50; // ecx@63
  int v51; // eax@63
  int v52; // ebx@63
  NiBinaryStream *v53; // eax@72
  NiBinaryStream *v54; // ST18_4@72
  unsigned int (__cdecl *v55)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@72
  NiBinaryStream *v56; // eax@72
  NiBinaryStream *v57; // ST18_4@72
  unsigned int (__cdecl *v58)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@72
  unsigned int (__cdecl *v59)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@72
  NiBinaryStream *v60; // ST04_4@72
  NiBinaryStream *v61; // eax@73
  NiBinaryStream *v62; // ST18_4@73
  unsigned int (__cdecl *v63)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@73
  NiBinaryStream *v64; // eax@74
  NiBinaryStream *v65; // ST18_4@74
  unsigned int (__cdecl *v66)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@74
  NiBinaryStream *v67; // eax@74
  NiBinaryStream *v68; // ST04_4@74
  unsigned int (__cdecl *v69)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@74
  NiBinaryStream *v70; // eax@75
  NiBinaryStream *v71; // ST18_4@75
  unsigned int (__cdecl *v72)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@75
  NiObject *v73; // eax@77
  NiStringPalette *v74; // edi@77
  NiStringPalette *v75; // ebx@77
  char **v76; // [sp-4h] [bp-20h]@1
  float fPhase; // [sp+Ch] [bp-10h]@23
  int v78; // [sp+10h] [bp-Ch]@25
  unsigned int v79; // [sp+14h] [bp-8h]@25
  char *pcName; // [sp+18h] [bp-4h]@33

  v2 = kStream;
  v3 = this;
  NiObject::LoadBinary((NiObject *)&this->vfptr, kStream);
  v76 = &v3->m_pcName;
  if ( v2->m_uiNifFileVersion >= 0xA010068 )
  {
    NiStream::LoadCString(v2, v76);
    v28 = v2->m_pkIstr->m_pfnRead;
    v29 = v2->m_pkIstr;
    kStream = (NiStream *)4;
    v28(v29, &v3->m_uiArraySize, 4u, (unsigned int *)&kStream, 1u);
    v30 = v2->m_pkIstr;
    v31 = v30;
    v32 = v30->m_pfnRead;
    kStream = (NiStream *)4;
    v32(v31, &v3->m_uiArrayGrowBy, 4u, (unsigned int *)&kStream, 1u);
    v33 = v3->m_uiArraySize;
    v34 = 16 * v33 | -((unsigned __int64)v33 >> 28 != 0);
    v35 = (unsigned int *)operator new((v34 + 4) | -__CFADD__(v34, 4));
    if ( v35 )
    {
      *v35 = v33;
      v36 = v33 - 1;
      v37 = (int)(v35 + 1);
      for ( i = (int)(v35 + 1); v36 >= 0; --v36 )
      {
        *(_DWORD *)i = 0;
        *(_DWORD *)(i + 4) = 0;
        *(_DWORD *)(i + 8) = 0;
        *(_BYTE *)(i + 12) = NiBlendInterpolator::INVALID_INDEX;
        i += 16;
      }
      v39 = (NiControllerSequence::InterpArrayItem *)v37;
    }
    else
    {
      v39 = 0;
    }
    v40 = v3->m_uiArraySize;
    v3->m_pkInterpArray = v39;
    v41 = 24 * v40 | -(24 * (unsigned __int64)v40 >> 32 != 0);
    v42 = (unsigned int *)operator new((v41 + 4) | -__CFADD__(v41, 4));
    if ( v42 )
    {
      *v42 = v40;
      v43 = v40 - 1;
      v44 = (int)(v42 + 1);
      for ( j = (int)(v42 + 1); v43 >= 0; --v43 )
      {
        *(_DWORD *)j = 0;
        *(_DWORD *)(j + 4) = -1;
        *(_DWORD *)(j + 8) = -1;
        *(_DWORD *)(j + 12) = -1;
        *(_DWORD *)(j + 16) = -1;
        *(_DWORD *)(j + 20) = -1;
        j += 24;
      }
      v46 = (NiControllerSequence::IDTag *)v44;
    }
    else
    {
      v46 = 0;
    }
    v3->m_pkIDTagArray = v46;
    if ( v2->m_uiNifFileVersion < 0xA010071 )
    {
      v47 = (NiStringPalette *)operator new(0x14u);
      if ( v47 )
      {
        NiStringPalette::NiStringPalette(v47, 320 * v3->m_uiArraySize);
        kStream = v48;
      }
      else
      {
        kStream = 0;
        v48 = 0;
      }
      v49 = v3->m_spStringPalette.m_pObject;
      if ( (NiStream *)v49 != v48 )
      {
        if ( v49 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v49->m_uiRefCount) && v49 )
            v49->vfptr->__vecDelDtor((NiRefObject *)v49, 1u);
          v48 = kStream;
        }
        v3->m_spStringPalette.m_pObject = (NiStringPalette *)v48;
        if ( v48 )
          InterlockedIncrement((volatile LONG *)&v48->m_kGroups);
      }
    }
    v79 = 0;
    if ( v3->m_uiArraySize )
    {
      pcName = 0;
      kStream = 0;
      do
      {
        if ( v2->m_uiNifFileVersion < 0xA010071 )
        {
          v50 = &pcName[(unsigned int)v3->m_pkIDTagArray];
          v51 = (int)v3->m_spStringPalette.m_pObject;
          v52 = *(_DWORD *)v50;
          v78 = v51;
          fPhase = *(float *)&v50;
          if ( v52 != v51 )
          {
            if ( v52 )
            {
              if ( !InterlockedDecrement((volatile LONG *)(v52 + 4)) && v52 )
                (**(void (__thiscall ***)(_DWORD, _DWORD))v52)(v52, 1);
              v51 = v78;
              v50 = (char *)LODWORD(fPhase);
            }
            *(_DWORD *)v50 = v51;
            if ( v51 )
              InterlockedIncrement((volatile LONG *)(v51 + 4));
          }
        }
        NiControllerSequence::InterpArrayItem::LoadBinary(
          (NiControllerSequence::InterpArrayItem *)((char *)kStream + (unsigned int)v3->m_pkInterpArray),
          v2);
        NiControllerSequence::IDTag::LoadBinary(
          (NiControllerSequence::IDTag *)&pcName[(unsigned int)v3->m_pkIDTagArray],
          v2);
        kStream = (NiStream *)((char *)kStream + 16);
        ++v79;
        pcName += 24;
      }
      while ( v79 < v3->m_uiArraySize );
    }
    v53 = v2->m_pkIstr;
    v54 = v53;
    v55 = v53->m_pfnRead;
    kStream = (NiStream *)4;
    v55(v54, &v3->m_fSeqWeight, 4u, (unsigned int *)&kStream, 1u);
    NiStream::ReadLinkID(v2);
    v56 = v2->m_pkIstr;
    v57 = v56;
    v58 = v56->m_pfnRead;
    kStream = (NiStream *)4;
    v58(v57, &fPhase, 4u, (unsigned int *)&kStream, 1u);
    *(float *)&v3->m_eCycleType = fPhase;
    v59 = v2->m_pkIstr->m_pfnRead;
    v60 = v2->m_pkIstr;
    kStream = (NiStream *)4;
    v59(v60, &v3->m_fFrequency, 4u, (unsigned int *)&kStream, 1u);
    if ( v2->m_uiNifFileVersion < 0xA030001 )
    {
      v61 = v2->m_pkIstr;
      v62 = v61;
      v63 = v61->m_pfnRead;
      kStream = (NiStream *)4;
      v63(v62, &fPhase, 4u, (unsigned int *)&kStream, 1u);
    }
    v64 = v2->m_pkIstr;
    v65 = v64;
    v66 = v64->m_pfnRead;
    kStream = (NiStream *)4;
    v66(v65, &v3->m_fBeginKeyTime, 4u, (unsigned int *)&kStream, 1u);
    v67 = v2->m_pkIstr;
    v68 = v67;
    v69 = v67->m_pfnRead;
    kStream = (NiStream *)4;
    v69(v68, &v3->m_fEndKeyTime, 4u, (unsigned int *)&kStream, 1u);
    if ( v2->m_uiNifFileVersion < 0xA01006B )
    {
      v70 = v2->m_pkIstr;
      v71 = v70;
      v72 = v70->m_pfnRead;
      LODWORD(fPhase) = 1;
      v72(v71, (char *)&kStream + 3, 1u, (unsigned int *)&fPhase, 1u);
    }
    NiStream::ReadLinkID(v2);
    NiStream::LoadCString(v2, &v3->m_pcAccumRoot);
    if ( v2->m_uiNifFileVersion >= 0xA010071 )
    {
      v73 = NiStream::ResolveLinkID(v2);
      v74 = v3->m_spStringPalette.m_pObject;
      v75 = (NiStringPalette *)v73;
      if ( (NiObject *)v74 != v73 )
      {
        if ( v74 && !InterlockedDecrement((volatile LONG *)&v74->m_uiRefCount) && v74 )
          v74->vfptr->__vecDelDtor((NiRefObject *)v74, 1u);
        v3->m_spStringPalette.m_pObject = v75;
        if ( v75 )
          InterlockedIncrement((volatile LONG *)&v75->m_uiRefCount);
      }
    }
  }
  else
  {
    NiStream::LoadCString(v2, v76);
    NiStream::LoadCString(v2, &v3->m_pcAccumRoot);
    NiStream::ReadLinkID(v2);
    v4 = v2->m_pkIstr;
    v5 = v4;
    v6 = v4->m_pfnRead;
    kStream = (NiStream *)4;
    v6(v5, &v3->m_uiArraySize, 4u, (unsigned int *)&kStream, 1u);
    v7 = v3->m_uiArraySize;
    v3->m_uiArrayGrowBy = 12;
    v8 = 16 * v7 | -((unsigned __int64)v7 >> 28 != 0);
    v9 = (unsigned int *)operator new((v8 + 4) | -__CFADD__(v8, 4));
    if ( v9 )
    {
      *v9 = v7;
      v10 = v7 - 1;
      v11 = (int)(v9 + 1);
      for ( k = (int)(v9 + 1); v10 >= 0; --v10 )
      {
        *(_DWORD *)k = 0;
        *(_DWORD *)(k + 4) = 0;
        *(_DWORD *)(k + 8) = 0;
        *(_BYTE *)(k + 12) = NiBlendInterpolator::INVALID_INDEX;
        k += 16;
      }
      v13 = (NiControllerSequence::InterpArrayItem *)v11;
    }
    else
    {
      v13 = 0;
    }
    v14 = v3->m_uiArraySize;
    v3->m_pkInterpArray = v13;
    v15 = 24 * v14 | -(24 * (unsigned __int64)v14 >> 32 != 0);
    v16 = (unsigned int *)operator new((v15 + 4) | -__CFADD__(v15, 4));
    if ( v16 )
    {
      *v16 = v14;
      v17 = v14 - 1;
      v18 = (int)(v16 + 1);
      for ( l = (int)(v16 + 1); v17 >= 0; --v17 )
      {
        *(_DWORD *)l = 0;
        *(_DWORD *)(l + 4) = -1;
        *(_DWORD *)(l + 8) = -1;
        *(_DWORD *)(l + 12) = -1;
        *(_DWORD *)(l + 16) = -1;
        *(_DWORD *)(l + 20) = -1;
        l += 24;
      }
      v20 = (NiControllerSequence::IDTag *)v18;
    }
    else
    {
      v20 = 0;
    }
    v3->m_pkIDTagArray = v20;
    v21 = (NiStringPalette *)operator new(0x14u);
    if ( v21 )
    {
      NiStringPalette::NiStringPalette(v21, 320 * v3->m_uiArraySize);
      kStream = v22;
    }
    else
    {
      kStream = 0;
      v22 = 0;
    }
    v23 = v3->m_spStringPalette.m_pObject;
    if ( (NiStream *)v23 != v22 )
    {
      if ( v23 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v23->m_uiRefCount) && v23 )
          v23->vfptr->__vecDelDtor((NiRefObject *)v23, 1u);
        v22 = kStream;
      }
      v3->m_spStringPalette.m_pObject = (NiStringPalette *)v22;
      if ( v22 )
        InterlockedIncrement((volatile LONG *)&v22->m_kGroups);
    }
    fPhase = 0.0;
    if ( v3->m_uiArraySize )
    {
      kStream = 0;
      do
      {
        v24 = (char *)kStream + (unsigned int)v3->m_pkIDTagArray;
        v25 = (int)v3->m_spStringPalette.m_pObject;
        v26 = *(_DWORD *)v24;
        v78 = v25;
        v79 = (unsigned int)v24;
        if ( v26 != v25 )
        {
          if ( v26 )
          {
            if ( !InterlockedDecrement((volatile LONG *)(v26 + 4)) && v26 )
              (**(void (__thiscall ***)(_DWORD, _DWORD))v26)(v26, 1);
            v25 = v78;
            v24 = (char *)v79;
          }
          *(_DWORD *)v24 = v25;
          if ( v25 )
            InterlockedIncrement((volatile LONG *)(v25 + 4));
        }
        pcName = 0;
        NiStream::LoadCString(v2, &pcName);
        v27 = (char *)kStream + (unsigned int)v3->m_pkIDTagArray;
        if ( pcName )
          *((_DWORD *)v27 + 1) = NiStringPalette::AddString(*(NiStringPalette **)v27, pcName);
        else
          *((_DWORD *)v27 + 1) = -1;
        operator delete(pcName);
        NiStream::ReadLinkID(v2);
        kStream = (NiStream *)((char *)kStream + 24);
        ++LODWORD(fPhase);
      }
      while ( LODWORD(fPhase) < v3->m_uiArraySize );
    }
  }
}
// 9E7DD0: using guessed type const unsigned __int8 NiBlendInterpolator::INVALID_INDEX;

//----- (007DB930) --------------------------------------------------------
NiControllerSequence *__thiscall NiControllerSequence::`vector deleting destructor'(NiControllerSequence *this, unsigned int a2)
{
  NiControllerSequence *v2; // esi@1

  v2 = this;
  NiControllerSequence::~NiControllerSequence(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007DB960) --------------------------------------------------------
double __thiscall NiControllerSequence::GetTimeAt(NiControllerSequence *this, const char *pcTextKey, float fCurrentTime)
{
  NiControllerSequence *v3; // esi@1
  NiTextKeyMatch kMatchObject; // [sp+8h] [bp-10h]@1
  const char *pcTextKeya; // [sp+20h] [bp+8h]@1

  v3 = this;
  kMatchObject.m_uiRefCount = 0;
  InterlockedIncrement(&NiRefObject::ms_uiObjects);
  kMatchObject.vfptr = (NiRefObjectVtbl *)&NiTextKeyMatch::`vftable';
  kMatchObject.m_pcLastKeyMatched = 0;
  kMatchObject.m_pcMatchKey = pcTextKey;
  *(float *)&pcTextKeya = NiControllerSequence::GetTimeAt(v3, &kMatchObject, fCurrentTime);
  kMatchObject.m_pcLastKeyMatched = 0;
  kMatchObject.vfptr = (NiRefObjectVtbl *)&NiRefObject::`vftable';
  InterlockedDecrement(&NiRefObject::ms_uiObjects);
  return *(float *)&pcTextKeya;
}
// 973A3C: using guessed type int (__thiscall *NiRefObject::`vftable')(void *p, char);
// 9B89E8: using guessed type int (__thiscall *NiTextKeyMatch::`vftable')(void *p, char);

//----- (007DB9D0) --------------------------------------------------------
signed int __thiscall NiControllerSequence::AddInterpolator(NiControllerSequence *this, NiInterpolator *pkInterpolator, NiControllerSequence::IDTag *kIDTag)
{
  NiControllerSequence *v3; // ebx@1
  unsigned int v4; // eax@1
  unsigned int v5; // edi@1
  NiControllerSequence::InterpArrayItem *v6; // ecx@2
  signed int result; // eax@7
  NiInterpolator *v8; // eax@8
  NiInterpolator **v9; // esi@8
  NiInterpolator *v10; // ebx@8
  NiControllerSequence::IDTag *v11; // eax@16
  NiStringPalette *v12; // ebx@16
  int v13; // esi@16
  NiControllerSequence::IDTag *v14; // eax@16
  NiStringPalette *v15; // ecx@22
  NiControllerSequence *v16; // [sp+8h] [bp-4h]@1

  v3 = this;
  v4 = this->m_uiArraySize;
  v5 = 0;
  v16 = this;
  if ( v4 )
  {
    v6 = this->m_pkInterpArray;
    do
    {
      if ( !v6->m_spInterpolator.m_pObject )
        break;
      ++v5;
      ++v6;
    }
    while ( v5 < v4 );
  }
  if ( v5 != v4 || NiControllerSequence::ReallocateArrays(v3) )
  {
    v8 = pkInterpolator;
    v9 = &v3->m_pkInterpArray[v5].m_spInterpolator.m_pObject;
    v10 = *v9;
    if ( *v9 != pkInterpolator )
    {
      if ( v10 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
          v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
        v8 = pkInterpolator;
      }
      *v9 = v8;
      if ( v8 )
        InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
    }
    v11 = v16->m_pkIDTagArray;
    v12 = v11[v5].m_spStringPalette.m_pObject;
    v13 = (int)&v11[v5];
    v14 = kIDTag;
    if ( v12 != kIDTag->m_spStringPalette.m_pObject )
    {
      if ( v12 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
          v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
        v14 = kIDTag;
      }
      v15 = v14->m_spStringPalette.m_pObject;
      *(_DWORD *)v13 = v14->m_spStringPalette.m_pObject;
      if ( v15 )
      {
        InterlockedIncrement((volatile LONG *)&v15->m_uiRefCount);
        v14 = kIDTag;
      }
    }
    *(_DWORD *)(v13 + 4) = v14->m_uiAVObjectName;
    *(_DWORD *)(v13 + 8) = v14->m_uiPropertyType;
    *(_DWORD *)(v13 + 12) = v14->m_uiCtlrType;
    *(_DWORD *)(v13 + 16) = v14->m_uiCtlrID;
    *(_DWORD *)(v13 + 20) = v14->m_uiInterpolatorID;
    result = v5;
  }
  else
  {
    result = -1;
  }
  return result;
}

//----- (007DBAD0) --------------------------------------------------------
void __thiscall NiControllerSequence::Update(NiControllerSequence *this, float fTime, bool bUpdateInterpolators)
{
  NiControllerSequence *v3; // esi@1
  NiControllerSequence::AnimState v4; // ecx@1
  double v5; // st7@2
  double v6; // st6@8
  double v7; // st7@12
  float v8; // ST10_4@21
  float v9; // ST10_4@21
  NiControllerSequence *v10; // eax@21
  float v11; // ST10_4@21
  NiControllerSequence *v12; // ecx@25
  float fEaseOutTime; // ST04_4@27
  float fSourceSequenceTime; // ST08_4@30
  float fStartFrame; // [sp+10h] [bp-8h]@6
  float fEaseSpinner; // [sp+14h] [bp-4h]@6
  float fUpdateTime; // [sp+24h] [bp+Ch]@28
  float fUpdateTimea; // [sp+24h] [bp+Ch]@28
  float fUpdateTimeb; // [sp+24h] [bp+Ch]@30
  float fUpdateTimec; // [sp+24h] [bp+Ch]@30

  v3 = this;
  v4 = this->m_eState;
  if ( v4 )
  {
    v5 = fTime;
    if ( -3.4028235e38 == v3->m_fOffset )
      v3->m_fOffset = -v5;
    if ( -3.4028235e38 == v3->m_fStartTime )
    {
      v3->m_fStartTime = fTime;
      v3->m_fEndTime = v3->m_fEndTime + v5;
    }
    fEaseSpinner = 1.0;
    fStartFrame = 1.0;
    switch ( v4 )
    {
      case 2:
        if ( v3->m_fEndTime <= v5 )
          goto LABEL_17;
        v6 = v5 - v3->m_fStartTime;
        goto LABEL_9;
      case 5:
        if ( v3->m_fEndTime <= v5 )
        {
          if ( -3.4028235e38 != v3->m_fDestFrame )
          {
            v3->m_fOffset = v3->m_fDestFrame - v5;
            v3->m_fDestFrame = -3.4028235e38;
          }
LABEL_17:
          v3->m_eState = 1;
        }
        else
        {
          fStartFrame = (v5 - v3->m_fStartTime) / (v3->m_fEndTime - v3->m_fStartTime);
        }
        goto LABEL_10;
      case 3:
        if ( v3->m_fEndTime <= v5 )
        {
          NiControllerSequence::Deactivate(v3, 0.0, 0);
          return;
        }
        v6 = v3->m_fEndTime - v5;
LABEL_9:
        fEaseSpinner = v6 / (v3->m_fEndTime - v3->m_fStartTime);
        goto LABEL_10;
      case 6:
        v8 = v5 + v3->m_fOffset;
        v9 = NiControllerSequence::FindCorrespondingMorphFrame(v3->m_pkPartnerSequence, v3, v8);
        v10 = v3->m_pkPartnerSequence;
        v11 = v9 / v10->m_fFrequency;
        v5 = fTime;
        v10->m_fOffset = v11 - fTime;
        v3->m_eState = 4;
        goto LABEL_22;
      case 4:
LABEL_22:
        if ( v3->m_fEndTime <= v5 )
        {
          NiControllerSequence::Deactivate(v3, 0.0, 1);
        }
        else
        {
          fStartFrame = (v3->m_fEndTime - v5) / (v3->m_fEndTime - v3->m_fStartTime);
LABEL_10:
          if ( bUpdateInterpolators )
          {
            if ( -3.4028235e38 == v3->m_fDestFrame )
            {
              v12 = v3->m_pkPartnerSequence;
              if ( v12 )
              {
                if ( v12->m_fOffset + v5 != v12->m_fLastTime )
                {
                  fEaseOutTime = v5;
                  NiControllerSequence::Update(v12, fEaseOutTime, 0);
                  v5 = fTime;
                }
                fUpdateTime = v5 + v3->m_pkPartnerSequence->m_fOffset;
                fUpdateTimea = NiControllerSequence::FindCorrespondingMorphFrame(
                                 v3,
                                 v3->m_pkPartnerSequence,
                                 fUpdateTime);
                v7 = fUpdateTimea / v3->m_fFrequency;
              }
              else
              {
                v7 = v5 + v3->m_fOffset;
              }
            }
            else
            {
              v7 = v3->m_fDestFrame;
            }
            fUpdateTimeb = v7;
            fSourceSequenceTime = NiControllerSequence::ComputeScaledTime(v3, fUpdateTimeb, 1);
            fUpdateTimec = v3->m_fSeqWeight * fStartFrame;
            NiControllerSequence::SetInterpsWeightAndTime(v3, fUpdateTimec, fEaseSpinner, fSourceSequenceTime);
          }
        }
        break;
      default:
        goto LABEL_10;
    }
  }
}

//----- (007DBD20) --------------------------------------------------------
char __thiscall NiControllerSequence::StoreTargets(NiControllerSequence *this, NiAVObject *pkRoot)
{
  NiControllerSequence *v2; // ebx@1
  NiAVObjectPalette *v3; // esi@1
  char *v4; // eax@1
  NiInterpolator *v5; // ecx@6
  NiControllerSequence::IDTag *v6; // edi@7
  unsigned int v7; // ecx@9
  signed int v8; // eax@10
  int v9; // edx@12
  unsigned int v10; // ecx@13
  int v11; // ebx@15
  NiObjectNET *v12; // edi@16
  const char **v13; // esi@16
  NiTimeController *v14; // esi@23
  const char **v15; // ebx@24
  const char *v16; // ebx@25
  char *v17; // eax@25
  NiControllerManager *v18; // eax@32
  unsigned int v19; // ecx@34
  int v20; // eax@35
  unsigned __int16 v21; // ax@37
  int v22; // ebx@37
  NiShader *v23; // eax@38
  NiShader *v24; // edi@38
  NiControllerSequence *v25; // eax@38
  NiAVObjectPalette *pkObjectPalette; // [sp+2Ch] [bp-24h]@1
  unsigned int ui; // [sp+30h] [bp-20h]@3
  int v29; // [sp+38h] [bp-18h]@4
  NiControllerSequence::IDTag *kIDTag; // [sp+3Ch] [bp-14h]@7
  int v31; // [sp+40h] [bp-10h]@4
  NiObjectNET *pkTarget; // [sp+44h] [bp-Ch]@12
  NiControllerSequence *v33; // [sp+48h] [bp-8h]@1
  bool bSelectiveUpdate; // [sp+4Fh] [bp-1h]@47

  v2 = this;
  v3 = this->m_pkOwner->m_spObjectPalette.m_pObject;
  v4 = this->m_pcAccumRoot;
  v33 = this;
  pkObjectPalette = this->m_pkOwner->m_spObjectPalette.m_pObject;
  if ( v4 )
    this->m_pkAccumRoot = (NiAVObject *)v3->vfptr[15].__vecDelDtor((NiRefObject *)v3, (unsigned int)v4);
  BYTE3(pkRoot) = NiControllerSequence::ResolveTransformInterpolators(v2, pkRoot, v3);
  ui = 0;
  if ( v2->m_uiArraySize <= 0 )
    goto LABEL_46;
  v31 = 0;
  v29 = 0;
  while ( 2 )
  {
    v5 = v2->m_pkInterpArray[v31].m_spInterpolator.m_pObject;
    if ( !v5 )
      goto LABEL_45;
    v6 = &v2->m_pkIDTagArray[v29];
    kIDTag = &v2->m_pkIDTagArray[v29];
    if ( !(unsigned __int8)((int (__stdcall *)(NiAVObjectPalette *))v5->vfptr[31].__vecDelDtor)(v3)
      || v2->m_pkInterpArray[v31].m_pkBlendInterp )
    {
      goto LABEL_45;
    }
    v7 = v6->m_uiAVObjectName;
    v8 = (signed int)(v7 == -1 ? 0 : &v6->m_spStringPalette.m_pObject->m_pcBuffer[v7]);
    v9 = (int)v3->vfptr[15].__vecDelDtor((NiRefObject *)v3, v8);
    pkTarget = (NiObjectNET *)v9;
    if ( !v9 )
      goto LABEL_45;
    v10 = v6->m_uiPropertyType;
    if ( v10 != -1 && &v6->m_spStringPalette.m_pObject->m_pcBuffer[v10] )
    {
      v11 = *(_DWORD *)(v9 + 160);
      if ( v11 )
      {
        while ( 1 )
        {
          v12 = *(NiObjectNET **)(v11 + 8);
          v11 = *(_DWORD *)v11;
          v13 = (const char **)((int (__thiscall *)(NiObjectNET *))v12->vfptr[1].__vecDelDtor)(v12);
          if ( !strcmp(*v13, NiControllerSequence::IDTag::GetPropertyType(kIDTag)) )
            break;
          if ( !v11 )
            goto LABEL_20;
        }
        pkTarget = v12;
LABEL_20:
        v9 = (int)pkTarget;
        v6 = kIDTag;
      }
      v2 = v33;
    }
    if ( !v9 )
      goto LABEL_45;
    v14 = *(NiTimeController **)(v9 + 12);
    if ( !v14 )
      goto LABEL_31;
    do
    {
      v15 = (const char **)((int (__thiscall *)(NiTimeController *))v14->vfptr[1].__vecDelDtor)(v14);
      if ( strcmp(*v15, NiControllerSequence::IDTag::GetCtlrType(v6)) )
        goto LABEL_29;
      v16 = (const char *)((int (__thiscall *)(NiTimeController *))v14->vfptr[31].__vecDelDtor)(v14);
      v17 = NiControllerSequence::IDTag::GetCtlrID(v6);
      if ( v16 )
      {
        if ( !v17 )
          goto LABEL_29;
        v17 = (char *)strcmp(v16, NiControllerSequence::IDTag::GetCtlrID(v6));
      }
      if ( !v17 )
        goto LABEL_34;
LABEL_29:
      v14 = v14->m_spNext.m_pObject;
    }
    while ( v14 );
    v9 = (int)pkTarget;
    v2 = v33;
LABEL_31:
    v14 = (NiTimeController *)&v2->m_pkInterpArray[v31].m_spInterpCtlr.m_pObject->vfptr;
    if ( v14 )
    {
      v14->vfptr[18].__vecDelDtor((NiRefObject *)v14, v9);
      v18 = v2->m_pkOwner;
      BYTE3(pkRoot) = 1;
      if ( pkTarget == v18->m_pTarget )
      {
        NiObjectNET::RemoveController(pkTarget, v14);
        NiTimeController::SetNext(v14, v2->m_pkOwner->m_spNext.m_pObject);
        NiTimeController::SetNext((NiTimeController *)&v2->m_pkOwner->vfptr, v14);
      }
LABEL_34:
      v19 = v6->m_uiInterpolatorID;
      if ( v19 == -1 )
        v20 = 0;
      else
        v20 = (int)&v6->m_spStringPalette.m_pObject->m_pcBuffer[v19];
      v21 = (int)v14->vfptr[27].__vecDelDtor((NiRefObject *)v14, v20);
      v22 = v21;
      if ( v21 == NiInterpController::INVALID_INDEX )
        goto LABEL_44;
      v23 = (NiShader *)v14->vfptr[28].__vecDelDtor((NiRefObject *)v14, v21);
      v24 = CPostProcessEffect::DynamicCast(&NiBlendInterpolator::m_RTTI, v23);
      v25 = v33;
      if ( (NiObjectNET *)v33->m_pkAccumRoot == pkTarget )
        v33->m_pkOwner->m_bCumulative;
      if ( v24 )
      {
LABEL_43:
        v14->m_uFlags |= 0x20u;
        NiPointer<PopupMenuWin>::operator=(
          (NiPointer<NiD3DDefaultShader> *)&v25->m_pkInterpArray[v31].m_spInterpCtlr,
          (NiD3DDefaultShader *)v14);
        v33->m_pkInterpArray[v31].m_pkBlendInterp = (NiBlendInterpolator *)v24;
        v2 = v33;
      }
      else
      {
        v24 = (NiShader *)((int (__thiscall *)(NiTimeController *, int, signed int))v14->vfptr[34].__vecDelDtor)(
                            v14,
                            v22,
                            1);
        ((void (__thiscall *)(NiTimeController *, NiShader *, int))v14->vfptr[29].__vecDelDtor)(v14, v24, v22);
        if ( v24 )
        {
          v25 = v33;
          goto LABEL_43;
        }
LABEL_44:
        v2 = v33;
      }
    }
LABEL_45:
    ++v29;
    ++v31;
    if ( ++ui < v2->m_uiArraySize )
    {
      v3 = pkObjectPalette;
      continue;
    }
    break;
  }
LABEL_46:
  if ( BYTE3(pkRoot) )
    ((void (__stdcall *)(bool *, signed int, char *))v2->m_pkOwner->m_pTarget->vfptr[19].__vecDelDtor)(
      &bSelectiveUpdate,
      1,
      (char *)&pkRoot + 3);
  NiControllerSequence::SortByBlendInterpolator(v2);
  return 1;
}
// 9E7D04: using guessed type const unsigned __int16 NiInterpController::INVALID_INDEX;

//----- (007DC050) --------------------------------------------------------
char __thiscall NiControllerSequence::StartBlend(NiControllerSequence *this, NiControllerSequence *pkDestSequence, float fDuration, const char *pcDestTextKey, int iPriority, float fSourceWeight, float fDestWeight, NiControllerSequence *pkTimeSyncSeq)
{
  NiControllerSequence *v8; // esi@1
  float fDestFrame; // [sp+20h] [bp-4h]@1
  float fKeyTime; // [sp+34h] [bp+10h]@2

  fDestFrame = 0.0;
  v8 = this;
  if ( pcDestTextKey )
  {
    fKeyTime = NiControllerSequence::GetKeyTimeAt(pkDestSequence, pcDestTextKey);
    if ( -3.402823466385289e38 != fKeyTime )
      fDestFrame = fKeyTime;
  }
  return NiControllerSequence::StartBlend(
           v8,
           pkDestSequence,
           fDuration,
           fDestFrame,
           iPriority,
           fSourceWeight,
           fDestWeight,
           pkTimeSyncSeq);
}

//----- (007DC0D0) --------------------------------------------------------
char __thiscall NiControllerSequence::ConvertOldNameControllerPair(NiControllerSequence *this, const char *pcObjectName, NiInterpController *pkController)
{
  NiControllerSequence *v3; // ebx@1
  int v4; // eax@1
  _BYTE *v5; // edi@1
  int v6; // eax@2
  _BYTE *v7; // edi@2
  void *(__thiscall *v8)(NiRefObject *, unsigned int); // eax@3
  char result; // al@4
  NiStringPalette *v10; // edi@6
  const char *v11; // eax@10
  const char *v12; // eax@13
  const char *v13; // eax@16
  NiInterpolator *v14; // eax@19
  signed int v15; // eax@19
  NiControllerSequence::InterpArrayItem *v16; // edx@20
  int v17; // eax@20
  NiInterpController *v18; // edi@20
  NiInterpController **v19; // ebx@20
  NiStringPalette *v20; // edi@26
  void *(__thiscall *v21)(NiRefObject *, unsigned int); // edx@29
  unsigned __int16 v22; // di@29
  NiControllerSequence *v23; // [sp+Ch] [bp-330h]@1
  NiControllerSequence::IDTag kIDTag; // [sp+10h] [bp-32Ch]@6
  unsigned int us; // [sp+28h] [bp-314h]@3
  char acObjectName[260]; // [sp+2Ch] [bp-310h]@1
  char acTargetName[260]; // [sp+130h] [bp-20Ch]@1
  char acTargetType[260]; // [sp+234h] [bp-108h]@1

  v3 = this;
  v23 = this;
  strcpy_s(acObjectName, 0x104u, pcObjectName);
  acTargetType[0] = 0;
  acTargetName[0] = 0;
  strchr(acObjectName, 10);
  v5 = (_BYTE *)v4;
  if ( v4 )
  {
    strcpy_s(acTargetType, 0x104u, (const char *)(v4 + 1));
    *v5 = 0;
    strchr(acTargetType, 10);
    v7 = (_BYTE *)v6;
    strcpy_s(acTargetName, 0x104u, (const char *)(v6 + 1));
    *v7 = 0;
  }
  v8 = pkController->vfptr[25].__vecDelDtor;
  us = 0;
  if ( (unsigned __int16)((int (__thiscall *)(NiInterpController *))v8)(pkController) > 0u )
  {
    while ( 1 )
    {
      v10 = v3->m_spStringPalette.m_pObject;
      kIDTag.m_spStringPalette.m_pObject = v10;
      if ( v10 )
        InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
      kIDTag.m_uiPropertyType = -1;
      kIDTag.m_uiAVObjectName = NiStringPalette::AddString(v10, acObjectName);
      if ( !strcmp(acTargetType, "PROP") )
        kIDTag.m_uiPropertyType = NiStringPalette::AddString(v10, acTargetName);
      v11 = *(const char **)((int (__thiscall *)(NiInterpController *))pkController->vfptr[1].__vecDelDtor)(pkController);
      kIDTag.m_uiCtlrType = v11 ? NiStringPalette::AddString(v10, v11) : -1;
      v12 = (const char *)((int (__thiscall *)(NiInterpController *))pkController->vfptr[31].__vecDelDtor)(pkController);
      kIDTag.m_uiCtlrID = v12 ? NiStringPalette::AddString(v10, v12) : -1;
      v13 = (const char *)pkController->vfptr[26].__vecDelDtor((NiRefObject *)pkController, us);
      kIDTag.m_uiInterpolatorID = v13 ? NiStringPalette::AddString(v10, v13) : -1;
      v14 = (NiInterpolator *)pkController->vfptr[28].__vecDelDtor((NiRefObject *)pkController, us);
      v15 = NiControllerSequence::AddInterpolator(v3, v14, &kIDTag);
      if ( v15 == -1 )
        break;
      v16 = v3->m_pkInterpArray;
      v17 = v15;
      v18 = v16[4 * v17 / 0x10u].m_spInterpCtlr.m_pObject;
      v19 = &v16[4 * v17 / 0x10u].m_spInterpCtlr.m_pObject;
      if ( v18 != pkController )
      {
        if ( v18 && !InterlockedDecrement((volatile LONG *)&v18->m_uiRefCount) && v18 )
          v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
        *v19 = pkController;
        InterlockedIncrement((volatile LONG *)&pkController->m_uiRefCount);
      }
      v20 = kIDTag.m_spStringPalette.m_pObject;
      if ( kIDTag.m_spStringPalette.m_pObject )
      {
        if ( !InterlockedDecrement((volatile LONG *)&kIDTag.m_spStringPalette.m_pObject->m_uiRefCount) )
          v20->vfptr->__vecDelDtor((NiRefObject *)v20, 1u);
      }
      v21 = pkController->vfptr[25].__vecDelDtor;
      v22 = ++us;
      if ( v22 >= (unsigned __int16)((int (__thiscall *)(NiInterpController *))v21)(pkController) )
        goto LABEL_4;
      v3 = v23;
    }
    if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
    result = 0;
  }
  else
  {
LABEL_4:
    result = 1;
  }
  return result;
}

//----- (007DC380) --------------------------------------------------------
NiObject *__thiscall NiControllerSequence::CreateClone(NiControllerSequence *this, NiCloningProcess *kCloning)
{
  NiControllerSequence *v2; // edi@1
  NiControllerSequence *v3; // eax@1
  NiControllerSequence *v4; // eax@2
  NiObject *v5; // esi@2
  NiObject *result; // eax@2

  v2 = this;
  v3 = (NiControllerSequence *)operator new(0x68u);
  if ( v3 )
  {
    NiControllerSequence::NiControllerSequence(v3);
    v5 = (NiObject *)v4;
    NiControllerSequence::CopyMembers(v2, v4, kCloning);
    result = v5;
  }
  else
  {
    NiControllerSequence::CopyMembers(v2, 0, kCloning);
    result = 0;
  }
  return result;
}

//----- (007DC3D0) --------------------------------------------------------
char __thiscall NiControllerSequence::AddNameControllerPair(NiControllerSequence *this, const char *pcObjectName, NiTimeController *pkController)
{
  NiControllerSequence *v3; // edi@1
  NiRTTI *v4; // eax@3
  char result; // al@6

  v3 = this;
  if ( pcObjectName
    && pkController
    && (v4 = (NiRTTI *)((int (__thiscall *)(_DWORD))pkController->vfptr[1].__vecDelDtor)(pkController)) != 0 )
  {
    while ( v4 != &NiInterpController::m_RTTI )
    {
      v4 = v4->m_pkBaseRTTI;
      if ( !v4 )
        goto LABEL_6;
    }
    pkController->m_uFlags = pkController->m_uFlags & 0xFFF9 | 2 * LOWORD(v3->m_eCycleType);
    pkController->m_fFrequency = v3->m_fFrequency;
    pkController->m_uFlags &= 0xFFEFu;
    result = NiControllerSequence::ConvertOldNameControllerPair(v3, pcObjectName, (NiInterpController *)pkController);
  }
  else
  {
LABEL_6:
    result = 0;
  }
  return result;
}

//----- (007DC450) --------------------------------------------------------
void __thiscall NiControllerSequence::PostLinkObject(NiControllerSequence *this, NiStream *kStream)
{
  NiControllerSequence *v2; // esi@1
  unsigned int v3; // ebx@2
  unsigned int v4; // edi@2
  int v5; // edx@3
  int v6; // ecx@4
  unsigned int v7; // edi@12
  int v8; // eax@17
  int v9; // ecx@17
  const char *v10; // ebx@18
  unsigned int v11; // kr00_4@20
  int v12; // eax@24
  NiInterpController *v13; // edi@24
  int v14; // edi@29
  int v15; // ebx@29
  int v16; // ebx@34
  unsigned int v17; // ecx@41
  NiInterpController *v18; // edi@42
  unsigned int v19; // eax@43
  const char *v20; // ebx@47
  NiRTTI *v21; // eax@49
  char **v22; // ebx@57
  unsigned int v23; // esi@57
  NiTArray<NiPointer<NiInterpController> > kCtlrs; // [sp+8h] [bp-40h]@15
  NiTArray<char *> kNames; // [sp+20h] [bp-28h]@12
  char *pcName; // [sp+38h] [bp-10h]@20
  unsigned int v27; // [sp+3Ch] [bp-Ch]@2
  unsigned int v28; // [sp+40h] [bp-8h]@16
  unsigned int v29; // [sp+44h] [bp-4h]@16
  unsigned int ui; // [sp+50h] [bp+8h]@15
  unsigned int uia; // [sp+50h] [bp+8h]@41

  v2 = this;
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue(
    (NiVBDynamicSet *)this,
    (IDirect3DVertexBuffer9 *)kStream);
  if ( kStream->m_uiNifFileVersion < 0xA010068 )
  {
    v3 = v2->m_uiArraySize;
    v2->m_fBeginKeyTime = 3.4028235e38;
    v4 = 0;
    v27 = v3;
    v2->m_fEndKeyTime = -3.4028235e38;
    if ( v3 )
    {
      v5 = (int)&v2->m_pkInterpArray->m_spInterpCtlr;
      do
      {
        v6 = *(_DWORD *)v5;
        if ( v2->m_fBeginKeyTime > (double)*(float *)(*(_DWORD *)v5 + 20) )
          v2->m_fBeginKeyTime = *(float *)(v6 + 20);
        if ( v2->m_fEndKeyTime < (double)*(float *)(v6 + 24) )
          v2->m_fEndKeyTime = *(float *)(v6 + 24);
        ++v4;
        v5 += 16;
      }
      while ( v4 < v3 );
    }
    if ( 3.4028235e38 == v2->m_fBeginKeyTime && -3.4028235e38 == v2->m_fEndKeyTime )
    {
      v2->m_fEndKeyTime = 0.0;
      v2->m_fBeginKeyTime = 0.0;
    }
    v7 = 0;
    kNames.m_uiSize = 0;
    if ( v3 )
      kNames.m_pBase = (char **)operator new(4 * v3);
    else
      kNames.m_pBase = 0;
    NiTArray<NiPointer<NiInterpController>>::NiTArray<NiPointer<NiInterpController>>(&kCtlrs, v2->m_uiArraySize, 1u);
    ui = 0;
    if ( v2->m_uiArraySize )
    {
      v28 = 0;
      v29 = 0;
      do
      {
        v8 = (int)&v2->m_pkIDTagArray[v29 / 0x18];
        v9 = *(_DWORD *)(v8 + 4);
        if ( v9 == -1 )
          v10 = 0;
        else
          v10 = (const char *)(v9 + *(_DWORD *)(*(_DWORD *)v8 + 8));
        v11 = strlen(v10);
        pcName = (char *)operator new(v11 + 1);
        strcpy_s(pcName, v11 + 1, v10);
        if ( ui < v27 )
        {
          if ( ui >= kNames.m_uiSize )
            kNames.m_uiSize = ui + 1;
          kNames.m_pBase[ui] = pcName;
        }
        v12 = (int)&v2->m_pkIDTagArray[v29 / 0x18];
        *(_DWORD *)(v12 + 4) = -1;
        *(_DWORD *)(v12 + 8) = -1;
        *(_DWORD *)(v12 + 12) = -1;
        *(_DWORD *)(v12 + 16) = -1;
        *(_DWORD *)(v12 + 20) = -1;
        v13 = v2->m_pkInterpArray[v28 / 0x10].m_spInterpCtlr.m_pObject;
        pcName = (char *)v13;
        if ( v13 )
          InterlockedIncrement((volatile LONG *)&v13->m_uiRefCount);
        NiTArray<NiPointer<NiActorManager::CallbackData>>::SetAt(
          (NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *)&kCtlrs,
          ui,
          (NiPointer<NiD3DShaderConstantMapEntry> *)&pcName);
        if ( v13 && !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) )
          v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
        v14 = (int)&v2->m_pkInterpArray[v28 / 0x10];
        v15 = *(_DWORD *)v14;
        if ( *(_DWORD *)v14 )
        {
          if ( !InterlockedDecrement((volatile LONG *)(v15 + 4)) && v15 )
            (**(void (__thiscall ***)(_DWORD, _DWORD))v15)(v15, 1);
          *(_DWORD *)v14 = 0;
        }
        v16 = *(_DWORD *)(v14 + 4);
        if ( v16 )
        {
          if ( !InterlockedDecrement((volatile LONG *)(v16 + 4)) && v16 )
            (**(void (__thiscall ***)(_DWORD, _DWORD))v16)(v16, 1);
          *(_DWORD *)(v14 + 4) = 0;
        }
        v29 += 24;
        v28 += 16;
        *(_DWORD *)(v14 + 8) = 0;
        *(_BYTE *)(v14 + 12) = NiBlendInterpolator::INVALID_INDEX;
        ++ui;
      }
      while ( ui < v2->m_uiArraySize );
      v7 = kNames.m_uiSize;
    }
    v17 = 0;
    uia = 0;
    if ( kCtlrs.m_uiSize )
    {
      do
      {
        v18 = kCtlrs.m_pBase[v17].m_pObject;
        if ( !v17 )
        {
          v19 = ((unsigned int)v18->m_uFlags >> 1) & 3;
          v2->m_eCycleType = v19;
          if ( v19 != 2 && v19 )
            v2->m_eCycleType = 0;
          v2->m_fFrequency = v18->m_fFrequency;
        }
        v20 = kNames.m_pBase[v17];
        if ( v20 && v18 )
        {
          v21 = (NiRTTI *)((int (__thiscall *)(NiInterpController *))v18->vfptr[1].__vecDelDtor)(v18);
          if ( v21 )
          {
            while ( v21 != &NiInterpController::m_RTTI )
            {
              v21 = v21->m_pkBaseRTTI;
              if ( !v21 )
                goto LABEL_54;
            }
            v18->m_uFlags = v18->m_uFlags & 0xFFF9 | 2 * LOWORD(v2->m_eCycleType);
            v18->m_fFrequency = v2->m_fFrequency;
            v18->m_uFlags &= 0xFFEFu;
            NiControllerSequence::ConvertOldNameControllerPair(v2, v20, v18);
          }
LABEL_54:
          v17 = uia;
        }
        uia = ++v17;
      }
      while ( v17 < kCtlrs.m_uiSize );
      v7 = kNames.m_uiSize;
    }
    v22 = kNames.m_pBase;
    v23 = 0;
    if ( v7 )
    {
      do
        operator delete(v22[v23++]);
      while ( v23 < v7 );
    }
    NiTArray<NiPointer<NiInterpController>>::~NiTArray<NiPointer<NiInterpController>>(&kCtlrs);
    operator delete(v22);
  }
}
// 9E7DD0: using guessed type const unsigned __int8 NiBlendInterpolator::INVALID_INDEX;

//----- (007DC770) --------------------------------------------------------
NiPointer<NiControllerSequence> *__cdecl NiControllerSequence::ConvertOldSequence(NiPointer<NiControllerSequence> *result, NiSequence *pkOldSequence)
{
  NiControllerSequence *v2; // eax@1
  NiSequence *v3; // edi@1
  int v4; // eax@2
  int v5; // esi@2
  unsigned int v6; // ebx@4
  const char *v7; // edx@5
  NiTimeController *v8; // ecx@5
  unsigned int v9; // eax@8
  NiTextKeyExtraData *v10; // ebx@14
  NiTextKeyExtraData *v11; // edi@14
  char bFirstTime_3; // [sp+1Bh] [bp+Fh]@4

  v2 = (NiControllerSequence *)operator new(0x68u);
  v3 = pkOldSequence;
  if ( v2 )
  {
    NiControllerSequence::NiControllerSequence(
      v2,
      pkOldSequence->m_pcName,
      pkOldSequence->m_kObjectName.m_uiSize,
      pkOldSequence->m_kObjectName.m_uiSize,
      0);
    v5 = v4;
    if ( v4 )
      InterlockedIncrement((volatile LONG *)(v4 + 4));
  }
  else
  {
    v5 = 0;
  }
  v6 = 0;
  bFirstTime_3 = 1;
  if ( v3->m_kObjectName.m_uiSize )
  {
    do
    {
      v7 = v3->m_kObjectName.m_pBase[v6];
      v8 = (NiTimeController *)&v3->m_kCtrl.m_pBase[v6].m_pObject->vfptr;
      if ( v7 && v8 )
      {
        if ( bFirstTime_3 )
        {
          v9 = ((unsigned int)v8->m_uFlags >> 1) & 3;
          if ( v9 != 2 && v9 )
            v9 = 0;
          *(_DWORD *)(v5 + 36) = v9;
          *(float *)(v5 + 40) = v8->m_fFrequency;
          bFirstTime_3 = 0;
          *(float *)(v5 + 44) = v8->m_fLoKeyTime;
          *(float *)(v5 + 48) = v8->m_fHiKeyTime;
        }
        NiControllerSequence::AddNameControllerPair((NiControllerSequence *)v5, v7, v8);
      }
      ++v6;
    }
    while ( v6 < v3->m_kObjectName.m_uiSize );
  }
  v10 = v3->m_spTextKeys.m_pObject;
  v11 = *(NiTextKeyExtraData **)(v5 + 32);
  if ( v11 != v10 )
  {
    if ( v11 && !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
      v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
    *(_DWORD *)(v5 + 32) = v10;
    if ( v10 )
      InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
  }
  operator delete(*(void **)(v5 + 92));
  *(_DWORD *)(v5 + 92) = 0;
  result->m_pObject = (NiControllerSequence *)v5;
  InterlockedIncrement((volatile LONG *)(v5 + 4));
  if ( !InterlockedDecrement((volatile LONG *)(v5 + 4)) )
    (**(void (__thiscall ***)(_DWORD, _DWORD))v5)(v5, 1);
  return result;
}

//----- (007DC8A0) --------------------------------------------------------
NiPointer<NiControllerSequence> *__cdecl NiControllerSequence::CreateSequenceFromFile(NiPointer<NiControllerSequence> *result, NiStream *kStream, unsigned int uiIndex)
{
  NiPointer<NiControllerSequence> *v3; // eax@2
  NiControllerSequence *v4; // esi@3
  NiControllerSequence *v5; // eax@4
  NiStream *v6; // edi@6
  void (__thiscall ***v7)(_DWORD, _DWORD); // edi@10
  NiShader *v8; // eax@14

  if ( uiIndex < kStream->m_kTopObjects.m_uiSize )
  {
    v4 = 0;
    if ( kStream->m_uiNifFileVersion >= 0x5000000 )
    {
      v8 = CPostProcessEffect::DynamicCast(
             &NiControllerSequence::m_RTTI,
             (NiShader *)kStream->m_kTopObjects.m_pBase[uiIndex].m_pObject);
      if ( v8 )
      {
        v4 = (NiControllerSequence *)v8;
        InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
      }
    }
    else
    {
      NiSequence::CreateFromKFFile((NiPointer<NiSequence> *)&uiIndex, kStream, uiIndex, 0);
      v5 = NiControllerSequence::ConvertOldSequence((NiPointer<NiControllerSequence> *)&kStream, (NiSequence *)uiIndex)->m_pObject;
      if ( v5 )
      {
        v4 = v5;
        InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
      }
      v6 = kStream;
      if ( kStream && !InterlockedDecrement((volatile LONG *)&kStream->m_kGroups) && v6 )
        v6->vfptr->__vecDelDtor(v6, 1u);
      v7 = (void (__thiscall ***)(_DWORD, _DWORD))uiIndex;
      if ( uiIndex && !InterlockedDecrement((volatile LONG *)(uiIndex + 4)) && v7 )
        (**v7)(v7, 1);
    }
    result->m_pObject = v4;
    if ( v4 )
    {
      InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
      if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    }
    v3 = result;
  }
  else
  {
    v3 = result;
    result->m_pObject = 0;
  }
  return v3;
}

//----- (007DC9A0) --------------------------------------------------------
NiPointer<NiControllerSequence> *__cdecl NiControllerSequence::CreateSequenceFromFile(NiPointer<NiControllerSequence> *result, const char *pcFilename, unsigned int uiIndex)
{
  NiStream kStream; // [sp+Ch] [bp-3DCh]@1

  NiStream::NiStream(&kStream);
  if ( NiStream::Load(&kStream, pcFilename) )
    NiControllerSequence::CreateSequenceFromFile(result, &kStream, uiIndex);
  else
    result->m_pObject = 0;
  NiStream::~NiStream(&kStream);
  return result;
}

//----- (007DCA20) --------------------------------------------------------
void __thiscall NiFloatInterpController::SaveBinary(NiTransformController *this, NiStream *kStream)
{
  NiSingleInterpController::SaveBinary((NiSingleInterpController *)&this->vfptr, kStream);
}

//----- (007DCA30) --------------------------------------------------------
bool __thiscall NiTransformController::IsEqual(NiTransformController *this, NiObject *pkObject)
{
  return NiSingleInterpController::IsEqual((NiSingleInterpController *)&this->vfptr, pkObject) != 0;
}

//----- (007DCA50) --------------------------------------------------------
void __thiscall NiQuatTransform::NiQuatTransform(NiQuatTransform *this)
{
  this->m_kTranslate = NiQuatTransform::INVALID_TRANSLATE;
  this->m_kRotate = NiQuatTransform::INVALID_ROTATE;
  this->m_fScale = -3.4028235e38;
}
// A7CAD0: using guessed type const struct NiPoint3 NiQuatTransform::INVALID_TRANSLATE;

//----- (007DCAA0) --------------------------------------------------------
void __thiscall NiBlendAccumTransformInterpolator::AccumArrayItem::ClearValues(NiBlendAccumTransformInterpolator::AccumArrayItem *this)
{
  this->m_fLastTime = -3.4028235e38;
  this->m_kLastValue.m_kTranslate.x = -3.4028235e38;
  this->m_kLastValue.m_kRotate.m_fX = -3.4028235e38;
  this->m_kLastValue.m_fScale = -3.4028235e38;
  this->m_kDeltaValue.m_kTranslate.x = -3.4028235e38;
  this->m_kDeltaValue.m_kRotate.m_fX = -3.4028235e38;
  this->m_kDeltaValue.m_fScale = -3.4028235e38;
  qmemcpy(&this->m_kRefFrame, &NiMatrix3::IDENTITY, sizeof(this->m_kRefFrame));
}

//----- (007DCB00) --------------------------------------------------------
void __thiscall NiTransformController::CreatePoseInterpolator(NiTransformController *this, unsigned __int16 usIndex)
{
  NiObjectNET *v2; // esi@1
  float v3; // ecx@1
  float v4; // edx@1
  float v5; // eax@1
  NiTransformInterpolator *v6; // eax@1
  NiQuatTransform v7; // [sp-20h] [bp-58h]@2
  NiQuatTransform kTransform; // [sp+8h] [bp-30h]@1
  NiQuaternion kRotate; // [sp+28h] [bp-10h]@1

  v2 = this->m_pTarget;
  NiQuaternion::FromRotation(&kRotate, (NiMatrix3 *)&v2[1].m_uiMaxSize);
  v3 = *(float *)&v2[3].m_uiRefCount;
  kTransform.m_fScale = *(float *)&v2[3].m_ppkExtra;
  v4 = *(float *)&v2[3].m_pcName;
  v5 = *(float *)&v2[3].m_spControllers.m_pObject;
  kTransform.m_kTranslate.x = v3;
  kTransform.m_kTranslate.y = v4;
  kTransform.m_kTranslate.z = v5;
  kTransform.m_kRotate = kRotate;
  v6 = (NiTransformInterpolator *)operator new(0x3Cu);
  if ( v6 )
  {
    qmemcpy(&v7, &kTransform, sizeof(v7));
    NiTransformInterpolator::NiTransformInterpolator(v6, v7);
  }
}

//----- (007DCB80) --------------------------------------------------------
void __thiscall NiTransformController::LoadBinary(NiTransformController *this, NiStream *kStream)
{
  NiSingleInterpController::LoadBinary((NiSingleInterpController *)&this->vfptr, kStream);
  if ( kStream->m_uiNifFileVersion < 0xA010068 )
    NiStream::ReadLinkID(kStream);
}

//----- (007DCBB0) --------------------------------------------------------
void __thiscall NiTransformController::LinkObject(NiTransformController *this, NiStream *kStream)
{
  NiTransformController *v2; // ebx@1
  NiTransformData *v3; // esi@2
  NiTransformInterpolator *v4; // eax@2
  NiInterpolator *v5; // eax@3
  NiInterpolator *v6; // edi@3
  NiInterpolator *v7; // esi@5

  v2 = this;
  NiSingleInterpController::LinkObject((NiSingleInterpController *)&this->vfptr, kStream);
  if ( kStream->m_uiNifFileVersion < 0xA010068 )
  {
    v3 = (NiTransformData *)NiStream::GetObjectFromLinkID(kStream);
    v4 = (NiTransformInterpolator *)operator new(0x3Cu);
    if ( v4 )
    {
      NiTransformInterpolator::NiTransformInterpolator(v4, v3);
      v6 = v5;
    }
    else
    {
      v6 = 0;
    }
    v7 = v2->m_spInterpolator.m_pObject;
    if ( v7 != v6 )
    {
      if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      v2->m_spInterpolator.m_pObject = v6;
      if ( v6 )
        InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
    }
    ((void (*)(void))v2->m_spInterpolator.m_pObject->vfptr[27].__vecDelDtor)();
  }
}

//----- (007DCC40) --------------------------------------------------------
char __thiscall NiTimeController::DontDoUpdate(NiTimeController *this, float fTime)
{
  NiTimeController *v2; // esi@1

  v2 = this;
  if ( (LOBYTE(this->m_uFlags) >> 3) & 1 && (fTime != this->m_fLastTime || this->m_bForceUpdate) )
  {
    if ( !this->m_bComputeScaledTime )
    {
      this->m_bForceUpdate = 0;
      return 0;
    }
    ((void (__stdcall *)(_DWORD))this->vfptr[21].__vecDelDtor)(LODWORD(fTime));
    if ( fTime != v2->m_fScaledTime || v2->m_bForceUpdate )
    {
      v2->m_fScaledTime = fTime;
      v2->m_bForceUpdate = 0;
      return 0;
    }
  }
  return 1;
}

//----- (007DCCC0) --------------------------------------------------------
void __thiscall NiBlendAccumTransformInterpolator::AccumArrayItem::AccumArrayItem(NiBlendAccumTransformInterpolator::AccumArrayItem *this)
{
  this->m_kLastValue.m_kTranslate = NiQuatTransform::INVALID_TRANSLATE;
  this->m_kLastValue.m_kRotate = NiQuatTransform::INVALID_ROTATE;
  this->m_kLastValue.m_fScale = -3.4028235e38;
  this->m_kDeltaValue.m_kTranslate = NiQuatTransform::INVALID_TRANSLATE;
  this->m_kDeltaValue.m_kRotate = NiQuatTransform::INVALID_ROTATE;
  this->m_kDeltaValue.m_fScale = -3.4028235e38;
  this->m_fLastTime = -3.4028235e38;
  this->m_kLastValue.m_kTranslate.x = -3.4028235e38;
  this->m_kLastValue.m_kRotate.m_fX = -3.4028235e38;
  this->m_kLastValue.m_fScale = -3.4028235e38;
  this->m_kDeltaValue.m_kTranslate.x = -3.4028235e38;
  this->m_kDeltaValue.m_kRotate.m_fX = -3.4028235e38;
  this->m_kDeltaValue.m_fScale = -3.4028235e38;
  qmemcpy(&this->m_kRefFrame, &NiMatrix3::IDENTITY, sizeof(this->m_kRefFrame));
}
// A7CAD0: using guessed type const struct NiPoint3 NiQuatTransform::INVALID_TRANSLATE;

//----- (007DCDC0) --------------------------------------------------------
void __thiscall NiBlendAccumTransformInterpolator::NiBlendAccumTransformInterpolator(NiBlendAccumTransformInterpolator *this, bool bManagerControlled, float fWeightThreshold, char ucArraySize)
{
  NiBlendAccumTransformInterpolator *v4; // esi@1
  char v5; // al@1
  int v6; // ebx@2
  NiBlendAccumTransformInterpolator::AccumArrayItem *v7; // eax@2
  int v8; // ebx@3
  NiBlendAccumTransformInterpolator::AccumArrayItem *v9; // edi@3
  NiBlendAccumTransformInterpolator::AccumArrayItem *ucArraySizea; // [sp+1Ch] [bp+10h]@2

  v4 = this;
  NiBlendInterpolator::NiBlendInterpolator(
    (NiBlendInterpolator *)&this->vfptr,
    bManagerControlled,
    fWeightThreshold,
    ucArraySize);
  v4->vfptr = (NiRefObjectVtbl *)&NiBlendAccumTransformInterpolator::`vftable';
  v4->m_kAccumulatedTransformValue.m_kTranslate = NiQuatTransform::INVALID_TRANSLATE;
  v4->m_kAccumulatedTransformValue.m_kRotate = NiQuatTransform::INVALID_ROTATE;
  v4->m_kAccumulatedTransformValue.m_fScale = -3.4028235e38;
  v5 = v4->m_ucArraySize;
  v4->m_pkAccumArray = 0;
  v4->m_bReset = 0;
  if ( v5 )
  {
    v6 = (unsigned __int8)v5;
    v7 = (NiBlendAccumTransformInterpolator::AccumArrayItem *)operator new(104 * (unsigned __int8)v5);
    ucArraySizea = v7;
    if ( v7 )
    {
      v8 = v6 - 1;
      v9 = v7;
      if ( v8 >= 0 )
      {
        do
        {
          NiBlendAccumTransformInterpolator::AccumArrayItem::AccumArrayItem(v9);
          ++v9;
          --v8;
        }
        while ( v8 >= 0 );
        v7 = ucArraySizea;
      }
      v4->m_pkAccumArray = v7;
    }
    else
    {
      v4->m_pkAccumArray = 0;
    }
  }
}
// 9E580C: using guessed type int (__thiscall *NiBlendAccumTransformInterpolator::`vftable')(void *p, char);
// A7CAD0: using guessed type const struct NiPoint3 NiQuatTransform::INVALID_TRANSLATE;

//----- (007DCE90) --------------------------------------------------------
NiRTTI *NiBlendAccumTransformInterpolator::GetRTTI()
{
  return &NiBlendAccumTransformInterpolator::m_RTTI;
}

//----- (007DCEA0) --------------------------------------------------------
NiBlendAccumTransformInterpolator *__thiscall NiBlendAccumTransformInterpolator::`scalar deleting destructor'(NiBlendAccumTransformInterpolator *this, unsigned int a2)
{
  NiBlendAccumTransformInterpolator *v2; // esi@1

  v2 = this;
  NiBlendAccumTransformInterpolator::~NiBlendAccumTransformInterpolator(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007DCED0) --------------------------------------------------------
void __thiscall NiTransformInterpolator::SetPoseValue(NiTransformInterpolator *this, NiQuatTransform kPoseValue)
{
  NiTransformInterpolator *v2; // esi@1
  NiTransformData *v3; // ecx@2
  NiTransformData *v4; // ecx@5
  NiTransformData *v5; // ecx@8

  v2 = this;
  if ( -3.4028235e38 != kPoseValue.m_kRotate.m_fX )
  {
    this->m_kTransformValue.m_kRotate.m_fW = kPoseValue.m_kRotate.m_fW;
    this->m_kTransformValue.m_kRotate.m_fX = kPoseValue.m_kRotate.m_fX;
    this->m_kTransformValue.m_kRotate.m_fY = kPoseValue.m_kRotate.m_fY;
    this->m_kTransformValue.m_kRotate.m_fZ = kPoseValue.m_kRotate.m_fZ;
    v3 = this->m_spData.m_pObject;
    if ( v3 )
      NiTransformData::ReplaceRotAnim(v3, 0, 0, 0);
  }
  if ( -3.4028235e38 != kPoseValue.m_fScale )
  {
    v4 = v2->m_spData.m_pObject;
    v2->m_kTransformValue.m_fScale = kPoseValue.m_fScale;
    if ( v4 )
      NiTransformData::ReplaceScaleAnim(v4, 0, 0, 0);
  }
  if ( -3.4028235e38 != kPoseValue.m_kTranslate.x )
  {
    v2->m_kTransformValue.m_kTranslate.x = kPoseValue.m_kTranslate.x;
    v2->m_kTransformValue.m_kTranslate.y = kPoseValue.m_kTranslate.y;
    v2->m_kTransformValue.m_kTranslate.z = kPoseValue.m_kTranslate.z;
    v5 = v2->m_spData.m_pObject;
    if ( v5 )
      NiTransformData::ReplacePosAnim(v5, 0, 0, 0);
  }
}

//----- (007DCF80) --------------------------------------------------------
void __thiscall NiTransformController::NiTransformController(NiTransformController *this)
{
  NiTransformController *v1; // esi@1

  v1 = this;
  NiSingleInterpController::NiSingleInterpController((NiSingleInterpController *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&NiTransformController::`vftable';
}
// 9E58AC: using guessed type int (__thiscall *NiTransformController::`vftable')(void *p, char);

//----- (007DCFA0) --------------------------------------------------------
NiRTTI *NiTransformController::GetRTTI()
{
  return &NiTransformController::m_RTTI;
}

//----- (007DCFB0) --------------------------------------------------------
void __thiscall NiTransformController::SynchronizePoseInterpolator(NiTransformController *this, NiInterpolator *pkInterp, unsigned __int16 usIndex)
{
  NiTransformController *v3; // edi@1
  NiTransformInterpolator *v4; // ebx@2
  NiRTTI *v5; // eax@3
  char v6; // al@6
  NiObjectNET *v7; // esi@8
  float v8; // ecx@8
  float v9; // edx@8
  float v10; // eax@8
  NiQuatTransform v11; // [sp-20h] [bp-5Ch]@8
  NiQuatTransform kTransform; // [sp+Ch] [bp-30h]@8
  NiQuaternion kRotate; // [sp+2Ch] [bp-10h]@8

  v3 = this;
  if ( pkInterp )
  {
    v5 = (NiRTTI *)((int (__thiscall *)(_DWORD))pkInterp->vfptr[1].__vecDelDtor)(pkInterp);
    if ( v5 )
    {
      while ( v5 != &NiTransformInterpolator::m_RTTI )
      {
        v5 = v5->m_pkBaseRTTI;
        if ( !v5 )
          goto LABEL_6;
      }
      v6 = 1;
    }
    else
    {
LABEL_6:
      v6 = 0;
    }
    v4 = (NiTransformInterpolator *)(v6 != 0 ? (unsigned int)pkInterp : 0);
  }
  else
  {
    v4 = 0;
  }
  v7 = v3->m_pTarget;
  NiQuaternion::FromRotation(&kRotate, (NiMatrix3 *)&v7[1].m_uiMaxSize);
  v8 = *(float *)&v7[3].m_uiRefCount;
  kTransform.m_fScale = *(float *)&v7[3].m_ppkExtra;
  v9 = *(float *)&v7[3].m_pcName;
  v10 = *(float *)&v7[3].m_spControllers.m_pObject;
  kTransform.m_kTranslate.x = v8;
  kTransform.m_kRotate = kRotate;
  kTransform.m_kTranslate.y = v9;
  kTransform.m_kTranslate.z = v10;
  qmemcpy(&v11, &kTransform, sizeof(v11));
  NiTransformInterpolator::SetPoseValue(v4, v11);
}

//----- (007DD050) --------------------------------------------------------
void __stdcall NiTransformController::CreateBlendInterpolator(unsigned __int16 usIndex, bool bManagerControlled, bool bAccumulateAnimations, float fWeightThreshold, char ucArraySize)
{
  NiBlendAccumTransformInterpolator *v6; // eax@2
  NiBlendTransformInterpolator *v7; // eax@4

  if ( bAccumulateAnimations )
  {
    v6 = (NiBlendAccumTransformInterpolator *)operator new(0x58u);
    if ( v6 )
      NiBlendAccumTransformInterpolator::NiBlendAccumTransformInterpolator(
        v6,
        bManagerControlled,
        fWeightThreshold,
        ucArraySize);
  }
  else
  {
    v7 = (NiBlendTransformInterpolator *)operator new(0x30u);
    if ( v7 )
      NiBlendTransformInterpolator::NiBlendTransformInterpolator(v7, bManagerControlled, fWeightThreshold, ucArraySize);
  }
}

//----- (007DD0B0) --------------------------------------------------------
void __thiscall NiTransformController::Update(NiTransformController *this, float fTime)
{
  NiTransformController *v2; // esi@1
  NiInterpolator *v3; // ecx@4
  NiInterpolator *v4; // ecx@6
  double v5; // st7@7
  NiObjectNET *v6; // edx@7
  float v7; // ST00_4@7
  NiObjectNET *v8; // esi@8
  NiQuatTransform kTransform; // [sp+10h] [bp-20h]@7
  NiExtraData **fTimea; // [sp+38h] [bp+8h]@13

  v2 = this;
  if ( (LOBYTE(this->m_uFlags) >> 5) & 1 )
  {
    this->m_fScaledTime = -3.4028235e38;
  }
  else if ( NiTimeController::DontDoUpdate((NiTimeController *)&this->vfptr, fTime) )
  {
    v3 = v2->m_spInterpolator.m_pObject;
    if ( !v3 || !(unsigned __int8)((int (*)(void))v3->vfptr[33].__vecDelDtor)() )
      return;
  }
  v4 = v2->m_spInterpolator.m_pObject;
  if ( v4 )
  {
    kTransform.m_fScale = -3.4028235e38;
    v5 = v2->m_fScaledTime;
    kTransform.m_kTranslate = NiQuatTransform::INVALID_TRANSLATE;
    kTransform.m_kRotate.m_fX = NiQuatTransform::INVALID_ROTATE.m_fX;
    kTransform.m_kRotate.m_fZ = NiQuatTransform::INVALID_ROTATE.m_fZ;
    kTransform.m_kRotate.m_fW = NiQuatTransform::INVALID_ROTATE.m_fW;
    v6 = v2->m_pTarget;
    kTransform.m_kRotate.m_fY = NiQuatTransform::INVALID_ROTATE.m_fY;
    v7 = v5;
    if ( (unsigned __int8)((int (__stdcall *)(_DWORD, NiObjectNET *, NiQuatTransform *))v4->vfptr[15].__vecDelDtor)(
                            LODWORD(v7),
                            v6,
                            &kTransform) )
    {
      v8 = v2->m_pTarget;
      if ( -3.4028235e38 != kTransform.m_kTranslate.x )
      {
        v8[3].m_uiRefCount = LODWORD(kTransform.m_kTranslate.x);
        v8[3].m_pcName = (char *)LODWORD(kTransform.m_kTranslate.y);
        v8[3].m_spControllers.m_pObject = (NiTimeController *)LODWORD(kTransform.m_kTranslate.z);
      }
      if ( -3.4028235e38 != kTransform.m_kRotate.m_fX )
        NiQuaternion::ToRotation(&kTransform.m_kRotate, (NiMatrix3 *)&v8[1].m_uiMaxSize);
      if ( -3.4028235e38 != kTransform.m_fScale )
      {
        *(float *)&fTimea = fabs(kTransform.m_fScale);
        v8[3].m_ppkExtra = fTimea;
      }
    }
  }
}
// A7CAD0: using guessed type const struct NiPoint3 NiQuatTransform::INVALID_TRANSLATE;

//----- (007DD1E0) --------------------------------------------------------
NiSingleInterpController *__thiscall NiTransformController::CreateClone(NiTransformController *this, NiCloningProcess *kCloning)
{
  NiTransformController *v2; // edi@1
  NiSingleInterpController *v3; // eax@1
  NiSingleInterpController *v4; // esi@1
  NiSingleInterpController *result; // eax@2

  v2 = this;
  v3 = (NiSingleInterpController *)operator new(0x40u);
  v4 = v3;
  if ( v3 )
  {
    NiSingleInterpController::NiSingleInterpController(v3);
    v4->vfptr = (NiRefObjectVtbl *)&NiTransformController::`vftable';
    NiSingleInterpController::CopyMembers((NiSingleInterpController *)&v2->vfptr, v4, kCloning);
    result = v4;
  }
  else
  {
    NiSingleInterpController::CopyMembers((NiSingleInterpController *)&v2->vfptr, 0, kCloning);
    result = 0;
  }
  return result;
}
// 9E58AC: using guessed type int (__thiscall *NiTransformController::`vftable')(void *p, char);

//----- (007DD230) --------------------------------------------------------
NiObject *__cdecl NiTransformController::CreateObject()
{
  NiSingleInterpController *v0; // eax@1
  NiObject *v1; // esi@1
  NiObject *result; // eax@2

  v0 = (NiSingleInterpController *)operator new(0x40u);
  v1 = (NiObject *)v0;
  if ( v0 )
  {
    NiSingleInterpController::NiSingleInterpController(v0);
    v1->vfptr = (NiRefObjectVtbl *)&NiTransformController::`vftable';
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E58AC: using guessed type int (__thiscall *NiTransformController::`vftable')(void *p, char);

//----- (007DD260) --------------------------------------------------------
void __thiscall NiTransformController::GetViewerStrings(NiTransformController *this, NiTArray<char *> *pkStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiTArray<char *> *v3; // eax@1
  unsigned int v4; // edi@1

  v2 = (NiTArray<NiVBBlock *> *)pkStrings;
  NiSingleInterpController::GetViewerStrings((NiSingleInterpController *)&this->vfptr, pkStrings);
  v3 = (NiTArray<char *> *)NiGetViewerString(NiTransformController::m_RTTI.m_pcName);
  v4 = v2->m_uiSize;
  pkStrings = v3;
  if ( v4 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v4 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v4, (NiVBChip *const *)&pkStrings);
}

//----- (007DD2B0) --------------------------------------------------------
void __thiscall NiTextKey::~NiTextKey(NiTextKey *this)
{
  if ( this->m_pText )
    operator delete(this->m_pText);
}

//----- (007DD2C0) --------------------------------------------------------
void __thiscall NiTextKey::SetText(NiTextKey *this, char *pText)
{
  NiTextKey *v2; // edi@1
  unsigned int v3; // kr00_4@4
  char *v4; // eax@4

  v2 = this;
  if ( this->m_pText )
  {
    operator delete(this->m_pText);
    v2->m_pText = 0;
  }
  if ( pText )
  {
    v3 = strlen(pText);
    v4 = (char *)operator new(v3 + 1);
    v2->m_pText = v4;
    strcpy_s(v4, v3 + 1, pText);
  }
}

//----- (007DD320) --------------------------------------------------------
void __thiscall NiTextKey::LoadBinary(NiTextKey *this, NiStream *stream)
{
  NiStream *v2; // edi@1
  unsigned int (__cdecl *v3)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@1
  NiTextKey *v4; // esi@1
  NiBinaryStream *v5; // ST00_4@1

  v2 = stream;
  v3 = stream->m_pkIstr->m_pfnRead;
  v4 = this;
  v5 = stream->m_pkIstr;
  stream = (NiStream *)4;
  v3(v5, this, 4u, (unsigned int *)&stream, 1u);
  NiStream::LoadCString(v2, &v4->m_pText);
}

//----- (007DD360) --------------------------------------------------------
void __thiscall NiTextKey::SaveBinary(NiTextKey *this, NiStream *stream)
{
  NiStream *v2; // edi@1
  unsigned int (__cdecl *v3)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@1
  NiTextKey *v4; // esi@1
  NiBinaryStream *v5; // ST00_4@1

  v2 = stream;
  v3 = stream->m_pkOstr->m_pfnWrite;
  v4 = this;
  v5 = stream->m_pkOstr;
  stream = (NiStream *)4;
  v3(v5, this, 4u, (unsigned int *)&stream, 1u);
  NiStream::SaveCString(v2, v4->m_pText);
}

//----- (007DD3A0) --------------------------------------------------------
void __thiscall NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(NiTArray<NiVBBlock *> *this, unsigned int uiMaxSize)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  unsigned int v3; // edx@3
  NiVBBlock **v4; // ecx@4
  bool v5; // zf@4
  NiVBBlock **v6; // ecx@4
  NiVBBlock **v7; // edi@8
  unsigned int v8; // eax@9
  unsigned int v9; // eax@11

  v2 = this;
  if ( uiMaxSize == this->m_uiMaxSize )
    return;
  if ( uiMaxSize < this->m_uiSize )
  {
    v3 = uiMaxSize;
    do
    {
      v4 = v2->m_pBase;
      v5 = v4[v3] == 0;
      v6 = &v4[v3];
      if ( !v5 )
      {
        *v6 = 0;
        --v2->m_uiESize;
      }
      ++v3;
    }
    while ( v3 < v2->m_uiSize );
    v2->m_uiSize = uiMaxSize;
  }
  v7 = v2->m_pBase;
  v2->m_uiMaxSize = uiMaxSize;
  if ( !uiMaxSize )
  {
    v2->m_pBase = 0;
LABEL_15:
    operator delete(v7);
    return;
  }
  v2->m_pBase = (NiVBBlock **)operator new(4 * uiMaxSize);
  v8 = 0;
  if ( v2->m_uiSize )
  {
    do
    {
      v2->m_pBase[v8] = v7[v8];
      ++v8;
    }
    while ( v8 < v2->m_uiSize );
  }
  v9 = v2->m_uiSize;
  if ( v9 >= v2->m_uiMaxSize )
    goto LABEL_15;
  do
    v2->m_pBase[v9++] = 0;
  while ( v9 < v2->m_uiMaxSize );
  operator delete(v7);
}

//----- (007DD470) --------------------------------------------------------
NiTArray<NiTSet<NiNode *> *> *__thiscall NiTArray<NiTSet<NiNode *> *>::`vector deleting destructor'(NiTArray<NiTSet<NiNode *> *> *this, unsigned int a2)
{
  NiTArray<NiTSet<NiNode *> *> *v2; // esi@1
  NiTSet<NiNode *> **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pBase;
  this->vfptr = (NiTArray<NiTSet<NiNode *> *>Vtbl *)&NiTArray<NiTSet<NiNode *> *>::`vftable';
  operator delete(v3);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E5948: using guessed type int (__thiscall *NiTArray<NiTSet<NiNode *> *>::`vftable')(void *p, char);

//----- (007DD4A0) --------------------------------------------------------
NiTArray<NiTSet<NiBoneLODController::SkinInfo *> *> *__thiscall NiTArray<NiTSet<NiBoneLODController::SkinInfo *> *>::`vector deleting destructor'(NiTArray<NiTSet<NiBoneLODController::SkinInfo *> *> *this, unsigned int a2)
{
  NiTArray<NiTSet<NiBoneLODController::SkinInfo *> *> *v2; // esi@1
  NiTSet<NiBoneLODController::SkinInfo *> **v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pBase;
  this->vfptr = (NiTArray<NiTSet<NiBoneLODController::SkinInfo *> *>Vtbl *)&NiTArray<NiTSet<NiBoneLODController::SkinInfo *> *>::`vftable';
  operator delete(v3);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E5950: using guessed type int (__thiscall *NiTArray<NiTSet<NiBoneLODController::SkinInfo *> *>::`vftable')(void *p, char);

//----- (007DD4D0) --------------------------------------------------------
char __thiscall NiBoneLODController::RegisterStreamables(NiBoneLODController *this, NiStream *kStream)
{
  NiBoneLODController *v2; // edi@1
  char result; // al@1
  unsigned int v4; // ebx@2
  NiTSet<NiBoneLODController::SkinInfo *> *v5; // esi@3
  unsigned int v6; // edi@4
  NiSkinInstance *v7; // ecx@5
  NiBoneLODController *v8; // [sp+4h] [bp-4h]@1

  v2 = this;
  v8 = this;
  result = NiTimeController::RegisterStreamables((NiTimeController *)&this->vfptr, kStream);
  if ( result )
  {
    v4 = 0;
    if ( v2->m_kSkinArray.m_uiSize )
    {
      do
      {
        v5 = v2->m_kSkinArray.m_pBase[v4];
        if ( v5 )
        {
          v6 = 0;
          if ( v5->m_uiUsed )
          {
            do
            {
              v7 = v5->m_pBase[v6]->m_spSkinInst.m_pObject;
              if ( v7 )
                ((void (__stdcall *)(_DWORD))v7->vfptr[5].__vecDelDtor)(kStream);
              ++v6;
            }
            while ( v6 < v5->m_uiUsed );
          }
          v2 = v8;
        }
        ++v4;
      }
      while ( v4 < v2->m_kSkinArray.m_uiSize );
    }
    result = 1;
  }
  return result;
}

//----- (007DD540) --------------------------------------------------------
void __thiscall NiBoneLODController::LinkObject(NiBoneLODController *this, NiStream *kStream)
{
  NiStream *v2; // ebx@1
  NiBoneLODController *v3; // edi@1
  unsigned int v4; // eax@1
  NiTSet<NiNode *> *v5; // esi@2
  unsigned int v6; // edi@3
  NiObject *v7; // eax@4
  unsigned int v8; // ecx@10
  NiTSet<NiBoneLODController::SkinInfo *> *v9; // eax@11
  NiBoneLODController::SkinInfo *v10; // edi@15
  NiObject *v11; // eax@15
  NiObject *v12; // esi@15
  NiObject *v13; // ebx@15
  unsigned int v14; // esi@25
  NiObject *v15; // eax@26
  NiTSet<NiBoneLODController::SkinInfo *> *pkSet; // [sp+Ch] [bp-10h]@11
  NiBoneLODController *v17; // [sp+10h] [bp-Ch]@1
  unsigned int uj; // [sp+14h] [bp-8h]@12
  unsigned int ui; // [sp+18h] [bp-4h]@1
  unsigned int uia; // [sp+18h] [bp-4h]@10

  v2 = kStream;
  v3 = this;
  v17 = this;
  NiTimeController::LinkObject((NiTimeController *)&this->vfptr, kStream);
  v4 = 0;
  ui = 0;
  if ( v3->m_kBoneArray.m_uiSize )
  {
    do
    {
      v5 = v3->m_kBoneArray.m_pBase[v4];
      if ( v5 )
      {
        v6 = 0;
        if ( v5->m_uiUsed )
        {
          do
          {
            v7 = NiStream::GetObjectFromLinkID(kStream);
            if ( v6 < v5->m_uiUsed )
              v5->m_pBase[v6] = (NiNode *)v7;
            ++v6;
          }
          while ( v6 < v5->m_uiUsed );
          v4 = ui;
        }
        v3 = v17;
      }
      ui = ++v4;
    }
    while ( v4 < v3->m_kBoneArray.m_uiSize );
  }
  v8 = 0;
  uia = 0;
  if ( v3->m_kSkinArray.m_uiSize )
  {
    do
    {
      v9 = v3->m_kSkinArray.m_pBase[v8];
      pkSet = v9;
      if ( v9 )
      {
        uj = 0;
        if ( v9->m_uiUsed )
        {
          while ( 1 )
          {
            v10 = v9->m_pBase[uj];
            v10->m_pkSkinGeom = (NiTriBasedGeom *)NiStream::GetObjectFromLinkID(v2);
            v11 = NiStream::GetObjectFromLinkID(v2);
            v12 = (NiObject *)&v10->m_spSkinInst.m_pObject->vfptr;
            v13 = v11;
            if ( v12 != v11 )
            {
              if ( v12 && !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
                v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
              v10->m_spSkinInst.m_pObject = (NiSkinInstance *)v13;
              if ( v13 )
                InterlockedIncrement((volatile LONG *)&v13->m_uiRefCount);
            }
            v2 = kStream;
            if ( ++uj >= pkSet->m_uiUsed )
              break;
            v9 = pkSet;
          }
          v8 = uia;
          v3 = v17;
        }
      }
      uia = ++v8;
    }
    while ( v8 < v3->m_kSkinArray.m_uiSize );
  }
  v14 = 0;
  if ( v3->m_kSkinSet.m_uiUsed )
  {
    do
    {
      v15 = NiStream::GetObjectFromLinkID(v2);
      if ( v14 < v3->m_kSkinSet.m_uiUsed )
        v3->m_kSkinSet.m_pBase[v14] = (NiTriBasedGeom *)v15;
      ++v14;
    }
    while ( v14 < v3->m_kSkinSet.m_uiUsed );
  }
}

//----- (007DD670) --------------------------------------------------------
char __thiscall NiBoneLODController::IsEqual(NiBoneLODController *this, NiObject *pkObject)
{
  NiObject *v2; // ebx@1
  NiBoneLODController *v3; // edi@1
  NiRefObjectVtbl *v5; // ecx@5
  unsigned int v6; // eax@8
  NiTSet<NiNode *> *v7; // esi@9
  void *(__thiscall *v8)(NiRefObject *, unsigned int); // ebx@9
  unsigned int v9; // ecx@11
  unsigned int v10; // edi@12
  unsigned int v11; // edx@18
  NiTSet<NiBoneLODController::SkinInfo *> *v12; // eax@19
  _DWORD *v13; // ecx@19
  unsigned int v14; // edx@21
  int v15; // esi@22
  NiBoneLODController::SkinInfo *v16; // edi@29
  int v17; // ebx@29
  int v18; // esi@35
  NiTSet<NiBoneLODController::SkinInfo *> *pkSet1; // [sp+8h] [bp-10h]@19
  NiTSet<NiBoneLODController::SkinInfo *> *pkSet0; // [sp+Ch] [bp-Ch]@19
  NiBoneLODController *v21; // [sp+10h] [bp-8h]@1
  unsigned int ui; // [sp+14h] [bp-4h]@8
  unsigned int uia; // [sp+14h] [bp-4h]@18

  v2 = pkObject;
  v3 = this;
  v21 = this;
  if ( !NiTimeController::IsEqual((NiTimeController *)&this->vfptr, pkObject) )
    return 0;
  if ( v3->m_iLOD != pkObject[7].m_uiRefCount )
    return 0;
  if ( (NiRefObjectVtbl *)v3->m_uiNumLODs != pkObject[8].vfptr )
    return 0;
  v5 = (NiRefObjectVtbl *)v3->m_kBoneArray.m_uiSize;
  if ( v5 != pkObject[10].vfptr
    || (NiRefObjectVtbl *)v3->m_kSkinArray.m_uiSize != pkObject[13].vfptr
    || v3->m_kSkinSet.m_uiUsed != pkObject[15].m_uiRefCount )
  {
    return 0;
  }
  v6 = 0;
  ui = 0;
  if ( v5 )
  {
    do
    {
      v7 = v3->m_kBoneArray.m_pBase[v6];
      v8 = v2[9].vfptr[v6].__vecDelDtor;
      if ( v7 )
      {
        if ( !v8 )
          return 0;
        v9 = v7->m_uiUsed;
        if ( v9 != *((_DWORD *)v8 + 2) )
          return 0;
        v10 = 0;
        if ( v9 )
        {
          do
          {
            if ( !(unsigned __int8)((int (__stdcall *)(_DWORD))v7->m_pBase[v10]->vfptr[7].__vecDelDtor)(*(_DWORD *)(4 * v10 + *(_DWORD *)v8)) )
              return 0;
            ++v10;
          }
          while ( v10 < v7->m_uiUsed );
          v6 = ui;
        }
        v3 = v21;
      }
      else if ( v8 )
      {
        return 0;
      }
      v2 = pkObject;
      ui = ++v6;
    }
    while ( v6 < v3->m_kBoneArray.m_uiSize );
  }
  v11 = 0;
  uia = 0;
  if ( v3->m_kSkinArray.m_uiSize )
  {
    do
    {
      v12 = v3->m_kSkinArray.m_pBase[v11];
      v13 = v2[12].vfptr[v11].__vecDelDtor;
      pkSet0 = v12;
      pkSet1 = (NiTSet<NiBoneLODController::SkinInfo *> *)v2[12].vfptr[v11].__vecDelDtor;
      if ( v12 )
      {
        if ( !v13 )
          return 0;
        v14 = v12->m_uiUsed;
        if ( v14 != v13[2] )
          return 0;
        v15 = 0;
        if ( v14 )
        {
          while ( 1 )
          {
            v16 = v12->m_pBase[v15];
            v17 = *(_DWORD *)(*v13 + 4 * v15);
            if ( !(unsigned __int8)((int (__stdcall *)(_DWORD))v16->m_pkSkinGeom->vfptr[7].__vecDelDtor)(*(_DWORD *)v17)
              || !(unsigned __int8)((int (__stdcall *)(_DWORD))v16->m_spSkinInst.m_pObject->vfptr[7].__vecDelDtor)(*(_DWORD *)(v17 + 4)) )
            {
              return 0;
            }
            if ( ++v15 >= pkSet0->m_uiUsed )
            {
              v3 = v21;
              v2 = pkObject;
              break;
            }
            v13 = pkSet1;
            v12 = pkSet0;
          }
        }
        v11 = uia;
      }
      else if ( v13 )
      {
        return 0;
      }
      uia = ++v11;
    }
    while ( v11 < v3->m_kSkinArray.m_uiSize );
  }
  v18 = 0;
  if ( v3->m_kSkinSet.m_uiUsed )
  {
    while ( (unsigned __int8)((int (__stdcall *)(_DWORD))v3->m_kSkinSet.m_pBase[v18]->vfptr[7].__vecDelDtor)(*(_DWORD *)(4 * v18 + v2[14].m_uiRefCount)) )
    {
      if ( ++v18 >= v3->m_kSkinSet.m_uiUsed )
        return 1;
    }
    return 0;
  }
  return 1;
}

//----- (007DD810) --------------------------------------------------------
void __cdecl NiStreamLoadBinary<float>(NiStream *kStream, int *value)
{
  NiBinaryStream *v2; // eax@1
  NiBinaryStream *v3; // ST00_4@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1

  v2 = kStream->m_pkIstr;
  v3 = v2;
  v4 = v2->m_pfnRead;
  kStream = (NiStream *)4;
  v4(v3, value, 4u, (unsigned int *)&kStream, 1u);
}

//----- (007DD840) --------------------------------------------------------
void __thiscall NiBoneLODController::NiBoneLODController(NiBoneLODController *this)
{
  NiBoneLODController *v1; // esi@1

  v1 = this;
  NiTimeController::NiTimeController((NiTimeController *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&NiBoneLODController::`vftable';
  v1->m_iLOD = -1;
  v1->m_uiNumLODs = 0;
  v1->m_kBoneArray.m_uiMaxSize = 0;
  v1->m_kBoneArray.m_uiSize = 0;
  v1->m_kBoneArray.m_uiESize = 0;
  v1->m_kBoneArray.m_pBase = 0;
  v1->m_kBoneArray.vfptr = (NiTArray<NiTSet<NiNode *> *>Vtbl *)&NiTArray<NiTSet<NiNode *> *>::`vftable';
  v1->m_kBoneArray.m_uiGrowBy = 1;
  v1->m_kSkinArray.m_uiMaxSize = 0;
  v1->m_kSkinArray.m_uiSize = 0;
  v1->m_kSkinArray.m_uiESize = 0;
  v1->m_kSkinArray.m_pBase = 0;
  v1->m_kSkinArray.vfptr = (NiTArray<NiTSet<NiBoneLODController::SkinInfo *> *>Vtbl *)&NiTArray<NiTSet<NiBoneLODController::SkinInfo *> *>::`vftable';
  v1->m_kSkinArray.m_uiGrowBy = 1;
  v1->m_kSkinSet.m_pBase = 0;
  v1->m_kSkinSet.m_uiAlloced = 0;
  v1->m_kSkinSet.m_uiUsed = 0;
}
// 9E5948: using guessed type int (__thiscall *NiTArray<NiTSet<NiNode *> *>::`vftable')(void *p, char);
// 9E5950: using guessed type int (__thiscall *NiTArray<NiTSet<NiBoneLODController::SkinInfo *> *>::`vftable')(void *p, char);
// 9E595C: using guessed type int (__thiscall *NiBoneLODController::`vftable')(void *p, char);

//----- (007DD8A0) --------------------------------------------------------
NiRTTI *NiBoneLODController::GetRTTI()
{
  return &NiBoneLODController::m_RTTI;
}

//----- (007DD8B0) --------------------------------------------------------
char __thiscall NiBoneLODController::TargetIsRequiredType(NiBoneLODController *this)
{
  NiObjectNET *v1; // ecx@1
  NiRTTI *v2; // eax@2
  char result; // al@5

  v1 = this->m_pTarget;
  if ( v1 && (v2 = (NiRTTI *)((int (*)(void))v1->vfptr[1].__vecDelDtor)()) != 0 )
  {
    while ( v2 != &NiNode::m_RTTI )
    {
      v2 = v2->m_pkBaseRTTI;
      if ( !v2 )
        goto LABEL_5;
    }
    result = 1;
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (007DD8E0) --------------------------------------------------------
char __thiscall NiBoneLODController::SetBoneLOD(NiBoneLODController *this, int iLOD)
{
  NiBoneLODController *v2; // edx@1
  unsigned int v3; // eax@1
  int v4; // ecx@2
  unsigned int v5; // edi@6
  char v6; // bl@6
  NiTSet<NiNode *> *v7; // esi@7
  unsigned int v8; // ecx@10
  NiNode *v9; // eax@11
  unsigned int v10; // eax@17
  NiTriBasedGeom *v11; // ecx@18
  NiTSet<NiBoneLODController::SkinInfo *> *v12; // eax@21
  unsigned int v13; // edi@22
  NiTriBasedGeom *v14; // esi@25
  NiSkinInstance *v15; // ebx@25
  NiSkinInstance *v16; // edi@25
  char result; // al@35
  NiBoneLODController *v18; // [sp+0h] [bp-Ch]@1
  NiTSet<NiBoneLODController::SkinInfo *> *pkSet; // [sp+4h] [bp-8h]@21
  unsigned int ui; // [sp+8h] [bp-4h]@6
  unsigned int uia; // [sp+8h] [bp-4h]@22

  v2 = this;
  v3 = this->m_uiNumLODs;
  v18 = this;
  if ( v3 && (v4 = iLOD, v2->m_iLOD != iLOD) && (iLOD == -1 || iLOD > -1 && iLOD < v3) )
  {
    v5 = 0;
    v6 = 0;
    ui = 0;
    if ( v2->m_kBoneArray.m_uiSize )
    {
      do
      {
        v7 = v2->m_kBoneArray.m_pBase[v5];
        if ( v7 )
        {
          if ( v5 == v4 )
            v6 = 1;
          v8 = 0;
          if ( v7->m_uiUsed )
          {
            do
            {
              v9 = v7->m_pBase[v8];
              if ( v6 )
              {
                v9->m_uFlags |= 2u;
              }
              else
              {
                v9->m_uFlags &= 0xFFFDu;
                v5 = ui;
              }
              ++v8;
            }
            while ( v8 < v7->m_uiUsed );
          }
          v4 = iLOD;
        }
        ui = ++v5;
      }
      while ( v5 < v2->m_kBoneArray.m_uiSize );
    }
    v10 = 0;
    if ( v2->m_kSkinSet.m_uiUsed )
    {
      do
      {
        v11 = v2->m_kSkinSet.m_pBase[v10++];
        v11->m_uFlags = v11->m_uFlags & 0xFFFD | 1;
      }
      while ( v10 < v2->m_kSkinSet.m_uiUsed );
      v4 = iLOD;
    }
    if ( v4 != -1 )
    {
      v12 = v2->m_kSkinArray.m_pBase[v4];
      pkSet = v12;
      if ( v12 )
      {
        v13 = 0;
        uia = 0;
        if ( v12->m_uiUsed )
        {
          while ( 1 )
          {
            v14 = v12->m_pBase[v13]->m_pkSkinGeom;
            v14->m_uFlags = v14->m_uFlags & 0xFFFE | 2;
            v15 = v12->m_pBase[v13]->m_spSkinInst.m_pObject;
            v16 = v14->m_spSkinInstance.m_pObject;
            if ( v16 != v15 )
            {
              if ( v16 )
              {
                if ( !InterlockedDecrement((volatile LONG *)&v16->m_uiRefCount) && v16 )
                  v16->vfptr->__vecDelDtor((NiRefObject *)v16, 1u);
                v2 = v18;
                v12 = pkSet;
              }
              v14->m_spSkinInstance.m_pObject = v15;
              if ( v15 )
              {
                InterlockedIncrement((volatile LONG *)&v15->m_uiRefCount);
                v12 = pkSet;
                v2 = v18;
              }
            }
            if ( ++uia >= v12->m_uiUsed )
              break;
            v13 = uia;
          }
          v4 = iLOD;
        }
      }
    }
    v2->m_iLOD = v4;
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007DDA60) --------------------------------------------------------
NiTimeController *__thiscall NiBoneLODController::CreateClone(NiBoneLODController *this, NiCloningProcess *kCloning)
{
  NiBoneLODController *v2; // edi@1
  NiBoneLODController *v3; // eax@1
  NiTimeController *v4; // eax@2
  NiTimeController *v5; // esi@2

  v2 = this;
  v3 = (NiBoneLODController *)operator new(0x80u);
  if ( v3 )
  {
    NiBoneLODController::NiBoneLODController(v3);
    v5 = v4;
  }
  else
  {
    v5 = 0;
  }
  NiTimeController::CopyMembers((NiTimeController *)&v2->vfptr, v5, kCloning);
  v5[1].vfptr = (NiRefObjectVtbl *)v2->m_iLOD;
  v5[1].m_uiRefCount = v2->m_uiNumLODs;
  return v5;
}

//----- (007DDAB0) --------------------------------------------------------
void __thiscall NiBoneLODController::ProcessClone(NiBoneLODController *this, NiCloningProcess *kCloning)
{
  NiBoneLODController *v2; // esi@1
  NiBoneLODController *v3; // ebx@1
  unsigned int v4; // edi@1
  NiTSet<NiNode *> *v5; // eax@5
  NiTSet<NiNode *> *v6; // esi@6
  NiTPointerMap<NiObject *,NiObject *> *v7; // edi@20
  NiTMapItem<NiObject *,NiObject *> *v8; // ebx@20
  unsigned int v9; // eax@23
  int v10; // ebx@24
  NiNode **v11; // edi@28
  unsigned int v12; // eax@28
  unsigned int v13; // eax@31
  unsigned int v14; // eax@36
  NiBoneLODController::SkinInfo *v15; // ecx@41
  unsigned int v16; // esi@51
  NiTSet<NiBoneLODController::SkinInfo *> *v17; // eax@53
  NiTSet<NiBoneLODController::SkinInfo *> *v18; // edi@54
  NiBoneLODController *v19; // ebx@56
  NiBoneLODController::SkinInfo *v20; // eax@68
  NiBoneLODController::SkinInfo **v21; // esi@68
  unsigned int v22; // eax@71
  unsigned int v23; // ebx@72
  unsigned int v24; // eax@76
  NiTPointerMap<NiObject *,NiObject *> *v25; // esi@79
  NiTMapItem<NiObject *,NiObject *> *v26; // ebx@79
  NiSkinInstance *v27; // ebx@83
  NiSkinInstance *v28; // esi@83
  bool v29; // zf@94
  NiTPointerMap<NiObject *,NiObject *> *v30; // esi@95
  NiTMapItem<NiObject *,NiObject *> *v31; // edi@95
  unsigned int v32; // eax@98
  int v33; // edi@99
  NiTriBasedGeom **v34; // esi@103
  unsigned int v35; // eax@103
  NiTSet<NiBoneLODController::SkinInfo *> **v36; // edx@110
  unsigned int v37; // eax@114
  int v38; // edi@115
  NiTriBasedGeom **v39; // esi@119
  unsigned int v40; // eax@119
  NiTriBasedGeom *v41; // eax@124
  unsigned int v42; // eax@128
  NiBoneLODController *v43; // ecx@128
  int v44; // ST04_4@129
  NiTriBasedGeom *pkNewSkinGeom; // [sp+Ch] [bp-20h]@79
  NiTriBasedGeom *pkNewSkinGeoma; // [sp+Ch] [bp-20h]@114
  NiTriBasedGeom *pkOldSkinGeom; // [sp+10h] [bp-1Ch]@20
  NiTriBasedGeom *pkOldSkinGeoma; // [sp+10h] [bp-1Ch]@52
  NiTriBasedGeom *pkOldSkinGeomb; // [sp+10h] [bp-1Ch]@95
  char *v50; // [sp+14h] [bp-18h]@67
  NiBoneLODController::SkinInfo *pkOldInfo; // [sp+18h] [bp-14h]@19
  NiBoneLODController::SkinInfo *pkOldInfoa; // [sp+18h] [bp-14h]@68
  NiBoneLODController *pkDest; // [sp+1Ch] [bp-10h]@1
  NiBoneLODController::SkinInfo *pkNewInfo; // [sp+20h] [bp-Ch]@4
  NiBoneLODController *v55; // [sp+24h] [bp-8h]@1
  unsigned int ui; // [sp+28h] [bp-4h]@1

  v2 = this;
  v55 = this;
  NiTimeController::ProcessClone((NiTimeController *)&this->vfptr, kCloning);
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)kCloning->m_pkCloneMap,
    (unsigned int)v2,
    (NiVBSet **)&pkDest);
  v3 = pkDest;
  v4 = 0;
  ui = 0;
  if ( v2->m_kBoneArray.m_uiSize )
  {
    while ( 1 )
    {
      pkNewInfo = (NiBoneLODController::SkinInfo *)v2->m_kBoneArray.m_pBase[v4];
      if ( pkNewInfo )
      {
        v5 = (NiTSet<NiNode *> *)operator new(0xCu);
        if ( v5 )
        {
          v5->m_pBase = 0;
          v5->m_uiAlloced = 0;
          v5->m_uiUsed = 0;
          v6 = v5;
        }
        else
        {
          v6 = 0;
        }
        if ( v4 < v3->m_kBoneArray.m_uiMaxSize
          || (NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(
                (NiTArray<NiVBBlock *> *)&v3->m_kBoneArray,
                v4 + v3->m_kBoneArray.m_uiGrowBy),
              v4 < v3->m_kBoneArray.m_uiMaxSize) )
        {
          if ( v4 < v3->m_kBoneArray.m_uiSize )
          {
            if ( v6 )
            {
              if ( !v3->m_kBoneArray.m_pBase[v4] )
                ++v3->m_kBoneArray.m_uiESize;
            }
            else if ( v3->m_kBoneArray.m_pBase[v4] )
            {
              --v3->m_kBoneArray.m_uiESize;
            }
          }
          else
          {
            v3->m_kBoneArray.m_uiSize = v4 + 1;
            if ( v6 )
              ++v3->m_kBoneArray.m_uiESize;
          }
          v3->m_kBoneArray.m_pBase[v4] = v6;
        }
        pkOldInfo = 0;
        if ( pkNewInfo[1].m_pkSkinGeom )
        {
          while ( 1 )
          {
            v7 = kCloning->m_pkCloneMap;
            pkOldSkinGeom = (NiTriBasedGeom *)(&pkNewInfo->m_pkSkinGeom->vfptr)[(_DWORD)pkOldInfo];
            v8 = v7->m_ppkHashTable[kCloning->m_pkCloneMap->vfptr->KeyToHashIndex(
                                      (NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *> *)kCloning->m_pkCloneMap,
                                      (NiObject *)(&pkNewInfo->m_pkSkinGeom->vfptr)[(_DWORD)pkOldInfo])];
            if ( v8 )
            {
              while ( !v7->vfptr->IsKeysEqual(
                         (NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *> *)v7,
                         (NiObject *)pkOldSkinGeom,
                         v8->m_key) )
              {
                v8 = v8->m_pkNext;
                if ( !v8 )
                  goto LABEL_23;
              }
              pkOldSkinGeom = (NiTriBasedGeom *)v8->m_val;
              v13 = v6->m_uiAlloced;
              if ( v6->m_uiUsed != v13 )
                goto LABEL_41;
              v10 = 2 * v13;
              if ( !v13 )
                v10 = 1;
              if ( v10 == v13 )
                goto LABEL_41;
              if ( v10 )
              {
                v11 = (NiNode **)operator new(4 * v10);
                v14 = 0;
                if ( v6->m_uiUsed )
                {
                  do
                  {
                    v11[v14] = v6->m_pBase[v14];
                    ++v14;
                  }
                  while ( v14 < v6->m_uiUsed );
                }
                goto LABEL_40;
              }
            }
            else
            {
LABEL_23:
              v9 = v6->m_uiAlloced;
              if ( v6->m_uiUsed != v9 )
                goto LABEL_41;
              v10 = 2 * v9;
              if ( !v9 )
                v10 = 1;
              if ( v10 == v9 )
                goto LABEL_41;
              if ( v10 )
              {
                v11 = (NiNode **)operator new(4 * v10);
                v12 = 0;
                if ( v6->m_uiUsed )
                {
                  do
                  {
                    v11[v12] = v6->m_pBase[v12];
                    ++v12;
                  }
                  while ( v12 < v6->m_uiUsed );
                }
                goto LABEL_40;
              }
            }
            v11 = 0;
LABEL_40:
            operator delete(v6->m_pBase);
            v6->m_uiAlloced = v10;
            v6->m_pBase = v11;
LABEL_41:
            v6->m_pBase[v6->m_uiUsed] = (NiNode *)pkOldSkinGeom;
            v15 = pkNewInfo;
            ++v6->m_uiUsed;
            pkOldInfo = (NiBoneLODController::SkinInfo *)((char *)pkOldInfo + 1);
            if ( (NiTriBasedGeom *)pkOldInfo >= v15[1].m_pkSkinGeom )
            {
              v4 = ui;
              v3 = pkDest;
              break;
            }
          }
        }
      }
      else if ( v4 < v3->m_kBoneArray.m_uiMaxSize
             || (NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(
                   (NiTArray<NiVBBlock *> *)&v3->m_kBoneArray,
                   v4 + v3->m_kBoneArray.m_uiGrowBy),
                 v4 < v3->m_kBoneArray.m_uiMaxSize) )
      {
        if ( v4 < v3->m_kBoneArray.m_uiSize )
        {
          if ( v3->m_kBoneArray.m_pBase[v4] )
            --v3->m_kBoneArray.m_uiESize;
        }
        else
        {
          v3->m_kBoneArray.m_uiSize = v4 + 1;
        }
        v3->m_kBoneArray.m_pBase[v4] = 0;
      }
      ui = ++v4;
      if ( v4 >= v55->m_kBoneArray.m_uiSize )
        break;
      v2 = v55;
    }
  }
  v16 = 0;
  ui = 0;
  if ( v55->m_kSkinArray.m_uiSize )
  {
    do
    {
      pkOldSkinGeoma = (NiTriBasedGeom *)v55->m_kSkinArray.m_pBase[v16];
      if ( pkOldSkinGeoma )
      {
        v17 = (NiTSet<NiBoneLODController::SkinInfo *> *)operator new(0xCu);
        if ( v17 )
        {
          v17->m_pBase = 0;
          v17->m_uiAlloced = 0;
          v17->m_uiUsed = 0;
          v18 = v17;
        }
        else
        {
          v18 = 0;
        }
        v19 = pkDest;
        if ( v16 < pkDest->m_kSkinArray.m_uiMaxSize
          || (NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(
                (NiTArray<NiVBBlock *> *)&pkDest->m_kSkinArray,
                v16 + pkDest->m_kSkinArray.m_uiGrowBy),
              v16 < v19->m_kSkinArray.m_uiMaxSize) )
        {
          if ( v16 < v19->m_kSkinArray.m_uiSize )
          {
            if ( v18 )
            {
              if ( !v19->m_kSkinArray.m_pBase[v16] )
                ++v19->m_kSkinArray.m_uiESize;
            }
            else if ( v19->m_kSkinArray.m_pBase[v16] )
            {
              --v19->m_kSkinArray.m_uiESize;
            }
          }
          else
          {
            v19->m_kSkinArray.m_uiSize = v16 + 1;
            if ( v18 )
              ++v19->m_kSkinArray.m_uiESize;
          }
          v19->m_kSkinArray.m_pBase[v16] = v18;
        }
        v50 = 0;
        if ( pkOldSkinGeoma->m_pcName )
        {
          do
          {
            pkOldInfoa = (NiBoneLODController::SkinInfo *)pkOldSkinGeoma->vfptr[(_DWORD)v50].__vecDelDtor;
            v20 = (NiBoneLODController::SkinInfo *)operator new(8u);
            v21 = 0;
            if ( v20 )
            {
              v20->m_spSkinInst.m_pObject = 0;
              pkNewInfo = v20;
            }
            else
            {
              pkNewInfo = 0;
            }
            v22 = v18->m_uiAlloced;
            if ( v18->m_uiUsed == v22 )
            {
              v23 = 2 * v22;
              if ( v22 <= 0 )
                v23 = 1;
              if ( v23 != v22 )
              {
                if ( v23 > 0 )
                {
                  v21 = (NiBoneLODController::SkinInfo **)operator new(4 * v23);
                  v24 = 0;
                  if ( v18->m_uiUsed )
                  {
                    do
                    {
                      v21[v24] = v18->m_pBase[v24];
                      ++v24;
                    }
                    while ( v24 < v18->m_uiUsed );
                  }
                }
                operator delete(v18->m_pBase);
                v18->m_pBase = v21;
                v18->m_uiAlloced = v23;
              }
            }
            v18->m_pBase[v18->m_uiUsed++] = pkNewInfo;
            v25 = kCloning->m_pkCloneMap;
            pkNewSkinGeom = pkOldInfoa->m_pkSkinGeom;
            v26 = v25->m_ppkHashTable[kCloning->m_pkCloneMap->vfptr->KeyToHashIndex(
                                        (NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *> *)kCloning->m_pkCloneMap,
                                        (NiObject *)pkOldInfoa->m_pkSkinGeom)];
            if ( v26 )
            {
              while ( !v25->vfptr->IsKeysEqual(
                         (NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *> *)v25,
                         (NiObject *)pkNewSkinGeom,
                         v26->m_key) )
              {
                v26 = v26->m_pkNext;
                if ( !v26 )
                  goto LABEL_82;
              }
              pkNewInfo->m_pkSkinGeom = (NiTriBasedGeom *)v26->m_val;
            }
            else
            {
LABEL_82:
              pkNewInfo->m_pkSkinGeom = pkOldInfoa->m_pkSkinGeom;
            }
            v27 = (NiSkinInstance *)((int (__stdcall *)(_DWORD))pkOldInfoa->m_spSkinInst.m_pObject->vfptr[2].__vecDelDtor)(kCloning);
            v28 = pkNewInfo->m_spSkinInst.m_pObject;
            if ( v28 != v27 )
            {
              if ( v28 && !InterlockedDecrement((volatile LONG *)&v28->m_uiRefCount) && v28 )
                v28->vfptr->__vecDelDtor((NiRefObject *)v28, 1u);
              pkNewInfo->m_spSkinInst.m_pObject = v27;
              if ( v27 )
                InterlockedIncrement((volatile LONG *)&v27->m_uiRefCount);
            }
            ((void (__stdcall *)(_DWORD))pkOldInfoa->m_spSkinInst.m_pObject->vfptr[10].__vecDelDtor)(kCloning);
            ++v50;
          }
          while ( v50 < pkOldSkinGeoma->m_pcName );
          v16 = ui;
        }
        v3 = pkDest;
      }
      else if ( v16 < v3->m_kSkinArray.m_uiMaxSize
             || (NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(
                   (NiTArray<NiVBBlock *> *)&v3->m_kSkinArray,
                   v16 + v3->m_kSkinArray.m_uiGrowBy),
                 v16 < v3->m_kSkinArray.m_uiMaxSize) )
      {
        if ( v16 < v3->m_kSkinArray.m_uiSize )
        {
          if ( v3->m_kSkinArray.m_pBase[v16] )
            --v3->m_kSkinArray.m_uiESize;
          v3->m_kSkinArray.m_pBase[v16] = 0;
        }
        else
        {
          v36 = v3->m_kSkinArray.m_pBase;
          v3->m_kSkinArray.m_uiSize = v16 + 1;
          v36[v16] = 0;
        }
      }
      ui = ++v16;
    }
    while ( v16 < v55->m_kSkinArray.m_uiSize );
  }
  v29 = v55->m_kSkinSet.m_uiUsed == 0;
  ui = 0;
  if ( !v29 )
  {
    do
    {
      v30 = kCloning->m_pkCloneMap;
      pkOldSkinGeomb = v55->m_kSkinSet.m_pBase[ui];
      v31 = v30->m_ppkHashTable[kCloning->m_pkCloneMap->vfptr->KeyToHashIndex(
                                  (NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *> *)kCloning->m_pkCloneMap,
                                  (NiObject *)v55->m_kSkinSet.m_pBase[ui])];
      if ( v31 )
      {
        while ( !v30->vfptr->IsKeysEqual(
                   (NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *> *)v30,
                   (NiObject *)pkOldSkinGeomb,
                   v31->m_key) )
        {
          v31 = v31->m_pkNext;
          if ( !v31 )
            goto LABEL_98;
        }
        pkNewSkinGeoma = (NiTriBasedGeom *)v31->m_val;
        v37 = v3->m_kSkinSet.m_uiAlloced;
        if ( v3->m_kSkinSet.m_uiUsed == v37 )
        {
          v38 = 2 * v37;
          if ( !v37 )
            v38 = 1;
          if ( v38 != v37 )
          {
            if ( v38 )
            {
              v39 = (NiTriBasedGeom **)operator new(4 * v38);
              v40 = 0;
              if ( v3->m_kSkinSet.m_uiUsed )
              {
                do
                {
                  v39[v40] = v3->m_kSkinSet.m_pBase[v40];
                  ++v40;
                }
                while ( v40 < v3->m_kSkinSet.m_uiUsed );
              }
            }
            else
            {
              v39 = 0;
            }
            operator delete(v3->m_kSkinSet.m_pBase);
            v3->m_kSkinSet.m_pBase = v39;
            v3->m_kSkinSet.m_uiAlloced = v38;
          }
        }
        v41 = pkNewSkinGeoma;
      }
      else
      {
LABEL_98:
        v32 = v3->m_kSkinSet.m_uiAlloced;
        if ( v3->m_kSkinSet.m_uiUsed == v32 )
        {
          v33 = 2 * v32;
          if ( !v32 )
            v33 = 1;
          if ( v33 != v32 )
          {
            if ( v33 )
            {
              v34 = (NiTriBasedGeom **)operator new(4 * v33);
              v35 = 0;
              if ( v3->m_kSkinSet.m_uiUsed )
              {
                do
                {
                  v34[v35] = v3->m_kSkinSet.m_pBase[v35];
                  ++v35;
                }
                while ( v35 < v3->m_kSkinSet.m_uiUsed );
              }
            }
            else
            {
              v34 = 0;
            }
            operator delete(v3->m_kSkinSet.m_pBase);
            v3->m_kSkinSet.m_pBase = v34;
            v3->m_kSkinSet.m_uiAlloced = v33;
          }
        }
        v41 = pkOldSkinGeomb;
      }
      v3->m_kSkinSet.m_pBase[v3->m_kSkinSet.m_uiUsed] = v41;
      v42 = ui;
      v43 = v55;
      ++v3->m_kSkinSet.m_uiUsed;
      ui = v42 + 1;
    }
    while ( v42 + 1 < v43->m_kSkinSet.m_uiUsed );
  }
  v44 = v3->m_iLOD;
  v3->m_iLOD = -1;
  NiBoneLODController::SetBoneLOD(v3, v44);
}

//----- (007DE110) --------------------------------------------------------
void __thiscall NiBoneLODController::SaveBinary(NiBoneLODController *this, NiStream *kStream)
{
  NiStream *v2; // esi@1
  NiBoneLODController *v3; // ebx@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST28_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v7; // eax@1
  NiBinaryStream *v8; // ST14_4@1
  unsigned int (__cdecl *v9)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v10; // eax@1
  unsigned int (__cdecl *v11)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@1
  bool v12; // zf@1
  NiTSet<NiNode *> *v13; // edi@2
  NiBinaryStream *v14; // eax@2
  NiBinaryStream *v15; // ST28_4@3
  unsigned int (__cdecl *v16)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@3
  NiBinaryStream *v17; // ST28_4@6
  unsigned int (__cdecl *v18)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@6
  NiBinaryStream *v19; // eax@8
  unsigned int (__cdecl *v20)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@8
  NiTSet<NiBoneLODController::SkinInfo *> *v21; // edi@9
  NiBinaryStream *v22; // eax@9
  void (__thiscall *v23)(NiStream *, NiObject *); // edx@11
  NiBinaryStream *v24; // eax@15
  unsigned int (__cdecl *v25)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@15
  unsigned int v26; // edi@15
  NiBoneLODController::SkinInfo *pkInfo; // [sp+Ch] [bp-8h]@3
  unsigned int uj; // [sp+10h] [bp-4h]@1

  v2 = kStream;
  v3 = this;
  NiTimeController::SaveBinary((NiTimeController *)&this->vfptr, kStream);
  v4 = v2->m_pkOstr;
  v5 = v4;
  v6 = v4->m_pfnWrite;
  kStream = (NiStream *)4;
  v6(v5, &v3->m_iLOD, 4u, (unsigned int *)&kStream, 1u);
  v7 = v2->m_pkOstr;
  v8 = v7;
  v9 = v7->m_pfnWrite;
  kStream = (NiStream *)4;
  v9(v8, &v3->m_uiNumLODs, 4u, (unsigned int *)&kStream, 1u);
  v10 = v2->m_pkOstr;
  uj = v3->m_kBoneArray.m_uiSize;
  v11 = v10->m_pfnWrite;
  kStream = (NiStream *)4;
  v11(v10, &uj, 4u, (unsigned int *)&kStream, 1u);
  v12 = v3->m_kBoneArray.m_uiSize == 0;
  kStream = 0;
  if ( !v12 )
  {
    do
    {
      v13 = v3->m_kBoneArray.m_pBase[(_DWORD)kStream];
      v14 = v2->m_pkOstr;
      if ( v13 )
      {
        pkInfo = (NiBoneLODController::SkinInfo *)v13->m_uiUsed;
        v15 = v14;
        v16 = v14->m_pfnWrite;
        uj = 4;
        v16(v15, &pkInfo, 4u, &uj, 1u);
        v12 = v13->m_uiUsed == 0;
        uj = 0;
        if ( !v12 )
        {
          do
            v2->vfptr->SaveLinkID(v2, (NiObject *)v13->m_pBase[uj++]);
          while ( uj < v13->m_uiUsed );
        }
      }
      else
      {
        uj = 0;
        v17 = v14;
        v18 = v14->m_pfnWrite;
        pkInfo = (NiBoneLODController::SkinInfo *)4;
        v18(v17, &uj, 4u, (unsigned int *)&pkInfo, 1u);
      }
      kStream = (NiStream *)((char *)kStream + 1);
    }
    while ( (unsigned int)kStream < v3->m_kBoneArray.m_uiSize );
  }
  v19 = v2->m_pkOstr;
  pkInfo = (NiBoneLODController::SkinInfo *)v3->m_kSkinArray.m_uiSize;
  v20 = v19->m_pfnWrite;
  kStream = (NiStream *)4;
  v20(v19, &pkInfo, 4u, (unsigned int *)&kStream, 1u);
  v12 = v3->m_kSkinArray.m_uiSize == 0;
  kStream = 0;
  if ( !v12 )
  {
    do
    {
      v21 = v3->m_kSkinArray.m_pBase[(_DWORD)kStream];
      v22 = v2->m_pkOstr;
      pkInfo = (NiBoneLODController::SkinInfo *)4;
      if ( v21 )
      {
        uj = v21->m_uiUsed;
        v22->m_pfnWrite(v22, &uj, 4u, (unsigned int *)&pkInfo, 1u);
        v12 = v21->m_uiUsed == 0;
        uj = 0;
        if ( !v12 )
        {
          do
          {
            v23 = v2->vfptr->SaveLinkID;
            pkInfo = v21->m_pBase[uj];
            v23(v2, (NiObject *)&pkInfo->m_pkSkinGeom->vfptr);
            v2->vfptr->SaveLinkID(v2, (NiObject *)pkInfo->m_spSkinInst.m_pObject);
            ++uj;
          }
          while ( uj < v21->m_uiUsed );
        }
      }
      else
      {
        uj = 0;
        v22->m_pfnWrite(v22, &uj, 4u, (unsigned int *)&pkInfo, 1u);
      }
      kStream = (NiStream *)((char *)kStream + 1);
    }
    while ( (unsigned int)kStream < v3->m_kSkinArray.m_uiSize );
  }
  v24 = v2->m_pkOstr;
  pkInfo = (NiBoneLODController::SkinInfo *)v3->m_kSkinSet.m_uiUsed;
  v25 = v24->m_pfnWrite;
  kStream = (NiStream *)4;
  v25(v24, &pkInfo, 4u, (unsigned int *)&kStream, 1u);
  v26 = 0;
  if ( v3->m_kSkinSet.m_uiUsed )
  {
    do
      v2->vfptr->SaveLinkID(v2, (NiObject *)v3->m_kSkinSet.m_pBase[v26++]);
    while ( v26 < v3->m_kSkinSet.m_uiUsed );
  }
}

//----- (007DE350) --------------------------------------------------------
void __cdecl NiBoneLODController::CreateObject()
{
  NiBoneLODController *v0; // eax@1

  v0 = (NiBoneLODController *)operator new(0x80u);
  if ( v0 )
    NiBoneLODController::NiBoneLODController(v0);
}

//----- (007DE370) --------------------------------------------------------
void __thiscall NiBoneLODController::LoadBinary(NiBoneLODController *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiBoneLODController *v3; // esi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST28_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  unsigned int (__cdecl *v7)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@1
  NiBinaryStream *v8; // ST14_4@1
  NiBinaryStream *v9; // eax@1
  NiBinaryStream *v10; // ST00_4@1
  unsigned int (__cdecl *v11)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiTSet<NiNode *> *v12; // eax@2
  NiTSet<NiNode *> *v13; // esi@2
  NiBoneLODController *v14; // ebx@4
  unsigned int v15; // eax@4
  NiBinaryStream *v16; // eax@15
  unsigned int (__cdecl *v17)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@15
  unsigned int v18; // eax@16
  int v19; // ebx@17
  NiNode **v20; // edi@21
  unsigned int v21; // eax@21
  NiBinaryStream *v22; // edi@28
  unsigned int v23; // ebx@28
  unsigned int (__cdecl *v24)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@28
  NiTSet<NiBoneLODController::SkinInfo *> *v25; // eax@29
  NiTSet<NiBoneLODController::SkinInfo *> *v26; // esi@29
  NiBoneLODController *v27; // edi@31
  NiBinaryStream *v28; // eax@42
  NiBinaryStream *v29; // ST28_4@42
  unsigned int (__cdecl *v30)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@42
  NiBoneLODController::SkinInfo *v31; // eax@43
  unsigned int v32; // eax@46
  int v33; // ebx@47
  NiBoneLODController::SkinInfo **v34; // edi@51
  unsigned int v35; // eax@51
  NiBinaryStream *v36; // eax@59
  unsigned int (__cdecl *v37)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@59
  NiBoneLODController *v38; // esi@60
  unsigned int v39; // eax@61
  int v40; // ebx@62
  NiTriBasedGeom **v41; // edi@66
  unsigned int v42; // eax@66
  unsigned int v43; // [sp+Ch] [bp-20h]@1
  NiBoneLODController::SkinInfo *pkInfo; // [sp+10h] [bp-1Ch]@15
  unsigned int uiSkinSetSize; // [sp+14h] [bp-18h]@59
  unsigned int uiSkinArraySize; // [sp+18h] [bp-14h]@28
  unsigned int uiBoneArraySize; // [sp+1Ch] [bp-10h]@1
  unsigned int uiSetSize; // [sp+20h] [bp-Ch]@15
  NiBoneLODController *v49; // [sp+24h] [bp-8h]@1
  unsigned int ui; // [sp+28h] [bp-4h]@1

  v2 = kStream;
  v3 = this;
  v49 = this;
  NiTimeController::LoadBinary((NiTimeController *)&this->vfptr, kStream);
  v4 = kStream->m_pkIstr;
  v5 = v4;
  v6 = v4->m_pfnRead;
  v43 = 4;
  v6(v5, &v3->m_iLOD, 4u, &v43, 1u);
  v7 = kStream->m_pkIstr->m_pfnRead;
  v8 = kStream->m_pkIstr;
  v43 = 4;
  v7(v8, &v3->m_uiNumLODs, 4u, &v43, 1u);
  v9 = kStream->m_pkIstr;
  uiBoneArraySize = 0;
  v10 = v9;
  v11 = v9->m_pfnRead;
  v43 = 4;
  v11(v10, &uiBoneArraySize, 4u, &v43, 1u);
  for ( ui = 0; ui < uiBoneArraySize; ++ui )
  {
    v12 = (NiTSet<NiNode *> *)operator new(0xCu);
    v13 = 0;
    if ( v12 )
    {
      v12->m_pBase = 0;
      v12->m_uiAlloced = 0;
      v12->m_uiUsed = 0;
      v13 = v12;
    }
    v14 = v49;
    v15 = ui;
    if ( ui < v49->m_kBoneArray.m_uiMaxSize
      || (NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(
            (NiTArray<NiVBBlock *> *)&v49->m_kBoneArray,
            ui + v49->m_kBoneArray.m_uiGrowBy),
          v15 = ui,
          ui < v14->m_kBoneArray.m_uiMaxSize) )
    {
      if ( v15 < v14->m_kBoneArray.m_uiSize )
      {
        if ( v13 )
        {
          if ( !v14->m_kBoneArray.m_pBase[v15] )
            ++v14->m_kBoneArray.m_uiESize;
        }
        else if ( v14->m_kBoneArray.m_pBase[v15] )
        {
          --v14->m_kBoneArray.m_uiESize;
        }
      }
      else
      {
        v14->m_kBoneArray.m_uiSize = v15 + 1;
        if ( v13 )
          ++v14->m_kBoneArray.m_uiESize;
      }
      v14->m_kBoneArray.m_pBase[v15] = v13;
    }
    v16 = v2->m_pkIstr;
    uiSetSize = 0;
    v17 = v16->m_pfnRead;
    v43 = 4;
    v17(v16, &uiSetSize, 4u, &v43, 1u);
    for ( pkInfo = 0; (unsigned int)pkInfo < uiSetSize; pkInfo = (NiBoneLODController::SkinInfo *)((char *)pkInfo + 1) )
    {
      v18 = v13->m_uiAlloced;
      if ( v13->m_uiUsed == v18 )
      {
        v19 = 2 * v18;
        if ( !v18 )
          v19 = 1;
        if ( v19 != v18 )
        {
          if ( v19 )
          {
            v20 = (NiNode **)operator new(4 * v19);
            v21 = 0;
            if ( v13->m_uiUsed )
            {
              do
              {
                v20[v21] = v13->m_pBase[v21];
                ++v21;
              }
              while ( v21 < v13->m_uiUsed );
            }
          }
          else
          {
            v20 = 0;
          }
          operator delete(v13->m_pBase);
          v13->m_pBase = v20;
          v2 = kStream;
          v13->m_uiAlloced = v19;
        }
      }
      v13->m_pBase[v13->m_uiUsed++] = (NiNode *)v49;
      NiStream::ReadLinkID(v2);
    }
  }
  v22 = v2->m_pkIstr;
  v23 = 0;
  uiSkinArraySize = 0;
  v24 = v22->m_pfnRead;
  v43 = 4;
  v24(v22, &uiSkinArraySize, 4u, &v43, 1u);
  ui = 0;
  if ( uiSkinArraySize > 0 )
  {
    do
    {
      v25 = (NiTSet<NiBoneLODController::SkinInfo *> *)operator new(0xCu);
      v26 = 0;
      if ( v25 )
      {
        v25->m_pBase = 0;
        v25->m_uiAlloced = 0;
        v25->m_uiUsed = 0;
        v26 = v25;
      }
      v27 = v49;
      if ( v23 < v49->m_kSkinArray.m_uiMaxSize
        || (NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(
              (NiTArray<NiVBBlock *> *)&v49->m_kSkinArray,
              v23 + v49->m_kSkinArray.m_uiGrowBy),
            v23 < v27->m_kSkinArray.m_uiMaxSize) )
      {
        if ( v23 < v27->m_kSkinArray.m_uiSize )
        {
          if ( v26 )
          {
            if ( !v27->m_kSkinArray.m_pBase[v23] )
              ++v27->m_kSkinArray.m_uiESize;
          }
          else if ( v27->m_kSkinArray.m_pBase[v23] )
          {
            --v27->m_kSkinArray.m_uiESize;
          }
        }
        else
        {
          v27->m_kSkinArray.m_uiSize = v23 + 1;
          if ( v26 )
            ++v27->m_kSkinArray.m_uiESize;
        }
        v27->m_kSkinArray.m_pBase[v23] = v26;
      }
      v28 = kStream->m_pkIstr;
      uiSetSize = 0;
      v29 = v28;
      v30 = v28->m_pfnRead;
      v43 = 4;
      v30(v29, &uiSetSize, 4u, &v43, 1u);
      v43 = 0;
      if ( uiSetSize )
      {
        do
        {
          v31 = (NiBoneLODController::SkinInfo *)operator new(8u);
          if ( v31 )
          {
            v31->m_spSkinInst.m_pObject = 0;
            pkInfo = v31;
          }
          else
          {
            pkInfo = 0;
          }
          v32 = v26->m_uiAlloced;
          if ( v26->m_uiUsed == v32 )
          {
            v33 = 2 * v32;
            if ( v32 <= 0 )
              v33 = 1;
            if ( v33 != v32 )
            {
              if ( v33 )
              {
                v34 = (NiBoneLODController::SkinInfo **)operator new(4 * v33);
                v35 = 0;
                if ( v26->m_uiUsed )
                {
                  do
                  {
                    v34[v35] = v26->m_pBase[v35];
                    ++v35;
                  }
                  while ( v35 < v26->m_uiUsed );
                }
              }
              else
              {
                v34 = 0;
              }
              operator delete(v26->m_pBase);
              v26->m_pBase = v34;
              v26->m_uiAlloced = v33;
            }
          }
          v26->m_pBase[v26->m_uiUsed++] = pkInfo;
          NiStream::ReadLinkID(kStream);
          NiStream::ReadLinkID(kStream);
          ++v43;
        }
        while ( v43 < uiSetSize );
        v23 = ui;
      }
      ui = ++v23;
    }
    while ( v23 < uiSkinArraySize );
  }
  v36 = kStream->m_pkIstr;
  uiSkinSetSize = 0;
  v37 = v36->m_pfnRead;
  v43 = 4;
  v37(v36, &uiSkinSetSize, 4u, &v43, 1u);
  ui = 0;
  if ( uiSkinSetSize > 0 )
  {
    v38 = v49;
    do
    {
      v39 = v38->m_kSkinSet.m_uiAlloced;
      if ( v38->m_kSkinSet.m_uiUsed == v39 )
      {
        v40 = 2 * v39;
        if ( !v39 )
          v40 = 1;
        if ( v40 != v39 )
        {
          if ( v40 )
          {
            v41 = (NiTriBasedGeom **)operator new(4 * v40);
            v42 = 0;
            if ( v38->m_kSkinSet.m_uiUsed )
            {
              do
              {
                v41[v42] = v38->m_kSkinSet.m_pBase[v42];
                ++v42;
              }
              while ( v42 < v38->m_kSkinSet.m_uiUsed );
            }
          }
          else
          {
            v41 = 0;
          }
          operator delete(v38->m_kSkinSet.m_pBase);
          v38->m_kSkinSet.m_pBase = v41;
          v38->m_kSkinSet.m_uiAlloced = v40;
        }
      }
      v38->m_kSkinSet.m_pBase[v38->m_kSkinSet.m_uiUsed++] = (NiTriBasedGeom *)v38;
      NiStream::ReadLinkID(kStream);
      ++ui;
    }
    while ( ui < uiSkinSetSize );
  }
}

//----- (007DE7B0) --------------------------------------------------------
void __thiscall NiBoneLODController::PostLinkObject(NiBoneLODController *this, NiStream *kStream)
{
  NiBoneLODController *v2; // esi@1
  int v3; // ST00_4@1

  v2 = this;
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue(
    (NiVBDynamicSet *)this,
    (IDirect3DVertexBuffer9 *)kStream);
  v3 = v2->m_iLOD;
  v2->m_iLOD = -1;
  NiBoneLODController::SetBoneLOD(v2, v3);
}

//----- (007DE7E0) --------------------------------------------------------
void __thiscall NiBoneLODController::Update(NiBoneLODController *this, float fTime)
{
  int v2; // eax@1
  int v3; // esi@2
  signed int v4; // edx@3

  v2 = NiBoneLODController::ms_iGlobalLOD;
  if ( NiBoneLODController::ms_iGlobalLOD != -1 )
  {
    v3 = this->m_iLOD;
    if ( NiBoneLODController::ms_iGlobalLOD != v3 )
    {
      v4 = this->m_uiNumLODs;
      if ( NiBoneLODController::ms_iGlobalLOD > v4 )
        v2 = v4 - 1;
      if ( v2 != v3 )
        NiBoneLODController::SetBoneLOD(this, v2);
    }
  }
}

//----- (007DE810) --------------------------------------------------------
void __thiscall NiBoneLODController::GetViewerStrings(NiBoneLODController *this, NiTArray<char *> *pkStrings)
{
  NiBoneLODController *v2; // ebx@1
  NiVBChip *v3; // eax@1
  NiTArray<NiVBChip *> *v4; // esi@1
  unsigned int v5; // edi@1
  NiTArray<char *> *v6; // eax@3
  unsigned int v7; // edi@3
  NiTArray<char *> *v8; // eax@5
  unsigned int v9; // edi@5
  NiVBChip *element; // [sp+Ch] [bp-4h]@1

  v2 = this;
  v3 = (NiVBChip *)NiGetViewerString(NiBoneLODController::m_RTTI.m_pcName);
  v4 = (NiTArray<NiVBChip *> *)pkStrings;
  v5 = pkStrings->m_uiSize;
  element = v3;
  if ( v5 >= pkStrings->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(
      (NiTArray<NiVBBlock *> *)pkStrings,
      v5 + pkStrings->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt(v4, v5, &element);
  v6 = (NiTArray<char *> *)NiGetViewerString("m_iLOD", v2->m_iLOD);
  v7 = v4->m_uiSize;
  pkStrings = v6;
  if ( v7 >= v4->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize((NiTArray<NiVBBlock *> *)v4, v7 + v4->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt(v4, v7, (NiVBChip *const *)&pkStrings);
  v8 = (NiTArray<char *> *)NiGetViewerString("m_uiNumLODs", v2->m_uiNumLODs);
  v9 = v4->m_uiSize;
  pkStrings = v8;
  if ( v9 >= v4->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize((NiTArray<NiVBBlock *> *)v4, v9 + v4->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt(v4, v9, (NiVBChip *const *)&pkStrings);
}

//----- (007DE8D0) --------------------------------------------------------
void __thiscall NiBoneLODController::CleanUp(NiBoneLODController *this)
{
  NiBoneLODController *v1; // edi@1
  unsigned int v2; // esi@1
  void **v3; // ebx@2
  unsigned int v4; // ebx@5
  unsigned int v5; // eax@5
  NiTSet<NiBoneLODController::SkinInfo *> *v6; // esi@8
  unsigned int v7; // eax@9
  NiBoneLODController::SkinInfo *v8; // ebx@10
  NiSkinInstance *v9; // esi@11
  unsigned int v10; // eax@20
  NiTSet<NiBoneLODController::SkinInfo *> *pkSet; // [sp+Ch] [bp-Ch]@8
  unsigned int ui; // [sp+10h] [bp-8h]@7
  unsigned int uj; // [sp+14h] [bp-4h]@9

  v1 = this;
  v2 = 0;
  if ( this->m_kBoneArray.m_uiSize )
  {
    do
    {
      v3 = (void **)&v1->m_kBoneArray.m_pBase[v2]->m_pBase;
      if ( v3 )
      {
        operator delete(*v3);
        operator delete(v3);
      }
      ++v2;
    }
    while ( v2 < v1->m_kBoneArray.m_uiSize );
  }
  v4 = 0;
  v5 = 0;
  if ( v1->m_kBoneArray.m_uiSize )
  {
    do
      v1->m_kBoneArray.m_pBase[v5++] = 0;
    while ( v5 < v1->m_kBoneArray.m_uiSize );
  }
  v1->m_kBoneArray.m_uiSize = 0;
  v1->m_kBoneArray.m_uiESize = 0;
  ui = 0;
  if ( v1->m_kSkinArray.m_uiSize > 0 )
  {
    do
    {
      v6 = v1->m_kSkinArray.m_pBase[v4];
      pkSet = v6;
      if ( v6 )
      {
        v7 = 0;
        uj = 0;
        if ( v6->m_uiUsed )
        {
          do
          {
            v8 = v6->m_pBase[v7];
            if ( v8 )
            {
              v9 = v8->m_spSkinInst.m_pObject;
              if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
                v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
              operator delete(v8);
              v7 = uj;
              v6 = pkSet;
            }
            uj = ++v7;
          }
          while ( v7 < v6->m_uiUsed );
          v4 = ui;
        }
        operator delete(v6->m_pBase);
        operator delete(v6);
      }
      ui = ++v4;
    }
    while ( v4 < v1->m_kSkinArray.m_uiSize );
  }
  v10 = 0;
  if ( v1->m_kSkinArray.m_uiSize )
  {
    do
      v1->m_kSkinArray.m_pBase[v10++] = 0;
    while ( v10 < v1->m_kSkinArray.m_uiSize );
  }
  v1->m_kSkinArray.m_uiSize = 0;
  v1->m_kSkinArray.m_uiESize = 0;
  v1->m_kSkinSet.m_uiUsed = 0;
}

//----- (007DE9D0) --------------------------------------------------------
NiBoneLODController *__thiscall NiBoneLODController::`scalar deleting destructor'(NiBoneLODController *this, unsigned int a2)
{
  NiBoneLODController *v2; // esi@1
  NiTSet<NiBoneLODController::SkinInfo *> **v3; // ST04_4@1
  NiTSet<NiNode *> **v4; // ST00_4@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiBoneLODController::`vftable';
  NiBoneLODController::CleanUp(this);
  operator delete(v2->m_kSkinSet.m_pBase);
  v3 = v2->m_kSkinArray.m_pBase;
  v2->m_kSkinArray.vfptr = (NiTArray<NiTSet<NiBoneLODController::SkinInfo *> *>Vtbl *)&NiTArray<NiTSet<NiBoneLODController::SkinInfo *> *>::`vftable';
  operator delete(v3);
  v4 = v2->m_kBoneArray.m_pBase;
  v2->m_kBoneArray.vfptr = (NiTArray<NiTSet<NiNode *> *>Vtbl *)&NiTArray<NiTSet<NiNode *> *>::`vftable';
  operator delete(v4);
  NiTimeController::~NiTimeController((NiTimeController *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E5948: using guessed type int (__thiscall *NiTArray<NiTSet<NiNode *> *>::`vftable')(void *p, char);
// 9E5950: using guessed type int (__thiscall *NiTArray<NiTSet<NiBoneLODController::SkinInfo *> *>::`vftable')(void *p, char);
// 9E595C: using guessed type int (__thiscall *NiBoneLODController::`vftable')(void *p, char);

//----- (007DEA30) --------------------------------------------------------
void __thiscall NiKFMTool::SetModelPath(NiKFMTool *this, const char *pcModelPath)
{
  NiKFMTool *v2; // edi@1
  unsigned int v3; // kr00_4@2
  char *v4; // eax@2

  v2 = this;
  operator delete(this->m_pcModelPath);
  v2->m_pcModelPath = 0;
  if ( pcModelPath )
  {
    v3 = strlen(pcModelPath);
    v4 = (char *)operator new(v3 + 1);
    v2->m_pcModelPath = v4;
    strcpy_s(v4, v3 + 1, pcModelPath);
  }
}

//----- (007DEA80) --------------------------------------------------------
void __thiscall NiKFMTool::GetSequenceIDs(NiKFMTool *this, unsigned int **puiSequenceIDs, unsigned int *uiNumIDs)
{
  NiKFMTool *v3; // esi@1
  unsigned int v4; // eax@1
  unsigned int v5; // ecx@3
  int v6; // edi@3
  unsigned int v7; // eax@3
  NiTMapItem<unsigned int,NiKFMTool::Sequence *> **v8; // esi@4
  _DWORD *v9; // edx@4
  NiTMapItem<unsigned int,NiKFMTool::Sequence *> *v10; // eax@7
  unsigned int v11; // ebx@10
  int v12; // eax@11
  unsigned int v13; // edx@11
  unsigned int v14; // eax@11
  NiTMapItem<unsigned int,NiKFMTool::Sequence *> **v15; // ecx@12
  unsigned int *uiNumIDsa; // [sp+10h] [bp+Ch]@9

  v3 = this;
  v4 = this->m_mapSequences.m_kAllocator.m_uiCount;
  *uiNumIDs = v4;
  if ( v4 )
  {
    *puiSequenceIDs = (unsigned int *)operator new(4 * v4);
    v5 = v3->m_mapSequences.m_uiHashSize;
    v6 = (int)&v3->m_mapSequences;
    v7 = 0;
    if ( v5 )
    {
      v8 = v3->m_mapSequences.m_ppkHashTable;
      v9 = *(_DWORD **)(v6 + 8);
      while ( !*v9 )
      {
        ++v7;
        ++v9;
        if ( v7 >= v5 )
          goto LABEL_7;
      }
      v10 = v8[v7];
    }
    else
    {
LABEL_7:
      v10 = 0;
    }
    if ( v10 )
    {
      uiNumIDsa = 0;
      do
      {
        v11 = v10->m_key;
        v10 = v10->m_pkNext;
        if ( !v10 )
        {
          v12 = (*(int (__thiscall **)(int, unsigned int))(*(_DWORD *)v6 + 4))(v6, v11);
          v13 = *(_DWORD *)(v6 + 4);
          v14 = v12 + 1;
          if ( v14 >= v13 )
          {
LABEL_15:
            v10 = 0;
          }
          else
          {
            v15 = (NiTMapItem<unsigned int,NiKFMTool::Sequence *> **)(*(_DWORD *)(v6 + 8) + 4 * v14);
            while ( !*v15 )
            {
              ++v14;
              ++v15;
              if ( v14 >= v13 )
                goto LABEL_15;
            }
            v10 = *v15;
          }
        }
        *(unsigned int *)((char *)*puiSequenceIDs + (_DWORD)uiNumIDsa) = v11;
        ++uiNumIDsa;
      }
      while ( v10 );
    }
  }
  else
  {
    *puiSequenceIDs = 0;
  }
}

//----- (007DEB50) --------------------------------------------------------
char *__thiscall NiKFMTool::ConstructAbsolutePath(NiKFMTool *this, const char *pcRelativePath, const char *pcBasePath)
{
  char *v3; // edi@1
  NiKFMTool *v4; // ebx@1
  int v5; // eax@2
  int v6; // eax@3
  unsigned int v7; // esi@8
  char *v8; // eax@8
  char acBasePath[260]; // [sp+Ch] [bp-108h]@1

  v3 = (char *)pcRelativePath;
  v4 = this;
  strcpy_s(acBasePath, 0x104u, pcBasePath);
  while ( 1 )
  {
    strstr(v3, "..\\");
    if ( !v5 )
      break;
    v3 += 3;
    strrchr(acBasePath, 92);
    if ( v6 && strlen((const char *)v6) == 1 && strlen(acBasePath) > 3 )
    {
      *(_BYTE *)v6 = 0;
      strrchr(acBasePath, 92);
    }
    *(_BYTE *)(v6 + 1) = 0;
  }
  operator delete(v4->m_pcFullPathBuffer);
  v7 = strlen(acBasePath) + strlen(v3) + 1;
  v8 = (char *)operator new(v7);
  v4->m_pcFullPathBuffer = v8;
  strcpy_s(v8, v7, acBasePath);
  strcat_s(v4->m_pcFullPathBuffer, v7, v3);
  return v4->m_pcFullPathBuffer;
}

//----- (007DEC70) --------------------------------------------------------
void __thiscall NiTSet<NiKFMTool::Transition::BlendPair *>::Add(NiTSet<NiKFMTool::Transition::BlendPair *> *this, NiKFMTool::Transition::BlendPair *const *element)
{
  NiTSet<NiKFMTool::Transition::BlendPair *> *v2; // esi@1
  unsigned int v3; // eax@1
  unsigned int v4; // eax@3

  v2 = this;
  v3 = this->m_uiAlloced;
  if ( this->m_uiUsed == v3 )
  {
    if ( v3 )
      v4 = 2 * v3;
    else
      v4 = 1;
    NiTSet<NiScreenGeometryData::ScreenElement *>::Realloc((NiTSet<NiD3DTextureStageGroup *> *)this, v4);
  }
  v2->m_pBase[v2->m_uiUsed++] = *element;
}

//----- (007DECB0) --------------------------------------------------------
void __cdecl NiStreamLoadBinary<bool>(NiBinaryStream *binstream, bool *value)
{
  int v2; // ecx@0
  unsigned int (__cdecl *v3)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@1
  int v4; // [sp+0h] [bp-4h]@1

  v4 = v2;
  v3 = binstream->m_pfnRead;
  v4 = 1;
  v3(binstream, value, 1u, (unsigned int *)&v4, 1u);
}

//----- (007DECE0) --------------------------------------------------------
void __cdecl NiStreamSaveBinary<unsigned int>(NiBinaryStream *binstream, unsigned int *value)
{
  int v2; // ecx@0
  unsigned int (__cdecl *v3)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@1
  int v4; // [sp+0h] [bp-4h]@1

  v4 = v2;
  v3 = binstream->m_pfnWrite;
  v4 = 4;
  v3(binstream, value, 4u, (unsigned int *)&v4, 1u);
}

//----- (007DED10) --------------------------------------------------------
void __thiscall NiTSet<NiKFMTool::Transition::ChainInfo>::Realloc(NiTSet<NiKFMTool::Transition::ChainInfo> *this, unsigned int uiNewSize)
{
  NiTSet<NiKFMTool::Transition::ChainInfo> *v2; // edi@1
  void *v3; // eax@3
  signed int v4; // edx@4
  void *i; // ecx@4
  NiKFMTool::Transition::ChainInfo *v6; // esi@6
  unsigned int v7; // eax@8
  NiKFMTool::Transition::ChainInfo *v8; // ecx@9

  v2 = this;
  if ( uiNewSize != this->m_uiAlloced )
  {
    if ( uiNewSize )
    {
      v3 = operator new(8 * uiNewSize);
      if ( v3 )
      {
        v4 = uiNewSize - 1;
        for ( i = v3; v4 >= 0; --v4 )
        {
          *((float *)i + 1) = 0.0;
          *(_DWORD *)i = 0;
          i = (char *)i + 8;
        }
        v6 = (NiKFMTool::Transition::ChainInfo *)v3;
      }
      else
      {
        v6 = 0;
      }
      v7 = 0;
      if ( v2->m_uiUsed )
      {
        do
        {
          v8 = v2->m_pBase;
          v6[v7].m_uiSequenceID = v2->m_pBase[v7].m_uiSequenceID;
          v6[v7].m_fDuration = v8[v7].m_fDuration;
          ++v7;
        }
        while ( v7 < v2->m_uiUsed );
      }
    }
    else
    {
      v6 = 0;
    }
    operator delete(v2->m_pBase);
    v2->m_pBase = v6;
    v2->m_uiAlloced = uiNewSize;
  }
}

//----- (007DEDB0) --------------------------------------------------------
void __thiscall NiTSet<NiKFMTool::SequenceGroup::SequenceInfo>::Realloc(NiTSet<NiKFMTool::SequenceGroup::SequenceInfo> *this, unsigned int uiNewSize)
{
  NiTSet<NiKFMTool::SequenceGroup::SequenceInfo> *v2; // esi@1
  char *v3; // eax@3
  signed int v4; // edx@4
  int v5; // ecx@5
  NiKFMTool::SequenceGroup::SequenceInfo *v6; // edi@7
  unsigned int v7; // edx@9
  int v8; // ecx@10
  int v9; // eax@11
  int v10; // edi@11
  NiKFMTool::SequenceGroup::SequenceInfo *pNewBase; // [sp+8h] [bp-4h]@7

  v2 = this;
  if ( uiNewSize != this->m_uiAlloced )
  {
    if ( uiNewSize )
    {
      v3 = (char *)operator new(24 * uiNewSize);
      if ( v3 )
      {
        v4 = uiNewSize - 1;
        if ( ((uiNewSize - 1) & 0x80000000) == 0 )
        {
          v5 = (int)(v3 + 8);
          do
          {
            *(float *)v5 = 0.0;
            *(_DWORD *)(v5 - 8) = 0;
            *(float *)(v5 + 4) = 0.0;
            *(_DWORD *)(v5 - 4) = 0;
            *(float *)(v5 + 8) = 0.0;
            *(_DWORD *)(v5 + 12) = -2;
            v5 += 24;
            --v4;
          }
          while ( v4 >= 0 );
        }
        v6 = (NiKFMTool::SequenceGroup::SequenceInfo *)v3;
        pNewBase = (NiKFMTool::SequenceGroup::SequenceInfo *)v3;
      }
      else
      {
        v6 = 0;
        pNewBase = 0;
      }
      v7 = 0;
      if ( v2->m_uiUsed > 0 )
      {
        v8 = 0;
        do
        {
          v9 = (int)&v2->m_pBase[v8];
          v6[v8].m_uiSequenceID = v2->m_pBase[v8].m_uiSequenceID;
          v10 = (int)&v6[v8];
          *(_DWORD *)(v10 + 4) = *(_DWORD *)(v9 + 4);
          *(_DWORD *)(v10 + 8) = *(_DWORD *)(v9 + 8);
          *(_DWORD *)(v10 + 12) = *(_DWORD *)(v9 + 12);
          *(_DWORD *)(v10 + 16) = *(_DWORD *)(v9 + 16);
          *(_DWORD *)(v10 + 20) = *(_DWORD *)(v9 + 20);
          v6 = pNewBase;
          ++v7;
          ++v8;
        }
        while ( v7 < v2->m_uiUsed );
      }
    }
    else
    {
      v6 = 0;
    }
    operator delete(v2->m_pBase);
    v2->m_pBase = v6;
    v2->m_uiAlloced = uiNewSize;
  }
}

//----- (007DEE90) --------------------------------------------------------
void __thiscall NiKFMTool::Transition::BlendPair::BlendPair(NiKFMTool::Transition::BlendPair *this, const char *pcStartKey, const char *pcTargetKey)
{
  NiKFMTool::Transition::BlendPair *v3; // esi@1
  unsigned int v4; // kr00_4@2
  char *v5; // eax@2
  unsigned int v6; // kr04_4@4
  char *v7; // eax@4

  v3 = this;
  this->m_pcStartKey = 0;
  this->m_pcTargetKey = 0;
  operator delete(0);
  v3->m_pcStartKey = 0;
  if ( pcStartKey )
  {
    v4 = strlen(pcStartKey);
    v5 = (char *)operator new(v4 + 1);
    v3->m_pcStartKey = v5;
    strcpy_s(v5, v4 + 1, pcStartKey);
  }
  operator delete(v3->m_pcTargetKey);
  v3->m_pcTargetKey = 0;
  if ( pcTargetKey )
  {
    v6 = strlen(pcTargetKey);
    v7 = (char *)operator new(v6 + 1);
    v3->m_pcTargetKey = v7;
    strcpy_s(v7, v6 + 1, pcTargetKey);
  }
}

//----- (007DEF30) --------------------------------------------------------
void __thiscall NiKFMTool::SequenceGroup::SequenceGroup(NiKFMTool::SequenceGroup *this, unsigned int uiGroupID, const char *pcName)
{
  NiKFMTool::SequenceGroup *v3; // esi@1
  unsigned int v4; // kr00_4@2
  char *v5; // eax@2

  v3 = this;
  this->m_pcName = 0;
  this->m_uiGroupID = uiGroupID;
  this->m_aSequenceInfo.m_pBase = 0;
  this->m_aSequenceInfo.m_uiAlloced = 0;
  this->m_aSequenceInfo.m_uiUsed = 0;
  operator delete(this->m_pcName);
  v3->m_pcName = 0;
  if ( pcName )
  {
    v4 = strlen(pcName);
    v5 = (char *)operator new(v4 + 1);
    v3->m_pcName = v5;
    strcpy_s(v5, v4 + 1, pcName);
  }
}

//----- (007DEF90) --------------------------------------------------------
signed int __thiscall NiKFMTool::AddBlendPair(NiKFMTool *this, unsigned int uiSrcID, unsigned int uiDesID, const char *pcStartKey, const char *pcTargetKey)
{
  signed int result; // eax@3
  unsigned int v6; // ebx@5
  const char *v7; // esi@9
  const char *v8; // edi@9
  NiKFMTool::Transition::BlendPair *v9; // eax@12
  unsigned int v10; // eax@13

  if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
         (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_mapSequences,
         uiSrcID,
         (NiVBSet **)&uiSrcID)
    && uiSrcID )
  {
    if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
           (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)(uiSrcID + 12),
           uiDesID,
           (NiVBSet **)&uiSrcID)
      && (v6 = uiSrcID) != 0 )
    {
      if ( *(_DWORD *)uiSrcID )
      {
        result = 4;
      }
      else
      {
        v7 = pcStartKey;
        v8 = pcTargetKey;
        if ( pcStartKey || pcTargetKey )
        {
          v9 = (NiKFMTool::Transition::BlendPair *)operator new(8u);
          if ( v9 )
          {
            NiKFMTool::Transition::BlendPair::BlendPair(v9, v7, v8);
            uiSrcID = v10;
          }
          else
          {
            uiSrcID = 0;
          }
          NiTSet<NiKFMTool::Transition::BlendPair *>::Add(
            (NiTSet<NiKFMTool::Transition::BlendPair *> *)(v6 + 8),
            (NiKFMTool::Transition::BlendPair *const *)&uiSrcID);
          result = 0;
        }
        else
        {
          result = 6;
        }
      }
    }
    else
    {
      result = 3;
    }
  }
  else
  {
    result = 2;
  }
  return result;
}

//----- (007DF040) --------------------------------------------------------
char *__thiscall NiKFMTool::GetFullModelPath(NiKFMTool *this)
{
  NiKFMTool *v1; // esi@1
  char *v2; // eax@1
  int v3; // eax@2

  v1 = this;
  v2 = this->m_pcModelPath;
  if ( v2 )
  {
    strstr(v2, ":");
    if ( v3 || !strncmp(v1->m_pcModelPath, "\\\\", 2u) )
      return v1->m_pcModelPath;
    if ( v1->m_pcBaseKFMPath )
      return NiKFMTool::ConstructAbsolutePath(v1, v1->m_pcModelPath, v1->m_pcBaseKFMPath);
  }
  return 0;
}

//----- (007DF0A0) --------------------------------------------------------
char *__thiscall NiKFMTool::GetFullKFFilename(NiKFMTool *this, unsigned int uiSequenceID)
{
  NiKFMTool *v2; // edi@1
  unsigned int v3; // esi@2
  char *v4; // eax@3
  int v5; // eax@4

  v2 = this;
  if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
         (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_mapSequences,
         uiSequenceID,
         (NiVBSet **)&uiSequenceID) )
  {
    v3 = uiSequenceID;
    if ( uiSequenceID )
    {
      v4 = *(char **)(uiSequenceID + 4);
      if ( v4 )
      {
        strstr(v4, ":");
        if ( v5 || !strncmp(*(const char **)(v3 + 4), "\\\\", 2u) )
          return *(char **)(v3 + 4);
        if ( v2->m_pcBaseKFMPath )
          return NiKFMTool::ConstructAbsolutePath(v2, *(const char **)(v3 + 4), v2->m_pcBaseKFMPath);
      }
    }
  }
  return 0;
}

//----- (007DF120) --------------------------------------------------------
void __stdcall NiKFMTool::LoadCString(NiFile *kFile, char **pcString)
{
  NiFile *v3; // esi@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@1
  char *v5; // eax@2
  char **v6; // edi@2
  NiFile *v7; // ST08_4@2
  char *v8; // ST04_4@2
  unsigned int (__cdecl *v9)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@2
  int v10; // [sp+4h] [bp-4h]@1

  v3 = kFile;
  v4 = kFile->m_pfnRead;
  v10 = 4;
  v4((NiBinaryStream *)&kFile->vfptr, &kFile, 4u, (unsigned int *)&v10, 1u);
  if ( (signed int)kFile <= 0 )
  {
    *pcString = 0;
  }
  else
  {
    v5 = (char *)operator new((unsigned int)&kFile->vfptr + 1);
    v6 = pcString;
    v7 = kFile;
    v8 = v5;
    *pcString = v5;
    v9 = v3->m_pfnRead;
    pcString = (char **)1;
    v9((NiBinaryStream *)&v3->vfptr, v8, (unsigned int)v7, (unsigned int *)&pcString, 1u);
    (*v6)[(_DWORD)kFile] = 0;
  }
}

//----- (007DF1A0) --------------------------------------------------------
void __thiscall NiTSet<NiKFMTool::Transition::ChainInfo>::Add(NiTSet<NiKFMTool::Transition::ChainInfo> *this, NiKFMTool::Transition::ChainInfo *element)
{
  NiTSet<NiKFMTool::Transition::ChainInfo> *v2; // esi@1
  unsigned int v3; // eax@1
  unsigned int v4; // eax@3
  unsigned int v5; // ecx@6
  NiKFMTool::Transition::ChainInfo *v6; // eax@6

  v2 = this;
  v3 = this->m_uiAlloced;
  if ( this->m_uiUsed == v3 )
  {
    if ( v3 )
      v4 = 2 * v3;
    else
      v4 = 1;
    NiTSet<NiKFMTool::Transition::ChainInfo>::Realloc(this, v4);
  }
  v5 = v2->m_uiUsed;
  v6 = v2->m_pBase;
  v6[v5].m_uiSequenceID = element->m_uiSequenceID;
  v6[v5].m_fDuration = element->m_fDuration;
  ++v2->m_uiUsed;
}

//----- (007DF1E0) --------------------------------------------------------
void __thiscall NiTSet<NiKFMTool::SequenceGroup::SequenceInfo>::Add(NiTSet<NiKFMTool::SequenceGroup::SequenceInfo> *this, NiKFMTool::SequenceGroup::SequenceInfo *element)
{
  NiTSet<NiKFMTool::SequenceGroup::SequenceInfo> *v2; // esi@1
  unsigned int v3; // eax@1
  unsigned int v4; // eax@3

  v2 = this;
  v3 = this->m_uiAlloced;
  if ( this->m_uiUsed == v3 )
  {
    if ( v3 )
      v4 = 2 * v3;
    else
      v4 = 1;
    NiTSet<NiKFMTool::SequenceGroup::SequenceInfo>::Realloc(this, v4);
  }
  v2->m_pBase[v2->m_uiUsed++] = *element;
}

//----- (007DF240) --------------------------------------------------------
NiKFMTool::KFM_RC __thiscall NiKFMTool::AddSequenceGroup(NiKFMTool *this, unsigned int uiGroupID, const char *pcName)
{
  NiKFMTool *v3; // esi@1
  NiKFMTool::SequenceGroup *v4; // eax@1
  unsigned int v5; // edi@1
  NiVBSet *v6; // eax@2
  const char *v7; // ebx@5
  NiVBSet *pkGroup; // [sp+10h] [bp+8h]@2

  v3 = this;
  v4 = (NiKFMTool::SequenceGroup *)operator new(0x14u);
  v5 = uiGroupID;
  if ( v4 )
  {
    NiKFMTool::SequenceGroup::SequenceGroup(v4, uiGroupID, pcName);
    pkGroup = v6;
  }
  else
  {
    pkGroup = 0;
  }
  if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
         (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v3->m_mapSequenceGroups,
         v5,
         (NiVBSet **)&pcName) )
  {
    v7 = pcName;
    if ( pcName )
    {
      operator delete(*((void **)pcName + 1));
      operator delete(*((void **)v7 + 2));
      operator delete((void *)v7);
    }
  }
  NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::SetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v3->m_mapSequenceGroups,
    v5,
    pkGroup);
  return 0;
}

//----- (007DF2C0) --------------------------------------------------------
signed int __thiscall NiKFMTool::AddSequenceToGroup(NiKFMTool *this, unsigned int uiGroupID, unsigned int uiSequenceID, int iPriority, float fWeight, float fEaseInTime, float fEaseOutTime, unsigned int uiSynchronizeToSequence)
{
  signed int result; // eax@3
  NiKFMTool::SequenceGroup::SequenceInfo kInfo; // [sp+0h] [bp-18h]@4

  if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
         (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_mapSequenceGroups,
         uiGroupID,
         (NiVBSet **)&uiGroupID)
    && uiGroupID )
  {
    kInfo.m_fWeight = fWeight;
    kInfo.m_uiSequenceID = uiSequenceID;
    kInfo.m_fEaseInTime = fEaseInTime;
    kInfo.m_iPriority = iPriority;
    kInfo.m_fEaseOutTime = fEaseOutTime;
    kInfo.m_uiSynchronizeSequenceID = uiSynchronizeToSequence;
    NiTSet<NiKFMTool::SequenceGroup::SequenceInfo>::Add(
      (NiTSet<NiKFMTool::SequenceGroup::SequenceInfo> *)(uiGroupID + 8),
      &kInfo);
    result = 0;
  }
  else
  {
    result = 11;
  }
  return result;
}

//----- (007DF330) --------------------------------------------------------
void __thiscall NiKFMTool::GatherChainIDs(NiKFMTool *this, unsigned int uiSrcID, unsigned int uiDesID, NiKFMTool::Transition *pkTransition, NiTSet<unsigned int> *kChainIDs)
{
  bool v5; // zf@1
  NiTSet<unsigned int> *v6; // esi@2
  unsigned int v7; // ecx@2
  unsigned int v8; // ebx@3
  unsigned int v9; // eax@4
  unsigned int v10; // eax@6
  unsigned int v11; // edi@9
  unsigned int v12; // ebx@10
  unsigned int v13; // eax@16
  unsigned int v14; // eax@18
  unsigned int v15; // eax@23
  unsigned int v16; // eax@25
  unsigned int uiChainCount; // [sp+0h] [bp-Ch]@3
  NiVBSet *val; // [sp+4h] [bp-8h]@12
  NiKFMTool *v19; // [sp+8h] [bp-4h]@1

  v5 = pkTransition->m_eType == 3;
  v19 = this;
  if ( v5 )
  {
    v6 = kChainIDs;
    v7 = kChainIDs->m_uiUsed;
    if ( v7 <= 0x3E8 )
    {
      v8 = pkTransition->m_aChainInfo.m_uiUsed;
      uiChainCount = v8;
      if ( v8 )
      {
        v9 = kChainIDs->m_uiAlloced;
        if ( v7 == v9 )
        {
          if ( v9 )
            v10 = 2 * v9;
          else
            v10 = 1;
          NiTSet<NiScreenGeometryData::ScreenElement *>::Realloc((NiTSet<NiD3DTextureStageGroup *> *)kChainIDs, v10);
        }
        v11 = uiSrcID;
        v6->m_pBase[v6->m_uiUsed++] = uiSrcID;
        kChainIDs = 0;
        if ( v8 )
        {
          do
          {
            v12 = pkTransition->m_aChainInfo.m_pBase[(_DWORD)kChainIDs].m_uiSequenceID;
            if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
                   (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v19->m_mapSequences,
                   v11,
                   (NiVBSet **)&uiSrcID)
              && uiSrcID
              && NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
                   (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)(uiSrcID + 12),
                   v12,
                   &val)
              && val
              && val->m_uiIndex == 3 )
            {
              NiKFMTool::GatherChainIDs(v19, v11, v12, (NiKFMTool::Transition *)val, v6);
            }
            else
            {
              v13 = v6->m_uiAlloced;
              if ( v6->m_uiUsed == v13 )
              {
                if ( v13 )
                  v14 = 2 * v13;
                else
                  v14 = 1;
                NiTSet<NiScreenGeometryData::ScreenElement *>::Realloc((NiTSet<NiD3DTextureStageGroup *> *)v6, v14);
              }
              v6->m_pBase[v6->m_uiUsed++] = v12;
            }
            v11 = v12;
            kChainIDs = (NiTSet<unsigned int> *)((char *)kChainIDs + 1);
          }
          while ( (unsigned int)kChainIDs < uiChainCount );
        }
        v15 = v6->m_uiAlloced;
        if ( v6->m_uiUsed == v15 )
        {
          if ( v15 )
            v16 = 2 * v15;
          else
            v16 = 1;
          NiTSet<NiScreenGeometryData::ScreenElement *>::Realloc((NiTSet<NiD3DTextureStageGroup *> *)v6, v16);
        }
        v6->m_pBase[v6->m_uiUsed++] = uiDesID;
      }
    }
  }
}

//----- (007DF470) --------------------------------------------------------
void __thiscall NiKFMTool::HandleDelayedBlendsInChains(NiKFMTool *this)
{
  char *v1; // ebx@1
  unsigned int v2; // ecx@1
  unsigned int v3; // eax@1
  _DWORD *v4; // edx@2
  _DWORD *v5; // eax@5
  int v6; // edi@10
  int v7; // eax@12
  unsigned int v8; // edx@12
  unsigned int v9; // eax@12
  void **v10; // ecx@13
  unsigned int v11; // edx@17
  int v12; // ebx@17
  unsigned int v13; // eax@17
  _DWORD *v14; // ecx@18
  void *v15; // eax@21
  int v16; // ecx@27
  NiKFMTool::Transition *v17; // edi@27
  void *v18; // eax@27
  int v19; // eax@29
  unsigned int v20; // edx@29
  unsigned int v21; // eax@29
  void **v22; // ecx@30
  unsigned int v23; // ecx@35
  unsigned int v24; // esi@35
  NiKFMTool::Transition::ChainInfo *v25; // edx@36
  double v26; // st7@36
  int v27; // edx@36
  int v28; // ebx@38
  int v29; // edi@41
  int v30; // esi@41
  int v31; // esi@45
  int v32; // edi@46
  int v33; // edi@50
  const char *v34; // eax@53
  int v35; // [sp+8h] [bp-20h]@17
  NiKFMTool::Transition *pkTransition; // [sp+Ch] [bp-1Ch]@27
  int v37; // [sp+10h] [bp-18h]@36
  int v38; // [sp+14h] [bp-14h]@27
  unsigned int ui; // [sp+18h] [bp-10h]@35
  char *v40; // [sp+1Ch] [bp-Ch]@1
  _DWORD *spos; // [sp+20h] [bp-8h]@11
  void *tpos; // [sp+24h] [bp-4h]@28

  v1 = (char *)&this->m_mapSequences;
  v2 = this->m_mapSequences.m_uiHashSize;
  v3 = 0;
  v40 = v1;
  if ( v2 )
  {
    v4 = (_DWORD *)*((_DWORD *)v1 + 2);
    while ( !*v4 )
    {
      ++v3;
      ++v4;
      if ( v3 >= v2 )
        goto LABEL_5;
    }
    v5 = *(_DWORD **)(*((_DWORD *)v1 + 2) + 4 * v3);
  }
  else
  {
LABEL_5:
    v5 = 0;
  }
  if ( v5 )
  {
    while ( 1 )
    {
      v6 = v5[2];
      if ( *v5 )
      {
        spos = (_DWORD *)*v5;
      }
      else
      {
        v7 = (*(int (__thiscall **)(char *, _DWORD))(*(_DWORD *)v1 + 4))(v1, v5[1]);
        v8 = *((_DWORD *)v1 + 1);
        v9 = v7 + 1;
        if ( v9 >= v8 )
        {
LABEL_16:
          spos = 0;
        }
        else
        {
          v10 = (void **)(*((_DWORD *)v1 + 2) + 4 * v9);
          while ( !*v10 )
          {
            ++v9;
            ++v10;
            if ( v9 >= v8 )
              goto LABEL_16;
          }
          spos = *v10;
        }
      }
      v11 = *(_DWORD *)(v6 + 16);
      v12 = v6 + 12;
      v13 = 0;
      v35 = v6 + 12;
      if ( v11 )
      {
        v14 = *(_DWORD **)(v6 + 20);
        while ( !*v14 )
        {
          ++v13;
          ++v14;
          if ( v13 >= v11 )
            goto LABEL_21;
        }
        v15 = *(void **)(*(_DWORD *)(v6 + 20) + 4 * v13);
      }
      else
      {
LABEL_21:
        v15 = 0;
      }
      if ( v15 )
      {
        while ( 1 )
        {
          v16 = *((_DWORD *)v15 + 1);
          v17 = (NiKFMTool::Transition *)*((_DWORD *)v15 + 2);
          v18 = *(void **)v15;
          v38 = v16;
          pkTransition = v17;
          if ( v18 )
          {
            tpos = v18;
          }
          else
          {
            v19 = (*(int (__thiscall **)(int, int))(*(_DWORD *)v12 + 4))(v12, v16);
            v20 = *(_DWORD *)(v12 + 4);
            v21 = v19 + 1;
            if ( v21 >= v20 )
            {
LABEL_33:
              tpos = 0;
            }
            else
            {
              v22 = (void **)(*(_DWORD *)(v12 + 8) + 4 * v21);
              while ( !*v22 )
              {
                ++v21;
                ++v22;
                if ( v21 >= v20 )
                  goto LABEL_33;
              }
              tpos = *v22;
            }
          }
          if ( v17->m_eType == 3 )
          {
            v23 = v17->m_aChainInfo.m_uiUsed;
            v24 = 0;
            ui = 0;
            if ( v23 )
            {
              do
              {
                v25 = v17->m_aChainInfo.m_pBase;
                v26 = v25[v24].m_fDuration;
                v27 = (int)&v25[v24];
                v37 = v27;
                if ( -1.0 == v26 )
                {
                  v28 = v24 + 1 >= v23 ? v38 : *(_DWORD *)(v27 + 8);
                  v29 = *(_DWORD *)v27;
                  v30 = *(_DWORD *)(*((_DWORD *)v40 + 2)
                                  + 4 * (*(int (__thiscall **)(char *, int))(*(_DWORD *)v40 + 4))(v40, *(_DWORD *)v27));
                  if ( v30 )
                  {
                    while ( !(unsigned __int8)(*(int (__stdcall **)(int, _DWORD))(*(_DWORD *)v40 + 8))(
                                                v29,
                                                *(_DWORD *)(v30 + 4)) )
                    {
                      v30 = *(_DWORD *)v30;
                      if ( !v30 )
                        goto LABEL_56;
                    }
                    v31 = *(_DWORD *)(v30 + 8);
                    if ( v31 )
                    {
                      v32 = *(_DWORD *)(*(_DWORD *)(v31 + 20)
                                      + 4 * (*(int (__thiscall **)(int, int))(*(_DWORD *)(v31 + 12) + 4))(v31 + 12, v28));
                      if ( v32 )
                      {
                        while ( !(unsigned __int8)(*(int (__thiscall **)(int, int, _DWORD))(*(_DWORD *)(v31 + 12) + 8))(
                                                    v31 + 12,
                                                    v28,
                                                    *(_DWORD *)(v32 + 4)) )
                        {
                          v32 = *(_DWORD *)v32;
                          if ( !v32 )
                            goto LABEL_56;
                        }
                        v33 = *(_DWORD *)(v32 + 8);
                        if ( v33 )
                        {
                          if ( !*(_DWORD *)v33 && *(_DWORD *)(v33 + 16) == 1 )
                          {
                            v34 = ***(const char ****)(v33 + 8);
                            if ( v34 )
                            {
                              if ( !strcmp(v34, "end") )
                                *(float *)(v37 + 4) = 0.0;
                            }
                          }
                        }
                      }
                    }
                  }
                }
LABEL_56:
                v17 = pkTransition;
                v23 = pkTransition->m_aChainInfo.m_uiUsed;
                v24 = ui + 1;
                ui = v24;
              }
              while ( v24 < v23 );
              v12 = v35;
            }
          }
          if ( !tpos )
            break;
          v15 = tpos;
        }
      }
      if ( !spos )
        break;
      v5 = spos;
      v1 = v40;
    }
  }
}

//----- (007DF6D0) --------------------------------------------------------
void __thiscall NiKFMTool::Sequence::Sequence(NiKFMTool::Sequence *this, unsigned int uiSequenceID, const char *pcFilename, int iAnimIndex)
{
  NiKFMTool::Sequence *v4; // esi@1
  char *v5; // eax@1
  unsigned int v6; // ST0C_4@1
  unsigned int v7; // kr00_4@2
  char *v8; // eax@2

  v4 = this;
  this->m_uiSequenceID = uiSequenceID;
  this->m_iAnimIndex = iAnimIndex;
  this->m_pcFilename = 0;
  this->m_mapTransitions.m_uiHashSize = 37;
  this->m_mapTransitions.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Transition *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Transition *>::`vftable';
  this->m_mapTransitions.m_kAllocator.m_uiCount = 0;
  v5 = (char *)operator new(0x94u);
  v6 = 4 * v4->m_mapTransitions.m_uiHashSize;
  v4->m_mapTransitions.m_ppkHashTable = (NiTMapItem<unsigned int,NiKFMTool::Transition *> **)v5;
  memset(v5, 0, v6);
  v4->m_mapTransitions.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Transition *>Vtbl *)&NiTPointerMap<unsigned int,NiKFMTool::Transition *>::`vftable';
  operator delete(v4->m_pcFilename);
  v4->m_pcFilename = 0;
  if ( pcFilename )
  {
    v7 = strlen(pcFilename);
    v8 = (char *)operator new(v7 + 1);
    v4->m_pcFilename = v8;
    strcpy_s(v8, v7 + 1, pcFilename);
  }
}
// 9E503C: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Transition *>::`vftable')(void *p, char);
// 9E505C: using guessed type int (__thiscall *NiTPointerMap<unsigned int,NiKFMTool::Transition *>::`vftable')(void *p, char);

//----- (007DF770) --------------------------------------------------------
char __thiscall NiKFMTool::IsValidChainTransition(NiKFMTool *this, unsigned int uiSrcID, unsigned int uiDesID, NiKFMTool::Transition *pkTransition)
{
  char result; // al@2
  NiTSet<unsigned int> kChainIDs; // [sp+0h] [bp-Ch]@1

  kChainIDs.m_pBase = 0;
  kChainIDs.m_uiAlloced = 0;
  kChainIDs.m_uiUsed = 0;
  NiKFMTool::GatherChainIDs(this, uiSrcID, uiDesID, pkTransition, &kChainIDs);
  if ( kChainIDs.m_uiUsed <= 0x3E8 )
  {
    operator delete(kChainIDs.m_pBase);
    result = 1;
  }
  else
  {
    operator delete(kChainIDs.m_pBase);
    result = 0;
  }
  return result;
}

//----- (007DF7D0) --------------------------------------------------------
NiKFMTool::KFM_RC __thiscall NiKFMTool::ReadBinary(NiKFMTool *this, NiFile *kFile, unsigned int uiVersion)
{
  NiKFMTool *v3; // edi@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@2
  const char **v5; // ebx@4
  char *v6; // eax@5
  unsigned int v7; // ST44_4@5
  unsigned int (__cdecl *v8)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // ecx@7
  unsigned int (__cdecl *v9)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // ecx@7
  unsigned int (__cdecl *v10)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@7
  int v11; // ST18_4@7
  unsigned int (__cdecl *v12)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@7
  int v13; // ST04_4@7
  unsigned int (__cdecl *v14)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@8
  NiKFMTool::Sequence *v15; // eax@9
  NiKFMTool::Sequence *v16; // edi@9
  char *v17; // eax@10
  unsigned int v18; // ST48_4@10
  unsigned int (__cdecl *v19)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@12
  unsigned int (__cdecl *v20)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@13
  void *v21; // ebx@14
  unsigned int (__cdecl *v22)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@14
  unsigned int (__cdecl *v23)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // ecx@17
  char *v24; // eax@18
  int v25; // ST40_4@18
  unsigned int (__cdecl *v26)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@18
  unsigned int v27; // kr04_4@21
  char *v28; // eax@21
  unsigned int (__cdecl *v29)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@22
  unsigned int (__cdecl *v30)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@22
  unsigned int (__cdecl *v31)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@23
  unsigned int (__cdecl *v32)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@23
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v33; // edi@23
  NiKFMTool::Transition *v34; // ebx@24
  float *v35; // eax@27
  unsigned int (__cdecl *v36)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@30
  unsigned int (__cdecl *v37)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@30
  NiKFMTool::Transition::BlendPair *v38; // eax@31
  NiKFMTool::Transition::BlendPair *v39; // edi@32
  unsigned int (__cdecl *v40)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@34
  char *v41; // eax@35
  int v42; // ST40_4@35
  char *v43; // ST3C_4@35
  unsigned int (__cdecl *v44)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@35
  unsigned int (__cdecl *v45)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@37
  char *v46; // eax@38
  NiKFMTool::SequenceGroup *v47; // ST40_4@38
  char *v48; // ST3C_4@38
  unsigned int (__cdecl *v49)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@38
  unsigned int v50; // eax@40
  int v51; // ecx@41
  NiKFMTool::Transition::BlendPair **v52; // edi@45
  unsigned int v53; // eax@45
  int v54; // ecx@49
  unsigned int v55; // eax@50
  unsigned int (__cdecl *v56)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@51
  unsigned int (__cdecl *v57)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@53
  unsigned int (__cdecl *v58)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@53
  unsigned int (__cdecl *v59)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@55
  unsigned int (__cdecl *v60)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@55
  unsigned int v61; // eax@55
  unsigned int v62; // eax@57
  NiKFMTool::Transition::ChainInfo *v63; // eax@60
  unsigned int v64; // ecx@60
  unsigned int v65; // eax@60
  unsigned int (__cdecl *v66)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // ecx@63
  NiKFMTool::SequenceGroup *v67; // eax@65
  NiKFMTool::SequenceGroup *v68; // edi@66
  unsigned int (__cdecl *v69)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // ecx@68
  unsigned int (__cdecl *v70)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // ecx@68
  char *v71; // eax@69
  int v72; // ST40_4@69
  unsigned int (__cdecl *v73)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@69
  unsigned int (__cdecl *v74)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // ecx@71
  NiKFMTool::SequenceGroup *v75; // edi@72
  unsigned int (__cdecl *v76)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // ecx@73
  unsigned int (__cdecl *v77)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // ecx@73
  unsigned int (__cdecl *v78)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // ecx@73
  unsigned int (__cdecl *v79)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // ecx@73
  unsigned int (__cdecl *v80)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // ecx@73
  unsigned int (__cdecl *v81)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // ecx@74
  unsigned int v82; // eax@76
  unsigned int v83; // eax@78
  int v84; // edx@81
  NiKFMTool::SequenceGroup::SequenceInfo *v85; // eax@81
  int v86; // eax@81
  unsigned int v87; // eax@81
  NiKFMTool::Transition::ChainInfo kTemp; // [sp+Ch] [bp-184h]@53
  unsigned int uiNumSequenceGroups; // [sp+14h] [bp-17Ch]@63
  unsigned int uiNumSequences; // [sp+18h] [bp-178h]@8
  NiKFMTool::Transition::ChainInfo kInfo; // [sp+1Ch] [bp-174h]@55
  unsigned int v93; // [sp+24h] [bp-16Ch]@73
  int v94; // [sp+28h] [bp-168h]@73
  float v95; // [sp+2Ch] [bp-164h]@73
  float v96; // [sp+30h] [bp-160h]@73
  float v97; // [sp+34h] [bp-15Ch]@73
  int v98; // [sp+38h] [bp-158h]@73
  int v99; // [sp+3Ch] [bp-154h]@34
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v100; // [sp+40h] [bp-150h]@23
  int v101; // [sp+44h] [bp-14Ch]@13
  int v102; // [sp+48h] [bp-148h]@17
  char *pcDefaultKFPath; // [sp+4Ch] [bp-144h]@1
  char *pcDefaultNIFPath; // [sp+50h] [bp-140h]@1
  NiKFMTool *v105; // [sp+54h] [bp-13Ch]@1
  NiKFMTool::Sequence *pkSequence; // [sp+58h] [bp-138h]@10
  unsigned int uiNumChainSequences; // [sp+5Ch] [bp-134h]@51
  unsigned int uk; // [sp+60h] [bp-130h]@30
  unsigned int ui; // [sp+64h] [bp-12Ch]@8
  unsigned int uiNumBlendPairs; // [sp+68h] [bp-128h]@7
  char bDefaultPaths; // [sp+6Fh] [bp-121h]@2
  NiKFMTool::SequenceGroup *pkGroup; // [sp+70h] [bp-120h]@37
  int v113; // [sp+74h] [bp-11Ch]@34
  unsigned int uiNumTransitions; // [sp+78h] [bp-118h]@2
  NiKFMTool::Transition::BlendPair *pkPair; // [sp+7Ch] [bp-114h]@23
  unsigned int uj; // [sp+80h] [bp-110h]@7
  unsigned int uiDesID; // [sp+84h] [bp-10Ch]@23
  char acFilename[260]; // [sp+88h] [bp-108h]@5

  v3 = this;
  v105 = this;
  pcDefaultNIFPath = 0;
  pcDefaultKFPath = 0;
  if ( uiVersion < 0x1020300 )
  {
    v4 = kFile->m_pfnRead;
    uiNumTransitions = 1;
    v4((NiBinaryStream *)&kFile->vfptr, &bDefaultPaths, 1u, &uiNumTransitions, 1u);
    if ( bDefaultPaths )
    {
      NiKFMTool::LoadCString(kFile, &pcDefaultNIFPath);
      NiKFMTool::LoadCString(kFile, &pcDefaultKFPath);
    }
  }
  v5 = (const char **)&v3->m_pcModelPath;
  NiKFMTool::LoadCString(kFile, &v3->m_pcModelPath);
  if ( pcDefaultNIFPath )
  {
    strcpy_s(acFilename, 0x104u, pcDefaultNIFPath);
    strcat_s(acFilename, 0x104u, *v5);
    operator delete((void *)*v5);
    *v5 = 0;
    uiNumTransitions = strlen(acFilename) + 1;
    v6 = (char *)operator new(uiNumTransitions);
    v7 = uiNumTransitions;
    *v5 = v6;
    strcpy_s(v6, v7, acFilename);
  }
  NiKFMTool::LoadCString(kFile, &v3->m_pcModelRoot);
  if ( uiVersion >= 0x1020200 )
  {
    uiNumBlendPairs = (unsigned int)v3->m_pkDefaultSyncTrans;
    v8 = kFile->m_pfnRead;
    uiNumTransitions = 4;
    v8((NiBinaryStream *)&kFile->vfptr, &uj, 4u, &uiNumTransitions, 1u);
    *(_DWORD *)uiNumBlendPairs = uj;
    uiNumBlendPairs = (unsigned int)v3->m_pkDefaultNonSyncTrans;
    v9 = kFile->m_pfnRead;
    uiNumTransitions = 4;
    v9((NiBinaryStream *)&kFile->vfptr, &uj, 4u, &uiNumTransitions, 1u);
    *(_DWORD *)uiNumBlendPairs = uj;
    v10 = kFile->m_pfnRead;
    v11 = (int)&v3->m_pkDefaultSyncTrans->m_fDuration;
    uiNumTransitions = 4;
    v10((NiBinaryStream *)&kFile->vfptr, (void *)v11, 4u, &uiNumTransitions, 1u);
    v12 = kFile->m_pfnRead;
    v13 = (int)&v3->m_pkDefaultNonSyncTrans->m_fDuration;
    uiNumTransitions = 4;
    v12((NiBinaryStream *)&kFile->vfptr, (void *)v13, 4u, &uiNumTransitions, 1u);
  }
  v14 = kFile->m_pfnRead;
  uiNumTransitions = 4;
  v14((NiBinaryStream *)&kFile->vfptr, &uiNumSequences, 4u, &uiNumTransitions, 1u);
  ui = 0;
  if ( uiNumSequences )
  {
    do
    {
      v15 = (NiKFMTool::Sequence *)operator new(0x1Cu);
      v16 = v15;
      if ( v15 )
      {
        v15->m_uiSequenceID = 0;
        v15->m_pcFilename = 0;
        v15->m_iAnimIndex = 0;
        v15->m_mapTransitions.m_uiHashSize = 37;
        v15->m_mapTransitions.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Transition *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Transition *>::`vftable';
        v15->m_mapTransitions.m_kAllocator.m_uiCount = 0;
        v17 = (char *)operator new(0x94u);
        v18 = 4 * v16->m_mapTransitions.m_uiHashSize;
        v16->m_mapTransitions.m_ppkHashTable = (NiTMapItem<unsigned int,NiKFMTool::Transition *> **)v17;
        memset(v17, 0, v18);
        v16->m_mapTransitions.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Transition *>Vtbl *)&NiTPointerMap<unsigned int,NiKFMTool::Transition *>::`vftable';
        pkSequence = v16;
      }
      else
      {
        pkSequence = 0;
        v16 = 0;
      }
      v19 = kFile->m_pfnRead;
      uj = 4;
      v19((NiBinaryStream *)&kFile->vfptr, v16, 4u, &uj, 1u);
      if ( uiVersion < 0x1020500 )
      {
        v20 = kFile->m_pfnRead;
        uj = 4;
        v20((NiBinaryStream *)&kFile->vfptr, &v101, 4u, &uj, 1u);
        if ( v101 <= 0 )
        {
          v21 = 0;
        }
        else
        {
          v21 = operator new(v101 + 1);
          v22 = kFile->m_pfnRead;
          uj = 1;
          v22((NiBinaryStream *)&kFile->vfptr, v21, v101, &uj, 1u);
          *((_BYTE *)v21 + v101) = 0;
        }
        operator delete(v21);
      }
      v23 = kFile->m_pfnRead;
      uj = 4;
      v23((NiBinaryStream *)&kFile->vfptr, &v102, 4u, &uj, 1u);
      if ( v102 <= 0 )
      {
        v16->m_pcFilename = 0;
      }
      else
      {
        v24 = (char *)operator new(v102 + 1);
        v25 = v102;
        v16->m_pcFilename = v24;
        v26 = kFile->m_pfnRead;
        uj = 1;
        v26((NiBinaryStream *)&kFile->vfptr, v24, v25, &uj, 1u);
        v16->m_pcFilename[v102] = 0;
      }
      if ( pcDefaultKFPath )
      {
        strcpy_s(acFilename, 0x104u, pcDefaultKFPath);
        strcat_s(acFilename, 0x104u, v16->m_pcFilename);
        operator delete(v16->m_pcFilename);
        v16->m_pcFilename = 0;
        v27 = strlen(acFilename);
        v28 = (char *)operator new(v27 + 1);
        v16->m_pcFilename = v28;
        strcpy_s(v28, v27 + 1, acFilename);
      }
      v29 = kFile->m_pfnRead;
      uj = 4;
      v29((NiBinaryStream *)&kFile->vfptr, &v16->m_iAnimIndex, 4u, &uj, 1u);
      v30 = kFile->m_pfnRead;
      uj = 4;
      v30((NiBinaryStream *)&kFile->vfptr, &uiNumTransitions, 4u, &uj, 1u);
      for ( uj = 0; uj < uiNumTransitions; ++uj )
      {
        v31 = kFile->m_pfnRead;
        pkPair = (NiKFMTool::Transition::BlendPair *)4;
        v31((NiBinaryStream *)&kFile->vfptr, &uiDesID, 4u, (unsigned int *)&pkPair, 1u);
        v32 = kFile->m_pfnRead;
        pkPair = (NiKFMTool::Transition::BlendPair *)4;
        v32((NiBinaryStream *)&kFile->vfptr, &v100, 4u, (unsigned int *)&pkPair, 1u);
        v33 = v100;
        if ( v100 == (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)4 )
        {
          v34 = v105->m_pkDefaultSyncTrans;
        }
        else if ( v100 == (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)5 )
        {
          v34 = v105->m_pkDefaultNonSyncTrans;
        }
        else
        {
          v35 = (float *)operator new(0x24u);
          if ( v35 )
          {
            v35[1] = 0.0;
            *(_DWORD *)v35 = 0;
            *((_DWORD *)v35 + 2) = 0;
            *((_DWORD *)v35 + 3) = 0;
            *((_DWORD *)v35 + 4) = 0;
            *((_DWORD *)v35 + 5) = 0;
            *((_DWORD *)v35 + 6) = 0;
            *((_DWORD *)v35 + 7) = 0;
            *((_DWORD *)v35 + 8) = 6;
            v34 = (NiKFMTool::Transition *)v35;
          }
          else
          {
            v34 = 0;
          }
          v34->m_eType = (NiKFMTool::TransitionType)v33;
          v36 = kFile->m_pfnRead;
          pkPair = (NiKFMTool::Transition::BlendPair *)4;
          v36((NiBinaryStream *)&kFile->vfptr, &v34->m_fDuration, 4u, (unsigned int *)&pkPair, 1u);
          v37 = kFile->m_pfnRead;
          pkPair = (NiKFMTool::Transition::BlendPair *)4;
          v37((NiBinaryStream *)&kFile->vfptr, &uiNumBlendPairs, 4u, (unsigned int *)&pkPair, 1u);
          uk = 0;
          if ( uiNumBlendPairs )
          {
            do
            {
              v38 = (NiKFMTool::Transition::BlendPair *)operator new(8u);
              if ( v38 )
              {
                v38->m_pcStartKey = 0;
                v38->m_pcTargetKey = 0;
                v39 = v38;
                pkPair = v38;
              }
              else
              {
                v39 = 0;
                pkPair = 0;
              }
              v40 = kFile->m_pfnRead;
              v113 = 4;
              v40((NiBinaryStream *)&kFile->vfptr, &v99, 4u, (unsigned int *)&v113, 1u);
              if ( v99 <= 0 )
              {
                v39->m_pcStartKey = 0;
              }
              else
              {
                v41 = (char *)operator new(v99 + 1);
                v42 = v99;
                v43 = v41;
                v39->m_pcStartKey = v41;
                v44 = kFile->m_pfnRead;
                v113 = 1;
                v44((NiBinaryStream *)&kFile->vfptr, v43, v42, (unsigned int *)&v113, 1u);
                v39->m_pcStartKey[v99] = 0;
              }
              v45 = kFile->m_pfnRead;
              v113 = 4;
              v45((NiBinaryStream *)&kFile->vfptr, &pkGroup, 4u, (unsigned int *)&v113, 1u);
              if ( (signed int)pkGroup <= 0 )
              {
                v39->m_pcTargetKey = 0;
              }
              else
              {
                v46 = (char *)operator new((unsigned int)&pkGroup->m_uiGroupID + 1);
                v47 = pkGroup;
                v48 = v46;
                v39->m_pcTargetKey = v46;
                v49 = kFile->m_pfnRead;
                v113 = 1;
                v49((NiBinaryStream *)&kFile->vfptr, v48, (unsigned int)v47, (unsigned int *)&v113, 1u);
                *((_BYTE *)&pkGroup->m_uiGroupID + (unsigned int)v39->m_pcTargetKey) = 0;
              }
              v50 = v34->m_aBlendPairs.m_uiAlloced;
              if ( v34->m_aBlendPairs.m_uiUsed == v50 )
              {
                v51 = 2 * v50;
                if ( !v50 )
                  v51 = 1;
                v113 = v51;
                if ( v51 != v50 )
                {
                  if ( v51 )
                  {
                    v52 = (NiKFMTool::Transition::BlendPair **)operator new(4 * v113);
                    v53 = 0;
                    if ( v34->m_aBlendPairs.m_uiUsed )
                    {
                      do
                      {
                        v52[v53] = v34->m_aBlendPairs.m_pBase[v53];
                        ++v53;
                      }
                      while ( v53 < v34->m_aBlendPairs.m_uiUsed );
                    }
                  }
                  else
                  {
                    v52 = 0;
                  }
                  operator delete(v34->m_aBlendPairs.m_pBase);
                  v54 = v113;
                  v34->m_aBlendPairs.m_pBase = v52;
                  v39 = pkPair;
                  v34->m_aBlendPairs.m_uiAlloced = v54;
                }
              }
              v34->m_aBlendPairs.m_pBase[v34->m_aBlendPairs.m_uiUsed] = v39;
              v55 = uk;
              ++v34->m_aBlendPairs.m_uiUsed;
              uk = v55 + 1;
            }
            while ( v55 + 1 < uiNumBlendPairs );
          }
          v56 = kFile->m_pfnRead;
          pkPair = (NiKFMTool::Transition::BlendPair *)4;
          v56((NiBinaryStream *)&kFile->vfptr, &uiNumChainSequences, 4u, (unsigned int *)&pkPair, 1u);
          if ( uiVersion < 0x1020400 && uiNumChainSequences )
          {
            v57 = kFile->m_pfnRead;
            kTemp.m_fDuration = 0.0;
            kTemp.m_uiSequenceID = 0;
            pkPair = (NiKFMTool::Transition::BlendPair *)4;
            v57((NiBinaryStream *)&kFile->vfptr, &kTemp, 4u, (unsigned int *)&pkPair, 1u);
            v58 = kFile->m_pfnRead;
            pkPair = (NiKFMTool::Transition::BlendPair *)4;
            v58((NiBinaryStream *)&kFile->vfptr, &kTemp.m_fDuration, 4u, (unsigned int *)&pkPair, 1u);
            --uiNumChainSequences;
          }
          uk = 0;
          if ( uiNumChainSequences )
          {
            do
            {
              v59 = kFile->m_pfnRead;
              kInfo.m_fDuration = 0.0;
              kInfo.m_uiSequenceID = 0;
              pkPair = (NiKFMTool::Transition::BlendPair *)4;
              v59((NiBinaryStream *)&kFile->vfptr, &kInfo, 4u, (unsigned int *)&pkPair, 1u);
              v60 = kFile->m_pfnRead;
              pkPair = (NiKFMTool::Transition::BlendPair *)4;
              v60((NiBinaryStream *)&kFile->vfptr, &kInfo.m_fDuration, 4u, (unsigned int *)&pkPair, 1u);
              v61 = v34->m_aChainInfo.m_uiAlloced;
              if ( v34->m_aChainInfo.m_uiUsed == v61 )
              {
                if ( v61 )
                  v62 = 2 * v61;
                else
                  v62 = 1;
                NiTSet<NiKFMTool::Transition::ChainInfo>::Realloc(&v34->m_aChainInfo, v62);
              }
              v63 = v34->m_aChainInfo.m_pBase;
              v64 = v34->m_aChainInfo.m_uiUsed;
              v63[v64].m_uiSequenceID = kInfo.m_uiSequenceID;
              v63[v64].m_fDuration = kInfo.m_fDuration;
              v65 = uk;
              ++v34->m_aChainInfo.m_uiUsed;
              uk = v65 + 1;
            }
            while ( v65 + 1 < uiNumChainSequences );
          }
        }
        NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::SetAt(
          (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&pkSequence->m_mapTransitions,
          uiDesID,
          (NiVBSet *)v34);
      }
      NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::SetAt(
        (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v105->m_mapSequences,
        pkSequence->m_uiSequenceID,
        (NiVBSet *)pkSequence);
      ++ui;
    }
    while ( ui < uiNumSequences );
  }
  v66 = kFile->m_pfnRead;
  uiDesID = 4;
  v66((NiBinaryStream *)&kFile->vfptr, &uiNumSequenceGroups, 4u, &uiDesID, 1u);
  ui = 0;
  if ( uiNumSequenceGroups )
  {
    v100 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v105->m_mapSequenceGroups;
    do
    {
      v67 = (NiKFMTool::SequenceGroup *)operator new(0x14u);
      if ( v67 )
      {
        v67->m_uiGroupID = 0;
        v67->m_pcName = 0;
        v67->m_aSequenceInfo.m_pBase = 0;
        v67->m_aSequenceInfo.m_uiAlloced = 0;
        v67->m_aSequenceInfo.m_uiUsed = 0;
        v68 = v67;
        pkGroup = v67;
      }
      else
      {
        v68 = 0;
        pkGroup = 0;
      }
      v69 = kFile->m_pfnRead;
      uiDesID = 4;
      v69((NiBinaryStream *)&kFile->vfptr, v68, 4u, &uiDesID, 1u);
      v70 = kFile->m_pfnRead;
      uiDesID = 4;
      v70((NiBinaryStream *)&kFile->vfptr, &v113, 4u, &uiDesID, 1u);
      if ( v113 <= 0 )
      {
        v68->m_pcName = 0;
      }
      else
      {
        v71 = (char *)operator new(v113 + 1);
        v72 = v113;
        v68->m_pcName = v71;
        v73 = kFile->m_pfnRead;
        uiDesID = 1;
        v73((NiBinaryStream *)&kFile->vfptr, v71, v72, &uiDesID, 1u);
        v68->m_pcName[v113] = 0;
      }
      v74 = kFile->m_pfnRead;
      uiDesID = 4;
      v74((NiBinaryStream *)&kFile->vfptr, &uj, 4u, &uiDesID, 1u);
      uiNumTransitions = 0;
      if ( uj )
      {
        v75 = pkGroup;
        do
        {
          v76 = kFile->m_pfnRead;
          v95 = 0.0;
          v96 = 0.0;
          v97 = 0.0;
          v93 = 0;
          v94 = 0;
          v98 = -2;
          uiDesID = 4;
          v76((NiBinaryStream *)&kFile->vfptr, &v93, 4u, &uiDesID, 1u);
          v77 = kFile->m_pfnRead;
          uiDesID = 4;
          v77((NiBinaryStream *)&kFile->vfptr, &v94, 4u, &uiDesID, 1u);
          v78 = kFile->m_pfnRead;
          uiDesID = 4;
          v78((NiBinaryStream *)&kFile->vfptr, &v95, 4u, &uiDesID, 1u);
          v79 = kFile->m_pfnRead;
          uiDesID = 4;
          v79((NiBinaryStream *)&kFile->vfptr, &v96, 4u, &uiDesID, 1u);
          v80 = kFile->m_pfnRead;
          uiDesID = 4;
          v80((NiBinaryStream *)&kFile->vfptr, &v97, 4u, &uiDesID, 1u);
          if ( uiVersion < 0x1020100 )
          {
            v98 = -2;
          }
          else
          {
            v81 = kFile->m_pfnRead;
            uiDesID = 4;
            v81((NiBinaryStream *)&kFile->vfptr, &v98, 4u, &uiDesID, 1u);
          }
          v82 = v75->m_aSequenceInfo.m_uiAlloced;
          if ( v75->m_aSequenceInfo.m_uiUsed == v82 )
          {
            if ( v82 )
              v83 = 2 * v82;
            else
              v83 = 1;
            NiTSet<NiKFMTool::SequenceGroup::SequenceInfo>::Realloc(&v75->m_aSequenceInfo, v83);
          }
          v84 = 3 * v75->m_aSequenceInfo.m_uiUsed;
          v85 = v75->m_aSequenceInfo.m_pBase;
          v85[8 * v84 / 0x18u].m_uiSequenceID = v93;
          v86 = (int)&v85[8 * v84 / 0x18u];
          *(_DWORD *)(v86 + 4) = v94;
          *(float *)(v86 + 8) = v95;
          *(float *)(v86 + 12) = v96;
          *(float *)(v86 + 16) = v97;
          *(_DWORD *)(v86 + 20) = v98;
          v87 = uiNumTransitions;
          ++v75->m_aSequenceInfo.m_uiUsed;
          uiNumTransitions = v87 + 1;
        }
        while ( v87 + 1 < uj );
        v68 = pkGroup;
      }
      NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::SetAt(
        v100,
        v68->m_uiGroupID,
        (NiVBSet *)v68);
      ++ui;
    }
    while ( ui < uiNumSequenceGroups );
  }
  operator delete(pcDefaultNIFPath);
  operator delete(pcDefaultKFPath);
  return 0;
}
// 9E503C: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiKFMTool::Transition *>::`vftable')(void *p, char);
// 9E505C: using guessed type int (__thiscall *NiTPointerMap<unsigned int,NiKFMTool::Transition *>::`vftable')(void *p, char);

//----- (007E03B0) --------------------------------------------------------
signed int __thiscall NiKFMTool::AddTransition(NiKFMTool *this, unsigned int uiSrcID, unsigned int uiDesID, NiKFMTool::TransitionType eType, float fDuration)
{
  NiKFMTool *v5; // ebx@1
  NiVBSet *v6; // edi@2
  signed int result; // eax@3
  NiKFMTool::TransitionType v8; // esi@4
  float *v9; // eax@8
  double v10; // st7@9
  unsigned int v11; // ebx@10
  unsigned int v12; // esi@11
  NiKFMTool *v13; // [sp+8h] [bp-4h]@1

  v5 = this;
  v13 = this;
  if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
         (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_mapSequences,
         uiSrcID,
         (NiVBSet **)&uiSrcID)
    && (v6 = 0, uiSrcID) )
  {
    v8 = eType;
    if ( eType == 4 )
    {
      v6 = (NiVBSet *)v5->m_pkDefaultSyncTrans;
    }
    else if ( eType == 5 )
    {
      v6 = (NiVBSet *)v5->m_pkDefaultNonSyncTrans;
    }
    else
    {
      v9 = (float *)operator new(0x24u);
      if ( v9 )
      {
        v10 = fDuration;
        *(_DWORD *)v9 = v8;
        v9[1] = v10;
        *((_DWORD *)v9 + 2) = 0;
        *((_DWORD *)v9 + 3) = 0;
        *((_DWORD *)v9 + 4) = 0;
        *((_DWORD *)v9 + 5) = 0;
        *((_DWORD *)v9 + 6) = 0;
        *((_DWORD *)v9 + 7) = 0;
        *((_DWORD *)v9 + 8) = 6;
        v6 = (NiVBSet *)v9;
      }
    }
    v11 = uiSrcID;
    if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
           (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)(uiSrcID + 12),
           uiDesID,
           (NiVBSet **)&uiSrcID) )
    {
      v12 = uiSrcID;
      if ( (NiKFMTool::Transition *)uiSrcID != v13->m_pkDefaultSyncTrans
        && (NiKFMTool::Transition *)uiSrcID != v13->m_pkDefaultNonSyncTrans )
      {
        if ( uiSrcID )
        {
          NiKFMTool::Transition::ClearBlendPairs((NiKFMTool::Transition *)uiSrcID);
          operator delete(*(void **)(v12 + 20));
          operator delete(*(void **)(v12 + 8));
          operator delete((void *)v12);
        }
      }
    }
    NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::SetAt(
      (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)(v11 + 12),
      uiDesID,
      v6);
    result = 0;
  }
  else
  {
    result = 2;
  }
  return result;
}

//----- (007E04A0) --------------------------------------------------------
signed int __thiscall NiKFMTool::AddSequenceToChain(NiKFMTool *this, unsigned int uiSrcID, unsigned int uiDesID, unsigned int uiSequenceID, float fDuration)
{
  signed int result; // eax@3
  unsigned int v6; // ebx@4
  NiKFMTool::Transition *v7; // edi@5
  unsigned int v8; // esi@9
  unsigned int v9; // edi@10
  int v10; // eax@10
  int v11; // esi@10
  NiKFMTool *v12; // [sp+0h] [bp-Ch]@1
  NiKFMTool::Transition::ChainInfo kInfo; // [sp+4h] [bp-8h]@1

  v12 = this;
  if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
         (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_mapSequences,
         uiSrcID,
         (NiVBSet **)&kInfo.m_fDuration)
    && LODWORD(kInfo.m_fDuration) )
  {
    v6 = uiDesID;
    if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
           (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)(LODWORD(kInfo.m_fDuration) + 12),
           uiDesID,
           (NiVBSet **)&uiDesID)
      && (v7 = (NiKFMTool::Transition *)uiDesID) != 0 )
    {
      if ( *(_DWORD *)uiDesID == 3 )
      {
        kInfo.m_fDuration = fDuration;
        v8 = uiDesID + 20;
        kInfo.m_uiSequenceID = uiSequenceID;
        NiTSet<NiKFMTool::Transition::ChainInfo>::Add(
          (NiTSet<NiKFMTool::Transition::ChainInfo> *)(uiDesID + 20),
          &kInfo);
        if ( NiKFMTool::IsValidChainTransition(v12, uiSrcID, v6, v7) )
        {
          result = 0;
        }
        else
        {
          v9 = v7->m_aChainInfo.m_uiUsed;
          v10 = --*(_DWORD *)(v8 + 8);
          v11 = *(_DWORD *)v8;
          *(_DWORD *)(v11 + 8 * v9) = *(_DWORD *)(v11 + 8 * v10);
          *(_DWORD *)(v11 + 8 * v9 + 4) = *(_DWORD *)(v11 + 8 * v10 + 4);
          result = 10;
        }
      }
      else
      {
        result = 4;
      }
    }
    else
    {
      result = 3;
    }
  }
  else
  {
    result = 2;
  }
  return result;
}

//----- (007E0570) --------------------------------------------------------
NiKFMTool::KFM_RC __thiscall NiKFMTool::AddSequence(NiKFMTool *this, unsigned int uiSequenceID, const char *pcFilename, int iAnimIndex)
{
  NiKFMTool *v4; // esi@1
  NiKFMTool::Sequence *v5; // eax@1
  unsigned int v6; // edi@1
  NiVBSet *v7; // eax@2
  NiVBSet *v8; // ebx@2

  v4 = this;
  v5 = (NiKFMTool::Sequence *)operator new(0x1Cu);
  v6 = uiSequenceID;
  if ( v5 )
  {
    NiKFMTool::Sequence::Sequence(v5, uiSequenceID, pcFilename, iAnimIndex);
    v8 = v7;
  }
  else
  {
    v8 = 0;
  }
  if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
         (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v4->m_mapSequences,
         v6,
         (NiVBSet **)&uiSequenceID)
    && uiSequenceID )
  {
    NiKFMTool::Sequence::~Sequence((NiKFMTool::Sequence *)uiSequenceID);
    operator delete((void *)uiSequenceID);
  }
  NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::SetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v4->m_mapSequences,
    v6,
    v8);
  return 0;
}

//----- (007E05E0) --------------------------------------------------------
signed int __thiscall NiKFMTool::ReadOldVersionAscii(NiKFMTool *this, NiFile *kFile, unsigned int uiVersion, bool bOldFile)
{
  char *v4; // eax@2
  const char *v5; // esi@2
  const char *v6; // eax@6
  const char *v7; // eax@11
  const char *v8; // eax@13
  const char *v9; // edi@13
  unsigned int v10; // kr00_4@15
  const char *v11; // eax@17
  const char *v12; // eax@19
  const char *v13; // edi@19
  unsigned int v14; // kr04_4@21
  const char *v15; // eax@23
  const char *v16; // esi@23
  const char *v17; // eax@29
  const char *v18; // esi@29
  const char *v19; // eax@34
  const char *v20; // eax@36
  unsigned int v21; // edi@37
  const char *v22; // eax@38
  const char *v23; // esi@38
  const char *v24; // eax@44
  const char *v25; // eax@46
  int v26; // eax@47
  const char *v27; // eax@49
  const char *v28; // eax@51
  const char *v29; // eax@52
  const char *v30; // eax@54
  const char *v31; // edi@54
  char v32; // bl@56
  const char *v33; // eax@59
  const char *v34; // eax@61
  float v35; // ST40_4@62
  unsigned int v36; // edi@62
  const char *v37; // eax@64
  const char *v38; // eax@66
  int v39; // esi@69
  const char *v40; // eax@70
  unsigned int v41; // eax@71
  const char *v42; // eax@74
  const char *v43; // eax@76
  const char *v44; // eax@79
  const char *v45; // edi@79
  const char *v46; // eax@82
  const char *v47; // esi@82
  const char *v48; // eax@91
  const char *v49; // eax@93
  int v50; // eax@94
  unsigned int v51; // edi@94
  const char *v52; // eax@94
  const char *v53; // esi@94
  const char *v54; // eax@97
  const char *v55; // eax@99
  unsigned int v56; // ebx@100
  int v57; // esi@100
  const char *v58; // eax@101
  unsigned int v59; // edi@102
  const char *v60; // eax@102
  int v61; // eax@103
  char *fDuration; // [sp+Ch] [bp-240h]@27
  unsigned int uiCurID; // [sp+1Ch] [bp-230h]@0
  unsigned int uiNumPairs; // [sp+24h] [bp-228h]@72
  char *pcDefaultKFPath; // [sp+28h] [bp-224h]@1
  char *pcDefaultNIFPath; // [sp+2Ch] [bp-220h]@1
  int uiSequenceID; // [sp+30h] [bp-21Ch]@52
  unsigned int uiGroupID; // [sp+34h] [bp-218h]@78
  unsigned int uiGroupIDa; // [sp+34h] [bp-218h]@94
  NiKFMTool *v71; // [sp+38h] [bp-214h]@1
  char *pcContext; // [sp+3Ch] [bp-210h]@2
  char acSeps[3]; // [sp+40h] [bp-20Ch]@1
  char acFilename[260]; // [sp+44h] [bp-208h]@27
  char acBuf[256]; // [sp+148h] [bp-104h]@1

  *(_WORD *)acSeps = *(_WORD *)"#\n";
  pcDefaultNIFPath = 0;
  pcDefaultKFPath = 0;
  v71 = this;
  acSeps[2] = 0;
  if ( !NiBinaryStream::GetLine((NiBinaryStream *)&kFile->vfptr, acBuf, 0x100u) )
  {
LABEL_105:
    operator delete(pcDefaultNIFPath);
    operator delete(pcDefaultKFPath);
    NiKFMTool::HandleDelayedBlendsInChains(v71);
    return 0;
  }
  while ( 1 )
  {
    v4 = strtok_s(acBuf, acSeps, &pcContext);
    v5 = v4;
    if ( !v4 || *v4 == 59 )
      goto LABEL_104;
    if ( !strcmp(v4, "END_KFM_FILE") )
      goto LABEL_105;
    if ( !strcmp(v5, "DEFAULTPATHS") )
    {
      v6 = strtok_s(0, acSeps, &pcContext);
      if ( !v6 )
        return 14;
      if ( atoi(v6) == 1 && (!bOldFile || uiVersion >= 0x2010000) )
      {
        if ( !NiBinaryStream::GetLine((NiBinaryStream *)&kFile->vfptr, acBuf, 0x100u) )
          return 14;
        v7 = strtok_s(acBuf, acSeps, &pcContext);
        if ( !v7 )
          return 14;
        if ( strcmp(v7, "DEFAULTNIFPATH") )
          return 14;
        v8 = strtok_s(0, acSeps, &pcContext);
        v9 = v8;
        if ( !v8 )
          return 14;
        if ( strcmp(v8, "NULL") )
        {
          v10 = strlen(v9);
          pcDefaultNIFPath = (char *)operator new(v10 + 1);
          strcpy_s(pcDefaultNIFPath, v10 + 1, v9);
        }
        if ( !NiBinaryStream::GetLine((NiBinaryStream *)&kFile->vfptr, acBuf, 0x100u) )
          return 14;
        v11 = strtok_s(acBuf, "#", &pcContext);
        if ( !v11 )
          return 14;
        if ( strcmp(v11, "DEFAULTKFPATH") )
          return 14;
        v12 = strtok_s(0, acSeps, &pcContext);
        v13 = v12;
        if ( !v12 )
          return 14;
        if ( strcmp(v12, "NULL") )
        {
          v14 = strlen(v13);
          pcDefaultKFPath = (char *)operator new(v14 + 1);
          strcpy_s(pcDefaultKFPath, v14 + 1, v13);
        }
      }
      goto LABEL_104;
    }
    if ( !strcmp(v5, "MODEL") )
    {
      v15 = strtok_s(0, acSeps, &pcContext);
      v16 = v15;
      if ( !v15 )
        return 14;
      if ( !strcmp(v15, "NULL") )
        v16 = 0;
      if ( pcDefaultNIFPath )
      {
        strcpy_s(acFilename, 0x104u, pcDefaultNIFPath);
        strcat_s(acFilename, 0x104u, v16);
        fDuration = acFilename;
      }
      else
      {
        fDuration = (char *)v16;
      }
      NiKFMTool::SetModelPath(v71, fDuration);
      v17 = strtok_s(0, acSeps, &pcContext);
      v18 = v17;
      if ( !v17 )
        return 14;
      if ( !strcmp(v17, "NULL") )
        v18 = 0;
      NiLookAtInterpolator::SetLookAtName((NiLookAtInterpolator *)v71, v18);
      goto LABEL_104;
    }
    if ( !strcmp(v5, "ANIMATION") )
    {
      v19 = strtok_s(0, " \n", &pcContext);
      if ( !v19 )
        return 14;
      if ( strcmp(v19, "EVENTCODE") )
        return 14;
      v20 = strtok_s(0, acSeps, &pcContext);
      if ( !v20 )
        return 14;
      v21 = atoi(v20);
      if ( !strtok_s(0, acSeps, &pcContext) )
        return 14;
      v22 = strtok_s(0, acSeps, &pcContext);
      v23 = v22;
      if ( !v22 )
        return 14;
      if ( !strcmp(v22, "NULL") )
        v23 = 0;
      if ( pcDefaultKFPath )
      {
        strcpy_s(acFilename, 0x104u, pcDefaultKFPath);
        strcat_s(acFilename, 0x104u, v23);
      }
      else
      {
        strcpy_s(acFilename, 0x104u, v23);
      }
      v24 = strtok_s(0, " \n", &pcContext);
      if ( !v24 )
        return 14;
      if ( strcmp(v24, "INDEX") )
        return 14;
      v25 = strtok_s(0, acSeps, &pcContext);
      if ( !v25 )
        return 14;
      v26 = atoi(v25);
      NiKFMTool::AddSequence(v71, v21, acFilename, v26);
      uiCurID = v21;
      goto LABEL_104;
    }
    if ( strcmp(v5, "\tTRANSITION") )
      break;
    v27 = strtok_s(0, " \n", &pcContext);
    if ( !v27 )
      return 14;
    if ( strcmp(v27, "EVENTCODE") )
      return 14;
    v28 = strtok_s(0, acSeps, &pcContext);
    if ( !v28 )
      return 14;
    uiSequenceID = atoi(v28);
    v29 = strtok_s(0, " \n", &pcContext);
    if ( !v29 )
      return 14;
    if ( strcmp(v29, "TYPE") )
      return 14;
    v30 = strtok_s(0, acSeps, &pcContext);
    v31 = v30;
    if ( !v30 )
      return 14;
    if ( !strcmp(v30, "BLEND") )
    {
      v32 = 1;
    }
    else
    {
      if ( strcmp(v31, "MORPH") )
        return 14;
      v32 = 0;
    }
    v33 = strtok_s(0, " \n", &pcContext);
    if ( !v33 )
      return 14;
    if ( strcmp(v33, "DURATION") )
      return 14;
    v34 = strtok_s(0, acSeps, &pcContext);
    if ( !v34 )
      return 14;
    v35 = atof(v34);
    NiKFMTool::AddTransition(v71, uiCurID, uiSequenceID, (NiKFMTool::TransitionType)(v32 == 0), v35);
    v36 = 0;
    if ( !bOldFile || uiVersion >= 0x2000000 )
    {
      v37 = strtok_s(0, " \n", &pcContext);
      if ( !v37 )
        return 14;
      if ( strcmp(v37, "INTERMEDIATEANIMS") )
        return 14;
      v38 = strtok_s(0, acSeps, &pcContext);
      if ( !v38 )
        return 14;
      v36 = atoi(v38);
      if ( v36 )
        NiKFMTool::GetTransition(v71, uiCurID, uiSequenceID)->m_eType = 3;
    }
    v39 = 0;
    if ( v36 )
    {
      do
      {
        v40 = strtok_s(0, acSeps, &pcContext);
        if ( !v40 )
          return 14;
        v41 = atoi(v40);
        NiKFMTool::AddSequenceToChain(v71, uiCurID, uiSequenceID, v41, -1.0);
      }
      while ( ++v39 < v36 );
    }
    uiNumPairs = 1;
    if ( !bOldFile || uiVersion >= 0x2000000 )
    {
      v42 = strtok_s(0, " \n", &pcContext);
      if ( !v42 )
        return 14;
      if ( strcmp(v42, "TEXTKEYPAIRS") )
        return 14;
      v43 = strtok_s(0, acSeps, &pcContext);
      if ( !v43 )
        return 14;
      uiNumPairs = atoi(v43);
    }
    uiGroupID = 0;
    if ( uiNumPairs )
    {
      do
      {
        v44 = strtok_s(0, acSeps, &pcContext);
        v45 = v44;
        if ( !v44 )
          return 14;
        if ( !strcmp(v44, "NULL") )
          v45 = 0;
        v46 = strtok_s(0, acSeps, &pcContext);
        v47 = v46;
        if ( !v46 )
          return 14;
        if ( !strcmp(v46, "NULL") )
          v47 = 0;
        if ( v45 || v47 )
          NiKFMTool::AddBlendPair(v71, uiCurID, uiSequenceID, v45, v47);
      }
      while ( ++uiGroupID < uiNumPairs );
    }
LABEL_104:
    if ( !NiBinaryStream::GetLine((NiBinaryStream *)&kFile->vfptr, acBuf, 0x100u) )
      goto LABEL_105;
  }
  if ( strcmp(v5, "LAYERGROUP") )
    return 14;
  v48 = strtok_s(0, " \n", &pcContext);
  if ( !v48 )
    return 14;
  if ( strcmp(v48, "GROUPID") )
    return 14;
  v49 = strtok_s(0, acSeps, &pcContext);
  if ( !v49 )
    return 14;
  v50 = atoi(v49);
  v51 = v50;
  uiGroupIDa = v50;
  v52 = strtok_s(0, acSeps, &pcContext);
  v53 = v52;
  if ( !v52 )
    return 14;
  if ( !strcmp(v52, "NULL") )
    v53 = 0;
  NiKFMTool::AddSequenceGroup(v71, v51, v53);
  v54 = strtok_s(0, " \n", &pcContext);
  if ( !v54 )
    return 14;
  if ( strcmp(v54, "LAYERS") )
    return 14;
  v55 = strtok_s(0, acSeps, &pcContext);
  if ( !v55 )
    return 14;
  v56 = atoi(v55);
  v57 = 0;
  if ( !v56 )
    goto LABEL_104;
  while ( 1 )
  {
    v58 = strtok_s(0, acSeps, &pcContext);
    if ( !v58 )
      return 14;
    v59 = atoi(v58);
    v60 = strtok_s(0, acSeps, &pcContext);
    if ( !v60 )
      return 14;
    v61 = atoi(v60);
    NiKFMTool::AddSequenceToGroup(v71, uiGroupIDa, v59, v61, 1.0, 0.0, 0.0, 0xFFFFFFFE);
    if ( ++v57 >= v56 )
      goto LABEL_104;
  }
}

//----- (007E13C0) --------------------------------------------------------
signed int __userpurge NiKFMTool::LoadFile@<eax>(NiKFMTool *this@<ecx>, int a2@<edi>, const char *pcFilename)
{
  NiFile *v3; // esi@1
  unsigned int v4; // edi@3
  bool v5; // bl@3
  unsigned int v6; // kr00_4@4
  unsigned int v7; // eax@7
  unsigned int v8; // edi@7
  signed int result; // eax@11
  int v10; // eax@15
  NiKFMTool::KFM_RC v11; // edi@25
  signed int v12; // edi@27
  bool bAnImmerseFile; // [sp+4h] [bp-224h]@3
  NiSequence *v14; // [sp+8h] [bp-220h]@1
  bool bFileLittle; // [sp+Fh] [bp-219h]@7
  char acStdFilename[260]; // [sp+10h] [bp-218h]@1
  char acBuf[256]; // [sp+114h] [bp-114h]@3
  char acVersion[16]; // [sp+214h] [bp-14h]@4

  v14 = (NiSequence *)this;
  strcpy_s(acStdFilename, 0x104u, pcFilename);
  ITableBase<TextDataType3,TextData3>::BeforeTerminate((NiUnsharedGeometryGroup *)acStdFilename);
  v3 = NiFile::GetFile();
  if ( !v3 )
    return 13;
  if ( !v3->vfptr->operator bool((NiBinaryStream *)v3) )
  {
    v3->vfptr->__vecDelDtor((NiBinaryStream *)v3, 1u);
    return 13;
  }
  ((void (__thiscall *)(NiFile *, _DWORD, int))v3->vfptr->SetEndianSwap)(v3, 0, a2);
  NiBinaryStream::GetLine((NiBinaryStream *)&v3->vfptr, acBuf, 0x100u);
  v4 = 3;
  bAnImmerseFile = 0;
  v5 = 0;
  if ( !strncmp(acBuf, ";Gamebryo KFM File Version ", 0x1Bu) )
  {
    v6 = strlen(acBuf);
    v5 = acStdFilename[v6 + 259] == 98;
    v4 = v6 - (v5 + 27);
    strncpy_s(acVersion, 0x10u, &acBuf[27], v4);
  }
  else
  {
    if ( strncmp(acBuf, ";AnImmerse Version ", 0x13u) )
      goto LABEL_28;
    strncpy_s(acVersion, 0x10u, &acBuf[19], 3u);
    bAnImmerseFile = 1;
  }
  acVersion[v4] = 0;
  bFileLittle = 0;
  v7 = NiStream::GetVersionFromString(acVersion);
  v8 = v7;
  if ( bAnImmerseFile )
  {
    if ( v7 < 0x1010000 || v7 > 0x5000000 )
    {
      ((void (__thiscall *)(NiFile *))v3->vfptr->__vecDelDtor)(v3);
      return 15;
    }
    goto LABEL_15;
  }
  if ( v7 >= 0x1020000 )
  {
    if ( v7 <= NiStream::GetVersionFromString(g_pcCurrentKFMVersion) )
      goto LABEL_15;
LABEL_28:
    ((void (__thiscall *)(NiFile *))v3->vfptr->__vecDelDtor)(v3);
    return 15;
  }
  bFileLittle = 1;
LABEL_15:
  strrchr(acStdFilename, 92);
  if ( v10 )
  {
    *(_BYTE *)(v10 + 1) = 0;
    NiSequence::SetName(v14, acStdFilename);
  }
  else
  {
    operator delete(v14->m_pcName);
    v14->m_pcName = 0;
  }
  if ( bAnImmerseFile || bFileLittle )
  {
    v12 = NiKFMTool::ReadOldVersionAscii((NiKFMTool *)v14, v3, v8, bAnImmerseFile);
    ((void (__thiscall *)(_DWORD))v3->vfptr->__vecDelDtor)(v3);
    result = v12;
  }
  else if ( v5 )
  {
    bFileLittle = 1;
    if ( v8 >= 0x1020600
      && (NiStreamLoadBinary<bool>((NiBinaryStream *)&v3->vfptr, &bFileLittle), bFileLittle != 1)
      && NiBinaryStream::GetEndianMatchHint() )
    {
      ((void (__thiscall *)(_DWORD))v3->vfptr->__vecDelDtor)(v3);
      result = 16;
    }
    else
    {
      ((void (__thiscall *)(NiFile *))v3->vfptr->SetEndianSwap)(v3);
      v11 = NiKFMTool::ReadBinary((NiKFMTool *)v14, v3, v8);
      v3->vfptr->__vecDelDtor((NiBinaryStream *)v3, 1u);
      result = v11;
    }
  }
  else
  {
    ((void (__thiscall *)(_DWORD))v3->vfptr->__vecDelDtor)(v3);
    result = 14;
  }
  return result;
}

//----- (007E1700) --------------------------------------------------------
void __thiscall NiTextureTransformController::SetTarget(NiTextureTransformController *this, NiObjectNET *pkTarget)
{
  if ( this->m_pTarget != pkTarget )
    this->m_pkMap = 0;
  NiTimeController::SetTarget((NiTimeController *)&this->vfptr, pkTarget);
}

//----- (007E1720) --------------------------------------------------------
bool __thiscall NiTextureTransformController::IsEqual(NiTextureTransformController *this, NiObject *pkObject)
{
  NiTextureTransformController *v2; // esi@1

  v2 = this;
  return NiBoolInterpController::IsEqual((NiPoint3InterpController *)this, pkObject)
      && pkObject[8].vfptr == (NiRefObjectVtbl *)v2->m_uiLastIdx
      && LOBYTE(pkObject[9].vfptr) == v2->m_bShaderMap
      && pkObject[9].m_uiRefCount == v2->m_uiMapIndex
      && pkObject[10].vfptr == (NiRefObjectVtbl *)v2->m_eMember;
}

//----- (007E1770) --------------------------------------------------------
BOOL __thiscall NiPoint2::operator!=(NiPoint2 *this, NiPoint2 *pt)
{
  return pt->x != this->x || pt->y != this->y;
}

//----- (007E17B0) --------------------------------------------------------
void __thiscall NiTextureTransform::SetTranslate(NiTextureTransform *this, NiPoint2 *kTranslate)
{
  if ( this->m_bMatrixDirty || kTranslate->x != this->m_kTranslate.x || kTranslate->y != this->m_kTranslate.y )
  {
    this->m_bMatrixDirty = 1;
    this->m_kTranslate = *kTranslate;
  }
  else
  {
    this->m_bMatrixDirty = 0;
    this->m_kTranslate = *kTranslate;
  }
}

//----- (007E1810) --------------------------------------------------------
void __thiscall NiTextureTransform::SetRotate(NiTextureTransform *this, float fRotate)
{
  if ( this->m_bMatrixDirty || fRotate != this->m_fRotate )
  {
    this->m_fRotate = fRotate;
    this->m_bMatrixDirty = 1;
  }
  else
  {
    this->m_fRotate = fRotate;
    this->m_bMatrixDirty = 0;
  }
}

//----- (007E1850) --------------------------------------------------------
void __thiscall NiTextureTransform::SetScale(NiTextureTransform *this, NiPoint2 *kScale)
{
  if ( this->m_bMatrixDirty || kScale->x != this->m_kScale.x || kScale->y != this->m_kScale.y )
  {
    this->m_bMatrixDirty = 1;
    this->m_kScale = *kScale;
  }
  else
  {
    this->m_bMatrixDirty = 0;
    this->m_kScale = *kScale;
  }
}

//----- (007E18B0) --------------------------------------------------------
char *__thiscall NiTextureTransformController::GetCtlrID(NiTextureTransformController *this)
{
  NiTextureTransformController *v1; // esi@1
  char *result; // eax@1
  char *v3; // eax@2
  NiTextureTransformController::TransformMember v4; // ecx@2

  v1 = this;
  result = this->m_pcCtlrID;
  if ( !result )
  {
    v3 = (char *)operator new(0x32u);
    v4 = v1->m_eMember;
    v1->m_pcCtlrID = v3;
    switch ( v4 )
    {
      case 0:
        NiSprintf(v3, 0x32u, "%d-%d-TT_TRANSLATE_U", v1->m_bShaderMap, v1->m_uiMapIndex);
        result = v1->m_pcCtlrID;
        break;
      case 1:
        NiSprintf(v3, 0x32u, "%d-%d-TT_TRANSLATE_V", v1->m_bShaderMap, v1->m_uiMapIndex);
        result = v1->m_pcCtlrID;
        break;
      case 2:
        NiSprintf(v3, 0x32u, "%d-%d-TT_ROTATE", v1->m_bShaderMap, v1->m_uiMapIndex);
        result = v1->m_pcCtlrID;
        break;
      case 3:
        NiSprintf(v3, 0x32u, "%d-%d-TT_SCALE_U", v1->m_bShaderMap, v1->m_uiMapIndex);
        result = v1->m_pcCtlrID;
        break;
      case 4:
        NiSprintf(v3, 0x32u, "%d-%d-TT_SCALE_V", v1->m_bShaderMap, v1->m_uiMapIndex);
        goto LABEL_8;
      default:
LABEL_8:
        result = v1->m_pcCtlrID;
        break;
    }
  }
  return result;
}

//----- (007E1990) --------------------------------------------------------
NiTexturingProperty::ShaderMap *__thiscall NiTexturingProperty::GetShaderMap(NiTexturingProperty *this, unsigned int uiIndex)
{
  NiTArray<NiTexturingProperty::ShaderMap *> *v2; // eax@1
  NiTexturingProperty::ShaderMap *result; // eax@3

  v2 = this->m_pkShaderMaps;
  if ( v2 && uiIndex < v2->m_uiSize )
    result = v2->m_pBase[uiIndex];
  else
    result = 0;
  return result;
}

//----- (007E19C0) --------------------------------------------------------
NiTArray<NiTexturingProperty::ShaderMap *> *__thiscall NiTexturingProperty::GetShaderArrayCount(NiTexturingProperty *this)
{
  NiTArray<NiTexturingProperty::ShaderMap *> *result; // eax@1

  result = this->m_pkShaderMaps;
  if ( result )
    result = (NiTArray<NiTexturingProperty::ShaderMap *> *)result->m_uiSize;
  return result;
}

//----- (007E19D0) --------------------------------------------------------
bool __thiscall NiTextureTransformController::SetInternalMap(NiTextureTransformController *this)
{
  bool result; // al@2
  NiObjectNET *v2; // eax@3
  unsigned int v3; // edx@5
  char *v4; // eax@6
  NiTexturingProperty::Map *v5; // edx@8
  NiTexturingProperty::Map *v6; // edx@10

  if ( this->m_pkMap )
  {
    result = 1;
  }
  else
  {
    v2 = this->m_pTarget;
    if ( v2 )
    {
      v3 = this->m_uiMapIndex;
      if ( this->m_bShaderMap )
      {
        v4 = v2[2].m_pcName;
        if ( v4 && v3 < *((_DWORD *)v4 + 3) )
        {
          v5 = *(NiTexturingProperty::Map **)(*((_DWORD *)v4 + 1) + 4 * v3);
          this->m_pkMap = v5;
          result = v5 != 0;
        }
        else
        {
          this->m_pkMap = 0;
          result = 0;
        }
      }
      else
      {
        v6 = (NiTexturingProperty::Map *)(&v2[1].m_spControllers.m_pObject->vfptr)[v3];
        this->m_pkMap = v6;
        result = v6 != 0;
      }
    }
    else
    {
      result = 0;
    }
  }
  return result;
}

//----- (007E1A30) --------------------------------------------------------
NiRTTI *NiTextureTransformController::GetRTTI()
{
  return &NiTextureTransformController::m_RTTI;
}

//----- (007E1A40) --------------------------------------------------------
char __thiscall NiTextureTransformController::SetMap(NiTextureTransformController *this, NiTexturingProperty::Map *pkMap, NiTexturingProperty *pkTarget)
{
  NiTextureTransformController *v3; // esi@1
  NiObjectNET *v5; // ebx@8
  unsigned int v6; // ecx@8
  unsigned int v7; // eax@8
  NiTexturingProperty::Map **v8; // edx@9
  unsigned int v9; // edi@12
  NiTArray<NiTexturingProperty::ShaderMap *> *v10; // eax@12
  char *v11; // ebx@13
  NiTexturingProperty::Map *v12; // ecx@16
  char *v13; // ecx@17
  char *v14; // eax@22

  v3 = this;
  this->m_pkMap = pkMap;
  if ( !pkMap )
  {
    operator delete(this->m_pcCtlrID);
    v3->m_pcCtlrID = 0;
    return 1;
  }
  if ( pkTarget )
  {
    if ( !this->m_pTarget )
      ((void (__stdcall *)(_DWORD))this->vfptr[18].__vecDelDtor)(pkTarget);
  }
  else if ( !this->m_pTarget )
  {
    return 0;
  }
  v5 = v3->m_pTarget;
  v6 = v5[1].m_uiExtraDataSize;
  v7 = 0;
  if ( v6 )
  {
    v8 = (NiTexturingProperty::Map **)v5[1].m_spControllers.m_pObject;
    while ( *v8 != pkMap )
    {
      ++v7;
      ++v8;
      if ( v7 >= v6 )
        goto LABEL_12;
    }
    v13 = v3->m_pcCtlrID;
    v3->m_bShaderMap = 0;
    v3->m_uiMapIndex = v7;
    operator delete(v13);
  }
  else
  {
LABEL_12:
    v9 = 0;
    v10 = NiTexturingProperty::GetShaderArrayCount((NiTexturingProperty *)v3->m_pTarget);
    if ( !v10 )
      return 0;
    v11 = v5[2].m_pcName;
    while ( 1 )
    {
      v12 = (NiTexturingProperty::Map *)(v11 && v9 < *((_DWORD *)v11 + 3) ? *(_DWORD *)(*((_DWORD *)v11 + 1) + 4 * v9) : 0);
      if ( v12 == pkMap )
        break;
      if ( ++v9 >= (unsigned int)v10 )
        return 0;
    }
    v14 = v3->m_pcCtlrID;
    v3->m_bShaderMap = 1;
    v3->m_uiMapIndex = v9;
    operator delete(v14);
  }
  v3->m_pcCtlrID = 0;
  return 1;
}

//----- (007E1B20) --------------------------------------------------------
void __thiscall NiTextureTransformController::Update(NiTextureTransformController *this, float fTime)
{
  NiTextureTransformController *v2; // esi@1
  NiInterpolator *v3; // ecx@4
  NiInterpolator *v4; // ecx@6
  NiTextureTransform *v5; // ecx@9
  NiTextureTransform *v6; // eax@10
  NiTextureTransform *v7; // eax@11
  float v8; // eax@15
  float v9; // edx@15
  float v10; // eax@16
  float v11; // eax@18
  float v12; // edx@18
  float v13; // eax@19
  NiPoint2 kTranslate; // [sp+20h] [bp-20h]@11
  NiPoint2 kScale; // [sp+28h] [bp-18h]@11
  NiPoint2 kCenter; // [sp+30h] [bp-10h]@11
  NiPoint2 kPoint; // [sp+38h] [bp-8h]@15

  v2 = this;
  if ( (LOBYTE(this->m_uFlags) >> 5) & 1 )
  {
    this->m_fScaledTime = -3.4028235e38;
  }
  else if ( NiTimeController::DontDoUpdate((NiTimeController *)&this->vfptr, fTime) )
  {
    v3 = v2->m_spInterpolator.m_pObject;
    if ( !v3 || !(unsigned __int8)((int (*)(void))v3->vfptr[33].__vecDelDtor)() )
      return;
  }
  v4 = v2->m_spInterpolator.m_pObject;
  if ( v4
    && (unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD, _DWORD))v4->vfptr[19].__vecDelDtor)(
                          v2->m_fScaledTime,
                          v2->m_pTarget,
                          &fTime)
    && NiTextureTransformController::SetInternalMap(v2) )
  {
    v5 = v2->m_pkMap->m_pkTextureTransform;
    if ( !v5 )
    {
      v6 = (NiTextureTransform *)operator new(0x48u);
      if ( v6 )
      {
        kCenter.x = 0.5;
        kCenter.y = 0.5;
        kScale.x = 1.0;
        kScale.y = 1.0;
        kTranslate.x = 0.0;
        kTranslate.y = 0.0;
        NiTextureTransform::NiTextureTransform(v6, &kTranslate, 0.0, &kScale, &kCenter, 0);
        v5 = v7;
      }
      else
      {
        v5 = 0;
      }
      v2->m_pkMap->m_pkTextureTransform = v5;
    }
    switch ( v2->m_eMember )
    {
      case 0:
        v8 = v5->m_kTranslate.x;
        v9 = v5->m_kTranslate.y;
        kPoint.x = fTime;
        kPoint.y = v9;
        NiTextureTransform::SetTranslate(v5, &kPoint);
        break;
      case 1:
        v10 = v5->m_kTranslate.y;
        kPoint.x = v5->m_kTranslate.x;
        kPoint.y = fTime;
        NiTextureTransform::SetTranslate(v5, &kPoint);
        break;
      case 2:
        NiTextureTransform::SetRotate(v5, fTime);
        break;
      case 3:
        v11 = v5->m_kScale.x;
        v12 = v5->m_kScale.y;
        kPoint.x = fTime;
        kPoint.y = v12;
        NiTextureTransform::SetScale(v5, &kPoint);
        break;
      case 4:
        v13 = v5->m_kScale.y;
        kPoint.x = v5->m_kScale.x;
        kPoint.y = fTime;
        NiTextureTransform::SetScale(v5, &kPoint);
        break;
      default:
        return;
    }
  }
}

//----- (007E1CC0) --------------------------------------------------------
void __thiscall NiTextureTransformController::GetTargetFloatValue(NiTextureTransformController *this, float *fValue)
{
  NiTexturingProperty::Map *v2; // eax@1
  NiObjectNET *v3; // eax@2
  unsigned int v4; // edx@3
  char *v5; // eax@4
  NiTimeController *v6; // eax@6
  NiTexturingProperty::Map *v7; // edx@7
  NiTextureTransform *v8; // eax@11
  float v9; // edx@14
  float v10; // ecx@15
  float v11; // edx@17
  float v12; // eax@17
  float v13; // edx@18

  v2 = this->m_pkMap;
  if ( !v2 )
  {
    v3 = this->m_pTarget;
    if ( !v3 )
      return;
    v4 = this->m_uiMapIndex;
    if ( this->m_bShaderMap )
    {
      v5 = v3[2].m_pcName;
      if ( !v5 || v4 >= *((_DWORD *)v5 + 3) )
      {
        v7 = 0;
        goto LABEL_10;
      }
      v6 = (NiTimeController *)*((_DWORD *)v5 + 1);
    }
    else
    {
      v6 = v3[1].m_spControllers.m_pObject;
    }
    v7 = (NiTexturingProperty::Map *)(&v6->vfptr)[v4];
LABEL_10:
    v2 = v7;
    this->m_pkMap = v7;
    if ( !v7 )
      return;
  }
  v8 = v2->m_pkTextureTransform;
  if ( v8 )
  {
    switch ( this->m_eMember )
    {
      case 0:
        v9 = v8->m_kTranslate.y;
        *fValue = v8->m_kTranslate.x;
        break;
      case 1:
        v10 = v8->m_kTranslate.x;
        *fValue = v8->m_kTranslate.y;
        break;
      case 2:
        *fValue = v8->m_fRotate;
        break;
      case 3:
        v11 = v8->m_kScale.x;
        v12 = v8->m_kScale.y;
        *fValue = v11;
        break;
      case 4:
        v13 = v8->m_kScale.x;
        *fValue = v8->m_kScale.y;
        break;
      default:
        return;
    }
  }
  else
  {
    *fValue = 0.0;
  }
}

//----- (007E1DC0) --------------------------------------------------------
NiTextureTransformController *__thiscall NiTextureTransformController::`vector deleting destructor'(NiTextureTransformController *this, unsigned int a2)
{
  NiTextureTransformController *v2; // esi@1
  char *v3; // ST00_4@1
  NiInterpolator *v4; // edi@1

  v2 = this;
  v3 = this->m_pcCtlrID;
  this->vfptr = (NiRefObjectVtbl *)&NiTextureTransformController::`vftable';
  operator delete(v3);
  v2->m_pcCtlrID = 0;
  v4 = v2->m_spInterpolator.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  NiTimeController::~NiTimeController((NiTimeController *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E5B74: using guessed type int (__thiscall *NiTextureTransformController::`vftable')(void *p, char);

//----- (007E1E30) --------------------------------------------------------
NiFloatInterpController *__thiscall NiTextureTransformController::CreateClone(NiTextureTransformController *this, NiCloningProcess *kCloning)
{
  NiTextureTransformController *v2; // edi@1
  NiFloatInterpController *v3; // eax@1
  NiFloatInterpController *v4; // esi@1
  void *v5; // ST04_4@4

  v2 = this;
  v3 = (NiFloatInterpController *)operator new(0x58u);
  v4 = v3;
  if ( v3 )
  {
    NiFloatInterpController::NiFloatInterpController(v3);
    v4->vfptr = (NiRefObjectVtbl *)&NiTextureTransformController::`vftable';
    LODWORD(v4[1].m_fPhase) = 0;
    LODWORD(v4[1].m_fLoKeyTime) = 0;
    v4[1].vfptr = 0;
    LOBYTE(v4[1].m_uFlags) = 0;
    LODWORD(v4[1].m_fFrequency) = 0;
    if ( v4->m_pTarget )
      v4[1].m_uiRefCount = 0;
    NiTimeController::SetTarget((NiTimeController *)&v4->vfptr, 0);
    v5 = (void *)LODWORD(v4[1].m_fLoKeyTime);
    v4[1].m_uiRefCount = 0;
    operator delete(v5);
    LODWORD(v4[1].m_fLoKeyTime) = 0;
  }
  else
  {
    v4 = 0;
  }
  NiPoint3InterpController::CopyMembers((NiPoint3InterpController *)v2, (NiPoint3InterpController *)v4, kCloning);
  v4[1].vfptr = (NiRefObjectVtbl *)v2->m_uiLastIdx;
  LOBYTE(v4[1].m_uFlags) = v2->m_bShaderMap;
  LODWORD(v4[1].m_fFrequency) = v2->m_uiMapIndex;
  LODWORD(v4[1].m_fPhase) = v2->m_eMember;
  return v4;
}
// 9E5B74: using guessed type int (__thiscall *NiTextureTransformController::`vftable')(void *p, char);

//----- (007E1EC0) --------------------------------------------------------
NiFloatInterpController *__cdecl NiTextureTransformController::CreateObject()
{
  NiFloatInterpController *v0; // eax@1
  NiFloatInterpController *v1; // esi@1
  void *v2; // ST00_4@4
  NiFloatInterpController *result; // eax@4

  v0 = (NiFloatInterpController *)operator new(0x58u);
  v1 = v0;
  if ( v0 )
  {
    NiFloatInterpController::NiFloatInterpController(v0);
    v1->vfptr = (NiRefObjectVtbl *)&NiTextureTransformController::`vftable';
    LODWORD(v1[1].m_fPhase) = 0;
    LODWORD(v1[1].m_fLoKeyTime) = 0;
    v1[1].vfptr = 0;
    LOBYTE(v1[1].m_uFlags) = 0;
    LODWORD(v1[1].m_fFrequency) = 0;
    if ( v1->m_pTarget )
      v1[1].m_uiRefCount = 0;
    NiTimeController::SetTarget((NiTimeController *)&v1->vfptr, 0);
    v2 = (void *)LODWORD(v1[1].m_fLoKeyTime);
    v1[1].m_uiRefCount = 0;
    operator delete(v2);
    LODWORD(v1[1].m_fLoKeyTime) = 0;
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E5B74: using guessed type int (__thiscall *NiTextureTransformController::`vftable')(void *p, char);

//----- (007E1F20) --------------------------------------------------------
void __thiscall NiTextureTransformController::LoadBinary(NiTextureTransformController *this, NiStream *kStream)
{
  NiStream *v2; // esi@1
  NiTextureTransformController *v3; // edi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST28_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  unsigned int (__cdecl *v7)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@1
  NiBinaryStream *v8; // ST14_4@1
  NiBinaryStream *v9; // eax@1
  NiBinaryStream *v10; // ST00_4@1
  unsigned int (__cdecl *v11)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiTextureTransformController::TransformMember v12; // [sp+8h] [bp-8h]@1
  int v13; // [sp+Ch] [bp-4h]@1

  v2 = kStream;
  v3 = this;
  NiPoint3InterpController::LoadBinary((NiPoint3InterpController *)this, kStream);
  v4 = v2->m_pkIstr;
  v5 = v4;
  v6 = v4->m_pfnRead;
  v13 = 1;
  v6(v5, (char *)&kStream + 3, 1u, (unsigned int *)&v13, 1u);
  v3->m_bShaderMap = BYTE3(kStream) != 0;
  v7 = v2->m_pkIstr->m_pfnRead;
  v8 = v2->m_pkIstr;
  v13 = 4;
  v7(v8, &v3->m_uiMapIndex, 4u, (unsigned int *)&v13, 1u);
  v9 = v2->m_pkIstr;
  v10 = v9;
  v11 = v9->m_pfnRead;
  v13 = 4;
  v11(v10, &v12, 4u, (unsigned int *)&v13, 1u);
  v3->m_eMember = v12;
  if ( v2->m_uiNifFileVersion < 0xA010068 )
    NiStream::ReadLinkID(v2);
}

//----- (007E1FC0) --------------------------------------------------------
void __thiscall NiTextureTransformController::SaveBinary(NiTextureTransformController *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiTextureTransformController *v3; // esi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST28_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v7; // eax@1
  NiBinaryStream *v8; // ST14_4@1
  unsigned int (__cdecl *v9)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v10; // edi@1
  unsigned int (__cdecl *v11)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@1
  int v12; // [sp+8h] [bp-4h]@1

  v2 = kStream;
  v3 = this;
  NiFloatInterpController::SaveBinary((NiTransformController *)this, kStream);
  BYTE3(kStream) = v3->m_bShaderMap;
  v4 = v2->m_pkOstr;
  v5 = v4;
  v6 = v4->m_pfnWrite;
  v12 = 1;
  v6(v5, (char *)&kStream + 3, 1u, (unsigned int *)&v12, 1u);
  v7 = v2->m_pkOstr;
  v8 = v7;
  v9 = v7->m_pfnWrite;
  v12 = 4;
  v9(v8, &v3->m_uiMapIndex, 4u, (unsigned int *)&v12, 1u);
  v10 = v2->m_pkOstr;
  v11 = v10->m_pfnWrite;
  v12 = 4;
  v11(v10, &v3->m_eMember, 4u, (unsigned int *)&v12, 1u);
}

//----- (007E2040) --------------------------------------------------------
void __thiscall NiTextureTransformController::GetViewerStrings(NiTextureTransformController *this, NiTArray<char *> *pkStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiTArray<char *> *v3; // eax@1
  unsigned int v4; // edi@1

  v2 = (NiTArray<NiVBBlock *> *)pkStrings;
  NiFloatInterpController::GetViewerStrings((NiFloatInterpController *)&this->vfptr, pkStrings);
  v3 = (NiTArray<char *> *)NiGetViewerString(NiTextureTransformController::m_RTTI.m_pcName);
  v4 = v2->m_uiSize;
  pkStrings = v3;
  if ( v4 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v4 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v4, (NiVBChip *const *)&pkStrings);
}

//----- (007E2090) --------------------------------------------------------
void __thiscall NiMaterialColorController::GetTargetPoint3Value(NiMaterialColorController *this, NiPoint3 *kValue)
{
  NiObjectNET *v2; // eax@1
  unsigned int v3; // ecx@2
  void *v4; // edx@2
  void *v5; // eax@2
  float kColor; // [sp+0h] [bp-Ch]@1
  float kColor_4; // [sp+4h] [bp-8h]@1
  float kColor_8; // [sp+8h] [bp-4h]@1

  v2 = this->m_pTarget;
  kColor = 0.0;
  kColor_4 = 0.0;
  kColor_8 = 0.0;
  switch ( this->m_uFlags & 7 )
  {
    case 0:
      v3 = v2[1].m_uiRefCount;
      v4 = v2[1].m_pcName;
      v5 = v2[1].m_spControllers.m_pObject;
      goto LABEL_6;
    case 1:
      v3 = (unsigned int)v2[1].m_ppkExtra;
      v4 = (void *)v2[1].m_uiExtraDataSize;
      v5 = (void *)v2[1].m_uiMaxSize;
      goto LABEL_6;
    case 2:
      v3 = (unsigned int)v2[2].vfptr;
      v4 = (void *)v2[2].m_uiRefCount;
      v5 = v2[2].m_pcName;
      goto LABEL_6;
    case 3:
      v3 = (unsigned int)v2[2].m_spControllers.m_pObject;
      v4 = v2[2].m_ppkExtra;
      v5 = (void *)v2[2].m_uiExtraDataSize;
LABEL_6:
      kColor_8 = *(float *)&v5;
      kColor_4 = *(float *)&v4;
      kColor = *(float *)&v3;
      break;
    default:
      break;
  }
  kValue->x = kColor;
  kValue->y = kColor_4;
  kValue->z = kColor_8;
}

//----- (007E2120) --------------------------------------------------------
const char *__thiscall NiMaterialColorController::GetCtlrID(NiMaterialColorController *this)
{
  const char *result; // eax@2

  switch ( this->m_uFlags & 7 )
  {
    case 0:
      result = "AMB";
      break;
    case 1:
      result = "DIFF";
      break;
    case 2:
      result = "SPEC";
      break;
    case 3:
      result = "SELF_ILLUM";
      break;
    default:
      result = 0;
      break;
  }
  return result;
}

//----- (007E2160) --------------------------------------------------------
void __thiscall NiMaterialColorController::LinkObject(NiMaterialColorController *this, NiStream *kStream)
{
  NiMaterialColorController *v2; // ebx@1
  NiPosData *v3; // esi@2
  NiPoint3Interpolator *v4; // eax@2
  NiInterpolator *v5; // eax@3
  NiInterpolator *v6; // edi@3
  NiInterpolator *v7; // esi@5

  v2 = this;
  NiPoint3InterpController::LinkObject((NiPSysModifierCtlr *)this, kStream);
  if ( kStream->m_uiNifFileVersion < 0xA010068 )
  {
    v3 = (NiPosData *)NiStream::GetObjectFromLinkID(kStream);
    v4 = (NiPoint3Interpolator *)operator new(0x20u);
    if ( v4 )
    {
      NiPoint3Interpolator::NiPoint3Interpolator(v4, v3);
      v6 = v5;
    }
    else
    {
      v6 = 0;
    }
    v7 = v2->m_spInterpolator.m_pObject;
    if ( v7 != v6 )
    {
      if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      v2->m_spInterpolator.m_pObject = v6;
      if ( v6 )
        InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
    }
    ((void (*)(void))v2->m_spInterpolator.m_pObject->vfptr[27].__vecDelDtor)();
  }
}

//----- (007E21F0) --------------------------------------------------------
bool __thiscall NiMaterialColorController::IsEqual(NiMaterialColorController *this, NiObject *pkObject)
{
  NiMaterialColorController *v2; // esi@1
  bool result; // al@1

  v2 = this;
  result = NiBoolInterpController::IsEqual((NiPoint3InterpController *)&this->vfptr, pkObject);
  if ( result )
    result = ((LOBYTE(v2->m_uFlags) ^ LOBYTE(pkObject[8].vfptr)) & 7) == 0;
  return result;
}

//----- (007E2220) --------------------------------------------------------
NiRTTI *NiMaterialColorController::GetRTTI()
{
  return &NiMaterialColorController::m_RTTI;
}

//----- (007E2230) --------------------------------------------------------
void __thiscall NiMaterialColorController::Update(NiMaterialColorController *this, float fTime)
{
  NiMaterialColorController *v2; // esi@1
  NiInterpolator *v3; // ecx@4
  NiInterpolator *v4; // ecx@6
  NiObjectNET *v5; // ecx@8
  double v6; // st7@9
  double v7; // st5@13
  double v8; // st6@13
  float v9; // eax@22
  float v10; // edx@22
  float v11; // eax@22
  float v12; // edx@23
  float v13; // eax@23
  float v14; // edx@23
  float v15; // eax@24
  float v16; // edx@24
  float v17; // eax@24
  float v18; // edx@25
  float v19; // eax@25
  float v20; // edx@25
  NiPoint3 kValue; // [sp+14h] [bp-18h]@7
  NiColor kColor; // [sp+20h] [bp-Ch]@8

  v2 = this;
  if ( (LOBYTE(this->m_uFlags) >> 5) & 1 )
  {
    this->m_fScaledTime = -3.4028235e38;
  }
  else if ( NiTimeController::DontDoUpdate((NiTimeController *)&this->vfptr, fTime) )
  {
    v3 = v2->m_spInterpolator.m_pObject;
    if ( !v3 || !(unsigned __int8)((int (*)(void))v3->vfptr[33].__vecDelDtor)() )
      return;
  }
  v4 = v2->m_spInterpolator.m_pObject;
  if ( v4
    && (unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD, _DWORD))v4->vfptr[17].__vecDelDtor)(
                          v2->m_fScaledTime,
                          v2->m_pTarget,
                          &kValue) )
  {
    v5 = v2->m_pTarget;
    kColor.r = kValue.x;
    kColor.g = kValue.y;
    kColor.b = kValue.z;
    if ( kValue.x >= 0.0 )
    {
      v6 = 1.0;
      if ( kValue.x > 1.0 )
        kColor.r = 1.0;
    }
    else
    {
      v6 = 1.0;
      kColor.r = 0.0;
    }
    if ( kValue.y >= 0.0 )
    {
      if ( kValue.y > v6 )
        kColor.g = v6;
      v7 = 0.0;
      v8 = kValue.z;
    }
    else
    {
      v7 = 0.0;
      v8 = kValue.z;
      kColor.g = 0.0;
    }
    if ( v7 <= v8 )
    {
      if ( v8 > v6 )
        kColor.b = v6;
    }
    else
    {
      kColor.b = v7;
    }
    switch ( v2->m_uFlags & 7 )
    {
      case 0:
        v9 = kColor.r;
        v10 = kColor.g;
        ++v5[3].m_uiRefCount;
        *(float *)&v5[1].m_uiRefCount = v9;
        v11 = kColor.b;
        *(float *)&v5[1].m_pcName = v10;
        *(float *)&v5[1].m_spControllers.m_pObject = v11;
        break;
      case 1:
        v12 = kColor.r;
        v13 = kColor.g;
        ++v5[3].m_uiRefCount;
        *(float *)&v5[1].m_ppkExtra = v12;
        v14 = kColor.b;
        *(float *)&v5[1].m_uiExtraDataSize = v13;
        *(float *)&v5[1].m_uiMaxSize = v14;
        break;
      case 2:
        v15 = kColor.r;
        v16 = kColor.g;
        ++v5[3].m_uiRefCount;
        *(float *)&v5[2].vfptr = v15;
        v17 = kColor.b;
        *(float *)&v5[2].m_uiRefCount = v16;
        *(float *)&v5[2].m_pcName = v17;
        break;
      case 3:
        v18 = kColor.r;
        v19 = kColor.g;
        ++v5[3].m_uiRefCount;
        *(float *)&v5[2].m_spControllers.m_pObject = v18;
        v20 = kColor.b;
        *(float *)&v5[2].m_ppkExtra = v19;
        *(float *)&v5[2].m_uiExtraDataSize = v20;
        break;
      default:
        return;
    }
  }
}

//----- (007E23D0) --------------------------------------------------------
void __cdecl NiStreamSaveBinary<unsigned short>(NiStream *kStream, const unsigned __int16 *value)
{
  NiBinaryStream *v2; // eax@1
  NiBinaryStream *v3; // ST00_4@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1

  v2 = kStream->m_pkOstr;
  v3 = v2;
  v4 = v2->m_pfnWrite;
  kStream = (NiStream *)2;
  v4(v3, value, 2u, (unsigned int *)&kStream, 1u);
}

//----- (007E2400) --------------------------------------------------------
NiMaterialColorController *__thiscall NiMaterialColorController::`scalar deleting destructor'(NiMaterialColorController *this, unsigned int a2)
{
  NiMaterialColorController *v2; // edi@1
  NiInterpolator *v3; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiMaterialColorController::`vftable';
  v3 = this->m_spInterpolator.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  NiTimeController::~NiTimeController((NiTimeController *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E5C34: using guessed type int (__thiscall *NiMaterialColorController::`vftable')(void *p, char);

//----- (007E2450) --------------------------------------------------------
NiPoint3InterpController *__thiscall NiMaterialColorController::CreateClone(NiMaterialColorController *this, NiCloningProcess *kCloning)
{
  NiMaterialColorController *v2; // edi@1
  NiPoint3InterpController *v3; // eax@1
  NiPoint3InterpController *v4; // esi@1

  v2 = this;
  v3 = (NiPoint3InterpController *)operator new(0x44u);
  v4 = v3;
  if ( v3 )
  {
    NiPoint3InterpController::NiPoint3InterpController(v3);
    v4->vfptr = (NiRefObjectVtbl *)&NiMaterialColorController::`vftable';
    LOWORD(v4[1].vfptr) = 0;
  }
  else
  {
    v4 = 0;
  }
  NiPoint3InterpController::CopyMembers((NiPoint3InterpController *)&v2->vfptr, v4, kCloning);
  LOWORD(v4[1].vfptr) = v2->m_uFlags;
  return v4;
}
// 9E5C34: using guessed type int (__thiscall *NiMaterialColorController::`vftable')(void *p, char);

//----- (007E24A0) --------------------------------------------------------
NiPoint3InterpController *__cdecl NiMaterialColorController::CreateObject()
{
  NiPoint3InterpController *v0; // eax@1
  NiPoint3InterpController *v1; // esi@1
  NiPoint3InterpController *result; // eax@2

  v0 = (NiPoint3InterpController *)operator new(0x44u);
  v1 = v0;
  if ( v0 )
  {
    NiPoint3InterpController::NiPoint3InterpController(v0);
    LOWORD(v1[1].vfptr) = 0;
    v1->vfptr = (NiRefObjectVtbl *)&NiMaterialColorController::`vftable';
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E5C34: using guessed type int (__thiscall *NiMaterialColorController::`vftable')(void *p, char);

//----- (007E24D0) --------------------------------------------------------
void __thiscall NiMaterialColorController::LoadBinary(NiMaterialColorController *this, NiStream *kStream)
{
  NiStream *v2; // esi@1
  NiMaterialColorController *v3; // edi@1
  NiBinaryStream *v4; // eax@3
  NiBinaryStream *v5; // ST00_4@3
  unsigned int (__cdecl *v6)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@3

  v2 = kStream;
  v3 = this;
  NiPoint3InterpController::LoadBinary((NiPoint3InterpController *)&this->vfptr, kStream);
  if ( v2->m_uiNifFileVersion >= 0xA000102 )
  {
    v4 = v2->m_pkIstr;
    v5 = v4;
    v6 = v4->m_pfnRead;
    kStream = (NiStream *)2;
    v6(v5, &v3->m_uFlags, 2u, (unsigned int *)&kStream, 1u);
  }
  else
  {
    v3->m_uFlags = (v2->m_usNiTimeControllerFlags >> 5) & 0xFF;
  }
  if ( v2->m_uiNifFileVersion < 0xA010068 )
    NiStream::ReadLinkID(v2);
}

//----- (007E2540) --------------------------------------------------------
void __thiscall NiMaterialColorController::GetViewerStrings(NiMaterialColorController *this, NiTArray<char *> *pkStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiTArray<char *> *v3; // eax@1
  unsigned int v4; // edi@1

  v2 = (NiTArray<NiVBBlock *> *)pkStrings;
  NiPoint3InterpController::GetViewerStrings((NiPoint3InterpController *)&this->vfptr, pkStrings);
  v3 = (NiTArray<char *> *)NiGetViewerString(NiMaterialColorController::m_RTTI.m_pcName);
  v4 = v2->m_uiSize;
  pkStrings = v3;
  if ( v4 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v4 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v4, (NiVBChip *const *)&pkStrings);
}

//----- (007E2590) --------------------------------------------------------
void __thiscall NiAlphaController::GetTargetFloatValue(NiAlphaController *this, float *fValue)
{
  *fValue = *(float *)&this->m_pTarget[3].vfptr;
}

//----- (007E25B0) --------------------------------------------------------
void __thiscall NiTextureTransformController::LinkObject(NiTextureTransformController *this, NiStream *kStream)
{
  NiTextureTransformController *v2; // ebx@1
  NiFloatData *v3; // esi@2
  NiFloatInterpolator *v4; // eax@2
  NiInterpolator *v5; // eax@3
  NiInterpolator *v6; // edi@3
  NiInterpolator *v7; // esi@5

  v2 = this;
  NiPoint3InterpController::LinkObject((NiPSysModifierCtlr *)this, kStream);
  if ( kStream->m_uiNifFileVersion < 0xA010068 )
  {
    v3 = (NiFloatData *)NiStream::GetObjectFromLinkID(kStream);
    v4 = (NiFloatInterpolator *)operator new(0x18u);
    if ( v4 )
    {
      NiFloatInterpolator::NiFloatInterpolator(v4, v3);
      v6 = v5;
    }
    else
    {
      v6 = 0;
    }
    v7 = v2->m_spInterpolator.m_pObject;
    if ( v7 != v6 )
    {
      if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      v2->m_spInterpolator.m_pObject = v6;
      if ( v6 )
        InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
    }
    ((void (*)(void))v2->m_spInterpolator.m_pObject->vfptr[27].__vecDelDtor)();
  }
}

//----- (007E2640) --------------------------------------------------------
char __stdcall NiAlphaController::InterpTargetIsCorrectType(NiObjectNET *pkTarget)
{
  NiRTTI *v2; // eax@2
  char result; // al@5

  if ( pkTarget && (v2 = (NiRTTI *)((int (*)(void))pkTarget->vfptr[1].__vecDelDtor)()) != 0 )
  {
    while ( v2 != &NiMaterialProperty::m_RTTI )
    {
      v2 = v2->m_pkBaseRTTI;
      if ( !v2 )
        goto LABEL_5;
    }
    result = 1;
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (007E2670) --------------------------------------------------------
void __thiscall NiAlphaController::Update(NiAlphaController *this, float fTime)
{
  NiAlphaController *v2; // esi@1
  NiInterpolator *v3; // ecx@4
  NiInterpolator *v4; // ecx@6
  NiObjectNET *v5; // esi@8
  double v6; // st7@8

  v2 = this;
  if ( (LOBYTE(this->m_uFlags) >> 5) & 1 )
  {
    this->m_fScaledTime = -3.4028235e38;
  }
  else if ( NiTimeController::DontDoUpdate((NiTimeController *)&this->vfptr, fTime) )
  {
    v3 = v2->m_spInterpolator.m_pObject;
    if ( !v3 || !(unsigned __int8)((int (*)(void))v3->vfptr[33].__vecDelDtor)() )
      return;
  }
  v4 = v2->m_spInterpolator.m_pObject;
  if ( v4 )
  {
    if ( (unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD, _DWORD))v4->vfptr[19].__vecDelDtor)(
                            v2->m_fScaledTime,
                            v2->m_pTarget,
                            &fTime) )
    {
      v5 = v2->m_pTarget;
      v6 = fTime;
      ++v5[3].m_uiRefCount;
      *(float *)&v5[3].vfptr = v6;
    }
  }
}

//----- (007E26F0) --------------------------------------------------------
void __thiscall NiAlphaController::NiAlphaController(NiAlphaController *this)
{
  NiAlphaController *v1; // esi@1

  v1 = this;
  NiFloatInterpController::NiFloatInterpController((NiFloatInterpController *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&NiAlphaController::`vftable';
}
// 9E5CD4: using guessed type int (__thiscall *NiAlphaController::`vftable')(void *p, char);

//----- (007E2710) --------------------------------------------------------
NiRTTI *NiAlphaController::GetRTTI()
{
  return &NiAlphaController::m_RTTI;
}

//----- (007E2720) --------------------------------------------------------
NiPoint3InterpController *__thiscall NiAlphaController::CreateClone(NiAlphaController *this, NiCloningProcess *kCloning)
{
  NiAlphaController *v2; // edi@1
  NiFloatInterpController *v3; // eax@1
  NiPoint3InterpController *v4; // esi@1
  NiPoint3InterpController *result; // eax@2

  v2 = this;
  v3 = (NiFloatInterpController *)operator new(0x40u);
  v4 = (NiPoint3InterpController *)v3;
  if ( v3 )
  {
    NiFloatInterpController::NiFloatInterpController(v3);
    v4->vfptr = (NiRefObjectVtbl *)&NiAlphaController::`vftable';
    NiPoint3InterpController::CopyMembers((NiPoint3InterpController *)v2, v4, kCloning);
    result = v4;
  }
  else
  {
    NiPoint3InterpController::CopyMembers((NiPoint3InterpController *)v2, 0, kCloning);
    result = 0;
  }
  return result;
}
// 9E5CD4: using guessed type int (__thiscall *NiAlphaController::`vftable')(void *p, char);

//----- (007E2770) --------------------------------------------------------
NiObject *__cdecl NiAlphaController::CreateObject()
{
  NiFloatInterpController *v0; // eax@1
  NiObject *v1; // esi@1
  NiObject *result; // eax@2

  v0 = (NiFloatInterpController *)operator new(0x40u);
  v1 = (NiObject *)v0;
  if ( v0 )
  {
    NiFloatInterpController::NiFloatInterpController(v0);
    v1->vfptr = (NiRefObjectVtbl *)&NiAlphaController::`vftable';
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E5CD4: using guessed type int (__thiscall *NiAlphaController::`vftable')(void *p, char);

//----- (007E27A0) --------------------------------------------------------
void __thiscall NiAlphaController::GetViewerStrings(NiAlphaController *this, NiTArray<char *> *pkStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiTArray<char *> *v3; // eax@1
  unsigned int v4; // edi@1

  v2 = (NiTArray<NiVBBlock *> *)pkStrings;
  NiFloatInterpController::GetViewerStrings((NiFloatInterpController *)&this->vfptr, pkStrings);
  v3 = (NiTArray<char *> *)NiGetViewerString(NiAlphaController::m_RTTI.m_pcName);
  v4 = v2->m_uiSize;
  pkStrings = v3;
  if ( v4 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v4 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v4, (NiVBChip *const *)&pkStrings);
}

//----- (007E27F0) --------------------------------------------------------
char __stdcall NiControllerManager::Morph(NiControllerSequence *pkSourceSequence, NiControllerSequence *pkDestSequence, float fDuration, int iPriority, float fSourceWeight, float fDestWeight)
{
  return NiControllerSequence::StartMorph(
           pkSourceSequence,
           pkDestSequence,
           fDuration,
           iPriority,
           fSourceWeight,
           fDestWeight);
}

//----- (007E2820) --------------------------------------------------------
NiRTTI *NiAVObjectPalette::GetRTTI()
{
  return &NiAVObjectPalette::m_RTTI;
}

//----- (007E2830) --------------------------------------------------------
NiAVObjectPalette *__thiscall NiAVObjectPalette::`scalar deleting destructor'(NiAVObjectPalette *this, unsigned int a2)
{
  NiAVObjectPalette *v2; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiAVObjectPalette::`vftable';
  NiRefObject::~NiRefObject((CPostProcessEffect *)this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E5D94: using guessed type int (__thiscall *NiAVObjectPalette::`vftable')(void *p, char);

//----- (007E2860) --------------------------------------------------------
void __thiscall NiControllerManager::Update(NiControllerManager *this, float fTime)
{
  NiControllerManager *v2; // edi@1
  unsigned int v3; // esi@2
  NiControllerSequence *v4; // ecx@3

  v2 = this;
  if ( (LOBYTE(this->m_uFlags) >> 3) & 1 )
  {
    v3 = 0;
    if ( this->m_kSequenceArray.m_uiSize )
    {
      do
      {
        v4 = v2->m_kSequenceArray.m_pBase[v3].m_pObject;
        if ( v4 )
          NiControllerSequence::Update(v4, fTime, 1);
        ++v3;
      }
      while ( v3 < v2->m_kSequenceArray.m_uiSize );
    }
  }
}

//----- (007E28A0) --------------------------------------------------------
char __stdcall NiControllerManager::CrossFade(NiControllerSequence *pkSourceSequence, NiControllerSequence *pkDestSequence, float fDuration, int iPriority, bool bStartOver, float fWeight, NiControllerSequence *pkTimeSyncSeq)
{
  char result; // al@3

  if ( pkSourceSequence->m_eState == INACTIVE || pkDestSequence->m_eState )
  {
    result = 0;
  }
  else
  {
    NiControllerSequence::Deactivate(pkSourceSequence, fDuration, 1);
    result = NiControllerSequence::Activate(pkDestSequence, iPriority, bStartOver, fWeight, fDuration, pkTimeSyncSeq, 1);
  }
  return result;
}

//----- (007E2900) --------------------------------------------------------
char __thiscall NiControllerManager::RegisterStreamables(NiControllerManager *this, NiStream *kStream)
{
  NiControllerManager *v2; // esi@1
  char result; // al@1
  unsigned int v4; // edi@2
  NiControllerSequence *v5; // ecx@3
  NiAVObjectPalette *v6; // ecx@6

  v2 = this;
  result = NiTimeController::RegisterStreamables((NiTimeController *)&this->vfptr, kStream);
  if ( result )
  {
    v4 = 0;
    if ( v2->m_kSequenceArray.m_uiSize )
    {
      do
      {
        v5 = v2->m_kSequenceArray.m_pBase[v4].m_pObject;
        if ( v5 )
          ((void (__stdcall *)(_DWORD))v5->vfptr[5].__vecDelDtor)(kStream);
        ++v4;
      }
      while ( v4 < v2->m_kSequenceArray.m_uiSize );
    }
    v6 = v2->m_spObjectPalette.m_pObject;
    if ( v6 )
      ((void (__stdcall *)(_DWORD))v6->vfptr[5].__vecDelDtor)(kStream);
    result = 1;
  }
  return result;
}

//----- (007E2960) --------------------------------------------------------
void __thiscall NiControllerManager::PostLinkObject(NiControllerManager *this, NiStream *kStream)
{
  NiControllerManager *v2; // esi@1
  NiAVObject *v3; // ebx@1
  unsigned int v4; // edi@1
  NiControllerSequence *v5; // ecx@2

  v2 = this;
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue(
    (NiVBDynamicSet *)this,
    (IDirect3DVertexBuffer9 *)kStream);
  v3 = (NiAVObject *)v2->m_pTarget;
  v4 = 0;
  if ( v2->m_kSequenceArray.m_uiSize )
  {
    do
    {
      v5 = v2->m_kSequenceArray.m_pBase[v4].m_pObject;
      if ( v5 )
        NiControllerSequence::StoreTargets(v5, v3);
      ++v4;
    }
    while ( v4 < v2->m_kSequenceArray.m_uiSize );
  }
}

//----- (007E29A0) --------------------------------------------------------
char __thiscall NiControllerManager::IsEqual(NiControllerManager *this, NiObject *pkObject)
{
  NiControllerManager *v2; // esi@1
  char result; // al@2
  unsigned int v4; // ecx@4
  unsigned int v5; // eax@4
  NiTMapItem<char const *,unsigned int> **v6; // edx@5
  NiTMapItem<char const *,unsigned int> *v7; // eax@8
  NiTMapItem<char const *,unsigned int> *v8; // edi@9
  int v9; // eax@13
  unsigned int v10; // edx@13
  unsigned int v11; // eax@13
  NiTMapItem<char const *,unsigned int> **v12; // ecx@14
  int v13; // esi@18
  unsigned int v14; // esi@25
  void *(__thiscall *v15)(NiRefObject *, unsigned int); // ecx@26
  void *(__thiscall *v16)(NiRefObject *, unsigned int); // eax@26
  NiControllerManager *v17; // [sp+8h] [bp-8h]@1
  const char *v18; // [sp+Ch] [bp-4h]@10

  v2 = this;
  v17 = this;
  if ( NiTimeController::IsEqual((NiTimeController *)&this->vfptr, pkObject)
    && (NiRefObjectVtbl *)v2->m_kSequenceArray.m_uiSize == pkObject[9].vfptr )
  {
    v4 = v2->m_kIndexMap.m_uiHashSize;
    v5 = 0;
    if ( v4 )
    {
      v6 = v2->m_kIndexMap.m_ppkHashTable;
      while ( !*v6 )
      {
        ++v5;
        ++v6;
        if ( v5 >= v4 )
          goto LABEL_8;
      }
      v7 = v2->m_kIndexMap.m_ppkHashTable[v5];
    }
    else
    {
LABEL_8:
      v7 = 0;
    }
    v8 = v7;
    if ( v7 )
    {
      while ( 1 )
      {
        v18 = v8->m_key;
        if ( v8->m_pkNext )
        {
          v8 = v8->m_pkNext;
        }
        else
        {
          v9 = v2->m_kIndexMap.vfptr->KeyToHashIndex(
                 (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int> *)&v2->m_kIndexMap,
                 v8->m_key);
          v10 = v2->m_kIndexMap.m_uiHashSize;
          v11 = v9 + 1;
          if ( v11 >= v10 )
          {
LABEL_17:
            v8 = 0;
          }
          else
          {
            v12 = &v2->m_kIndexMap.m_ppkHashTable[v11];
            while ( !*v12 )
            {
              ++v11;
              ++v12;
              if ( v11 >= v10 )
                goto LABEL_17;
            }
            v8 = *v12;
          }
        }
        v13 = *(_DWORD *)(pkObject[11].m_uiRefCount
                        + 4
                        * (*(int (__thiscall **)(unsigned int *, const char *))(pkObject[10].m_uiRefCount + 4))(
                            &pkObject[10].m_uiRefCount,
                            v18));
        if ( !v13 )
          break;
        while ( !(unsigned __int8)(*(int (__thiscall **)(unsigned int *, const char *, _DWORD))(pkObject[10].m_uiRefCount
                                                                                              + 8))(
                                    &pkObject[10].m_uiRefCount,
                                    v18,
                                    *(_DWORD *)(v13 + 4)) )
        {
          v13 = *(_DWORD *)v13;
          if ( !v13 )
            goto LABEL_21;
        }
        if ( !v8 )
          goto LABEL_25;
        v2 = v17;
      }
LABEL_21:
      result = 0;
    }
    else
    {
LABEL_25:
      v14 = 0;
      if ( v17->m_kSequenceArray.m_uiSize )
      {
        do
        {
          v15 = (void *(__thiscall *)(NiRefObject *, unsigned int))v17->m_kSequenceArray.m_pBase[v14].m_pObject;
          v16 = pkObject[8].vfptr[v14].__vecDelDtor;
          if ( v15 && v16 )
          {
            if ( !(unsigned __int8)(*(int (__stdcall **)(void *(__thiscall *)(NiRefObject *, unsigned int)))(*(_DWORD *)v15 + 28))(pkObject[8].vfptr[v14].__vecDelDtor) )
              goto LABEL_21;
          }
          else if ( v15 != v16 )
          {
            goto LABEL_21;
          }
          ++v14;
        }
        while ( v14 < v17->m_kSequenceArray.m_uiSize );
      }
      result = 1;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007E2AE0) --------------------------------------------------------
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiAVObject *>,NiAVObject *>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiAVObject *>,NiAVObject *>(NiTStringTemplateMap<NiTPointerMap<char const *,NiAVObject *>,NiAVObject *> *this)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v1; // edi@1
  bool v2; // zf@1
  unsigned int v3; // ebx@2
  NiTMapItem<unsigned int,NiVBSet *> *v4; // esi@3
  void *v5; // ecx@4

  v1 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this;
  v2 = this->m_bCopy == 0;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiAVObject *>Vtbl *)&NiTStringTemplateMap<NiTPointerMap<char const *,NiAVObject *>,NiAVObject *>::`vftable';
  if ( !v2 )
  {
    v3 = 0;
    if ( this->m_uiHashSize )
    {
      do
      {
        v4 = v1->m_ppkHashTable[v3];
        while ( v4 )
        {
          v5 = (void *)v4->m_key;
          v4 = v4->m_pkNext;
          operator delete(v5);
        }
        ++v3;
      }
      while ( v3 < v1->m_uiHashSize );
    }
  }
  v1->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *>Vtbl *)&NiTPointerMap<char const *,NiAVObject *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll(v1);
  v1->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiAVObject *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll(v1);
  operator delete(v1->m_ppkHashTable);
}
// 9E5DDC: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiAVObject *>::`vftable')(void *p, char);
// 9E5DFC: using guessed type int (__thiscall *NiTPointerMap<char const *,NiAVObject *>::`vftable')(void *p, char);
// 9E5E1C: using guessed type int (__thiscall *NiTStringTemplateMap<NiTPointerMap<char const *,NiAVObject *>,NiAVObject *>::`vftable')(void *p, char);

//----- (007E2B50) --------------------------------------------------------
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,unsigned int>,unsigned int>::~NiTStringTemplateMap<NiTPointerMap<char const *,unsigned int>,unsigned int>(NiTStringTemplateMap<NiTPointerMap<char const *,unsigned int>,unsigned int> *this)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v1; // edi@1
  bool v2; // zf@1
  unsigned int v3; // ebx@2
  NiTMapItem<unsigned int,NiVBSet *> *v4; // esi@3
  void *v5; // ecx@4

  v1 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this;
  v2 = this->m_bCopy == 0;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int>Vtbl *)&NiTStringTemplateMap<NiTPointerMap<char const *,unsigned int>,unsigned int>::`vftable';
  if ( !v2 )
  {
    v3 = 0;
    if ( this->m_uiHashSize )
    {
      do
      {
        v4 = v1->m_ppkHashTable[v3];
        while ( v4 )
        {
          v5 = (void *)v4->m_key;
          v4 = v4->m_pkNext;
          operator delete(v5);
        }
        ++v3;
      }
      while ( v3 < v1->m_uiHashSize );
    }
  }
  v1->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *>Vtbl *)&NiTPointerMap<char const *,unsigned int>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll(v1);
  v1->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll(v1);
  operator delete(v1->m_ppkHashTable);
}
// 9E5D74: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int>::`vftable')(void *p, char);
// 9E5E3C: using guessed type int (__thiscall *NiTPointerMap<char const *,unsigned int>::`vftable')(void *p, char);
// 9E5E5C: using guessed type int (__thiscall *NiTStringTemplateMap<NiTPointerMap<char const *,unsigned int>,unsigned int>::`vftable')(void *p, char);

//----- (007E2BC0) --------------------------------------------------------
NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiAVObject *> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiAVObject *>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiAVObject *> *this, unsigned int a2)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiAVObject *> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiAVObject *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiAVObject *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll((NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this);
  operator delete(v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E5DDC: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiAVObject *>::`vftable')(void *p, char);

//----- (007E2C00) --------------------------------------------------------
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<char const *,NiAVObject *>::`scalar deleting destructor'(NiTPointerMap<char const *,NiAVObject *> *this, unsigned int a2)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v2; // esi@1

  v2 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiAVObject *>Vtbl *)&NiTPointerMap<char const *,NiAVObject *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll((NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this);
  v2->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiAVObject *>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll(v2);
  operator delete(v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E5DDC: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiAVObject *>::`vftable')(void *p, char);
// 9E5DFC: using guessed type int (__thiscall *NiTPointerMap<char const *,NiAVObject *>::`vftable')(void *p, char);

//----- (007E2C40) --------------------------------------------------------
NiTStringPointerMap<NiAVObject *> *__thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiAVObject *>,NiAVObject *>::`scalar deleting destructor'(NiTStringPointerMap<NiAVObject *> *this, unsigned int a2)
{
  NiTStringPointerMap<NiAVObject *> *v2; // esi@1

  v2 = this;
  NiTStringTemplateMap<NiTPointerMap<char const *,NiAVObject *>,NiAVObject *>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiAVObject *>,NiAVObject *>((NiTStringTemplateMap<NiTPointerMap<char const *,NiAVObject *>,NiAVObject *> *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007E2C70) --------------------------------------------------------
NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int> *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int>::`scalar deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int> *this, unsigned int a2)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int> *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll((NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this);
  operator delete(v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E5D74: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int>::`vftable')(void *p, char);

//----- (007E2CB0) --------------------------------------------------------
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<char const *,unsigned int>::`scalar deleting destructor'(NiTPointerMap<char const *,unsigned int> *this, unsigned int a2)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v2; // esi@1

  v2 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int>Vtbl *)&NiTPointerMap<char const *,unsigned int>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll((NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this);
  v2->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll(v2);
  operator delete(v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E5D74: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int>::`vftable')(void *p, char);
// 9E5E3C: using guessed type int (__thiscall *NiTPointerMap<char const *,unsigned int>::`vftable')(void *p, char);

//----- (007E2CF0) --------------------------------------------------------
void __thiscall NiControllerManager::SaveBinary(NiControllerManager *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiControllerManager *v3; // esi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST14_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v7; // eax@1
  unsigned int (__cdecl *v8)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@1
  unsigned int v9; // ebx@1
  int v10; // [sp+Ch] [bp-8h]@1
  unsigned int uiNumSequences; // [sp+10h] [bp-4h]@1

  v2 = kStream;
  v3 = this;
  NiTimeController::SaveBinary((NiTimeController *)&this->vfptr, kStream);
  BYTE3(kStream) = v3->m_bCumulative;
  v4 = v2->m_pkOstr;
  v5 = v4;
  v6 = v4->m_pfnWrite;
  v10 = 1;
  v6(v5, (char *)&kStream + 3, 1u, (unsigned int *)&v10, 1u);
  v7 = v2->m_pkOstr;
  uiNumSequences = v3->m_kSequenceArray.m_uiSize;
  v8 = v7->m_pfnWrite;
  v10 = 4;
  v8(v7, &uiNumSequences, 4u, (unsigned int *)&v10, 1u);
  v9 = 0;
  if ( uiNumSequences )
  {
    do
    {
      if ( v3->m_kSequenceArray.m_pBase[v9].m_pObject )
        v2->vfptr->SaveLinkID(v2, (NiObject *)v3->m_kSequenceArray.m_pBase[v9].m_pObject);
      ++v9;
    }
    while ( v9 < uiNumSequences );
  }
  v2->vfptr->SaveLinkID(v2, (NiObject *)v3->m_spObjectPalette.m_pObject);
}

//----- (007E2D90) --------------------------------------------------------
void __thiscall NiControllerManager::LoadBinary(NiControllerManager *this, NiStream *kStream)
{
  NiStream *v2; // esi@1
  NiControllerManager *v3; // edi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST00_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiObject *v7; // eax@2
  NiAVObjectPalette *v8; // esi@2
  NiAVObjectPalette *v9; // ebx@2
  int v10; // [sp+8h] [bp-4h]@1

  v2 = kStream;
  v3 = this;
  NiTimeController::LoadBinary((NiTimeController *)&this->vfptr, kStream);
  v4 = v2->m_pkIstr;
  v5 = v4;
  v6 = v4->m_pfnRead;
  v10 = 1;
  v6(v5, (char *)&kStream + 3, 1u, (unsigned int *)&v10, 1u);
  v3->m_bCumulative = BYTE3(kStream) != 0;
  NiStream::ReadMultipleLinkIDs(v2);
  if ( v2->m_uiNifFileVersion >= 0xA010068 )
  {
    v7 = NiStream::ResolveLinkID(v2);
    v8 = v3->m_spObjectPalette.m_pObject;
    v9 = (NiAVObjectPalette *)v7;
    if ( (NiObject *)v8 != v7 )
    {
      if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
        v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      v3->m_spObjectPalette.m_pObject = v9;
      if ( v9 )
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
    }
  }
}

//----- (007E2E30) --------------------------------------------------------
void __thiscall NiTSet<NiPointer<NiActorManager::ChainCompletionInfo>>::Realloc(NiTSet<NiPointer<NiControllerSequence> > *this, unsigned int uiNewSize)
{
  unsigned int v2; // ebx@1
  NiTSet<NiPointer<NiControllerSequence> > *v3; // esi@1
  unsigned int v4; // ecx@3
  void *v5; // eax@3
  unsigned int v6; // eax@8
  NiPointer<NiControllerSequence> *v7; // esi@9
  int v8; // ebx@9
  NiControllerSequence *v9; // edi@9
  NiControllerSequence *v10; // esi@14
  NiPointer<NiControllerSequence> *v11; // eax@19
  NiControllerSequence *v12; // esi@20
  NiPointer<NiControllerSequence> *v13; // ecx@20
  int v14; // ebx@20
  int v15; // esi@20
  int v16; // edi@21
  unsigned int i; // [sp+8h] [bp-Ch]@8
  unsigned int ia; // [sp+8h] [bp-Ch]@20
  NiTSet<NiPointer<NiControllerSequence> > *v19; // [sp+Ch] [bp-8h]@1
  NiPointer<NiControllerSequence> *pNewBase; // [sp+10h] [bp-4h]@6

  v2 = uiNewSize;
  v3 = this;
  v19 = this;
  if ( uiNewSize != this->m_uiAlloced )
  {
    if ( uiNewSize )
    {
      v4 = 4 * uiNewSize | -((unsigned __int64)uiNewSize >> 30 != 0);
      v5 = operator new((v4 + 4) | -__CFADD__(v4, 4));
      if ( v5 )
      {
        *(_DWORD *)v5 = uiNewSize;
        if ( ((uiNewSize - 1) & 0x80000000) == 0 )
          memset((char *)v5 + 4, 0, 4 * uiNewSize);
        pNewBase = (NiPointer<NiControllerSequence> *)((char *)v5 + 4);
      }
      else
      {
        pNewBase = 0;
      }
      v6 = 0;
      i = 0;
      if ( v3->m_uiUsed )
      {
        do
        {
          v7 = v3->m_pBase;
          v8 = v6;
          v9 = pNewBase[v6].m_pObject;
          if ( v9 != v7[v6].m_pObject )
          {
            if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
              v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
            v10 = v7[v8].m_pObject;
            pNewBase[v8].m_pObject = v10;
            if ( v10 )
              InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
          }
          v6 = i + 1;
          i = v6;
          v3 = v19;
        }
        while ( v6 < v19->m_uiUsed );
        v2 = uiNewSize;
      }
    }
    else
    {
      pNewBase = 0;
    }
    v11 = v3->m_pBase;
    if ( v3->m_pBase )
    {
      v12 = v11[-1].m_pObject;
      v13 = v11 - 1;
      v14 = (int)&v11[(_DWORD)v12];
      v15 = (int)&v12[-1].m_spStringPalette.m_pObject + 3;
      ia = (unsigned int)&v11[-1];
      if ( v15 >= 0 )
      {
        do
        {
          v16 = *(_DWORD *)(v14 - 4);
          v14 -= 4;
          if ( v16 && !InterlockedDecrement((volatile LONG *)(v16 + 4)) )
          {
            if ( v16 )
              (**(void (__thiscall ***)(_DWORD, _DWORD))v16)(v16, 1);
          }
          --v15;
        }
        while ( v15 >= 0 );
        v13 = (NiPointer<NiControllerSequence> *)ia;
      }
      operator delete(v13);
      v2 = uiNewSize;
      v3 = v19;
    }
    v3->m_pBase = pNewBase;
    v3->m_uiAlloced = v2;
  }
}

//----- (007E2F80) --------------------------------------------------------
void __thiscall NiTArray<NiPointer<NiControllerSequence>>::~NiTArray<NiPointer<NiControllerSequence>>(NiTArray<NiPointer<NiControllerSequence> > *this)
{
  NiPointer<NiControllerSequence> *v1; // eax@1
  NiControllerSequence *v2; // ebx@2
  NiPointer<NiControllerSequence> *v3; // ecx@2
  int v4; // edi@2
  int v5; // ebx@2
  int v6; // esi@3
  int v7; // [sp+0h] [bp-4h]@2

  v1 = this->m_pBase;
  this->vfptr = (NiTArray<NiPointer<NiControllerSequence> >Vtbl *)&NiTArray<NiPointer<NiControllerSequence>>::`vftable';
  if ( v1 )
  {
    v2 = v1[-1].m_pObject;
    v3 = v1 - 1;
    v4 = (int)&v1[(_DWORD)v2];
    v5 = (int)&v2[-1].m_spStringPalette.m_pObject + 3;
    v7 = (int)&v1[-1];
    if ( v5 >= 0 )
    {
      do
      {
        v6 = *(_DWORD *)(v4 - 4);
        v4 -= 4;
        if ( v6 && !InterlockedDecrement((volatile LONG *)(v6 + 4)) )
        {
          if ( v6 )
            (**(void (__thiscall ***)(_DWORD, _DWORD))v6)(v6, 1);
        }
        --v5;
      }
      while ( v5 >= 0 );
      v3 = (NiPointer<NiControllerSequence> *)v7;
    }
    operator delete(v3);
  }
}
// 9E5E7C: using guessed type int (__thiscall *NiTArray<NiPointer<NiControllerSequence>>::`vftable')(void *p, char);

//----- (007E2FE0) --------------------------------------------------------
NiTArray<NiPointer<NiControllerSequence> > *__thiscall NiTArray<NiPointer<NiControllerSequence>>::`vector deleting destructor'(NiTArray<NiPointer<NiControllerSequence> > *this, unsigned int a2)
{
  NiTArray<NiPointer<NiControllerSequence> > *v2; // esi@1

  v2 = this;
  NiTArray<NiPointer<NiControllerSequence>>::~NiTArray<NiPointer<NiControllerSequence>>(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007E3010) --------------------------------------------------------
void __thiscall NiControllerManager::~NiControllerManager(NiControllerManager *this)
{
  NiControllerManager *v1; // esi@1
  NiAVObjectPalette *v2; // edi@1

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiControllerManager::`vftable';
  NiTArray<NiPointer<NiD3DXEffectTechnique>>::RemoveAll((NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *)&this->m_kSequenceArray);
  v1->m_kTempBlendSeqs.m_uiUsed = 0;
  v2 = v1->m_spObjectPalette.m_pObject;
  if ( v2 && !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
  NiTSet<NiPointer<NiActorManager::ChainCompletionInfo>>::~NiTSet<NiPointer<NiActorManager::ChainCompletionInfo>>(&v1->m_kTempBlendSeqs);
  NiTStringTemplateMap<NiTPointerMap<char const *,unsigned int>,unsigned int>::~NiTStringTemplateMap<NiTPointerMap<char const *,unsigned int>,unsigned int>((NiTStringTemplateMap<NiTPointerMap<char const *,unsigned int>,unsigned int> *)&v1->m_kIndexMap.vfptr);
  NiTArray<NiPointer<NiControllerSequence>>::~NiTArray<NiPointer<NiControllerSequence>>(&v1->m_kSequenceArray);
  NiTimeController::~NiTimeController((NiTimeController *)&v1->vfptr);
}
// 9E5E84: using guessed type int (__thiscall *NiControllerManager::`vftable')(void *p, char);

//----- (007E3070) --------------------------------------------------------
NiRTTI *NiControllerManager::GetRTTI()
{
  return &NiControllerManager::m_RTTI;
}

//----- (007E3080) --------------------------------------------------------
NiPointer<NiControllerSequence> *__thiscall NiControllerManager::RemoveSequence(NiControllerManager *this, NiPointer<NiControllerSequence> *result, NiControllerSequence *pkSequence)
{
  NiControllerManager *v3; // esi@1
  unsigned int v4; // edi@1
  NiControllerSequence *v5; // ebx@2
  NiPointer<NiControllerSequence> *v6; // eax@9
  NiControllerSequence *v7; // edi@10
  unsigned int v8; // ecx@13
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v9; // edi@13
  unsigned int v10; // eax@13
  NiTMapItem<char const *,unsigned int> **v11; // esi@14
  NiTMapItem<unsigned int,NiVBSet *> **v12; // edx@14
  NiTMapItem<unsigned int,NiVBSet *> *v13; // eax@17
  unsigned int v14; // ecx@19
  NiControllerSequence *v15; // edx@19
  int v16; // eax@20
  unsigned int v17; // edx@20
  unsigned int v18; // eax@20
  NiTMapItem<unsigned int,NiVBSet *> **v19; // ecx@21
  unsigned int key; // [sp+Ch] [bp-8h]@19
  NiControllerSequence *ui; // [sp+10h] [bp-4h]@10

  v3 = this;
  v4 = 0;
  if ( this->m_kSequenceArray.m_uiSize )
  {
    while ( 1 )
    {
      v5 = v3->m_kSequenceArray.m_pBase[v4].m_pObject;
      if ( v5 )
        InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
      if ( v5 == pkSequence )
        break;
      if ( v5 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      }
      if ( ++v4 >= v3->m_kSequenceArray.m_uiSize )
        goto LABEL_9;
    }
    ui = (NiControllerSequence *)v4;
    NiTArray<NiPointer<NiControllerSequence>>::RemoveAt(
      (NiTArray<NiPointer<NiAVObject> > *)&v3->m_kSequenceArray,
      (NiPointer<NiAVObject> *)&pkSequence,
      v4);
    v7 = pkSequence;
    if ( pkSequence && !InterlockedDecrement((volatile LONG *)&pkSequence->m_uiRefCount) )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v8 = v3->m_kIndexMap.m_uiHashSize;
    v9 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v3->m_kIndexMap;
    v10 = 0;
    if ( v8 )
    {
      v11 = v3->m_kIndexMap.m_ppkHashTable;
      v12 = v9->m_ppkHashTable;
      while ( !*v12 )
      {
        ++v10;
        ++v12;
        if ( v10 >= v8 )
          goto LABEL_17;
      }
      v13 = (NiTMapItem<unsigned int,NiVBSet *> *)v11[v10];
    }
    else
    {
LABEL_17:
      v13 = 0;
    }
    if ( v13 )
    {
      while ( 1 )
      {
        v14 = v13->m_key;
        v15 = (NiControllerSequence *)v13->m_val;
        v13 = v13->m_pkNext;
        key = v14;
        pkSequence = v15;
        if ( !v13 )
        {
          v16 = v9->vfptr->KeyToHashIndex(v9, v14);
          v17 = v9->m_uiHashSize;
          v18 = v16 + 1;
          if ( v18 >= v17 )
          {
LABEL_24:
            v13 = 0;
          }
          else
          {
            v19 = &v9->m_ppkHashTable[v18];
            while ( !*v19 )
            {
              ++v18;
              ++v19;
              if ( v18 >= v17 )
                goto LABEL_24;
            }
            v13 = *v19;
          }
        }
        if ( pkSequence == ui )
          break;
        if ( !v13 )
          goto LABEL_31;
      }
      NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::RemoveAt(v9, key);
    }
LABEL_31:
    NiControllerSequence::ClearTargets(v5);
    v5->m_pkOwner = 0;
    result->m_pObject = v5;
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v6 = result;
  }
  else
  {
LABEL_9:
    v6 = result;
    result->m_pObject = 0;
  }
  return v6;
}

//----- (007E31D0) --------------------------------------------------------
NiControllerManager *__thiscall NiControllerManager::`vector deleting destructor'(NiControllerManager *this, unsigned int a2)
{
  NiControllerManager *v2; // esi@1

  v2 = this;
  NiControllerManager::~NiControllerManager(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007E3200) --------------------------------------------------------
char __thiscall NiControllerManager::AddSequence(NiControllerManager *this, NiControllerSequence *pkSequence, const char *pcName, bool bStoreTargets)
{
  NiControllerSequence *v4; // esi@1
  NiControllerManager *v5; // edi@1
  bool v6; // zf@3
  NiVBSet *v8; // eax@11
  char *pkSequencea; // [sp+10h] [bp+8h]@11

  v4 = pkSequence;
  v5 = this;
  if ( this && pkSequence->m_pkOwner )
    return 0;
  v6 = pkSequence->m_pcAccumRoot == 0;
  pkSequence->m_pkOwner = this;
  if ( v6 )
    NiControllerSequence::SetAccumRootName(pkSequence, this->m_pTarget->m_pcName);
  if ( bStoreTargets && !NiControllerSequence::StoreTargets(pkSequence, (NiAVObject *)v5->m_pTarget) )
  {
    pkSequence->m_pkOwner = 0;
    return 0;
  }
  if ( pcName )
    NiControllerSequence::SetName(pkSequence, pcName);
  *(_DWORD *)&bStoreTargets = pkSequence;
  InterlockedIncrement((volatile LONG *)&pkSequence->m_uiRefCount);
  pkSequencea = pkSequence->m_pcName;
  v8 = (NiVBSet *)NiTArray<NiPointer<NiControllerSequence>>::AddFirstEmpty(
                    (NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *)&v5->m_kSequenceArray,
                    (NiPointer<NiD3DShaderConstantMapEntry> *)&bStoreTargets);
  NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::SetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v5->m_kIndexMap,
    (unsigned int)pkSequencea,
    v8);
  if ( !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  return 1;
}

//----- (007E32B0) --------------------------------------------------------
void __thiscall NiControllerManager::CopyMembers(NiControllerManager *this, NiControllerManager *pkDest, NiCloningProcess *kCloning)
{
  NiControllerManager *v3; // ebx@1
  NiControllerManager *v4; // edi@1
  unsigned int v5; // eax@1
  NiControllerSequence *v6; // ecx@2
  int v7; // eax@3
  NiD3DShaderConstantMapEntry *v8; // esi@3
  bool v9; // zf@4
  const char *v10; // ebx@5
  unsigned int v11; // kr00_4@6
  char *v12; // eax@6
  unsigned int v13; // ebx@7
  NiVBSet *v14; // eax@7
  NiAVObjectPalette *v15; // edi@11
  int v16; // eax@12
  NiAVObjectPalette *v17; // esi@12
  NiAVObjectPalette *v18; // edi@12
  NiPointer<NiD3DShaderConstantMapEntry> element; // [sp+Ch] [bp-Ch]@7
  unsigned int ui; // [sp+10h] [bp-8h]@1
  NiControllerManager *v21; // [sp+14h] [bp-4h]@1

  v3 = pkDest;
  v4 = this;
  v21 = this;
  NiTimeController::CopyMembers((NiTimeController *)&this->vfptr, (NiTimeController *)&pkDest->vfptr, kCloning);
  v5 = 0;
  pkDest->m_bCumulative = v4->m_bCumulative;
  ui = 0;
  if ( v4->m_kSequenceArray.m_uiSize )
  {
    do
    {
      v6 = v4->m_kSequenceArray.m_pBase[v5].m_pObject;
      if ( v6 )
      {
        v7 = ((int (__stdcall *)(_DWORD))v6->vfptr[2].__vecDelDtor)(kCloning);
        v8 = (NiD3DShaderConstantMapEntry *)v7;
        if ( !*(_DWORD *)(v7 + 64) )
        {
          v9 = *(_DWORD *)(v7 + 92) == 0;
          *(_DWORD *)(v7 + 64) = v3;
          if ( v9 )
          {
            v10 = v3->m_pTarget->m_pcName;
            operator delete(0);
            v8[1].m_uiDataStride = 0;
            if ( v10 )
            {
              v11 = strlen(v10);
              v12 = (char *)operator new(v11 + 1);
              v8[1].m_uiDataStride = (unsigned int)v12;
              strcpy_s(v12, v11 + 1, v10);
            }
          }
          element.m_pObject = v8;
          InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
          v13 = (unsigned int)v8->m_pcKey;
          v14 = (NiVBSet *)NiTArray<NiPointer<NiControllerSequence>>::AddFirstEmpty(
                             (NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *)&pkDest->m_kSequenceArray,
                             &element);
          NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::SetAt(
            (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&pkDest->m_kIndexMap,
            v13,
            v14);
          if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
            v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
          v4 = v21;
          v3 = pkDest;
        }
      }
      v5 = ui + 1;
      ui = v5;
    }
    while ( v5 < v4->m_kSequenceArray.m_uiSize );
  }
  v15 = v4->m_spObjectPalette.m_pObject;
  if ( v15 )
  {
    v16 = (int)v15->vfptr[2].__vecDelDtor((NiRefObject *)v15, (unsigned int)kCloning);
    v17 = v3->m_spObjectPalette.m_pObject;
    v18 = (NiAVObjectPalette *)v16;
    if ( v17 != (NiAVObjectPalette *)v16 )
    {
      if ( v17 && !InterlockedDecrement((volatile LONG *)&v17->m_uiRefCount) && v17 )
        v17->vfptr->__vecDelDtor((NiRefObject *)v17, 1u);
      v3->m_spObjectPalette.m_pObject = v18;
      if ( v18 )
        InterlockedIncrement((volatile LONG *)&v18->m_uiRefCount);
    }
  }
}

//----- (007E3400) --------------------------------------------------------
void __thiscall NiControllerManager::ProcessClone(NiControllerManager *this, NiCloningProcess *kCloning)
{
  NiControllerManager *v2; // esi@1
  unsigned int v3; // edi@1
  NiControllerSequence *v4; // ebx@2
  NiTPointerMap<NiObject *,NiObject *> *v5; // ebx@5
  NiTMapItem<NiObject *,NiObject *> *v6; // edi@5
  NiObject *v7; // ebx@12
  NiTPointerMap<NiObject *,NiObject *> *v8; // esi@12
  NiTMapItem<NiObject *,NiObject *> *v9; // edi@12
  NiControllerSequence **v10; // edi@15
  unsigned int v11; // eax@15
  unsigned int v12; // eax@17
  NiControllerSequence *v13; // edi@18
  unsigned int v14; // eax@20
  unsigned int v15; // eax@22
  unsigned int v16; // eax@25
  NiControllerSequence **v17; // ebx@25
  NiControllerSequence *v18; // esi@25
  unsigned int v19; // eax@37
  NiControllerSequence **v20; // ebx@37
  NiControllerSequence *v21; // esi@37
  NiControllerSequence *v22; // edi@42
  NiAVObjectPalette *v23; // esi@45
  NiObject *pkClone; // [sp+Ch] [bp-Ch]@0
  NiTSet<NiPointer<NiControllerSequence> > *pkClonea; // [sp+Ch] [bp-Ch]@11
  NiControllerManager *v26; // [sp+10h] [bp-8h]@1
  unsigned int ui; // [sp+14h] [bp-4h]@10

  v2 = this;
  v26 = this;
  NiTimeController::ProcessClone((NiTimeController *)&this->vfptr, kCloning);
  v3 = 0;
  if ( v2->m_kSequenceArray.m_uiSize )
  {
    do
    {
      v4 = v2->m_kSequenceArray.m_pBase[v3].m_pObject;
      if ( v4 )
      {
        v4->vfptr[10].__vecDelDtor((NiRefObject *)v4, (unsigned int)kCloning);
        NiControllerSequence::StoreTargets(v4, (NiAVObject *)v2->m_pTarget);
      }
      ++v3;
    }
    while ( v3 < v2->m_kSequenceArray.m_uiSize );
  }
  v5 = kCloning->m_pkCloneMap;
  v6 = v5->m_ppkHashTable[kCloning->m_pkCloneMap->vfptr->KeyToHashIndex(
                            (NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *> *)kCloning->m_pkCloneMap,
                            (NiObject *)v2)];
  if ( v6 )
  {
    while ( !v5->vfptr->IsKeysEqual(
               (NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *> *)v5,
               (NiObject *)v2,
               v6->m_key) )
    {
      v6 = v6->m_pkNext;
      if ( !v6 )
        goto LABEL_10;
    }
    pkClone = v6->m_val;
  }
LABEL_10:
  ui = 0;
  if ( v2->m_kTempBlendSeqs.m_uiUsed )
  {
    pkClonea = (NiTSet<NiPointer<NiControllerSequence> > *)&pkClone[13].m_uiRefCount;
    do
    {
      v7 = (NiObject *)&v2->m_kTempBlendSeqs.m_pBase[ui].m_pObject->vfptr;
      v8 = kCloning->m_pkCloneMap;
      v9 = v8->m_ppkHashTable[kCloning->m_pkCloneMap->vfptr->KeyToHashIndex(
                                (NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *> *)kCloning->m_pkCloneMap,
                                v7)];
      if ( v9 )
      {
        while ( !v8->vfptr->IsKeysEqual(
                   (NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *> *)v8,
                   v7,
                   v9->m_key) )
        {
          v9 = v9->m_pkNext;
          if ( !v9 )
            goto LABEL_15;
        }
        v13 = (NiControllerSequence *)v9->m_val;
        if ( v13 )
          InterlockedIncrement((volatile LONG *)&v13->m_uiRefCount);
        v14 = pkClonea->m_uiAlloced;
        if ( pkClonea->m_uiUsed == v14 )
        {
          if ( v14 )
            v15 = 2 * v14;
          else
            v15 = 1;
          NiTSet<NiPointer<NiActorManager::ChainCompletionInfo>>::Realloc(pkClonea, v15);
        }
        v16 = pkClonea->m_uiUsed;
        v17 = &pkClonea->m_pBase[v16].m_pObject;
        pkClonea->m_uiUsed = v16 + 1;
        v18 = *v17;
        if ( *v17 != v13 )
        {
          if ( v18 && !InterlockedDecrement((volatile LONG *)&v18->m_uiRefCount) && v18 )
            v18->vfptr->__vecDelDtor((NiRefObject *)v18, 1u);
          *v17 = v13;
          if ( !v13 )
            goto LABEL_44;
          InterlockedIncrement((volatile LONG *)&v13->m_uiRefCount);
        }
        if ( v13 && !InterlockedDecrement((volatile LONG *)&v13->m_uiRefCount) )
          v13->vfptr->__vecDelDtor((NiRefObject *)v13, 1u);
      }
      else
      {
LABEL_15:
        v10 = &v26->m_kTempBlendSeqs.m_pBase[ui].m_pObject;
        v11 = pkClonea->m_uiAlloced;
        if ( pkClonea->m_uiUsed == v11 )
        {
          if ( v11 )
            v12 = 2 * v11;
          else
            v12 = 1;
          NiTSet<NiPointer<NiActorManager::ChainCompletionInfo>>::Realloc(pkClonea, v12);
        }
        v19 = pkClonea->m_uiUsed;
        v20 = &pkClonea->m_pBase[v19].m_pObject;
        pkClonea->m_uiUsed = v19 + 1;
        v21 = *v20;
        if ( *v20 != *v10 )
        {
          if ( v21 && !InterlockedDecrement((volatile LONG *)&v21->m_uiRefCount) && v21 )
            v21->vfptr->__vecDelDtor((NiRefObject *)v21, 1u);
          v22 = *v10;
          *v20 = v22;
          if ( v22 )
            InterlockedIncrement((volatile LONG *)&v22->m_uiRefCount);
        }
      }
LABEL_44:
      ++ui;
      v2 = v26;
    }
    while ( ui < v26->m_kTempBlendSeqs.m_uiUsed );
  }
  v23 = v2->m_spObjectPalette.m_pObject;
  if ( v23 )
    v23->vfptr[10].__vecDelDtor((NiRefObject *)v23, (unsigned int)kCloning);
}

//----- (007E3620) --------------------------------------------------------
void __thiscall NiControllerManager::LinkObject(NiControllerManager *this, NiStream *kStream)
{
  NiStream *v2; // ebx@1
  NiControllerManager *v3; // edi@1
  unsigned int v4; // esi@1
  NiObject *v5; // eax@4
  NiD3DShaderConstantMapEntry *v6; // esi@4
  bool v7; // zf@6
  const char *v8; // ebx@7
  unsigned int v9; // kr00_4@8
  char *v10; // eax@8
  unsigned int v11; // ebx@9
  NiVBSet *v12; // eax@9
  NiPointer<NiD3DShaderConstantMapEntry> element; // [sp+Ch] [bp-Ch]@9
  unsigned int v14; // [sp+10h] [bp-8h]@2
  NiControllerManager *v15; // [sp+14h] [bp-4h]@1

  v2 = kStream;
  v3 = this;
  v15 = this;
  NiTimeController::LinkObject((NiTimeController *)&this->vfptr, kStream);
  v4 = NiStream::GetNumberOfLinkIDs(kStream);
  NiTArray<NiPointer<NiScreenElements>>::SetSize(
    (NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *)&v3->m_kSequenceArray,
    v4);
  if ( v4 )
  {
    v14 = v4;
    while ( 1 )
    {
      v5 = NiStream::GetObjectFromLinkID(v2);
      v6 = (NiD3DShaderConstantMapEntry *)v5;
      if ( !v3 || !v5[8].vfptr )
      {
        v7 = v5[11].m_uiRefCount == 0;
        v5[8].vfptr = (NiRefObjectVtbl *)v3;
        if ( v7 )
        {
          v8 = v3->m_pTarget->m_pcName;
          operator delete(0);
          v6[1].m_uiDataStride = 0;
          if ( v8 )
          {
            v9 = strlen(v8);
            v10 = (char *)operator new(v9 + 1);
            v6[1].m_uiDataStride = (unsigned int)v10;
            strcpy_s(v10, v9 + 1, v8);
          }
        }
        element.m_pObject = v6;
        InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
        v11 = (unsigned int)v6->m_pcKey;
        v12 = (NiVBSet *)NiTArray<NiPointer<NiControllerSequence>>::AddFirstEmpty(
                           (NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *)&v15->m_kSequenceArray,
                           &element);
        NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::SetAt(
          (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&v15->m_kIndexMap,
          v11,
          v12);
        if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
        v3 = v15;
      }
      if ( !--v14 )
        break;
      v2 = kStream;
    }
  }
}

//----- (007E3720) --------------------------------------------------------
NiTStringPointerMap<unsigned int> *__thiscall NiTStringPointerMap<unsigned int>::`vector deleting destructor'(NiTStringPointerMap<unsigned int> *this, unsigned int a2)
{
  NiTStringPointerMap<unsigned int> *v2; // esi@1

  v2 = this;
  NiTStringTemplateMap<NiTPointerMap<char const *,unsigned int>,unsigned int>::~NiTStringTemplateMap<NiTPointerMap<char const *,unsigned int>,unsigned int>((NiTStringTemplateMap<NiTPointerMap<char const *,unsigned int>,unsigned int> *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007E3750) --------------------------------------------------------
void __thiscall NiDefaultAVObjectPalette::NiDefaultAVObjectPalette(NiDefaultAVObjectPalette *this, NiAVObject *pkScene)
{
  NiDefaultAVObjectPalette *v2; // esi@1
  char *v3; // eax@1
  unsigned int v4; // ST08_4@1

  v2 = this;
  NiObject::NiObject((NiObject *)&this->vfptr);
  v2->vfptr = (NiRefObjectVtbl *)&NiDefaultAVObjectPalette::`vftable';
  v2->m_kHash.m_uiHashSize = 37;
  v2->m_kHash.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiAVObject *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiAVObject *>::`vftable';
  v2->m_kHash.m_kAllocator.m_uiCount = 0;
  v3 = (char *)operator new(0x94u);
  v4 = 4 * v2->m_kHash.m_uiHashSize;
  v2->m_kHash.m_ppkHashTable = (NiTMapItem<char const *,NiAVObject *> **)v3;
  memset(v3, 0, v4);
  v2->m_kHash.m_bCopy = 1;
  v2->m_kHash.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiAVObject *>Vtbl *)&NiTStringPointerMap<NiAVObject *>::`vftable';
  v2->m_pkScene = pkScene;
}
// 9E5DDC: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiAVObject *>::`vftable')(void *p, char);
// 9E5EF0: using guessed type int (__thiscall *NiTStringPointerMap<NiAVObject *>::`vftable')(void *p, char);
// 9E5F34: using guessed type int (__thiscall *NiDefaultAVObjectPalette::`vftable')(void *p, char);

//----- (007E37C0) --------------------------------------------------------
NiRTTI *NiDefaultAVObjectPalette::GetRTTI()
{
  return &NiDefaultAVObjectPalette::m_RTTI;
}

//----- (007E37D0) --------------------------------------------------------
void __thiscall NSBRequirements::SetBoneCalcMethod(NSBRequirements *this, NiBinaryShader::BoneMatrixCalcMethod eMethod)
{
  this->m_eBoneCalcMethod = eMethod;
}

//----- (007E37E0) --------------------------------------------------------
NiAVObject *__userpurge NiDefaultAVObjectPalette::GetAVObject@<eax>(NiDefaultAVObjectPalette *this@<ecx>, int a2@<edi>, const char *pcName)
{
  NiDefaultAVObjectPalette *v3; // esi@1
  NiAVObject *result; // eax@3
  NiAVObject *v5; // edi@5
  NiAVObject *pkObj; // [sp+8h] [bp-4h]@1

  v3 = this;
  pkObj = 0;
  if ( !pcName )
    goto LABEL_11;
  if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
         (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_kHash,
         (unsigned int)pcName,
         (NiVBSet **)&pkObj) )
  {
    return pkObj;
  }
  if ( v3->m_pkScene )
  {
    v5 = (NiAVObject *)((int (__stdcall *)(const char *, int))v3->m_pkScene->vfptr[18].__vecDelDtor)(pcName, a2);
    if ( v5 )
      ((void (__thiscall *)(NiDefaultAVObjectPalette *, const char *, NiAVObject *))v3->vfptr[16].__vecDelDtor)(
        v3,
        pcName,
        v5);
    result = v5;
  }
  else
  {
LABEL_11:
    result = 0;
  }
  return result;
}

//----- (007E3850) --------------------------------------------------------
void __thiscall NiDefaultAVObjectPalette::SetAVObject(NiDefaultAVObjectPalette *this, const char *pcName, NiAVObject *pkObj)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v3; // ecx@1

  v3 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)&this->m_kHash;
  if ( pkObj )
    NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::SetAt(
      v3,
      (unsigned int)pcName,
      (NiVBSet *)pkObj);
  else
    NiTMapBase<DFALL<NiD3DGlobalConstantEntry *>,char const *,NiD3DGlobalConstantEntry *>::RemoveAt(
      v3,
      (unsigned int)pcName);
}

//----- (007E3880) --------------------------------------------------------
CPostProcessEffect *__thiscall NiDefaultAVObjectPalette::`vector deleting destructor'(NiDefaultAVObjectPalette *this, unsigned int a2)
{
  CPostProcessEffect *v2; // esi@1

  v2 = (CPostProcessEffect *)this;
  this->vfptr = (NiRefObjectVtbl *)&NiDefaultAVObjectPalette::`vftable';
  NiTStringTemplateMap<NiTPointerMap<char const *,NiAVObject *>,NiAVObject *>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiAVObject *>,NiAVObject *>((NiTStringTemplateMap<NiTPointerMap<char const *,NiAVObject *>,NiAVObject *> *)&this->m_kHash.vfptr);
  v2->vfptr = (NiRefObjectVtbl *)&NiAVObjectPalette::`vftable';
  NiRefObject::~NiRefObject(v2);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E5D94: using guessed type int (__thiscall *NiAVObjectPalette::`vftable')(void *p, char);
// 9E5F34: using guessed type int (__thiscall *NiDefaultAVObjectPalette::`vftable')(void *p, char);

//----- (007E38C0) --------------------------------------------------------
void __thiscall NiControllerManager::NiControllerManager(NiControllerManager *this)
{
  NiControllerManager *v1; // esi@1
  char *v2; // eax@1
  unsigned int v3; // ST08_4@1

  v1 = this;
  NiTimeController::NiTimeController((NiTimeController *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&NiControllerManager::`vftable';
  v1->m_kSequenceArray.vfptr = (NiTArray<NiPointer<NiControllerSequence> >Vtbl *)&NiTArray<NiPointer<NiControllerSequence>>::`vftable';
  v1->m_kSequenceArray.m_uiMaxSize = 0;
  v1->m_kSequenceArray.m_uiGrowBy = 1;
  v1->m_kSequenceArray.m_uiSize = 0;
  v1->m_kSequenceArray.m_uiESize = 0;
  v1->m_kSequenceArray.m_pBase = 0;
  v1->m_kIndexMap.m_uiHashSize = 37;
  v1->m_kIndexMap.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int>::`vftable';
  v1->m_kIndexMap.m_kAllocator.m_uiCount = 0;
  v2 = (char *)operator new(0x94u);
  v3 = 4 * v1->m_kIndexMap.m_uiHashSize;
  v1->m_kIndexMap.m_ppkHashTable = (NiTMapItem<char const *,unsigned int> **)v2;
  memset(v2, 0, v3);
  v1->m_kIndexMap.m_bCopy = 1;
  v1->m_kIndexMap.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int>Vtbl *)&NiTStringPointerMap<unsigned int>::`vftable';
  v1->m_bCumulative = 0;
  v1->m_kTempBlendSeqs.m_pBase = 0;
  v1->m_kTempBlendSeqs.m_uiAlloced = 0;
  v1->m_kTempBlendSeqs.m_uiUsed = 0;
  v1->m_spObjectPalette.m_pObject = 0;
}
// 9E5D74: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int>::`vftable')(void *p, char);
// 9E5E7C: using guessed type int (__thiscall *NiTArray<NiPointer<NiControllerSequence>>::`vftable')(void *p, char);
// 9E5E84: using guessed type int (__thiscall *NiControllerManager::`vftable')(void *p, char);
// 9E5F10: using guessed type int (__thiscall *NiTStringPointerMap<unsigned int>::`vftable')(void *p, char);

//----- (007E3950) --------------------------------------------------------
void __thiscall NiControllerManager::NiControllerManager(NiControllerManager *this, NiAVObject *pkTarget, bool bCumulativeAnimations)
{
  NiControllerManager *v3; // esi@1
  char *v4; // eax@1
  unsigned int v5; // ST08_4@1
  NiDefaultAVObjectPalette *v6; // eax@1
  NiAVObjectPalette *v7; // eax@2
  NiAVObjectPalette *v8; // ebx@4
  NiAVObjectPalette *bCumulativeAnimationsa; // [sp+18h] [bp+Ch]@2

  v3 = this;
  NiTimeController::NiTimeController((NiTimeController *)&this->vfptr);
  v3->vfptr = (NiRefObjectVtbl *)&NiControllerManager::`vftable';
  v3->m_kSequenceArray.vfptr = (NiTArray<NiPointer<NiControllerSequence> >Vtbl *)&NiTArray<NiPointer<NiControllerSequence>>::`vftable';
  v3->m_kSequenceArray.m_uiMaxSize = 0;
  v3->m_kSequenceArray.m_uiGrowBy = 1;
  v3->m_kSequenceArray.m_uiSize = 0;
  v3->m_kSequenceArray.m_uiESize = 0;
  v3->m_kSequenceArray.m_pBase = 0;
  v3->m_kIndexMap.m_uiHashSize = 37;
  v3->m_kIndexMap.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int>::`vftable';
  v3->m_kIndexMap.m_kAllocator.m_uiCount = 0;
  v4 = (char *)operator new(0x94u);
  v5 = 4 * v3->m_kIndexMap.m_uiHashSize;
  v3->m_kIndexMap.m_ppkHashTable = (NiTMapItem<char const *,unsigned int> **)v4;
  memset(v4, 0, v5);
  v3->m_kIndexMap.m_bCopy = 1;
  v3->m_kIndexMap.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int>Vtbl *)&NiTStringPointerMap<unsigned int>::`vftable';
  v3->m_bCumulative = bCumulativeAnimations;
  v3->m_kTempBlendSeqs.m_pBase = 0;
  v3->m_kTempBlendSeqs.m_uiAlloced = 0;
  v3->m_kTempBlendSeqs.m_uiUsed = 0;
  v3->m_spObjectPalette.m_pObject = 0;
  NiTimeController::SetTarget((NiTimeController *)&v3->vfptr, (NiObjectNET *)&pkTarget->vfptr);
  v6 = (NiDefaultAVObjectPalette *)operator new(0x20u);
  if ( v6 )
  {
    NiDefaultAVObjectPalette::NiDefaultAVObjectPalette(v6, pkTarget);
    bCumulativeAnimationsa = v7;
  }
  else
  {
    bCumulativeAnimationsa = 0;
    v7 = 0;
  }
  v8 = v3->m_spObjectPalette.m_pObject;
  if ( v8 != v7 )
  {
    if ( v8 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
        v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
      v7 = bCumulativeAnimationsa;
    }
    v3->m_spObjectPalette.m_pObject = v7;
    if ( v7 )
      InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
  }
}
// 9E5D74: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,unsigned int>::`vftable')(void *p, char);
// 9E5E7C: using guessed type int (__thiscall *NiTArray<NiPointer<NiControllerSequence>>::`vftable')(void *p, char);
// 9E5E84: using guessed type int (__thiscall *NiControllerManager::`vftable')(void *p, char);
// 9E5F10: using guessed type int (__thiscall *NiTStringPointerMap<unsigned int>::`vftable')(void *p, char);

//----- (007E3A50) --------------------------------------------------------
NiObject *__thiscall NiControllerManager::CreateClone(NiControllerManager *this, NiCloningProcess *kCloning)
{
  NiControllerManager *v2; // edi@1
  NiControllerManager *v3; // eax@1
  NiControllerManager *v4; // eax@2
  NiObject *v5; // esi@2
  NiObject *result; // eax@2

  v2 = this;
  v3 = (NiControllerManager *)operator new(0x7Cu);
  if ( v3 )
  {
    NiControllerManager::NiControllerManager(v3);
    v5 = (NiObject *)v4;
    NiControllerManager::CopyMembers(v2, v4, kCloning);
    result = v5;
  }
  else
  {
    NiControllerManager::CopyMembers(v2, 0, kCloning);
    result = 0;
  }
  return result;
}

//----- (007E3AA0) --------------------------------------------------------
void __cdecl NiControllerManager::CreateObject()
{
  NiControllerManager *v0; // eax@1

  v0 = (NiControllerManager *)operator new(0x7Cu);
  if ( v0 )
    NiControllerManager::NiControllerManager(v0);
}

//----- (007E3AC0) --------------------------------------------------------
BOOL __cdecl NiAnimationKey::Equal(NiAnimationKey *key0, NiAnimationKey *key1)
{
  return key1->m_fTime == key0->m_fTime;
}

//----- (007E3AF0) --------------------------------------------------------
void __thiscall NiEulerRotKey::Initialize(NiEulerRotKey *this, NiFloatKey *pkX, unsigned int uiNumX, NiAnimationKey::KeyType eTypeX, NiFloatKey *pkY, unsigned int uiNumY, NiAnimationKey::KeyType eTypeY, NiFloatKey *pkZ, unsigned int uiNumZ, NiAnimationKey::KeyType eTypeZ)
{
  NiEulerRotKey *v10; // esi@1
  NiAnimationKey::KeyType *v11; // eax@1
  char *v12; // ecx@1
  signed int v13; // esi@1

  v10 = this;
  NiEulerRotKey::CleanUp(this);
  v10->m_uiNumKeys[0] = uiNumX;
  v11 = v10->m_eType;
  v10->m_eType[0] = eTypeX;
  v10->m_apkKeys[0] = pkX;
  v10->m_apkKeys[1] = pkY;
  v10->m_uiNumKeys[1] = uiNumY;
  v10->m_uiNumKeys[2] = uiNumZ;
  v10->m_eType[1] = eTypeY;
  v10->m_eType[2] = eTypeZ;
  v10->m_apkKeys[2] = pkZ;
  v10->m_uiLastIdx[0] = 0;
  v10->m_uiLastIdx[1] = 0;
  v10->m_uiLastIdx[2] = 0;
  v12 = v10->m_ucSizes;
  v13 = 3;
  do
  {
    if ( *((_DWORD *)v11 - 3) )
      *v12 = (char)(&NiAnimationKey::ms_keysizes)[*v11];
    else
      *v12 = 0;
    ++v11;
    ++v12;
    --v13;
  }
  while ( v13 );
}
// B61900: using guessed type unsigned __int8 *NiAnimationKey::ms_keysizes;

//----- (007E3B70) --------------------------------------------------------
bool __cdecl NiAnimationKey::OkayToInsert(float fTime, NiAnimationKey *pkKeys, unsigned int uiNumKeys, unsigned int *uiInsertAt, char ucSize)
{
  bool result; // al@1
  double v6; // st7@2
  unsigned int v7; // ecx@3
  unsigned int v8; // edx@4

  result = 1;
  *uiInsertAt = 0;
  if ( uiNumKeys )
  {
    v6 = fTime;
    while ( 1 )
    {
      v7 = *uiInsertAt * (unsigned __int8)ucSize;
      if ( *(float *)((char *)&pkKeys->m_fTime + v7) >= v6 )
        break;
      v8 = *uiInsertAt + 1;
      *uiInsertAt = v8;
      if ( v8 >= uiNumKeys )
        return 1;
    }
    if ( *(float *)((char *)&pkKeys->m_fTime + v7) > v6 )
      return 1;
    result = 0;
  }
  return result;
}

//----- (007E3BD0) --------------------------------------------------------
void __cdecl NiAnimationKey::CopySequence(NiAnimationKey::KeyContent eContent, NiAnimationKey::KeyType eType, NiAnimationKey *pkOrigKeys, unsigned int uiOrigNumKeys, float fStartTime, float fEndTime, NiAnimationKey **pkNewKeys, unsigned int *uiNewNumKeys)
{
  unsigned int v8; // ebx@2
  float v9; // ST10_4@3
  NiAnimationKey *v10; // ST0C_4@3
  NiAnimationKey::KeyType v11; // ST08_4@3
  void *v12; // eax@4
  int v13; // esi@5
  NiEulerRotKey **v14; // eax@7
  NiAnimationKey::KeyType z; // ST20_4@7
  unsigned int y; // ST1C_4@7
  NiFloatKey *x; // ST18_4@7
  NiAnimationKey::KeyType w; // ST14_4@7
  unsigned int v19; // ST10_4@7
  NiFloatKey *v20; // ST0C_4@7
  unsigned int v21; // edx@7
  NiAnimationKey::KeyType v22; // ST08_4@7
  NiFloatKey *v23; // ecx@7
  unsigned int v24; // ebx@8
  double v25; // st7@8
  double v26; // st6@8
  char v27; // al@8
  unsigned int v28; // edx@8
  int v29; // ecx@9
  float *v30; // ebx@9
  float *v31; // ecx@25
  int v32; // eax@33
  unsigned int v33; // edx@33
  NiAnimationKey *v34; // ecx@34
  double v35; // st7@34
  NiAnimationKey *v36; // ebx@34
  NiAnimationKey *v37; // esi@37
  NiFloatKey *apkNewFloatKeys[3]; // [sp+1Ch] [bp-40h]@3
  NiAnimationKey *v39; // [sp+28h] [bp-34h]@9
  NiAnimationKey **v40; // [sp+2Ch] [bp-30h]@1
  unsigned int uiKey; // [sp+30h] [bp-2Ch]@8
  void (__cdecl *pfnCopy)(NiAnimationKey *, NiAnimationKey *); // [sp+34h] [bp-28h]@9
  NiAnimationKey *v43; // [sp+38h] [bp-24h]@9
  char ucSize; // [sp+3Fh] [bp-1Dh]@8
  NiAnimationKey::KeyType aeFloatTypes[3]; // [sp+40h] [bp-1Ch]@3
  unsigned int auiNewNumFloatKeys[3]; // [sp+4Ch] [bp-10h]@3

  v40 = pkNewKeys;
  if ( eType == 4 )
  {
    v8 = 0;
    do
    {
      v9 = pkOrigKeys[(unsigned __int8)v8 + 5].m_fTime;
      v10 = (NiAnimationKey *)LODWORD(pkOrigKeys[(unsigned __int8)v8 + 12].m_fTime);
      v11 = LODWORD(pkOrigKeys[(unsigned __int8)v8 + 8].m_fTime);
      aeFloatTypes[v8] = v11;
      NiAnimationKey::CopySequence(
        0,
        v11,
        v10,
        LODWORD(v9),
        fStartTime,
        fEndTime,
        (NiAnimationKey **)&apkNewFloatKeys[v8],
        &auiNewNumFloatKeys[v8]);
      ++v8;
    }
    while ( v8 < 3 );
    v12 = operator new(0x4Cu);
    if ( v12 )
    {
      v13 = (int)v12 + 4;
      *(_DWORD *)v12 = 1;
      NiQuaternion::NiQuaternion((NiQuaternion *)((char *)v12 + 8), 0.0, 0.0, 0.0, 0.0);
      *(_DWORD *)(v13 + 20) = 0;
      *(_DWORD *)(v13 + 24) = 0;
      *(_DWORD *)(v13 + 28) = 0;
      *(_DWORD *)(v13 + 48) = 0;
      *(_DWORD *)(v13 + 52) = 0;
      *(_DWORD *)(v13 + 56) = 0;
      *(_DWORD *)(v13 + 32) = 0;
      *(_DWORD *)(v13 + 36) = 0;
      *(_DWORD *)(v13 + 40) = 0;
      *(_DWORD *)(v13 + 60) = 0;
      *(_DWORD *)(v13 + 64) = 0;
      *(_DWORD *)(v13 + 68) = 0;
      *(_WORD *)(v13 + 44) = 0;
      *(_BYTE *)(v13 + 46) = 0;
    }
    else
    {
      v13 = 0;
    }
    v14 = (NiEulerRotKey **)v40;
    z = aeFloatTypes[2];
    y = auiNewNumFloatKeys[2];
    x = apkNewFloatKeys[2];
    w = aeFloatTypes[1];
    v19 = auiNewNumFloatKeys[1];
    v20 = apkNewFloatKeys[1];
    v21 = auiNewNumFloatKeys[0];
    v22 = aeFloatTypes[0];
    v23 = apkNewFloatKeys[0];
    *v40 = (NiAnimationKey *)v13;
    *uiNewNumKeys = 1;
    NiEulerRotKey::Initialize(*v14, v23, v21, v22, v20, v19, w, x, y, z);
  }
  else
  {
    v24 = uiOrigNumKeys;
    v25 = fEndTime;
    v26 = fStartTime;
    *uiNewNumKeys = 0;
    v27 = (char)(&(&NiAnimationKey::ms_keysizes)[6 * eContent])[eType];
    v28 = 0;
    uiKey = eType + 6 * eContent;
    ucSize = v27;
    if ( (signed int)uiOrigNumKeys >= 4 )
    {
      v43 = (NiAnimationKey *)((char *)pkOrigKeys + 2 * (unsigned __int8)v27 + (unsigned __int8)v27);
      pfnCopy = (void (__cdecl *)(NiAnimationKey *, NiAnimationKey *))((char *)pkOrigKeys + 2 * (unsigned __int8)v27);
      v29 = 4 * (unsigned __int8)v27;
      v39 = pkOrigKeys;
      v30 = (float *)((char *)&pkOrigKeys->m_fTime + (unsigned __int8)v27);
      while ( 1 )
      {
        if ( v39->m_fTime >= v26 )
        {
          if ( v39->m_fTime > v25 )
            goto LABEL_31;
          ++*uiNewNumKeys;
        }
        if ( *v30 >= v26 )
        {
          if ( *v30 > v25 )
            goto LABEL_31;
          ++*uiNewNumKeys;
        }
        if ( *(float *)pfnCopy >= v26 )
        {
          if ( *(float *)pfnCopy > v25 )
            goto LABEL_31;
          ++*uiNewNumKeys;
        }
        if ( v43->m_fTime >= v26 )
        {
          if ( v43->m_fTime > v25 )
          {
LABEL_31:
            v24 = uiOrigNumKeys;
            goto LABEL_32;
          }
          ++*uiNewNumKeys;
        }
        v39 = (NiAnimationKey *)((char *)v39 + v29);
        pfnCopy = (void (__cdecl *)(NiAnimationKey *, NiAnimationKey *))((char *)pfnCopy + v29);
        v43 = (NiAnimationKey *)((char *)v43 + v29);
        v28 += 4;
        v30 = (float *)((char *)v30 + v29);
        if ( v28 >= uiOrigNumKeys - 3 )
        {
          v24 = uiOrigNumKeys;
          v27 = ucSize;
          break;
        }
      }
    }
    if ( v28 < v24 )
    {
      v43 = (NiAnimationKey *)(unsigned __int8)v27;
      v31 = (float *)((char *)&pkOrigKeys->m_fTime + v28 * (unsigned __int8)v27);
      do
      {
        if ( *v31 >= v26 )
        {
          if ( *v31 > v25 )
            break;
          ++*uiNewNumKeys;
        }
        v31 = (float *)((int)v31 + (_DWORD)v43);
        ++v28;
      }
      while ( v28 < v24 );
    }
LABEL_32:
    if ( *uiNewNumKeys )
    {
      v32 = ((int (__cdecl *)(unsigned int))(&NiAnimationKey::ms_arrays)[uiKey])(*uiNewNumKeys);
      v33 = uiKey;
      *v40 = (NiAnimationKey *)v32;
      pfnCopy = (void (__cdecl *)(NiAnimationKey *, NiAnimationKey *))(&NiAnimationKey::ms_copies)[v33];
      uiKey = 0;
      *uiNewNumKeys = 0;
      if ( v24 )
      {
        v34 = (NiAnimationKey *)(unsigned __int8)ucSize;
        v35 = fStartTime;
        v43 = (NiAnimationKey *)(unsigned __int8)ucSize;
        v36 = pkOrigKeys;
        do
        {
          if ( v36->m_fTime >= v35 )
          {
            if ( fEndTime < (double)v36->m_fTime )
              return;
            v37 = (NiAnimationKey *)((char *)*v40 + (_DWORD)v34 * *uiNewNumKeys);
            pfnCopy(v37, v36);
            v34 = v43;
            v35 = fStartTime;
            v37->m_fTime = v36->m_fTime - fStartTime;
            ++*uiNewNumKeys;
          }
          v36 = (NiAnimationKey *)((char *)v36 + (_DWORD)v34);
          ++uiKey;
        }
        while ( uiKey < uiOrigNumKeys );
      }
    }
    else
    {
      *v40 = 0;
    }
  }
}
// B61900: using guessed type unsigned __int8 *NiAnimationKey::ms_keysizes;
// B61AD8: using guessed type struct NiAnimationKey *(__cdecl static **NiAnimationKey::ms_arrays)(unsigned int);
// B61B68: using guessed type void (__cdecl static **NiAnimationKey::ms_copies)(struct NiAnimationKey *, const struct NiAnimationKey *);

//----- (007E3ED0) --------------------------------------------------------
void __cdecl NiAnimationKey::GuaranteeKeyAtStartAndEnd(NiAnimationKey::KeyContent eContent, NiAnimationKey::KeyType eType, NiAnimationKey **pkKeys, unsigned int *uiNumKeys, float fStartTime, float fEndTime)
{
  NiAnimationKey *v6; // edi@2
  unsigned int v7; // ecx@2
  int v8; // esi@3
  NiAnimationKey::KeyType v9; // eax@3
  NiAnimationKey::KeyType v10; // ebx@3
  unsigned int *v11; // edi@7
  NiAnimationKey **v12; // ebx@7
  bool (__cdecl static **v13)(float, struct NiAnimationKey **, unsigned int *); // esi@7
  unsigned int i; // [sp+18h] [bp-8h]@2
  NiAnimationKey *pkERKeys; // [sp+1Ch] [bp-4h]@3

  if ( eType == 4 )
  {
    v6 = *pkKeys;
    v7 = 0;
    i = 0;
    do
    {
      v8 = (unsigned __int8)v7;
      v9 = LODWORD(v6[(unsigned __int8)v7 + 5].m_fTime);
      v10 = LODWORD(v6[(unsigned __int8)v7 + 8].m_fTime);
      pkERKeys = (NiAnimationKey *)LODWORD(v6[(unsigned __int8)v7 + 12].m_fTime);
      eType = v9;
      if ( v9 )
      {
        NiAnimationKey::GuaranteeKeyAtStartAndEnd(0, v10, &pkERKeys, (unsigned int *)&eType, fStartTime, fEndTime);
        v9 = eType;
        v7 = i;
      }
      LODWORD(v6[v8 + 12].m_fTime) = pkERKeys;
      LODWORD(v6[v8 + 5].m_fTime) = v9;
      LODWORD(v6[v8 + 8].m_fTime) = v10;
      LODWORD(v6[v8 + 15].m_fTime) = 0;
      ++v7;
      *((_BYTE *)&v6[11].m_fTime + v8) = (&NiAnimationKey::ms_keysizes)[v10];
      i = v7;
    }
    while ( v7 < 3 );
  }
  else
  {
    v11 = uiNumKeys;
    v12 = pkKeys;
    v13 = (&NiAnimationKey::ms_inserts)[eType + 6 * eContent];
    if ( *uiNumKeys != 1 || fStartTime != (*pkKeys)->m_fTime )
    {
      ((void (__cdecl *)(_DWORD, NiAnimationKey **, unsigned int *))v13)(LODWORD(fStartTime), pkKeys, uiNumKeys);
      ((void (__cdecl *)(_DWORD, NiAnimationKey **, unsigned int *))v13)(LODWORD(fEndTime), v12, v11);
    }
  }
}
// B61900: using guessed type unsigned __int8 *NiAnimationKey::ms_keysizes;
// B619B8: using guessed type bool (__cdecl static **NiAnimationKey::ms_inserts)(float, struct NiAnimationKey **, unsigned int *);

//----- (007E3FC0) --------------------------------------------------------
void __thiscall NiAnimationKey::LoadBinary(NiAnimationKey *this, NiStream *stream)
{
  NiBinaryStream *v2; // eax@1
  NiBinaryStream *v3; // ST00_4@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1

  v2 = stream->m_pkIstr;
  v3 = v2;
  v4 = v2->m_pfnRead;
  stream = (NiStream *)4;
  v4(v3, this, 4u, (unsigned int *)&stream, 1u);
}

//----- (007E3FF0) --------------------------------------------------------
void __cdecl NiAnimationKey::SaveBinary(NiStream *kStream, const int *value)
{
  NiBinaryStream *v2; // eax@1
  NiBinaryStream *v3; // ST00_4@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1

  v2 = kStream->m_pkOstr;
  v3 = v2;
  v4 = v2->m_pfnWrite;
  kStream = (NiStream *)4;
  v4(v3, value, 4u, (unsigned int *)&kStream, 1u);
}

//----- (007E4020) --------------------------------------------------------
double __cdecl NiInterpScalar::Linear(float fTime, float fP, float fQ)
{
  return (float)(fTime * fQ + (1.0 - fTime) * fP);
}

//----- (007E4040) --------------------------------------------------------
double __cdecl NiInterpScalar::TCB(float fTime, float fP, float fPDD, float fQ, float fQDS)
{
  double v5; // st7@1
  double v6; // st4@1
  float fQa; // [sp+14h] [bp+14h]@1
  float fQb; // [sp+14h] [bp+14h]@1

  v5 = fQ - fP;
  fQa = fPDD + fQDS - v5 * 2.0;
  v6 = fQa * fTime;
  fQb = v5 * 3.0 - (fQDS + 2.0 * fPDD);
  return (float)(fTime * (fPDD + (v6 + fQb) * fTime) + fP);
}

//----- (007E40A0) --------------------------------------------------------
void __cdecl NiInterpScalar::AdjustBezier(float fLastValue, float fLastTime, float *fLastOut, float fNextValue, float fNextTime, float *fNextIn, float fNewTime, float fNewValue, float *fNewIn, float *fNewOut)
{
  float fOldDeltaX; // ST04_4@1
  double v11; // st7@1
  double v12; // st5@1
  double v13; // st6@1
  double v14; // st1@1
  double v15; // st3@1
  float fOldDeltaT; // [sp+Ch] [bp+8h]@1
  float fOldDeltaTa; // [sp+Ch] [bp+8h]@1
  float fOldDeltaTb; // [sp+Ch] [bp+8h]@1
  float fNewDeltaTA; // [sp+18h] [bp+14h]@1
  float fNewDeltaTAa; // [sp+18h] [bp+14h]@1
  float fNewDeltaTAb; // [sp+18h] [bp+14h]@1
  float fNewDeltaTB; // [sp+1Ch] [bp+18h]@1

  fOldDeltaX = fNextValue - fLastValue;
  fOldDeltaT = fNextTime - fLastTime;
  fNewDeltaTA = fNewTime - fLastTime;
  fNewDeltaTB = fNextTime - fNewTime;
  v11 = fNewDeltaTA;
  v12 = fNewDeltaTA / fOldDeltaT;
  v13 = fOldDeltaT;
  fNewDeltaTAa = v12;
  fOldDeltaTa = *fLastOut - fOldDeltaX * 2.0 + *fNextIn;
  v14 = *fNextIn;
  v15 = fOldDeltaTa * 3.0 * fNewDeltaTAa;
  fOldDeltaTb = fOldDeltaX * 3.0 - *fLastOut * 2.0 - v14;
  fNewDeltaTAb = ((2.0 * fOldDeltaTb + v15) * fNewDeltaTAa + *fLastOut) / v13;
  *fNewIn = fNewDeltaTAb;
  *fNewOut = fNewDeltaTAb * fNewDeltaTB;
  *fNewIn = v11 * *fNewIn;
  *fLastOut = v12 * *fLastOut;
  *fNextIn = fNewDeltaTB / v13 * v14;
}

//----- (007E4170) --------------------------------------------------------
NiRTTI *NiFloatData::GetRTTI()
{
  return &NiFloatData::m_RTTI;
}

//----- (007E4180) --------------------------------------------------------
NiFloatData *__thiscall NiFloatData::`vector deleting destructor'(NiFloatData *this, unsigned int a2)
{
  NiFloatData *v2; // esi@1

  v2 = this;
  NiFloatData::~NiFloatData(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007E41B0) --------------------------------------------------------
NiRTTI *NiPosData::GetRTTI()
{
  return &NiPosData::m_RTTI;
}

//----- (007E41C0) --------------------------------------------------------
NiPosData *__thiscall NiPosData::`scalar deleting destructor'(NiPosData *this, unsigned int a2)
{
  NiPosData *v2; // esi@1

  v2 = this;
  NiPosData::~NiPosData(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007E41F0) --------------------------------------------------------
void __thiscall NiFloatInterpolator::SetKeys(NiFloatInterpolator *this, NiFloatKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType)
{
  NiFloatInterpolator *v4; // ebx@1
  NiObject *v5; // eax@3
  NiObject *v6; // esi@3
  NiFloatData *v7; // edi@6
  NiFloatData *v8; // ebx@14

  v4 = this;
  if ( uiNumKeys )
  {
    if ( !this->m_spFloatData.m_pObject )
    {
      v5 = (NiObject *)operator new(0x18u);
      v6 = v5;
      if ( v5 )
      {
        NiObject::NiObject(v5);
        v6->vfptr = (NiRefObjectVtbl *)&NiFloatData::`vftable';
        v6[1].vfptr = 0;
        v6[1].m_uiRefCount = 0;
        v6[2].vfptr = 0;
        LOBYTE(v6[2].m_uiRefCount) = 0;
      }
      else
      {
        v6 = 0;
      }
      v7 = v4->m_spFloatData.m_pObject;
      if ( (NiObject *)v7 != v6 )
      {
        if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
        v4->m_spFloatData.m_pObject = (NiFloatData *)v6;
        if ( v6 )
          InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
      }
    }
    NiFloatData::SetAnim(v4->m_spFloatData.m_pObject, pkKeys, uiNumKeys, eType);
    v4->m_uiLastIdx = 0;
  }
  else
  {
    v8 = this->m_spFloatData.m_pObject;
    if ( v8 )
      NiFloatData::SetAnim(v8, 0, 0, 0);
  }
}
// 9E5F84: using guessed type int (__thiscall *NiFloatData::`vftable')(void *p, char);

//----- (007E42B0) --------------------------------------------------------
void __thiscall NiLookAtInterpolator::SetTranslateInterpolator(NiLookAtInterpolator *this, NiInterpolator *pkInterp)
{
  NiLookAtInterpolator *v2; // edi@1
  NiInterpolator *v3; // esi@1

  v2 = this;
  v3 = this->m_aspInterpolators[0].m_pObject;
  if ( pkInterp )
  {
    if ( v3 != pkInterp )
    {
      if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
      v2->m_aspInterpolators[0].m_pObject = pkInterp;
      InterlockedIncrement((volatile LONG *)&pkInterp->m_uiRefCount);
    }
  }
  else if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_aspInterpolators[0].m_pObject = 0;
  }
}

//----- (007E4330) --------------------------------------------------------
void __thiscall NiLookAtInterpolator::SetRollInterpolator(NiLookAtInterpolator *this, NiInterpolator *pkInterp)
{
  NiLookAtInterpolator *v2; // edi@1
  NiInterpolator *v3; // esi@1

  v2 = this;
  v3 = this->m_aspInterpolators[1].m_pObject;
  if ( pkInterp )
  {
    if ( v3 != pkInterp )
    {
      if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
      v2->m_aspInterpolators[1].m_pObject = pkInterp;
      InterlockedIncrement((volatile LONG *)&pkInterp->m_uiRefCount);
    }
  }
  else if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_aspInterpolators[1].m_pObject = 0;
  }
}

//----- (007E43B0) --------------------------------------------------------
void __thiscall NiLookAtInterpolator::SetScaleInterpolator(NiLookAtInterpolator *this, NiInterpolator *pkInterp)
{
  NiLookAtInterpolator *v2; // edi@1
  NiInterpolator *v3; // esi@1

  v2 = this;
  v3 = this->m_aspInterpolators[2].m_pObject;
  if ( pkInterp )
  {
    if ( v3 != pkInterp )
    {
      if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
      {
        if ( v3 )
          v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
      }
      v2->m_aspInterpolators[2].m_pObject = pkInterp;
      InterlockedIncrement((volatile LONG *)&pkInterp->m_uiRefCount);
    }
  }
  else if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_aspInterpolators[2].m_pObject = 0;
  }
}

//----- (007E4430) --------------------------------------------------------
void __thiscall NiPoint3Interpolator::SetKeys(NiPoint3Interpolator *this, NiPosKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType)
{
  NiPoint3Interpolator *v4; // ebx@1
  NiObject *v5; // eax@3
  NiObject *v6; // esi@3
  NiPosData *v7; // edi@6
  NiPosData *v8; // ebx@14

  v4 = this;
  if ( uiNumKeys )
  {
    if ( !this->m_spPoint3Data.m_pObject )
    {
      v5 = (NiObject *)operator new(0x18u);
      v6 = v5;
      if ( v5 )
      {
        NiObject::NiObject(v5);
        v6->vfptr = (NiRefObjectVtbl *)&NiPosData::`vftable';
        v6[1].vfptr = 0;
        v6[1].m_uiRefCount = 0;
        v6[2].vfptr = 0;
        LOBYTE(v6[2].m_uiRefCount) = 0;
      }
      else
      {
        v6 = 0;
      }
      v7 = v4->m_spPoint3Data.m_pObject;
      if ( (NiObject *)v7 != v6 )
      {
        if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
        v4->m_spPoint3Data.m_pObject = (NiPosData *)v6;
        if ( v6 )
          InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
      }
    }
    NiPosData::SetAnim(v4->m_spPoint3Data.m_pObject, pkKeys, uiNumKeys, eType);
    v4->m_uiLastIdx = 0;
  }
  else
  {
    v8 = this->m_spPoint3Data.m_pObject;
    if ( v8 )
      NiPosData::SetAnim(v8, 0, 0, 0);
  }
}
// 9E5FC4: using guessed type int (__thiscall *NiPosData::`vftable')(void *p, char);

//----- (007E44F0) --------------------------------------------------------
NiPosKey *__thiscall NiTransformInterpolator::GetPosData(NiTransformInterpolator *this, unsigned int *uiNumKeys, NiAnimationKey::KeyType *eType, char *ucSize)
{
  NiTransformData *v4; // eax@1
  NiPosKey *result; // eax@2

  v4 = this->m_spData.m_pObject;
  if ( v4 )
  {
    *uiNumKeys = v4->m_uiNumPosKeys;
    *eType = v4->m_ePosType;
    *ucSize = v4->m_ucPosSize;
    result = v4->m_pkPosKeys;
  }
  else
  {
    *uiNumKeys = 0;
    *eType = 0;
    *ucSize = 0;
    result = 0;
  }
  return result;
}

//----- (007E4540) --------------------------------------------------------
NiFloatKey *__thiscall NiTransformInterpolator::GetScaleData(NiTransformInterpolator *this, unsigned int *uiNumKeys, NiAnimationKey::KeyType *eType, char *ucSize)
{
  NiTransformData *v4; // eax@1
  NiFloatKey *result; // eax@2

  v4 = this->m_spData.m_pObject;
  if ( v4 )
  {
    *uiNumKeys = v4->m_uiNumScaleKeys;
    *eType = v4->m_eScaleType;
    *ucSize = v4->m_ucScaleSize;
    result = v4->m_pkScaleKeys;
  }
  else
  {
    *uiNumKeys = 0;
    *eType = 0;
    *ucSize = 0;
    result = 0;
  }
  return result;
}

//----- (007E4590) --------------------------------------------------------
void __cdecl NiOldAnimationConverter::SynchronizeTimeControllers(NiTimeController *pkSrc, NiTimeController *pkDest)
{
  int v2; // edx@1
  unsigned __int16 v3; // cx@1
  unsigned __int16 v4; // cx@2
  unsigned __int16 v5; // cx@4
  unsigned __int16 v6; // cx@5

  v2 = pkSrc->m_uFlags & 1;
  v3 = pkSrc->m_uFlags & 1 | pkDest->m_uFlags & 0xFFFE;
  pkDest->m_uFlags = v3;
  if ( v2 )
    v4 = v3 & 0xFFF7;
  else
    v4 = v3 | 8;
  pkDest->m_uFlags = v4;
  pkDest->m_uFlags ^= (pkSrc->m_uFlags ^ v4) & 6;
  v5 = pkDest->m_uFlags;
  if ( (LOBYTE(pkSrc->m_uFlags) >> 4) & 1 )
    v6 = v5 | 0x10;
  else
    v6 = v5 & 0xFFEF;
  pkDest->m_uFlags = v6;
  pkDest->m_fFrequency = pkSrc->m_fFrequency;
  pkDest->m_fLoKeyTime = pkSrc->m_fLoKeyTime;
  pkDest->m_fHiKeyTime = pkSrc->m_fHiKeyTime;
  if ( (LOBYTE(pkSrc->m_uFlags) >> 3) & 1 )
    pkDest->m_uFlags |= 8u;
  else
    pkDest->m_uFlags &= 0xFFF7u;
}

//----- (007E4630) --------------------------------------------------------
void __cdecl NiOldAnimationConverter::ConvertLookAtController(NiLookAtController *pkController)
{
  NiTransformController *v1; // ebx@1
  NiLookAtInterpolator *v2; // esi@1
  int v3; // eax@2
  NiRTTI *v4; // eax@3
  NiTransformController *v5; // eax@6
  NiTransformController *v6; // eax@7
  NiLookAtInterpolator *v7; // eax@10
  NiLookAtInterpolator *v8; // eax@11
  int v9; // eax@15
  NiTransformInterpolator *v10; // edi@15
  NiRTTI *v11; // eax@16
  NiTransformData *v12; // eax@20
  NiPoint3Interpolator *v13; // eax@22
  NiPoint3Interpolator *v14; // eax@23
  NiPoint3Interpolator *v15; // ebx@23
  NiPosKey *v16; // eax@25
  NiTransformData *v17; // eax@26
  NiFloatInterpolator *v18; // eax@28
  NiFloatInterpolator *v19; // eax@29
  NiFloatInterpolator *v20; // ebx@29
  NiFloatKey *v21; // eax@31
  NiObjectNET *v22; // esi@32
  unsigned int uiNumKeys; // [sp+Ch] [bp-14h]@25
  NiAnimationKey::KeyType eType; // [sp+10h] [bp-10h]@25
  NiObjectNET *pkTarget; // [sp+14h] [bp-Ch]@1
  NiTransformController *pkTransformController; // [sp+18h] [bp-8h]@1
  char ucSize; // [sp+1Eh] [bp-2h]@25
  bool bSetOnTarget; // [sp+1Fh] [bp-1h]@1

  pkTarget = pkController->m_pTarget;
  bSetOnTarget = 0;
  v1 = (NiTransformController *)NiObjectNET::GetController(pkTarget, &NiTransformController::m_RTTI);
  v2 = 0;
  pkTransformController = v1;
  if ( v1
    && (v3 = (int)v1->vfptr[28].__vecDelDtor((NiRefObject *)v1, 0)) != 0
    && (v4 = (NiRTTI *)(*(int (__thiscall **)(_DWORD))(*(_DWORD *)v3 + 4))(v3)) != 0 )
  {
    while ( v4 != &NiTransformInterpolator::m_RTTI )
    {
      v4 = v4->m_pkBaseRTTI;
      if ( !v4 )
        goto LABEL_6;
    }
  }
  else
  {
LABEL_6:
    bSetOnTarget = 1;
    v5 = (NiTransformController *)operator new(0x40u);
    if ( v5 )
    {
      NiTransformController::NiTransformController(v5);
      pkTransformController = v6;
    }
    else
    {
      pkTransformController = 0;
    }
    NiOldAnimationConverter::SynchronizeTimeControllers(
      (NiTimeController *)&pkController->vfptr,
      (NiTimeController *)&pkTransformController->vfptr);
    v1 = pkTransformController;
  }
  v7 = (NiLookAtInterpolator *)operator new(0x44u);
  if ( v7 )
  {
    NiLookAtInterpolator::NiLookAtInterpolator(v7, 0, 0, 0);
    v2 = v8;
  }
  v2->m_pkLookAt = pkController->m_pkLookAt;
  NiLookAtInterpolator::SetLookAtName(v2, 0);
  if ( pkController->m_uFlags & 1 )
    v2->m_uFlags |= 1u;
  else
    v2->m_uFlags &= 0xFFFEu;
  v2->m_uFlags ^= (pkController->m_uFlags ^ v2->m_uFlags) & 6;
  v9 = (int)v1->vfptr[28].__vecDelDtor((NiRefObject *)v1, 0);
  v10 = (NiTransformInterpolator *)v9;
  if ( v9 )
  {
    InterlockedIncrement((volatile LONG *)(v9 + 4));
    v11 = (NiRTTI *)((int (__thiscall *)(_DWORD))v10->vfptr[1].__vecDelDtor)(v10);
    if ( v11 )
    {
      while ( v11 != &NiTransformInterpolator::m_RTTI )
      {
        v11 = v11->m_pkBaseRTTI;
        if ( !v11 )
          goto LABEL_32;
      }
      v12 = v10->m_spData.m_pObject;
      if ( v12 && v12->m_uiNumPosKeys )
      {
        v13 = (NiPoint3Interpolator *)operator new(0x20u);
        if ( v13 )
        {
          NiPoint3Interpolator::NiPoint3Interpolator(v13, 0);
          v15 = v14;
        }
        else
        {
          v15 = 0;
        }
        v16 = NiTransformInterpolator::GetPosData(v10, &uiNumKeys, &eType, &ucSize);
        NiPoint3Interpolator::SetKeys(v15, v16, uiNumKeys, eType);
        NiTransformData::SetPosAnim(v10->m_spData.m_pObject, 0, 0, 0);
        NiLookAtInterpolator::SetTranslateInterpolator(v2, (NiInterpolator *)&v15->vfptr);
        v1 = pkTransformController;
      }
      v17 = v10->m_spData.m_pObject;
      if ( v17 && v17->m_uiNumScaleKeys )
      {
        v18 = (NiFloatInterpolator *)operator new(0x18u);
        if ( v18 )
        {
          NiFloatInterpolator::NiFloatInterpolator(v18, 0);
          v20 = v19;
        }
        else
        {
          v20 = 0;
        }
        v21 = NiTransformInterpolator::GetScaleData(
                v10,
                (unsigned int *)&eType,
                (NiAnimationKey::KeyType *)&uiNumKeys,
                &ucSize);
        NiFloatInterpolator::SetKeys(v20, v21, eType, (NiAnimationKey::KeyType)uiNumKeys);
        NiTransformData::SetScaleAnim(v10->m_spData.m_pObject, 0, 0, 0);
        NiLookAtInterpolator::SetScaleInterpolator(v2, (NiInterpolator *)&v20->vfptr);
        v1 = pkTransformController;
      }
    }
  }
LABEL_32:
  ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v1->vfptr[29].__vecDelDtor)(v1, v2, 0);
  ((void (__thiscall *)(_DWORD))v2->vfptr[27].__vecDelDtor)(v2);
  v22 = pkTarget;
  if ( bSetOnTarget )
    v1->vfptr[18].__vecDelDtor((NiRefObject *)v1, (unsigned int)pkTarget);
  if ( v22 )
    NiObjectNET::RemoveController(v22, (NiTimeController *)&pkController->vfptr);
  if ( v10 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) )
      v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
  }
}

//----- (007E4870) --------------------------------------------------------
void __cdecl NiOldAnimationConverter::ConvertRollController(NiRollController *pkController)
{
  NiRollController *v1; // ebx@1
  NiTimeController *v2; // edi@1
  NiRTTI *v3; // eax@2
  NiLookAtInterpolator *v4; // esi@6
  NiRTTI *v5; // eax@7
  NiFloatData *v6; // ebx@12
  NiFloatInterpolator *v7; // eax@12
  NiInterpolator *v8; // eax@13
  NiObjectNET *pkTarget; // [sp+20h] [bp-Ch]@1
  float fStart; // [sp+24h] [bp-8h]@15
  float fEnd; // [sp+28h] [bp-4h]@15

  v1 = pkController;
  v2 = pkController->m_pTarget->m_spControllers.m_pObject;
  pkTarget = pkController->m_pTarget;
  if ( v2 )
  {
    while ( 1 )
    {
      v3 = (NiRTTI *)((int (__thiscall *)(_DWORD))v2->vfptr[1].__vecDelDtor)(v2);
      if ( v3 )
      {
        while ( v3 != &NiTransformController::m_RTTI )
        {
          v3 = v3->m_pkBaseRTTI;
          if ( !v3 )
            goto LABEL_10;
        }
        v4 = (NiLookAtInterpolator *)v2->vfptr[28].__vecDelDtor((NiRefObject *)v2, 0);
        if ( v4 )
        {
          v5 = (NiRTTI *)((int (__thiscall *)(_DWORD))v4->vfptr[1].__vecDelDtor)(v4);
          if ( v5 )
            break;
        }
      }
LABEL_10:
      v2 = v2->m_spNext.m_pObject;
      if ( !v2 )
      {
        NiObjectNET::RemoveController(pkTarget, (NiTimeController *)&pkController->vfptr);
        return;
      }
    }
    while ( v5 != &NiLookAtInterpolator::m_RTTI )
    {
      v5 = v5->m_pkBaseRTTI;
      if ( !v5 )
        goto LABEL_10;
    }
    v6 = pkController->m_spFloatData.m_pObject;
    v7 = (NiFloatInterpolator *)operator new(0x18u);
    if ( v7 )
      NiFloatInterpolator::NiFloatInterpolator(v7, v6);
    else
      v8 = 0;
    NiLookAtInterpolator::SetRollInterpolator(v4, v8);
    NiOldAnimationConverter::SynchronizeTimeControllers((NiTimeController *)&pkController->vfptr, v2);
    ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v4->vfptr[28].__vecDelDtor)(v4, &fStart, &fEnd);
    ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v4->vfptr[29].__vecDelDtor)(v4, LODWORD(fStart), LODWORD(fEnd));
    ((void (__thiscall *)(_DWORD))v2->vfptr[30].__vecDelDtor)(v2);
    ((void (__thiscall *)(_DWORD))v4->vfptr[27].__vecDelDtor)(v4);
    v1 = pkController;
  }
  NiObjectNET::RemoveController(pkTarget, (NiTimeController *)&v1->vfptr);
}

//----- (007E4980) --------------------------------------------------------
void __cdecl NiOldAnimationConverter::ConvertPathController(NiPathController *pkController)
{
  NiPathController *v1; // edi@1
  NiTimeController *v2; // esi@1
  NiPathInterpolator *v3; // eax@3
  int v4; // eax@4
  int v5; // ebx@4
  NiTransformController *v6; // eax@27
  NiPathController *v7; // eax@28
  NiPathController *v8; // eax@37
  NiTimeController *v9; // ecx@37
  NiPathController *v10; // eax@45
  NiTimeController *v11; // [sp+8h] [bp-8h]@37
  NiObjectNET *pkTarget; // [sp+Ch] [bp-4h]@1
  NiPathController *pkControllera; // [sp+18h] [bp+8h]@28
  NiPathController *pkControllerb; // [sp+18h] [bp+8h]@37
  NiPathController *pkControllerc; // [sp+18h] [bp+8h]@45

  v1 = pkController;
  pkTarget = pkController->m_pTarget;
  v2 = NiObjectNET::GetController(pkTarget, &NiTransformController::m_RTTI);
  if ( v2 )
    InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
  v3 = (NiPathInterpolator *)operator new(0x5Cu);
  if ( v3 )
  {
    NiPathInterpolator::NiPathInterpolator(
      v3,
      pkController->m_spPathData.m_pObject,
      pkController->m_spPctData.m_pObject);
    v5 = v4;
  }
  else
  {
    v5 = 0;
  }
  if ( (LOBYTE(pkController->m_uFlags) >> 2) & 1 )
    *(_WORD *)(v5 + 12) |= 4u;
  else
    *(_WORD *)(v5 + 12) &= 0xFFFBu;
  if ( (LOBYTE(pkController->m_uFlags) >> 3) & 1 )
    *(_WORD *)(v5 + 12) |= 8u;
  else
    *(_WORD *)(v5 + 12) &= 0xFFF7u;
  *(_DWORD *)(v5 + 56) = pkController->m_eBankDir;
  if ( (LOBYTE(pkController->m_uFlags) >> 4) & 1 )
  {
    *(_WORD *)(v5 + 12) |= 0x10u;
    NiPathInterpolator::SetConstantVelocityData((NiPathInterpolator *)v5);
  }
  else
  {
    *(_WORD *)(v5 + 12) &= 0xFFEFu;
  }
  if ( (LOBYTE(pkController->m_uFlags) >> 5) & 1 )
    *(_WORD *)(v5 + 12) |= 0x20u;
  else
    *(_WORD *)(v5 + 12) &= 0xFFDFu;
  *(float *)(v5 + 40) = pkController->m_fMaxBankAngle;
  *(float *)(v5 + 44) = pkController->m_fSmoothing;
  *(_WORD *)(v5 + 48) = pkController->m_sFollowAxis;
  if ( (LOBYTE(pkController->m_uFlags) >> 6) & 1 )
    *(_WORD *)(v5 + 12) |= 0x40u;
  else
    *(_WORD *)(v5 + 12) &= 0xFFBFu;
  if ( (LOBYTE(pkController->m_uFlags) >> 1) & 1 )
    *(_WORD *)(v5 + 12) |= 2u;
  else
    *(_WORD *)(v5 + 12) &= 0xFFFDu;
  if ( !v2 || (int)v2->vfptr[28].__vecDelDtor((NiRefObject *)v2, 0) )
  {
    v6 = (NiTransformController *)operator new(0x40u);
    if ( v6 )
    {
      NiTransformController::NiTransformController(v6);
      pkControllera = v7;
    }
    else
    {
      pkControllera = 0;
      v7 = 0;
    }
    if ( (NiPathController *)v2 != v7 )
    {
      if ( v2 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
          v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
        v7 = pkControllera;
      }
      v2 = (NiTimeController *)v7;
      if ( v7 )
        InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
    }
    ((void (__thiscall *)(NiTimeController *, int, _DWORD))v2->vfptr[29].__vecDelDtor)(v2, v5, 0);
    v2->vfptr[18].__vecDelDtor((NiRefObject *)v2, (unsigned int)pkTarget);
    NiOldAnimationConverter::SynchronizeTimeControllers((NiTimeController *)&v1->vfptr, v2);
    RewardInvItem::SetItem(pkTarget, v2->m_spNext.m_pObject);
    v8 = (NiPathController *)v1->m_spNext.m_pObject;
    v9 = v2->m_spNext.m_pObject;
    pkControllerb = v8;
    v11 = v9;
    if ( (NiPathController *)v9 != v8 )
    {
      if ( v9 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v11 )
          ((void (__stdcall *)(signed int))v11->vfptr->__vecDelDtor)(1);
        v8 = pkControllerb;
      }
      v2->m_spNext.m_pObject = (NiTimeController *)v8;
      if ( v8 )
        InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
    }
    v10 = (NiPathController *)v1->m_spNext.m_pObject;
    pkControllerc = v10;
    if ( (NiTimeController *)v10 != v2 )
    {
      if ( v10 && !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && pkControllerc )
        ((void (__stdcall *)(signed int))pkControllerc->vfptr->__vecDelDtor)(1);
      v1->m_spNext.m_pObject = v2;
      InterlockedIncrement((volatile LONG *)&v2->m_uiRefCount);
    }
  }
  else
  {
    ((void (__thiscall *)(NiTimeController *, int, _DWORD))v2->vfptr[29].__vecDelDtor)(v2, v5, 0);
    NiOldAnimationConverter::SynchronizeTimeControllers((NiTimeController *)&pkController->vfptr, v2);
  }
  (*(void (__thiscall **)(int))(*(_DWORD *)v5 + 108))(v5);
  if ( pkTarget )
    NiObjectNET::RemoveController(pkTarget, (NiTimeController *)&v1->vfptr);
  if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
    v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
}

//----- (007E4C00) --------------------------------------------------------
void __cdecl NiOldAnimationConverter::RecurseScene(NiStream *kStream, NiObjectNET *pkObject)
{
  NiRTTI *v2; // eax@2
  NiRollController *v3; // esi@6
  NiRollController *v4; // edi@7
  NiRTTI *v5; // eax@7
  NiRTTI *v6; // eax@10
  NiRTTI *v7; // eax@13
  NiRTTI *v8; // eax@21
  unsigned int v9; // eax@25
  int v10; // esi@25
  NiObjectNET *i; // eax@27

  if ( pkObject )
  {
    v2 = (NiRTTI *)((int (__thiscall *)(NiObjectNET *))pkObject->vfptr[1].__vecDelDtor)(pkObject);
    if ( v2 )
    {
      while ( v2 != &NiAVObject::m_RTTI )
      {
        v2 = v2->m_pkBaseRTTI;
        if ( !v2 )
          return;
      }
      v3 = (NiRollController *)pkObject->m_spControllers.m_pObject;
      if ( v3 )
      {
        do
        {
          v4 = (NiRollController *)v3->m_spNext.m_pObject;
          v5 = (NiRTTI *)((int (__thiscall *)(NiRollController *))v3->vfptr[1].__vecDelDtor)(v3);
          if ( v5 )
          {
            while ( v5 != &NiRollController::m_RTTI )
            {
              v5 = v5->m_pkBaseRTTI;
              if ( !v5 )
                goto LABEL_10;
            }
            NiOldAnimationConverter::ConvertRollController(v3);
          }
          else
          {
LABEL_10:
            v6 = (NiRTTI *)((int (__thiscall *)(NiRollController *))v3->vfptr[1].__vecDelDtor)(v3);
            if ( v6 )
            {
              while ( v6 != &NiLookAtController::m_RTTI )
              {
                v6 = v6->m_pkBaseRTTI;
                if ( !v6 )
                  goto LABEL_13;
              }
              NiOldAnimationConverter::ConvertLookAtController((NiLookAtController *)v3);
            }
            else
            {
LABEL_13:
              v7 = (NiRTTI *)((int (__thiscall *)(_DWORD))v3->vfptr[1].__vecDelDtor)(v3);
              if ( v7 )
              {
                while ( v7 != &NiPathController::m_RTTI )
                {
                  v7 = v7->m_pkBaseRTTI;
                  if ( !v7 )
                    goto LABEL_20;
                }
                NiOldAnimationConverter::ConvertPathController((NiPathController *)v3);
              }
            }
          }
LABEL_20:
          v3 = v4;
        }
        while ( v4 );
      }
      v8 = (NiRTTI *)((int (__thiscall *)(NiObjectNET *))pkObject->vfptr[1].__vecDelDtor)(pkObject);
      if ( v8 )
      {
        while ( v8 != &NiNode::m_RTTI )
        {
          v8 = v8->m_pkBaseRTTI;
          if ( !v8 )
            return;
        }
        v9 = pkObject[6].m_uiExtraDataSize;
        v10 = 0;
        if ( v9 )
        {
          if ( v9 > 0 )
            goto LABEL_28;
          for ( i = 0; ; i = (NiObjectNET *)(&pkObject[6].m_spControllers.m_pObject->vfptr)[v10] )
          {
            NiOldAnimationConverter::RecurseScene(kStream, i);
            if ( pkObject[6].m_uiExtraDataSize <= ++v10 )
              break;
LABEL_28:
            ;
          }
        }
      }
    }
  }
}

//----- (007E4D20) --------------------------------------------------------
void __cdecl NiOldAnimationConverter::Convert(NiStream *kStream, NiObject *pkObject)
{
  NiRTTI *v2; // eax@3

  if ( kStream->m_uiNifFileVersion < 0xA010068 )
  {
    if ( pkObject )
    {
      v2 = (NiRTTI *)((int (__thiscall *)(_DWORD))pkObject->vfptr[1].__vecDelDtor)(pkObject);
      if ( v2 )
      {
        while ( v2 != &NiObjectNET::m_RTTI )
        {
          v2 = v2->m_pkBaseRTTI;
          if ( !v2 )
            return;
        }
        NiOldAnimationConverter::RecurseScene(kStream, (NiObjectNET *)pkObject);
      }
    }
  }
}

//----- (007E4D70) --------------------------------------------------------
char __thiscall NiAlphaRefController::RegisterStreamables(NiAlphaRefController *this, NiStream *stream)
{
  return NiTransformController::RegisterStreamables((NiPSysModifierCtlr *)this, stream);
}

//----- (007E4D80) --------------------------------------------------------
void __thiscall NiAlphaController::SaveBinary(NiAlphaRefController *this, NiStream *stream)
{
  NiFloatInterpController::SaveBinary((NiTransformController *)this, stream);
}

//----- (007E4D90) --------------------------------------------------------
char __thiscall NiAlphaController::IsEqual(NiAlphaRefController *this, NiObject *pObject)
{
  return NiBoolInterpController::IsEqual((NiPoint3InterpController *)this, pObject);
}

//----- (007E4DA0) --------------------------------------------------------
void __thiscall NiVisController::GetTargetBoolValue(NiVisController *this, bool *bValue)
{
  *bValue = ~LOBYTE(this->m_pTarget[1].vfptr) & 1;
}

//----- (007E4DC0) --------------------------------------------------------
void __thiscall NiVisController::LoadBinary(NiVisController *this, NiStream *kStream)
{
  NiPoint3InterpController::LoadBinary((NiPoint3InterpController *)this, kStream);
  if ( kStream->m_uiNifFileVersion < 0xA010068 )
    NiStream::ReadLinkID(kStream);
}

//----- (007E4DF0) --------------------------------------------------------
void __thiscall NiVisController::LinkObject(NiVisController *this, NiStream *kStream)
{
  NiVisController *v2; // ebx@1
  NiBoolData *v3; // esi@2
  NiBoolInterpolator *v4; // eax@2
  NiInterpolator *v5; // eax@3
  NiInterpolator *v6; // edi@3
  NiInterpolator *v7; // esi@5

  v2 = this;
  NiPoint3InterpController::LinkObject((NiPSysModifierCtlr *)this, kStream);
  if ( kStream->m_uiNifFileVersion < 0xA010068 )
  {
    v3 = (NiBoolData *)NiStream::GetObjectFromLinkID(kStream);
    v4 = (NiBoolInterpolator *)operator new(0x18u);
    if ( v4 )
    {
      NiBoolInterpolator::NiBoolInterpolator(v4, v3);
      v6 = v5;
    }
    else
    {
      v6 = 0;
    }
    v7 = v2->m_spInterpolator.m_pObject;
    if ( v7 != v6 )
    {
      if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      v2->m_spInterpolator.m_pObject = v6;
      if ( v6 )
        InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
    }
    ((void (*)(void))v2->m_spInterpolator.m_pObject->vfptr[27].__vecDelDtor)();
  }
}

//----- (007E4E80) --------------------------------------------------------
char __stdcall NiVisController::InterpTargetIsCorrectType(NiObjectNET *pkTarget)
{
  NiRTTI *v2; // eax@2
  char result; // al@5

  if ( pkTarget && (v2 = (NiRTTI *)((int (*)(void))pkTarget->vfptr[1].__vecDelDtor)()) != 0 )
  {
    while ( v2 != &NiAVObject::m_RTTI )
    {
      v2 = v2->m_pkBaseRTTI;
      if ( !v2 )
        goto LABEL_5;
    }
    result = 1;
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (007E4EB0) --------------------------------------------------------
void __thiscall NiVisController::Update(NiVisController *this, float fTime)
{
  NiVisController *v2; // esi@1
  NiInterpolator *v3; // ecx@4
  NiInterpolator *v4; // ecx@6
  NiObjectNET *v5; // esi@8

  v2 = this;
  if ( (LOBYTE(this->m_uFlags) >> 5) & 1 )
  {
    this->m_fScaledTime = -3.4028235e38;
  }
  else if ( NiTimeController::DontDoUpdate((NiTimeController *)&this->vfptr, fTime) )
  {
    v3 = v2->m_spInterpolator.m_pObject;
    if ( !v3 || !(unsigned __int8)((int (*)(void))v3->vfptr[33].__vecDelDtor)() )
      return;
  }
  v4 = v2->m_spInterpolator.m_pObject;
  if ( v4
    && (unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD, _DWORD))v4->vfptr[20].__vecDelDtor)(
                          v2->m_fScaledTime,
                          v2->m_pTarget,
                          (char *)&fTime + 3) )
  {
    v5 = v2->m_pTarget;
    if ( BYTE3(fTime) )
      LOWORD(v5[1].vfptr) &= 0xFFFEu;
    else
      LOWORD(v5[1].vfptr) |= 1u;
  }
}

//----- (007E4F40) --------------------------------------------------------
void __thiscall NiVisController::NiVisController(NiVisController *this)
{
  NiVisController *v1; // esi@1

  v1 = this;
  NiBoolInterpController::NiBoolInterpController((NiBoolInterpController *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&NiVisController::`vftable';
}
// 9E6004: using guessed type int (__thiscall *NiVisController::`vftable')(void *p, char);

//----- (007E4F60) --------------------------------------------------------
NiRTTI *NiVisController::GetRTTI()
{
  return &NiVisController::m_RTTI;
}

//----- (007E4F70) --------------------------------------------------------
NiPoint3InterpController *__thiscall NiVisController::CreateClone(NiVisController *this, NiCloningProcess *kCloning)
{
  NiVisController *v2; // edi@1
  NiBoolInterpController *v3; // eax@1
  NiPoint3InterpController *v4; // esi@1
  NiPoint3InterpController *result; // eax@2

  v2 = this;
  v3 = (NiBoolInterpController *)operator new(0x40u);
  v4 = (NiPoint3InterpController *)v3;
  if ( v3 )
  {
    NiBoolInterpController::NiBoolInterpController(v3);
    v4->vfptr = (NiRefObjectVtbl *)&NiVisController::`vftable';
    NiPoint3InterpController::CopyMembers((NiPoint3InterpController *)v2, v4, kCloning);
    result = v4;
  }
  else
  {
    NiPoint3InterpController::CopyMembers((NiPoint3InterpController *)v2, 0, kCloning);
    result = 0;
  }
  return result;
}
// 9E6004: using guessed type int (__thiscall *NiVisController::`vftable')(void *p, char);

//----- (007E4FC0) --------------------------------------------------------
NiObject *__cdecl NiVisController::CreateObject()
{
  NiBoolInterpController *v0; // eax@1
  NiObject *v1; // esi@1
  NiObject *result; // eax@2

  v0 = (NiBoolInterpController *)operator new(0x40u);
  v1 = (NiObject *)v0;
  if ( v0 )
  {
    NiBoolInterpController::NiBoolInterpController(v0);
    v1->vfptr = (NiRefObjectVtbl *)&NiVisController::`vftable';
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E6004: using guessed type int (__thiscall *NiVisController::`vftable')(void *p, char);

//----- (007E4FF0) --------------------------------------------------------
void __thiscall NiVisController::GetViewerStrings(NiVisController *this, NiTArray<char *> *pkStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiTArray<char *> *v3; // eax@1
  unsigned int v4; // edi@1

  v2 = (NiTArray<NiVBBlock *> *)pkStrings;
  NiBoolInterpController::GetViewerStrings((NiBoolInterpController *)&this->vfptr, pkStrings);
  v3 = (NiTArray<char *> *)NiGetViewerString(NiVisController::m_RTTI.m_pcName);
  v4 = v2->m_uiSize;
  pkStrings = v3;
  if ( v4 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v4 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v4, (NiVBChip *const *)&pkStrings);
}

//----- (007E5040) --------------------------------------------------------
NiObject *__cdecl NiUVData::CreateObject()
{
  NiObject *v0; // eax@1
  NiObject *v1; // esi@1
  NiObject *result; // eax@2

  v0 = (NiObject *)operator new(0x4Cu);
  v1 = v0;
  if ( v0 )
  {
    NiObject::NiObject(v0);
    *(float *)&v1[7].vfptr = 0.0;
    v1[1].vfptr = 0;
    *(float *)&v1[7].m_uiRefCount = 0.0;
    v1[1].m_uiRefCount = 0;
    v1[2].vfptr = 0;
    *(float *)&v1[8].vfptr = 1.0;
    v1[2].m_uiRefCount = 0;
    v1[3].vfptr = 0;
    *(float *)&v1[8].m_uiRefCount = 1.0;
    v1[3].m_uiRefCount = 0;
    v1[4].vfptr = 0;
    v1[4].m_uiRefCount = 0;
    v1[5].vfptr = 0;
    v1[5].m_uiRefCount = 0;
    v1[6].vfptr = 0;
    v1[6].m_uiRefCount = 0;
    v1[9].vfptr = 0;
    v1->vfptr = (NiRefObjectVtbl *)&NiUVData::`vftable';
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E60A4: using guessed type int (__thiscall *NiUVData::`vftable')(void *p, char);

//----- (007E50B0) --------------------------------------------------------
NiRTTI *NiUVData::GetRTTI()
{
  return &NiUVData::m_RTTI;
}

//----- (007E50C0) --------------------------------------------------------
void __thiscall NiUVData::~NiUVData(NiUVData *this)
{
  NiUVData *v1; // esi@1
  NiFloatKey *v2; // eax@1

  v1 = this;
  v2 = this->m_pkUOffsetKeys;
  this->vfptr = (NiRefObjectVtbl *)&NiUVData::`vftable';
  if ( v2 )
    ((void (__cdecl *)(_DWORD))(&NiAnimationKey::ms_deletes)[this->m_eUOffsetType])(v2);
  if ( v1->m_pkVOffsetKeys )
    ((void (__cdecl *)(_DWORD))(&NiAnimationKey::ms_deletes)[v1->m_eVOffsetType])(v1->m_pkVOffsetKeys);
  if ( v1->m_pkUTilingKeys )
    ((void (__cdecl *)(_DWORD))(&NiAnimationKey::ms_deletes)[v1->m_eUTilingType])(v1->m_pkUTilingKeys);
  if ( v1->m_pkVTilingKeys )
    ((void (__cdecl *)(_DWORD))(&NiAnimationKey::ms_deletes)[v1->m_eVTilingType])(v1->m_pkVTilingKeys);
  NiRefObject::~NiRefObject((CPostProcessEffect *)v1);
}
// 9E60A4: using guessed type int (__thiscall *NiUVData::`vftable')(void *p, char);
// B61A48: using guessed type void (__cdecl static **NiAnimationKey::ms_deletes)(struct NiAnimationKey *);

//----- (007E5130) --------------------------------------------------------
char __thiscall NiUVData::IsEqual(NiUVData *this, NiObject *pkObject)
{
  NiObject *v2; // edi@1
  NiUVData *v3; // esi@1
  NiRefObjectVtbl *v5; // ecx@3
  NiRefObjectVtbl *v6; // eax@4
  int v7; // ebx@15
  int v8; // ebx@18
  int v9; // ebx@21
  int v10; // ebx@24
  bool (__cdecl *pfnUOffsetEqual)(NiAnimationKey *, NiAnimationKey *); // [sp+10h] [bp+8h]@15
  bool (__cdecl *pfnUOffsetEquala)(NiAnimationKey *, NiAnimationKey *); // [sp+10h] [bp+8h]@18
  bool (__cdecl *pfnUOffsetEqualb)(NiAnimationKey *, NiAnimationKey *); // [sp+10h] [bp+8h]@21
  bool (__cdecl *pfnUOffsetEqualc)(NiAnimationKey *, NiAnimationKey *); // [sp+10h] [bp+8h]@24

  v2 = pkObject;
  v3 = this;
  if ( !NiObject::IsEqual((NiObject *)&this->vfptr, pkObject) )
    return 0;
  v5 = (NiRefObjectVtbl *)v3->m_uiNumUOffsetKeys;
  if ( v5 != pkObject[1].vfptr )
    return 0;
  v6 = (NiRefObjectVtbl *)v3->m_eUOffsetType;
  if ( v6 != pkObject[2].vfptr
    || v3->m_uiNumVOffsetKeys != pkObject[2].m_uiRefCount
    || v3->m_eVOffsetType != pkObject[3].m_uiRefCount
    || (NiRefObjectVtbl *)v3->m_uiNumUTilingKeys != pkObject[4].vfptr
    || (NiRefObjectVtbl *)v3->m_eUTilingType != pkObject[5].vfptr
    || v3->m_uiNumVTilingKeys != pkObject[5].m_uiRefCount
    || v3->m_eVTilingType != pkObject[6].m_uiRefCount
    || v3->m_ucUOffsetSize != LOBYTE(pkObject[9].vfptr)
    || v3->m_ucVOffsetSize != BYTE1(pkObject[9].vfptr)
    || v3->m_ucUTilingSize != BYTE2(pkObject[9].vfptr)
    || v3->m_ucVTilingSize != BYTE3(pkObject[9].vfptr) )
  {
    return 0;
  }
  v7 = 0;
  pfnUOffsetEqual = (bool (__cdecl *)(NiAnimationKey *, NiAnimationKey *))(&NiAnimationKey::ms_equals)[(_DWORD)v6];
  if ( v5 )
  {
    while ( pfnUOffsetEqual(
              (NiAnimationKey *)((char *)&v3->m_pkUOffsetKeys->m_fTime + v7 * v3->m_ucUOffsetSize),
              (NiAnimationKey *)(v7 * v3->m_ucUOffsetSize + v2[1].m_uiRefCount)) )
    {
      if ( ++v7 >= v3->m_uiNumUOffsetKeys )
        goto LABEL_18;
    }
  }
  else
  {
LABEL_18:
    v8 = 0;
    pfnUOffsetEquala = (bool (__cdecl *)(NiAnimationKey *, NiAnimationKey *))(&NiAnimationKey::ms_equals)[v3->m_eVOffsetType];
    if ( v3->m_uiNumVOffsetKeys )
    {
      while ( pfnUOffsetEquala(
                (NiAnimationKey *)((char *)&v3->m_pkVOffsetKeys->m_fTime + v8 * v3->m_ucVOffsetSize),
                (NiAnimationKey *)((char *)v2[3].vfptr + v8 * v3->m_ucVOffsetSize)) )
      {
        if ( ++v8 >= v3->m_uiNumVOffsetKeys )
          goto LABEL_21;
      }
    }
    else
    {
LABEL_21:
      v9 = 0;
      pfnUOffsetEqualb = (bool (__cdecl *)(NiAnimationKey *, NiAnimationKey *))(&NiAnimationKey::ms_equals)[v3->m_eUTilingType];
      if ( v3->m_uiNumUTilingKeys )
      {
        while ( pfnUOffsetEqualb(
                  (NiAnimationKey *)((char *)&v3->m_pkUTilingKeys->m_fTime + v9 * v3->m_ucUTilingSize),
                  (NiAnimationKey *)(v9 * v3->m_ucUTilingSize + v2[4].m_uiRefCount)) )
        {
          if ( ++v9 >= v3->m_uiNumUTilingKeys )
            goto LABEL_24;
        }
      }
      else
      {
LABEL_24:
        v10 = 0;
        pfnUOffsetEqualc = (bool (__cdecl *)(NiAnimationKey *, NiAnimationKey *))(&NiAnimationKey::ms_equals)[v3->m_eVTilingType];
        if ( !v3->m_uiNumVTilingKeys )
          return 1;
        while ( pfnUOffsetEqualc(
                  (NiAnimationKey *)((char *)&v3->m_pkVTilingKeys->m_fTime + v10 * v3->m_ucVTilingSize),
                  (NiAnimationKey *)((char *)v2[6].vfptr + v10 * v3->m_ucVTilingSize)) )
        {
          if ( ++v10 >= v3->m_uiNumVTilingKeys )
            return 1;
        }
      }
    }
  }
  return 0;
}
// B61C88: using guessed type bool (__cdecl static **NiAnimationKey::ms_equals)(const struct NiAnimationKey *, const struct NiAnimationKey *);

//----- (007E52C0) --------------------------------------------------------
NiUVData *__thiscall NiUVData::`scalar deleting destructor'(NiUVData *this, unsigned int a2)
{
  NiUVData *v2; // esi@1

  v2 = this;
  NiUVData::~NiUVData(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007E52F0) --------------------------------------------------------
void __thiscall NiUVData::ReplaceUOffsetAnim(NiUVData *this, NiFloatKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType)
{
  NiUVData *v4; // esi@1
  NiFloatKey *v5; // eax@1

  v4 = this;
  v5 = this->m_pkUOffsetKeys;
  if ( v5 )
    ((void (__cdecl *)(_DWORD))(&NiAnimationKey::ms_deletes)[this->m_eUOffsetType])(v5);
  if ( pkKeys && uiNumKeys )
  {
    v4->m_uiNumUOffsetKeys = uiNumKeys;
    v4->m_pkUOffsetKeys = pkKeys;
    v4->m_eUOffsetType = eType;
    v4->m_ucUOffsetSize = (char)(&NiAnimationKey::ms_keysizes)[eType];
  }
  else
  {
    v4->m_uiNumUOffsetKeys = 0;
    v4->m_pkUOffsetKeys = 0;
    v4->m_eUOffsetType = 0;
    v4->m_ucUOffsetSize = 0;
  }
}
// B61900: using guessed type unsigned __int8 *NiAnimationKey::ms_keysizes;
// B61A48: using guessed type void (__cdecl static **NiAnimationKey::ms_deletes)(struct NiAnimationKey *);

//----- (007E5350) --------------------------------------------------------
void __thiscall NiUVData::ReplaceVOffsetAnim(NiUVData *this, NiFloatKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType)
{
  NiUVData *v4; // esi@1
  NiFloatKey *v5; // eax@1

  v4 = this;
  v5 = this->m_pkVOffsetKeys;
  if ( v5 )
    ((void (__cdecl *)(_DWORD))(&NiAnimationKey::ms_deletes)[this->m_eVOffsetType])(v5);
  if ( pkKeys && uiNumKeys )
  {
    v4->m_uiNumVOffsetKeys = uiNumKeys;
    v4->m_pkVOffsetKeys = pkKeys;
    v4->m_eVOffsetType = eType;
    v4->m_ucVOffsetSize = (char)(&NiAnimationKey::ms_keysizes)[eType];
  }
  else
  {
    v4->m_uiNumVOffsetKeys = 0;
    v4->m_pkVOffsetKeys = 0;
    v4->m_eVOffsetType = 0;
    v4->m_ucVOffsetSize = 0;
  }
}
// B61900: using guessed type unsigned __int8 *NiAnimationKey::ms_keysizes;
// B61A48: using guessed type void (__cdecl static **NiAnimationKey::ms_deletes)(struct NiAnimationKey *);

//----- (007E53B0) --------------------------------------------------------
void __thiscall NiUVData::ReplaceUTilingAnim(NiUVData *this, NiFloatKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType)
{
  NiUVData *v4; // esi@1
  NiFloatKey *v5; // eax@1

  v4 = this;
  v5 = this->m_pkUTilingKeys;
  if ( v5 )
    ((void (__cdecl *)(_DWORD))(&NiAnimationKey::ms_deletes)[this->m_eUTilingType])(v5);
  if ( pkKeys && uiNumKeys )
  {
    v4->m_uiNumUTilingKeys = uiNumKeys;
    v4->m_pkUTilingKeys = pkKeys;
    v4->m_eUTilingType = eType;
    v4->m_ucUTilingSize = (char)(&NiAnimationKey::ms_keysizes)[eType];
  }
  else
  {
    v4->m_uiNumUTilingKeys = 0;
    v4->m_pkUTilingKeys = 0;
    v4->m_eUTilingType = 0;
    v4->m_ucUTilingSize = 0;
  }
}
// B61900: using guessed type unsigned __int8 *NiAnimationKey::ms_keysizes;
// B61A48: using guessed type void (__cdecl static **NiAnimationKey::ms_deletes)(struct NiAnimationKey *);

//----- (007E5410) --------------------------------------------------------
void __thiscall NiUVData::ReplaceVTilingAnim(NiUVData *this, NiFloatKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType)
{
  NiUVData *v4; // esi@1
  NiFloatKey *v5; // eax@1

  v4 = this;
  v5 = this->m_pkVTilingKeys;
  if ( v5 )
    ((void (__cdecl *)(_DWORD))(&NiAnimationKey::ms_deletes)[this->m_eVTilingType])(v5);
  if ( pkKeys && uiNumKeys )
  {
    v4->m_uiNumVTilingKeys = uiNumKeys;
    v4->m_pkVTilingKeys = pkKeys;
    v4->m_eVTilingType = eType;
    v4->m_ucVTilingSize = (char)(&NiAnimationKey::ms_keysizes)[eType];
  }
  else
  {
    v4->m_uiNumVTilingKeys = 0;
    v4->m_pkVTilingKeys = 0;
    v4->m_eVTilingType = 0;
    v4->m_ucVTilingSize = 0;
  }
}
// B61900: using guessed type unsigned __int8 *NiAnimationKey::ms_keysizes;
// B61A48: using guessed type void (__cdecl static **NiAnimationKey::ms_deletes)(struct NiAnimationKey *);

//----- (007E5470) --------------------------------------------------------
void __thiscall NiUVData::LoadBinary(NiUVData *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiUVData *v3; // esi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST14_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v7; // eax@2
  NiBinaryStream *v8; // ST14_4@2
  unsigned int (__cdecl *v9)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@2
  NiAnimationKey::KeyType v10; // ebx@2
  NiStream *v11; // ST10_4@2
  NiFloatKey *v12; // eax@2
  int v13; // ST08_4@2
  NiBinaryStream *v14; // eax@3
  NiBinaryStream *v15; // ST14_4@3
  unsigned int (__cdecl *v16)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@3
  NiBinaryStream *v17; // eax@4
  NiBinaryStream *v18; // ST14_4@4
  unsigned int (__cdecl *v19)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@4
  NiAnimationKey::KeyType v20; // ebx@4
  NiStream *v21; // ST10_4@4
  NiFloatKey *v22; // eax@4
  int v23; // ST08_4@4
  NiBinaryStream *v24; // eax@5
  NiBinaryStream *v25; // ST14_4@5
  unsigned int (__cdecl *v26)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@5
  NiBinaryStream *v27; // eax@6
  NiBinaryStream *v28; // ST14_4@6
  unsigned int (__cdecl *v29)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@6
  NiAnimationKey::KeyType v30; // ebx@6
  NiStream *v31; // ST10_4@6
  NiFloatKey *v32; // eax@6
  int v33; // ST08_4@6
  NiBinaryStream *v34; // eax@7
  NiBinaryStream *v35; // ST14_4@7
  unsigned int (__cdecl *v36)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@7
  NiBinaryStream *v37; // eax@8
  NiBinaryStream *v38; // ST14_4@8
  unsigned int (__cdecl *v39)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@8
  NiAnimationKey::KeyType v40; // ebx@8
  NiStream *v41; // ST10_4@8
  NiFloatKey *v42; // edi@8
  NiFloatKey *pkUTilingKeys; // [sp+Ch] [bp-8h]@2
  NiAnimationKey::KeyType eType; // [sp+10h] [bp-4h]@1

  v2 = kStream;
  v3 = this;
  NiObject::LoadBinary((NiObject *)&this->vfptr, kStream);
  v4 = v2->m_pkIstr;
  v5 = v4;
  v6 = v4->m_pfnRead;
  eType = 4;
  v6(v5, &kStream, 4u, (unsigned int *)&eType, 1u);
  if ( kStream )
  {
    v7 = v2->m_pkIstr;
    v8 = v7;
    v9 = v7->m_pfnRead;
    eType = 4;
    v9(v8, &pkUTilingKeys, 4u, (unsigned int *)&eType, 1u);
    v10 = (NiAnimationKey::KeyType)pkUTilingKeys;
    v11 = kStream;
    v3->m_ucUOffsetSize = LOBYTE(pkUTilingKeys[1491744].m_fTime);
    v12 = (NiFloatKey *)((int (__cdecl *)(NiStream *, NiStream *))(&NiAnimationKey::ms_loaders)[v10])(v2, v11);
    v13 = v3->m_ucUOffsetSize;
    pkUTilingKeys = v12;
    ((void (__cdecl *)(NiFloatKey *, NiStream *, int))(&NiAnimationKey::ms_fillderived)[v10])(v12, kStream, v13);
    NiUVData::ReplaceUOffsetAnim(v3, pkUTilingKeys, (unsigned int)kStream, v10);
  }
  v14 = v2->m_pkIstr;
  v15 = v14;
  v16 = v14->m_pfnRead;
  pkUTilingKeys = (NiFloatKey *)4;
  v16(v15, &kStream, 4u, (unsigned int *)&pkUTilingKeys, 1u);
  if ( kStream )
  {
    v17 = v2->m_pkIstr;
    v18 = v17;
    v19 = v17->m_pfnRead;
    pkUTilingKeys = (NiFloatKey *)4;
    v19(v18, &eType, 4u, (unsigned int *)&pkUTilingKeys, 1u);
    v20 = eType;
    v21 = kStream;
    v3->m_ucVOffsetSize = (char)(&NiAnimationKey::ms_keysizes)[eType];
    v22 = (NiFloatKey *)((int (__cdecl *)(NiStream *, NiStream *))(&NiAnimationKey::ms_loaders)[v20])(v2, v21);
    v23 = v3->m_ucVOffsetSize;
    pkUTilingKeys = v22;
    ((void (__cdecl *)(NiFloatKey *, NiStream *, int))(&NiAnimationKey::ms_fillderived)[v20])(v22, kStream, v23);
    NiUVData::ReplaceVOffsetAnim(v3, pkUTilingKeys, (unsigned int)kStream, v20);
  }
  v24 = v2->m_pkIstr;
  v25 = v24;
  v26 = v24->m_pfnRead;
  pkUTilingKeys = (NiFloatKey *)4;
  v26(v25, &kStream, 4u, (unsigned int *)&pkUTilingKeys, 1u);
  if ( kStream )
  {
    v27 = v2->m_pkIstr;
    v28 = v27;
    v29 = v27->m_pfnRead;
    pkUTilingKeys = (NiFloatKey *)4;
    v29(v28, &eType, 4u, (unsigned int *)&pkUTilingKeys, 1u);
    v30 = eType;
    v31 = kStream;
    v3->m_ucUTilingSize = (char)(&NiAnimationKey::ms_keysizes)[eType];
    v32 = (NiFloatKey *)((int (__cdecl *)(NiStream *, NiStream *))(&NiAnimationKey::ms_loaders)[v30])(v2, v31);
    v33 = v3->m_ucUTilingSize;
    pkUTilingKeys = v32;
    ((void (__cdecl *)(NiFloatKey *, NiStream *, int))(&NiAnimationKey::ms_fillderived)[v30])(v32, kStream, v33);
    NiUVData::ReplaceUTilingAnim(v3, pkUTilingKeys, (unsigned int)kStream, v30);
  }
  v34 = v2->m_pkIstr;
  v35 = v34;
  v36 = v34->m_pfnRead;
  pkUTilingKeys = (NiFloatKey *)4;
  v36(v35, &kStream, 4u, (unsigned int *)&pkUTilingKeys, 1u);
  if ( kStream )
  {
    v37 = v2->m_pkIstr;
    v38 = v37;
    v39 = v37->m_pfnRead;
    pkUTilingKeys = (NiFloatKey *)4;
    v39(v38, &eType, 4u, (unsigned int *)&pkUTilingKeys, 1u);
    v40 = eType;
    v41 = kStream;
    v3->m_ucVTilingSize = (char)(&NiAnimationKey::ms_keysizes)[eType];
    v42 = (NiFloatKey *)((int (__cdecl *)(NiStream *, NiStream *))(&NiAnimationKey::ms_loaders)[v40])(v2, v41);
    ((void (__cdecl *)(NiFloatKey *, NiStream *, _DWORD))(&NiAnimationKey::ms_fillderived)[v40])(
      v42,
      kStream,
      v3->m_ucVTilingSize);
    NiUVData::ReplaceVTilingAnim(v3, v42, (unsigned int)kStream, v40);
  }
}
// B61900: using guessed type unsigned __int8 *NiAnimationKey::ms_keysizes;
// B61928: using guessed type void (__cdecl static **NiAnimationKey::ms_fillderived)(struct NiAnimationKey *, unsigned int, unsigned __int8);
// B61F58: using guessed type struct NiAnimationKey *(__cdecl static **NiAnimationKey::ms_loaders)(struct NiStream *, unsigned int);

//----- (007E56A0) --------------------------------------------------------
void __thiscall NiUVData::SaveBinary(NiUVData *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiUVData *v3; // esi@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@1
  NiBinaryStream *v5; // ST0C_4@1
  NiBinaryStream *v6; // eax@2
  NiBinaryStream *v7; // ST0C_4@2
  unsigned int (__cdecl *v8)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@2
  NiBinaryStream *v9; // eax@3
  NiBinaryStream *v10; // ST0C_4@3
  unsigned int (__cdecl *v11)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@3
  NiBinaryStream *v12; // eax@4
  NiBinaryStream *v13; // ST0C_4@4
  unsigned int (__cdecl *v14)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@4
  NiBinaryStream *v15; // eax@5
  NiBinaryStream *v16; // ST0C_4@5
  unsigned int (__cdecl *v17)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@5
  NiBinaryStream *v18; // eax@6
  NiBinaryStream *v19; // ST0C_4@6
  unsigned int (__cdecl *v20)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@6
  NiBinaryStream *v21; // eax@7
  NiBinaryStream *v22; // ST0C_4@7
  unsigned int (__cdecl *v23)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@7
  NiBinaryStream *v24; // eax@8
  NiBinaryStream *v25; // ST0C_4@8
  unsigned int (__cdecl *v26)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@8

  v2 = kStream;
  v3 = this;
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue(
    (NiVBDynamicSet *)this,
    (IDirect3DVertexBuffer9 *)kStream);
  v4 = v2->m_pkOstr->m_pfnWrite;
  v5 = v2->m_pkOstr;
  kStream = (NiStream *)4;
  v4(v5, &v3->m_uiNumUOffsetKeys, 4u, (unsigned int *)&kStream, 1u);
  if ( v3->m_uiNumUOffsetKeys )
  {
    v6 = v2->m_pkOstr;
    v7 = v6;
    v8 = v6->m_pfnWrite;
    kStream = (NiStream *)4;
    v8(v7, &v3->m_eUOffsetType, 4u, (unsigned int *)&kStream, 1u);
    ((void (__cdecl *)(_DWORD, _DWORD, _DWORD))(&NiAnimationKey::ms_saves)[v3->m_eUOffsetType])(
      v2,
      v3->m_pkUOffsetKeys,
      v3->m_uiNumUOffsetKeys);
  }
  v9 = v2->m_pkOstr;
  v10 = v9;
  v11 = v9->m_pfnWrite;
  kStream = (NiStream *)4;
  v11(v10, &v3->m_uiNumVOffsetKeys, 4u, (unsigned int *)&kStream, 1u);
  if ( v3->m_uiNumVOffsetKeys )
  {
    v12 = v2->m_pkOstr;
    v13 = v12;
    v14 = v12->m_pfnWrite;
    kStream = (NiStream *)4;
    v14(v13, &v3->m_eVOffsetType, 4u, (unsigned int *)&kStream, 1u);
    ((void (__cdecl *)(_DWORD, _DWORD, _DWORD))(&NiAnimationKey::ms_saves)[v3->m_eVOffsetType])(
      v2,
      v3->m_pkVOffsetKeys,
      v3->m_uiNumVOffsetKeys);
  }
  v15 = v2->m_pkOstr;
  v16 = v15;
  v17 = v15->m_pfnWrite;
  kStream = (NiStream *)4;
  v17(v16, &v3->m_uiNumUTilingKeys, 4u, (unsigned int *)&kStream, 1u);
  if ( v3->m_uiNumUTilingKeys )
  {
    v18 = v2->m_pkOstr;
    v19 = v18;
    v20 = v18->m_pfnWrite;
    kStream = (NiStream *)4;
    v20(v19, &v3->m_eUTilingType, 4u, (unsigned int *)&kStream, 1u);
    ((void (__cdecl *)(_DWORD, _DWORD, _DWORD))(&NiAnimationKey::ms_saves)[v3->m_eUTilingType])(
      v2,
      v3->m_pkUTilingKeys,
      v3->m_uiNumUTilingKeys);
  }
  v21 = v2->m_pkOstr;
  v22 = v21;
  v23 = v21->m_pfnWrite;
  kStream = (NiStream *)4;
  v23(v22, &v3->m_uiNumVTilingKeys, 4u, (unsigned int *)&kStream, 1u);
  if ( v3->m_uiNumVTilingKeys )
  {
    v24 = v2->m_pkOstr;
    v25 = v24;
    v26 = v24->m_pfnWrite;
    kStream = (NiStream *)4;
    v26(v25, &v3->m_eVTilingType, 4u, (unsigned int *)&kStream, 1u);
    ((void (__cdecl *)(_DWORD, _DWORD, _DWORD))(&NiAnimationKey::ms_saves)[v3->m_eVTilingType])(
      v2,
      v3->m_pkVTilingKeys,
      v3->m_uiNumVTilingKeys);
  }
}
// B61BF8: using guessed type void (__cdecl static **NiAnimationKey::ms_saves)(struct NiStream *, struct NiAnimationKey *, unsigned int);

//----- (007E5830) --------------------------------------------------------
void __thiscall NiUVData::GetViewerStrings(NiUVData *this, NiTArray<char *> *pStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiUVData *v3; // edi@1
  NiTArray<char *> *v4; // eax@1
  unsigned int v5; // ebx@1
  NiTArray<char *> *v6; // eax@3
  unsigned int v7; // ebx@3
  NiTArray<char *> *v8; // eax@5
  unsigned int v9; // ebx@5
  NiTArray<char *> *v10; // eax@7
  unsigned int v11; // ebx@7
  NiTArray<char *> *v12; // eax@9
  unsigned int v13; // edi@9

  v2 = (NiTArray<NiVBBlock *> *)pStrings;
  v3 = this;
  NiObject::GetViewerStrings((NiObject *)&this->vfptr, pStrings);
  v4 = (NiTArray<char *> *)NiGetViewerString(NiUVData::m_RTTI.m_pcName);
  v5 = v2->m_uiSize;
  pStrings = v4;
  if ( v5 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v5 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v5, (NiVBChip *const *)&pStrings);
  v6 = (NiTArray<char *> *)NiGetViewerString("m_uiNumUOffsetKeys", v3->m_uiNumUOffsetKeys);
  v7 = v2->m_uiSize;
  pStrings = v6;
  if ( v7 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v7 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v7, (NiVBChip *const *)&pStrings);
  v8 = (NiTArray<char *> *)NiGetViewerString("m_uiNumUTilingKeys", v3->m_uiNumUTilingKeys);
  v9 = v2->m_uiSize;
  pStrings = v8;
  if ( v9 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v9 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v9, (NiVBChip *const *)&pStrings);
  v10 = (NiTArray<char *> *)NiGetViewerString("m_uiNumVOffsetKeys", v3->m_uiNumVOffsetKeys);
  v11 = v2->m_uiSize;
  pStrings = v10;
  if ( v11 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v11 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v11, (NiVBChip *const *)&pStrings);
  v12 = (NiTArray<char *> *)NiGetViewerString("m_uiNumVTilingKeys", v3->m_uiNumVTilingKeys);
  v13 = v2->m_uiSize;
  pStrings = v12;
  if ( v13 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v13 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v13, (NiVBChip *const *)&pStrings);
}

//----- (007E5950) --------------------------------------------------------
void __thiscall NiUVController::LinkObject(NiUVController *this, NiStream *kStream)
{
  NiUVController *v2; // edi@1
  NiObject *v3; // eax@1
  NiUVData *v4; // esi@1
  NiUVData *v5; // ebx@1

  v2 = this;
  NiTimeController::LinkObject((NiTimeController *)&this->vfptr, kStream);
  v3 = NiStream::GetObjectFromLinkID(kStream);
  v4 = v2->m_spUVData.m_pObject;
  v5 = (NiUVData *)v3;
  if ( (NiObject *)v4 != v3 )
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v2->m_spUVData.m_pObject = v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  }
}

//----- (007E59B0) --------------------------------------------------------
char __thiscall NiUVController::RegisterStreamables(NiUVController *this, NiStream *kStream)
{
  NiUVController *v2; // esi@1
  char result; // al@1
  NiUVData *v4; // ecx@2

  v2 = this;
  result = NiTimeController::RegisterStreamables((NiTimeController *)&this->vfptr, kStream);
  if ( result )
  {
    v4 = v2->m_spUVData.m_pObject;
    if ( v4 )
      ((void (__stdcall *)(_DWORD))v4->vfptr[5].__vecDelDtor)(kStream);
    result = 1;
  }
  return result;
}

//----- (007E59F0) --------------------------------------------------------
bool __thiscall NiUVController::IsEqual(NiUVController *this, NiObject *pkObject)
{
  NiUVController *v2; // edi@1
  bool result; // al@2
  NiRefObjectVtbl *v4; // esi@4
  NiUVData *v5; // ecx@4

  v2 = this;
  result = 0;
  if ( NiTimeController::IsEqual((NiTimeController *)&this->vfptr, pkObject) )
  {
    if ( v2->m_usTextureSet == LOWORD(pkObject[9].m_uiRefCount) )
    {
      v4 = pkObject[10].vfptr;
      v5 = v2->m_spUVData.m_pObject;
      if ( (v5 == 0) == (v4 == 0)
        && (!v5 || (unsigned __int8)((int (__stdcall *)(NiRefObjectVtbl *))v5->vfptr[7].__vecDelDtor)(v4)) )
      {
        result = 1;
      }
    }
  }
  return result;
}

//----- (007E5A50) --------------------------------------------------------
NiRTTI *NiUVController::GetRTTI()
{
  return &NiUVController::m_RTTI;
}

//----- (007E5A60) --------------------------------------------------------
void __thiscall NiUVController::SetTarget(NiUVController *this, NiObjectNET *pkTarget)
{
  NiUVData *v2; // eax@1

  v2 = this->m_spUVData.m_pObject;
  v2->m_fLastUOffset = 0.0;
  v2->m_fLastVOffset = 0.0;
  v2->m_fLastUTiling = 1.0;
  v2->m_fLastVTiling = 1.0;
  NiTimeController::SetTarget((NiTimeController *)&this->vfptr, pkTarget);
}

//----- (007E5A80) --------------------------------------------------------
char __thiscall NiGeomMorpherController::TargetIsRequiredType(NiD3DTimeSyncController *this)
{
  NiObjectNET *v1; // ecx@1
  NiRTTI *v2; // eax@2
  char result; // al@5

  v1 = this->m_pTarget;
  if ( v1 && (v2 = (NiRTTI *)((int (*)(void))v1->vfptr[1].__vecDelDtor)()) != 0 )
  {
    while ( v2 != &NiGeometry::m_RTTI )
    {
      v2 = v2->m_pkBaseRTTI;
      if ( !v2 )
        goto LABEL_5;
    }
    result = 1;
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (007E5AB0) --------------------------------------------------------
void __thiscall NiUVController::~NiUVController(NiUVController *this)
{
  NiUVController *v1; // edi@1
  NiUVData *v2; // esi@1
  NiUVData *v3; // esi@6

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiUVController::`vftable';
  v2 = this->m_spUVData.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spUVData.m_pObject = 0;
  }
  v3 = v1->m_spUVData.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  NiTimeController::~NiTimeController((NiTimeController *)&v1->vfptr);
}
// 9E6134: using guessed type int (__thiscall *NiUVController::`vftable')(void *p, char);

//----- (007E5B10) --------------------------------------------------------
void __thiscall NiUVController::ResetKeyTimeExtrema(NiUVController *this)
{
  NiUVData *v1; // edx@1
  float *v2; // esi@2
  unsigned int v3; // edi@2
  char v4; // bl@2
  int v5; // eax@5
  double v6; // st7@5
  float *v7; // esi@5
  float *v8; // esi@8
  unsigned int v9; // edi@8
  char v10; // bl@8
  int v11; // eax@11
  double v12; // st7@11
  float *v13; // esi@11
  float *v14; // esi@14
  unsigned int v15; // edi@14
  char v16; // bl@14
  int v17; // eax@17
  double v18; // st7@17
  float *v19; // esi@17
  unsigned int v20; // esi@20
  char v21; // bl@20
  float *v22; // edx@20
  int v23; // eax@23
  double v24; // st7@23
  float *v25; // edx@23

  v1 = this->m_spUVData.m_pObject;
  this->m_fLoKeyTime = 3.4028235e38;
  this->m_fHiKeyTime = -3.4028235e38;
  if ( v1 )
  {
    v2 = &v1->m_pkUOffsetKeys->m_fTime;
    v3 = v1->m_uiNumUOffsetKeys;
    v4 = v1->m_ucUOffsetSize;
    if ( v2 )
    {
      if ( *v2 < 3.402823466385289e38 )
        this->m_fLoKeyTime = *v2;
      v5 = (v3 - 1) * (unsigned __int8)v4;
      v6 = *(float *)((char *)v2 + v5);
      v7 = (float *)((char *)v2 + v5);
      if ( v6 > -3.402823466385289e38 )
        this->m_fHiKeyTime = *v7;
    }
    if ( v1 )
    {
      v8 = &v1->m_pkVOffsetKeys->m_fTime;
      v9 = v1->m_uiNumVOffsetKeys;
      v10 = v1->m_ucVOffsetSize;
      if ( v8 )
      {
        if ( this->m_fLoKeyTime > (double)*v8 )
          this->m_fLoKeyTime = *v8;
        v11 = (v9 - 1) * (unsigned __int8)v10;
        v12 = *(float *)((char *)v8 + v11);
        v13 = (float *)((char *)v8 + v11);
        if ( this->m_fHiKeyTime < v12 )
          this->m_fHiKeyTime = *v13;
      }
      if ( v1 )
      {
        v14 = &v1->m_pkUTilingKeys->m_fTime;
        v15 = v1->m_uiNumUTilingKeys;
        v16 = v1->m_ucUTilingSize;
        if ( v14 )
        {
          if ( this->m_fLoKeyTime > (double)*v14 )
            this->m_fLoKeyTime = *v14;
          v17 = (v15 - 1) * (unsigned __int8)v16;
          v18 = *(float *)((char *)v14 + v17);
          v19 = (float *)((char *)v14 + v17);
          if ( this->m_fHiKeyTime < v18 )
            this->m_fHiKeyTime = *v19;
        }
        if ( v1 )
        {
          v20 = v1->m_uiNumVTilingKeys;
          v21 = v1->m_ucVTilingSize;
          v22 = &v1->m_pkVTilingKeys->m_fTime;
          if ( v22 )
          {
            if ( this->m_fLoKeyTime > (double)*v22 )
              this->m_fLoKeyTime = *v22;
            v23 = (v20 - 1) * (unsigned __int8)v21;
            v24 = *(float *)((char *)v22 + v23);
            v25 = (float *)((char *)v22 + v23);
            if ( this->m_fHiKeyTime < v24 )
              this->m_fHiKeyTime = *v25;
          }
        }
      }
    }
  }
}

//----- (007E5C40) --------------------------------------------------------
void __thiscall NiUVController::Update(NiUVController *this, float fTime)
{
  NiUVController *v2; // esi@1

  v2 = this;
  if ( !NiTimeController::DontDoUpdate((NiTimeController *)&this->vfptr, fTime) )
    v2->m_bNeedPreDisplay = 1;
}

//----- (007E5C60) --------------------------------------------------------
void __thiscall NiUVController::OnPreDisplay(NiUVController *this)
{
  NiUVController *v1; // esi@1
  NiGeometryData *v2; // ebx@2
  NiUVData *v3; // eax@3
  char v4; // dl@4
  unsigned int v5; // ecx@4
  NiAnimationKey::KeyType v6; // edi@4
  NiFloatKey *v7; // eax@4
  NiUVData *v8; // eax@6
  char v9; // dl@7
  unsigned int v10; // ecx@7
  NiAnimationKey::KeyType v11; // edi@7
  NiFloatKey *v12; // eax@7
  NiUVData *v13; // eax@9
  char v14; // dl@10
  unsigned int v15; // ecx@10
  NiAnimationKey::KeyType v16; // edi@10
  NiFloatKey *v17; // eax@10
  NiUVData *v18; // eax@12
  char v19; // dl@13
  unsigned int v20; // ecx@13
  NiAnimationKey::KeyType v21; // edi@13
  NiFloatKey *v22; // eax@13
  NiUVData *v23; // eax@15
  float kDiff_4; // ST30_4@15
  float v25; // ST24_4@15
  float v26; // ST28_4@15
  NiPoint2 *v27; // eax@15
  int v28; // ecx@15
  float v29; // ST30_4@15
  double v30; // st3@15
  float v31; // ST30_4@16
  double v32; // st2@16
  NiUVData *v33; // eax@17
  float fVTilingDiff; // [sp+24h] [bp-24h]@15
  float kDiff; // [sp+2Ch] [bp-1Ch]@15
  float fUOffset; // [sp+34h] [bp-14h]@3
  float fVTiling; // [sp+38h] [bp-10h]@12
  float fUTiling; // [sp+3Ch] [bp-Ch]@9
  float fVOffset; // [sp+40h] [bp-8h]@6
  float ucSize; // [sp+44h] [bp-4h]@15

  v1 = this;
  if ( this->m_bNeedPreDisplay )
  {
    v2 = (NiGeometryData *)this->m_pTarget[6].m_ppkExtra;
    if ( this->m_usTextureSet < (unsigned __int16)(v2->m_usDataFlags & 0x3F) )
    {
      v3 = this->m_spUVData.m_pObject;
      fUOffset = 0.0;
      if ( v3 )
      {
        v4 = v3->m_ucUOffsetSize;
        v5 = v3->m_uiNumUOffsetKeys;
        v6 = v3->m_eUOffsetType;
        v7 = v3->m_pkUOffsetKeys;
        if ( v7 )
          fUOffset = NiFloatKey::GenInterp(v1->m_fScaledTime, v7, v6, v5, &v1->m_uiLastUOffsetIdx, v4);
      }
      v8 = v1->m_spUVData.m_pObject;
      fVOffset = 0.0;
      if ( v8 )
      {
        v9 = v8->m_ucVOffsetSize;
        v10 = v8->m_uiNumVOffsetKeys;
        v11 = v8->m_eVOffsetType;
        v12 = v8->m_pkVOffsetKeys;
        if ( v12 )
          fVOffset = NiFloatKey::GenInterp(v1->m_fScaledTime, v12, v11, v10, &v1->m_uiLastVOffsetIdx, v9);
      }
      v13 = v1->m_spUVData.m_pObject;
      fUTiling = 1.0;
      if ( v13 )
      {
        v14 = v13->m_ucUTilingSize;
        v15 = v13->m_uiNumUTilingKeys;
        v16 = v13->m_eUTilingType;
        v17 = v13->m_pkUTilingKeys;
        if ( v17 )
          fUTiling = NiFloatKey::GenInterp(v1->m_fScaledTime, v17, v16, v15, &v1->m_uiLastUTilingIdx, v14);
      }
      v18 = v1->m_spUVData.m_pObject;
      fVTiling = 1.0;
      if ( v18 )
      {
        v19 = v18->m_ucVTilingSize;
        v20 = v18->m_uiNumVTilingKeys;
        v21 = v18->m_eVTilingType;
        v22 = v18->m_pkVTilingKeys;
        if ( v22 )
          fVTiling = NiFloatKey::GenInterp(v1->m_fScaledTime, v22, v21, v20, &v1->m_uiLastVTilingIdx, v19);
      }
      v23 = v1->m_spUVData.m_pObject;
      ucSize = fUTiling / v23->m_fLastUTiling;
      kDiff_4 = v23->m_fLastUOffset;
      v25 = fVTiling / v23->m_fLastVTiling;
      v26 = v23->m_fLastVOffset;
      v27 = NiGeometryData::GetTextureSet(v2, v1->m_usTextureSet);
      v28 = v2->m_usVertices;
      v29 = fUOffset - kDiff_4 * ucSize;
      kDiff = (1.0 - ucSize) * 0.5 - v29;
      v30 = v25;
      fVTilingDiff = fVOffset - v26 * v25;
      if ( (unsigned __int16)v28 > 0u )
      {
        do
        {
          v32 = v27->x;
          ++v27;
          --v28;
          v27[-1].x = v32 * ucSize + kDiff;
          v31 = 0.5 * (1.0 - v30) + fVTilingDiff;
          v27[-1].y = v27[-1].y * v30 + v31;
        }
        while ( v28 );
      }
      v33 = v1->m_spUVData.m_pObject;
      v33->m_fLastUOffset = fUOffset;
      v33->m_fLastVOffset = fVOffset;
      v33->m_fLastUTiling = fUTiling;
      v33->m_fLastVTiling = fVTiling;
      v2->m_usDirtyFlags |= 8u;
      v1->m_bNeedPreDisplay = 0;
    }
  }
}

//----- (007E5E60) --------------------------------------------------------
NiTimeController *__cdecl NiUVController::CreateObject()
{
  NiTimeController *v0; // eax@1
  NiTimeController *v1; // esi@1
  NiTimeController *result; // eax@2

  v0 = (NiTimeController *)operator new(0x58u);
  v1 = v0;
  if ( v0 )
  {
    NiTimeController::NiTimeController(v0);
    v1->vfptr = (NiRefObjectVtbl *)&NiUVController::`vftable';
    LODWORD(v1[1].m_fLoKeyTime) = 0;
    LOWORD(v1[1].m_fPhase) = 0;
    v1[1].vfptr = 0;
    *(_DWORD *)&v1[1].m_uFlags = 0;
    v1[1].m_uiRefCount = 0;
    LODWORD(v1[1].m_fFrequency) = 0;
    LOBYTE(v1[1].m_fHiKeyTime) = 0;
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E6134: using guessed type int (__thiscall *NiUVController::`vftable')(void *p, char);

//----- (007E5EB0) --------------------------------------------------------
void __thiscall NiUVController::SetUVData(NiUVController *this, NiUVData *pData)
{
  NiUVController *v2; // esi@1
  NiUVData *v3; // edi@1

  v2 = this;
  v3 = this->m_spUVData.m_pObject;
  if ( v3 != pData )
  {
    if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spUVData.m_pObject = pData;
    if ( pData )
      InterlockedIncrement((volatile LONG *)&pData->m_uiRefCount);
  }
  v2->m_uiLastUOffsetIdx = 0;
  v2->m_uiLastVOffsetIdx = 0;
  v2->m_uiLastUTilingIdx = 0;
  v2->m_uiLastVTilingIdx = 0;
  NiUVController::ResetKeyTimeExtrema(v2);
}

//----- (007E5F10) --------------------------------------------------------
NiUVController *__thiscall NiUVController::`vector deleting destructor'(NiUVController *this, unsigned int a2)
{
  NiUVController *v2; // esi@1

  v2 = this;
  NiUVController::~NiUVController(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007E5F40) --------------------------------------------------------
void __thiscall NiUVController::LoadBinary(NiUVController *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiUVController *v3; // esi@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@1
  NiBinaryStream *v5; // ST00_4@1

  v2 = kStream;
  v3 = this;
  NiTimeController::LoadBinary((NiTimeController *)&this->vfptr, kStream);
  v4 = v2->m_pkIstr->m_pfnRead;
  v5 = v2->m_pkIstr;
  kStream = (NiStream *)2;
  v4(v5, &v3->m_usTextureSet, 2u, (unsigned int *)&kStream, 1u);
  NiStream::ReadLinkID(v2);
}

//----- (007E5F80) --------------------------------------------------------
void __thiscall NiUVController::SaveBinary(NiUVController *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiUVController *v3; // esi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST00_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1

  v2 = kStream;
  v3 = this;
  NiTimeController::SaveBinary((NiTimeController *)&this->vfptr, kStream);
  v4 = v2->m_pkOstr;
  v5 = v4;
  v6 = v4->m_pfnWrite;
  kStream = (NiStream *)2;
  v6(v5, &v3->m_usTextureSet, 2u, (unsigned int *)&kStream, 1u);
  v2->vfptr->SaveLinkID(v2, (NiObject *)v3->m_spUVData.m_pObject);
}

//----- (007E5FD0) --------------------------------------------------------
void __thiscall NiUVController::GetViewerStrings(NiUVController *this, NiTArray<char *> *pStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiTArray<char *> *v3; // eax@1
  unsigned int v4; // edi@1

  v2 = (NiTArray<NiVBBlock *> *)pStrings;
  NiTimeController::GetViewerStrings((NiTimeController *)&this->vfptr, pStrings);
  v3 = (NiTArray<char *> *)NiGetViewerString(NiUVController::m_RTTI.m_pcName);
  v4 = v2->m_uiSize;
  pStrings = v3;
  if ( v4 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v4 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v4, (NiVBChip *const *)&pStrings);
}

//----- (007E6020) --------------------------------------------------------
NiTimeController *__thiscall NiUVController::CreateClone(NiUVController *this, NiCloningProcess *kCloning)
{
  NiUVController *v2; // edi@1
  NiTimeController *v3; // eax@1
  NiTimeController *v4; // esi@1
  NiUVData *v5; // edi@4

  v2 = this;
  v3 = (NiTimeController *)operator new(0x58u);
  v4 = v3;
  if ( v3 )
  {
    NiTimeController::NiTimeController(v3);
    v4->vfptr = (NiRefObjectVtbl *)&NiUVController::`vftable';
    LODWORD(v4[1].m_fLoKeyTime) = 0;
    LOWORD(v4[1].m_fPhase) = 0;
    v4[1].vfptr = 0;
    *(_DWORD *)&v4[1].m_uFlags = 0;
    v4[1].m_uiRefCount = 0;
    LODWORD(v4[1].m_fFrequency) = 0;
    LOBYTE(v4[1].m_fHiKeyTime) = 0;
  }
  else
  {
    v4 = 0;
  }
  NiTimeController::CopyMembers((NiTimeController *)&v2->vfptr, v4, kCloning);
  v4[1].vfptr = (NiRefObjectVtbl *)v2->m_uiLastUOffsetIdx;
  *(_DWORD *)&v4[1].m_uFlags = v2->m_uiLastVOffsetIdx;
  v4[1].m_uiRefCount = v2->m_uiLastUTilingIdx;
  LODWORD(v4[1].m_fFrequency) = v2->m_uiLastVTilingIdx;
  LOWORD(v4[1].m_fPhase) = v2->m_usTextureSet;
  v5 = v2->m_spUVData.m_pObject;
  if ( v5 )
    NiUVController::SetUVData((NiUVController *)v4, v5);
  return v4;
}
// 9E6134: using guessed type int (__thiscall *NiUVController::`vftable')(void *p, char);

//----- (007E60B0) --------------------------------------------------------
signed int __stdcall NiTransformInterpolator::GetKeyContent(unsigned __int16 usChannel)
{
  signed int result; // eax@2

  if ( usChannel )
  {
    if ( usChannel == 1 )
      result = 2;
    else
      result = usChannel == 2 ? 0 : 6;
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (007E60F0) --------------------------------------------------------
BOOL __thiscall NiQuaternion::operator!=(NiQuaternion *this, NiQuaternion *q)
{
  return q->m_fW != this->m_fW || q->m_fX != this->m_fX || q->m_fY != this->m_fY || q->m_fZ != this->m_fZ;
}

//----- (007E6140) --------------------------------------------------------
BOOL __thiscall NiQuatTransform::IsTransformInvalid(NiQuatTransform *this)
{
  float v1; // ST00_4@1
  double v2; // st7@1

  v1 = -3.4028235e38;
  v2 = v1;
  return v1 == this->m_fScale && v2 == this->m_kRotate.m_fX && this->m_kTranslate.x == v2;
}

//----- (007E6190) --------------------------------------------------------
BOOL __thiscall NiQuatTransform::operator==(NiQuatTransform *this, NiQuatTransform *kTransform)
{
  return kTransform->m_kTranslate.x == this->m_kTranslate.x
      && kTransform->m_kTranslate.y == this->m_kTranslate.y
      && kTransform->m_kTranslate.z == this->m_kTranslate.z
      && kTransform->m_kRotate.m_fW == this->m_kRotate.m_fW
      && kTransform->m_kRotate.m_fX == this->m_kRotate.m_fX
      && kTransform->m_kRotate.m_fY == this->m_kRotate.m_fY
      && kTransform->m_kRotate.m_fZ == this->m_kRotate.m_fZ
      && kTransform->m_fScale == this->m_fScale;
}

//----- (007E6220) --------------------------------------------------------
unsigned int __thiscall NiTransformInterpolator::GetKeyCount(NiTransformInterpolator *this, unsigned __int16 usChannel)
{
  NiTransformData *v2; // ecx@2
  NiTransformData *v4; // ecx@5
  NiTransformData *v5; // ecx@8

  if ( usChannel )
  {
    if ( usChannel == 1 )
    {
      v4 = this->m_spData.m_pObject;
      if ( v4 )
        return v4->m_uiNumRotKeys;
    }
    else if ( usChannel == 2 )
    {
      v5 = this->m_spData.m_pObject;
      if ( v5 )
        return v5->m_uiNumScaleKeys;
    }
  }
  else
  {
    v2 = this->m_spData.m_pObject;
    if ( v2 )
      return v2->m_uiNumPosKeys;
  }
  return 0;
}

//----- (007E6270) --------------------------------------------------------
NiAnimationKey::KeyType __thiscall NiTransformInterpolator::GetKeyType(NiTransformInterpolator *this, unsigned __int16 usChannel)
{
  NiTransformData *v2; // ecx@2
  NiTransformData *v4; // ecx@5
  NiTransformData *v5; // ecx@8

  if ( usChannel )
  {
    if ( usChannel == 1 )
    {
      v4 = this->m_spData.m_pObject;
      if ( v4 )
        return v4->m_eRotType;
    }
    else if ( usChannel == 2 )
    {
      v5 = this->m_spData.m_pObject;
      if ( v5 )
        return v5->m_eScaleType;
    }
  }
  else
  {
    v2 = this->m_spData.m_pObject;
    if ( v2 )
      return v2->m_ePosType;
  }
  return 0;
}

//----- (007E62C0) --------------------------------------------------------
NiPosKey *__thiscall NiTransformInterpolator::GetKeyArray(NiTransformInterpolator *this, unsigned __int16 usChannel)
{
  NiTransformData *v2; // ecx@2
  NiTransformData *v4; // ecx@5
  NiTransformData *v5; // ecx@8

  if ( usChannel )
  {
    if ( usChannel == 1 )
    {
      v4 = this->m_spData.m_pObject;
      if ( v4 )
        return (NiPosKey *)v4->m_pkRotKeys;
    }
    else if ( usChannel == 2 )
    {
      v5 = this->m_spData.m_pObject;
      if ( v5 )
        return (NiPosKey *)v5->m_pkScaleKeys;
    }
  }
  else
  {
    v2 = this->m_spData.m_pObject;
    if ( v2 )
      return v2->m_pkPosKeys;
  }
  return 0;
}

//----- (007E6310) --------------------------------------------------------
char __thiscall NiTransformInterpolator::GetKeyStride(NiTransformInterpolator *this, unsigned __int16 usChannel)
{
  NiTransformData *v2; // ecx@2
  NiTransformData *v4; // ecx@5
  NiTransformData *v5; // ecx@8

  if ( usChannel )
  {
    if ( usChannel == 1 )
    {
      v4 = this->m_spData.m_pObject;
      if ( v4 )
        return v4->m_ucRotSize;
    }
    else if ( usChannel == 2 )
    {
      v5 = this->m_spData.m_pObject;
      if ( v5 )
        return v5->m_ucScaleSize;
    }
  }
  else
  {
    v2 = this->m_spData.m_pObject;
    if ( v2 )
      return v2->m_ucPosSize;
  }
  return 0;
}

//----- (007E6360) --------------------------------------------------------
void __thiscall NiTransformInterpolator::GuaranteeTimeRange(NiTransformInterpolator *this, float fStartTime, float fEndTime)
{
  NiTransformData *v3; // ecx@1

  v3 = this->m_spData.m_pObject;
  if ( v3 )
    NiTransformData::GuaranteeKeysAtStartAndEnd(v3, fStartTime, fEndTime);
}

//----- (007E6390) --------------------------------------------------------
bool __thiscall NiTransformInterpolator::GetChannelPosed(NiTransformInterpolator *this, int usChannel)
{
  NiTransformInterpolator *v2; // esi@1
  double v3; // st7@6

  v2 = this;
  if ( !(_WORD)usChannel )
  {
    if ( !this->m_spData.m_pObject || !(int)this->vfptr[35].__vecDelDtor((NiRefObject *)this, usChannel) )
    {
      v3 = v2->m_kTransformValue.m_kTranslate.x;
      return -3.4028235e38 != v3;
    }
    return 0;
  }
  if ( (unsigned __int16)usChannel == 1 )
  {
    if ( !this->m_spData.m_pObject || !(int)this->vfptr[35].__vecDelDtor((NiRefObject *)this, usChannel) )
    {
      v3 = v2->m_kTransformValue.m_kRotate.m_fX;
      return -3.4028235e38 != v3;
    }
    return 0;
  }
  if ( (unsigned __int16)usChannel != 2
    || this->m_spData.m_pObject && (int)this->vfptr[35].__vecDelDtor((NiRefObject *)this, usChannel) )
  {
    return 0;
  }
  v3 = v2->m_kTransformValue.m_fScale;
  return -3.4028235e38 != v3;
}

//----- (007E6430) --------------------------------------------------------
void __thiscall NiTransformInterpolator::LoadBinary(NiTransformInterpolator *this, NiStream *kStream)
{
  NiTransformInterpolator *v2; // esi@1
  NiObject *v3; // eax@1
  NiTransformData *v4; // edi@1
  NiTransformData *v5; // ebx@1

  v2 = this;
  NiBackToFrontAccumulator::LoadBinary((NiBackToFrontAccumulator *)this, kStream);
  NiQuatTransform::LoadBinary(&v2->m_kTransformValue, kStream);
  v3 = NiStream::ResolveLinkID(kStream);
  v4 = v2->m_spData.m_pObject;
  v5 = (NiTransformData *)v3;
  if ( (NiObject *)v4 != v3 )
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v2->m_spData.m_pObject = v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  }
}

//----- (007E64A0) --------------------------------------------------------
char __thiscall NiTransformInterpolator::RegisterStreamables(NiTransformInterpolator *this, NiStream *kStream)
{
  NiTransformInterpolator *v2; // esi@1
  char result; // al@1
  NiTransformData *v4; // ecx@2

  v2 = this;
  result = NiScreenLODData::RegisterStreamables((NiPSysSpawnModifier *)this, kStream);
  if ( result )
  {
    v4 = v2->m_spData.m_pObject;
    if ( v4 )
      ((void (__stdcall *)(_DWORD))v4->vfptr[5].__vecDelDtor)(kStream);
    result = 1;
  }
  return result;
}

//----- (007E64E0) --------------------------------------------------------
void __thiscall NiTransformInterpolator::SaveBinary(NiTransformInterpolator *this, NiStream *kStream)
{
  NiTransformInterpolator *v2; // esi@1

  v2 = this;
  NiDefaultAVObjectPalette::LinkObject((NiScreenLODData *)this, kStream);
  NiQuatTransform::SaveBinary(&v2->m_kTransformValue, kStream);
  kStream->vfptr->SaveLinkID(kStream, (NiObject *)v2->m_spData.m_pObject);
}

//----- (007E6510) --------------------------------------------------------
char __thiscall NiTransformInterpolator::IsEqual(NiTransformInterpolator *this, NiObject *pkObject)
{
  NiTransformInterpolator *v2; // esi@1
  NiTransformData *v4; // ecx@4

  v2 = this;
  if ( !NiKeyBasedInterpolator::IsEqual((NiKeyBasedInterpolator *)&this->vfptr, pkObject)
    || !(unsigned __int8)NiQuatTransform::operator==(
                           &v2->m_kTransformValue,
                           (NiQuatTransform *)&pkObject[1].m_uiRefCount) )
  {
    return 0;
  }
  v4 = v2->m_spData.m_pObject;
  if ( v4 )
  {
    if ( !pkObject[5].m_uiRefCount )
      return 0;
    if ( v4 )
      goto LABEL_13;
  }
  if ( pkObject[5].m_uiRefCount )
    return 0;
  if ( v4 )
  {
LABEL_13:
    if ( (unsigned __int8)((int (__stdcall *)(_DWORD))v4->vfptr[7].__vecDelDtor)(pkObject[5].m_uiRefCount) )
      return 1;
    return 0;
  }
  return 1;
}

//----- (007E6570) --------------------------------------------------------
void __thiscall NiTransformInterpolator::NiTransformInterpolator(NiTransformInterpolator *this, NiTransformData *pkData)
{
  NiTransformInterpolator *v2; // esi@1

  v2 = this;
  NiKeyBasedInterpolator::NiKeyBasedInterpolator((NiKeyBasedInterpolator *)&this->vfptr);
  v2->vfptr = (NiRefObjectVtbl *)&NiTransformInterpolator::`vftable';
  v2->m_kTransformValue.m_kTranslate = NiQuatTransform::INVALID_TRANSLATE;
  v2->m_kTransformValue.m_kRotate = NiQuatTransform::INVALID_ROTATE;
  v2->m_kTransformValue.m_fScale = -3.4028235e38;
  v2->m_spData.m_pObject = pkData;
  if ( pkData )
    InterlockedIncrement((volatile LONG *)&pkData->m_uiRefCount);
  v2->m_uiLastTransIdx = 0;
  v2->m_uiLastRotIdx = 0;
  v2->m_uiLastScaleIdx = 0;
}
// 9E61AC: using guessed type int (__thiscall *NiTransformInterpolator::`vftable')(void *p, char);
// A7CAD0: using guessed type const struct NiPoint3 NiQuatTransform::INVALID_TRANSLATE;

//----- (007E6600) --------------------------------------------------------
NiRTTI *NiTransformInterpolator::GetRTTI()
{
  return &NiTransformInterpolator::m_RTTI;
}

//----- (007E6610) --------------------------------------------------------
void __thiscall NiTransformInterpolator::NiTransformInterpolator(NiTransformInterpolator *this, NiQuatTransform kPoseValue)
{
  NiTransformInterpolator *v2; // ebx@1

  v2 = this;
  NiKeyBasedInterpolator::NiKeyBasedInterpolator((NiKeyBasedInterpolator *)&this->vfptr);
  qmemcpy(&v2->m_kTransformValue, &kPoseValue, sizeof(v2->m_kTransformValue));
  v2->vfptr = (NiRefObjectVtbl *)&NiTransformInterpolator::`vftable';
  v2->m_spData.m_pObject = 0;
  v2->m_uiLastTransIdx = 0;
  v2->m_uiLastRotIdx = 0;
  v2->m_uiLastScaleIdx = 0;
}
// 9E61AC: using guessed type int (__thiscall *NiTransformInterpolator::`vftable')(void *p, char);

//----- (007E6650) --------------------------------------------------------
void __thiscall NiTransformInterpolator::GetActiveTimeRange(NiTransformInterpolator *this, float *fBeginKeyTime, float *fEndKeyTime)
{
  NiTransformData *v3; // ecx@1
  float *v4; // edi@1
  unsigned int v5; // edx@2
  char v6; // bl@2
  float *v7; // esi@2
  unsigned int v8; // esi@9
  char v9; // bl@9
  float *v10; // edx@9
  float **v11; // esi@11
  int v12; // edi@12
  float *v13; // edx@13
  unsigned __int8 v14; // bl@13
  unsigned int v15; // edx@26
  char v16; // bl@26
  float *v17; // ecx@26
  signed int v18; // [sp+Ch] [bp-10h]@11
  char *v19; // [sp+10h] [bp-Ch]@11
  float fKeyTime; // [sp+14h] [bp-8h]@3
  float fKeyTimea; // [sp+14h] [bp-8h]@5
  float fKeyTimeb; // [sp+14h] [bp-8h]@13
  float fKeyTimec; // [sp+14h] [bp-8h]@15
  bool bKeys; // [sp+1Bh] [bp-1h]@1
  float *fEndKeyTimea; // [sp+28h] [bp+Ch]@20
  float *fEndKeyTimeb; // [sp+28h] [bp+Ch]@22
  float *fEndKeyTimec; // [sp+28h] [bp+Ch]@27
  float *fEndKeyTimed; // [sp+28h] [bp+Ch]@29

  v3 = this->m_spData.m_pObject;
  *fBeginKeyTime = 3.4028235e38;
  v4 = fEndKeyTime;
  *fEndKeyTime = -3.4028235e38;
  bKeys = 0;
  if ( !v3 )
    goto LABEL_35;
  v5 = v3->m_uiNumPosKeys;
  v6 = v3->m_ucPosSize;
  v7 = &v3->m_pkPosKeys->m_fTime;
  if ( v5 )
  {
    fKeyTime = *v7;
    if ( *fBeginKeyTime > (double)fKeyTime )
      *fBeginKeyTime = fKeyTime;
    fKeyTimea = *(float *)((char *)v7 + (unsigned __int8)v6 * (v5 - 1));
    if ( *fEndKeyTime < (double)fKeyTimea )
      *fEndKeyTime = fKeyTimea;
    bKeys = 1;
  }
  if ( !v3 )
    goto LABEL_35;
  v8 = v3->m_uiNumRotKeys;
  v9 = v3->m_ucRotSize;
  v10 = &v3->m_pkRotKeys->m_fTime;
  if ( v8 )
  {
    if ( v3->m_eRotType == 4 )
    {
      v19 = (char *)(v10 + 11);
      v11 = (float **)(v10 + 12);
      v18 = 3;
      do
      {
        v12 = (int)*(v11 - 7);
        if ( v12 )
        {
          v13 = *v11;
          v14 = *v19;
          fKeyTimeb = **v11;
          if ( *fBeginKeyTime > (double)fKeyTimeb )
            *fBeginKeyTime = fKeyTimeb;
          fKeyTimec = *(float *)((char *)v13 + v14 * (v12 - 1));
          if ( *fEndKeyTime < (double)fKeyTimec )
            *fEndKeyTime = fKeyTimec;
          bKeys = 1;
        }
        ++v19;
        ++v11;
        --v18;
      }
      while ( v18 );
      v4 = fEndKeyTime;
    }
    else
    {
      fEndKeyTimea = *(float **)v10;
      if ( *fBeginKeyTime > (double)*(float *)&fEndKeyTimea )
        *fBeginKeyTime = *(float *)&fEndKeyTimea;
      fEndKeyTimeb = *(float **)((char *)v10 + (unsigned __int8)v9 * (v8 - 1));
      if ( *v4 < (double)*(float *)&fEndKeyTimeb )
        *v4 = *(float *)&fEndKeyTimeb;
      bKeys = 1;
    }
  }
  if ( v3 && (v15 = v3->m_uiNumScaleKeys, v16 = v3->m_ucScaleSize, v17 = &v3->m_pkScaleKeys->m_fTime, v15) )
  {
    fEndKeyTimec = *(float **)v17;
    if ( *fBeginKeyTime > (double)*(float *)&fEndKeyTimec )
      *fBeginKeyTime = *(float *)&fEndKeyTimec;
    fEndKeyTimed = *(float **)((char *)v17 + (unsigned __int8)v16 * (v15 - 1));
    if ( *v4 < (double)*(float *)&fEndKeyTimed )
      *v4 = *(float *)&fEndKeyTimed;
  }
  else
  {
LABEL_35:
    if ( !bKeys )
    {
      *fBeginKeyTime = 0.0;
      *v4 = 0.0;
    }
  }
}

//----- (007E6830) --------------------------------------------------------
NiInterpolator *__thiscall NiTransformInterpolator::GetSequenceInterpolator(NiTransformInterpolator *this, float fStartTime, float fEndTime)
{
  NiTransformInterpolator *v3; // esi@1
  NiInterpolator *result; // eax@1
  NiTransformData *v5; // ecx@1
  NiInterpolator *v6; // edi@1
  float v7; // eax@2
  float v8; // esi@2
  float v9; // ebx@2
  void (__thiscall ***v10)(_DWORD, _DWORD); // esi@11

  v3 = this;
  result = (NiInterpolator *)NiInterpolator::GetSequenceInterpolator(
                               (NiInterpolator *)&this->vfptr,
                               fStartTime,
                               fEndTime);
  v5 = v3->m_spData.m_pObject;
  v6 = result;
  if ( v5 )
  {
    NiTransformData::GetSequenceData(v5, (NiPointer<NiTransformData> *)&fEndTime, fStartTime, fEndTime);
    v7 = fEndTime;
    v8 = v6[3].m_fLastTime;
    v9 = fEndTime;
    if ( LODWORD(v8) != LODWORD(fEndTime) )
    {
      if ( v8 != 0.0 )
      {
        if ( !InterlockedDecrement((volatile LONG *)(LODWORD(v8) + 4)) && v8 != 0.0 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))LODWORD(v8))(LODWORD(v8), 1);
        v7 = fEndTime;
      }
      v6[3].m_fLastTime = v9;
      if ( v9 != 0.0 )
      {
        InterlockedIncrement((volatile LONG *)(LODWORD(v9) + 4));
        v7 = fEndTime;
      }
    }
    v6[4].vfptr = 0;
    v6[4].m_uiRefCount = 0;
    LODWORD(v6[4].m_fLastTime) = 0;
    if ( v7 != 0.0 )
    {
      v10 = (void (__thiscall ***)(_DWORD, _DWORD))LODWORD(v7);
      if ( !InterlockedDecrement((volatile LONG *)(LODWORD(v7) + 4)) )
      {
        if ( v10 )
          (**v10)(v10, 1);
      }
    }
    result = v6;
  }
  return result;
}

//----- (007E68F0) --------------------------------------------------------
char __thiscall NiTransformInterpolator::Update(NiTransformInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiQuatTransform *kValue)
{
  NiTransformInterpolator *v4; // ebx@1
  double v5; // st7@1
  double v6; // st7@2
  NiTransformData *v8; // eax@7
  unsigned int v9; // esi@8
  char v10; // cl@8
  NiAnimationKey::KeyType v11; // edi@8
  NiPosKey *v12; // eax@8
  NiPoint3 *v13; // eax@9
  NiTransformData *v14; // eax@10
  unsigned int v15; // esi@11
  char v16; // cl@11
  NiAnimationKey::KeyType v17; // edi@11
  NiRotKey *v18; // eax@11
  float v19; // ST04_4@12
  NiQuaternion *v20; // eax@12
  NiTransformData *v21; // eax@13
  unsigned int v22; // esi@14
  char v23; // cl@14
  NiAnimationKey::KeyType v24; // edi@14
  NiFloatKey *v25; // eax@14
  float v26; // ST04_4@15
  double v27; // st6@16
  NiQuaternion result; // [sp+24h] [bp-14h]@9
  int ucSize; // [sp+34h] [bp-4h]@8
  float fTimea; // [sp+40h] [bp+8h]@2
  float fTimeb; // [sp+40h] [bp+8h]@16

  v4 = this;
  v5 = fTime;
  if ( fTime == this->m_fLastTime )
  {
    qmemcpy(kValue, &this->m_kTransformValue, sizeof(NiQuatTransform));
    fTimea = -3.4028235e38;
    v6 = fTimea;
    if ( fTimea != this->m_kTransformValue.m_fScale || v6 != this->m_kTransformValue.m_kRotate.m_fX )
      return 1;
    if ( this->m_kTransformValue.m_kTranslate.x == v6 )
      return 0;
  }
  else
  {
    v8 = this->m_spData.m_pObject;
    if ( v8 )
    {
      v9 = v8->m_uiNumPosKeys;
      v10 = v8->m_ucPosSize;
      v11 = v8->m_ePosType;
      v12 = v8->m_pkPosKeys;
      LOBYTE(ucSize) = v10;
      if ( v9 )
      {
        v13 = NiPosKey::GenInterp((NiPoint3 *)&result.m_fX, fTime, v12, v11, v9, &v4->m_uiLastTransIdx, ucSize);
        v5 = fTime;
        v4->m_kTransformValue.m_kTranslate.x = v13->x;
        v4->m_kTransformValue.m_kTranslate.y = v13->y;
        v4->m_kTransformValue.m_kTranslate.z = v13->z;
      }
    }
    v14 = v4->m_spData.m_pObject;
    if ( v14 )
    {
      v15 = v14->m_uiNumRotKeys;
      v16 = v14->m_ucRotSize;
      v17 = v14->m_eRotType;
      v18 = v14->m_pkRotKeys;
      LOBYTE(ucSize) = v16;
      if ( v15 )
      {
        v19 = v5;
        v20 = NiRotKey::GenInterp(&result, v19, v18, v17, v15, &v4->m_uiLastRotIdx, ucSize);
        v5 = fTime;
        v4->m_kTransformValue.m_kRotate.m_fW = v20->m_fW;
        v4->m_kTransformValue.m_kRotate.m_fX = v20->m_fX;
        v4->m_kTransformValue.m_kRotate.m_fY = v20->m_fY;
        v4->m_kTransformValue.m_kRotate.m_fZ = v20->m_fZ;
      }
    }
    v21 = v4->m_spData.m_pObject;
    if ( v21 )
    {
      v22 = v21->m_uiNumScaleKeys;
      v23 = v21->m_ucScaleSize;
      v24 = v21->m_eScaleType;
      v25 = v21->m_pkScaleKeys;
      LOBYTE(ucSize) = v23;
      if ( v22 )
      {
        v26 = v5;
        v4->m_kTransformValue.m_fScale = NiFloatKey::GenInterp(v26, v25, v24, v22, &v4->m_uiLastScaleIdx, ucSize);
        v5 = fTime;
      }
    }
    qmemcpy(kValue, &v4->m_kTransformValue, sizeof(NiQuatTransform));
    fTimeb = -3.4028235e38;
    v27 = fTimeb;
    if ( fTimeb == v4->m_kTransformValue.m_fScale
      && v27 == v4->m_kTransformValue.m_kRotate.m_fX
      && v4->m_kTransformValue.m_kTranslate.x == v27 )
    {
      return 0;
    }
    v4->m_fLastTime = v5;
  }
  return 1;
}

//----- (007E6AB0) --------------------------------------------------------
void __thiscall NiTransformInterpolator::Collapse(NiTransformInterpolator *this)
{
  NiTransformInterpolator *v1; // ebx@1
  NiTransformData *v2; // esi@1
  unsigned int v3; // eax@2
  NiPosKey *v4; // edi@2
  NiAnimationKey::KeyType v5; // ecx@2
  float v6; // edx@4
  float v7; // eax@4
  unsigned int v8; // ebx@8
  float v9; // edx@15
  float v10; // eax@15
  float v11; // ecx@15
  NiTransformData *v12; // ecx@17
  unsigned int v13; // eax@17
  NiAnimationKey::KeyType v14; // esi@17
  NiRotKey *v15; // edx@17
  float v16; // ecx@20
  float v17; // eax@20
  NiTransformData *v18; // ecx@21
  unsigned int v19; // esi@21
  NiAnimationKey::KeyType v20; // eax@21
  NiFloatKey *v21; // edi@21
  unsigned int v22; // edi@30
  char v23; // bl@44
  unsigned int v24; // edx@44
  double v25; // st7@51
  NiTransformData *v26; // eax@53
  NiTransformData *v27; // esi@56
  bool v28; // zf@63
  NiQuatTransform kCollapsedTransform; // [sp+8h] [bp-3Ch]@2
  float v30; // [sp+28h] [bp-1Ch]@26
  NiPoint3 kValue; // [sp+2Ch] [bp-18h]@5
  float fValue; // [sp+38h] [bp-Ch]@41
  NiTransformInterpolator *v33; // [sp+3Ch] [bp-8h]@1
  bool bCollapse; // [sp+43h] [bp-1h]@8

  v1 = this;
  v2 = this->m_spData.m_pObject;
  v33 = this;
  if ( !v2 )
    return;
  kCollapsedTransform.m_fScale = -3.4028235e38;
  kCollapsedTransform.m_kTranslate = NiQuatTransform::INVALID_TRANSLATE;
  kCollapsedTransform.m_kRotate = NiQuatTransform::INVALID_ROTATE;
  v3 = v2->m_uiNumPosKeys;
  v4 = v2->m_pkPosKeys;
  v5 = v2->m_ePosType;
  if ( v3 )
  {
    kValue.x = v4->m_Pos.x;
    kValue.y = v4->m_Pos.y;
    kValue.z = v4->m_Pos.z;
    if ( v3 != 1 )
    {
      if ( v5 != 1 && v5 != 5 )
      {
LABEL_14:
        if ( -3.4028235e38 == v1->m_kTransformValue.m_kTranslate.x )
          goto LABEL_17;
        v9 = v1->m_kTransformValue.m_kTranslate.x;
        v10 = v1->m_kTransformValue.m_kTranslate.y;
        v11 = v1->m_kTransformValue.m_kTranslate.z;
        goto LABEL_16;
      }
      bCollapse = 1;
      v8 = 1;
      while ( v8 < v2->m_uiNumPosKeys )
      {
        if ( (unsigned __int8)NiColor::operator!=(
                                (NiColor *)((char *)&v4->m_Pos + v8 * v2->m_ucPosSize),
                                (NiColor *)&kValue) )
          bCollapse = 0;
        ++v8;
        if ( !bCollapse )
          goto LABEL_13;
      }
      if ( !bCollapse )
      {
LABEL_13:
        v1 = v33;
        goto LABEL_14;
      }
      v1 = v33;
    }
    NiTransformData::ReplacePosAnim(v2, 0, 0, 0);
    v9 = kValue.x;
    v10 = kValue.y;
    v11 = kValue.z;
LABEL_16:
    kCollapsedTransform.m_kTranslate.z = v11;
    kCollapsedTransform.m_kTranslate.y = v10;
    kCollapsedTransform.m_kTranslate.x = v9;
    goto LABEL_17;
  }
  NiTransformData::ReplacePosAnim(v2, 0, 0, 0);
  if ( -3.4028235e38 != v1->m_kTransformValue.m_kTranslate.x )
  {
    v6 = v1->m_kTransformValue.m_kTranslate.y;
    v7 = v1->m_kTransformValue.m_kTranslate.z;
    kCollapsedTransform.m_kTranslate.x = v1->m_kTransformValue.m_kTranslate.x;
    kCollapsedTransform.m_kTranslate.y = v6;
    kCollapsedTransform.m_kTranslate.z = v7;
  }
LABEL_17:
  v12 = v1->m_spData.m_pObject;
  v13 = v12->m_uiNumRotKeys;
  v14 = v12->m_eRotType;
  v15 = v12->m_pkRotKeys;
  if ( v13 )
  {
    v30 = v15->m_quat.m_fW;
    kValue.x = v15->m_quat.m_fX;
    kValue.y = v15->m_quat.m_fY;
    kValue.z = v15->m_quat.m_fZ;
    if ( v13 == 1 && v14 != 4 )
      goto LABEL_68;
    if ( v14 == 1 || v14 == 5 )
    {
      bCollapse = 1;
      v22 = 1;
      while ( v22 < v12->m_uiNumRotKeys )
      {
        if ( v30 != *(float *)((char *)&v15->m_quat.m_fW + v22 * v12->m_ucRotSize)
          || kValue.x != *(float *)((char *)&v15->m_quat.m_fX + v22 * v12->m_ucRotSize)
          || kValue.y != *(float *)((char *)&v15->m_quat.m_fY + v22 * v12->m_ucRotSize)
          || kValue.z != *(float *)((char *)&v15->m_quat.m_fZ + v22 * v12->m_ucRotSize) )
        {
          bCollapse = 0;
        }
        ++v22;
        if ( !bCollapse )
          goto LABEL_19;
      }
      if ( bCollapse )
      {
LABEL_68:
        NiTransformData::ReplaceRotAnim(v12, 0, 0, 0);
        kCollapsedTransform.m_kRotate.m_fW = v30;
        *(NiPoint3 *)&kCollapsedTransform.m_kRotate.m_fX = kValue;
        goto LABEL_21;
      }
    }
  }
  else
  {
    NiTransformData::ReplaceRotAnim(v12, 0, 0, 0);
  }
LABEL_19:
  if ( -3.4028235e38 != v1->m_kTransformValue.m_kRotate.m_fX )
  {
    v16 = v1->m_kTransformValue.m_kRotate.m_fY;
    v17 = v1->m_kTransformValue.m_kRotate.m_fX;
    kCollapsedTransform.m_kRotate.m_fW = v1->m_kTransformValue.m_kRotate.m_fW;
    kCollapsedTransform.m_kRotate.m_fZ = v1->m_kTransformValue.m_kRotate.m_fZ;
    kCollapsedTransform.m_kRotate.m_fY = v16;
    kCollapsedTransform.m_kRotate.m_fX = v17;
  }
LABEL_21:
  v18 = v1->m_spData.m_pObject;
  v19 = v18->m_uiNumScaleKeys;
  v20 = v18->m_eScaleType;
  v21 = v18->m_pkScaleKeys;
  if ( v19 )
  {
    fValue = v21->m_fValue;
    if ( v19 == 1 )
    {
      NiTransformData::ReplaceScaleAnim(v18, 0, 0, 0);
      v25 = fValue;
      goto LABEL_52;
    }
    if ( v20 == 1 || v20 == 5 )
    {
      v23 = 1;
      v24 = 1;
      while ( v24 < v19 )
      {
        if ( fValue != *(float *)((char *)&v21->m_fValue + v24 * v18->m_ucScaleSize) )
          v23 = 0;
        ++v24;
        if ( !v23 )
        {
          v1 = v33;
          goto LABEL_50;
        }
      }
      v28 = v23 == 0;
      v1 = v33;
      if ( !v28 )
      {
        NiTransformData::ReplaceScaleAnim(v18, 0, 0, 0);
        v25 = fValue;
        goto LABEL_52;
      }
    }
  }
  else
  {
    NiTransformData::ReplaceScaleAnim(v18, 0, 0, 0);
  }
LABEL_50:
  if ( -3.4028235e38 == v1->m_kTransformValue.m_fScale )
    goto LABEL_53;
  v25 = v1->m_kTransformValue.m_fScale;
LABEL_52:
  kCollapsedTransform.m_fScale = v25;
LABEL_53:
  v26 = v1->m_spData.m_pObject;
  if ( !v26->m_uiNumPosKeys && !v26->m_uiNumRotKeys && !v26->m_uiNumScaleKeys )
  {
    v27 = v1->m_spData.m_pObject;
    if ( v26 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v26->m_uiRefCount) )
      {
        if ( v27 )
          v27->vfptr->__vecDelDtor((NiRefObject *)v27, 1u);
      }
      v1->m_spData.m_pObject = 0;
    }
  }
  qmemcpy(&v1->m_kTransformValue, &kCollapsedTransform, sizeof(v1->m_kTransformValue));
}
// A7CAD0: using guessed type const struct NiPoint3 NiQuatTransform::INVALID_TRANSLATE;

//----- (007E6E30) --------------------------------------------------------
void __thiscall NiTransformInterpolator::CopyMembers(NiTransformInterpolator *this, NiTransformInterpolator *pkDest, NiCloningProcess *kCloning)
{
  NiTransformInterpolator *v3; // ebx@1
  NiTransformData *v4; // esi@1
  NiTransformData *v5; // eax@6

  v3 = this;
  NiBackToFrontAccumulator::CopyMembers((NiBackToFrontAccumulator *)this, (NiBackToFrontAccumulator *)pkDest, kCloning);
  qmemcpy(&pkDest->m_kTransformValue, &v3->m_kTransformValue, sizeof(pkDest->m_kTransformValue));
  v4 = pkDest->m_spData.m_pObject;
  if ( v4 != v3->m_spData.m_pObject )
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v5 = v3->m_spData.m_pObject;
    pkDest->m_spData.m_pObject = v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  }
  pkDest->m_uiLastTransIdx = v3->m_uiLastTransIdx;
  pkDest->m_uiLastRotIdx = v3->m_uiLastRotIdx;
  pkDest->m_uiLastScaleIdx = v3->m_uiLastScaleIdx;
}

//----- (007E6EB0) --------------------------------------------------------
NiKeyBasedInterpolator *__cdecl NiTransformInterpolator::CreateObject()
{
  NiKeyBasedInterpolator *v0; // eax@1
  NiKeyBasedInterpolator *v1; // esi@1
  NiKeyBasedInterpolator *result; // eax@2

  v0 = (NiKeyBasedInterpolator *)operator new(0x3Cu);
  v1 = v0;
  if ( v0 )
  {
    NiKeyBasedInterpolator::NiKeyBasedInterpolator(v0);
    v1->vfptr = (NiRefObjectVtbl *)&NiTransformInterpolator::`vftable';
    v1[1] = (NiKeyBasedInterpolator)NiQuatTransform::INVALID_TRANSLATE;
    *(NiQuaternion *)&v1[2].vfptr = NiQuatTransform::INVALID_ROTATE;
    *(float *)&v1[3].m_uiRefCount = -3.4028235e38;
    LODWORD(v1[3].m_fLastTime) = 0;
    v1[4].vfptr = 0;
    v1[4].m_uiRefCount = 0;
    LODWORD(v1[4].m_fLastTime) = 0;
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E61AC: using guessed type int (__thiscall *NiTransformInterpolator::`vftable')(void *p, char);
// A7CAD0: using guessed type const struct NiPoint3 NiQuatTransform::INVALID_TRANSLATE;

//----- (007E6F30) --------------------------------------------------------
NiTransformInterpolator *__thiscall NiTransformInterpolator::`scalar deleting destructor'(NiTransformInterpolator *this, unsigned int a2)
{
  NiTransformInterpolator *v2; // edi@1
  NiTransformData *v3; // esi@1

  v2 = this;
  v3 = this->m_spData.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  NiKeyBasedInterpolator::~NiKeyBasedInterpolator((NiKeyBasedInterpolator *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007E6F80) --------------------------------------------------------
NiTransformInterpolator *__thiscall NiTransformInterpolator::CreateClone(NiTransformInterpolator *this, NiCloningProcess *kCloning)
{
  NiTransformInterpolator *v2; // ebx@1
  NiKeyBasedInterpolator *v3; // eax@1
  NiTransformInterpolator *v4; // esi@1

  v2 = this;
  v3 = (NiKeyBasedInterpolator *)operator new(0x3Cu);
  v4 = (NiTransformInterpolator *)v3;
  if ( v3 )
  {
    NiKeyBasedInterpolator::NiKeyBasedInterpolator(v3);
    v4->vfptr = (NiRefObjectVtbl *)&NiTransformInterpolator::`vftable';
    v4->m_kTransformValue.m_kTranslate = NiQuatTransform::INVALID_TRANSLATE;
    v4->m_kTransformValue.m_kRotate = NiQuatTransform::INVALID_ROTATE;
    v4->m_kTransformValue.m_fScale = -3.4028235e38;
    v4->m_spData.m_pObject = 0;
    v4->m_uiLastTransIdx = 0;
    v4->m_uiLastRotIdx = 0;
    v4->m_uiLastScaleIdx = 0;
  }
  else
  {
    v4 = 0;
  }
  NiTransformInterpolator::CopyMembers(v2, v4, kCloning);
  return v4;
}
// 9E61AC: using guessed type int (__thiscall *NiTransformInterpolator::`vftable')(void *p, char);
// A7CAD0: using guessed type const struct NiPoint3 NiQuatTransform::INVALID_TRANSLATE;

//----- (007E7020) --------------------------------------------------------
void __thiscall NiTransformInterpolator::GetViewerStrings(NiTransformInterpolator *this, NiTArray<char *> *pkStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiTransformInterpolator *v3; // edi@1
  NiTArray<char *> *v4; // eax@1
  unsigned int v5; // ebx@1
  NiTransformData *v6; // ecx@3

  v2 = (NiTArray<NiVBBlock *> *)pkStrings;
  v3 = this;
  NiKeyBasedInterpolator::GetViewerStrings((NiKeyBasedInterpolator *)&this->vfptr, pkStrings);
  v4 = (NiTArray<char *> *)NiGetViewerString(NiTransformInterpolator::m_RTTI.m_pcName);
  v5 = v2->m_uiSize;
  pkStrings = v4;
  if ( v5 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v5 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v5, (NiVBChip *const *)&pkStrings);
  NiQuatTransform::GetViewerStrings(&v3->m_kTransformValue, (NiTArray<char *> *)v2);
  v6 = v3->m_spData.m_pObject;
  if ( v6 )
    ((void (__stdcall *)(_DWORD))v6->vfptr[8].__vecDelDtor)(v2);
}

//----- (007E7090) --------------------------------------------------------
char __thiscall NiStringPalette::IsEqual(NiStringPalette *this, NiObject *pkObject)
{
  NiStringPalette *v2; // esi@1
  unsigned int v3; // eax@2
  char *v4; // ecx@5
  NiRefObjectVtbl *v5; // esi@5

  v2 = this;
  if ( NiObject::IsEqual((NiObject *)&this->vfptr, pkObject) )
  {
    v3 = v2->m_uiAllocatedSize;
    if ( pkObject[1].m_uiRefCount == v3 && pkObject[2].vfptr == (NiRefObjectVtbl *)v2->m_uiEndOfBuffer )
    {
      if ( !v3 )
        return 1;
      v4 = v2->m_pcBuffer;
      v5 = pkObject[1].vfptr;
      if ( v3 >= 4 )
      {
        while ( v5->__vecDelDtor == *(void *(__thiscall **)(NiRefObject *, unsigned int))v4 )
        {
          v3 -= 4;
          v4 += 4;
          ++v5;
          if ( v3 < 4 )
            goto LABEL_8;
        }
        return 0;
      }
LABEL_8:
      if ( !v3 )
        return 1;
      if ( *v4 == LOBYTE(v5->__vecDelDtor)
        && (v3 <= 1 || v4[1] == BYTE1(v5->__vecDelDtor) && (v3 <= 2 || v4[2] == BYTE2(v5->__vecDelDtor))) )
      {
        return 1;
      }
    }
  }
  return 0;
}

//----- (007E7110) --------------------------------------------------------
NiObject *__cdecl NiStringPalette::CreateObject()
{
  NiObject *v0; // eax@1
  NiObject *v1; // esi@1
  NiObject *result; // eax@2

  v0 = (NiObject *)operator new(0x14u);
  v1 = v0;
  if ( v0 )
  {
    NiObject::NiObject(v0);
    v1->vfptr = (NiRefObjectVtbl *)&NiStringPalette::`vftable';
    v1[1].vfptr = 0;
    v1[1].m_uiRefCount = 0;
    v1[2].vfptr = 0;
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E56DC: using guessed type int (__thiscall *NiStringPalette::`vftable')(void *p, char);

//----- (007E7150) --------------------------------------------------------
void __thiscall NiStringPalette::SaveBinary(NiStringPalette *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiStringPalette *v3; // esi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST00_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  unsigned int (__cdecl *v7)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@2
  char *v8; // ST04_4@2
  NiBinaryStream *v9; // ST00_4@2
  NiBinaryStream *v10; // edi@3
  unsigned int (__cdecl *v11)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // ecx@3
  int v12; // [sp+Ch] [bp-4h]@1

  v2 = kStream;
  v3 = this;
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue(
    (NiVBDynamicSet *)this,
    (IDirect3DVertexBuffer9 *)kStream);
  kStream = (NiStream *)v3->m_uiEndOfBuffer;
  v4 = v2->m_pkOstr;
  v5 = v4;
  v6 = v4->m_pfnWrite;
  v12 = 4;
  v6(v5, &kStream, 4u, (unsigned int *)&v12, 1u);
  if ( kStream )
  {
    v7 = v2->m_pkOstr->m_pfnWrite;
    v8 = v3->m_pcBuffer;
    v9 = v2->m_pkOstr;
    v12 = 1;
    v7(v9, v8, (unsigned int)kStream, (unsigned int *)&v12, 1u);
  }
  v10 = v2->m_pkOstr;
  v11 = v10->m_pfnWrite;
  v12 = 4;
  v11(v10, &v3->m_uiEndOfBuffer, 4u, (unsigned int *)&v12, 1u);
}

//----- (007E71E0) --------------------------------------------------------
void __thiscall NiStringPalette::LoadBinary(NiStringPalette *this, NiStream *kStream)
{
  NiStream *v2; // ebx@1
  NiStringPalette *v3; // esi@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@1
  unsigned int *v5; // edi@1
  NiBinaryStream *v6; // ST04_4@1
  char *v7; // eax@2
  unsigned int v8; // ST08_4@2
  char *v9; // ST04_4@2
  unsigned int (__cdecl *v10)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@2
  NiBinaryStream *v11; // ST00_4@2
  NiBinaryStream *v12; // ebx@3
  unsigned int (__cdecl *v13)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@3

  v2 = kStream;
  v3 = this;
  NiObject::LoadBinary((NiObject *)&this->vfptr, kStream);
  v4 = v2->m_pkIstr->m_pfnRead;
  v5 = &v3->m_uiAllocatedSize;
  v6 = v2->m_pkIstr;
  kStream = (NiStream *)4;
  v4(v6, &v3->m_uiAllocatedSize, 4u, (unsigned int *)&kStream, 1u);
  if ( v3->m_uiAllocatedSize )
  {
    v7 = (char *)operator new(*v5);
    v8 = *v5;
    v3->m_pcBuffer = v7;
    v9 = v7;
    v10 = v2->m_pkIstr->m_pfnRead;
    v11 = v2->m_pkIstr;
    kStream = (NiStream *)1;
    v10(v11, v9, v8, (unsigned int *)&kStream, 1u);
  }
  v12 = v2->m_pkIstr;
  v13 = v12->m_pfnRead;
  kStream = (NiStream *)4;
  v13(v12, &v3->m_uiEndOfBuffer, 4u, (unsigned int *)&kStream, 1u);
}

//----- (007E7270) --------------------------------------------------------
NiRTTI *NiSequenceStreamHelper::GetRTTI()
{
  return &NiSequenceStreamHelper::m_RTTI;
}

//----- (007E7280) --------------------------------------------------------
NiObject *__cdecl NiSequenceStreamHelper::CreateObject()
{
  NiObjectNET *v0; // eax@1
  NiObject *v1; // esi@1
  NiObject *result; // eax@2

  v0 = (NiObjectNET *)operator new(0x1Cu);
  v1 = (NiObject *)v0;
  if ( v0 )
  {
    NiObjectNET::NiObjectNET(v0);
    v1->vfptr = (NiRefObjectVtbl *)&NiSequenceStreamHelper::`vftable';
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E6254: using guessed type int (__thiscall *NiSequenceStreamHelper::`vftable')(void *p, char);

//----- (007E72B0) --------------------------------------------------------
bool __thiscall NiSequence::IsEqual(NiAccumulator *this, NiObject *pkObject)
{
  return NiObject::IsEqual((NiObject *)&this->vfptr, pkObject);
}

//----- (007E72C0) --------------------------------------------------------
void __thiscall NiTArray<NiPointer<NiActorManager::CallbackData>>::SetAt(NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *this, unsigned int uiIndex, NiPointer<NiD3DShaderConstantMapEntry> *element)
{
  NiPointer<NiD3DShaderConstantMapEntry> *v3; // edx@5
  NiPointer<NiD3DShaderConstantMapEntry> *v4; // ecx@10
  NiD3DShaderConstantMapEntry *v5; // esi@10
  NiPointer<NiD3DShaderConstantMapEntry> *v6; // edi@10
  NiD3DShaderConstantMapEntry *v7; // eax@15

  if ( uiIndex < this->m_uiMaxSize )
  {
    if ( uiIndex < this->m_uiSize )
    {
      v3 = this->m_pBase;
      if ( element->m_pObject )
      {
        if ( v3[uiIndex].m_pObject == 0 )
          ++this->m_uiESize;
      }
      else if ( v3[uiIndex].m_pObject != 0 )
      {
        --this->m_uiESize;
      }
    }
    else
    {
      this->m_uiSize = uiIndex + 1;
      if ( element->m_pObject )
        ++this->m_uiESize;
    }
    v4 = this->m_pBase;
    v5 = v4[uiIndex].m_pObject;
    v6 = &v4[uiIndex];
    if ( v5 != element->m_pObject )
    {
      if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
      v7 = element->m_pObject;
      v6->m_pObject = element->m_pObject;
      if ( v7 )
        InterlockedIncrement((volatile LONG *)&v7->m_uiRefCount);
    }
  }
}

//----- (007E7360) --------------------------------------------------------
NiPointer<NiAVObject> *__thiscall NiTArray<NiPointer<NiControllerSequence>>::RemoveAt(NiTArray<NiPointer<NiAVObject> > *this, NiPointer<NiAVObject> *result, unsigned int uiIndex)
{
  NiTArray<NiPointer<NiAVObject> > *v3; // esi@1
  NiPointer<NiAVObject> *v4; // eax@2
  NiAVObject *v5; // ebx@3
  NiAVObject **v6; // esi@5
  NiAVObject *v7; // edi@5
  int v8; // eax@12
  NiTArray<NiPointer<NiAVObject> > *v9; // [sp+4h] [bp-4h]@1

  v3 = this;
  v9 = this;
  if ( uiIndex < this->m_uiSize )
  {
    v5 = this->m_pBase[uiIndex].m_pObject;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
    v6 = &v3->m_pBase[uiIndex].m_pObject;
    v7 = *v6;
    if ( *v6 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      *v6 = 0;
    }
    if ( v5 )
      --v9->m_uiESize;
    v8 = v9->m_uiSize - 1;
    if ( uiIndex == v8 )
      v9->m_uiSize = v8;
    result->m_pObject = v5;
    if ( v5 )
    {
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
      if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
        v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    }
    v4 = result;
  }
  else
  {
    v4 = result;
    result->m_pObject = 0;
  }
  return v4;
}

//----- (007E7420) --------------------------------------------------------
void __thiscall NiTArray<NiPointer<NiTransformController>>::~NiTArray<NiPointer<NiTransformController>>(NiTArray<NiPointer<NiTransformController> > *this)
{
  NiPointer<NiTransformController> *v1; // eax@1
  NiTransformController *v2; // ebx@2
  NiPointer<NiTransformController> *v3; // ecx@2
  int v4; // edi@2
  int v5; // ebx@2
  int v6; // esi@3
  int v7; // [sp+0h] [bp-4h]@2

  v1 = this->m_pBase;
  this->vfptr = (NiTArray<NiPointer<NiTransformController> >Vtbl *)&NiTArray<NiPointer<NiTransformController>>::`vftable';
  if ( v1 )
  {
    v2 = v1[-1].m_pObject;
    v3 = v1 - 1;
    v4 = (int)&v1[(_DWORD)v2];
    v5 = (int)&v2[-1].m_spInterpolator.m_pObject + 3;
    v7 = (int)&v1[-1];
    if ( v5 >= 0 )
    {
      do
      {
        v6 = *(_DWORD *)(v4 - 4);
        v4 -= 4;
        if ( v6 && !InterlockedDecrement((volatile LONG *)(v6 + 4)) )
        {
          if ( v6 )
            (**(void (__thiscall ***)(_DWORD, _DWORD))v6)(v6, 1);
        }
        --v5;
      }
      while ( v5 >= 0 );
      v3 = (NiPointer<NiTransformController> *)v7;
    }
    operator delete(v3);
  }
}
// 9E6294: using guessed type int (__thiscall *NiTArray<NiPointer<NiTransformController>>::`vftable')(void *p, char);

//----- (007E7480) --------------------------------------------------------
NiTArray<NiPointer<NiTransformController> > *__thiscall NiTArray<NiPointer<NiTransformController>>::`vector deleting destructor'(NiTArray<NiPointer<NiTransformController> > *this, unsigned int a2)
{
  NiTArray<NiPointer<NiTransformController> > *v2; // esi@1

  v2 = this;
  NiTArray<NiPointer<NiTransformController>>::~NiTArray<NiPointer<NiTransformController>>(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007E74B0) --------------------------------------------------------
void __thiscall NiSequence::NiSequence(NiSequence *this, const char *pcName, unsigned int uiInitSize, unsigned int uiGrowBy)
{
  NiSequence *v4; // esi@1
  unsigned int v5; // kr00_4@2
  char *v6; // eax@2
  NiTextKeyExtraData *v7; // edi@4

  v4 = this;
  NiObject::NiObject((NiObject *)&this->vfptr);
  v4->vfptr = (NiRefObjectVtbl *)&NiSequence::`vftable';
  v4->m_kObjectName.vfptr = (NiTArray<char *>Vtbl *)&NiTArray<char *>::`vftable';
  v4->m_kObjectName.m_uiMaxSize = 0;
  v4->m_kObjectName.m_uiSize = 0;
  v4->m_kObjectName.m_uiESize = 0;
  v4->m_kObjectName.m_pBase = 0;
  v4->m_kObjectName.m_uiGrowBy = 1;
  v4->m_kCtrl.m_uiGrowBy = 1;
  v4->m_kCtrl.vfptr = (NiTArray<NiPointer<NiTransformController> >Vtbl *)&NiTArray<NiPointer<NiTransformController>>::`vftable';
  v4->m_kCtrl.m_uiMaxSize = 0;
  v4->m_kCtrl.m_uiSize = 0;
  v4->m_kCtrl.m_uiESize = 0;
  v4->m_kCtrl.m_pBase = 0;
  v4->m_spTextKeys.m_pObject = 0;
  if ( pcName )
  {
    v5 = strlen(pcName);
    v6 = (char *)operator new(v5 + 1);
    v4->m_pcName = v6;
    strcpy_s(v6, v5 + 1, pcName);
  }
  else
  {
    v4->m_pcName = 0;
  }
  NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize((NiTArray<NiVBBlock *> *)&v4->m_kObjectName, uiInitSize);
  v4->m_kObjectName.m_uiGrowBy = uiGrowBy;
  NiTArray<NiPointer<NiScreenElements>>::SetSize(
    (NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *)&v4->m_kCtrl,
    uiInitSize);
  v4->m_kCtrl.m_uiGrowBy = uiGrowBy;
  v7 = v4->m_spTextKeys.m_pObject;
  if ( v7 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v4->m_spTextKeys.m_pObject = 0;
  }
  v4->m_uiTextKeyReference = 0;
}
// 9E56D0: using guessed type int (__thiscall *NiTArray<char *>::`vftable')(void *p, char);
// 9E6294: using guessed type int (__thiscall *NiTArray<NiPointer<NiTransformController>>::`vftable')(void *p, char);
// 9E629C: using guessed type int (__thiscall *NiSequence::`vftable')(void *p, char);

//----- (007E7590) --------------------------------------------------------
NiRTTI *NiSequence::GetRTTI()
{
  return &NiSequence::m_RTTI;
}

//----- (007E75A0) --------------------------------------------------------
void __thiscall NiSequence::~NiSequence(NiSequence *this)
{
  NiSequence *v1; // esi@1
  char *v2; // ST04_4@1
  unsigned int v3; // ebx@1
  NiPointer<NiAVObject> *v4; // eax@2
  NiAVObject *v5; // edi@2
  NiAVObject *v6; // edi@7
  void *v7; // eax@12
  void **v8; // eax@13
  void *v9; // ecx@13
  int v10; // eax@15
  NiTextKeyExtraData *v11; // edi@19
  char **v12; // ST04_4@23
  NiPointer<NiAVObject> result; // [sp+Ch] [bp-8h]@2
  NiPointer<NiAVObject> *v14; // [sp+10h] [bp-4h]@2

  v1 = this;
  v2 = this->m_pcName;
  this->vfptr = (NiRefObjectVtbl *)&NiSequence::`vftable';
  operator delete(v2);
  v3 = 0;
  if ( v1->m_kCtrl.m_uiSize )
  {
    do
    {
      v4 = NiTArray<NiPointer<NiControllerSequence>>::RemoveAt(
             (NiTArray<NiPointer<NiAVObject> > *)&v1->m_kCtrl,
             &result,
             v3);
      v5 = v4->m_pObject;
      v14 = v4;
      if ( v5 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
          v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
        v14->m_pObject = 0;
      }
      v6 = result.m_pObject;
      if ( result.m_pObject && !InterlockedDecrement((volatile LONG *)&result.m_pObject->m_uiRefCount) && v6 )
        v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      if ( v3 < v1->m_kObjectName.m_uiSize )
      {
        v8 = (void **)&v1->m_kObjectName.m_pBase[v3];
        v9 = *v8;
        *v8 = 0;
        if ( v9 )
          --v1->m_kObjectName.m_uiESize;
        v10 = v1->m_kObjectName.m_uiSize - 1;
        if ( v3 == v10 )
          v1->m_kObjectName.m_uiSize = v10;
        v7 = v9;
      }
      else
      {
        v7 = 0;
      }
      operator delete(v7);
      ++v3;
    }
    while ( v3 < v1->m_kCtrl.m_uiSize );
  }
  v11 = v1->m_spTextKeys.m_pObject;
  if ( v11 && !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
    v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
  NiTArray<NiPointer<NiTransformController>>::~NiTArray<NiPointer<NiTransformController>>(&v1->m_kCtrl);
  v12 = v1->m_kObjectName.m_pBase;
  v1->m_kObjectName.vfptr = (NiTArray<char *>Vtbl *)&NiTArray<char *>::`vftable';
  operator delete(v12);
  NiRefObject::~NiRefObject((CPostProcessEffect *)v1);
}
// 9E56D0: using guessed type int (__thiscall *NiTArray<char *>::`vftable')(void *p, char);
// 9E629C: using guessed type int (__thiscall *NiSequence::`vftable')(void *p, char);

//----- (007E76B0) --------------------------------------------------------
unsigned int __thiscall NiSequence::AddNameControllerPair(NiSequence *this, const char *pcName, NiTransformController *pkController)
{
  NiSequence *v3; // ebx@1
  unsigned int v4; // esi@1
  unsigned int v5; // kr00_4@1
  NiTransformController *v6; // edi@3
  char *pcStoredName; // [sp+Ch] [bp-4h]@1

  v3 = this;
  v4 = this->m_kObjectName.m_uiSize;
  v5 = strlen(pcName);
  pcStoredName = (char *)operator new(v5 + 1);
  strcpy_s(pcStoredName, v5 + 1, pcName);
  if ( v4 >= v3->m_kObjectName.m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(
      (NiTArray<NiVBBlock *> *)&v3->m_kObjectName,
      v4 + v3->m_kObjectName.m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt(
    (NiTArray<NiVBChip *> *)&v3->m_kObjectName,
    v4,
    (NiVBChip *const *)&pcStoredName);
  v6 = pkController;
  pcName = (const char *)pkController;
  if ( pkController )
    InterlockedIncrement((volatile LONG *)&pkController->m_uiRefCount);
  if ( v4 >= v3->m_kCtrl.m_uiMaxSize )
    NiTArray<NiPointer<NiScreenElements>>::SetSize(
      (NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *)&v3->m_kCtrl,
      v4 + v3->m_kCtrl.m_uiGrowBy);
  NiTArray<NiPointer<NiActorManager::CallbackData>>::SetAt(
    (NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *)&v3->m_kCtrl,
    v4,
    (NiPointer<NiD3DShaderConstantMapEntry> *)&pcName);
  if ( v6 && !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  return v4;
}

//----- (007E7760) --------------------------------------------------------
void __cdecl NiSequence::CreateObject()
{
  NiSequence *v0; // eax@1

  v0 = (NiSequence *)operator new(0x44u);
  if ( v0 )
    NiSequence::NiSequence(v0, 0, 0xCu, 0xCu);
}

//----- (007E7780) --------------------------------------------------------
void __thiscall NiSequence::LoadBinary(NiSequence *this, NiStream *kStream)
{
  NiStream *v2; // ebx@1
  NiSequence *v3; // esi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST00_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v7; // eax@1
  NiBinaryStream *v8; // ST00_4@1
  unsigned int (__cdecl *v9)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  unsigned int v10; // edi@1
  NiStream *v11; // eax@4
  unsigned int uiNumKeys; // [sp+Ch] [bp-4h]@1

  v2 = kStream;
  v3 = this;
  NiObject::LoadBinary((NiObject *)&this->vfptr, kStream);
  v3->m_pcName = 0;
  NiStream::LoadCString(v2, &v3->m_pcName);
  v4 = v2->m_pkIstr;
  v5 = v4;
  v6 = v4->m_pfnRead;
  kStream = (NiStream *)4;
  v6(v5, &v3->m_uiTextKeyReference, 4u, (unsigned int *)&kStream, 1u);
  NiStream::ReadLinkID(v2);
  v7 = v2->m_pkIstr;
  v8 = v7;
  v9 = v7->m_pfnRead;
  kStream = (NiStream *)4;
  v9(v8, &uiNumKeys, 4u, (unsigned int *)&kStream, 1u);
  NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize((NiTArray<NiVBBlock *> *)&v3->m_kObjectName, uiNumKeys);
  v10 = 0;
  if ( uiNumKeys )
  {
    do
    {
      kStream = 0;
      NiStream::LoadCString(v2, (char **)&kStream);
      if ( v10 < v3->m_kObjectName.m_uiMaxSize )
      {
        if ( v10 < v3->m_kObjectName.m_uiSize )
        {
          v11 = kStream;
          if ( kStream )
          {
            if ( !v3->m_kObjectName.m_pBase[v10] )
              ++v3->m_kObjectName.m_uiESize;
          }
          else if ( v3->m_kObjectName.m_pBase[v10] )
          {
            --v3->m_kObjectName.m_uiESize;
          }
        }
        else
        {
          v3->m_kObjectName.m_uiSize = v10 + 1;
          v11 = kStream;
          if ( kStream )
            ++v3->m_kObjectName.m_uiESize;
        }
        v3->m_kObjectName.m_pBase[v10] = (char *)v11;
      }
      NiStream::ReadLinkID(v2);
      ++v10;
    }
    while ( v10 < uiNumKeys );
  }
}

//----- (007E7870) --------------------------------------------------------
void __thiscall NiSequence::LinkObject(NiSequence *this, NiStream *kStream)
{
  NiSequence *v2; // esi@1
  NiObject *v3; // eax@1
  NiTextKeyExtraData *v4; // edi@1
  NiTextKeyExtraData *v5; // ebx@1
  unsigned int v6; // ebx@8
  unsigned int v7; // edi@8
  NiD3DShaderConstantMapEntry *v8; // eax@9
  NiD3DShaderConstantMapEntry *v9; // esi@9
  NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *v10; // [sp+Ch] [bp-8h]@8
  NiPointer<NiD3DShaderConstantMapEntry> element; // [sp+10h] [bp-4h]@9

  v2 = this;
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue(
    (NiVBDynamicSet *)this,
    (IDirect3DVertexBuffer9 *)kStream);
  v3 = NiStream::GetObjectFromLinkID(kStream);
  v4 = v2->m_spTextKeys.m_pObject;
  v5 = (NiTextKeyExtraData *)v3;
  if ( (NiObject *)v4 != v3 )
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v2->m_spTextKeys.m_pObject = v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  }
  v6 = v2->m_kObjectName.m_uiSize;
  v10 = (NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *)&v2->m_kCtrl;
  NiTArray<NiPointer<NiScreenElements>>::SetSize(
    (NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *)&v2->m_kCtrl,
    v2->m_kObjectName.m_uiSize);
  v7 = 0;
  if ( v6 )
  {
    do
    {
      v8 = (NiD3DShaderConstantMapEntry *)NiStream::GetObjectFromLinkID(kStream);
      v9 = v8;
      element.m_pObject = v8;
      if ( v8 )
        InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
      NiTArray<NiPointer<NiActorManager::CallbackData>>::SetAt(v10, v7, &element);
      if ( v9 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) )
          v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      }
      ++v7;
    }
    while ( v7 < v6 );
  }
}

//----- (007E7940) --------------------------------------------------------
NiSequence *__thiscall NiSequence::`scalar deleting destructor'(NiSequence *this, unsigned int a2)
{
  NiSequence *v2; // esi@1

  v2 = this;
  NiSequence::~NiSequence(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007E7970) --------------------------------------------------------
NiSequence *__cdecl NiSequence::ConvertSequence(NiStream *kStream, unsigned int uiIndex, const char *pcSequenceName)
{
  NiShader *v4; // eax@4
  NiObjectNET *v5; // edi@4
  const char *v6; // esi@6
  NiSequence *v7; // eax@8
  NiSequence *v8; // eax@9
  unsigned int v9; // eax@11
  NiExtraData *v10; // ebx@12
  NiRTTI *v11; // eax@13
  char v12; // al@16
  NiTextKeyExtraData *v13; // esi@17
  NiTextKeyExtraData *v14; // ebx@22
  NiTimeController *v15; // ebx@29
  NiExtraData **v16; // ecx@32
  NiExtraData *v17; // edi@32
  unsigned int v18; // esi@33
  NiRTTI *v19; // eax@34
  char v20; // al@37
  NiTransformController *v21; // eax@40
  NiRTTI *v22; // eax@42
  char v23; // al@45
  NiTimeController *v24; // esi@47
  NiTimeController *v25; // edi@49
  NiSequenceStreamHelper *pkContainer; // [sp+0h] [bp-8h]@4
  NiSequence *pkSequence; // [sp+4h] [bp-4h]@9
  unsigned int i; // [sp+10h] [bp+8h]@11
  unsigned int ia; // [sp+10h] [bp+8h]@31

  if ( kStream->m_uiNifFileVersion >= 0x4010003 || uiIndex >= kStream->m_kTopObjects.m_uiSize )
    return 0;
  v4 = CPostProcessEffect::DynamicCast(
         &NiSequenceStreamHelper::m_RTTI,
         (NiShader *)kStream->m_kTopObjects.m_pBase[uiIndex].m_pObject);
  v5 = (NiObjectNET *)v4;
  pkContainer = (NiSequenceStreamHelper *)v4;
  if ( !v4 )
    return 0;
  v6 = pcSequenceName;
  if ( !pcSequenceName )
    v6 = v4->m_pszName;
  v7 = (NiSequence *)operator new(0x44u);
  if ( v7 )
  {
    NiSequence::NiSequence(v7, v6, 0xCu, 0xCu);
    pkSequence = v8;
  }
  else
  {
    pkSequence = 0;
  }
  v9 = 0;
  pkSequence->m_uiTextKeyReference = 0;
  for ( i = 0; v9 < v5->m_uiExtraDataSize; i = ++v9 )
  {
    v10 = v5->m_ppkExtra[v9];
    if ( v10 )
    {
      v11 = (NiRTTI *)((int (__thiscall *)(NiExtraData *))v10->vfptr[1].__vecDelDtor)(v10);
      if ( v11 )
      {
        while ( v11 != &NiTextKeyExtraData::m_RTTI )
        {
          v11 = v11->m_pkBaseRTTI;
          if ( !v11 )
            goto LABEL_16;
        }
        v12 = 1;
      }
      else
      {
LABEL_16:
        v12 = 0;
      }
      v13 = (NiTextKeyExtraData *)(v12 != 0 ? (unsigned int)v10 : 0);
      if ( v12 != 0 ? (unsigned int)v10 : 0 )
      {
        v14 = pkSequence->m_spTextKeys.m_pObject;
        if ( v14 != v13 )
        {
          if ( v14 && !InterlockedDecrement((volatile LONG *)&v14->m_uiRefCount) && v14 )
            v14->vfptr->__vecDelDtor((NiRefObject *)v14, 1u);
          pkSequence->m_spTextKeys.m_pObject = v13;
          InterlockedIncrement((volatile LONG *)&v13->m_uiRefCount);
        }
        NiObjectNET::RemoveExtraDataAt(v5, i);
        break;
      }
      v9 = i;
    }
  }
  v15 = v5->m_spControllers.m_pObject;
  if ( v15 )
    InterlockedIncrement((volatile LONG *)&v15->m_uiRefCount);
  ia = 0;
  if ( v5->m_uiExtraDataSize )
  {
    do
    {
      v16 = v5->m_ppkExtra;
      v17 = v16[ia];
      if ( v17 )
      {
        v19 = (NiRTTI *)((int (__thiscall *)(NiExtraData *))v17->vfptr[1].__vecDelDtor)(v16[ia]);
        if ( v19 )
        {
          while ( v19 != &NiStringExtraData::m_RTTI )
          {
            v19 = v19->m_pkBaseRTTI;
            if ( !v19 )
              goto LABEL_37;
          }
          v20 = 1;
        }
        else
        {
LABEL_37:
          v20 = 0;
        }
        v18 = v20 != 0 ? (unsigned int)v17 : 0;
      }
      else
      {
        v18 = 0;
      }
      if ( v15 )
      {
        v22 = (NiRTTI *)((int (__thiscall *)(NiTimeController *))v15->vfptr[1].__vecDelDtor)(v15);
        if ( v22 )
        {
          while ( v22 != &NiTransformController::m_RTTI )
          {
            v22 = v22->m_pkBaseRTTI;
            if ( !v22 )
              goto LABEL_45;
          }
          v23 = 1;
        }
        else
        {
LABEL_45:
          v23 = 0;
        }
        v21 = (NiTransformController *)(v23 != 0 ? (unsigned int)v15 : 0);
      }
      else
      {
        v21 = 0;
      }
      NiSequence::AddNameControllerPair(pkSequence, *(const char **)(v18 + 12), v21);
      v24 = v15->m_spNext.m_pObject;
      if ( v24 )
        InterlockedIncrement((volatile LONG *)&v24->m_uiRefCount);
      v25 = v15->m_spNext.m_pObject;
      if ( v25 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v25->m_uiRefCount) && v25 )
          v25->vfptr->__vecDelDtor((NiRefObject *)v25, 1u);
        v15->m_spNext.m_pObject = 0;
      }
      if ( v15 != v24 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) )
          v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
        v15 = v24;
        if ( !v24 )
          goto LABEL_62;
        InterlockedIncrement((volatile LONG *)&v24->m_uiRefCount);
      }
      if ( v24 && !InterlockedDecrement((volatile LONG *)&v24->m_uiRefCount) )
        v24->vfptr->__vecDelDtor((NiRefObject *)v24, 1u);
LABEL_62:
      ++ia;
      v5 = (NiObjectNET *)pkContainer;
    }
    while ( ia < pkContainer->m_uiExtraDataSize );
  }
  NiObjectNET::RemoveAllExtraData(v5);
  if ( v15 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v15->m_uiRefCount) )
      v15->vfptr->__vecDelDtor((NiRefObject *)v15, 1u);
  }
  return pkSequence;
}

//----- (007E7C00) --------------------------------------------------------
NiPointer<NiSequence> *__cdecl NiSequence::CreateFromKFFile(NiPointer<NiSequence> *result, NiStream *kStream, unsigned int uiIndex, const char *pcSequenceName)
{
  NiShader *v4; // eax@2
  NiPointer<NiSequence> *v5; // eax@4
  volatile LONG *v6; // esi@7
  NiSequence *v7; // edi@7

  if ( kStream->m_uiNifFileVersion >= 0x4010003 )
  {
    if ( uiIndex >= kStream->m_kTopObjects.m_uiSize )
    {
LABEL_4:
      v5 = result;
      result->m_pObject = 0;
      return v5;
    }
    v4 = CPostProcessEffect::DynamicCast(
           &NiSequence::m_RTTI,
           (NiShader *)kStream->m_kTopObjects.m_pBase[uiIndex].m_pObject);
  }
  else
  {
    v4 = (NiShader *)NiSequence::ConvertSequence(kStream, uiIndex, pcSequenceName);
  }
  if ( !v4 )
    goto LABEL_4;
  v6 = (volatile LONG *)&v4->m_uiRefCount;
  v7 = (NiSequence *)v4;
  InterlockedIncrement((volatile LONG *)&v4->m_uiRefCount);
  if ( pcSequenceName )
    NiSequence::SetName(v7, pcSequenceName);
  result->m_pObject = v7;
  InterlockedIncrement(v6);
  if ( !InterlockedDecrement(v6) )
    v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
  return result;
}

//----- (007E7CA0) --------------------------------------------------------
NiPointer<NiSequence> *__cdecl NiSequence::CreateFromKFFile(NiPointer<NiSequence> *result, const char *pcSequenceFile, unsigned int uiIndex, const char *pcSequenceName)
{
  NiStream kStream; // [sp+10h] [bp-3DCh]@1

  NiStream::NiStream(&kStream);
  if ( NiStream::Load(&kStream, pcSequenceFile) )
    NiSequence::CreateFromKFFile(result, &kStream, uiIndex, pcSequenceName);
  else
    result->m_pObject = 0;
  NiStream::~NiStream(&kStream);
  return result;
}

//----- (007E7D30) --------------------------------------------------------
void __thiscall NiRotData::GuaranteeKeysAtStartAndEnd(NiRotData *this, float fStartTime, float fEndTime)
{
  NiRotData *v3; // esi@1
  NiAnimationKey *pkKeys; // [sp+Ch] [bp-4h]@1

  pkKeys = (NiAnimationKey *)this;
  v3 = this;
  pkKeys = (NiAnimationKey *)&this->m_pkKeys->m_fTime;
  NiAnimationKey::GuaranteeKeyAtStartAndEnd(POSKEY, this->m_eType, &pkKeys, &this->m_uiNumKeys, fStartTime, fEndTime);
  v3->m_pkKeys = (NiRotKey *)pkKeys;
}

//----- (007E7D70) --------------------------------------------------------
NiObject *__cdecl NiRotData::CreateObject()
{
  NiObject *v0; // eax@1
  NiObject *v1; // esi@1
  NiObject *result; // eax@2

  v0 = (NiObject *)operator new(0x18u);
  v1 = v0;
  if ( v0 )
  {
    NiObject::NiObject(v0);
    v1[1].vfptr = 0;
    v1[1].m_uiRefCount = 0;
    v1[2].vfptr = 0;
    LOBYTE(v1[2].m_uiRefCount) = 0;
    v1->vfptr = (NiRefObjectVtbl *)&NiRotData::`vftable';
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E62DC: using guessed type int (__thiscall *NiRotData::`vftable')(void *p, char);

//----- (007E7DB0) --------------------------------------------------------
NiRTTI *NiRotData::GetRTTI()
{
  return &NiRotData::m_RTTI;
}

//----- (007E7DC0) --------------------------------------------------------
char __thiscall NiRotData::IsEqual(NiRotData *this, NiObject *pkObject)
{
  NiObject *v2; // ebx@1
  NiRotData *v3; // esi@1
  char result; // al@2
  NiRefObjectVtbl *v5; // ecx@3
  NiRefObjectVtbl *v6; // eax@4
  int v7; // edi@6
  bool (__cdecl *pfnEqualFunc)(NiAnimationKey *, NiAnimationKey *); // [sp+10h] [bp+8h]@6

  v2 = pkObject;
  v3 = this;
  if ( NiObject::IsEqual((NiObject *)&this->vfptr, pkObject)
    && (v5 = (NiRefObjectVtbl *)v3->m_uiNumKeys, v5 == pkObject[1].vfptr)
    && (v6 = (NiRefObjectVtbl *)v3->m_eType, v6 == pkObject[2].vfptr)
    && v3->m_ucKeySize == LOBYTE(pkObject[2].m_uiRefCount) )
  {
    v7 = 0;
    pfnEqualFunc = (bool (__cdecl *)(NiAnimationKey *, NiAnimationKey *))dword_B61CB8[(signed int)v6];
    if ( v5 )
    {
      while ( pfnEqualFunc(
                (NiAnimationKey *)((char *)&v3->m_pkKeys->m_fTime + v7 * v3->m_ucKeySize),
                (NiAnimationKey *)(v7 * v3->m_ucKeySize + v2[1].m_uiRefCount)) )
      {
        if ( ++v7 >= v3->m_uiNumKeys )
          goto LABEL_9;
      }
      result = 0;
    }
    else
    {
LABEL_9:
      result = 1;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// B61CB8: using guessed type int dword_B61CB8[];

//----- (007E7E40) --------------------------------------------------------
CPostProcessEffect *__thiscall NiRotData::`scalar deleting destructor'(NiRotData *this, unsigned int a2)
{
  CPostProcessEffect *v2; // esi@1
  NiRotKey *v3; // eax@1

  v2 = (CPostProcessEffect *)this;
  v3 = this->m_pkKeys;
  this->vfptr = (NiRefObjectVtbl *)&NiRotData::`vftable';
  if ( v3 )
    ((void (__cdecl *)(_DWORD))dword_B61A78[this->m_eType])(v3);
  NiRefObject::~NiRefObject(v2);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E62DC: using guessed type int (__thiscall *NiRotData::`vftable')(void *p, char);
// B61A78: using guessed type int dword_B61A78[];

//----- (007E7E80) --------------------------------------------------------
void __thiscall NiRotData::ReplaceAnim(NiRotData *this, NiRotKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType)
{
  NiRotData *v4; // esi@1
  NiRotKey *v5; // eax@1
  char v6; // dl@5

  v4 = this;
  v5 = this->m_pkKeys;
  if ( v5 )
    ((void (__cdecl *)(_DWORD))dword_B61A78[this->m_eType])(v5);
  if ( pkKeys && uiNumKeys )
  {
    v6 = byte_B6190C[eType];
    v4->m_pkKeys = pkKeys;
    v4->m_ucKeySize = v6;
    v4->m_uiNumKeys = uiNumKeys;
    v4->m_eType = eType;
  }
  else
  {
    v4->m_uiNumKeys = 0;
    v4->m_pkKeys = 0;
    v4->m_eType = 0;
    v4->m_ucKeySize = 0;
  }
}
// B61A78: using guessed type int dword_B61A78[];

//----- (007E7EE0) --------------------------------------------------------
NiPointer<NiRotData> *__thiscall NiRotData::GetSequenceData(NiRotData *this, NiPointer<NiRotData> *result, float fStartTime, float fEndTime)
{
  NiRotData *v4; // esi@1
  NiRotData *v5; // eax@1
  NiPointer<NiRotData> *v6; // edi@1
  NiAnimationKey *v7; // ebx@3
  unsigned int v8; // eax@7
  NiAnimationKey *pkNewKeys; // [sp+1Ch] [bp-4h]@1

  v4 = this;
  v5 = (NiRotData *)NiObject::CreateDeepCopy((NiObject *)&this->vfptr, (NiPointer<NiObject> *)&pkNewKeys)->m_pObject;
  v6 = result;
  result->m_pObject = v5;
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v7 = pkNewKeys;
  if ( pkNewKeys && !InterlockedDecrement((volatile LONG *)&pkNewKeys[1]) && v7 )
    (*(void (__thiscall **)(NiAnimationKey *, signed int))LODWORD(v7->m_fTime))(v7, 1);
  v8 = v4->m_uiNumKeys;
  if ( v8 )
  {
    pkNewKeys = 0;
    result = 0;
    NiAnimationKey::CopySequence(
      ROTKEY,
      v4->m_eType,
      (NiAnimationKey *)&v4->m_pkKeys->m_fTime,
      v8,
      fStartTime,
      fEndTime,
      &pkNewKeys,
      (unsigned int *)&result);
    NiRotData::ReplaceAnim(v6->m_pObject, (NiRotKey *)pkNewKeys, (unsigned int)result, v4->m_eType);
  }
  return v6;
}

//----- (007E7F90) --------------------------------------------------------
void __thiscall NiRotData::LoadBinary(NiRotData *this, NiStream *kStream)
{
  NiStream *v2; // ebx@1
  NiRotData *v3; // esi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST14_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v7; // eax@2
  NiBinaryStream *v8; // ST14_4@2
  unsigned int (__cdecl *v9)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@2
  NiAnimationKey::KeyType v10; // edi@2
  NiStream *v11; // ST10_4@2
  NiRotKey *v12; // ebx@2
  NiAnimationKey::KeyType eType; // [sp+Ch] [bp-8h]@2
  int v14; // [sp+10h] [bp-4h]@1

  v2 = kStream;
  v3 = this;
  NiObject::LoadBinary((NiObject *)&this->vfptr, kStream);
  v4 = v2->m_pkIstr;
  v5 = v4;
  v6 = v4->m_pfnRead;
  v14 = 4;
  v6(v5, &kStream, 4u, (unsigned int *)&v14, 1u);
  if ( kStream )
  {
    v7 = v2->m_pkIstr;
    v8 = v7;
    v9 = v7->m_pfnRead;
    v14 = 4;
    v9(v8, &eType, 4u, (unsigned int *)&v14, 1u);
    v10 = eType;
    v11 = kStream;
    v3->m_ucKeySize = byte_B6190C[eType];
    v12 = (NiRotKey *)((int (__cdecl *)(NiStream *, NiStream *))dword_B61F88[v10])(v2, v11);
    ((void (__cdecl *)(NiRotKey *, NiStream *, _DWORD))dword_B61958[v10])(v12, kStream, v3->m_ucKeySize);
    NiRotData::ReplaceAnim(v3, v12, (unsigned int)kStream, v10);
  }
}
// B61958: using guessed type int dword_B61958[];
// B61F88: using guessed type int dword_B61F88[];

//----- (007E8030) --------------------------------------------------------
void __thiscall NiRotData::SaveBinary(NiRotData *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiRotData *v3; // esi@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@1
  NiBinaryStream *v5; // ST0C_4@1
  NiBinaryStream *v6; // eax@2
  NiBinaryStream *v7; // ST0C_4@2
  unsigned int (__cdecl *v8)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@2

  v2 = kStream;
  v3 = this;
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue(
    (NiVBDynamicSet *)this,
    (IDirect3DVertexBuffer9 *)kStream);
  v4 = v2->m_pkOstr->m_pfnWrite;
  v5 = v2->m_pkOstr;
  kStream = (NiStream *)4;
  v4(v5, &v3->m_uiNumKeys, 4u, (unsigned int *)&kStream, 1u);
  if ( v3->m_uiNumKeys )
  {
    v6 = v2->m_pkOstr;
    v7 = v6;
    v8 = v6->m_pfnWrite;
    kStream = (NiStream *)4;
    v8(v7, &v3->m_eType, 4u, (unsigned int *)&kStream, 1u);
    ((void (__cdecl *)(_DWORD, _DWORD, _DWORD))dword_B61C28[v3->m_eType])(v2, v3->m_pkKeys, v3->m_uiNumKeys);
  }
}
// B61C28: using guessed type int dword_B61C28[];

//----- (007E80B0) --------------------------------------------------------
void __thiscall NiRotData::GetViewerStrings(NiRotData *this, NiTArray<char *> *pkStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiRotData *v3; // ebx@1
  NiTArray<char *> *v4; // eax@1
  unsigned int v5; // edi@1
  NiTArray<char *> *v6; // eax@3
  unsigned int v7; // edi@3

  v2 = (NiTArray<NiVBBlock *> *)pkStrings;
  v3 = this;
  NiObject::GetViewerStrings((NiObject *)&this->vfptr, pkStrings);
  v4 = (NiTArray<char *> *)NiGetViewerString(NiRotData::m_RTTI.m_pcName);
  v5 = v2->m_uiSize;
  pkStrings = v4;
  if ( v5 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v5 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v5, (NiVBChip *const *)&pkStrings);
  v6 = (NiTArray<char *> *)NiGetViewerString("m_uiNumKeys", v3->m_uiNumKeys);
  v7 = v2->m_uiSize;
  pkStrings = v6;
  if ( v7 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v7 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v7, (NiVBChip *const *)&pkStrings);
}

//----- (007E8130) --------------------------------------------------------
void __thiscall NiRollController::LoadBinary(NiRollController *this, NiStream *stream)
{
  NiFloatController::LoadBinary((NiFloatController *)&this->vfptr, stream);
}

//----- (007E8140) --------------------------------------------------------
void __thiscall NiRollController::LinkObject(NiRollController *this, NiStream *stream)
{
  NiFloatController::LinkObject((NiFloatController *)&this->vfptr, stream);
}

//----- (007E8150) --------------------------------------------------------
char __thiscall NiRollController::RegisterStreamables(NiRollController *this, NiStream *stream)
{
  return NiFloatController::RegisterStreamables((NiFloatController *)&this->vfptr, stream);
}

//----- (007E8160) --------------------------------------------------------
void __thiscall NiRollController::SaveBinary(NiRollController *this, NiStream *stream)
{
  NiFloatController::SaveBinary((NiFloatController *)&this->vfptr, stream);
}

//----- (007E8170) --------------------------------------------------------
bool __thiscall NiRollController::IsEqual(NiRollController *this, NiObject *pObject)
{
  return NiFloatController::IsEqual((NiFloatController *)&this->vfptr, pObject);
}

//----- (007E8180) --------------------------------------------------------
NiRTTI *NiFloatController::GetRTTI()
{
  return &NiFloatController::m_RTTI;
}

//----- (007E8190) --------------------------------------------------------
NiRTTI *NiRollController::GetRTTI()
{
  return &NiRollController::m_RTTI;
}

//----- (007E81A0) --------------------------------------------------------
NiRollController *__thiscall NiFloatController::`vector deleting destructor'(NiRollController *this, unsigned int a2)
{
  NiRollController *v2; // esi@1

  v2 = this;
  NiFloatController::~NiFloatController((NiFloatController *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007E81D0) --------------------------------------------------------
char __thiscall NiMultiTargetTransformController::TargetIsRequiredType(NiRollController *this)
{
  NiObjectNET *v1; // ecx@1
  NiRTTI *v2; // eax@2
  char result; // al@5

  v1 = this->m_pTarget;
  if ( v1 && (v2 = (NiRTTI *)((int (*)(void))v1->vfptr[1].__vecDelDtor)()) != 0 )
  {
    while ( v2 != &NiAVObject::m_RTTI )
    {
      v2 = v2->m_pkBaseRTTI;
      if ( !v2 )
        goto LABEL_5;
    }
    result = 1;
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (007E8200) --------------------------------------------------------
void __thiscall NiRollController::Update(NiRollController *this, float fTime)
{
  NiRollController *v2; // ebx@1
  NiFloatKey *v3; // eax@3
  double v4; // st7@3
  NiObjectNET *v5; // esi@3
  float fAngle; // ST14_4@3
  int ucSize; // [sp+24h] [bp-80h]@3
  unsigned int uiNumKeys; // [sp+28h] [bp-7Ch]@3
  NiAnimationKey::KeyType eType; // [sp+2Ch] [bp-78h]@3
  float fRoll; // [sp+30h] [bp-74h]@3
  NiMatrix3 result; // [sp+34h] [bp-70h]@3
  NiMatrix3 roll; // [sp+58h] [bp-4Ch]@3
  NiMatrix3 rot; // [sp+7Ch] [bp-28h]@3

  v2 = this;
  if ( this->m_pTarget )
  {
    if ( !NiTimeController::DontDoUpdate((NiTimeController *)&this->vfptr, fTime) )
    {
      v3 = NiFloatController::GetAnim((NiFloatController *)&v2->vfptr, &uiNumKeys, &eType, (char *)&ucSize);
      v4 = NiFloatKey::GenInterp(v2->m_fScaledTime, v3, eType, uiNumKeys, &v2->m_uiLastIdx, ucSize);
      v5 = v2->m_pTarget;
      fRoll = v4;
      fAngle = -fRoll;
      qmemcpy(&rot, &v5[1].m_uiMaxSize, sizeof(rot));
      NiMatrix3::MakeZRotation(&roll, fAngle);
      qmemcpy(&rot, NiMatrix3::operator*(&rot, &result, &roll), sizeof(rot));
      qmemcpy(&v2->m_pTarget[1].m_uiMaxSize, &rot, 0x24u);
    }
  }
}

//----- (007E82D0) --------------------------------------------------------
NiFloatController *__thiscall NiRollController::CreateClone(NiRollController *this, NiCloningProcess *kCloning)
{
  NiRollController *v2; // ebx@1
  NiTimeController *v3; // eax@1
  NiFloatController *v4; // esi@1
  NiFloatController *result; // eax@2

  v2 = this;
  v3 = (NiTimeController *)operator new(0x44u);
  v4 = (NiFloatController *)v3;
  if ( v3 )
  {
    NiTimeController::NiTimeController(v3);
    v4->m_spFloatData.m_pObject = 0;
    v4->m_uiLastIdx = 0;
    v4->vfptr = (NiRefObjectVtbl *)&NiRollController::`vftable';
    NiFloatController::CopyMembers((NiFloatController *)&v2->vfptr, v4, kCloning);
    result = v4;
  }
  else
  {
    NiFloatController::CopyMembers((NiFloatController *)&v2->vfptr, 0, kCloning);
    result = 0;
  }
  return result;
}
// 9E6384: using guessed type int (__thiscall *NiRollController::`vftable')(void *p, char);

//----- (007E8330) --------------------------------------------------------
NiObject *__cdecl NiRollController::CreateObject()
{
  NiTimeController *v0; // eax@1
  NiObject *v1; // esi@1
  NiObject *result; // eax@2

  v0 = (NiTimeController *)operator new(0x44u);
  v1 = (NiObject *)v0;
  if ( v0 )
  {
    NiTimeController::NiTimeController(v0);
    v1[8].vfptr = 0;
    v1[7].m_uiRefCount = 0;
    v1->vfptr = (NiRefObjectVtbl *)&NiRollController::`vftable';
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E6384: using guessed type int (__thiscall *NiRollController::`vftable')(void *p, char);

//----- (007E8370) --------------------------------------------------------
void __thiscall NiRollController::GetViewerStrings(NiRollController *this, NiTArray<char *> *pStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiTArray<char *> *v3; // eax@1
  unsigned int v4; // edi@1

  v2 = (NiTArray<NiVBBlock *> *)pStrings;
  NiTimeController::GetViewerStrings((NiTimeController *)&this->vfptr, pStrings);
  v3 = (NiTArray<char *> *)NiGetViewerString(NiRollController::m_RTTI.m_pcName);
  v4 = v2->m_uiSize;
  pStrings = v3;
  if ( v4 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v4 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v4, (NiVBChip *const *)&pStrings);
}

//----- (007E83C0) --------------------------------------------------------
signed int __stdcall NiQuaternionInterpolator::GetKeyContent(unsigned __int16 usChannel)
{
  return 2;
}

//----- (007E83D0) --------------------------------------------------------
NiRotData *__thiscall NiColorInterpolator::GetKeyCount(NiQuaternionInterpolator *this, unsigned __int16 usChannel)
{
  NiRotData *result; // eax@1

  result = this->m_spQuaternionData.m_pObject;
  if ( result )
    result = (NiRotData *)result->m_uiNumKeys;
  return result;
}

//----- (007E83E0) --------------------------------------------------------
NiAnimationKey *__thiscall NiColorInterpolator::GetKeyArray(NiQuaternionInterpolator *this, unsigned __int16 usChannel)
{
  NiAnimationKey *result; // eax@1

  result = (NiAnimationKey *)this->m_spQuaternionData.m_pObject;
  if ( result )
    result = (NiAnimationKey *)LODWORD(result[3].m_fTime);
  return result;
}

//----- (007E83F0) --------------------------------------------------------
bool __thiscall NiQuaternionInterpolator::GetChannelPosed(NiQuaternionInterpolator *this, unsigned __int16 usChannel)
{
  return !this->m_spQuaternionData.m_pObject
      && (NiInterpolator::INVALID_QUATERNION.m_fW != this->m_kQuaternionValue.m_fW
       || NiInterpolator::INVALID_QUATERNION.m_fX != this->m_kQuaternionValue.m_fX
       || NiInterpolator::INVALID_QUATERNION.m_fY != this->m_kQuaternionValue.m_fY
       || NiInterpolator::INVALID_QUATERNION.m_fZ != this->m_kQuaternionValue.m_fZ);
}

//----- (007E8450) --------------------------------------------------------
void __thiscall NiQuaternionInterpolator::Collapse(NiQuaternionInterpolator *this)
{
  NiQuaternionInterpolator *v1; // ebx@1
  NiRotData *v2; // eax@1
  unsigned int v3; // ecx@2
  char v4; // dl@2
  NiRotKey *v5; // esi@2
  NiAnimationKey::KeyType v6; // edi@2
  NiRotData *v7; // esi@3
  float v8; // eax@9
  float v9; // edx@9
  float v10; // eax@9
  unsigned int v11; // edi@13
  NiRotData *v12; // esi@21
  float v13; // edx@26
  float v14; // eax@26
  float v15; // ecx@26
  NiQuaternion kValue; // [sp+4h] [bp-18h]@9
  unsigned int uiNumKeys; // [sp+14h] [bp-8h]@2
  char ucSize; // [sp+1Ah] [bp-2h]@2
  bool bCollapse; // [sp+1Bh] [bp-1h]@13

  v1 = this;
  v2 = this->m_spQuaternionData.m_pObject;
  if ( v2 )
  {
    v3 = v2->m_uiNumKeys;
    v4 = v2->m_ucKeySize;
    v5 = v2->m_pkKeys;
    v6 = v2->m_eType;
    uiNumKeys = v3;
    ucSize = v4;
    if ( v3 )
    {
      v8 = v5->m_quat.m_fX;
      kValue.m_fW = v5->m_quat.m_fW;
      v9 = v5->m_quat.m_fY;
      kValue.m_fX = v8;
      v10 = v5->m_quat.m_fZ;
      kValue.m_fY = v9;
      kValue.m_fZ = v10;
      if ( v3 == 1 && v6 != 4 )
        goto LABEL_29;
      if ( v6 == 1 || v6 == 5 )
      {
        bCollapse = 1;
        v11 = 1;
        while ( v11 < v3 )
        {
          if ( (unsigned __int8)NiQuaternion::operator!=(
                                  (NiQuaternion *)((char *)&v5->m_quat + v11 * (unsigned __int8)ucSize),
                                  &kValue) )
            bCollapse = 0;
          ++v11;
          if ( !bCollapse )
            return;
          v3 = uiNumKeys;
        }
        if ( bCollapse )
        {
LABEL_29:
          v12 = v1->m_spQuaternionData.m_pObject;
          if ( v12 )
          {
            if ( !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
              v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
            v1->m_spQuaternionData.m_pObject = 0;
          }
          v13 = kValue.m_fX;
          v14 = kValue.m_fY;
          v1->m_kQuaternionValue.m_fW = kValue.m_fW;
          v15 = kValue.m_fZ;
          v1->m_kQuaternionValue.m_fX = v13;
          v1->m_kQuaternionValue.m_fY = v14;
          v1->m_kQuaternionValue.m_fZ = v15;
        }
      }
    }
    else
    {
      v7 = v2;
      if ( v2 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
        {
          if ( v7 )
            v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
        }
        v1->m_spQuaternionData.m_pObject = 0;
      }
      v1->m_kQuaternionValue = NiInterpolator::INVALID_QUATERNION;
    }
  }
}

//----- (007E8590) --------------------------------------------------------
void __thiscall NiQuaternionInterpolator::GuaranteeTimeRange(NiQuaternionInterpolator *this, float fStartTime, float fEndTime)
{
  NiRotData *v3; // ecx@1

  v3 = this->m_spQuaternionData.m_pObject;
  if ( v3 )
    NiRotData::GuaranteeKeysAtStartAndEnd(v3, fStartTime, fEndTime);
}

//----- (007E85C0) --------------------------------------------------------
void __thiscall NiQuaternionInterpolator::LoadBinary(NiQuaternionInterpolator *this, NiStream *kStream)
{
  NiQuaternionInterpolator *v2; // esi@1
  NiObject *v3; // eax@1
  NiRotData *v4; // edi@1
  NiRotData *v5; // ebx@1

  v2 = this;
  NiBackToFrontAccumulator::LoadBinary((NiBackToFrontAccumulator *)this, kStream);
  NiColorA::LoadBinary(&v2->m_kQuaternionValue, kStream);
  v3 = NiStream::ResolveLinkID(kStream);
  v4 = v2->m_spQuaternionData.m_pObject;
  v5 = (NiRotData *)v3;
  if ( (NiObject *)v4 != v3 )
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v2->m_spQuaternionData.m_pObject = v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  }
}

//----- (007E8630) --------------------------------------------------------
void __thiscall NiQuaternionInterpolator::SaveBinary(NiQuaternionInterpolator *this, NiStream *kStream)
{
  NiQuaternionInterpolator *v2; // esi@1

  v2 = this;
  NiDefaultAVObjectPalette::LinkObject((NiScreenLODData *)this, kStream);
  NiQuaternion::SaveBinary(&v2->m_kQuaternionValue, kStream);
  kStream->vfptr->SaveLinkID(kStream, (NiObject *)v2->m_spQuaternionData.m_pObject);
}

//----- (007E8660) --------------------------------------------------------
char __thiscall NiQuaternionInterpolator::IsEqual(NiQuaternionInterpolator *this, NiObject *pkObject)
{
  NiQuaternionInterpolator *v2; // esi@1
  NiRotData *v4; // ecx@7

  v2 = this;
  if ( !NiKeyBasedInterpolator::IsEqual((NiKeyBasedInterpolator *)&this->vfptr, pkObject)
    || *(float *)&pkObject[1].m_uiRefCount != v2->m_kQuaternionValue.m_fW
    || *(float *)&pkObject[2].vfptr != v2->m_kQuaternionValue.m_fX
    || *(float *)&pkObject[2].m_uiRefCount != v2->m_kQuaternionValue.m_fY
    || *(float *)&pkObject[3].vfptr != v2->m_kQuaternionValue.m_fZ )
  {
    return 0;
  }
  v4 = v2->m_spQuaternionData.m_pObject;
  if ( v4 )
  {
    if ( !pkObject[3].m_uiRefCount )
      return 0;
    if ( v4 )
      goto LABEL_16;
  }
  if ( pkObject[3].m_uiRefCount )
    return 0;
  if ( v4 )
  {
LABEL_16:
    if ( (unsigned __int8)((int (__stdcall *)(_DWORD))v4->vfptr[7].__vecDelDtor)(pkObject[3].m_uiRefCount) )
      return 1;
    return 0;
  }
  return 1;
}

//----- (007E86F0) --------------------------------------------------------
NiRTTI *NiQuaternionInterpolator::GetRTTI()
{
  return &NiQuaternionInterpolator::m_RTTI;
}

//----- (007E8700) --------------------------------------------------------
void __thiscall NiQuaternionInterpolator::GetActiveTimeRange(NiQuaternionInterpolator *this, float *fBeginKeyTime, float *fEndKeyTime)
{
  NiRotData *v3; // eax@1
  unsigned int v4; // ecx@2
  NiAnimationKey::KeyType v5; // esi@2
  char v6; // dl@2
  float *v7; // eax@2
  _BYTE *v8; // esi@4
  float **v9; // ecx@4
  signed int v10; // [sp+4h] [bp-10h]@4
  float fTempEndKeyTime; // [sp+8h] [bp-Ch]@4
  float fTempBeginKeyTime; // [sp+Ch] [bp-8h]@4
  float fKeyTime; // [sp+10h] [bp-4h]@5
  float fKeyTimea; // [sp+10h] [bp-4h]@7

  v3 = this->m_spQuaternionData.m_pObject;
  if ( v3 && (v4 = v3->m_uiNumKeys, v5 = v3->m_eType, v6 = v3->m_ucKeySize, v7 = &v3->m_pkKeys->m_fTime, v4) )
  {
    if ( v5 == 4 )
    {
      fTempBeginKeyTime = 3.4028235e38;
      v8 = v7 + 11;
      v9 = (float **)(v7 + 12);
      fTempEndKeyTime = -3.4028235e38;
      v10 = 3;
      do
      {
        fKeyTime = **v9;
        if ( fTempBeginKeyTime > (double)fKeyTime )
          fTempBeginKeyTime = fKeyTime;
        fKeyTimea = *(float *)((char *)*v9 + *v8 * ((_DWORD)*(v9 - 7) - 1));
        if ( fTempEndKeyTime < (double)fKeyTimea )
          fTempEndKeyTime = fKeyTimea;
        ++v9;
        ++v8;
        --v10;
      }
      while ( v10 );
      *fBeginKeyTime = fTempBeginKeyTime;
      *fEndKeyTime = fTempEndKeyTime;
    }
    else
    {
      *fBeginKeyTime = *v7;
      *fEndKeyTime = *(float *)((char *)v7 + (unsigned __int8)v6 * (v4 - 1));
    }
  }
  else
  {
    *fBeginKeyTime = 0.0;
    *fEndKeyTime = 0.0;
  }
}

//----- (007E87F0) --------------------------------------------------------
NiInterpolator *__thiscall NiQuaternionInterpolator::GetSequenceInterpolator(NiQuaternionInterpolator *this, float fStartTime, float fEndTime)
{
  NiQuaternionInterpolator *v3; // esi@1
  NiInterpolator *result; // eax@1
  NiRotData *v5; // ecx@1
  NiInterpolator *v6; // edi@1
  float v7; // eax@2
  unsigned int v8; // esi@2
  float v9; // ebx@2
  void (__thiscall ***v10)(_DWORD, _DWORD); // esi@11

  v3 = this;
  result = (NiInterpolator *)NiInterpolator::GetSequenceInterpolator(
                               (NiInterpolator *)&this->vfptr,
                               fStartTime,
                               fEndTime);
  v5 = v3->m_spQuaternionData.m_pObject;
  v6 = result;
  if ( v5 )
  {
    NiRotData::GetSequenceData(v5, (NiPointer<NiRotData> *)&fEndTime, fStartTime, fEndTime);
    v7 = fEndTime;
    v8 = v6[2].m_uiRefCount;
    v9 = fEndTime;
    if ( v8 != LODWORD(fEndTime) )
    {
      if ( v8 )
      {
        if ( !InterlockedDecrement((volatile LONG *)(v8 + 4)) && v8 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v8)(v8, 1);
        v7 = fEndTime;
      }
      *(float *)&v6[2].m_uiRefCount = v9;
      if ( v9 != 0.0 )
      {
        InterlockedIncrement((volatile LONG *)(LODWORD(v9) + 4));
        v7 = fEndTime;
      }
    }
    LODWORD(v6[2].m_fLastTime) = 0;
    if ( v7 != 0.0 )
    {
      v10 = (void (__thiscall ***)(_DWORD, _DWORD))LODWORD(v7);
      if ( !InterlockedDecrement((volatile LONG *)(LODWORD(v7) + 4)) )
      {
        if ( v10 )
          (**v10)(v10, 1);
      }
    }
    result = v6;
  }
  return result;
}

//----- (007E88B0) --------------------------------------------------------
char __thiscall NiQuaternionInterpolator::Update(NiQuaternionInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiQuaternion *kValue)
{
  NiQuaternionInterpolator *v4; // esi@1
  double v5; // st7@1
  NiRotData *v7; // eax@7
  unsigned int v8; // ecx@8
  char v9; // dl@8
  NiAnimationKey::KeyType v10; // edi@8
  NiRotKey *v11; // eax@8
  NiQuaternion *v12; // eax@9
  NiQuaternion result; // [sp+20h] [bp-14h]@9
  int ucSize; // [sp+30h] [bp-4h]@8

  v4 = this;
  v5 = fTime;
  if ( fTime == this->m_fLastTime )
  {
    kValue->m_fW = this->m_kQuaternionValue.m_fW;
    kValue->m_fX = this->m_kQuaternionValue.m_fX;
    kValue->m_fY = this->m_kQuaternionValue.m_fY;
    kValue->m_fZ = this->m_kQuaternionValue.m_fZ;
    if ( NiInterpolator::INVALID_QUATERNION.m_fW == this->m_kQuaternionValue.m_fW
      && NiInterpolator::INVALID_QUATERNION.m_fX == this->m_kQuaternionValue.m_fX
      && NiInterpolator::INVALID_QUATERNION.m_fY == this->m_kQuaternionValue.m_fY
      && NiInterpolator::INVALID_QUATERNION.m_fZ == this->m_kQuaternionValue.m_fZ )
    {
      return 0;
    }
  }
  else
  {
    v7 = this->m_spQuaternionData.m_pObject;
    if ( v7 )
    {
      v8 = v7->m_uiNumKeys;
      v9 = v7->m_ucKeySize;
      v10 = v7->m_eType;
      v11 = v7->m_pkKeys;
      LOBYTE(ucSize) = v9;
      if ( v8 )
      {
        v12 = NiRotKey::GenInterp(&result, fTime, v11, v10, v8, &v4->m_uiLastIdx, ucSize);
        v5 = fTime;
        v4->m_kQuaternionValue.m_fW = v12->m_fW;
        v4->m_kQuaternionValue.m_fX = v12->m_fX;
        v4->m_kQuaternionValue.m_fY = v12->m_fY;
        v4->m_kQuaternionValue.m_fZ = v12->m_fZ;
      }
    }
    if ( NiInterpolator::INVALID_QUATERNION.m_fW == v4->m_kQuaternionValue.m_fW
      && NiInterpolator::INVALID_QUATERNION.m_fX == v4->m_kQuaternionValue.m_fX
      && NiInterpolator::INVALID_QUATERNION.m_fY == v4->m_kQuaternionValue.m_fY
      && NiInterpolator::INVALID_QUATERNION.m_fZ == v4->m_kQuaternionValue.m_fZ )
    {
      return 0;
    }
    kValue->m_fW = v4->m_kQuaternionValue.m_fW;
    kValue->m_fX = v4->m_kQuaternionValue.m_fX;
    kValue->m_fY = v4->m_kQuaternionValue.m_fY;
    kValue->m_fZ = v4->m_kQuaternionValue.m_fZ;
    v4->m_fLastTime = v5;
  }
  return 1;
}

//----- (007E8A20) --------------------------------------------------------
NiKeyBasedInterpolator *__cdecl NiQuaternionInterpolator::CreateObject()
{
  NiKeyBasedInterpolator *v0; // eax@1
  NiKeyBasedInterpolator *v1; // esi@1
  NiKeyBasedInterpolator *result; // eax@2

  v0 = (NiKeyBasedInterpolator *)operator new(0x24u);
  v1 = v0;
  if ( v0 )
  {
    NiKeyBasedInterpolator::NiKeyBasedInterpolator(v0);
    v1->vfptr = (NiRefObjectVtbl *)&NiQuaternionInterpolator::`vftable';
    *(NiQuaternion *)&v1[1].vfptr = NiInterpolator::INVALID_QUATERNION;
    v1[2].m_uiRefCount = 0;
    LODWORD(v1[2].m_fLastTime) = 0;
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E63EC: using guessed type int (__thiscall *NiQuaternionInterpolator::`vftable')(void *p, char);

//----- (007E8A80) --------------------------------------------------------
NiQuaternionInterpolator *__thiscall NiQuaternionInterpolator::CreateClone(NiQuaternionInterpolator *this, NiCloningProcess *kCloning)
{
  NiQuaternionInterpolator *v2; // ebx@1
  NiKeyBasedInterpolator *v3; // eax@1
  NiQuaternionInterpolator *v4; // esi@1
  NiQuaternionInterpolator *result; // eax@2

  v2 = this;
  v3 = (NiKeyBasedInterpolator *)operator new(0x24u);
  v4 = (NiQuaternionInterpolator *)v3;
  if ( v3 )
  {
    NiKeyBasedInterpolator::NiKeyBasedInterpolator(v3);
    v4->vfptr = (NiRefObjectVtbl *)&NiQuaternionInterpolator::`vftable';
    v4->m_kQuaternionValue = NiInterpolator::INVALID_QUATERNION;
    v4->m_spQuaternionData.m_pObject = 0;
    v4->m_uiLastIdx = 0;
    NiColorInterpolator::CopyMembers(v2, v4, kCloning);
    result = v4;
  }
  else
  {
    NiColorInterpolator::CopyMembers(v2, 0, kCloning);
    result = 0;
  }
  return result;
}
// 9E63EC: using guessed type int (__thiscall *NiQuaternionInterpolator::`vftable')(void *p, char);

//----- (007E8B00) --------------------------------------------------------
void __thiscall NiQuaternionInterpolator::GetViewerStrings(NiQuaternionInterpolator *this, NiTArray<char *> *pkStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiQuaternionInterpolator *v3; // ebx@1
  NiTArray<char *> *v4; // eax@1
  unsigned int v5; // edi@1
  NiTArray<char *> *v6; // eax@3
  unsigned int v7; // edi@3
  NiTArray<char *> *v8; // eax@5
  unsigned int v9; // edi@5

  v2 = (NiTArray<NiVBBlock *> *)pkStrings;
  v3 = this;
  NiKeyBasedInterpolator::GetViewerStrings((NiKeyBasedInterpolator *)&this->vfptr, pkStrings);
  v4 = (NiTArray<char *> *)NiGetViewerString(NiQuaternionInterpolator::m_RTTI.m_pcName);
  v5 = v2->m_uiSize;
  pkStrings = v4;
  if ( v5 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v5 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v5, (NiVBChip *const *)&pkStrings);
  v6 = (NiTArray<char *> *)NiQuaternion::GetViewerString(&v3->m_kQuaternionValue, "m_kQuaternionValue");
  v7 = v2->m_uiSize;
  pkStrings = v6;
  if ( v7 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v7 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v7, (NiVBChip *const *)&pkStrings);
  v8 = (NiTArray<char *> *)NiGetViewerString("m_spQuaternionData", v3->m_spQuaternionData.m_pObject);
  v9 = v2->m_uiSize;
  pkStrings = v8;
  if ( v9 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v9 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v9, (NiVBChip *const *)&pkStrings);
}

//----- (007E8BB0) --------------------------------------------------------
void __thiscall NiPosData::~NiPosData(NiPosData *this)
{
  CPostProcessEffect *v1; // esi@1
  NiPosKey *v2; // eax@1

  v1 = (CPostProcessEffect *)this;
  v2 = this->m_pkKeys;
  this->vfptr = (NiRefObjectVtbl *)&NiPosData::`vftable';
  if ( v2 )
    ((void (__cdecl *)(_DWORD))dword_B61A60[this->m_eType])(v2);
  NiRefObject::~NiRefObject(v1);
}
// 9E5FC4: using guessed type int (__thiscall *NiPosData::`vftable')(void *p, char);
// B61A60: using guessed type int dword_B61A60[];

//----- (007E8BE0) --------------------------------------------------------
void __thiscall NiPosData::SetAnim(NiPosData *this, NiPosKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType)
{
  char v4; // dl@3

  if ( pkKeys && uiNumKeys )
  {
    v4 = byte_B61906[eType];
    this->m_pkKeys = pkKeys;
    this->m_uiNumKeys = uiNumKeys;
    this->m_ucKeySize = v4;
    this->m_eType = eType;
  }
  else
  {
    this->m_uiNumKeys = 0;
    this->m_pkKeys = 0;
    this->m_ucKeySize = 0;
    this->m_eType = 0;
  }
}

//----- (007E8C30) --------------------------------------------------------
NiObject *__cdecl NiPosData::CreateObject()
{
  NiObject *v0; // eax@1
  NiObject *v1; // esi@1
  NiObject *result; // eax@2

  v0 = (NiObject *)operator new(0x18u);
  v1 = v0;
  if ( v0 )
  {
    NiObject::NiObject(v0);
    v1[1].vfptr = 0;
    v1[1].m_uiRefCount = 0;
    v1[2].vfptr = 0;
    LOBYTE(v1[2].m_uiRefCount) = 0;
    v1->vfptr = (NiRefObjectVtbl *)&NiPosData::`vftable';
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E5FC4: using guessed type int (__thiscall *NiPosData::`vftable')(void *p, char);

//----- (007E8C70) --------------------------------------------------------
char __thiscall NiPosData::IsEqual(NiPosData *this, NiObject *pkObject)
{
  NiObject *v2; // ebx@1
  NiPosData *v3; // esi@1
  char result; // al@2
  NiRefObjectVtbl *v5; // ecx@3
  NiRefObjectVtbl *v6; // eax@4
  int v7; // edi@6
  bool (__cdecl *equal)(NiAnimationKey *, NiAnimationKey *); // [sp+10h] [bp+8h]@6

  v2 = pkObject;
  v3 = this;
  if ( NiObject::IsEqual((NiObject *)&this->vfptr, pkObject)
    && (v5 = (NiRefObjectVtbl *)v3->m_uiNumKeys, v5 == pkObject[1].vfptr)
    && (v6 = (NiRefObjectVtbl *)v3->m_eType, v6 == pkObject[2].vfptr)
    && v3->m_ucKeySize == LOBYTE(pkObject[2].m_uiRefCount) )
  {
    v7 = 0;
    equal = (bool (__cdecl *)(NiAnimationKey *, NiAnimationKey *))dword_B61CA0[(signed int)v6];
    if ( v5 )
    {
      while ( equal(
                (NiAnimationKey *)((char *)&v3->m_pkKeys->m_fTime + v7 * v3->m_ucKeySize),
                (NiAnimationKey *)(v7 * v3->m_ucKeySize + v2[1].m_uiRefCount)) )
      {
        if ( ++v7 >= v3->m_uiNumKeys )
          goto LABEL_9;
      }
      result = 0;
    }
    else
    {
LABEL_9:
      result = 1;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// B61CA0: using guessed type int dword_B61CA0[];

//----- (007E8CF0) --------------------------------------------------------
void __thiscall NiPosData::ReplaceAnim(NiPosData *this, NiPosKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType)
{
  NiPosData *v4; // esi@1
  NiPosKey *v5; // eax@1
  char v6; // dl@5

  v4 = this;
  v5 = this->m_pkKeys;
  if ( v5 )
    ((void (__cdecl *)(_DWORD))dword_B61A60[this->m_eType])(v5);
  if ( pkKeys && uiNumKeys )
  {
    v6 = byte_B61906[eType];
    v4->m_pkKeys = pkKeys;
    v4->m_ucKeySize = v6;
    v4->m_uiNumKeys = uiNumKeys;
    v4->m_eType = eType;
  }
  else
  {
    v4->m_uiNumKeys = 0;
    v4->m_pkKeys = 0;
    v4->m_eType = 0;
    v4->m_ucKeySize = 0;
  }
}
// B61A60: using guessed type int dword_B61A60[];

//----- (007E8D50) --------------------------------------------------------
NiPointer<NiPosData> *__thiscall NiPosData::GetSequenceData(NiPosData *this, NiPointer<NiPosData> *result, float fStartTime, float fEndTime)
{
  NiPosData *v4; // esi@1
  NiPosData *v5; // eax@1
  NiPointer<NiPosData> *v6; // edi@1
  NiAnimationKey *v7; // ebx@3
  unsigned int v8; // eax@7
  NiAnimationKey *pkNewKeys; // [sp+1Ch] [bp-4h]@1

  v4 = this;
  v5 = (NiPosData *)NiObject::CreateDeepCopy((NiObject *)&this->vfptr, (NiPointer<NiObject> *)&pkNewKeys)->m_pObject;
  v6 = result;
  result->m_pObject = v5;
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v7 = pkNewKeys;
  if ( pkNewKeys && !InterlockedDecrement((volatile LONG *)&pkNewKeys[1]) && v7 )
    (*(void (__thiscall **)(NiAnimationKey *, signed int))LODWORD(v7->m_fTime))(v7, 1);
  v8 = v4->m_uiNumKeys;
  if ( v8 )
  {
    pkNewKeys = 0;
    result = 0;
    NiAnimationKey::CopySequence(
      POSKEY,
      v4->m_eType,
      (NiAnimationKey *)&v4->m_pkKeys->m_fTime,
      v8,
      fStartTime,
      fEndTime,
      &pkNewKeys,
      (unsigned int *)&result);
    NiPosData::ReplaceAnim(v6->m_pObject, (NiPosKey *)pkNewKeys, (unsigned int)result, v4->m_eType);
  }
  return v6;
}

//----- (007E8E00) --------------------------------------------------------
void __thiscall NiPosData::LoadBinary(NiPosData *this, NiStream *stream)
{
  NiStream *v2; // ebx@1
  NiPosData *v3; // esi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST14_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v7; // eax@2
  NiBinaryStream *v8; // ST14_4@2
  unsigned int (__cdecl *v9)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@2
  NiAnimationKey::KeyType v10; // edi@2
  NiStream *v11; // ST10_4@2
  NiPosKey *v12; // ebx@2
  NiAnimationKey::KeyType eType; // [sp+Ch] [bp-8h]@2
  int v14; // [sp+10h] [bp-4h]@1

  v2 = stream;
  v3 = this;
  NiObject::LoadBinary((NiObject *)&this->vfptr, stream);
  v4 = v2->m_pkIstr;
  v5 = v4;
  v6 = v4->m_pfnRead;
  v14 = 4;
  v6(v5, &stream, 4u, (unsigned int *)&v14, 1u);
  if ( stream )
  {
    v7 = v2->m_pkIstr;
    v8 = v7;
    v9 = v7->m_pfnRead;
    v14 = 4;
    v9(v8, &eType, 4u, (unsigned int *)&v14, 1u);
    v10 = eType;
    v11 = stream;
    v3->m_ucKeySize = byte_B61906[eType];
    v12 = (NiPosKey *)((int (__cdecl *)(NiStream *, NiStream *))dword_B61F70[v10])(v2, v11);
    ((void (__cdecl *)(NiPosKey *, NiStream *, _DWORD))dword_B61940[v10])(v12, stream, v3->m_ucKeySize);
    NiPosData::ReplaceAnim(v3, v12, (unsigned int)stream, v10);
  }
}
// B61940: using guessed type int dword_B61940[];
// B61F70: using guessed type int dword_B61F70[];

//----- (007E8EA0) --------------------------------------------------------
void __thiscall NiPosData::SaveBinary(NiPosData *this, NiStream *stream)
{
  NiStream *v2; // edi@1
  NiPosData *v3; // esi@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@1
  NiBinaryStream *v5; // ST0C_4@1
  NiBinaryStream *v6; // eax@2
  NiBinaryStream *v7; // ST0C_4@2
  unsigned int (__cdecl *v8)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@2

  v2 = stream;
  v3 = this;
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue(
    (NiVBDynamicSet *)this,
    (IDirect3DVertexBuffer9 *)stream);
  v4 = v2->m_pkOstr->m_pfnWrite;
  v5 = v2->m_pkOstr;
  stream = (NiStream *)4;
  v4(v5, &v3->m_uiNumKeys, 4u, (unsigned int *)&stream, 1u);
  if ( v3->m_uiNumKeys )
  {
    v6 = v2->m_pkOstr;
    v7 = v6;
    v8 = v6->m_pfnWrite;
    stream = (NiStream *)4;
    v8(v7, &v3->m_eType, 4u, (unsigned int *)&stream, 1u);
    ((void (__cdecl *)(_DWORD, _DWORD, _DWORD))dword_B61C10[v3->m_eType])(v2, v3->m_pkKeys, v3->m_uiNumKeys);
  }
}
// B61C10: using guessed type int dword_B61C10[];

//----- (007E8F20) --------------------------------------------------------
void __thiscall NiPosData::GetViewerStrings(NiPosData *this, NiTArray<char *> *pStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiPosData *v3; // ebx@1
  NiTArray<char *> *v4; // eax@1
  unsigned int v5; // edi@1
  NiTArray<char *> *v6; // eax@3
  unsigned int v7; // edi@3

  v2 = (NiTArray<NiVBBlock *> *)pStrings;
  v3 = this;
  NiObject::GetViewerStrings((NiObject *)&this->vfptr, pStrings);
  v4 = (NiTArray<char *> *)NiGetViewerString(NiPosData::m_RTTI.m_pcName);
  v5 = v2->m_uiSize;
  pStrings = v4;
  if ( v5 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v5 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v5, (NiVBChip *const *)&pStrings);
  v6 = (NiTArray<char *> *)NiGetViewerString("m_uiNumKeys", v3->m_uiNumKeys);
  v7 = v2->m_uiSize;
  pStrings = v6;
  if ( v7 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v7 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v7, (NiVBChip *const *)&pStrings);
}

//----- (007E8FA0) --------------------------------------------------------
NiPosData *__thiscall NiPoint3Interpolator::GetKeyCount(NiPoint3Interpolator *this, unsigned __int16 usChannel)
{
  NiPosData *result; // eax@1

  result = this->m_spPoint3Data.m_pObject;
  if ( result )
    result = (NiPosData *)result->m_uiNumKeys;
  return result;
}

//----- (007E8FB0) --------------------------------------------------------
NiPosData *__thiscall NiPoint3Interpolator::GetKeyType(NiPoint3Interpolator *this, unsigned __int16 usChannel)
{
  NiPosData *result; // eax@1

  result = this->m_spPoint3Data.m_pObject;
  if ( result )
    result = (NiPosData *)result->m_eType;
  return result;
}

//----- (007E8FC0) --------------------------------------------------------
NiAnimationKey *__thiscall NiPoint3Interpolator::GetKeyArray(NiPoint3Interpolator *this, unsigned __int16 usChannel)
{
  NiAnimationKey *result; // eax@1

  result = (NiAnimationKey *)this->m_spPoint3Data.m_pObject;
  if ( result )
    result = (NiAnimationKey *)LODWORD(result[3].m_fTime);
  return result;
}

//----- (007E8FD0) --------------------------------------------------------
char __thiscall NiPoint3Interpolator::GetKeyStride(NiPoint3Interpolator *this, unsigned __int16 usChannel)
{
  NiPosData *v2; // eax@1
  char result; // al@2

  v2 = this->m_spPoint3Data.m_pObject;
  if ( v2 )
    result = v2->m_ucKeySize;
  else
    result = 0;
  return result;
}

//----- (007E8FF0) --------------------------------------------------------
bool __thiscall NiPoint3Interpolator::GetChannelPosed(NiPoint3Interpolator *this, unsigned __int16 usChannel)
{
  return !this->m_spPoint3Data.m_pObject
      && (NiInterpolator::INVALID_POINT3.x != this->m_kPoint3Value.x
       || *(float *)&dword_A7CAE0 != this->m_kPoint3Value.y
       || *(float *)&dword_A7CAE4 != this->m_kPoint3Value.z);
}
// A7CADC: using guessed type const struct NiPoint3 NiInterpolator::INVALID_POINT3;
// A7CAE0: using guessed type int dword_A7CAE0;
// A7CAE4: using guessed type int dword_A7CAE4;

//----- (007E9040) --------------------------------------------------------
void __thiscall NiPoint3Interpolator::SetPoseValue(NiPoint3Interpolator *this, NiPoint3 kPoseValue)
{
  NiPoint3Interpolator *v2; // edi@1
  NiPosData *v3; // esi@1

  v2 = this;
  v3 = this->m_spPoint3Data.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spPoint3Data.m_pObject = 0;
  }
  v2->m_kPoint3Value = kPoseValue;
}

//----- (007E9090) --------------------------------------------------------
void __thiscall NiPoint3Interpolator::GuaranteeTimeRange(NiPoint3Interpolator *this, float fStartTime, float fEndTime)
{
  NiPosData *v3; // ecx@1

  v3 = this->m_spPoint3Data.m_pObject;
  if ( v3 )
    NiRotData::GuaranteeKeysAtStartAndEnd((NiRotData *)v3, fStartTime, fEndTime);
}

//----- (007E90C0) --------------------------------------------------------
void __thiscall NiPoint3Interpolator::LoadBinary(NiPoint3Interpolator *this, NiStream *kStream)
{
  NiPoint3Interpolator *v2; // esi@1
  NiObject *v3; // eax@1
  NiPosData *v4; // edi@1
  NiPosData *v5; // ebx@1

  v2 = this;
  NiBackToFrontAccumulator::LoadBinary((NiBackToFrontAccumulator *)this, kStream);
  NiPoint3::LoadBinary(&v2->m_kPoint3Value, kStream);
  v3 = NiStream::ResolveLinkID(kStream);
  v4 = v2->m_spPoint3Data.m_pObject;
  v5 = (NiPosData *)v3;
  if ( (NiObject *)v4 != v3 )
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v2->m_spPoint3Data.m_pObject = v5;
    if ( v5 )
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  }
}

//----- (007E9130) --------------------------------------------------------
char __thiscall NiPoint3Interpolator::RegisterStreamables(NiPoint3Interpolator *this, NiStream *kStream)
{
  NiPoint3Interpolator *v2; // esi@1
  char result; // al@1
  NiPosData *v4; // ecx@2

  v2 = this;
  result = NiScreenLODData::RegisterStreamables((NiPSysSpawnModifier *)this, kStream);
  if ( result )
  {
    v4 = v2->m_spPoint3Data.m_pObject;
    if ( v4 )
      ((void (__stdcall *)(_DWORD))v4->vfptr[5].__vecDelDtor)(kStream);
    result = 1;
  }
  return result;
}

//----- (007E9170) --------------------------------------------------------
void __thiscall NiPoint3Interpolator::SaveBinary(NiPoint3Interpolator *this, NiStream *kStream)
{
  NiPoint3Interpolator *v2; // esi@1

  v2 = this;
  NiDefaultAVObjectPalette::LinkObject((NiScreenLODData *)this, kStream);
  NiColor::SaveBinary(&v2->m_kPoint3Value, kStream);
  kStream->vfptr->SaveLinkID(kStream, (NiObject *)v2->m_spPoint3Data.m_pObject);
}

//----- (007E91A0) --------------------------------------------------------
void __thiscall NiPoint3Interpolator::NiPoint3Interpolator(NiPoint3Interpolator *this, NiPosData *pkPoint3Data)
{
  NiPoint3Interpolator *v2; // esi@1

  v2 = this;
  NiKeyBasedInterpolator::NiKeyBasedInterpolator((NiKeyBasedInterpolator *)&this->vfptr);
  v2->vfptr = (NiRefObjectVtbl *)&NiPoint3Interpolator::`vftable';
  v2->m_kPoint3Value = NiInterpolator::INVALID_POINT3;
  v2->m_spPoint3Data.m_pObject = pkPoint3Data;
  if ( pkPoint3Data )
    InterlockedIncrement((volatile LONG *)&pkPoint3Data->m_uiRefCount);
  v2->m_uiLastIdx = 0;
}
// 9E64BC: using guessed type int (__thiscall *NiPoint3Interpolator::`vftable')(void *p, char);
// A7CADC: using guessed type const struct NiPoint3 NiInterpolator::INVALID_POINT3;

//----- (007E91F0) --------------------------------------------------------
NiRTTI *NiPoint3Interpolator::GetRTTI()
{
  return &NiPoint3Interpolator::m_RTTI;
}

//----- (007E9200) --------------------------------------------------------
void __thiscall NiPoint3Interpolator::NiPoint3Interpolator(NiPoint3Interpolator *this, NiPoint3 kPoseValue)
{
  NiPoint3Interpolator *v2; // esi@1

  v2 = this;
  NiKeyBasedInterpolator::NiKeyBasedInterpolator((NiKeyBasedInterpolator *)&this->vfptr);
  v2->m_kPoint3Value = kPoseValue;
  v2->vfptr = (NiRefObjectVtbl *)&NiPoint3Interpolator::`vftable';
  v2->m_spPoint3Data.m_pObject = 0;
  v2->m_uiLastIdx = 0;
}
// 9E64BC: using guessed type int (__thiscall *NiPoint3Interpolator::`vftable')(void *p, char);

//----- (007E9240) --------------------------------------------------------
void __thiscall NiPoint3Interpolator::Collapse(NiPoint3Interpolator *this)
{
  NiPoint3Interpolator *v1; // ebx@1
  NiPosData *v2; // eax@1
  unsigned int v3; // ecx@2
  char v4; // dl@2
  NiAnimationKey::KeyType v5; // esi@2
  NiPosKey *v6; // edi@2
  NiPosData *v7; // esi@3
  float v8; // eax@9
  float v9; // edx@9
  char v10; // bl@12
  unsigned int v11; // esi@12
  NiPosData *v12; // esi@21
  float v13; // ecx@26
  float v14; // edx@26
  NiPoint3 kValue; // [sp+4h] [bp-18h]@9
  NiPoint3Interpolator *v16; // [sp+10h] [bp-Ch]@1
  unsigned int uiNumKeys; // [sp+14h] [bp-8h]@2
  char ucSize; // [sp+1Bh] [bp-1h]@2

  v1 = this;
  v2 = this->m_spPoint3Data.m_pObject;
  v16 = this;
  if ( !v2 )
    return;
  v3 = v2->m_uiNumKeys;
  v4 = v2->m_ucKeySize;
  v5 = v2->m_eType;
  v6 = v2->m_pkKeys;
  uiNumKeys = v3;
  ucSize = v4;
  if ( !v3 )
  {
    v7 = v2;
    if ( v2 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      {
        if ( v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      }
      v1->m_spPoint3Data.m_pObject = 0;
    }
    v1->m_kPoint3Value = NiInterpolator::INVALID_POINT3;
    return;
  }
  v8 = v6->m_Pos.y;
  kValue.x = v6->m_Pos.x;
  v9 = v6->m_Pos.z;
  kValue.y = v8;
  kValue.z = v9;
  if ( v3 == 1 )
    goto LABEL_21;
  if ( v5 == 1 || v5 == 5 )
  {
    v10 = 1;
    v11 = 1;
    while ( v11 < v3 )
    {
      if ( (unsigned __int8)NiColor::operator!=(
                              (NiColor *)((char *)&v6->m_Pos + v11 * (unsigned __int8)ucSize),
                              (NiColor *)&kValue) )
        v10 = 0;
      ++v11;
      if ( !v10 )
        return;
      v3 = uiNumKeys;
    }
    if ( v10 )
    {
      v1 = v16;
LABEL_21:
      v12 = v1->m_spPoint3Data.m_pObject;
      if ( v12 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
          v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
        v1->m_spPoint3Data.m_pObject = 0;
      }
      v13 = kValue.y;
      v14 = kValue.z;
      v1->m_kPoint3Value.x = kValue.x;
      v1->m_kPoint3Value.y = v13;
      v1->m_kPoint3Value.z = v14;
      return;
    }
  }
}
// A7CADC: using guessed type const struct NiPoint3 NiInterpolator::INVALID_POINT3;

//----- (007E9360) --------------------------------------------------------
NiInterpolator *__thiscall NiPoint3Interpolator::GetSequenceInterpolator(NiPoint3Interpolator *this, float fStartTime, float fEndTime)
{
  NiPoint3Interpolator *v3; // esi@1
  NiInterpolator *result; // eax@1
  NiPosData *v5; // ecx@1
  NiInterpolator *v6; // edi@1
  float v7; // eax@2
  NiRefObjectVtbl *v8; // esi@2
  float v9; // ebx@2
  void (__thiscall ***v10)(_DWORD, _DWORD); // esi@11

  v3 = this;
  result = (NiInterpolator *)NiInterpolator::GetSequenceInterpolator(
                               (NiInterpolator *)&this->vfptr,
                               fStartTime,
                               fEndTime);
  v5 = v3->m_spPoint3Data.m_pObject;
  v6 = result;
  if ( v5 )
  {
    NiPosData::GetSequenceData(v5, (NiPointer<NiPosData> *)&fEndTime, fStartTime, fEndTime);
    v7 = fEndTime;
    v8 = v6[2].vfptr;
    v9 = fEndTime;
    if ( v8 != (NiRefObjectVtbl *)LODWORD(fEndTime) )
    {
      if ( v8 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v8[1]) && v8 )
          (*(void (__thiscall **)(NiRefObjectVtbl *, signed int))v8->__vecDelDtor)(v8, 1);
        v7 = fEndTime;
      }
      *(float *)&v6[2].vfptr = v9;
      if ( v9 != 0.0 )
      {
        InterlockedIncrement((volatile LONG *)(LODWORD(v9) + 4));
        v7 = fEndTime;
      }
    }
    v6[2].m_uiRefCount = 0;
    if ( v7 != 0.0 )
    {
      v10 = (void (__thiscall ***)(_DWORD, _DWORD))LODWORD(v7);
      if ( !InterlockedDecrement((volatile LONG *)(LODWORD(v7) + 4)) )
      {
        if ( v10 )
          (**v10)(v10, 1);
      }
    }
    result = v6;
  }
  return result;
}

//----- (007E9420) --------------------------------------------------------
char __thiscall NiPoint3Interpolator::Update(NiPoint3Interpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiPoint3 *kValue)
{
  NiPoint3Interpolator *v4; // esi@1
  double v5; // st7@1
  NiPosData *v7; // eax@6
  unsigned int v8; // ecx@7
  char v9; // dl@7
  NiAnimationKey::KeyType v10; // edi@7
  NiPosKey *v11; // eax@7
  NiPoint3 *v12; // eax@8
  NiPoint3 result; // [sp+20h] [bp-10h]@8
  int ucSize; // [sp+2Ch] [bp-4h]@7

  v4 = this;
  v5 = fTime;
  if ( fTime == this->m_fLastTime )
  {
    kValue->x = this->m_kPoint3Value.x;
    kValue->y = this->m_kPoint3Value.y;
    kValue->z = this->m_kPoint3Value.z;
    if ( NiInterpolator::INVALID_POINT3.x == this->m_kPoint3Value.x
      && NiInterpolator::INVALID_POINT3.y == this->m_kPoint3Value.y
      && NiInterpolator::INVALID_POINT3.z == this->m_kPoint3Value.z )
    {
      return 0;
    }
  }
  else
  {
    v7 = this->m_spPoint3Data.m_pObject;
    if ( v7 )
    {
      v8 = v7->m_uiNumKeys;
      v9 = v7->m_ucKeySize;
      v10 = v7->m_eType;
      v11 = v7->m_pkKeys;
      LOBYTE(ucSize) = v9;
      if ( v8 )
      {
        v12 = NiPosKey::GenInterp(&result, fTime, v11, v10, v8, &v4->m_uiLastIdx, ucSize);
        v5 = fTime;
        v4->m_kPoint3Value.x = v12->x;
        v4->m_kPoint3Value.y = v12->y;
        v4->m_kPoint3Value.z = v12->z;
      }
    }
    if ( NiInterpolator::INVALID_POINT3.x == v4->m_kPoint3Value.x
      && NiInterpolator::INVALID_POINT3.y == v4->m_kPoint3Value.y
      && NiInterpolator::INVALID_POINT3.z == v4->m_kPoint3Value.z )
    {
      return 0;
    }
    kValue->x = v4->m_kPoint3Value.x;
    kValue->y = v4->m_kPoint3Value.y;
    kValue->z = v4->m_kPoint3Value.z;
    v4->m_fLastTime = v5;
  }
  return 1;
}
// A7CADC: using guessed type const struct NiPoint3 NiInterpolator::INVALID_POINT3;

//----- (007E9550) --------------------------------------------------------
void __thiscall NiPoint3Interpolator::CopyMembers(NiPoint3Interpolator *this, NiPoint3Interpolator *pkDest, NiCloningProcess *kCloning)
{
  NiPoint3Interpolator *v3; // esi@1
  NiPosData *v4; // ebx@1
  NiPosData *v5; // eax@6

  v3 = this;
  NiBackToFrontAccumulator::CopyMembers((NiBackToFrontAccumulator *)this, (NiBackToFrontAccumulator *)pkDest, kCloning);
  pkDest->m_kPoint3Value.x = v3->m_kPoint3Value.x;
  pkDest->m_kPoint3Value.y = v3->m_kPoint3Value.y;
  pkDest->m_kPoint3Value.z = v3->m_kPoint3Value.z;
  v4 = pkDest->m_spPoint3Data.m_pObject;
  if ( v4 == v3->m_spPoint3Data.m_pObject )
  {
    pkDest->m_uiLastIdx = v3->m_uiLastIdx;
  }
  else
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v5 = v3->m_spPoint3Data.m_pObject;
    pkDest->m_spPoint3Data.m_pObject = v5;
    if ( v5 )
    {
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
      pkDest->m_uiLastIdx = v3->m_uiLastIdx;
    }
    else
    {
      pkDest->m_uiLastIdx = v3->m_uiLastIdx;
    }
  }
}

//----- (007E95E0) --------------------------------------------------------
NiKeyBasedInterpolator *__cdecl NiPoint3Interpolator::CreateObject()
{
  NiKeyBasedInterpolator *v0; // eax@1
  NiKeyBasedInterpolator *v1; // esi@1
  NiKeyBasedInterpolator *result; // eax@2

  v0 = (NiKeyBasedInterpolator *)operator new(0x20u);
  v1 = v0;
  if ( v0 )
  {
    NiKeyBasedInterpolator::NiKeyBasedInterpolator(v0);
    v1->vfptr = (NiRefObjectVtbl *)&NiPoint3Interpolator::`vftable';
    v1[1] = (NiKeyBasedInterpolator)NiInterpolator::INVALID_POINT3;
    v1[2].vfptr = 0;
    v1[2].m_uiRefCount = 0;
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E64BC: using guessed type int (__thiscall *NiPoint3Interpolator::`vftable')(void *p, char);
// A7CADC: using guessed type const struct NiPoint3 NiInterpolator::INVALID_POINT3;

//----- (007E9630) --------------------------------------------------------
char __thiscall NiPoint3Interpolator::IsEqual(NiPoint3Interpolator *this, NiObject *pkObject)
{
  NiPoint3Interpolator *v2; // esi@1
  NiPosData *v4; // ecx@6

  v2 = this;
  if ( !NiKeyBasedInterpolator::IsEqual((NiKeyBasedInterpolator *)&this->vfptr, pkObject)
    || *(float *)&pkObject[1].m_uiRefCount != v2->m_kPoint3Value.x
    || *(float *)&pkObject[2].vfptr != v2->m_kPoint3Value.y
    || *(float *)&pkObject[2].m_uiRefCount != v2->m_kPoint3Value.z )
  {
    return 0;
  }
  v4 = v2->m_spPoint3Data.m_pObject;
  if ( v4 )
  {
    if ( !pkObject[3].vfptr )
      return 0;
    if ( v4 )
      goto LABEL_15;
  }
  if ( pkObject[3].vfptr )
    return 0;
  if ( v4 )
  {
LABEL_15:
    if ( (unsigned __int8)((int (__stdcall *)(_DWORD))v4->vfptr[7].__vecDelDtor)(pkObject[3].vfptr) )
      return 1;
    return 0;
  }
  return 1;
}

//----- (007E96B0) --------------------------------------------------------
NiPoint3Interpolator *__thiscall NiPoint3Interpolator::`vector deleting destructor'(NiPoint3Interpolator *this, unsigned int a2)
{
  NiPoint3Interpolator *v2; // edi@1
  NiPosData *v3; // esi@1

  v2 = this;
  v3 = this->m_spPoint3Data.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  NiKeyBasedInterpolator::~NiKeyBasedInterpolator((NiKeyBasedInterpolator *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007E9700) --------------------------------------------------------
NiPoint3Interpolator *__thiscall NiPoint3Interpolator::CreateClone(NiPoint3Interpolator *this, NiCloningProcess *kCloning)
{
  NiPoint3Interpolator *v2; // ebx@1
  NiKeyBasedInterpolator *v3; // eax@1
  NiPoint3Interpolator *v4; // esi@1
  NiPoint3Interpolator *result; // eax@2

  v2 = this;
  v3 = (NiKeyBasedInterpolator *)operator new(0x20u);
  v4 = (NiPoint3Interpolator *)v3;
  if ( v3 )
  {
    NiKeyBasedInterpolator::NiKeyBasedInterpolator(v3);
    v4->vfptr = (NiRefObjectVtbl *)&NiPoint3Interpolator::`vftable';
    v4->m_kPoint3Value = NiInterpolator::INVALID_POINT3;
    v4->m_spPoint3Data.m_pObject = 0;
    v4->m_uiLastIdx = 0;
    NiPoint3Interpolator::CopyMembers(v2, v4, kCloning);
    result = v4;
  }
  else
  {
    NiPoint3Interpolator::CopyMembers(v2, 0, kCloning);
    result = 0;
  }
  return result;
}
// 9E64BC: using guessed type int (__thiscall *NiPoint3Interpolator::`vftable')(void *p, char);
// A7CADC: using guessed type const struct NiPoint3 NiInterpolator::INVALID_POINT3;

//----- (007E9780) --------------------------------------------------------
void __thiscall NiPoint3Interpolator::GetViewerStrings(NiPoint3Interpolator *this, NiTArray<char *> *pkStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiPoint3Interpolator *v3; // ebx@1
  NiTArray<char *> *v4; // eax@1
  unsigned int v5; // edi@1
  NiTArray<char *> *v6; // eax@3
  unsigned int v7; // edi@3
  NiTArray<char *> *v8; // eax@5
  unsigned int v9; // edi@5

  v2 = (NiTArray<NiVBBlock *> *)pkStrings;
  v3 = this;
  NiKeyBasedInterpolator::GetViewerStrings((NiKeyBasedInterpolator *)&this->vfptr, pkStrings);
  v4 = (NiTArray<char *> *)NiGetViewerString(NiPoint3Interpolator::m_RTTI.m_pcName);
  v5 = v2->m_uiSize;
  pkStrings = v4;
  if ( v5 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v5 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v5, (NiVBChip *const *)&pkStrings);
  v6 = (NiTArray<char *> *)NiPoint3::GetViewerString(&v3->m_kPoint3Value, "m_kPoint3Value");
  v7 = v2->m_uiSize;
  pkStrings = v6;
  if ( v7 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v7 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v7, (NiVBChip *const *)&pkStrings);
  v8 = (NiTArray<char *> *)NiGetViewerString("m_spPoint3Data", v3->m_spPoint3Data.m_pObject);
  v9 = v2->m_uiSize;
  pkStrings = v8;
  if ( v9 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v9 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v9, (NiVBChip *const *)&pkStrings);
}

//----- (007E9830) --------------------------------------------------------
int __stdcall NiPathInterpolator::GetKeyContent(unsigned __int16 usChannel)
{
  int result; // eax@2

  if ( usChannel )
    result = (unsigned __int16)(usChannel - 1) != 0 ? 6 : 0;
  else
    result = 1;
  return result;
}

//----- (007E9860) --------------------------------------------------------
unsigned int __thiscall NiPathInterpolator::GetKeyCount(NiPathInterpolator *this, unsigned __int16 usChannel)
{
  NiPosData *v2; // ecx@2
  NiFloatData *v4; // ecx@5

  if ( usChannel )
  {
    if ( usChannel == 1 )
    {
      v4 = this->m_spPctData.m_pObject;
      if ( v4 )
        return v4->m_uiNumKeys;
    }
  }
  else
  {
    v2 = this->m_spPathData.m_pObject;
    if ( v2 )
      return v2->m_uiNumKeys;
  }
  return 0;
}

//----- (007E98A0) --------------------------------------------------------
NiAnimationKey::KeyType __thiscall NiPathInterpolator::GetKeyType(NiPathInterpolator *this, unsigned __int16 usChannel)
{
  NiPosData *v2; // ecx@2
  NiFloatData *v4; // ecx@5

  if ( usChannel )
  {
    if ( usChannel == 1 )
    {
      v4 = this->m_spPctData.m_pObject;
      if ( v4 )
        return v4->m_eType;
    }
  }
  else
  {
    v2 = this->m_spPathData.m_pObject;
    if ( v2 )
      return v2->m_eType;
  }
  return 0;
}

//----- (007E98E0) --------------------------------------------------------
NiPosKey *__thiscall NiPathInterpolator::GetKeyArray(NiPathInterpolator *this, unsigned __int16 usChannel)
{
  NiPosData *v2; // ecx@2
  NiFloatData *v4; // ecx@5

  if ( usChannel )
  {
    if ( usChannel == 1 )
    {
      v4 = this->m_spPctData.m_pObject;
      if ( v4 )
        return (NiPosKey *)v4->m_pkKeys;
    }
  }
  else
  {
    v2 = this->m_spPathData.m_pObject;
    if ( v2 )
      return v2->m_pkKeys;
  }
  return 0;
}

//----- (007E9920) --------------------------------------------------------
char __thiscall NiPathInterpolator::GetKeyStride(NiPathInterpolator *this, unsigned __int16 usChannel)
{
  NiPosData *v2; // ecx@2
  NiFloatData *v4; // ecx@5

  if ( usChannel )
  {
    if ( usChannel == 1 )
    {
      v4 = this->m_spPctData.m_pObject;
      if ( v4 )
        return v4->m_ucKeySize;
    }
  }
  else
  {
    v2 = this->m_spPathData.m_pObject;
    if ( v2 )
      return v2->m_ucKeySize;
  }
  return 0;
}

//----- (007E9960) --------------------------------------------------------
void __thiscall NiPathInterpolator::GetActiveTimeRange(NiPathInterpolator *this, float *fBeginKeyTime, float *fEndKeyTime)
{
  NiPathInterpolator *v3; // esi@1
  NiRefObjectVtbl *v4; // edx@1
  NiAnimationKey *v5; // edi@2
  int v6; // eax@2
  NiAnimationKey *v7; // eax@2

  *fBeginKeyTime = 3.4028235e38;
  v3 = this;
  v4 = this->vfptr;
  *fEndKeyTime = -3.4028235e38;
  if ( ((int (__stdcall *)(_DWORD))v4[35].__vecDelDtor)(1) )
  {
    v5 = NiKeyBasedInterpolator::GetKeyAt((NiKeyBasedInterpolator *)&v3->vfptr, 0, 1);
    v6 = (int)v3->vfptr[35].__vecDelDtor((NiRefObject *)v3, 1u);
    v7 = NiKeyBasedInterpolator::GetKeyAt((NiKeyBasedInterpolator *)&v3->vfptr, v6 - 1, 1);
    if ( v5 )
    {
      if ( v7 )
      {
        if ( *fBeginKeyTime > (double)v5->m_fTime )
          *fBeginKeyTime = v5->m_fTime;
        if ( *fEndKeyTime < (double)v7->m_fTime )
          *fEndKeyTime = v7->m_fTime;
      }
    }
  }
  if ( 3.4028235e38 == *fBeginKeyTime && -3.4028235e38 == *fEndKeyTime )
  {
    *fBeginKeyTime = 0.0;
    *fEndKeyTime = 0.0;
  }
}

//----- (007E9A30) --------------------------------------------------------
void __thiscall NiPathInterpolator::GuaranteeTimeRange(NiPathInterpolator *this, float fStartTime, float fEndTime)
{
  NiFloatData *v3; // ecx@1

  v3 = this->m_spPctData.m_pObject;
  if ( v3 )
    NiFloatData::GuaranteeKeysAtStartAndEnd(v3, fStartTime, fEndTime);
}

//----- (007E9A60) --------------------------------------------------------
void __thiscall NiPathInterpolator::ProcessClone(NiPathInterpolator *this, NiCloningProcess *kCloning)
{
  NiPathInterpolator *v2; // esi@1
  NiPosData *v3; // ecx@1
  NiFloatData *v4; // ecx@3

  v2 = this;
  NiObject::ProcessClone((NiObject *)&this->vfptr, kCloning);
  v3 = v2->m_spPathData.m_pObject;
  if ( v3 )
    ((void (__stdcall *)(_DWORD))v3->vfptr[10].__vecDelDtor)(kCloning);
  v4 = v2->m_spPctData.m_pObject;
  if ( v4 )
    ((void (__stdcall *)(_DWORD))v4->vfptr[10].__vecDelDtor)(kCloning);
}

//----- (007E9AA0) --------------------------------------------------------
char __thiscall NiPathInterpolator::RegisterStreamables(NiPathInterpolator *this, NiStream *kStream)
{
  NiPathInterpolator *v2; // esi@1
  char result; // al@1
  NiPosData *v4; // ecx@2
  NiFloatData *v5; // ecx@4

  v2 = this;
  result = NiScreenLODData::RegisterStreamables((NiPSysSpawnModifier *)this, kStream);
  if ( result )
  {
    v4 = v2->m_spPathData.m_pObject;
    if ( v4 )
      ((void (__stdcall *)(_DWORD))v4->vfptr[5].__vecDelDtor)(kStream);
    v5 = v2->m_spPctData.m_pObject;
    if ( v5 )
      ((void (__stdcall *)(_DWORD))v5->vfptr[5].__vecDelDtor)(kStream);
    result = 1;
  }
  return result;
}

//----- (007E9AE0) --------------------------------------------------------
NiPosKey *__thiscall NiPathInterpolator::GetPathKeys(NiPathInterpolator *this, unsigned int *uiNumKeys, NiAnimationKey::KeyType *eType, char *ucSize)
{
  NiPosData *v4; // ecx@1
  NiPosKey *result; // eax@1

  v4 = this->m_spPathData.m_pObject;
  result = 0;
  if ( v4 )
  {
    *uiNumKeys = v4->m_uiNumKeys;
    *eType = v4->m_eType;
    *ucSize = v4->m_ucKeySize;
    result = v4->m_pkKeys;
  }
  else
  {
    *uiNumKeys = 0;
    *eType = 0;
    *ucSize = 0;
  }
  return result;
}

//----- (007E9B20) --------------------------------------------------------
void __thiscall NiPathInterpolator::~NiPathInterpolator(NiPathInterpolator *this)
{
  NiPathInterpolator *v1; // esi@1
  NiPosData *v2; // edi@1
  NiFloatData *v3; // edi@6
  NiFloatData *v4; // edi@11
  NiPosData *v5; // edi@15

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiPathInterpolator::`vftable';
  v2 = this->m_spPathData.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spPathData.m_pObject = 0;
  }
  v3 = v1->m_spPctData.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spPctData.m_pObject = 0;
  }
  operator delete(v1->m_pfPartialLength);
  v4 = v1->m_spPctData.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v5 = v1->m_spPathData.m_pObject;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  NiKeyBasedInterpolator::~NiKeyBasedInterpolator((NiKeyBasedInterpolator *)&v1->vfptr);
}
// 9E6584: using guessed type int (__thiscall *NiPathInterpolator::`vftable')(void *p, char);

//----- (007E9BE0) --------------------------------------------------------
NiRTTI *NiPathInterpolator::GetRTTI()
{
  return &NiPathInterpolator::m_RTTI;
}

//----- (007E9BF0) --------------------------------------------------------
NiPoint3 *__thiscall NiPathInterpolator::GenPathInterp(NiPathInterpolator *this, NiPoint3 *result, int iI1, int iI2, float fNormTime)
{
  NiPosData *v5; // eax@1
  NiPosKey *v6; // edx@1
  NiAnimationKey::KeyType v7; // ecx@2
  char v8; // bl@2

  v5 = this->m_spPathData.m_pObject;
  v6 = 0;
  if ( v5 )
  {
    v7 = v5->m_eType;
    v8 = v5->m_ucKeySize;
    v6 = v5->m_pkKeys;
  }
  else
  {
    v7 = 0;
    v8 = 0;
  }
  ((void (__cdecl *)(_DWORD, char *, char *, NiPoint3 *))dword_B61E50[v7])(
    LODWORD(fNormTime),
    (char *)v6 + iI1 * (unsigned __int8)v8,
    (char *)v6 + iI2 * (unsigned __int8)v8,
    result);
  return result;
}
// B61E50: using guessed type int dword_B61E50[];

//----- (007E9C50) --------------------------------------------------------
void __thiscall NiPathInterpolator::CalcRefFrame(NiPathInterpolator *this, unsigned int ui1, unsigned int ui2, float fNormTime, NiMatrix3 *kRefFrame)
{
  NiPathInterpolator *v5; // ebx@1
  NiPosData *v6; // esi@1
  char v7; // dl@2
  NiPosKey *v8; // edi@2
  NiAnimationKey::KeyType v9; // ecx@2
  int v10; // esi@4
  double v11; // st7@5
  NiPosKey *v12; // ST08_4@11
  float v13; // edx@11
  float v14; // eax@11
  float v15; // ecx@11
  NiPoint3 *v16; // eax@12
  double v17; // st7@19
  double v18; // st6@19
  double v19; // st5@19
  unsigned __int16 v20; // cx@21
  float z; // ST1C_4@32
  float y; // ST18_4@32
  float x; // ST14_4@32
  NiPoint3 up; // [sp+2Ch] [bp-F8h]@11
  NiMatrix3 *v25; // [sp+38h] [bp-ECh]@1
  float v26; // [sp+3Ch] [bp-E8h]@11
  float v27; // [sp+40h] [bp-E4h]@11
  float v28; // [sp+44h] [bp-E0h]@11
  float v29; // [sp+48h] [bp-DCh]@11
  float v30; // [sp+4Ch] [bp-D8h]@11
  float v31; // [sp+50h] [bp-D4h]@11
  NiPosKey *pKey0; // [sp+54h] [bp-D0h]@4
  NiAnimationKey::KeyType ePathType; // [sp+58h] [bp-CCh]@2
  NiPoint3 kBinormal; // [sp+5Ch] [bp-C8h]@4
  NiPoint3 kTangent; // [sp+68h] [bp-BCh]@4
  NiPoint3 kNormal1; // [sp+74h] [bp-B0h]@11
  NiPoint3 kNormal; // [sp+80h] [bp-A4h]@4
  float fBankAmt; // [sp+8Ch] [bp-98h]@11
  float fCurvature; // [sp+90h] [bp-94h]@4
  NiPosKey *pKey1; // [sp+94h] [bp-90h]@4
  unsigned int ui1a; // [sp+98h] [bp-8Ch]@1
  float fA1; // [sp+9Ch] [bp-88h]@1
  char ucSize; // [sp+A3h] [bp-81h]@2
  float fA0; // [sp+A4h] [bp-80h]@2
  NiPoint3 right; // [sp+A8h] [bp-7Ch]@11
  NiMatrix3 result; // [sp+B4h] [bp-70h]@32
  NiMatrix3 kBankMat; // [sp+D8h] [bp-4Ch]@32
  NiMatrix3 kTm; // [sp+FCh] [bp-28h]@1

  v5 = this;
  fA1 = *(float *)&ui2;
  qmemcpy(&kTm, &NiMatrix3::IDENTITY, sizeof(kTm));
  v6 = this->m_spPathData.m_pObject;
  ui1a = ui1;
  v25 = kRefFrame;
  if ( !v6 )
    goto LABEL_34;
  v7 = v6->m_ucKeySize;
  v8 = v6->m_pkKeys;
  fA0 = *(float *)&v6->m_uiNumKeys;
  v9 = v6->m_eType;
  ePathType = v6->m_eType;
  ucSize = v7;
  if ( LODWORD(fA0) < 2 )
    goto LABEL_34;
  if ( !((LOBYTE(v5->m_uFlags) >> 2) & 1) )
  {
    NiPosKey::CoordinateFrame(
      fNormTime,
      (NiPosKey *)((char *)v8 + (unsigned __int8)ucSize * ui1),
      (NiPosKey *)((char *)v8 + LODWORD(fA1) * (unsigned __int8)ucSize),
      v9,
      &kTangent,
      &kNormal,
      &kBinormal,
      &fCurvature);
    kTm.m_pEntry[0][0] = kTangent.x;
    kTm.m_pEntry[1][0] = kTangent.y;
    kTm.m_pEntry[2][0] = kTangent.z;
    NiPoint3::UnitCross(&NiPoint3::UNIT_Z, &up, &kTangent);
    kTm.m_pEntry[0][1] = up.x;
    kTm.m_pEntry[1][1] = up.y;
    kTm.m_pEntry[2][1] = up.z;
    right.x = up.z * kTangent.y - up.y * kTangent.z;
    right.y = kTangent.z * up.x - up.z * kTangent.x;
    v18 = kTangent.y;
    right.z = up.y * kTangent.x - up.x * kTangent.y;
    kTm.m_pEntry[0][2] = right.x;
    kTm.m_pEntry[1][2] = right.y;
    kTm.m_pEntry[2][2] = right.z;
    v19 = kTangent.z;
    v17 = kTangent.x;
    goto LABEL_21;
  }
  v10 = (unsigned __int8)ucSize;
  pKey0 = (NiPosKey *)((char *)v8 + (unsigned __int8)ucSize * ui1);
  pKey1 = (NiPosKey *)((char *)v8 + LODWORD(fA1) * (unsigned __int8)ucSize);
  NiPosKey::CoordinateFrame(
    fNormTime,
    (NiPosKey *)((char *)v8 + (unsigned __int8)ucSize * ui1),
    (NiPosKey *)((char *)v8 + LODWORD(fA1) * (unsigned __int8)ucSize),
    v9,
    &kTangent,
    &kNormal,
    &kBinormal,
    &fCurvature);
  if ( 0.0 != v5->m_fSmoothing )
  {
    v11 = fNormTime;
    if ( 1.0 - v5->m_fSmoothing > fNormTime )
    {
      if ( v5->m_fSmoothing < v11 )
        goto LABEL_19;
      if ( !((LOBYTE(v5->m_uFlags) >> 1) & 1) && !ui1a )
        ui1a = LODWORD(fA0) - 1;
      if ( ui1a < 1 )
        goto LABEL_19;
      fA1 = (v5->m_fSmoothing - v11) / (v5->m_fSmoothing + v5->m_fSmoothing);
      fA0 = 1.0 - fA1;
      NiPosKey::CoordinateFrame(v5->m_fSmoothing, pKey0, pKey1, ePathType, &up, &kNormal, &kBinormal, &fCurvature);
      *(float *)&pKey1 = 1.0 - v5->m_fSmoothing;
      NiPosKey::CoordinateFrame(
        *(float *)&pKey1,
        (NiPosKey *)((char *)v8 + v10 * (ui1a - 1)),
        (NiPosKey *)((char *)v8 + ui1a * v10),
        ePathType,
        &up,
        &kNormal1,
        &kBinormal,
        &fBankAmt);
      v26 = kNormal1.x * fA1;
      v27 = kNormal1.y * fA1;
      v28 = fA1 * kNormal1.z;
      right.x = kNormal.x * fA0;
      right.y = kNormal.y * fA0;
      right.z = fA0 * kNormal.z;
      v29 = right.x + v26;
      v13 = v29;
      v30 = right.y + v27;
      v14 = v30;
      v31 = right.z + v28;
      v15 = v31;
    }
    else
    {
      if ( (LOBYTE(v5->m_uFlags) >> 1) & 1 || LODWORD(fA1) != LODWORD(fA0) - 1 )
        ui1a = LODWORD(fA1);
      else
        ui1a = 0;
      if ( ui1a >= LODWORD(fA0) - 1 )
        goto LABEL_19;
      v12 = pKey1;
      fA0 = (1.0 - v11 + v5->m_fSmoothing) / (v5->m_fSmoothing + v5->m_fSmoothing);
      fA1 = 1.0 - fA0;
      *(float *)&pKey1 = 1.0 - v5->m_fSmoothing;
      NiPosKey::CoordinateFrame(*(float *)&pKey1, pKey0, v12, ePathType, &up, &kNormal, &kBinormal, &fCurvature);
      NiPosKey::CoordinateFrame(
        v5->m_fSmoothing,
        (NiPosKey *)((char *)v8 + ui1a * v10),
        (NiPosKey *)((char *)v8 + v10 * (ui1a + 1)),
        ePathType,
        &up,
        &kNormal1,
        &kBinormal,
        &fBankAmt);
      v26 = kNormal1.x * fA1;
      v27 = kNormal1.y * fA1;
      v28 = fA1 * kNormal1.z;
      v29 = kNormal.x * fA0;
      v30 = kNormal.y * fA0;
      v31 = fA0 * kNormal.z;
      right.x = v29 + v26;
      v13 = right.x;
      right.y = v30 + v27;
      v14 = right.y;
      right.z = v31 + v28;
      v15 = right.z;
    }
    kNormal.z = v15;
    kNormal.y = v14;
    kNormal.x = v13;
    NiPoint3::Unitize(&kNormal);
    fCurvature = fBankAmt * fA1 + fA0 * fCurvature;
    v16 = NiPoint3::Cross(&kTangent, &right, &kNormal);
    kBinormal.x = v16->x;
    kBinormal.y = v16->y;
    kBinormal.z = v16->z;
  }
LABEL_19:
  v17 = kTangent.x;
  kTm.m_pEntry[0][0] = kTangent.x;
  v18 = kTangent.y;
  kTm.m_pEntry[1][0] = kTangent.y;
  v19 = kTangent.z;
  kTm.m_pEntry[2][0] = kTangent.z;
  right.x = -kNormal.x;
  right.y = -kNormal.y;
  right.z = -kNormal.z;
  kTm.m_pEntry[0][1] = right.x;
  kTm.m_pEntry[1][1] = right.y;
  kTm.m_pEntry[2][1] = right.z;
  right.x = -kBinormal.x;
  right.y = -kBinormal.y;
  right.z = -kBinormal.z;
  kTm.m_pEntry[0][2] = right.x;
  kTm.m_pEntry[1][2] = right.y;
  kTm.m_pEntry[2][2] = right.z;
LABEL_21:
  v20 = v5->m_uFlags;
  if ( ((unsigned __int8)v5->m_uFlags >> 6) & 1 )
  {
    right.x = -v17;
    right.y = -v18;
    right.z = -v19;
    kTm.m_pEntry[0][0] = right.x;
    kTm.m_pEntry[1][0] = right.y;
    kTm.m_pEntry[2][0] = right.z;
    right.x = -kTm.m_pEntry[0][1];
    right.y = -kTm.m_pEntry[1][1];
    right.z = -kTm.m_pEntry[2][1];
    kTm.m_pEntry[0][1] = right.x;
    kTm.m_pEntry[1][1] = right.y;
    kTm.m_pEntry[2][1] = right.z;
  }
  if ( v5->m_sFollowAxis == 1 )
  {
    kNormal1.x = kTm.m_pEntry[0][0];
    kNormal1.y = kTm.m_pEntry[1][0];
    kNormal1.z = kTm.m_pEntry[2][0];
    right.x = -kTm.m_pEntry[0][1];
    right.y = -kTm.m_pEntry[1][1];
    right.z = -kTm.m_pEntry[2][1];
    kTm.m_pEntry[0][0] = right.x;
    kTm.m_pEntry[1][0] = right.y;
    kTm.m_pEntry[2][0] = right.z;
    kTm.m_pEntry[0][1] = kNormal1.x;
    kTm.m_pEntry[1][1] = kNormal1.y;
    kTm.m_pEntry[2][1] = kNormal1.z;
  }
  else if ( v5->m_sFollowAxis == 2 )
  {
    kNormal1.x = kTm.m_pEntry[0][0];
    kNormal1.y = kTm.m_pEntry[1][0];
    kNormal1.z = kTm.m_pEntry[2][0];
    right.x = -kTm.m_pEntry[0][2];
    right.y = -kTm.m_pEntry[1][2];
    right.z = -kTm.m_pEntry[2][2];
    kTm.m_pEntry[0][0] = right.x;
    kTm.m_pEntry[1][0] = right.y;
    kTm.m_pEntry[2][0] = right.z;
    kTm.m_pEntry[0][2] = kNormal1.x;
    kTm.m_pEntry[1][2] = kNormal1.y;
    kTm.m_pEntry[2][2] = kNormal1.z;
  }
  if ( ((unsigned __int8)v20 >> 3) & 1 )
  {
    if ( !(_S1_0 & 1) )
    {
      _S1_0 |= 1u;
      s_fFourOverPi = 4.0 / NI_PI;
    }
    fBankAmt = (double)(signed int)v5->m_eBankDir * v5->m_fMaxBankAngle;
    if ( v5->m_fMaxCurvature > (double)fCurvature )
    {
      *(float *)&pKey1 = fCurvature / v5->m_fMaxCurvature;
      *(float *)&pKey1 = atan(*(float *)&pKey1);
      fBankAmt = *(float *)&pKey1 * s_fFourOverPi * fBankAmt;
      v17 = kTangent.x;
      v19 = kTangent.z;
      v18 = kTangent.y;
    }
    z = v19;
    y = v18;
    x = v17;
    NiMatrix3::MakeRotation(&kBankMat, fBankAmt, x, y, z);
    qmemcpy(&kTm, NiMatrix3::operator*(&kBankMat, &result, &kTm), sizeof(kTm));
  }
LABEL_34:
  qmemcpy(v25, &kTm, sizeof(NiMatrix3));
}
// B622CC: using guessed type const float NI_PI;

//----- (007EA4A0) --------------------------------------------------------
double __thiscall NiPathInterpolator::PathLength(NiPathInterpolator *this, int iI0, int iI1, float fTime)
{
  int v4; // edi@1
  signed int v5; // esi@1
  NiPosData *v6; // eax@2
  NiPosKey *v7; // ecx@2
  NiAnimationKey::KeyType v8; // edx@3
  char v9; // bl@3
  float v11; // [sp+1Ch] [bp-14h]@5
  float v12; // [sp+20h] [bp-10h]@5
  float v13; // [sp+24h] [bp-Ch]@5
  NiPathInterpolator *v14; // [sp+28h] [bp-8h]@1
  float fResult; // [sp+2Ch] [bp-4h]@1
  int iI0a; // [sp+38h] [bp+8h]@5
  int iI0b; // [sp+38h] [bp+8h]@5
  int iI0c; // [sp+38h] [bp+8h]@5

  fResult = 0.0;
  v4 = iI0;
  v14 = this;
  v5 = 0;
  do
  {
    v6 = v14->m_spPathData.m_pObject;
    v7 = 0;
    if ( v6 )
    {
      v8 = v6->m_eType;
      v9 = v6->m_ucKeySize;
      v7 = v6->m_pkKeys;
    }
    else
    {
      v8 = 0;
      v9 = 0;
    }
    *(float *)&iI0a = *(float *)(v5 + 10994452) * fTime;
    ((void (__cdecl *)(int, char *, char *, float *))dword_B61DC0[v8])(
      iI0a,
      (char *)v7 + v4 * (unsigned __int8)v9,
      (char *)v7 + iI1 * (unsigned __int8)v9,
      &v11);
    *(float *)&iI0b = v11 * v11 + v12 * v12 + v13 * v13;
    *(float *)&iI0c = sqrt(*(float *)&iI0b);
    v5 += 4;
    fResult = *(float *)&iI0c * *(float *)(v5 + 10994428) + fResult;
  }
  while ( v5 < 20 );
  return (float)(fResult * fTime);
}
// B61DC0: using guessed type int dword_B61DC0[];

//----- (007EA570) --------------------------------------------------------
NiInterpolator *__thiscall NiPathInterpolator::GetSequenceInterpolator(NiPathInterpolator *this, float fStartTime, float fEndTime)
{
  NiPathInterpolator *v3; // esi@1
  NiInterpolator *result; // eax@1
  NiFloatData *v5; // ecx@1
  NiInterpolator *v6; // edi@1
  float v7; // eax@2
  unsigned int v8; // esi@2
  float v9; // ebx@2
  void (__thiscall ***v10)(_DWORD, _DWORD); // esi@11

  v3 = this;
  result = (NiInterpolator *)NiInterpolator::GetSequenceInterpolator(
                               (NiInterpolator *)&this->vfptr,
                               fStartTime,
                               fEndTime);
  v5 = v3->m_spPctData.m_pObject;
  v6 = result;
  if ( v5 )
  {
    NiFloatData::GetSequenceData(v5, (NiPointer<NiFloatData> *)&fEndTime, fStartTime, fEndTime);
    v7 = fEndTime;
    v8 = v6[2].m_uiRefCount;
    v9 = fEndTime;
    if ( v8 != LODWORD(fEndTime) )
    {
      if ( v8 )
      {
        if ( !InterlockedDecrement((volatile LONG *)(v8 + 4)) && v8 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v8)(v8, 1);
        v7 = fEndTime;
      }
      *(float *)&v6[2].m_uiRefCount = v9;
      if ( v9 != 0.0 )
      {
        InterlockedIncrement((volatile LONG *)(LODWORD(v9) + 4));
        v7 = fEndTime;
      }
    }
    LODWORD(v6[1].m_fLastTime) = 0;
    if ( v7 != 0.0 )
    {
      v10 = (void (__thiscall ***)(_DWORD, _DWORD))LODWORD(v7);
      if ( !InterlockedDecrement((volatile LONG *)(LODWORD(v7) + 4)) )
      {
        if ( v10 )
          (**v10)(v10, 1);
      }
    }
    result = v6;
  }
  return result;
}

//----- (007EA630) --------------------------------------------------------
char __thiscall NiPathInterpolator::IsEqual(NiPathInterpolator *this, NiObject *pkObject)
{
  NiObject *v2; // edi@1
  NiPathInterpolator *v3; // ebx@1
  NiPosData *v5; // ecx@3
  NiFloatData *v6; // ecx@9
  float *v7; // esi@15
  NiRefObjectVtbl *v8; // ecx@20
  unsigned int v9; // eax@20
  unsigned __int16 v10; // dx@31
  __int16 v11; // cx@31
  NiAnimationKey::KeyType ePathType; // [sp+8h] [bp-Ch]@20
  NiPathInterpolator *v13; // [sp+Ch] [bp-8h]@1
  unsigned int uiNumPathKeys; // [sp+10h] [bp-4h]@20

  v2 = pkObject;
  v3 = this;
  v13 = this;
  if ( !NiKeyBasedInterpolator::IsEqual((NiKeyBasedInterpolator *)&this->vfptr, pkObject) )
    return 0;
  v5 = v3->m_spPathData.m_pObject;
  if ( v5 )
  {
    if ( !v2[3].vfptr )
      return 0;
    if ( v5 )
      goto LABEL_45;
  }
  if ( v2[3].vfptr )
    return 0;
  if ( v5 )
  {
LABEL_45:
    if ( !(unsigned __int8)((int (__stdcall *)(NiRefObjectVtbl *))v5->vfptr[7].__vecDelDtor)(v2[3].vfptr) )
      return 0;
  }
  v6 = v3->m_spPctData.m_pObject;
  if ( v6 )
  {
    if ( !v2[3].m_uiRefCount )
      return 0;
    if ( v6 )
      goto LABEL_46;
  }
  if ( v2[3].m_uiRefCount )
    return 0;
  if ( v6 )
  {
LABEL_46:
    if ( (unsigned __int8)((int (__stdcall *)(unsigned int))v6->vfptr[7].__vecDelDtor)(v2[3].m_uiRefCount) )
      goto LABEL_15;
    return 0;
  }
LABEL_15:
  v7 = v3->m_pfPartialLength;
  if ( !v7 )
    goto LABEL_48;
  if ( !v2[4].vfptr )
    return 0;
  if ( !v7 )
  {
LABEL_48:
    if ( v2[4].vfptr )
      return 0;
    if ( !v7 )
      goto LABEL_47;
  }
  NiPathInterpolator::GetPathKeys(v3, &uiNumPathKeys, &ePathType, (char *)&pkObject + 3);
  v8 = v2[4].vfptr;
  v9 = 4 * uiNumPathKeys;
  if ( 4 * uiNumPathKeys >= 4 )
  {
    while ( *(void *(__thiscall **)(NiRefObject *, unsigned int))v7 == v8->__vecDelDtor )
    {
      v9 -= 4;
      ++v8;
      ++v7;
      if ( v9 < 4 )
        goto LABEL_23;
    }
    return 0;
  }
LABEL_23:
  if ( !v9 )
    goto LABEL_47;
  if ( LOBYTE(v8->__vecDelDtor) == *(_BYTE *)v7
    && (v9 <= 1
     || BYTE1(v8->__vecDelDtor) == *((_BYTE *)v7 + 1) && (v9 <= 2 || BYTE2(v8->__vecDelDtor) == *((_BYTE *)v7 + 2))) )
  {
LABEL_47:
    if ( *(float *)&v2[4].m_uiRefCount == v3->m_fTotalLength
      && !((LOBYTE(v3->m_uFlags) ^ LOBYTE(v2[1].m_uiRefCount)) & 1) )
    {
      v10 = v3->m_uFlags;
      v11 = v2[1].m_uiRefCount;
      if ( !((((unsigned __int8)v3->m_uFlags >> 1) ^ ((unsigned __int8)LOWORD(v2[1].m_uiRefCount) >> 1)) & 1)
        && (NiRefObjectVtbl *)v13->m_eBankDir == v2[7].vfptr
        && !((((unsigned __int8)v10 >> 2) ^ ((unsigned __int8)v11 >> 2)) & 1)
        && !((((unsigned __int8)v10 >> 3) ^ ((unsigned __int8)v11 >> 3)) & 1)
        && !((((unsigned __int8)v10 >> 4) ^ ((unsigned __int8)v11 >> 4)) & 1)
        && !((((unsigned __int8)v10 >> 5) ^ ((unsigned __int8)v11 >> 5)) & 1)
        && *(float *)&v2[5].vfptr == v13->m_fMaxBankAngle
        && *(float *)&v2[5].m_uiRefCount == v13->m_fSmoothing
        && v13->m_sFollowAxis == LOWORD(v2[6].vfptr)
        && !((((unsigned __int8)v10 >> 6) ^ ((unsigned __int8)v11 >> 6)) & 1) )
      {
        return 1;
      }
    }
  }
  return 0;
}

//----- (007EA810) --------------------------------------------------------
NiPathInterpolator *__thiscall NiPathInterpolator::`scalar deleting destructor'(NiPathInterpolator *this, unsigned int a2)
{
  NiPathInterpolator *v2; // esi@1

  v2 = this;
  NiPathInterpolator::~NiPathInterpolator(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007EA840) --------------------------------------------------------
double __thiscall NiPathInterpolator::GetTotalPathLength(NiPathInterpolator *this)
{
  NiPathInterpolator *v1; // edi@1
  NiPosData *v2; // eax@2
  unsigned int v3; // esi@2
  unsigned int v4; // ebx@3
  float *v5; // eax@5
  float fLength; // ST18_4@6
  unsigned int uiNumPathKeys; // [sp+14h] [bp-4h]@3

  v1 = this;
  if ( this->m_fTotalLength < 0.0 )
  {
    v2 = this->m_spPathData.m_pObject;
    v3 = 0;
    if ( v2 )
    {
      v4 = v2->m_uiNumKeys;
      uiNumPathKeys = v2->m_uiNumKeys;
    }
    else
    {
      uiNumPathKeys = 0;
      v4 = 0;
    }
    operator delete(this->m_pfPartialLength);
    v5 = (float *)operator new(4 * v4);
    v1->m_pfPartialLength = v5;
    *v5 = 0.0;
    if ( v4 - 1 > 0 )
    {
      do
      {
        fLength = NiPathInterpolator::PathLength(v1, v3, v3 + 1, 1.0);
        v1->m_pfPartialLength[v3 + 1] = v1->m_pfPartialLength[v3] + fLength;
        ++v3;
      }
      while ( v3 < uiNumPathKeys - 1 );
      v4 = uiNumPathKeys;
    }
    v1->m_fTotalLength = v1->m_pfPartialLength[v4 - 1];
  }
  return v1->m_fTotalLength;
}

//----- (007EA8F0) --------------------------------------------------------
void __thiscall NiPathInterpolator::SetConstantVelocityData(NiPathInterpolator *this)
{
  NiPathInterpolator *v1; // esi@1

  v1 = this;
  if ( this->m_uFlags & 1 )
  {
    this->m_fTotalLength = NiPathInterpolator::GetTotalPathLength(this);
    v1->m_uFlags &= 0xFFFEu;
  }
}

//----- (007EA910) --------------------------------------------------------
void __thiscall NiPathInterpolator::GetPercentLoc(NiPathInterpolator *this, float fPercent, unsigned int *uiI1, unsigned int *uiI2, float *fNormTime)
{
  NiPathInterpolator *v5; // ebx@1
  NiPosData *v6; // eax@1
  unsigned int v7; // esi@2
  long double v8; // st7@4
  long double v9; // st6@6
  unsigned int v10; // esi@12
  signed int v11; // edi@12
  double v12; // st7@13
  float *v13; // edx@13
  float *v14; // eax@17
  double v15; // st7@20
  NiPosData *v16; // eax@21
  NiPosKey *v17; // ecx@21
  NiAnimationKey::KeyType v18; // edx@22
  char v19; // bl@22
  float v20; // [sp+1Ch] [bp-2Ch]@24
  float v21; // [sp+20h] [bp-28h]@24
  float v22; // [sp+24h] [bp-24h]@24
  double v23; // [sp+28h] [bp-20h]@24
  double v24; // [sp+30h] [bp-18h]@24
  float v25; // [sp+34h] [bp-14h]@20
  NiPathInterpolator *v26; // [sp+38h] [bp-10h]@1
  int i; // [sp+3Ch] [bp-Ch]@16
  float fDiff; // [sp+40h] [bp-8h]@20
  float fDist; // [sp+44h] [bp-4h]@2
  float fLengtha; // [sp+50h] [bp+8h]@7
  float fLengthb; // [sp+50h] [bp+8h]@7
  float fLengthc; // [sp+50h] [bp+8h]@11
  float fLength; // [sp+50h] [bp+8h]@12
  float fLengthd; // [sp+50h] [bp+8h]@24
  float fLengthe; // [sp+50h] [bp+8h]@24

  v5 = this;
  v6 = this->m_spPathData.m_pObject;
  v26 = this;
  if ( v6 )
  {
    v7 = v6->m_uiNumKeys;
    fDist = *(float *)&v6->m_uiNumKeys;
  }
  else
  {
    fDist = 0.0;
    v7 = 0;
  }
  v8 = fPercent;
  if ( 0.0 == fPercent )
  {
    *uiI1 = 0;
    *uiI2 = 1;
    *fNormTime = 0.0;
  }
  else
  {
    v9 = 1.0;
    if ( v8 < 0.0 )
    {
      fLengtha = fmod(v8, 1.0);
      fLengthb = fLengtha + 1.0;
      v9 = 1.0;
      v8 = fLengthb;
    }
    if ( 1.0 == v8 )
    {
      *uiI1 = v7 - 2;
      *uiI2 = v7 - 1;
      *fNormTime = 1.0;
    }
    else
    {
      if ( v8 > 1.0 )
      {
        fLengthc = fmod(v8, v9);
        v8 = fLengthc;
      }
      v10 = 0;
      fLength = v8 * this->m_fTotalLength;
      v11 = 1;
      if ( LODWORD(fDist) != 1 )
      {
        v12 = fLength;
        v13 = this->m_pfPartialLength + 1;
        while ( *v13 < v12 )
        {
          ++v10;
          ++v11;
          ++v13;
          if ( v10 >= LODWORD(fDist) - 1 )
          {
            i = 0;
            goto LABEL_20;
          }
        }
        v14 = this->m_pfPartialLength;
        fDist = v12 - v14[v10];
        fLength = fDist / (v14[v11] - v14[v10]);
      }
      i = 0;
LABEL_20:
      while ( 1 )
      {
        v15 = NiPathInterpolator::PathLength(v5, v10, v11, fLength);
        fDiff = v15 - fDist;
        v25 = fabs(fDiff);
        if ( v25 <= 0.00009999999747378752 )
          break;
        v16 = v5->m_spPathData.m_pObject;
        v17 = 0;
        if ( v16 )
        {
          v18 = v16->m_eType;
          v19 = v16->m_ucKeySize;
          v17 = v16->m_pkKeys;
        }
        else
        {
          v18 = 0;
          v19 = 0;
        }
        ((void (__cdecl *)(_DWORD, char *, char *, float *))dword_B61DC0[v18])(
          LODWORD(fLength),
          (char *)v17 + v10 * (unsigned __int8)v19,
          (char *)v17 + v11 * (unsigned __int8)v19,
          &v20);
        v23 = fLength;
        v24 = fDiff;
        fLengthd = v20 * v20 + v21 * v21 + v22 * v22;
        fLengthe = sqrt(fLengthd);
        ++i;
        fLength = v23 - fDiff / fLengthe;
        if ( i >= 32 )
          break;
        v5 = v26;
      }
      *uiI1 = v10;
      *uiI2 = v11;
      *fNormTime = fLength;
    }
  }
}
// B61DC0: using guessed type int dword_B61DC0[];

//----- (007EAB20) --------------------------------------------------------
void __thiscall NiPathInterpolator::GetLoc(NiPathInterpolator *this, float fTime, unsigned int *uiI1, unsigned int *uiI2, float *fNormTime)
{
  NiPathInterpolator *v5; // esi@1
  NiPosData *v6; // eax@3
  float *v7; // edi@3
  unsigned int v8; // esi@4
  char v9; // cl@4
  double v10; // st7@6
  int v11; // edx@8
  unsigned int v12; // ebx@8
  unsigned int v13; // ecx@10
  unsigned int v14; // eax@19
  NiPathInterpolator *v15; // [sp+18h] [bp-8h]@1
  unsigned int uiNumPathKeys; // [sp+1Ch] [bp-4h]@4
  char bFirstLoop_3; // [sp+2Bh] [bp+Bh]@10

  v5 = this;
  v15 = this;
  if ( (LOBYTE(this->m_uFlags) >> 4) & 1 )
  {
    NiPathInterpolator::GetPercentLoc(this, fTime, uiI1, uiI2, fNormTime);
    v5->m_uiLastPathIdx = *uiI1;
  }
  else
  {
    v6 = this->m_spPathData.m_pObject;
    v7 = 0;
    if ( v6 )
    {
      v8 = v6->m_uiNumKeys;
      v9 = v6->m_ucKeySize;
      v7 = &v6->m_pkKeys->m_fTime;
      uiNumPathKeys = v6->m_uiNumKeys;
    }
    else
    {
      uiNumPathKeys = 0;
      v9 = 0;
      v8 = 0;
    }
    v10 = fTime;
    if ( *v7 < (double)fTime )
    {
      v11 = (unsigned __int8)v9;
      v12 = v8 - 1;
      if ( *(float *)((char *)v7 + (v8 - 1) * (unsigned __int8)v9) > v10 )
      {
        v13 = v15->m_uiLastPathIdx;
        bFirstLoop_3 = 1;
        if ( v13 >= v12 )
        {
LABEL_19:
          v14 = (unsigned int)fNormTime;
        }
        else
        {
          while ( *(float *)((char *)v7 + v13 * v11) != v10
               && (*(float *)((char *)v7 + v13 * v11) >= v10 || *(float *)((char *)v7 + v11 * (v13 + 1)) <= v10) )
          {
            if ( v13 == uiNumPathKeys - 2 && bFirstLoop_3 )
            {
              v13 = 0;
              bFirstLoop_3 = 0;
            }
            else
            {
              ++v13;
            }
            if ( v13 >= v12 )
              goto LABEL_19;
          }
          v15->m_uiLastPathIdx = v13;
          v14 = v13 + 1;
        }
        *fNormTime = (v10 - *(float *)((char *)v7 + v13 * v11))
                   / (*(float *)((char *)v7 + v14 * v11) - *(float *)((char *)v7 + v13 * v11));
        *uiI1 = v13;
        *uiI2 = v14;
      }
      else
      {
        *uiI1 = v8 - 2;
        *uiI2 = v12;
        *fNormTime = 1.0;
      }
    }
    else
    {
      *uiI1 = 0;
      *uiI2 = 1;
      *fNormTime = 0.0;
    }
  }
}

//----- (007EAC80) --------------------------------------------------------
void __thiscall NiPathInterpolator::LoadBinary(NiPathInterpolator *this, NiStream *kStream)
{
  NiStream *v2; // esi@1
  NiPathInterpolator *v3; // edi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST3C_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v7; // eax@1
  NiBinaryStream *v8; // ST28_4@1
  unsigned int (__cdecl *v9)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  unsigned int (__cdecl *v10)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@1
  NiBinaryStream *v11; // ST14_4@1
  NiBinaryStream *v12; // eax@1
  NiBinaryStream *v13; // ST00_4@1
  unsigned int (__cdecl *v14)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  unsigned int (__cdecl *v15)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@1
  NiBinaryStream *v16; // ST3C_4@1
  NiPathInterpolator::BankDir v17; // [sp+8h] [bp-4h]@1

  v2 = kStream;
  v3 = this;
  NiBackToFrontAccumulator::LoadBinary((NiBackToFrontAccumulator *)this, kStream);
  v4 = v2->m_pkIstr;
  v5 = v4;
  v6 = v4->m_pfnRead;
  kStream = (NiStream *)2;
  v6(v5, &v3->m_uFlags, 2u, (unsigned int *)&kStream, 1u);
  v7 = v2->m_pkIstr;
  v8 = v7;
  v9 = v7->m_pfnRead;
  kStream = (NiStream *)4;
  v9(v8, &v17, 4u, (unsigned int *)&kStream, 1u);
  v3->m_eBankDir = v17;
  v10 = v2->m_pkIstr->m_pfnRead;
  v11 = v2->m_pkIstr;
  kStream = (NiStream *)4;
  v10(v11, &v3->m_fMaxBankAngle, 4u, (unsigned int *)&kStream, 1u);
  v12 = v2->m_pkIstr;
  v13 = v12;
  v14 = v12->m_pfnRead;
  kStream = (NiStream *)4;
  v14(v13, &v3->m_fSmoothing, 4u, (unsigned int *)&kStream, 1u);
  v15 = v2->m_pkIstr->m_pfnRead;
  v16 = v2->m_pkIstr;
  kStream = (NiStream *)2;
  v15(v16, &v3->m_sFollowAxis, 2u, (unsigned int *)&kStream, 1u);
  NiStream::ReadLinkID(v2);
  NiStream::ReadLinkID(v2);
}

//----- (007EAD50) --------------------------------------------------------
void __userpurge NiPathInterpolator::LinkObject(NiPathInterpolator *this@<ecx>, double a2@<st0>, NiStream *kStream)
{
  NiPathInterpolator *v3; // esi@1
  NiObject *v4; // eax@1
  NiPosData *v5; // edi@1
  NiPosData *v6; // ebx@1
  NiObject *v7; // eax@8
  NiFloatData *v8; // edi@8
  NiFloatData *v9; // ebx@8
  NiPosData *v10; // eax@18
  unsigned int v11; // ecx@19
  NiAnimationKey::KeyType v12; // edx@19
  NiPosKey *v13; // eax@19

  v3 = this;
  NiDefaultAVObjectPalette::LinkObject((NiScreenLODData *)this, kStream);
  v4 = NiStream::GetObjectFromLinkID(kStream);
  v5 = v3->m_spPathData.m_pObject;
  v6 = (NiPosData *)v4;
  if ( (NiObject *)v5 != v4 )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v3->m_spPathData.m_pObject = v6;
    if ( v6 )
      InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  }
  v7 = NiStream::GetObjectFromLinkID(kStream);
  v8 = v3->m_spPctData.m_pObject;
  v9 = (NiFloatData *)v7;
  if ( (NiObject *)v8 != v7 )
  {
    if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v3->m_spPctData.m_pObject = v9;
    if ( v9 )
      InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  }
  v3->m_uFlags |= 1u;
  if ( (LOBYTE(v3->m_uFlags) >> 4) & 1 && v3->m_uFlags & 1 )
  {
    a2 = NiPathInterpolator::GetTotalPathLength(v3);
    v3->m_fTotalLength = a2;
    v3->m_uFlags &= 0xFFFEu;
  }
  v10 = v3->m_spPathData.m_pObject;
  if ( v10 )
  {
    v11 = v10->m_uiNumKeys;
    v12 = v10->m_eType;
    v13 = v10->m_pkKeys;
    if ( v11 )
    {
      ((void (__cdecl *)(NiPosKey *, unsigned int))dword_B61EE0[v12])(v13, v11);
      v3->m_fMaxCurvature = a2;
    }
  }
}
// B61EE0: using guessed type int dword_B61EE0[];

//----- (007EAE40) --------------------------------------------------------
void __thiscall NiPathInterpolator::SaveBinary(NiPathInterpolator *this, NiStream *kStream)
{
  NiStream *v2; // esi@1
  NiPathInterpolator *v3; // edi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST3C_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v7; // eax@1
  NiBinaryStream *v8; // ST28_4@1
  unsigned int (__cdecl *v9)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v10; // eax@1
  NiBinaryStream *v11; // ST14_4@1
  unsigned int (__cdecl *v12)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v13; // eax@1
  NiBinaryStream *v14; // ST00_4@1
  unsigned int (__cdecl *v15)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v16; // eax@1
  NiBinaryStream *v17; // ST3C_4@1
  unsigned int (__cdecl *v18)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1

  v2 = kStream;
  v3 = this;
  NiDefaultAVObjectPalette::LinkObject((NiScreenLODData *)this, kStream);
  v4 = v2->m_pkOstr;
  v5 = v4;
  v6 = v4->m_pfnWrite;
  kStream = (NiStream *)2;
  v6(v5, &v3->m_uFlags, 2u, (unsigned int *)&kStream, 1u);
  v7 = v2->m_pkOstr;
  v8 = v7;
  v9 = v7->m_pfnWrite;
  kStream = (NiStream *)4;
  v9(v8, &v3->m_eBankDir, 4u, (unsigned int *)&kStream, 1u);
  v10 = v2->m_pkOstr;
  v11 = v10;
  v12 = v10->m_pfnWrite;
  kStream = (NiStream *)4;
  v12(v11, &v3->m_fMaxBankAngle, 4u, (unsigned int *)&kStream, 1u);
  v13 = v2->m_pkOstr;
  v14 = v13;
  v15 = v13->m_pfnWrite;
  kStream = (NiStream *)4;
  v15(v14, &v3->m_fSmoothing, 4u, (unsigned int *)&kStream, 1u);
  v16 = v2->m_pkOstr;
  v17 = v16;
  v18 = v16->m_pfnWrite;
  kStream = (NiStream *)2;
  v18(v17, &v3->m_sFollowAxis, 2u, (unsigned int *)&kStream, 1u);
  v2->vfptr->SaveLinkID(v2, (NiObject *)v3->m_spPathData.m_pObject);
  v2->vfptr->SaveLinkID(v2, (NiObject *)v3->m_spPctData.m_pObject);
}

//----- (007EAF20) --------------------------------------------------------
void __thiscall NiPathInterpolator::GetViewerStrings(NiPathInterpolator *this, NiTArray<char *> *pkStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiTArray<char *> *v3; // eax@1
  unsigned int v4; // edi@1

  v2 = (NiTArray<NiVBBlock *> *)pkStrings;
  NiKeyBasedInterpolator::GetViewerStrings((NiKeyBasedInterpolator *)&this->vfptr, pkStrings);
  v3 = (NiTArray<char *> *)NiGetViewerString(NiPathInterpolator::m_RTTI.m_pcName);
  v4 = v2->m_uiSize;
  pkStrings = v3;
  if ( v4 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v4 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v4, (NiVBChip *const *)&pkStrings);
}

//----- (007EAF70) --------------------------------------------------------
void __thiscall NiPathInterpolator::NiPathInterpolator(NiPathInterpolator *this, NiPosData *pkPathData, NiFloatData *pkPctData)
{
  NiPathInterpolator *v3; // esi@1
  float v4; // eax@5

  v3 = this;
  NiKeyBasedInterpolator::NiKeyBasedInterpolator((NiKeyBasedInterpolator *)&this->vfptr);
  v3->vfptr = (NiRefObjectVtbl *)&NiPathInterpolator::`vftable';
  v3->m_spPathData.m_pObject = pkPathData;
  if ( pkPathData )
    InterlockedIncrement((volatile LONG *)&pkPathData->m_uiRefCount);
  v3->m_spPctData.m_pObject = pkPctData;
  if ( pkPctData )
    InterlockedIncrement((volatile LONG *)&pkPctData->m_uiRefCount);
  v3->m_kRotation = NiInterpolator::INVALID_QUATERNION;
  v3->m_kPosition.x = NiInterpolator::INVALID_POINT3.x;
  v3->m_kPosition.y = NiInterpolator::INVALID_POINT3.y;
  v4 = NiInterpolator::INVALID_POINT3.z;
  v3->m_fMaxBankAngle = 0.0;
  v3->m_fSmoothing = 0.0;
  v3->m_fMaxCurvature = 0.0;
  v3->m_kPosition.z = v4;
  v3->m_fTotalLength = -1.0;
  v3->m_uiLastPathIdx = 0;
  v3->m_uiLastPctIdx = 0;
  v3->m_eBankDir = 1;
  v3->m_sFollowAxis = 0;
  v3->m_pfPartialLength = 0;
  v3->m_uFlags = 3;
  v3->m_fLastTime = -3.4028235e38;
}
// 9E6584: using guessed type int (__thiscall *NiPathInterpolator::`vftable')(void *p, char);
// A7CADC: using guessed type const struct NiPoint3 NiInterpolator::INVALID_POINT3;

//----- (007EB040) --------------------------------------------------------
char __thiscall NiPathInterpolator::Update(NiPathInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiQuatTransform *kValue)
{
  NiPathInterpolator *v4; // esi@1
  char v5; // al@5
  NiFloatData *v6; // eax@9
  char v7; // cl@10
  unsigned int v8; // edx@10
  NiAnimationKey::KeyType v9; // ebx@10
  NiFloatKey *v10; // eax@10
  NiPosData *v11; // ecx@11
  int v12; // ebx@14
  NiPoint3 *v13; // eax@16
  NiPoint3 result; // [sp+24h] [bp-40h]@16
  unsigned int ui2; // [sp+30h] [bp-34h]@14
  float fNormTime; // [sp+34h] [bp-30h]@14
  unsigned int ui1; // [sp+38h] [bp-2Ch]@10
  NiMatrix3 kRefFrame; // [sp+3Ch] [bp-28h]@15

  v4 = this;
  if ( fTime == this->m_fLastTime )
  {
    if ( NiInterpolator::INVALID_POINT3.x != this->m_kPosition.x
      || NiInterpolator::INVALID_POINT3.y != this->m_kPosition.y
      || NiInterpolator::INVALID_POINT3.z != this->m_kPosition.z )
    {
      kValue->m_kTranslate.x = this->m_kPosition.x;
      kValue->m_kTranslate.y = this->m_kPosition.y;
      kValue->m_kTranslate.z = this->m_kPosition.z;
      if ( (LOBYTE(this->m_uFlags) >> 5) & 1 )
      {
        kValue->m_kRotate.m_fW = this->m_kRotation.m_fW;
        kValue->m_kRotate.m_fX = this->m_kRotation.m_fX;
        kValue->m_kRotate.m_fY = this->m_kRotation.m_fY;
        kValue->m_kRotate.m_fZ = this->m_kRotation.m_fZ;
      }
      v5 = 1;
    }
    else
    {
      v5 = 0;
      kValue->m_kTranslate.x = -3.4028235e38;
      kValue->m_kRotate.m_fX = -3.4028235e38;
      kValue->m_fScale = -3.4028235e38;
    }
  }
  else
  {
    v6 = this->m_spPctData.m_pObject;
    if ( v6
      && (v7 = v6->m_ucKeySize, v8 = v6->m_uiNumKeys, v9 = v6->m_eType, v10 = v6->m_pkKeys, LOBYTE(ui1) = v7, v10)
      && (v11 = v4->m_spPathData.m_pObject) != 0
      && v11->m_pkKeys )
    {
      *(float *)&ui1 = NiFloatKey::GenInterp(fTime, v10, v9, v8, &v4->m_uiLastPctIdx, ui1);
      NiPathInterpolator::GetLoc(v4, *(float *)&ui1, &ui1, &ui2, &fNormTime);
      v12 = ui2;
      if ( (LOBYTE(v4->m_uFlags) >> 5) & 1 )
      {
        NiPathInterpolator::CalcRefFrame(v4, ui1, ui2, fNormTime, &kRefFrame);
        NiQuaternion::FromRotation(&v4->m_kRotation, &kRefFrame);
      }
      v13 = NiPathInterpolator::GenPathInterp(v4, &result, ui1, v12, fNormTime);
      v4->m_kPosition.x = v13->x;
      v4->m_kPosition.y = v13->y;
      v4->m_kPosition.z = v13->z;
      kValue->m_kTranslate.x = v4->m_kPosition.x;
      kValue->m_kTranslate.y = v4->m_kPosition.y;
      kValue->m_kTranslate.z = v4->m_kPosition.z;
      if ( (LOBYTE(v4->m_uFlags) >> 5) & 1 )
      {
        kValue->m_kRotate.m_fW = v4->m_kRotation.m_fW;
        kValue->m_kRotate.m_fX = v4->m_kRotation.m_fX;
        kValue->m_kRotate.m_fY = v4->m_kRotation.m_fY;
        kValue->m_kRotate.m_fZ = v4->m_kRotation.m_fZ;
      }
      v4->m_fLastTime = fTime;
      v5 = 1;
    }
    else
    {
      v5 = 0;
    }
  }
  return v5;
}
// A7CADC: using guessed type const struct NiPoint3 NiInterpolator::INVALID_POINT3;

//----- (007EB240) --------------------------------------------------------
void __thiscall NiPathInterpolator::CopyMembers(NiPathInterpolator *this, NiPathInterpolator *pkDest, NiCloningProcess *kCloning)
{
  NiPathInterpolator *v3; // esi@1
  NiPathInterpolator *v4; // edi@1
  NiPosData *v5; // ecx@1
  int v6; // eax@2
  NiPosData *v7; // ebx@2
  NiFloatData *v8; // ecx@10
  int v9; // eax@11
  NiFloatData *v10; // ebx@11
  NiPosData *v11; // eax@39
  unsigned int v12; // ebx@40
  float *v13; // eax@42
  NiPathInterpolator *pkDesta; // [sp+14h] [bp+8h]@2
  NiCloningProcess *kCloninga; // [sp+18h] [bp+Ch]@11

  v3 = pkDest;
  v4 = this;
  NiBackToFrontAccumulator::CopyMembers((NiBackToFrontAccumulator *)this, (NiBackToFrontAccumulator *)pkDest, kCloning);
  pkDest->m_uFlags = v4->m_uFlags;
  v5 = v4->m_spPathData.m_pObject;
  if ( v5 )
  {
    v6 = ((int (__stdcall *)(_DWORD))v5->vfptr[2].__vecDelDtor)(kCloning);
    v7 = pkDest->m_spPathData.m_pObject;
    pkDesta = (NiPathInterpolator *)v6;
    if ( v7 != (NiPosData *)v6 )
    {
      if ( v7 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
        v6 = (int)pkDesta;
      }
      v3->m_spPathData.m_pObject = (NiPosData *)v6;
      if ( v6 )
        InterlockedIncrement((volatile LONG *)(v6 + 4));
    }
  }
  v8 = v4->m_spPctData.m_pObject;
  if ( v8 )
  {
    v9 = ((int (__stdcall *)(_DWORD))v8->vfptr[2].__vecDelDtor)(kCloning);
    v10 = v3->m_spPctData.m_pObject;
    kCloninga = (NiCloningProcess *)v9;
    if ( v10 != (NiFloatData *)v9 )
    {
      if ( v10 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
          v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
        v9 = (int)kCloninga;
      }
      v3->m_spPctData.m_pObject = (NiFloatData *)v9;
      if ( v9 )
        InterlockedIncrement((volatile LONG *)(v9 + 4));
    }
  }
  if ( (LOBYTE(v4->m_uFlags) >> 2) & 1 )
    v3->m_uFlags |= 4u;
  else
    v3->m_uFlags &= 0xFFFBu;
  if ( (LOBYTE(v4->m_uFlags) >> 3) & 1 )
    v3->m_uFlags |= 8u;
  else
    v3->m_uFlags &= 0xFFF7u;
  v3->m_eBankDir = v4->m_eBankDir;
  if ( (LOBYTE(v4->m_uFlags) >> 4) & 1 )
  {
    v3->m_uFlags |= 0x10u;
    if ( v3->m_uFlags & 1 )
    {
      v3->m_fTotalLength = NiPathInterpolator::GetTotalPathLength(v3);
      v3->m_uFlags &= 0xFFFEu;
    }
  }
  else
  {
    v3->m_uFlags &= 0xFFEFu;
  }
  if ( (LOBYTE(v4->m_uFlags) >> 5) & 1 )
    v3->m_uFlags |= 0x20u;
  else
    v3->m_uFlags &= 0xFFDFu;
  v3->m_fMaxBankAngle = v4->m_fMaxBankAngle;
  v3->m_fSmoothing = v4->m_fSmoothing;
  v3->m_sFollowAxis = v4->m_sFollowAxis;
  if ( (LOBYTE(v4->m_uFlags) >> 6) & 1 )
    v3->m_uFlags |= 0x40u;
  else
    v3->m_uFlags &= 0xFFBFu;
  if ( (LOBYTE(v4->m_uFlags) >> 1) & 1 )
    v3->m_uFlags |= 2u;
  else
    v3->m_uFlags &= 0xFFFDu;
  if ( v4->m_pfPartialLength )
  {
    v11 = v4->m_spPathData.m_pObject;
    if ( v11 )
      v12 = v11->m_uiNumKeys;
    else
      v12 = 0;
    v13 = (float *)operator new(4 * v12);
    v3->m_pfPartialLength = v13;
    memcpy_s(v13, 4 * v12, v4->m_pfPartialLength, 4 * v12);
  }
  v3->m_fTotalLength = v4->m_fTotalLength;
}

//----- (007EB420) --------------------------------------------------------
NiKeyBasedInterpolator *__cdecl NiPathInterpolator::CreateObject()
{
  NiKeyBasedInterpolator *v0; // eax@1
  NiKeyBasedInterpolator *v1; // esi@1
  float v2; // eax@2
  NiKeyBasedInterpolator *result; // eax@2

  v0 = (NiKeyBasedInterpolator *)operator new(0x5Cu);
  v1 = v0;
  if ( v0 )
  {
    NiKeyBasedInterpolator::NiKeyBasedInterpolator(v0);
    v1->vfptr = (NiRefObjectVtbl *)&NiPathInterpolator::`vftable';
    v1[2].vfptr = 0;
    v1[2].m_uiRefCount = 0;
    *(NiQuaternion *)&v1[5].vfptr = NiInterpolator::INVALID_QUATERNION;
    v1[6].m_uiRefCount = LODWORD(NiInterpolator::INVALID_POINT3.x);
    v1[6].m_fLastTime = NiInterpolator::INVALID_POINT3.y;
    v2 = NiInterpolator::INVALID_POINT3.z;
    *(float *)&v1[3].m_uiRefCount = 0.0;
    v1[3].m_fLastTime = 0.0;
    *(float *)&v1[7].vfptr = v2;
    *(float *)&v1[4].m_uiRefCount = 0.0;
    v1[1].m_uiRefCount = 0;
    LODWORD(v1[1].m_fLastTime) = 0;
    *(float *)&v1[3].vfptr = -1.0;
    LODWORD(v1[2].m_fLastTime) = 0;
    LODWORD(v1[4].m_fLastTime) = 1;
    LOWORD(v1[4].vfptr) = 0;
    LOWORD(v1[1].vfptr) = 3;
    *(float *)&v1[7].m_uiRefCount = -3.4028235e38;
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E6584: using guessed type int (__thiscall *NiPathInterpolator::`vftable')(void *p, char);
// A7CADC: using guessed type const struct NiPoint3 NiInterpolator::INVALID_POINT3;

//----- (007EB4D0) --------------------------------------------------------
NiKeyBasedInterpolator *__thiscall NiPathInterpolator::CreateClone(NiPathInterpolator *this, NiCloningProcess *kCloning)
{
  NiPathInterpolator *v2; // ebx@1
  NiKeyBasedInterpolator *v3; // eax@1
  NiKeyBasedInterpolator *v4; // esi@1
  float v5; // eax@2

  v2 = this;
  v3 = (NiKeyBasedInterpolator *)operator new(0x5Cu);
  v4 = v3;
  if ( v3 )
  {
    NiKeyBasedInterpolator::NiKeyBasedInterpolator(v3);
    v4->vfptr = (NiRefObjectVtbl *)&NiPathInterpolator::`vftable';
    v4[2].vfptr = 0;
    v4[2].m_uiRefCount = 0;
    *(NiQuaternion *)&v4[5].vfptr = NiInterpolator::INVALID_QUATERNION;
    v4[6].m_uiRefCount = LODWORD(NiInterpolator::INVALID_POINT3.x);
    v4[6].m_fLastTime = NiInterpolator::INVALID_POINT3.y;
    v5 = NiInterpolator::INVALID_POINT3.z;
    *(float *)&v4[3].m_uiRefCount = 0.0;
    v4[3].m_fLastTime = 0.0;
    *(float *)&v4[4].m_uiRefCount = 0.0;
    *(float *)&v4[7].vfptr = v5;
    *(float *)&v4[3].vfptr = -1.0;
    v4[1].m_uiRefCount = 0;
    LODWORD(v4[1].m_fLastTime) = 0;
    LODWORD(v4[4].m_fLastTime) = 1;
    LOWORD(v4[4].vfptr) = 0;
    LODWORD(v4[2].m_fLastTime) = 0;
    LOWORD(v4[1].vfptr) = 3;
    *(float *)&v4[7].m_uiRefCount = -3.4028235e38;
  }
  else
  {
    v4 = 0;
  }
  NiPathInterpolator::CopyMembers(v2, (NiPathInterpolator *)v4, kCloning);
  return v4;
}
// 9E6584: using guessed type int (__thiscall *NiPathInterpolator::`vftable')(void *p, char);
// A7CADC: using guessed type const struct NiPoint3 NiInterpolator::INVALID_POINT3;

//----- (007EB5A0) --------------------------------------------------------
void __thiscall NiPathController::ProcessClone(NiPathController *this, NiCloningProcess *kCloning)
{
  NiPathController *v2; // esi@1
  NiPosData *v3; // ecx@1
  NiFloatData *v4; // ecx@3

  v2 = this;
  NiTimeController::ProcessClone((NiTimeController *)&this->vfptr, kCloning);
  v3 = v2->m_spPathData.m_pObject;
  if ( v3 )
    ((void (__stdcall *)(_DWORD))v3->vfptr[10].__vecDelDtor)(kCloning);
  v4 = v2->m_spPctData.m_pObject;
  if ( v4 )
    ((void (__stdcall *)(_DWORD))v4->vfptr[10].__vecDelDtor)(kCloning);
}

//----- (007EB5E0) --------------------------------------------------------
char __thiscall NiPathController::RegisterStreamables(NiPathController *this, NiStream *kStream)
{
  NiPathController *v2; // esi@1
  char result; // al@1
  NiPosData *v4; // ecx@2
  NiFloatData *v5; // ecx@4

  v2 = this;
  result = NiTimeController::RegisterStreamables((NiTimeController *)&this->vfptr, kStream);
  if ( result )
  {
    v4 = v2->m_spPathData.m_pObject;
    if ( v4 )
      ((void (__stdcall *)(_DWORD))v4->vfptr[5].__vecDelDtor)(kStream);
    v5 = v2->m_spPctData.m_pObject;
    if ( v5 )
      ((void (__stdcall *)(_DWORD))v5->vfptr[5].__vecDelDtor)(kStream);
    result = 1;
  }
  return result;
}

//----- (007EB620) --------------------------------------------------------
void __thiscall NiPathController::GetPathData(NiPathController *this, NiPosKey **pkPathData, unsigned int *uiNumKeys, NiAnimationKey::KeyType *eType, char *ucSize)
{
  NiPosData *v5; // eax@1

  v5 = this->m_spPathData.m_pObject;
  if ( v5 )
  {
    *uiNumKeys = v5->m_uiNumKeys;
    *eType = v5->m_eType;
    *ucSize = v5->m_ucKeySize;
    *pkPathData = v5->m_pkKeys;
  }
  else
  {
    *uiNumKeys = 0;
    *eType = 0;
    *pkPathData = 0;
    *ucSize = 0;
  }
}

//----- (007EB670) --------------------------------------------------------
void __thiscall NiPathController::~NiPathController(NiPathController *this)
{
  NiPathController *v1; // esi@1
  NiPosData *v2; // edi@1
  NiFloatData *v3; // edi@6
  NiFloatData *v4; // edi@11
  NiPosData *v5; // edi@15

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiPathController::`vftable';
  v2 = this->m_spPathData.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spPathData.m_pObject = 0;
  }
  v3 = v1->m_spPctData.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v1->m_spPctData.m_pObject = 0;
  }
  operator delete(v1->m_pfPartialLength);
  v4 = v1->m_spPctData.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  v5 = v1->m_spPathData.m_pObject;
  if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
    v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
  NiTimeController::~NiTimeController((NiTimeController *)&v1->vfptr);
}
// 9E662C: using guessed type int (__thiscall *NiPathController::`vftable')(void *p, char);

//----- (007EB730) --------------------------------------------------------
NiRTTI *NiPathController::GetRTTI()
{
  return &NiPathController::m_RTTI;
}

//----- (007EB740) --------------------------------------------------------
NiPoint3 *__thiscall NiPathController::GenPathInterp(NiPathController *this, NiPoint3 *result, int iI1, int iI2, float fNormTime)
{
  NiPosData *v5; // eax@1
  NiAnimationKey::KeyType v6; // edx@2
  char v7; // bl@2
  NiPosKey *v8; // ecx@2

  v5 = this->m_spPathData.m_pObject;
  if ( v5 )
  {
    v6 = v5->m_eType;
    v7 = v5->m_ucKeySize;
    v8 = v5->m_pkKeys;
  }
  else
  {
    v6 = 0;
    v8 = 0;
    v7 = 0;
  }
  ((void (__cdecl *)(_DWORD, char *, char *, NiPoint3 *))dword_B61E50[v6])(
    LODWORD(fNormTime),
    (char *)v8 + iI1 * (unsigned __int8)v7,
    (char *)v8 + iI2 * (unsigned __int8)v7,
    result);
  return result;
}
// B61E50: using guessed type int dword_B61E50[];

//----- (007EB7A0) --------------------------------------------------------
void __thiscall NiPathController::CalcRefFrame(NiPathController *this, unsigned int ui1, unsigned int ui2, float fNormTime, NiMatrix3 *kRefFrame)
{
  NiPathController *v5; // ebx@1
  NiPosData *v6; // esi@1
  char v7; // dl@2
  NiPosKey *v8; // edi@2
  NiAnimationKey::KeyType v9; // ecx@2
  int v10; // esi@4
  double v11; // st7@5
  NiPosKey *v12; // ST08_4@11
  float v13; // edx@11
  float v14; // eax@11
  float v15; // ecx@11
  NiPoint3 *v16; // eax@12
  double v17; // st7@19
  double v18; // st6@19
  double v19; // st5@19
  unsigned __int16 v20; // cx@21
  float z; // ST1C_4@32
  float y; // ST18_4@32
  float x; // ST14_4@32
  NiPoint3 up; // [sp+2Ch] [bp-F8h]@11
  NiMatrix3 *v25; // [sp+38h] [bp-ECh]@1
  float v26; // [sp+3Ch] [bp-E8h]@11
  float v27; // [sp+40h] [bp-E4h]@11
  float v28; // [sp+44h] [bp-E0h]@11
  float v29; // [sp+48h] [bp-DCh]@11
  float v30; // [sp+4Ch] [bp-D8h]@11
  float v31; // [sp+50h] [bp-D4h]@11
  NiPosKey *pKey0; // [sp+54h] [bp-D0h]@4
  NiAnimationKey::KeyType ePathType; // [sp+58h] [bp-CCh]@2
  NiPoint3 kBinormal; // [sp+5Ch] [bp-C8h]@4
  NiPoint3 kTangent; // [sp+68h] [bp-BCh]@4
  NiPoint3 kNormal1; // [sp+74h] [bp-B0h]@11
  NiPoint3 kNormal; // [sp+80h] [bp-A4h]@4
  float fBankAmt; // [sp+8Ch] [bp-98h]@11
  float fCurvature; // [sp+90h] [bp-94h]@4
  NiPosKey *pKey1; // [sp+94h] [bp-90h]@4
  unsigned int ui1a; // [sp+98h] [bp-8Ch]@1
  float fA1; // [sp+9Ch] [bp-88h]@1
  char ucSize; // [sp+A3h] [bp-81h]@2
  float fA0; // [sp+A4h] [bp-80h]@2
  NiPoint3 right; // [sp+A8h] [bp-7Ch]@11
  NiMatrix3 result; // [sp+B4h] [bp-70h]@32
  NiMatrix3 kBankMat; // [sp+D8h] [bp-4Ch]@32
  NiMatrix3 kTm; // [sp+FCh] [bp-28h]@1

  v5 = this;
  fA1 = *(float *)&ui2;
  qmemcpy(&kTm, &NiMatrix3::IDENTITY, sizeof(kTm));
  v6 = this->m_spPathData.m_pObject;
  ui1a = ui1;
  v25 = kRefFrame;
  if ( !v6 )
    goto LABEL_34;
  v7 = v6->m_ucKeySize;
  v8 = v6->m_pkKeys;
  fA0 = *(float *)&v6->m_uiNumKeys;
  v9 = v6->m_eType;
  ePathType = v6->m_eType;
  ucSize = v7;
  if ( LODWORD(fA0) < 2 )
    goto LABEL_34;
  if ( !((LOBYTE(v5->m_uFlags) >> 2) & 1) )
  {
    NiPosKey::CoordinateFrame(
      fNormTime,
      (NiPosKey *)((char *)v8 + (unsigned __int8)ucSize * ui1),
      (NiPosKey *)((char *)v8 + LODWORD(fA1) * (unsigned __int8)ucSize),
      v9,
      &kTangent,
      &kNormal,
      &kBinormal,
      &fCurvature);
    kTm.m_pEntry[0][0] = kTangent.x;
    kTm.m_pEntry[1][0] = kTangent.y;
    kTm.m_pEntry[2][0] = kTangent.z;
    NiPoint3::UnitCross(&NiPoint3::UNIT_Z, &up, &kTangent);
    kTm.m_pEntry[0][1] = up.x;
    kTm.m_pEntry[1][1] = up.y;
    kTm.m_pEntry[2][1] = up.z;
    right.x = up.z * kTangent.y - up.y * kTangent.z;
    right.y = kTangent.z * up.x - up.z * kTangent.x;
    v18 = kTangent.y;
    right.z = up.y * kTangent.x - up.x * kTangent.y;
    kTm.m_pEntry[0][2] = right.x;
    kTm.m_pEntry[1][2] = right.y;
    kTm.m_pEntry[2][2] = right.z;
    v19 = kTangent.z;
    v17 = kTangent.x;
    goto LABEL_21;
  }
  v10 = (unsigned __int8)ucSize;
  pKey0 = (NiPosKey *)((char *)v8 + (unsigned __int8)ucSize * ui1);
  pKey1 = (NiPosKey *)((char *)v8 + LODWORD(fA1) * (unsigned __int8)ucSize);
  NiPosKey::CoordinateFrame(
    fNormTime,
    (NiPosKey *)((char *)v8 + (unsigned __int8)ucSize * ui1),
    (NiPosKey *)((char *)v8 + LODWORD(fA1) * (unsigned __int8)ucSize),
    v9,
    &kTangent,
    &kNormal,
    &kBinormal,
    &fCurvature);
  if ( 0.0 != v5->m_fSmoothing )
  {
    v11 = fNormTime;
    if ( 1.0 - v5->m_fSmoothing > fNormTime )
    {
      if ( v5->m_fSmoothing < v11 )
        goto LABEL_19;
      if ( !((LOBYTE(v5->m_uFlags) >> 1) & 1) && !ui1a )
        ui1a = LODWORD(fA0) - 1;
      if ( ui1a < 1 )
        goto LABEL_19;
      fA1 = (v5->m_fSmoothing - v11) / (v5->m_fSmoothing + v5->m_fSmoothing);
      fA0 = 1.0 - fA1;
      NiPosKey::CoordinateFrame(v5->m_fSmoothing, pKey0, pKey1, ePathType, &up, &kNormal, &kBinormal, &fCurvature);
      *(float *)&pKey1 = 1.0 - v5->m_fSmoothing;
      NiPosKey::CoordinateFrame(
        *(float *)&pKey1,
        (NiPosKey *)((char *)v8 + v10 * (ui1a - 1)),
        (NiPosKey *)((char *)v8 + ui1a * v10),
        ePathType,
        &up,
        &kNormal1,
        &kBinormal,
        &fBankAmt);
      v26 = kNormal1.x * fA1;
      v27 = kNormal1.y * fA1;
      v28 = fA1 * kNormal1.z;
      right.x = kNormal.x * fA0;
      right.y = kNormal.y * fA0;
      right.z = fA0 * kNormal.z;
      v29 = right.x + v26;
      v13 = v29;
      v30 = right.y + v27;
      v14 = v30;
      v31 = right.z + v28;
      v15 = v31;
    }
    else
    {
      if ( (LOBYTE(v5->m_uFlags) >> 1) & 1 || LODWORD(fA1) != LODWORD(fA0) - 1 )
        ui1a = LODWORD(fA1);
      else
        ui1a = 0;
      if ( ui1a >= LODWORD(fA0) - 1 )
        goto LABEL_19;
      v12 = pKey1;
      fA0 = (1.0 - v11 + v5->m_fSmoothing) / (v5->m_fSmoothing + v5->m_fSmoothing);
      fA1 = 1.0 - fA0;
      *(float *)&pKey1 = 1.0 - v5->m_fSmoothing;
      NiPosKey::CoordinateFrame(*(float *)&pKey1, pKey0, v12, ePathType, &up, &kNormal, &kBinormal, &fCurvature);
      NiPosKey::CoordinateFrame(
        v5->m_fSmoothing,
        (NiPosKey *)((char *)v8 + ui1a * v10),
        (NiPosKey *)((char *)v8 + v10 * (ui1a + 1)),
        ePathType,
        &up,
        &kNormal1,
        &kBinormal,
        &fBankAmt);
      v26 = kNormal1.x * fA1;
      v27 = kNormal1.y * fA1;
      v28 = fA1 * kNormal1.z;
      v29 = kNormal.x * fA0;
      v30 = kNormal.y * fA0;
      v31 = fA0 * kNormal.z;
      right.x = v29 + v26;
      v13 = right.x;
      right.y = v30 + v27;
      v14 = right.y;
      right.z = v31 + v28;
      v15 = right.z;
    }
    kNormal.z = v15;
    kNormal.y = v14;
    kNormal.x = v13;
    NiPoint3::Unitize(&kNormal);
    fCurvature = fBankAmt * fA1 + fA0 * fCurvature;
    v16 = NiPoint3::Cross(&kTangent, &right, &kNormal);
    kBinormal.x = v16->x;
    kBinormal.y = v16->y;
    kBinormal.z = v16->z;
  }
LABEL_19:
  v17 = kTangent.x;
  kTm.m_pEntry[0][0] = kTangent.x;
  v18 = kTangent.y;
  kTm.m_pEntry[1][0] = kTangent.y;
  v19 = kTangent.z;
  kTm.m_pEntry[2][0] = kTangent.z;
  right.x = -kNormal.x;
  right.y = -kNormal.y;
  right.z = -kNormal.z;
  kTm.m_pEntry[0][1] = right.x;
  kTm.m_pEntry[1][1] = right.y;
  kTm.m_pEntry[2][1] = right.z;
  right.x = -kBinormal.x;
  right.y = -kBinormal.y;
  right.z = -kBinormal.z;
  kTm.m_pEntry[0][2] = right.x;
  kTm.m_pEntry[1][2] = right.y;
  kTm.m_pEntry[2][2] = right.z;
LABEL_21:
  v20 = v5->m_uFlags;
  if ( ((unsigned __int8)v5->m_uFlags >> 6) & 1 )
  {
    right.x = -v17;
    right.y = -v18;
    right.z = -v19;
    kTm.m_pEntry[0][0] = right.x;
    kTm.m_pEntry[1][0] = right.y;
    kTm.m_pEntry[2][0] = right.z;
    right.x = -kTm.m_pEntry[0][1];
    right.y = -kTm.m_pEntry[1][1];
    right.z = -kTm.m_pEntry[2][1];
    kTm.m_pEntry[0][1] = right.x;
    kTm.m_pEntry[1][1] = right.y;
    kTm.m_pEntry[2][1] = right.z;
  }
  if ( v5->m_sFollowAxis == 1 )
  {
    kNormal1.x = kTm.m_pEntry[0][0];
    kNormal1.y = kTm.m_pEntry[1][0];
    kNormal1.z = kTm.m_pEntry[2][0];
    right.x = -kTm.m_pEntry[0][1];
    right.y = -kTm.m_pEntry[1][1];
    right.z = -kTm.m_pEntry[2][1];
    kTm.m_pEntry[0][0] = right.x;
    kTm.m_pEntry[1][0] = right.y;
    kTm.m_pEntry[2][0] = right.z;
    kTm.m_pEntry[0][1] = kNormal1.x;
    kTm.m_pEntry[1][1] = kNormal1.y;
    kTm.m_pEntry[2][1] = kNormal1.z;
  }
  else if ( v5->m_sFollowAxis == 2 )
  {
    kNormal1.x = kTm.m_pEntry[0][0];
    kNormal1.y = kTm.m_pEntry[1][0];
    kNormal1.z = kTm.m_pEntry[2][0];
    right.x = -kTm.m_pEntry[0][2];
    right.y = -kTm.m_pEntry[1][2];
    right.z = -kTm.m_pEntry[2][2];
    kTm.m_pEntry[0][0] = right.x;
    kTm.m_pEntry[1][0] = right.y;
    kTm.m_pEntry[2][0] = right.z;
    kTm.m_pEntry[0][2] = kNormal1.x;
    kTm.m_pEntry[1][2] = kNormal1.y;
    kTm.m_pEntry[2][2] = kNormal1.z;
  }
  if ( ((unsigned __int8)v20 >> 3) & 1 )
  {
    if ( !(_S1_1 & 1) )
    {
      _S1_1 |= 1u;
      s_fFourOverPi_0 = 4.0 / NI_PI;
    }
    fBankAmt = (double)(signed int)v5->m_eBankDir * v5->m_fMaxBankAngle;
    if ( v5->m_fMaxCurvature > (double)fCurvature )
    {
      *(float *)&pKey1 = fCurvature / v5->m_fMaxCurvature;
      *(float *)&pKey1 = atan(*(float *)&pKey1);
      fBankAmt = *(float *)&pKey1 * s_fFourOverPi_0 * fBankAmt;
      v17 = kTangent.x;
      v19 = kTangent.z;
      v18 = kTangent.y;
    }
    z = v19;
    y = v18;
    x = v17;
    NiMatrix3::MakeRotation(&kBankMat, fBankAmt, x, y, z);
    qmemcpy(&kTm, NiMatrix3::operator*(&kBankMat, &result, &kTm), sizeof(kTm));
  }
LABEL_34:
  qmemcpy(v25, &kTm, sizeof(NiMatrix3));
}
// B622CC: using guessed type const float NI_PI;

//----- (007EBFF0) --------------------------------------------------------
double __thiscall NiPathController::PathLength(NiPathController *this, int iI0, int iI1, float fTime)
{
  int v4; // edi@1
  signed int v5; // esi@1
  NiPosData *v6; // eax@2
  NiAnimationKey::KeyType v7; // edx@3
  char v8; // bl@3
  NiPosKey *v9; // ecx@3
  float v11; // [sp+1Ch] [bp-14h]@5
  float v12; // [sp+20h] [bp-10h]@5
  float v13; // [sp+24h] [bp-Ch]@5
  NiPathController *v14; // [sp+28h] [bp-8h]@1
  float fResult; // [sp+2Ch] [bp-4h]@1
  int iI0a; // [sp+38h] [bp+8h]@5
  int iI0b; // [sp+38h] [bp+8h]@5
  int iI0c; // [sp+38h] [bp+8h]@5

  fResult = 0.0;
  v4 = iI0;
  v14 = this;
  v5 = 0;
  do
  {
    v6 = v14->m_spPathData.m_pObject;
    if ( v6 )
    {
      v7 = v6->m_eType;
      v8 = v6->m_ucKeySize;
      v9 = v6->m_pkKeys;
    }
    else
    {
      v7 = 0;
      v9 = 0;
      v8 = 0;
    }
    *(float *)&iI0a = *(float *)(v5 + 10994524) * fTime;
    ((void (__cdecl *)(int, char *, char *, float *))dword_B61DC0[v7])(
      iI0a,
      (char *)v9 + v4 * (unsigned __int8)v8,
      (char *)v9 + iI1 * (unsigned __int8)v8,
      &v11);
    *(float *)&iI0b = v11 * v11 + v12 * v12 + v13 * v13;
    *(float *)&iI0c = sqrt(*(float *)&iI0b);
    v5 += 4;
    fResult = *(float *)&iI0c * *(float *)(v5 + 10994500) + fResult;
  }
  while ( v5 < 20 );
  return (float)(fResult * fTime);
}
// B61DC0: using guessed type int dword_B61DC0[];

//----- (007EC0C0) --------------------------------------------------------
char __thiscall NiPathController::IsEqual(NiPathController *this, NiObject *pkObject)
{
  NiPathController *v2; // edi@1
  float *v4; // esi@5
  NiRefObjectVtbl *v5; // ecx@10
  unsigned int v6; // eax@10
  __int16 v7; // cx@21
  unsigned __int16 v8; // dx@21
  NiPosKey *pkPathKeys; // [sp+8h] [bp-10h]@10
  NiAnimationKey::KeyType ePathType; // [sp+Ch] [bp-Ch]@10
  unsigned int uiNumPathKeys; // [sp+10h] [bp-8h]@10
  char ucSize; // [sp+17h] [bp-1h]@10

  v2 = this;
  if ( !NiTimeController::IsEqual((NiTimeController *)&this->vfptr, pkObject)
    || !(unsigned __int8)((int (__stdcall *)(NiRefObjectVtbl *))v2->m_spPathData.m_pObject->vfptr[7].__vecDelDtor)(pkObject[9].vfptr)
    || !(unsigned __int8)((int (__stdcall *)(unsigned int))v2->m_spPctData.m_pObject->vfptr[7].__vecDelDtor)(pkObject[9].m_uiRefCount) )
  {
    return 0;
  }
  v4 = v2->m_pfPartialLength;
  if ( !v4 )
    goto LABEL_36;
  if ( !pkObject[10].vfptr )
    return 0;
  if ( !v4 )
  {
LABEL_36:
    if ( pkObject[10].vfptr )
      return 0;
    if ( !v4 )
      goto LABEL_35;
  }
  NiPathController::GetPathData(v2, &pkPathKeys, &uiNumPathKeys, &ePathType, &ucSize);
  v5 = pkObject[10].vfptr;
  v6 = 4 * uiNumPathKeys;
  if ( 4 * uiNumPathKeys >= 4 )
  {
    while ( *(void *(__thiscall **)(NiRefObject *, unsigned int))v4 == v5->__vecDelDtor )
    {
      v6 -= 4;
      ++v5;
      ++v4;
      if ( v6 < 4 )
        goto LABEL_13;
    }
    return 0;
  }
LABEL_13:
  if ( !v6 )
    goto LABEL_35;
  if ( LOBYTE(v5->__vecDelDtor) == *(_BYTE *)v4
    && (v6 <= 1
     || BYTE1(v5->__vecDelDtor) == *((_BYTE *)v4 + 1) && (v6 <= 2 || BYTE2(v5->__vecDelDtor) == *((_BYTE *)v4 + 2))) )
  {
LABEL_35:
    if ( *(float *)&pkObject[10].m_uiRefCount == v2->m_fTotalLength
      && !((LOBYTE(v2->m_uFlags) ^ LOBYTE(pkObject[7].m_uiRefCount)) & 1) )
    {
      v7 = pkObject[7].m_uiRefCount;
      v8 = v2->m_uFlags;
      if ( !((((unsigned __int8)v2->m_uFlags >> 1) ^ ((unsigned __int8)LOWORD(pkObject[7].m_uiRefCount) >> 1)) & 1)
        && (NiRefObjectVtbl *)v2->m_eBankDir == pkObject[13].vfptr
        && !((((unsigned __int8)v8 >> 2) ^ ((unsigned __int8)v7 >> 2)) & 1)
        && !((((unsigned __int8)v8 >> 3) ^ ((unsigned __int8)v7 >> 3)) & 1)
        && !((((unsigned __int8)v8 >> 4) ^ ((unsigned __int8)v7 >> 4)) & 1)
        && !((((unsigned __int8)v8 >> 5) ^ ((unsigned __int8)v7 >> 5)) & 1)
        && *(float *)&pkObject[11].vfptr == v2->m_fMaxBankAngle
        && *(float *)&pkObject[11].m_uiRefCount == v2->m_fSmoothing
        && v2->m_sFollowAxis == LOWORD(pkObject[12].vfptr)
        && !((((unsigned __int8)v8 >> 6) ^ ((unsigned __int8)v7 >> 6)) & 1) )
      {
        return 1;
      }
    }
  }
  return 0;
}

//----- (007EC270) --------------------------------------------------------
NiPathController *__thiscall NiPathController::`scalar deleting destructor'(NiPathController *this, unsigned int a2)
{
  NiPathController *v2; // esi@1

  v2 = this;
  NiPathController::~NiPathController(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007EC2A0) --------------------------------------------------------
double __thiscall NiPathController::GetTotalPathLength(NiPathController *this)
{
  NiPathController *v1; // edi@1
  NiPosData *v2; // eax@2
  unsigned int v3; // esi@2
  unsigned int v4; // ebx@3
  float *v5; // eax@5
  float fLength; // ST18_4@6
  unsigned int uiNumPathKeys; // [sp+14h] [bp-4h]@3

  v1 = this;
  if ( this->m_fTotalLength < 0.0 )
  {
    v2 = this->m_spPathData.m_pObject;
    v3 = 0;
    if ( v2 )
    {
      v4 = v2->m_uiNumKeys;
      uiNumPathKeys = v2->m_uiNumKeys;
    }
    else
    {
      uiNumPathKeys = 0;
      v4 = 0;
    }
    operator delete(this->m_pfPartialLength);
    v5 = (float *)operator new(4 * v4);
    v1->m_pfPartialLength = v5;
    *v5 = 0.0;
    if ( v4 - 1 > 0 )
    {
      do
      {
        fLength = NiPathController::PathLength(v1, v3, v3 + 1, 1.0);
        v1->m_pfPartialLength[v3 + 1] = v1->m_pfPartialLength[v3] + fLength;
        ++v3;
      }
      while ( v3 < uiNumPathKeys - 1 );
      v4 = uiNumPathKeys;
    }
    v1->m_fTotalLength = v1->m_pfPartialLength[v4 - 1];
  }
  return v1->m_fTotalLength;
}

//----- (007EC350) --------------------------------------------------------
void __thiscall NiPathController::GetPercentLoc(NiPathController *this, float fPercent, unsigned int *uiI1, unsigned int *uiI2, float *fNormTime)
{
  NiPosData *v5; // eax@1
  unsigned int v6; // edi@2
  long double v7; // st7@4
  long double v8; // st6@6
  unsigned int v9; // esi@12
  signed int v10; // ebx@12
  double v11; // st7@13
  float *v12; // edx@13
  float *v13; // eax@17
  signed int v14; // edi@19
  double v15; // st7@20
  NiPosData *v16; // eax@21
  NiAnimationKey::KeyType v17; // edx@22
  char v18; // bl@22
  NiPosKey *v19; // ecx@22
  double v20; // st7@25
  float v21; // [sp+1Ch] [bp-28h]@24
  float v22; // [sp+20h] [bp-24h]@24
  float v23; // [sp+24h] [bp-20h]@24
  float v24; // [sp+28h] [bp-1Ch]@20
  double v25; // [sp+2Ch] [bp-18h]@24
  float fDiff; // [sp+30h] [bp-14h]@12
  float fDist; // [sp+34h] [bp-10h]@17
  NiPathController *v28; // [sp+38h] [bp-Ch]@1
  double v29; // [sp+3Ch] [bp-8h]@24
  float fTime; // [sp+40h] [bp-4h]@17
  unsigned int ui1a; // [sp+4Ch] [bp+8h]@7
  unsigned int ui1b; // [sp+4Ch] [bp+8h]@7
  unsigned int ui1c; // [sp+4Ch] [bp+8h]@11
  unsigned int ui1; // [sp+4Ch] [bp+8h]@12

  v5 = this->m_spPathData.m_pObject;
  v28 = this;
  if ( v5 )
    v6 = v5->m_uiNumKeys;
  else
    v6 = 0;
  v7 = fPercent;
  if ( 0.0 == fPercent )
  {
    *uiI1 = 0;
    *uiI2 = 1;
    *fNormTime = 0.0;
  }
  else
  {
    v8 = 1.0;
    if ( v7 < 0.0 )
    {
      *(float *)&ui1a = fmod(v7, 1.0);
      *(float *)&ui1b = *(float *)&ui1a + 1.0;
      v8 = 1.0;
      v7 = *(float *)&ui1b;
    }
    if ( 1.0 == v7 )
    {
      *uiI1 = v6 - 2;
      *uiI2 = v6 - 1;
      *fNormTime = 1.0;
    }
    else
    {
      if ( v7 > 1.0 )
      {
        *(float *)&ui1c = fmod(v7, v8);
        v7 = *(float *)&ui1c;
      }
      v9 = 0;
      v10 = 1;
      fDiff = v7 * this->m_fTotalLength;
      ui1 = 1;
      if ( v6 != 1 )
      {
        v11 = fDiff;
        v12 = v28->m_pfPartialLength + 1;
        while ( *v12 < v11 )
        {
          ++v9;
          ++v10;
          ++v12;
          if ( v9 >= v6 - 1 )
            goto LABEL_18;
        }
        v13 = v28->m_pfPartialLength;
        fDist = v11 - v13[v9];
        fTime = fDist / (v13[v10] - v13[v9]);
LABEL_18:
        ui1 = v10;
      }
      v14 = 0;
      do
      {
        v15 = NiPathController::PathLength(v28, v9, v10, fTime);
        fDiff = v15 - fDist;
        v24 = fabs(fDiff);
        if ( v24 <= 0.00009999999747378752 )
          break;
        v16 = v28->m_spPathData.m_pObject;
        if ( v16 )
        {
          v17 = v16->m_eType;
          v18 = v16->m_ucKeySize;
          v19 = v16->m_pkKeys;
        }
        else
        {
          v17 = 0;
          v19 = 0;
          v18 = 0;
        }
        ((void (__cdecl *)(_DWORD, char *, char *, float *))dword_B61DC0[v17])(
          LODWORD(fTime),
          (char *)v19 + v9 * (unsigned __int8)v18,
          (char *)v19 + ui1 * (unsigned __int8)v18,
          &v21);
        v29 = fTime;
        v25 = fDiff;
        v24 = v21 * v21 + v22 * v22 + v23 * v23;
        v24 = sqrt(v24);
        v10 = ui1;
        ++v14;
        fTime = v29 - v25 / v24;
      }
      while ( v14 < 32 );
      v20 = fTime;
      *uiI1 = v9;
      *uiI2 = v10;
      *fNormTime = v20;
    }
  }
}
// B61DC0: using guessed type int dword_B61DC0[];

//----- (007EC550) --------------------------------------------------------
void __thiscall NiPathController::GetLoc(NiPathController *this, float fTime, unsigned int *uiI1, unsigned int *uiI2, float *fNormTime)
{
  NiPathController *v5; // esi@1
  NiPosData *v6; // eax@3
  unsigned int v7; // edi@4
  char v8; // cl@4
  float *v9; // esi@4
  double v10; // st7@6
  int v11; // edx@8
  unsigned int v12; // ebx@8
  unsigned int v13; // ecx@10
  unsigned int v14; // eax@19
  NiPathController *v15; // [sp+18h] [bp-8h]@1
  unsigned int uiNumPathKeys; // [sp+1Ch] [bp-4h]@4
  char bFirstLoop_3; // [sp+2Bh] [bp+Bh]@10

  v5 = this;
  v15 = this;
  if ( (LOBYTE(this->m_uFlags) >> 4) & 1 )
  {
    NiPathController::GetPercentLoc(this, fTime, uiI1, uiI2, fNormTime);
    v5->m_uiLastPathIdx = *uiI1;
  }
  else
  {
    v6 = this->m_spPathData.m_pObject;
    if ( v6 )
    {
      v7 = v6->m_uiNumKeys;
      v8 = v6->m_ucKeySize;
      v9 = &v6->m_pkKeys->m_fTime;
      uiNumPathKeys = v6->m_uiNumKeys;
    }
    else
    {
      v9 = 0;
      uiNumPathKeys = 0;
      v8 = 0;
      v7 = 0;
    }
    v10 = fTime;
    if ( *v9 < (double)fTime )
    {
      v11 = (unsigned __int8)v8;
      v12 = v7 - 1;
      if ( *(float *)((char *)v9 + (v7 - 1) * (unsigned __int8)v8) > v10 )
      {
        v13 = v15->m_uiLastPathIdx;
        bFirstLoop_3 = 1;
        if ( v13 >= v12 )
        {
LABEL_19:
          v14 = (unsigned int)fNormTime;
        }
        else
        {
          while ( *(float *)((char *)v9 + v13 * v11) != v10
               && (*(float *)((char *)v9 + v13 * v11) >= v10 || *(float *)((char *)v9 + v11 * (v13 + 1)) <= v10) )
          {
            if ( v13 == uiNumPathKeys - 2 && bFirstLoop_3 )
            {
              v13 = 0;
              bFirstLoop_3 = 0;
            }
            else
            {
              ++v13;
            }
            if ( v13 >= v12 )
              goto LABEL_19;
          }
          v15->m_uiLastPathIdx = v13;
          v14 = v13 + 1;
        }
        *fNormTime = (v10 - *(float *)((char *)v9 + v13 * v11))
                   / (*(float *)((char *)v9 + v14 * v11) - *(float *)((char *)v9 + v13 * v11));
        *uiI1 = v13;
        *uiI2 = v14;
      }
      else
      {
        *uiI1 = v7 - 2;
        *uiI2 = v12;
        *fNormTime = 1.0;
      }
    }
    else
    {
      *uiI1 = 0;
      *uiI2 = 1;
      *fNormTime = 0.0;
    }
  }
}

//----- (007EC6B0) --------------------------------------------------------
void __thiscall NiPathController::LoadBinary(NiPathController *this, NiStream *kStream)
{
  NiStream *v2; // esi@1
  NiPathController *v3; // edi@1
  NiBinaryStream *v4; // eax@3
  NiBinaryStream *v5; // ST3C_4@3
  unsigned int (__cdecl *v6)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@3
  NiBinaryStream *v7; // eax@4
  NiBinaryStream *v8; // ST3C_4@4
  unsigned int (__cdecl *v9)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@4
  unsigned int (__cdecl *v10)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@4
  NiBinaryStream *v11; // ST28_4@4
  NiBinaryStream *v12; // eax@4
  NiBinaryStream *v13; // ST14_4@4
  unsigned int (__cdecl *v14)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@4
  unsigned int (__cdecl *v15)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@4
  NiBinaryStream *v16; // ST00_4@4
  NiPathController::BankDir v17; // [sp+8h] [bp-4h]@4

  v2 = kStream;
  v3 = this;
  NiTimeController::LoadBinary((NiTimeController *)&this->vfptr, kStream);
  if ( v2->m_uiNifFileVersion >= 0xA000102 )
  {
    v4 = v2->m_pkIstr;
    v5 = v4;
    v6 = v4->m_pfnRead;
    kStream = (NiStream *)2;
    v6(v5, &v3->m_uFlags, 2u, (unsigned int *)&kStream, 1u);
  }
  else
  {
    v3->m_uFlags = v2->m_usNiTimeControllerFlags >> 5;
  }
  v7 = v2->m_pkIstr;
  v8 = v7;
  v9 = v7->m_pfnRead;
  kStream = (NiStream *)4;
  v9(v8, &v17, 4u, (unsigned int *)&kStream, 1u);
  v3->m_eBankDir = v17;
  v10 = v2->m_pkIstr->m_pfnRead;
  v11 = v2->m_pkIstr;
  kStream = (NiStream *)4;
  v10(v11, &v3->m_fMaxBankAngle, 4u, (unsigned int *)&kStream, 1u);
  v12 = v2->m_pkIstr;
  v13 = v12;
  v14 = v12->m_pfnRead;
  kStream = (NiStream *)4;
  v14(v13, &v3->m_fSmoothing, 4u, (unsigned int *)&kStream, 1u);
  v15 = v2->m_pkIstr->m_pfnRead;
  v16 = v2->m_pkIstr;
  kStream = (NiStream *)2;
  v15(v16, &v3->m_sFollowAxis, 2u, (unsigned int *)&kStream, 1u);
  NiStream::ReadLinkID(v2);
  NiStream::ReadLinkID(v2);
}

//----- (007EC7A0) --------------------------------------------------------
void __userpurge NiPathController::LinkObject(NiPathController *this@<ecx>, double a2@<st0>, NiStream *kStream)
{
  NiPathController *v3; // esi@1
  NiObject *v4; // eax@1
  NiPosData *v5; // edi@1
  NiPosData *v6; // ebx@1
  NiObject *v7; // eax@8
  NiFloatData *v8; // edi@8
  NiFloatData *v9; // ebx@8
  NiPosData *v10; // eax@18
  unsigned int v11; // ecx@19
  NiAnimationKey::KeyType v12; // edx@19
  NiPosKey *v13; // eax@19

  v3 = this;
  NiTimeController::LinkObject((NiTimeController *)&this->vfptr, kStream);
  v4 = NiStream::GetObjectFromLinkID(kStream);
  v5 = v3->m_spPathData.m_pObject;
  v6 = (NiPosData *)v4;
  if ( (NiObject *)v5 != v4 )
  {
    if ( v5 && !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v3->m_spPathData.m_pObject = v6;
    if ( v6 )
      InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
  }
  v7 = NiStream::GetObjectFromLinkID(kStream);
  v8 = v3->m_spPctData.m_pObject;
  v9 = (NiFloatData *)v7;
  if ( (NiObject *)v8 != v7 )
  {
    if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v3->m_spPctData.m_pObject = v9;
    if ( v9 )
      InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  }
  v3->m_uFlags |= 1u;
  if ( (LOBYTE(v3->m_uFlags) >> 4) & 1 && v3->m_uFlags & 1 )
  {
    a2 = NiPathController::GetTotalPathLength(v3);
    v3->m_fTotalLength = a2;
    v3->m_uFlags &= 0xFFFEu;
  }
  v10 = v3->m_spPathData.m_pObject;
  if ( v10 )
  {
    v11 = v10->m_uiNumKeys;
    v12 = v10->m_eType;
    v13 = v10->m_pkKeys;
    if ( v11 )
    {
      ((void (__cdecl *)(NiPosKey *, unsigned int))dword_B61EE0[v12])(v13, v11);
      v3->m_fMaxCurvature = a2;
    }
  }
}
// B61EE0: using guessed type int dword_B61EE0[];

//----- (007EC890) --------------------------------------------------------
void __thiscall NiPathController::SaveBinary(NiPathController *this, NiStream *kStream)
{
  NiStream *v2; // esi@1
  NiPathController *v3; // edi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST3C_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v7; // eax@1
  NiBinaryStream *v8; // ST28_4@1
  unsigned int (__cdecl *v9)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v10; // eax@1
  NiBinaryStream *v11; // ST14_4@1
  unsigned int (__cdecl *v12)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v13; // eax@1
  NiBinaryStream *v14; // ST00_4@1
  unsigned int (__cdecl *v15)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v16; // eax@1
  NiBinaryStream *v17; // ST3C_4@1
  unsigned int (__cdecl *v18)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1

  v2 = kStream;
  v3 = this;
  NiTimeController::SaveBinary((NiTimeController *)&this->vfptr, kStream);
  v4 = v2->m_pkOstr;
  v5 = v4;
  v6 = v4->m_pfnWrite;
  kStream = (NiStream *)2;
  v6(v5, &v3->m_uFlags, 2u, (unsigned int *)&kStream, 1u);
  v7 = v2->m_pkOstr;
  v8 = v7;
  v9 = v7->m_pfnWrite;
  kStream = (NiStream *)4;
  v9(v8, &v3->m_eBankDir, 4u, (unsigned int *)&kStream, 1u);
  v10 = v2->m_pkOstr;
  v11 = v10;
  v12 = v10->m_pfnWrite;
  kStream = (NiStream *)4;
  v12(v11, &v3->m_fMaxBankAngle, 4u, (unsigned int *)&kStream, 1u);
  v13 = v2->m_pkOstr;
  v14 = v13;
  v15 = v13->m_pfnWrite;
  kStream = (NiStream *)4;
  v15(v14, &v3->m_fSmoothing, 4u, (unsigned int *)&kStream, 1u);
  v16 = v2->m_pkOstr;
  v17 = v16;
  v18 = v16->m_pfnWrite;
  kStream = (NiStream *)2;
  v18(v17, &v3->m_sFollowAxis, 2u, (unsigned int *)&kStream, 1u);
  v2->vfptr->SaveLinkID(v2, (NiObject *)v3->m_spPathData.m_pObject);
  v2->vfptr->SaveLinkID(v2, (NiObject *)v3->m_spPctData.m_pObject);
}

//----- (007EC970) --------------------------------------------------------
void __thiscall NiPathController::GetViewerStrings(NiPathController *this, NiTArray<char *> *pkStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiTArray<char *> *v3; // eax@1
  unsigned int v4; // edi@1

  v2 = (NiTArray<NiVBBlock *> *)pkStrings;
  NiTimeController::GetViewerStrings((NiTimeController *)&this->vfptr, pkStrings);
  v3 = (NiTArray<char *> *)NiGetViewerString(NiPathController::m_RTTI.m_pcName);
  v4 = v2->m_uiSize;
  pkStrings = v3;
  if ( v4 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v4 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v4, (NiVBChip *const *)&pkStrings);
}

//----- (007EC9C0) --------------------------------------------------------
void __thiscall NiPathController::Update(NiPathController *this, float fTime)
{
  NiPathController *v2; // ebx@1
  NiFloatData *v3; // eax@1
  NiFloatKey *v4; // esi@2
  unsigned int v5; // edi@2
  NiPosData *v6; // eax@3
  bool v7; // zf@4
  NiMatrix3 kRefFrame; // [sp+24h] [bp-38h]@7
  NiPoint3 kPos; // [sp+48h] [bp-14h]@8
  unsigned int ui1; // [sp+54h] [bp-8h]@4
  NiAnimationKey::KeyType ePctType; // [sp+58h] [bp-4h]@2

  v2 = this;
  v3 = this->m_spPctData.m_pObject;
  if ( v3 )
  {
    v4 = v3->m_pkKeys;
    v5 = v3->m_uiNumKeys;
    ePctType = v3->m_eType;
    if ( v4 )
    {
      v6 = this->m_spPathData.m_pObject;
      if ( v6 )
      {
        v7 = v6->m_pkKeys == 0;
        LOBYTE(ui1) = v6->m_ucKeySize;
        if ( !v7 && !NiTimeController::DontDoUpdate((NiTimeController *)&this->vfptr, fTime) )
        {
          fTime = NiFloatKey::GenInterp(v2->m_fScaledTime, v4, ePctType, v5, &v2->m_uiLastPctIdx, ui1);
          NiPathController::GetLoc(v2, fTime, &ui1, (unsigned int *)&ePctType, &fTime);
          if ( (LOBYTE(v2->m_uFlags) >> 5) & 1 )
          {
            NiPathController::CalcRefFrame(v2, ui1, ePctType, fTime, &kRefFrame);
            qmemcpy(&v2->m_pTarget[1].m_uiMaxSize, &kRefFrame, 0x24u);
          }
          NiPathController::GenPathInterp(v2, &kPos, ui1, ePctType, fTime);
          *(NiPoint3 *)&v2->m_pTarget[3].m_uiRefCount = kPos;
        }
      }
    }
  }
}

//----- (007ECAD0) --------------------------------------------------------
void __thiscall NiPathController::CopyMembers(NiPathController *this, NiPathController *pkDest, NiCloningProcess *kCloning)
{
  NiPathController *v3; // esi@1
  NiPathController *v4; // edi@1
  NiPosData *v5; // ecx@1
  int v6; // eax@2
  NiPosData *v7; // ebx@2
  NiFloatData *v8; // ecx@10
  int v9; // eax@11
  NiFloatData *v10; // ebx@11
  NiPosData *v11; // eax@39
  unsigned int v12; // ebx@40
  float *v13; // eax@42
  NiPathController *pkDesta; // [sp+14h] [bp+8h]@2
  NiCloningProcess *kCloninga; // [sp+18h] [bp+Ch]@11

  v3 = pkDest;
  v4 = this;
  NiTimeController::CopyMembers((NiTimeController *)&this->vfptr, (NiTimeController *)&pkDest->vfptr, kCloning);
  pkDest->m_uFlags = v4->m_uFlags;
  v5 = v4->m_spPathData.m_pObject;
  if ( v5 )
  {
    v6 = ((int (__stdcall *)(_DWORD))v5->vfptr[2].__vecDelDtor)(kCloning);
    v7 = pkDest->m_spPathData.m_pObject;
    pkDesta = (NiPathController *)v6;
    if ( v7 != (NiPosData *)v6 )
    {
      if ( v7 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
        v6 = (int)pkDesta;
      }
      v3->m_spPathData.m_pObject = (NiPosData *)v6;
      if ( v6 )
        InterlockedIncrement((volatile LONG *)(v6 + 4));
    }
  }
  v8 = v4->m_spPctData.m_pObject;
  if ( v8 )
  {
    v9 = ((int (__stdcall *)(_DWORD))v8->vfptr[2].__vecDelDtor)(kCloning);
    v10 = v3->m_spPctData.m_pObject;
    kCloninga = (NiCloningProcess *)v9;
    if ( v10 != (NiFloatData *)v9 )
    {
      if ( v10 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
          v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
        v9 = (int)kCloninga;
      }
      v3->m_spPctData.m_pObject = (NiFloatData *)v9;
      if ( v9 )
        InterlockedIncrement((volatile LONG *)(v9 + 4));
    }
  }
  if ( (LOBYTE(v4->m_uFlags) >> 2) & 1 )
    v3->m_uFlags |= 4u;
  else
    v3->m_uFlags &= 0xFFFBu;
  if ( (LOBYTE(v4->m_uFlags) >> 3) & 1 )
    v3->m_uFlags |= 8u;
  else
    v3->m_uFlags &= 0xFFF7u;
  v3->m_eBankDir = v4->m_eBankDir;
  if ( (LOBYTE(v4->m_uFlags) >> 4) & 1 )
  {
    v3->m_uFlags |= 0x10u;
    if ( v3->m_uFlags & 1 )
    {
      v3->m_fTotalLength = NiPathController::GetTotalPathLength(v3);
      v3->m_uFlags &= 0xFFFEu;
    }
  }
  else
  {
    v3->m_uFlags &= 0xFFEFu;
  }
  if ( (LOBYTE(v4->m_uFlags) >> 5) & 1 )
    v3->m_uFlags |= 0x20u;
  else
    v3->m_uFlags &= 0xFFDFu;
  v3->m_fMaxBankAngle = v4->m_fMaxBankAngle;
  v3->m_fSmoothing = v4->m_fSmoothing;
  v3->m_sFollowAxis = v4->m_sFollowAxis;
  if ( (LOBYTE(v4->m_uFlags) >> 6) & 1 )
    v3->m_uFlags |= 0x40u;
  else
    v3->m_uFlags &= 0xFFBFu;
  if ( (LOBYTE(v4->m_uFlags) >> 1) & 1 )
    v3->m_uFlags |= 2u;
  else
    v3->m_uFlags &= 0xFFFDu;
  if ( v4->m_pfPartialLength )
  {
    v11 = v4->m_spPathData.m_pObject;
    if ( v11 )
      v12 = v11->m_uiNumKeys;
    else
      v12 = 0;
    v13 = (float *)operator new(4 * v12);
    v3->m_pfPartialLength = v13;
    memcpy_s(v13, 4 * v12, v4->m_pfPartialLength, 4 * v12);
  }
  v3->m_fTotalLength = v4->m_fTotalLength;
}

//----- (007ECCB0) --------------------------------------------------------
NiTimeController *__cdecl NiPathController::CreateObject()
{
  NiTimeController *v0; // eax@1
  NiTimeController *v1; // esi@1
  NiTimeController *result; // eax@2

  v0 = (NiTimeController *)operator new(0x6Cu);
  v1 = v0;
  if ( v0 )
  {
    NiTimeController::NiTimeController(v0);
    v1->vfptr = (NiRefObjectVtbl *)&NiPathController::`vftable';
    LODWORD(v1[1].m_fFrequency) = 0;
    LODWORD(v1[1].m_fPhase) = 0;
    v1[1].m_fStartTime = 0.0;
    v1[1].m_fLastTime = 0.0;
    v1[1].m_fScaledTime = 0.0;
    v1[1].m_uiRefCount = 0;
    *(_DWORD *)&v1[1].m_uFlags = 0;
    LODWORD(v1[1].m_fLoKeyTime) = 0;
    v1[1].m_fHiKeyTime = -1.0;
    LOWORD(v1[1].m_fWeightedLastTime) = 0;
    *(_DWORD *)&v1[1].m_bComputeScaledTime = 1;
    LOWORD(v1[1].vfptr) = 3;
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E662C: using guessed type int (__thiscall *NiPathController::`vftable')(void *p, char);

//----- (007ECD20) --------------------------------------------------------
NiTimeController *__thiscall NiPathController::CreateClone(NiPathController *this, NiCloningProcess *kCloning)
{
  NiPathController *v2; // ebx@1
  NiTimeController *v3; // eax@1
  NiTimeController *v4; // esi@1

  v2 = this;
  v3 = (NiTimeController *)operator new(0x6Cu);
  v4 = v3;
  if ( v3 )
  {
    NiTimeController::NiTimeController(v3);
    v4->vfptr = (NiRefObjectVtbl *)&NiPathController::`vftable';
    LODWORD(v4[1].m_fFrequency) = 0;
    LODWORD(v4[1].m_fPhase) = 0;
    v4[1].m_fStartTime = 0.0;
    v4[1].m_fLastTime = 0.0;
    v4[1].m_fScaledTime = 0.0;
    v4[1].m_uiRefCount = 0;
    v4[1].m_fHiKeyTime = -1.0;
    *(_DWORD *)&v4[1].m_uFlags = 0;
    *(_DWORD *)&v4[1].m_bComputeScaledTime = 1;
    LOWORD(v4[1].m_fWeightedLastTime) = 0;
    LODWORD(v4[1].m_fLoKeyTime) = 0;
    LOWORD(v4[1].vfptr) = 3;
  }
  else
  {
    v4 = 0;
  }
  NiPathController::CopyMembers(v2, (NiPathController *)v4, kCloning);
  return v4;
}
// 9E662C: using guessed type int (__thiscall *NiPathController::`vftable')(void *p, char);

//----- (007ECDA0) --------------------------------------------------------
unsigned __int16 __thiscall NiMultiTargetTransformController::GetInterpolatorCount(NiMultiTargetTransformController *this)
{
  return this->m_usNumInterps;
}

//----- (007ECDB0) --------------------------------------------------------
NiBlendTransformInterpolator *__thiscall NiMultiTargetTransformController::GetInterpolator(NiMultiTargetTransformController *this, unsigned __int16 usIndex)
{
  return &this->m_pkBlendInterps[usIndex];
}

//----- (007ECDD0) --------------------------------------------------------
NiBlendTransformInterpolator *__thiscall NiMultiTargetTransformController::CreateBlendInterpolator(NiMultiTargetTransformController *this, unsigned __int16 usIndex, bool bManagerControlled, bool bAccumulateAnimations, float fWeightThreshold, char ucArraySize)
{
  return &this->m_pkBlendInterps[usIndex];
}

//----- (007ECDF0) --------------------------------------------------------
void __thiscall NiMultiTargetTransformController::GuaranteeTimeRange(NiMultiTargetTransformController *this, float fStartTime, float fEndTime)
{
  NiMultiTargetTransformController *v3; // edi@1
  int v4; // esi@1

  v3 = this;
  v4 = 0;
  if ( this->m_usNumInterps > 0u )
  {
    do
      ((void (__stdcall *)(_DWORD, _DWORD))v3->m_pkBlendInterps[(unsigned __int16)v4++].vfptr[29].__vecDelDtor)(
        LODWORD(fStartTime),
        LODWORD(fEndTime));
    while ( (unsigned __int16)v4 < v3->m_usNumInterps );
  }
}

//----- (007ECE40) --------------------------------------------------------
int __stdcall NiMultiTargetTransformController::InterpolatorIsCorrectType(NiInterpolator *pkInterpolator, unsigned __int16 usIndex)
{
  return ((int (*)(void))pkInterpolator->vfptr[26].__vecDelDtor)();
}

//----- (007ECE60) --------------------------------------------------------
char __thiscall NiMultiTargetTransformController::RegisterStreamables(NiMultiTargetTransformController *this, NiStream *kStream)
{
  return NiPSysResetOnLoopCtlr::RegisterStreamables((NiPSysUpdateCtlr *)this, kStream);
}

//----- (007ECE70) --------------------------------------------------------
char __thiscall NiMultiTargetTransformController::IsEqual(NiMultiTargetTransformController *this, NiObject *pkObject)
{
  NiMultiTargetTransformController *v2; // ebx@1
  char result; // al@2
  unsigned __int16 v4; // ax@3
  unsigned __int16 v5; // si@4
  NiAVObject **v6; // edx@5
  int v7; // eax@5
  NiAVObject *v8; // ecx@5
  NiAVObject **v9; // edx@5
  NiMultiTargetTransformController *v10; // [sp+8h] [bp-4h]@1

  v2 = this;
  v10 = this;
  if ( NiKeyframeManager::IsEqual((NiPSysUpdateCtlr *)this, pkObject)
    && (v4 = v2->m_usNumInterps, LOWORD(pkObject[8].m_uiRefCount) == v4) )
  {
    v5 = 0;
    if ( v4 <= 0u )
    {
LABEL_12:
      result = 1;
    }
    else
    {
      while ( 1 )
      {
        v6 = v2->m_ppkTargets;
        v7 = v5;
        v8 = v6[v7];
        v9 = &v6[v7];
        if ( v8 )
        {
          if ( !pkObject[8].vfptr[v7].__vecDelDtor )
            break;
          v2 = v10;
          if ( v8 )
            goto LABEL_16;
        }
        if ( pkObject[8].vfptr[v7].__vecDelDtor )
          break;
        v2 = v10;
        if ( v8 )
        {
LABEL_16:
          if ( !(unsigned __int8)(*(int (__thiscall **)(void *(__thiscall *)(NiRefObject *, unsigned int), NiAVObject *))(*(_DWORD *)pkObject[8].vfptr[v7].__vecDelDtor + 28))(
                                   pkObject[8].vfptr[v7].__vecDelDtor,
                                   *v9) )
            break;
        }
        if ( ++v5 >= v2->m_usNumInterps )
          goto LABEL_12;
      }
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007ECF10) --------------------------------------------------------
void __thiscall NiMultiTargetTransformController::~NiMultiTargetTransformController(NiMultiTargetTransformController *this)
{
  NiMultiTargetTransformController *v1; // esi@1
  NiBlendTransformInterpolator *v2; // ecx@1

  v1 = this;
  v2 = this->m_pkBlendInterps;
  v1->vfptr = (NiRefObjectVtbl *)&NiMultiTargetTransformController::`vftable';
  if ( v2 )
  {
    if ( LODWORD(v2[-1].m_fHighEaseSpinner) )
    {
      ((void (__stdcall *)(_DWORD))v2->vfptr->__vecDelDtor)(3);
      operator delete(v1->m_ppkTargets);
      NiTimeController::~NiTimeController((NiTimeController *)&v1->vfptr);
      return;
    }
    operator delete(&v2[-1].m_fHighEaseSpinner);
  }
  operator delete(v1->m_ppkTargets);
  NiTimeController::~NiTimeController((NiTimeController *)&v1->vfptr);
}
// 9E571C: using guessed type int (__thiscall *NiMultiTargetTransformController::`vftable')(void *p, char);

//----- (007ECF70) --------------------------------------------------------
void __thiscall NiMultiTargetTransformController::Update(NiMultiTargetTransformController *this, float fTime)
{
  NiMultiTargetTransformController *v2; // edi@1
  int v3; // eax@1
  NiAVObject **v4; // edx@2
  int v5; // esi@2
  bool v6; // zf@2
  NiAVObject **v7; // eax@2
  NiAVObject *v8; // eax@3
  NiAVObject *v9; // eax@6
  NiAVObject *v10; // eax@10
  NiQuatTransform kTransform; // [sp+18h] [bp-28h]@1
  float v12; // [sp+38h] [bp-8h]@10
  int us; // [sp+3Ch] [bp-4h]@1

  kTransform.m_fScale = -3.4028235e38;
  v2 = this;
  kTransform.m_kTranslate = NiQuatTransform::INVALID_TRANSLATE;
  kTransform.m_kRotate = NiQuatTransform::INVALID_ROTATE;
  LOWORD(v3) = 0;
  us = 0;
  if ( this->m_usNumInterps > 0u )
  {
    do
    {
      v4 = v2->m_ppkTargets;
      v5 = (unsigned __int16)v3;
      v6 = v4[(unsigned __int16)v3] == 0;
      v7 = &v4[(unsigned __int16)v3];
      if ( !v6 )
      {
        v8 = *v7;
        if ( (LOBYTE(v8->m_uFlags) >> 1) & 1 )
        {
          if ( (unsigned __int8)((int (__stdcall *)(_DWORD, NiAVObject *, NiQuatTransform *))v2->m_pkBlendInterps[v5].vfptr[15].__vecDelDtor)(
                                  LODWORD(fTime),
                                  v8,
                                  &kTransform) )
          {
            if ( -3.4028235e38 != kTransform.m_kTranslate.x )
            {
              v9 = v2->m_ppkTargets[v5];
              v9->m_kLocal.m_Translate.x = kTransform.m_kTranslate.x;
              v9->m_kLocal.m_Translate.y = kTransform.m_kTranslate.y;
              v9->m_kLocal.m_Translate.z = kTransform.m_kTranslate.z;
            }
            if ( -3.4028235e38 != kTransform.m_kRotate.m_fX )
              NiQuaternion::ToRotation(&kTransform.m_kRotate, &v2->m_ppkTargets[v5]->m_kLocal.m_Rotate);
            if ( -3.4028235e38 != kTransform.m_fScale )
            {
              v10 = v2->m_ppkTargets[v5];
              v12 = fabs(kTransform.m_fScale);
              v10->m_kLocal.m_fScale = v12;
            }
          }
        }
      }
      v3 = us + 1;
      us = v3;
    }
    while ( (unsigned __int16)v3 < v2->m_usNumInterps );
  }
}
// A7CAD0: using guessed type const struct NiPoint3 NiQuatTransform::INVALID_TRANSLATE;

//----- (007ED0C0) --------------------------------------------------------
char *__thiscall NiMultiTargetTransformController::GetInterpolatorID(NiMultiTargetTransformController *this, unsigned __int16 usIndex)
{
  return this->m_ppkTargets[usIndex]->m_pcName;
}

//----- (007ED0E0) --------------------------------------------------------
unsigned __int16 __thiscall NiMultiTargetTransformController::GetInterpolatorIndex(NiMultiTargetTransformController *this, const char *pcID)
{
  unsigned __int16 result; // ax@2
  unsigned __int16 v3; // si@3
  NiAVObject **v4; // edi@4

  if ( pcID )
  {
    v3 = this->m_usNumInterps;
    result = 0;
    if ( v3 <= 0u )
    {
LABEL_8:
      result = NiInterpController::INVALID_INDEX;
    }
    else
    {
      v4 = this->m_ppkTargets;
      while ( !v4[result] || strcmp(v4[result]->m_pcName, pcID) )
      {
        if ( ++result >= v3 )
          goto LABEL_8;
      }
    }
  }
  else
  {
    result = NiInterpController::INVALID_INDEX;
  }
  return result;
}
// 9E7D04: using guessed type const unsigned __int16 NiInterpController::INVALID_INDEX;

//----- (007ED160) --------------------------------------------------------
void __thiscall NiMultiTargetTransformController::ResetTimeExtrema(NiMultiTargetTransformController *this)
{
  NiMultiTargetTransformController *v1; // esi@1
  unsigned __int16 v2; // di@2
  int v3; // ecx@3
  float fHi; // [sp+4h] [bp-8h]@3
  float fLo; // [sp+8h] [bp-4h]@3

  v1 = this;
  if ( !((LOBYTE(this->m_uFlags) >> 5) & 1) )
  {
    this->m_fLoKeyTime = 3.4028235e38;
    v2 = 0;
    this->m_fHiKeyTime = -3.4028235e38;
    if ( this->m_usNumInterps > 0u )
    {
      do
      {
        v3 = (int)&v1->m_pkBlendInterps[v2];
        fHi = -3.4028235e38;
        fLo = 3.4028235e38;
        (*(void (__stdcall **)(_DWORD, _DWORD))(*(_DWORD *)v3 + 112))(&fLo, &fHi);
        if ( v1->m_fLoKeyTime > (double)fLo )
          v1->m_fLoKeyTime = fLo;
        if ( v1->m_fHiKeyTime < (double)fHi )
          v1->m_fHiKeyTime = fHi;
        ++v2;
      }
      while ( v2 < v1->m_usNumInterps );
    }
    if ( 3.4028235e38 == v1->m_fLoKeyTime && -3.4028235e38 == v1->m_fHiKeyTime )
      NiInterpController::ResetTimeExtrema((NiInterpController *)&v1->vfptr);
  }
}

//----- (007ED240) --------------------------------------------------------
void __thiscall NiMultiTargetTransformController::AllocateStorage(NiMultiTargetTransformController *this, unsigned __int16 usCount)
{
  unsigned __int16 v2; // si@1
  NiMultiTargetTransformController *v3; // ebx@1
  int v4; // edi@2
  int v5; // ecx@2
  char *v6; // eax@2
  int v7; // eax@3
  int v8; // ebx@3
  NiBlendTransformInterpolator *v9; // esi@3
  int v10; // esi@9
  char *v11; // eax@11
  NiMultiTargetTransformController *v12; // [sp+8h] [bp-8h]@1
  int v13; // [sp+Ch] [bp-4h]@3
  int usCounta; // [sp+18h] [bp+8h]@9

  v2 = usCount;
  v3 = this;
  v12 = this;
  this->m_usNumInterps = usCount;
  if ( usCount )
  {
    v4 = usCount;
    v5 = 48 * usCount | -(48 * (unsigned __int64)usCount >> 32 != 0);
    v6 = (char *)operator new((v5 + 4) | -__CFADD__(v5, 4));
    if ( v6 )
    {
      v7 = (int)(v6 + 4);
      *(_DWORD *)(v7 - 4) = usCount;
      v8 = usCount - 1;
      v13 = v7;
      v9 = (NiBlendTransformInterpolator *)v7;
      if ( v8 >= 0 )
      {
        do
        {
          NiBlendTransformInterpolator::NiBlendTransformInterpolator(v9);
          ++v9;
          --v8;
        }
        while ( v8 >= 0 );
        v7 = v13;
      }
      v3 = v12;
      v2 = usCount;
    }
    else
    {
      v7 = 0;
    }
    v3->m_pkBlendInterps = (NiBlendTransformInterpolator *)v7;
    if ( v2 > 0u )
    {
      v10 = 0;
      usCounta = usCount;
      do
      {
        InterlockedIncrement((volatile LONG *)&v3->m_pkBlendInterps[v10].m_uiRefCount);
        ++v10;
        --usCounta;
      }
      while ( usCounta );
    }
    v11 = (char *)operator new(4 * v4);
    v3->m_ppkTargets = (NiAVObject **)v11;
    memset(v11, 0, 4 * v4);
  }
}

//----- (007ED320) --------------------------------------------------------
float *__thiscall NiBlendTransformInterpolator::`vector deleting destructor'(NiBlendTransformInterpolator *this, unsigned int a2)
{
  NiBlendTransformInterpolator *v2; // ebx@1
  float *result; // eax@2
  float v4; // edi@2
  NiBlendTransformInterpolator *v5; // esi@2
  int v6; // edi@2
  char *v7; // [sp+4h] [bp-4h]@2

  v2 = this;
  if ( a2 & 2 )
  {
    result = &this[-1].m_fHighEaseSpinner;
    v4 = this[-1].m_fHighEaseSpinner;
    v5 = &this[LODWORD(v4)];
    v6 = LODWORD(v4) - 1;
    v7 = (char *)&this[-1].m_fHighEaseSpinner;
    if ( v6 >= 0 )
    {
      do
      {
        --v5;
        NiBlendInterpolator::~NiBlendInterpolator((NiBlendInterpolator *)&v5->vfptr);
        --v6;
      }
      while ( v6 >= 0 );
      result = (float *)v7;
    }
    if ( a2 & 1 )
    {
      operator delete(result);
      result = (float *)v7;
    }
  }
  else
  {
    NiBlendInterpolator::~NiBlendInterpolator((NiBlendInterpolator *)&this->vfptr);
    if ( a2 & 1 )
      operator delete(v2);
    result = (float *)v2;
  }
  return result;
}

//----- (007ED390) --------------------------------------------------------
void __thiscall NiMultiTargetTransformController::CreatePoseInterpolator(NiMultiTargetTransformController *this, unsigned __int16 usIndex)
{
  NiAVObject *v2; // esi@1
  float v3; // eax@1
  float v4; // ecx@1
  float v5; // edx@1
  NiTransformInterpolator *v6; // eax@1
  NiQuatTransform v7; // [sp-20h] [bp-58h]@2
  NiQuatTransform kTransform; // [sp+8h] [bp-30h]@1
  NiQuaternion kRotate; // [sp+28h] [bp-10h]@1

  v2 = this->m_ppkTargets[usIndex];
  NiQuaternion::FromRotation(&kRotate, &v2->m_kLocal.m_Rotate);
  v3 = v2->m_kLocal.m_Translate.x;
  v4 = v2->m_kLocal.m_Translate.y;
  v5 = v2->m_kLocal.m_Translate.z;
  kTransform.m_fScale = v2->m_kLocal.m_fScale;
  kTransform.m_kTranslate.x = v3;
  kTransform.m_kTranslate.y = v4;
  kTransform.m_kTranslate.z = v5;
  kTransform.m_kRotate = kRotate;
  v6 = (NiTransformInterpolator *)operator new(0x3Cu);
  if ( v6 )
  {
    qmemcpy(&v7, &kTransform, sizeof(v7));
    NiTransformInterpolator::NiTransformInterpolator(v6, v7);
  }
}

//----- (007ED420) --------------------------------------------------------
void __thiscall NiMultiTargetTransformController::CopyMembers(NiMultiTargetTransformController *this, NiMultiTargetTransformController *pkDest, NiCloningProcess *kCloning)
{
  NiMultiTargetTransformController *v3; // edi@1
  unsigned __int16 i; // si@1

  v3 = this;
  NiInterpController::CopyMembers((NiInterpController *)&this->vfptr, (NiInterpController *)&pkDest->vfptr, kCloning);
  NiMultiTargetTransformController::AllocateStorage(pkDest, v3->m_usNumInterps);
  for ( i = 0; i < v3->m_usNumInterps; ++i )
    NiBlendTransformInterpolator::CreateCloneInPlace(&v3->m_pkBlendInterps[i], &pkDest->m_pkBlendInterps[i], kCloning);
}

//----- (007ED480) --------------------------------------------------------
void __thiscall NiMultiTargetTransformController::ProcessClone(NiMultiTargetTransformController *this, NiCloningProcess *kCloning)
{
  NiCloningProcess *v2; // edi@1
  NiMultiTargetTransformController *v3; // esi@1
  int v4; // eax@1
  int v5; // ebx@4
  NiAVObject **v6; // ecx@4
  NiTPointerMap<NiObject *,NiObject *> *v7; // esi@5
  NiTMapItem<NiObject *,NiObject *> *v8; // edi@5
  NiMultiTargetTransformController *pkDest; // [sp+8h] [bp-10h]@1
  NiAVObject *v10; // [sp+Ch] [bp-Ch]@5
  NiMultiTargetTransformController *us; // [sp+10h] [bp-8h]@1
  NiMultiTargetTransformController *v12; // [sp+14h] [bp-4h]@1

  v2 = kCloning;
  v3 = this;
  v12 = this;
  NiTimeController::ProcessClone((NiTimeController *)&this->vfptr, kCloning);
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
    (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)kCloning->m_pkCloneMap,
    (unsigned int)v3,
    (NiVBSet **)&us);
  LOWORD(v4) = 0;
  pkDest = us;
  us = 0;
  if ( v3->m_usNumInterps > 0u )
  {
    while ( 1 )
    {
      v5 = (unsigned __int16)v4;
      v3->m_pkBlendInterps[(unsigned __int16)v4].vfptr[10].__vecDelDtor(
        (NiRefObject *)&v3->m_pkBlendInterps[(unsigned __int16)v4],
        (unsigned int)v2);
      v6 = v3->m_ppkTargets;
      if ( v6[v5] )
      {
        v7 = v2->m_pkCloneMap;
        v10 = v6[v5];
        v8 = v7->m_ppkHashTable[v2->m_pkCloneMap->vfptr->KeyToHashIndex(
                                  (NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *> *)v2->m_pkCloneMap,
                                  (NiObject *)v6[v5])];
        if ( v8 )
        {
          while ( !v7->vfptr->IsKeysEqual(
                     (NiTMapBase<NiTPointerAllocator<unsigned int>,NiObject *,NiObject *> *)v7,
                     (NiObject *)v10,
                     v8->m_key) )
          {
            v8 = v8->m_pkNext;
            if ( !v8 )
              goto LABEL_10;
          }
          pkDest->m_ppkTargets[v5] = (NiAVObject *)v8->m_val;
        }
LABEL_10:
        v3 = v12;
      }
      v4 = (int)&us->vfptr + 1;
      us = (NiMultiTargetTransformController *)v4;
      if ( (unsigned __int16)v4 >= v3->m_usNumInterps )
        break;
      v2 = kCloning;
    }
  }
}

//----- (007ED550) --------------------------------------------------------
NiMultiTargetTransformController *__thiscall NiMultiTargetTransformController::CreateClone(NiMultiTargetTransformController *this, NiCloningProcess *kCloning)
{
  NiMultiTargetTransformController *v2; // ebx@1
  NiInterpController *v3; // eax@1
  NiMultiTargetTransformController *v4; // esi@1
  NiMultiTargetTransformController *result; // eax@2

  v2 = this;
  v3 = (NiInterpController *)operator new(0x48u);
  v4 = (NiMultiTargetTransformController *)v3;
  if ( v3 )
  {
    NiInterpController::NiInterpController(v3);
    v4->vfptr = (NiRefObjectVtbl *)&NiMultiTargetTransformController::`vftable';
    v4->m_pkBlendInterps = 0;
    v4->m_ppkTargets = 0;
    v4->m_usNumInterps = 0;
    NiMultiTargetTransformController::CopyMembers(v2, v4, kCloning);
    result = v4;
  }
  else
  {
    NiMultiTargetTransformController::CopyMembers(v2, 0, kCloning);
    result = 0;
  }
  return result;
}
// 9E571C: using guessed type int (__thiscall *NiMultiTargetTransformController::`vftable')(void *p, char);

//----- (007ED5C0) --------------------------------------------------------
NiInterpController *__cdecl NiMultiTargetTransformController::CreateObject()
{
  NiInterpController *v0; // eax@1
  NiInterpController *v1; // esi@1
  NiInterpController *result; // eax@2

  v0 = (NiInterpController *)operator new(0x48u);
  v1 = v0;
  if ( v0 )
  {
    NiInterpController::NiInterpController(v0);
    v1[1].m_uFlags = 0;
    v1->vfptr = (NiRefObjectVtbl *)&NiMultiTargetTransformController::`vftable';
    v1[1].vfptr = 0;
    v1[1].m_uiRefCount = 0;
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E571C: using guessed type int (__thiscall *NiMultiTargetTransformController::`vftable')(void *p, char);

//----- (007ED600) --------------------------------------------------------
void __thiscall NiMultiTargetTransformController::LoadBinary(NiMultiTargetTransformController *this, NiStream *kStream)
{
  NiMultiTargetTransformController *v2; // esi@1
  NiBinaryStream *v3; // eax@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@1
  int v5; // ebx@1
  NiObject *v6; // eax@2
  int v7; // edx@2
  int v8; // [sp+Ch] [bp-4h]@1

  v2 = this;
  NiInterpController::LoadBinary((NiInterpController *)&this->vfptr, kStream);
  v3 = kStream->m_pkIstr;
  v4 = v3->m_pfnRead;
  v8 = 2;
  v4(v3, &v2->m_usNumInterps, 2u, (unsigned int *)&v8, 1u);
  NiMultiTargetTransformController::AllocateStorage(v2, v2->m_usNumInterps);
  v5 = 0;
  if ( v2->m_usNumInterps > 0u )
  {
    do
    {
      v6 = NiStream::ResolveLinkID(kStream);
      v7 = (unsigned __int16)v5++;
      v2->m_ppkTargets[v7] = (NiAVObject *)v6;
    }
    while ( (unsigned __int16)v5 < v2->m_usNumInterps );
  }
}

//----- (007ED670) --------------------------------------------------------
void __thiscall NiMultiTargetTransformController::SaveBinary(NiMultiTargetTransformController *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiMultiTargetTransformController *v3; // ebx@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST00_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  int v7; // esi@1

  v2 = kStream;
  v3 = this;
  NiKeyframeManager::SaveBinary((NiPSysUpdateCtlr *)this, kStream);
  v4 = v2->m_pkOstr;
  v5 = v4;
  v6 = v4->m_pfnWrite;
  kStream = (NiStream *)2;
  v6(v5, &v3->m_usNumInterps, 2u, (unsigned int *)&kStream, 1u);
  v7 = 0;
  if ( v3->m_usNumInterps > 0u )
  {
    do
      v2->vfptr->SaveLinkID(v2, (NiObject *)v3->m_ppkTargets[(unsigned __int16)v7++]);
    while ( (unsigned __int16)v7 < v3->m_usNumInterps );
  }
}

//----- (007ED6E0) --------------------------------------------------------
void __thiscall NiMultiTargetTransformController::GetViewerStrings(NiMultiTargetTransformController *this, NiTArray<char *> *pkStrings)
{
  NiMultiTargetTransformController *v2; // ebx@1
  char *v3; // eax@1
  unsigned int v4; // edi@1
  char *v5; // eax@3
  unsigned int v6; // edi@3
  int v7; // eax@5
  int v8; // edi@6
  char *v9; // eax@7
  unsigned int v10; // edi@7
  char *v11; // ebx@7
  NiMultiTargetTransformController *v12; // [sp+Ch] [bp-40Ch]@1
  char *us; // [sp+10h] [bp-408h]@1
  char acMsg[1024]; // [sp+14h] [bp-404h]@7

  v2 = this;
  v12 = this;
  NiInterpController::GetViewerStrings((NiInterpController *)&this->vfptr, pkStrings);
  v3 = NiGetViewerString(NiMultiTargetTransformController::m_RTTI.m_pcName);
  v4 = pkStrings->m_uiSize;
  us = v3;
  if ( v4 >= pkStrings->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(
      (NiTArray<NiVBBlock *> *)pkStrings,
      v4 + pkStrings->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)pkStrings, v4, (NiVBChip *const *)&us);
  v5 = NiGetViewerString("m_usNumInterps", v2->m_usNumInterps);
  v6 = pkStrings->m_uiSize;
  us = v5;
  if ( v6 >= pkStrings->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(
      (NiTArray<NiVBBlock *> *)pkStrings,
      v6 + pkStrings->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)pkStrings, v6, (NiVBChip *const *)&us);
  LOWORD(v7) = 0;
  us = 0;
  if ( v2->m_usNumInterps > 0u )
  {
    do
    {
      v8 = (unsigned __int16)v7;
      if ( v2->m_ppkTargets[(unsigned __int16)v7] )
      {
        NiSprintf(acMsg, 0x400u, "Target%d", (unsigned __int16)v7);
        v9 = NiGetViewerString(acMsg, v2->m_ppkTargets[v8]);
        v10 = pkStrings->m_uiSize;
        v11 = v9;
        if ( v10 < pkStrings->m_uiMaxSize
          || (NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(
                (NiTArray<NiVBBlock *> *)pkStrings,
                v10 + pkStrings->m_uiGrowBy),
              v10 < pkStrings->m_uiMaxSize) )
        {
          if ( v10 < pkStrings->m_uiSize )
          {
            if ( v11 )
            {
              if ( !pkStrings->m_pBase[v10] )
                ++pkStrings->m_uiESize;
            }
            else if ( pkStrings->m_pBase[v10] )
            {
              --pkStrings->m_uiESize;
            }
          }
          else
          {
            pkStrings->m_uiSize = v10 + 1;
            if ( v11 )
              ++pkStrings->m_uiESize;
          }
          pkStrings->m_pBase[v10] = v11;
        }
        v2 = v12;
      }
      v7 = (int)(us + 1);
      us = (char *)v7;
    }
    while ( (unsigned __int16)v7 < v2->m_usNumInterps );
  }
}

//----- (007ED860) --------------------------------------------------------
unsigned int __thiscall NiD3DXEffectStateManager::GetLastTextureStage(NiD3DShaderProgramCreatorAsm *this)
{
  return this->m_uiShaderCreationFlags;
}

//----- (007ED870) --------------------------------------------------------
double __thiscall NiMorphData::MorphTarget::GetWeight(NiMorphData::MorphTarget *this)
{
  return this->m_fWeight;
}

//----- (007ED880) --------------------------------------------------------
NiObject *__cdecl NiMorphData::CreateObject()
{
  NiObject *v0; // eax@1
  NiObject *v1; // esi@1
  NiObject *result; // eax@2

  v0 = (NiObject *)operator new(0x18u);
  v1 = v0;
  if ( v0 )
  {
    NiObject::NiObject(v0);
    v1[1].vfptr = 0;
    v1[1].m_uiRefCount = 0;
    v1[2].vfptr = 0;
    LOBYTE(v1[2].m_uiRefCount) = 0;
    v1->vfptr = (NiRefObjectVtbl *)&NiMorphData::`vftable';
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E66B4: using guessed type int (__thiscall *NiMorphData::`vftable')(void *p, char);

//----- (007ED8C0) --------------------------------------------------------
int __thiscall NiMorphData::RegisterStreamables(NiPSysModifier *this, NiStream *kStream)
{
  return NiObject::RegisterStreamables((NiObject *)&this->vfptr, kStream);
}

//----- (007ED8D0) --------------------------------------------------------
NiRTTI *NiMorphData::GetRTTI()
{
  return &NiMorphData::m_RTTI;
}

//----- (007ED8E0) --------------------------------------------------------
void *__thiscall NiMorphData::MorphTarget::`vector deleting destructor'(NiMorphData::MorphTarget *this, unsigned int a2)
{
  NiMorphData::MorphTarget *v2; // esi@1
  char *v3; // ecx@2
  int v4; // ebx@2
  NiInterpolator **v5; // edi@3
  void *v6; // eax@4
  NiInterpolator *v7; // esi@4
  void *result; // eax@12
  NiInterpolator *v9; // edi@13
  int v10; // [sp+8h] [bp-4h]@2

  v2 = this;
  if ( a2 & 2 )
  {
    v3 = (char *)&this[-1].m_spLegacyInterpolator;
    v4 = (int)&v2[-1].m_spLegacyInterpolator.m_pObject[-1].m_fLastTime + 3;
    v10 = (int)&v2[-1].m_spLegacyInterpolator;
    if ( v4 >= 0 )
    {
      v5 = &v2[(unsigned int)v2[-1].m_spLegacyInterpolator.m_pObject].m_spLegacyInterpolator.m_pObject;
      do
      {
        v6 = *(v5 - 7);
        v5 -= 4;
        operator delete(v6);
        operator delete(*(v5 - 2));
        v7 = *v5;
        if ( *v5 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
        --v4;
      }
      while ( v4 >= 0 );
      v3 = (char *)v10;
    }
    if ( a2 & 1 )
    {
      operator delete(v3);
      v3 = (char *)v10;
    }
    result = v3;
  }
  else
  {
    operator delete(this->m_aTargetVerts);
    operator delete(v2->m_pcName);
    v9 = v2->m_spLegacyInterpolator.m_pObject;
    if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
      v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
    if ( a2 & 1 )
      operator delete(v2);
    result = v2;
  }
  return result;
}

//----- (007ED9B0) --------------------------------------------------------
void __thiscall NiFloatInterpolator::ReplaceKeys(NiFloatInterpolator *this, NiFloatKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType)
{
  NiFloatInterpolator *v4; // ebx@1
  NiObject *v5; // eax@3
  NiObject *v6; // esi@3
  NiFloatData *v7; // edi@6
  NiFloatData *v8; // ebx@14

  v4 = this;
  if ( uiNumKeys )
  {
    if ( !this->m_spFloatData.m_pObject )
    {
      v5 = (NiObject *)operator new(0x18u);
      v6 = v5;
      if ( v5 )
      {
        NiObject::NiObject(v5);
        v6->vfptr = (NiRefObjectVtbl *)&NiFloatData::`vftable';
        v6[1].vfptr = 0;
        v6[1].m_uiRefCount = 0;
        v6[2].vfptr = 0;
        LOBYTE(v6[2].m_uiRefCount) = 0;
      }
      else
      {
        v6 = 0;
      }
      v7 = v4->m_spFloatData.m_pObject;
      if ( (NiObject *)v7 != v6 )
      {
        if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
          v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
        v4->m_spFloatData.m_pObject = (NiFloatData *)v6;
        if ( v6 )
          InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
      }
    }
    NiFloatData::ReplaceAnim(v4->m_spFloatData.m_pObject, pkKeys, uiNumKeys, eType);
    v4->m_uiLastIdx = 0;
  }
  else
  {
    v8 = this->m_spFloatData.m_pObject;
    if ( v8 )
      NiFloatData::ReplaceAnim(v8, 0, 0, 0);
  }
}
// 9E5F84: using guessed type int (__thiscall *NiFloatData::`vftable')(void *p, char);

//----- (007EDA70) --------------------------------------------------------
bool __thiscall NiMorphData::MorphTarget::IsEqual(NiMorphData::MorphTarget *this, NiMorphData::MorphTarget *pkOther, unsigned int uiNumVerts)
{
  unsigned int v3; // esi@1
  NiPoint3 *v4; // edx@2
  signed int v5; // edi@2
  char *v6; // eax@7

  v3 = 0;
  if ( uiNumVerts )
  {
    v4 = this->m_aTargetVerts;
    v5 = (char *)pkOther->m_aTargetVerts - (char *)this->m_aTargetVerts;
    while ( *(float *)((char *)&v4->x + v5) == v4->x
         && *(float *)((char *)&v4->y + v5) == v4->y
         && *(float *)((char *)&v4->z + v5) == v4->z )
    {
      ++v3;
      ++v4;
      if ( v3 >= uiNumVerts )
        goto LABEL_7;
    }
    return 0;
  }
LABEL_7:
  v6 = this->m_pcName;
  if ( v6 )
  {
    if ( pkOther->m_pcName )
      return NiStricmp(v6, pkOther->m_pcName) == 0;
  }
  else if ( !pkOther->m_pcName )
  {
    return NiStricmp(v6, pkOther->m_pcName) == 0;
  }
  return 0;
}

//----- (007EDB30) --------------------------------------------------------
char __thiscall NiMorphData::IsEqual(NiMorphData *this, NiObject *pObject)
{
  NiMorphData *v2; // edi@1
  char result; // al@2
  NiRefObjectVtbl *v4; // eax@3
  NiRefObjectVtbl *v5; // esi@6
  unsigned int v6; // ebx@7
  NiMorphData::MorphTarget *v7; // edx@9
  NiMorphData::MorphTarget *v8; // ecx@12

  v2 = this;
  if ( NiObject::IsEqual((NiObject *)&this->vfptr, pObject)
    && (v4 = (NiRefObjectVtbl *)v2->m_uiNumTargets, v4 == pObject[1].vfptr)
    && v2->m_uiNumVertsPerTarget == pObject[1].m_uiRefCount
    && v2->m_bRelativeTargets == LOBYTE(pObject[2].m_uiRefCount) )
  {
    v5 = 0;
    if ( v4 )
    {
      v6 = 0;
      while ( 1 )
      {
        v7 = (NiMorphData::MorphTarget *)(v5 >= pObject[1].vfptr ? 0 : &pObject[2].vfptr[v6 / 4]);
        v8 = v5 >= v4 ? 0 : &v2->m_aMorphTargets[v6 / 0x10];
        if ( !NiMorphData::MorphTarget::IsEqual(v8, v7, v2->m_uiNumVertsPerTarget) )
          break;
        v4 = (NiRefObjectVtbl *)v2->m_uiNumTargets;
        v5 = (NiRefObjectVtbl *)((char *)v5 + 1);
        v6 += 16;
        if ( v5 >= v4 )
          goto LABEL_16;
      }
      result = 0;
    }
    else
    {
LABEL_16:
      result = 1;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007EDBC0) --------------------------------------------------------
void __thiscall NiMorphData::MorphTarget::LoadBinary(NiMorphData::MorphTarget *this, NiStream *kStream, unsigned int uiNumVerts)
{
  NiStream *v3; // ebx@1
  NiMorphData::MorphTarget *v4; // edi@1
  NiBinaryStream *v5; // eax@2
  NiBinaryStream *v6; // ST04_4@2
  unsigned int (__cdecl *v7)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@2
  unsigned int v8; // esi@3
  NiPoint3 *v9; // eax@3
  NiPoint3 *v10; // ST04_4@3
  unsigned int (__cdecl *v11)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@3
  NiBinaryStream *v12; // ST00_4@3

  v3 = kStream;
  v4 = this;
  NiStream::LoadCString(kStream, &this->m_pcName);
  if ( v3->m_uiNifFileVersion >= 0xA010068 )
  {
    v5 = v3->m_pkIstr;
    v6 = v5;
    v7 = v5->m_pfnRead;
    kStream = (NiStream *)4;
    v7(v6, &v4->m_fWeight, 4u, (unsigned int *)&kStream, 1u);
  }
  v8 = uiNumVerts;
  v9 = (NiPoint3 *)operator new(12 * uiNumVerts);
  v4->m_aTargetVerts = v9;
  v10 = v9;
  v11 = v3->m_pkIstr->m_pfnRead;
  v12 = v3->m_pkIstr;
  kStream = (NiStream *)4;
  v11(v12, v10, 12 * v8, (unsigned int *)&kStream, 1u);
}

//----- (007EDC50) --------------------------------------------------------
CPostProcessEffect *__thiscall NiMorphData::`vector deleting destructor'(NiMorphData *this, unsigned int a2)
{
  CPostProcessEffect *v2; // esi@1
  NiMorphData::MorphTarget *v3; // ecx@1

  v2 = (CPostProcessEffect *)this;
  v3 = this->m_aMorphTargets;
  v2->vfptr = (NiRefObjectVtbl *)&NiMorphData::`vftable';
  if ( v3 )
    NiMorphData::MorphTarget::`vector deleting destructor'(v3, 3u);
  NiRefObject::~NiRefObject(v2);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E66B4: using guessed type int (__thiscall *NiMorphData::`vftable')(void *p, char);

//----- (007EDC90) --------------------------------------------------------
void __thiscall NiMorphData::LoadBinary(NiMorphData *this, NiStream *stream)
{
  NiMorphData *v2; // esi@1
  unsigned int (__cdecl *v3)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@1
  unsigned int *v4; // edi@1
  NiBinaryStream *v5; // ST2C_4@1
  NiBinaryStream *v6; // eax@1
  NiBinaryStream *v7; // ST18_4@1
  unsigned int (__cdecl *v8)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v9; // eax@1
  NiBinaryStream *v10; // ST04_4@1
  unsigned int (__cdecl *v11)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  unsigned int v12; // esi@1
  int v13; // ecx@1
  unsigned int *v14; // eax@1
  NiFloatInterpolator *v15; // edi@1
  int v16; // ecx@2
  int v17; // edx@2
  int i; // eax@2
  NiMorphData::MorphTarget *v19; // eax@4
  int v20; // esi@6
  NiBinaryStream *v21; // eax@9
  NiBinaryStream *v22; // ST2C_4@9
  unsigned int (__cdecl *v23)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@9
  NiBinaryStream *v24; // eax@9
  NiBinaryStream *v25; // ST18_4@9
  unsigned int (__cdecl *v26)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@9
  NiAnimationKey::KeyType v27; // esi@10
  char ucSize; // ST4C_1@10
  NiFloatInterpolator *v29; // eax@10
  NiFloatInterpolator *v30; // eax@11
  NiMorphData::MorphTarget *v31; // ecx@12
  NiFloatInterpolator *v32; // esi@12
  int v33; // esi@20
  unsigned int v34; // kr00_4@20
  char *v35; // eax@20
  NiFloatKey *v36; // eax@20
  NiMorphData *v37; // edi@20
  unsigned int v38; // esi@20
  void **v39; // esi@23
  NiFloatKey *v40; // [sp+10h] [bp-124h]@20
  NiAnimationKey::KeyType eType; // [sp+14h] [bp-120h]@9
  unsigned int uiNumKeys; // [sp+18h] [bp-11Ch]@9
  unsigned int v43; // [sp+1Ch] [bp-118h]@7
  NiMorphData *v44; // [sp+20h] [bp-114h]@1
  char bRelativeTargets; // [sp+27h] [bp-10Dh]@1
  unsigned int uiI; // [sp+28h] [bp-10Ch]@1
  NiFloatKey *pkMorphKeys; // [sp+2Ch] [bp-108h]@9
  char acString[256]; // [sp+30h] [bp-104h]@20

  v2 = this;
  v44 = this;
  NiObject::LoadBinary((NiObject *)&this->vfptr, stream);
  v3 = stream->m_pkIstr->m_pfnRead;
  v4 = &v2->m_uiNumTargets;
  v5 = stream->m_pkIstr;
  uiI = 4;
  v3(v5, &v2->m_uiNumTargets, 4u, &uiI, 1u);
  v6 = stream->m_pkIstr;
  v7 = v6;
  v8 = v6->m_pfnRead;
  uiI = 4;
  v8(v7, &v2->m_uiNumVertsPerTarget, 4u, &uiI, 1u);
  v9 = stream->m_pkIstr;
  v10 = v9;
  v11 = v9->m_pfnRead;
  uiI = 1;
  v11(v10, &bRelativeTargets, 1u, &uiI, 1u);
  v2->m_bRelativeTargets = bRelativeTargets == 1;
  v12 = *v4;
  v13 = 16 * *v4 | -((unsigned __int64)*v4 >> 28 != 0);
  v14 = (unsigned int *)operator new((v13 + 4) | -__CFADD__(v13, 4));
  v15 = 0;
  if ( v14 )
  {
    v16 = v12 - 1;
    v17 = (int)(v14 + 1);
    *v14 = v12;
    for ( i = (int)(v14 + 1); v16 >= 0; --v16 )
    {
      *(_DWORD *)(i + 12) = 0;
      *(float *)(i + 8) = 0.0;
      *(_DWORD *)i = 0;
      *(_DWORD *)(i + 4) = 0;
      i += 16;
    }
    v19 = (NiMorphData::MorphTarget *)v17;
  }
  else
  {
    v19 = 0;
  }
  v20 = (int)v44;
  v44->m_aMorphTargets = v19;
  uiI = 0;
  if ( *(_DWORD *)(v20 + 8) > 0u )
  {
    v43 = 0;
    do
    {
      if ( stream->m_uiNifFileVersion >= 0xA010068 )
      {
        NiMorphData::MorphTarget::LoadBinary(
          (NiMorphData::MorphTarget *)(v43 + *(_DWORD *)(v20 + 16)),
          stream,
          *(_DWORD *)(v20 + 12));
      }
      else
      {
        v21 = stream->m_pkIstr;
        v22 = v21;
        v23 = v21->m_pfnRead;
        pkMorphKeys = (NiFloatKey *)4;
        v23(v22, &uiNumKeys, 4u, (unsigned int *)&pkMorphKeys, 1u);
        v24 = stream->m_pkIstr;
        v25 = v24;
        v26 = v24->m_pfnRead;
        pkMorphKeys = (NiFloatKey *)4;
        v26(v25, &eType, 4u, (unsigned int *)&pkMorphKeys, 1u);
        if ( uiNumKeys > 0 )
        {
          v27 = eType;
          ucSize = (char)(&NiAnimationKey::ms_keysizes)[eType];
          pkMorphKeys = (NiFloatKey *)((int (__cdecl *)(NiStream *, unsigned int))(&NiAnimationKey::ms_loaders)[eType])(
                                        stream,
                                        uiNumKeys);
          ((void (__cdecl *)(NiFloatKey *, unsigned int))(&NiAnimationKey::ms_fillderived)[v27])(pkMorphKeys, uiNumKeys);
          v29 = (NiFloatInterpolator *)operator new(0x18u);
          if ( v29 )
          {
            NiFloatInterpolator::NiFloatInterpolator(v29, 0);
            v15 = v30;
          }
          NiFloatInterpolator::ReplaceKeys(v15, pkMorphKeys, uiNumKeys, v27);
          v31 = v44->m_aMorphTargets;
          v32 = (NiFloatInterpolator *)v31[v43 / 0x10].m_spLegacyInterpolator.m_pObject;
          pkMorphKeys = (NiFloatKey *)&v31[v43 / 0x10].m_spLegacyInterpolator;
          if ( v32 != v15 )
          {
            if ( v32 && !InterlockedDecrement((volatile LONG *)&v32->m_uiRefCount) && v32 )
              v32->vfptr->__vecDelDtor((NiRefObject *)v32, 1u);
            LODWORD(pkMorphKeys->m_fTime) = v15;
            if ( v15 )
              InterlockedIncrement((volatile LONG *)&v15->m_uiRefCount);
          }
          ((void (__thiscall *)(NiFloatInterpolator *))v15->vfptr[27].__vecDelDtor)(v15);
          v20 = (int)v44;
        }
        NiSprintf(acString, 0x100u, "MT %d", uiI);
        v33 = v43 + *(_DWORD *)(v20 + 16);
        operator delete(*(void **)(v33 + 4));
        v34 = strlen(acString);
        v35 = (char *)operator new(v34 + 1);
        *(_DWORD *)(v33 + 4) = v35;
        strcpy_s(v35, v34 + 1, acString);
        v36 = (NiFloatKey *)operator new(12 * v44->m_uiNumVertsPerTarget);
        v37 = v44;
        v38 = 0;
        v40 = v36;
        if ( v44->m_uiNumVertsPerTarget )
        {
          pkMorphKeys = v36;
          do
          {
            NiPoint3::LoadBinary((NiPoint3 *)pkMorphKeys, stream);
            pkMorphKeys = (NiFloatKey *)((char *)pkMorphKeys + 12);
            ++v38;
          }
          while ( v38 < v37->m_uiNumVertsPerTarget );
        }
        v39 = (void **)&v37->m_aMorphTargets[v43 / 0x10].m_aTargetVerts;
        operator delete(*v39);
        *v39 = v40;
        v20 = (int)v44;
        v15 = 0;
      }
      v43 += 16;
      ++uiI;
    }
    while ( uiI < *(_DWORD *)(v20 + 8) );
  }
}
// B61900: using guessed type unsigned __int8 *NiAnimationKey::ms_keysizes;
// B61928: using guessed type void (__cdecl static **NiAnimationKey::ms_fillderived)(struct NiAnimationKey *, unsigned int, unsigned __int8);
// B61F58: using guessed type struct NiAnimationKey *(__cdecl static **NiAnimationKey::ms_loaders)(struct NiStream *, unsigned int);

//----- (007EE020) --------------------------------------------------------
void __thiscall NiMorphData::SaveBinary(NiMorphData *this, NiStream *stream)
{
  NiStream *v2; // edi@1
  NiMorphData *v3; // esi@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@1
  NiBinaryStream *v5; // ST28_4@1
  NiBinaryStream *v6; // eax@1
  NiBinaryStream *v7; // ST14_4@1
  unsigned int (__cdecl *v8)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v9; // eax@1
  unsigned int (__cdecl *v10)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@1
  unsigned int v11; // ebx@4
  int v12; // esi@4
  NiBinaryStream *v13; // eax@4
  NiBinaryStream *v14; // ST28_4@4
  unsigned int (__cdecl *v15)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@4
  unsigned int (__cdecl *v16)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@5
  const void *v17; // ST2C_4@5
  NiBinaryStream *v18; // ST28_4@5
  int v19; // [sp+Ch] [bp-10h]@4
  NiMorphData *v20; // [sp+10h] [bp-Ch]@1
  unsigned int uiI; // [sp+14h] [bp-8h]@1
  unsigned int v22; // [sp+18h] [bp-4h]@2

  v2 = stream;
  v3 = this;
  v20 = this;
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue(
    (NiVBDynamicSet *)this,
    (IDirect3DVertexBuffer9 *)stream);
  v4 = v2->m_pkOstr->m_pfnWrite;
  v5 = v2->m_pkOstr;
  uiI = 4;
  v4(v5, &v3->m_uiNumTargets, 4u, &uiI, 1u);
  v6 = v2->m_pkOstr;
  v7 = v6;
  v8 = v6->m_pfnWrite;
  uiI = 4;
  v8(v7, &v3->m_uiNumVertsPerTarget, 4u, &uiI, 1u);
  v9 = v2->m_pkOstr;
  BYTE3(stream) = v3->m_bRelativeTargets;
  v10 = v9->m_pfnWrite;
  uiI = 1;
  v10(v9, (char *)&stream + 3, 1u, &uiI, 1u);
  uiI = 0;
  if ( v3->m_uiNumTargets )
  {
    v22 = 0;
    while ( 1 )
    {
      v11 = v3->m_uiNumVertsPerTarget;
      v12 = (int)&v3->m_aMorphTargets[v22 / 0x10];
      NiStream::SaveCString(v2, *(const char **)(v12 + 4));
      v13 = v2->m_pkOstr;
      v14 = v13;
      v15 = v13->m_pfnWrite;
      v19 = 4;
      v15(v14, (const void *)(v12 + 8), 4u, (unsigned int *)&v19, 1u);
      if ( v11 )
      {
        v16 = v2->m_pkOstr->m_pfnWrite;
        v17 = *(const void **)v12;
        v18 = v2->m_pkOstr;
        v19 = 4;
        v16(v18, v17, 12 * v11, (unsigned int *)&v19, 1u);
      }
      v22 += 16;
      if ( ++uiI >= v20->m_uiNumTargets )
        break;
      v3 = v20;
    }
  }
}

//----- (007EE130) --------------------------------------------------------
void __thiscall NiMorphData::GetViewerStrings(NiMorphData *this, NiTArray<char *> *pStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiMorphData *v3; // ebx@1
  NiTArray<char *> *v4; // eax@1
  unsigned int v5; // edi@1
  NiTArray<char *> *v6; // eax@3
  unsigned int v7; // edi@3
  NiTArray<char *> *v8; // eax@5
  unsigned int v9; // edi@5
  NiTArray<char *> *v10; // eax@7
  unsigned int v11; // edi@7
  unsigned int v12; // eax@9
  int v13; // eax@13
  char *v14; // eax@15
  unsigned int v15; // edi@15
  char *v16; // ebx@15
  NiMorphData *v17; // [sp+Ch] [bp-8h]@1
  int v18; // [sp+10h] [bp-4h]@10

  v2 = (NiTArray<NiVBBlock *> *)pStrings;
  v3 = this;
  v17 = this;
  NiObject::GetViewerStrings((NiObject *)&this->vfptr, pStrings);
  v4 = (NiTArray<char *> *)NiGetViewerString(NiMorphData::m_RTTI.m_pcName);
  v5 = v2->m_uiSize;
  pStrings = v4;
  if ( v5 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v5 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v5, (NiVBChip *const *)&pStrings);
  v6 = (NiTArray<char *> *)NiGetViewerString("m_uiNumTargets", v3->m_uiNumTargets);
  v7 = v2->m_uiSize;
  pStrings = v6;
  if ( v7 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v7 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v7, (NiVBChip *const *)&pStrings);
  v8 = (NiTArray<char *> *)NiGetViewerString("m_uiNumVertsPerTarget", v3->m_uiNumVertsPerTarget);
  v9 = v2->m_uiSize;
  pStrings = v8;
  if ( v9 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v9 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v9, (NiVBChip *const *)&pStrings);
  v10 = (NiTArray<char *> *)NiGetViewerString("MorphTargets");
  v11 = v2->m_uiSize;
  pStrings = v10;
  if ( v11 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v11 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v11, (NiVBChip *const *)&pStrings);
  v12 = v3->m_uiNumTargets;
  pStrings = 0;
  if ( v12 )
  {
    v18 = 0;
    while ( 1 )
    {
      if ( (unsigned int)pStrings >= v12 )
        v13 = 0;
      else
        v13 = (int)&v3->m_aMorphTargets[v18];
      v14 = NiGetViewerString("m_pcName", *(const char **)(v13 + 4));
      v15 = v2->m_uiSize;
      v16 = v14;
      if ( v15 < v2->m_uiMaxSize
        || (NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v15 + v2->m_uiGrowBy), v15 < v2->m_uiMaxSize) )
      {
        if ( v15 < v2->m_uiSize )
        {
          if ( v16 )
          {
            if ( !v2->m_pBase[v15] )
              ++v2->m_uiESize;
          }
          else if ( v2->m_pBase[v15] )
          {
            --v2->m_uiESize;
          }
        }
        else
        {
          v2->m_uiSize = v15 + 1;
          if ( v16 )
            ++v2->m_uiESize;
        }
        v2->m_pBase[v15] = (NiVBBlock *)v16;
      }
      v12 = v17->m_uiNumTargets;
      ++v18;
      pStrings = (NiTArray<char *> *)((char *)pStrings + 1);
      if ( (unsigned int)pStrings >= v12 )
        break;
      v3 = v17;
    }
  }
}

//----- (007EE2D0) --------------------------------------------------------
char __thiscall NiLookAtInterpolator::ResolveDependencies(NiLookAtInterpolator *this, NiAVObjectPalette *pkPalette)
{
  NiLookAtInterpolator *v2; // esi@1
  int v3; // eax@2

  v2 = this;
  if ( this->m_pkLookAt )
    return 1;
  v3 = ((int (__stdcall *)(_DWORD))pkPalette->vfptr[15].__vecDelDtor)(this->m_pcLookAtName);
  if ( v3 )
  {
    v2->m_pkLookAt = (NiAVObject *)v3;
    return 1;
  }
  return 0;
}

//----- (007EE300) --------------------------------------------------------
void __thiscall NiLookAtInterpolator::Collapse(NiLookAtInterpolator *this)
{
  char *v1; // esi@1
  signed int v2; // edi@1

  v1 = (char *)this->m_aspInterpolators;
  v2 = 3;
  do
  {
    if ( *(_DWORD *)v1 )
      (*(void (**)(void))(**(_DWORD **)v1 + 108))();
    v1 += 4;
    --v2;
  }
  while ( v2 );
}

//----- (007EE330) --------------------------------------------------------
void __thiscall NiLookAtInterpolator::GetActiveTimeRange(NiLookAtInterpolator *this, float *fBeginKeyTime, float *fEndKeyTime)
{
  float *v3; // eax@1
  float *v4; // ebx@1
  char *v5; // esi@1
  signed int v6; // edi@1
  double v7; // st7@5
  float *v8; // ecx@11
  float fEnd; // [sp+Ch] [bp-4h]@3

  v3 = fEndKeyTime;
  v4 = fBeginKeyTime;
  *fBeginKeyTime = 3.4028235e38;
  v5 = (char *)this->m_aspInterpolators;
  *v3 = -3.4028235e38;
  v6 = 3;
  do
  {
    if ( *(_DWORD *)v5 )
    {
      (*(void (__stdcall **)(float **, float *))(**(_DWORD **)v5 + 112))(&fBeginKeyTime, &fEnd);
      if ( fEnd != *(float *)&fBeginKeyTime )
      {
        if ( *v4 <= (double)*(float *)&fBeginKeyTime )
        {
          v7 = fEnd;
        }
        else
        {
          v7 = fEnd;
          *v4 = *(float *)&fBeginKeyTime;
        }
        if ( *fEndKeyTime < v7 )
          *fEndKeyTime = v7;
      }
    }
    v5 += 4;
    --v6;
  }
  while ( v6 );
  if ( 3.4028235e38 == *v4 )
  {
    v8 = fEndKeyTime;
    if ( -3.4028235e38 == *fEndKeyTime )
    {
      *v4 = 0.0;
      *v8 = 0.0;
    }
  }
}

//----- (007EE400) --------------------------------------------------------
void __thiscall NiLookAtInterpolator::GuaranteeTimeRange(NiLookAtInterpolator *this, float fStartTime, float fEndTime)
{
  char *v3; // esi@1
  signed int v4; // edi@1

  v3 = (char *)this->m_aspInterpolators;
  v4 = 3;
  do
  {
    if ( *(_DWORD *)v3 )
      (*(void (__stdcall **)(_DWORD, _DWORD))(**(_DWORD **)v3 + 116))(LODWORD(fStartTime), LODWORD(fEndTime));
    v3 += 4;
    --v4;
  }
  while ( v4 );
}

//----- (007EE440) --------------------------------------------------------
NiLookAtInterpolator *__thiscall NiLookAtInterpolator::GetSequenceInterpolator(NiLookAtInterpolator *this, float fStartTime, float fEndTime)
{
  NiLookAtInterpolator *v3; // esi@1
  NiObject *v4; // eax@1
  int v5; // esi@1
  char *v6; // ebx@1
  int v7; // ecx@3
  int v8; // eax@4
  int v9; // esi@4
  int v10; // edi@4
  NiLookAtInterpolator *pkSeqInterp; // [sp+14h] [bp-Ch]@1
  int v13; // [sp+18h] [bp-8h]@1
  signed int v14; // [sp+1Ch] [bp-4h]@1

  v3 = this;
  v4 = NiInterpolator::GetSequenceInterpolator((NiInterpolator *)&this->vfptr, fStartTime, fEndTime);
  v5 = (char *)v3 - (char *)v4;
  pkSeqInterp = (NiLookAtInterpolator *)v4;
  v6 = (char *)&v4[7];
  v13 = v5;
  v14 = 3;
  while ( 1 )
  {
    v7 = *(_DWORD *)&v6[v5];
    if ( v7 )
    {
      v8 = (*(int (__stdcall **)(_DWORD, _DWORD))(*(_DWORD *)v7 + 120))(LODWORD(fStartTime), LODWORD(fEndTime));
      v9 = *(_DWORD *)v6;
      v10 = v8;
      if ( *(_DWORD *)v6 != v8 )
      {
        if ( v9 && !InterlockedDecrement((volatile LONG *)(v9 + 4)) && v9 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v9)(v9, 1);
        *(_DWORD *)v6 = v10;
        if ( v10 )
          InterlockedIncrement((volatile LONG *)(v10 + 4));
      }
    }
    v6 += 4;
    if ( !--v14 )
      break;
    v5 = v13;
  }
  return pkSeqInterp;
}

//----- (007EE4F0) --------------------------------------------------------
void __thiscall NiLookAtInterpolator::SetLookAtName(NiLookAtInterpolator *this, const char *pcName)
{
  NiLookAtInterpolator *v2; // edi@1
  unsigned int v3; // kr00_4@2
  char *v4; // eax@2

  v2 = this;
  operator delete(this->m_pcLookAtName);
  v2->m_pcLookAtName = 0;
  if ( pcName )
  {
    v3 = strlen(pcName);
    v4 = (char *)operator new(v3 + 1);
    v2->m_pcLookAtName = v4;
    strcpy_s(v4, v3 + 1, pcName);
  }
}

//----- (007EE540) --------------------------------------------------------
char __thiscall NiLookAtInterpolator::SetUpDependencies(NiLookAtInterpolator *this)
{
  NiLookAtInterpolator *v1; // esi@1
  char *v2; // ebx@1
  unsigned int v3; // kr00_4@2
  char *v4; // eax@2
  char result; // al@2

  v1 = this;
  v2 = this->m_pkLookAt->m_pcName;
  if ( v2 )
  {
    operator delete(this->m_pcLookAtName);
    v1->m_pcLookAtName = 0;
    v3 = strlen(v2);
    v4 = (char *)operator new(v3 + 1);
    v1->m_pcLookAtName = v4;
    strcpy_s(v4, v3 + 1, v2);
    v1->m_pkLookAt = 0;
    result = 1;
  }
  else
  {
    operator delete(this->m_pcLookAtName);
    v1->m_pcLookAtName = 0;
    result = 0;
  }
  return result;
}

//----- (007EE5B0) --------------------------------------------------------
void __thiscall NiLookAtInterpolator::ProcessClone(NiLookAtInterpolator *this, NiCloningProcess *kCloning)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> **v2; // edi@1
  NiLookAtInterpolator *v3; // esi@1
  NiCloningProcess *v4; // ebx@1

  v2 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> **)kCloning;
  v3 = this;
  NiObject::ProcessClone((NiObject *)&this->vfptr, kCloning);
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
    *v2,
    (unsigned int)v3,
    (NiVBSet **)&kCloning);
  v4 = kCloning;
  if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
         *v2,
         (unsigned int)v3->m_pkLookAt,
         (NiVBSet **)&kCloning) )
  {
    v4[1].m_pkCloneMap = (NiTPointerMap<NiObject *,NiObject *> *)kCloning;
  }
  else
  {
    v4[1].m_pkCloneMap = (NiTPointerMap<NiObject *,NiObject *> *)v3->m_pkLookAt;
  }
}

//----- (007EE600) --------------------------------------------------------
char __thiscall NiLookAtInterpolator::RegisterStreamables(NiLookAtInterpolator *this, NiStream *kStream)
{
  NiLookAtInterpolator *v2; // edi@1
  char result; // al@1
  unsigned int v4; // esi@2
  int v5; // edi@2

  v2 = this;
  result = NiMorphData::RegisterStreamables((NiPSysModifier *)this, kStream);
  if ( result )
  {
    v4 = 0;
    v5 = (int)v2->m_aspInterpolators;
    while ( !*(_DWORD *)v5 || (unsigned __int8)(*(int (__stdcall **)(_DWORD))(**(_DWORD **)v5 + 20))(kStream) )
    {
      ++v4;
      v5 += 4;
      if ( v4 >= 3 )
        return 1;
    }
    result = 0;
  }
  return result;
}

//----- (007EE650) --------------------------------------------------------
char __thiscall NiLookAtInterpolator::IsEqual(NiLookAtInterpolator *this, NiObject *pkObject)
{
  NiObject *v2; // edi@1
  NiLookAtInterpolator *v3; // ebx@1
  NiAVObject *v5; // eax@4
  char *v6; // esi@12
  int v7; // ebx@12
  int v8; // ecx@13
  int v9; // eax@13
  unsigned int ui; // [sp+10h] [bp+8h]@12

  v2 = pkObject;
  v3 = this;
  if ( !NiSequence::IsEqual((NiAccumulator *)this, pkObject) || v3->m_uFlags != LOWORD(pkObject[1].m_uiRefCount) )
    return 0;
  v5 = v3->m_pkLookAt;
  if ( !v5 )
    goto LABEL_22;
  if ( !pkObject[2].vfptr )
    return 0;
  if ( !v5 )
  {
LABEL_22:
    if ( !pkObject[2].vfptr )
    {
      if ( !v5 )
        goto LABEL_11;
      goto LABEL_9;
    }
    return 0;
  }
LABEL_9:
  if ( pkObject[2].vfptr
    && !(unsigned __int8)((int (__stdcall *)(NiRefObjectVtbl *))v3->m_pkLookAt->vfptr[7].__vecDelDtor)(pkObject[2].vfptr) )
  {
    return 0;
  }
LABEL_11:
  if ( !(unsigned __int8)NiQuatTransform::operator==(&v3->m_kTransformValue, (NiQuatTransform *)&pkObject[3]) )
    return 0;
  ui = 0;
  v6 = (char *)&v2[7];
  v7 = (char *)v3 - (char *)v2;
  while ( 1 )
  {
    v8 = *(_DWORD *)&v6[v7];
    v9 = *(_DWORD *)v6;
    if ( v8 )
      break;
    if ( v9 )
      return 0;
LABEL_16:
    v6 += 4;
    if ( ++ui >= 3 )
      return 1;
  }
  if ( v9 && (unsigned __int8)(*(int (__stdcall **)(int))(*(_DWORD *)v8 + 28))(*(_DWORD *)v6) )
    goto LABEL_16;
  return 0;
}

//----- (007EE710) --------------------------------------------------------
void __thiscall NiLookAtInterpolator::NiLookAtInterpolator(NiLookAtInterpolator *this, NiAVObject *pkLookAt, NiLookAtInterpolator::Axis eAxis, bool bFlip)
{
  NiLookAtInterpolator *v4; // esi@1
  NiInterpolator *v5; // edi@4
  NiInterpolator *v6; // edi@9
  NiInterpolator *v7; // edi@14

  v4 = this;
  NiInterpolator::NiInterpolator((NiInterpolator *)&this->vfptr);
  v4->vfptr = (NiRefObjectVtbl *)&NiLookAtInterpolator::`vftable';
  v4->m_pkLookAt = pkLookAt;
  v4->m_uFlags = 0;
  v4->m_pcLookAtName = 0;
  v4->m_kTransformValue.m_kTranslate = NiQuatTransform::INVALID_TRANSLATE;
  v4->m_kTransformValue.m_kRotate = NiQuatTransform::INVALID_ROTATE;
  v4->m_kTransformValue.m_fScale = -3.4028235e38;
  v4->m_aspInterpolators[0].m_pObject = 0;
  v4->m_aspInterpolators[1].m_pObject = 0;
  v4->m_aspInterpolators[2].m_pObject = 0;
  if ( bFlip )
    v4->m_uFlags |= 1u;
  else
    v4->m_uFlags &= 0xFFFEu;
  v4->m_uFlags = 2 * eAxis | v4->m_uFlags & 0xFFF9;
  v5 = v4->m_aspInterpolators[0].m_pObject;
  if ( v5 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) && v5 )
      v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
    v4->m_aspInterpolators[0].m_pObject = 0;
  }
  v6 = v4->m_aspInterpolators[1].m_pObject;
  if ( v6 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) && v6 )
      v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
    v4->m_aspInterpolators[1].m_pObject = 0;
  }
  v7 = v4->m_aspInterpolators[2].m_pObject;
  if ( v7 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) )
    {
      if ( v7 )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    }
    v4->m_aspInterpolators[2].m_pObject = 0;
  }
}
// 9E6744: using guessed type int (__thiscall *NiLookAtInterpolator::`vftable')(void *p, char);
// A7CAD0: using guessed type const struct NiPoint3 NiQuatTransform::INVALID_TRANSLATE;

//----- (007EE830) --------------------------------------------------------
NiRTTI *NiLookAtInterpolator::GetRTTI()
{
  return &NiLookAtInterpolator::m_RTTI;
}

//----- (007EE840) --------------------------------------------------------
void __thiscall NiLookAtInterpolator::~NiLookAtInterpolator(NiLookAtInterpolator *this)
{
  NiLookAtInterpolator *v1; // ebx@1
  char *v2; // ST00_4@1
  int v3; // edi@1
  int v4; // esi@2
  signed int v5; // [sp+Ch] [bp-4h]@1

  v1 = this;
  v2 = this->m_pcLookAtName;
  this->vfptr = (NiRefObjectVtbl *)&NiLookAtInterpolator::`vftable';
  operator delete(v2);
  v1->m_pcLookAtName = 0;
  v3 = (int)&v1[1];
  v5 = 2;
  do
  {
    v4 = *(_DWORD *)(v3 - 4);
    v3 -= 4;
    if ( v4 && !InterlockedDecrement((volatile LONG *)(v4 + 4)) && v4 )
      (**(void (__thiscall ***)(_DWORD, _DWORD))v4)(v4, 1);
    --v5;
  }
  while ( v5 >= 0 );
  NiInterpolator::~NiInterpolator((NiInterpolator *)&v1->vfptr);
}
// 9E6744: using guessed type int (__thiscall *NiLookAtInterpolator::`vftable')(void *p, char);

//----- (007EE8B0) --------------------------------------------------------
char __thiscall NiLookAtInterpolator::Update(NiLookAtInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiQuatTransform *kValue)
{
  NiLookAtInterpolator *v4; // ebx@1
  NiAVObject *v5; // eax@1
  char v6; // al@2
  float v7; // ecx@3
  float v8; // eax@3
  float v9; // esi@3
  NiInterpolator *v10; // ecx@3
  float v11; // eax@5
  float v12; // ecx@5
  float v13; // edx@5
  char *v14; // ecx@6
  float v15; // esi@8
  NiPoint3 *v16; // eax@8
  double v17; // st7@8
  double v18; // st7@12
  double v19; // st6@12
  double v20; // st6@13
  double v21; // st7@13
  double v22; // rt0@16
  float v23; // edx@17
  double v24; // rt1@17
  float v25; // eax@17
  float v26; // ecx@17
  double v27; // rt2@18
  unsigned int v28; // eax@22
  int v29; // eax@23
  NiInterpolator *v30; // ecx@28
  float fAngle; // ST14_4@31
  float v32; // ecx@32
  float v33; // edx@32
  int v34; // esi@32
  float v35; // eax@32
  NiInterpolator *v36; // ecx@32
  NiQuatTransform *v37; // eax@37
  NiQuaternion kQuatValue; // [sp+24h] [bp-ECh]@32
  NiQuatTransform *v39; // [sp+34h] [bp-DCh]@1
  NiPoint3 kLocalTranslate; // [sp+38h] [bp-D8h]@4
  float fScale; // [sp+44h] [bp-CCh]@1
  NiPoint3 kUp; // [sp+48h] [bp-C8h]@8
  NiPoint3 kAt; // [sp+54h] [bp-BCh]@10
  NiPoint3 kMyWorldPos; // [sp+60h] [bp-B0h]@8
  NiPoint3 kTargetWorldPos; // [sp+6Ch] [bp-A4h]@3
  float fRoll; // [sp+78h] [bp-98h]@3
  NiMatrix3 result; // [sp+7Ch] [bp-94h]@31
  NiMatrix3 roll; // [sp+A0h] [bp-70h]@28
  NiMatrix3 kParentWorldRot; // [sp+C4h] [bp-4Ch]@8
  NiMatrix3 kRot; // [sp+E8h] [bp-28h]@11

  v4 = this;
  v5 = this->m_pkLookAt;
  fScale = *(float *)&pkInterpTarget;
  v39 = kValue;
  if ( !v5 )
  {
    v6 = 0;
    kValue->m_kTranslate.x = -3.4028235e38;
    kValue->m_kRotate.m_fX = -3.4028235e38;
    kValue->m_fScale = -3.4028235e38;
    this->m_kTransformValue.m_kTranslate.x = -3.4028235e38;
    this->m_kTransformValue.m_kRotate.m_fX = -3.4028235e38;
    this->m_kTransformValue.m_fScale = -3.4028235e38;
    return v6;
  }
  kTargetWorldPos.x = v5->m_kWorld.m_Translate.x;
  v7 = v5->m_kWorld.m_Translate.y;
  v8 = v5->m_kWorld.m_Translate.z;
  v9 = *(float *)&pkInterpTarget[1].m_uiRefCount;
  kTargetWorldPos.y = v7;
  v10 = v4->m_aspInterpolators[0].m_pObject;
  kTargetWorldPos.z = v8;
  fRoll = v9;
  if ( v10 )
  {
    if ( !(unsigned __int8)((int (__stdcall *)(_DWORD, NiObjectNET *, NiPoint3 *))v10->vfptr[17].__vecDelDtor)(
                             LODWORD(fTime),
                             pkInterpTarget,
                             &kLocalTranslate) )
    {
LABEL_30:
      v4->m_kTransformValue.m_kTranslate.x = -3.4028235e38;
      v6 = 0;
      v4->m_kTransformValue.m_kRotate.m_fX = -3.4028235e38;
      v4->m_kTransformValue.m_fScale = -3.4028235e38;
      return v6;
    }
    v11 = kLocalTranslate.x;
    v12 = kLocalTranslate.y;
    v13 = kLocalTranslate.z;
    v4->m_kTransformValue.m_kTranslate.x = kLocalTranslate.x;
    v4->m_kTransformValue.m_kTranslate.y = v12;
    v4->m_kTransformValue.m_kTranslate.z = v13;
  }
  else
  {
    v11 = *(float *)&pkInterpTarget[3].m_uiRefCount;
    v14 = pkInterpTarget[3].m_pcName;
    v13 = *(float *)&pkInterpTarget[3].m_spControllers.m_pObject;
    LODWORD(kLocalTranslate.x) = pkInterpTarget[3].m_uiRefCount;
    LODWORD(kLocalTranslate.y) = v14;
    kLocalTranslate.z = v13;
  }
  if ( v9 == 0.0 )
  {
    qmemcpy(&kParentWorldRot, &NiMatrix3::IDENTITY, sizeof(kParentWorldRot));
    kMyWorldPos.x = v11;
    kMyWorldPos.y = kLocalTranslate.y;
    kMyWorldPos.z = v13;
  }
  else
  {
    qmemcpy(&kParentWorldRot, (const void *)(LODWORD(v9) + 104), sizeof(kParentWorldRot));
    v15 = fRoll;
    fRoll = *(float *)(LODWORD(fRoll) + 152);
    v16 = NiMatrix3::operator*(&kParentWorldRot, &kUp, &kLocalTranslate);
    kMyWorldPos.x = v16->x * fRoll;
    kMyWorldPos.y = v16->y * fRoll;
    kMyWorldPos.z = fRoll * v16->z;
    kUp.x = *(float *)(LODWORD(v15) + 140) + kMyWorldPos.x;
    v17 = *(float *)(LODWORD(v15) + 144);
    kMyWorldPos = kUp;
    kUp.y = v17 + kMyWorldPos.y;
    kUp.z = *(float *)(LODWORD(v15) + 148) + kMyWorldPos.z;
  }
  kAt.x = kTargetWorldPos.x - kMyWorldPos.x;
  kAt.y = kTargetWorldPos.y - kMyWorldPos.y;
  kAt.z = kTargetWorldPos.z - kMyWorldPos.z;
  fRoll = kAt.x * kAt.x + kAt.y * kAt.y + kAt.z * kAt.z;
  if ( fRoll < 0.001 )
  {
    NiMatrix3::MakeIdentity(&kRot);
    goto LABEL_32;
  }
  NiPoint3::Unitize(&kAt);
  v18 = kAt.z;
  v19 = kAt.y;
  if ( kAt.z < 1.001 )
  {
    v20 = kAt.z;
    v21 = kAt.y;
    if ( kAt.z > 0.9990000128746033 )
    {
LABEL_17:
      v23 = NiPoint3::UNIT_Y.x;
      v24 = v20;
      v19 = v21;
      v18 = v24;
      v25 = NiPoint3::UNIT_Y.y;
      fRoll = v19;
      v26 = NiPoint3::UNIT_Y.z;
      goto LABEL_20;
    }
    v19 = kAt.y;
    v18 = kAt.z;
  }
  if ( v18 > -1.001 )
  {
    v22 = v19;
    v20 = v18;
    v21 = v22;
    if ( v20 < -0.9990000128746033 )
      goto LABEL_17;
    v27 = v20;
    v19 = v21;
    v18 = v27;
  }
  v23 = NiPoint3::UNIT_Z.x;
  v25 = NiPoint3::UNIT_Z.y;
  fRoll = v18;
  v26 = NiPoint3::UNIT_Z.z;
LABEL_20:
  kTargetWorldPos.x = kAt.x * fRoll;
  kTargetWorldPos.y = v19 * fRoll;
  kTargetWorldPos.z = v18 * fRoll;
  kUp.x = v23 - kTargetWorldPos.x;
  kUp.y = v25 - kTargetWorldPos.y;
  kUp.z = v26 - kTargetWorldPos.z;
  NiPoint3::Unitize(&kUp);
  if ( !(v4->m_uFlags & 1) )
  {
    kTargetWorldPos.x = -kAt.x;
    kAt = kTargetWorldPos;
    kTargetWorldPos.y = -kAt.y;
    kTargetWorldPos.z = -kAt.z;
  }
  v28 = ((unsigned int)v4->m_uFlags >> 1) & 3;
  kMyWorldPos.x = kUp.y * kAt.z - kUp.z * kAt.y;
  kMyWorldPos.y = kUp.z * kAt.x - kUp.x * kAt.z;
  kMyWorldPos.z = kUp.x * kAt.y - kUp.y * kAt.x;
  if ( v28 )
  {
    v29 = v28 - 1;
    if ( v29 )
    {
      if ( v29 == 1 )
      {
        kRot.m_pEntry[0][0] = kMyWorldPos.x;
        kRot.m_pEntry[1][0] = kMyWorldPos.y;
        kRot.m_pEntry[2][0] = kMyWorldPos.z;
        kRot.m_pEntry[0][1] = kUp.x;
        kRot.m_pEntry[1][1] = kUp.y;
        kRot.m_pEntry[2][1] = kUp.z;
        kRot.m_pEntry[0][2] = kAt.x;
        kRot.m_pEntry[1][2] = kAt.y;
        kRot.m_pEntry[2][2] = kAt.z;
      }
    }
    else
    {
      kRot.m_pEntry[0][0] = kMyWorldPos.x;
      kRot.m_pEntry[1][0] = kMyWorldPos.y;
      kRot.m_pEntry[2][0] = kMyWorldPos.z;
      kRot.m_pEntry[0][1] = kAt.x;
      kRot.m_pEntry[1][1] = kAt.y;
      kRot.m_pEntry[2][1] = kAt.z;
      kTargetWorldPos.x = -kUp.x;
      kTargetWorldPos.y = -kUp.y;
      kTargetWorldPos.z = -kUp.z;
      kRot.m_pEntry[0][2] = kTargetWorldPos.x;
      kRot.m_pEntry[1][2] = kTargetWorldPos.y;
      kRot.m_pEntry[2][2] = kTargetWorldPos.z;
    }
  }
  else
  {
    kRot.m_pEntry[0][0] = kAt.x;
    kRot.m_pEntry[1][0] = kAt.y;
    kRot.m_pEntry[2][0] = kAt.z;
    kRot.m_pEntry[0][1] = kUp.x;
    kRot.m_pEntry[1][1] = kUp.y;
    kRot.m_pEntry[2][1] = kUp.z;
    kTargetWorldPos.x = -kMyWorldPos.x;
    kTargetWorldPos.y = -kMyWorldPos.y;
    kTargetWorldPos.z = -kMyWorldPos.z;
    kRot.m_pEntry[0][2] = kTargetWorldPos.x;
    kRot.m_pEntry[1][2] = kTargetWorldPos.y;
    kRot.m_pEntry[2][2] = kTargetWorldPos.z;
  }
  qmemcpy(&kRot, NiMatrix3::TransposeTimes(&kParentWorldRot, &roll, &kRot), sizeof(kRot));
  v30 = v4->m_aspInterpolators[1].m_pObject;
  if ( v30 )
  {
    if ( !(unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD, float *))v30->vfptr[19].__vecDelDtor)(
                             LODWORD(fTime),
                             LODWORD(fScale),
                             &fRoll) )
      goto LABEL_30;
    fAngle = -fRoll;
    NiMatrix3::MakeZRotation(&roll, fAngle);
    qmemcpy(&kRot, NiMatrix3::operator*(&kRot, &result, &roll), sizeof(kRot));
  }
LABEL_32:
  NiQuaternion::FromRotation(&kQuatValue, &kRot);
  v32 = kQuatValue.m_fX;
  v33 = kQuatValue.m_fY;
  v34 = (int)&v4->m_kTransformValue;
  *(float *)(v34 + 12) = kQuatValue.m_fW;
  v35 = kQuatValue.m_fZ;
  *(float *)(v34 + 16) = v32;
  *(float *)(v34 + 20) = v33;
  *(float *)(v34 + 24) = v35;
  v36 = v4->m_aspInterpolators[2].m_pObject;
  if ( v36 )
  {
    v6 = ((int (__stdcall *)(_DWORD, _DWORD, float *))v36->vfptr[19].__vecDelDtor)(
           LODWORD(fTime),
           LODWORD(fScale),
           &fScale);
    if ( !v6 )
    {
      *(float *)v34 = -3.4028235e38;
      v4->m_kTransformValue.m_kRotate.m_fX = -3.4028235e38;
      v4->m_kTransformValue.m_fScale = -3.4028235e38;
      return v6;
    }
    v4->m_kTransformValue.m_fScale = fScale;
  }
  if ( (unsigned __int8)NiQuatTransform::IsTransformInvalid(&v4->m_kTransformValue) )
  {
    v37 = v39;
    v39->m_kTranslate.x = -3.4028235e38;
    v37->m_kRotate.m_fX = -3.4028235e38;
    v37->m_fScale = -3.4028235e38;
    v6 = 0;
  }
  else
  {
    qmemcpy(v39, (const void *)v34, sizeof(NiQuatTransform));
    v4->m_fLastTime = fTime;
    v6 = 1;
  }
  return v6;
}

//----- (007EEFC0) --------------------------------------------------------
void __thiscall NiLookAtInterpolator::CopyMembers(NiLookAtInterpolator *this, NiLookAtInterpolator *pkDest, NiCloningProcess *kCloning)
{
  NiLookAtInterpolator *v3; // esi@1
  unsigned __int16 v4; // ax@1
  unsigned __int16 v5; // ax@2
  __int16 v6; // cx@4
  char *v7; // eax@4
  int v8; // eax@4
  char *v9; // edi@4
  NiObject *v10; // ecx@6
  NiObject *v11; // eax@7
  int v12; // esi@7
  NiObject *v13; // ebx@7
  NiLookAtInterpolator *v14; // [sp+Ch] [bp-4h]@1
  NiLookAtInterpolator *pkDesta; // [sp+18h] [bp+8h]@4
  NiCloningProcess *kCloninga; // [sp+1Ch] [bp+Ch]@4

  v3 = this;
  v14 = this;
  NiInterpolator::CopyMembers((NiCollisionObject *)this, (NiCollisionObject *)pkDest, kCloning);
  v4 = v3->m_uFlags;
  pkDest->m_uFlags = v4;
  if ( v3->m_uFlags & 1 )
    v5 = v4 | 1;
  else
    v5 = v4 & 0xFFFE;
  pkDest->m_uFlags = v5;
  v6 = v3->m_uFlags ^ v5;
  v7 = pkDest->m_pcLookAtName;
  pkDest->m_uFlags ^= v6 & 6;
  pkDest->m_pkLookAt = v3->m_pkLookAt;
  operator delete(v7);
  pkDest->m_pcLookAtName = 0;
  v8 = (char *)v14 - (char *)pkDest;
  qmemcpy(&pkDest->m_kTransformValue, &v3->m_kTransformValue, sizeof(pkDest->m_kTransformValue));
  v9 = (char *)pkDest->m_aspInterpolators;
  pkDesta = (NiLookAtInterpolator *)((char *)v14 - (char *)pkDest);
  kCloninga = (NiCloningProcess *)3;
  while ( 1 )
  {
    v10 = *(NiObject **)&v9[v8];
    if ( v10 )
    {
      v11 = NiObject::Clone(v10);
      v12 = *(_DWORD *)v9;
      v13 = v11;
      if ( *(NiObject **)v9 != v11 )
      {
        if ( v12 && !InterlockedDecrement((volatile LONG *)(v12 + 4)) && v12 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v12)(v12, 1);
        *(_DWORD *)v9 = v13;
        if ( v13 )
          InterlockedIncrement((volatile LONG *)&v13->m_uiRefCount);
      }
    }
    v9 += 4;
    kCloninga = (NiCloningProcess *)((char *)kCloninga - 1);
    if ( !kCloninga )
      break;
    v8 = (int)pkDesta;
  }
}

//----- (007EF0A0) --------------------------------------------------------
void __cdecl NiLookAtInterpolator::CreateObject()
{
  NiLookAtInterpolator *v0; // eax@1

  v0 = (NiLookAtInterpolator *)operator new(0x44u);
  if ( v0 )
    NiLookAtInterpolator::NiLookAtInterpolator(v0, 0, 0, 0);
}

//----- (007EF0C0) --------------------------------------------------------
NiLookAtInterpolator *__thiscall NiLookAtInterpolator::`scalar deleting destructor'(NiLookAtInterpolator *this, unsigned int a2)
{
  NiLookAtInterpolator *v2; // esi@1

  v2 = this;
  NiLookAtInterpolator::~NiLookAtInterpolator(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007EF0F0) --------------------------------------------------------
NiObject *__thiscall NiLookAtInterpolator::CreateClone(NiLookAtInterpolator *this, NiCloningProcess *kCloning)
{
  NiLookAtInterpolator *v2; // edi@1
  NiLookAtInterpolator *v3; // eax@1
  NiLookAtInterpolator *v4; // eax@2
  NiObject *v5; // esi@2
  NiObject *result; // eax@2

  v2 = this;
  v3 = (NiLookAtInterpolator *)operator new(0x44u);
  if ( v3 )
  {
    NiLookAtInterpolator::NiLookAtInterpolator(v3, 0, 0, 0);
    v5 = (NiObject *)v4;
    NiLookAtInterpolator::CopyMembers(v2, v4, kCloning);
    result = v5;
  }
  else
  {
    NiLookAtInterpolator::CopyMembers(v2, 0, kCloning);
    result = 0;
  }
  return result;
}

//----- (007EF140) --------------------------------------------------------
void __thiscall NiLookAtInterpolator::LoadBinary(NiLookAtInterpolator *this, NiStream *kStream)
{
  NiStream *v2; // ebx@1
  NiLookAtInterpolator *v3; // esi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST00_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiStreamVtbl *v7; // eax@2
  NiStreamVtbl *v8; // esi@2
  NiStreamVtbl *v9; // edi@2
  signed int v10; // [sp+Ch] [bp-4h]@1

  v2 = kStream;
  v3 = this;
  NiLODData::LoadBinary((NiRenderTargetGroup *)this, kStream);
  v4 = v2->m_pkIstr;
  v5 = v4;
  v6 = v4->m_pfnRead;
  kStream = (NiStream *)2;
  v6(v5, &v3->m_uFlags, 2u, (unsigned int *)&kStream, 1u);
  v3->m_pkLookAt = (NiAVObject *)NiStream::ResolveLinkID(v2);
  NiStream::LoadCString(v2, &v3->m_pcLookAtName);
  NiQuatTransform::LoadBinary(&v3->m_kTransformValue, v2);
  kStream = (NiStream *)v3->m_aspInterpolators;
  v10 = 3;
  do
  {
    v7 = (NiStreamVtbl *)NiStream::ResolveLinkID(v2);
    v8 = kStream->vfptr;
    v9 = v7;
    if ( kStream->vfptr != v7 )
    {
      if ( v8 && !InterlockedDecrement((volatile LONG *)v8->gap4) && v8 )
        (*(void (__thiscall **)(_DWORD, _DWORD))v8->__vecDelDtor)(v8, 1);
      kStream->vfptr = v9;
      if ( v9 )
        InterlockedIncrement((volatile LONG *)v9->gap4);
    }
    kStream = (NiStream *)((char *)kStream + 4);
    --v10;
  }
  while ( v10 );
}

//----- (007EF200) --------------------------------------------------------
void __thiscall NiLookAtInterpolator::SaveBinary(NiLookAtInterpolator *this, NiStream *kStream)
{
  NiStream *v2; // esi@1
  NiLookAtInterpolator *v3; // edi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST00_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiPointer<NiInterpolator> *v7; // edi@1
  signed int v8; // ebx@1

  v2 = kStream;
  v3 = this;
  NiPosData::LinkObject((NiPSysEmitterCtlrData *)this, kStream);
  v4 = v2->m_pkOstr;
  v5 = v4;
  v6 = v4->m_pfnWrite;
  kStream = (NiStream *)2;
  v6(v5, &v3->m_uFlags, 2u, (unsigned int *)&kStream, 1u);
  v2->vfptr->SaveLinkID(v2, (NiObject *)v3->m_pkLookAt);
  NiStream::SaveCString(v2, v3->m_pcLookAtName);
  NiQuatTransform::SaveBinary(&v3->m_kTransformValue, v2);
  v7 = v3->m_aspInterpolators;
  v8 = 3;
  do
  {
    v2->vfptr->SaveLinkID(v2, (NiObject *)v7->m_pObject);
    ++v7;
    --v8;
  }
  while ( v8 );
}

//----- (007EF280) --------------------------------------------------------
void __thiscall NiLookAtInterpolator::GetViewerStrings(NiLookAtInterpolator *this, NiTArray<char *> *pkStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiLookAtInterpolator *v3; // edi@1
  NiTArray<char *> *v4; // eax@1
  unsigned int v5; // ebx@1
  NiTArray<char *> *v6; // eax@3
  unsigned int v7; // ebx@3
  int v8; // edi@5
  signed int v9; // ebx@5

  v2 = (NiTArray<NiVBBlock *> *)pkStrings;
  v3 = this;
  NiInterpolator::GetViewerStrings((NiInterpolator *)&this->vfptr, pkStrings);
  v4 = (NiTArray<char *> *)NiGetViewerString(NiLookAtInterpolator::m_RTTI.m_pcName);
  v5 = v2->m_uiSize;
  pkStrings = v4;
  if ( v5 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v5 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v5, (NiVBChip *const *)&pkStrings);
  v6 = (NiTArray<char *> *)NiGetViewerString("m_pkLookAt", v3->m_pkLookAt);
  v7 = v2->m_uiSize;
  pkStrings = v6;
  if ( v7 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v7 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v7, (NiVBChip *const *)&pkStrings);
  NiQuatTransform::GetViewerStrings(&v3->m_kTransformValue, (NiTArray<char *> *)v2);
  v8 = (int)v3->m_aspInterpolators;
  v9 = 3;
  do
  {
    if ( *(_DWORD *)v8 )
      (*(void (__stdcall **)(_DWORD))(**(_DWORD **)v8 + 32))(v2);
    v8 += 4;
    --v9;
  }
  while ( v9 );
}

//----- (007EF330) --------------------------------------------------------
void __thiscall NiLookAtController::LinkObject(NiLookAtController *this, NiStream *kStream)
{
  NiLookAtController *v2; // esi@1

  v2 = this;
  NiTimeController::LinkObject((NiTimeController *)&this->vfptr, kStream);
  v2->m_pkLookAt = (NiAVObject *)NiStream::GetObjectFromLinkID(kStream);
}

//----- (007EF350) --------------------------------------------------------
char __thiscall NiLookAtController::RegisterStreamables(NiLookAtController *this, NiStream *kStream)
{
  NiLookAtController *v2; // esi@1
  char result; // al@1

  v2 = this;
  result = NiTimeController::RegisterStreamables((NiTimeController *)&this->vfptr, kStream);
  if ( result )
  {
    if ( v2->m_pkLookAt )
      ((void (__stdcall *)(_DWORD))v2->m_pkLookAt->vfptr[5].__vecDelDtor)(kStream);
    result = 1;
  }
  return result;
}

//----- (007EF390) --------------------------------------------------------
char __thiscall NiLookAtController::IsEqual(NiLookAtController *this, NiObject *pkObject)
{
  NiLookAtController *v2; // esi@1
  NiAVObject *v4; // eax@3

  v2 = this;
  if ( !NiTimeController::IsEqual((NiTimeController *)&this->vfptr, pkObject) )
    return 0;
  v4 = v2->m_pkLookAt;
  if ( v4 )
  {
    if ( !pkObject[8].vfptr )
      return 0;
    if ( v4 )
      goto LABEL_12;
  }
  if ( pkObject[8].vfptr )
    return 0;
  if ( v4 )
  {
LABEL_12:
    if ( (unsigned __int8)((int (__stdcall *)(_DWORD))v4->vfptr[7].__vecDelDtor)(pkObject[8].vfptr) )
      return 1;
    return 0;
  }
  return 1;
}

//----- (007EF3E0) --------------------------------------------------------
void __thiscall NiLookAtController::Update(NiLookAtController *this, float fTime)
{
  NiAVObject *v2; // eax@1
  float v3; // edx@3
  NiObjectNET *v4; // eax@3
  unsigned int v5; // ebx@3
  float v6; // ST1C_4@4
  NiPoint3 *v7; // eax@4
  double v8; // st7@4
  float v9; // ecx@5
  float v10; // edx@5
  float v11; // ST1C_4@6
  double v12; // st7@8
  float v13; // eax@10
  float v14; // ecx@10
  float v15; // edx@10
  unsigned int v16; // eax@14
  int v17; // eax@15
  NiLookAtController *v18; // [sp+0h] [bp-ACh]@1
  NiAVObject *pkTarget; // [sp+4h] [bp-A8h]@3
  float fDot; // [sp+8h] [bp-A4h]@10
  NiPoint3 kUp; // [sp+Ch] [bp-A0h]@4
  NiPoint3 kAt; // [sp+18h] [bp-94h]@6
  NiPoint3 kMyWorldPos; // [sp+24h] [bp-88h]@4
  NiPoint3 kTargetWorldPos; // [sp+30h] [bp-7Ch]@3
  NiMatrix3 result; // [sp+3Ch] [bp-70h]@20
  NiMatrix3 kParentWorldRot; // [sp+60h] [bp-4Ch]@4
  NiMatrix3 kRot; // [sp+84h] [bp-28h]@7

  v2 = this->m_pkLookAt;
  v18 = this;
  if ( v2 && (LOBYTE(this->m_uFlags) >> 3) & 1 )
  {
    kTargetWorldPos.x = v2->m_kWorld.m_Translate.x;
    v3 = v2->m_kWorld.m_Translate.y;
    kTargetWorldPos.z = v2->m_kWorld.m_Translate.z;
    v4 = this->m_pTarget;
    v5 = v4[1].m_uiRefCount;
    kTargetWorldPos.y = v3;
    pkTarget = (NiAVObject *)v4;
    if ( v5 )
    {
      qmemcpy(&kParentWorldRot, (const void *)(v5 + 104), sizeof(kParentWorldRot));
      v6 = *(float *)(v5 + 152);
      v7 = NiMatrix3::operator*(&kParentWorldRot, &kUp, (NiPoint3 *)&v4[3].m_uiRefCount);
      kMyWorldPos.x = v7->x * v6;
      kMyWorldPos.y = v7->y * v6;
      kMyWorldPos.z = v6 * v7->z;
      kUp.x = *(float *)(v5 + 140) + kMyWorldPos.x;
      v8 = *(float *)(v5 + 144);
      kMyWorldPos = kUp;
      kUp.y = v8 + kMyWorldPos.y;
      kUp.z = *(float *)(v5 + 148) + kMyWorldPos.z;
    }
    else
    {
      qmemcpy(&kParentWorldRot, &NiMatrix3::IDENTITY, sizeof(kParentWorldRot));
      v9 = *(float *)&v4[3].m_pcName;
      LODWORD(kMyWorldPos.x) = v4[3].m_uiRefCount;
      v10 = *(float *)&v4[3].m_spControllers.m_pObject;
      kMyWorldPos.y = v9;
      kMyWorldPos.z = v10;
    }
    kAt.x = kTargetWorldPos.x - kMyWorldPos.x;
    kAt.y = kTargetWorldPos.y - kMyWorldPos.y;
    kAt.z = kTargetWorldPos.z - kMyWorldPos.z;
    v11 = kAt.x * kAt.x + kAt.y * kAt.y + kAt.z * kAt.z;
    if ( v11 >= 0.001 )
    {
      NiPoint3::Unitize(&kAt);
      v12 = kAt.z;
      if ( kAt.z >= 1.001 || v12 <= 0.9990000128746033 )
      {
        v13 = NiPoint3::UNIT_Z.x;
        v14 = NiPoint3::UNIT_Z.y;
        fDot = kAt.z;
        v15 = NiPoint3::UNIT_Z.z;
      }
      else
      {
        v13 = NiPoint3::UNIT_Y.x;
        fDot = kAt.y;
        v14 = NiPoint3::UNIT_Y.y;
        v15 = NiPoint3::UNIT_Y.z;
      }
      kTargetWorldPos.x = kAt.x * fDot;
      kTargetWorldPos.y = kAt.y * fDot;
      kTargetWorldPos.z = v12 * fDot;
      kUp.x = v13 - kTargetWorldPos.x;
      kUp.y = v14 - kTargetWorldPos.y;
      kUp.z = v15 - kTargetWorldPos.z;
      NiPoint3::Unitize(&kUp);
      if ( !(v18->m_uFlags & 1) )
      {
        kTargetWorldPos.x = -kAt.x;
        kAt = kTargetWorldPos;
        kTargetWorldPos.y = -kAt.y;
        kTargetWorldPos.z = -kAt.z;
      }
      v16 = ((unsigned int)v18->m_uFlags >> 1) & 3;
      kMyWorldPos.x = kUp.y * kAt.z - kUp.z * kAt.y;
      kMyWorldPos.y = kUp.z * kAt.x - kUp.x * kAt.z;
      kMyWorldPos.z = kUp.x * kAt.y - kUp.y * kAt.x;
      if ( v16 )
      {
        v17 = v16 - 1;
        if ( v17 )
        {
          if ( v17 == 1 )
          {
            kRot.m_pEntry[0][0] = kMyWorldPos.x;
            kRot.m_pEntry[1][0] = kMyWorldPos.y;
            kRot.m_pEntry[2][0] = kMyWorldPos.z;
            kRot.m_pEntry[0][1] = kUp.x;
            kRot.m_pEntry[1][1] = kUp.y;
            kRot.m_pEntry[2][1] = kUp.z;
            kRot.m_pEntry[0][2] = kAt.x;
            kRot.m_pEntry[1][2] = kAt.y;
            kRot.m_pEntry[2][2] = kAt.z;
          }
        }
        else
        {
          kRot.m_pEntry[0][0] = kMyWorldPos.x;
          kRot.m_pEntry[1][0] = kMyWorldPos.y;
          kRot.m_pEntry[2][0] = kMyWorldPos.z;
          kRot.m_pEntry[0][1] = kAt.x;
          kRot.m_pEntry[1][1] = kAt.y;
          kRot.m_pEntry[2][1] = kAt.z;
          kTargetWorldPos.x = -kUp.x;
          kTargetWorldPos.y = -kUp.y;
          kTargetWorldPos.z = -kUp.z;
          kRot.m_pEntry[0][2] = kTargetWorldPos.x;
          kRot.m_pEntry[1][2] = kTargetWorldPos.y;
          kRot.m_pEntry[2][2] = kTargetWorldPos.z;
        }
      }
      else
      {
        kRot.m_pEntry[0][0] = kAt.x;
        kRot.m_pEntry[1][0] = kAt.y;
        kRot.m_pEntry[2][0] = kAt.z;
        kRot.m_pEntry[0][1] = kUp.x;
        kRot.m_pEntry[1][1] = kUp.y;
        kRot.m_pEntry[2][1] = kUp.z;
        kTargetWorldPos.x = -kMyWorldPos.x;
        kTargetWorldPos.y = -kMyWorldPos.y;
        kTargetWorldPos.z = -kMyWorldPos.z;
        kRot.m_pEntry[0][2] = kTargetWorldPos.x;
        kRot.m_pEntry[1][2] = kTargetWorldPos.y;
        kRot.m_pEntry[2][2] = kTargetWorldPos.z;
      }
      qmemcpy(&kRot, NiMatrix3::TransposeTimes(&kParentWorldRot, &result, &kRot), sizeof(kRot));
    }
    else
    {
      NiMatrix3::MakeIdentity(&kRot);
    }
    qmemcpy(&pkTarget->m_kLocal, &kRot, 0x24u);
  }
}

//----- (007EF840) --------------------------------------------------------
void __thiscall NiLookAtController::ProcessClone(NiLookAtController *this, NiCloningProcess *kCloning)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> **v2; // edi@1
  NiLookAtController *v3; // esi@1
  unsigned int v4; // eax@1
  NiObject *pkClone; // [sp+8h] [bp-4h]@1

  v2 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> **)kCloning;
  v3 = this;
  NiTimeController::ProcessClone((NiTimeController *)&this->vfptr, kCloning);
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
    *v2,
    (unsigned int)v3,
    (NiVBSet **)&pkClone);
  v4 = (unsigned int)v3->m_pkLookAt;
  if ( v4 )
  {
    if ( NiTMapBase<NiTPointerAllocator<unsigned int>,NiLight *,NiDX9LightManager::LightEntry *>::GetAt(
           *v2,
           v4,
           (NiVBSet **)&kCloning) )
    {
      pkClone[8].vfptr = (NiRefObjectVtbl *)kCloning;
    }
    else
    {
      pkClone[8].vfptr = (NiRefObjectVtbl *)&v3->m_pkLookAt->vfptr;
    }
  }
}

//----- (007EF8A0) --------------------------------------------------------
NiRTTI *NiLookAtController::GetRTTI()
{
  return &NiLookAtController::m_RTTI;
}

//----- (007EF8B0) --------------------------------------------------------
NiTimeController *__thiscall NiLookAtController::CreateClone(NiLookAtController *this, NiCloningProcess *kCloning)
{
  NiLookAtController *v2; // edi@1
  NiTimeController *v3; // eax@1
  NiTimeController *v4; // esi@1
  unsigned __int16 v5; // ax@4
  __int16 v6; // ax@5

  v2 = this;
  v3 = (NiTimeController *)operator new(0x44u);
  v4 = v3;
  if ( v3 )
  {
    NiTimeController::NiTimeController(v3);
    v4->vfptr = (NiRefObjectVtbl *)&NiLookAtController::`vftable';
    v4[1].m_uiRefCount = 0;
    LOWORD(v4[1].vfptr) = 0;
    v4->m_bComputeScaledTime = 0;
  }
  else
  {
    v4 = 0;
  }
  NiTimeController::CopyMembers((NiTimeController *)&v2->vfptr, v4, kCloning);
  v5 = v2->m_uFlags;
  LOWORD(v4[1].vfptr) = v5;
  if ( v2->m_uFlags & 1 )
    v6 = v5 | 1;
  else
    v6 = v5 & 0xFFFE;
  LOWORD(v4[1].vfptr) = v6;
  LOWORD(v4[1].vfptr) ^= (v2->m_uFlags ^ v6) & 6;
  v4[1].m_uiRefCount = (unsigned int)v2->m_pkLookAt;
  return v4;
}
// 9E67FC: using guessed type int (__thiscall *NiLookAtController::`vftable')(void *p, char);

//----- (007EF930) --------------------------------------------------------
NiTimeController *__cdecl NiLookAtController::CreateObject()
{
  NiTimeController *v0; // eax@1
  NiTimeController *v1; // esi@1
  NiTimeController *result; // eax@2

  v0 = (NiTimeController *)operator new(0x44u);
  v1 = v0;
  if ( v0 )
  {
    NiTimeController::NiTimeController(v0);
    LOWORD(v1[1].vfptr) = 0;
    v1->m_bComputeScaledTime = 0;
    v1->vfptr = (NiRefObjectVtbl *)&NiLookAtController::`vftable';
    v1[1].m_uiRefCount = 0;
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E67FC: using guessed type int (__thiscall *NiLookAtController::`vftable')(void *p, char);

//----- (007EF970) --------------------------------------------------------
void __thiscall NiLookAtController::LoadBinary(NiLookAtController *this, NiStream *kStream)
{
  NiStream *v2; // esi@1
  NiLookAtController *v3; // edi@1
  NiBinaryStream *v4; // eax@3
  NiBinaryStream *v5; // ST00_4@3
  unsigned int (__cdecl *v6)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@3

  v2 = kStream;
  v3 = this;
  NiTimeController::LoadBinary((NiTimeController *)&this->vfptr, kStream);
  if ( v2->m_uiNifFileVersion >= 0xA000102 )
  {
    v4 = v2->m_pkIstr;
    v5 = v4;
    v6 = v4->m_pfnRead;
    kStream = (NiStream *)2;
    v6(v5, &v3->m_uFlags, 2u, (unsigned int *)&kStream, 1u);
    NiStream::ReadLinkID(v2);
  }
  else
  {
    v3->m_uFlags = (v2->m_usNiTimeControllerFlags >> 5) & 0xFF;
    NiStream::ReadLinkID(v2);
  }
}

//----- (007EF9E0) --------------------------------------------------------
void __thiscall NiLookAtController::SaveBinary(NiLookAtController *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiLookAtController *v3; // esi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST00_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1

  v2 = kStream;
  v3 = this;
  NiTimeController::SaveBinary((NiTimeController *)&this->vfptr, kStream);
  v4 = v2->m_pkOstr;
  v5 = v4;
  v6 = v4->m_pfnWrite;
  kStream = (NiStream *)2;
  v6(v5, &v3->m_uFlags, 2u, (unsigned int *)&kStream, 1u);
  v2->vfptr->SaveLinkID(v2, (NiObject *)v3->m_pkLookAt);
}

//----- (007EFA30) --------------------------------------------------------
void __thiscall NiLookAtController::GetViewerStrings(NiLookAtController *this, NiTArray<char *> *pkStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiTArray<char *> *v3; // eax@1
  unsigned int v4; // edi@1

  v2 = (NiTArray<NiVBBlock *> *)pkStrings;
  NiTimeController::GetViewerStrings((NiTimeController *)&this->vfptr, pkStrings);
  v3 = (NiTArray<char *> *)NiGetViewerString(NiLookAtController::m_RTTI.m_pcName);
  v4 = v2->m_uiSize;
  pkStrings = v3;
  if ( v4 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v4 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v4, (NiVBChip *const *)&pkStrings);
}

//----- (007EFA80) --------------------------------------------------------
void __thiscall NiLightDimmerController::LoadBinary(NiAlphaRefController *this, NiStream *stream)
{
  NiPoint3InterpController::LoadBinary((NiPoint3InterpController *)this, stream);
}

//----- (007EFA90) --------------------------------------------------------
bool __thiscall NiLightDimmerController::IsEqual(NiLightDimmerController *this, NiObject *pkObject)
{
  return NiBoolInterpController::IsEqual((NiPoint3InterpController *)this, pkObject) != 0;
}

//----- (007EFAB0) --------------------------------------------------------
void __thiscall NiLightDimmerController::GetTargetFloatValue(NiLightDimmerController *this, float *fValue)
{
  NiObjectNET *v2; // eax@1

  v2 = this->m_pTarget;
  if ( v2 )
    *fValue = *(float *)&v2[8].vfptr;
}

//----- (007EFAD0) --------------------------------------------------------
NiRTTI *NiLightDimmerController::GetRTTI()
{
  return &NiLightDimmerController::m_RTTI;
}

//----- (007EFAE0) --------------------------------------------------------
void __thiscall NiLightDimmerController::Update(NiLightDimmerController *this, float fTime)
{
  NiLightDimmerController *v2; // esi@1
  NiInterpolator *v3; // ecx@4
  NiInterpolator *v4; // ecx@6
  NiShader *v5; // esi@8
  NiShader *v6; // eax@9

  v2 = this;
  if ( (LOBYTE(this->m_uFlags) >> 5) & 1 )
  {
    this->m_fScaledTime = -3.4028235e38;
  }
  else if ( NiTimeController::DontDoUpdate((NiTimeController *)&this->vfptr, fTime) )
  {
    v3 = v2->m_spInterpolator.m_pObject;
    if ( !v3 || !(unsigned __int8)((int (*)(void))v3->vfptr[33].__vecDelDtor)() )
      return;
  }
  v4 = v2->m_spInterpolator.m_pObject;
  if ( v4
    && (unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD, _DWORD))v4->vfptr[19].__vecDelDtor)(
                          v2->m_fScaledTime,
                          v2->m_pTarget,
                          &fTime) )
  {
    v5 = (NiShader *)v2->m_pTarget;
    if ( v5 )
    {
      v6 = CPostProcessEffect::DynamicCast(&NiLight::m_RTTI, v5);
      *(float *)&v6[14].vfptr = fTime;
      ++v6[11].m_uiImplementation;
    }
  }
}

//----- (007EFB70) --------------------------------------------------------
NiLightDimmerController *__thiscall NiLightDimmerController::`vector deleting destructor'(NiLightDimmerController *this, unsigned int a2)
{
  NiLightDimmerController *v2; // edi@1
  NiInterpolator *v3; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiLightDimmerController::`vftable';
  v3 = this->m_spInterpolator.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  NiTimeController::~NiTimeController((NiTimeController *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E6864: using guessed type int (__thiscall *NiLightDimmerController::`vftable')(void *p, char);

//----- (007EFBC0) --------------------------------------------------------
NiPoint3InterpController *__thiscall NiLightDimmerController::CreateClone(NiLightDimmerController *this, NiCloningProcess *kCloning)
{
  NiPoint3InterpController *v2; // edi@1
  NiFloatInterpController *v3; // eax@1
  NiPoint3InterpController *v4; // esi@1
  NiPoint3InterpController *result; // eax@2

  v2 = (NiPoint3InterpController *)this;
  v3 = (NiFloatInterpController *)operator new(0x40u);
  v4 = (NiPoint3InterpController *)v3;
  if ( v3 )
  {
    NiFloatInterpController::NiFloatInterpController(v3);
    v4->vfptr = (NiRefObjectVtbl *)&NiLightDimmerController::`vftable';
    NiPoint3InterpController::CopyMembers(v2, v4, kCloning);
    result = v4;
  }
  else
  {
    NiPoint3InterpController::CopyMembers(v2, 0, kCloning);
    result = 0;
  }
  return result;
}
// 9E6864: using guessed type int (__thiscall *NiLightDimmerController::`vftable')(void *p, char);

//----- (007EFC10) --------------------------------------------------------
NiObject *__cdecl NiLightDimmerController::CreateObject()
{
  NiFloatInterpController *v0; // eax@1
  NiObject *v1; // esi@1
  NiObject *result; // eax@2

  v0 = (NiFloatInterpController *)operator new(0x40u);
  v1 = (NiObject *)v0;
  if ( v0 )
  {
    NiFloatInterpController::NiFloatInterpController(v0);
    v1->vfptr = (NiRefObjectVtbl *)&NiLightDimmerController::`vftable';
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E6864: using guessed type int (__thiscall *NiLightDimmerController::`vftable')(void *p, char);

//----- (007EFC40) --------------------------------------------------------
void __thiscall NiLightDimmerController::GetViewerStrings(NiLightDimmerController *this, NiTArray<char *> *pkStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiTArray<char *> *v3; // eax@1
  unsigned int v4; // edi@1

  v2 = (NiTArray<NiVBBlock *> *)pkStrings;
  NiFloatInterpController::GetViewerStrings((NiFloatInterpController *)&this->vfptr, pkStrings);
  v3 = (NiTArray<char *> *)NiGetViewerString(NiLightDimmerController::m_RTTI.m_pcName);
  v4 = v2->m_uiSize;
  pkStrings = v3;
  if ( v4 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v4 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v4, (NiVBChip *const *)&pkStrings);
}

//----- (007EFC90) --------------------------------------------------------
bool __thiscall NiTextureTransformController::RegisterStreamables(NiTextureTransformController *this, NiStream *kStream)
{
  return NiTransformController::RegisterStreamables((NiPSysModifierCtlr *)this, kStream) != 0;
}

//----- (007EFCB0) --------------------------------------------------------
void __thiscall NiLightColorController::GetTargetPoint3Value(NiLightColorController *this, NiPoint3 *kValue)
{
  NiObjectNET *v2; // eax@1
  float v3; // ecx@3
  float v4; // edx@3
  float v5; // eax@3

  v2 = this->m_pTarget;
  if ( v2 )
  {
    if ( this->m_uFlags & 1 )
    {
      v3 = *(float *)&v2[8].m_uiRefCount;
      v4 = *(float *)&v2[8].m_pcName;
      v5 = *(float *)&v2[8].m_spControllers.m_pObject;
    }
    else
    {
      v3 = *(float *)&v2[8].m_ppkExtra;
      v4 = *(float *)&v2[8].m_uiExtraDataSize;
      v5 = *(float *)&v2[8].m_uiMaxSize;
    }
    kValue->x = v3;
    kValue->y = v4;
    kValue->z = v5;
  }
}

//----- (007EFD10) --------------------------------------------------------
const char *__thiscall NiLightColorController::GetCtlrID(NiLightColorController *this)
{
  const char *result; // eax@1

  result = "Ambient";
  if ( !(this->m_uFlags & 1) )
    result = "Diffuse";
  return result;
}

//----- (007EFD30) --------------------------------------------------------
bool __thiscall NiLightColorController::IsEqual(NiLightColorController *this, NiObject *pkObject)
{
  NiLightColorController *v2; // esi@1
  bool result; // al@1

  v2 = this;
  result = NiBoolInterpController::IsEqual((NiPoint3InterpController *)&this->vfptr, pkObject);
  if ( result )
    result = (LOBYTE(v2->m_uFlags) ^ ~LOBYTE(pkObject[8].vfptr)) & 1;
  return result;
}

//----- (007EFD60) --------------------------------------------------------
NiRTTI *NiLightColorController::GetRTTI()
{
  return &NiLightColorController::m_RTTI;
}

//----- (007EFD70) --------------------------------------------------------
char __stdcall NiLightColorController::InterpTargetIsCorrectType(NiObjectNET *pkTarget)
{
  NiRTTI *v2; // eax@2
  char result; // al@5

  if ( pkTarget && (v2 = (NiRTTI *)((int (*)(void))pkTarget->vfptr[1].__vecDelDtor)()) != 0 )
  {
    while ( v2 != &NiLight::m_RTTI )
    {
      v2 = v2->m_pkBaseRTTI;
      if ( !v2 )
        goto LABEL_5;
    }
    result = 1;
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (007EFDA0) --------------------------------------------------------
void __thiscall NiLightColorController::Update(NiLightColorController *this, float fTime)
{
  NiLightColorController *v2; // esi@1
  NiInterpolator *v3; // ecx@4
  NiInterpolator *v4; // ecx@6
  double v5; // st7@9
  double v6; // st5@13
  double v7; // st6@13
  NiShader *v8; // eax@22
  float v9; // edx@23
  float v10; // ecx@23
  unsigned int v11; // ecx@23
  float v12; // edx@23
  float v13; // esi@24
  float v14; // ecx@24
  float v15; // edx@24
  float v16; // ecx@24
  NiPoint3 kValue; // [sp+10h] [bp-18h]@7
  NiColor kColor; // [sp+1Ch] [bp-Ch]@8

  v2 = this;
  if ( (LOBYTE(this->m_uFlags) >> 5) & 1 )
  {
    this->m_fScaledTime = -3.4028235e38;
  }
  else if ( NiTimeController::DontDoUpdate((NiTimeController *)&this->vfptr, fTime) )
  {
    v3 = v2->m_spInterpolator.m_pObject;
    if ( !v3 || !(unsigned __int8)((int (*)(void))v3->vfptr[33].__vecDelDtor)() )
      return;
  }
  v4 = v2->m_spInterpolator.m_pObject;
  if ( v4
    && (unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD, _DWORD))v4->vfptr[17].__vecDelDtor)(
                          v2->m_fScaledTime,
                          v2->m_pTarget,
                          &kValue) )
  {
    kColor.r = kValue.x;
    kColor.g = kValue.y;
    kColor.b = kValue.z;
    if ( kValue.x >= 0.0 )
    {
      v5 = 1.0;
      if ( kValue.x > 1.0 )
        kColor.r = 1.0;
    }
    else
    {
      v5 = 1.0;
      kColor.r = 0.0;
    }
    if ( kValue.y >= 0.0 )
    {
      if ( kValue.y > v5 )
        kColor.g = v5;
      v6 = 0.0;
      v7 = kValue.z;
    }
    else
    {
      v6 = 0.0;
      v7 = kValue.z;
      kColor.g = 0.0;
    }
    if ( v6 <= v7 )
    {
      if ( v7 > v5 )
        kColor.b = v5;
    }
    else
    {
      kColor.b = v6;
    }
    if ( v2->m_pTarget )
    {
      v8 = CPostProcessEffect::DynamicCast(&NiLight::m_RTTI, (NiShader *)v2->m_pTarget);
      if ( v2->m_uFlags & 1 )
      {
        ++v8[11].m_uiImplementation;
        v9 = kColor.g;
        v8[14].m_uiRefCount = LODWORD(kColor.r);
        v10 = kColor.b;
        *(float *)&v8[14].m_pszName = v9;
        *(float *)&v8[14].m_uiImplementation = v10;
        v11 = v8[11].m_uiImplementation;
        v8[15].vfptr = (NiRefObjectVtbl *)LODWORD(NiColor::BLACK.r);
        v8[15].m_uiRefCount = LODWORD(NiColor::BLACK.g);
        v12 = NiColor::BLACK.b;
        v8[11].m_uiImplementation = ++v11;
        *(float *)&v8[15].m_pszName = v12;
        *(const struct NiColor *)&v8[15].m_uiImplementation = NiColor::BLACK;
        v8[11].m_uiImplementation = v11 + 1;
      }
      else
      {
        v13 = kColor.b;
        v8[14].m_uiRefCount = LODWORD(NiColor::BLACK.r);
        v8[14].m_pszName = (char *)LODWORD(NiColor::BLACK.g);
        v14 = NiColor::BLACK.b;
        v15 = kColor.g;
        v8[11].m_uiImplementation += 3;
        *(float *)&v8[14].m_uiImplementation = v14;
        v16 = kColor.r;
        v8[15].vfptr = (NiRefObjectVtbl *)LODWORD(kColor.r);
        *(float *)&v8[15].m_uiImplementation = v16;
        *(float *)&v8[15].m_uiRefCount = v15;
        *(float *)&v8[16].vfptr = v15;
        *(float *)&v8[15].m_pszName = v13;
        *(float *)&v8[16].m_uiRefCount = v13;
      }
    }
  }
}
// B6243C: using guessed type const struct NiColor NiColor::BLACK;

//----- (007EFFA0) --------------------------------------------------------
void __thiscall NiLightColorController::LinkObject(NiLightColorController *this, NiStream *kStream)
{
  NiLightColorController *v2; // esi@1
  NiPosData *v3; // ebx@2
  NiPoint3Interpolator *v4; // eax@4
  NiInterpolator *v5; // eax@5
  NiInterpolator *v6; // edi@5
  NiInterpolator *v7; // esi@7
  NiLightColorController *v8; // [sp+8h] [bp-4h]@1

  v2 = this;
  v8 = this;
  NiPoint3InterpController::LinkObject((NiPSysModifierCtlr *)this, kStream);
  if ( kStream->m_uiNifFileVersion < 0xA010068 )
  {
    v3 = (NiPosData *)NiStream::GetObjectFromLinkID(kStream);
    if ( v3 )
      InterlockedIncrement((volatile LONG *)&v3->m_uiRefCount);
    v4 = (NiPoint3Interpolator *)operator new(0x20u);
    if ( v4 )
    {
      NiPoint3Interpolator::NiPoint3Interpolator(v4, v3);
      v6 = v5;
    }
    else
    {
      v6 = 0;
    }
    v7 = v2->m_spInterpolator.m_pObject;
    if ( v7 != v6 )
    {
      if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      v8->m_spInterpolator.m_pObject = v6;
      if ( v6 )
        InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
    }
    ((void (*)(void))v8->m_spInterpolator.m_pObject->vfptr[27].__vecDelDtor)();
    if ( v3 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) )
        v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    }
  }
}

//----- (007F0070) --------------------------------------------------------
NiLightColorController *__thiscall NiLightColorController::`scalar deleting destructor'(NiLightColorController *this, unsigned int a2)
{
  NiLightColorController *v2; // edi@1
  NiInterpolator *v3; // esi@1

  v2 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiLightColorController::`vftable';
  v3 = this->m_spInterpolator.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  NiTimeController::~NiTimeController((NiTimeController *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E6914: using guessed type int (__thiscall *NiLightColorController::`vftable')(void *p, char);

//----- (007F00C0) --------------------------------------------------------
NiPoint3InterpController *__thiscall NiLightColorController::CreateClone(NiLightColorController *this, NiCloningProcess *kCloning)
{
  NiLightColorController *v2; // edi@1
  NiPoint3InterpController *v3; // eax@1
  NiPoint3InterpController *v4; // esi@1

  v2 = this;
  v3 = (NiPoint3InterpController *)operator new(0x44u);
  v4 = v3;
  if ( v3 )
  {
    NiPoint3InterpController::NiPoint3InterpController(v3);
    v4->vfptr = (NiRefObjectVtbl *)&NiLightColorController::`vftable';
    LOWORD(v4[1].vfptr) = 0;
  }
  else
  {
    v4 = 0;
  }
  NiPoint3InterpController::CopyMembers((NiPoint3InterpController *)&v2->vfptr, v4, kCloning);
  LOWORD(v4[1].vfptr) = v2->m_uFlags;
  return v4;
}
// 9E6914: using guessed type int (__thiscall *NiLightColorController::`vftable')(void *p, char);

//----- (007F0110) --------------------------------------------------------
NiPoint3InterpController *__cdecl NiLightColorController::CreateObject()
{
  NiPoint3InterpController *v0; // eax@1
  NiPoint3InterpController *v1; // esi@1
  NiPoint3InterpController *result; // eax@2

  v0 = (NiPoint3InterpController *)operator new(0x44u);
  v1 = v0;
  if ( v0 )
  {
    NiPoint3InterpController::NiPoint3InterpController(v0);
    LOWORD(v1[1].vfptr) = 0;
    v1->vfptr = (NiRefObjectVtbl *)&NiLightColorController::`vftable';
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E6914: using guessed type int (__thiscall *NiLightColorController::`vftable')(void *p, char);

//----- (007F0140) --------------------------------------------------------
void __thiscall NiLightColorController::LoadBinary(NiLightColorController *this, NiStream *kStream)
{
  NiStream *v2; // esi@1
  NiLightColorController *v3; // edi@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@3
  NiBinaryStream *v5; // ST00_4@3

  v2 = kStream;
  v3 = this;
  NiPoint3InterpController::LoadBinary((NiPoint3InterpController *)&this->vfptr, kStream);
  if ( v2->m_uiNifFileVersion >= 0xA000102 )
  {
    v4 = v2->m_pkIstr->m_pfnRead;
    v5 = v2->m_pkIstr;
    kStream = (NiStream *)2;
    v4(v5, &v3->m_uFlags, 2u, (unsigned int *)&kStream, 1u);
  }
  else
  {
    v3->m_uFlags = (v2->m_usNiTimeControllerFlags >> 5) & 0x3F;
  }
  if ( v2->m_uiNifFileVersion < 0xA010068 )
    NiStream::ReadLinkID(v2);
}

//----- (007F01B0) --------------------------------------------------------
void __thiscall NiLightColorController::SaveBinary(NiMaterialColorController *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiMaterialColorController *v3; // esi@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@1
  NiBinaryStream *v5; // ST00_4@1

  v2 = kStream;
  v3 = this;
  NiFloatInterpController::SaveBinary((NiTransformController *)this, kStream);
  v4 = v2->m_pkOstr->m_pfnWrite;
  v5 = v2->m_pkOstr;
  kStream = (NiStream *)2;
  v4(v5, &v3->m_uFlags, 2u, (unsigned int *)&kStream, 1u);
}

//----- (007F01F0) --------------------------------------------------------
void __thiscall NiLightColorController::GetViewerStrings(NiLightColorController *this, NiTArray<char *> *pkStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiTArray<char *> *v3; // eax@1
  unsigned int v4; // edi@1

  v2 = (NiTArray<NiVBBlock *> *)pkStrings;
  NiPoint3InterpController::GetViewerStrings((NiPoint3InterpController *)&this->vfptr, pkStrings);
  v3 = (NiTArray<char *> *)NiGetViewerString(NiLightColorController::m_RTTI.m_pcName);
  v4 = v2->m_uiSize;
  pkStrings = v3;
  if ( v4 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v4 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v4, (NiVBChip *const *)&pkStrings);
}

//----- (007F0240) --------------------------------------------------------
NiTArray<unsigned int> *__thiscall NiTArray<unsigned int>::`vector deleting destructor'(NiTArray<unsigned int> *this, unsigned int a2)
{
  NiTArray<unsigned int> *v2; // esi@1
  unsigned int *v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pBase;
  this->vfptr = (NiTArray<unsigned int>Vtbl *)&NiTArray<unsigned int>::`vftable';
  operator delete(v3);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E69B4: using guessed type int (__thiscall *NiTArray<unsigned int>::`vftable')(void *p, char);

//----- (007F0270) --------------------------------------------------------
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSequence>>,NiPointer<NiSequence>>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSequence>>,NiPointer<NiSequence>>(NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSequence> >,NiPointer<NiSequence> > *this)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v1; // edi@1
  bool v2; // zf@1
  unsigned int v3; // ebx@2
  NiTMapItem<unsigned int,NiVBSet *> *v4; // esi@3
  void *v5; // ecx@4

  v1 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this;
  v2 = this->m_bCopy == 0;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSequence> >Vtbl *)&NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSequence>>,NiPointer<NiSequence>>::`vftable';
  if ( !v2 )
  {
    v3 = 0;
    if ( this->m_uiHashSize )
    {
      do
      {
        v4 = v1->m_ppkHashTable[v3];
        while ( v4 )
        {
          v5 = (void *)v4->m_key;
          v4 = v4->m_pkNext;
          operator delete(v5);
        }
        ++v3;
      }
      while ( v3 < v1->m_uiHashSize );
    }
  }
  v1->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *>Vtbl *)&NiTPointerMap<char const *,NiPointer<NiSequence>>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll(v1);
  v1->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSequence>>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll(v1);
  operator delete(v1->m_ppkHashTable);
}
// 9E69BC: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSequence>>::`vftable')(void *p, char);
// 9E69DC: using guessed type int (__thiscall *NiTPointerMap<char const *,NiPointer<NiSequence>>::`vftable')(void *p, char);
// 9E69FC: using guessed type int (__thiscall *NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSequence>>,NiPointer<NiSequence>>::`vftable')(void *p, char);

//----- (007F02E0) --------------------------------------------------------
void __thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiShaderLibrary>>,NiPointer<NiShaderLibrary>>::SetValue(NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiShaderLibrary> >,NiPointer<NiShaderLibrary> > *this, NiTMapItem<char const *,NiPointer<NiShaderLibrary> > *pkItem, const char *pcKey, NiPointer<NiShaderLibrary> val)
{
  unsigned int v4; // kr00_4@2
  const char *v5; // eax@2
  NiTMapItem<char const *,NiPointer<NiShaderLibrary> > *v6; // edi@2
  NiShaderLibrary *v7; // esi@4
  NiShaderLibrary *v8; // eax@4
  NiShaderLibrary *v9; // esi@13

  if ( this->m_bCopy )
  {
    v4 = strlen(pcKey);
    v5 = (const char *)operator new(v4 + 1);
    v6 = pkItem;
    pkItem->m_key = v5;
    strcpy_s((char *)v5, v4 + 1, pcKey);
  }
  else
  {
    v6 = pkItem;
    pkItem->m_key = pcKey;
  }
  v7 = v6->m_val.m_pObject;
  v8 = val.m_pObject;
  if ( v7 == val.m_pObject )
  {
LABEL_12:
    if ( v8 )
    {
      v9 = v8;
      if ( !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) )
      {
        if ( v9 )
          v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      }
    }
    return;
  }
  if ( v7 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
      v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
    v8 = val.m_pObject;
  }
  v6->m_val.m_pObject = v8;
  if ( v8 )
  {
    InterlockedIncrement((volatile LONG *)&v8->m_uiRefCount);
    v8 = val.m_pObject;
    goto LABEL_12;
  }
}

//----- (007F0390) --------------------------------------------------------
NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSequence> > *__thiscall NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSequence>>::`vector deleting destructor'(NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSequence> > *this, unsigned int a2)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSequence> > *v2; // esi@1

  v2 = this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSequence> >Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSequence>>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll((NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this);
  operator delete(v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E69BC: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSequence>>::`vftable')(void *p, char);

//----- (007F03D0) --------------------------------------------------------
NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *__thiscall NiTPointerMap<char const *,NiPointer<NiSequence>>::`vector deleting destructor'(NiTPointerMap<char const *,NiPointer<NiSequence> > *this, unsigned int a2)
{
  NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *v2; // esi@1

  v2 = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this;
  this->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSequence> >Vtbl *)&NiTPointerMap<char const *,NiPointer<NiSequence>>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll((NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *> *)this);
  v2->vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,unsigned int,NiVBSet *>Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSequence>>::`vftable';
  NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiShader *>::RemoveAll(v2);
  operator delete(v2->m_ppkHashTable);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E69BC: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSequence>>::`vftable')(void *p, char);
// 9E69DC: using guessed type int (__thiscall *NiTPointerMap<char const *,NiPointer<NiSequence>>::`vftable')(void *p, char);

//----- (007F0410) --------------------------------------------------------
NiTStringPointerMap<NiPointer<NiSequence> > *__thiscall NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSequence>>,NiPointer<NiSequence>>::`vector deleting destructor'(NiTStringPointerMap<NiPointer<NiSequence> > *this, unsigned int a2)
{
  NiTStringPointerMap<NiPointer<NiSequence> > *v2; // esi@1

  v2 = this;
  NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSequence>>,NiPointer<NiSequence>>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSequence>>,NiPointer<NiSequence>>((NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSequence> >,NiPointer<NiSequence> > *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007F0440) --------------------------------------------------------
void __thiscall NiKeyframeManager::LinkObject(NiKeyframeManager *this, NiStream *kStream)
{
  NiStream *v2; // esi@1
  NiKeyframeManager *v3; // ebx@1
  NiRenderTargetGroup *v4; // esi@2
  unsigned int v5; // edi@2
  const char *v6; // ebx@4
  NiSequence *v7; // eax@4
  NiSequence *v8; // eax@5
  NiSequence *v9; // esi@5
  NiObject *v10; // eax@7
  NiTextKeyExtraData *v11; // ebx@7
  NiRefObjectVtbl *v12; // ebx@15
  const char *v13; // edi@16
  NiTransformController *v14; // eax@16
  HWND__ *v15; // ebx@18
  void *v16; // ST10_4@20
  Ni2DBuffer *v17; // ST0C_4@20
  NiDepthStencilBuffer *v18; // ST08_4@20
  void *v19; // ST04_4@20
  unsigned int v20; // eax@22
  unsigned int v21; // edi@23
  NiObject *v22; // eax@25
  HWND__ *v23; // esi@25
  NiPointer<NiRenderTargetGroup> v24; // ST10_4@25
  unsigned int uiNumSequences; // [sp+Ch] [bp-14h]@2
  NiTMapBase<NiTPointerAllocator<unsigned int>,HWND__ *,NiPointer<NiRenderTargetGroup> > *v26; // [sp+10h] [bp-10h]@3
  unsigned int ui; // [sp+14h] [bp-Ch]@2
  NiTextKeyExtraData *pkTextKeys; // [sp+18h] [bp-8h]@7
  unsigned int uj; // [sp+1Ch] [bp-4h]@2

  v2 = kStream;
  v3 = this;
  NiTimeController::LinkObject((NiTimeController *)&this->vfptr, kStream);
  if ( kStream->m_uiNifFileVersion >= 0x4010003 )
  {
    v20 = NiStream::GetNumberOfLinkIDs(kStream);
    if ( v20 )
    {
      v21 = v20;
      while ( 1 )
      {
        v22 = NiStream::GetObjectFromLinkID(v2);
        v23 = (HWND__ *)v22[1].vfptr;
        v24.m_pObject = (NiRenderTargetGroup *)v22;
        InterlockedIncrement((volatile LONG *)&v22->m_uiRefCount);
        NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSequence>>::SetAt(
          (NiTMapBase<NiTPointerAllocator<unsigned int>,HWND__ *,NiPointer<NiRenderTargetGroup> > *)&v3->m_kMap,
          v23,
          v24);
        if ( !--v21 )
          break;
        v2 = kStream;
      }
    }
  }
  else
  {
    v4 = NiKeyframeManager::ms_pkLinkRecord.m_pObject;
    v5 = 0;
    uiNumSequences = NiKeyframeManager::ms_pkLinkRecord.m_pObject[1].m_uiNumBuffers;
    ui = 0;
    uj = 0;
    if ( uiNumSequences )
    {
      v26 = (NiTMapBase<NiTPointerAllocator<unsigned int>,HWND__ *,NiPointer<NiRenderTargetGroup> > *)&v3->m_kMap;
      do
      {
        v6 = (const char *)(&v4->m_spDepthStencilBuffer.m_pObject->vfptr)[v5];
        v7 = (NiSequence *)operator new(0x44u);
        if ( v7 )
        {
          NiSequence::NiSequence(v7, v6, 0xCu, 0xCu);
          v9 = v8;
        }
        else
        {
          v9 = 0;
        }
        operator delete((void *)v6);
        v9->m_uiTextKeyReference = *(_DWORD *)(NiKeyframeManager::ms_pkLinkRecord.m_pObject->m_uiRefCount + 4 * v5);
        v10 = NiStream::GetObjectFromLinkID(kStream);
        v11 = v9->m_spTextKeys.m_pObject;
        pkTextKeys = (NiTextKeyExtraData *)v10;
        if ( (NiObject *)v11 != v10 )
        {
          if ( v11 )
          {
            if ( !InterlockedDecrement((volatile LONG *)&v11->m_uiRefCount) && v11 )
              v11->vfptr->__vecDelDtor((NiRefObject *)v11, 1u);
            v10 = (NiObject *)pkTextKeys;
          }
          v9->m_spTextKeys.m_pObject = (NiTextKeyExtraData *)v10;
          if ( v10 )
            InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
        }
        v12 = (&NiKeyframeManager::ms_pkLinkRecord.m_pObject[1].m_aspBuffers[2].m_pObject->vfptr)[v5];
        if ( v12 )
        {
          do
          {
            v13 = *(const char **)(NiKeyframeManager::ms_pkLinkRecord.m_pObject[2].m_uiRefCount + 4 * uj++);
            v14 = (NiTransformController *)NiStream::GetObjectFromLinkID(kStream);
            NiSequence::AddNameControllerPair(v9, v13, v14);
            operator delete((void *)v13);
            v12 = (NiRefObjectVtbl *)((char *)v12 - 1);
          }
          while ( v12 );
          v5 = ui;
        }
        v15 = (HWND__ *)v9->m_pcName;
        InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
        NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSequence>>::SetAt(
          v26,
          v15,
          (NiPointer<NiRenderTargetGroup>)v9);
        v4 = NiKeyframeManager::ms_pkLinkRecord.m_pObject;
        ui = ++v5;
      }
      while ( v5 < uiNumSequences );
    }
    if ( v4 )
    {
      v16 = (void *)v4[2].m_uiRefCount;
      v4[2].vfptr = (NiRefObjectVtbl *)&NiTArray<char *>::`vftable';
      operator delete(v16);
      v17 = v4[1].m_aspBuffers[2].m_pObject;
      v4[1].m_aspBuffers[1].m_pObject = (Ni2DBuffer *)&NiTArray<unsigned int>::`vftable';
      operator delete(v17);
      v18 = v4->m_spDepthStencilBuffer.m_pObject;
      v4->m_uiNumBuffers = (unsigned int)&NiTArray<char *>::`vftable';
      operator delete(v18);
      v19 = (void *)v4->m_uiRefCount;
      v4->vfptr = (NiRefObjectVtbl *)&NiTArray<unsigned int>::`vftable';
      operator delete(v19);
      operator delete(v4);
    }
    NiKeyframeManager::ms_pkLinkRecord.m_pObject = 0;
  }
}
// 9E56D0: using guessed type int (__thiscall *NiTArray<char *>::`vftable')(void *p, char);
// 9E69B4: using guessed type int (__thiscall *NiTArray<unsigned int>::`vftable')(void *p, char);

//----- (007F0630) --------------------------------------------------------
char __thiscall NiKeyframeManager::Add(NiKeyframeManager *this, const char *pcSequenceFile, const char *pcSequenceName, unsigned int uiIndex)
{
  const char *v4; // esi@1
  NiKeyframeManager *v5; // edi@1
  const char *v6; // ecx@1
  char result; // al@2
  HWND__ *v8; // esi@5
  const char *v9; // esi@8
  NiPointer<NiRenderTargetGroup> v10; // [sp-4h] [bp-Ch]@5

  v4 = pcSequenceName;
  v5 = this;
  NiSequence::CreateFromKFFile((NiPointer<NiSequence> *)&pcSequenceName, pcSequenceFile, uiIndex, pcSequenceName);
  v6 = pcSequenceName;
  if ( pcSequenceName )
  {
    if ( v4 )
    {
      NiSequence::SetName((NiSequence *)pcSequenceName, v4);
      v6 = pcSequenceName;
    }
    v8 = (HWND__ *)*((_DWORD *)v6 + 2);
    v10.m_pObject = (NiRenderTargetGroup *)v6;
    if ( pcSequenceName )
      InterlockedIncrement((volatile LONG *)pcSequenceName + 1);
    NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSequence>>::SetAt(
      (NiTMapBase<NiTPointerAllocator<unsigned int>,HWND__ *,NiPointer<NiRenderTargetGroup> > *)&v5->m_kMap,
      v8,
      v10);
    if ( pcSequenceName )
    {
      v9 = pcSequenceName;
      if ( !InterlockedDecrement((volatile LONG *)pcSequenceName + 1) )
      {
        if ( v9 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v9)(v9, 1);
      }
    }
    result = 1;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007F06C0) --------------------------------------------------------
void __thiscall NiKeyframeManager::LoadBinary(NiKeyframeManager *this, NiStream *kStream)
{
  NiStream *v2; // ebx@1
  NiBinaryStream *v3; // eax@1
  NiBinaryStream *v4; // ST00_4@2
  unsigned int (__cdecl *v5)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@2
  NiBinaryStream *v6; // eax@3
  NiBinaryStream *v7; // ST00_4@3
  unsigned int (__cdecl *v8)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@3
  NiBinaryStream *v9; // eax@4
  NiBinaryStream *v10; // ST00_4@4
  unsigned int (__cdecl *v11)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@4
  NiRenderTargetGroup *v12; // eax@5
  NiTArray<NiVBBlock *> *v13; // esi@8
  unsigned int v14; // eax@8
  NiBinaryStream *v15; // eax@19
  NiBinaryStream *v16; // ST00_4@19
  unsigned int (__cdecl *v17)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@19
  Ni2DBuffer *v18; // esi@19
  char *v19; // ebx@19
  NiRenderTargetGroup *v20; // edi@19
  unsigned int (__cdecl *v21)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@30
  NiBinaryStream *v22; // ST00_4@30
  NiRenderTargetGroup *v23; // esi@30
  unsigned int v24; // edi@30
  NiRenderTargetGroup *v25; // esi@42
  Ni2DBuffer *v26; // edi@42
  NiBinaryStream *v27; // ST00_4@57
  unsigned int (__cdecl *v28)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@57
  unsigned int v29; // edi@57
  NiBinaryStream *v30; // eax@58
  unsigned int (__cdecl *v31)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@58
  unsigned int (__cdecl *v32)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@59
  NiBinaryStream *v33; // ST00_4@59
  unsigned int uiFileNum; // [sp+Ch] [bp-28h]@4
  unsigned int uiIndex; // [sp+10h] [bp-24h]@4
  NiKeyframeManager *v36; // [sp+14h] [bp-20h]@1
  unsigned int uiTextKeyReference; // [sp+18h] [bp-1Ch]@2
  char *pcFileName; // [sp+1Ch] [bp-18h]@2
  char *pcKeyName; // [sp+20h] [bp-14h]@3
  unsigned int uiNumSequences; // [sp+24h] [bp-10h]@57
  char *pcName; // [sp+28h] [bp-Ch]@3
  unsigned int uiNumKeys; // [sp+2Ch] [bp-8h]@30
  char bSaveURL; // [sp+33h] [bp-1h]@3

  v2 = kStream;
  v36 = this;
  NiTimeController::LoadBinary((NiTimeController *)&this->vfptr, kStream);
  v3 = v2->m_pkIstr;
  if ( v2->m_uiNifFileVersion >= 0x4010003 )
  {
    v27 = v2->m_pkIstr;
    v28 = v3->m_pfnRead;
    v29 = 0;
    kStream = (NiStream *)4;
    v28(v27, &uiNumSequences, 4u, (unsigned int *)&kStream, 1u);
    while ( uiNumSequences )
    {
      v30 = v2->m_pkIstr;
      --uiNumSequences;
      v31 = v30->m_pfnRead;
      uiFileNum = 1;
      v31(v30, (char *)&kStream + 3, 1u, &uiFileNum, 1u);
      if ( BYTE3(kStream) )
      {
        uiTextKeyReference = 0;
        NiStream::LoadCString(v2, (char **)&uiTextKeyReference);
        pcFileName = 0;
        NiStream::LoadCString(v2, &pcFileName);
        v32 = v2->m_pkIstr->m_pfnRead;
        v33 = v2->m_pkIstr;
        uiFileNum = 4;
        v32(v33, &uiIndex, 4u, &uiFileNum, 1u);
        NiKeyframeManager::Add(v36, pcFileName, (const char *)uiTextKeyReference, uiIndex);
        operator delete((void *)uiTextKeyReference);
        operator delete(pcFileName);
      }
      else
      {
        NiStream::ReadLinkID(v2);
        ++v29;
      }
    }
    --uiNumSequences;
    NiStream::SetNumberOfLinkIDs(v2, v29);
  }
  else
  {
    v4 = v2->m_pkIstr;
    v5 = v3->m_pfnRead;
    uiTextKeyReference = 4;
    v5(v4, &pcFileName, 4u, &uiTextKeyReference, 1u);
    while ( pcFileName )
    {
      v6 = v2->m_pkIstr;
      --pcFileName;
      v7 = v6;
      v8 = v6->m_pfnRead;
      pcKeyName = (char *)1;
      v8(v7, &bSaveURL, (unsigned int)pcKeyName, (unsigned int *)&pcKeyName, (unsigned int)pcKeyName);
      pcName = 0;
      NiStream::LoadCString(v2, &pcName);
      if ( bSaveURL )
      {
        pcKeyName = 0;
        NiStream::LoadCString(v2, &pcKeyName);
        v9 = v2->m_pkIstr;
        v10 = v9;
        v11 = v9->m_pfnRead;
        uiIndex = 4;
        v11(v10, &uiFileNum, 4u, &uiIndex, 1u);
        NiKeyframeManager::Add(v36, pcKeyName, pcName, uiFileNum);
        operator delete(pcKeyName);
        operator delete(pcName);
      }
      else
      {
        v12 = (NiRenderTargetGroup *)operator new(0x60u);
        if ( v12 )
        {
          v12->vfptr = (NiRefObjectVtbl *)&NiTArray<unsigned int>::`vftable';
          v12->m_aspBuffers[0].m_pObject = 0;
          v12->m_aspBuffers[3].m_pObject = (Ni2DBuffer *)1;
          v12->m_aspBuffers[1].m_pObject = 0;
          v12->m_aspBuffers[2].m_pObject = 0;
          v12->m_uiRefCount = 0;
          v12->m_pkRendererData = 0;
          v12[1].m_aspBuffers[0].m_pObject = (Ni2DBuffer *)1;
          v12[1].vfptr = 0;
          v12[1].m_uiRefCount = 0;
          v12->m_spDepthStencilBuffer.m_pObject = 0;
          v12->m_uiNumBuffers = (unsigned int)&NiTArray<char *>::`vftable';
          v12[1].m_aspBuffers[1].m_pObject = (Ni2DBuffer *)&NiTArray<unsigned int>::`vftable';
          v12[1].m_aspBuffers[3].m_pObject = 0;
          v12[1].m_pkRendererData = (NiRenderTargetGroup::RendererData *)1;
          v12[1].m_uiNumBuffers = 0;
          v12[1].m_spDepthStencilBuffer.m_pObject = 0;
          v12[1].m_aspBuffers[2].m_pObject = 0;
          v12[2].vfptr = (NiRefObjectVtbl *)&NiTArray<char *>::`vftable';
          v12[2].m_aspBuffers[0].m_pObject = 0;
          v12[2].m_aspBuffers[3].m_pObject = (Ni2DBuffer *)1;
          v12[2].m_aspBuffers[1].m_pObject = 0;
          v12[2].m_aspBuffers[2].m_pObject = 0;
          v12[2].m_uiRefCount = 0;
        }
        else
        {
          v12 = 0;
        }
        v13 = (NiTArray<NiVBBlock *> *)&v12->m_uiNumBuffers;
        NiKeyframeManager::ms_pkLinkRecord.m_pObject = v12;
        v14 = (unsigned int)v12[1].vfptr;
        uiIndex = v14;
        if ( v14 < v13->m_uiMaxSize
          || (NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v13, v14 + v13->m_uiGrowBy),
              v14 = uiIndex,
              uiIndex < v13->m_uiMaxSize) )
        {
          if ( v14 < v13->m_uiSize )
          {
            if ( pcName )
            {
              if ( !v13->m_pBase[v14] )
                ++v13->m_uiESize;
            }
            else if ( v13->m_pBase[v14] )
            {
              --v13->m_uiESize;
            }
          }
          else
          {
            v13->m_uiSize = v14 + 1;
            if ( pcName )
              ++v13->m_uiESize;
          }
          v13->m_pBase[v14] = (NiVBBlock *)pcName;
        }
        v15 = v2->m_pkIstr;
        v16 = v15;
        v17 = v15->m_pfnRead;
        uiIndex = 4;
        v17(v16, &uiTextKeyReference, 4u, &uiIndex, 1u);
        v18 = NiKeyframeManager::ms_pkLinkRecord.m_pObject->m_aspBuffers[1].m_pObject;
        v19 = (char *)&NiKeyframeManager::ms_pkLinkRecord.m_pObject->m_aspBuffers[1];
        v20 = NiKeyframeManager::ms_pkLinkRecord.m_pObject;
        uiIndex = (unsigned int)NiKeyframeManager::ms_pkLinkRecord.m_pObject->m_aspBuffers;
        if ( v18 < NiKeyframeManager::ms_pkLinkRecord.m_pObject->m_aspBuffers[0].m_pObject
          || (NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(
                (NiTArray<NiVBBlock *> *)NiKeyframeManager::ms_pkLinkRecord.m_pObject,
                (unsigned int)v18
              + (unsigned int)NiKeyframeManager::ms_pkLinkRecord.m_pObject->m_aspBuffers[3].m_pObject),
              (unsigned int)v18 < *(_DWORD *)uiIndex) )
        {
          if ( (unsigned int)v18 < *(_DWORD *)v19 )
          {
            if ( uiTextKeyReference )
            {
              if ( !*(_DWORD *)(v20->m_uiRefCount + 4 * (_DWORD)v18) )
                ++v20->m_aspBuffers[2].m_pObject;
            }
            else if ( *(_DWORD *)(v20->m_uiRefCount + 4 * (_DWORD)v18) )
            {
              --v20->m_aspBuffers[2].m_pObject;
            }
          }
          else
          {
            *(_DWORD *)v19 = (char *)v18 + 1;
            if ( uiTextKeyReference )
              ++v20->m_aspBuffers[2].m_pObject;
          }
          *(_DWORD *)(v20->m_uiRefCount + 4 * (_DWORD)v18) = uiTextKeyReference;
        }
        v2 = kStream;
        NiStream::ReadLinkID(kStream);
        v21 = v2->m_pkIstr->m_pfnRead;
        v22 = v2->m_pkIstr;
        uiIndex = 4;
        v21(v22, &uiNumKeys, 4u, &uiIndex, 1u);
        v23 = NiKeyframeManager::ms_pkLinkRecord.m_pObject;
        v24 = NiKeyframeManager::ms_pkLinkRecord.m_pObject[1].m_uiNumBuffers;
        if ( (Ni2DBuffer *)v24 < NiKeyframeManager::ms_pkLinkRecord.m_pObject[1].m_aspBuffers[3].m_pObject
          || (NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(
                (NiTArray<NiVBBlock *> *)&NiKeyframeManager::ms_pkLinkRecord.m_pObject[1].m_aspBuffers[1],
                (unsigned int)NiKeyframeManager::ms_pkLinkRecord.m_pObject[1].m_pkRendererData + v24),
              (Ni2DBuffer *)v24 < v23[1].m_aspBuffers[3].m_pObject) )
        {
          if ( v24 < v23[1].m_uiNumBuffers )
          {
            if ( uiNumKeys )
            {
              if ( !(&v23[1].m_aspBuffers[2].m_pObject->vfptr)[v24] )
                ++v23[1].m_spDepthStencilBuffer.m_pObject;
            }
            else if ( (&v23[1].m_aspBuffers[2].m_pObject->vfptr)[v24] )
            {
              --v23[1].m_spDepthStencilBuffer.m_pObject;
            }
          }
          else
          {
            v23[1].m_uiNumBuffers = v24 + 1;
            if ( uiNumKeys )
              ++v23[1].m_spDepthStencilBuffer.m_pObject;
          }
          (&v23[1].m_aspBuffers[2].m_pObject->vfptr)[v24] = (NiRefObjectVtbl *)uiNumKeys;
        }
        while ( uiNumKeys )
        {
          --uiNumKeys;
          pcKeyName = 0;
          NiStream::LoadCString(v2, &pcKeyName);
          v25 = NiKeyframeManager::ms_pkLinkRecord.m_pObject;
          v26 = NiKeyframeManager::ms_pkLinkRecord.m_pObject[2].m_aspBuffers[1].m_pObject;
          if ( v26 < NiKeyframeManager::ms_pkLinkRecord.m_pObject[2].m_aspBuffers[0].m_pObject
            || (NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(
                  (NiTArray<NiVBBlock *> *)&NiKeyframeManager::ms_pkLinkRecord.m_pObject[2],
                  (unsigned int)v26
                + (unsigned int)NiKeyframeManager::ms_pkLinkRecord.m_pObject[2].m_aspBuffers[3].m_pObject),
                v26 < v25[2].m_aspBuffers[0].m_pObject) )
          {
            if ( v26 < v25[2].m_aspBuffers[1].m_pObject )
            {
              if ( pcKeyName )
              {
                if ( !*(_DWORD *)(v25[2].m_uiRefCount + 4 * (_DWORD)v26) )
                  ++v25[2].m_aspBuffers[2].m_pObject;
              }
              else if ( *(_DWORD *)(v25[2].m_uiRefCount + 4 * (_DWORD)v26) )
              {
                --v25[2].m_aspBuffers[2].m_pObject;
              }
            }
            else
            {
              v25[2].m_aspBuffers[1].m_pObject = (Ni2DBuffer *)((char *)v26 + 1);
              if ( pcKeyName )
                ++v25[2].m_aspBuffers[2].m_pObject;
            }
            *(_DWORD *)(v25[2].m_uiRefCount + 4 * (_DWORD)v26) = pcKeyName;
          }
          NiStream::ReadLinkID(v2);
        }
        --uiNumKeys;
      }
    }
  }
}
// 5: found interdependent unknown calls
// 9E56D0: using guessed type int (__thiscall *NiTArray<char *>::`vftable')(void *p, char);
// 9E69B4: using guessed type int (__thiscall *NiTArray<unsigned int>::`vftable')(void *p, char);

//----- (007F0B20) --------------------------------------------------------
void __thiscall NiKeyframeManager::NiKeyframeManager(NiKeyframeManager *this)
{
  NiKeyframeManager *v1; // esi@1
  char *v2; // eax@1
  unsigned int v3; // ST08_4@1

  v1 = this;
  NiTimeController::NiTimeController((NiTimeController *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&NiKeyframeManager::`vftable';
  v1->m_kMap.m_uiHashSize = 37;
  v1->m_kMap.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSequence> >Vtbl *)&NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSequence>>::`vftable';
  v1->m_kMap.m_kAllocator.m_uiCount = 0;
  v2 = (char *)operator new(0x94u);
  v3 = 4 * v1->m_kMap.m_uiHashSize;
  v1->m_kMap.m_ppkHashTable = (NiTMapItem<char const *,NiPointer<NiSequence> > **)v2;
  memset(v2, 0, v3);
  v1->m_kMap.m_bCopy = 0;
  v1->m_kMap.vfptr = (NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSequence> >Vtbl *)&NiTStringPointerMap<NiPointer<NiSequence>>::`vftable';
}
// 9E69BC: using guessed type int (__thiscall *NiTMapBase<NiTPointerAllocator<unsigned int>,char const *,NiPointer<NiSequence>>::`vftable')(void *p, char);
// 9E6A1C: using guessed type int (__thiscall *NiTStringPointerMap<NiPointer<NiSequence>>::`vftable')(void *p, char);
// 9E6A3C: using guessed type int (__thiscall *NiKeyframeManager::`vftable')(void *p, char);

//----- (007F0B80) --------------------------------------------------------
NiRTTI *NiKeyframeManager::GetRTTI()
{
  return &NiKeyframeManager::m_RTTI;
}

//----- (007F0B90) --------------------------------------------------------
NiKeyframeManager *__thiscall NiKeyframeManager::`scalar deleting destructor'(NiKeyframeManager *this, unsigned int a2)
{
  NiKeyframeManager *v2; // esi@1

  v2 = this;
  NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSequence>>,NiPointer<NiSequence>>::~NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSequence>>,NiPointer<NiSequence>>((NiTStringTemplateMap<NiTPointerMap<char const *,NiPointer<NiSequence> >,NiPointer<NiSequence> > *)&this->m_kMap.vfptr);
  NiTimeController::~NiTimeController((NiTimeController *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007F0BC0) --------------------------------------------------------
void __cdecl NiKeyframeManager::CreateObject()
{
  NiKeyframeManager *v0; // eax@1

  v0 = (NiKeyframeManager *)operator new(0x50u);
  if ( v0 )
    NiKeyframeManager::NiKeyframeManager(v0);
}

//----- (007F0BE0) --------------------------------------------------------
void __thiscall NiTransformData::GuaranteeKeysAtStartAndEnd(NiTransformData *this, float fStartTime, float fEndTime)
{
  NiTransformData *v3; // esi@1
  NiAnimationKey::KeyType v4; // ecx@4
  NiAnimationKey *pkKeys; // [sp+Ch] [bp-4h]@2

  v3 = this;
  if ( this->m_uiNumRotKeys )
  {
    pkKeys = (NiAnimationKey *)&this->m_pkRotKeys->m_fTime;
    NiAnimationKey::GuaranteeKeyAtStartAndEnd(
      ROTKEY,
      this->m_eRotType,
      &pkKeys,
      &this->m_uiNumRotKeys,
      fStartTime,
      fEndTime);
    v3->m_pkRotKeys = (NiRotKey *)pkKeys;
  }
  if ( v3->m_uiNumPosKeys )
  {
    v4 = v3->m_ePosType;
    pkKeys = (NiAnimationKey *)&v3->m_pkPosKeys->m_fTime;
    NiAnimationKey::GuaranteeKeyAtStartAndEnd(POSKEY, v4, &pkKeys, &v3->m_uiNumPosKeys, fStartTime, fEndTime);
    v3->m_pkPosKeys = (NiPosKey *)pkKeys;
  }
  if ( v3->m_uiNumScaleKeys )
  {
    pkKeys = (NiAnimationKey *)&v3->m_pkScaleKeys->m_fTime;
    NiAnimationKey::GuaranteeKeyAtStartAndEnd(0, v3->m_eScaleType, &pkKeys, &v3->m_uiNumScaleKeys, fStartTime, fEndTime);
    v3->m_pkScaleKeys = (NiFloatKey *)pkKeys;
  }
}

//----- (007F0CA0) --------------------------------------------------------
NiObject *__cdecl NiTransformData::CreateObject()
{
  NiObject *v0; // eax@1
  NiObject *v1; // esi@1
  NiObject *result; // eax@2

  v0 = (NiObject *)operator new(0x38u);
  v1 = v0;
  if ( v0 )
  {
    NiObject::NiObject(v0);
    v1[1].vfptr = 0;
    v1[1].m_uiRefCount = 0;
    v1[2].vfptr = 0;
    LOBYTE(v1[2].m_uiRefCount) = 0;
    v1[3].vfptr = 0;
    v1[3].m_uiRefCount = 0;
    v1[4].vfptr = 0;
    LOBYTE(v1[4].m_uiRefCount) = 0;
    v1[5].vfptr = 0;
    v1[5].m_uiRefCount = 0;
    v1[6].vfptr = 0;
    LOBYTE(v1[6].m_uiRefCount) = 0;
    v1->vfptr = (NiRefObjectVtbl *)&NiTransformData::`vftable';
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E6AA4: using guessed type int (__thiscall *NiTransformData::`vftable')(void *p, char);

//----- (007F0CF0) --------------------------------------------------------
NiRTTI *NiTransformData::GetRTTI()
{
  return &NiTransformData::m_RTTI;
}

//----- (007F0D00) --------------------------------------------------------
void __thiscall NiTransformData::SetPosAnim(NiTransformData *this, NiPosKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType)
{
  if ( pkKeys && uiNumKeys )
  {
    this->m_uiNumPosKeys = uiNumKeys;
    this->m_pkPosKeys = pkKeys;
    this->m_ePosType = eType;
    this->m_ucPosSize = byte_B61906[eType];
  }
  else
  {
    this->m_uiNumPosKeys = 0;
    this->m_pkPosKeys = 0;
    this->m_ePosType = 0;
    this->m_ucPosSize = 0;
  }
}

//----- (007F0D40) --------------------------------------------------------
void __thiscall NiTransformData::SetScaleAnim(NiTransformData *this, NiFloatKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType)
{
  if ( pkKeys && uiNumKeys )
  {
    this->m_uiNumScaleKeys = uiNumKeys;
    this->m_pkScaleKeys = pkKeys;
    this->m_eScaleType = eType;
    this->m_ucScaleSize = (char)(&NiAnimationKey::ms_keysizes)[eType];
  }
  else
  {
    this->m_uiNumScaleKeys = 0;
    this->m_pkScaleKeys = 0;
    this->m_ucScaleSize = 0;
    this->m_eScaleType = 0;
  }
}
// B61900: using guessed type unsigned __int8 *NiAnimationKey::ms_keysizes;

//----- (007F0D80) --------------------------------------------------------
char __thiscall NiTransformData::IsEqual(NiTransformData *this, NiObject *pkObject)
{
  NiObject *v2; // edi@1
  NiTransformData *v3; // esi@1
  NiRefObjectVtbl *v5; // ecx@3
  NiRefObjectVtbl *v6; // eax@4
  int v7; // ebx@12
  int v8; // ebx@15
  int v9; // ebx@18
  bool (__cdecl *rotEqual)(NiAnimationKey *, NiAnimationKey *); // [sp+10h] [bp+8h]@12
  bool (__cdecl *rotEquala)(NiAnimationKey *, NiAnimationKey *); // [sp+10h] [bp+8h]@15
  bool (__cdecl *rotEqualb)(NiAnimationKey *, NiAnimationKey *); // [sp+10h] [bp+8h]@18

  v2 = pkObject;
  v3 = this;
  if ( !NiObject::IsEqual((NiObject *)&this->vfptr, pkObject) )
    return 0;
  v5 = (NiRefObjectVtbl *)v3->m_uiNumRotKeys;
  if ( v5 != pkObject[1].vfptr )
    return 0;
  v6 = (NiRefObjectVtbl *)v3->m_eRotType;
  if ( v6 != pkObject[2].vfptr
    || (NiRefObjectVtbl *)v3->m_uiNumPosKeys != pkObject[3].vfptr
    || (NiRefObjectVtbl *)v3->m_ePosType != pkObject[4].vfptr
    || (NiRefObjectVtbl *)v3->m_uiNumScaleKeys != pkObject[5].vfptr
    || (NiRefObjectVtbl *)v3->m_eScaleType != pkObject[6].vfptr
    || v3->m_ucRotSize != LOBYTE(pkObject[2].m_uiRefCount)
    || v3->m_ucPosSize != LOBYTE(pkObject[4].m_uiRefCount)
    || v3->m_ucScaleSize != LOBYTE(pkObject[6].m_uiRefCount) )
  {
    return 0;
  }
  v7 = 0;
  rotEqual = (bool (__cdecl *)(NiAnimationKey *, NiAnimationKey *))dword_B61CB8[(signed int)v6];
  if ( v5 )
  {
    while ( rotEqual(
              (NiAnimationKey *)((char *)&v3->m_pkRotKeys->m_fTime + v7 * v3->m_ucRotSize),
              (NiAnimationKey *)(v7 * v3->m_ucRotSize + v2[1].m_uiRefCount)) )
    {
      if ( ++v7 >= v3->m_uiNumRotKeys )
        goto LABEL_15;
    }
  }
  else
  {
LABEL_15:
    v8 = 0;
    rotEquala = (bool (__cdecl *)(NiAnimationKey *, NiAnimationKey *))dword_B61CA0[v3->m_ePosType];
    if ( v3->m_uiNumPosKeys )
    {
      while ( rotEquala(
                (NiAnimationKey *)((char *)&v3->m_pkPosKeys->m_fTime + v8 * v3->m_ucPosSize),
                (NiAnimationKey *)(v8 * v3->m_ucPosSize + v2[3].m_uiRefCount)) )
      {
        if ( ++v8 >= v3->m_uiNumPosKeys )
          goto LABEL_18;
      }
    }
    else
    {
LABEL_18:
      v9 = 0;
      rotEqualb = (bool (__cdecl *)(NiAnimationKey *, NiAnimationKey *))(&NiAnimationKey::ms_equals)[v3->m_eScaleType];
      if ( !v3->m_uiNumScaleKeys )
        return 1;
      while ( rotEqualb(
                (NiAnimationKey *)((char *)&v3->m_pkScaleKeys->m_fTime + v9 * v3->m_ucScaleSize),
                (NiAnimationKey *)(v9 * v3->m_ucScaleSize + v2[5].m_uiRefCount)) )
      {
        if ( ++v9 >= v3->m_uiNumScaleKeys )
          return 1;
      }
    }
  }
  return 0;
}
// B61C88: using guessed type bool (__cdecl static **NiAnimationKey::ms_equals)(const struct NiAnimationKey *, const struct NiAnimationKey *);
// B61CA0: using guessed type int dword_B61CA0[];
// B61CB8: using guessed type int dword_B61CB8[];

//----- (007F0EB0) --------------------------------------------------------
void __thiscall NiTransformData::~NiTransformData(NiTransformData *this)
{
  CPostProcessEffect *v1; // esi@1
  NiEulerRotKey *v2; // edi@1

  v1 = (CPostProcessEffect *)this;
  v2 = (NiEulerRotKey *)this->m_pkRotKeys;
  this->vfptr = (NiRefObjectVtbl *)&NiTransformData::`vftable';
  if ( v2 )
  {
    if ( this->m_eRotType == 4 )
      NiEulerRotKey::CleanUp(v2);
    ((void (__cdecl *)(_DWORD))dword_B61A78[(unsigned int)v1[1].vfptr])(v2);
  }
  if ( v1[1].m_uiType )
    ((void (__cdecl *)(_DWORD))dword_B61A60[(unsigned int)v1[2].vfptr])(v1[1].m_uiType);
  if ( v1[2].m_uiType )
    ((void (__cdecl *)(_DWORD))(&NiAnimationKey::ms_deletes)[(unsigned int)v1[3].vfptr])(v1[2].m_uiType);
  NiRefObject::~NiRefObject(v1);
}
// 9E6AA4: using guessed type int (__thiscall *NiTransformData::`vftable')(void *p, char);
// B61A48: using guessed type void (__cdecl static **NiAnimationKey::ms_deletes)(struct NiAnimationKey *);
// B61A60: using guessed type int dword_B61A60[];
// B61A78: using guessed type int dword_B61A78[];

//----- (007F0F20) --------------------------------------------------------
void __thiscall NiTransformData::ReplaceRotAnim(NiTransformData *this, NiRotKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType)
{
  NiTransformData *v4; // esi@1
  NiRotKey *v5; // edi@1

  v4 = this;
  v5 = this->m_pkRotKeys;
  if ( v5 )
  {
    if ( this->m_eRotType == 4 )
      NiEulerRotKey::CleanUp((NiEulerRotKey *)this->m_pkRotKeys);
    ((void (__cdecl *)(_DWORD))dword_B61A78[v4->m_eRotType])(v5);
  }
  if ( pkKeys && uiNumKeys )
  {
    v4->m_uiNumRotKeys = uiNumKeys;
    v4->m_pkRotKeys = pkKeys;
    v4->m_eRotType = eType;
    v4->m_ucRotSize = byte_B6190C[eType];
  }
  else
  {
    v4->m_uiNumRotKeys = 0;
    v4->m_pkRotKeys = 0;
    v4->m_eRotType = 0;
    v4->m_ucRotSize = 0;
  }
}
// B61A78: using guessed type int dword_B61A78[];

//----- (007F0F90) --------------------------------------------------------
void __thiscall NiTransformData::ReplacePosAnim(NiTransformData *this, NiPosKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType)
{
  NiTransformData *v4; // esi@1
  NiPosKey *v5; // eax@1

  v4 = this;
  v5 = this->m_pkPosKeys;
  if ( v5 )
    ((void (__cdecl *)(_DWORD))dword_B61A60[this->m_ePosType])(v5);
  if ( pkKeys && uiNumKeys )
  {
    v4->m_uiNumPosKeys = uiNumKeys;
    v4->m_pkPosKeys = pkKeys;
    v4->m_ePosType = eType;
    v4->m_ucPosSize = byte_B61906[eType];
  }
  else
  {
    v4->m_uiNumPosKeys = 0;
    v4->m_pkPosKeys = 0;
    v4->m_ePosType = 0;
    v4->m_ucPosSize = 0;
  }
}
// B61A60: using guessed type int dword_B61A60[];

//----- (007F0FF0) --------------------------------------------------------
void __thiscall NiTransformData::ReplaceScaleAnim(NiTransformData *this, NiFloatKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType)
{
  NiTransformData *v4; // esi@1
  NiFloatKey *v5; // eax@1

  v4 = this;
  v5 = this->m_pkScaleKeys;
  if ( v5 )
    ((void (__cdecl *)(_DWORD))(&NiAnimationKey::ms_deletes)[this->m_eScaleType])(v5);
  if ( pkKeys && uiNumKeys )
  {
    v4->m_uiNumScaleKeys = uiNumKeys;
    v4->m_pkScaleKeys = pkKeys;
    v4->m_eScaleType = eType;
    v4->m_ucScaleSize = (char)(&NiAnimationKey::ms_keysizes)[eType];
  }
  else
  {
    v4->m_uiNumScaleKeys = 0;
    v4->m_pkScaleKeys = 0;
    v4->m_ucScaleSize = 0;
    v4->m_eScaleType = 0;
  }
}
// B61900: using guessed type unsigned __int8 *NiAnimationKey::ms_keysizes;
// B61A48: using guessed type void (__cdecl static **NiAnimationKey::ms_deletes)(struct NiAnimationKey *);

//----- (007F1050) --------------------------------------------------------
NiPointer<NiTransformData> *__thiscall NiTransformData::GetSequenceData(NiTransformData *this, NiPointer<NiTransformData> *result, float fStartTime, float fEndTime)
{
  NiTransformData *v4; // esi@1
  NiTransformData *v5; // eax@1
  NiObject *v6; // ebx@3
  unsigned int v7; // eax@7
  unsigned int v8; // eax@9
  unsigned int v9; // eax@11
  NiPointer<NiObject> v11; // [sp+1Ch] [bp-Ch]@1
  NiAnimationKey *pkNewKeys; // [sp+20h] [bp-8h]@7
  unsigned int uiNewNumKeys; // [sp+24h] [bp-4h]@7

  v4 = this;
  v5 = (NiTransformData *)NiObject::CreateDeepCopy((NiObject *)&this->vfptr, &v11)->m_pObject;
  result->m_pObject = v5;
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v6 = v11.m_pObject;
  if ( v11.m_pObject && !InterlockedDecrement((volatile LONG *)&v11.m_pObject->m_uiRefCount) && v6 )
    v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
  v7 = v4->m_uiNumRotKeys;
  pkNewKeys = 0;
  uiNewNumKeys = 0;
  if ( v7 )
  {
    NiAnimationKey::CopySequence(
      ROTKEY,
      v4->m_eRotType,
      (NiAnimationKey *)&v4->m_pkRotKeys->m_fTime,
      v7,
      fStartTime,
      fEndTime,
      &pkNewKeys,
      &uiNewNumKeys);
    NiTransformData::ReplaceRotAnim(result->m_pObject, (NiRotKey *)pkNewKeys, uiNewNumKeys, v4->m_eRotType);
  }
  v8 = v4->m_uiNumPosKeys;
  if ( v8 )
  {
    NiAnimationKey::CopySequence(
      POSKEY,
      v4->m_ePosType,
      (NiAnimationKey *)&v4->m_pkPosKeys->m_fTime,
      v8,
      fStartTime,
      fEndTime,
      &pkNewKeys,
      &uiNewNumKeys);
    NiTransformData::ReplacePosAnim(result->m_pObject, (NiPosKey *)pkNewKeys, uiNewNumKeys, v4->m_ePosType);
  }
  v9 = v4->m_uiNumScaleKeys;
  if ( v9 )
  {
    NiAnimationKey::CopySequence(
      0,
      v4->m_eScaleType,
      (NiAnimationKey *)&v4->m_pkScaleKeys->m_fTime,
      v9,
      fStartTime,
      fEndTime,
      &pkNewKeys,
      &uiNewNumKeys);
    NiTransformData::ReplaceScaleAnim(result->m_pObject, (NiFloatKey *)pkNewKeys, uiNewNumKeys, v4->m_eScaleType);
  }
  return result;
}

//----- (007F1180) --------------------------------------------------------
NiTransformData *__thiscall NiTransformData::`scalar deleting destructor'(NiTransformData *this, unsigned int a2)
{
  NiTransformData *v2; // esi@1

  v2 = this;
  NiTransformData::~NiTransformData(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007F11B0) --------------------------------------------------------
void __thiscall NiTransformData::LoadBinary(NiTransformData *this, NiStream *stream)
{
  NiStream *v2; // esi@1
  NiTransformData *v3; // ebx@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST14_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v7; // eax@2
  NiBinaryStream *v8; // ST14_4@2
  unsigned int (__cdecl *v9)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@2
  NiAnimationKey::KeyType v10; // edi@2
  int (__cdecl *v11)(NiStream *, NiStream *); // eax@2
  NiBinaryStream *v12; // eax@3
  NiBinaryStream *v13; // ST14_4@3
  unsigned int (__cdecl *v14)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@3
  NiBinaryStream *v15; // eax@4
  NiBinaryStream *v16; // ST14_4@4
  unsigned int (__cdecl *v17)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@4
  NiAnimationKey::KeyType v18; // edi@4
  int (__cdecl *v19)(NiStream *, NiStream *); // eax@4
  NiBinaryStream *v20; // eax@5
  NiBinaryStream *v21; // ST14_4@5
  unsigned int (__cdecl *v22)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@5
  NiBinaryStream *v23; // eax@6
  NiBinaryStream *v24; // ST14_4@6
  unsigned int (__cdecl *v25)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@6
  NiAnimationKey::KeyType v26; // edi@6
  struct NiAnimationKey *(__cdecl static **v27)(struct NiStream *, unsigned int); // eax@6
  NiFloatKey *v28; // esi@6
  NiAnimationKey::KeyType ucSize; // [sp+Ch] [bp-8h]@2
  NiPosKey *pkPosKeys; // [sp+10h] [bp-4h]@1

  v2 = stream;
  v3 = this;
  NiObject::LoadBinary((NiObject *)&this->vfptr, stream);
  v4 = v2->m_pkIstr;
  v5 = v4;
  v6 = v4->m_pfnRead;
  pkPosKeys = (NiPosKey *)4;
  v6(v5, &stream, 4u, (unsigned int *)&pkPosKeys, 1u);
  if ( stream )
  {
    v7 = v2->m_pkIstr;
    v8 = v7;
    v9 = v7->m_pfnRead;
    pkPosKeys = (NiPosKey *)4;
    v9(v8, &ucSize, 4u, (unsigned int *)&pkPosKeys, 1u);
    v10 = ucSize;
    v11 = (int (__cdecl *)(NiStream *, NiStream *))dword_B61F88[ucSize];
    LOBYTE(ucSize) = byte_B6190C[ucSize];
    pkPosKeys = (NiPosKey *)v11(v2, stream);
    ((void (__cdecl *)(_DWORD, _DWORD, _DWORD))dword_B61958[v10])(pkPosKeys, stream, ucSize);
    NiTransformData::ReplaceRotAnim(v3, (NiRotKey *)pkPosKeys, (unsigned int)stream, v10);
  }
  v12 = v2->m_pkIstr;
  v13 = v12;
  v14 = v12->m_pfnRead;
  ucSize = 4;
  v14(v13, &stream, 4u, (unsigned int *)&ucSize, 1u);
  if ( stream )
  {
    v15 = v2->m_pkIstr;
    v16 = v15;
    v17 = v15->m_pfnRead;
    ucSize = 4;
    v17(v16, &pkPosKeys, 4u, (unsigned int *)&ucSize, 1u);
    v18 = (NiAnimationKey::KeyType)pkPosKeys;
    v19 = (int (__cdecl *)(NiStream *, NiStream *))dword_B61F70[(signed int)pkPosKeys];
    LOBYTE(ucSize) = *((_BYTE *)&pkPosKeys->m_fTime + (_DWORD)byte_B61906);
    pkPosKeys = (NiPosKey *)v19(v2, stream);
    ((void (__cdecl *)(_DWORD, _DWORD, _DWORD))dword_B61940[v18])(pkPosKeys, stream, ucSize);
    NiTransformData::ReplacePosAnim(v3, pkPosKeys, (unsigned int)stream, v18);
  }
  v20 = v2->m_pkIstr;
  v21 = v20;
  v22 = v20->m_pfnRead;
  ucSize = 4;
  v22(v21, &stream, 4u, (unsigned int *)&ucSize, 1u);
  if ( stream )
  {
    v23 = v2->m_pkIstr;
    v24 = v23;
    v25 = v23->m_pfnRead;
    ucSize = 4;
    v25(v24, &pkPosKeys, 4u, (unsigned int *)&ucSize, 1u);
    v26 = (NiAnimationKey::KeyType)pkPosKeys;
    v27 = (&NiAnimationKey::ms_loaders)[(_DWORD)pkPosKeys];
    LOBYTE(ucSize) = LOBYTE(pkPosKeys[745872].m_fTime);
    v28 = (NiFloatKey *)((int (__cdecl *)(_DWORD, _DWORD))v27)(v2, stream);
    ((void (__cdecl *)(_DWORD, _DWORD, _DWORD))(&NiAnimationKey::ms_fillderived)[v26])(v28, stream, ucSize);
    NiTransformData::ReplaceScaleAnim(v3, v28, (unsigned int)stream, v26);
  }
}
// B61900: using guessed type unsigned __int8 *NiAnimationKey::ms_keysizes;
// B61928: using guessed type void (__cdecl static **NiAnimationKey::ms_fillderived)(struct NiAnimationKey *, unsigned int, unsigned __int8);
// B61940: using guessed type int dword_B61940[];
// B61958: using guessed type int dword_B61958[];
// B61F58: using guessed type struct NiAnimationKey *(__cdecl static **NiAnimationKey::ms_loaders)(struct NiStream *, unsigned int);
// B61F70: using guessed type int dword_B61F70[];
// B61F88: using guessed type int dword_B61F88[];

//----- (007F1360) --------------------------------------------------------
void __thiscall NiTransformData::SaveBinary(NiTransformData *this, NiStream *stream)
{
  NiStream *v2; // edi@1
  NiTransformData *v3; // esi@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@1
  NiBinaryStream *v5; // ST0C_4@1
  NiBinaryStream *v6; // eax@2
  NiBinaryStream *v7; // ST0C_4@2
  unsigned int (__cdecl *v8)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@2
  NiBinaryStream *v9; // eax@3
  NiBinaryStream *v10; // ST0C_4@3
  unsigned int (__cdecl *v11)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@3
  NiBinaryStream *v12; // eax@4
  NiBinaryStream *v13; // ST0C_4@4
  unsigned int (__cdecl *v14)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@4
  NiBinaryStream *v15; // eax@5
  NiBinaryStream *v16; // ST0C_4@5
  unsigned int (__cdecl *v17)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@5
  NiBinaryStream *v18; // eax@6
  NiBinaryStream *v19; // ST0C_4@6
  unsigned int (__cdecl *v20)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@6

  v2 = stream;
  v3 = this;
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue(
    (NiVBDynamicSet *)this,
    (IDirect3DVertexBuffer9 *)stream);
  v4 = v2->m_pkOstr->m_pfnWrite;
  v5 = v2->m_pkOstr;
  stream = (NiStream *)4;
  v4(v5, &v3->m_uiNumRotKeys, 4u, (unsigned int *)&stream, 1u);
  if ( v3->m_uiNumRotKeys )
  {
    v6 = v2->m_pkOstr;
    v7 = v6;
    v8 = v6->m_pfnWrite;
    stream = (NiStream *)4;
    v8(v7, &v3->m_eRotType, 4u, (unsigned int *)&stream, 1u);
    ((void (__cdecl *)(_DWORD, _DWORD, _DWORD))dword_B61C28[v3->m_eRotType])(v2, v3->m_pkRotKeys, v3->m_uiNumRotKeys);
  }
  v9 = v2->m_pkOstr;
  v10 = v9;
  v11 = v9->m_pfnWrite;
  stream = (NiStream *)4;
  v11(v10, &v3->m_uiNumPosKeys, 4u, (unsigned int *)&stream, 1u);
  if ( v3->m_uiNumPosKeys )
  {
    v12 = v2->m_pkOstr;
    v13 = v12;
    v14 = v12->m_pfnWrite;
    stream = (NiStream *)4;
    v14(v13, &v3->m_ePosType, 4u, (unsigned int *)&stream, 1u);
    ((void (__cdecl *)(_DWORD, _DWORD, _DWORD))dword_B61C10[v3->m_ePosType])(v2, v3->m_pkPosKeys, v3->m_uiNumPosKeys);
  }
  v15 = v2->m_pkOstr;
  v16 = v15;
  v17 = v15->m_pfnWrite;
  stream = (NiStream *)4;
  v17(v16, &v3->m_uiNumScaleKeys, 4u, (unsigned int *)&stream, 1u);
  if ( v3->m_uiNumScaleKeys )
  {
    v18 = v2->m_pkOstr;
    v19 = v18;
    v20 = v18->m_pfnWrite;
    stream = (NiStream *)4;
    v20(v19, &v3->m_eScaleType, 4u, (unsigned int *)&stream, 1u);
    ((void (__cdecl *)(_DWORD, _DWORD, _DWORD))(&NiAnimationKey::ms_saves)[v3->m_eScaleType])(
      v2,
      v3->m_pkScaleKeys,
      v3->m_uiNumScaleKeys);
  }
}
// B61BF8: using guessed type void (__cdecl static **NiAnimationKey::ms_saves)(struct NiStream *, struct NiAnimationKey *, unsigned int);
// B61C10: using guessed type int dword_B61C10[];
// B61C28: using guessed type int dword_B61C28[];

//----- (007F1490) --------------------------------------------------------
void __thiscall NiTransformData::GetViewerStrings(NiTransformData *this, NiTArray<char *> *pStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiTransformData *v3; // edi@1
  NiTArray<char *> *v4; // eax@1
  unsigned int v5; // ebx@1
  NiTArray<char *> *v6; // eax@3
  unsigned int v7; // ebx@3
  NiTArray<char *> *v8; // eax@5
  unsigned int v9; // ebx@5
  NiTArray<char *> *v10; // eax@7
  unsigned int v11; // edi@7

  v2 = (NiTArray<NiVBBlock *> *)pStrings;
  v3 = this;
  NiObject::GetViewerStrings((NiObject *)&this->vfptr, pStrings);
  v4 = (NiTArray<char *> *)NiGetViewerString(NiTransformData::m_RTTI.m_pcName);
  v5 = v2->m_uiSize;
  pStrings = v4;
  if ( v5 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v5 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v5, (NiVBChip *const *)&pStrings);
  v6 = (NiTArray<char *> *)NiGetViewerString("m_uiNumRotKeys", v3->m_uiNumRotKeys);
  v7 = v2->m_uiSize;
  pStrings = v6;
  if ( v7 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v7 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v7, (NiVBChip *const *)&pStrings);
  v8 = (NiTArray<char *> *)NiGetViewerString("m_uiNumPosKeys", v3->m_uiNumPosKeys);
  v9 = v2->m_uiSize;
  pStrings = v8;
  if ( v9 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v9 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v9, (NiVBChip *const *)&pStrings);
  v10 = (NiTArray<char *> *)NiGetViewerString("m_uiNumScaleKeys", v3->m_uiNumScaleKeys);
  v11 = v2->m_uiSize;
  pStrings = v10;
  if ( v11 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v11 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v11, (NiVBChip *const *)&pStrings);
}

//----- (007F1580) --------------------------------------------------------
int __stdcall NiGeomMorpherController::InterpolatorIsCorrectType(NiInterpolator *pkInterpolator, unsigned __int16 usIndex)
{
  return ((int (*)(void))pkInterpolator->vfptr[22].__vecDelDtor)();
}

//----- (007F15A0) --------------------------------------------------------
void __thiscall NiGeomMorpherController::GuaranteeTimeRange(NiGeomMorpherController *this, float fStartTime, float fEndTime)
{
  NiGeomMorpherController *v3; // esi@1
  unsigned int v4; // edi@1
  int v5; // eax@2

  v3 = this;
  v4 = 0;
  if ( this->m_spMorphData.m_pObject->m_uiNumTargets )
  {
    do
    {
      v5 = (int)v3->vfptr[28].__vecDelDtor((NiRefObject *)v3, v4);
      if ( v5 )
        (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD))(*(_DWORD *)v5 + 116))(
          v5,
          LODWORD(fStartTime),
          LODWORD(fEndTime));
      ++v4;
    }
    while ( v4 < v3->m_spMorphData.m_pObject->m_uiNumTargets );
  }
}

//----- (007F15F0) --------------------------------------------------------
void __thiscall NiGeomMorpherController::ProcessClone(NiGeomMorpherController *this, NiCloningProcess *kCloning)
{
  NiGeomMorpherController *v2; // esi@1
  unsigned __int16 i; // di@1
  NiInterpolator *v4; // ecx@2

  v2 = this;
  NiTimeController::ProcessClone((NiTimeController *)&this->vfptr, kCloning);
  for ( i = 0; i < (unsigned __int16)((int (__thiscall *)(_DWORD))v2->vfptr[25].__vecDelDtor)(v2); ++i )
  {
    v4 = v2->m_aspInterpolators[i].m_pObject;
    if ( v4 )
      ((void (__stdcall *)(_DWORD))v4->vfptr[10].__vecDelDtor)(kCloning);
  }
}

//----- (007F1640) --------------------------------------------------------
char __thiscall NiGeomMorpherController::RegisterStreamables(NiGeomMorpherController *this, NiStream *kStream)
{
  NiGeomMorpherController *v2; // esi@1
  char result; // al@1
  NiMorphData *v4; // ecx@2
  unsigned int v5; // edi@4
  int v6; // eax@5

  v2 = this;
  result = NiPSysResetOnLoopCtlr::RegisterStreamables((NiPSysUpdateCtlr *)this, kStream);
  if ( result )
  {
    v4 = v2->m_spMorphData.m_pObject;
    if ( v4 )
      ((void (__stdcall *)(_DWORD))v4->vfptr[5].__vecDelDtor)(kStream);
    v5 = 0;
    if ( (unsigned __int16)((int (__thiscall *)(_DWORD))v2->vfptr[25].__vecDelDtor)(v2) > 0u )
    {
      do
      {
        v6 = (int)v2->vfptr[28].__vecDelDtor((NiRefObject *)v2, v5);
        if ( v6 )
          (*(void (__thiscall **)(_DWORD, _DWORD))(*(_DWORD *)v6 + 20))(v6, kStream);
        ++v5;
      }
      while ( (unsigned __int16)v5 < (unsigned __int16)((int (__thiscall *)(_DWORD))v2->vfptr[25].__vecDelDtor)(v2) );
    }
    result = 1;
  }
  return result;
}

//----- (007F16B0) --------------------------------------------------------
bool __userpurge NiGeomMorpherController::IsEqual@<al>(NiGeomMorpherController *this@<ecx>, unsigned int a2@<ebx>, NiObject *pkObject)
{
  NiObject *v3; // edi@1
  NiGeomMorpherController *v4; // esi@1
  bool result; // al@2
  unsigned int v6; // ST00_4@4
  unsigned int v7; // ebx@4
  _DWORD *v8; // eax@7
  int v9; // edi@7
  _DWORD *v10; // ST0C_4@7
  int v11; // eax@7

  v3 = pkObject;
  v4 = this;
  if ( NiKeyframeManager::IsEqual((NiPSysUpdateCtlr *)this, pkObject)
    && (unsigned __int8)((int (__stdcall *)(NiRefObjectVtbl *))v4->m_spMorphData.m_pObject->vfptr[7].__vecDelDtor)(pkObject[8].vfptr) )
  {
    v6 = a2;
    v7 = 0;
    if ( (unsigned __int16)v4->vfptr[25].__vecDelDtor((NiRefObject *)v4, v6) > 0u )
    {
      while ( 1 )
      {
        v8 = (_DWORD *)v3->vfptr[28].__vecDelDtor((NiRefObject *)v3, v7);
        v9 = *v8;
        v10 = v8;
        v11 = (int)v4->vfptr[28].__vecDelDtor((NiRefObject *)v4, v7);
        if ( !(unsigned __int8)(*(int (__thiscall **)(_DWORD *, int))(v9 + 28))(v10, v11) )
          break;
        if ( (unsigned __int16)++v7 >= (unsigned __int16)((int (__thiscall *)(NiGeomMorpherController *))v4->vfptr[25].__vecDelDtor)(v4) )
          return 1;
        v3 = pkObject;
      }
      result = 0;
    }
    else
    {
      result = 1;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// 7F16B0: could not find valid save-restore pair for ebx

//----- (007F1750) --------------------------------------------------------
const char *__thiscall NiGeomMorpherController::GetInterpolatorID(NiGeomMorpherController *this, unsigned __int16 usIndex)
{
  NiMorphData *v2; // ecx@1
  const char *result; // eax@2

  v2 = this->m_spMorphData.m_pObject;
  if ( usIndex >= v2->m_uiNumTargets )
    result = (const char *)NiD3DXEffectStateManager::GetLastTextureStage(0);
  else
    result = (const char *)NiD3DXEffectStateManager::GetLastTextureStage((NiD3DShaderProgramCreatorAsm *)&v2->m_aMorphTargets[usIndex]);
  return result;
}

//----- (007F1780) --------------------------------------------------------
NiInterpolator *__thiscall NiGeomMorpherController::GetInterpolator(NiGeomMorpherController *this, unsigned __int16 usIndex)
{
  return this->m_aspInterpolators[usIndex].m_pObject;
}

//----- (007F17A0) --------------------------------------------------------
void __thiscall NiGeomMorpherController::SetInterpolator(NiGeomMorpherController *this, NiInterpolator *pkInterpolator, unsigned __int16 usIndex)
{
  NiPointer<NiInterpolator> *v3; // ecx@1
  NiInterpolator *v4; // esi@1
  NiInterpolator **v5; // edi@1

  v3 = this->m_aspInterpolators;
  v4 = v3[usIndex].m_pObject;
  v5 = &v3[usIndex].m_pObject;
  if ( v4 != pkInterpolator )
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    *v5 = pkInterpolator;
    if ( pkInterpolator )
      InterlockedIncrement((volatile LONG *)&pkInterpolator->m_uiRefCount);
  }
}

//----- (007F1800) --------------------------------------------------------
unsigned int __thiscall NiGeomMorpherController::GetNumTargets(NiGeomMorpherController *this)
{
  NiMorphData *v1; // eax@1
  unsigned int result; // eax@2

  v1 = this->m_spMorphData.m_pObject;
  if ( v1 )
    result = v1->m_uiNumTargets;
  else
    result = 0;
  return result;
}

//----- (007F1810) --------------------------------------------------------
void __thiscall NiGeomMorpherController::ResetTimeExtrema(NiGeomMorpherController *this)
{
  NiGeomMorpherController *v1; // esi@1
  NiMorphData *v2; // eax@2
  unsigned int v3; // ebx@3
  unsigned int v4; // edi@5
  int v5; // eax@6
  void (__thiscall *v6)(int, float *, float *); // edx@7
  float fHi; // [sp+4h] [bp-8h]@7
  float fLo; // [sp+8h] [bp-4h]@7

  v1 = this;
  if ( !((LOBYTE(this->m_uFlags) >> 5) & 1) )
  {
    v2 = this->m_spMorphData.m_pObject;
    v3 = v2 ? v2->m_uiNumTargets : 0;
    this->m_fLoKeyTime = 3.4028235e38;
    v4 = 0;
    this->m_fHiKeyTime = -3.4028235e38;
    if ( v3 )
    {
      do
      {
        v5 = (int)v1->vfptr[28].__vecDelDtor((NiRefObject *)v1, v4);
        if ( v5 )
        {
          v6 = *(void (__thiscall **)(int, float *, float *))(*(_DWORD *)v5 + 112);
          fHi = -3.4028235e38;
          fLo = 3.4028235e38;
          v6(v5, &fLo, &fHi);
          if ( v1->m_fLoKeyTime > (double)fLo )
            v1->m_fLoKeyTime = fLo;
          if ( v1->m_fHiKeyTime < (double)fHi )
            v1->m_fHiKeyTime = fHi;
        }
        ++v4;
      }
      while ( v4 < v3 );
    }
  }
}

//----- (007F18C0) --------------------------------------------------------
void __thiscall NiGeomMorpherController::Update(NiGeomMorpherController *this, float fTime)
{
  NiGeomMorpherController *v2; // esi@1

  v2 = this;
  if ( this->m_spMorphData.m_pObject )
  {
    if ( (LOBYTE(this->m_uFlags) >> 5) & 1 )
    {
      this->m_bNeedPreDisplay = 1;
      this->m_fScaledTime = -3.4028235e38;
    }
    else if ( !NiTimeController::DontDoUpdate((NiTimeController *)&this->vfptr, fTime) || v2->m_bAlwaysUpdate )
    {
      v2->m_bNeedPreDisplay = 1;
    }
  }
}

//----- (007F1910) --------------------------------------------------------
void __thiscall NiGeomMorpherController::GenMorphInterp(NiGeomMorpherController *this, float fTime)
{
  NiGeomMorpherController *v2; // esi@1
  int v3; // eax@1
  NiExtraData **v4; // edx@1
  int v5; // ecx@1
  unsigned int v6; // edi@1
  int v7; // ebx@2
  NiMorphData *v8; // eax@2
  NiMorphData::MorphTarget *v9; // ecx@3
  NiMorphData *v10; // eax@12
  NiMorphData::MorphTarget *v11; // ecx@13
  unsigned int v12; // ebx@20
  int v13; // edi@21
  NiMorphData *v14; // eax@22
  NiMorphData::MorphTarget *v15; // ecx@23
  char *pkVerts; // [sp+28h] [bp-10h]@1
  int iVertexDataArraySize; // [sp+2Ch] [bp-Ch]@1
  unsigned int uiNumTargets; // [sp+30h] [bp-8h]@1
  float fFrac; // [sp+34h] [bp-4h]@5

  v2 = this;
  v3 = ((int (*)(void))this->vfptr[37].__vecDelDtor)();
  v4 = v2->m_pTarget[6].m_ppkExtra;
  v5 = *((_WORD *)v4 + 6);
  pkVerts = (char *)v3;
  v6 = 0;
  uiNumTargets = v2->m_spMorphData.m_pObject->m_uiNumTargets;
  iVertexDataArraySize = *((_WORD *)v4 + 6);
  if ( uiNumTargets )
  {
    while ( 1 )
    {
      v7 = (int)v2->vfptr[28].__vecDelDtor((NiRefObject *)v2, v6);
      v8 = v2->m_spMorphData.m_pObject;
      v9 = v6 >= v8->m_uiNumTargets ? 0 : &v8->m_aMorphTargets[v6];
      fFrac = NiMorphData::MorphTarget::GetWeight(v9);
      if ( !v6 )
      {
        if ( v2->m_spMorphData.m_pObject->m_bRelativeTargets )
          break;
      }
      if ( v7
        && (unsigned __int8)((int (__thiscall *)(_DWORD, _DWORD, _DWORD, _DWORD))*(int (__thiscall **)(int, float, NiObjectNET *, float *))(*(_DWORD *)v7 + 76))(
                              v7,
                              v2->m_fScaledTime,
                              v2->m_pTarget,
                              &fFrac) )
      {
        goto LABEL_12;
      }
LABEL_16:
      if ( ++v6 >= uiNumTargets )
      {
        v5 = iVertexDataArraySize;
        goto LABEL_18;
      }
    }
    if ( v2->m_bIgnoreBaseTarget )
      fFrac = 0.0;
    else
      fFrac = 1.0;
LABEL_12:
    v10 = v2->m_spMorphData.m_pObject;
    if ( v6 >= v10->m_uiNumTargets )
      v11 = 0;
    else
      v11 = &v10->m_aMorphTargets[v6];
    CVirtualServer::ProtoStruct<PROTO_NC_BAT_SOMEONEBASH_HIT_CMD>::SetRunTime(v11, fFrac);
    goto LABEL_16;
  }
LABEL_18:
  if ( !v2->m_bIgnoreBaseTarget )
    memset(pkVerts, 0, 12 * v5);
  v12 = 0;
  if ( uiNumTargets )
  {
    v13 = 0;
    do
    {
      v14 = v2->m_spMorphData.m_pObject;
      if ( v12 >= v14->m_uiNumTargets )
        v15 = 0;
      else
        v15 = &v14->m_aMorphTargets[v13];
      fFrac = NiMorphData::MorphTarget::GetWeight(v15);
      if ( fFrac >= 0.001 || fFrac <= -0.001 )
        NiPoint3::PointsPlusEqualFloatTimesPoints(
          (NiPoint3 *)pkVerts,
          fFrac,
          v2->m_spMorphData.m_pObject->m_aMorphTargets[v13].m_aTargetVerts,
          iVertexDataArraySize);
      ++v12;
      ++v13;
    }
    while ( v12 < uiNumTargets );
  }
}

//----- (007F1A80) --------------------------------------------------------
void __thiscall NiGeomMorpherController::SetTarget(NiGeomMorpherController *this, NiObjectNET *pkTarget)
{
  NiGeomMorpherController *v2; // esi@1
  NiRTTI *v3; // eax@2

  v2 = this;
  if ( pkTarget && (v3 = (NiRTTI *)((int (__thiscall *)(_DWORD))pkTarget->vfptr[1].__vecDelDtor)(pkTarget)) != 0 )
  {
    while ( v3 != &NiGeometry::m_RTTI )
    {
      v3 = v3->m_pkBaseRTTI;
      if ( !v3 )
        goto LABEL_5;
    }
    NiTimeController::SetTarget((NiTimeController *)&v2->vfptr, pkTarget);
    if ( v2->m_spMorphData.m_pObject )
    {
      ((void (__thiscall *)(_DWORD))v2->vfptr[38].__vecDelDtor)(v2);
      v2->m_bBoundCalculated = 1;
    }
  }
  else
  {
LABEL_5:
    NiTimeController::SetTarget((NiTimeController *)&v2->vfptr, 0);
  }
}

//----- (007F1AF0) --------------------------------------------------------
void __thiscall NiGeomMorpherController::OnPreDisplay(NiGeomMorpherController *this)
{
  NiGeomMorpherController *v1; // esi@1
  NiExtraData **v2; // ecx@2

  v1 = this;
  if ( this->m_bNeedPreDisplay )
  {
    NiGeomMorpherController::GenMorphInterp(this, this->m_fScaledTime);
    v2 = v1->m_pTarget[6].m_ppkExtra;
    *((_WORD *)v2 + 25) |= 1u;
    if ( v1->m_uFlags & 1 )
    {
      if ( v2[9] )
        ((void (*)(void))(*v2)[5].m_pcName)();
    }
    v1->m_bNeedPreDisplay = 0;
  }
}

//----- (007F1B30) --------------------------------------------------------
void __thiscall NiGeomMorpherController::CalculateMorphBound(NiGeomMorpherController *this)
{
  NiGeomMorpherController *v1; // edi@1
  NiMorphData *v2; // eax@1
  unsigned int v3; // ebx@1
  NiPoint3 **v4; // ecx@3
  unsigned int v5; // esi@5
  signed int v6; // edi@6
  NiMorphData *v7; // ecx@7
  NiPoint3 **v8; // eax@8
  NiBound kTargetBound; // [sp+Ch] [bp-24h]@10
  NiBound kBound; // [sp+1Ch] [bp-14h]@5
  NiGeomMorpherController *v11; // [sp+2Ch] [bp-4h]@1

  v1 = this;
  v2 = this->m_spMorphData.m_pObject;
  v3 = v2->m_uiNumTargets;
  v11 = this;
  if ( v3 )
  {
    if ( v3 )
      v4 = &v2->m_aMorphTargets->m_aTargetVerts;
    else
      v4 = 0;
    NiBound::ComputeFromData(&kBound, v2->m_uiNumVertsPerTarget, *v4);
    v5 = 1;
    if ( v3 > 1 )
    {
      v6 = 1;
      do
      {
        v7 = v11->m_spMorphData.m_pObject;
        if ( v5 >= v7->m_uiNumTargets )
          v8 = 0;
        else
          v8 = &v7->m_aMorphTargets[v6].m_aTargetVerts;
        NiBound::ComputeFromData(&kTargetBound, v7->m_uiNumVertsPerTarget, *v8);
        NiBound::Merge(&kBound, &kTargetBound);
        ++v5;
        ++v6;
      }
      while ( v5 < v3 );
      v1 = v11;
    }
  }
  else
  {
    kBound.m_fRadius = 0.0;
    kBound.m_kCenter = NiPoint3::ZERO;
  }
  *((NiBound *)v1->m_pTarget[6].m_ppkExtra + 1) = kBound;
}

//----- (007F1C00) --------------------------------------------------------
unsigned __int16 __thiscall NiGeomMorpherController::GetInterpolatorCount(NiGeomMorpherController *this)
{
  NiMorphData *v1; // eax@1
  unsigned __int16 result; // ax@2

  v1 = this->m_spMorphData.m_pObject;
  if ( v1 )
    result = v1->m_uiNumTargets;
  else
    result = 0;
  return result;
}

//----- (007F1C10) --------------------------------------------------------
unsigned __int16 __thiscall NiGeomMorpherController::GetInterpolatorIndex(NiGeomMorpherController *this, const char *pcID)
{
  NiGeomMorpherController *v2; // edi@1
  unsigned __int16 result; // ax@2
  unsigned __int16 v4; // bx@3
  unsigned int v5; // esi@4
  NiMorphData *v6; // eax@5
  NiD3DShaderProgramCreatorAsm *v7; // ecx@6
  const char *v8; // eax@8

  v2 = this;
  if ( pcID )
  {
    v4 = 0;
    if ( NiGeomMorpherController::GetNumTargets(this) )
    {
      v5 = 0;
      while ( 1 )
      {
        v6 = v2->m_spMorphData.m_pObject;
        v7 = (NiD3DShaderProgramCreatorAsm *)(v5 >= v6->m_uiNumTargets ? 0 : &v6->m_aMorphTargets[v5]);
        v8 = (const char *)NiD3DXEffectStateManager::GetLastTextureStage(v7);
        if ( !NiStricmp(v8, pcID) )
          break;
        v5 = ++v4;
        if ( v4 >= NiGeomMorpherController::GetNumTargets(v2) )
          goto LABEL_10;
      }
      result = v4;
    }
    else
    {
LABEL_10:
      result = NiInterpController::INVALID_INDEX;
    }
  }
  else
  {
    result = NiInterpController::INVALID_INDEX;
  }
  return result;
}
// 9E7D04: using guessed type const unsigned __int16 NiInterpController::INVALID_INDEX;

//----- (007F1C90) --------------------------------------------------------
void __thiscall NiGeomMorpherController::CreatePoseInterpolator(NiGeomMorpherController *this, unsigned __int16 usIndex)
{
  NiMorphData *v2; // ecx@1
  NiMorphData::MorphTarget *v3; // eax@2
  double v4; // st7@3
  NiFloatInterpolator *v5; // eax@5
  float fValue; // [sp+Ch] [bp+8h]@5

  v2 = this->m_spMorphData.m_pObject;
  if ( usIndex < v2->m_uiNumTargets && (v3 = &v2->m_aMorphTargets[usIndex]) != 0 )
    v4 = NiMorphData::MorphTarget::GetWeight(v3);
  else
    v4 = 0.0;
  fValue = v4;
  v5 = (NiFloatInterpolator *)operator new(0x18u);
  if ( v5 )
    NiFloatInterpolator::NiFloatInterpolator(v5, fValue);
}

//----- (007F1CE0) --------------------------------------------------------
void __thiscall NiGeomMorpherController::SynchronizePoseInterpolator(NiGeomMorpherController *this, NiInterpolator *pkInterp, unsigned __int16 usIndex)
{
  NiMorphData *v3; // ecx@1
  NiMorphData::MorphTarget *v4; // eax@2
  double v5; // st7@3
  NiRTTI *v6; // eax@7
  char v7; // al@10
  float fValue; // [sp+14h] [bp+Ch]@5

  v3 = this->m_spMorphData.m_pObject;
  if ( usIndex < v3->m_uiNumTargets && (v4 = &v3->m_aMorphTargets[usIndex]) != 0 )
    v5 = NiMorphData::MorphTarget::GetWeight(v4);
  else
    v5 = 0.0;
  fValue = v5;
  if ( pkInterp )
  {
    v6 = (NiRTTI *)((int (__thiscall *)(NiInterpolator *))pkInterp->vfptr[1].__vecDelDtor)(pkInterp);
    if ( v6 )
    {
      while ( v6 != &NiFloatInterpolator::m_RTTI )
      {
        v6 = v6->m_pkBaseRTTI;
        if ( !v6 )
          goto LABEL_10;
      }
      v7 = 1;
    }
    else
    {
LABEL_10:
      v7 = 0;
    }
    NiFloatInterpolator::SetPoseValue((NiFloatInterpolator *)(v7 != 0 ? (unsigned int)pkInterp : 0), fValue);
  }
  else
  {
    NiFloatInterpolator::SetPoseValue(0, fValue);
  }
}

//----- (007F1D60) --------------------------------------------------------
void __thiscall NiGeomMorpherController::AllocateInterpArray(NiGeomMorpherController *this, unsigned __int16 usCount)
{
  NiGeomMorpherController *v2; // esi@1
  NiPointer<NiInterpolator> *v3; // eax@1
  NiPointer<NiInterpolator> *v4; // ecx@2
  NiInterpolator *v5; // ebx@2
  int v6; // edi@2
  int v7; // ebx@2
  int v8; // esi@3
  _DWORD *v9; // eax@11
  void *v10; // edx@12
  int v11; // [sp+8h] [bp-8h]@2
  NiGeomMorpherController *v12; // [sp+Ch] [bp-4h]@1

  v2 = this;
  v3 = this->m_aspInterpolators;
  v12 = this;
  if ( v3 )
  {
    v4 = v3 - 1;
    v5 = v3[-1].m_pObject;
    v6 = (int)&v3[(_DWORD)v5];
    v7 = (int)&v5[-1].m_fLastTime + 3;
    v11 = (int)&v3[-1];
    if ( v7 >= 0 )
    {
      do
      {
        v8 = *(_DWORD *)(v6 - 4);
        v6 -= 4;
        if ( v8 && !InterlockedDecrement((volatile LONG *)(v8 + 4)) )
        {
          if ( v8 )
            (**(void (__thiscall ***)(_DWORD, _DWORD))v8)(v8, 1);
        }
        --v7;
      }
      while ( v7 >= 0 );
      v2 = v12;
      v4 = (NiPointer<NiInterpolator> *)v11;
    }
    operator delete(v4);
  }
  if ( usCount )
  {
    v9 = operator new(((4 * usCount | -(usCount / 0x40000000u != 0)) + 4) | -__CFADD__(
                                                                               4 * usCount | -(usCount / 0x40000000u != 0),
                                                                               4));
    if ( v9 )
    {
      *v9 = usCount;
      v10 = v9 + 1;
      if ( usCount - 1 >= 0 )
      {
        memset(v10, 0, 4 * usCount);
        v12->m_aspInterpolators = (NiPointer<NiInterpolator> *)v10;
        return;
      }
    }
    else
    {
      v10 = 0;
    }
    v12->m_aspInterpolators = (NiPointer<NiInterpolator> *)v10;
  }
  else
  {
    v2->m_aspInterpolators = 0;
  }
}

//----- (007F1E40) --------------------------------------------------------
void __thiscall NiGeomMorpherController::SetMorphData(NiGeomMorpherController *this, NiMorphData *pkData, bool bCalculateMorphBound)
{
  NiGeomMorpherController *v3; // edi@1
  NiMorphData *v4; // esi@1
  NiMorphData *v5; // eax@8
  unsigned int v6; // eax@9

  v3 = this;
  v4 = this->m_spMorphData.m_pObject;
  if ( v4 != pkData )
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v3->m_spMorphData.m_pObject = pkData;
    if ( pkData )
      InterlockedIncrement((volatile LONG *)&pkData->m_uiRefCount);
  }
  v5 = v3->m_spMorphData.m_pObject;
  if ( v5 && (v6 = v5->m_uiNumTargets) != 0 )
    NiGeomMorpherController::AllocateInterpArray(v3, v6);
  else
    NiGeomMorpherController::AllocateInterpArray(v3, 0);
  if ( bCalculateMorphBound )
    ((void (__thiscall *)(_DWORD))v3->vfptr[38].__vecDelDtor)(v3);
}

//----- (007F1EC0) --------------------------------------------------------
NiRTTI *NiGeomMorpherController::GetRTTI()
{
  return &NiGeomMorpherController::m_RTTI;
}

//----- (007F1ED0) --------------------------------------------------------
NiPoint3 *__thiscall NiGeomMorpherController::GetVertexData(NiGeomMorpherController *this)
{
  return (NiPoint3 *)*((_DWORD *)this->m_pTarget[6].m_ppkExtra + 8);
}

//----- (007F1EE0) --------------------------------------------------------
void __thiscall NiGeomMorpherController::~NiGeomMorpherController(NiGeomMorpherController *this)
{
  NiGeomMorpherController *v1; // esi@1
  NiMorphData *v2; // edi@1
  NiMorphData *v3; // edi@6

  v1 = this;
  this->vfptr = (NiRefObjectVtbl *)&NiGeomMorpherController::`vftable';
  v2 = this->m_spMorphData.m_pObject;
  if ( v2 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) && v2 )
      v2->vfptr->__vecDelDtor((NiRefObject *)v2, 1u);
    v1->m_spMorphData.m_pObject = 0;
  }
  NiGeomMorpherController::AllocateInterpArray(v1, 0);
  v3 = v1->m_spMorphData.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  NiTimeController::~NiTimeController((NiTimeController *)&v1->vfptr);
}
// 9E6B1C: using guessed type int (__thiscall *NiGeomMorpherController::`vftable')(void *p, char);

//----- (007F1F50) --------------------------------------------------------
void __thiscall NiGeomMorpherController::CopyMembers(NiGeomMorpherController *this, NiGeomMorpherController *pkDest, NiCloningProcess *kCloning)
{
  NiGeomMorpherController *v3; // esi@1
  NiMorphData *v4; // eax@1
  int v5; // ebx@5
  NiObject *v6; // ecx@6
  NiRefObjectVtbl *v7; // esi@7
  NiCloningProcess *v8; // eax@7
  NiGeomMorpherController *v9; // [sp+Ch] [bp-4h]@1

  v3 = this;
  v9 = this;
  NiInterpController::CopyMembers((NiInterpController *)&this->vfptr, (NiInterpController *)&pkDest->vfptr, kCloning);
  pkDest->m_uFlags = v3->m_uFlags;
  v4 = v3->m_spMorphData.m_pObject;
  if ( v4 )
    NiGeomMorpherController::SetMorphData(pkDest, v4, pkDest->m_pTarget != 0);
  if ( NiGeomMorpherController::ms_bAlwaysUpdateClone )
  {
    v3->m_bAlwaysUpdate = 1;
    pkDest->m_bAlwaysUpdate = 1;
  }
  v5 = 0;
  if ( (unsigned __int16)((int (__thiscall *)(NiGeomMorpherController *))v3->vfptr[25].__vecDelDtor)(v3) > 0u )
  {
    do
    {
      v6 = (NiObject *)&v3->m_aspInterpolators[(unsigned __int16)v5].m_pObject->vfptr;
      if ( v6 )
      {
        v7 = pkDest->vfptr;
        v8 = NiObject::CreateSharedClone(v6, kCloning);
        ((void (__thiscall *)(NiGeomMorpherController *, NiCloningProcess *, int))v7[29].__vecDelDtor)(pkDest, v8, v5);
        v3 = v9;
      }
      else
      {
        ((void (__thiscall *)(NiGeomMorpherController *, _DWORD, int))pkDest->vfptr[29].__vecDelDtor)(pkDest, 0, v5);
      }
      ++v5;
    }
    while ( (unsigned __int16)v5 < (unsigned __int16)((int (__thiscall *)(NiGeomMorpherController *))v3->vfptr[25].__vecDelDtor)(v3) );
  }
}
// B620AC: using guessed type bool NiGeomMorpherController::ms_bAlwaysUpdateClone;

//----- (007F2000) --------------------------------------------------------
NiInterpController *__cdecl NiGeomMorpherController::CreateObject()
{
  NiInterpController *v0; // eax@1
  NiInterpController *v1; // esi@1
  NiInterpController *result; // eax@2

  v0 = (NiInterpController *)operator new(0x4Cu);
  v1 = v0;
  if ( v0 )
  {
    NiInterpController::NiInterpController(v0);
    v1->vfptr = (NiRefObjectVtbl *)&NiGeomMorpherController::`vftable';
    v1[1].m_uiRefCount = 0;
    LOWORD(v1[1].vfptr) = 0;
    *(_DWORD *)&v1[1].m_uFlags = 0;
    LODWORD(v1[1].m_fFrequency) = 0;
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E6B1C: using guessed type int (__thiscall *NiGeomMorpherController::`vftable')(void *p, char);

//----- (007F2040) --------------------------------------------------------
void __thiscall NiGeomMorpherController::LoadBinary(NiGeomMorpherController *this, NiStream *kStream)
{
  NiStream *v2; // esi@1
  NiGeomMorpherController *v3; // edi@1
  NiBinaryStream *v4; // eax@3
  NiBinaryStream *v5; // ST00_4@3
  unsigned int (__cdecl *v6)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@3
  NiBinaryStream *v7; // eax@5
  NiBinaryStream *v8; // ST00_4@5
  unsigned int (__cdecl *v9)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@5
  int v10; // [sp+8h] [bp-4h]@5

  v2 = kStream;
  v3 = this;
  NiInterpController::LoadBinary((NiInterpController *)&this->vfptr, kStream);
  if ( v2->m_uiNifFileVersion >= 0xA000102 )
  {
    v4 = v2->m_pkIstr;
    v5 = v4;
    v6 = v4->m_pfnRead;
    kStream = (NiStream *)2;
    v6(v5, &v3->m_uFlags, 2u, (unsigned int *)&kStream, 1u);
  }
  else
  {
    v3->m_uFlags = (v2->m_usNiTimeControllerFlags >> 5) & 0x3F;
  }
  NiStream::ReadLinkID(v2);
  if ( v2->m_uiNifFileVersion >= 0x4000002 )
  {
    v7 = v2->m_pkIstr;
    v8 = v7;
    v9 = v7->m_pfnRead;
    v10 = 1;
    v9(v8, (char *)&kStream + 3, 1u, (unsigned int *)&v10, 1u);
    v3->m_bAlwaysUpdate = BYTE3(kStream) != 0;
  }
  if ( v2->m_uiNifFileVersion >= 0xA010068 )
    NiStream::ReadMultipleLinkIDs(v2);
}

//----- (007F20F0) --------------------------------------------------------
void __thiscall NiGeomMorpherController::LinkObject(NiGeomMorpherController *this, NiStream *kStream)
{
  NiGeomMorpherController *v2; // esi@1
  NiObject *v3; // eax@2
  NiMorphData *v4; // ebx@2
  NiMorphData *v5; // edi@2
  NiMorphData *v6; // eax@9
  unsigned int v7; // eax@10
  NiObject *v8; // eax@14
  NiMorphData *v9; // ebx@14
  NiMorphData *v10; // edi@14
  NiMorphData *v11; // eax@21
  unsigned int v12; // eax@22
  NiMorphData *v13; // eax@26
  unsigned int v14; // edi@27
  int v15; // ebx@28
  NiMorphData *v16; // eax@29
  NiD3DShaderProgram *v17; // ecx@30
  char *v18; // eax@32
  unsigned int v19; // eax@34
  unsigned int v20; // ebx@34
  unsigned int v21; // edi@35
  NiObject *v22; // eax@36
  unsigned int uiNumTargets; // [sp+20h] [bp-4h]@27

  v2 = this;
  NiInterpController::LinkObject((NiPSysUpdateCtlr *)this, kStream);
  if ( v2->m_pTarget )
  {
    v3 = NiStream::GetObjectFromLinkID(kStream);
    v4 = v2->m_spMorphData.m_pObject;
    v5 = (NiMorphData *)v3;
    if ( (NiObject *)v4 != v3 )
    {
      if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
        v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
      v2->m_spMorphData.m_pObject = v5;
      if ( v5 )
        InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
    }
    v6 = v2->m_spMorphData.m_pObject;
    if ( v6 && (v7 = v6->m_uiNumTargets) != 0 )
      NiGeomMorpherController::AllocateInterpArray(v2, v7);
    else
      NiGeomMorpherController::AllocateInterpArray(v2, 0);
    ((void (__thiscall *)(NiGeomMorpherController *))v2->vfptr[38].__vecDelDtor)(v2);
    v2->m_bBoundCalculated = 1;
  }
  else
  {
    v8 = NiStream::GetObjectFromLinkID(kStream);
    v9 = v2->m_spMorphData.m_pObject;
    v10 = (NiMorphData *)v8;
    if ( (NiObject *)v9 != v8 )
    {
      if ( v9 && !InterlockedDecrement((volatile LONG *)&v9->m_uiRefCount) && v9 )
        v9->vfptr->__vecDelDtor((NiRefObject *)v9, 1u);
      v2->m_spMorphData.m_pObject = v10;
      if ( v10 )
        InterlockedIncrement((volatile LONG *)&v10->m_uiRefCount);
    }
    v11 = v2->m_spMorphData.m_pObject;
    if ( v11 && (v12 = v11->m_uiNumTargets) != 0 )
      NiGeomMorpherController::AllocateInterpArray(v2, v12);
    else
      NiGeomMorpherController::AllocateInterpArray(v2, 0);
  }
  if ( kStream->m_uiNifFileVersion < 0xA010068 && (v13 = v2->m_spMorphData.m_pObject) != 0 )
  {
    v14 = 0;
    uiNumTargets = v13->m_uiNumTargets;
    if ( uiNumTargets )
    {
      v15 = 0;
      do
      {
        v16 = v2->m_spMorphData.m_pObject;
        if ( v14 >= v16->m_uiNumTargets )
          v17 = 0;
        else
          v17 = (NiD3DShaderProgram *)&v16->m_aMorphTargets[v15];
        v18 = NiD3DShaderProgram::GetShaderProgramName(v17);
        ((void (__thiscall *)(NiGeomMorpherController *, char *, unsigned int))v2->vfptr[29].__vecDelDtor)(
          v2,
          v18,
          v14++);
        ++v15;
      }
      while ( v14 < uiNumTargets );
    }
  }
  else
  {
    v19 = NiStream::GetNumberOfLinkIDs(kStream);
    v20 = v19;
    if ( v19 )
    {
      v21 = 0;
      if ( v19 )
      {
        do
        {
          v22 = NiStream::GetObjectFromLinkID(kStream);
          ((void (__thiscall *)(NiGeomMorpherController *, NiObject *, unsigned int))v2->vfptr[29].__vecDelDtor)(
            v2,
            v22,
            v21++);
        }
        while ( v21 < v20 );
      }
    }
  }
  if ( v2->m_spMorphData.m_pObject )
  {
    if ( kStream->m_uiNifFileVersion <= 0x401000C )
      ((void (__thiscall *)(_DWORD, _DWORD, _DWORD))v2->vfptr[35].__vecDelDtor)(v2, v2->m_fLoKeyTime, v2->m_fHiKeyTime);
  }
}

//----- (007F2280) --------------------------------------------------------
void __thiscall NiGeomMorpherController::SaveBinary(NiGeomMorpherController *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiGeomMorpherController *v3; // esi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST00_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v7; // eax@1
  NiBinaryStream *v8; // ST00_4@1
  unsigned int (__cdecl *v9)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  unsigned int v10; // ecx@1
  NiBinaryStream *v11; // eax@1
  unsigned int (__cdecl *v12)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@1
  unsigned int v13; // ebx@1
  int v14; // eax@2
  int v15; // [sp+Ch] [bp-8h]@1
  unsigned int uiInterpCount; // [sp+10h] [bp-4h]@1

  v2 = kStream;
  v3 = this;
  NiKeyframeManager::SaveBinary((NiPSysUpdateCtlr *)this, kStream);
  v4 = v2->m_pkOstr;
  v5 = v4;
  v6 = v4->m_pfnWrite;
  v15 = 2;
  v6(v5, &v3->m_uFlags, 2u, (unsigned int *)&v15, 1u);
  v2->vfptr->SaveLinkID(v2, (NiObject *)v3->m_spMorphData.m_pObject);
  BYTE3(kStream) = v3->m_bAlwaysUpdate;
  v7 = v2->m_pkOstr;
  v8 = v7;
  v9 = v7->m_pfnWrite;
  v15 = 1;
  v9(v8, (char *)&kStream + 3, 1u, (unsigned int *)&v15, 1u);
  v10 = (unsigned __int16)((int (__thiscall *)(NiGeomMorpherController *))v3->vfptr[25].__vecDelDtor)(v3);
  v11 = v2->m_pkOstr;
  uiInterpCount = v10;
  v12 = v11->m_pfnWrite;
  v15 = 4;
  v12(v11, &uiInterpCount, 4u, (unsigned int *)&v15, 1u);
  v13 = 0;
  if ( uiInterpCount )
  {
    do
    {
      v14 = (int)v3->vfptr[28].__vecDelDtor((NiRefObject *)v3, v13);
      v2->vfptr->SaveLinkID(v2, (NiObject *)v14);
      ++v13;
    }
    while ( (unsigned __int16)v13 < uiInterpCount );
  }
}

//----- (007F2350) --------------------------------------------------------
NiGeomMorpherController *__thiscall NiGeomMorpherController::`vector deleting destructor'(NiGeomMorpherController *this, unsigned int a2)
{
  NiGeomMorpherController *v2; // esi@1

  v2 = this;
  NiGeomMorpherController::~NiGeomMorpherController(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007F2380) --------------------------------------------------------
NiInterpController *__thiscall NiGeomMorpherController::CreateClone(NiGeomMorpherController *this, NiCloningProcess *kCloning)
{
  NiGeomMorpherController *v2; // edi@1
  NiInterpController *v3; // eax@1
  NiInterpController *v4; // esi@1

  v2 = this;
  v3 = (NiInterpController *)operator new(0x4Cu);
  v4 = v3;
  if ( v3 )
  {
    NiInterpController::NiInterpController(v3);
    v4->vfptr = (NiRefObjectVtbl *)&NiGeomMorpherController::`vftable';
    v4[1].m_uiRefCount = 0;
    *(_DWORD *)&v4[1].m_uFlags = 0;
    LOWORD(v4[1].vfptr) = 0;
    LODWORD(v4[1].m_fFrequency) = 0;
  }
  else
  {
    v4 = 0;
  }
  NiGeomMorpherController::CopyMembers(v2, (NiGeomMorpherController *)v4, kCloning);
  return v4;
}
// 9E6B1C: using guessed type int (__thiscall *NiGeomMorpherController::`vftable')(void *p, char);

//----- (007F23D0) --------------------------------------------------------
NiObject *__cdecl NiFloatsExtraDataPoint3Controller::CreateObject()
{
  NiExtraDataController *v0; // eax@1
  NiObject *v1; // esi@1
  NiObject *result; // eax@2

  v0 = (NiExtraDataController *)operator new(0x50u);
  v1 = (NiObject *)v0;
  if ( v0 )
  {
    NiExtraDataController::NiExtraDataController(v0);
    v1->vfptr = (NiRefObjectVtbl *)&NiFloatsExtraDataPoint3Controller::`vftable';
    v1[9].vfptr = (NiRefObjectVtbl *)-1;
    v1[9].m_uiRefCount = 0;
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E6BBC: using guessed type int (__thiscall *NiFloatsExtraDataPoint3Controller::`vftable')(void *p, char);

//----- (007F2410) --------------------------------------------------------
void __thiscall NiAlphaRefController::LinkObject(NiAlphaRefController *this, NiStream *stream)
{
  NiPoint3InterpController::LinkObject((NiPSysModifierCtlr *)this, stream);
}

//----- (007F2420) --------------------------------------------------------
bool __thiscall NiFloatsExtraDataPoint3Controller::IsEqual(NiFloatsExtraDataPoint3Controller *this, NiObject *pkObject)
{
  NiFloatsExtraDataPoint3Controller *v2; // esi@1
  bool result; // al@1

  v2 = this;
  result = NiExtraDataController::IsEqual((NiExtraDataController *)&this->vfptr, pkObject);
  if ( result )
    result = (NiRefObjectVtbl *)v2->m_iFloatsExtraDataIndex == pkObject[9].vfptr;
  return result;
}

//----- (007F2450) --------------------------------------------------------
NiRTTI *NiFloatsExtraDataPoint3Controller::GetRTTI()
{
  return &NiFloatsExtraDataPoint3Controller::m_RTTI;
}

//----- (007F2460) --------------------------------------------------------
NiFloatsExtraDataPoint3Controller *__thiscall NiFloatsExtraDataPoint3Controller::`vector deleting destructor'(NiFloatsExtraDataPoint3Controller *this, unsigned int a2)
{
  NiFloatsExtraDataPoint3Controller *v2; // esi@1
  char *v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pcCtlrID;
  this->vfptr = (NiRefObjectVtbl *)&NiFloatsExtraDataPoint3Controller::`vftable';
  operator delete(v3);
  NiExtraDataController::~NiExtraDataController((NiExtraDataController *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E6BBC: using guessed type int (__thiscall *NiFloatsExtraDataPoint3Controller::`vftable')(void *p, char);

//----- (007F24A0) --------------------------------------------------------
void __thiscall NiFloatsExtraDataPoint3Controller::CreatePoseInterpolator(NiFloatsExtraDataPoint3Controller *this, unsigned __int16 usIndex)
{
  NiFloatsExtraDataPoint3Controller *v2; // esi@1
  NiFloatsExtraData *v3; // edi@1
  NiPoint3Interpolator *v4; // eax@1
  _BYTE v5[12]; // ST00_12@2
  float kPt; // [sp+8h] [bp-Ch]@1
  __int64 kPt_4; // [sp+Ch] [bp-8h]@1

  v2 = this;
  v3 = (NiFloatsExtraData *)this->m_spExtraData.m_pObject;
  kPt = NiFloatsExtraData::GetValue(v3, this->m_iFloatsExtraDataIndex);
  *(float *)&kPt_4 = NiFloatsExtraData::GetValue(v3, v2->m_iFloatsExtraDataIndex + 1);
  *((float *)&kPt_4 + 1) = NiFloatsExtraData::GetValue(v3, v2->m_iFloatsExtraDataIndex + 2);
  v4 = (NiPoint3Interpolator *)operator new(0x20u);
  if ( v4 )
  {
    *(float *)v5 = kPt;
    *(_QWORD *)&v5[4] = kPt_4;
    NiPoint3Interpolator::NiPoint3Interpolator(v4, *(NiPoint3 *)v5);
  }
}

//----- (007F2520) --------------------------------------------------------
NiPSysModifierCtlr *__thiscall NiFloatsExtraDataPoint3Controller::CreateClone(NiFloatsExtraDataPoint3Controller *this, NiCloningProcess *kCloning)
{
  NiPSysModifierCtlr *v2; // edi@1
  NiExtraDataController *v3; // eax@1
  NiPSysModifierCtlr *v4; // esi@1

  v2 = (NiPSysModifierCtlr *)this;
  v3 = (NiExtraDataController *)operator new(0x50u);
  v4 = (NiPSysModifierCtlr *)v3;
  if ( v3 )
  {
    NiExtraDataController::NiExtraDataController(v3);
    v4->vfptr = (NiRefObjectVtbl *)&NiFloatsExtraDataPoint3Controller::`vftable';
    v4[1].vfptr = (NiRefObjectVtbl *)-1;
    v4[1].m_uiRefCount = 0;
  }
  else
  {
    v4 = 0;
  }
  NiPSysModifierCtlr::CopyMembers(v2, v4, kCloning);
  v4[1].vfptr = v2[1].vfptr;
  return v4;
}
// 9E6BBC: using guessed type int (__thiscall *NiFloatsExtraDataPoint3Controller::`vftable')(void *p, char);

//----- (007F2570) --------------------------------------------------------
void __thiscall NiFloatsExtraDataPoint3Controller::SynchronizePoseInterpolator(NiFloatsExtraDataPoint3Controller *this, NiInterpolator *pkInterp, unsigned __int16 usIndex)
{
  NiFloatsExtraDataPoint3Controller *v3; // ebx@1
  NiPoint3Interpolator *v4; // esi@2
  NiRTTI *v5; // eax@3
  char v6; // al@6
  NiFloatsExtraData *v7; // edi@8
  float kPt; // ST18_4@8
  __int64 ST1C_8_8; // ST1C_8@8
  _BYTE v10[12]; // ST00_12@8

  v3 = this;
  if ( pkInterp )
  {
    v5 = (NiRTTI *)((int (__thiscall *)(NiInterpolator *))pkInterp->vfptr[1].__vecDelDtor)(pkInterp);
    if ( v5 )
    {
      while ( v5 != &NiPoint3Interpolator::m_RTTI )
      {
        v5 = v5->m_pkBaseRTTI;
        if ( !v5 )
          goto LABEL_6;
      }
      v6 = 1;
    }
    else
    {
LABEL_6:
      v6 = 0;
    }
    v4 = (NiPoint3Interpolator *)(v6 != 0 ? (unsigned int)pkInterp : 0);
  }
  else
  {
    v4 = 0;
  }
  v7 = (NiFloatsExtraData *)v3->m_spExtraData.m_pObject;
  kPt = NiFloatsExtraData::GetValue(v7, v3->m_iFloatsExtraDataIndex);
  *(float *)&ST1C_8_8 = NiFloatsExtraData::GetValue(v7, v3->m_iFloatsExtraDataIndex + 1);
  *((float *)&ST1C_8_8 + 1) = NiFloatsExtraData::GetValue(v7, v3->m_iFloatsExtraDataIndex + 2);
  *(float *)v10 = kPt;
  *(_QWORD *)&v10[4] = ST1C_8_8;
  NiPoint3Interpolator::SetPoseValue(v4, *(NiPoint3 *)v10);
}

//----- (007F2610) --------------------------------------------------------
void __thiscall NiFloatsExtraDataPoint3Controller::Update(NiFloatsExtraDataPoint3Controller *this, float fTime)
{
  NiFloatsExtraDataPoint3Controller *v2; // esi@1
  NiInterpolator *v3; // ecx@4
  NiInterpolator *v4; // ecx@6
  NiFloatsExtraData *v5; // edi@8
  NiPoint3 kValue; // [sp+18h] [bp-Ch]@7

  v2 = this;
  if ( (LOBYTE(this->m_uFlags) >> 5) & 1 )
  {
    this->m_fScaledTime = -3.4028235e38;
  }
  else if ( NiTimeController::DontDoUpdate((NiTimeController *)&this->vfptr, fTime) )
  {
    v3 = v2->m_spInterpolator.m_pObject;
    if ( !v3 || !(unsigned __int8)((int (*)(void))v3->vfptr[33].__vecDelDtor)() )
      return;
  }
  v4 = v2->m_spInterpolator.m_pObject;
  if ( v4
    && (unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD, _DWORD))v4->vfptr[17].__vecDelDtor)(
                          v2->m_fScaledTime,
                          v2->m_pTarget,
                          &kValue) )
  {
    v5 = (NiFloatsExtraData *)v2->m_spExtraData.m_pObject;
    if ( v5 )
    {
      NiFloatsExtraData::SetValue(v5, v2->m_iFloatsExtraDataIndex, kValue.x);
      NiFloatsExtraData::SetValue(v5, v2->m_iFloatsExtraDataIndex + 1, kValue.y);
      NiFloatsExtraData::SetValue(v5, v2->m_iFloatsExtraDataIndex + 2, kValue.z);
    }
  }
}

//----- (007F26C0) --------------------------------------------------------
void __thiscall NiFloatsExtraDataPoint3Controller::LoadBinary(NiFloatsExtraDataPoint3Controller *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiFloatsExtraDataPoint3Controller *v3; // esi@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@1
  NiBinaryStream *v5; // ST00_4@1

  v2 = kStream;
  v3 = this;
  NiPSysModifierCtlr::LoadBinary((NiPSysModifierCtlr *)this, kStream);
  v4 = v2->m_pkIstr->m_pfnRead;
  v5 = v2->m_pkIstr;
  kStream = (NiStream *)4;
  v4(v5, &v3->m_iFloatsExtraDataIndex, 4u, (unsigned int *)&kStream, 1u);
}

//----- (007F2700) --------------------------------------------------------
void __thiscall NiFloatsExtraDataPoint3Controller::GetViewerStrings(NiFloatsExtraDataPoint3Controller *this, NiTArray<char *> *pkStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiFloatsExtraDataPoint3Controller *v3; // ebx@1
  NiTArray<char *> *v4; // eax@1
  unsigned int v5; // edi@1
  NiTArray<char *> *v6; // eax@3
  unsigned int v7; // edi@3

  v2 = (NiTArray<NiVBBlock *> *)pkStrings;
  v3 = this;
  NiExtraDataController::GetViewerStrings((NiExtraDataController *)&this->vfptr, pkStrings);
  v4 = (NiTArray<char *> *)NiGetViewerString(NiFloatsExtraDataPoint3Controller::m_RTTI.m_pcName);
  v5 = v2->m_uiSize;
  pkStrings = v4;
  if ( v5 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v5 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v5, (NiVBChip *const *)&pkStrings);
  v6 = (NiTArray<char *> *)NiGetViewerString("m_iFloatsExtraDataIndex", v3->m_iFloatsExtraDataIndex);
  v7 = v2->m_uiSize;
  pkStrings = v6;
  if ( v7 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v7 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v7, (NiVBChip *const *)&pkStrings);
}

//----- (007F2780) --------------------------------------------------------
NiObject *__cdecl NiFloatsExtraDataController::CreateObject()
{
  NiExtraDataController *v0; // eax@1
  NiObject *v1; // esi@1
  NiObject *result; // eax@2

  v0 = (NiExtraDataController *)operator new(0x50u);
  v1 = (NiObject *)v0;
  if ( v0 )
  {
    NiExtraDataController::NiExtraDataController(v0);
    v1->vfptr = (NiRefObjectVtbl *)&NiFloatsExtraDataController::`vftable';
    v1[9].vfptr = (NiRefObjectVtbl *)-1;
    v1[9].m_uiRefCount = 0;
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E6C7C: using guessed type int (__thiscall *NiFloatsExtraDataController::`vftable')(void *p, char);

//----- (007F27C0) --------------------------------------------------------
NiRTTI *NiFloatsExtraDataController::GetRTTI()
{
  return &NiFloatsExtraDataController::m_RTTI;
}

//----- (007F27D0) --------------------------------------------------------
NiFloatsExtraDataController *__thiscall NiFloatsExtraDataController::`scalar deleting destructor'(NiFloatsExtraDataController *this, unsigned int a2)
{
  NiFloatsExtraDataController *v2; // esi@1
  char *v3; // ST00_4@1

  v2 = this;
  v3 = this->m_pcCtlrID;
  this->vfptr = (NiRefObjectVtbl *)&NiFloatsExtraDataController::`vftable';
  operator delete(v3);
  NiExtraDataController::~NiExtraDataController((NiExtraDataController *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E6C7C: using guessed type int (__thiscall *NiFloatsExtraDataController::`vftable')(void *p, char);

//----- (007F2810) --------------------------------------------------------
void __thiscall NiFloatsExtraDataController::CreatePoseInterpolator(NiFloatsExtraDataController *this, unsigned __int16 usIndex)
{
  NiFloatsExtraDataController *v2; // esi@1
  NiFloatInterpolator *v3; // edi@1
  float fPoseValue; // ST00_4@2

  v2 = this;
  v3 = (NiFloatInterpolator *)operator new(0x18u);
  if ( v3 )
  {
    fPoseValue = NiFloatsExtraData::GetValue(
                   (NiFloatsExtraData *)v2->m_spExtraData.m_pObject,
                   v2->m_iFloatsExtraDataIndex);
    NiFloatInterpolator::NiFloatInterpolator(v3, fPoseValue);
  }
}

//----- (007F2850) --------------------------------------------------------
char *__thiscall NiFloatsExtraDataPoint3Controller::GetCtlrID(NiFloatsExtraDataPoint3Controller *this)
{
  NiFloatsExtraDataPoint3Controller *v1; // esi@1
  char *result; // eax@1
  const char *v3; // ebx@2
  unsigned int v4; // kr00_4@3
  char *v5; // eax@3
  int v6; // ST10_4@3

  v1 = this;
  result = this->m_pcCtlrID;
  if ( !result )
  {
    operator delete(0);
    v3 = v1->m_pcExtraDataName;
    v1->m_pcCtlrID = 0;
    if ( v3 )
    {
      v4 = strlen(v3);
      v5 = (char *)operator new(v4 + 15);
      v6 = v1->m_iFloatsExtraDataIndex;
      v1->m_pcCtlrID = v5;
      NiSprintf(v5, v4 + 15, "%s[%d]", v3, v6);
    }
    result = v1->m_pcCtlrID;
  }
  return result;
}

//----- (007F28B0) --------------------------------------------------------
NiPSysModifierCtlr *__thiscall NiFloatsExtraDataController::CreateClone(NiFloatsExtraDataController *this, NiCloningProcess *kCloning)
{
  NiPSysModifierCtlr *v2; // edi@1
  NiExtraDataController *v3; // eax@1
  NiPSysModifierCtlr *v4; // esi@1

  v2 = (NiPSysModifierCtlr *)this;
  v3 = (NiExtraDataController *)operator new(0x50u);
  v4 = (NiPSysModifierCtlr *)v3;
  if ( v3 )
  {
    NiExtraDataController::NiExtraDataController(v3);
    v4->vfptr = (NiRefObjectVtbl *)&NiFloatsExtraDataController::`vftable';
    v4[1].vfptr = (NiRefObjectVtbl *)-1;
    v4[1].m_uiRefCount = 0;
  }
  else
  {
    v4 = 0;
  }
  NiPSysModifierCtlr::CopyMembers(v2, v4, kCloning);
  v4[1].vfptr = v2[1].vfptr;
  return v4;
}
// 9E6C7C: using guessed type int (__thiscall *NiFloatsExtraDataController::`vftable')(void *p, char);

//----- (007F2900) --------------------------------------------------------
void __thiscall NiFloatsExtraDataController::SynchronizePoseInterpolator(NiFloatsExtraDataController *this, NiInterpolator *pkInterp, unsigned __int16 usIndex)
{
  NiFloatsExtraDataController *v3; // ebx@1
  NiFloatInterpolator *v4; // esi@2
  NiRTTI *v5; // eax@3
  char v6; // al@6
  float fPoseValue; // ST00_4@8

  v3 = this;
  if ( pkInterp )
  {
    v5 = (NiRTTI *)((int (__thiscall *)(NiInterpolator *))pkInterp->vfptr[1].__vecDelDtor)(pkInterp);
    if ( v5 )
    {
      while ( v5 != &NiFloatInterpolator::m_RTTI )
      {
        v5 = v5->m_pkBaseRTTI;
        if ( !v5 )
          goto LABEL_6;
      }
      v6 = 1;
    }
    else
    {
LABEL_6:
      v6 = 0;
    }
    v4 = (NiFloatInterpolator *)(v6 != 0 ? (unsigned int)pkInterp : 0);
  }
  else
  {
    v4 = 0;
  }
  fPoseValue = NiFloatsExtraData::GetValue(
                 (NiFloatsExtraData *)v3->m_spExtraData.m_pObject,
                 v3->m_iFloatsExtraDataIndex);
  NiFloatInterpolator::SetPoseValue(v4, fPoseValue);
}

//----- (007F2960) --------------------------------------------------------
void __thiscall NiFloatsExtraDataController::Update(NiFloatsExtraDataController *this, float fTime)
{
  NiFloatsExtraDataController *v2; // esi@1
  NiInterpolator *v3; // ecx@4
  NiInterpolator *v4; // ecx@6
  NiFloatsExtraData *v5; // ecx@8

  v2 = this;
  if ( (LOBYTE(this->m_uFlags) >> 5) & 1 )
  {
    this->m_fScaledTime = -3.4028235e38;
  }
  else if ( NiTimeController::DontDoUpdate((NiTimeController *)&this->vfptr, fTime) )
  {
    v3 = v2->m_spInterpolator.m_pObject;
    if ( !v3 || !(unsigned __int8)((int (*)(void))v3->vfptr[33].__vecDelDtor)() )
      return;
  }
  v4 = v2->m_spInterpolator.m_pObject;
  if ( v4
    && (unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD, _DWORD))v4->vfptr[19].__vecDelDtor)(
                          v2->m_fScaledTime,
                          v2->m_pTarget,
                          &fTime) )
  {
    v5 = (NiFloatsExtraData *)v2->m_spExtraData.m_pObject;
    if ( v5 )
      NiFloatsExtraData::SetValue(v5, v2->m_iFloatsExtraDataIndex, fTime);
  }
}

//----- (007F29E0) --------------------------------------------------------
void __thiscall NiFloatsExtraDataController::LoadBinary(NiFloatsExtraDataController *this, NiStream *kStream)
{
  NiStream *v2; // esi@1
  NiFloatsExtraDataController *v3; // edi@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@1
  NiBinaryStream *v5; // ST00_4@1

  v2 = kStream;
  v3 = this;
  NiPSysModifierCtlr::LoadBinary((NiPSysModifierCtlr *)this, kStream);
  v4 = v2->m_pkIstr->m_pfnRead;
  v5 = v2->m_pkIstr;
  kStream = (NiStream *)4;
  v4(v5, &v3->m_iFloatsExtraDataIndex, 4u, (unsigned int *)&kStream, 1u);
  if ( v2->m_uiNifFileVersion < 0xA010068 )
    NiStream::ReadLinkID(v2);
}

//----- (007F2A30) --------------------------------------------------------
void __thiscall NiFloatsExtraDataPoint3Controller::SaveBinary(NiFloatsExtraDataPoint3Controller *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiFloatsExtraDataPoint3Controller *v3; // esi@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@1
  NiBinaryStream *v5; // ST00_4@1

  v2 = kStream;
  v3 = this;
  NiPSysModifierCtlr::SaveBinary((NiPSysModifierCtlr *)this, kStream);
  v4 = v2->m_pkOstr->m_pfnWrite;
  v5 = v2->m_pkOstr;
  kStream = (NiStream *)4;
  v4(v5, &v3->m_iFloatsExtraDataIndex, 4u, (unsigned int *)&kStream, 1u);
}

//----- (007F2A70) --------------------------------------------------------
void __thiscall NiFloatsExtraDataController::GetViewerStrings(NiFloatsExtraDataController *this, NiTArray<char *> *pkStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiFloatsExtraDataController *v3; // ebx@1
  NiTArray<char *> *v4; // eax@1
  unsigned int v5; // edi@1
  NiTArray<char *> *v6; // eax@3
  unsigned int v7; // edi@3

  v2 = (NiTArray<NiVBBlock *> *)pkStrings;
  v3 = this;
  NiExtraDataController::GetViewerStrings((NiExtraDataController *)&this->vfptr, pkStrings);
  v4 = (NiTArray<char *> *)NiGetViewerString(NiFloatsExtraDataController::m_RTTI.m_pcName);
  v5 = v2->m_uiSize;
  pkStrings = v4;
  if ( v5 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v5 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v5, (NiVBChip *const *)&pkStrings);
  v6 = (NiTArray<char *> *)NiGetViewerString("m_iFloatsExtraDataIndex", v3->m_iFloatsExtraDataIndex);
  v7 = v2->m_uiSize;
  pkStrings = v6;
  if ( v7 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v7 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v7, (NiVBChip *const *)&pkStrings);
}

//----- (007F2AF0) --------------------------------------------------------
void __thiscall NiFloatInterpolator::NiFloatInterpolator(NiFloatInterpolator *this, NiFloatData *pkFloatData)
{
  NiFloatInterpolator *v2; // esi@1

  v2 = this;
  NiKeyBasedInterpolator::NiKeyBasedInterpolator((NiKeyBasedInterpolator *)&this->vfptr);
  v2->vfptr = (NiRefObjectVtbl *)&NiFloatInterpolator::`vftable';
  v2->m_fFloatValue = -3.4028235e38;
  v2->m_spFloatData.m_pObject = pkFloatData;
  if ( pkFloatData )
    InterlockedIncrement((volatile LONG *)&pkFloatData->m_uiRefCount);
  v2->m_uiLastIdx = 0;
}
// 9E6D1C: using guessed type int (__thiscall *NiFloatInterpolator::`vftable')(void *p, char);

//----- (007F2B30) --------------------------------------------------------
NiRTTI *NiFloatInterpolator::GetRTTI()
{
  return &NiFloatInterpolator::m_RTTI;
}

//----- (007F2B40) --------------------------------------------------------
void __thiscall NiFloatInterpolator::NiFloatInterpolator(NiFloatInterpolator *this, float fPoseValue)
{
  NiFloatInterpolator *v2; // esi@1

  v2 = this;
  NiKeyBasedInterpolator::NiKeyBasedInterpolator((NiKeyBasedInterpolator *)&this->vfptr);
  v2->m_fFloatValue = fPoseValue;
  v2->vfptr = (NiRefObjectVtbl *)&NiFloatInterpolator::`vftable';
  v2->m_spFloatData.m_pObject = 0;
  v2->m_uiLastIdx = 0;
}
// 9E6D1C: using guessed type int (__thiscall *NiFloatInterpolator::`vftable')(void *p, char);

//----- (007F2B70) --------------------------------------------------------
char __thiscall NiBoolInterpolator::GetKeyStride(NiFloatInterpolator *this, unsigned __int16 usChannel)
{
  NiFloatData *v2; // eax@1
  char result; // al@2

  v2 = this->m_spFloatData.m_pObject;
  if ( v2 )
    result = v2->m_ucKeySize;
  else
    result = 0;
  return result;
}

//----- (007F2B90) --------------------------------------------------------
bool __thiscall NiFloatInterpolator::GetChannelPosed(NiFloatInterpolator *this, unsigned __int16 usChannel)
{
  return !this->m_spFloatData.m_pObject && -3.4028235e38 != this->m_fFloatValue;
}

//----- (007F2BC0) --------------------------------------------------------
void __thiscall NiFloatInterpolator::Collapse(NiFloatInterpolator *this)
{
  NiFloatInterpolator *v1; // edx@1
  NiFloatData *v2; // eax@1
  NiAnimationKey::KeyType v3; // ecx@2
  unsigned int v4; // esi@2
  NiFloatKey *v5; // edi@2
  NiFloatData *v6; // esi@3
  double v7; // st7@9
  char v8; // dl@12
  unsigned int v9; // ecx@12
  NiFloatData *v10; // esi@20
  float fValue; // [sp+0h] [bp-8h]@9
  NiFloatInterpolator *v12; // [sp+4h] [bp-4h]@1

  v1 = this;
  v2 = this->m_spFloatData.m_pObject;
  v12 = this;
  if ( !v2 )
    return;
  v3 = v2->m_eType;
  v4 = v2->m_uiNumKeys;
  v5 = v2->m_pkKeys;
  if ( !v4 )
  {
    v6 = v2;
    if ( v2 )
    {
      if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
      {
        if ( v6 )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
      v12->m_spFloatData.m_pObject = 0;
      v1 = v12;
    }
    v1->m_fFloatValue = -3.4028235e38;
    return;
  }
  fValue = v5->m_fValue;
  v7 = fValue;
  if ( v4 == 1 )
    goto LABEL_20;
  if ( v3 == 1 || v3 == 5 )
  {
    v8 = 1;
    v9 = 1;
    while ( v9 < v4 )
    {
      if ( v7 != *(float *)((char *)&v5->m_fValue + v9 * v2->m_ucKeySize) )
        v8 = 0;
      ++v9;
      if ( !v8 )
        return;
    }
    if ( v8 )
    {
      v1 = v12;
LABEL_20:
      v10 = v1->m_spFloatData.m_pObject;
      if ( v10 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v10->m_uiRefCount) && v10 )
          v10->vfptr->__vecDelDtor((NiRefObject *)v10, 1u);
        v7 = fValue;
        v12->m_spFloatData.m_pObject = 0;
        v1 = v12;
      }
      v1->m_fFloatValue = v7;
      return;
    }
  }
}

//----- (007F2CC0) --------------------------------------------------------
void __thiscall NiFloatInterpolator::SetPoseValue(NiFloatInterpolator *this, float fPoseValue)
{
  NiFloatInterpolator *v2; // edi@1
  NiFloatData *v3; // esi@1

  v2 = this;
  v3 = this->m_spFloatData.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spFloatData.m_pObject = 0;
  }
  v2->m_fFloatValue = fPoseValue;
}

//----- (007F2D00) --------------------------------------------------------
void __thiscall NiFloatInterpolator::GuaranteeTimeRange(NiFloatInterpolator *this, float fStartTime, float fEndTime)
{
  NiFloatData *v3; // ecx@1

  v3 = this->m_spFloatData.m_pObject;
  if ( v3 )
    NiFloatData::GuaranteeKeysAtStartAndEnd(v3, fStartTime, fEndTime);
}

//----- (007F2D30) --------------------------------------------------------
NiKeyBasedInterpolator *__cdecl NiFloatInterpolator::CreateObject()
{
  NiKeyBasedInterpolator *v0; // eax@1
  NiKeyBasedInterpolator *v1; // esi@1
  NiKeyBasedInterpolator *result; // eax@2

  v0 = (NiKeyBasedInterpolator *)operator new(0x18u);
  v1 = v0;
  if ( v0 )
  {
    NiKeyBasedInterpolator::NiKeyBasedInterpolator(v0);
    v1->vfptr = (NiRefObjectVtbl *)&NiFloatInterpolator::`vftable';
    *(float *)&v1[1].vfptr = -3.4028235e38;
    v1[1].m_uiRefCount = 0;
    LODWORD(v1[1].m_fLastTime) = 0;
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E6D1C: using guessed type int (__thiscall *NiFloatInterpolator::`vftable')(void *p, char);

//----- (007F2D70) --------------------------------------------------------
char __thiscall NiFloatInterpolator::IsEqual(NiFloatInterpolator *this, NiObject *pkObject)
{
  NiFloatInterpolator *v2; // esi@1
  NiFloatData *v4; // ecx@4

  v2 = this;
  if ( !NiKeyBasedInterpolator::IsEqual((NiKeyBasedInterpolator *)&this->vfptr, pkObject)
    || *(float *)&pkObject[1].m_uiRefCount != v2->m_fFloatValue )
  {
    return 0;
  }
  v4 = v2->m_spFloatData.m_pObject;
  if ( v4 )
  {
    if ( !pkObject[2].vfptr )
      return 0;
    if ( v4 )
      goto LABEL_13;
  }
  if ( pkObject[2].vfptr )
    return 0;
  if ( v4 )
  {
LABEL_13:
    if ( (unsigned __int8)((int (__stdcall *)(_DWORD))v4->vfptr[7].__vecDelDtor)(pkObject[2].vfptr) )
      return 1;
    return 0;
  }
  return 1;
}

//----- (007F2DD0) --------------------------------------------------------
NiFloatKey *__thiscall NiBoolInterpolator::GetKeys(NiFloatInterpolator *this, unsigned int *uiNumKeys, NiAnimationKey::KeyType *eType, char *ucSize)
{
  NiFloatData *v4; // eax@1
  NiFloatKey *result; // eax@2

  v4 = this->m_spFloatData.m_pObject;
  if ( v4 )
  {
    *uiNumKeys = v4->m_uiNumKeys;
    *eType = v4->m_eType;
    *ucSize = v4->m_ucKeySize;
    result = v4->m_pkKeys;
  }
  else
  {
    *uiNumKeys = 0;
    *eType = 0;
    *ucSize = 0;
    result = 0;
  }
  return result;
}

//----- (007F2E20) --------------------------------------------------------
NiInterpolator *__thiscall NiFloatInterpolator::GetSequenceInterpolator(NiFloatInterpolator *this, float fStartTime, float fEndTime)
{
  NiFloatInterpolator *v3; // esi@1
  NiInterpolator *result; // eax@1
  NiFloatData *v5; // ecx@1
  NiInterpolator *v6; // edi@1
  float v7; // eax@2
  unsigned int v8; // esi@2
  float v9; // ebx@2
  void (__thiscall ***v10)(_DWORD, _DWORD); // esi@11

  v3 = this;
  result = (NiInterpolator *)NiInterpolator::GetSequenceInterpolator(
                               (NiInterpolator *)&this->vfptr,
                               fStartTime,
                               fEndTime);
  v5 = v3->m_spFloatData.m_pObject;
  v6 = result;
  if ( v5 )
  {
    NiFloatData::GetSequenceData(v5, (NiPointer<NiFloatData> *)&fEndTime, fStartTime, fEndTime);
    v7 = fEndTime;
    v8 = v6[1].m_uiRefCount;
    v9 = fEndTime;
    if ( v8 != LODWORD(fEndTime) )
    {
      if ( v8 )
      {
        if ( !InterlockedDecrement((volatile LONG *)(v8 + 4)) && v8 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v8)(v8, 1);
        v7 = fEndTime;
      }
      *(float *)&v6[1].m_uiRefCount = v9;
      if ( v9 != 0.0 )
      {
        InterlockedIncrement((volatile LONG *)(LODWORD(v9) + 4));
        v7 = fEndTime;
      }
    }
    LODWORD(v6[1].m_fLastTime) = 0;
    if ( v7 != 0.0 )
    {
      v10 = (void (__thiscall ***)(_DWORD, _DWORD))LODWORD(v7);
      if ( !InterlockedDecrement((volatile LONG *)(LODWORD(v7) + 4)) )
      {
        if ( v10 )
          (**v10)(v10, 1);
      }
    }
    result = v6;
  }
  return result;
}

//----- (007F2EE0) --------------------------------------------------------
char __thiscall NiFloatInterpolator::Update(NiFloatInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, float *fValue)
{
  NiFloatInterpolator *v4; // esi@1
  double v5; // st7@1
  NiFloatData *v7; // eax@4
  unsigned int v8; // ecx@5
  char v9; // dl@5
  NiAnimationKey::KeyType v10; // edi@5
  NiFloatKey *v11; // eax@5

  v4 = this;
  v5 = fTime;
  if ( fTime == this->m_fLastTime )
  {
    *fValue = this->m_fFloatValue;
    if ( -3.4028235e38 == this->m_fFloatValue )
      return 0;
  }
  else
  {
    v7 = this->m_spFloatData.m_pObject;
    if ( v7 )
    {
      v8 = v7->m_uiNumKeys;
      v9 = v7->m_ucKeySize;
      v10 = v7->m_eType;
      v11 = v7->m_pkKeys;
      if ( v8 )
      {
        v4->m_fFloatValue = NiFloatKey::GenInterp(fTime, v11, v10, v8, &v4->m_uiLastIdx, v9);
        v5 = fTime;
      }
    }
    if ( -3.4028235e38 == v4->m_fFloatValue )
      return 0;
    *fValue = v4->m_fFloatValue;
    v4->m_fLastTime = v5;
  }
  return 1;
}

//----- (007F2F90) --------------------------------------------------------
void __thiscall NiFloatInterpolator::CopyMembers(NiFloatInterpolator *this, NiFloatInterpolator *pkDest, NiCloningProcess *kCloning)
{
  NiFloatInterpolator *v3; // esi@1
  NiFloatData *v4; // ebx@1
  NiFloatData *v5; // eax@6

  v3 = this;
  NiBackToFrontAccumulator::CopyMembers((NiBackToFrontAccumulator *)this, (NiBackToFrontAccumulator *)pkDest, kCloning);
  pkDest->m_fFloatValue = v3->m_fFloatValue;
  v4 = pkDest->m_spFloatData.m_pObject;
  if ( v4 == v3->m_spFloatData.m_pObject )
  {
    pkDest->m_uiLastIdx = v3->m_uiLastIdx;
  }
  else
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v5 = v3->m_spFloatData.m_pObject;
    pkDest->m_spFloatData.m_pObject = v5;
    if ( v5 )
    {
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
      pkDest->m_uiLastIdx = v3->m_uiLastIdx;
    }
    else
    {
      pkDest->m_uiLastIdx = v3->m_uiLastIdx;
    }
  }
}

//----- (007F3010) --------------------------------------------------------
void __thiscall NiFloatInterpolator::LoadBinary(NiFloatInterpolator *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiFloatInterpolator *v3; // esi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST00_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiObject *v7; // eax@1
  NiFloatData *v8; // edi@1
  NiFloatData *v9; // ebx@1

  v2 = kStream;
  v3 = this;
  NiBackToFrontAccumulator::LoadBinary((NiBackToFrontAccumulator *)this, kStream);
  v4 = v2->m_pkIstr;
  v5 = v4;
  v6 = v4->m_pfnRead;
  kStream = (NiStream *)4;
  v6(v5, &v3->m_fFloatValue, 4u, (unsigned int *)&kStream, 1u);
  v7 = NiStream::ResolveLinkID(v2);
  v8 = v3->m_spFloatData.m_pObject;
  v9 = (NiFloatData *)v7;
  if ( (NiObject *)v8 != v7 )
  {
    if ( v8 && !InterlockedDecrement((volatile LONG *)&v8->m_uiRefCount) && v8 )
      v8->vfptr->__vecDelDtor((NiRefObject *)v8, 1u);
    v3->m_spFloatData.m_pObject = v9;
    if ( v9 )
      InterlockedIncrement((volatile LONG *)&v9->m_uiRefCount);
  }
}

//----- (007F3090) --------------------------------------------------------
void __thiscall NiFloatInterpolator::SaveBinary(NiFloatInterpolator *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiFloatInterpolator *v3; // esi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST00_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1

  v2 = kStream;
  v3 = this;
  NiDefaultAVObjectPalette::LinkObject((NiScreenLODData *)this, kStream);
  v4 = v2->m_pkOstr;
  v5 = v4;
  v6 = v4->m_pfnWrite;
  kStream = (NiStream *)4;
  v6(v5, &v3->m_fFloatValue, 4u, (unsigned int *)&kStream, 1u);
  v2->vfptr->SaveLinkID(v2, (NiObject *)v3->m_spFloatData.m_pObject);
}

//----- (007F30E0) --------------------------------------------------------
NiFloatInterpolator *__thiscall NiFloatInterpolator::CreateClone(NiFloatInterpolator *this, NiCloningProcess *kCloning)
{
  NiFloatInterpolator *v2; // ebx@1
  NiKeyBasedInterpolator *v3; // eax@1
  NiFloatInterpolator *v4; // esi@1
  NiFloatInterpolator *result; // eax@2

  v2 = this;
  v3 = (NiKeyBasedInterpolator *)operator new(0x18u);
  v4 = (NiFloatInterpolator *)v3;
  if ( v3 )
  {
    NiKeyBasedInterpolator::NiKeyBasedInterpolator(v3);
    v4->vfptr = (NiRefObjectVtbl *)&NiFloatInterpolator::`vftable';
    v4->m_fFloatValue = -3.4028235e38;
    v4->m_spFloatData.m_pObject = 0;
    v4->m_uiLastIdx = 0;
    NiFloatInterpolator::CopyMembers(v2, v4, kCloning);
    result = v4;
  }
  else
  {
    NiFloatInterpolator::CopyMembers(v2, 0, kCloning);
    result = 0;
  }
  return result;
}
// 9E6D1C: using guessed type int (__thiscall *NiFloatInterpolator::`vftable')(void *p, char);

//----- (007F3150) --------------------------------------------------------
void __thiscall NiFloatInterpolator::GetViewerStrings(NiFloatInterpolator *this, NiTArray<char *> *pkStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiFloatInterpolator *v3; // ebx@1
  NiTArray<char *> *v4; // eax@1
  unsigned int v5; // edi@1
  NiTArray<char *> *v6; // eax@3
  unsigned int v7; // edi@3
  NiTArray<char *> *v8; // eax@5
  unsigned int v9; // edi@5

  v2 = (NiTArray<NiVBBlock *> *)pkStrings;
  v3 = this;
  NiKeyBasedInterpolator::GetViewerStrings((NiKeyBasedInterpolator *)&this->vfptr, pkStrings);
  v4 = (NiTArray<char *> *)NiGetViewerString(NiFloatInterpolator::m_RTTI.m_pcName);
  v5 = v2->m_uiSize;
  pkStrings = v4;
  if ( v5 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v5 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v5, (NiVBChip *const *)&pkStrings);
  v6 = (NiTArray<char *> *)NiGetViewerString("m_fFloatValue", v3->m_fFloatValue);
  v7 = v2->m_uiSize;
  pkStrings = v6;
  if ( v7 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v7 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v7, (NiVBChip *const *)&pkStrings);
  v8 = (NiTArray<char *> *)NiGetViewerString("m_spFloatData", v3->m_spFloatData.m_pObject);
  v9 = v2->m_uiSize;
  pkStrings = v8;
  if ( v9 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v9 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v9, (NiVBChip *const *)&pkStrings);
}

//----- (007F3210) --------------------------------------------------------
NiObject *__cdecl NiFloatExtraDataController::CreateObject()
{
  NiExtraDataController *v0; // eax@1
  NiObject *v1; // esi@1
  NiObject *result; // eax@2

  v0 = (NiExtraDataController *)operator new(0x48u);
  v1 = (NiObject *)v0;
  if ( v0 )
  {
    NiExtraDataController::NiExtraDataController(v0);
    v1->vfptr = (NiRefObjectVtbl *)&NiFloatExtraDataController::`vftable';
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E6DE4: using guessed type int (__thiscall *NiFloatExtraDataController::`vftable')(void *p, char);

//----- (007F3240) --------------------------------------------------------
bool __thiscall NiFloatsExtraDataController::RegisterStreamables(NiFloatsExtraDataPoint3Controller *this, NiStream *kStream)
{
  return NiExtraDataController::RegisterStreamables((NiExtraDataController *)&this->vfptr, kStream);
}

//----- (007F3250) --------------------------------------------------------
NiRTTI *NiFloatExtraDataController::GetRTTI()
{
  return &NiFloatExtraDataController::m_RTTI;
}

//----- (007F3260) --------------------------------------------------------
NiFloatExtraDataController *__thiscall NiFloatExtraDataController::`scalar deleting destructor'(NiFloatExtraDataController *this, unsigned int a2)
{
  NiFloatExtraDataController *v2; // esi@1

  v2 = this;
  NiExtraDataController::~NiExtraDataController((NiExtraDataController *)&this->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007F3290) --------------------------------------------------------
void __thiscall NiFloatExtraDataController::CreatePoseInterpolator(NiFloatExtraDataController *this, unsigned __int16 usIndex)
{
  NiFloatExtraDataController *v2; // esi@1
  NiFloatInterpolator *v3; // eax@1

  v2 = this;
  v3 = (NiFloatInterpolator *)operator new(0x18u);
  if ( v3 )
    NiFloatInterpolator::NiFloatInterpolator(v3, *(float *)&v2->m_spExtraData.m_pObject[1].vfptr);
}

//----- (007F32D0) --------------------------------------------------------
NiPSysModifierCtlr *__thiscall NiFloatExtraDataController::CreateClone(NiFloatExtraDataController *this, NiCloningProcess *kCloning)
{
  NiPSysModifierCtlr *v2; // edi@1
  NiExtraDataController *v3; // eax@1
  NiPSysModifierCtlr *v4; // esi@1
  NiPSysModifierCtlr *result; // eax@2

  v2 = (NiPSysModifierCtlr *)this;
  v3 = (NiExtraDataController *)operator new(0x48u);
  v4 = (NiPSysModifierCtlr *)v3;
  if ( v3 )
  {
    NiExtraDataController::NiExtraDataController(v3);
    v4->vfptr = (NiRefObjectVtbl *)&NiFloatExtraDataController::`vftable';
    NiPSysModifierCtlr::CopyMembers(v2, v4, kCloning);
    result = v4;
  }
  else
  {
    NiPSysModifierCtlr::CopyMembers(v2, 0, kCloning);
    result = 0;
  }
  return result;
}
// 9E6DE4: using guessed type int (__thiscall *NiFloatExtraDataController::`vftable')(void *p, char);

//----- (007F3320) --------------------------------------------------------
void __thiscall NiFloatExtraDataController::SynchronizePoseInterpolator(NiFloatExtraDataController *this, NiInterpolator *pkInterp, unsigned __int16 usIndex)
{
  NiFloatExtraDataController *v3; // edi@1
  NiFloatInterpolator *v4; // ecx@2
  NiRTTI *v5; // eax@3
  char v6; // al@6

  v3 = this;
  if ( pkInterp )
  {
    v5 = (NiRTTI *)((int (__thiscall *)(_DWORD))pkInterp->vfptr[1].__vecDelDtor)(pkInterp);
    if ( v5 )
    {
      while ( v5 != &NiFloatInterpolator::m_RTTI )
      {
        v5 = v5->m_pkBaseRTTI;
        if ( !v5 )
          goto LABEL_6;
      }
      v6 = 1;
    }
    else
    {
LABEL_6:
      v6 = 0;
    }
    v4 = (NiFloatInterpolator *)(v6 != 0 ? (unsigned int)pkInterp : 0);
  }
  else
  {
    v4 = 0;
  }
  NiFloatInterpolator::SetPoseValue(v4, *(float *)&v3->m_spExtraData.m_pObject[1].vfptr);
}

//----- (007F3380) --------------------------------------------------------
void __thiscall NiFloatExtraDataController::Update(NiFloatExtraDataController *this, float fTime)
{
  NiFloatExtraDataController *v2; // esi@1
  NiInterpolator *v3; // ecx@4
  NiInterpolator *v4; // ecx@6
  NiExtraData *v5; // esi@8

  v2 = this;
  if ( (LOBYTE(this->m_uFlags) >> 5) & 1 )
  {
    this->m_fScaledTime = -3.4028235e38;
  }
  else if ( NiTimeController::DontDoUpdate((NiTimeController *)&this->vfptr, fTime) )
  {
    v3 = v2->m_spInterpolator.m_pObject;
    if ( !v3 || !(unsigned __int8)((int (*)(void))v3->vfptr[33].__vecDelDtor)() )
      return;
  }
  v4 = v2->m_spInterpolator.m_pObject;
  if ( v4
    && (unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD, _DWORD))v4->vfptr[19].__vecDelDtor)(
                          v2->m_fScaledTime,
                          v2->m_pTarget,
                          &fTime) )
  {
    v5 = v2->m_spExtraData.m_pObject;
    if ( v5 )
      *(float *)&v5[1].vfptr = fTime;
  }
}

//----- (007F3400) --------------------------------------------------------
void __thiscall NiFloatExtraDataController::GetViewerStrings(NiFloatExtraDataController *this, NiTArray<char *> *pkStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiTArray<char *> *v3; // eax@1
  unsigned int v4; // edi@1

  v2 = (NiTArray<NiVBBlock *> *)pkStrings;
  NiExtraDataController::GetViewerStrings((NiExtraDataController *)&this->vfptr, pkStrings);
  v3 = (NiTArray<char *> *)NiGetViewerString(NiFloatExtraDataController::m_RTTI.m_pcName);
  v4 = v2->m_uiSize;
  pkStrings = v3;
  if ( v4 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v4 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v4, (NiVBChip *const *)&pkStrings);
}

//----- (007F3450) --------------------------------------------------------
void __thiscall NiFloatData::GuaranteeKeysAtStartAndEnd(NiFloatData *this, float fStartTime, float fEndTime)
{
  NiFloatData *v3; // esi@1
  NiAnimationKey *pkKeys; // [sp+Ch] [bp-4h]@1

  pkKeys = (NiAnimationKey *)this;
  v3 = this;
  pkKeys = (NiAnimationKey *)&this->m_pkKeys->m_fTime;
  NiAnimationKey::GuaranteeKeyAtStartAndEnd(0, this->m_eType, &pkKeys, &this->m_uiNumKeys, fStartTime, fEndTime);
  v3->m_pkKeys = (NiFloatKey *)pkKeys;
}

//----- (007F3490) --------------------------------------------------------
void __thiscall NiFloatData::~NiFloatData(NiFloatData *this)
{
  CPostProcessEffect *v1; // esi@1
  NiFloatKey *v2; // eax@1

  v1 = (CPostProcessEffect *)this;
  v2 = this->m_pkKeys;
  this->vfptr = (NiRefObjectVtbl *)&NiFloatData::`vftable';
  if ( v2 )
    ((void (__cdecl *)(_DWORD))(&NiAnimationKey::ms_deletes)[this->m_eType])(v2);
  NiRefObject::~NiRefObject(v1);
}
// 9E5F84: using guessed type int (__thiscall *NiFloatData::`vftable')(void *p, char);
// B61A48: using guessed type void (__cdecl static **NiAnimationKey::ms_deletes)(struct NiAnimationKey *);

//----- (007F34C0) --------------------------------------------------------
void __thiscall NiFloatData::SetAnim(NiFloatData *this, NiFloatKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType)
{
  char v4; // dl@4

  if ( pkKeys && uiNumKeys && eType )
  {
    v4 = (char)(&NiAnimationKey::ms_keysizes)[eType];
    this->m_pkKeys = pkKeys;
    this->m_uiNumKeys = uiNumKeys;
    this->m_eType = eType;
    this->m_ucKeySize = v4;
  }
  else
  {
    this->m_uiNumKeys = 0;
    this->m_pkKeys = 0;
    this->m_eType = 0;
    this->m_ucKeySize = 0;
  }
}
// B61900: using guessed type unsigned __int8 *NiAnimationKey::ms_keysizes;

//----- (007F3510) --------------------------------------------------------
NiObject *__cdecl NiFloatData::CreateObject()
{
  NiObject *v0; // eax@1
  NiObject *v1; // esi@1
  NiObject *result; // eax@2

  v0 = (NiObject *)operator new(0x18u);
  v1 = v0;
  if ( v0 )
  {
    NiObject::NiObject(v0);
    v1[1].vfptr = 0;
    v1[1].m_uiRefCount = 0;
    v1[2].vfptr = 0;
    LOBYTE(v1[2].m_uiRefCount) = 0;
    v1->vfptr = (NiRefObjectVtbl *)&NiFloatData::`vftable';
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E5F84: using guessed type int (__thiscall *NiFloatData::`vftable')(void *p, char);

//----- (007F3550) --------------------------------------------------------
char __thiscall NiFloatData::IsEqual(NiFloatData *this, NiObject *pkObject)
{
  NiObject *v2; // ebx@1
  NiFloatData *v3; // esi@1
  char result; // al@2
  NiRefObjectVtbl *v5; // ecx@3
  NiRefObjectVtbl *v6; // eax@4
  int v7; // edi@6
  bool (__cdecl *equal)(NiAnimationKey *, NiAnimationKey *); // [sp+10h] [bp+8h]@6

  v2 = pkObject;
  v3 = this;
  if ( NiObject::IsEqual((NiObject *)&this->vfptr, pkObject)
    && (v5 = (NiRefObjectVtbl *)v3->m_uiNumKeys, v5 == pkObject[1].vfptr)
    && (v6 = (NiRefObjectVtbl *)v3->m_eType, v6 == pkObject[2].vfptr)
    && v3->m_ucKeySize == LOBYTE(pkObject[2].m_uiRefCount) )
  {
    v7 = 0;
    equal = (bool (__cdecl *)(NiAnimationKey *, NiAnimationKey *))(&NiAnimationKey::ms_equals)[(_DWORD)v6];
    if ( v5 )
    {
      while ( equal(
                (NiAnimationKey *)((char *)&v3->m_pkKeys->m_fTime + v7 * v3->m_ucKeySize),
                (NiAnimationKey *)(v7 * v3->m_ucKeySize + v2[1].m_uiRefCount)) )
      {
        if ( ++v7 >= v3->m_uiNumKeys )
          goto LABEL_9;
      }
      result = 0;
    }
    else
    {
LABEL_9:
      result = 1;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// B61C88: using guessed type bool (__cdecl static **NiAnimationKey::ms_equals)(const struct NiAnimationKey *, const struct NiAnimationKey *);

//----- (007F35D0) --------------------------------------------------------
void __thiscall NiFloatData::ReplaceAnim(NiFloatData *this, NiFloatKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType)
{
  NiFloatData *v4; // esi@1
  NiFloatKey *v5; // eax@1
  char v6; // dl@6

  v4 = this;
  v5 = this->m_pkKeys;
  if ( v5 )
    ((void (__cdecl *)(_DWORD))(&NiAnimationKey::ms_deletes)[this->m_eType])(v5);
  if ( pkKeys && uiNumKeys && eType )
  {
    v6 = (char)(&NiAnimationKey::ms_keysizes)[eType];
    v4->m_pkKeys = pkKeys;
    v4->m_ucKeySize = v6;
    v4->m_uiNumKeys = uiNumKeys;
    v4->m_eType = eType;
  }
  else
  {
    v4->m_uiNumKeys = 0;
    v4->m_pkKeys = 0;
    v4->m_ucKeySize = 0;
    v4->m_eType = 0;
  }
}
// B61900: using guessed type unsigned __int8 *NiAnimationKey::ms_keysizes;
// B61A48: using guessed type void (__cdecl static **NiAnimationKey::ms_deletes)(struct NiAnimationKey *);

//----- (007F3640) --------------------------------------------------------
NiPointer<NiFloatData> *__thiscall NiFloatData::GetSequenceData(NiFloatData *this, NiPointer<NiFloatData> *result, float fStartTime, float fEndTime)
{
  NiFloatData *v4; // esi@1
  NiFloatData *v5; // eax@1
  NiPointer<NiFloatData> *v6; // edi@1
  NiAnimationKey *v7; // ebx@3
  unsigned int v8; // eax@7
  NiAnimationKey::KeyType v9; // edx@8
  NiAnimationKey *pkNewKeys; // [sp+1Ch] [bp-4h]@1

  v4 = this;
  v5 = (NiFloatData *)NiObject::CreateDeepCopy((NiObject *)&this->vfptr, (NiPointer<NiObject> *)&pkNewKeys)->m_pObject;
  v6 = result;
  result->m_pObject = v5;
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v7 = pkNewKeys;
  if ( pkNewKeys && !InterlockedDecrement((volatile LONG *)&pkNewKeys[1]) && v7 )
    (*(void (__thiscall **)(NiAnimationKey *, signed int))LODWORD(v7->m_fTime))(v7, 1);
  v8 = v4->m_uiNumKeys;
  if ( v8 )
  {
    v9 = v4->m_eType;
    pkNewKeys = 0;
    result = 0;
    NiAnimationKey::CopySequence(
      0,
      v9,
      (NiAnimationKey *)&v4->m_pkKeys->m_fTime,
      v8,
      fStartTime,
      fEndTime,
      &pkNewKeys,
      (unsigned int *)&result);
    NiFloatData::ReplaceAnim(v6->m_pObject, (NiFloatKey *)pkNewKeys, (unsigned int)result, v4->m_eType);
  }
  return v6;
}

//----- (007F36F0) --------------------------------------------------------
void __thiscall NiFloatData::LoadBinary(NiFloatData *this, NiStream *stream)
{
  NiStream *v2; // ebx@1
  NiFloatData *v3; // esi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST14_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v7; // eax@2
  NiBinaryStream *v8; // ST14_4@2
  unsigned int (__cdecl *v9)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@2
  NiAnimationKey::KeyType v10; // edi@2
  NiStream *v11; // ST10_4@2
  NiFloatKey *v12; // ebx@2
  NiAnimationKey::KeyType eType; // [sp+Ch] [bp-8h]@2
  int v14; // [sp+10h] [bp-4h]@1

  v2 = stream;
  v3 = this;
  NiObject::LoadBinary((NiObject *)&this->vfptr, stream);
  v4 = v2->m_pkIstr;
  v5 = v4;
  v6 = v4->m_pfnRead;
  v14 = 4;
  v6(v5, &stream, 4u, (unsigned int *)&v14, 1u);
  if ( stream )
  {
    v7 = v2->m_pkIstr;
    v8 = v7;
    v9 = v7->m_pfnRead;
    v14 = 4;
    v9(v8, &eType, 4u, (unsigned int *)&v14, 1u);
    v10 = eType;
    v11 = stream;
    v3->m_ucKeySize = (char)(&NiAnimationKey::ms_keysizes)[eType];
    v12 = (NiFloatKey *)((int (__cdecl *)(NiStream *, NiStream *))(&NiAnimationKey::ms_loaders)[v10])(v2, v11);
    ((void (__cdecl *)(NiFloatKey *, NiStream *, _DWORD))(&NiAnimationKey::ms_fillderived)[v10])(
      v12,
      stream,
      v3->m_ucKeySize);
    NiFloatData::ReplaceAnim(v3, v12, (unsigned int)stream, v10);
  }
}
// B61900: using guessed type unsigned __int8 *NiAnimationKey::ms_keysizes;
// B61928: using guessed type void (__cdecl static **NiAnimationKey::ms_fillderived)(struct NiAnimationKey *, unsigned int, unsigned __int8);
// B61F58: using guessed type struct NiAnimationKey *(__cdecl static **NiAnimationKey::ms_loaders)(struct NiStream *, unsigned int);

//----- (007F3790) --------------------------------------------------------
void __thiscall NiFloatData::SaveBinary(NiFloatData *this, NiStream *stream)
{
  NiStream *v2; // edi@1
  NiFloatData *v3; // esi@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@1
  NiBinaryStream *v5; // ST0C_4@1
  NiBinaryStream *v6; // eax@2
  NiBinaryStream *v7; // ST0C_4@2
  unsigned int (__cdecl *v8)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@2

  v2 = stream;
  v3 = this;
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue(
    (NiVBDynamicSet *)this,
    (IDirect3DVertexBuffer9 *)stream);
  v4 = v2->m_pkOstr->m_pfnWrite;
  v5 = v2->m_pkOstr;
  stream = (NiStream *)4;
  v4(v5, &v3->m_uiNumKeys, 4u, (unsigned int *)&stream, 1u);
  if ( v3->m_uiNumKeys )
  {
    v6 = v2->m_pkOstr;
    v7 = v6;
    v8 = v6->m_pfnWrite;
    stream = (NiStream *)4;
    v8(v7, &v3->m_eType, 4u, (unsigned int *)&stream, 1u);
    ((void (__cdecl *)(_DWORD, _DWORD, _DWORD))(&NiAnimationKey::ms_saves)[v3->m_eType])(
      v2,
      v3->m_pkKeys,
      v3->m_uiNumKeys);
  }
}
// B61BF8: using guessed type void (__cdecl static **NiAnimationKey::ms_saves)(struct NiStream *, struct NiAnimationKey *, unsigned int);

//----- (007F3810) --------------------------------------------------------
void __thiscall NiFloatData::GetViewerStrings(NiFloatData *this, NiTArray<char *> *pStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiFloatData *v3; // ebx@1
  NiTArray<char *> *v4; // eax@1
  unsigned int v5; // edi@1
  NiTArray<char *> *v6; // eax@3
  unsigned int v7; // edi@3

  v2 = (NiTArray<NiVBBlock *> *)pStrings;
  v3 = this;
  NiObject::GetViewerStrings((NiObject *)&this->vfptr, pStrings);
  v4 = (NiTArray<char *> *)NiGetViewerString(NiFloatData::m_RTTI.m_pcName);
  v5 = v2->m_uiSize;
  pStrings = v4;
  if ( v5 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v5 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v5, (NiVBChip *const *)&pStrings);
  v6 = (NiTArray<char *> *)NiGetViewerString("m_uiNumKeys", v3->m_uiNumKeys);
  v7 = v2->m_uiSize;
  pStrings = v6;
  if ( v7 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v7 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v7, (NiVBChip *const *)&pStrings);
}

//----- (007F3890) --------------------------------------------------------
void __thiscall NiFlipController::GetTargetFloatValue(NiFlipController *this, float *fValue)
{
  *fValue = (double)this->m_uiIndex;
}

//----- (007F38B0) --------------------------------------------------------
bool __thiscall NiFlipController::IsEqual(NiFlipController *this, NiObject *pkObject)
{
  NiFlipController *v2; // esi@1
  bool result; // al@1

  v2 = this;
  result = NiBoolInterpController::IsEqual((NiPoint3InterpController *)this, pkObject);
  if ( result )
    result = v2->m_uiAffectedMap == pkObject[11].m_uiRefCount;
  return result;
}

//----- (007F38E0) --------------------------------------------------------
void __stdcall NiFlipController::CreateBlendInterpolator(unsigned __int16 usIndex, bool bManagerControlled, bool bAccumulateAnimations, float fWeightThreshold, char ucArraySize)
{
  NiBlendFloatInterpolator *v6; // eax@1
  int v7; // eax@2

  v6 = (NiBlendFloatInterpolator *)operator new(0x34u);
  if ( v6 )
  {
    NiBlendFloatInterpolator::NiBlendFloatInterpolator(v6, bManagerControlled, fWeightThreshold, ucArraySize);
    *(_BYTE *)(v7 + 12) |= 2u;
  }
  else
  {
    vC |= 2u;
  }
}

//----- (007F3920) --------------------------------------------------------
char *__thiscall NiFlipController::GetCtlrID(NiFlipController *this)
{
  NiFlipController *v1; // esi@1
  char *result; // eax@1
  char *v3; // eax@2
  unsigned int v4; // ST0C_4@2

  v1 = this;
  result = this->m_pcCtlrID;
  if ( !result )
  {
    v3 = (char *)operator new(0xFu);
    v4 = v1->m_uiAffectedMap;
    v1->m_pcCtlrID = v3;
    NiSprintf(v3, 0xFu, "%d", v4);
    result = v1->m_pcCtlrID;
  }
  return result;
}

//----- (007F3950) --------------------------------------------------------
char __thiscall NiFlipController::RegisterStreamables(NiFlipController *this, NiStream *kStream)
{
  NiFlipController *v2; // edi@1
  char result; // al@1
  unsigned int v4; // ebx@2
  unsigned int v5; // esi@2
  NiTexture *v6; // ecx@3

  v2 = this;
  result = NiTransformController::RegisterStreamables((NiPSysModifierCtlr *)this, kStream);
  if ( result )
  {
    v4 = v2->m_kTextures.m_uiSize;
    v5 = 0;
    if ( v4 )
    {
      do
      {
        v6 = v2->m_kTextures.m_pBase[v5].m_pObject;
        if ( v6 )
          ((void (__stdcall *)(_DWORD))v6->vfptr[5].__vecDelDtor)(kStream);
        ++v5;
      }
      while ( v5 < v4 );
    }
    result = 1;
  }
  return result;
}

//----- (007F39A0) --------------------------------------------------------
void __thiscall NiTArray<NiPointer<NiTexture>>::~NiTArray<NiPointer<NiTexture>>(NiTArray<NiPointer<NiTexture> > *this)
{
  NiPointer<NiTexture> *v1; // eax@1
  NiTexture *v2; // ebx@2
  NiPointer<NiTexture> *v3; // ecx@2
  int v4; // edi@2
  int v5; // ebx@2
  int v6; // esi@3
  int v7; // [sp+0h] [bp-4h]@2

  v1 = this->m_pBase;
  this->vfptr = (NiTArray<NiPointer<NiTexture> >Vtbl *)&NiTArray<NiPointer<NiTexture>>::`vftable';
  if ( v1 )
  {
    v2 = v1[-1].m_pObject;
    v3 = v1 - 1;
    v4 = (int)&v1[(_DWORD)v2];
    v5 = (int)&v2[-1].m_pkNext + 3;
    v7 = (int)&v1[-1];
    if ( v5 >= 0 )
    {
      do
      {
        v6 = *(_DWORD *)(v4 - 4);
        v4 -= 4;
        if ( v6 && !InterlockedDecrement((volatile LONG *)(v6 + 4)) )
        {
          if ( v6 )
            (**(void (__thiscall ***)(_DWORD, _DWORD))v6)(v6, 1);
        }
        --v5;
      }
      while ( v5 >= 0 );
      v3 = (NiPointer<NiTexture> *)v7;
    }
    operator delete(v3);
  }
}
// 9E6E80: using guessed type int (__thiscall *NiTArray<NiPointer<NiTexture>>::`vftable')(void *p, char);

//----- (007F3A00) --------------------------------------------------------
NiTArray<NiPointer<NiTexture> > *__thiscall NiTArray<NiPointer<NiTexture>>::`scalar deleting destructor'(NiTArray<NiPointer<NiTexture> > *this, unsigned int a2)
{
  NiTArray<NiPointer<NiTexture> > *v2; // esi@1

  v2 = this;
  NiTArray<NiPointer<NiTexture>>::~NiTArray<NiPointer<NiTexture>>(this);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007F3A30) --------------------------------------------------------
NiRTTI *NiFlipController::GetRTTI()
{
  return &NiFlipController::m_RTTI;
}

//----- (007F3A40) --------------------------------------------------------
char __stdcall NiTextureTransformController::InterpTargetIsCorrectType(NiObjectNET *pkTarget)
{
  NiRTTI *v2; // eax@2
  char result; // al@5

  if ( pkTarget && (v2 = (NiRTTI *)((int (*)(void))pkTarget->vfptr[1].__vecDelDtor)()) != 0 )
  {
    while ( v2 != &NiTexturingProperty::m_RTTI )
    {
      v2 = v2->m_pkBaseRTTI;
      if ( !v2 )
        goto LABEL_5;
    }
    result = 1;
  }
  else
  {
LABEL_5:
    result = 0;
  }
  return result;
}

//----- (007F3A70) --------------------------------------------------------
void __thiscall NiFlipController::Update(NiFlipController *this, float fTime)
{
  NiFlipController *v2; // esi@1
  NiInterpolator *v3; // ecx@4
  NiInterpolator *v4; // ecx@6
  unsigned int v5; // ecx@8
  unsigned int v6; // eax@8
  NiTexturingProperty *v7; // edi@10
  unsigned int v8; // eax@11
  NiTexturingProperty::Map **v9; // ecx@12
  bool v10; // zf@12
  NiTexturingProperty::Map **v11; // ecx@12
  unsigned int v12; // ebx@14
  NiTArray<NiTexturingProperty::ShaderMap *> *v13; // eax@14
  NiTexture *v14; // ST04_4@17
  NiTexturingProperty::ShaderMap *v15; // eax@17
  float fValue; // [sp+18h] [bp-4h]@7

  v2 = this;
  if ( (LOBYTE(this->m_uFlags) >> 5) & 1 )
  {
    this->m_fScaledTime = -3.4028235e38;
  }
  else if ( NiTimeController::DontDoUpdate((NiTimeController *)&this->vfptr, fTime) )
  {
    v3 = v2->m_spInterpolator.m_pObject;
    if ( !v3 || !(unsigned __int8)((int (*)(void))v3->vfptr[33].__vecDelDtor)() )
      return;
  }
  v4 = v2->m_spInterpolator.m_pObject;
  if ( v4
    && (unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD, _DWORD))v4->vfptr[19].__vecDelDtor)(
                          v2->m_fScaledTime,
                          v2->m_pTarget,
                          &fValue) )
  {
    v5 = v2->m_kTextures.m_uiSize;
    v6 = (signed __int64)(fValue + 0.009999999776482582);
    v2->m_uiIndex = v6;
    if ( v6 >= v5 )
      v2->m_uiIndex = v5 - 1;
    v7 = (NiTexturingProperty *)v2->m_pTarget;
    if ( v7 )
    {
      v8 = v2->m_uiAffectedMap;
      if ( v8 >= v7->m_kMaps.m_uiSize || (v9 = v7->m_kMaps.m_pBase, v10 = v9[v8] == 0, v11 = &v9[v8], v10) )
      {
        v12 = v8 - 1024;
        v13 = v7->m_pkShaderMaps;
        if ( v13 && v12 < v13->m_uiSize )
        {
          if ( NiTexturingProperty::GetShaderMap(v7, v12) )
          {
            v14 = v2->m_kTextures.m_pBase[v2->m_uiIndex].m_pObject;
            v15 = NiTexturingProperty::GetShaderMap(v7, v12);
            NiD3DTextureStage::SetTexture((NiTexturingProperty::Map *)&v15->vfptr, v14);
          }
        }
      }
      else
      {
        NiD3DTextureStage::SetTexture(*v11, v2->m_kTextures.m_pBase[v2->m_uiIndex].m_pObject);
      }
    }
  }
}

//----- (007F3B90) --------------------------------------------------------
void __thiscall NiFlipController::SaveBinary(NiFlipController *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiFlipController *v3; // esi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST14_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v7; // eax@1
  unsigned int (__cdecl *v8)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@1
  unsigned int v9; // ebx@1
  int v10; // [sp+Ch] [bp-4h]@1

  v2 = kStream;
  v3 = this;
  NiFloatInterpController::SaveBinary((NiTransformController *)this, kStream);
  v4 = v2->m_pkOstr;
  v5 = v4;
  v6 = v4->m_pfnWrite;
  v10 = 4;
  v6(v5, &v3->m_uiAffectedMap, 4u, (unsigned int *)&v10, 1u);
  v7 = v2->m_pkOstr;
  kStream = (NiStream *)v3->m_kTextures.m_uiSize;
  v8 = v7->m_pfnWrite;
  v10 = 4;
  v8(v7, &kStream, 4u, (unsigned int *)&v10, 1u);
  v9 = 0;
  if ( kStream )
  {
    do
      v2->vfptr->SaveLinkID(v2, (NiObject *)v3->m_kTextures.m_pBase[v9++].m_pObject);
    while ( v9 < (unsigned int)kStream );
  }
}

//----- (007F3C10) --------------------------------------------------------
void __thiscall NiFlipController::NiFlipController(NiFlipController *this)
{
  NiFlipController *v1; // esi@1
  void *v2; // eax@1

  v1 = this;
  NiFloatInterpController::NiFloatInterpController((NiFloatInterpController *)&this->vfptr);
  v1->vfptr = (NiRefObjectVtbl *)&NiFlipController::`vftable';
  v1->m_kTextures.vfptr = (NiTArray<NiPointer<NiTexture> >Vtbl *)&NiTArray<NiPointer<NiTexture>>::`vftable';
  v1->m_kTextures.m_uiMaxSize = 1;
  v1->m_kTextures.m_uiGrowBy = 1;
  v1->m_kTextures.m_uiSize = 0;
  v1->m_kTextures.m_uiESize = 0;
  v2 = operator new(8u);
  if ( v2 )
  {
    *(_DWORD *)v2 = 1;
    *((_DWORD *)v2 + 1) = 0;
    v1->m_kTextures.m_pBase = (NiPointer<NiTexture> *)((char *)v2 + 4);
    v1->m_uiIndex = 0;
    v1->m_uiAffectedMap = 0;
    v1->m_pcCtlrID = 0;
  }
  else
  {
    v1->m_kTextures.m_pBase = 0;
    v1->m_uiIndex = 0;
    v1->m_uiAffectedMap = 0;
    v1->m_pcCtlrID = 0;
  }
}
// 9E6E80: using guessed type int (__thiscall *NiTArray<NiPointer<NiTexture>>::`vftable')(void *p, char);
// 9E6E8C: using guessed type int (__thiscall *NiFlipController::`vftable')(void *p, char);

//----- (007F3CA0) --------------------------------------------------------
NiFlipController *__thiscall NiFlipController::`vector deleting destructor'(NiFlipController *this, unsigned int a2)
{
  NiFlipController *v2; // esi@1
  char *v3; // ST00_4@1
  NiInterpolator *v4; // edi@1

  v2 = this;
  v3 = this->m_pcCtlrID;
  this->vfptr = (NiRefObjectVtbl *)&NiFlipController::`vftable';
  operator delete(v3);
  v2->m_pcCtlrID = 0;
  NiTArray<NiPointer<NiTexture>>::~NiTArray<NiPointer<NiTexture>>(&v2->m_kTextures);
  v4 = v2->m_spInterpolator.m_pObject;
  if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
    v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
  NiTimeController::~NiTimeController((NiTimeController *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E6E8C: using guessed type int (__thiscall *NiFlipController::`vftable')(void *p, char);

//----- (007F3D10) --------------------------------------------------------
void __thiscall NiFlipController::CopyMembers(NiFlipController *this, NiFlipController *pkDest, NiCloningProcess *kCloning)
{
  NiFlipController *v3; // ebx@1
  unsigned int v4; // eax@1
  unsigned int v5; // esi@1
  NiTexture *v6; // edi@3

  v3 = this;
  NiPoint3InterpController::CopyMembers((NiPoint3InterpController *)this, (NiPoint3InterpController *)pkDest, kCloning);
  pkDest->m_uiAffectedMap = v3->m_uiAffectedMap;
  v4 = v3->m_kTextures.m_uiSize;
  v5 = 0;
  if ( v4 )
  {
    if ( v4 <= 0 )
    {
      v6 = 0;
      goto LABEL_5;
    }
    do
    {
      v6 = v3->m_kTextures.m_pBase[v5].m_pObject;
LABEL_5:
      if ( pkDest->m_kTextures.m_uiSize <= v5 )
        NiTArray<NiPointer<NiScreenElements>>::SetSize(
          (NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *)&pkDest->m_kTextures,
          v5 + 1);
      kCloning = (NiCloningProcess *)v6;
      if ( v6 )
        InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
      if ( v5 >= pkDest->m_kTextures.m_uiMaxSize )
        NiTArray<NiPointer<NiScreenElements>>::SetSize(
          (NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *)&pkDest->m_kTextures,
          v5 + pkDest->m_kTextures.m_uiGrowBy);
      NiTArray<NiPointer<NiActorManager::CallbackData>>::SetAt(
        (NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *)&pkDest->m_kTextures,
        v5,
        (NiPointer<NiD3DShaderConstantMapEntry> *)&kCloning);
      if ( v6 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v6->m_uiRefCount) )
          v6->vfptr->__vecDelDtor((NiRefObject *)v6, 1u);
      }
      ++v5;
    }
    while ( v5 < v3->m_kTextures.m_uiSize );
  }
}

//----- (007F3DC0) --------------------------------------------------------
void __cdecl NiFlipController::CreateObject()
{
  NiFlipController *v0; // eax@1

  v0 = (NiFlipController *)operator new(0x64u);
  if ( v0 )
    NiFlipController::NiFlipController(v0);
}

//----- (007F3DE0) --------------------------------------------------------
void __thiscall NiFlipController::LoadBinary(NiFlipController *this, NiStream *kStream)
{
  NiStream *v2; // esi@1
  NiFlipController *v3; // edi@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@1
  NiBinaryStream *v5; // ST14_4@1
  NiBinaryStream *v6; // eax@2
  NiBinaryStream *v7; // ST14_4@2
  unsigned int (__cdecl *v8)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@2
  NiBinaryStream *v9; // eax@2
  NiBinaryStream *v10; // ST00_4@2
  unsigned int (__cdecl *v11)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@2
  unsigned int v12; // edi@2
  NiObject *v13; // eax@2
  NiObject *v14; // esi@2
  int v15; // ecx@6
  _DWORD *v16; // eax@6
  NiFloatKey *v17; // ecx@7
  unsigned int v18; // eax@9
  double v19; // st7@10
  NiFlipController *v20; // ebx@11
  NiFloatInterpolator *v21; // eax@13
  NiInterpolator *v22; // eax@14
  NiInterpolator *v23; // edi@14
  NiInterpolator *v24; // esi@16
  float fSecsPerFrame; // [sp+10h] [bp-10h]@2
  NiFlipController *v26; // [sp+14h] [bp-Ch]@1
  float fStartTime; // [sp+18h] [bp-8h]@2
  NiFloatData *pkFloatData; // [sp+1Ch] [bp-4h]@3

  v2 = kStream;
  v3 = this;
  v26 = this;
  NiPoint3InterpController::LoadBinary((NiPoint3InterpController *)this, kStream);
  v4 = v2->m_pkIstr->m_pfnRead;
  v5 = v2->m_pkIstr;
  kStream = (NiStream *)4;
  v4(v5, &v3->m_uiAffectedMap, 4u, (unsigned int *)&kStream, 1u);
  if ( v2->m_uiNifFileVersion >= 0xA010068 )
  {
    NiStream::ReadMultipleLinkIDs(v2);
  }
  else
  {
    v6 = v2->m_pkIstr;
    v7 = v6;
    v8 = v6->m_pfnRead;
    kStream = (NiStream *)4;
    v8(v7, &fStartTime, 4u, (unsigned int *)&kStream, 1u);
    v9 = v2->m_pkIstr;
    v10 = v9;
    v11 = v9->m_pfnRead;
    kStream = (NiStream *)4;
    v11(v10, &fSecsPerFrame, 4u, (unsigned int *)&kStream, 1u);
    v12 = NiStream::ReadMultipleLinkIDs(v2);
    v13 = (NiObject *)operator new(0x18u);
    v14 = v13;
    if ( v13 )
    {
      NiObject::NiObject(v13);
      v14->vfptr = (NiRefObjectVtbl *)&NiFloatData::`vftable';
      v14[1].vfptr = 0;
      v14[1].m_uiRefCount = 0;
      v14[2].vfptr = 0;
      LOBYTE(v14[2].m_uiRefCount) = 0;
      pkFloatData = (NiFloatData *)v14;
    }
    else
    {
      pkFloatData = 0;
    }
    if ( v12 )
    {
      v15 = 8 * (v12 + 1) | -((unsigned __int64)(v12 + 1) >> 29 != 0);
      v16 = operator new((v15 + 4) | -__CFADD__(v15, 4));
      if ( v16 )
      {
        *v16 = v12 + 1;
        v17 = (NiFloatKey *)(v16 + 1);
      }
      else
      {
        v17 = 0;
      }
      v18 = 0;
      *(float *)&kStream = fStartTime;
      if ( v12 )
      {
        do
        {
          v19 = *(float *)&kStream;
          v17[v18].m_fTime = *(float *)&kStream;
          v17[v18].m_fValue = (double)v18;
          ++v18;
          *(float *)&kStream = v19 + fSecsPerFrame;
        }
        while ( v18 < v12 );
      }
      v17[v12].m_fTime = *(float *)&kStream;
      v17[v12].m_fValue = (double)(v12 - 1);
      NiFloatData::ReplaceAnim(pkFloatData, v17, v12 + 1, STEPKEY);
      v20 = v26;
      v26->m_fLoKeyTime = fStartTime;
      v20->m_fHiKeyTime = *(float *)&kStream;
    }
    else
    {
      v20 = v26;
    }
    v21 = (NiFloatInterpolator *)operator new(0x18u);
    if ( v21 )
    {
      NiFloatInterpolator::NiFloatInterpolator(v21, pkFloatData);
      v23 = v22;
    }
    else
    {
      v23 = 0;
    }
    v24 = v20->m_spInterpolator.m_pObject;
    if ( v24 != v23 )
    {
      if ( v24 && !InterlockedDecrement((volatile LONG *)&v24->m_uiRefCount) && v24 )
        v24->vfptr->__vecDelDtor((NiRefObject *)v24, 1u);
      v20->m_spInterpolator.m_pObject = v23;
      if ( v23 )
        InterlockedIncrement((volatile LONG *)&v23->m_uiRefCount);
    }
    ((void (*)(void))v20->m_spInterpolator.m_pObject->vfptr[27].__vecDelDtor)();
  }
}
// 9E5F84: using guessed type int (__thiscall *NiFloatData::`vftable')(void *p, char);

//----- (007F3FD0) --------------------------------------------------------
void __thiscall NiFlipController::LinkObject(NiFlipController *this, NiStream *kStream)
{
  NiFlipController *v2; // esi@1
  unsigned int v3; // ebx@2
  unsigned int v4; // edi@2
  NiD3DShaderConstantMapEntry *v5; // esi@3
  NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *v6; // [sp+8h] [bp-8h]@2
  NiPointer<NiD3DShaderConstantMapEntry> element; // [sp+Ch] [bp-4h]@3

  v2 = this;
  NiPoint3InterpController::LinkObject((NiPSysModifierCtlr *)this, kStream);
  if ( v2->m_pTarget )
  {
    v3 = NiStream::GetNumberOfLinkIDs(kStream);
    v6 = (NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *)&v2->m_kTextures;
    NiTArray<NiPointer<NiScreenElements>>::SetSize(
      (NiTArray<NiPointer<NiD3DShaderConstantMapEntry> > *)&v2->m_kTextures,
      v3);
    v4 = 0;
    if ( v3 )
    {
      do
      {
        v5 = (NiD3DShaderConstantMapEntry *)NiStream::GetObjectFromLinkID(kStream);
        element.m_pObject = v5;
        if ( v5 )
          InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
        NiTArray<NiPointer<NiActorManager::CallbackData>>::SetAt(v6, v4, &element);
        if ( v5 )
        {
          if ( !InterlockedDecrement((volatile LONG *)&v5->m_uiRefCount) )
            v5->vfptr->__vecDelDtor((NiRefObject *)v5, 1u);
        }
        ++v4;
      }
      while ( v4 < v3 );
    }
  }
}

//----- (007F4060) --------------------------------------------------------
NiObject *__thiscall NiFlipController::CreateClone(NiFlipController *this, NiCloningProcess *kCloning)
{
  NiFlipController *v2; // edi@1
  NiFlipController *v3; // eax@1
  NiFlipController *v4; // eax@2
  NiObject *v5; // esi@2
  NiObject *result; // eax@2

  v2 = this;
  v3 = (NiFlipController *)operator new(0x64u);
  if ( v3 )
  {
    NiFlipController::NiFlipController(v3);
    v5 = (NiObject *)v4;
    NiFlipController::CopyMembers(v2, v4, kCloning);
    result = v5;
  }
  else
  {
    NiFlipController::CopyMembers(v2, 0, kCloning);
    result = 0;
  }
  return result;
}

//----- (007F40B0) --------------------------------------------------------
signed int __stdcall NiColorInterpolator::GetKeyContent(unsigned __int16 usChannel)
{
  return 3;
}

//----- (007F40C0) --------------------------------------------------------
NiRotData *__thiscall NiQuaternionInterpolator::GetKeyType(NiQuaternionInterpolator *this, unsigned __int16 usChannel)
{
  NiRotData *result; // eax@1

  result = this->m_spQuaternionData.m_pObject;
  if ( result )
    result = (NiRotData *)result->m_eType;
  return result;
}

//----- (007F40D0) --------------------------------------------------------
char __thiscall NiColorInterpolator::GetKeyStride(NiQuaternionInterpolator *this, unsigned __int16 usChannel)
{
  NiRotData *v2; // eax@1
  char result; // al@2

  v2 = this->m_spQuaternionData.m_pObject;
  if ( v2 )
    result = v2->m_ucKeySize;
  else
    result = 0;
  return result;
}

//----- (007F40F0) --------------------------------------------------------
bool __thiscall NiColorInterpolator::GetChannelPosed(NiColorInterpolator *this, unsigned __int16 usChannel)
{
  return !this->m_spColorData.m_pObject
      && (NiInterpolator::INVALID_COLORA.r != this->m_kColorValue.r
       || *(float *)&dword_A7CAEC != this->m_kColorValue.g
       || *(float *)&dword_A7CAF0 != this->m_kColorValue.b
       || *(float *)&dword_A7CAF4 != this->m_kColorValue.a);
}
// A7CAE8: using guessed type const struct NiColorA NiInterpolator::INVALID_COLORA;
// A7CAEC: using guessed type int dword_A7CAEC;
// A7CAF0: using guessed type int dword_A7CAF0;
// A7CAF4: using guessed type int dword_A7CAF4;

//----- (007F4150) --------------------------------------------------------
void __thiscall NiColorInterpolator::SetPoseValue(NiColorInterpolator *this, NiColorA kPoseValue)
{
  NiColorInterpolator *v2; // edi@1
  NiColorData *v3; // esi@1

  v2 = this;
  v3 = this->m_spColorData.m_pObject;
  if ( v3 )
  {
    if ( !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
      v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
    v2->m_spColorData.m_pObject = 0;
  }
  v2->m_kColorValue = kPoseValue;
}

//----- (007F41A0) --------------------------------------------------------
void __thiscall NiColorInterpolator::GuaranteeTimeRange(NiColorInterpolator *this, float fStartTime, float fEndTime)
{
  NiColorData *v3; // ecx@1

  v3 = this->m_spColorData.m_pObject;
  if ( v3 )
    NiColorData::GuaranteeKeysAtStartAndEnd(v3, fStartTime, fEndTime);
}

//----- (007F41D0) --------------------------------------------------------
char __thiscall NiQuaternionInterpolator::RegisterStreamables(NiQuaternionInterpolator *this, NiStream *kStream)
{
  NiQuaternionInterpolator *v2; // esi@1
  char result; // al@1
  NiRotData *v4; // ecx@2

  v2 = this;
  result = NiScreenLODData::RegisterStreamables((NiPSysSpawnModifier *)this, kStream);
  if ( result )
  {
    v4 = v2->m_spQuaternionData.m_pObject;
    if ( v4 )
      ((void (__stdcall *)(_DWORD))v4->vfptr[5].__vecDelDtor)(kStream);
    result = 1;
  }
  return result;
}

//----- (007F4210) --------------------------------------------------------
void __thiscall NiColorInterpolator::SaveBinary(NiColorInterpolator *this, NiStream *kStream)
{
  NiColorInterpolator *v2; // esi@1

  v2 = this;
  NiDefaultAVObjectPalette::LinkObject((NiScreenLODData *)this, kStream);
  NiColorA::SaveBinary(&v2->m_kColorValue, kStream);
  kStream->vfptr->SaveLinkID(kStream, (NiObject *)v2->m_spColorData.m_pObject);
}

//----- (007F4240) --------------------------------------------------------
BOOL __thiscall NiColorA::operator!=(NiPlane *this, NiPlane *kPlane)
{
  return kPlane->m_kNormal.x != this->m_kNormal.x
      || kPlane->m_kNormal.y != this->m_kNormal.y
      || kPlane->m_kNormal.z != this->m_kNormal.z
      || kPlane->m_fConstant != this->m_fConstant;
}

//----- (007F42A0) --------------------------------------------------------
void __thiscall NiColorInterpolator::NiColorInterpolator(NiColorInterpolator *this, NiColorData *pkColorData)
{
  NiColorInterpolator *v2; // esi@1

  v2 = this;
  NiKeyBasedInterpolator::NiKeyBasedInterpolator((NiKeyBasedInterpolator *)&this->vfptr);
  v2->vfptr = (NiRefObjectVtbl *)&NiColorInterpolator::`vftable';
  v2->m_kColorValue = NiInterpolator::INVALID_COLORA;
  v2->m_spColorData.m_pObject = pkColorData;
  if ( pkColorData )
    InterlockedIncrement((volatile LONG *)&pkColorData->m_uiRefCount);
  v2->m_uiLastIdx = 0;
}
// 9E6F2C: using guessed type int (__thiscall *NiColorInterpolator::`vftable')(void *p, char);
// A7CAE8: using guessed type const struct NiColorA NiInterpolator::INVALID_COLORA;

//----- (007F4300) --------------------------------------------------------
NiRTTI *NiColorInterpolator::GetRTTI()
{
  return &NiColorInterpolator::m_RTTI;
}

//----- (007F4310) --------------------------------------------------------
void __thiscall NiColorInterpolator::NiColorInterpolator(NiColorInterpolator *this, NiColorA kPoseValue)
{
  NiColorInterpolator *v2; // esi@1

  v2 = this;
  NiKeyBasedInterpolator::NiKeyBasedInterpolator((NiKeyBasedInterpolator *)&this->vfptr);
  v2->m_kColorValue = kPoseValue;
  v2->vfptr = (NiRefObjectVtbl *)&NiColorInterpolator::`vftable';
  v2->m_spColorData.m_pObject = 0;
  v2->m_uiLastIdx = 0;
}
// 9E6F2C: using guessed type int (__thiscall *NiColorInterpolator::`vftable')(void *p, char);

//----- (007F4350) --------------------------------------------------------
void __thiscall NiColorInterpolator::Collapse(NiColorInterpolator *this)
{
  NiColorInterpolator *v1; // ebx@1
  NiColorData *v2; // eax@1
  unsigned int v3; // ecx@2
  char v4; // dl@2
  NiColorKey *v5; // esi@2
  NiAnimationKey::KeyType v6; // edi@2
  NiColorData *v7; // esi@3
  float v8; // eax@9
  float v9; // edx@9
  float v10; // eax@9
  unsigned int v11; // edi@12
  NiColorData *v12; // esi@20
  float v13; // edx@25
  float v14; // eax@25
  float v15; // ecx@25
  NiColorA kValue; // [sp+4h] [bp-18h]@9
  unsigned int uiNumKeys; // [sp+14h] [bp-8h]@2
  char ucSize; // [sp+1Ah] [bp-2h]@2
  bool bCollapse; // [sp+1Bh] [bp-1h]@12

  v1 = this;
  v2 = this->m_spColorData.m_pObject;
  if ( v2 )
  {
    v3 = v2->m_uiNumKeys;
    v4 = v2->m_ucKeySize;
    v5 = v2->m_pkKeys;
    v6 = v2->m_eType;
    uiNumKeys = v3;
    ucSize = v4;
    if ( v3 )
    {
      v8 = v5->m_Color.g;
      kValue.r = v5->m_Color.r;
      v9 = v5->m_Color.b;
      kValue.g = v8;
      v10 = v5->m_Color.a;
      kValue.b = v9;
      kValue.a = v10;
      if ( v3 == 1 )
        goto LABEL_28;
      if ( v6 == 1 || v6 == 5 )
      {
        bCollapse = 1;
        v11 = 1;
        while ( v11 < v3 )
        {
          if ( (unsigned __int8)NiColorA::operator!=(
                                  (NiPlane *)((char *)&v5->m_Color + v11 * (unsigned __int8)ucSize),
                                  (NiPlane *)&kValue) )
            bCollapse = 0;
          ++v11;
          if ( !bCollapse )
            return;
          v3 = uiNumKeys;
        }
        if ( bCollapse )
        {
LABEL_28:
          v12 = v1->m_spColorData.m_pObject;
          if ( v12 )
          {
            if ( !InterlockedDecrement((volatile LONG *)&v12->m_uiRefCount) && v12 )
              v12->vfptr->__vecDelDtor((NiRefObject *)v12, 1u);
            v1->m_spColorData.m_pObject = 0;
          }
          v13 = kValue.g;
          v14 = kValue.b;
          v1->m_kColorValue.r = kValue.r;
          v15 = kValue.a;
          v1->m_kColorValue.g = v13;
          v1->m_kColorValue.b = v14;
          v1->m_kColorValue.a = v15;
        }
      }
    }
    else
    {
      v7 = v2;
      if ( v2 )
      {
        if ( !InterlockedDecrement((volatile LONG *)&v2->m_uiRefCount) )
        {
          if ( v7 )
            v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
        }
        v1->m_spColorData.m_pObject = 0;
      }
      v1->m_kColorValue = NiInterpolator::INVALID_COLORA;
    }
  }
}
// A7CAE8: using guessed type const struct NiColorA NiInterpolator::INVALID_COLORA;

//----- (007F4490) --------------------------------------------------------
NiInterpolator *__thiscall NiColorInterpolator::GetSequenceInterpolator(NiColorInterpolator *this, float fStartTime, float fEndTime)
{
  NiColorInterpolator *v3; // esi@1
  NiInterpolator *result; // eax@1
  NiColorData *v5; // ecx@1
  NiInterpolator *v6; // edi@1
  float v7; // eax@2
  unsigned int v8; // esi@2
  float v9; // ebx@2
  void (__thiscall ***v10)(_DWORD, _DWORD); // esi@11

  v3 = this;
  result = (NiInterpolator *)NiInterpolator::GetSequenceInterpolator(
                               (NiInterpolator *)&this->vfptr,
                               fStartTime,
                               fEndTime);
  v5 = v3->m_spColorData.m_pObject;
  v6 = result;
  if ( v5 )
  {
    NiColorData::GetSequenceData(v5, (NiPointer<NiColorData> *)&fEndTime, fStartTime, fEndTime);
    v7 = fEndTime;
    v8 = v6[2].m_uiRefCount;
    v9 = fEndTime;
    if ( v8 != LODWORD(fEndTime) )
    {
      if ( v8 )
      {
        if ( !InterlockedDecrement((volatile LONG *)(v8 + 4)) && v8 )
          (**(void (__thiscall ***)(_DWORD, _DWORD))v8)(v8, 1);
        v7 = fEndTime;
      }
      *(float *)&v6[2].m_uiRefCount = v9;
      if ( v9 != 0.0 )
      {
        InterlockedIncrement((volatile LONG *)(LODWORD(v9) + 4));
        v7 = fEndTime;
      }
    }
    LODWORD(v6[2].m_fLastTime) = 0;
    if ( v7 != 0.0 )
    {
      v10 = (void (__thiscall ***)(_DWORD, _DWORD))LODWORD(v7);
      if ( !InterlockedDecrement((volatile LONG *)(LODWORD(v7) + 4)) )
      {
        if ( v10 )
          (**v10)(v10, 1);
      }
    }
    result = v6;
  }
  return result;
}

//----- (007F4550) --------------------------------------------------------
char __thiscall NiColorInterpolator::Update(NiColorInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiColorA *kValue)
{
  NiColorInterpolator *v4; // esi@1
  double v5; // st7@1
  NiColorData *v7; // eax@7
  unsigned int v8; // ecx@8
  char v9; // dl@8
  NiAnimationKey::KeyType v10; // edi@8
  NiColorKey *v11; // eax@8
  NiColorA *v12; // eax@9
  NiColorA result; // [sp+20h] [bp-14h]@9
  int ucSize; // [sp+30h] [bp-4h]@8

  v4 = this;
  v5 = fTime;
  if ( fTime == this->m_fLastTime )
  {
    kValue->r = this->m_kColorValue.r;
    kValue->g = this->m_kColorValue.g;
    kValue->b = this->m_kColorValue.b;
    kValue->a = this->m_kColorValue.a;
    if ( NiInterpolator::INVALID_COLORA.r == this->m_kColorValue.r
      && NiInterpolator::INVALID_COLORA.g == this->m_kColorValue.g
      && NiInterpolator::INVALID_COLORA.b == this->m_kColorValue.b
      && NiInterpolator::INVALID_COLORA.a == this->m_kColorValue.a )
    {
      return 0;
    }
  }
  else
  {
    v7 = this->m_spColorData.m_pObject;
    if ( v7 )
    {
      v8 = v7->m_uiNumKeys;
      v9 = v7->m_ucKeySize;
      v10 = v7->m_eType;
      v11 = v7->m_pkKeys;
      LOBYTE(ucSize) = v9;
      if ( v8 )
      {
        v12 = NiColorKey::GenInterp(&result, fTime, v11, v10, v8, &v4->m_uiLastIdx, ucSize);
        v5 = fTime;
        v4->m_kColorValue.r = v12->r;
        v4->m_kColorValue.g = v12->g;
        v4->m_kColorValue.b = v12->b;
        v4->m_kColorValue.a = v12->a;
      }
    }
    if ( NiInterpolator::INVALID_COLORA.r == v4->m_kColorValue.r
      && NiInterpolator::INVALID_COLORA.g == v4->m_kColorValue.g
      && NiInterpolator::INVALID_COLORA.b == v4->m_kColorValue.b
      && NiInterpolator::INVALID_COLORA.a == v4->m_kColorValue.a )
    {
      return 0;
    }
    kValue->r = v4->m_kColorValue.r;
    kValue->g = v4->m_kColorValue.g;
    kValue->b = v4->m_kColorValue.b;
    kValue->a = v4->m_kColorValue.a;
    v4->m_fLastTime = v5;
  }
  return 1;
}
// A7CAE8: using guessed type const struct NiColorA NiInterpolator::INVALID_COLORA;

//----- (007F46C0) --------------------------------------------------------
void __thiscall NiColorInterpolator::CopyMembers(NiQuaternionInterpolator *this, NiQuaternionInterpolator *pkDest, NiCloningProcess *kCloning)
{
  NiQuaternionInterpolator *v3; // esi@1
  NiRotData *v4; // ebx@1
  NiRotData *v5; // eax@6

  v3 = this;
  NiBackToFrontAccumulator::CopyMembers((NiBackToFrontAccumulator *)this, (NiBackToFrontAccumulator *)pkDest, kCloning);
  pkDest->m_kQuaternionValue.m_fW = v3->m_kQuaternionValue.m_fW;
  pkDest->m_kQuaternionValue.m_fX = v3->m_kQuaternionValue.m_fX;
  pkDest->m_kQuaternionValue.m_fY = v3->m_kQuaternionValue.m_fY;
  pkDest->m_kQuaternionValue.m_fZ = v3->m_kQuaternionValue.m_fZ;
  v4 = pkDest->m_spQuaternionData.m_pObject;
  if ( v4 == v3->m_spQuaternionData.m_pObject )
  {
    pkDest->m_uiLastIdx = v3->m_uiLastIdx;
  }
  else
  {
    if ( v4 && !InterlockedDecrement((volatile LONG *)&v4->m_uiRefCount) && v4 )
      v4->vfptr->__vecDelDtor((NiRefObject *)v4, 1u);
    v5 = v3->m_spQuaternionData.m_pObject;
    pkDest->m_spQuaternionData.m_pObject = v5;
    if ( v5 )
    {
      InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
      pkDest->m_uiLastIdx = v3->m_uiLastIdx;
    }
    else
    {
      pkDest->m_uiLastIdx = v3->m_uiLastIdx;
    }
  }
}

//----- (007F4750) --------------------------------------------------------
NiKeyBasedInterpolator *__cdecl NiColorInterpolator::CreateObject()
{
  NiKeyBasedInterpolator *v0; // eax@1
  NiKeyBasedInterpolator *v1; // esi@1
  NiKeyBasedInterpolator *result; // eax@2

  v0 = (NiKeyBasedInterpolator *)operator new(0x24u);
  v1 = v0;
  if ( v0 )
  {
    NiKeyBasedInterpolator::NiKeyBasedInterpolator(v0);
    v1->vfptr = (NiRefObjectVtbl *)&NiColorInterpolator::`vftable';
    *(struct NiColorA *)&v1[1].vfptr = NiInterpolator::INVALID_COLORA;
    v1[2].m_uiRefCount = 0;
    LODWORD(v1[2].m_fLastTime) = 0;
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E6F2C: using guessed type int (__thiscall *NiColorInterpolator::`vftable')(void *p, char);
// A7CAE8: using guessed type const struct NiColorA NiInterpolator::INVALID_COLORA;

//----- (007F47B0) --------------------------------------------------------
char __thiscall NiColorInterpolator::IsEqual(NiColorInterpolator *this, NiObject *pkObject)
{
  NiColorInterpolator *v2; // esi@1
  NiColorData *v4; // ecx@4

  v2 = this;
  if ( !NiKeyBasedInterpolator::IsEqual((NiKeyBasedInterpolator *)&this->vfptr, pkObject)
    || (unsigned __int8)NiColorA::operator!=((NiPlane *)&v2->m_kColorValue, (NiPlane *)&pkObject[1].m_uiRefCount) )
  {
    return 0;
  }
  v4 = v2->m_spColorData.m_pObject;
  if ( v4 )
  {
    if ( !pkObject[3].m_uiRefCount )
      return 0;
    if ( v4 )
      goto LABEL_13;
  }
  if ( pkObject[3].m_uiRefCount )
    return 0;
  if ( v4 )
  {
LABEL_13:
    if ( (unsigned __int8)((int (__stdcall *)(_DWORD))v4->vfptr[7].__vecDelDtor)(pkObject[3].m_uiRefCount) )
      return 1;
    return 0;
  }
  return 1;
}

//----- (007F4810) --------------------------------------------------------
NiQuaternionInterpolator *__thiscall NiColorInterpolator::`vector deleting destructor'(NiQuaternionInterpolator *this, unsigned int a2)
{
  NiQuaternionInterpolator *v2; // edi@1
  NiRotData *v3; // esi@1

  v2 = this;
  v3 = this->m_spQuaternionData.m_pObject;
  if ( v3 && !InterlockedDecrement((volatile LONG *)&v3->m_uiRefCount) && v3 )
    v3->vfptr->__vecDelDtor((NiRefObject *)v3, 1u);
  NiKeyBasedInterpolator::~NiKeyBasedInterpolator((NiKeyBasedInterpolator *)&v2->vfptr);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}

//----- (007F4860) --------------------------------------------------------
NiKeyBasedInterpolator *__thiscall NiColorInterpolator::CreateClone(NiColorInterpolator *this, NiCloningProcess *kCloning)
{
  NiQuaternionInterpolator *v2; // ebx@1
  NiKeyBasedInterpolator *v3; // eax@1
  NiKeyBasedInterpolator *v4; // esi@1
  NiKeyBasedInterpolator *result; // eax@2

  v2 = (NiQuaternionInterpolator *)this;
  v3 = (NiKeyBasedInterpolator *)operator new(0x24u);
  v4 = v3;
  if ( v3 )
  {
    NiKeyBasedInterpolator::NiKeyBasedInterpolator(v3);
    v4->vfptr = (NiRefObjectVtbl *)&NiColorInterpolator::`vftable';
    *(struct NiColorA *)&v4[1].vfptr = NiInterpolator::INVALID_COLORA;
    v4[2].m_uiRefCount = 0;
    LODWORD(v4[2].m_fLastTime) = 0;
    NiColorInterpolator::CopyMembers(v2, (NiQuaternionInterpolator *)v4, kCloning);
    result = v4;
  }
  else
  {
    NiColorInterpolator::CopyMembers(v2, 0, kCloning);
    result = 0;
  }
  return result;
}
// 9E6F2C: using guessed type int (__thiscall *NiColorInterpolator::`vftable')(void *p, char);
// A7CAE8: using guessed type const struct NiColorA NiInterpolator::INVALID_COLORA;

//----- (007F48E0) --------------------------------------------------------
void __thiscall NiColorInterpolator::GetViewerStrings(NiColorInterpolator *this, NiTArray<char *> *pkStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiColorInterpolator *v3; // ebx@1
  NiTArray<char *> *v4; // eax@1
  unsigned int v5; // edi@1
  NiTArray<char *> *v6; // eax@3
  unsigned int v7; // edi@3
  NiTArray<char *> *v8; // eax@5
  unsigned int v9; // edi@5

  v2 = (NiTArray<NiVBBlock *> *)pkStrings;
  v3 = this;
  NiKeyBasedInterpolator::GetViewerStrings((NiKeyBasedInterpolator *)&this->vfptr, pkStrings);
  v4 = (NiTArray<char *> *)NiGetViewerString(NiColorInterpolator::m_RTTI.m_pcName);
  v5 = v2->m_uiSize;
  pkStrings = v4;
  if ( v5 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v5 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v5, (NiVBChip *const *)&pkStrings);
  v6 = (NiTArray<char *> *)NiColorA::GetViewerString(&v3->m_kColorValue, "m_kColorValue");
  v7 = v2->m_uiSize;
  pkStrings = v6;
  if ( v7 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v7 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v7, (NiVBChip *const *)&pkStrings);
  v8 = (NiTArray<char *> *)NiGetViewerString("m_spColorData", v3->m_spColorData.m_pObject);
  v9 = v2->m_uiSize;
  pkStrings = v8;
  if ( v9 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v9 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v9, (NiVBChip *const *)&pkStrings);
}

//----- (007F4990) --------------------------------------------------------
void __stdcall NiColorExtraDataController::CreateBlendInterpolator(unsigned __int16 usIndex, bool bManagerControlled, bool bAccumulateAnimations, float fWeightThreshold, char ucArraySize)
{
  NiBlendColorInterpolator *v6; // eax@1

  v6 = (NiBlendColorInterpolator *)operator new(0x44u);
  if ( v6 )
    NiBlendColorInterpolator::NiBlendColorInterpolator(v6, bManagerControlled, fWeightThreshold, ucArraySize);
}

//----- (007F49D0) --------------------------------------------------------
int __stdcall NiColorExtraDataController::InterpolatorIsCorrectType(NiInterpolator *pkInterpolator, unsigned __int16 usIndex)
{
  return ((int (*)(void))pkInterpolator->vfptr[25].__vecDelDtor)();
}

//----- (007F49F0) --------------------------------------------------------
NiObject *__cdecl NiColorExtraDataController::CreateObject()
{
  NiExtraDataController *v0; // eax@1
  NiObject *v1; // esi@1
  NiObject *result; // eax@2

  v0 = (NiExtraDataController *)operator new(0x48u);
  v1 = (NiObject *)v0;
  if ( v0 )
  {
    NiExtraDataController::NiExtraDataController(v0);
    v1->vfptr = (NiRefObjectVtbl *)&NiColorExtraDataController::`vftable';
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E6FF4: using guessed type int (__thiscall *NiColorExtraDataController::`vftable')(void *p, char);

//----- (007F4A20) --------------------------------------------------------
void __thiscall NiColorExtraDataController::SaveBinary(NiPSysModifierFloatCtlr *this, NiStream *kStream)
{
  NiPSysModifierCtlr::SaveBinary((NiPSysModifierCtlr *)&this->vfptr, kStream);
}

//----- (007F4A30) --------------------------------------------------------
char __thiscall NiFloatExtraDataController::IsEqual(NiFloatExtraDataController *this, NiObject *pkObject)
{
  return NiExtraDataController::IsEqual((NiExtraDataController *)&this->vfptr, pkObject);
}

//----- (007F4A40) --------------------------------------------------------
NiRTTI *NiColorExtraDataController::GetRTTI()
{
  return &NiColorExtraDataController::m_RTTI;
}

//----- (007F4A50) --------------------------------------------------------
void __thiscall NiColorExtraDataController::CreatePoseInterpolator(NiColorExtraDataController *this, unsigned __int16 usIndex)
{
  NiColorExtraDataController *v2; // esi@1
  NiColorInterpolator *v3; // eax@1
  NiExtraData *v4; // edx@2
  NiColorA v5; // ST00_16@2

  v2 = this;
  v3 = (NiColorInterpolator *)operator new(0x24u);
  if ( v3 )
  {
    v4 = v2->m_spExtraData.m_pObject;
    *(NiObject *)&v5.r = v4[1].0;
    *(_QWORD *)&v5.b = *(_QWORD *)&v4[1].m_pcName;
    NiColorInterpolator::NiColorInterpolator(v3, v5);
  }
}

//----- (007F4AA0) --------------------------------------------------------
NiPSysModifierCtlr *__thiscall NiColorExtraDataController::CreateClone(NiColorExtraDataController *this, NiCloningProcess *kCloning)
{
  NiPSysModifierCtlr *v2; // edi@1
  NiExtraDataController *v3; // eax@1
  NiPSysModifierCtlr *v4; // esi@1
  NiPSysModifierCtlr *result; // eax@2

  v2 = (NiPSysModifierCtlr *)this;
  v3 = (NiExtraDataController *)operator new(0x48u);
  v4 = (NiPSysModifierCtlr *)v3;
  if ( v3 )
  {
    NiExtraDataController::NiExtraDataController(v3);
    v4->vfptr = (NiRefObjectVtbl *)&NiColorExtraDataController::`vftable';
    NiPSysModifierCtlr::CopyMembers(v2, v4, kCloning);
    result = v4;
  }
  else
  {
    NiPSysModifierCtlr::CopyMembers(v2, 0, kCloning);
    result = 0;
  }
  return result;
}
// 9E6FF4: using guessed type int (__thiscall *NiColorExtraDataController::`vftable')(void *p, char);

//----- (007F4AF0) --------------------------------------------------------
void __thiscall NiColorExtraDataController::LinkObject(NiColorExtraDataController *this, NiStream *kStream)
{
  NiColorExtraDataController *v2; // ebx@1
  NiColorData *v3; // esi@2
  NiColorInterpolator *v4; // eax@2
  NiInterpolator *v5; // eax@3
  NiInterpolator *v6; // edi@3
  NiInterpolator *v7; // esi@5

  v2 = this;
  NiPoint3InterpController::LinkObject((NiPSysModifierCtlr *)this, kStream);
  if ( kStream->m_uiNifFileVersion < 0xA010068 )
  {
    v3 = (NiColorData *)NiStream::GetObjectFromLinkID(kStream);
    v4 = (NiColorInterpolator *)operator new(0x24u);
    if ( v4 )
    {
      NiColorInterpolator::NiColorInterpolator(v4, v3);
      v6 = v5;
    }
    else
    {
      v6 = 0;
    }
    v7 = v2->m_spInterpolator.m_pObject;
    if ( v7 != v6 )
    {
      if ( v7 && !InterlockedDecrement((volatile LONG *)&v7->m_uiRefCount) && v7 )
        v7->vfptr->__vecDelDtor((NiRefObject *)v7, 1u);
      v2->m_spInterpolator.m_pObject = v6;
      if ( v6 )
        InterlockedIncrement((volatile LONG *)&v6->m_uiRefCount);
    }
    ((void (*)(void))v2->m_spInterpolator.m_pObject->vfptr[27].__vecDelDtor)();
  }
}

//----- (007F4B80) --------------------------------------------------------
void __thiscall NiColorExtraDataController::SynchronizePoseInterpolator(NiColorExtraDataController *this, NiInterpolator *pkInterp, unsigned __int16 usIndex)
{
  NiColorExtraDataController *v3; // edi@1
  NiColorInterpolator *v4; // ecx@2
  NiRTTI *v5; // eax@3
  char v6; // al@6
  NiExtraData *v7; // eax@8
  NiColorA v8; // ST00_16@8

  v3 = this;
  if ( pkInterp )
  {
    v5 = (NiRTTI *)((int (__thiscall *)(_DWORD))pkInterp->vfptr[1].__vecDelDtor)(pkInterp);
    if ( v5 )
    {
      while ( v5 != &NiColorInterpolator::m_RTTI )
      {
        v5 = v5->m_pkBaseRTTI;
        if ( !v5 )
          goto LABEL_6;
      }
      v6 = 1;
    }
    else
    {
LABEL_6:
      v6 = 0;
    }
    v4 = (NiColorInterpolator *)(v6 != 0 ? (unsigned int)pkInterp : 0);
  }
  else
  {
    v4 = 0;
  }
  v7 = v3->m_spExtraData.m_pObject;
  *(NiObject *)&v8.r = v7[1].0;
  *(_QWORD *)&v8.b = *(_QWORD *)&v7[1].m_pcName;
  NiColorInterpolator::SetPoseValue(v4, v8);
}

//----- (007F4BF0) --------------------------------------------------------
void __thiscall NiColorExtraDataController::Update(NiColorExtraDataController *this, float fTime)
{
  NiColorExtraDataController *v2; // esi@1
  NiInterpolator *v3; // ecx@4
  NiInterpolator *v4; // ecx@6
  NiObjectNET *v5; // eax@7
  NiColorExtraData *v6; // ecx@8
  NiColorA v7; // ST00_16@9
  NiColorA kValue; // [sp+10h] [bp-10h]@7

  v2 = this;
  if ( (LOBYTE(this->m_uFlags) >> 5) & 1 )
  {
    this->m_fScaledTime = -3.4028235e38;
  }
  else if ( NiTimeController::DontDoUpdate((NiTimeController *)&this->vfptr, fTime) )
  {
    v3 = v2->m_spInterpolator.m_pObject;
    if ( !v3 || !(unsigned __int8)((int (*)(void))v3->vfptr[33].__vecDelDtor)() )
      return;
  }
  v4 = v2->m_spInterpolator.m_pObject;
  if ( v4 )
  {
    kValue.r = 0.0;
    v5 = v2->m_pTarget;
    kValue.g = 0.0;
    kValue.b = 0.0;
    kValue.a = 0.0;
    if ( (unsigned __int8)((int (__stdcall *)(_DWORD, _DWORD, _DWORD))v4->vfptr[16].__vecDelDtor)(
                            v2->m_fScaledTime,
                            v5,
                            &kValue) )
    {
      v6 = (NiColorExtraData *)v2->m_spExtraData.m_pObject;
      if ( v6 )
      {
        *(_QWORD *)&v7.r = *(_QWORD *)&kValue.r;
        *(_QWORD *)&v7.b = *(_QWORD *)&kValue.b;
        NiColorExtraData::SetValue(v6, v7);
      }
    }
  }
}

//----- (007F4CA0) --------------------------------------------------------
void __thiscall NiColorExtraDataController::GetViewerStrings(NiColorExtraDataController *this, NiTArray<char *> *pkStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiTArray<char *> *v3; // eax@1
  unsigned int v4; // edi@1

  v2 = (NiTArray<NiVBBlock *> *)pkStrings;
  NiExtraDataController::GetViewerStrings((NiExtraDataController *)&this->vfptr, pkStrings);
  v3 = (NiTArray<char *> *)NiGetViewerString(NiColorExtraDataController::m_RTTI.m_pcName);
  v4 = v2->m_uiSize;
  pkStrings = v3;
  if ( v4 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v4 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v4, (NiVBChip *const *)&pkStrings);
}

//----- (007F4CF0) --------------------------------------------------------
void __thiscall NiColorData::GuaranteeKeysAtStartAndEnd(NiColorData *this, float fStartTime, float fEndTime)
{
  NiColorData *v3; // esi@1
  NiAnimationKey *pkKeys; // [sp+Ch] [bp-4h]@1

  pkKeys = (NiAnimationKey *)this;
  v3 = this;
  pkKeys = (NiAnimationKey *)&this->m_pkKeys->m_fTime;
  NiAnimationKey::GuaranteeKeyAtStartAndEnd(COLORKEY, this->m_eType, &pkKeys, &this->m_uiNumKeys, fStartTime, fEndTime);
  v3->m_pkKeys = (NiColorKey *)pkKeys;
}

//----- (007F4D30) --------------------------------------------------------
NiRTTI *NiColorData::GetRTTI()
{
  return &NiColorData::m_RTTI;
}

//----- (007F4D40) --------------------------------------------------------
NiObject *__cdecl NiColorData::CreateObject()
{
  NiObject *v0; // eax@1
  NiObject *v1; // esi@1
  NiObject *result; // eax@2

  v0 = (NiObject *)operator new(0x18u);
  v1 = v0;
  if ( v0 )
  {
    NiObject::NiObject(v0);
    v1->vfptr = (NiRefObjectVtbl *)&NiColorData::`vftable';
    v1[1].vfptr = 0;
    v1[1].m_uiRefCount = 0;
    v1[2].vfptr = 0;
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E7094: using guessed type int (__thiscall *NiColorData::`vftable')(void *p, char);

//----- (007F4D80) --------------------------------------------------------
char __thiscall NiColorData::IsEqual(NiColorData *this, NiObject *pkObject)
{
  NiObject *v2; // ebx@1
  NiColorData *v3; // esi@1
  char result; // al@2
  NiRefObjectVtbl *v5; // ecx@3
  NiRefObjectVtbl *v6; // eax@4
  int v7; // edi@6
  bool (__cdecl *equal)(NiAnimationKey *, NiAnimationKey *); // [sp+10h] [bp+8h]@6

  v2 = pkObject;
  v3 = this;
  if ( NiObject::IsEqual((NiObject *)&this->vfptr, pkObject)
    && (v5 = (NiRefObjectVtbl *)v3->m_uiNumKeys, v5 == pkObject[1].vfptr)
    && (v6 = (NiRefObjectVtbl *)v3->m_eType, v6 == pkObject[2].vfptr)
    && v3->m_ucKeySize == LOBYTE(pkObject[2].m_uiRefCount) )
  {
    v7 = 0;
    equal = (bool (__cdecl *)(NiAnimationKey *, NiAnimationKey *))dword_B61CD0[(signed int)v6];
    if ( v5 )
    {
      while ( equal(
                (NiAnimationKey *)((char *)&v3->m_pkKeys->m_fTime + v7 * v3->m_ucKeySize),
                (NiAnimationKey *)(v7 * v3->m_ucKeySize + v2[1].m_uiRefCount)) )
      {
        if ( ++v7 >= v3->m_uiNumKeys )
          goto LABEL_9;
      }
      result = 0;
    }
    else
    {
LABEL_9:
      result = 1;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
// B61CD0: using guessed type int dword_B61CD0[];

//----- (007F4E00) --------------------------------------------------------
CPostProcessEffect *__thiscall NiColorData::`vector deleting destructor'(NiColorData *this, unsigned int a2)
{
  CPostProcessEffect *v2; // esi@1
  NiColorKey *v3; // eax@1

  v2 = (CPostProcessEffect *)this;
  v3 = this->m_pkKeys;
  this->vfptr = (NiRefObjectVtbl *)&NiColorData::`vftable';
  if ( v3 )
    ((void (__cdecl *)(_DWORD))dword_B61A90[this->m_eType])(v3);
  NiRefObject::~NiRefObject(v2);
  if ( a2 & 1 )
    operator delete(v2);
  return v2;
}
// 9E7094: using guessed type int (__thiscall *NiColorData::`vftable')(void *p, char);
// B61A90: using guessed type int dword_B61A90[];

//----- (007F4E40) --------------------------------------------------------
void __thiscall NiColorData::ReplaceAnim(NiColorData *this, NiColorKey *pkKeys, unsigned int uiNumKeys, NiAnimationKey::KeyType eType)
{
  NiColorData *v4; // esi@1
  NiColorKey *v5; // eax@1
  char v6; // dl@5

  v4 = this;
  v5 = this->m_pkKeys;
  if ( v5 )
    ((void (__cdecl *)(_DWORD))dword_B61A90[this->m_eType])(v5);
  if ( pkKeys && uiNumKeys )
  {
    v6 = byte_B61912[eType];
    v4->m_pkKeys = pkKeys;
    v4->m_ucKeySize = v6;
    v4->m_uiNumKeys = uiNumKeys;
    v4->m_eType = eType;
  }
  else
  {
    v4->m_uiNumKeys = 0;
    v4->m_pkKeys = 0;
    v4->m_eType = 0;
    v4->m_ucKeySize = 0;
  }
}
// B61A90: using guessed type int dword_B61A90[];

//----- (007F4EA0) --------------------------------------------------------
NiPointer<NiColorData> *__thiscall NiColorData::GetSequenceData(NiColorData *this, NiPointer<NiColorData> *result, float fStartTime, float fEndTime)
{
  NiColorData *v4; // esi@1
  NiColorData *v5; // eax@1
  NiPointer<NiColorData> *v6; // edi@1
  NiAnimationKey *v7; // ebx@3
  unsigned int v8; // eax@7
  NiAnimationKey *pkNewKeys; // [sp+1Ch] [bp-4h]@1

  v4 = this;
  v5 = (NiColorData *)NiObject::CreateDeepCopy((NiObject *)&this->vfptr, (NiPointer<NiObject> *)&pkNewKeys)->m_pObject;
  v6 = result;
  result->m_pObject = v5;
  if ( v5 )
    InterlockedIncrement((volatile LONG *)&v5->m_uiRefCount);
  v7 = pkNewKeys;
  if ( pkNewKeys && !InterlockedDecrement((volatile LONG *)&pkNewKeys[1]) && v7 )
    (*(void (__thiscall **)(NiAnimationKey *, signed int))LODWORD(v7->m_fTime))(v7, 1);
  v8 = v4->m_uiNumKeys;
  if ( v8 )
  {
    pkNewKeys = 0;
    result = 0;
    NiAnimationKey::CopySequence(
      COLORKEY,
      v4->m_eType,
      (NiAnimationKey *)&v4->m_pkKeys->m_fTime,
      v8,
      fStartTime,
      fEndTime,
      &pkNewKeys,
      (unsigned int *)&result);
    NiColorData::ReplaceAnim(v6->m_pObject, (NiColorKey *)pkNewKeys, (unsigned int)result, v4->m_eType);
  }
  return v6;
}

//----- (007F4F50) --------------------------------------------------------
void __thiscall NiColorData::LoadBinary(NiColorData *this, NiStream *stream)
{
  NiStream *v2; // esi@1
  NiColorData *v3; // edi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST08_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v7; // eax@2
  NiBinaryStream *v8; // ST08_4@2
  unsigned int (__cdecl *v9)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@2
  NiAnimationKey::KeyType v10; // ebx@2
  NiColorKey *v11; // eax@2
  NiAnimationKey::KeyType eType; // [sp+Ch] [bp-8h]@2
  int v13; // [sp+10h] [bp-4h]@1

  v2 = stream;
  v3 = this;
  NiObject::LoadBinary((NiObject *)&this->vfptr, stream);
  v4 = v2->m_pkIstr;
  v5 = v4;
  v6 = v4->m_pfnRead;
  v13 = 4;
  v6(v5, &stream, 4u, (unsigned int *)&v13, 1u);
  if ( stream )
  {
    v7 = v2->m_pkIstr;
    v8 = v7;
    v9 = v7->m_pfnRead;
    v13 = 4;
    v9(v8, &eType, 4u, (unsigned int *)&v13, 1u);
    v10 = eType;
    v11 = (NiColorKey *)((int (__cdecl *)(NiStream *, NiStream *))dword_B61FA0[eType])(v2, stream);
    NiColorData::ReplaceAnim(v3, v11, (unsigned int)stream, v10);
  }
}
// B61FA0: using guessed type int dword_B61FA0[];

//----- (007F4FD0) --------------------------------------------------------
void __thiscall NiColorData::SaveBinary(NiColorData *this, NiStream *stream)
{
  NiStream *v2; // edi@1
  NiColorData *v3; // esi@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@1
  NiBinaryStream *v5; // ST0C_4@1
  NiBinaryStream *v6; // eax@2
  NiBinaryStream *v7; // ST0C_4@2
  unsigned int (__cdecl *v8)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@2

  v2 = stream;
  v3 = this;
  NiTMapBase<NiTPointerAllocator<unsigned int>,NiDynamicTexture *,NiDX9DynamicTextureData *>::ClearValue(
    (NiVBDynamicSet *)this,
    (IDirect3DVertexBuffer9 *)stream);
  v4 = v2->m_pkOstr->m_pfnWrite;
  v5 = v2->m_pkOstr;
  stream = (NiStream *)4;
  v4(v5, &v3->m_uiNumKeys, 4u, (unsigned int *)&stream, 1u);
  if ( v3->m_uiNumKeys )
  {
    v6 = v2->m_pkOstr;
    v7 = v6;
    v8 = v6->m_pfnWrite;
    stream = (NiStream *)4;
    v8(v7, &v3->m_eType, 4u, (unsigned int *)&stream, 1u);
    ((void (__cdecl *)(_DWORD, _DWORD, _DWORD))dword_B61C40[v3->m_eType])(v2, v3->m_pkKeys, v3->m_uiNumKeys);
  }
}
// B61C40: using guessed type int dword_B61C40[];

//----- (007F5050) --------------------------------------------------------
void __thiscall NiColorData::GetViewerStrings(NiColorData *this, NiTArray<char *> *pStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiColorData *v3; // ebx@1
  NiTArray<char *> *v4; // eax@1
  unsigned int v5; // edi@1
  NiTArray<char *> *v6; // eax@3
  unsigned int v7; // edi@3

  v2 = (NiTArray<NiVBBlock *> *)pStrings;
  v3 = this;
  NiObject::GetViewerStrings((NiObject *)&this->vfptr, pStrings);
  v4 = (NiTArray<char *> *)NiGetViewerString(NiColorData::m_RTTI.m_pcName);
  v5 = v2->m_uiSize;
  pStrings = v4;
  if ( v5 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v5 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v5, (NiVBChip *const *)&pStrings);
  v6 = (NiTArray<char *> *)NiGetViewerString("m_uiNumKeys", v3->m_uiNumKeys);
  v7 = v2->m_uiSize;
  pStrings = v6;
  if ( v7 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v7 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v7, (NiVBChip *const *)&pStrings);
}

//----- (007F50D0) --------------------------------------------------------
signed int __stdcall NiBSplineTransformInterpolator::GetDimension(unsigned __int16 usChannel)
{
  signed int result; // eax@3

  if ( usChannel )
  {
    if ( usChannel == 1 )
      result = 4;
    else
      result = usChannel == 2;
  }
  else
  {
    result = 3;
  }
  return result;
}

//----- (007F5110) --------------------------------------------------------
signed int __stdcall NiBSplineTransformInterpolator::GetDegree(unsigned __int16 usChannel)
{
  signed int result; // eax@4

  if ( usChannel && usChannel != 1 && usChannel != 2 )
    result = 0;
  else
    result = 3;
  return result;
}

//----- (007F5140) --------------------------------------------------------
unsigned int __thiscall NiBSplineTransformInterpolator::GetControlHandle(NiBSplineTransformInterpolator *this, unsigned __int16 usChannel)
{
  unsigned int result; // eax@4

  if ( usChannel )
  {
    if ( usChannel == 1 )
    {
      result = this->m_kRotCPHandle;
    }
    else if ( usChannel == 2 )
    {
      result = this->m_kScaleCPHandle;
    }
    else
    {
      result = 0xFFFF;
    }
  }
  else
  {
    result = this->m_kTransCPHandle;
  }
  return result;
}

//----- (007F5170) --------------------------------------------------------
void __thiscall NiBSplineTransformInterpolator::SetControlHandle(NiBSplineTransformInterpolator *this, unsigned int kControlHandle, unsigned __int16 usChannel)
{
  if ( usChannel )
  {
    if ( usChannel == 1 )
    {
      this->m_kRotCPHandle = kControlHandle;
    }
    else if ( usChannel == 2 )
    {
      this->m_kScaleCPHandle = kControlHandle;
    }
  }
  else
  {
    this->m_kTransCPHandle = kControlHandle;
  }
}

//----- (007F51A0) --------------------------------------------------------
void __thiscall NiBSplineTransformInterpolator::CopyMembers(NiBSplineTransformInterpolator *this, NiBSplineTransformInterpolator *pkDest, NiCloningProcess *kCloning)
{
  NiBSplineTransformInterpolator *v3; // ebx@1

  v3 = this;
  NiBSplineInterpolator::CopyMembers(
    (NiBSplineInterpolator *)&this->vfptr,
    (NiBSplineInterpolator *)&pkDest->vfptr,
    kCloning);
  qmemcpy(&pkDest->m_kTransformValue, &v3->m_kTransformValue, 0x2Cu);
}

//----- (007F51E0) --------------------------------------------------------
NiRTTI *NiBSplineTransformInterpolator::GetRTTI()
{
  return &NiBSplineTransformInterpolator::m_RTTI;
}

//----- (007F51F0) --------------------------------------------------------
void __thiscall NiBSplineTransformInterpolator::NiBSplineTransformInterpolator(NiBSplineTransformInterpolator *this, NiBSplineData *pkData, unsigned int kTransCPHandle, unsigned int kRotCPHandle, unsigned int kScaleCPHandle, NiBSplineBasisData *pkBasisData)
{
  NiBSplineTransformInterpolator *v6; // esi@1

  v6 = this;
  NiBSplineInterpolator::NiBSplineInterpolator((NiBSplineInterpolator *)&this->vfptr, pkData, pkBasisData);
  v6->vfptr = (NiRefObjectVtbl *)&NiBSplineTransformInterpolator::`vftable';
  v6->m_kTransformValue.m_kTranslate = NiQuatTransform::INVALID_TRANSLATE;
  v6->m_kTransformValue.m_kRotate = NiQuatTransform::INVALID_ROTATE;
  v6->m_kTransformValue.m_fScale = -3.4028235e38;
  v6->m_kTransCPHandle = kTransCPHandle;
  v6->m_kRotCPHandle = kRotCPHandle;
  v6->m_kScaleCPHandle = kScaleCPHandle;
}
// 9E70D4: using guessed type int (__thiscall *NiBSplineTransformInterpolator::`vftable')(void *p, char);
// A7CAD0: using guessed type const struct NiPoint3 NiQuatTransform::INVALID_TRANSLATE;

//----- (007F5270) --------------------------------------------------------
bool __thiscall NiBSplineTransformInterpolator::GetChannelPosed(NiBSplineTransformInterpolator *this, int usChannel)
{
  NiBSplineTransformInterpolator *v2; // esi@1
  double v3; // st7@5

  v2 = this;
  if ( !(_WORD)usChannel )
  {
    if ( !(int)this->vfptr[35].__vecDelDtor((NiRefObject *)this, usChannel) )
    {
      v3 = v2->m_kTransformValue.m_kTranslate.x;
      return -3.4028235e38 != v3;
    }
    return 0;
  }
  if ( (unsigned __int16)usChannel == 1 )
  {
    if ( !(int)this->vfptr[35].__vecDelDtor((NiRefObject *)this, usChannel) )
    {
      v3 = v2->m_kTransformValue.m_kRotate.m_fX;
      return -3.4028235e38 != v3;
    }
    return 0;
  }
  if ( (unsigned __int16)usChannel != 2 || (int)this->vfptr[35].__vecDelDtor((NiRefObject *)this, usChannel) )
    return 0;
  v3 = v2->m_kTransformValue.m_fScale;
  return -3.4028235e38 != v3;
}

//----- (007F52F0) --------------------------------------------------------
NiObject *__thiscall NiBSplineTransformInterpolator::CreateClone(NiBSplineTransformInterpolator *this, NiCloningProcess *kCloning)
{
  NiBSplineTransformInterpolator *v2; // esi@1
  NiBSplineTransformInterpolator *v3; // eax@1
  int v4; // eax@2
  int v5; // ebx@2
  NiBSplineTransformInterpolator *v7; // [sp+Ch] [bp-4h]@1

  v2 = this;
  v7 = this;
  v3 = (NiBSplineTransformInterpolator *)operator new(0x48u);
  if ( v3 )
  {
    NiBSplineTransformInterpolator::NiBSplineTransformInterpolator(v3, 0, 0xFFFFu, 0xFFFFu, 0xFFFFu, 0);
    v5 = v4;
  }
  else
  {
    v5 = 0;
  }
  NiBSplineInterpolator::CopyMembers((NiBSplineInterpolator *)&v2->vfptr, (NiBSplineInterpolator *)v5, kCloning);
  qmemcpy((void *)(v5 + 28), &v2->m_kTransformValue, 0x20u);
  *(_DWORD *)(v5 + 60) = v7->m_kTransCPHandle;
  *(_DWORD *)(v5 + 64) = v7->m_kRotCPHandle;
  *(_DWORD *)(v5 + 68) = v7->m_kScaleCPHandle;
  return (NiObject *)v5;
}

//----- (007F5370) --------------------------------------------------------
void __cdecl NiBSplineTransformInterpolator::CreateObject()
{
  NiBSplineTransformInterpolator *v0; // eax@1

  v0 = (NiBSplineTransformInterpolator *)operator new(0x48u);
  if ( v0 )
    NiBSplineTransformInterpolator::NiBSplineTransformInterpolator(v0, 0, 0xFFFFu, 0xFFFFu, 0xFFFFu, 0);
}

//----- (007F53A0) --------------------------------------------------------
bool __thiscall NiBSplineTransformInterpolator::IsEqual(NiBSplineTransformInterpolator *this, NiObject *pkObject)
{
  NiBSplineTransformInterpolator *v2; // esi@1

  v2 = this;
  return NiBSplineInterpolator::IsEqual((NiBSplineInterpolator *)&this->vfptr, pkObject)
      && (unsigned __int8)NiQuatTransform::operator==(
                            &v2->m_kTransformValue,
                            (NiQuatTransform *)&pkObject[3].m_uiRefCount)
      && pkObject[7].m_uiRefCount == v2->m_kTransCPHandle
      && pkObject[8].vfptr == (NiRefObjectVtbl *)v2->m_kRotCPHandle
      && pkObject[8].m_uiRefCount == v2->m_kScaleCPHandle;
}

//----- (007F53F0) --------------------------------------------------------
char __thiscall NiBSplineTransformInterpolator::Update(NiBSplineTransformInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiQuatTransform *kValue)
{
  NiBSplineTransformInterpolator *v4; // ebx@1
  double v5; // st7@2
  unsigned int v7; // eax@7
  double v8; // st7@8
  double v9; // st7@8
  float v10; // edx@10
  float v11; // eax@10
  float v12; // ecx@10
  double v13; // st7@13
  NiQuaternion kQuat; // [sp+20h] [bp-28h]@8
  float fNormTime; // [sp+30h] [bp-18h]@2
  float afValues[4]; // [sp+34h] [bp-14h]@8

  v4 = this;
  if ( fTime == this->m_fLastTime )
  {
    qmemcpy(kValue, &this->m_kTransformValue, sizeof(NiQuatTransform));
    fNormTime = -3.4028235e38;
    v5 = fNormTime;
    if ( fNormTime == this->m_kTransformValue.m_fScale
      && v5 == this->m_kTransformValue.m_kRotate.m_fX
      && this->m_kTransformValue.m_kTranslate.x == v5 )
    {
      return 0;
    }
  }
  else
  {
    v7 = this->m_kTransCPHandle;
    fNormTime = (fTime - this->m_fStartTime) / (this->m_fEndTime - this->m_fStartTime);
    if ( v7 != 0xFFFF )
    {
      NiBSplineData::GetValueDegree3(
        this->m_spData.m_pObject,
        fNormTime,
        afValues,
        3u,
        this->m_spBasisData.m_pObject,
        v7);
      kQuat.m_fX = afValues[0];
      v8 = afValues[1];
      v4->m_kTransformValue.m_kTranslate.x = afValues[0];
      kQuat.m_fY = v8;
      v9 = afValues[2];
      v4->m_kTransformValue.m_kTranslate.y = kQuat.m_fY;
      kQuat.m_fZ = v9;
      v4->m_kTransformValue.m_kTranslate.z = kQuat.m_fZ;
    }
    if ( v4->m_kRotCPHandle != 0xFFFF )
    {
      NiBSplineData::GetValueDegree3(
        v4->m_spData.m_pObject,
        fNormTime,
        afValues,
        4u,
        v4->m_spBasisData.m_pObject,
        v4->m_kRotCPHandle);
      NiQuaternion::NiQuaternion(&kQuat, afValues[0], afValues[1], afValues[2], afValues[3]);
      NiQuaternion::FastNormalize(&kQuat);
      v10 = kQuat.m_fX;
      v11 = kQuat.m_fY;
      v4->m_kTransformValue.m_kRotate.m_fW = kQuat.m_fW;
      v12 = kQuat.m_fZ;
      v4->m_kTransformValue.m_kRotate.m_fX = v10;
      v4->m_kTransformValue.m_kRotate.m_fY = v11;
      v4->m_kTransformValue.m_kRotate.m_fZ = v12;
    }
    if ( v4->m_kScaleCPHandle != 0xFFFF )
    {
      NiBSplineData::GetValueDegree3(
        v4->m_spData.m_pObject,
        fNormTime,
        afValues,
        1u,
        v4->m_spBasisData.m_pObject,
        v4->m_kScaleCPHandle);
      v4->m_kTransformValue.m_fScale = afValues[0];
    }
    qmemcpy(kValue, &v4->m_kTransformValue, sizeof(NiQuatTransform));
    fNormTime = -3.4028235e38;
    v13 = fNormTime;
    if ( fNormTime == v4->m_kTransformValue.m_fScale
      && v13 == v4->m_kTransformValue.m_kRotate.m_fX
      && v4->m_kTransformValue.m_kTranslate.x == v13 )
    {
      return 0;
    }
    v4->m_fLastTime = fTime;
  }
  return 1;
}

//----- (007F55E0) --------------------------------------------------------
void __thiscall NiBSplineTransformInterpolator::SaveBinary(NiBSplineTransformInterpolator *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiBSplineTransformInterpolator *v3; // esi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST28_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v7; // eax@1
  NiBinaryStream *v8; // ST14_4@1
  unsigned int (__cdecl *v9)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v10; // edi@1
  unsigned int (__cdecl *v11)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@1

  v2 = kStream;
  v3 = this;
  NiBSplineInterpolator::SaveBinary((NiBSplineInterpolator *)&this->vfptr, kStream);
  NiQuatTransform::SaveBinary(&v3->m_kTransformValue, v2);
  v4 = v2->m_pkOstr;
  v5 = v4;
  v6 = v4->m_pfnWrite;
  kStream = (NiStream *)4;
  v6(v5, &v3->m_kTransCPHandle, 4u, (unsigned int *)&kStream, 1u);
  v7 = v2->m_pkOstr;
  v8 = v7;
  v9 = v7->m_pfnWrite;
  kStream = (NiStream *)4;
  v9(v8, &v3->m_kRotCPHandle, 4u, (unsigned int *)&kStream, 1u);
  v10 = v2->m_pkOstr;
  v11 = v10->m_pfnWrite;
  kStream = (NiStream *)4;
  v11(v10, &v3->m_kScaleCPHandle, 4u, (unsigned int *)&kStream, 1u);
}

//----- (007F5660) --------------------------------------------------------
void __thiscall NiBSplineTransformInterpolator::LoadBinary(NiBSplineTransformInterpolator *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiBSplineTransformInterpolator *v3; // esi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST28_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v7; // eax@1
  NiBinaryStream *v8; // ST14_4@1
  unsigned int (__cdecl *v9)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v10; // edi@1
  unsigned int (__cdecl *v11)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@1

  v2 = kStream;
  v3 = this;
  NiBSplineInterpolator::LoadBinary((NiBSplineInterpolator *)&this->vfptr, kStream);
  NiQuatTransform::LoadBinary(&v3->m_kTransformValue, v2);
  v4 = v2->m_pkIstr;
  v5 = v4;
  v6 = v4->m_pfnRead;
  kStream = (NiStream *)4;
  v6(v5, &v3->m_kTransCPHandle, 4u, (unsigned int *)&kStream, 1u);
  v7 = v2->m_pkIstr;
  v8 = v7;
  v9 = v7->m_pfnRead;
  kStream = (NiStream *)4;
  v9(v8, &v3->m_kRotCPHandle, 4u, (unsigned int *)&kStream, 1u);
  v10 = v2->m_pkIstr;
  v11 = v10->m_pfnRead;
  kStream = (NiStream *)4;
  v11(v10, &v3->m_kScaleCPHandle, 4u, (unsigned int *)&kStream, 1u);
}

//----- (007F56E0) --------------------------------------------------------
void __thiscall NiBSplineTransformInterpolator::GetViewerStrings(NiBSplineTransformInterpolator *this, NiTArray<char *> *pkStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiBSplineTransformInterpolator *v3; // edi@1
  NiTArray<char *> *v4; // eax@1
  unsigned int v5; // ebx@1
  NiTArray<char *> *v6; // eax@3
  unsigned int v7; // ebx@3
  NiTArray<char *> *v8; // eax@5
  unsigned int v9; // ebx@5
  NiTArray<char *> *v10; // eax@7
  unsigned int v11; // edi@7

  v2 = (NiTArray<NiVBBlock *> *)pkStrings;
  v3 = this;
  NiBSplineInterpolator::GetViewerStrings((NiBSplineInterpolator *)&this->vfptr, pkStrings);
  v4 = (NiTArray<char *> *)NiGetViewerString(NiBSplineTransformInterpolator::m_RTTI.m_pcName);
  v5 = v2->m_uiSize;
  pkStrings = v4;
  if ( v5 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v5 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v5, (NiVBChip *const *)&pkStrings);
  NiQuatTransform::GetViewerStrings(&v3->m_kTransformValue, (NiTArray<char *> *)v2);
  v6 = (NiTArray<char *> *)NiGetViewerString("m_kTransCPHandle", v3->m_kTransCPHandle);
  v7 = v2->m_uiSize;
  pkStrings = v6;
  if ( v7 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v7 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v7, (NiVBChip *const *)&pkStrings);
  v8 = (NiTArray<char *> *)NiGetViewerString("m_kRotCPHandle", v3->m_kRotCPHandle);
  v9 = v2->m_uiSize;
  pkStrings = v8;
  if ( v9 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v9 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v9, (NiVBChip *const *)&pkStrings);
  v10 = (NiTArray<char *> *)NiGetViewerString("m_kScaleCPHandle", v3->m_kScaleCPHandle);
  v11 = v2->m_uiSize;
  pkStrings = v10;
  if ( v11 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v11 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v11, (NiVBChip *const *)&pkStrings);
}

//----- (007F57E0) --------------------------------------------------------
signed int __stdcall NiBSplineColorInterpolator::GetDegree(unsigned __int16 usChannel)
{
  return usChannel != 0 ? 0 : 3;
}

//----- (007F5800) --------------------------------------------------------
unsigned int __thiscall NiBSplinePoint3Interpolator::GetControlHandle(NiBSplinePoint3Interpolator *this, unsigned __int16 usChannel)
{
  unsigned int result; // eax@1

  result = 0xFFFF;
  if ( !usChannel )
    result = this->m_kPoint3CPHandle;
  return result;
}

//----- (007F5820) --------------------------------------------------------
void __thiscall NiBSplinePoint3Interpolator::SetControlHandle(NiBSplinePoint3Interpolator *this, unsigned int kControlHandle, unsigned __int16 usChannel)
{
  if ( !usChannel )
    this->m_kPoint3CPHandle = kControlHandle;
}

//----- (007F5840) --------------------------------------------------------
void __thiscall NiBSplinePoint3Interpolator::CopyMembers(NiBSplinePoint3Interpolator *this, NiBSplinePoint3Interpolator *pkDest, NiCloningProcess *kCloning)
{
  NiBSplinePoint3Interpolator *v3; // esi@1

  v3 = this;
  NiBSplineInterpolator::CopyMembers(
    (NiBSplineInterpolator *)&this->vfptr,
    (NiBSplineInterpolator *)&pkDest->vfptr,
    kCloning);
  pkDest->m_kPoint3Value.x = v3->m_kPoint3Value.x;
  pkDest->m_kPoint3Value.y = v3->m_kPoint3Value.y;
  pkDest->m_kPoint3Value.z = v3->m_kPoint3Value.z;
  pkDest->m_kPoint3CPHandle = v3->m_kPoint3CPHandle;
}

//----- (007F5880) --------------------------------------------------------
NiRTTI *NiBSplinePoint3Interpolator::GetRTTI()
{
  return &NiBSplinePoint3Interpolator::m_RTTI;
}

//----- (007F5890) --------------------------------------------------------
void __thiscall NiBSplinePoint3Interpolator::NiBSplinePoint3Interpolator(NiBSplinePoint3Interpolator *this, NiBSplineData *pkData, unsigned int kPoint3CPHandle, NiBSplineBasisData *pkBasisData)
{
  NiBSplinePoint3Interpolator *v4; // esi@1

  v4 = this;
  NiBSplineInterpolator::NiBSplineInterpolator((NiBSplineInterpolator *)&this->vfptr, pkData, pkBasisData);
  v4->vfptr = (NiRefObjectVtbl *)&NiBSplinePoint3Interpolator::`vftable';
  v4->m_kPoint3CPHandle = kPoint3CPHandle;
}
// 9E71BC: using guessed type int (__thiscall *NiBSplinePoint3Interpolator::`vftable')(void *p, char);

//----- (007F58C0) --------------------------------------------------------
char __thiscall NiBSplinePoint3Interpolator::Update(NiBSplinePoint3Interpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiPoint3 *kValue)
{
  NiBSplinePoint3Interpolator *v4; // esi@1
  double v5; // st7@1
  char result; // al@2
  float v7; // ST1C_4@4
  float v8; // ST24_4@4
  float v9; // ST28_4@4
  float afValues[3]; // [sp+2Ch] [bp-10h]@4

  v4 = this;
  v5 = fTime;
  if ( fTime == this->m_fLastTime )
  {
    kValue->x = this->m_kPoint3Value.x;
    kValue->y = this->m_kPoint3Value.y;
    kValue->z = this->m_kPoint3Value.z;
    result = 1;
  }
  else
  {
    if ( this->m_kPoint3CPHandle != 0xFFFF )
    {
      v7 = (v5 - this->m_fStartTime) / (this->m_fEndTime - this->m_fStartTime);
      NiBSplineData::GetValueDegree3(
        this->m_spData.m_pObject,
        v7,
        afValues,
        3u,
        this->m_spBasisData.m_pObject,
        this->m_kPoint3CPHandle);
      v8 = afValues[1];
      v4->m_kPoint3Value.x = afValues[0];
      v9 = afValues[2];
      v4->m_kPoint3Value.y = v8;
      v5 = fTime;
      v4->m_kPoint3Value.z = v9;
    }
    kValue->x = v4->m_kPoint3Value.x;
    kValue->y = v4->m_kPoint3Value.y;
    kValue->z = v4->m_kPoint3Value.z;
    v4->m_fLastTime = v5;
    result = 1;
  }
  return result;
}

//----- (007F59A0) --------------------------------------------------------
NiBSplineInterpolator *__thiscall NiBSplinePoint3Interpolator::CreateClone(NiBSplinePoint3Interpolator *this, NiCloningProcess *kCloning)
{
  NiBSplinePoint3Interpolator *v2; // edi@1
  NiBSplineInterpolator *v3; // eax@1
  NiBSplineInterpolator *v4; // esi@1

  v2 = this;
  v3 = (NiBSplineInterpolator *)operator new(0x2Cu);
  v4 = v3;
  if ( v3 )
  {
    NiBSplineInterpolator::NiBSplineInterpolator(v3, 0, 0);
    v4->vfptr = (NiRefObjectVtbl *)&NiBSplinePoint3Interpolator::`vftable';
    LODWORD(v4[1].m_fStartTime) = 0xFFFF;
  }
  else
  {
    v4 = 0;
  }
  NiBSplineInterpolator::CopyMembers((NiBSplineInterpolator *)&v2->vfptr, v4, kCloning);
  v4[1].vfptr = (NiRefObjectVtbl *)LODWORD(v2->m_kPoint3Value.x);
  v4[1].m_uiRefCount = LODWORD(v2->m_kPoint3Value.y);
  v4[1].m_fLastTime = v2->m_kPoint3Value.z;
  LODWORD(v4[1].m_fStartTime) = v2->m_kPoint3CPHandle;
  return v4;
}
// 9E71BC: using guessed type int (__thiscall *NiBSplinePoint3Interpolator::`vftable')(void *p, char);

//----- (007F5A00) --------------------------------------------------------
NiObject *__cdecl NiBSplinePoint3Interpolator::CreateObject()
{
  NiBSplineInterpolator *v0; // eax@1
  NiObject *v1; // esi@1
  NiObject *result; // eax@2

  v0 = (NiBSplineInterpolator *)operator new(0x2Cu);
  v1 = (NiObject *)v0;
  if ( v0 )
  {
    NiBSplineInterpolator::NiBSplineInterpolator(v0, 0, 0);
    v1->vfptr = (NiRefObjectVtbl *)&NiBSplinePoint3Interpolator::`vftable';
    v1[5].vfptr = (NiRefObjectVtbl *)0xFFFF;
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E71BC: using guessed type int (__thiscall *NiBSplinePoint3Interpolator::`vftable')(void *p, char);

//----- (007F5A40) --------------------------------------------------------
void __thiscall NiBSplinePoint3Interpolator::SaveBinary(NiBSplinePoint3Interpolator *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiBSplinePoint3Interpolator *v3; // esi@1
  NiBinaryStream *v4; // edi@1
  unsigned int (__cdecl *v5)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // ecx@1

  v2 = kStream;
  v3 = this;
  NiBSplineInterpolator::SaveBinary((NiBSplineInterpolator *)&this->vfptr, kStream);
  NiColor::SaveBinary(&v3->m_kPoint3Value, v2);
  v4 = v2->m_pkOstr;
  v5 = v4->m_pfnWrite;
  kStream = (NiStream *)4;
  v5(v4, &v3->m_kPoint3CPHandle, 4u, (unsigned int *)&kStream, 1u);
}

//----- (007F5A90) --------------------------------------------------------
bool __thiscall NiBSplinePoint3Interpolator::IsEqual(NiBSplinePoint3Interpolator *this, NiObject *pkObject)
{
  NiBSplinePoint3Interpolator *v2; // esi@1
  bool result; // al@2

  v2 = this;
  if ( NiBSplineInterpolator::IsEqual((NiBSplineInterpolator *)&this->vfptr, pkObject)
    && *(float *)&pkObject[3].m_uiRefCount == v2->m_kPoint3Value.x
    && *(float *)&pkObject[4].vfptr == v2->m_kPoint3Value.y
    && *(float *)&pkObject[4].m_uiRefCount == v2->m_kPoint3Value.z )
  {
    result = pkObject[5].vfptr == (NiRefObjectVtbl *)v2->m_kPoint3CPHandle;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007F5AF0) --------------------------------------------------------
void __thiscall NiBSplinePoint3Interpolator::LoadBinary(NiBSplinePoint3Interpolator *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiBSplinePoint3Interpolator *v3; // esi@1
  NiBinaryStream *v4; // edi@1
  unsigned int (__cdecl *v5)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // ecx@1

  v2 = kStream;
  v3 = this;
  NiBSplineInterpolator::LoadBinary((NiBSplineInterpolator *)&this->vfptr, kStream);
  NiPoint3::LoadBinary(&v3->m_kPoint3Value, v2);
  v4 = v2->m_pkIstr;
  v5 = v4->m_pfnRead;
  kStream = (NiStream *)4;
  v5(v4, &v3->m_kPoint3CPHandle, 4u, (unsigned int *)&kStream, 1u);
}

//----- (007F5B40) --------------------------------------------------------
void __thiscall NiBSplinePoint3Interpolator::GetViewerStrings(NiBSplinePoint3Interpolator *this, NiTArray<char *> *pkStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiBSplinePoint3Interpolator *v3; // ebx@1
  NiTArray<char *> *v4; // eax@1
  unsigned int v5; // edi@1
  NiTArray<char *> *v6; // eax@3
  unsigned int v7; // edi@3

  v2 = (NiTArray<NiVBBlock *> *)pkStrings;
  v3 = this;
  NiBSplineInterpolator::GetViewerStrings((NiBSplineInterpolator *)&this->vfptr, pkStrings);
  v4 = (NiTArray<char *> *)NiGetViewerString(NiBSplinePoint3Interpolator::m_RTTI.m_pcName);
  v5 = v2->m_uiSize;
  pkStrings = v4;
  if ( v5 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v5 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v5, (NiVBChip *const *)&pkStrings);
  v6 = (NiTArray<char *> *)NiGetViewerString("m_kPoint3CPHandle", v3->m_kPoint3CPHandle);
  v7 = v2->m_uiSize;
  pkStrings = v6;
  if ( v7 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v7 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v7, (NiVBChip *const *)&pkStrings);
}

//----- (007F5BC0) --------------------------------------------------------
void __thiscall NiBSplineFloatInterpolator::NiBSplineFloatInterpolator(NiBSplineFloatInterpolator *this, NiBSplineData *pkData, unsigned int kFloatCPHandle, NiBSplineBasisData *pkBasisData)
{
  NiBSplineFloatInterpolator *v4; // esi@1

  v4 = this;
  NiBSplineInterpolator::NiBSplineInterpolator((NiBSplineInterpolator *)&this->vfptr, pkData, pkBasisData);
  v4->vfptr = (NiRefObjectVtbl *)&NiBSplineFloatInterpolator::`vftable';
  v4->m_kFloatCPHandle = kFloatCPHandle;
}
// 9E7284: using guessed type int (__thiscall *NiBSplineFloatInterpolator::`vftable')(void *p, char);

//----- (007F5BF0) --------------------------------------------------------
int NiDirectionalLight::GetEffectType()
{
  return 1;
}

//----- (007F5C00) --------------------------------------------------------
bool __thiscall NiBSplineColorInterpolator::GetChannelPosed(NiBSplinePoint3Interpolator *this, unsigned __int16 usChannel)
{
  int v2; // eax@2

  if ( usChannel )
    LOBYTE(v2) = 0;
  else
    v2 = (unsigned int)((int (__stdcall *)(_DWORD))this->vfptr[35].__vecDelDtor)(0) <= 0;
  return v2;
}

//----- (007F5C30) --------------------------------------------------------
BOOL __stdcall NiBSplineFloatInterpolator::GetDimension(unsigned __int16 usChannel)
{
  return usChannel == 0;
}

//----- (007F5C50) --------------------------------------------------------
unsigned int __thiscall NiBSplineFloatInterpolator::GetControlHandle(NiBSplineFloatInterpolator *this, unsigned __int16 usChannel)
{
  unsigned int result; // eax@1

  result = 0xFFFF;
  if ( !usChannel )
    result = this->m_kFloatCPHandle;
  return result;
}

//----- (007F5C70) --------------------------------------------------------
void __thiscall NiBSplineFloatInterpolator::SetControlHandle(NiBSplineFloatInterpolator *this, unsigned int kControlHandle, unsigned __int16 usChannel)
{
  if ( !usChannel )
    this->m_kFloatCPHandle = kControlHandle;
}

//----- (007F5C90) --------------------------------------------------------
void __thiscall NiBSplineFloatInterpolator::CopyMembers(NiBSplineFloatInterpolator *this, NiBSplineFloatInterpolator *pkDest, NiCloningProcess *kCloning)
{
  NiBSplineFloatInterpolator *v3; // esi@1

  v3 = this;
  NiBSplineInterpolator::CopyMembers(
    (NiBSplineInterpolator *)&this->vfptr,
    (NiBSplineInterpolator *)&pkDest->vfptr,
    kCloning);
  pkDest->m_fFloatValue = v3->m_fFloatValue;
  pkDest->m_kFloatCPHandle = v3->m_kFloatCPHandle;
}

//----- (007F5CC0) --------------------------------------------------------
NiObject *__cdecl NiBSplineFloatInterpolator::CreateObject()
{
  NiBSplineInterpolator *v0; // eax@1
  NiObject *v1; // esi@1
  NiObject *result; // eax@2

  v0 = (NiBSplineInterpolator *)operator new(0x24u);
  v1 = (NiObject *)v0;
  if ( v0 )
  {
    NiBSplineInterpolator::NiBSplineInterpolator(v0, 0, 0);
    v1->vfptr = (NiRefObjectVtbl *)&NiBSplineFloatInterpolator::`vftable';
    v1[4].vfptr = (NiRefObjectVtbl *)0xFFFF;
    result = v1;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E7284: using guessed type int (__thiscall *NiBSplineFloatInterpolator::`vftable')(void *p, char);

//----- (007F5D00) --------------------------------------------------------
bool __thiscall NiBSplineFloatInterpolator::IsEqual(NiBSplineFloatInterpolator *this, NiObject *pkObject)
{
  NiBSplineFloatInterpolator *v2; // esi@1
  bool result; // al@2

  v2 = this;
  if ( NiBSplineInterpolator::IsEqual((NiBSplineInterpolator *)&this->vfptr, pkObject)
    && *(float *)&pkObject[3].m_uiRefCount == v2->m_fFloatValue )
  {
    result = pkObject[4].vfptr == (NiRefObjectVtbl *)v2->m_kFloatCPHandle;
  }
  else
  {
    result = 0;
  }
  return result;
}

//----- (007F5D40) --------------------------------------------------------
NiRTTI *NiBSplineFloatInterpolator::GetRTTI()
{
  return &NiBSplineFloatInterpolator::m_RTTI;
}

//----- (007F5D50) --------------------------------------------------------
char __thiscall NiBSplineFloatInterpolator::Update(NiBSplineFloatInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, float *fValue)
{
  NiBSplineFloatInterpolator *v4; // esi@1
  double v5; // st7@1
  char result; // al@2
  float v7; // ST18_4@4

  v4 = this;
  v5 = fTime;
  if ( fTime == this->m_fLastTime )
  {
    *fValue = this->m_fFloatValue;
    result = 1;
  }
  else
  {
    if ( this->m_kFloatCPHandle != 0xFFFF )
    {
      v7 = (v5 - this->m_fStartTime) / (this->m_fEndTime - this->m_fStartTime);
      NiBSplineData::GetValueDegree3(
        this->m_spData.m_pObject,
        v7,
        &this->m_fFloatValue,
        1u,
        this->m_spBasisData.m_pObject,
        this->m_kFloatCPHandle);
      v5 = fTime;
    }
    *fValue = v4->m_fFloatValue;
    result = 1;
    v4->m_fLastTime = v5;
  }
  return result;
}

//----- (007F5DD0) --------------------------------------------------------
NiBSplineInterpolator *__thiscall NiBSplineFloatInterpolator::CreateClone(NiBSplineFloatInterpolator *this, NiCloningProcess *kCloning)
{
  NiBSplineFloatInterpolator *v2; // edi@1
  NiBSplineInterpolator *v3; // eax@1
  NiBSplineInterpolator *v4; // esi@1

  v2 = this;
  v3 = (NiBSplineInterpolator *)operator new(0x24u);
  v4 = v3;
  if ( v3 )
  {
    NiBSplineInterpolator::NiBSplineInterpolator(v3, 0, 0);
    v4->vfptr = (NiRefObjectVtbl *)&NiBSplineFloatInterpolator::`vftable';
    v4[1].m_uiRefCount = 0xFFFF;
  }
  else
  {
    v4 = 0;
  }
  NiBSplineInterpolator::CopyMembers((NiBSplineInterpolator *)&v2->vfptr, v4, kCloning);
  *(float *)&v4[1].vfptr = v2->m_fFloatValue;
  v4[1].m_uiRefCount = v2->m_kFloatCPHandle;
  return v4;
}
// 9E7284: using guessed type int (__thiscall *NiBSplineFloatInterpolator::`vftable')(void *p, char);

//----- (007F5E30) --------------------------------------------------------
void __thiscall NiBSplineFloatInterpolator::SaveBinary(NiBSplineFloatInterpolator *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiBSplineFloatInterpolator *v3; // esi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST14_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v7; // edi@1
  unsigned int (__cdecl *v8)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@1

  v2 = kStream;
  v3 = this;
  NiBSplineInterpolator::SaveBinary((NiBSplineInterpolator *)&this->vfptr, kStream);
  v4 = v2->m_pkOstr;
  v5 = v4;
  v6 = v4->m_pfnWrite;
  kStream = (NiStream *)4;
  v6(v5, &v3->m_fFloatValue, 4u, (unsigned int *)&kStream, 1u);
  v7 = v2->m_pkOstr;
  v8 = v7->m_pfnWrite;
  kStream = (NiStream *)4;
  v8(v7, &v3->m_kFloatCPHandle, 4u, (unsigned int *)&kStream, 1u);
}

//----- (007F5E90) --------------------------------------------------------
void __thiscall NiBSplineFloatInterpolator::LoadBinary(NiBSplineFloatInterpolator *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiBSplineFloatInterpolator *v3; // esi@1
  NiBinaryStream *v4; // eax@1
  NiBinaryStream *v5; // ST14_4@1
  unsigned int (__cdecl *v6)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // eax@1
  NiBinaryStream *v7; // edi@1
  unsigned int (__cdecl *v8)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@1

  v2 = kStream;
  v3 = this;
  NiBSplineInterpolator::LoadBinary((NiBSplineInterpolator *)&this->vfptr, kStream);
  v4 = v2->m_pkIstr;
  v5 = v4;
  v6 = v4->m_pfnRead;
  kStream = (NiStream *)4;
  v6(v5, &v3->m_fFloatValue, 4u, (unsigned int *)&kStream, 1u);
  v7 = v2->m_pkIstr;
  v8 = v7->m_pfnRead;
  kStream = (NiStream *)4;
  v8(v7, &v3->m_kFloatCPHandle, 4u, (unsigned int *)&kStream, 1u);
}

//----- (007F5EF0) --------------------------------------------------------
void __thiscall NiBSplineFloatInterpolator::GetViewerStrings(NiBSplineFloatInterpolator *this, NiTArray<char *> *pkStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiBSplineFloatInterpolator *v3; // ebx@1
  NiTArray<char *> *v4; // eax@1
  unsigned int v5; // edi@1
  NiTArray<char *> *v6; // eax@3
  unsigned int v7; // edi@3
  NiTArray<char *> *v8; // eax@5
  unsigned int v9; // edi@5

  v2 = (NiTArray<NiVBBlock *> *)pkStrings;
  v3 = this;
  NiBSplineInterpolator::GetViewerStrings((NiBSplineInterpolator *)&this->vfptr, pkStrings);
  v4 = (NiTArray<char *> *)NiGetViewerString(NiBSplineFloatInterpolator::m_RTTI.m_pcName);
  v5 = v2->m_uiSize;
  pkStrings = v4;
  if ( v5 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v5 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v5, (NiVBChip *const *)&pkStrings);
  v6 = (NiTArray<char *> *)NiGetViewerString("m_fFloatValue", v3->m_fFloatValue);
  v7 = v2->m_uiSize;
  pkStrings = v6;
  if ( v7 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v7 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v7, (NiVBChip *const *)&pkStrings);
  v8 = (NiTArray<char *> *)NiGetViewerString("m_kFloatCPHandle", v3->m_kFloatCPHandle);
  v9 = v2->m_uiSize;
  pkStrings = v8;
  if ( v9 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v9 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v9, (NiVBChip *const *)&pkStrings);
}

//----- (007F5FB0) --------------------------------------------------------
char __thiscall NiBSplineCompTransformInterpolator::IsEqual(NiBSplineCompTransformInterpolator *this, NiObject *pkObject)
{
  NiBSplineCompTransformInterpolator *v2; // edi@1
  unsigned int v4; // ecx@3
  float *v5; // edx@3
  int v6; // edi@3

  v2 = this;
  if ( NiBSplineTransformInterpolator::IsEqual((NiBSplineTransformInterpolator *)&this->vfptr, pkObject) )
  {
    v4 = 0;
    v5 = (float *)&pkObject[9];
    v6 = (char *)v2 - (char *)pkObject;
    while ( *v5 == *(float *)((char *)v5 + v6) )
    {
      ++v4;
      ++v5;
      if ( v4 >= 6 )
        return 1;
    }
  }
  return 0;
}

//----- (007F6000) --------------------------------------------------------
NiRTTI *NiBSplineCompTransformInterpolator::GetRTTI()
{
  return &NiBSplineCompTransformInterpolator::m_RTTI;
}

//----- (007F6010) --------------------------------------------------------
NiBSplineTransformInterpolator *__thiscall NiBSplineCompTransformInterpolator::CreateClone(NiBSplineCompTransformInterpolator *this, NiCloningProcess *kCloning)
{
  NiBSplineCompTransformInterpolator *v2; // edi@1
  NiBSplineTransformInterpolator *v3; // eax@1
  NiBSplineTransformInterpolator *v4; // esi@1
  NiBSplineTransformInterpolator *result; // eax@4

  v2 = this;
  v3 = (NiBSplineTransformInterpolator *)operator new(0x60u);
  v4 = v3;
  if ( v3 )
  {
    NiBSplineTransformInterpolator::NiBSplineTransformInterpolator(v3, 0, 0xFFFFu, 0xFFFFu, 0xFFFFu, 0);
    v4->vfptr = (NiRefObjectVtbl *)&NiBSplineCompTransformInterpolator::`vftable';
    *(float *)&v4[1].vfptr = 3.4028235e38;
    *(float *)&v4[1].m_uiRefCount = 3.4028235e38;
    v4[1].m_fLastTime = 3.4028235e38;
    v4[1].m_fStartTime = 3.4028235e38;
    v4[1].m_fEndTime = 3.4028235e38;
    *(float *)&v4[1].m_spData.m_pObject = 3.4028235e38;
  }
  else
  {
    v4 = 0;
  }
  NiBSplineTransformInterpolator::CopyMembers((NiBSplineTransformInterpolator *)&v2->vfptr, v4, kCloning);
  *(float *)&v4[1].vfptr = v2->m_afCompScalars[0];
  result = v4;
  *(float *)&v4[1].m_uiRefCount = v2->m_afCompScalars[1];
  v4[1].m_fLastTime = v2->m_afCompScalars[2];
  v4[1].m_fStartTime = v2->m_afCompScalars[3];
  v4[1].m_fEndTime = v2->m_afCompScalars[4];
  *(float *)&v4[1].m_spData.m_pObject = v2->m_afCompScalars[5];
  return result;
}
// 9E734C: using guessed type int (__thiscall *NiBSplineCompTransformInterpolator::`vftable')(void *p, char);

//----- (007F60C0) --------------------------------------------------------
NiBSplineTransformInterpolator *__cdecl NiBSplineCompTransformInterpolator::CreateObject()
{
  NiBSplineTransformInterpolator *v0; // eax@1
  NiBSplineTransformInterpolator *v1; // esi@1
  NiBSplineTransformInterpolator *result; // eax@2

  v0 = (NiBSplineTransformInterpolator *)operator new(0x60u);
  v1 = v0;
  if ( v0 )
  {
    NiBSplineTransformInterpolator::NiBSplineTransformInterpolator(v0, 0, 0xFFFFu, 0xFFFFu, 0xFFFFu, 0);
    v1->vfptr = (NiRefObjectVtbl *)&NiBSplineCompTransformInterpolator::`vftable';
    *(float *)&v1[1].vfptr = 3.4028235e38;
    result = v1;
    *(float *)&v1[1].m_uiRefCount = 3.4028235e38;
    v1[1].m_fLastTime = 3.4028235e38;
    v1[1].m_fStartTime = 3.4028235e38;
    v1[1].m_fEndTime = 3.4028235e38;
    *(float *)&v1[1].m_spData.m_pObject = 3.4028235e38;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E734C: using guessed type int (__thiscall *NiBSplineCompTransformInterpolator::`vftable')(void *p, char);

//----- (007F6130) --------------------------------------------------------
char __thiscall NiBSplineCompTransformInterpolator::Update(NiBSplineCompTransformInterpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiQuatTransform *kValue)
{
  NiBSplineCompTransformInterpolator *v4; // ebx@1
  double v5; // st7@2
  unsigned int v7; // eax@7
  double v8; // st7@8
  double v9; // st7@8
  unsigned int v10; // eax@9
  float v11; // edx@10
  float v12; // eax@10
  float v13; // ecx@10
  unsigned int v14; // eax@11
  double v15; // st7@13
  NiQuaternion kQuat; // [sp+28h] [bp-28h]@8
  float fNormTime; // [sp+38h] [bp-18h]@2
  float afValues[4]; // [sp+3Ch] [bp-14h]@8

  v4 = this;
  if ( fTime == this->m_fLastTime )
  {
    qmemcpy(kValue, &this->m_kTransformValue, sizeof(NiQuatTransform));
    fNormTime = -3.4028235e38;
    v5 = fNormTime;
    if ( fNormTime == this->m_kTransformValue.m_fScale
      && v5 == this->m_kTransformValue.m_kRotate.m_fX
      && this->m_kTransformValue.m_kTranslate.x == v5 )
    {
      return 0;
    }
  }
  else
  {
    v7 = this->m_kTransCPHandle;
    fNormTime = (fTime - this->m_fStartTime) / (this->m_fEndTime - this->m_fStartTime);
    if ( v7 != 0xFFFF )
    {
      NiBSplineData::GetCompactedValueDegree3(
        this->m_spData.m_pObject,
        fNormTime,
        afValues,
        3u,
        this->m_spBasisData.m_pObject,
        v7,
        this->m_afCompScalars[0],
        this->m_afCompScalars[1]);
      kQuat.m_fX = afValues[0];
      v8 = afValues[1];
      v4->m_kTransformValue.m_kTranslate.x = afValues[0];
      kQuat.m_fY = v8;
      v9 = afValues[2];
      v4->m_kTransformValue.m_kTranslate.y = kQuat.m_fY;
      kQuat.m_fZ = v9;
      v4->m_kTransformValue.m_kTranslate.z = kQuat.m_fZ;
    }
    v10 = v4->m_kRotCPHandle;
    if ( v10 != 0xFFFF )
    {
      NiBSplineData::GetCompactedValueDegree3(
        v4->m_spData.m_pObject,
        fNormTime,
        afValues,
        4u,
        v4->m_spBasisData.m_pObject,
        v10,
        v4->m_afCompScalars[2],
        v4->m_afCompScalars[3]);
      NiQuaternion::NiQuaternion(&kQuat, afValues[0], afValues[1], afValues[2], afValues[3]);
      NiQuaternion::FastNormalize(&kQuat);
      v11 = kQuat.m_fX;
      v12 = kQuat.m_fY;
      v4->m_kTransformValue.m_kRotate.m_fW = kQuat.m_fW;
      v13 = kQuat.m_fZ;
      v4->m_kTransformValue.m_kRotate.m_fX = v11;
      v4->m_kTransformValue.m_kRotate.m_fY = v12;
      v4->m_kTransformValue.m_kRotate.m_fZ = v13;
    }
    v14 = v4->m_kScaleCPHandle;
    if ( v14 != 0xFFFF )
    {
      NiBSplineData::GetCompactedValueDegree3(
        v4->m_spData.m_pObject,
        fNormTime,
        afValues,
        1u,
        v4->m_spBasisData.m_pObject,
        v14,
        v4->m_afCompScalars[4],
        v4->m_afCompScalars[5]);
      v4->m_kTransformValue.m_fScale = afValues[0];
    }
    qmemcpy(kValue, &v4->m_kTransformValue, sizeof(NiQuatTransform));
    fNormTime = -3.4028235e38;
    v15 = fNormTime;
    if ( fNormTime == v4->m_kTransformValue.m_fScale
      && v15 == v4->m_kTransformValue.m_kRotate.m_fX
      && v4->m_kTransformValue.m_kTranslate.x == v15 )
    {
      return 0;
    }
    v4->m_fLastTime = fTime;
  }
  return 1;
}

//----- (007F6350) --------------------------------------------------------
void __thiscall NiBSplineCompTransformInterpolator::LoadBinary(NiBSplineCompTransformInterpolator *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiBSplineCompTransformInterpolator *v3; // esi@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@1
  NiBinaryStream *v5; // ST00_4@1

  v2 = kStream;
  v3 = this;
  NiBSplineTransformInterpolator::LoadBinary((NiBSplineTransformInterpolator *)&this->vfptr, kStream);
  v4 = v2->m_pkIstr->m_pfnRead;
  v5 = v2->m_pkIstr;
  kStream = (NiStream *)4;
  v4(v5, v3->m_afCompScalars, 24u, (unsigned int *)&kStream, 1u);
}

//----- (007F6390) --------------------------------------------------------
void __thiscall NiBSplineCompTransformInterpolator::SaveBinary(NiBSplineCompTransformInterpolator *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiBSplineCompTransformInterpolator *v3; // esi@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, const void *, unsigned int, unsigned int *, unsigned int); // edx@1
  NiBinaryStream *v5; // ST00_4@1

  v2 = kStream;
  v3 = this;
  NiBSplineTransformInterpolator::SaveBinary((NiBSplineTransformInterpolator *)&this->vfptr, kStream);
  v4 = v2->m_pkOstr->m_pfnWrite;
  v5 = v2->m_pkOstr;
  kStream = (NiStream *)4;
  v4(v5, v3->m_afCompScalars, 24u, (unsigned int *)&kStream, 1u);
}

//----- (007F63D0) --------------------------------------------------------
void __thiscall NiBSplineCompTransformInterpolator::GetViewerStrings(NiBSplineCompTransformInterpolator *this, NiTArray<char *> *pkStrings)
{
  NiTArray<NiVBBlock *> *v2; // esi@1
  NiTArray<char *> *v3; // eax@1
  unsigned int v4; // edi@1

  v2 = (NiTArray<NiVBBlock *> *)pkStrings;
  NiBSplineTransformInterpolator::GetViewerStrings((NiBSplineTransformInterpolator *)&this->vfptr, pkStrings);
  v3 = (NiTArray<char *> *)NiGetViewerString(NiBSplineCompTransformInterpolator::m_RTTI.m_pcName);
  v4 = v2->m_uiSize;
  pkStrings = v3;
  if ( v4 >= v2->m_uiMaxSize )
    NiTArray<NiScreenGeometryData::ScreenElement *>::SetSize(v2, v4 + v2->m_uiGrowBy);
  NiTArray<NiCollisionGroup::Record *>::SetAt((NiTArray<NiVBChip *> *)v2, v4, (NiVBChip *const *)&pkStrings);
}

//----- (007F6420) --------------------------------------------------------
char ITableBase<UseClassTypeInfo,UseCalssTypeTable>::DataProcess()
{
  return 1;
}

//----- (007F6430) --------------------------------------------------------
char __thiscall NiBSplineCompPoint3Interpolator::IsEqual(NiBSplineCompPoint3Interpolator *this, NiObject *pkObject)
{
  NiBSplineCompPoint3Interpolator *v2; // edi@1
  unsigned int v4; // ecx@3
  float *v5; // edx@3
  int v6; // edi@3

  v2 = this;
  if ( NiBSplinePoint3Interpolator::IsEqual((NiBSplinePoint3Interpolator *)&this->vfptr, pkObject) )
  {
    v4 = 0;
    v5 = (float *)&pkObject[5].m_uiRefCount;
    v6 = (char *)v2 - (char *)pkObject;
    while ( *v5 == *(float *)((char *)v5 + v6) )
    {
      ++v4;
      ++v5;
      if ( v4 >= 2 )
        return 1;
    }
  }
  return 0;
}

//----- (007F6480) --------------------------------------------------------
NiRTTI *NiBSplineCompPoint3Interpolator::GetRTTI()
{
  return &NiBSplineCompPoint3Interpolator::m_RTTI;
}

//----- (007F6490) --------------------------------------------------------
char __thiscall NiBSplineCompPoint3Interpolator::Update(NiBSplineCompPoint3Interpolator *this, float fTime, NiObjectNET *pkInterpTarget, NiPoint3 *kValue)
{
  NiBSplineCompPoint3Interpolator *v4; // esi@1
  double v5; // st7@1
  char result; // al@2
  unsigned int v7; // eax@3
  float v8; // ST24_4@4
  float v9; // ST2C_4@4
  float v10; // ST30_4@4
  float afValues[4]; // [sp+34h] [bp-14h]@4

  v4 = this;
  v5 = fTime;
  if ( fTime == this->m_fLastTime )
  {
    kValue->x = this->m_kPoint3Value.x;
    kValue->y = this->m_kPoint3Value.y;
    kValue->z = this->m_kPoint3Value.z;
    result = 1;
  }
  else
  {
    v7 = this->m_kPoint3CPHandle;
    if ( v7 != 0xFFFF )
    {
      v8 = (v5 - this->m_fStartTime) / (this->m_fEndTime - this->m_fStartTime);
      NiBSplineData::GetCompactedValueDegree3(
        this->m_spData.m_pObject,
        v8,
        afValues,
        3u,
        this->m_spBasisData.m_pObject,
        v7,
        this->m_afCompScalars[0],
        this->m_afCompScalars[1]);
      v9 = afValues[1];
      v4->m_kPoint3Value.x = afValues[0];
      v10 = afValues[2];
      v4->m_kPoint3Value.y = v9;
      v5 = fTime;
      v4->m_kPoint3Value.z = v10;
    }
    kValue->x = v4->m_kPoint3Value.x;
    kValue->y = v4->m_kPoint3Value.y;
    kValue->z = v4->m_kPoint3Value.z;
    v4->m_fLastTime = v5;
    result = 1;
  }
  return result;
}

//----- (007F6580) --------------------------------------------------------
NiBSplinePoint3Interpolator *__thiscall NiBSplineCompPoint3Interpolator::CreateClone(NiBSplineCompPoint3Interpolator *this, NiCloningProcess *kCloning)
{
  NiBSplineCompPoint3Interpolator *v2; // edi@1
  NiBSplinePoint3Interpolator *v3; // eax@1
  NiBSplinePoint3Interpolator *v4; // esi@1
  NiBSplinePoint3Interpolator *result; // eax@4

  v2 = this;
  v3 = (NiBSplinePoint3Interpolator *)operator new(0x34u);
  v4 = v3;
  if ( v3 )
  {
    NiBSplinePoint3Interpolator::NiBSplinePoint3Interpolator(v3, 0, 0xFFFFu, 0);
    v4->vfptr = (NiRefObjectVtbl *)&NiBSplineCompPoint3Interpolator::`vftable';
    *(float *)&v4[1].vfptr = 3.4028235e38;
    *(float *)&v4[1].m_uiRefCount = 3.4028235e38;
  }
  else
  {
    v4 = 0;
  }
  NiBSplinePoint3Interpolator::CopyMembers((NiBSplinePoint3Interpolator *)&v2->vfptr, v4, kCloning);
  *(float *)&v4[1].vfptr = v2->m_afCompScalars[0];
  result = v4;
  *(float *)&v4[1].m_uiRefCount = v2->m_afCompScalars[1];
  return result;
}
// 9E73FC: using guessed type int (__thiscall *NiBSplineCompPoint3Interpolator::`vftable')(void *p, char);

//----- (007F65F0) --------------------------------------------------------
NiBSplinePoint3Interpolator *__cdecl NiBSplineCompPoint3Interpolator::CreateObject()
{
  NiBSplinePoint3Interpolator *v0; // eax@1
  NiBSplinePoint3Interpolator *v1; // esi@1
  NiBSplinePoint3Interpolator *result; // eax@2

  v0 = (NiBSplinePoint3Interpolator *)operator new(0x34u);
  v1 = v0;
  if ( v0 )
  {
    NiBSplinePoint3Interpolator::NiBSplinePoint3Interpolator(v0, 0, 0xFFFFu, 0);
    v1->vfptr = (NiRefObjectVtbl *)&NiBSplineCompPoint3Interpolator::`vftable';
    *(float *)&v1[1].vfptr = 3.4028235e38;
    result = v1;
    *(float *)&v1[1].m_uiRefCount = 3.4028235e38;
  }
  else
  {
    result = 0;
  }
  return result;
}
// 9E73FC: using guessed type int (__thiscall *NiBSplineCompPoint3Interpolator::`vftable')(void *p, char);

//----- (007F6640) --------------------------------------------------------
void __thiscall NiBSplineCompPoint3Interpolator::LoadBinary(NiBSplineCompPoint3Interpolator *this, NiStream *kStream)
{
  NiStream *v2; // edi@1
  NiBSplineCompPoint3Interpolator *v3; // esi@1
  unsigned int (__cdecl *v4)(NiBinaryStream *, void *, unsigned int, unsigned int *, unsigned int); // edx@1
  NiBinaryStream *v5; // ST00_4@1

  v2 = kStream;
  v3 = this;
  NiBSplinePoint3Interpolator::LoadBinary((NiBSplinePoint3Interpolator *)&this->vfptr, kStream);
  v4 = v2->m_pkIstr->m_pfnRead;
  v5 = v2->m_pkIstr;
  kStream = (NiStream *)4;
  v4(v5, v3->m_afCompScalars, 8u, (unsigned int *)&kStream, 1u);
}

//----- (007F6680) --------------------------------------------------------
void __thiscall NiBSplineCompPo